diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index b4ededd39033..d6a3e5a9b9e1 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -187,10 +187,10 @@ # ServiceOwners: @quentinRobinson @bidisha-c # PRLabel: %Cognitive - Content Safety -/sdk/contentsafety/ @bowgong @mengaims @JieZhou000 +/sdk/contentsafety/ @bowgong @mengaims # ServiceLabel: %Cognitive - Content Safety -# ServiceOwners: @bowgong @mengaims @JieZhou000 +# ServiceOwners: @bowgong @mengaims # PRLabel: %Cognitive - Custom Vision /sdk/cognitiveservices/Vision.CustomVision*/ @areddish @tburns10 @@ -261,10 +261,10 @@ # ServiceOwners: @quentinRobinson @bidisha-c # PRLabel: %Cognitive - Translator -/sdk/translation/ @mikeymcz @cpoulain @joseharriaga +/sdk/translation/ @mikeymcz @joseharriaga @vikaspalaskar # ServiceLabel: %Cognitive - Translator -# ServiceOwners: @swmachan @mikeymcz @cpoulain +# ServiceOwners: @swmachan @mikeymcz @vikaspalaskar # ServiceLabel: %Cognitive - Speech # ServiceOwners: @robch @@ -354,10 +354,10 @@ # ServiceOwners: @TravisCragg-MSFT @hilaryw29 # PRLabel: %Confidential Ledger -/sdk/confidentialledger/ @christothes @PallabPaul +/sdk/confidentialledger/ @christothes @PallabPaul @amruthashree18 # ServiceLabel: %Confidential Ledger -# ServiceOwners: @PallabPaul +# ServiceOwners: @PallabPaul @amruthashree18 # ServiceLabel: %Consumption - Billing # ServiceOwners: @ccmbpxpcrew @@ -516,10 +516,10 @@ # ServiceOwners: @serkantkaraca @sjkwak # PRLabel: %Extension - WCF -/sdk/extension-wcf/ @mconnew @subhra231 +/sdk/extension-wcf/ @mconnew # ServiceLabel: %Extension - WCF -# ServiceOwners: @mconnew @subhra231 +# ServiceOwners: @mconnew # ServiceLabel: %Functions # AzureSdkOwners: @JoshLove-msft @@ -562,10 +562,10 @@ # ServiceOwners: @Azure/azure-iot-cli-triage # PRLabel: %KeyVault -/sdk/keyvault/ @heaths @schaabs @JonathanCrd @jsquire @christothes +/sdk/keyvault/ @schaabs @JonathanCrd @jsquire @christothes # ServiceLabel: %KeyVault -# AzureSdkOwners: @heaths +# AzureSdkOwners: @JonathanCrd # ServiceOwners: @RandalliLama @jlichwa # ServiceLabel: %Kubernetes Configuration @@ -605,9 +605,9 @@ # ServiceOwners: @Lighthouse-Azure # PRLabel: %Maps -/sdk/maps/ @dubiety @jecmenicanikola +/sdk/maps/ @dubiety # ServiceLabel: %Maps -# ServiceOwners: @dubiety @jecmenicanikola +# ServiceOwners: @dubiety # ServiceLabel: %MariaDB # ServiceOwners: @ajlam @ambhatna @kummanish @@ -723,7 +723,7 @@ # ServiceOwners: @netwatchsuppgithub # PRLabel: %Network - DNS -/sdk/dns*/ @dnssuppgithub +/sdk/dns/ @dnssuppgithub # ServiceLabel: %Network - DNS # ServiceOwnerS: @dnssuppgithub @@ -756,10 +756,10 @@ # ServiceOwners: @rhurey @dargilco # PRLabel: %Microsoft Playwright Testing -/sdk/playwrighttesting/ @shreyaanand @mjmadhu +/sdk/playwrighttesting/ @Sid200026 @puagarwa @ShreyaAnand # ServiceLabel: %Microsoft Playwright Testing -# ServiceOwners: @shreyaanand @mjmadhu +# ServiceOwners: @Sid200026 @puagarwa @ShreyaAnand # ServiceLabel: %Policy # ServiceOwners: @aperezcloud @kenieva @@ -771,7 +771,7 @@ # ServiceOwners: @sunilagarwal @lfittl-msft @sr-msft @niklarin # PRLabel: %Provisioning -/sdk/provisioning/ @JoshLove-msft @tg-msft +/sdk/provisioning/ @JoshLove-msft @tg-msft @christothes @KrzysztofCwalina # ServiceLabel: %Provisioning # AzureSdkOwners: @JoshLove-msft @@ -840,10 +840,10 @@ # ServiceOwners: @hmlam # PRLabel: %SignalR -/sdk/signalr/ @sffamily @chenkennt @Y-Sindo +/sdk/signalr/ @chenkennt @vicancy @JialinXin @Y-Sindo # ServiceLabel: %SignalR -# ServiceOwners: @sffamily @chenkennt @Y-Sindo +# ServiceOwners: @chenkennt @vicancy @JialinXin @Y-Sindo # ServiceLabel: %SQL # ServiceOwners: @azureSQLGitHub @@ -967,6 +967,12 @@ # PRLabel: %Communication - Resource Manager /sdk/communication/Azure.ResourceManager.Communication/ @archerzz @ArcturusZhang @ArthurMa1978 +# PRLael: %Container Orchestrator Runtime +/sdk/containerorchestratorruntime/Azure.ResourceManager.*/ @HE-Xinyu @ddadaal + +# ServiceLabel: %Container Orchestrator Runtime +# ServiceOwners: @HE-Xinyu @ddadaal + # PRLabel: %Device Registry /sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/ @davidemontanari @atastrophic @marcodalessandro @rohankhandelwal @riteshrao @@ -1015,6 +1021,12 @@ # ServiceLabel: %Network - Mobile %Mgmt # ServiceOwners: @ArthurMa1978 +# PRLabel: %Network - DNS Private Resolver +/sdk/dnsresolver/Azure.ResourceManager.*/ @jamesvoongms @jotrivet + +# ServiceLabel: %Network - DNS Private Resolver %Mgmt +# ServiceOwners: @jamesvoongms @jotrivet + # PRLabel: %New Relic /sdk/newrelicobservability/Azure.ResourceManager.*/ @dipeshbhakat-microsoft @vipray-ms @@ -1052,10 +1064,7 @@ # ServiceOwners: @Daya-Patil # PRLabel: %Self Help -/sdk/selfhelp/Azure.ResourceManager.*/ @siddiavinashmsft @archerzz @ArcturusZhang @ArthurMa1978 - -# ServiceLabel: %Self Help %Mgmt -# ServiceOwners: @siddiavinashmsft +/sdk/selfhelp/Azure.ResourceManager.*/ @archerzz @ArcturusZhang @ArthurMa1978 # PRLabel: %Spring App Discovery /sdk/springappdiscovery/Azure.ResourceManager.*/ @sunkun99 @archerzz @ArcturusZhang @ArthurMa1978 @@ -1064,10 +1073,10 @@ # ServiceOwners: @sunkun99 # PRLabel: %Compute - Fleet -/sdk/computefleet/ @sahilarora92 @dhruvil009 +/sdk/computefleet/Azure.ResourceManager.*/ @sahilarora92 @dhruvil009 @rahuls-microsoft -# ServiceLabel: %Compute - Fleet -# ServiceOwners: @sahilarora92 @dhruvil009 +# ServiceLabel: %Compute - Fleet %Mgmt +# ServiceOwners: @sahilarora92 @dhruvil009 @rahuls-microsoft # ######## Eng Sys ######## /eng/ @hallipr @weshaggard @benbp diff --git a/.github/CODEOWNERS_baseline_errors.txt b/.github/CODEOWNERS_baseline_errors.txt index 9373092cb567..3854c6f2dd05 100644 --- a/.github/CODEOWNERS_baseline_errors.txt +++ b/.github/CODEOWNERS_baseline_errors.txt @@ -253,7 +253,6 @@ EldertGrootenboer is not a public member of Azure. QingChenmsft is an invalid user. Ensure the user exists, is public member of Azure and has write permissions. vaishnavk is an invalid user. Ensure the user exists, is public member of Azure and has write permissions. juhacket is an invalid user. Ensure the user exists, is public member of Azure and has write permissions. -sffamily is an invalid user. Ensure the user exists, is public member of Azure and has write permissions. chenkennt is an invalid user. Ensure the user exists, is public member of Azure and has write permissions. azureSQLGitHub is an invalid user. Ensure the user exists, is public member of Azure and has write permissions. xgithubtriage is an invalid user. Ensure the user exists, is public member of Azure and has write permissions. diff --git a/.github/workflows/event-processor.yml b/.github/workflows/event-processor.yml index 907c0d5a6e9c..32ec1923940d 100644 --- a/.github/workflows/event-processor.yml +++ b/.github/workflows/event-processor.yml @@ -87,10 +87,7 @@ jobs: - name: Process Action Event run: | - cat > payload.json << 'EOF' - ${{ toJson(github.event) }} - EOF - github-event-processor ${{ github.event_name }} payload.json + github-event-processor ${{ github.event_name }} ${{ github.event_path }} shell: bash env: # This is a temporary secret generated by github @@ -98,6 +95,13 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} LABEL_SERVICE_API_KEY: ${{ env.LABEL_SERVICE_API_KEY }} + - name: Archive github event data + uses: actions/upload-artifact@v4 + if: always() + with: + name: event + path: ${{ github.event_path }} + event-handler: permissions: issues: write @@ -143,12 +147,16 @@ jobs: - name: Process Action Event run: | - cat > payload.json << 'EOF' - ${{ toJson(github.event) }} - EOF - github-event-processor ${{ github.event_name }} payload.json + github-event-processor ${{ github.event_name }} ${{ github.event_path }} shell: bash env: # This is a temporary secret generated by github # https://docs.github.com/en/actions/security-guides/automatic-token-authentication#about-the-github_token-secret GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Archive github event data + uses: actions/upload-artifact@v4 + if: always() + with: + name: event + path: ${{ github.event_path }} diff --git a/.github/workflows/scheduled-event-processor.yml b/.github/workflows/scheduled-event-processor.yml index 4b5f11322111..d3a01442bef8 100644 --- a/.github/workflows/scheduled-event-processor.yml +++ b/.github/workflows/scheduled-event-processor.yml @@ -69,10 +69,7 @@ jobs: - name: Close Stale Issues Scheduled Event if: github.event.schedule == '0 1 * * *' run: | - cat > payload.json << 'EOF' - ${{ toJson(github.event) }} - EOF - github-event-processor ${{ github.event_name }} payload.json CloseStaleIssues + github-event-processor ${{ github.event_name }} ${{ github.event_path }} CloseStaleIssues shell: bash env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -80,10 +77,7 @@ jobs: - name: Identify Stale PullRequests Scheduled Event if: github.event.schedule == '0 5 * * FRI' run: | - cat > payload.json << 'EOF' - ${{ toJson(github.event) }} - EOF - github-event-processor ${{ github.event_name }} payload.json IdentifyStalePullRequests + github-event-processor ${{ github.event_name }} ${{ github.event_path }} IdentifyStalePullRequests shell: bash env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -91,10 +85,7 @@ jobs: - name: Close Stale PullRequests Scheduled Event if: github.event.schedule == '30 2,8,14,20 * * *' run: | - cat > payload.json << 'EOF' - ${{ toJson(github.event) }} - EOF - github-event-processor ${{ github.event_name }} payload.json CloseStalePullRequests + github-event-processor ${{ github.event_name }} ${{ github.event_path }} CloseStalePullRequests shell: bash env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -102,10 +93,7 @@ jobs: - name: Identify Stale Issues Scheduled Event if: github.event.schedule == '30 3,9,15,21 * * *' run: | - cat > payload.json << 'EOF' - ${{ toJson(github.event) }} - EOF - github-event-processor ${{ github.event_name }} payload.json IdentifyStaleIssues + github-event-processor ${{ github.event_name }} ${{ github.event_path }} IdentifyStaleIssues shell: bash env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -113,10 +101,7 @@ jobs: - name: Close Addressed Issues Scheduled Event if: github.event.schedule == '30 4,10,16,22 * * *' run: | - cat > payload.json << 'EOF' - ${{ toJson(github.event) }} - EOF - github-event-processor ${{ github.event_name }} payload.json CloseAddressedIssues + github-event-processor ${{ github.event_name }} ${{ github.event_path }} CloseAddressedIssues shell: bash env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -124,10 +109,7 @@ jobs: - name: Lock Closed Issues Scheduled Event if: github.event.schedule == '30 5,11,17,23 * * *' run: | - cat > payload.json << 'EOF' - ${{ toJson(github.event) }} - EOF - github-event-processor ${{ github.event_name }} payload.json LockClosedIssues + github-event-processor ${{ github.event_name }} ${{ github.event_path }} LockClosedIssues shell: bash env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -135,10 +117,14 @@ jobs: - name: Enforce Max Life of Issues Scheduled Event if: github.event.schedule == '0 18 * * 1,3,5' run: | - cat > payload.json << 'EOF' - ${{ toJson(github.event) }} - EOF - github-event-processor ${{ github.event_name }} payload.json EnforceMaxLifeOfIssues + github-event-processor ${{ github.event_name }} ${{ github.event_path }} EnforceMaxLifeOfIssues shell: bash env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Archive github event data + uses: actions/upload-artifact@v4 + if: always() + with: + name: event + path: ${{ github.event_path }} diff --git a/.vscode/cspell.json b/.vscode/cspell.json index 05e4251aba33..7bedaf27bcc2 100644 --- a/.vscode/cspell.json +++ b/.vscode/cspell.json @@ -141,6 +141,7 @@ "referer", "renormalize", "retriable", + "Servfail", "setsas", "signalr", "signup", @@ -182,6 +183,12 @@ "warnaserror" ] }, + { + "filename": "**/sdk/ai/**/*.cs", + "words": [ + "Ubinary" + ] + }, { "filename": "**/sdk/analysisservices/**/*.cs", "words": [ @@ -239,7 +246,8 @@ "nsxt", "vcenter", "vcsa", - "vmotion" + "vmotion", + "Iscsi" ] }, { @@ -253,6 +261,12 @@ "Drtm", "Hvci" ] + }, + { + "filename": "**/sdk/computefleet/**/*.cs", + "words": [ + "Rdma" + ] }, { "filename": "**/sdk/batch/**/*.cs", diff --git a/eng/Directory.Build.Common.props b/eng/Directory.Build.Common.props index 151620649c40..4e676a2414de 100644 --- a/eng/Directory.Build.Common.props +++ b/eng/Directory.Build.Common.props @@ -80,10 +80,12 @@ true - NU1901;NU1902;NU1903;NU1904 + $(WarningsNotAsErrors);NU1901;NU1902;NU1903 + $(WarningsNotAsErrors);NU1904 true true symbols.nupkg diff --git a/eng/Packages.Data.props b/eng/Packages.Data.props index 6f6083dd194a..2898d8ec5886 100644 --- a/eng/Packages.Data.props +++ b/eng/Packages.Data.props @@ -86,7 +86,7 @@ - + @@ -98,7 +98,7 @@ - + @@ -107,7 +107,7 @@ - + @@ -115,10 +115,10 @@ - + - + @@ -141,7 +141,7 @@ - + @@ -153,9 +153,9 @@ - - - + + + @@ -178,6 +178,11 @@ + + + + + - + @@ -238,7 +243,7 @@ - + diff --git a/eng/packages/http-client-csharp/generator/Azure.Generator/src/AzureClientPlugin.cs b/eng/packages/http-client-csharp/generator/Azure.Generator/src/AzureClientPlugin.cs index 84bc3ac98d7e..e1041af28cf0 100644 --- a/eng/packages/http-client-csharp/generator/Azure.Generator/src/AzureClientPlugin.cs +++ b/eng/packages/http-client-csharp/generator/Azure.Generator/src/AzureClientPlugin.cs @@ -1,9 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. +using Microsoft.CodeAnalysis; using Microsoft.Generator.CSharp; using Microsoft.Generator.CSharp.ClientModel; using System; +using System.ClientModel; +using System.Collections.Generic; using System.ComponentModel.Composition; namespace Azure.Generator; @@ -37,6 +40,8 @@ public AzureClientPlugin(GeneratorContext context) : base(context) /// public override void Configure() { + base.Configure(); + AddMetadataReference(MetadataReference.CreateFromFile(typeof(Response).Assembly.Location)); } /// diff --git a/eng/packages/http-client-csharp/generator/Azure.Generator/src/AzureTypeFactory.cs b/eng/packages/http-client-csharp/generator/Azure.Generator/src/AzureTypeFactory.cs index 662f9bea97ae..eccaceae0eb3 100644 --- a/eng/packages/http-client-csharp/generator/Azure.Generator/src/AzureTypeFactory.cs +++ b/eng/packages/http-client-csharp/generator/Azure.Generator/src/AzureTypeFactory.cs @@ -1,8 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. +using Azure.Core; using Azure.Generator.Primitives; +using Azure.Generator.Providers; +using Azure.Generator.Providers.Abstraction; using Microsoft.Generator.CSharp.ClientModel; +using Microsoft.Generator.CSharp.ClientModel.Providers; using Microsoft.Generator.CSharp.Input; using Microsoft.Generator.CSharp.Primitives; @@ -11,6 +15,33 @@ namespace Azure.Generator /// public class AzureTypeFactory : ScmTypeFactory { + /// + public override CSharpType ClientUriBuilderBaseType => typeof(RequestUriBuilder); + + /// + public override IClientResponseApi ClientResponseApi => AzureClientResponseProvider.Instance; + + /// + public override IHttpResponseApi HttpResponseApi => AzureResponseProvider.Instance; + + /// + public override IClientPipelineApi ClientPipelineApi => HttpPipelineProvider.Instance; + + /// + public override IHttpMessageApi HttpMessageApi => HttpMessageProvider.Instance; + + /// + public override IExpressionApi HttpRequestApi => HttpRequestProvider.Instance; + + /// + public override IStatusCodeClassifierApi StatusCodeClassifierApi => StatusCodeClassifierProvider.Instance; + + /// + public override IRequestContentApi RequestContentApi => RequestContentProvider.Instance; + + /// + public override IHttpRequestOptionsApi HttpRequestOptionsApi => HttpRequestOptionsProvider.Instance; + /// protected override CSharpType? CreateCSharpTypeCore(InputType inputType) { diff --git a/eng/packages/http-client-csharp/generator/Azure.Generator/src/Providers/Abstraction/AzureClientResponseProvider.cs b/eng/packages/http-client-csharp/generator/Azure.Generator/src/Providers/Abstraction/AzureClientResponseProvider.cs new file mode 100644 index 000000000000..a47851a04548 --- /dev/null +++ b/eng/packages/http-client-csharp/generator/Azure.Generator/src/Providers/Abstraction/AzureClientResponseProvider.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Microsoft.Generator.CSharp.ClientModel.Providers; +using Microsoft.Generator.CSharp.Expressions; +using Microsoft.Generator.CSharp.Primitives; +using Microsoft.Generator.CSharp.Snippets; +using static Microsoft.Generator.CSharp.Snippets.Snippet; + +namespace Azure.Generator.Providers +{ + internal record AzureClientResponseProvider : ClientResponseApi + { + private static ClientResponseApi? _instance; + internal static ClientResponseApi Instance => _instance ??= new AzureClientResponseProvider(Empty); + + public AzureClientResponseProvider(ValueExpression original) : base(typeof(Response), original) + { + } + + public override CSharpType ClientResponseType => typeof(Response); + + public override CSharpType ClientResponseOfTType => typeof(Response<>); + + public override CSharpType ClientResponseExceptionType => typeof(RequestFailedException); + + public override ValueExpression CreateAsync(HttpResponseApi response) + => New.Instance(ClientResponseExceptionType, [response]); + + public override ClientResponseApi FromExpression(ValueExpression original) + => new AzureClientResponseProvider(original); + + public override ValueExpression FromResponse(ValueExpression valueExpression) => valueExpression; + + public override ValueExpression FromValue(ValueExpression valueExpression, HttpResponseApi response) + => Static(ClientResponseType).Invoke(nameof(FromValue), [valueExpression, response]); + + public override ValueExpression FromValue(ValueExpression valueExpression, HttpResponseApi response) + => Static(ClientResponseType).Invoke(nameof(FromValue), [valueExpression, response], [typeof(ValueType)], false); + + public override HttpResponseApi GetRawResponse() + => new AzureResponseProvider(GetRawResponseExpression()); + + public override ClientResponseApi ToExpression() => this; + + private ScopedApi GetRawResponseExpression() => Original.As(); + } +} diff --git a/eng/packages/http-client-csharp/generator/Azure.Generator/src/Providers/Abstraction/AzureResponseProvider.cs b/eng/packages/http-client-csharp/generator/Azure.Generator/src/Providers/Abstraction/AzureResponseProvider.cs new file mode 100644 index 000000000000..11517a6a7f2e --- /dev/null +++ b/eng/packages/http-client-csharp/generator/Azure.Generator/src/Providers/Abstraction/AzureResponseProvider.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Microsoft.Generator.CSharp.ClientModel.Providers; +using Microsoft.Generator.CSharp.Expressions; +using Microsoft.Generator.CSharp.Primitives; +using Microsoft.Generator.CSharp.Snippets; +using System; +using System.IO; + +namespace Azure.Generator.Providers +{ + internal record AzureResponseProvider : HttpResponseApi + { + private static HttpResponseApi? _instance; + internal static HttpResponseApi Instance => _instance ??= new AzureResponseProvider(Empty); + + public AzureResponseProvider(ValueExpression original) : base(typeof(Response), original) + { + } + + public override CSharpType HttpResponseType => typeof(Response); + + public override ScopedApi Content() + => Original.Property(nameof(Response.Content)).As(); + + public override ScopedApi ContentStream() + => Original.Property(nameof(Response.ContentStream)).As(); + + public override HttpResponseApi FromExpression(ValueExpression original) + => new AzureResponseProvider(original); + + public override ScopedApi IsError() + => Original.Property(nameof(Response.IsError)).As(); + + public override HttpResponseApi ToExpression() => this; + } +} diff --git a/eng/packages/http-client-csharp/generator/Azure.Generator/src/Providers/Abstraction/HttpMessageProvider.cs b/eng/packages/http-client-csharp/generator/Azure.Generator/src/Providers/Abstraction/HttpMessageProvider.cs new file mode 100644 index 000000000000..43391c5ca039 --- /dev/null +++ b/eng/packages/http-client-csharp/generator/Azure.Generator/src/Providers/Abstraction/HttpMessageProvider.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Core; +using Microsoft.Generator.CSharp.ClientModel.Providers; +using Microsoft.Generator.CSharp.Expressions; +using Microsoft.Generator.CSharp.Primitives; +using Microsoft.Generator.CSharp.Statements; +using static Microsoft.Generator.CSharp.Snippets.Snippet; + +namespace Azure.Generator.Providers +{ + internal record HttpMessageProvider : HttpMessageApi + { + private static HttpMessageApi? _instance; + internal static HttpMessageApi Instance => _instance ??= new HttpMessageProvider(Empty); + + public HttpMessageProvider(ValueExpression original) : base(typeof(HttpMessage), original) + { + } + + public override CSharpType HttpMessageType => typeof(HttpMessage); + + public override MethodBodyStatement Apply(ValueExpression options) + => MethodBodyStatement.Empty; + + public override ValueExpression BufferResponse() + => Original.Property(nameof(HttpMessage.BufferResponse)); + + public override MethodBodyStatement[] ExtractResponse() + => [Original.Invoke(nameof(HttpMessage.ExtractResponseContent)).Terminate(), Return(Original.Property(nameof(HttpMessage.Response)))]; + + public override HttpMessageApi FromExpression(ValueExpression original) + => new HttpMessageProvider(original); + + public override HttpRequestApi Request() + => new HttpRequestProvider(Original.Property(nameof(HttpMessage.Request))); + + public override HttpResponseApi Response() + => new AzureResponseProvider(Original.Property(nameof(HttpMessage.Response))); + + public override ValueExpression ResponseClassifier() + => Original.Property(nameof(HttpMessage.ResponseClassifier)); + + public override HttpMessageApi ToExpression() => this; + } +} diff --git a/eng/packages/http-client-csharp/generator/Azure.Generator/src/Providers/Abstraction/HttpPipelineProvider.cs b/eng/packages/http-client-csharp/generator/Azure.Generator/src/Providers/Abstraction/HttpPipelineProvider.cs new file mode 100644 index 000000000000..5a1c2e40553c --- /dev/null +++ b/eng/packages/http-client-csharp/generator/Azure.Generator/src/Providers/Abstraction/HttpPipelineProvider.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Core; +using Azure.Core.Pipeline; +using Microsoft.Generator.CSharp.ClientModel.Providers; +using Microsoft.Generator.CSharp.Expressions; +using Microsoft.Generator.CSharp.Primitives; +using static Microsoft.Generator.CSharp.Snippets.Snippet; + +namespace Azure.Generator.Providers.Abstraction +{ + internal record HttpPipelineProvider : ClientPipelineApi + { + private static ClientPipelineApi? _instance; + internal static ClientPipelineApi Instance => _instance ??= new HttpPipelineProvider(Empty); + + public HttpPipelineProvider(ValueExpression original) : base(typeof(HttpPipeline), original) + { + } + + public override CSharpType ClientPipelineType => typeof(HttpPipeline); + + public override CSharpType ClientPipelineOptionsType => typeof(ClientOptions); + + public override CSharpType PipelinePolicyType => typeof(HttpPipelinePolicy); + + public override ValueExpression Create(ValueExpression options, ValueExpression perRetryPolicies) + => Static(typeof(HttpPipelineBuilder)).Invoke(nameof(HttpPipelineBuilder.Build), [options, perRetryPolicies]); + + public override HttpMessageApi CreateMessage() + => new HttpMessageProvider(Original.Invoke(nameof(HttpPipeline.CreateMessage))); + + public override ValueExpression CreateMessage(HttpRequestOptionsApi requestOptions, ValueExpression responseClassifier) + => Original.Invoke(nameof(HttpPipeline.CreateMessage), requestOptions, responseClassifier).As(); + + public override ClientPipelineApi FromExpression(ValueExpression expression) + => new HttpPipelineProvider(expression); + + public override ValueExpression PerRetryPolicy(params ValueExpression[] arguments) + => Empty; // TODO: implement with default retry policy for Azure + + public override InvokeMethodExpression Send(HttpMessageApi message) + => Original.Invoke(nameof(HttpPipeline.Send), [message, Default]); + + public override InvokeMethodExpression SendAsync(HttpMessageApi message) + => Original.Invoke(nameof(HttpPipeline.SendAsync), [message, Default], true); + + public override ClientPipelineApi ToExpression() => this; + } +} diff --git a/eng/packages/http-client-csharp/generator/Azure.Generator/src/Providers/Abstraction/HttpRequestOptionsProvider.cs b/eng/packages/http-client-csharp/generator/Azure.Generator/src/Providers/Abstraction/HttpRequestOptionsProvider.cs new file mode 100644 index 000000000000..5a1240531892 --- /dev/null +++ b/eng/packages/http-client-csharp/generator/Azure.Generator/src/Providers/Abstraction/HttpRequestOptionsProvider.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Microsoft.Generator.CSharp.ClientModel.Providers; +using Microsoft.Generator.CSharp.Expressions; +using Microsoft.Generator.CSharp.Primitives; +using static Microsoft.Generator.CSharp.Snippets.Snippet; + +namespace Azure.Generator.Providers.Abstraction +{ + internal record HttpRequestOptionsProvider : HttpRequestOptionsApi + { + private static HttpRequestOptionsApi? _instance; + internal static HttpRequestOptionsApi Instance => _instance ??= new HttpRequestOptionsProvider(Empty); + + public HttpRequestOptionsProvider(ValueExpression original) : base(typeof(RequestContext), original) + { + } + + public override CSharpType HttpRequestOptionsType => typeof(RequestContext); + + public override string ParameterName => "context"; + + public override ValueExpression ErrorOptions() + => Original.NullConditional().Property(nameof(RequestContext.ErrorOptions)); + + public override HttpRequestOptionsApi FromExpression(ValueExpression original) + => new HttpRequestOptionsProvider(original); + + public override ValueExpression NoThrow() + => FrameworkEnumValue(Azure.ErrorOptions.NoThrow); + + public override HttpRequestOptionsApi ToExpression() => this; + } +} diff --git a/eng/packages/http-client-csharp/generator/Azure.Generator/src/Providers/Abstraction/HttpRequestProvider.cs b/eng/packages/http-client-csharp/generator/Azure.Generator/src/Providers/Abstraction/HttpRequestProvider.cs new file mode 100644 index 000000000000..060ae8050a73 --- /dev/null +++ b/eng/packages/http-client-csharp/generator/Azure.Generator/src/Providers/Abstraction/HttpRequestProvider.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Core; +using Microsoft.Generator.CSharp.ClientModel.Providers; +using Microsoft.Generator.CSharp.Expressions; +using Microsoft.Generator.CSharp.Snippets; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using static Microsoft.Generator.CSharp.Snippets.Snippet; + +namespace Azure.Generator.Providers +{ + internal record HttpRequestProvider : HttpRequestApi + { + private static HttpRequestApi? _instance; + internal static HttpRequestApi Instance => _instance ??= new HttpRequestProvider(Empty); + + public HttpRequestProvider(ValueExpression original) : base(typeof(Request), original) + { + } + + public override ValueExpression Content() + => Original.Property(nameof(Request.Content)); + + public override HttpRequestApi FromExpression(ValueExpression original) + => new HttpRequestProvider(original); + + public override InvokeMethodExpression SetHeaders(IReadOnlyList arguments) + => Original.Property(nameof(PipelineRequest.Headers)).Invoke(nameof(RequestHeaders.Add), arguments); + + public override AssignmentExpression SetMethod(string httpMethod) + => Original.Property(nameof(PipelineRequest.Method)).Assign(New.Instance(typeof(RequestMethod), [Literal(httpMethod)])); + + public override AssignmentExpression SetUri(ValueExpression value) + => Original.Property("Uri").Assign(value); + + public override HttpRequestApi ToExpression() => this; + } +} diff --git a/eng/packages/http-client-csharp/generator/Azure.Generator/src/Providers/Abstraction/RequestContentProvider.cs b/eng/packages/http-client-csharp/generator/Azure.Generator/src/Providers/Abstraction/RequestContentProvider.cs new file mode 100644 index 000000000000..8fbd2922aeda --- /dev/null +++ b/eng/packages/http-client-csharp/generator/Azure.Generator/src/Providers/Abstraction/RequestContentProvider.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Core; +using Microsoft.Generator.CSharp.ClientModel.Providers; +using Microsoft.Generator.CSharp.Expressions; +using Microsoft.Generator.CSharp.Primitives; +using Microsoft.Generator.CSharp.Snippets; +using Microsoft.Generator.CSharp.Statements; +using System.ClientModel.Primitives; +using static Microsoft.Generator.CSharp.Snippets.Snippet; + +namespace Azure.Generator.Providers +{ + internal record RequestContentProvider : RequestContentApi + { + private static RequestContentApi? _instance; + internal static RequestContentApi Instance => _instance ??= new RequestContentProvider(Empty); + + public RequestContentProvider(ValueExpression original) : base(typeof(RequestContent), original) + { + } + + public override CSharpType RequestContentType => typeof(RequestContent); + + public override RequestContentApi FromExpression(ValueExpression original) + => new RequestContentProvider(original); + + public override RequestContentApi ToExpression() => this; + + public override MethodBodyStatement[] Create(ValueExpression argument) + => [ + Declare("content", New.Instance(), out ScopedApi content), + content.Property("JsonWriter").Invoke("WriteObjectValue", [argument, Static().Property("WireOptions").As()]).Terminate(), + Return(content) + ]; + } +} diff --git a/eng/packages/http-client-csharp/generator/Azure.Generator/src/Providers/Abstraction/StatusCodeClassifierProvider.cs b/eng/packages/http-client-csharp/generator/Azure.Generator/src/Providers/Abstraction/StatusCodeClassifierProvider.cs new file mode 100644 index 000000000000..090faa94c332 --- /dev/null +++ b/eng/packages/http-client-csharp/generator/Azure.Generator/src/Providers/Abstraction/StatusCodeClassifierProvider.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Core; +using Microsoft.Generator.CSharp.ClientModel.Providers; +using Microsoft.Generator.CSharp.Expressions; +using Microsoft.Generator.CSharp.Primitives; +using static Microsoft.Generator.CSharp.Snippets.Snippet; + +namespace Azure.Generator.Providers.Abstraction +{ + internal record StatusCodeClassifierProvider : StatusCodeClassifierApi + { + private static StatusCodeClassifierApi? _instance; + internal static StatusCodeClassifierApi Instance => _instance ??= new StatusCodeClassifierProvider(Empty); + + public StatusCodeClassifierProvider(ValueExpression original) : base(typeof(StatusCodeClassifier), original) + { + } + + public override CSharpType ResponseClassifierType => typeof(ResponseClassifier); + + public override ValueExpression Create(int code) + => New.Instance(typeof(StatusCodeClassifier), [New.Array(typeof(ushort), true, true, [Literal(code)])]); + + public override StatusCodeClassifierApi FromExpression(ValueExpression original) + => new StatusCodeClassifierProvider(original); + + public override StatusCodeClassifierApi ToExpression() => this; + } +} diff --git a/eng/packages/http-client-csharp/generator/Azure.Generator/test/Azure.Generator.Tests.csproj b/eng/packages/http-client-csharp/generator/Azure.Generator/test/Azure.Generator.Tests.csproj index 3ec6d60daa49..c837d9c3531e 100644 --- a/eng/packages/http-client-csharp/generator/Azure.Generator/test/Azure.Generator.Tests.csproj +++ b/eng/packages/http-client-csharp/generator/Azure.Generator/test/Azure.Generator.Tests.csproj @@ -18,5 +18,15 @@ PreserveNewest + + + + + + + + PreserveNewest + + diff --git a/eng/packages/http-client-csharp/generator/Azure.Generator/test/Common/Helpers.cs b/eng/packages/http-client-csharp/generator/Azure.Generator/test/Common/Helpers.cs new file mode 100644 index 000000000000..4bbe181fc721 --- /dev/null +++ b/eng/packages/http-client-csharp/generator/Azure.Generator/test/Common/Helpers.cs @@ -0,0 +1,60 @@ +using System; +using System.Diagnostics; +using System.IO; +using System.Linq; +using System.Runtime.CompilerServices; + +namespace Azure.Generator.Tests.Common +{ + internal static class Helpers + { + private static readonly string _assemblyLocation = Path.GetDirectoryName(typeof(Helpers).Assembly.Location)!; + + public static string GetExpectedFromFile(string? parameters = null) + { + return File.ReadAllText(GetAssetFileOrDirectoryPath(true, parameters)).Replace("\r\n", "\n"); + } + + private static string GetAssetFileOrDirectoryPath(bool isFile, string? parameters = null) + { + var stackTrace = new StackTrace(); + var stackFrame = GetRealMethodInvocation(stackTrace); + var method = stackFrame.GetMethod(); + var callingClass = method!.DeclaringType; + var nsSplit = callingClass!.Namespace!.Split('.'); + var paramString = parameters is null ? string.Empty : $"({parameters})"; + var extName = isFile ? ".cs" : string.Empty; + var path = _assemblyLocation; + var nsSkip = 3; + for (int i = nsSkip; i < nsSplit.Length; i++) + { + path = Path.Combine(path, nsSplit[i]); + } + return Path.Combine(path, "TestData", callingClass.Name, $"{method.Name}{paramString}{extName}"); + } + + private static StackFrame GetRealMethodInvocation(StackTrace stackTrace) + { + int i = 1; + while (i < stackTrace.FrameCount) + { + var frame = stackTrace.GetFrame(i); + var declaringType = frame!.GetMethod()!.DeclaringType!; + // we need to skip those method invocations from this class, or from the async state machine when the caller is an async method + if (declaringType != typeof(Helpers) && declaringType.Name != "MockHelpers" && !IsCompilerGenerated(declaringType)) + { + return frame; + } + i++; + } + + throw new InvalidOperationException($"There is no method invocation outside the {typeof(Helpers)} class in the stack trace"); + + static bool IsCompilerGenerated(Type type) + { + return type.IsDefined(typeof(CompilerGeneratedAttribute), false) || (type.Namespace?.StartsWith("System.Runtime.CompilerServices") ?? false) || + type.Name.StartsWith("<<", StringComparison.Ordinal); + } + } + } +} diff --git a/eng/packages/http-client-csharp/generator/Azure.Generator/test/Common/InputFactory.cs b/eng/packages/http-client-csharp/generator/Azure.Generator/test/Common/InputFactory.cs index e9c2e711a24a..44618ea85937 100644 --- a/eng/packages/http-client-csharp/generator/Azure.Generator/test/Common/InputFactory.cs +++ b/eng/packages/http-client-csharp/generator/Azure.Generator/test/Common/InputFactory.cs @@ -150,8 +150,7 @@ public static InputModelProperty Property( type, isRequired, isReadOnly, - isDiscriminator, - null); + isDiscriminator); } public static InputModelType Model( diff --git a/eng/packages/http-client-csharp/generator/Azure.Generator/test/Providers/Abstractions/AzureClientResponseProviderTests.cs b/eng/packages/http-client-csharp/generator/Azure.Generator/test/Providers/Abstractions/AzureClientResponseProviderTests.cs new file mode 100644 index 000000000000..62b1c787fb31 --- /dev/null +++ b/eng/packages/http-client-csharp/generator/Azure.Generator/test/Providers/Abstractions/AzureClientResponseProviderTests.cs @@ -0,0 +1,49 @@ +using Azure.Generator.Tests.Common; +using Azure.Generator.Tests.TestHelpers; +using Microsoft.Generator.CSharp.ClientModel.Providers; +using Microsoft.Generator.CSharp.ClientModel; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using NUnit.Framework; +using System.ClientModel.Primitives; +using Azure.Generator.Providers; + +namespace Azure.Generator.Tests.Providers.Abstractions +{ + internal class AzureClientResponseProviderTests + { + [Test] + public void ValidateReturnTypeIsOverridden() + { + ClientProvider clientProvider = CreateMockClientProvider(); + + var method = clientProvider.Methods.FirstOrDefault(x => !x.Signature.Name.EndsWith("Async")); + Assert.NotNull(method); + Assert.NotNull(method!.Signature.ReturnType); + Assert.IsTrue(method!.Signature.ReturnType!.Equals(typeof(Response))); + } + + [Test] + public void ValidateBodyOfClientOperationIsOverridden() + { + var clientProvider = CreateMockClientProvider(); + + var method = clientProvider.Methods.FirstOrDefault(x => x.Signature.Parameters.Any(p => p.Type.Equals(typeof(RequestContext))) && !x.Signature.Name.EndsWith("Async")); + Assert.NotNull(method); + Assert.NotNull(method!.BodyStatements); + var test = method.BodyStatements!.ToDisplayString(); + Assert.AreEqual(Helpers.GetExpectedFromFile(), method.BodyStatements!.ToDisplayString()); + } + + private static ClientProvider CreateMockClientProvider() + { + var client = InputFactory.Client("TestClient", [InputFactory.Operation("foo")]); + MockHelpers.LoadMockPlugin(clientResponseApi: AzureClientResponseProvider.Instance); + var clientProvider = AzureClientPlugin.Instance.TypeFactory.CreateClient(client); + return clientProvider; + } + } +} diff --git a/eng/packages/http-client-csharp/generator/Azure.Generator/test/Providers/Abstractions/TestData/AzureClientResponseProviderTests/ValidateBodyOfClientOperationIsOverridden.cs b/eng/packages/http-client-csharp/generator/Azure.Generator/test/Providers/Abstractions/TestData/AzureClientResponseProviderTests/ValidateBodyOfClientOperationIsOverridden.cs new file mode 100644 index 000000000000..e8bf29510dab --- /dev/null +++ b/eng/packages/http-client-csharp/generator/Azure.Generator/test/Providers/Abstractions/TestData/AzureClientResponseProviderTests/ValidateBodyOfClientOperationIsOverridden.cs @@ -0,0 +1,2 @@ +using global::Azure.Core.HttpMessage message = this.CreateFooRequest(context); +return Pipeline.ProcessMessage(message, context); diff --git a/eng/packages/http-client-csharp/generator/Azure.Generator/test/TestHelpers/MockHelpers.cs b/eng/packages/http-client-csharp/generator/Azure.Generator/test/TestHelpers/MockHelpers.cs index dcce80fbaae4..1f2919f751f8 100644 --- a/eng/packages/http-client-csharp/generator/Azure.Generator/test/TestHelpers/MockHelpers.cs +++ b/eng/packages/http-client-csharp/generator/Azure.Generator/test/TestHelpers/MockHelpers.cs @@ -3,6 +3,7 @@ using Microsoft.Generator.CSharp; using Microsoft.Generator.CSharp.ClientModel; +using Microsoft.Generator.CSharp.ClientModel.Providers; using Microsoft.Generator.CSharp.Input; using Microsoft.Generator.CSharp.Primitives; using Microsoft.Generator.CSharp.Providers; @@ -28,7 +29,10 @@ public static Mock LoadMockPlugin( Func>? apiVersions = null, Func>? inputEnums = null, Func>? inputModels = null, - Func>? clients = null) + Func>? clients = null, + ClientResponseApi? clientResponseApi = null, + ClientPipelineApi? clientPipelineApi = null, + HttpMessageApi? httpMessageApi = null) { IReadOnlyList inputNsApiVersions = apiVersions?.Invoke() ?? []; IReadOnlyList inputNsEnums = inputEnums?.Invoke() ?? []; diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/BasicTypeSpec.csproj b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/BasicTypeSpec.csproj index 358ee2ac9011..075aca94076a 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/BasicTypeSpec.csproj +++ b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/BasicTypeSpec.csproj @@ -11,6 +11,7 @@ - + + diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/BasicTypeSpecClient.RestClient.cs b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/BasicTypeSpecClient.RestClient.cs index b8bf3fd176a3..8f3177cdbe6a 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/BasicTypeSpecClient.RestClient.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/BasicTypeSpecClient.RestClient.cs @@ -6,30 +6,30 @@ #nullable disable using System; -using System.ClientModel; -using System.ClientModel.Primitives; +using Azure; +using Azure.Core; namespace BasicTypeSpec { /// public partial class BasicTypeSpecClient { - private static PipelineMessageClassifier _pipelineMessageClassifier200; - private static PipelineMessageClassifier _pipelineMessageClassifier204; + private static ResponseClassifier _pipelineMessageClassifier200; + private static ResponseClassifier _pipelineMessageClassifier204; private static Classifier2xxAnd4xx _pipelineMessageClassifier2xxAnd4xx; - private static PipelineMessageClassifier PipelineMessageClassifier200 => _pipelineMessageClassifier200 = PipelineMessageClassifier.Create(stackalloc ushort[] { 200 }); + private static ResponseClassifier PipelineMessageClassifier200 => _pipelineMessageClassifier200 = new StatusCodeClassifier(stackalloc ushort[] { 200 }); - private static PipelineMessageClassifier PipelineMessageClassifier204 => _pipelineMessageClassifier204 = PipelineMessageClassifier.Create(stackalloc ushort[] { 204 }); + private static ResponseClassifier PipelineMessageClassifier204 => _pipelineMessageClassifier204 = new StatusCodeClassifier(stackalloc ushort[] { 204 }); private static Classifier2xxAnd4xx PipelineMessageClassifier2xxAnd4xx => _pipelineMessageClassifier2xxAnd4xx ??= new Classifier2xxAnd4xx(); - internal PipelineMessage CreateSayHiRequest(string headParameter, string queryParameter, string optionalQuery, RequestOptions options) + internal HttpMessage CreateSayHiRequest(string headParameter, string queryParameter, string optionalQuery, RequestContext context) { - PipelineMessage message = Pipeline.CreateMessage(); + HttpMessage message = Pipeline.CreateMessage(); message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "GET"; + Request request = message.Request; + request.Method = new RequestMethod("GET"); ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/hello", false); @@ -38,314 +38,275 @@ internal PipelineMessage CreateSayHiRequest(string headParameter, string queryPa { uri.AppendQuery("optionalQuery", optionalQuery, true); } - request.Uri = uri.ToUri(); - request.Headers.Set("head-parameter", headParameter); - request.Headers.Set("Accept", "application/json"); - message.Apply(options); + request.Uri = uri; + request.Headers.Add("head-parameter", headParameter); + request.Headers.Add("Accept", "application/json"); return message; } - internal PipelineMessage CreateHelloAgainRequest(string p2, string p1, BinaryContent content, RequestOptions options) + internal HttpMessage CreateHelloAgainRequest(string p2, string p1, RequestContent content, RequestContext context) { - PipelineMessage message = Pipeline.CreateMessage(); + HttpMessage message = Pipeline.CreateMessage(); message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "GET"; + Request request = message.Request; + request.Method = new RequestMethod("GET"); ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/againHi/", false); uri.AppendPath(p2, true); - request.Uri = uri.ToUri(); - request.Headers.Set("p1", p1); - request.Headers.Set("Content-Type", "text/plain"); - request.Headers.Set("Accept", "application/json"); + request.Uri = uri; + request.Headers.Add("p1", p1); + request.Headers.Add("Content-Type", "text/plain"); + request.Headers.Add("Accept", "application/json"); request.Content = content; - message.Apply(options); return message; } - internal PipelineMessage CreateNoContentTypeRequest(string p2, string p1, BinaryContent content, RequestOptions options) + internal HttpMessage CreateNoContentTypeRequest(string p2, string p1, RequestContent content, RequestContext context) { - PipelineMessage message = Pipeline.CreateMessage(); + HttpMessage message = Pipeline.CreateMessage(); message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "GET"; + Request request = message.Request; + request.Method = new RequestMethod("GET"); ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/noContentType/", false); uri.AppendPath(p2, true); - request.Uri = uri.ToUri(); - request.Headers.Set("p1", p1); - request.Headers.Set("Content-Type", "application/json"); - request.Headers.Set("Accept", "application/json"); + request.Uri = uri; + request.Headers.Add("p1", p1); + request.Headers.Add("Content-Type", "application/json"); + request.Headers.Add("Accept", "application/json"); request.Content = content; - message.Apply(options); return message; } - internal PipelineMessage CreateHelloDemo2Request(RequestOptions options) + internal HttpMessage CreateHelloDemo2Request(RequestContext context) { - PipelineMessage message = Pipeline.CreateMessage(); + HttpMessage message = Pipeline.CreateMessage(); message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "GET"; + Request request = message.Request; + request.Method = new RequestMethod("GET"); ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/demoHi", false); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - message.Apply(options); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); return message; } - internal PipelineMessage CreateCreateLiteralRequest(BinaryContent content, RequestOptions options) + internal HttpMessage CreateCreateLiteralRequest(RequestContent content, RequestContext context) { - PipelineMessage message = Pipeline.CreateMessage(); + HttpMessage message = Pipeline.CreateMessage(); message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "POST"; + Request request = message.Request; + request.Method = new RequestMethod("POST"); ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/literal", false); - request.Uri = uri.ToUri(); - request.Headers.Set("Content-Type", "application/json"); - request.Headers.Set("Accept", "application/json"); + request.Uri = uri; + request.Headers.Add("Content-Type", "application/json"); + request.Headers.Add("Accept", "application/json"); request.Content = content; - message.Apply(options); return message; } - internal PipelineMessage CreateHelloLiteralRequest(RequestOptions options) + internal HttpMessage CreateHelloLiteralRequest(RequestContext context) { - PipelineMessage message = Pipeline.CreateMessage(); + HttpMessage message = Pipeline.CreateMessage(); message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "GET"; + Request request = message.Request; + request.Method = new RequestMethod("GET"); ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/helloLiteral/", false); uri.AppendPath(123.ToString(), true); uri.AppendQuery("p3", TypeFormatters.ConvertToString(true, null), true); - request.Uri = uri.ToUri(); - request.Headers.Set("p1", "test"); - request.Headers.Set("Accept", "application/json"); - message.Apply(options); + request.Uri = uri; + request.Headers.Add("p1", "test"); + request.Headers.Add("Accept", "application/json"); return message; } - internal PipelineMessage CreateTopActionRequest(DateTimeOffset action, RequestOptions options) + internal HttpMessage CreateTopActionRequest(DateTimeOffset action, RequestContext context) { - PipelineMessage message = Pipeline.CreateMessage(); + HttpMessage message = Pipeline.CreateMessage(); message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "GET"; + Request request = message.Request; + request.Method = new RequestMethod("GET"); ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/top/", false); uri.AppendPath(action.ToString("O"), true); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - message.Apply(options); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); return message; } - internal PipelineMessage CreateTopAction2Request(RequestOptions options) + internal HttpMessage CreateTopAction2Request(RequestContext context) { - PipelineMessage message = Pipeline.CreateMessage(); + HttpMessage message = Pipeline.CreateMessage(); message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "GET"; + Request request = message.Request; + request.Method = new RequestMethod("GET"); ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/top2", false); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - message.Apply(options); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); return message; } - internal PipelineMessage CreatePatchActionRequest(BinaryContent content, RequestOptions options) + internal HttpMessage CreatePatchActionRequest(RequestContent content, RequestContext context) { - PipelineMessage message = Pipeline.CreateMessage(); + HttpMessage message = Pipeline.CreateMessage(); message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "PATCH"; + Request request = message.Request; + request.Method = new RequestMethod("PATCH"); ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/patch", false); - request.Uri = uri.ToUri(); - request.Headers.Set("Content-Type", "application/json"); - request.Headers.Set("Accept", "application/json"); + request.Uri = uri; + request.Headers.Add("Content-Type", "application/json"); + request.Headers.Add("Accept", "application/json"); request.Content = content; - message.Apply(options); return message; } - internal PipelineMessage CreateAnonymousBodyRequest(BinaryContent content, RequestOptions options) + internal HttpMessage CreateAnonymousBodyRequest(RequestContent content, RequestContext context) { - PipelineMessage message = Pipeline.CreateMessage(); + HttpMessage message = Pipeline.CreateMessage(); message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "POST"; + Request request = message.Request; + request.Method = new RequestMethod("POST"); ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/anonymousBody", false); - request.Uri = uri.ToUri(); - request.Headers.Set("Content-Type", "application/json"); - request.Headers.Set("Accept", "application/json"); + request.Uri = uri; + request.Headers.Add("Content-Type", "application/json"); + request.Headers.Add("Accept", "application/json"); request.Content = content; - message.Apply(options); return message; } - internal PipelineMessage CreateFriendlyModelRequest(BinaryContent content, RequestOptions options) + internal HttpMessage CreateFriendlyModelRequest(RequestContent content, RequestContext context) { - PipelineMessage message = Pipeline.CreateMessage(); + HttpMessage message = Pipeline.CreateMessage(); message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "POST"; + Request request = message.Request; + request.Method = new RequestMethod("POST"); ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/friendlyName", false); - request.Uri = uri.ToUri(); - request.Headers.Set("Content-Type", "application/json"); - request.Headers.Set("Accept", "application/json"); + request.Uri = uri; + request.Headers.Add("Content-Type", "application/json"); + request.Headers.Add("Accept", "application/json"); request.Content = content; - message.Apply(options); return message; } - internal PipelineMessage CreateAddTimeHeaderRequest(RequestOptions options) + internal HttpMessage CreateAddTimeHeaderRequest(RequestContext context) { - PipelineMessage message = Pipeline.CreateMessage(); + HttpMessage message = Pipeline.CreateMessage(); message.ResponseClassifier = PipelineMessageClassifier204; - PipelineRequest request = message.Request; - request.Method = "GET"; + Request request = message.Request; + request.Method = new RequestMethod("GET"); ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/", false); - request.Uri = uri.ToUri(); - request.Headers.Set("Repeatability-First-Sent", TypeFormatters.ConvertToString(DateTimeOffset.Now, "R")); - message.Apply(options); + request.Uri = uri; + request.Headers.Add("Repeatability-First-Sent", TypeFormatters.ConvertToString(DateTimeOffset.Now, "R")); return message; } - internal PipelineMessage CreateProjectedNameModelRequest(BinaryContent content, RequestOptions options) + internal HttpMessage CreateProjectedNameModelRequest(RequestContent content, RequestContext context) { - PipelineMessage message = Pipeline.CreateMessage(); + HttpMessage message = Pipeline.CreateMessage(); message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "POST"; + Request request = message.Request; + request.Method = new RequestMethod("POST"); ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/projectedName", false); - request.Uri = uri.ToUri(); - request.Headers.Set("Content-Type", "application/json"); - request.Headers.Set("Accept", "application/json"); + request.Uri = uri; + request.Headers.Add("Content-Type", "application/json"); + request.Headers.Add("Accept", "application/json"); request.Content = content; - message.Apply(options); return message; } - internal PipelineMessage CreateReturnsAnonymousModelRequest(RequestOptions options) + internal HttpMessage CreateReturnsAnonymousModelRequest(RequestContext context) { - PipelineMessage message = Pipeline.CreateMessage(); + HttpMessage message = Pipeline.CreateMessage(); message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "POST"; + Request request = message.Request; + request.Method = new RequestMethod("POST"); ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/returnsAnonymousModel", false); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", "application/json"); - message.Apply(options); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); return message; } - internal PipelineMessage CreateGetUnknownValueRequest(string accept, RequestOptions options) + internal HttpMessage CreateGetUnknownValueRequest(string accept, RequestContext context) { - PipelineMessage message = Pipeline.CreateMessage(); + HttpMessage message = Pipeline.CreateMessage(); message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "GET"; + Request request = message.Request; + request.Method = new RequestMethod("GET"); ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/unknown-value", false); - request.Uri = uri.ToUri(); - request.Headers.Set("Accept", accept); - message.Apply(options); + request.Uri = uri; + request.Headers.Add("Accept", accept); return message; } - internal PipelineMessage CreateInternalProtocolRequest(BinaryContent content, RequestOptions options) + internal HttpMessage CreateInternalProtocolRequest(RequestContent content, RequestContext context) { - PipelineMessage message = Pipeline.CreateMessage(); + HttpMessage message = Pipeline.CreateMessage(); message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "POST"; + Request request = message.Request; + request.Method = new RequestMethod("POST"); ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/internalProtocol", false); - request.Uri = uri.ToUri(); - request.Headers.Set("Content-Type", "application/json"); - request.Headers.Set("Accept", "application/json"); + request.Uri = uri; + request.Headers.Add("Content-Type", "application/json"); + request.Headers.Add("Accept", "application/json"); request.Content = content; - message.Apply(options); return message; } - internal PipelineMessage CreateStillConvenientRequest(RequestOptions options) + internal HttpMessage CreateStillConvenientRequest(RequestContext context) { - PipelineMessage message = Pipeline.CreateMessage(); + HttpMessage message = Pipeline.CreateMessage(); message.ResponseClassifier = PipelineMessageClassifier204; - PipelineRequest request = message.Request; - request.Method = "GET"; + Request request = message.Request; + request.Method = new RequestMethod("GET"); ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/stillConvenient", false); - request.Uri = uri.ToUri(); - message.Apply(options); + request.Uri = uri; return message; } - internal PipelineMessage CreateHeadAsBooleanRequest(string id, RequestOptions options) + internal HttpMessage CreateHeadAsBooleanRequest(string id, RequestContext context) { - PipelineMessage message = Pipeline.CreateMessage(); + HttpMessage message = Pipeline.CreateMessage(); message.ResponseClassifier = PipelineMessageClassifier2xxAnd4xx; - PipelineRequest request = message.Request; - request.Method = "HEAD"; + Request request = message.Request; + request.Method = new RequestMethod("HEAD"); ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/headAsBoolean/", false); uri.AppendPath(id, true); - request.Uri = uri.ToUri(); - message.Apply(options); + request.Uri = uri; return message; } - private class Classifier2xxAnd4xx : PipelineMessageClassifier + private class Classifier2xxAnd4xx : ResponseClassifier { - public override bool TryClassify(PipelineMessage message, out bool isError) - { - isError = false; - if (message.Response == null) - { - return false; - } - isError = message.Response.Status switch - { - >= 200 and < 300 => false, - >= 400 and < 500 => false, - _ => true - }; - return true; - } - - public override bool TryClassify(PipelineMessage message, Exception exception, out bool isRetryable) - { - isRetryable = false; - return false; - } } } } diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/BasicTypeSpecClient.cs b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/BasicTypeSpecClient.cs index c05199299e5d..20b2d3635f26 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/BasicTypeSpecClient.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/BasicTypeSpecClient.cs @@ -7,10 +7,12 @@ using System; using System.ClientModel; -using System.ClientModel.Primitives; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; using BasicTypeSpec.Models; namespace BasicTypeSpec @@ -50,11 +52,11 @@ public BasicTypeSpecClient(Uri endpoint, ApiKeyCredential keyCredential, BasicTy _endpoint = endpoint; _keyCredential = keyCredential; - Pipeline = ClientPipeline.Create(options, Array.Empty(), new PipelinePolicy[] { ApiKeyAuthenticationPolicy.CreateHeaderApiKeyPolicy(_keyCredential, AuthorizationHeader) }, Array.Empty()); + Pipeline = HttpPipelineBuilder.Build(options, new HttpPipelinePolicy[] { }); } /// The HTTP pipeline for sending and receiving REST requests and responses. - public ClientPipeline Pipeline { get; } + public HttpPipeline Pipeline { get; } /// /// [Protocol Method] Return hi @@ -67,17 +69,17 @@ public BasicTypeSpecClient(Uri endpoint, ApiKeyCredential keyCredential, BasicTy /// /// /// - /// The request options, which can override default behaviors of the client pipeline on a per-call basis. + /// The request options, which can override default behaviors of the client pipeline on a per-call basis. /// or is null. - /// Service returned a non-success status code. + /// Service returned a non-success status code. /// The response returned from the service. - public virtual ClientResult SayHi(string headParameter, string queryParameter, string optionalQuery, RequestOptions options) + public virtual Response SayHi(string headParameter, string queryParameter, string optionalQuery, RequestContext context) { Argument.AssertNotNull(headParameter, nameof(headParameter)); Argument.AssertNotNull(queryParameter, nameof(queryParameter)); - using PipelineMessage message = CreateSayHiRequest(headParameter, queryParameter, optionalQuery, options); - return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); + using HttpMessage message = CreateSayHiRequest(headParameter, queryParameter, optionalQuery, context); + return Pipeline.ProcessMessage(message, context); } /// @@ -91,17 +93,17 @@ public virtual ClientResult SayHi(string headParameter, string queryParameter, s /// /// /// - /// The request options, which can override default behaviors of the client pipeline on a per-call basis. + /// The request options, which can override default behaviors of the client pipeline on a per-call basis. /// or is null. - /// Service returned a non-success status code. + /// Service returned a non-success status code. /// The response returned from the service. - public virtual async Task SayHiAsync(string headParameter, string queryParameter, string optionalQuery, RequestOptions options) + public virtual async Task SayHiAsync(string headParameter, string queryParameter, string optionalQuery, RequestContext context) { Argument.AssertNotNull(headParameter, nameof(headParameter)); Argument.AssertNotNull(queryParameter, nameof(queryParameter)); - using PipelineMessage message = CreateSayHiRequest(headParameter, queryParameter, optionalQuery, options); - return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + using HttpMessage message = CreateSayHiRequest(headParameter, queryParameter, optionalQuery, context); + return await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); } /// Return hi. @@ -109,14 +111,14 @@ public virtual async Task SayHiAsync(string headParameter, string /// /// /// or is null. - /// Service returned a non-success status code. - public virtual ClientResult SayHi(string headParameter, string queryParameter, string optionalQuery) + /// Service returned a non-success status code. + public virtual Response SayHi(string headParameter, string queryParameter, string optionalQuery) { Argument.AssertNotNull(headParameter, nameof(headParameter)); Argument.AssertNotNull(queryParameter, nameof(queryParameter)); - ClientResult result = SayHi(headParameter, queryParameter, optionalQuery, null); - return ClientResult.FromValue((Thing)result, result.GetRawResponse()); + Response result = SayHi(headParameter, queryParameter, optionalQuery, null); + return Response.FromValue((Thing)result, result); } /// Return hi. @@ -124,14 +126,14 @@ public virtual ClientResult SayHi(string headParameter, string queryParam /// /// /// or is null. - /// Service returned a non-success status code. - public virtual async Task> SayHiAsync(string headParameter, string queryParameter, string optionalQuery) + /// Service returned a non-success status code. + public virtual async Task> SayHiAsync(string headParameter, string queryParameter, string optionalQuery) { Argument.AssertNotNull(headParameter, nameof(headParameter)); Argument.AssertNotNull(queryParameter, nameof(queryParameter)); - ClientResult result = await SayHiAsync(headParameter, queryParameter, optionalQuery, null).ConfigureAwait(false); - return ClientResult.FromValue((Thing)result, result.GetRawResponse()); + Response result = await SayHiAsync(headParameter, queryParameter, optionalQuery, null).ConfigureAwait(false); + return Response.FromValue((Thing)result, result); } /// @@ -145,18 +147,18 @@ public virtual async Task> SayHiAsync(string headParameter, /// /// /// The content to send as the body of the request. - /// The request options, which can override default behaviors of the client pipeline on a per-call basis. + /// The request options, which can override default behaviors of the client pipeline on a per-call basis. /// , or is null. - /// Service returned a non-success status code. + /// Service returned a non-success status code. /// The response returned from the service. - public virtual ClientResult HelloAgain(string p2, string p1, BinaryContent content, RequestOptions options) + public virtual Response HelloAgain(string p2, string p1, RequestContent content, RequestContext context) { Argument.AssertNotNull(p2, nameof(p2)); Argument.AssertNotNull(p1, nameof(p1)); Argument.AssertNotNull(content, nameof(content)); - using PipelineMessage message = CreateHelloAgainRequest(p2, p1, content, options); - return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); + using HttpMessage message = CreateHelloAgainRequest(p2, p1, content, context); + return Pipeline.ProcessMessage(message, context); } /// @@ -170,18 +172,18 @@ public virtual ClientResult HelloAgain(string p2, string p1, BinaryContent conte /// /// /// The content to send as the body of the request. - /// The request options, which can override default behaviors of the client pipeline on a per-call basis. + /// The request options, which can override default behaviors of the client pipeline on a per-call basis. /// , or is null. - /// Service returned a non-success status code. + /// Service returned a non-success status code. /// The response returned from the service. - public virtual async Task HelloAgainAsync(string p2, string p1, BinaryContent content, RequestOptions options) + public virtual async Task HelloAgainAsync(string p2, string p1, RequestContent content, RequestContext context) { Argument.AssertNotNull(p2, nameof(p2)); Argument.AssertNotNull(p1, nameof(p1)); Argument.AssertNotNull(content, nameof(content)); - using PipelineMessage message = CreateHelloAgainRequest(p2, p1, content, options); - return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + using HttpMessage message = CreateHelloAgainRequest(p2, p1, content, context); + return await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); } /// Return hi again. @@ -189,15 +191,15 @@ public virtual async Task HelloAgainAsync(string p2, string p1, Bi /// /// /// , or is null. - /// Service returned a non-success status code. - public virtual ClientResult HelloAgain(string p2, string p1, RoundTripModel action) + /// Service returned a non-success status code. + public virtual Response HelloAgain(string p2, string p1, RoundTripModel action) { Argument.AssertNotNull(p2, nameof(p2)); Argument.AssertNotNull(p1, nameof(p1)); Argument.AssertNotNull(action, nameof(action)); - ClientResult result = HelloAgain(p2, p1, action, null); - return ClientResult.FromValue((RoundTripModel)result, result.GetRawResponse()); + Response result = HelloAgain(p2, p1, action, null); + return Response.FromValue((RoundTripModel)result, result); } /// Return hi again. @@ -205,15 +207,15 @@ public virtual ClientResult HelloAgain(string p2, string p1, Rou /// /// /// , or is null. - /// Service returned a non-success status code. - public virtual async Task> HelloAgainAsync(string p2, string p1, RoundTripModel action) + /// Service returned a non-success status code. + public virtual async Task> HelloAgainAsync(string p2, string p1, RoundTripModel action) { Argument.AssertNotNull(p2, nameof(p2)); Argument.AssertNotNull(p1, nameof(p1)); Argument.AssertNotNull(action, nameof(action)); - ClientResult result = await HelloAgainAsync(p2, p1, action, null).ConfigureAwait(false); - return ClientResult.FromValue((RoundTripModel)result, result.GetRawResponse()); + Response result = await HelloAgainAsync(p2, p1, action, null).ConfigureAwait(false); + return Response.FromValue((RoundTripModel)result, result); } /// @@ -227,18 +229,18 @@ public virtual async Task> HelloAgainAsync(string p /// /// /// The content to send as the body of the request. - /// The request options, which can override default behaviors of the client pipeline on a per-call basis. + /// The request options, which can override default behaviors of the client pipeline on a per-call basis. /// , or is null. - /// Service returned a non-success status code. + /// Service returned a non-success status code. /// The response returned from the service. - public virtual ClientResult NoContentType(string p2, string p1, BinaryContent content, RequestOptions options) + public virtual Response NoContentType(string p2, string p1, RequestContent content, RequestContext context) { Argument.AssertNotNull(p2, nameof(p2)); Argument.AssertNotNull(p1, nameof(p1)); Argument.AssertNotNull(content, nameof(content)); - using PipelineMessage message = CreateNoContentTypeRequest(p2, p1, content, options); - return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); + using HttpMessage message = CreateNoContentTypeRequest(p2, p1, content, context); + return Pipeline.ProcessMessage(message, context); } /// @@ -252,18 +254,18 @@ public virtual ClientResult NoContentType(string p2, string p1, BinaryContent co /// /// /// The content to send as the body of the request. - /// The request options, which can override default behaviors of the client pipeline on a per-call basis. + /// The request options, which can override default behaviors of the client pipeline on a per-call basis. /// , or is null. - /// Service returned a non-success status code. + /// Service returned a non-success status code. /// The response returned from the service. - public virtual async Task NoContentTypeAsync(string p2, string p1, BinaryContent content, RequestOptions options) + public virtual async Task NoContentTypeAsync(string p2, string p1, RequestContent content, RequestContext context) { Argument.AssertNotNull(p2, nameof(p2)); Argument.AssertNotNull(p1, nameof(p1)); Argument.AssertNotNull(content, nameof(content)); - using PipelineMessage message = CreateNoContentTypeRequest(p2, p1, content, options); - return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + using HttpMessage message = CreateNoContentTypeRequest(p2, p1, content, context); + return await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); } /// @@ -274,13 +276,13 @@ public virtual async Task NoContentTypeAsync(string p2, string p1, /// /// /// - /// The request options, which can override default behaviors of the client pipeline on a per-call basis. - /// Service returned a non-success status code. + /// The request options, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. /// The response returned from the service. - public virtual ClientResult HelloDemo2(RequestOptions options) + public virtual Response HelloDemo2(RequestContext context) { - using PipelineMessage message = CreateHelloDemo2Request(options); - return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); + using HttpMessage message = CreateHelloDemo2Request(context); + return Pipeline.ProcessMessage(message, context); } /// @@ -291,29 +293,29 @@ public virtual ClientResult HelloDemo2(RequestOptions options) /// /// /// - /// The request options, which can override default behaviors of the client pipeline on a per-call basis. - /// Service returned a non-success status code. + /// The request options, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. /// The response returned from the service. - public virtual async Task HelloDemo2Async(RequestOptions options) + public virtual async Task HelloDemo2Async(RequestContext context) { - using PipelineMessage message = CreateHelloDemo2Request(options); - return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + using HttpMessage message = CreateHelloDemo2Request(context); + return await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); } /// Return hi in demo2. - /// Service returned a non-success status code. - public virtual ClientResult HelloDemo2() + /// Service returned a non-success status code. + public virtual Response HelloDemo2() { - ClientResult result = HelloDemo2(null); - return ClientResult.FromValue((Thing)result, result.GetRawResponse()); + Response result = HelloDemo2(null); + return Response.FromValue((Thing)result, result); } /// Return hi in demo2. - /// Service returned a non-success status code. - public virtual async Task> HelloDemo2Async() + /// Service returned a non-success status code. + public virtual async Task> HelloDemo2Async() { - ClientResult result = await HelloDemo2Async(null).ConfigureAwait(false); - return ClientResult.FromValue((Thing)result, result.GetRawResponse()); + Response result = await HelloDemo2Async(null).ConfigureAwait(false); + return Response.FromValue((Thing)result, result); } /// @@ -325,16 +327,16 @@ public virtual async Task> HelloDemo2Async() /// /// /// The content to send as the body of the request. - /// The request options, which can override default behaviors of the client pipeline on a per-call basis. + /// The request options, which can override default behaviors of the client pipeline on a per-call basis. /// is null. - /// Service returned a non-success status code. + /// Service returned a non-success status code. /// The response returned from the service. - public virtual ClientResult CreateLiteral(BinaryContent content, RequestOptions options) + public virtual Response CreateLiteral(RequestContent content, RequestContext context) { Argument.AssertNotNull(content, nameof(content)); - using PipelineMessage message = CreateCreateLiteralRequest(content, options); - return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); + using HttpMessage message = CreateCreateLiteralRequest(content, context); + return Pipeline.ProcessMessage(message, context); } /// @@ -346,40 +348,40 @@ public virtual ClientResult CreateLiteral(BinaryContent content, RequestOptions /// /// /// The content to send as the body of the request. - /// The request options, which can override default behaviors of the client pipeline on a per-call basis. + /// The request options, which can override default behaviors of the client pipeline on a per-call basis. /// is null. - /// Service returned a non-success status code. + /// Service returned a non-success status code. /// The response returned from the service. - public virtual async Task CreateLiteralAsync(BinaryContent content, RequestOptions options) + public virtual async Task CreateLiteralAsync(RequestContent content, RequestContext context) { Argument.AssertNotNull(content, nameof(content)); - using PipelineMessage message = CreateCreateLiteralRequest(content, options); - return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + using HttpMessage message = CreateCreateLiteralRequest(content, context); + return await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); } /// Create with literal value. /// /// is null. - /// Service returned a non-success status code. - public virtual ClientResult CreateLiteral(Thing body) + /// Service returned a non-success status code. + public virtual Response CreateLiteral(Thing body) { Argument.AssertNotNull(body, nameof(body)); - ClientResult result = CreateLiteral(body, null); - return ClientResult.FromValue((Thing)result, result.GetRawResponse()); + Response result = CreateLiteral(body, null); + return Response.FromValue((Thing)result, result); } /// Create with literal value. /// /// is null. - /// Service returned a non-success status code. - public virtual async Task> CreateLiteralAsync(Thing body) + /// Service returned a non-success status code. + public virtual async Task> CreateLiteralAsync(Thing body) { Argument.AssertNotNull(body, nameof(body)); - ClientResult result = await CreateLiteralAsync(body, null).ConfigureAwait(false); - return ClientResult.FromValue((Thing)result, result.GetRawResponse()); + Response result = await CreateLiteralAsync(body, null).ConfigureAwait(false); + return Response.FromValue((Thing)result, result); } /// @@ -390,13 +392,13 @@ public virtual async Task> CreateLiteralAsync(Thing body) /// /// /// - /// The request options, which can override default behaviors of the client pipeline on a per-call basis. - /// Service returned a non-success status code. + /// The request options, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. /// The response returned from the service. - public virtual ClientResult HelloLiteral(RequestOptions options) + public virtual Response HelloLiteral(RequestContext context) { - using PipelineMessage message = CreateHelloLiteralRequest(options); - return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); + using HttpMessage message = CreateHelloLiteralRequest(context); + return Pipeline.ProcessMessage(message, context); } /// @@ -407,29 +409,29 @@ public virtual ClientResult HelloLiteral(RequestOptions options) /// /// /// - /// The request options, which can override default behaviors of the client pipeline on a per-call basis. - /// Service returned a non-success status code. + /// The request options, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. /// The response returned from the service. - public virtual async Task HelloLiteralAsync(RequestOptions options) + public virtual async Task HelloLiteralAsync(RequestContext context) { - using PipelineMessage message = CreateHelloLiteralRequest(options); - return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + using HttpMessage message = CreateHelloLiteralRequest(context); + return await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); } /// Send literal parameters. - /// Service returned a non-success status code. - public virtual ClientResult HelloLiteral() + /// Service returned a non-success status code. + public virtual Response HelloLiteral() { - ClientResult result = HelloLiteral(null); - return ClientResult.FromValue((Thing)result, result.GetRawResponse()); + Response result = HelloLiteral(null); + return Response.FromValue((Thing)result, result); } /// Send literal parameters. - /// Service returned a non-success status code. - public virtual async Task> HelloLiteralAsync() + /// Service returned a non-success status code. + public virtual async Task> HelloLiteralAsync() { - ClientResult result = await HelloLiteralAsync(null).ConfigureAwait(false); - return ClientResult.FromValue((Thing)result, result.GetRawResponse()); + Response result = await HelloLiteralAsync(null).ConfigureAwait(false); + return Response.FromValue((Thing)result, result); } /// @@ -441,13 +443,13 @@ public virtual async Task> HelloLiteralAsync() /// /// /// - /// The request options, which can override default behaviors of the client pipeline on a per-call basis. - /// Service returned a non-success status code. + /// The request options, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. /// The response returned from the service. - public virtual ClientResult TopAction(DateTimeOffset action, RequestOptions options) + public virtual Response TopAction(DateTimeOffset action, RequestContext context) { - using PipelineMessage message = CreateTopActionRequest(action, options); - return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); + using HttpMessage message = CreateTopActionRequest(action, context); + return Pipeline.ProcessMessage(message, context); } /// @@ -459,31 +461,31 @@ public virtual ClientResult TopAction(DateTimeOffset action, RequestOptions opti /// /// /// - /// The request options, which can override default behaviors of the client pipeline on a per-call basis. - /// Service returned a non-success status code. + /// The request options, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. /// The response returned from the service. - public virtual async Task TopActionAsync(DateTimeOffset action, RequestOptions options) + public virtual async Task TopActionAsync(DateTimeOffset action, RequestContext context) { - using PipelineMessage message = CreateTopActionRequest(action, options); - return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + using HttpMessage message = CreateTopActionRequest(action, context); + return await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); } /// top level method. /// - /// Service returned a non-success status code. - public virtual ClientResult TopAction(DateTimeOffset action) + /// Service returned a non-success status code. + public virtual Response TopAction(DateTimeOffset action) { - ClientResult result = TopAction(action, null); - return ClientResult.FromValue((Thing)result, result.GetRawResponse()); + Response result = TopAction(action, null); + return Response.FromValue((Thing)result, result); } /// top level method. /// - /// Service returned a non-success status code. - public virtual async Task> TopActionAsync(DateTimeOffset action) + /// Service returned a non-success status code. + public virtual async Task> TopActionAsync(DateTimeOffset action) { - ClientResult result = await TopActionAsync(action, null).ConfigureAwait(false); - return ClientResult.FromValue((Thing)result, result.GetRawResponse()); + Response result = await TopActionAsync(action, null).ConfigureAwait(false); + return Response.FromValue((Thing)result, result); } /// @@ -494,13 +496,13 @@ public virtual async Task> TopActionAsync(DateTimeOffset act /// /// /// - /// The request options, which can override default behaviors of the client pipeline on a per-call basis. - /// Service returned a non-success status code. + /// The request options, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. /// The response returned from the service. - public virtual ClientResult TopAction2(RequestOptions options) + public virtual Response TopAction2(RequestContext context) { - using PipelineMessage message = CreateTopAction2Request(options); - return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); + using HttpMessage message = CreateTopAction2Request(context); + return Pipeline.ProcessMessage(message, context); } /// @@ -511,13 +513,13 @@ public virtual ClientResult TopAction2(RequestOptions options) /// /// /// - /// The request options, which can override default behaviors of the client pipeline on a per-call basis. - /// Service returned a non-success status code. + /// The request options, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. /// The response returned from the service. - public virtual async Task TopAction2Async(RequestOptions options) + public virtual async Task TopAction2Async(RequestContext context) { - using PipelineMessage message = CreateTopAction2Request(options); - return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + using HttpMessage message = CreateTopAction2Request(context); + return await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); } /// @@ -529,16 +531,16 @@ public virtual async Task TopAction2Async(RequestOptions options) /// /// /// The content to send as the body of the request. - /// The request options, which can override default behaviors of the client pipeline on a per-call basis. + /// The request options, which can override default behaviors of the client pipeline on a per-call basis. /// is null. - /// Service returned a non-success status code. + /// Service returned a non-success status code. /// The response returned from the service. - public virtual ClientResult PatchAction(BinaryContent content, RequestOptions options) + public virtual Response PatchAction(RequestContent content, RequestContext context) { Argument.AssertNotNull(content, nameof(content)); - using PipelineMessage message = CreatePatchActionRequest(content, options); - return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); + using HttpMessage message = CreatePatchActionRequest(content, context); + return Pipeline.ProcessMessage(message, context); } /// @@ -550,16 +552,16 @@ public virtual ClientResult PatchAction(BinaryContent content, RequestOptions op /// /// /// The content to send as the body of the request. - /// The request options, which can override default behaviors of the client pipeline on a per-call basis. + /// The request options, which can override default behaviors of the client pipeline on a per-call basis. /// is null. - /// Service returned a non-success status code. + /// Service returned a non-success status code. /// The response returned from the service. - public virtual async Task PatchActionAsync(BinaryContent content, RequestOptions options) + public virtual async Task PatchActionAsync(RequestContent content, RequestContext context) { Argument.AssertNotNull(content, nameof(content)); - using PipelineMessage message = CreatePatchActionRequest(content, options); - return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + using HttpMessage message = CreatePatchActionRequest(content, context); + return await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); } /// @@ -571,16 +573,16 @@ public virtual async Task PatchActionAsync(BinaryContent content, /// /// /// The content to send as the body of the request. - /// The request options, which can override default behaviors of the client pipeline on a per-call basis. + /// The request options, which can override default behaviors of the client pipeline on a per-call basis. /// is null. - /// Service returned a non-success status code. + /// Service returned a non-success status code. /// The response returned from the service. - public virtual ClientResult AnonymousBody(BinaryContent content, RequestOptions options) + public virtual Response AnonymousBody(RequestContent content, RequestContext context) { Argument.AssertNotNull(content, nameof(content)); - using PipelineMessage message = CreateAnonymousBodyRequest(content, options); - return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); + using HttpMessage message = CreateAnonymousBodyRequest(content, context); + return Pipeline.ProcessMessage(message, context); } /// @@ -592,16 +594,16 @@ public virtual ClientResult AnonymousBody(BinaryContent content, RequestOptions /// /// /// The content to send as the body of the request. - /// The request options, which can override default behaviors of the client pipeline on a per-call basis. + /// The request options, which can override default behaviors of the client pipeline on a per-call basis. /// is null. - /// Service returned a non-success status code. + /// Service returned a non-success status code. /// The response returned from the service. - public virtual async Task AnonymousBodyAsync(BinaryContent content, RequestOptions options) + public virtual async Task AnonymousBodyAsync(RequestContent content, RequestContext context) { Argument.AssertNotNull(content, nameof(content)); - using PipelineMessage message = CreateAnonymousBodyRequest(content, options); - return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + using HttpMessage message = CreateAnonymousBodyRequest(content, context); + return await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); } /// body parameter without body decorator. @@ -619,14 +621,14 @@ public virtual async Task AnonymousBodyAsync(BinaryContent content /// optional literal bool. /// optional nullable collection. /// , or is null. - /// Service returned a non-success status code. - public virtual ClientResult AnonymousBody(string name, BinaryData requiredUnion, AnonymousBodyRequestRequiredLiteralString requiredLiteralString, AnonymousBodyRequestRequiredLiteralInt requiredLiteralInt, AnonymousBodyRequestRequiredLiteralFloat requiredLiteralFloat, bool requiredLiteralBool, string requiredBadDescription, IEnumerable requiredNullableList, AnonymousBodyRequestOptionalLiteralString? optionalLiteralString = default, AnonymousBodyRequestOptionalLiteralInt? optionalLiteralInt = default, AnonymousBodyRequestOptionalLiteralFloat? optionalLiteralFloat = default, bool? optionalLiteralBool = default, IEnumerable optionalNullableList = default) + /// Service returned a non-success status code. + public virtual Response AnonymousBody(string name, BinaryData requiredUnion, ThingRequiredLiteralString requiredLiteralString, ThingRequiredLiteralInt requiredLiteralInt, ThingRequiredLiteralFloat requiredLiteralFloat, bool requiredLiteralBool, string requiredBadDescription, IEnumerable requiredNullableList, ThingOptionalLiteralString? optionalLiteralString = default, ThingOptionalLiteralInt? optionalLiteralInt = default, ThingOptionalLiteralFloat? optionalLiteralFloat = default, bool? optionalLiteralBool = default, IEnumerable optionalNullableList = default) { Argument.AssertNotNull(name, nameof(name)); Argument.AssertNotNull(requiredUnion, nameof(requiredUnion)); Argument.AssertNotNull(requiredBadDescription, nameof(requiredBadDescription)); - AnonymousBodyRequest spreadModel = new AnonymousBodyRequest( + Thing spreadModel = new Thing( name, requiredUnion, requiredLiteralString, @@ -641,8 +643,8 @@ public virtual ClientResult AnonymousBody(string name, BinaryData require optionalNullableList?.ToList() as IList ?? new ChangeTrackingList(), requiredNullableList?.ToList() as IList ?? new ChangeTrackingList(), null); - ClientResult result = AnonymousBody(spreadModel, null); - return ClientResult.FromValue((Thing)result, result.GetRawResponse()); + Response result = AnonymousBody(spreadModel, null); + return Response.FromValue((Thing)result, result); } /// body parameter without body decorator. @@ -660,14 +662,14 @@ public virtual ClientResult AnonymousBody(string name, BinaryData require /// optional literal bool. /// optional nullable collection. /// , or is null. - /// Service returned a non-success status code. - public virtual async Task> AnonymousBodyAsync(string name, BinaryData requiredUnion, AnonymousBodyRequestRequiredLiteralString requiredLiteralString, AnonymousBodyRequestRequiredLiteralInt requiredLiteralInt, AnonymousBodyRequestRequiredLiteralFloat requiredLiteralFloat, bool requiredLiteralBool, string requiredBadDescription, IEnumerable requiredNullableList, AnonymousBodyRequestOptionalLiteralString? optionalLiteralString = default, AnonymousBodyRequestOptionalLiteralInt? optionalLiteralInt = default, AnonymousBodyRequestOptionalLiteralFloat? optionalLiteralFloat = default, bool? optionalLiteralBool = default, IEnumerable optionalNullableList = default) + /// Service returned a non-success status code. + public virtual async Task> AnonymousBodyAsync(string name, BinaryData requiredUnion, ThingRequiredLiteralString requiredLiteralString, ThingRequiredLiteralInt requiredLiteralInt, ThingRequiredLiteralFloat requiredLiteralFloat, bool requiredLiteralBool, string requiredBadDescription, IEnumerable requiredNullableList, ThingOptionalLiteralString? optionalLiteralString = default, ThingOptionalLiteralInt? optionalLiteralInt = default, ThingOptionalLiteralFloat? optionalLiteralFloat = default, bool? optionalLiteralBool = default, IEnumerable optionalNullableList = default) { Argument.AssertNotNull(name, nameof(name)); Argument.AssertNotNull(requiredUnion, nameof(requiredUnion)); Argument.AssertNotNull(requiredBadDescription, nameof(requiredBadDescription)); - AnonymousBodyRequest spreadModel = new AnonymousBodyRequest( + Thing spreadModel = new Thing( name, requiredUnion, requiredLiteralString, @@ -682,8 +684,8 @@ public virtual async Task> AnonymousBodyAsync(string name, B optionalNullableList?.ToList() as IList ?? new ChangeTrackingList(), requiredNullableList?.ToList() as IList ?? new ChangeTrackingList(), null); - ClientResult result = await AnonymousBodyAsync(spreadModel, null).ConfigureAwait(false); - return ClientResult.FromValue((Thing)result, result.GetRawResponse()); + Response result = await AnonymousBodyAsync(spreadModel, null).ConfigureAwait(false); + return Response.FromValue((Thing)result, result); } /// @@ -695,16 +697,16 @@ public virtual async Task> AnonymousBodyAsync(string name, B /// /// /// The content to send as the body of the request. - /// The request options, which can override default behaviors of the client pipeline on a per-call basis. + /// The request options, which can override default behaviors of the client pipeline on a per-call basis. /// is null. - /// Service returned a non-success status code. + /// Service returned a non-success status code. /// The response returned from the service. - public virtual ClientResult FriendlyModel(BinaryContent content, RequestOptions options) + public virtual Response FriendlyModel(RequestContent content, RequestContext context) { Argument.AssertNotNull(content, nameof(content)); - using PipelineMessage message = CreateFriendlyModelRequest(content, options); - return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); + using HttpMessage message = CreateFriendlyModelRequest(content, context); + return Pipeline.ProcessMessage(message, context); } /// @@ -716,42 +718,42 @@ public virtual ClientResult FriendlyModel(BinaryContent content, RequestOptions /// /// /// The content to send as the body of the request. - /// The request options, which can override default behaviors of the client pipeline on a per-call basis. + /// The request options, which can override default behaviors of the client pipeline on a per-call basis. /// is null. - /// Service returned a non-success status code. + /// Service returned a non-success status code. /// The response returned from the service. - public virtual async Task FriendlyModelAsync(BinaryContent content, RequestOptions options) + public virtual async Task FriendlyModelAsync(RequestContent content, RequestContext context) { Argument.AssertNotNull(content, nameof(content)); - using PipelineMessage message = CreateFriendlyModelRequest(content, options); - return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + using HttpMessage message = CreateFriendlyModelRequest(content, context); + return await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); } /// Model can have its friendly name. /// name of the NotFriend. /// is null. - /// Service returned a non-success status code. - public virtual ClientResult FriendlyModel(string name) + /// Service returned a non-success status code. + public virtual Response FriendlyModel(string name) { Argument.AssertNotNull(name, nameof(name)); - FriendlyModelRequest spreadModel = new FriendlyModelRequest(name, null); - ClientResult result = FriendlyModel(spreadModel, null); - return ClientResult.FromValue((Friend)result, result.GetRawResponse()); + Friend spreadModel = new Friend(name, null); + Response result = FriendlyModel(spreadModel, null); + return Response.FromValue((Friend)result, result); } /// Model can have its friendly name. /// name of the NotFriend. /// is null. - /// Service returned a non-success status code. - public virtual async Task> FriendlyModelAsync(string name) + /// Service returned a non-success status code. + public virtual async Task> FriendlyModelAsync(string name) { Argument.AssertNotNull(name, nameof(name)); - FriendlyModelRequest spreadModel = new FriendlyModelRequest(name, null); - ClientResult result = await FriendlyModelAsync(spreadModel, null).ConfigureAwait(false); - return ClientResult.FromValue((Friend)result, result.GetRawResponse()); + Friend spreadModel = new Friend(name, null); + Response result = await FriendlyModelAsync(spreadModel, null).ConfigureAwait(false); + return Response.FromValue((Friend)result, result); } /// @@ -762,13 +764,13 @@ public virtual async Task> FriendlyModelAsync(string name) /// /// /// - /// The request options, which can override default behaviors of the client pipeline on a per-call basis. - /// Service returned a non-success status code. + /// The request options, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. /// The response returned from the service. - public virtual ClientResult AddTimeHeader(RequestOptions options) + public virtual Response AddTimeHeader(RequestContext context) { - using PipelineMessage message = CreateAddTimeHeaderRequest(options); - return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); + using HttpMessage message = CreateAddTimeHeaderRequest(context); + return Pipeline.ProcessMessage(message, context); } /// @@ -779,25 +781,25 @@ public virtual ClientResult AddTimeHeader(RequestOptions options) /// /// /// - /// The request options, which can override default behaviors of the client pipeline on a per-call basis. - /// Service returned a non-success status code. + /// The request options, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. /// The response returned from the service. - public virtual async Task AddTimeHeaderAsync(RequestOptions options) + public virtual async Task AddTimeHeaderAsync(RequestContext context) { - using PipelineMessage message = CreateAddTimeHeaderRequest(options); - return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + using HttpMessage message = CreateAddTimeHeaderRequest(context); + return await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); } /// addTimeHeader. - /// Service returned a non-success status code. - public virtual ClientResult AddTimeHeader() + /// Service returned a non-success status code. + public virtual Response AddTimeHeader() { return AddTimeHeader(null); } /// addTimeHeader. - /// Service returned a non-success status code. - public virtual async Task AddTimeHeaderAsync() + /// Service returned a non-success status code. + public virtual async Task AddTimeHeaderAsync() { return await AddTimeHeaderAsync(null).ConfigureAwait(false); } @@ -811,16 +813,16 @@ public virtual async Task AddTimeHeaderAsync() /// /// /// The content to send as the body of the request. - /// The request options, which can override default behaviors of the client pipeline on a per-call basis. + /// The request options, which can override default behaviors of the client pipeline on a per-call basis. /// is null. - /// Service returned a non-success status code. + /// Service returned a non-success status code. /// The response returned from the service. - public virtual ClientResult ProjectedNameModel(BinaryContent content, RequestOptions options) + public virtual Response ProjectedNameModel(RequestContent content, RequestContext context) { Argument.AssertNotNull(content, nameof(content)); - using PipelineMessage message = CreateProjectedNameModelRequest(content, options); - return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); + using HttpMessage message = CreateProjectedNameModelRequest(content, context); + return Pipeline.ProcessMessage(message, context); } /// @@ -832,42 +834,42 @@ public virtual ClientResult ProjectedNameModel(BinaryContent content, RequestOpt /// /// /// The content to send as the body of the request. - /// The request options, which can override default behaviors of the client pipeline on a per-call basis. + /// The request options, which can override default behaviors of the client pipeline on a per-call basis. /// is null. - /// Service returned a non-success status code. + /// Service returned a non-success status code. /// The response returned from the service. - public virtual async Task ProjectedNameModelAsync(BinaryContent content, RequestOptions options) + public virtual async Task ProjectedNameModelAsync(RequestContent content, RequestContext context) { Argument.AssertNotNull(content, nameof(content)); - using PipelineMessage message = CreateProjectedNameModelRequest(content, options); - return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + using HttpMessage message = CreateProjectedNameModelRequest(content, context); + return await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); } /// Model can have its projected name. /// name of the ModelWithProjectedName. /// is null. - /// Service returned a non-success status code. - public virtual ClientResult ProjectedNameModel(string name) + /// Service returned a non-success status code. + public virtual Response ProjectedNameModel(string name) { Argument.AssertNotNull(name, nameof(name)); - ProjectedNameModelRequest spreadModel = new ProjectedNameModelRequest(name, null); - ClientResult result = ProjectedNameModel(spreadModel, null); - return ClientResult.FromValue((ProjectedModel)result, result.GetRawResponse()); + ProjectedModel spreadModel = new ProjectedModel(name, null); + Response result = ProjectedNameModel(spreadModel, null); + return Response.FromValue((ProjectedModel)result, result); } /// Model can have its projected name. /// name of the ModelWithProjectedName. /// is null. - /// Service returned a non-success status code. - public virtual async Task> ProjectedNameModelAsync(string name) + /// Service returned a non-success status code. + public virtual async Task> ProjectedNameModelAsync(string name) { Argument.AssertNotNull(name, nameof(name)); - ProjectedNameModelRequest spreadModel = new ProjectedNameModelRequest(name, null); - ClientResult result = await ProjectedNameModelAsync(spreadModel, null).ConfigureAwait(false); - return ClientResult.FromValue((ProjectedModel)result, result.GetRawResponse()); + ProjectedModel spreadModel = new ProjectedModel(name, null); + Response result = await ProjectedNameModelAsync(spreadModel, null).ConfigureAwait(false); + return Response.FromValue((ProjectedModel)result, result); } /// @@ -878,13 +880,13 @@ public virtual async Task> ProjectedNameModelAsync( /// /// /// - /// The request options, which can override default behaviors of the client pipeline on a per-call basis. - /// Service returned a non-success status code. + /// The request options, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. /// The response returned from the service. - public virtual ClientResult ReturnsAnonymousModel(RequestOptions options) + public virtual Response ReturnsAnonymousModel(RequestContext context) { - using PipelineMessage message = CreateReturnsAnonymousModelRequest(options); - return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); + using HttpMessage message = CreateReturnsAnonymousModelRequest(context); + return Pipeline.ProcessMessage(message, context); } /// @@ -895,29 +897,29 @@ public virtual ClientResult ReturnsAnonymousModel(RequestOptions options) /// /// /// - /// The request options, which can override default behaviors of the client pipeline on a per-call basis. - /// Service returned a non-success status code. + /// The request options, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. /// The response returned from the service. - public virtual async Task ReturnsAnonymousModelAsync(RequestOptions options) + public virtual async Task ReturnsAnonymousModelAsync(RequestContext context) { - using PipelineMessage message = CreateReturnsAnonymousModelRequest(options); - return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + using HttpMessage message = CreateReturnsAnonymousModelRequest(context); + return await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); } /// return anonymous model. - /// Service returned a non-success status code. - public virtual ClientResult ReturnsAnonymousModel() + /// Service returned a non-success status code. + public virtual Response ReturnsAnonymousModel() { - ClientResult result = ReturnsAnonymousModel(null); - return ClientResult.FromValue((ReturnsAnonymousModelResponse)result, result.GetRawResponse()); + Response result = ReturnsAnonymousModel(null); + return Response.FromValue((ReturnsAnonymousModelResponse)result, result); } /// return anonymous model. - /// Service returned a non-success status code. - public virtual async Task> ReturnsAnonymousModelAsync() + /// Service returned a non-success status code. + public virtual async Task> ReturnsAnonymousModelAsync() { - ClientResult result = await ReturnsAnonymousModelAsync(null).ConfigureAwait(false); - return ClientResult.FromValue((ReturnsAnonymousModelResponse)result, result.GetRawResponse()); + Response result = await ReturnsAnonymousModelAsync(null).ConfigureAwait(false); + return Response.FromValue((ReturnsAnonymousModelResponse)result, result); } /// @@ -929,16 +931,16 @@ public virtual async Task> ReturnsAn /// /// /// - /// The request options, which can override default behaviors of the client pipeline on a per-call basis. + /// The request options, which can override default behaviors of the client pipeline on a per-call basis. /// is null. - /// Service returned a non-success status code. + /// Service returned a non-success status code. /// The response returned from the service. - public virtual ClientResult GetUnknownValue(string accept, RequestOptions options) + public virtual Response GetUnknownValue(string accept, RequestContext context) { Argument.AssertNotNull(accept, nameof(accept)); - using PipelineMessage message = CreateGetUnknownValueRequest(accept, options); - return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); + using HttpMessage message = CreateGetUnknownValueRequest(accept, context); + return Pipeline.ProcessMessage(message, context); } /// @@ -950,40 +952,40 @@ public virtual ClientResult GetUnknownValue(string accept, RequestOptions option /// /// /// - /// The request options, which can override default behaviors of the client pipeline on a per-call basis. + /// The request options, which can override default behaviors of the client pipeline on a per-call basis. /// is null. - /// Service returned a non-success status code. + /// Service returned a non-success status code. /// The response returned from the service. - public virtual async Task GetUnknownValueAsync(string accept, RequestOptions options) + public virtual async Task GetUnknownValueAsync(string accept, RequestContext context) { Argument.AssertNotNull(accept, nameof(accept)); - using PipelineMessage message = CreateGetUnknownValueRequest(accept, options); - return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + using HttpMessage message = CreateGetUnknownValueRequest(accept, context); + return await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); } /// get extensible enum. /// /// is null. - /// Service returned a non-success status code. - public virtual ClientResult GetUnknownValue(string accept) + /// Service returned a non-success status code. + public virtual Response GetUnknownValue(string accept) { Argument.AssertNotNull(accept, nameof(accept)); - ClientResult result = GetUnknownValue(accept, null); - return ClientResult.FromValue(result.GetRawResponse().Content.ToObjectFromJson(), result.GetRawResponse()); + Response result = GetUnknownValue(accept, null); + return Response.FromValue(result.Content.ToObjectFromJson(), result); } /// get extensible enum. /// /// is null. - /// Service returned a non-success status code. - public virtual async Task> GetUnknownValueAsync(string accept) + /// Service returned a non-success status code. + public virtual async Task> GetUnknownValueAsync(string accept) { Argument.AssertNotNull(accept, nameof(accept)); - ClientResult result = await GetUnknownValueAsync(accept, null).ConfigureAwait(false); - return ClientResult.FromValue(result.GetRawResponse().Content.ToObjectFromJson(), result.GetRawResponse()); + Response result = await GetUnknownValueAsync(accept, null).ConfigureAwait(false); + return Response.FromValue(result.Content.ToObjectFromJson(), result); } /// @@ -995,16 +997,16 @@ public virtual async Task> GetUnknownValueAsync(string acce /// /// /// The content to send as the body of the request. - /// The request options, which can override default behaviors of the client pipeline on a per-call basis. + /// The request options, which can override default behaviors of the client pipeline on a per-call basis. /// is null. - /// Service returned a non-success status code. + /// Service returned a non-success status code. /// The response returned from the service. - public virtual ClientResult InternalProtocol(BinaryContent content, RequestOptions options) + public virtual Response InternalProtocol(RequestContent content, RequestContext context) { Argument.AssertNotNull(content, nameof(content)); - using PipelineMessage message = CreateInternalProtocolRequest(content, options); - return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); + using HttpMessage message = CreateInternalProtocolRequest(content, context); + return Pipeline.ProcessMessage(message, context); } /// @@ -1016,40 +1018,40 @@ public virtual ClientResult InternalProtocol(BinaryContent content, RequestOptio /// /// /// The content to send as the body of the request. - /// The request options, which can override default behaviors of the client pipeline on a per-call basis. + /// The request options, which can override default behaviors of the client pipeline on a per-call basis. /// is null. - /// Service returned a non-success status code. + /// Service returned a non-success status code. /// The response returned from the service. - public virtual async Task InternalProtocolAsync(BinaryContent content, RequestOptions options) + public virtual async Task InternalProtocolAsync(RequestContent content, RequestContext context) { Argument.AssertNotNull(content, nameof(content)); - using PipelineMessage message = CreateInternalProtocolRequest(content, options); - return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + using HttpMessage message = CreateInternalProtocolRequest(content, context); + return await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); } /// When set protocol false and convenient true, then the protocol method should be internal. /// /// is null. - /// Service returned a non-success status code. - public virtual ClientResult InternalProtocol(Thing body) + /// Service returned a non-success status code. + public virtual Response InternalProtocol(Thing body) { Argument.AssertNotNull(body, nameof(body)); - ClientResult result = InternalProtocol(body, null); - return ClientResult.FromValue((Thing)result, result.GetRawResponse()); + Response result = InternalProtocol(body, null); + return Response.FromValue((Thing)result, result); } /// When set protocol false and convenient true, then the protocol method should be internal. /// /// is null. - /// Service returned a non-success status code. - public virtual async Task> InternalProtocolAsync(Thing body) + /// Service returned a non-success status code. + public virtual async Task> InternalProtocolAsync(Thing body) { Argument.AssertNotNull(body, nameof(body)); - ClientResult result = await InternalProtocolAsync(body, null).ConfigureAwait(false); - return ClientResult.FromValue((Thing)result, result.GetRawResponse()); + Response result = await InternalProtocolAsync(body, null).ConfigureAwait(false); + return Response.FromValue((Thing)result, result); } /// @@ -1060,13 +1062,13 @@ public virtual async Task> InternalProtocolAsync(Thing body) /// /// /// - /// The request options, which can override default behaviors of the client pipeline on a per-call basis. - /// Service returned a non-success status code. + /// The request options, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. /// The response returned from the service. - public virtual ClientResult StillConvenient(RequestOptions options) + public virtual Response StillConvenient(RequestContext context) { - using PipelineMessage message = CreateStillConvenientRequest(options); - return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); + using HttpMessage message = CreateStillConvenientRequest(context); + return Pipeline.ProcessMessage(message, context); } /// @@ -1077,25 +1079,25 @@ public virtual ClientResult StillConvenient(RequestOptions options) /// /// /// - /// The request options, which can override default behaviors of the client pipeline on a per-call basis. - /// Service returned a non-success status code. + /// The request options, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. /// The response returned from the service. - public virtual async Task StillConvenientAsync(RequestOptions options) + public virtual async Task StillConvenientAsync(RequestContext context) { - using PipelineMessage message = CreateStillConvenientRequest(options); - return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + using HttpMessage message = CreateStillConvenientRequest(context); + return await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); } /// When set protocol false and convenient true, the convenient method should be generated even it has the same signature as protocol one. - /// Service returned a non-success status code. - public virtual ClientResult StillConvenient() + /// Service returned a non-success status code. + public virtual Response StillConvenient() { return StillConvenient(null); } /// When set protocol false and convenient true, the convenient method should be generated even it has the same signature as protocol one. - /// Service returned a non-success status code. - public virtual async Task StillConvenientAsync() + /// Service returned a non-success status code. + public virtual async Task StillConvenientAsync() { return await StillConvenientAsync(null).ConfigureAwait(false); } @@ -1109,16 +1111,16 @@ public virtual async Task StillConvenientAsync() /// /// /// - /// The request options, which can override default behaviors of the client pipeline on a per-call basis. + /// The request options, which can override default behaviors of the client pipeline on a per-call basis. /// is null. - /// Service returned a non-success status code. + /// Service returned a non-success status code. /// The response returned from the service. - public virtual ClientResult HeadAsBoolean(string id, RequestOptions options) + public virtual Response HeadAsBoolean(string id, RequestContext context) { Argument.AssertNotNull(id, nameof(id)); - using PipelineMessage message = CreateHeadAsBooleanRequest(id, options); - return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); + using HttpMessage message = CreateHeadAsBooleanRequest(id, context); + return Pipeline.ProcessMessage(message, context); } /// @@ -1130,23 +1132,23 @@ public virtual ClientResult HeadAsBoolean(string id, RequestOptions options) /// /// /// - /// The request options, which can override default behaviors of the client pipeline on a per-call basis. + /// The request options, which can override default behaviors of the client pipeline on a per-call basis. /// is null. - /// Service returned a non-success status code. + /// Service returned a non-success status code. /// The response returned from the service. - public virtual async Task HeadAsBooleanAsync(string id, RequestOptions options) + public virtual async Task HeadAsBooleanAsync(string id, RequestContext context) { Argument.AssertNotNull(id, nameof(id)); - using PipelineMessage message = CreateHeadAsBooleanRequest(id, options); - return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + using HttpMessage message = CreateHeadAsBooleanRequest(id, context); + return await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); } /// head as boolean. /// /// is null. - /// Service returned a non-success status code. - public virtual ClientResult HeadAsBoolean(string id) + /// Service returned a non-success status code. + public virtual Response HeadAsBoolean(string id) { Argument.AssertNotNull(id, nameof(id)); @@ -1156,8 +1158,8 @@ public virtual ClientResult HeadAsBoolean(string id) /// head as boolean. /// /// is null. - /// Service returned a non-success status code. - public virtual async Task HeadAsBooleanAsync(string id) + /// Service returned a non-success status code. + public virtual async Task HeadAsBooleanAsync(string id) { Argument.AssertNotNull(id, nameof(id)); diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/BasicTypeSpecClientOptions.cs b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/BasicTypeSpecClientOptions.cs index 902ba6acf982..ce57ff03d1bc 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/BasicTypeSpecClientOptions.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/BasicTypeSpecClientOptions.cs @@ -6,12 +6,12 @@ #nullable disable using System; -using System.ClientModel.Primitives; +using Azure.Core; namespace BasicTypeSpec { /// Client options for . - public partial class BasicTypeSpecClientOptions : ClientPipelineOptions + public partial class BasicTypeSpecClientOptions : ClientOptions { private const ServiceVersion LatestVersion = ServiceVersion.V2024_08_16_Preview; diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Internal/ClientPipelineExtensions.cs b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Internal/ClientPipelineExtensions.cs index d9378b66796e..82e2f9dcaead 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Internal/ClientPipelineExtensions.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Internal/ClientPipelineExtensions.cs @@ -5,66 +5,73 @@ #nullable disable -using System.ClientModel; -using System.ClientModel.Primitives; using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; namespace BasicTypeSpec { internal static partial class ClientPipelineExtensions { - public static async ValueTask ProcessMessageAsync(this ClientPipeline pipeline, PipelineMessage message, RequestOptions options) + public static async ValueTask ProcessMessageAsync(this HttpPipeline pipeline, HttpMessage message, RequestContext options) { - await pipeline.SendAsync(message).ConfigureAwait(false); + await pipeline.SendAsync(message, default).ConfigureAwait(false); - if (message.Response.IsError && (options?.ErrorOptions & ClientErrorBehaviors.NoThrow) != ClientErrorBehaviors.NoThrow) + if (message.Response.IsError && (options?.ErrorOptions & ErrorOptions.NoThrow) != ErrorOptions.NoThrow) { - throw await ClientResultException.CreateAsync(message.Response).ConfigureAwait(false); + throw new RequestFailedException(message.Response); } - PipelineResponse response = message.BufferResponse ? message.Response : message.ExtractResponse(); + Response response = message.BufferResponse ? message.Response : ExtractResponseContent(message); return response; } - public static PipelineResponse ProcessMessage(this ClientPipeline pipeline, PipelineMessage message, RequestOptions options) + public static Response ProcessMessage(this HttpPipeline pipeline, HttpMessage message, RequestContext options) { - pipeline.Send(message); + pipeline.Send(message, default); - if (message.Response.IsError && (options?.ErrorOptions & ClientErrorBehaviors.NoThrow) != ClientErrorBehaviors.NoThrow) + if (message.Response.IsError && (options?.ErrorOptions & ErrorOptions.NoThrow) != ErrorOptions.NoThrow) { - throw new ClientResultException(message.Response); + throw new RequestFailedException(message.Response); } - PipelineResponse response = message.BufferResponse ? message.Response : message.ExtractResponse(); + Response response = message.BufferResponse ? message.Response : ExtractResponseContent(message); return response; } - public static async ValueTask> ProcessHeadAsBoolMessageAsync(this ClientPipeline pipeline, PipelineMessage message, RequestOptions options) + public static async ValueTask> ProcessHeadAsBoolMessageAsync(this HttpPipeline pipeline, HttpMessage message, RequestContext options) { - PipelineResponse response = await pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false); + Response response = await pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false); switch (response.Status) { case >= 200 and < 300: - return ClientResult.FromValue(true, response); + return Response.FromValue(true, response); case >= 400 and < 500: - return ClientResult.FromValue(false, response); + return Response.FromValue(false, response); default: - return new ErrorResult(response, new ClientResultException(response)); + return new ErrorResult(response, new RequestFailedException(response)); } } - public static ClientResult ProcessHeadAsBoolMessage(this ClientPipeline pipeline, PipelineMessage message, RequestOptions options) + public static Response ProcessHeadAsBoolMessage(this HttpPipeline pipeline, HttpMessage message, RequestContext options) { - PipelineResponse response = pipeline.ProcessMessage(message, options); + Response response = pipeline.ProcessMessage(message, options); switch (response.Status) { case >= 200 and < 300: - return ClientResult.FromValue(true, response); + return Response.FromValue(true, response); case >= 400 and < 500: - return ClientResult.FromValue(false, response); + return Response.FromValue(false, response); default: - return new ErrorResult(response, new ClientResultException(response)); + return new ErrorResult(response, new RequestFailedException(response)); } } + + private static Response ExtractResponseContent(HttpMessage message) + { + message.ExtractResponseContent(); + return message.Response; + } } } diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Internal/ClientUriBuilder.cs b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Internal/ClientUriBuilder.cs index a887f440ebe9..86b06504d0c8 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Internal/ClientUriBuilder.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Internal/ClientUriBuilder.cs @@ -9,10 +9,11 @@ using System.Collections.Generic; using System.Linq; using System.Text; +using Azure.Core; namespace BasicTypeSpec { - internal partial class ClientUriBuilder + internal partial class ClientUriBuilder : RequestUriBuilder { private UriBuilder _uriBuilder; private StringBuilder _pathBuilder; @@ -28,84 +29,6 @@ public ClientUriBuilder() private StringBuilder QueryBuilder => _queryBuilder ??= new StringBuilder(UriBuilder.Query); - public void Reset(Uri uri) - { - _uriBuilder = new UriBuilder(uri); - _pathBuilder = new StringBuilder(UriBuilder.Path); - _queryBuilder = new StringBuilder(UriBuilder.Query); - } - - public void AppendPath(string value, bool escape) - { - if (escape) - { - value = Uri.EscapeDataString(value); - } - if (PathBuilder.Length > 0 && PathBuilder[PathBuilder.Length - 1] == '/' && value[0] == '/') - { - PathBuilder.Remove(PathBuilder.Length - 1, 1); - } - PathBuilder.Append(value); - UriBuilder.Path = PathBuilder.ToString(); - } - - public void AppendPath(bool value, bool escape = false) => AppendPath(TypeFormatters.ConvertToString(value), escape); - - public void AppendPath(float value, bool escape = true) => AppendPath(TypeFormatters.ConvertToString(value), escape); - - public void AppendPath(double value, bool escape = true) => AppendPath(TypeFormatters.ConvertToString(value), escape); - - public void AppendPath(int value, bool escape = true) => AppendPath(TypeFormatters.ConvertToString(value), escape); - - public void AppendPath(byte[] value, string format, bool escape = true) => AppendPath(TypeFormatters.ConvertToString(value, format), escape); - - public void AppendPath(IEnumerable value, bool escape = true) => AppendPath(TypeFormatters.ConvertToString(value), escape); - - public void AppendPath(DateTimeOffset value, string format, bool escape = true) => AppendPath(TypeFormatters.ConvertToString(value, format), escape); - - public void AppendPath(TimeSpan value, string format, bool escape = true) => AppendPath(TypeFormatters.ConvertToString(value, format), escape); - - public void AppendPath(Guid value, bool escape = true) => AppendPath(TypeFormatters.ConvertToString(value), escape); - - public void AppendPath(long value, bool escape = true) => AppendPath(TypeFormatters.ConvertToString(value), escape); - - public void AppendQuery(string name, string value, bool escape) - { - if (QueryBuilder.Length > 0) - { - QueryBuilder.Append('&'); - } - if (escape) - { - value = Uri.EscapeDataString(value); - } - QueryBuilder.Append(name); - QueryBuilder.Append('='); - QueryBuilder.Append(value); - } - - public void AppendQuery(string name, bool value, bool escape = false) => AppendQuery(name, TypeFormatters.ConvertToString(value), escape); - - public void AppendQuery(string name, float value, bool escape = true) => AppendQuery(name, TypeFormatters.ConvertToString(value), escape); - - public void AppendQuery(string name, DateTimeOffset value, string format, bool escape = true) => AppendQuery(name, TypeFormatters.ConvertToString(value, format), escape); - - public void AppendQuery(string name, TimeSpan value, string format, bool escape = true) => AppendQuery(name, TypeFormatters.ConvertToString(value, format), escape); - - public void AppendQuery(string name, double value, bool escape = true) => AppendQuery(name, TypeFormatters.ConvertToString(value), escape); - - public void AppendQuery(string name, decimal value, bool escape = true) => AppendQuery(name, TypeFormatters.ConvertToString(value), escape); - - public void AppendQuery(string name, int value, bool escape = true) => AppendQuery(name, TypeFormatters.ConvertToString(value), escape); - - public void AppendQuery(string name, long value, bool escape = true) => AppendQuery(name, TypeFormatters.ConvertToString(value), escape); - - public void AppendQuery(string name, TimeSpan value, bool escape = true) => AppendQuery(name, TypeFormatters.ConvertToString(value), escape); - - public void AppendQuery(string name, byte[] value, string format, bool escape = true) => AppendQuery(name, TypeFormatters.ConvertToString(value, format), escape); - - public void AppendQuery(string name, Guid value, bool escape = true) => AppendQuery(name, TypeFormatters.ConvertToString(value), escape); - public void AppendQueryDelimited(string name, IEnumerable value, string delimiter, bool escape = true) { IEnumerable stringValues = value.Select(v => TypeFormatters.ConvertToString(v)); @@ -117,18 +40,5 @@ public void AppendQueryDelimited(string name, IEnumerable value, string de IEnumerable stringValues = value.Select(v => TypeFormatters.ConvertToString(v, format)); AppendQuery(name, string.Join(delimiter, stringValues), escape); } - - public Uri ToUri() - { - if (_pathBuilder != null) - { - UriBuilder.Path = _pathBuilder.ToString(); - } - if (_queryBuilder != null) - { - UriBuilder.Query = _queryBuilder.ToString(); - } - return UriBuilder.Uri; - } } } diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Internal/ErrorResult.cs b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Internal/ErrorResult.cs index 99d36a31e528..cc9535a76e79 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Internal/ErrorResult.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Internal/ErrorResult.cs @@ -5,22 +5,26 @@ #nullable disable -using System.ClientModel; -using System.ClientModel.Primitives; +using Azure; namespace BasicTypeSpec { - internal partial class ErrorResult : ClientResult + internal partial class ErrorResult : Response { - private readonly PipelineResponse _response; - private readonly ClientResultException _exception; + private readonly Response _response; + private readonly RequestFailedException _exception; - public ErrorResult(PipelineResponse response, ClientResultException exception) : base(default, response) + public ErrorResult(Response response, RequestFailedException exception) { _response = response; _exception = exception; } public override T Value => throw _exception; + + public override Response GetRawResponse() + { + return _response; + } } } diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Internal/Utf8JsonBinaryContent.cs b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Internal/Utf8JsonBinaryContent.cs new file mode 100644 index 000000000000..d7d35c3dfb08 --- /dev/null +++ b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Internal/Utf8JsonBinaryContent.cs @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.IO; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace BasicTypeSpec +{ + internal partial class Utf8JsonBinaryContent : RequestContent + { + private readonly MemoryStream _stream; + private readonly RequestContent _content; + + public Utf8JsonBinaryContent() + { + _stream = new MemoryStream(); + _content = Create(_stream); + JsonWriter = new Utf8JsonWriter(_stream); + } + + public Utf8JsonWriter JsonWriter { get; } + + public override async Task WriteToAsync(Stream stream, CancellationToken cancellationToken = default) + { + await JsonWriter.FlushAsync().ConfigureAwait(false); + await _content.WriteToAsync(stream, cancellationToken).ConfigureAwait(false); + } + + public override void WriteTo(Stream stream, CancellationToken cancellationToken = default) + { + JsonWriter.Flush(); + _content.WriteTo(stream, cancellationToken); + } + + public override bool TryComputeLength(out long length) + { + length = JsonWriter.BytesCommitted + JsonWriter.BytesPending; + return true; + } + + public override void Dispose() + { + JsonWriter.Dispose(); + _content.Dispose(); + _stream.Dispose(); + } + } +} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/AnonymousBodyRequest.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/AnonymousBodyRequest.Serialization.cs deleted file mode 100644 index aed8f79f6ab4..000000000000 --- a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/AnonymousBodyRequest.Serialization.cs +++ /dev/null @@ -1,342 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using BasicTypeSpec; - -namespace BasicTypeSpec.Models -{ - /// - internal partial class AnonymousBodyRequest : IJsonModel - { - internal AnonymousBodyRequest() - { - } - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(AnonymousBodyRequest)} does not support writing '{format}' format."); - } - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - writer.WritePropertyName("requiredUnion"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(RequiredUnion); -#else - using (JsonDocument document = JsonDocument.Parse(RequiredUnion)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - writer.WritePropertyName("requiredLiteralString"u8); - writer.WriteStringValue(RequiredLiteralString.ToString()); - writer.WritePropertyName("requiredLiteralInt"u8); - writer.WriteNumberValue(RequiredLiteralInt.ToSerialInt32()); - writer.WritePropertyName("requiredLiteralFloat"u8); - writer.WriteNumberValue(RequiredLiteralFloat.ToSerialSingle()); - writer.WritePropertyName("requiredLiteralBool"u8); - writer.WriteBooleanValue(RequiredLiteralBool); - if (Optional.IsDefined(OptionalLiteralString)) - { - writer.WritePropertyName("optionalLiteralString"u8); - writer.WriteStringValue(OptionalLiteralString.Value.ToString()); - } - if (Optional.IsDefined(OptionalLiteralInt)) - { - writer.WritePropertyName("optionalLiteralInt"u8); - writer.WriteNumberValue(OptionalLiteralInt.Value.ToSerialInt32()); - } - if (Optional.IsDefined(OptionalLiteralFloat)) - { - writer.WritePropertyName("optionalLiteralFloat"u8); - writer.WriteNumberValue(OptionalLiteralFloat.Value.ToSerialSingle()); - } - if (Optional.IsDefined(OptionalLiteralBool)) - { - writer.WritePropertyName("optionalLiteralBool"u8); - writer.WriteBooleanValue(OptionalLiteralBool.Value); - } - writer.WritePropertyName("requiredBadDescription"u8); - writer.WriteStringValue(RequiredBadDescription); - if (Optional.IsCollectionDefined(OptionalNullableList)) - { - if (OptionalNullableList != null) - { - writer.WritePropertyName("optionalNullableList"u8); - writer.WriteStartArray(); - foreach (var item in OptionalNullableList) - { - writer.WriteNumberValue(item); - } - writer.WriteEndArray(); - } - else - { - writer.WriteNull("optionalNullableList"u8); - } - } - if (RequiredNullableList != null && Optional.IsCollectionDefined(RequiredNullableList)) - { - writer.WritePropertyName("requiredNullableList"u8); - writer.WriteStartArray(); - foreach (var item in RequiredNullableList) - { - writer.WriteNumberValue(item); - } - writer.WriteEndArray(); - } - else - { - writer.WriteNull("requiredNullableList"u8); - } - if (options.Format != "W" && _additionalBinaryDataProperties != null) - { - foreach (var item in _additionalBinaryDataProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - } - - AnonymousBodyRequest IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); - - /// The JSON reader. - /// The client options for reading and writing models. - protected virtual AnonymousBodyRequest JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(AnonymousBodyRequest)} does not support reading '{format}' format."); - } - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeAnonymousBodyRequest(document.RootElement, options); - } - - internal static AnonymousBodyRequest DeserializeAnonymousBodyRequest(JsonElement element, ModelReaderWriterOptions options) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string name = default; - BinaryData requiredUnion = default; - AnonymousBodyRequestRequiredLiteralString requiredLiteralString = default; - AnonymousBodyRequestRequiredLiteralInt requiredLiteralInt = default; - AnonymousBodyRequestRequiredLiteralFloat requiredLiteralFloat = default; - bool requiredLiteralBool = default; - AnonymousBodyRequestOptionalLiteralString? optionalLiteralString = default; - AnonymousBodyRequestOptionalLiteralInt? optionalLiteralInt = default; - AnonymousBodyRequestOptionalLiteralFloat? optionalLiteralFloat = default; - bool? optionalLiteralBool = default; - string requiredBadDescription = default; - IList optionalNullableList = default; - IList requiredNullableList = default; - IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); - foreach (var prop in element.EnumerateObject()) - { - if (prop.NameEquals("name"u8)) - { - name = prop.Value.GetString(); - continue; - } - if (prop.NameEquals("requiredUnion"u8)) - { - requiredUnion = BinaryData.FromString(prop.Value.GetRawText()); - continue; - } - if (prop.NameEquals("requiredLiteralString"u8)) - { - requiredLiteralString = new AnonymousBodyRequestRequiredLiteralString(prop.Value.GetString()); - continue; - } - if (prop.NameEquals("requiredLiteralInt"u8)) - { - requiredLiteralInt = new AnonymousBodyRequestRequiredLiteralInt(prop.Value.GetInt32()); - continue; - } - if (prop.NameEquals("requiredLiteralFloat"u8)) - { - requiredLiteralFloat = new AnonymousBodyRequestRequiredLiteralFloat(prop.Value.GetSingle()); - continue; - } - if (prop.NameEquals("requiredLiteralBool"u8)) - { - requiredLiteralBool = prop.Value.GetBoolean(); - continue; - } - if (prop.NameEquals("optionalLiteralString"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - optionalLiteralString = null; - continue; - } - optionalLiteralString = new AnonymousBodyRequestOptionalLiteralString(prop.Value.GetString()); - continue; - } - if (prop.NameEquals("optionalLiteralInt"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - optionalLiteralInt = null; - continue; - } - optionalLiteralInt = new AnonymousBodyRequestOptionalLiteralInt(prop.Value.GetInt32()); - continue; - } - if (prop.NameEquals("optionalLiteralFloat"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - optionalLiteralFloat = null; - continue; - } - optionalLiteralFloat = new AnonymousBodyRequestOptionalLiteralFloat(prop.Value.GetSingle()); - continue; - } - if (prop.NameEquals("optionalLiteralBool"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - optionalLiteralBool = null; - continue; - } - optionalLiteralBool = prop.Value.GetBoolean(); - continue; - } - if (prop.NameEquals("requiredBadDescription"u8)) - { - requiredBadDescription = prop.Value.GetString(); - continue; - } - if (prop.NameEquals("optionalNullableList"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in prop.Value.EnumerateArray()) - { - array.Add(item.GetInt32()); - } - optionalNullableList = array; - continue; - } - if (prop.NameEquals("requiredNullableList"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - requiredNullableList = new ChangeTrackingList(); - continue; - } - List array = new List(); - foreach (var item in prop.Value.EnumerateArray()) - { - array.Add(item.GetInt32()); - } - requiredNullableList = array; - continue; - } - if (options.Format != "W") - { - additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); - } - } - return new AnonymousBodyRequest( - name, - requiredUnion, - requiredLiteralString, - requiredLiteralInt, - requiredLiteralFloat, - requiredLiteralBool, - optionalLiteralString, - optionalLiteralInt, - optionalLiteralFloat, - optionalLiteralBool, - requiredBadDescription, - optionalNullableList ?? new ChangeTrackingList(), - requiredNullableList, - additionalBinaryDataProperties); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); - - /// The client options for reading and writing models. - protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) - { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(AnonymousBodyRequest)} does not support writing '{options.Format}' format."); - } - } - - AnonymousBodyRequest IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); - - /// The data to parse. - /// The client options for reading and writing models. - protected virtual AnonymousBodyRequest PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) - { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - switch (format) - { - case "J": - using (JsonDocument document = JsonDocument.Parse(data)) - { - return DeserializeAnonymousBodyRequest(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(AnonymousBodyRequest)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - /// The to serialize into . - public static implicit operator BinaryContent(AnonymousBodyRequest anonymousBodyRequest) - { - return BinaryContent.Create(anonymousBodyRequest, ModelSerializationExtensions.WireOptions); - } - - /// The to deserialize the from. - public static explicit operator AnonymousBodyRequest(ClientResult result) - { - using PipelineResponse response = result.GetRawResponse(); - using JsonDocument document = JsonDocument.Parse(response.Content); - return DeserializeAnonymousBodyRequest(document.RootElement, ModelSerializationExtensions.WireOptions); - } - } -} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/AnonymousBodyRequest.cs b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/AnonymousBodyRequest.cs deleted file mode 100644 index fb15e8388940..000000000000 --- a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/AnonymousBodyRequest.cs +++ /dev/null @@ -1,129 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text.Json; -using BasicTypeSpec; - -namespace BasicTypeSpec.Models -{ - /// The AnonymousBodyRequest. - internal partial class AnonymousBodyRequest - { - /// Keeps track of any properties unknown to the library. - private protected IDictionary _additionalBinaryDataProperties; - - internal AnonymousBodyRequest(string name, BinaryData requiredUnion, string requiredBadDescription, IEnumerable requiredNullableList) - { - Name = name; - RequiredUnion = requiredUnion; - RequiredBadDescription = requiredBadDescription; - OptionalNullableList = new ChangeTrackingList(); - RequiredNullableList = requiredNullableList?.ToList(); - } - - internal AnonymousBodyRequest(string name, BinaryData requiredUnion, AnonymousBodyRequestRequiredLiteralString requiredLiteralString, AnonymousBodyRequestRequiredLiteralInt requiredLiteralInt, AnonymousBodyRequestRequiredLiteralFloat requiredLiteralFloat, bool requiredLiteralBool, AnonymousBodyRequestOptionalLiteralString? optionalLiteralString, AnonymousBodyRequestOptionalLiteralInt? optionalLiteralInt, AnonymousBodyRequestOptionalLiteralFloat? optionalLiteralFloat, bool? optionalLiteralBool, string requiredBadDescription, IList optionalNullableList, IList requiredNullableList, IDictionary additionalBinaryDataProperties) - { - Name = name; - RequiredUnion = requiredUnion; - RequiredLiteralString = requiredLiteralString; - RequiredLiteralInt = requiredLiteralInt; - RequiredLiteralFloat = requiredLiteralFloat; - RequiredLiteralBool = requiredLiteralBool; - OptionalLiteralString = optionalLiteralString; - OptionalLiteralInt = optionalLiteralInt; - OptionalLiteralFloat = optionalLiteralFloat; - OptionalLiteralBool = optionalLiteralBool; - RequiredBadDescription = requiredBadDescription; - OptionalNullableList = optionalNullableList; - RequiredNullableList = requiredNullableList; - _additionalBinaryDataProperties = additionalBinaryDataProperties; - } - - /// name of the Thing. - public string Name { get; set; } - - /// - /// required Union - /// To assign an object to this property use . - /// To assign an already formatted json string to this property use . - /// - /// - /// Supported types: - /// - /// - /// . - /// - /// - /// where T is of type . - /// - /// - /// . - /// - /// - /// - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo"). - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\""). - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }). - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}"). - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData RequiredUnion { get; set; } - - /// required literal string. - public AnonymousBodyRequestRequiredLiteralString RequiredLiteralString { get; } = "accept"; - - /// required literal int. - public AnonymousBodyRequestRequiredLiteralInt RequiredLiteralInt { get; } = 123; - - /// required literal float. - public AnonymousBodyRequestRequiredLiteralFloat RequiredLiteralFloat { get; } = 1.23F; - - /// required literal bool. - public bool RequiredLiteralBool { get; } = false; - - /// optional literal string. - public AnonymousBodyRequestOptionalLiteralString? OptionalLiteralString { get; set; } - - /// optional literal int. - public AnonymousBodyRequestOptionalLiteralInt? OptionalLiteralInt { get; set; } - - /// optional literal float. - public AnonymousBodyRequestOptionalLiteralFloat? OptionalLiteralFloat { get; set; } - - /// optional literal bool. - public bool? OptionalLiteralBool { get; set; } - - /// description with xml <|endoftext|>. - public string RequiredBadDescription { get; set; } - - /// optional nullable collection. - public IList OptionalNullableList { get; set; } - - /// required nullable collection. - public IList RequiredNullableList { get; set; } - } -} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/AnonymousBodyRequestOptionalLiteralFloat.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/AnonymousBodyRequestOptionalLiteralFloat.Serialization.cs deleted file mode 100644 index 8ce7df2648af..000000000000 --- a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/AnonymousBodyRequestOptionalLiteralFloat.Serialization.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace BasicTypeSpec.Models -{ - /// - public readonly partial struct AnonymousBodyRequestOptionalLiteralFloat - { - internal float ToSerialSingle() => _value; - } -} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/AnonymousBodyRequestOptionalLiteralFloat.cs b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/AnonymousBodyRequestOptionalLiteralFloat.cs deleted file mode 100644 index e93cd939069b..000000000000 --- a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/AnonymousBodyRequestOptionalLiteralFloat.cs +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; -using System.Globalization; - -namespace BasicTypeSpec.Models -{ - /// The AnonymousBodyRequest_optionalLiteralFloat. - public readonly partial struct AnonymousBodyRequestOptionalLiteralFloat : IEquatable - { - private readonly float _value; - /// 4.56. - private const float _456Value = 4.56F; - - /// Initializes a new instance of . - /// The value. - public AnonymousBodyRequestOptionalLiteralFloat(float value) - { - _value = value; - } - - /// 4.56. - public static AnonymousBodyRequestOptionalLiteralFloat _456 { get; } = new AnonymousBodyRequestOptionalLiteralFloat(_456Value); - - /// Determines if two values are the same. - /// The left value to compare. - /// The right value to compare. - public static bool operator ==(AnonymousBodyRequestOptionalLiteralFloat left, AnonymousBodyRequestOptionalLiteralFloat right) => left.Equals(right); - - /// Determines if two values are not the same. - /// The left value to compare. - /// The right value to compare. - public static bool operator !=(AnonymousBodyRequestOptionalLiteralFloat left, AnonymousBodyRequestOptionalLiteralFloat right) => !left.Equals(right); - - /// Converts a string to a . - /// The value. - public static implicit operator AnonymousBodyRequestOptionalLiteralFloat(float value) => new AnonymousBodyRequestOptionalLiteralFloat(value); - - /// The object to compare. - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is AnonymousBodyRequestOptionalLiteralFloat other && Equals(other); - - /// The instance to compare. - public bool Equals(AnonymousBodyRequestOptionalLiteralFloat other) => Equals(_value, other._value); - - /// - public override int GetHashCode() => _value.GetHashCode(); - - /// - public override string ToString() => _value.ToString(CultureInfo.InvariantCulture); - } -} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/AnonymousBodyRequestOptionalLiteralInt.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/AnonymousBodyRequestOptionalLiteralInt.Serialization.cs deleted file mode 100644 index 26bc9db6442f..000000000000 --- a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/AnonymousBodyRequestOptionalLiteralInt.Serialization.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace BasicTypeSpec.Models -{ - /// - public readonly partial struct AnonymousBodyRequestOptionalLiteralInt - { - internal int ToSerialInt32() => _value; - } -} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/AnonymousBodyRequestOptionalLiteralInt.cs b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/AnonymousBodyRequestOptionalLiteralInt.cs deleted file mode 100644 index 8ba0020b646c..000000000000 --- a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/AnonymousBodyRequestOptionalLiteralInt.cs +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; -using System.Globalization; - -namespace BasicTypeSpec.Models -{ - /// The AnonymousBodyRequest_optionalLiteralInt. - public readonly partial struct AnonymousBodyRequestOptionalLiteralInt : IEquatable - { - private readonly int _value; - /// 456. - private const int _456Value = 456; - - /// Initializes a new instance of . - /// The value. - public AnonymousBodyRequestOptionalLiteralInt(int value) - { - _value = value; - } - - /// 456. - public static AnonymousBodyRequestOptionalLiteralInt _456 { get; } = new AnonymousBodyRequestOptionalLiteralInt(_456Value); - - /// Determines if two values are the same. - /// The left value to compare. - /// The right value to compare. - public static bool operator ==(AnonymousBodyRequestOptionalLiteralInt left, AnonymousBodyRequestOptionalLiteralInt right) => left.Equals(right); - - /// Determines if two values are not the same. - /// The left value to compare. - /// The right value to compare. - public static bool operator !=(AnonymousBodyRequestOptionalLiteralInt left, AnonymousBodyRequestOptionalLiteralInt right) => !left.Equals(right); - - /// Converts a string to a . - /// The value. - public static implicit operator AnonymousBodyRequestOptionalLiteralInt(int value) => new AnonymousBodyRequestOptionalLiteralInt(value); - - /// The object to compare. - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is AnonymousBodyRequestOptionalLiteralInt other && Equals(other); - - /// The instance to compare. - public bool Equals(AnonymousBodyRequestOptionalLiteralInt other) => Equals(_value, other._value); - - /// - public override int GetHashCode() => _value.GetHashCode(); - - /// - public override string ToString() => _value.ToString(CultureInfo.InvariantCulture); - } -} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/AnonymousBodyRequestOptionalLiteralString.cs b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/AnonymousBodyRequestOptionalLiteralString.cs deleted file mode 100644 index d6f233d77790..000000000000 --- a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/AnonymousBodyRequestOptionalLiteralString.cs +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; -using BasicTypeSpec; - -namespace BasicTypeSpec.Models -{ - /// The AnonymousBodyRequest_optionalLiteralString. - public readonly partial struct AnonymousBodyRequestOptionalLiteralString : IEquatable - { - private readonly string _value; - /// reject. - private const string RejectValue = "reject"; - - /// Initializes a new instance of . - /// The value. - /// is null. - public AnonymousBodyRequestOptionalLiteralString(string value) - { - Argument.AssertNotNull(value, nameof(value)); - - _value = value; - } - - /// reject. - public static AnonymousBodyRequestOptionalLiteralString Reject { get; } = new AnonymousBodyRequestOptionalLiteralString(RejectValue); - - /// Determines if two values are the same. - /// The left value to compare. - /// The right value to compare. - public static bool operator ==(AnonymousBodyRequestOptionalLiteralString left, AnonymousBodyRequestOptionalLiteralString right) => left.Equals(right); - - /// Determines if two values are not the same. - /// The left value to compare. - /// The right value to compare. - public static bool operator !=(AnonymousBodyRequestOptionalLiteralString left, AnonymousBodyRequestOptionalLiteralString right) => !left.Equals(right); - - /// Converts a string to a . - /// The value. - public static implicit operator AnonymousBodyRequestOptionalLiteralString(string value) => new AnonymousBodyRequestOptionalLiteralString(value); - - /// The object to compare. - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is AnonymousBodyRequestOptionalLiteralString other && Equals(other); - - /// The instance to compare. - public bool Equals(AnonymousBodyRequestOptionalLiteralString other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - - /// - public override string ToString() => _value; - } -} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/AnonymousBodyRequestRequiredLiteralFloat.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/AnonymousBodyRequestRequiredLiteralFloat.Serialization.cs deleted file mode 100644 index 6d7720e0b124..000000000000 --- a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/AnonymousBodyRequestRequiredLiteralFloat.Serialization.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace BasicTypeSpec.Models -{ - /// - public readonly partial struct AnonymousBodyRequestRequiredLiteralFloat - { - internal float ToSerialSingle() => _value; - } -} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/AnonymousBodyRequestRequiredLiteralFloat.cs b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/AnonymousBodyRequestRequiredLiteralFloat.cs deleted file mode 100644 index 93afe618dc74..000000000000 --- a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/AnonymousBodyRequestRequiredLiteralFloat.cs +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; -using System.Globalization; - -namespace BasicTypeSpec.Models -{ - /// The AnonymousBodyRequest_requiredLiteralFloat. - public readonly partial struct AnonymousBodyRequestRequiredLiteralFloat : IEquatable - { - private readonly float _value; - /// 1.23. - private const float _123Value = 1.23F; - - /// Initializes a new instance of . - /// The value. - public AnonymousBodyRequestRequiredLiteralFloat(float value) - { - _value = value; - } - - /// 1.23. - public static AnonymousBodyRequestRequiredLiteralFloat _123 { get; } = new AnonymousBodyRequestRequiredLiteralFloat(_123Value); - - /// Determines if two values are the same. - /// The left value to compare. - /// The right value to compare. - public static bool operator ==(AnonymousBodyRequestRequiredLiteralFloat left, AnonymousBodyRequestRequiredLiteralFloat right) => left.Equals(right); - - /// Determines if two values are not the same. - /// The left value to compare. - /// The right value to compare. - public static bool operator !=(AnonymousBodyRequestRequiredLiteralFloat left, AnonymousBodyRequestRequiredLiteralFloat right) => !left.Equals(right); - - /// Converts a string to a . - /// The value. - public static implicit operator AnonymousBodyRequestRequiredLiteralFloat(float value) => new AnonymousBodyRequestRequiredLiteralFloat(value); - - /// The object to compare. - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is AnonymousBodyRequestRequiredLiteralFloat other && Equals(other); - - /// The instance to compare. - public bool Equals(AnonymousBodyRequestRequiredLiteralFloat other) => Equals(_value, other._value); - - /// - public override int GetHashCode() => _value.GetHashCode(); - - /// - public override string ToString() => _value.ToString(CultureInfo.InvariantCulture); - } -} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/AnonymousBodyRequestRequiredLiteralInt.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/AnonymousBodyRequestRequiredLiteralInt.Serialization.cs deleted file mode 100644 index d0f68bb34aec..000000000000 --- a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/AnonymousBodyRequestRequiredLiteralInt.Serialization.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace BasicTypeSpec.Models -{ - /// - public readonly partial struct AnonymousBodyRequestRequiredLiteralInt - { - internal int ToSerialInt32() => _value; - } -} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/AnonymousBodyRequestRequiredLiteralInt.cs b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/AnonymousBodyRequestRequiredLiteralInt.cs deleted file mode 100644 index 33b59e555b5f..000000000000 --- a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/AnonymousBodyRequestRequiredLiteralInt.cs +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; -using System.Globalization; - -namespace BasicTypeSpec.Models -{ - /// The AnonymousBodyRequest_requiredLiteralInt. - public readonly partial struct AnonymousBodyRequestRequiredLiteralInt : IEquatable - { - private readonly int _value; - /// 123. - private const int _123Value = 123; - - /// Initializes a new instance of . - /// The value. - public AnonymousBodyRequestRequiredLiteralInt(int value) - { - _value = value; - } - - /// 123. - public static AnonymousBodyRequestRequiredLiteralInt _123 { get; } = new AnonymousBodyRequestRequiredLiteralInt(_123Value); - - /// Determines if two values are the same. - /// The left value to compare. - /// The right value to compare. - public static bool operator ==(AnonymousBodyRequestRequiredLiteralInt left, AnonymousBodyRequestRequiredLiteralInt right) => left.Equals(right); - - /// Determines if two values are not the same. - /// The left value to compare. - /// The right value to compare. - public static bool operator !=(AnonymousBodyRequestRequiredLiteralInt left, AnonymousBodyRequestRequiredLiteralInt right) => !left.Equals(right); - - /// Converts a string to a . - /// The value. - public static implicit operator AnonymousBodyRequestRequiredLiteralInt(int value) => new AnonymousBodyRequestRequiredLiteralInt(value); - - /// The object to compare. - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is AnonymousBodyRequestRequiredLiteralInt other && Equals(other); - - /// The instance to compare. - public bool Equals(AnonymousBodyRequestRequiredLiteralInt other) => Equals(_value, other._value); - - /// - public override int GetHashCode() => _value.GetHashCode(); - - /// - public override string ToString() => _value.ToString(CultureInfo.InvariantCulture); - } -} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/AnonymousBodyRequestRequiredLiteralString.cs b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/AnonymousBodyRequestRequiredLiteralString.cs deleted file mode 100644 index 5a3e704e2d53..000000000000 --- a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/AnonymousBodyRequestRequiredLiteralString.cs +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; -using BasicTypeSpec; - -namespace BasicTypeSpec.Models -{ - /// The AnonymousBodyRequest_requiredLiteralString. - public readonly partial struct AnonymousBodyRequestRequiredLiteralString : IEquatable - { - private readonly string _value; - /// accept. - private const string AcceptValue = "accept"; - - /// Initializes a new instance of . - /// The value. - /// is null. - public AnonymousBodyRequestRequiredLiteralString(string value) - { - Argument.AssertNotNull(value, nameof(value)); - - _value = value; - } - - /// accept. - public static AnonymousBodyRequestRequiredLiteralString Accept { get; } = new AnonymousBodyRequestRequiredLiteralString(AcceptValue); - - /// Determines if two values are the same. - /// The left value to compare. - /// The right value to compare. - public static bool operator ==(AnonymousBodyRequestRequiredLiteralString left, AnonymousBodyRequestRequiredLiteralString right) => left.Equals(right); - - /// Determines if two values are not the same. - /// The left value to compare. - /// The right value to compare. - public static bool operator !=(AnonymousBodyRequestRequiredLiteralString left, AnonymousBodyRequestRequiredLiteralString right) => !left.Equals(right); - - /// Converts a string to a . - /// The value. - public static implicit operator AnonymousBodyRequestRequiredLiteralString(string value) => new AnonymousBodyRequestRequiredLiteralString(value); - - /// The object to compare. - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is AnonymousBodyRequestRequiredLiteralString other && Equals(other); - - /// The instance to compare. - public bool Equals(AnonymousBodyRequestRequiredLiteralString other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - - /// - public override string ToString() => _value; - } -} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/Friend.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/Friend.Serialization.cs index 7d1bd5d9d46a..f92833ee37f3 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/Friend.Serialization.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/Friend.Serialization.cs @@ -6,10 +6,11 @@ #nullable disable using System; -using System.ClientModel; using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using Azure; +using Azure.Core; using BasicTypeSpec; namespace BasicTypeSpec.Models @@ -130,16 +131,18 @@ protected virtual Friend PersistableModelCreateCore(BinaryData data, ModelReader string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - /// The to serialize into . - public static implicit operator BinaryContent(Friend friend) + /// The to serialize into . + public static implicit operator RequestContent(Friend friend) { - return BinaryContent.Create(friend, ModelSerializationExtensions.WireOptions); + Utf8JsonBinaryContent content = new Utf8JsonBinaryContent(); + content.JsonWriter.WriteObjectValue(friend, ModelSerializationExtensions.WireOptions); + return content; } - /// The to deserialize the from. - public static explicit operator Friend(ClientResult result) + /// The to deserialize the from. + public static explicit operator Friend(Response result) { - using PipelineResponse response = result.GetRawResponse(); + using Response response = result; using JsonDocument document = JsonDocument.Parse(response.Content); return DeserializeFriend(document.RootElement, ModelSerializationExtensions.WireOptions); } diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/Friend.cs b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/Friend.cs index ea7b538f4377..f1419a822a26 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/Friend.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/Friend.cs @@ -14,7 +14,7 @@ namespace BasicTypeSpec.Models public partial class Friend { /// Keeps track of any properties unknown to the library. - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal Friend(string name) { @@ -28,6 +28,6 @@ internal Friend(string name, IDictionary additionalBinaryDat } /// name of the NotFriend. - public string Name { get; set; } + public string Name { get; } } } diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/FriendlyModelRequest.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/FriendlyModelRequest.Serialization.cs deleted file mode 100644 index f1c15ec6c68d..000000000000 --- a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/FriendlyModelRequest.Serialization.cs +++ /dev/null @@ -1,147 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using BasicTypeSpec; - -namespace BasicTypeSpec.Models -{ - /// - internal partial class FriendlyModelRequest : IJsonModel - { - internal FriendlyModelRequest() - { - } - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(FriendlyModelRequest)} does not support writing '{format}' format."); - } - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - if (options.Format != "W" && _additionalBinaryDataProperties != null) - { - foreach (var item in _additionalBinaryDataProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - } - - FriendlyModelRequest IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); - - /// The JSON reader. - /// The client options for reading and writing models. - protected virtual FriendlyModelRequest JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(FriendlyModelRequest)} does not support reading '{format}' format."); - } - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeFriendlyModelRequest(document.RootElement, options); - } - - internal static FriendlyModelRequest DeserializeFriendlyModelRequest(JsonElement element, ModelReaderWriterOptions options) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string name = default; - IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); - foreach (var prop in element.EnumerateObject()) - { - if (prop.NameEquals("name"u8)) - { - name = prop.Value.GetString(); - continue; - } - if (options.Format != "W") - { - additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); - } - } - return new FriendlyModelRequest(name, additionalBinaryDataProperties); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); - - /// The client options for reading and writing models. - protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) - { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(FriendlyModelRequest)} does not support writing '{options.Format}' format."); - } - } - - FriendlyModelRequest IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); - - /// The data to parse. - /// The client options for reading and writing models. - protected virtual FriendlyModelRequest PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) - { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - switch (format) - { - case "J": - using (JsonDocument document = JsonDocument.Parse(data)) - { - return DeserializeFriendlyModelRequest(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(FriendlyModelRequest)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - /// The to serialize into . - public static implicit operator BinaryContent(FriendlyModelRequest friendlyModelRequest) - { - return BinaryContent.Create(friendlyModelRequest, ModelSerializationExtensions.WireOptions); - } - - /// The to deserialize the from. - public static explicit operator FriendlyModelRequest(ClientResult result) - { - using PipelineResponse response = result.GetRawResponse(); - using JsonDocument document = JsonDocument.Parse(response.Content); - return DeserializeFriendlyModelRequest(document.RootElement, ModelSerializationExtensions.WireOptions); - } - } -} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/FriendlyModelRequest.cs b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/FriendlyModelRequest.cs deleted file mode 100644 index 05277292620a..000000000000 --- a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/FriendlyModelRequest.cs +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace BasicTypeSpec.Models -{ - /// The FriendlyModelRequest. - internal partial class FriendlyModelRequest - { - /// Keeps track of any properties unknown to the library. - private protected IDictionary _additionalBinaryDataProperties; - - internal FriendlyModelRequest(string name) - { - Name = name; - } - - internal FriendlyModelRequest(string name, IDictionary additionalBinaryDataProperties) - { - Name = name; - _additionalBinaryDataProperties = additionalBinaryDataProperties; - } - - /// name of the NotFriend. - public string Name { get; set; } - } -} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/ModelWithRequiredNullableProperties.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/ModelWithRequiredNullableProperties.Serialization.cs index a84cef90e170..baa17dbaa1cb 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/ModelWithRequiredNullableProperties.Serialization.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/ModelWithRequiredNullableProperties.Serialization.cs @@ -6,10 +6,11 @@ #nullable disable using System; -using System.ClientModel; using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using Azure; +using Azure.Core; using BasicTypeSpec; namespace BasicTypeSpec.Models @@ -182,16 +183,18 @@ protected virtual ModelWithRequiredNullableProperties PersistableModelCreateCore string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - /// The to serialize into . - public static implicit operator BinaryContent(ModelWithRequiredNullableProperties modelWithRequiredNullableProperties) + /// The to serialize into . + public static implicit operator RequestContent(ModelWithRequiredNullableProperties modelWithRequiredNullableProperties) { - return BinaryContent.Create(modelWithRequiredNullableProperties, ModelSerializationExtensions.WireOptions); + Utf8JsonBinaryContent content = new Utf8JsonBinaryContent(); + content.JsonWriter.WriteObjectValue(modelWithRequiredNullableProperties, ModelSerializationExtensions.WireOptions); + return content; } - /// The to deserialize the from. - public static explicit operator ModelWithRequiredNullableProperties(ClientResult result) + /// The to deserialize the from. + public static explicit operator ModelWithRequiredNullableProperties(Response result) { - using PipelineResponse response = result.GetRawResponse(); + using Response response = result; using JsonDocument document = JsonDocument.Parse(response.Content); return DeserializeModelWithRequiredNullableProperties(document.RootElement, ModelSerializationExtensions.WireOptions); } diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/ModelWithRequiredNullableProperties.cs b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/ModelWithRequiredNullableProperties.cs index 3f743baad339..69afb469ca74 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/ModelWithRequiredNullableProperties.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/ModelWithRequiredNullableProperties.cs @@ -14,7 +14,7 @@ namespace BasicTypeSpec.Models public partial class ModelWithRequiredNullableProperties { /// Keeps track of any properties unknown to the library. - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; /// Initializes a new instance of . /// required nullable primitive type. diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/ProjectedModel.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/ProjectedModel.Serialization.cs index 519e2c3d1a94..75dc1aad68de 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/ProjectedModel.Serialization.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/ProjectedModel.Serialization.cs @@ -6,10 +6,11 @@ #nullable disable using System; -using System.ClientModel; using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using Azure; +using Azure.Core; using BasicTypeSpec; namespace BasicTypeSpec.Models @@ -130,16 +131,18 @@ protected virtual ProjectedModel PersistableModelCreateCore(BinaryData data, Mod string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - /// The to serialize into . - public static implicit operator BinaryContent(ProjectedModel projectedModel) + /// The to serialize into . + public static implicit operator RequestContent(ProjectedModel projectedModel) { - return BinaryContent.Create(projectedModel, ModelSerializationExtensions.WireOptions); + Utf8JsonBinaryContent content = new Utf8JsonBinaryContent(); + content.JsonWriter.WriteObjectValue(projectedModel, ModelSerializationExtensions.WireOptions); + return content; } - /// The to deserialize the from. - public static explicit operator ProjectedModel(ClientResult result) + /// The to deserialize the from. + public static explicit operator ProjectedModel(Response result) { - using PipelineResponse response = result.GetRawResponse(); + using Response response = result; using JsonDocument document = JsonDocument.Parse(response.Content); return DeserializeProjectedModel(document.RootElement, ModelSerializationExtensions.WireOptions); } diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/ProjectedModel.cs b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/ProjectedModel.cs index d9a5e5895d01..850a0dab8aa8 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/ProjectedModel.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/ProjectedModel.cs @@ -14,7 +14,7 @@ namespace BasicTypeSpec.Models public partial class ProjectedModel { /// Keeps track of any properties unknown to the library. - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal ProjectedModel(string name) { @@ -28,6 +28,6 @@ internal ProjectedModel(string name, IDictionary additionalB } /// name of the ModelWithProjectedName. - public string Name { get; set; } + public string Name { get; } } } diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/ProjectedNameModelRequest.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/ProjectedNameModelRequest.Serialization.cs deleted file mode 100644 index 246799949b78..000000000000 --- a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/ProjectedNameModelRequest.Serialization.cs +++ /dev/null @@ -1,147 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using BasicTypeSpec; - -namespace BasicTypeSpec.Models -{ - /// - internal partial class ProjectedNameModelRequest : IJsonModel - { - internal ProjectedNameModelRequest() - { - } - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ProjectedNameModelRequest)} does not support writing '{format}' format."); - } - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - if (options.Format != "W" && _additionalBinaryDataProperties != null) - { - foreach (var item in _additionalBinaryDataProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - } - - ProjectedNameModelRequest IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); - - /// The JSON reader. - /// The client options for reading and writing models. - protected virtual ProjectedNameModelRequest JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ProjectedNameModelRequest)} does not support reading '{format}' format."); - } - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeProjectedNameModelRequest(document.RootElement, options); - } - - internal static ProjectedNameModelRequest DeserializeProjectedNameModelRequest(JsonElement element, ModelReaderWriterOptions options) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string name = default; - IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); - foreach (var prop in element.EnumerateObject()) - { - if (prop.NameEquals("name"u8)) - { - name = prop.Value.GetString(); - continue; - } - if (options.Format != "W") - { - additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); - } - } - return new ProjectedNameModelRequest(name, additionalBinaryDataProperties); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); - - /// The client options for reading and writing models. - protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) - { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(ProjectedNameModelRequest)} does not support writing '{options.Format}' format."); - } - } - - ProjectedNameModelRequest IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); - - /// The data to parse. - /// The client options for reading and writing models. - protected virtual ProjectedNameModelRequest PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) - { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - switch (format) - { - case "J": - using (JsonDocument document = JsonDocument.Parse(data)) - { - return DeserializeProjectedNameModelRequest(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ProjectedNameModelRequest)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - /// The to serialize into . - public static implicit operator BinaryContent(ProjectedNameModelRequest projectedNameModelRequest) - { - return BinaryContent.Create(projectedNameModelRequest, ModelSerializationExtensions.WireOptions); - } - - /// The to deserialize the from. - public static explicit operator ProjectedNameModelRequest(ClientResult result) - { - using PipelineResponse response = result.GetRawResponse(); - using JsonDocument document = JsonDocument.Parse(response.Content); - return DeserializeProjectedNameModelRequest(document.RootElement, ModelSerializationExtensions.WireOptions); - } - } -} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/ProjectedNameModelRequest.cs b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/ProjectedNameModelRequest.cs deleted file mode 100644 index 21f8f0ba9678..000000000000 --- a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/ProjectedNameModelRequest.cs +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace BasicTypeSpec.Models -{ - /// The ProjectedNameModelRequest. - internal partial class ProjectedNameModelRequest - { - /// Keeps track of any properties unknown to the library. - private protected IDictionary _additionalBinaryDataProperties; - - internal ProjectedNameModelRequest(string name) - { - Name = name; - } - - internal ProjectedNameModelRequest(string name, IDictionary additionalBinaryDataProperties) - { - Name = name; - _additionalBinaryDataProperties = additionalBinaryDataProperties; - } - - /// name of the ModelWithProjectedName. - public string Name { get; set; } - } -} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/ReturnsAnonymousModelResponse.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/ReturnsAnonymousModelResponse.Serialization.cs index 3bcdfe6ccf29..092802278552 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/ReturnsAnonymousModelResponse.Serialization.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/ReturnsAnonymousModelResponse.Serialization.cs @@ -6,10 +6,11 @@ #nullable disable using System; -using System.ClientModel; using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using Azure; +using Azure.Core; using BasicTypeSpec; namespace BasicTypeSpec.Models @@ -118,16 +119,18 @@ protected virtual ReturnsAnonymousModelResponse PersistableModelCreateCore(Binar string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - /// The to serialize into . - public static implicit operator BinaryContent(ReturnsAnonymousModelResponse returnsAnonymousModelResponse) + /// The to serialize into . + public static implicit operator RequestContent(ReturnsAnonymousModelResponse returnsAnonymousModelResponse) { - return BinaryContent.Create(returnsAnonymousModelResponse, ModelSerializationExtensions.WireOptions); + Utf8JsonBinaryContent content = new Utf8JsonBinaryContent(); + content.JsonWriter.WriteObjectValue(returnsAnonymousModelResponse, ModelSerializationExtensions.WireOptions); + return content; } - /// The to deserialize the from. - public static explicit operator ReturnsAnonymousModelResponse(ClientResult result) + /// The to deserialize the from. + public static explicit operator ReturnsAnonymousModelResponse(Response result) { - using PipelineResponse response = result.GetRawResponse(); + using Response response = result; using JsonDocument document = JsonDocument.Parse(response.Content); return DeserializeReturnsAnonymousModelResponse(document.RootElement, ModelSerializationExtensions.WireOptions); } diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/ReturnsAnonymousModelResponse.cs b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/ReturnsAnonymousModelResponse.cs index 68974991df3d..54125976ebc3 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/ReturnsAnonymousModelResponse.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/ReturnsAnonymousModelResponse.cs @@ -14,7 +14,7 @@ namespace BasicTypeSpec.Models public partial class ReturnsAnonymousModelResponse { /// Keeps track of any properties unknown to the library. - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; internal ReturnsAnonymousModelResponse() { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/RoundTripModel.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/RoundTripModel.Serialization.cs index 94a684ae8ed2..62467f32c0fe 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/RoundTripModel.Serialization.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/RoundTripModel.Serialization.cs @@ -6,10 +6,11 @@ #nullable disable using System; -using System.ClientModel; using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using Azure; +using Azure.Core; using BasicTypeSpec; namespace BasicTypeSpec.Models @@ -43,7 +44,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNumberValue(RequiredInt); writer.WritePropertyName("requiredCollection"u8); writer.WriteStartArray(); - foreach (var item in RequiredCollection) + foreach (StringFixedEnum item in RequiredCollection) { writer.WriteStringValue(item.ToSerialString()); } @@ -67,7 +68,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { writer.WritePropertyName("intExtensibleEnumCollection"u8); writer.WriteStartArray(); - foreach (var item in IntExtensibleEnumCollection) + foreach (IntExtensibleEnum item in IntExtensibleEnumCollection) { writer.WriteNumberValue(item.ToSerialInt32()); } @@ -87,7 +88,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { writer.WritePropertyName("floatExtensibleEnumCollection"u8); writer.WriteStartArray(); - foreach (var item in FloatExtensibleEnumCollection) + foreach (FloatExtensibleEnum item in FloatExtensibleEnumCollection) { writer.WriteNumberValue(item.ToSerialSingle()); } @@ -107,7 +108,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { writer.WritePropertyName("floatFixedEnumCollection"u8); writer.WriteStartArray(); - foreach (var item in FloatFixedEnumCollection) + foreach (FloatFixedEnum item in FloatFixedEnumCollection) { writer.WriteNumberValue(item.ToSerialSingle()); } @@ -122,7 +123,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { writer.WritePropertyName("intFixedEnumCollection"u8); writer.WriteStartArray(); - foreach (var item in IntFixedEnumCollection) + foreach (IntFixedEnum item in IntFixedEnumCollection) { writer.WriteNumberValue((int)item); } @@ -643,16 +644,18 @@ protected virtual RoundTripModel PersistableModelCreateCore(BinaryData data, Mod string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - /// The to serialize into . - public static implicit operator BinaryContent(RoundTripModel roundTripModel) + /// The to serialize into . + public static implicit operator RequestContent(RoundTripModel roundTripModel) { - return BinaryContent.Create(roundTripModel, ModelSerializationExtensions.WireOptions); + Utf8JsonBinaryContent content = new Utf8JsonBinaryContent(); + content.JsonWriter.WriteObjectValue(roundTripModel, ModelSerializationExtensions.WireOptions); + return content; } - /// The to deserialize the from. - public static explicit operator RoundTripModel(ClientResult result) + /// The to deserialize the from. + public static explicit operator RoundTripModel(Response result) { - using PipelineResponse response = result.GetRawResponse(); + using Response response = result; using JsonDocument document = JsonDocument.Parse(response.Content); return DeserializeRoundTripModel(document.RootElement, ModelSerializationExtensions.WireOptions); } diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/RoundTripModel.cs b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/RoundTripModel.cs index 771f0b16040e..3f660931d13c 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/RoundTripModel.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/RoundTripModel.cs @@ -17,7 +17,7 @@ namespace BasicTypeSpec.Models public partial class RoundTripModel { /// Keeps track of any properties unknown to the library. - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; /// Initializes a new instance of . /// Required string, illustrating a reference type property. diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/Thing.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/Thing.Serialization.cs index f12038ab30d4..c473fa19a5fa 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/Thing.Serialization.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/Thing.Serialization.cs @@ -6,10 +6,11 @@ #nullable disable using System; -using System.ClientModel; using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; +using Azure; +using Azure.Core; using BasicTypeSpec; namespace BasicTypeSpec.Models @@ -84,7 +85,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { writer.WritePropertyName("optionalNullableList"u8); writer.WriteStartArray(); - foreach (var item in OptionalNullableList) + foreach (int item in OptionalNullableList) { writer.WriteNumberValue(item); } @@ -99,7 +100,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { writer.WritePropertyName("requiredNullableList"u8); writer.WriteStartArray(); - foreach (var item in RequiredNullableList) + foreach (int item in RequiredNullableList) { writer.WriteNumberValue(item); } @@ -325,16 +326,18 @@ protected virtual Thing PersistableModelCreateCore(BinaryData data, ModelReaderW string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - /// The to serialize into . - public static implicit operator BinaryContent(Thing thing) + /// The to serialize into . + public static implicit operator RequestContent(Thing thing) { - return BinaryContent.Create(thing, ModelSerializationExtensions.WireOptions); + Utf8JsonBinaryContent content = new Utf8JsonBinaryContent(); + content.JsonWriter.WriteObjectValue(thing, ModelSerializationExtensions.WireOptions); + return content; } - /// The to deserialize the from. - public static explicit operator Thing(ClientResult result) + /// The to deserialize the from. + public static explicit operator Thing(Response result) { - using PipelineResponse response = result.GetRawResponse(); + using Response response = result; using JsonDocument document = JsonDocument.Parse(response.Content); return DeserializeThing(document.RootElement, ModelSerializationExtensions.WireOptions); } diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/Thing.cs b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/Thing.cs index c35fd826366e..62e0c73a58db 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/Thing.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/Thing.cs @@ -17,7 +17,7 @@ namespace BasicTypeSpec.Models public partial class Thing { /// Keeps track of any properties unknown to the library. - private protected IDictionary _additionalBinaryDataProperties; + private protected readonly IDictionary _additionalBinaryDataProperties; /// Initializes a new instance of . /// name of the Thing. diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/tspCodeModel.json index 78b829116302..ff55ddfccd66 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/tspCodeModel.json @@ -36,7 +36,7 @@ "description": "The Thing_requiredLiteralString", "isFixed": false, "isFlags": false, - "usage": "Input,Output,Json", + "usage": "Input,Output,Spread,Json", "decorators": [] }, { @@ -69,7 +69,7 @@ "description": "The Thing_requiredLiteralInt", "isFixed": false, "isFlags": false, - "usage": "Input,Output,Json", + "usage": "Input,Output,Spread,Json", "decorators": [] }, { @@ -102,7 +102,7 @@ "description": "The Thing_requiredLiteralFloat", "isFixed": false, "isFlags": false, - "usage": "Input,Output,Json", + "usage": "Input,Output,Spread,Json", "decorators": [] }, { @@ -135,7 +135,7 @@ "description": "The Thing_optionalLiteralString", "isFixed": false, "isFlags": false, - "usage": "Input,Output,Json", + "usage": "Input,Output,Spread,Json", "decorators": [] }, { @@ -168,7 +168,7 @@ "description": "The Thing_optionalLiteralInt", "isFixed": false, "isFlags": false, - "usage": "Input,Output,Json", + "usage": "Input,Output,Spread,Json", "decorators": [] }, { @@ -201,7 +201,7 @@ "description": "The Thing_optionalLiteralFloat", "isFixed": false, "isFlags": false, - "usage": "Input,Output,Json", + "usage": "Input,Output,Spread,Json", "decorators": [] }, { @@ -775,208 +775,10 @@ { "$id": "84", "kind": "enum", - "name": "AnonymousBodyRequest_requiredLiteralString", - "valueType": { - "$id": "85", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "86", - "kind": "enumvalue", - "name": "accept", - "value": "accept", - "description": "accept", - "valueType": { - "$ref": "85" - }, - "enumType": { - "$ref": "84" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The AnonymousBodyRequest_requiredLiteralString", - "isFixed": false, - "isFlags": false, - "usage": "Spread,Json", - "decorators": [] - }, - { - "$id": "87", - "kind": "enum", - "name": "AnonymousBodyRequest_requiredLiteralInt", - "valueType": { - "$id": "88", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "values": [ - { - "$id": "89", - "kind": "enumvalue", - "name": "123", - "value": 123, - "description": "123", - "valueType": { - "$ref": "88" - }, - "enumType": { - "$ref": "87" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The AnonymousBodyRequest_requiredLiteralInt", - "isFixed": false, - "isFlags": false, - "usage": "Spread,Json", - "decorators": [] - }, - { - "$id": "90", - "kind": "enum", - "name": "AnonymousBodyRequest_requiredLiteralFloat", - "valueType": { - "$id": "91", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "values": [ - { - "$id": "92", - "kind": "enumvalue", - "name": "1.23", - "value": 1.23, - "description": "1.23", - "valueType": { - "$ref": "91" - }, - "enumType": { - "$ref": "90" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The AnonymousBodyRequest_requiredLiteralFloat", - "isFixed": false, - "isFlags": false, - "usage": "Spread,Json", - "decorators": [] - }, - { - "$id": "93", - "kind": "enum", - "name": "AnonymousBodyRequest_optionalLiteralString", - "valueType": { - "$id": "94", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "95", - "kind": "enumvalue", - "name": "reject", - "value": "reject", - "description": "reject", - "valueType": { - "$ref": "94" - }, - "enumType": { - "$ref": "93" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The AnonymousBodyRequest_optionalLiteralString", - "isFixed": false, - "isFlags": false, - "usage": "Spread,Json", - "decorators": [] - }, - { - "$id": "96", - "kind": "enum", - "name": "AnonymousBodyRequest_optionalLiteralInt", - "valueType": { - "$id": "97", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "values": [ - { - "$id": "98", - "kind": "enumvalue", - "name": "456", - "value": 456, - "description": "456", - "valueType": { - "$ref": "97" - }, - "enumType": { - "$ref": "96" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The AnonymousBodyRequest_optionalLiteralInt", - "isFixed": false, - "isFlags": false, - "usage": "Spread,Json", - "decorators": [] - }, - { - "$id": "99", - "kind": "enum", - "name": "AnonymousBodyRequest_optionalLiteralFloat", - "valueType": { - "$id": "100", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "values": [ - { - "$id": "101", - "kind": "enumvalue", - "name": "4.56", - "value": 4.56, - "description": "4.56", - "valueType": { - "$ref": "100" - }, - "enumType": { - "$ref": "99" - } - } - ], - "crossLanguageDefinitionId": "", - "description": "The AnonymousBodyRequest_optionalLiteralFloat", - "isFixed": false, - "isFlags": false, - "usage": "Spread,Json", - "decorators": [] - }, - { - "$id": "102", - "kind": "enum", "name": "Versions", "crossLanguageDefinitionId": "BasicTypeSpec.Versions", "valueType": { - "$id": "103", + "$id": "85", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -984,36 +786,36 @@ }, "values": [ { - "$id": "104", + "$id": "86", "kind": "enumvalue", "name": "2024-07-16-preview", "value": "2024-07-16-preview", "valueType": { - "$id": "105", + "$id": "87", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "102" + "$ref": "84" }, "decorators": [] }, { - "$id": "106", + "$id": "88", "kind": "enumvalue", "name": "2024-08-16-preview", "value": "2024-08-16-preview", "valueType": { - "$id": "107", + "$id": "89", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "102" + "$ref": "84" }, "decorators": [] } @@ -1026,22 +828,22 @@ ], "Models": [ { - "$id": "108", + "$id": "90", "kind": "model", "name": "Thing", "crossLanguageDefinitionId": "BasicTypeSpec.Thing", - "usage": "Input,Output,Json", + "usage": "Input,Output,Spread,Json", "description": "A model with a few properties of literal types", "decorators": [], "properties": [ { - "$id": "109", + "$id": "91", "kind": "property", "name": "name", "serializedName": "name", "description": "name of the Thing", "type": { - "$id": "110", + "$id": "92", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1050,33 +852,34 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "BasicTypeSpec.Thing.name" }, { - "$id": "111", + "$id": "93", "kind": "property", "name": "requiredUnion", "serializedName": "requiredUnion", "description": "required Union", "type": { - "$id": "112", + "$id": "94", "kind": "union", "name": "ThingRequiredUnion", "variantTypes": [ { - "$id": "113", + "$id": "95", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, { - "$id": "114", + "$id": "96", "kind": "array", "name": "Array", "valueType": { - "$id": "115", + "$id": "97", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1086,7 +889,7 @@ "decorators": [] }, { - "$id": "116", + "$id": "98", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -1098,17 +901,18 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "BasicTypeSpec.Thing.requiredUnion" }, { - "$id": "117", + "$id": "99", "kind": "property", "name": "requiredLiteralString", "serializedName": "requiredLiteralString", "description": "required literal string", "type": { - "$id": "118", + "$id": "100", "kind": "constant", "valueType": { "$ref": "2" @@ -1119,17 +923,18 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "BasicTypeSpec.Thing.requiredLiteralString" }, { - "$id": "119", + "$id": "101", "kind": "property", "name": "requiredLiteralInt", "serializedName": "requiredLiteralInt", "description": "required literal int", "type": { - "$id": "120", + "$id": "102", "kind": "constant", "valueType": { "$ref": "5" @@ -1140,17 +945,18 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "BasicTypeSpec.Thing.requiredLiteralInt" }, { - "$id": "121", + "$id": "103", "kind": "property", "name": "requiredLiteralFloat", "serializedName": "requiredLiteralFloat", "description": "required literal float", "type": { - "$id": "122", + "$id": "104", "kind": "constant", "valueType": { "$ref": "8" @@ -1161,20 +967,21 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "BasicTypeSpec.Thing.requiredLiteralFloat" }, { - "$id": "123", + "$id": "105", "kind": "property", "name": "requiredLiteralBool", "serializedName": "requiredLiteralBool", "description": "required literal bool", "type": { - "$id": "124", + "$id": "106", "kind": "constant", "valueType": { - "$id": "125", + "$id": "107", "kind": "boolean", "name": "boolean", "crossLanguageDefinitionId": "TypeSpec.boolean", @@ -1186,17 +993,18 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "BasicTypeSpec.Thing.requiredLiteralBool" }, { - "$id": "126", + "$id": "108", "kind": "property", "name": "optionalLiteralString", "serializedName": "optionalLiteralString", "description": "optional literal string", "type": { - "$id": "127", + "$id": "109", "kind": "constant", "valueType": { "$ref": "11" @@ -1207,17 +1015,18 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "BasicTypeSpec.Thing.optionalLiteralString" }, { - "$id": "128", + "$id": "110", "kind": "property", "name": "optionalLiteralInt", "serializedName": "optionalLiteralInt", "description": "optional literal int", "type": { - "$id": "129", + "$id": "111", "kind": "constant", "valueType": { "$ref": "14" @@ -1228,17 +1037,18 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "BasicTypeSpec.Thing.optionalLiteralInt" }, { - "$id": "130", + "$id": "112", "kind": "property", "name": "optionalLiteralFloat", "serializedName": "optionalLiteralFloat", "description": "optional literal float", "type": { - "$id": "131", + "$id": "113", "kind": "constant", "valueType": { "$ref": "17" @@ -1249,20 +1059,21 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "BasicTypeSpec.Thing.optionalLiteralFloat" }, { - "$id": "132", + "$id": "114", "kind": "property", "name": "optionalLiteralBool", "serializedName": "optionalLiteralBool", "description": "optional literal bool", "type": { - "$id": "133", + "$id": "115", "kind": "constant", "valueType": { - "$id": "134", + "$id": "116", "kind": "boolean", "name": "boolean", "crossLanguageDefinitionId": "TypeSpec.boolean", @@ -1274,17 +1085,18 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "BasicTypeSpec.Thing.optionalLiteralBool" }, { - "$id": "135", + "$id": "117", "kind": "property", "name": "requiredBadDescription", "serializedName": "requiredBadDescription", "description": "description with xml <|endoftext|>", "type": { - "$id": "136", + "$id": "118", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1293,24 +1105,25 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "BasicTypeSpec.Thing.requiredBadDescription" }, { - "$id": "137", + "$id": "119", "kind": "property", "name": "optionalNullableList", "serializedName": "optionalNullableList", "description": "optional nullable collection", "type": { - "$id": "138", + "$id": "120", "kind": "nullable", "type": { - "$id": "139", + "$id": "121", "kind": "array", "name": "Array", "valueType": { - "$id": "140", + "$id": "122", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -1323,24 +1136,25 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "BasicTypeSpec.Thing.optionalNullableList" }, { - "$id": "141", + "$id": "123", "kind": "property", "name": "requiredNullableList", "serializedName": "requiredNullableList", "description": "required nullable collection", "type": { - "$id": "142", + "$id": "124", "kind": "nullable", "type": { - "$id": "143", + "$id": "125", "kind": "array", "name": "Array", "valueType": { - "$id": "144", + "$id": "126", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -1353,13 +1167,14 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "BasicTypeSpec.Thing.requiredNullableList" } ] }, { - "$id": "145", + "$id": "127", "kind": "model", "name": "RoundTripModel", "crossLanguageDefinitionId": "BasicTypeSpec.RoundTripModel", @@ -1368,13 +1183,13 @@ "decorators": [], "properties": [ { - "$id": "146", + "$id": "128", "kind": "property", "name": "requiredString", "serializedName": "requiredString", "description": "Required string, illustrating a reference type property.", "type": { - "$id": "147", + "$id": "129", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1383,17 +1198,18 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "BasicTypeSpec.RoundTripModel.requiredString" }, { - "$id": "148", + "$id": "130", "kind": "property", "name": "requiredInt", "serializedName": "requiredInt", "description": "Required int, illustrating a value type property.", "type": { - "$id": "149", + "$id": "131", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -1402,17 +1218,18 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "BasicTypeSpec.RoundTripModel.requiredInt" }, { - "$id": "150", + "$id": "132", "kind": "property", "name": "requiredCollection", "serializedName": "requiredCollection", "description": "Required collection of enums", "type": { - "$id": "151", + "$id": "133", "kind": "array", "name": "ArrayStringFixedEnum", "valueType": { @@ -1424,20 +1241,21 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "BasicTypeSpec.RoundTripModel.requiredCollection" }, { - "$id": "152", + "$id": "134", "kind": "property", "name": "requiredDictionary", "serializedName": "requiredDictionary", "description": "Required dictionary of enums", "type": { - "$id": "153", + "$id": "135", "kind": "dict", "keyType": { - "$id": "154", + "$id": "136", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1451,26 +1269,28 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "BasicTypeSpec.RoundTripModel.requiredDictionary" }, { - "$id": "155", + "$id": "137", "kind": "property", "name": "requiredModel", "serializedName": "requiredModel", "description": "Required model", "type": { - "$ref": "108" + "$ref": "90" }, "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "BasicTypeSpec.RoundTripModel.requiredModel" }, { - "$id": "156", + "$id": "138", "kind": "property", "name": "intExtensibleEnum", "serializedName": "intExtensibleEnum", @@ -1481,17 +1301,18 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "BasicTypeSpec.RoundTripModel.intExtensibleEnum" }, { - "$id": "157", + "$id": "139", "kind": "property", "name": "intExtensibleEnumCollection", "serializedName": "intExtensibleEnumCollection", "description": "this is a collection of int based extensible enum", "type": { - "$id": "158", + "$id": "140", "kind": "array", "name": "ArrayIntExtensibleEnum", "valueType": { @@ -1503,11 +1324,12 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "BasicTypeSpec.RoundTripModel.intExtensibleEnumCollection" }, { - "$id": "159", + "$id": "141", "kind": "property", "name": "floatExtensibleEnum", "serializedName": "floatExtensibleEnum", @@ -1518,11 +1340,12 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "BasicTypeSpec.RoundTripModel.floatExtensibleEnum" }, { - "$id": "160", + "$id": "142", "kind": "property", "name": "floatExtensibleEnumWithIntValue", "serializedName": "floatExtensibleEnumWithIntValue", @@ -1533,17 +1356,18 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "BasicTypeSpec.RoundTripModel.floatExtensibleEnumWithIntValue" }, { - "$id": "161", + "$id": "143", "kind": "property", "name": "floatExtensibleEnumCollection", "serializedName": "floatExtensibleEnumCollection", "description": "this is a collection of float based extensible enum", "type": { - "$id": "162", + "$id": "144", "kind": "array", "name": "ArrayFloatExtensibleEnum", "valueType": { @@ -1555,11 +1379,12 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "BasicTypeSpec.RoundTripModel.floatExtensibleEnumCollection" }, { - "$id": "163", + "$id": "145", "kind": "property", "name": "floatFixedEnum", "serializedName": "floatFixedEnum", @@ -1570,11 +1395,12 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "BasicTypeSpec.RoundTripModel.floatFixedEnum" }, { - "$id": "164", + "$id": "146", "kind": "property", "name": "floatFixedEnumWithIntValue", "serializedName": "floatFixedEnumWithIntValue", @@ -1585,17 +1411,18 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "BasicTypeSpec.RoundTripModel.floatFixedEnumWithIntValue" }, { - "$id": "165", + "$id": "147", "kind": "property", "name": "floatFixedEnumCollection", "serializedName": "floatFixedEnumCollection", "description": "this is a collection of float based fixed enum", "type": { - "$id": "166", + "$id": "148", "kind": "array", "name": "ArrayFloatFixedEnum", "valueType": { @@ -1607,11 +1434,12 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "BasicTypeSpec.RoundTripModel.floatFixedEnumCollection" }, { - "$id": "167", + "$id": "149", "kind": "property", "name": "intFixedEnum", "serializedName": "intFixedEnum", @@ -1622,17 +1450,18 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "BasicTypeSpec.RoundTripModel.intFixedEnum" }, { - "$id": "168", + "$id": "150", "kind": "property", "name": "intFixedEnumCollection", "serializedName": "intFixedEnumCollection", "description": "this is a collection of int based fixed enum", "type": { - "$id": "169", + "$id": "151", "kind": "array", "name": "ArrayIntFixedEnum", "valueType": { @@ -1644,11 +1473,12 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "BasicTypeSpec.RoundTripModel.intFixedEnumCollection" }, { - "$id": "170", + "$id": "152", "kind": "property", "name": "stringFixedEnum", "serializedName": "stringFixedEnum", @@ -1659,18 +1489,19 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "BasicTypeSpec.RoundTripModel.stringFixedEnum" }, { - "$id": "171", + "$id": "153", "kind": "property", "name": "requiredUnknown", "serializedName": "requiredUnknown", "description": "required unknown", "type": { - "$id": "172", - "kind": "any", + "$id": "154", + "kind": "unknown", "name": "unknown", "crossLanguageDefinitionId": "", "decorators": [] @@ -1678,18 +1509,19 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "BasicTypeSpec.RoundTripModel.requiredUnknown" }, { - "$id": "173", + "$id": "155", "kind": "property", "name": "optionalUnknown", "serializedName": "optionalUnknown", "description": "optional unknown", "type": { - "$id": "174", - "kind": "any", + "$id": "156", + "kind": "unknown", "name": "unknown", "crossLanguageDefinitionId": "", "decorators": [] @@ -1697,28 +1529,29 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "BasicTypeSpec.RoundTripModel.optionalUnknown" }, { - "$id": "175", + "$id": "157", "kind": "property", "name": "requiredRecordUnknown", "serializedName": "requiredRecordUnknown", "description": "required record of unknown", "type": { - "$id": "176", + "$id": "158", "kind": "dict", "keyType": { - "$id": "177", + "$id": "159", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$id": "178", - "kind": "any", + "$id": "160", + "kind": "unknown", "name": "unknown", "crossLanguageDefinitionId": "", "decorators": [] @@ -1728,589 +1561,237 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], - "crossLanguageDefinitionId": "BasicTypeSpec.RoundTripModel.requiredRecordUnknown" - }, - { - "$id": "179", - "kind": "property", - "name": "optionalRecordUnknown", - "serializedName": "optionalRecordUnknown", - "description": "optional record of unknown", - "type": { - "$id": "180", - "kind": "dict", - "keyType": { - "$id": "181", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "valueType": { - "$id": "182", - "kind": "any", - "name": "unknown", - "crossLanguageDefinitionId": "", - "decorators": [] - }, - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "BasicTypeSpec.RoundTripModel.optionalRecordUnknown" - }, - { - "$id": "183", - "kind": "property", - "name": "readOnlyRequiredRecordUnknown", - "serializedName": "readOnlyRequiredRecordUnknown", - "description": "required readonly record of unknown", - "type": { - "$id": "184", - "kind": "dict", - "keyType": { - "$id": "185", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "valueType": { - "$id": "186", - "kind": "any", - "name": "unknown", - "crossLanguageDefinitionId": "", - "decorators": [] - }, - "decorators": [] - }, - "optional": false, - "readOnly": true, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "BasicTypeSpec.RoundTripModel.readOnlyRequiredRecordUnknown" - }, - { - "$id": "187", - "kind": "property", - "name": "readOnlyOptionalRecordUnknown", - "serializedName": "readOnlyOptionalRecordUnknown", - "description": "optional readonly record of unknown", - "type": { - "$id": "188", - "kind": "dict", - "keyType": { - "$id": "189", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "valueType": { - "$id": "190", - "kind": "any", - "name": "unknown", - "crossLanguageDefinitionId": "", - "decorators": [] - }, - "decorators": [] - }, - "optional": true, - "readOnly": true, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "BasicTypeSpec.RoundTripModel.readOnlyOptionalRecordUnknown" - }, - { - "$id": "191", - "kind": "property", - "name": "modelWithRequiredNullable", - "serializedName": "modelWithRequiredNullable", - "description": "this is a model with required nullable properties", - "type": { - "$id": "192", - "kind": "model", - "name": "ModelWithRequiredNullableProperties", - "crossLanguageDefinitionId": "BasicTypeSpec.ModelWithRequiredNullableProperties", - "usage": "Input,Output,Json", - "description": "A model with a few required nullable properties", - "decorators": [], - "properties": [ - { - "$id": "193", - "kind": "property", - "name": "requiredNullablePrimitive", - "serializedName": "requiredNullablePrimitive", - "description": "required nullable primitive type", - "type": { - "$id": "194", - "kind": "nullable", - "type": { - "$id": "195", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "BasicTypeSpec.ModelWithRequiredNullableProperties.requiredNullablePrimitive" - }, - { - "$id": "196", - "kind": "property", - "name": "requiredExtensibleEnum", - "serializedName": "requiredExtensibleEnum", - "description": "required nullable extensible enum type", - "type": { - "$id": "197", - "kind": "nullable", - "type": { - "$ref": "28" - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "BasicTypeSpec.ModelWithRequiredNullableProperties.requiredExtensibleEnum" - }, - { - "$id": "198", - "kind": "property", - "name": "requiredFixedEnum", - "serializedName": "requiredFixedEnum", - "description": "required nullable fixed enum type", - "type": { - "$id": "199", - "kind": "nullable", - "type": { - "$ref": "20" - } - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "BasicTypeSpec.ModelWithRequiredNullableProperties.requiredFixedEnum" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "BasicTypeSpec.RoundTripModel.modelWithRequiredNullable" - }, - { - "$id": "200", - "kind": "property", - "name": "requiredBytes", - "serializedName": "requiredBytes", - "description": "Required bytes", - "type": { - "$id": "201", - "kind": "bytes", - "name": "bytes", - "encode": "base64", - "crossLanguageDefinitionId": "TypeSpec.bytes", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "BasicTypeSpec.RoundTripModel.requiredBytes" - } - ] - }, - { - "$ref": "192" - }, - { - "$id": "202", - "kind": "model", - "name": "AnonymousBodyRequest", - "crossLanguageDefinitionId": "BasicTypeSpec.anonymousBody.Request.anonymous", - "usage": "Spread,Json", - "decorators": [], - "properties": [ - { - "$id": "203", - "kind": "property", - "name": "name", - "serializedName": "name", - "description": "name of the Thing", - "type": { - "$id": "204", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "BasicTypeSpec.anonymousBody.Request.anonymous.name" - }, - { - "$id": "205", - "kind": "property", - "name": "requiredUnion", - "serializedName": "requiredUnion", - "description": "required Union", - "type": { - "$id": "206", - "kind": "union", - "name": "ThingRequiredUnion", - "variantTypes": [ - { - "$id": "207", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - { - "$id": "208", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "209", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - { - "$id": "210", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - } - ], - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "BasicTypeSpec.anonymousBody.Request.anonymous.requiredUnion" - }, - { - "$id": "211", - "kind": "property", - "name": "requiredLiteralString", - "serializedName": "requiredLiteralString", - "description": "required literal string", - "type": { - "$id": "212", - "kind": "constant", - "valueType": { - "$ref": "84" - }, - "value": "accept", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "BasicTypeSpec.anonymousBody.Request.anonymous.requiredLiteralString" - }, - { - "$id": "213", - "kind": "property", - "name": "requiredLiteralInt", - "serializedName": "requiredLiteralInt", - "description": "required literal int", - "type": { - "$id": "214", - "kind": "constant", - "valueType": { - "$ref": "87" - }, - "value": 123, - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "BasicTypeSpec.anonymousBody.Request.anonymous.requiredLiteralInt" - }, - { - "$id": "215", - "kind": "property", - "name": "requiredLiteralFloat", - "serializedName": "requiredLiteralFloat", - "description": "required literal float", - "type": { - "$id": "216", - "kind": "constant", - "valueType": { - "$ref": "90" - }, - "value": 1.23, - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "BasicTypeSpec.anonymousBody.Request.anonymous.requiredLiteralFloat" - }, - { - "$id": "217", - "kind": "property", - "name": "requiredLiteralBool", - "serializedName": "requiredLiteralBool", - "description": "required literal bool", - "type": { - "$id": "218", - "kind": "constant", - "valueType": { - "$id": "219", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "value": false, - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "BasicTypeSpec.anonymousBody.Request.anonymous.requiredLiteralBool" - }, - { - "$id": "220", - "kind": "property", - "name": "optionalLiteralString", - "serializedName": "optionalLiteralString", - "description": "optional literal string", - "type": { - "$id": "221", - "kind": "constant", - "valueType": { - "$ref": "93" - }, - "value": "reject", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "BasicTypeSpec.anonymousBody.Request.anonymous.optionalLiteralString" - }, - { - "$id": "222", - "kind": "property", - "name": "optionalLiteralInt", - "serializedName": "optionalLiteralInt", - "description": "optional literal int", - "type": { - "$id": "223", - "kind": "constant", - "valueType": { - "$ref": "96" - }, - "value": 456, - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "BasicTypeSpec.anonymousBody.Request.anonymous.optionalLiteralInt" - }, - { - "$id": "224", - "kind": "property", - "name": "optionalLiteralFloat", - "serializedName": "optionalLiteralFloat", - "description": "optional literal float", - "type": { - "$id": "225", - "kind": "constant", - "valueType": { - "$ref": "99" - }, - "value": 4.56, - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "BasicTypeSpec.anonymousBody.Request.anonymous.optionalLiteralFloat" + "crossLanguageDefinitionId": "BasicTypeSpec.RoundTripModel.requiredRecordUnknown" }, { - "$id": "226", + "$id": "161", "kind": "property", - "name": "optionalLiteralBool", - "serializedName": "optionalLiteralBool", - "description": "optional literal bool", + "name": "optionalRecordUnknown", + "serializedName": "optionalRecordUnknown", + "description": "optional record of unknown", "type": { - "$id": "227", - "kind": "constant", + "$id": "162", + "kind": "dict", + "keyType": { + "$id": "163", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, "valueType": { - "$id": "228", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", + "$id": "164", + "kind": "unknown", + "name": "unknown", + "crossLanguageDefinitionId": "", "decorators": [] }, - "value": true, "decorators": [] }, "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], - "crossLanguageDefinitionId": "BasicTypeSpec.anonymousBody.Request.anonymous.optionalLiteralBool" + "crossLanguageDefinitionId": "BasicTypeSpec.RoundTripModel.optionalRecordUnknown" }, { - "$id": "229", + "$id": "165", "kind": "property", - "name": "requiredBadDescription", - "serializedName": "requiredBadDescription", - "description": "description with xml <|endoftext|>", + "name": "readOnlyRequiredRecordUnknown", + "serializedName": "readOnlyRequiredRecordUnknown", + "description": "required readonly record of unknown", "type": { - "$id": "230", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", + "$id": "166", + "kind": "dict", + "keyType": { + "$id": "167", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "168", + "kind": "unknown", + "name": "unknown", + "crossLanguageDefinitionId": "", + "decorators": [] + }, "decorators": [] }, "optional": false, - "readOnly": false, + "readOnly": true, "discriminator": false, + "flatten": false, "decorators": [], - "crossLanguageDefinitionId": "BasicTypeSpec.anonymousBody.Request.anonymous.requiredBadDescription" + "crossLanguageDefinitionId": "BasicTypeSpec.RoundTripModel.readOnlyRequiredRecordUnknown" }, { - "$id": "231", + "$id": "169", "kind": "property", - "name": "optionalNullableList", - "serializedName": "optionalNullableList", - "description": "optional nullable collection", + "name": "readOnlyOptionalRecordUnknown", + "serializedName": "readOnlyOptionalRecordUnknown", + "description": "optional readonly record of unknown", "type": { - "$id": "232", - "kind": "nullable", - "type": { - "$id": "233", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "234", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", + "$id": "170", + "kind": "dict", + "keyType": { + "$id": "171", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] - } + }, + "valueType": { + "$id": "172", + "kind": "unknown", + "name": "unknown", + "crossLanguageDefinitionId": "", + "decorators": [] + }, + "decorators": [] }, "optional": true, - "readOnly": false, + "readOnly": true, "discriminator": false, + "flatten": false, "decorators": [], - "crossLanguageDefinitionId": "BasicTypeSpec.anonymousBody.Request.anonymous.optionalNullableList" + "crossLanguageDefinitionId": "BasicTypeSpec.RoundTripModel.readOnlyOptionalRecordUnknown" }, { - "$id": "235", + "$id": "173", "kind": "property", - "name": "requiredNullableList", - "serializedName": "requiredNullableList", - "description": "required nullable collection", + "name": "modelWithRequiredNullable", + "serializedName": "modelWithRequiredNullable", + "description": "this is a model with required nullable properties", "type": { - "$id": "236", - "kind": "nullable", - "type": { - "$id": "237", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "238", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] + "$id": "174", + "kind": "model", + "name": "ModelWithRequiredNullableProperties", + "crossLanguageDefinitionId": "BasicTypeSpec.ModelWithRequiredNullableProperties", + "usage": "Input,Output,Json", + "description": "A model with a few required nullable properties", + "decorators": [], + "properties": [ + { + "$id": "175", + "kind": "property", + "name": "requiredNullablePrimitive", + "serializedName": "requiredNullablePrimitive", + "description": "required nullable primitive type", + "type": { + "$id": "176", + "kind": "nullable", + "type": { + "$id": "177", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "BasicTypeSpec.ModelWithRequiredNullableProperties.requiredNullablePrimitive" }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - } + { + "$id": "178", + "kind": "property", + "name": "requiredExtensibleEnum", + "serializedName": "requiredExtensibleEnum", + "description": "required nullable extensible enum type", + "type": { + "$id": "179", + "kind": "nullable", + "type": { + "$ref": "28" + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "BasicTypeSpec.ModelWithRequiredNullableProperties.requiredExtensibleEnum" + }, + { + "$id": "180", + "kind": "property", + "name": "requiredFixedEnum", + "serializedName": "requiredFixedEnum", + "description": "required nullable fixed enum type", + "type": { + "$id": "181", + "kind": "nullable", + "type": { + "$ref": "20" + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "BasicTypeSpec.ModelWithRequiredNullableProperties.requiredFixedEnum" + } + ] }, "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], - "crossLanguageDefinitionId": "BasicTypeSpec.anonymousBody.Request.anonymous.requiredNullableList" - } - ] - }, - { - "$id": "239", - "kind": "model", - "name": "FriendlyModelRequest", - "crossLanguageDefinitionId": "BasicTypeSpec.friendlyModel.Request.anonymous", - "usage": "Spread,Json", - "decorators": [], - "properties": [ + "crossLanguageDefinitionId": "BasicTypeSpec.RoundTripModel.modelWithRequiredNullable" + }, { - "$id": "240", + "$id": "182", "kind": "property", - "name": "name", - "serializedName": "name", - "description": "name of the NotFriend", + "name": "requiredBytes", + "serializedName": "requiredBytes", + "description": "Required bytes", "type": { - "$id": "241", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", + "$id": "183", + "kind": "bytes", + "name": "bytes", + "encode": "base64", + "crossLanguageDefinitionId": "TypeSpec.bytes", "decorators": [] }, "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], - "crossLanguageDefinitionId": "BasicTypeSpec.friendlyModel.Request.anonymous.name" + "crossLanguageDefinitionId": "BasicTypeSpec.RoundTripModel.requiredBytes" } ] }, { - "$id": "242", + "$ref": "174" + }, + { + "$id": "184", "kind": "model", "name": "Friend", "crossLanguageDefinitionId": "BasicTypeSpec.NotFriend", - "usage": "Output,Json", + "usage": "Output,Spread,Json", "description": "this is not a friendly model but with a friendly name", "decorators": [], "properties": [ { - "$id": "243", + "$id": "185", "kind": "property", "name": "name", "serializedName": "name", "description": "name of the NotFriend", "type": { - "$id": "244", + "$id": "186", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2319,57 +1800,29 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "BasicTypeSpec.NotFriend.name" } ] }, { - "$id": "245", - "kind": "model", - "name": "ProjectedNameModelRequest", - "crossLanguageDefinitionId": "BasicTypeSpec.projectedNameModel.Request.anonymous", - "usage": "Spread,Json", - "decorators": [], - "properties": [ - { - "$id": "246", - "kind": "property", - "name": "name", - "serializedName": "name", - "description": "name of the ModelWithProjectedName", - "type": { - "$id": "247", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "decorators": [], - "crossLanguageDefinitionId": "BasicTypeSpec.projectedNameModel.Request.anonymous.name" - } - ] - }, - { - "$id": "248", + "$id": "187", "kind": "model", "name": "ProjectedModel", "crossLanguageDefinitionId": "BasicTypeSpec.ModelWithProjectedName", - "usage": "Output,Json", + "usage": "Output,Spread,Json", "description": "this is a model with a projected name", "decorators": [], "properties": [ { - "$id": "249", + "$id": "188", "kind": "property", "name": "name", "serializedName": "name", "description": "name of the ModelWithProjectedName", "type": { - "$id": "250", + "$id": "189", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2378,13 +1831,14 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "BasicTypeSpec.ModelWithProjectedName.name" } ] }, { - "$id": "251", + "$id": "190", "kind": "model", "name": "ReturnsAnonymousModelResponse", "crossLanguageDefinitionId": "BasicTypeSpec.returnsAnonymousModel.Response.anonymous", @@ -2395,23 +1849,23 @@ ], "Clients": [ { - "$id": "252", + "$id": "191", "Name": "BasicTypeSpecClient", "Description": "This is a sample typespec project.", "Operations": [ { - "$id": "253", + "$id": "192", "Name": "sayHi", "ResourceName": "BasicTypeSpec", "Description": "Return hi", "Accessibility": "public", "Parameters": [ { - "$id": "254", + "$id": "193", "Name": "basicTypeSpecUrl", "NameInRequest": "basicTypeSpecUrl", "Type": { - "$id": "255", + "$id": "194", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -2427,11 +1881,11 @@ "Kind": "Client" }, { - "$id": "256", + "$id": "195", "Name": "headParameter", "NameInRequest": "head-parameter", "Type": { - "$id": "257", + "$id": "196", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2448,11 +1902,11 @@ "SkipUrlEncoding": false }, { - "$id": "258", + "$id": "197", "Name": "queryParameter", "NameInRequest": "queryParameter", "Type": { - "$id": "259", + "$id": "198", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2469,11 +1923,11 @@ "SkipUrlEncoding": false }, { - "$id": "260", + "$id": "199", "Name": "optionalQuery", "NameInRequest": "optionalQuery", "Type": { - "$id": "261", + "$id": "200", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2490,14 +1944,14 @@ "SkipUrlEncoding": false }, { - "$id": "262", + "$id": "201", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "263", + "$id": "202", "kind": "constant", "valueType": { - "$id": "264", + "$id": "203", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2519,12 +1973,12 @@ ], "Responses": [ { - "$id": "265", + "$id": "204", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "108" + "$ref": "90" }, "BodyMediaType": "Json", "Headers": [], @@ -2545,21 +1999,21 @@ "Decorators": [] }, { - "$id": "266", + "$id": "205", "Name": "helloAgain", "ResourceName": "BasicTypeSpec", "Description": "Return hi again", "Accessibility": "public", "Parameters": [ { - "$ref": "254" + "$ref": "193" }, { - "$id": "267", + "$id": "206", "Name": "p1", "NameInRequest": "p1", "Type": { - "$id": "268", + "$id": "207", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2576,14 +2030,14 @@ "SkipUrlEncoding": false }, { - "$id": "269", + "$id": "208", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "270", + "$id": "209", "kind": "constant", "valueType": { - "$id": "271", + "$id": "210", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2603,11 +2057,11 @@ "SkipUrlEncoding": false }, { - "$id": "272", + "$id": "211", "Name": "p2", "NameInRequest": "p2", "Type": { - "$id": "273", + "$id": "212", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2624,14 +2078,14 @@ "SkipUrlEncoding": false }, { - "$id": "274", + "$id": "213", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "275", + "$id": "214", "kind": "constant", "valueType": { - "$id": "276", + "$id": "215", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2651,11 +2105,11 @@ "SkipUrlEncoding": false }, { - "$id": "277", + "$id": "216", "Name": "action", "NameInRequest": "action", "Type": { - "$ref": "145" + "$ref": "127" }, "Location": "Body", "IsApiVersion": false, @@ -2670,12 +2124,12 @@ ], "Responses": [ { - "$id": "278", + "$id": "217", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "145" + "$ref": "127" }, "BodyMediaType": "Json", "Headers": [], @@ -2699,21 +2153,21 @@ "Decorators": [] }, { - "$id": "279", + "$id": "218", "Name": "noContentType", "ResourceName": "BasicTypeSpec", "Description": "Return hi again", "Accessibility": "public", "Parameters": [ { - "$ref": "254" + "$ref": "193" }, { - "$id": "280", + "$id": "219", "Name": "p1", "NameInRequest": "p1", "Type": { - "$id": "281", + "$id": "220", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2730,11 +2184,11 @@ "SkipUrlEncoding": false }, { - "$id": "282", + "$id": "221", "Name": "p2", "NameInRequest": "p2", "Type": { - "$id": "283", + "$id": "222", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2751,15 +2205,15 @@ "SkipUrlEncoding": false }, { - "$id": "284", + "$id": "223", "Name": "contentType", "NameInRequest": "Content-Type", "Description": "Body parameter's content type. Known values are application/json", "Type": { - "$id": "285", + "$id": "224", "kind": "constant", "valueType": { - "$id": "286", + "$id": "225", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2779,14 +2233,14 @@ "SkipUrlEncoding": false }, { - "$id": "287", + "$id": "226", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "288", + "$id": "227", "kind": "constant", "valueType": { - "$id": "289", + "$id": "228", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2806,11 +2260,11 @@ "SkipUrlEncoding": false }, { - "$id": "290", + "$id": "229", "Name": "action", "NameInRequest": "action", "Type": { - "$ref": "145" + "$ref": "127" }, "Location": "Body", "IsApiVersion": false, @@ -2825,12 +2279,12 @@ ], "Responses": [ { - "$id": "291", + "$id": "230", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "145" + "$ref": "127" }, "BodyMediaType": "Json", "Headers": [], @@ -2854,24 +2308,24 @@ "Decorators": [] }, { - "$id": "292", + "$id": "231", "Name": "helloDemo2", "ResourceName": "BasicTypeSpec", "Description": "Return hi in demo2", "Accessibility": "public", "Parameters": [ { - "$ref": "254" + "$ref": "193" }, { - "$id": "293", + "$id": "232", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "294", + "$id": "233", "kind": "constant", "valueType": { - "$id": "295", + "$id": "234", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2893,12 +2347,12 @@ ], "Responses": [ { - "$id": "296", + "$id": "235", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "108" + "$ref": "90" }, "BodyMediaType": "Json", "Headers": [], @@ -2919,25 +2373,25 @@ "Decorators": [] }, { - "$id": "297", + "$id": "236", "Name": "createLiteral", "ResourceName": "BasicTypeSpec", "Description": "Create with literal value", "Accessibility": "public", "Parameters": [ { - "$ref": "254" + "$ref": "193" }, { - "$id": "298", + "$id": "237", "Name": "contentType", "NameInRequest": "Content-Type", "Description": "Body parameter's content type. Known values are application/json", "Type": { - "$id": "299", + "$id": "238", "kind": "constant", "valueType": { - "$id": "300", + "$id": "239", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2957,14 +2411,14 @@ "SkipUrlEncoding": false }, { - "$id": "301", + "$id": "240", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "302", + "$id": "241", "kind": "constant", "valueType": { - "$id": "303", + "$id": "242", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2984,11 +2438,11 @@ "SkipUrlEncoding": false }, { - "$id": "304", + "$id": "243", "Name": "body", "NameInRequest": "body", "Type": { - "$ref": "108" + "$ref": "90" }, "Location": "Body", "IsApiVersion": false, @@ -3003,12 +2457,12 @@ ], "Responses": [ { - "$id": "305", + "$id": "244", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "108" + "$ref": "90" }, "BodyMediaType": "Json", "Headers": [], @@ -3032,24 +2486,24 @@ "Decorators": [] }, { - "$id": "306", + "$id": "245", "Name": "helloLiteral", "ResourceName": "BasicTypeSpec", "Description": "Send literal parameters", "Accessibility": "public", "Parameters": [ { - "$ref": "254" + "$ref": "193" }, { - "$id": "307", + "$id": "246", "Name": "p1", "NameInRequest": "p1", "Type": { - "$id": "308", + "$id": "247", "kind": "constant", "valueType": { - "$id": "309", + "$id": "248", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3069,14 +2523,14 @@ "SkipUrlEncoding": false }, { - "$id": "310", + "$id": "249", "Name": "p2", "NameInRequest": "p2", "Type": { - "$id": "311", + "$id": "250", "kind": "constant", "valueType": { - "$id": "312", + "$id": "251", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -3096,14 +2550,14 @@ "SkipUrlEncoding": false }, { - "$id": "313", + "$id": "252", "Name": "p3", "NameInRequest": "p3", "Type": { - "$id": "314", + "$id": "253", "kind": "constant", "valueType": { - "$id": "315", + "$id": "254", "kind": "boolean", "name": "boolean", "crossLanguageDefinitionId": "TypeSpec.boolean", @@ -3123,14 +2577,14 @@ "SkipUrlEncoding": false }, { - "$id": "316", + "$id": "255", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "317", + "$id": "256", "kind": "constant", "valueType": { - "$id": "318", + "$id": "257", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3152,12 +2606,12 @@ ], "Responses": [ { - "$id": "319", + "$id": "258", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "108" + "$ref": "90" }, "BodyMediaType": "Json", "Headers": [], @@ -3178,26 +2632,26 @@ "Decorators": [] }, { - "$id": "320", + "$id": "259", "Name": "topAction", "ResourceName": "BasicTypeSpec", "Description": "top level method", "Accessibility": "public", "Parameters": [ { - "$ref": "254" + "$ref": "193" }, { - "$id": "321", + "$id": "260", "Name": "action", "NameInRequest": "action", "Type": { - "$id": "322", + "$id": "261", "kind": "utcDateTime", "name": "utcDateTime", "encode": "rfc3339", "wireType": { - "$id": "323", + "$id": "262", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3217,14 +2671,14 @@ "SkipUrlEncoding": false }, { - "$id": "324", + "$id": "263", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "325", + "$id": "264", "kind": "constant", "valueType": { - "$id": "326", + "$id": "265", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3246,12 +2700,12 @@ ], "Responses": [ { - "$id": "327", + "$id": "266", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "108" + "$ref": "90" }, "BodyMediaType": "Json", "Headers": [], @@ -3272,24 +2726,24 @@ "Decorators": [] }, { - "$id": "328", + "$id": "267", "Name": "topAction2", "ResourceName": "BasicTypeSpec", "Description": "top level method2", "Accessibility": "public", "Parameters": [ { - "$ref": "254" + "$ref": "193" }, { - "$id": "329", + "$id": "268", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "330", + "$id": "269", "kind": "constant", "valueType": { - "$id": "331", + "$id": "270", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3311,12 +2765,12 @@ ], "Responses": [ { - "$id": "332", + "$id": "271", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "108" + "$ref": "90" }, "BodyMediaType": "Json", "Headers": [], @@ -3337,25 +2791,25 @@ "Decorators": [] }, { - "$id": "333", + "$id": "272", "Name": "patchAction", "ResourceName": "BasicTypeSpec", "Description": "top level patch", "Accessibility": "public", "Parameters": [ { - "$ref": "254" + "$ref": "193" }, { - "$id": "334", + "$id": "273", "Name": "contentType", "NameInRequest": "Content-Type", "Description": "Body parameter's content type. Known values are application/json", "Type": { - "$id": "335", + "$id": "274", "kind": "constant", "valueType": { - "$id": "336", + "$id": "275", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3375,14 +2829,14 @@ "SkipUrlEncoding": false }, { - "$id": "337", + "$id": "276", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "338", + "$id": "277", "kind": "constant", "valueType": { - "$id": "339", + "$id": "278", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3402,11 +2856,11 @@ "SkipUrlEncoding": false }, { - "$id": "340", + "$id": "279", "Name": "body", "NameInRequest": "body", "Type": { - "$ref": "108" + "$ref": "90" }, "Location": "Body", "IsApiVersion": false, @@ -3421,12 +2875,12 @@ ], "Responses": [ { - "$id": "341", + "$id": "280", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "108" + "$ref": "90" }, "BodyMediaType": "Json", "Headers": [], @@ -3450,25 +2904,25 @@ "Decorators": [] }, { - "$id": "342", + "$id": "281", "Name": "anonymousBody", "ResourceName": "BasicTypeSpec", "Description": "body parameter without body decorator", "Accessibility": "public", "Parameters": [ { - "$ref": "254" + "$ref": "193" }, { - "$id": "343", + "$id": "282", "Name": "contentType", "NameInRequest": "Content-Type", "Description": "Body parameter's content type. Known values are application/json", "Type": { - "$id": "344", + "$id": "283", "kind": "constant", "valueType": { - "$id": "345", + "$id": "284", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3488,14 +2942,14 @@ "SkipUrlEncoding": false }, { - "$id": "346", + "$id": "285", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "347", + "$id": "286", "kind": "constant", "valueType": { - "$id": "348", + "$id": "287", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3515,11 +2969,11 @@ "SkipUrlEncoding": false }, { - "$id": "349", - "Name": "anonymousBodyRequest", - "NameInRequest": "anonymousBodyRequest", + "$id": "288", + "Name": "thing", + "NameInRequest": "thing", "Type": { - "$ref": "202" + "$ref": "90" }, "Location": "Body", "IsApiVersion": false, @@ -3534,12 +2988,12 @@ ], "Responses": [ { - "$id": "350", + "$id": "289", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "108" + "$ref": "90" }, "BodyMediaType": "Json", "Headers": [], @@ -3563,25 +3017,25 @@ "Decorators": [] }, { - "$id": "351", + "$id": "290", "Name": "friendlyModel", "ResourceName": "BasicTypeSpec", "Description": "Model can have its friendly name", "Accessibility": "public", "Parameters": [ { - "$ref": "254" + "$ref": "193" }, { - "$id": "352", + "$id": "291", "Name": "contentType", "NameInRequest": "Content-Type", "Description": "Body parameter's content type. Known values are application/json", "Type": { - "$id": "353", + "$id": "292", "kind": "constant", "valueType": { - "$id": "354", + "$id": "293", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3601,14 +3055,14 @@ "SkipUrlEncoding": false }, { - "$id": "355", + "$id": "294", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "356", + "$id": "295", "kind": "constant", "valueType": { - "$id": "357", + "$id": "296", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3628,11 +3082,11 @@ "SkipUrlEncoding": false }, { - "$id": "358", - "Name": "friendlyModelRequest", - "NameInRequest": "friendlyModelRequest", + "$id": "297", + "Name": "friend", + "NameInRequest": "friend", "Type": { - "$ref": "239" + "$ref": "184" }, "Location": "Body", "IsApiVersion": false, @@ -3647,12 +3101,12 @@ ], "Responses": [ { - "$id": "359", + "$id": "298", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "242" + "$ref": "184" }, "BodyMediaType": "Json", "Headers": [], @@ -3676,25 +3130,25 @@ "Decorators": [] }, { - "$id": "360", + "$id": "299", "Name": "addTimeHeader", "ResourceName": "BasicTypeSpec", "Accessibility": "public", "Parameters": [ { - "$ref": "254" + "$ref": "193" }, { - "$id": "361", + "$id": "300", "Name": "repeatabilityFirstSent", "NameInRequest": "Repeatability-First-Sent", "Type": { - "$id": "362", + "$id": "301", "kind": "utcDateTime", "name": "utcDateTime", "encode": "rfc7231", "wireType": { - "$id": "363", + "$id": "302", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3716,7 +3170,7 @@ ], "Responses": [ { - "$id": "364", + "$id": "303", "StatusCodes": [ 204 ], @@ -3736,25 +3190,25 @@ "Decorators": [] }, { - "$id": "365", + "$id": "304", "Name": "projectedNameModel", "ResourceName": "BasicTypeSpec", "Description": "Model can have its projected name", "Accessibility": "public", "Parameters": [ { - "$ref": "254" + "$ref": "193" }, { - "$id": "366", + "$id": "305", "Name": "contentType", "NameInRequest": "Content-Type", "Description": "Body parameter's content type. Known values are application/json", "Type": { - "$id": "367", + "$id": "306", "kind": "constant", "valueType": { - "$id": "368", + "$id": "307", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3774,14 +3228,14 @@ "SkipUrlEncoding": false }, { - "$id": "369", + "$id": "308", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "370", + "$id": "309", "kind": "constant", "valueType": { - "$id": "371", + "$id": "310", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3801,11 +3255,11 @@ "SkipUrlEncoding": false }, { - "$id": "372", - "Name": "projectedNameModelRequest", - "NameInRequest": "projectedNameModelRequest", + "$id": "311", + "Name": "projectedModel", + "NameInRequest": "projectedModel", "Type": { - "$ref": "245" + "$ref": "187" }, "Location": "Body", "IsApiVersion": false, @@ -3820,12 +3274,12 @@ ], "Responses": [ { - "$id": "373", + "$id": "312", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "248" + "$ref": "187" }, "BodyMediaType": "Json", "Headers": [], @@ -3849,24 +3303,24 @@ "Decorators": [] }, { - "$id": "374", + "$id": "313", "Name": "returnsAnonymousModel", "ResourceName": "BasicTypeSpec", "Description": "return anonymous model", "Accessibility": "public", "Parameters": [ { - "$ref": "254" + "$ref": "193" }, { - "$id": "375", + "$id": "314", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "376", + "$id": "315", "kind": "constant", "valueType": { - "$id": "377", + "$id": "316", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3888,12 +3342,12 @@ ], "Responses": [ { - "$id": "378", + "$id": "317", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "251" + "$ref": "190" }, "BodyMediaType": "Json", "Headers": [], @@ -3914,21 +3368,21 @@ "Decorators": [] }, { - "$id": "379", + "$id": "318", "Name": "getUnknownValue", "ResourceName": "BasicTypeSpec", "Description": "get extensible enum", "Accessibility": "public", "Parameters": [ { - "$ref": "254" + "$ref": "193" }, { - "$id": "380", + "$id": "319", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "381", + "$id": "320", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3947,15 +3401,15 @@ ], "Responses": [ { - "$id": "382", + "$id": "321", "StatusCodes": [ 200 ], "BodyType": { - "$id": "383", + "$id": "322", "kind": "constant", "valueType": { - "$id": "384", + "$id": "323", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3990,25 +3444,25 @@ "Decorators": [] }, { - "$id": "385", + "$id": "324", "Name": "internalProtocol", "ResourceName": "BasicTypeSpec", "Description": "When set protocol false and convenient true, then the protocol method should be internal", "Accessibility": "public", "Parameters": [ { - "$ref": "254" + "$ref": "193" }, { - "$id": "386", + "$id": "325", "Name": "contentType", "NameInRequest": "Content-Type", "Description": "Body parameter's content type. Known values are application/json", "Type": { - "$id": "387", + "$id": "326", "kind": "constant", "valueType": { - "$id": "388", + "$id": "327", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -4028,14 +3482,14 @@ "SkipUrlEncoding": false }, { - "$id": "389", + "$id": "328", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "390", + "$id": "329", "kind": "constant", "valueType": { - "$id": "391", + "$id": "330", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -4055,11 +3509,11 @@ "SkipUrlEncoding": false }, { - "$id": "392", + "$id": "331", "Name": "body", "NameInRequest": "body", "Type": { - "$ref": "108" + "$ref": "90" }, "Location": "Body", "IsApiVersion": false, @@ -4074,12 +3528,12 @@ ], "Responses": [ { - "$id": "393", + "$id": "332", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "108" + "$ref": "90" }, "BodyMediaType": "Json", "Headers": [], @@ -4103,19 +3557,19 @@ "Decorators": [] }, { - "$id": "394", + "$id": "333", "Name": "stillConvenient", "ResourceName": "BasicTypeSpec", "Description": "When set protocol false and convenient true, the convenient method should be generated even it has the same signature as protocol one", "Accessibility": "public", "Parameters": [ { - "$ref": "254" + "$ref": "193" } ], "Responses": [ { - "$id": "395", + "$id": "334", "StatusCodes": [ 204 ], @@ -4135,21 +3589,21 @@ "Decorators": [] }, { - "$id": "396", + "$id": "335", "Name": "headAsBoolean", "ResourceName": "BasicTypeSpec", "Description": "head as boolean.", "Accessibility": "public", "Parameters": [ { - "$ref": "254" + "$ref": "193" }, { - "$id": "397", + "$id": "336", "Name": "id", "NameInRequest": "id", "Type": { - "$id": "398", + "$id": "337", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -4168,7 +3622,7 @@ ], "Responses": [ { - "$id": "399", + "$id": "338", "StatusCodes": [ 204 ], @@ -4189,20 +3643,20 @@ } ], "Protocol": { - "$id": "400" + "$id": "339" }, "Parameters": [ { - "$ref": "254" + "$ref": "193" } ], "Decorators": [] } ], "Auth": { - "$id": "401", + "$id": "340", "ApiKey": { - "$id": "402", + "$id": "341", "Name": "my-api-key" } } diff --git a/eng/packages/http-client-csharp/package-lock.json b/eng/packages/http-client-csharp/package-lock.json index a6c5127bbdfe..1f4fb56b374c 100644 --- a/eng/packages/http-client-csharp/package-lock.json +++ b/eng/packages/http-client-csharp/package-lock.json @@ -8,12 +8,25 @@ "name": "@azure-typespec/http-client-csharp", "version": "1.0.0", "dependencies": { - "@typespec/http-client-csharp": "0.1.9-alpha.20240913.1" + "@typespec/http-client-csharp": "0.1.9-alpha.20241010.1" }, "devDependencies": { + "@azure-tools/typespec-autorest": "0.46.0", + "@azure-tools/typespec-azure-core": "0.46.0", + "@azure-tools/typespec-azure-resource-manager": "0.46.1", + "@azure-tools/typespec-azure-rulesets": "0.46.0", + "@azure-tools/typespec-client-generator-core": "0.46.2", "@eslint/js": "^9.2.0", - "@types/node": "~18.13.0", + "@types/node": "~22.7.5", "@types/prettier": "^2.6.3", + "@typespec/compiler": "0.60.0", + "@typespec/http": "0.60.0", + "@typespec/json-schema": "0.60.0", + "@typespec/library-linter": "0.60.0", + "@typespec/openapi": "0.60.0", + "@typespec/rest": "0.60.0", + "@typespec/versioning": "0.60.0", + "@typespec/xml": "0.60.0", "@vitest/coverage-v8": "^1.4.0", "@vitest/ui": "^1.4.0", "c8": "^9.1.0", @@ -21,9 +34,18 @@ "eslint": "^8.57.0", "prettier": "~3.0.3", "rimraf": "~5.0.5", - "typescript": "~5.4.3", + "typescript": "~5.6.3", "typescript-eslint": "^7.8.0", "vitest": "^1.4.0" + }, + "peerDependencies": { + "@azure-tools/typespec-azure-core": ">=0.46.0 <1.0.0 || ~0.47.0-0", + "@azure-tools/typespec-client-generator-core": ">=0.46.0 <1.0.0 || ~0.47.0-0", + "@typespec/compiler": ">=0.60.0 <1.0.0 || ~0.61.0-0", + "@typespec/http": ">=0.60.0 <1.0.0 || ~0.61.0-0", + "@typespec/openapi": ">=0.60.0 <1.0.0 || ~0.61.0-0", + "@typespec/rest": ">=0.60.0 <1.0.0 || ~0.61.0-0", + "@typespec/versioning": ">=0.60.0 <1.0.0 || ~0.61.0-0" } }, "node_modules/@ampproject/remapping": { @@ -40,27 +62,83 @@ "node": ">=6.0.0" } }, + "node_modules/@azure-tools/typespec-autorest": { + "version": "0.46.0", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-autorest/-/typespec-autorest-0.46.0.tgz", + "integrity": "sha512-LCIvxQgjczWUq/wi6fzKBqYHWJYD0hRLA8wBPzFasriHdBDHjpZ6vgTPmApzt0H5ArZX92Ar53Q5+ZXD9ktMUg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18.0.0" + }, + "peerDependencies": { + "@azure-tools/typespec-azure-core": "~0.46.0", + "@azure-tools/typespec-azure-resource-manager": "~0.46.0", + "@azure-tools/typespec-client-generator-core": "~0.46.0", + "@typespec/compiler": "~0.60.0", + "@typespec/http": "~0.60.0", + "@typespec/openapi": "~0.60.0", + "@typespec/rest": "~0.60.0", + "@typespec/versioning": "~0.60.0" + } + }, "node_modules/@azure-tools/typespec-azure-core": { - "version": "0.45.0", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-core/-/typespec-azure-core-0.45.0.tgz", - "integrity": "sha512-GycGMCmaIVSN+TftPtlPJLyeOrglbLmH08ZiZaVMjSih/TQEJM21RGR6d8QdjlkQWN61ntNDRD+RP2uv9tHmqw==", + "version": "0.46.0", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-core/-/typespec-azure-core-0.46.0.tgz", + "integrity": "sha512-BNE31enSHWtWlrdIKShBS6CNFGk3OYmHSBnWqobcFJkTGXC090EoV2u6otn4BMI99fZRSR4gpwp/kYU9KLE9Jw==", + "license": "MIT", + "engines": { + "node": ">=18.0.0" + }, + "peerDependencies": { + "@typespec/compiler": "~0.60.0", + "@typespec/http": "~0.60.0", + "@typespec/rest": "~0.60.0" + } + }, + "node_modules/@azure-tools/typespec-azure-resource-manager": { + "version": "0.46.1", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-resource-manager/-/typespec-azure-resource-manager-0.46.1.tgz", + "integrity": "sha512-8md8AwnxoYVkDBavQL5dbToUTS10PTSkcF+emd9BKEdnF9MKuA542vZudzaQOz2BzFbArMVUE/PLm2mhuwRkLw==", + "dev": true, + "license": "MIT", + "dependencies": { + "change-case": "~5.4.4", + "pluralize": "^8.0.0" + }, + "engines": { + "node": ">=18.0.0" + }, + "peerDependencies": { + "@azure-tools/typespec-azure-core": "~0.46.0", + "@typespec/compiler": "~0.60.0", + "@typespec/http": "~0.60.0", + "@typespec/openapi": "~0.60.0", + "@typespec/rest": "~0.60.0", + "@typespec/versioning": "~0.60.0" + } + }, + "node_modules/@azure-tools/typespec-azure-rulesets": { + "version": "0.46.0", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-rulesets/-/typespec-azure-rulesets-0.46.0.tgz", + "integrity": "sha512-HssO+0ARHbnuLhRiT/7l5DF2hV91Jf/MmsSPdOsDMbVZG26YsB8JD1MiBqs9VJZjB+1xn2DiimYrgqF4n9aDvw==", + "dev": true, "license": "MIT", - "peer": true, "engines": { "node": ">=18.0.0" }, "peerDependencies": { - "@typespec/compiler": "~0.59.0", - "@typespec/http": "~0.59.0", - "@typespec/rest": "~0.59.0" + "@azure-tools/typespec-azure-core": "~0.46.0", + "@azure-tools/typespec-azure-resource-manager": "~0.46.0", + "@azure-tools/typespec-client-generator-core": "~0.46.0", + "@typespec/compiler": "~0.60.0" } }, "node_modules/@azure-tools/typespec-client-generator-core": { - "version": "0.45.3", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-client-generator-core/-/typespec-client-generator-core-0.45.3.tgz", - "integrity": "sha512-o1E38DJnJ71ixK3jHTy42QgY1ztXPGEOhJjdzSb9aI0aXlqqBt0Klgg52RuBHBajQ+RI+nWtGLE+LJaVDSHAqw==", + "version": "0.46.2", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-client-generator-core/-/typespec-client-generator-core-0.46.2.tgz", + "integrity": "sha512-/HKeehCNDeylouOHMe7IwpcDcGJHRAuEy3a5FBnSY51m4EpMq4VMQzW9tka/8brFO2m5LLj7tyhOL/xnzi2fLg==", "license": "MIT", - "peer": true, "dependencies": { "change-case": "~5.4.4", "pluralize": "^8.0.0" @@ -69,12 +147,12 @@ "node": ">=18.0.0" }, "peerDependencies": { - "@azure-tools/typespec-azure-core": "~0.45.0", - "@typespec/compiler": "~0.59.0", - "@typespec/http": "~0.59.0", - "@typespec/openapi": "~0.59.0", - "@typespec/rest": "~0.59.0", - "@typespec/versioning": "~0.59.0" + "@azure-tools/typespec-azure-core": "~0.46.0", + "@typespec/compiler": "~0.60.0", + "@typespec/http": "~0.60.0", + "@typespec/openapi": "~0.60.0", + "@typespec/rest": "~0.60.0", + "@typespec/versioning": "~0.60.0" } }, "node_modules/@babel/code-frame": { @@ -82,7 +160,6 @@ "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.7.tgz", "integrity": "sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==", "license": "MIT", - "peer": true, "dependencies": { "@babel/highlight": "^7.24.7", "picocolors": "^1.0.0" @@ -92,9 +169,9 @@ } }, "node_modules/@babel/helper-string-parser": { - "version": "7.24.8", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.8.tgz", - "integrity": "sha512-pO9KhhRcuUyGnJWwyEgnRJTSIZHiT+vMD0kPeD+so0l7mxkMT19g3pjY9GTnHySck/hDzq+dtW/4VgnMkippsQ==", + "version": "7.25.7", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.25.7.tgz", + "integrity": "sha512-CbkjYdsJNHFk8uqpEkpCvRs3YRp9tY6FmFY7wLMSYuGYkrdUi7r2lc4/wqsvlHoMznX3WJ9IP8giGPq68T/Y6g==", "dev": true, "license": "MIT", "engines": { @@ -102,22 +179,21 @@ } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz", - "integrity": "sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==", + "version": "7.25.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.7.tgz", + "integrity": "sha512-AM6TzwYqGChO45oiuPqwL2t20/HdMC1rTPAesnBCgPCSF1x3oN9MVUwQV2iyz4xqWrctwK5RNC8LV22kaQCNYg==", "license": "MIT", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/highlight": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.7.tgz", - "integrity": "sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw==", + "version": "7.25.7", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.25.7.tgz", + "integrity": "sha512-iYyACpW3iW8Fw+ZybQK+drQre+ns/tKpXbNESfrhNnPLIklLbXr7MYJ6gPEd0iETGLOK+SxMjVvKb/ffmk+FEw==", "license": "MIT", - "peer": true, "dependencies": { - "@babel/helper-validator-identifier": "^7.24.7", + "@babel/helper-validator-identifier": "^7.25.7", "chalk": "^2.4.2", "js-tokens": "^4.0.0", "picocolors": "^1.0.0" @@ -127,13 +203,13 @@ } }, "node_modules/@babel/parser": { - "version": "7.25.3", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.25.3.tgz", - "integrity": "sha512-iLTJKDbJ4hMvFPgQwwsVoxtHyWpKKPBrxkANrSYewDPaPpT5py5yeVkgPIJ7XYXhndxJpaA3PyALSXQ7u8e/Dw==", + "version": "7.25.8", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.25.8.tgz", + "integrity": "sha512-HcttkxzdPucv3nNFmfOOMfFf64KgdJVqm1KaCm25dPGMLElo9nsLvXeJECQg8UzPuBGLyTSA0ZzqCtDSzKTEoQ==", "dev": true, "license": "MIT", "dependencies": { - "@babel/types": "^7.25.2" + "@babel/types": "^7.25.8" }, "bin": { "parser": "bin/babel-parser.js" @@ -143,14 +219,14 @@ } }, "node_modules/@babel/types": { - "version": "7.25.2", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.25.2.tgz", - "integrity": "sha512-YTnYtra7W9e6/oAZEHj0bJehPRUlLH9/fbpT5LfB0NhQXyALCRkRs3zH9v07IYhkgpqX6Z78FnuccZr/l4Fs4Q==", + "version": "7.25.8", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.25.8.tgz", + "integrity": "sha512-JWtuCu8VQsMladxVz/P4HzHUGCAwpuqacmowgXFs5XjxIgKuNjnLokQzuVjlTvIzODaDmpjT3oxcC48vyk9EWg==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-string-parser": "^7.24.8", - "@babel/helper-validator-identifier": "^7.24.7", + "@babel/helper-string-parser": "^7.25.7", + "@babel/helper-validator-identifier": "^7.25.7", "to-fast-properties": "^2.0.0" }, "engines": { @@ -572,9 +648,9 @@ } }, "node_modules/@eslint-community/regexpp": { - "version": "4.11.0", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.11.0.tgz", - "integrity": "sha512-G/M/tIiMrTAxEWRfLfQJMmGNX28IxBg4PBz8XqQhqUHLFI6TL2htpIB1iQCj144V5ee/JaKyT9/WZ0MGZWfA7A==", + "version": "4.11.1", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.11.1.tgz", + "integrity": "sha512-m4DVN9ZqskZoLU5GlWZadwDnYo3vAEydiUayB9widCl9ffWx2IvPnp6n3on5rJmziJSw9Bv+Z3ChDVdMwXCY8Q==", "dev": true, "license": "MIT", "engines": { @@ -630,9 +706,9 @@ "license": "MIT" }, "node_modules/@eslint/js": { - "version": "9.9.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.9.0.tgz", - "integrity": "sha512-hhetes6ZHP3BlXLxmd8K2SNgkhNSi+UcecbnwWKwpP7kyi/uC75DJ1lOOBO3xrC4jyojtGE3YxKZPHfk4yrgug==", + "version": "9.12.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.12.0.tgz", + "integrity": "sha512-eohesHH8WFRUprDNyEREgqP6beG6htMeUYeCpkEgBCieCMme5r9zFWjzAJp//9S+Kub4rqE+jXe9Cp1a7IYIIA==", "dev": true, "license": "MIT", "engines": { @@ -640,14 +716,14 @@ } }, "node_modules/@humanwhocodes/config-array": { - "version": "0.11.14", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", - "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==", + "version": "0.13.0", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.13.0.tgz", + "integrity": "sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==", "deprecated": "Use @eslint/config-array instead", "dev": true, "license": "Apache-2.0", "dependencies": { - "@humanwhocodes/object-schema": "^2.0.2", + "@humanwhocodes/object-schema": "^2.0.3", "debug": "^4.3.1", "minimatch": "^3.0.5" }, @@ -696,9 +772,9 @@ } }, "node_modules/@isaacs/cliui/node_modules/ansi-regex": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", - "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", + "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", "dev": true, "license": "MIT", "engines": { @@ -903,16 +979,16 @@ } }, "node_modules/@polka/url": { - "version": "1.0.0-next.25", - "resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.25.tgz", - "integrity": "sha512-j7P6Rgr3mmtdkeDGTe0E/aYyWEWVtc5yFXtHCRHs28/jptDEWfaVOc5T7cblqy1XKPPfCxJc/8DwQ5YgLOZOVQ==", + "version": "1.0.0-next.28", + "resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.28.tgz", + "integrity": "sha512-8LduaNlMZGwdZ6qWrKlfa+2M4gahzFkprZiAt2TF8uS0qQgBizKXpXURqvTJ4WtmupWxaLqjRb2UCTe72mu+Aw==", "dev": true, "license": "MIT" }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.21.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.21.0.tgz", - "integrity": "sha512-WTWD8PfoSAJ+qL87lE7votj3syLavxunWhzCnx3XFxFiI/BA/r3X7MUM8dVrH8rb2r4AiO8jJsr3ZjdaftmnfA==", + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.24.0.tgz", + "integrity": "sha512-Q6HJd7Y6xdB48x8ZNVDOqsbh2uByBhgK8PiQgPhwkIw/HC/YX5Ghq2mQY5sRMZWHb3VsFkWooUVOZHKr7DmDIA==", "cpu": [ "arm" ], @@ -924,9 +1000,9 @@ ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.21.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.21.0.tgz", - "integrity": "sha512-a1sR2zSK1B4eYkiZu17ZUZhmUQcKjk2/j9Me2IDjk1GHW7LB5Z35LEzj9iJch6gtUfsnvZs1ZNyDW2oZSThrkA==", + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.24.0.tgz", + "integrity": "sha512-ijLnS1qFId8xhKjT81uBHuuJp2lU4x2yxa4ctFPtG+MqEE6+C5f/+X/bStmxapgmwLwiL3ih122xv8kVARNAZA==", "cpu": [ "arm64" ], @@ -938,9 +1014,9 @@ ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.21.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.21.0.tgz", - "integrity": "sha512-zOnKWLgDld/svhKO5PD9ozmL6roy5OQ5T4ThvdYZLpiOhEGY+dp2NwUmxK0Ld91LrbjrvtNAE0ERBwjqhZTRAA==", + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.24.0.tgz", + "integrity": "sha512-bIv+X9xeSs1XCk6DVvkO+S/z8/2AMt/2lMqdQbMrmVpgFvXlmde9mLcbQpztXm1tajC3raFDqegsH18HQPMYtA==", "cpu": [ "arm64" ], @@ -952,9 +1028,9 @@ ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.21.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.21.0.tgz", - "integrity": "sha512-7doS8br0xAkg48SKE2QNtMSFPFUlRdw9+votl27MvT46vo44ATBmdZdGysOevNELmZlfd+NEa0UYOA8f01WSrg==", + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.24.0.tgz", + "integrity": "sha512-X6/nOwoFN7RT2svEQWUsW/5C/fYMBe4fnLK9DQk4SX4mgVBiTA9h64kjUYPvGQ0F/9xwJ5U5UfTbl6BEjaQdBQ==", "cpu": [ "x64" ], @@ -966,9 +1042,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.21.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.21.0.tgz", - "integrity": "sha512-pWJsfQjNWNGsoCq53KjMtwdJDmh/6NubwQcz52aEwLEuvx08bzcy6tOUuawAOncPnxz/3siRtd8hiQ32G1y8VA==", + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.24.0.tgz", + "integrity": "sha512-0KXvIJQMOImLCVCz9uvvdPgfyWo93aHHp8ui3FrtOP57svqrF/roSSR5pjqL2hcMp0ljeGlU4q9o/rQaAQ3AYA==", "cpu": [ "arm" ], @@ -980,9 +1056,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.21.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.21.0.tgz", - "integrity": "sha512-efRIANsz3UHZrnZXuEvxS9LoCOWMGD1rweciD6uJQIx2myN3a8Im1FafZBzh7zk1RJ6oKcR16dU3UPldaKd83w==", + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.24.0.tgz", + "integrity": "sha512-it2BW6kKFVh8xk/BnHfakEeoLPv8STIISekpoF+nBgWM4d55CZKc7T4Dx1pEbTnYm/xEKMgy1MNtYuoA8RFIWw==", "cpu": [ "arm" ], @@ -994,9 +1070,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.21.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.21.0.tgz", - "integrity": "sha512-ZrPhydkTVhyeGTW94WJ8pnl1uroqVHM3j3hjdquwAcWnmivjAwOYjTEAuEDeJvGX7xv3Z9GAvrBkEzCgHq9U1w==", + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.24.0.tgz", + "integrity": "sha512-i0xTLXjqap2eRfulFVlSnM5dEbTVque/3Pi4g2y7cxrs7+a9De42z4XxKLYJ7+OhE3IgxvfQM7vQc43bwTgPwA==", "cpu": [ "arm64" ], @@ -1008,9 +1084,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.21.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.21.0.tgz", - "integrity": "sha512-cfaupqd+UEFeURmqNP2eEvXqgbSox/LHOyN9/d2pSdV8xTrjdg3NgOFJCtc1vQ/jEke1qD0IejbBfxleBPHnPw==", + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.24.0.tgz", + "integrity": "sha512-9E6MKUJhDuDh604Qco5yP/3qn3y7SLXYuiC0Rpr89aMScS2UAmK1wHP2b7KAa1nSjWJc/f/Lc0Wl1L47qjiyQw==", "cpu": [ "arm64" ], @@ -1022,9 +1098,9 @@ ] }, "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { - "version": "4.21.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.21.0.tgz", - "integrity": "sha512-ZKPan1/RvAhrUylwBXC9t7B2hXdpb/ufeu22pG2psV7RN8roOfGurEghw1ySmX/CmDDHNTDDjY3lo9hRlgtaHg==", + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.24.0.tgz", + "integrity": "sha512-2XFFPJ2XMEiF5Zi2EBf4h73oR1V/lycirxZxHZNc93SqDN/IWhYYSYj8I9381ikUFXZrz2v7r2tOVk2NBwxrWw==", "cpu": [ "ppc64" ], @@ -1036,9 +1112,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.21.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.21.0.tgz", - "integrity": "sha512-H1eRaCwd5E8eS8leiS+o/NqMdljkcb1d6r2h4fKSsCXQilLKArq6WS7XBLDu80Yz+nMqHVFDquwcVrQmGr28rg==", + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.24.0.tgz", + "integrity": "sha512-M3Dg4hlwuntUCdzU7KjYqbbd+BLq3JMAOhCKdBE3TcMGMZbKkDdJ5ivNdehOssMCIokNHFOsv7DO4rlEOfyKpg==", "cpu": [ "riscv64" ], @@ -1050,9 +1126,9 @@ ] }, "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.21.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.21.0.tgz", - "integrity": "sha512-zJ4hA+3b5tu8u7L58CCSI0A9N1vkfwPhWd/puGXwtZlsB5bTkwDNW/+JCU84+3QYmKpLi+XvHdmrlwUwDA6kqw==", + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.24.0.tgz", + "integrity": "sha512-mjBaoo4ocxJppTorZVKWFpy1bfFj9FeCMJqzlMQGjpNPY9JwQi7OuS1axzNIk0nMX6jSgy6ZURDZ2w0QW6D56g==", "cpu": [ "s390x" ], @@ -1064,9 +1140,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.21.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.21.0.tgz", - "integrity": "sha512-e2hrvElFIh6kW/UNBQK/kzqMNY5mO+67YtEh9OA65RM5IJXYTWiXjX6fjIiPaqOkBthYF1EqgiZ6OXKcQsM0hg==", + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.24.0.tgz", + "integrity": "sha512-ZXFk7M72R0YYFN5q13niV0B7G8/5dcQ9JDp8keJSfr3GoZeXEoMHP/HlvqROA3OMbMdfr19IjCeNAnPUG93b6A==", "cpu": [ "x64" ], @@ -1078,9 +1154,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.21.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.21.0.tgz", - "integrity": "sha512-1vvmgDdUSebVGXWX2lIcgRebqfQSff0hMEkLJyakQ9JQUbLDkEaMsPTLOmyccyC6IJ/l3FZuJbmrBw/u0A0uCQ==", + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.24.0.tgz", + "integrity": "sha512-w1i+L7kAXZNdYl+vFvzSZy8Y1arS7vMgIy8wusXJzRrPyof5LAb02KGr1PD2EkRcl73kHulIID0M501lN+vobQ==", "cpu": [ "x64" ], @@ -1092,9 +1168,9 @@ ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.21.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.21.0.tgz", - "integrity": "sha512-s5oFkZ/hFcrlAyBTONFY1TWndfyre1wOMwU+6KCpm/iatybvrRgmZVM+vCFwxmC5ZhdlgfE0N4XorsDpi7/4XQ==", + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.24.0.tgz", + "integrity": "sha512-VXBrnPWgBpVDCVY6XF3LEW0pOU51KbaHhccHw6AS6vBWIC60eqsH19DAeeObl+g8nKAz04QFdl/Cefta0xQtUQ==", "cpu": [ "arm64" ], @@ -1106,9 +1182,9 @@ ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.21.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.21.0.tgz", - "integrity": "sha512-G9+TEqRnAA6nbpqyUqgTiopmnfgnMkR3kMukFBDsiyy23LZvUCpiUwjTRx6ezYCjJODXrh52rBR9oXvm+Fp5wg==", + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.24.0.tgz", + "integrity": "sha512-xrNcGDU0OxVcPTH/8n/ShH4UevZxKIO6HJFK0e15XItZP2UcaiLFd5kiX7hJnqCbSztUF8Qot+JWBC/QXRPYWQ==", "cpu": [ "ia32" ], @@ -1120,9 +1196,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.21.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.21.0.tgz", - "integrity": "sha512-2jsCDZwtQvRhejHLfZ1JY6w6kEuEtfF9nzYsZxzSlNVKDX+DpsDJ+Rbjkm74nvg2rdx0gwBS+IMdvwJuq3S9pQ==", + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.24.0.tgz", + "integrity": "sha512-fbMkAF7fufku0N2dE5TBXcNlg0pt0cJue4xBRE2Qc5Vqikxr4VCgKj/ht6SMdFcOacVA9rqF70APJ8RN/4vMJw==", "cpu": [ "x64" ], @@ -1145,7 +1221,6 @@ "resolved": "https://registry.npmjs.org/@sindresorhus/merge-streams/-/merge-streams-2.3.0.tgz", "integrity": "sha512-LtoMMhxAlorcGhmFYI+LhPgbPZCkgP6ra1YL604EeF6U98pLlQ3iWIGMdWSC+vWmPBWBNgmDBAhnAobLROJmwg==", "license": "MIT", - "peer": true, "engines": { "node": ">=18" }, @@ -1154,9 +1229,9 @@ } }, "node_modules/@types/estree": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", - "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", + "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", "dev": true, "license": "MIT" }, @@ -1168,11 +1243,14 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "18.13.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.13.0.tgz", - "integrity": "sha512-gC3TazRzGoOnoKAhUx+Q0t8S9Tzs74z7m0ipwGpSqQrleP14hKxP4/JUeEQcD3W1/aIpnWl8pHowI7WokuZpXg==", + "version": "22.7.5", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.7.5.tgz", + "integrity": "sha512-jML7s2NAzMWc//QSJ1a3prpk78cOPchGvXJsC3C6R6PSMoooztvRVQEz89gmBTBY1SPMaqo5teB4uNHPdetShQ==", "dev": true, - "license": "MIT" + "license": "MIT", + "dependencies": { + "undici-types": "~6.19.2" + } }, "node_modules/@types/prettier": { "version": "2.7.3", @@ -1432,11 +1510,10 @@ } }, "node_modules/@typespec/compiler": { - "version": "0.59.1", - "resolved": "https://registry.npmjs.org/@typespec/compiler/-/compiler-0.59.1.tgz", - "integrity": "sha512-O2ljgr6YoFaIH6a8lWc90/czdv4B2X6N9wz4WsnQnVvgO0Tj0s+3xkvp4Tv59RKMhT0f3fK6dL8oEGO32FYk1A==", + "version": "0.60.0", + "resolved": "https://registry.npmjs.org/@typespec/compiler/-/compiler-0.60.0.tgz", + "integrity": "sha512-qAS99tJv6RvxSescfxRVal4QWSfdf3BzIOgE8+Az6emL68aTE/W8zQ0Ijpgmhax7sC2AnLTxCK1tM9kj1YguRw==", "license": "MIT", - "peer": true, "dependencies": { "@babel/code-frame": "~7.24.7", "ajv": "~8.17.1", @@ -1461,12 +1538,17 @@ "node": ">=18.0.0" } }, + "node_modules/@typespec/compiler/node_modules/picocolors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz", + "integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==", + "license": "ISC" + }, "node_modules/@typespec/compiler/node_modules/prettier": { "version": "3.3.3", "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.3.tgz", "integrity": "sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==", "license": "MIT", - "peer": true, "bin": { "prettier": "bin/prettier.cjs" }, @@ -1478,74 +1560,113 @@ } }, "node_modules/@typespec/http": { - "version": "0.59.1", - "resolved": "https://registry.npmjs.org/@typespec/http/-/http-0.59.1.tgz", - "integrity": "sha512-Ai8oCAO+Bw1HMSZ9gOI5Od4fNn/ul4HrVtTB01xFuLK6FQj854pxhzao8ylPnr7gIRQ327FV12/QfXR87yCiYQ==", + "version": "0.60.0", + "resolved": "https://registry.npmjs.org/@typespec/http/-/http-0.60.0.tgz", + "integrity": "sha512-ktfS9vpHfltyeAaQLNAZdqrn6Per3vmB/HDH/iyudYLA5wWblT1siKvpFCMWq53CJorRO7yeOKv+Q/M26zwEtg==", "license": "MIT", - "peer": true, "engines": { "node": ">=18.0.0" }, "peerDependencies": { - "@typespec/compiler": "~0.59.0" + "@typespec/compiler": "~0.60.0" } }, "node_modules/@typespec/http-client-csharp": { - "version": "0.1.9-alpha.20240913.1", - "resolved": "https://registry.npmjs.org/@typespec/http-client-csharp/-/http-client-csharp-0.1.9-alpha.20240913.1.tgz", - "integrity": "sha512-VBBjSXpngPDQadC5QlIRBQMQCtyDqG423C+2Qh0p+eHKzugedc/MgGIP8hOj0MMuqpqWqYp4akiA5XHEhsUHRA==", + "version": "0.1.9-alpha.20241010.1", + "resolved": "https://registry.npmjs.org/@typespec/http-client-csharp/-/http-client-csharp-0.1.9-alpha.20241010.1.tgz", + "integrity": "sha512-gmVr7hG/PvQ0HsAqxB1bxfCiA9qR7pU22RVRDSCxbScRkyN0z8XBtEOxBGCX9y/ut3nMyNakxfK/FVG+I+WOyQ==", + "license": "MIT", "dependencies": { "json-serialize-refs": "0.1.0-0" }, "peerDependencies": { - "@azure-tools/typespec-azure-core": ">=0.44.0 <1.0.0 || ~0.45.0-0 || ~0.46.0-0", - "@azure-tools/typespec-client-generator-core": ">=0.44.0 <1.0.0 || ~0.45.0-0 || ~0.46.0-0", - "@typespec/compiler": ">=0.58.0 <1.0.0 || ~0.59.0-0 || ~0.60.0-0", - "@typespec/http": ">=0.58.0 <1.0.0 || ~0.59.0-0 || ~0.60.0-0", - "@typespec/openapi": ">=0.58.0 <1.0.0 || ~0.59.0-0 || ~0.60.0-0", - "@typespec/rest": ">=0.58.0 <1.0.0 || ~0.59.0-0 || ~0.60.0-0", - "@typespec/versioning": ">=0.58.0 <1.0.0 || ~0.59.0-0 || ~0.60.0-0" + "@azure-tools/typespec-azure-core": ">=0.46.0 <1.0.0 || ~0.47.0-0", + "@azure-tools/typespec-client-generator-core": ">=0.46.0 <1.0.0 || ~0.47.0-0", + "@typespec/compiler": ">=0.60.0 <1.0.0 || ~0.61.0-0", + "@typespec/http": ">=0.60.0 <1.0.0 || ~0.61.0-0", + "@typespec/openapi": ">=0.60.0 <1.0.0 || ~0.61.0-0", + "@typespec/rest": ">=0.60.0 <1.0.0 || ~0.61.0-0", + "@typespec/versioning": ">=0.60.0 <1.0.0 || ~0.61.0-0" + } + }, + "node_modules/@typespec/json-schema": { + "version": "0.60.0", + "resolved": "https://registry.npmjs.org/@typespec/json-schema/-/json-schema-0.60.0.tgz", + "integrity": "sha512-TXtQH82CVtrDjiHjTCE/hHeizC/4DmvTFMmB/64cgC8QIp+C32tmyAv4/iXT6l8ovwB32btL9pAfczKiIxUIZw==", + "dev": true, + "license": "MIT", + "dependencies": { + "yaml": "~2.4.5" + }, + "engines": { + "node": ">=18.0.0" + }, + "peerDependencies": { + "@typespec/compiler": "~0.60.0" + } + }, + "node_modules/@typespec/library-linter": { + "version": "0.60.0", + "resolved": "https://registry.npmjs.org/@typespec/library-linter/-/library-linter-0.60.0.tgz", + "integrity": "sha512-PGcC+x7T/uq4KvbSm2uv/Eq7jZ6p1N0XynOjJZYx/+GjtB4M7mjAsmcQpuU7yKHfLJz3lfNmtXoAUgKKpC4FDw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "@typespec/compiler": "~0.60.0" } }, "node_modules/@typespec/openapi": { - "version": "0.59.0", - "resolved": "https://registry.npmjs.org/@typespec/openapi/-/openapi-0.59.0.tgz", - "integrity": "sha512-do1Dm5w0MuK3994gYTBg6qMfgeIxmmsDqnz3zimYKMPpbnUBi4F6/o4iCfn0Fn9kaNl+H6UlOzZpsZW9xHui1Q==", + "version": "0.60.0", + "resolved": "https://registry.npmjs.org/@typespec/openapi/-/openapi-0.60.0.tgz", + "integrity": "sha512-YVwLppgHY8r/MudHNSLSUXzdw+CIpjmb31gI2a0KDGnI6sWDwY7LSWfjGU4TY/ubt0+X0Tjoy330mTvw71YBTg==", "license": "MIT", - "peer": true, "engines": { "node": ">=18.0.0" }, "peerDependencies": { - "@typespec/compiler": "~0.59.0", - "@typespec/http": "~0.59.0" + "@typespec/compiler": "~0.60.0", + "@typespec/http": "~0.60.0" } }, "node_modules/@typespec/rest": { - "version": "0.59.1", - "resolved": "https://registry.npmjs.org/@typespec/rest/-/rest-0.59.1.tgz", - "integrity": "sha512-uKU431jBYL2tVQWG5THA75+OtXDa1e8cMAafYK/JJRRiVRd8D/Epd8fp07dzlB8tFGrhCaGlekRMqFPFrHh2/A==", + "version": "0.60.0", + "resolved": "https://registry.npmjs.org/@typespec/rest/-/rest-0.60.0.tgz", + "integrity": "sha512-mHYubyuBvwdV2xkHrJfPwV7b/Ksyb9lA1Q/AQwpVFa7Qu1X075TBVALmH+hK3V0EdUG1CGJZ5Sw4BWgl8ZS0BA==", "license": "MIT", - "peer": true, "engines": { "node": ">=18.0.0" }, "peerDependencies": { - "@typespec/compiler": "~0.59.0", - "@typespec/http": "~0.59.1" + "@typespec/compiler": "~0.60.0", + "@typespec/http": "~0.60.0" } }, "node_modules/@typespec/versioning": { - "version": "0.59.0", - "resolved": "https://registry.npmjs.org/@typespec/versioning/-/versioning-0.59.0.tgz", - "integrity": "sha512-aihO/ux0lLmsuYAdGVkiBflSudcZokYG42SELk1FtMFo609G3Pd7ep7hau6unBnMIceQZejB0ow5UGRupK4X5A==", + "version": "0.60.0", + "resolved": "https://registry.npmjs.org/@typespec/versioning/-/versioning-0.60.0.tgz", + "integrity": "sha512-SqxCQ9qMw5fdR7WP6/GFLzwcFwxhv+uHlzJGVcTd1GtIAu5qj2X4VmzFuNQyu+QenI+5uOSrEEywEXn0YRTZSg==", + "license": "MIT", + "engines": { + "node": ">=18.0.0" + }, + "peerDependencies": { + "@typespec/compiler": "~0.60.0" + } + }, + "node_modules/@typespec/xml": { + "version": "0.60.0", + "resolved": "https://registry.npmjs.org/@typespec/xml/-/xml-0.60.0.tgz", + "integrity": "sha512-Cr1Vih4ovB1OKHJNrXf23Bq4IiVNGlf7F6kN5Yfc7UDqxy+hiCfuwXfjlu3ida/bYTalGPd4/KL9EAx+m41Bxw==", + "dev": true, "license": "MIT", - "peer": true, "engines": { "node": ">=18.0.0" }, "peerDependencies": { - "@typespec/compiler": "~0.59.0" + "@typespec/compiler": "~0.60.0" } }, "node_modules/@ungap/structured-clone": { @@ -1732,9 +1853,9 @@ } }, "node_modules/acorn-walk": { - "version": "8.3.3", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.3.tgz", - "integrity": "sha512-MxXdReSRhGO7VlFe1bRG/oI7/mdLV9B9JJT0N8vZOhF7gFRR5l3M8W9G8JxmKV+JC5mGqJ0QvqfSOLsCPa4nUw==", + "version": "8.3.4", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.4.tgz", + "integrity": "sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==", "dev": true, "license": "MIT", "dependencies": { @@ -1749,7 +1870,6 @@ "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", "license": "MIT", - "peer": true, "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", @@ -1775,7 +1895,6 @@ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "license": "MIT", - "peer": true, "dependencies": { "color-convert": "^1.9.0" }, @@ -1910,7 +2029,6 @@ "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", "license": "MIT", - "peer": true, "dependencies": { "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", @@ -1924,8 +2042,7 @@ "version": "5.4.4", "resolved": "https://registry.npmjs.org/change-case/-/change-case-5.4.4.tgz", "integrity": "sha512-HRQyTk2/YPEkt9TnUPbOpr64Uw3KOicFWPVBb+xiHvd6eBx/qPr9xqfBFDT8P2vWsvvz4jbEkfDe71W3VyNu2w==", - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/check-error": { "version": "1.0.3", @@ -1959,7 +2076,6 @@ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", "license": "MIT", - "peer": true, "dependencies": { "color-name": "1.1.3" } @@ -1968,8 +2084,7 @@ "version": "1.1.3", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/concat-map": { "version": "0.0.1", @@ -1979,9 +2094,9 @@ "license": "MIT" }, "node_modules/confbox": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/confbox/-/confbox-0.1.7.tgz", - "integrity": "sha512-uJcB/FKZtBMCJpK8MQji6bJHgu1tixKPxRLeGkNzBoOZzpnZUJm0jm2/sBDWcuBx1dYgxV4JU+g5hmNxCyAmdA==", + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/confbox/-/confbox-0.1.8.tgz", + "integrity": "sha512-RMtmw0iFkeR4YV+fUOSucriAQNb9g8zFR52MWCtl+cCZOFRNL6zeB395vPzFhEjjn4fMxXudmELnl/KF/WrK6w==", "dev": true, "license": "MIT" }, @@ -2076,13 +2191,13 @@ } }, "node_modules/debug": { - "version": "4.3.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.6.tgz", - "integrity": "sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg==", + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", + "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", "dev": true, "license": "MIT", "dependencies": { - "ms": "2.1.2" + "ms": "^2.1.3" }, "engines": { "node": ">=6.0" @@ -2212,9 +2327,9 @@ } }, "node_modules/escalade": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", - "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", "license": "MIT", "engines": { "node": ">=6" @@ -2225,23 +2340,23 @@ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", "license": "MIT", - "peer": true, "engines": { "node": ">=0.8.0" } }, "node_modules/eslint": { - "version": "8.57.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz", - "integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==", + "version": "8.57.1", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.1.tgz", + "integrity": "sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA==", + "deprecated": "This version is no longer supported. Please see https://eslint.org/version-support for other options.", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", "@eslint/eslintrc": "^2.1.4", - "@eslint/js": "8.57.0", - "@humanwhocodes/config-array": "^0.11.14", + "@eslint/js": "8.57.1", + "@humanwhocodes/config-array": "^0.13.0", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", "@ungap/structured-clone": "^1.2.0", @@ -2317,9 +2432,9 @@ } }, "node_modules/eslint/node_modules/@eslint/js": { - "version": "8.57.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz", - "integrity": "sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==", + "version": "8.57.1", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.1.tgz", + "integrity": "sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==", "dev": true, "license": "MIT", "engines": { @@ -2409,19 +2524,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/eslint/node_modules/glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.3" - }, - "engines": { - "node": ">=10.13.0" - } - }, "node_modules/eslint/node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -2572,6 +2674,18 @@ "node": ">=8.6.0" } }, + "node_modules/fast-glob/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", @@ -2587,11 +2701,10 @@ "license": "MIT" }, "node_modules/fast-uri": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.0.1.tgz", - "integrity": "sha512-MWipKbbYiYI0UC7cl8m/i/IWTqfC8YXsqjzybjddLsFjStroQzsHXkc73JutMvBiXmOvapk+axIl79ig5t55Bw==", - "license": "MIT", - "peer": true + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.0.2.tgz", + "integrity": "sha512-GR6f0hD7XXyNJa25Tb9BuIdN0tdr+0BMi6/CJPH3wJO1JjNG3n/VsSw38AwRdKZABm8lGbPfakLRkYzx2V9row==", + "license": "MIT" }, "node_modules/fastq": { "version": "1.17.1", @@ -2784,15 +2897,16 @@ } }, "node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, "license": "ISC", "dependencies": { - "is-glob": "^4.0.1" + "is-glob": "^4.0.3" }, "engines": { - "node": ">= 6" + "node": ">=10.13.0" } }, "node_modules/globals": { @@ -2816,7 +2930,6 @@ "resolved": "https://registry.npmjs.org/globby/-/globby-14.0.2.tgz", "integrity": "sha512-s3Fq41ZVh7vbbe2PN3nrW7yC7U7MFVc5c98/iTl9c2GawNMKx/J648KQRW6WKkuU8GIbbh2IXfIRQjOZnXcTnw==", "license": "MIT", - "peer": true, "dependencies": { "@sindresorhus/merge-streams": "^2.1.0", "fast-glob": "^3.3.2", @@ -2844,7 +2957,6 @@ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", "license": "MIT", - "peer": true, "engines": { "node": ">=4" } @@ -3094,8 +3206,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/js-yaml": { "version": "4.1.0", @@ -3121,8 +3232,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/json-serialize-refs": { "version": "0.1.0-0", @@ -3152,7 +3262,6 @@ "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", "license": "MIT", - "peer": true, "engines": { "node": ">=6" } @@ -3229,9 +3338,9 @@ "license": "ISC" }, "node_modules/magic-string": { - "version": "0.30.11", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.11.tgz", - "integrity": "sha512-+Wri9p0QHMy+545hKww7YAu5NyzF8iomPL/RQazugQ9+Ez4Ic3mERMd8ZTX5rfK944j+560ZJi8iAwgak1Ac7A==", + "version": "0.30.12", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.12.tgz", + "integrity": "sha512-Ea8I3sQMVXr8JhN4z+H/d8zwo+tYDgHE9+5G4Wnrwhs0gaK9fXTKx0Tw5Xwsd/bCPTTZNRAdpyzvoeORe9LYpw==", "dev": true, "license": "MIT", "dependencies": { @@ -3239,14 +3348,14 @@ } }, "node_modules/magicast": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/magicast/-/magicast-0.3.4.tgz", - "integrity": "sha512-TyDF/Pn36bBji9rWKHlZe+PZb6Mx5V8IHCSxk7X4aljM4e/vyDvZZYwHewdVaqiA0nb3ghfHU/6AUpDxWoER2Q==", + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/magicast/-/magicast-0.3.5.tgz", + "integrity": "sha512-L0WhttDl+2BOsybvEOLK7fW3UA0OQ0IQ2d6Zl2x/a6vVRs3bAY0ECOSHHeL5jD+SbOpOCUEi0y1DgHEn9Qn1AQ==", "dev": true, "license": "MIT", "dependencies": { - "@babel/parser": "^7.24.4", - "@babel/types": "^7.24.0", + "@babel/parser": "^7.25.4", + "@babel/types": "^7.25.4", "source-map-js": "^1.2.0" } }, @@ -3283,9 +3392,9 @@ } }, "node_modules/micromatch": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.7.tgz", - "integrity": "sha512-LPP/3KorzCwBxfeUuZmaR6bG2kdeHSbe0P2tY3FLRU4vYrjYz5hI4QZwV0njUx3jeuKe67YukQ1LSPZBKDqO/Q==", + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", "license": "MIT", "dependencies": { "braces": "^3.0.3", @@ -3345,16 +3454,16 @@ } }, "node_modules/mlly": { - "version": "1.7.1", - "resolved": "https://registry.npmjs.org/mlly/-/mlly-1.7.1.tgz", - "integrity": "sha512-rrVRZRELyQzrIUAVMHxP97kv+G786pHmOKzuFII8zDYahFBS7qnHh2AlYSl1GAHhaMPCz6/oHjVMcfFYgFYHgA==", + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/mlly/-/mlly-1.7.2.tgz", + "integrity": "sha512-tN3dvVHYVz4DhSXinXIk7u9syPYaJvio118uomkovAtWBT+RdbP6Lfh/5Lvo519YMmwBafwlh20IPTXIStscpA==", "dev": true, "license": "MIT", "dependencies": { - "acorn": "^8.11.3", + "acorn": "^8.12.1", "pathe": "^1.1.2", - "pkg-types": "^1.1.1", - "ufo": "^1.5.3" + "pkg-types": "^1.2.0", + "ufo": "^1.5.4" } }, "node_modules/mrmime": { @@ -3368,9 +3477,9 @@ } }, "node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "dev": true, "license": "MIT" }, @@ -3379,7 +3488,6 @@ "resolved": "https://registry.npmjs.org/mustache/-/mustache-4.2.0.tgz", "integrity": "sha512-71ippSywq5Yb7/tVYyGbkBggbU8H3u5Rz56fH60jGFgr8uHwxs+aSKeqmluIVzM0m0kB7xQjKS6qPfd0b2ZoqQ==", "license": "MIT", - "peer": true, "bin": { "mustache": "bin/mustache" } @@ -3527,9 +3635,9 @@ } }, "node_modules/package-json-from-dist": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.0.tgz", - "integrity": "sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", + "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", "dev": true, "license": "BlueOak-1.0.0" }, @@ -3598,7 +3706,6 @@ "resolved": "https://registry.npmjs.org/path-type/-/path-type-5.0.0.tgz", "integrity": "sha512-5HviZNaZcfqP95rwpv+1HDgUamezbqdSYTyzjTvwtJSnIH+3vnbmWsItli8OFEndS984VT55M3jduxZbX351gg==", "license": "MIT", - "peer": true, "engines": { "node": ">=12" }, @@ -3624,9 +3731,9 @@ } }, "node_modules/picocolors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz", - "integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.0.tgz", + "integrity": "sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw==", "license": "ISC" }, "node_modules/picomatch": { @@ -3642,14 +3749,14 @@ } }, "node_modules/pkg-types": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-1.1.3.tgz", - "integrity": "sha512-+JrgthZG6m3ckicaOB74TwQ+tBWsFl3qVQg7mN8ulwSOElJ7gBhKzj2VkCPnZ4NlF6kEquYU+RIYNVAvzd54UA==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-1.2.1.tgz", + "integrity": "sha512-sQoqa8alT3nHjGuTjuKgOnvjo4cljkufdtLMnO2LBP/wRwuDlo1tkaEdMxCRhyGRPacv/ztlZgDPm2b7FAmEvw==", "dev": true, "license": "MIT", "dependencies": { - "confbox": "^0.1.7", - "mlly": "^1.7.1", + "confbox": "^0.1.8", + "mlly": "^1.7.2", "pathe": "^1.1.2" } }, @@ -3658,15 +3765,14 @@ "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-8.0.0.tgz", "integrity": "sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==", "license": "MIT", - "peer": true, "engines": { "node": ">=4" } }, "node_modules/postcss": { - "version": "8.4.41", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.41.tgz", - "integrity": "sha512-TesUflQ0WKZqAvg52PWL6kHgLKP6xB6heTOdoYM0Wt2UHyxNa4K25EZZMgKns3BH1RLVbZCREPpLY0rhnNoHVQ==", + "version": "8.4.47", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.47.tgz", + "integrity": "sha512-56rxCq7G/XfB4EkXq9Egn5GCqugWvDFjafDOThIdMBsI15iqPqR5r15TfSr1YPYeEI19YeaXMCbY6u88Y76GLQ==", "dev": true, "funding": [ { @@ -3685,8 +3791,8 @@ "license": "MIT", "dependencies": { "nanoid": "^3.3.7", - "picocolors": "^1.0.1", - "source-map-js": "^1.2.0" + "picocolors": "^1.1.0", + "source-map-js": "^1.2.1" }, "engines": { "node": "^10 || ^12 || >=14" @@ -3758,7 +3864,6 @@ "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==", "license": "MIT", - "peer": true, "dependencies": { "kleur": "^3.0.3", "sisteransi": "^1.0.5" @@ -3831,7 +3936,6 @@ "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", "license": "MIT", - "peer": true, "engines": { "node": ">=0.10.0" } @@ -3920,13 +4024,13 @@ } }, "node_modules/rollup": { - "version": "4.21.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.21.0.tgz", - "integrity": "sha512-vo+S/lfA2lMS7rZ2Qoubi6I5hwZwzXeUIctILZLbHI+laNtvhhOIon2S1JksA5UEDQ7l3vberd0fxK44lTYjbQ==", + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.24.0.tgz", + "integrity": "sha512-DOmrlGSXNk1DM0ljiQA+i+o0rSLhtii1je5wgk60j49d1jHT5YYttBv1iWOnYSTG+fZZESUOSNiAl89SIet+Cg==", "dev": true, "license": "MIT", "dependencies": { - "@types/estree": "1.0.5" + "@types/estree": "1.0.6" }, "bin": { "rollup": "dist/bin/rollup" @@ -3936,22 +4040,22 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.21.0", - "@rollup/rollup-android-arm64": "4.21.0", - "@rollup/rollup-darwin-arm64": "4.21.0", - "@rollup/rollup-darwin-x64": "4.21.0", - "@rollup/rollup-linux-arm-gnueabihf": "4.21.0", - "@rollup/rollup-linux-arm-musleabihf": "4.21.0", - "@rollup/rollup-linux-arm64-gnu": "4.21.0", - "@rollup/rollup-linux-arm64-musl": "4.21.0", - "@rollup/rollup-linux-powerpc64le-gnu": "4.21.0", - "@rollup/rollup-linux-riscv64-gnu": "4.21.0", - "@rollup/rollup-linux-s390x-gnu": "4.21.0", - "@rollup/rollup-linux-x64-gnu": "4.21.0", - "@rollup/rollup-linux-x64-musl": "4.21.0", - "@rollup/rollup-win32-arm64-msvc": "4.21.0", - "@rollup/rollup-win32-ia32-msvc": "4.21.0", - "@rollup/rollup-win32-x64-msvc": "4.21.0", + "@rollup/rollup-android-arm-eabi": "4.24.0", + "@rollup/rollup-android-arm64": "4.24.0", + "@rollup/rollup-darwin-arm64": "4.24.0", + "@rollup/rollup-darwin-x64": "4.24.0", + "@rollup/rollup-linux-arm-gnueabihf": "4.24.0", + "@rollup/rollup-linux-arm-musleabihf": "4.24.0", + "@rollup/rollup-linux-arm64-gnu": "4.24.0", + "@rollup/rollup-linux-arm64-musl": "4.24.0", + "@rollup/rollup-linux-powerpc64le-gnu": "4.24.0", + "@rollup/rollup-linux-riscv64-gnu": "4.24.0", + "@rollup/rollup-linux-s390x-gnu": "4.24.0", + "@rollup/rollup-linux-x64-gnu": "4.24.0", + "@rollup/rollup-linux-x64-musl": "4.24.0", + "@rollup/rollup-win32-arm64-msvc": "4.24.0", + "@rollup/rollup-win32-ia32-msvc": "4.24.0", + "@rollup/rollup-win32-x64-msvc": "4.24.0", "fsevents": "~2.3.2" } }, @@ -4059,15 +4163,13 @@ "version": "1.0.5", "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/slash": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/slash/-/slash-5.1.0.tgz", "integrity": "sha512-ZA6oR3T/pEyuqwMgAKT0/hAv8oAXckzbkmR0UkUosQ+Mc4RxGoJkRmwHgHufaenlyAgE1Mxgpdcrf75y6XcnDg==", "license": "MIT", - "peer": true, "engines": { "node": ">=14.16" }, @@ -4076,9 +4178,9 @@ } }, "node_modules/source-map-js": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz", - "integrity": "sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", "dev": true, "license": "BSD-3-Clause", "engines": { @@ -4213,7 +4315,6 @@ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", "license": "MIT", - "peer": true, "dependencies": { "has-flag": "^3.0.0" }, @@ -4226,7 +4327,6 @@ "resolved": "https://registry.npmjs.org/temporal-polyfill/-/temporal-polyfill-0.2.5.tgz", "integrity": "sha512-ye47xp8Cb0nDguAhrrDS1JT1SzwEV9e26sSsrWzVu+yPZ7LzceEcH0i2gci9jWfOfSCCgM3Qv5nOYShVUUFUXA==", "license": "MIT", - "peer": true, "dependencies": { "temporal-spec": "^0.2.4" } @@ -4235,8 +4335,7 @@ "version": "0.2.4", "resolved": "https://registry.npmjs.org/temporal-spec/-/temporal-spec-0.2.4.tgz", "integrity": "sha512-lDMFv4nKQrSjlkHKAlHVqKrBG4DyFfa9F74cmBZ3Iy3ed8yvWnlWSIdi4IKfSqwmazAohBNwiN64qGx4y5Q3IQ==", - "license": "ISC", - "peer": true + "license": "ISC" }, "node_modules/test-exclude": { "version": "6.0.0", @@ -4413,9 +4512,9 @@ } }, "node_modules/typescript": { - "version": "5.4.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz", - "integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==", + "version": "5.6.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.3.tgz", + "integrity": "sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==", "dev": true, "license": "Apache-2.0", "bin": { @@ -4460,12 +4559,18 @@ "dev": true, "license": "MIT" }, + "node_modules/undici-types": { + "version": "6.19.8", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", + "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==", + "dev": true, + "license": "MIT" + }, "node_modules/unicorn-magic": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/unicorn-magic/-/unicorn-magic-0.1.0.tgz", "integrity": "sha512-lRfVq8fE8gz6QMBuDM6a+LO3IAzTi05H6gCVaUpir2E1Rwpo4ZUog45KpNXKC/Mn3Yb9UDuHumeFTo9iV/D9FQ==", "license": "MIT", - "peer": true, "engines": { "node": ">=18" }, @@ -4516,14 +4621,14 @@ } }, "node_modules/vite": { - "version": "5.4.2", - "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.2.tgz", - "integrity": "sha512-dDrQTRHp5C1fTFzcSaMxjk6vdpKvT+2/mIdE07Gw2ykehT49O0z/VHS3zZ8iV/Gh8BJJKHWOe5RjaNrW5xf/GA==", + "version": "5.4.8", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.8.tgz", + "integrity": "sha512-FqrItQ4DT1NC4zCUqMB4c4AZORMKIa0m8/URVCZ77OZ/QSNeJ54bU1vrFADbDsuwfIPcgknRkmqakQcgnL4GiQ==", "dev": true, "license": "MIT", "dependencies": { "esbuild": "^0.21.3", - "postcss": "^8.4.41", + "postcss": "^8.4.43", "rollup": "^4.20.0" }, "bin": { @@ -4669,7 +4774,6 @@ "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-8.2.0.tgz", "integrity": "sha512-C+r0eKJUIfiDIfwJhria30+TYWPtuHJXHtI7J0YlOmKAo7ogxP20T0zxB7HZQIFhIyvoBPwWskjxrvAtfjyZfA==", "license": "MIT", - "peer": true, "engines": { "node": ">=14.0.0" } @@ -4679,7 +4783,6 @@ "resolved": "https://registry.npmjs.org/vscode-languageserver/-/vscode-languageserver-9.0.1.tgz", "integrity": "sha512-woByF3PDpkHFUreUa7Hos7+pUWdeWMXRd26+ZX2A8cFx6v/JPTtd4/uN0/jB6XQHYaOlHbio03NTHCqrgG5n7g==", "license": "MIT", - "peer": true, "dependencies": { "vscode-languageserver-protocol": "3.17.5" }, @@ -4692,7 +4795,6 @@ "resolved": "https://registry.npmjs.org/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.17.5.tgz", "integrity": "sha512-mb1bvRJN8SVznADSGWM9u/b07H7Ecg0I3OgXDuLdn307rl/J3A9YD6/eYOssqhecL27hK1IPZAsaqh00i/Jljg==", "license": "MIT", - "peer": true, "dependencies": { "vscode-jsonrpc": "8.2.0", "vscode-languageserver-types": "3.17.5" @@ -4702,15 +4804,13 @@ "version": "1.0.12", "resolved": "https://registry.npmjs.org/vscode-languageserver-textdocument/-/vscode-languageserver-textdocument-1.0.12.tgz", "integrity": "sha512-cxWNPesCnQCcMPeenjKKsOCKQZ/L6Tv19DTRIGuLWe32lyzWhihGVJ/rcckZXJxfdKCFvRLS3fpBIsV/ZGX4zA==", - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/vscode-languageserver-types": { "version": "3.17.5", "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.17.5.tgz", "integrity": "sha512-Ld1VelNuX9pdF39h2Hgaeb5hEZM2Z3jUrrMgWQAu82jMtZp7p3vJT3BzToKtZI7NgQssZje5o0zryOrhQvzQAg==", - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/which": { "version": "2.0.2", @@ -4891,7 +4991,6 @@ "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.4.5.tgz", "integrity": "sha512-aBx2bnqDzVOyNKfsysjA2ms5ZlnjSAW2eG3/L5G/CSujfjLJTJsEw1bGw8kCf04KodQWk1pxlGnZ56CRxiawmg==", "license": "ISC", - "peer": true, "bin": { "yaml": "bin.mjs" }, diff --git a/eng/packages/http-client-csharp/package.json b/eng/packages/http-client-csharp/package.json index c5e11dfd0d35..dec174ffa6a0 100644 --- a/eng/packages/http-client-csharp/package.json +++ b/eng/packages/http-client-csharp/package.json @@ -23,17 +23,39 @@ "dist/**" ], "dependencies": { - "@typespec/http-client-csharp": "0.1.9-alpha.20240913.1" + "@typespec/http-client-csharp": "0.1.9-alpha.20241010.1" + }, + "peerDependencies": { + "@azure-tools/typespec-azure-core": ">=0.46.0 <1.0.0 || ~0.47.0-0", + "@azure-tools/typespec-client-generator-core": ">=0.46.0 <1.0.0 || ~0.47.0-0", + "@typespec/compiler": ">=0.60.0 <1.0.0 || ~0.61.0-0", + "@typespec/http": ">=0.60.0 <1.0.0 || ~0.61.0-0", + "@typespec/openapi": ">=0.60.0 <1.0.0 || ~0.61.0-0", + "@typespec/rest": ">=0.60.0 <1.0.0 || ~0.61.0-0", + "@typespec/versioning": ">=0.60.0 <1.0.0 || ~0.61.0-0" }, "devDependencies": { + "@azure-tools/typespec-azure-core": "0.46.0", + "@azure-tools/typespec-client-generator-core": "0.46.2", + "@azure-tools/typespec-azure-resource-manager": "0.46.1", + "@azure-tools/typespec-azure-rulesets": "0.46.0", + "@azure-tools/typespec-autorest": "0.46.0", "@eslint/js": "^9.2.0", - "@types/node": "~18.13.0", + "@types/node": "~22.7.5", "@types/prettier": "^2.6.3", + "@typespec/compiler": "0.60.0", + "@typespec/http": "0.60.0", + "@typespec/json-schema": "0.60.0", + "@typespec/library-linter": "0.60.0", + "@typespec/openapi": "0.60.0", + "@typespec/rest": "0.60.0", + "@typespec/versioning": "0.60.0", + "@typespec/xml": "0.60.0", "@vitest/coverage-v8": "^1.4.0", "@vitest/ui": "^1.4.0", "c8": "^9.1.0", "rimraf": "~5.0.5", - "typescript": "~5.4.3", + "typescript": "~5.6.3", "vitest": "^1.4.0", "copyfiles": "^2.4.1", "eslint": "^8.57.0", diff --git a/eng/pipelines/templates/jobs/live.tests.yml b/eng/pipelines/templates/jobs/live.tests.yml index 93236df72152..6c7c51383662 100644 --- a/eng/pipelines/templates/jobs/live.tests.yml +++ b/eng/pipelines/templates/jobs/live.tests.yml @@ -132,28 +132,12 @@ jobs: displayName: Set TestResources Location - ${{ if parameters.DeployTestResources }}: - - ${{ if parameters.TestResourceDirectories }}: - - ${{ each directory in parameters.TestResourceDirectories }}: - - template: /eng/common/TestResources/deploy-test-resources.yml - parameters: - ${{ if or(parameters.Location, parameters.CloudConfig.Location) }}: - Location: ${{ coalesce(parameters.Location, parameters.CloudConfig.Location) }} - ServiceDirectory: '${{ directory }}' - TestResourcesDirectory: '$(TestResourcesDirectory)' - SubscriptionConfiguration: $(SubscriptionConfiguration) - ArmTemplateParameters: $(ArmTemplateParameters) - UseFederatedAuth: ${{ parameters.UseFederatedAuth }} - ServiceConnection: ${{ parameters.CloudConfig.ServiceConnection }} - SubscriptionConfigurationFilePaths: ${{ parameters.CloudConfig.SubscriptionConfigurationFilePaths }} - EnvVars: - Pool: $(Pool) - ${{ insert }}: ${{ parameters.EnvVars }} - - ${{ if not(parameters.TestResourceDirectories) }}: + - ${{ each directory in coalesce(parameters.TestResourceDirectories, split(parameters.ServiceDirectory, '|')) }}: - template: /eng/common/TestResources/deploy-test-resources.yml parameters: ${{ if or(parameters.Location, parameters.CloudConfig.Location) }}: Location: ${{ coalesce(parameters.Location, parameters.CloudConfig.Location) }} - ServiceDirectory: '${{ parameters.ServiceDirectory }}' + ServiceDirectory: '${{ directory }}' TestResourcesDirectory: '$(TestResourcesDirectory)' SubscriptionConfiguration: $(SubscriptionConfiguration) ArmTemplateParameters: $(ArmTemplateParameters) @@ -242,20 +226,10 @@ jobs: ${{ var.key }}: ${{ var.value }} - ${{ if parameters.DeployTestResources }}: - - ${{ if parameters.TestResourceDirectories }}: - - ${{ each directory in parameters.TestResourceDirectories }}: - - template: /eng/common/TestResources/remove-test-resources.yml - parameters: - ServiceDirectory: '${{ directory }}' - SubscriptionConfiguration: $(SubscriptionConfiguration) - UseFederatedAuth: ${{ parameters.UseFederatedAuth }} - ServiceConnection: ${{ parameters.CloudConfig.ServiceConnection }} - SubscriptionConfigurationFilePaths: ${{ parameters.CloudConfig.SubscriptionConfigurationFilePaths }} - - - ${{ if not(parameters.TestResourceDirectories) }}: + - ${{ each directory in coalesce(parameters.TestResourceDirectories, split(parameters.ServiceDirectory, '|')) }}: - template: /eng/common/TestResources/remove-test-resources.yml parameters: - ServiceDirectory: '${{ parameters.ServiceDirectory }}' + ServiceDirectory: '${{ directory }}' SubscriptionConfiguration: $(SubscriptionConfiguration) UseFederatedAuth: ${{ parameters.UseFederatedAuth }} ServiceConnection: ${{ parameters.CloudConfig.ServiceConnection }} diff --git a/eng/pipelines/templates/stages/archetype-net-release.yml b/eng/pipelines/templates/stages/archetype-net-release.yml index 47cd7ed9a7b8..06be144e9aa5 100644 --- a/eng/pipelines/templates/stages/archetype-net-release.yml +++ b/eng/pipelines/templates/stages/archetype-net-release.yml @@ -151,6 +151,14 @@ stages: image: azsdk-pool-mms-win-2022-1espt os: windows + templateContext: + outputs: + - ${{if ne(artifact.skipSymbolsUpload, 'true')}}: + - output: pipelineArtifact + displayName: 'Store converted symbols in ${{parameters.ArtifactName}}-symbols artifact' + targetPath: $(Build.ArtifactStagingDirectory)/symbols + artifactName: ${{parameters.ArtifactName}}-symbols + strategy: runOnce: deploy: diff --git a/eng/pipelines/templates/stages/archetype-sdk-tests.yml b/eng/pipelines/templates/stages/archetype-sdk-tests.yml index d694ed2ab118..61446b5e4025 100644 --- a/eng/pipelines/templates/stages/archetype-sdk-tests.yml +++ b/eng/pipelines/templates/stages/archetype-sdk-tests.yml @@ -54,26 +54,11 @@ parameters: type: object default: Public: - ServiceConnection: azure-sdk-tests - SubscriptionConfigurationFilePaths: - - eng/common/TestResources/sub-config/AzurePublicMsft.json - Preview: - ServiceConnection: azure-sdk-tests-preview - SubscriptionConfigurationFilePaths: - - eng/common/TestResources/sub-config/AzurePreviewMsft.json - Canary: - ServiceConnection: azure-sdk-tests - SubscriptionConfigurationFilePaths: - - eng/common/TestResources/sub-config/AzurePublicMsft.json - Location: 'eastus2euap' + # Canary regions are currently not supported in TME so disabling for now + # Canary: + # Location: 'eastus2euap' UsGov: - ServiceConnection: usgov_azure-sdk-tests - SubscriptionConfigurationFilePaths: - - eng/common/TestResources/sub-config/AzureUsGovMsft.json China: - ServiceConnection: china_azure-sdk-tests - SubscriptionConfigurationFilePaths: - - eng/common/TestResources/sub-config/AzureChinaMsft.json - name: MatrixConfigs type: object default: @@ -122,7 +107,6 @@ parameters: extends: template: /eng/pipelines/templates/stages/1es-redirect.yml parameters: - UseOfficial: false oneESTemplateTag: ${{ parameters.oneESTemplateTag }} stages: - ${{ each cloud in parameters.CloudConfig }}: @@ -175,8 +159,8 @@ extends: - ${{ parameters.MatrixReplace }} CloudConfig: SubscriptionConfiguration: ${{ cloud.value.SubscriptionConfiguration }} - ServiceConnection: ${{ cloud.value.ServiceConnection }} + ServiceConnection: ${{ coalesce(cloud.value.ServiceConnection, lower(format('azure-sdk-tests-{0}', cloud.key))) }} SubscriptionConfigurationFilePaths: ${{ cloud.value.SubscriptionConfigurationFilePaths }} SubscriptionConfigurations: ${{ cloud.value.SubscriptionConfigurations }} - Location: ${{ coalesce(parameters.Location, cloud.value.Location) }} + Location: ${{ coalesce(cloud.value.Location, parameters.Location) }} Cloud: ${{ cloud.key }} diff --git a/eng/scripts/automation/GenerateAndBuildLib.ps1 b/eng/scripts/automation/GenerateAndBuildLib.ps1 index 1bec3c7e9bed..d09b09f8df3c 100644 --- a/eng/scripts/automation/GenerateAndBuildLib.ps1 +++ b/eng/scripts/automation/GenerateAndBuildLib.ps1 @@ -771,6 +771,10 @@ function GeneratePackage() } if ($isGenerateSuccess) { + # update resourcemanager ci.mgmt.yml for mgmt sdk + if ($serviceType -eq "resource-manager") { + & $sdkRootPath/eng/scripts/Update-Mgmt-CI.ps1 + } # Build project when successfully generated the code Write-Host "Start to build sdk project: $srcPath" dotnet build $srcPath /p:RunApiCompat=$false diff --git a/eng/scripts/compatibility/Check-AOT-Compatibility.ps1 b/eng/scripts/compatibility/Check-AOT-Compatibility.ps1 index 3eb3422784d7..524c5614a279 100644 --- a/eng/scripts/compatibility/Check-AOT-Compatibility.ps1 +++ b/eng/scripts/compatibility/Check-AOT-Compatibility.ps1 @@ -72,7 +72,7 @@ if ($LASTEXITCODE -ne 0) Set-Location -Path .. Remove-Item -Path "./$folderPath" -Recurse -Force - Write-Host "\nFor help with this check, please see https://github.com/Azure/azure-sdk-for-net/tree/main/doc/dev/AotRegressionChecks.md" + Write-Host "`nFor help with this check, please see https://github.com/Azure/azure-sdk-for-net/tree/main/doc/dev/AotRegressionChecks.md" Exit 2 } @@ -104,7 +104,10 @@ if (Test-Path $expectedWarningsFullPath -PathType Leaf) { $numWarnings = $warnings.Count if ($numWarnings -gt 0) { - Write-Host "Found $numWarnings additional warnings that were not expected:`n$warnings" + Write-Host "Found $numWarnings additional warnings that were not expected:" + foreach ($warning in $warnings) { + Write-Host $warning + } } Write-Host "Deleting test app files." @@ -112,7 +115,7 @@ if (Test-Path $expectedWarningsFullPath -PathType Leaf) { Set-Location -Path .. Remove-Item -Path "./$folderPath" -Recurse -Force - Write-Host "\nFor help with this check, please see https://github.com/Azure/azure-sdk-for-net/tree/main/doc/dev/AotRegressionChecks.md" + Write-Host "`nFor help with this check, please see https://github.com/Azure/azure-sdk-for-net/tree/main/doc/dev/AotRegressionChecks.md" exit $warnings.Count } @@ -126,7 +129,10 @@ Write-Host "Checking against the list of expected warnings. There are $numExpect $warnings = $publishOutput -split "`n" | select-string -pattern 'IL\d+' | select-string -pattern '##' -notmatch | select-string -pattern $expectedWarnings -notmatch $numWarnings = $warnings.Count if ($numWarnings -gt 0) { - Write-Host "Found $numWarnings additional warnings that were not expected:`n$warnings" + Write-Host "Found $numWarnings additional warnings that were not expected:" + foreach ($warning in $warnings) { + Write-Host $warning + } } ### Cleanup ### @@ -138,9 +144,9 @@ Remove-Item -Path "./$folderPath" -Recurse -Force if ($numExpectedWarnings -ne $actualWarningCount) { Write-Host "The number of expected warnings ($numExpectedWarnings) was different than the actual warning count ($actualWarningCount)." - Write-Host "\nFor help with this check, please see https://github.com/Azure/azure-sdk-for-net/tree/main/doc/dev/AotRegressionChecks.md" + Write-Host "`nFor help with this check, please see https://github.com/Azure/azure-sdk-for-net/tree/main/doc/dev/AotRegressionChecks.md" exit 2 } -Write-Host "\nFor help with this check, please see https://github.com/Azure/azure-sdk-for-net/tree/main/doc/dev/AotRegressionChecks.md" +Write-Host "`nFor help with this check, please see https://github.com/Azure/azure-sdk-for-net/tree/main/doc/dev/AotRegressionChecks.md" exit $warnings.Count \ No newline at end of file diff --git a/samples/linecounter/LineCounter.csproj b/samples/linecounter/LineCounter.csproj index 62739695e163..28d165304d90 100644 --- a/samples/linecounter/LineCounter.csproj +++ b/samples/linecounter/LineCounter.csproj @@ -7,11 +7,11 @@ - - - + + + - + diff --git a/samples/linecounter/distributed-tracing-sample.sln b/samples/linecounter/distributed-tracing-sample.sln index 53778ba0f6a4..98186a0ae98a 100644 --- a/samples/linecounter/distributed-tracing-sample.sln +++ b/samples/linecounter/distributed-tracing-sample.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.29211.13 +# Visual Studio Version 17 +VisualStudioVersion = 17.11.35327.3 MinimumVisualStudioVersion = 10.0.40219.1 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LineCounter", "LineCounter.csproj", "{79D5BC2B-BF8C-4D72-A989-2ED0E03A235C}" EndProject diff --git a/sdk/advisor/Azure.ResourceManager.Advisor/CHANGELOG.md b/sdk/advisor/Azure.ResourceManager.Advisor/CHANGELOG.md index 6b505aa49b95..7cdc7404534a 100644 --- a/sdk/advisor/Azure.ResourceManager.Advisor/CHANGELOG.md +++ b/sdk/advisor/Azure.ResourceManager.Advisor/CHANGELOG.md @@ -5,6 +5,7 @@ ### Features Added - Enable the new model serialization by using the System.ClientModel, refer this [document](https://aka.ms/azsdk/net/mrw) for more details. +- Exposed `JsonModelWriteCore` for model serialization procedure. ### Breaking Changes diff --git a/sdk/agrifood/Azure.ResourceManager.AgFoodPlatform/CHANGELOG.md b/sdk/agrifood/Azure.ResourceManager.AgFoodPlatform/CHANGELOG.md index 94c519ecf141..2391fecae127 100644 --- a/sdk/agrifood/Azure.ResourceManager.AgFoodPlatform/CHANGELOG.md +++ b/sdk/agrifood/Azure.ResourceManager.AgFoodPlatform/CHANGELOG.md @@ -5,6 +5,7 @@ ### Features Added - Enable the new model serialization by using the System.ClientModel, refer this [document](https://aka.ms/azsdk/net/mrw) for more details. +- Exposed `JsonModelWriteCore` for model serialization procedure. ### Breaking Changes diff --git a/sdk/ai/Azure.AI.Inference/CHANGELOG.md b/sdk/ai/Azure.AI.Inference/CHANGELOG.md index 9e7a664d7747..12751b0b32da 100644 --- a/sdk/ai/Azure.AI.Inference/CHANGELOG.md +++ b/sdk/ai/Azure.AI.Inference/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 1.0.0-beta.2 (Unreleased) +## 1.0.0-beta.3 (Unreleased) ### Features Added @@ -10,6 +10,29 @@ ### Other Changes +## 1.0.0-beta.2 (2024-10-24) + +### Features Added +- Added new `EmbeddingsClient`, to provide support for generating text embeddings using supported models. +- Add support for passing a string file path on disk in order to provide an image for chat completions. + +### Breaking Changes +- `ChatCompletionsClientOptions` has been renamed to `AzureAIInferenceClientOptions`. +- `ChatCompletions` response object has been flattened. `ChatCompletions.Choices` has been removed, and the underlying properties have been bubbled up to be on the `ChatCompletions` object instead. +- `ChatCompletionsFunctionToolCall` has been replaced with `ChatCompletionsToolCall`. +- `ChatCompletionsFunctionToolDefinition` has been replaced with `ChatCompletionsToolDefinition`. +- `ChatCompletionsToolSelectionPreset` has been replaced with `ChatCompletionsToolChoicePreset`. +- `ChatCompletionsNamedFunctionToolSelection` has been replaced with `ChatCompletionsNamedToolChoice`. +- `ChatCompletionsFunctionToolSelection` has been replaced with `ChatCompletionsNamedToolChoiceFunction`. +- `StreamingChatCompletionsUpdate.AuthorName` has been removed +- Removed `extraParams` from the `complete` and `completeAsync` methods. It is now set implicitly if `additionalProperties` is provided in the options object. + +### Bugs Fixed +- Fixed support for chat completions streaming while using tools. + +### Other Changes +- Removed the need to manually provide an `api-key` header when talking to Azure OpenAI. + ## 1.0.0-beta.1 (2024-08-06) ### Features Added - Initial release, containing basic chat completions functionality diff --git a/sdk/ai/Azure.AI.Inference/README.md b/sdk/ai/Azure.AI.Inference/README.md index 7849ea1c1d19..06fa6cae04ab 100644 --- a/sdk/ai/Azure.AI.Inference/README.md +++ b/sdk/ai/Azure.AI.Inference/README.md @@ -53,7 +53,7 @@ The package includes `ChatCompletionsClient` +* [Text Embeddings](#text-embeddings-example) The examples create a client as mentioned in [Create and authenticate a client directly, using key](#create-and-authenticate-a-client-directly-using-key). Only mandatory input settings are shown for simplicity. @@ -165,7 +165,7 @@ This example demonstrates how to generate a single chat completions, with key au var endpoint = new Uri(System.Environment.GetEnvironmentVariable("AZURE_AI_CHAT_ENDPOINT")); var credential = new AzureKeyCredential(System.Environment.GetEnvironmentVariable("AZURE_AI_CHAT_KEY")); -var client = new ChatCompletionsClient(endpoint, credential, new ChatCompletionsClientOptions()); +var client = new ChatCompletionsClient(endpoint, credential, new AzureAIInferenceClientOptions()); var requestOptions = new ChatCompletionsOptions() { @@ -177,12 +177,12 @@ var requestOptions = new ChatCompletionsOptions() }; Response response = client.Complete(requestOptions); -System.Console.WriteLine(response.Value.Choices[0].Message.Content); +System.Console.WriteLine(response.Value.Content); ``` The following types or messages are supported: `SystemMessage`,`UserMessage`, `AssistantMessage`, `ToolMessage`. See also samples: -* [Sample5_ChatCompletionsWithImageUrl.md](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/ai/Azure.AI.Inference/samples/Sample5_ChatCompletionsWithImageUrl.md) for usage of `UserMessage` that includes sending an image URL. +* [Sample5_ChatCompletionsWithImages.md](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/ai/Azure.AI.Inference/samples/Sample5_ChatCompletionsWithImages.md) for usage of `UserMessage` that includes sending an image URL or image data from a local file. * [Sample7_ChatCompletionsWithTools.md](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/ai/Azure.AI.Inference/samples/Sample7_ChatCompletionsWithTools.md) for usage of `ToolMessage`. Alternatively, you can read a `BinaryData` object based on a JSON string instead of using the strongly typed classes like `ChatRequestSystemMessage` and `ChatRequestUserMessage`: @@ -191,7 +191,7 @@ Alternatively, you can read a `BinaryData` object based on a JSON string instead var endpoint = new Uri(System.Environment.GetEnvironmentVariable("AZURE_AI_CHAT_ENDPOINT")); var credential = new AzureKeyCredential(System.Environment.GetEnvironmentVariable("AZURE_AI_CHAT_KEY")); -var client = new ChatCompletionsClient(endpoint, credential, new ChatCompletionsClientOptions()); +var client = new ChatCompletionsClient(endpoint, credential, new AzureAIInferenceClientOptions()); var requestOptions = new ChatCompletionsOptions() { @@ -207,7 +207,7 @@ BinaryData messages = BinaryData.FromString(jsonMessages); requestOptions = ModelReaderWriter.Read(messages); Response response = client.Complete(requestOptions); -System.Console.WriteLine(response.Value.Choices[0].Message.Content); +System.Console.WriteLine(response.Value.Content); ``` To generate completions for additional messages, simply call `client.Complete` multiple times using the same `client`. @@ -220,7 +220,7 @@ This example demonstrates how to generate a single chat completions with streami var endpoint = new Uri(System.Environment.GetEnvironmentVariable("AZURE_AI_CHAT_ENDPOINT")); var credential = new AzureKeyCredential(System.Environment.GetEnvironmentVariable("AZURE_AI_CHAT_KEY")); -var client = new ChatCompletionsClient(endpoint, credential, new ChatCompletionsClientOptions()); +var client = new ChatCompletionsClient(endpoint, credential, new AzureAIInferenceClientOptions()); var requestOptions = new ChatCompletionsOptions() { @@ -255,15 +255,13 @@ In this example, extra JSON elements are inserted at the root of the request bod Note that by default, the service will reject any request payload that includes unknown parameters (ones that are not defined in the REST API [Request Body table](https://learn.microsoft.com/azure/ai-studio/reference/reference-model-inference-chat-completions#request-body)). In order to change the default service behaviour, when the `Complete` method includes `AdditonalProperties`, the client library will automatically add the HTTP request header `"unknown_params": "pass-through"`. - - Azure_AI_Inference_ChatCompletionsWithAdditionalPropertiesScenario ```C# Snippet:Azure_AI_Inference_ChatCompletionsWithAdditionalPropertiesScenario var endpoint = new Uri(System.Environment.GetEnvironmentVariable("AZURE_AI_CHAT_ENDPOINT")); var credential = new AzureKeyCredential(System.Environment.GetEnvironmentVariable("AZURE_AI_CHAT_KEY")); -var client = new ChatCompletionsClient(endpoint, credential, new ChatCompletionsClientOptions()); +var client = new ChatCompletionsClient(endpoint, credential, new AzureAIInferenceClientOptions()); var requestOptions = new ChatCompletionsOptions() { @@ -278,13 +276,25 @@ Response response = client.Complete(requestOptions); System.Console.WriteLine(response.Value.Choices[0].Message.Content); ``` - - 1.3.0 + 1.4.0 Azure.ResourceManager.Avs Microsoft Azure Resource Manager client SDK for Azure resource provider Microsoft.Avs. azure;management;arm;resource manager;avs diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Customized/ArmAvsModelFactory.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Customized/ArmAvsModelFactory.cs index 3a7a607cf9f7..0d16e08cfe5e 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Customized/ArmAvsModelFactory.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Customized/ArmAvsModelFactory.cs @@ -1,10 +1,11 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. +// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #nullable disable using System; using System.Collections.Generic; +using System.ComponentModel; using System.Linq; using System.Net; using Azure.Core; @@ -45,13 +46,230 @@ public static partial class ArmAvsModelFactory /// A secondary expressRoute circuit from a separate AZ. Only present in a stretched private cloud. /// Flag to indicate whether the private cloud has the quota for provisioned NSX Public IP count raised from 64 to 1024. /// A new instance for mocking. - public static AvsPrivateCloudData AvsPrivateCloudData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string skuName = null, ManagedServiceIdentity identity = null, AvsManagementCluster managementCluster = null, InternetConnectivityState? internet = null, IEnumerable identitySources = null, PrivateCloudAvailabilityProperties availability = null, CustomerManagedEncryption encryption = null, AvsPrivateCloudProvisioningState? provisioningState = null, ExpressRouteCircuit circuit = null, AvsPrivateCloudEndpoints endpoints = null, string networkBlock = null, string managementNetwork = null, string provisioningNetwork = null, string vMotionNetwork = null, string vCenterPassword = null, string nsxtPassword = null, string vCenterCertificateThumbprint = null, string nsxtCertificateThumbprint = null, IEnumerable externalCloudLinks = null, ExpressRouteCircuit secondaryCircuit = null, NsxPublicIPQuotaRaisedEnum? nsxPublicIPQuotaRaised = null) + [EditorBrowsable(EditorBrowsableState.Never)] + public static AvsPrivateCloudData AvsPrivateCloudData( + ResourceIdentifier id = null, + string name = null, + ResourceType resourceType = default, + ResourceManager.Models.SystemData systemData = null, + IDictionary tags = null, + AzureLocation location = default, + string skuName = null, + ManagedServiceIdentity identity = null, + AvsManagementCluster managementCluster = null, + InternetConnectivityState? internet = null, + IEnumerable identitySources = null, + PrivateCloudAvailabilityProperties availability = null, + CustomerManagedEncryption encryption = null, + AvsPrivateCloudProvisioningState? provisioningState = null, + ExpressRouteCircuit circuit = null, + AvsPrivateCloudEndpoints endpoints = null, + string networkBlock = null, + string managementNetwork = null, + string provisioningNetwork = null, + string vMotionNetwork = null, + string vCenterPassword = null, + string nsxtPassword = null, + string vCenterCertificateThumbprint = null, + string nsxtCertificateThumbprint = null, + IEnumerable externalCloudLinks = null, + ExpressRouteCircuit secondaryCircuit = null, + NsxPublicIPQuotaRaisedEnum? nsxPublicIPQuotaRaised = null) { - tags ??= new Dictionary(); - identitySources ??= new List(); - externalCloudLinks ??= new List(); + return AvsPrivateCloudData( + id: id, + name: name, + resourceType: resourceType, + systemData: systemData, + tags: tags, + location: location, + sku: skuName != null ? new AvsSku(skuName) : null, + identity: identity, + managementCluster: managementCluster, + internet: internet, + identitySources: identitySources?.ToList(), + availability: availability, + encryption: encryption, + extendedNetworkBlocks: new List(), + provisioningState: provisioningState, + circuit: circuit, + endpoints: endpoints, + networkBlock: networkBlock, + managementNetwork: managementNetwork, + provisioningNetwork: provisioningNetwork, + vMotionNetwork: vMotionNetwork, + vCenterPassword: vCenterPassword, + nsxtPassword: nsxtPassword, + vCenterCertificateThumbprint: vCenterCertificateThumbprint, + nsxtCertificateThumbprint: nsxtCertificateThumbprint, + externalCloudLinks: externalCloudLinks?.ToList(), + secondaryCircuit: secondaryCircuit, + nsxPublicIPQuotaRaised: nsxPublicIPQuotaRaised, + virtualNetworkId: null, + dnsZoneType: null + ); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The SKU (Stock Keeping Unit) assigned to this resource. + /// The managed service identities assigned to this resource. Current supported identity types: None, SystemAssigned. + /// The default cluster used for management. + /// Connectivity to internet is enabled or disabled. + /// vCenter Single Sign On Identity Sources. + /// Properties describing how the cloud is distributed across availability zones. + /// Customer managed key encryption, can be enabled or disabled. + /// + /// Array of additional networks noncontiguous with networkBlock. Networks must be + /// unique and non-overlapping across VNet in your subscription, on-premise, and + /// this privateCloud networkBlock attribute. Make sure the CIDR format conforms to + /// (A.B.C.D/X). + /// + /// The provisioning state. + /// An ExpressRoute Circuit. + /// The endpoints. + /// + /// The block of addresses should be unique across VNet in your subscription as + /// well as on-premise. Make sure the CIDR format is conformed to (A.B.C.D/X) where + /// A,B,C,D are between 0 and 255, and X is between 0 and 22 + /// + /// Network used to access vCenter Server and NSX-T Manager. + /// Used for virtual machine cold migration, cloning, and snapshot migration. + /// Used for live migration of virtual machines. + /// Optionally, set the vCenter admin password when the private cloud is created. + /// Optionally, set the NSX-T Manager password when the private cloud is created. + /// Thumbprint of the vCenter Server SSL certificate. + /// Thumbprint of the NSX-T Manager SSL certificate. + /// Array of cloud link IDs from other clouds that connect to this one. + /// + /// A secondary expressRoute circuit from a separate AZ. Only present in a + /// stretched private cloud + /// + /// + /// Flag to indicate whether the private cloud has the quota for provisioned NSX + /// Public IP count raised from 64 to 1024 + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public static AvsPrivateCloudData AvsPrivateCloudData( + ResourceIdentifier id, + string name, + ResourceType resourceType, + ResourceManager.Models.SystemData systemData, + IDictionary tags, + AzureLocation location, + string sku, + ManagedServiceIdentity identity, + AvsManagementCluster managementCluster, + InternetConnectivityState? internet, + IEnumerable identitySources, + PrivateCloudAvailabilityProperties availability, + CustomerManagedEncryption encryption, + IEnumerable extendedNetworkBlocks, + AvsPrivateCloudProvisioningState? provisioningState, + ExpressRouteCircuit circuit, + AvsPrivateCloudEndpoints endpoints, + string networkBlock, + string managementNetwork, + string provisioningNetwork, + string vMotionNetwork, + string vCenterPassword, + string nsxtPassword, + string vCenterCertificateThumbprint, + string nsxtCertificateThumbprint, + IEnumerable externalCloudLinks, + ExpressRouteCircuit secondaryCircuit, + NsxPublicIPQuotaRaisedEnum? nsxPublicIPQuotaRaised) + { + return AvsPrivateCloudData( + id: id, + name: name, + resourceType: resourceType, + systemData: systemData, + tags: tags, + location: location, + sku: sku != null ? new AvsSku(sku) : null, + identity: identity, + managementCluster: managementCluster, + internet: internet, + identitySources: identitySources?.ToList(), + availability: availability, + encryption: encryption, + extendedNetworkBlocks: extendedNetworkBlocks?.ToList(), + provisioningState: provisioningState, + circuit: circuit, + endpoints: endpoints, + networkBlock: networkBlock, + managementNetwork: managementNetwork, + provisioningNetwork: provisioningNetwork, + vMotionNetwork: vMotionNetwork, + vCenterPassword: vCenterPassword, + nsxtPassword: nsxtPassword, + vCenterCertificateThumbprint: vCenterCertificateThumbprint, + nsxtCertificateThumbprint: nsxtCertificateThumbprint, + externalCloudLinks: externalCloudLinks?.ToList(), + secondaryCircuit: secondaryCircuit, + nsxPublicIPQuotaRaised: nsxPublicIPQuotaRaised, + virtualNetworkId: null, + dnsZoneType: null + ); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The SKU (Stock Keeping Unit) assigned to this resource. + /// The cluster size. + /// The state of the cluster provisioning. + /// The identity. + /// The hosts. + [EditorBrowsable(EditorBrowsableState.Never)] + public static AvsPrivateCloudClusterData AvsPrivateCloudClusterData( + ResourceIdentifier id, + string name, + ResourceType resourceType, + ResourceManager.Models.SystemData systemData, + string sku, + int? clusterSize, + AvsPrivateCloudClusterProvisioningState? provisioningState, + int? clusterId, + IEnumerable hosts) + { + return AvsPrivateCloudClusterData( + id: id, + name: name, + resourceType: resourceType, + systemData: systemData, + sku: sku != null ? new AvsSku(sku) : null, + clusterSize: clusterSize, + provisioningState: provisioningState, + clusterId: clusterId, + hosts: hosts?.ToList(), + vsanDatastoreName: null + ); + } + /// Initializes a new instance of . + /// The cluster size. + /// The state of the cluster provisioning. + /// The identity. + /// The hosts. + /// A new instance for mocking. + public static CommonClusterProperties CommonClusterProperties(int? clusterSize = null, AvsPrivateCloudClusterProvisioningState? provisioningState = null, int? clusterId = null, IEnumerable hosts = null) + { + hosts ??= new List(); - return new AvsPrivateCloudData(id, name, resourceType, systemData, tags, location, skuName != null ? new AvsSku(skuName) : null, identity, managementCluster, internet, identitySources?.ToList(), availability, encryption, new List(), provisioningState, circuit, endpoints, networkBlock, managementNetwork, provisioningNetwork, vMotionNetwork, vCenterPassword, nsxtPassword, vCenterCertificateThumbprint, nsxtCertificateThumbprint, externalCloudLinks?.ToList(), secondaryCircuit, nsxPublicIPQuotaRaised, null); + return CommonClusterProperties( + clusterSize: clusterSize, + provisioningState: provisioningState, + clusterId: clusterId, + hosts: hosts?.ToList() + ); } } -} +} \ No newline at end of file diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Customized/AvsPrivateCloudClusterData.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Customized/AvsPrivateCloudClusterData.cs new file mode 100644 index 000000000000..99f61fd9d9e0 --- /dev/null +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Customized/AvsPrivateCloudClusterData.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System; +using System.Collections.Generic; +using System.ComponentModel; +using Azure.Core; +using Azure.ResourceManager.Avs.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.Avs +{ + /// + /// A class representing the AvsPrivateCloudCluster data model. + /// A cluster resource. + /// + public partial class AvsPrivateCloudClusterData : ResourceData + { + /// The name of the SKU. + [EditorBrowsable(EditorBrowsableState.Never)] + public string SkuName + { + get => Sku is null ? default : Sku.Name; + set => Sku = new AvsSku(value); + } + } +} \ No newline at end of file diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Customized/AvsPrivateCloudData.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Customized/AvsPrivateCloudData.cs new file mode 100644 index 000000000000..f5348990ce99 --- /dev/null +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Customized/AvsPrivateCloudData.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System; +using System.Collections.Generic; +using System.ComponentModel; +using Azure.Core; +using Azure.ResourceManager.Avs.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.Avs +{ + /// + /// A class representing the AvsPrivateCloud data model. + /// A private cloud resource + /// + public partial class AvsPrivateCloudData : TrackedResourceData + { + /// The name of the SKU. + [EditorBrowsable(EditorBrowsableState.Never)] + public string SkuName + { + get => Sku is null ? default : Sku.Name; + set => Sku = new AvsSku(value); + } + } +} \ No newline at end of file diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Customized/AvsPrivateCloudResource.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Customized/AvsPrivateCloudResource.cs new file mode 100644 index 000000000000..e7984e6ccbaf --- /dev/null +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Customized/AvsPrivateCloudResource.cs @@ -0,0 +1,746 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.Avs.Models; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.Avs +{ + /// + /// A Class representing an AvsPrivateCloud along with the instance operations that can be performed on it. + /// If you have a you can construct an + /// from an instance of using the GetAvsPrivateCloudResource method. + /// Otherwise you can get one from its parent resource using the GetAvsPrivateCloud method. + /// + public partial class AvsPrivateCloudResource : ArmResource + { + /// + /// Get a private cloud workload network. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName} + /// + /// + /// Operation Id + /// WorkloadNetworks_Get + /// + /// + /// Default Api Version + /// 2023-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name for the workload network in the private cloud. + /// The cancellation token to use. + [ForwardsClientCalls] + [EditorBrowsable(EditorBrowsableState.Never)] + [Obsolete("This method is obsolete and will be removed in a future release.", false)] + public virtual Response GetWorkloadNetwork(WorkloadNetworkName workloadNetworkName, CancellationToken cancellationToken = default) + { + return GetWorkloadNetworks().Get(workloadNetworkName, cancellationToken); + } + + /// + /// Get a private cloud workload network. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName} + /// + /// + /// Operation Id + /// WorkloadNetworks_Get + /// + /// + /// Default Api Version + /// 2023-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name for the workload network in the private cloud. + /// The cancellation token to use. + [ForwardsClientCalls] + [EditorBrowsable(EditorBrowsableState.Never)] + [Obsolete("This method is obsolete and will be removed in a future release.", false)] + public virtual async Task> GetWorkloadNetworkAsync(WorkloadNetworkName workloadNetworkName, CancellationToken cancellationToken = default) + { + return await GetWorkloadNetworks().GetAsync(workloadNetworkName, cancellationToken).ConfigureAwait(false); + } + + /// Gets a collection of WorkloadNetworkResources in the AvsPrivateCloud. + /// An object representing collection of WorkloadNetworkResources and their operations over a WorkloadNetworkResource. + [EditorBrowsable(EditorBrowsableState.Never)] + [Obsolete("This method is obsolete and will be removed in a future release.", false)] + public virtual WorkloadNetworkCollection GetWorkloadNetworks() + { + return GetCachedClient(client => new WorkloadNetworkCollection(client, Id)); + } + + /// + /// Get dhcp by id in a private cloud workload network. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations/{dhcpId} + /// + /// + /// Operation Id + /// WorkloadNetworks_GetDhcp + /// + /// + /// Default Api Version + /// 2023-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// NSX DHCP identifier. Generally the same as the DHCP display name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [EditorBrowsable(EditorBrowsableState.Never)] + [ForwardsClientCalls] + public virtual Response GetWorkloadNetworkDhcp(string dhcpId, CancellationToken cancellationToken = default) + { + return GetWorkloadNetwork().GetWorkloadNetworkDhcps().Get(dhcpId, cancellationToken); + } + + /// + /// Get dhcp by id in a private cloud workload network. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations/{dhcpId} + /// + /// + /// Operation Id + /// WorkloadNetworks_GetDhcp + /// + /// + /// Default Api Version + /// 2023-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// NSX DHCP identifier. Generally the same as the DHCP display name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual async Task> GetWorkloadNetworkDhcpAsync(string dhcpId, CancellationToken cancellationToken = default) + { + return await GetWorkloadNetwork().GetWorkloadNetworkDhcps().GetAsync(dhcpId, cancellationToken).ConfigureAwait(false); + } + + /// Gets a collection of WorkloadNetworkDhcpResources in the AvsPrivateCloud. + /// An object representing collection of WorkloadNetworkDhcpResources and their operations over a WorkloadNetworkDhcpResource. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual WorkloadNetworkDhcpCollection GetWorkloadNetworkDhcps() + { + return GetWorkloadNetwork().GetWorkloadNetworkDhcps(); + } + + /// + /// Get a DNS service by id in a private cloud workload network. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices/{dnsServiceId} + /// + /// + /// Operation Id + /// WorkloadNetworks_GetDnsService + /// + /// + /// Default Api Version + /// 2023-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// NSX DNS Service identifier. Generally the same as the DNS Service's display name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual Response GetWorkloadNetworkDnsService(string dnsServiceId, CancellationToken cancellationToken = default) + { + return GetWorkloadNetwork().GetWorkloadNetworkDnsServices().Get(dnsServiceId, cancellationToken); + } + + /// + /// Get a DNS service by id in a private cloud workload network. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices/{dnsServiceId} + /// + /// + /// Operation Id + /// WorkloadNetworks_GetDnsService + /// + /// + /// Default Api Version + /// 2023-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// NSX DNS Service identifier. Generally the same as the DNS Service's display name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual async Task> GetWorkloadNetworkDnsServiceAsync(string dnsServiceId, CancellationToken cancellationToken = default) + { + return await GetWorkloadNetwork().GetWorkloadNetworkDnsServices().GetAsync(dnsServiceId, cancellationToken).ConfigureAwait(false); + } + + /// Gets a collection of WorkloadNetworkDnsServiceResources in the AvsPrivateCloud. + /// An object representing collection of WorkloadNetworkDnsServiceResources and their operations over a WorkloadNetworkDnsServiceResource. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual WorkloadNetworkDnsServiceCollection GetWorkloadNetworkDnsServices() + { + return GetWorkloadNetwork().GetWorkloadNetworkDnsServices(); + } + + /// + /// Get a DNS zone by id in a private cloud workload network. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones/{dnsZoneId} + /// + /// + /// Operation Id + /// WorkloadNetworks_GetDnsZone + /// + /// + /// Default Api Version + /// 2023-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual Response GetWorkloadNetworkDnsZone(string dnsZoneId, CancellationToken cancellationToken = default) + { + return GetWorkloadNetwork().GetWorkloadNetworkDnsZones().Get(dnsZoneId, cancellationToken); + } + + /// + /// Get a DNS zone by id in a private cloud workload network. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones/{dnsZoneId} + /// + /// + /// Operation Id + /// WorkloadNetworks_GetDnsZone + /// + /// + /// Default Api Version + /// 2023-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual async Task> GetWorkloadNetworkDnsZoneAsync(string dnsZoneId, CancellationToken cancellationToken = default) + { + return await GetWorkloadNetwork().GetWorkloadNetworkDnsZones().GetAsync(dnsZoneId, cancellationToken).ConfigureAwait(false); + } + + /// Gets a collection of WorkloadNetworkDnsZoneResources in the AvsPrivateCloud. + /// An object representing collection of WorkloadNetworkDnsZoneResources and their operations over a WorkloadNetworkDnsZoneResource. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual WorkloadNetworkDnsZoneCollection GetWorkloadNetworkDnsZones() + { + return GetWorkloadNetwork().GetWorkloadNetworkDnsZones(); + } + + /// + /// Get a gateway by id in a private cloud workload network. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/gateways/{gatewayId} + /// + /// + /// Operation Id + /// WorkloadNetworks_GetGateway + /// + /// + /// Default Api Version + /// 2023-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// NSX Gateway identifier. Generally the same as the Gateway's display name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual Response GetWorkloadNetworkGateway(string gatewayId, CancellationToken cancellationToken = default) + { + return GetWorkloadNetwork().GetWorkloadNetworkGateways().Get(gatewayId, cancellationToken); + } + + /// + /// Get a gateway by id in a private cloud workload network. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/gateways/{gatewayId} + /// + /// + /// Operation Id + /// WorkloadNetworks_GetGateway + /// + /// + /// Default Api Version + /// 2023-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// NSX Gateway identifier. Generally the same as the Gateway's display name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual async Task> GetWorkloadNetworkGatewayAsync(string gatewayId, CancellationToken cancellationToken = default) + { + return await GetWorkloadNetwork().GetWorkloadNetworkGateways().GetAsync(gatewayId, cancellationToken).ConfigureAwait(false); + } + + /// Gets a collection of WorkloadNetworkGatewayResources in the AvsPrivateCloud. + /// An object representing collection of WorkloadNetworkGatewayResources and their operations over a WorkloadNetworkGatewayResource. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual WorkloadNetworkGatewayCollection GetWorkloadNetworkGateways() + { + return GetWorkloadNetwork().GetWorkloadNetworkGateways(); + } + + /// + /// Get a port mirroring profile by id in a private cloud workload network. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles/{portMirroringId} + /// + /// + /// Operation Id + /// WorkloadNetworks_GetPortMirroring + /// + /// + /// Default Api Version + /// 2023-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual Response GetWorkloadNetworkPortMirroringProfile(string portMirroringId, CancellationToken cancellationToken = default) + { + return GetWorkloadNetwork().GetWorkloadNetworkPortMirroringProfiles().Get(portMirroringId, cancellationToken); + } + + /// + /// Get a port mirroring profile by id in a private cloud workload network. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles/{portMirroringId} + /// + /// + /// Operation Id + /// WorkloadNetworks_GetPortMirroring + /// + /// + /// Default Api Version + /// 2023-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual async Task> GetWorkloadNetworkPortMirroringProfileAsync(string portMirroringId, CancellationToken cancellationToken = default) + { + return await GetWorkloadNetwork().GetWorkloadNetworkPortMirroringProfiles().GetAsync(portMirroringId, cancellationToken).ConfigureAwait(false); + } + + /// Gets a collection of WorkloadNetworkPortMirroringProfileResources in the AvsPrivateCloud. + /// An object representing collection of WorkloadNetworkPortMirroringProfileResources and their operations over a WorkloadNetworkPortMirroringProfileResource. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual WorkloadNetworkPortMirroringProfileCollection GetWorkloadNetworkPortMirroringProfiles() + { + return GetWorkloadNetwork().GetWorkloadNetworkPortMirroringProfiles(); + } + + /// + /// Get a Public IP Block by id in a private cloud workload network. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/publicIPs/{publicIPId} + /// + /// + /// Operation Id + /// WorkloadNetworks_GetPublicIP + /// + /// + /// Default Api Version + /// 2023-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// NSX Public IP Block identifier. Generally the same as the Public IP Block's display name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual Response GetWorkloadNetworkPublicIP(string publicIPId, CancellationToken cancellationToken = default) + { + return GetWorkloadNetwork().GetWorkloadNetworkPublicIPs().Get(publicIPId, cancellationToken); + } + + /// + /// Get a Public IP Block by id in a private cloud workload network. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/publicIPs/{publicIPId} + /// + /// + /// Operation Id + /// WorkloadNetworks_GetPublicIP + /// + /// + /// Default Api Version + /// 2023-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// NSX Public IP Block identifier. Generally the same as the Public IP Block's display name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual async Task> GetWorkloadNetworkPublicIPAsync(string publicIPId, CancellationToken cancellationToken = default) + { + return await GetWorkloadNetwork().GetWorkloadNetworkPublicIPs().GetAsync(publicIPId, cancellationToken).ConfigureAwait(false); + } + + /// Gets a collection of WorkloadNetworkPublicIPResources in the AvsPrivateCloud. + /// An object representing collection of WorkloadNetworkPublicIPResources and their operations over a WorkloadNetworkPublicIPResource. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual WorkloadNetworkPublicIPCollection GetWorkloadNetworkPublicIPs() + { + return GetWorkloadNetwork().GetWorkloadNetworkPublicIPs(); + } + + /// + /// Get a segment by id in a private cloud workload network. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments/{segmentId} + /// + /// + /// Operation Id + /// WorkloadNetworks_GetSegment + /// + /// + /// Default Api Version + /// 2023-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// NSX Segment identifier. Generally the same as the Segment's display name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual Response GetWorkloadNetworkSegment(string segmentId, CancellationToken cancellationToken = default) + { + return GetWorkloadNetwork().GetWorkloadNetworkSegments().Get(segmentId, cancellationToken); + } + + /// + /// Get a segment by id in a private cloud workload network. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments/{segmentId} + /// + /// + /// Operation Id + /// WorkloadNetworks_GetSegment + /// + /// + /// Default Api Version + /// 2023-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// NSX Segment identifier. Generally the same as the Segment's display name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual async Task> GetWorkloadNetworkSegmentAsync(string segmentId, CancellationToken cancellationToken = default) + { + return await GetWorkloadNetwork().GetWorkloadNetworkSegments().GetAsync(segmentId, cancellationToken).ConfigureAwait(false); + } + + /// Gets a collection of WorkloadNetworkSegmentResources in the AvsPrivateCloud. + /// An object representing collection of WorkloadNetworkSegmentResources and their operations over a WorkloadNetworkSegmentResource. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual WorkloadNetworkSegmentCollection GetWorkloadNetworkSegments() + { + return GetWorkloadNetwork().GetWorkloadNetworkSegments(); + } + + /// + /// Get a virtual machine by id in a private cloud workload network. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/virtualMachines/{virtualMachineId} + /// + /// + /// Operation Id + /// WorkloadNetworks_GetVirtualMachine + /// + /// + /// Default Api Version + /// 2023-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Virtual Machine identifier. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual Response GetWorkloadNetworkVirtualMachine(string virtualMachineId, CancellationToken cancellationToken = default) + { + return GetWorkloadNetwork().GetWorkloadNetworkVirtualMachines().Get(virtualMachineId, cancellationToken); + } + + /// + /// Get a virtual machine by id in a private cloud workload network. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/virtualMachines/{virtualMachineId} + /// + /// + /// Operation Id + /// WorkloadNetworks_GetVirtualMachine + /// + /// + /// Default Api Version + /// 2023-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Virtual Machine identifier. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual async Task> GetWorkloadNetworkVirtualMachineAsync(string virtualMachineId, CancellationToken cancellationToken = default) + { + return await GetWorkloadNetwork().GetWorkloadNetworkVirtualMachines().GetAsync(virtualMachineId, cancellationToken).ConfigureAwait(false); + } + + /// Gets a collection of WorkloadNetworkVirtualMachineResources in the AvsPrivateCloud. + /// An object representing collection of WorkloadNetworkVirtualMachineResources and their operations over a WorkloadNetworkVirtualMachineResource. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual WorkloadNetworkVirtualMachineCollection GetWorkloadNetworkVirtualMachines() + { + return GetWorkloadNetwork().GetWorkloadNetworkVirtualMachines(); + } + + /// + /// Get a vm group by id in a private cloud workload network. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups/{vmGroupId} + /// + /// + /// Operation Id + /// WorkloadNetworks_GetVmGroup + /// + /// + /// Default Api Version + /// 2023-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// NSX VM Group identifier. Generally the same as the VM Group's display name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual Response GetWorkloadNetworkVmGroup(string vmGroupId, CancellationToken cancellationToken = default) + { + return GetWorkloadNetwork().GetWorkloadNetworkVmGroups().Get(vmGroupId, cancellationToken); + } + + /// + /// Get a vm group by id in a private cloud workload network. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups/{vmGroupId} + /// + /// + /// Operation Id + /// WorkloadNetworks_GetVmGroup + /// + /// + /// Default Api Version + /// 2023-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// NSX VM Group identifier. Generally the same as the VM Group's display name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual async Task> GetWorkloadNetworkVmGroupAsync(string vmGroupId, CancellationToken cancellationToken = default) + { + return await GetWorkloadNetwork().GetWorkloadNetworkVmGroups().GetAsync(vmGroupId, cancellationToken).ConfigureAwait(false); + } + + /// Gets a collection of WorkloadNetworkVmGroupResources in the AvsPrivateCloud. + /// An object representing collection of WorkloadNetworkVmGroupResources and their operations over a WorkloadNetworkVmGroupResource. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual WorkloadNetworkVmGroupCollection GetWorkloadNetworkVmGroups() + { + return GetWorkloadNetwork().GetWorkloadNetworkVmGroups(); + } + } +} diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Customized/Models/AvsManagementCluster.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Customized/Models/AvsManagementCluster.cs new file mode 100644 index 000000000000..23bf887170b4 --- /dev/null +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Customized/Models/AvsManagementCluster.cs @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.Avs.Models +{ + /// The properties of a management cluster. + public partial class AvsManagementCluster : CommonClusterProperties + { + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(VsanDatastoreName)) + { + writer.WritePropertyName("vsanDatastoreName"u8); + writer.WriteStringValue(VsanDatastoreName); + } + } + } +} diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/CommonClusterProperties.Serialization.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Customized/Models/CommonClusterProperties.Serialization.cs similarity index 99% rename from sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/CommonClusterProperties.Serialization.cs rename to sdk/avs/Azure.ResourceManager.Avs/src/Customized/Models/CommonClusterProperties.Serialization.cs index 84d2972cc995..761797561d9f 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/CommonClusterProperties.Serialization.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Customized/Models/CommonClusterProperties.Serialization.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -185,4 +183,4 @@ CommonClusterProperties IPersistableModel.Create(Binary string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } -} +} \ No newline at end of file diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/CommonClusterProperties.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Customized/Models/CommonClusterProperties.cs similarity index 91% rename from sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/CommonClusterProperties.cs rename to sdk/avs/Azure.ResourceManager.Avs/src/Customized/Models/CommonClusterProperties.cs index 635fbcb73775..67a0ffcbb8aa 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/CommonClusterProperties.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Customized/Models/CommonClusterProperties.cs @@ -1,12 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; using System.Collections.Generic; +using System.ComponentModel; namespace Azure.ResourceManager.Avs.Models { @@ -43,9 +42,11 @@ public partial class CommonClusterProperties /// /// /// + [EditorBrowsable(EditorBrowsableState.Never)] private protected IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . + [EditorBrowsable(EditorBrowsableState.Never)] public CommonClusterProperties() { Hosts = new ChangeTrackingList(); @@ -69,10 +70,10 @@ internal CommonClusterProperties(int? clusterSize, AvsPrivateCloudClusterProvisi /// The cluster size. public int? ClusterSize { get; set; } /// The state of the cluster provisioning. - public AvsPrivateCloudClusterProvisioningState? ProvisioningState { get; } + public AvsPrivateCloudClusterProvisioningState? ProvisioningState { get; private protected set; } /// The identity. - public int? ClusterId { get; } + public int? ClusterId { get; private protected set; } /// The hosts. - public IList Hosts { get; } + public IList Hosts { get; private protected set; } } -} +} \ No newline at end of file diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkName.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Customized/Models/WorkloadNetworkName.cs similarity index 97% rename from sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkName.cs rename to sdk/avs/Azure.ResourceManager.Avs/src/Customized/Models/WorkloadNetworkName.cs index 80d1b2789eca..2e29220686c9 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkName.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Customized/Models/WorkloadNetworkName.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -11,6 +9,7 @@ namespace Azure.ResourceManager.Avs.Models { /// The WorkloadNetworkName. + [EditorBrowsable(EditorBrowsableState.Never)] public readonly partial struct WorkloadNetworkName : IEquatable { private readonly string _value; @@ -21,7 +20,6 @@ public WorkloadNetworkName(string value) { _value = value ?? throw new ArgumentNullException(nameof(value)); } - private const string DefaultValue = "default"; /// default. diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Customized/RestOperations/WorkloadNetworksRestOperations.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Customized/RestOperations/WorkloadNetworksRestOperations.cs new file mode 100644 index 000000000000..1a8099d55b89 --- /dev/null +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Customized/RestOperations/WorkloadNetworksRestOperations.cs @@ -0,0 +1,123 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System; +using System.ComponentModel; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.Avs.Models; + +namespace Azure.ResourceManager.Avs +{ + internal partial class WorkloadNetworksRestOperations + { + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string privateCloudName, WorkloadNetworkName workloadNetworkName) + { + 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.AVS/privateClouds/", false); + uri.AppendPath(privateCloudName, true); + uri.AppendPath("/workloadNetworks/", false); + uri.AppendPath(workloadNetworkName.ToString(), true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string privateCloudName, WorkloadNetworkName workloadNetworkName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + 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.AVS/privateClouds/", false); + uri.AppendPath(privateCloudName, true); + uri.AppendPath("/workloadNetworks/", false); + uri.AppendPath(workloadNetworkName.ToString(), true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a private cloud workload network. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of the private cloud. + /// Name for the workload network in the private cloud. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + [EditorBrowsable(EditorBrowsableState.Never)] + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string privateCloudName, WorkloadNetworkName workloadNetworkName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, privateCloudName, workloadNetworkName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + WorkloadNetworkData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = WorkloadNetworkData.DeserializeWorkloadNetworkData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((WorkloadNetworkData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a private cloud workload network. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of the private cloud. + /// Name for the workload network in the private cloud. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + [EditorBrowsable(EditorBrowsableState.Never)] + public Response Get(string subscriptionId, string resourceGroupName, string privateCloudName, WorkloadNetworkName workloadNetworkName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, privateCloudName, workloadNetworkName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + WorkloadNetworkData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = WorkloadNetworkData.DeserializeWorkloadNetworkData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((WorkloadNetworkData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + } +} \ No newline at end of file diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkCollection.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Customized/WorkloadNetworkCollection.cs similarity index 96% rename from sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkCollection.cs rename to sdk/avs/Azure.ResourceManager.Avs/src/Customized/WorkloadNetworkCollection.cs index 3405d7809b72..24456f6aa0de 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkCollection.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Customized/WorkloadNetworkCollection.cs @@ -1,13 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; using System.Collections; using System.Collections.Generic; +using System.ComponentModel; using System.Globalization; using System.Threading; using System.Threading.Tasks; @@ -23,6 +22,8 @@ namespace Azure.ResourceManager.Avs /// Each in the collection will belong to the same instance of . /// To get a instance call the GetWorkloadNetworks method from an instance of . /// + [EditorBrowsable(EditorBrowsableState.Never)] + [Obsolete("This class is obsolete and will be removed in a future release.", false)] public partial class WorkloadNetworkCollection : ArmCollection, IEnumerable, IAsyncEnumerable { private readonly ClientDiagnostics _workloadNetworkClientDiagnostics; @@ -65,7 +66,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -106,7 +107,7 @@ public virtual async Task> GetAsync(WorkloadNe /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -147,7 +148,7 @@ public virtual Response Get(WorkloadNetworkName workloa /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -177,7 +178,7 @@ public virtual AsyncPageable GetAllAsync(CancellationTo /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -207,7 +208,7 @@ public virtual Pageable GetAll(CancellationToken cancel /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -246,7 +247,7 @@ public virtual async Task> ExistsAsync(WorkloadNetworkName worklo /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -285,7 +286,7 @@ public virtual Response Exists(WorkloadNetworkName workloadNetworkName, Ca /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -326,7 +327,7 @@ public virtual async Task> GetIfExists /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Customized/WorkloadNetworkResource.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Customized/WorkloadNetworkResource.cs new file mode 100644 index 000000000000..1e84ea4c47a2 --- /dev/null +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Customized/WorkloadNetworkResource.cs @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System.ComponentModel; +using Azure.Core; +using Azure.ResourceManager.Avs.Models; + +namespace Azure.ResourceManager.Avs +{ + /// + /// A Class representing a WorkloadNetwork along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetWorkloadNetworkResource method. + /// Otherwise you can get one from its parent resource using the GetWorkloadNetwork method. + /// + public partial class WorkloadNetworkResource : ArmResource + { + /// + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The privateCloudName. + /// The workloadNetworkName. + [EditorBrowsable(EditorBrowsableState.Never)] + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string privateCloudName, WorkloadNetworkName workloadNetworkName) + => CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName); + } +} diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/ArmAvsModelFactory.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/ArmAvsModelFactory.cs index 27e2a349dc04..76dc4245065b 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/ArmAvsModelFactory.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/ArmAvsModelFactory.cs @@ -18,15 +18,6 @@ namespace Azure.ResourceManager.Avs.Models /// Model factory for models. public static partial class ArmAvsModelFactory { - /// Initializes a new instance of . - /// Trial status. - /// Number of trial hosts available. - /// A new instance for mocking. - public static AvsSubscriptionTrialAvailabilityResult AvsSubscriptionTrialAvailabilityResult(AvsSubscriptionTrialStatus? status = null, int? availableHosts = null) - { - return new AvsSubscriptionTrialAvailabilityResult(status, availableHosts, serializedAdditionalRawData: null); - } - /// Initializes a new instance of . /// Remaining hosts quota by sku type. /// Host quota is active for current subscription. @@ -38,6 +29,15 @@ public static AvsSubscriptionQuotaAvailabilityResult AvsSubscriptionQuotaAvailab return new AvsSubscriptionQuotaAvailabilityResult(hostsRemaining, quotaEnabled, serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// Trial status. + /// Number of trial hosts available. + /// A new instance for mocking. + public static AvsSubscriptionTrialAvailabilityResult AvsSubscriptionTrialAvailabilityResult(AvsSubscriptionTrialStatus? status = null, int? availableHosts = null) + { + return new AvsSubscriptionTrialAvailabilityResult(status, availableHosts, serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The id. /// The name. @@ -45,18 +45,27 @@ public static AvsSubscriptionQuotaAvailabilityResult AvsSubscriptionQuotaAvailab /// The systemData. /// The tags. /// The location. - /// The private cloud SKU. - /// The identity of the private cloud, if configured. Current supported identity types: SystemAssigned, None. + /// The SKU (Stock Keeping Unit) assigned to this resource. + /// The managed service identities assigned to this resource. Current supported identity types: None, SystemAssigned. /// The default cluster used for management. /// Connectivity to internet is enabled or disabled. /// vCenter Single Sign On Identity Sources. /// Properties describing how the cloud is distributed across availability zones. /// Customer managed key encryption, can be enabled or disabled. - /// Array of additional networks noncontiguous with networkBlock. Networks must be unique and non-overlapping across VNet in your subscription, on-premise, and this privateCloud networkBlock attribute. Make sure the CIDR format conforms to (A.B.C.D/X). + /// + /// Array of additional networks noncontiguous with networkBlock. Networks must be + /// unique and non-overlapping across VNet in your subscription, on-premise, and + /// this privateCloud networkBlock attribute. Make sure the CIDR format conforms to + /// (A.B.C.D/X). + /// /// The provisioning state. /// An ExpressRoute Circuit. /// The endpoints. - /// The block of addresses should be unique across VNet in your subscription as well as on-premise. Make sure the CIDR format is conformed to (A.B.C.D/X) where A,B,C,D are between 0 and 255, and X is between 0 and 22. + /// + /// The block of addresses should be unique across VNet in your subscription as + /// well as on-premise. Make sure the CIDR format is conformed to (A.B.C.D/X) where + /// A,B,C,D are between 0 and 255, and X is between 0 and 22 + /// /// Network used to access vCenter Server and NSX-T Manager. /// Used for virtual machine cold migration, cloning, and snapshot migration. /// Used for live migration of virtual machines. @@ -65,10 +74,18 @@ public static AvsSubscriptionQuotaAvailabilityResult AvsSubscriptionQuotaAvailab /// Thumbprint of the vCenter Server SSL certificate. /// Thumbprint of the NSX-T Manager SSL certificate. /// Array of cloud link IDs from other clouds that connect to this one. - /// A secondary expressRoute circuit from a separate AZ. Only present in a stretched private cloud. - /// Flag to indicate whether the private cloud has the quota for provisioned NSX Public IP count raised from 64 to 1024. + /// + /// A secondary expressRoute circuit from a separate AZ. Only present in a + /// stretched private cloud + /// + /// + /// Flag to indicate whether the private cloud has the quota for provisioned NSX + /// Public IP count raised from 64 to 1024 + /// + /// Azure resource ID of the virtual network. + /// The type of DNS zone to use. /// A new instance for mocking. - public static AvsPrivateCloudData AvsPrivateCloudData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string skuName = null, ManagedServiceIdentity identity = null, AvsManagementCluster managementCluster = null, InternetConnectivityState? internet = null, IEnumerable identitySources = null, PrivateCloudAvailabilityProperties availability = null, CustomerManagedEncryption encryption = null, IEnumerable extendedNetworkBlocks = null, AvsPrivateCloudProvisioningState? provisioningState = null, ExpressRouteCircuit circuit = null, AvsPrivateCloudEndpoints endpoints = null, string networkBlock = null, string managementNetwork = null, string provisioningNetwork = null, string vMotionNetwork = null, string vCenterPassword = null, string nsxtPassword = null, string vCenterCertificateThumbprint = null, string nsxtCertificateThumbprint = null, IEnumerable externalCloudLinks = null, ExpressRouteCircuit secondaryCircuit = null, NsxPublicIPQuotaRaisedEnum? nsxPublicIPQuotaRaised = null) + public static AvsPrivateCloudData AvsPrivateCloudData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, AvsSku sku = null, ManagedServiceIdentity identity = null, AvsManagementCluster managementCluster = null, InternetConnectivityState? internet = null, IEnumerable identitySources = null, PrivateCloudAvailabilityProperties availability = null, CustomerManagedEncryption encryption = null, IEnumerable extendedNetworkBlocks = null, AvsPrivateCloudProvisioningState? provisioningState = null, ExpressRouteCircuit circuit = null, AvsPrivateCloudEndpoints endpoints = null, string networkBlock = null, string managementNetwork = null, string provisioningNetwork = null, string vMotionNetwork = null, string vCenterPassword = null, string nsxtPassword = null, string vCenterCertificateThumbprint = null, string nsxtCertificateThumbprint = null, IEnumerable externalCloudLinks = null, ExpressRouteCircuit secondaryCircuit = null, NsxPublicIPQuotaRaisedEnum? nsxPublicIPQuotaRaised = null, ResourceIdentifier virtualNetworkId = null, AvsDnsZoneType? dnsZoneType = null) { tags ??= new Dictionary(); identitySources ??= new List(); @@ -82,7 +99,7 @@ public static AvsPrivateCloudData AvsPrivateCloudData(ResourceIdentifier id = nu systemData, tags, location, - skuName != null ? new AvsSku(skuName, serializedAdditionalRawData: null) : null, + sku, identity, managementCluster, internet, @@ -104,54 +121,29 @@ public static AvsPrivateCloudData AvsPrivateCloudData(ResourceIdentifier id = nu externalCloudLinks?.ToList(), secondaryCircuit, nsxPublicIPQuotaRaised, + virtualNetworkId, + dnsZoneType, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// CIDR of primary subnet. - /// CIDR of secondary subnet. - /// Identifier of the ExpressRoute Circuit (Microsoft Colo only). - /// ExpressRoute Circuit private peering identifier. - /// A new instance for mocking. - public static ExpressRouteCircuit ExpressRouteCircuit(string primarySubnet = null, string secondarySubnet = null, ResourceIdentifier expressRouteId = null, ResourceIdentifier expressRoutePrivatePeeringId = null) - { - return new ExpressRouteCircuit(primarySubnet, secondarySubnet, expressRouteId, expressRoutePrivatePeeringId, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// Endpoint for the NSX-T Data Center manager. - /// Endpoint for Virtual Center Server Appliance. - /// Endpoint for the HCX Cloud Manager. - /// A new instance for mocking. - public static AvsPrivateCloudEndpoints AvsPrivateCloudEndpoints(string nsxtManager = null, string vcsa = null, string hcxCloudManager = null) - { - return new AvsPrivateCloudEndpoints(nsxtManager, vcsa, hcxCloudManager, serializedAdditionalRawData: null); - } - /// Initializes a new instance of . /// The cluster size. /// The state of the cluster provisioning. /// The identity. /// The hosts. + /// Name of the vsan datastore associated with the cluster. /// A new instance for mocking. - public static AvsManagementCluster AvsManagementCluster(int? clusterSize = null, AvsPrivateCloudClusterProvisioningState? provisioningState = null, int? clusterId = null, IEnumerable hosts = null) - { - hosts ??= new List(); - - return new AvsManagementCluster(clusterSize, provisioningState, clusterId, hosts?.ToList(), serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The cluster size. - /// The state of the cluster provisioning. - /// The identity. - /// The hosts. - /// A new instance for mocking. - public static CommonClusterProperties CommonClusterProperties(int? clusterSize = null, AvsPrivateCloudClusterProvisioningState? provisioningState = null, int? clusterId = null, IEnumerable hosts = null) + public static AvsManagementCluster AvsManagementCluster(int? clusterSize = null, AvsPrivateCloudClusterProvisioningState? provisioningState = null, int? clusterId = null, IEnumerable hosts = null, string vsanDatastoreName = null) { hosts ??= new List(); - return new CommonClusterProperties(clusterSize, provisioningState, clusterId, hosts?.ToList(), serializedAdditionalRawData: null); + return new AvsManagementCluster( + clusterSize, + provisioningState, + clusterId, + hosts?.ToList(), + vsanDatastoreName, + serializedAdditionalRawData: null); } /// Initializes a new instance of . @@ -174,18 +166,127 @@ public static AvsEncryptionKeyVaultProperties AvsEncryptionKeyVaultProperties(st serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// CIDR of primary subnet. + /// CIDR of secondary subnet. + /// Identifier of the ExpressRoute Circuit (Microsoft Colo only). + /// ExpressRoute Circuit private peering identifier. + /// A new instance for mocking. + public static ExpressRouteCircuit ExpressRouteCircuit(string primarySubnet = null, string secondarySubnet = null, ResourceIdentifier expressRouteId = null, ResourceIdentifier expressRoutePrivatePeeringId = null) + { + return new ExpressRouteCircuit(primarySubnet, secondarySubnet, expressRouteId, expressRoutePrivatePeeringId, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Endpoint FQDN for the NSX-T Data Center manager. + /// Endpoint FQDN for Virtual Center Server Appliance. + /// Endpoint FQDN for the HCX Cloud Manager. + /// Endpoint IP for the NSX-T Data Center manager. + /// Endpoint IP for Virtual Center Server Appliance. + /// Endpoint IP for the HCX Cloud Manager. + /// A new instance for mocking. + public static AvsPrivateCloudEndpoints AvsPrivateCloudEndpoints(string nsxtManager = null, string vcsa = null, string hcxCloudManager = null, string nsxtManagerIP = null, string vcenterIP = null, string hcxCloudManagerIP = null) + { + return new AvsPrivateCloudEndpoints( + nsxtManager, + vcsa, + hcxCloudManager, + nsxtManagerIP, + vcenterIP, + hcxCloudManagerIP, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// + /// The resource-specific properties for this resource. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , , and . + /// + /// A new instance for mocking. + public static AvsPrivateCloudAddonData AvsPrivateCloudAddonData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, AvsPrivateCloudAddonProperties properties = null) + { + return new AvsPrivateCloudAddonData( + id, + name, + resourceType, + systemData, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Addon type. + /// The state of the addon provisioning. + /// A new instance for mocking. + public static AvsPrivateCloudAddonProperties AvsPrivateCloudAddonProperties(string addonType = null, AddonProvisioningState? provisioningState = null) + { + return new UnknownAddonProperties(addonType == null ? default : new AddonType(addonType), provisioningState, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The state of the ExpressRoute Circuit Authorization provisioning. + /// The ID of the ExpressRoute Circuit Authorization. + /// The key of the ExpressRoute Circuit Authorization. + /// The ID of the ExpressRoute Circuit. + /// A new instance for mocking. + public static ExpressRouteAuthorizationData ExpressRouteAuthorizationData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ExpressRouteAuthorizationProvisioningState? provisioningState = null, ResourceIdentifier expressRouteAuthorizationId = null, string expressRouteAuthorizationKey = null, ResourceIdentifier expressRouteId = null) + { + return new ExpressRouteAuthorizationData( + id, + name, + resourceType, + systemData, + provisioningState, + expressRouteAuthorizationId, + expressRouteAuthorizationKey, + expressRouteId, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The provisioning state of the resource. + /// The state of the cloud link. + /// Identifier of the other private cloud participating in the link. + /// A new instance for mocking. + public static AvsCloudLinkData AvsCloudLinkData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, AvsCloudLinkProvisioningState? provisioningState = null, AvsCloudLinkStatus? status = null, ResourceIdentifier linkedCloud = null) + { + return new AvsCloudLinkData( + id, + name, + resourceType, + systemData, + provisioningState, + status, + linkedCloud, + serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. - /// The cluster SKU. + /// The SKU (Stock Keeping Unit) assigned to this resource. /// The cluster size. /// The state of the cluster provisioning. /// The identity. /// The hosts. + /// Name of the vsan datastore associated with the cluster. /// A new instance for mocking. - public static AvsPrivateCloudClusterData AvsPrivateCloudClusterData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string skuName = null, int? clusterSize = null, AvsPrivateCloudClusterProvisioningState? provisioningState = null, int? clusterId = null, IEnumerable hosts = null) + public static AvsPrivateCloudClusterData AvsPrivateCloudClusterData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, AvsSku sku = null, int? clusterSize = null, AvsPrivateCloudClusterProvisioningState? provisioningState = null, int? clusterId = null, IEnumerable hosts = null, string vsanDatastoreName = null) { hosts ??= new List(); @@ -194,25 +295,15 @@ public static AvsPrivateCloudClusterData AvsPrivateCloudClusterData(ResourceIden name, resourceType, systemData, - skuName != null ? new AvsSku(skuName, serializedAdditionalRawData: null) : null, + sku, clusterSize, provisioningState, clusterId, hosts?.ToList(), + vsanDatastoreName, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// List of hosts belonging to the availability zone in a cluster. - /// Availability zone identifier. - /// A new instance for mocking. - public static AvsClusterZone AvsClusterZone(IEnumerable hosts = null, string zone = null) - { - hosts ??= new List(); - - return new AvsClusterZone(hosts?.ToList(), zone, serializedAdditionalRawData: null); - } - /// Initializes a new instance of . /// The id. /// The name. @@ -221,9 +312,10 @@ public static AvsClusterZone AvsClusterZone(IEnumerable hosts = null, st /// The state of the datastore provisioning. /// An Azure NetApp Files volume. /// An iSCSI volume. + /// An Elastic SAN volume. /// The operational status of the datastore. /// A new instance for mocking. - public static AvsPrivateCloudDatastoreData AvsPrivateCloudDatastoreData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, AvsPrivateCloudDatastoreProvisioningState? provisioningState = null, ResourceIdentifier netAppVolumeId = null, DiskPoolVolume diskPoolVolume = null, DatastoreStatus? status = null) + public static AvsPrivateCloudDatastoreData AvsPrivateCloudDatastoreData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, AvsPrivateCloudDatastoreProvisioningState? provisioningState = null, ResourceIdentifier netAppVolumeId = null, DiskPoolVolume diskPoolVolume = null, ResourceIdentifier elasticSanVolumeTargetId = null, DatastoreStatus? status = null) { return new AvsPrivateCloudDatastoreData( id, @@ -233,6 +325,7 @@ public static AvsPrivateCloudDatastoreData AvsPrivateCloudDatastoreData(Resource provisioningState, netAppVolumeId != null ? ResourceManagerModelFactory.WritableSubResource(netAppVolumeId) : null, diskPoolVolume, + elasticSanVolumeTargetId != null ? new ElasticSanVolume(elasticSanVolumeTargetId, serializedAdditionalRawData: null) : null, status, serializedAdditionalRawData: null); } @@ -240,7 +333,10 @@ public static AvsPrivateCloudDatastoreData AvsPrivateCloudDatastoreData(Resource /// Initializes a new instance of . /// Azure resource ID of the iSCSI target. /// Name of the LUN to be used for datastore. - /// Mode that describes whether the LUN has to be mounted as a datastore or attached as a LUN. + /// + /// Mode that describes whether the LUN has to be mounted as a datastore or + /// attached as a LUN + /// /// Device path. /// A new instance for mocking. public static DiskPoolVolume DiskPoolVolume(ResourceIdentifier targetId = null, string lunName = null, LunMountMode? mountOption = null, string path = null) @@ -248,58 +344,73 @@ public static DiskPoolVolume DiskPoolVolume(ResourceIdentifier targetId = null, return new DiskPoolVolume(targetId, lunName, mountOption, path, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// NSX-T Manager username. - /// NSX-T Manager password. - /// vCenter admin username. - /// vCenter admin password. - /// A new instance for mocking. - public static AdminCredentials AdminCredentials(string nsxtUsername = null, string nsxtPassword = null, string vCenterUsername = null, string vCenterPassword = null) + /// Initializes a new instance of . + /// List of hosts belonging to the availability zone in a cluster. + /// Availability zone identifier. + /// A new instance for mocking. + public static AvsClusterZone AvsClusterZone(IEnumerable hosts = null, string zone = null) { - return new AdminCredentials(nsxtUsername, nsxtPassword, vCenterUsername, vCenterPassword, serializedAdditionalRawData: null); + hosts ??= new List(); + + return new AvsClusterZone(hosts?.ToList(), zone, serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. - /// The activation key. - /// The status of the HCX Enterprise Site. - /// A new instance for mocking. - public static HcxEnterpriseSiteData HcxEnterpriseSiteData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string activationKey = null, HcxEnterpriseSiteStatus? status = null) + /// + /// The resource-specific properties for this resource. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + /// A new instance for mocking. + public static PlacementPolicyData PlacementPolicyData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, PlacementPolicyProperties properties = null) { - return new HcxEnterpriseSiteData( + return new PlacementPolicyData( id, name, resourceType, systemData, - activationKey, - status, + properties, serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . + /// Placement Policy type. + /// Whether the placement policy is enabled or disabled. + /// Display name of the placement policy. + /// The provisioning state. + /// A new instance for mocking. + public static PlacementPolicyProperties PlacementPolicyProperties(string policyType = null, PlacementPolicyState? state = null, string displayName = null, PlacementPolicyProvisioningState? provisioningState = null) + { + return new UnknownPlacementPolicyProperties(policyType == null ? default : new PlacementPolicyType(policyType), state, displayName, provisioningState, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. - /// The state of the ExpressRoute Circuit Authorization provisioning. - /// The ID of the ExpressRoute Circuit Authorization. - /// The key of the ExpressRoute Circuit Authorization. - /// The ID of the ExpressRoute Circuit. - /// A new instance for mocking. - public static ExpressRouteAuthorizationData ExpressRouteAuthorizationData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ExpressRouteAuthorizationProvisioningState? provisioningState = null, ResourceIdentifier expressRouteAuthorizationId = null, string expressRouteAuthorizationKey = null, ResourceIdentifier expressRouteId = null) + /// The provisioning state of the resource. + /// Display name of the VM. + /// Virtual machine managed object reference id. + /// Path to virtual machine's folder starting from datacenter virtual machine folder. + /// Whether VM DRS-driven movement is restricted (enabled) or not (disabled). + /// A new instance for mocking. + public static AvsPrivateCloudClusterVirtualMachineData AvsPrivateCloudClusterVirtualMachineData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, AvsVirtualMachineProvisioningState? provisioningState = null, string displayName = null, string moRefId = null, string folderPath = null, VirtualMachineRestrictMovementState? restrictMovement = null) { - return new ExpressRouteAuthorizationData( + return new AvsPrivateCloudClusterVirtualMachineData( id, name, resourceType, systemData, provisioningState, - expressRouteAuthorizationId, - expressRouteAuthorizationKey, - expressRouteId, + displayName, + moRefId, + folderPath, + restrictMovement, serializedAdditionalRawData: null); } @@ -309,11 +420,23 @@ public static ExpressRouteAuthorizationData ExpressRouteAuthorizationData(Resour /// The resourceType. /// The systemData. /// The state of the ExpressRoute Circuit Authorization provisioning. - /// The network used for global reach carved out from the original network block provided for the private cloud. - /// Authorization key from the peer express route used for the global reach connection. + /// + /// The network used for global reach carved out from the original network block + /// provided for the private cloud + /// + /// + /// Authorization key from the peer express route used for the global reach + /// connection + /// /// The connection status of the global reach connection. - /// Identifier of the ExpressRoute Circuit to peer with in the global reach connection. - /// The ID of the Private Cloud's ExpressRoute Circuit that is participating in the global reach connection. + /// + /// Identifier of the ExpressRoute Circuit to peer with in the global reach + /// connection + /// + /// + /// The ID of the Private Cloud's ExpressRoute Circuit that is participating in the + /// global reach connection + /// /// A new instance for mocking. public static GlobalReachConnectionData GlobalReachConnectionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, GlobalReachConnectionProvisioningState? provisioningState = null, string addressPrefix = null, string authorizationKey = null, GlobalReachConnectionStatus? circuitConnectionStatus = null, ResourceIdentifier peerExpressRouteCircuit = null, ResourceIdentifier expressRouteId = null) { @@ -331,194 +454,259 @@ public static GlobalReachConnectionData GlobalReachConnectionData(ResourceIdenti serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. - /// A new instance for mocking. - public static WorkloadNetworkData WorkloadNetworkData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null) + /// The provisioning state of the resource. + /// The activation key. + /// The status of the HCX Enterprise Site. + /// A new instance for mocking. + public static HcxEnterpriseSiteData HcxEnterpriseSiteData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, HcxEnterpriseSiteProvisioningState? provisioningState = null, string activationKey = null, HcxEnterpriseSiteStatus? status = null) { - return new WorkloadNetworkData(id, name, resourceType, systemData, serializedAdditionalRawData: null); + return new HcxEnterpriseSiteData( + id, + name, + resourceType, + systemData, + provisioningState, + activationKey, + status, + serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. - /// Display name of the segment. - /// Gateway which to connect segment to. - /// Subnet which to connect segment to. - /// Port Vif which segment is associated with. - /// Segment status. - /// The provisioning state. - /// NSX revision number. - /// A new instance for mocking. - public static WorkloadNetworkSegmentData WorkloadNetworkSegmentData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string displayName = null, string connectedGateway = null, WorkloadNetworkSegmentSubnet subnet = null, IEnumerable portVif = null, WorkloadNetworkSegmentStatus? status = null, WorkloadNetworkSegmentProvisioningState? provisioningState = null, long? revision = null) + /// The state of the iSCSI path provisioning. + /// CIDR Block for iSCSI path. + /// A new instance for mocking. + public static IscsiPathData IscsiPathData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IscsiPathProvisioningState? provisioningState = null, string networkBlock = null) { - portVif ??= new List(); - - return new WorkloadNetworkSegmentData( + return new IscsiPathData( id, name, resourceType, systemData, - displayName, - connectedGateway, - subnet, - portVif?.ToList(), - status, provisioningState, - revision, + networkBlock, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// Name of port or VIF attached to segment. - /// A new instance for mocking. - public static WorkloadNetworkSegmentPortVif WorkloadNetworkSegmentPortVif(string portName = null) + /// Initializes a new instance of . + /// NSX-T Manager username. + /// NSX-T Manager password. + /// vCenter admin username. + /// vCenter admin password. + /// A new instance for mocking. + public static AdminCredentials AdminCredentials(string nsxtUsername = null, string nsxtPassword = null, string vCenterUsername = null, string vCenterPassword = null) { - return new WorkloadNetworkSegmentPortVif(portName, serializedAdditionalRawData: null); + return new AdminCredentials(nsxtUsername, nsxtPassword, vCenterUsername, vCenterPassword, serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. - /// - /// DHCP properties. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . + /// A reference to the script cmdlet resource if user is running a AVS script. + /// + /// Parameters the script will accept + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . /// - /// A new instance for mocking. - public static WorkloadNetworkDhcpData WorkloadNetworkDhcpData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, WorkloadNetworkDhcpEntity properties = null) + /// + /// Parameters that will be hidden/not visible to ARM, such as passwords and + /// credentials + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + /// + /// Error message if the script was able to run, but if the script itself had + /// errors or powershell threw an exception + /// + /// Time limit for execution. + /// Time to live for the resource. If not provided, will be available for 60 days. + /// Time the script execution was submitted. + /// Time the script execution was started. + /// Time the script execution was finished. + /// The state of the script execution resource. + /// Standard output stream from the powershell execution. + /// User-defined dictionary. + /// Standard information out stream from the powershell execution. + /// Standard warning out stream from the powershell execution. + /// Standard error output stream from the powershell execution. + /// A new instance for mocking. + public static ScriptExecutionData ScriptExecutionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ResourceIdentifier scriptCmdletId = null, IEnumerable parameters = null, IEnumerable hiddenParameters = null, string failureReason = null, string timeout = null, string retention = null, DateTimeOffset? submittedOn = null, DateTimeOffset? startedOn = null, DateTimeOffset? finishedOn = null, ScriptExecutionProvisioningState? provisioningState = null, IEnumerable output = null, BinaryData namedOutputs = null, IEnumerable information = null, IEnumerable warnings = null, IEnumerable errors = null) { - return new WorkloadNetworkDhcpData( + parameters ??= new List(); + hiddenParameters ??= new List(); + output ??= new List(); + information ??= new List(); + warnings ??= new List(); + errors ??= new List(); + + return new ScriptExecutionData( id, name, resourceType, systemData, - properties, - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// Type of DHCP: SERVER or RELAY. - /// Display name of the DHCP entity. - /// NSX Segments consuming DHCP. - /// The provisioning state. - /// NSX revision number. - /// A new instance for mocking. - public static WorkloadNetworkDhcpEntity WorkloadNetworkDhcpEntity(string dhcpType = null, string displayName = null, IEnumerable segments = null, WorkloadNetworkDhcpProvisioningState? provisioningState = null, long? revision = null) - { - segments ??= new List(); - - return new UnknownWorkloadNetworkDhcpEntity( - dhcpType == null ? default : new DhcpTypeEnum(dhcpType), - displayName, - segments?.ToList(), + scriptCmdletId, + parameters?.ToList(), + hiddenParameters?.ToList(), + failureReason, + timeout, + retention, + submittedOn, + startedOn, + finishedOn, provisioningState, - revision, + output?.ToList(), + namedOutputs, + information?.ToList(), + warnings?.ToList(), + errors?.ToList(), serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. - /// Display name of the DHCP entity. - /// NSX Gateway Path. - /// A new instance for mocking. - public static WorkloadNetworkGatewayData WorkloadNetworkGatewayData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string displayName = null, string path = null) + /// The provisioning state of the resource. + /// User friendly description of the package. + /// Module version. + /// Company that created and supports the package. + /// Link to support by the package vendor. + /// A new instance for mocking. + public static ScriptPackageData ScriptPackageData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ScriptPackageProvisioningState? provisioningState = null, string description = null, string version = null, string company = null, Uri uri = null) { - return new WorkloadNetworkGatewayData( + return new ScriptPackageData( id, name, resourceType, systemData, - displayName, - path, + provisioningState, + description, + version, + company, + uri, serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. - /// Display name of the port mirroring profile. - /// Direction of port mirroring profile. - /// Source VM Group. - /// Destination VM Group. - /// Port Mirroring Status. - /// The provisioning state. - /// NSX revision number. - /// A new instance for mocking. - public static WorkloadNetworkPortMirroringProfileData WorkloadNetworkPortMirroringProfileData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string displayName = null, PortMirroringProfileDirection? direction = null, string source = null, string destination = null, PortMirroringProfileStatus? status = null, WorkloadNetworkPortMirroringProfileProvisioningState? provisioningState = null, long? revision = null) + /// The provisioning state of the resource. + /// Description of the scripts functionality. + /// Recommended time limit for execution. + /// Specifies whether a script cmdlet is intended to be invoked only through automation or visible to customers. + /// Parameters the script will accept. + /// A new instance for mocking. + public static ScriptCmdletData ScriptCmdletData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ScriptCmdletProvisioningState? provisioningState = null, string description = null, TimeSpan? timeout = null, ScriptCmdletAudience? audience = null, IEnumerable parameters = null) { - return new WorkloadNetworkPortMirroringProfileData( + parameters ??= new List(); + + return new ScriptCmdletData( id, name, resourceType, systemData, - displayName, - direction, - source, - destination, - status, provisioningState, - revision, + description, + timeout, + audience, + parameters?.ToList(), serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . + /// + /// The type of parameter the script is expecting. psCredential is a + /// PSCredentialObject + /// + /// The parameter name that the script will expect a parameter value for. + /// User friendly description of the parameter. + /// + /// Should this parameter be visible to arm and passed in the parameters argument + /// when executing + /// + /// Is this parameter required or optional. + /// A new instance for mocking. + public static ScriptParameter ScriptParameter(ScriptParameterType? parameterType = null, string name = null, string description = null, ParameterVisibilityStatus? visibility = null, ParameterOptionalityStatus? optional = null) + { + return new ScriptParameter( + parameterType, + name, + description, + visibility, + optional, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. - /// Display name of the VM group. - /// Virtual machine members of this group. - /// VM Group status. - /// The provisioning state. - /// NSX revision number. - /// A new instance for mocking. - public static WorkloadNetworkVmGroupData WorkloadNetworkVmGroupData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string displayName = null, IEnumerable members = null, WorkloadNetworkVmGroupStatus? status = null, WorkloadNetworkVmGroupProvisioningState? provisioningState = null, long? revision = null) + /// The provisioning state of the resource. + /// A new instance for mocking. + public static WorkloadNetworkData WorkloadNetworkData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, WorkloadNetworkProvisioningState? provisioningState = null) { - members ??= new List(); - - return new WorkloadNetworkVmGroupData( + return new WorkloadNetworkData( id, name, resourceType, systemData, - displayName, - members?.ToList(), - status, provisioningState, - revision, serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. - /// Display name of the VM. - /// Virtual machine type. - /// A new instance for mocking. - public static WorkloadNetworkVirtualMachineData WorkloadNetworkVirtualMachineData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string displayName = null, WorkloadNetworkVmType? vmType = null) + /// + /// The resource-specific properties for this resource. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + /// A new instance for mocking. + public static WorkloadNetworkDhcpData WorkloadNetworkDhcpData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, WorkloadNetworkDhcpEntity properties = null) { - return new WorkloadNetworkVirtualMachineData( + return new WorkloadNetworkDhcpData( id, name, resourceType, systemData, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Type of DHCP: SERVER or RELAY. + /// Display name of the DHCP entity. + /// NSX Segments consuming DHCP. + /// The provisioning state. + /// NSX revision number. + /// A new instance for mocking. + public static WorkloadNetworkDhcpEntity WorkloadNetworkDhcpEntity(string dhcpType = null, string displayName = null, IEnumerable segments = null, WorkloadNetworkDhcpProvisioningState? provisioningState = null, long? revision = null) + { + segments ??= new List(); + + return new UnknownWorkloadNetworkDhcpEntity( + dhcpType == null ? default : new DhcpTypeEnum(dhcpType), displayName, - vmType, + segments?.ToList(), + provisioningState, + revision, serializedAdditionalRawData: null); } @@ -589,263 +777,188 @@ public static WorkloadNetworkDnsZoneData WorkloadNetworkDnsZoneData(ResourceIden serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. - /// Display name of the Public IP Block. - /// Number of Public IPs requested. - /// CIDR Block of the Public IP Block. - /// The provisioning state. - /// A new instance for mocking. - public static WorkloadNetworkPublicIPData WorkloadNetworkPublicIPData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string displayName = null, long? numberOfPublicIPs = null, string publicIPBlock = null, WorkloadNetworkPublicIPProvisioningState? provisioningState = null) + /// The provisioning state of the resource. + /// Display name of the DHCP entity. + /// NSX Gateway Path. + /// A new instance for mocking. + public static WorkloadNetworkGatewayData WorkloadNetworkGatewayData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, WorkloadNetworkProvisioningState? provisioningState = null, string displayName = null, string path = null) { - return new WorkloadNetworkPublicIPData( + return new WorkloadNetworkGatewayData( id, name, resourceType, systemData, - displayName, - numberOfPublicIPs, - publicIPBlock, provisioningState, + displayName, + path, serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. - /// The state of the cloud link. - /// Identifier of the other private cloud participating in the link. - /// A new instance for mocking. - public static AvsCloudLinkData AvsCloudLinkData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, AvsCloudLinkStatus? status = null, ResourceIdentifier linkedCloud = null) + /// Display name of the port mirroring profile. + /// Direction of port mirroring profile. + /// Source VM Group. + /// Destination VM Group. + /// Port Mirroring Status. + /// The provisioning state. + /// NSX revision number. + /// A new instance for mocking. + public static WorkloadNetworkPortMirroringProfileData WorkloadNetworkPortMirroringProfileData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string displayName = null, PortMirroringProfileDirection? direction = null, string source = null, string destination = null, PortMirroringProfileStatus? status = null, WorkloadNetworkPortMirroringProfileProvisioningState? provisioningState = null, long? revision = null) { - return new AvsCloudLinkData( + return new WorkloadNetworkPortMirroringProfileData( id, name, resourceType, systemData, + displayName, + direction, + source, + destination, status, - linkedCloud, + provisioningState, + revision, serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. - /// - /// The properties of an addon resource - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , and . - /// - /// A new instance for mocking. - public static AvsPrivateCloudAddonData AvsPrivateCloudAddonData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, AvsPrivateCloudAddonProperties properties = null) - { - return new AvsPrivateCloudAddonData( - id, - name, - resourceType, - systemData, - properties, - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The type of private cloud addon. - /// The state of the addon provisioning. - /// A new instance for mocking. - public static AvsPrivateCloudAddonProperties AvsPrivateCloudAddonProperties(string addonType = null, AddonProvisioningState? provisioningState = null) - { - return new UnknownAddonProperties(addonType == null ? default : new AddonType(addonType), provisioningState, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Display name of the VM. - /// Virtual machine managed object reference id. - /// Path to virtual machine's folder starting from datacenter virtual machine folder. - /// Whether VM DRS-driven movement is restricted (enabled) or not (disabled). - /// A new instance for mocking. - public static AvsPrivateCloudClusterVirtualMachineData AvsPrivateCloudClusterVirtualMachineData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string displayName = null, string moRefId = null, string folderPath = null, VirtualMachineRestrictMovementState? restrictMovement = null) + /// Display name of the Public IP Block. + /// Number of Public IPs requested. + /// CIDR Block of the Public IP Block. + /// The provisioning state. + /// A new instance for mocking. + public static WorkloadNetworkPublicIPData WorkloadNetworkPublicIPData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string displayName = null, long? numberOfPublicIPs = null, string publicIPBlock = null, WorkloadNetworkPublicIPProvisioningState? provisioningState = null) { - return new AvsPrivateCloudClusterVirtualMachineData( + return new WorkloadNetworkPublicIPData( id, name, resourceType, systemData, displayName, - moRefId, - folderPath, - restrictMovement, + numberOfPublicIPs, + publicIPBlock, + provisioningState, serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. - /// - /// placement policy properties - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . - /// - /// A new instance for mocking. - public static PlacementPolicyData PlacementPolicyData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, PlacementPolicyProperties properties = null) + /// Display name of the segment. + /// Gateway which to connect segment to. + /// Subnet which to connect segment to. + /// Port Vif which segment is associated with. + /// Segment status. + /// The provisioning state. + /// NSX revision number. + /// A new instance for mocking. + public static WorkloadNetworkSegmentData WorkloadNetworkSegmentData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string displayName = null, string connectedGateway = null, WorkloadNetworkSegmentSubnet subnet = null, IEnumerable portVif = null, WorkloadNetworkSegmentStatus? status = null, WorkloadNetworkSegmentProvisioningState? provisioningState = null, long? revision = null) { - return new PlacementPolicyData( + portVif ??= new List(); + + return new WorkloadNetworkSegmentData( id, name, resourceType, systemData, - properties, + displayName, + connectedGateway, + subnet, + portVif?.ToList(), + status, + provisioningState, + revision, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// placement policy type. - /// Whether the placement policy is enabled or disabled. - /// Display name of the placement policy. - /// The provisioning state. - /// A new instance for mocking. - public static PlacementPolicyProperties PlacementPolicyProperties(string policyType = null, PlacementPolicyState? state = null, string displayName = null, PlacementPolicyProvisioningState? provisioningState = null) + /// Initializes a new instance of . + /// Name of port or VIF attached to segment. + /// A new instance for mocking. + public static WorkloadNetworkSegmentPortVif WorkloadNetworkSegmentPortVif(string portName = null) { - return new UnknownPlacementPolicyProperties(policyType == null ? default : new PlacementPolicyType(policyType), state, displayName, provisioningState, serializedAdditionalRawData: null); + return new WorkloadNetworkSegmentPortVif(portName, serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. - /// User friendly description of the package. - /// Module version. - /// Company that created and supports the package. - /// Link to support by the package vendor. - /// A new instance for mocking. - public static ScriptPackageData ScriptPackageData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string description = null, string version = null, string company = null, Uri uri = null) + /// The provisioning state of the resource. + /// Display name of the VM. + /// Virtual machine type. + /// A new instance for mocking. + public static WorkloadNetworkVirtualMachineData WorkloadNetworkVirtualMachineData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, WorkloadNetworkProvisioningState? provisioningState = null, string displayName = null, WorkloadNetworkVmType? vmType = null) { - return new ScriptPackageData( + return new WorkloadNetworkVirtualMachineData( id, name, resourceType, systemData, - description, - version, - company, - uri, + provisioningState, + displayName, + vmType, serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. - /// Description of the scripts functionality. - /// Recommended time limit for execution. - /// Parameters the script will accept. - /// A new instance for mocking. - public static ScriptCmdletData ScriptCmdletData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string description = null, TimeSpan? timeout = null, IEnumerable parameters = null) + /// Display name of the VM group. + /// Virtual machine members of this group. + /// VM Group status. + /// The provisioning state. + /// NSX revision number. + /// A new instance for mocking. + public static WorkloadNetworkVmGroupData WorkloadNetworkVmGroupData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string displayName = null, IEnumerable members = null, WorkloadNetworkVmGroupStatus? status = null, WorkloadNetworkVmGroupProvisioningState? provisioningState = null, long? revision = null) { - parameters ??= new List(); + members ??= new List(); - return new ScriptCmdletData( + return new WorkloadNetworkVmGroupData( id, name, resourceType, systemData, - description, - timeout, - parameters?.ToList(), + displayName, + members?.ToList(), + status, + provisioningState, + revision, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The type of parameter the script is expecting. psCredential is a PSCredentialObject. - /// The parameter name that the script will expect a parameter value for. - /// User friendly description of the parameter. - /// Should this parameter be visible to arm and passed in the parameters argument when executing. - /// Is this parameter required or optional. - /// A new instance for mocking. - public static ScriptParameter ScriptParameter(ScriptParameterType? parameterType = null, string name = null, string description = null, ParameterVisibilityStatus? visibility = null, ParameterOptionalityStatus? optional = null) + /// Initializes a new instance of . + /// The state of the addon provisioning. + /// The VMware vCenter resource ID. + /// A new instance for mocking. + public static AddonArcProperties AddonArcProperties(AddonProvisioningState? provisioningState = null, string vCenter = null) { - return new ScriptParameter( - parameterType, - name, - description, - visibility, - optional, - serializedAdditionalRawData: null); + return new AddonArcProperties(AddonType.Arc, provisioningState, serializedAdditionalRawData: null, vCenter); } - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// A reference to the script cmdlet resource if user is running a AVS script. - /// - /// Parameters the script will accept - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , and . - /// - /// - /// Parameters that will be hidden/not visible to ARM, such as passwords and credentials - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , and . - /// - /// Error message if the script was able to run, but if the script itself had errors or powershell threw an exception. - /// Time limit for execution. - /// Time to live for the resource. If not provided, will be available for 60 days. - /// Time the script execution was submitted. - /// Time the script execution was started. - /// Time the script execution was finished. - /// The state of the script execution resource. - /// Standard output stream from the powershell execution. - /// User-defined dictionary. - /// Standard information out stream from the powershell execution. - /// Standard warning out stream from the powershell execution. - /// Standard error output stream from the powershell execution. - /// A new instance for mocking. - public static ScriptExecutionData ScriptExecutionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ResourceIdentifier scriptCmdletId = null, IEnumerable parameters = null, IEnumerable hiddenParameters = null, string failureReason = null, string timeout = null, string retention = null, DateTimeOffset? submittedOn = null, DateTimeOffset? startedOn = null, DateTimeOffset? finishedOn = null, ScriptExecutionProvisioningState? provisioningState = null, IEnumerable output = null, BinaryData namedOutputs = null, IEnumerable information = null, IEnumerable warnings = null, IEnumerable errors = null) + /// Initializes a new instance of . + /// The state of the addon provisioning. + /// The HCX offer, example VMware MaaS Cloud Provider (Enterprise). + /// A new instance for mocking. + public static AddonHcxProperties AddonHcxProperties(AddonProvisioningState? provisioningState = null, string offer = null) { - parameters ??= new List(); - hiddenParameters ??= new List(); - output ??= new List(); - information ??= new List(); - warnings ??= new List(); - errors ??= new List(); - - return new ScriptExecutionData( - id, - name, - resourceType, - systemData, - scriptCmdletId, - parameters?.ToList(), - hiddenParameters?.ToList(), - failureReason, - timeout, - retention, - submittedOn, - startedOn, - finishedOn, - provisioningState, - output?.ToList(), - namedOutputs, - information?.ToList(), - warnings?.ToList(), - errors?.ToList(), - serializedAdditionalRawData: null); + return new AddonHcxProperties(AddonType.HCX, provisioningState, serializedAdditionalRawData: null, offer); } /// Initializes a new instance of . @@ -866,45 +979,53 @@ public static AddonVrProperties AddonVrProperties(AddonProvisioningState? provis return new AddonVrProperties(AddonType.VR, provisioningState, serializedAdditionalRawData: null, vrsCount); } - /// Initializes a new instance of . - /// The state of the addon provisioning. - /// The HCX offer, example VMware MaaS Cloud Provider (Enterprise). - /// A new instance for mocking. - public static AddonHcxProperties AddonHcxProperties(AddonProvisioningState? provisioningState = null, string offer = null) + /// Initializes a new instance of . + /// Whether the placement policy is enabled or disabled. + /// Display name of the placement policy. + /// The provisioning state. + /// Virtual machine members list. + /// Host members list. + /// placement policy affinity type. + /// vm-host placement policy affinity strength (should/must). + /// placement policy azure hybrid benefit opt-in type. + /// A new instance for mocking. + public static VmHostPlacementPolicyProperties VmHostPlacementPolicyProperties(PlacementPolicyState? state = null, string displayName = null, PlacementPolicyProvisioningState? provisioningState = null, IEnumerable vmMembers = null, IEnumerable hostMembers = null, AvsPlacementPolicyAffinityType affinityType = default, VmHostPlacementPolicyAffinityStrength? affinityStrength = null, AzureHybridBenefitType? azureHybridBenefitType = null) { - return new AddonHcxProperties(AddonType.HCX, provisioningState, serializedAdditionalRawData: null, offer); - } + vmMembers ??= new List(); + hostMembers ??= new List(); - /// Initializes a new instance of . - /// The state of the addon provisioning. - /// The VMware vCenter resource ID. - /// A new instance for mocking. - public static AddonArcProperties AddonArcProperties(AddonProvisioningState? provisioningState = null, string vCenter = null) - { - return new AddonArcProperties(AddonType.Arc, provisioningState, serializedAdditionalRawData: null, vCenter); + return new VmHostPlacementPolicyProperties( + PlacementPolicyType.VmHost, + state, + displayName, + provisioningState, + serializedAdditionalRawData: null, + vmMembers?.ToList(), + hostMembers?.ToList(), + affinityType, + affinityStrength, + azureHybridBenefitType); } - /// Initializes a new instance of . - /// Display name of the DHCP entity. - /// NSX Segments consuming DHCP. + /// Initializes a new instance of . + /// Whether the placement policy is enabled or disabled. + /// Display name of the placement policy. /// The provisioning state. - /// NSX revision number. - /// DHCP Server Address. - /// DHCP Server Lease Time. - /// A new instance for mocking. - public static WorkloadNetworkDhcpServer WorkloadNetworkDhcpServer(string displayName = null, IEnumerable segments = null, WorkloadNetworkDhcpProvisioningState? provisioningState = null, long? revision = null, string serverAddress = null, long? leaseTime = null) + /// Virtual machine members list. + /// placement policy affinity type. + /// A new instance for mocking. + public static VmPlacementPolicyProperties VmPlacementPolicyProperties(PlacementPolicyState? state = null, string displayName = null, PlacementPolicyProvisioningState? provisioningState = null, IEnumerable vmMembers = null, AvsPlacementPolicyAffinityType affinityType = default) { - segments ??= new List(); + vmMembers ??= new List(); - return new WorkloadNetworkDhcpServer( - DhcpTypeEnum.Server, + return new VmPlacementPolicyProperties( + PlacementPolicyType.VmVm, + state, displayName, - segments?.ToList(), provisioningState, - revision, serializedAdditionalRawData: null, - serverAddress, - leaseTime); + vmMembers?.ToList(), + affinityType); } /// Initializes a new instance of . @@ -929,53 +1050,181 @@ public static WorkloadNetworkDhcpRelay WorkloadNetworkDhcpRelay(string displayNa serverAddresses?.ToList()); } - /// Initializes a new instance of . - /// Whether the placement policy is enabled or disabled. - /// Display name of the placement policy. + /// Initializes a new instance of . + /// Display name of the DHCP entity. + /// NSX Segments consuming DHCP. /// The provisioning state. - /// Virtual machine members list. - /// placement policy affinity type. - /// A new instance for mocking. - public static VmPlacementPolicyProperties VmPlacementPolicyProperties(PlacementPolicyState? state = null, string displayName = null, PlacementPolicyProvisioningState? provisioningState = null, IEnumerable vmMembers = null, AvsPlacementPolicyAffinityType affinityType = default) + /// NSX revision number. + /// DHCP Server Address. + /// DHCP Server Lease Time. + /// A new instance for mocking. + public static WorkloadNetworkDhcpServer WorkloadNetworkDhcpServer(string displayName = null, IEnumerable segments = null, WorkloadNetworkDhcpProvisioningState? provisioningState = null, long? revision = null, string serverAddress = null, long? leaseTime = null) { - vmMembers ??= new List(); + segments ??= new List(); - return new VmPlacementPolicyProperties( - PlacementPolicyType.VmVm, - state, + return new WorkloadNetworkDhcpServer( + DhcpTypeEnum.Server, displayName, + segments?.ToList(), provisioningState, + revision, serializedAdditionalRawData: null, - vmMembers?.ToList(), - affinityType); + serverAddress, + leaseTime); } - /// Initializes a new instance of . - /// Whether the placement policy is enabled or disabled. - /// Display name of the placement policy. - /// The provisioning state. - /// Virtual machine members list. - /// Host members list. - /// placement policy affinity type. - /// vm-host placement policy affinity strength (should/must). - /// placement policy azure hybrid benefit opt-in type. - /// A new instance for mocking. - public static VmHostPlacementPolicyProperties VmHostPlacementPolicyProperties(PlacementPolicyState? state = null, string displayName = null, PlacementPolicyProvisioningState? provisioningState = null, IEnumerable vmMembers = null, IEnumerable hostMembers = null, AvsPlacementPolicyAffinityType affinityType = default, VmHostPlacementPolicyAffinityStrength? affinityStrength = null, AzureHybridBenefitType? azureHybridBenefitType = null) + /// Initializes a new instance of . + /// Endpoint for the NSX-T Data Center manager. + /// Endpoint for Virtual Center Server Appliance. + /// Endpoint for the HCX Cloud Manager. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static AvsPrivateCloudEndpoints AvsPrivateCloudEndpoints(string nsxtManager, string vcsa, string hcxCloudManager) { - vmMembers ??= new List(); - hostMembers ??= new List(); + return AvsPrivateCloudEndpoints(nsxtManager: nsxtManager, vcsa: vcsa, hcxCloudManager: hcxCloudManager, nsxtManagerIP: default, vcenterIP: default, hcxCloudManagerIP: default); + } - return new VmHostPlacementPolicyProperties( - PlacementPolicyType.VmHost, - state, - displayName, - provisioningState, - serializedAdditionalRawData: null, - vmMembers?.ToList(), - hostMembers?.ToList(), - affinityType, - affinityStrength, - azureHybridBenefitType); + /// Initializes a new instance of . + /// The cluster size. + /// The state of the cluster provisioning. + /// The identity. + /// The hosts. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static AvsManagementCluster AvsManagementCluster(int? clusterSize, AvsPrivateCloudClusterProvisioningState? provisioningState, int? clusterId, IEnumerable hosts) + { + return AvsManagementCluster(clusterSize: clusterSize, provisioningState: provisioningState, clusterId: clusterId, hosts: hosts, vsanDatastoreName: default); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The state of the datastore provisioning. + /// An Azure NetApp Files volume. + /// An iSCSI volume. + /// The operational status of the datastore. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static AvsPrivateCloudDatastoreData AvsPrivateCloudDatastoreData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, AvsPrivateCloudDatastoreProvisioningState? provisioningState, ResourceIdentifier netAppVolumeId, DiskPoolVolume diskPoolVolume, DatastoreStatus? status) + { + return AvsPrivateCloudDatastoreData(id: id, name: name, resourceType: resourceType, systemData: systemData, provisioningState: provisioningState, netAppVolumeId: netAppVolumeId, diskPoolVolume: diskPoolVolume, elasticSanVolumeTargetId: default, status: status); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The activation key. + /// The status of the HCX Enterprise Site. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static HcxEnterpriseSiteData HcxEnterpriseSiteData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string activationKey, HcxEnterpriseSiteStatus? status) + { + return HcxEnterpriseSiteData(id: id, name: name, resourceType: resourceType, systemData: systemData, provisioningState: default, activationKey: activationKey, status: status); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static WorkloadNetworkData WorkloadNetworkData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData) + { + return WorkloadNetworkData(id: id, name: name, resourceType: resourceType, systemData: systemData, provisioningState: default); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Display name of the DHCP entity. + /// NSX Gateway Path. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static WorkloadNetworkGatewayData WorkloadNetworkGatewayData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string displayName, string path) + { + return WorkloadNetworkGatewayData(id: id, name: name, resourceType: resourceType, systemData: systemData, provisioningState: default, displayName: displayName, path: path); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Display name of the VM. + /// Virtual machine type. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static WorkloadNetworkVirtualMachineData WorkloadNetworkVirtualMachineData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string displayName, WorkloadNetworkVmType? vmType) + { + return WorkloadNetworkVirtualMachineData(id: id, name: name, resourceType: resourceType, systemData: systemData, provisioningState: default, displayName: displayName, vmType: vmType); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The state of the cloud link. + /// Identifier of the other private cloud participating in the link. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static AvsCloudLinkData AvsCloudLinkData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, AvsCloudLinkStatus? status, ResourceIdentifier linkedCloud) + { + return AvsCloudLinkData(id: id, name: name, resourceType: resourceType, systemData: systemData, provisioningState: default, status: status, linkedCloud: linkedCloud); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Display name of the VM. + /// Virtual machine managed object reference id. + /// Path to virtual machine's folder starting from datacenter virtual machine folder. + /// Whether VM DRS-driven movement is restricted (enabled) or not (disabled). + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static AvsPrivateCloudClusterVirtualMachineData AvsPrivateCloudClusterVirtualMachineData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string displayName, string moRefId, string folderPath, VirtualMachineRestrictMovementState? restrictMovement) + { + return AvsPrivateCloudClusterVirtualMachineData(id: id, name: name, resourceType: resourceType, systemData: systemData, provisioningState: default, displayName: displayName, moRefId: moRefId, folderPath: folderPath, restrictMovement: restrictMovement); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// User friendly description of the package. + /// Module version. + /// Company that created and supports the package. + /// Link to support by the package vendor. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static ScriptPackageData ScriptPackageData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string description, string version, string company, Uri uri) + { + return ScriptPackageData(id: id, name: name, resourceType: resourceType, systemData: systemData, provisioningState: default, description: description, version: version, company: company, uri: uri); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Description of the scripts functionality. + /// Recommended time limit for execution. + /// Parameters the script will accept. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static ScriptCmdletData ScriptCmdletData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string description, TimeSpan? timeout, IEnumerable parameters) + { + return ScriptCmdletData(id: id, name: name, resourceType: resourceType, systemData: systemData, provisioningState: default, description: description, timeout: timeout, audience: default, parameters: parameters); } } } diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsCloudLinkCollection.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsCloudLinkCollection.cs index 6d91b26ec6f2..c316424f14b0 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsCloudLinkCollection.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsCloudLinkCollection.cs @@ -52,7 +52,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) } /// - /// Create or update a cloud link in a private cloud + /// Create a CloudLink /// /// /// Request Path @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -73,8 +73,8 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Name of the cloud link resource. - /// A cloud link in the private cloud. + /// Name of the cloud link. + /// Resource create parameters. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// or is null. @@ -88,7 +88,7 @@ public virtual async Task> CreateOrUpdateAsyn try { var response = await _avsCloudLinkCloudLinksRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cloudLinkName, data, cancellationToken).ConfigureAwait(false); - var operation = new AvsArmOperation(new AvsCloudLinkOperationSource(Client), _avsCloudLinkCloudLinksClientDiagnostics, Pipeline, _avsCloudLinkCloudLinksRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cloudLinkName, data).Request, response, OperationFinalStateVia.Location); + var operation = new AvsArmOperation(new AvsCloudLinkOperationSource(Client), _avsCloudLinkCloudLinksClientDiagnostics, Pipeline, _avsCloudLinkCloudLinksRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cloudLinkName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -101,7 +101,7 @@ public virtual async Task> CreateOrUpdateAsyn } /// - /// Create or update a cloud link in a private cloud + /// Create a CloudLink /// /// /// Request Path @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUpdateAsyn /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -122,8 +122,8 @@ public virtual async Task> CreateOrUpdateAsyn /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Name of the cloud link resource. - /// A cloud link in the private cloud. + /// Name of the cloud link. + /// Resource create parameters. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// or is null. @@ -137,7 +137,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitU try { var response = _avsCloudLinkCloudLinksRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cloudLinkName, data, cancellationToken); - var operation = new AvsArmOperation(new AvsCloudLinkOperationSource(Client), _avsCloudLinkCloudLinksClientDiagnostics, Pipeline, _avsCloudLinkCloudLinksRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cloudLinkName, data).Request, response, OperationFinalStateVia.Location); + var operation = new AvsArmOperation(new AvsCloudLinkOperationSource(Client), _avsCloudLinkCloudLinksClientDiagnostics, Pipeline, _avsCloudLinkCloudLinksRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cloudLinkName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -150,7 +150,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitU } /// - /// Get an cloud link by name in a private cloud + /// Get a CloudLink /// /// /// Request Path @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitU /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -170,7 +170,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitU /// /// /// - /// Name of the cloud link resource. + /// Name of the cloud link. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -195,7 +195,7 @@ public virtual async Task> GetAsync(string cloudL } /// - /// Get an cloud link by name in a private cloud + /// Get a CloudLink /// /// /// Request Path @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(string cloudL /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -215,7 +215,7 @@ public virtual async Task> GetAsync(string cloudL /// /// /// - /// Name of the cloud link resource. + /// Name of the cloud link. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -240,7 +240,7 @@ public virtual Response Get(string cloudLinkName, Cancella } /// - /// List cloud link in a private cloud + /// List CloudLink resources by PrivateCloud /// /// /// Request Path @@ -252,7 +252,7 @@ public virtual Response Get(string cloudLinkName, Cancella /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -270,7 +270,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken } /// - /// List cloud link in a private cloud + /// List CloudLink resources by PrivateCloud /// /// /// Request Path @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken cancellat /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -320,7 +320,7 @@ public virtual Pageable GetAll(CancellationToken cancellat /// /// /// - /// Name of the cloud link resource. + /// Name of the cloud link. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string cloudLinkName, Canc /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -363,7 +363,7 @@ public virtual async Task> ExistsAsync(string cloudLinkName, Canc /// /// /// - /// Name of the cloud link resource. + /// Name of the cloud link. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -398,7 +398,7 @@ public virtual Response Exists(string cloudLinkName, CancellationToken can /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -406,7 +406,7 @@ public virtual Response Exists(string cloudLinkName, CancellationToken can /// /// /// - /// Name of the cloud link resource. + /// Name of the cloud link. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -443,7 +443,7 @@ public virtual async Task> GetIfExistsAsy /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -451,7 +451,7 @@ public virtual async Task> GetIfExistsAsy /// /// /// - /// Name of the cloud link resource. + /// Name of the cloud link. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsCloudLinkData.Serialization.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsCloudLinkData.Serialization.cs index 0ef62e6596ed..87b1a0acd6c4 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsCloudLinkData.Serialization.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsCloudLinkData.Serialization.cs @@ -39,6 +39,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } if (options.Format != "W" && Optional.IsDefined(Status)) { writer.WritePropertyName("status"u8); @@ -76,6 +81,7 @@ internal static AvsCloudLinkData DeserializeAvsCloudLinkData(JsonElement element string name = default; ResourceType type = default; SystemData systemData = default; + AvsCloudLinkProvisioningState? provisioningState = default; AvsCloudLinkStatus? status = default; ResourceIdentifier linkedCloud = default; IDictionary serializedAdditionalRawData = default; @@ -115,6 +121,15 @@ internal static AvsCloudLinkData DeserializeAvsCloudLinkData(JsonElement element } foreach (var property0 in property.Value.EnumerateObject()) { + if (property0.NameEquals("provisioningState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new AvsCloudLinkProvisioningState(property0.Value.GetString()); + continue; + } if (property0.NameEquals("status"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -147,6 +162,7 @@ internal static AvsCloudLinkData DeserializeAvsCloudLinkData(JsonElement element name, type, systemData, + provisioningState, status, linkedCloud, serializedAdditionalRawData); diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsCloudLinkData.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsCloudLinkData.cs index 52ed98ef6539..40557248ca47 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsCloudLinkData.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsCloudLinkData.cs @@ -61,16 +61,20 @@ public AvsCloudLinkData() /// The name. /// The resourceType. /// The systemData. + /// The provisioning state of the resource. /// The state of the cloud link. /// Identifier of the other private cloud participating in the link. /// Keeps track of any properties unknown to the library. - internal AvsCloudLinkData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, AvsCloudLinkStatus? status, ResourceIdentifier linkedCloud, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal AvsCloudLinkData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, AvsCloudLinkProvisioningState? provisioningState, AvsCloudLinkStatus? status, ResourceIdentifier linkedCloud, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { + ProvisioningState = provisioningState; Status = status; LinkedCloud = linkedCloud; _serializedAdditionalRawData = serializedAdditionalRawData; } + /// The provisioning state of the resource. + public AvsCloudLinkProvisioningState? ProvisioningState { get; } /// The state of the cloud link. public AvsCloudLinkStatus? Status { get; } /// Identifier of the other private cloud participating in the link. diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsCloudLinkResource.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsCloudLinkResource.cs index 569a2ac75c64..becf6cebb180 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsCloudLinkResource.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsCloudLinkResource.cs @@ -89,7 +89,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) } /// - /// Get an cloud link by name in a private cloud + /// Get a CloudLink /// /// /// Request Path @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -129,7 +129,7 @@ public virtual async Task> GetAsync(CancellationT } /// - /// Get an cloud link by name in a private cloud + /// Get a CloudLink /// /// /// Request Path @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(CancellationT /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -169,7 +169,7 @@ public virtual Response Get(CancellationToken cancellation } /// - /// Delete a cloud link in a private cloud + /// Delete a CloudLink /// /// /// Request Path @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken cancellation /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell } /// - /// Delete a cloud link in a private cloud + /// Delete a CloudLink /// /// /// Request Path @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel } /// - /// Create or update a cloud link in a private cloud + /// Create a CloudLink /// /// /// Request Path @@ -265,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -274,7 +274,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// A cloud link in the private cloud. + /// Resource create parameters. /// The cancellation token to use. /// is null. public virtual async Task> UpdateAsync(WaitUntil waitUntil, AvsCloudLinkData data, CancellationToken cancellationToken = default) @@ -286,7 +286,7 @@ public virtual async Task> UpdateAsync(WaitUn try { var response = await _avsCloudLinkCloudLinksRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); - var operation = new AvsArmOperation(new AvsCloudLinkOperationSource(Client), _avsCloudLinkCloudLinksClientDiagnostics, Pipeline, _avsCloudLinkCloudLinksRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + var operation = new AvsArmOperation(new AvsCloudLinkOperationSource(Client), _avsCloudLinkCloudLinksClientDiagnostics, Pipeline, _avsCloudLinkCloudLinksRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -299,7 +299,7 @@ public virtual async Task> UpdateAsync(WaitUn } /// - /// Create or update a cloud link in a private cloud + /// Create a CloudLink /// /// /// Request Path @@ -311,7 +311,7 @@ public virtual async Task> UpdateAsync(WaitUn /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -320,7 +320,7 @@ public virtual async Task> UpdateAsync(WaitUn /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// A cloud link in the private cloud. + /// Resource create parameters. /// The cancellation token to use. /// is null. public virtual ArmOperation Update(WaitUntil waitUntil, AvsCloudLinkData data, CancellationToken cancellationToken = default) @@ -332,7 +332,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, Av try { var response = _avsCloudLinkCloudLinksRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); - var operation = new AvsArmOperation(new AvsCloudLinkOperationSource(Client), _avsCloudLinkCloudLinksClientDiagnostics, Pipeline, _avsCloudLinkCloudLinksRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + var operation = new AvsArmOperation(new AvsCloudLinkOperationSource(Client), _avsCloudLinkCloudLinksClientDiagnostics, Pipeline, _avsCloudLinkCloudLinksRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsPrivateCloudAddonCollection.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsPrivateCloudAddonCollection.cs index b3d04e7c069a..2294956f0fa7 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsPrivateCloudAddonCollection.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsPrivateCloudAddonCollection.cs @@ -52,7 +52,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) } /// - /// Create or update a addon in a private cloud + /// Create a Addon /// /// /// Request Path @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -73,8 +73,8 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Name of the addon for the private cloud. - /// A addon in the private cloud. + /// Name of the addon. + /// Resource create parameters. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// or is null. @@ -88,7 +88,7 @@ public virtual async Task> CreateOrUp try { var response = await _avsPrivateCloudAddonAddonsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, addonName, data, cancellationToken).ConfigureAwait(false); - var operation = new AvsArmOperation(new AvsPrivateCloudAddonOperationSource(Client), _avsPrivateCloudAddonAddonsClientDiagnostics, Pipeline, _avsPrivateCloudAddonAddonsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, addonName, data).Request, response, OperationFinalStateVia.Location); + var operation = new AvsArmOperation(new AvsPrivateCloudAddonOperationSource(Client), _avsPrivateCloudAddonAddonsClientDiagnostics, Pipeline, _avsPrivateCloudAddonAddonsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, addonName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -101,7 +101,7 @@ public virtual async Task> CreateOrUp } /// - /// Create or update a addon in a private cloud + /// Create a Addon /// /// /// Request Path @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUp /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -122,8 +122,8 @@ public virtual async Task> CreateOrUp /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Name of the addon for the private cloud. - /// A addon in the private cloud. + /// Name of the addon. + /// Resource create parameters. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// or is null. @@ -137,7 +137,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUnt try { var response = _avsPrivateCloudAddonAddonsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, addonName, data, cancellationToken); - var operation = new AvsArmOperation(new AvsPrivateCloudAddonOperationSource(Client), _avsPrivateCloudAddonAddonsClientDiagnostics, Pipeline, _avsPrivateCloudAddonAddonsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, addonName, data).Request, response, OperationFinalStateVia.Location); + var operation = new AvsArmOperation(new AvsPrivateCloudAddonOperationSource(Client), _avsPrivateCloudAddonAddonsClientDiagnostics, Pipeline, _avsPrivateCloudAddonAddonsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, addonName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -150,7 +150,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUnt } /// - /// Get an addon by name in a private cloud + /// Get a Addon /// /// /// Request Path @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUnt /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -170,7 +170,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUnt /// /// /// - /// Name of the addon for the private cloud. + /// Name of the addon. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -195,7 +195,7 @@ public virtual async Task> GetAsync(strin } /// - /// Get an addon by name in a private cloud + /// Get a Addon /// /// /// Request Path @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(strin /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -215,7 +215,7 @@ public virtual async Task> GetAsync(strin /// /// /// - /// Name of the addon for the private cloud. + /// Name of the addon. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -240,7 +240,7 @@ public virtual Response Get(string addonName, Canc } /// - /// List addons in a private cloud + /// List Addon resources by PrivateCloud /// /// /// Request Path @@ -252,7 +252,7 @@ public virtual Response Get(string addonName, Canc /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -270,7 +270,7 @@ public virtual AsyncPageable GetAllAsync(Cancellat } /// - /// List addons in a private cloud + /// List Addon resources by PrivateCloud /// /// /// Request Path @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(Cancellat /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken c /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -320,7 +320,7 @@ public virtual Pageable GetAll(CancellationToken c /// /// /// - /// Name of the addon for the private cloud. + /// Name of the addon. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string addonName, Cancella /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -363,7 +363,7 @@ public virtual async Task> ExistsAsync(string addonName, Cancella /// /// /// - /// Name of the addon for the private cloud. + /// Name of the addon. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -398,7 +398,7 @@ public virtual Response Exists(string addonName, CancellationToken cancell /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -406,7 +406,7 @@ public virtual Response Exists(string addonName, CancellationToken cancell /// /// /// - /// Name of the addon for the private cloud. + /// Name of the addon. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -443,7 +443,7 @@ public virtual async Task> GetIfE /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -451,7 +451,7 @@ public virtual async Task> GetIfE /// /// /// - /// Name of the addon for the private cloud. + /// Name of the addon. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsPrivateCloudAddonData.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsPrivateCloudAddonData.cs index b9d6c3d107b3..ee048fa34e28 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsPrivateCloudAddonData.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsPrivateCloudAddonData.cs @@ -62,7 +62,7 @@ public AvsPrivateCloudAddonData() /// The resourceType. /// The systemData. /// - /// The properties of an addon resource + /// The resource-specific properties for this resource. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include , , and . /// @@ -74,7 +74,7 @@ internal AvsPrivateCloudAddonData(ResourceIdentifier id, string name, ResourceTy } /// - /// The properties of an addon resource + /// The resource-specific properties for this resource. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include , , and . /// diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsPrivateCloudAddonResource.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsPrivateCloudAddonResource.cs index 1a447bad5d29..2f4bbb5d238b 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsPrivateCloudAddonResource.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsPrivateCloudAddonResource.cs @@ -89,7 +89,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) } /// - /// Get an addon by name in a private cloud + /// Get a Addon /// /// /// Request Path @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -129,7 +129,7 @@ public virtual async Task> GetAsync(Cance } /// - /// Get an addon by name in a private cloud + /// Get a Addon /// /// /// Request Path @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Cance /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -169,7 +169,7 @@ public virtual Response Get(CancellationToken canc } /// - /// Delete a addon in a private cloud + /// Delete a Addon /// /// /// Request Path @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken canc /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell } /// - /// Delete a addon in a private cloud + /// Delete a Addon /// /// /// Request Path @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel } /// - /// Create or update a addon in a private cloud + /// Create a Addon /// /// /// Request Path @@ -265,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -274,7 +274,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// A addon in the private cloud. + /// Resource create parameters. /// The cancellation token to use. /// is null. public virtual async Task> UpdateAsync(WaitUntil waitUntil, AvsPrivateCloudAddonData data, CancellationToken cancellationToken = default) @@ -286,7 +286,7 @@ public virtual async Task> UpdateAsyn try { var response = await _avsPrivateCloudAddonAddonsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); - var operation = new AvsArmOperation(new AvsPrivateCloudAddonOperationSource(Client), _avsPrivateCloudAddonAddonsClientDiagnostics, Pipeline, _avsPrivateCloudAddonAddonsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + var operation = new AvsArmOperation(new AvsPrivateCloudAddonOperationSource(Client), _avsPrivateCloudAddonAddonsClientDiagnostics, Pipeline, _avsPrivateCloudAddonAddonsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -299,7 +299,7 @@ public virtual async Task> UpdateAsyn } /// - /// Create or update a addon in a private cloud + /// Create a Addon /// /// /// Request Path @@ -311,7 +311,7 @@ public virtual async Task> UpdateAsyn /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -320,7 +320,7 @@ public virtual async Task> UpdateAsyn /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// A addon in the private cloud. + /// Resource create parameters. /// The cancellation token to use. /// is null. public virtual ArmOperation Update(WaitUntil waitUntil, AvsPrivateCloudAddonData data, CancellationToken cancellationToken = default) @@ -332,7 +332,7 @@ public virtual ArmOperation Update(WaitUntil waitU try { var response = _avsPrivateCloudAddonAddonsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); - var operation = new AvsArmOperation(new AvsPrivateCloudAddonOperationSource(Client), _avsPrivateCloudAddonAddonsClientDiagnostics, Pipeline, _avsPrivateCloudAddonAddonsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + var operation = new AvsArmOperation(new AvsPrivateCloudAddonOperationSource(Client), _avsPrivateCloudAddonAddonsClientDiagnostics, Pipeline, _avsPrivateCloudAddonAddonsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsPrivateCloudClusterCollection.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsPrivateCloudClusterCollection.cs index 38c002a6d0da..d18d4e7f6bf4 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsPrivateCloudClusterCollection.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsPrivateCloudClusterCollection.cs @@ -52,7 +52,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) } /// - /// Create or update a cluster in a private cloud + /// Create a Cluster /// /// /// Request Path @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -73,8 +73,8 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Name of the cluster in the private cloud. - /// A cluster in the private cloud. + /// Name of the cluster. + /// Resource create parameters. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// or is null. @@ -88,7 +88,7 @@ public virtual async Task> CreateOr try { var response = await _avsPrivateCloudClusterClustersRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, clusterName, data, cancellationToken).ConfigureAwait(false); - var operation = new AvsArmOperation(new AvsPrivateCloudClusterOperationSource(Client), _avsPrivateCloudClusterClustersClientDiagnostics, Pipeline, _avsPrivateCloudClusterClustersRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, clusterName, data).Request, response, OperationFinalStateVia.Location); + var operation = new AvsArmOperation(new AvsPrivateCloudClusterOperationSource(Client), _avsPrivateCloudClusterClustersClientDiagnostics, Pipeline, _avsPrivateCloudClusterClustersRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, clusterName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -101,7 +101,7 @@ public virtual async Task> CreateOr } /// - /// Create or update a cluster in a private cloud + /// Create a Cluster /// /// /// Request Path @@ -113,7 +113,7 @@ public virtual async Task> CreateOr /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -122,8 +122,8 @@ public virtual async Task> CreateOr /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Name of the cluster in the private cloud. - /// A cluster in the private cloud. + /// Name of the cluster. + /// Resource create parameters. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// or is null. @@ -137,7 +137,7 @@ public virtual ArmOperation CreateOrUpdate(WaitU try { var response = _avsPrivateCloudClusterClustersRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, clusterName, data, cancellationToken); - var operation = new AvsArmOperation(new AvsPrivateCloudClusterOperationSource(Client), _avsPrivateCloudClusterClustersClientDiagnostics, Pipeline, _avsPrivateCloudClusterClustersRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, clusterName, data).Request, response, OperationFinalStateVia.Location); + var operation = new AvsArmOperation(new AvsPrivateCloudClusterOperationSource(Client), _avsPrivateCloudClusterClustersClientDiagnostics, Pipeline, _avsPrivateCloudClusterClustersRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, clusterName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -150,7 +150,7 @@ public virtual ArmOperation CreateOrUpdate(WaitU } /// - /// Get a cluster by name in a private cloud + /// Get a Cluster /// /// /// Request Path @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitU /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -170,7 +170,7 @@ public virtual ArmOperation CreateOrUpdate(WaitU /// /// /// - /// Name of the cluster in the private cloud. + /// Name of the cluster. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -195,7 +195,7 @@ public virtual async Task> GetAsync(str } /// - /// Get a cluster by name in a private cloud + /// Get a Cluster /// /// /// Request Path @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(str /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -215,7 +215,7 @@ public virtual async Task> GetAsync(str /// /// /// - /// Name of the cluster in the private cloud. + /// Name of the cluster. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -240,7 +240,7 @@ public virtual Response Get(string clusterName, } /// - /// List clusters in a private cloud + /// List Cluster resources by PrivateCloud /// /// /// Request Path @@ -252,7 +252,7 @@ public virtual Response Get(string clusterName, /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -270,7 +270,7 @@ public virtual AsyncPageable GetAllAsync(Cancell } /// - /// List clusters in a private cloud + /// List Cluster resources by PrivateCloud /// /// /// Request Path @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(Cancell /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -320,7 +320,7 @@ public virtual Pageable GetAll(CancellationToken /// /// /// - /// Name of the cluster in the private cloud. + /// Name of the cluster. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string clusterName, Cancel /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -363,7 +363,7 @@ public virtual async Task> ExistsAsync(string clusterName, Cancel /// /// /// - /// Name of the cluster in the private cloud. + /// Name of the cluster. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -398,7 +398,7 @@ public virtual Response Exists(string clusterName, CancellationToken cance /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -406,7 +406,7 @@ public virtual Response Exists(string clusterName, CancellationToken cance /// /// /// - /// Name of the cluster in the private cloud. + /// Name of the cluster. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -443,7 +443,7 @@ public virtual async Task> GetI /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -451,7 +451,7 @@ public virtual async Task> GetI /// /// /// - /// Name of the cluster in the private cloud. + /// Name of the cluster. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsPrivateCloudClusterData.Serialization.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsPrivateCloudClusterData.Serialization.cs index 7e4c90521ff9..d6a71e9c543f 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsPrivateCloudClusterData.Serialization.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsPrivateCloudClusterData.Serialization.cs @@ -66,6 +66,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } writer.WriteEndArray(); } + if (Optional.IsDefined(VsanDatastoreName)) + { + writer.WritePropertyName("vsanDatastoreName"u8); + writer.WriteStringValue(VsanDatastoreName); + } writer.WriteEndObject(); } @@ -98,6 +103,7 @@ internal static AvsPrivateCloudClusterData DeserializeAvsPrivateCloudClusterData AvsPrivateCloudClusterProvisioningState? provisioningState = default; int? clusterId = default; IList hosts = default; + string vsanDatastoreName = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -181,6 +187,11 @@ internal static AvsPrivateCloudClusterData DeserializeAvsPrivateCloudClusterData hosts = array; continue; } + if (property0.NameEquals("vsanDatastoreName"u8)) + { + vsanDatastoreName = property0.Value.GetString(); + continue; + } } continue; } @@ -200,6 +211,7 @@ internal static AvsPrivateCloudClusterData DeserializeAvsPrivateCloudClusterData provisioningState, clusterId, hosts ?? new ChangeTrackingList(), + vsanDatastoreName, serializedAdditionalRawData); } diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsPrivateCloudClusterData.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsPrivateCloudClusterData.cs index 6fa36f702d7a..11659771d1c0 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsPrivateCloudClusterData.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsPrivateCloudClusterData.cs @@ -52,7 +52,7 @@ public partial class AvsPrivateCloudClusterData : ResourceData private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// The cluster SKU. + /// The SKU (Stock Keeping Unit) assigned to this resource. /// is null. public AvsPrivateCloudClusterData(AvsSku sku) { @@ -67,19 +67,21 @@ public AvsPrivateCloudClusterData(AvsSku sku) /// The name. /// The resourceType. /// The systemData. - /// The cluster SKU. + /// The SKU (Stock Keeping Unit) assigned to this resource. /// The cluster size. /// The state of the cluster provisioning. /// The identity. /// The hosts. + /// Name of the vsan datastore associated with the cluster. /// Keeps track of any properties unknown to the library. - internal AvsPrivateCloudClusterData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, AvsSku sku, int? clusterSize, AvsPrivateCloudClusterProvisioningState? provisioningState, int? clusterId, IList hosts, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal AvsPrivateCloudClusterData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, AvsSku sku, int? clusterSize, AvsPrivateCloudClusterProvisioningState? provisioningState, int? clusterId, IList hosts, string vsanDatastoreName, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { Sku = sku; ClusterSize = clusterSize; ProvisioningState = provisioningState; ClusterId = clusterId; Hosts = hosts; + VsanDatastoreName = vsanDatastoreName; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -88,15 +90,8 @@ internal AvsPrivateCloudClusterData() { } - /// The cluster SKU. - internal AvsSku Sku { get; set; } - /// The name of the SKU. - public string SkuName - { - get => Sku is null ? default : Sku.Name; - set => Sku = new AvsSku(value); - } - + /// The SKU (Stock Keeping Unit) assigned to this resource. + public AvsSku Sku { get; set; } /// The cluster size. public int? ClusterSize { get; set; } /// The state of the cluster provisioning. @@ -105,5 +100,7 @@ public string SkuName public int? ClusterId { get; } /// The hosts. public IList Hosts { get; } + /// Name of the vsan datastore associated with the cluster. + public string VsanDatastoreName { get; set; } } } diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsPrivateCloudClusterResource.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsPrivateCloudClusterResource.cs index a3c8269dbbd9..5ce32f2aa835 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsPrivateCloudClusterResource.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsPrivateCloudClusterResource.cs @@ -98,7 +98,7 @@ public virtual AvsPrivateCloudDatastoreCollection GetAvsPrivateCloudDatastores() } /// - /// Get a datastore in a private cloud cluster + /// Get a Datastore /// /// /// Request Path @@ -110,7 +110,7 @@ public virtual AvsPrivateCloudDatastoreCollection GetAvsPrivateCloudDatastores() /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -118,7 +118,7 @@ public virtual AvsPrivateCloudDatastoreCollection GetAvsPrivateCloudDatastores() /// /// /// - /// Name of the datastore in the private cloud cluster. + /// Name of the datastore. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. @@ -129,7 +129,7 @@ public virtual async Task> GetAvsPriv } /// - /// Get a datastore in a private cloud cluster + /// Get a Datastore /// /// /// Request Path @@ -141,7 +141,7 @@ public virtual async Task> GetAvsPriv /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -149,7 +149,7 @@ public virtual async Task> GetAvsPriv /// /// /// - /// Name of the datastore in the private cloud cluster. + /// Name of the datastore. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. @@ -159,146 +159,146 @@ public virtual Response GetAvsPrivateCloudData return GetAvsPrivateCloudDatastores().Get(datastoreName, cancellationToken); } - /// Gets a collection of AvsPrivateCloudClusterVirtualMachineResources in the AvsPrivateCloudCluster. - /// An object representing collection of AvsPrivateCloudClusterVirtualMachineResources and their operations over a AvsPrivateCloudClusterVirtualMachineResource. - public virtual AvsPrivateCloudClusterVirtualMachineCollection GetAvsPrivateCloudClusterVirtualMachines() + /// Gets a collection of PlacementPolicyResources in the AvsPrivateCloudCluster. + /// An object representing collection of PlacementPolicyResources and their operations over a PlacementPolicyResource. + public virtual PlacementPolicyCollection GetPlacementPolicies() { - return GetCachedClient(client => new AvsPrivateCloudClusterVirtualMachineCollection(client, Id)); + return GetCachedClient(client => new PlacementPolicyCollection(client, Id)); } /// - /// Get a virtual machine by id in a private cloud cluster + /// Get a PlacementPolicy /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/virtualMachines/{virtualMachineId} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName} /// /// /// Operation Id - /// VirtualMachines_Get + /// PlacementPolicies_Get /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource - /// + /// /// /// /// - /// Virtual Machine identifier. + /// Name of the placement policy. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. + /// is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual async Task> GetAvsPrivateCloudClusterVirtualMachineAsync(string virtualMachineId, CancellationToken cancellationToken = default) + public virtual async Task> GetPlacementPolicyAsync(string placementPolicyName, CancellationToken cancellationToken = default) { - return await GetAvsPrivateCloudClusterVirtualMachines().GetAsync(virtualMachineId, cancellationToken).ConfigureAwait(false); + return await GetPlacementPolicies().GetAsync(placementPolicyName, cancellationToken).ConfigureAwait(false); } /// - /// Get a virtual machine by id in a private cloud cluster + /// Get a PlacementPolicy /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/virtualMachines/{virtualMachineId} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName} /// /// /// Operation Id - /// VirtualMachines_Get + /// PlacementPolicies_Get /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource - /// + /// /// /// /// - /// Virtual Machine identifier. + /// Name of the placement policy. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. + /// is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual Response GetAvsPrivateCloudClusterVirtualMachine(string virtualMachineId, CancellationToken cancellationToken = default) + public virtual Response GetPlacementPolicy(string placementPolicyName, CancellationToken cancellationToken = default) { - return GetAvsPrivateCloudClusterVirtualMachines().Get(virtualMachineId, cancellationToken); + return GetPlacementPolicies().Get(placementPolicyName, cancellationToken); } - /// Gets a collection of PlacementPolicyResources in the AvsPrivateCloudCluster. - /// An object representing collection of PlacementPolicyResources and their operations over a PlacementPolicyResource. - public virtual PlacementPolicyCollection GetPlacementPolicies() + /// Gets a collection of AvsPrivateCloudClusterVirtualMachineResources in the AvsPrivateCloudCluster. + /// An object representing collection of AvsPrivateCloudClusterVirtualMachineResources and their operations over a AvsPrivateCloudClusterVirtualMachineResource. + public virtual AvsPrivateCloudClusterVirtualMachineCollection GetAvsPrivateCloudClusterVirtualMachines() { - return GetCachedClient(client => new PlacementPolicyCollection(client, Id)); + return GetCachedClient(client => new AvsPrivateCloudClusterVirtualMachineCollection(client, Id)); } /// - /// Get a placement policy by name in a private cloud cluster + /// Get a VirtualMachine /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/virtualMachines/{virtualMachineId} /// /// /// Operation Id - /// PlacementPolicies_Get + /// VirtualMachines_Get /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource - /// + /// /// /// /// - /// Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. + /// ID of the virtual machine. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. + /// is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual async Task> GetPlacementPolicyAsync(string placementPolicyName, CancellationToken cancellationToken = default) + public virtual async Task> GetAvsPrivateCloudClusterVirtualMachineAsync(string virtualMachineId, CancellationToken cancellationToken = default) { - return await GetPlacementPolicies().GetAsync(placementPolicyName, cancellationToken).ConfigureAwait(false); + return await GetAvsPrivateCloudClusterVirtualMachines().GetAsync(virtualMachineId, cancellationToken).ConfigureAwait(false); } /// - /// Get a placement policy by name in a private cloud cluster + /// Get a VirtualMachine /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/virtualMachines/{virtualMachineId} /// /// /// Operation Id - /// PlacementPolicies_Get + /// VirtualMachines_Get /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource - /// + /// /// /// /// - /// Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. + /// ID of the virtual machine. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. + /// is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual Response GetPlacementPolicy(string placementPolicyName, CancellationToken cancellationToken = default) + public virtual Response GetAvsPrivateCloudClusterVirtualMachine(string virtualMachineId, CancellationToken cancellationToken = default) { - return GetPlacementPolicies().Get(placementPolicyName, cancellationToken); + return GetAvsPrivateCloudClusterVirtualMachines().Get(virtualMachineId, cancellationToken); } /// - /// Get a cluster by name in a private cloud + /// Get a Cluster /// /// /// Request Path @@ -310,7 +310,7 @@ public virtual Response GetPlacementPolicy(string place /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -338,7 +338,7 @@ public virtual async Task> GetAsync(Can } /// - /// Get a cluster by name in a private cloud + /// Get a Cluster /// /// /// Request Path @@ -350,7 +350,7 @@ public virtual async Task> GetAsync(Can /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -378,7 +378,7 @@ public virtual Response Get(CancellationToken ca } /// - /// Delete a cluster in a private cloud + /// Delete a Cluster /// /// /// Request Path @@ -390,7 +390,7 @@ public virtual Response Get(CancellationToken ca /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -420,7 +420,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell } /// - /// Delete a cluster in a private cloud + /// Delete a Cluster /// /// /// Request Path @@ -432,7 +432,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -462,7 +462,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel } /// - /// Update a cluster in a private cloud + /// Update a Cluster /// /// /// Request Path @@ -474,7 +474,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -508,7 +508,7 @@ public virtual async Task> UpdateAs } /// - /// Update a cluster in a private cloud + /// Update a Cluster /// /// /// Request Path @@ -520,7 +520,7 @@ public virtual async Task> UpdateAs /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -566,7 +566,7 @@ public virtual ArmOperation Update(WaitUntil wai /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -595,7 +595,7 @@ public virtual AsyncPageable GetZonesAsync(CancellationToken can /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsPrivateCloudClusterVirtualMachineCollection.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsPrivateCloudClusterVirtualMachineCollection.cs index 3772e65ec77f..4e8ab0fbb6ab 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsPrivateCloudClusterVirtualMachineCollection.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsPrivateCloudClusterVirtualMachineCollection.cs @@ -52,7 +52,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) } /// - /// Get a virtual machine by id in a private cloud cluster + /// Get a VirtualMachine /// /// /// Request Path @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -72,7 +72,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// - /// Virtual Machine identifier. + /// ID of the virtual machine. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -97,7 +97,7 @@ public virtual async Task } /// - /// Get a virtual machine by id in a private cloud cluster + /// Get a VirtualMachine /// /// /// Request Path @@ -109,7 +109,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -117,7 +117,7 @@ public virtual async Task /// /// /// - /// Virtual Machine identifier. + /// ID of the virtual machine. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -142,7 +142,7 @@ public virtual Response Get(string } /// - /// List of virtual machines in a private cloud cluster + /// List VirtualMachine resources by Cluster /// /// /// Request Path @@ -154,7 +154,7 @@ public virtual Response Get(string /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -172,7 +172,7 @@ public virtual AsyncPageable GetAl } /// - /// List of virtual machines in a private cloud cluster + /// List VirtualMachine resources by Cluster /// /// /// Request Path @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAl /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(Can /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -222,7 +222,7 @@ public virtual Pageable GetAll(Can /// /// /// - /// Virtual Machine identifier. + /// ID of the virtual machine. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string virtualMachineId, C /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -265,7 +265,7 @@ public virtual async Task> ExistsAsync(string virtualMachineId, C /// /// /// - /// Virtual Machine identifier. + /// ID of the virtual machine. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -300,7 +300,7 @@ public virtual Response Exists(string virtualMachineId, CancellationToken /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -308,7 +308,7 @@ public virtual Response Exists(string virtualMachineId, CancellationToken /// /// /// - /// Virtual Machine identifier. + /// ID of the virtual machine. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -345,7 +345,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -353,7 +353,7 @@ public virtual async Task /// /// - /// Virtual Machine identifier. + /// ID of the virtual machine. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsPrivateCloudClusterVirtualMachineData.Serialization.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsPrivateCloudClusterVirtualMachineData.Serialization.cs index c8245287d44c..b489414196be 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsPrivateCloudClusterVirtualMachineData.Serialization.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsPrivateCloudClusterVirtualMachineData.Serialization.cs @@ -39,6 +39,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } if (options.Format != "W" && Optional.IsDefined(DisplayName)) { writer.WritePropertyName("displayName"u8); @@ -86,6 +91,7 @@ internal static AvsPrivateCloudClusterVirtualMachineData DeserializeAvsPrivateCl string name = default; ResourceType type = default; SystemData systemData = default; + AvsVirtualMachineProvisioningState? provisioningState = default; string displayName = default; string moRefId = default; string folderPath = default; @@ -127,6 +133,15 @@ internal static AvsPrivateCloudClusterVirtualMachineData DeserializeAvsPrivateCl } foreach (var property0 in property.Value.EnumerateObject()) { + if (property0.NameEquals("provisioningState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new AvsVirtualMachineProvisioningState(property0.Value.GetString()); + continue; + } if (property0.NameEquals("displayName"u8)) { displayName = property0.Value.GetString(); @@ -165,6 +180,7 @@ internal static AvsPrivateCloudClusterVirtualMachineData DeserializeAvsPrivateCl name, type, systemData, + provisioningState, displayName, moRefId, folderPath, diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsPrivateCloudClusterVirtualMachineData.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsPrivateCloudClusterVirtualMachineData.cs index 567296d60777..efefe62f2927 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsPrivateCloudClusterVirtualMachineData.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsPrivateCloudClusterVirtualMachineData.cs @@ -61,13 +61,15 @@ public AvsPrivateCloudClusterVirtualMachineData() /// The name. /// The resourceType. /// The systemData. + /// The provisioning state of the resource. /// Display name of the VM. /// Virtual machine managed object reference id. /// Path to virtual machine's folder starting from datacenter virtual machine folder. /// Whether VM DRS-driven movement is restricted (enabled) or not (disabled). /// Keeps track of any properties unknown to the library. - internal AvsPrivateCloudClusterVirtualMachineData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string displayName, string moRefId, string folderPath, VirtualMachineRestrictMovementState? restrictMovement, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal AvsPrivateCloudClusterVirtualMachineData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, AvsVirtualMachineProvisioningState? provisioningState, string displayName, string moRefId, string folderPath, VirtualMachineRestrictMovementState? restrictMovement, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { + ProvisioningState = provisioningState; DisplayName = displayName; MoRefId = moRefId; FolderPath = folderPath; @@ -75,6 +77,8 @@ internal AvsPrivateCloudClusterVirtualMachineData(ResourceIdentifier id, string _serializedAdditionalRawData = serializedAdditionalRawData; } + /// The provisioning state of the resource. + public AvsVirtualMachineProvisioningState? ProvisioningState { get; } /// Display name of the VM. public string DisplayName { get; } /// Virtual machine managed object reference id. diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsPrivateCloudClusterVirtualMachineResource.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsPrivateCloudClusterVirtualMachineResource.cs index 111ec87b6b13..577485c2b272 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsPrivateCloudClusterVirtualMachineResource.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsPrivateCloudClusterVirtualMachineResource.cs @@ -91,7 +91,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) } /// - /// Get a virtual machine by id in a private cloud cluster + /// Get a VirtualMachine /// /// /// Request Path @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -131,7 +131,7 @@ public virtual async Task } /// - /// Get a virtual machine by id in a private cloud cluster + /// Get a VirtualMachine /// /// /// Request Path @@ -143,7 +143,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(Cancel /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -192,7 +192,7 @@ public virtual Response Get(Cancel /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Whether VM DRS-driven movement is restricted (Enabled) or not (Disabled). + /// The body type of the operation request. /// The cancellation token to use. /// is null. public virtual async Task RestrictMovementAsync(WaitUntil waitUntil, AvsPrivateCloudClusterVirtualMachineRestrictMovement restrictMovement, CancellationToken cancellationToken = default) @@ -229,7 +229,7 @@ public virtual async Task RestrictMovementAsync(WaitUntil waitUnti /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -238,7 +238,7 @@ public virtual async Task RestrictMovementAsync(WaitUntil waitUnti /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Whether VM DRS-driven movement is restricted (Enabled) or not (Disabled). + /// The body type of the operation request. /// The cancellation token to use. /// is null. public virtual ArmOperation RestrictMovement(WaitUntil waitUntil, AvsPrivateCloudClusterVirtualMachineRestrictMovement restrictMovement, CancellationToken cancellationToken = default) diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsPrivateCloudCollection.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsPrivateCloudCollection.cs index 7f35c79ac508..15f59a39cc8c 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsPrivateCloudCollection.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsPrivateCloudCollection.cs @@ -53,7 +53,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) } /// - /// Create or update a private cloud + /// Create a PrivateCloud /// /// /// Request Path @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -75,7 +75,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// Name of the private cloud. - /// The private cloud. + /// Resource create parameters. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// or is null. @@ -89,7 +89,7 @@ public virtual async Task> CreateOrUpdateA try { var response = await _avsPrivateCloudPrivateCloudsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, privateCloudName, data, cancellationToken).ConfigureAwait(false); - var operation = new AvsArmOperation(new AvsPrivateCloudOperationSource(Client), _avsPrivateCloudPrivateCloudsClientDiagnostics, Pipeline, _avsPrivateCloudPrivateCloudsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, privateCloudName, data).Request, response, OperationFinalStateVia.Location); + var operation = new AvsArmOperation(new AvsPrivateCloudOperationSource(Client), _avsPrivateCloudPrivateCloudsClientDiagnostics, Pipeline, _avsPrivateCloudPrivateCloudsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, privateCloudName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -102,7 +102,7 @@ public virtual async Task> CreateOrUpdateA } /// - /// Create or update a private cloud + /// Create a PrivateCloud /// /// /// Request Path @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdateA /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -124,7 +124,7 @@ public virtual async Task> CreateOrUpdateA /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// Name of the private cloud. - /// The private cloud. + /// Resource create parameters. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// or is null. @@ -138,7 +138,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wa try { var response = _avsPrivateCloudPrivateCloudsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, privateCloudName, data, cancellationToken); - var operation = new AvsArmOperation(new AvsPrivateCloudOperationSource(Client), _avsPrivateCloudPrivateCloudsClientDiagnostics, Pipeline, _avsPrivateCloudPrivateCloudsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, privateCloudName, data).Request, response, OperationFinalStateVia.Location); + var operation = new AvsArmOperation(new AvsPrivateCloudOperationSource(Client), _avsPrivateCloudPrivateCloudsClientDiagnostics, Pipeline, _avsPrivateCloudPrivateCloudsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, privateCloudName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -151,7 +151,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wa } /// - /// Get a private cloud + /// Get a PrivateCloud /// /// /// Request Path @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wa /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -196,7 +196,7 @@ public virtual async Task> GetAsync(string pri } /// - /// Get a private cloud + /// Get a PrivateCloud /// /// /// Request Path @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(string pri /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -241,7 +241,7 @@ public virtual Response Get(string privateCloudName, Ca } /// - /// List private clouds in a resource group + /// List PrivateCloud resources by resource group /// /// /// Request Path @@ -253,7 +253,7 @@ public virtual Response Get(string privateCloudName, Ca /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -271,7 +271,7 @@ public virtual AsyncPageable GetAllAsync(CancellationTo } /// - /// List private clouds in a resource group + /// List PrivateCloud resources by resource group /// /// /// Request Path @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(CancellationTo /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationToken cancel /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string privateCloudName, C /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string privateCloudName, CancellationToken /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task> GetIfExists /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsPrivateCloudData.Serialization.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsPrivateCloudData.Serialization.cs index 31d003c89a62..221fce422299 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsPrivateCloudData.Serialization.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsPrivateCloudData.Serialization.cs @@ -166,6 +166,16 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("nsxPublicIpQuotaRaised"u8); writer.WriteStringValue(NsxPublicIPQuotaRaised.Value.ToString()); } + if (Optional.IsDefined(VirtualNetworkId)) + { + writer.WritePropertyName("virtualNetworkId"u8); + writer.WriteStringValue(VirtualNetworkId); + } + if (Optional.IsDefined(DnsZoneType)) + { + writer.WritePropertyName("dnsZoneType"u8); + writer.WriteStringValue(DnsZoneType.Value.ToString()); + } writer.WriteEndObject(); } @@ -217,6 +227,8 @@ internal static AvsPrivateCloudData DeserializeAvsPrivateCloudData(JsonElement e IReadOnlyList externalCloudLinks = default; ExpressRouteCircuit secondaryCircuit = default; NsxPublicIPQuotaRaisedEnum? nsxPublicIPQuotaRaised = default; + ResourceIdentifier virtualNetworkId = default; + AvsDnsZoneType? dnsZoneType = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -457,6 +469,24 @@ internal static AvsPrivateCloudData DeserializeAvsPrivateCloudData(JsonElement e nsxPublicIPQuotaRaised = new NsxPublicIPQuotaRaisedEnum(property0.Value.GetString()); continue; } + if (property0.NameEquals("virtualNetworkId"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + virtualNetworkId = new ResourceIdentifier(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("dnsZoneType"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dnsZoneType = new AvsDnsZoneType(property0.Value.GetString()); + continue; + } } continue; } @@ -495,6 +525,8 @@ internal static AvsPrivateCloudData DeserializeAvsPrivateCloudData(JsonElement e externalCloudLinks ?? new ChangeTrackingList(), secondaryCircuit, nsxPublicIPQuotaRaised, + virtualNetworkId, + dnsZoneType, serializedAdditionalRawData); } diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsPrivateCloudData.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsPrivateCloudData.cs index 71e1351f7d2d..5c2167c33be7 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsPrivateCloudData.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsPrivateCloudData.cs @@ -53,7 +53,7 @@ public partial class AvsPrivateCloudData : TrackedResourceData /// Initializes a new instance of . /// The location. - /// The private cloud SKU. + /// The SKU (Stock Keeping Unit) assigned to this resource. /// is null. public AvsPrivateCloudData(AzureLocation location, AvsSku sku) : base(location) { @@ -72,18 +72,27 @@ public AvsPrivateCloudData(AzureLocation location, AvsSku sku) : base(location) /// The systemData. /// The tags. /// The location. - /// The private cloud SKU. - /// The identity of the private cloud, if configured. Current supported identity types: SystemAssigned, None. + /// The SKU (Stock Keeping Unit) assigned to this resource. + /// The managed service identities assigned to this resource. Current supported identity types: None, SystemAssigned. /// The default cluster used for management. /// Connectivity to internet is enabled or disabled. /// vCenter Single Sign On Identity Sources. /// Properties describing how the cloud is distributed across availability zones. /// Customer managed key encryption, can be enabled or disabled. - /// Array of additional networks noncontiguous with networkBlock. Networks must be unique and non-overlapping across VNet in your subscription, on-premise, and this privateCloud networkBlock attribute. Make sure the CIDR format conforms to (A.B.C.D/X). + /// + /// Array of additional networks noncontiguous with networkBlock. Networks must be + /// unique and non-overlapping across VNet in your subscription, on-premise, and + /// this privateCloud networkBlock attribute. Make sure the CIDR format conforms to + /// (A.B.C.D/X). + /// /// The provisioning state. /// An ExpressRoute Circuit. /// The endpoints. - /// The block of addresses should be unique across VNet in your subscription as well as on-premise. Make sure the CIDR format is conformed to (A.B.C.D/X) where A,B,C,D are between 0 and 255, and X is between 0 and 22. + /// + /// The block of addresses should be unique across VNet in your subscription as + /// well as on-premise. Make sure the CIDR format is conformed to (A.B.C.D/X) where + /// A,B,C,D are between 0 and 255, and X is between 0 and 22 + /// /// Network used to access vCenter Server and NSX-T Manager. /// Used for virtual machine cold migration, cloning, and snapshot migration. /// Used for live migration of virtual machines. @@ -92,10 +101,18 @@ public AvsPrivateCloudData(AzureLocation location, AvsSku sku) : base(location) /// Thumbprint of the vCenter Server SSL certificate. /// Thumbprint of the NSX-T Manager SSL certificate. /// Array of cloud link IDs from other clouds that connect to this one. - /// A secondary expressRoute circuit from a separate AZ. Only present in a stretched private cloud. - /// Flag to indicate whether the private cloud has the quota for provisioned NSX Public IP count raised from 64 to 1024. + /// + /// A secondary expressRoute circuit from a separate AZ. Only present in a + /// stretched private cloud + /// + /// + /// Flag to indicate whether the private cloud has the quota for provisioned NSX + /// Public IP count raised from 64 to 1024 + /// + /// Azure resource ID of the virtual network. + /// The type of DNS zone to use. /// Keeps track of any properties unknown to the library. - internal AvsPrivateCloudData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, AvsSku sku, ManagedServiceIdentity identity, AvsManagementCluster managementCluster, InternetConnectivityState? internet, IList identitySources, PrivateCloudAvailabilityProperties availability, CustomerManagedEncryption encryption, IList extendedNetworkBlocks, AvsPrivateCloudProvisioningState? provisioningState, ExpressRouteCircuit circuit, AvsPrivateCloudEndpoints endpoints, string networkBlock, string managementNetwork, string provisioningNetwork, string vMotionNetwork, string vCenterPassword, string nsxtPassword, string vCenterCertificateThumbprint, string nsxtCertificateThumbprint, IReadOnlyList externalCloudLinks, ExpressRouteCircuit secondaryCircuit, NsxPublicIPQuotaRaisedEnum? nsxPublicIPQuotaRaised, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + internal AvsPrivateCloudData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, AvsSku sku, ManagedServiceIdentity identity, AvsManagementCluster managementCluster, InternetConnectivityState? internet, IList identitySources, PrivateCloudAvailabilityProperties availability, CustomerManagedEncryption encryption, IList extendedNetworkBlocks, AvsPrivateCloudProvisioningState? provisioningState, ExpressRouteCircuit circuit, AvsPrivateCloudEndpoints endpoints, string networkBlock, string managementNetwork, string provisioningNetwork, string vMotionNetwork, string vCenterPassword, string nsxtPassword, string vCenterCertificateThumbprint, string nsxtCertificateThumbprint, IReadOnlyList externalCloudLinks, ExpressRouteCircuit secondaryCircuit, NsxPublicIPQuotaRaisedEnum? nsxPublicIPQuotaRaised, ResourceIdentifier virtualNetworkId, AvsDnsZoneType? dnsZoneType, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { Sku = sku; Identity = identity; @@ -119,6 +136,8 @@ internal AvsPrivateCloudData(ResourceIdentifier id, string name, ResourceType re ExternalCloudLinks = externalCloudLinks; SecondaryCircuit = secondaryCircuit; NsxPublicIPQuotaRaised = nsxPublicIPQuotaRaised; + VirtualNetworkId = virtualNetworkId; + DnsZoneType = dnsZoneType; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -127,16 +146,9 @@ internal AvsPrivateCloudData() { } - /// The private cloud SKU. - internal AvsSku Sku { get; set; } - /// The name of the SKU. - public string SkuName - { - get => Sku is null ? default : Sku.Name; - set => Sku = new AvsSku(value); - } - - /// The identity of the private cloud, if configured. Current supported identity types: SystemAssigned, None. + /// The SKU (Stock Keeping Unit) assigned to this resource. + public AvsSku Sku { get; set; } + /// The managed service identities assigned to this resource. Current supported identity types: None, SystemAssigned. public ManagedServiceIdentity Identity { get; set; } /// The default cluster used for management. public AvsManagementCluster ManagementCluster { get; set; } @@ -148,7 +160,12 @@ public string SkuName public PrivateCloudAvailabilityProperties Availability { get; set; } /// Customer managed key encryption, can be enabled or disabled. public CustomerManagedEncryption Encryption { get; set; } - /// Array of additional networks noncontiguous with networkBlock. Networks must be unique and non-overlapping across VNet in your subscription, on-premise, and this privateCloud networkBlock attribute. Make sure the CIDR format conforms to (A.B.C.D/X). + /// + /// Array of additional networks noncontiguous with networkBlock. Networks must be + /// unique and non-overlapping across VNet in your subscription, on-premise, and + /// this privateCloud networkBlock attribute. Make sure the CIDR format conforms to + /// (A.B.C.D/X). + /// public IList ExtendedNetworkBlocks { get; } /// The provisioning state. public AvsPrivateCloudProvisioningState? ProvisioningState { get; } @@ -156,7 +173,11 @@ public string SkuName public ExpressRouteCircuit Circuit { get; set; } /// The endpoints. public AvsPrivateCloudEndpoints Endpoints { get; } - /// The block of addresses should be unique across VNet in your subscription as well as on-premise. Make sure the CIDR format is conformed to (A.B.C.D/X) where A,B,C,D are between 0 and 255, and X is between 0 and 22. + /// + /// The block of addresses should be unique across VNet in your subscription as + /// well as on-premise. Make sure the CIDR format is conformed to (A.B.C.D/X) where + /// A,B,C,D are between 0 and 255, and X is between 0 and 22 + /// public string NetworkBlock { get; set; } /// Network used to access vCenter Server and NSX-T Manager. public string ManagementNetwork { get; } @@ -174,9 +195,19 @@ public string SkuName public string NsxtCertificateThumbprint { get; } /// Array of cloud link IDs from other clouds that connect to this one. public IReadOnlyList ExternalCloudLinks { get; } - /// A secondary expressRoute circuit from a separate AZ. Only present in a stretched private cloud. + /// + /// A secondary expressRoute circuit from a separate AZ. Only present in a + /// stretched private cloud + /// public ExpressRouteCircuit SecondaryCircuit { get; set; } - /// Flag to indicate whether the private cloud has the quota for provisioned NSX Public IP count raised from 64 to 1024. + /// + /// Flag to indicate whether the private cloud has the quota for provisioned NSX + /// Public IP count raised from 64 to 1024 + /// public NsxPublicIPQuotaRaisedEnum? NsxPublicIPQuotaRaised { get; } + /// Azure resource ID of the virtual network. + public ResourceIdentifier VirtualNetworkId { get; set; } + /// The type of DNS zone to use. + public AvsDnsZoneType? DnsZoneType { get; set; } } } diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsPrivateCloudDatastoreCollection.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsPrivateCloudDatastoreCollection.cs index b20e0ef4274e..3f2fb7336422 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsPrivateCloudDatastoreCollection.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsPrivateCloudDatastoreCollection.cs @@ -52,7 +52,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) } /// - /// Create or update a datastore in a private cloud cluster + /// Create a Datastore /// /// /// Request Path @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -73,8 +73,8 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Name of the datastore in the private cloud cluster. - /// A datastore in a private cloud cluster. + /// Name of the datastore. + /// Resource create parameters. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// or is null. @@ -88,7 +88,7 @@ public virtual async Task> Create try { var response = await _avsPrivateCloudDatastoreDatastoresRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, datastoreName, data, cancellationToken).ConfigureAwait(false); - var operation = new AvsArmOperation(new AvsPrivateCloudDatastoreOperationSource(Client), _avsPrivateCloudDatastoreDatastoresClientDiagnostics, Pipeline, _avsPrivateCloudDatastoreDatastoresRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, datastoreName, data).Request, response, OperationFinalStateVia.Location); + var operation = new AvsArmOperation(new AvsPrivateCloudDatastoreOperationSource(Client), _avsPrivateCloudDatastoreDatastoresClientDiagnostics, Pipeline, _avsPrivateCloudDatastoreDatastoresRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, datastoreName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -101,7 +101,7 @@ public virtual async Task> Create } /// - /// Create or update a datastore in a private cloud cluster + /// Create a Datastore /// /// /// Request Path @@ -113,7 +113,7 @@ public virtual async Task> Create /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -122,8 +122,8 @@ public virtual async Task> Create /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Name of the datastore in the private cloud cluster. - /// A datastore in a private cloud cluster. + /// Name of the datastore. + /// Resource create parameters. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// or is null. @@ -137,7 +137,7 @@ public virtual ArmOperation CreateOrUpdate(Wai try { var response = _avsPrivateCloudDatastoreDatastoresRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, datastoreName, data, cancellationToken); - var operation = new AvsArmOperation(new AvsPrivateCloudDatastoreOperationSource(Client), _avsPrivateCloudDatastoreDatastoresClientDiagnostics, Pipeline, _avsPrivateCloudDatastoreDatastoresRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, datastoreName, data).Request, response, OperationFinalStateVia.Location); + var operation = new AvsArmOperation(new AvsPrivateCloudDatastoreOperationSource(Client), _avsPrivateCloudDatastoreDatastoresClientDiagnostics, Pipeline, _avsPrivateCloudDatastoreDatastoresRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, datastoreName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -150,7 +150,7 @@ public virtual ArmOperation CreateOrUpdate(Wai } /// - /// Get a datastore in a private cloud cluster + /// Get a Datastore /// /// /// Request Path @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(Wai /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -170,7 +170,7 @@ public virtual ArmOperation CreateOrUpdate(Wai /// /// /// - /// Name of the datastore in the private cloud cluster. + /// Name of the datastore. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -195,7 +195,7 @@ public virtual async Task> GetAsync(s } /// - /// Get a datastore in a private cloud cluster + /// Get a Datastore /// /// /// Request Path @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(s /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -215,7 +215,7 @@ public virtual async Task> GetAsync(s /// /// /// - /// Name of the datastore in the private cloud cluster. + /// Name of the datastore. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -240,7 +240,7 @@ public virtual Response Get(string datastoreNa } /// - /// List datastores in a private cloud cluster + /// List Datastore resources by Cluster /// /// /// Request Path @@ -252,7 +252,7 @@ public virtual Response Get(string datastoreNa /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -270,7 +270,7 @@ public virtual AsyncPageable GetAllAsync(Cance } /// - /// List datastores in a private cloud cluster + /// List Datastore resources by Cluster /// /// /// Request Path @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(Cance /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationTok /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -320,7 +320,7 @@ public virtual Pageable GetAll(CancellationTok /// /// /// - /// Name of the datastore in the private cloud cluster. + /// Name of the datastore. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string datastoreName, Canc /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -363,7 +363,7 @@ public virtual async Task> ExistsAsync(string datastoreName, Canc /// /// /// - /// Name of the datastore in the private cloud cluster. + /// Name of the datastore. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -398,7 +398,7 @@ public virtual Response Exists(string datastoreName, CancellationToken can /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -406,7 +406,7 @@ public virtual Response Exists(string datastoreName, CancellationToken can /// /// /// - /// Name of the datastore in the private cloud cluster. + /// Name of the datastore. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -443,7 +443,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -451,7 +451,7 @@ public virtual async Task> Ge /// /// /// - /// Name of the datastore in the private cloud cluster. + /// Name of the datastore. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsPrivateCloudDatastoreData.Serialization.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsPrivateCloudDatastoreData.Serialization.cs index 4788dfe2ab37..f65ccb683217 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsPrivateCloudDatastoreData.Serialization.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsPrivateCloudDatastoreData.Serialization.cs @@ -55,6 +55,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("diskPoolVolume"u8); writer.WriteObjectValue(DiskPoolVolume, options); } + if (Optional.IsDefined(ElasticSanVolume)) + { + writer.WritePropertyName("elasticSanVolume"u8); + writer.WriteObjectValue(ElasticSanVolume, options); + } if (options.Format != "W" && Optional.IsDefined(Status)) { writer.WritePropertyName("status"u8); @@ -90,6 +95,7 @@ internal static AvsPrivateCloudDatastoreData DeserializeAvsPrivateCloudDatastore AvsPrivateCloudDatastoreProvisioningState? provisioningState = default; WritableSubResource netAppVolume = default; DiskPoolVolume diskPoolVolume = default; + ElasticSanVolume elasticSanVolume = default; DatastoreStatus? status = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); @@ -155,6 +161,15 @@ internal static AvsPrivateCloudDatastoreData DeserializeAvsPrivateCloudDatastore diskPoolVolume = DiskPoolVolume.DeserializeDiskPoolVolume(property0.Value, options); continue; } + if (property0.NameEquals("elasticSanVolume"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + elasticSanVolume = ElasticSanVolume.DeserializeElasticSanVolume(property0.Value, options); + continue; + } if (property0.NameEquals("status"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -181,6 +196,7 @@ internal static AvsPrivateCloudDatastoreData DeserializeAvsPrivateCloudDatastore provisioningState, netAppVolume, diskPoolVolume, + elasticSanVolume, status, serializedAdditionalRawData); } diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsPrivateCloudDatastoreData.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsPrivateCloudDatastoreData.cs index 1275606325e0..9adf75d2e24d 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsPrivateCloudDatastoreData.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsPrivateCloudDatastoreData.cs @@ -65,13 +65,15 @@ public AvsPrivateCloudDatastoreData() /// The state of the datastore provisioning. /// An Azure NetApp Files volume. /// An iSCSI volume. + /// An Elastic SAN volume. /// The operational status of the datastore. /// Keeps track of any properties unknown to the library. - internal AvsPrivateCloudDatastoreData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, AvsPrivateCloudDatastoreProvisioningState? provisioningState, WritableSubResource netAppVolume, DiskPoolVolume diskPoolVolume, DatastoreStatus? status, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal AvsPrivateCloudDatastoreData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, AvsPrivateCloudDatastoreProvisioningState? provisioningState, WritableSubResource netAppVolume, DiskPoolVolume diskPoolVolume, ElasticSanVolume elasticSanVolume, DatastoreStatus? status, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { ProvisioningState = provisioningState; NetAppVolume = netAppVolume; DiskPoolVolume = diskPoolVolume; + ElasticSanVolume = elasticSanVolume; Status = status; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -94,6 +96,15 @@ public ResourceIdentifier NetAppVolumeId /// An iSCSI volume. public DiskPoolVolume DiskPoolVolume { get; set; } + /// An Elastic SAN volume. + internal ElasticSanVolume ElasticSanVolume { get; set; } + /// Azure resource ID of the Elastic SAN Volume. + public ResourceIdentifier ElasticSanVolumeTargetId + { + get => ElasticSanVolume is null ? default : ElasticSanVolume.TargetId; + set => ElasticSanVolume = new ElasticSanVolume(value); + } + /// The operational status of the datastore. public DatastoreStatus? Status { get; } } diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsPrivateCloudDatastoreResource.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsPrivateCloudDatastoreResource.cs index 0c3af8d8fc5d..f5fccd0ff906 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsPrivateCloudDatastoreResource.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsPrivateCloudDatastoreResource.cs @@ -90,7 +90,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) } /// - /// Get a datastore in a private cloud cluster + /// Get a Datastore /// /// /// Request Path @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -130,7 +130,7 @@ public virtual async Task> GetAsync(C } /// - /// Get a datastore in a private cloud cluster + /// Get a Datastore /// /// /// Request Path @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(C /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -170,7 +170,7 @@ public virtual Response Get(CancellationToken } /// - /// Delete a datastore in a private cloud cluster + /// Delete a Datastore /// /// /// Request Path @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -212,7 +212,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell } /// - /// Delete a datastore in a private cloud cluster + /// Delete a Datastore /// /// /// Request Path @@ -224,7 +224,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -254,7 +254,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel } /// - /// Create or update a datastore in a private cloud cluster + /// Create a Datastore /// /// /// Request Path @@ -266,7 +266,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -275,7 +275,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// A datastore in a private cloud cluster. + /// Resource create parameters. /// The cancellation token to use. /// is null. public virtual async Task> UpdateAsync(WaitUntil waitUntil, AvsPrivateCloudDatastoreData data, CancellationToken cancellationToken = default) @@ -287,7 +287,7 @@ public virtual async Task> Update try { var response = await _avsPrivateCloudDatastoreDatastoresRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); - var operation = new AvsArmOperation(new AvsPrivateCloudDatastoreOperationSource(Client), _avsPrivateCloudDatastoreDatastoresClientDiagnostics, Pipeline, _avsPrivateCloudDatastoreDatastoresRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + var operation = new AvsArmOperation(new AvsPrivateCloudDatastoreOperationSource(Client), _avsPrivateCloudDatastoreDatastoresClientDiagnostics, Pipeline, _avsPrivateCloudDatastoreDatastoresRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -300,7 +300,7 @@ public virtual async Task> Update } /// - /// Create or update a datastore in a private cloud cluster + /// Create a Datastore /// /// /// Request Path @@ -312,7 +312,7 @@ public virtual async Task> Update /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -321,7 +321,7 @@ public virtual async Task> Update /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// A datastore in a private cloud cluster. + /// Resource create parameters. /// The cancellation token to use. /// is null. public virtual ArmOperation Update(WaitUntil waitUntil, AvsPrivateCloudDatastoreData data, CancellationToken cancellationToken = default) @@ -333,7 +333,7 @@ public virtual ArmOperation Update(WaitUntil w try { var response = _avsPrivateCloudDatastoreDatastoresRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken); - var operation = new AvsArmOperation(new AvsPrivateCloudDatastoreOperationSource(Client), _avsPrivateCloudDatastoreDatastoresClientDiagnostics, Pipeline, _avsPrivateCloudDatastoreDatastoresRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + var operation = new AvsArmOperation(new AvsPrivateCloudDatastoreOperationSource(Client), _avsPrivateCloudDatastoreDatastoresClientDiagnostics, Pipeline, _avsPrivateCloudDatastoreDatastoresRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsPrivateCloudResource.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsPrivateCloudResource.cs index aa472612ab22..dc03d06a5dfa 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsPrivateCloudResource.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsPrivateCloudResource.cs @@ -90,142 +90,73 @@ internal static void ValidateResourceId(ResourceIdentifier id) throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); } - /// Gets a collection of AvsPrivateCloudClusterResources in the AvsPrivateCloud. - /// An object representing collection of AvsPrivateCloudClusterResources and their operations over a AvsPrivateCloudClusterResource. - public virtual AvsPrivateCloudClusterCollection GetAvsPrivateCloudClusters() - { - return GetCachedClient(client => new AvsPrivateCloudClusterCollection(client, Id)); - } - - /// - /// Get a cluster by name in a private cloud - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName} - /// - /// - /// Operation Id - /// Clusters_Get - /// - /// - /// Default Api Version - /// 2023-03-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// Name of the cluster in the private cloud. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public virtual async Task> GetAvsPrivateCloudClusterAsync(string clusterName, CancellationToken cancellationToken = default) - { - return await GetAvsPrivateCloudClusters().GetAsync(clusterName, cancellationToken).ConfigureAwait(false); - } - - /// - /// Get a cluster by name in a private cloud - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName} - /// - /// - /// Operation Id - /// Clusters_Get - /// - /// - /// Default Api Version - /// 2023-03-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// Name of the cluster in the private cloud. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public virtual Response GetAvsPrivateCloudCluster(string clusterName, CancellationToken cancellationToken = default) - { - return GetAvsPrivateCloudClusters().Get(clusterName, cancellationToken); - } - - /// Gets a collection of HcxEnterpriseSiteResources in the AvsPrivateCloud. - /// An object representing collection of HcxEnterpriseSiteResources and their operations over a HcxEnterpriseSiteResource. - public virtual HcxEnterpriseSiteCollection GetHcxEnterpriseSites() + /// Gets a collection of AvsPrivateCloudAddonResources in the AvsPrivateCloud. + /// An object representing collection of AvsPrivateCloudAddonResources and their operations over a AvsPrivateCloudAddonResource. + public virtual AvsPrivateCloudAddonCollection GetAvsPrivateCloudAddons() { - return GetCachedClient(client => new HcxEnterpriseSiteCollection(client, Id)); + return GetCachedClient(client => new AvsPrivateCloudAddonCollection(client, Id)); } /// - /// Get an HCX on-premises key by name in a private cloud + /// Get a Addon /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/hcxEnterpriseSites/{hcxEnterpriseSiteName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/addons/{addonName} /// /// /// Operation Id - /// HcxEnterpriseSites_Get + /// Addons_Get /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource - /// + /// /// /// /// - /// Name of the HCX Enterprise Site in the private cloud. + /// Name of the addon. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. + /// is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual async Task> GetHcxEnterpriseSiteAsync(string hcxEnterpriseSiteName, CancellationToken cancellationToken = default) + public virtual async Task> GetAvsPrivateCloudAddonAsync(string addonName, CancellationToken cancellationToken = default) { - return await GetHcxEnterpriseSites().GetAsync(hcxEnterpriseSiteName, cancellationToken).ConfigureAwait(false); + return await GetAvsPrivateCloudAddons().GetAsync(addonName, cancellationToken).ConfigureAwait(false); } /// - /// Get an HCX on-premises key by name in a private cloud + /// Get a Addon /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/hcxEnterpriseSites/{hcxEnterpriseSiteName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/addons/{addonName} /// /// /// Operation Id - /// HcxEnterpriseSites_Get + /// Addons_Get /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource - /// + /// /// /// /// - /// Name of the HCX Enterprise Site in the private cloud. + /// Name of the addon. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. + /// is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual Response GetHcxEnterpriseSite(string hcxEnterpriseSiteName, CancellationToken cancellationToken = default) + public virtual Response GetAvsPrivateCloudAddon(string addonName, CancellationToken cancellationToken = default) { - return GetHcxEnterpriseSites().Get(hcxEnterpriseSiteName, cancellationToken); + return GetAvsPrivateCloudAddons().Get(addonName, cancellationToken); } /// Gets a collection of ExpressRouteAuthorizationResources in the AvsPrivateCloud. @@ -236,7 +167,7 @@ public virtual ExpressRouteAuthorizationCollection GetExpressRouteAuthorizations } /// - /// Get an ExpressRoute Circuit Authorization by name in a private cloud + /// Get a ExpressRouteAuthorization /// /// /// Request Path @@ -248,7 +179,7 @@ public virtual ExpressRouteAuthorizationCollection GetExpressRouteAuthorizations /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -256,7 +187,7 @@ public virtual ExpressRouteAuthorizationCollection GetExpressRouteAuthorizations /// /// /// - /// Name of the ExpressRoute Circuit Authorization in the private cloud. + /// Name of the ExpressRoute Circuit Authorization. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. @@ -267,7 +198,7 @@ public virtual async Task> GetExpres } /// - /// Get an ExpressRoute Circuit Authorization by name in a private cloud + /// Get a ExpressRouteAuthorization /// /// /// Request Path @@ -279,7 +210,7 @@ public virtual async Task> GetExpres /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -287,7 +218,7 @@ public virtual async Task> GetExpres /// /// /// - /// Name of the ExpressRoute Circuit Authorization in the private cloud. + /// Name of the ExpressRoute Circuit Authorization. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. @@ -297,897 +228,356 @@ public virtual Response GetExpressRouteAuthor return GetExpressRouteAuthorizations().Get(authorizationName, cancellationToken); } - /// Gets a collection of GlobalReachConnectionResources in the AvsPrivateCloud. - /// An object representing collection of GlobalReachConnectionResources and their operations over a GlobalReachConnectionResource. - public virtual GlobalReachConnectionCollection GetGlobalReachConnections() - { - return GetCachedClient(client => new GlobalReachConnectionCollection(client, Id)); - } - - /// - /// Get a global reach connection by name in a private cloud - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/globalReachConnections/{globalReachConnectionName} - /// - /// - /// Operation Id - /// GlobalReachConnections_Get - /// - /// - /// Default Api Version - /// 2023-03-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// Name of the global reach connection in the private cloud. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public virtual async Task> GetGlobalReachConnectionAsync(string globalReachConnectionName, CancellationToken cancellationToken = default) - { - return await GetGlobalReachConnections().GetAsync(globalReachConnectionName, cancellationToken).ConfigureAwait(false); - } - - /// - /// Get a global reach connection by name in a private cloud - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/globalReachConnections/{globalReachConnectionName} - /// - /// - /// Operation Id - /// GlobalReachConnections_Get - /// - /// - /// Default Api Version - /// 2023-03-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// Name of the global reach connection in the private cloud. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public virtual Response GetGlobalReachConnection(string globalReachConnectionName, CancellationToken cancellationToken = default) - { - return GetGlobalReachConnections().Get(globalReachConnectionName, cancellationToken); - } - - /// Gets a collection of WorkloadNetworkResources in the AvsPrivateCloud. - /// An object representing collection of WorkloadNetworkResources and their operations over a WorkloadNetworkResource. - public virtual WorkloadNetworkCollection GetWorkloadNetworks() - { - return GetCachedClient(client => new WorkloadNetworkCollection(client, Id)); - } - - /// - /// Get a private cloud workload network. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName} - /// - /// - /// Operation Id - /// WorkloadNetworks_Get - /// - /// - /// Default Api Version - /// 2023-03-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// Name for the workload network in the private cloud. - /// The cancellation token to use. - [ForwardsClientCalls] - public virtual async Task> GetWorkloadNetworkAsync(WorkloadNetworkName workloadNetworkName, CancellationToken cancellationToken = default) - { - return await GetWorkloadNetworks().GetAsync(workloadNetworkName, cancellationToken).ConfigureAwait(false); - } - - /// - /// Get a private cloud workload network. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName} - /// - /// - /// Operation Id - /// WorkloadNetworks_Get - /// - /// - /// Default Api Version - /// 2023-03-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// Name for the workload network in the private cloud. - /// The cancellation token to use. - [ForwardsClientCalls] - public virtual Response GetWorkloadNetwork(WorkloadNetworkName workloadNetworkName, CancellationToken cancellationToken = default) - { - return GetWorkloadNetworks().Get(workloadNetworkName, cancellationToken); - } - - /// Gets a collection of WorkloadNetworkSegmentResources in the AvsPrivateCloud. - /// An object representing collection of WorkloadNetworkSegmentResources and their operations over a WorkloadNetworkSegmentResource. - public virtual WorkloadNetworkSegmentCollection GetWorkloadNetworkSegments() - { - return GetCachedClient(client => new WorkloadNetworkSegmentCollection(client, Id)); - } - - /// - /// Get a segment by id in a private cloud workload network. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments/{segmentId} - /// - /// - /// Operation Id - /// WorkloadNetworks_GetSegment - /// - /// - /// Default Api Version - /// 2023-03-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// NSX Segment identifier. Generally the same as the Segment's display name. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public virtual async Task> GetWorkloadNetworkSegmentAsync(string segmentId, CancellationToken cancellationToken = default) - { - return await GetWorkloadNetworkSegments().GetAsync(segmentId, cancellationToken).ConfigureAwait(false); - } - - /// - /// Get a segment by id in a private cloud workload network. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments/{segmentId} - /// - /// - /// Operation Id - /// WorkloadNetworks_GetSegment - /// - /// - /// Default Api Version - /// 2023-03-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// NSX Segment identifier. Generally the same as the Segment's display name. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public virtual Response GetWorkloadNetworkSegment(string segmentId, CancellationToken cancellationToken = default) - { - return GetWorkloadNetworkSegments().Get(segmentId, cancellationToken); - } - - /// Gets a collection of WorkloadNetworkDhcpResources in the AvsPrivateCloud. - /// An object representing collection of WorkloadNetworkDhcpResources and their operations over a WorkloadNetworkDhcpResource. - public virtual WorkloadNetworkDhcpCollection GetWorkloadNetworkDhcps() - { - return GetCachedClient(client => new WorkloadNetworkDhcpCollection(client, Id)); - } - - /// - /// Get dhcp by id in a private cloud workload network. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations/{dhcpId} - /// - /// - /// Operation Id - /// WorkloadNetworks_GetDhcp - /// - /// - /// Default Api Version - /// 2023-03-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// NSX DHCP identifier. Generally the same as the DHCP display name. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public virtual async Task> GetWorkloadNetworkDhcpAsync(string dhcpId, CancellationToken cancellationToken = default) - { - return await GetWorkloadNetworkDhcps().GetAsync(dhcpId, cancellationToken).ConfigureAwait(false); - } - - /// - /// Get dhcp by id in a private cloud workload network. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations/{dhcpId} - /// - /// - /// Operation Id - /// WorkloadNetworks_GetDhcp - /// - /// - /// Default Api Version - /// 2023-03-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// NSX DHCP identifier. Generally the same as the DHCP display name. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public virtual Response GetWorkloadNetworkDhcp(string dhcpId, CancellationToken cancellationToken = default) - { - return GetWorkloadNetworkDhcps().Get(dhcpId, cancellationToken); - } - - /// Gets a collection of WorkloadNetworkGatewayResources in the AvsPrivateCloud. - /// An object representing collection of WorkloadNetworkGatewayResources and their operations over a WorkloadNetworkGatewayResource. - public virtual WorkloadNetworkGatewayCollection GetWorkloadNetworkGateways() - { - return GetCachedClient(client => new WorkloadNetworkGatewayCollection(client, Id)); - } - - /// - /// Get a gateway by id in a private cloud workload network. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/gateways/{gatewayId} - /// - /// - /// Operation Id - /// WorkloadNetworks_GetGateway - /// - /// - /// Default Api Version - /// 2023-03-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// NSX Gateway identifier. Generally the same as the Gateway's display name. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public virtual async Task> GetWorkloadNetworkGatewayAsync(string gatewayId, CancellationToken cancellationToken = default) - { - return await GetWorkloadNetworkGateways().GetAsync(gatewayId, cancellationToken).ConfigureAwait(false); - } - - /// - /// Get a gateway by id in a private cloud workload network. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/gateways/{gatewayId} - /// - /// - /// Operation Id - /// WorkloadNetworks_GetGateway - /// - /// - /// Default Api Version - /// 2023-03-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// NSX Gateway identifier. Generally the same as the Gateway's display name. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public virtual Response GetWorkloadNetworkGateway(string gatewayId, CancellationToken cancellationToken = default) - { - return GetWorkloadNetworkGateways().Get(gatewayId, cancellationToken); - } - - /// Gets a collection of WorkloadNetworkPortMirroringProfileResources in the AvsPrivateCloud. - /// An object representing collection of WorkloadNetworkPortMirroringProfileResources and their operations over a WorkloadNetworkPortMirroringProfileResource. - public virtual WorkloadNetworkPortMirroringProfileCollection GetWorkloadNetworkPortMirroringProfiles() - { - return GetCachedClient(client => new WorkloadNetworkPortMirroringProfileCollection(client, Id)); - } - - /// - /// Get a port mirroring profile by id in a private cloud workload network. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles/{portMirroringId} - /// - /// - /// Operation Id - /// WorkloadNetworks_GetPortMirroring - /// - /// - /// Default Api Version - /// 2023-03-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public virtual async Task> GetWorkloadNetworkPortMirroringProfileAsync(string portMirroringId, CancellationToken cancellationToken = default) - { - return await GetWorkloadNetworkPortMirroringProfiles().GetAsync(portMirroringId, cancellationToken).ConfigureAwait(false); - } - - /// - /// Get a port mirroring profile by id in a private cloud workload network. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles/{portMirroringId} - /// - /// - /// Operation Id - /// WorkloadNetworks_GetPortMirroring - /// - /// - /// Default Api Version - /// 2023-03-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public virtual Response GetWorkloadNetworkPortMirroringProfile(string portMirroringId, CancellationToken cancellationToken = default) - { - return GetWorkloadNetworkPortMirroringProfiles().Get(portMirroringId, cancellationToken); - } - - /// Gets a collection of WorkloadNetworkVmGroupResources in the AvsPrivateCloud. - /// An object representing collection of WorkloadNetworkVmGroupResources and their operations over a WorkloadNetworkVmGroupResource. - public virtual WorkloadNetworkVmGroupCollection GetWorkloadNetworkVmGroups() - { - return GetCachedClient(client => new WorkloadNetworkVmGroupCollection(client, Id)); - } - - /// - /// Get a vm group by id in a private cloud workload network. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups/{vmGroupId} - /// - /// - /// Operation Id - /// WorkloadNetworks_GetVmGroup - /// - /// - /// Default Api Version - /// 2023-03-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// NSX VM Group identifier. Generally the same as the VM Group's display name. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public virtual async Task> GetWorkloadNetworkVmGroupAsync(string vmGroupId, CancellationToken cancellationToken = default) - { - return await GetWorkloadNetworkVmGroups().GetAsync(vmGroupId, cancellationToken).ConfigureAwait(false); - } - - /// - /// Get a vm group by id in a private cloud workload network. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups/{vmGroupId} - /// - /// - /// Operation Id - /// WorkloadNetworks_GetVmGroup - /// - /// - /// Default Api Version - /// 2023-03-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// NSX VM Group identifier. Generally the same as the VM Group's display name. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public virtual Response GetWorkloadNetworkVmGroup(string vmGroupId, CancellationToken cancellationToken = default) - { - return GetWorkloadNetworkVmGroups().Get(vmGroupId, cancellationToken); - } - - /// Gets a collection of WorkloadNetworkVirtualMachineResources in the AvsPrivateCloud. - /// An object representing collection of WorkloadNetworkVirtualMachineResources and their operations over a WorkloadNetworkVirtualMachineResource. - public virtual WorkloadNetworkVirtualMachineCollection GetWorkloadNetworkVirtualMachines() - { - return GetCachedClient(client => new WorkloadNetworkVirtualMachineCollection(client, Id)); - } - - /// - /// Get a virtual machine by id in a private cloud workload network. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/virtualMachines/{virtualMachineId} - /// - /// - /// Operation Id - /// WorkloadNetworks_GetVirtualMachine - /// - /// - /// Default Api Version - /// 2023-03-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// Virtual Machine identifier. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public virtual async Task> GetWorkloadNetworkVirtualMachineAsync(string virtualMachineId, CancellationToken cancellationToken = default) - { - return await GetWorkloadNetworkVirtualMachines().GetAsync(virtualMachineId, cancellationToken).ConfigureAwait(false); - } - - /// - /// Get a virtual machine by id in a private cloud workload network. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/virtualMachines/{virtualMachineId} - /// - /// - /// Operation Id - /// WorkloadNetworks_GetVirtualMachine - /// - /// - /// Default Api Version - /// 2023-03-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// Virtual Machine identifier. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public virtual Response GetWorkloadNetworkVirtualMachine(string virtualMachineId, CancellationToken cancellationToken = default) - { - return GetWorkloadNetworkVirtualMachines().Get(virtualMachineId, cancellationToken); - } - - /// Gets a collection of WorkloadNetworkDnsServiceResources in the AvsPrivateCloud. - /// An object representing collection of WorkloadNetworkDnsServiceResources and their operations over a WorkloadNetworkDnsServiceResource. - public virtual WorkloadNetworkDnsServiceCollection GetWorkloadNetworkDnsServices() + /// Gets a collection of AvsCloudLinkResources in the AvsPrivateCloud. + /// An object representing collection of AvsCloudLinkResources and their operations over a AvsCloudLinkResource. + public virtual AvsCloudLinkCollection GetAvsCloudLinks() { - return GetCachedClient(client => new WorkloadNetworkDnsServiceCollection(client, Id)); + return GetCachedClient(client => new AvsCloudLinkCollection(client, Id)); } /// - /// Get a DNS service by id in a private cloud workload network. + /// Get a CloudLink /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices/{dnsServiceId} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/cloudLinks/{cloudLinkName} /// /// /// Operation Id - /// WorkloadNetworks_GetDnsService + /// CloudLinks_Get /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource - /// + /// /// /// /// - /// NSX DNS Service identifier. Generally the same as the DNS Service's display name. + /// Name of the cloud link. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. + /// is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual async Task> GetWorkloadNetworkDnsServiceAsync(string dnsServiceId, CancellationToken cancellationToken = default) + public virtual async Task> GetAvsCloudLinkAsync(string cloudLinkName, CancellationToken cancellationToken = default) { - return await GetWorkloadNetworkDnsServices().GetAsync(dnsServiceId, cancellationToken).ConfigureAwait(false); + return await GetAvsCloudLinks().GetAsync(cloudLinkName, cancellationToken).ConfigureAwait(false); } /// - /// Get a DNS service by id in a private cloud workload network. + /// Get a CloudLink /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices/{dnsServiceId} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/cloudLinks/{cloudLinkName} /// /// /// Operation Id - /// WorkloadNetworks_GetDnsService + /// CloudLinks_Get /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource - /// + /// /// /// /// - /// NSX DNS Service identifier. Generally the same as the DNS Service's display name. + /// Name of the cloud link. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. + /// is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual Response GetWorkloadNetworkDnsService(string dnsServiceId, CancellationToken cancellationToken = default) + public virtual Response GetAvsCloudLink(string cloudLinkName, CancellationToken cancellationToken = default) { - return GetWorkloadNetworkDnsServices().Get(dnsServiceId, cancellationToken); + return GetAvsCloudLinks().Get(cloudLinkName, cancellationToken); } - /// Gets a collection of WorkloadNetworkDnsZoneResources in the AvsPrivateCloud. - /// An object representing collection of WorkloadNetworkDnsZoneResources and their operations over a WorkloadNetworkDnsZoneResource. - public virtual WorkloadNetworkDnsZoneCollection GetWorkloadNetworkDnsZones() + /// Gets a collection of AvsPrivateCloudClusterResources in the AvsPrivateCloud. + /// An object representing collection of AvsPrivateCloudClusterResources and their operations over a AvsPrivateCloudClusterResource. + public virtual AvsPrivateCloudClusterCollection GetAvsPrivateCloudClusters() { - return GetCachedClient(client => new WorkloadNetworkDnsZoneCollection(client, Id)); + return GetCachedClient(client => new AvsPrivateCloudClusterCollection(client, Id)); } /// - /// Get a DNS zone by id in a private cloud workload network. + /// Get a Cluster /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones/{dnsZoneId} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName} /// /// /// Operation Id - /// WorkloadNetworks_GetDnsZone + /// Clusters_Get /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource - /// + /// /// /// /// - /// NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. + /// Name of the cluster. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. + /// is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual async Task> GetWorkloadNetworkDnsZoneAsync(string dnsZoneId, CancellationToken cancellationToken = default) + public virtual async Task> GetAvsPrivateCloudClusterAsync(string clusterName, CancellationToken cancellationToken = default) { - return await GetWorkloadNetworkDnsZones().GetAsync(dnsZoneId, cancellationToken).ConfigureAwait(false); + return await GetAvsPrivateCloudClusters().GetAsync(clusterName, cancellationToken).ConfigureAwait(false); } /// - /// Get a DNS zone by id in a private cloud workload network. + /// Get a Cluster /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones/{dnsZoneId} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName} /// /// /// Operation Id - /// WorkloadNetworks_GetDnsZone + /// Clusters_Get /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource - /// + /// /// /// /// - /// NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. + /// Name of the cluster. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. + /// is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual Response GetWorkloadNetworkDnsZone(string dnsZoneId, CancellationToken cancellationToken = default) + public virtual Response GetAvsPrivateCloudCluster(string clusterName, CancellationToken cancellationToken = default) { - return GetWorkloadNetworkDnsZones().Get(dnsZoneId, cancellationToken); + return GetAvsPrivateCloudClusters().Get(clusterName, cancellationToken); } - /// Gets a collection of WorkloadNetworkPublicIPResources in the AvsPrivateCloud. - /// An object representing collection of WorkloadNetworkPublicIPResources and their operations over a WorkloadNetworkPublicIPResource. - public virtual WorkloadNetworkPublicIPCollection GetWorkloadNetworkPublicIPs() + /// Gets a collection of GlobalReachConnectionResources in the AvsPrivateCloud. + /// An object representing collection of GlobalReachConnectionResources and their operations over a GlobalReachConnectionResource. + public virtual GlobalReachConnectionCollection GetGlobalReachConnections() { - return GetCachedClient(client => new WorkloadNetworkPublicIPCollection(client, Id)); + return GetCachedClient(client => new GlobalReachConnectionCollection(client, Id)); } /// - /// Get a Public IP Block by id in a private cloud workload network. + /// Get a GlobalReachConnection /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/publicIPs/{publicIPId} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/globalReachConnections/{globalReachConnectionName} /// /// /// Operation Id - /// WorkloadNetworks_GetPublicIP + /// GlobalReachConnections_Get /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource - /// + /// /// /// /// - /// NSX Public IP Block identifier. Generally the same as the Public IP Block's display name. + /// Name of the global reach connection. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. + /// is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual async Task> GetWorkloadNetworkPublicIPAsync(string publicIPId, CancellationToken cancellationToken = default) + public virtual async Task> GetGlobalReachConnectionAsync(string globalReachConnectionName, CancellationToken cancellationToken = default) { - return await GetWorkloadNetworkPublicIPs().GetAsync(publicIPId, cancellationToken).ConfigureAwait(false); + return await GetGlobalReachConnections().GetAsync(globalReachConnectionName, cancellationToken).ConfigureAwait(false); } /// - /// Get a Public IP Block by id in a private cloud workload network. + /// Get a GlobalReachConnection /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/publicIPs/{publicIPId} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/globalReachConnections/{globalReachConnectionName} /// /// /// Operation Id - /// WorkloadNetworks_GetPublicIP + /// GlobalReachConnections_Get /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource - /// + /// /// /// /// - /// NSX Public IP Block identifier. Generally the same as the Public IP Block's display name. + /// Name of the global reach connection. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. + /// is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual Response GetWorkloadNetworkPublicIP(string publicIPId, CancellationToken cancellationToken = default) + public virtual Response GetGlobalReachConnection(string globalReachConnectionName, CancellationToken cancellationToken = default) { - return GetWorkloadNetworkPublicIPs().Get(publicIPId, cancellationToken); + return GetGlobalReachConnections().Get(globalReachConnectionName, cancellationToken); } - /// Gets a collection of AvsCloudLinkResources in the AvsPrivateCloud. - /// An object representing collection of AvsCloudLinkResources and their operations over a AvsCloudLinkResource. - public virtual AvsCloudLinkCollection GetAvsCloudLinks() + /// Gets a collection of HcxEnterpriseSiteResources in the AvsPrivateCloud. + /// An object representing collection of HcxEnterpriseSiteResources and their operations over a HcxEnterpriseSiteResource. + public virtual HcxEnterpriseSiteCollection GetHcxEnterpriseSites() { - return GetCachedClient(client => new AvsCloudLinkCollection(client, Id)); + return GetCachedClient(client => new HcxEnterpriseSiteCollection(client, Id)); } /// - /// Get an cloud link by name in a private cloud + /// Get a HcxEnterpriseSite /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/cloudLinks/{cloudLinkName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/hcxEnterpriseSites/{hcxEnterpriseSiteName} /// /// /// Operation Id - /// CloudLinks_Get + /// HcxEnterpriseSites_Get /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource - /// + /// /// /// /// - /// Name of the cloud link resource. + /// Name of the HCX Enterprise Site. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. + /// is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual async Task> GetAvsCloudLinkAsync(string cloudLinkName, CancellationToken cancellationToken = default) + public virtual async Task> GetHcxEnterpriseSiteAsync(string hcxEnterpriseSiteName, CancellationToken cancellationToken = default) { - return await GetAvsCloudLinks().GetAsync(cloudLinkName, cancellationToken).ConfigureAwait(false); + return await GetHcxEnterpriseSites().GetAsync(hcxEnterpriseSiteName, cancellationToken).ConfigureAwait(false); } /// - /// Get an cloud link by name in a private cloud + /// Get a HcxEnterpriseSite /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/cloudLinks/{cloudLinkName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/hcxEnterpriseSites/{hcxEnterpriseSiteName} /// /// /// Operation Id - /// CloudLinks_Get + /// HcxEnterpriseSites_Get /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource - /// + /// /// /// /// - /// Name of the cloud link resource. + /// Name of the HCX Enterprise Site. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. + /// is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual Response GetAvsCloudLink(string cloudLinkName, CancellationToken cancellationToken = default) + public virtual Response GetHcxEnterpriseSite(string hcxEnterpriseSiteName, CancellationToken cancellationToken = default) { - return GetAvsCloudLinks().Get(cloudLinkName, cancellationToken); + return GetHcxEnterpriseSites().Get(hcxEnterpriseSiteName, cancellationToken); } - /// Gets a collection of AvsPrivateCloudAddonResources in the AvsPrivateCloud. - /// An object representing collection of AvsPrivateCloudAddonResources and their operations over a AvsPrivateCloudAddonResource. - public virtual AvsPrivateCloudAddonCollection GetAvsPrivateCloudAddons() + /// Gets an object representing a IscsiPathResource along with the instance operations that can be performed on it in the AvsPrivateCloud. + /// Returns a object. + public virtual IscsiPathResource GetIscsiPath() { - return GetCachedClient(client => new AvsPrivateCloudAddonCollection(client, Id)); + return new IscsiPathResource(Client, Id.AppendChildResource("iscsiPaths", "default")); + } + + /// Gets a collection of ScriptExecutionResources in the AvsPrivateCloud. + /// An object representing collection of ScriptExecutionResources and their operations over a ScriptExecutionResource. + public virtual ScriptExecutionCollection GetScriptExecutions() + { + return GetCachedClient(client => new ScriptExecutionCollection(client, Id)); } /// - /// Get an addon by name in a private cloud + /// Get a ScriptExecution /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/addons/{addonName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions/{scriptExecutionName} /// /// /// Operation Id - /// Addons_Get + /// ScriptExecutions_Get /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource - /// + /// /// /// /// - /// Name of the addon for the private cloud. + /// Name of the script cmdlet. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. + /// is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual async Task> GetAvsPrivateCloudAddonAsync(string addonName, CancellationToken cancellationToken = default) + public virtual async Task> GetScriptExecutionAsync(string scriptExecutionName, CancellationToken cancellationToken = default) { - return await GetAvsPrivateCloudAddons().GetAsync(addonName, cancellationToken).ConfigureAwait(false); + return await GetScriptExecutions().GetAsync(scriptExecutionName, cancellationToken).ConfigureAwait(false); } /// - /// Get an addon by name in a private cloud + /// Get a ScriptExecution /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/addons/{addonName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions/{scriptExecutionName} /// /// /// Operation Id - /// Addons_Get + /// ScriptExecutions_Get /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource - /// + /// /// /// /// - /// Name of the addon for the private cloud. + /// Name of the script cmdlet. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. + /// is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual Response GetAvsPrivateCloudAddon(string addonName, CancellationToken cancellationToken = default) + public virtual Response GetScriptExecution(string scriptExecutionName, CancellationToken cancellationToken = default) { - return GetAvsPrivateCloudAddons().Get(addonName, cancellationToken); + return GetScriptExecutions().Get(scriptExecutionName, cancellationToken); } /// Gets a collection of ScriptPackageResources in the AvsPrivateCloud. @@ -1198,7 +588,7 @@ public virtual ScriptPackageCollection GetScriptPackages() } /// - /// Get a script package available to run on a private cloud + /// Get a ScriptPackage /// /// /// Request Path @@ -1210,7 +600,7 @@ public virtual ScriptPackageCollection GetScriptPackages() /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -1218,7 +608,7 @@ public virtual ScriptPackageCollection GetScriptPackages() /// /// /// - /// Name of the script package in the private cloud. + /// Name of the script package. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. @@ -1229,7 +619,7 @@ public virtual async Task> GetScriptPackageAsync } /// - /// Get a script package available to run on a private cloud + /// Get a ScriptPackage /// /// /// Request Path @@ -1241,7 +631,7 @@ public virtual async Task> GetScriptPackageAsync /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -1249,7 +639,7 @@ public virtual async Task> GetScriptPackageAsync /// /// /// - /// Name of the script package in the private cloud. + /// Name of the script package. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. @@ -1259,77 +649,15 @@ public virtual Response GetScriptPackage(string scriptPac return GetScriptPackages().Get(scriptPackageName, cancellationToken); } - /// Gets a collection of ScriptExecutionResources in the AvsPrivateCloud. - /// An object representing collection of ScriptExecutionResources and their operations over a ScriptExecutionResource. - public virtual ScriptExecutionCollection GetScriptExecutions() - { - return GetCachedClient(client => new ScriptExecutionCollection(client, Id)); - } - - /// - /// Get an script execution by name in a private cloud - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions/{scriptExecutionName} - /// - /// - /// Operation Id - /// ScriptExecutions_Get - /// - /// - /// Default Api Version - /// 2023-03-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// Name of the user-invoked script execution resource. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public virtual async Task> GetScriptExecutionAsync(string scriptExecutionName, CancellationToken cancellationToken = default) - { - return await GetScriptExecutions().GetAsync(scriptExecutionName, cancellationToken).ConfigureAwait(false); - } - - /// - /// Get an script execution by name in a private cloud - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions/{scriptExecutionName} - /// - /// - /// Operation Id - /// ScriptExecutions_Get - /// - /// - /// Default Api Version - /// 2023-03-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// Name of the user-invoked script execution resource. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public virtual Response GetScriptExecution(string scriptExecutionName, CancellationToken cancellationToken = default) + /// Gets an object representing a WorkloadNetworkResource along with the instance operations that can be performed on it in the AvsPrivateCloud. + /// Returns a object. + public virtual WorkloadNetworkResource GetWorkloadNetwork() { - return GetScriptExecutions().Get(scriptExecutionName, cancellationToken); + return new WorkloadNetworkResource(Client, Id.AppendChildResource("workloadNetworks", "default")); } /// - /// Get a private cloud + /// Get a PrivateCloud /// /// /// Request Path @@ -1341,7 +669,7 @@ public virtual Response GetScriptExecution(string scrip /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -1369,7 +697,7 @@ public virtual async Task> GetAsync(Cancellati } /// - /// Get a private cloud + /// Get a PrivateCloud /// /// /// Request Path @@ -1381,7 +709,7 @@ public virtual async Task> GetAsync(Cancellati /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -1409,7 +737,7 @@ public virtual Response Get(CancellationToken cancellat } /// - /// Delete a private cloud + /// Delete a PrivateCloud /// /// /// Request Path @@ -1421,7 +749,7 @@ public virtual Response Get(CancellationToken cancellat /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -1451,7 +779,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell } /// - /// Delete a private cloud + /// Delete a PrivateCloud /// /// /// Request Path @@ -1463,7 +791,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -1493,7 +821,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel } /// - /// Update a private cloud + /// Update a PrivateCloud /// /// /// Request Path @@ -1505,7 +833,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -1539,7 +867,7 @@ public virtual async Task> UpdateAsync(Wai } /// - /// Update a private cloud + /// Update a PrivateCloud /// /// /// Request Path @@ -1551,7 +879,7 @@ public virtual async Task> UpdateAsync(Wai /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -1585,19 +913,19 @@ public virtual ArmOperation Update(WaitUntil waitUntil, } /// - /// Rotate the vCenter password + /// List the admin credentials for the private cloud /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/rotateVcenterPassword + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/listAdminCredentials /// /// /// Operation Id - /// PrivateClouds_RotateVcenterPassword + /// PrivateClouds_ListAdminCredentials /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -1605,19 +933,15 @@ public virtual ArmOperation Update(WaitUntil waitUntil, /// /// /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The cancellation token to use. - public virtual async Task RotateVCenterPasswordAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + public virtual async Task> GetAdminCredentialsAsync(CancellationToken cancellationToken = default) { - using var scope = _avsPrivateCloudPrivateCloudsClientDiagnostics.CreateScope("AvsPrivateCloudResource.RotateVCenterPassword"); + using var scope = _avsPrivateCloudPrivateCloudsClientDiagnostics.CreateScope("AvsPrivateCloudResource.GetAdminCredentials"); scope.Start(); try { - var response = await _avsPrivateCloudPrivateCloudsRestClient.RotateVcenterPasswordAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new AvsArmOperation(_avsPrivateCloudPrivateCloudsClientDiagnostics, Pipeline, _avsPrivateCloudPrivateCloudsRestClient.CreateRotateVcenterPasswordRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; + var response = await _avsPrivateCloudPrivateCloudsRestClient.ListAdminCredentialsAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return response; } catch (Exception e) { @@ -1627,19 +951,19 @@ public virtual async Task RotateVCenterPasswordAsync(WaitUntil wai } /// - /// Rotate the vCenter password + /// List the admin credentials for the private cloud /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/rotateVcenterPassword + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/listAdminCredentials /// /// /// Operation Id - /// PrivateClouds_RotateVcenterPassword + /// PrivateClouds_ListAdminCredentials /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -1647,19 +971,15 @@ public virtual async Task RotateVCenterPasswordAsync(WaitUntil wai /// /// /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The cancellation token to use. - public virtual ArmOperation RotateVCenterPassword(WaitUntil waitUntil, CancellationToken cancellationToken = default) + public virtual Response GetAdminCredentials(CancellationToken cancellationToken = default) { - using var scope = _avsPrivateCloudPrivateCloudsClientDiagnostics.CreateScope("AvsPrivateCloudResource.RotateVCenterPassword"); + using var scope = _avsPrivateCloudPrivateCloudsClientDiagnostics.CreateScope("AvsPrivateCloudResource.GetAdminCredentials"); scope.Start(); try { - var response = _avsPrivateCloudPrivateCloudsRestClient.RotateVcenterPassword(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - var operation = new AvsArmOperation(_avsPrivateCloudPrivateCloudsClientDiagnostics, Pipeline, _avsPrivateCloudPrivateCloudsRestClient.CreateRotateVcenterPasswordRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; + var response = _avsPrivateCloudPrivateCloudsRestClient.ListAdminCredentials(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return response; } catch (Exception e) { @@ -1681,7 +1001,7 @@ public virtual ArmOperation RotateVCenterPassword(WaitUntil waitUntil, Cancellat /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -1723,7 +1043,7 @@ public virtual async Task RotateNsxtPasswordAsync(WaitUntil waitUn /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -1753,19 +1073,19 @@ public virtual ArmOperation RotateNsxtPassword(WaitUntil waitUntil, Cancellation } /// - /// List the admin credentials for the private cloud + /// Rotate the vCenter password /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/listAdminCredentials + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/rotateVcenterPassword /// /// /// Operation Id - /// PrivateClouds_ListAdminCredentials + /// PrivateClouds_RotateVcenterPassword /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -1773,15 +1093,19 @@ public virtual ArmOperation RotateNsxtPassword(WaitUntil waitUntil, Cancellation /// /// /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The cancellation token to use. - public virtual async Task> GetAdminCredentialsAsync(CancellationToken cancellationToken = default) + public virtual async Task RotateVCenterPasswordAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - using var scope = _avsPrivateCloudPrivateCloudsClientDiagnostics.CreateScope("AvsPrivateCloudResource.GetAdminCredentials"); + using var scope = _avsPrivateCloudPrivateCloudsClientDiagnostics.CreateScope("AvsPrivateCloudResource.RotateVCenterPassword"); scope.Start(); try { - var response = await _avsPrivateCloudPrivateCloudsRestClient.ListAdminCredentialsAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - return response; + var response = await _avsPrivateCloudPrivateCloudsRestClient.RotateVcenterPasswordAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new AvsArmOperation(_avsPrivateCloudPrivateCloudsClientDiagnostics, Pipeline, _avsPrivateCloudPrivateCloudsRestClient.CreateRotateVcenterPasswordRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; } catch (Exception e) { @@ -1791,19 +1115,19 @@ public virtual async Task> GetAdminCredentialsAsync(C } /// - /// List the admin credentials for the private cloud + /// Rotate the vCenter password /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/listAdminCredentials + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/rotateVcenterPassword /// /// /// Operation Id - /// PrivateClouds_ListAdminCredentials + /// PrivateClouds_RotateVcenterPassword /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -1811,15 +1135,19 @@ public virtual async Task> GetAdminCredentialsAsync(C /// /// /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The cancellation token to use. - public virtual Response GetAdminCredentials(CancellationToken cancellationToken = default) + public virtual ArmOperation RotateVCenterPassword(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - using var scope = _avsPrivateCloudPrivateCloudsClientDiagnostics.CreateScope("AvsPrivateCloudResource.GetAdminCredentials"); + using var scope = _avsPrivateCloudPrivateCloudsClientDiagnostics.CreateScope("AvsPrivateCloudResource.RotateVCenterPassword"); scope.Start(); try { - var response = _avsPrivateCloudPrivateCloudsRestClient.ListAdminCredentials(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - return response; + var response = _avsPrivateCloudPrivateCloudsRestClient.RotateVcenterPassword(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new AvsArmOperation(_avsPrivateCloudPrivateCloudsClientDiagnostics, Pipeline, _avsPrivateCloudPrivateCloudsRestClient.CreateRotateVcenterPasswordRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; } catch (Exception e) { @@ -1841,7 +1169,7 @@ public virtual Response GetAdminCredentials(CancellationToken /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -1903,7 +1231,7 @@ public virtual async Task> AddTagAsync(string /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -1965,7 +1293,7 @@ public virtual Response AddTag(string key, string value /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -2022,7 +1350,7 @@ public virtual async Task> SetTagsAsync(IDicti /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -2079,7 +1407,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -2139,7 +1467,7 @@ public virtual async Task> RemoveTagAsync(stri /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/ExpressRouteAuthorizationCollection.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/ExpressRouteAuthorizationCollection.cs index 7b58de2e5a23..b430c3f597fc 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/ExpressRouteAuthorizationCollection.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/ExpressRouteAuthorizationCollection.cs @@ -52,7 +52,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) } /// - /// Create or update an ExpressRoute Circuit Authorization in a private cloud + /// Create a ExpressRouteAuthorization /// /// /// Request Path @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -73,8 +73,8 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Name of the ExpressRoute Circuit Authorization in the private cloud. - /// An ExpressRoute Circuit Authorization. + /// Name of the ExpressRoute Circuit Authorization. + /// Resource create parameters. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// or is null. @@ -88,7 +88,7 @@ public virtual async Task> Creat try { var response = await _expressRouteAuthorizationAuthorizationsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, authorizationName, data, cancellationToken).ConfigureAwait(false); - var operation = new AvsArmOperation(new ExpressRouteAuthorizationOperationSource(Client), _expressRouteAuthorizationAuthorizationsClientDiagnostics, Pipeline, _expressRouteAuthorizationAuthorizationsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, authorizationName, data).Request, response, OperationFinalStateVia.Location); + var operation = new AvsArmOperation(new ExpressRouteAuthorizationOperationSource(Client), _expressRouteAuthorizationAuthorizationsClientDiagnostics, Pipeline, _expressRouteAuthorizationAuthorizationsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, authorizationName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -101,7 +101,7 @@ public virtual async Task> Creat } /// - /// Create or update an ExpressRoute Circuit Authorization in a private cloud + /// Create a ExpressRouteAuthorization /// /// /// Request Path @@ -113,7 +113,7 @@ public virtual async Task> Creat /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -122,8 +122,8 @@ public virtual async Task> Creat /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Name of the ExpressRoute Circuit Authorization in the private cloud. - /// An ExpressRoute Circuit Authorization. + /// Name of the ExpressRoute Circuit Authorization. + /// Resource create parameters. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// or is null. @@ -137,7 +137,7 @@ public virtual ArmOperation CreateOrUpdate(Wa try { var response = _expressRouteAuthorizationAuthorizationsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, authorizationName, data, cancellationToken); - var operation = new AvsArmOperation(new ExpressRouteAuthorizationOperationSource(Client), _expressRouteAuthorizationAuthorizationsClientDiagnostics, Pipeline, _expressRouteAuthorizationAuthorizationsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, authorizationName, data).Request, response, OperationFinalStateVia.Location); + var operation = new AvsArmOperation(new ExpressRouteAuthorizationOperationSource(Client), _expressRouteAuthorizationAuthorizationsClientDiagnostics, Pipeline, _expressRouteAuthorizationAuthorizationsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, authorizationName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -150,7 +150,7 @@ public virtual ArmOperation CreateOrUpdate(Wa } /// - /// Get an ExpressRoute Circuit Authorization by name in a private cloud + /// Get a ExpressRouteAuthorization /// /// /// Request Path @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(Wa /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -170,7 +170,7 @@ public virtual ArmOperation CreateOrUpdate(Wa /// /// /// - /// Name of the ExpressRoute Circuit Authorization in the private cloud. + /// Name of the ExpressRoute Circuit Authorization. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -195,7 +195,7 @@ public virtual async Task> GetAsync( } /// - /// Get an ExpressRoute Circuit Authorization by name in a private cloud + /// Get a ExpressRouteAuthorization /// /// /// Request Path @@ -207,7 +207,7 @@ public virtual async Task> GetAsync( /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -215,7 +215,7 @@ public virtual async Task> GetAsync( /// /// /// - /// Name of the ExpressRoute Circuit Authorization in the private cloud. + /// Name of the ExpressRoute Circuit Authorization. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -240,7 +240,7 @@ public virtual Response Get(string authorizat } /// - /// List ExpressRoute Circuit Authorizations in a private cloud + /// List ExpressRouteAuthorization resources by PrivateCloud /// /// /// Request Path @@ -252,7 +252,7 @@ public virtual Response Get(string authorizat /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -270,7 +270,7 @@ public virtual AsyncPageable GetAllAsync(Canc } /// - /// List ExpressRoute Circuit Authorizations in a private cloud + /// List ExpressRouteAuthorization resources by PrivateCloud /// /// /// Request Path @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(Canc /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationTo /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -320,7 +320,7 @@ public virtual Pageable GetAll(CancellationTo /// /// /// - /// Name of the ExpressRoute Circuit Authorization in the private cloud. + /// Name of the ExpressRoute Circuit Authorization. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string authorizationName, /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -363,7 +363,7 @@ public virtual async Task> ExistsAsync(string authorizationName, /// /// /// - /// Name of the ExpressRoute Circuit Authorization in the private cloud. + /// Name of the ExpressRoute Circuit Authorization. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -398,7 +398,7 @@ public virtual Response Exists(string authorizationName, CancellationToken /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -406,7 +406,7 @@ public virtual Response Exists(string authorizationName, CancellationToken /// /// /// - /// Name of the ExpressRoute Circuit Authorization in the private cloud. + /// Name of the ExpressRoute Circuit Authorization. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -443,7 +443,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -451,7 +451,7 @@ public virtual async Task> G /// /// /// - /// Name of the ExpressRoute Circuit Authorization in the private cloud. + /// Name of the ExpressRoute Circuit Authorization. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/ExpressRouteAuthorizationData.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/ExpressRouteAuthorizationData.cs index a9465eeb9a11..44fde78ecc03 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/ExpressRouteAuthorizationData.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/ExpressRouteAuthorizationData.cs @@ -61,7 +61,7 @@ public ExpressRouteAuthorizationData() /// The name. /// The resourceType. /// The systemData. - /// The state of the ExpressRoute Circuit Authorization provisioning. + /// The state of the ExpressRoute Circuit Authorization provisioning. /// The ID of the ExpressRoute Circuit Authorization. /// The key of the ExpressRoute Circuit Authorization. /// The ID of the ExpressRoute Circuit. @@ -75,7 +75,7 @@ internal ExpressRouteAuthorizationData(ResourceIdentifier id, string name, Resou _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The state of the ExpressRoute Circuit Authorization provisioning. + /// The state of the ExpressRoute Circuit Authorization provisioning. public ExpressRouteAuthorizationProvisioningState? ProvisioningState { get; } /// The ID of the ExpressRoute Circuit Authorization. public ResourceIdentifier ExpressRouteAuthorizationId { get; } diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/ExpressRouteAuthorizationResource.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/ExpressRouteAuthorizationResource.cs index e7eca098535c..82f3991609a0 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/ExpressRouteAuthorizationResource.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/ExpressRouteAuthorizationResource.cs @@ -89,7 +89,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) } /// - /// Get an ExpressRoute Circuit Authorization by name in a private cloud + /// Get a ExpressRouteAuthorization /// /// /// Request Path @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -129,7 +129,7 @@ public virtual async Task> GetAsync( } /// - /// Get an ExpressRoute Circuit Authorization by name in a private cloud + /// Get a ExpressRouteAuthorization /// /// /// Request Path @@ -141,7 +141,7 @@ public virtual async Task> GetAsync( /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -169,7 +169,7 @@ public virtual Response Get(CancellationToken } /// - /// Delete an ExpressRoute Circuit Authorization in a private cloud + /// Delete a ExpressRouteAuthorization /// /// /// Request Path @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell } /// - /// Delete an ExpressRoute Circuit Authorization in a private cloud + /// Delete a ExpressRouteAuthorization /// /// /// Request Path @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel } /// - /// Create or update an ExpressRoute Circuit Authorization in a private cloud + /// Create a ExpressRouteAuthorization /// /// /// Request Path @@ -265,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -274,7 +274,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// An ExpressRoute Circuit Authorization. + /// Resource create parameters. /// The cancellation token to use. /// is null. public virtual async Task> UpdateAsync(WaitUntil waitUntil, ExpressRouteAuthorizationData data, CancellationToken cancellationToken = default) @@ -286,7 +286,7 @@ public virtual async Task> Updat try { var response = await _expressRouteAuthorizationAuthorizationsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); - var operation = new AvsArmOperation(new ExpressRouteAuthorizationOperationSource(Client), _expressRouteAuthorizationAuthorizationsClientDiagnostics, Pipeline, _expressRouteAuthorizationAuthorizationsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + var operation = new AvsArmOperation(new ExpressRouteAuthorizationOperationSource(Client), _expressRouteAuthorizationAuthorizationsClientDiagnostics, Pipeline, _expressRouteAuthorizationAuthorizationsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -299,7 +299,7 @@ public virtual async Task> Updat } /// - /// Create or update an ExpressRoute Circuit Authorization in a private cloud + /// Create a ExpressRouteAuthorization /// /// /// Request Path @@ -311,7 +311,7 @@ public virtual async Task> Updat /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -320,7 +320,7 @@ public virtual async Task> Updat /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// An ExpressRoute Circuit Authorization. + /// Resource create parameters. /// The cancellation token to use. /// is null. public virtual ArmOperation Update(WaitUntil waitUntil, ExpressRouteAuthorizationData data, CancellationToken cancellationToken = default) @@ -332,7 +332,7 @@ public virtual ArmOperation Update(WaitUntil try { var response = _expressRouteAuthorizationAuthorizationsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); - var operation = new AvsArmOperation(new ExpressRouteAuthorizationOperationSource(Client), _expressRouteAuthorizationAuthorizationsClientDiagnostics, Pipeline, _expressRouteAuthorizationAuthorizationsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + var operation = new AvsArmOperation(new ExpressRouteAuthorizationOperationSource(Client), _expressRouteAuthorizationAuthorizationsClientDiagnostics, Pipeline, _expressRouteAuthorizationAuthorizationsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Extensions/AvsExtensions.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Extensions/AvsExtensions.cs index f2e3da6b282e..50ae0b65f1ce 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Extensions/AvsExtensions.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Extensions/AvsExtensions.cs @@ -52,6 +52,63 @@ public static AvsPrivateCloudResource GetAvsPrivateCloudResource(this ArmClient return GetMockableAvsArmClient(client).GetAvsPrivateCloudResource(id); } + /// + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static AvsPrivateCloudAddonResource GetAvsPrivateCloudAddonResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableAvsArmClient(client).GetAvsPrivateCloudAddonResource(id); + } + + /// + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static ExpressRouteAuthorizationResource GetExpressRouteAuthorizationResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableAvsArmClient(client).GetExpressRouteAuthorizationResource(id); + } + + /// + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static AvsCloudLinkResource GetAvsCloudLinkResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableAvsArmClient(client).GetAvsCloudLinkResource(id); + } + /// /// Gets an object representing an along with the instance operations that can be performed on it but with no data. /// You can use to create an from its components. @@ -91,41 +148,41 @@ public static AvsPrivateCloudDatastoreResource GetAvsPrivateCloudDatastoreResour } /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The resource ID of the resource to get. /// is null. - /// Returns a object. - public static HcxEnterpriseSiteResource GetHcxEnterpriseSiteResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static PlacementPolicyResource GetPlacementPolicyResource(this ArmClient client, ResourceIdentifier id) { Argument.AssertNotNull(client, nameof(client)); - return GetMockableAvsArmClient(client).GetHcxEnterpriseSiteResource(id); + return GetMockableAvsArmClient(client).GetPlacementPolicyResource(id); } /// - /// Gets an object representing an along with the instance operations that can be performed on it but with no data. - /// You can use to create an from its components. + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The resource ID of the resource to get. /// is null. - /// Returns a object. - public static ExpressRouteAuthorizationResource GetExpressRouteAuthorizationResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static AvsPrivateCloudClusterVirtualMachineResource GetAvsPrivateCloudClusterVirtualMachineResource(this ArmClient client, ResourceIdentifier id) { Argument.AssertNotNull(client, nameof(client)); - return GetMockableAvsArmClient(client).GetExpressRouteAuthorizationResource(id); + return GetMockableAvsArmClient(client).GetAvsPrivateCloudClusterVirtualMachineResource(id); } /// @@ -148,136 +205,136 @@ public static GlobalReachConnectionResource GetGlobalReachConnectionResource(thi } /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The resource ID of the resource to get. /// is null. - /// Returns a object. - public static WorkloadNetworkResource GetWorkloadNetworkResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static HcxEnterpriseSiteResource GetHcxEnterpriseSiteResource(this ArmClient client, ResourceIdentifier id) { Argument.AssertNotNull(client, nameof(client)); - return GetMockableAvsArmClient(client).GetWorkloadNetworkResource(id); + return GetMockableAvsArmClient(client).GetHcxEnterpriseSiteResource(id); } /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The resource ID of the resource to get. /// is null. - /// Returns a object. - public static WorkloadNetworkSegmentResource GetWorkloadNetworkSegmentResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static IscsiPathResource GetIscsiPathResource(this ArmClient client, ResourceIdentifier id) { Argument.AssertNotNull(client, nameof(client)); - return GetMockableAvsArmClient(client).GetWorkloadNetworkSegmentResource(id); + return GetMockableAvsArmClient(client).GetIscsiPathResource(id); } /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The resource ID of the resource to get. /// is null. - /// Returns a object. - public static WorkloadNetworkDhcpResource GetWorkloadNetworkDhcpResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static ScriptExecutionResource GetScriptExecutionResource(this ArmClient client, ResourceIdentifier id) { Argument.AssertNotNull(client, nameof(client)); - return GetMockableAvsArmClient(client).GetWorkloadNetworkDhcpResource(id); + return GetMockableAvsArmClient(client).GetScriptExecutionResource(id); } /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The resource ID of the resource to get. /// is null. - /// Returns a object. - public static WorkloadNetworkGatewayResource GetWorkloadNetworkGatewayResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static ScriptPackageResource GetScriptPackageResource(this ArmClient client, ResourceIdentifier id) { Argument.AssertNotNull(client, nameof(client)); - return GetMockableAvsArmClient(client).GetWorkloadNetworkGatewayResource(id); + return GetMockableAvsArmClient(client).GetScriptPackageResource(id); } /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The resource ID of the resource to get. /// is null. - /// Returns a object. - public static WorkloadNetworkPortMirroringProfileResource GetWorkloadNetworkPortMirroringProfileResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static ScriptCmdletResource GetScriptCmdletResource(this ArmClient client, ResourceIdentifier id) { Argument.AssertNotNull(client, nameof(client)); - return GetMockableAvsArmClient(client).GetWorkloadNetworkPortMirroringProfileResource(id); + return GetMockableAvsArmClient(client).GetScriptCmdletResource(id); } /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The resource ID of the resource to get. /// is null. - /// Returns a object. - public static WorkloadNetworkVmGroupResource GetWorkloadNetworkVmGroupResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static WorkloadNetworkResource GetWorkloadNetworkResource(this ArmClient client, ResourceIdentifier id) { Argument.AssertNotNull(client, nameof(client)); - return GetMockableAvsArmClient(client).GetWorkloadNetworkVmGroupResource(id); + return GetMockableAvsArmClient(client).GetWorkloadNetworkResource(id); } /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The resource ID of the resource to get. /// is null. - /// Returns a object. - public static WorkloadNetworkVirtualMachineResource GetWorkloadNetworkVirtualMachineResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static WorkloadNetworkDhcpResource GetWorkloadNetworkDhcpResource(this ArmClient client, ResourceIdentifier id) { Argument.AssertNotNull(client, nameof(client)); - return GetMockableAvsArmClient(client).GetWorkloadNetworkVirtualMachineResource(id); + return GetMockableAvsArmClient(client).GetWorkloadNetworkDhcpResource(id); } /// @@ -319,155 +376,117 @@ public static WorkloadNetworkDnsZoneResource GetWorkloadNetworkDnsZoneResource(t } /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance the method will execute against. - /// The resource ID of the resource to get. - /// is null. - /// Returns a object. - public static WorkloadNetworkPublicIPResource GetWorkloadNetworkPublicIPResource(this ArmClient client, ResourceIdentifier id) - { - Argument.AssertNotNull(client, nameof(client)); - - return GetMockableAvsArmClient(client).GetWorkloadNetworkPublicIPResource(id); - } - - /// - /// Gets an object representing an along with the instance operations that can be performed on it but with no data. - /// You can use to create an from its components. - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance the method will execute against. - /// The resource ID of the resource to get. - /// is null. - /// Returns a object. - public static AvsCloudLinkResource GetAvsCloudLinkResource(this ArmClient client, ResourceIdentifier id) - { - Argument.AssertNotNull(client, nameof(client)); - - return GetMockableAvsArmClient(client).GetAvsCloudLinkResource(id); - } - - /// - /// Gets an object representing an along with the instance operations that can be performed on it but with no data. - /// You can use to create an from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The resource ID of the resource to get. /// is null. - /// Returns a object. - public static AvsPrivateCloudAddonResource GetAvsPrivateCloudAddonResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static WorkloadNetworkGatewayResource GetWorkloadNetworkGatewayResource(this ArmClient client, ResourceIdentifier id) { Argument.AssertNotNull(client, nameof(client)); - return GetMockableAvsArmClient(client).GetAvsPrivateCloudAddonResource(id); + return GetMockableAvsArmClient(client).GetWorkloadNetworkGatewayResource(id); } /// - /// Gets an object representing an along with the instance operations that can be performed on it but with no data. - /// You can use to create an from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The resource ID of the resource to get. /// is null. - /// Returns a object. - public static AvsPrivateCloudClusterVirtualMachineResource GetAvsPrivateCloudClusterVirtualMachineResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static WorkloadNetworkPortMirroringProfileResource GetWorkloadNetworkPortMirroringProfileResource(this ArmClient client, ResourceIdentifier id) { Argument.AssertNotNull(client, nameof(client)); - return GetMockableAvsArmClient(client).GetAvsPrivateCloudClusterVirtualMachineResource(id); + return GetMockableAvsArmClient(client).GetWorkloadNetworkPortMirroringProfileResource(id); } /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The resource ID of the resource to get. /// is null. - /// Returns a object. - public static PlacementPolicyResource GetPlacementPolicyResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static WorkloadNetworkPublicIPResource GetWorkloadNetworkPublicIPResource(this ArmClient client, ResourceIdentifier id) { Argument.AssertNotNull(client, nameof(client)); - return GetMockableAvsArmClient(client).GetPlacementPolicyResource(id); + return GetMockableAvsArmClient(client).GetWorkloadNetworkPublicIPResource(id); } /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The resource ID of the resource to get. /// is null. - /// Returns a object. - public static ScriptPackageResource GetScriptPackageResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static WorkloadNetworkSegmentResource GetWorkloadNetworkSegmentResource(this ArmClient client, ResourceIdentifier id) { Argument.AssertNotNull(client, nameof(client)); - return GetMockableAvsArmClient(client).GetScriptPackageResource(id); + return GetMockableAvsArmClient(client).GetWorkloadNetworkSegmentResource(id); } /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The resource ID of the resource to get. /// is null. - /// Returns a object. - public static ScriptCmdletResource GetScriptCmdletResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static WorkloadNetworkVirtualMachineResource GetWorkloadNetworkVirtualMachineResource(this ArmClient client, ResourceIdentifier id) { Argument.AssertNotNull(client, nameof(client)); - return GetMockableAvsArmClient(client).GetScriptCmdletResource(id); + return GetMockableAvsArmClient(client).GetWorkloadNetworkVirtualMachineResource(id); } /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The resource ID of the resource to get. /// is null. - /// Returns a object. - public static ScriptExecutionResource GetScriptExecutionResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static WorkloadNetworkVmGroupResource GetWorkloadNetworkVmGroupResource(this ArmClient client, ResourceIdentifier id) { Argument.AssertNotNull(client, nameof(client)); - return GetMockableAvsArmClient(client).GetScriptExecutionResource(id); + return GetMockableAvsArmClient(client).GetWorkloadNetworkVmGroupResource(id); } /// @@ -488,7 +507,7 @@ public static AvsPrivateCloudCollection GetAvsPrivateClouds(this ResourceGroupRe } /// - /// Get a private cloud + /// Get a PrivateCloud /// /// /// Request Path @@ -500,7 +519,7 @@ public static AvsPrivateCloudCollection GetAvsPrivateClouds(this ResourceGroupRe /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -526,7 +545,7 @@ public static async Task> GetAvsPrivateCloudAs } /// - /// Get a private cloud + /// Get a PrivateCloud /// /// /// Request Path @@ -538,7 +557,7 @@ public static async Task> GetAvsPrivateCloudAs /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -564,137 +583,137 @@ public static Response GetAvsPrivateCloud(this Resource } /// - /// Return trial status for subscription by region + /// Return quota for subscription by region /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.AVS/locations/{location}/checkTrialAvailability + /// /subscriptions/{subscriptionId}/providers/Microsoft.AVS/locations/{location}/checkQuotaAvailability /// /// /// Operation Id - /// Locations_CheckTrialAvailability + /// Locations_CheckQuotaAvailability /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. - /// Azure region. - /// The sku to check for trial availability. + /// The name of the Azure region. /// The cancellation token to use. /// is null. - public static async Task> CheckAvsTrialAvailabilityAsync(this SubscriptionResource subscriptionResource, AzureLocation location, AvsSku sku = null, CancellationToken cancellationToken = default) + public static async Task> CheckAvsQuotaAvailabilityAsync(this SubscriptionResource subscriptionResource, AzureLocation location, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return await GetMockableAvsSubscriptionResource(subscriptionResource).CheckAvsTrialAvailabilityAsync(location, sku, cancellationToken).ConfigureAwait(false); + return await GetMockableAvsSubscriptionResource(subscriptionResource).CheckAvsQuotaAvailabilityAsync(location, cancellationToken).ConfigureAwait(false); } /// - /// Return trial status for subscription by region + /// Return quota for subscription by region /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.AVS/locations/{location}/checkTrialAvailability + /// /subscriptions/{subscriptionId}/providers/Microsoft.AVS/locations/{location}/checkQuotaAvailability /// /// /// Operation Id - /// Locations_CheckTrialAvailability + /// Locations_CheckQuotaAvailability /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. - /// Azure region. - /// The sku to check for trial availability. + /// The name of the Azure region. /// The cancellation token to use. /// is null. - public static Response CheckAvsTrialAvailability(this SubscriptionResource subscriptionResource, AzureLocation location, AvsSku sku = null, CancellationToken cancellationToken = default) + public static Response CheckAvsQuotaAvailability(this SubscriptionResource subscriptionResource, AzureLocation location, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return GetMockableAvsSubscriptionResource(subscriptionResource).CheckAvsTrialAvailability(location, sku, cancellationToken); + return GetMockableAvsSubscriptionResource(subscriptionResource).CheckAvsQuotaAvailability(location, cancellationToken); } /// - /// Return quota for subscription by region + /// Return trial status for subscription by region /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.AVS/locations/{location}/checkQuotaAvailability + /// /subscriptions/{subscriptionId}/providers/Microsoft.AVS/locations/{location}/checkTrialAvailability /// /// /// Operation Id - /// Locations_CheckQuotaAvailability + /// Locations_CheckTrialAvailability /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. - /// Azure region. + /// The name of the Azure region. + /// Optionally, check for a specific SKU. /// The cancellation token to use. /// is null. - public static async Task> CheckAvsQuotaAvailabilityAsync(this SubscriptionResource subscriptionResource, AzureLocation location, CancellationToken cancellationToken = default) + public static async Task> CheckAvsTrialAvailabilityAsync(this SubscriptionResource subscriptionResource, AzureLocation location, AvsSku sku = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return await GetMockableAvsSubscriptionResource(subscriptionResource).CheckAvsQuotaAvailabilityAsync(location, cancellationToken).ConfigureAwait(false); + return await GetMockableAvsSubscriptionResource(subscriptionResource).CheckAvsTrialAvailabilityAsync(location, sku, cancellationToken).ConfigureAwait(false); } /// - /// Return quota for subscription by region + /// Return trial status for subscription by region /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.AVS/locations/{location}/checkQuotaAvailability + /// /subscriptions/{subscriptionId}/providers/Microsoft.AVS/locations/{location}/checkTrialAvailability /// /// /// Operation Id - /// Locations_CheckQuotaAvailability + /// Locations_CheckTrialAvailability /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. - /// Azure region. + /// The name of the Azure region. + /// Optionally, check for a specific SKU. /// The cancellation token to use. /// is null. - public static Response CheckAvsQuotaAvailability(this SubscriptionResource subscriptionResource, AzureLocation location, CancellationToken cancellationToken = default) + public static Response CheckAvsTrialAvailability(this SubscriptionResource subscriptionResource, AzureLocation location, AvsSku sku = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return GetMockableAvsSubscriptionResource(subscriptionResource).CheckAvsQuotaAvailability(location, cancellationToken); + return GetMockableAvsSubscriptionResource(subscriptionResource).CheckAvsTrialAvailability(location, sku, cancellationToken); } /// - /// List private clouds in a subscription + /// List PrivateCloud resources by subscription ID /// /// /// Request Path @@ -706,7 +725,7 @@ public static Response CheckAvsQuotaAvai /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -730,7 +749,7 @@ public static AsyncPageable GetAvsPrivateCloudsAsync(th } /// - /// List private clouds in a subscription + /// List PrivateCloud resources by subscription ID /// /// /// Request Path @@ -742,7 +761,7 @@ public static AsyncPageable GetAvsPrivateCloudsAsync(th /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Extensions/MockableAvsArmClient.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Extensions/MockableAvsArmClient.cs index 21a9502f6117..daf42488f4d4 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Extensions/MockableAvsArmClient.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Extensions/MockableAvsArmClient.cs @@ -46,6 +46,42 @@ public virtual AvsPrivateCloudResource GetAvsPrivateCloudResource(ResourceIdenti return new AvsPrivateCloudResource(Client, id); } + /// + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual AvsPrivateCloudAddonResource GetAvsPrivateCloudAddonResource(ResourceIdentifier id) + { + AvsPrivateCloudAddonResource.ValidateResourceId(id); + return new AvsPrivateCloudAddonResource(Client, id); + } + + /// + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual ExpressRouteAuthorizationResource GetExpressRouteAuthorizationResource(ResourceIdentifier id) + { + ExpressRouteAuthorizationResource.ValidateResourceId(id); + return new ExpressRouteAuthorizationResource(Client, id); + } + + /// + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual AvsCloudLinkResource GetAvsCloudLinkResource(ResourceIdentifier id) + { + AvsCloudLinkResource.ValidateResourceId(id); + return new AvsCloudLinkResource(Client, id); + } + /// /// Gets an object representing an along with the instance operations that can be performed on it but with no data. /// You can use to create an from its components. @@ -71,27 +107,27 @@ public virtual AvsPrivateCloudDatastoreResource GetAvsPrivateCloudDatastoreResou } /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// The resource ID of the resource to get. - /// Returns a object. - public virtual HcxEnterpriseSiteResource GetHcxEnterpriseSiteResource(ResourceIdentifier id) + /// Returns a object. + public virtual PlacementPolicyResource GetPlacementPolicyResource(ResourceIdentifier id) { - HcxEnterpriseSiteResource.ValidateResourceId(id); - return new HcxEnterpriseSiteResource(Client, id); + PlacementPolicyResource.ValidateResourceId(id); + return new PlacementPolicyResource(Client, id); } /// - /// Gets an object representing an along with the instance operations that can be performed on it but with no data. - /// You can use to create an from its components. + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. /// /// The resource ID of the resource to get. - /// Returns a object. - public virtual ExpressRouteAuthorizationResource GetExpressRouteAuthorizationResource(ResourceIdentifier id) + /// Returns a object. + public virtual AvsPrivateCloudClusterVirtualMachineResource GetAvsPrivateCloudClusterVirtualMachineResource(ResourceIdentifier id) { - ExpressRouteAuthorizationResource.ValidateResourceId(id); - return new ExpressRouteAuthorizationResource(Client, id); + AvsPrivateCloudClusterVirtualMachineResource.ValidateResourceId(id); + return new AvsPrivateCloudClusterVirtualMachineResource(Client, id); } /// @@ -107,87 +143,87 @@ public virtual GlobalReachConnectionResource GetGlobalReachConnectionResource(Re } /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// The resource ID of the resource to get. - /// Returns a object. - public virtual WorkloadNetworkResource GetWorkloadNetworkResource(ResourceIdentifier id) + /// Returns a object. + public virtual HcxEnterpriseSiteResource GetHcxEnterpriseSiteResource(ResourceIdentifier id) { - WorkloadNetworkResource.ValidateResourceId(id); - return new WorkloadNetworkResource(Client, id); + HcxEnterpriseSiteResource.ValidateResourceId(id); + return new HcxEnterpriseSiteResource(Client, id); } /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. /// /// The resource ID of the resource to get. - /// Returns a object. - public virtual WorkloadNetworkSegmentResource GetWorkloadNetworkSegmentResource(ResourceIdentifier id) + /// Returns a object. + public virtual IscsiPathResource GetIscsiPathResource(ResourceIdentifier id) { - WorkloadNetworkSegmentResource.ValidateResourceId(id); - return new WorkloadNetworkSegmentResource(Client, id); + IscsiPathResource.ValidateResourceId(id); + return new IscsiPathResource(Client, id); } /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// The resource ID of the resource to get. - /// Returns a object. - public virtual WorkloadNetworkDhcpResource GetWorkloadNetworkDhcpResource(ResourceIdentifier id) + /// Returns a object. + public virtual ScriptExecutionResource GetScriptExecutionResource(ResourceIdentifier id) { - WorkloadNetworkDhcpResource.ValidateResourceId(id); - return new WorkloadNetworkDhcpResource(Client, id); + ScriptExecutionResource.ValidateResourceId(id); + return new ScriptExecutionResource(Client, id); } /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// The resource ID of the resource to get. - /// Returns a object. - public virtual WorkloadNetworkGatewayResource GetWorkloadNetworkGatewayResource(ResourceIdentifier id) + /// Returns a object. + public virtual ScriptPackageResource GetScriptPackageResource(ResourceIdentifier id) { - WorkloadNetworkGatewayResource.ValidateResourceId(id); - return new WorkloadNetworkGatewayResource(Client, id); + ScriptPackageResource.ValidateResourceId(id); + return new ScriptPackageResource(Client, id); } /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// The resource ID of the resource to get. - /// Returns a object. - public virtual WorkloadNetworkPortMirroringProfileResource GetWorkloadNetworkPortMirroringProfileResource(ResourceIdentifier id) + /// Returns a object. + public virtual ScriptCmdletResource GetScriptCmdletResource(ResourceIdentifier id) { - WorkloadNetworkPortMirroringProfileResource.ValidateResourceId(id); - return new WorkloadNetworkPortMirroringProfileResource(Client, id); + ScriptCmdletResource.ValidateResourceId(id); + return new ScriptCmdletResource(Client, id); } /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// The resource ID of the resource to get. - /// Returns a object. - public virtual WorkloadNetworkVmGroupResource GetWorkloadNetworkVmGroupResource(ResourceIdentifier id) + /// Returns a object. + public virtual WorkloadNetworkResource GetWorkloadNetworkResource(ResourceIdentifier id) { - WorkloadNetworkVmGroupResource.ValidateResourceId(id); - return new WorkloadNetworkVmGroupResource(Client, id); + WorkloadNetworkResource.ValidateResourceId(id); + return new WorkloadNetworkResource(Client, id); } /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// The resource ID of the resource to get. - /// Returns a object. - public virtual WorkloadNetworkVirtualMachineResource GetWorkloadNetworkVirtualMachineResource(ResourceIdentifier id) + /// Returns a object. + public virtual WorkloadNetworkDhcpResource GetWorkloadNetworkDhcpResource(ResourceIdentifier id) { - WorkloadNetworkVirtualMachineResource.ValidateResourceId(id); - return new WorkloadNetworkVirtualMachineResource(Client, id); + WorkloadNetworkDhcpResource.ValidateResourceId(id); + return new WorkloadNetworkDhcpResource(Client, id); } /// @@ -215,99 +251,75 @@ public virtual WorkloadNetworkDnsZoneResource GetWorkloadNetworkDnsZoneResource( } /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// The resource ID of the resource to get. - /// Returns a object. - public virtual WorkloadNetworkPublicIPResource GetWorkloadNetworkPublicIPResource(ResourceIdentifier id) - { - WorkloadNetworkPublicIPResource.ValidateResourceId(id); - return new WorkloadNetworkPublicIPResource(Client, id); - } - - /// - /// Gets an object representing an along with the instance operations that can be performed on it but with no data. - /// You can use to create an from its components. - /// - /// The resource ID of the resource to get. - /// Returns a object. - public virtual AvsCloudLinkResource GetAvsCloudLinkResource(ResourceIdentifier id) - { - AvsCloudLinkResource.ValidateResourceId(id); - return new AvsCloudLinkResource(Client, id); - } - - /// - /// Gets an object representing an along with the instance operations that can be performed on it but with no data. - /// You can use to create an from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// The resource ID of the resource to get. - /// Returns a object. - public virtual AvsPrivateCloudAddonResource GetAvsPrivateCloudAddonResource(ResourceIdentifier id) + /// Returns a object. + public virtual WorkloadNetworkGatewayResource GetWorkloadNetworkGatewayResource(ResourceIdentifier id) { - AvsPrivateCloudAddonResource.ValidateResourceId(id); - return new AvsPrivateCloudAddonResource(Client, id); + WorkloadNetworkGatewayResource.ValidateResourceId(id); + return new WorkloadNetworkGatewayResource(Client, id); } /// - /// Gets an object representing an along with the instance operations that can be performed on it but with no data. - /// You can use to create an from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// The resource ID of the resource to get. - /// Returns a object. - public virtual AvsPrivateCloudClusterVirtualMachineResource GetAvsPrivateCloudClusterVirtualMachineResource(ResourceIdentifier id) + /// Returns a object. + public virtual WorkloadNetworkPortMirroringProfileResource GetWorkloadNetworkPortMirroringProfileResource(ResourceIdentifier id) { - AvsPrivateCloudClusterVirtualMachineResource.ValidateResourceId(id); - return new AvsPrivateCloudClusterVirtualMachineResource(Client, id); + WorkloadNetworkPortMirroringProfileResource.ValidateResourceId(id); + return new WorkloadNetworkPortMirroringProfileResource(Client, id); } /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// The resource ID of the resource to get. - /// Returns a object. - public virtual PlacementPolicyResource GetPlacementPolicyResource(ResourceIdentifier id) + /// Returns a object. + public virtual WorkloadNetworkPublicIPResource GetWorkloadNetworkPublicIPResource(ResourceIdentifier id) { - PlacementPolicyResource.ValidateResourceId(id); - return new PlacementPolicyResource(Client, id); + WorkloadNetworkPublicIPResource.ValidateResourceId(id); + return new WorkloadNetworkPublicIPResource(Client, id); } /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// The resource ID of the resource to get. - /// Returns a object. - public virtual ScriptPackageResource GetScriptPackageResource(ResourceIdentifier id) + /// Returns a object. + public virtual WorkloadNetworkSegmentResource GetWorkloadNetworkSegmentResource(ResourceIdentifier id) { - ScriptPackageResource.ValidateResourceId(id); - return new ScriptPackageResource(Client, id); + WorkloadNetworkSegmentResource.ValidateResourceId(id); + return new WorkloadNetworkSegmentResource(Client, id); } /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// The resource ID of the resource to get. - /// Returns a object. - public virtual ScriptCmdletResource GetScriptCmdletResource(ResourceIdentifier id) + /// Returns a object. + public virtual WorkloadNetworkVirtualMachineResource GetWorkloadNetworkVirtualMachineResource(ResourceIdentifier id) { - ScriptCmdletResource.ValidateResourceId(id); - return new ScriptCmdletResource(Client, id); + WorkloadNetworkVirtualMachineResource.ValidateResourceId(id); + return new WorkloadNetworkVirtualMachineResource(Client, id); } /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// The resource ID of the resource to get. - /// Returns a object. - public virtual ScriptExecutionResource GetScriptExecutionResource(ResourceIdentifier id) + /// Returns a object. + public virtual WorkloadNetworkVmGroupResource GetWorkloadNetworkVmGroupResource(ResourceIdentifier id) { - ScriptExecutionResource.ValidateResourceId(id); - return new ScriptExecutionResource(Client, id); + WorkloadNetworkVmGroupResource.ValidateResourceId(id); + return new WorkloadNetworkVmGroupResource(Client, id); } } } diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Extensions/MockableAvsResourceGroupResource.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Extensions/MockableAvsResourceGroupResource.cs index bdd8a6252570..13641e496b0f 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Extensions/MockableAvsResourceGroupResource.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Extensions/MockableAvsResourceGroupResource.cs @@ -41,7 +41,7 @@ public virtual AvsPrivateCloudCollection GetAvsPrivateClouds() } /// - /// Get a private cloud + /// Get a PrivateCloud /// /// /// Request Path @@ -53,7 +53,7 @@ public virtual AvsPrivateCloudCollection GetAvsPrivateClouds() /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -72,7 +72,7 @@ public virtual async Task> GetAvsPrivateCloudA } /// - /// Get a private cloud + /// Get a PrivateCloud /// /// /// Request Path @@ -84,7 +84,7 @@ public virtual async Task> GetAvsPrivateCloudA /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Extensions/MockableAvsSubscriptionResource.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Extensions/MockableAvsSubscriptionResource.cs index 08c2a8bda6ec..343d2169e16b 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Extensions/MockableAvsSubscriptionResource.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Extensions/MockableAvsSubscriptionResource.cs @@ -47,32 +47,31 @@ private string GetApiVersionOrNull(ResourceType resourceType) } /// - /// Return trial status for subscription by region + /// Return quota for subscription by region /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.AVS/locations/{location}/checkTrialAvailability + /// /subscriptions/{subscriptionId}/providers/Microsoft.AVS/locations/{location}/checkQuotaAvailability /// /// /// Operation Id - /// Locations_CheckTrialAvailability + /// Locations_CheckQuotaAvailability /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// - /// Azure region. - /// The sku to check for trial availability. + /// The name of the Azure region. /// The cancellation token to use. - public virtual async Task> CheckAvsTrialAvailabilityAsync(AzureLocation location, AvsSku sku = null, CancellationToken cancellationToken = default) + public virtual async Task> CheckAvsQuotaAvailabilityAsync(AzureLocation location, CancellationToken cancellationToken = default) { - using var scope = LocationsClientDiagnostics.CreateScope("MockableAvsSubscriptionResource.CheckAvsTrialAvailability"); + using var scope = LocationsClientDiagnostics.CreateScope("MockableAvsSubscriptionResource.CheckAvsQuotaAvailability"); scope.Start(); try { - var response = await LocationsRestClient.CheckTrialAvailabilityAsync(Id.SubscriptionId, location, sku, cancellationToken).ConfigureAwait(false); + var response = await LocationsRestClient.CheckQuotaAvailabilityAsync(Id.SubscriptionId, location, cancellationToken).ConfigureAwait(false); return response; } catch (Exception e) @@ -83,32 +82,31 @@ public virtual async Task> Chec } /// - /// Return trial status for subscription by region + /// Return quota for subscription by region /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.AVS/locations/{location}/checkTrialAvailability + /// /subscriptions/{subscriptionId}/providers/Microsoft.AVS/locations/{location}/checkQuotaAvailability /// /// /// Operation Id - /// Locations_CheckTrialAvailability + /// Locations_CheckQuotaAvailability /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// - /// Azure region. - /// The sku to check for trial availability. + /// The name of the Azure region. /// The cancellation token to use. - public virtual Response CheckAvsTrialAvailability(AzureLocation location, AvsSku sku = null, CancellationToken cancellationToken = default) + public virtual Response CheckAvsQuotaAvailability(AzureLocation location, CancellationToken cancellationToken = default) { - using var scope = LocationsClientDiagnostics.CreateScope("MockableAvsSubscriptionResource.CheckAvsTrialAvailability"); + using var scope = LocationsClientDiagnostics.CreateScope("MockableAvsSubscriptionResource.CheckAvsQuotaAvailability"); scope.Start(); try { - var response = LocationsRestClient.CheckTrialAvailability(Id.SubscriptionId, location, sku, cancellationToken); + var response = LocationsRestClient.CheckQuotaAvailability(Id.SubscriptionId, location, cancellationToken); return response; } catch (Exception e) @@ -119,31 +117,32 @@ public virtual Response CheckAvsTrialAva } /// - /// Return quota for subscription by region + /// Return trial status for subscription by region /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.AVS/locations/{location}/checkQuotaAvailability + /// /subscriptions/{subscriptionId}/providers/Microsoft.AVS/locations/{location}/checkTrialAvailability /// /// /// Operation Id - /// Locations_CheckQuotaAvailability + /// Locations_CheckTrialAvailability /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// - /// Azure region. + /// The name of the Azure region. + /// Optionally, check for a specific SKU. /// The cancellation token to use. - public virtual async Task> CheckAvsQuotaAvailabilityAsync(AzureLocation location, CancellationToken cancellationToken = default) + public virtual async Task> CheckAvsTrialAvailabilityAsync(AzureLocation location, AvsSku sku = null, CancellationToken cancellationToken = default) { - using var scope = LocationsClientDiagnostics.CreateScope("MockableAvsSubscriptionResource.CheckAvsQuotaAvailability"); + using var scope = LocationsClientDiagnostics.CreateScope("MockableAvsSubscriptionResource.CheckAvsTrialAvailability"); scope.Start(); try { - var response = await LocationsRestClient.CheckQuotaAvailabilityAsync(Id.SubscriptionId, location, cancellationToken).ConfigureAwait(false); + var response = await LocationsRestClient.CheckTrialAvailabilityAsync(Id.SubscriptionId, location, sku, cancellationToken).ConfigureAwait(false); return response; } catch (Exception e) @@ -154,31 +153,32 @@ public virtual async Task> Chec } /// - /// Return quota for subscription by region + /// Return trial status for subscription by region /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.AVS/locations/{location}/checkQuotaAvailability + /// /subscriptions/{subscriptionId}/providers/Microsoft.AVS/locations/{location}/checkTrialAvailability /// /// /// Operation Id - /// Locations_CheckQuotaAvailability + /// Locations_CheckTrialAvailability /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// - /// Azure region. + /// The name of the Azure region. + /// Optionally, check for a specific SKU. /// The cancellation token to use. - public virtual Response CheckAvsQuotaAvailability(AzureLocation location, CancellationToken cancellationToken = default) + public virtual Response CheckAvsTrialAvailability(AzureLocation location, AvsSku sku = null, CancellationToken cancellationToken = default) { - using var scope = LocationsClientDiagnostics.CreateScope("MockableAvsSubscriptionResource.CheckAvsQuotaAvailability"); + using var scope = LocationsClientDiagnostics.CreateScope("MockableAvsSubscriptionResource.CheckAvsTrialAvailability"); scope.Start(); try { - var response = LocationsRestClient.CheckQuotaAvailability(Id.SubscriptionId, location, cancellationToken); + var response = LocationsRestClient.CheckTrialAvailability(Id.SubscriptionId, location, sku, cancellationToken); return response; } catch (Exception e) @@ -189,7 +189,7 @@ public virtual Response CheckAvsQuotaAva } /// - /// List private clouds in a subscription + /// List PrivateCloud resources by subscription ID /// /// /// Request Path @@ -201,7 +201,7 @@ public virtual Response CheckAvsQuotaAva /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -219,7 +219,7 @@ public virtual AsyncPageable GetAvsPrivateCloudsAsync(C } /// - /// List private clouds in a subscription + /// List PrivateCloud resources by subscription ID /// /// /// Request Path @@ -231,7 +231,7 @@ public virtual AsyncPageable GetAvsPrivateCloudsAsync(C /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/GlobalReachConnectionCollection.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/GlobalReachConnectionCollection.cs index 37a9db8a602d..236924e4f6fa 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/GlobalReachConnectionCollection.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/GlobalReachConnectionCollection.cs @@ -52,7 +52,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) } /// - /// Create or update a global reach connection in a private cloud + /// Create a GlobalReachConnection /// /// /// Request Path @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -73,8 +73,8 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Name of the global reach connection in the private cloud. - /// A global reach connection in the private cloud. + /// Name of the global reach connection. + /// Resource create parameters. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// or is null. @@ -88,7 +88,7 @@ public virtual async Task> CreateOrU try { var response = await _globalReachConnectionRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, globalReachConnectionName, data, cancellationToken).ConfigureAwait(false); - var operation = new AvsArmOperation(new GlobalReachConnectionOperationSource(Client), _globalReachConnectionClientDiagnostics, Pipeline, _globalReachConnectionRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, globalReachConnectionName, data).Request, response, OperationFinalStateVia.Location); + var operation = new AvsArmOperation(new GlobalReachConnectionOperationSource(Client), _globalReachConnectionClientDiagnostics, Pipeline, _globalReachConnectionRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, globalReachConnectionName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -101,7 +101,7 @@ public virtual async Task> CreateOrU } /// - /// Create or update a global reach connection in a private cloud + /// Create a GlobalReachConnection /// /// /// Request Path @@ -113,7 +113,7 @@ public virtual async Task> CreateOrU /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -122,8 +122,8 @@ public virtual async Task> CreateOrU /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Name of the global reach connection in the private cloud. - /// A global reach connection in the private cloud. + /// Name of the global reach connection. + /// Resource create parameters. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// or is null. @@ -137,7 +137,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUn try { var response = _globalReachConnectionRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, globalReachConnectionName, data, cancellationToken); - var operation = new AvsArmOperation(new GlobalReachConnectionOperationSource(Client), _globalReachConnectionClientDiagnostics, Pipeline, _globalReachConnectionRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, globalReachConnectionName, data).Request, response, OperationFinalStateVia.Location); + var operation = new AvsArmOperation(new GlobalReachConnectionOperationSource(Client), _globalReachConnectionClientDiagnostics, Pipeline, _globalReachConnectionRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, globalReachConnectionName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -150,7 +150,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUn } /// - /// Get a global reach connection by name in a private cloud + /// Get a GlobalReachConnection /// /// /// Request Path @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUn /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -170,7 +170,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUn /// /// /// - /// Name of the global reach connection in the private cloud. + /// Name of the global reach connection. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -195,7 +195,7 @@ public virtual async Task> GetAsync(stri } /// - /// Get a global reach connection by name in a private cloud + /// Get a GlobalReachConnection /// /// /// Request Path @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(stri /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -215,7 +215,7 @@ public virtual async Task> GetAsync(stri /// /// /// - /// Name of the global reach connection in the private cloud. + /// Name of the global reach connection. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -240,7 +240,7 @@ public virtual Response Get(string globalReachCon } /// - /// List global reach connections in a private cloud + /// List GlobalReachConnection resources by PrivateCloud /// /// /// Request Path @@ -252,7 +252,7 @@ public virtual Response Get(string globalReachCon /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -270,7 +270,7 @@ public virtual AsyncPageable GetAllAsync(Cancella } /// - /// List global reach connections in a private cloud + /// List GlobalReachConnection resources by PrivateCloud /// /// /// Request Path @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(Cancella /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -320,7 +320,7 @@ public virtual Pageable GetAll(CancellationToken /// /// /// - /// Name of the global reach connection in the private cloud. + /// Name of the global reach connection. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string globalReachConnecti /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -363,7 +363,7 @@ public virtual async Task> ExistsAsync(string globalReachConnecti /// /// /// - /// Name of the global reach connection in the private cloud. + /// Name of the global reach connection. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -398,7 +398,7 @@ public virtual Response Exists(string globalReachConnectionName, Cancellat /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -406,7 +406,7 @@ public virtual Response Exists(string globalReachConnectionName, Cancellat /// /// /// - /// Name of the global reach connection in the private cloud. + /// Name of the global reach connection. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -443,7 +443,7 @@ public virtual async Task> GetIf /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -451,7 +451,7 @@ public virtual async Task> GetIf /// /// /// - /// Name of the global reach connection in the private cloud. + /// Name of the global reach connection. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/GlobalReachConnectionData.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/GlobalReachConnectionData.cs index 5af108250532..d2053e09b5a5 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/GlobalReachConnectionData.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/GlobalReachConnectionData.cs @@ -62,11 +62,23 @@ public GlobalReachConnectionData() /// The resourceType. /// The systemData. /// The state of the ExpressRoute Circuit Authorization provisioning. - /// The network used for global reach carved out from the original network block provided for the private cloud. - /// Authorization key from the peer express route used for the global reach connection. + /// + /// The network used for global reach carved out from the original network block + /// provided for the private cloud + /// + /// + /// Authorization key from the peer express route used for the global reach + /// connection + /// /// The connection status of the global reach connection. - /// Identifier of the ExpressRoute Circuit to peer with in the global reach connection. - /// The ID of the Private Cloud's ExpressRoute Circuit that is participating in the global reach connection. + /// + /// Identifier of the ExpressRoute Circuit to peer with in the global reach + /// connection + /// + /// + /// The ID of the Private Cloud's ExpressRoute Circuit that is participating in the + /// global reach connection + /// /// Keeps track of any properties unknown to the library. internal GlobalReachConnectionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, GlobalReachConnectionProvisioningState? provisioningState, string addressPrefix, string authorizationKey, GlobalReachConnectionStatus? circuitConnectionStatus, ResourceIdentifier peerExpressRouteCircuit, ResourceIdentifier expressRouteId, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { @@ -81,15 +93,27 @@ internal GlobalReachConnectionData(ResourceIdentifier id, string name, ResourceT /// The state of the ExpressRoute Circuit Authorization provisioning. public GlobalReachConnectionProvisioningState? ProvisioningState { get; } - /// The network used for global reach carved out from the original network block provided for the private cloud. + /// + /// The network used for global reach carved out from the original network block + /// provided for the private cloud + /// public string AddressPrefix { get; } - /// Authorization key from the peer express route used for the global reach connection. + /// + /// Authorization key from the peer express route used for the global reach + /// connection + /// public string AuthorizationKey { get; set; } /// The connection status of the global reach connection. public GlobalReachConnectionStatus? CircuitConnectionStatus { get; } - /// Identifier of the ExpressRoute Circuit to peer with in the global reach connection. + /// + /// Identifier of the ExpressRoute Circuit to peer with in the global reach + /// connection + /// public ResourceIdentifier PeerExpressRouteCircuit { get; set; } - /// The ID of the Private Cloud's ExpressRoute Circuit that is participating in the global reach connection. + /// + /// The ID of the Private Cloud's ExpressRoute Circuit that is participating in the + /// global reach connection + /// public ResourceIdentifier ExpressRouteId { get; set; } } } diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/GlobalReachConnectionResource.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/GlobalReachConnectionResource.cs index d2ef8995ba9a..66f72b742510 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/GlobalReachConnectionResource.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/GlobalReachConnectionResource.cs @@ -89,7 +89,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) } /// - /// Get a global reach connection by name in a private cloud + /// Get a GlobalReachConnection /// /// /// Request Path @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -129,7 +129,7 @@ public virtual async Task> GetAsync(Canc } /// - /// Get a global reach connection by name in a private cloud + /// Get a GlobalReachConnection /// /// /// Request Path @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Canc /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -169,7 +169,7 @@ public virtual Response Get(CancellationToken can } /// - /// Delete a global reach connection in a private cloud + /// Delete a GlobalReachConnection /// /// /// Request Path @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken can /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell } /// - /// Delete a global reach connection in a private cloud + /// Delete a GlobalReachConnection /// /// /// Request Path @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel } /// - /// Create or update a global reach connection in a private cloud + /// Create a GlobalReachConnection /// /// /// Request Path @@ -265,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -274,7 +274,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// A global reach connection in the private cloud. + /// Resource create parameters. /// The cancellation token to use. /// is null. public virtual async Task> UpdateAsync(WaitUntil waitUntil, GlobalReachConnectionData data, CancellationToken cancellationToken = default) @@ -286,7 +286,7 @@ public virtual async Task> UpdateAsy try { var response = await _globalReachConnectionRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); - var operation = new AvsArmOperation(new GlobalReachConnectionOperationSource(Client), _globalReachConnectionClientDiagnostics, Pipeline, _globalReachConnectionRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + var operation = new AvsArmOperation(new GlobalReachConnectionOperationSource(Client), _globalReachConnectionClientDiagnostics, Pipeline, _globalReachConnectionRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -299,7 +299,7 @@ public virtual async Task> UpdateAsy } /// - /// Create or update a global reach connection in a private cloud + /// Create a GlobalReachConnection /// /// /// Request Path @@ -311,7 +311,7 @@ public virtual async Task> UpdateAsy /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -320,7 +320,7 @@ public virtual async Task> UpdateAsy /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// A global reach connection in the private cloud. + /// Resource create parameters. /// The cancellation token to use. /// is null. public virtual ArmOperation Update(WaitUntil waitUntil, GlobalReachConnectionData data, CancellationToken cancellationToken = default) @@ -332,7 +332,7 @@ public virtual ArmOperation Update(WaitUntil wait try { var response = _globalReachConnectionRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); - var operation = new AvsArmOperation(new GlobalReachConnectionOperationSource(Client), _globalReachConnectionClientDiagnostics, Pipeline, _globalReachConnectionRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + var operation = new AvsArmOperation(new GlobalReachConnectionOperationSource(Client), _globalReachConnectionClientDiagnostics, Pipeline, _globalReachConnectionRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/HcxEnterpriseSiteCollection.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/HcxEnterpriseSiteCollection.cs index fbf67e57025c..5416b3e25775 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/HcxEnterpriseSiteCollection.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/HcxEnterpriseSiteCollection.cs @@ -52,7 +52,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) } /// - /// Create or update an activation key for on-premises HCX site + /// Create a HcxEnterpriseSite /// /// /// Request Path @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -73,8 +73,8 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Name of the HCX Enterprise Site in the private cloud. - /// The HCX Enterprise Site. + /// Name of the HCX Enterprise Site. + /// Resource create parameters. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// or is null. @@ -103,7 +103,7 @@ public virtual async Task> CreateOrUpdat } /// - /// Create or update an activation key for on-premises HCX site + /// Create a HcxEnterpriseSite /// /// /// Request Path @@ -115,7 +115,7 @@ public virtual async Task> CreateOrUpdat /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -124,8 +124,8 @@ public virtual async Task> CreateOrUpdat /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Name of the HCX Enterprise Site in the private cloud. - /// The HCX Enterprise Site. + /// Name of the HCX Enterprise Site. + /// Resource create parameters. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// or is null. @@ -154,7 +154,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil } /// - /// Get an HCX on-premises key by name in a private cloud + /// Get a HcxEnterpriseSite /// /// /// Request Path @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -174,7 +174,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// /// /// - /// Name of the HCX Enterprise Site in the private cloud. + /// Name of the HCX Enterprise Site. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -199,7 +199,7 @@ public virtual async Task> GetAsync(string h } /// - /// Get an HCX on-premises key by name in a private cloud + /// Get a HcxEnterpriseSite /// /// /// Request Path @@ -211,7 +211,7 @@ public virtual async Task> GetAsync(string h /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -219,7 +219,7 @@ public virtual async Task> GetAsync(string h /// /// /// - /// Name of the HCX Enterprise Site in the private cloud. + /// Name of the HCX Enterprise Site. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -244,7 +244,7 @@ public virtual Response Get(string hcxEnterpriseSiteN } /// - /// List HCX on-premises key in a private cloud + /// List HcxEnterpriseSite resources by PrivateCloud /// /// /// Request Path @@ -256,7 +256,7 @@ public virtual Response Get(string hcxEnterpriseSiteN /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -274,7 +274,7 @@ public virtual AsyncPageable GetAllAsync(Cancellation } /// - /// List HCX on-premises key in a private cloud + /// List HcxEnterpriseSite resources by PrivateCloud /// /// /// Request Path @@ -286,7 +286,7 @@ public virtual AsyncPageable GetAllAsync(Cancellation /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -316,7 +316,7 @@ public virtual Pageable GetAll(CancellationToken canc /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -324,7 +324,7 @@ public virtual Pageable GetAll(CancellationToken canc /// /// /// - /// Name of the HCX Enterprise Site in the private cloud. + /// Name of the HCX Enterprise Site. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string hcxEnterpriseSiteNa /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -367,7 +367,7 @@ public virtual async Task> ExistsAsync(string hcxEnterpriseSiteNa /// /// /// - /// Name of the HCX Enterprise Site in the private cloud. + /// Name of the HCX Enterprise Site. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -402,7 +402,7 @@ public virtual Response Exists(string hcxEnterpriseSiteName, CancellationT /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -410,7 +410,7 @@ public virtual Response Exists(string hcxEnterpriseSiteName, CancellationT /// /// /// - /// Name of the HCX Enterprise Site in the private cloud. + /// Name of the HCX Enterprise Site. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -447,7 +447,7 @@ public virtual async Task> GetIfExis /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -455,7 +455,7 @@ public virtual async Task> GetIfExis /// /// /// - /// Name of the HCX Enterprise Site in the private cloud. + /// Name of the HCX Enterprise Site. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/HcxEnterpriseSiteData.Serialization.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/HcxEnterpriseSiteData.Serialization.cs index e4eca14582f4..a81eaec8d2d4 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/HcxEnterpriseSiteData.Serialization.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/HcxEnterpriseSiteData.Serialization.cs @@ -39,6 +39,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } if (options.Format != "W" && Optional.IsDefined(ActivationKey)) { writer.WritePropertyName("activationKey"u8); @@ -76,6 +81,7 @@ internal static HcxEnterpriseSiteData DeserializeHcxEnterpriseSiteData(JsonEleme string name = default; ResourceType type = default; SystemData systemData = default; + HcxEnterpriseSiteProvisioningState? provisioningState = default; string activationKey = default; HcxEnterpriseSiteStatus? status = default; IDictionary serializedAdditionalRawData = default; @@ -115,6 +121,15 @@ internal static HcxEnterpriseSiteData DeserializeHcxEnterpriseSiteData(JsonEleme } foreach (var property0 in property.Value.EnumerateObject()) { + if (property0.NameEquals("provisioningState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new HcxEnterpriseSiteProvisioningState(property0.Value.GetString()); + continue; + } if (property0.NameEquals("activationKey"u8)) { activationKey = property0.Value.GetString(); @@ -143,6 +158,7 @@ internal static HcxEnterpriseSiteData DeserializeHcxEnterpriseSiteData(JsonEleme name, type, systemData, + provisioningState, activationKey, status, serializedAdditionalRawData); diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/HcxEnterpriseSiteData.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/HcxEnterpriseSiteData.cs index 153277f4a592..9bdb7f093ba6 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/HcxEnterpriseSiteData.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/HcxEnterpriseSiteData.cs @@ -61,16 +61,20 @@ public HcxEnterpriseSiteData() /// The name. /// The resourceType. /// The systemData. + /// The provisioning state of the resource. /// The activation key. /// The status of the HCX Enterprise Site. /// Keeps track of any properties unknown to the library. - internal HcxEnterpriseSiteData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string activationKey, HcxEnterpriseSiteStatus? status, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal HcxEnterpriseSiteData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, HcxEnterpriseSiteProvisioningState? provisioningState, string activationKey, HcxEnterpriseSiteStatus? status, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { + ProvisioningState = provisioningState; ActivationKey = activationKey; Status = status; _serializedAdditionalRawData = serializedAdditionalRawData; } + /// The provisioning state of the resource. + public HcxEnterpriseSiteProvisioningState? ProvisioningState { get; } /// The activation key. public string ActivationKey { get; } /// The status of the HCX Enterprise Site. diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/HcxEnterpriseSiteResource.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/HcxEnterpriseSiteResource.cs index ae5003bb5cca..1de9641912c0 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/HcxEnterpriseSiteResource.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/HcxEnterpriseSiteResource.cs @@ -89,7 +89,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) } /// - /// Get an HCX on-premises key by name in a private cloud + /// Get a HcxEnterpriseSite /// /// /// Request Path @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -129,7 +129,7 @@ public virtual async Task> GetAsync(Cancella } /// - /// Get an HCX on-premises key by name in a private cloud + /// Get a HcxEnterpriseSite /// /// /// Request Path @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Cancella /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -169,7 +169,7 @@ public virtual Response Get(CancellationToken cancell } /// - /// Delete HCX on-premises key in a private cloud + /// Delete a HcxEnterpriseSite /// /// /// Request Path @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken cancell /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -213,7 +213,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell } /// - /// Delete HCX on-premises key in a private cloud + /// Delete a HcxEnterpriseSite /// /// /// Request Path @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel } /// - /// Create or update an activation key for on-premises HCX site + /// Create a HcxEnterpriseSite /// /// /// Request Path @@ -269,7 +269,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -278,7 +278,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The HCX Enterprise Site. + /// Resource create parameters. /// The cancellation token to use. /// is null. public virtual async Task> UpdateAsync(WaitUntil waitUntil, HcxEnterpriseSiteData data, CancellationToken cancellationToken = default) @@ -305,7 +305,7 @@ public virtual async Task> UpdateAsync(W } /// - /// Create or update an activation key for on-premises HCX site + /// Create a HcxEnterpriseSite /// /// /// Request Path @@ -317,7 +317,7 @@ public virtual async Task> UpdateAsync(W /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -326,7 +326,7 @@ public virtual async Task> UpdateAsync(W /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The HCX Enterprise Site. + /// Resource create parameters. /// The cancellation token to use. /// is null. public virtual ArmOperation Update(WaitUntil waitUntil, HcxEnterpriseSiteData data, CancellationToken cancellationToken = default) diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/IscsiPathData.Serialization.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/IscsiPathData.Serialization.cs new file mode 100644 index 000000000000..69e2507235ad --- /dev/null +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/IscsiPathData.Serialization.cs @@ -0,0 +1,182 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Avs.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.Avs +{ + public partial class IscsiPathData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(IscsiPathData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (Optional.IsDefined(NetworkBlock)) + { + writer.WritePropertyName("networkBlock"u8); + writer.WriteStringValue(NetworkBlock); + } + writer.WriteEndObject(); + } + + IscsiPathData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(IscsiPathData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeIscsiPathData(document.RootElement, options); + } + + internal static IscsiPathData DeserializeIscsiPathData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IscsiPathProvisioningState? provisioningState = default; + string networkBlock = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("provisioningState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new IscsiPathProvisioningState(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("networkBlock"u8)) + { + networkBlock = property0.Value.GetString(); + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new IscsiPathData( + id, + name, + type, + systemData, + provisioningState, + networkBlock, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(IscsiPathData)} does not support writing '{options.Format}' format."); + } + } + + IscsiPathData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeIscsiPathData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(IscsiPathData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/IscsiPathData.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/IscsiPathData.cs new file mode 100644 index 000000000000..61250670f48d --- /dev/null +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/IscsiPathData.cs @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Avs.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.Avs +{ + /// + /// A class representing the IscsiPath data model. + /// An iSCSI path resource + /// + public partial class IscsiPathData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public IscsiPathData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The state of the iSCSI path provisioning. + /// CIDR Block for iSCSI path. + /// Keeps track of any properties unknown to the library. + internal IscsiPathData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IscsiPathProvisioningState? provisioningState, string networkBlock, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + ProvisioningState = provisioningState; + NetworkBlock = networkBlock; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The state of the iSCSI path provisioning. + public IscsiPathProvisioningState? ProvisioningState { get; } + /// CIDR Block for iSCSI path. + public string NetworkBlock { get; set; } + } +} diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/IscsiPathResource.Serialization.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/IscsiPathResource.Serialization.cs new file mode 100644 index 000000000000..7ed94437893e --- /dev/null +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/IscsiPathResource.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.Avs +{ + public partial class IscsiPathResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + IscsiPathData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + IscsiPathData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/IscsiPathResource.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/IscsiPathResource.cs new file mode 100644 index 000000000000..53542ba61ee6 --- /dev/null +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/IscsiPathResource.cs @@ -0,0 +1,346 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.Avs +{ + /// + /// A Class representing an IscsiPath along with the instance operations that can be performed on it. + /// If you have a you can construct an + /// from an instance of using the GetIscsiPathResource method. + /// Otherwise you can get one from its parent resource using the GetIscsiPath method. + /// + public partial class IscsiPathResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The privateCloudName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string privateCloudName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/iscsiPaths/default"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _iscsiPathClientDiagnostics; + private readonly IscsiPathsRestOperations _iscsiPathRestClient; + private readonly IscsiPathData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.AVS/privateClouds/iscsiPaths"; + + /// Initializes a new instance of the class for mocking. + protected IscsiPathResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal IscsiPathResource(ArmClient client, IscsiPathData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal IscsiPathResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _iscsiPathClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Avs", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string iscsiPathApiVersion); + _iscsiPathRestClient = new IscsiPathsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, iscsiPathApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual IscsiPathData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Get a IscsiPath + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/iscsiPaths/default + /// + /// + /// Operation Id + /// IscsiPaths_Get + /// + /// + /// Default Api Version + /// 2023-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _iscsiPathClientDiagnostics.CreateScope("IscsiPathResource.Get"); + scope.Start(); + try + { + var response = await _iscsiPathRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new IscsiPathResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a IscsiPath + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/iscsiPaths/default + /// + /// + /// Operation Id + /// IscsiPaths_Get + /// + /// + /// Default Api Version + /// 2023-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _iscsiPathClientDiagnostics.CreateScope("IscsiPathResource.Get"); + scope.Start(); + try + { + var response = _iscsiPathRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new IscsiPathResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a IscsiPath + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/iscsiPaths/default + /// + /// + /// Operation Id + /// IscsiPaths_Delete + /// + /// + /// Default Api Version + /// 2023-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _iscsiPathClientDiagnostics.CreateScope("IscsiPathResource.Delete"); + scope.Start(); + try + { + var response = await _iscsiPathRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, cancellationToken).ConfigureAwait(false); + var operation = new AvsArmOperation(_iscsiPathClientDiagnostics, Pipeline, _iscsiPathRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a IscsiPath + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/iscsiPaths/default + /// + /// + /// Operation Id + /// IscsiPaths_Delete + /// + /// + /// Default Api Version + /// 2023-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _iscsiPathClientDiagnostics.CreateScope("IscsiPathResource.Delete"); + scope.Start(); + try + { + var response = _iscsiPathRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, cancellationToken); + var operation = new AvsArmOperation(_iscsiPathClientDiagnostics, Pipeline, _iscsiPathRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create a IscsiPath + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/iscsiPaths/default + /// + /// + /// Operation Id + /// IscsiPaths_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2023-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Resource create parameters. + /// The cancellation token to use. + /// is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, IscsiPathData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _iscsiPathClientDiagnostics.CreateScope("IscsiPathResource.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _iscsiPathRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new AvsArmOperation(new IscsiPathOperationSource(Client), _iscsiPathClientDiagnostics, Pipeline, _iscsiPathRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create a IscsiPath + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/iscsiPaths/default + /// + /// + /// Operation Id + /// IscsiPaths_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2023-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Resource create parameters. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, IscsiPathData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _iscsiPathClientDiagnostics.CreateScope("IscsiPathResource.CreateOrUpdate"); + scope.Start(); + try + { + var response = _iscsiPathRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, data, cancellationToken); + var operation = new AvsArmOperation(new IscsiPathOperationSource(Client), _iscsiPathClientDiagnostics, Pipeline, _iscsiPathRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/LongRunningOperation/IscsiPathOperationSource.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/LongRunningOperation/IscsiPathOperationSource.cs new file mode 100644 index 000000000000..8e114a3cd5ba --- /dev/null +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/LongRunningOperation/IscsiPathOperationSource.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.Avs +{ + internal class IscsiPathOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal IscsiPathOperationSource(ArmClient client) + { + _client = client; + } + + IscsiPathResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = IscsiPathData.DeserializeIscsiPathData(document.RootElement); + return new IscsiPathResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = IscsiPathData.DeserializeIscsiPathData(document.RootElement); + return new IscsiPathResource(_client, data); + } + } +} diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AddonArcProperties.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AddonArcProperties.cs index 3608e93e19ec..8eb8b0c8d7c7 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AddonArcProperties.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AddonArcProperties.cs @@ -20,7 +20,7 @@ public AddonArcProperties() } /// Initializes a new instance of . - /// The type of private cloud addon. + /// Addon type. /// The state of the addon provisioning. /// Keeps track of any properties unknown to the library. /// The VMware vCenter resource ID. diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AddonHcxProperties.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AddonHcxProperties.cs index 99feda67fb9e..09b0bec3f4a0 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AddonHcxProperties.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AddonHcxProperties.cs @@ -25,7 +25,7 @@ public AddonHcxProperties(string offer) } /// Initializes a new instance of . - /// The type of private cloud addon. + /// Addon type. /// The state of the addon provisioning. /// Keeps track of any properties unknown to the library. /// The HCX offer, example VMware MaaS Cloud Provider (Enterprise). diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AddonList.Serialization.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AddonList.Serialization.cs index 3fb9c86c0669..7a39c914044d 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AddonList.Serialization.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AddonList.Serialization.cs @@ -34,20 +34,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(AddonList)} does not support writing '{format}' format."); } - if (options.Format != "W" && Optional.IsCollectionDefined(Value)) + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) { - writer.WritePropertyName("value"u8); - writer.WriteStartArray(); - foreach (var item in Value) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); + writer.WriteObjectValue(item, options); } - if (options.Format != "W" && Optional.IsDefined(NextLink)) + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); + writer.WriteStringValue(NextLink.AbsoluteUri); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -87,17 +84,13 @@ internal static AddonList DeserializeAddonList(JsonElement element, ModelReaderW return null; } IReadOnlyList value = default; - string nextLink = default; + Uri nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -108,7 +101,11 @@ internal static AddonList DeserializeAddonList(JsonElement element, ModelReaderW } if (property.NameEquals("nextLink"u8)) { - nextLink = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); continue; } if (options.Format != "W") @@ -117,7 +114,7 @@ internal static AddonList DeserializeAddonList(JsonElement element, ModelReaderW } } serializedAdditionalRawData = rawDataDictionary; - return new AddonList(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + return new AddonList(value, nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AddonList.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AddonList.cs index 1d9f507ffd21..32c35e075bc4 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AddonList.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AddonList.cs @@ -7,10 +7,11 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.ResourceManager.Avs.Models { - /// A paged list of addons. + /// The response of a Addon list operation. internal partial class AddonList { /// @@ -46,25 +47,34 @@ internal partial class AddonList private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal AddonList() + /// The Addon items on this page. + /// is null. + internal AddonList(IEnumerable value) { - Value = new ChangeTrackingList(); + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); } /// Initializes a new instance of . - /// The items on a page. - /// URL to get the next page if any. + /// The Addon items on this page. + /// The link to the next page of items. /// Keeps track of any properties unknown to the library. - internal AddonList(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal AddonList(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The items on a page. + /// Initializes a new instance of for deserialization. + internal AddonList() + { + } + + /// The Addon items on this page. public IReadOnlyList Value { get; } - /// URL to get the next page if any. - public string NextLink { get; } + /// The link to the next page of items. + public Uri NextLink { get; } } } diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AddonProvisioningState.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AddonProvisioningState.cs index d1b576a42b4b..525218c48435 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AddonProvisioningState.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AddonProvisioningState.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.Avs.Models { - /// The state of the addon provisioning. + /// Addon provisioning state. public readonly partial struct AddonProvisioningState : IEquatable { private readonly string _value; @@ -24,26 +24,26 @@ public AddonProvisioningState(string value) private const string SucceededValue = "Succeeded"; private const string FailedValue = "Failed"; + private const string CanceledValue = "Canceled"; private const string CancelledValue = "Cancelled"; private const string BuildingValue = "Building"; private const string DeletingValue = "Deleting"; private const string UpdatingValue = "Updating"; - private const string CanceledValue = "Canceled"; - /// Succeeded. + /// Resource has been created. public static AddonProvisioningState Succeeded { get; } = new AddonProvisioningState(SucceededValue); - /// Failed. + /// Resource creation failed. public static AddonProvisioningState Failed { get; } = new AddonProvisioningState(FailedValue); - /// Cancelled. + /// Resource creation was canceled. + public static AddonProvisioningState Canceled { get; } = new AddonProvisioningState(CanceledValue); + /// is cancelled. public static AddonProvisioningState Cancelled { get; } = new AddonProvisioningState(CancelledValue); - /// Building. + /// is building. public static AddonProvisioningState Building { get; } = new AddonProvisioningState(BuildingValue); - /// Deleting. + /// is deleting. public static AddonProvisioningState Deleting { get; } = new AddonProvisioningState(DeletingValue); - /// Updating. + /// is updating. public static AddonProvisioningState Updating { get; } = new AddonProvisioningState(UpdatingValue); - /// Canceled. - public static AddonProvisioningState Canceled { get; } = new AddonProvisioningState(CanceledValue); /// Determines if two values are the same. public static bool operator ==(AddonProvisioningState left, AddonProvisioningState right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AddonSrmProperties.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AddonSrmProperties.cs index 45b0a43f7aab..9331bc185335 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AddonSrmProperties.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AddonSrmProperties.cs @@ -20,7 +20,7 @@ public AddonSrmProperties() } /// Initializes a new instance of . - /// The type of private cloud addon. + /// Addon type. /// The state of the addon provisioning. /// Keeps track of any properties unknown to the library. /// The Site Recovery Manager (SRM) license. diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AddonType.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AddonType.cs index 69f692edd73a..17d088db2021 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AddonType.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AddonType.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.Avs.Models { - /// The type of private cloud addon. + /// Addon type. internal readonly partial struct AddonType : IEquatable { private readonly string _value; diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AddonVrProperties.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AddonVrProperties.cs index f6656a33364f..a0c82111f008 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AddonVrProperties.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AddonVrProperties.cs @@ -22,7 +22,7 @@ public AddonVrProperties(int vrsCount) } /// Initializes a new instance of . - /// The type of private cloud addon. + /// Addon type. /// The state of the addon provisioning. /// Keeps track of any properties unknown to the library. /// The vSphere Replication Server (VRS) count. diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AvailabilityStrategy.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AvailabilityStrategy.cs index 1ba25d134ae5..6e075866b86e 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AvailabilityStrategy.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AvailabilityStrategy.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.Avs.Models { - /// The availability strategy for the private cloud. + /// Whether the private clouds is available in a single zone or two zones. public readonly partial struct AvailabilityStrategy : IEquatable { private readonly string _value; @@ -25,9 +25,9 @@ public AvailabilityStrategy(string value) private const string SingleZoneValue = "SingleZone"; private const string DualZoneValue = "DualZone"; - /// SingleZone. + /// in single zone. public static AvailabilityStrategy SingleZone { get; } = new AvailabilityStrategy(SingleZoneValue); - /// DualZone. + /// in two zones. public static AvailabilityStrategy DualZone { get; } = new AvailabilityStrategy(DualZoneValue); /// Determines if two values are the same. public static bool operator ==(AvailabilityStrategy left, AvailabilityStrategy right) => left.Equals(right); diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AvsCloudLinkProvisioningState.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AvsCloudLinkProvisioningState.cs new file mode 100644 index 000000000000..6a341ae91ef3 --- /dev/null +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AvsCloudLinkProvisioningState.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.Avs.Models +{ + /// cloud link provisioning state. + public readonly partial struct AvsCloudLinkProvisioningState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AvsCloudLinkProvisioningState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SucceededValue = "Succeeded"; + private const string FailedValue = "Failed"; + private const string CanceledValue = "Canceled"; + + /// Resource has been created. + public static AvsCloudLinkProvisioningState Succeeded { get; } = new AvsCloudLinkProvisioningState(SucceededValue); + /// Resource creation failed. + public static AvsCloudLinkProvisioningState Failed { get; } = new AvsCloudLinkProvisioningState(FailedValue); + /// Resource creation was canceled. + public static AvsCloudLinkProvisioningState Canceled { get; } = new AvsCloudLinkProvisioningState(CanceledValue); + /// Determines if two values are the same. + public static bool operator ==(AvsCloudLinkProvisioningState left, AvsCloudLinkProvisioningState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AvsCloudLinkProvisioningState left, AvsCloudLinkProvisioningState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator AvsCloudLinkProvisioningState(string value) => new AvsCloudLinkProvisioningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AvsCloudLinkProvisioningState other && Equals(other); + /// + public bool Equals(AvsCloudLinkProvisioningState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AvsCloudLinkStatus.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AvsCloudLinkStatus.cs index 98ef568c79d0..de548a1996f0 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AvsCloudLinkStatus.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AvsCloudLinkStatus.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.Avs.Models { - /// The state of the cloud link. + /// Cloud Link status. public readonly partial struct AvsCloudLinkStatus : IEquatable { private readonly string _value; @@ -28,15 +28,15 @@ public AvsCloudLinkStatus(string value) private const string FailedValue = "Failed"; private const string DisconnectedValue = "Disconnected"; - /// Active. + /// is active. public static AvsCloudLinkStatus Active { get; } = new AvsCloudLinkStatus(ActiveValue); - /// Building. + /// is building. public static AvsCloudLinkStatus Building { get; } = new AvsCloudLinkStatus(BuildingValue); - /// Deleting. + /// is deleting. public static AvsCloudLinkStatus Deleting { get; } = new AvsCloudLinkStatus(DeletingValue); - /// Failed. + /// is failed. public static AvsCloudLinkStatus Failed { get; } = new AvsCloudLinkStatus(FailedValue); - /// Disconnected. + /// is disconnected. public static AvsCloudLinkStatus Disconnected { get; } = new AvsCloudLinkStatus(DisconnectedValue); /// Determines if two values are the same. public static bool operator ==(AvsCloudLinkStatus left, AvsCloudLinkStatus right) => left.Equals(right); diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AvsDnsZoneType.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AvsDnsZoneType.cs new file mode 100644 index 000000000000..c9083ae684b5 --- /dev/null +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AvsDnsZoneType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.Avs.Models +{ + /// The type of DNS zone. + public readonly partial struct AvsDnsZoneType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AvsDnsZoneType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string PublicValue = "Public"; + private const string PrivateValue = "Private"; + + /// Primary DNS zone. + public static AvsDnsZoneType Public { get; } = new AvsDnsZoneType(PublicValue); + /// Private DNS zone. + public static AvsDnsZoneType Private { get; } = new AvsDnsZoneType(PrivateValue); + /// Determines if two values are the same. + public static bool operator ==(AvsDnsZoneType left, AvsDnsZoneType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AvsDnsZoneType left, AvsDnsZoneType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator AvsDnsZoneType(string value) => new AvsDnsZoneType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AvsDnsZoneType other && Equals(other); + /// + public bool Equals(AvsDnsZoneType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AvsEncryptionKeyStatus.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AvsEncryptionKeyStatus.cs index b6da3933fd33..65d683b8f346 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AvsEncryptionKeyStatus.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AvsEncryptionKeyStatus.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.Avs.Models { - /// The state of key provided. + /// Whether the the encryption key is connected or access denied. public readonly partial struct AvsEncryptionKeyStatus : IEquatable { private readonly string _value; @@ -25,9 +25,9 @@ public AvsEncryptionKeyStatus(string value) private const string ConnectedValue = "Connected"; private const string AccessDeniedValue = "AccessDenied"; - /// Connected. + /// is connected. public static AvsEncryptionKeyStatus Connected { get; } = new AvsEncryptionKeyStatus(ConnectedValue); - /// AccessDenied. + /// is access denied. public static AvsEncryptionKeyStatus AccessDenied { get; } = new AvsEncryptionKeyStatus(AccessDeniedValue); /// Determines if two values are the same. public static bool operator ==(AvsEncryptionKeyStatus left, AvsEncryptionKeyStatus right) => left.Equals(right); diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AvsEncryptionState.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AvsEncryptionState.cs index 3f5a6fc0f756..14825db6d4bd 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AvsEncryptionState.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AvsEncryptionState.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.Avs.Models { - /// Status of customer managed encryption key. + /// Whether encryption is enabled or disabled. public readonly partial struct AvsEncryptionState : IEquatable { private readonly string _value; @@ -25,9 +25,9 @@ public AvsEncryptionState(string value) private const string EnabledValue = "Enabled"; private const string DisabledValue = "Disabled"; - /// Enabled. + /// is enabled. public static AvsEncryptionState Enabled { get; } = new AvsEncryptionState(EnabledValue); - /// Disabled. + /// is disabled. public static AvsEncryptionState Disabled { get; } = new AvsEncryptionState(DisabledValue); /// Determines if two values are the same. public static bool operator ==(AvsEncryptionState left, AvsEncryptionState right) => left.Equals(right); diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AvsEncryptionVersionType.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AvsEncryptionVersionType.cs index 493359154066..73ed81140741 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AvsEncryptionVersionType.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AvsEncryptionVersionType.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.Avs.Models { - /// Property of the key if user provided or auto detected. + /// Whether the encryption version is fixed or auto-detected. public readonly partial struct AvsEncryptionVersionType : IEquatable { private readonly string _value; @@ -25,9 +25,9 @@ public AvsEncryptionVersionType(string value) private const string FixedValue = "Fixed"; private const string AutoDetectedValue = "AutoDetected"; - /// Fixed. + /// is fixed. public static AvsEncryptionVersionType Fixed { get; } = new AvsEncryptionVersionType(FixedValue); - /// AutoDetected. + /// is auto-detected. public static AvsEncryptionVersionType AutoDetected { get; } = new AvsEncryptionVersionType(AutoDetectedValue); /// Determines if two values are the same. public static bool operator ==(AvsEncryptionVersionType left, AvsEncryptionVersionType right) => left.Equals(right); diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AvsManagementCluster.Serialization.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AvsManagementCluster.Serialization.cs index 037ad2417753..eb94b06ee775 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AvsManagementCluster.Serialization.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AvsManagementCluster.Serialization.cs @@ -24,19 +24,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr writer.WriteEndObject(); } - /// The JSON writer. - /// The client options for reading and writing models. - protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(AvsManagementCluster)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - } - AvsManagementCluster IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -61,6 +48,7 @@ internal static AvsManagementCluster DeserializeAvsManagementCluster(JsonElement AvsPrivateCloudClusterProvisioningState? provisioningState = default; int? clusterId = default; IList hosts = default; + string vsanDatastoreName = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -106,13 +94,24 @@ internal static AvsManagementCluster DeserializeAvsManagementCluster(JsonElement hosts = array; continue; } + if (property.NameEquals("vsanDatastoreName"u8)) + { + vsanDatastoreName = property.Value.GetString(); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new AvsManagementCluster(clusterSize, provisioningState, clusterId, hosts ?? new ChangeTrackingList(), serializedAdditionalRawData); + return new AvsManagementCluster( + clusterSize, + provisioningState, + clusterId, + hosts ?? new ChangeTrackingList(), + vsanDatastoreName, + serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AvsManagementCluster.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AvsManagementCluster.cs index d68805dcffdc..2240ee04b204 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AvsManagementCluster.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AvsManagementCluster.cs @@ -11,11 +11,12 @@ namespace Azure.ResourceManager.Avs.Models { /// The properties of a management cluster. - public partial class AvsManagementCluster : CommonClusterProperties + public partial class AvsManagementCluster { /// Initializes a new instance of . public AvsManagementCluster() { + Hosts = new ChangeTrackingList(); } /// Initializes a new instance of . @@ -23,9 +24,18 @@ public AvsManagementCluster() /// The state of the cluster provisioning. /// The identity. /// The hosts. + /// Name of the vsan datastore associated with the cluster. /// Keeps track of any properties unknown to the library. - internal AvsManagementCluster(int? clusterSize, AvsPrivateCloudClusterProvisioningState? provisioningState, int? clusterId, IList hosts, IDictionary serializedAdditionalRawData) : base(clusterSize, provisioningState, clusterId, hosts, serializedAdditionalRawData) + internal AvsManagementCluster(int? clusterSize, AvsPrivateCloudClusterProvisioningState? provisioningState, int? clusterId, IList hosts, string vsanDatastoreName, IDictionary serializedAdditionalRawData) { + ClusterSize = clusterSize; + ProvisioningState = provisioningState; + ClusterId = clusterId; + Hosts = hosts; + VsanDatastoreName = vsanDatastoreName; + _serializedAdditionalRawData = serializedAdditionalRawData; } + /// Name of the vsan datastore associated with the cluster. + public string VsanDatastoreName { get; set; } } } diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AvsPlacementPolicyAffinityType.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AvsPlacementPolicyAffinityType.cs index dbe1674ce6b9..be6f8f514f8d 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AvsPlacementPolicyAffinityType.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AvsPlacementPolicyAffinityType.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.Avs.Models { - /// Placement policy affinity type. + /// Affinity type. public readonly partial struct AvsPlacementPolicyAffinityType : IEquatable { private readonly string _value; @@ -25,9 +25,9 @@ public AvsPlacementPolicyAffinityType(string value) private const string AffinityValue = "Affinity"; private const string AntiAffinityValue = "AntiAffinity"; - /// Affinity. + /// is affinity. public static AvsPlacementPolicyAffinityType Affinity { get; } = new AvsPlacementPolicyAffinityType(AffinityValue); - /// AntiAffinity. + /// is anti-affinity. public static AvsPlacementPolicyAffinityType AntiAffinity { get; } = new AvsPlacementPolicyAffinityType(AntiAffinityValue); /// Determines if two values are the same. public static bool operator ==(AvsPlacementPolicyAffinityType left, AvsPlacementPolicyAffinityType right) => left.Equals(right); diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AvsPrivateCloudAddonProperties.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AvsPrivateCloudAddonProperties.cs index 1dd3118732fd..586c832fb72e 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AvsPrivateCloudAddonProperties.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AvsPrivateCloudAddonProperties.cs @@ -55,7 +55,7 @@ protected AvsPrivateCloudAddonProperties() } /// Initializes a new instance of . - /// The type of private cloud addon. + /// Addon type. /// The state of the addon provisioning. /// Keeps track of any properties unknown to the library. internal AvsPrivateCloudAddonProperties(AddonType addonType, AddonProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) @@ -65,7 +65,7 @@ internal AvsPrivateCloudAddonProperties(AddonType addonType, AddonProvisioningSt _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The type of private cloud addon. + /// Addon type. internal AddonType AddonType { get; set; } /// The state of the addon provisioning. public AddonProvisioningState? ProvisioningState { get; } diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AvsPrivateCloudClusterPatch.Serialization.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AvsPrivateCloudClusterPatch.Serialization.cs index 1a36ceb962f2..7b4604209819 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AvsPrivateCloudClusterPatch.Serialization.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AvsPrivateCloudClusterPatch.Serialization.cs @@ -34,6 +34,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(AvsPrivateCloudClusterPatch)} does not support writing '{format}' format."); } + if (Optional.IsDefined(Sku)) + { + writer.WritePropertyName("sku"u8); + writer.WriteObjectValue(Sku, options); + } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(ClusterSize)) @@ -89,12 +94,22 @@ internal static AvsPrivateCloudClusterPatch DeserializeAvsPrivateCloudClusterPat { return null; } + AvsSku sku = default; int? clusterSize = default; IList hosts = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { + if (property.NameEquals("sku"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sku = AvsSku.DeserializeAvsSku(property.Value, options); + continue; + } if (property.NameEquals("properties"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -136,7 +151,7 @@ internal static AvsPrivateCloudClusterPatch DeserializeAvsPrivateCloudClusterPat } } serializedAdditionalRawData = rawDataDictionary; - return new AvsPrivateCloudClusterPatch(clusterSize, hosts ?? new ChangeTrackingList(), serializedAdditionalRawData); + return new AvsPrivateCloudClusterPatch(sku, clusterSize, hosts ?? new ChangeTrackingList(), serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AvsPrivateCloudClusterPatch.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AvsPrivateCloudClusterPatch.cs index 0c5a1c803ed2..7e0c78500168 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AvsPrivateCloudClusterPatch.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AvsPrivateCloudClusterPatch.cs @@ -52,16 +52,20 @@ public AvsPrivateCloudClusterPatch() } /// Initializes a new instance of . + /// The SKU (Stock Keeping Unit) assigned to this resource. /// The cluster size. /// The hosts. /// Keeps track of any properties unknown to the library. - internal AvsPrivateCloudClusterPatch(int? clusterSize, IList hosts, IDictionary serializedAdditionalRawData) + internal AvsPrivateCloudClusterPatch(AvsSku sku, int? clusterSize, IList hosts, IDictionary serializedAdditionalRawData) { + Sku = sku; ClusterSize = clusterSize; Hosts = hosts; _serializedAdditionalRawData = serializedAdditionalRawData; } + /// The SKU (Stock Keeping Unit) assigned to this resource. + public AvsSku Sku { get; set; } /// The cluster size. public int? ClusterSize { get; set; } /// The hosts. diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AvsPrivateCloudClusterProvisioningState.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AvsPrivateCloudClusterProvisioningState.cs index 2f22328d710f..bf506478fb1a 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AvsPrivateCloudClusterProvisioningState.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AvsPrivateCloudClusterProvisioningState.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.Avs.Models { - /// The state of the cluster provisioning. + /// Cluster provisioning state. public readonly partial struct AvsPrivateCloudClusterProvisioningState : IEquatable { private readonly string _value; @@ -24,23 +24,23 @@ public AvsPrivateCloudClusterProvisioningState(string value) private const string SucceededValue = "Succeeded"; private const string FailedValue = "Failed"; + private const string CanceledValue = "Canceled"; private const string CancelledValue = "Cancelled"; private const string DeletingValue = "Deleting"; private const string UpdatingValue = "Updating"; - private const string CanceledValue = "Canceled"; - /// Succeeded. + /// Resource has been created. public static AvsPrivateCloudClusterProvisioningState Succeeded { get; } = new AvsPrivateCloudClusterProvisioningState(SucceededValue); - /// Failed. + /// Resource creation failed. public static AvsPrivateCloudClusterProvisioningState Failed { get; } = new AvsPrivateCloudClusterProvisioningState(FailedValue); - /// Cancelled. + /// Resource creation was canceled. + public static AvsPrivateCloudClusterProvisioningState Canceled { get; } = new AvsPrivateCloudClusterProvisioningState(CanceledValue); + /// is cancelled. public static AvsPrivateCloudClusterProvisioningState Cancelled { get; } = new AvsPrivateCloudClusterProvisioningState(CancelledValue); - /// Deleting. + /// is deleting. public static AvsPrivateCloudClusterProvisioningState Deleting { get; } = new AvsPrivateCloudClusterProvisioningState(DeletingValue); - /// Updating. + /// is updating. public static AvsPrivateCloudClusterProvisioningState Updating { get; } = new AvsPrivateCloudClusterProvisioningState(UpdatingValue); - /// Canceled. - public static AvsPrivateCloudClusterProvisioningState Canceled { get; } = new AvsPrivateCloudClusterProvisioningState(CanceledValue); /// Determines if two values are the same. public static bool operator ==(AvsPrivateCloudClusterProvisioningState left, AvsPrivateCloudClusterProvisioningState right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AvsPrivateCloudDatastoreProvisioningState.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AvsPrivateCloudDatastoreProvisioningState.cs index 5b56c77305e1..43f57d0331b7 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AvsPrivateCloudDatastoreProvisioningState.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AvsPrivateCloudDatastoreProvisioningState.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.Avs.Models { - /// The state of the datastore provisioning. + /// datastore provisioning state. public readonly partial struct AvsPrivateCloudDatastoreProvisioningState : IEquatable { private readonly string _value; @@ -24,29 +24,29 @@ public AvsPrivateCloudDatastoreProvisioningState(string value) private const string SucceededValue = "Succeeded"; private const string FailedValue = "Failed"; + private const string CanceledValue = "Canceled"; private const string CancelledValue = "Cancelled"; private const string PendingValue = "Pending"; private const string CreatingValue = "Creating"; private const string UpdatingValue = "Updating"; private const string DeletingValue = "Deleting"; - private const string CanceledValue = "Canceled"; - /// Succeeded. + /// Resource has been created. public static AvsPrivateCloudDatastoreProvisioningState Succeeded { get; } = new AvsPrivateCloudDatastoreProvisioningState(SucceededValue); - /// Failed. + /// Resource creation failed. public static AvsPrivateCloudDatastoreProvisioningState Failed { get; } = new AvsPrivateCloudDatastoreProvisioningState(FailedValue); - /// Cancelled. + /// Resource creation was canceled. + public static AvsPrivateCloudDatastoreProvisioningState Canceled { get; } = new AvsPrivateCloudDatastoreProvisioningState(CanceledValue); + /// is cancelled. public static AvsPrivateCloudDatastoreProvisioningState Cancelled { get; } = new AvsPrivateCloudDatastoreProvisioningState(CancelledValue); - /// Pending. + /// is pending. public static AvsPrivateCloudDatastoreProvisioningState Pending { get; } = new AvsPrivateCloudDatastoreProvisioningState(PendingValue); - /// Creating. + /// is creating. public static AvsPrivateCloudDatastoreProvisioningState Creating { get; } = new AvsPrivateCloudDatastoreProvisioningState(CreatingValue); - /// Updating. + /// is updating. public static AvsPrivateCloudDatastoreProvisioningState Updating { get; } = new AvsPrivateCloudDatastoreProvisioningState(UpdatingValue); - /// Deleting. + /// is deleting. public static AvsPrivateCloudDatastoreProvisioningState Deleting { get; } = new AvsPrivateCloudDatastoreProvisioningState(DeletingValue); - /// Canceled. - public static AvsPrivateCloudDatastoreProvisioningState Canceled { get; } = new AvsPrivateCloudDatastoreProvisioningState(CanceledValue); /// Determines if two values are the same. public static bool operator ==(AvsPrivateCloudDatastoreProvisioningState left, AvsPrivateCloudDatastoreProvisioningState right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AvsPrivateCloudEndpoints.Serialization.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AvsPrivateCloudEndpoints.Serialization.cs index c71f1ce2ca81..0fb09ef4b245 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AvsPrivateCloudEndpoints.Serialization.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AvsPrivateCloudEndpoints.Serialization.cs @@ -49,6 +49,21 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("hcxCloudManager"u8); writer.WriteStringValue(HcxCloudManager); } + if (options.Format != "W" && Optional.IsDefined(NsxtManagerIP)) + { + writer.WritePropertyName("nsxtManagerIp"u8); + writer.WriteStringValue(NsxtManagerIP); + } + if (options.Format != "W" && Optional.IsDefined(VcenterIP)) + { + writer.WritePropertyName("vcenterIp"u8); + writer.WriteStringValue(VcenterIP); + } + if (options.Format != "W" && Optional.IsDefined(HcxCloudManagerIP)) + { + writer.WritePropertyName("hcxCloudManagerIp"u8); + writer.WriteStringValue(HcxCloudManagerIP); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -89,6 +104,9 @@ internal static AvsPrivateCloudEndpoints DeserializeAvsPrivateCloudEndpoints(Jso string nsxtManager = default; string vcsa = default; string hcxCloudManager = default; + string nsxtManagerIP = default; + string vcenterIP = default; + string hcxCloudManagerIP = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -108,13 +126,35 @@ internal static AvsPrivateCloudEndpoints DeserializeAvsPrivateCloudEndpoints(Jso hcxCloudManager = property.Value.GetString(); continue; } + if (property.NameEquals("nsxtManagerIp"u8)) + { + nsxtManagerIP = property.Value.GetString(); + continue; + } + if (property.NameEquals("vcenterIp"u8)) + { + vcenterIP = property.Value.GetString(); + continue; + } + if (property.NameEquals("hcxCloudManagerIp"u8)) + { + hcxCloudManagerIP = property.Value.GetString(); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new AvsPrivateCloudEndpoints(nsxtManager, vcsa, hcxCloudManager, serializedAdditionalRawData); + return new AvsPrivateCloudEndpoints( + nsxtManager, + vcsa, + hcxCloudManager, + nsxtManagerIP, + vcenterIP, + hcxCloudManagerIP, + serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AvsPrivateCloudEndpoints.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AvsPrivateCloudEndpoints.cs index 31f72d2c814f..de4bc26b07f3 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AvsPrivateCloudEndpoints.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AvsPrivateCloudEndpoints.cs @@ -51,23 +51,35 @@ internal AvsPrivateCloudEndpoints() } /// Initializes a new instance of . - /// Endpoint for the NSX-T Data Center manager. - /// Endpoint for Virtual Center Server Appliance. - /// Endpoint for the HCX Cloud Manager. + /// Endpoint FQDN for the NSX-T Data Center manager. + /// Endpoint FQDN for Virtual Center Server Appliance. + /// Endpoint FQDN for the HCX Cloud Manager. + /// Endpoint IP for the NSX-T Data Center manager. + /// Endpoint IP for Virtual Center Server Appliance. + /// Endpoint IP for the HCX Cloud Manager. /// Keeps track of any properties unknown to the library. - internal AvsPrivateCloudEndpoints(string nsxtManager, string vcsa, string hcxCloudManager, IDictionary serializedAdditionalRawData) + internal AvsPrivateCloudEndpoints(string nsxtManager, string vcsa, string hcxCloudManager, string nsxtManagerIP, string vcenterIP, string hcxCloudManagerIP, IDictionary serializedAdditionalRawData) { NsxtManager = nsxtManager; Vcsa = vcsa; HcxCloudManager = hcxCloudManager; + NsxtManagerIP = nsxtManagerIP; + VcenterIP = vcenterIP; + HcxCloudManagerIP = hcxCloudManagerIP; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Endpoint for the NSX-T Data Center manager. + /// Endpoint FQDN for the NSX-T Data Center manager. public string NsxtManager { get; } - /// Endpoint for Virtual Center Server Appliance. + /// Endpoint FQDN for Virtual Center Server Appliance. public string Vcsa { get; } - /// Endpoint for the HCX Cloud Manager. + /// Endpoint FQDN for the HCX Cloud Manager. public string HcxCloudManager { get; } + /// Endpoint IP for the NSX-T Data Center manager. + public string NsxtManagerIP { get; } + /// Endpoint IP for Virtual Center Server Appliance. + public string VcenterIP { get; } + /// Endpoint IP for the HCX Cloud Manager. + public string HcxCloudManagerIP { get; } } } diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AvsPrivateCloudPatch.Serialization.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AvsPrivateCloudPatch.Serialization.cs index ebe42f69ce3a..594b5653067d 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AvsPrivateCloudPatch.Serialization.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AvsPrivateCloudPatch.Serialization.cs @@ -46,6 +46,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndObject(); } + if (Optional.IsDefined(Sku)) + { + writer.WritePropertyName("sku"u8); + writer.WriteObjectValue(Sku, options); + } if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); @@ -93,6 +98,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } + if (Optional.IsDefined(DnsZoneType)) + { + writer.WritePropertyName("dnsZoneType"u8); + writer.WriteStringValue(DnsZoneType.Value.ToString()); + } writer.WriteEndObject(); if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -132,6 +142,7 @@ internal static AvsPrivateCloudPatch DeserializeAvsPrivateCloudPatch(JsonElement return null; } IDictionary tags = default; + AvsSku sku = default; ManagedServiceIdentity identity = default; AvsManagementCluster managementCluster = default; InternetConnectivityState? internet = default; @@ -139,6 +150,7 @@ internal static AvsPrivateCloudPatch DeserializeAvsPrivateCloudPatch(JsonElement PrivateCloudAvailabilityProperties availability = default; CustomerManagedEncryption encryption = default; IList extendedNetworkBlocks = default; + AvsDnsZoneType? dnsZoneType = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -157,6 +169,15 @@ internal static AvsPrivateCloudPatch DeserializeAvsPrivateCloudPatch(JsonElement tags = dictionary; continue; } + if (property.NameEquals("sku"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sku = AvsSku.DeserializeAvsSku(property.Value, options); + continue; + } if (property.NameEquals("identity"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -239,6 +260,15 @@ internal static AvsPrivateCloudPatch DeserializeAvsPrivateCloudPatch(JsonElement extendedNetworkBlocks = array; continue; } + if (property0.NameEquals("dnsZoneType"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dnsZoneType = new AvsDnsZoneType(property0.Value.GetString()); + continue; + } } continue; } @@ -250,6 +280,7 @@ internal static AvsPrivateCloudPatch DeserializeAvsPrivateCloudPatch(JsonElement serializedAdditionalRawData = rawDataDictionary; return new AvsPrivateCloudPatch( tags ?? new ChangeTrackingDictionary(), + sku, identity, managementCluster, internet, @@ -257,6 +288,7 @@ internal static AvsPrivateCloudPatch DeserializeAvsPrivateCloudPatch(JsonElement availability, encryption, extendedNetworkBlocks ?? new ChangeTrackingList(), + dnsZoneType, serializedAdditionalRawData); } diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AvsPrivateCloudPatch.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AvsPrivateCloudPatch.cs index c5aae2c79e52..8dedef6365bd 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AvsPrivateCloudPatch.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AvsPrivateCloudPatch.cs @@ -56,17 +56,25 @@ public AvsPrivateCloudPatch() /// Initializes a new instance of . /// Resource tags. - /// The identity of the private cloud, if configured. Current supported identity types: SystemAssigned, None. + /// The SKU (Stock Keeping Unit) assigned to this resource. + /// The managed service identities assigned to this resource. Current supported identity types: None, SystemAssigned. /// The default cluster used for management. /// Connectivity to internet is enabled or disabled. /// vCenter Single Sign On Identity Sources. /// Properties describing how the cloud is distributed across availability zones. /// Customer managed key encryption, can be enabled or disabled. - /// Array of additional networks noncontiguous with networkBlock. Networks must be unique and non-overlapping across VNet in your subscription, on-premise, and this privateCloud networkBlock attribute. Make sure the CIDR format conforms to (A.B.C.D/X). + /// + /// Array of additional networks noncontiguous with networkBlock. Networks must be + /// unique and non-overlapping across VNet in your subscription, on-premise, and + /// this privateCloud networkBlock attribute. Make sure the CIDR format conforms to + /// (A.B.C.D/X). + /// + /// The type of DNS zone to use. /// Keeps track of any properties unknown to the library. - internal AvsPrivateCloudPatch(IDictionary tags, ManagedServiceIdentity identity, AvsManagementCluster managementCluster, InternetConnectivityState? internet, IList identitySources, PrivateCloudAvailabilityProperties availability, CustomerManagedEncryption encryption, IList extendedNetworkBlocks, IDictionary serializedAdditionalRawData) + internal AvsPrivateCloudPatch(IDictionary tags, AvsSku sku, ManagedServiceIdentity identity, AvsManagementCluster managementCluster, InternetConnectivityState? internet, IList identitySources, PrivateCloudAvailabilityProperties availability, CustomerManagedEncryption encryption, IList extendedNetworkBlocks, AvsDnsZoneType? dnsZoneType, IDictionary serializedAdditionalRawData) { Tags = tags; + Sku = sku; Identity = identity; ManagementCluster = managementCluster; Internet = internet; @@ -74,12 +82,15 @@ internal AvsPrivateCloudPatch(IDictionary tags, ManagedServiceId Availability = availability; Encryption = encryption; ExtendedNetworkBlocks = extendedNetworkBlocks; + DnsZoneType = dnsZoneType; _serializedAdditionalRawData = serializedAdditionalRawData; } /// Resource tags. public IDictionary Tags { get; } - /// The identity of the private cloud, if configured. Current supported identity types: SystemAssigned, None. + /// The SKU (Stock Keeping Unit) assigned to this resource. + public AvsSku Sku { get; set; } + /// The managed service identities assigned to this resource. Current supported identity types: None, SystemAssigned. public ManagedServiceIdentity Identity { get; set; } /// The default cluster used for management. public AvsManagementCluster ManagementCluster { get; set; } @@ -91,7 +102,14 @@ internal AvsPrivateCloudPatch(IDictionary tags, ManagedServiceId public PrivateCloudAvailabilityProperties Availability { get; set; } /// Customer managed key encryption, can be enabled or disabled. public CustomerManagedEncryption Encryption { get; set; } - /// Array of additional networks noncontiguous with networkBlock. Networks must be unique and non-overlapping across VNet in your subscription, on-premise, and this privateCloud networkBlock attribute. Make sure the CIDR format conforms to (A.B.C.D/X). + /// + /// Array of additional networks noncontiguous with networkBlock. Networks must be + /// unique and non-overlapping across VNet in your subscription, on-premise, and + /// this privateCloud networkBlock attribute. Make sure the CIDR format conforms to + /// (A.B.C.D/X). + /// public IList ExtendedNetworkBlocks { get; } + /// The type of DNS zone to use. + public AvsDnsZoneType? DnsZoneType { get; set; } } } diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AvsPrivateCloudProvisioningState.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AvsPrivateCloudProvisioningState.cs index 6f40553e4024..8cad252df3ba 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AvsPrivateCloudProvisioningState.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AvsPrivateCloudProvisioningState.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.Avs.Models { - /// The provisioning state. + /// private cloud provisioning state. public readonly partial struct AvsPrivateCloudProvisioningState : IEquatable { private readonly string _value; @@ -24,29 +24,29 @@ public AvsPrivateCloudProvisioningState(string value) private const string SucceededValue = "Succeeded"; private const string FailedValue = "Failed"; + private const string CanceledValue = "Canceled"; private const string CancelledValue = "Cancelled"; private const string PendingValue = "Pending"; private const string BuildingValue = "Building"; private const string DeletingValue = "Deleting"; private const string UpdatingValue = "Updating"; - private const string CanceledValue = "Canceled"; - /// Succeeded. + /// Resource has been created. public static AvsPrivateCloudProvisioningState Succeeded { get; } = new AvsPrivateCloudProvisioningState(SucceededValue); - /// Failed. + /// Resource creation failed. public static AvsPrivateCloudProvisioningState Failed { get; } = new AvsPrivateCloudProvisioningState(FailedValue); - /// Cancelled. + /// Resource creation was canceled. + public static AvsPrivateCloudProvisioningState Canceled { get; } = new AvsPrivateCloudProvisioningState(CanceledValue); + /// is cancelled. public static AvsPrivateCloudProvisioningState Cancelled { get; } = new AvsPrivateCloudProvisioningState(CancelledValue); - /// Pending. + /// is pending. public static AvsPrivateCloudProvisioningState Pending { get; } = new AvsPrivateCloudProvisioningState(PendingValue); - /// Building. + /// is building. public static AvsPrivateCloudProvisioningState Building { get; } = new AvsPrivateCloudProvisioningState(BuildingValue); - /// Deleting. + /// is deleting. public static AvsPrivateCloudProvisioningState Deleting { get; } = new AvsPrivateCloudProvisioningState(DeletingValue); - /// Updating. + /// is updating. public static AvsPrivateCloudProvisioningState Updating { get; } = new AvsPrivateCloudProvisioningState(UpdatingValue); - /// Canceled. - public static AvsPrivateCloudProvisioningState Canceled { get; } = new AvsPrivateCloudProvisioningState(CanceledValue); /// Determines if two values are the same. public static bool operator ==(AvsPrivateCloudProvisioningState left, AvsPrivateCloudProvisioningState right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AvsSku.Serialization.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AvsSku.Serialization.cs index 4606da49eb52..214a09f4abd5 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AvsSku.Serialization.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AvsSku.Serialization.cs @@ -36,6 +36,26 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); + if (Optional.IsDefined(Tier)) + { + writer.WritePropertyName("tier"u8); + writer.WriteStringValue(Tier.Value.ToSerialString()); + } + if (Optional.IsDefined(Size)) + { + writer.WritePropertyName("size"u8); + writer.WriteStringValue(Size); + } + if (Optional.IsDefined(Family)) + { + writer.WritePropertyName("family"u8); + writer.WriteStringValue(Family); + } + if (Optional.IsDefined(Capacity)) + { + writer.WritePropertyName("capacity"u8); + writer.WriteNumberValue(Capacity.Value); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -74,6 +94,10 @@ internal static AvsSku DeserializeAvsSku(JsonElement element, ModelReaderWriterO return null; } string name = default; + AvsSkuTier? tier = default; + string size = default; + string family = default; + int? capacity = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -83,13 +107,47 @@ internal static AvsSku DeserializeAvsSku(JsonElement element, ModelReaderWriterO name = property.Value.GetString(); continue; } + if (property.NameEquals("tier"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + tier = property.Value.GetString().ToAvsSkuTier(); + continue; + } + if (property.NameEquals("size"u8)) + { + size = property.Value.GetString(); + continue; + } + if (property.NameEquals("family"u8)) + { + family = property.Value.GetString(); + continue; + } + if (property.NameEquals("capacity"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + capacity = property.Value.GetInt32(); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new AvsSku(name, serializedAdditionalRawData); + return new AvsSku( + name, + tier, + size, + family, + capacity, + serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AvsSku.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AvsSku.cs index c0076fbc71a3..c7ded958b9e0 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AvsSku.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AvsSku.cs @@ -46,7 +46,7 @@ public partial class AvsSku private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// The name of the SKU. + /// The name of the SKU. E.g. P3. It is typically a letter+number code. /// is null. public AvsSku(string name) { @@ -56,11 +56,19 @@ public AvsSku(string name) } /// Initializes a new instance of . - /// The name of the SKU. + /// The name of the SKU. E.g. P3. It is typically a letter+number code. + /// This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT. + /// The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. + /// If the service has different generations of hardware, for the same SKU, then that can be captured here. + /// If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the resource this may be omitted. /// Keeps track of any properties unknown to the library. - internal AvsSku(string name, IDictionary serializedAdditionalRawData) + internal AvsSku(string name, AvsSkuTier? tier, string size, string family, int? capacity, IDictionary serializedAdditionalRawData) { Name = name; + Tier = tier; + Size = size; + Family = family; + Capacity = capacity; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -69,7 +77,15 @@ internal AvsSku() { } - /// The name of the SKU. + /// The name of the SKU. E.g. P3. It is typically a letter+number code. public string Name { get; set; } + /// This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT. + public AvsSkuTier? Tier { get; set; } + /// The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. + public string Size { get; set; } + /// If the service has different generations of hardware, for the same SKU, then that can be captured here. + public string Family { get; set; } + /// If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the resource this may be omitted. + public int? Capacity { get; set; } } } diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AvsSkuTier.Serialization.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AvsSkuTier.Serialization.cs new file mode 100644 index 000000000000..11c7f220efe4 --- /dev/null +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AvsSkuTier.Serialization.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.Avs.Models +{ + internal static partial class AvsSkuTierExtensions + { + public static string ToSerialString(this AvsSkuTier value) => value switch + { + AvsSkuTier.Free => "Free", + AvsSkuTier.Basic => "Basic", + AvsSkuTier.Standard => "Standard", + AvsSkuTier.Premium => "Premium", + _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown AvsSkuTier value.") + }; + + public static AvsSkuTier ToAvsSkuTier(this string value) + { + if (StringComparer.OrdinalIgnoreCase.Equals(value, "Free")) return AvsSkuTier.Free; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "Basic")) return AvsSkuTier.Basic; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "Standard")) return AvsSkuTier.Standard; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "Premium")) return AvsSkuTier.Premium; + throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown AvsSkuTier value."); + } + } +} diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AvsSkuTier.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AvsSkuTier.cs new file mode 100644 index 000000000000..84d77f07403f --- /dev/null +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AvsSkuTier.cs @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.Avs.Models +{ + /// This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT. + public enum AvsSkuTier + { + /// Free. + Free, + /// Basic. + Basic, + /// Standard. + Standard, + /// Premium. + Premium + } +} diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AvsSubscriptionQuotaEnabled.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AvsSubscriptionQuotaEnabled.cs index 694903340ba3..aa2a070e0efe 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AvsSubscriptionQuotaEnabled.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AvsSubscriptionQuotaEnabled.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.Avs.Models { - /// Host quota is active for current subscription. + /// quota enabled. public readonly partial struct AvsSubscriptionQuotaEnabled : IEquatable { private readonly string _value; @@ -25,9 +25,9 @@ public AvsSubscriptionQuotaEnabled(string value) private const string EnabledValue = "Enabled"; private const string DisabledValue = "Disabled"; - /// Enabled. + /// is enabled. public static AvsSubscriptionQuotaEnabled Enabled { get; } = new AvsSubscriptionQuotaEnabled(EnabledValue); - /// Disabled. + /// is disabled. public static AvsSubscriptionQuotaEnabled Disabled { get; } = new AvsSubscriptionQuotaEnabled(DisabledValue); /// Determines if two values are the same. public static bool operator ==(AvsSubscriptionQuotaEnabled left, AvsSubscriptionQuotaEnabled right) => left.Equals(right); diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AvsSubscriptionTrialStatus.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AvsSubscriptionTrialStatus.cs index e60bfd8d14d3..a87e7e188ccf 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AvsSubscriptionTrialStatus.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AvsSubscriptionTrialStatus.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.Avs.Models { - /// Trial status. + /// trial status. public readonly partial struct AvsSubscriptionTrialStatus : IEquatable { private readonly string _value; @@ -26,11 +26,11 @@ public AvsSubscriptionTrialStatus(string value) private const string TrialUsedValue = "TrialUsed"; private const string TrialDisabledValue = "TrialDisabled"; - /// TrialAvailable. + /// is available. public static AvsSubscriptionTrialStatus TrialAvailable { get; } = new AvsSubscriptionTrialStatus(TrialAvailableValue); - /// TrialUsed. + /// is used. public static AvsSubscriptionTrialStatus TrialUsed { get; } = new AvsSubscriptionTrialStatus(TrialUsedValue); - /// TrialDisabled. + /// is disabled. public static AvsSubscriptionTrialStatus TrialDisabled { get; } = new AvsSubscriptionTrialStatus(TrialDisabledValue); /// Determines if two values are the same. public static bool operator ==(AvsSubscriptionTrialStatus left, AvsSubscriptionTrialStatus right) => left.Equals(right); diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AvsVirtualMachineProvisioningState.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AvsVirtualMachineProvisioningState.cs new file mode 100644 index 000000000000..6ed5c5bb7a9f --- /dev/null +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AvsVirtualMachineProvisioningState.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.Avs.Models +{ + /// Virtual Machine provisioning state. + public readonly partial struct AvsVirtualMachineProvisioningState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AvsVirtualMachineProvisioningState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SucceededValue = "Succeeded"; + private const string FailedValue = "Failed"; + private const string CanceledValue = "Canceled"; + + /// Resource has been created. + public static AvsVirtualMachineProvisioningState Succeeded { get; } = new AvsVirtualMachineProvisioningState(SucceededValue); + /// Resource creation failed. + public static AvsVirtualMachineProvisioningState Failed { get; } = new AvsVirtualMachineProvisioningState(FailedValue); + /// Resource creation was canceled. + public static AvsVirtualMachineProvisioningState Canceled { get; } = new AvsVirtualMachineProvisioningState(CanceledValue); + /// Determines if two values are the same. + public static bool operator ==(AvsVirtualMachineProvisioningState left, AvsVirtualMachineProvisioningState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AvsVirtualMachineProvisioningState left, AvsVirtualMachineProvisioningState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator AvsVirtualMachineProvisioningState(string value) => new AvsVirtualMachineProvisioningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AvsVirtualMachineProvisioningState other && Equals(other); + /// + public bool Equals(AvsVirtualMachineProvisioningState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AzureHybridBenefitType.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AzureHybridBenefitType.cs index 7e9418e2fdfc..a8961706a479 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AzureHybridBenefitType.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/AzureHybridBenefitType.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.Avs.Models { - /// Placement policy hosts opt-in Azure Hybrid Benefit type. + /// Azure Hybrid Benefit type. public readonly partial struct AzureHybridBenefitType : IEquatable { private readonly string _value; @@ -25,9 +25,9 @@ public AzureHybridBenefitType(string value) private const string SqlHostValue = "SqlHost"; private const string NoneValue = "None"; - /// SqlHost. + /// is SqlHost. public static AzureHybridBenefitType SqlHost { get; } = new AzureHybridBenefitType(SqlHostValue); - /// None. + /// is None. public static AzureHybridBenefitType None { get; } = new AzureHybridBenefitType(NoneValue); /// Determines if two values are the same. public static bool operator ==(AzureHybridBenefitType left, AzureHybridBenefitType right) => left.Equals(right); diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/CloudLinkList.Serialization.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/CloudLinkList.Serialization.cs index 8aaa0e0c795a..f2cc0aaa8569 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/CloudLinkList.Serialization.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/CloudLinkList.Serialization.cs @@ -34,20 +34,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(CloudLinkList)} does not support writing '{format}' format."); } - if (options.Format != "W" && Optional.IsCollectionDefined(Value)) + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) { - writer.WritePropertyName("value"u8); - writer.WriteStartArray(); - foreach (var item in Value) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); + writer.WriteObjectValue(item, options); } - if (options.Format != "W" && Optional.IsDefined(NextLink)) + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); + writer.WriteStringValue(NextLink.AbsoluteUri); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -87,17 +84,13 @@ internal static CloudLinkList DeserializeCloudLinkList(JsonElement element, Mode return null; } IReadOnlyList value = default; - string nextLink = default; + Uri nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -108,7 +101,11 @@ internal static CloudLinkList DeserializeCloudLinkList(JsonElement element, Mode } if (property.NameEquals("nextLink"u8)) { - nextLink = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); continue; } if (options.Format != "W") @@ -117,7 +114,7 @@ internal static CloudLinkList DeserializeCloudLinkList(JsonElement element, Mode } } serializedAdditionalRawData = rawDataDictionary; - return new CloudLinkList(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + return new CloudLinkList(value, nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/CloudLinkList.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/CloudLinkList.cs index 90e0dc6c25a2..c9c5918de86d 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/CloudLinkList.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/CloudLinkList.cs @@ -7,10 +7,11 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.ResourceManager.Avs.Models { - /// A paged list of cloud links. + /// The response of a CloudLink list operation. internal partial class CloudLinkList { /// @@ -46,25 +47,34 @@ internal partial class CloudLinkList private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal CloudLinkList() + /// The CloudLink items on this page. + /// is null. + internal CloudLinkList(IEnumerable value) { - Value = new ChangeTrackingList(); + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); } /// Initializes a new instance of . - /// The items on a page. - /// URL to get the next page if any. + /// The CloudLink items on this page. + /// The link to the next page of items. /// Keeps track of any properties unknown to the library. - internal CloudLinkList(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal CloudLinkList(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The items on a page. + /// Initializes a new instance of for deserialization. + internal CloudLinkList() + { + } + + /// The CloudLink items on this page. public IReadOnlyList Value { get; } - /// URL to get the next page if any. - public string NextLink { get; } + /// The link to the next page of items. + public Uri NextLink { get; } } } diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ClusterList.Serialization.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ClusterList.Serialization.cs index 4fa536fda297..a312ed273578 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ClusterList.Serialization.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ClusterList.Serialization.cs @@ -34,20 +34,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ClusterList)} does not support writing '{format}' format."); } - if (options.Format != "W" && Optional.IsCollectionDefined(Value)) + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) { - writer.WritePropertyName("value"u8); - writer.WriteStartArray(); - foreach (var item in Value) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); + writer.WriteObjectValue(item, options); } - if (options.Format != "W" && Optional.IsDefined(NextLink)) + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); + writer.WriteStringValue(NextLink.AbsoluteUri); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -87,17 +84,13 @@ internal static ClusterList DeserializeClusterList(JsonElement element, ModelRea return null; } IReadOnlyList value = default; - string nextLink = default; + Uri nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -108,7 +101,11 @@ internal static ClusterList DeserializeClusterList(JsonElement element, ModelRea } if (property.NameEquals("nextLink"u8)) { - nextLink = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); continue; } if (options.Format != "W") @@ -117,7 +114,7 @@ internal static ClusterList DeserializeClusterList(JsonElement element, ModelRea } } serializedAdditionalRawData = rawDataDictionary; - return new ClusterList(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + return new ClusterList(value, nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ClusterList.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ClusterList.cs index cb30e269317d..ff288019954e 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ClusterList.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ClusterList.cs @@ -7,10 +7,11 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.ResourceManager.Avs.Models { - /// A paged list of clusters. + /// The response of a Cluster list operation. internal partial class ClusterList { /// @@ -46,25 +47,34 @@ internal partial class ClusterList private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal ClusterList() + /// The Cluster items on this page. + /// is null. + internal ClusterList(IEnumerable value) { - Value = new ChangeTrackingList(); + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); } /// Initializes a new instance of . - /// The items on a page. - /// URL to get the next page if any. + /// The Cluster items on this page. + /// The link to the next page of items. /// Keeps track of any properties unknown to the library. - internal ClusterList(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal ClusterList(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The items on a page. + /// Initializes a new instance of for deserialization. + internal ClusterList() + { + } + + /// The Cluster items on this page. public IReadOnlyList Value { get; } - /// URL to get the next page if any. - public string NextLink { get; } + /// The link to the next page of items. + public Uri NextLink { get; } } } diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/DatastoreList.Serialization.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/DatastoreList.Serialization.cs index adad87ecad9d..33de597f2e82 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/DatastoreList.Serialization.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/DatastoreList.Serialization.cs @@ -34,20 +34,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(DatastoreList)} does not support writing '{format}' format."); } - if (options.Format != "W" && Optional.IsCollectionDefined(Value)) + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) { - writer.WritePropertyName("value"u8); - writer.WriteStartArray(); - foreach (var item in Value) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); + writer.WriteObjectValue(item, options); } - if (options.Format != "W" && Optional.IsDefined(NextLink)) + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); + writer.WriteStringValue(NextLink.AbsoluteUri); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -87,17 +84,13 @@ internal static DatastoreList DeserializeDatastoreList(JsonElement element, Mode return null; } IReadOnlyList value = default; - string nextLink = default; + Uri nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -108,7 +101,11 @@ internal static DatastoreList DeserializeDatastoreList(JsonElement element, Mode } if (property.NameEquals("nextLink"u8)) { - nextLink = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); continue; } if (options.Format != "W") @@ -117,7 +114,7 @@ internal static DatastoreList DeserializeDatastoreList(JsonElement element, Mode } } serializedAdditionalRawData = rawDataDictionary; - return new DatastoreList(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + return new DatastoreList(value, nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/DatastoreList.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/DatastoreList.cs index d410a7adfa7d..85af1315a8b7 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/DatastoreList.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/DatastoreList.cs @@ -7,10 +7,11 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.ResourceManager.Avs.Models { - /// A paged list of datastores. + /// The response of a Datastore list operation. internal partial class DatastoreList { /// @@ -46,25 +47,34 @@ internal partial class DatastoreList private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal DatastoreList() + /// The Datastore items on this page. + /// is null. + internal DatastoreList(IEnumerable value) { - Value = new ChangeTrackingList(); + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); } /// Initializes a new instance of . - /// The items on a page. - /// URL to get the next page if any. + /// The Datastore items on this page. + /// The link to the next page of items. /// Keeps track of any properties unknown to the library. - internal DatastoreList(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal DatastoreList(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The items on a page. + /// Initializes a new instance of for deserialization. + internal DatastoreList() + { + } + + /// The Datastore items on this page. public IReadOnlyList Value { get; } - /// URL to get the next page if any. - public string NextLink { get; } + /// The link to the next page of items. + public Uri NextLink { get; } } } diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/DatastoreStatus.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/DatastoreStatus.cs index 292051c3c226..4d4ffa6d69a4 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/DatastoreStatus.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/DatastoreStatus.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.Avs.Models { - /// The operational status of the datastore. + /// datastore status. public readonly partial struct DatastoreStatus : IEquatable { private readonly string _value; @@ -30,19 +30,19 @@ public DatastoreStatus(string value) private const string LostCommunicationValue = "LostCommunication"; private const string DeadOrErrorValue = "DeadOrError"; - /// Unknown. + /// is unknown. public static DatastoreStatus Unknown { get; } = new DatastoreStatus(UnknownValue); - /// Accessible. + /// is accessible. public static DatastoreStatus Accessible { get; } = new DatastoreStatus(AccessibleValue); - /// Inaccessible. + /// is inaccessible. public static DatastoreStatus Inaccessible { get; } = new DatastoreStatus(InaccessibleValue); - /// Attached. + /// is attached. public static DatastoreStatus Attached { get; } = new DatastoreStatus(AttachedValue); - /// Detached. + /// is detached. public static DatastoreStatus Detached { get; } = new DatastoreStatus(DetachedValue); - /// LostCommunication. + /// is lost communication. public static DatastoreStatus LostCommunication { get; } = new DatastoreStatus(LostCommunicationValue); - /// DeadOrError. + /// is dead or error. public static DatastoreStatus DeadOrError { get; } = new DatastoreStatus(DeadOrErrorValue); /// Determines if two values are the same. public static bool operator ==(DatastoreStatus left, DatastoreStatus right) => left.Equals(right); diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/DiskPoolVolume.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/DiskPoolVolume.cs index e0ecd38ec726..d93545d3da59 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/DiskPoolVolume.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/DiskPoolVolume.cs @@ -62,7 +62,10 @@ public DiskPoolVolume(ResourceIdentifier targetId, string lunName) /// Initializes a new instance of . /// Azure resource ID of the iSCSI target. /// Name of the LUN to be used for datastore. - /// Mode that describes whether the LUN has to be mounted as a datastore or attached as a LUN. + /// + /// Mode that describes whether the LUN has to be mounted as a datastore or + /// attached as a LUN + /// /// Device path. /// Keeps track of any properties unknown to the library. internal DiskPoolVolume(ResourceIdentifier targetId, string lunName, LunMountMode? mountOption, string path, IDictionary serializedAdditionalRawData) @@ -83,7 +86,10 @@ internal DiskPoolVolume() public ResourceIdentifier TargetId { get; set; } /// Name of the LUN to be used for datastore. public string LunName { get; set; } - /// Mode that describes whether the LUN has to be mounted as a datastore or attached as a LUN. + /// + /// Mode that describes whether the LUN has to be mounted as a datastore or + /// attached as a LUN + /// public LunMountMode? MountOption { get; set; } /// Device path. public string Path { get; } diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/DnsServiceLogLevel.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/DnsServiceLogLevel.cs index c3ad70a4a27b..1ef989d2d19f 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/DnsServiceLogLevel.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/DnsServiceLogLevel.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.Avs.Models { - /// DNS Service log level. + /// DNS service log level. public readonly partial struct DnsServiceLogLevel : IEquatable { private readonly string _value; @@ -28,15 +28,15 @@ public DnsServiceLogLevel(string value) private const string ErrorValue = "ERROR"; private const string FatalValue = "FATAL"; - /// DEBUG. + /// is debug. public static DnsServiceLogLevel Debug { get; } = new DnsServiceLogLevel(DebugValue); - /// INFO. + /// is info. public static DnsServiceLogLevel Info { get; } = new DnsServiceLogLevel(InfoValue); - /// WARNING. + /// is warning. public static DnsServiceLogLevel Warning { get; } = new DnsServiceLogLevel(WarningValue); - /// ERROR. + /// is error. public static DnsServiceLogLevel Error { get; } = new DnsServiceLogLevel(ErrorValue); - /// FATAL. + /// is fatal. public static DnsServiceLogLevel Fatal { get; } = new DnsServiceLogLevel(FatalValue); /// Determines if two values are the same. public static bool operator ==(DnsServiceLogLevel left, DnsServiceLogLevel right) => left.Equals(right); diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/DnsServiceStatus.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/DnsServiceStatus.cs index 70323ace76ed..21fa2bbba645 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/DnsServiceStatus.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/DnsServiceStatus.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.Avs.Models { - /// DNS Service status. + /// DNS service status. public readonly partial struct DnsServiceStatus : IEquatable { private readonly string _value; @@ -25,9 +25,9 @@ public DnsServiceStatus(string value) private const string SuccessValue = "SUCCESS"; private const string FailureValue = "FAILURE"; - /// SUCCESS. + /// is success. public static DnsServiceStatus Success { get; } = new DnsServiceStatus(SuccessValue); - /// FAILURE. + /// is failure. public static DnsServiceStatus Failure { get; } = new DnsServiceStatus(FailureValue); /// Determines if two values are the same. public static bool operator ==(DnsServiceStatus left, DnsServiceStatus right) => left.Equals(right); diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ElasticSanVolume.Serialization.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ElasticSanVolume.Serialization.cs new file mode 100644 index 000000000000..c6563a8e57aa --- /dev/null +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ElasticSanVolume.Serialization.cs @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Avs.Models +{ + internal partial class ElasticSanVolume : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticSanVolume)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("targetId"u8); + writer.WriteStringValue(TargetId); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ElasticSanVolume IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticSanVolume)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeElasticSanVolume(document.RootElement, options); + } + + internal static ElasticSanVolume DeserializeElasticSanVolume(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier targetId = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("targetId"u8)) + { + targetId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ElasticSanVolume(targetId, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ElasticSanVolume)} does not support writing '{options.Format}' format."); + } + } + + ElasticSanVolume IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeElasticSanVolume(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ElasticSanVolume)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ElasticSanVolume.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ElasticSanVolume.cs new file mode 100644 index 000000000000..f7abf0e899fa --- /dev/null +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ElasticSanVolume.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.Avs.Models +{ + /// An Elastic SAN volume from Microsoft.ElasticSan provider. + internal partial class ElasticSanVolume + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Azure resource ID of the Elastic SAN Volume. + /// is null. + public ElasticSanVolume(ResourceIdentifier targetId) + { + Argument.AssertNotNull(targetId, nameof(targetId)); + + TargetId = targetId; + } + + /// Initializes a new instance of . + /// Azure resource ID of the Elastic SAN Volume. + /// Keeps track of any properties unknown to the library. + internal ElasticSanVolume(ResourceIdentifier targetId, IDictionary serializedAdditionalRawData) + { + TargetId = targetId; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ElasticSanVolume() + { + } + + /// Azure resource ID of the Elastic SAN Volume. + public ResourceIdentifier TargetId { get; set; } + } +} diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ExpressRouteAuthorizationList.Serialization.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ExpressRouteAuthorizationList.Serialization.cs index c1300820c28b..2900e24c2b82 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ExpressRouteAuthorizationList.Serialization.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ExpressRouteAuthorizationList.Serialization.cs @@ -34,20 +34,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ExpressRouteAuthorizationList)} does not support writing '{format}' format."); } - if (options.Format != "W" && Optional.IsCollectionDefined(Value)) + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) { - writer.WritePropertyName("value"u8); - writer.WriteStartArray(); - foreach (var item in Value) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); + writer.WriteObjectValue(item, options); } - if (options.Format != "W" && Optional.IsDefined(NextLink)) + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); + writer.WriteStringValue(NextLink.AbsoluteUri); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -87,17 +84,13 @@ internal static ExpressRouteAuthorizationList DeserializeExpressRouteAuthorizati return null; } IReadOnlyList value = default; - string nextLink = default; + Uri nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -108,7 +101,11 @@ internal static ExpressRouteAuthorizationList DeserializeExpressRouteAuthorizati } if (property.NameEquals("nextLink"u8)) { - nextLink = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); continue; } if (options.Format != "W") @@ -117,7 +114,7 @@ internal static ExpressRouteAuthorizationList DeserializeExpressRouteAuthorizati } } serializedAdditionalRawData = rawDataDictionary; - return new ExpressRouteAuthorizationList(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + return new ExpressRouteAuthorizationList(value, nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ExpressRouteAuthorizationList.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ExpressRouteAuthorizationList.cs index 425923c08a84..e138dbefb6e3 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ExpressRouteAuthorizationList.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ExpressRouteAuthorizationList.cs @@ -7,10 +7,11 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.ResourceManager.Avs.Models { - /// A paged list of ExpressRoute Circuit Authorizations. + /// The response of a ExpressRouteAuthorization list operation. internal partial class ExpressRouteAuthorizationList { /// @@ -46,25 +47,34 @@ internal partial class ExpressRouteAuthorizationList private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal ExpressRouteAuthorizationList() + /// The ExpressRouteAuthorization items on this page. + /// is null. + internal ExpressRouteAuthorizationList(IEnumerable value) { - Value = new ChangeTrackingList(); + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); } /// Initializes a new instance of . - /// The items on a page. - /// URL to get the next page if any. + /// The ExpressRouteAuthorization items on this page. + /// The link to the next page of items. /// Keeps track of any properties unknown to the library. - internal ExpressRouteAuthorizationList(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal ExpressRouteAuthorizationList(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The items on a page. + /// Initializes a new instance of for deserialization. + internal ExpressRouteAuthorizationList() + { + } + + /// The ExpressRouteAuthorization items on this page. public IReadOnlyList Value { get; } - /// URL to get the next page if any. - public string NextLink { get; } + /// The link to the next page of items. + public Uri NextLink { get; } } } diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ExpressRouteAuthorizationProvisioningState.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ExpressRouteAuthorizationProvisioningState.cs index b9947775b8c2..de11407a4692 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ExpressRouteAuthorizationProvisioningState.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ExpressRouteAuthorizationProvisioningState.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.Avs.Models { - /// The state of the ExpressRoute Circuit Authorization provisioning. + /// Express Route Circuit Authorization provisioning state. public readonly partial struct ExpressRouteAuthorizationProvisioningState : IEquatable { private readonly string _value; @@ -24,17 +24,17 @@ public ExpressRouteAuthorizationProvisioningState(string value) private const string SucceededValue = "Succeeded"; private const string FailedValue = "Failed"; - private const string UpdatingValue = "Updating"; private const string CanceledValue = "Canceled"; + private const string UpdatingValue = "Updating"; - /// Succeeded. + /// Resource has been created. public static ExpressRouteAuthorizationProvisioningState Succeeded { get; } = new ExpressRouteAuthorizationProvisioningState(SucceededValue); - /// Failed. + /// Resource creation failed. public static ExpressRouteAuthorizationProvisioningState Failed { get; } = new ExpressRouteAuthorizationProvisioningState(FailedValue); - /// Updating. - public static ExpressRouteAuthorizationProvisioningState Updating { get; } = new ExpressRouteAuthorizationProvisioningState(UpdatingValue); - /// Canceled. + /// Resource creation was canceled. public static ExpressRouteAuthorizationProvisioningState Canceled { get; } = new ExpressRouteAuthorizationProvisioningState(CanceledValue); + /// is updating. + public static ExpressRouteAuthorizationProvisioningState Updating { get; } = new ExpressRouteAuthorizationProvisioningState(UpdatingValue); /// Determines if two values are the same. public static bool operator ==(ExpressRouteAuthorizationProvisioningState left, ExpressRouteAuthorizationProvisioningState right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/GlobalReachConnectionList.Serialization.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/GlobalReachConnectionList.Serialization.cs index e7e2ac1da86a..589f00622adb 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/GlobalReachConnectionList.Serialization.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/GlobalReachConnectionList.Serialization.cs @@ -34,20 +34,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(GlobalReachConnectionList)} does not support writing '{format}' format."); } - if (options.Format != "W" && Optional.IsCollectionDefined(Value)) + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) { - writer.WritePropertyName("value"u8); - writer.WriteStartArray(); - foreach (var item in Value) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); + writer.WriteObjectValue(item, options); } - if (options.Format != "W" && Optional.IsDefined(NextLink)) + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); + writer.WriteStringValue(NextLink.AbsoluteUri); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -87,17 +84,13 @@ internal static GlobalReachConnectionList DeserializeGlobalReachConnectionList(J return null; } IReadOnlyList value = default; - string nextLink = default; + Uri nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -108,7 +101,11 @@ internal static GlobalReachConnectionList DeserializeGlobalReachConnectionList(J } if (property.NameEquals("nextLink"u8)) { - nextLink = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); continue; } if (options.Format != "W") @@ -117,7 +114,7 @@ internal static GlobalReachConnectionList DeserializeGlobalReachConnectionList(J } } serializedAdditionalRawData = rawDataDictionary; - return new GlobalReachConnectionList(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + return new GlobalReachConnectionList(value, nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/GlobalReachConnectionList.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/GlobalReachConnectionList.cs index cfbc2bab74e6..d1f38befc357 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/GlobalReachConnectionList.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/GlobalReachConnectionList.cs @@ -7,10 +7,11 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.ResourceManager.Avs.Models { - /// A paged list of global reach connections. + /// The response of a GlobalReachConnection list operation. internal partial class GlobalReachConnectionList { /// @@ -46,25 +47,34 @@ internal partial class GlobalReachConnectionList private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal GlobalReachConnectionList() + /// The GlobalReachConnection items on this page. + /// is null. + internal GlobalReachConnectionList(IEnumerable value) { - Value = new ChangeTrackingList(); + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); } /// Initializes a new instance of . - /// The items on a page. - /// URL to get the next page if any. + /// The GlobalReachConnection items on this page. + /// The link to the next page of items. /// Keeps track of any properties unknown to the library. - internal GlobalReachConnectionList(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal GlobalReachConnectionList(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The items on a page. + /// Initializes a new instance of for deserialization. + internal GlobalReachConnectionList() + { + } + + /// The GlobalReachConnection items on this page. public IReadOnlyList Value { get; } - /// URL to get the next page if any. - public string NextLink { get; } + /// The link to the next page of items. + public Uri NextLink { get; } } } diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/GlobalReachConnectionProvisioningState.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/GlobalReachConnectionProvisioningState.cs index 29867604bfa0..eefff1e50e5d 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/GlobalReachConnectionProvisioningState.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/GlobalReachConnectionProvisioningState.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.Avs.Models { - /// The state of the ExpressRoute Circuit Authorization provisioning. + /// Global Reach Connection provisioning state. public readonly partial struct GlobalReachConnectionProvisioningState : IEquatable { private readonly string _value; @@ -24,17 +24,17 @@ public GlobalReachConnectionProvisioningState(string value) private const string SucceededValue = "Succeeded"; private const string FailedValue = "Failed"; - private const string UpdatingValue = "Updating"; private const string CanceledValue = "Canceled"; + private const string UpdatingValue = "Updating"; - /// Succeeded. + /// Resource has been created. public static GlobalReachConnectionProvisioningState Succeeded { get; } = new GlobalReachConnectionProvisioningState(SucceededValue); - /// Failed. + /// Resource creation failed. public static GlobalReachConnectionProvisioningState Failed { get; } = new GlobalReachConnectionProvisioningState(FailedValue); - /// Updating. - public static GlobalReachConnectionProvisioningState Updating { get; } = new GlobalReachConnectionProvisioningState(UpdatingValue); - /// Canceled. + /// Resource creation was canceled. public static GlobalReachConnectionProvisioningState Canceled { get; } = new GlobalReachConnectionProvisioningState(CanceledValue); + /// is updating. + public static GlobalReachConnectionProvisioningState Updating { get; } = new GlobalReachConnectionProvisioningState(UpdatingValue); /// Determines if two values are the same. public static bool operator ==(GlobalReachConnectionProvisioningState left, GlobalReachConnectionProvisioningState right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/GlobalReachConnectionStatus.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/GlobalReachConnectionStatus.cs index d8dafe4fa0dd..41e33db24f13 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/GlobalReachConnectionStatus.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/GlobalReachConnectionStatus.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.Avs.Models { - /// The connection status of the global reach connection. + /// Global Reach Connection status. public readonly partial struct GlobalReachConnectionStatus : IEquatable { private readonly string _value; @@ -26,11 +26,11 @@ public GlobalReachConnectionStatus(string value) private const string ConnectingValue = "Connecting"; private const string DisconnectedValue = "Disconnected"; - /// Connected. + /// is connected. public static GlobalReachConnectionStatus Connected { get; } = new GlobalReachConnectionStatus(ConnectedValue); - /// Connecting. + /// is connecting. public static GlobalReachConnectionStatus Connecting { get; } = new GlobalReachConnectionStatus(ConnectingValue); - /// Disconnected. + /// is disconnected. public static GlobalReachConnectionStatus Disconnected { get; } = new GlobalReachConnectionStatus(DisconnectedValue); /// Determines if two values are the same. public static bool operator ==(GlobalReachConnectionStatus left, GlobalReachConnectionStatus right) => left.Equals(right); diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/HcxEnterpriseSiteList.Serialization.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/HcxEnterpriseSiteList.Serialization.cs index 180e75b6be3a..ff28a60d3a86 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/HcxEnterpriseSiteList.Serialization.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/HcxEnterpriseSiteList.Serialization.cs @@ -34,20 +34,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(HcxEnterpriseSiteList)} does not support writing '{format}' format."); } - if (options.Format != "W" && Optional.IsCollectionDefined(Value)) + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) { - writer.WritePropertyName("value"u8); - writer.WriteStartArray(); - foreach (var item in Value) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); + writer.WriteObjectValue(item, options); } - if (options.Format != "W" && Optional.IsDefined(NextLink)) + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); + writer.WriteStringValue(NextLink.AbsoluteUri); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -87,17 +84,13 @@ internal static HcxEnterpriseSiteList DeserializeHcxEnterpriseSiteList(JsonEleme return null; } IReadOnlyList value = default; - string nextLink = default; + Uri nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -108,7 +101,11 @@ internal static HcxEnterpriseSiteList DeserializeHcxEnterpriseSiteList(JsonEleme } if (property.NameEquals("nextLink"u8)) { - nextLink = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); continue; } if (options.Format != "W") @@ -117,7 +114,7 @@ internal static HcxEnterpriseSiteList DeserializeHcxEnterpriseSiteList(JsonEleme } } serializedAdditionalRawData = rawDataDictionary; - return new HcxEnterpriseSiteList(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + return new HcxEnterpriseSiteList(value, nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/HcxEnterpriseSiteList.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/HcxEnterpriseSiteList.cs index 754189151a79..547764600665 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/HcxEnterpriseSiteList.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/HcxEnterpriseSiteList.cs @@ -7,10 +7,11 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.ResourceManager.Avs.Models { - /// A paged list of HCX Enterprise Sites. + /// The response of a HcxEnterpriseSite list operation. internal partial class HcxEnterpriseSiteList { /// @@ -46,25 +47,34 @@ internal partial class HcxEnterpriseSiteList private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal HcxEnterpriseSiteList() + /// The HcxEnterpriseSite items on this page. + /// is null. + internal HcxEnterpriseSiteList(IEnumerable value) { - Value = new ChangeTrackingList(); + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); } /// Initializes a new instance of . - /// The items on a page. - /// URL to get the next page if any. + /// The HcxEnterpriseSite items on this page. + /// The link to the next page of items. /// Keeps track of any properties unknown to the library. - internal HcxEnterpriseSiteList(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal HcxEnterpriseSiteList(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The items on a page. + /// Initializes a new instance of for deserialization. + internal HcxEnterpriseSiteList() + { + } + + /// The HcxEnterpriseSite items on this page. public IReadOnlyList Value { get; } - /// URL to get the next page if any. - public string NextLink { get; } + /// The link to the next page of items. + public Uri NextLink { get; } } } diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/HcxEnterpriseSiteProvisioningState.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/HcxEnterpriseSiteProvisioningState.cs new file mode 100644 index 000000000000..ec3e6fbbd769 --- /dev/null +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/HcxEnterpriseSiteProvisioningState.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.Avs.Models +{ + /// HCX Enterprise Site provisioning state. + public readonly partial struct HcxEnterpriseSiteProvisioningState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public HcxEnterpriseSiteProvisioningState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SucceededValue = "Succeeded"; + private const string FailedValue = "Failed"; + private const string CanceledValue = "Canceled"; + + /// Resource has been created. + public static HcxEnterpriseSiteProvisioningState Succeeded { get; } = new HcxEnterpriseSiteProvisioningState(SucceededValue); + /// Resource creation failed. + public static HcxEnterpriseSiteProvisioningState Failed { get; } = new HcxEnterpriseSiteProvisioningState(FailedValue); + /// Resource creation was canceled. + public static HcxEnterpriseSiteProvisioningState Canceled { get; } = new HcxEnterpriseSiteProvisioningState(CanceledValue); + /// Determines if two values are the same. + public static bool operator ==(HcxEnterpriseSiteProvisioningState left, HcxEnterpriseSiteProvisioningState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(HcxEnterpriseSiteProvisioningState left, HcxEnterpriseSiteProvisioningState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator HcxEnterpriseSiteProvisioningState(string value) => new HcxEnterpriseSiteProvisioningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is HcxEnterpriseSiteProvisioningState other && Equals(other); + /// + public bool Equals(HcxEnterpriseSiteProvisioningState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/HcxEnterpriseSiteStatus.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/HcxEnterpriseSiteStatus.cs index 942634baaaa0..84fb3ae3fc23 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/HcxEnterpriseSiteStatus.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/HcxEnterpriseSiteStatus.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.Avs.Models { - /// The status of the HCX Enterprise Site. + /// HCX Enterprise Site status. public readonly partial struct HcxEnterpriseSiteStatus : IEquatable { private readonly string _value; @@ -27,13 +27,13 @@ public HcxEnterpriseSiteStatus(string value) private const string DeactivatedValue = "Deactivated"; private const string DeletedValue = "Deleted"; - /// Available. + /// is available. public static HcxEnterpriseSiteStatus Available { get; } = new HcxEnterpriseSiteStatus(AvailableValue); - /// Consumed. + /// is consumed. public static HcxEnterpriseSiteStatus Consumed { get; } = new HcxEnterpriseSiteStatus(ConsumedValue); - /// Deactivated. + /// is deactivated. public static HcxEnterpriseSiteStatus Deactivated { get; } = new HcxEnterpriseSiteStatus(DeactivatedValue); - /// Deleted. + /// is deleted. public static HcxEnterpriseSiteStatus Deleted { get; } = new HcxEnterpriseSiteStatus(DeletedValue); /// Determines if two values are the same. public static bool operator ==(HcxEnterpriseSiteStatus left, HcxEnterpriseSiteStatus right) => left.Equals(right); diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/InternetConnectivityState.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/InternetConnectivityState.cs index 2a61125f8322..82a7b97cf5bc 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/InternetConnectivityState.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/InternetConnectivityState.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.Avs.Models { - /// Connectivity to internet is enabled or disabled. + /// Whether internet is enabled or disabled. public readonly partial struct InternetConnectivityState : IEquatable { private readonly string _value; @@ -25,9 +25,9 @@ public InternetConnectivityState(string value) private const string EnabledValue = "Enabled"; private const string DisabledValue = "Disabled"; - /// Enabled. + /// is enabled. public static InternetConnectivityState Enabled { get; } = new InternetConnectivityState(EnabledValue); - /// Disabled. + /// is disabled. public static InternetConnectivityState Disabled { get; } = new InternetConnectivityState(DisabledValue); /// Determines if two values are the same. public static bool operator ==(InternetConnectivityState left, InternetConnectivityState right) => left.Equals(right); diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/IscsiPathListResult.Serialization.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/IscsiPathListResult.Serialization.cs new file mode 100644 index 000000000000..1a2cb0cb0903 --- /dev/null +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/IscsiPathListResult.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Avs.Models +{ + internal partial class IscsiPathListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(IscsiPathListResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + IscsiPathListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(IscsiPathListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeIscsiPathListResult(document.RootElement, options); + } + + internal static IscsiPathListResult DeserializeIscsiPathListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(IscsiPathData.DeserializeIscsiPathData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new IscsiPathListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(IscsiPathListResult)} does not support writing '{options.Format}' format."); + } + } + + IscsiPathListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeIscsiPathListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(IscsiPathListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/IscsiPathListResult.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/IscsiPathListResult.cs new file mode 100644 index 000000000000..125ca6abc990 --- /dev/null +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/IscsiPathListResult.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.Avs.Models +{ + /// The response of a IscsiPath list operation. + internal partial class IscsiPathListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The IscsiPath items on this page. + /// is null. + internal IscsiPathListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The IscsiPath items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal IscsiPathListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal IscsiPathListResult() + { + } + + /// The IscsiPath items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/IscsiPathProvisioningState.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/IscsiPathProvisioningState.cs new file mode 100644 index 000000000000..cbe82495b33f --- /dev/null +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/IscsiPathProvisioningState.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.Avs.Models +{ + /// private cloud provisioning state. + public readonly partial struct IscsiPathProvisioningState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public IscsiPathProvisioningState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SucceededValue = "Succeeded"; + private const string FailedValue = "Failed"; + private const string CanceledValue = "Canceled"; + private const string PendingValue = "Pending"; + private const string BuildingValue = "Building"; + private const string DeletingValue = "Deleting"; + private const string UpdatingValue = "Updating"; + + /// Resource has been created. + public static IscsiPathProvisioningState Succeeded { get; } = new IscsiPathProvisioningState(SucceededValue); + /// Resource creation failed. + public static IscsiPathProvisioningState Failed { get; } = new IscsiPathProvisioningState(FailedValue); + /// Resource creation was canceled. + public static IscsiPathProvisioningState Canceled { get; } = new IscsiPathProvisioningState(CanceledValue); + /// is pending. + public static IscsiPathProvisioningState Pending { get; } = new IscsiPathProvisioningState(PendingValue); + /// is building. + public static IscsiPathProvisioningState Building { get; } = new IscsiPathProvisioningState(BuildingValue); + /// is deleting. + public static IscsiPathProvisioningState Deleting { get; } = new IscsiPathProvisioningState(DeletingValue); + /// is updating. + public static IscsiPathProvisioningState Updating { get; } = new IscsiPathProvisioningState(UpdatingValue); + /// Determines if two values are the same. + public static bool operator ==(IscsiPathProvisioningState left, IscsiPathProvisioningState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(IscsiPathProvisioningState left, IscsiPathProvisioningState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator IscsiPathProvisioningState(string value) => new IscsiPathProvisioningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is IscsiPathProvisioningState other && Equals(other); + /// + public bool Equals(IscsiPathProvisioningState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/LunMountMode.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/LunMountMode.cs index 5008a01713e4..53b4dd351648 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/LunMountMode.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/LunMountMode.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Avs.Models { - /// Mode that describes whether the LUN has to be mounted as a datastore or attached as a LUN. + /// + /// Mode that describes whether the LUN has to be mounted as a datastore or + /// attached as a LUN + /// public readonly partial struct LunMountMode : IEquatable { private readonly string _value; @@ -25,9 +28,9 @@ public LunMountMode(string value) private const string MountValue = "MOUNT"; private const string AttachValue = "ATTACH"; - /// MOUNT. + /// is mount. public static LunMountMode Mount { get; } = new LunMountMode(MountValue); - /// ATTACH. + /// is attach. public static LunMountMode Attach { get; } = new LunMountMode(AttachValue); /// Determines if two values are the same. public static bool operator ==(LunMountMode left, LunMountMode right) => left.Equals(right); diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/NsxPublicIPQuotaRaisedEnum.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/NsxPublicIPQuotaRaisedEnum.cs index 47a26ddff50a..b192b3f6de32 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/NsxPublicIPQuotaRaisedEnum.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/NsxPublicIPQuotaRaisedEnum.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.Avs.Models { - /// Flag to indicate whether the private cloud has the quota for provisioned NSX Public IP count raised from 64 to 1024. + /// NSX public IP quota raised. public readonly partial struct NsxPublicIPQuotaRaisedEnum : IEquatable { private readonly string _value; @@ -25,9 +25,9 @@ public NsxPublicIPQuotaRaisedEnum(string value) private const string EnabledValue = "Enabled"; private const string DisabledValue = "Disabled"; - /// Enabled. + /// is enabled. public static NsxPublicIPQuotaRaisedEnum Enabled { get; } = new NsxPublicIPQuotaRaisedEnum(EnabledValue); - /// Disabled. + /// is disabled. public static NsxPublicIPQuotaRaisedEnum Disabled { get; } = new NsxPublicIPQuotaRaisedEnum(DisabledValue); /// Determines if two values are the same. public static bool operator ==(NsxPublicIPQuotaRaisedEnum left, NsxPublicIPQuotaRaisedEnum right) => left.Equals(right); diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/PSCredentialExecutionParameterDetails.Serialization.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/PSCredentialExecutionParameterDetails.Serialization.cs index 1b98821ffebe..c74a85f6f06b 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/PSCredentialExecutionParameterDetails.Serialization.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/PSCredentialExecutionParameterDetails.Serialization.cs @@ -69,8 +69,8 @@ internal static PSCredentialExecutionParameterDetails DeserializePSCredentialExe } string username = default; string password = default; - string name = default; ScriptExecutionParameterType type = default; + string name = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -85,14 +85,14 @@ internal static PSCredentialExecutionParameterDetails DeserializePSCredentialExe password = property.Value.GetString(); continue; } - if (property.NameEquals("name"u8)) + if (property.NameEquals("type"u8)) { - name = property.Value.GetString(); + type = new ScriptExecutionParameterType(property.Value.GetString()); continue; } - if (property.NameEquals("type"u8)) + if (property.NameEquals("name"u8)) { - type = new ScriptExecutionParameterType(property.Value.GetString()); + name = property.Value.GetString(); continue; } if (options.Format != "W") @@ -101,7 +101,7 @@ internal static PSCredentialExecutionParameterDetails DeserializePSCredentialExe } } serializedAdditionalRawData = rawDataDictionary; - return new PSCredentialExecutionParameterDetails(name, type, serializedAdditionalRawData, username, password); + return new PSCredentialExecutionParameterDetails(type, name, serializedAdditionalRawData, username, password); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/PSCredentialExecutionParameterDetails.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/PSCredentialExecutionParameterDetails.cs index 4c37cba3403a..d1faa6ccc178 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/PSCredentialExecutionParameterDetails.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/PSCredentialExecutionParameterDetails.cs @@ -24,12 +24,12 @@ public PSCredentialExecutionParameterDetails(string name) : base(name) } /// Initializes a new instance of . + /// script execution parameter type. /// The parameter name. - /// The type of execution parameter. /// Keeps track of any properties unknown to the library. /// username for login. /// password for login. - internal PSCredentialExecutionParameterDetails(string name, ScriptExecutionParameterType parameterType, IDictionary serializedAdditionalRawData, string username, string password) : base(name, parameterType, serializedAdditionalRawData) + internal PSCredentialExecutionParameterDetails(ScriptExecutionParameterType parameterType, string name, IDictionary serializedAdditionalRawData, string username, string password) : base(parameterType, name, serializedAdditionalRawData) { Username = username; Password = password; diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ParameterOptionalityStatus.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ParameterOptionalityStatus.cs index bc8d45a45be6..5810e19eae79 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ParameterOptionalityStatus.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ParameterOptionalityStatus.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.Avs.Models { - /// Is this parameter required or optional. + /// Optional Param. public readonly partial struct ParameterOptionalityStatus : IEquatable { private readonly string _value; @@ -25,9 +25,9 @@ public ParameterOptionalityStatus(string value) private const string OptionalValue = "Optional"; private const string RequiredValue = "Required"; - /// Optional. + /// is optional. public static ParameterOptionalityStatus Optional { get; } = new ParameterOptionalityStatus(OptionalValue); - /// Required. + /// is required. public static ParameterOptionalityStatus Required { get; } = new ParameterOptionalityStatus(RequiredValue); /// Determines if two values are the same. public static bool operator ==(ParameterOptionalityStatus left, ParameterOptionalityStatus right) => left.Equals(right); diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ParameterVisibilityStatus.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ParameterVisibilityStatus.cs index 3b0508453ba4..32b3d09856a6 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ParameterVisibilityStatus.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ParameterVisibilityStatus.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.Avs.Models { - /// Should this parameter be visible to arm and passed in the parameters argument when executing. + /// Visibility Parameter. public readonly partial struct ParameterVisibilityStatus : IEquatable { private readonly string _value; @@ -25,9 +25,9 @@ public ParameterVisibilityStatus(string value) private const string VisibleValue = "Visible"; private const string HiddenValue = "Hidden"; - /// Visible. + /// is visible. public static ParameterVisibilityStatus Visible { get; } = new ParameterVisibilityStatus(VisibleValue); - /// Hidden. + /// is hidden. public static ParameterVisibilityStatus Hidden { get; } = new ParameterVisibilityStatus(HiddenValue); /// Determines if two values are the same. public static bool operator ==(ParameterVisibilityStatus left, ParameterVisibilityStatus right) => left.Equals(right); diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/PlacementPoliciesList.Serialization.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/PlacementPoliciesList.Serialization.cs index 6abe3d9b83ec..ee7a8360fa32 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/PlacementPoliciesList.Serialization.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/PlacementPoliciesList.Serialization.cs @@ -34,20 +34,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(PlacementPoliciesList)} does not support writing '{format}' format."); } - if (options.Format != "W" && Optional.IsCollectionDefined(Value)) + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) { - writer.WritePropertyName("value"u8); - writer.WriteStartArray(); - foreach (var item in Value) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); + writer.WriteObjectValue(item, options); } - if (options.Format != "W" && Optional.IsDefined(NextLink)) + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); + writer.WriteStringValue(NextLink.AbsoluteUri); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -87,17 +84,13 @@ internal static PlacementPoliciesList DeserializePlacementPoliciesList(JsonEleme return null; } IReadOnlyList value = default; - string nextLink = default; + Uri nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -108,7 +101,11 @@ internal static PlacementPoliciesList DeserializePlacementPoliciesList(JsonEleme } if (property.NameEquals("nextLink"u8)) { - nextLink = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); continue; } if (options.Format != "W") @@ -117,7 +114,7 @@ internal static PlacementPoliciesList DeserializePlacementPoliciesList(JsonEleme } } serializedAdditionalRawData = rawDataDictionary; - return new PlacementPoliciesList(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + return new PlacementPoliciesList(value, nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/PlacementPoliciesList.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/PlacementPoliciesList.cs index 037a366ad23a..1770220851ad 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/PlacementPoliciesList.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/PlacementPoliciesList.cs @@ -7,10 +7,11 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.ResourceManager.Avs.Models { - /// Represents list of placement policies. + /// The response of a PlacementPolicy list operation. internal partial class PlacementPoliciesList { /// @@ -46,25 +47,34 @@ internal partial class PlacementPoliciesList private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal PlacementPoliciesList() + /// The PlacementPolicy items on this page. + /// is null. + internal PlacementPoliciesList(IEnumerable value) { - Value = new ChangeTrackingList(); + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); } /// Initializes a new instance of . - /// The items on the page. - /// URL to get the next page if any. + /// The PlacementPolicy items on this page. + /// The link to the next page of items. /// Keeps track of any properties unknown to the library. - internal PlacementPoliciesList(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal PlacementPoliciesList(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The items on the page. + /// Initializes a new instance of for deserialization. + internal PlacementPoliciesList() + { + } + + /// The PlacementPolicy items on this page. public IReadOnlyList Value { get; } - /// URL to get the next page if any. - public string NextLink { get; } + /// The link to the next page of items. + public Uri NextLink { get; } } } diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/PlacementPolicyProperties.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/PlacementPolicyProperties.cs index 64fc0ee0129f..be1d25693e24 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/PlacementPolicyProperties.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/PlacementPolicyProperties.cs @@ -55,7 +55,7 @@ protected PlacementPolicyProperties() } /// Initializes a new instance of . - /// placement policy type. + /// Placement Policy type. /// Whether the placement policy is enabled or disabled. /// Display name of the placement policy. /// The provisioning state. @@ -69,7 +69,7 @@ internal PlacementPolicyProperties(PlacementPolicyType policyType, PlacementPoli _serializedAdditionalRawData = serializedAdditionalRawData; } - /// placement policy type. + /// Placement Policy type. internal PlacementPolicyType PolicyType { get; set; } /// Whether the placement policy is enabled or disabled. public PlacementPolicyState? State { get; set; } diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/PlacementPolicyProvisioningState.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/PlacementPolicyProvisioningState.cs index 59257b81b518..a643a54b53c1 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/PlacementPolicyProvisioningState.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/PlacementPolicyProvisioningState.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.Avs.Models { - /// The provisioning state. + /// Placement Policy provisioning state. public readonly partial struct PlacementPolicyProvisioningState : IEquatable { private readonly string _value; @@ -24,23 +24,23 @@ public PlacementPolicyProvisioningState(string value) private const string SucceededValue = "Succeeded"; private const string FailedValue = "Failed"; + private const string CanceledValue = "Canceled"; private const string BuildingValue = "Building"; private const string DeletingValue = "Deleting"; private const string UpdatingValue = "Updating"; - private const string CanceledValue = "Canceled"; - /// Succeeded. + /// Resource has been created. public static PlacementPolicyProvisioningState Succeeded { get; } = new PlacementPolicyProvisioningState(SucceededValue); - /// Failed. + /// Resource creation failed. public static PlacementPolicyProvisioningState Failed { get; } = new PlacementPolicyProvisioningState(FailedValue); - /// Building. + /// Resource creation was canceled. + public static PlacementPolicyProvisioningState Canceled { get; } = new PlacementPolicyProvisioningState(CanceledValue); + /// is building. public static PlacementPolicyProvisioningState Building { get; } = new PlacementPolicyProvisioningState(BuildingValue); - /// Deleting. + /// is deleting. public static PlacementPolicyProvisioningState Deleting { get; } = new PlacementPolicyProvisioningState(DeletingValue); - /// Updating. + /// is updating. public static PlacementPolicyProvisioningState Updating { get; } = new PlacementPolicyProvisioningState(UpdatingValue); - /// Canceled. - public static PlacementPolicyProvisioningState Canceled { get; } = new PlacementPolicyProvisioningState(CanceledValue); /// Determines if two values are the same. public static bool operator ==(PlacementPolicyProvisioningState left, PlacementPolicyProvisioningState right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/PlacementPolicyState.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/PlacementPolicyState.cs index ee4cbd1e67bc..cf6e60a5c7b2 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/PlacementPolicyState.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/PlacementPolicyState.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.Avs.Models { - /// Whether the placement policy is enabled or disabled. + /// Placement Policy state. public readonly partial struct PlacementPolicyState : IEquatable { private readonly string _value; @@ -25,9 +25,9 @@ public PlacementPolicyState(string value) private const string EnabledValue = "Enabled"; private const string DisabledValue = "Disabled"; - /// Enabled. + /// is enabled. public static PlacementPolicyState Enabled { get; } = new PlacementPolicyState(EnabledValue); - /// Disabled. + /// is disabled. public static PlacementPolicyState Disabled { get; } = new PlacementPolicyState(DisabledValue); /// Determines if two values are the same. public static bool operator ==(PlacementPolicyState left, PlacementPolicyState right) => left.Equals(right); diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/PlacementPolicyType.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/PlacementPolicyType.cs index b1bb7d4bc6d1..52643b136436 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/PlacementPolicyType.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/PlacementPolicyType.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.Avs.Models { - /// placement policy type. + /// Placement Policy type. internal readonly partial struct PlacementPolicyType : IEquatable { private readonly string _value; diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/PortMirroringProfileDirection.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/PortMirroringProfileDirection.cs index 9de5ff773b81..0826bcf69630 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/PortMirroringProfileDirection.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/PortMirroringProfileDirection.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.Avs.Models { - /// Direction of port mirroring profile. + /// Port Mirroring Direction. public readonly partial struct PortMirroringProfileDirection : IEquatable { private readonly string _value; @@ -26,11 +26,11 @@ public PortMirroringProfileDirection(string value) private const string EgressValue = "EGRESS"; private const string BidirectionalValue = "BIDIRECTIONAL"; - /// INGRESS. + /// is ingress. public static PortMirroringProfileDirection Ingress { get; } = new PortMirroringProfileDirection(IngressValue); - /// EGRESS. + /// is egress. public static PortMirroringProfileDirection Egress { get; } = new PortMirroringProfileDirection(EgressValue); - /// BIDIRECTIONAL. + /// is bidirectional. public static PortMirroringProfileDirection Bidirectional { get; } = new PortMirroringProfileDirection(BidirectionalValue); /// Determines if two values are the same. public static bool operator ==(PortMirroringProfileDirection left, PortMirroringProfileDirection right) => left.Equals(right); diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/PortMirroringProfileStatus.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/PortMirroringProfileStatus.cs index e803a2ec809b..9eaadcc38658 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/PortMirroringProfileStatus.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/PortMirroringProfileStatus.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.Avs.Models { - /// Port Mirroring Status. + /// Port Mirroring status. public readonly partial struct PortMirroringProfileStatus : IEquatable { private readonly string _value; @@ -25,9 +25,9 @@ public PortMirroringProfileStatus(string value) private const string SuccessValue = "SUCCESS"; private const string FailureValue = "FAILURE"; - /// SUCCESS. + /// is success. public static PortMirroringProfileStatus Success { get; } = new PortMirroringProfileStatus(SuccessValue); - /// FAILURE. + /// is failure. public static PortMirroringProfileStatus Failure { get; } = new PortMirroringProfileStatus(FailureValue); /// Determines if two values are the same. public static bool operator ==(PortMirroringProfileStatus left, PortMirroringProfileStatus right) => left.Equals(right); diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/PrivateCloudList.Serialization.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/PrivateCloudList.Serialization.cs index 7af5c40fd8e7..cd91d54e3d07 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/PrivateCloudList.Serialization.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/PrivateCloudList.Serialization.cs @@ -34,20 +34,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(PrivateCloudList)} does not support writing '{format}' format."); } - if (options.Format != "W" && Optional.IsCollectionDefined(Value)) + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) { - writer.WritePropertyName("value"u8); - writer.WriteStartArray(); - foreach (var item in Value) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); + writer.WriteObjectValue(item, options); } - if (options.Format != "W" && Optional.IsDefined(NextLink)) + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); + writer.WriteStringValue(NextLink.AbsoluteUri); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -87,17 +84,13 @@ internal static PrivateCloudList DeserializePrivateCloudList(JsonElement element return null; } IReadOnlyList value = default; - string nextLink = default; + Uri nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -108,7 +101,11 @@ internal static PrivateCloudList DeserializePrivateCloudList(JsonElement element } if (property.NameEquals("nextLink"u8)) { - nextLink = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); continue; } if (options.Format != "W") @@ -117,7 +114,7 @@ internal static PrivateCloudList DeserializePrivateCloudList(JsonElement element } } serializedAdditionalRawData = rawDataDictionary; - return new PrivateCloudList(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + return new PrivateCloudList(value, nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/PrivateCloudList.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/PrivateCloudList.cs index f145f01f70f0..c57e5ef3f522 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/PrivateCloudList.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/PrivateCloudList.cs @@ -7,10 +7,11 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.ResourceManager.Avs.Models { - /// A paged list of private clouds. + /// The response of a PrivateCloud list operation. internal partial class PrivateCloudList { /// @@ -46,25 +47,34 @@ internal partial class PrivateCloudList private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal PrivateCloudList() + /// The PrivateCloud items on this page. + /// is null. + internal PrivateCloudList(IEnumerable value) { - Value = new ChangeTrackingList(); + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); } /// Initializes a new instance of . - /// The items on the page. - /// URL to get the next page if any. + /// The PrivateCloud items on this page. + /// The link to the next page of items. /// Keeps track of any properties unknown to the library. - internal PrivateCloudList(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal PrivateCloudList(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The items on the page. + /// Initializes a new instance of for deserialization. + internal PrivateCloudList() + { + } + + /// The PrivateCloud items on this page. public IReadOnlyList Value { get; } - /// URL to get the next page if any. - public string NextLink { get; } + /// The link to the next page of items. + public Uri NextLink { get; } } } diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ScriptCmdletAudience.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ScriptCmdletAudience.cs new file mode 100644 index 000000000000..d4d6221932f2 --- /dev/null +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ScriptCmdletAudience.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.Avs.Models +{ + /// Specifies whether a script cmdlet is intended to be invoked only through automation or visible to customers. + public readonly partial struct ScriptCmdletAudience : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ScriptCmdletAudience(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AutomationValue = "Automation"; + private const string AnyValue = "Any"; + + /// is automation. + public static ScriptCmdletAudience Automation { get; } = new ScriptCmdletAudience(AutomationValue); + /// is any. + public static ScriptCmdletAudience Any { get; } = new ScriptCmdletAudience(AnyValue); + /// Determines if two values are the same. + public static bool operator ==(ScriptCmdletAudience left, ScriptCmdletAudience right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ScriptCmdletAudience left, ScriptCmdletAudience right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ScriptCmdletAudience(string value) => new ScriptCmdletAudience(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ScriptCmdletAudience other && Equals(other); + /// + public bool Equals(ScriptCmdletAudience other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ScriptCmdletProvisioningState.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ScriptCmdletProvisioningState.cs new file mode 100644 index 000000000000..b3091956c0fc --- /dev/null +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ScriptCmdletProvisioningState.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.Avs.Models +{ + /// A script cmdlet provisioning state. + public readonly partial struct ScriptCmdletProvisioningState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ScriptCmdletProvisioningState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SucceededValue = "Succeeded"; + private const string FailedValue = "Failed"; + private const string CanceledValue = "Canceled"; + + /// Resource has been created. + public static ScriptCmdletProvisioningState Succeeded { get; } = new ScriptCmdletProvisioningState(SucceededValue); + /// Resource creation failed. + public static ScriptCmdletProvisioningState Failed { get; } = new ScriptCmdletProvisioningState(FailedValue); + /// Resource creation was canceled. + public static ScriptCmdletProvisioningState Canceled { get; } = new ScriptCmdletProvisioningState(CanceledValue); + /// Determines if two values are the same. + public static bool operator ==(ScriptCmdletProvisioningState left, ScriptCmdletProvisioningState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ScriptCmdletProvisioningState left, ScriptCmdletProvisioningState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ScriptCmdletProvisioningState(string value) => new ScriptCmdletProvisioningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ScriptCmdletProvisioningState other && Equals(other); + /// + public bool Equals(ScriptCmdletProvisioningState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ScriptCmdletsList.Serialization.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ScriptCmdletsList.Serialization.cs index 14d484ac4dd8..34c41632a4bb 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ScriptCmdletsList.Serialization.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ScriptCmdletsList.Serialization.cs @@ -34,20 +34,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ScriptCmdletsList)} does not support writing '{format}' format."); } - if (options.Format != "W" && Optional.IsCollectionDefined(Value)) + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) { - writer.WritePropertyName("value"u8); - writer.WriteStartArray(); - foreach (var item in Value) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); + writer.WriteObjectValue(item, options); } - if (options.Format != "W" && Optional.IsDefined(NextLink)) + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); + writer.WriteStringValue(NextLink.AbsoluteUri); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -87,17 +84,13 @@ internal static ScriptCmdletsList DeserializeScriptCmdletsList(JsonElement eleme return null; } IReadOnlyList value = default; - string nextLink = default; + Uri nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -108,7 +101,11 @@ internal static ScriptCmdletsList DeserializeScriptCmdletsList(JsonElement eleme } if (property.NameEquals("nextLink"u8)) { - nextLink = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); continue; } if (options.Format != "W") @@ -117,7 +114,7 @@ internal static ScriptCmdletsList DeserializeScriptCmdletsList(JsonElement eleme } } serializedAdditionalRawData = rawDataDictionary; - return new ScriptCmdletsList(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + return new ScriptCmdletsList(value, nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ScriptCmdletsList.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ScriptCmdletsList.cs index 95be3876ebe4..b92092ab9af5 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ScriptCmdletsList.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ScriptCmdletsList.cs @@ -7,10 +7,11 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.ResourceManager.Avs.Models { - /// Pageable list of scripts/cmdlets. + /// The response of a ScriptCmdlet list operation. internal partial class ScriptCmdletsList { /// @@ -46,25 +47,34 @@ internal partial class ScriptCmdletsList private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal ScriptCmdletsList() + /// The ScriptCmdlet items on this page. + /// is null. + internal ScriptCmdletsList(IEnumerable value) { - Value = new ChangeTrackingList(); + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); } /// Initializes a new instance of . - /// List of scripts. - /// URL to get the next page if any. + /// The ScriptCmdlet items on this page. + /// The link to the next page of items. /// Keeps track of any properties unknown to the library. - internal ScriptCmdletsList(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal ScriptCmdletsList(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// List of scripts. + /// Initializes a new instance of for deserialization. + internal ScriptCmdletsList() + { + } + + /// The ScriptCmdlet items on this page. public IReadOnlyList Value { get; } - /// URL to get the next page if any. - public string NextLink { get; } + /// The link to the next page of items. + public Uri NextLink { get; } } } diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ScriptExecutionParameterDetails.Serialization.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ScriptExecutionParameterDetails.Serialization.cs index 62cd25999801..4f44d53c0cb4 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ScriptExecutionParameterDetails.Serialization.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ScriptExecutionParameterDetails.Serialization.cs @@ -34,10 +34,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ScriptExecutionParameterDetails)} does not support writing '{format}' format."); } - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); writer.WritePropertyName("type"u8); writer.WriteStringValue(ParameterType.ToString()); + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ScriptExecutionParameterDetails.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ScriptExecutionParameterDetails.cs index 40eba903846d..d9b707ec5afb 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ScriptExecutionParameterDetails.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ScriptExecutionParameterDetails.cs @@ -60,13 +60,13 @@ protected ScriptExecutionParameterDetails(string name) } /// Initializes a new instance of . + /// script execution parameter type. /// The parameter name. - /// The type of execution parameter. /// Keeps track of any properties unknown to the library. - internal ScriptExecutionParameterDetails(string name, ScriptExecutionParameterType parameterType, IDictionary serializedAdditionalRawData) + internal ScriptExecutionParameterDetails(ScriptExecutionParameterType parameterType, string name, IDictionary serializedAdditionalRawData) { - Name = name; ParameterType = parameterType; + Name = name; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -75,9 +75,9 @@ internal ScriptExecutionParameterDetails() { } + /// script execution parameter type. + internal ScriptExecutionParameterType ParameterType { get; set; } /// The parameter name. public string Name { get; set; } - /// The type of execution parameter. - internal ScriptExecutionParameterType ParameterType { get; set; } } } diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ScriptExecutionParameterType.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ScriptExecutionParameterType.cs index 64ecb8cf9f5d..c6ac5b17ad31 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ScriptExecutionParameterType.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ScriptExecutionParameterType.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.Avs.Models { - /// The type of execution parameter. + /// script execution parameter type. internal readonly partial struct ScriptExecutionParameterType : IEquatable { private readonly string _value; diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ScriptExecutionProvisioningState.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ScriptExecutionProvisioningState.cs index f90df9bf74e4..23cc338e9112 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ScriptExecutionProvisioningState.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ScriptExecutionProvisioningState.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.Avs.Models { - /// The state of the script execution resource. + /// Script Execution provisioning state. public readonly partial struct ScriptExecutionProvisioningState : IEquatable { private readonly string _value; @@ -22,31 +22,31 @@ public ScriptExecutionProvisioningState(string value) _value = value ?? throw new ArgumentNullException(nameof(value)); } - private const string PendingValue = "Pending"; - private const string RunningValue = "Running"; private const string SucceededValue = "Succeeded"; private const string FailedValue = "Failed"; + private const string CanceledValue = "Canceled"; + private const string PendingValue = "Pending"; + private const string RunningValue = "Running"; private const string CancellingValue = "Cancelling"; private const string CancelledValue = "Cancelled"; private const string DeletingValue = "Deleting"; - private const string CanceledValue = "Canceled"; - /// Pending. - public static ScriptExecutionProvisioningState Pending { get; } = new ScriptExecutionProvisioningState(PendingValue); - /// Running. - public static ScriptExecutionProvisioningState Running { get; } = new ScriptExecutionProvisioningState(RunningValue); - /// Succeeded. + /// Resource has been created. public static ScriptExecutionProvisioningState Succeeded { get; } = new ScriptExecutionProvisioningState(SucceededValue); - /// Failed. + /// Resource creation failed. public static ScriptExecutionProvisioningState Failed { get; } = new ScriptExecutionProvisioningState(FailedValue); - /// Cancelling. + /// Resource creation was canceled. + public static ScriptExecutionProvisioningState Canceled { get; } = new ScriptExecutionProvisioningState(CanceledValue); + /// is pending. + public static ScriptExecutionProvisioningState Pending { get; } = new ScriptExecutionProvisioningState(PendingValue); + /// is running. + public static ScriptExecutionProvisioningState Running { get; } = new ScriptExecutionProvisioningState(RunningValue); + /// is cancelling. public static ScriptExecutionProvisioningState Cancelling { get; } = new ScriptExecutionProvisioningState(CancellingValue); - /// Cancelled. + /// is cancelled. public static ScriptExecutionProvisioningState Cancelled { get; } = new ScriptExecutionProvisioningState(CancelledValue); - /// Deleting. + /// is deleting. public static ScriptExecutionProvisioningState Deleting { get; } = new ScriptExecutionProvisioningState(DeletingValue); - /// Canceled. - public static ScriptExecutionProvisioningState Canceled { get; } = new ScriptExecutionProvisioningState(CanceledValue); /// Determines if two values are the same. public static bool operator ==(ScriptExecutionProvisioningState left, ScriptExecutionProvisioningState right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ScriptExecutionsList.Serialization.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ScriptExecutionsList.Serialization.cs index 66291e8284cd..b4b38f44eb11 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ScriptExecutionsList.Serialization.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ScriptExecutionsList.Serialization.cs @@ -34,20 +34,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ScriptExecutionsList)} does not support writing '{format}' format."); } - if (options.Format != "W" && Optional.IsCollectionDefined(Value)) + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) { - writer.WritePropertyName("value"u8); - writer.WriteStartArray(); - foreach (var item in Value) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); + writer.WriteObjectValue(item, options); } - if (options.Format != "W" && Optional.IsDefined(NextLink)) + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); + writer.WriteStringValue(NextLink.AbsoluteUri); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -87,17 +84,13 @@ internal static ScriptExecutionsList DeserializeScriptExecutionsList(JsonElement return null; } IReadOnlyList value = default; - string nextLink = default; + Uri nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -108,7 +101,11 @@ internal static ScriptExecutionsList DeserializeScriptExecutionsList(JsonElement } if (property.NameEquals("nextLink"u8)) { - nextLink = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); continue; } if (options.Format != "W") @@ -117,7 +114,7 @@ internal static ScriptExecutionsList DeserializeScriptExecutionsList(JsonElement } } serializedAdditionalRawData = rawDataDictionary; - return new ScriptExecutionsList(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + return new ScriptExecutionsList(value, nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ScriptExecutionsList.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ScriptExecutionsList.cs index b44711426420..62258050712a 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ScriptExecutionsList.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ScriptExecutionsList.cs @@ -7,10 +7,11 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.ResourceManager.Avs.Models { - /// Pageable list of script executions. + /// The response of a ScriptExecution list operation. internal partial class ScriptExecutionsList { /// @@ -46,25 +47,34 @@ internal partial class ScriptExecutionsList private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal ScriptExecutionsList() + /// The ScriptExecution items on this page. + /// is null. + internal ScriptExecutionsList(IEnumerable value) { - Value = new ChangeTrackingList(); + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); } /// Initializes a new instance of . - /// List of scripts. - /// URL to get the next page if any. + /// The ScriptExecution items on this page. + /// The link to the next page of items. /// Keeps track of any properties unknown to the library. - internal ScriptExecutionsList(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal ScriptExecutionsList(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// List of scripts. + /// Initializes a new instance of for deserialization. + internal ScriptExecutionsList() + { + } + + /// The ScriptExecution items on this page. public IReadOnlyList Value { get; } - /// URL to get the next page if any. - public string NextLink { get; } + /// The link to the next page of items. + public Uri NextLink { get; } } } diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ScriptOutputStreamType.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ScriptOutputStreamType.cs index 86a91c52e39f..ab926949fbea 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ScriptOutputStreamType.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ScriptOutputStreamType.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.Avs.Models { - /// The ScriptOutputStreamType. + /// Script Output Stream type. public readonly partial struct ScriptOutputStreamType : IEquatable { private readonly string _value; @@ -27,13 +27,13 @@ public ScriptOutputStreamType(string value) private const string OutputValue = "Output"; private const string ErrorValue = "Error"; - /// Information. + /// is information. public static ScriptOutputStreamType Information { get; } = new ScriptOutputStreamType(InformationValue); - /// Warning. + /// is warning. public static ScriptOutputStreamType Warning { get; } = new ScriptOutputStreamType(WarningValue); - /// Output. + /// is output. public static ScriptOutputStreamType Output { get; } = new ScriptOutputStreamType(OutputValue); - /// Error. + /// is error. public static ScriptOutputStreamType Error { get; } = new ScriptOutputStreamType(ErrorValue); /// Determines if two values are the same. public static bool operator ==(ScriptOutputStreamType left, ScriptOutputStreamType right) => left.Equals(right); diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ScriptPackageProvisioningState.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ScriptPackageProvisioningState.cs new file mode 100644 index 000000000000..7263888a2c47 --- /dev/null +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ScriptPackageProvisioningState.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.Avs.Models +{ + /// Script Package provisioning state. + public readonly partial struct ScriptPackageProvisioningState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ScriptPackageProvisioningState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SucceededValue = "Succeeded"; + private const string FailedValue = "Failed"; + private const string CanceledValue = "Canceled"; + + /// Resource has been created. + public static ScriptPackageProvisioningState Succeeded { get; } = new ScriptPackageProvisioningState(SucceededValue); + /// Resource creation failed. + public static ScriptPackageProvisioningState Failed { get; } = new ScriptPackageProvisioningState(FailedValue); + /// Resource creation was canceled. + public static ScriptPackageProvisioningState Canceled { get; } = new ScriptPackageProvisioningState(CanceledValue); + /// Determines if two values are the same. + public static bool operator ==(ScriptPackageProvisioningState left, ScriptPackageProvisioningState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ScriptPackageProvisioningState left, ScriptPackageProvisioningState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ScriptPackageProvisioningState(string value) => new ScriptPackageProvisioningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ScriptPackageProvisioningState other && Equals(other); + /// + public bool Equals(ScriptPackageProvisioningState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ScriptPackagesList.Serialization.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ScriptPackagesList.Serialization.cs index a84158db5812..c215c36399fb 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ScriptPackagesList.Serialization.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ScriptPackagesList.Serialization.cs @@ -34,20 +34,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ScriptPackagesList)} does not support writing '{format}' format."); } - if (options.Format != "W" && Optional.IsCollectionDefined(Value)) + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) { - writer.WritePropertyName("value"u8); - writer.WriteStartArray(); - foreach (var item in Value) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); + writer.WriteObjectValue(item, options); } - if (options.Format != "W" && Optional.IsDefined(NextLink)) + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); + writer.WriteStringValue(NextLink.AbsoluteUri); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -87,17 +84,13 @@ internal static ScriptPackagesList DeserializeScriptPackagesList(JsonElement ele return null; } IReadOnlyList value = default; - string nextLink = default; + Uri nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -108,7 +101,11 @@ internal static ScriptPackagesList DeserializeScriptPackagesList(JsonElement ele } if (property.NameEquals("nextLink"u8)) { - nextLink = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); continue; } if (options.Format != "W") @@ -117,7 +114,7 @@ internal static ScriptPackagesList DeserializeScriptPackagesList(JsonElement ele } } serializedAdditionalRawData = rawDataDictionary; - return new ScriptPackagesList(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + return new ScriptPackagesList(value, nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ScriptPackagesList.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ScriptPackagesList.cs index ece371d42737..9964564e41ca 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ScriptPackagesList.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ScriptPackagesList.cs @@ -7,10 +7,11 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.ResourceManager.Avs.Models { - /// A list of the available script packages. + /// The response of a ScriptPackage list operation. internal partial class ScriptPackagesList { /// @@ -46,25 +47,34 @@ internal partial class ScriptPackagesList private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal ScriptPackagesList() + /// The ScriptPackage items on this page. + /// is null. + internal ScriptPackagesList(IEnumerable value) { - Value = new ChangeTrackingList(); + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); } /// Initializes a new instance of . - /// List of script package resources. - /// URL to get the next page if any. + /// The ScriptPackage items on this page. + /// The link to the next page of items. /// Keeps track of any properties unknown to the library. - internal ScriptPackagesList(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal ScriptPackagesList(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// List of script package resources. + /// Initializes a new instance of for deserialization. + internal ScriptPackagesList() + { + } + + /// The ScriptPackage items on this page. public IReadOnlyList Value { get; } - /// URL to get the next page if any. - public string NextLink { get; } + /// The link to the next page of items. + public Uri NextLink { get; } } } diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ScriptParameter.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ScriptParameter.cs index 7a7cc3c07965..403d98a87e69 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ScriptParameter.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ScriptParameter.cs @@ -51,10 +51,16 @@ internal ScriptParameter() } /// Initializes a new instance of . - /// The type of parameter the script is expecting. psCredential is a PSCredentialObject. + /// + /// The type of parameter the script is expecting. psCredential is a + /// PSCredentialObject + /// /// The parameter name that the script will expect a parameter value for. /// User friendly description of the parameter. - /// Should this parameter be visible to arm and passed in the parameters argument when executing. + /// + /// Should this parameter be visible to arm and passed in the parameters argument + /// when executing + /// /// Is this parameter required or optional. /// Keeps track of any properties unknown to the library. internal ScriptParameter(ScriptParameterType? parameterType, string name, string description, ParameterVisibilityStatus? visibility, ParameterOptionalityStatus? optional, IDictionary serializedAdditionalRawData) @@ -67,13 +73,19 @@ internal ScriptParameter(ScriptParameterType? parameterType, string name, string _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The type of parameter the script is expecting. psCredential is a PSCredentialObject. + /// + /// The type of parameter the script is expecting. psCredential is a + /// PSCredentialObject + /// public ScriptParameterType? ParameterType { get; } /// The parameter name that the script will expect a parameter value for. public string Name { get; } /// User friendly description of the parameter. public string Description { get; } - /// Should this parameter be visible to arm and passed in the parameters argument when executing. + /// + /// Should this parameter be visible to arm and passed in the parameters argument + /// when executing + /// public ParameterVisibilityStatus? Visibility { get; } /// Is this parameter required or optional. public ParameterOptionalityStatus? Optional { get; } diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ScriptParameterType.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ScriptParameterType.cs index 1ccf341395f0..3607f98b58f5 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ScriptParameterType.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ScriptParameterType.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.Avs.Models { - /// The type of parameter the script is expecting. psCredential is a PSCredentialObject. + /// Script Parameter types. public readonly partial struct ScriptParameterType : IEquatable { private readonly string _value; @@ -29,17 +29,17 @@ public ScriptParameterType(string value) private const string BoolValue = "Bool"; private const string FloatValue = "Float"; - /// String. + /// is string. public static ScriptParameterType String { get; } = new ScriptParameterType(StringValue); - /// SecureString. + /// is secure string. public static ScriptParameterType SecureString { get; } = new ScriptParameterType(SecureStringValue); - /// Credential. + /// is credential. public static ScriptParameterType Credential { get; } = new ScriptParameterType(CredentialValue); - /// Int. + /// is int. public static ScriptParameterType Int { get; } = new ScriptParameterType(IntValue); - /// Bool. + /// is bool. public static ScriptParameterType Bool { get; } = new ScriptParameterType(BoolValue); - /// Float. + /// is float. public static ScriptParameterType Float { get; } = new ScriptParameterType(FloatValue); /// Determines if two values are the same. public static bool operator ==(ScriptParameterType left, ScriptParameterType right) => left.Equals(right); diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ScriptSecureStringExecutionParameterDetails.Serialization.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ScriptSecureStringExecutionParameterDetails.Serialization.cs index 7aee13f70836..86f5f0684e33 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ScriptSecureStringExecutionParameterDetails.Serialization.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ScriptSecureStringExecutionParameterDetails.Serialization.cs @@ -63,8 +63,8 @@ internal static ScriptSecureStringExecutionParameterDetails DeserializeScriptSec return null; } string secureValue = default; - string name = default; ScriptExecutionParameterType type = default; + string name = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -74,14 +74,14 @@ internal static ScriptSecureStringExecutionParameterDetails DeserializeScriptSec secureValue = property.Value.GetString(); continue; } - if (property.NameEquals("name"u8)) + if (property.NameEquals("type"u8)) { - name = property.Value.GetString(); + type = new ScriptExecutionParameterType(property.Value.GetString()); continue; } - if (property.NameEquals("type"u8)) + if (property.NameEquals("name"u8)) { - type = new ScriptExecutionParameterType(property.Value.GetString()); + name = property.Value.GetString(); continue; } if (options.Format != "W") @@ -90,7 +90,7 @@ internal static ScriptSecureStringExecutionParameterDetails DeserializeScriptSec } } serializedAdditionalRawData = rawDataDictionary; - return new ScriptSecureStringExecutionParameterDetails(name, type, serializedAdditionalRawData, secureValue); + return new ScriptSecureStringExecutionParameterDetails(type, name, serializedAdditionalRawData, secureValue); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ScriptSecureStringExecutionParameterDetails.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ScriptSecureStringExecutionParameterDetails.cs index 70c1bf0e0684..448b692ba630 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ScriptSecureStringExecutionParameterDetails.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ScriptSecureStringExecutionParameterDetails.cs @@ -24,11 +24,11 @@ public ScriptSecureStringExecutionParameterDetails(string name) : base(name) } /// Initializes a new instance of . + /// script execution parameter type. /// The parameter name. - /// The type of execution parameter. /// Keeps track of any properties unknown to the library. /// A secure value for the passed parameter, not to be stored in logs. - internal ScriptSecureStringExecutionParameterDetails(string name, ScriptExecutionParameterType parameterType, IDictionary serializedAdditionalRawData, string secureValue) : base(name, parameterType, serializedAdditionalRawData) + internal ScriptSecureStringExecutionParameterDetails(ScriptExecutionParameterType parameterType, string name, IDictionary serializedAdditionalRawData, string secureValue) : base(parameterType, name, serializedAdditionalRawData) { SecureValue = secureValue; ParameterType = parameterType; diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ScriptStringExecutionParameterDetails.Serialization.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ScriptStringExecutionParameterDetails.Serialization.cs index dfc0992d6242..2aaff1d5d7a4 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ScriptStringExecutionParameterDetails.Serialization.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ScriptStringExecutionParameterDetails.Serialization.cs @@ -63,8 +63,8 @@ internal static ScriptStringExecutionParameterDetails DeserializeScriptStringExe return null; } string value = default; - string name = default; ScriptExecutionParameterType type = default; + string name = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -74,14 +74,14 @@ internal static ScriptStringExecutionParameterDetails DeserializeScriptStringExe value = property.Value.GetString(); continue; } - if (property.NameEquals("name"u8)) + if (property.NameEquals("type"u8)) { - name = property.Value.GetString(); + type = new ScriptExecutionParameterType(property.Value.GetString()); continue; } - if (property.NameEquals("type"u8)) + if (property.NameEquals("name"u8)) { - type = new ScriptExecutionParameterType(property.Value.GetString()); + name = property.Value.GetString(); continue; } if (options.Format != "W") @@ -90,7 +90,7 @@ internal static ScriptStringExecutionParameterDetails DeserializeScriptStringExe } } serializedAdditionalRawData = rawDataDictionary; - return new ScriptStringExecutionParameterDetails(name, type, serializedAdditionalRawData, value); + return new ScriptStringExecutionParameterDetails(type, name, serializedAdditionalRawData, value); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ScriptStringExecutionParameterDetails.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ScriptStringExecutionParameterDetails.cs index fac0b2e5e4a2..f9476acd5ce7 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ScriptStringExecutionParameterDetails.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/ScriptStringExecutionParameterDetails.cs @@ -24,11 +24,11 @@ public ScriptStringExecutionParameterDetails(string name) : base(name) } /// Initializes a new instance of . + /// script execution parameter type. /// The parameter name. - /// The type of execution parameter. /// Keeps track of any properties unknown to the library. /// The value for the passed parameter. - internal ScriptStringExecutionParameterDetails(string name, ScriptExecutionParameterType parameterType, IDictionary serializedAdditionalRawData, string value) : base(name, parameterType, serializedAdditionalRawData) + internal ScriptStringExecutionParameterDetails(ScriptExecutionParameterType parameterType, string name, IDictionary serializedAdditionalRawData, string value) : base(parameterType, name, serializedAdditionalRawData) { Value = value; ParameterType = parameterType; diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/SingleSignOnIdentitySource.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/SingleSignOnIdentitySource.cs index 9809189fd6ef..1faa6cc6ab41 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/SingleSignOnIdentitySource.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/SingleSignOnIdentitySource.cs @@ -59,8 +59,14 @@ public SingleSignOnIdentitySource() /// Primary server URL. /// Secondary server URL. /// Protect LDAP communication using SSL certificate (LDAPS). - /// The ID of an Active Directory user with a minimum of read-only access to Base DN for users and group. - /// The password of the Active Directory user with a minimum of read-only access to Base DN for users and groups. + /// + /// The ID of an Active Directory user with a minimum of read-only access to Base + /// DN for users and group + /// + /// + /// The password of the Active Directory user with a minimum of read-only access to + /// Base DN for users and groups. + /// /// Keeps track of any properties unknown to the library. internal SingleSignOnIdentitySource(string name, string @alias, string domain, string baseUserDN, string baseGroupDN, Uri primaryServer, Uri secondaryServer, SslCertificateStatus? ssl, string username, string password, IDictionary serializedAdditionalRawData) { @@ -93,9 +99,15 @@ internal SingleSignOnIdentitySource(string name, string @alias, string domain, s public Uri SecondaryServer { get; set; } /// Protect LDAP communication using SSL certificate (LDAPS). public SslCertificateStatus? Ssl { get; set; } - /// The ID of an Active Directory user with a minimum of read-only access to Base DN for users and group. + /// + /// The ID of an Active Directory user with a minimum of read-only access to Base + /// DN for users and group + /// public string Username { get; set; } - /// The password of the Active Directory user with a minimum of read-only access to Base DN for users and groups. + /// + /// The password of the Active Directory user with a minimum of read-only access to + /// Base DN for users and groups. + /// public string Password { get; set; } } } diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/SslCertificateStatus.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/SslCertificateStatus.cs index 0e7feb2204ab..438b8ef8d6e3 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/SslCertificateStatus.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/SslCertificateStatus.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.Avs.Models { - /// Protect LDAP communication using SSL certificate (LDAPS). + /// Whether SSL is enabled or disabled. public readonly partial struct SslCertificateStatus : IEquatable { private readonly string _value; @@ -25,9 +25,9 @@ public SslCertificateStatus(string value) private const string EnabledValue = "Enabled"; private const string DisabledValue = "Disabled"; - /// Enabled. + /// is enabled. public static SslCertificateStatus Enabled { get; } = new SslCertificateStatus(EnabledValue); - /// Disabled. + /// is disabled. public static SslCertificateStatus Disabled { get; } = new SslCertificateStatus(DisabledValue); /// Determines if two values are the same. public static bool operator ==(SslCertificateStatus left, SslCertificateStatus right) => left.Equals(right); diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/UnknownAddonProperties.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/UnknownAddonProperties.cs index ab398254a5b2..8288a6d5621c 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/UnknownAddonProperties.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/UnknownAddonProperties.cs @@ -14,7 +14,7 @@ namespace Azure.ResourceManager.Avs.Models internal partial class UnknownAddonProperties : AvsPrivateCloudAddonProperties { /// Initializes a new instance of . - /// The type of private cloud addon. + /// Addon type. /// The state of the addon provisioning. /// Keeps track of any properties unknown to the library. internal UnknownAddonProperties(AddonType addonType, AddonProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) : base(addonType, provisioningState, serializedAdditionalRawData) diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/UnknownPlacementPolicyProperties.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/UnknownPlacementPolicyProperties.cs index 7db101ebc760..9c3dbe6cf8df 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/UnknownPlacementPolicyProperties.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/UnknownPlacementPolicyProperties.cs @@ -14,7 +14,7 @@ namespace Azure.ResourceManager.Avs.Models internal partial class UnknownPlacementPolicyProperties : PlacementPolicyProperties { /// Initializes a new instance of . - /// placement policy type. + /// Placement Policy type. /// Whether the placement policy is enabled or disabled. /// Display name of the placement policy. /// The provisioning state. diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/UnknownScriptExecutionParameter.Serialization.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/UnknownScriptExecutionParameter.Serialization.cs index 6459b399e699..e2761cf118d1 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/UnknownScriptExecutionParameter.Serialization.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/UnknownScriptExecutionParameter.Serialization.cs @@ -57,20 +57,20 @@ internal static UnknownScriptExecutionParameter DeserializeUnknownScriptExecutio { return null; } - string name = default; ScriptExecutionParameterType type = "Unknown"; + string name = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("name"u8)) + if (property.NameEquals("type"u8)) { - name = property.Value.GetString(); + type = new ScriptExecutionParameterType(property.Value.GetString()); continue; } - if (property.NameEquals("type"u8)) + if (property.NameEquals("name"u8)) { - type = new ScriptExecutionParameterType(property.Value.GetString()); + name = property.Value.GetString(); continue; } if (options.Format != "W") @@ -79,7 +79,7 @@ internal static UnknownScriptExecutionParameter DeserializeUnknownScriptExecutio } } serializedAdditionalRawData = rawDataDictionary; - return new UnknownScriptExecutionParameter(name, type, serializedAdditionalRawData); + return new UnknownScriptExecutionParameter(type, name, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/UnknownScriptExecutionParameter.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/UnknownScriptExecutionParameter.cs index f70210a52c28..c75b63f7cc41 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/UnknownScriptExecutionParameter.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/UnknownScriptExecutionParameter.cs @@ -14,10 +14,10 @@ namespace Azure.ResourceManager.Avs.Models internal partial class UnknownScriptExecutionParameter : ScriptExecutionParameterDetails { /// Initializes a new instance of . + /// script execution parameter type. /// The parameter name. - /// The type of execution parameter. /// Keeps track of any properties unknown to the library. - internal UnknownScriptExecutionParameter(string name, ScriptExecutionParameterType parameterType, IDictionary serializedAdditionalRawData) : base(name, parameterType, serializedAdditionalRawData) + internal UnknownScriptExecutionParameter(ScriptExecutionParameterType parameterType, string name, IDictionary serializedAdditionalRawData) : base(parameterType, name, serializedAdditionalRawData) { ParameterType = parameterType; } diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/VirtualMachineRestrictMovementState.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/VirtualMachineRestrictMovementState.cs index 948a10bf4710..5f7c42fe4df1 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/VirtualMachineRestrictMovementState.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/VirtualMachineRestrictMovementState.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.Avs.Models { - /// Whether VM DRS-driven movement is restricted (enabled) or not (disabled). + /// Virtual Machine Restrict Movement state. public readonly partial struct VirtualMachineRestrictMovementState : IEquatable { private readonly string _value; @@ -25,9 +25,9 @@ public VirtualMachineRestrictMovementState(string value) private const string EnabledValue = "Enabled"; private const string DisabledValue = "Disabled"; - /// Enabled. + /// is enabled. public static VirtualMachineRestrictMovementState Enabled { get; } = new VirtualMachineRestrictMovementState(EnabledValue); - /// Disabled. + /// is disabled. public static VirtualMachineRestrictMovementState Disabled { get; } = new VirtualMachineRestrictMovementState(DisabledValue); /// Determines if two values are the same. public static bool operator ==(VirtualMachineRestrictMovementState left, VirtualMachineRestrictMovementState right) => left.Equals(right); diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/VirtualMachinesList.Serialization.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/VirtualMachinesList.Serialization.cs index ccb1f7e4b423..d9eb4a9be448 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/VirtualMachinesList.Serialization.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/VirtualMachinesList.Serialization.cs @@ -34,20 +34,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(VirtualMachinesList)} does not support writing '{format}' format."); } - if (options.Format != "W" && Optional.IsCollectionDefined(Value)) + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) { - writer.WritePropertyName("value"u8); - writer.WriteStartArray(); - foreach (var item in Value) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); + writer.WriteObjectValue(item, options); } - if (options.Format != "W" && Optional.IsDefined(NextLink)) + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); + writer.WriteStringValue(NextLink.AbsoluteUri); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -87,17 +84,13 @@ internal static VirtualMachinesList DeserializeVirtualMachinesList(JsonElement e return null; } IReadOnlyList value = default; - string nextLink = default; + Uri nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -108,7 +101,11 @@ internal static VirtualMachinesList DeserializeVirtualMachinesList(JsonElement e } if (property.NameEquals("nextLink"u8)) { - nextLink = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); continue; } if (options.Format != "W") @@ -117,7 +114,7 @@ internal static VirtualMachinesList DeserializeVirtualMachinesList(JsonElement e } } serializedAdditionalRawData = rawDataDictionary; - return new VirtualMachinesList(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + return new VirtualMachinesList(value, nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/VirtualMachinesList.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/VirtualMachinesList.cs index 4a32204ed6e2..5fd2fe12a7e8 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/VirtualMachinesList.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/VirtualMachinesList.cs @@ -7,10 +7,11 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.ResourceManager.Avs.Models { - /// A list of Virtual Machines. + /// The response of a VirtualMachine list operation. internal partial class VirtualMachinesList { /// @@ -46,25 +47,34 @@ internal partial class VirtualMachinesList private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal VirtualMachinesList() + /// The VirtualMachine items on this page. + /// is null. + internal VirtualMachinesList(IEnumerable value) { - Value = new ChangeTrackingList(); + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); } /// Initializes a new instance of . - /// The items to be displayed on the page. - /// URL to get the next page if any. + /// The VirtualMachine items on this page. + /// The link to the next page of items. /// Keeps track of any properties unknown to the library. - internal VirtualMachinesList(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal VirtualMachinesList(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The items to be displayed on the page. + /// Initializes a new instance of for deserialization. + internal VirtualMachinesList() + { + } + + /// The VirtualMachine items on this page. public IReadOnlyList Value { get; } - /// URL to get the next page if any. - public string NextLink { get; } + /// The link to the next page of items. + public Uri NextLink { get; } } } diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/VmHostPlacementPolicyAffinityStrength.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/VmHostPlacementPolicyAffinityStrength.cs index a956754b6bbc..d8f6ef880e89 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/VmHostPlacementPolicyAffinityStrength.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/VmHostPlacementPolicyAffinityStrength.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.Avs.Models { - /// VM-Host placement policy affinity strength (should/must). + /// Affinity Strength. public readonly partial struct VmHostPlacementPolicyAffinityStrength : IEquatable { private readonly string _value; @@ -25,9 +25,9 @@ public VmHostPlacementPolicyAffinityStrength(string value) private const string ShouldValue = "Should"; private const string MustValue = "Must"; - /// Should. + /// is should. public static VmHostPlacementPolicyAffinityStrength Should { get; } = new VmHostPlacementPolicyAffinityStrength(ShouldValue); - /// Must. + /// is must. public static VmHostPlacementPolicyAffinityStrength Must { get; } = new VmHostPlacementPolicyAffinityStrength(MustValue); /// Determines if two values are the same. public static bool operator ==(VmHostPlacementPolicyAffinityStrength left, VmHostPlacementPolicyAffinityStrength right) => left.Equals(right); diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/VmHostPlacementPolicyProperties.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/VmHostPlacementPolicyProperties.cs index e6efbc45393b..9ff0fec0165c 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/VmHostPlacementPolicyProperties.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/VmHostPlacementPolicyProperties.cs @@ -32,7 +32,7 @@ public VmHostPlacementPolicyProperties(IEnumerable vmMembers } /// Initializes a new instance of . - /// placement policy type. + /// Placement Policy type. /// Whether the placement policy is enabled or disabled. /// Display name of the placement policy. /// The provisioning state. diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/VmPlacementPolicyProperties.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/VmPlacementPolicyProperties.cs index 8cb4acb872c0..90b781cf8c56 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/VmPlacementPolicyProperties.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/VmPlacementPolicyProperties.cs @@ -29,7 +29,7 @@ public VmPlacementPolicyProperties(IEnumerable vmMembers, Av } /// Initializes a new instance of . - /// placement policy type. + /// Placement Policy type. /// Whether the placement policy is enabled or disabled. /// Display name of the placement policy. /// The provisioning state. diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkDhcpEntity.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkDhcpEntity.cs index 242e97e23dbc..4426d0778039 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkDhcpEntity.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkDhcpEntity.cs @@ -11,7 +11,8 @@ namespace Azure.ResourceManager.Avs.Models { /// - /// Base class for WorkloadNetworkDhcpServer and WorkloadNetworkDhcpRelay to inherit from + /// Base class for WorkloadNetworkDhcpServer and WorkloadNetworkDhcpRelay to + /// inherit from /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include and . /// diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkDhcpList.Serialization.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkDhcpList.Serialization.cs index ae560d22e4c7..4f7f5e3777b9 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkDhcpList.Serialization.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkDhcpList.Serialization.cs @@ -34,20 +34,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(WorkloadNetworkDhcpList)} does not support writing '{format}' format."); } - if (options.Format != "W" && Optional.IsCollectionDefined(Value)) + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) { - writer.WritePropertyName("value"u8); - writer.WriteStartArray(); - foreach (var item in Value) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); + writer.WriteObjectValue(item, options); } - if (options.Format != "W" && Optional.IsDefined(NextLink)) + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); + writer.WriteStringValue(NextLink.AbsoluteUri); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -87,17 +84,13 @@ internal static WorkloadNetworkDhcpList DeserializeWorkloadNetworkDhcpList(JsonE return null; } IReadOnlyList value = default; - string nextLink = default; + Uri nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -108,7 +101,11 @@ internal static WorkloadNetworkDhcpList DeserializeWorkloadNetworkDhcpList(JsonE } if (property.NameEquals("nextLink"u8)) { - nextLink = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); continue; } if (options.Format != "W") @@ -117,7 +114,7 @@ internal static WorkloadNetworkDhcpList DeserializeWorkloadNetworkDhcpList(JsonE } } serializedAdditionalRawData = rawDataDictionary; - return new WorkloadNetworkDhcpList(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + return new WorkloadNetworkDhcpList(value, nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkDhcpList.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkDhcpList.cs index 25c6f8b939c0..e96fb124ba1e 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkDhcpList.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkDhcpList.cs @@ -7,10 +7,11 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.ResourceManager.Avs.Models { - /// A list of NSX dhcp entities. + /// The response of a WorkloadNetworkDhcp list operation. internal partial class WorkloadNetworkDhcpList { /// @@ -46,25 +47,34 @@ internal partial class WorkloadNetworkDhcpList private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal WorkloadNetworkDhcpList() + /// The WorkloadNetworkDhcp items on this page. + /// is null. + internal WorkloadNetworkDhcpList(IEnumerable value) { - Value = new ChangeTrackingList(); + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); } /// Initializes a new instance of . - /// The items on the page. - /// URL to get the next page if any. + /// The WorkloadNetworkDhcp items on this page. + /// The link to the next page of items. /// Keeps track of any properties unknown to the library. - internal WorkloadNetworkDhcpList(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal WorkloadNetworkDhcpList(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The items on the page. + /// Initializes a new instance of for deserialization. + internal WorkloadNetworkDhcpList() + { + } + + /// The WorkloadNetworkDhcp items on this page. public IReadOnlyList Value { get; } - /// URL to get the next page if any. - public string NextLink { get; } + /// The link to the next page of items. + public Uri NextLink { get; } } } diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkDhcpProvisioningState.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkDhcpProvisioningState.cs index 076e6a129529..b23b0cc5e0e6 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkDhcpProvisioningState.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkDhcpProvisioningState.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.Avs.Models { - /// The provisioning state. + /// Workload Network DHCP provisioning state. public readonly partial struct WorkloadNetworkDhcpProvisioningState : IEquatable { private readonly string _value; @@ -24,23 +24,23 @@ public WorkloadNetworkDhcpProvisioningState(string value) private const string SucceededValue = "Succeeded"; private const string FailedValue = "Failed"; + private const string CanceledValue = "Canceled"; private const string BuildingValue = "Building"; private const string DeletingValue = "Deleting"; private const string UpdatingValue = "Updating"; - private const string CanceledValue = "Canceled"; - /// Succeeded. + /// Resource has been created. public static WorkloadNetworkDhcpProvisioningState Succeeded { get; } = new WorkloadNetworkDhcpProvisioningState(SucceededValue); - /// Failed. + /// Resource creation failed. public static WorkloadNetworkDhcpProvisioningState Failed { get; } = new WorkloadNetworkDhcpProvisioningState(FailedValue); - /// Building. + /// Resource creation was canceled. + public static WorkloadNetworkDhcpProvisioningState Canceled { get; } = new WorkloadNetworkDhcpProvisioningState(CanceledValue); + /// is building. public static WorkloadNetworkDhcpProvisioningState Building { get; } = new WorkloadNetworkDhcpProvisioningState(BuildingValue); - /// Deleting. + /// is deleting. public static WorkloadNetworkDhcpProvisioningState Deleting { get; } = new WorkloadNetworkDhcpProvisioningState(DeletingValue); - /// Updating. + /// is updating. public static WorkloadNetworkDhcpProvisioningState Updating { get; } = new WorkloadNetworkDhcpProvisioningState(UpdatingValue); - /// Canceled. - public static WorkloadNetworkDhcpProvisioningState Canceled { get; } = new WorkloadNetworkDhcpProvisioningState(CanceledValue); /// Determines if two values are the same. public static bool operator ==(WorkloadNetworkDhcpProvisioningState left, WorkloadNetworkDhcpProvisioningState right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkDnsServiceProvisioningState.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkDnsServiceProvisioningState.cs index 824fb4b72968..afa659fe9557 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkDnsServiceProvisioningState.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkDnsServiceProvisioningState.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.Avs.Models { - /// The provisioning state. + /// Workload Network DNS Service provisioning state. public readonly partial struct WorkloadNetworkDnsServiceProvisioningState : IEquatable { private readonly string _value; @@ -24,23 +24,23 @@ public WorkloadNetworkDnsServiceProvisioningState(string value) private const string SucceededValue = "Succeeded"; private const string FailedValue = "Failed"; + private const string CanceledValue = "Canceled"; private const string BuildingValue = "Building"; private const string DeletingValue = "Deleting"; private const string UpdatingValue = "Updating"; - private const string CanceledValue = "Canceled"; - /// Succeeded. + /// Resource has been created. public static WorkloadNetworkDnsServiceProvisioningState Succeeded { get; } = new WorkloadNetworkDnsServiceProvisioningState(SucceededValue); - /// Failed. + /// Resource creation failed. public static WorkloadNetworkDnsServiceProvisioningState Failed { get; } = new WorkloadNetworkDnsServiceProvisioningState(FailedValue); - /// Building. + /// Resource creation was canceled. + public static WorkloadNetworkDnsServiceProvisioningState Canceled { get; } = new WorkloadNetworkDnsServiceProvisioningState(CanceledValue); + /// is building. public static WorkloadNetworkDnsServiceProvisioningState Building { get; } = new WorkloadNetworkDnsServiceProvisioningState(BuildingValue); - /// Deleting. + /// is deleting. public static WorkloadNetworkDnsServiceProvisioningState Deleting { get; } = new WorkloadNetworkDnsServiceProvisioningState(DeletingValue); - /// Updating. + /// is updating. public static WorkloadNetworkDnsServiceProvisioningState Updating { get; } = new WorkloadNetworkDnsServiceProvisioningState(UpdatingValue); - /// Canceled. - public static WorkloadNetworkDnsServiceProvisioningState Canceled { get; } = new WorkloadNetworkDnsServiceProvisioningState(CanceledValue); /// Determines if two values are the same. public static bool operator ==(WorkloadNetworkDnsServiceProvisioningState left, WorkloadNetworkDnsServiceProvisioningState right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkDnsServicesList.Serialization.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkDnsServicesList.Serialization.cs index fe6d8336f638..f2546b6b8d68 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkDnsServicesList.Serialization.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkDnsServicesList.Serialization.cs @@ -34,20 +34,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(WorkloadNetworkDnsServicesList)} does not support writing '{format}' format."); } - if (options.Format != "W" && Optional.IsCollectionDefined(Value)) + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) { - writer.WritePropertyName("value"u8); - writer.WriteStartArray(); - foreach (var item in Value) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); + writer.WriteObjectValue(item, options); } - if (options.Format != "W" && Optional.IsDefined(NextLink)) + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); + writer.WriteStringValue(NextLink.AbsoluteUri); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -87,17 +84,13 @@ internal static WorkloadNetworkDnsServicesList DeserializeWorkloadNetworkDnsServ return null; } IReadOnlyList value = default; - string nextLink = default; + Uri nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -108,7 +101,11 @@ internal static WorkloadNetworkDnsServicesList DeserializeWorkloadNetworkDnsServ } if (property.NameEquals("nextLink"u8)) { - nextLink = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); continue; } if (options.Format != "W") @@ -117,7 +114,7 @@ internal static WorkloadNetworkDnsServicesList DeserializeWorkloadNetworkDnsServ } } serializedAdditionalRawData = rawDataDictionary; - return new WorkloadNetworkDnsServicesList(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + return new WorkloadNetworkDnsServicesList(value, nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkDnsServicesList.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkDnsServicesList.cs index 8c5256d9a49a..9e4bbbf3938d 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkDnsServicesList.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkDnsServicesList.cs @@ -7,10 +7,11 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.ResourceManager.Avs.Models { - /// A list of NSX DNS Services. + /// The response of a WorkloadNetworkDnsService list operation. internal partial class WorkloadNetworkDnsServicesList { /// @@ -46,25 +47,34 @@ internal partial class WorkloadNetworkDnsServicesList private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal WorkloadNetworkDnsServicesList() + /// The WorkloadNetworkDnsService items on this page. + /// is null. + internal WorkloadNetworkDnsServicesList(IEnumerable value) { - Value = new ChangeTrackingList(); + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); } /// Initializes a new instance of . - /// The items on the page. - /// URL to get the next page if any. + /// The WorkloadNetworkDnsService items on this page. + /// The link to the next page of items. /// Keeps track of any properties unknown to the library. - internal WorkloadNetworkDnsServicesList(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal WorkloadNetworkDnsServicesList(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The items on the page. + /// Initializes a new instance of for deserialization. + internal WorkloadNetworkDnsServicesList() + { + } + + /// The WorkloadNetworkDnsService items on this page. public IReadOnlyList Value { get; } - /// URL to get the next page if any. - public string NextLink { get; } + /// The link to the next page of items. + public Uri NextLink { get; } } } diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkDnsZoneProvisioningState.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkDnsZoneProvisioningState.cs index 79dfb71630a7..94b1aa8022aa 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkDnsZoneProvisioningState.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkDnsZoneProvisioningState.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.Avs.Models { - /// The provisioning state. + /// Workload Network DNS Zone provisioning state. public readonly partial struct WorkloadNetworkDnsZoneProvisioningState : IEquatable { private readonly string _value; @@ -24,23 +24,23 @@ public WorkloadNetworkDnsZoneProvisioningState(string value) private const string SucceededValue = "Succeeded"; private const string FailedValue = "Failed"; + private const string CanceledValue = "Canceled"; private const string BuildingValue = "Building"; private const string DeletingValue = "Deleting"; private const string UpdatingValue = "Updating"; - private const string CanceledValue = "Canceled"; - /// Succeeded. + /// Resource has been created. public static WorkloadNetworkDnsZoneProvisioningState Succeeded { get; } = new WorkloadNetworkDnsZoneProvisioningState(SucceededValue); - /// Failed. + /// Resource creation failed. public static WorkloadNetworkDnsZoneProvisioningState Failed { get; } = new WorkloadNetworkDnsZoneProvisioningState(FailedValue); - /// Building. + /// Resource creation was canceled. + public static WorkloadNetworkDnsZoneProvisioningState Canceled { get; } = new WorkloadNetworkDnsZoneProvisioningState(CanceledValue); + /// is building. public static WorkloadNetworkDnsZoneProvisioningState Building { get; } = new WorkloadNetworkDnsZoneProvisioningState(BuildingValue); - /// Deleting. + /// is deleting. public static WorkloadNetworkDnsZoneProvisioningState Deleting { get; } = new WorkloadNetworkDnsZoneProvisioningState(DeletingValue); - /// Updating. + /// is updating. public static WorkloadNetworkDnsZoneProvisioningState Updating { get; } = new WorkloadNetworkDnsZoneProvisioningState(UpdatingValue); - /// Canceled. - public static WorkloadNetworkDnsZoneProvisioningState Canceled { get; } = new WorkloadNetworkDnsZoneProvisioningState(CanceledValue); /// Determines if two values are the same. public static bool operator ==(WorkloadNetworkDnsZoneProvisioningState left, WorkloadNetworkDnsZoneProvisioningState right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkDnsZonesList.Serialization.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkDnsZonesList.Serialization.cs index 516a9a717136..e2b1a72d766a 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkDnsZonesList.Serialization.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkDnsZonesList.Serialization.cs @@ -34,20 +34,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(WorkloadNetworkDnsZonesList)} does not support writing '{format}' format."); } - if (options.Format != "W" && Optional.IsCollectionDefined(Value)) + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) { - writer.WritePropertyName("value"u8); - writer.WriteStartArray(); - foreach (var item in Value) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); + writer.WriteObjectValue(item, options); } - if (options.Format != "W" && Optional.IsDefined(NextLink)) + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); + writer.WriteStringValue(NextLink.AbsoluteUri); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -87,17 +84,13 @@ internal static WorkloadNetworkDnsZonesList DeserializeWorkloadNetworkDnsZonesLi return null; } IReadOnlyList value = default; - string nextLink = default; + Uri nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -108,7 +101,11 @@ internal static WorkloadNetworkDnsZonesList DeserializeWorkloadNetworkDnsZonesLi } if (property.NameEquals("nextLink"u8)) { - nextLink = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); continue; } if (options.Format != "W") @@ -117,7 +114,7 @@ internal static WorkloadNetworkDnsZonesList DeserializeWorkloadNetworkDnsZonesLi } } serializedAdditionalRawData = rawDataDictionary; - return new WorkloadNetworkDnsZonesList(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + return new WorkloadNetworkDnsZonesList(value, nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkDnsZonesList.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkDnsZonesList.cs index 6dff27af6f6a..d4af95740ee8 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkDnsZonesList.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkDnsZonesList.cs @@ -7,10 +7,11 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.ResourceManager.Avs.Models { - /// A list of NSX DNS Zones. + /// The response of a WorkloadNetworkDnsZone list operation. internal partial class WorkloadNetworkDnsZonesList { /// @@ -46,25 +47,34 @@ internal partial class WorkloadNetworkDnsZonesList private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal WorkloadNetworkDnsZonesList() + /// The WorkloadNetworkDnsZone items on this page. + /// is null. + internal WorkloadNetworkDnsZonesList(IEnumerable value) { - Value = new ChangeTrackingList(); + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); } /// Initializes a new instance of . - /// The items on the page. - /// URL to get the next page if any. + /// The WorkloadNetworkDnsZone items on this page. + /// The link to the next page of items. /// Keeps track of any properties unknown to the library. - internal WorkloadNetworkDnsZonesList(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal WorkloadNetworkDnsZonesList(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The items on the page. + /// Initializes a new instance of for deserialization. + internal WorkloadNetworkDnsZonesList() + { + } + + /// The WorkloadNetworkDnsZone items on this page. public IReadOnlyList Value { get; } - /// URL to get the next page if any. - public string NextLink { get; } + /// The link to the next page of items. + public Uri NextLink { get; } } } diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkGatewayList.Serialization.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkGatewayList.Serialization.cs index 52c1c556cc4f..b4e158d4311d 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkGatewayList.Serialization.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkGatewayList.Serialization.cs @@ -34,20 +34,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(WorkloadNetworkGatewayList)} does not support writing '{format}' format."); } - if (options.Format != "W" && Optional.IsCollectionDefined(Value)) + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) { - writer.WritePropertyName("value"u8); - writer.WriteStartArray(); - foreach (var item in Value) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); + writer.WriteObjectValue(item, options); } - if (options.Format != "W" && Optional.IsDefined(NextLink)) + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); + writer.WriteStringValue(NextLink.AbsoluteUri); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -87,17 +84,13 @@ internal static WorkloadNetworkGatewayList DeserializeWorkloadNetworkGatewayList return null; } IReadOnlyList value = default; - string nextLink = default; + Uri nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -108,7 +101,11 @@ internal static WorkloadNetworkGatewayList DeserializeWorkloadNetworkGatewayList } if (property.NameEquals("nextLink"u8)) { - nextLink = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); continue; } if (options.Format != "W") @@ -117,7 +114,7 @@ internal static WorkloadNetworkGatewayList DeserializeWorkloadNetworkGatewayList } } serializedAdditionalRawData = rawDataDictionary; - return new WorkloadNetworkGatewayList(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + return new WorkloadNetworkGatewayList(value, nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkGatewayList.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkGatewayList.cs index 8f36fcf501bd..91a4042bdf75 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkGatewayList.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkGatewayList.cs @@ -7,10 +7,11 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.ResourceManager.Avs.Models { - /// A list of NSX Gateways. + /// The response of a WorkloadNetworkGateway list operation. internal partial class WorkloadNetworkGatewayList { /// @@ -46,25 +47,34 @@ internal partial class WorkloadNetworkGatewayList private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal WorkloadNetworkGatewayList() + /// The WorkloadNetworkGateway items on this page. + /// is null. + internal WorkloadNetworkGatewayList(IEnumerable value) { - Value = new ChangeTrackingList(); + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); } /// Initializes a new instance of . - /// The items on the page. - /// URL to get the next page if any. + /// The WorkloadNetworkGateway items on this page. + /// The link to the next page of items. /// Keeps track of any properties unknown to the library. - internal WorkloadNetworkGatewayList(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal WorkloadNetworkGatewayList(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The items on the page. + /// Initializes a new instance of for deserialization. + internal WorkloadNetworkGatewayList() + { + } + + /// The WorkloadNetworkGateway items on this page. public IReadOnlyList Value { get; } - /// URL to get the next page if any. - public string NextLink { get; } + /// The link to the next page of items. + public Uri NextLink { get; } } } diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkList.Serialization.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkList.Serialization.cs index ebf86f7f5c0f..c80bf4bf7afb 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkList.Serialization.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkList.Serialization.cs @@ -34,20 +34,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(WorkloadNetworkList)} does not support writing '{format}' format."); } - if (options.Format != "W" && Optional.IsCollectionDefined(Value)) + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) { - writer.WritePropertyName("value"u8); - writer.WriteStartArray(); - foreach (var item in Value) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); + writer.WriteObjectValue(item, options); } - if (options.Format != "W" && Optional.IsDefined(NextLink)) + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); + writer.WriteStringValue(NextLink.AbsoluteUri); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -87,17 +84,13 @@ internal static WorkloadNetworkList DeserializeWorkloadNetworkList(JsonElement e return null; } IReadOnlyList value = default; - string nextLink = default; + Uri nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -108,7 +101,11 @@ internal static WorkloadNetworkList DeserializeWorkloadNetworkList(JsonElement e } if (property.NameEquals("nextLink"u8)) { - nextLink = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); continue; } if (options.Format != "W") @@ -117,7 +114,7 @@ internal static WorkloadNetworkList DeserializeWorkloadNetworkList(JsonElement e } } serializedAdditionalRawData = rawDataDictionary; - return new WorkloadNetworkList(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + return new WorkloadNetworkList(value, nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkList.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkList.cs index 767c51d34aa2..fc96e3cefef9 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkList.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkList.cs @@ -7,10 +7,11 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.ResourceManager.Avs.Models { - /// A list of workload networks. + /// The response of a WorkloadNetwork list operation. internal partial class WorkloadNetworkList { /// @@ -46,25 +47,34 @@ internal partial class WorkloadNetworkList private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal WorkloadNetworkList() + /// The WorkloadNetwork items on this page. + /// is null. + internal WorkloadNetworkList(IEnumerable value) { - Value = new ChangeTrackingList(); + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); } /// Initializes a new instance of . - /// The items on the page. - /// URL to get the next page if any. + /// The WorkloadNetwork items on this page. + /// The link to the next page of items. /// Keeps track of any properties unknown to the library. - internal WorkloadNetworkList(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal WorkloadNetworkList(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The items on the page. + /// Initializes a new instance of for deserialization. + internal WorkloadNetworkList() + { + } + + /// The WorkloadNetwork items on this page. public IReadOnlyList Value { get; } - /// URL to get the next page if any. - public string NextLink { get; } + /// The link to the next page of items. + public Uri NextLink { get; } } } diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkPortMirroringList.Serialization.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkPortMirroringList.Serialization.cs index f0be2663c1b0..7ff8908cabe9 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkPortMirroringList.Serialization.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkPortMirroringList.Serialization.cs @@ -34,20 +34,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(WorkloadNetworkPortMirroringList)} does not support writing '{format}' format."); } - if (options.Format != "W" && Optional.IsCollectionDefined(Value)) + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) { - writer.WritePropertyName("value"u8); - writer.WriteStartArray(); - foreach (var item in Value) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); + writer.WriteObjectValue(item, options); } - if (options.Format != "W" && Optional.IsDefined(NextLink)) + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); + writer.WriteStringValue(NextLink.AbsoluteUri); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -87,17 +84,13 @@ internal static WorkloadNetworkPortMirroringList DeserializeWorkloadNetworkPortM return null; } IReadOnlyList value = default; - string nextLink = default; + Uri nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -108,7 +101,11 @@ internal static WorkloadNetworkPortMirroringList DeserializeWorkloadNetworkPortM } if (property.NameEquals("nextLink"u8)) { - nextLink = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); continue; } if (options.Format != "W") @@ -117,7 +114,7 @@ internal static WorkloadNetworkPortMirroringList DeserializeWorkloadNetworkPortM } } serializedAdditionalRawData = rawDataDictionary; - return new WorkloadNetworkPortMirroringList(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + return new WorkloadNetworkPortMirroringList(value, nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkPortMirroringList.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkPortMirroringList.cs index 0a9acffb1ef0..5077aff247f2 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkPortMirroringList.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkPortMirroringList.cs @@ -7,10 +7,11 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.ResourceManager.Avs.Models { - /// A list of NSX Port Mirroring. + /// The response of a WorkloadNetworkPortMirroring list operation. internal partial class WorkloadNetworkPortMirroringList { /// @@ -46,25 +47,34 @@ internal partial class WorkloadNetworkPortMirroringList private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal WorkloadNetworkPortMirroringList() + /// The WorkloadNetworkPortMirroring items on this page. + /// is null. + internal WorkloadNetworkPortMirroringList(IEnumerable value) { - Value = new ChangeTrackingList(); + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); } /// Initializes a new instance of . - /// The items on the page. - /// URL to get the next page if any. + /// The WorkloadNetworkPortMirroring items on this page. + /// The link to the next page of items. /// Keeps track of any properties unknown to the library. - internal WorkloadNetworkPortMirroringList(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal WorkloadNetworkPortMirroringList(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The items on the page. + /// Initializes a new instance of for deserialization. + internal WorkloadNetworkPortMirroringList() + { + } + + /// The WorkloadNetworkPortMirroring items on this page. public IReadOnlyList Value { get; } - /// URL to get the next page if any. - public string NextLink { get; } + /// The link to the next page of items. + public Uri NextLink { get; } } } diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkPortMirroringProfileProvisioningState.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkPortMirroringProfileProvisioningState.cs index ae30ee08d0b5..f3e6f6d01ecf 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkPortMirroringProfileProvisioningState.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkPortMirroringProfileProvisioningState.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.Avs.Models { - /// The provisioning state. + /// Workload Network Port Mirroring provisioning state. public readonly partial struct WorkloadNetworkPortMirroringProfileProvisioningState : IEquatable { private readonly string _value; @@ -24,23 +24,23 @@ public WorkloadNetworkPortMirroringProfileProvisioningState(string value) private const string SucceededValue = "Succeeded"; private const string FailedValue = "Failed"; + private const string CanceledValue = "Canceled"; private const string BuildingValue = "Building"; private const string DeletingValue = "Deleting"; private const string UpdatingValue = "Updating"; - private const string CanceledValue = "Canceled"; - /// Succeeded. + /// Resource has been created. public static WorkloadNetworkPortMirroringProfileProvisioningState Succeeded { get; } = new WorkloadNetworkPortMirroringProfileProvisioningState(SucceededValue); - /// Failed. + /// Resource creation failed. public static WorkloadNetworkPortMirroringProfileProvisioningState Failed { get; } = new WorkloadNetworkPortMirroringProfileProvisioningState(FailedValue); - /// Building. + /// Resource creation was canceled. + public static WorkloadNetworkPortMirroringProfileProvisioningState Canceled { get; } = new WorkloadNetworkPortMirroringProfileProvisioningState(CanceledValue); + /// is building. public static WorkloadNetworkPortMirroringProfileProvisioningState Building { get; } = new WorkloadNetworkPortMirroringProfileProvisioningState(BuildingValue); - /// Deleting. + /// is deleting. public static WorkloadNetworkPortMirroringProfileProvisioningState Deleting { get; } = new WorkloadNetworkPortMirroringProfileProvisioningState(DeletingValue); - /// Updating. + /// is updating. public static WorkloadNetworkPortMirroringProfileProvisioningState Updating { get; } = new WorkloadNetworkPortMirroringProfileProvisioningState(UpdatingValue); - /// Canceled. - public static WorkloadNetworkPortMirroringProfileProvisioningState Canceled { get; } = new WorkloadNetworkPortMirroringProfileProvisioningState(CanceledValue); /// Determines if two values are the same. public static bool operator ==(WorkloadNetworkPortMirroringProfileProvisioningState left, WorkloadNetworkPortMirroringProfileProvisioningState right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkProvisioningState.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkProvisioningState.cs new file mode 100644 index 000000000000..c3bffc301b3a --- /dev/null +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkProvisioningState.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.Avs.Models +{ + /// base Workload Network provisioning state. + public readonly partial struct WorkloadNetworkProvisioningState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public WorkloadNetworkProvisioningState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SucceededValue = "Succeeded"; + private const string FailedValue = "Failed"; + private const string CanceledValue = "Canceled"; + private const string BuildingValue = "Building"; + private const string DeletingValue = "Deleting"; + private const string UpdatingValue = "Updating"; + + /// Resource has been created. + public static WorkloadNetworkProvisioningState Succeeded { get; } = new WorkloadNetworkProvisioningState(SucceededValue); + /// Resource creation failed. + public static WorkloadNetworkProvisioningState Failed { get; } = new WorkloadNetworkProvisioningState(FailedValue); + /// Resource creation was canceled. + public static WorkloadNetworkProvisioningState Canceled { get; } = new WorkloadNetworkProvisioningState(CanceledValue); + /// is building. + public static WorkloadNetworkProvisioningState Building { get; } = new WorkloadNetworkProvisioningState(BuildingValue); + /// is deleting. + public static WorkloadNetworkProvisioningState Deleting { get; } = new WorkloadNetworkProvisioningState(DeletingValue); + /// is updating. + public static WorkloadNetworkProvisioningState Updating { get; } = new WorkloadNetworkProvisioningState(UpdatingValue); + /// Determines if two values are the same. + public static bool operator ==(WorkloadNetworkProvisioningState left, WorkloadNetworkProvisioningState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(WorkloadNetworkProvisioningState left, WorkloadNetworkProvisioningState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator WorkloadNetworkProvisioningState(string value) => new WorkloadNetworkProvisioningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is WorkloadNetworkProvisioningState other && Equals(other); + /// + public bool Equals(WorkloadNetworkProvisioningState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkPublicIPProvisioningState.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkPublicIPProvisioningState.cs index 49179b5d2d6f..26dc407e48a4 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkPublicIPProvisioningState.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkPublicIPProvisioningState.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.Avs.Models { - /// The provisioning state. + /// Workload Network Public IP provisioning state. public readonly partial struct WorkloadNetworkPublicIPProvisioningState : IEquatable { private readonly string _value; @@ -24,23 +24,23 @@ public WorkloadNetworkPublicIPProvisioningState(string value) private const string SucceededValue = "Succeeded"; private const string FailedValue = "Failed"; + private const string CanceledValue = "Canceled"; private const string BuildingValue = "Building"; private const string DeletingValue = "Deleting"; private const string UpdatingValue = "Updating"; - private const string CanceledValue = "Canceled"; - /// Succeeded. + /// Resource has been created. public static WorkloadNetworkPublicIPProvisioningState Succeeded { get; } = new WorkloadNetworkPublicIPProvisioningState(SucceededValue); - /// Failed. + /// Resource creation failed. public static WorkloadNetworkPublicIPProvisioningState Failed { get; } = new WorkloadNetworkPublicIPProvisioningState(FailedValue); - /// Building. + /// Resource creation was canceled. + public static WorkloadNetworkPublicIPProvisioningState Canceled { get; } = new WorkloadNetworkPublicIPProvisioningState(CanceledValue); + /// is building. public static WorkloadNetworkPublicIPProvisioningState Building { get; } = new WorkloadNetworkPublicIPProvisioningState(BuildingValue); - /// Deleting. + /// is deleting. public static WorkloadNetworkPublicIPProvisioningState Deleting { get; } = new WorkloadNetworkPublicIPProvisioningState(DeletingValue); - /// Updating. + /// is updating. public static WorkloadNetworkPublicIPProvisioningState Updating { get; } = new WorkloadNetworkPublicIPProvisioningState(UpdatingValue); - /// Canceled. - public static WorkloadNetworkPublicIPProvisioningState Canceled { get; } = new WorkloadNetworkPublicIPProvisioningState(CanceledValue); /// Determines if two values are the same. public static bool operator ==(WorkloadNetworkPublicIPProvisioningState left, WorkloadNetworkPublicIPProvisioningState right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkPublicIPsList.Serialization.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkPublicIPsList.Serialization.cs index 8b7af668bde8..004398d48198 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkPublicIPsList.Serialization.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkPublicIPsList.Serialization.cs @@ -34,20 +34,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(WorkloadNetworkPublicIPsList)} does not support writing '{format}' format."); } - if (options.Format != "W" && Optional.IsCollectionDefined(Value)) + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) { - writer.WritePropertyName("value"u8); - writer.WriteStartArray(); - foreach (var item in Value) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); + writer.WriteObjectValue(item, options); } - if (options.Format != "W" && Optional.IsDefined(NextLink)) + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); + writer.WriteStringValue(NextLink.AbsoluteUri); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -87,17 +84,13 @@ internal static WorkloadNetworkPublicIPsList DeserializeWorkloadNetworkPublicIPs return null; } IReadOnlyList value = default; - string nextLink = default; + Uri nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -108,7 +101,11 @@ internal static WorkloadNetworkPublicIPsList DeserializeWorkloadNetworkPublicIPs } if (property.NameEquals("nextLink"u8)) { - nextLink = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); continue; } if (options.Format != "W") @@ -117,7 +114,7 @@ internal static WorkloadNetworkPublicIPsList DeserializeWorkloadNetworkPublicIPs } } serializedAdditionalRawData = rawDataDictionary; - return new WorkloadNetworkPublicIPsList(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + return new WorkloadNetworkPublicIPsList(value, nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkPublicIPsList.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkPublicIPsList.cs index fa951f266261..757f010d9747 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkPublicIPsList.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkPublicIPsList.cs @@ -7,10 +7,11 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.ResourceManager.Avs.Models { - /// A list of NSX Public IP Blocks. + /// The response of a WorkloadNetworkPublicIP list operation. internal partial class WorkloadNetworkPublicIPsList { /// @@ -46,25 +47,34 @@ internal partial class WorkloadNetworkPublicIPsList private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal WorkloadNetworkPublicIPsList() + /// The WorkloadNetworkPublicIP items on this page. + /// is null. + internal WorkloadNetworkPublicIPsList(IEnumerable value) { - Value = new ChangeTrackingList(); + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); } /// Initializes a new instance of . - /// The items on the page. - /// URL to get the next page if any. + /// The WorkloadNetworkPublicIP items on this page. + /// The link to the next page of items. /// Keeps track of any properties unknown to the library. - internal WorkloadNetworkPublicIPsList(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal WorkloadNetworkPublicIPsList(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The items on the page. + /// Initializes a new instance of for deserialization. + internal WorkloadNetworkPublicIPsList() + { + } + + /// The WorkloadNetworkPublicIP items on this page. public IReadOnlyList Value { get; } - /// URL to get the next page if any. - public string NextLink { get; } + /// The link to the next page of items. + public Uri NextLink { get; } } } diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkSegmentProvisioningState.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkSegmentProvisioningState.cs index 6ccc3fd5017d..dbc7ae321600 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkSegmentProvisioningState.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkSegmentProvisioningState.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.Avs.Models { - /// The provisioning state. + /// Workload Network Segment provisioning state. public readonly partial struct WorkloadNetworkSegmentProvisioningState : IEquatable { private readonly string _value; @@ -24,23 +24,23 @@ public WorkloadNetworkSegmentProvisioningState(string value) private const string SucceededValue = "Succeeded"; private const string FailedValue = "Failed"; + private const string CanceledValue = "Canceled"; private const string BuildingValue = "Building"; private const string DeletingValue = "Deleting"; private const string UpdatingValue = "Updating"; - private const string CanceledValue = "Canceled"; - /// Succeeded. + /// Resource has been created. public static WorkloadNetworkSegmentProvisioningState Succeeded { get; } = new WorkloadNetworkSegmentProvisioningState(SucceededValue); - /// Failed. + /// Resource creation failed. public static WorkloadNetworkSegmentProvisioningState Failed { get; } = new WorkloadNetworkSegmentProvisioningState(FailedValue); - /// Building. + /// Resource creation was canceled. + public static WorkloadNetworkSegmentProvisioningState Canceled { get; } = new WorkloadNetworkSegmentProvisioningState(CanceledValue); + /// is building. public static WorkloadNetworkSegmentProvisioningState Building { get; } = new WorkloadNetworkSegmentProvisioningState(BuildingValue); - /// Deleting. + /// is deleting. public static WorkloadNetworkSegmentProvisioningState Deleting { get; } = new WorkloadNetworkSegmentProvisioningState(DeletingValue); - /// Updating. + /// is updating. public static WorkloadNetworkSegmentProvisioningState Updating { get; } = new WorkloadNetworkSegmentProvisioningState(UpdatingValue); - /// Canceled. - public static WorkloadNetworkSegmentProvisioningState Canceled { get; } = new WorkloadNetworkSegmentProvisioningState(CanceledValue); /// Determines if two values are the same. public static bool operator ==(WorkloadNetworkSegmentProvisioningState left, WorkloadNetworkSegmentProvisioningState right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkSegmentStatus.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkSegmentStatus.cs index 3cb491527511..4e5141b66c4b 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkSegmentStatus.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkSegmentStatus.cs @@ -25,9 +25,9 @@ public WorkloadNetworkSegmentStatus(string value) private const string SuccessValue = "SUCCESS"; private const string FailureValue = "FAILURE"; - /// SUCCESS. + /// is success. public static WorkloadNetworkSegmentStatus Success { get; } = new WorkloadNetworkSegmentStatus(SuccessValue); - /// FAILURE. + /// is failure. public static WorkloadNetworkSegmentStatus Failure { get; } = new WorkloadNetworkSegmentStatus(FailureValue); /// Determines if two values are the same. public static bool operator ==(WorkloadNetworkSegmentStatus left, WorkloadNetworkSegmentStatus right) => left.Equals(right); diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkSegmentsList.Serialization.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkSegmentsList.Serialization.cs index 4dea787df0ae..1d9596a64b38 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkSegmentsList.Serialization.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkSegmentsList.Serialization.cs @@ -34,20 +34,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(WorkloadNetworkSegmentsList)} does not support writing '{format}' format."); } - if (options.Format != "W" && Optional.IsCollectionDefined(Value)) + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) { - writer.WritePropertyName("value"u8); - writer.WriteStartArray(); - foreach (var item in Value) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); + writer.WriteObjectValue(item, options); } - if (options.Format != "W" && Optional.IsDefined(NextLink)) + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); + writer.WriteStringValue(NextLink.AbsoluteUri); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -87,17 +84,13 @@ internal static WorkloadNetworkSegmentsList DeserializeWorkloadNetworkSegmentsLi return null; } IReadOnlyList value = default; - string nextLink = default; + Uri nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -108,7 +101,11 @@ internal static WorkloadNetworkSegmentsList DeserializeWorkloadNetworkSegmentsLi } if (property.NameEquals("nextLink"u8)) { - nextLink = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); continue; } if (options.Format != "W") @@ -117,7 +114,7 @@ internal static WorkloadNetworkSegmentsList DeserializeWorkloadNetworkSegmentsLi } } serializedAdditionalRawData = rawDataDictionary; - return new WorkloadNetworkSegmentsList(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + return new WorkloadNetworkSegmentsList(value, nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkSegmentsList.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkSegmentsList.cs index 686be3832243..290cc2794f9b 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkSegmentsList.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkSegmentsList.cs @@ -7,10 +7,11 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.ResourceManager.Avs.Models { - /// A list of NSX Segments. + /// The response of a WorkloadNetworkSegment list operation. internal partial class WorkloadNetworkSegmentsList { /// @@ -46,25 +47,34 @@ internal partial class WorkloadNetworkSegmentsList private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal WorkloadNetworkSegmentsList() + /// The WorkloadNetworkSegment items on this page. + /// is null. + internal WorkloadNetworkSegmentsList(IEnumerable value) { - Value = new ChangeTrackingList(); + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); } /// Initializes a new instance of . - /// The items on the page. - /// URL to get the next page if any. + /// The WorkloadNetworkSegment items on this page. + /// The link to the next page of items. /// Keeps track of any properties unknown to the library. - internal WorkloadNetworkSegmentsList(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal WorkloadNetworkSegmentsList(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The items on the page. + /// Initializes a new instance of for deserialization. + internal WorkloadNetworkSegmentsList() + { + } + + /// The WorkloadNetworkSegment items on this page. public IReadOnlyList Value { get; } - /// URL to get the next page if any. - public string NextLink { get; } + /// The link to the next page of items. + public Uri NextLink { get; } } } diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkVirtualMachinesList.Serialization.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkVirtualMachinesList.Serialization.cs index 9a657d5984a3..b535d1a79af5 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkVirtualMachinesList.Serialization.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkVirtualMachinesList.Serialization.cs @@ -34,20 +34,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(WorkloadNetworkVirtualMachinesList)} does not support writing '{format}' format."); } - if (options.Format != "W" && Optional.IsCollectionDefined(Value)) + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) { - writer.WritePropertyName("value"u8); - writer.WriteStartArray(); - foreach (var item in Value) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); + writer.WriteObjectValue(item, options); } - if (options.Format != "W" && Optional.IsDefined(NextLink)) + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); + writer.WriteStringValue(NextLink.AbsoluteUri); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -87,17 +84,13 @@ internal static WorkloadNetworkVirtualMachinesList DeserializeWorkloadNetworkVir return null; } IReadOnlyList value = default; - string nextLink = default; + Uri nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -108,7 +101,11 @@ internal static WorkloadNetworkVirtualMachinesList DeserializeWorkloadNetworkVir } if (property.NameEquals("nextLink"u8)) { - nextLink = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); continue; } if (options.Format != "W") @@ -117,7 +114,7 @@ internal static WorkloadNetworkVirtualMachinesList DeserializeWorkloadNetworkVir } } serializedAdditionalRawData = rawDataDictionary; - return new WorkloadNetworkVirtualMachinesList(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + return new WorkloadNetworkVirtualMachinesList(value, nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkVirtualMachinesList.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkVirtualMachinesList.cs index fef60a320a3e..1da50da469be 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkVirtualMachinesList.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkVirtualMachinesList.cs @@ -7,10 +7,11 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.ResourceManager.Avs.Models { - /// A list of NSX Virtual Machines. + /// The response of a WorkloadNetworkVirtualMachine list operation. internal partial class WorkloadNetworkVirtualMachinesList { /// @@ -46,25 +47,34 @@ internal partial class WorkloadNetworkVirtualMachinesList private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal WorkloadNetworkVirtualMachinesList() + /// The WorkloadNetworkVirtualMachine items on this page. + /// is null. + internal WorkloadNetworkVirtualMachinesList(IEnumerable value) { - Value = new ChangeTrackingList(); + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); } /// Initializes a new instance of . - /// The items on the page. - /// URL to get the next page if any. + /// The WorkloadNetworkVirtualMachine items on this page. + /// The link to the next page of items. /// Keeps track of any properties unknown to the library. - internal WorkloadNetworkVirtualMachinesList(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal WorkloadNetworkVirtualMachinesList(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The items on the page. + /// Initializes a new instance of for deserialization. + internal WorkloadNetworkVirtualMachinesList() + { + } + + /// The WorkloadNetworkVirtualMachine items on this page. public IReadOnlyList Value { get; } - /// URL to get the next page if any. - public string NextLink { get; } + /// The link to the next page of items. + public Uri NextLink { get; } } } diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkVmGroupProvisioningState.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkVmGroupProvisioningState.cs index 2a2f39071503..aa0f43030c37 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkVmGroupProvisioningState.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkVmGroupProvisioningState.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.Avs.Models { - /// The provisioning state. + /// Workload Network VM Group provisioning state. public readonly partial struct WorkloadNetworkVmGroupProvisioningState : IEquatable { private readonly string _value; @@ -24,23 +24,23 @@ public WorkloadNetworkVmGroupProvisioningState(string value) private const string SucceededValue = "Succeeded"; private const string FailedValue = "Failed"; + private const string CanceledValue = "Canceled"; private const string BuildingValue = "Building"; private const string DeletingValue = "Deleting"; private const string UpdatingValue = "Updating"; - private const string CanceledValue = "Canceled"; - /// Succeeded. + /// Resource has been created. public static WorkloadNetworkVmGroupProvisioningState Succeeded { get; } = new WorkloadNetworkVmGroupProvisioningState(SucceededValue); - /// Failed. + /// Resource creation failed. public static WorkloadNetworkVmGroupProvisioningState Failed { get; } = new WorkloadNetworkVmGroupProvisioningState(FailedValue); - /// Building. + /// Resource creation was canceled. + public static WorkloadNetworkVmGroupProvisioningState Canceled { get; } = new WorkloadNetworkVmGroupProvisioningState(CanceledValue); + /// is building. public static WorkloadNetworkVmGroupProvisioningState Building { get; } = new WorkloadNetworkVmGroupProvisioningState(BuildingValue); - /// Deleting. + /// is deleting. public static WorkloadNetworkVmGroupProvisioningState Deleting { get; } = new WorkloadNetworkVmGroupProvisioningState(DeletingValue); - /// Updating. + /// is updating. public static WorkloadNetworkVmGroupProvisioningState Updating { get; } = new WorkloadNetworkVmGroupProvisioningState(UpdatingValue); - /// Canceled. - public static WorkloadNetworkVmGroupProvisioningState Canceled { get; } = new WorkloadNetworkVmGroupProvisioningState(CanceledValue); /// Determines if two values are the same. public static bool operator ==(WorkloadNetworkVmGroupProvisioningState left, WorkloadNetworkVmGroupProvisioningState right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkVmGroupStatus.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkVmGroupStatus.cs index 59f42174f5e4..99a01aaef942 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkVmGroupStatus.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkVmGroupStatus.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.Avs.Models { - /// VM Group status. + /// VM group status. public readonly partial struct WorkloadNetworkVmGroupStatus : IEquatable { private readonly string _value; @@ -25,9 +25,9 @@ public WorkloadNetworkVmGroupStatus(string value) private const string SuccessValue = "SUCCESS"; private const string FailureValue = "FAILURE"; - /// SUCCESS. + /// is success. public static WorkloadNetworkVmGroupStatus Success { get; } = new WorkloadNetworkVmGroupStatus(SuccessValue); - /// FAILURE. + /// is failure. public static WorkloadNetworkVmGroupStatus Failure { get; } = new WorkloadNetworkVmGroupStatus(FailureValue); /// Determines if two values are the same. public static bool operator ==(WorkloadNetworkVmGroupStatus left, WorkloadNetworkVmGroupStatus right) => left.Equals(right); diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkVmGroupsList.Serialization.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkVmGroupsList.Serialization.cs index 86bce6fc8c68..9f32cad6c00e 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkVmGroupsList.Serialization.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkVmGroupsList.Serialization.cs @@ -34,20 +34,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(WorkloadNetworkVmGroupsList)} does not support writing '{format}' format."); } - if (options.Format != "W" && Optional.IsCollectionDefined(Value)) + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) { - writer.WritePropertyName("value"u8); - writer.WriteStartArray(); - foreach (var item in Value) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); + writer.WriteObjectValue(item, options); } - if (options.Format != "W" && Optional.IsDefined(NextLink)) + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); + writer.WriteStringValue(NextLink.AbsoluteUri); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -87,17 +84,13 @@ internal static WorkloadNetworkVmGroupsList DeserializeWorkloadNetworkVmGroupsLi return null; } IReadOnlyList value = default; - string nextLink = default; + Uri nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -108,7 +101,11 @@ internal static WorkloadNetworkVmGroupsList DeserializeWorkloadNetworkVmGroupsLi } if (property.NameEquals("nextLink"u8)) { - nextLink = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); continue; } if (options.Format != "W") @@ -117,7 +114,7 @@ internal static WorkloadNetworkVmGroupsList DeserializeWorkloadNetworkVmGroupsLi } } serializedAdditionalRawData = rawDataDictionary; - return new WorkloadNetworkVmGroupsList(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + return new WorkloadNetworkVmGroupsList(value, nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkVmGroupsList.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkVmGroupsList.cs index 92476321b652..01e927e5d2ef 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkVmGroupsList.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkVmGroupsList.cs @@ -7,10 +7,11 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.ResourceManager.Avs.Models { - /// A list of NSX VM Groups. + /// The response of a WorkloadNetworkVMGroup list operation. internal partial class WorkloadNetworkVmGroupsList { /// @@ -46,25 +47,34 @@ internal partial class WorkloadNetworkVmGroupsList private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal WorkloadNetworkVmGroupsList() + /// The WorkloadNetworkVMGroup items on this page. + /// is null. + internal WorkloadNetworkVmGroupsList(IEnumerable value) { - Value = new ChangeTrackingList(); + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); } /// Initializes a new instance of . - /// The items on the page. - /// URL to get the next page if any. + /// The WorkloadNetworkVMGroup items on this page. + /// The link to the next page of items. /// Keeps track of any properties unknown to the library. - internal WorkloadNetworkVmGroupsList(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal WorkloadNetworkVmGroupsList(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The items on the page. + /// Initializes a new instance of for deserialization. + internal WorkloadNetworkVmGroupsList() + { + } + + /// The WorkloadNetworkVMGroup items on this page. public IReadOnlyList Value { get; } - /// URL to get the next page if any. - public string NextLink { get; } + /// The link to the next page of items. + public Uri NextLink { get; } } } diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkVmType.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkVmType.cs index 0fe9b0c4aea6..4de720cc0e5f 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkVmType.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Models/WorkloadNetworkVmType.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.Avs.Models { - /// Virtual machine type. + /// VM type. public readonly partial struct WorkloadNetworkVmType : IEquatable { private readonly string _value; @@ -26,11 +26,11 @@ public WorkloadNetworkVmType(string value) private const string EdgeValue = "EDGE"; private const string ServiceValue = "SERVICE"; - /// REGULAR. + /// is regular. public static WorkloadNetworkVmType Regular { get; } = new WorkloadNetworkVmType(RegularValue); - /// EDGE. + /// is edge. public static WorkloadNetworkVmType Edge { get; } = new WorkloadNetworkVmType(EdgeValue); - /// SERVICE. + /// is service. public static WorkloadNetworkVmType Service { get; } = new WorkloadNetworkVmType(ServiceValue); /// Determines if two values are the same. public static bool operator ==(WorkloadNetworkVmType left, WorkloadNetworkVmType right) => left.Equals(right); diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/PlacementPolicyCollection.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/PlacementPolicyCollection.cs index b30a785e7d03..292f843e9d49 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/PlacementPolicyCollection.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/PlacementPolicyCollection.cs @@ -52,7 +52,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) } /// - /// Create or update a placement policy in a private cloud cluster + /// Create a PlacementPolicy /// /// /// Request Path @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -73,8 +73,8 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. - /// A placement policy in the private cloud cluster. + /// Name of the placement policy. + /// Resource create parameters. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// or is null. @@ -88,7 +88,7 @@ public virtual async Task> CreateOrUpdateA try { var response = await _placementPolicyRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, placementPolicyName, data, cancellationToken).ConfigureAwait(false); - var operation = new AvsArmOperation(new PlacementPolicyOperationSource(Client), _placementPolicyClientDiagnostics, Pipeline, _placementPolicyRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, placementPolicyName, data).Request, response, OperationFinalStateVia.Location); + var operation = new AvsArmOperation(new PlacementPolicyOperationSource(Client), _placementPolicyClientDiagnostics, Pipeline, _placementPolicyRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, placementPolicyName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -101,7 +101,7 @@ public virtual async Task> CreateOrUpdateA } /// - /// Create or update a placement policy in a private cloud cluster + /// Create a PlacementPolicy /// /// /// Request Path @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUpdateA /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -122,8 +122,8 @@ public virtual async Task> CreateOrUpdateA /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. - /// A placement policy in the private cloud cluster. + /// Name of the placement policy. + /// Resource create parameters. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// or is null. @@ -137,7 +137,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wa try { var response = _placementPolicyRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, placementPolicyName, data, cancellationToken); - var operation = new AvsArmOperation(new PlacementPolicyOperationSource(Client), _placementPolicyClientDiagnostics, Pipeline, _placementPolicyRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, placementPolicyName, data).Request, response, OperationFinalStateVia.Location); + var operation = new AvsArmOperation(new PlacementPolicyOperationSource(Client), _placementPolicyClientDiagnostics, Pipeline, _placementPolicyRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, placementPolicyName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -150,7 +150,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wa } /// - /// Get a placement policy by name in a private cloud cluster + /// Get a PlacementPolicy /// /// /// Request Path @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wa /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -170,7 +170,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wa /// /// /// - /// Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. + /// Name of the placement policy. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -195,7 +195,7 @@ public virtual async Task> GetAsync(string pla } /// - /// Get a placement policy by name in a private cloud cluster + /// Get a PlacementPolicy /// /// /// Request Path @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(string pla /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -215,7 +215,7 @@ public virtual async Task> GetAsync(string pla /// /// /// - /// Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. + /// Name of the placement policy. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -240,7 +240,7 @@ public virtual Response Get(string placementPolicyName, } /// - /// List placement policies in a private cloud cluster + /// List PlacementPolicy resources by Cluster /// /// /// Request Path @@ -252,7 +252,7 @@ public virtual Response Get(string placementPolicyName, /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -270,7 +270,7 @@ public virtual AsyncPageable GetAllAsync(CancellationTo } /// - /// List placement policies in a private cloud cluster + /// List PlacementPolicy resources by Cluster /// /// /// Request Path @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(CancellationTo /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken cancel /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -320,7 +320,7 @@ public virtual Pageable GetAll(CancellationToken cancel /// /// /// - /// Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. + /// Name of the placement policy. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string placementPolicyName /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -363,7 +363,7 @@ public virtual async Task> ExistsAsync(string placementPolicyName /// /// /// - /// Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. + /// Name of the placement policy. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -398,7 +398,7 @@ public virtual Response Exists(string placementPolicyName, CancellationTok /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -406,7 +406,7 @@ public virtual Response Exists(string placementPolicyName, CancellationTok /// /// /// - /// Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. + /// Name of the placement policy. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -443,7 +443,7 @@ public virtual async Task> GetIfExists /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -451,7 +451,7 @@ public virtual async Task> GetIfExists /// /// /// - /// Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. + /// Name of the placement policy. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/PlacementPolicyData.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/PlacementPolicyData.cs index 6248f9c7ded0..1803f4098840 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/PlacementPolicyData.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/PlacementPolicyData.cs @@ -62,7 +62,7 @@ public PlacementPolicyData() /// The resourceType. /// The systemData. /// - /// placement policy properties + /// The resource-specific properties for this resource. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include and . /// @@ -74,7 +74,7 @@ internal PlacementPolicyData(ResourceIdentifier id, string name, ResourceType re } /// - /// placement policy properties + /// The resource-specific properties for this resource. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include and . /// diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/PlacementPolicyResource.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/PlacementPolicyResource.cs index 1b31e9b8d6f1..8f28aedd0dcd 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/PlacementPolicyResource.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/PlacementPolicyResource.cs @@ -91,7 +91,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) } /// - /// Get a placement policy by name in a private cloud cluster + /// Get a PlacementPolicy /// /// /// Request Path @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -131,7 +131,7 @@ public virtual async Task> GetAsync(Cancellati } /// - /// Get a placement policy by name in a private cloud cluster + /// Get a PlacementPolicy /// /// /// Request Path @@ -143,7 +143,7 @@ public virtual async Task> GetAsync(Cancellati /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -171,7 +171,7 @@ public virtual Response Get(CancellationToken cancellat } /// - /// Delete a placement policy in a private cloud cluster + /// Delete a PlacementPolicy /// /// /// Request Path @@ -183,7 +183,7 @@ public virtual Response Get(CancellationToken cancellat /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -213,7 +213,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell } /// - /// Delete a placement policy in a private cloud cluster + /// Delete a PlacementPolicy /// /// /// Request Path @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -255,7 +255,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel } /// - /// Update a placement policy in a private cloud cluster + /// Update a PlacementPolicy /// /// /// Request Path @@ -267,7 +267,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -276,7 +276,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The placement policy properties that may be updated. + /// The placement policy properties to be updated. /// The cancellation token to use. /// is null. public virtual async Task> UpdateAsync(WaitUntil waitUntil, PlacementPolicyPatch patch, CancellationToken cancellationToken = default) @@ -301,7 +301,7 @@ public virtual async Task> UpdateAsync(Wai } /// - /// Update a placement policy in a private cloud cluster + /// Update a PlacementPolicy /// /// /// Request Path @@ -313,7 +313,7 @@ public virtual async Task> UpdateAsync(Wai /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -322,7 +322,7 @@ public virtual async Task> UpdateAsync(Wai /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The placement policy properties that may be updated. + /// The placement policy properties to be updated. /// The cancellation token to use. /// is null. public virtual ArmOperation Update(WaitUntil waitUntil, PlacementPolicyPatch patch, CancellationToken cancellationToken = default) diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/RestOperations/AddonsRestOperations.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/RestOperations/AddonsRestOperations.cs index daa76d17fb98..9d59b7d0e723 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/RestOperations/AddonsRestOperations.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/RestOperations/AddonsRestOperations.cs @@ -32,7 +32,7 @@ public AddonsRestOperations(HttpPipeline pipeline, string applicationId, Uri end { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01"; + _apiVersion = apiVersion ?? "2023-09-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -72,8 +72,8 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro return message; } - /// List addons in a private cloud. - /// The ID of the target subscription. + /// List Addon resources by PrivateCloud. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. /// The cancellation token to use. @@ -101,8 +101,8 @@ public async Task> ListAsync(string subscriptionId, string r } } - /// List addons in a private cloud. - /// The ID of the target subscription. + /// List Addon resources by PrivateCloud. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. /// The cancellation token to use. @@ -168,11 +168,11 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou return message; } - /// Get an addon by name in a private cloud. - /// The ID of the target subscription. + /// Get a Addon. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// Name of the addon for the private cloud. + /// Name of the addon. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -201,11 +201,11 @@ public async Task> GetAsync(string subscripti } } - /// Get an addon by name in a private cloud. - /// The ID of the target subscription. + /// Get a Addon. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// Name of the addon for the private cloud. + /// Name of the addon. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -276,12 +276,12 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r return message; } - /// Create or update a addon in a private cloud. - /// The ID of the target subscription. + /// Create a Addon. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// The name of the private cloud. - /// Name of the addon for the private cloud. - /// A addon in the private cloud. + /// Name of the private cloud. + /// Name of the addon. + /// Resource create parameters. /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -305,12 +305,12 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re } } - /// Create or update a addon in a private cloud. - /// The ID of the target subscription. + /// Create a Addon. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// The name of the private cloud. - /// Name of the addon for the private cloud. - /// A addon in the private cloud. + /// Name of the private cloud. + /// Name of the addon. + /// Resource create parameters. /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -372,11 +372,11 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG return message; } - /// Delete a addon in a private cloud. - /// The ID of the target subscription. + /// Delete a Addon. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// Name of the addon for the private cloud. + /// Name of the addon. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -400,11 +400,11 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } } - /// Delete a addon in a private cloud. - /// The ID of the target subscription. + /// Delete a Addon. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// Name of the addon for the private cloud. + /// Name of the addon. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -450,9 +450,9 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript return message; } - /// List addons in a private cloud. + /// List Addon resources by PrivateCloud. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. /// The cancellation token to use. @@ -481,9 +481,9 @@ public async Task> ListNextPageAsync(string nextLink, string } } - /// List addons in a private cloud. + /// List Addon resources by PrivateCloud. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. /// The cancellation token to use. diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/RestOperations/AuthorizationsRestOperations.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/RestOperations/AuthorizationsRestOperations.cs index a84b4dcc14d0..39fae4629241 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/RestOperations/AuthorizationsRestOperations.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/RestOperations/AuthorizationsRestOperations.cs @@ -32,7 +32,7 @@ public AuthorizationsRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01"; + _apiVersion = apiVersion ?? "2023-09-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -72,8 +72,8 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro return message; } - /// List ExpressRoute Circuit Authorizations in a private cloud. - /// The ID of the target subscription. + /// List ExpressRouteAuthorization resources by PrivateCloud. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. /// The cancellation token to use. @@ -101,8 +101,8 @@ public async Task> ListAsync(string subs } } - /// List ExpressRoute Circuit Authorizations in a private cloud. - /// The ID of the target subscription. + /// List ExpressRouteAuthorization resources by PrivateCloud. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. /// The cancellation token to use. @@ -168,11 +168,11 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou return message; } - /// Get an ExpressRoute Circuit Authorization by name in a private cloud. - /// The ID of the target subscription. + /// Get a ExpressRouteAuthorization. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// Name of the ExpressRoute Circuit Authorization in the private cloud. + /// Name of the ExpressRoute Circuit Authorization. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -201,11 +201,11 @@ public async Task> GetAsync(string subsc } } - /// Get an ExpressRoute Circuit Authorization by name in a private cloud. - /// The ID of the target subscription. + /// Get a ExpressRouteAuthorization. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// Name of the ExpressRoute Circuit Authorization in the private cloud. + /// Name of the ExpressRoute Circuit Authorization. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -276,12 +276,12 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r return message; } - /// Create or update an ExpressRoute Circuit Authorization in a private cloud. - /// The ID of the target subscription. + /// Create a ExpressRouteAuthorization. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// The name of the private cloud. - /// Name of the ExpressRoute Circuit Authorization in the private cloud. - /// An ExpressRoute Circuit Authorization. + /// Name of the private cloud. + /// Name of the ExpressRoute Circuit Authorization. + /// Resource create parameters. /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -305,12 +305,12 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re } } - /// Create or update an ExpressRoute Circuit Authorization in a private cloud. - /// The ID of the target subscription. + /// Create a ExpressRouteAuthorization. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// The name of the private cloud. - /// Name of the ExpressRoute Circuit Authorization in the private cloud. - /// An ExpressRoute Circuit Authorization. + /// Name of the private cloud. + /// Name of the ExpressRoute Circuit Authorization. + /// Resource create parameters. /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -372,11 +372,11 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG return message; } - /// Delete an ExpressRoute Circuit Authorization in a private cloud. - /// The ID of the target subscription. + /// Delete a ExpressRouteAuthorization. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// Name of the ExpressRoute Circuit Authorization in the private cloud. + /// Name of the ExpressRoute Circuit Authorization. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -400,11 +400,11 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } } - /// Delete an ExpressRoute Circuit Authorization in a private cloud. - /// The ID of the target subscription. + /// Delete a ExpressRouteAuthorization. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// Name of the ExpressRoute Circuit Authorization in the private cloud. + /// Name of the ExpressRoute Circuit Authorization. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -450,9 +450,9 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript return message; } - /// List ExpressRoute Circuit Authorizations in a private cloud. + /// List ExpressRouteAuthorization resources by PrivateCloud. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. /// The cancellation token to use. @@ -481,9 +481,9 @@ public async Task> ListNextPageAsync(str } } - /// List ExpressRoute Circuit Authorizations in a private cloud. + /// List ExpressRouteAuthorization resources by PrivateCloud. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. /// The cancellation token to use. diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/RestOperations/CloudLinksRestOperations.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/RestOperations/CloudLinksRestOperations.cs index dfa02117f16e..7d19d6809ee2 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/RestOperations/CloudLinksRestOperations.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/RestOperations/CloudLinksRestOperations.cs @@ -32,7 +32,7 @@ public CloudLinksRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01"; + _apiVersion = apiVersion ?? "2023-09-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -72,8 +72,8 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro return message; } - /// List cloud link in a private cloud. - /// The ID of the target subscription. + /// List CloudLink resources by PrivateCloud. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. /// The cancellation token to use. @@ -101,8 +101,8 @@ public async Task> ListAsync(string subscriptionId, stri } } - /// List cloud link in a private cloud. - /// The ID of the target subscription. + /// List CloudLink resources by PrivateCloud. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. /// The cancellation token to use. @@ -168,11 +168,11 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou return message; } - /// Get an cloud link by name in a private cloud. - /// The ID of the target subscription. + /// Get a CloudLink. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// Name of the cloud link resource. + /// Name of the cloud link. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -201,11 +201,11 @@ public async Task> GetAsync(string subscriptionId, st } } - /// Get an cloud link by name in a private cloud. - /// The ID of the target subscription. + /// Get a CloudLink. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// Name of the cloud link resource. + /// Name of the cloud link. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -276,12 +276,12 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r return message; } - /// Create or update a cloud link in a private cloud. - /// The ID of the target subscription. + /// Create a CloudLink. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// The name of the private cloud. - /// Name of the cloud link resource. - /// A cloud link in the private cloud. + /// Name of the private cloud. + /// Name of the cloud link. + /// Resource create parameters. /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -305,12 +305,12 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re } } - /// Create or update a cloud link in a private cloud. - /// The ID of the target subscription. + /// Create a CloudLink. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// The name of the private cloud. - /// Name of the cloud link resource. - /// A cloud link in the private cloud. + /// Name of the private cloud. + /// Name of the cloud link. + /// Resource create parameters. /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -372,11 +372,11 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG return message; } - /// Delete a cloud link in a private cloud. - /// The ID of the target subscription. + /// Delete a CloudLink. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// Name of the cloud link resource. + /// Name of the cloud link. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -400,11 +400,11 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } } - /// Delete a cloud link in a private cloud. - /// The ID of the target subscription. + /// Delete a CloudLink. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// Name of the cloud link resource. + /// Name of the cloud link. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -450,9 +450,9 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript return message; } - /// List cloud link in a private cloud. + /// List CloudLink resources by PrivateCloud. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. /// The cancellation token to use. @@ -481,9 +481,9 @@ public async Task> ListNextPageAsync(string nextLink, st } } - /// List cloud link in a private cloud. + /// List CloudLink resources by PrivateCloud. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. /// The cancellation token to use. diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/RestOperations/ClustersRestOperations.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/RestOperations/ClustersRestOperations.cs index e2500b1260ff..1637192a3fe8 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/RestOperations/ClustersRestOperations.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/RestOperations/ClustersRestOperations.cs @@ -32,7 +32,7 @@ public ClustersRestOperations(HttpPipeline pipeline, string applicationId, Uri e { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01"; + _apiVersion = apiVersion ?? "2023-09-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -72,8 +72,8 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro return message; } - /// List clusters in a private cloud. - /// The ID of the target subscription. + /// List Cluster resources by PrivateCloud. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. /// The cancellation token to use. @@ -101,8 +101,8 @@ public async Task> ListAsync(string subscriptionId, string } } - /// List clusters in a private cloud. - /// The ID of the target subscription. + /// List Cluster resources by PrivateCloud. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. /// The cancellation token to use. @@ -168,11 +168,11 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou return message; } - /// Get a cluster by name in a private cloud. - /// The ID of the target subscription. + /// Get a Cluster. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// Name of the cluster in the private cloud. + /// Name of the cluster. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -201,11 +201,11 @@ public async Task> GetAsync(string subscrip } } - /// Get a cluster by name in a private cloud. - /// The ID of the target subscription. + /// Get a Cluster. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// Name of the cluster in the private cloud. + /// Name of the cluster. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -276,12 +276,12 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r return message; } - /// Create or update a cluster in a private cloud. - /// The ID of the target subscription. + /// Create a Cluster. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// The name of the private cloud. - /// Name of the cluster in the private cloud. - /// A cluster in the private cloud. + /// Name of the private cloud. + /// Name of the cluster. + /// Resource create parameters. /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -305,12 +305,12 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re } } - /// Create or update a cluster in a private cloud. - /// The ID of the target subscription. + /// Create a Cluster. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// The name of the private cloud. - /// Name of the cluster in the private cloud. - /// A cluster in the private cloud. + /// Name of the private cloud. + /// Name of the cluster. + /// Resource create parameters. /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -376,11 +376,11 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG return message; } - /// Update a cluster in a private cloud. - /// The ID of the target subscription. + /// Update a Cluster. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// Name of the cluster in the private cloud. + /// Name of the cluster. /// The cluster properties to be updated. /// The cancellation token to use. /// , , , or is null. @@ -405,11 +405,11 @@ public async Task UpdateAsync(string subscriptionId, string resourceGr } } - /// Update a cluster in a private cloud. - /// The ID of the target subscription. + /// Update a Cluster. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// Name of the cluster in the private cloud. + /// Name of the cluster. /// The cluster properties to be updated. /// The cancellation token to use. /// , , , or is null. @@ -472,11 +472,11 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG return message; } - /// Delete a cluster in a private cloud. - /// The ID of the target subscription. + /// Delete a Cluster. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// Name of the cluster in the private cloud. + /// Name of the cluster. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -500,11 +500,11 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } } - /// Delete a cluster in a private cloud. - /// The ID of the target subscription. + /// Delete a Cluster. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// Name of the cluster in the private cloud. + /// Name of the cluster. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -569,10 +569,10 @@ internal HttpMessage CreateListZonesRequest(string subscriptionId, string resour } /// List hosts by zone in a cluster. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// Name of the cluster in the private cloud. + /// Name of the cluster. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -600,10 +600,10 @@ public async Task> ListZonesAsync(string subscriptionI } /// List hosts by zone in a cluster. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// Name of the cluster in the private cloud. + /// Name of the cluster. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -652,9 +652,9 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript return message; } - /// List clusters in a private cloud. + /// List Cluster resources by PrivateCloud. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. /// The cancellation token to use. @@ -683,9 +683,9 @@ public async Task> ListNextPageAsync(string nextLink, stri } } - /// List clusters in a private cloud. + /// List Cluster resources by PrivateCloud. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. /// The cancellation token to use. diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/RestOperations/DatastoresRestOperations.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/RestOperations/DatastoresRestOperations.cs index 108e4e11ae0c..62344eab5d1a 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/RestOperations/DatastoresRestOperations.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/RestOperations/DatastoresRestOperations.cs @@ -32,7 +32,7 @@ public DatastoresRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01"; + _apiVersion = apiVersion ?? "2023-09-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -76,11 +76,11 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro return message; } - /// List datastores in a private cloud cluster. - /// The ID of the target subscription. + /// List Datastore resources by Cluster. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// Name of the cluster in the private cloud. + /// Name of the cluster. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -107,11 +107,11 @@ public async Task> ListAsync(string subscriptionId, stri } } - /// List datastores in a private cloud cluster. - /// The ID of the target subscription. + /// List Datastore resources by Cluster. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// Name of the cluster in the private cloud. + /// Name of the cluster. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -180,12 +180,12 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou return message; } - /// Get a datastore in a private cloud cluster. - /// The ID of the target subscription. + /// Get a Datastore. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// Name of the cluster in the private cloud. - /// Name of the datastore in the private cloud cluster. + /// Name of the cluster. + /// Name of the datastore. /// The cancellation token to use. /// , , , or is null. /// , , , or is an empty string, and was expected to be non-empty. @@ -215,12 +215,12 @@ public async Task> GetAsync(string subscr } } - /// Get a datastore in a private cloud cluster. - /// The ID of the target subscription. + /// Get a Datastore. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// Name of the cluster in the private cloud. - /// Name of the datastore in the private cloud cluster. + /// Name of the cluster. + /// Name of the datastore. /// The cancellation token to use. /// , , , or is null. /// , , , or is an empty string, and was expected to be non-empty. @@ -296,13 +296,13 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r return message; } - /// Create or update a datastore in a private cloud cluster. - /// The ID of the target subscription. + /// Create a Datastore. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// Name of the cluster in the private cloud. - /// Name of the datastore in the private cloud cluster. - /// A datastore in a private cloud cluster. + /// Name of the cluster. + /// Name of the datastore. + /// Resource create parameters. /// The cancellation token to use. /// , , , , or is null. /// , , , or is an empty string, and was expected to be non-empty. @@ -327,13 +327,13 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re } } - /// Create or update a datastore in a private cloud cluster. - /// The ID of the target subscription. + /// Create a Datastore. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// Name of the cluster in the private cloud. - /// Name of the datastore in the private cloud cluster. - /// A datastore in a private cloud cluster. + /// Name of the cluster. + /// Name of the datastore. + /// Resource create parameters. /// The cancellation token to use. /// , , , , or is null. /// , , , or is an empty string, and was expected to be non-empty. @@ -400,12 +400,12 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG return message; } - /// Delete a datastore in a private cloud cluster. - /// The ID of the target subscription. + /// Delete a Datastore. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// Name of the cluster in the private cloud. - /// Name of the datastore in the private cloud cluster. + /// Name of the cluster. + /// Name of the datastore. /// The cancellation token to use. /// , , , or is null. /// , , , or is an empty string, and was expected to be non-empty. @@ -430,12 +430,12 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } } - /// Delete a datastore in a private cloud cluster. - /// The ID of the target subscription. + /// Delete a Datastore. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// Name of the cluster in the private cloud. - /// Name of the datastore in the private cloud cluster. + /// Name of the cluster. + /// Name of the datastore. /// The cancellation token to use. /// , , , or is null. /// , , , or is an empty string, and was expected to be non-empty. @@ -482,12 +482,12 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript return message; } - /// List datastores in a private cloud cluster. + /// List Datastore resources by Cluster. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// Name of the cluster in the private cloud. + /// Name of the cluster. /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -515,12 +515,12 @@ public async Task> ListNextPageAsync(string nextLink, st } } - /// List datastores in a private cloud cluster. + /// List Datastore resources by Cluster. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// Name of the cluster in the private cloud. + /// Name of the cluster. /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/RestOperations/GlobalReachConnectionsRestOperations.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/RestOperations/GlobalReachConnectionsRestOperations.cs index 96c51d74b9b9..2dd629817e12 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/RestOperations/GlobalReachConnectionsRestOperations.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/RestOperations/GlobalReachConnectionsRestOperations.cs @@ -32,7 +32,7 @@ public GlobalReachConnectionsRestOperations(HttpPipeline pipeline, string applic { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01"; + _apiVersion = apiVersion ?? "2023-09-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -72,8 +72,8 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro return message; } - /// List global reach connections in a private cloud. - /// The ID of the target subscription. + /// List GlobalReachConnection resources by PrivateCloud. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. /// The cancellation token to use. @@ -101,8 +101,8 @@ public async Task> ListAsync(string subscrip } } - /// List global reach connections in a private cloud. - /// The ID of the target subscription. + /// List GlobalReachConnection resources by PrivateCloud. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. /// The cancellation token to use. @@ -168,11 +168,11 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou return message; } - /// Get a global reach connection by name in a private cloud. - /// The ID of the target subscription. + /// Get a GlobalReachConnection. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// Name of the global reach connection in the private cloud. + /// Name of the global reach connection. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -201,11 +201,11 @@ public async Task> GetAsync(string subscript } } - /// Get a global reach connection by name in a private cloud. - /// The ID of the target subscription. + /// Get a GlobalReachConnection. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// Name of the global reach connection in the private cloud. + /// Name of the global reach connection. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -276,12 +276,12 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r return message; } - /// Create or update a global reach connection in a private cloud. - /// The ID of the target subscription. + /// Create a GlobalReachConnection. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// The name of the private cloud. - /// Name of the global reach connection in the private cloud. - /// A global reach connection in the private cloud. + /// Name of the private cloud. + /// Name of the global reach connection. + /// Resource create parameters. /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -305,12 +305,12 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re } } - /// Create or update a global reach connection in a private cloud. - /// The ID of the target subscription. + /// Create a GlobalReachConnection. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// The name of the private cloud. - /// Name of the global reach connection in the private cloud. - /// A global reach connection in the private cloud. + /// Name of the private cloud. + /// Name of the global reach connection. + /// Resource create parameters. /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -372,11 +372,11 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG return message; } - /// Delete a global reach connection in a private cloud. - /// The ID of the target subscription. + /// Delete a GlobalReachConnection. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// Name of the global reach connection in the private cloud. + /// Name of the global reach connection. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -400,11 +400,11 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } } - /// Delete a global reach connection in a private cloud. - /// The ID of the target subscription. + /// Delete a GlobalReachConnection. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// Name of the global reach connection in the private cloud. + /// Name of the global reach connection. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -450,9 +450,9 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript return message; } - /// List global reach connections in a private cloud. + /// List GlobalReachConnection resources by PrivateCloud. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. /// The cancellation token to use. @@ -481,9 +481,9 @@ public async Task> ListNextPageAsync(string } } - /// List global reach connections in a private cloud. + /// List GlobalReachConnection resources by PrivateCloud. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. /// The cancellation token to use. diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/RestOperations/HcxEnterpriseSitesRestOperations.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/RestOperations/HcxEnterpriseSitesRestOperations.cs index 7021c21d4f75..708c460253bc 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/RestOperations/HcxEnterpriseSitesRestOperations.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/RestOperations/HcxEnterpriseSitesRestOperations.cs @@ -32,7 +32,7 @@ public HcxEnterpriseSitesRestOperations(HttpPipeline pipeline, string applicatio { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01"; + _apiVersion = apiVersion ?? "2023-09-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -72,8 +72,8 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro return message; } - /// List HCX on-premises key in a private cloud. - /// The ID of the target subscription. + /// List HcxEnterpriseSite resources by PrivateCloud. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. /// The cancellation token to use. @@ -101,8 +101,8 @@ public async Task> ListAsync(string subscription } } - /// List HCX on-premises key in a private cloud. - /// The ID of the target subscription. + /// List HcxEnterpriseSite resources by PrivateCloud. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. /// The cancellation token to use. @@ -168,11 +168,11 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou return message; } - /// Get an HCX on-premises key by name in a private cloud. - /// The ID of the target subscription. + /// Get a HcxEnterpriseSite. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// Name of the HCX Enterprise Site in the private cloud. + /// Name of the HCX Enterprise Site. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -201,11 +201,11 @@ public async Task> GetAsync(string subscriptionI } } - /// Get an HCX on-premises key by name in a private cloud. - /// The ID of the target subscription. + /// Get a HcxEnterpriseSite. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// Name of the HCX Enterprise Site in the private cloud. + /// Name of the HCX Enterprise Site. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -276,12 +276,12 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r return message; } - /// Create or update an activation key for on-premises HCX site. - /// The ID of the target subscription. + /// Create a HcxEnterpriseSite. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// The name of the private cloud. - /// Name of the HCX Enterprise Site in the private cloud. - /// The HCX Enterprise Site. + /// Name of the private cloud. + /// Name of the HCX Enterprise Site. + /// Resource create parameters. /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -310,12 +310,12 @@ public async Task> CreateOrUpdateAsync(string su } } - /// Create or update an activation key for on-premises HCX site. - /// The ID of the target subscription. + /// Create a HcxEnterpriseSite. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// The name of the private cloud. - /// Name of the HCX Enterprise Site in the private cloud. - /// The HCX Enterprise Site. + /// Name of the private cloud. + /// Name of the HCX Enterprise Site. + /// Resource create parameters. /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -382,11 +382,11 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG return message; } - /// Delete HCX on-premises key in a private cloud. - /// The ID of the target subscription. + /// Delete a HcxEnterpriseSite. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// Name of the HCX Enterprise Site in the private cloud. + /// Name of the HCX Enterprise Site. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -409,11 +409,11 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } } - /// Delete HCX on-premises key in a private cloud. - /// The ID of the target subscription. + /// Delete a HcxEnterpriseSite. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// Name of the HCX Enterprise Site in the private cloud. + /// Name of the HCX Enterprise Site. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -458,9 +458,9 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript return message; } - /// List HCX on-premises key in a private cloud. + /// List HcxEnterpriseSite resources by PrivateCloud. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. /// The cancellation token to use. @@ -489,9 +489,9 @@ public async Task> ListNextPageAsync(string next } } - /// List HCX on-premises key in a private cloud. + /// List HcxEnterpriseSite resources by PrivateCloud. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. /// The cancellation token to use. diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/RestOperations/IscsiPathsRestOperations.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/RestOperations/IscsiPathsRestOperations.cs new file mode 100644 index 000000000000..3c518807f4da --- /dev/null +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/RestOperations/IscsiPathsRestOperations.cs @@ -0,0 +1,497 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.Avs.Models; + +namespace Azure.ResourceManager.Avs +{ + internal partial class IscsiPathsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of IscsiPathsRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public IscsiPathsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2023-09-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListByPrivateCloudRequestUri(string subscriptionId, string resourceGroupName, string privateCloudName) + { + 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.AVS/privateClouds/", false); + uri.AppendPath(privateCloudName, true); + uri.AppendPath("/iscsiPaths", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByPrivateCloudRequest(string subscriptionId, string resourceGroupName, string privateCloudName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + 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.AVS/privateClouds/", false); + uri.AppendPath(privateCloudName, true); + uri.AppendPath("/iscsiPaths", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List IscsiPath resources by PrivateCloud. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the private cloud. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByPrivateCloudAsync(string subscriptionId, string resourceGroupName, string privateCloudName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); + + using var message = CreateListByPrivateCloudRequest(subscriptionId, resourceGroupName, privateCloudName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + IscsiPathListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = IscsiPathListResult.DeserializeIscsiPathListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List IscsiPath resources by PrivateCloud. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the private cloud. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByPrivateCloud(string subscriptionId, string resourceGroupName, string privateCloudName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); + + using var message = CreateListByPrivateCloudRequest(subscriptionId, resourceGroupName, privateCloudName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + IscsiPathListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = IscsiPathListResult.DeserializeIscsiPathListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string privateCloudName) + { + 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.AVS/privateClouds/", false); + uri.AppendPath(privateCloudName, true); + uri.AppendPath("/iscsiPaths/default", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string privateCloudName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + 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.AVS/privateClouds/", false); + uri.AppendPath(privateCloudName, true); + uri.AppendPath("/iscsiPaths/default", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a IscsiPath. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the private cloud. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string privateCloudName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, privateCloudName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + IscsiPathData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = IscsiPathData.DeserializeIscsiPathData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((IscsiPathData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a IscsiPath. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the private cloud. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string privateCloudName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, privateCloudName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + IscsiPathData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = IscsiPathData.DeserializeIscsiPathData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((IscsiPathData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string privateCloudName, IscsiPathData 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.AVS/privateClouds/", false); + uri.AppendPath(privateCloudName, true); + uri.AppendPath("/iscsiPaths/default", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string privateCloudName, IscsiPathData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + 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.AVS/privateClouds/", false); + uri.AppendPath(privateCloudName, true); + uri.AppendPath("/iscsiPaths/default", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create a IscsiPath. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the private cloud. + /// Resource create parameters. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string privateCloudName, IscsiPathData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, privateCloudName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create a IscsiPath. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the private cloud. + /// Resource create parameters. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string privateCloudName, IscsiPathData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, privateCloudName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string privateCloudName) + { + 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.AVS/privateClouds/", false); + uri.AppendPath(privateCloudName, true); + uri.AppendPath("/iscsiPaths/default", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string privateCloudName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + 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.AVS/privateClouds/", false); + uri.AppendPath(privateCloudName, true); + uri.AppendPath("/iscsiPaths/default", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete a IscsiPath. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the private cloud. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string privateCloudName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, privateCloudName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete a IscsiPath. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the private cloud. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string privateCloudName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, privateCloudName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByPrivateCloudNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string privateCloudName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByPrivateCloudNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string privateCloudName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List IscsiPath resources by PrivateCloud. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the private cloud. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByPrivateCloudNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string privateCloudName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); + + using var message = CreateListByPrivateCloudNextPageRequest(nextLink, subscriptionId, resourceGroupName, privateCloudName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + IscsiPathListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = IscsiPathListResult.DeserializeIscsiPathListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List IscsiPath resources by PrivateCloud. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the private cloud. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByPrivateCloudNextPage(string nextLink, string subscriptionId, string resourceGroupName, string privateCloudName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); + + using var message = CreateListByPrivateCloudNextPageRequest(nextLink, subscriptionId, resourceGroupName, privateCloudName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + IscsiPathListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = IscsiPathListResult.DeserializeIscsiPathListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/RestOperations/LocationsRestOperations.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/RestOperations/LocationsRestOperations.cs index 79948d01f924..ce73eb7ab720 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/RestOperations/LocationsRestOperations.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/RestOperations/LocationsRestOperations.cs @@ -32,11 +32,11 @@ public LocationsRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01"; + _apiVersion = apiVersion ?? "2023-09-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal RequestUriBuilder CreateCheckTrialAvailabilityRequestUri(string subscriptionId, AzureLocation location, AvsSku sku) + internal RequestUriBuilder CreateCheckQuotaAvailabilityRequestUri(string subscriptionId, AzureLocation location) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -44,12 +44,12 @@ internal RequestUriBuilder CreateCheckTrialAvailabilityRequestUri(string subscri uri.AppendPath(subscriptionId, true); uri.AppendPath("/providers/Microsoft.AVS/locations/", false); uri.AppendPath(location, true); - uri.AppendPath("/checkTrialAvailability", false); + uri.AppendPath("/checkQuotaAvailability", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateCheckTrialAvailabilityRequest(string subscriptionId, AzureLocation location, AvsSku sku) + internal HttpMessage CreateCheckQuotaAvailabilityRequest(string subscriptionId, AzureLocation location) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -60,41 +60,33 @@ internal HttpMessage CreateCheckTrialAvailabilityRequest(string subscriptionId, uri.AppendPath(subscriptionId, true); uri.AppendPath("/providers/Microsoft.AVS/locations/", false); uri.AppendPath(location, true); - uri.AppendPath("/checkTrialAvailability", false); + uri.AppendPath("/checkQuotaAvailability", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); - if (sku != null) - { - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(sku, ModelSerializationExtensions.WireOptions); - request.Content = content; - } _userAgent.Apply(message); return message; } - /// Return trial status for subscription by region. - /// The ID of the target subscription. - /// Azure region. - /// The sku to check for trial availability. + /// Return quota for subscription by region. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. - public async Task> CheckTrialAvailabilityAsync(string subscriptionId, AzureLocation location, AvsSku sku = null, CancellationToken cancellationToken = default) + public async Task> CheckQuotaAvailabilityAsync(string subscriptionId, AzureLocation location, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - using var message = CreateCheckTrialAvailabilityRequest(subscriptionId, location, sku); + using var message = CreateCheckQuotaAvailabilityRequest(subscriptionId, location); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - AvsSubscriptionTrialAvailabilityResult value = default; + AvsSubscriptionQuotaAvailabilityResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = AvsSubscriptionTrialAvailabilityResult.DeserializeAvsSubscriptionTrialAvailabilityResult(document.RootElement); + value = AvsSubscriptionQuotaAvailabilityResult.DeserializeAvsSubscriptionQuotaAvailabilityResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -102,26 +94,25 @@ public async Task> CheckTrialAv } } - /// Return trial status for subscription by region. - /// The ID of the target subscription. - /// Azure region. - /// The sku to check for trial availability. + /// Return quota for subscription by region. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. - public Response CheckTrialAvailability(string subscriptionId, AzureLocation location, AvsSku sku = null, CancellationToken cancellationToken = default) + public Response CheckQuotaAvailability(string subscriptionId, AzureLocation location, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - using var message = CreateCheckTrialAvailabilityRequest(subscriptionId, location, sku); + using var message = CreateCheckQuotaAvailabilityRequest(subscriptionId, location); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - AvsSubscriptionTrialAvailabilityResult value = default; + AvsSubscriptionQuotaAvailabilityResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = AvsSubscriptionTrialAvailabilityResult.DeserializeAvsSubscriptionTrialAvailabilityResult(document.RootElement); + value = AvsSubscriptionQuotaAvailabilityResult.DeserializeAvsSubscriptionQuotaAvailabilityResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -129,7 +120,7 @@ public Response CheckTrialAvailability(s } } - internal RequestUriBuilder CreateCheckQuotaAvailabilityRequestUri(string subscriptionId, AzureLocation location) + internal RequestUriBuilder CreateCheckTrialAvailabilityRequestUri(string subscriptionId, AzureLocation location, AvsSku sku) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -137,12 +128,12 @@ internal RequestUriBuilder CreateCheckQuotaAvailabilityRequestUri(string subscri uri.AppendPath(subscriptionId, true); uri.AppendPath("/providers/Microsoft.AVS/locations/", false); uri.AppendPath(location, true); - uri.AppendPath("/checkQuotaAvailability", false); + uri.AppendPath("/checkTrialAvailability", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateCheckQuotaAvailabilityRequest(string subscriptionId, AzureLocation location) + internal HttpMessage CreateCheckTrialAvailabilityRequest(string subscriptionId, AzureLocation location, AvsSku sku) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -153,33 +144,41 @@ internal HttpMessage CreateCheckQuotaAvailabilityRequest(string subscriptionId, uri.AppendPath(subscriptionId, true); uri.AppendPath("/providers/Microsoft.AVS/locations/", false); uri.AppendPath(location, true); - uri.AppendPath("/checkQuotaAvailability", false); + uri.AppendPath("/checkTrialAvailability", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); + if (sku != null) + { + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(sku, ModelSerializationExtensions.WireOptions); + request.Content = content; + } _userAgent.Apply(message); return message; } - /// Return quota for subscription by region. - /// The ID of the target subscription. - /// Azure region. + /// Return trial status for subscription by region. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// Optionally, check for a specific SKU. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. - public async Task> CheckQuotaAvailabilityAsync(string subscriptionId, AzureLocation location, CancellationToken cancellationToken = default) + public async Task> CheckTrialAvailabilityAsync(string subscriptionId, AzureLocation location, AvsSku sku = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - using var message = CreateCheckQuotaAvailabilityRequest(subscriptionId, location); + using var message = CreateCheckTrialAvailabilityRequest(subscriptionId, location, sku); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - AvsSubscriptionQuotaAvailabilityResult value = default; + AvsSubscriptionTrialAvailabilityResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = AvsSubscriptionQuotaAvailabilityResult.DeserializeAvsSubscriptionQuotaAvailabilityResult(document.RootElement); + value = AvsSubscriptionTrialAvailabilityResult.DeserializeAvsSubscriptionTrialAvailabilityResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -187,25 +186,26 @@ public async Task> CheckQuotaAv } } - /// Return quota for subscription by region. - /// The ID of the target subscription. - /// Azure region. + /// Return trial status for subscription by region. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// Optionally, check for a specific SKU. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. - public Response CheckQuotaAvailability(string subscriptionId, AzureLocation location, CancellationToken cancellationToken = default) + public Response CheckTrialAvailability(string subscriptionId, AzureLocation location, AvsSku sku = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - using var message = CreateCheckQuotaAvailabilityRequest(subscriptionId, location); + using var message = CreateCheckTrialAvailabilityRequest(subscriptionId, location, sku); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - AvsSubscriptionQuotaAvailabilityResult value = default; + AvsSubscriptionTrialAvailabilityResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = AvsSubscriptionQuotaAvailabilityResult.DeserializeAvsSubscriptionQuotaAvailabilityResult(document.RootElement); + value = AvsSubscriptionTrialAvailabilityResult.DeserializeAvsSubscriptionTrialAvailabilityResult(document.RootElement); return Response.FromValue(value, message.Response); } default: diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/RestOperations/PlacementPoliciesRestOperations.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/RestOperations/PlacementPoliciesRestOperations.cs index 024b043440de..41ee40b59f0f 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/RestOperations/PlacementPoliciesRestOperations.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/RestOperations/PlacementPoliciesRestOperations.cs @@ -32,7 +32,7 @@ public PlacementPoliciesRestOperations(HttpPipeline pipeline, string application { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01"; + _apiVersion = apiVersion ?? "2023-09-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -76,11 +76,11 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro return message; } - /// List placement policies in a private cloud cluster. - /// The ID of the target subscription. + /// List PlacementPolicy resources by Cluster. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// Name of the cluster in the private cloud. + /// Name of the cluster. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -107,11 +107,11 @@ public async Task> ListAsync(string subscription } } - /// List placement policies in a private cloud cluster. - /// The ID of the target subscription. + /// List PlacementPolicy resources by Cluster. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// Name of the cluster in the private cloud. + /// Name of the cluster. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -180,12 +180,12 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou return message; } - /// Get a placement policy by name in a private cloud cluster. - /// The ID of the target subscription. + /// Get a PlacementPolicy. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// Name of the cluster in the private cloud. - /// Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. + /// Name of the cluster. + /// Name of the placement policy. /// The cancellation token to use. /// , , , or is null. /// , , , or is an empty string, and was expected to be non-empty. @@ -215,12 +215,12 @@ public async Task> GetAsync(string subscriptionId, } } - /// Get a placement policy by name in a private cloud cluster. - /// The ID of the target subscription. + /// Get a PlacementPolicy. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// Name of the cluster in the private cloud. - /// Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. + /// Name of the cluster. + /// Name of the placement policy. /// The cancellation token to use. /// , , , or is null. /// , , , or is an empty string, and was expected to be non-empty. @@ -296,13 +296,13 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r return message; } - /// Create or update a placement policy in a private cloud cluster. - /// The ID of the target subscription. + /// Create a PlacementPolicy. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// Name of the cluster in the private cloud. - /// Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. - /// A placement policy in the private cloud cluster. + /// Name of the cluster. + /// Name of the placement policy. + /// Resource create parameters. /// The cancellation token to use. /// , , , , or is null. /// , , , or is an empty string, and was expected to be non-empty. @@ -327,13 +327,13 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re } } - /// Create or update a placement policy in a private cloud cluster. - /// The ID of the target subscription. + /// Create a PlacementPolicy. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// Name of the cluster in the private cloud. - /// Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. - /// A placement policy in the private cloud cluster. + /// Name of the cluster. + /// Name of the placement policy. + /// Resource create parameters. /// The cancellation token to use. /// , , , , or is null. /// , , , or is an empty string, and was expected to be non-empty. @@ -404,13 +404,13 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG return message; } - /// Update a placement policy in a private cloud cluster. - /// The ID of the target subscription. + /// Update a PlacementPolicy. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// Name of the cluster in the private cloud. - /// Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. - /// The placement policy properties that may be updated. + /// Name of the cluster. + /// Name of the placement policy. + /// The placement policy properties to be updated. /// The cancellation token to use. /// , , , , or is null. /// , , , or is an empty string, and was expected to be non-empty. @@ -435,13 +435,13 @@ public async Task UpdateAsync(string subscriptionId, string resourceGr } } - /// Update a placement policy in a private cloud cluster. - /// The ID of the target subscription. + /// Update a PlacementPolicy. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// Name of the cluster in the private cloud. - /// Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. - /// The placement policy properties that may be updated. + /// Name of the cluster. + /// Name of the placement policy. + /// The placement policy properties to be updated. /// The cancellation token to use. /// , , , , or is null. /// , , , or is an empty string, and was expected to be non-empty. @@ -508,12 +508,12 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG return message; } - /// Delete a placement policy in a private cloud cluster. - /// The ID of the target subscription. + /// Delete a PlacementPolicy. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// Name of the cluster in the private cloud. - /// Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. + /// Name of the cluster. + /// Name of the placement policy. /// The cancellation token to use. /// , , , or is null. /// , , , or is an empty string, and was expected to be non-empty. @@ -538,12 +538,12 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } } - /// Delete a placement policy in a private cloud cluster. - /// The ID of the target subscription. + /// Delete a PlacementPolicy. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// Name of the cluster in the private cloud. - /// Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. + /// Name of the cluster. + /// Name of the placement policy. /// The cancellation token to use. /// , , , or is null. /// , , , or is an empty string, and was expected to be non-empty. @@ -590,12 +590,12 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript return message; } - /// List placement policies in a private cloud cluster. + /// List PlacementPolicy resources by Cluster. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// Name of the cluster in the private cloud. + /// Name of the cluster. /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -623,12 +623,12 @@ public async Task> ListNextPageAsync(string next } } - /// List placement policies in a private cloud cluster. + /// List PlacementPolicy resources by Cluster. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// Name of the cluster in the private cloud. + /// Name of the cluster. /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/RestOperations/PrivateCloudsRestOperations.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/RestOperations/PrivateCloudsRestOperations.cs index 578e21f56da1..f1f5b7e5109f 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/RestOperations/PrivateCloudsRestOperations.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/RestOperations/PrivateCloudsRestOperations.cs @@ -32,24 +32,22 @@ public PrivateCloudsRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01"; + _apiVersion = apiVersion ?? "2023-09-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName) + internal RequestUriBuilder CreateListInSubscriptionRequestUri(string subscriptionId) { 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.AVS/privateClouds", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName) + internal HttpMessage CreateListInSubscriptionRequest(string subscriptionId) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -58,8 +56,6 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.AVS/privateClouds", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; @@ -68,18 +64,16 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro return message; } - /// List private clouds in a resource group. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. + /// List PrivateCloud resources by subscription ID. + /// The ID of the target subscription. The value must be an UUID. /// The cancellation token to use. - /// or is null. - /// or is an empty string, and was expected to be non-empty. - public async Task> ListAsync(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + /// is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListInSubscriptionAsync(string subscriptionId, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - using var message = CreateListRequest(subscriptionId, resourceGroupName); + using var message = CreateListInSubscriptionRequest(subscriptionId); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -95,18 +89,16 @@ public async Task> ListAsync(string subscriptionId, s } } - /// List private clouds in a resource group. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. + /// List PrivateCloud resources by subscription ID. + /// The ID of the target subscription. The value must be an UUID. /// The cancellation token to use. - /// or is null. - /// or is an empty string, and was expected to be non-empty. - public Response List(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + /// is null. + /// is an empty string, and was expected to be non-empty. + public Response ListInSubscription(string subscriptionId, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - using var message = CreateListRequest(subscriptionId, resourceGroupName); + using var message = CreateListInSubscriptionRequest(subscriptionId); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -122,18 +114,20 @@ public Response List(string subscriptionId, string resourceGro } } - internal RequestUriBuilder CreateListInSubscriptionRequestUri(string subscriptionId) + internal RequestUriBuilder CreateListRequestUri(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.AVS/privateClouds", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateListInSubscriptionRequest(string subscriptionId) + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -142,6 +136,8 @@ internal HttpMessage CreateListInSubscriptionRequest(string subscriptionId) uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.AVS/privateClouds", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; @@ -150,16 +146,18 @@ internal HttpMessage CreateListInSubscriptionRequest(string subscriptionId) return message; } - /// List private clouds in a subscription. - /// The ID of the target subscription. + /// List PrivateCloud resources by resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public async Task> ListInSubscriptionAsync(string subscriptionId, CancellationToken cancellationToken = default) + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - using var message = CreateListInSubscriptionRequest(subscriptionId); + using var message = CreateListRequest(subscriptionId, resourceGroupName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -175,16 +173,18 @@ public async Task> ListInSubscriptionAsync(string sub } } - /// List private clouds in a subscription. - /// The ID of the target subscription. + /// List PrivateCloud resources by resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public Response ListInSubscription(string subscriptionId, CancellationToken cancellationToken = default) + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - using var message = CreateListInSubscriptionRequest(subscriptionId); + using var message = CreateListRequest(subscriptionId, resourceGroupName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -234,8 +234,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou return message; } - /// Get a private cloud. - /// The ID of the target subscription. + /// Get a PrivateCloud. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. /// The cancellation token to use. @@ -265,8 +265,8 @@ public async Task> GetAsync(string subscriptionId, } } - /// Get a private cloud. - /// The ID of the target subscription. + /// Get a PrivateCloud. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. /// The cancellation token to use. @@ -334,11 +334,11 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r return message; } - /// Create or update a private cloud. - /// The ID of the target subscription. + /// Create a PrivateCloud. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// The private cloud. + /// Resource create parameters. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -361,11 +361,11 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re } } - /// Create or update a private cloud. - /// The ID of the target subscription. + /// Create a PrivateCloud. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// The private cloud. + /// Resource create parameters. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -426,8 +426,8 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG return message; } - /// Update a private cloud. - /// The ID of the target subscription. + /// Update a PrivateCloud. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. /// The private cloud properties to be updated. @@ -453,8 +453,8 @@ public async Task UpdateAsync(string subscriptionId, string resourceGr } } - /// Update a private cloud. - /// The ID of the target subscription. + /// Update a PrivateCloud. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. /// The private cloud properties to be updated. @@ -514,8 +514,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG return message; } - /// Delete a private cloud. - /// The ID of the target subscription. + /// Delete a PrivateCloud. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. /// The cancellation token to use. @@ -540,8 +540,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } } - /// Delete a private cloud. - /// The ID of the target subscription. + /// Delete a PrivateCloud. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. /// The cancellation token to use. @@ -566,7 +566,7 @@ public Response Delete(string subscriptionId, string resourceGroupName, string p } } - internal RequestUriBuilder CreateRotateVcenterPasswordRequestUri(string subscriptionId, string resourceGroupName, string privateCloudName) + internal RequestUriBuilder CreateListAdminCredentialsRequestUri(string subscriptionId, string resourceGroupName, string privateCloudName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -576,12 +576,12 @@ internal RequestUriBuilder CreateRotateVcenterPasswordRequestUri(string subscrip uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.AVS/privateClouds/", false); uri.AppendPath(privateCloudName, true); - uri.AppendPath("/rotateVcenterPassword", false); + uri.AppendPath("/listAdminCredentials", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateRotateVcenterPasswordRequest(string subscriptionId, string resourceGroupName, string privateCloudName) + internal HttpMessage CreateListAdminCredentialsRequest(string subscriptionId, string resourceGroupName, string privateCloudName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -594,7 +594,7 @@ internal HttpMessage CreateRotateVcenterPasswordRequest(string subscriptionId, s uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.AVS/privateClouds/", false); uri.AppendPath(privateCloudName, true); - uri.AppendPath("/rotateVcenterPassword", false); + uri.AppendPath("/listAdminCredentials", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -602,51 +602,59 @@ internal HttpMessage CreateRotateVcenterPasswordRequest(string subscriptionId, s return message; } - /// Rotate the vCenter password. - /// The ID of the target subscription. + /// List the admin credentials for the private cloud. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task RotateVcenterPasswordAsync(string subscriptionId, string resourceGroupName, string privateCloudName, CancellationToken cancellationToken = default) + public async Task> ListAdminCredentialsAsync(string subscriptionId, string resourceGroupName, string privateCloudName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); - using var message = CreateRotateVcenterPasswordRequest(subscriptionId, resourceGroupName, privateCloudName); + using var message = CreateListAdminCredentialsRequest(subscriptionId, resourceGroupName, privateCloudName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 202: - case 204: - return message.Response; + case 200: + { + AdminCredentials value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = AdminCredentials.DeserializeAdminCredentials(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - /// Rotate the vCenter password. - /// The ID of the target subscription. + /// List the admin credentials for the private cloud. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response RotateVcenterPassword(string subscriptionId, string resourceGroupName, string privateCloudName, CancellationToken cancellationToken = default) + public Response ListAdminCredentials(string subscriptionId, string resourceGroupName, string privateCloudName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); - using var message = CreateRotateVcenterPasswordRequest(subscriptionId, resourceGroupName, privateCloudName); + using var message = CreateListAdminCredentialsRequest(subscriptionId, resourceGroupName, privateCloudName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 202: - case 204: - return message.Response; + case 200: + { + AdminCredentials value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = AdminCredentials.DeserializeAdminCredentials(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } @@ -689,7 +697,7 @@ internal HttpMessage CreateRotateNsxtPasswordRequest(string subscriptionId, stri } /// Rotate the NSX-T Manager password. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. /// The cancellation token to use. @@ -714,7 +722,7 @@ public async Task RotateNsxtPasswordAsync(string subscriptionId, strin } /// Rotate the NSX-T Manager password. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. /// The cancellation token to use. @@ -738,7 +746,7 @@ public Response RotateNsxtPassword(string subscriptionId, string resourceGroupNa } } - internal RequestUriBuilder CreateListAdminCredentialsRequestUri(string subscriptionId, string resourceGroupName, string privateCloudName) + internal RequestUriBuilder CreateRotateVcenterPasswordRequestUri(string subscriptionId, string resourceGroupName, string privateCloudName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -748,12 +756,12 @@ internal RequestUriBuilder CreateListAdminCredentialsRequestUri(string subscript uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.AVS/privateClouds/", false); uri.AppendPath(privateCloudName, true); - uri.AppendPath("/listAdminCredentials", false); + uri.AppendPath("/rotateVcenterPassword", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateListAdminCredentialsRequest(string subscriptionId, string resourceGroupName, string privateCloudName) + internal HttpMessage CreateRotateVcenterPasswordRequest(string subscriptionId, string resourceGroupName, string privateCloudName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -766,7 +774,7 @@ internal HttpMessage CreateListAdminCredentialsRequest(string subscriptionId, st uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.AVS/privateClouds/", false); uri.AppendPath(privateCloudName, true); - uri.AppendPath("/listAdminCredentials", false); + uri.AppendPath("/rotateVcenterPassword", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -774,65 +782,57 @@ internal HttpMessage CreateListAdminCredentialsRequest(string subscriptionId, st return message; } - /// List the admin credentials for the private cloud. - /// The ID of the target subscription. + /// Rotate the vCenter password. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListAdminCredentialsAsync(string subscriptionId, string resourceGroupName, string privateCloudName, CancellationToken cancellationToken = default) + public async Task RotateVcenterPasswordAsync(string subscriptionId, string resourceGroupName, string privateCloudName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); - using var message = CreateListAdminCredentialsRequest(subscriptionId, resourceGroupName, privateCloudName); + using var message = CreateRotateVcenterPasswordRequest(subscriptionId, resourceGroupName, privateCloudName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 200: - { - AdminCredentials value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = AdminCredentials.DeserializeAdminCredentials(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 202: + case 204: + return message.Response; default: throw new RequestFailedException(message.Response); } } - /// List the admin credentials for the private cloud. - /// The ID of the target subscription. + /// Rotate the vCenter password. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListAdminCredentials(string subscriptionId, string resourceGroupName, string privateCloudName, CancellationToken cancellationToken = default) + public Response RotateVcenterPassword(string subscriptionId, string resourceGroupName, string privateCloudName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); - using var message = CreateListAdminCredentialsRequest(subscriptionId, resourceGroupName, privateCloudName); + using var message = CreateRotateVcenterPasswordRequest(subscriptionId, resourceGroupName, privateCloudName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 200: - { - AdminCredentials value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = AdminCredentials.DeserializeAdminCredentials(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 202: + case 204: + return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName) + internal RequestUriBuilder CreateListInSubscriptionNextPageRequestUri(string nextLink, string subscriptionId) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -840,7 +840,7 @@ internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string return uri; } - internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName) + internal HttpMessage CreateListInSubscriptionNextPageRequest(string nextLink, string subscriptionId) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -854,20 +854,18 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript return message; } - /// List private clouds in a resource group. + /// List PrivateCloud resources by subscription ID. /// The URL to the next page of results. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. + /// The ID of the target subscription. The value must be an UUID. /// The cancellation token to use. - /// , or is null. - /// or is an empty string, and was expected to be non-empty. - public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListInSubscriptionNextPageAsync(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName); + using var message = CreateListInSubscriptionNextPageRequest(nextLink, subscriptionId); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -883,20 +881,18 @@ public async Task> ListNextPageAsync(string nextLink, } } - /// List private clouds in a resource group. + /// List PrivateCloud resources by subscription ID. /// The URL to the next page of results. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. + /// The ID of the target subscription. The value must be an UUID. /// The cancellation token to use. - /// , or is null. - /// or is an empty string, and was expected to be non-empty. - public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response ListInSubscriptionNextPage(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName); + using var message = CreateListInSubscriptionNextPageRequest(nextLink, subscriptionId); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -912,7 +908,7 @@ public Response ListNextPage(string nextLink, string subscript } } - internal RequestUriBuilder CreateListInSubscriptionNextPageRequestUri(string nextLink, string subscriptionId) + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -920,7 +916,7 @@ internal RequestUriBuilder CreateListInSubscriptionNextPageRequestUri(string nex return uri; } - internal HttpMessage CreateListInSubscriptionNextPageRequest(string nextLink, string subscriptionId) + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -934,18 +930,20 @@ internal HttpMessage CreateListInSubscriptionNextPageRequest(string nextLink, st return message; } - /// List private clouds in a subscription. + /// List PrivateCloud resources by resource group. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - public async Task> ListInSubscriptionNextPageAsync(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - using var message = CreateListInSubscriptionNextPageRequest(nextLink, subscriptionId); + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -961,18 +959,20 @@ public async Task> ListInSubscriptionNextPageAsync(st } } - /// List private clouds in a subscription. + /// List PrivateCloud resources by resource group. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - public Response ListInSubscriptionNextPage(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - using var message = CreateListInSubscriptionNextPageRequest(nextLink, subscriptionId); + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/RestOperations/ScriptCmdletsRestOperations.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/RestOperations/ScriptCmdletsRestOperations.cs index eced00adc94a..4fd5becdd176 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/RestOperations/ScriptCmdletsRestOperations.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/RestOperations/ScriptCmdletsRestOperations.cs @@ -32,7 +32,7 @@ public ScriptCmdletsRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01"; + _apiVersion = apiVersion ?? "2023-09-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -76,11 +76,11 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro return message; } - /// List script cmdlet resources available for a private cloud to create a script execution resource on a private cloud. - /// The ID of the target subscription. + /// List ScriptCmdlet resources by ScriptPackage. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// Name of the script package in the private cloud. + /// Name of the script package. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -107,11 +107,11 @@ public async Task> ListAsync(string subscriptionId, } } - /// List script cmdlet resources available for a private cloud to create a script execution resource on a private cloud. - /// The ID of the target subscription. + /// List ScriptCmdlet resources by ScriptPackage. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// Name of the script package in the private cloud. + /// Name of the script package. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -180,12 +180,12 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou return message; } - /// Return information about a script cmdlet resource in a specific package on a private cloud. - /// The ID of the target subscription. + /// Get a ScriptCmdlet. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// Name of the script package in the private cloud. - /// Name of the script cmdlet resource in the script package in the private cloud. + /// Name of the script package. + /// Name of the script cmdlet. /// The cancellation token to use. /// , , , or is null. /// , , , or is an empty string, and was expected to be non-empty. @@ -215,12 +215,12 @@ public async Task> GetAsync(string subscriptionId, st } } - /// Return information about a script cmdlet resource in a specific package on a private cloud. - /// The ID of the target subscription. + /// Get a ScriptCmdlet. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// Name of the script package in the private cloud. - /// Name of the script cmdlet resource in the script package in the private cloud. + /// Name of the script package. + /// Name of the script cmdlet. /// The cancellation token to use. /// , , , or is null. /// , , , or is an empty string, and was expected to be non-empty. @@ -272,12 +272,12 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript return message; } - /// List script cmdlet resources available for a private cloud to create a script execution resource on a private cloud. + /// List ScriptCmdlet resources by ScriptPackage. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// Name of the script package in the private cloud. + /// Name of the script package. /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -305,12 +305,12 @@ public async Task> ListNextPageAsync(string nextLink } } - /// List script cmdlet resources available for a private cloud to create a script execution resource on a private cloud. + /// List ScriptCmdlet resources by ScriptPackage. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// Name of the script package in the private cloud. + /// Name of the script package. /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/RestOperations/ScriptExecutionsRestOperations.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/RestOperations/ScriptExecutionsRestOperations.cs index 4667592c9328..e185f1e34c2c 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/RestOperations/ScriptExecutionsRestOperations.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/RestOperations/ScriptExecutionsRestOperations.cs @@ -33,7 +33,7 @@ public ScriptExecutionsRestOperations(HttpPipeline pipeline, string applicationI { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01"; + _apiVersion = apiVersion ?? "2023-09-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -73,8 +73,8 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro return message; } - /// List script executions in a private cloud. - /// The ID of the target subscription. + /// List ScriptExecution resources by PrivateCloud. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. /// The cancellation token to use. @@ -102,8 +102,8 @@ public async Task> ListAsync(string subscriptionI } } - /// List script executions in a private cloud. - /// The ID of the target subscription. + /// List ScriptExecution resources by PrivateCloud. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. /// The cancellation token to use. @@ -169,11 +169,11 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou return message; } - /// Get an script execution by name in a private cloud. - /// The ID of the target subscription. + /// Get a ScriptExecution. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// Name of the user-invoked script execution resource. + /// Name of the script cmdlet. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -202,11 +202,11 @@ public async Task> GetAsync(string subscriptionId, } } - /// Get an script execution by name in a private cloud. - /// The ID of the target subscription. + /// Get a ScriptExecution. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// Name of the user-invoked script execution resource. + /// Name of the script cmdlet. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -277,12 +277,12 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r return message; } - /// Create or update a script execution in a private cloud. - /// The ID of the target subscription. + /// Create a ScriptExecution. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// The name of the private cloud. - /// Name of the user-invoked script execution resource. - /// A script running in the private cloud. + /// Name of the private cloud. + /// Name of the script cmdlet. + /// Resource create parameters. /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -306,12 +306,12 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re } } - /// Create or update a script execution in a private cloud. - /// The ID of the target subscription. + /// Create a ScriptExecution. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// The name of the private cloud. - /// Name of the user-invoked script execution resource. - /// A script running in the private cloud. + /// Name of the private cloud. + /// Name of the script cmdlet. + /// Resource create parameters. /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -373,11 +373,11 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG return message; } - /// Cancel a ScriptExecution in a private cloud. - /// The ID of the target subscription. + /// Delete a ScriptExecution. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// Name of the user-invoked script execution resource. + /// Name of the script cmdlet. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -401,11 +401,11 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } } - /// Cancel a ScriptExecution in a private cloud. - /// The ID of the target subscription. + /// Delete a ScriptExecution. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// Name of the user-invoked script execution resource. + /// Name of the script cmdlet. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -482,10 +482,10 @@ internal HttpMessage CreateGetExecutionLogsRequest(string subscriptionId, string } /// Return the logs for a script execution resource. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// Name of the user-invoked script execution resource. + /// Name of the script cmdlet. /// Name of the desired output stream to return. If not provided, will return all. An empty array will return nothing. /// The cancellation token to use. /// , , or is null. @@ -514,10 +514,10 @@ public async Task> GetExecutionLogsAsync(string su } /// Return the logs for a script execution resource. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// Name of the user-invoked script execution resource. + /// Name of the script cmdlet. /// Name of the desired output stream to return. If not provided, will return all. An empty array will return nothing. /// The cancellation token to use. /// , , or is null. @@ -567,9 +567,9 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript return message; } - /// List script executions in a private cloud. + /// List ScriptExecution resources by PrivateCloud. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. /// The cancellation token to use. @@ -598,9 +598,9 @@ public async Task> ListNextPageAsync(string nextL } } - /// List script executions in a private cloud. + /// List ScriptExecution resources by PrivateCloud. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. /// The cancellation token to use. diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/RestOperations/ScriptPackagesRestOperations.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/RestOperations/ScriptPackagesRestOperations.cs index 7a63bca2b914..dd763f38c53c 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/RestOperations/ScriptPackagesRestOperations.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/RestOperations/ScriptPackagesRestOperations.cs @@ -32,7 +32,7 @@ public ScriptPackagesRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01"; + _apiVersion = apiVersion ?? "2023-09-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -72,8 +72,8 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro return message; } - /// List script packages available to run on the private cloud. - /// The ID of the target subscription. + /// List ScriptPackage resources by PrivateCloud. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. /// The cancellation token to use. @@ -101,8 +101,8 @@ public async Task> ListAsync(string subscriptionId, } } - /// List script packages available to run on the private cloud. - /// The ID of the target subscription. + /// List ScriptPackage resources by PrivateCloud. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. /// The cancellation token to use. @@ -168,11 +168,11 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou return message; } - /// Get a script package available to run on a private cloud. - /// The ID of the target subscription. + /// Get a ScriptPackage. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// Name of the script package in the private cloud. + /// Name of the script package. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -201,11 +201,11 @@ public async Task> GetAsync(string subscriptionId, s } } - /// Get a script package available to run on a private cloud. - /// The ID of the target subscription. + /// Get a ScriptPackage. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// Name of the script package in the private cloud. + /// Name of the script package. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -256,9 +256,9 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript return message; } - /// List script packages available to run on the private cloud. + /// List ScriptPackage resources by PrivateCloud. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. /// The cancellation token to use. @@ -287,9 +287,9 @@ public async Task> ListNextPageAsync(string nextLin } } - /// List script packages available to run on the private cloud. + /// List ScriptPackage resources by PrivateCloud. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. /// The cancellation token to use. diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/RestOperations/VirtualMachinesRestOperations.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/RestOperations/VirtualMachinesRestOperations.cs index 5ea45c4e57e8..6ee46ac34973 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/RestOperations/VirtualMachinesRestOperations.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/RestOperations/VirtualMachinesRestOperations.cs @@ -32,7 +32,7 @@ public VirtualMachinesRestOperations(HttpPipeline pipeline, string applicationId { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01"; + _apiVersion = apiVersion ?? "2023-09-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -76,11 +76,11 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro return message; } - /// List of virtual machines in a private cloud cluster. - /// The ID of the target subscription. + /// List VirtualMachine resources by Cluster. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// Name of the cluster in the private cloud. + /// Name of the cluster. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -107,11 +107,11 @@ public async Task> ListAsync(string subscriptionId } } - /// List of virtual machines in a private cloud cluster. - /// The ID of the target subscription. + /// List VirtualMachine resources by Cluster. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// Name of the cluster in the private cloud. + /// Name of the cluster. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -180,12 +180,12 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou return message; } - /// Get a virtual machine by id in a private cloud cluster. - /// The ID of the target subscription. + /// Get a VirtualMachine. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// Name of the cluster in the private cloud. - /// Virtual Machine identifier. + /// Name of the cluster. + /// ID of the virtual machine. /// The cancellation token to use. /// , , , or is null. /// , , , or is an empty string, and was expected to be non-empty. @@ -215,12 +215,12 @@ public async Task> GetAsync(s } } - /// Get a virtual machine by id in a private cloud cluster. - /// The ID of the target subscription. + /// Get a VirtualMachine. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// Name of the cluster in the private cloud. - /// Virtual Machine identifier. + /// Name of the cluster. + /// ID of the virtual machine. /// The cancellation token to use. /// , , , or is null. /// , , , or is an empty string, and was expected to be non-empty. @@ -299,12 +299,12 @@ internal HttpMessage CreateRestrictMovementRequest(string subscriptionId, string } /// Enable or disable DRS-driven VM movement restriction. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// Name of the cluster in the private cloud. - /// Virtual Machine identifier. - /// Whether VM DRS-driven movement is restricted (Enabled) or not (Disabled). + /// Name of the cluster. + /// ID of the virtual machine. + /// The body type of the operation request. /// The cancellation token to use. /// , , , , or is null. /// , , , or is an empty string, and was expected to be non-empty. @@ -329,12 +329,12 @@ public async Task RestrictMovementAsync(string subscriptionId, string } /// Enable or disable DRS-driven VM movement restriction. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// Name of the cluster in the private cloud. - /// Virtual Machine identifier. - /// Whether VM DRS-driven movement is restricted (Enabled) or not (Disabled). + /// Name of the cluster. + /// ID of the virtual machine. + /// The body type of the operation request. /// The cancellation token to use. /// , , , , or is null. /// , , , or is an empty string, and was expected to be non-empty. @@ -380,12 +380,12 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript return message; } - /// List of virtual machines in a private cloud cluster. + /// List VirtualMachine resources by Cluster. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// Name of the cluster in the private cloud. + /// Name of the cluster. /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -413,12 +413,12 @@ public async Task> ListNextPageAsync(string nextLi } } - /// List of virtual machines in a private cloud cluster. + /// List VirtualMachine resources by Cluster. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// Name of the cluster in the private cloud. + /// Name of the cluster. /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/RestOperations/WorkloadNetworksRestOperations.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/RestOperations/WorkloadNetworksRestOperations.cs index 2fc3557ed63e..c4553fc54acf 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/RestOperations/WorkloadNetworksRestOperations.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/RestOperations/WorkloadNetworksRestOperations.cs @@ -32,11 +32,11 @@ public WorkloadNetworksRestOperations(HttpPipeline pipeline, string applicationI { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01"; + _apiVersion = apiVersion ?? "2023-09-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string privateCloudName, WorkloadNetworkName workloadNetworkName) + internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string privateCloudName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -46,13 +46,12 @@ internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string res uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.AVS/privateClouds/", false); uri.AppendPath(privateCloudName, true); - uri.AppendPath("/workloadNetworks/", false); - uri.AppendPath(workloadNetworkName.ToString(), true); + uri.AppendPath("/workloadNetworks", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string privateCloudName, WorkloadNetworkName workloadNetworkName) + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string privateCloudName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -65,8 +64,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.AVS/privateClouds/", false); uri.AppendPath(privateCloudName, true); - uri.AppendPath("/workloadNetworks/", false); - uri.AppendPath(workloadNetworkName.ToString(), true); + uri.AppendPath("/workloadNetworks", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -74,71 +72,65 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou return message; } - /// Get a private cloud workload network. - /// The ID of the target subscription. + /// List WorkloadNetwork resources by PrivateCloud. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// Name for the workload network in the private cloud. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string privateCloudName, WorkloadNetworkName workloadNetworkName, CancellationToken cancellationToken = default) + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string privateCloudName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, privateCloudName, workloadNetworkName); + using var message = CreateListRequest(subscriptionId, resourceGroupName, privateCloudName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - WorkloadNetworkData value = default; + WorkloadNetworkList value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = WorkloadNetworkData.DeserializeWorkloadNetworkData(document.RootElement); + value = WorkloadNetworkList.DeserializeWorkloadNetworkList(document.RootElement); return Response.FromValue(value, message.Response); } - case 404: - return Response.FromValue((WorkloadNetworkData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - /// Get a private cloud workload network. - /// The ID of the target subscription. + /// List WorkloadNetwork resources by PrivateCloud. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// Name for the workload network in the private cloud. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string privateCloudName, WorkloadNetworkName workloadNetworkName, CancellationToken cancellationToken = default) + public Response List(string subscriptionId, string resourceGroupName, string privateCloudName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, privateCloudName, workloadNetworkName); + using var message = CreateListRequest(subscriptionId, resourceGroupName, privateCloudName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - WorkloadNetworkData value = default; + WorkloadNetworkList value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = WorkloadNetworkData.DeserializeWorkloadNetworkData(document.RootElement); + value = WorkloadNetworkList.DeserializeWorkloadNetworkList(document.RootElement); return Response.FromValue(value, message.Response); } - case 404: - return Response.FromValue((WorkloadNetworkData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string privateCloudName) + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string privateCloudName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -148,12 +140,12 @@ internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string re uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.AVS/privateClouds/", false); uri.AppendPath(privateCloudName, true); - uri.AppendPath("/workloadNetworks", false); + uri.AppendPath("/workloadNetworks/default", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string privateCloudName) + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string privateCloudName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -166,7 +158,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.AVS/privateClouds/", false); uri.AppendPath(privateCloudName, true); - uri.AppendPath("/workloadNetworks", false); + uri.AppendPath("/workloadNetworks/default", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -174,65 +166,69 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro return message; } - /// List of workload networks in a private cloud. - /// The ID of the target subscription. + /// Get a WorkloadNetwork. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListAsync(string subscriptionId, string resourceGroupName, string privateCloudName, CancellationToken cancellationToken = default) + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string privateCloudName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); - using var message = CreateListRequest(subscriptionId, resourceGroupName, privateCloudName); + using var message = CreateGetRequest(subscriptionId, resourceGroupName, privateCloudName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - WorkloadNetworkList value = default; + WorkloadNetworkData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = WorkloadNetworkList.DeserializeWorkloadNetworkList(document.RootElement); + value = WorkloadNetworkData.DeserializeWorkloadNetworkData(document.RootElement); return Response.FromValue(value, message.Response); } + case 404: + return Response.FromValue((WorkloadNetworkData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - /// List of workload networks in a private cloud. - /// The ID of the target subscription. + /// Get a WorkloadNetwork. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response List(string subscriptionId, string resourceGroupName, string privateCloudName, CancellationToken cancellationToken = default) + public Response Get(string subscriptionId, string resourceGroupName, string privateCloudName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); - using var message = CreateListRequest(subscriptionId, resourceGroupName, privateCloudName); + using var message = CreateGetRequest(subscriptionId, resourceGroupName, privateCloudName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - WorkloadNetworkList value = default; + WorkloadNetworkData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = WorkloadNetworkList.DeserializeWorkloadNetworkList(document.RootElement); + value = WorkloadNetworkData.DeserializeWorkloadNetworkData(document.RootElement); return Response.FromValue(value, message.Response); } + case 404: + return Response.FromValue((WorkloadNetworkData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateListSegmentsRequestUri(string subscriptionId, string resourceGroupName, string privateCloudName) + internal RequestUriBuilder CreateListDhcpRequestUri(string subscriptionId, string resourceGroupName, string privateCloudName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -242,12 +238,12 @@ internal RequestUriBuilder CreateListSegmentsRequestUri(string subscriptionId, s uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.AVS/privateClouds/", false); uri.AppendPath(privateCloudName, true); - uri.AppendPath("/workloadNetworks/default/segments", false); + uri.AppendPath("/workloadNetworks/default/dhcpConfigurations", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateListSegmentsRequest(string subscriptionId, string resourceGroupName, string privateCloudName) + internal HttpMessage CreateListDhcpRequest(string subscriptionId, string resourceGroupName, string privateCloudName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -260,7 +256,7 @@ internal HttpMessage CreateListSegmentsRequest(string subscriptionId, string res uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.AVS/privateClouds/", false); uri.AppendPath(privateCloudName, true); - uri.AppendPath("/workloadNetworks/default/segments", false); + uri.AppendPath("/workloadNetworks/default/dhcpConfigurations", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -268,28 +264,28 @@ internal HttpMessage CreateListSegmentsRequest(string subscriptionId, string res return message; } - /// List of segments in a private cloud workload network. - /// The ID of the target subscription. + /// List WorkloadNetworkDhcp resources by WorkloadNetwork. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListSegmentsAsync(string subscriptionId, string resourceGroupName, string privateCloudName, CancellationToken cancellationToken = default) + public async Task> ListDhcpAsync(string subscriptionId, string resourceGroupName, string privateCloudName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); - using var message = CreateListSegmentsRequest(subscriptionId, resourceGroupName, privateCloudName); + using var message = CreateListDhcpRequest(subscriptionId, resourceGroupName, privateCloudName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - WorkloadNetworkSegmentsList value = default; + WorkloadNetworkDhcpList value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = WorkloadNetworkSegmentsList.DeserializeWorkloadNetworkSegmentsList(document.RootElement); + value = WorkloadNetworkDhcpList.DeserializeWorkloadNetworkDhcpList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -297,28 +293,28 @@ public async Task> ListSegmentsAsync(strin } } - /// List of segments in a private cloud workload network. - /// The ID of the target subscription. + /// List WorkloadNetworkDhcp resources by WorkloadNetwork. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListSegments(string subscriptionId, string resourceGroupName, string privateCloudName, CancellationToken cancellationToken = default) + public Response ListDhcp(string subscriptionId, string resourceGroupName, string privateCloudName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); - using var message = CreateListSegmentsRequest(subscriptionId, resourceGroupName, privateCloudName); + using var message = CreateListDhcpRequest(subscriptionId, resourceGroupName, privateCloudName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - WorkloadNetworkSegmentsList value = default; + WorkloadNetworkDhcpList value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = WorkloadNetworkSegmentsList.DeserializeWorkloadNetworkSegmentsList(document.RootElement); + value = WorkloadNetworkDhcpList.DeserializeWorkloadNetworkDhcpList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -326,7 +322,7 @@ public Response ListSegments(string subscriptionId, } } - internal RequestUriBuilder CreateGetSegmentRequestUri(string subscriptionId, string resourceGroupName, string privateCloudName, string segmentId) + internal RequestUriBuilder CreateGetDhcpRequestUri(string subscriptionId, string resourceGroupName, string privateCloudName, string dhcpId) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -336,13 +332,13 @@ internal RequestUriBuilder CreateGetSegmentRequestUri(string subscriptionId, str uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.AVS/privateClouds/", false); uri.AppendPath(privateCloudName, true); - uri.AppendPath("/workloadNetworks/default/segments/", false); - uri.AppendPath(segmentId, true); + uri.AppendPath("/workloadNetworks/default/dhcpConfigurations/", false); + uri.AppendPath(dhcpId, true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateGetSegmentRequest(string subscriptionId, string resourceGroupName, string privateCloudName, string segmentId) + internal HttpMessage CreateGetDhcpRequest(string subscriptionId, string resourceGroupName, string privateCloudName, string dhcpId) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -355,8 +351,8 @@ internal HttpMessage CreateGetSegmentRequest(string subscriptionId, string resou uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.AVS/privateClouds/", false); uri.AppendPath(privateCloudName, true); - uri.AppendPath("/workloadNetworks/default/segments/", false); - uri.AppendPath(segmentId, true); + uri.AppendPath("/workloadNetworks/default/dhcpConfigurations/", false); + uri.AppendPath(dhcpId, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -364,73 +360,73 @@ internal HttpMessage CreateGetSegmentRequest(string subscriptionId, string resou return message; } - /// Get a segment by id in a private cloud workload network. - /// The ID of the target subscription. + /// Get a WorkloadNetworkDhcp. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// NSX Segment identifier. Generally the same as the Segment's display name. + /// The ID of the DHCP configuration. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetSegmentAsync(string subscriptionId, string resourceGroupName, string privateCloudName, string segmentId, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetDhcpAsync(string subscriptionId, string resourceGroupName, string privateCloudName, string dhcpId, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); - Argument.AssertNotNullOrEmpty(segmentId, nameof(segmentId)); + Argument.AssertNotNullOrEmpty(dhcpId, nameof(dhcpId)); - using var message = CreateGetSegmentRequest(subscriptionId, resourceGroupName, privateCloudName, segmentId); + using var message = CreateGetDhcpRequest(subscriptionId, resourceGroupName, privateCloudName, dhcpId); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - WorkloadNetworkSegmentData value = default; + WorkloadNetworkDhcpData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = WorkloadNetworkSegmentData.DeserializeWorkloadNetworkSegmentData(document.RootElement); + value = WorkloadNetworkDhcpData.DeserializeWorkloadNetworkDhcpData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((WorkloadNetworkSegmentData)null, message.Response); + return Response.FromValue((WorkloadNetworkDhcpData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - /// Get a segment by id in a private cloud workload network. - /// The ID of the target subscription. + /// Get a WorkloadNetworkDhcp. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// NSX Segment identifier. Generally the same as the Segment's display name. + /// The ID of the DHCP configuration. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response GetSegment(string subscriptionId, string resourceGroupName, string privateCloudName, string segmentId, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response GetDhcp(string subscriptionId, string resourceGroupName, string privateCloudName, string dhcpId, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); - Argument.AssertNotNullOrEmpty(segmentId, nameof(segmentId)); + Argument.AssertNotNullOrEmpty(dhcpId, nameof(dhcpId)); - using var message = CreateGetSegmentRequest(subscriptionId, resourceGroupName, privateCloudName, segmentId); + using var message = CreateGetDhcpRequest(subscriptionId, resourceGroupName, privateCloudName, dhcpId); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - WorkloadNetworkSegmentData value = default; + WorkloadNetworkDhcpData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = WorkloadNetworkSegmentData.DeserializeWorkloadNetworkSegmentData(document.RootElement); + value = WorkloadNetworkDhcpData.DeserializeWorkloadNetworkDhcpData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((WorkloadNetworkSegmentData)null, message.Response); + return Response.FromValue((WorkloadNetworkDhcpData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateCreateSegmentsRequestUri(string subscriptionId, string resourceGroupName, string privateCloudName, string segmentId, WorkloadNetworkSegmentData data) + internal RequestUriBuilder CreateCreateDhcpRequestUri(string subscriptionId, string resourceGroupName, string privateCloudName, string dhcpId, WorkloadNetworkDhcpData data) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -440,13 +436,13 @@ internal RequestUriBuilder CreateCreateSegmentsRequestUri(string subscriptionId, uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.AVS/privateClouds/", false); uri.AppendPath(privateCloudName, true); - uri.AppendPath("/workloadNetworks/default/segments/", false); - uri.AppendPath(segmentId, true); + uri.AppendPath("/workloadNetworks/default/dhcpConfigurations/", false); + uri.AppendPath(dhcpId, true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateCreateSegmentsRequest(string subscriptionId, string resourceGroupName, string privateCloudName, string segmentId, WorkloadNetworkSegmentData data) + internal HttpMessage CreateCreateDhcpRequest(string subscriptionId, string resourceGroupName, string privateCloudName, string dhcpId, WorkloadNetworkDhcpData data) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -459,8 +455,8 @@ internal HttpMessage CreateCreateSegmentsRequest(string subscriptionId, string r uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.AVS/privateClouds/", false); uri.AppendPath(privateCloudName, true); - uri.AppendPath("/workloadNetworks/default/segments/", false); - uri.AppendPath(segmentId, true); + uri.AppendPath("/workloadNetworks/default/dhcpConfigurations/", false); + uri.AppendPath(dhcpId, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -472,24 +468,24 @@ internal HttpMessage CreateCreateSegmentsRequest(string subscriptionId, string r return message; } - /// Create a segment by id in a private cloud workload network. - /// The ID of the target subscription. + /// Create a WorkloadNetworkDhcp. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// NSX Segment identifier. Generally the same as the Segment's display name. - /// NSX Segment. + /// The ID of the DHCP configuration. + /// Resource create parameters. /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task CreateSegmentsAsync(string subscriptionId, string resourceGroupName, string privateCloudName, string segmentId, WorkloadNetworkSegmentData data, CancellationToken cancellationToken = default) + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task CreateDhcpAsync(string subscriptionId, string resourceGroupName, string privateCloudName, string dhcpId, WorkloadNetworkDhcpData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); - Argument.AssertNotNullOrEmpty(segmentId, nameof(segmentId)); + Argument.AssertNotNullOrEmpty(dhcpId, nameof(dhcpId)); Argument.AssertNotNull(data, nameof(data)); - using var message = CreateCreateSegmentsRequest(subscriptionId, resourceGroupName, privateCloudName, segmentId, data); + using var message = CreateCreateDhcpRequest(subscriptionId, resourceGroupName, privateCloudName, dhcpId, data); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -501,24 +497,24 @@ public async Task CreateSegmentsAsync(string subscriptionId, string re } } - /// Create a segment by id in a private cloud workload network. - /// The ID of the target subscription. + /// Create a WorkloadNetworkDhcp. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// NSX Segment identifier. Generally the same as the Segment's display name. - /// NSX Segment. + /// The ID of the DHCP configuration. + /// Resource create parameters. /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response CreateSegments(string subscriptionId, string resourceGroupName, string privateCloudName, string segmentId, WorkloadNetworkSegmentData data, CancellationToken cancellationToken = default) + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response CreateDhcp(string subscriptionId, string resourceGroupName, string privateCloudName, string dhcpId, WorkloadNetworkDhcpData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); - Argument.AssertNotNullOrEmpty(segmentId, nameof(segmentId)); + Argument.AssertNotNullOrEmpty(dhcpId, nameof(dhcpId)); Argument.AssertNotNull(data, nameof(data)); - using var message = CreateCreateSegmentsRequest(subscriptionId, resourceGroupName, privateCloudName, segmentId, data); + using var message = CreateCreateDhcpRequest(subscriptionId, resourceGroupName, privateCloudName, dhcpId, data); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -530,7 +526,7 @@ public Response CreateSegments(string subscriptionId, string resourceGroupName, } } - internal RequestUriBuilder CreateUpdateSegmentsRequestUri(string subscriptionId, string resourceGroupName, string privateCloudName, string segmentId, WorkloadNetworkSegmentData data) + internal RequestUriBuilder CreateUpdateDhcpRequestUri(string subscriptionId, string resourceGroupName, string privateCloudName, string dhcpId, WorkloadNetworkDhcpData data) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -540,13 +536,13 @@ internal RequestUriBuilder CreateUpdateSegmentsRequestUri(string subscriptionId, uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.AVS/privateClouds/", false); uri.AppendPath(privateCloudName, true); - uri.AppendPath("/workloadNetworks/default/segments/", false); - uri.AppendPath(segmentId, true); + uri.AppendPath("/workloadNetworks/default/dhcpConfigurations/", false); + uri.AppendPath(dhcpId, true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateUpdateSegmentsRequest(string subscriptionId, string resourceGroupName, string privateCloudName, string segmentId, WorkloadNetworkSegmentData data) + internal HttpMessage CreateUpdateDhcpRequest(string subscriptionId, string resourceGroupName, string privateCloudName, string dhcpId, WorkloadNetworkDhcpData data) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -559,8 +555,8 @@ internal HttpMessage CreateUpdateSegmentsRequest(string subscriptionId, string r uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.AVS/privateClouds/", false); uri.AppendPath(privateCloudName, true); - uri.AppendPath("/workloadNetworks/default/segments/", false); - uri.AppendPath(segmentId, true); + uri.AppendPath("/workloadNetworks/default/dhcpConfigurations/", false); + uri.AppendPath(dhcpId, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -572,24 +568,24 @@ internal HttpMessage CreateUpdateSegmentsRequest(string subscriptionId, string r return message; } - /// Create or update a segment by id in a private cloud workload network. - /// The ID of the target subscription. + /// Update a WorkloadNetworkDhcp. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// NSX Segment identifier. Generally the same as the Segment's display name. - /// NSX Segment. + /// The ID of the DHCP configuration. + /// The resource properties to be updated. /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task UpdateSegmentsAsync(string subscriptionId, string resourceGroupName, string privateCloudName, string segmentId, WorkloadNetworkSegmentData data, CancellationToken cancellationToken = default) + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task UpdateDhcpAsync(string subscriptionId, string resourceGroupName, string privateCloudName, string dhcpId, WorkloadNetworkDhcpData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); - Argument.AssertNotNullOrEmpty(segmentId, nameof(segmentId)); + Argument.AssertNotNullOrEmpty(dhcpId, nameof(dhcpId)); Argument.AssertNotNull(data, nameof(data)); - using var message = CreateUpdateSegmentsRequest(subscriptionId, resourceGroupName, privateCloudName, segmentId, data); + using var message = CreateUpdateDhcpRequest(subscriptionId, resourceGroupName, privateCloudName, dhcpId, data); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -601,24 +597,24 @@ public async Task UpdateSegmentsAsync(string subscriptionId, string re } } - /// Create or update a segment by id in a private cloud workload network. - /// The ID of the target subscription. + /// Update a WorkloadNetworkDhcp. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// NSX Segment identifier. Generally the same as the Segment's display name. - /// NSX Segment. + /// The ID of the DHCP configuration. + /// The resource properties to be updated. /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response UpdateSegments(string subscriptionId, string resourceGroupName, string privateCloudName, string segmentId, WorkloadNetworkSegmentData data, CancellationToken cancellationToken = default) + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response UpdateDhcp(string subscriptionId, string resourceGroupName, string privateCloudName, string dhcpId, WorkloadNetworkDhcpData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); - Argument.AssertNotNullOrEmpty(segmentId, nameof(segmentId)); + Argument.AssertNotNullOrEmpty(dhcpId, nameof(dhcpId)); Argument.AssertNotNull(data, nameof(data)); - using var message = CreateUpdateSegmentsRequest(subscriptionId, resourceGroupName, privateCloudName, segmentId, data); + using var message = CreateUpdateDhcpRequest(subscriptionId, resourceGroupName, privateCloudName, dhcpId, data); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -630,7 +626,7 @@ public Response UpdateSegments(string subscriptionId, string resourceGroupName, } } - internal RequestUriBuilder CreateDeleteSegmentRequestUri(string subscriptionId, string resourceGroupName, string privateCloudName, string segmentId) + internal RequestUriBuilder CreateDeleteDhcpRequestUri(string subscriptionId, string resourceGroupName, string privateCloudName, string dhcpId) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -640,13 +636,13 @@ internal RequestUriBuilder CreateDeleteSegmentRequestUri(string subscriptionId, uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.AVS/privateClouds/", false); uri.AppendPath(privateCloudName, true); - uri.AppendPath("/workloadNetworks/default/segments/", false); - uri.AppendPath(segmentId, true); + uri.AppendPath("/workloadNetworks/default/dhcpConfigurations/", false); + uri.AppendPath(dhcpId, true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateDeleteSegmentRequest(string subscriptionId, string resourceGroupName, string privateCloudName, string segmentId) + internal HttpMessage CreateDeleteDhcpRequest(string subscriptionId, string resourceGroupName, string privateCloudName, string dhcpId) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -659,8 +655,8 @@ internal HttpMessage CreateDeleteSegmentRequest(string subscriptionId, string re uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.AVS/privateClouds/", false); uri.AppendPath(privateCloudName, true); - uri.AppendPath("/workloadNetworks/default/segments/", false); - uri.AppendPath(segmentId, true); + uri.AppendPath("/workloadNetworks/default/dhcpConfigurations/", false); + uri.AppendPath(dhcpId, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -668,22 +664,22 @@ internal HttpMessage CreateDeleteSegmentRequest(string subscriptionId, string re return message; } - /// Delete a segment by id in a private cloud workload network. - /// The ID of the target subscription. + /// Delete a WorkloadNetworkDhcp. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// NSX Segment identifier. Generally the same as the Segment's display name. + /// The ID of the DHCP configuration. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task DeleteSegmentAsync(string subscriptionId, string resourceGroupName, string privateCloudName, string segmentId, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeleteDhcpAsync(string subscriptionId, string resourceGroupName, string privateCloudName, string dhcpId, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); - Argument.AssertNotNullOrEmpty(segmentId, nameof(segmentId)); + Argument.AssertNotNullOrEmpty(dhcpId, nameof(dhcpId)); - using var message = CreateDeleteSegmentRequest(subscriptionId, resourceGroupName, privateCloudName, segmentId); + using var message = CreateDeleteDhcpRequest(subscriptionId, resourceGroupName, privateCloudName, dhcpId); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -696,22 +692,22 @@ public async Task DeleteSegmentAsync(string subscriptionId, string res } } - /// Delete a segment by id in a private cloud workload network. - /// The ID of the target subscription. + /// Delete a WorkloadNetworkDhcp. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// NSX Segment identifier. Generally the same as the Segment's display name. + /// The ID of the DHCP configuration. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response DeleteSegment(string subscriptionId, string resourceGroupName, string privateCloudName, string segmentId, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response DeleteDhcp(string subscriptionId, string resourceGroupName, string privateCloudName, string dhcpId, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); - Argument.AssertNotNullOrEmpty(segmentId, nameof(segmentId)); + Argument.AssertNotNullOrEmpty(dhcpId, nameof(dhcpId)); - using var message = CreateDeleteSegmentRequest(subscriptionId, resourceGroupName, privateCloudName, segmentId); + using var message = CreateDeleteDhcpRequest(subscriptionId, resourceGroupName, privateCloudName, dhcpId); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -724,7 +720,7 @@ public Response DeleteSegment(string subscriptionId, string resourceGroupName, s } } - internal RequestUriBuilder CreateListDhcpRequestUri(string subscriptionId, string resourceGroupName, string privateCloudName) + internal RequestUriBuilder CreateListDnsServicesRequestUri(string subscriptionId, string resourceGroupName, string privateCloudName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -734,12 +730,12 @@ internal RequestUriBuilder CreateListDhcpRequestUri(string subscriptionId, strin uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.AVS/privateClouds/", false); uri.AppendPath(privateCloudName, true); - uri.AppendPath("/workloadNetworks/default/dhcpConfigurations", false); + uri.AppendPath("/workloadNetworks/default/dnsServices", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateListDhcpRequest(string subscriptionId, string resourceGroupName, string privateCloudName) + internal HttpMessage CreateListDnsServicesRequest(string subscriptionId, string resourceGroupName, string privateCloudName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -752,7 +748,7 @@ internal HttpMessage CreateListDhcpRequest(string subscriptionId, string resourc uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.AVS/privateClouds/", false); uri.AppendPath(privateCloudName, true); - uri.AppendPath("/workloadNetworks/default/dhcpConfigurations", false); + uri.AppendPath("/workloadNetworks/default/dnsServices", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -760,28 +756,28 @@ internal HttpMessage CreateListDhcpRequest(string subscriptionId, string resourc return message; } - /// List dhcp in a private cloud workload network. - /// The ID of the target subscription. + /// List WorkloadNetworkDnsService resources by WorkloadNetwork. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListDhcpAsync(string subscriptionId, string resourceGroupName, string privateCloudName, CancellationToken cancellationToken = default) + public async Task> ListDnsServicesAsync(string subscriptionId, string resourceGroupName, string privateCloudName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); - using var message = CreateListDhcpRequest(subscriptionId, resourceGroupName, privateCloudName); + using var message = CreateListDnsServicesRequest(subscriptionId, resourceGroupName, privateCloudName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - WorkloadNetworkDhcpList value = default; + WorkloadNetworkDnsServicesList value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = WorkloadNetworkDhcpList.DeserializeWorkloadNetworkDhcpList(document.RootElement); + value = WorkloadNetworkDnsServicesList.DeserializeWorkloadNetworkDnsServicesList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -789,28 +785,28 @@ public async Task> ListDhcpAsync(string subscr } } - /// List dhcp in a private cloud workload network. - /// The ID of the target subscription. + /// List WorkloadNetworkDnsService resources by WorkloadNetwork. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListDhcp(string subscriptionId, string resourceGroupName, string privateCloudName, CancellationToken cancellationToken = default) + public Response ListDnsServices(string subscriptionId, string resourceGroupName, string privateCloudName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); - using var message = CreateListDhcpRequest(subscriptionId, resourceGroupName, privateCloudName); + using var message = CreateListDnsServicesRequest(subscriptionId, resourceGroupName, privateCloudName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - WorkloadNetworkDhcpList value = default; + WorkloadNetworkDnsServicesList value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = WorkloadNetworkDhcpList.DeserializeWorkloadNetworkDhcpList(document.RootElement); + value = WorkloadNetworkDnsServicesList.DeserializeWorkloadNetworkDnsServicesList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -818,7 +814,7 @@ public Response ListDhcp(string subscriptionId, string } } - internal RequestUriBuilder CreateGetDhcpRequestUri(string subscriptionId, string resourceGroupName, string privateCloudName, string dhcpId) + internal RequestUriBuilder CreateGetDnsServiceRequestUri(string subscriptionId, string resourceGroupName, string privateCloudName, string dnsServiceId) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -828,13 +824,13 @@ internal RequestUriBuilder CreateGetDhcpRequestUri(string subscriptionId, string uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.AVS/privateClouds/", false); uri.AppendPath(privateCloudName, true); - uri.AppendPath("/workloadNetworks/default/dhcpConfigurations/", false); - uri.AppendPath(dhcpId, true); + uri.AppendPath("/workloadNetworks/default/dnsServices/", false); + uri.AppendPath(dnsServiceId, true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateGetDhcpRequest(string subscriptionId, string resourceGroupName, string privateCloudName, string dhcpId) + internal HttpMessage CreateGetDnsServiceRequest(string subscriptionId, string resourceGroupName, string privateCloudName, string dnsServiceId) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -847,8 +843,8 @@ internal HttpMessage CreateGetDhcpRequest(string subscriptionId, string resource uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.AVS/privateClouds/", false); uri.AppendPath(privateCloudName, true); - uri.AppendPath("/workloadNetworks/default/dhcpConfigurations/", false); - uri.AppendPath(dhcpId, true); + uri.AppendPath("/workloadNetworks/default/dnsServices/", false); + uri.AppendPath(dnsServiceId, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -856,73 +852,73 @@ internal HttpMessage CreateGetDhcpRequest(string subscriptionId, string resource return message; } - /// Get dhcp by id in a private cloud workload network. - /// The ID of the target subscription. + /// Get a WorkloadNetworkDnsService. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// NSX DHCP identifier. Generally the same as the DHCP display name. + /// ID of the DNS service. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetDhcpAsync(string subscriptionId, string resourceGroupName, string privateCloudName, string dhcpId, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetDnsServiceAsync(string subscriptionId, string resourceGroupName, string privateCloudName, string dnsServiceId, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); - Argument.AssertNotNullOrEmpty(dhcpId, nameof(dhcpId)); + Argument.AssertNotNullOrEmpty(dnsServiceId, nameof(dnsServiceId)); - using var message = CreateGetDhcpRequest(subscriptionId, resourceGroupName, privateCloudName, dhcpId); + using var message = CreateGetDnsServiceRequest(subscriptionId, resourceGroupName, privateCloudName, dnsServiceId); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - WorkloadNetworkDhcpData value = default; + WorkloadNetworkDnsServiceData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = WorkloadNetworkDhcpData.DeserializeWorkloadNetworkDhcpData(document.RootElement); + value = WorkloadNetworkDnsServiceData.DeserializeWorkloadNetworkDnsServiceData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((WorkloadNetworkDhcpData)null, message.Response); + return Response.FromValue((WorkloadNetworkDnsServiceData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - /// Get dhcp by id in a private cloud workload network. - /// The ID of the target subscription. + /// Get a WorkloadNetworkDnsService. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// NSX DHCP identifier. Generally the same as the DHCP display name. + /// ID of the DNS service. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response GetDhcp(string subscriptionId, string resourceGroupName, string privateCloudName, string dhcpId, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response GetDnsService(string subscriptionId, string resourceGroupName, string privateCloudName, string dnsServiceId, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); - Argument.AssertNotNullOrEmpty(dhcpId, nameof(dhcpId)); + Argument.AssertNotNullOrEmpty(dnsServiceId, nameof(dnsServiceId)); - using var message = CreateGetDhcpRequest(subscriptionId, resourceGroupName, privateCloudName, dhcpId); + using var message = CreateGetDnsServiceRequest(subscriptionId, resourceGroupName, privateCloudName, dnsServiceId); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - WorkloadNetworkDhcpData value = default; + WorkloadNetworkDnsServiceData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = WorkloadNetworkDhcpData.DeserializeWorkloadNetworkDhcpData(document.RootElement); + value = WorkloadNetworkDnsServiceData.DeserializeWorkloadNetworkDnsServiceData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((WorkloadNetworkDhcpData)null, message.Response); + return Response.FromValue((WorkloadNetworkDnsServiceData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateCreateDhcpRequestUri(string subscriptionId, string resourceGroupName, string privateCloudName, string dhcpId, WorkloadNetworkDhcpData data) + internal RequestUriBuilder CreateCreateDnsServiceRequestUri(string subscriptionId, string resourceGroupName, string privateCloudName, string dnsServiceId, WorkloadNetworkDnsServiceData data) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -932,13 +928,13 @@ internal RequestUriBuilder CreateCreateDhcpRequestUri(string subscriptionId, str uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.AVS/privateClouds/", false); uri.AppendPath(privateCloudName, true); - uri.AppendPath("/workloadNetworks/default/dhcpConfigurations/", false); - uri.AppendPath(dhcpId, true); + uri.AppendPath("/workloadNetworks/default/dnsServices/", false); + uri.AppendPath(dnsServiceId, true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateCreateDhcpRequest(string subscriptionId, string resourceGroupName, string privateCloudName, string dhcpId, WorkloadNetworkDhcpData data) + internal HttpMessage CreateCreateDnsServiceRequest(string subscriptionId, string resourceGroupName, string privateCloudName, string dnsServiceId, WorkloadNetworkDnsServiceData data) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -951,8 +947,8 @@ internal HttpMessage CreateCreateDhcpRequest(string subscriptionId, string resou uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.AVS/privateClouds/", false); uri.AppendPath(privateCloudName, true); - uri.AppendPath("/workloadNetworks/default/dhcpConfigurations/", false); - uri.AppendPath(dhcpId, true); + uri.AppendPath("/workloadNetworks/default/dnsServices/", false); + uri.AppendPath(dnsServiceId, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -964,24 +960,24 @@ internal HttpMessage CreateCreateDhcpRequest(string subscriptionId, string resou return message; } - /// Create dhcp by id in a private cloud workload network. - /// The ID of the target subscription. + /// Create a WorkloadNetworkDnsService. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// NSX DHCP identifier. Generally the same as the DHCP display name. - /// NSX DHCP. + /// ID of the DNS service. + /// Resource create parameters. /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task CreateDhcpAsync(string subscriptionId, string resourceGroupName, string privateCloudName, string dhcpId, WorkloadNetworkDhcpData data, CancellationToken cancellationToken = default) + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task CreateDnsServiceAsync(string subscriptionId, string resourceGroupName, string privateCloudName, string dnsServiceId, WorkloadNetworkDnsServiceData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); - Argument.AssertNotNullOrEmpty(dhcpId, nameof(dhcpId)); + Argument.AssertNotNullOrEmpty(dnsServiceId, nameof(dnsServiceId)); Argument.AssertNotNull(data, nameof(data)); - using var message = CreateCreateDhcpRequest(subscriptionId, resourceGroupName, privateCloudName, dhcpId, data); + using var message = CreateCreateDnsServiceRequest(subscriptionId, resourceGroupName, privateCloudName, dnsServiceId, data); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -993,24 +989,24 @@ public async Task CreateDhcpAsync(string subscriptionId, string resour } } - /// Create dhcp by id in a private cloud workload network. - /// The ID of the target subscription. + /// Create a WorkloadNetworkDnsService. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// NSX DHCP identifier. Generally the same as the DHCP display name. - /// NSX DHCP. + /// ID of the DNS service. + /// Resource create parameters. /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response CreateDhcp(string subscriptionId, string resourceGroupName, string privateCloudName, string dhcpId, WorkloadNetworkDhcpData data, CancellationToken cancellationToken = default) + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response CreateDnsService(string subscriptionId, string resourceGroupName, string privateCloudName, string dnsServiceId, WorkloadNetworkDnsServiceData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); - Argument.AssertNotNullOrEmpty(dhcpId, nameof(dhcpId)); + Argument.AssertNotNullOrEmpty(dnsServiceId, nameof(dnsServiceId)); Argument.AssertNotNull(data, nameof(data)); - using var message = CreateCreateDhcpRequest(subscriptionId, resourceGroupName, privateCloudName, dhcpId, data); + using var message = CreateCreateDnsServiceRequest(subscriptionId, resourceGroupName, privateCloudName, dnsServiceId, data); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -1022,7 +1018,7 @@ public Response CreateDhcp(string subscriptionId, string resourceGroupName, stri } } - internal RequestUriBuilder CreateUpdateDhcpRequestUri(string subscriptionId, string resourceGroupName, string privateCloudName, string dhcpId, WorkloadNetworkDhcpData data) + internal RequestUriBuilder CreateUpdateDnsServiceRequestUri(string subscriptionId, string resourceGroupName, string privateCloudName, string dnsServiceId, WorkloadNetworkDnsServiceData data) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -1032,13 +1028,13 @@ internal RequestUriBuilder CreateUpdateDhcpRequestUri(string subscriptionId, str uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.AVS/privateClouds/", false); uri.AppendPath(privateCloudName, true); - uri.AppendPath("/workloadNetworks/default/dhcpConfigurations/", false); - uri.AppendPath(dhcpId, true); + uri.AppendPath("/workloadNetworks/default/dnsServices/", false); + uri.AppendPath(dnsServiceId, true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateUpdateDhcpRequest(string subscriptionId, string resourceGroupName, string privateCloudName, string dhcpId, WorkloadNetworkDhcpData data) + internal HttpMessage CreateUpdateDnsServiceRequest(string subscriptionId, string resourceGroupName, string privateCloudName, string dnsServiceId, WorkloadNetworkDnsServiceData data) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -1051,8 +1047,8 @@ internal HttpMessage CreateUpdateDhcpRequest(string subscriptionId, string resou uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.AVS/privateClouds/", false); uri.AppendPath(privateCloudName, true); - uri.AppendPath("/workloadNetworks/default/dhcpConfigurations/", false); - uri.AppendPath(dhcpId, true); + uri.AppendPath("/workloadNetworks/default/dnsServices/", false); + uri.AppendPath(dnsServiceId, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -1064,24 +1060,24 @@ internal HttpMessage CreateUpdateDhcpRequest(string subscriptionId, string resou return message; } - /// Create or update dhcp by id in a private cloud workload network. - /// The ID of the target subscription. + /// Update a WorkloadNetworkDnsService. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// NSX DHCP identifier. Generally the same as the DHCP display name. - /// NSX DHCP. + /// ID of the DNS service. + /// The resource properties to be updated. /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task UpdateDhcpAsync(string subscriptionId, string resourceGroupName, string privateCloudName, string dhcpId, WorkloadNetworkDhcpData data, CancellationToken cancellationToken = default) + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task UpdateDnsServiceAsync(string subscriptionId, string resourceGroupName, string privateCloudName, string dnsServiceId, WorkloadNetworkDnsServiceData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); - Argument.AssertNotNullOrEmpty(dhcpId, nameof(dhcpId)); + Argument.AssertNotNullOrEmpty(dnsServiceId, nameof(dnsServiceId)); Argument.AssertNotNull(data, nameof(data)); - using var message = CreateUpdateDhcpRequest(subscriptionId, resourceGroupName, privateCloudName, dhcpId, data); + using var message = CreateUpdateDnsServiceRequest(subscriptionId, resourceGroupName, privateCloudName, dnsServiceId, data); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -1093,24 +1089,24 @@ public async Task UpdateDhcpAsync(string subscriptionId, string resour } } - /// Create or update dhcp by id in a private cloud workload network. - /// The ID of the target subscription. + /// Update a WorkloadNetworkDnsService. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// NSX DHCP identifier. Generally the same as the DHCP display name. - /// NSX DHCP. + /// ID of the DNS service. + /// The resource properties to be updated. /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response UpdateDhcp(string subscriptionId, string resourceGroupName, string privateCloudName, string dhcpId, WorkloadNetworkDhcpData data, CancellationToken cancellationToken = default) + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response UpdateDnsService(string subscriptionId, string resourceGroupName, string privateCloudName, string dnsServiceId, WorkloadNetworkDnsServiceData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); - Argument.AssertNotNullOrEmpty(dhcpId, nameof(dhcpId)); + Argument.AssertNotNullOrEmpty(dnsServiceId, nameof(dnsServiceId)); Argument.AssertNotNull(data, nameof(data)); - using var message = CreateUpdateDhcpRequest(subscriptionId, resourceGroupName, privateCloudName, dhcpId, data); + using var message = CreateUpdateDnsServiceRequest(subscriptionId, resourceGroupName, privateCloudName, dnsServiceId, data); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -1122,7 +1118,7 @@ public Response UpdateDhcp(string subscriptionId, string resourceGroupName, stri } } - internal RequestUriBuilder CreateDeleteDhcpRequestUri(string subscriptionId, string resourceGroupName, string privateCloudName, string dhcpId) + internal RequestUriBuilder CreateDeleteDnsServiceRequestUri(string subscriptionId, string resourceGroupName, string privateCloudName, string dnsServiceId) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -1132,13 +1128,13 @@ internal RequestUriBuilder CreateDeleteDhcpRequestUri(string subscriptionId, str uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.AVS/privateClouds/", false); uri.AppendPath(privateCloudName, true); - uri.AppendPath("/workloadNetworks/default/dhcpConfigurations/", false); - uri.AppendPath(dhcpId, true); + uri.AppendPath("/workloadNetworks/default/dnsServices/", false); + uri.AppendPath(dnsServiceId, true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateDeleteDhcpRequest(string subscriptionId, string resourceGroupName, string privateCloudName, string dhcpId) + internal HttpMessage CreateDeleteDnsServiceRequest(string subscriptionId, string resourceGroupName, string privateCloudName, string dnsServiceId) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -1151,8 +1147,8 @@ internal HttpMessage CreateDeleteDhcpRequest(string subscriptionId, string resou uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.AVS/privateClouds/", false); uri.AppendPath(privateCloudName, true); - uri.AppendPath("/workloadNetworks/default/dhcpConfigurations/", false); - uri.AppendPath(dhcpId, true); + uri.AppendPath("/workloadNetworks/default/dnsServices/", false); + uri.AppendPath(dnsServiceId, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -1160,22 +1156,22 @@ internal HttpMessage CreateDeleteDhcpRequest(string subscriptionId, string resou return message; } - /// Delete dhcp by id in a private cloud workload network. - /// The ID of the target subscription. + /// Delete a WorkloadNetworkDnsService. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// NSX DHCP identifier. Generally the same as the DHCP display name. + /// ID of the DNS service. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task DeleteDhcpAsync(string subscriptionId, string resourceGroupName, string privateCloudName, string dhcpId, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeleteDnsServiceAsync(string subscriptionId, string resourceGroupName, string privateCloudName, string dnsServiceId, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); - Argument.AssertNotNullOrEmpty(dhcpId, nameof(dhcpId)); + Argument.AssertNotNullOrEmpty(dnsServiceId, nameof(dnsServiceId)); - using var message = CreateDeleteDhcpRequest(subscriptionId, resourceGroupName, privateCloudName, dhcpId); + using var message = CreateDeleteDnsServiceRequest(subscriptionId, resourceGroupName, privateCloudName, dnsServiceId); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -1188,22 +1184,22 @@ public async Task DeleteDhcpAsync(string subscriptionId, string resour } } - /// Delete dhcp by id in a private cloud workload network. - /// The ID of the target subscription. + /// Delete a WorkloadNetworkDnsService. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// NSX DHCP identifier. Generally the same as the DHCP display name. + /// ID of the DNS service. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response DeleteDhcp(string subscriptionId, string resourceGroupName, string privateCloudName, string dhcpId, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response DeleteDnsService(string subscriptionId, string resourceGroupName, string privateCloudName, string dnsServiceId, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); - Argument.AssertNotNullOrEmpty(dhcpId, nameof(dhcpId)); + Argument.AssertNotNullOrEmpty(dnsServiceId, nameof(dnsServiceId)); - using var message = CreateDeleteDhcpRequest(subscriptionId, resourceGroupName, privateCloudName, dhcpId); + using var message = CreateDeleteDnsServiceRequest(subscriptionId, resourceGroupName, privateCloudName, dnsServiceId); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -1216,7 +1212,7 @@ public Response DeleteDhcp(string subscriptionId, string resourceGroupName, stri } } - internal RequestUriBuilder CreateListGatewaysRequestUri(string subscriptionId, string resourceGroupName, string privateCloudName) + internal RequestUriBuilder CreateListDnsZonesRequestUri(string subscriptionId, string resourceGroupName, string privateCloudName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -1226,12 +1222,12 @@ internal RequestUriBuilder CreateListGatewaysRequestUri(string subscriptionId, s uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.AVS/privateClouds/", false); uri.AppendPath(privateCloudName, true); - uri.AppendPath("/workloadNetworks/default/gateways", false); + uri.AppendPath("/workloadNetworks/default/dnsZones", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateListGatewaysRequest(string subscriptionId, string resourceGroupName, string privateCloudName) + internal HttpMessage CreateListDnsZonesRequest(string subscriptionId, string resourceGroupName, string privateCloudName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -1244,7 +1240,7 @@ internal HttpMessage CreateListGatewaysRequest(string subscriptionId, string res uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.AVS/privateClouds/", false); uri.AppendPath(privateCloudName, true); - uri.AppendPath("/workloadNetworks/default/gateways", false); + uri.AppendPath("/workloadNetworks/default/dnsZones", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -1252,28 +1248,28 @@ internal HttpMessage CreateListGatewaysRequest(string subscriptionId, string res return message; } - /// List of gateways in a private cloud workload network. - /// The ID of the target subscription. + /// List WorkloadNetworkDnsZone resources by WorkloadNetwork. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListGatewaysAsync(string subscriptionId, string resourceGroupName, string privateCloudName, CancellationToken cancellationToken = default) + public async Task> ListDnsZonesAsync(string subscriptionId, string resourceGroupName, string privateCloudName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); - using var message = CreateListGatewaysRequest(subscriptionId, resourceGroupName, privateCloudName); + using var message = CreateListDnsZonesRequest(subscriptionId, resourceGroupName, privateCloudName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - WorkloadNetworkGatewayList value = default; + WorkloadNetworkDnsZonesList value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = WorkloadNetworkGatewayList.DeserializeWorkloadNetworkGatewayList(document.RootElement); + value = WorkloadNetworkDnsZonesList.DeserializeWorkloadNetworkDnsZonesList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -1281,28 +1277,28 @@ public async Task> ListGatewaysAsync(string } } - /// List of gateways in a private cloud workload network. - /// The ID of the target subscription. + /// List WorkloadNetworkDnsZone resources by WorkloadNetwork. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListGateways(string subscriptionId, string resourceGroupName, string privateCloudName, CancellationToken cancellationToken = default) + public Response ListDnsZones(string subscriptionId, string resourceGroupName, string privateCloudName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); - using var message = CreateListGatewaysRequest(subscriptionId, resourceGroupName, privateCloudName); + using var message = CreateListDnsZonesRequest(subscriptionId, resourceGroupName, privateCloudName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - WorkloadNetworkGatewayList value = default; + WorkloadNetworkDnsZonesList value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = WorkloadNetworkGatewayList.DeserializeWorkloadNetworkGatewayList(document.RootElement); + value = WorkloadNetworkDnsZonesList.DeserializeWorkloadNetworkDnsZonesList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -1310,7 +1306,7 @@ public Response ListGateways(string subscriptionId, } } - internal RequestUriBuilder CreateGetGatewayRequestUri(string subscriptionId, string resourceGroupName, string privateCloudName, string gatewayId) + internal RequestUriBuilder CreateGetDnsZoneRequestUri(string subscriptionId, string resourceGroupName, string privateCloudName, string dnsZoneId) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -1320,13 +1316,13 @@ internal RequestUriBuilder CreateGetGatewayRequestUri(string subscriptionId, str uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.AVS/privateClouds/", false); uri.AppendPath(privateCloudName, true); - uri.AppendPath("/workloadNetworks/default/gateways/", false); - uri.AppendPath(gatewayId, true); + uri.AppendPath("/workloadNetworks/default/dnsZones/", false); + uri.AppendPath(dnsZoneId, true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateGetGatewayRequest(string subscriptionId, string resourceGroupName, string privateCloudName, string gatewayId) + internal HttpMessage CreateGetDnsZoneRequest(string subscriptionId, string resourceGroupName, string privateCloudName, string dnsZoneId) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -1339,8 +1335,8 @@ internal HttpMessage CreateGetGatewayRequest(string subscriptionId, string resou uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.AVS/privateClouds/", false); uri.AppendPath(privateCloudName, true); - uri.AppendPath("/workloadNetworks/default/gateways/", false); - uri.AppendPath(gatewayId, true); + uri.AppendPath("/workloadNetworks/default/dnsZones/", false); + uri.AppendPath(dnsZoneId, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -1348,73 +1344,73 @@ internal HttpMessage CreateGetGatewayRequest(string subscriptionId, string resou return message; } - /// Get a gateway by id in a private cloud workload network. - /// The ID of the target subscription. + /// Get a WorkloadNetworkDnsZone. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// NSX Gateway identifier. Generally the same as the Gateway's display name. + /// ID of the DNS zone. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetGatewayAsync(string subscriptionId, string resourceGroupName, string privateCloudName, string gatewayId, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetDnsZoneAsync(string subscriptionId, string resourceGroupName, string privateCloudName, string dnsZoneId, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); - Argument.AssertNotNullOrEmpty(gatewayId, nameof(gatewayId)); + Argument.AssertNotNullOrEmpty(dnsZoneId, nameof(dnsZoneId)); - using var message = CreateGetGatewayRequest(subscriptionId, resourceGroupName, privateCloudName, gatewayId); + using var message = CreateGetDnsZoneRequest(subscriptionId, resourceGroupName, privateCloudName, dnsZoneId); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - WorkloadNetworkGatewayData value = default; + WorkloadNetworkDnsZoneData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = WorkloadNetworkGatewayData.DeserializeWorkloadNetworkGatewayData(document.RootElement); + value = WorkloadNetworkDnsZoneData.DeserializeWorkloadNetworkDnsZoneData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((WorkloadNetworkGatewayData)null, message.Response); + return Response.FromValue((WorkloadNetworkDnsZoneData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - /// Get a gateway by id in a private cloud workload network. - /// The ID of the target subscription. + /// Get a WorkloadNetworkDnsZone. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// NSX Gateway identifier. Generally the same as the Gateway's display name. + /// ID of the DNS zone. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response GetGateway(string subscriptionId, string resourceGroupName, string privateCloudName, string gatewayId, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response GetDnsZone(string subscriptionId, string resourceGroupName, string privateCloudName, string dnsZoneId, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); - Argument.AssertNotNullOrEmpty(gatewayId, nameof(gatewayId)); + Argument.AssertNotNullOrEmpty(dnsZoneId, nameof(dnsZoneId)); - using var message = CreateGetGatewayRequest(subscriptionId, resourceGroupName, privateCloudName, gatewayId); + using var message = CreateGetDnsZoneRequest(subscriptionId, resourceGroupName, privateCloudName, dnsZoneId); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - WorkloadNetworkGatewayData value = default; + WorkloadNetworkDnsZoneData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = WorkloadNetworkGatewayData.DeserializeWorkloadNetworkGatewayData(document.RootElement); + value = WorkloadNetworkDnsZoneData.DeserializeWorkloadNetworkDnsZoneData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((WorkloadNetworkGatewayData)null, message.Response); + return Response.FromValue((WorkloadNetworkDnsZoneData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateListPortMirroringRequestUri(string subscriptionId, string resourceGroupName, string privateCloudName) + internal RequestUriBuilder CreateCreateDnsZoneRequestUri(string subscriptionId, string resourceGroupName, string privateCloudName, string dnsZoneId, WorkloadNetworkDnsZoneData data) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -1424,16 +1420,17 @@ internal RequestUriBuilder CreateListPortMirroringRequestUri(string subscription uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.AVS/privateClouds/", false); uri.AppendPath(privateCloudName, true); - uri.AppendPath("/workloadNetworks/default/portMirroringProfiles", false); + uri.AppendPath("/workloadNetworks/default/dnsZones/", false); + uri.AppendPath(dnsZoneId, true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateListPortMirroringRequest(string subscriptionId, string resourceGroupName, string privateCloudName) + internal HttpMessage CreateCreateDnsZoneRequest(string subscriptionId, string resourceGroupName, string privateCloudName, string dnsZoneId, WorkloadNetworkDnsZoneData data) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Get; + request.Method = RequestMethod.Put; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -1442,73 +1439,78 @@ internal HttpMessage CreateListPortMirroringRequest(string subscriptionId, strin uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.AVS/privateClouds/", false); uri.AppendPath(privateCloudName, true); - uri.AppendPath("/workloadNetworks/default/portMirroringProfiles", false); + uri.AppendPath("/workloadNetworks/default/dnsZones/", false); + uri.AppendPath(dnsZoneId, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; _userAgent.Apply(message); return message; } - /// List of port mirroring profiles in a private cloud workload network. - /// The ID of the target subscription. + /// Create a WorkloadNetworkDnsZone. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. + /// ID of the DNS zone. + /// Resource create parameters. /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListPortMirroringAsync(string subscriptionId, string resourceGroupName, string privateCloudName, CancellationToken cancellationToken = default) + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task CreateDnsZoneAsync(string subscriptionId, string resourceGroupName, string privateCloudName, string dnsZoneId, WorkloadNetworkDnsZoneData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); + Argument.AssertNotNullOrEmpty(dnsZoneId, nameof(dnsZoneId)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateListPortMirroringRequest(subscriptionId, resourceGroupName, privateCloudName); + using var message = CreateCreateDnsZoneRequest(subscriptionId, resourceGroupName, privateCloudName, dnsZoneId, data); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - { - WorkloadNetworkPortMirroringList value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = WorkloadNetworkPortMirroringList.DeserializeWorkloadNetworkPortMirroringList(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 201: + return message.Response; default: throw new RequestFailedException(message.Response); } } - /// List of port mirroring profiles in a private cloud workload network. - /// The ID of the target subscription. + /// Create a WorkloadNetworkDnsZone. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. + /// ID of the DNS zone. + /// Resource create parameters. /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response ListPortMirroring(string subscriptionId, string resourceGroupName, string privateCloudName, CancellationToken cancellationToken = default) + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response CreateDnsZone(string subscriptionId, string resourceGroupName, string privateCloudName, string dnsZoneId, WorkloadNetworkDnsZoneData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); + Argument.AssertNotNullOrEmpty(dnsZoneId, nameof(dnsZoneId)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateListPortMirroringRequest(subscriptionId, resourceGroupName, privateCloudName); + using var message = CreateCreateDnsZoneRequest(subscriptionId, resourceGroupName, privateCloudName, dnsZoneId, data); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - { - WorkloadNetworkPortMirroringList value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = WorkloadNetworkPortMirroringList.DeserializeWorkloadNetworkPortMirroringList(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 201: + return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateGetPortMirroringRequestUri(string subscriptionId, string resourceGroupName, string privateCloudName, string portMirroringId) + internal RequestUriBuilder CreateUpdateDnsZoneRequestUri(string subscriptionId, string resourceGroupName, string privateCloudName, string dnsZoneId, WorkloadNetworkDnsZoneData data) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -1518,17 +1520,17 @@ internal RequestUriBuilder CreateGetPortMirroringRequestUri(string subscriptionI uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.AVS/privateClouds/", false); uri.AppendPath(privateCloudName, true); - uri.AppendPath("/workloadNetworks/default/portMirroringProfiles/", false); - uri.AppendPath(portMirroringId, true); + uri.AppendPath("/workloadNetworks/default/dnsZones/", false); + uri.AppendPath(dnsZoneId, true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateGetPortMirroringRequest(string subscriptionId, string resourceGroupName, string privateCloudName, string portMirroringId) + internal HttpMessage CreateUpdateDnsZoneRequest(string subscriptionId, string resourceGroupName, string privateCloudName, string dnsZoneId, WorkloadNetworkDnsZoneData data) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Get; + request.Method = RequestMethod.Patch; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -1537,82 +1539,78 @@ internal HttpMessage CreateGetPortMirroringRequest(string subscriptionId, string uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.AVS/privateClouds/", false); uri.AppendPath(privateCloudName, true); - uri.AppendPath("/workloadNetworks/default/portMirroringProfiles/", false); - uri.AppendPath(portMirroringId, true); + uri.AppendPath("/workloadNetworks/default/dnsZones/", false); + uri.AppendPath(dnsZoneId, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; _userAgent.Apply(message); return message; } - /// Get a port mirroring profile by id in a private cloud workload network. - /// The ID of the target subscription. + /// Update a WorkloadNetworkDnsZone. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. + /// ID of the DNS zone. + /// The resource properties to be updated. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetPortMirroringAsync(string subscriptionId, string resourceGroupName, string privateCloudName, string portMirroringId, CancellationToken cancellationToken = default) + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task UpdateDnsZoneAsync(string subscriptionId, string resourceGroupName, string privateCloudName, string dnsZoneId, WorkloadNetworkDnsZoneData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); - Argument.AssertNotNullOrEmpty(portMirroringId, nameof(portMirroringId)); + Argument.AssertNotNullOrEmpty(dnsZoneId, nameof(dnsZoneId)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateGetPortMirroringRequest(subscriptionId, resourceGroupName, privateCloudName, portMirroringId); + using var message = CreateUpdateDnsZoneRequest(subscriptionId, resourceGroupName, privateCloudName, dnsZoneId, data); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - { - WorkloadNetworkPortMirroringProfileData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = WorkloadNetworkPortMirroringProfileData.DeserializeWorkloadNetworkPortMirroringProfileData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((WorkloadNetworkPortMirroringProfileData)null, message.Response); + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Get a port mirroring profile by id in a private cloud workload network. - /// The ID of the target subscription. + /// Update a WorkloadNetworkDnsZone. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. + /// ID of the DNS zone. + /// The resource properties to be updated. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response GetPortMirroring(string subscriptionId, string resourceGroupName, string privateCloudName, string portMirroringId, CancellationToken cancellationToken = default) + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response UpdateDnsZone(string subscriptionId, string resourceGroupName, string privateCloudName, string dnsZoneId, WorkloadNetworkDnsZoneData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); - Argument.AssertNotNullOrEmpty(portMirroringId, nameof(portMirroringId)); + Argument.AssertNotNullOrEmpty(dnsZoneId, nameof(dnsZoneId)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateGetPortMirroringRequest(subscriptionId, resourceGroupName, privateCloudName, portMirroringId); + using var message = CreateUpdateDnsZoneRequest(subscriptionId, resourceGroupName, privateCloudName, dnsZoneId, data); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - { - WorkloadNetworkPortMirroringProfileData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = WorkloadNetworkPortMirroringProfileData.DeserializeWorkloadNetworkPortMirroringProfileData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((WorkloadNetworkPortMirroringProfileData)null, message.Response); + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateCreatePortMirroringRequestUri(string subscriptionId, string resourceGroupName, string privateCloudName, string portMirroringId, WorkloadNetworkPortMirroringProfileData data) + internal RequestUriBuilder CreateDeleteDnsZoneRequestUri(string subscriptionId, string resourceGroupName, string privateCloudName, string dnsZoneId) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -1622,17 +1620,17 @@ internal RequestUriBuilder CreateCreatePortMirroringRequestUri(string subscripti uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.AVS/privateClouds/", false); uri.AppendPath(privateCloudName, true); - uri.AppendPath("/workloadNetworks/default/portMirroringProfiles/", false); - uri.AppendPath(portMirroringId, true); + uri.AppendPath("/workloadNetworks/default/dnsZones/", false); + uri.AppendPath(dnsZoneId, true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateCreatePortMirroringRequest(string subscriptionId, string resourceGroupName, string privateCloudName, string portMirroringId, WorkloadNetworkPortMirroringProfileData data) + internal HttpMessage CreateDeleteDnsZoneRequest(string subscriptionId, string resourceGroupName, string privateCloudName, string dnsZoneId) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Put; + request.Method = RequestMethod.Delete; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -1641,78 +1639,72 @@ internal HttpMessage CreateCreatePortMirroringRequest(string subscriptionId, str uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.AVS/privateClouds/", false); uri.AppendPath(privateCloudName, true); - uri.AppendPath("/workloadNetworks/default/portMirroringProfiles/", false); - uri.AppendPath(portMirroringId, true); + uri.AppendPath("/workloadNetworks/default/dnsZones/", false); + uri.AppendPath(dnsZoneId, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); - request.Content = content; _userAgent.Apply(message); return message; } - /// Create a port mirroring profile by id in a private cloud workload network. - /// The ID of the target subscription. + /// Delete a WorkloadNetworkDnsZone. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. - /// NSX port mirroring. + /// ID of the DNS zone. /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task CreatePortMirroringAsync(string subscriptionId, string resourceGroupName, string privateCloudName, string portMirroringId, WorkloadNetworkPortMirroringProfileData data, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeleteDnsZoneAsync(string subscriptionId, string resourceGroupName, string privateCloudName, string dnsZoneId, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); - Argument.AssertNotNullOrEmpty(portMirroringId, nameof(portMirroringId)); - Argument.AssertNotNull(data, nameof(data)); + Argument.AssertNotNullOrEmpty(dnsZoneId, nameof(dnsZoneId)); - using var message = CreateCreatePortMirroringRequest(subscriptionId, resourceGroupName, privateCloudName, portMirroringId, data); + using var message = CreateDeleteDnsZoneRequest(subscriptionId, resourceGroupName, privateCloudName, dnsZoneId); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 201: + case 202: + case 204: return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Create a port mirroring profile by id in a private cloud workload network. - /// The ID of the target subscription. + /// Delete a WorkloadNetworkDnsZone. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. - /// NSX port mirroring. + /// ID of the DNS zone. /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response CreatePortMirroring(string subscriptionId, string resourceGroupName, string privateCloudName, string portMirroringId, WorkloadNetworkPortMirroringProfileData data, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response DeleteDnsZone(string subscriptionId, string resourceGroupName, string privateCloudName, string dnsZoneId, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); - Argument.AssertNotNullOrEmpty(portMirroringId, nameof(portMirroringId)); - Argument.AssertNotNull(data, nameof(data)); + Argument.AssertNotNullOrEmpty(dnsZoneId, nameof(dnsZoneId)); - using var message = CreateCreatePortMirroringRequest(subscriptionId, resourceGroupName, privateCloudName, portMirroringId, data); + using var message = CreateDeleteDnsZoneRequest(subscriptionId, resourceGroupName, privateCloudName, dnsZoneId); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 201: + case 202: + case 204: return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateUpdatePortMirroringRequestUri(string subscriptionId, string resourceGroupName, string privateCloudName, string portMirroringId, WorkloadNetworkPortMirroringProfileData data) + internal RequestUriBuilder CreateListGatewaysRequestUri(string subscriptionId, string resourceGroupName, string privateCloudName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -1722,17 +1714,16 @@ internal RequestUriBuilder CreateUpdatePortMirroringRequestUri(string subscripti uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.AVS/privateClouds/", false); uri.AppendPath(privateCloudName, true); - uri.AppendPath("/workloadNetworks/default/portMirroringProfiles/", false); - uri.AppendPath(portMirroringId, true); + uri.AppendPath("/workloadNetworks/default/gateways", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateUpdatePortMirroringRequest(string subscriptionId, string resourceGroupName, string privateCloudName, string portMirroringId, WorkloadNetworkPortMirroringProfileData data) + internal HttpMessage CreateListGatewaysRequest(string subscriptionId, string resourceGroupName, string privateCloudName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Patch; + request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -1741,78 +1732,73 @@ internal HttpMessage CreateUpdatePortMirroringRequest(string subscriptionId, str uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.AVS/privateClouds/", false); uri.AppendPath(privateCloudName, true); - uri.AppendPath("/workloadNetworks/default/portMirroringProfiles/", false); - uri.AppendPath(portMirroringId, true); + uri.AppendPath("/workloadNetworks/default/gateways", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); - request.Content = content; _userAgent.Apply(message); return message; } - /// Create or update a port mirroring profile by id in a private cloud workload network. - /// The ID of the target subscription. + /// List WorkloadNetworkGateway resources by WorkloadNetwork. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. - /// NSX port mirroring. /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task UpdatePortMirroringAsync(string subscriptionId, string resourceGroupName, string privateCloudName, string portMirroringId, WorkloadNetworkPortMirroringProfileData data, CancellationToken cancellationToken = default) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListGatewaysAsync(string subscriptionId, string resourceGroupName, string privateCloudName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); - Argument.AssertNotNullOrEmpty(portMirroringId, nameof(portMirroringId)); - Argument.AssertNotNull(data, nameof(data)); - using var message = CreateUpdatePortMirroringRequest(subscriptionId, resourceGroupName, privateCloudName, portMirroringId, data); + using var message = CreateListGatewaysRequest(subscriptionId, resourceGroupName, privateCloudName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 202: - return message.Response; + { + WorkloadNetworkGatewayList value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = WorkloadNetworkGatewayList.DeserializeWorkloadNetworkGatewayList(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - /// Create or update a port mirroring profile by id in a private cloud workload network. - /// The ID of the target subscription. + /// List WorkloadNetworkGateway resources by WorkloadNetwork. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. - /// NSX port mirroring. /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response UpdatePortMirroring(string subscriptionId, string resourceGroupName, string privateCloudName, string portMirroringId, WorkloadNetworkPortMirroringProfileData data, CancellationToken cancellationToken = default) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListGateways(string subscriptionId, string resourceGroupName, string privateCloudName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); - Argument.AssertNotNullOrEmpty(portMirroringId, nameof(portMirroringId)); - Argument.AssertNotNull(data, nameof(data)); - using var message = CreateUpdatePortMirroringRequest(subscriptionId, resourceGroupName, privateCloudName, portMirroringId, data); + using var message = CreateListGatewaysRequest(subscriptionId, resourceGroupName, privateCloudName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 202: - return message.Response; + { + WorkloadNetworkGatewayList value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = WorkloadNetworkGatewayList.DeserializeWorkloadNetworkGatewayList(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateDeletePortMirroringRequestUri(string subscriptionId, string resourceGroupName, string privateCloudName, string portMirroringId) + internal RequestUriBuilder CreateGetGatewayRequestUri(string subscriptionId, string resourceGroupName, string privateCloudName, string gatewayId) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -1822,17 +1808,17 @@ internal RequestUriBuilder CreateDeletePortMirroringRequestUri(string subscripti uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.AVS/privateClouds/", false); uri.AppendPath(privateCloudName, true); - uri.AppendPath("/workloadNetworks/default/portMirroringProfiles/", false); - uri.AppendPath(portMirroringId, true); + uri.AppendPath("/workloadNetworks/default/gateways/", false); + uri.AppendPath(gatewayId, true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateDeletePortMirroringRequest(string subscriptionId, string resourceGroupName, string privateCloudName, string portMirroringId) + internal HttpMessage CreateGetGatewayRequest(string subscriptionId, string resourceGroupName, string privateCloudName, string gatewayId) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Delete; + request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -1841,8 +1827,8 @@ internal HttpMessage CreateDeletePortMirroringRequest(string subscriptionId, str uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.AVS/privateClouds/", false); uri.AppendPath(privateCloudName, true); - uri.AppendPath("/workloadNetworks/default/portMirroringProfiles/", false); - uri.AppendPath(portMirroringId, true); + uri.AppendPath("/workloadNetworks/default/gateways/", false); + uri.AppendPath(gatewayId, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -1850,63 +1836,73 @@ internal HttpMessage CreateDeletePortMirroringRequest(string subscriptionId, str return message; } - /// Delete a port mirroring profile by id in a private cloud workload network. - /// The ID of the target subscription. + /// Get a WorkloadNetworkGateway. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. + /// The ID of the NSX Gateway. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task DeletePortMirroringAsync(string subscriptionId, string resourceGroupName, string privateCloudName, string portMirroringId, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetGatewayAsync(string subscriptionId, string resourceGroupName, string privateCloudName, string gatewayId, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); - Argument.AssertNotNullOrEmpty(portMirroringId, nameof(portMirroringId)); + Argument.AssertNotNullOrEmpty(gatewayId, nameof(gatewayId)); - using var message = CreateDeletePortMirroringRequest(subscriptionId, resourceGroupName, privateCloudName, portMirroringId); + using var message = CreateGetGatewayRequest(subscriptionId, resourceGroupName, privateCloudName, gatewayId); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 202: - case 204: - return message.Response; + { + WorkloadNetworkGatewayData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = WorkloadNetworkGatewayData.DeserializeWorkloadNetworkGatewayData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((WorkloadNetworkGatewayData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - /// Delete a port mirroring profile by id in a private cloud workload network. - /// The ID of the target subscription. + /// Get a WorkloadNetworkGateway. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. + /// The ID of the NSX Gateway. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response DeletePortMirroring(string subscriptionId, string resourceGroupName, string privateCloudName, string portMirroringId, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response GetGateway(string subscriptionId, string resourceGroupName, string privateCloudName, string gatewayId, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); - Argument.AssertNotNullOrEmpty(portMirroringId, nameof(portMirroringId)); + Argument.AssertNotNullOrEmpty(gatewayId, nameof(gatewayId)); - using var message = CreateDeletePortMirroringRequest(subscriptionId, resourceGroupName, privateCloudName, portMirroringId); + using var message = CreateGetGatewayRequest(subscriptionId, resourceGroupName, privateCloudName, gatewayId); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 202: - case 204: - return message.Response; + { + WorkloadNetworkGatewayData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = WorkloadNetworkGatewayData.DeserializeWorkloadNetworkGatewayData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((WorkloadNetworkGatewayData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateListVmGroupsRequestUri(string subscriptionId, string resourceGroupName, string privateCloudName) + internal RequestUriBuilder CreateListPortMirroringRequestUri(string subscriptionId, string resourceGroupName, string privateCloudName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -1916,12 +1912,12 @@ internal RequestUriBuilder CreateListVmGroupsRequestUri(string subscriptionId, s uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.AVS/privateClouds/", false); uri.AppendPath(privateCloudName, true); - uri.AppendPath("/workloadNetworks/default/vmGroups", false); + uri.AppendPath("/workloadNetworks/default/portMirroringProfiles", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateListVmGroupsRequest(string subscriptionId, string resourceGroupName, string privateCloudName) + internal HttpMessage CreateListPortMirroringRequest(string subscriptionId, string resourceGroupName, string privateCloudName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -1934,7 +1930,7 @@ internal HttpMessage CreateListVmGroupsRequest(string subscriptionId, string res uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.AVS/privateClouds/", false); uri.AppendPath(privateCloudName, true); - uri.AppendPath("/workloadNetworks/default/vmGroups", false); + uri.AppendPath("/workloadNetworks/default/portMirroringProfiles", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -1942,28 +1938,28 @@ internal HttpMessage CreateListVmGroupsRequest(string subscriptionId, string res return message; } - /// List of vm groups in a private cloud workload network. - /// The ID of the target subscription. + /// List WorkloadNetworkPortMirroring resources by WorkloadNetwork. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListVmGroupsAsync(string subscriptionId, string resourceGroupName, string privateCloudName, CancellationToken cancellationToken = default) + public async Task> ListPortMirroringAsync(string subscriptionId, string resourceGroupName, string privateCloudName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); - using var message = CreateListVmGroupsRequest(subscriptionId, resourceGroupName, privateCloudName); + using var message = CreateListPortMirroringRequest(subscriptionId, resourceGroupName, privateCloudName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - WorkloadNetworkVmGroupsList value = default; + WorkloadNetworkPortMirroringList value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = WorkloadNetworkVmGroupsList.DeserializeWorkloadNetworkVmGroupsList(document.RootElement); + value = WorkloadNetworkPortMirroringList.DeserializeWorkloadNetworkPortMirroringList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -1971,28 +1967,28 @@ public async Task> ListVmGroupsAsync(strin } } - /// List of vm groups in a private cloud workload network. - /// The ID of the target subscription. + /// List WorkloadNetworkPortMirroring resources by WorkloadNetwork. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListVmGroups(string subscriptionId, string resourceGroupName, string privateCloudName, CancellationToken cancellationToken = default) + public Response ListPortMirroring(string subscriptionId, string resourceGroupName, string privateCloudName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); - using var message = CreateListVmGroupsRequest(subscriptionId, resourceGroupName, privateCloudName); + using var message = CreateListPortMirroringRequest(subscriptionId, resourceGroupName, privateCloudName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - WorkloadNetworkVmGroupsList value = default; + WorkloadNetworkPortMirroringList value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = WorkloadNetworkVmGroupsList.DeserializeWorkloadNetworkVmGroupsList(document.RootElement); + value = WorkloadNetworkPortMirroringList.DeserializeWorkloadNetworkPortMirroringList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -2000,7 +1996,7 @@ public Response ListVmGroups(string subscriptionId, } } - internal RequestUriBuilder CreateGetVmGroupRequestUri(string subscriptionId, string resourceGroupName, string privateCloudName, string vmGroupId) + internal RequestUriBuilder CreateGetPortMirroringRequestUri(string subscriptionId, string resourceGroupName, string privateCloudName, string portMirroringId) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -2010,13 +2006,13 @@ internal RequestUriBuilder CreateGetVmGroupRequestUri(string subscriptionId, str uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.AVS/privateClouds/", false); uri.AppendPath(privateCloudName, true); - uri.AppendPath("/workloadNetworks/default/vmGroups/", false); - uri.AppendPath(vmGroupId, true); + uri.AppendPath("/workloadNetworks/default/portMirroringProfiles/", false); + uri.AppendPath(portMirroringId, true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateGetVmGroupRequest(string subscriptionId, string resourceGroupName, string privateCloudName, string vmGroupId) + internal HttpMessage CreateGetPortMirroringRequest(string subscriptionId, string resourceGroupName, string privateCloudName, string portMirroringId) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -2029,8 +2025,8 @@ internal HttpMessage CreateGetVmGroupRequest(string subscriptionId, string resou uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.AVS/privateClouds/", false); uri.AppendPath(privateCloudName, true); - uri.AppendPath("/workloadNetworks/default/vmGroups/", false); - uri.AppendPath(vmGroupId, true); + uri.AppendPath("/workloadNetworks/default/portMirroringProfiles/", false); + uri.AppendPath(portMirroringId, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -2038,73 +2034,73 @@ internal HttpMessage CreateGetVmGroupRequest(string subscriptionId, string resou return message; } - /// Get a vm group by id in a private cloud workload network. - /// The ID of the target subscription. + /// Get a WorkloadNetworkPortMirroring. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// NSX VM Group identifier. Generally the same as the VM Group's display name. + /// ID of the NSX port mirroring profile. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetVmGroupAsync(string subscriptionId, string resourceGroupName, string privateCloudName, string vmGroupId, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetPortMirroringAsync(string subscriptionId, string resourceGroupName, string privateCloudName, string portMirroringId, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); - Argument.AssertNotNullOrEmpty(vmGroupId, nameof(vmGroupId)); + Argument.AssertNotNullOrEmpty(portMirroringId, nameof(portMirroringId)); - using var message = CreateGetVmGroupRequest(subscriptionId, resourceGroupName, privateCloudName, vmGroupId); + using var message = CreateGetPortMirroringRequest(subscriptionId, resourceGroupName, privateCloudName, portMirroringId); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - WorkloadNetworkVmGroupData value = default; + WorkloadNetworkPortMirroringProfileData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = WorkloadNetworkVmGroupData.DeserializeWorkloadNetworkVmGroupData(document.RootElement); + value = WorkloadNetworkPortMirroringProfileData.DeserializeWorkloadNetworkPortMirroringProfileData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((WorkloadNetworkVmGroupData)null, message.Response); + return Response.FromValue((WorkloadNetworkPortMirroringProfileData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - /// Get a vm group by id in a private cloud workload network. - /// The ID of the target subscription. + /// Get a WorkloadNetworkPortMirroring. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// NSX VM Group identifier. Generally the same as the VM Group's display name. + /// ID of the NSX port mirroring profile. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response GetVmGroup(string subscriptionId, string resourceGroupName, string privateCloudName, string vmGroupId, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response GetPortMirroring(string subscriptionId, string resourceGroupName, string privateCloudName, string portMirroringId, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); - Argument.AssertNotNullOrEmpty(vmGroupId, nameof(vmGroupId)); + Argument.AssertNotNullOrEmpty(portMirroringId, nameof(portMirroringId)); - using var message = CreateGetVmGroupRequest(subscriptionId, resourceGroupName, privateCloudName, vmGroupId); + using var message = CreateGetPortMirroringRequest(subscriptionId, resourceGroupName, privateCloudName, portMirroringId); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - WorkloadNetworkVmGroupData value = default; + WorkloadNetworkPortMirroringProfileData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = WorkloadNetworkVmGroupData.DeserializeWorkloadNetworkVmGroupData(document.RootElement); + value = WorkloadNetworkPortMirroringProfileData.DeserializeWorkloadNetworkPortMirroringProfileData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((WorkloadNetworkVmGroupData)null, message.Response); + return Response.FromValue((WorkloadNetworkPortMirroringProfileData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateCreateVmGroupRequestUri(string subscriptionId, string resourceGroupName, string privateCloudName, string vmGroupId, WorkloadNetworkVmGroupData data) + internal RequestUriBuilder CreateCreatePortMirroringRequestUri(string subscriptionId, string resourceGroupName, string privateCloudName, string portMirroringId, WorkloadNetworkPortMirroringProfileData data) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -2114,13 +2110,13 @@ internal RequestUriBuilder CreateCreateVmGroupRequestUri(string subscriptionId, uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.AVS/privateClouds/", false); uri.AppendPath(privateCloudName, true); - uri.AppendPath("/workloadNetworks/default/vmGroups/", false); - uri.AppendPath(vmGroupId, true); + uri.AppendPath("/workloadNetworks/default/portMirroringProfiles/", false); + uri.AppendPath(portMirroringId, true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateCreateVmGroupRequest(string subscriptionId, string resourceGroupName, string privateCloudName, string vmGroupId, WorkloadNetworkVmGroupData data) + internal HttpMessage CreateCreatePortMirroringRequest(string subscriptionId, string resourceGroupName, string privateCloudName, string portMirroringId, WorkloadNetworkPortMirroringProfileData data) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -2133,8 +2129,8 @@ internal HttpMessage CreateCreateVmGroupRequest(string subscriptionId, string re uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.AVS/privateClouds/", false); uri.AppendPath(privateCloudName, true); - uri.AppendPath("/workloadNetworks/default/vmGroups/", false); - uri.AppendPath(vmGroupId, true); + uri.AppendPath("/workloadNetworks/default/portMirroringProfiles/", false); + uri.AppendPath(portMirroringId, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -2146,24 +2142,24 @@ internal HttpMessage CreateCreateVmGroupRequest(string subscriptionId, string re return message; } - /// Create a vm group by id in a private cloud workload network. - /// The ID of the target subscription. + /// Create a WorkloadNetworkPortMirroring. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// NSX VM Group identifier. Generally the same as the VM Group's display name. - /// NSX VM Group. + /// ID of the NSX port mirroring profile. + /// Resource create parameters. /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task CreateVmGroupAsync(string subscriptionId, string resourceGroupName, string privateCloudName, string vmGroupId, WorkloadNetworkVmGroupData data, CancellationToken cancellationToken = default) + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task CreatePortMirroringAsync(string subscriptionId, string resourceGroupName, string privateCloudName, string portMirroringId, WorkloadNetworkPortMirroringProfileData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); - Argument.AssertNotNullOrEmpty(vmGroupId, nameof(vmGroupId)); + Argument.AssertNotNullOrEmpty(portMirroringId, nameof(portMirroringId)); Argument.AssertNotNull(data, nameof(data)); - using var message = CreateCreateVmGroupRequest(subscriptionId, resourceGroupName, privateCloudName, vmGroupId, data); + using var message = CreateCreatePortMirroringRequest(subscriptionId, resourceGroupName, privateCloudName, portMirroringId, data); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -2175,24 +2171,24 @@ public async Task CreateVmGroupAsync(string subscriptionId, string res } } - /// Create a vm group by id in a private cloud workload network. - /// The ID of the target subscription. + /// Create a WorkloadNetworkPortMirroring. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// NSX VM Group identifier. Generally the same as the VM Group's display name. - /// NSX VM Group. + /// ID of the NSX port mirroring profile. + /// Resource create parameters. /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response CreateVmGroup(string subscriptionId, string resourceGroupName, string privateCloudName, string vmGroupId, WorkloadNetworkVmGroupData data, CancellationToken cancellationToken = default) + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response CreatePortMirroring(string subscriptionId, string resourceGroupName, string privateCloudName, string portMirroringId, WorkloadNetworkPortMirroringProfileData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); - Argument.AssertNotNullOrEmpty(vmGroupId, nameof(vmGroupId)); + Argument.AssertNotNullOrEmpty(portMirroringId, nameof(portMirroringId)); Argument.AssertNotNull(data, nameof(data)); - using var message = CreateCreateVmGroupRequest(subscriptionId, resourceGroupName, privateCloudName, vmGroupId, data); + using var message = CreateCreatePortMirroringRequest(subscriptionId, resourceGroupName, privateCloudName, portMirroringId, data); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -2204,7 +2200,7 @@ public Response CreateVmGroup(string subscriptionId, string resourceGroupName, s } } - internal RequestUriBuilder CreateUpdateVmGroupRequestUri(string subscriptionId, string resourceGroupName, string privateCloudName, string vmGroupId, WorkloadNetworkVmGroupData data) + internal RequestUriBuilder CreateUpdatePortMirroringRequestUri(string subscriptionId, string resourceGroupName, string privateCloudName, string portMirroringId, WorkloadNetworkPortMirroringProfileData data) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -2214,13 +2210,13 @@ internal RequestUriBuilder CreateUpdateVmGroupRequestUri(string subscriptionId, uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.AVS/privateClouds/", false); uri.AppendPath(privateCloudName, true); - uri.AppendPath("/workloadNetworks/default/vmGroups/", false); - uri.AppendPath(vmGroupId, true); + uri.AppendPath("/workloadNetworks/default/portMirroringProfiles/", false); + uri.AppendPath(portMirroringId, true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateUpdateVmGroupRequest(string subscriptionId, string resourceGroupName, string privateCloudName, string vmGroupId, WorkloadNetworkVmGroupData data) + internal HttpMessage CreateUpdatePortMirroringRequest(string subscriptionId, string resourceGroupName, string privateCloudName, string portMirroringId, WorkloadNetworkPortMirroringProfileData data) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -2233,8 +2229,8 @@ internal HttpMessage CreateUpdateVmGroupRequest(string subscriptionId, string re uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.AVS/privateClouds/", false); uri.AppendPath(privateCloudName, true); - uri.AppendPath("/workloadNetworks/default/vmGroups/", false); - uri.AppendPath(vmGroupId, true); + uri.AppendPath("/workloadNetworks/default/portMirroringProfiles/", false); + uri.AppendPath(portMirroringId, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -2246,24 +2242,24 @@ internal HttpMessage CreateUpdateVmGroupRequest(string subscriptionId, string re return message; } - /// Create or update a vm group by id in a private cloud workload network. - /// The ID of the target subscription. + /// Update a WorkloadNetworkPortMirroring. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// NSX VM Group identifier. Generally the same as the VM Group's display name. - /// NSX VM Group. + /// ID of the NSX port mirroring profile. + /// The resource properties to be updated. /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task UpdateVmGroupAsync(string subscriptionId, string resourceGroupName, string privateCloudName, string vmGroupId, WorkloadNetworkVmGroupData data, CancellationToken cancellationToken = default) + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task UpdatePortMirroringAsync(string subscriptionId, string resourceGroupName, string privateCloudName, string portMirroringId, WorkloadNetworkPortMirroringProfileData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); - Argument.AssertNotNullOrEmpty(vmGroupId, nameof(vmGroupId)); + Argument.AssertNotNullOrEmpty(portMirroringId, nameof(portMirroringId)); Argument.AssertNotNull(data, nameof(data)); - using var message = CreateUpdateVmGroupRequest(subscriptionId, resourceGroupName, privateCloudName, vmGroupId, data); + using var message = CreateUpdatePortMirroringRequest(subscriptionId, resourceGroupName, privateCloudName, portMirroringId, data); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -2275,24 +2271,24 @@ public async Task UpdateVmGroupAsync(string subscriptionId, string res } } - /// Create or update a vm group by id in a private cloud workload network. - /// The ID of the target subscription. + /// Update a WorkloadNetworkPortMirroring. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// NSX VM Group identifier. Generally the same as the VM Group's display name. - /// NSX VM Group. + /// ID of the NSX port mirroring profile. + /// The resource properties to be updated. /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response UpdateVmGroup(string subscriptionId, string resourceGroupName, string privateCloudName, string vmGroupId, WorkloadNetworkVmGroupData data, CancellationToken cancellationToken = default) + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response UpdatePortMirroring(string subscriptionId, string resourceGroupName, string privateCloudName, string portMirroringId, WorkloadNetworkPortMirroringProfileData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); - Argument.AssertNotNullOrEmpty(vmGroupId, nameof(vmGroupId)); + Argument.AssertNotNullOrEmpty(portMirroringId, nameof(portMirroringId)); Argument.AssertNotNull(data, nameof(data)); - using var message = CreateUpdateVmGroupRequest(subscriptionId, resourceGroupName, privateCloudName, vmGroupId, data); + using var message = CreateUpdatePortMirroringRequest(subscriptionId, resourceGroupName, privateCloudName, portMirroringId, data); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -2304,7 +2300,7 @@ public Response UpdateVmGroup(string subscriptionId, string resourceGroupName, s } } - internal RequestUriBuilder CreateDeleteVmGroupRequestUri(string subscriptionId, string resourceGroupName, string privateCloudName, string vmGroupId) + internal RequestUriBuilder CreateDeletePortMirroringRequestUri(string subscriptionId, string resourceGroupName, string privateCloudName, string portMirroringId) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -2314,13 +2310,13 @@ internal RequestUriBuilder CreateDeleteVmGroupRequestUri(string subscriptionId, uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.AVS/privateClouds/", false); uri.AppendPath(privateCloudName, true); - uri.AppendPath("/workloadNetworks/default/vmGroups/", false); - uri.AppendPath(vmGroupId, true); + uri.AppendPath("/workloadNetworks/default/portMirroringProfiles/", false); + uri.AppendPath(portMirroringId, true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateDeleteVmGroupRequest(string subscriptionId, string resourceGroupName, string privateCloudName, string vmGroupId) + internal HttpMessage CreateDeletePortMirroringRequest(string subscriptionId, string resourceGroupName, string privateCloudName, string portMirroringId) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -2333,8 +2329,8 @@ internal HttpMessage CreateDeleteVmGroupRequest(string subscriptionId, string re uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.AVS/privateClouds/", false); uri.AppendPath(privateCloudName, true); - uri.AppendPath("/workloadNetworks/default/vmGroups/", false); - uri.AppendPath(vmGroupId, true); + uri.AppendPath("/workloadNetworks/default/portMirroringProfiles/", false); + uri.AppendPath(portMirroringId, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -2342,22 +2338,22 @@ internal HttpMessage CreateDeleteVmGroupRequest(string subscriptionId, string re return message; } - /// Delete a vm group by id in a private cloud workload network. - /// The ID of the target subscription. + /// Delete a WorkloadNetworkPortMirroring. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// NSX VM Group identifier. Generally the same as the VM Group's display name. + /// ID of the NSX port mirroring profile. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task DeleteVmGroupAsync(string subscriptionId, string resourceGroupName, string privateCloudName, string vmGroupId, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeletePortMirroringAsync(string subscriptionId, string resourceGroupName, string privateCloudName, string portMirroringId, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); - Argument.AssertNotNullOrEmpty(vmGroupId, nameof(vmGroupId)); + Argument.AssertNotNullOrEmpty(portMirroringId, nameof(portMirroringId)); - using var message = CreateDeleteVmGroupRequest(subscriptionId, resourceGroupName, privateCloudName, vmGroupId); + using var message = CreateDeletePortMirroringRequest(subscriptionId, resourceGroupName, privateCloudName, portMirroringId); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -2370,22 +2366,22 @@ public async Task DeleteVmGroupAsync(string subscriptionId, string res } } - /// Delete a vm group by id in a private cloud workload network. - /// The ID of the target subscription. + /// Delete a WorkloadNetworkPortMirroring. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// NSX VM Group identifier. Generally the same as the VM Group's display name. + /// ID of the NSX port mirroring profile. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response DeleteVmGroup(string subscriptionId, string resourceGroupName, string privateCloudName, string vmGroupId, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response DeletePortMirroring(string subscriptionId, string resourceGroupName, string privateCloudName, string portMirroringId, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); - Argument.AssertNotNullOrEmpty(vmGroupId, nameof(vmGroupId)); + Argument.AssertNotNullOrEmpty(portMirroringId, nameof(portMirroringId)); - using var message = CreateDeleteVmGroupRequest(subscriptionId, resourceGroupName, privateCloudName, vmGroupId); + using var message = CreateDeletePortMirroringRequest(subscriptionId, resourceGroupName, privateCloudName, portMirroringId); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -2398,7 +2394,7 @@ public Response DeleteVmGroup(string subscriptionId, string resourceGroupName, s } } - internal RequestUriBuilder CreateListVirtualMachinesRequestUri(string subscriptionId, string resourceGroupName, string privateCloudName) + internal RequestUriBuilder CreateListPublicIPsRequestUri(string subscriptionId, string resourceGroupName, string privateCloudName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -2408,12 +2404,12 @@ internal RequestUriBuilder CreateListVirtualMachinesRequestUri(string subscripti uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.AVS/privateClouds/", false); uri.AppendPath(privateCloudName, true); - uri.AppendPath("/workloadNetworks/default/virtualMachines", false); + uri.AppendPath("/workloadNetworks/default/publicIPs", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateListVirtualMachinesRequest(string subscriptionId, string resourceGroupName, string privateCloudName) + internal HttpMessage CreateListPublicIPsRequest(string subscriptionId, string resourceGroupName, string privateCloudName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -2426,7 +2422,7 @@ internal HttpMessage CreateListVirtualMachinesRequest(string subscriptionId, str uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.AVS/privateClouds/", false); uri.AppendPath(privateCloudName, true); - uri.AppendPath("/workloadNetworks/default/virtualMachines", false); + uri.AppendPath("/workloadNetworks/default/publicIPs", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -2434,28 +2430,28 @@ internal HttpMessage CreateListVirtualMachinesRequest(string subscriptionId, str return message; } - /// List of virtual machines in a private cloud workload network. - /// The ID of the target subscription. + /// List WorkloadNetworkPublicIP resources by WorkloadNetwork. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListVirtualMachinesAsync(string subscriptionId, string resourceGroupName, string privateCloudName, CancellationToken cancellationToken = default) + public async Task> ListPublicIPsAsync(string subscriptionId, string resourceGroupName, string privateCloudName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); - using var message = CreateListVirtualMachinesRequest(subscriptionId, resourceGroupName, privateCloudName); + using var message = CreateListPublicIPsRequest(subscriptionId, resourceGroupName, privateCloudName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - WorkloadNetworkVirtualMachinesList value = default; + WorkloadNetworkPublicIPsList value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = WorkloadNetworkVirtualMachinesList.DeserializeWorkloadNetworkVirtualMachinesList(document.RootElement); + value = WorkloadNetworkPublicIPsList.DeserializeWorkloadNetworkPublicIPsList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -2463,28 +2459,28 @@ public async Task> ListVirtualMachi } } - /// List of virtual machines in a private cloud workload network. - /// The ID of the target subscription. + /// List WorkloadNetworkPublicIP resources by WorkloadNetwork. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListVirtualMachines(string subscriptionId, string resourceGroupName, string privateCloudName, CancellationToken cancellationToken = default) + public Response ListPublicIPs(string subscriptionId, string resourceGroupName, string privateCloudName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); - using var message = CreateListVirtualMachinesRequest(subscriptionId, resourceGroupName, privateCloudName); + using var message = CreateListPublicIPsRequest(subscriptionId, resourceGroupName, privateCloudName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - WorkloadNetworkVirtualMachinesList value = default; + WorkloadNetworkPublicIPsList value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = WorkloadNetworkVirtualMachinesList.DeserializeWorkloadNetworkVirtualMachinesList(document.RootElement); + value = WorkloadNetworkPublicIPsList.DeserializeWorkloadNetworkPublicIPsList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -2492,7 +2488,7 @@ public Response ListVirtualMachines(string s } } - internal RequestUriBuilder CreateGetVirtualMachineRequestUri(string subscriptionId, string resourceGroupName, string privateCloudName, string virtualMachineId) + internal RequestUriBuilder CreateGetPublicIPRequestUri(string subscriptionId, string resourceGroupName, string privateCloudName, string publicIPId) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -2502,13 +2498,13 @@ internal RequestUriBuilder CreateGetVirtualMachineRequestUri(string subscription uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.AVS/privateClouds/", false); uri.AppendPath(privateCloudName, true); - uri.AppendPath("/workloadNetworks/default/virtualMachines/", false); - uri.AppendPath(virtualMachineId, true); + uri.AppendPath("/workloadNetworks/default/publicIPs/", false); + uri.AppendPath(publicIPId, true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateGetVirtualMachineRequest(string subscriptionId, string resourceGroupName, string privateCloudName, string virtualMachineId) + internal HttpMessage CreateGetPublicIPRequest(string subscriptionId, string resourceGroupName, string privateCloudName, string publicIPId) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -2521,8 +2517,8 @@ internal HttpMessage CreateGetVirtualMachineRequest(string subscriptionId, strin uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.AVS/privateClouds/", false); uri.AppendPath(privateCloudName, true); - uri.AppendPath("/workloadNetworks/default/virtualMachines/", false); - uri.AppendPath(virtualMachineId, true); + uri.AppendPath("/workloadNetworks/default/publicIPs/", false); + uri.AppendPath(publicIPId, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -2530,73 +2526,73 @@ internal HttpMessage CreateGetVirtualMachineRequest(string subscriptionId, strin return message; } - /// Get a virtual machine by id in a private cloud workload network. - /// The ID of the target subscription. + /// Get a WorkloadNetworkPublicIP. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// Virtual Machine identifier. + /// ID of the DNS zone. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetVirtualMachineAsync(string subscriptionId, string resourceGroupName, string privateCloudName, string virtualMachineId, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetPublicIPAsync(string subscriptionId, string resourceGroupName, string privateCloudName, string publicIPId, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); - Argument.AssertNotNullOrEmpty(virtualMachineId, nameof(virtualMachineId)); + Argument.AssertNotNullOrEmpty(publicIPId, nameof(publicIPId)); - using var message = CreateGetVirtualMachineRequest(subscriptionId, resourceGroupName, privateCloudName, virtualMachineId); + using var message = CreateGetPublicIPRequest(subscriptionId, resourceGroupName, privateCloudName, publicIPId); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - WorkloadNetworkVirtualMachineData value = default; + WorkloadNetworkPublicIPData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = WorkloadNetworkVirtualMachineData.DeserializeWorkloadNetworkVirtualMachineData(document.RootElement); + value = WorkloadNetworkPublicIPData.DeserializeWorkloadNetworkPublicIPData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((WorkloadNetworkVirtualMachineData)null, message.Response); + return Response.FromValue((WorkloadNetworkPublicIPData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - /// Get a virtual machine by id in a private cloud workload network. - /// The ID of the target subscription. + /// Get a WorkloadNetworkPublicIP. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// Virtual Machine identifier. + /// ID of the DNS zone. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response GetVirtualMachine(string subscriptionId, string resourceGroupName, string privateCloudName, string virtualMachineId, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response GetPublicIP(string subscriptionId, string resourceGroupName, string privateCloudName, string publicIPId, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); - Argument.AssertNotNullOrEmpty(virtualMachineId, nameof(virtualMachineId)); + Argument.AssertNotNullOrEmpty(publicIPId, nameof(publicIPId)); - using var message = CreateGetVirtualMachineRequest(subscriptionId, resourceGroupName, privateCloudName, virtualMachineId); + using var message = CreateGetPublicIPRequest(subscriptionId, resourceGroupName, privateCloudName, publicIPId); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - WorkloadNetworkVirtualMachineData value = default; + WorkloadNetworkPublicIPData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = WorkloadNetworkVirtualMachineData.DeserializeWorkloadNetworkVirtualMachineData(document.RootElement); + value = WorkloadNetworkPublicIPData.DeserializeWorkloadNetworkPublicIPData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((WorkloadNetworkVirtualMachineData)null, message.Response); + return Response.FromValue((WorkloadNetworkPublicIPData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateListDnsServicesRequestUri(string subscriptionId, string resourceGroupName, string privateCloudName) + internal RequestUriBuilder CreateCreatePublicIPRequestUri(string subscriptionId, string resourceGroupName, string privateCloudName, string publicIPId, WorkloadNetworkPublicIPData data) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -2606,16 +2602,17 @@ internal RequestUriBuilder CreateListDnsServicesRequestUri(string subscriptionId uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.AVS/privateClouds/", false); uri.AppendPath(privateCloudName, true); - uri.AppendPath("/workloadNetworks/default/dnsServices", false); + uri.AppendPath("/workloadNetworks/default/publicIPs/", false); + uri.AppendPath(publicIPId, true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateListDnsServicesRequest(string subscriptionId, string resourceGroupName, string privateCloudName) + internal HttpMessage CreateCreatePublicIPRequest(string subscriptionId, string resourceGroupName, string privateCloudName, string publicIPId, WorkloadNetworkPublicIPData data) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Get; + request.Method = RequestMethod.Put; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -2624,73 +2621,78 @@ internal HttpMessage CreateListDnsServicesRequest(string subscriptionId, string uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.AVS/privateClouds/", false); uri.AppendPath(privateCloudName, true); - uri.AppendPath("/workloadNetworks/default/dnsServices", false); + uri.AppendPath("/workloadNetworks/default/publicIPs/", false); + uri.AppendPath(publicIPId, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; _userAgent.Apply(message); return message; } - /// List of DNS services in a private cloud workload network. - /// The ID of the target subscription. + /// Create a WorkloadNetworkPublicIP. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. + /// ID of the DNS zone. + /// Resource create parameters. /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListDnsServicesAsync(string subscriptionId, string resourceGroupName, string privateCloudName, CancellationToken cancellationToken = default) + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task CreatePublicIPAsync(string subscriptionId, string resourceGroupName, string privateCloudName, string publicIPId, WorkloadNetworkPublicIPData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); + Argument.AssertNotNullOrEmpty(publicIPId, nameof(publicIPId)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateListDnsServicesRequest(subscriptionId, resourceGroupName, privateCloudName); + using var message = CreateCreatePublicIPRequest(subscriptionId, resourceGroupName, privateCloudName, publicIPId, data); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - { - WorkloadNetworkDnsServicesList value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = WorkloadNetworkDnsServicesList.DeserializeWorkloadNetworkDnsServicesList(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 201: + return message.Response; default: throw new RequestFailedException(message.Response); } } - /// List of DNS services in a private cloud workload network. - /// The ID of the target subscription. + /// Create a WorkloadNetworkPublicIP. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. + /// ID of the DNS zone. + /// Resource create parameters. /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response ListDnsServices(string subscriptionId, string resourceGroupName, string privateCloudName, CancellationToken cancellationToken = default) + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response CreatePublicIP(string subscriptionId, string resourceGroupName, string privateCloudName, string publicIPId, WorkloadNetworkPublicIPData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); + Argument.AssertNotNullOrEmpty(publicIPId, nameof(publicIPId)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateListDnsServicesRequest(subscriptionId, resourceGroupName, privateCloudName); + using var message = CreateCreatePublicIPRequest(subscriptionId, resourceGroupName, privateCloudName, publicIPId, data); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - { - WorkloadNetworkDnsServicesList value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = WorkloadNetworkDnsServicesList.DeserializeWorkloadNetworkDnsServicesList(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 201: + return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateGetDnsServiceRequestUri(string subscriptionId, string resourceGroupName, string privateCloudName, string dnsServiceId) + internal RequestUriBuilder CreateDeletePublicIPRequestUri(string subscriptionId, string resourceGroupName, string privateCloudName, string publicIPId) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -2700,17 +2702,17 @@ internal RequestUriBuilder CreateGetDnsServiceRequestUri(string subscriptionId, uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.AVS/privateClouds/", false); uri.AppendPath(privateCloudName, true); - uri.AppendPath("/workloadNetworks/default/dnsServices/", false); - uri.AppendPath(dnsServiceId, true); + uri.AppendPath("/workloadNetworks/default/publicIPs/", false); + uri.AppendPath(publicIPId, true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateGetDnsServiceRequest(string subscriptionId, string resourceGroupName, string privateCloudName, string dnsServiceId) + internal HttpMessage CreateDeletePublicIPRequest(string subscriptionId, string resourceGroupName, string privateCloudName, string publicIPId) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Get; + request.Method = RequestMethod.Delete; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -2719,8 +2721,8 @@ internal HttpMessage CreateGetDnsServiceRequest(string subscriptionId, string re uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.AVS/privateClouds/", false); uri.AppendPath(privateCloudName, true); - uri.AppendPath("/workloadNetworks/default/dnsServices/", false); - uri.AppendPath(dnsServiceId, true); + uri.AppendPath("/workloadNetworks/default/publicIPs/", false); + uri.AppendPath(publicIPId, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -2728,73 +2730,63 @@ internal HttpMessage CreateGetDnsServiceRequest(string subscriptionId, string re return message; } - /// Get a DNS service by id in a private cloud workload network. - /// The ID of the target subscription. + /// Delete a WorkloadNetworkPublicIP. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// NSX DNS Service identifier. Generally the same as the DNS Service's display name. + /// ID of the DNS zone. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetDnsServiceAsync(string subscriptionId, string resourceGroupName, string privateCloudName, string dnsServiceId, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeletePublicIPAsync(string subscriptionId, string resourceGroupName, string privateCloudName, string publicIPId, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); - Argument.AssertNotNullOrEmpty(dnsServiceId, nameof(dnsServiceId)); + Argument.AssertNotNullOrEmpty(publicIPId, nameof(publicIPId)); - using var message = CreateGetDnsServiceRequest(subscriptionId, resourceGroupName, privateCloudName, dnsServiceId); + using var message = CreateDeletePublicIPRequest(subscriptionId, resourceGroupName, privateCloudName, publicIPId); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - { - WorkloadNetworkDnsServiceData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = WorkloadNetworkDnsServiceData.DeserializeWorkloadNetworkDnsServiceData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((WorkloadNetworkDnsServiceData)null, message.Response); + case 202: + case 204: + return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Get a DNS service by id in a private cloud workload network. - /// The ID of the target subscription. + /// Delete a WorkloadNetworkPublicIP. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// NSX DNS Service identifier. Generally the same as the DNS Service's display name. + /// ID of the DNS zone. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response GetDnsService(string subscriptionId, string resourceGroupName, string privateCloudName, string dnsServiceId, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response DeletePublicIP(string subscriptionId, string resourceGroupName, string privateCloudName, string publicIPId, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); - Argument.AssertNotNullOrEmpty(dnsServiceId, nameof(dnsServiceId)); + Argument.AssertNotNullOrEmpty(publicIPId, nameof(publicIPId)); - using var message = CreateGetDnsServiceRequest(subscriptionId, resourceGroupName, privateCloudName, dnsServiceId); + using var message = CreateDeletePublicIPRequest(subscriptionId, resourceGroupName, privateCloudName, publicIPId); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - { - WorkloadNetworkDnsServiceData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = WorkloadNetworkDnsServiceData.DeserializeWorkloadNetworkDnsServiceData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((WorkloadNetworkDnsServiceData)null, message.Response); + case 202: + case 204: + return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateCreateDnsServiceRequestUri(string subscriptionId, string resourceGroupName, string privateCloudName, string dnsServiceId, WorkloadNetworkDnsServiceData data) + internal RequestUriBuilder CreateListSegmentsRequestUri(string subscriptionId, string resourceGroupName, string privateCloudName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -2804,17 +2796,16 @@ internal RequestUriBuilder CreateCreateDnsServiceRequestUri(string subscriptionI uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.AVS/privateClouds/", false); uri.AppendPath(privateCloudName, true); - uri.AppendPath("/workloadNetworks/default/dnsServices/", false); - uri.AppendPath(dnsServiceId, true); + uri.AppendPath("/workloadNetworks/default/segments", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateCreateDnsServiceRequest(string subscriptionId, string resourceGroupName, string privateCloudName, string dnsServiceId, WorkloadNetworkDnsServiceData data) + internal HttpMessage CreateListSegmentsRequest(string subscriptionId, string resourceGroupName, string privateCloudName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Put; + request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -2823,78 +2814,73 @@ internal HttpMessage CreateCreateDnsServiceRequest(string subscriptionId, string uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.AVS/privateClouds/", false); uri.AppendPath(privateCloudName, true); - uri.AppendPath("/workloadNetworks/default/dnsServices/", false); - uri.AppendPath(dnsServiceId, true); + uri.AppendPath("/workloadNetworks/default/segments", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); - request.Content = content; _userAgent.Apply(message); return message; } - /// Create a DNS service by id in a private cloud workload network. - /// The ID of the target subscription. + /// List WorkloadNetworkSegment resources by WorkloadNetwork. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// NSX DNS Service identifier. Generally the same as the DNS Service's display name. - /// NSX DNS Service. /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task CreateDnsServiceAsync(string subscriptionId, string resourceGroupName, string privateCloudName, string dnsServiceId, WorkloadNetworkDnsServiceData data, CancellationToken cancellationToken = default) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListSegmentsAsync(string subscriptionId, string resourceGroupName, string privateCloudName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); - Argument.AssertNotNullOrEmpty(dnsServiceId, nameof(dnsServiceId)); - Argument.AssertNotNull(data, nameof(data)); - using var message = CreateCreateDnsServiceRequest(subscriptionId, resourceGroupName, privateCloudName, dnsServiceId, data); + using var message = CreateListSegmentsRequest(subscriptionId, resourceGroupName, privateCloudName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 201: - return message.Response; + { + WorkloadNetworkSegmentsList value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = WorkloadNetworkSegmentsList.DeserializeWorkloadNetworkSegmentsList(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - /// Create a DNS service by id in a private cloud workload network. - /// The ID of the target subscription. + /// List WorkloadNetworkSegment resources by WorkloadNetwork. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// NSX DNS Service identifier. Generally the same as the DNS Service's display name. - /// NSX DNS Service. /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response CreateDnsService(string subscriptionId, string resourceGroupName, string privateCloudName, string dnsServiceId, WorkloadNetworkDnsServiceData data, CancellationToken cancellationToken = default) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListSegments(string subscriptionId, string resourceGroupName, string privateCloudName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); - Argument.AssertNotNullOrEmpty(dnsServiceId, nameof(dnsServiceId)); - Argument.AssertNotNull(data, nameof(data)); - using var message = CreateCreateDnsServiceRequest(subscriptionId, resourceGroupName, privateCloudName, dnsServiceId, data); + using var message = CreateListSegmentsRequest(subscriptionId, resourceGroupName, privateCloudName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 201: - return message.Response; + { + WorkloadNetworkSegmentsList value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = WorkloadNetworkSegmentsList.DeserializeWorkloadNetworkSegmentsList(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateUpdateDnsServiceRequestUri(string subscriptionId, string resourceGroupName, string privateCloudName, string dnsServiceId, WorkloadNetworkDnsServiceData data) + internal RequestUriBuilder CreateGetSegmentRequestUri(string subscriptionId, string resourceGroupName, string privateCloudName, string segmentId) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -2904,17 +2890,17 @@ internal RequestUriBuilder CreateUpdateDnsServiceRequestUri(string subscriptionI uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.AVS/privateClouds/", false); uri.AppendPath(privateCloudName, true); - uri.AppendPath("/workloadNetworks/default/dnsServices/", false); - uri.AppendPath(dnsServiceId, true); + uri.AppendPath("/workloadNetworks/default/segments/", false); + uri.AppendPath(segmentId, true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateUpdateDnsServiceRequest(string subscriptionId, string resourceGroupName, string privateCloudName, string dnsServiceId, WorkloadNetworkDnsServiceData data) + internal HttpMessage CreateGetSegmentRequest(string subscriptionId, string resourceGroupName, string privateCloudName, string segmentId) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Patch; + request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -2923,78 +2909,82 @@ internal HttpMessage CreateUpdateDnsServiceRequest(string subscriptionId, string uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.AVS/privateClouds/", false); uri.AppendPath(privateCloudName, true); - uri.AppendPath("/workloadNetworks/default/dnsServices/", false); - uri.AppendPath(dnsServiceId, true); + uri.AppendPath("/workloadNetworks/default/segments/", false); + uri.AppendPath(segmentId, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); - request.Content = content; _userAgent.Apply(message); return message; } - /// Create or update a DNS service by id in a private cloud workload network. - /// The ID of the target subscription. + /// Get a WorkloadNetworkSegment. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// NSX DNS Service identifier. Generally the same as the DNS Service's display name. - /// NSX DNS Service. + /// The ID of the NSX Segment. /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task UpdateDnsServiceAsync(string subscriptionId, string resourceGroupName, string privateCloudName, string dnsServiceId, WorkloadNetworkDnsServiceData data, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetSegmentAsync(string subscriptionId, string resourceGroupName, string privateCloudName, string segmentId, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); - Argument.AssertNotNullOrEmpty(dnsServiceId, nameof(dnsServiceId)); - Argument.AssertNotNull(data, nameof(data)); + Argument.AssertNotNullOrEmpty(segmentId, nameof(segmentId)); - using var message = CreateUpdateDnsServiceRequest(subscriptionId, resourceGroupName, privateCloudName, dnsServiceId, data); + using var message = CreateGetSegmentRequest(subscriptionId, resourceGroupName, privateCloudName, segmentId); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 202: - return message.Response; + { + WorkloadNetworkSegmentData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = WorkloadNetworkSegmentData.DeserializeWorkloadNetworkSegmentData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((WorkloadNetworkSegmentData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - /// Create or update a DNS service by id in a private cloud workload network. - /// The ID of the target subscription. + /// Get a WorkloadNetworkSegment. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// NSX DNS Service identifier. Generally the same as the DNS Service's display name. - /// NSX DNS Service. + /// The ID of the NSX Segment. /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response UpdateDnsService(string subscriptionId, string resourceGroupName, string privateCloudName, string dnsServiceId, WorkloadNetworkDnsServiceData data, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response GetSegment(string subscriptionId, string resourceGroupName, string privateCloudName, string segmentId, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); - Argument.AssertNotNullOrEmpty(dnsServiceId, nameof(dnsServiceId)); - Argument.AssertNotNull(data, nameof(data)); + Argument.AssertNotNullOrEmpty(segmentId, nameof(segmentId)); - using var message = CreateUpdateDnsServiceRequest(subscriptionId, resourceGroupName, privateCloudName, dnsServiceId, data); + using var message = CreateGetSegmentRequest(subscriptionId, resourceGroupName, privateCloudName, segmentId); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 202: - return message.Response; + { + WorkloadNetworkSegmentData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = WorkloadNetworkSegmentData.DeserializeWorkloadNetworkSegmentData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((WorkloadNetworkSegmentData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateDeleteDnsServiceRequestUri(string subscriptionId, string resourceGroupName, string privateCloudName, string dnsServiceId) + internal RequestUriBuilder CreateCreateSegmentsRequestUri(string subscriptionId, string resourceGroupName, string privateCloudName, string segmentId, WorkloadNetworkSegmentData data) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -3004,17 +2994,17 @@ internal RequestUriBuilder CreateDeleteDnsServiceRequestUri(string subscriptionI uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.AVS/privateClouds/", false); uri.AppendPath(privateCloudName, true); - uri.AppendPath("/workloadNetworks/default/dnsServices/", false); - uri.AppendPath(dnsServiceId, true); + uri.AppendPath("/workloadNetworks/default/segments/", false); + uri.AppendPath(segmentId, true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateDeleteDnsServiceRequest(string subscriptionId, string resourceGroupName, string privateCloudName, string dnsServiceId) + internal HttpMessage CreateCreateSegmentsRequest(string subscriptionId, string resourceGroupName, string privateCloudName, string segmentId, WorkloadNetworkSegmentData data) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Delete; + request.Method = RequestMethod.Put; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -3023,72 +3013,78 @@ internal HttpMessage CreateDeleteDnsServiceRequest(string subscriptionId, string uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.AVS/privateClouds/", false); uri.AppendPath(privateCloudName, true); - uri.AppendPath("/workloadNetworks/default/dnsServices/", false); - uri.AppendPath(dnsServiceId, true); + uri.AppendPath("/workloadNetworks/default/segments/", false); + uri.AppendPath(segmentId, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; _userAgent.Apply(message); return message; } - /// Delete a DNS service by id in a private cloud workload network. - /// The ID of the target subscription. + /// Create a WorkloadNetworkSegment. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// NSX DNS Service identifier. Generally the same as the DNS Service's display name. + /// The ID of the NSX Segment. + /// Resource create parameters. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task DeleteDnsServiceAsync(string subscriptionId, string resourceGroupName, string privateCloudName, string dnsServiceId, CancellationToken cancellationToken = default) + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task CreateSegmentsAsync(string subscriptionId, string resourceGroupName, string privateCloudName, string segmentId, WorkloadNetworkSegmentData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); - Argument.AssertNotNullOrEmpty(dnsServiceId, nameof(dnsServiceId)); + Argument.AssertNotNullOrEmpty(segmentId, nameof(segmentId)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateDeleteDnsServiceRequest(subscriptionId, resourceGroupName, privateCloudName, dnsServiceId); + using var message = CreateCreateSegmentsRequest(subscriptionId, resourceGroupName, privateCloudName, segmentId, data); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 202: - case 204: + case 201: return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Delete a DNS service by id in a private cloud workload network. - /// The ID of the target subscription. + /// Create a WorkloadNetworkSegment. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// NSX DNS Service identifier. Generally the same as the DNS Service's display name. + /// The ID of the NSX Segment. + /// Resource create parameters. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response DeleteDnsService(string subscriptionId, string resourceGroupName, string privateCloudName, string dnsServiceId, CancellationToken cancellationToken = default) + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response CreateSegments(string subscriptionId, string resourceGroupName, string privateCloudName, string segmentId, WorkloadNetworkSegmentData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); - Argument.AssertNotNullOrEmpty(dnsServiceId, nameof(dnsServiceId)); + Argument.AssertNotNullOrEmpty(segmentId, nameof(segmentId)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateDeleteDnsServiceRequest(subscriptionId, resourceGroupName, privateCloudName, dnsServiceId); + using var message = CreateCreateSegmentsRequest(subscriptionId, resourceGroupName, privateCloudName, segmentId, data); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 202: - case 204: + case 201: return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateListDnsZonesRequestUri(string subscriptionId, string resourceGroupName, string privateCloudName) + internal RequestUriBuilder CreateUpdateSegmentsRequestUri(string subscriptionId, string resourceGroupName, string privateCloudName, string segmentId, WorkloadNetworkSegmentData data) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -3098,16 +3094,17 @@ internal RequestUriBuilder CreateListDnsZonesRequestUri(string subscriptionId, s uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.AVS/privateClouds/", false); uri.AppendPath(privateCloudName, true); - uri.AppendPath("/workloadNetworks/default/dnsZones", false); + uri.AppendPath("/workloadNetworks/default/segments/", false); + uri.AppendPath(segmentId, true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateListDnsZonesRequest(string subscriptionId, string resourceGroupName, string privateCloudName) + internal HttpMessage CreateUpdateSegmentsRequest(string subscriptionId, string resourceGroupName, string privateCloudName, string segmentId, WorkloadNetworkSegmentData data) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Get; + request.Method = RequestMethod.Patch; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -3116,73 +3113,78 @@ internal HttpMessage CreateListDnsZonesRequest(string subscriptionId, string res uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.AVS/privateClouds/", false); uri.AppendPath(privateCloudName, true); - uri.AppendPath("/workloadNetworks/default/dnsZones", false); + uri.AppendPath("/workloadNetworks/default/segments/", false); + uri.AppendPath(segmentId, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; _userAgent.Apply(message); return message; } - /// List of DNS zones in a private cloud workload network. - /// The ID of the target subscription. + /// Update a WorkloadNetworkSegment. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. + /// The ID of the NSX Segment. + /// The resource properties to be updated. /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListDnsZonesAsync(string subscriptionId, string resourceGroupName, string privateCloudName, CancellationToken cancellationToken = default) + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task UpdateSegmentsAsync(string subscriptionId, string resourceGroupName, string privateCloudName, string segmentId, WorkloadNetworkSegmentData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); + Argument.AssertNotNullOrEmpty(segmentId, nameof(segmentId)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateListDnsZonesRequest(subscriptionId, resourceGroupName, privateCloudName); + using var message = CreateUpdateSegmentsRequest(subscriptionId, resourceGroupName, privateCloudName, segmentId, data); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - { - WorkloadNetworkDnsZonesList value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = WorkloadNetworkDnsZonesList.DeserializeWorkloadNetworkDnsZonesList(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } } - /// List of DNS zones in a private cloud workload network. - /// The ID of the target subscription. + /// Update a WorkloadNetworkSegment. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. + /// The ID of the NSX Segment. + /// The resource properties to be updated. /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response ListDnsZones(string subscriptionId, string resourceGroupName, string privateCloudName, CancellationToken cancellationToken = default) + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response UpdateSegments(string subscriptionId, string resourceGroupName, string privateCloudName, string segmentId, WorkloadNetworkSegmentData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); + Argument.AssertNotNullOrEmpty(segmentId, nameof(segmentId)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateListDnsZonesRequest(subscriptionId, resourceGroupName, privateCloudName); + using var message = CreateUpdateSegmentsRequest(subscriptionId, resourceGroupName, privateCloudName, segmentId, data); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - { - WorkloadNetworkDnsZonesList value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = WorkloadNetworkDnsZonesList.DeserializeWorkloadNetworkDnsZonesList(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateGetDnsZoneRequestUri(string subscriptionId, string resourceGroupName, string privateCloudName, string dnsZoneId) + internal RequestUriBuilder CreateDeleteSegmentRequestUri(string subscriptionId, string resourceGroupName, string privateCloudName, string segmentId) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -3192,17 +3194,17 @@ internal RequestUriBuilder CreateGetDnsZoneRequestUri(string subscriptionId, str uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.AVS/privateClouds/", false); uri.AppendPath(privateCloudName, true); - uri.AppendPath("/workloadNetworks/default/dnsZones/", false); - uri.AppendPath(dnsZoneId, true); + uri.AppendPath("/workloadNetworks/default/segments/", false); + uri.AppendPath(segmentId, true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateGetDnsZoneRequest(string subscriptionId, string resourceGroupName, string privateCloudName, string dnsZoneId) + internal HttpMessage CreateDeleteSegmentRequest(string subscriptionId, string resourceGroupName, string privateCloudName, string segmentId) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Get; + request.Method = RequestMethod.Delete; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -3211,8 +3213,8 @@ internal HttpMessage CreateGetDnsZoneRequest(string subscriptionId, string resou uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.AVS/privateClouds/", false); uri.AppendPath(privateCloudName, true); - uri.AppendPath("/workloadNetworks/default/dnsZones/", false); - uri.AppendPath(dnsZoneId, true); + uri.AppendPath("/workloadNetworks/default/segments/", false); + uri.AppendPath(segmentId, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -3220,73 +3222,63 @@ internal HttpMessage CreateGetDnsZoneRequest(string subscriptionId, string resou return message; } - /// Get a DNS zone by id in a private cloud workload network. - /// The ID of the target subscription. + /// Delete a WorkloadNetworkSegment. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. + /// The ID of the NSX Segment. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetDnsZoneAsync(string subscriptionId, string resourceGroupName, string privateCloudName, string dnsZoneId, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeleteSegmentAsync(string subscriptionId, string resourceGroupName, string privateCloudName, string segmentId, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); - Argument.AssertNotNullOrEmpty(dnsZoneId, nameof(dnsZoneId)); + Argument.AssertNotNullOrEmpty(segmentId, nameof(segmentId)); - using var message = CreateGetDnsZoneRequest(subscriptionId, resourceGroupName, privateCloudName, dnsZoneId); + using var message = CreateDeleteSegmentRequest(subscriptionId, resourceGroupName, privateCloudName, segmentId); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - { - WorkloadNetworkDnsZoneData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = WorkloadNetworkDnsZoneData.DeserializeWorkloadNetworkDnsZoneData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((WorkloadNetworkDnsZoneData)null, message.Response); + case 202: + case 204: + return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Get a DNS zone by id in a private cloud workload network. - /// The ID of the target subscription. + /// Delete a WorkloadNetworkSegment. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. + /// The ID of the NSX Segment. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response GetDnsZone(string subscriptionId, string resourceGroupName, string privateCloudName, string dnsZoneId, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response DeleteSegment(string subscriptionId, string resourceGroupName, string privateCloudName, string segmentId, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); - Argument.AssertNotNullOrEmpty(dnsZoneId, nameof(dnsZoneId)); + Argument.AssertNotNullOrEmpty(segmentId, nameof(segmentId)); - using var message = CreateGetDnsZoneRequest(subscriptionId, resourceGroupName, privateCloudName, dnsZoneId); + using var message = CreateDeleteSegmentRequest(subscriptionId, resourceGroupName, privateCloudName, segmentId); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - { - WorkloadNetworkDnsZoneData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = WorkloadNetworkDnsZoneData.DeserializeWorkloadNetworkDnsZoneData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((WorkloadNetworkDnsZoneData)null, message.Response); + case 202: + case 204: + return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateCreateDnsZoneRequestUri(string subscriptionId, string resourceGroupName, string privateCloudName, string dnsZoneId, WorkloadNetworkDnsZoneData data) + internal RequestUriBuilder CreateListVirtualMachinesRequestUri(string subscriptionId, string resourceGroupName, string privateCloudName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -3296,17 +3288,16 @@ internal RequestUriBuilder CreateCreateDnsZoneRequestUri(string subscriptionId, uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.AVS/privateClouds/", false); uri.AppendPath(privateCloudName, true); - uri.AppendPath("/workloadNetworks/default/dnsZones/", false); - uri.AppendPath(dnsZoneId, true); + uri.AppendPath("/workloadNetworks/default/virtualMachines", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateCreateDnsZoneRequest(string subscriptionId, string resourceGroupName, string privateCloudName, string dnsZoneId, WorkloadNetworkDnsZoneData data) + internal HttpMessage CreateListVirtualMachinesRequest(string subscriptionId, string resourceGroupName, string privateCloudName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Put; + request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -3315,78 +3306,73 @@ internal HttpMessage CreateCreateDnsZoneRequest(string subscriptionId, string re uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.AVS/privateClouds/", false); uri.AppendPath(privateCloudName, true); - uri.AppendPath("/workloadNetworks/default/dnsZones/", false); - uri.AppendPath(dnsZoneId, true); + uri.AppendPath("/workloadNetworks/default/virtualMachines", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); - request.Content = content; _userAgent.Apply(message); return message; } - /// Create a DNS zone by id in a private cloud workload network. - /// The ID of the target subscription. + /// List WorkloadNetworkVirtualMachine resources by WorkloadNetwork. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. - /// NSX DNS Zone. /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task CreateDnsZoneAsync(string subscriptionId, string resourceGroupName, string privateCloudName, string dnsZoneId, WorkloadNetworkDnsZoneData data, CancellationToken cancellationToken = default) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListVirtualMachinesAsync(string subscriptionId, string resourceGroupName, string privateCloudName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); - Argument.AssertNotNullOrEmpty(dnsZoneId, nameof(dnsZoneId)); - Argument.AssertNotNull(data, nameof(data)); - using var message = CreateCreateDnsZoneRequest(subscriptionId, resourceGroupName, privateCloudName, dnsZoneId, data); + using var message = CreateListVirtualMachinesRequest(subscriptionId, resourceGroupName, privateCloudName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 201: - return message.Response; + { + WorkloadNetworkVirtualMachinesList value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = WorkloadNetworkVirtualMachinesList.DeserializeWorkloadNetworkVirtualMachinesList(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - /// Create a DNS zone by id in a private cloud workload network. - /// The ID of the target subscription. + /// List WorkloadNetworkVirtualMachine resources by WorkloadNetwork. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. - /// NSX DNS Zone. /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response CreateDnsZone(string subscriptionId, string resourceGroupName, string privateCloudName, string dnsZoneId, WorkloadNetworkDnsZoneData data, CancellationToken cancellationToken = default) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListVirtualMachines(string subscriptionId, string resourceGroupName, string privateCloudName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); - Argument.AssertNotNullOrEmpty(dnsZoneId, nameof(dnsZoneId)); - Argument.AssertNotNull(data, nameof(data)); - using var message = CreateCreateDnsZoneRequest(subscriptionId, resourceGroupName, privateCloudName, dnsZoneId, data); + using var message = CreateListVirtualMachinesRequest(subscriptionId, resourceGroupName, privateCloudName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 201: - return message.Response; + { + WorkloadNetworkVirtualMachinesList value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = WorkloadNetworkVirtualMachinesList.DeserializeWorkloadNetworkVirtualMachinesList(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateUpdateDnsZoneRequestUri(string subscriptionId, string resourceGroupName, string privateCloudName, string dnsZoneId, WorkloadNetworkDnsZoneData data) + internal RequestUriBuilder CreateGetVirtualMachineRequestUri(string subscriptionId, string resourceGroupName, string privateCloudName, string virtualMachineId) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -3396,17 +3382,17 @@ internal RequestUriBuilder CreateUpdateDnsZoneRequestUri(string subscriptionId, uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.AVS/privateClouds/", false); uri.AppendPath(privateCloudName, true); - uri.AppendPath("/workloadNetworks/default/dnsZones/", false); - uri.AppendPath(dnsZoneId, true); + uri.AppendPath("/workloadNetworks/default/virtualMachines/", false); + uri.AppendPath(virtualMachineId, true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateUpdateDnsZoneRequest(string subscriptionId, string resourceGroupName, string privateCloudName, string dnsZoneId, WorkloadNetworkDnsZoneData data) + internal HttpMessage CreateGetVirtualMachineRequest(string subscriptionId, string resourceGroupName, string privateCloudName, string virtualMachineId) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Patch; + request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -3415,78 +3401,82 @@ internal HttpMessage CreateUpdateDnsZoneRequest(string subscriptionId, string re uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.AVS/privateClouds/", false); uri.AppendPath(privateCloudName, true); - uri.AppendPath("/workloadNetworks/default/dnsZones/", false); - uri.AppendPath(dnsZoneId, true); + uri.AppendPath("/workloadNetworks/default/virtualMachines/", false); + uri.AppendPath(virtualMachineId, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); - request.Content = content; _userAgent.Apply(message); return message; } - /// Create or update a DNS zone by id in a private cloud workload network. - /// The ID of the target subscription. + /// Get a WorkloadNetworkVirtualMachine. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. - /// NSX DNS Zone. + /// ID of the virtual machine. /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task UpdateDnsZoneAsync(string subscriptionId, string resourceGroupName, string privateCloudName, string dnsZoneId, WorkloadNetworkDnsZoneData data, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetVirtualMachineAsync(string subscriptionId, string resourceGroupName, string privateCloudName, string virtualMachineId, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); - Argument.AssertNotNullOrEmpty(dnsZoneId, nameof(dnsZoneId)); - Argument.AssertNotNull(data, nameof(data)); + Argument.AssertNotNullOrEmpty(virtualMachineId, nameof(virtualMachineId)); - using var message = CreateUpdateDnsZoneRequest(subscriptionId, resourceGroupName, privateCloudName, dnsZoneId, data); + using var message = CreateGetVirtualMachineRequest(subscriptionId, resourceGroupName, privateCloudName, virtualMachineId); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 202: - return message.Response; + { + WorkloadNetworkVirtualMachineData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = WorkloadNetworkVirtualMachineData.DeserializeWorkloadNetworkVirtualMachineData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((WorkloadNetworkVirtualMachineData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - /// Create or update a DNS zone by id in a private cloud workload network. - /// The ID of the target subscription. + /// Get a WorkloadNetworkVirtualMachine. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. - /// NSX DNS Zone. + /// ID of the virtual machine. /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response UpdateDnsZone(string subscriptionId, string resourceGroupName, string privateCloudName, string dnsZoneId, WorkloadNetworkDnsZoneData data, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response GetVirtualMachine(string subscriptionId, string resourceGroupName, string privateCloudName, string virtualMachineId, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); - Argument.AssertNotNullOrEmpty(dnsZoneId, nameof(dnsZoneId)); - Argument.AssertNotNull(data, nameof(data)); + Argument.AssertNotNullOrEmpty(virtualMachineId, nameof(virtualMachineId)); - using var message = CreateUpdateDnsZoneRequest(subscriptionId, resourceGroupName, privateCloudName, dnsZoneId, data); + using var message = CreateGetVirtualMachineRequest(subscriptionId, resourceGroupName, privateCloudName, virtualMachineId); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 202: - return message.Response; + { + WorkloadNetworkVirtualMachineData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = WorkloadNetworkVirtualMachineData.DeserializeWorkloadNetworkVirtualMachineData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((WorkloadNetworkVirtualMachineData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateDeleteDnsZoneRequestUri(string subscriptionId, string resourceGroupName, string privateCloudName, string dnsZoneId) + internal RequestUriBuilder CreateListVmGroupsRequestUri(string subscriptionId, string resourceGroupName, string privateCloudName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -3496,17 +3486,16 @@ internal RequestUriBuilder CreateDeleteDnsZoneRequestUri(string subscriptionId, uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.AVS/privateClouds/", false); uri.AppendPath(privateCloudName, true); - uri.AppendPath("/workloadNetworks/default/dnsZones/", false); - uri.AppendPath(dnsZoneId, true); + uri.AppendPath("/workloadNetworks/default/vmGroups", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateDeleteDnsZoneRequest(string subscriptionId, string resourceGroupName, string privateCloudName, string dnsZoneId) + internal HttpMessage CreateListVmGroupsRequest(string subscriptionId, string resourceGroupName, string privateCloudName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Delete; + request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -3515,8 +3504,7 @@ internal HttpMessage CreateDeleteDnsZoneRequest(string subscriptionId, string re uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.AVS/privateClouds/", false); uri.AppendPath(privateCloudName, true); - uri.AppendPath("/workloadNetworks/default/dnsZones/", false); - uri.AppendPath(dnsZoneId, true); + uri.AppendPath("/workloadNetworks/default/vmGroups", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -3524,63 +3512,65 @@ internal HttpMessage CreateDeleteDnsZoneRequest(string subscriptionId, string re return message; } - /// Delete a DNS zone by id in a private cloud workload network. - /// The ID of the target subscription. + /// List WorkloadNetworkVMGroup resources by WorkloadNetwork. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task DeleteDnsZoneAsync(string subscriptionId, string resourceGroupName, string privateCloudName, string dnsZoneId, CancellationToken cancellationToken = default) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListVmGroupsAsync(string subscriptionId, string resourceGroupName, string privateCloudName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); - Argument.AssertNotNullOrEmpty(dnsZoneId, nameof(dnsZoneId)); - using var message = CreateDeleteDnsZoneRequest(subscriptionId, resourceGroupName, privateCloudName, dnsZoneId); + using var message = CreateListVmGroupsRequest(subscriptionId, resourceGroupName, privateCloudName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 202: - case 204: - return message.Response; + { + WorkloadNetworkVmGroupsList value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = WorkloadNetworkVmGroupsList.DeserializeWorkloadNetworkVmGroupsList(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - /// Delete a DNS zone by id in a private cloud workload network. - /// The ID of the target subscription. + /// List WorkloadNetworkVMGroup resources by WorkloadNetwork. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response DeleteDnsZone(string subscriptionId, string resourceGroupName, string privateCloudName, string dnsZoneId, CancellationToken cancellationToken = default) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListVmGroups(string subscriptionId, string resourceGroupName, string privateCloudName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); - Argument.AssertNotNullOrEmpty(dnsZoneId, nameof(dnsZoneId)); - using var message = CreateDeleteDnsZoneRequest(subscriptionId, resourceGroupName, privateCloudName, dnsZoneId); + using var message = CreateListVmGroupsRequest(subscriptionId, resourceGroupName, privateCloudName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 202: - case 204: - return message.Response; + { + WorkloadNetworkVmGroupsList value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = WorkloadNetworkVmGroupsList.DeserializeWorkloadNetworkVmGroupsList(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateListPublicIPsRequestUri(string subscriptionId, string resourceGroupName, string privateCloudName) + internal RequestUriBuilder CreateGetVmGroupRequestUri(string subscriptionId, string resourceGroupName, string privateCloudName, string vmGroupId) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -3590,12 +3580,13 @@ internal RequestUriBuilder CreateListPublicIPsRequestUri(string subscriptionId, uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.AVS/privateClouds/", false); uri.AppendPath(privateCloudName, true); - uri.AppendPath("/workloadNetworks/default/publicIPs", false); + uri.AppendPath("/workloadNetworks/default/vmGroups/", false); + uri.AppendPath(vmGroupId, true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateListPublicIPsRequest(string subscriptionId, string resourceGroupName, string privateCloudName) + internal HttpMessage CreateGetVmGroupRequest(string subscriptionId, string resourceGroupName, string privateCloudName, string vmGroupId) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -3608,7 +3599,8 @@ internal HttpMessage CreateListPublicIPsRequest(string subscriptionId, string re uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.AVS/privateClouds/", false); uri.AppendPath(privateCloudName, true); - uri.AppendPath("/workloadNetworks/default/publicIPs", false); + uri.AppendPath("/workloadNetworks/default/vmGroups/", false); + uri.AppendPath(vmGroupId, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -3616,65 +3608,73 @@ internal HttpMessage CreateListPublicIPsRequest(string subscriptionId, string re return message; } - /// List of Public IP Blocks in a private cloud workload network. - /// The ID of the target subscription. + /// Get a WorkloadNetworkVMGroup. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. + /// ID of the VM group. /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListPublicIPsAsync(string subscriptionId, string resourceGroupName, string privateCloudName, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetVmGroupAsync(string subscriptionId, string resourceGroupName, string privateCloudName, string vmGroupId, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); + Argument.AssertNotNullOrEmpty(vmGroupId, nameof(vmGroupId)); - using var message = CreateListPublicIPsRequest(subscriptionId, resourceGroupName, privateCloudName); + using var message = CreateGetVmGroupRequest(subscriptionId, resourceGroupName, privateCloudName, vmGroupId); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - WorkloadNetworkPublicIPsList value = default; + WorkloadNetworkVmGroupData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = WorkloadNetworkPublicIPsList.DeserializeWorkloadNetworkPublicIPsList(document.RootElement); + value = WorkloadNetworkVmGroupData.DeserializeWorkloadNetworkVmGroupData(document.RootElement); return Response.FromValue(value, message.Response); } + case 404: + return Response.FromValue((WorkloadNetworkVmGroupData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - /// List of Public IP Blocks in a private cloud workload network. - /// The ID of the target subscription. + /// Get a WorkloadNetworkVMGroup. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. + /// ID of the VM group. /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response ListPublicIPs(string subscriptionId, string resourceGroupName, string privateCloudName, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response GetVmGroup(string subscriptionId, string resourceGroupName, string privateCloudName, string vmGroupId, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); + Argument.AssertNotNullOrEmpty(vmGroupId, nameof(vmGroupId)); - using var message = CreateListPublicIPsRequest(subscriptionId, resourceGroupName, privateCloudName); + using var message = CreateGetVmGroupRequest(subscriptionId, resourceGroupName, privateCloudName, vmGroupId); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - WorkloadNetworkPublicIPsList value = default; + WorkloadNetworkVmGroupData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = WorkloadNetworkPublicIPsList.DeserializeWorkloadNetworkPublicIPsList(document.RootElement); + value = WorkloadNetworkVmGroupData.DeserializeWorkloadNetworkVmGroupData(document.RootElement); return Response.FromValue(value, message.Response); } + case 404: + return Response.FromValue((WorkloadNetworkVmGroupData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateGetPublicIPRequestUri(string subscriptionId, string resourceGroupName, string privateCloudName, string publicIPId) + internal RequestUriBuilder CreateCreateVmGroupRequestUri(string subscriptionId, string resourceGroupName, string privateCloudName, string vmGroupId, WorkloadNetworkVmGroupData data) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -3684,17 +3684,17 @@ internal RequestUriBuilder CreateGetPublicIPRequestUri(string subscriptionId, st uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.AVS/privateClouds/", false); uri.AppendPath(privateCloudName, true); - uri.AppendPath("/workloadNetworks/default/publicIPs/", false); - uri.AppendPath(publicIPId, true); + uri.AppendPath("/workloadNetworks/default/vmGroups/", false); + uri.AppendPath(vmGroupId, true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateGetPublicIPRequest(string subscriptionId, string resourceGroupName, string privateCloudName, string publicIPId) + internal HttpMessage CreateCreateVmGroupRequest(string subscriptionId, string resourceGroupName, string privateCloudName, string vmGroupId, WorkloadNetworkVmGroupData data) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Get; + request.Method = RequestMethod.Put; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -3703,82 +3703,78 @@ internal HttpMessage CreateGetPublicIPRequest(string subscriptionId, string reso uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.AVS/privateClouds/", false); uri.AppendPath(privateCloudName, true); - uri.AppendPath("/workloadNetworks/default/publicIPs/", false); - uri.AppendPath(publicIPId, true); + uri.AppendPath("/workloadNetworks/default/vmGroups/", false); + uri.AppendPath(vmGroupId, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; _userAgent.Apply(message); return message; } - /// Get a Public IP Block by id in a private cloud workload network. - /// The ID of the target subscription. + /// Create a WorkloadNetworkVMGroup. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// NSX Public IP Block identifier. Generally the same as the Public IP Block's display name. + /// ID of the VM group. + /// Resource create parameters. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetPublicIPAsync(string subscriptionId, string resourceGroupName, string privateCloudName, string publicIPId, CancellationToken cancellationToken = default) + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task CreateVmGroupAsync(string subscriptionId, string resourceGroupName, string privateCloudName, string vmGroupId, WorkloadNetworkVmGroupData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); - Argument.AssertNotNullOrEmpty(publicIPId, nameof(publicIPId)); + Argument.AssertNotNullOrEmpty(vmGroupId, nameof(vmGroupId)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateGetPublicIPRequest(subscriptionId, resourceGroupName, privateCloudName, publicIPId); + using var message = CreateCreateVmGroupRequest(subscriptionId, resourceGroupName, privateCloudName, vmGroupId, data); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - { - WorkloadNetworkPublicIPData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = WorkloadNetworkPublicIPData.DeserializeWorkloadNetworkPublicIPData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((WorkloadNetworkPublicIPData)null, message.Response); + case 201: + return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Get a Public IP Block by id in a private cloud workload network. - /// The ID of the target subscription. + /// Create a WorkloadNetworkVMGroup. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// NSX Public IP Block identifier. Generally the same as the Public IP Block's display name. + /// ID of the VM group. + /// Resource create parameters. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response GetPublicIP(string subscriptionId, string resourceGroupName, string privateCloudName, string publicIPId, CancellationToken cancellationToken = default) + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response CreateVmGroup(string subscriptionId, string resourceGroupName, string privateCloudName, string vmGroupId, WorkloadNetworkVmGroupData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); - Argument.AssertNotNullOrEmpty(publicIPId, nameof(publicIPId)); + Argument.AssertNotNullOrEmpty(vmGroupId, nameof(vmGroupId)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateGetPublicIPRequest(subscriptionId, resourceGroupName, privateCloudName, publicIPId); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - WorkloadNetworkPublicIPData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = WorkloadNetworkPublicIPData.DeserializeWorkloadNetworkPublicIPData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((WorkloadNetworkPublicIPData)null, message.Response); + using var message = CreateCreateVmGroupRequest(subscriptionId, resourceGroupName, privateCloudName, vmGroupId, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateCreatePublicIPRequestUri(string subscriptionId, string resourceGroupName, string privateCloudName, string publicIPId, WorkloadNetworkPublicIPData data) + internal RequestUriBuilder CreateUpdateVmGroupRequestUri(string subscriptionId, string resourceGroupName, string privateCloudName, string vmGroupId, WorkloadNetworkVmGroupData data) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -3788,17 +3784,17 @@ internal RequestUriBuilder CreateCreatePublicIPRequestUri(string subscriptionId, uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.AVS/privateClouds/", false); uri.AppendPath(privateCloudName, true); - uri.AppendPath("/workloadNetworks/default/publicIPs/", false); - uri.AppendPath(publicIPId, true); + uri.AppendPath("/workloadNetworks/default/vmGroups/", false); + uri.AppendPath(vmGroupId, true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateCreatePublicIPRequest(string subscriptionId, string resourceGroupName, string privateCloudName, string publicIPId, WorkloadNetworkPublicIPData data) + internal HttpMessage CreateUpdateVmGroupRequest(string subscriptionId, string resourceGroupName, string privateCloudName, string vmGroupId, WorkloadNetworkVmGroupData data) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Put; + request.Method = RequestMethod.Patch; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -3807,8 +3803,8 @@ internal HttpMessage CreateCreatePublicIPRequest(string subscriptionId, string r uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.AVS/privateClouds/", false); uri.AppendPath(privateCloudName, true); - uri.AppendPath("/workloadNetworks/default/publicIPs/", false); - uri.AppendPath(publicIPId, true); + uri.AppendPath("/workloadNetworks/default/vmGroups/", false); + uri.AppendPath(vmGroupId, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -3820,65 +3816,65 @@ internal HttpMessage CreateCreatePublicIPRequest(string subscriptionId, string r return message; } - /// Create a Public IP Block by id in a private cloud workload network. - /// The ID of the target subscription. + /// Update a WorkloadNetworkVMGroup. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// NSX Public IP Block identifier. Generally the same as the Public IP Block's display name. - /// NSX Public IP Block. + /// ID of the VM group. + /// The resource properties to be updated. /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task CreatePublicIPAsync(string subscriptionId, string resourceGroupName, string privateCloudName, string publicIPId, WorkloadNetworkPublicIPData data, CancellationToken cancellationToken = default) + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task UpdateVmGroupAsync(string subscriptionId, string resourceGroupName, string privateCloudName, string vmGroupId, WorkloadNetworkVmGroupData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); - Argument.AssertNotNullOrEmpty(publicIPId, nameof(publicIPId)); + Argument.AssertNotNullOrEmpty(vmGroupId, nameof(vmGroupId)); Argument.AssertNotNull(data, nameof(data)); - using var message = CreateCreatePublicIPRequest(subscriptionId, resourceGroupName, privateCloudName, publicIPId, data); + using var message = CreateUpdateVmGroupRequest(subscriptionId, resourceGroupName, privateCloudName, vmGroupId, data); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 201: + case 202: return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Create a Public IP Block by id in a private cloud workload network. - /// The ID of the target subscription. + /// Update a WorkloadNetworkVMGroup. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// NSX Public IP Block identifier. Generally the same as the Public IP Block's display name. - /// NSX Public IP Block. + /// ID of the VM group. + /// The resource properties to be updated. /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response CreatePublicIP(string subscriptionId, string resourceGroupName, string privateCloudName, string publicIPId, WorkloadNetworkPublicIPData data, CancellationToken cancellationToken = default) + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response UpdateVmGroup(string subscriptionId, string resourceGroupName, string privateCloudName, string vmGroupId, WorkloadNetworkVmGroupData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); - Argument.AssertNotNullOrEmpty(publicIPId, nameof(publicIPId)); + Argument.AssertNotNullOrEmpty(vmGroupId, nameof(vmGroupId)); Argument.AssertNotNull(data, nameof(data)); - using var message = CreateCreatePublicIPRequest(subscriptionId, resourceGroupName, privateCloudName, publicIPId, data); + using var message = CreateUpdateVmGroupRequest(subscriptionId, resourceGroupName, privateCloudName, vmGroupId, data); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 201: + case 202: return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateDeletePublicIPRequestUri(string subscriptionId, string resourceGroupName, string privateCloudName, string publicIPId) + internal RequestUriBuilder CreateDeleteVmGroupRequestUri(string subscriptionId, string resourceGroupName, string privateCloudName, string vmGroupId) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -3888,13 +3884,13 @@ internal RequestUriBuilder CreateDeletePublicIPRequestUri(string subscriptionId, uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.AVS/privateClouds/", false); uri.AppendPath(privateCloudName, true); - uri.AppendPath("/workloadNetworks/default/publicIPs/", false); - uri.AppendPath(publicIPId, true); + uri.AppendPath("/workloadNetworks/default/vmGroups/", false); + uri.AppendPath(vmGroupId, true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateDeletePublicIPRequest(string subscriptionId, string resourceGroupName, string privateCloudName, string publicIPId) + internal HttpMessage CreateDeleteVmGroupRequest(string subscriptionId, string resourceGroupName, string privateCloudName, string vmGroupId) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -3907,8 +3903,8 @@ internal HttpMessage CreateDeletePublicIPRequest(string subscriptionId, string r uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.AVS/privateClouds/", false); uri.AppendPath(privateCloudName, true); - uri.AppendPath("/workloadNetworks/default/publicIPs/", false); - uri.AppendPath(publicIPId, true); + uri.AppendPath("/workloadNetworks/default/vmGroups/", false); + uri.AppendPath(vmGroupId, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -3916,22 +3912,22 @@ internal HttpMessage CreateDeletePublicIPRequest(string subscriptionId, string r return message; } - /// Delete a Public IP Block by id in a private cloud workload network. - /// The ID of the target subscription. + /// Delete a WorkloadNetworkVMGroup. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// NSX Public IP Block identifier. Generally the same as the Public IP Block's display name. + /// ID of the VM group. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task DeletePublicIPAsync(string subscriptionId, string resourceGroupName, string privateCloudName, string publicIPId, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeleteVmGroupAsync(string subscriptionId, string resourceGroupName, string privateCloudName, string vmGroupId, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); - Argument.AssertNotNullOrEmpty(publicIPId, nameof(publicIPId)); + Argument.AssertNotNullOrEmpty(vmGroupId, nameof(vmGroupId)); - using var message = CreateDeletePublicIPRequest(subscriptionId, resourceGroupName, privateCloudName, publicIPId); + using var message = CreateDeleteVmGroupRequest(subscriptionId, resourceGroupName, privateCloudName, vmGroupId); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -3944,22 +3940,22 @@ public async Task DeletePublicIPAsync(string subscriptionId, string re } } - /// Delete a Public IP Block by id in a private cloud workload network. - /// The ID of the target subscription. + /// Delete a WorkloadNetworkVMGroup. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. - /// NSX Public IP Block identifier. Generally the same as the Public IP Block's display name. + /// ID of the VM group. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response DeletePublicIP(string subscriptionId, string resourceGroupName, string privateCloudName, string publicIPId, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response DeleteVmGroup(string subscriptionId, string resourceGroupName, string privateCloudName, string vmGroupId, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); - Argument.AssertNotNullOrEmpty(publicIPId, nameof(publicIPId)); + Argument.AssertNotNullOrEmpty(vmGroupId, nameof(vmGroupId)); - using var message = CreateDeletePublicIPRequest(subscriptionId, resourceGroupName, privateCloudName, publicIPId); + using var message = CreateDeleteVmGroupRequest(subscriptionId, resourceGroupName, privateCloudName, vmGroupId); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -3994,9 +3990,9 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript return message; } - /// List of workload networks in a private cloud. + /// List WorkloadNetwork resources by PrivateCloud. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. /// The cancellation token to use. @@ -4025,9 +4021,9 @@ public async Task> ListNextPageAsync(string nextLi } } - /// List of workload networks in a private cloud. + /// List WorkloadNetwork resources by PrivateCloud. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. /// The cancellation token to use. @@ -4056,7 +4052,7 @@ public Response ListNextPage(string nextLink, string subscr } } - internal RequestUriBuilder CreateListSegmentsNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string privateCloudName) + internal RequestUriBuilder CreateListDhcpNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string privateCloudName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -4064,7 +4060,7 @@ internal RequestUriBuilder CreateListSegmentsNextPageRequestUri(string nextLink, return uri; } - internal HttpMessage CreateListSegmentsNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string privateCloudName) + internal HttpMessage CreateListDhcpNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string privateCloudName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -4078,30 +4074,30 @@ internal HttpMessage CreateListSegmentsNextPageRequest(string nextLink, string s return message; } - /// List of segments in a private cloud workload network. + /// List WorkloadNetworkDhcp resources by WorkloadNetwork. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListSegmentsNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string privateCloudName, CancellationToken cancellationToken = default) + public async Task> ListDhcpNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string privateCloudName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); - using var message = CreateListSegmentsNextPageRequest(nextLink, subscriptionId, resourceGroupName, privateCloudName); + using var message = CreateListDhcpNextPageRequest(nextLink, subscriptionId, resourceGroupName, privateCloudName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - WorkloadNetworkSegmentsList value = default; + WorkloadNetworkDhcpList value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = WorkloadNetworkSegmentsList.DeserializeWorkloadNetworkSegmentsList(document.RootElement); + value = WorkloadNetworkDhcpList.DeserializeWorkloadNetworkDhcpList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -4109,30 +4105,30 @@ public async Task> ListSegmentsNextPageAsy } } - /// List of segments in a private cloud workload network. + /// List WorkloadNetworkDhcp resources by WorkloadNetwork. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListSegmentsNextPage(string nextLink, string subscriptionId, string resourceGroupName, string privateCloudName, CancellationToken cancellationToken = default) + public Response ListDhcpNextPage(string nextLink, string subscriptionId, string resourceGroupName, string privateCloudName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); - using var message = CreateListSegmentsNextPageRequest(nextLink, subscriptionId, resourceGroupName, privateCloudName); + using var message = CreateListDhcpNextPageRequest(nextLink, subscriptionId, resourceGroupName, privateCloudName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - WorkloadNetworkSegmentsList value = default; + WorkloadNetworkDhcpList value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = WorkloadNetworkSegmentsList.DeserializeWorkloadNetworkSegmentsList(document.RootElement); + value = WorkloadNetworkDhcpList.DeserializeWorkloadNetworkDhcpList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -4140,7 +4136,7 @@ public Response ListSegmentsNextPage(string nextLin } } - internal RequestUriBuilder CreateListDhcpNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string privateCloudName) + internal RequestUriBuilder CreateListDnsServicesNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string privateCloudName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -4148,7 +4144,7 @@ internal RequestUriBuilder CreateListDhcpNextPageRequestUri(string nextLink, str return uri; } - internal HttpMessage CreateListDhcpNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string privateCloudName) + internal HttpMessage CreateListDnsServicesNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string privateCloudName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -4162,30 +4158,30 @@ internal HttpMessage CreateListDhcpNextPageRequest(string nextLink, string subsc return message; } - /// List dhcp in a private cloud workload network. + /// List WorkloadNetworkDnsService resources by WorkloadNetwork. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListDhcpNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string privateCloudName, CancellationToken cancellationToken = default) + public async Task> ListDnsServicesNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string privateCloudName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); - using var message = CreateListDhcpNextPageRequest(nextLink, subscriptionId, resourceGroupName, privateCloudName); + using var message = CreateListDnsServicesNextPageRequest(nextLink, subscriptionId, resourceGroupName, privateCloudName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - WorkloadNetworkDhcpList value = default; + WorkloadNetworkDnsServicesList value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = WorkloadNetworkDhcpList.DeserializeWorkloadNetworkDhcpList(document.RootElement); + value = WorkloadNetworkDnsServicesList.DeserializeWorkloadNetworkDnsServicesList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -4193,30 +4189,30 @@ public async Task> ListDhcpNextPageAsync(strin } } - /// List dhcp in a private cloud workload network. + /// List WorkloadNetworkDnsService resources by WorkloadNetwork. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListDhcpNextPage(string nextLink, string subscriptionId, string resourceGroupName, string privateCloudName, CancellationToken cancellationToken = default) + public Response ListDnsServicesNextPage(string nextLink, string subscriptionId, string resourceGroupName, string privateCloudName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); - using var message = CreateListDhcpNextPageRequest(nextLink, subscriptionId, resourceGroupName, privateCloudName); + using var message = CreateListDnsServicesNextPageRequest(nextLink, subscriptionId, resourceGroupName, privateCloudName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - WorkloadNetworkDhcpList value = default; + WorkloadNetworkDnsServicesList value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = WorkloadNetworkDhcpList.DeserializeWorkloadNetworkDhcpList(document.RootElement); + value = WorkloadNetworkDnsServicesList.DeserializeWorkloadNetworkDnsServicesList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -4224,7 +4220,7 @@ public Response ListDhcpNextPage(string nextLink, strin } } - internal RequestUriBuilder CreateListGatewaysNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string privateCloudName) + internal RequestUriBuilder CreateListDnsZonesNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string privateCloudName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -4232,7 +4228,7 @@ internal RequestUriBuilder CreateListGatewaysNextPageRequestUri(string nextLink, return uri; } - internal HttpMessage CreateListGatewaysNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string privateCloudName) + internal HttpMessage CreateListDnsZonesNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string privateCloudName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -4246,30 +4242,30 @@ internal HttpMessage CreateListGatewaysNextPageRequest(string nextLink, string s return message; } - /// List of gateways in a private cloud workload network. + /// List WorkloadNetworkDnsZone resources by WorkloadNetwork. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListGatewaysNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string privateCloudName, CancellationToken cancellationToken = default) + public async Task> ListDnsZonesNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string privateCloudName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); - using var message = CreateListGatewaysNextPageRequest(nextLink, subscriptionId, resourceGroupName, privateCloudName); + using var message = CreateListDnsZonesNextPageRequest(nextLink, subscriptionId, resourceGroupName, privateCloudName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - WorkloadNetworkGatewayList value = default; + WorkloadNetworkDnsZonesList value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = WorkloadNetworkGatewayList.DeserializeWorkloadNetworkGatewayList(document.RootElement); + value = WorkloadNetworkDnsZonesList.DeserializeWorkloadNetworkDnsZonesList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -4277,30 +4273,30 @@ public async Task> ListGatewaysNextPageAsyn } } - /// List of gateways in a private cloud workload network. + /// List WorkloadNetworkDnsZone resources by WorkloadNetwork. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListGatewaysNextPage(string nextLink, string subscriptionId, string resourceGroupName, string privateCloudName, CancellationToken cancellationToken = default) + public Response ListDnsZonesNextPage(string nextLink, string subscriptionId, string resourceGroupName, string privateCloudName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); - using var message = CreateListGatewaysNextPageRequest(nextLink, subscriptionId, resourceGroupName, privateCloudName); + using var message = CreateListDnsZonesNextPageRequest(nextLink, subscriptionId, resourceGroupName, privateCloudName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - WorkloadNetworkGatewayList value = default; + WorkloadNetworkDnsZonesList value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = WorkloadNetworkGatewayList.DeserializeWorkloadNetworkGatewayList(document.RootElement); + value = WorkloadNetworkDnsZonesList.DeserializeWorkloadNetworkDnsZonesList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -4308,7 +4304,7 @@ public Response ListGatewaysNextPage(string nextLink } } - internal RequestUriBuilder CreateListPortMirroringNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string privateCloudName) + internal RequestUriBuilder CreateListGatewaysNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string privateCloudName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -4316,7 +4312,7 @@ internal RequestUriBuilder CreateListPortMirroringNextPageRequestUri(string next return uri; } - internal HttpMessage CreateListPortMirroringNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string privateCloudName) + internal HttpMessage CreateListGatewaysNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string privateCloudName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -4330,30 +4326,30 @@ internal HttpMessage CreateListPortMirroringNextPageRequest(string nextLink, str return message; } - /// List of port mirroring profiles in a private cloud workload network. + /// List WorkloadNetworkGateway resources by WorkloadNetwork. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListPortMirroringNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string privateCloudName, CancellationToken cancellationToken = default) + public async Task> ListGatewaysNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string privateCloudName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); - using var message = CreateListPortMirroringNextPageRequest(nextLink, subscriptionId, resourceGroupName, privateCloudName); + using var message = CreateListGatewaysNextPageRequest(nextLink, subscriptionId, resourceGroupName, privateCloudName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - WorkloadNetworkPortMirroringList value = default; + WorkloadNetworkGatewayList value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = WorkloadNetworkPortMirroringList.DeserializeWorkloadNetworkPortMirroringList(document.RootElement); + value = WorkloadNetworkGatewayList.DeserializeWorkloadNetworkGatewayList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -4361,30 +4357,30 @@ public async Task> ListPortMirroringN } } - /// List of port mirroring profiles in a private cloud workload network. + /// List WorkloadNetworkGateway resources by WorkloadNetwork. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListPortMirroringNextPage(string nextLink, string subscriptionId, string resourceGroupName, string privateCloudName, CancellationToken cancellationToken = default) + public Response ListGatewaysNextPage(string nextLink, string subscriptionId, string resourceGroupName, string privateCloudName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); - using var message = CreateListPortMirroringNextPageRequest(nextLink, subscriptionId, resourceGroupName, privateCloudName); + using var message = CreateListGatewaysNextPageRequest(nextLink, subscriptionId, resourceGroupName, privateCloudName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - WorkloadNetworkPortMirroringList value = default; + WorkloadNetworkGatewayList value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = WorkloadNetworkPortMirroringList.DeserializeWorkloadNetworkPortMirroringList(document.RootElement); + value = WorkloadNetworkGatewayList.DeserializeWorkloadNetworkGatewayList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -4392,7 +4388,7 @@ public Response ListPortMirroringNextPage(stri } } - internal RequestUriBuilder CreateListVmGroupsNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string privateCloudName) + internal RequestUriBuilder CreateListPortMirroringNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string privateCloudName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -4400,7 +4396,7 @@ internal RequestUriBuilder CreateListVmGroupsNextPageRequestUri(string nextLink, return uri; } - internal HttpMessage CreateListVmGroupsNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string privateCloudName) + internal HttpMessage CreateListPortMirroringNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string privateCloudName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -4414,30 +4410,30 @@ internal HttpMessage CreateListVmGroupsNextPageRequest(string nextLink, string s return message; } - /// List of vm groups in a private cloud workload network. + /// List WorkloadNetworkPortMirroring resources by WorkloadNetwork. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListVmGroupsNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string privateCloudName, CancellationToken cancellationToken = default) + public async Task> ListPortMirroringNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string privateCloudName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); - using var message = CreateListVmGroupsNextPageRequest(nextLink, subscriptionId, resourceGroupName, privateCloudName); + using var message = CreateListPortMirroringNextPageRequest(nextLink, subscriptionId, resourceGroupName, privateCloudName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - WorkloadNetworkVmGroupsList value = default; + WorkloadNetworkPortMirroringList value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = WorkloadNetworkVmGroupsList.DeserializeWorkloadNetworkVmGroupsList(document.RootElement); + value = WorkloadNetworkPortMirroringList.DeserializeWorkloadNetworkPortMirroringList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -4445,30 +4441,30 @@ public async Task> ListVmGroupsNextPageAsy } } - /// List of vm groups in a private cloud workload network. + /// List WorkloadNetworkPortMirroring resources by WorkloadNetwork. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListVmGroupsNextPage(string nextLink, string subscriptionId, string resourceGroupName, string privateCloudName, CancellationToken cancellationToken = default) + public Response ListPortMirroringNextPage(string nextLink, string subscriptionId, string resourceGroupName, string privateCloudName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); - using var message = CreateListVmGroupsNextPageRequest(nextLink, subscriptionId, resourceGroupName, privateCloudName); + using var message = CreateListPortMirroringNextPageRequest(nextLink, subscriptionId, resourceGroupName, privateCloudName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - WorkloadNetworkVmGroupsList value = default; + WorkloadNetworkPortMirroringList value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = WorkloadNetworkVmGroupsList.DeserializeWorkloadNetworkVmGroupsList(document.RootElement); + value = WorkloadNetworkPortMirroringList.DeserializeWorkloadNetworkPortMirroringList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -4476,7 +4472,7 @@ public Response ListVmGroupsNextPage(string nextLin } } - internal RequestUriBuilder CreateListVirtualMachinesNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string privateCloudName) + internal RequestUriBuilder CreateListPublicIPsNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string privateCloudName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -4484,7 +4480,7 @@ internal RequestUriBuilder CreateListVirtualMachinesNextPageRequestUri(string ne return uri; } - internal HttpMessage CreateListVirtualMachinesNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string privateCloudName) + internal HttpMessage CreateListPublicIPsNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string privateCloudName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -4498,30 +4494,30 @@ internal HttpMessage CreateListVirtualMachinesNextPageRequest(string nextLink, s return message; } - /// List of virtual machines in a private cloud workload network. + /// List WorkloadNetworkPublicIP resources by WorkloadNetwork. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListVirtualMachinesNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string privateCloudName, CancellationToken cancellationToken = default) + public async Task> ListPublicIPsNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string privateCloudName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); - using var message = CreateListVirtualMachinesNextPageRequest(nextLink, subscriptionId, resourceGroupName, privateCloudName); + using var message = CreateListPublicIPsNextPageRequest(nextLink, subscriptionId, resourceGroupName, privateCloudName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - WorkloadNetworkVirtualMachinesList value = default; + WorkloadNetworkPublicIPsList value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = WorkloadNetworkVirtualMachinesList.DeserializeWorkloadNetworkVirtualMachinesList(document.RootElement); + value = WorkloadNetworkPublicIPsList.DeserializeWorkloadNetworkPublicIPsList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -4529,30 +4525,30 @@ public async Task> ListVirtualMachi } } - /// List of virtual machines in a private cloud workload network. + /// List WorkloadNetworkPublicIP resources by WorkloadNetwork. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListVirtualMachinesNextPage(string nextLink, string subscriptionId, string resourceGroupName, string privateCloudName, CancellationToken cancellationToken = default) + public Response ListPublicIPsNextPage(string nextLink, string subscriptionId, string resourceGroupName, string privateCloudName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); - using var message = CreateListVirtualMachinesNextPageRequest(nextLink, subscriptionId, resourceGroupName, privateCloudName); + using var message = CreateListPublicIPsNextPageRequest(nextLink, subscriptionId, resourceGroupName, privateCloudName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - WorkloadNetworkVirtualMachinesList value = default; + WorkloadNetworkPublicIPsList value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = WorkloadNetworkVirtualMachinesList.DeserializeWorkloadNetworkVirtualMachinesList(document.RootElement); + value = WorkloadNetworkPublicIPsList.DeserializeWorkloadNetworkPublicIPsList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -4560,7 +4556,7 @@ public Response ListVirtualMachinesNextPage( } } - internal RequestUriBuilder CreateListDnsServicesNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string privateCloudName) + internal RequestUriBuilder CreateListSegmentsNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string privateCloudName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -4568,7 +4564,7 @@ internal RequestUriBuilder CreateListDnsServicesNextPageRequestUri(string nextLi return uri; } - internal HttpMessage CreateListDnsServicesNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string privateCloudName) + internal HttpMessage CreateListSegmentsNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string privateCloudName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -4582,30 +4578,30 @@ internal HttpMessage CreateListDnsServicesNextPageRequest(string nextLink, strin return message; } - /// List of DNS services in a private cloud workload network. + /// List WorkloadNetworkSegment resources by WorkloadNetwork. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListDnsServicesNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string privateCloudName, CancellationToken cancellationToken = default) + public async Task> ListSegmentsNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string privateCloudName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); - using var message = CreateListDnsServicesNextPageRequest(nextLink, subscriptionId, resourceGroupName, privateCloudName); + using var message = CreateListSegmentsNextPageRequest(nextLink, subscriptionId, resourceGroupName, privateCloudName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - WorkloadNetworkDnsServicesList value = default; + WorkloadNetworkSegmentsList value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = WorkloadNetworkDnsServicesList.DeserializeWorkloadNetworkDnsServicesList(document.RootElement); + value = WorkloadNetworkSegmentsList.DeserializeWorkloadNetworkSegmentsList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -4613,30 +4609,30 @@ public async Task> ListDnsServicesNextP } } - /// List of DNS services in a private cloud workload network. + /// List WorkloadNetworkSegment resources by WorkloadNetwork. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListDnsServicesNextPage(string nextLink, string subscriptionId, string resourceGroupName, string privateCloudName, CancellationToken cancellationToken = default) + public Response ListSegmentsNextPage(string nextLink, string subscriptionId, string resourceGroupName, string privateCloudName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); - using var message = CreateListDnsServicesNextPageRequest(nextLink, subscriptionId, resourceGroupName, privateCloudName); + using var message = CreateListSegmentsNextPageRequest(nextLink, subscriptionId, resourceGroupName, privateCloudName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - WorkloadNetworkDnsServicesList value = default; + WorkloadNetworkSegmentsList value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = WorkloadNetworkDnsServicesList.DeserializeWorkloadNetworkDnsServicesList(document.RootElement); + value = WorkloadNetworkSegmentsList.DeserializeWorkloadNetworkSegmentsList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -4644,7 +4640,7 @@ public Response ListDnsServicesNextPage(string n } } - internal RequestUriBuilder CreateListDnsZonesNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string privateCloudName) + internal RequestUriBuilder CreateListVirtualMachinesNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string privateCloudName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -4652,7 +4648,7 @@ internal RequestUriBuilder CreateListDnsZonesNextPageRequestUri(string nextLink, return uri; } - internal HttpMessage CreateListDnsZonesNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string privateCloudName) + internal HttpMessage CreateListVirtualMachinesNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string privateCloudName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -4666,30 +4662,30 @@ internal HttpMessage CreateListDnsZonesNextPageRequest(string nextLink, string s return message; } - /// List of DNS zones in a private cloud workload network. + /// List WorkloadNetworkVirtualMachine resources by WorkloadNetwork. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListDnsZonesNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string privateCloudName, CancellationToken cancellationToken = default) + public async Task> ListVirtualMachinesNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string privateCloudName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); - using var message = CreateListDnsZonesNextPageRequest(nextLink, subscriptionId, resourceGroupName, privateCloudName); + using var message = CreateListVirtualMachinesNextPageRequest(nextLink, subscriptionId, resourceGroupName, privateCloudName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - WorkloadNetworkDnsZonesList value = default; + WorkloadNetworkVirtualMachinesList value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = WorkloadNetworkDnsZonesList.DeserializeWorkloadNetworkDnsZonesList(document.RootElement); + value = WorkloadNetworkVirtualMachinesList.DeserializeWorkloadNetworkVirtualMachinesList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -4697,30 +4693,30 @@ public async Task> ListDnsZonesNextPageAsy } } - /// List of DNS zones in a private cloud workload network. + /// List WorkloadNetworkVirtualMachine resources by WorkloadNetwork. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListDnsZonesNextPage(string nextLink, string subscriptionId, string resourceGroupName, string privateCloudName, CancellationToken cancellationToken = default) + public Response ListVirtualMachinesNextPage(string nextLink, string subscriptionId, string resourceGroupName, string privateCloudName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); - using var message = CreateListDnsZonesNextPageRequest(nextLink, subscriptionId, resourceGroupName, privateCloudName); + using var message = CreateListVirtualMachinesNextPageRequest(nextLink, subscriptionId, resourceGroupName, privateCloudName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - WorkloadNetworkDnsZonesList value = default; + WorkloadNetworkVirtualMachinesList value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = WorkloadNetworkDnsZonesList.DeserializeWorkloadNetworkDnsZonesList(document.RootElement); + value = WorkloadNetworkVirtualMachinesList.DeserializeWorkloadNetworkVirtualMachinesList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -4728,7 +4724,7 @@ public Response ListDnsZonesNextPage(string nextLin } } - internal RequestUriBuilder CreateListPublicIPsNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string privateCloudName) + internal RequestUriBuilder CreateListVmGroupsNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string privateCloudName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -4736,7 +4732,7 @@ internal RequestUriBuilder CreateListPublicIPsNextPageRequestUri(string nextLink return uri; } - internal HttpMessage CreateListPublicIPsNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string privateCloudName) + internal HttpMessage CreateListVmGroupsNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string privateCloudName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -4750,30 +4746,30 @@ internal HttpMessage CreateListPublicIPsNextPageRequest(string nextLink, string return message; } - /// List of Public IP Blocks in a private cloud workload network. + /// List WorkloadNetworkVMGroup resources by WorkloadNetwork. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListPublicIPsNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string privateCloudName, CancellationToken cancellationToken = default) + public async Task> ListVmGroupsNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string privateCloudName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); - using var message = CreateListPublicIPsNextPageRequest(nextLink, subscriptionId, resourceGroupName, privateCloudName); + using var message = CreateListVmGroupsNextPageRequest(nextLink, subscriptionId, resourceGroupName, privateCloudName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - WorkloadNetworkPublicIPsList value = default; + WorkloadNetworkVmGroupsList value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = WorkloadNetworkPublicIPsList.DeserializeWorkloadNetworkPublicIPsList(document.RootElement); + value = WorkloadNetworkVmGroupsList.DeserializeWorkloadNetworkVmGroupsList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -4781,30 +4777,30 @@ public async Task> ListPublicIPsNextPageA } } - /// List of Public IP Blocks in a private cloud workload network. + /// List WorkloadNetworkVMGroup resources by WorkloadNetwork. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the private cloud. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListPublicIPsNextPage(string nextLink, string subscriptionId, string resourceGroupName, string privateCloudName, CancellationToken cancellationToken = default) + public Response ListVmGroupsNextPage(string nextLink, string subscriptionId, string resourceGroupName, string privateCloudName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(privateCloudName, nameof(privateCloudName)); - using var message = CreateListPublicIPsNextPageRequest(nextLink, subscriptionId, resourceGroupName, privateCloudName); + using var message = CreateListVmGroupsNextPageRequest(nextLink, subscriptionId, resourceGroupName, privateCloudName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - WorkloadNetworkPublicIPsList value = default; + WorkloadNetworkVmGroupsList value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = WorkloadNetworkPublicIPsList.DeserializeWorkloadNetworkPublicIPsList(document.RootElement); + value = WorkloadNetworkVmGroupsList.DeserializeWorkloadNetworkVmGroupsList(document.RootElement); return Response.FromValue(value, message.Response); } default: diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/ScriptCmdletCollection.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/ScriptCmdletCollection.cs index a738ad290235..029db5de2e65 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/ScriptCmdletCollection.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/ScriptCmdletCollection.cs @@ -52,7 +52,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) } /// - /// Return information about a script cmdlet resource in a specific package on a private cloud + /// Get a ScriptCmdlet /// /// /// Request Path @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -72,7 +72,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// - /// Name of the script cmdlet resource in the script package in the private cloud. + /// Name of the script cmdlet. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -97,7 +97,7 @@ public virtual async Task> GetAsync(string script } /// - /// Return information about a script cmdlet resource in a specific package on a private cloud + /// Get a ScriptCmdlet /// /// /// Request Path @@ -109,7 +109,7 @@ public virtual async Task> GetAsync(string script /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -117,7 +117,7 @@ public virtual async Task> GetAsync(string script /// /// /// - /// Name of the script cmdlet resource in the script package in the private cloud. + /// Name of the script cmdlet. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -142,7 +142,7 @@ public virtual Response Get(string scriptCmdletName, Cance } /// - /// List script cmdlet resources available for a private cloud to create a script execution resource on a private cloud + /// List ScriptCmdlet resources by ScriptPackage /// /// /// Request Path @@ -154,7 +154,7 @@ public virtual Response Get(string scriptCmdletName, Cance /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -172,7 +172,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken } /// - /// List script cmdlet resources available for a private cloud to create a script execution resource on a private cloud + /// List ScriptCmdlet resources by ScriptPackage /// /// /// Request Path @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(CancellationToken cancellat /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -222,7 +222,7 @@ public virtual Pageable GetAll(CancellationToken cancellat /// /// /// - /// Name of the script cmdlet resource in the script package in the private cloud. + /// Name of the script cmdlet. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string scriptCmdletName, C /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -265,7 +265,7 @@ public virtual async Task> ExistsAsync(string scriptCmdletName, C /// /// /// - /// Name of the script cmdlet resource in the script package in the private cloud. + /// Name of the script cmdlet. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -300,7 +300,7 @@ public virtual Response Exists(string scriptCmdletName, CancellationToken /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -308,7 +308,7 @@ public virtual Response Exists(string scriptCmdletName, CancellationToken /// /// /// - /// Name of the script cmdlet resource in the script package in the private cloud. + /// Name of the script cmdlet. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -345,7 +345,7 @@ public virtual async Task> GetIfExistsAsy /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -353,7 +353,7 @@ public virtual async Task> GetIfExistsAsy /// /// /// - /// Name of the script cmdlet resource in the script package in the private cloud. + /// Name of the script cmdlet. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/ScriptCmdletData.Serialization.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/ScriptCmdletData.Serialization.cs index 553d934d4369..591388a2bfa0 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/ScriptCmdletData.Serialization.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/ScriptCmdletData.Serialization.cs @@ -39,6 +39,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } if (options.Format != "W" && Optional.IsDefined(Description)) { writer.WritePropertyName("description"u8); @@ -49,6 +54,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("timeout"u8); writer.WriteStringValue(Timeout.Value, "P"); } + if (options.Format != "W" && Optional.IsDefined(Audience)) + { + writer.WritePropertyName("audience"u8); + writer.WriteStringValue(Audience.Value.ToString()); + } if (options.Format != "W" && Optional.IsCollectionDefined(Parameters)) { writer.WritePropertyName("parameters"u8); @@ -86,8 +96,10 @@ internal static ScriptCmdletData DeserializeScriptCmdletData(JsonElement element string name = default; ResourceType type = default; SystemData systemData = default; + ScriptCmdletProvisioningState? provisioningState = default; string description = default; TimeSpan? timeout = default; + ScriptCmdletAudience? audience = default; IReadOnlyList parameters = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); @@ -126,6 +138,15 @@ internal static ScriptCmdletData DeserializeScriptCmdletData(JsonElement element } foreach (var property0 in property.Value.EnumerateObject()) { + if (property0.NameEquals("provisioningState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new ScriptCmdletProvisioningState(property0.Value.GetString()); + continue; + } if (property0.NameEquals("description"u8)) { description = property0.Value.GetString(); @@ -140,6 +161,15 @@ internal static ScriptCmdletData DeserializeScriptCmdletData(JsonElement element timeout = property0.Value.GetTimeSpan("P"); continue; } + if (property0.NameEquals("audience"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + audience = new ScriptCmdletAudience(property0.Value.GetString()); + continue; + } if (property0.NameEquals("parameters"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -168,8 +198,10 @@ internal static ScriptCmdletData DeserializeScriptCmdletData(JsonElement element name, type, systemData, + provisioningState, description, timeout, + audience, parameters ?? new ChangeTrackingList(), serializedAdditionalRawData); } diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/ScriptCmdletData.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/ScriptCmdletData.cs index 008e2a05511b..c8c267ca6684 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/ScriptCmdletData.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/ScriptCmdletData.cs @@ -62,22 +62,30 @@ public ScriptCmdletData() /// The name. /// The resourceType. /// The systemData. + /// The provisioning state of the resource. /// Description of the scripts functionality. /// Recommended time limit for execution. + /// Specifies whether a script cmdlet is intended to be invoked only through automation or visible to customers. /// Parameters the script will accept. /// Keeps track of any properties unknown to the library. - internal ScriptCmdletData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string description, TimeSpan? timeout, IReadOnlyList parameters, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal ScriptCmdletData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ScriptCmdletProvisioningState? provisioningState, string description, TimeSpan? timeout, ScriptCmdletAudience? audience, IReadOnlyList parameters, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { + ProvisioningState = provisioningState; Description = description; Timeout = timeout; + Audience = audience; Parameters = parameters; _serializedAdditionalRawData = serializedAdditionalRawData; } + /// The provisioning state of the resource. + public ScriptCmdletProvisioningState? ProvisioningState { get; } /// Description of the scripts functionality. public string Description { get; } /// Recommended time limit for execution. public TimeSpan? Timeout { get; } + /// Specifies whether a script cmdlet is intended to be invoked only through automation or visible to customers. + public ScriptCmdletAudience? Audience { get; } /// Parameters the script will accept. public IReadOnlyList Parameters { get; } } diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/ScriptCmdletResource.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/ScriptCmdletResource.cs index b9aa74deecae..04f541f294c4 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/ScriptCmdletResource.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/ScriptCmdletResource.cs @@ -90,7 +90,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) } /// - /// Return information about a script cmdlet resource in a specific package on a private cloud + /// Get a ScriptCmdlet /// /// /// Request Path @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -130,7 +130,7 @@ public virtual async Task> GetAsync(CancellationT } /// - /// Return information about a script cmdlet resource in a specific package on a private cloud + /// Get a ScriptCmdlet /// /// /// Request Path @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(CancellationT /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/ScriptExecutionCollection.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/ScriptExecutionCollection.cs index 4bb035649547..bf1e6f686967 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/ScriptExecutionCollection.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/ScriptExecutionCollection.cs @@ -52,7 +52,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) } /// - /// Create or update a script execution in a private cloud + /// Create a ScriptExecution /// /// /// Request Path @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -73,8 +73,8 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Name of the user-invoked script execution resource. - /// A script running in the private cloud. + /// Name of the script cmdlet. + /// Resource create parameters. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// or is null. @@ -88,7 +88,7 @@ public virtual async Task> CreateOrUpdateA try { var response = await _scriptExecutionRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, scriptExecutionName, data, cancellationToken).ConfigureAwait(false); - var operation = new AvsArmOperation(new ScriptExecutionOperationSource(Client), _scriptExecutionClientDiagnostics, Pipeline, _scriptExecutionRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, scriptExecutionName, data).Request, response, OperationFinalStateVia.Location); + var operation = new AvsArmOperation(new ScriptExecutionOperationSource(Client), _scriptExecutionClientDiagnostics, Pipeline, _scriptExecutionRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, scriptExecutionName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -101,7 +101,7 @@ public virtual async Task> CreateOrUpdateA } /// - /// Create or update a script execution in a private cloud + /// Create a ScriptExecution /// /// /// Request Path @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUpdateA /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -122,8 +122,8 @@ public virtual async Task> CreateOrUpdateA /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Name of the user-invoked script execution resource. - /// A script running in the private cloud. + /// Name of the script cmdlet. + /// Resource create parameters. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// or is null. @@ -137,7 +137,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wa try { var response = _scriptExecutionRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, scriptExecutionName, data, cancellationToken); - var operation = new AvsArmOperation(new ScriptExecutionOperationSource(Client), _scriptExecutionClientDiagnostics, Pipeline, _scriptExecutionRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, scriptExecutionName, data).Request, response, OperationFinalStateVia.Location); + var operation = new AvsArmOperation(new ScriptExecutionOperationSource(Client), _scriptExecutionClientDiagnostics, Pipeline, _scriptExecutionRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, scriptExecutionName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -150,7 +150,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wa } /// - /// Get an script execution by name in a private cloud + /// Get a ScriptExecution /// /// /// Request Path @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wa /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -170,7 +170,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wa /// /// /// - /// Name of the user-invoked script execution resource. + /// Name of the script cmdlet. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -195,7 +195,7 @@ public virtual async Task> GetAsync(string scr } /// - /// Get an script execution by name in a private cloud + /// Get a ScriptExecution /// /// /// Request Path @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(string scr /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -215,7 +215,7 @@ public virtual async Task> GetAsync(string scr /// /// /// - /// Name of the user-invoked script execution resource. + /// Name of the script cmdlet. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -240,7 +240,7 @@ public virtual Response Get(string scriptExecutionName, } /// - /// List script executions in a private cloud + /// List ScriptExecution resources by PrivateCloud /// /// /// Request Path @@ -252,7 +252,7 @@ public virtual Response Get(string scriptExecutionName, /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -270,7 +270,7 @@ public virtual AsyncPageable GetAllAsync(CancellationTo } /// - /// List script executions in a private cloud + /// List ScriptExecution resources by PrivateCloud /// /// /// Request Path @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(CancellationTo /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken cancel /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -320,7 +320,7 @@ public virtual Pageable GetAll(CancellationToken cancel /// /// /// - /// Name of the user-invoked script execution resource. + /// Name of the script cmdlet. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string scriptExecutionName /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -363,7 +363,7 @@ public virtual async Task> ExistsAsync(string scriptExecutionName /// /// /// - /// Name of the user-invoked script execution resource. + /// Name of the script cmdlet. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -398,7 +398,7 @@ public virtual Response Exists(string scriptExecutionName, CancellationTok /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -406,7 +406,7 @@ public virtual Response Exists(string scriptExecutionName, CancellationTok /// /// /// - /// Name of the user-invoked script execution resource. + /// Name of the script cmdlet. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -443,7 +443,7 @@ public virtual async Task> GetIfExists /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -451,7 +451,7 @@ public virtual async Task> GetIfExists /// /// /// - /// Name of the user-invoked script execution resource. + /// Name of the script cmdlet. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/ScriptExecutionData.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/ScriptExecutionData.cs index 7bbfcfb53d4c..d79e13669bd7 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/ScriptExecutionData.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/ScriptExecutionData.cs @@ -74,11 +74,15 @@ public ScriptExecutionData() /// The available derived classes include , and . /// /// - /// Parameters that will be hidden/not visible to ARM, such as passwords and credentials + /// Parameters that will be hidden/not visible to ARM, such as passwords and + /// credentials /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include , and . /// - /// Error message if the script was able to run, but if the script itself had errors or powershell threw an exception. + /// + /// Error message if the script was able to run, but if the script itself had + /// errors or powershell threw an exception + /// /// Time limit for execution. /// Time to live for the resource. If not provided, will be available for 60 days. /// Time the script execution was submitted. @@ -120,12 +124,16 @@ internal ScriptExecutionData(ResourceIdentifier id, string name, ResourceType re /// public IList Parameters { get; } /// - /// Parameters that will be hidden/not visible to ARM, such as passwords and credentials + /// Parameters that will be hidden/not visible to ARM, such as passwords and + /// credentials /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include , and . /// public IList HiddenParameters { get; } - /// Error message if the script was able to run, but if the script itself had errors or powershell threw an exception. + /// + /// Error message if the script was able to run, but if the script itself had + /// errors or powershell threw an exception + /// public string FailureReason { get; set; } /// Time limit for execution. public string Timeout { get; set; } diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/ScriptExecutionResource.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/ScriptExecutionResource.cs index d326be82f189..b4f3e1847312 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/ScriptExecutionResource.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/ScriptExecutionResource.cs @@ -91,7 +91,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) } /// - /// Get an script execution by name in a private cloud + /// Get a ScriptExecution /// /// /// Request Path @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -131,7 +131,7 @@ public virtual async Task> GetAsync(Cancellati } /// - /// Get an script execution by name in a private cloud + /// Get a ScriptExecution /// /// /// Request Path @@ -143,7 +143,7 @@ public virtual async Task> GetAsync(Cancellati /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -171,7 +171,7 @@ public virtual Response Get(CancellationToken cancellat } /// - /// Cancel a ScriptExecution in a private cloud + /// Delete a ScriptExecution /// /// /// Request Path @@ -183,7 +183,7 @@ public virtual Response Get(CancellationToken cancellat /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -213,7 +213,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell } /// - /// Cancel a ScriptExecution in a private cloud + /// Delete a ScriptExecution /// /// /// Request Path @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -255,7 +255,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel } /// - /// Create or update a script execution in a private cloud + /// Create a ScriptExecution /// /// /// Request Path @@ -267,7 +267,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -276,7 +276,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// A script running in the private cloud. + /// Resource create parameters. /// The cancellation token to use. /// is null. public virtual async Task> UpdateAsync(WaitUntil waitUntil, ScriptExecutionData data, CancellationToken cancellationToken = default) @@ -288,7 +288,7 @@ public virtual async Task> UpdateAsync(Wai try { var response = await _scriptExecutionRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); - var operation = new AvsArmOperation(new ScriptExecutionOperationSource(Client), _scriptExecutionClientDiagnostics, Pipeline, _scriptExecutionRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + var operation = new AvsArmOperation(new ScriptExecutionOperationSource(Client), _scriptExecutionClientDiagnostics, Pipeline, _scriptExecutionRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -301,7 +301,7 @@ public virtual async Task> UpdateAsync(Wai } /// - /// Create or update a script execution in a private cloud + /// Create a ScriptExecution /// /// /// Request Path @@ -313,7 +313,7 @@ public virtual async Task> UpdateAsync(Wai /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -322,7 +322,7 @@ public virtual async Task> UpdateAsync(Wai /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// A script running in the private cloud. + /// Resource create parameters. /// The cancellation token to use. /// is null. public virtual ArmOperation Update(WaitUntil waitUntil, ScriptExecutionData data, CancellationToken cancellationToken = default) @@ -334,7 +334,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, try { var response = _scriptExecutionRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); - var operation = new AvsArmOperation(new ScriptExecutionOperationSource(Client), _scriptExecutionClientDiagnostics, Pipeline, _scriptExecutionRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + var operation = new AvsArmOperation(new ScriptExecutionOperationSource(Client), _scriptExecutionClientDiagnostics, Pipeline, _scriptExecutionRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -359,7 +359,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual async Task> GetExecutionLogsAsy /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/ScriptPackageCollection.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/ScriptPackageCollection.cs index 0e81d4be1e6d..54962a641d31 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/ScriptPackageCollection.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/ScriptPackageCollection.cs @@ -52,7 +52,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) } /// - /// Get a script package available to run on a private cloud + /// Get a ScriptPackage /// /// /// Request Path @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -72,7 +72,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// - /// Name of the script package in the private cloud. + /// Name of the script package. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -97,7 +97,7 @@ public virtual async Task> GetAsync(string scrip } /// - /// Get a script package available to run on a private cloud + /// Get a ScriptPackage /// /// /// Request Path @@ -109,7 +109,7 @@ public virtual async Task> GetAsync(string scrip /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -117,7 +117,7 @@ public virtual async Task> GetAsync(string scrip /// /// /// - /// Name of the script package in the private cloud. + /// Name of the script package. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -142,7 +142,7 @@ public virtual Response Get(string scriptPackageName, Can } /// - /// List script packages available to run on the private cloud + /// List ScriptPackage resources by PrivateCloud /// /// /// Request Path @@ -154,7 +154,7 @@ public virtual Response Get(string scriptPackageName, Can /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -172,7 +172,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToke } /// - /// List script packages available to run on the private cloud + /// List ScriptPackage resources by PrivateCloud /// /// /// Request Path @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToke /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(CancellationToken cancella /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -222,7 +222,7 @@ public virtual Pageable GetAll(CancellationToken cancella /// /// /// - /// Name of the script package in the private cloud. + /// Name of the script package. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string scriptPackageName, /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -265,7 +265,7 @@ public virtual async Task> ExistsAsync(string scriptPackageName, /// /// /// - /// Name of the script package in the private cloud. + /// Name of the script package. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -300,7 +300,7 @@ public virtual Response Exists(string scriptPackageName, CancellationToken /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -308,7 +308,7 @@ public virtual Response Exists(string scriptPackageName, CancellationToken /// /// /// - /// Name of the script package in the private cloud. + /// Name of the script package. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -345,7 +345,7 @@ public virtual async Task> GetIfExistsAs /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -353,7 +353,7 @@ public virtual async Task> GetIfExistsAs /// /// /// - /// Name of the script package in the private cloud. + /// Name of the script package. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/ScriptPackageData.Serialization.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/ScriptPackageData.Serialization.cs index cc254a63af38..ac9df0f842b4 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/ScriptPackageData.Serialization.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/ScriptPackageData.Serialization.cs @@ -10,6 +10,7 @@ using System.Collections.Generic; using System.Text.Json; using Azure.Core; +using Azure.ResourceManager.Avs.Models; using Azure.ResourceManager.Models; namespace Azure.ResourceManager.Avs @@ -38,6 +39,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } if (options.Format != "W" && Optional.IsDefined(Description)) { writer.WritePropertyName("description"u8); @@ -85,6 +91,7 @@ internal static ScriptPackageData DeserializeScriptPackageData(JsonElement eleme string name = default; ResourceType type = default; SystemData systemData = default; + ScriptPackageProvisioningState? provisioningState = default; string description = default; string version = default; string company = default; @@ -126,6 +133,15 @@ internal static ScriptPackageData DeserializeScriptPackageData(JsonElement eleme } foreach (var property0 in property.Value.EnumerateObject()) { + if (property0.NameEquals("provisioningState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new ScriptPackageProvisioningState(property0.Value.GetString()); + continue; + } if (property0.NameEquals("description"u8)) { description = property0.Value.GetString(); @@ -164,6 +180,7 @@ internal static ScriptPackageData DeserializeScriptPackageData(JsonElement eleme name, type, systemData, + provisioningState, description, version, company, diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/ScriptPackageData.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/ScriptPackageData.cs index 17f0546e4d44..821bec8c8a46 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/ScriptPackageData.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/ScriptPackageData.cs @@ -8,6 +8,7 @@ using System; using System.Collections.Generic; using Azure.Core; +using Azure.ResourceManager.Avs.Models; using Azure.ResourceManager.Models; namespace Azure.ResourceManager.Avs @@ -60,13 +61,15 @@ public ScriptPackageData() /// The name. /// The resourceType. /// The systemData. + /// The provisioning state of the resource. /// User friendly description of the package. /// Module version. /// Company that created and supports the package. /// Link to support by the package vendor. /// Keeps track of any properties unknown to the library. - internal ScriptPackageData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string description, string version, string company, Uri uri, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal ScriptPackageData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ScriptPackageProvisioningState? provisioningState, string description, string version, string company, Uri uri, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { + ProvisioningState = provisioningState; Description = description; Version = version; Company = company; @@ -74,6 +77,8 @@ internal ScriptPackageData(ResourceIdentifier id, string name, ResourceType reso _serializedAdditionalRawData = serializedAdditionalRawData; } + /// The provisioning state of the resource. + public ScriptPackageProvisioningState? ProvisioningState { get; } /// User friendly description of the package. public string Description { get; } /// Module version. diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/ScriptPackageResource.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/ScriptPackageResource.cs index cc3b6b14bff1..b286d5a1870d 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/ScriptPackageResource.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/ScriptPackageResource.cs @@ -96,7 +96,7 @@ public virtual ScriptCmdletCollection GetScriptCmdlets() } /// - /// Return information about a script cmdlet resource in a specific package on a private cloud + /// Get a ScriptCmdlet /// /// /// Request Path @@ -108,7 +108,7 @@ public virtual ScriptCmdletCollection GetScriptCmdlets() /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -116,7 +116,7 @@ public virtual ScriptCmdletCollection GetScriptCmdlets() /// /// /// - /// Name of the script cmdlet resource in the script package in the private cloud. + /// Name of the script cmdlet. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. @@ -127,7 +127,7 @@ public virtual async Task> GetScriptCmdletAsync(s } /// - /// Return information about a script cmdlet resource in a specific package on a private cloud + /// Get a ScriptCmdlet /// /// /// Request Path @@ -139,7 +139,7 @@ public virtual async Task> GetScriptCmdletAsync(s /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -147,7 +147,7 @@ public virtual async Task> GetScriptCmdletAsync(s /// /// /// - /// Name of the script cmdlet resource in the script package in the private cloud. + /// Name of the script cmdlet. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. @@ -158,7 +158,7 @@ public virtual Response GetScriptCmdlet(string scriptCmdle } /// - /// Get a script package available to run on a private cloud + /// Get a ScriptPackage /// /// /// Request Path @@ -170,7 +170,7 @@ public virtual Response GetScriptCmdlet(string scriptCmdle /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -198,7 +198,7 @@ public virtual async Task> GetAsync(Cancellation } /// - /// Get a script package available to run on a private cloud + /// Get a ScriptPackage /// /// /// Request Path @@ -210,7 +210,7 @@ public virtual async Task> GetAsync(Cancellation /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkData.Serialization.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkData.Serialization.cs index c135a1c707fe..2a3a0ec556ad 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkData.Serialization.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkData.Serialization.cs @@ -10,6 +10,7 @@ using System.Collections.Generic; using System.Text.Json; using Azure.Core; +using Azure.ResourceManager.Avs.Models; using Azure.ResourceManager.Models; namespace Azure.ResourceManager.Avs @@ -36,6 +37,14 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + writer.WriteEndObject(); } WorkloadNetworkData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -62,6 +71,7 @@ internal static WorkloadNetworkData DeserializeWorkloadNetworkData(JsonElement e string name = default; ResourceType type = default; SystemData systemData = default; + WorkloadNetworkProvisioningState? provisioningState = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -90,13 +100,40 @@ internal static WorkloadNetworkData DeserializeWorkloadNetworkData(JsonElement e systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); continue; } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("provisioningState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new WorkloadNetworkProvisioningState(property0.Value.GetString()); + continue; + } + } + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new WorkloadNetworkData(id, name, type, systemData, serializedAdditionalRawData); + return new WorkloadNetworkData( + id, + name, + type, + systemData, + provisioningState, + serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkData.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkData.cs index f222141cbd2b..e3f690f0b28e 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkData.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkData.cs @@ -8,6 +8,7 @@ using System; using System.Collections.Generic; using Azure.Core; +using Azure.ResourceManager.Avs.Models; using Azure.ResourceManager.Models; namespace Azure.ResourceManager.Avs @@ -60,10 +61,15 @@ public WorkloadNetworkData() /// The name. /// The resourceType. /// The systemData. + /// The provisioning state of the resource. /// Keeps track of any properties unknown to the library. - internal WorkloadNetworkData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal WorkloadNetworkData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, WorkloadNetworkProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { + ProvisioningState = provisioningState; _serializedAdditionalRawData = serializedAdditionalRawData; } + + /// The provisioning state of the resource. + public WorkloadNetworkProvisioningState? ProvisioningState { get; } } } diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkDhcpCollection.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkDhcpCollection.cs index 28fc0e5f227b..d1568897514a 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkDhcpCollection.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkDhcpCollection.cs @@ -19,8 +19,8 @@ namespace Azure.ResourceManager.Avs { /// /// A class representing a collection of and their operations. - /// Each in the collection will belong to the same instance of . - /// To get a instance call the GetWorkloadNetworkDhcps method from an instance of . + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetWorkloadNetworkDhcps method from an instance of . /// public partial class WorkloadNetworkDhcpCollection : ArmCollection, IEnumerable, IAsyncEnumerable { @@ -47,12 +47,12 @@ internal WorkloadNetworkDhcpCollection(ArmClient client, ResourceIdentifier id) internal static void ValidateResourceId(ResourceIdentifier id) { - if (id.ResourceType != AvsPrivateCloudResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, AvsPrivateCloudResource.ResourceType), nameof(id)); + if (id.ResourceType != WorkloadNetworkResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, WorkloadNetworkResource.ResourceType), nameof(id)); } /// - /// Create dhcp by id in a private cloud workload network. + /// Create a WorkloadNetworkDhcp /// /// /// Request Path @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -73,8 +73,8 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// NSX DHCP identifier. Generally the same as the DHCP display name. - /// NSX DHCP. + /// The ID of the DHCP configuration. + /// Resource create parameters. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// or is null. @@ -87,8 +87,8 @@ public virtual async Task> CreateOrUpd scope.Start(); try { - var response = await _workloadNetworkDhcpWorkloadNetworksRestClient.CreateDhcpAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, dhcpId, data, cancellationToken).ConfigureAwait(false); - var operation = new AvsArmOperation(new WorkloadNetworkDhcpOperationSource(Client), _workloadNetworkDhcpWorkloadNetworksClientDiagnostics, Pipeline, _workloadNetworkDhcpWorkloadNetworksRestClient.CreateCreateDhcpRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, dhcpId, data).Request, response, OperationFinalStateVia.Location); + var response = await _workloadNetworkDhcpWorkloadNetworksRestClient.CreateDhcpAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, dhcpId, data, cancellationToken).ConfigureAwait(false); + var operation = new AvsArmOperation(new WorkloadNetworkDhcpOperationSource(Client), _workloadNetworkDhcpWorkloadNetworksClientDiagnostics, Pipeline, _workloadNetworkDhcpWorkloadNetworksRestClient.CreateCreateDhcpRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, dhcpId, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -101,7 +101,7 @@ public virtual async Task> CreateOrUpd } /// - /// Create dhcp by id in a private cloud workload network. + /// Create a WorkloadNetworkDhcp /// /// /// Request Path @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUpd /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -122,8 +122,8 @@ public virtual async Task> CreateOrUpd /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// NSX DHCP identifier. Generally the same as the DHCP display name. - /// NSX DHCP. + /// The ID of the DHCP configuration. + /// Resource create parameters. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// or is null. @@ -136,8 +136,8 @@ public virtual ArmOperation CreateOrUpdate(WaitUnti scope.Start(); try { - var response = _workloadNetworkDhcpWorkloadNetworksRestClient.CreateDhcp(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, dhcpId, data, cancellationToken); - var operation = new AvsArmOperation(new WorkloadNetworkDhcpOperationSource(Client), _workloadNetworkDhcpWorkloadNetworksClientDiagnostics, Pipeline, _workloadNetworkDhcpWorkloadNetworksRestClient.CreateCreateDhcpRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, dhcpId, data).Request, response, OperationFinalStateVia.Location); + var response = _workloadNetworkDhcpWorkloadNetworksRestClient.CreateDhcp(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, dhcpId, data, cancellationToken); + var operation = new AvsArmOperation(new WorkloadNetworkDhcpOperationSource(Client), _workloadNetworkDhcpWorkloadNetworksClientDiagnostics, Pipeline, _workloadNetworkDhcpWorkloadNetworksRestClient.CreateCreateDhcpRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, dhcpId, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -150,7 +150,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUnti } /// - /// Get dhcp by id in a private cloud workload network. + /// Get a WorkloadNetworkDhcp /// /// /// Request Path @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUnti /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -170,7 +170,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUnti /// /// /// - /// NSX DHCP identifier. Generally the same as the DHCP display name. + /// The ID of the DHCP configuration. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -182,7 +182,7 @@ public virtual async Task> GetAsync(string scope.Start(); try { - var response = await _workloadNetworkDhcpWorkloadNetworksRestClient.GetDhcpAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, dhcpId, cancellationToken).ConfigureAwait(false); + var response = await _workloadNetworkDhcpWorkloadNetworksRestClient.GetDhcpAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, dhcpId, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new WorkloadNetworkDhcpResource(Client, response.Value), response.GetRawResponse()); @@ -195,7 +195,7 @@ public virtual async Task> GetAsync(string } /// - /// Get dhcp by id in a private cloud workload network. + /// Get a WorkloadNetworkDhcp /// /// /// Request Path @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(string /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -215,7 +215,7 @@ public virtual async Task> GetAsync(string /// /// /// - /// NSX DHCP identifier. Generally the same as the DHCP display name. + /// The ID of the DHCP configuration. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -227,7 +227,7 @@ public virtual Response Get(string dhcpId, Cancella scope.Start(); try { - var response = _workloadNetworkDhcpWorkloadNetworksRestClient.GetDhcp(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, dhcpId, cancellationToken); + var response = _workloadNetworkDhcpWorkloadNetworksRestClient.GetDhcp(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, dhcpId, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new WorkloadNetworkDhcpResource(Client, response.Value), response.GetRawResponse()); @@ -240,7 +240,7 @@ public virtual Response Get(string dhcpId, Cancella } /// - /// List dhcp in a private cloud workload network. + /// List WorkloadNetworkDhcp resources by WorkloadNetwork /// /// /// Request Path @@ -252,7 +252,7 @@ public virtual Response Get(string dhcpId, Cancella /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -264,13 +264,13 @@ public virtual Response Get(string dhcpId, Cancella /// An async collection of that may take multiple service requests to iterate over. public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _workloadNetworkDhcpWorkloadNetworksRestClient.CreateListDhcpRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _workloadNetworkDhcpWorkloadNetworksRestClient.CreateListDhcpNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage FirstPageRequest(int? pageSizeHint) => _workloadNetworkDhcpWorkloadNetworksRestClient.CreateListDhcpRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _workloadNetworkDhcpWorkloadNetworksRestClient.CreateListDhcpNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name); return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new WorkloadNetworkDhcpResource(Client, WorkloadNetworkDhcpData.DeserializeWorkloadNetworkDhcpData(e)), _workloadNetworkDhcpWorkloadNetworksClientDiagnostics, Pipeline, "WorkloadNetworkDhcpCollection.GetAll", "value", "nextLink", cancellationToken); } /// - /// List dhcp in a private cloud workload network. + /// List WorkloadNetworkDhcp resources by WorkloadNetwork /// /// /// Request Path @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(Cancellati /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -294,8 +294,8 @@ public virtual AsyncPageable GetAllAsync(Cancellati /// A collection of that may take multiple service requests to iterate over. public virtual Pageable GetAll(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _workloadNetworkDhcpWorkloadNetworksRestClient.CreateListDhcpRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _workloadNetworkDhcpWorkloadNetworksRestClient.CreateListDhcpNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage FirstPageRequest(int? pageSizeHint) => _workloadNetworkDhcpWorkloadNetworksRestClient.CreateListDhcpRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _workloadNetworkDhcpWorkloadNetworksRestClient.CreateListDhcpNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name); return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new WorkloadNetworkDhcpResource(Client, WorkloadNetworkDhcpData.DeserializeWorkloadNetworkDhcpData(e)), _workloadNetworkDhcpWorkloadNetworksClientDiagnostics, Pipeline, "WorkloadNetworkDhcpCollection.GetAll", "value", "nextLink", cancellationToken); } @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken ca /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -320,7 +320,7 @@ public virtual Pageable GetAll(CancellationToken ca /// /// /// - /// NSX DHCP identifier. Generally the same as the DHCP display name. + /// The ID of the DHCP configuration. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -332,7 +332,7 @@ public virtual async Task> ExistsAsync(string dhcpId, Cancellatio scope.Start(); try { - var response = await _workloadNetworkDhcpWorkloadNetworksRestClient.GetDhcpAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, dhcpId, cancellationToken: cancellationToken).ConfigureAwait(false); + var response = await _workloadNetworkDhcpWorkloadNetworksRestClient.GetDhcpAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, dhcpId, cancellationToken: cancellationToken).ConfigureAwait(false); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string dhcpId, Cancellatio /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -363,7 +363,7 @@ public virtual async Task> ExistsAsync(string dhcpId, Cancellatio /// /// /// - /// NSX DHCP identifier. Generally the same as the DHCP display name. + /// The ID of the DHCP configuration. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -375,7 +375,7 @@ public virtual Response Exists(string dhcpId, CancellationToken cancellati scope.Start(); try { - var response = _workloadNetworkDhcpWorkloadNetworksRestClient.GetDhcp(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, dhcpId, cancellationToken: cancellationToken); + var response = _workloadNetworkDhcpWorkloadNetworksRestClient.GetDhcp(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, dhcpId, cancellationToken: cancellationToken); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -398,7 +398,7 @@ public virtual Response Exists(string dhcpId, CancellationToken cancellati /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -406,7 +406,7 @@ public virtual Response Exists(string dhcpId, CancellationToken cancellati /// /// /// - /// NSX DHCP identifier. Generally the same as the DHCP display name. + /// The ID of the DHCP configuration. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -418,7 +418,7 @@ public virtual async Task> GetIfEx scope.Start(); try { - var response = await _workloadNetworkDhcpWorkloadNetworksRestClient.GetDhcpAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, dhcpId, cancellationToken: cancellationToken).ConfigureAwait(false); + var response = await _workloadNetworkDhcpWorkloadNetworksRestClient.GetDhcpAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, dhcpId, cancellationToken: cancellationToken).ConfigureAwait(false); if (response.Value == null) return new NoValueResponse(response.GetRawResponse()); return Response.FromValue(new WorkloadNetworkDhcpResource(Client, response.Value), response.GetRawResponse()); @@ -443,7 +443,7 @@ public virtual async Task> GetIfEx /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -451,7 +451,7 @@ public virtual async Task> GetIfEx /// /// /// - /// NSX DHCP identifier. Generally the same as the DHCP display name. + /// The ID of the DHCP configuration. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -463,7 +463,7 @@ public virtual NullableResponse GetIfExists(string scope.Start(); try { - var response = _workloadNetworkDhcpWorkloadNetworksRestClient.GetDhcp(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, dhcpId, cancellationToken: cancellationToken); + var response = _workloadNetworkDhcpWorkloadNetworksRestClient.GetDhcp(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, dhcpId, cancellationToken: cancellationToken); if (response.Value == null) return new NoValueResponse(response.GetRawResponse()); return Response.FromValue(new WorkloadNetworkDhcpResource(Client, response.Value), response.GetRawResponse()); diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkDhcpData.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkDhcpData.cs index 5b4ebbb6f5e5..cc3dbd1aadea 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkDhcpData.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkDhcpData.cs @@ -62,7 +62,7 @@ public WorkloadNetworkDhcpData() /// The resourceType. /// The systemData. /// - /// DHCP properties. + /// The resource-specific properties for this resource. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include and . /// @@ -74,7 +74,7 @@ internal WorkloadNetworkDhcpData(ResourceIdentifier id, string name, ResourceTyp } /// - /// DHCP properties. + /// The resource-specific properties for this resource. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include and . /// diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkDhcpResource.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkDhcpResource.cs index 8ad77bc0e910..5054a8e50ccc 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkDhcpResource.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkDhcpResource.cs @@ -18,7 +18,7 @@ namespace Azure.ResourceManager.Avs /// A Class representing a WorkloadNetworkDhcp along with the instance operations that can be performed on it. /// If you have a you can construct a /// from an instance of using the GetWorkloadNetworkDhcpResource method. - /// Otherwise you can get one from its parent resource using the GetWorkloadNetworkDhcp method. + /// Otherwise you can get one from its parent resource using the GetWorkloadNetworkDhcp method. /// public partial class WorkloadNetworkDhcpResource : ArmResource { @@ -89,7 +89,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) } /// - /// Get dhcp by id in a private cloud workload network. + /// Get a WorkloadNetworkDhcp /// /// /// Request Path @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -129,7 +129,7 @@ public virtual async Task> GetAsync(Cancel } /// - /// Get dhcp by id in a private cloud workload network. + /// Get a WorkloadNetworkDhcp /// /// /// Request Path @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Cancel /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -169,7 +169,7 @@ public virtual Response Get(CancellationToken cance } /// - /// Delete dhcp by id in a private cloud workload network. + /// Delete a WorkloadNetworkDhcp /// /// /// Request Path @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken cance /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell } /// - /// Delete dhcp by id in a private cloud workload network. + /// Delete a WorkloadNetworkDhcp /// /// /// Request Path @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel } /// - /// Create or update dhcp by id in a private cloud workload network. + /// Update a WorkloadNetworkDhcp /// /// /// Request Path @@ -265,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -274,7 +274,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// NSX DHCP. + /// The resource properties to be updated. /// The cancellation token to use. /// is null. public virtual async Task> UpdateAsync(WaitUntil waitUntil, WorkloadNetworkDhcpData data, CancellationToken cancellationToken = default) @@ -299,7 +299,7 @@ public virtual async Task> UpdateAsync } /// - /// Create or update dhcp by id in a private cloud workload network. + /// Update a WorkloadNetworkDhcp /// /// /// Request Path @@ -311,7 +311,7 @@ public virtual async Task> UpdateAsync /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -320,7 +320,7 @@ public virtual async Task> UpdateAsync /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// NSX DHCP. + /// The resource properties to be updated. /// The cancellation token to use. /// is null. public virtual ArmOperation Update(WaitUntil waitUntil, WorkloadNetworkDhcpData data, CancellationToken cancellationToken = default) diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkDnsServiceCollection.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkDnsServiceCollection.cs index ebfce28dc63e..b8a66464490d 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkDnsServiceCollection.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkDnsServiceCollection.cs @@ -19,8 +19,8 @@ namespace Azure.ResourceManager.Avs { /// /// A class representing a collection of and their operations. - /// Each in the collection will belong to the same instance of . - /// To get a instance call the GetWorkloadNetworkDnsServices method from an instance of . + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetWorkloadNetworkDnsServices method from an instance of . /// public partial class WorkloadNetworkDnsServiceCollection : ArmCollection, IEnumerable, IAsyncEnumerable { @@ -47,12 +47,12 @@ internal WorkloadNetworkDnsServiceCollection(ArmClient client, ResourceIdentifie internal static void ValidateResourceId(ResourceIdentifier id) { - if (id.ResourceType != AvsPrivateCloudResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, AvsPrivateCloudResource.ResourceType), nameof(id)); + if (id.ResourceType != WorkloadNetworkResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, WorkloadNetworkResource.ResourceType), nameof(id)); } /// - /// Create a DNS service by id in a private cloud workload network. + /// Create a WorkloadNetworkDnsService /// /// /// Request Path @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -73,8 +73,8 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// NSX DNS Service identifier. Generally the same as the DNS Service's display name. - /// NSX DNS Service. + /// ID of the DNS service. + /// Resource create parameters. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// or is null. @@ -87,8 +87,8 @@ public virtual async Task> Creat scope.Start(); try { - var response = await _workloadNetworkDnsServiceWorkloadNetworksRestClient.CreateDnsServiceAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, dnsServiceId, data, cancellationToken).ConfigureAwait(false); - var operation = new AvsArmOperation(new WorkloadNetworkDnsServiceOperationSource(Client), _workloadNetworkDnsServiceWorkloadNetworksClientDiagnostics, Pipeline, _workloadNetworkDnsServiceWorkloadNetworksRestClient.CreateCreateDnsServiceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, dnsServiceId, data).Request, response, OperationFinalStateVia.Location); + var response = await _workloadNetworkDnsServiceWorkloadNetworksRestClient.CreateDnsServiceAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, dnsServiceId, data, cancellationToken).ConfigureAwait(false); + var operation = new AvsArmOperation(new WorkloadNetworkDnsServiceOperationSource(Client), _workloadNetworkDnsServiceWorkloadNetworksClientDiagnostics, Pipeline, _workloadNetworkDnsServiceWorkloadNetworksRestClient.CreateCreateDnsServiceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, dnsServiceId, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -101,7 +101,7 @@ public virtual async Task> Creat } /// - /// Create a DNS service by id in a private cloud workload network. + /// Create a WorkloadNetworkDnsService /// /// /// Request Path @@ -113,7 +113,7 @@ public virtual async Task> Creat /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -122,8 +122,8 @@ public virtual async Task> Creat /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// NSX DNS Service identifier. Generally the same as the DNS Service's display name. - /// NSX DNS Service. + /// ID of the DNS service. + /// Resource create parameters. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// or is null. @@ -136,8 +136,8 @@ public virtual ArmOperation CreateOrUpdate(Wa scope.Start(); try { - var response = _workloadNetworkDnsServiceWorkloadNetworksRestClient.CreateDnsService(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, dnsServiceId, data, cancellationToken); - var operation = new AvsArmOperation(new WorkloadNetworkDnsServiceOperationSource(Client), _workloadNetworkDnsServiceWorkloadNetworksClientDiagnostics, Pipeline, _workloadNetworkDnsServiceWorkloadNetworksRestClient.CreateCreateDnsServiceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, dnsServiceId, data).Request, response, OperationFinalStateVia.Location); + var response = _workloadNetworkDnsServiceWorkloadNetworksRestClient.CreateDnsService(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, dnsServiceId, data, cancellationToken); + var operation = new AvsArmOperation(new WorkloadNetworkDnsServiceOperationSource(Client), _workloadNetworkDnsServiceWorkloadNetworksClientDiagnostics, Pipeline, _workloadNetworkDnsServiceWorkloadNetworksRestClient.CreateCreateDnsServiceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, dnsServiceId, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -150,7 +150,7 @@ public virtual ArmOperation CreateOrUpdate(Wa } /// - /// Get a DNS service by id in a private cloud workload network. + /// Get a WorkloadNetworkDnsService /// /// /// Request Path @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(Wa /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -170,7 +170,7 @@ public virtual ArmOperation CreateOrUpdate(Wa /// /// /// - /// NSX DNS Service identifier. Generally the same as the DNS Service's display name. + /// ID of the DNS service. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -182,7 +182,7 @@ public virtual async Task> GetAsync( scope.Start(); try { - var response = await _workloadNetworkDnsServiceWorkloadNetworksRestClient.GetDnsServiceAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, dnsServiceId, cancellationToken).ConfigureAwait(false); + var response = await _workloadNetworkDnsServiceWorkloadNetworksRestClient.GetDnsServiceAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, dnsServiceId, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new WorkloadNetworkDnsServiceResource(Client, response.Value), response.GetRawResponse()); @@ -195,7 +195,7 @@ public virtual async Task> GetAsync( } /// - /// Get a DNS service by id in a private cloud workload network. + /// Get a WorkloadNetworkDnsService /// /// /// Request Path @@ -207,7 +207,7 @@ public virtual async Task> GetAsync( /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -215,7 +215,7 @@ public virtual async Task> GetAsync( /// /// /// - /// NSX DNS Service identifier. Generally the same as the DNS Service's display name. + /// ID of the DNS service. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -227,7 +227,7 @@ public virtual Response Get(string dnsService scope.Start(); try { - var response = _workloadNetworkDnsServiceWorkloadNetworksRestClient.GetDnsService(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, dnsServiceId, cancellationToken); + var response = _workloadNetworkDnsServiceWorkloadNetworksRestClient.GetDnsService(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, dnsServiceId, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new WorkloadNetworkDnsServiceResource(Client, response.Value), response.GetRawResponse()); @@ -240,7 +240,7 @@ public virtual Response Get(string dnsService } /// - /// List of DNS services in a private cloud workload network. + /// List WorkloadNetworkDnsService resources by WorkloadNetwork /// /// /// Request Path @@ -252,7 +252,7 @@ public virtual Response Get(string dnsService /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -264,13 +264,13 @@ public virtual Response Get(string dnsService /// An async collection of that may take multiple service requests to iterate over. public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _workloadNetworkDnsServiceWorkloadNetworksRestClient.CreateListDnsServicesRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _workloadNetworkDnsServiceWorkloadNetworksRestClient.CreateListDnsServicesNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage FirstPageRequest(int? pageSizeHint) => _workloadNetworkDnsServiceWorkloadNetworksRestClient.CreateListDnsServicesRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _workloadNetworkDnsServiceWorkloadNetworksRestClient.CreateListDnsServicesNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name); return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new WorkloadNetworkDnsServiceResource(Client, WorkloadNetworkDnsServiceData.DeserializeWorkloadNetworkDnsServiceData(e)), _workloadNetworkDnsServiceWorkloadNetworksClientDiagnostics, Pipeline, "WorkloadNetworkDnsServiceCollection.GetAll", "value", "nextLink", cancellationToken); } /// - /// List of DNS services in a private cloud workload network. + /// List WorkloadNetworkDnsService resources by WorkloadNetwork /// /// /// Request Path @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(Canc /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -294,8 +294,8 @@ public virtual AsyncPageable GetAllAsync(Canc /// A collection of that may take multiple service requests to iterate over. public virtual Pageable GetAll(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _workloadNetworkDnsServiceWorkloadNetworksRestClient.CreateListDnsServicesRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _workloadNetworkDnsServiceWorkloadNetworksRestClient.CreateListDnsServicesNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage FirstPageRequest(int? pageSizeHint) => _workloadNetworkDnsServiceWorkloadNetworksRestClient.CreateListDnsServicesRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _workloadNetworkDnsServiceWorkloadNetworksRestClient.CreateListDnsServicesNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name); return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new WorkloadNetworkDnsServiceResource(Client, WorkloadNetworkDnsServiceData.DeserializeWorkloadNetworkDnsServiceData(e)), _workloadNetworkDnsServiceWorkloadNetworksClientDiagnostics, Pipeline, "WorkloadNetworkDnsServiceCollection.GetAll", "value", "nextLink", cancellationToken); } @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationTo /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -320,7 +320,7 @@ public virtual Pageable GetAll(CancellationTo /// /// /// - /// NSX DNS Service identifier. Generally the same as the DNS Service's display name. + /// ID of the DNS service. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -332,7 +332,7 @@ public virtual async Task> ExistsAsync(string dnsServiceId, Cance scope.Start(); try { - var response = await _workloadNetworkDnsServiceWorkloadNetworksRestClient.GetDnsServiceAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, dnsServiceId, cancellationToken: cancellationToken).ConfigureAwait(false); + var response = await _workloadNetworkDnsServiceWorkloadNetworksRestClient.GetDnsServiceAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, dnsServiceId, cancellationToken: cancellationToken).ConfigureAwait(false); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string dnsServiceId, Cance /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -363,7 +363,7 @@ public virtual async Task> ExistsAsync(string dnsServiceId, Cance /// /// /// - /// NSX DNS Service identifier. Generally the same as the DNS Service's display name. + /// ID of the DNS service. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -375,7 +375,7 @@ public virtual Response Exists(string dnsServiceId, CancellationToken canc scope.Start(); try { - var response = _workloadNetworkDnsServiceWorkloadNetworksRestClient.GetDnsService(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, dnsServiceId, cancellationToken: cancellationToken); + var response = _workloadNetworkDnsServiceWorkloadNetworksRestClient.GetDnsService(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, dnsServiceId, cancellationToken: cancellationToken); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -398,7 +398,7 @@ public virtual Response Exists(string dnsServiceId, CancellationToken canc /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -406,7 +406,7 @@ public virtual Response Exists(string dnsServiceId, CancellationToken canc /// /// /// - /// NSX DNS Service identifier. Generally the same as the DNS Service's display name. + /// ID of the DNS service. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -418,7 +418,7 @@ public virtual async Task> G scope.Start(); try { - var response = await _workloadNetworkDnsServiceWorkloadNetworksRestClient.GetDnsServiceAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, dnsServiceId, cancellationToken: cancellationToken).ConfigureAwait(false); + var response = await _workloadNetworkDnsServiceWorkloadNetworksRestClient.GetDnsServiceAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, dnsServiceId, cancellationToken: cancellationToken).ConfigureAwait(false); if (response.Value == null) return new NoValueResponse(response.GetRawResponse()); return Response.FromValue(new WorkloadNetworkDnsServiceResource(Client, response.Value), response.GetRawResponse()); @@ -443,7 +443,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -451,7 +451,7 @@ public virtual async Task> G /// /// /// - /// NSX DNS Service identifier. Generally the same as the DNS Service's display name. + /// ID of the DNS service. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -463,7 +463,7 @@ public virtual NullableResponse GetIfExists(s scope.Start(); try { - var response = _workloadNetworkDnsServiceWorkloadNetworksRestClient.GetDnsService(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, dnsServiceId, cancellationToken: cancellationToken); + var response = _workloadNetworkDnsServiceWorkloadNetworksRestClient.GetDnsService(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, dnsServiceId, cancellationToken: cancellationToken); if (response.Value == null) return new NoValueResponse(response.GetRawResponse()); return Response.FromValue(new WorkloadNetworkDnsServiceResource(Client, response.Value), response.GetRawResponse()); diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkDnsServiceResource.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkDnsServiceResource.cs index e34f4d381031..fc324de77ca5 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkDnsServiceResource.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkDnsServiceResource.cs @@ -18,7 +18,7 @@ namespace Azure.ResourceManager.Avs /// A Class representing a WorkloadNetworkDnsService along with the instance operations that can be performed on it. /// If you have a you can construct a /// from an instance of using the GetWorkloadNetworkDnsServiceResource method. - /// Otherwise you can get one from its parent resource using the GetWorkloadNetworkDnsService method. + /// Otherwise you can get one from its parent resource using the GetWorkloadNetworkDnsService method. /// public partial class WorkloadNetworkDnsServiceResource : ArmResource { @@ -89,7 +89,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) } /// - /// Get a DNS service by id in a private cloud workload network. + /// Get a WorkloadNetworkDnsService /// /// /// Request Path @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -129,7 +129,7 @@ public virtual async Task> GetAsync( } /// - /// Get a DNS service by id in a private cloud workload network. + /// Get a WorkloadNetworkDnsService /// /// /// Request Path @@ -141,7 +141,7 @@ public virtual async Task> GetAsync( /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -169,7 +169,7 @@ public virtual Response Get(CancellationToken } /// - /// Delete a DNS service by id in a private cloud workload network. + /// Delete a WorkloadNetworkDnsService /// /// /// Request Path @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell } /// - /// Delete a DNS service by id in a private cloud workload network. + /// Delete a WorkloadNetworkDnsService /// /// /// Request Path @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel } /// - /// Create or update a DNS service by id in a private cloud workload network. + /// Update a WorkloadNetworkDnsService /// /// /// Request Path @@ -265,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -274,7 +274,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// NSX DNS Service. + /// The resource properties to be updated. /// The cancellation token to use. /// is null. public virtual async Task> UpdateAsync(WaitUntil waitUntil, WorkloadNetworkDnsServiceData data, CancellationToken cancellationToken = default) @@ -299,7 +299,7 @@ public virtual async Task> Updat } /// - /// Create or update a DNS service by id in a private cloud workload network. + /// Update a WorkloadNetworkDnsService /// /// /// Request Path @@ -311,7 +311,7 @@ public virtual async Task> Updat /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -320,7 +320,7 @@ public virtual async Task> Updat /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// NSX DNS Service. + /// The resource properties to be updated. /// The cancellation token to use. /// is null. public virtual ArmOperation Update(WaitUntil waitUntil, WorkloadNetworkDnsServiceData data, CancellationToken cancellationToken = default) diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkDnsZoneCollection.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkDnsZoneCollection.cs index 5c565ecbd033..e097d71a9480 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkDnsZoneCollection.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkDnsZoneCollection.cs @@ -19,8 +19,8 @@ namespace Azure.ResourceManager.Avs { /// /// A class representing a collection of and their operations. - /// Each in the collection will belong to the same instance of . - /// To get a instance call the GetWorkloadNetworkDnsZones method from an instance of . + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetWorkloadNetworkDnsZones method from an instance of . /// public partial class WorkloadNetworkDnsZoneCollection : ArmCollection, IEnumerable, IAsyncEnumerable { @@ -47,12 +47,12 @@ internal WorkloadNetworkDnsZoneCollection(ArmClient client, ResourceIdentifier i internal static void ValidateResourceId(ResourceIdentifier id) { - if (id.ResourceType != AvsPrivateCloudResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, AvsPrivateCloudResource.ResourceType), nameof(id)); + if (id.ResourceType != WorkloadNetworkResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, WorkloadNetworkResource.ResourceType), nameof(id)); } /// - /// Create a DNS zone by id in a private cloud workload network. + /// Create a WorkloadNetworkDnsZone /// /// /// Request Path @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -73,8 +73,8 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. - /// NSX DNS Zone. + /// ID of the DNS zone. + /// Resource create parameters. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// or is null. @@ -87,8 +87,8 @@ public virtual async Task> CreateOr scope.Start(); try { - var response = await _workloadNetworkDnsZoneWorkloadNetworksRestClient.CreateDnsZoneAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, dnsZoneId, data, cancellationToken).ConfigureAwait(false); - var operation = new AvsArmOperation(new WorkloadNetworkDnsZoneOperationSource(Client), _workloadNetworkDnsZoneWorkloadNetworksClientDiagnostics, Pipeline, _workloadNetworkDnsZoneWorkloadNetworksRestClient.CreateCreateDnsZoneRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, dnsZoneId, data).Request, response, OperationFinalStateVia.Location); + var response = await _workloadNetworkDnsZoneWorkloadNetworksRestClient.CreateDnsZoneAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, dnsZoneId, data, cancellationToken).ConfigureAwait(false); + var operation = new AvsArmOperation(new WorkloadNetworkDnsZoneOperationSource(Client), _workloadNetworkDnsZoneWorkloadNetworksClientDiagnostics, Pipeline, _workloadNetworkDnsZoneWorkloadNetworksRestClient.CreateCreateDnsZoneRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, dnsZoneId, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -101,7 +101,7 @@ public virtual async Task> CreateOr } /// - /// Create a DNS zone by id in a private cloud workload network. + /// Create a WorkloadNetworkDnsZone /// /// /// Request Path @@ -113,7 +113,7 @@ public virtual async Task> CreateOr /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -122,8 +122,8 @@ public virtual async Task> CreateOr /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. - /// NSX DNS Zone. + /// ID of the DNS zone. + /// Resource create parameters. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// or is null. @@ -136,8 +136,8 @@ public virtual ArmOperation CreateOrUpdate(WaitU scope.Start(); try { - var response = _workloadNetworkDnsZoneWorkloadNetworksRestClient.CreateDnsZone(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, dnsZoneId, data, cancellationToken); - var operation = new AvsArmOperation(new WorkloadNetworkDnsZoneOperationSource(Client), _workloadNetworkDnsZoneWorkloadNetworksClientDiagnostics, Pipeline, _workloadNetworkDnsZoneWorkloadNetworksRestClient.CreateCreateDnsZoneRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, dnsZoneId, data).Request, response, OperationFinalStateVia.Location); + var response = _workloadNetworkDnsZoneWorkloadNetworksRestClient.CreateDnsZone(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, dnsZoneId, data, cancellationToken); + var operation = new AvsArmOperation(new WorkloadNetworkDnsZoneOperationSource(Client), _workloadNetworkDnsZoneWorkloadNetworksClientDiagnostics, Pipeline, _workloadNetworkDnsZoneWorkloadNetworksRestClient.CreateCreateDnsZoneRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, dnsZoneId, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -150,7 +150,7 @@ public virtual ArmOperation CreateOrUpdate(WaitU } /// - /// Get a DNS zone by id in a private cloud workload network. + /// Get a WorkloadNetworkDnsZone /// /// /// Request Path @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitU /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -170,7 +170,7 @@ public virtual ArmOperation CreateOrUpdate(WaitU /// /// /// - /// NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. + /// ID of the DNS zone. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -182,7 +182,7 @@ public virtual async Task> GetAsync(str scope.Start(); try { - var response = await _workloadNetworkDnsZoneWorkloadNetworksRestClient.GetDnsZoneAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, dnsZoneId, cancellationToken).ConfigureAwait(false); + var response = await _workloadNetworkDnsZoneWorkloadNetworksRestClient.GetDnsZoneAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, dnsZoneId, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new WorkloadNetworkDnsZoneResource(Client, response.Value), response.GetRawResponse()); @@ -195,7 +195,7 @@ public virtual async Task> GetAsync(str } /// - /// Get a DNS zone by id in a private cloud workload network. + /// Get a WorkloadNetworkDnsZone /// /// /// Request Path @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(str /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -215,7 +215,7 @@ public virtual async Task> GetAsync(str /// /// /// - /// NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. + /// ID of the DNS zone. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -227,7 +227,7 @@ public virtual Response Get(string dnsZoneId, Ca scope.Start(); try { - var response = _workloadNetworkDnsZoneWorkloadNetworksRestClient.GetDnsZone(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, dnsZoneId, cancellationToken); + var response = _workloadNetworkDnsZoneWorkloadNetworksRestClient.GetDnsZone(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, dnsZoneId, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new WorkloadNetworkDnsZoneResource(Client, response.Value), response.GetRawResponse()); @@ -240,7 +240,7 @@ public virtual Response Get(string dnsZoneId, Ca } /// - /// List of DNS zones in a private cloud workload network. + /// List WorkloadNetworkDnsZone resources by WorkloadNetwork /// /// /// Request Path @@ -252,7 +252,7 @@ public virtual Response Get(string dnsZoneId, Ca /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -264,13 +264,13 @@ public virtual Response Get(string dnsZoneId, Ca /// An async collection of that may take multiple service requests to iterate over. public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _workloadNetworkDnsZoneWorkloadNetworksRestClient.CreateListDnsZonesRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _workloadNetworkDnsZoneWorkloadNetworksRestClient.CreateListDnsZonesNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage FirstPageRequest(int? pageSizeHint) => _workloadNetworkDnsZoneWorkloadNetworksRestClient.CreateListDnsZonesRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _workloadNetworkDnsZoneWorkloadNetworksRestClient.CreateListDnsZonesNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name); return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new WorkloadNetworkDnsZoneResource(Client, WorkloadNetworkDnsZoneData.DeserializeWorkloadNetworkDnsZoneData(e)), _workloadNetworkDnsZoneWorkloadNetworksClientDiagnostics, Pipeline, "WorkloadNetworkDnsZoneCollection.GetAll", "value", "nextLink", cancellationToken); } /// - /// List of DNS zones in a private cloud workload network. + /// List WorkloadNetworkDnsZone resources by WorkloadNetwork /// /// /// Request Path @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(Cancell /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -294,8 +294,8 @@ public virtual AsyncPageable GetAllAsync(Cancell /// A collection of that may take multiple service requests to iterate over. public virtual Pageable GetAll(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _workloadNetworkDnsZoneWorkloadNetworksRestClient.CreateListDnsZonesRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _workloadNetworkDnsZoneWorkloadNetworksRestClient.CreateListDnsZonesNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage FirstPageRequest(int? pageSizeHint) => _workloadNetworkDnsZoneWorkloadNetworksRestClient.CreateListDnsZonesRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _workloadNetworkDnsZoneWorkloadNetworksRestClient.CreateListDnsZonesNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name); return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new WorkloadNetworkDnsZoneResource(Client, WorkloadNetworkDnsZoneData.DeserializeWorkloadNetworkDnsZoneData(e)), _workloadNetworkDnsZoneWorkloadNetworksClientDiagnostics, Pipeline, "WorkloadNetworkDnsZoneCollection.GetAll", "value", "nextLink", cancellationToken); } @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -320,7 +320,7 @@ public virtual Pageable GetAll(CancellationToken /// /// /// - /// NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. + /// ID of the DNS zone. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -332,7 +332,7 @@ public virtual async Task> ExistsAsync(string dnsZoneId, Cancella scope.Start(); try { - var response = await _workloadNetworkDnsZoneWorkloadNetworksRestClient.GetDnsZoneAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, dnsZoneId, cancellationToken: cancellationToken).ConfigureAwait(false); + var response = await _workloadNetworkDnsZoneWorkloadNetworksRestClient.GetDnsZoneAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, dnsZoneId, cancellationToken: cancellationToken).ConfigureAwait(false); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string dnsZoneId, Cancella /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -363,7 +363,7 @@ public virtual async Task> ExistsAsync(string dnsZoneId, Cancella /// /// /// - /// NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. + /// ID of the DNS zone. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -375,7 +375,7 @@ public virtual Response Exists(string dnsZoneId, CancellationToken cancell scope.Start(); try { - var response = _workloadNetworkDnsZoneWorkloadNetworksRestClient.GetDnsZone(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, dnsZoneId, cancellationToken: cancellationToken); + var response = _workloadNetworkDnsZoneWorkloadNetworksRestClient.GetDnsZone(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, dnsZoneId, cancellationToken: cancellationToken); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -398,7 +398,7 @@ public virtual Response Exists(string dnsZoneId, CancellationToken cancell /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -406,7 +406,7 @@ public virtual Response Exists(string dnsZoneId, CancellationToken cancell /// /// /// - /// NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. + /// ID of the DNS zone. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -418,7 +418,7 @@ public virtual async Task> GetI scope.Start(); try { - var response = await _workloadNetworkDnsZoneWorkloadNetworksRestClient.GetDnsZoneAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, dnsZoneId, cancellationToken: cancellationToken).ConfigureAwait(false); + var response = await _workloadNetworkDnsZoneWorkloadNetworksRestClient.GetDnsZoneAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, dnsZoneId, cancellationToken: cancellationToken).ConfigureAwait(false); if (response.Value == null) return new NoValueResponse(response.GetRawResponse()); return Response.FromValue(new WorkloadNetworkDnsZoneResource(Client, response.Value), response.GetRawResponse()); @@ -443,7 +443,7 @@ public virtual async Task> GetI /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -451,7 +451,7 @@ public virtual async Task> GetI /// /// /// - /// NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. + /// ID of the DNS zone. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -463,7 +463,7 @@ public virtual NullableResponse GetIfExists(stri scope.Start(); try { - var response = _workloadNetworkDnsZoneWorkloadNetworksRestClient.GetDnsZone(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, dnsZoneId, cancellationToken: cancellationToken); + var response = _workloadNetworkDnsZoneWorkloadNetworksRestClient.GetDnsZone(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, dnsZoneId, cancellationToken: cancellationToken); if (response.Value == null) return new NoValueResponse(response.GetRawResponse()); return Response.FromValue(new WorkloadNetworkDnsZoneResource(Client, response.Value), response.GetRawResponse()); diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkDnsZoneResource.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkDnsZoneResource.cs index 52a965640d25..de14d200e374 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkDnsZoneResource.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkDnsZoneResource.cs @@ -18,7 +18,7 @@ namespace Azure.ResourceManager.Avs /// A Class representing a WorkloadNetworkDnsZone along with the instance operations that can be performed on it. /// If you have a you can construct a /// from an instance of using the GetWorkloadNetworkDnsZoneResource method. - /// Otherwise you can get one from its parent resource using the GetWorkloadNetworkDnsZone method. + /// Otherwise you can get one from its parent resource using the GetWorkloadNetworkDnsZone method. /// public partial class WorkloadNetworkDnsZoneResource : ArmResource { @@ -89,7 +89,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) } /// - /// Get a DNS zone by id in a private cloud workload network. + /// Get a WorkloadNetworkDnsZone /// /// /// Request Path @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -129,7 +129,7 @@ public virtual async Task> GetAsync(Can } /// - /// Get a DNS zone by id in a private cloud workload network. + /// Get a WorkloadNetworkDnsZone /// /// /// Request Path @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Can /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -169,7 +169,7 @@ public virtual Response Get(CancellationToken ca } /// - /// Delete a DNS zone by id in a private cloud workload network. + /// Delete a WorkloadNetworkDnsZone /// /// /// Request Path @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken ca /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell } /// - /// Delete a DNS zone by id in a private cloud workload network. + /// Delete a WorkloadNetworkDnsZone /// /// /// Request Path @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel } /// - /// Create or update a DNS zone by id in a private cloud workload network. + /// Update a WorkloadNetworkDnsZone /// /// /// Request Path @@ -265,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -274,7 +274,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// NSX DNS Zone. + /// The resource properties to be updated. /// The cancellation token to use. /// is null. public virtual async Task> UpdateAsync(WaitUntil waitUntil, WorkloadNetworkDnsZoneData data, CancellationToken cancellationToken = default) @@ -299,7 +299,7 @@ public virtual async Task> UpdateAs } /// - /// Create or update a DNS zone by id in a private cloud workload network. + /// Update a WorkloadNetworkDnsZone /// /// /// Request Path @@ -311,7 +311,7 @@ public virtual async Task> UpdateAs /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -320,7 +320,7 @@ public virtual async Task> UpdateAs /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// NSX DNS Zone. + /// The resource properties to be updated. /// The cancellation token to use. /// is null. public virtual ArmOperation Update(WaitUntil waitUntil, WorkloadNetworkDnsZoneData data, CancellationToken cancellationToken = default) diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkGatewayCollection.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkGatewayCollection.cs index 1ef079f21637..a4538dd74618 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkGatewayCollection.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkGatewayCollection.cs @@ -19,8 +19,8 @@ namespace Azure.ResourceManager.Avs { /// /// A class representing a collection of and their operations. - /// Each in the collection will belong to the same instance of . - /// To get a instance call the GetWorkloadNetworkGateways method from an instance of . + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetWorkloadNetworkGateways method from an instance of . /// public partial class WorkloadNetworkGatewayCollection : ArmCollection, IEnumerable, IAsyncEnumerable { @@ -47,12 +47,12 @@ internal WorkloadNetworkGatewayCollection(ArmClient client, ResourceIdentifier i internal static void ValidateResourceId(ResourceIdentifier id) { - if (id.ResourceType != AvsPrivateCloudResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, AvsPrivateCloudResource.ResourceType), nameof(id)); + if (id.ResourceType != WorkloadNetworkResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, WorkloadNetworkResource.ResourceType), nameof(id)); } /// - /// Get a gateway by id in a private cloud workload network. + /// Get a WorkloadNetworkGateway /// /// /// Request Path @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -72,7 +72,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// - /// NSX Gateway identifier. Generally the same as the Gateway's display name. + /// The ID of the NSX Gateway. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -84,7 +84,7 @@ public virtual async Task> GetAsync(str scope.Start(); try { - var response = await _workloadNetworkGatewayWorkloadNetworksRestClient.GetGatewayAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, gatewayId, cancellationToken).ConfigureAwait(false); + var response = await _workloadNetworkGatewayWorkloadNetworksRestClient.GetGatewayAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, gatewayId, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new WorkloadNetworkGatewayResource(Client, response.Value), response.GetRawResponse()); @@ -97,7 +97,7 @@ public virtual async Task> GetAsync(str } /// - /// Get a gateway by id in a private cloud workload network. + /// Get a WorkloadNetworkGateway /// /// /// Request Path @@ -109,7 +109,7 @@ public virtual async Task> GetAsync(str /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -117,7 +117,7 @@ public virtual async Task> GetAsync(str /// /// /// - /// NSX Gateway identifier. Generally the same as the Gateway's display name. + /// The ID of the NSX Gateway. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -129,7 +129,7 @@ public virtual Response Get(string gatewayId, Ca scope.Start(); try { - var response = _workloadNetworkGatewayWorkloadNetworksRestClient.GetGateway(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, gatewayId, cancellationToken); + var response = _workloadNetworkGatewayWorkloadNetworksRestClient.GetGateway(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, gatewayId, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new WorkloadNetworkGatewayResource(Client, response.Value), response.GetRawResponse()); @@ -142,7 +142,7 @@ public virtual Response Get(string gatewayId, Ca } /// - /// List of gateways in a private cloud workload network. + /// List WorkloadNetworkGateway resources by WorkloadNetwork /// /// /// Request Path @@ -154,7 +154,7 @@ public virtual Response Get(string gatewayId, Ca /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -166,13 +166,13 @@ public virtual Response Get(string gatewayId, Ca /// An async collection of that may take multiple service requests to iterate over. public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _workloadNetworkGatewayWorkloadNetworksRestClient.CreateListGatewaysRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _workloadNetworkGatewayWorkloadNetworksRestClient.CreateListGatewaysNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage FirstPageRequest(int? pageSizeHint) => _workloadNetworkGatewayWorkloadNetworksRestClient.CreateListGatewaysRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _workloadNetworkGatewayWorkloadNetworksRestClient.CreateListGatewaysNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name); return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new WorkloadNetworkGatewayResource(Client, WorkloadNetworkGatewayData.DeserializeWorkloadNetworkGatewayData(e)), _workloadNetworkGatewayWorkloadNetworksClientDiagnostics, Pipeline, "WorkloadNetworkGatewayCollection.GetAll", "value", "nextLink", cancellationToken); } /// - /// List of gateways in a private cloud workload network. + /// List WorkloadNetworkGateway resources by WorkloadNetwork /// /// /// Request Path @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsync(Cancell /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -196,8 +196,8 @@ public virtual AsyncPageable GetAllAsync(Cancell /// A collection of that may take multiple service requests to iterate over. public virtual Pageable GetAll(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _workloadNetworkGatewayWorkloadNetworksRestClient.CreateListGatewaysRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _workloadNetworkGatewayWorkloadNetworksRestClient.CreateListGatewaysNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage FirstPageRequest(int? pageSizeHint) => _workloadNetworkGatewayWorkloadNetworksRestClient.CreateListGatewaysRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _workloadNetworkGatewayWorkloadNetworksRestClient.CreateListGatewaysNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name); return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new WorkloadNetworkGatewayResource(Client, WorkloadNetworkGatewayData.DeserializeWorkloadNetworkGatewayData(e)), _workloadNetworkGatewayWorkloadNetworksClientDiagnostics, Pipeline, "WorkloadNetworkGatewayCollection.GetAll", "value", "nextLink", cancellationToken); } @@ -214,7 +214,7 @@ public virtual Pageable GetAll(CancellationToken /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -222,7 +222,7 @@ public virtual Pageable GetAll(CancellationToken /// /// /// - /// NSX Gateway identifier. Generally the same as the Gateway's display name. + /// The ID of the NSX Gateway. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -234,7 +234,7 @@ public virtual async Task> ExistsAsync(string gatewayId, Cancella scope.Start(); try { - var response = await _workloadNetworkGatewayWorkloadNetworksRestClient.GetGatewayAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, gatewayId, cancellationToken: cancellationToken).ConfigureAwait(false); + var response = await _workloadNetworkGatewayWorkloadNetworksRestClient.GetGatewayAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, gatewayId, cancellationToken: cancellationToken).ConfigureAwait(false); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string gatewayId, Cancella /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -265,7 +265,7 @@ public virtual async Task> ExistsAsync(string gatewayId, Cancella /// /// /// - /// NSX Gateway identifier. Generally the same as the Gateway's display name. + /// The ID of the NSX Gateway. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -277,7 +277,7 @@ public virtual Response Exists(string gatewayId, CancellationToken cancell scope.Start(); try { - var response = _workloadNetworkGatewayWorkloadNetworksRestClient.GetGateway(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, gatewayId, cancellationToken: cancellationToken); + var response = _workloadNetworkGatewayWorkloadNetworksRestClient.GetGateway(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, gatewayId, cancellationToken: cancellationToken); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -300,7 +300,7 @@ public virtual Response Exists(string gatewayId, CancellationToken cancell /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -308,7 +308,7 @@ public virtual Response Exists(string gatewayId, CancellationToken cancell /// /// /// - /// NSX Gateway identifier. Generally the same as the Gateway's display name. + /// The ID of the NSX Gateway. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -320,7 +320,7 @@ public virtual async Task> GetI scope.Start(); try { - var response = await _workloadNetworkGatewayWorkloadNetworksRestClient.GetGatewayAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, gatewayId, cancellationToken: cancellationToken).ConfigureAwait(false); + var response = await _workloadNetworkGatewayWorkloadNetworksRestClient.GetGatewayAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, gatewayId, cancellationToken: cancellationToken).ConfigureAwait(false); if (response.Value == null) return new NoValueResponse(response.GetRawResponse()); return Response.FromValue(new WorkloadNetworkGatewayResource(Client, response.Value), response.GetRawResponse()); @@ -345,7 +345,7 @@ public virtual async Task> GetI /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -353,7 +353,7 @@ public virtual async Task> GetI /// /// /// - /// NSX Gateway identifier. Generally the same as the Gateway's display name. + /// The ID of the NSX Gateway. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -365,7 +365,7 @@ public virtual NullableResponse GetIfExists(stri scope.Start(); try { - var response = _workloadNetworkGatewayWorkloadNetworksRestClient.GetGateway(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, gatewayId, cancellationToken: cancellationToken); + var response = _workloadNetworkGatewayWorkloadNetworksRestClient.GetGateway(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, gatewayId, cancellationToken: cancellationToken); if (response.Value == null) return new NoValueResponse(response.GetRawResponse()); return Response.FromValue(new WorkloadNetworkGatewayResource(Client, response.Value), response.GetRawResponse()); diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkGatewayData.Serialization.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkGatewayData.Serialization.cs index 70300ad5b6c9..59cec15bfd75 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkGatewayData.Serialization.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkGatewayData.Serialization.cs @@ -10,6 +10,7 @@ using System.Collections.Generic; using System.Text.Json; using Azure.Core; +using Azure.ResourceManager.Avs.Models; using Azure.ResourceManager.Models; namespace Azure.ResourceManager.Avs @@ -38,6 +39,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } if (Optional.IsDefined(DisplayName)) { writer.WritePropertyName("displayName"u8); @@ -75,6 +81,7 @@ internal static WorkloadNetworkGatewayData DeserializeWorkloadNetworkGatewayData string name = default; ResourceType type = default; SystemData systemData = default; + WorkloadNetworkProvisioningState? provisioningState = default; string displayName = default; string path = default; IDictionary serializedAdditionalRawData = default; @@ -114,6 +121,15 @@ internal static WorkloadNetworkGatewayData DeserializeWorkloadNetworkGatewayData } foreach (var property0 in property.Value.EnumerateObject()) { + if (property0.NameEquals("provisioningState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new WorkloadNetworkProvisioningState(property0.Value.GetString()); + continue; + } if (property0.NameEquals("displayName"u8)) { displayName = property0.Value.GetString(); @@ -138,6 +154,7 @@ internal static WorkloadNetworkGatewayData DeserializeWorkloadNetworkGatewayData name, type, systemData, + provisioningState, displayName, path, serializedAdditionalRawData); diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkGatewayData.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkGatewayData.cs index df04351c67cd..0fc7f4b046f7 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkGatewayData.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkGatewayData.cs @@ -8,6 +8,7 @@ using System; using System.Collections.Generic; using Azure.Core; +using Azure.ResourceManager.Avs.Models; using Azure.ResourceManager.Models; namespace Azure.ResourceManager.Avs @@ -60,16 +61,20 @@ public WorkloadNetworkGatewayData() /// The name. /// The resourceType. /// The systemData. + /// The provisioning state of the resource. /// Display name of the DHCP entity. /// NSX Gateway Path. /// Keeps track of any properties unknown to the library. - internal WorkloadNetworkGatewayData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string displayName, string path, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal WorkloadNetworkGatewayData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, WorkloadNetworkProvisioningState? provisioningState, string displayName, string path, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { + ProvisioningState = provisioningState; DisplayName = displayName; Path = path; _serializedAdditionalRawData = serializedAdditionalRawData; } + /// The provisioning state of the resource. + public WorkloadNetworkProvisioningState? ProvisioningState { get; } /// Display name of the DHCP entity. public string DisplayName { get; set; } /// NSX Gateway Path. diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkGatewayResource.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkGatewayResource.cs index 089727171f3c..4934766c2503 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkGatewayResource.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkGatewayResource.cs @@ -18,7 +18,7 @@ namespace Azure.ResourceManager.Avs /// A Class representing a WorkloadNetworkGateway along with the instance operations that can be performed on it. /// If you have a you can construct a /// from an instance of using the GetWorkloadNetworkGatewayResource method. - /// Otherwise you can get one from its parent resource using the GetWorkloadNetworkGateway method. + /// Otherwise you can get one from its parent resource using the GetWorkloadNetworkGateway method. /// public partial class WorkloadNetworkGatewayResource : ArmResource { @@ -89,7 +89,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) } /// - /// Get a gateway by id in a private cloud workload network. + /// Get a WorkloadNetworkGateway /// /// /// Request Path @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -129,7 +129,7 @@ public virtual async Task> GetAsync(Can } /// - /// Get a gateway by id in a private cloud workload network. + /// Get a WorkloadNetworkGateway /// /// /// Request Path @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Can /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkPortMirroringProfileCollection.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkPortMirroringProfileCollection.cs index eed7aa59f6df..338c3c2d043a 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkPortMirroringProfileCollection.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkPortMirroringProfileCollection.cs @@ -19,8 +19,8 @@ namespace Azure.ResourceManager.Avs { /// /// A class representing a collection of and their operations. - /// Each in the collection will belong to the same instance of . - /// To get a instance call the GetWorkloadNetworkPortMirroringProfiles method from an instance of . + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetWorkloadNetworkPortMirroringProfiles method from an instance of . /// public partial class WorkloadNetworkPortMirroringProfileCollection : ArmCollection, IEnumerable, IAsyncEnumerable { @@ -47,12 +47,12 @@ internal WorkloadNetworkPortMirroringProfileCollection(ArmClient client, Resourc internal static void ValidateResourceId(ResourceIdentifier id) { - if (id.ResourceType != AvsPrivateCloudResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, AvsPrivateCloudResource.ResourceType), nameof(id)); + if (id.ResourceType != WorkloadNetworkResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, WorkloadNetworkResource.ResourceType), nameof(id)); } /// - /// Create a port mirroring profile by id in a private cloud workload network. + /// Create a WorkloadNetworkPortMirroring /// /// /// Request Path @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -73,8 +73,8 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. - /// NSX port mirroring. + /// ID of the NSX port mirroring profile. + /// Resource create parameters. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// or is null. @@ -87,8 +87,8 @@ public virtual async Task(new WorkloadNetworkPortMirroringProfileOperationSource(Client), _workloadNetworkPortMirroringProfileWorkloadNetworksClientDiagnostics, Pipeline, _workloadNetworkPortMirroringProfileWorkloadNetworksRestClient.CreateCreatePortMirroringRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, portMirroringId, data).Request, response, OperationFinalStateVia.Location); + var response = await _workloadNetworkPortMirroringProfileWorkloadNetworksRestClient.CreatePortMirroringAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, portMirroringId, data, cancellationToken).ConfigureAwait(false); + var operation = new AvsArmOperation(new WorkloadNetworkPortMirroringProfileOperationSource(Client), _workloadNetworkPortMirroringProfileWorkloadNetworksClientDiagnostics, Pipeline, _workloadNetworkPortMirroringProfileWorkloadNetworksRestClient.CreateCreatePortMirroringRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, portMirroringId, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -101,7 +101,7 @@ public virtual async Task - /// Create a port mirroring profile by id in a private cloud workload network. + /// Create a WorkloadNetworkPortMirroring /// /// /// Request Path @@ -113,7 +113,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -122,8 +122,8 @@ public virtual async Task /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. - /// NSX port mirroring. + /// ID of the NSX port mirroring profile. + /// Resource create parameters. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// or is null. @@ -136,8 +136,8 @@ public virtual ArmOperation CreateO scope.Start(); try { - var response = _workloadNetworkPortMirroringProfileWorkloadNetworksRestClient.CreatePortMirroring(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, portMirroringId, data, cancellationToken); - var operation = new AvsArmOperation(new WorkloadNetworkPortMirroringProfileOperationSource(Client), _workloadNetworkPortMirroringProfileWorkloadNetworksClientDiagnostics, Pipeline, _workloadNetworkPortMirroringProfileWorkloadNetworksRestClient.CreateCreatePortMirroringRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, portMirroringId, data).Request, response, OperationFinalStateVia.Location); + var response = _workloadNetworkPortMirroringProfileWorkloadNetworksRestClient.CreatePortMirroring(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, portMirroringId, data, cancellationToken); + var operation = new AvsArmOperation(new WorkloadNetworkPortMirroringProfileOperationSource(Client), _workloadNetworkPortMirroringProfileWorkloadNetworksClientDiagnostics, Pipeline, _workloadNetworkPortMirroringProfileWorkloadNetworksRestClient.CreateCreatePortMirroringRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, portMirroringId, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -150,7 +150,7 @@ public virtual ArmOperation CreateO } /// - /// Get a port mirroring profile by id in a private cloud workload network. + /// Get a WorkloadNetworkPortMirroring /// /// /// Request Path @@ -162,7 +162,7 @@ public virtual ArmOperation CreateO /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -170,7 +170,7 @@ public virtual ArmOperation CreateO /// /// /// - /// NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. + /// ID of the NSX port mirroring profile. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -182,7 +182,7 @@ public virtual async Task> scope.Start(); try { - var response = await _workloadNetworkPortMirroringProfileWorkloadNetworksRestClient.GetPortMirroringAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, portMirroringId, cancellationToken).ConfigureAwait(false); + var response = await _workloadNetworkPortMirroringProfileWorkloadNetworksRestClient.GetPortMirroringAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, portMirroringId, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new WorkloadNetworkPortMirroringProfileResource(Client, response.Value), response.GetRawResponse()); @@ -195,7 +195,7 @@ public virtual async Task> } /// - /// Get a port mirroring profile by id in a private cloud workload network. + /// Get a WorkloadNetworkPortMirroring /// /// /// Request Path @@ -207,7 +207,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -215,7 +215,7 @@ public virtual async Task> /// /// /// - /// NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. + /// ID of the NSX port mirroring profile. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -227,7 +227,7 @@ public virtual Response Get(string scope.Start(); try { - var response = _workloadNetworkPortMirroringProfileWorkloadNetworksRestClient.GetPortMirroring(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, portMirroringId, cancellationToken); + var response = _workloadNetworkPortMirroringProfileWorkloadNetworksRestClient.GetPortMirroring(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, portMirroringId, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new WorkloadNetworkPortMirroringProfileResource(Client, response.Value), response.GetRawResponse()); @@ -240,7 +240,7 @@ public virtual Response Get(string } /// - /// List of port mirroring profiles in a private cloud workload network. + /// List WorkloadNetworkPortMirroring resources by WorkloadNetwork /// /// /// Request Path @@ -252,7 +252,7 @@ public virtual Response Get(string /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -264,13 +264,13 @@ public virtual Response Get(string /// An async collection of that may take multiple service requests to iterate over. public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _workloadNetworkPortMirroringProfileWorkloadNetworksRestClient.CreateListPortMirroringRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _workloadNetworkPortMirroringProfileWorkloadNetworksRestClient.CreateListPortMirroringNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage FirstPageRequest(int? pageSizeHint) => _workloadNetworkPortMirroringProfileWorkloadNetworksRestClient.CreateListPortMirroringRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _workloadNetworkPortMirroringProfileWorkloadNetworksRestClient.CreateListPortMirroringNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name); return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new WorkloadNetworkPortMirroringProfileResource(Client, WorkloadNetworkPortMirroringProfileData.DeserializeWorkloadNetworkPortMirroringProfileData(e)), _workloadNetworkPortMirroringProfileWorkloadNetworksClientDiagnostics, Pipeline, "WorkloadNetworkPortMirroringProfileCollection.GetAll", "value", "nextLink", cancellationToken); } /// - /// List of port mirroring profiles in a private cloud workload network. + /// List WorkloadNetworkPortMirroring resources by WorkloadNetwork /// /// /// Request Path @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAll /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -294,8 +294,8 @@ public virtual AsyncPageable GetAll /// A collection of that may take multiple service requests to iterate over. public virtual Pageable GetAll(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _workloadNetworkPortMirroringProfileWorkloadNetworksRestClient.CreateListPortMirroringRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _workloadNetworkPortMirroringProfileWorkloadNetworksRestClient.CreateListPortMirroringNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage FirstPageRequest(int? pageSizeHint) => _workloadNetworkPortMirroringProfileWorkloadNetworksRestClient.CreateListPortMirroringRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _workloadNetworkPortMirroringProfileWorkloadNetworksRestClient.CreateListPortMirroringNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name); return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new WorkloadNetworkPortMirroringProfileResource(Client, WorkloadNetworkPortMirroringProfileData.DeserializeWorkloadNetworkPortMirroringProfileData(e)), _workloadNetworkPortMirroringProfileWorkloadNetworksClientDiagnostics, Pipeline, "WorkloadNetworkPortMirroringProfileCollection.GetAll", "value", "nextLink", cancellationToken); } @@ -312,7 +312,7 @@ public virtual Pageable GetAll(Canc /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -320,7 +320,7 @@ public virtual Pageable GetAll(Canc /// /// /// - /// NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. + /// ID of the NSX port mirroring profile. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -332,7 +332,7 @@ public virtual async Task> ExistsAsync(string portMirroringId, Ca scope.Start(); try { - var response = await _workloadNetworkPortMirroringProfileWorkloadNetworksRestClient.GetPortMirroringAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, portMirroringId, cancellationToken: cancellationToken).ConfigureAwait(false); + var response = await _workloadNetworkPortMirroringProfileWorkloadNetworksRestClient.GetPortMirroringAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, portMirroringId, cancellationToken: cancellationToken).ConfigureAwait(false); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string portMirroringId, Ca /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -363,7 +363,7 @@ public virtual async Task> ExistsAsync(string portMirroringId, Ca /// /// /// - /// NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. + /// ID of the NSX port mirroring profile. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -375,7 +375,7 @@ public virtual Response Exists(string portMirroringId, CancellationToken c scope.Start(); try { - var response = _workloadNetworkPortMirroringProfileWorkloadNetworksRestClient.GetPortMirroring(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, portMirroringId, cancellationToken: cancellationToken); + var response = _workloadNetworkPortMirroringProfileWorkloadNetworksRestClient.GetPortMirroring(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, portMirroringId, cancellationToken: cancellationToken); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -398,7 +398,7 @@ public virtual Response Exists(string portMirroringId, CancellationToken c /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -406,7 +406,7 @@ public virtual Response Exists(string portMirroringId, CancellationToken c /// /// /// - /// NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. + /// ID of the NSX port mirroring profile. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -418,7 +418,7 @@ public virtual async Task(response.GetRawResponse()); return Response.FromValue(new WorkloadNetworkPortMirroringProfileResource(Client, response.Value), response.GetRawResponse()); @@ -443,7 +443,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -451,7 +451,7 @@ public virtual async Task /// /// - /// NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. + /// ID of the NSX port mirroring profile. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -463,7 +463,7 @@ public virtual NullableResponse Get scope.Start(); try { - var response = _workloadNetworkPortMirroringProfileWorkloadNetworksRestClient.GetPortMirroring(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, portMirroringId, cancellationToken: cancellationToken); + var response = _workloadNetworkPortMirroringProfileWorkloadNetworksRestClient.GetPortMirroring(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, portMirroringId, cancellationToken: cancellationToken); if (response.Value == null) return new NoValueResponse(response.GetRawResponse()); return Response.FromValue(new WorkloadNetworkPortMirroringProfileResource(Client, response.Value), response.GetRawResponse()); diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkPortMirroringProfileResource.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkPortMirroringProfileResource.cs index acd6875f1bd0..328efe9cb522 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkPortMirroringProfileResource.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkPortMirroringProfileResource.cs @@ -18,7 +18,7 @@ namespace Azure.ResourceManager.Avs /// A Class representing a WorkloadNetworkPortMirroringProfile along with the instance operations that can be performed on it. /// If you have a you can construct a /// from an instance of using the GetWorkloadNetworkPortMirroringProfileResource method. - /// Otherwise you can get one from its parent resource using the GetWorkloadNetworkPortMirroringProfile method. + /// Otherwise you can get one from its parent resource using the GetWorkloadNetworkPortMirroringProfile method. /// public partial class WorkloadNetworkPortMirroringProfileResource : ArmResource { @@ -89,7 +89,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) } /// - /// Get a port mirroring profile by id in a private cloud workload network. + /// Get a WorkloadNetworkPortMirroring /// /// /// Request Path @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -129,7 +129,7 @@ public virtual async Task> } /// - /// Get a port mirroring profile by id in a private cloud workload network. + /// Get a WorkloadNetworkPortMirroring /// /// /// Request Path @@ -141,7 +141,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -169,7 +169,7 @@ public virtual Response Get(Cancell } /// - /// Delete a port mirroring profile by id in a private cloud workload network. + /// Delete a WorkloadNetworkPortMirroring /// /// /// Request Path @@ -181,7 +181,7 @@ public virtual Response Get(Cancell /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell } /// - /// Delete a port mirroring profile by id in a private cloud workload network. + /// Delete a WorkloadNetworkPortMirroring /// /// /// Request Path @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel } /// - /// Create or update a port mirroring profile by id in a private cloud workload network. + /// Update a WorkloadNetworkPortMirroring /// /// /// Request Path @@ -265,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -274,7 +274,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// NSX port mirroring. + /// The resource properties to be updated. /// The cancellation token to use. /// is null. public virtual async Task> UpdateAsync(WaitUntil waitUntil, WorkloadNetworkPortMirroringProfileData data, CancellationToken cancellationToken = default) @@ -299,7 +299,7 @@ public virtual async Task - /// Create or update a port mirroring profile by id in a private cloud workload network. + /// Update a WorkloadNetworkPortMirroring /// /// /// Request Path @@ -311,7 +311,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -320,7 +320,7 @@ public virtual async Task /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// NSX port mirroring. + /// The resource properties to be updated. /// The cancellation token to use. /// is null. public virtual ArmOperation Update(WaitUntil waitUntil, WorkloadNetworkPortMirroringProfileData data, CancellationToken cancellationToken = default) diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkPublicIPCollection.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkPublicIPCollection.cs index b9e53ec02c1f..b93d183dc952 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkPublicIPCollection.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkPublicIPCollection.cs @@ -19,8 +19,8 @@ namespace Azure.ResourceManager.Avs { /// /// A class representing a collection of and their operations. - /// Each in the collection will belong to the same instance of . - /// To get a instance call the GetWorkloadNetworkPublicIPs method from an instance of . + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetWorkloadNetworkPublicIPs method from an instance of . /// public partial class WorkloadNetworkPublicIPCollection : ArmCollection, IEnumerable, IAsyncEnumerable { @@ -47,12 +47,12 @@ internal WorkloadNetworkPublicIPCollection(ArmClient client, ResourceIdentifier internal static void ValidateResourceId(ResourceIdentifier id) { - if (id.ResourceType != AvsPrivateCloudResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, AvsPrivateCloudResource.ResourceType), nameof(id)); + if (id.ResourceType != WorkloadNetworkResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, WorkloadNetworkResource.ResourceType), nameof(id)); } /// - /// Create a Public IP Block by id in a private cloud workload network. + /// Create a WorkloadNetworkPublicIP /// /// /// Request Path @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -73,8 +73,8 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// NSX Public IP Block identifier. Generally the same as the Public IP Block's display name. - /// NSX Public IP Block. + /// ID of the DNS zone. + /// Resource create parameters. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// or is null. @@ -87,8 +87,8 @@ public virtual async Task> CreateO scope.Start(); try { - var response = await _workloadNetworkPublicIPWorkloadNetworksRestClient.CreatePublicIPAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, publicIPId, data, cancellationToken).ConfigureAwait(false); - var operation = new AvsArmOperation(new WorkloadNetworkPublicIPOperationSource(Client), _workloadNetworkPublicIPWorkloadNetworksClientDiagnostics, Pipeline, _workloadNetworkPublicIPWorkloadNetworksRestClient.CreateCreatePublicIPRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, publicIPId, data).Request, response, OperationFinalStateVia.Location); + var response = await _workloadNetworkPublicIPWorkloadNetworksRestClient.CreatePublicIPAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, publicIPId, data, cancellationToken).ConfigureAwait(false); + var operation = new AvsArmOperation(new WorkloadNetworkPublicIPOperationSource(Client), _workloadNetworkPublicIPWorkloadNetworksClientDiagnostics, Pipeline, _workloadNetworkPublicIPWorkloadNetworksRestClient.CreateCreatePublicIPRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, publicIPId, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -101,7 +101,7 @@ public virtual async Task> CreateO } /// - /// Create a Public IP Block by id in a private cloud workload network. + /// Create a WorkloadNetworkPublicIP /// /// /// Request Path @@ -113,7 +113,7 @@ public virtual async Task> CreateO /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -122,8 +122,8 @@ public virtual async Task> CreateO /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// NSX Public IP Block identifier. Generally the same as the Public IP Block's display name. - /// NSX Public IP Block. + /// ID of the DNS zone. + /// Resource create parameters. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// or is null. @@ -136,8 +136,8 @@ public virtual ArmOperation CreateOrUpdate(Wait scope.Start(); try { - var response = _workloadNetworkPublicIPWorkloadNetworksRestClient.CreatePublicIP(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, publicIPId, data, cancellationToken); - var operation = new AvsArmOperation(new WorkloadNetworkPublicIPOperationSource(Client), _workloadNetworkPublicIPWorkloadNetworksClientDiagnostics, Pipeline, _workloadNetworkPublicIPWorkloadNetworksRestClient.CreateCreatePublicIPRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, publicIPId, data).Request, response, OperationFinalStateVia.Location); + var response = _workloadNetworkPublicIPWorkloadNetworksRestClient.CreatePublicIP(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, publicIPId, data, cancellationToken); + var operation = new AvsArmOperation(new WorkloadNetworkPublicIPOperationSource(Client), _workloadNetworkPublicIPWorkloadNetworksClientDiagnostics, Pipeline, _workloadNetworkPublicIPWorkloadNetworksRestClient.CreateCreatePublicIPRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, publicIPId, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -150,7 +150,7 @@ public virtual ArmOperation CreateOrUpdate(Wait } /// - /// Get a Public IP Block by id in a private cloud workload network. + /// Get a WorkloadNetworkPublicIP /// /// /// Request Path @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(Wait /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -170,7 +170,7 @@ public virtual ArmOperation CreateOrUpdate(Wait /// /// /// - /// NSX Public IP Block identifier. Generally the same as the Public IP Block's display name. + /// ID of the DNS zone. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -182,7 +182,7 @@ public virtual async Task> GetAsync(st scope.Start(); try { - var response = await _workloadNetworkPublicIPWorkloadNetworksRestClient.GetPublicIPAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, publicIPId, cancellationToken).ConfigureAwait(false); + var response = await _workloadNetworkPublicIPWorkloadNetworksRestClient.GetPublicIPAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, publicIPId, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new WorkloadNetworkPublicIPResource(Client, response.Value), response.GetRawResponse()); @@ -195,7 +195,7 @@ public virtual async Task> GetAsync(st } /// - /// Get a Public IP Block by id in a private cloud workload network. + /// Get a WorkloadNetworkPublicIP /// /// /// Request Path @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(st /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -215,7 +215,7 @@ public virtual async Task> GetAsync(st /// /// /// - /// NSX Public IP Block identifier. Generally the same as the Public IP Block's display name. + /// ID of the DNS zone. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -227,7 +227,7 @@ public virtual Response Get(string publicIPId, scope.Start(); try { - var response = _workloadNetworkPublicIPWorkloadNetworksRestClient.GetPublicIP(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, publicIPId, cancellationToken); + var response = _workloadNetworkPublicIPWorkloadNetworksRestClient.GetPublicIP(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, publicIPId, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new WorkloadNetworkPublicIPResource(Client, response.Value), response.GetRawResponse()); @@ -240,7 +240,7 @@ public virtual Response Get(string publicIPId, } /// - /// List of Public IP Blocks in a private cloud workload network. + /// List WorkloadNetworkPublicIP resources by WorkloadNetwork /// /// /// Request Path @@ -252,7 +252,7 @@ public virtual Response Get(string publicIPId, /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -264,13 +264,13 @@ public virtual Response Get(string publicIPId, /// An async collection of that may take multiple service requests to iterate over. public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _workloadNetworkPublicIPWorkloadNetworksRestClient.CreateListPublicIPsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _workloadNetworkPublicIPWorkloadNetworksRestClient.CreateListPublicIPsNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage FirstPageRequest(int? pageSizeHint) => _workloadNetworkPublicIPWorkloadNetworksRestClient.CreateListPublicIPsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _workloadNetworkPublicIPWorkloadNetworksRestClient.CreateListPublicIPsNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name); return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new WorkloadNetworkPublicIPResource(Client, WorkloadNetworkPublicIPData.DeserializeWorkloadNetworkPublicIPData(e)), _workloadNetworkPublicIPWorkloadNetworksClientDiagnostics, Pipeline, "WorkloadNetworkPublicIPCollection.GetAll", "value", "nextLink", cancellationToken); } /// - /// List of Public IP Blocks in a private cloud workload network. + /// List WorkloadNetworkPublicIP resources by WorkloadNetwork /// /// /// Request Path @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(Cancel /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -294,8 +294,8 @@ public virtual AsyncPageable GetAllAsync(Cancel /// A collection of that may take multiple service requests to iterate over. public virtual Pageable GetAll(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _workloadNetworkPublicIPWorkloadNetworksRestClient.CreateListPublicIPsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _workloadNetworkPublicIPWorkloadNetworksRestClient.CreateListPublicIPsNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage FirstPageRequest(int? pageSizeHint) => _workloadNetworkPublicIPWorkloadNetworksRestClient.CreateListPublicIPsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _workloadNetworkPublicIPWorkloadNetworksRestClient.CreateListPublicIPsNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name); return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new WorkloadNetworkPublicIPResource(Client, WorkloadNetworkPublicIPData.DeserializeWorkloadNetworkPublicIPData(e)), _workloadNetworkPublicIPWorkloadNetworksClientDiagnostics, Pipeline, "WorkloadNetworkPublicIPCollection.GetAll", "value", "nextLink", cancellationToken); } @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToke /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -320,7 +320,7 @@ public virtual Pageable GetAll(CancellationToke /// /// /// - /// NSX Public IP Block identifier. Generally the same as the Public IP Block's display name. + /// ID of the DNS zone. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -332,7 +332,7 @@ public virtual async Task> ExistsAsync(string publicIPId, Cancell scope.Start(); try { - var response = await _workloadNetworkPublicIPWorkloadNetworksRestClient.GetPublicIPAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, publicIPId, cancellationToken: cancellationToken).ConfigureAwait(false); + var response = await _workloadNetworkPublicIPWorkloadNetworksRestClient.GetPublicIPAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, publicIPId, cancellationToken: cancellationToken).ConfigureAwait(false); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string publicIPId, Cancell /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -363,7 +363,7 @@ public virtual async Task> ExistsAsync(string publicIPId, Cancell /// /// /// - /// NSX Public IP Block identifier. Generally the same as the Public IP Block's display name. + /// ID of the DNS zone. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -375,7 +375,7 @@ public virtual Response Exists(string publicIPId, CancellationToken cancel scope.Start(); try { - var response = _workloadNetworkPublicIPWorkloadNetworksRestClient.GetPublicIP(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, publicIPId, cancellationToken: cancellationToken); + var response = _workloadNetworkPublicIPWorkloadNetworksRestClient.GetPublicIP(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, publicIPId, cancellationToken: cancellationToken); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -398,7 +398,7 @@ public virtual Response Exists(string publicIPId, CancellationToken cancel /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -406,7 +406,7 @@ public virtual Response Exists(string publicIPId, CancellationToken cancel /// /// /// - /// NSX Public IP Block identifier. Generally the same as the Public IP Block's display name. + /// ID of the DNS zone. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -418,7 +418,7 @@ public virtual async Task> Get scope.Start(); try { - var response = await _workloadNetworkPublicIPWorkloadNetworksRestClient.GetPublicIPAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, publicIPId, cancellationToken: cancellationToken).ConfigureAwait(false); + var response = await _workloadNetworkPublicIPWorkloadNetworksRestClient.GetPublicIPAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, publicIPId, cancellationToken: cancellationToken).ConfigureAwait(false); if (response.Value == null) return new NoValueResponse(response.GetRawResponse()); return Response.FromValue(new WorkloadNetworkPublicIPResource(Client, response.Value), response.GetRawResponse()); @@ -443,7 +443,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -451,7 +451,7 @@ public virtual async Task> Get /// /// /// - /// NSX Public IP Block identifier. Generally the same as the Public IP Block's display name. + /// ID of the DNS zone. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -463,7 +463,7 @@ public virtual NullableResponse GetIfExists(str scope.Start(); try { - var response = _workloadNetworkPublicIPWorkloadNetworksRestClient.GetPublicIP(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, publicIPId, cancellationToken: cancellationToken); + var response = _workloadNetworkPublicIPWorkloadNetworksRestClient.GetPublicIP(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, publicIPId, cancellationToken: cancellationToken); if (response.Value == null) return new NoValueResponse(response.GetRawResponse()); return Response.FromValue(new WorkloadNetworkPublicIPResource(Client, response.Value), response.GetRawResponse()); diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkPublicIPResource.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkPublicIPResource.cs index 06b6bba3b170..39b6edfcefd1 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkPublicIPResource.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkPublicIPResource.cs @@ -18,7 +18,7 @@ namespace Azure.ResourceManager.Avs /// A Class representing a WorkloadNetworkPublicIP along with the instance operations that can be performed on it. /// If you have a you can construct a /// from an instance of using the GetWorkloadNetworkPublicIPResource method. - /// Otherwise you can get one from its parent resource using the GetWorkloadNetworkPublicIP method. + /// Otherwise you can get one from its parent resource using the GetWorkloadNetworkPublicIP method. /// public partial class WorkloadNetworkPublicIPResource : ArmResource { @@ -89,7 +89,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) } /// - /// Get a Public IP Block by id in a private cloud workload network. + /// Get a WorkloadNetworkPublicIP /// /// /// Request Path @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -129,7 +129,7 @@ public virtual async Task> GetAsync(Ca } /// - /// Get a Public IP Block by id in a private cloud workload network. + /// Get a WorkloadNetworkPublicIP /// /// /// Request Path @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Ca /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -169,7 +169,7 @@ public virtual Response Get(CancellationToken c } /// - /// Delete a Public IP Block by id in a private cloud workload network. + /// Delete a WorkloadNetworkPublicIP /// /// /// Request Path @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken c /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell } /// - /// Delete a Public IP Block by id in a private cloud workload network. + /// Delete a WorkloadNetworkPublicIP /// /// /// Request Path @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel } /// - /// Create a Public IP Block by id in a private cloud workload network. + /// Create a WorkloadNetworkPublicIP /// /// /// Request Path @@ -265,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -274,7 +274,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// NSX Public IP Block. + /// Resource create parameters. /// The cancellation token to use. /// is null. public virtual async Task> UpdateAsync(WaitUntil waitUntil, WorkloadNetworkPublicIPData data, CancellationToken cancellationToken = default) @@ -286,7 +286,7 @@ public virtual async Task> UpdateA try { var response = await _workloadNetworkPublicIPWorkloadNetworksRestClient.CreatePublicIPAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); - var operation = new AvsArmOperation(new WorkloadNetworkPublicIPOperationSource(Client), _workloadNetworkPublicIPWorkloadNetworksClientDiagnostics, Pipeline, _workloadNetworkPublicIPWorkloadNetworksRestClient.CreateCreatePublicIPRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + var operation = new AvsArmOperation(new WorkloadNetworkPublicIPOperationSource(Client), _workloadNetworkPublicIPWorkloadNetworksClientDiagnostics, Pipeline, _workloadNetworkPublicIPWorkloadNetworksRestClient.CreateCreatePublicIPRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -299,7 +299,7 @@ public virtual async Task> UpdateA } /// - /// Create a Public IP Block by id in a private cloud workload network. + /// Create a WorkloadNetworkPublicIP /// /// /// Request Path @@ -311,7 +311,7 @@ public virtual async Task> UpdateA /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -320,7 +320,7 @@ public virtual async Task> UpdateA /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// NSX Public IP Block. + /// Resource create parameters. /// The cancellation token to use. /// is null. public virtual ArmOperation Update(WaitUntil waitUntil, WorkloadNetworkPublicIPData data, CancellationToken cancellationToken = default) @@ -332,7 +332,7 @@ public virtual ArmOperation Update(WaitUntil wa try { var response = _workloadNetworkPublicIPWorkloadNetworksRestClient.CreatePublicIP(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Name, data, cancellationToken); - var operation = new AvsArmOperation(new WorkloadNetworkPublicIPOperationSource(Client), _workloadNetworkPublicIPWorkloadNetworksClientDiagnostics, Pipeline, _workloadNetworkPublicIPWorkloadNetworksRestClient.CreateCreatePublicIPRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + var operation = new AvsArmOperation(new WorkloadNetworkPublicIPOperationSource(Client), _workloadNetworkPublicIPWorkloadNetworksClientDiagnostics, Pipeline, _workloadNetworkPublicIPWorkloadNetworksRestClient.CreateCreatePublicIPRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkResource.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkResource.cs index 354f02e345d6..c660592ea8b9 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkResource.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkResource.cs @@ -11,7 +11,6 @@ using System.Threading.Tasks; using Azure.Core; using Azure.Core.Pipeline; -using Azure.ResourceManager.Avs.Models; namespace Azure.ResourceManager.Avs { @@ -27,10 +26,9 @@ public partial class WorkloadNetworkResource : ArmResource /// The subscriptionId. /// The resourceGroupName. /// The privateCloudName. - /// The workloadNetworkName. - public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string privateCloudName, WorkloadNetworkName workloadNetworkName) + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string privateCloudName) { - var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}"; + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default"; return new ResourceIdentifier(resourceId); } @@ -89,12 +87,633 @@ internal static void ValidateResourceId(ResourceIdentifier id) throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); } + /// Gets a collection of WorkloadNetworkDhcpResources in the WorkloadNetwork. + /// An object representing collection of WorkloadNetworkDhcpResources and their operations over a WorkloadNetworkDhcpResource. + public virtual WorkloadNetworkDhcpCollection GetWorkloadNetworkDhcps() + { + return GetCachedClient(client => new WorkloadNetworkDhcpCollection(client, Id)); + } + + /// + /// Get a WorkloadNetworkDhcp + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations/{dhcpId} + /// + /// + /// Operation Id + /// WorkloadNetworks_GetDhcp + /// + /// + /// Default Api Version + /// 2023-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The ID of the DHCP configuration. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetWorkloadNetworkDhcpAsync(string dhcpId, CancellationToken cancellationToken = default) + { + return await GetWorkloadNetworkDhcps().GetAsync(dhcpId, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a WorkloadNetworkDhcp + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations/{dhcpId} + /// + /// + /// Operation Id + /// WorkloadNetworks_GetDhcp + /// + /// + /// Default Api Version + /// 2023-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The ID of the DHCP configuration. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetWorkloadNetworkDhcp(string dhcpId, CancellationToken cancellationToken = default) + { + return GetWorkloadNetworkDhcps().Get(dhcpId, cancellationToken); + } + + /// Gets a collection of WorkloadNetworkDnsServiceResources in the WorkloadNetwork. + /// An object representing collection of WorkloadNetworkDnsServiceResources and their operations over a WorkloadNetworkDnsServiceResource. + public virtual WorkloadNetworkDnsServiceCollection GetWorkloadNetworkDnsServices() + { + return GetCachedClient(client => new WorkloadNetworkDnsServiceCollection(client, Id)); + } + + /// + /// Get a WorkloadNetworkDnsService + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices/{dnsServiceId} + /// + /// + /// Operation Id + /// WorkloadNetworks_GetDnsService + /// + /// + /// Default Api Version + /// 2023-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// ID of the DNS service. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetWorkloadNetworkDnsServiceAsync(string dnsServiceId, CancellationToken cancellationToken = default) + { + return await GetWorkloadNetworkDnsServices().GetAsync(dnsServiceId, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a WorkloadNetworkDnsService + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices/{dnsServiceId} + /// + /// + /// Operation Id + /// WorkloadNetworks_GetDnsService + /// + /// + /// Default Api Version + /// 2023-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// ID of the DNS service. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetWorkloadNetworkDnsService(string dnsServiceId, CancellationToken cancellationToken = default) + { + return GetWorkloadNetworkDnsServices().Get(dnsServiceId, cancellationToken); + } + + /// Gets a collection of WorkloadNetworkDnsZoneResources in the WorkloadNetwork. + /// An object representing collection of WorkloadNetworkDnsZoneResources and their operations over a WorkloadNetworkDnsZoneResource. + public virtual WorkloadNetworkDnsZoneCollection GetWorkloadNetworkDnsZones() + { + return GetCachedClient(client => new WorkloadNetworkDnsZoneCollection(client, Id)); + } + + /// + /// Get a WorkloadNetworkDnsZone + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones/{dnsZoneId} + /// + /// + /// Operation Id + /// WorkloadNetworks_GetDnsZone + /// + /// + /// Default Api Version + /// 2023-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// ID of the DNS zone. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetWorkloadNetworkDnsZoneAsync(string dnsZoneId, CancellationToken cancellationToken = default) + { + return await GetWorkloadNetworkDnsZones().GetAsync(dnsZoneId, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a WorkloadNetworkDnsZone + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones/{dnsZoneId} + /// + /// + /// Operation Id + /// WorkloadNetworks_GetDnsZone + /// + /// + /// Default Api Version + /// 2023-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// ID of the DNS zone. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetWorkloadNetworkDnsZone(string dnsZoneId, CancellationToken cancellationToken = default) + { + return GetWorkloadNetworkDnsZones().Get(dnsZoneId, cancellationToken); + } + + /// Gets a collection of WorkloadNetworkGatewayResources in the WorkloadNetwork. + /// An object representing collection of WorkloadNetworkGatewayResources and their operations over a WorkloadNetworkGatewayResource. + public virtual WorkloadNetworkGatewayCollection GetWorkloadNetworkGateways() + { + return GetCachedClient(client => new WorkloadNetworkGatewayCollection(client, Id)); + } + + /// + /// Get a WorkloadNetworkGateway + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/gateways/{gatewayId} + /// + /// + /// Operation Id + /// WorkloadNetworks_GetGateway + /// + /// + /// Default Api Version + /// 2023-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The ID of the NSX Gateway. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetWorkloadNetworkGatewayAsync(string gatewayId, CancellationToken cancellationToken = default) + { + return await GetWorkloadNetworkGateways().GetAsync(gatewayId, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a WorkloadNetworkGateway + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/gateways/{gatewayId} + /// + /// + /// Operation Id + /// WorkloadNetworks_GetGateway + /// + /// + /// Default Api Version + /// 2023-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The ID of the NSX Gateway. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetWorkloadNetworkGateway(string gatewayId, CancellationToken cancellationToken = default) + { + return GetWorkloadNetworkGateways().Get(gatewayId, cancellationToken); + } + + /// Gets a collection of WorkloadNetworkPortMirroringProfileResources in the WorkloadNetwork. + /// An object representing collection of WorkloadNetworkPortMirroringProfileResources and their operations over a WorkloadNetworkPortMirroringProfileResource. + public virtual WorkloadNetworkPortMirroringProfileCollection GetWorkloadNetworkPortMirroringProfiles() + { + return GetCachedClient(client => new WorkloadNetworkPortMirroringProfileCollection(client, Id)); + } + + /// + /// Get a WorkloadNetworkPortMirroring + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles/{portMirroringId} + /// + /// + /// Operation Id + /// WorkloadNetworks_GetPortMirroring + /// + /// + /// Default Api Version + /// 2023-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// ID of the NSX port mirroring profile. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetWorkloadNetworkPortMirroringProfileAsync(string portMirroringId, CancellationToken cancellationToken = default) + { + return await GetWorkloadNetworkPortMirroringProfiles().GetAsync(portMirroringId, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a WorkloadNetworkPortMirroring + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles/{portMirroringId} + /// + /// + /// Operation Id + /// WorkloadNetworks_GetPortMirroring + /// + /// + /// Default Api Version + /// 2023-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// ID of the NSX port mirroring profile. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetWorkloadNetworkPortMirroringProfile(string portMirroringId, CancellationToken cancellationToken = default) + { + return GetWorkloadNetworkPortMirroringProfiles().Get(portMirroringId, cancellationToken); + } + + /// Gets a collection of WorkloadNetworkPublicIPResources in the WorkloadNetwork. + /// An object representing collection of WorkloadNetworkPublicIPResources and their operations over a WorkloadNetworkPublicIPResource. + public virtual WorkloadNetworkPublicIPCollection GetWorkloadNetworkPublicIPs() + { + return GetCachedClient(client => new WorkloadNetworkPublicIPCollection(client, Id)); + } + + /// + /// Get a WorkloadNetworkPublicIP + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/publicIPs/{publicIPId} + /// + /// + /// Operation Id + /// WorkloadNetworks_GetPublicIP + /// + /// + /// Default Api Version + /// 2023-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// ID of the DNS zone. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetWorkloadNetworkPublicIPAsync(string publicIPId, CancellationToken cancellationToken = default) + { + return await GetWorkloadNetworkPublicIPs().GetAsync(publicIPId, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a WorkloadNetworkPublicIP + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/publicIPs/{publicIPId} + /// + /// + /// Operation Id + /// WorkloadNetworks_GetPublicIP + /// + /// + /// Default Api Version + /// 2023-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// ID of the DNS zone. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetWorkloadNetworkPublicIP(string publicIPId, CancellationToken cancellationToken = default) + { + return GetWorkloadNetworkPublicIPs().Get(publicIPId, cancellationToken); + } + + /// Gets a collection of WorkloadNetworkSegmentResources in the WorkloadNetwork. + /// An object representing collection of WorkloadNetworkSegmentResources and their operations over a WorkloadNetworkSegmentResource. + public virtual WorkloadNetworkSegmentCollection GetWorkloadNetworkSegments() + { + return GetCachedClient(client => new WorkloadNetworkSegmentCollection(client, Id)); + } + + /// + /// Get a WorkloadNetworkSegment + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments/{segmentId} + /// + /// + /// Operation Id + /// WorkloadNetworks_GetSegment + /// + /// + /// Default Api Version + /// 2023-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The ID of the NSX Segment. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetWorkloadNetworkSegmentAsync(string segmentId, CancellationToken cancellationToken = default) + { + return await GetWorkloadNetworkSegments().GetAsync(segmentId, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a WorkloadNetworkSegment + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments/{segmentId} + /// + /// + /// Operation Id + /// WorkloadNetworks_GetSegment + /// + /// + /// Default Api Version + /// 2023-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The ID of the NSX Segment. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetWorkloadNetworkSegment(string segmentId, CancellationToken cancellationToken = default) + { + return GetWorkloadNetworkSegments().Get(segmentId, cancellationToken); + } + + /// Gets a collection of WorkloadNetworkVirtualMachineResources in the WorkloadNetwork. + /// An object representing collection of WorkloadNetworkVirtualMachineResources and their operations over a WorkloadNetworkVirtualMachineResource. + public virtual WorkloadNetworkVirtualMachineCollection GetWorkloadNetworkVirtualMachines() + { + return GetCachedClient(client => new WorkloadNetworkVirtualMachineCollection(client, Id)); + } + + /// + /// Get a WorkloadNetworkVirtualMachine + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/virtualMachines/{virtualMachineId} + /// + /// + /// Operation Id + /// WorkloadNetworks_GetVirtualMachine + /// + /// + /// Default Api Version + /// 2023-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// ID of the virtual machine. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetWorkloadNetworkVirtualMachineAsync(string virtualMachineId, CancellationToken cancellationToken = default) + { + return await GetWorkloadNetworkVirtualMachines().GetAsync(virtualMachineId, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a WorkloadNetworkVirtualMachine + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/virtualMachines/{virtualMachineId} + /// + /// + /// Operation Id + /// WorkloadNetworks_GetVirtualMachine + /// + /// + /// Default Api Version + /// 2023-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// ID of the virtual machine. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetWorkloadNetworkVirtualMachine(string virtualMachineId, CancellationToken cancellationToken = default) + { + return GetWorkloadNetworkVirtualMachines().Get(virtualMachineId, cancellationToken); + } + + /// Gets a collection of WorkloadNetworkVmGroupResources in the WorkloadNetwork. + /// An object representing collection of WorkloadNetworkVmGroupResources and their operations over a WorkloadNetworkVmGroupResource. + public virtual WorkloadNetworkVmGroupCollection GetWorkloadNetworkVmGroups() + { + return GetCachedClient(client => new WorkloadNetworkVmGroupCollection(client, Id)); + } + + /// + /// Get a WorkloadNetworkVMGroup + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups/{vmGroupId} + /// + /// + /// Operation Id + /// WorkloadNetworks_GetVmGroup + /// + /// + /// Default Api Version + /// 2023-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// ID of the VM group. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetWorkloadNetworkVmGroupAsync(string vmGroupId, CancellationToken cancellationToken = default) + { + return await GetWorkloadNetworkVmGroups().GetAsync(vmGroupId, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a WorkloadNetworkVMGroup + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups/{vmGroupId} + /// + /// + /// Operation Id + /// WorkloadNetworks_GetVmGroup + /// + /// + /// Default Api Version + /// 2023-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// ID of the VM group. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetWorkloadNetworkVmGroup(string vmGroupId, CancellationToken cancellationToken = default) + { + return GetWorkloadNetworkVmGroups().Get(vmGroupId, cancellationToken); + } + /// - /// Get a private cloud workload network. + /// Get a WorkloadNetwork /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default /// /// /// Operation Id @@ -102,7 +721,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -117,7 +736,7 @@ public virtual async Task> GetAsync(Cancellati scope.Start(); try { - var response = await _workloadNetworkRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var response = await _workloadNetworkRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new WorkloadNetworkResource(Client, response.Value), response.GetRawResponse()); @@ -130,11 +749,11 @@ public virtual async Task> GetAsync(Cancellati } /// - /// Get a private cloud workload network. + /// Get a WorkloadNetwork /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default /// /// /// Operation Id @@ -142,7 +761,7 @@ public virtual async Task> GetAsync(Cancellati /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -157,7 +776,7 @@ public virtual Response Get(CancellationToken cancellat scope.Start(); try { - var response = _workloadNetworkRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var response = _workloadNetworkRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new WorkloadNetworkResource(Client, response.Value), response.GetRawResponse()); diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkSegmentCollection.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkSegmentCollection.cs index 652f8f6f7d8b..709693035537 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkSegmentCollection.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkSegmentCollection.cs @@ -19,8 +19,8 @@ namespace Azure.ResourceManager.Avs { /// /// A class representing a collection of and their operations. - /// Each in the collection will belong to the same instance of . - /// To get a instance call the GetWorkloadNetworkSegments method from an instance of . + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetWorkloadNetworkSegments method from an instance of . /// public partial class WorkloadNetworkSegmentCollection : ArmCollection, IEnumerable, IAsyncEnumerable { @@ -47,12 +47,12 @@ internal WorkloadNetworkSegmentCollection(ArmClient client, ResourceIdentifier i internal static void ValidateResourceId(ResourceIdentifier id) { - if (id.ResourceType != AvsPrivateCloudResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, AvsPrivateCloudResource.ResourceType), nameof(id)); + if (id.ResourceType != WorkloadNetworkResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, WorkloadNetworkResource.ResourceType), nameof(id)); } /// - /// Create a segment by id in a private cloud workload network. + /// Create a WorkloadNetworkSegment /// /// /// Request Path @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -73,8 +73,8 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// NSX Segment identifier. Generally the same as the Segment's display name. - /// NSX Segment. + /// The ID of the NSX Segment. + /// Resource create parameters. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// or is null. @@ -87,8 +87,8 @@ public virtual async Task> CreateOr scope.Start(); try { - var response = await _workloadNetworkSegmentWorkloadNetworksRestClient.CreateSegmentsAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, segmentId, data, cancellationToken).ConfigureAwait(false); - var operation = new AvsArmOperation(new WorkloadNetworkSegmentOperationSource(Client), _workloadNetworkSegmentWorkloadNetworksClientDiagnostics, Pipeline, _workloadNetworkSegmentWorkloadNetworksRestClient.CreateCreateSegmentsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, segmentId, data).Request, response, OperationFinalStateVia.Location); + var response = await _workloadNetworkSegmentWorkloadNetworksRestClient.CreateSegmentsAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, segmentId, data, cancellationToken).ConfigureAwait(false); + var operation = new AvsArmOperation(new WorkloadNetworkSegmentOperationSource(Client), _workloadNetworkSegmentWorkloadNetworksClientDiagnostics, Pipeline, _workloadNetworkSegmentWorkloadNetworksRestClient.CreateCreateSegmentsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, segmentId, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -101,7 +101,7 @@ public virtual async Task> CreateOr } /// - /// Create a segment by id in a private cloud workload network. + /// Create a WorkloadNetworkSegment /// /// /// Request Path @@ -113,7 +113,7 @@ public virtual async Task> CreateOr /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -122,8 +122,8 @@ public virtual async Task> CreateOr /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// NSX Segment identifier. Generally the same as the Segment's display name. - /// NSX Segment. + /// The ID of the NSX Segment. + /// Resource create parameters. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// or is null. @@ -136,8 +136,8 @@ public virtual ArmOperation CreateOrUpdate(WaitU scope.Start(); try { - var response = _workloadNetworkSegmentWorkloadNetworksRestClient.CreateSegments(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, segmentId, data, cancellationToken); - var operation = new AvsArmOperation(new WorkloadNetworkSegmentOperationSource(Client), _workloadNetworkSegmentWorkloadNetworksClientDiagnostics, Pipeline, _workloadNetworkSegmentWorkloadNetworksRestClient.CreateCreateSegmentsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, segmentId, data).Request, response, OperationFinalStateVia.Location); + var response = _workloadNetworkSegmentWorkloadNetworksRestClient.CreateSegments(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, segmentId, data, cancellationToken); + var operation = new AvsArmOperation(new WorkloadNetworkSegmentOperationSource(Client), _workloadNetworkSegmentWorkloadNetworksClientDiagnostics, Pipeline, _workloadNetworkSegmentWorkloadNetworksRestClient.CreateCreateSegmentsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, segmentId, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -150,7 +150,7 @@ public virtual ArmOperation CreateOrUpdate(WaitU } /// - /// Get a segment by id in a private cloud workload network. + /// Get a WorkloadNetworkSegment /// /// /// Request Path @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitU /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -170,7 +170,7 @@ public virtual ArmOperation CreateOrUpdate(WaitU /// /// /// - /// NSX Segment identifier. Generally the same as the Segment's display name. + /// The ID of the NSX Segment. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -182,7 +182,7 @@ public virtual async Task> GetAsync(str scope.Start(); try { - var response = await _workloadNetworkSegmentWorkloadNetworksRestClient.GetSegmentAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, segmentId, cancellationToken).ConfigureAwait(false); + var response = await _workloadNetworkSegmentWorkloadNetworksRestClient.GetSegmentAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, segmentId, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new WorkloadNetworkSegmentResource(Client, response.Value), response.GetRawResponse()); @@ -195,7 +195,7 @@ public virtual async Task> GetAsync(str } /// - /// Get a segment by id in a private cloud workload network. + /// Get a WorkloadNetworkSegment /// /// /// Request Path @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(str /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -215,7 +215,7 @@ public virtual async Task> GetAsync(str /// /// /// - /// NSX Segment identifier. Generally the same as the Segment's display name. + /// The ID of the NSX Segment. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -227,7 +227,7 @@ public virtual Response Get(string segmentId, Ca scope.Start(); try { - var response = _workloadNetworkSegmentWorkloadNetworksRestClient.GetSegment(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, segmentId, cancellationToken); + var response = _workloadNetworkSegmentWorkloadNetworksRestClient.GetSegment(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, segmentId, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new WorkloadNetworkSegmentResource(Client, response.Value), response.GetRawResponse()); @@ -240,7 +240,7 @@ public virtual Response Get(string segmentId, Ca } /// - /// List of segments in a private cloud workload network. + /// List WorkloadNetworkSegment resources by WorkloadNetwork /// /// /// Request Path @@ -252,7 +252,7 @@ public virtual Response Get(string segmentId, Ca /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -264,13 +264,13 @@ public virtual Response Get(string segmentId, Ca /// An async collection of that may take multiple service requests to iterate over. public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _workloadNetworkSegmentWorkloadNetworksRestClient.CreateListSegmentsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _workloadNetworkSegmentWorkloadNetworksRestClient.CreateListSegmentsNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage FirstPageRequest(int? pageSizeHint) => _workloadNetworkSegmentWorkloadNetworksRestClient.CreateListSegmentsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _workloadNetworkSegmentWorkloadNetworksRestClient.CreateListSegmentsNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name); return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new WorkloadNetworkSegmentResource(Client, WorkloadNetworkSegmentData.DeserializeWorkloadNetworkSegmentData(e)), _workloadNetworkSegmentWorkloadNetworksClientDiagnostics, Pipeline, "WorkloadNetworkSegmentCollection.GetAll", "value", "nextLink", cancellationToken); } /// - /// List of segments in a private cloud workload network. + /// List WorkloadNetworkSegment resources by WorkloadNetwork /// /// /// Request Path @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(Cancell /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -294,8 +294,8 @@ public virtual AsyncPageable GetAllAsync(Cancell /// A collection of that may take multiple service requests to iterate over. public virtual Pageable GetAll(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _workloadNetworkSegmentWorkloadNetworksRestClient.CreateListSegmentsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _workloadNetworkSegmentWorkloadNetworksRestClient.CreateListSegmentsNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage FirstPageRequest(int? pageSizeHint) => _workloadNetworkSegmentWorkloadNetworksRestClient.CreateListSegmentsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _workloadNetworkSegmentWorkloadNetworksRestClient.CreateListSegmentsNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name); return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new WorkloadNetworkSegmentResource(Client, WorkloadNetworkSegmentData.DeserializeWorkloadNetworkSegmentData(e)), _workloadNetworkSegmentWorkloadNetworksClientDiagnostics, Pipeline, "WorkloadNetworkSegmentCollection.GetAll", "value", "nextLink", cancellationToken); } @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -320,7 +320,7 @@ public virtual Pageable GetAll(CancellationToken /// /// /// - /// NSX Segment identifier. Generally the same as the Segment's display name. + /// The ID of the NSX Segment. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -332,7 +332,7 @@ public virtual async Task> ExistsAsync(string segmentId, Cancella scope.Start(); try { - var response = await _workloadNetworkSegmentWorkloadNetworksRestClient.GetSegmentAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, segmentId, cancellationToken: cancellationToken).ConfigureAwait(false); + var response = await _workloadNetworkSegmentWorkloadNetworksRestClient.GetSegmentAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, segmentId, cancellationToken: cancellationToken).ConfigureAwait(false); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string segmentId, Cancella /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -363,7 +363,7 @@ public virtual async Task> ExistsAsync(string segmentId, Cancella /// /// /// - /// NSX Segment identifier. Generally the same as the Segment's display name. + /// The ID of the NSX Segment. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -375,7 +375,7 @@ public virtual Response Exists(string segmentId, CancellationToken cancell scope.Start(); try { - var response = _workloadNetworkSegmentWorkloadNetworksRestClient.GetSegment(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, segmentId, cancellationToken: cancellationToken); + var response = _workloadNetworkSegmentWorkloadNetworksRestClient.GetSegment(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, segmentId, cancellationToken: cancellationToken); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -398,7 +398,7 @@ public virtual Response Exists(string segmentId, CancellationToken cancell /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -406,7 +406,7 @@ public virtual Response Exists(string segmentId, CancellationToken cancell /// /// /// - /// NSX Segment identifier. Generally the same as the Segment's display name. + /// The ID of the NSX Segment. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -418,7 +418,7 @@ public virtual async Task> GetI scope.Start(); try { - var response = await _workloadNetworkSegmentWorkloadNetworksRestClient.GetSegmentAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, segmentId, cancellationToken: cancellationToken).ConfigureAwait(false); + var response = await _workloadNetworkSegmentWorkloadNetworksRestClient.GetSegmentAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, segmentId, cancellationToken: cancellationToken).ConfigureAwait(false); if (response.Value == null) return new NoValueResponse(response.GetRawResponse()); return Response.FromValue(new WorkloadNetworkSegmentResource(Client, response.Value), response.GetRawResponse()); @@ -443,7 +443,7 @@ public virtual async Task> GetI /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -451,7 +451,7 @@ public virtual async Task> GetI /// /// /// - /// NSX Segment identifier. Generally the same as the Segment's display name. + /// The ID of the NSX Segment. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -463,7 +463,7 @@ public virtual NullableResponse GetIfExists(stri scope.Start(); try { - var response = _workloadNetworkSegmentWorkloadNetworksRestClient.GetSegment(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, segmentId, cancellationToken: cancellationToken); + var response = _workloadNetworkSegmentWorkloadNetworksRestClient.GetSegment(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, segmentId, cancellationToken: cancellationToken); if (response.Value == null) return new NoValueResponse(response.GetRawResponse()); return Response.FromValue(new WorkloadNetworkSegmentResource(Client, response.Value), response.GetRawResponse()); diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkSegmentResource.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkSegmentResource.cs index 0c9106915a20..3c08f7004840 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkSegmentResource.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkSegmentResource.cs @@ -18,7 +18,7 @@ namespace Azure.ResourceManager.Avs /// A Class representing a WorkloadNetworkSegment along with the instance operations that can be performed on it. /// If you have a you can construct a /// from an instance of using the GetWorkloadNetworkSegmentResource method. - /// Otherwise you can get one from its parent resource using the GetWorkloadNetworkSegment method. + /// Otherwise you can get one from its parent resource using the GetWorkloadNetworkSegment method. /// public partial class WorkloadNetworkSegmentResource : ArmResource { @@ -89,7 +89,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) } /// - /// Get a segment by id in a private cloud workload network. + /// Get a WorkloadNetworkSegment /// /// /// Request Path @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -129,7 +129,7 @@ public virtual async Task> GetAsync(Can } /// - /// Get a segment by id in a private cloud workload network. + /// Get a WorkloadNetworkSegment /// /// /// Request Path @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Can /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -169,7 +169,7 @@ public virtual Response Get(CancellationToken ca } /// - /// Delete a segment by id in a private cloud workload network. + /// Delete a WorkloadNetworkSegment /// /// /// Request Path @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken ca /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell } /// - /// Delete a segment by id in a private cloud workload network. + /// Delete a WorkloadNetworkSegment /// /// /// Request Path @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel } /// - /// Create or update a segment by id in a private cloud workload network. + /// Update a WorkloadNetworkSegment /// /// /// Request Path @@ -265,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -274,7 +274,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// NSX Segment. + /// The resource properties to be updated. /// The cancellation token to use. /// is null. public virtual async Task> UpdateAsync(WaitUntil waitUntil, WorkloadNetworkSegmentData data, CancellationToken cancellationToken = default) @@ -299,7 +299,7 @@ public virtual async Task> UpdateAs } /// - /// Create or update a segment by id in a private cloud workload network. + /// Update a WorkloadNetworkSegment /// /// /// Request Path @@ -311,7 +311,7 @@ public virtual async Task> UpdateAs /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -320,7 +320,7 @@ public virtual async Task> UpdateAs /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// NSX Segment. + /// The resource properties to be updated. /// The cancellation token to use. /// is null. public virtual ArmOperation Update(WaitUntil waitUntil, WorkloadNetworkSegmentData data, CancellationToken cancellationToken = default) diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkVirtualMachineCollection.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkVirtualMachineCollection.cs index ae5e567a2dea..9f56d645ced8 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkVirtualMachineCollection.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkVirtualMachineCollection.cs @@ -19,8 +19,8 @@ namespace Azure.ResourceManager.Avs { /// /// A class representing a collection of and their operations. - /// Each in the collection will belong to the same instance of . - /// To get a instance call the GetWorkloadNetworkVirtualMachines method from an instance of . + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetWorkloadNetworkVirtualMachines method from an instance of . /// public partial class WorkloadNetworkVirtualMachineCollection : ArmCollection, IEnumerable, IAsyncEnumerable { @@ -47,12 +47,12 @@ internal WorkloadNetworkVirtualMachineCollection(ArmClient client, ResourceIdent internal static void ValidateResourceId(ResourceIdentifier id) { - if (id.ResourceType != AvsPrivateCloudResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, AvsPrivateCloudResource.ResourceType), nameof(id)); + if (id.ResourceType != WorkloadNetworkResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, WorkloadNetworkResource.ResourceType), nameof(id)); } /// - /// Get a virtual machine by id in a private cloud workload network. + /// Get a WorkloadNetworkVirtualMachine /// /// /// Request Path @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -72,7 +72,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// - /// Virtual Machine identifier. + /// ID of the virtual machine. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -84,7 +84,7 @@ public virtual async Task> GetAs scope.Start(); try { - var response = await _workloadNetworkVirtualMachineWorkloadNetworksRestClient.GetVirtualMachineAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, virtualMachineId, cancellationToken).ConfigureAwait(false); + var response = await _workloadNetworkVirtualMachineWorkloadNetworksRestClient.GetVirtualMachineAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, virtualMachineId, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new WorkloadNetworkVirtualMachineResource(Client, response.Value), response.GetRawResponse()); @@ -97,7 +97,7 @@ public virtual async Task> GetAs } /// - /// Get a virtual machine by id in a private cloud workload network. + /// Get a WorkloadNetworkVirtualMachine /// /// /// Request Path @@ -109,7 +109,7 @@ public virtual async Task> GetAs /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -117,7 +117,7 @@ public virtual async Task> GetAs /// /// /// - /// Virtual Machine identifier. + /// ID of the virtual machine. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -129,7 +129,7 @@ public virtual Response Get(string virtua scope.Start(); try { - var response = _workloadNetworkVirtualMachineWorkloadNetworksRestClient.GetVirtualMachine(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, virtualMachineId, cancellationToken); + var response = _workloadNetworkVirtualMachineWorkloadNetworksRestClient.GetVirtualMachine(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, virtualMachineId, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new WorkloadNetworkVirtualMachineResource(Client, response.Value), response.GetRawResponse()); @@ -142,7 +142,7 @@ public virtual Response Get(string virtua } /// - /// List of virtual machines in a private cloud workload network. + /// List WorkloadNetworkVirtualMachine resources by WorkloadNetwork /// /// /// Request Path @@ -154,7 +154,7 @@ public virtual Response Get(string virtua /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -166,13 +166,13 @@ public virtual Response Get(string virtua /// An async collection of that may take multiple service requests to iterate over. public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _workloadNetworkVirtualMachineWorkloadNetworksRestClient.CreateListVirtualMachinesRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _workloadNetworkVirtualMachineWorkloadNetworksRestClient.CreateListVirtualMachinesNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage FirstPageRequest(int? pageSizeHint) => _workloadNetworkVirtualMachineWorkloadNetworksRestClient.CreateListVirtualMachinesRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _workloadNetworkVirtualMachineWorkloadNetworksRestClient.CreateListVirtualMachinesNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name); return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new WorkloadNetworkVirtualMachineResource(Client, WorkloadNetworkVirtualMachineData.DeserializeWorkloadNetworkVirtualMachineData(e)), _workloadNetworkVirtualMachineWorkloadNetworksClientDiagnostics, Pipeline, "WorkloadNetworkVirtualMachineCollection.GetAll", "value", "nextLink", cancellationToken); } /// - /// List of virtual machines in a private cloud workload network. + /// List WorkloadNetworkVirtualMachine resources by WorkloadNetwork /// /// /// Request Path @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsync( /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -196,8 +196,8 @@ public virtual AsyncPageable GetAllAsync( /// A collection of that may take multiple service requests to iterate over. public virtual Pageable GetAll(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _workloadNetworkVirtualMachineWorkloadNetworksRestClient.CreateListVirtualMachinesRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _workloadNetworkVirtualMachineWorkloadNetworksRestClient.CreateListVirtualMachinesNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage FirstPageRequest(int? pageSizeHint) => _workloadNetworkVirtualMachineWorkloadNetworksRestClient.CreateListVirtualMachinesRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _workloadNetworkVirtualMachineWorkloadNetworksRestClient.CreateListVirtualMachinesNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name); return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new WorkloadNetworkVirtualMachineResource(Client, WorkloadNetworkVirtualMachineData.DeserializeWorkloadNetworkVirtualMachineData(e)), _workloadNetworkVirtualMachineWorkloadNetworksClientDiagnostics, Pipeline, "WorkloadNetworkVirtualMachineCollection.GetAll", "value", "nextLink", cancellationToken); } @@ -214,7 +214,7 @@ public virtual Pageable GetAll(Cancellati /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -222,7 +222,7 @@ public virtual Pageable GetAll(Cancellati /// /// /// - /// Virtual Machine identifier. + /// ID of the virtual machine. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -234,7 +234,7 @@ public virtual async Task> ExistsAsync(string virtualMachineId, C scope.Start(); try { - var response = await _workloadNetworkVirtualMachineWorkloadNetworksRestClient.GetVirtualMachineAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, virtualMachineId, cancellationToken: cancellationToken).ConfigureAwait(false); + var response = await _workloadNetworkVirtualMachineWorkloadNetworksRestClient.GetVirtualMachineAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, virtualMachineId, cancellationToken: cancellationToken).ConfigureAwait(false); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string virtualMachineId, C /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -265,7 +265,7 @@ public virtual async Task> ExistsAsync(string virtualMachineId, C /// /// /// - /// Virtual Machine identifier. + /// ID of the virtual machine. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -277,7 +277,7 @@ public virtual Response Exists(string virtualMachineId, CancellationToken scope.Start(); try { - var response = _workloadNetworkVirtualMachineWorkloadNetworksRestClient.GetVirtualMachine(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, virtualMachineId, cancellationToken: cancellationToken); + var response = _workloadNetworkVirtualMachineWorkloadNetworksRestClient.GetVirtualMachine(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, virtualMachineId, cancellationToken: cancellationToken); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -300,7 +300,7 @@ public virtual Response Exists(string virtualMachineId, CancellationToken /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -308,7 +308,7 @@ public virtual Response Exists(string virtualMachineId, CancellationToken /// /// /// - /// Virtual Machine identifier. + /// ID of the virtual machine. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -320,7 +320,7 @@ public virtual async Task(response.GetRawResponse()); return Response.FromValue(new WorkloadNetworkVirtualMachineResource(Client, response.Value), response.GetRawResponse()); @@ -345,7 +345,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -353,7 +353,7 @@ public virtual async Task /// /// - /// Virtual Machine identifier. + /// ID of the virtual machine. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -365,7 +365,7 @@ public virtual NullableResponse GetIfExis scope.Start(); try { - var response = _workloadNetworkVirtualMachineWorkloadNetworksRestClient.GetVirtualMachine(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, virtualMachineId, cancellationToken: cancellationToken); + var response = _workloadNetworkVirtualMachineWorkloadNetworksRestClient.GetVirtualMachine(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, virtualMachineId, cancellationToken: cancellationToken); if (response.Value == null) return new NoValueResponse(response.GetRawResponse()); return Response.FromValue(new WorkloadNetworkVirtualMachineResource(Client, response.Value), response.GetRawResponse()); diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkVirtualMachineData.Serialization.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkVirtualMachineData.Serialization.cs index e38b007c5afd..f2eff888687f 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkVirtualMachineData.Serialization.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkVirtualMachineData.Serialization.cs @@ -39,6 +39,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } if (Optional.IsDefined(DisplayName)) { writer.WritePropertyName("displayName"u8); @@ -76,6 +81,7 @@ internal static WorkloadNetworkVirtualMachineData DeserializeWorkloadNetworkVirt string name = default; ResourceType type = default; SystemData systemData = default; + WorkloadNetworkProvisioningState? provisioningState = default; string displayName = default; WorkloadNetworkVmType? vmType = default; IDictionary serializedAdditionalRawData = default; @@ -115,6 +121,15 @@ internal static WorkloadNetworkVirtualMachineData DeserializeWorkloadNetworkVirt } foreach (var property0 in property.Value.EnumerateObject()) { + if (property0.NameEquals("provisioningState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new WorkloadNetworkProvisioningState(property0.Value.GetString()); + continue; + } if (property0.NameEquals("displayName"u8)) { displayName = property0.Value.GetString(); @@ -143,6 +158,7 @@ internal static WorkloadNetworkVirtualMachineData DeserializeWorkloadNetworkVirt name, type, systemData, + provisioningState, displayName, vmType, serializedAdditionalRawData); diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkVirtualMachineData.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkVirtualMachineData.cs index f3336e9b2ccf..a5d4048fab6c 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkVirtualMachineData.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkVirtualMachineData.cs @@ -61,16 +61,20 @@ public WorkloadNetworkVirtualMachineData() /// The name. /// The resourceType. /// The systemData. + /// The provisioning state of the resource. /// Display name of the VM. /// Virtual machine type. /// Keeps track of any properties unknown to the library. - internal WorkloadNetworkVirtualMachineData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string displayName, WorkloadNetworkVmType? vmType, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal WorkloadNetworkVirtualMachineData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, WorkloadNetworkProvisioningState? provisioningState, string displayName, WorkloadNetworkVmType? vmType, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { + ProvisioningState = provisioningState; DisplayName = displayName; VmType = vmType; _serializedAdditionalRawData = serializedAdditionalRawData; } + /// The provisioning state of the resource. + public WorkloadNetworkProvisioningState? ProvisioningState { get; } /// Display name of the VM. public string DisplayName { get; set; } /// Virtual machine type. diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkVirtualMachineResource.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkVirtualMachineResource.cs index e11d9495f7d5..7415445af749 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkVirtualMachineResource.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkVirtualMachineResource.cs @@ -18,7 +18,7 @@ namespace Azure.ResourceManager.Avs /// A Class representing a WorkloadNetworkVirtualMachine along with the instance operations that can be performed on it. /// If you have a you can construct a /// from an instance of using the GetWorkloadNetworkVirtualMachineResource method. - /// Otherwise you can get one from its parent resource using the GetWorkloadNetworkVirtualMachine method. + /// Otherwise you can get one from its parent resource using the GetWorkloadNetworkVirtualMachine method. /// public partial class WorkloadNetworkVirtualMachineResource : ArmResource { @@ -89,7 +89,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) } /// - /// Get a virtual machine by id in a private cloud workload network. + /// Get a WorkloadNetworkVirtualMachine /// /// /// Request Path @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -129,7 +129,7 @@ public virtual async Task> GetAs } /// - /// Get a virtual machine by id in a private cloud workload network. + /// Get a WorkloadNetworkVirtualMachine /// /// /// Request Path @@ -141,7 +141,7 @@ public virtual async Task> GetAs /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkVmGroupCollection.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkVmGroupCollection.cs index 0a752d93fba3..314428342cb9 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkVmGroupCollection.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkVmGroupCollection.cs @@ -19,8 +19,8 @@ namespace Azure.ResourceManager.Avs { /// /// A class representing a collection of and their operations. - /// Each in the collection will belong to the same instance of . - /// To get a instance call the GetWorkloadNetworkVmGroups method from an instance of . + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetWorkloadNetworkVmGroups method from an instance of . /// public partial class WorkloadNetworkVmGroupCollection : ArmCollection, IEnumerable, IAsyncEnumerable { @@ -47,12 +47,12 @@ internal WorkloadNetworkVmGroupCollection(ArmClient client, ResourceIdentifier i internal static void ValidateResourceId(ResourceIdentifier id) { - if (id.ResourceType != AvsPrivateCloudResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, AvsPrivateCloudResource.ResourceType), nameof(id)); + if (id.ResourceType != WorkloadNetworkResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, WorkloadNetworkResource.ResourceType), nameof(id)); } /// - /// Create a vm group by id in a private cloud workload network. + /// Create a WorkloadNetworkVMGroup /// /// /// Request Path @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -73,8 +73,8 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// NSX VM Group identifier. Generally the same as the VM Group's display name. - /// NSX VM Group. + /// ID of the VM group. + /// Resource create parameters. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// or is null. @@ -87,8 +87,8 @@ public virtual async Task> CreateOr scope.Start(); try { - var response = await _workloadNetworkVmGroupWorkloadNetworksRestClient.CreateVmGroupAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, vmGroupId, data, cancellationToken).ConfigureAwait(false); - var operation = new AvsArmOperation(new WorkloadNetworkVmGroupOperationSource(Client), _workloadNetworkVmGroupWorkloadNetworksClientDiagnostics, Pipeline, _workloadNetworkVmGroupWorkloadNetworksRestClient.CreateCreateVmGroupRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, vmGroupId, data).Request, response, OperationFinalStateVia.Location); + var response = await _workloadNetworkVmGroupWorkloadNetworksRestClient.CreateVmGroupAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, vmGroupId, data, cancellationToken).ConfigureAwait(false); + var operation = new AvsArmOperation(new WorkloadNetworkVmGroupOperationSource(Client), _workloadNetworkVmGroupWorkloadNetworksClientDiagnostics, Pipeline, _workloadNetworkVmGroupWorkloadNetworksRestClient.CreateCreateVmGroupRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, vmGroupId, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -101,7 +101,7 @@ public virtual async Task> CreateOr } /// - /// Create a vm group by id in a private cloud workload network. + /// Create a WorkloadNetworkVMGroup /// /// /// Request Path @@ -113,7 +113,7 @@ public virtual async Task> CreateOr /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -122,8 +122,8 @@ public virtual async Task> CreateOr /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// NSX VM Group identifier. Generally the same as the VM Group's display name. - /// NSX VM Group. + /// ID of the VM group. + /// Resource create parameters. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// or is null. @@ -136,8 +136,8 @@ public virtual ArmOperation CreateOrUpdate(WaitU scope.Start(); try { - var response = _workloadNetworkVmGroupWorkloadNetworksRestClient.CreateVmGroup(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, vmGroupId, data, cancellationToken); - var operation = new AvsArmOperation(new WorkloadNetworkVmGroupOperationSource(Client), _workloadNetworkVmGroupWorkloadNetworksClientDiagnostics, Pipeline, _workloadNetworkVmGroupWorkloadNetworksRestClient.CreateCreateVmGroupRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, vmGroupId, data).Request, response, OperationFinalStateVia.Location); + var response = _workloadNetworkVmGroupWorkloadNetworksRestClient.CreateVmGroup(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, vmGroupId, data, cancellationToken); + var operation = new AvsArmOperation(new WorkloadNetworkVmGroupOperationSource(Client), _workloadNetworkVmGroupWorkloadNetworksClientDiagnostics, Pipeline, _workloadNetworkVmGroupWorkloadNetworksRestClient.CreateCreateVmGroupRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, vmGroupId, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -150,7 +150,7 @@ public virtual ArmOperation CreateOrUpdate(WaitU } /// - /// Get a vm group by id in a private cloud workload network. + /// Get a WorkloadNetworkVMGroup /// /// /// Request Path @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitU /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -170,7 +170,7 @@ public virtual ArmOperation CreateOrUpdate(WaitU /// /// /// - /// NSX VM Group identifier. Generally the same as the VM Group's display name. + /// ID of the VM group. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -182,7 +182,7 @@ public virtual async Task> GetAsync(str scope.Start(); try { - var response = await _workloadNetworkVmGroupWorkloadNetworksRestClient.GetVmGroupAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, vmGroupId, cancellationToken).ConfigureAwait(false); + var response = await _workloadNetworkVmGroupWorkloadNetworksRestClient.GetVmGroupAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, vmGroupId, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new WorkloadNetworkVmGroupResource(Client, response.Value), response.GetRawResponse()); @@ -195,7 +195,7 @@ public virtual async Task> GetAsync(str } /// - /// Get a vm group by id in a private cloud workload network. + /// Get a WorkloadNetworkVMGroup /// /// /// Request Path @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(str /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -215,7 +215,7 @@ public virtual async Task> GetAsync(str /// /// /// - /// NSX VM Group identifier. Generally the same as the VM Group's display name. + /// ID of the VM group. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -227,7 +227,7 @@ public virtual Response Get(string vmGroupId, Ca scope.Start(); try { - var response = _workloadNetworkVmGroupWorkloadNetworksRestClient.GetVmGroup(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, vmGroupId, cancellationToken); + var response = _workloadNetworkVmGroupWorkloadNetworksRestClient.GetVmGroup(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, vmGroupId, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new WorkloadNetworkVmGroupResource(Client, response.Value), response.GetRawResponse()); @@ -240,7 +240,7 @@ public virtual Response Get(string vmGroupId, Ca } /// - /// List of vm groups in a private cloud workload network. + /// List WorkloadNetworkVMGroup resources by WorkloadNetwork /// /// /// Request Path @@ -252,7 +252,7 @@ public virtual Response Get(string vmGroupId, Ca /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -264,13 +264,13 @@ public virtual Response Get(string vmGroupId, Ca /// An async collection of that may take multiple service requests to iterate over. public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _workloadNetworkVmGroupWorkloadNetworksRestClient.CreateListVmGroupsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _workloadNetworkVmGroupWorkloadNetworksRestClient.CreateListVmGroupsNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage FirstPageRequest(int? pageSizeHint) => _workloadNetworkVmGroupWorkloadNetworksRestClient.CreateListVmGroupsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _workloadNetworkVmGroupWorkloadNetworksRestClient.CreateListVmGroupsNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name); return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new WorkloadNetworkVmGroupResource(Client, WorkloadNetworkVmGroupData.DeserializeWorkloadNetworkVmGroupData(e)), _workloadNetworkVmGroupWorkloadNetworksClientDiagnostics, Pipeline, "WorkloadNetworkVmGroupCollection.GetAll", "value", "nextLink", cancellationToken); } /// - /// List of vm groups in a private cloud workload network. + /// List WorkloadNetworkVMGroup resources by WorkloadNetwork /// /// /// Request Path @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(Cancell /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -294,8 +294,8 @@ public virtual AsyncPageable GetAllAsync(Cancell /// A collection of that may take multiple service requests to iterate over. public virtual Pageable GetAll(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _workloadNetworkVmGroupWorkloadNetworksRestClient.CreateListVmGroupsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _workloadNetworkVmGroupWorkloadNetworksRestClient.CreateListVmGroupsNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage FirstPageRequest(int? pageSizeHint) => _workloadNetworkVmGroupWorkloadNetworksRestClient.CreateListVmGroupsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _workloadNetworkVmGroupWorkloadNetworksRestClient.CreateListVmGroupsNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name); return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new WorkloadNetworkVmGroupResource(Client, WorkloadNetworkVmGroupData.DeserializeWorkloadNetworkVmGroupData(e)), _workloadNetworkVmGroupWorkloadNetworksClientDiagnostics, Pipeline, "WorkloadNetworkVmGroupCollection.GetAll", "value", "nextLink", cancellationToken); } @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -320,7 +320,7 @@ public virtual Pageable GetAll(CancellationToken /// /// /// - /// NSX VM Group identifier. Generally the same as the VM Group's display name. + /// ID of the VM group. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -332,7 +332,7 @@ public virtual async Task> ExistsAsync(string vmGroupId, Cancella scope.Start(); try { - var response = await _workloadNetworkVmGroupWorkloadNetworksRestClient.GetVmGroupAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, vmGroupId, cancellationToken: cancellationToken).ConfigureAwait(false); + var response = await _workloadNetworkVmGroupWorkloadNetworksRestClient.GetVmGroupAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, vmGroupId, cancellationToken: cancellationToken).ConfigureAwait(false); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string vmGroupId, Cancella /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -363,7 +363,7 @@ public virtual async Task> ExistsAsync(string vmGroupId, Cancella /// /// /// - /// NSX VM Group identifier. Generally the same as the VM Group's display name. + /// ID of the VM group. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -375,7 +375,7 @@ public virtual Response Exists(string vmGroupId, CancellationToken cancell scope.Start(); try { - var response = _workloadNetworkVmGroupWorkloadNetworksRestClient.GetVmGroup(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, vmGroupId, cancellationToken: cancellationToken); + var response = _workloadNetworkVmGroupWorkloadNetworksRestClient.GetVmGroup(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, vmGroupId, cancellationToken: cancellationToken); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -398,7 +398,7 @@ public virtual Response Exists(string vmGroupId, CancellationToken cancell /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -406,7 +406,7 @@ public virtual Response Exists(string vmGroupId, CancellationToken cancell /// /// /// - /// NSX VM Group identifier. Generally the same as the VM Group's display name. + /// ID of the VM group. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -418,7 +418,7 @@ public virtual async Task> GetI scope.Start(); try { - var response = await _workloadNetworkVmGroupWorkloadNetworksRestClient.GetVmGroupAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, vmGroupId, cancellationToken: cancellationToken).ConfigureAwait(false); + var response = await _workloadNetworkVmGroupWorkloadNetworksRestClient.GetVmGroupAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, vmGroupId, cancellationToken: cancellationToken).ConfigureAwait(false); if (response.Value == null) return new NoValueResponse(response.GetRawResponse()); return Response.FromValue(new WorkloadNetworkVmGroupResource(Client, response.Value), response.GetRawResponse()); @@ -443,7 +443,7 @@ public virtual async Task> GetI /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -451,7 +451,7 @@ public virtual async Task> GetI /// /// /// - /// NSX VM Group identifier. Generally the same as the VM Group's display name. + /// ID of the VM group. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -463,7 +463,7 @@ public virtual NullableResponse GetIfExists(stri scope.Start(); try { - var response = _workloadNetworkVmGroupWorkloadNetworksRestClient.GetVmGroup(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, vmGroupId, cancellationToken: cancellationToken); + var response = _workloadNetworkVmGroupWorkloadNetworksRestClient.GetVmGroup(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, vmGroupId, cancellationToken: cancellationToken); if (response.Value == null) return new NoValueResponse(response.GetRawResponse()); return Response.FromValue(new WorkloadNetworkVmGroupResource(Client, response.Value), response.GetRawResponse()); diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkVmGroupResource.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkVmGroupResource.cs index 045d1b227cef..33a3c394eae2 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkVmGroupResource.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkVmGroupResource.cs @@ -18,7 +18,7 @@ namespace Azure.ResourceManager.Avs /// A Class representing a WorkloadNetworkVmGroup along with the instance operations that can be performed on it. /// If you have a you can construct a /// from an instance of using the GetWorkloadNetworkVmGroupResource method. - /// Otherwise you can get one from its parent resource using the GetWorkloadNetworkVmGroup method. + /// Otherwise you can get one from its parent resource using the GetWorkloadNetworkVmGroup method. /// public partial class WorkloadNetworkVmGroupResource : ArmResource { @@ -89,7 +89,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) } /// - /// Get a vm group by id in a private cloud workload network. + /// Get a WorkloadNetworkVMGroup /// /// /// Request Path @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -129,7 +129,7 @@ public virtual async Task> GetAsync(Can } /// - /// Get a vm group by id in a private cloud workload network. + /// Get a WorkloadNetworkVMGroup /// /// /// Request Path @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Can /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -169,7 +169,7 @@ public virtual Response Get(CancellationToken ca } /// - /// Delete a vm group by id in a private cloud workload network. + /// Delete a WorkloadNetworkVMGroup /// /// /// Request Path @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken ca /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell } /// - /// Delete a vm group by id in a private cloud workload network. + /// Delete a WorkloadNetworkVMGroup /// /// /// Request Path @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel } /// - /// Create or update a vm group by id in a private cloud workload network. + /// Update a WorkloadNetworkVMGroup /// /// /// Request Path @@ -265,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -274,7 +274,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// NSX VM Group. + /// The resource properties to be updated. /// The cancellation token to use. /// is null. public virtual async Task> UpdateAsync(WaitUntil waitUntil, WorkloadNetworkVmGroupData data, CancellationToken cancellationToken = default) @@ -299,7 +299,7 @@ public virtual async Task> UpdateAs } /// - /// Create or update a vm group by id in a private cloud workload network. + /// Update a WorkloadNetworkVMGroup /// /// /// Request Path @@ -311,7 +311,7 @@ public virtual async Task> UpdateAs /// /// /// Default Api Version - /// 2023-03-01 + /// 2023-09-01 /// /// /// Resource @@ -320,7 +320,7 @@ public virtual async Task> UpdateAs /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// NSX VM Group. + /// The resource properties to be updated. /// The cancellation token to use. /// is null. public virtual ArmOperation Update(WaitUntil waitUntil, WorkloadNetworkVmGroupData data, CancellationToken cancellationToken = default) diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/autorest.md b/sdk/avs/Azure.ResourceManager.Avs/src/autorest.md index d8f4cb3cec2c..01f4017e3eb2 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/autorest.md +++ b/sdk/avs/Azure.ResourceManager.Avs/src/autorest.md @@ -8,8 +8,8 @@ azure-arm: true csharp: true library-name: Avs namespace: Azure.ResourceManager.Avs -require: https://github.com/Azure/azure-rest-api-specs/blob/a032c2413b49d297196a0c64393e862433fccbb1/specification/vmware/resource-manager/readme.md -#tag: package-2023-03-01 +require: https://github.com/Azure/azure-rest-api-specs/blob/e19b5771846718774c0452800b9a42c251319f48/specification/vmware/resource-manager/readme.md +#tag: package-2023-09-01 output-folder: $(this-folder)/Generated clear-output-folder: true sample-gen: @@ -117,6 +117,9 @@ rename-mapping: NsxPublicIPQuotaRaisedEnum: NsxPublicIPQuotaRaisedStatus AffinityStrength: VmHostPlacementPolicyAffinityStrength ClusterZone: AvsClusterZone + CloudLinkProvisioningState: AvsCloudLinkProvisioningState + DnsZoneType : AvsDnsZoneType + VirtualMachineProvisioningState : AvsVirtualMachineProvisioningState prepend-rp-prefix: - CloudLink diff --git a/sdk/billing/Azure.ResourceManager.Billing/samples/Generated/Samples/Sample_BillingSubscriptionAliasCollection.cs b/sdk/billing/Azure.ResourceManager.Billing/samples/Generated/Samples/Sample_BillingSubscriptionAliasCollection.cs index 86a8b81f738d..0299cc1c8540 100644 --- a/sdk/billing/Azure.ResourceManager.Billing/samples/Generated/Samples/Sample_BillingSubscriptionAliasCollection.cs +++ b/sdk/billing/Azure.ResourceManager.Billing/samples/Generated/Samples/Sample_BillingSubscriptionAliasCollection.cs @@ -147,7 +147,7 @@ public async Task CreateOrUpdate_BillingSubscriptionAliasCreateOrUpdate() { BillingFrequency = "P1M", DisplayName = "Subscription 3", - Quantity = 1, + Quantity = 1L, SkuId = "0001", TermDuration = XmlConvert.ToTimeSpan("P1M"), }; diff --git a/sdk/billing/Azure.ResourceManager.Billing/samples/Generated/Samples/Sample_BillingSubscriptionAliasResource.cs b/sdk/billing/Azure.ResourceManager.Billing/samples/Generated/Samples/Sample_BillingSubscriptionAliasResource.cs index 9dd18b58dddf..0d575377664f 100644 --- a/sdk/billing/Azure.ResourceManager.Billing/samples/Generated/Samples/Sample_BillingSubscriptionAliasResource.cs +++ b/sdk/billing/Azure.ResourceManager.Billing/samples/Generated/Samples/Sample_BillingSubscriptionAliasResource.cs @@ -70,7 +70,7 @@ public async Task Update_BillingSubscriptionAliasCreateOrUpdate() { BillingFrequency = "P1M", DisplayName = "Subscription 3", - Quantity = 1, + Quantity = 1L, SkuId = "0001", TermDuration = XmlConvert.ToTimeSpan("P1M"), }; diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Docs/ConversationAnalysisClient.xml b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Docs/ConversationAnalysisClient.xml index 7a682b09567a..9a307ff5dc86 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Docs/ConversationAnalysisClient.xml +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Docs/ConversationAnalysisClient.xml @@ -683,23 +683,23 @@ AnalyzeConversationOperationInput analyzeConversationOperationInput = new Analyz { WordLevelTimings = {new WordLevelTiming { - Offset = 390000, - Duration = 2700000, + Offset = 390000L, + Duration = 2700000L, Word = "good", }, new WordLevelTiming { - Offset = 4500000, - Duration = 920000, + Offset = 4500000L, + Duration = 920000L, Word = "morning", }, new WordLevelTiming { - Offset = 590000, - Duration = 2700000, + Offset = 590000L, + Duration = 2700000L, Word = "john", }, new WordLevelTiming { - Offset = 6300000, - Duration = 920000, + Offset = 6300000L, + Duration = 920000L, Word = "doe", }}, } @@ -746,23 +746,23 @@ AnalyzeConversationOperationInput analyzeConversationOperationInput = new Analyz { WordLevelTimings = {new WordLevelTiming { - Offset = 390000, - Duration = 2700000, + Offset = 390000L, + Duration = 2700000L, Word = "good", }, new WordLevelTiming { - Offset = 4500000, - Duration = 920000, + Offset = 4500000L, + Duration = 920000L, Word = "morning", }, new WordLevelTiming { - Offset = 590000, - Duration = 2700000, + Offset = 590000L, + Duration = 2700000L, Word = "john", }, new WordLevelTiming { - Offset = 6300000, - Duration = 920000, + Offset = 6300000L, + Duration = 920000L, Word = "doe", }}, } @@ -810,23 +810,23 @@ AnalyzeConversationOperationInput analyzeConversationOperationInput = new Analyz { WordLevelTimings = {new WordLevelTiming { - Offset = 390000, - Duration = 2700000, + Offset = 390000L, + Duration = 2700000L, Word = "good", }, new WordLevelTiming { - Offset = 4500000, - Duration = 920000, + Offset = 4500000L, + Duration = 920000L, Word = "morning", }, new WordLevelTiming { - Offset = 590000, - Duration = 2700000, + Offset = 590000L, + Duration = 2700000L, Word = "john", }, new WordLevelTiming { - Offset = 6300000, - Duration = 920000, + Offset = 6300000L, + Duration = 920000L, Word = "doe", }}, } @@ -873,8 +873,8 @@ AnalyzeConversationOperationInput analyzeConversationOperationInput = new Analyz { ConversationItemLevelTiming = new ConversationItemLevelTiming { - Offset = 0, - Duration = 20000000, + Offset = 0L, + Duration = 20000000L, }, }, new TranscriptConversationItem( @@ -887,8 +887,8 @@ AnalyzeConversationOperationInput analyzeConversationOperationInput = new Analyz { ConversationItemLevelTiming = new ConversationItemLevelTiming { - Offset = 20000000, - Duration = 50000000, + Offset = 20000000L, + Duration = 50000000L, }, }, new TranscriptConversationItem( @@ -901,8 +901,8 @@ AnalyzeConversationOperationInput analyzeConversationOperationInput = new Analyz { ConversationItemLevelTiming = new ConversationItemLevelTiming { - Offset = 50000000, - Duration = 60000000, + Offset = 50000000L, + Duration = 60000000L, }, } }) @@ -981,8 +981,8 @@ AnalyzeConversationOperationInput analyzeConversationOperationInput = new Analyz { ConversationItemLevelTiming = new ConversationItemLevelTiming { - Offset = 0, - Duration = 20000000, + Offset = 0L, + Duration = 20000000L, }, }, new TranscriptConversationItem( @@ -995,8 +995,8 @@ AnalyzeConversationOperationInput analyzeConversationOperationInput = new Analyz { ConversationItemLevelTiming = new ConversationItemLevelTiming { - Offset = 20000000, - Duration = 50000000, + Offset = 20000000L, + Duration = 50000000L, }, }, new TranscriptConversationItem( @@ -1009,8 +1009,8 @@ AnalyzeConversationOperationInput analyzeConversationOperationInput = new Analyz { ConversationItemLevelTiming = new ConversationItemLevelTiming { - Offset = 50000000, - Duration = 60000000, + Offset = 50000000L, + Duration = 60000000L, }, } }) @@ -1050,23 +1050,23 @@ AnalyzeConversationOperationInput analyzeConversationOperationInput = new Analyz { WordLevelTimings = {new WordLevelTiming { - Offset = 390000, - Duration = 2700000, + Offset = 390000L, + Duration = 2700000L, Word = "good", }, new WordLevelTiming { - Offset = 4500000, - Duration = 920000, + Offset = 4500000L, + Duration = 920000L, Word = "morning", }, new WordLevelTiming { - Offset = 590000, - Duration = 2700000, + Offset = 590000L, + Duration = 2700000L, Word = "john", }, new WordLevelTiming { - Offset = 6300000, - Duration = 920000, + Offset = 6300000L, + Duration = 920000L, Word = "doe", }}, } @@ -1113,23 +1113,23 @@ AnalyzeConversationOperationInput analyzeConversationOperationInput = new Analyz { WordLevelTimings = {new WordLevelTiming { - Offset = 390000, - Duration = 2700000, + Offset = 390000L, + Duration = 2700000L, Word = "good", }, new WordLevelTiming { - Offset = 4500000, - Duration = 920000, + Offset = 4500000L, + Duration = 920000L, Word = "morning", }, new WordLevelTiming { - Offset = 590000, - Duration = 2700000, + Offset = 590000L, + Duration = 2700000L, Word = "john", }, new WordLevelTiming { - Offset = 6300000, - Duration = 920000, + Offset = 6300000L, + Duration = 920000L, Word = "doe", }}, } @@ -1177,23 +1177,23 @@ AnalyzeConversationOperationInput analyzeConversationOperationInput = new Analyz { WordLevelTimings = {new WordLevelTiming { - Offset = 390000, - Duration = 2700000, + Offset = 390000L, + Duration = 2700000L, Word = "good", }, new WordLevelTiming { - Offset = 4500000, - Duration = 920000, + Offset = 4500000L, + Duration = 920000L, Word = "morning", }, new WordLevelTiming { - Offset = 590000, - Duration = 2700000, + Offset = 590000L, + Duration = 2700000L, Word = "john", }, new WordLevelTiming { - Offset = 6300000, - Duration = 920000, + Offset = 6300000L, + Duration = 920000L, Word = "doe", }}, } @@ -1240,8 +1240,8 @@ AnalyzeConversationOperationInput analyzeConversationOperationInput = new Analyz { ConversationItemLevelTiming = new ConversationItemLevelTiming { - Offset = 0, - Duration = 20000000, + Offset = 0L, + Duration = 20000000L, }, }, new TranscriptConversationItem( @@ -1254,8 +1254,8 @@ AnalyzeConversationOperationInput analyzeConversationOperationInput = new Analyz { ConversationItemLevelTiming = new ConversationItemLevelTiming { - Offset = 20000000, - Duration = 50000000, + Offset = 20000000L, + Duration = 50000000L, }, }, new TranscriptConversationItem( @@ -1268,8 +1268,8 @@ AnalyzeConversationOperationInput analyzeConversationOperationInput = new Analyz { ConversationItemLevelTiming = new ConversationItemLevelTiming { - Offset = 50000000, - Duration = 60000000, + Offset = 50000000L, + Duration = 60000000L, }, } }) @@ -1348,8 +1348,8 @@ AnalyzeConversationOperationInput analyzeConversationOperationInput = new Analyz { ConversationItemLevelTiming = new ConversationItemLevelTiming { - Offset = 0, - Duration = 20000000, + Offset = 0L, + Duration = 20000000L, }, }, new TranscriptConversationItem( @@ -1362,8 +1362,8 @@ AnalyzeConversationOperationInput analyzeConversationOperationInput = new Analyz { ConversationItemLevelTiming = new ConversationItemLevelTiming { - Offset = 20000000, - Duration = 50000000, + Offset = 20000000L, + Duration = 50000000L, }, }, new TranscriptConversationItem( @@ -1376,8 +1376,8 @@ AnalyzeConversationOperationInput analyzeConversationOperationInput = new Analyz { ConversationItemLevelTiming = new ConversationItemLevelTiming { - Offset = 50000000, - Duration = 60000000, + Offset = 50000000L, + Duration = 60000000L, }, } }) @@ -1431,26 +1431,26 @@ using RequestContent content = RequestContent.Create(new new { word = "good", - offset = 390000, - duration = 2700000, + offset = 390000L, + duration = 2700000L, }, new { word = "morning", - offset = 4500000, - duration = 920000, + offset = 4500000L, + duration = 920000L, }, new { word = "john", - offset = 590000, - duration = 2700000, + offset = 590000L, + duration = 2700000L, }, new { word = "doe", - offset = 6300000, - duration = 920000, + offset = 6300000L, + duration = 920000L, } }, } @@ -1513,26 +1513,26 @@ using RequestContent content = RequestContent.Create(new new { word = "good", - offset = 390000, - duration = 2700000, + offset = 390000L, + duration = 2700000L, }, new { word = "morning", - offset = 4500000, - duration = 920000, + offset = 4500000L, + duration = 920000L, }, new { word = "john", - offset = 590000, - duration = 2700000, + offset = 590000L, + duration = 2700000L, }, new { word = "doe", - offset = 6300000, - duration = 920000, + offset = 6300000L, + duration = 920000L, } }, } @@ -1596,26 +1596,26 @@ using RequestContent content = RequestContent.Create(new new { word = "good", - offset = 390000, - duration = 2700000, + offset = 390000L, + duration = 2700000L, }, new { word = "morning", - offset = 4500000, - duration = 920000, + offset = 4500000L, + duration = 920000L, }, new { word = "john", - offset = 590000, - duration = 2700000, + offset = 590000L, + duration = 2700000L, }, new { word = "doe", - offset = 6300000, - duration = 920000, + offset = 6300000L, + duration = 920000L, } }, } @@ -1674,8 +1674,8 @@ using RequestContent content = RequestContent.Create(new maskedItn = "", conversationItemLevelTiming = new { - offset = 0, - duration = 20000000, + offset = 0L, + duration = 20000000L, }, }, new @@ -1688,8 +1688,8 @@ using RequestContent content = RequestContent.Create(new maskedItn = "", conversationItemLevelTiming = new { - offset = 20000000, - duration = 50000000, + offset = 20000000L, + duration = 50000000L, }, }, new @@ -1702,8 +1702,8 @@ using RequestContent content = RequestContent.Create(new maskedItn = "", conversationItemLevelTiming = new { - offset = 50000000, - duration = 60000000, + offset = 50000000L, + duration = 60000000L, }, } }, @@ -1825,8 +1825,8 @@ using RequestContent content = RequestContent.Create(new maskedItn = "", conversationItemLevelTiming = new { - offset = 0, - duration = 20000000, + offset = 0L, + duration = 20000000L, }, }, new @@ -1839,8 +1839,8 @@ using RequestContent content = RequestContent.Create(new maskedItn = "", conversationItemLevelTiming = new { - offset = 20000000, - duration = 50000000, + offset = 20000000L, + duration = 50000000L, }, }, new @@ -1853,8 +1853,8 @@ using RequestContent content = RequestContent.Create(new maskedItn = "", conversationItemLevelTiming = new { - offset = 50000000, - duration = 60000000, + offset = 50000000L, + duration = 60000000L, }, } }, @@ -1918,26 +1918,26 @@ using RequestContent content = RequestContent.Create(new new { word = "good", - offset = 390000, - duration = 2700000, + offset = 390000L, + duration = 2700000L, }, new { word = "morning", - offset = 4500000, - duration = 920000, + offset = 4500000L, + duration = 920000L, }, new { word = "john", - offset = 590000, - duration = 2700000, + offset = 590000L, + duration = 2700000L, }, new { word = "doe", - offset = 6300000, - duration = 920000, + offset = 6300000L, + duration = 920000L, } }, } @@ -2000,26 +2000,26 @@ using RequestContent content = RequestContent.Create(new new { word = "good", - offset = 390000, - duration = 2700000, + offset = 390000L, + duration = 2700000L, }, new { word = "morning", - offset = 4500000, - duration = 920000, + offset = 4500000L, + duration = 920000L, }, new { word = "john", - offset = 590000, - duration = 2700000, + offset = 590000L, + duration = 2700000L, }, new { word = "doe", - offset = 6300000, - duration = 920000, + offset = 6300000L, + duration = 920000L, } }, } @@ -2083,26 +2083,26 @@ using RequestContent content = RequestContent.Create(new new { word = "good", - offset = 390000, - duration = 2700000, + offset = 390000L, + duration = 2700000L, }, new { word = "morning", - offset = 4500000, - duration = 920000, + offset = 4500000L, + duration = 920000L, }, new { word = "john", - offset = 590000, - duration = 2700000, + offset = 590000L, + duration = 2700000L, }, new { word = "doe", - offset = 6300000, - duration = 920000, + offset = 6300000L, + duration = 920000L, } }, } @@ -2161,8 +2161,8 @@ using RequestContent content = RequestContent.Create(new maskedItn = "", conversationItemLevelTiming = new { - offset = 0, - duration = 20000000, + offset = 0L, + duration = 20000000L, }, }, new @@ -2175,8 +2175,8 @@ using RequestContent content = RequestContent.Create(new maskedItn = "", conversationItemLevelTiming = new { - offset = 20000000, - duration = 50000000, + offset = 20000000L, + duration = 50000000L, }, }, new @@ -2189,8 +2189,8 @@ using RequestContent content = RequestContent.Create(new maskedItn = "", conversationItemLevelTiming = new { - offset = 50000000, - duration = 60000000, + offset = 50000000L, + duration = 60000000L, }, } }, @@ -2312,8 +2312,8 @@ using RequestContent content = RequestContent.Create(new maskedItn = "", conversationItemLevelTiming = new { - offset = 0, - duration = 20000000, + offset = 0L, + duration = 20000000L, }, }, new @@ -2326,8 +2326,8 @@ using RequestContent content = RequestContent.Create(new maskedItn = "", conversationItemLevelTiming = new { - offset = 20000000, - duration = 50000000, + offset = 20000000L, + duration = 50000000L, }, }, new @@ -2340,8 +2340,8 @@ using RequestContent content = RequestContent.Create(new maskedItn = "", conversationItemLevelTiming = new { - offset = 50000000, - duration = 60000000, + offset = 50000000L, + duration = 60000000L, }, } }, diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/tests/Generated/Samples/Samples_ConversationAnalysisClient.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/tests/Generated/Samples/Samples_ConversationAnalysisClient.cs index 430eb2ff0123..1ba9ef786043 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/tests/Generated/Samples/Samples_ConversationAnalysisClient.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/tests/Generated/Samples/Samples_ConversationAnalysisClient.cs @@ -797,26 +797,26 @@ public void Example_Conversations_AnalyzeConversationSubmitOperation_SuccessfulC new { word = "good", -offset = 390000, -duration = 2700000, +offset = 390000L, +duration = 2700000L, }, new { word = "morning", -offset = 4500000, -duration = 920000, +offset = 4500000L, +duration = 920000L, }, new { word = "john", -offset = 590000, -duration = 2700000, +offset = 590000L, +duration = 2700000L, }, new { word = "doe", -offset = 6300000, -duration = 920000, +offset = 6300000L, +duration = 920000L, } }, } @@ -882,26 +882,26 @@ public async Task Example_Conversations_AnalyzeConversationSubmitOperation_Succe new { word = "good", -offset = 390000, -duration = 2700000, +offset = 390000L, +duration = 2700000L, }, new { word = "morning", -offset = 4500000, -duration = 920000, +offset = 4500000L, +duration = 920000L, }, new { word = "john", -offset = 590000, -duration = 2700000, +offset = 590000L, +duration = 2700000L, }, new { word = "doe", -offset = 6300000, -duration = 920000, +offset = 6300000L, +duration = 920000L, } }, } @@ -953,23 +953,23 @@ public void Example_Conversations_AnalyzeConversationSubmitOperation_SuccessfulC { WordLevelTimings = {new WordLevelTiming { -Offset = 390000, -Duration = 2700000, +Offset = 390000L, +Duration = 2700000L, Word = "good", }, new WordLevelTiming { -Offset = 4500000, -Duration = 920000, +Offset = 4500000L, +Duration = 920000L, Word = "morning", }, new WordLevelTiming { -Offset = 590000, -Duration = 2700000, +Offset = 590000L, +Duration = 2700000L, Word = "john", }, new WordLevelTiming { -Offset = 6300000, -Duration = 920000, +Offset = 6300000L, +Duration = 920000L, Word = "doe", }}, } @@ -1019,23 +1019,23 @@ public async Task Example_Conversations_AnalyzeConversationSubmitOperation_Succe { WordLevelTimings = {new WordLevelTiming { -Offset = 390000, -Duration = 2700000, +Offset = 390000L, +Duration = 2700000L, Word = "good", }, new WordLevelTiming { -Offset = 4500000, -Duration = 920000, +Offset = 4500000L, +Duration = 920000L, Word = "morning", }, new WordLevelTiming { -Offset = 590000, -Duration = 2700000, +Offset = 590000L, +Duration = 2700000L, Word = "john", }, new WordLevelTiming { -Offset = 6300000, -Duration = 920000, +Offset = 6300000L, +Duration = 920000L, Word = "doe", }}, } @@ -1099,26 +1099,26 @@ public void Example_Conversations_AnalyzeConversationSubmitOperation_SuccessfulC new { word = "good", -offset = 390000, -duration = 2700000, +offset = 390000L, +duration = 2700000L, }, new { word = "morning", -offset = 4500000, -duration = 920000, +offset = 4500000L, +duration = 920000L, }, new { word = "john", -offset = 590000, -duration = 2700000, +offset = 590000L, +duration = 2700000L, }, new { word = "doe", -offset = 6300000, -duration = 920000, +offset = 6300000L, +duration = 920000L, } }, } @@ -1185,26 +1185,26 @@ public async Task Example_Conversations_AnalyzeConversationSubmitOperation_Succe new { word = "good", -offset = 390000, -duration = 2700000, +offset = 390000L, +duration = 2700000L, }, new { word = "morning", -offset = 4500000, -duration = 920000, +offset = 4500000L, +duration = 920000L, }, new { word = "john", -offset = 590000, -duration = 2700000, +offset = 590000L, +duration = 2700000L, }, new { word = "doe", -offset = 6300000, -duration = 920000, +offset = 6300000L, +duration = 920000L, } }, } @@ -1257,23 +1257,23 @@ public void Example_Conversations_AnalyzeConversationSubmitOperation_SuccessfulC { WordLevelTimings = {new WordLevelTiming { -Offset = 390000, -Duration = 2700000, +Offset = 390000L, +Duration = 2700000L, Word = "good", }, new WordLevelTiming { -Offset = 4500000, -Duration = 920000, +Offset = 4500000L, +Duration = 920000L, Word = "morning", }, new WordLevelTiming { -Offset = 590000, -Duration = 2700000, +Offset = 590000L, +Duration = 2700000L, Word = "john", }, new WordLevelTiming { -Offset = 6300000, -Duration = 920000, +Offset = 6300000L, +Duration = 920000L, Word = "doe", }}, } @@ -1324,23 +1324,23 @@ public async Task Example_Conversations_AnalyzeConversationSubmitOperation_Succe { WordLevelTimings = {new WordLevelTiming { -Offset = 390000, -Duration = 2700000, +Offset = 390000L, +Duration = 2700000L, Word = "good", }, new WordLevelTiming { -Offset = 4500000, -Duration = 920000, +Offset = 4500000L, +Duration = 920000L, Word = "morning", }, new WordLevelTiming { -Offset = 590000, -Duration = 2700000, +Offset = 590000L, +Duration = 2700000L, Word = "john", }, new WordLevelTiming { -Offset = 6300000, -Duration = 920000, +Offset = 6300000L, +Duration = 920000L, Word = "doe", }}, } @@ -1405,26 +1405,26 @@ public void Example_Conversations_AnalyzeConversationSubmitOperation_SuccessfulC new { word = "good", -offset = 390000, -duration = 2700000, +offset = 390000L, +duration = 2700000L, }, new { word = "morning", -offset = 4500000, -duration = 920000, +offset = 4500000L, +duration = 920000L, }, new { word = "john", -offset = 590000, -duration = 2700000, +offset = 590000L, +duration = 2700000L, }, new { word = "doe", -offset = 6300000, -duration = 920000, +offset = 6300000L, +duration = 920000L, } }, } @@ -1490,26 +1490,26 @@ public async Task Example_Conversations_AnalyzeConversationSubmitOperation_Succe new { word = "good", -offset = 390000, -duration = 2700000, +offset = 390000L, +duration = 2700000L, }, new { word = "morning", -offset = 4500000, -duration = 920000, +offset = 4500000L, +duration = 920000L, }, new { word = "john", -offset = 590000, -duration = 2700000, +offset = 590000L, +duration = 2700000L, }, new { word = "doe", -offset = 6300000, -duration = 920000, +offset = 6300000L, +duration = 920000L, } }, } @@ -1561,23 +1561,23 @@ public void Example_Conversations_AnalyzeConversationSubmitOperation_SuccessfulC { WordLevelTimings = {new WordLevelTiming { -Offset = 390000, -Duration = 2700000, +Offset = 390000L, +Duration = 2700000L, Word = "good", }, new WordLevelTiming { -Offset = 4500000, -Duration = 920000, +Offset = 4500000L, +Duration = 920000L, Word = "morning", }, new WordLevelTiming { -Offset = 590000, -Duration = 2700000, +Offset = 590000L, +Duration = 2700000L, Word = "john", }, new WordLevelTiming { -Offset = 6300000, -Duration = 920000, +Offset = 6300000L, +Duration = 920000L, Word = "doe", }}, } @@ -1627,23 +1627,23 @@ public async Task Example_Conversations_AnalyzeConversationSubmitOperation_Succe { WordLevelTimings = {new WordLevelTiming { -Offset = 390000, -Duration = 2700000, +Offset = 390000L, +Duration = 2700000L, Word = "good", }, new WordLevelTiming { -Offset = 4500000, -Duration = 920000, +Offset = 4500000L, +Duration = 920000L, Word = "morning", }, new WordLevelTiming { -Offset = 590000, -Duration = 2700000, +Offset = 590000L, +Duration = 2700000L, Word = "john", }, new WordLevelTiming { -Offset = 6300000, -Duration = 920000, +Offset = 6300000L, +Duration = 920000L, Word = "doe", }}, } @@ -1703,8 +1703,8 @@ public void Example_Conversations_AnalyzeConversationSubmitOperation_SuccessfulC maskedItn = "", conversationItemLevelTiming = new { -offset = 0, -duration = 20000000, +offset = 0L, +duration = 20000000L, }, }, new @@ -1717,8 +1717,8 @@ public void Example_Conversations_AnalyzeConversationSubmitOperation_SuccessfulC maskedItn = "", conversationItemLevelTiming = new { -offset = 20000000, -duration = 50000000, +offset = 20000000L, +duration = 50000000L, }, }, new @@ -1731,8 +1731,8 @@ public void Example_Conversations_AnalyzeConversationSubmitOperation_SuccessfulC maskedItn = "", conversationItemLevelTiming = new { -offset = 50000000, -duration = 60000000, +offset = 50000000L, +duration = 60000000L, }, } }, @@ -1791,8 +1791,8 @@ public async Task Example_Conversations_AnalyzeConversationSubmitOperation_Succe maskedItn = "", conversationItemLevelTiming = new { -offset = 0, -duration = 20000000, +offset = 0L, +duration = 20000000L, }, }, new @@ -1805,8 +1805,8 @@ public async Task Example_Conversations_AnalyzeConversationSubmitOperation_Succe maskedItn = "", conversationItemLevelTiming = new { -offset = 20000000, -duration = 50000000, +offset = 20000000L, +duration = 50000000L, }, }, new @@ -1819,8 +1819,8 @@ public async Task Example_Conversations_AnalyzeConversationSubmitOperation_Succe maskedItn = "", conversationItemLevelTiming = new { -offset = 50000000, -duration = 60000000, +offset = 50000000L, +duration = 60000000L, }, } }, @@ -1869,8 +1869,8 @@ public void Example_Conversations_AnalyzeConversationSubmitOperation_SuccessfulC { ConversationItemLevelTiming = new ConversationItemLevelTiming { -Offset = 0, -Duration = 20000000, +Offset = 0L, +Duration = 20000000L, }, }, new TranscriptConversationItem( @@ -1883,8 +1883,8 @@ public void Example_Conversations_AnalyzeConversationSubmitOperation_SuccessfulC { ConversationItemLevelTiming = new ConversationItemLevelTiming { -Offset = 20000000, -Duration = 50000000, +Offset = 20000000L, +Duration = 50000000L, }, }, new TranscriptConversationItem( @@ -1897,8 +1897,8 @@ public void Example_Conversations_AnalyzeConversationSubmitOperation_SuccessfulC { ConversationItemLevelTiming = new ConversationItemLevelTiming { -Offset = 50000000, -Duration = 60000000, +Offset = 50000000L, +Duration = 60000000L, }, } }) @@ -1938,8 +1938,8 @@ public async Task Example_Conversations_AnalyzeConversationSubmitOperation_Succe { ConversationItemLevelTiming = new ConversationItemLevelTiming { -Offset = 0, -Duration = 20000000, +Offset = 0L, +Duration = 20000000L, }, }, new TranscriptConversationItem( @@ -1952,8 +1952,8 @@ public async Task Example_Conversations_AnalyzeConversationSubmitOperation_Succe { ConversationItemLevelTiming = new ConversationItemLevelTiming { -Offset = 20000000, -Duration = 50000000, +Offset = 20000000L, +Duration = 50000000L, }, }, new TranscriptConversationItem( @@ -1966,8 +1966,8 @@ public async Task Example_Conversations_AnalyzeConversationSubmitOperation_Succe { ConversationItemLevelTiming = new ConversationItemLevelTiming { -Offset = 50000000, -Duration = 60000000, +Offset = 50000000L, +Duration = 60000000L, }, } }) @@ -2245,8 +2245,8 @@ public void Example_Conversations_AnalyzeConversationSubmitOperation_SuccessfulC maskedItn = "", conversationItemLevelTiming = new { -offset = 0, -duration = 20000000, +offset = 0L, +duration = 20000000L, }, }, new @@ -2259,8 +2259,8 @@ public void Example_Conversations_AnalyzeConversationSubmitOperation_SuccessfulC maskedItn = "", conversationItemLevelTiming = new { -offset = 20000000, -duration = 50000000, +offset = 20000000L, +duration = 50000000L, }, }, new @@ -2273,8 +2273,8 @@ public void Example_Conversations_AnalyzeConversationSubmitOperation_SuccessfulC maskedItn = "", conversationItemLevelTiming = new { -offset = 50000000, -duration = 60000000, +offset = 50000000L, +duration = 60000000L, }, } }, @@ -2334,8 +2334,8 @@ public async Task Example_Conversations_AnalyzeConversationSubmitOperation_Succe maskedItn = "", conversationItemLevelTiming = new { -offset = 0, -duration = 20000000, +offset = 0L, +duration = 20000000L, }, }, new @@ -2348,8 +2348,8 @@ public async Task Example_Conversations_AnalyzeConversationSubmitOperation_Succe maskedItn = "", conversationItemLevelTiming = new { -offset = 20000000, -duration = 50000000, +offset = 20000000L, +duration = 50000000L, }, }, new @@ -2362,8 +2362,8 @@ public async Task Example_Conversations_AnalyzeConversationSubmitOperation_Succe maskedItn = "", conversationItemLevelTiming = new { -offset = 50000000, -duration = 60000000, +offset = 50000000L, +duration = 60000000L, }, } }, @@ -2413,8 +2413,8 @@ public void Example_Conversations_AnalyzeConversationSubmitOperation_SuccessfulC { ConversationItemLevelTiming = new ConversationItemLevelTiming { -Offset = 0, -Duration = 20000000, +Offset = 0L, +Duration = 20000000L, }, }, new TranscriptConversationItem( @@ -2427,8 +2427,8 @@ public void Example_Conversations_AnalyzeConversationSubmitOperation_SuccessfulC { ConversationItemLevelTiming = new ConversationItemLevelTiming { -Offset = 20000000, -Duration = 50000000, +Offset = 20000000L, +Duration = 50000000L, }, }, new TranscriptConversationItem( @@ -2441,8 +2441,8 @@ public void Example_Conversations_AnalyzeConversationSubmitOperation_SuccessfulC { ConversationItemLevelTiming = new ConversationItemLevelTiming { -Offset = 50000000, -Duration = 60000000, +Offset = 50000000L, +Duration = 60000000L, }, } }) @@ -2482,8 +2482,8 @@ public async Task Example_Conversations_AnalyzeConversationSubmitOperation_Succe { ConversationItemLevelTiming = new ConversationItemLevelTiming { -Offset = 0, -Duration = 20000000, +Offset = 0L, +Duration = 20000000L, }, }, new TranscriptConversationItem( @@ -2496,8 +2496,8 @@ public async Task Example_Conversations_AnalyzeConversationSubmitOperation_Succe { ConversationItemLevelTiming = new ConversationItemLevelTiming { -Offset = 20000000, -Duration = 50000000, +Offset = 20000000L, +Duration = 50000000L, }, }, new TranscriptConversationItem( @@ -2510,8 +2510,8 @@ public async Task Example_Conversations_AnalyzeConversationSubmitOperation_Succe { ConversationItemLevelTiming = new ConversationItemLevelTiming { -Offset = 50000000, -Duration = 60000000, +Offset = 50000000L, +Duration = 60000000L, }, } }) diff --git a/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/CHANGELOG.md b/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/CHANGELOG.md index f2df29908bdc..ca2d38e63897 100644 --- a/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/CHANGELOG.md +++ b/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/CHANGELOG.md @@ -1,17 +1,11 @@ # Release History -## 1.4.0-beta.1 (Unreleased) +## 1.3.4 (2024-10-23) ### Features Added - Exposed `JsonModelWriteCore` for model serialization procedure. -### Breaking Changes - -### Bugs Fixed - -### Other Changes - ## 1.3.3 (2024-05-07) ### Features Added diff --git a/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/src/Azure.ResourceManager.CognitiveServices.csproj b/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/src/Azure.ResourceManager.CognitiveServices.csproj index 4f72a4ce345c..70305f6e0736 100644 --- a/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/src/Azure.ResourceManager.CognitiveServices.csproj +++ b/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/src/Azure.ResourceManager.CognitiveServices.csproj @@ -1,6 +1,6 @@ - 1.4.0-beta.1 + 1.3.4 1.3.3 Azure.ResourceManager.CognitiveServices diff --git a/sdk/communication/Azure.Communication.AlphaIds/tests.yml b/sdk/communication/Azure.Communication.AlphaIds/tests.yml index c674388c9271..b23d96e897b4 100644 --- a/sdk/communication/Azure.Communication.AlphaIds/tests.yml +++ b/sdk/communication/Azure.Communication.AlphaIds/tests.yml @@ -8,13 +8,7 @@ extends: CloudConfig: Public: SubscriptionConfigurations: - - $(sub-config-azure-cloud-test-resources) - $(sub-config-communication-services-cloud-test-resources-common) - $(sub-config-communication-services-cloud-test-resources-net) - Int: - SubscriptionConfigurations: - - $(sub-config-communication-int-test-resources-common) - - $(sub-config-communication-int-test-resources-net) - Clouds: Public,Int TestResourceDirectories: - communication/test-resources/ diff --git a/sdk/communication/Azure.Communication.CallAutomation/api/Azure.Communication.CallAutomation.netstandard2.0.cs b/sdk/communication/Azure.Communication.CallAutomation/api/Azure.Communication.CallAutomation.netstandard2.0.cs index c037d066333f..d2f53d639d6b 100644 --- a/sdk/communication/Azure.Communication.CallAutomation/api/Azure.Communication.CallAutomation.netstandard2.0.cs +++ b/sdk/communication/Azure.Communication.CallAutomation/api/Azure.Communication.CallAutomation.netstandard2.0.cs @@ -766,6 +766,7 @@ public partial class DialogSensitivityUpdate : Azure.Communication.CallAutomatio internal DialogSensitivityUpdate() { } public string DialogId { get { throw null; } } public Azure.Communication.CallAutomation.DialogInputType? DialogInputType { get { throw null; } } + public bool? SensitiveMask { get { throw null; } } public static Azure.Communication.CallAutomation.DialogSensitivityUpdate Deserialize(string content) { throw null; } } public partial class DialogStarted : Azure.Communication.CallAutomation.CallAutomationEventBase diff --git a/sdk/communication/Azure.Communication.CallAutomation/src/Models/Events/DialogSensitivityUpdate.cs b/sdk/communication/Azure.Communication.CallAutomation/src/Models/Events/DialogSensitivityUpdate.cs index 5bc771420fad..59eb67c643a2 100644 --- a/sdk/communication/Azure.Communication.CallAutomation/src/Models/Events/DialogSensitivityUpdate.cs +++ b/sdk/communication/Azure.Communication.CallAutomation/src/Models/Events/DialogSensitivityUpdate.cs @@ -26,6 +26,7 @@ internal DialogSensitivityUpdate(DialogSensitivityUpdateInternal internalEvent) OperationContext = internalEvent.OperationContext; ResultInformation = internalEvent.ResultInformation; DialogId = internalEvent.DialogId; + SensitiveMask = internalEvent.SensitiveMask; } /// Determines the type of the dialog. @@ -34,6 +35,9 @@ internal DialogSensitivityUpdate(DialogSensitivityUpdateInternal internalEvent) /// Dialog Id public string DialogId { get; } + /// SensitiveMask + public bool? SensitiveMask { get; } + /// /// Deserialize event. /// diff --git a/sdk/communication/Azure.Communication.CallAutomation/tests.yml b/sdk/communication/Azure.Communication.CallAutomation/tests.yml index 56b8eae6289f..6a6e51c48641 100644 --- a/sdk/communication/Azure.Communication.CallAutomation/tests.yml +++ b/sdk/communication/Azure.Communication.CallAutomation/tests.yml @@ -7,13 +7,9 @@ extends: Project: Azure.Communication.CallAutomation CloudConfig: Public: - ServiceConnection: azure-sdk-tests - SubscriptionConfigurationFilePaths: - - eng/common/TestResources/sub-config/AzurePublicMsft.json SubscriptionConfigurations: - $(sub-config-communication-services-cloud-test-resources-common) - $(sub-config-communication-services-cloud-test-resources-net) - Clouds: Public TestResourceDirectories: - communication/ EnvVars: diff --git a/sdk/communication/Azure.Communication.CallingServer/tests.yml b/sdk/communication/Azure.Communication.CallingServer/tests.yml index a42203d94010..e4b65d82f80d 100644 --- a/sdk/communication/Azure.Communication.CallingServer/tests.yml +++ b/sdk/communication/Azure.Communication.CallingServer/tests.yml @@ -7,13 +7,9 @@ extends: Project: Azure.Communication.CallingServer CloudConfig: Public: - ServiceConnection: azure-sdk-tests - SubscriptionConfigurationFilePaths: - - eng/common/TestResources/sub-config/AzurePublicMsft.json SubscriptionConfigurations: - $(sub-config-communication-services-cloud-test-resources-common) - $(sub-config-communication-services-cloud-test-resources-net) - Clouds: Public TestResourceDirectories: - communication/ EnvVars: diff --git a/sdk/communication/Azure.Communication.Chat/tests.yml b/sdk/communication/Azure.Communication.Chat/tests.yml index 9a9b489ad946..e2d1bdc4a063 100644 --- a/sdk/communication/Azure.Communication.Chat/tests.yml +++ b/sdk/communication/Azure.Communication.Chat/tests.yml @@ -7,12 +7,8 @@ extends: Project: Azure.Communication.Chat CloudConfig: Public: - ServiceConnection: azure-sdk-tests - SubscriptionConfigurationFilePaths: - - eng/common/TestResources/sub-config/AzurePublicMsft.json SubscriptionConfigurations: - $(sub-config-communication-services-cloud-test-resources-common) - $(sub-config-communication-services-cloud-test-resources-net) - Clouds: Public TestResourceDirectories: - communication/ diff --git a/sdk/communication/Azure.Communication.Common/README.md b/sdk/communication/Azure.Communication.Common/README.md index e5ee3f2c7a7b..e62022ba2c0e 100644 --- a/sdk/communication/Azure.Communication.Common/README.md +++ b/sdk/communication/Azure.Communication.Common/README.md @@ -38,6 +38,7 @@ Depending on your scenario, you may want to initialize the `CommunicationTokenCr - a static token (suitable for short-lived clients used to e.g. send one-off Chat messages) or - a callback function that ensures a continuous authentication state (ideal e.g. for long Calling sessions). +- a token credential capable of obtaining an Entra user token. You can provide any implementation of [Azure.Core.TokenCredential](https://docs.microsoft.com/dotnet/api/azure.core.tokencredential?view=azure-dotnet). It is suitable for scenarios where Entra user access tokens are needed to authenticate with Communication Services. The tokens supplied to the `CommunicationTokenCredential` either through the constructor or via the token refresher callback can be obtained using the Azure Communication Identity library. @@ -101,6 +102,32 @@ using var tokenCredential = new CommunicationTokenCredential( }); ``` +### Create a credential with a token credential capable of obtaining an Entra user token + +For scenarios where an Entra user can be used with Communication Services, you need to initialize any implementation of [Azure.Core.TokenCredential](https://docs.microsoft.com/dotnet/api/azure.core.tokencredential?view=azure-dotnet) and provide it to the ``EntraCommunicationTokenCredentialOptions``. +Along with this, you must provide the URI of the Azure Communication Services resource and the scopes required for the Entra user token. These scopes determine the permissions granted to the token: + +```C# +var options = new InteractiveBrowserCredentialOptions + { + TenantId = "", + ClientId = "", + RedirectUri = new Uri(""), + AuthorityHost = new Uri("https://login.microsoftonline.com/") + }; +var entraTokenCredential = new InteractiveBrowserCredential(options); + +var entraTokenCredentialOptions = new EntraCommunicationTokenCredentialOptions( + resourceEndpoint: "https://.communication.azure.com", + entraTokenCredential: entraTokenCredential +){ + Scopes = new[] { "https://communication.azure.com/clients/VoIP" } +}; + +var credential = new CommunicationTokenCredential(entraTokenCredentialOptions); + +``` + ## Troubleshooting The proactive refreshing failures happen in a background thread and to avoid crashing your app the exceptions will be silently handled. All the other failures will happen during your request using other clients such as chat where you can catch the exception using `RequestFailedException`. diff --git a/sdk/communication/Azure.Communication.Common/api/Azure.Communication.Common.netstandard2.0.cs b/sdk/communication/Azure.Communication.Common/api/Azure.Communication.Common.netstandard2.0.cs index 97e437ca8729..469930c7ccef 100644 --- a/sdk/communication/Azure.Communication.Common/api/Azure.Communication.Common.netstandard2.0.cs +++ b/sdk/communication/Azure.Communication.Common/api/Azure.Communication.Common.netstandard2.0.cs @@ -34,6 +34,7 @@ protected CommunicationIdentifier() { } public sealed partial class CommunicationTokenCredential : System.IDisposable { public CommunicationTokenCredential(Azure.Communication.CommunicationTokenRefreshOptions options) { } + public CommunicationTokenCredential(Azure.Communication.EntraCommunicationTokenCredentialOptions options) { } public CommunicationTokenCredential(string token) { } public void Dispose() { } public Azure.Core.AccessToken GetToken(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -53,6 +54,13 @@ public CommunicationUserIdentifier(string id) { } public override bool Equals(Azure.Communication.CommunicationIdentifier other) { throw null; } public override string ToString() { throw null; } } + public partial class EntraCommunicationTokenCredentialOptions + { + public EntraCommunicationTokenCredentialOptions(string resourceEndpoint, Azure.Core.TokenCredential entraTokenCredential) { } + public string ResourceEndpoint { get { throw null; } } + public string[] Scopes { get { throw null; } set { } } + public Azure.Core.TokenCredential TokenCredential { get { throw null; } } + } public partial class MicrosoftTeamsAppIdentifier : Azure.Communication.CommunicationIdentifier { public MicrosoftTeamsAppIdentifier(string appId, Azure.Communication.CommunicationCloudEnvironment? cloud = default(Azure.Communication.CommunicationCloudEnvironment?)) { } diff --git a/sdk/communication/Azure.Communication.Common/src/CommunicationTokenCredential.cs b/sdk/communication/Azure.Communication.Common/src/CommunicationTokenCredential.cs index 0473faacc704..487ede35cbaf 100644 --- a/sdk/communication/Azure.Communication.Common/src/CommunicationTokenCredential.cs +++ b/sdk/communication/Azure.Communication.Common/src/CommunicationTokenCredential.cs @@ -34,6 +34,16 @@ public CommunicationTokenCredential(CommunicationTokenRefreshOptions options) _tokenCredential = new AutoRefreshTokenCredential(options); } + /// + /// Initializes a new instance of . + /// + /// The options for how the token will be fetched + public CommunicationTokenCredential(EntraCommunicationTokenCredentialOptions options) + { + Argument.AssertNotNull(options, nameof(options)); + _tokenCredential = new EntraTokenCredential(options); + } + /// /// Gets an for the user. /// diff --git a/sdk/communication/Azure.Communication.Common/src/EntraCommunicationTokenCredentialOptions.cs b/sdk/communication/Azure.Communication.Common/src/EntraCommunicationTokenCredentialOptions.cs new file mode 100644 index 000000000000..034cd1f03d82 --- /dev/null +++ b/sdk/communication/Azure.Communication.Common/src/EntraCommunicationTokenCredentialOptions.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using Azure.Core; + +namespace Azure.Communication +{ + /// + /// The Entra Communication Token Options. + /// + public class EntraCommunicationTokenCredentialOptions + { + private static string[] DefaultScopes = { "https://communication.azure.com/clients/.default" }; + /// + /// The URI of the Azure Communication Services resource. + /// + public string ResourceEndpoint { get; } + + /// + /// The credential capable of fetching an Entra user token. You can provide any implementation of . + /// + public TokenCredential TokenCredential { get; } + + /// + /// The scopes required for the Entra user token. These scopes determine the permissions granted to the token. For example, ["https://communication.azure.com/clients/VoIP"]. + /// + public string[] Scopes { get; set; } + + /// + /// Initializes a new instance of . + /// + /// The URI of the Azure Communication Services resource.For example, https://myResource.communication.azure.com. + /// The credential capable of fetching an Entra user token. + public EntraCommunicationTokenCredentialOptions( + string resourceEndpoint, + TokenCredential entraTokenCredential) + { + Argument.AssertNotNullOrEmpty(resourceEndpoint, nameof(resourceEndpoint)); + Argument.AssertNotNull(entraTokenCredential, nameof(entraTokenCredential)); + + this.ResourceEndpoint = resourceEndpoint; + this.TokenCredential = entraTokenCredential; + this.Scopes = DefaultScopes; + } + } +} diff --git a/sdk/communication/Azure.Communication.Common/src/EntraTokenCredential.cs b/sdk/communication/Azure.Communication.Common/src/EntraTokenCredential.cs new file mode 100644 index 000000000000..9660851235db --- /dev/null +++ b/sdk/communication/Azure.Communication.Common/src/EntraTokenCredential.cs @@ -0,0 +1,145 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.Communication +{ + /// + /// Represents a credential that exchanges an Entra token for an Azure Communication Services (ACS) token, enabling access to ACS resources. + /// + internal sealed class EntraTokenCredential : ICommunicationTokenCredential + { + private HttpPipeline _pipeline; + private string _resourceEndpoint; + private readonly ThreadSafeRefreshableAccessTokenCache _accessTokenCache; + + /// + /// Initializes a new instance of . + /// + /// The options for how the token will be fetched + /// Only for testing. + public EntraTokenCredential(EntraCommunicationTokenCredentialOptions options, HttpPipelineTransport pipelineTransport = null) + { + this._resourceEndpoint = options.ResourceEndpoint; + _pipeline = CreatePipelineFromOptions(options, pipelineTransport); + _accessTokenCache = new ThreadSafeRefreshableAccessTokenCache( + ExchangeEntraToken, + ExchangeEntraTokenAsync, + false, null, null); + _accessTokenCache.GetValueAsync(default); + } + + private HttpPipeline CreatePipelineFromOptions(EntraCommunicationTokenCredentialOptions options, HttpPipelineTransport pipelineTransport) + { + var authenticationPolicy = new BearerTokenAuthenticationPolicy(options.TokenCredential, options.Scopes); + var entraTokenGuardPolicy = new EntraTokenGuardPolicy(); + var clientOptions = ClientOptions.Default; + if (pipelineTransport != null) + { + clientOptions.Transport = pipelineTransport; + } + return HttpPipelineBuilder.Build(clientOptions, authenticationPolicy, entraTokenGuardPolicy); + } + + /// + public void Dispose() + { + _pipeline = default; + _accessTokenCache.Dispose(); + } + + /// + /// Gets an . + /// + /// The cancellation token for the task. + /// Contains the access token. + public AccessToken GetToken(CancellationToken cancellationToken = default) + => _accessTokenCache.GetValue(cancellationToken, () => true); + + /// + /// Gets an . + /// + /// The cancellation token for the task. + /// + /// A task that represents the asynchronous get token operation. The value of its property contains the access token. + /// + public ValueTask GetTokenAsync(CancellationToken cancellationToken = default) + => _accessTokenCache.GetValueAsync(cancellationToken, () => true); + + private AccessToken ExchangeEntraToken(CancellationToken cancellationToken) + { + return ExchangeEntraTokenAsync(false, cancellationToken).EnsureCompleted(); + } + + private async ValueTask ExchangeEntraTokenAsync(CancellationToken cancellationToken) + { + var result = await ExchangeEntraTokenAsync(true, cancellationToken).ConfigureAwait(false); + return result; + } + + private async ValueTask ExchangeEntraTokenAsync(bool async, CancellationToken cancellationToken) + { + var message = CreateRequestMessage(); + if (async) + { + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + } + else + { + _pipeline.Send(message, cancellationToken); + } + return ParseAccessTokenFromResponse(message.Response); + } + + private HttpMessage CreateRequestMessage() + { + var uri = new RequestUriBuilder(); + uri.Reset(new Uri(_resourceEndpoint)); + uri.AppendPath("/access/entra/:exchangeAccessToken", false); + uri.AppendQuery("api-version", "2024-04-01-preview", true); + + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Uri = uri; + request.Method = RequestMethod.Post; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + request.Content = "{}"; + + return message; + } + + private AccessToken ParseAccessTokenFromResponse(Response response) + { + switch (response.Status) + { + case 200: + try + { + var json = JsonDocument.Parse(response.Content); + var accessTokenJson = json.RootElement.GetProperty("accessToken").GetRawText(); + var acsToken = JsonSerializer.Deserialize(accessTokenJson); + return new AccessToken(acsToken.token, acsToken.expiresOn); + } + catch (Exception) + { + throw new RequestFailedException(response); + } + default: + throw new RequestFailedException(response); + } + } + + private class AcsToken + { + public string token { get; set; } + public DateTimeOffset expiresOn { get; set; } + } + } +} diff --git a/sdk/communication/Azure.Communication.Common/src/EntraTokenGuardPolicy.cs b/sdk/communication/Azure.Communication.Common/src/EntraTokenGuardPolicy.cs new file mode 100644 index 000000000000..0ef79ac562fc --- /dev/null +++ b/sdk/communication/Azure.Communication.Common/src/EntraTokenGuardPolicy.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Text.Json; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.Communication +{ + internal class EntraTokenGuardPolicy : HttpPipelinePolicy + { + private string _entraTokenCache; + private Response _responseCache; + + public override void Process(HttpMessage message, ReadOnlyMemory pipeline) + { + ProcessAsync(message, pipeline, async: false).EnsureCompleted(); + } + + public override ValueTask ProcessAsync(HttpMessage message, ReadOnlyMemory pipeline) + { + return ProcessAsync(message, pipeline, async: true); + } + + private async ValueTask ProcessAsync(HttpMessage message, ReadOnlyMemory pipeline, bool async) + { + var (entraTokenCacheValid, token) = IsEntraTokenCacheValid(message); + if (entraTokenCacheValid && IsAcsTokenCacheValid()) + { + message.Response = _responseCache; + return; + } + else + { + _entraTokenCache = token; + if (async) + { + await ProcessNextAsync(message, pipeline).ConfigureAwait(continueOnCapturedContext: false); + } + else + { + ProcessNext(message, pipeline); + } + _responseCache = message.Response; + } + } + + private (bool CacheValid, string EntraToken) IsEntraTokenCacheValid(HttpMessage message) + { + var currentEntraToken = string.Empty; + message.Request.Headers.TryGetValue("Authorization", out currentEntraToken); + return (!string.IsNullOrEmpty(_entraTokenCache) && currentEntraToken == _entraTokenCache, currentEntraToken); + } + + private bool IsAcsTokenCacheValid() + { + return _responseCache != null && _responseCache.Status == 200 && IsAccessTokenValid(); + } + + private bool IsAccessTokenValid() + { + try + { + var json = JsonDocument.Parse(_responseCache.Content); + var expiresOnString = json.RootElement + .GetProperty("accessToken") + .GetProperty("expiresOn") + .GetString(); + var expiresOn = DateTimeOffset.Parse(expiresOnString); + return DateTimeOffset.UtcNow < expiresOn; + } + catch + { + return false; + } + } + } +} diff --git a/sdk/communication/Azure.Communication.Common/src/ThreadSafeRefreshableAccessTokenCache.cs b/sdk/communication/Azure.Communication.Common/src/ThreadSafeRefreshableAccessTokenCache.cs index 6499506ac393..ce93721865e9 100644 --- a/sdk/communication/Azure.Communication.Common/src/ThreadSafeRefreshableAccessTokenCache.cs +++ b/sdk/communication/Azure.Communication.Common/src/ThreadSafeRefreshableAccessTokenCache.cs @@ -96,11 +96,17 @@ private void ScheduleRefresher() _scheduledProactiveRefreshing = ScheduleProactiveRefreshing(dueTime); } - public AccessToken GetValue(CancellationToken cancellationToken) - => GetValueAsync(async: false, IsCurrentTokenExpiryingSoon, cancellationToken: cancellationToken).EnsureCompleted(); + public AccessToken GetValue(CancellationToken cancellationToken, Func? shouldRefresh = null) + { + shouldRefresh ??= IsCurrentTokenExpiryingSoon; + return GetValueAsync(async: false, shouldRefresh, cancellationToken: cancellationToken).EnsureCompleted(); + } - public ValueTask GetValueAsync(CancellationToken cancellationToken) - => GetValueAsync(async: true, IsCurrentTokenExpiryingSoon, cancellationToken: cancellationToken); + public ValueTask GetValueAsync(CancellationToken cancellationToken, Func? shouldRefresh = null) + { + shouldRefresh ??= IsCurrentTokenExpiryingSoon; + return GetValueAsync(async: true, shouldRefresh ??= IsCurrentTokenExpiryingSoon, cancellationToken: cancellationToken); + } private async ValueTask GetValueAsync(bool async, Func shouldRefresh, CancellationToken cancellationToken) { diff --git a/sdk/communication/Azure.Communication.Common/tests/CommunicationIdentifierTest.cs b/sdk/communication/Azure.Communication.Common/tests/CommunicationIdentifierTest.cs index 45a82931cd21..c4cf1183287c 100644 --- a/sdk/communication/Azure.Communication.Common/tests/CommunicationIdentifierTest.cs +++ b/sdk/communication/Azure.Communication.Common/tests/CommunicationIdentifierTest.cs @@ -5,7 +5,6 @@ using System.Linq; using System.Collections.Generic; using NUnit.Framework; -using System.Runtime.InteropServices; namespace Azure.Communication { diff --git a/sdk/communication/Azure.Communication.Common/tests/Identity/EntraTokenCredentialTest.cs b/sdk/communication/Azure.Communication.Common/tests/Identity/EntraTokenCredentialTest.cs new file mode 100644 index 000000000000..c7cea3fb737d --- /dev/null +++ b/sdk/communication/Azure.Communication.Common/tests/Identity/EntraTokenCredentialTest.cs @@ -0,0 +1,230 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.Core.TestFramework; +using Moq; +using NUnit.Framework; + +namespace Azure.Communication.Identity +{ + [TestFixture] + public class EntraTokenCredentialTest + { + private const string SampleToken = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjMyNTAzNjgwMDAwfQ.9i7FNNHHJT8cOzo-yrAUJyBSfJ-tPPk2emcHavOEpWc"; + private const string SampleTokenExpiry = "2034-10-04T10:21:29.4729393+00:00"; + private const string ExpiredToken = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjEwMH0.1h_scYkNp-G98-O4cW6KvfJZwiz54uJMyeDACE4nypg"; + protected const string TokenResponseTemplate = "{{\"identity\":{{\"id\":\"8:acs:52a5e676-39a3-4f45-a8ed-5a162dbbd7eb_cdc5aeea-15c5-4db6-b079-fcadd2505dc2_cab309e5-a2e7-4ac8-b04e-5fadc3aa90fa\"}},\n" + + "\"accessToken\":{{\"token\":\"{0}\",\n" + + "\"expiresOn\":\"{1}\"}}}}"; + protected string TokenResponse = string.Format(TokenResponseTemplate, SampleToken, SampleTokenExpiry); + + private Mock _mockTokenCredential = null!; + private string[] _scopes = new string[] { "https://communication.azure.com/clients/VoIP" }; + private string _resourceEndpoint = "https://myResource.communication.azure.com"; + + [SetUp] + public void Setup() + { + _mockTokenCredential = new Mock(); + var expiryTime = DateTimeOffset.Parse(SampleTokenExpiry, null, System.Globalization.DateTimeStyles.RoundtripKind); + _mockTokenCredential + .Setup(tc => tc.GetTokenAsync(It.IsAny(), It.IsAny())) + .ReturnsAsync(new AccessToken(SampleToken, expiryTime)); + } + + [Test] + public void EntraTokenCredential_Init_ThrowsErrorWithNulls() + { + Assert.Throws(() => new EntraCommunicationTokenCredentialOptions( + null, + _mockTokenCredential.Object) + { + Scopes = _scopes + }); + + Assert.Throws(() => new EntraCommunicationTokenCredentialOptions( + "", + _mockTokenCredential.Object) + { + Scopes = _scopes + }); + + Assert.Throws(() => new EntraCommunicationTokenCredentialOptions( + _resourceEndpoint, + null) + { + Scopes = _scopes + }); + } + + [Test] + public void EntraTokenCredential_InitWithoutScopes_InitsWithDefaultScope() + { + var credential = new EntraCommunicationTokenCredentialOptions( + _resourceEndpoint, + _mockTokenCredential.Object); + var scopes = new[] { "https://communication.azure.com/clients/.default" }; + Assert.AreEqual(credential.Scopes, scopes); + } + + [Test] + public void EntraTokenCredential_Init_FetchesTokenImmediately() + { + // Arrange + var expiryTime = DateTimeOffset.Parse(SampleTokenExpiry, null, System.Globalization.DateTimeStyles.RoundtripKind); + var options = CreateEntraTokenCredentialOptions(); + var mockTransport = CreateMockTransport(new[] { CreateMockResponse(200, TokenResponse) }); + var entraTokenCredential = new EntraTokenCredential(options, mockTransport); + // Assert + _mockTokenCredential.Verify(tc => tc.GetTokenAsync(It.IsAny(), It.IsAny()), Times.Once); + } + + [Test] + public async Task EntraTokenCredential_GetToken_ReturnsToken() + { + // Arrange + var expiryTime = DateTimeOffset.Parse(SampleTokenExpiry, null, System.Globalization.DateTimeStyles.RoundtripKind); + var options = CreateEntraTokenCredentialOptions(); + var mockTransport = CreateMockTransport(new[] { CreateMockResponse(200, TokenResponse) }); + var entraTokenCredential = new EntraTokenCredential(options, mockTransport); + + // Act + var token = await entraTokenCredential.GetTokenAsync(CancellationToken.None); + + // Assert + Assert.AreEqual(SampleToken, token.Token); + Assert.AreEqual(token.ExpiresOn, expiryTime); + _mockTokenCredential.Verify(tc => tc.GetTokenAsync(It.IsAny(), It.IsAny()), Times.Once); + } + + [Test] + public async Task EntraTokenCredential_GetToken_InternalEntraTokenChangeInvalidatesCachedToken() + { + // Arrange + var expiryTime = DateTimeOffset.Parse(SampleTokenExpiry, null, System.Globalization.DateTimeStyles.RoundtripKind); + var newToken = "newToken"; + var refreshOn = DateTimeOffset.Now; + _mockTokenCredential + .SetupSequence(tc => tc.GetTokenAsync(It.IsAny(), It.IsAny())) + .ReturnsAsync(new AccessToken("Entra token for call from constructor", refreshOn)) + .ReturnsAsync(new AccessToken("Entra token for the first getToken call token", expiryTime)); + + var options = CreateEntraTokenCredentialOptions(); + var latestTokenResponse = string.Format(TokenResponseTemplate, newToken, SampleTokenExpiry); + var mockTransport = CreateMockTransport(new[] { CreateMockResponse(200, TokenResponse), CreateMockResponse(200, latestTokenResponse) }); + var entraTokenCredential = new EntraTokenCredential(options, mockTransport); + // Act + var token = await entraTokenCredential.GetTokenAsync(CancellationToken.None); + + // Assert for cached tokens are updated + Assert.AreEqual(newToken, token.Token); + _mockTokenCredential.Verify(tc => tc.GetTokenAsync(It.IsAny(), It.IsAny()), Times.Exactly(2)); + } + + [Test] + public async Task EntraTokenCredential_GetToken_MultipleCallsReturnsCachedToken() + { + // Arrange + var options = CreateEntraTokenCredentialOptions(); + var mockTransport = CreateMockTransport(new[] { CreateMockResponse(200, TokenResponse) }); + var entraTokenCredential = new EntraTokenCredential(options, mockTransport); + + // Act + var token = await entraTokenCredential.GetTokenAsync(CancellationToken.None); + for (var i = 0; i < 10; i++) + { + token = await entraTokenCredential.GetTokenAsync(CancellationToken.None); + } + // Assert + Assert.AreEqual(SampleToken, token.Token); + _mockTokenCredential.Verify(tc => tc.GetTokenAsync(It.IsAny(), It.IsAny()), Times.Once); + } + + [Test] + public void EntraTokenCredential_GetToken_ThrowsFailedResponse() + { + // Arrange + var options = CreateEntraTokenCredentialOptions(); + var errorMessage = "{\"error\":{\"code\":\"BadRequest\",\"message\":\"Invalid request.\"}}"; + var mockResponses = new[] + { + CreateMockResponse(400, errorMessage), + CreateMockResponse(400, errorMessage), + }; + var mockTransport = CreateMockTransport(mockResponses); + var entraTokenCredential = new EntraTokenCredential(options, mockTransport); + + // Act & Assert + Assert.ThrowsAsync(async () => await entraTokenCredential.GetTokenAsync(CancellationToken.None)); + } + + [Test] + public void EntraTokenCredential_GetToken_ThrowsInvalidJson() + { + // Arrange + var options = CreateEntraTokenCredentialOptions(); + var errorMessage = "{\"error\":{\"code\":\"BadRequest\",\"message\":\"Invalid request.\"}}"; + var mockResponses = new[] + { + CreateMockResponse(200, errorMessage), + CreateMockResponse(200, errorMessage), + }; + var mockTransport = CreateMockTransport(mockResponses); + + var entraTokenCredential = new EntraTokenCredential(options, mockTransport); + + // Act & Assert + Assert.ThrowsAsync(async () => await entraTokenCredential.GetTokenAsync(CancellationToken.None)); + } + + [Test] + public void EntraTokenCredential_GetToken_RetriesThreeTimesOnTransientError() + { + // Arrange + var options = CreateEntraTokenCredentialOptions(); + var lastRetryErrorMessage = "Last Retry Error Message"; + var mockResponses = new MockResponse[] + { + CreateMockResponse(500, "First Retry Error Message"), + CreateMockResponse(500, "Second Retry Error Message"), + CreateMockResponse(500, "Third Retry Error Message"), + CreateMockResponse(500, "Last retry for the pre-warm fetch"), + CreateMockResponse(500, "First Retry Error Message"), + CreateMockResponse(500, "Second Retry Error Message"), + CreateMockResponse(500, "Third Retry Error Message"), + CreateMockResponse(500, lastRetryErrorMessage), + CreateMockResponse(500, "Shouldn't reach here"), + }; + + var mockTransport = CreateMockTransport(mockResponses); + var entraTokenCredential = new EntraTokenCredential(options, mockTransport); + + // Act & Assert + var exception = Assert.ThrowsAsync(async () => await entraTokenCredential.GetTokenAsync(CancellationToken.None)); + Assert.AreEqual(lastRetryErrorMessage, lastRetryErrorMessage); + } + + private EntraCommunicationTokenCredentialOptions CreateEntraTokenCredentialOptions() + { + return new EntraCommunicationTokenCredentialOptions(_resourceEndpoint, _mockTokenCredential.Object) + { + Scopes = _scopes + }; + } + + private MockResponse CreateMockResponse(int statusCode, string body) + { + return new MockResponse(statusCode).WithContent(body); + } + + private HttpPipelineTransport CreateMockTransport(MockResponse[] mockResponses) + { + return new MockTransport(mockResponses); + } + } +} diff --git a/sdk/communication/Azure.Communication.Common/tests/Pipeline/EntraTokenGuardPolicyTests.cs b/sdk/communication/Azure.Communication.Common/tests/Pipeline/EntraTokenGuardPolicyTests.cs new file mode 100644 index 000000000000..cb2d42d129cc --- /dev/null +++ b/sdk/communication/Azure.Communication.Common/tests/Pipeline/EntraTokenGuardPolicyTests.cs @@ -0,0 +1,199 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.Core.TestFramework; +using Moq; +using NUnit.Framework; +using System; +using System.Threading.Tasks; + +namespace Azure.Communication.Pipeline +{ + [TestFixture] + public class EntraTokenGuardPolicyTests + { + private HttpMessage _httpMessage = null!; + private CustomRequest _httpRequest = null!; + private Mock _httpPipelinePolicyMock = null!; + private string _authHeader = "Bearer Token"; + protected const string TokenResponseTemplate = "{{\"identity\":{{\"id\":\"8:acs:52a5e676-39a3-4f45-a8ed-5a162dbbd7eb_cdc5aeea-15c5-4db6-b079-fcadd2505dc2_cab309e5-a2e7-4ac8-b04e-5fadc3aa90fa\"}},\n" + + "\"accessToken\":{{\"token\":\"{0}\",\n" + + "\"expiresOn\":\"{1}\"}}}}"; + protected string TokenResponse = string.Format(TokenResponseTemplate, "token", "2034-10-04T10:21:29.4729393+00:00"); + + [SetUp] + public void SetUp() + { + _httpRequest = new CustomRequest(_authHeader); + _httpMessage = new HttpMessage(_httpRequest, new ResponseClassifier()); + _httpPipelinePolicyMock = new Mock(); + } + + [Test] + [TestCase(true)] + [TestCase(false)] + public async Task ProcessAsync_WithNoToken_CallsProcessNextAsync(bool async) + { + // Arrange + var policy = new EntraTokenGuardPolicy(); + var pipelines = new ReadOnlyMemory(new HttpPipelinePolicy[] { _httpPipelinePolicyMock.Object }); + _httpPipelinePolicyMock.Setup(m => m.ProcessAsync(It.IsAny(), It.IsAny>())).Returns(new ValueTask(Task.CompletedTask)); + _httpPipelinePolicyMock.Setup(m => m.Process(It.IsAny(), It.IsAny>())).Verifiable(); + _httpMessage.Response = new MockResponse(200); + + // Act & Assert + if (async) + { + await policy.ProcessAsync(_httpMessage, pipelines); + _httpPipelinePolicyMock.Verify(p => p.ProcessAsync(_httpMessage, It.IsAny>()), Times.Once); + } + else + { + policy.Process(_httpMessage, pipelines); + _httpPipelinePolicyMock.Verify(p => p.Process(_httpMessage, It.IsAny>()), Times.Once); + } + } + + [Test] + [TestCase(true)] + [TestCase(false)] + public async Task Process_WithDifferentToken_CallsProcessNext(bool async) + { + // Arrange + var policy = new EntraTokenGuardPolicy(); + var pipelines = new ReadOnlyMemory(new HttpPipelinePolicy[] { _httpPipelinePolicyMock.Object }); + _httpPipelinePolicyMock.Setup(m => m.ProcessAsync(It.IsAny(), It.IsAny>())).Returns(new ValueTask(Task.CompletedTask)); + _httpPipelinePolicyMock.Setup(m => m.Process(It.IsAny(), It.IsAny>())).Verifiable(); + _httpMessage.Response = new MockResponse(200); + // Act & Assert + if (async) + { + await policy.ProcessAsync(_httpMessage, pipelines); + _httpRequest.UpdateAuthHeader("Bearer Token2"); + await policy.ProcessAsync(_httpMessage, pipelines); + _httpPipelinePolicyMock.Verify(p => p.ProcessAsync(_httpMessage, It.IsAny>()), Times.Exactly(2)); + } + else + { + policy.Process(_httpMessage, pipelines); + _httpRequest.UpdateAuthHeader("Bearer Token2"); + policy.Process(_httpMessage, pipelines); + _httpPipelinePolicyMock.Verify(p => p.Process(_httpMessage, It.IsAny>()), Times.Exactly(2)); + } + } + + [Test] + [TestCase(true)] + [TestCase(false)] + public async Task Process_WithInvalidAcsToken_CallsProcessNext(bool async) + { + // Arrange + var policy = new EntraTokenGuardPolicy(); + var pipelines = new ReadOnlyMemory(new HttpPipelinePolicy[] { _httpPipelinePolicyMock.Object }); + _httpPipelinePolicyMock.Setup(m => m.ProcessAsync(It.IsAny(), It.IsAny>())).Returns(new ValueTask(Task.CompletedTask)); + _httpPipelinePolicyMock.Setup(m => m.Process(It.IsAny(), It.IsAny>())).Verifiable(); + var expired = DateTimeOffset.UtcNow.AddMinutes(-1); + var expiredAcsTokenResponse = string.Format(TokenResponseTemplate, "token", expired); + _httpMessage.Response = new MockResponse(200).SetContent(expiredAcsTokenResponse); + // Act & Assert + if (async) + { + await policy.ProcessAsync(_httpMessage, pipelines); + await policy.ProcessAsync(_httpMessage, pipelines); + _httpPipelinePolicyMock.Verify(p => p.ProcessAsync(_httpMessage, It.IsAny>()), Times.Exactly(2)); + } + else + { + policy.Process(_httpMessage, pipelines); + policy.Process(_httpMessage, pipelines); + _httpPipelinePolicyMock.Verify(p => p.Process(_httpMessage, It.IsAny>()), Times.Exactly(2)); + } + } + + [Test] + [TestCase(true)] + [TestCase(false)] + public async Task Process_PrevExchangeCallFailed_CallsProcessNext(bool async) + { + // Arrange + var policy = new EntraTokenGuardPolicy(); + var pipelines = new ReadOnlyMemory(new HttpPipelinePolicy[] { _httpPipelinePolicyMock.Object }); + _httpPipelinePolicyMock.Setup(m => m.ProcessAsync(It.IsAny(), It.IsAny>())).Returns(new ValueTask(Task.CompletedTask)); + _httpPipelinePolicyMock.Setup(m => m.Process(It.IsAny(), It.IsAny>())).Verifiable(); + _httpMessage.Response = new MockResponse(400); + // Act & Assert + if (async) + { + await policy.ProcessAsync(_httpMessage, pipelines); + await policy.ProcessAsync(_httpMessage, pipelines); + _httpPipelinePolicyMock.Verify(p => p.ProcessAsync(_httpMessage, It.IsAny>()), Times.Exactly(2)); + } + else + { + policy.Process(_httpMessage, pipelines); + policy.Process(_httpMessage, pipelines); + _httpPipelinePolicyMock.Verify(p => p.Process(_httpMessage, It.IsAny>()), Times.Exactly(2)); + } + } + + [Test] + [TestCase(true)] + [TestCase(false)] + public async Task ProcessAsync_WithSameToken_DoesNotCallProcessNextAsync(bool async) + { + // Arrange + var policy = new EntraTokenGuardPolicy(); + var pipelines = new ReadOnlyMemory(new HttpPipelinePolicy[] { _httpPipelinePolicyMock.Object }); + var successfullResponse = new MockResponse(200).SetContent(TokenResponse); + _httpMessage.Response = successfullResponse; + _httpPipelinePolicyMock + .Setup(m => m.ProcessAsync(It.IsAny(), It.IsAny>())) + .Returns(new ValueTask(Task.CompletedTask)); + _httpPipelinePolicyMock + .Setup(m => m.Process(It.IsAny(), It.IsAny>())) + .Verifiable(); + // Act & Assert + if (async) + { + await policy.ProcessAsync(_httpMessage, pipelines); + _httpRequest.UpdateAuthHeader(_authHeader); + _httpPipelinePolicyMock + .Setup(m => m.ProcessAsync(It.IsAny(), It.IsAny>())) + .Callback(() => _httpMessage.Response = new MockResponse(400)) + .Returns(new ValueTask(Task.CompletedTask)); + + await policy.ProcessAsync(_httpMessage, pipelines); + _httpPipelinePolicyMock.Verify(p => p.ProcessAsync(_httpMessage, It.IsAny>()), Times.Once); + } + else + { + policy.Process(_httpMessage, pipelines); + _httpRequest.UpdateAuthHeader(_authHeader); + _httpPipelinePolicyMock + .Setup(m => m.Process(It.IsAny(), It.IsAny>())) + .Callback(() => _httpMessage.Response = new MockResponse(400)) + .Verifiable(); + + policy.Process(_httpMessage, pipelines); + _httpPipelinePolicyMock.Verify(p => p.Process(_httpMessage, It.IsAny>()), Times.Once); + } + Assert.AreEqual(successfullResponse, _httpMessage.Response); + } + + private class CustomRequest: MockRequest + { + public CustomRequest(string authHeader) + { + ClientRequestId = Guid.NewGuid().ToString(); + SetHeader("Authorization", authHeader); + } + + public void UpdateAuthHeader(string value) + { + SetHeader("Authorization", value); + } + } + } +} diff --git a/sdk/communication/Azure.Communication.Email/tests.yml b/sdk/communication/Azure.Communication.Email/tests.yml index 24286be95d28..cbdf7b96bcec 100644 --- a/sdk/communication/Azure.Communication.Email/tests.yml +++ b/sdk/communication/Azure.Communication.Email/tests.yml @@ -1,11 +1,5 @@ trigger: none -parameters: -- name: runOnlyPPE - displayName: "Run only the PPE stage" - type: boolean - default: false - extends: template: /eng/pipelines/templates/stages/archetype-sdk-tests.yml parameters: @@ -14,20 +8,7 @@ extends: CloudConfig: Public: SubscriptionConfigurations: - - $(sub-config-azure-cloud-test-resources) - $(sub-config-communication-services-cloud-test-resources-common) - $(sub-config-communication-services-cloud-test-resources-net) - Int: - SubscriptionConfigurations: - - $(sub-config-communication-int-test-resources-common) - - $(sub-config-communication-int-test-resources-net) - PPE: - SubscriptionConfigurations: - - $(sub-config-communication-ppe-test-resources-common) - - $(sub-config-communication-ppe-test-resources-net) - ${{ if eq(parameters.runOnlyPPE, true) }}: - Clouds: PPE - ${{ if eq(parameters.runOnlyPPE, false) }}: - Clouds: Public,PPE,Int TestResourceDirectories: - communication/Azure.Communication.Email/ diff --git a/sdk/communication/Azure.Communication.Identity/tests.yml b/sdk/communication/Azure.Communication.Identity/tests.yml index 153528c8359c..21ac261f4ae8 100644 --- a/sdk/communication/Azure.Communication.Identity/tests.yml +++ b/sdk/communication/Azure.Communication.Identity/tests.yml @@ -7,12 +7,8 @@ extends: Project: Azure.Communication.Identity CloudConfig: Public: - ServiceConnection: azure-sdk-tests - SubscriptionConfigurationFilePaths: - - eng/common/TestResources/sub-config/AzurePublicMsft.json SubscriptionConfigurations: - $(sub-config-communication-services-cloud-test-resources-common) - $(sub-config-communication-services-cloud-test-resources-net) - Clouds: Public TestResourceDirectories: - communication/ diff --git a/sdk/communication/Azure.Communication.JobRouter/tests.yml b/sdk/communication/Azure.Communication.JobRouter/tests.yml index f7ee7d6b6995..e331311725ca 100644 --- a/sdk/communication/Azure.Communication.JobRouter/tests.yml +++ b/sdk/communication/Azure.Communication.JobRouter/tests.yml @@ -7,12 +7,8 @@ extends: Project: Azure.Communication.JobRouter CloudConfig: Public: - ServiceConnection: azure-sdk-tests - SubscriptionConfigurationFilePaths: - - eng/common/TestResources/sub-config/AzurePublicMsft.json SubscriptionConfigurations: - $(sub-config-communication-services-cloud-test-resources-common) - $(sub-config-communication-services-cloud-test-resources-net) - Clouds: Public TestResourceDirectories: - communication/ diff --git a/sdk/communication/Azure.Communication.Messages/CHANGELOG.md b/sdk/communication/Azure.Communication.Messages/CHANGELOG.md index 21c3841cb31a..213f1788c1d7 100644 --- a/sdk/communication/Azure.Communication.Messages/CHANGELOG.md +++ b/sdk/communication/Azure.Communication.Messages/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 1.1.0-beta.1 (Unreleased) +## 1.2.0-beta.1 (Unreleased) ### Features Added @@ -10,6 +10,19 @@ ### Other Changes +## 1.1.0 (2024-10-18) + +### Features Added +- Added support for additional media message types: documents, videos, and audio. +- Introduced the following new models for enhanced media notifications: + - `DocumentNotificationContent`: for sending document notifications. + - `VideoNotificationContent`: for sending video notifications. + - `AudioNotificationContent`: for sending audio notifications. + - `ImageNotificationContent`: for sending image notifications. + +### Other Changes +- The `MediaNotificationContent` model, previously used for sending image notifications, is being deprecated. A deprecation warning will inform users to transition to the new `ImageNotificationContent` model for future use. + ## 1.0.0 (2024-02-29) ### Features Added diff --git a/sdk/communication/Azure.Communication.Messages/README.md b/sdk/communication/Azure.Communication.Messages/README.md index 93ab5c55fb7c..be6f4c3a4be3 100644 --- a/sdk/communication/Azure.Communication.Messages/README.md +++ b/sdk/communication/Azure.Communication.Messages/README.md @@ -75,7 +75,7 @@ Console.WriteLine($"Message id: {result.Receipts[0].MessageId}"); // Create the recipient list, currently only one recipient is supported var recipient = new List { "" }; var uri = new Uri("https://aka.ms/acsicon1"); -var mediaContent = new MediaNotificationContent(channelRegistrationId, recipientList, uri); +var imageContent = new ImageNotificationContent(channelRegistrationId, recipientList, uri); SendMessageResult result = await notificationMessagesClient.SendAsync(mediaContent); Console.WriteLine($"Message id: {result.Receipts[0].MessageId}"); ``` diff --git a/sdk/communication/Azure.Communication.Messages/api/Azure.Communication.Messages.netstandard2.0.cs b/sdk/communication/Azure.Communication.Messages/api/Azure.Communication.Messages.netstandard2.0.cs index 49c5a4eb1425..549564b53314 100644 --- a/sdk/communication/Azure.Communication.Messages/api/Azure.Communication.Messages.netstandard2.0.cs +++ b/sdk/communication/Azure.Communication.Messages/api/Azure.Communication.Messages.netstandard2.0.cs @@ -1,15 +1,29 @@ namespace Azure.Communication.Messages { + public partial class AudioNotificationContent : Azure.Communication.Messages.NotificationContent, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AudioNotificationContent(System.Guid channelRegistrationId, System.Collections.Generic.IEnumerable to, System.Uri mediaUri) : base (default(System.Guid), default(System.Collections.Generic.IEnumerable)) { } + public System.Uri MediaUri { get { throw null; } } + Azure.Communication.Messages.AudioNotificationContent 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.Communication.Messages.AudioNotificationContent 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 partial class CommunicationMessagesClientOptions : Azure.Core.ClientOptions { - public CommunicationMessagesClientOptions(Azure.Communication.Messages.CommunicationMessagesClientOptions.ServiceVersion version = Azure.Communication.Messages.CommunicationMessagesClientOptions.ServiceVersion.V2024_02_01) { } + public CommunicationMessagesClientOptions(Azure.Communication.Messages.CommunicationMessagesClientOptions.ServiceVersion version = Azure.Communication.Messages.CommunicationMessagesClientOptions.ServiceVersion.V2024_08_30) { } public enum ServiceVersion { V2024_02_01 = 1, + V2024_08_30 = 2, } } public static partial class CommunicationMessagesModelFactory { + public static Azure.Communication.Messages.AudioNotificationContent AudioNotificationContent(System.Guid channelRegistrationId = default(System.Guid), System.Collections.Generic.IEnumerable to = null, System.Uri mediaUri = null) { throw null; } + public static Azure.Communication.Messages.DocumentNotificationContent DocumentNotificationContent(System.Guid channelRegistrationId = default(System.Guid), System.Collections.Generic.IEnumerable to = null, string caption = null, string fileName = null, System.Uri mediaUri = null) { throw null; } + public static Azure.Communication.Messages.ImageNotificationContent ImageNotificationContent(System.Guid channelRegistrationId = default(System.Guid), System.Collections.Generic.IEnumerable to = null, string caption = null, System.Uri mediaUri = null) { throw null; } public static Azure.Communication.Messages.MediaNotificationContent MediaNotificationContent(System.Guid channelRegistrationId = default(System.Guid), System.Collections.Generic.IEnumerable to = null, string content = null, System.Uri mediaUri = null) { throw null; } public static Azure.Communication.Messages.MessageReceipt MessageReceipt(string messageId = null, string to = null) { throw null; } public static Azure.Communication.Messages.MessageTemplate MessageTemplate(string name = null, string language = null, System.Collections.Generic.IEnumerable values = null, Azure.Communication.Messages.MessageTemplateBindings bindings = null) { throw null; } @@ -24,8 +38,33 @@ public static partial class CommunicationMessagesModelFactory public static Azure.Communication.Messages.SendMessageResult SendMessageResult(System.Collections.Generic.IEnumerable receipts = null) { throw null; } public static Azure.Communication.Messages.TemplateNotificationContent TemplateNotificationContent(System.Guid channelRegistrationId = default(System.Guid), System.Collections.Generic.IEnumerable to = null, Azure.Communication.Messages.MessageTemplate template = null) { throw null; } public static Azure.Communication.Messages.TextNotificationContent TextNotificationContent(System.Guid channelRegistrationId = default(System.Guid), System.Collections.Generic.IEnumerable to = null, string content = null) { throw null; } + public static Azure.Communication.Messages.VideoNotificationContent VideoNotificationContent(System.Guid channelRegistrationId = default(System.Guid), System.Collections.Generic.IEnumerable to = null, string caption = null, System.Uri mediaUri = null) { throw null; } public static Azure.Communication.Messages.Models.Channels.WhatsAppMessageTemplateItem WhatsAppMessageTemplateItem(string name = null, string language = null, Azure.Communication.Messages.MessageTemplateStatus status = default(Azure.Communication.Messages.MessageTemplateStatus), System.BinaryData content = null) { throw null; } } + public partial class DocumentNotificationContent : Azure.Communication.Messages.NotificationContent, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DocumentNotificationContent(System.Guid channelRegistrationId, System.Collections.Generic.IEnumerable to, System.Uri mediaUri) : base (default(System.Guid), default(System.Collections.Generic.IEnumerable)) { } + public string Caption { get { throw null; } set { } } + public string FileName { get { throw null; } set { } } + public System.Uri MediaUri { get { throw null; } } + Azure.Communication.Messages.DocumentNotificationContent 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.Communication.Messages.DocumentNotificationContent 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 partial class ImageNotificationContent : Azure.Communication.Messages.NotificationContent, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ImageNotificationContent(System.Guid channelRegistrationId, System.Collections.Generic.IEnumerable to, System.Uri mediaUri) : base (default(System.Guid), default(System.Collections.Generic.IEnumerable)) { } + public string Caption { get { throw null; } set { } } + public System.Uri MediaUri { get { throw null; } } + Azure.Communication.Messages.ImageNotificationContent 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.Communication.Messages.ImageNotificationContent 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; } + } + [System.ObsoleteAttribute("`MediaNotificationContent` is being deprecated, we encourage you to use the new `ImageNotificationContent` for sending images instead.")] public partial class MediaNotificationContent : Azure.Communication.Messages.NotificationContent, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public MediaNotificationContent(System.Guid channelRegistrationId, System.Collections.Generic.IEnumerable to, System.Uri mediaUri) : base (default(System.Guid), default(System.Collections.Generic.IEnumerable)) { } @@ -258,6 +297,17 @@ public partial class TextNotificationContent : Azure.Communication.Messages.Noti 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 VideoNotificationContent : Azure.Communication.Messages.NotificationContent, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public VideoNotificationContent(System.Guid channelRegistrationId, System.Collections.Generic.IEnumerable to, System.Uri mediaUri) : base (default(System.Guid), default(System.Collections.Generic.IEnumerable)) { } + public string Caption { get { throw null; } set { } } + public System.Uri MediaUri { get { throw null; } } + Azure.Communication.Messages.VideoNotificationContent 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.Communication.Messages.VideoNotificationContent 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; } + } } namespace Azure.Communication.Messages.Models.Channels { diff --git a/sdk/communication/Azure.Communication.Messages/assets.json b/sdk/communication/Azure.Communication.Messages/assets.json index 3c137193db4e..303d5aa7d3d6 100644 --- a/sdk/communication/Azure.Communication.Messages/assets.json +++ b/sdk/communication/Azure.Communication.Messages/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/communication/Azure.Communication.Messages", - "Tag": "net/communication/Azure.Communication.Messages_456fe45c3f" + "Tag": "net/communication/Azure.Communication.Messages_a672ff69b3" } diff --git a/sdk/communication/Azure.Communication.Messages/src/Azure.Communication.Messages.csproj b/sdk/communication/Azure.Communication.Messages/src/Azure.Communication.Messages.csproj index 0a1cc6420136..c0822883c897 100644 --- a/sdk/communication/Azure.Communication.Messages/src/Azure.Communication.Messages.csproj +++ b/sdk/communication/Azure.Communication.Messages/src/Azure.Communication.Messages.csproj @@ -5,9 +5,9 @@ This client library enables working with the Microsoft Azure Communication Messages service. Azure Communication Messages Service - 1.1.0-beta.1 + 1.2.0-beta.1 - 1.0.0 + 1.1.0 Microsoft Azure Communication Messages Service;Microsoft;Azure;Azure Communication Service;Azure Communication Messages Service;Messages;Communication $(RequiredTargetFrameworks) true diff --git a/sdk/communication/Azure.Communication.Messages/src/Generated/AudioNotificationContent.Serialization.cs b/sdk/communication/Azure.Communication.Messages/src/Generated/AudioNotificationContent.Serialization.cs new file mode 100644 index 000000000000..fd632d942d5c --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/src/Generated/AudioNotificationContent.Serialization.cs @@ -0,0 +1,169 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Communication.Messages +{ + public partial class AudioNotificationContent : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AudioNotificationContent)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("mediaUri"u8); + writer.WriteStringValue(MediaUri.AbsoluteUri); + writer.WritePropertyName("channelRegistrationId"u8); + writer.WriteStringValue(ChannelRegistrationId); + writer.WritePropertyName("to"u8); + writer.WriteStartArray(); + foreach (var item in To) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind.ToString()); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + AudioNotificationContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AudioNotificationContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAudioNotificationContent(document.RootElement, options); + } + + internal static AudioNotificationContent DeserializeAudioNotificationContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Uri mediaUri = default; + Guid channelRegistrationId = default; + IList to = default; + CommunicationMessageKind kind = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("mediaUri"u8)) + { + mediaUri = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("channelRegistrationId"u8)) + { + channelRegistrationId = property.Value.GetGuid(); + continue; + } + if (property.NameEquals("to"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + to = array; + continue; + } + if (property.NameEquals("kind"u8)) + { + kind = new CommunicationMessageKind(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AudioNotificationContent(channelRegistrationId, to, kind, serializedAdditionalRawData, mediaUri); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AudioNotificationContent)} does not support writing '{options.Format}' format."); + } + } + + AudioNotificationContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeAudioNotificationContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AudioNotificationContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static new AudioNotificationContent FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeAudioNotificationContent(document.RootElement); + } + + /// Convert into a . + internal override RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/communication/Azure.Communication.Messages/src/Generated/AudioNotificationContent.cs b/sdk/communication/Azure.Communication.Messages/src/Generated/AudioNotificationContent.cs new file mode 100644 index 000000000000..653d644d43db --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/src/Generated/AudioNotificationContent.cs @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Communication.Messages +{ + /// A request to send an audio notification. + public partial class AudioNotificationContent : NotificationContent + { + /// Initializes a new instance of . + /// The Channel Registration ID for the Business Identifier. + /// The native external platform user identifiers of the recipient. + /// A media url for the file. Required if the type is one of the supported media types, e.g. image. + /// or is null. + public AudioNotificationContent(Guid channelRegistrationId, IEnumerable to, Uri mediaUri) : base(channelRegistrationId, to) + { + Argument.AssertNotNull(to, nameof(to)); + Argument.AssertNotNull(mediaUri, nameof(mediaUri)); + + Kind = CommunicationMessageKind.Audio; + MediaUri = mediaUri; + } + + /// Initializes a new instance of . + /// The Channel Registration ID for the Business Identifier. + /// The native external platform user identifiers of the recipient. + /// The type discriminator describing a notification type. + /// Keeps track of any properties unknown to the library. + /// A media url for the file. Required if the type is one of the supported media types, e.g. image. + internal AudioNotificationContent(Guid channelRegistrationId, IList to, CommunicationMessageKind kind, IDictionary serializedAdditionalRawData, Uri mediaUri) : base(channelRegistrationId, to, kind, serializedAdditionalRawData) + { + MediaUri = mediaUri; + } + + /// Initializes a new instance of for deserialization. + internal AudioNotificationContent() + { + } + + /// A media url for the file. Required if the type is one of the supported media types, e.g. image. + public Uri MediaUri { get; } + } +} diff --git a/sdk/communication/Azure.Communication.Messages/src/Generated/CommunicationMessageKind.cs b/sdk/communication/Azure.Communication.Messages/src/Generated/CommunicationMessageKind.cs index c3acdf2d8f6e..6183b42f3e9f 100644 --- a/sdk/communication/Azure.Communication.Messages/src/Generated/CommunicationMessageKind.cs +++ b/sdk/communication/Azure.Communication.Messages/src/Generated/CommunicationMessageKind.cs @@ -10,7 +10,7 @@ namespace Azure.Communication.Messages { - /// The type of message. Supports text, image, template. + /// The type of message. internal readonly partial struct CommunicationMessageKind : IEquatable { private readonly string _value; @@ -24,12 +24,24 @@ public CommunicationMessageKind(string value) private const string TextValue = "text"; private const string ImageValue = "image"; + private const string ImageV0Value = "image_v0"; + private const string DocumentValue = "document"; + private const string VideoValue = "video"; + private const string AudioValue = "audio"; private const string TemplateValue = "template"; /// Text message type. public static CommunicationMessageKind Text { get; } = new CommunicationMessageKind(TextValue); /// Image message type. public static CommunicationMessageKind Image { get; } = new CommunicationMessageKind(ImageValue); + /// Image message type. Legacy image type for `MediaNotificationContent` which is being deprecated. + public static CommunicationMessageKind ImageV0 { get; } = new CommunicationMessageKind(ImageV0Value); + /// Document message type. + public static CommunicationMessageKind Document { get; } = new CommunicationMessageKind(DocumentValue); + /// Video message type. + public static CommunicationMessageKind Video { get; } = new CommunicationMessageKind(VideoValue); + /// Audio message type. + public static CommunicationMessageKind Audio { get; } = new CommunicationMessageKind(AudioValue); /// Template message type. public static CommunicationMessageKind Template { get; } = new CommunicationMessageKind(TemplateValue); /// Determines if two values are the same. diff --git a/sdk/communication/Azure.Communication.Messages/src/Generated/CommunicationMessagesClientOptions.cs b/sdk/communication/Azure.Communication.Messages/src/Generated/CommunicationMessagesClientOptions.cs index b8babd190747..58b29e477642 100644 --- a/sdk/communication/Azure.Communication.Messages/src/Generated/CommunicationMessagesClientOptions.cs +++ b/sdk/communication/Azure.Communication.Messages/src/Generated/CommunicationMessagesClientOptions.cs @@ -13,13 +13,15 @@ namespace Azure.Communication.Messages /// Client options for Azure.Communication.Messages library clients. public partial class CommunicationMessagesClientOptions : ClientOptions { - private const ServiceVersion LatestVersion = ServiceVersion.V2024_02_01; + private const ServiceVersion LatestVersion = ServiceVersion.V2024_08_30; /// The version of the service to use. public enum ServiceVersion { /// Service version "2024-02-01". V2024_02_01 = 1, + /// Service version "2024-08-30". + V2024_08_30 = 2, } internal string Version { get; } @@ -30,6 +32,7 @@ public CommunicationMessagesClientOptions(ServiceVersion version = LatestVersion Version = version switch { ServiceVersion.V2024_02_01 => "2024-02-01", + ServiceVersion.V2024_08_30 => "2024-08-30", _ => throw new NotSupportedException() }; } diff --git a/sdk/communication/Azure.Communication.Messages/src/Generated/CommunicationMessagesModelFactory.cs b/sdk/communication/Azure.Communication.Messages/src/Generated/CommunicationMessagesModelFactory.cs index 6b9a6bad03b2..8d1a11241d35 100644 --- a/sdk/communication/Azure.Communication.Messages/src/Generated/CommunicationMessagesModelFactory.cs +++ b/sdk/communication/Azure.Communication.Messages/src/Generated/CommunicationMessagesModelFactory.cs @@ -39,25 +39,77 @@ public static TextNotificationContent TextNotificationContent(Guid channelRegist return new TextNotificationContent(channelRegistrationId, to?.ToList(), CommunicationMessageKind.Text, serializedAdditionalRawData: null, content); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The Channel Registration ID for the Business Identifier. /// The native external platform user identifiers of the recipient. - /// Optional text content. + /// Optional text content. /// A media url for the file. Required if the type is one of the supported media types, e.g. image. - /// A new instance for mocking. - public static MediaNotificationContent MediaNotificationContent(Guid channelRegistrationId = default, IEnumerable to = null, string content = null, Uri mediaUri = null) + /// A new instance for mocking. + public static ImageNotificationContent ImageNotificationContent(Guid channelRegistrationId = default, IEnumerable to = null, string caption = null, Uri mediaUri = null) { to ??= new List(); - return new MediaNotificationContent( + return new ImageNotificationContent( channelRegistrationId, to?.ToList(), CommunicationMessageKind.Image, serializedAdditionalRawData: null, - content, + caption, + mediaUri); + } + + /// Initializes a new instance of . + /// The Channel Registration ID for the Business Identifier. + /// The native external platform user identifiers of the recipient. + /// Optional text content. + /// Optional name for the file. + /// A media url for the file. Required if the type is one of the supported media types, e.g. image. + /// A new instance for mocking. + public static DocumentNotificationContent DocumentNotificationContent(Guid channelRegistrationId = default, IEnumerable to = null, string caption = null, string fileName = null, Uri mediaUri = null) + { + to ??= new List(); + + return new DocumentNotificationContent( + channelRegistrationId, + to?.ToList(), + CommunicationMessageKind.Document, + serializedAdditionalRawData: null, + caption, + fileName, mediaUri); } + /// Initializes a new instance of . + /// The Channel Registration ID for the Business Identifier. + /// The native external platform user identifiers of the recipient. + /// Optional text content. + /// A media url for the file. Required if the type is one of the supported media types, e.g. image. + /// A new instance for mocking. + public static VideoNotificationContent VideoNotificationContent(Guid channelRegistrationId = default, IEnumerable to = null, string caption = null, Uri mediaUri = null) + { + to ??= new List(); + + return new VideoNotificationContent( + channelRegistrationId, + to?.ToList(), + CommunicationMessageKind.Video, + serializedAdditionalRawData: null, + caption, + mediaUri); + } + + /// Initializes a new instance of . + /// The Channel Registration ID for the Business Identifier. + /// The native external platform user identifiers of the recipient. + /// A media url for the file. Required if the type is one of the supported media types, e.g. image. + /// A new instance for mocking. + public static AudioNotificationContent AudioNotificationContent(Guid channelRegistrationId = default, IEnumerable to = null, Uri mediaUri = null) + { + to ??= new List(); + + return new AudioNotificationContent(channelRegistrationId, to?.ToList(), CommunicationMessageKind.Audio, serializedAdditionalRawData: null, mediaUri); + } + /// Initializes a new instance of . /// The Channel Registration ID for the Business Identifier. /// The native external platform user identifiers of the recipient. diff --git a/sdk/communication/Azure.Communication.Messages/src/Generated/DocumentNotificationContent.Serialization.cs b/sdk/communication/Azure.Communication.Messages/src/Generated/DocumentNotificationContent.Serialization.cs new file mode 100644 index 000000000000..1db461c8fe66 --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/src/Generated/DocumentNotificationContent.Serialization.cs @@ -0,0 +1,198 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Communication.Messages +{ + public partial class DocumentNotificationContent : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DocumentNotificationContent)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Caption)) + { + writer.WritePropertyName("caption"u8); + writer.WriteStringValue(Caption); + } + if (Optional.IsDefined(FileName)) + { + writer.WritePropertyName("fileName"u8); + writer.WriteStringValue(FileName); + } + writer.WritePropertyName("mediaUri"u8); + writer.WriteStringValue(MediaUri.AbsoluteUri); + writer.WritePropertyName("channelRegistrationId"u8); + writer.WriteStringValue(ChannelRegistrationId); + writer.WritePropertyName("to"u8); + writer.WriteStartArray(); + foreach (var item in To) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind.ToString()); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + DocumentNotificationContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DocumentNotificationContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDocumentNotificationContent(document.RootElement, options); + } + + internal static DocumentNotificationContent DeserializeDocumentNotificationContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string caption = default; + string fileName = default; + Uri mediaUri = default; + Guid channelRegistrationId = default; + IList to = default; + CommunicationMessageKind kind = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("caption"u8)) + { + caption = property.Value.GetString(); + continue; + } + if (property.NameEquals("fileName"u8)) + { + fileName = property.Value.GetString(); + continue; + } + if (property.NameEquals("mediaUri"u8)) + { + mediaUri = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("channelRegistrationId"u8)) + { + channelRegistrationId = property.Value.GetGuid(); + continue; + } + if (property.NameEquals("to"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + to = array; + continue; + } + if (property.NameEquals("kind"u8)) + { + kind = new CommunicationMessageKind(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DocumentNotificationContent( + channelRegistrationId, + to, + kind, + serializedAdditionalRawData, + caption, + fileName, + mediaUri); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DocumentNotificationContent)} does not support writing '{options.Format}' format."); + } + } + + DocumentNotificationContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeDocumentNotificationContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DocumentNotificationContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static new DocumentNotificationContent FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeDocumentNotificationContent(document.RootElement); + } + + /// Convert into a . + internal override RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/communication/Azure.Communication.Messages/src/Generated/DocumentNotificationContent.cs b/sdk/communication/Azure.Communication.Messages/src/Generated/DocumentNotificationContent.cs new file mode 100644 index 000000000000..b0df98032fa7 --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/src/Generated/DocumentNotificationContent.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Communication.Messages +{ + /// A request to send a document notification. + public partial class DocumentNotificationContent : NotificationContent + { + /// Initializes a new instance of . + /// The Channel Registration ID for the Business Identifier. + /// The native external platform user identifiers of the recipient. + /// A media url for the file. Required if the type is one of the supported media types, e.g. image. + /// or is null. + public DocumentNotificationContent(Guid channelRegistrationId, IEnumerable to, Uri mediaUri) : base(channelRegistrationId, to) + { + Argument.AssertNotNull(to, nameof(to)); + Argument.AssertNotNull(mediaUri, nameof(mediaUri)); + + Kind = CommunicationMessageKind.Document; + MediaUri = mediaUri; + } + + /// Initializes a new instance of . + /// The Channel Registration ID for the Business Identifier. + /// The native external platform user identifiers of the recipient. + /// The type discriminator describing a notification type. + /// Keeps track of any properties unknown to the library. + /// Optional text content. + /// Optional name for the file. + /// A media url for the file. Required if the type is one of the supported media types, e.g. image. + internal DocumentNotificationContent(Guid channelRegistrationId, IList to, CommunicationMessageKind kind, IDictionary serializedAdditionalRawData, string caption, string fileName, Uri mediaUri) : base(channelRegistrationId, to, kind, serializedAdditionalRawData) + { + Caption = caption; + FileName = fileName; + MediaUri = mediaUri; + } + + /// Initializes a new instance of for deserialization. + internal DocumentNotificationContent() + { + } + + /// Optional text content. + public string Caption { get; set; } + /// Optional name for the file. + public string FileName { get; set; } + /// A media url for the file. Required if the type is one of the supported media types, e.g. image. + public Uri MediaUri { get; } + } +} diff --git a/sdk/communication/Azure.Communication.Messages/src/Generated/ImageNotificationContent.Serialization.cs b/sdk/communication/Azure.Communication.Messages/src/Generated/ImageNotificationContent.Serialization.cs new file mode 100644 index 000000000000..db5ee3353a02 --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/src/Generated/ImageNotificationContent.Serialization.cs @@ -0,0 +1,186 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Communication.Messages +{ + public partial class ImageNotificationContent : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ImageNotificationContent)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Caption)) + { + writer.WritePropertyName("caption"u8); + writer.WriteStringValue(Caption); + } + writer.WritePropertyName("mediaUri"u8); + writer.WriteStringValue(MediaUri.AbsoluteUri); + writer.WritePropertyName("channelRegistrationId"u8); + writer.WriteStringValue(ChannelRegistrationId); + writer.WritePropertyName("to"u8); + writer.WriteStartArray(); + foreach (var item in To) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind.ToString()); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + ImageNotificationContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ImageNotificationContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeImageNotificationContent(document.RootElement, options); + } + + internal static ImageNotificationContent DeserializeImageNotificationContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string caption = default; + Uri mediaUri = default; + Guid channelRegistrationId = default; + IList to = default; + CommunicationMessageKind kind = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("caption"u8)) + { + caption = property.Value.GetString(); + continue; + } + if (property.NameEquals("mediaUri"u8)) + { + mediaUri = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("channelRegistrationId"u8)) + { + channelRegistrationId = property.Value.GetGuid(); + continue; + } + if (property.NameEquals("to"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + to = array; + continue; + } + if (property.NameEquals("kind"u8)) + { + kind = new CommunicationMessageKind(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ImageNotificationContent( + channelRegistrationId, + to, + kind, + serializedAdditionalRawData, + caption, + mediaUri); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ImageNotificationContent)} does not support writing '{options.Format}' format."); + } + } + + ImageNotificationContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeImageNotificationContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ImageNotificationContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static new ImageNotificationContent FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeImageNotificationContent(document.RootElement); + } + + /// Convert into a . + internal override RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/communication/Azure.Communication.Messages/src/Generated/ImageNotificationContent.cs b/sdk/communication/Azure.Communication.Messages/src/Generated/ImageNotificationContent.cs new file mode 100644 index 000000000000..491a9660efe2 --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/src/Generated/ImageNotificationContent.cs @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Communication.Messages +{ + /// A request to send an image notification. + public partial class ImageNotificationContent : NotificationContent + { + /// Initializes a new instance of . + /// The Channel Registration ID for the Business Identifier. + /// The native external platform user identifiers of the recipient. + /// A media url for the file. Required if the type is one of the supported media types, e.g. image. + /// or is null. + public ImageNotificationContent(Guid channelRegistrationId, IEnumerable to, Uri mediaUri) : base(channelRegistrationId, to) + { + Argument.AssertNotNull(to, nameof(to)); + Argument.AssertNotNull(mediaUri, nameof(mediaUri)); + + Kind = CommunicationMessageKind.Image; + MediaUri = mediaUri; + } + + /// Initializes a new instance of . + /// The Channel Registration ID for the Business Identifier. + /// The native external platform user identifiers of the recipient. + /// The type discriminator describing a notification type. + /// Keeps track of any properties unknown to the library. + /// Optional text content. + /// A media url for the file. Required if the type is one of the supported media types, e.g. image. + internal ImageNotificationContent(Guid channelRegistrationId, IList to, CommunicationMessageKind kind, IDictionary serializedAdditionalRawData, string caption, Uri mediaUri) : base(channelRegistrationId, to, kind, serializedAdditionalRawData) + { + Caption = caption; + MediaUri = mediaUri; + } + + /// Initializes a new instance of for deserialization. + internal ImageNotificationContent() + { + } + + /// Optional text content. + public string Caption { get; set; } + /// A media url for the file. Required if the type is one of the supported media types, e.g. image. + public Uri MediaUri { get; } + } +} diff --git a/sdk/communication/Azure.Communication.Messages/src/Generated/MediaNotificationContent.cs b/sdk/communication/Azure.Communication.Messages/src/Generated/MediaNotificationContent.cs index e2723800a37e..36dbed204ede 100644 --- a/sdk/communication/Azure.Communication.Messages/src/Generated/MediaNotificationContent.cs +++ b/sdk/communication/Azure.Communication.Messages/src/Generated/MediaNotificationContent.cs @@ -10,7 +10,8 @@ namespace Azure.Communication.Messages { - /// A request to send a media notification. + /// @deprecated A request to send an image notification. + [Obsolete("`MediaNotificationContent` is being deprecated, we encourage you to use the new `ImageNotificationContent` for sending images instead.")] public partial class MediaNotificationContent : NotificationContent { /// Initializes a new instance of . @@ -23,7 +24,7 @@ public MediaNotificationContent(Guid channelRegistrationId, IEnumerable Argument.AssertNotNull(to, nameof(to)); Argument.AssertNotNull(mediaUri, nameof(mediaUri)); - Kind = CommunicationMessageKind.Image; + Kind = CommunicationMessageKind.ImageV0; MediaUri = mediaUri; } diff --git a/sdk/communication/Azure.Communication.Messages/src/Generated/NotificationContent.Serialization.cs b/sdk/communication/Azure.Communication.Messages/src/Generated/NotificationContent.Serialization.cs index 5facd47ab37d..25e6680f3123 100644 --- a/sdk/communication/Azure.Communication.Messages/src/Generated/NotificationContent.Serialization.cs +++ b/sdk/communication/Azure.Communication.Messages/src/Generated/NotificationContent.Serialization.cs @@ -67,26 +67,6 @@ NotificationContent IJsonModel.Create(ref Utf8JsonReader re return DeserializeNotificationContent(document.RootElement, options); } - internal static NotificationContent DeserializeNotificationContent(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - if (element.TryGetProperty("kind", out JsonElement discriminator)) - { - switch (discriminator.GetString()) - { - case "image": return MediaNotificationContent.DeserializeMediaNotificationContent(element, options); - case "template": return TemplateNotificationContent.DeserializeTemplateNotificationContent(element, options); - case "text": return TextNotificationContent.DeserializeTextNotificationContent(element, options); - } - } - return UnknownNotificationContent.DeserializeUnknownNotificationContent(element, options); - } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; diff --git a/sdk/communication/Azure.Communication.Messages/src/Generated/NotificationContent.cs b/sdk/communication/Azure.Communication.Messages/src/Generated/NotificationContent.cs index aff041bf7970..68f1f22e3469 100644 --- a/sdk/communication/Azure.Communication.Messages/src/Generated/NotificationContent.cs +++ b/sdk/communication/Azure.Communication.Messages/src/Generated/NotificationContent.cs @@ -14,7 +14,7 @@ namespace Azure.Communication.Messages /// /// Details of the message to send. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , and . + /// The available derived classes include , , , , , and . /// public abstract partial class NotificationContent { diff --git a/sdk/communication/Azure.Communication.Messages/src/Generated/VideoNotificationContent.Serialization.cs b/sdk/communication/Azure.Communication.Messages/src/Generated/VideoNotificationContent.Serialization.cs new file mode 100644 index 000000000000..cf6e676ed1c4 --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/src/Generated/VideoNotificationContent.Serialization.cs @@ -0,0 +1,186 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Communication.Messages +{ + public partial class VideoNotificationContent : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(VideoNotificationContent)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Caption)) + { + writer.WritePropertyName("caption"u8); + writer.WriteStringValue(Caption); + } + writer.WritePropertyName("mediaUri"u8); + writer.WriteStringValue(MediaUri.AbsoluteUri); + writer.WritePropertyName("channelRegistrationId"u8); + writer.WriteStringValue(ChannelRegistrationId); + writer.WritePropertyName("to"u8); + writer.WriteStartArray(); + foreach (var item in To) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind.ToString()); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + VideoNotificationContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(VideoNotificationContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeVideoNotificationContent(document.RootElement, options); + } + + internal static VideoNotificationContent DeserializeVideoNotificationContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string caption = default; + Uri mediaUri = default; + Guid channelRegistrationId = default; + IList to = default; + CommunicationMessageKind kind = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("caption"u8)) + { + caption = property.Value.GetString(); + continue; + } + if (property.NameEquals("mediaUri"u8)) + { + mediaUri = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("channelRegistrationId"u8)) + { + channelRegistrationId = property.Value.GetGuid(); + continue; + } + if (property.NameEquals("to"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + to = array; + continue; + } + if (property.NameEquals("kind"u8)) + { + kind = new CommunicationMessageKind(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new VideoNotificationContent( + channelRegistrationId, + to, + kind, + serializedAdditionalRawData, + caption, + mediaUri); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(VideoNotificationContent)} does not support writing '{options.Format}' format."); + } + } + + VideoNotificationContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeVideoNotificationContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(VideoNotificationContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static new VideoNotificationContent FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeVideoNotificationContent(document.RootElement); + } + + /// Convert into a . + internal override RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/communication/Azure.Communication.Messages/src/Generated/VideoNotificationContent.cs b/sdk/communication/Azure.Communication.Messages/src/Generated/VideoNotificationContent.cs new file mode 100644 index 000000000000..d78ee546a59a --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/src/Generated/VideoNotificationContent.cs @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Communication.Messages +{ + /// A request to send a video notification. + public partial class VideoNotificationContent : NotificationContent + { + /// Initializes a new instance of . + /// The Channel Registration ID for the Business Identifier. + /// The native external platform user identifiers of the recipient. + /// A media url for the file. Required if the type is one of the supported media types, e.g. image. + /// or is null. + public VideoNotificationContent(Guid channelRegistrationId, IEnumerable to, Uri mediaUri) : base(channelRegistrationId, to) + { + Argument.AssertNotNull(to, nameof(to)); + Argument.AssertNotNull(mediaUri, nameof(mediaUri)); + + Kind = CommunicationMessageKind.Video; + MediaUri = mediaUri; + } + + /// Initializes a new instance of . + /// The Channel Registration ID for the Business Identifier. + /// The native external platform user identifiers of the recipient. + /// The type discriminator describing a notification type. + /// Keeps track of any properties unknown to the library. + /// Optional text content. + /// A media url for the file. Required if the type is one of the supported media types, e.g. image. + internal VideoNotificationContent(Guid channelRegistrationId, IList to, CommunicationMessageKind kind, IDictionary serializedAdditionalRawData, string caption, Uri mediaUri) : base(channelRegistrationId, to, kind, serializedAdditionalRawData) + { + Caption = caption; + MediaUri = mediaUri; + } + + /// Initializes a new instance of for deserialization. + internal VideoNotificationContent() + { + } + + /// Optional text content. + public string Caption { get; set; } + /// A media url for the file. Required if the type is one of the supported media types, e.g. image. + public Uri MediaUri { get; } + } +} diff --git a/sdk/communication/Azure.Communication.Messages/src/Models/CommunicationMessagesModelFactory.cs b/sdk/communication/Azure.Communication.Messages/src/Models/CommunicationMessagesModelFactory.cs new file mode 100644 index 000000000000..6bd0e4ec9f43 --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/src/Models/CommunicationMessagesModelFactory.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Communication.Messages.Models.Channels; + +namespace Azure.Communication.Messages +{ + /// Model factory for models. + public static partial class CommunicationMessagesModelFactory + { +#pragma warning disable CS0618 // Type or member is obsolete - Need to manually add this custom code due to the defect here: https://github.com/Azure/autorest.csharp/issues/5114 + /// Initializes a new instance of . + /// The Channel Registration ID for the Business Identifier. + /// The native external platform user identifiers of the recipient. + /// Optional text content. + /// A media url for the file. Required if the type is one of the supported media types, e.g. image. + /// A new instance for mocking. + public static MediaNotificationContent MediaNotificationContent(Guid channelRegistrationId = default, IEnumerable to = null, string content = null, Uri mediaUri = null) + { + to ??= new List(); + + return new MediaNotificationContent( + channelRegistrationId, + to?.ToList(), + CommunicationMessageKind.ImageV0, + serializedAdditionalRawData: null, + content, + mediaUri); + } + } +#pragma warning restore CS0618 // Type or member is obsolete - Need to manually add this custom code due to the defect here: https://github.com/Azure/autorest.csharp/issues/5114 +} diff --git a/sdk/communication/Azure.Communication.Messages/src/Models/NotificationContent.Serialization.cs b/sdk/communication/Azure.Communication.Messages/src/Models/NotificationContent.Serialization.cs new file mode 100644 index 000000000000..d2231da6dc18 --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/src/Models/NotificationContent.Serialization.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Communication.Messages +{ + public partial class NotificationContent : IUtf8JsonSerializable, IJsonModel + { + internal static NotificationContent DeserializeNotificationContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("kind", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "audio": return AudioNotificationContent.DeserializeAudioNotificationContent(element, options); + case "document": return DocumentNotificationContent.DeserializeDocumentNotificationContent(element, options); + case "image": return ImageNotificationContent.DeserializeImageNotificationContent(element, options); +#pragma warning disable CS0618 // Type or member is obsolete - Need to manually add this custom code due to the defect here: https://github.com/Azure/autorest.csharp/issues/5114 + case "image_v0": return MediaNotificationContent.DeserializeMediaNotificationContent(element, options); +#pragma warning restore CS0618 // Type or member is obsolete - Need to manually add this custom code due to the defect here: https://github.com/Azure/autorest.csharp/issues/5114 + case "template": return TemplateNotificationContent.DeserializeTemplateNotificationContent(element, options); + case "text": return TextNotificationContent.DeserializeTextNotificationContent(element, options); + case "video": return VideoNotificationContent.DeserializeVideoNotificationContent(element, options); + } + } + return UnknownNotificationContent.DeserializeUnknownNotificationContent(element, options); + } + } +} diff --git a/sdk/communication/Azure.Communication.Messages/tests.yml b/sdk/communication/Azure.Communication.Messages/tests.yml index 56c818c046ec..ff1252d10735 100644 --- a/sdk/communication/Azure.Communication.Messages/tests.yml +++ b/sdk/communication/Azure.Communication.Messages/tests.yml @@ -6,9 +6,7 @@ extends: ServiceDirectory: communication Project: Azure.Communication.Messages CloudConfig: - Public: + PUblic: SubscriptionConfigurations: - - $(sub-config-azure-cloud-test-resources) - $(sub-config-communication-services-cloud-test-resources-common) - $(sub-config-communication-services-cloud-test-resources-net) - Clouds: Public diff --git a/sdk/communication/Azure.Communication.Messages/tests/NotificationMessagesClient/NotificationMessagesClientLiveTests.cs b/sdk/communication/Azure.Communication.Messages/tests/NotificationMessagesClient/NotificationMessagesClientLiveTests.cs index 5cc13371ae4a..5a5d28ac26e5 100644 --- a/sdk/communication/Azure.Communication.Messages/tests/NotificationMessagesClient/NotificationMessagesClientLiveTests.cs +++ b/sdk/communication/Azure.Communication.Messages/tests/NotificationMessagesClient/NotificationMessagesClientLiveTests.cs @@ -17,9 +17,10 @@ public NotificationMessagesClientLiveTests(bool isAsync) : base(isAsync) { } - public const string ImageUrl = "https://upload.wikimedia.org/wikipedia/commons/3/30/Building92microsoft.jpg"; - public const string VideoUrl = "https://sample-videos.com/video321/mp4/720/big_buck_bunny_720p_1mb.mp4"; - public const string DocumentUrl = "https://file-examples.com/storage/fe63e96e0365c0e1e99a842/2017/10/file-sample_150kB.pdf"; + public static readonly Uri ImageUrl = new Uri("https://filesamples.com/samples/image/jpg/sample_640%C3%97426.jpg"); + public static readonly Uri DocumentUrl = new Uri("https://filesamples.com/samples/document/pdf/sample2.pdf"); + public static readonly Uri VideoUrl = new Uri("https://filesamples.com/samples/video/3gp/sample_640x360.3gp"); + public static readonly Uri AudioUrl = new Uri("https://filesamples.com/samples/audio/mp3/sample3.mp3"); [Test] public async Task SendTextMessage_ShouldSucceed() @@ -49,6 +50,62 @@ public async Task SendTextMessage_WithAzureKeyCredential_ShouldSucceed() validateResponse(response); } + [Test] + public async Task SendImageMessage_ShouldSucceed() + { + // Arrange + NotificationMessagesClient notificationMessagesClient = CreateInstrumentedNotificationMessagesClient(); + ImageNotificationContent content = new(new Guid(TestEnvironment.SenderChannelRegistrationId), new List { TestEnvironment.RecipientIdentifier }, ImageUrl); + + // Act + Response response = await notificationMessagesClient.SendAsync(content); + + // Assert + validateResponse(response); + } + + [Test] + public async Task SendAudioMessage_ShouldSucceed() + { + // Arrange + NotificationMessagesClient notificationMessagesClient = CreateInstrumentedNotificationMessagesClient(); + AudioNotificationContent content = new(new Guid(TestEnvironment.SenderChannelRegistrationId), new List { TestEnvironment.RecipientIdentifier }, AudioUrl); + + // Act + Response response = await notificationMessagesClient.SendAsync(content); + + // Assert + validateResponse(response); + } + + [Test] + public async Task SendVideoMessage_ShouldSucceed() + { + // Arrange + NotificationMessagesClient notificationMessagesClient = CreateInstrumentedNotificationMessagesClient(); + VideoNotificationContent content = new(new Guid(TestEnvironment.SenderChannelRegistrationId), new List { TestEnvironment.RecipientIdentifier }, VideoUrl); + + // Act + Response response = await notificationMessagesClient.SendAsync(content); + + // Assert + validateResponse(response); + } + + [Test] + public async Task SendDocumentMessage_ShouldSucceed() + { + // Arrange + NotificationMessagesClient notificationMessagesClient = CreateInstrumentedNotificationMessagesClient(); + DocumentNotificationContent content = new(new Guid(TestEnvironment.SenderChannelRegistrationId), new List { TestEnvironment.RecipientIdentifier }, DocumentUrl); + + // Act + Response response = await notificationMessagesClient.SendAsync(content); + + // Assert + validateResponse(response); + } + [Test] public async Task SendShippingConfirmationTemplateMessage_ShouldSucceed() { @@ -84,7 +141,7 @@ public async Task SendPurchaseFeedbackTemplateMessage_ShouldSucceed() Guid channelRegistrationId = new(TestEnvironment.SenderChannelRegistrationId); IList recipients = new List { TestEnvironment.RecipientIdentifier }; - var image = new MessageTemplateImage("image", new Uri(ImageUrl)); + var image = new MessageTemplateImage("image", ImageUrl); var product = new MessageTemplateText("product", "Microsoft Office"); WhatsAppMessageTemplateBindings bindings = new(); @@ -148,7 +205,7 @@ public async Task SendHappyHourAnnocementTemplateMessage_ShouldSucceed() var venue = new MessageTemplateText("venue", "Starbucks"); var time = new MessageTemplateText("time", "Today 2-4PM"); - var video = new MessageTemplateVideo("video", new Uri(VideoUrl)); + var video = new MessageTemplateVideo("video", VideoUrl); WhatsAppMessageTemplateBindings bindings = new(); bindings.Header.Add(new(video.Name)); @@ -178,7 +235,7 @@ public async Task SendFlightConfirmationTemplateMessage_ShouldSucceed() Guid channelRegistrationId = new(TestEnvironment.SenderChannelRegistrationId); IList recipients = new List { TestEnvironment.RecipientIdentifier }; - var document = new MessageTemplateDocument("document", new Uri(DocumentUrl)); + var document = new MessageTemplateDocument("document", DocumentUrl); var firstName = new MessageTemplateText("firstName", "Gloria"); var lastName = new MessageTemplateText("lastName", "Li"); var date = new MessageTemplateText("date", "July 1st, 2023"); @@ -213,7 +270,7 @@ public async Task SendMovieTicketConfirmationTemplateMessage_ShouldSucceed() Guid channelRegistrationId = new(TestEnvironment.SenderChannelRegistrationId); IList recipients = new List { TestEnvironment.RecipientIdentifier }; - var image = new MessageTemplateImage("image", new Uri(ImageUrl)); + var image = new MessageTemplateImage("image", ImageUrl); var title = new MessageTemplateText("title", "Avengers"); var time = new MessageTemplateText("time", "July 1st, 2023 12:30PM"); var venue = new MessageTemplateText("venue", "Cineplex"); @@ -257,7 +314,6 @@ public Task SendTextMessage_WithEmptyContent_ShouldFail() // Assert the expected error code and message Assert.AreEqual(400, ex.Status); Assert.AreEqual("BadRequest", ex.ErrorCode); - Assert.IsTrue(ex.Message.Contains("A non-empty \"Content\" is required when message type is Text.")); return Task.CompletedTask; } diff --git a/sdk/communication/Azure.Communication.Messages/tsp-location.yaml b/sdk/communication/Azure.Communication.Messages/tsp-location.yaml index 01b9db9a86ed..9c9e66f49dcd 100644 --- a/sdk/communication/Azure.Communication.Messages/tsp-location.yaml +++ b/sdk/communication/Azure.Communication.Messages/tsp-location.yaml @@ -1,4 +1,4 @@ -commit: b8ec3841224e5a9a27c128e588b1c387baef6a99 +commit: abe3209e7c6924a58ab560ebab2349bc8fde6aa7 directory: specification/communication/Communication.Messages additionalDirectories: [] repo: Azure/azure-rest-api-specs diff --git a/sdk/communication/Azure.Communication.Messages/tspCodeModel.json b/sdk/communication/Azure.Communication.Messages/tspCodeModel.json index 9fe924877754..b8adc70f64df 100644 --- a/sdk/communication/Azure.Communication.Messages/tspCodeModel.json +++ b/sdk/communication/Azure.Communication.Messages/tspCodeModel.json @@ -2,7 +2,8 @@ "$id": "1", "Name": "Azure.Communication.MessagesService", "ApiVersions": [ - "2024-02-01" + "2024-02-01", + "2024-08-30" ], "Enums": [ { @@ -57,10 +58,82 @@ { "$id": "8", "kind": "enumvalue", + "name": "image_v0", + "value": "image_v0", + "valueType": { + "$id": "9", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "2" + }, + "description": "Image message type. Legacy image type for `MediaNotificationContent` which is being deprecated", + "decorators": [] + }, + { + "$id": "10", + "kind": "enumvalue", + "name": "document", + "value": "document", + "valueType": { + "$id": "11", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "2" + }, + "description": "Document message type.", + "decorators": [] + }, + { + "$id": "12", + "kind": "enumvalue", + "name": "video", + "value": "video", + "valueType": { + "$id": "13", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "2" + }, + "description": "Video message type.", + "decorators": [] + }, + { + "$id": "14", + "kind": "enumvalue", + "name": "audio", + "value": "audio", + "valueType": { + "$id": "15", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "2" + }, + "description": "Audio message type.", + "decorators": [] + }, + { + "$id": "16", + "kind": "enumvalue", "name": "template", "value": "template", "valueType": { - "$id": "9", + "$id": "17", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -73,19 +146,19 @@ "decorators": [] } ], - "description": "The type of message. Supports text, image, template.", + "description": "The type of message.", "isFixed": false, "isFlags": false, "usage": "Input,Json", "decorators": [] }, { - "$id": "10", + "$id": "18", "kind": "enum", "name": "MessageTemplateValueKind", "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplateValueKind", "valueType": { - "$id": "11", + "$id": "19", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -93,109 +166,109 @@ }, "values": [ { - "$id": "12", + "$id": "20", "kind": "enumvalue", "name": "text", "value": "text", "valueType": { - "$id": "13", + "$id": "21", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "10" + "$ref": "18" }, "description": "The text template parameter type.", "decorators": [] }, { - "$id": "14", + "$id": "22", "kind": "enumvalue", "name": "image", "value": "image", "valueType": { - "$id": "15", + "$id": "23", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "10" + "$ref": "18" }, "description": "The image template parameter type.", "decorators": [] }, { - "$id": "16", + "$id": "24", "kind": "enumvalue", "name": "document", "value": "document", "valueType": { - "$id": "17", + "$id": "25", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "10" + "$ref": "18" }, "description": "The document template parameter type.", "decorators": [] }, { - "$id": "18", + "$id": "26", "kind": "enumvalue", "name": "video", "value": "video", "valueType": { - "$id": "19", + "$id": "27", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "10" + "$ref": "18" }, "description": "The video template parameter type.", "decorators": [] }, { - "$id": "20", + "$id": "28", "kind": "enumvalue", "name": "location", "value": "location", "valueType": { - "$id": "21", + "$id": "29", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "10" + "$ref": "18" }, "description": "The location template parameter type.", "decorators": [] }, { - "$id": "22", + "$id": "30", "kind": "enumvalue", "name": "quickAction", "value": "quickAction", "valueType": { - "$id": "23", + "$id": "31", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "10" + "$ref": "18" }, "description": "The quick action template parameter type.", "decorators": [] @@ -208,12 +281,12 @@ "decorators": [] }, { - "$id": "24", + "$id": "32", "kind": "enum", "name": "MessageTemplateBindingsKind", "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplateBindingsKind", "valueType": { - "$id": "25", + "$id": "33", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -221,19 +294,19 @@ }, "values": [ { - "$id": "26", + "$id": "34", "kind": "enumvalue", "name": "whatsApp", "value": "whatsApp", "valueType": { - "$id": "27", + "$id": "35", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "24" + "$ref": "32" }, "description": "The WhatsApp template type.", "decorators": [] @@ -246,12 +319,12 @@ "decorators": [] }, { - "$id": "28", + "$id": "36", "kind": "enum", "name": "WhatsAppMessageButtonSubType", "crossLanguageDefinitionId": "Azure.Communication.MessagesService.WhatsAppMessageButtonSubType", "valueType": { - "$id": "29", + "$id": "37", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -259,37 +332,37 @@ }, "values": [ { - "$id": "30", + "$id": "38", "kind": "enumvalue", "name": "quickReply", "value": "quickReply", "valueType": { - "$id": "31", + "$id": "39", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "28" + "$ref": "36" }, "description": "The WhatsApp button sub type is quick reply.", "decorators": [] }, { - "$id": "32", + "$id": "40", "kind": "enumvalue", "name": "url", "value": "url", "valueType": { - "$id": "33", + "$id": "41", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "28" + "$ref": "36" }, "description": "The WhatsApp button sub type is url.", "decorators": [] @@ -302,12 +375,12 @@ "decorators": [] }, { - "$id": "34", + "$id": "42", "kind": "enum", "name": "Versions", "crossLanguageDefinitionId": "Azure.Communication.MessagesService.Versions", "valueType": { - "$id": "35", + "$id": "43", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -315,22 +388,40 @@ }, "values": [ { - "$id": "36", + "$id": "44", "kind": "enumvalue", "name": "c2024_02_01", "value": "2024-02-01", "valueType": { - "$id": "37", + "$id": "45", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "34" + "$ref": "42" }, "description": "Azure Communication Messages 2024-02-01 api version", "decorators": [] + }, + { + "$id": "46", + "kind": "enumvalue", + "name": "c2024_08_30", + "value": "2024-08-30", + "valueType": { + "$id": "47", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "42" + }, + "description": "Azure Communication Messages 2024-08-30 api version", + "decorators": [] } ], "description": "Azure Communication Messages Versions", @@ -340,12 +431,12 @@ "decorators": [] }, { - "$id": "38", + "$id": "48", "kind": "enum", "name": "MessageTemplateStatus", "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplateStatus", "valueType": { - "$id": "39", + "$id": "49", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -353,73 +444,73 @@ }, "values": [ { - "$id": "40", + "$id": "50", "kind": "enumvalue", "name": "approved", "value": "approved", "valueType": { - "$id": "41", + "$id": "51", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "38" + "$ref": "48" }, "description": "Message template is approved.", "decorators": [] }, { - "$id": "42", + "$id": "52", "kind": "enumvalue", "name": "rejected", "value": "rejected", "valueType": { - "$id": "43", + "$id": "53", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "38" + "$ref": "48" }, "description": "Message template is rejected.", "decorators": [] }, { - "$id": "44", + "$id": "54", "kind": "enumvalue", "name": "pending", "value": "pending", "valueType": { - "$id": "45", + "$id": "55", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "38" + "$ref": "48" }, "description": "Message template is pending.", "decorators": [] }, { - "$id": "46", + "$id": "56", "kind": "enumvalue", "name": "paused", "value": "paused", "valueType": { - "$id": "47", + "$id": "57", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "38" + "$ref": "48" }, "description": "Message template is paused.", "decorators": [] @@ -432,12 +523,12 @@ "decorators": [] }, { - "$id": "48", + "$id": "58", "kind": "enum", "name": "CommunicationMessagesChannel", "crossLanguageDefinitionId": "Azure.Communication.MessagesService.CommunicationMessagesChannel", "valueType": { - "$id": "49", + "$id": "59", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -445,19 +536,19 @@ }, "values": [ { - "$id": "50", + "$id": "60", "kind": "enumvalue", "name": "whatsApp", "value": "whatsApp", "valueType": { - "$id": "51", + "$id": "61", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "48" + "$ref": "58" }, "description": "The WhatsApp communication messages channel type.", "decorators": [] @@ -470,12 +561,12 @@ "decorators": [] }, { - "$id": "52", + "$id": "62", "kind": "enum", "name": "RepeatabilityResult", "crossLanguageDefinitionId": "Azure.Core.RepeatabilityResult", "valueType": { - "$id": "53", + "$id": "63", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -483,37 +574,37 @@ }, "values": [ { - "$id": "54", + "$id": "64", "kind": "enumvalue", "name": "accepted", "value": "accepted", "valueType": { - "$id": "55", + "$id": "65", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "52" + "$ref": "62" }, "description": "If the request was accepted and the server guarantees that the server state reflects a single execution of the operation.", "decorators": [] }, { - "$id": "56", + "$id": "66", "kind": "enumvalue", "name": "rejected", "value": "rejected", "valueType": { - "$id": "57", + "$id": "67", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "52" + "$ref": "62" }, "description": "If the request was rejected because the combination of Repeatability-First-Sent and Repeatability-Request-ID were invalid\nor because the Repeatability-First-Sent value was outside the range of values held by the server.", "decorators": [] @@ -528,7 +619,7 @@ ], "Models": [ { - "$id": "58", + "$id": "68", "kind": "model", "name": "NotificationContent", "crossLanguageDefinitionId": "Azure.Communication.MessagesService.NotificationContent", @@ -536,7 +627,7 @@ "description": "Details of the message to send.", "decorators": [], "discriminatorProperty": { - "$id": "59", + "$id": "69", "kind": "property", "name": "kind", "serializedName": "kind", @@ -547,23 +638,24 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.NotificationContent.kind" }, "properties": [ { - "$id": "60", + "$id": "70", "kind": "property", "name": "channelRegistrationId", "serializedName": "channelRegistrationId", "description": "The Channel Registration ID for the Business Identifier.", "type": { - "$id": "61", + "$id": "71", "kind": "string", "name": "uuid", "crossLanguageDefinitionId": "Azure.Core.uuid", "baseType": { - "$id": "62", + "$id": "72", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -574,21 +666,22 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.NotificationContent.channelRegistrationId" }, { - "$id": "63", + "$id": "73", "kind": "property", "name": "to", "serializedName": "to", "description": "The native external platform user identifiers of the recipient.", "type": { - "$id": "64", + "$id": "74", "kind": "array", "name": "Array", "valueType": { - "$id": "65", + "$id": "75", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -600,17 +693,18 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.NotificationContent.to" }, { - "$ref": "59" + "$ref": "69" } ], "discriminatedSubtypes": { - "$id": "66", + "$id": "76", "text": { - "$id": "67", + "$id": "77", "kind": "model", "name": "TextNotificationContent", "crossLanguageDefinitionId": "Azure.Communication.MessagesService.TextNotificationContent", @@ -619,20 +713,20 @@ "discriminatorValue": "text", "decorators": [], "baseModel": { - "$ref": "58" + "$ref": "68" }, "properties": [ { - "$id": "68", + "$id": "78", "kind": "property", "name": "kind", "serializedName": "kind", "description": "Message notification type is text.", "type": { - "$id": "69", + "$id": "79", "kind": "constant", "valueType": { - "$id": "70", + "$id": "80", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -644,17 +738,18 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.TextNotificationContent.kind" }, { - "$id": "71", + "$id": "81", "kind": "property", "name": "content", "serializedName": "content", "description": "Message content.", "type": { - "$id": "72", + "$id": "82", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -663,57 +758,60 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.TextNotificationContent.content" } ] }, - "image": { - "$id": "73", + "image_v0": { + "$id": "83", "kind": "model", "name": "MediaNotificationContent", "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MediaNotificationContent", "usage": "Input,Json", - "description": "A request to send a media notification.", - "discriminatorValue": "image", + "deprecation": "`MediaNotificationContent` is being deprecated, we encourage you to use the new `ImageNotificationContent` for sending images instead.", + "description": "@deprecated A request to send an image notification.", + "discriminatorValue": "image_v0", "decorators": [], "baseModel": { - "$ref": "58" + "$ref": "68" }, "properties": [ { - "$id": "74", + "$id": "84", "kind": "property", "name": "kind", "serializedName": "kind", "description": "Message notification type is image.", "type": { - "$id": "75", + "$id": "85", "kind": "constant", "valueType": { - "$id": "76", + "$id": "86", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "value": "image", + "value": "image_v0", "decorators": [] }, "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MediaNotificationContent.kind" }, { - "$id": "77", + "$id": "87", "kind": "property", "name": "content", "serializedName": "content", "description": "Optional text content.", "type": { - "$id": "78", + "$id": "88", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -722,17 +820,18 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MediaNotificationContent.content" }, { - "$id": "79", + "$id": "89", "kind": "property", "name": "mediaUri", "serializedName": "mediaUri", "description": "A media url for the file. Required if the type is one of the supported media types, e.g. image", "type": { - "$id": "80", + "$id": "90", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url", @@ -741,13 +840,338 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MediaNotificationContent.mediaUri" } ] }, + "image": { + "$id": "91", + "kind": "model", + "name": "ImageNotificationContent", + "crossLanguageDefinitionId": "Azure.Communication.MessagesService.ImageNotificationContent", + "usage": "Input,Json", + "description": "A request to send an image notification.", + "discriminatorValue": "image", + "decorators": [], + "baseModel": { + "$ref": "68" + }, + "properties": [ + { + "$id": "92", + "kind": "property", + "name": "kind", + "serializedName": "kind", + "description": "Message notification type is image.", + "type": { + "$id": "93", + "kind": "constant", + "valueType": { + "$id": "94", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "image", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.Communication.MessagesService.ImageNotificationContent.kind" + }, + { + "$id": "95", + "kind": "property", + "name": "caption", + "serializedName": "caption", + "description": "Optional text content.", + "type": { + "$id": "96", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.Communication.MessagesService.ImageNotificationContent.caption" + }, + { + "$id": "97", + "kind": "property", + "name": "mediaUri", + "serializedName": "mediaUri", + "description": "A media url for the file. Required if the type is one of the supported media types, e.g. image", + "type": { + "$id": "98", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.Communication.MessagesService.ImageNotificationContent.mediaUri" + } + ] + }, + "document": { + "$id": "99", + "kind": "model", + "name": "DocumentNotificationContent", + "crossLanguageDefinitionId": "Azure.Communication.MessagesService.DocumentNotificationContent", + "usage": "Input,Json", + "description": "A request to send a document notification.", + "discriminatorValue": "document", + "decorators": [], + "baseModel": { + "$ref": "68" + }, + "properties": [ + { + "$id": "100", + "kind": "property", + "name": "kind", + "serializedName": "kind", + "description": "Message notification type is image.", + "type": { + "$id": "101", + "kind": "constant", + "valueType": { + "$id": "102", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "document", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.Communication.MessagesService.DocumentNotificationContent.kind" + }, + { + "$id": "103", + "kind": "property", + "name": "caption", + "serializedName": "caption", + "description": "Optional text content.", + "type": { + "$id": "104", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.Communication.MessagesService.DocumentNotificationContent.caption" + }, + { + "$id": "105", + "kind": "property", + "name": "fileName", + "serializedName": "fileName", + "description": "Optional name for the file.", + "type": { + "$id": "106", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.Communication.MessagesService.DocumentNotificationContent.fileName" + }, + { + "$id": "107", + "kind": "property", + "name": "mediaUri", + "serializedName": "mediaUri", + "description": "A media url for the file. Required if the type is one of the supported media types, e.g. image", + "type": { + "$id": "108", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.Communication.MessagesService.DocumentNotificationContent.mediaUri" + } + ] + }, + "video": { + "$id": "109", + "kind": "model", + "name": "VideoNotificationContent", + "crossLanguageDefinitionId": "Azure.Communication.MessagesService.VideoNotificationContent", + "usage": "Input,Json", + "description": "A request to send a video notification.", + "discriminatorValue": "video", + "decorators": [], + "baseModel": { + "$ref": "68" + }, + "properties": [ + { + "$id": "110", + "kind": "property", + "name": "kind", + "serializedName": "kind", + "description": "Message notification type is image.", + "type": { + "$id": "111", + "kind": "constant", + "valueType": { + "$id": "112", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "video", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.Communication.MessagesService.VideoNotificationContent.kind" + }, + { + "$id": "113", + "kind": "property", + "name": "caption", + "serializedName": "caption", + "description": "Optional text content.", + "type": { + "$id": "114", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.Communication.MessagesService.VideoNotificationContent.caption" + }, + { + "$id": "115", + "kind": "property", + "name": "mediaUri", + "serializedName": "mediaUri", + "description": "A media url for the file. Required if the type is one of the supported media types, e.g. image", + "type": { + "$id": "116", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.Communication.MessagesService.VideoNotificationContent.mediaUri" + } + ] + }, + "audio": { + "$id": "117", + "kind": "model", + "name": "AudioNotificationContent", + "crossLanguageDefinitionId": "Azure.Communication.MessagesService.AudioNotificationContent", + "usage": "Input,Json", + "description": "A request to send an audio notification.", + "discriminatorValue": "audio", + "decorators": [], + "baseModel": { + "$ref": "68" + }, + "properties": [ + { + "$id": "118", + "kind": "property", + "name": "kind", + "serializedName": "kind", + "description": "Message notification type is audio.", + "type": { + "$id": "119", + "kind": "constant", + "valueType": { + "$id": "120", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "audio", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.Communication.MessagesService.AudioNotificationContent.kind" + }, + { + "$id": "121", + "kind": "property", + "name": "mediaUri", + "serializedName": "mediaUri", + "description": "A media url for the file. Required if the type is one of the supported media types, e.g. image", + "type": { + "$id": "122", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.Communication.MessagesService.AudioNotificationContent.mediaUri" + } + ] + }, "template": { - "$id": "81", + "$id": "123", "kind": "model", "name": "TemplateNotificationContent", "crossLanguageDefinitionId": "Azure.Communication.MessagesService.TemplateNotificationContent", @@ -756,20 +1180,20 @@ "discriminatorValue": "template", "decorators": [], "baseModel": { - "$ref": "58" + "$ref": "68" }, "properties": [ { - "$id": "82", + "$id": "124", "kind": "property", "name": "kind", "serializedName": "kind", "description": "Message notification type is template.", "type": { - "$id": "83", + "$id": "125", "kind": "constant", "valueType": { - "$id": "84", + "$id": "126", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -781,17 +1205,18 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.TemplateNotificationContent.kind" }, { - "$id": "85", + "$id": "127", "kind": "property", "name": "template", "serializedName": "template", "description": "The template object used to create templates.", "type": { - "$id": "86", + "$id": "128", "kind": "model", "name": "MessageTemplate", "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplate", @@ -800,13 +1225,13 @@ "decorators": [], "properties": [ { - "$id": "87", + "$id": "129", "kind": "property", "name": "name", "serializedName": "name", "description": "Name of the template.", "type": { - "$id": "88", + "$id": "130", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -815,17 +1240,18 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplate.name" }, { - "$id": "89", + "$id": "131", "kind": "property", "name": "language", "serializedName": "language", "description": "The template's language, in the ISO 639 format, consist of a two-letter language code followed by an optional two-letter country code, e.g., 'en' or 'en_US'.", "type": { - "$id": "90", + "$id": "132", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -834,21 +1260,22 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplate.language" }, { - "$id": "91", + "$id": "133", "kind": "property", "name": "values", "serializedName": "values", "description": "The template values.", "type": { - "$id": "92", + "$id": "134", "kind": "array", "name": "ArrayMessageTemplateValue", "valueType": { - "$id": "93", + "$id": "135", "kind": "model", "name": "MessageTemplateValue", "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplateValue", @@ -856,29 +1283,30 @@ "description": "The class describes a parameter of a template.", "decorators": [], "discriminatorProperty": { - "$id": "94", + "$id": "136", "kind": "property", "name": "kind", "serializedName": "kind", "description": "The type discriminator describing a template parameter type.", "type": { - "$ref": "10" + "$ref": "18" }, "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplateValue.kind" }, "properties": [ { - "$id": "95", + "$id": "137", "kind": "property", "name": "name", "serializedName": "name", "description": "Template binding reference name", "type": { - "$id": "96", + "$id": "138", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -887,17 +1315,18 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplateValue.name" }, { - "$ref": "94" + "$ref": "136" } ], "discriminatedSubtypes": { - "$id": "97", + "$id": "139", "text": { - "$id": "98", + "$id": "140", "kind": "model", "name": "MessageTemplateText", "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplateText", @@ -906,20 +1335,20 @@ "discriminatorValue": "text", "decorators": [], "baseModel": { - "$ref": "93" + "$ref": "135" }, "properties": [ { - "$id": "99", + "$id": "141", "kind": "property", "name": "kind", "serializedName": "kind", "description": "Message parameter type is text.", "type": { - "$id": "100", + "$id": "142", "kind": "constant", "valueType": { - "$id": "101", + "$id": "143", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -931,17 +1360,18 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplateText.kind" }, { - "$id": "102", + "$id": "144", "kind": "property", "name": "text", "serializedName": "text", "description": "The text value.", "type": { - "$id": "103", + "$id": "145", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -950,13 +1380,14 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplateText.text" } ] }, "image": { - "$id": "104", + "$id": "146", "kind": "model", "name": "MessageTemplateImage", "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplateImage", @@ -965,20 +1396,20 @@ "discriminatorValue": "image", "decorators": [], "baseModel": { - "$ref": "93" + "$ref": "135" }, "properties": [ { - "$id": "105", + "$id": "147", "kind": "property", "name": "kind", "serializedName": "kind", "description": "Message parameter type is image.", "type": { - "$id": "106", + "$id": "148", "kind": "constant", "valueType": { - "$id": "107", + "$id": "149", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -990,17 +1421,18 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplateImage.kind" }, { - "$id": "108", + "$id": "150", "kind": "property", "name": "uri", "serializedName": "url", "description": "The (public) URL of the media.", "type": { - "$id": "109", + "$id": "151", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url", @@ -1009,17 +1441,18 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplateImage.url" }, { - "$id": "110", + "$id": "152", "kind": "property", "name": "caption", "serializedName": "caption", "description": "The [optional] caption of the media object.", "type": { - "$id": "111", + "$id": "153", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1028,17 +1461,18 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplateImage.caption" }, { - "$id": "112", + "$id": "154", "kind": "property", "name": "fileName", "serializedName": "fileName", "description": "The [optional] filename of the media file.", "type": { - "$id": "113", + "$id": "155", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1047,13 +1481,14 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplateImage.fileName" } ] }, "document": { - "$id": "114", + "$id": "156", "kind": "model", "name": "MessageTemplateDocument", "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplateDocument", @@ -1062,20 +1497,20 @@ "discriminatorValue": "document", "decorators": [], "baseModel": { - "$ref": "93" + "$ref": "135" }, "properties": [ { - "$id": "115", + "$id": "157", "kind": "property", "name": "kind", "serializedName": "kind", "description": "Message parameter type is document.", "type": { - "$id": "116", + "$id": "158", "kind": "constant", "valueType": { - "$id": "117", + "$id": "159", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1087,17 +1522,18 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplateDocument.kind" }, { - "$id": "118", + "$id": "160", "kind": "property", "name": "uri", "serializedName": "url", "description": "The (public) URL of the media.", "type": { - "$id": "119", + "$id": "161", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url", @@ -1106,17 +1542,18 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplateDocument.url" }, { - "$id": "120", + "$id": "162", "kind": "property", "name": "caption", "serializedName": "caption", "description": "The [optional] caption of the media object.", "type": { - "$id": "121", + "$id": "163", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1125,17 +1562,18 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplateDocument.caption" }, { - "$id": "122", + "$id": "164", "kind": "property", "name": "fileName", "serializedName": "fileName", "description": "The [optional] filename of the media file.", "type": { - "$id": "123", + "$id": "165", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1144,13 +1582,14 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplateDocument.fileName" } ] }, "video": { - "$id": "124", + "$id": "166", "kind": "model", "name": "MessageTemplateVideo", "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplateVideo", @@ -1159,20 +1598,20 @@ "discriminatorValue": "video", "decorators": [], "baseModel": { - "$ref": "93" + "$ref": "135" }, "properties": [ { - "$id": "125", + "$id": "167", "kind": "property", "name": "kind", "serializedName": "kind", "description": "Message parameter type is video.", "type": { - "$id": "126", + "$id": "168", "kind": "constant", "valueType": { - "$id": "127", + "$id": "169", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1184,17 +1623,18 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplateVideo.kind" }, { - "$id": "128", + "$id": "170", "kind": "property", "name": "uri", "serializedName": "url", "description": "The (public) URL of the media.", "type": { - "$id": "129", + "$id": "171", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url", @@ -1203,17 +1643,18 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplateVideo.url" }, { - "$id": "130", + "$id": "172", "kind": "property", "name": "caption", "serializedName": "caption", "description": "The [optional] caption of the media object.", "type": { - "$id": "131", + "$id": "173", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1222,17 +1663,18 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplateVideo.caption" }, { - "$id": "132", + "$id": "174", "kind": "property", "name": "fileName", "serializedName": "fileName", "description": "The [optional] filename of the media file.", "type": { - "$id": "133", + "$id": "175", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1241,13 +1683,14 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplateVideo.fileName" } ] }, "location": { - "$id": "134", + "$id": "176", "kind": "model", "name": "MessageTemplateLocation", "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplateLocation", @@ -1256,20 +1699,20 @@ "discriminatorValue": "location", "decorators": [], "baseModel": { - "$ref": "93" + "$ref": "135" }, "properties": [ { - "$id": "135", + "$id": "177", "kind": "property", "name": "kind", "serializedName": "kind", "description": "Message parameter type is location.", "type": { - "$id": "136", + "$id": "178", "kind": "constant", "valueType": { - "$id": "137", + "$id": "179", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1281,17 +1724,18 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplateLocation.kind" }, { - "$id": "138", + "$id": "180", "kind": "property", "name": "locationName", "serializedName": "locationName", "description": "The [Optional] name of the location.", "type": { - "$id": "139", + "$id": "181", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1300,17 +1744,18 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplateLocation.locationName" }, { - "$id": "140", + "$id": "182", "kind": "property", "name": "address", "serializedName": "address", "description": "The [Optional] address of the location.", "type": { - "$id": "141", + "$id": "183", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1319,17 +1764,18 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplateLocation.address" }, { - "$id": "142", + "$id": "184", "kind": "property", "name": "latitude", "serializedName": "latitude", "description": "The latitude of the location.", "type": { - "$id": "143", + "$id": "185", "kind": "float64", "name": "float64", "crossLanguageDefinitionId": "TypeSpec.float64", @@ -1338,17 +1784,18 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplateLocation.latitude" }, { - "$id": "144", + "$id": "186", "kind": "property", "name": "longitude", "serializedName": "longitude", "description": "The longitude of the location.", "type": { - "$id": "145", + "$id": "187", "kind": "float64", "name": "float64", "crossLanguageDefinitionId": "TypeSpec.float64", @@ -1357,13 +1804,14 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplateLocation.longitude" } ] }, "quickAction": { - "$id": "146", + "$id": "188", "kind": "model", "name": "MessageTemplateQuickAction", "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplateQuickAction", @@ -1372,20 +1820,20 @@ "discriminatorValue": "quickAction", "decorators": [], "baseModel": { - "$ref": "93" + "$ref": "135" }, "properties": [ { - "$id": "147", + "$id": "189", "kind": "property", "name": "kind", "serializedName": "kind", "description": "Message parameter type is quick action.", "type": { - "$id": "148", + "$id": "190", "kind": "constant", "valueType": { - "$id": "149", + "$id": "191", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1397,17 +1845,18 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplateQuickAction.kind" }, { - "$id": "150", + "$id": "192", "kind": "property", "name": "text", "serializedName": "text", "description": "The [Optional] quick action text", "type": { - "$id": "151", + "$id": "193", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1416,17 +1865,18 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplateQuickAction.text" }, { - "$id": "152", + "$id": "194", "kind": "property", "name": "payload", "serializedName": "payload", "description": "The [Optional] quick action payload", "type": { - "$id": "153", + "$id": "195", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1435,6 +1885,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplateQuickAction.payload" } @@ -1448,17 +1899,18 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplate.values" }, { - "$id": "154", + "$id": "196", "kind": "property", "name": "bindings", "serializedName": "bindings", "description": "The binding object to link values to the template specific locations", "type": { - "$id": "155", + "$id": "197", "kind": "model", "name": "MessageTemplateBindings", "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplateBindings", @@ -1466,29 +1918,30 @@ "description": "The binding object to link values to the template specific locations", "decorators": [], "discriminatorProperty": { - "$id": "156", + "$id": "198", "kind": "property", "name": "kind", "serializedName": "kind", "description": "The type discriminator describing a template bindings type.", "type": { - "$ref": "24" + "$ref": "32" }, "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplateBindings.kind" }, "properties": [ { - "$ref": "156" + "$ref": "198" } ], "discriminatedSubtypes": { - "$id": "157", + "$id": "199", "whatsApp": { - "$id": "158", + "$id": "200", "kind": "model", "name": "WhatsAppMessageTemplateBindings", "crossLanguageDefinitionId": "Azure.Communication.MessagesService.WhatsAppMessageTemplateBindings", @@ -1497,20 +1950,20 @@ "discriminatorValue": "whatsApp", "decorators": [], "baseModel": { - "$ref": "155" + "$ref": "197" }, "properties": [ { - "$id": "159", + "$id": "201", "kind": "property", "name": "kind", "serializedName": "kind", "description": "MessageTemplateBindings is whatsApp", "type": { - "$id": "160", + "$id": "202", "kind": "constant", "valueType": { - "$id": "161", + "$id": "203", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1522,21 +1975,22 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.WhatsAppMessageTemplateBindings.kind" }, { - "$id": "162", + "$id": "204", "kind": "property", "name": "header", "serializedName": "header", "description": "The header template bindings", "type": { - "$id": "163", + "$id": "205", "kind": "array", "name": "ArrayWhatsAppMessageTemplateBindingsComponent", "valueType": { - "$id": "164", + "$id": "206", "kind": "model", "name": "WhatsAppMessageTemplateBindingsComponent", "crossLanguageDefinitionId": "Azure.Communication.MessagesService.WhatsAppMessageTemplateBindingsComponent", @@ -1545,13 +1999,13 @@ "decorators": [], "properties": [ { - "$id": "165", + "$id": "207", "kind": "property", "name": "refValue", "serializedName": "refValue", "description": "The name of the referenced item in the template values.", "type": { - "$id": "166", + "$id": "208", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1560,6 +2014,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.WhatsAppMessageTemplateBindingsComponent.refValue" } @@ -1571,21 +2026,22 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.WhatsAppMessageTemplateBindings.header" }, { - "$id": "167", + "$id": "209", "kind": "property", "name": "body", "serializedName": "body", "description": "The body template bindings", "type": { - "$id": "168", + "$id": "210", "kind": "array", "name": "ArrayWhatsAppMessageTemplateBindingsComponent", "valueType": { - "$ref": "164" + "$ref": "206" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -1593,21 +2049,22 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.WhatsAppMessageTemplateBindings.body" }, { - "$id": "169", + "$id": "211", "kind": "property", "name": "footer", "serializedName": "footer", "description": "The footer template bindings", "type": { - "$id": "170", + "$id": "212", "kind": "array", "name": "ArrayWhatsAppMessageTemplateBindingsComponent", "valueType": { - "$ref": "164" + "$ref": "206" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -1615,21 +2072,22 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.WhatsAppMessageTemplateBindings.footer" }, { - "$id": "171", + "$id": "213", "kind": "property", "name": "buttons", "serializedName": "buttons", "description": "The button template bindings", "type": { - "$id": "172", + "$id": "214", "kind": "array", "name": "ArrayWhatsAppMessageTemplateBindingsButton", "valueType": { - "$id": "173", + "$id": "215", "kind": "model", "name": "WhatsAppMessageTemplateBindingsButton", "crossLanguageDefinitionId": "Azure.Communication.MessagesService.WhatsAppMessageTemplateBindingsButton", @@ -1638,28 +2096,29 @@ "decorators": [], "properties": [ { - "$id": "174", + "$id": "216", "kind": "property", "name": "subType", "serializedName": "subType", "description": "The WhatsApp button sub type", "type": { - "$ref": "28" + "$ref": "36" }, "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.WhatsAppMessageTemplateBindingsButton.subType" }, { - "$id": "175", + "$id": "217", "kind": "property", "name": "refValue", "serializedName": "refValue", "description": "The name of the referenced item in the template values.", "type": { - "$id": "176", + "$id": "218", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1668,6 +2127,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.WhatsAppMessageTemplateBindingsButton.refValue" } @@ -1679,6 +2139,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.WhatsAppMessageTemplateBindings.buttons" } @@ -1689,6 +2150,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplate.bindings" } @@ -1697,6 +2159,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.TemplateNotificationContent.template" } @@ -1705,52 +2168,64 @@ } }, { - "$ref": "67" + "$ref": "77" }, { - "$ref": "73" + "$ref": "83" }, { - "$ref": "81" + "$ref": "91" }, { - "$ref": "86" + "$ref": "99" }, { - "$ref": "93" + "$ref": "109" }, { - "$ref": "98" + "$ref": "117" }, { - "$ref": "104" + "$ref": "123" }, { - "$ref": "114" + "$ref": "128" }, { - "$ref": "124" + "$ref": "135" }, { - "$ref": "134" + "$ref": "140" }, { "$ref": "146" }, { - "$ref": "155" + "$ref": "156" + }, + { + "$ref": "166" }, { - "$ref": "158" + "$ref": "176" }, { - "$ref": "164" + "$ref": "188" }, { - "$ref": "173" + "$ref": "197" }, { - "$id": "177", + "$ref": "200" + }, + { + "$ref": "206" + }, + { + "$ref": "215" + }, + { + "$id": "219", "kind": "model", "name": "SendMessageResult", "crossLanguageDefinitionId": "Azure.Communication.MessagesService.SendMessageResult", @@ -1759,17 +2234,17 @@ "decorators": [], "properties": [ { - "$id": "178", + "$id": "220", "kind": "property", "name": "receipts", "serializedName": "receipts", "description": "Receipts of the send message operation.", "type": { - "$id": "179", + "$id": "221", "kind": "array", "name": "ArrayMessageReceipt", "valueType": { - "$id": "180", + "$id": "222", "kind": "model", "name": "MessageReceipt", "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageReceipt", @@ -1778,13 +2253,13 @@ "decorators": [], "properties": [ { - "$id": "181", + "$id": "223", "kind": "property", "name": "messageId", "serializedName": "messageId", "description": "The message id.", "type": { - "$id": "182", + "$id": "224", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1793,17 +2268,18 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageReceipt.messageId" }, { - "$id": "183", + "$id": "225", "kind": "property", "name": "to", "serializedName": "to", "description": "The native external platform user identifier of the recipient.", "type": { - "$id": "184", + "$id": "226", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1812,6 +2288,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageReceipt.to" } @@ -1823,16 +2300,17 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.SendMessageResult.receipts" } ] }, { - "$ref": "180" + "$ref": "222" }, { - "$id": "185", + "$id": "227", "kind": "model", "name": "MessageTemplateItem", "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplateItem", @@ -1840,29 +2318,30 @@ "description": "The message template as returned from the service.", "decorators": [], "discriminatorProperty": { - "$id": "186", + "$id": "228", "kind": "property", "name": "kind", "serializedName": "kind", "description": "The type discriminator describing a template type.", "type": { - "$ref": "48" + "$ref": "58" }, "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplateItem.kind" }, "properties": [ { - "$id": "187", + "$id": "229", "kind": "property", "name": "name", "serializedName": "name", "description": "The template's name.", "type": { - "$id": "188", + "$id": "230", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1871,17 +2350,18 @@ "optional": false, "readOnly": true, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplateItem.name" }, { - "$id": "189", + "$id": "231", "kind": "property", "name": "language", "serializedName": "language", "description": "The template's language, in the ISO 639 format, consist of a two-letter language code followed by an optional two-letter country code, e.g., 'en' or 'en_US'.", "type": { - "$id": "190", + "$id": "232", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1890,32 +2370,34 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplateItem.language" }, { - "$id": "191", + "$id": "233", "kind": "property", "name": "status", "serializedName": "status", "description": "The aggregated template status.", "type": { - "$ref": "38" + "$ref": "48" }, "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplateItem.status" }, { - "$ref": "186" + "$ref": "228" } ], "discriminatedSubtypes": { - "$id": "192", + "$id": "234", "whatsApp": { - "$id": "193", + "$id": "235", "kind": "model", "name": "WhatsAppMessageTemplateItem", "crossLanguageDefinitionId": "Azure.Communication.MessagesService.WhatsAppMessageTemplateItem", @@ -1924,17 +2406,17 @@ "discriminatorValue": "whatsApp", "decorators": [], "baseModel": { - "$ref": "185" + "$ref": "227" }, "properties": [ { - "$id": "194", + "$id": "236", "kind": "property", "name": "content", "serializedName": "content", "description": "WhatsApp platform's template content. This is the payload returned from WhatsApp API.", "type": { - "$id": "195", + "$id": "237", "kind": "unknown", "name": "unknown", "crossLanguageDefinitionId": "", @@ -1943,20 +2425,21 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.WhatsAppMessageTemplateItem.content" }, { - "$id": "196", + "$id": "238", "kind": "property", "name": "kind", "serializedName": "kind", "description": "Message template response type is whatsApp.", "type": { - "$id": "197", + "$id": "239", "kind": "constant", "valueType": { - "$id": "198", + "$id": "240", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1968,6 +2451,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.WhatsAppMessageTemplateItem.kind" } @@ -1976,10 +2460,10 @@ } }, { - "$ref": "193" + "$ref": "235" }, { - "$id": "199", + "$id": "241", "kind": "model", "name": "PagedMessageTemplateItem", "crossLanguageDefinitionId": "Azure.Core.Foundations.CustomPage", @@ -1988,17 +2472,17 @@ "decorators": [], "properties": [ { - "$id": "200", + "$id": "242", "kind": "property", "name": "value", "serializedName": "value", "description": "The MessageTemplateItem items on this page", "type": { - "$id": "201", + "$id": "243", "kind": "array", "name": "ArrayMessageTemplateItem", "valueType": { - "$ref": "185" + "$ref": "227" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -2006,22 +2490,23 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Core.Foundations.CustomPage.value" }, { - "$id": "202", + "$id": "244", "kind": "property", "name": "nextLink", "serializedName": "nextLink", "description": "The link to the next page of items", "type": { - "$id": "203", + "$id": "245", "kind": "url", "name": "ResourceLocation", "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", "baseType": { - "$id": "204", + "$id": "246", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url", @@ -2032,6 +2517,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Core.Foundations.CustomPage.nextLink" } @@ -2040,23 +2526,23 @@ ], "Clients": [ { - "$id": "205", + "$id": "247", "Name": "NotificationMessagesClient", "Operations": [ { - "$id": "206", + "$id": "248", "Name": "send", "ResourceName": "NotificationMessagesClient", "Description": "Sends a notification message from Business to User.", "Accessibility": "public", "Parameters": [ { - "$id": "207", + "$id": "249", "Name": "endpoint", "NameInRequest": "endpoint", "Description": "The communication resource, for example https://my-resource.communication.azure.com", "Type": { - "$id": "208", + "$id": "250", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -2072,12 +2558,12 @@ "Kind": "Client" }, { - "$id": "209", + "$id": "251", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "210", + "$id": "252", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2091,25 +2577,25 @@ "IsRequired": true, "Kind": "Client", "DefaultValue": { - "$id": "211", + "$id": "253", "Type": { - "$id": "212", + "$id": "254", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" }, - "Value": "2024-02-01" + "Value": "2024-08-30" }, "Decorators": [], "SkipUrlEncoding": false }, { - "$id": "213", + "$id": "255", "Name": "repeatabilityRequestId", "NameInRequest": "Repeatability-Request-ID", "Description": "An opaque, globally-unique, client-generated string identifier for the request.", "Type": { - "$id": "214", + "$id": "256", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2126,17 +2612,17 @@ "SkipUrlEncoding": false }, { - "$id": "215", + "$id": "257", "Name": "repeatabilityFirstSent", "NameInRequest": "Repeatability-First-Sent", "Description": "Specifies the date and time at which the request was first created.", "Type": { - "$id": "216", + "$id": "258", "kind": "utcDateTime", "name": "utcDateTime", "encode": "rfc7231", "wireType": { - "$id": "217", + "$id": "259", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2156,17 +2642,17 @@ "SkipUrlEncoding": false }, { - "$id": "218", + "$id": "260", "Name": "clientRequestId", "NameInRequest": "x-ms-client-request-id", "Description": "An opaque, globally-unique, client-generated string identifier for the request.", "Type": { - "$id": "219", + "$id": "261", "kind": "string", "name": "uuid", "crossLanguageDefinitionId": "Azure.Core.uuid", "baseType": { - "$id": "220", + "$id": "262", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2185,15 +2671,15 @@ "SkipUrlEncoding": false }, { - "$id": "221", + "$id": "263", "Name": "contentType", "NameInRequest": "Content-Type", "Description": "Body parameter's content type. Known values are application/json", "Type": { - "$id": "222", + "$id": "264", "kind": "constant", "valueType": { - "$id": "223", + "$id": "265", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2213,14 +2699,14 @@ "SkipUrlEncoding": false }, { - "$id": "224", + "$id": "266", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "225", + "$id": "267", "kind": "constant", "valueType": { - "$id": "226", + "$id": "268", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2240,12 +2726,12 @@ "SkipUrlEncoding": false }, { - "$id": "227", + "$id": "269", "Name": "notificationContent", "NameInRequest": "notificationContent", "Description": "Details of the message to send.", "Type": { - "$ref": "58" + "$ref": "68" }, "Location": "Body", "IsApiVersion": false, @@ -2260,36 +2746,36 @@ ], "Responses": [ { - "$id": "228", + "$id": "270", "StatusCodes": [ 202 ], "BodyType": { - "$ref": "177" + "$ref": "219" }, "BodyMediaType": "Json", "Headers": [ { - "$id": "229", + "$id": "271", "Name": "repeatabilityResult", "NameInResponse": "Repeatability-Result", "Description": "Indicates whether the repeatable request was accepted or rejected.", "Type": { - "$ref": "52" + "$ref": "62" } }, { - "$id": "230", + "$id": "272", "Name": "clientRequestId", "NameInResponse": "x-ms-client-request-id", "Description": "An opaque, globally-unique, client-generated string identifier for the request.", "Type": { - "$id": "231", + "$id": "273", "kind": "string", "name": "uuid", "crossLanguageDefinitionId": "Azure.Core.uuid", "baseType": { - "$id": "232", + "$id": "274", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2319,22 +2805,22 @@ "Decorators": [] }, { - "$id": "233", + "$id": "275", "Name": "downloadMediaInternal", "ResourceName": "MessageDataStream", "Description": "Download the Media payload from a User to Business message.", "Accessibility": "internal", "Parameters": [ { - "$ref": "207" + "$ref": "249" }, { - "$id": "234", + "$id": "276", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "235", + "$id": "277", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2348,25 +2834,25 @@ "IsRequired": true, "Kind": "Client", "DefaultValue": { - "$id": "236", + "$id": "278", "Type": { - "$id": "237", + "$id": "279", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" }, - "Value": "2024-02-01" + "Value": "2024-08-30" }, "Decorators": [], "SkipUrlEncoding": false }, { - "$id": "238", + "$id": "280", "Name": "id", "NameInRequest": "id", "Description": "The stream ID.", "Type": { - "$id": "239", + "$id": "281", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2383,17 +2869,17 @@ "SkipUrlEncoding": false }, { - "$id": "240", + "$id": "282", "Name": "clientRequestId", "NameInRequest": "x-ms-client-request-id", "Description": "An opaque, globally-unique, client-generated string identifier for the request.", "Type": { - "$id": "241", + "$id": "283", "kind": "string", "name": "uuid", "crossLanguageDefinitionId": "Azure.Core.uuid", "baseType": { - "$id": "242", + "$id": "284", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2412,14 +2898,14 @@ "SkipUrlEncoding": false }, { - "$id": "243", + "$id": "285", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "244", + "$id": "286", "kind": "constant", "valueType": { - "$id": "245", + "$id": "287", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2441,12 +2927,12 @@ ], "Responses": [ { - "$id": "246", + "$id": "288", "StatusCodes": [ 200 ], "BodyType": { - "$id": "247", + "$id": "289", "kind": "bytes", "name": "bytes", "encode": "base64", @@ -2456,17 +2942,17 @@ "BodyMediaType": "Json", "Headers": [ { - "$id": "248", + "$id": "290", "Name": "clientRequestId", "NameInResponse": "x-ms-client-request-id", "Description": "An opaque, globally-unique, client-generated string identifier for the request.", "Type": { - "$id": "249", + "$id": "291", "kind": "string", "name": "uuid", "crossLanguageDefinitionId": "Azure.Core.uuid", "baseType": { - "$id": "250", + "$id": "292", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2476,15 +2962,15 @@ } }, { - "$id": "251", + "$id": "293", "Name": "contentType", "NameInResponse": "content-type", "Description": "The stream content type.", "Type": { - "$id": "252", + "$id": "294", "kind": "constant", "valueType": { - "$id": "253", + "$id": "295", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2512,36 +2998,36 @@ "Decorators": [], "Examples": [ { - "$id": "254", + "$id": "296", "kind": "http", "name": "Download media", "description": "Download media", - "filePath": "2024-02-01/Stream_GetMedia.json", + "filePath": "2024-08-30/Stream_GetMedia.json", "parameters": [ { - "$id": "255", + "$id": "297", "parameter": { - "$ref": "234" + "$ref": "276" }, "value": { - "$id": "256", + "$id": "298", "kind": "string", "type": { - "$ref": "235" + "$ref": "277" }, - "value": "2024-02-01" + "value": "2024-08-30" } }, { - "$id": "257", + "$id": "299", "parameter": { - "$ref": "238" + "$ref": "280" }, "value": { - "$id": "258", + "$id": "300", "kind": "string", "type": { - "$ref": "239" + "$ref": "281" }, "value": "d19e68ec-bdd6-4a50-8dfb-cbb1642df6ab" } @@ -2549,16 +3035,16 @@ ], "responses": [ { - "$id": "259", + "$id": "301", "response": { - "$ref": "246" + "$ref": "288" }, "statusCode": 200, "bodyValue": { - "$id": "260", + "$id": "302", "kind": "string", "type": { - "$ref": "247" + "$ref": "289" }, "value": "" } @@ -2569,33 +3055,33 @@ } ], "Protocol": { - "$id": "261" + "$id": "303" }, "Parameters": [ { - "$ref": "207" + "$ref": "249" } ], "Decorators": [] }, { - "$id": "262", + "$id": "304", "Name": "MessageTemplateClient", "Operations": [ { - "$id": "263", + "$id": "305", "Name": "getTemplates", "ResourceName": "MessageTemplateItem", "Description": "List all templates for given Azure Communication Services channel", "Accessibility": "public", "Parameters": [ { - "$id": "264", + "$id": "306", "Name": "endpoint", "NameInRequest": "endpoint", "Description": "The communication resource, for example https://my-resource.communication.azure.com", "Type": { - "$id": "265", + "$id": "307", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -2611,12 +3097,12 @@ "Kind": "Client" }, { - "$id": "266", + "$id": "308", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "267", + "$id": "309", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2630,30 +3116,30 @@ "IsRequired": true, "Kind": "Client", "DefaultValue": { - "$id": "268", + "$id": "310", "Type": { - "$id": "269", + "$id": "311", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" }, - "Value": "2024-02-01" + "Value": "2024-08-30" }, "Decorators": [], "SkipUrlEncoding": false }, { - "$id": "270", + "$id": "312", "Name": "channelId", "NameInRequest": "channelId", "Description": "The registration ID of the channel.", "Type": { - "$id": "271", + "$id": "313", "kind": "string", "name": "uuid", "crossLanguageDefinitionId": "Azure.Core.uuid", "baseType": { - "$id": "272", + "$id": "314", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2672,12 +3158,12 @@ "SkipUrlEncoding": false }, { - "$id": "273", + "$id": "315", "Name": "maxpagesize", "NameInRequest": "maxpagesize", "Description": "Number of objects to return per page.", "Type": { - "$id": "274", + "$id": "316", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -2694,17 +3180,17 @@ "SkipUrlEncoding": false }, { - "$id": "275", + "$id": "317", "Name": "clientRequestId", "NameInRequest": "x-ms-client-request-id", "Description": "An opaque, globally-unique, client-generated string identifier for the request.", "Type": { - "$id": "276", + "$id": "318", "kind": "string", "name": "uuid", "crossLanguageDefinitionId": "Azure.Core.uuid", "baseType": { - "$id": "277", + "$id": "319", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2723,14 +3209,14 @@ "SkipUrlEncoding": false }, { - "$id": "278", + "$id": "320", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "279", + "$id": "321", "kind": "constant", "valueType": { - "$id": "280", + "$id": "322", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2752,27 +3238,27 @@ ], "Responses": [ { - "$id": "281", + "$id": "323", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "199" + "$ref": "241" }, "BodyMediaType": "Json", "Headers": [ { - "$id": "282", + "$id": "324", "Name": "clientRequestId", "NameInResponse": "x-ms-client-request-id", "Description": "An opaque, globally-unique, client-generated string identifier for the request.", "Type": { - "$id": "283", + "$id": "325", "kind": "string", "name": "uuid", "crossLanguageDefinitionId": "Azure.Core.uuid", "baseType": { - "$id": "284", + "$id": "326", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2794,7 +3280,7 @@ "Path": "/messages/channels/{channelId}/templates", "BufferResponse": true, "Paging": { - "$id": "285", + "$id": "327", "ItemName": "value", "NextLinkName": "nextLink" }, @@ -2805,26 +3291,26 @@ } ], "Protocol": { - "$id": "286" + "$id": "328" }, "Parameters": [ { - "$ref": "264" + "$ref": "306" } ], "Decorators": [] } ], "Auth": { - "$id": "287", + "$id": "329", "OAuth2": { - "$id": "288", + "$id": "330", "Scopes": [ "https://communication.azure.com/.default" ] }, "ApiKey": { - "$id": "289", + "$id": "331", "Name": "Authorization" } } diff --git a/sdk/communication/Azure.Communication.PhoneNumbers/tests.yml b/sdk/communication/Azure.Communication.PhoneNumbers/tests.yml index f3751b546467..ebc9803aec28 100644 --- a/sdk/communication/Azure.Communication.PhoneNumbers/tests.yml +++ b/sdk/communication/Azure.Communication.PhoneNumbers/tests.yml @@ -13,23 +13,8 @@ extends: CloudConfig: Public: SubscriptionConfigurations: - - $(sub-config-azure-cloud-test-resources) - $(sub-config-communication-services-cloud-test-resources-common) - $(sub-config-communication-services-cloud-test-resources-net) - PPE: - SubscriptionConfigurations: - - $(sub-config-communication-ppe-test-resources-common) - - $(sub-config-communication-ppe-test-resources-net) - MatrixReplace: - - SKIP_UPDATE_CAPABILITIES_LIVE_TESTS=FALSE/TRUE - - SKIP_SIPROUTING_LIVE_TESTS=FALSE/TRUE - Int: - SubscriptionConfigurations: - - $(sub-config-communication-int-test-resources-common) - - $(sub-config-communication-int-test-resources-net) - MatrixReplace: - - SKIP_UPDATE_CAPABILITIES_LIVE_TESTS=FALSE/TRUE - Clouds: Public, PPE, Int TestResourceDirectories: - communication/test-resources/ EnvVars: diff --git a/sdk/communication/Azure.Communication.Rooms/tests.yml b/sdk/communication/Azure.Communication.Rooms/tests.yml index 07921c43446b..4c4199566f0f 100644 --- a/sdk/communication/Azure.Communication.Rooms/tests.yml +++ b/sdk/communication/Azure.Communication.Rooms/tests.yml @@ -7,12 +7,8 @@ extends: Project: Azure.Communication.Rooms CloudConfig: Public: - ServiceConnection: azure-sdk-tests - SubscriptionConfigurationFilePaths: - - eng/common/TestResources/sub-config/AzurePublicMsft.json SubscriptionConfigurations: - $(sub-config-communication-services-cloud-test-resources-common) - $(sub-config-communication-services-cloud-test-resources-net) - Clouds: Public TestResourceDirectories: - communication/ diff --git a/sdk/communication/Azure.Communication.ShortCodes/tests.yml b/sdk/communication/Azure.Communication.ShortCodes/tests.yml index 3804837aea7d..f963b25bf5cc 100644 --- a/sdk/communication/Azure.Communication.ShortCodes/tests.yml +++ b/sdk/communication/Azure.Communication.ShortCodes/tests.yml @@ -7,12 +7,8 @@ extends: Project: Azure.Communication.ShortCodes CloudConfig: Public: - ServiceConnection: azure-sdk-tests - SubscriptionConfigurationFilePaths: - - eng/common/TestResources/sub-config/AzurePublicMsft.json SubscriptionConfigurations: - $(sub-config-communication-services-cloud-test-resources-common) - $(sub-config-communication-services-cloud-test-resources-net) - Clouds: Public TestResourceDirectories: - communication/ diff --git a/sdk/communication/Azure.Communication.Sms/tests.int.yml b/sdk/communication/Azure.Communication.Sms/tests.int.yml deleted file mode 100644 index 9d2bef961972..000000000000 --- a/sdk/communication/Azure.Communication.Sms/tests.int.yml +++ /dev/null @@ -1,16 +0,0 @@ -trigger: none - -extends: - template: /eng/pipelines/templates/stages/archetype-sdk-tests.yml - parameters: - ServiceDirectory: communication - Project: Azure.Communication.Sms - CloudConfig: - Int: - SubscriptionConfigurations: - - $(sub-config-communication-int-test-resources-common) - - $(sub-config-communication-int-test-resources-net) - - $(sub-config-communication-sms-int-test-resources) - Clouds: Int - TestResourceDirectories: - - communication/ diff --git a/sdk/communication/Azure.Communication.Sms/tests.yml b/sdk/communication/Azure.Communication.Sms/tests.yml index a780be0adb4e..3be32808b6ab 100644 --- a/sdk/communication/Azure.Communication.Sms/tests.yml +++ b/sdk/communication/Azure.Communication.Sms/tests.yml @@ -7,14 +7,9 @@ extends: Project: Azure.Communication.Sms CloudConfig: Public: - ServiceConnection: azure-sdk-tests - SubscriptionConfigurationFilePaths: - - eng/common/TestResources/sub-config/AzurePublicMsft.json SubscriptionConfigurations: - - $(sub-config-azure-cloud-test-resources) - $(sub-config-communication-services-cloud-test-resources-common) - $(sub-config-communication-services-cloud-test-resources-net) - $(sub-config-communication-services-sms-cloud-test-resources) - Clouds: Public TestResourceDirectories: - communication/ diff --git a/sdk/compute/Azure.ResourceManager.Compute/CHANGELOG.md b/sdk/compute/Azure.ResourceManager.Compute/CHANGELOG.md index 8ed448e95d6d..b070f4c2774f 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/CHANGELOG.md +++ b/sdk/compute/Azure.ResourceManager.Compute/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 1.7.0-beta.1 (Unreleased) +## 1.7.0-beta.2 (Unreleased) ### Features Added @@ -10,6 +10,12 @@ ### Other Changes +## 1.7.0-beta.1 (2024-10-15) + +### Features Added + +- Exposed `JsonModelWriteCore` for model serialization procedure. + ## 1.6.0 (2024-08-26) ### Features Added diff --git a/sdk/compute/Azure.ResourceManager.Compute/api/Azure.ResourceManager.Compute.netstandard2.0.cs b/sdk/compute/Azure.ResourceManager.Compute/api/Azure.ResourceManager.Compute.netstandard2.0.cs index 903d9f114b7b..b4fe47aa3540 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/api/Azure.ResourceManager.Compute.netstandard2.0.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/api/Azure.ResourceManager.Compute.netstandard2.0.cs @@ -27,6 +27,7 @@ public AvailabilitySetData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.Compute.Models.ComputeSku Sku { get { throw null; } set { } } public System.Collections.Generic.IReadOnlyList Statuses { get { throw null; } } public System.Collections.Generic.IList VirtualMachines { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.AvailabilitySetData 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.Compute.AvailabilitySetData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -89,6 +90,7 @@ public CapacityReservationData(Azure.Core.AzureLocation location, Azure.Resource public System.DateTimeOffset? TimeCreated { get { throw null; } } public System.Collections.Generic.IReadOnlyList VirtualMachinesAssociated { get { throw null; } } public System.Collections.Generic.IList Zones { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.CapacityReservationData 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.Compute.CapacityReservationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -122,6 +124,7 @@ public CapacityReservationGroupData(Azure.Core.AzureLocation location) { } public System.Collections.Generic.IList SharingSubscriptionIds { get { throw null; } } public System.Collections.Generic.IReadOnlyList VirtualMachinesAssociated { get { throw null; } } public System.Collections.Generic.IList Zones { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.CapacityReservationGroupData 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.Compute.CapacityReservationGroupData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -214,6 +217,7 @@ public CloudServiceData(Azure.Core.AzureLocation location) { } public string UniqueId { get { throw null; } } public Azure.ResourceManager.Compute.Models.CloudServiceUpgradeMode? UpgradeMode { get { throw null; } set { } } public System.Collections.Generic.IList Zones { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.CloudServiceData 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.Compute.CloudServiceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -243,6 +247,7 @@ internal CloudServiceOSFamilyData() { } public string OSFamilyName { get { throw null; } } public string ResourceName { get { throw null; } } public System.Collections.Generic.IReadOnlyList Versions { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.CloudServiceOSFamilyData 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.Compute.CloudServiceOSFamilyData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -289,6 +294,7 @@ internal CloudServiceOSVersionData() { } public string Label { get { throw null; } } public Azure.Core.AzureLocation? Location { get { throw null; } } public string Version { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.CloudServiceOSVersionData 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.Compute.CloudServiceOSVersionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -382,6 +388,7 @@ internal CloudServiceRoleData() { } public Azure.Core.AzureLocation? Location { get { throw null; } } public Azure.ResourceManager.Compute.Models.CloudServiceRoleSku Sku { get { throw null; } } public string UniqueId { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.CloudServiceRoleData 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.Compute.CloudServiceRoleData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -411,6 +418,7 @@ internal CloudServiceRoleInstanceData() { } public System.Collections.Generic.IReadOnlyList NetworkInterfaces { get { throw null; } } public Azure.ResourceManager.Compute.Models.InstanceSku Sku { get { throw null; } } public System.Collections.Generic.IReadOnlyDictionary Tags { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.CloudServiceRoleInstanceData 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.Compute.CloudServiceRoleInstanceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -494,6 +502,7 @@ internal CommunityGalleryData() { } public Azure.ResourceManager.Compute.Models.CommunityGalleryMetadata CommunityMetadata { get { throw null; } } public string Disclaimer { get { throw null; } } public Azure.Core.ResourceIdentifier Id { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.CommunityGalleryData 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.Compute.CommunityGalleryData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -535,6 +544,7 @@ internal CommunityGalleryImageData() { } public System.Uri PrivacyStatementUri { get { throw null; } } public Azure.ResourceManager.Compute.Models.ImagePurchasePlan PurchasePlan { get { throw null; } } public Azure.ResourceManager.Compute.Models.RecommendedMachineConfiguration Recommended { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.CommunityGalleryImageData 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.Compute.CommunityGalleryImageData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -586,6 +596,7 @@ internal CommunityGalleryImageVersionData() { } public bool? IsExcludedFromLatest { get { throw null; } } public System.DateTimeOffset? PublishedOn { get { throw null; } } public Azure.ResourceManager.Compute.Models.SharedGalleryImageVersionStorageProfile StorageProfile { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.CommunityGalleryImageVersionData 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.Compute.CommunityGalleryImageVersionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -837,6 +848,7 @@ public ComputePrivateEndpointConnectionData() { } public Azure.ResourceManager.Compute.Models.ComputePrivateLinkServiceConnectionState ConnectionState { get { throw null; } set { } } public Azure.Core.ResourceIdentifier PrivateEndpointId { get { throw null; } } public Azure.ResourceManager.Compute.Models.ComputePrivateEndpointConnectionProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.ComputePrivateEndpointConnectionData 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.Compute.ComputePrivateEndpointConnectionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -892,6 +904,7 @@ public DedicatedHostData(Azure.Core.AzureLocation location, Azure.ResourceManage public Azure.ResourceManager.Compute.Models.ComputeSku Sku { get { throw null; } set { } } public System.DateTimeOffset? TimeCreated { get { throw null; } } public System.Collections.Generic.IReadOnlyList VirtualMachines { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.DedicatedHostData 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.Compute.DedicatedHostData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -924,6 +937,7 @@ public DedicatedHostGroupData(Azure.Core.AzureLocation location) { } public bool? SupportAutomaticPlacement { get { throw null; } set { } } public bool? UltraSsdEnabled { get { throw null; } set { } } public System.Collections.Generic.IList Zones { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.DedicatedHostGroupData 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.Compute.DedicatedHostGroupData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1013,6 +1027,7 @@ public DiskAccessData(Azure.Core.AzureLocation location) { } public System.Collections.Generic.IReadOnlyList PrivateEndpointConnections { get { throw null; } } public string ProvisioningState { get { throw null; } } public System.DateTimeOffset? TimeCreated { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.DiskAccessData 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.Compute.DiskAccessData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1078,6 +1093,7 @@ public DiskEncryptionSetData(Azure.Core.AzureLocation location) { } public System.Collections.Generic.IReadOnlyList PreviousKeys { get { throw null; } } public string ProvisioningState { get { throw null; } } public bool? RotationToLatestKeyVersionEnabled { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.DiskEncryptionSetData 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.Compute.DiskEncryptionSetData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1136,6 +1152,7 @@ public DiskImageData(Azure.Core.AzureLocation location) { } public string ProvisioningState { get { throw null; } } public Azure.Core.ResourceIdentifier SourceVirtualMachineId { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.ImageStorageProfile StorageProfile { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.DiskImageData 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.Compute.DiskImageData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1203,6 +1220,7 @@ internal DiskRestorePointData() { } public Azure.ResourceManager.Compute.Models.SupportedCapabilities SupportedCapabilities { get { throw null; } } public bool? SupportsHibernation { get { throw null; } } public System.DateTimeOffset? TimeCreated { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.DiskRestorePointData 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.Compute.DiskRestorePointData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1255,6 +1273,7 @@ public GalleryApplicationData(Azure.Core.AzureLocation location) { } public System.Uri PrivacyStatementUri { get { throw null; } set { } } public System.Uri ReleaseNoteUri { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.SupportedOperatingSystemType? SupportedOSType { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.GalleryApplicationData 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.Compute.GalleryApplicationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1313,6 +1332,7 @@ public GalleryApplicationVersionData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.Compute.Models.GalleryProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.Compute.Models.GalleryApplicationVersionPublishingProfile PublishingProfile { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.ReplicationStatus ReplicationStatus { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.GalleryApplicationVersionData 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.Compute.GalleryApplicationVersionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1370,6 +1390,7 @@ public GalleryData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.Compute.Models.GalleryProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.Compute.Models.SharingProfile SharingProfile { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.SharingStatus SharingStatus { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.GalleryData 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.Compute.GalleryData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1411,6 +1432,7 @@ public GalleryImageData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.Compute.Models.ImagePurchasePlan PurchasePlan { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.RecommendedMachineConfiguration Recommended { get { throw null; } set { } } public System.Uri ReleaseNoteUri { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.GalleryImageData 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.Compute.GalleryImageData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1471,6 +1493,7 @@ public GalleryImageVersionData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.Compute.Models.GalleryImageVersionSafetyProfile SafetyProfile { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.GalleryImageVersionUefiSettings SecurityUefiSettings { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.GalleryImageVersionStorageProfile StorageProfile { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.GalleryImageVersionData 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.Compute.GalleryImageVersionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1592,6 +1615,7 @@ public ManagedDiskData(Azure.Core.AzureLocation location) { } public System.DateTimeOffset? TimeCreated { get { throw null; } } public string UniqueId { get { throw null; } } public System.Collections.Generic.IList Zones { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.ManagedDiskData 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.Compute.ManagedDiskData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1654,6 +1678,7 @@ public ProximityPlacementGroupData(Azure.Core.AzureLocation location) { } public System.Collections.Generic.IReadOnlyList VirtualMachines { get { throw null; } } public System.Collections.Generic.IReadOnlyList VirtualMachineScaleSets { get { throw null; } } public System.Collections.Generic.IList Zones { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.ProximityPlacementGroupData 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.Compute.ProximityPlacementGroupData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1707,6 +1732,7 @@ public RestorePointData() { } public Azure.ResourceManager.Compute.Models.RestorePointSourceMetadata SourceMetadata { get { throw null; } set { } } public Azure.Core.ResourceIdentifier SourceRestorePointId { get { throw null; } set { } } public System.DateTimeOffset? TimeCreated { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.RestorePointData 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.Compute.RestorePointData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1737,6 +1763,7 @@ public RestorePointGroupData(Azure.Core.AzureLocation location) { } public string RestorePointGroupId { get { throw null; } } public System.Collections.Generic.IReadOnlyList RestorePoints { get { throw null; } } public Azure.ResourceManager.Compute.Models.RestorePointGroupSource Source { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.RestorePointGroupData 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.Compute.RestorePointGroupData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1813,6 +1840,7 @@ public partial class SharedGalleryData : Azure.ResourceManager.Compute.Models.Pi internal SharedGalleryData() { } public System.Collections.Generic.IReadOnlyDictionary ArtifactTags { get { throw null; } } public Azure.Core.ResourceIdentifier Id { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.SharedGalleryData 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.Compute.SharedGalleryData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1851,6 +1879,7 @@ internal SharedGalleryImageData() { } public System.Uri PrivacyStatementUri { get { throw null; } } public Azure.ResourceManager.Compute.Models.ImagePurchasePlan PurchasePlan { get { throw null; } } public Azure.ResourceManager.Compute.Models.RecommendedMachineConfiguration Recommended { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.SharedGalleryImageData 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.Compute.SharedGalleryImageData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1901,6 +1930,7 @@ internal SharedGalleryImageVersionData() { } public bool? IsExcludedFromLatest { get { throw null; } } public System.DateTimeOffset? PublishedOn { get { throw null; } } public Azure.ResourceManager.Compute.Models.SharedGalleryImageVersionStorageProfile StorageProfile { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.SharedGalleryImageVersionData 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.Compute.SharedGalleryImageVersionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1986,6 +2016,7 @@ public SnapshotData(Azure.Core.AzureLocation location) { } public bool? SupportsHibernation { get { throw null; } set { } } public System.DateTimeOffset? TimeCreated { get { throw null; } } public string UniqueId { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.SnapshotData 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.Compute.SnapshotData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2042,6 +2073,7 @@ public partial class SshPublicKeyData : Azure.ResourceManager.Models.TrackedReso { public SshPublicKeyData(Azure.Core.AzureLocation location) { } public string PublicKey { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.SshPublicKeyData 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.Compute.SshPublicKeyData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2143,6 +2175,7 @@ public VirtualMachineData(Azure.Core.AzureLocation location) { } public Azure.Core.ResourceIdentifier VirtualMachineScaleSetId { get { throw null; } set { } } public string VmId { get { throw null; } } public System.Collections.Generic.IList Zones { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.VirtualMachineData 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.Compute.VirtualMachineData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2184,6 +2217,7 @@ public VirtualMachineExtensionData(Azure.Core.AzureLocation location) { } public System.BinaryData Settings { get { throw null; } set { } } public bool? SuppressFailures { get { throw null; } set { } } public string TypeHandlerVersion { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.VirtualMachineExtensionData 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.Compute.VirtualMachineExtensionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2215,6 +2249,7 @@ public VirtualMachineExtensionImageData(Azure.Core.AzureLocation location) { } public string OperatingSystem { get { throw null; } set { } } public bool? SupportsMultipleExtensions { get { throw null; } set { } } public bool? VirtualMachineScaleSetEnabled { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.VirtualMachineExtensionImageData 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.Compute.VirtualMachineExtensionImageData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2386,6 +2421,7 @@ public VirtualMachineRunCommandData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.Compute.Models.VirtualMachineRunCommandScriptSource Source { get { throw null; } set { } } public int? TimeoutInSeconds { get { throw null; } set { } } public bool? TreatFailureAsDeploymentFailure { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.VirtualMachineRunCommandData 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.Compute.VirtualMachineRunCommandData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2470,6 +2506,7 @@ public VirtualMachineScaleSetData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.Compute.Models.ZonalPlatformFaultDomainAlignMode? ZonalPlatformFaultDomainAlignMode { get { throw null; } set { } } public bool? ZoneBalance { get { throw null; } set { } } public System.Collections.Generic.IList Zones { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.VirtualMachineScaleSetData 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.Compute.VirtualMachineScaleSetData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2512,6 +2549,7 @@ public VirtualMachineScaleSetExtensionData(string name) { } public bool? SuppressFailures { get { throw null; } set { } } public string TypeHandlerVersion { get { throw null; } set { } } void global::System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.VirtualMachineScaleSetExtensionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } Azure.ResourceManager.Compute.VirtualMachineScaleSetExtensionData 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; } @@ -2625,6 +2663,7 @@ public VirtualMachineScaleSetRollingUpgradeData(Azure.Core.AzureLocation locatio public Azure.ResourceManager.Compute.Models.RollingUpgradePolicy Policy { get { throw null; } } public Azure.ResourceManager.Compute.Models.RollingUpgradeProgressInfo Progress { get { throw null; } } public Azure.ResourceManager.Compute.Models.RollingUpgradeRunningStatus RunningStatus { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.VirtualMachineScaleSetRollingUpgradeData 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.Compute.VirtualMachineScaleSetRollingUpgradeData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2713,6 +2752,7 @@ public VirtualMachineScaleSetVmData(Azure.Core.AzureLocation location) { } public string UserData { get { throw null; } set { } } public string VmId { get { throw null; } } public System.Collections.Generic.IReadOnlyList Zones { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.VirtualMachineScaleSetVmData 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.Compute.VirtualMachineScaleSetVmData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2755,6 +2795,7 @@ public VirtualMachineScaleSetVmExtensionData() { } public System.BinaryData Settings { get { throw null; } set { } } public bool? SuppressFailures { get { throw null; } set { } } public string TypeHandlerVersion { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.VirtualMachineScaleSetVmExtensionData 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.Compute.VirtualMachineScaleSetVmExtensionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3113,6 +3154,7 @@ public partial class AccessUri : 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.Compute.Models.AccessUri System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3124,6 +3166,7 @@ public partial class AdditionalCapabilities : System.ClientModel.Primitives.IJso public AdditionalCapabilities() { } public bool? HibernationEnabled { get { throw null; } set { } } public bool? UltraSsdEnabled { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.AdditionalCapabilities 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.Compute.Models.AdditionalCapabilities System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3137,6 +3180,7 @@ public AdditionalUnattendContent() { } public string Content { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.PassName? PassName { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.SettingName? SettingName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.AdditionalUnattendContent 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.Compute.Models.AdditionalUnattendContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3410,6 +3454,7 @@ public partial class AttachDetachDataDisksRequest : System.ClientModel.Primitive public AttachDetachDataDisksRequest() { } public System.Collections.Generic.IList DataDisksToAttach { get { throw null; } } public System.Collections.Generic.IList DataDisksToDetach { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.AttachDetachDataDisksRequest 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.Compute.Models.AttachDetachDataDisksRequest System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3423,6 +3468,7 @@ public AutomaticOSUpgradePolicy() { } public bool? EnableAutomaticOSUpgrade { get { throw null; } set { } } public bool? OSRollingUpgradeDeferral { get { throw null; } set { } } public bool? UseRollingUpgradePolicy { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.AutomaticOSUpgradePolicy 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.Compute.Models.AutomaticOSUpgradePolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3435,6 +3481,7 @@ public AutomaticRepairsPolicy() { } public bool? Enabled { get { throw null; } set { } } public string GracePeriod { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.RepairAction? RepairAction { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.AutomaticRepairsPolicy 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.Compute.Models.AutomaticRepairsPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3451,6 +3498,7 @@ public AvailabilitySetPatch() { } public Azure.ResourceManager.Compute.Models.ComputeSku Sku { get { throw null; } set { } } public System.Collections.Generic.IReadOnlyList Statuses { get { throw null; } } public System.Collections.Generic.IList VirtualMachines { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.AvailabilitySetPatch 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.Compute.Models.AvailabilitySetPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3468,6 +3516,7 @@ internal AvailablePatchSummary() { } public bool? RebootPending { get { throw null; } } public System.DateTimeOffset? StartOn { get { throw null; } } public Azure.ResourceManager.Compute.Models.PatchOperationStatus? Status { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.AvailablePatchSummary 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.Compute.Models.AvailablePatchSummary System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3479,6 +3528,7 @@ public partial class BootDiagnostics : System.ClientModel.Primitives.IJsonModel< public BootDiagnostics() { } public bool? Enabled { get { throw null; } set { } } public System.Uri StorageUri { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.BootDiagnostics 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.Compute.Models.BootDiagnostics System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3491,6 +3541,7 @@ internal BootDiagnosticsInstanceView() { } public System.Uri ConsoleScreenshotBlobUri { get { throw null; } } public System.Uri SerialConsoleLogBlobUri { get { throw null; } } public Azure.ResourceManager.Compute.Models.InstanceViewStatus Status { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.BootDiagnosticsInstanceView 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.Compute.Models.BootDiagnosticsInstanceView System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3526,6 +3577,7 @@ public partial class CapacityReservationGroupInstanceView : System.ClientModel.P internal CapacityReservationGroupInstanceView() { } public System.Collections.Generic.IReadOnlyList CapacityReservations { get { throw null; } } public System.Collections.Generic.IReadOnlyList SharedSubscriptionIds { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.CapacityReservationGroupInstanceView 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.Compute.Models.CapacityReservationGroupInstanceView System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3558,6 +3610,7 @@ public CapacityReservationGroupPatch() { } public System.Collections.Generic.IReadOnlyList InstanceViewCapacityReservations { get { throw null; } } public System.Collections.Generic.IList SharingSubscriptionIds { get { throw null; } } public System.Collections.Generic.IReadOnlyList VirtualMachinesAssociated { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.CapacityReservationGroupPatch 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.Compute.Models.CapacityReservationGroupPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3571,6 +3624,7 @@ internal CapacityReservationInstanceView() { } public Azure.ResourceManager.Compute.Models.CapacityReservationUtilization UtilizationInfo { get { throw null; } } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public System.Collections.Generic.IReadOnlyList UtilizationInfoVirtualMachinesAllocated { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.CapacityReservationInstanceView 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.Compute.Models.CapacityReservationInstanceView System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3598,6 +3652,7 @@ public partial class CapacityReservationInstanceViewWithName : Azure.ResourceMan { internal CapacityReservationInstanceViewWithName() { } public string Name { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.CapacityReservationInstanceViewWithName 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.Compute.Models.CapacityReservationInstanceViewWithName System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3615,6 +3670,7 @@ public CapacityReservationPatch() { } public Azure.ResourceManager.Compute.Models.ComputeSku Sku { get { throw null; } set { } } public System.DateTimeOffset? TimeCreated { get { throw null; } } public System.Collections.Generic.IReadOnlyList VirtualMachinesAssociated { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.CapacityReservationPatch 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.Compute.Models.CapacityReservationPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3626,6 +3682,7 @@ public partial class CapacityReservationUtilization : System.ClientModel.Primiti internal CapacityReservationUtilization() { } public int? CurrentCapacity { get { throw null; } } public System.Collections.Generic.IReadOnlyList VirtualMachinesAllocated { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.CapacityReservationUtilization 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.Compute.Models.CapacityReservationUtilization System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3646,6 +3703,7 @@ public CloudServiceExtension() { } public System.Collections.Generic.IList RolesAppliedTo { get { throw null; } } public System.BinaryData Settings { get { throw null; } set { } } public string TypeHandlerVersion { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.CloudServiceExtension 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.Compute.Models.CloudServiceExtension System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3659,6 +3717,7 @@ internal CloudServiceInstanceView() { } public System.Collections.Generic.IReadOnlyList RoleInstanceStatusesSummary { get { throw null; } } public string SdkVersion { get { throw null; } } public System.Collections.Generic.IReadOnlyList Statuses { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.CloudServiceInstanceView 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.Compute.Models.CloudServiceInstanceView System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3671,6 +3730,7 @@ public CloudServiceLoadBalancerConfiguration(string name, System.Collections.Gen public System.Collections.Generic.IList FrontendIPConfigurations { get { throw null; } } public Azure.Core.ResourceIdentifier Id { get { throw null; } set { } } public string Name { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.CloudServiceLoadBalancerConfiguration 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.Compute.Models.CloudServiceLoadBalancerConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3683,6 +3743,7 @@ public CloudServiceNetworkProfile() { } public System.Collections.Generic.IList LoadBalancerConfigurations { get { throw null; } } public Azure.ResourceManager.Compute.Models.CloudServiceSlotType? SlotType { get { throw null; } set { } } public Azure.Core.ResourceIdentifier SwappableCloudServiceId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.CloudServiceNetworkProfile 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.Compute.Models.CloudServiceNetworkProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3693,6 +3754,7 @@ public partial class CloudServicePatch : System.ClientModel.Primitives.IJsonMode { public CloudServicePatch() { } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.CloudServicePatch 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.Compute.Models.CloudServicePatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3704,6 +3766,7 @@ public partial class CloudServiceRoleProfileProperties : System.ClientModel.Prim public CloudServiceRoleProfileProperties() { } public string Name { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.CloudServiceRoleSku Sku { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.CloudServiceRoleProfileProperties 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.Compute.Models.CloudServiceRoleProfileProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3716,6 +3779,7 @@ public CloudServiceRoleSku() { } public long? Capacity { get { throw null; } set { } } public string Name { get { throw null; } set { } } public string Tier { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.CloudServiceRoleSku 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.Compute.Models.CloudServiceRoleSku System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3764,6 +3828,7 @@ public partial class CloudServiceVaultAndSecretReference : System.ClientModel.Pr public CloudServiceVaultAndSecretReference() { } public System.Uri SecretUri { get { throw null; } set { } } public Azure.Core.ResourceIdentifier SourceVaultId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.CloudServiceVaultAndSecretReference 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.Compute.Models.CloudServiceVaultAndSecretReference System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3774,6 +3839,7 @@ public partial class CloudServiceVaultCertificate : System.ClientModel.Primitive { public CloudServiceVaultCertificate() { } public System.Uri CertificateUri { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.CloudServiceVaultCertificate 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.Compute.Models.CloudServiceVaultCertificate System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3785,6 +3851,7 @@ public partial class CloudServiceVaultSecretGroup : System.ClientModel.Primitive public CloudServiceVaultSecretGroup() { } public Azure.Core.ResourceIdentifier SourceVaultId { get { throw null; } set { } } public System.Collections.Generic.IList VaultCertificates { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.CloudServiceVaultSecretGroup 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.Compute.Models.CloudServiceVaultSecretGroup System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3797,6 +3864,7 @@ internal CommunityGalleryImageIdentifier() { } public string Offer { get { throw null; } } public string Publisher { get { throw null; } } public string Sku { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.CommunityGalleryImageIdentifier 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.Compute.Models.CommunityGalleryImageIdentifier System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3814,6 +3882,7 @@ public CommunityGalleryInfo() { } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public System.Uri PublisherUri { get { throw null; } set { } } public string PublisherUriString { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.CommunityGalleryInfo 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.Compute.Models.CommunityGalleryInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3828,6 +3897,7 @@ internal CommunityGalleryMetadata() { } public System.Collections.Generic.IReadOnlyList PublicNames { get { throw null; } } public string PublisherContact { get { throw null; } } public System.Uri PublisherUri { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.CommunityGalleryMetadata 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.Compute.Models.CommunityGalleryMetadata System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3877,6 +3947,7 @@ internal ComputeApiError() { } public Azure.ResourceManager.Compute.Models.InnerError Innererror { get { throw null; } } public string Message { get { throw null; } } public string Target { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.ComputeApiError 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.Compute.Models.ComputeApiError System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3889,6 +3960,7 @@ internal ComputeApiErrorBase() { } public string Code { get { throw null; } } public string Message { get { throw null; } } public string Target { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.ComputeApiErrorBase 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.Compute.Models.ComputeApiErrorBase System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3979,6 +4051,7 @@ public ComputePlan() { } public string Product { get { throw null; } set { } } public string PromotionCode { get { throw null; } set { } } public string Publisher { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.ComputePlan 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.Compute.Models.ComputePlan System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4030,6 +4103,7 @@ internal ComputePrivateLinkResourceData() { } public Azure.Core.ResourceIdentifier GroupId { get { throw null; } } public System.Collections.Generic.IReadOnlyList RequiredMembers { get { throw null; } } public System.Collections.Generic.IReadOnlyList RequiredZoneNames { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.ComputePrivateLinkResourceData 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.Compute.Models.ComputePrivateLinkResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4042,6 +4116,7 @@ public ComputePrivateLinkServiceConnectionState() { } public string ActionsRequired { get { throw null; } set { } } public string Description { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.ComputePrivateEndpointServiceConnectionStatus? Status { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.ComputePrivateLinkServiceConnectionState 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.Compute.Models.ComputePrivateLinkServiceConnectionState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4053,6 +4128,7 @@ public partial class ComputePublicIPAddressSku : System.ClientModel.Primitives.I public ComputePublicIPAddressSku() { } public Azure.ResourceManager.Compute.Models.ComputePublicIPAddressSkuName? Name { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.ComputePublicIPAddressSkuTier? Tier { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.ComputePublicIPAddressSku 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.Compute.Models.ComputePublicIPAddressSku System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4099,6 +4175,7 @@ public partial class ComputeResourcePatch : System.ClientModel.Primitives.IJsonM { public ComputeResourcePatch() { } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.ComputeResourcePatch 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.Compute.Models.ComputeResourcePatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4121,6 +4198,7 @@ internal ComputeResourceSku() { } public System.Collections.Generic.IReadOnlyList Restrictions { get { throw null; } } public string Size { get { throw null; } } public string Tier { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.ComputeResourceSku 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.Compute.Models.ComputeResourceSku System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4132,6 +4210,7 @@ public partial class ComputeResourceSkuCapabilities : System.ClientModel.Primiti internal ComputeResourceSkuCapabilities() { } public string Name { get { throw null; } } public string Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.ComputeResourceSkuCapabilities 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.Compute.Models.ComputeResourceSkuCapabilities System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4145,6 +4224,7 @@ internal ComputeResourceSkuCapacity() { } public long? Maximum { get { throw null; } } public long? Minimum { get { throw null; } } public Azure.ResourceManager.Compute.Models.ComputeResourceSkuCapacityScaleType? ScaleType { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.ComputeResourceSkuCapacity 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.Compute.Models.ComputeResourceSkuCapacity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4165,6 +4245,7 @@ internal ComputeResourceSkuLocationInfo() { } public Azure.Core.AzureLocation? Location { get { throw null; } } public System.Collections.Generic.IReadOnlyList ZoneDetails { get { throw null; } } public System.Collections.Generic.IReadOnlyList Zones { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.ComputeResourceSkuLocationInfo 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.Compute.Models.ComputeResourceSkuLocationInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4176,6 +4257,7 @@ public partial class ComputeResourceSkuRestrictionInfo : System.ClientModel.Prim internal ComputeResourceSkuRestrictionInfo() { } public System.Collections.Generic.IReadOnlyList Locations { get { throw null; } } public System.Collections.Generic.IReadOnlyList Zones { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.ComputeResourceSkuRestrictionInfo 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.Compute.Models.ComputeResourceSkuRestrictionInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4189,6 +4271,7 @@ internal ComputeResourceSkuRestrictions() { } public Azure.ResourceManager.Compute.Models.ComputeResourceSkuRestrictionInfo RestrictionInfo { get { throw null; } } public Azure.ResourceManager.Compute.Models.ComputeResourceSkuRestrictionsType? RestrictionsType { get { throw null; } } public System.Collections.Generic.IReadOnlyList Values { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.ComputeResourceSkuRestrictions 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.Compute.Models.ComputeResourceSkuRestrictions System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4210,6 +4293,7 @@ public partial class ComputeResourceSkuZoneDetails : System.ClientModel.Primitiv internal ComputeResourceSkuZoneDetails() { } public System.Collections.Generic.IReadOnlyList Capabilities { get { throw null; } } public System.Collections.Generic.IReadOnlyList Name { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.ComputeResourceSkuZoneDetails 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.Compute.Models.ComputeResourceSkuZoneDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4221,6 +4305,7 @@ public partial class ComputeScheduledEventsProfile : System.ClientModel.Primitiv public ComputeScheduledEventsProfile() { } public Azure.ResourceManager.Compute.Models.OSImageNotificationProfile OSImageNotificationProfile { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.TerminateNotificationProfile TerminateNotificationProfile { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.ComputeScheduledEventsProfile 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.Compute.Models.ComputeScheduledEventsProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4237,6 +4322,7 @@ public ComputeSecurityPostureReference(Azure.Core.ResourceIdentifier id) { } public System.Collections.Generic.IList ExcludeExtensions { get { throw null; } } public Azure.Core.ResourceIdentifier Id { get { throw null; } set { } } public bool? IsOverridable { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.ComputeSecurityPostureReference 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.Compute.Models.ComputeSecurityPostureReference System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4249,6 +4335,7 @@ public ComputeSku() { } public long? Capacity { get { throw null; } set { } } public string Name { get { throw null; } set { } } public string Tier { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.ComputeSku 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.Compute.Models.ComputeSku System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4260,6 +4347,7 @@ public partial class ComputeSkuProfile : System.ClientModel.Primitives.IJsonMode public ComputeSkuProfile() { } public Azure.ResourceManager.Compute.Models.ComputeAllocationStrategy? AllocationStrategy { get { throw null; } set { } } public System.Collections.Generic.IList VmSizes { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.ComputeSkuProfile 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.Compute.Models.ComputeSkuProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4270,6 +4358,7 @@ public partial class ComputeSkuProfileVmSize : System.ClientModel.Primitives.IJs { public ComputeSkuProfileVmSize() { } public string Name { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.ComputeSkuProfileVmSize 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.Compute.Models.ComputeSkuProfileVmSize System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4286,6 +4375,7 @@ public partial class ComputeSubResourceData : System.ClientModel.Primitives.IJso { public ComputeSubResourceData() { } public Azure.Core.ResourceIdentifier Id { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.ComputeSubResourceData 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.Compute.Models.ComputeSubResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4296,6 +4386,7 @@ public partial class ComputeSubResourceDataWithColocationStatus : Azure.Resource { public ComputeSubResourceDataWithColocationStatus() { } public Azure.ResourceManager.Compute.Models.InstanceViewStatus ColocationStatus { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.ComputeSubResourceDataWithColocationStatus 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.Compute.Models.ComputeSubResourceDataWithColocationStatus System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4309,6 +4400,7 @@ internal ComputeUsage() { } public long Limit { get { throw null; } } public Azure.ResourceManager.Compute.Models.ComputeUsageName Name { get { throw null; } } public Azure.ResourceManager.Compute.Models.ComputeUsageUnit Unit { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.ComputeUsage 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.Compute.Models.ComputeUsage System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4320,6 +4412,7 @@ public partial class ComputeUsageName : System.ClientModel.Primitives.IJsonModel internal ComputeUsageName() { } public string LocalizedValue { get { throw null; } } public string Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.ComputeUsageName 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.Compute.Models.ComputeUsageName System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4347,6 +4440,7 @@ public partial class ComputeWriteableSubResourceData : System.ClientModel.Primit { public ComputeWriteableSubResourceData() { } public virtual Azure.Core.ResourceIdentifier Id { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.ComputeWriteableSubResourceData 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.Compute.Models.ComputeWriteableSubResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4397,6 +4491,7 @@ public partial class CopyCompletionError : System.ClientModel.Primitives.IJsonMo public CopyCompletionError(Azure.ResourceManager.Compute.Models.CopyCompletionErrorReason errorCode, string errorMessage) { } public Azure.ResourceManager.Compute.Models.CopyCompletionErrorReason ErrorCode { get { throw null; } set { } } public string ErrorMessage { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.CopyCompletionError 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.Compute.Models.CopyCompletionError System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4442,6 +4537,7 @@ public partial class DataDiskImage : 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.Compute.Models.DataDiskImage System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4452,6 +4548,7 @@ public partial class DataDiskImageEncryption : Azure.ResourceManager.Compute.Mod { public DataDiskImageEncryption(int lun) { } public int Lun { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.DataDiskImageEncryption 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.Compute.Models.DataDiskImageEncryption System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4467,6 +4564,7 @@ public DataDisksToAttach(string diskId) { } public string DiskId { get { throw null; } } public int? Lun { get { throw null; } set { } } public bool? WriteAcceleratorEnabled { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.DataDisksToAttach 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.Compute.Models.DataDisksToAttach System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4478,6 +4576,7 @@ public partial class DataDisksToDetach : System.ClientModel.Primitives.IJsonMode public DataDisksToDetach(string diskId) { } public Azure.ResourceManager.Compute.Models.DiskDetachOptionType? DetachOption { get { throw null; } set { } } public string DiskId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.DataDisksToDetach 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.Compute.Models.DataDisksToDetach System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4489,6 +4588,7 @@ public partial class DedicatedHostAllocatableVm : System.ClientModel.Primitives. internal DedicatedHostAllocatableVm() { } public double? Count { get { throw null; } } public string VmSize { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.DedicatedHostAllocatableVm 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.Compute.Models.DedicatedHostAllocatableVm System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4504,6 +4604,7 @@ public DedicatedHostGroupPatch() { } public bool? SupportAutomaticPlacement { get { throw null; } set { } } public bool? UltraSsdEnabled { get { throw null; } set { } } public System.Collections.Generic.IList Zones { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.DedicatedHostGroupPatch 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.Compute.Models.DedicatedHostGroupPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4516,6 +4617,7 @@ internal DedicatedHostInstanceView() { } public string AssetId { get { throw null; } } public System.Collections.Generic.IReadOnlyList AvailableCapacityAllocatableVms { get { throw null; } } public System.Collections.Generic.IReadOnlyList Statuses { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.DedicatedHostInstanceView 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.Compute.Models.DedicatedHostInstanceView System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4526,6 +4628,7 @@ public partial class DedicatedHostInstanceViewWithName : Azure.ResourceManager.C { internal DedicatedHostInstanceViewWithName() { } public string Name { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.DedicatedHostInstanceViewWithName 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.Compute.Models.DedicatedHostInstanceViewWithName System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4551,6 +4654,7 @@ public DedicatedHostPatch() { } public Azure.ResourceManager.Compute.Models.ComputeSku Sku { get { throw null; } set { } } public System.DateTimeOffset? TimeCreated { get { throw null; } } public System.Collections.Generic.IReadOnlyList VirtualMachines { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.DedicatedHostPatch 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.Compute.Models.DedicatedHostPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4598,6 +4702,7 @@ public partial class DiffDiskSettings : System.ClientModel.Primitives.IJsonModel public DiffDiskSettings() { } public Azure.ResourceManager.Compute.Models.DiffDiskOption? Option { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.DiffDiskPlacement? Placement { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.DiffDiskSettings 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.Compute.Models.DiffDiskSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4608,6 +4713,7 @@ public partial class DiskAccessPatch : System.ClientModel.Primitives.IJsonModel< { public DiskAccessPatch() { } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.DiskAccessPatch 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.Compute.Models.DiskAccessPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4696,6 +4802,7 @@ public DiskCreationData(Azure.ResourceManager.Compute.Models.DiskCreateOption cr public System.Uri SourceUri { get { throw null; } set { } } public Azure.Core.ResourceIdentifier StorageAccountId { get { throw null; } set { } } public long? UploadSizeBytes { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.DiskCreationData 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.Compute.Models.DiskCreationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4742,6 +4849,7 @@ public partial class DiskEncryption : 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.Compute.Models.DiskEncryption System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4757,6 +4865,7 @@ public DiskEncryptionSetPatch() { } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public bool? RotationToLatestKeyVersionEnabled { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.DiskEncryptionSetPatch 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.Compute.Models.DiskEncryptionSetPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4769,6 +4878,7 @@ public DiskEncryptionSettings() { } public Azure.ResourceManager.Compute.Models.KeyVaultSecretReference DiskEncryptionKey { get { throw null; } set { } } public bool? Enabled { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.KeyVaultKeyReference KeyEncryptionKey { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.DiskEncryptionSettings 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.Compute.Models.DiskEncryptionSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4798,6 +4908,7 @@ public partial class DiskImageEncryption : System.ClientModel.Primitives.IJsonMo { public DiskImageEncryption() { } public Azure.Core.ResourceIdentifier DiskEncryptionSetId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.DiskImageEncryption 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.Compute.Models.DiskImageEncryption System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4829,6 +4940,7 @@ public DiskImagePatch() { } public string ProvisioningState { get { throw null; } } public Azure.Core.ResourceIdentifier SourceVirtualMachineId { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.ImageStorageProfile StorageProfile { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.DiskImagePatch 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.Compute.Models.DiskImagePatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4841,6 +4953,7 @@ internal DiskInstanceView() { } public System.Collections.Generic.IReadOnlyList EncryptionSettings { get { throw null; } } public string Name { get { throw null; } } public System.Collections.Generic.IReadOnlyList Statuses { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.DiskInstanceView 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.Compute.Models.DiskInstanceView System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4872,6 +4985,7 @@ public DiskPurchasePlan(string name, string publisher, string product) { } public string Product { get { throw null; } set { } } public string PromotionCode { get { throw null; } set { } } public string Publisher { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.DiskPurchasePlan 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.Compute.Models.DiskPurchasePlan System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4883,6 +4997,7 @@ public partial class DiskRestorePointAttributes : Azure.ResourceManager.Compute. public DiskRestorePointAttributes() { } public Azure.ResourceManager.Compute.Models.RestorePointEncryption Encryption { get { throw null; } set { } } public Azure.Core.ResourceIdentifier SourceDiskRestorePointId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.DiskRestorePointAttributes 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.Compute.Models.DiskRestorePointAttributes System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4894,6 +5009,7 @@ public partial class DiskRestorePointInstanceView : System.ClientModel.Primitive internal DiskRestorePointInstanceView() { } public string Id { get { throw null; } } public Azure.ResourceManager.Compute.Models.DiskRestorePointReplicationStatus ReplicationStatus { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.DiskRestorePointInstanceView 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.Compute.Models.DiskRestorePointInstanceView System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4905,6 +5021,7 @@ public partial class DiskRestorePointReplicationStatus : System.ClientModel.Prim internal DiskRestorePointReplicationStatus() { } public int? CompletionPercent { get { throw null; } } public Azure.ResourceManager.Compute.Models.InstanceViewStatus Status { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.DiskRestorePointReplicationStatus 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.Compute.Models.DiskRestorePointReplicationStatus System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4916,6 +5033,7 @@ public partial class DiskSecurityProfile : System.ClientModel.Primitives.IJsonMo public DiskSecurityProfile() { } public Azure.Core.ResourceIdentifier SecureVmDiskEncryptionSetId { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.DiskSecurityType? SecurityType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.DiskSecurityProfile 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.Compute.Models.DiskSecurityProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4948,6 +5066,7 @@ public partial class DiskSku : 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.Compute.Models.DiskSku System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5046,6 +5165,7 @@ public partial class EncryptionImages : System.ClientModel.Primitives.IJsonModel public EncryptionImages() { } public System.Collections.Generic.IList DataDiskImages { get { throw null; } } public Azure.ResourceManager.Compute.Models.OSDiskImageEncryption OSDiskImage { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.EncryptionImages 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.Compute.Models.EncryptionImages System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5057,6 +5177,7 @@ public partial class EncryptionSettingsElement : System.ClientModel.Primitives.I public EncryptionSettingsElement() { } public Azure.ResourceManager.Compute.Models.KeyVaultAndSecretReference DiskEncryptionKey { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.KeyVaultAndKeyReference KeyEncryptionKey { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.EncryptionSettingsElement 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.Compute.Models.EncryptionSettingsElement System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5069,6 +5190,7 @@ public EncryptionSettingsGroup(bool enabled) { } public bool Enabled { get { throw null; } set { } } public System.Collections.Generic.IList EncryptionSettings { get { throw null; } } public string EncryptionSettingsVersion { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.EncryptionSettingsGroup 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.Compute.Models.EncryptionSettingsGroup System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5122,6 +5244,7 @@ public GalleryApplicationCustomAction(string name, string script) { } public string Name { get { throw null; } set { } } public System.Collections.Generic.IList Parameters { get { throw null; } } public string Script { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.GalleryApplicationCustomAction 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.Compute.Models.GalleryApplicationCustomAction System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5136,6 +5259,7 @@ public GalleryApplicationCustomActionParameter(string name) { } public bool? IsRequired { get { throw null; } set { } } public string Name { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.GalleryApplicationCustomActionParameterType? ParameterType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.GalleryApplicationCustomActionParameter 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.Compute.Models.GalleryApplicationCustomActionParameter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5159,6 +5283,7 @@ public GalleryApplicationPatch() { } public System.Uri ReleaseNoteUri { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.SupportedOperatingSystemType? SupportedOSType { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.GalleryApplicationPatch 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.Compute.Models.GalleryApplicationPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5173,6 +5298,7 @@ public GalleryApplicationVersionPatch() { } public Azure.ResourceManager.Compute.Models.GalleryApplicationVersionPublishingProfile PublishingProfile { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.ReplicationStatus ReplicationStatus { get { throw null; } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.GalleryApplicationVersionPatch 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.Compute.Models.GalleryApplicationVersionPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5188,6 +5314,7 @@ public GalleryApplicationVersionPublishingProfile(Azure.ResourceManager.Compute. public Azure.ResourceManager.Compute.Models.UserArtifactManagement ManageActions { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.UserArtifactSettings Settings { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.UserArtifactSource Source { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.GalleryApplicationVersionPublishingProfile 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.Compute.Models.GalleryApplicationVersionPublishingProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5207,6 +5334,7 @@ public GalleryArtifactPublishingProfileBase() { } public Azure.ResourceManager.Compute.Models.ImageStorageAccountType? StorageAccountType { get { throw null; } set { } } public System.Collections.Generic.IList TargetExtendedLocations { get { throw null; } } public System.Collections.Generic.IList TargetRegions { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.GalleryArtifactPublishingProfileBase 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.Compute.Models.GalleryArtifactPublishingProfileBase System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5217,6 +5345,7 @@ public partial class GalleryArtifactSafetyProfileBase : System.ClientModel.Primi { public GalleryArtifactSafetyProfileBase() { } public bool? AllowDeletionOfReplicatedLocations { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.GalleryArtifactSafetyProfileBase 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.Compute.Models.GalleryArtifactSafetyProfileBase System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5230,6 +5359,7 @@ public GalleryArtifactVersionFullSource() { } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override System.Uri Uri { get { throw null; } set { } } public Azure.Core.ResourceIdentifier VirtualMachineId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.GalleryArtifactVersionFullSource 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.Compute.Models.GalleryArtifactVersionFullSource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5241,6 +5371,7 @@ public partial class GalleryArtifactVersionSource : System.ClientModel.Primitive public GalleryArtifactVersionSource() { } public Azure.Core.ResourceIdentifier Id { get { throw null; } set { } } public virtual System.Uri Uri { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.GalleryArtifactVersionSource 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.Compute.Models.GalleryArtifactVersionSource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5251,6 +5382,7 @@ public partial class GalleryDataDiskImage : Azure.ResourceManager.Compute.Models { public GalleryDataDiskImage(int lun) { } public int Lun { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.GalleryDataDiskImage 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.Compute.Models.GalleryDataDiskImage System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5265,6 +5397,7 @@ public GalleryDiskImage() { } public int? SizeInGB { get { throw null; } } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.Compute.Models.GalleryArtifactVersionSource Source { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.GalleryDiskImage 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.Compute.Models.GalleryDiskImage System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5275,6 +5408,7 @@ public partial class GalleryDiskImageSource : Azure.ResourceManager.Compute.Mode { public GalleryDiskImageSource() { } public Azure.Core.ResourceIdentifier StorageAccountId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.GalleryDiskImageSource 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.Compute.Models.GalleryDiskImageSource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5303,6 +5437,7 @@ public partial class GalleryExtendedLocation : System.ClientModel.Primitives.IJs public GalleryExtendedLocation() { } public Azure.ResourceManager.Compute.Models.GalleryExtendedLocationType? ExtendedLocationType { get { throw null; } set { } } public string Name { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.GalleryExtendedLocation 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.Compute.Models.GalleryExtendedLocation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5332,6 +5467,7 @@ public partial class GalleryImageFeature : System.ClientModel.Primitives.IJsonMo public GalleryImageFeature() { } public string Name { get { throw null; } set { } } public string Value { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.GalleryImageFeature 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.Compute.Models.GalleryImageFeature System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5344,6 +5480,7 @@ public GalleryImageIdentifier(string publisher, string offer, string sku) { } public string Offer { get { throw null; } set { } } public string Publisher { get { throw null; } set { } } public string Sku { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.GalleryImageIdentifier 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.Compute.Models.GalleryImageIdentifier System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5369,6 +5506,7 @@ public GalleryImagePatch() { } public Azure.ResourceManager.Compute.Models.RecommendedMachineConfiguration Recommended { get { throw null; } set { } } public System.Uri ReleaseNoteUri { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.GalleryImagePatch 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.Compute.Models.GalleryImagePatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5385,6 +5523,7 @@ public GalleryImageVersionPatch() { } public Azure.ResourceManager.Compute.Models.GalleryImageVersionUefiSettings SecurityUefiSettings { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.GalleryImageVersionStorageProfile StorageProfile { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.GalleryImageVersionPatch 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.Compute.Models.GalleryImageVersionPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5396,6 +5535,7 @@ public partial class GalleryImageVersionPolicyViolation : System.ClientModel.Pri internal GalleryImageVersionPolicyViolation() { } public Azure.ResourceManager.Compute.Models.GalleryImageVersionPolicyViolationCategory? Category { get { throw null; } } public string Details { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.GalleryImageVersionPolicyViolation 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.Compute.Models.GalleryImageVersionPolicyViolation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5425,6 +5565,7 @@ internal GalleryImageVersionPolicyViolation() { } public partial class GalleryImageVersionPublishingProfile : Azure.ResourceManager.Compute.Models.GalleryArtifactPublishingProfileBase, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public GalleryImageVersionPublishingProfile() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.GalleryImageVersionPublishingProfile 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.Compute.Models.GalleryImageVersionPublishingProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5436,6 +5577,7 @@ public partial class GalleryImageVersionSafetyProfile : Azure.ResourceManager.Co public GalleryImageVersionSafetyProfile() { } public bool? IsReportedForPolicyViolation { get { throw null; } } public System.Collections.Generic.IReadOnlyList PolicyViolations { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.GalleryImageVersionSafetyProfile 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.Compute.Models.GalleryImageVersionSafetyProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5450,6 +5592,7 @@ public GalleryImageVersionStorageProfile() { } public Azure.ResourceManager.Compute.Models.GalleryOSDiskImage OSDiskImage { get { throw null; } set { } } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.Compute.Models.GalleryArtifactVersionSource Source { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.GalleryImageVersionStorageProfile 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.Compute.Models.GalleryImageVersionStorageProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5461,6 +5604,7 @@ public partial class GalleryImageVersionUefiSettings : System.ClientModel.Primit public GalleryImageVersionUefiSettings() { } public Azure.ResourceManager.Compute.Models.UefiKeySignatures AdditionalSignatures { get { throw null; } set { } } public System.Collections.Generic.IList SignatureTemplateNames { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.GalleryImageVersionUefiSettings 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.Compute.Models.GalleryImageVersionUefiSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5470,6 +5614,7 @@ public GalleryImageVersionUefiSettings() { } public partial class GalleryOSDiskImage : Azure.ResourceManager.Compute.Models.GalleryDiskImage, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public GalleryOSDiskImage() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.GalleryOSDiskImage 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.Compute.Models.GalleryOSDiskImage System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5486,6 +5631,7 @@ public GalleryPatch() { } public Azure.ResourceManager.Compute.Models.SharingProfile SharingProfile { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.SharingStatus SharingStatus { get { throw null; } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.GalleryPatch 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.Compute.Models.GalleryPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5561,6 +5707,7 @@ public GalleryTargetExtendedLocation() { } public string Name { get { throw null; } set { } } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.Compute.Models.ImageStorageAccountType? StorageAccountType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.GalleryTargetExtendedLocation 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.Compute.Models.GalleryTargetExtendedLocation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5591,6 +5738,7 @@ public GrantAccessData(Azure.ResourceManager.Compute.Models.AccessLevel access, public int DurationInSeconds { get { throw null; } } public Azure.ResourceManager.Compute.Models.DiskImageFileFormat? FileFormat { get { throw null; } set { } } public bool? GetSecureVmGuestStateSas { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.GrantAccessData 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.Compute.Models.GrantAccessData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5626,6 +5774,7 @@ public partial class ImageAlternativeOption : System.ClientModel.Primitives.IJso public ImageAlternativeOption() { } public Azure.ResourceManager.Compute.Models.ImageAlternativeType? AlternativeType { get { throw null; } set { } } public string Value { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.ImageAlternativeOption 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.Compute.Models.ImageAlternativeOption System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5655,6 +5804,7 @@ public partial class ImageDataDisk : Azure.ResourceManager.Compute.Models.ImageD { public ImageDataDisk(int lun) { } public int Lun { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.ImageDataDisk 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.Compute.Models.ImageDataDisk System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5667,6 +5817,7 @@ public ImageDeprecationStatus() { } public Azure.ResourceManager.Compute.Models.ImageAlternativeOption AlternativeOption { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.ImageState? ImageState { get { throw null; } set { } } public System.DateTimeOffset? ScheduledDeprecationOn { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.ImageDeprecationStatus 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.Compute.Models.ImageDeprecationStatus System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5683,6 +5834,7 @@ public ImageDisk() { } public Azure.Core.ResourceIdentifier ManagedDiskId { get { throw null; } set { } } public Azure.Core.ResourceIdentifier SnapshotId { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.StorageAccountType? StorageAccountType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.ImageDisk 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.Compute.Models.ImageDisk System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5696,6 +5848,7 @@ public ImageDiskReference() { } public Azure.Core.ResourceIdentifier Id { get { throw null; } set { } } public int? Lun { get { throw null; } set { } } public string SharedGalleryImageId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.ImageDiskReference 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.Compute.Models.ImageDiskReference System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5707,6 +5860,7 @@ public partial class ImageOSDisk : Azure.ResourceManager.Compute.Models.ImageDis public ImageOSDisk(Azure.ResourceManager.Compute.Models.SupportedOperatingSystemType osType, Azure.ResourceManager.Compute.Models.OperatingSystemStateType osState) { } public Azure.ResourceManager.Compute.Models.OperatingSystemStateType OSState { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.SupportedOperatingSystemType OSType { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.ImageOSDisk 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.Compute.Models.ImageOSDisk System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5719,6 +5873,7 @@ public ImagePurchasePlan() { } public string Name { get { throw null; } set { } } public string Product { get { throw null; } set { } } public string Publisher { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.ImagePurchasePlan 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.Compute.Models.ImagePurchasePlan System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5735,6 +5890,7 @@ public ImageReference() { } public string SharedGalleryImageUniqueId { get { throw null; } set { } } public string Sku { get { throw null; } set { } } public string Version { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.ImageReference 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.Compute.Models.ImageReference System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5787,6 +5943,7 @@ public ImageStorageProfile() { } public System.Collections.Generic.IList DataDisks { get { throw null; } } public Azure.ResourceManager.Compute.Models.ImageOSDisk OSDisk { get { throw null; } set { } } public bool? ZoneResilient { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.ImageStorageProfile 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.Compute.Models.ImageStorageProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5798,6 +5955,7 @@ public partial class InnerError : 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.Compute.Models.InnerError System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5809,6 +5967,7 @@ public partial class InstanceSku : 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.Compute.Models.InstanceSku System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5823,6 +5982,7 @@ public InstanceViewStatus() { } public Azure.ResourceManager.Compute.Models.ComputeStatusLevelType? Level { get { throw null; } set { } } public string Message { get { throw null; } set { } } public System.DateTimeOffset? Time { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.InstanceViewStatus 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.Compute.Models.InstanceViewStatus System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5864,6 +6024,7 @@ public partial class KeyForDiskEncryptionSet : System.ClientModel.Primitives.IJs public KeyForDiskEncryptionSet(System.Uri keyUri) { } public System.Uri KeyUri { get { throw null; } set { } } public Azure.Core.ResourceIdentifier SourceVaultId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.KeyForDiskEncryptionSet 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.Compute.Models.KeyForDiskEncryptionSet System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5875,6 +6036,7 @@ public partial class KeyVaultAndKeyReference : System.ClientModel.Primitives.IJs public KeyVaultAndKeyReference(Azure.ResourceManager.Resources.Models.WritableSubResource sourceVault, System.Uri keyUri) { } public System.Uri KeyUri { get { throw null; } set { } } public Azure.Core.ResourceIdentifier SourceVaultId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.KeyVaultAndKeyReference 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.Compute.Models.KeyVaultAndKeyReference System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5886,6 +6048,7 @@ public partial class KeyVaultAndSecretReference : System.ClientModel.Primitives. public KeyVaultAndSecretReference(Azure.ResourceManager.Resources.Models.WritableSubResource sourceVault, System.Uri secretUri) { } public System.Uri SecretUri { get { throw null; } set { } } public Azure.Core.ResourceIdentifier SourceVaultId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.KeyVaultAndSecretReference 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.Compute.Models.KeyVaultAndSecretReference System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5897,6 +6060,7 @@ public partial class KeyVaultKeyReference : System.ClientModel.Primitives.IJsonM public KeyVaultKeyReference(System.Uri keyUri, Azure.ResourceManager.Resources.Models.WritableSubResource sourceVault) { } public System.Uri KeyUri { get { throw null; } set { } } public Azure.Core.ResourceIdentifier SourceVaultId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.KeyVaultKeyReference 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.Compute.Models.KeyVaultKeyReference System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5908,6 +6072,7 @@ public partial class KeyVaultSecretReference : System.ClientModel.Primitives.IJs public KeyVaultSecretReference(System.Uri secretUri, Azure.ResourceManager.Resources.Models.WritableSubResource sourceVault) { } public System.Uri SecretUri { get { throw null; } set { } } public Azure.Core.ResourceIdentifier SourceVaultId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.KeyVaultSecretReference 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.Compute.Models.KeyVaultSecretReference System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5928,6 +6093,7 @@ internal LastPatchInstallationSummary() { } public int? PendingPatchCount { get { throw null; } } public System.DateTimeOffset? StartOn { get { throw null; } } public Azure.ResourceManager.Compute.Models.PatchOperationStatus? Status { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.LastPatchInstallationSummary 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.Compute.Models.LastPatchInstallationSummary System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5946,6 +6112,7 @@ public LinuxConfiguration() { } public Azure.ResourceManager.Compute.Models.LinuxPatchSettings PatchSettings { get { throw null; } set { } } public bool? ProvisionVmAgent { get { throw null; } set { } } public System.Collections.Generic.IList SshPublicKeys { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.LinuxConfiguration 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.Compute.Models.LinuxConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5959,6 +6126,7 @@ public LinuxParameters() { } public string MaintenanceRunId { get { throw null; } set { } } public System.Collections.Generic.IList PackageNameMasksToExclude { get { throw null; } } public System.Collections.Generic.IList PackageNameMasksToInclude { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.LinuxParameters 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.Compute.Models.LinuxParameters System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5991,6 +6159,7 @@ public LinuxPatchSettings() { } public Azure.ResourceManager.Compute.Models.LinuxVmGuestPatchAutomaticByPlatformRebootSetting? AutomaticByPlatformRebootSetting { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.LinuxVmGuestPatchAutomaticByPlatformSettings AutomaticByPlatformSettings { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.LinuxVmGuestPatchMode? PatchMode { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.LinuxPatchSettings 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.Compute.Models.LinuxPatchSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6022,6 +6191,7 @@ public partial class LinuxVmGuestPatchAutomaticByPlatformSettings : System.Clien public LinuxVmGuestPatchAutomaticByPlatformSettings() { } public bool? BypassPlatformSafetyChecksOnUserSchedule { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.LinuxVmGuestPatchAutomaticByPlatformRebootSetting? RebootSetting { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.LinuxVmGuestPatchAutomaticByPlatformSettings 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.Compute.Models.LinuxVmGuestPatchAutomaticByPlatformSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6053,6 +6223,7 @@ public LoadBalancerFrontendIPConfiguration(string name) { } public string PrivateIPAddress { get { throw null; } set { } } public Azure.Core.ResourceIdentifier PublicIPAddressId { get { throw null; } set { } } public Azure.Core.ResourceIdentifier SubnetId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.LoadBalancerFrontendIPConfiguration 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.Compute.Models.LoadBalancerFrontendIPConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6063,6 +6234,7 @@ public partial class LogAnalytics : 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.Compute.Models.LogAnalytics System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6080,6 +6252,7 @@ public LogAnalyticsInputBase(System.Uri blobContainerSasUri, System.DateTimeOffs public bool? GroupByThrottlePolicy { get { throw null; } set { } } public bool? GroupByUserAgent { get { throw null; } set { } } public System.DateTimeOffset ToTime { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.LogAnalyticsInputBase 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.Compute.Models.LogAnalyticsInputBase System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6103,6 +6276,7 @@ internal MaintenanceRedeployStatus() { } public System.DateTimeOffset? MaintenanceWindowStartOn { get { throw null; } } public System.DateTimeOffset? PreMaintenanceWindowEndOn { get { throw null; } } public System.DateTimeOffset? PreMaintenanceWindowStartOn { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.MaintenanceRedeployStatus 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.Compute.Models.MaintenanceRedeployStatus System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6134,6 +6308,7 @@ public ManagedDiskPatch() { } public bool? SupportsHibernation { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } public string Tier { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.ManagedDiskPatch 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.Compute.Models.ManagedDiskPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6294,6 +6469,7 @@ public partial class OrchestrationServiceStateContent : System.ClientModel.Primi public OrchestrationServiceStateContent(Azure.ResourceManager.Compute.Models.OrchestrationServiceName serviceName, Azure.ResourceManager.Compute.Models.OrchestrationServiceStateAction action) { } public Azure.ResourceManager.Compute.Models.OrchestrationServiceStateAction Action { get { throw null; } } public Azure.ResourceManager.Compute.Models.OrchestrationServiceName ServiceName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.OrchestrationServiceStateContent 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.Compute.Models.OrchestrationServiceStateContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6305,6 +6481,7 @@ public partial class OrchestrationServiceSummary : System.ClientModel.Primitives internal OrchestrationServiceSummary() { } public Azure.ResourceManager.Compute.Models.OrchestrationServiceName? ServiceName { get { throw null; } } public Azure.ResourceManager.Compute.Models.OrchestrationServiceState? ServiceState { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.OrchestrationServiceSummary 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.Compute.Models.OrchestrationServiceSummary System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6315,6 +6492,7 @@ public partial class OSDiskImageEncryption : Azure.ResourceManager.Compute.Model { public OSDiskImageEncryption() { } public Azure.ResourceManager.Compute.Models.OSDiskImageSecurityProfile SecurityProfile { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.OSDiskImageEncryption 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.Compute.Models.OSDiskImageEncryption System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6326,6 +6504,7 @@ public partial class OSDiskImageSecurityProfile : System.ClientModel.Primitives. public OSDiskImageSecurityProfile() { } public Azure.ResourceManager.Compute.Models.ConfidentialVmEncryptionType? ConfidentialVmEncryptionType { get { throw null; } set { } } public string SecureVmDiskEncryptionSetId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.OSDiskImageSecurityProfile 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.Compute.Models.OSDiskImageSecurityProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6337,6 +6516,7 @@ public partial class OSImageNotificationProfile : System.ClientModel.Primitives. public OSImageNotificationProfile() { } public bool? Enable { get { throw null; } set { } } public string NotBeforeTimeout { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.OSImageNotificationProfile 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.Compute.Models.OSImageNotificationProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6348,6 +6528,7 @@ public partial class OSProfileProvisioningData : System.ClientModel.Primitives.I public OSProfileProvisioningData() { } public string AdminPassword { get { throw null; } set { } } public string CustomData { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.OSProfileProvisioningData 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.Compute.Models.OSProfileProvisioningData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6361,6 +6542,7 @@ internal OSVersionPropertiesBase() { } public bool? IsDefault { get { throw null; } } public string Label { get { throw null; } } public string Version { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.OSVersionPropertiesBase 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.Compute.Models.OSVersionPropertiesBase System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6411,6 +6593,7 @@ internal PatchInstallationDetail() { } public string Name { get { throw null; } } public string PatchId { get { throw null; } } public string Version { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.PatchInstallationDetail 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.Compute.Models.PatchInstallationDetail System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6469,6 +6652,7 @@ public PatchSettings() { } public Azure.ResourceManager.Compute.Models.WindowsVmGuestPatchAutomaticByPlatformSettings AutomaticByPlatformSettings { get { throw null; } set { } } public bool? EnableHotpatching { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.WindowsVmGuestPatchMode? PatchMode { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.PatchSettings 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.Compute.Models.PatchSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6482,6 +6666,7 @@ internal PirCommunityGalleryResourceData() { } public string Name { get { throw null; } } public Azure.Core.ResourceType? ResourceType { get { throw null; } } public string UniqueId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.PirCommunityGalleryResourceData 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.Compute.Models.PirCommunityGalleryResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6493,6 +6678,7 @@ public partial class PirResourceData : System.ClientModel.Primitives.IJsonModel< internal PirResourceData() { } public Azure.Core.AzureLocation? Location { get { throw null; } } public string Name { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.PirResourceData 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.Compute.Models.PirResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6503,6 +6689,7 @@ public partial class PirSharedGalleryResourceData : Azure.ResourceManager.Comput { internal PirSharedGalleryResourceData() { } public string UniqueId { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.PirSharedGalleryResourceData 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.Compute.Models.PirSharedGalleryResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6530,6 +6717,7 @@ internal PirSharedGalleryResourceData() { } public partial class ProximityPlacementGroupPatch : Azure.ResourceManager.Compute.Models.ComputeResourcePatch, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ProximityPlacementGroupPatch() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.ProximityPlacementGroupPatch 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.Compute.Models.ProximityPlacementGroupPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6560,6 +6748,7 @@ public ProxyAgentSettings() { } public bool? Enabled { get { throw null; } set { } } public int? KeyIncarnationId { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.Mode? Mode { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.ProxyAgentSettings 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.Compute.Models.ProxyAgentSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6590,6 +6779,7 @@ public PurchasePlan(string publisher, string name, string product) { } public string Name { get { throw null; } set { } } public string Product { get { throw null; } set { } } public string Publisher { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.PurchasePlan 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.Compute.Models.PurchasePlan System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6601,6 +6791,7 @@ public partial class RecommendedMachineConfiguration : System.ClientModel.Primit public RecommendedMachineConfiguration() { } public Azure.ResourceManager.Compute.Models.ResourceRange Memory { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.ResourceRange VCpus { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.RecommendedMachineConfiguration 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.Compute.Models.RecommendedMachineConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6612,6 +6803,7 @@ public partial class RecoveryWalkResponse : System.ClientModel.Primitives.IJsonM internal RecoveryWalkResponse() { } public int? NextPlatformUpdateDomain { get { throw null; } } public bool? WalkPerformed { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.RecoveryWalkResponse 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.Compute.Models.RecoveryWalkResponse System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6645,6 +6837,7 @@ internal RegionalReplicationStatus() { } public int? Progress { get { throw null; } } public string Region { get { throw null; } } public Azure.ResourceManager.Compute.Models.RegionalReplicationState? State { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.RegionalReplicationStatus 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.Compute.Models.RegionalReplicationStatus System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6657,6 +6850,7 @@ internal RegionalSharingStatus() { } public string Details { get { throw null; } } public string Region { get { throw null; } } public Azure.ResourceManager.Compute.Models.SharingState? State { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.RegionalSharingStatus 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.Compute.Models.RegionalSharingStatus System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6687,6 +6881,7 @@ public partial class ReplicationStatus : System.ClientModel.Primitives.IJsonMode internal ReplicationStatus() { } public Azure.ResourceManager.Compute.Models.AggregatedReplicationState? AggregatedState { get { throw null; } } public System.Collections.Generic.IReadOnlyList Summary { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.ReplicationStatus 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.Compute.Models.ReplicationStatus System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6715,6 +6910,7 @@ public partial class RequestRateByIntervalContent : Azure.ResourceManager.Comput { public RequestRateByIntervalContent(System.Uri blobContainerSasUri, System.DateTimeOffset fromTime, System.DateTimeOffset toTime, Azure.ResourceManager.Compute.Models.IntervalInMins intervalLength) : base (default(System.Uri), default(System.DateTimeOffset), default(System.DateTimeOffset)) { } public Azure.ResourceManager.Compute.Models.IntervalInMins IntervalLength { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.RequestRateByIntervalContent 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.Compute.Models.RequestRateByIntervalContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6726,6 +6922,7 @@ public partial class ResiliencyPolicy : System.ClientModel.Primitives.IJsonModel public ResiliencyPolicy() { } public bool? ResilientVmCreationPolicyEnabled { get { throw null; } set { } } public bool? ResilientVmDeletionPolicyEnabled { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.ResiliencyPolicy 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.Compute.Models.ResiliencyPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6759,6 +6956,7 @@ internal ResourceInstanceViewStatus() { } public Azure.ResourceManager.Compute.Models.ComputeStatusLevelType? Level { get { throw null; } } public string Message { get { throw null; } } public System.DateTimeOffset? Time { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.ResourceInstanceViewStatus 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.Compute.Models.ResourceInstanceViewStatus System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6770,6 +6968,7 @@ public partial class ResourceRange : 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.Compute.Models.ResourceRange System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6782,6 +6981,7 @@ internal ResourceSkuCosts() { } public string ExtendedUnit { get { throw null; } } public string MeterId { get { throw null; } } public long? Quantity { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.ResourceSkuCosts 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.Compute.Models.ResourceSkuCosts System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6793,6 +6993,7 @@ public partial class RestorePointEncryption : System.ClientModel.Primitives.IJso public RestorePointEncryption() { } public Azure.Core.ResourceIdentifier DiskEncryptionSetId { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.RestorePointEncryptionType? EncryptionType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.RestorePointEncryption 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.Compute.Models.RestorePointEncryption System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6859,6 +7060,7 @@ public RestorePointGroupPatch() { } public string RestorePointGroupId { get { throw null; } } public System.Collections.Generic.IReadOnlyList RestorePoints { get { throw null; } } public Azure.ResourceManager.Compute.Models.RestorePointGroupSource Source { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.RestorePointGroupPatch 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.Compute.Models.RestorePointGroupPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6870,6 +7072,7 @@ public partial class RestorePointGroupSource : System.ClientModel.Primitives.IJs public RestorePointGroupSource() { } public Azure.Core.ResourceIdentifier Id { get { throw null; } set { } } public Azure.Core.AzureLocation? Location { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.RestorePointGroupSource 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.Compute.Models.RestorePointGroupSource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6881,6 +7084,7 @@ public partial class RestorePointInstanceView : System.ClientModel.Primitives.IJ internal RestorePointInstanceView() { } public System.Collections.Generic.IReadOnlyList DiskRestorePoints { get { throw null; } } public System.Collections.Generic.IReadOnlyList Statuses { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.RestorePointInstanceView 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.Compute.Models.RestorePointInstanceView System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6900,6 +7104,7 @@ public RestorePointSourceMetadata() { } public Azure.ResourceManager.Compute.Models.RestorePointSourceVmStorageProfile StorageProfile { get { throw null; } set { } } public string UserData { get { throw null; } } public string VmId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.RestorePointSourceMetadata 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.Compute.Models.RestorePointSourceMetadata System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6918,6 +7123,7 @@ public RestorePointSourceVmDataDisk() { } public Azure.ResourceManager.Compute.Models.VirtualMachineManagedDisk ManagedDisk { get { throw null; } set { } } public string Name { get { throw null; } } public bool? WriteAcceleratorEnabled { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.RestorePointSourceVmDataDisk 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.Compute.Models.RestorePointSourceVmDataDisk System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6937,6 +7143,7 @@ public RestorePointSourceVmOSDisk() { } public string Name { get { throw null; } } public Azure.ResourceManager.Compute.Models.OperatingSystemType? OSType { get { throw null; } } public bool? WriteAcceleratorEnabled { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.RestorePointSourceVmOSDisk 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.Compute.Models.RestorePointSourceVmOSDisk System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6950,6 +7157,7 @@ public RestorePointSourceVmStorageProfile() { } public System.Collections.Generic.IReadOnlyList DataDisks { get { throw null; } } public Azure.ResourceManager.Compute.Models.DiskControllerType? DiskControllerType { get { throw null; } } public Azure.ResourceManager.Compute.Models.RestorePointSourceVmOSDisk OSDisk { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.RestorePointSourceVmStorageProfile 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.Compute.Models.RestorePointSourceVmStorageProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6961,6 +7169,7 @@ public partial class RetrieveBootDiagnosticsDataResult : System.ClientModel.Prim internal RetrieveBootDiagnosticsDataResult() { } public System.Uri ConsoleScreenshotBlobUri { get { throw null; } } public System.Uri SerialConsoleLogBlobUri { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.RetrieveBootDiagnosticsDataResult 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.Compute.Models.RetrieveBootDiagnosticsDataResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6971,6 +7180,7 @@ public partial class RoleInstances : System.ClientModel.Primitives.IJsonModel roleInstancesValue) { } public System.Collections.Generic.IList RoleInstancesValue { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.RoleInstances 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.Compute.Models.RoleInstances System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6984,6 +7194,7 @@ internal RoleInstanceView() { } public int? PlatformUpdateDomain { get { throw null; } } public string PrivateId { get { throw null; } } public System.Collections.Generic.IReadOnlyList Statuses { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.RoleInstanceView 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.Compute.Models.RoleInstanceView System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6996,6 +7207,7 @@ internal RollbackStatusInfo() { } public int? FailedRolledbackInstanceCount { get { throw null; } } public Azure.ResourceManager.Compute.Models.ComputeApiError RollbackError { get { throw null; } } public int? SuccessfullyRolledbackInstanceCount { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.RollbackStatusInfo 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.Compute.Models.RollbackStatusInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7018,6 +7230,7 @@ public RollingUpgradePolicy() { } public string PauseTimeBetweenBatches { get { throw null; } set { } } public bool? PrioritizeUnhealthyInstances { get { throw null; } set { } } public bool? RollbackFailedInstancesOnPolicyBreach { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.RollingUpgradePolicy 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.Compute.Models.RollingUpgradePolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7031,6 +7244,7 @@ internal RollingUpgradeProgressInfo() { } public int? InProgressInstanceCount { get { throw null; } } public int? PendingInstanceCount { get { throw null; } } public int? SuccessfulInstanceCount { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.RollingUpgradeProgressInfo 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.Compute.Models.RollingUpgradeProgressInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7044,6 +7258,7 @@ internal RollingUpgradeRunningStatus() { } public Azure.ResourceManager.Compute.Models.RollingUpgradeActionType? LastAction { get { throw null; } } public System.DateTimeOffset? LastActionOn { get { throw null; } } public System.DateTimeOffset? StartOn { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.RollingUpgradeRunningStatus 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.Compute.Models.RollingUpgradeRunningStatus System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7062,6 +7277,7 @@ public partial class RunCommandDocument : Azure.ResourceManager.Compute.Models.R internal RunCommandDocument() { } public System.Collections.Generic.IReadOnlyList Parameters { get { throw null; } } public System.Collections.Generic.IReadOnlyList Script { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.RunCommandDocument 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.Compute.Models.RunCommandDocument System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7076,6 +7292,7 @@ internal RunCommandDocumentBase() { } public string Label { get { throw null; } } public Azure.ResourceManager.Compute.Models.SupportedOperatingSystemType OSType { get { throw null; } } public string Schema { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.RunCommandDocumentBase 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.Compute.Models.RunCommandDocumentBase System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7088,6 +7305,7 @@ public RunCommandInput(string commandId) { } public string CommandId { get { throw null; } } public System.Collections.Generic.IList Parameters { get { throw null; } } public System.Collections.Generic.IList Script { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.RunCommandInput 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.Compute.Models.RunCommandInput System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7099,6 +7317,7 @@ public partial class RunCommandInputParameter : System.ClientModel.Primitives.IJ public RunCommandInputParameter(string name, string value) { } public string Name { get { throw null; } set { } } public string Value { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.RunCommandInputParameter 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.Compute.Models.RunCommandInputParameter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7110,6 +7329,7 @@ public partial class RunCommandManagedIdentity : System.ClientModel.Primitives.I public RunCommandManagedIdentity() { } public string ClientId { get { throw null; } set { } } public string ObjectId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.RunCommandManagedIdentity 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.Compute.Models.RunCommandManagedIdentity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7123,6 +7343,7 @@ internal RunCommandParameterDefinition() { } public string Name { get { throw null; } } public bool? Required { get { throw null; } } public string RunCommandParameterDefinitionType { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.RunCommandParameterDefinition 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.Compute.Models.RunCommandParameterDefinition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7134,6 +7355,7 @@ public partial class ScaleInPolicy : System.ClientModel.Primitives.IJsonModel Rules { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.ScaleInPolicy 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.Compute.Models.ScaleInPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7146,6 +7368,7 @@ public ScheduledEventsPolicy() { } public bool? AutomaticallyApprove { get { throw null; } set { } } public bool? Enable { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.UserInitiatedRedeploy UserInitiatedRedeploy { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.ScheduledEventsPolicy 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.Compute.Models.ScheduledEventsPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7177,6 +7400,7 @@ public SecurityPostureReferenceUpdate() { } public System.Collections.Generic.IList ExcludeExtensions { get { throw null; } } public string Id { get { throw null; } set { } } public bool? IsOverridable { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.SecurityPostureReferenceUpdate 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.Compute.Models.SecurityPostureReferenceUpdate System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7191,6 +7415,7 @@ public SecurityProfile() { } public Azure.ResourceManager.Compute.Models.SecurityType? SecurityType { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.UefiSettings UefiSettings { get { throw null; } set { } } public string UserAssignedIdentityResourceId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.SecurityProfile 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.Compute.Models.SecurityProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7241,6 +7466,7 @@ public partial class SharedGalleryDataDiskImage : Azure.ResourceManager.Compute. { internal SharedGalleryDataDiskImage() { } public int Lun { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.SharedGalleryDataDiskImage 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.Compute.Models.SharedGalleryDataDiskImage System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7252,6 +7478,7 @@ public partial class SharedGalleryDiskImage : System.ClientModel.Primitives.IJso internal SharedGalleryDiskImage() { } public int? DiskSizeGB { get { throw null; } } public Azure.ResourceManager.Compute.Models.SharedGalleryHostCaching? HostCaching { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.SharedGalleryDiskImage 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.Compute.Models.SharedGalleryDiskImage System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7282,6 +7509,7 @@ public partial class SharedGalleryImageVersionStorageProfile : System.ClientMode internal SharedGalleryImageVersionStorageProfile() { } public System.Collections.Generic.IReadOnlyList DataDiskImages { get { throw null; } } public Azure.ResourceManager.Compute.Models.SharedGalleryOSDiskImage OSDiskImage { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.SharedGalleryImageVersionStorageProfile 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.Compute.Models.SharedGalleryImageVersionStorageProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7291,6 +7519,7 @@ internal SharedGalleryImageVersionStorageProfile() { } public partial class SharedGalleryOSDiskImage : Azure.ResourceManager.Compute.Models.SharedGalleryDiskImage, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal SharedGalleryOSDiskImage() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.SharedGalleryOSDiskImage 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.Compute.Models.SharedGalleryOSDiskImage System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7318,6 +7547,7 @@ public partial class ShareInfoElement : System.ClientModel.Primitives.IJsonModel { internal ShareInfoElement() { } public System.Uri VmUri { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.ShareInfoElement 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.Compute.Models.ShareInfoElement System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7330,6 +7560,7 @@ public SharingProfile() { } public Azure.ResourceManager.Compute.Models.CommunityGalleryInfo CommunityGalleryInfo { get { throw null; } set { } } public System.Collections.Generic.IReadOnlyList Groups { get { throw null; } } public Azure.ResourceManager.Compute.Models.GallerySharingPermissionType? Permission { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.SharingProfile 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.Compute.Models.SharingProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7341,6 +7572,7 @@ public partial class SharingProfileGroup : System.ClientModel.Primitives.IJsonMo public SharingProfileGroup() { } public Azure.ResourceManager.Compute.Models.SharingProfileGroupType? GroupType { get { throw null; } set { } } public System.Collections.Generic.IList Ids { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.SharingProfileGroup 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.Compute.Models.SharingProfileGroup System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7390,6 +7622,7 @@ public partial class SharingStatus : System.ClientModel.Primitives.IJsonModel Summary { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.SharingStatus 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.Compute.Models.SharingStatus System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7401,6 +7634,7 @@ public partial class SharingUpdate : System.ClientModel.Primitives.IJsonModel Groups { get { throw null; } } public Azure.ResourceManager.Compute.Models.SharingUpdateOperationType OperationType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.SharingUpdate 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.Compute.Models.SharingUpdate System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7442,6 +7676,7 @@ public SnapshotPatch() { } public Azure.ResourceManager.Compute.Models.SupportedCapabilities SupportedCapabilities { get { throw null; } set { } } public bool? SupportsHibernation { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.SnapshotPatch 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.Compute.Models.SnapshotPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7453,6 +7688,7 @@ public partial class SnapshotSku : 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.Compute.Models.SnapshotSku System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7483,6 +7719,7 @@ public partial class SpotRestorePolicy : System.ClientModel.Primitives.IJsonMode public SpotRestorePolicy() { } public bool? Enabled { get { throw null; } set { } } public string RestoreTimeout { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.SpotRestorePolicy 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.Compute.Models.SpotRestorePolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7511,6 +7748,7 @@ public partial class SshGenerateKeyPairInputContent : System.ClientModel.Primiti { public SshGenerateKeyPairInputContent() { } public Azure.ResourceManager.Compute.Models.SshEncryptionType? EncryptionType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.SshGenerateKeyPairInputContent 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.Compute.Models.SshGenerateKeyPairInputContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7522,6 +7760,7 @@ public partial class SshPublicKeyConfiguration : System.ClientModel.Primitives.I public SshPublicKeyConfiguration() { } public string KeyData { get { throw null; } set { } } public string Path { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.SshPublicKeyConfiguration 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.Compute.Models.SshPublicKeyConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7534,6 +7773,7 @@ internal SshPublicKeyGenerateKeyPairResult() { } public Azure.Core.ResourceIdentifier Id { get { throw null; } } public string PrivateKey { get { throw null; } } public string PublicKey { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.SshPublicKeyGenerateKeyPairResult 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.Compute.Models.SshPublicKeyGenerateKeyPairResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7544,6 +7784,7 @@ public partial class SshPublicKeyPatch : Azure.ResourceManager.Compute.Models.Co { public SshPublicKeyPatch() { } public string PublicKey { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.SshPublicKeyPatch 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.Compute.Models.SshPublicKeyPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7555,6 +7796,7 @@ public partial class StatusCodeCount : System.ClientModel.Primitives.IJsonModel< internal StatusCodeCount() { } public string Code { get { throw null; } } public int? Count { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.StatusCodeCount 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.Compute.Models.StatusCodeCount System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7623,6 +7865,7 @@ public SupportedCapabilities() { } public bool? AcceleratedNetwork { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.ArchitectureType? Architecture { get { throw null; } set { } } public string DiskControllerTypes { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.SupportedCapabilities 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.Compute.Models.SupportedCapabilities System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7642,6 +7885,7 @@ public TargetRegion(string name) { } public string Name { get { throw null; } set { } } public int? RegionalReplicaCount { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.ImageStorageAccountType? StorageAccountType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.TargetRegion 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.Compute.Models.TargetRegion System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7653,6 +7897,7 @@ public partial class TerminateNotificationProfile : System.ClientModel.Primitive public TerminateNotificationProfile() { } public bool? Enable { get { throw null; } set { } } public string NotBeforeTimeout { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.TerminateNotificationProfile 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.Compute.Models.TerminateNotificationProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7662,6 +7907,7 @@ public TerminateNotificationProfile() { } public partial class ThrottledRequestsContent : Azure.ResourceManager.Compute.Models.LogAnalyticsInputBase, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ThrottledRequestsContent(System.Uri blobContainerSasUri, System.DateTimeOffset fromTime, System.DateTimeOffset toTime) : base (default(System.Uri), default(System.DateTimeOffset), default(System.DateTimeOffset)) { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.ThrottledRequestsContent 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.Compute.Models.ThrottledRequestsContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7673,6 +7919,7 @@ public partial class UefiKey : System.ClientModel.Primitives.IJsonModel Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.UefiKey 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.Compute.Models.UefiKey System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7686,6 +7933,7 @@ public UefiKeySignatures() { } public System.Collections.Generic.IList Dbx { get { throw null; } } public System.Collections.Generic.IList Kek { get { throw null; } } public Azure.ResourceManager.Compute.Models.UefiKey Pk { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.UefiKeySignatures 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.Compute.Models.UefiKeySignatures System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7715,6 +7963,7 @@ public partial class UefiSettings : 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.Compute.Models.UefiSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7745,6 +7994,7 @@ public partial class UpdateDomainIdentifier : System.ClientModel.Primitives.IJso public UpdateDomainIdentifier() { } public Azure.Core.ResourceIdentifier Id { get { throw null; } } public string Name { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.UpdateDomainIdentifier 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.Compute.Models.UpdateDomainIdentifier System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7757,6 +8007,7 @@ internal UpgradeOperationHistoricalStatusInfo() { } public Azure.Core.AzureLocation? Location { get { throw null; } } public Azure.ResourceManager.Compute.Models.UpgradeOperationHistoricalStatusInfoProperties Properties { get { throw null; } } public string UpgradeOperationHistoricalStatusInfoType { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.UpgradeOperationHistoricalStatusInfo 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.Compute.Models.UpgradeOperationHistoricalStatusInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7772,6 +8023,7 @@ internal UpgradeOperationHistoricalStatusInfoProperties() { } public Azure.ResourceManager.Compute.Models.UpgradeOperationHistoryStatus RunningStatus { get { throw null; } } public Azure.ResourceManager.Compute.Models.UpgradeOperationInvoker? StartedBy { get { throw null; } } public Azure.ResourceManager.Compute.Models.ImageReference TargetImageReference { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.UpgradeOperationHistoricalStatusInfoProperties 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.Compute.Models.UpgradeOperationHistoricalStatusInfoProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7784,6 +8036,7 @@ internal UpgradeOperationHistoryStatus() { } public Azure.ResourceManager.Compute.Models.UpgradeState? Code { get { throw null; } } public System.DateTimeOffset? EndOn { get { throw null; } } public System.DateTimeOffset? StartOn { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.UpgradeOperationHistoryStatus 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.Compute.Models.UpgradeOperationHistoryStatus System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7809,6 +8062,7 @@ public UserArtifactManagement(string install, string remove) { } public string Install { get { throw null; } set { } } public string Remove { get { throw null; } set { } } public string Update { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.UserArtifactManagement 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.Compute.Models.UserArtifactManagement System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7820,6 +8074,7 @@ public partial class UserArtifactSettings : System.ClientModel.Primitives.IJsonM public UserArtifactSettings() { } public string ConfigFileName { get { throw null; } set { } } public string PackageFileName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.UserArtifactSettings 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.Compute.Models.UserArtifactSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7831,6 +8086,7 @@ public partial class UserArtifactSource : System.ClientModel.Primitives.IJsonMod public UserArtifactSource(string mediaLink) { } public string DefaultConfigurationLink { get { throw null; } set { } } public string MediaLink { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.UserArtifactSource 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.Compute.Models.UserArtifactSource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7841,6 +8097,7 @@ public partial class UserInitiatedRedeploy : System.ClientModel.Primitives.IJson { public UserInitiatedRedeploy() { } public bool? AutomaticallyApprove { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.UserInitiatedRedeploy 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.Compute.Models.UserInitiatedRedeploy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7852,6 +8109,7 @@ public partial class VaultCertificate : System.ClientModel.Primitives.IJsonModel public VaultCertificate() { } public string CertificateStore { get { throw null; } set { } } public System.Uri CertificateUri { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.VaultCertificate 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.Compute.Models.VaultCertificate System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7863,6 +8121,7 @@ public partial class VaultSecretGroup : System.ClientModel.Primitives.IJsonModel public VaultSecretGroup() { } public Azure.Core.ResourceIdentifier SourceVaultId { get { throw null; } set { } } public System.Collections.Generic.IList VaultCertificates { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.VaultSecretGroup 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.Compute.Models.VaultSecretGroup System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7875,6 +8134,7 @@ internal VirtualMachineAgentInstanceView() { } public System.Collections.Generic.IReadOnlyList ExtensionHandlers { get { throw null; } } public System.Collections.Generic.IReadOnlyList Statuses { get { throw null; } } public string VmAgentVersion { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.VirtualMachineAgentInstanceView 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.Compute.Models.VirtualMachineAgentInstanceView System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7892,6 +8152,7 @@ internal VirtualMachineAssessPatchesResult() { } public bool? RebootPending { get { throw null; } } public System.DateTimeOffset? StartOn { get { throw null; } } public Azure.ResourceManager.Compute.Models.PatchOperationStatus? Status { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.VirtualMachineAssessPatchesResult 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.Compute.Models.VirtualMachineAssessPatchesResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7904,6 +8165,7 @@ public VirtualMachineCaptureContent(string vhdPrefix, string destinationContaine public string DestinationContainerName { get { throw null; } } public bool OverwriteVhds { get { throw null; } } public string VhdPrefix { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.VirtualMachineCaptureContent 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.Compute.Models.VirtualMachineCaptureContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7917,6 +8179,7 @@ public VirtualMachineCaptureResult() { } public System.BinaryData Parameters { get { throw null; } } public System.Collections.Generic.IReadOnlyList Resources { get { throw null; } } public string Schema { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.VirtualMachineCaptureResult 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.Compute.Models.VirtualMachineCaptureResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7941,6 +8204,7 @@ public VirtualMachineDataDisk(int lun, Azure.ResourceManager.Compute.Models.Disk public bool? ToBeDetached { get { throw null; } set { } } public System.Uri VhdUri { get { throw null; } set { } } public bool? WriteAcceleratorEnabled { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.VirtualMachineDataDisk 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.Compute.Models.VirtualMachineDataDisk System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7952,6 +8216,7 @@ public partial class VirtualMachineDiskSecurityProfile : System.ClientModel.Prim public VirtualMachineDiskSecurityProfile() { } public Azure.Core.ResourceIdentifier DiskEncryptionSetId { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.SecurityEncryptionType? SecurityEncryptionType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.VirtualMachineDiskSecurityProfile 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.Compute.Models.VirtualMachineDiskSecurityProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8000,6 +8265,7 @@ internal VirtualMachineExtensionHandlerInstanceView() { } public Azure.ResourceManager.Compute.Models.InstanceViewStatus Status { get { throw null; } } public string TypeHandlerVersion { get { throw null; } } public string VirtualMachineExtensionHandlerInstanceViewType { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.VirtualMachineExtensionHandlerInstanceView 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.Compute.Models.VirtualMachineExtensionHandlerInstanceView System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8014,6 +8280,7 @@ public VirtualMachineExtensionInstanceView() { } public System.Collections.Generic.IList Substatuses { get { throw null; } } public string TypeHandlerVersion { get { throw null; } set { } } public string VirtualMachineExtensionInstanceViewType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.VirtualMachineExtensionInstanceView 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.Compute.Models.VirtualMachineExtensionInstanceView System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8035,6 +8302,7 @@ public VirtualMachineExtensionPatch() { } public System.BinaryData Settings { get { throw null; } set { } } public bool? SuppressFailures { get { throw null; } set { } } public string TypeHandlerVersion { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.VirtualMachineExtensionPatch 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.Compute.Models.VirtualMachineExtensionPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8050,6 +8318,7 @@ public VirtualMachineGalleryApplication(string packageReferenceId) { } public string PackageReferenceId { get { throw null; } set { } } public string Tags { get { throw null; } set { } } public bool? TreatFailureAsDeploymentFailure { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.VirtualMachineGalleryApplication 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.Compute.Models.VirtualMachineGalleryApplication System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8061,6 +8330,7 @@ public partial class VirtualMachineHardwareProfile : System.ClientModel.Primitiv public VirtualMachineHardwareProfile() { } public Azure.ResourceManager.Compute.Models.VirtualMachineSizeType? VmSize { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.VirtualMachineSizeProperties VmSizeProperties { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.VirtualMachineHardwareProfile 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.Compute.Models.VirtualMachineHardwareProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8079,6 +8349,7 @@ public partial class VirtualMachineImage : Azure.ResourceManager.Compute.Models. public Azure.ResourceManager.Compute.Models.ImageDeprecationStatus ImageDeprecationStatus { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.SupportedOperatingSystemType? OSDiskImageOperatingSystem { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.PurchasePlan Plan { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.VirtualMachineImage 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.Compute.Models.VirtualMachineImage System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8092,6 +8363,7 @@ public VirtualMachineImageBase(string name, Azure.Core.AzureLocation location) { public Azure.Core.AzureLocation Location { get { throw null; } set { } } public string Name { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.VirtualMachineImageBase 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.Compute.Models.VirtualMachineImageBase System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8103,6 +8375,7 @@ public partial class VirtualMachineImageFeature : System.ClientModel.Primitives. public VirtualMachineImageFeature() { } public string Name { get { throw null; } set { } } public string Value { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.VirtualMachineImageFeature 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.Compute.Models.VirtualMachineImageFeature System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8116,6 +8389,7 @@ public VirtualMachineInstallPatchesContent(Azure.ResourceManager.Compute.Models. public System.TimeSpan? MaximumDuration { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.VmGuestPatchRebootSetting RebootSetting { get { throw null; } } public Azure.ResourceManager.Compute.Models.WindowsParameters WindowsParameters { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.VirtualMachineInstallPatchesContent 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.Compute.Models.VirtualMachineInstallPatchesContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8137,6 +8411,7 @@ internal VirtualMachineInstallPatchesResult() { } public Azure.ResourceManager.Compute.Models.VmGuestPatchRebootStatus? RebootStatus { get { throw null; } } public System.DateTimeOffset? StartOn { get { throw null; } } public Azure.ResourceManager.Compute.Models.PatchOperationStatus? Status { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.VirtualMachineInstallPatchesResult 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.Compute.Models.VirtualMachineInstallPatchesResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8163,6 +8438,7 @@ internal VirtualMachineInstanceView() { } public System.Collections.Generic.IReadOnlyList Statuses { get { throw null; } } public Azure.ResourceManager.Compute.Models.VirtualMachineAgentInstanceView VmAgent { get { throw null; } } public Azure.ResourceManager.Compute.Models.InstanceViewStatus VmHealthStatus { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.VirtualMachineInstanceView 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.Compute.Models.VirtualMachineInstanceView System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8174,6 +8450,7 @@ public partial class VirtualMachineIPTag : System.ClientModel.Primitives.IJsonMo public VirtualMachineIPTag() { } public string IPTagType { get { throw null; } set { } } public string Tag { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.VirtualMachineIPTag 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.Compute.Models.VirtualMachineIPTag System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8186,6 +8463,7 @@ public VirtualMachineManagedDisk() { } public Azure.Core.ResourceIdentifier DiskEncryptionSetId { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.VirtualMachineDiskSecurityProfile SecurityProfile { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.StorageAccountType? StorageAccountType { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.VirtualMachineManagedDisk 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.Compute.Models.VirtualMachineManagedDisk System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8208,6 +8486,7 @@ public VirtualMachineNetworkInterfaceConfiguration(string name) { } public string Name { get { throw null; } set { } } public Azure.Core.ResourceIdentifier NetworkSecurityGroupId { get { throw null; } set { } } public bool? Primary { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.VirtualMachineNetworkInterfaceConfiguration 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.Compute.Models.VirtualMachineNetworkInterfaceConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8225,6 +8504,7 @@ public VirtualMachineNetworkInterfaceIPConfiguration(string name) { } public Azure.ResourceManager.Compute.Models.IPVersion? PrivateIPAddressVersion { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.VirtualMachinePublicIPAddressConfiguration PublicIPAddressConfiguration { get { throw null; } set { } } public Azure.Core.ResourceIdentifier SubnetId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.VirtualMachineNetworkInterfaceIPConfiguration 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.Compute.Models.VirtualMachineNetworkInterfaceIPConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8236,6 +8516,7 @@ public partial class VirtualMachineNetworkInterfaceReference : Azure.ResourceMan public VirtualMachineNetworkInterfaceReference() { } public Azure.ResourceManager.Compute.Models.ComputeDeleteOption? DeleteOption { get { throw null; } set { } } public bool? Primary { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.VirtualMachineNetworkInterfaceReference 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.Compute.Models.VirtualMachineNetworkInterfaceReference System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8248,6 +8529,7 @@ public VirtualMachineNetworkProfile() { } public Azure.ResourceManager.Compute.Models.NetworkApiVersion? NetworkApiVersion { get { throw null; } set { } } public System.Collections.Generic.IList NetworkInterfaceConfigurations { get { throw null; } } public System.Collections.Generic.IList NetworkInterfaces { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.VirtualMachineNetworkProfile 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.Compute.Models.VirtualMachineNetworkProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8269,6 +8551,7 @@ public VirtualMachineOSDisk(Azure.ResourceManager.Compute.Models.DiskCreateOptio public Azure.ResourceManager.Compute.Models.SupportedOperatingSystemType? OSType { get { throw null; } set { } } public System.Uri VhdUri { get { throw null; } set { } } public bool? WriteAcceleratorEnabled { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.VirtualMachineOSDisk 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.Compute.Models.VirtualMachineOSDisk System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8287,6 +8570,7 @@ public VirtualMachineOSProfile() { } public bool? RequireGuestProvisionSignal { get { throw null; } set { } } public System.Collections.Generic.IList Secrets { get { throw null; } } public Azure.ResourceManager.Compute.Models.WindowsConfiguration WindowsConfiguration { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.VirtualMachineOSProfile 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.Compute.Models.VirtualMachineOSProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8328,6 +8612,7 @@ public VirtualMachinePatch() { } public Azure.Core.ResourceIdentifier VirtualMachineScaleSetId { get { throw null; } set { } } public string VmId { get { throw null; } } public System.Collections.Generic.IList Zones { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.VirtualMachinePatch 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.Compute.Models.VirtualMachinePatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8340,6 +8625,7 @@ internal VirtualMachinePatchStatus() { } public Azure.ResourceManager.Compute.Models.AvailablePatchSummary AvailablePatchSummary { get { throw null; } } public System.Collections.Generic.IReadOnlyList ConfigurationStatuses { get { throw null; } } public Azure.ResourceManager.Compute.Models.LastPatchInstallationSummary LastPatchInstallationSummary { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.VirtualMachinePatchStatus 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.Compute.Models.VirtualMachinePatchStatus System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8379,6 +8665,7 @@ public VirtualMachinePublicIPAddressConfiguration(string name) { } public Azure.ResourceManager.Compute.Models.PublicIPAllocationMethod? PublicIPAllocationMethod { get { throw null; } set { } } public Azure.Core.ResourceIdentifier PublicIPPrefixId { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.ComputePublicIPAddressSku Sku { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.VirtualMachinePublicIPAddressConfiguration 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.Compute.Models.VirtualMachinePublicIPAddressConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8390,6 +8677,7 @@ public partial class VirtualMachinePublicIPAddressDnsSettingsConfiguration : Sys public VirtualMachinePublicIPAddressDnsSettingsConfiguration(string domainNameLabel) { } public string DomainNameLabel { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.DomainNameLabelScopeType? DomainNameLabelScope { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.VirtualMachinePublicIPAddressDnsSettingsConfiguration 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.Compute.Models.VirtualMachinePublicIPAddressDnsSettingsConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8402,6 +8690,7 @@ public VirtualMachineReimageContent() { } public string ExactVersion { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.OSProfileProvisioningData OSProfile { get { throw null; } set { } } public bool? TempDisk { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.VirtualMachineReimageContent 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.Compute.Models.VirtualMachineReimageContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8419,6 +8708,7 @@ internal VirtualMachineRunCommandInstanceView() { } public string Output { get { throw null; } } public System.DateTimeOffset? StartOn { get { throw null; } } public System.Collections.Generic.IReadOnlyList Statuses { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.VirtualMachineRunCommandInstanceView 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.Compute.Models.VirtualMachineRunCommandInstanceView System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8429,6 +8719,7 @@ public partial class VirtualMachineRunCommandResult : System.ClientModel.Primiti { internal VirtualMachineRunCommandResult() { } public System.Collections.Generic.IReadOnlyList Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.VirtualMachineRunCommandResult 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.Compute.Models.VirtualMachineRunCommandResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8442,6 +8733,7 @@ public VirtualMachineRunCommandScriptSource() { } public string Script { get { throw null; } set { } } public System.Uri ScriptUri { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.RunCommandManagedIdentity ScriptUriManagedIdentity { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.VirtualMachineRunCommandScriptSource 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.Compute.Models.VirtualMachineRunCommandScriptSource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8465,6 +8757,7 @@ public VirtualMachineRunCommandUpdate() { } public Azure.ResourceManager.Compute.Models.VirtualMachineRunCommandScriptSource Source { get { throw null; } set { } } public int? TimeoutInSeconds { get { throw null; } set { } } public bool? TreatFailureAsDeploymentFailure { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.VirtualMachineRunCommandUpdate 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.Compute.Models.VirtualMachineRunCommandUpdate System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8475,6 +8768,7 @@ public partial class VirtualMachineScaleSetConvertToSinglePlacementGroupContent { public VirtualMachineScaleSetConvertToSinglePlacementGroupContent() { } public string ActivePlacementGroupId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetConvertToSinglePlacementGroupContent 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.Compute.Models.VirtualMachineScaleSetConvertToSinglePlacementGroupContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8494,6 +8788,7 @@ public VirtualMachineScaleSetDataDisk(int lun, Azure.ResourceManager.Compute.Mod public Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetManagedDisk ManagedDisk { get { throw null; } set { } } public string Name { get { throw null; } set { } } public bool? WriteAcceleratorEnabled { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetDataDisk 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.Compute.Models.VirtualMachineScaleSetDataDisk System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8517,6 +8812,7 @@ public VirtualMachineScaleSetExtensionPatch() { } public System.BinaryData Settings { get { throw null; } set { } } public bool? SuppressFailures { get { throw null; } set { } } public string TypeHandlerVersion { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetExtensionPatch 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.Compute.Models.VirtualMachineScaleSetExtensionPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8528,6 +8824,7 @@ public partial class VirtualMachineScaleSetExtensionProfile : System.ClientModel public VirtualMachineScaleSetExtensionProfile() { } public System.Collections.Generic.IList Extensions { get { throw null; } } public string ExtensionsTimeBudget { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetExtensionProfile 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.Compute.Models.VirtualMachineScaleSetExtensionProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8558,6 +8855,7 @@ internal VirtualMachineScaleSetInstanceView() { } public System.Collections.Generic.IReadOnlyList OrchestrationServices { get { throw null; } } public System.Collections.Generic.IReadOnlyList Statuses { get { throw null; } } public System.Collections.Generic.IReadOnlyList VirtualMachineStatusesSummary { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetInstanceView 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.Compute.Models.VirtualMachineScaleSetInstanceView System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8578,6 +8876,7 @@ public VirtualMachineScaleSetIPConfiguration(string name) { } public Azure.ResourceManager.Compute.Models.IPVersion? PrivateIPAddressVersion { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetPublicIPAddressConfiguration PublicIPAddressConfiguration { get { throw null; } set { } } public Azure.Core.ResourceIdentifier SubnetId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetIPConfiguration 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.Compute.Models.VirtualMachineScaleSetIPConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8589,6 +8888,7 @@ public partial class VirtualMachineScaleSetIPTag : System.ClientModel.Primitives public VirtualMachineScaleSetIPTag() { } public string IPTagType { get { throw null; } set { } } public string Tag { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetIPTag 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.Compute.Models.VirtualMachineScaleSetIPTag System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8601,6 +8901,7 @@ public VirtualMachineScaleSetManagedDisk() { } public Azure.Core.ResourceIdentifier DiskEncryptionSetId { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.VirtualMachineDiskSecurityProfile SecurityProfile { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.StorageAccountType? StorageAccountType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetManagedDisk 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.Compute.Models.VirtualMachineScaleSetManagedDisk System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8624,6 +8925,7 @@ public VirtualMachineScaleSetNetworkConfiguration(string name) { } public string Name { get { throw null; } set { } } public Azure.Core.ResourceIdentifier NetworkSecurityGroupId { get { throw null; } set { } } public bool? Primary { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetNetworkConfiguration 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.Compute.Models.VirtualMachineScaleSetNetworkConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8636,6 +8938,7 @@ public VirtualMachineScaleSetNetworkProfile() { } public Azure.Core.ResourceIdentifier HealthProbeId { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.NetworkApiVersion? NetworkApiVersion { get { throw null; } set { } } public System.Collections.Generic.IList NetworkInterfaceConfigurations { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetNetworkProfile 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.Compute.Models.VirtualMachineScaleSetNetworkProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8656,6 +8959,7 @@ public VirtualMachineScaleSetOSDisk(Azure.ResourceManager.Compute.Models.DiskCre public Azure.ResourceManager.Compute.Models.SupportedOperatingSystemType? OSType { get { throw null; } set { } } public System.Collections.Generic.IList VhdContainers { get { throw null; } } public bool? WriteAcceleratorEnabled { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetOSDisk 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.Compute.Models.VirtualMachineScaleSetOSDisk System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8674,6 +8978,7 @@ public VirtualMachineScaleSetOSProfile() { } public bool? RequireGuestProvisionSignal { get { throw null; } set { } } public System.Collections.Generic.IList Secrets { get { throw null; } } public Azure.ResourceManager.Compute.Models.WindowsConfiguration WindowsConfiguration { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetOSProfile 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.Compute.Models.VirtualMachineScaleSetOSProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8701,6 +9006,7 @@ public VirtualMachineScaleSetPatch() { } public Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetUpdateVmProfile VirtualMachineProfile { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.ZonalPlatformFaultDomainAlignMode? ZonalPlatformFaultDomainAlignMode { get { throw null; } set { } } public System.Collections.Generic.IList Zones { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetPatch 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.Compute.Models.VirtualMachineScaleSetPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8712,6 +9018,7 @@ public partial class VirtualMachineScaleSetPriorityMixPolicy : System.ClientMode public VirtualMachineScaleSetPriorityMixPolicy() { } public int? BaseRegularPriorityCount { get { throw null; } set { } } public int? RegularPriorityPercentageAboveBase { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetPriorityMixPolicy 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.Compute.Models.VirtualMachineScaleSetPriorityMixPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8731,6 +9038,7 @@ public VirtualMachineScaleSetPublicIPAddressConfiguration(string name) { } public Azure.ResourceManager.Compute.Models.IPVersion? PublicIPAddressVersion { get { throw null; } set { } } public Azure.Core.ResourceIdentifier PublicIPPrefixId { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.ComputePublicIPAddressSku Sku { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetPublicIPAddressConfiguration 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.Compute.Models.VirtualMachineScaleSetPublicIPAddressConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8742,6 +9050,7 @@ public partial class VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettin public VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings(string domainNameLabel) { } public string DomainNameLabel { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.DomainNameLabelScopeType? DomainNameLabelScope { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings 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.Compute.Models.VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8752,6 +9061,7 @@ public partial class VirtualMachineScaleSetReimageContent : Azure.ResourceManage { public VirtualMachineScaleSetReimageContent() { } public System.Collections.Generic.IList InstanceIds { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetReimageContent 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.Compute.Models.VirtualMachineScaleSetReimageContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8783,6 +9093,7 @@ internal VirtualMachineScaleSetSku() { } public Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetSkuCapacity Capacity { get { throw null; } } public Azure.Core.ResourceType? ResourceType { get { throw null; } } public Azure.ResourceManager.Compute.Models.ComputeSku Sku { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetSku 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.Compute.Models.VirtualMachineScaleSetSku System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8796,6 +9107,7 @@ internal VirtualMachineScaleSetSkuCapacity() { } public long? Maximum { get { throw null; } } public long? Minimum { get { throw null; } } public Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetSkuScaleType? ScaleType { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetSkuCapacity 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.Compute.Models.VirtualMachineScaleSetSkuCapacity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8814,6 +9126,7 @@ public VirtualMachineScaleSetStorageProfile() { } public string DiskControllerType { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.ImageReference ImageReference { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetOSDisk OSDisk { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetStorageProfile 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.Compute.Models.VirtualMachineScaleSetStorageProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8834,6 +9147,7 @@ public VirtualMachineScaleSetUpdateIPConfiguration() { } public Azure.ResourceManager.Compute.Models.IPVersion? PrivateIPAddressVersion { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetUpdatePublicIPAddressConfiguration PublicIPAddressConfiguration { get { throw null; } set { } } public Azure.Core.ResourceIdentifier SubnetId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetUpdateIPConfiguration 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.Compute.Models.VirtualMachineScaleSetUpdateIPConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8857,6 +9171,7 @@ public VirtualMachineScaleSetUpdateNetworkConfiguration() { } public string Name { get { throw null; } set { } } public Azure.Core.ResourceIdentifier NetworkSecurityGroupId { get { throw null; } set { } } public bool? Primary { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetUpdateNetworkConfiguration 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.Compute.Models.VirtualMachineScaleSetUpdateNetworkConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8869,6 +9184,7 @@ public VirtualMachineScaleSetUpdateNetworkProfile() { } public Azure.Core.ResourceIdentifier HealthProbeId { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.NetworkApiVersion? NetworkApiVersion { get { throw null; } set { } } public System.Collections.Generic.IList NetworkInterfaceConfigurations { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetUpdateNetworkProfile 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.Compute.Models.VirtualMachineScaleSetUpdateNetworkProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8886,6 +9202,7 @@ public VirtualMachineScaleSetUpdateOSDisk() { } public Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetManagedDisk ManagedDisk { get { throw null; } set { } } public System.Collections.Generic.IList VhdContainers { get { throw null; } } public bool? WriteAcceleratorEnabled { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetUpdateOSDisk 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.Compute.Models.VirtualMachineScaleSetUpdateOSDisk System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8899,6 +9216,7 @@ public VirtualMachineScaleSetUpdateOSProfile() { } public Azure.ResourceManager.Compute.Models.LinuxConfiguration LinuxConfiguration { get { throw null; } set { } } public System.Collections.Generic.IList Secrets { get { throw null; } } public Azure.ResourceManager.Compute.Models.WindowsConfiguration WindowsConfiguration { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetUpdateOSProfile 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.Compute.Models.VirtualMachineScaleSetUpdateOSProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8915,6 +9233,7 @@ public VirtualMachineScaleSetUpdatePublicIPAddressConfiguration() { } public int? IdleTimeoutInMinutes { get { throw null; } set { } } public string Name { get { throw null; } set { } } public Azure.Core.ResourceIdentifier PublicIPPrefixId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetUpdatePublicIPAddressConfiguration 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.Compute.Models.VirtualMachineScaleSetUpdatePublicIPAddressConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8928,6 +9247,7 @@ public VirtualMachineScaleSetUpdateStorageProfile() { } public string DiskControllerType { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.ImageReference ImageReference { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetUpdateOSDisk OSDisk { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetUpdateStorageProfile 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.Compute.Models.VirtualMachineScaleSetUpdateStorageProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8951,6 +9271,7 @@ public VirtualMachineScaleSetUpdateVmProfile() { } public Azure.ResourceManager.Compute.Models.SecurityProfile SecurityProfile { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetUpdateStorageProfile StorageProfile { get { throw null; } set { } } public string UserData { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetUpdateVmProfile 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.Compute.Models.VirtualMachineScaleSetUpdateVmProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8969,6 +9290,7 @@ public VirtualMachineScaleSetUpgradePolicy() { } public Azure.ResourceManager.Compute.Models.AutomaticOSUpgradePolicy AutomaticOSUpgradePolicy { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetUpgradeMode? Mode { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.RollingUpgradePolicy RollingUpgradePolicy { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetUpgradePolicy 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.Compute.Models.VirtualMachineScaleSetUpgradePolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8990,6 +9312,7 @@ public VirtualMachineScaleSetVmExtensionPatch() { } public System.BinaryData Settings { get { throw null; } set { } } public bool? SuppressFailures { get { throw null; } set { } } public string TypeHandlerVersion { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetVmExtensionPatch 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.Compute.Models.VirtualMachineScaleSetVmExtensionPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -9001,6 +9324,7 @@ public partial class VirtualMachineScaleSetVmExtensionsSummary : System.ClientMo internal VirtualMachineScaleSetVmExtensionsSummary() { } public string Name { get { throw null; } } public System.Collections.Generic.IReadOnlyList StatusesSummary { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetVmExtensionsSummary 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.Compute.Models.VirtualMachineScaleSetVmExtensionsSummary System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -9011,6 +9335,7 @@ public partial class VirtualMachineScaleSetVmInstanceIds : System.ClientModel.Pr { public VirtualMachineScaleSetVmInstanceIds() { } public System.Collections.Generic.IList InstanceIds { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetVmInstanceIds 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.Compute.Models.VirtualMachineScaleSetVmInstanceIds System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -9021,6 +9346,7 @@ public partial class VirtualMachineScaleSetVmInstanceRequiredIds : System.Client { public VirtualMachineScaleSetVmInstanceRequiredIds(System.Collections.Generic.IEnumerable instanceIds) { } public System.Collections.Generic.IList InstanceIds { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetVmInstanceRequiredIds 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.Compute.Models.VirtualMachineScaleSetVmInstanceRequiredIds System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -9046,6 +9372,7 @@ internal VirtualMachineScaleSetVmInstanceView() { } public System.Collections.Generic.IReadOnlyList Statuses { get { throw null; } } public Azure.ResourceManager.Compute.Models.VirtualMachineAgentInstanceView VmAgent { get { throw null; } } public Azure.ResourceManager.Compute.Models.InstanceViewStatus VmHealthStatus { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetVmInstanceView 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.Compute.Models.VirtualMachineScaleSetVmInstanceView System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -9075,6 +9402,7 @@ public VirtualMachineScaleSetVmProfile() { } public Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetStorageProfile StorageProfile { get { throw null; } set { } } public System.DateTimeOffset? TimeCreated { get { throw null; } } public string UserData { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetVmProfile 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.Compute.Models.VirtualMachineScaleSetVmProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -9086,6 +9414,7 @@ public partial class VirtualMachineScaleSetVmProtectionPolicy : System.ClientMod public VirtualMachineScaleSetVmProtectionPolicy() { } public bool? ProtectFromScaleIn { get { throw null; } set { } } public bool? ProtectFromScaleSetActions { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetVmProtectionPolicy 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.Compute.Models.VirtualMachineScaleSetVmProtectionPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -9096,6 +9425,7 @@ public partial class VirtualMachineScaleSetVmReimageContent : Azure.ResourceMana { public VirtualMachineScaleSetVmReimageContent() { } public bool? ForceUpdateOSDiskForEphemeral { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetVmReimageContent 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.Compute.Models.VirtualMachineScaleSetVmReimageContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -9111,6 +9441,7 @@ internal VirtualMachineSize() { } public int? NumberOfCores { get { throw null; } } public int? OSDiskSizeInMB { get { throw null; } } public int? ResourceDiskSizeInMB { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.VirtualMachineSize 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.Compute.Models.VirtualMachineSize System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -9122,6 +9453,7 @@ public partial class VirtualMachineSizeProperties : System.ClientModel.Primitive public VirtualMachineSizeProperties() { } public int? VCpusAvailable { get { throw null; } set { } } public int? VCpusPerCore { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.VirtualMachineSizeProperties 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.Compute.Models.VirtualMachineSizeProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -9323,6 +9655,7 @@ internal VirtualMachineSoftwarePatchProperties() { } public System.DateTimeOffset? PublishedOn { get { throw null; } } public Azure.ResourceManager.Compute.Models.VmGuestPatchRebootBehavior? RebootBehavior { get { throw null; } } public string Version { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.VirtualMachineSoftwarePatchProperties 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.Compute.Models.VirtualMachineSoftwarePatchProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -9334,6 +9667,7 @@ public partial class VirtualMachineStatusCodeCount : System.ClientModel.Primitiv internal VirtualMachineStatusCodeCount() { } public string Code { get { throw null; } } public int? Count { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.VirtualMachineStatusCodeCount 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.Compute.Models.VirtualMachineStatusCodeCount System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -9347,6 +9681,7 @@ public VirtualMachineStorageProfile() { } public Azure.ResourceManager.Compute.Models.DiskControllerType? DiskControllerType { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.ImageReference ImageReference { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.VirtualMachineOSDisk OSDisk { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.VirtualMachineStorageProfile 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.Compute.Models.VirtualMachineStorageProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -9469,6 +9804,7 @@ public WindowsConfiguration() { } public bool? ProvisionVmAgent { get { throw null; } set { } } public string TimeZone { get { throw null; } set { } } public System.Collections.Generic.IList WinRMListeners { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.WindowsConfiguration 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.Compute.Models.WindowsConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -9483,6 +9819,7 @@ public WindowsParameters() { } public System.Collections.Generic.IList KbNumbersToExclude { get { throw null; } } public System.Collections.Generic.IList KbNumbersToInclude { get { throw null; } } public System.DateTimeOffset? MaxPatchPublishOn { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.WindowsParameters 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.Compute.Models.WindowsParameters System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -9532,6 +9869,7 @@ public partial class WindowsVmGuestPatchAutomaticByPlatformSettings : System.Cli public WindowsVmGuestPatchAutomaticByPlatformSettings() { } public bool? BypassPlatformSafetyChecksOnUserSchedule { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.WindowsVmGuestPatchAutomaticByPlatformRebootSetting? RebootSetting { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.WindowsVmGuestPatchAutomaticByPlatformSettings 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.Compute.Models.WindowsVmGuestPatchAutomaticByPlatformSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -9562,6 +9900,7 @@ public partial class WinRMListener : 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.Compute.Models.WinRMListener System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } diff --git a/sdk/compute/Azure.ResourceManager.Compute/assets.json b/sdk/compute/Azure.ResourceManager.Compute/assets.json index 0389918c4ce8..52096c54981b 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/assets.json +++ b/sdk/compute/Azure.ResourceManager.Compute/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/compute/Azure.ResourceManager.Compute", - "Tag": "net/compute/Azure.ResourceManager.Compute_d32ee065f6" + "Tag": "net/compute/Azure.ResourceManager.Compute_5f424f6784" } diff --git a/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_AvailabilitySetResource.cs b/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_AvailabilitySetResource.cs index 91c711f85ab9..d4af39dcf9be 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_AvailabilitySetResource.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_AvailabilitySetResource.cs @@ -45,7 +45,7 @@ public async Task Update_AvailabilitySetUpdateMaximumSetGen() { Name = "DSv3-Type1", Tier = "aaa", - Capacity = 7, + Capacity = 7L, }, PlatformUpdateDomainCount = 20, PlatformFaultDomainCount = 2, diff --git a/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_CapacityReservationCollection.cs b/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_CapacityReservationCollection.cs index 226fdb6ba18a..1e2c6520817a 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_CapacityReservationCollection.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_CapacityReservationCollection.cs @@ -44,7 +44,7 @@ public async Task CreateOrUpdate_CreateOrUpdateACapacityReservation() CapacityReservationData data = new CapacityReservationData(new AzureLocation("westus"), new ComputeSku() { Name = "Standard_DS1_v2", - Capacity = 4, + Capacity = 4L, }) { Zones = diff --git a/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_CapacityReservationResource.cs b/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_CapacityReservationResource.cs index 0b29fa036165..fde4c91ccb1d 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_CapacityReservationResource.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_CapacityReservationResource.cs @@ -44,7 +44,7 @@ public async Task Update_CapacityReservationUpdateMaximumSetGen() { Name = "Standard_DS1_v2", Tier = "aaa", - Capacity = 7, + Capacity = 7L, }, Tags = { diff --git a/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_CloudServiceCollection.cs b/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_CloudServiceCollection.cs index 7964368ec17e..97f3c1663ee3 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_CloudServiceCollection.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_CloudServiceCollection.cs @@ -55,7 +55,7 @@ public async Task CreateOrUpdate_CreateNewCloudServiceWithMultipleRoles() { Name = "Standard_D1_v2", Tier = "Standard", -Capacity = 1, +Capacity = 1L, }, },new CloudServiceRoleProfileProperties() { @@ -64,7 +64,7 @@ public async Task CreateOrUpdate_CreateNewCloudServiceWithMultipleRoles() { Name = "Standard_D1_v2", Tier = "Standard", -Capacity = 1, +Capacity = 1L, }, } }, @@ -135,7 +135,7 @@ public async Task CreateOrUpdate_CreateNewCloudServiceWithMultipleRolesInASpecif { Name = "Standard_D1_v2", Tier = "Standard", -Capacity = 1, +Capacity = 1L, }, },new CloudServiceRoleProfileProperties() { @@ -144,7 +144,7 @@ public async Task CreateOrUpdate_CreateNewCloudServiceWithMultipleRolesInASpecif { Name = "Standard_D1_v2", Tier = "Standard", -Capacity = 1, +Capacity = 1L, }, } }, @@ -211,7 +211,7 @@ public async Task CreateOrUpdate_CreateNewCloudServiceWithSingleRole() { Name = "Standard_D1_v2", Tier = "Standard", -Capacity = 1, +Capacity = 1L, }, } }, @@ -278,7 +278,7 @@ public async Task CreateOrUpdate_CreateNewCloudServiceWithSingleRoleAndCertifica { Name = "Standard_D1_v2", Tier = "Standard", -Capacity = 1, +Capacity = 1L, }, } }, @@ -359,7 +359,7 @@ public async Task CreateOrUpdate_CreateNewCloudServiceWithSingleRoleAndRDPExtens { Name = "Standard_D1_v2", Tier = "Standard", -Capacity = 1, +Capacity = 1L, }, } }, diff --git a/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_ManagedDiskCollection.cs b/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_ManagedDiskCollection.cs index 3d4754fdd785..0a157323d4d4 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_ManagedDiskCollection.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_ManagedDiskCollection.cs @@ -360,7 +360,7 @@ public async Task CreateOrUpdate_CreateAManagedDiskFromUploadPreparedSecureCreat OSType = SupportedOperatingSystemType.Windows, CreationData = new DiskCreationData(DiskCreateOption.UploadPreparedSecure) { - UploadSizeBytes = 10737418752, + UploadSizeBytes = 10737418752L, }, SecurityProfile = new DiskSecurityProfile() { @@ -802,8 +802,8 @@ public async Task CreateOrUpdate_CreateAManagedDiskWithPremiumV2AccountType() }, CreationData = new DiskCreationData(DiskCreateOption.Empty), DiskSizeGB = 200, - DiskIopsReadWrite = 125, - DiskMBpsReadWrite = 3000, + DiskIopsReadWrite = 125L, + DiskMBpsReadWrite = 3000L, }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, diskName, data); ManagedDiskResource result = lro.Value; @@ -945,8 +945,8 @@ public async Task CreateOrUpdate_CreateAManagedDiskWithUltraAccountTypeWithReadO LogicalSectorSize = 4096, }, DiskSizeGB = 200, - DiskIopsReadWrite = 125, - DiskMBpsReadWrite = 3000, + DiskIopsReadWrite = 125L, + DiskMBpsReadWrite = 3000L, Encryption = new DiskEncryption() { EncryptionType = ComputeEncryptionType.EncryptionAtRestWithPlatformKey, @@ -991,7 +991,7 @@ public async Task CreateOrUpdate_CreateAManagedUploadDisk() { CreationData = new DiskCreationData(DiskCreateOption.Upload) { - UploadSizeBytes = 10737418752, + UploadSizeBytes = 10737418752L, }, }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, diskName, data); diff --git a/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_VirtualMachineScaleSetCollection.cs b/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_VirtualMachineScaleSetCollection.cs index 3dde6dd43ad9..648d41a22203 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_VirtualMachineScaleSetCollection.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_VirtualMachineScaleSetCollection.cs @@ -49,7 +49,7 @@ public async Task CreateOrUpdate_CreateAVMSSWithAnExtensionThatHasSuppressFailur { Name = "Standard_D1_v2", Tier = "Standard", - Capacity = 3, + Capacity = 3L, }, UpgradePolicy = new VirtualMachineScaleSetUpgradePolicy() { @@ -165,7 +165,7 @@ public async Task CreateOrUpdate_CreateAVMSSWithAnExtensionWithProtectedSettings { Name = "Standard_D1_v2", Tier = "Standard", - Capacity = 3, + Capacity = 3L, }, UpgradePolicy = new VirtualMachineScaleSetUpgradePolicy() { @@ -284,7 +284,7 @@ public async Task CreateOrUpdate_CreateACustomImageScaleSetFromAnUnmanagedGenera { Name = "Standard_D1_v2", Tier = "Standard", - Capacity = 3, + Capacity = 3L, }, UpgradePolicy = new VirtualMachineScaleSetUpgradePolicy() { @@ -369,7 +369,7 @@ public async Task CreateOrUpdate_CreateAPlatformImageScaleSetWithUnmanagedOsDisk { Name = "Standard_D1_v2", Tier = "Standard", - Capacity = 3, + Capacity = 3L, }, UpgradePolicy = new VirtualMachineScaleSetUpgradePolicy() { @@ -464,7 +464,7 @@ public async Task CreateOrUpdate_CreateAScaleSetFromACustomImage() { Name = "Standard_D1_v2", Tier = "Standard", - Capacity = 3, + Capacity = 3L, }, UpgradePolicy = new VirtualMachineScaleSetUpgradePolicy() { @@ -555,7 +555,7 @@ public async Task CreateOrUpdate_CreateAScaleSetFromAGeneralizedSharedImage() { Name = "Standard_D1_v2", Tier = "Standard", - Capacity = 3, + Capacity = 3L, }, UpgradePolicy = new VirtualMachineScaleSetUpgradePolicy() { @@ -646,7 +646,7 @@ public async Task CreateOrUpdate_CreateAScaleSetFromASpecializedSharedImage() { Name = "Standard_D1_v2", Tier = "Standard", - Capacity = 3, + Capacity = 3L, }, UpgradePolicy = new VirtualMachineScaleSetUpgradePolicy() { @@ -731,7 +731,7 @@ public async Task CreateOrUpdate_CreateAScaleSetWhereNicConfigHasDisableTcpState { Name = "Standard_D1_v2", Tier = "Standard", - Capacity = 3, + Capacity = 3L, }, UpgradePolicy = new VirtualMachineScaleSetUpgradePolicy() { @@ -839,7 +839,7 @@ public async Task CreateOrUpdate_CreateAScaleSetWithApplicationProfile() { Name = "Standard_D1_v2", Tier = "Standard", - Capacity = 3, + Capacity = 3L, }, UpgradePolicy = new VirtualMachineScaleSetUpgradePolicy() { @@ -944,7 +944,7 @@ public async Task CreateOrUpdate_CreateAScaleSetWithDiskControllerType() { Name = "Standard_D1_v2", Tier = "Standard", - Capacity = 3, + Capacity = 3L, }, UpgradePolicy = new VirtualMachineScaleSetUpgradePolicy() { @@ -1054,7 +1054,7 @@ public async Task CreateOrUpdate_CreateAScaleSetWithDiskEncryptionSetResourceInO { Name = "Standard_DS1_v2", Tier = "Standard", - Capacity = 3, + Capacity = 3L, }, UpgradePolicy = new VirtualMachineScaleSetUpgradePolicy() { @@ -1159,7 +1159,7 @@ public async Task CreateOrUpdate_CreateAScaleSetWithFpgaNetworkInterfaces() { Name = "Standard_D1_v2", Tier = "Standard", - Capacity = 3, + Capacity = 3L, }, UpgradePolicy = new VirtualMachineScaleSetUpgradePolicy() { @@ -1265,7 +1265,7 @@ public async Task CreateOrUpdate_CreateAScaleSetWithHostEncryptionUsingEncryptio { Name = "Standard_DS1_v2", Tier = "Standard", - Capacity = 3, + Capacity = 3L, }, Plan = new ComputePlan() { @@ -1369,7 +1369,7 @@ public async Task CreateOrUpdate_CreateAScaleSetWithNetworkInterfacesWithPublicI { Name = "Standard_D1_v2", Tier = "Standard", - Capacity = 3, + Capacity = 3L, }, UpgradePolicy = new VirtualMachineScaleSetUpgradePolicy() { @@ -1487,7 +1487,7 @@ public async Task CreateOrUpdate_CreateAScaleSetWithOSImageScheduledEventsEnable { Name = "Standard_D1_v2", Tier = "Standard", - Capacity = 3, + Capacity = 3L, }, UpgradePolicy = new VirtualMachineScaleSetUpgradePolicy() { @@ -1589,7 +1589,7 @@ public async Task CreateOrUpdate_CreateAScaleSetWithProxyAgentSettingsOfEnabledA { Name = "Standard_D2s_v3", Tier = "Standard", - Capacity = 3, + Capacity = 3L, }, UpgradePolicy = new VirtualMachineScaleSetUpgradePolicy() { @@ -1691,7 +1691,7 @@ public async Task CreateOrUpdate_CreateAScaleSetWithResilientVMCreationEnabled() { Name = "Standard_D1_v2", Tier = "Standard", - Capacity = 3, + Capacity = 3L, }, UpgradePolicy = new VirtualMachineScaleSetUpgradePolicy() { @@ -1789,7 +1789,7 @@ public async Task CreateOrUpdate_CreateAScaleSetWithResilientVMDeletionEnabled() { Name = "Standard_D1_v2", Tier = "Standard", - Capacity = 3, + Capacity = 3L, }, UpgradePolicy = new VirtualMachineScaleSetUpgradePolicy() { @@ -1887,7 +1887,7 @@ public async Task CreateOrUpdate_CreateAScaleSetWithSecurityPostureReference() { Name = "Standard_A1", Tier = "Standard", - Capacity = 3, + Capacity = 3L, }, UpgradePolicy = new VirtualMachineScaleSetUpgradePolicy() { @@ -1983,7 +1983,7 @@ public async Task CreateOrUpdate_CreateAScaleSetWithSecurityTypeAsConfidentialVM { Name = "Standard_DC2as_v5", Tier = "Standard", - Capacity = 3, + Capacity = 3L, }, UpgradePolicy = new VirtualMachineScaleSetUpgradePolicy() { @@ -2090,7 +2090,7 @@ public async Task CreateOrUpdate_CreateAScaleSetWithSecurityTypeAsConfidentialVM { Name = "Standard_DC2es_v5", Tier = "Standard", - Capacity = 3, + Capacity = 3L, }, UpgradePolicy = new VirtualMachineScaleSetUpgradePolicy() { @@ -2197,7 +2197,7 @@ public async Task CreateOrUpdate_CreateAScaleSetWithServiceArtifactReference() { Name = "Standard_A1", Tier = "Standard", - Capacity = 3, + Capacity = 3L, }, UpgradePolicy = new VirtualMachineScaleSetUpgradePolicy() { @@ -2293,7 +2293,7 @@ public async Task CreateOrUpdate_CreateAScaleSetWithUefiSettingsOfSecureBootAndV { Name = "Standard_D2s_v3", Tier = "Standard", - Capacity = 3, + Capacity = 3L, }, UpgradePolicy = new VirtualMachineScaleSetUpgradePolicy() { @@ -2396,7 +2396,7 @@ public async Task CreateOrUpdate_CreateAScaleSetWithAMarketplaceImagePlan() { Name = "Standard_D1_v2", Tier = "Standard", - Capacity = 3, + Capacity = 3L, }, Plan = new ComputePlan() { @@ -2496,7 +2496,7 @@ public async Task CreateOrUpdate_CreateAScaleSetWithAnAzureApplicationGateway() { Name = "Standard_D1_v2", Tier = "Standard", - Capacity = 3, + Capacity = 3L, }, UpgradePolicy = new VirtualMachineScaleSetUpgradePolicy() { @@ -2597,7 +2597,7 @@ public async Task CreateOrUpdate_CreateAScaleSetWithAnAzureLoadBalancer() { Name = "Standard_D1_v2", Tier = "Standard", - Capacity = 3, + Capacity = 3L, }, UpgradePolicy = new VirtualMachineScaleSetUpgradePolicy() { @@ -2709,7 +2709,7 @@ public async Task CreateOrUpdate_CreateAScaleSetWithAutomaticRepairsEnabled() { Name = "Standard_D1_v2", Tier = "Standard", - Capacity = 3, + Capacity = 3L, }, UpgradePolicy = new VirtualMachineScaleSetUpgradePolicy() { @@ -2817,7 +2817,7 @@ public async Task CreateOrUpdate_CreateAScaleSetWithBootDiagnostics() { Name = "Standard_D1_v2", Tier = "Standard", - Capacity = 3, + Capacity = 3L, }, UpgradePolicy = new VirtualMachineScaleSetUpgradePolicy() { @@ -2916,7 +2916,7 @@ public async Task CreateOrUpdate_CreateAScaleSetWithEmptyDataDisksOnEachVm() { Name = "Standard_D2_v2", Tier = "Standard", - Capacity = 3, + Capacity = 3L, }, UpgradePolicy = new VirtualMachineScaleSetUpgradePolicy() { @@ -3021,7 +3021,7 @@ public async Task CreateOrUpdate_CreateAScaleSetWithEphemeralOsDiskProvisioningI { Name = "Standard_DS1_v2", Tier = "Standard", - Capacity = 3, + Capacity = 3L, }, Plan = new ComputePlan() { @@ -3126,7 +3126,7 @@ public async Task CreateOrUpdate_CreateAScaleSetWithEphemeralOsDisksUsingPlaceme { Name = "Standard_DS1_v2", Tier = "Standard", - Capacity = 3, + Capacity = 3L, }, Plan = new ComputePlan() { @@ -3231,7 +3231,7 @@ public async Task CreateOrUpdate_CreateAScaleSetWithEphemeralOsDisks() { Name = "Standard_DS1_v2", Tier = "Standard", - Capacity = 3, + Capacity = 3L, }, Plan = new ComputePlan() { @@ -3335,7 +3335,7 @@ public async Task CreateOrUpdate_CreateAScaleSetWithExtensionTimeBudget() { Name = "Standard_D1_v2", Tier = "Standard", - Capacity = 3, + Capacity = 3L, }, UpgradePolicy = new VirtualMachineScaleSetUpgradePolicy() { @@ -3451,7 +3451,7 @@ public async Task CreateOrUpdate_CreateAScaleSetWithManagedBootDiagnostics() { Name = "Standard_D1_v2", Tier = "Standard", - Capacity = 3, + Capacity = 3L, }, UpgradePolicy = new VirtualMachineScaleSetUpgradePolicy() { @@ -3549,7 +3549,7 @@ public async Task CreateOrUpdate_CreateAScaleSetWithPasswordAuthentication() { Name = "Standard_D1_v2", Tier = "Standard", - Capacity = 3, + Capacity = 3L, }, UpgradePolicy = new VirtualMachineScaleSetUpgradePolicy() { @@ -3643,7 +3643,7 @@ public async Task CreateOrUpdate_CreateAScaleSetWithPremiumStorage() { Name = "Standard_D1_v2", Tier = "Standard", - Capacity = 3, + Capacity = 3L, }, UpgradePolicy = new VirtualMachineScaleSetUpgradePolicy() { @@ -3737,7 +3737,7 @@ public async Task CreateOrUpdate_CreateAScaleSetWithPriorityMixPolicy() { Name = "Standard_A8m_v2", Tier = "Standard", - Capacity = 10, + Capacity = 10L, }, VirtualMachineProfile = new VirtualMachineScaleSetVmProfile() { @@ -3836,7 +3836,7 @@ public async Task CreateOrUpdate_CreateAScaleSetWithScaleInPolicy() { Name = "Standard_D1_v2", Tier = "Standard", - Capacity = 3, + Capacity = 3L, }, UpgradePolicy = new VirtualMachineScaleSetUpgradePolicy() { @@ -3937,7 +3937,7 @@ public async Task CreateOrUpdate_CreateAScaleSetWithSkuProfile() Sku = new ComputeSku() { Name = "Mix", - Capacity = 10, + Capacity = 10L, }, VirtualMachineProfile = new VirtualMachineScaleSetVmProfile() { @@ -4053,7 +4053,7 @@ public async Task CreateOrUpdate_CreateAScaleSetWithSpotRestorePolicy() { Name = "Standard_A8m_v2", Tier = "Standard", - Capacity = 2, + Capacity = 2L, }, UpgradePolicy = new VirtualMachineScaleSetUpgradePolicy() { @@ -4155,7 +4155,7 @@ public async Task CreateOrUpdate_CreateAScaleSetWithSshAuthentication() { Name = "Standard_D1_v2", Tier = "Standard", - Capacity = 3, + Capacity = 3L, }, UpgradePolicy = new VirtualMachineScaleSetUpgradePolicy() { @@ -4260,7 +4260,7 @@ public async Task CreateOrUpdate_CreateAScaleSetWithTerminateScheduledEventsEnab { Name = "Standard_D1_v2", Tier = "Standard", - Capacity = 3, + Capacity = 3L, }, UpgradePolicy = new VirtualMachineScaleSetUpgradePolicy() { @@ -4362,7 +4362,7 @@ public async Task CreateOrUpdate_CreateAScaleSetWithUserData() { Name = "Standard_D1_v2", Tier = "Standard", - Capacity = 3, + Capacity = 3L, }, UpgradePolicy = new VirtualMachineScaleSetUpgradePolicy() { @@ -4457,7 +4457,7 @@ public async Task CreateOrUpdate_CreateAScaleSetWithVirtualMachinesInDifferentZo { Name = "Standard_A1_v2", Tier = "Standard", - Capacity = 2, + Capacity = 2L, }, Zones = { @@ -4566,7 +4566,7 @@ public async Task CreateOrUpdate_CreateAScaleSetWithVmSizeProperties() { Name = "Standard_D1_v2", Tier = "Standard", - Capacity = 3, + Capacity = 3L, }, UpgradePolicy = new VirtualMachineScaleSetUpgradePolicy() { @@ -4666,7 +4666,7 @@ public async Task CreateOrUpdate_CreateAScaleSetWithZonalPlatformFaultDomainAlig { Name = "Standard_D1_v2", Tier = "Standard", - Capacity = 3, + Capacity = 3L, }, UpgradePolicy = new VirtualMachineScaleSetUpgradePolicy() { @@ -4770,7 +4770,7 @@ public async Task CreateOrUpdate_CreateOrUpdateAScaleSetWithCapacityReservation( { Name = "Standard_DS1_v2", Tier = "Standard", - Capacity = 3, + Capacity = 3L, }, UpgradePolicy = new VirtualMachineScaleSetUpgradePolicy() { diff --git a/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_VirtualMachineScaleSetResource.cs b/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_VirtualMachineScaleSetResource.cs index 5b2e60026754..e85b8297167e 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_VirtualMachineScaleSetResource.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_VirtualMachineScaleSetResource.cs @@ -80,7 +80,7 @@ public async Task Update_VirtualMachineScaleSetUpdateMaximumSetGen() { Name = "DSv3-Type1", Tier = "aaa", - Capacity = 7, + Capacity = 7L, }, Plan = new ComputePlan() { @@ -244,8 +244,8 @@ public async Task Update_VirtualMachineScaleSetUpdateMaximumSetGen() StorageAccountType = StorageAccountType.StandardLrs, DiskEncryptionSetId = new ResourceIdentifier("aaaaaaaaaaaa"), }, -DiskIopsReadWrite = 28, -DiskMBpsReadWrite = 15, +DiskIopsReadWrite = 28L, +DiskMBpsReadWrite = 15L, } }, }, diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Azure.ResourceManager.Compute.csproj b/sdk/compute/Azure.ResourceManager.Compute/src/Azure.ResourceManager.Compute.csproj index a3e572f2526f..18a8be4c9130 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Azure.ResourceManager.Compute.csproj +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Azure.ResourceManager.Compute.csproj @@ -1,6 +1,6 @@ - 1.7.0-beta.1 + 1.7.0-beta.2 1.6.0 Azure.ResourceManager.Compute diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/AvailabilitySetData.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/AvailabilitySetData.Serialization.cs index 662a6b81f216..35ce3932284e 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/AvailabilitySetData.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/AvailabilitySetData.Serialization.cs @@ -21,6 +21,15 @@ public partial class AvailabilitySetData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,45 +37,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(AvailabilitySetData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Sku)) { writer.WritePropertyName("sku"u8); writer.WriteObjectValue(Sku, options); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(PlatformUpdateDomainCount)) @@ -110,22 +86,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri writer.WriteObjectValue(ScheduledEventsPolicy, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } AvailabilitySetData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CapacityReservationData.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CapacityReservationData.Serialization.cs index 63f4bc5e1a7e..08bb67305b87 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CapacityReservationData.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CapacityReservationData.Serialization.cs @@ -21,6 +21,15 @@ public partial class CapacityReservationData : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,7 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(CapacityReservationData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("sku"u8); writer.WriteObjectValue(Sku, options); if (Optional.IsCollectionDefined(Zones)) @@ -41,39 +50,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade } writer.WriteEndArray(); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ReservationId)) @@ -117,22 +93,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade writer.WriteStringValue(TimeCreated.Value, "O"); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } CapacityReservationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CapacityReservationGroupData.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CapacityReservationGroupData.Serialization.cs index 75f927741f7b..b352c75b030b 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CapacityReservationGroupData.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CapacityReservationGroupData.Serialization.cs @@ -21,6 +21,15 @@ public partial class CapacityReservationGroupData : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,7 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(CapacityReservationGroupData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(Zones)) { writer.WritePropertyName("zones"u8); @@ -39,39 +48,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model } writer.WriteEndArray(); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(CapacityReservations)) @@ -105,22 +81,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model writer.WriteObjectValue(SharingProfile, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } CapacityReservationGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CloudServiceData.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CloudServiceData.Serialization.cs index 573181dc899d..da610527706e 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CloudServiceData.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CloudServiceData.Serialization.cs @@ -20,6 +20,15 @@ public partial class CloudServiceData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(CloudServiceData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(Zones)) { writer.WritePropertyName("zones"u8); @@ -38,39 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter } writer.WriteEndArray(); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(PackageUri)) @@ -134,22 +110,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter writer.WriteStringValue(UniqueId); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } CloudServiceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CloudServiceOSFamilyData.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CloudServiceOSFamilyData.Serialization.cs index 6b4dd3745030..2574b0062ea7 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CloudServiceOSFamilyData.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CloudServiceOSFamilyData.Serialization.cs @@ -20,6 +20,15 @@ public partial class CloudServiceOSFamilyData : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(CloudServiceOSFamilyData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ResourceName)) { writer.WritePropertyName("name"u8); @@ -38,26 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead writer.WritePropertyName("location"u8); writer.WriteStringValue(Location.Value); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(OSFamilyName)) @@ -81,22 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } CloudServiceOSFamilyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CloudServiceOSVersionData.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CloudServiceOSVersionData.Serialization.cs index 957f8e54a5b0..30a5593547a4 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CloudServiceOSVersionData.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CloudServiceOSVersionData.Serialization.cs @@ -19,6 +19,15 @@ public partial class CloudServiceOSVersionData : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,32 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(CloudServiceOSVersionData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(Location)) { writer.WritePropertyName("location"u8); writer.WriteStringValue(Location.Value); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Family)) @@ -85,22 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea writer.WriteBooleanValue(IsActive.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } CloudServiceOSVersionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CloudServiceRoleData.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CloudServiceRoleData.Serialization.cs index e4bf46631aab..063bd209549d 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CloudServiceRoleData.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CloudServiceRoleData.Serialization.cs @@ -20,6 +20,15 @@ public partial class CloudServiceRoleData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(CloudServiceRoleData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(Location)) { writer.WritePropertyName("location"u8); @@ -38,26 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr writer.WritePropertyName("sku"u8); writer.WriteObjectValue(Sku, options); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(UniqueId)) @@ -66,22 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr writer.WriteStringValue(UniqueId); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } CloudServiceRoleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CloudServiceRoleInstanceData.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CloudServiceRoleInstanceData.Serialization.cs index 1a29c5af9cb1..73647bb9e9b4 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CloudServiceRoleInstanceData.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CloudServiceRoleInstanceData.Serialization.cs @@ -20,6 +20,15 @@ public partial class CloudServiceRoleInstanceData : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(CloudServiceRoleInstanceData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(Location)) { writer.WritePropertyName("location"u8); @@ -49,26 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model writer.WritePropertyName("sku"u8); writer.WriteObjectValue(Sku, options); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(NetworkProfile)) @@ -82,22 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model writer.WriteObjectValue(InstanceView, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } CloudServiceRoleInstanceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CommunityGalleryData.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CommunityGalleryData.Serialization.cs index d5aa69ff0f41..58a143c70189 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CommunityGalleryData.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CommunityGalleryData.Serialization.cs @@ -19,6 +19,15 @@ public partial class CommunityGalleryData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,22 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(CommunityGalleryData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Disclaimer)) @@ -66,30 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr writer.WriteObjectValue(CommunityMetadata, options); } writer.WriteEndObject(); - writer.WritePropertyName("identifier"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(UniqueId)) - { - writer.WritePropertyName("uniqueId"u8); - writer.WriteStringValue(UniqueId); - } - writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } CommunityGalleryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CommunityGalleryImageData.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CommunityGalleryImageData.Serialization.cs index 43b25c9c408e..a32fd94ab8d9 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CommunityGalleryImageData.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CommunityGalleryImageData.Serialization.cs @@ -19,6 +19,15 @@ public partial class CommunityGalleryImageData : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,22 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(CommunityGalleryImageData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(OSType)) @@ -126,30 +120,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea writer.WriteEndObject(); } writer.WriteEndObject(); - writer.WritePropertyName("identifier"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(UniqueId)) - { - writer.WritePropertyName("uniqueId"u8); - writer.WriteStringValue(UniqueId); - } - writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } CommunityGalleryImageData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CommunityGalleryImageVersionData.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CommunityGalleryImageVersionData.Serialization.cs index 9ff9e7cbc666..11b5a3b34727 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CommunityGalleryImageVersionData.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CommunityGalleryImageVersionData.Serialization.cs @@ -19,6 +19,15 @@ public partial class CommunityGalleryImageVersionData : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,22 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(CommunityGalleryImageVersionData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(PublishedOn)) @@ -81,30 +75,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M writer.WriteEndObject(); } writer.WriteEndObject(); - writer.WritePropertyName("identifier"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(UniqueId)) - { - writer.WritePropertyName("uniqueId"u8); - writer.WriteStringValue(UniqueId); - } - writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } CommunityGalleryImageVersionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/ComputePrivateEndpointConnectionData.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/ComputePrivateEndpointConnectionData.Serialization.cs index ae7bc56ec8b2..a9068cef0e4c 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/ComputePrivateEndpointConnectionData.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/ComputePrivateEndpointConnectionData.Serialization.cs @@ -21,6 +21,15 @@ public partial class ComputePrivateEndpointConnectionData : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,27 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(ComputePrivateEndpointConnectionData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(PrivateEndpoint)) @@ -67,22 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter write writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ComputePrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/DedicatedHostData.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/DedicatedHostData.Serialization.cs index 895399bee19d..63046b662b3a 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/DedicatedHostData.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/DedicatedHostData.Serialization.cs @@ -21,6 +21,15 @@ public partial class DedicatedHostData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,42 +37,9 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(DedicatedHostData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("sku"u8); writer.WriteObjectValue(Sku, options); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(PlatformFaultDomain)) @@ -117,22 +93,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite writer.WriteStringValue(TimeCreated.Value, "O"); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } DedicatedHostData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/DedicatedHostGroupData.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/DedicatedHostGroupData.Serialization.cs index 943f2c190ee1..55c0f3ba0897 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/DedicatedHostGroupData.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/DedicatedHostGroupData.Serialization.cs @@ -21,6 +21,15 @@ public partial class DedicatedHostGroupData : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,7 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(DedicatedHostGroupData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(Zones)) { writer.WritePropertyName("zones"u8); @@ -39,39 +48,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader } writer.WriteEndArray(); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(PlatformFaultDomainCount)) @@ -105,22 +81,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader writer.WriteObjectValue(AdditionalCapabilities, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } DedicatedHostGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/DiskAccessData.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/DiskAccessData.Serialization.cs index 757ccacabeb4..a06a23231676 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/DiskAccessData.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/DiskAccessData.Serialization.cs @@ -20,6 +20,15 @@ public partial class DiskAccessData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,45 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(DiskAccessData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(ExtendedLocation)) { writer.WritePropertyName("extendedLocation"u8); JsonSerializer.Serialize(writer, ExtendedLocation); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(PrivateEndpointConnections)) @@ -89,22 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp writer.WriteStringValue(TimeCreated.Value, "O"); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } DiskAccessData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/DiskEncryptionSetData.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/DiskEncryptionSetData.Serialization.cs index 0cb4956946bd..359301593c75 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/DiskEncryptionSetData.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/DiskEncryptionSetData.Serialization.cs @@ -20,6 +20,15 @@ public partial class DiskEncryptionSetData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,45 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(DiskEncryptionSetData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); JsonSerializer.Serialize(writer, Identity); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(EncryptionType)) @@ -114,22 +90,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW writer.WriteStringValue(FederatedClientId); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } DiskEncryptionSetData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/DiskImageData.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/DiskImageData.Serialization.cs index 4f7f038b6ce2..5bb5af70e322 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/DiskImageData.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/DiskImageData.Serialization.cs @@ -21,6 +21,15 @@ public partial class DiskImageData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,45 +37,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt throw new FormatException($"The model {nameof(DiskImageData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(ExtendedLocation)) { writer.WritePropertyName("extendedLocation"u8); JsonSerializer.Serialize(writer, ExtendedLocation); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(SourceVirtualMachine)) @@ -90,22 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt writer.WriteStringValue(HyperVGeneration.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } DiskImageData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/DiskRestorePointData.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/DiskRestorePointData.Serialization.cs index 433fe6767b1a..947c44002b30 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/DiskRestorePointData.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/DiskRestorePointData.Serialization.cs @@ -20,6 +20,15 @@ public partial class DiskRestorePointData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(DiskRestorePointData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(TimeCreated)) @@ -141,22 +130,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr writer.WriteNumberValue(LogicalSectorSize.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } DiskRestorePointData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryApplicationData.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryApplicationData.Serialization.cs index 91c1cbd9496b..971fd6492c5e 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryApplicationData.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryApplicationData.Serialization.cs @@ -20,6 +20,15 @@ public partial class GalleryApplicationData : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,40 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(GalleryApplicationData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Description)) @@ -104,22 +80,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } GalleryApplicationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryApplicationVersionData.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryApplicationVersionData.Serialization.cs index c21f53a03230..9b9294b3cc18 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryApplicationVersionData.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryApplicationVersionData.Serialization.cs @@ -20,6 +20,15 @@ public partial class GalleryApplicationVersionData : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,40 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(GalleryApplicationVersionData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(PublishingProfile)) @@ -84,22 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode writer.WriteObjectValue(ReplicationStatus, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } GalleryApplicationVersionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryData.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryData.Serialization.cs index d17060b769bf..cd65f7919beb 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryData.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryData.Serialization.cs @@ -20,6 +20,15 @@ public partial class GalleryData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,40 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio throw new FormatException($"The model {nameof(GalleryData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Description)) @@ -94,22 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio writer.WriteObjectValue(SharingStatus, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } GalleryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryImageData.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryImageData.Serialization.cs index a44b4d5aa6e5..0bf0dd1af374 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryImageData.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryImageData.Serialization.cs @@ -20,6 +20,15 @@ public partial class GalleryImageData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,40 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(GalleryImageData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Description)) @@ -144,22 +120,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter writer.WriteStringValue(Architecture.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } GalleryImageData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryImageVersionData.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryImageVersionData.Serialization.cs index a7b853875f32..11b9ea08a215 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryImageVersionData.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryImageVersionData.Serialization.cs @@ -20,6 +20,15 @@ public partial class GalleryImageVersionData : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,40 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(GalleryImageVersionData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(PublishingProfile)) @@ -94,22 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade writer.WriteObjectValue(SecurityProfile, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } GalleryImageVersionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/ManagedDiskData.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/ManagedDiskData.Serialization.cs index 625246147273..b538621bbdf0 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/ManagedDiskData.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/ManagedDiskData.Serialization.cs @@ -21,6 +21,15 @@ public partial class ManagedDiskData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,7 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(ManagedDiskData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ManagedBy)) { writer.WritePropertyName("managedBy"u8); @@ -69,39 +78,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO writer.WritePropertyName("extendedLocation"u8); JsonSerializer.Serialize(writer, ExtendedLocation); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(TimeCreated)) @@ -270,22 +246,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO writer.WriteStringValue(LastOwnershipUpdateOn.Value, "O"); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ManagedDiskData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/AccessUri.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/AccessUri.Serialization.cs index 18e99686dc19..f0a0be32396c 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/AccessUri.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/AccessUri.Serialization.cs @@ -18,6 +18,15 @@ public partial class AccessUri : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions throw new FormatException($"The model {nameof(AccessUri)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(AccessSas)) { writer.WritePropertyName("accessSAS"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions #endif } } - writer.WriteEndObject(); } AccessUri IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/AdditionalCapabilities.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/AdditionalCapabilities.Serialization.cs index faec86abe707..03f029a3bb42 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/AdditionalCapabilities.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/AdditionalCapabilities.Serialization.cs @@ -18,6 +18,15 @@ public partial class AdditionalCapabilities : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(AdditionalCapabilities)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(UltraSsdEnabled)) { writer.WritePropertyName("ultraSSDEnabled"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } AdditionalCapabilities IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/AdditionalUnattendContent.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/AdditionalUnattendContent.Serialization.cs index 2949115b4858..b48508cae742 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/AdditionalUnattendContent.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/AdditionalUnattendContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class AdditionalUnattendContent : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(AdditionalUnattendContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(PassName)) { writer.WritePropertyName("passName"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } AdditionalUnattendContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ApplicationProfile.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ApplicationProfile.Serialization.cs index fc9c0389aaa9..571802d2ec38 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ApplicationProfile.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ApplicationProfile.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ApplicationProfile : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ApplicationProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(GalleryApplications)) { writer.WritePropertyName("galleryApplications"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } ApplicationProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/AttachDetachDataDisksRequest.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/AttachDetachDataDisksRequest.Serialization.cs index 8a5868093d30..4433d08c193c 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/AttachDetachDataDisksRequest.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/AttachDetachDataDisksRequest.Serialization.cs @@ -18,6 +18,15 @@ public partial class AttachDetachDataDisksRequest : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(AttachDetachDataDisksRequest)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(DataDisksToAttach)) { writer.WritePropertyName("dataDisksToAttach"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } AttachDetachDataDisksRequest IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/AutomaticOSUpgradePolicy.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/AutomaticOSUpgradePolicy.Serialization.cs index 8ba58b73dbfc..4b04377bf65f 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/AutomaticOSUpgradePolicy.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/AutomaticOSUpgradePolicy.Serialization.cs @@ -18,6 +18,15 @@ public partial class AutomaticOSUpgradePolicy : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(AutomaticOSUpgradePolicy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(EnableAutomaticOSUpgrade)) { writer.WritePropertyName("enableAutomaticOSUpgrade"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } AutomaticOSUpgradePolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/AutomaticOSUpgradeProperties.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/AutomaticOSUpgradeProperties.Serialization.cs index 171b809ccc74..2efeed1e80ac 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/AutomaticOSUpgradeProperties.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/AutomaticOSUpgradeProperties.Serialization.cs @@ -18,6 +18,15 @@ internal partial class AutomaticOSUpgradeProperties : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(AutomaticOSUpgradeProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("automaticOSUpgradeSupported"u8); writer.WriteBooleanValue(AutomaticOSUpgradeSupported); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } AutomaticOSUpgradeProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/AutomaticRepairsPolicy.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/AutomaticRepairsPolicy.Serialization.cs index 63206d0c923a..1912246a17d3 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/AutomaticRepairsPolicy.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/AutomaticRepairsPolicy.Serialization.cs @@ -18,6 +18,15 @@ public partial class AutomaticRepairsPolicy : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(AutomaticRepairsPolicy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Enabled)) { writer.WritePropertyName("enabled"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } AutomaticRepairsPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/AvailabilitySetListResult.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/AvailabilitySetListResult.Serialization.cs index 21e739adc3cd..dbdaaed18042 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/AvailabilitySetListResult.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/AvailabilitySetListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class AvailabilitySetListResult : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(AvailabilitySetListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } AvailabilitySetListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/AvailabilitySetPatch.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/AvailabilitySetPatch.Serialization.cs index ad7a06ff2402..e7131a33cdda 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/AvailabilitySetPatch.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/AvailabilitySetPatch.Serialization.cs @@ -19,6 +19,15 @@ public partial class AvailabilitySetPatch : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,23 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(AvailabilitySetPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Sku)) { writer.WritePropertyName("sku"u8); writer.WriteObjectValue(Sku, options); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(PlatformUpdateDomainCount)) @@ -86,22 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr writer.WriteObjectValue(ScheduledEventsPolicy, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } AvailabilitySetPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/AvailablePatchSummary.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/AvailablePatchSummary.Serialization.cs index a7f7fe5883cb..a9b10d554cea 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/AvailablePatchSummary.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/AvailablePatchSummary.Serialization.cs @@ -18,6 +18,15 @@ public partial class AvailablePatchSummary : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(AvailablePatchSummary)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Status)) { writer.WritePropertyName("status"u8); @@ -81,7 +89,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } AvailablePatchSummary IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/BillingProfile.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/BillingProfile.Serialization.cs index 9570b4dff0e0..b60cd6161b8e 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/BillingProfile.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/BillingProfile.Serialization.cs @@ -18,6 +18,15 @@ internal partial class BillingProfile : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(BillingProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(MaxPrice)) { writer.WritePropertyName("maxPrice"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp #endif } } - writer.WriteEndObject(); } BillingProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/BootDiagnostics.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/BootDiagnostics.Serialization.cs index 551d2345233d..0e631fd2dab8 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/BootDiagnostics.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/BootDiagnostics.Serialization.cs @@ -18,6 +18,15 @@ public partial class BootDiagnostics : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(BootDiagnostics)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Enabled)) { writer.WritePropertyName("enabled"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO #endif } } - writer.WriteEndObject(); } BootDiagnostics IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/BootDiagnosticsInstanceView.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/BootDiagnosticsInstanceView.Serialization.cs index 07bca6f59cec..fd6856d7e6ef 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/BootDiagnosticsInstanceView.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/BootDiagnosticsInstanceView.Serialization.cs @@ -18,6 +18,15 @@ public partial class BootDiagnosticsInstanceView : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(BootDiagnosticsInstanceView)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ConsoleScreenshotBlobUri)) { writer.WritePropertyName("consoleScreenshotBlobUri"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } BootDiagnosticsInstanceView IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CapacityReservationGroupInstanceView.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CapacityReservationGroupInstanceView.Serialization.cs index 9a1649503f2a..456e0a3dbb0f 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CapacityReservationGroupInstanceView.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CapacityReservationGroupInstanceView.Serialization.cs @@ -19,6 +19,15 @@ public partial class CapacityReservationGroupInstanceView : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(CapacityReservationGroupInstanceView)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(CapacityReservations)) { writer.WritePropertyName("capacityReservations"u8); @@ -62,7 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } CapacityReservationGroupInstanceView IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CapacityReservationGroupListResult.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CapacityReservationGroupListResult.Serialization.cs index a939a7208a73..9fca2380f201 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CapacityReservationGroupListResult.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CapacityReservationGroupListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class CapacityReservationGroupListResult : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(CapacityReservationGroupListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } CapacityReservationGroupListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CapacityReservationGroupPatch.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CapacityReservationGroupPatch.Serialization.cs index 313d2ef0046c..5f31e2a09a78 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CapacityReservationGroupPatch.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CapacityReservationGroupPatch.Serialization.cs @@ -19,6 +19,15 @@ public partial class CapacityReservationGroupPatch : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,18 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(CapacityReservationGroupPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(CapacityReservations)) @@ -71,22 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode writer.WriteObjectValue(SharingProfile, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } CapacityReservationGroupPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CapacityReservationInstanceView.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CapacityReservationInstanceView.Serialization.cs index b915642c5ae4..f487f2443bcc 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CapacityReservationInstanceView.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CapacityReservationInstanceView.Serialization.cs @@ -18,6 +18,15 @@ public partial class CapacityReservationInstanceView : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(CapacityReservationInstanceView)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(UtilizationInfo)) { writer.WritePropertyName("utilizationInfo"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } CapacityReservationInstanceView IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CapacityReservationInstanceViewWithName.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CapacityReservationInstanceViewWithName.Serialization.cs index 9bc7ac2d852f..e7cb02f023e5 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CapacityReservationInstanceViewWithName.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CapacityReservationInstanceViewWithName.Serialization.cs @@ -18,6 +18,15 @@ public partial class CapacityReservationInstanceViewWithName : IUtf8JsonSerializ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,43 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter wr throw new FormatException($"The model {nameof(CapacityReservationInstanceViewWithName)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); } - if (Optional.IsDefined(UtilizationInfo)) - { - writer.WritePropertyName("utilizationInfo"u8); - writer.WriteObjectValue(UtilizationInfo, options); - } - if (Optional.IsCollectionDefined(Statuses)) - { - writer.WritePropertyName("statuses"u8); - writer.WriteStartArray(); - foreach (var item in Statuses) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } CapacityReservationInstanceViewWithName IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CapacityReservationListResult.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CapacityReservationListResult.Serialization.cs index 3902ae901e11..705431b60a42 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CapacityReservationListResult.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CapacityReservationListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class CapacityReservationListResult : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(CapacityReservationListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } CapacityReservationListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CapacityReservationPatch.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CapacityReservationPatch.Serialization.cs index 3c75d9bad774..ff4fd9ebca41 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CapacityReservationPatch.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CapacityReservationPatch.Serialization.cs @@ -19,6 +19,15 @@ public partial class CapacityReservationPatch : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,23 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(CapacityReservationPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Sku)) { writer.WritePropertyName("sku"u8); writer.WriteObjectValue(Sku, options); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ReservationId)) @@ -86,22 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead writer.WriteStringValue(TimeCreated.Value, "O"); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } CapacityReservationPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CapacityReservationProfile.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CapacityReservationProfile.Serialization.cs index 7bd077115c11..e9ca1817b8d6 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CapacityReservationProfile.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CapacityReservationProfile.Serialization.cs @@ -19,6 +19,15 @@ internal partial class CapacityReservationProfile : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(CapacityReservationProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(CapacityReservationGroup)) { writer.WritePropertyName("capacityReservationGroup"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } CapacityReservationProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CapacityReservationUtilization.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CapacityReservationUtilization.Serialization.cs index 4182b637f575..79b23f643a01 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CapacityReservationUtilization.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CapacityReservationUtilization.Serialization.cs @@ -19,6 +19,15 @@ public partial class CapacityReservationUtilization : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(CapacityReservationUtilization)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(CurrentCapacity)) { writer.WritePropertyName("currentCapacity"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } CapacityReservationUtilization IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceExtension.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceExtension.Serialization.cs index 6acb3f72c818..4804ef885153 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceExtension.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceExtension.Serialization.cs @@ -18,6 +18,15 @@ public partial class CloudServiceExtension : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(CloudServiceExtension)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -118,7 +126,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } CloudServiceExtension IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceExtensionProfile.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceExtensionProfile.Serialization.cs index ce40d8bc5762..b1a72fbf9b14 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceExtensionProfile.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceExtensionProfile.Serialization.cs @@ -18,6 +18,15 @@ internal partial class CloudServiceExtensionProfile : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(CloudServiceExtensionProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Extensions)) { writer.WritePropertyName("extensions"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } CloudServiceExtensionProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceInstanceView.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceInstanceView.Serialization.cs index bc786de0ed17..e9140d39eda0 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceInstanceView.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceInstanceView.Serialization.cs @@ -18,6 +18,15 @@ public partial class CloudServiceInstanceView : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(CloudServiceInstanceView)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(RoleInstance)) { writer.WritePropertyName("roleInstance"u8); @@ -71,7 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } CloudServiceInstanceView IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceListResult.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceListResult.Serialization.cs index 64ebb43a58a9..c532c76e20a7 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceListResult.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class CloudServiceListResult : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(CloudServiceListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } CloudServiceListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceLoadBalancerConfiguration.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceLoadBalancerConfiguration.Serialization.cs index 3662fc5a9214..ff4b697e876d 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceLoadBalancerConfiguration.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceLoadBalancerConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class CloudServiceLoadBalancerConfiguration : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(CloudServiceLoadBalancerConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } CloudServiceLoadBalancerConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceNetworkProfile.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceNetworkProfile.Serialization.cs index a6514e275b7f..6364c3260bfb 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceNetworkProfile.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceNetworkProfile.Serialization.cs @@ -19,6 +19,15 @@ public partial class CloudServiceNetworkProfile : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(CloudServiceNetworkProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(LoadBalancerConfigurations)) { writer.WritePropertyName("loadBalancerConfigurations"u8); @@ -62,7 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } CloudServiceNetworkProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceOSProfile.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceOSProfile.Serialization.cs index c3d1317bcb69..5aeec039d30f 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceOSProfile.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceOSProfile.Serialization.cs @@ -18,6 +18,15 @@ internal partial class CloudServiceOSProfile : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(CloudServiceOSProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Secrets)) { writer.WritePropertyName("secrets"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } CloudServiceOSProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServicePatch.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServicePatch.Serialization.cs index df72fb173e2f..d22dc0068f74 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServicePatch.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServicePatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class CloudServicePatch : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(CloudServicePatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } CloudServicePatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceRoleListResult.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceRoleListResult.Serialization.cs index d124509ecb7d..f958041452c2 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceRoleListResult.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceRoleListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class CloudServiceRoleListResult : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(CloudServiceRoleListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } CloudServiceRoleListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceRoleProfile.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceRoleProfile.Serialization.cs index 56042681ecfb..75a6b34aa938 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceRoleProfile.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceRoleProfile.Serialization.cs @@ -18,6 +18,15 @@ internal partial class CloudServiceRoleProfile : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(CloudServiceRoleProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Roles)) { writer.WritePropertyName("roles"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } CloudServiceRoleProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceRoleProfileProperties.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceRoleProfileProperties.Serialization.cs index a3ffd3ac7e80..3bfc0db1d0ca 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceRoleProfileProperties.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceRoleProfileProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class CloudServiceRoleProfileProperties : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(CloudServiceRoleProfileProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } CloudServiceRoleProfileProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceRoleSku.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceRoleSku.Serialization.cs index 7813f50944e6..30cb6ca8e802 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceRoleSku.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceRoleSku.Serialization.cs @@ -18,6 +18,15 @@ public partial class CloudServiceRoleSku : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(CloudServiceRoleSku)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } CloudServiceRoleSku IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceVaultAndSecretReference.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceVaultAndSecretReference.Serialization.cs index 152166b59763..70c9ea92e21b 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceVaultAndSecretReference.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceVaultAndSecretReference.Serialization.cs @@ -19,6 +19,15 @@ public partial class CloudServiceVaultAndSecretReference : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(CloudServiceVaultAndSecretReference)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(SourceVault)) { writer.WritePropertyName("sourceVault"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } CloudServiceVaultAndSecretReference IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceVaultCertificate.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceVaultCertificate.Serialization.cs index a85c5544effb..fb7a86ccc63c 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceVaultCertificate.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceVaultCertificate.Serialization.cs @@ -18,6 +18,15 @@ public partial class CloudServiceVaultCertificate : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(CloudServiceVaultCertificate)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(CertificateUri)) { writer.WritePropertyName("certificateUrl"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } CloudServiceVaultCertificate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceVaultSecretGroup.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceVaultSecretGroup.Serialization.cs index d250daad2344..f5eed462de4c 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceVaultSecretGroup.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CloudServiceVaultSecretGroup.Serialization.cs @@ -19,6 +19,15 @@ public partial class CloudServiceVaultSecretGroup : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(CloudServiceVaultSecretGroup)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(SourceVault)) { writer.WritePropertyName("sourceVault"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } CloudServiceVaultSecretGroup IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CommunityGalleryImageIdentifier.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CommunityGalleryImageIdentifier.Serialization.cs index 317673e2f9bd..b52c83f22e35 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CommunityGalleryImageIdentifier.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CommunityGalleryImageIdentifier.Serialization.cs @@ -18,6 +18,15 @@ public partial class CommunityGalleryImageIdentifier : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(CommunityGalleryImageIdentifier)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Publisher)) { writer.WritePropertyName("publisher"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } CommunityGalleryImageIdentifier IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CommunityGalleryImageList.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CommunityGalleryImageList.Serialization.cs index ee9e6a1e0ed4..46567d12ae34 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CommunityGalleryImageList.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CommunityGalleryImageList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class CommunityGalleryImageList : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(CommunityGalleryImageList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } CommunityGalleryImageList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CommunityGalleryImageVersionList.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CommunityGalleryImageVersionList.Serialization.cs index b240037926f2..3be8bfd00db0 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CommunityGalleryImageVersionList.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CommunityGalleryImageVersionList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class CommunityGalleryImageVersionList : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(CommunityGalleryImageVersionList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } CommunityGalleryImageVersionList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CommunityGalleryInfo.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CommunityGalleryInfo.Serialization.cs index ae0ae2915834..fda7917dd580 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CommunityGalleryInfo.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CommunityGalleryInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class CommunityGalleryInfo : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(CommunityGalleryInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(PublisherUriString)) { writer.WritePropertyName("publisherUri"u8); @@ -76,7 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } CommunityGalleryInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CommunityGalleryMetadata.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CommunityGalleryMetadata.Serialization.cs index 11a4085fa604..0515695f0bba 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CommunityGalleryMetadata.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CommunityGalleryMetadata.Serialization.cs @@ -18,6 +18,15 @@ public partial class CommunityGalleryMetadata : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(CommunityGalleryMetadata)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(PublisherUri)) { writer.WritePropertyName("publisherUri"u8); @@ -65,7 +73,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } CommunityGalleryMetadata IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputeApiError.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputeApiError.Serialization.cs index 3b8743bc8517..978d3b3fa54f 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputeApiError.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputeApiError.Serialization.cs @@ -18,6 +18,15 @@ public partial class ComputeApiError : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(ComputeApiError)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Details)) { writer.WritePropertyName("details"u8); @@ -71,7 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO #endif } } - writer.WriteEndObject(); } ComputeApiError IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputeApiErrorBase.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputeApiErrorBase.Serialization.cs index ec4005da0ca5..eadc8460585e 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputeApiErrorBase.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputeApiErrorBase.Serialization.cs @@ -18,6 +18,15 @@ public partial class ComputeApiErrorBase : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ComputeApiErrorBase)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Code)) { writer.WritePropertyName("code"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } ComputeApiErrorBase IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputePlan.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputePlan.Serialization.cs index 3f60504b9cdf..06eff6bd035a 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputePlan.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputePlan.Serialization.cs @@ -18,6 +18,15 @@ public partial class ComputePlan : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio throw new FormatException($"The model {nameof(ComputePlan)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio #endif } } - writer.WriteEndObject(); } ComputePlan IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputePrivateEndpointConnectionListResult.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputePrivateEndpointConnectionListResult.Serialization.cs index f3fbb77ee438..64966b34696e 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputePrivateEndpointConnectionListResult.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputePrivateEndpointConnectionListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ComputePrivateEndpointConnectionListResult : IUtf8JsonSer void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(ComputePrivateEndpointConnectionListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } ComputePrivateEndpointConnectionListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputePrivateLinkResourceData.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputePrivateLinkResourceData.Serialization.cs index 5744188a810b..e3fdfc26aaa4 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputePrivateLinkResourceData.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputePrivateLinkResourceData.Serialization.cs @@ -19,6 +19,15 @@ public partial class ComputePrivateLinkResourceData : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(ComputePrivateLinkResourceData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(GroupId)) @@ -75,22 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ComputePrivateLinkResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputePrivateLinkResourceListResult.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputePrivateLinkResourceListResult.Serialization.cs index f864f7301cef..ec0f22183331 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputePrivateLinkResourceListResult.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputePrivateLinkResourceListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ComputePrivateLinkResourceListResult : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(ComputePrivateLinkResourceListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } ComputePrivateLinkResourceListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputePrivateLinkServiceConnectionState.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputePrivateLinkServiceConnectionState.Serialization.cs index f66055252102..2e27181703cd 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputePrivateLinkServiceConnectionState.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputePrivateLinkServiceConnectionState.Serialization.cs @@ -18,6 +18,15 @@ public partial class ComputePrivateLinkServiceConnectionState : IUtf8JsonSeriali void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter w throw new FormatException($"The model {nameof(ComputePrivateLinkServiceConnectionState)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Status)) { writer.WritePropertyName("status"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter w #endif } } - writer.WriteEndObject(); } ComputePrivateLinkServiceConnectionState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputePublicIPAddressSku.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputePublicIPAddressSku.Serialization.cs index ea716e40063a..08aae730b77b 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputePublicIPAddressSku.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputePublicIPAddressSku.Serialization.cs @@ -18,6 +18,15 @@ public partial class ComputePublicIPAddressSku : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(ComputePublicIPAddressSku)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } ComputePublicIPAddressSku IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputeResourcePatch.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputeResourcePatch.Serialization.cs index 4ea3998b6ee0..93ad84957381 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputeResourcePatch.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputeResourcePatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class ComputeResourcePatch : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(ComputeResourcePatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } ComputeResourcePatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputeResourceSku.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputeResourceSku.Serialization.cs index a58b44465678..3c597ec28286 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputeResourceSku.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputeResourceSku.Serialization.cs @@ -18,6 +18,15 @@ public partial class ComputeResourceSku : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ComputeResourceSku)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ResourceType)) { writer.WritePropertyName("resourceType"u8); @@ -136,7 +144,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } ComputeResourceSku IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputeResourceSkuCapabilities.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputeResourceSkuCapabilities.Serialization.cs index bcf58ce264cb..45741191e738 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputeResourceSkuCapabilities.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputeResourceSkuCapabilities.Serialization.cs @@ -18,6 +18,15 @@ public partial class ComputeResourceSkuCapabilities : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(ComputeResourceSkuCapabilities)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } ComputeResourceSkuCapabilities IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputeResourceSkuCapacity.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputeResourceSkuCapacity.Serialization.cs index 8426d8c53c6d..d9628918aff3 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputeResourceSkuCapacity.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputeResourceSkuCapacity.Serialization.cs @@ -18,6 +18,15 @@ public partial class ComputeResourceSkuCapacity : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(ComputeResourceSkuCapacity)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Minimum)) { writer.WritePropertyName("minimum"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } ComputeResourceSkuCapacity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputeResourceSkuLocationInfo.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputeResourceSkuLocationInfo.Serialization.cs index 50695f68bfec..1e4ffb1afb73 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputeResourceSkuLocationInfo.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputeResourceSkuLocationInfo.Serialization.cs @@ -19,6 +19,15 @@ public partial class ComputeResourceSkuLocationInfo : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(ComputeResourceSkuLocationInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Location)) { writer.WritePropertyName("location"u8); @@ -82,7 +90,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } ComputeResourceSkuLocationInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputeResourceSkuRestrictionInfo.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputeResourceSkuRestrictionInfo.Serialization.cs index 7788f6c7a51f..0cae2241b7c7 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputeResourceSkuRestrictionInfo.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputeResourceSkuRestrictionInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class ComputeResourceSkuRestrictionInfo : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(ComputeResourceSkuRestrictionInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Locations)) { writer.WritePropertyName("locations"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } ComputeResourceSkuRestrictionInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputeResourceSkuRestrictions.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputeResourceSkuRestrictions.Serialization.cs index cf49a898dec1..83912974f478 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputeResourceSkuRestrictions.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputeResourceSkuRestrictions.Serialization.cs @@ -18,6 +18,15 @@ public partial class ComputeResourceSkuRestrictions : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(ComputeResourceSkuRestrictions)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(RestrictionsType)) { writer.WritePropertyName("type"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } ComputeResourceSkuRestrictions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputeResourceSkuZoneDetails.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputeResourceSkuZoneDetails.Serialization.cs index d3eeb3fe55dc..4c35972136b3 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputeResourceSkuZoneDetails.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputeResourceSkuZoneDetails.Serialization.cs @@ -18,6 +18,15 @@ public partial class ComputeResourceSkuZoneDetails : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(ComputeResourceSkuZoneDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Name)) { writer.WritePropertyName("name"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } ComputeResourceSkuZoneDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputeScheduledEventsProfile.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputeScheduledEventsProfile.Serialization.cs index 93c5db1709ef..4625b0e1451d 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputeScheduledEventsProfile.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputeScheduledEventsProfile.Serialization.cs @@ -18,6 +18,15 @@ public partial class ComputeScheduledEventsProfile : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(ComputeScheduledEventsProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(TerminateNotificationProfile)) { writer.WritePropertyName("terminateNotificationProfile"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } ComputeScheduledEventsProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputeSecurityPostureReference.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputeSecurityPostureReference.Serialization.cs index b0f5bae5c273..69e95d7d8cf5 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputeSecurityPostureReference.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputeSecurityPostureReference.Serialization.cs @@ -18,6 +18,15 @@ public partial class ComputeSecurityPostureReference : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(ComputeSecurityPostureReference)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("id"u8); writer.WriteStringValue(Id); if (Optional.IsCollectionDefined(ExcludeExtensionNames)) @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } ComputeSecurityPostureReference IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputeSku.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputeSku.Serialization.cs index e26f56696d5a..ed11c8191020 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputeSku.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputeSku.Serialization.cs @@ -18,6 +18,15 @@ public partial class ComputeSku : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOption throw new FormatException($"The model {nameof(ComputeSku)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOption #endif } } - writer.WriteEndObject(); } ComputeSku IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputeSkuProfile.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputeSkuProfile.Serialization.cs index ce3352bd96a5..51e7bead1714 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputeSkuProfile.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputeSkuProfile.Serialization.cs @@ -18,6 +18,15 @@ public partial class ComputeSkuProfile : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(ComputeSkuProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(VmSizes)) { writer.WritePropertyName("vmSizes"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } ComputeSkuProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputeSkuProfileVmSize.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputeSkuProfileVmSize.Serialization.cs index 859ac40652f4..4005cf3be413 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputeSkuProfileVmSize.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputeSkuProfileVmSize.Serialization.cs @@ -18,6 +18,15 @@ public partial class ComputeSkuProfileVmSize : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(ComputeSkuProfileVmSize)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } ComputeSkuProfileVmSize IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputeSubResourceData.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputeSubResourceData.Serialization.cs index 7caa13f82062..a024d26eb427 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputeSubResourceData.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputeSubResourceData.Serialization.cs @@ -18,6 +18,15 @@ public partial class ComputeSubResourceData : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(ComputeSubResourceData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } ComputeSubResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputeSubResourceDataWithColocationStatus.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputeSubResourceDataWithColocationStatus.Serialization.cs index 8b91cd10d019..1eafc4815dc9 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputeSubResourceDataWithColocationStatus.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputeSubResourceDataWithColocationStatus.Serialization.cs @@ -18,6 +18,15 @@ public partial class ComputeSubResourceDataWithColocationStatus : IUtf8JsonSeria void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,33 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(ComputeSubResourceDataWithColocationStatus)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(ColocationStatus)) { writer.WritePropertyName("colocationStatus"u8); writer.WriteObjectValue(ColocationStatus, options); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ComputeSubResourceDataWithColocationStatus IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputeUsage.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputeUsage.Serialization.cs index 62cb0dd968be..97be8cd72214 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputeUsage.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputeUsage.Serialization.cs @@ -18,6 +18,15 @@ public partial class ComputeUsage : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(ComputeUsage)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("unit"u8); writer.WriteStringValue(Unit.ToString()); writer.WritePropertyName("currentValue"u8); @@ -49,7 +57,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti #endif } } - writer.WriteEndObject(); } ComputeUsage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputeUsageName.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputeUsageName.Serialization.cs index 75ba6bdd3ed5..98b1a8cbad41 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputeUsageName.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputeUsageName.Serialization.cs @@ -18,6 +18,15 @@ public partial class ComputeUsageName : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(ComputeUsageName)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Value)) { writer.WritePropertyName("value"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } ComputeUsageName IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputeWriteableSubResourceData.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputeWriteableSubResourceData.Serialization.cs index bd15a1c07e55..64804d7950a4 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputeWriteableSubResourceData.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputeWriteableSubResourceData.Serialization.cs @@ -18,6 +18,15 @@ public partial class ComputeWriteableSubResourceData : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(ComputeWriteableSubResourceData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } ComputeWriteableSubResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CopyCompletionError.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CopyCompletionError.Serialization.cs index 31ab0b1ca78f..41d8bfd89f30 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CopyCompletionError.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CopyCompletionError.Serialization.cs @@ -18,6 +18,15 @@ public partial class CopyCompletionError : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(CopyCompletionError)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("errorCode"u8); writer.WriteStringValue(ErrorCode.ToString()); writer.WritePropertyName("errorMessage"u8); @@ -45,7 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } CopyCompletionError IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DataDiskImage.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DataDiskImage.Serialization.cs index 5ce7728a4607..c1161f1d9c4d 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DataDiskImage.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DataDiskImage.Serialization.cs @@ -18,6 +18,15 @@ public partial class DataDiskImage : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt throw new FormatException($"The model {nameof(DataDiskImage)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Lun)) { writer.WritePropertyName("lun"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt #endif } } - writer.WriteEndObject(); } DataDiskImage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DataDiskImageEncryption.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DataDiskImageEncryption.Serialization.cs index 96905264d76a..123d54ed7d0f 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DataDiskImageEncryption.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DataDiskImageEncryption.Serialization.cs @@ -18,6 +18,15 @@ public partial class DataDiskImageEncryption : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,30 +34,9 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(DataDiskImageEncryption)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("lun"u8); writer.WriteNumberValue(Lun); - if (Optional.IsDefined(DiskEncryptionSetId)) - { - writer.WritePropertyName("diskEncryptionSetId"u8); - writer.WriteStringValue(DiskEncryptionSetId); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } DataDiskImageEncryption IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DataDisksToAttach.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DataDisksToAttach.Serialization.cs index d16b56af54b0..459fab750475 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DataDisksToAttach.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DataDisksToAttach.Serialization.cs @@ -19,6 +19,15 @@ public partial class DataDisksToAttach : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(DataDisksToAttach)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("diskId"u8); writer.WriteStringValue(DiskId); if (Optional.IsDefined(Lun)) @@ -69,7 +77,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } DataDisksToAttach IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DataDisksToDetach.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DataDisksToDetach.Serialization.cs index 54992d4a9e17..84e288523650 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DataDisksToDetach.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DataDisksToDetach.Serialization.cs @@ -18,6 +18,15 @@ public partial class DataDisksToDetach : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(DataDisksToDetach)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("diskId"u8); writer.WriteStringValue(DiskId); if (Optional.IsDefined(DetachOption)) @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } DataDisksToDetach IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DedicatedHostAllocatableVm.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DedicatedHostAllocatableVm.Serialization.cs index affd68e72b04..cb78e0f79197 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DedicatedHostAllocatableVm.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DedicatedHostAllocatableVm.Serialization.cs @@ -18,6 +18,15 @@ public partial class DedicatedHostAllocatableVm : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(DedicatedHostAllocatableVm)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(VmSize)) { writer.WritePropertyName("vmSize"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } DedicatedHostAllocatableVm IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DedicatedHostAvailableCapacity.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DedicatedHostAvailableCapacity.Serialization.cs index fb038a3ffef7..3d8ef5852ab2 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DedicatedHostAvailableCapacity.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DedicatedHostAvailableCapacity.Serialization.cs @@ -18,6 +18,15 @@ internal partial class DedicatedHostAvailableCapacity : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(DedicatedHostAvailableCapacity)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(AllocatableVms)) { writer.WritePropertyName("allocatableVMs"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } DedicatedHostAvailableCapacity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DedicatedHostGroupInstanceView.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DedicatedHostGroupInstanceView.Serialization.cs index 0f23ca280f22..7c19c6ff34c9 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DedicatedHostGroupInstanceView.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DedicatedHostGroupInstanceView.Serialization.cs @@ -18,6 +18,15 @@ internal partial class DedicatedHostGroupInstanceView : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(DedicatedHostGroupInstanceView)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Hosts)) { writer.WritePropertyName("hosts"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } DedicatedHostGroupInstanceView IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DedicatedHostGroupListResult.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DedicatedHostGroupListResult.Serialization.cs index a9f69d6a4ec6..6c33b21cf20f 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DedicatedHostGroupListResult.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DedicatedHostGroupListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class DedicatedHostGroupListResult : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(DedicatedHostGroupListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } DedicatedHostGroupListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DedicatedHostGroupPatch.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DedicatedHostGroupPatch.Serialization.cs index 7d0a5dfce693..bf9b3a7f2156 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DedicatedHostGroupPatch.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DedicatedHostGroupPatch.Serialization.cs @@ -19,6 +19,15 @@ public partial class DedicatedHostGroupPatch : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(DedicatedHostGroupPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(Zones)) { writer.WritePropertyName("zones"u8); @@ -37,17 +46,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade } writer.WriteEndArray(); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(PlatformFaultDomainCount)) @@ -81,22 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade writer.WriteObjectValue(AdditionalCapabilities, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } DedicatedHostGroupPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DedicatedHostGroupPropertiesAdditionalCapabilities.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DedicatedHostGroupPropertiesAdditionalCapabilities.Serialization.cs index ed4650dce738..1f513aae8440 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DedicatedHostGroupPropertiesAdditionalCapabilities.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DedicatedHostGroupPropertiesAdditionalCapabilities.Serialization.cs @@ -18,6 +18,15 @@ internal partial class DedicatedHostGroupPropertiesAdditionalCapabilities : IUtf void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8Js throw new FormatException($"The model {nameof(DedicatedHostGroupPropertiesAdditionalCapabilities)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(UltraSsdEnabled)) { writer.WritePropertyName("ultraSSDEnabled"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8Js #endif } } - writer.WriteEndObject(); } DedicatedHostGroupPropertiesAdditionalCapabilities IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DedicatedHostInstanceView.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DedicatedHostInstanceView.Serialization.cs index a6cc28036cb4..631f9475e4a4 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DedicatedHostInstanceView.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DedicatedHostInstanceView.Serialization.cs @@ -18,6 +18,15 @@ public partial class DedicatedHostInstanceView : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(DedicatedHostInstanceView)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(AssetId)) { writer.WritePropertyName("assetId"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } DedicatedHostInstanceView IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DedicatedHostInstanceViewWithName.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DedicatedHostInstanceViewWithName.Serialization.cs index eed523517360..6b5c6581859a 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DedicatedHostInstanceViewWithName.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DedicatedHostInstanceViewWithName.Serialization.cs @@ -18,6 +18,15 @@ public partial class DedicatedHostInstanceViewWithName : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,48 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(DedicatedHostInstanceViewWithName)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); } - if (options.Format != "W" && Optional.IsDefined(AssetId)) - { - writer.WritePropertyName("assetId"u8); - writer.WriteStringValue(AssetId); - } - if (Optional.IsDefined(AvailableCapacity)) - { - writer.WritePropertyName("availableCapacity"u8); - writer.WriteObjectValue(AvailableCapacity, options); - } - if (Optional.IsCollectionDefined(Statuses)) - { - writer.WritePropertyName("statuses"u8); - writer.WriteStartArray(); - foreach (var item in Statuses) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } DedicatedHostInstanceViewWithName IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DedicatedHostListResult.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DedicatedHostListResult.Serialization.cs index bff32460ad4c..142101e3b239 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DedicatedHostListResult.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DedicatedHostListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class DedicatedHostListResult : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(DedicatedHostListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } DedicatedHostListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DedicatedHostPatch.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DedicatedHostPatch.Serialization.cs index 2303f9900e6a..7334be65533b 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DedicatedHostPatch.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DedicatedHostPatch.Serialization.cs @@ -19,6 +19,15 @@ public partial class DedicatedHostPatch : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,23 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(DedicatedHostPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Sku)) { writer.WritePropertyName("sku"u8); writer.WriteObjectValue(Sku, options); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(PlatformFaultDomain)) @@ -96,22 +94,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStringValue(TimeCreated.Value, "O"); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } DedicatedHostPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DedicatedHostSizeListResult.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DedicatedHostSizeListResult.Serialization.cs index 2421c9e11cd0..d2131966c3e9 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DedicatedHostSizeListResult.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DedicatedHostSizeListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class DedicatedHostSizeListResult : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(DedicatedHostSizeListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } DedicatedHostSizeListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiagnosticsProfile.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiagnosticsProfile.Serialization.cs index 6d763a658415..288d9fb02f03 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiagnosticsProfile.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiagnosticsProfile.Serialization.cs @@ -18,6 +18,15 @@ internal partial class DiagnosticsProfile : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(DiagnosticsProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(BootDiagnostics)) { writer.WritePropertyName("bootDiagnostics"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } DiagnosticsProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiffDiskSettings.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiffDiskSettings.Serialization.cs index 517385aea68a..e6b663686a36 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiffDiskSettings.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiffDiskSettings.Serialization.cs @@ -18,6 +18,15 @@ public partial class DiffDiskSettings : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(DiffDiskSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Option)) { writer.WritePropertyName("option"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } DiffDiskSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/Disallowed.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/Disallowed.Serialization.cs index 89f97096c537..e12b48f11893 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/Disallowed.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/Disallowed.Serialization.cs @@ -18,6 +18,15 @@ internal partial class Disallowed : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOption throw new FormatException($"The model {nameof(Disallowed)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(DiskTypes)) { writer.WritePropertyName("diskTypes"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOption #endif } } - writer.WriteEndObject(); } Disallowed IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DisallowedConfiguration.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DisallowedConfiguration.Serialization.cs index 329ff04d6287..e536dcf424a0 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DisallowedConfiguration.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DisallowedConfiguration.Serialization.cs @@ -18,6 +18,15 @@ internal partial class DisallowedConfiguration : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(DisallowedConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(VmDiskType)) { writer.WritePropertyName("vmDiskType"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } DisallowedConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskAccessList.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskAccessList.Serialization.cs index 2007a09a368b..e64fe69f21c4 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskAccessList.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskAccessList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class DiskAccessList : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(DiskAccessList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp #endif } } - writer.WriteEndObject(); } DiskAccessList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskAccessPatch.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskAccessPatch.Serialization.cs index 9ce7d7e096a8..ea123902698e 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskAccessPatch.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskAccessPatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class DiskAccessPatch : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(DiskAccessPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO #endif } } - writer.WriteEndObject(); } DiskAccessPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskCreationData.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskCreationData.Serialization.cs index dc89cd87cbf3..6135728f7af3 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskCreationData.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskCreationData.Serialization.cs @@ -18,6 +18,15 @@ public partial class DiskCreationData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(DiskCreationData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("createOption"u8); writer.WriteStringValue(CreateOption.ToString()); if (Optional.IsDefined(StorageAccountId)) @@ -103,7 +111,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } DiskCreationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskEncryption.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskEncryption.Serialization.cs index f5abb77cf5c3..f729297fea3a 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskEncryption.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskEncryption.Serialization.cs @@ -18,6 +18,15 @@ public partial class DiskEncryption : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(DiskEncryption)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(DiskEncryptionSetId)) { writer.WritePropertyName("diskEncryptionSetId"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp #endif } } - writer.WriteEndObject(); } DiskEncryption IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskEncryptionSetList.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskEncryptionSetList.Serialization.cs index 3357d5eff4be..1ddefb76af6a 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskEncryptionSetList.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskEncryptionSetList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class DiskEncryptionSetList : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(DiskEncryptionSetList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } DiskEncryptionSetList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskEncryptionSetPatch.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskEncryptionSetPatch.Serialization.cs index 39dc5f018e1f..fae38127664e 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskEncryptionSetPatch.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskEncryptionSetPatch.Serialization.cs @@ -19,6 +19,15 @@ public partial class DiskEncryptionSetPatch : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(DiskEncryptionSetPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -81,7 +89,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } DiskEncryptionSetPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskEncryptionSettings.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskEncryptionSettings.Serialization.cs index 57a601f6ea31..8b8cfdc7c300 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskEncryptionSettings.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskEncryptionSettings.Serialization.cs @@ -18,6 +18,15 @@ public partial class DiskEncryptionSettings : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(DiskEncryptionSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(DiskEncryptionKey)) { writer.WritePropertyName("diskEncryptionKey"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } DiskEncryptionSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskImageEncryption.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskImageEncryption.Serialization.cs index 96b21bbb3299..8fb7692f4770 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskImageEncryption.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskImageEncryption.Serialization.cs @@ -18,6 +18,15 @@ public partial class DiskImageEncryption : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(DiskImageEncryption)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(DiskEncryptionSetId)) { writer.WritePropertyName("diskEncryptionSetId"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } DiskImageEncryption IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskImagePatch.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskImagePatch.Serialization.cs index 3c03e5c18199..84272381f9f8 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskImagePatch.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskImagePatch.Serialization.cs @@ -19,6 +19,15 @@ public partial class DiskImagePatch : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,18 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(DiskImagePatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(SourceVirtualMachine)) @@ -61,22 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp writer.WriteStringValue(HyperVGeneration.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } DiskImagePatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskInstanceView.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskInstanceView.Serialization.cs index 0f4763b2f5f0..d877dacad173 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskInstanceView.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskInstanceView.Serialization.cs @@ -18,6 +18,15 @@ public partial class DiskInstanceView : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(DiskInstanceView)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } DiskInstanceView IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskList.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskList.Serialization.cs index 7ae57b055067..73d670a8ea6a 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskList.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class DiskList : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions throw new FormatException($"The model {nameof(DiskList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions #endif } } - writer.WriteEndObject(); } DiskList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskPurchasePlan.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskPurchasePlan.Serialization.cs index d37dcf5095a8..304af9f7b17e 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskPurchasePlan.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskPurchasePlan.Serialization.cs @@ -18,6 +18,15 @@ public partial class DiskPurchasePlan : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(DiskPurchasePlan)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); writer.WritePropertyName("publisher"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } DiskPurchasePlan IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskRestorePointAttributes.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskRestorePointAttributes.Serialization.cs index ed04e15b80a5..09b2be727acd 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskRestorePointAttributes.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskRestorePointAttributes.Serialization.cs @@ -19,6 +19,15 @@ public partial class DiskRestorePointAttributes : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(DiskRestorePointAttributes)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Encryption)) { writer.WritePropertyName("encryption"u8); @@ -37,27 +46,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe writer.WritePropertyName("sourceDiskRestorePoint"u8); JsonSerializer.Serialize(writer, SourceDiskRestorePoint); } - if (options.Format != "W" && Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } DiskRestorePointAttributes IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskRestorePointInstanceView.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskRestorePointInstanceView.Serialization.cs index b65ea6ff3868..cfe06a6e1fbc 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskRestorePointInstanceView.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskRestorePointInstanceView.Serialization.cs @@ -18,6 +18,15 @@ public partial class DiskRestorePointInstanceView : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(DiskRestorePointInstanceView)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } DiskRestorePointInstanceView IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskRestorePointList.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskRestorePointList.Serialization.cs index f668cb31505e..caa6eb1bd511 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskRestorePointList.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskRestorePointList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class DiskRestorePointList : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(DiskRestorePointList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } DiskRestorePointList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskRestorePointReplicationStatus.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskRestorePointReplicationStatus.Serialization.cs index e4025b8117c3..0daa8ca8861c 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskRestorePointReplicationStatus.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskRestorePointReplicationStatus.Serialization.cs @@ -18,6 +18,15 @@ public partial class DiskRestorePointReplicationStatus : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(DiskRestorePointReplicationStatus)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Status)) { writer.WritePropertyName("status"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } DiskRestorePointReplicationStatus IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskSecurityProfile.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskSecurityProfile.Serialization.cs index b42ac8daf2e9..19211546085c 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskSecurityProfile.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskSecurityProfile.Serialization.cs @@ -18,6 +18,15 @@ public partial class DiskSecurityProfile : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(DiskSecurityProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(SecurityType)) { writer.WritePropertyName("securityType"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } DiskSecurityProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskSku.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskSku.Serialization.cs index 2cb5ab8d9b79..e98d84187a8e 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskSku.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskSku.Serialization.cs @@ -18,6 +18,15 @@ public partial class DiskSku : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions o throw new FormatException($"The model {nameof(DiskSku)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions o #endif } } - writer.WriteEndObject(); } DiskSku IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/EncryptionIdentity.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/EncryptionIdentity.Serialization.cs index 9472a12cf2c6..8e8ad677ff54 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/EncryptionIdentity.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/EncryptionIdentity.Serialization.cs @@ -18,6 +18,15 @@ internal partial class EncryptionIdentity : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(EncryptionIdentity)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(UserAssignedIdentityResourceId)) { writer.WritePropertyName("userAssignedIdentityResourceId"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } EncryptionIdentity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/EncryptionImages.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/EncryptionImages.Serialization.cs index 6a48a2163ab7..4bc85dd4088c 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/EncryptionImages.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/EncryptionImages.Serialization.cs @@ -18,6 +18,15 @@ public partial class EncryptionImages : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(EncryptionImages)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(OSDiskImage)) { writer.WritePropertyName("osDiskImage"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } EncryptionImages IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/EncryptionSettingsElement.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/EncryptionSettingsElement.Serialization.cs index 0c4c2fb917dc..f5c6f642b52b 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/EncryptionSettingsElement.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/EncryptionSettingsElement.Serialization.cs @@ -18,6 +18,15 @@ public partial class EncryptionSettingsElement : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(EncryptionSettingsElement)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(DiskEncryptionKey)) { writer.WritePropertyName("diskEncryptionKey"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } EncryptionSettingsElement IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/EncryptionSettingsGroup.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/EncryptionSettingsGroup.Serialization.cs index e048c2d3c98c..cf77c39fb656 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/EncryptionSettingsGroup.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/EncryptionSettingsGroup.Serialization.cs @@ -18,6 +18,15 @@ public partial class EncryptionSettingsGroup : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(EncryptionSettingsGroup)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("enabled"u8); writer.WriteBooleanValue(Enabled); if (Optional.IsCollectionDefined(EncryptionSettings)) @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } EncryptionSettingsGroup IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/EventGridAndResourceGraph.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/EventGridAndResourceGraph.Serialization.cs index 078196fc60b5..f071552dfa59 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/EventGridAndResourceGraph.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/EventGridAndResourceGraph.Serialization.cs @@ -18,6 +18,15 @@ internal partial class EventGridAndResourceGraph : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(EventGridAndResourceGraph)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Enable)) { writer.WritePropertyName("enable"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } EventGridAndResourceGraph IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryApplicationCustomAction.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryApplicationCustomAction.Serialization.cs index 490a1796edc6..5f06f82e782a 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryApplicationCustomAction.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryApplicationCustomAction.Serialization.cs @@ -18,6 +18,15 @@ public partial class GalleryApplicationCustomAction : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(GalleryApplicationCustomAction)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); writer.WritePropertyName("script"u8); @@ -60,7 +68,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } GalleryApplicationCustomAction IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryApplicationCustomActionParameter.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryApplicationCustomActionParameter.Serialization.cs index 99f0bf81f261..30f410758c6e 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryApplicationCustomActionParameter.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryApplicationCustomActionParameter.Serialization.cs @@ -18,6 +18,15 @@ public partial class GalleryApplicationCustomActionParameter : IUtf8JsonSerializ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wr throw new FormatException($"The model {nameof(GalleryApplicationCustomActionParameter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); if (Optional.IsDefined(IsRequired)) @@ -63,7 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter wr #endif } } - writer.WriteEndObject(); } GalleryApplicationCustomActionParameter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryApplicationList.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryApplicationList.Serialization.cs index a80b2ed9eaea..1c5d4eab190a 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryApplicationList.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryApplicationList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class GalleryApplicationList : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(GalleryApplicationList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } GalleryApplicationList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryApplicationPatch.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryApplicationPatch.Serialization.cs index 3caa6d8667f3..849a6045d2d7 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryApplicationPatch.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryApplicationPatch.Serialization.cs @@ -19,6 +19,15 @@ public partial class GalleryApplicationPatch : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(GalleryApplicationPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -38,26 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade } writer.WriteEndObject(); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Description)) @@ -101,22 +90,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } GalleryApplicationPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryApplicationVersionList.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryApplicationVersionList.Serialization.cs index 4816cff6821a..7a4659b20e5f 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryApplicationVersionList.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryApplicationVersionList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class GalleryApplicationVersionList : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(GalleryApplicationVersionList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } GalleryApplicationVersionList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryApplicationVersionPatch.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryApplicationVersionPatch.Serialization.cs index 24c4cdc0029b..0990d6c1a062 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryApplicationVersionPatch.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryApplicationVersionPatch.Serialization.cs @@ -19,6 +19,15 @@ public partial class GalleryApplicationVersionPatch : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(GalleryApplicationVersionPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -38,26 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod } writer.WriteEndObject(); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(PublishingProfile)) @@ -81,22 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod writer.WriteObjectValue(ReplicationStatus, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } GalleryApplicationVersionPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryApplicationVersionPublishingProfile.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryApplicationVersionPublishingProfile.Serialization.cs index 32575f17446b..aba17cf76e50 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryApplicationVersionPublishingProfile.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryApplicationVersionPublishingProfile.Serialization.cs @@ -18,6 +18,15 @@ public partial class GalleryApplicationVersionPublishingProfile : IUtf8JsonSeria void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(GalleryApplicationVersionPublishingProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("source"u8); writer.WriteObjectValue(Source, options); if (Optional.IsDefined(ManageActions)) @@ -64,72 +73,6 @@ void IJsonModel.Write(Utf8JsonWriter } writer.WriteEndArray(); } - if (Optional.IsCollectionDefined(TargetRegions)) - { - writer.WritePropertyName("targetRegions"u8); - writer.WriteStartArray(); - foreach (var item in TargetRegions) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(ReplicaCount)) - { - writer.WritePropertyName("replicaCount"u8); - writer.WriteNumberValue(ReplicaCount.Value); - } - if (Optional.IsDefined(IsExcludedFromLatest)) - { - writer.WritePropertyName("excludeFromLatest"u8); - writer.WriteBooleanValue(IsExcludedFromLatest.Value); - } - if (options.Format != "W" && Optional.IsDefined(PublishedOn)) - { - writer.WritePropertyName("publishedDate"u8); - writer.WriteStringValue(PublishedOn.Value, "O"); - } - if (Optional.IsDefined(EndOfLifeOn)) - { - writer.WritePropertyName("endOfLifeDate"u8); - writer.WriteStringValue(EndOfLifeOn.Value, "O"); - } - if (Optional.IsDefined(StorageAccountType)) - { - writer.WritePropertyName("storageAccountType"u8); - writer.WriteStringValue(StorageAccountType.Value.ToString()); - } - if (Optional.IsDefined(ReplicationMode)) - { - writer.WritePropertyName("replicationMode"u8); - writer.WriteStringValue(ReplicationMode.Value.ToString()); - } - if (Optional.IsCollectionDefined(TargetExtendedLocations)) - { - writer.WritePropertyName("targetExtendedLocations"u8); - writer.WriteStartArray(); - foreach (var item in TargetExtendedLocations) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } GalleryApplicationVersionPublishingProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryApplicationVersionSafetyProfile.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryApplicationVersionSafetyProfile.Serialization.cs index 941816d14f97..fa42d3e59bb6 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryApplicationVersionSafetyProfile.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryApplicationVersionSafetyProfile.Serialization.cs @@ -18,6 +18,15 @@ internal partial class GalleryApplicationVersionSafetyProfile : IUtf8JsonSeriali void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,28 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(GalleryApplicationVersionSafetyProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(AllowDeletionOfReplicatedLocations)) - { - writer.WritePropertyName("allowDeletionOfReplicatedLocations"u8); - writer.WriteBooleanValue(AllowDeletionOfReplicatedLocations.Value); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } GalleryApplicationVersionSafetyProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryArtifactPublishingProfileBase.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryArtifactPublishingProfileBase.Serialization.cs index 54545d56061c..3944f6b9e525 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryArtifactPublishingProfileBase.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryArtifactPublishingProfileBase.Serialization.cs @@ -18,6 +18,15 @@ public partial class GalleryArtifactPublishingProfileBase : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(GalleryArtifactPublishingProfileBase)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(TargetRegions)) { writer.WritePropertyName("targetRegions"u8); @@ -91,7 +99,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } GalleryArtifactPublishingProfileBase IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryArtifactSafetyProfileBase.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryArtifactSafetyProfileBase.Serialization.cs index 9c872141c3b2..c479104b7c48 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryArtifactSafetyProfileBase.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryArtifactSafetyProfileBase.Serialization.cs @@ -18,6 +18,15 @@ public partial class GalleryArtifactSafetyProfileBase : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(GalleryArtifactSafetyProfileBase)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(AllowDeletionOfReplicatedLocations)) { writer.WritePropertyName("allowDeletionOfReplicatedLocations"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } GalleryArtifactSafetyProfileBase IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryArtifactVersionFullSource.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryArtifactVersionFullSource.Serialization.cs index cf57a5810e27..6aea796ede05 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryArtifactVersionFullSource.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryArtifactVersionFullSource.Serialization.cs @@ -18,6 +18,15 @@ public partial class GalleryArtifactVersionFullSource : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(GalleryArtifactVersionFullSource)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(CommunityGalleryImageId)) { writer.WritePropertyName("communityGalleryImageId"u8); @@ -36,27 +45,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M writer.WritePropertyName("virtualMachineId"u8); writer.WriteStringValue(VirtualMachineId); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } GalleryArtifactVersionFullSource IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryArtifactVersionSource.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryArtifactVersionSource.Serialization.cs index b5f3aca2b2e6..719d8f873d17 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryArtifactVersionSource.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryArtifactVersionSource.Serialization.cs @@ -18,6 +18,15 @@ public partial class GalleryArtifactVersionSource : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(GalleryArtifactVersionSource)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } GalleryArtifactVersionSource IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryDataDiskImage.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryDataDiskImage.Serialization.cs index 4cca9c3567ff..0f8fd6005625 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryDataDiskImage.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryDataDiskImage.Serialization.cs @@ -18,6 +18,15 @@ public partial class GalleryDataDiskImage : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,40 +34,9 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(GalleryDataDiskImage)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("lun"u8); writer.WriteNumberValue(Lun); - if (options.Format != "W" && Optional.IsDefined(SizeInGB)) - { - writer.WritePropertyName("sizeInGB"u8); - writer.WriteNumberValue(SizeInGB.Value); - } - if (Optional.IsDefined(HostCaching)) - { - writer.WritePropertyName("hostCaching"u8); - writer.WriteStringValue(HostCaching.Value.ToSerialString()); - } - if (Optional.IsDefined(GallerySource)) - { - writer.WritePropertyName("source"u8); - writer.WriteObjectValue(GallerySource, options); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } GalleryDataDiskImage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryDiskImage.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryDiskImage.Serialization.cs index b540cdcaf562..195833d41b65 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryDiskImage.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryDiskImage.Serialization.cs @@ -18,6 +18,15 @@ public partial class GalleryDiskImage : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(GalleryDiskImage)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(SizeInGB)) { writer.WritePropertyName("sizeInGB"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } GalleryDiskImage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryDiskImageSource.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryDiskImageSource.Serialization.cs index 6b906c162de9..489fac512833 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryDiskImageSource.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryDiskImageSource.Serialization.cs @@ -18,6 +18,15 @@ public partial class GalleryDiskImageSource : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(GalleryDiskImageSource)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Uri)) { writer.WritePropertyName("uri"u8); @@ -36,27 +45,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader writer.WritePropertyName("storageAccountId"u8); writer.WriteStringValue(StorageAccountId); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } GalleryDiskImageSource IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryExtendedLocation.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryExtendedLocation.Serialization.cs index faab0d0c474a..c6fbba3983d6 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryExtendedLocation.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryExtendedLocation.Serialization.cs @@ -18,6 +18,15 @@ public partial class GalleryExtendedLocation : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(GalleryExtendedLocation)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } GalleryExtendedLocation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryIdentifier.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryIdentifier.Serialization.cs index 4422aa44226e..663f62b62341 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryIdentifier.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryIdentifier.Serialization.cs @@ -18,6 +18,15 @@ internal partial class GalleryIdentifier : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(GalleryIdentifier)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(UniqueName)) { writer.WritePropertyName("uniqueName"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } GalleryIdentifier IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryImageFeature.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryImageFeature.Serialization.cs index 1bf1e5f22664..8c1ebc69127e 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryImageFeature.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryImageFeature.Serialization.cs @@ -18,6 +18,15 @@ public partial class GalleryImageFeature : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(GalleryImageFeature)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } GalleryImageFeature IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryImageIdentifier.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryImageIdentifier.Serialization.cs index e58eb56aca58..f1c48fde1481 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryImageIdentifier.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryImageIdentifier.Serialization.cs @@ -18,6 +18,15 @@ public partial class GalleryImageIdentifier : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(GalleryImageIdentifier)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("publisher"u8); writer.WriteStringValue(Publisher); writer.WritePropertyName("offer"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } GalleryImageIdentifier IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryImageList.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryImageList.Serialization.cs index e4a3cb5837d7..eb620a3f48ed 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryImageList.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryImageList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class GalleryImageList : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(GalleryImageList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } GalleryImageList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryImagePatch.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryImagePatch.Serialization.cs index 2e3f2c948ddc..250d13e90fd7 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryImagePatch.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryImagePatch.Serialization.cs @@ -19,6 +19,15 @@ public partial class GalleryImagePatch : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(GalleryImagePatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -38,26 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite } writer.WriteEndObject(); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Description)) @@ -141,22 +130,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite writer.WriteStringValue(Architecture.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } GalleryImagePatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryImageVersionList.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryImageVersionList.Serialization.cs index f0d6a7908b0f..0db35711647f 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryImageVersionList.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryImageVersionList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class GalleryImageVersionList : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(GalleryImageVersionList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } GalleryImageVersionList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryImageVersionPatch.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryImageVersionPatch.Serialization.cs index bd2acbdfe07e..4bb5712fbc25 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryImageVersionPatch.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryImageVersionPatch.Serialization.cs @@ -19,6 +19,15 @@ public partial class GalleryImageVersionPatch : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(GalleryImageVersionPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -38,26 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead } writer.WriteEndObject(); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(PublishingProfile)) @@ -91,22 +80,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead writer.WriteObjectValue(SecurityProfile, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } GalleryImageVersionPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryImageVersionPolicyViolation.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryImageVersionPolicyViolation.Serialization.cs index 87e08115c8ec..53a93e2f2532 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryImageVersionPolicyViolation.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryImageVersionPolicyViolation.Serialization.cs @@ -18,6 +18,15 @@ public partial class GalleryImageVersionPolicyViolation : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(GalleryImageVersionPolicyViolation)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Category)) { writer.WritePropertyName("category"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } GalleryImageVersionPolicyViolation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryImageVersionPublishingProfile.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryImageVersionPublishingProfile.Serialization.cs index 61b65f749bdc..0ca1cf74f66f 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryImageVersionPublishingProfile.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryImageVersionPublishingProfile.Serialization.cs @@ -18,6 +18,15 @@ public partial class GalleryImageVersionPublishingProfile : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,73 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(GalleryImageVersionPublishingProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(TargetRegions)) - { - writer.WritePropertyName("targetRegions"u8); - writer.WriteStartArray(); - foreach (var item in TargetRegions) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(ReplicaCount)) - { - writer.WritePropertyName("replicaCount"u8); - writer.WriteNumberValue(ReplicaCount.Value); - } - if (Optional.IsDefined(IsExcludedFromLatest)) - { - writer.WritePropertyName("excludeFromLatest"u8); - writer.WriteBooleanValue(IsExcludedFromLatest.Value); - } - if (options.Format != "W" && Optional.IsDefined(PublishedOn)) - { - writer.WritePropertyName("publishedDate"u8); - writer.WriteStringValue(PublishedOn.Value, "O"); - } - if (Optional.IsDefined(EndOfLifeOn)) - { - writer.WritePropertyName("endOfLifeDate"u8); - writer.WriteStringValue(EndOfLifeOn.Value, "O"); - } - if (Optional.IsDefined(StorageAccountType)) - { - writer.WritePropertyName("storageAccountType"u8); - writer.WriteStringValue(StorageAccountType.Value.ToString()); - } - if (Optional.IsDefined(ReplicationMode)) - { - writer.WritePropertyName("replicationMode"u8); - writer.WriteStringValue(ReplicationMode.Value.ToString()); - } - if (Optional.IsCollectionDefined(TargetExtendedLocations)) - { - writer.WritePropertyName("targetExtendedLocations"u8); - writer.WriteStartArray(); - foreach (var item in TargetExtendedLocations) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } GalleryImageVersionPublishingProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryImageVersionSafetyProfile.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryImageVersionSafetyProfile.Serialization.cs index 766d654019fc..bdfb978234c2 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryImageVersionSafetyProfile.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryImageVersionSafetyProfile.Serialization.cs @@ -18,6 +18,15 @@ public partial class GalleryImageVersionSafetyProfile : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(GalleryImageVersionSafetyProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(IsReportedForPolicyViolation)) { writer.WritePropertyName("reportedForPolicyViolation"u8); @@ -41,27 +50,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M } writer.WriteEndArray(); } - if (Optional.IsDefined(AllowDeletionOfReplicatedLocations)) - { - writer.WritePropertyName("allowDeletionOfReplicatedLocations"u8); - writer.WriteBooleanValue(AllowDeletionOfReplicatedLocations.Value); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } GalleryImageVersionSafetyProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryImageVersionStorageProfile.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryImageVersionStorageProfile.Serialization.cs index f9fac9d487c5..f292b3fd5077 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryImageVersionStorageProfile.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryImageVersionStorageProfile.Serialization.cs @@ -18,6 +18,15 @@ public partial class GalleryImageVersionStorageProfile : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(GalleryImageVersionStorageProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(GallerySource)) { writer.WritePropertyName("source"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } GalleryImageVersionStorageProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryImageVersionUefiSettings.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryImageVersionUefiSettings.Serialization.cs index fe949dfabd92..37e9d7796446 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryImageVersionUefiSettings.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryImageVersionUefiSettings.Serialization.cs @@ -18,6 +18,15 @@ public partial class GalleryImageVersionUefiSettings : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(GalleryImageVersionUefiSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(SignatureTemplateNames)) { writer.WritePropertyName("signatureTemplateNames"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } GalleryImageVersionUefiSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryList.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryList.Serialization.cs index 18b783468065..51e673511a07 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryList.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class GalleryList : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio throw new FormatException($"The model {nameof(GalleryList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio #endif } } - writer.WriteEndObject(); } GalleryList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryOSDiskImage.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryOSDiskImage.Serialization.cs index 78a238225309..9e94450fd11f 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryOSDiskImage.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryOSDiskImage.Serialization.cs @@ -18,6 +18,15 @@ public partial class GalleryOSDiskImage : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,38 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(GalleryOSDiskImage)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W" && Optional.IsDefined(SizeInGB)) - { - writer.WritePropertyName("sizeInGB"u8); - writer.WriteNumberValue(SizeInGB.Value); - } - if (Optional.IsDefined(HostCaching)) - { - writer.WritePropertyName("hostCaching"u8); - writer.WriteStringValue(HostCaching.Value.ToSerialString()); - } - if (Optional.IsDefined(GallerySource)) - { - writer.WritePropertyName("source"u8); - writer.WriteObjectValue(GallerySource, options); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } GalleryOSDiskImage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryPatch.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryPatch.Serialization.cs index 765b650978af..6de50076e849 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryPatch.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryPatch.Serialization.cs @@ -19,6 +19,15 @@ public partial class GalleryPatch : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(GalleryPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -38,26 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti } writer.WriteEndObject(); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Description)) @@ -91,22 +80,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti writer.WriteObjectValue(SharingStatus, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } GalleryPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryTargetExtendedLocation.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryTargetExtendedLocation.Serialization.cs index b5cfcdfd8916..064e4704af35 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryTargetExtendedLocation.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryTargetExtendedLocation.Serialization.cs @@ -18,6 +18,15 @@ public partial class GalleryTargetExtendedLocation : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(GalleryTargetExtendedLocation)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } GalleryTargetExtendedLocation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GrantAccessData.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GrantAccessData.Serialization.cs index 1f60b151fff1..836332d483e7 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GrantAccessData.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GrantAccessData.Serialization.cs @@ -18,6 +18,15 @@ public partial class GrantAccessData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(GrantAccessData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("access"u8); writer.WriteStringValue(Access.ToString()); writer.WritePropertyName("durationInSeconds"u8); @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO #endif } } - writer.WriteEndObject(); } GrantAccessData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ImageAlternativeOption.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ImageAlternativeOption.Serialization.cs index b1848623af54..1f4168b422cb 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ImageAlternativeOption.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ImageAlternativeOption.Serialization.cs @@ -18,6 +18,15 @@ public partial class ImageAlternativeOption : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(ImageAlternativeOption)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(AlternativeType)) { writer.WritePropertyName("type"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } ImageAlternativeOption IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ImageDataDisk.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ImageDataDisk.Serialization.cs index 105978a7ea3d..cf75413c42a3 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ImageDataDisk.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ImageDataDisk.Serialization.cs @@ -19,6 +19,15 @@ public partial class ImageDataDisk : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,60 +35,9 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt throw new FormatException($"The model {nameof(ImageDataDisk)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("lun"u8); writer.WriteNumberValue(Lun); - if (Optional.IsDefined(Snapshot)) - { - writer.WritePropertyName("snapshot"u8); - JsonSerializer.Serialize(writer, Snapshot); - } - if (Optional.IsDefined(ManagedDisk)) - { - writer.WritePropertyName("managedDisk"u8); - JsonSerializer.Serialize(writer, ManagedDisk); - } - if (Optional.IsDefined(BlobUri)) - { - writer.WritePropertyName("blobUri"u8); - writer.WriteStringValue(BlobUri.AbsoluteUri); - } - if (Optional.IsDefined(Caching)) - { - writer.WritePropertyName("caching"u8); - writer.WriteStringValue(Caching.Value.ToSerialString()); - } - if (Optional.IsDefined(DiskSizeGB)) - { - writer.WritePropertyName("diskSizeGB"u8); - writer.WriteNumberValue(DiskSizeGB.Value); - } - if (Optional.IsDefined(StorageAccountType)) - { - writer.WritePropertyName("storageAccountType"u8); - writer.WriteStringValue(StorageAccountType.Value.ToString()); - } - if (Optional.IsDefined(DiskEncryptionSet)) - { - writer.WritePropertyName("diskEncryptionSet"u8); - JsonSerializer.Serialize(writer, DiskEncryptionSet); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ImageDataDisk IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ImageDeprecationStatus.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ImageDeprecationStatus.Serialization.cs index 1c7c079217a9..8c11564ceb3d 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ImageDeprecationStatus.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ImageDeprecationStatus.Serialization.cs @@ -18,6 +18,15 @@ public partial class ImageDeprecationStatus : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(ImageDeprecationStatus)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ImageState)) { writer.WritePropertyName("imageState"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } ImageDeprecationStatus IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ImageDisk.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ImageDisk.Serialization.cs index 8d742e30b823..91b326f096ae 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ImageDisk.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ImageDisk.Serialization.cs @@ -19,6 +19,15 @@ public partial class ImageDisk : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions throw new FormatException($"The model {nameof(ImageDisk)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Snapshot)) { writer.WritePropertyName("snapshot"u8); @@ -77,7 +85,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions #endif } } - writer.WriteEndObject(); } ImageDisk IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ImageDiskReference.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ImageDiskReference.Serialization.cs index b62d78a3e2a2..d655984a9b25 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ImageDiskReference.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ImageDiskReference.Serialization.cs @@ -18,6 +18,15 @@ public partial class ImageDiskReference : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ImageDiskReference)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } ImageDiskReference IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ImageListResult.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ImageListResult.Serialization.cs index 36cb4bd904e2..50dbf9c7f3a6 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ImageListResult.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ImageListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ImageListResult : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(ImageListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO #endif } } - writer.WriteEndObject(); } ImageListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ImageOSDisk.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ImageOSDisk.Serialization.cs index 94b8b4f3cf7c..669670a46f2d 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ImageOSDisk.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ImageOSDisk.Serialization.cs @@ -19,6 +19,15 @@ public partial class ImageOSDisk : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,62 +35,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio throw new FormatException($"The model {nameof(ImageOSDisk)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("osType"u8); writer.WriteStringValue(OSType.ToSerialString()); writer.WritePropertyName("osState"u8); writer.WriteStringValue(OSState.ToSerialString()); - if (Optional.IsDefined(Snapshot)) - { - writer.WritePropertyName("snapshot"u8); - JsonSerializer.Serialize(writer, Snapshot); - } - if (Optional.IsDefined(ManagedDisk)) - { - writer.WritePropertyName("managedDisk"u8); - JsonSerializer.Serialize(writer, ManagedDisk); - } - if (Optional.IsDefined(BlobUri)) - { - writer.WritePropertyName("blobUri"u8); - writer.WriteStringValue(BlobUri.AbsoluteUri); - } - if (Optional.IsDefined(Caching)) - { - writer.WritePropertyName("caching"u8); - writer.WriteStringValue(Caching.Value.ToSerialString()); - } - if (Optional.IsDefined(DiskSizeGB)) - { - writer.WritePropertyName("diskSizeGB"u8); - writer.WriteNumberValue(DiskSizeGB.Value); - } - if (Optional.IsDefined(StorageAccountType)) - { - writer.WritePropertyName("storageAccountType"u8); - writer.WriteStringValue(StorageAccountType.Value.ToString()); - } - if (Optional.IsDefined(DiskEncryptionSet)) - { - writer.WritePropertyName("diskEncryptionSet"u8); - JsonSerializer.Serialize(writer, DiskEncryptionSet); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ImageOSDisk IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ImagePurchasePlan.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ImagePurchasePlan.Serialization.cs index 12e2a08b1a81..9d1dcd462fb0 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ImagePurchasePlan.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ImagePurchasePlan.Serialization.cs @@ -18,6 +18,15 @@ public partial class ImagePurchasePlan : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(ImagePurchasePlan)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } ImagePurchasePlan IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ImageReference.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ImageReference.Serialization.cs index 34d25b92a060..79988294508b 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ImageReference.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ImageReference.Serialization.cs @@ -18,6 +18,15 @@ public partial class ImageReference : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(ImageReference)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Publisher)) { writer.WritePropertyName("publisher"u8); @@ -61,27 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp writer.WritePropertyName("communityGalleryImageId"u8); writer.WriteStringValue(CommunityGalleryImageId); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ImageReference IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ImageStorageProfile.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ImageStorageProfile.Serialization.cs index cac4c247ee8c..cb2de021feb5 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ImageStorageProfile.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ImageStorageProfile.Serialization.cs @@ -18,6 +18,15 @@ public partial class ImageStorageProfile : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ImageStorageProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(OSDisk)) { writer.WritePropertyName("osDisk"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } ImageStorageProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ImageVersionSecurityProfile.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ImageVersionSecurityProfile.Serialization.cs index 00bd1d754b8e..0585aa3cfb6e 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ImageVersionSecurityProfile.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ImageVersionSecurityProfile.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ImageVersionSecurityProfile : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(ImageVersionSecurityProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(UefiSettings)) { writer.WritePropertyName("uefiSettings"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } ImageVersionSecurityProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/InnerError.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/InnerError.Serialization.cs index 5721bc625a8f..0d94237b5fd1 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/InnerError.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/InnerError.Serialization.cs @@ -18,6 +18,15 @@ public partial class InnerError : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOption throw new FormatException($"The model {nameof(InnerError)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Exceptiontype)) { writer.WritePropertyName("exceptiontype"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOption #endif } } - writer.WriteEndObject(); } InnerError IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/InstanceSku.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/InstanceSku.Serialization.cs index 06f973046519..d0303b268ca3 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/InstanceSku.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/InstanceSku.Serialization.cs @@ -18,6 +18,15 @@ public partial class InstanceSku : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio throw new FormatException($"The model {nameof(InstanceSku)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio #endif } } - writer.WriteEndObject(); } InstanceSku IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/InstanceViewStatus.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/InstanceViewStatus.Serialization.cs index 43a55f00e467..72efdaed689b 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/InstanceViewStatus.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/InstanceViewStatus.Serialization.cs @@ -18,6 +18,15 @@ public partial class InstanceViewStatus : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(InstanceViewStatus)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Code)) { writer.WritePropertyName("code"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } InstanceViewStatus IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/InstanceViewStatusesSummary.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/InstanceViewStatusesSummary.Serialization.cs index 0ad691f63188..128beb164b32 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/InstanceViewStatusesSummary.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/InstanceViewStatusesSummary.Serialization.cs @@ -18,6 +18,15 @@ internal partial class InstanceViewStatusesSummary : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(InstanceViewStatusesSummary)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(StatusesSummary)) { writer.WritePropertyName("statusesSummary"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } InstanceViewStatusesSummary IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/KeyForDiskEncryptionSet.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/KeyForDiskEncryptionSet.Serialization.cs index 4c3614b13e97..28ccbef94d9a 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/KeyForDiskEncryptionSet.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/KeyForDiskEncryptionSet.Serialization.cs @@ -19,6 +19,15 @@ public partial class KeyForDiskEncryptionSet : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(KeyForDiskEncryptionSet)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(SourceVault)) { writer.WritePropertyName("sourceVault"u8); @@ -49,7 +57,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } KeyForDiskEncryptionSet IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/KeyVaultAndKeyReference.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/KeyVaultAndKeyReference.Serialization.cs index a40ce317981a..cd574e82b263 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/KeyVaultAndKeyReference.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/KeyVaultAndKeyReference.Serialization.cs @@ -19,6 +19,15 @@ public partial class KeyVaultAndKeyReference : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(KeyVaultAndKeyReference)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("sourceVault"u8); JsonSerializer.Serialize(writer, SourceVault); writer.WritePropertyName("keyUrl"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } KeyVaultAndKeyReference IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/KeyVaultAndSecretReference.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/KeyVaultAndSecretReference.Serialization.cs index 3ad810596dea..d1a81853395d 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/KeyVaultAndSecretReference.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/KeyVaultAndSecretReference.Serialization.cs @@ -19,6 +19,15 @@ public partial class KeyVaultAndSecretReference : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(KeyVaultAndSecretReference)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("sourceVault"u8); JsonSerializer.Serialize(writer, SourceVault); writer.WritePropertyName("secretUrl"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } KeyVaultAndSecretReference IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/KeyVaultKeyReference.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/KeyVaultKeyReference.Serialization.cs index 1300c09e5dd4..699c8cc31847 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/KeyVaultKeyReference.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/KeyVaultKeyReference.Serialization.cs @@ -19,6 +19,15 @@ public partial class KeyVaultKeyReference : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(KeyVaultKeyReference)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("keyUrl"u8); writer.WriteStringValue(KeyUri.AbsoluteUri); writer.WritePropertyName("sourceVault"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } KeyVaultKeyReference IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/KeyVaultSecretReference.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/KeyVaultSecretReference.Serialization.cs index 04c20ef44089..27902cae3069 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/KeyVaultSecretReference.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/KeyVaultSecretReference.Serialization.cs @@ -21,6 +21,15 @@ public partial class KeyVaultSecretReference : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,7 +37,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(KeyVaultSecretReference)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("secretUrl"u8); writer.WriteStringValue(SecretUri.AbsoluteUri); writer.WritePropertyName("sourceVault"u8); @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } KeyVaultSecretReference IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/LastPatchInstallationSummary.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/LastPatchInstallationSummary.Serialization.cs index 8c5485ea3740..75f6350fd484 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/LastPatchInstallationSummary.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/LastPatchInstallationSummary.Serialization.cs @@ -18,6 +18,15 @@ public partial class LastPatchInstallationSummary : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(LastPatchInstallationSummary)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Status)) { writer.WritePropertyName("status"u8); @@ -96,7 +104,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } LastPatchInstallationSummary IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/LinuxConfiguration.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/LinuxConfiguration.Serialization.cs index fe5bcbe52930..69c80ef254b5 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/LinuxConfiguration.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/LinuxConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class LinuxConfiguration : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(LinuxConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IsPasswordAuthenticationDisabled)) { writer.WritePropertyName("disablePasswordAuthentication"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } LinuxConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/LinuxParameters.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/LinuxParameters.Serialization.cs index 8760a35bf522..5c67ad00e5eb 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/LinuxParameters.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/LinuxParameters.Serialization.cs @@ -18,6 +18,15 @@ public partial class LinuxParameters : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(LinuxParameters)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(ClassificationsToInclude)) { writer.WritePropertyName("classificationsToInclude"u8); @@ -76,7 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO #endif } } - writer.WriteEndObject(); } LinuxParameters IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/LinuxPatchSettings.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/LinuxPatchSettings.Serialization.cs index 34edb1bfcc53..1fbee42de0a9 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/LinuxPatchSettings.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/LinuxPatchSettings.Serialization.cs @@ -18,6 +18,15 @@ public partial class LinuxPatchSettings : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(LinuxPatchSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(PatchMode)) { writer.WritePropertyName("patchMode"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } LinuxPatchSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/LinuxVmGuestPatchAutomaticByPlatformSettings.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/LinuxVmGuestPatchAutomaticByPlatformSettings.Serialization.cs index 6162f35707cf..251c5c565288 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/LinuxVmGuestPatchAutomaticByPlatformSettings.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/LinuxVmGuestPatchAutomaticByPlatformSettings.Serialization.cs @@ -18,6 +18,15 @@ public partial class LinuxVmGuestPatchAutomaticByPlatformSettings : IUtf8JsonSer void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWrit throw new FormatException($"The model {nameof(LinuxVmGuestPatchAutomaticByPlatformSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(RebootSetting)) { writer.WritePropertyName("rebootSetting"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWrit #endif } } - writer.WriteEndObject(); } LinuxVmGuestPatchAutomaticByPlatformSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ListUsagesResult.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ListUsagesResult.Serialization.cs index 37f18d304342..3db95c04cf08 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ListUsagesResult.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ListUsagesResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ListUsagesResult : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(ListUsagesResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } ListUsagesResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/LoadBalancerFrontendIPConfiguration.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/LoadBalancerFrontendIPConfiguration.Serialization.cs index b86f11efce78..85822ef45e4f 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/LoadBalancerFrontendIPConfiguration.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/LoadBalancerFrontendIPConfiguration.Serialization.cs @@ -19,6 +19,15 @@ public partial class LoadBalancerFrontendIPConfiguration : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(LoadBalancerFrontendIPConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); writer.WritePropertyName("properties"u8); @@ -62,7 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } LoadBalancerFrontendIPConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/LogAnalytics.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/LogAnalytics.Serialization.cs index b827aa04147c..a2d8e7efdd8f 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/LogAnalytics.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/LogAnalytics.Serialization.cs @@ -18,6 +18,15 @@ public partial class LogAnalytics : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(LogAnalytics)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti #endif } } - writer.WriteEndObject(); } LogAnalytics IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/LogAnalyticsInputBase.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/LogAnalyticsInputBase.Serialization.cs index 674e60cbe8b0..1e3541ed5643 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/LogAnalyticsInputBase.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/LogAnalyticsInputBase.Serialization.cs @@ -18,6 +18,15 @@ public partial class LogAnalyticsInputBase : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(LogAnalyticsInputBase)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("blobContainerSasUri"u8); writer.WriteStringValue(BlobContainerSasUri.AbsoluteUri); writer.WritePropertyName("fromTime"u8); @@ -72,7 +80,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } LogAnalyticsInputBase IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/LogAnalyticsOutput.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/LogAnalyticsOutput.Serialization.cs index 649cb73d2aa4..403e33924d55 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/LogAnalyticsOutput.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/LogAnalyticsOutput.Serialization.cs @@ -18,6 +18,15 @@ internal partial class LogAnalyticsOutput : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(LogAnalyticsOutput)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Output)) { writer.WritePropertyName("output"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } LogAnalyticsOutput IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/MaintenanceRedeployStatus.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/MaintenanceRedeployStatus.Serialization.cs index 7313fa595d7c..98b0b7f8028f 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/MaintenanceRedeployStatus.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/MaintenanceRedeployStatus.Serialization.cs @@ -18,6 +18,15 @@ public partial class MaintenanceRedeployStatus : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(MaintenanceRedeployStatus)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IsCustomerInitiatedMaintenanceAllowed)) { writer.WritePropertyName("isCustomerInitiatedMaintenanceAllowed"u8); @@ -76,7 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } MaintenanceRedeployStatus IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ManagedDiskPatch.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ManagedDiskPatch.Serialization.cs index a0495a7b297b..046947ddd908 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ManagedDiskPatch.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ManagedDiskPatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class ManagedDiskPatch : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(ManagedDiskPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -160,7 +168,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } ManagedDiskPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/OSDiskImage.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/OSDiskImage.Serialization.cs index 5d60448e81b0..fddaad0c9e9e 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/OSDiskImage.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/OSDiskImage.Serialization.cs @@ -18,6 +18,15 @@ internal partial class OSDiskImage : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio throw new FormatException($"The model {nameof(OSDiskImage)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("operatingSystem"u8); writer.WriteStringValue(OperatingSystem.ToSerialString()); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio #endif } } - writer.WriteEndObject(); } OSDiskImage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/OSDiskImageEncryption.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/OSDiskImageEncryption.Serialization.cs index 5563880afb40..dbe9c54c1fbd 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/OSDiskImageEncryption.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/OSDiskImageEncryption.Serialization.cs @@ -18,6 +18,15 @@ public partial class OSDiskImageEncryption : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,33 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(OSDiskImageEncryption)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(SecurityProfile)) { writer.WritePropertyName("securityProfile"u8); writer.WriteObjectValue(SecurityProfile, options); } - if (Optional.IsDefined(DiskEncryptionSetId)) - { - writer.WritePropertyName("diskEncryptionSetId"u8); - writer.WriteStringValue(DiskEncryptionSetId); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } OSDiskImageEncryption IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/OSDiskImageSecurityProfile.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/OSDiskImageSecurityProfile.Serialization.cs index a912b174ffa8..b2cd767c04f0 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/OSDiskImageSecurityProfile.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/OSDiskImageSecurityProfile.Serialization.cs @@ -18,6 +18,15 @@ public partial class OSDiskImageSecurityProfile : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(OSDiskImageSecurityProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ConfidentialVmEncryptionType)) { writer.WritePropertyName("confidentialVMEncryptionType"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } OSDiskImageSecurityProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/OSFamilyListResult.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/OSFamilyListResult.Serialization.cs index 35055081a0a9..fddda48edc53 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/OSFamilyListResult.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/OSFamilyListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class OSFamilyListResult : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(OSFamilyListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } OSFamilyListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/OSImageNotificationProfile.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/OSImageNotificationProfile.Serialization.cs index cc8b8833aeb6..97e945e89c51 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/OSImageNotificationProfile.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/OSImageNotificationProfile.Serialization.cs @@ -18,6 +18,15 @@ public partial class OSImageNotificationProfile : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(OSImageNotificationProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(NotBeforeTimeout)) { writer.WritePropertyName("notBeforeTimeout"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } OSImageNotificationProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/OSProfileProvisioningData.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/OSProfileProvisioningData.Serialization.cs index 37501b9751d4..e085fd170462 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/OSProfileProvisioningData.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/OSProfileProvisioningData.Serialization.cs @@ -18,6 +18,15 @@ public partial class OSProfileProvisioningData : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(OSProfileProvisioningData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(AdminPassword)) { writer.WritePropertyName("adminPassword"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } OSProfileProvisioningData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/OSVersionListResult.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/OSVersionListResult.Serialization.cs index b0e61d850d29..ba2cef63ca9a 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/OSVersionListResult.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/OSVersionListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class OSVersionListResult : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(OSVersionListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } OSVersionListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/OSVersionPropertiesBase.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/OSVersionPropertiesBase.Serialization.cs index bcbd7dfb68c6..ac1874a84dc1 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/OSVersionPropertiesBase.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/OSVersionPropertiesBase.Serialization.cs @@ -18,6 +18,15 @@ public partial class OSVersionPropertiesBase : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(OSVersionPropertiesBase)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Version)) { writer.WritePropertyName("version"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } OSVersionPropertiesBase IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/OrchestrationServiceStateContent.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/OrchestrationServiceStateContent.Serialization.cs index 1152a3bf1f39..48275f2a83e9 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/OrchestrationServiceStateContent.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/OrchestrationServiceStateContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class OrchestrationServiceStateContent : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(OrchestrationServiceStateContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("serviceName"u8); writer.WriteStringValue(ServiceName.ToString()); writer.WritePropertyName("action"u8); @@ -45,7 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } OrchestrationServiceStateContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/OrchestrationServiceSummary.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/OrchestrationServiceSummary.Serialization.cs index b622f460b4a8..780a56ec13e0 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/OrchestrationServiceSummary.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/OrchestrationServiceSummary.Serialization.cs @@ -18,6 +18,15 @@ public partial class OrchestrationServiceSummary : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(OrchestrationServiceSummary)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ServiceName)) { writer.WritePropertyName("serviceName"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } OrchestrationServiceSummary IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/PatchInstallationDetail.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/PatchInstallationDetail.Serialization.cs index 80a9e979386e..190b0a862e33 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/PatchInstallationDetail.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/PatchInstallationDetail.Serialization.cs @@ -18,6 +18,15 @@ public partial class PatchInstallationDetail : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(PatchInstallationDetail)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(PatchId)) { writer.WritePropertyName("patchId"u8); @@ -76,7 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } PatchInstallationDetail IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/PatchSettings.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/PatchSettings.Serialization.cs index 7ce5312eecbe..3bf9d98b83f6 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/PatchSettings.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/PatchSettings.Serialization.cs @@ -18,6 +18,15 @@ public partial class PatchSettings : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt throw new FormatException($"The model {nameof(PatchSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(PatchMode)) { writer.WritePropertyName("patchMode"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt #endif } } - writer.WriteEndObject(); } PatchSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/PirCommunityGalleryResourceData.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/PirCommunityGalleryResourceData.Serialization.cs index 77d4c1a6793f..c3070f56d5f6 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/PirCommunityGalleryResourceData.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/PirCommunityGalleryResourceData.Serialization.cs @@ -18,6 +18,15 @@ public partial class PirCommunityGalleryResourceData : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(PirCommunityGalleryResourceData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -64,7 +72,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } PirCommunityGalleryResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/PirResourceData.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/PirResourceData.Serialization.cs index 77d544a2de16..a47a4570789e 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/PirResourceData.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/PirResourceData.Serialization.cs @@ -18,6 +18,15 @@ public partial class PirResourceData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(PirResourceData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO #endif } } - writer.WriteEndObject(); } PirResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/PirSharedGalleryResourceData.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/PirSharedGalleryResourceData.Serialization.cs index cc656aac2dd8..a44b42be30cf 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/PirSharedGalleryResourceData.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/PirSharedGalleryResourceData.Serialization.cs @@ -18,6 +18,15 @@ public partial class PirSharedGalleryResourceData : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,17 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(PirSharedGalleryResourceData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("identifier"u8); writer.WriteStartObject(); if (Optional.IsDefined(UniqueId)) @@ -44,22 +43,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model writer.WriteStringValue(UniqueId); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } PirSharedGalleryResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/PropertyUpdatesInProgress.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/PropertyUpdatesInProgress.Serialization.cs index 88771a4cbf35..7426d9a924ce 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/PropertyUpdatesInProgress.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/PropertyUpdatesInProgress.Serialization.cs @@ -18,6 +18,15 @@ internal partial class PropertyUpdatesInProgress : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(PropertyUpdatesInProgress)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(TargetTier)) { writer.WritePropertyName("targetTier"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } PropertyUpdatesInProgress IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ProximityPlacementGroupListResult.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ProximityPlacementGroupListResult.Serialization.cs index 86ec548c65e7..a9cf520c18b2 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ProximityPlacementGroupListResult.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ProximityPlacementGroupListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ProximityPlacementGroupListResult : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(ProximityPlacementGroupListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } ProximityPlacementGroupListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ProximityPlacementGroupPatch.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ProximityPlacementGroupPatch.Serialization.cs index 68557ca9d6a2..447a31d19c15 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ProximityPlacementGroupPatch.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ProximityPlacementGroupPatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class ProximityPlacementGroupPatch : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,34 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(ProximityPlacementGroupPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } ProximityPlacementGroupPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ProximityPlacementGroupPropertiesIntent.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ProximityPlacementGroupPropertiesIntent.Serialization.cs index 6c4c43fca184..ab708f11ca85 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ProximityPlacementGroupPropertiesIntent.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ProximityPlacementGroupPropertiesIntent.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ProximityPlacementGroupPropertiesIntent : IUtf8JsonSerial void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wr throw new FormatException($"The model {nameof(ProximityPlacementGroupPropertiesIntent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(VmSizes)) { writer.WritePropertyName("vmSizes"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter wr #endif } } - writer.WriteEndObject(); } ProximityPlacementGroupPropertiesIntent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ProxyAgentSettings.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ProxyAgentSettings.Serialization.cs index 3cc66d51750d..38c1ec30a90f 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ProxyAgentSettings.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ProxyAgentSettings.Serialization.cs @@ -18,6 +18,15 @@ public partial class ProxyAgentSettings : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ProxyAgentSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Enabled)) { writer.WritePropertyName("enabled"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } ProxyAgentSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/PurchasePlan.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/PurchasePlan.Serialization.cs index 7327718c1dfd..5cad6c573528 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/PurchasePlan.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/PurchasePlan.Serialization.cs @@ -18,6 +18,15 @@ public partial class PurchasePlan : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(PurchasePlan)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("publisher"u8); writer.WriteStringValue(Publisher); writer.WritePropertyName("name"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti #endif } } - writer.WriteEndObject(); } PurchasePlan IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RecommendedMachineConfiguration.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RecommendedMachineConfiguration.Serialization.cs index 4d6f2b8625de..be12bff47b74 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RecommendedMachineConfiguration.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RecommendedMachineConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class RecommendedMachineConfiguration : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(RecommendedMachineConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(VCpus)) { writer.WritePropertyName("vCPUs"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } RecommendedMachineConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RecoveryWalkResponse.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RecoveryWalkResponse.Serialization.cs index 635f99c4afed..e1ab6cf8ab76 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RecoveryWalkResponse.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RecoveryWalkResponse.Serialization.cs @@ -18,6 +18,15 @@ public partial class RecoveryWalkResponse : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(RecoveryWalkResponse)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(WalkPerformed)) { writer.WritePropertyName("walkPerformed"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } RecoveryWalkResponse IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RegionalReplicationStatus.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RegionalReplicationStatus.Serialization.cs index a43e4d9ee5fb..bed302a3aabc 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RegionalReplicationStatus.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RegionalReplicationStatus.Serialization.cs @@ -18,6 +18,15 @@ public partial class RegionalReplicationStatus : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(RegionalReplicationStatus)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Region)) { writer.WritePropertyName("region"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } RegionalReplicationStatus IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RegionalSharingStatus.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RegionalSharingStatus.Serialization.cs index 2fadcb76d998..3a9bae419941 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RegionalSharingStatus.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RegionalSharingStatus.Serialization.cs @@ -18,6 +18,15 @@ public partial class RegionalSharingStatus : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(RegionalSharingStatus)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Region)) { writer.WritePropertyName("region"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } RegionalSharingStatus IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ReplicationStatus.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ReplicationStatus.Serialization.cs index 59a09437d388..77b3c338d87f 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ReplicationStatus.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ReplicationStatus.Serialization.cs @@ -18,6 +18,15 @@ public partial class ReplicationStatus : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(ReplicationStatus)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(AggregatedState)) { writer.WritePropertyName("aggregatedState"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } ReplicationStatus IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RequestRateByIntervalContent.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RequestRateByIntervalContent.Serialization.cs index e5dc3ccf0c8e..216e782edff8 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RequestRateByIntervalContent.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RequestRateByIntervalContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class RequestRateByIntervalContent : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,56 +34,9 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(RequestRateByIntervalContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("intervalLength"u8); writer.WriteStringValue(IntervalLength.ToSerialString()); - writer.WritePropertyName("blobContainerSasUri"u8); - writer.WriteStringValue(BlobContainerSasUri.AbsoluteUri); - writer.WritePropertyName("fromTime"u8); - writer.WriteStringValue(FromTime, "O"); - writer.WritePropertyName("toTime"u8); - writer.WriteStringValue(ToTime, "O"); - if (Optional.IsDefined(GroupByThrottlePolicy)) - { - writer.WritePropertyName("groupByThrottlePolicy"u8); - writer.WriteBooleanValue(GroupByThrottlePolicy.Value); - } - if (Optional.IsDefined(GroupByOperationName)) - { - writer.WritePropertyName("groupByOperationName"u8); - writer.WriteBooleanValue(GroupByOperationName.Value); - } - if (Optional.IsDefined(GroupByResourceName)) - { - writer.WritePropertyName("groupByResourceName"u8); - writer.WriteBooleanValue(GroupByResourceName.Value); - } - if (Optional.IsDefined(GroupByClientApplicationId)) - { - writer.WritePropertyName("groupByClientApplicationId"u8); - writer.WriteBooleanValue(GroupByClientApplicationId.Value); - } - if (Optional.IsDefined(GroupByUserAgent)) - { - writer.WritePropertyName("groupByUserAgent"u8); - writer.WriteBooleanValue(GroupByUserAgent.Value); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } RequestRateByIntervalContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ResiliencyPolicy.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ResiliencyPolicy.Serialization.cs index 905fd1969baa..c48d8aca469e 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ResiliencyPolicy.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ResiliencyPolicy.Serialization.cs @@ -18,6 +18,15 @@ public partial class ResiliencyPolicy : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(ResiliencyPolicy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ResilientVmCreationPolicy)) { writer.WritePropertyName("resilientVMCreationPolicy"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } ResiliencyPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ResilientVmCreationPolicy.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ResilientVmCreationPolicy.Serialization.cs index d19b9e7e6f84..16a1c8d78054 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ResilientVmCreationPolicy.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ResilientVmCreationPolicy.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ResilientVmCreationPolicy : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(ResilientVmCreationPolicy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Enabled)) { writer.WritePropertyName("enabled"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } ResilientVmCreationPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ResilientVmDeletionPolicy.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ResilientVmDeletionPolicy.Serialization.cs index 41c57fdbfe41..5c56e02b4e66 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ResilientVmDeletionPolicy.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ResilientVmDeletionPolicy.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ResilientVmDeletionPolicy : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(ResilientVmDeletionPolicy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Enabled)) { writer.WritePropertyName("enabled"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } ResilientVmDeletionPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ResourceInstanceViewStatus.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ResourceInstanceViewStatus.Serialization.cs index eb504b89cd3f..e83641876392 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ResourceInstanceViewStatus.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ResourceInstanceViewStatus.Serialization.cs @@ -18,6 +18,15 @@ public partial class ResourceInstanceViewStatus : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(ResourceInstanceViewStatus)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Code)) { writer.WritePropertyName("code"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } ResourceInstanceViewStatus IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ResourceRange.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ResourceRange.Serialization.cs index b131cd622a26..b4ca547b6633 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ResourceRange.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ResourceRange.Serialization.cs @@ -18,6 +18,15 @@ public partial class ResourceRange : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt throw new FormatException($"The model {nameof(ResourceRange)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Min)) { writer.WritePropertyName("min"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt #endif } } - writer.WriteEndObject(); } ResourceRange IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ResourceSharingProfile.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ResourceSharingProfile.Serialization.cs index 82c8b3f52d91..a7cffe931565 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ResourceSharingProfile.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ResourceSharingProfile.Serialization.cs @@ -19,6 +19,15 @@ internal partial class ResourceSharingProfile : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(ResourceSharingProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(SubscriptionIds)) { writer.WritePropertyName("subscriptionIds"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } ResourceSharingProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ResourceSkuCosts.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ResourceSkuCosts.Serialization.cs index 8421ab7d3e8e..c538ac1e382b 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ResourceSkuCosts.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ResourceSkuCosts.Serialization.cs @@ -18,6 +18,15 @@ public partial class ResourceSkuCosts : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(ResourceSkuCosts)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(MeterId)) { writer.WritePropertyName("meterID"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } ResourceSkuCosts IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ResourceSkusResult.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ResourceSkusResult.Serialization.cs index 40d137751799..4fa1f0a4d733 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ResourceSkusResult.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ResourceSkusResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ResourceSkusResult : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ResourceSkusResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } ResourceSkusResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ResourceUriList.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ResourceUriList.Serialization.cs index 79ca52f557ae..027ecf2d6b51 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ResourceUriList.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ResourceUriList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ResourceUriList : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(ResourceUriList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO #endif } } - writer.WriteEndObject(); } ResourceUriList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RestorePointEncryption.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RestorePointEncryption.Serialization.cs index 73498aea2976..6fbcdbd89c64 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RestorePointEncryption.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RestorePointEncryption.Serialization.cs @@ -19,6 +19,15 @@ public partial class RestorePointEncryption : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(RestorePointEncryption)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(DiskEncryptionSet)) { writer.WritePropertyName("diskEncryptionSet"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } RestorePointEncryption IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RestorePointGroupListResult.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RestorePointGroupListResult.Serialization.cs index 2e9b68209d04..1285126ca1d0 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RestorePointGroupListResult.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RestorePointGroupListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class RestorePointGroupListResult : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(RestorePointGroupListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } RestorePointGroupListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RestorePointGroupPatch.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RestorePointGroupPatch.Serialization.cs index 53cf347f7ae7..abc57b5a9f15 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RestorePointGroupPatch.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RestorePointGroupPatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class RestorePointGroupPatch : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,18 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(RestorePointGroupPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Source)) @@ -65,22 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } RestorePointGroupPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RestorePointGroupSource.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RestorePointGroupSource.Serialization.cs index ea2f0932bcaf..c1021873fba3 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RestorePointGroupSource.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RestorePointGroupSource.Serialization.cs @@ -18,6 +18,15 @@ public partial class RestorePointGroupSource : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(RestorePointGroupSource)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Location)) { writer.WritePropertyName("location"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } RestorePointGroupSource IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RestorePointInstanceView.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RestorePointInstanceView.Serialization.cs index c9e3642bf28d..8a3d02243629 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RestorePointInstanceView.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RestorePointInstanceView.Serialization.cs @@ -18,6 +18,15 @@ public partial class RestorePointInstanceView : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(RestorePointInstanceView)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(DiskRestorePoints)) { writer.WritePropertyName("diskRestorePoints"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } RestorePointInstanceView IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RestorePointSourceMetadata.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RestorePointSourceMetadata.Serialization.cs index f4ea00ef0b4b..eb175e18aba2 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RestorePointSourceMetadata.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RestorePointSourceMetadata.Serialization.cs @@ -18,6 +18,15 @@ public partial class RestorePointSourceMetadata : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(RestorePointSourceMetadata)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(HardwareProfile)) { writer.WritePropertyName("hardwareProfile"u8); @@ -91,7 +99,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } RestorePointSourceMetadata IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RestorePointSourceVmDataDisk.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RestorePointSourceVmDataDisk.Serialization.cs index bc075431bbb9..7e4956f721e6 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RestorePointSourceVmDataDisk.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RestorePointSourceVmDataDisk.Serialization.cs @@ -18,6 +18,15 @@ public partial class RestorePointSourceVmDataDisk : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(RestorePointSourceVmDataDisk)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Lun)) { writer.WritePropertyName("lun"u8); @@ -76,7 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } RestorePointSourceVmDataDisk IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RestorePointSourceVmOSDisk.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RestorePointSourceVmOSDisk.Serialization.cs index a0bdd032a93b..21abb55e2258 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RestorePointSourceVmOSDisk.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RestorePointSourceVmOSDisk.Serialization.cs @@ -18,6 +18,15 @@ public partial class RestorePointSourceVmOSDisk : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(RestorePointSourceVmOSDisk)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(OSType)) { writer.WritePropertyName("osType"u8); @@ -81,7 +89,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } RestorePointSourceVmOSDisk IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RestorePointSourceVmStorageProfile.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RestorePointSourceVmStorageProfile.Serialization.cs index f3f7012631bd..106fbffb7efa 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RestorePointSourceVmStorageProfile.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RestorePointSourceVmStorageProfile.Serialization.cs @@ -18,6 +18,15 @@ public partial class RestorePointSourceVmStorageProfile : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(RestorePointSourceVmStorageProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(OSDisk)) { writer.WritePropertyName("osDisk"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } RestorePointSourceVmStorageProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RetrieveBootDiagnosticsDataResult.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RetrieveBootDiagnosticsDataResult.Serialization.cs index 1299090e5f29..6c4ac39c3017 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RetrieveBootDiagnosticsDataResult.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RetrieveBootDiagnosticsDataResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class RetrieveBootDiagnosticsDataResult : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(RetrieveBootDiagnosticsDataResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ConsoleScreenshotBlobUri)) { writer.WritePropertyName("consoleScreenshotBlobUri"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } RetrieveBootDiagnosticsDataResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RoleInstanceListResult.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RoleInstanceListResult.Serialization.cs index 4b57c7eca8e6..06361adcc2c5 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RoleInstanceListResult.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RoleInstanceListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class RoleInstanceListResult : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(RoleInstanceListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } RoleInstanceListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RoleInstanceNetworkProfile.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RoleInstanceNetworkProfile.Serialization.cs index b25c14557308..c0904d2e5313 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RoleInstanceNetworkProfile.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RoleInstanceNetworkProfile.Serialization.cs @@ -19,6 +19,15 @@ internal partial class RoleInstanceNetworkProfile : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(RoleInstanceNetworkProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(NetworkInterfaces)) { writer.WritePropertyName("networkInterfaces"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } RoleInstanceNetworkProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RoleInstanceView.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RoleInstanceView.Serialization.cs index 3b77146d9a0b..c8655232ce64 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RoleInstanceView.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RoleInstanceView.Serialization.cs @@ -18,6 +18,15 @@ public partial class RoleInstanceView : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(RoleInstanceView)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(PlatformUpdateDomain)) { writer.WritePropertyName("platformUpdateDomain"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } RoleInstanceView IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RoleInstances.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RoleInstances.Serialization.cs index a305c82e5365..0e8fc6ed61dc 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RoleInstances.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RoleInstances.Serialization.cs @@ -18,6 +18,15 @@ public partial class RoleInstances : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt throw new FormatException($"The model {nameof(RoleInstances)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("roleInstances"u8); writer.WriteStartArray(); foreach (var item in RoleInstancesValue) @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt #endif } } - writer.WriteEndObject(); } RoleInstances IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RollbackStatusInfo.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RollbackStatusInfo.Serialization.cs index b227d9065ead..d3fefece7d62 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RollbackStatusInfo.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RollbackStatusInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class RollbackStatusInfo : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(RollbackStatusInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(SuccessfullyRolledbackInstanceCount)) { writer.WritePropertyName("successfullyRolledbackInstanceCount"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } RollbackStatusInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RollingUpgradePolicy.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RollingUpgradePolicy.Serialization.cs index 0d3fcf6514ce..60050021557f 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RollingUpgradePolicy.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RollingUpgradePolicy.Serialization.cs @@ -18,6 +18,15 @@ public partial class RollingUpgradePolicy : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(RollingUpgradePolicy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(MaxBatchInstancePercent)) { writer.WritePropertyName("maxBatchInstancePercent"u8); @@ -81,7 +89,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } RollingUpgradePolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RollingUpgradeProgressInfo.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RollingUpgradeProgressInfo.Serialization.cs index b8d5a0069541..cf820579d280 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RollingUpgradeProgressInfo.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RollingUpgradeProgressInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class RollingUpgradeProgressInfo : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(RollingUpgradeProgressInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(SuccessfulInstanceCount)) { writer.WritePropertyName("successfulInstanceCount"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } RollingUpgradeProgressInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RollingUpgradeRunningStatus.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RollingUpgradeRunningStatus.Serialization.cs index 84c937e2f07d..639c868671aa 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RollingUpgradeRunningStatus.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RollingUpgradeRunningStatus.Serialization.cs @@ -18,6 +18,15 @@ public partial class RollingUpgradeRunningStatus : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(RollingUpgradeRunningStatus)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Code)) { writer.WritePropertyName("code"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } RollingUpgradeRunningStatus IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RunCommandDocument.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RunCommandDocument.Serialization.cs index 7250deab0d63..e710307dfcd8 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RunCommandDocument.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RunCommandDocument.Serialization.cs @@ -18,6 +18,15 @@ public partial class RunCommandDocument : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(RunCommandDocument)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("script"u8); writer.WriteStartArray(); foreach (var item in Script) @@ -43,32 +52,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - writer.WritePropertyName("$schema"u8); - writer.WriteStringValue(Schema); - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - writer.WritePropertyName("osType"u8); - writer.WriteStringValue(OSType.ToSerialString()); - writer.WritePropertyName("label"u8); - writer.WriteStringValue(Label); - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } RunCommandDocument IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RunCommandDocumentBase.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RunCommandDocumentBase.Serialization.cs index f627c18d50ee..9267f879998d 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RunCommandDocumentBase.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RunCommandDocumentBase.Serialization.cs @@ -18,6 +18,15 @@ public partial class RunCommandDocumentBase : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(RunCommandDocumentBase)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("$schema"u8); writer.WriteStringValue(Schema); writer.WritePropertyName("id"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } RunCommandDocumentBase IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RunCommandInput.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RunCommandInput.Serialization.cs index 3a8539746a15..85a75fce09af 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RunCommandInput.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RunCommandInput.Serialization.cs @@ -18,6 +18,15 @@ public partial class RunCommandInput : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(RunCommandInput)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("commandId"u8); writer.WriteStringValue(CommandId); if (Optional.IsCollectionDefined(Script)) @@ -63,7 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO #endif } } - writer.WriteEndObject(); } RunCommandInput IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RunCommandInputParameter.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RunCommandInputParameter.Serialization.cs index d4643222ed20..87fe7fdf227a 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RunCommandInputParameter.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RunCommandInputParameter.Serialization.cs @@ -18,6 +18,15 @@ public partial class RunCommandInputParameter : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(RunCommandInputParameter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); writer.WritePropertyName("value"u8); @@ -45,7 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } RunCommandInputParameter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RunCommandListResult.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RunCommandListResult.Serialization.cs index eb6b62aa4225..f0412c6f8047 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RunCommandListResult.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RunCommandListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class RunCommandListResult : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(RunCommandListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } RunCommandListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RunCommandManagedIdentity.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RunCommandManagedIdentity.Serialization.cs index fc68e331942a..b7bc58eb9a4d 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RunCommandManagedIdentity.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RunCommandManagedIdentity.Serialization.cs @@ -18,6 +18,15 @@ public partial class RunCommandManagedIdentity : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(RunCommandManagedIdentity)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ClientId)) { writer.WritePropertyName("clientId"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } RunCommandManagedIdentity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RunCommandParameterDefinition.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RunCommandParameterDefinition.Serialization.cs index 8cba5781b7af..776ec9826550 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RunCommandParameterDefinition.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RunCommandParameterDefinition.Serialization.cs @@ -18,6 +18,15 @@ public partial class RunCommandParameterDefinition : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(RunCommandParameterDefinition)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); writer.WritePropertyName("type"u8); @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } RunCommandParameterDefinition IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ScaleInPolicy.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ScaleInPolicy.Serialization.cs index 9bd265343bdb..48b505a186ac 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ScaleInPolicy.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ScaleInPolicy.Serialization.cs @@ -18,6 +18,15 @@ public partial class ScaleInPolicy : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt throw new FormatException($"The model {nameof(ScaleInPolicy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Rules)) { writer.WritePropertyName("rules"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt #endif } } - writer.WriteEndObject(); } ScaleInPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ScheduledEventsAdditionalPublishingTargets.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ScheduledEventsAdditionalPublishingTargets.Serialization.cs index a875fe116391..45a4962ca9ea 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ScheduledEventsAdditionalPublishingTargets.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ScheduledEventsAdditionalPublishingTargets.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ScheduledEventsAdditionalPublishingTargets : IUtf8JsonSer void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(ScheduledEventsAdditionalPublishingTargets)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(EventGridAndResourceGraph)) { writer.WritePropertyName("eventGridAndResourceGraph"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } ScheduledEventsAdditionalPublishingTargets IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ScheduledEventsPolicy.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ScheduledEventsPolicy.Serialization.cs index a6b52d1e3d18..d469ce9fe822 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ScheduledEventsPolicy.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ScheduledEventsPolicy.Serialization.cs @@ -18,6 +18,15 @@ public partial class ScheduledEventsPolicy : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(ScheduledEventsPolicy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(UserInitiatedRedeploy)) { writer.WritePropertyName("userInitiatedRedeploy"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } ScheduledEventsPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SecurityPostureReferenceUpdate.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SecurityPostureReferenceUpdate.Serialization.cs index c51262ccaf2e..97a1a43116e5 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SecurityPostureReferenceUpdate.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SecurityPostureReferenceUpdate.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityPostureReferenceUpdate : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(SecurityPostureReferenceUpdate)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } SecurityPostureReferenceUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SecurityProfile.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SecurityProfile.Serialization.cs index 6c4d9287890d..466ccb56bb9f 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SecurityProfile.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SecurityProfile.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityProfile : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(SecurityProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(UefiSettings)) { writer.WritePropertyName("uefiSettings"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO #endif } } - writer.WriteEndObject(); } SecurityProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ShareInfoElement.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ShareInfoElement.Serialization.cs index 0bef768ad35f..ce823f31c427 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ShareInfoElement.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ShareInfoElement.Serialization.cs @@ -18,6 +18,15 @@ public partial class ShareInfoElement : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(ShareInfoElement)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(VmUri)) { writer.WritePropertyName("vmUri"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } ShareInfoElement IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SharedGalleryDataDiskImage.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SharedGalleryDataDiskImage.Serialization.cs index 5c7cbacf84a1..a2ec06f249da 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SharedGalleryDataDiskImage.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SharedGalleryDataDiskImage.Serialization.cs @@ -18,6 +18,15 @@ public partial class SharedGalleryDataDiskImage : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,35 +34,9 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(SharedGalleryDataDiskImage)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("lun"u8); writer.WriteNumberValue(Lun); - if (options.Format != "W" && Optional.IsDefined(DiskSizeGB)) - { - writer.WritePropertyName("diskSizeGB"u8); - writer.WriteNumberValue(DiskSizeGB.Value); - } - if (Optional.IsDefined(HostCaching)) - { - writer.WritePropertyName("hostCaching"u8); - writer.WriteStringValue(HostCaching.Value.ToString()); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SharedGalleryDataDiskImage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SharedGalleryDiskImage.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SharedGalleryDiskImage.Serialization.cs index ce16b125bf8f..e84adc2796da 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SharedGalleryDiskImage.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SharedGalleryDiskImage.Serialization.cs @@ -18,6 +18,15 @@ public partial class SharedGalleryDiskImage : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(SharedGalleryDiskImage)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(DiskSizeGB)) { writer.WritePropertyName("diskSizeGB"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } SharedGalleryDiskImage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SharedGalleryImageList.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SharedGalleryImageList.Serialization.cs index 47361c7fc741..8a2d64caad7d 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SharedGalleryImageList.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SharedGalleryImageList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class SharedGalleryImageList : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(SharedGalleryImageList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } SharedGalleryImageList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SharedGalleryImageVersionList.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SharedGalleryImageVersionList.Serialization.cs index fae114d30aad..6447979856a6 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SharedGalleryImageVersionList.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SharedGalleryImageVersionList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class SharedGalleryImageVersionList : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(SharedGalleryImageVersionList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } SharedGalleryImageVersionList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SharedGalleryImageVersionStorageProfile.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SharedGalleryImageVersionStorageProfile.Serialization.cs index 27a53e7ac73b..163fd4047d98 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SharedGalleryImageVersionStorageProfile.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SharedGalleryImageVersionStorageProfile.Serialization.cs @@ -18,6 +18,15 @@ public partial class SharedGalleryImageVersionStorageProfile : IUtf8JsonSerializ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wr throw new FormatException($"The model {nameof(SharedGalleryImageVersionStorageProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(OSDiskImage)) { writer.WritePropertyName("osDiskImage"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter wr #endif } } - writer.WriteEndObject(); } SharedGalleryImageVersionStorageProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SharedGalleryList.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SharedGalleryList.Serialization.cs index 016a56c48399..62880e60399b 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SharedGalleryList.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SharedGalleryList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class SharedGalleryList : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(SharedGalleryList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } SharedGalleryList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SharedGalleryOSDiskImage.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SharedGalleryOSDiskImage.Serialization.cs index f36163669850..d9fdab57022f 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SharedGalleryOSDiskImage.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SharedGalleryOSDiskImage.Serialization.cs @@ -18,6 +18,15 @@ public partial class SharedGalleryOSDiskImage : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,33 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(SharedGalleryOSDiskImage)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W" && Optional.IsDefined(DiskSizeGB)) - { - writer.WritePropertyName("diskSizeGB"u8); - writer.WriteNumberValue(DiskSizeGB.Value); - } - if (Optional.IsDefined(HostCaching)) - { - writer.WritePropertyName("hostCaching"u8); - writer.WriteStringValue(HostCaching.Value.ToString()); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } SharedGalleryOSDiskImage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SharingProfile.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SharingProfile.Serialization.cs index 7105af8aae6e..819c04180248 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SharingProfile.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SharingProfile.Serialization.cs @@ -18,6 +18,15 @@ public partial class SharingProfile : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(SharingProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Permission)) { writer.WritePropertyName("permissions"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp #endif } } - writer.WriteEndObject(); } SharingProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SharingProfileGroup.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SharingProfileGroup.Serialization.cs index 51212712185f..0c40b4a920ac 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SharingProfileGroup.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SharingProfileGroup.Serialization.cs @@ -18,6 +18,15 @@ public partial class SharingProfileGroup : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(SharingProfileGroup)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(GroupType)) { writer.WritePropertyName("type"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } SharingProfileGroup IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SharingStatus.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SharingStatus.Serialization.cs index 3c381a612c6c..5f89f5c2c70e 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SharingStatus.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SharingStatus.Serialization.cs @@ -18,6 +18,15 @@ public partial class SharingStatus : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt throw new FormatException($"The model {nameof(SharingStatus)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(AggregatedState)) { writer.WritePropertyName("aggregatedState"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt #endif } } - writer.WriteEndObject(); } SharingStatus IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SharingUpdate.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SharingUpdate.Serialization.cs index 118a8e389828..ebd1e8fc6917 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SharingUpdate.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SharingUpdate.Serialization.cs @@ -18,6 +18,15 @@ public partial class SharingUpdate : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt throw new FormatException($"The model {nameof(SharingUpdate)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("operationType"u8); writer.WriteStringValue(OperationType.ToString()); if (Optional.IsCollectionDefined(Groups)) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt #endif } } - writer.WriteEndObject(); } SharingUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SnapshotList.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SnapshotList.Serialization.cs index 9084e5083026..c2528ee1accc 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SnapshotList.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SnapshotList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class SnapshotList : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(SnapshotList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti #endif } } - writer.WriteEndObject(); } SnapshotList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SnapshotPatch.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SnapshotPatch.Serialization.cs index 8822f8235565..2bc027234153 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SnapshotPatch.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SnapshotPatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class SnapshotPatch : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt throw new FormatException($"The model {nameof(SnapshotPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -110,7 +118,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt #endif } } - writer.WriteEndObject(); } SnapshotPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SnapshotSku.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SnapshotSku.Serialization.cs index 490132d4f93e..94d8b6d947d5 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SnapshotSku.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SnapshotSku.Serialization.cs @@ -18,6 +18,15 @@ public partial class SnapshotSku : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio throw new FormatException($"The model {nameof(SnapshotSku)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio #endif } } - writer.WriteEndObject(); } SnapshotSku IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SoftDeletePolicy.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SoftDeletePolicy.Serialization.cs index b2b8e4fec90a..0e95df6c49ab 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SoftDeletePolicy.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SoftDeletePolicy.Serialization.cs @@ -18,6 +18,15 @@ internal partial class SoftDeletePolicy : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(SoftDeletePolicy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IsSoftDeleteEnabled)) { writer.WritePropertyName("isSoftDeleteEnabled"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } SoftDeletePolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SpotRestorePolicy.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SpotRestorePolicy.Serialization.cs index 8bad8f74924b..905f69b0e892 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SpotRestorePolicy.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SpotRestorePolicy.Serialization.cs @@ -18,6 +18,15 @@ public partial class SpotRestorePolicy : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(SpotRestorePolicy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Enabled)) { writer.WritePropertyName("enabled"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } SpotRestorePolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SshConfiguration.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SshConfiguration.Serialization.cs index f88f48e1e65c..6d343d349721 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SshConfiguration.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SshConfiguration.Serialization.cs @@ -18,6 +18,15 @@ internal partial class SshConfiguration : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(SshConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(PublicKeys)) { writer.WritePropertyName("publicKeys"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } SshConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SshGenerateKeyPairInputContent.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SshGenerateKeyPairInputContent.Serialization.cs index 08791ab33daa..b0857755c086 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SshGenerateKeyPairInputContent.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SshGenerateKeyPairInputContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class SshGenerateKeyPairInputContent : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(SshGenerateKeyPairInputContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(EncryptionType)) { writer.WritePropertyName("encryptionType"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } SshGenerateKeyPairInputContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SshPublicKeyConfiguration.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SshPublicKeyConfiguration.Serialization.cs index bdfd5a1673cd..06af3ffea3e0 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SshPublicKeyConfiguration.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SshPublicKeyConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class SshPublicKeyConfiguration : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(SshPublicKeyConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Path)) { writer.WritePropertyName("path"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } SshPublicKeyConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SshPublicKeyGenerateKeyPairResult.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SshPublicKeyGenerateKeyPairResult.Serialization.cs index 13ce40228b70..2c2a769b1610 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SshPublicKeyGenerateKeyPairResult.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SshPublicKeyGenerateKeyPairResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class SshPublicKeyGenerateKeyPairResult : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(SshPublicKeyGenerateKeyPairResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("privateKey"u8); writer.WriteStringValue(PrivateKey); writer.WritePropertyName("publicKey"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } SshPublicKeyGenerateKeyPairResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SshPublicKeyPatch.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SshPublicKeyPatch.Serialization.cs index eab18a414d06..144f4e20beee 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SshPublicKeyPatch.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SshPublicKeyPatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class SshPublicKeyPatch : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,18 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(SshPublicKeyPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(PublicKey)) @@ -45,22 +43,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite writer.WriteStringValue(PublicKey); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SshPublicKeyPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SshPublicKeysGroupListResult.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SshPublicKeysGroupListResult.Serialization.cs index a6dc9206eb06..40bef0fcb39a 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SshPublicKeysGroupListResult.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SshPublicKeysGroupListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class SshPublicKeysGroupListResult : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(SshPublicKeysGroupListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } SshPublicKeysGroupListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/StatusCodeCount.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/StatusCodeCount.Serialization.cs index a9703f5ffee2..12db612a248b 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/StatusCodeCount.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/StatusCodeCount.Serialization.cs @@ -18,6 +18,15 @@ public partial class StatusCodeCount : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(StatusCodeCount)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Code)) { writer.WritePropertyName("code"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO #endif } } - writer.WriteEndObject(); } StatusCodeCount IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SupportedCapabilities.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SupportedCapabilities.Serialization.cs index 62a8882c81d8..8a44ac497a57 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SupportedCapabilities.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SupportedCapabilities.Serialization.cs @@ -18,6 +18,15 @@ public partial class SupportedCapabilities : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(SupportedCapabilities)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(DiskControllerTypes)) { writer.WritePropertyName("diskControllerTypes"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } SupportedCapabilities IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/TargetRegion.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/TargetRegion.Serialization.cs index cbe7032cd1f9..56a296db477a 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/TargetRegion.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/TargetRegion.Serialization.cs @@ -18,6 +18,15 @@ public partial class TargetRegion : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(TargetRegion)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); if (Optional.IsDefined(RegionalReplicaCount)) @@ -63,7 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti #endif } } - writer.WriteEndObject(); } TargetRegion IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/TerminateNotificationProfile.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/TerminateNotificationProfile.Serialization.cs index 747638892515..e99e0ed50c19 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/TerminateNotificationProfile.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/TerminateNotificationProfile.Serialization.cs @@ -18,6 +18,15 @@ public partial class TerminateNotificationProfile : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(TerminateNotificationProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(NotBeforeTimeout)) { writer.WritePropertyName("notBeforeTimeout"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } TerminateNotificationProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ThrottledRequestsContent.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ThrottledRequestsContent.Serialization.cs index 16d27c2a811b..171755324986 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ThrottledRequestsContent.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ThrottledRequestsContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class ThrottledRequestsContent : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,54 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(ThrottledRequestsContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("blobContainerSasUri"u8); - writer.WriteStringValue(BlobContainerSasUri.AbsoluteUri); - writer.WritePropertyName("fromTime"u8); - writer.WriteStringValue(FromTime, "O"); - writer.WritePropertyName("toTime"u8); - writer.WriteStringValue(ToTime, "O"); - if (Optional.IsDefined(GroupByThrottlePolicy)) - { - writer.WritePropertyName("groupByThrottlePolicy"u8); - writer.WriteBooleanValue(GroupByThrottlePolicy.Value); - } - if (Optional.IsDefined(GroupByOperationName)) - { - writer.WritePropertyName("groupByOperationName"u8); - writer.WriteBooleanValue(GroupByOperationName.Value); - } - if (Optional.IsDefined(GroupByResourceName)) - { - writer.WritePropertyName("groupByResourceName"u8); - writer.WriteBooleanValue(GroupByResourceName.Value); - } - if (Optional.IsDefined(GroupByClientApplicationId)) - { - writer.WritePropertyName("groupByClientApplicationId"u8); - writer.WriteBooleanValue(GroupByClientApplicationId.Value); - } - if (Optional.IsDefined(GroupByUserAgent)) - { - writer.WritePropertyName("groupByUserAgent"u8); - writer.WriteBooleanValue(GroupByUserAgent.Value); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } ThrottledRequestsContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/UefiKey.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/UefiKey.Serialization.cs index 2b19e5de56c2..45138b44d064 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/UefiKey.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/UefiKey.Serialization.cs @@ -18,6 +18,15 @@ public partial class UefiKey : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions o throw new FormatException($"The model {nameof(UefiKey)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(KeyType)) { writer.WritePropertyName("type"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions o #endif } } - writer.WriteEndObject(); } UefiKey IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/UefiKeySignatures.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/UefiKeySignatures.Serialization.cs index 2a0865859c5c..5e0907a4a82c 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/UefiKeySignatures.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/UefiKeySignatures.Serialization.cs @@ -18,6 +18,15 @@ public partial class UefiKeySignatures : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(UefiKeySignatures)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Pk)) { writer.WritePropertyName("pk"u8); @@ -76,7 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } UefiKeySignatures IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/UefiSettings.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/UefiSettings.Serialization.cs index 6157a514f359..585b510d79db 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/UefiSettings.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/UefiSettings.Serialization.cs @@ -18,6 +18,15 @@ public partial class UefiSettings : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(UefiSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IsSecureBootEnabled)) { writer.WritePropertyName("secureBootEnabled"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti #endif } } - writer.WriteEndObject(); } UefiSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/UpdateDomainIdentifier.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/UpdateDomainIdentifier.Serialization.cs index 04b956c6532a..9c2a1887d512 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/UpdateDomainIdentifier.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/UpdateDomainIdentifier.Serialization.cs @@ -18,6 +18,15 @@ public partial class UpdateDomainIdentifier : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(UpdateDomainIdentifier)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } UpdateDomainIdentifier IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/UpdateDomainListResult.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/UpdateDomainListResult.Serialization.cs index eb11f0e2afd4..ce5198fc65ef 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/UpdateDomainListResult.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/UpdateDomainListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class UpdateDomainListResult : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(UpdateDomainListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } UpdateDomainListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/UpgradeOperationHistoricalStatusInfo.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/UpgradeOperationHistoricalStatusInfo.Serialization.cs index 47e67641c297..02c5e0029c56 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/UpgradeOperationHistoricalStatusInfo.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/UpgradeOperationHistoricalStatusInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class UpgradeOperationHistoricalStatusInfo : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(UpgradeOperationHistoricalStatusInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } UpgradeOperationHistoricalStatusInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/UpgradeOperationHistoricalStatusInfoProperties.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/UpgradeOperationHistoricalStatusInfoProperties.Serialization.cs index 139e39265929..d48dad271189 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/UpgradeOperationHistoricalStatusInfoProperties.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/UpgradeOperationHistoricalStatusInfoProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class UpgradeOperationHistoricalStatusInfoProperties : IUtf8JsonS void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWr throw new FormatException($"The model {nameof(UpgradeOperationHistoricalStatusInfoProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(RunningStatus)) { writer.WritePropertyName("runningStatus"u8); @@ -71,7 +79,6 @@ void IJsonModel.Write(Utf8JsonWr #endif } } - writer.WriteEndObject(); } UpgradeOperationHistoricalStatusInfoProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/UpgradeOperationHistoryStatus.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/UpgradeOperationHistoryStatus.Serialization.cs index 227f1eefcfd1..e8a9a3d5aaa3 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/UpgradeOperationHistoryStatus.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/UpgradeOperationHistoryStatus.Serialization.cs @@ -18,6 +18,15 @@ public partial class UpgradeOperationHistoryStatus : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(UpgradeOperationHistoryStatus)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Code)) { writer.WritePropertyName("code"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } UpgradeOperationHistoryStatus IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/UserArtifactManagement.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/UserArtifactManagement.Serialization.cs index f31c1adf1e82..b4fcaa62268e 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/UserArtifactManagement.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/UserArtifactManagement.Serialization.cs @@ -18,6 +18,15 @@ public partial class UserArtifactManagement : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(UserArtifactManagement)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("install"u8); writer.WriteStringValue(Install); writer.WritePropertyName("remove"u8); @@ -50,7 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } UserArtifactManagement IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/UserArtifactSettings.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/UserArtifactSettings.Serialization.cs index 770f1bc0fd10..8a2daf5fb1fc 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/UserArtifactSettings.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/UserArtifactSettings.Serialization.cs @@ -18,6 +18,15 @@ public partial class UserArtifactSettings : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(UserArtifactSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(PackageFileName)) { writer.WritePropertyName("packageFileName"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } UserArtifactSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/UserArtifactSource.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/UserArtifactSource.Serialization.cs index 900629d35741..67eb9fc31528 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/UserArtifactSource.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/UserArtifactSource.Serialization.cs @@ -18,6 +18,15 @@ public partial class UserArtifactSource : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(UserArtifactSource)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("mediaLink"u8); writer.WriteStringValue(MediaLink); if (Optional.IsDefined(DefaultConfigurationLink)) @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } UserArtifactSource IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/UserInitiatedReboot.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/UserInitiatedReboot.Serialization.cs index 10ba2b43e9e0..0de36ecdc8a7 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/UserInitiatedReboot.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/UserInitiatedReboot.Serialization.cs @@ -18,6 +18,15 @@ internal partial class UserInitiatedReboot : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(UserInitiatedReboot)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(AutomaticallyApprove)) { writer.WritePropertyName("automaticallyApprove"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } UserInitiatedReboot IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/UserInitiatedRedeploy.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/UserInitiatedRedeploy.Serialization.cs index 464d222bb856..4117c5f838a4 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/UserInitiatedRedeploy.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/UserInitiatedRedeploy.Serialization.cs @@ -18,6 +18,15 @@ public partial class UserInitiatedRedeploy : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(UserInitiatedRedeploy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(AutomaticallyApprove)) { writer.WritePropertyName("automaticallyApprove"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } UserInitiatedRedeploy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VaultCertificate.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VaultCertificate.Serialization.cs index 19585a2e9360..dff4473695a0 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VaultCertificate.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VaultCertificate.Serialization.cs @@ -18,6 +18,15 @@ public partial class VaultCertificate : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(VaultCertificate)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(CertificateUri)) { writer.WritePropertyName("certificateUrl"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } VaultCertificate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VaultSecretGroup.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VaultSecretGroup.Serialization.cs index c4952a1bd6b4..21e42c5ea03e 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VaultSecretGroup.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VaultSecretGroup.Serialization.cs @@ -19,6 +19,15 @@ public partial class VaultSecretGroup : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(VaultSecretGroup)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(SourceVault)) { writer.WritePropertyName("sourceVault"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } VaultSecretGroup IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualHardDisk.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualHardDisk.Serialization.cs index e0e5cd4c8cf9..f4ab4dbcea97 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualHardDisk.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualHardDisk.Serialization.cs @@ -18,6 +18,15 @@ internal partial class VirtualHardDisk : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(VirtualHardDisk)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Uri)) { writer.WritePropertyName("uri"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO #endif } } - writer.WriteEndObject(); } VirtualHardDisk IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineAgentInstanceView.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineAgentInstanceView.Serialization.cs index 896cd2a98200..0ec966bd8d6b 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineAgentInstanceView.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineAgentInstanceView.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualMachineAgentInstanceView : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(VirtualMachineAgentInstanceView)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(VmAgentVersion)) { writer.WritePropertyName("vmAgentVersion"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } VirtualMachineAgentInstanceView IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineAssessPatchesResult.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineAssessPatchesResult.Serialization.cs index 9d8bc32578b1..c07c41f9cae4 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineAssessPatchesResult.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineAssessPatchesResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualMachineAssessPatchesResult : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(VirtualMachineAssessPatchesResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Status)) { writer.WritePropertyName("status"u8); @@ -86,7 +94,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } VirtualMachineAssessPatchesResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineCaptureContent.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineCaptureContent.Serialization.cs index 605af218eb96..0e3e4eac36c3 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineCaptureContent.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineCaptureContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualMachineCaptureContent : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(VirtualMachineCaptureContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("vhdPrefix"u8); writer.WriteStringValue(VhdPrefix); writer.WritePropertyName("destinationContainerName"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } VirtualMachineCaptureContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineCaptureResult.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineCaptureResult.Serialization.cs index 2da313c943d2..c420386a8d1b 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineCaptureResult.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineCaptureResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualMachineCaptureResult : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(VirtualMachineCaptureResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(Schema)) { writer.WritePropertyName("$schema"u8); @@ -70,27 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR } writer.WriteEndArray(); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } VirtualMachineCaptureResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineDataDisk.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineDataDisk.Serialization.cs index 91935829f96c..53923684991e 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineDataDisk.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineDataDisk.Serialization.cs @@ -19,6 +19,15 @@ public partial class VirtualMachineDataDisk : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(VirtualMachineDataDisk)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("lun"u8); writer.WriteNumberValue(Lun); if (Optional.IsDefined(Name)) @@ -111,7 +119,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } VirtualMachineDataDisk IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineDiskSecurityProfile.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineDiskSecurityProfile.Serialization.cs index 3960e21f0ab7..fb133d2064ff 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineDiskSecurityProfile.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineDiskSecurityProfile.Serialization.cs @@ -19,6 +19,15 @@ public partial class VirtualMachineDiskSecurityProfile : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(VirtualMachineDiskSecurityProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(SecurityEncryptionType)) { writer.WritePropertyName("securityEncryptionType"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } VirtualMachineDiskSecurityProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineExtensionHandlerInstanceView.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineExtensionHandlerInstanceView.Serialization.cs index 4b6fa821c1b8..4aaf86b8d1e4 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineExtensionHandlerInstanceView.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineExtensionHandlerInstanceView.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualMachineExtensionHandlerInstanceView : IUtf8JsonSeria void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(VirtualMachineExtensionHandlerInstanceView)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(VirtualMachineExtensionHandlerInstanceViewType)) { writer.WritePropertyName("type"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } VirtualMachineExtensionHandlerInstanceView IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineExtensionInstanceView.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineExtensionInstanceView.Serialization.cs index 16dec4f5fa2b..a7bb37ad456a 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineExtensionInstanceView.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineExtensionInstanceView.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualMachineExtensionInstanceView : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(VirtualMachineExtensionInstanceView)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -76,7 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } VirtualMachineExtensionInstanceView IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineExtensionPatch.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineExtensionPatch.Serialization.cs index f9431d4cdeff..8c7be0a6577e 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineExtensionPatch.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineExtensionPatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualMachineExtensionPatch : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,18 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(VirtualMachineExtensionPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(ForceUpdateTag)) @@ -104,22 +102,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model writer.WriteObjectValue(KeyVaultProtectedSettings, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } VirtualMachineExtensionPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineExtensionsListResult.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineExtensionsListResult.Serialization.cs index c0ea525fd188..2ea27ce90dd9 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineExtensionsListResult.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineExtensionsListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class VirtualMachineExtensionsListResult : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(VirtualMachineExtensionsListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } VirtualMachineExtensionsListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineGalleryApplication.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineGalleryApplication.Serialization.cs index 3539ecf2c1db..bcf488b0fb9d 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineGalleryApplication.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineGalleryApplication.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualMachineGalleryApplication : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(VirtualMachineGalleryApplication)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -68,7 +76,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } VirtualMachineGalleryApplication IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineHardwareProfile.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineHardwareProfile.Serialization.cs index c47869a005b0..b18db01bd9dd 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineHardwareProfile.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineHardwareProfile.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualMachineHardwareProfile : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(VirtualMachineHardwareProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(VmSize)) { writer.WritePropertyName("vmSize"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } VirtualMachineHardwareProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineHealthStatus.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineHealthStatus.Serialization.cs index 72b66995bcd4..dc6ab90d3085 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineHealthStatus.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineHealthStatus.Serialization.cs @@ -18,6 +18,15 @@ internal partial class VirtualMachineHealthStatus : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(VirtualMachineHealthStatus)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Status)) { writer.WritePropertyName("status"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } VirtualMachineHealthStatus IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineIPTag.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineIPTag.Serialization.cs index 82808da51021..f78ce2a600e6 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineIPTag.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineIPTag.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualMachineIPTag : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(VirtualMachineIPTag)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IPTagType)) { writer.WritePropertyName("ipTagType"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } VirtualMachineIPTag IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineImage.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineImage.Serialization.cs index 62534654eed2..404993db3001 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineImage.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineImage.Serialization.cs @@ -19,6 +19,15 @@ public partial class VirtualMachineImage : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,32 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(VirtualMachineImage)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsDefined(ExtendedLocation)) - { - writer.WritePropertyName("extendedLocation"u8); - JsonSerializer.Serialize(writer, ExtendedLocation); - } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Plan)) @@ -110,22 +94,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri writer.WriteObjectValue(ImageDeprecationStatus, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } VirtualMachineImage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineImageBase.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineImageBase.Serialization.cs index 4fcd8bfc0b2e..126b350b0d77 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineImageBase.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineImageBase.Serialization.cs @@ -19,6 +19,15 @@ public partial class VirtualMachineImageBase : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(VirtualMachineImageBase)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); writer.WritePropertyName("location"u8); @@ -47,27 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade writer.WritePropertyName("extendedLocation"u8); JsonSerializer.Serialize(writer, ExtendedLocation); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } VirtualMachineImageBase IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineImageFeature.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineImageFeature.Serialization.cs index 56ee91bad3f6..9f01fae031bc 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineImageFeature.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineImageFeature.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualMachineImageFeature : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(VirtualMachineImageFeature)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } VirtualMachineImageFeature IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineInstallPatchesContent.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineInstallPatchesContent.Serialization.cs index 36715e8586e7..f0c883d48e22 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineInstallPatchesContent.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineInstallPatchesContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualMachineInstallPatchesContent : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(VirtualMachineInstallPatchesContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(MaximumDuration)) { writer.WritePropertyName("maximumDuration"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } VirtualMachineInstallPatchesContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineInstallPatchesResult.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineInstallPatchesResult.Serialization.cs index c8fb5d0a2958..a67d7280e2fd 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineInstallPatchesResult.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineInstallPatchesResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualMachineInstallPatchesResult : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(VirtualMachineInstallPatchesResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Status)) { writer.WritePropertyName("status"u8); @@ -106,7 +114,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } VirtualMachineInstallPatchesResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineInstanceView.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineInstanceView.Serialization.cs index e3d74308338f..90afd15f4588 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineInstanceView.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineInstanceView.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualMachineInstanceView : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(VirtualMachineInstanceView)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(PlatformUpdateDomain)) { writer.WritePropertyName("platformUpdateDomain"u8); @@ -141,7 +149,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } VirtualMachineInstanceView IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineListResult.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineListResult.Serialization.cs index 2aff37318301..38f493a6de8d 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineListResult.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class VirtualMachineListResult : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(VirtualMachineListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } VirtualMachineListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineManagedDisk.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineManagedDisk.Serialization.cs index 6730b9238abc..04820921ea70 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineManagedDisk.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineManagedDisk.Serialization.cs @@ -19,6 +19,15 @@ public partial class VirtualMachineManagedDisk : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(VirtualMachineManagedDisk)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(StorageAccountType)) { writer.WritePropertyName("storageAccountType"u8); @@ -42,27 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea writer.WritePropertyName("securityProfile"u8); writer.WriteObjectValue(SecurityProfile, options); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } VirtualMachineManagedDisk IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineNetworkInterfaceConfiguration.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineNetworkInterfaceConfiguration.Serialization.cs index 4e426e71447d..a05e0a73051b 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineNetworkInterfaceConfiguration.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineNetworkInterfaceConfiguration.Serialization.cs @@ -19,6 +19,15 @@ public partial class VirtualMachineNetworkInterfaceConfiguration : IUtf8JsonSeri void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWrite throw new FormatException($"The model {nameof(VirtualMachineNetworkInterfaceConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); writer.WritePropertyName("properties"u8); @@ -112,7 +120,6 @@ void IJsonModel.Write(Utf8JsonWrite #endif } } - writer.WriteEndObject(); } VirtualMachineNetworkInterfaceConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineNetworkInterfaceDnsSettingsConfiguration.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineNetworkInterfaceDnsSettingsConfiguration.Serialization.cs index fad815b90988..f7e75e38bb9e 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineNetworkInterfaceDnsSettingsConfiguration.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineNetworkInterfaceDnsSettingsConfiguration.Serialization.cs @@ -18,6 +18,15 @@ internal partial class VirtualMachineNetworkInterfaceDnsSettingsConfiguration : void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Ut throw new FormatException($"The model {nameof(VirtualMachineNetworkInterfaceDnsSettingsConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(DnsServers)) { writer.WritePropertyName("dnsServers"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Ut #endif } } - writer.WriteEndObject(); } VirtualMachineNetworkInterfaceDnsSettingsConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineNetworkInterfaceIPConfiguration.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineNetworkInterfaceIPConfiguration.Serialization.cs index e014212585e0..107789d922e3 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineNetworkInterfaceIPConfiguration.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineNetworkInterfaceIPConfiguration.Serialization.cs @@ -19,6 +19,15 @@ public partial class VirtualMachineNetworkInterfaceIPConfiguration : IUtf8JsonSe void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWri throw new FormatException($"The model {nameof(VirtualMachineNetworkInterfaceIPConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); writer.WritePropertyName("properties"u8); @@ -97,7 +105,6 @@ void IJsonModel.Write(Utf8JsonWri #endif } } - writer.WriteEndObject(); } VirtualMachineNetworkInterfaceIPConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineNetworkInterfaceReference.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineNetworkInterfaceReference.Serialization.cs index 90395fec92ae..8c52150e905a 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineNetworkInterfaceReference.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineNetworkInterfaceReference.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualMachineNetworkInterfaceReference : IUtf8JsonSerializ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,12 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter wr throw new FormatException($"The model {nameof(VirtualMachineNetworkInterfaceReference)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Primary)) @@ -44,22 +48,6 @@ void IJsonModel.Write(Utf8JsonWriter wr writer.WriteStringValue(DeleteOption.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } VirtualMachineNetworkInterfaceReference IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineNetworkProfile.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineNetworkProfile.Serialization.cs index 4af5f0ee8b9f..aa7119232931 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineNetworkProfile.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineNetworkProfile.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualMachineNetworkProfile : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(VirtualMachineNetworkProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(NetworkInterfaces)) { writer.WritePropertyName("networkInterfaces"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } VirtualMachineNetworkProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineOSDisk.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineOSDisk.Serialization.cs index d97433ece51c..90667f03426c 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineOSDisk.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineOSDisk.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualMachineOSDisk : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(VirtualMachineOSDisk)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(OSType)) { writer.WritePropertyName("osType"u8); @@ -98,7 +106,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } VirtualMachineOSDisk IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineOSProfile.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineOSProfile.Serialization.cs index 52c2a5ffb2e3..0b7e5fbfb9ec 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineOSProfile.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineOSProfile.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualMachineOSProfile : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(VirtualMachineOSProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ComputerName)) { writer.WritePropertyName("computerName"u8); @@ -91,7 +99,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } VirtualMachineOSProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachinePatch.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachinePatch.Serialization.cs index 28fb382540d9..61ac9b7dcd1b 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachinePatch.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachinePatch.Serialization.cs @@ -20,6 +20,15 @@ public partial class VirtualMachinePatch : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(VirtualMachinePatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Plan)) { writer.WritePropertyName("plan"u8); @@ -48,17 +57,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri } writer.WriteEndArray(); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(HardwareProfile)) @@ -197,22 +195,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri writer.WriteStringValue(TimeCreated.Value, "O"); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } VirtualMachinePatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachinePatchStatus.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachinePatchStatus.Serialization.cs index 3b7dc6e6e9e2..c3b5ffd0bc66 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachinePatchStatus.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachinePatchStatus.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualMachinePatchStatus : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(VirtualMachinePatchStatus)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(AvailablePatchSummary)) { writer.WritePropertyName("availablePatchSummary"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } VirtualMachinePatchStatus IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachinePublicIPAddressConfiguration.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachinePublicIPAddressConfiguration.Serialization.cs index 731f5a39321b..ad1bd84d7d0c 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachinePublicIPAddressConfiguration.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachinePublicIPAddressConfiguration.Serialization.cs @@ -19,6 +19,15 @@ public partial class VirtualMachinePublicIPAddressConfiguration : IUtf8JsonSeria void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(VirtualMachinePublicIPAddressConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); if (Optional.IsDefined(Sku)) @@ -92,7 +100,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } VirtualMachinePublicIPAddressConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachinePublicIPAddressDnsSettingsConfiguration.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachinePublicIPAddressDnsSettingsConfiguration.Serialization.cs index db0035b6bb21..f43bdc0ae6e0 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachinePublicIPAddressDnsSettingsConfiguration.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachinePublicIPAddressDnsSettingsConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualMachinePublicIPAddressDnsSettingsConfiguration : IUt void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf throw new FormatException($"The model {nameof(VirtualMachinePublicIPAddressDnsSettingsConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("domainNameLabel"u8); writer.WriteStringValue(DomainNameLabel); if (Optional.IsDefined(DomainNameLabelScope)) @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf #endif } } - writer.WriteEndObject(); } VirtualMachinePublicIPAddressDnsSettingsConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineReimageContent.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineReimageContent.Serialization.cs index 35b30cfe6583..5803c15fa90c 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineReimageContent.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineReimageContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualMachineReimageContent : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(VirtualMachineReimageContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(TempDisk)) { writer.WritePropertyName("tempDisk"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } VirtualMachineReimageContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineRunCommandInstanceView.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineRunCommandInstanceView.Serialization.cs index ffdbbfa45fdc..865e2e7e0e5a 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineRunCommandInstanceView.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineRunCommandInstanceView.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualMachineRunCommandInstanceView : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(VirtualMachineRunCommandInstanceView)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ExecutionState)) { writer.WritePropertyName("executionState"u8); @@ -86,7 +94,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } VirtualMachineRunCommandInstanceView IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineRunCommandResult.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineRunCommandResult.Serialization.cs index 889d326c7f01..302f0576df18 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineRunCommandResult.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineRunCommandResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualMachineRunCommandResult : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(VirtualMachineRunCommandResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } VirtualMachineRunCommandResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineRunCommandScriptSource.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineRunCommandScriptSource.Serialization.cs index 9836529cd377..4241e0f874c6 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineRunCommandScriptSource.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineRunCommandScriptSource.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualMachineRunCommandScriptSource : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(VirtualMachineRunCommandScriptSource)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Script)) { writer.WritePropertyName("script"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } VirtualMachineRunCommandScriptSource IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineRunCommandUpdate.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineRunCommandUpdate.Serialization.cs index 55052ced78c1..3d453987c7da 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineRunCommandUpdate.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineRunCommandUpdate.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualMachineRunCommandUpdate : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,18 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(VirtualMachineRunCommandUpdate)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Source)) @@ -120,22 +118,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod writer.WriteBooleanValue(TreatFailureAsDeploymentFailure.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } VirtualMachineRunCommandUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineRunCommandsListResult.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineRunCommandsListResult.Serialization.cs index 287a91f33b4c..1f1d063f69cf 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineRunCommandsListResult.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineRunCommandsListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class VirtualMachineRunCommandsListResult : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(VirtualMachineRunCommandsListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } VirtualMachineRunCommandsListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetConvertToSinglePlacementGroupContent.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetConvertToSinglePlacementGroupContent.Serialization.cs index ebe02d07f253..2e82e5b392fe 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetConvertToSinglePlacementGroupContent.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetConvertToSinglePlacementGroupContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualMachineScaleSetConvertToSinglePlacementGroupContent void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Writ throw new FormatException($"The model {nameof(VirtualMachineScaleSetConvertToSinglePlacementGroupContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ActivePlacementGroupId)) { writer.WritePropertyName("activePlacementGroupId"u8); @@ -46,7 +54,6 @@ void IJsonModel.Writ #endif } } - writer.WriteEndObject(); } VirtualMachineScaleSetConvertToSinglePlacementGroupContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetDataDisk.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetDataDisk.Serialization.cs index 4093863de116..ec1ac0d33278 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetDataDisk.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetDataDisk.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualMachineScaleSetDataDisk : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(VirtualMachineScaleSetDataDisk)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -85,7 +93,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } VirtualMachineScaleSetDataDisk IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetExtensionListResult.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetExtensionListResult.Serialization.cs index 1441ccf8cd23..bfeb5f4be832 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetExtensionListResult.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetExtensionListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class VirtualMachineScaleSetExtensionListResult : IUtf8JsonSeri void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(VirtualMachineScaleSetExtensionListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } VirtualMachineScaleSetExtensionListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetExtensionPatch.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetExtensionPatch.Serialization.cs index 03dd0711b9a1..0c79f03285e8 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetExtensionPatch.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetExtensionPatch.Serialization.cs @@ -19,6 +19,15 @@ public partial class VirtualMachineScaleSetExtensionPatch : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(VirtualMachineScaleSetExtensionPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(ForceUpdateTag)) @@ -129,22 +118,6 @@ void IJsonModel.Write(Utf8JsonWriter write writer.WriteObjectValue(KeyVaultProtectedSettings, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } VirtualMachineScaleSetExtensionPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetExtensionProfile.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetExtensionProfile.Serialization.cs index c943528b327b..85667767e6f9 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetExtensionProfile.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetExtensionProfile.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualMachineScaleSetExtensionProfile : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(VirtualMachineScaleSetExtensionProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Extensions)) { writer.WritePropertyName("extensions"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } VirtualMachineScaleSetExtensionProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetHardwareProfile.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetHardwareProfile.Serialization.cs index 3ef67d625dc2..cde1425704b4 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetHardwareProfile.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetHardwareProfile.Serialization.cs @@ -18,6 +18,15 @@ internal partial class VirtualMachineScaleSetHardwareProfile : IUtf8JsonSerializ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(VirtualMachineScaleSetHardwareProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(VmSizeProperties)) { writer.WritePropertyName("vmSizeProperties"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } VirtualMachineScaleSetHardwareProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetIPConfiguration.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetIPConfiguration.Serialization.cs index 46a83d73bbeb..407c6c1ac3a0 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetIPConfiguration.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetIPConfiguration.Serialization.cs @@ -19,6 +19,15 @@ public partial class VirtualMachineScaleSetIPConfiguration : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,14 +35,9 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(VirtualMachineScaleSetIPConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Subnet)) @@ -97,22 +101,6 @@ void IJsonModel.Write(Utf8JsonWriter writ writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } VirtualMachineScaleSetIPConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetIPTag.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetIPTag.Serialization.cs index 3dca72e5a3a6..79d4e76ce5df 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetIPTag.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetIPTag.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualMachineScaleSetIPTag : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(VirtualMachineScaleSetIPTag)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IPTagType)) { writer.WritePropertyName("ipTagType"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } VirtualMachineScaleSetIPTag IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetInstanceView.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetInstanceView.Serialization.cs index 576fbc17da81..b307028f1ffe 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetInstanceView.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetInstanceView.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualMachineScaleSetInstanceView : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(VirtualMachineScaleSetInstanceView)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(VirtualMachine)) { writer.WritePropertyName("virtualMachine"u8); @@ -76,7 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } VirtualMachineScaleSetInstanceView IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetInstanceViewStatusesSummary.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetInstanceViewStatusesSummary.Serialization.cs index ae46bac7cc8d..ec54d24891e4 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetInstanceViewStatusesSummary.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetInstanceViewStatusesSummary.Serialization.cs @@ -18,6 +18,15 @@ internal partial class VirtualMachineScaleSetInstanceViewStatusesSummary : IUtf8 void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8Jso throw new FormatException($"The model {nameof(VirtualMachineScaleSetInstanceViewStatusesSummary)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(StatusesSummary)) { writer.WritePropertyName("statusesSummary"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8Jso #endif } } - writer.WriteEndObject(); } VirtualMachineScaleSetInstanceViewStatusesSummary IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetListOSUpgradeHistory.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetListOSUpgradeHistory.Serialization.cs index 1a4cc757e6f3..13ca65b6af7d 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetListOSUpgradeHistory.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetListOSUpgradeHistory.Serialization.cs @@ -18,6 +18,15 @@ internal partial class VirtualMachineScaleSetListOSUpgradeHistory : IUtf8JsonSer void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(VirtualMachineScaleSetListOSUpgradeHistory)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } VirtualMachineScaleSetListOSUpgradeHistory IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetListResult.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetListResult.Serialization.cs index 171fe75e61fc..5964f5af5460 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetListResult.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class VirtualMachineScaleSetListResult : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(VirtualMachineScaleSetListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } VirtualMachineScaleSetListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetListSkusResult.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetListSkusResult.Serialization.cs index 23811cde6939..ca1707662ee6 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetListSkusResult.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetListSkusResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class VirtualMachineScaleSetListSkusResult : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(VirtualMachineScaleSetListSkusResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } VirtualMachineScaleSetListSkusResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetListWithLinkResult.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetListWithLinkResult.Serialization.cs index 64f05c79149a..4b1edd332aa5 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetListWithLinkResult.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetListWithLinkResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class VirtualMachineScaleSetListWithLinkResult : IUtf8JsonSeria void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter w throw new FormatException($"The model {nameof(VirtualMachineScaleSetListWithLinkResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter w #endif } } - writer.WriteEndObject(); } VirtualMachineScaleSetListWithLinkResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetManagedDisk.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetManagedDisk.Serialization.cs index 83fee8140587..4a4bfb94890a 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetManagedDisk.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetManagedDisk.Serialization.cs @@ -19,6 +19,15 @@ public partial class VirtualMachineScaleSetManagedDisk : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(VirtualMachineScaleSetManagedDisk)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(StorageAccountType)) { writer.WritePropertyName("storageAccountType"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } VirtualMachineScaleSetManagedDisk IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetNetworkConfiguration.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetNetworkConfiguration.Serialization.cs index a43946e37c66..1a6f3f65cd05 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetNetworkConfiguration.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetNetworkConfiguration.Serialization.cs @@ -19,6 +19,15 @@ public partial class VirtualMachineScaleSetNetworkConfiguration : IUtf8JsonSeria void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,14 +35,9 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(VirtualMachineScaleSetNetworkConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Primary)) @@ -97,22 +101,6 @@ void IJsonModel.Write(Utf8JsonWriter writer.WriteStringValue(AuxiliarySku.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } VirtualMachineScaleSetNetworkConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetNetworkConfigurationDnsSettings.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetNetworkConfigurationDnsSettings.Serialization.cs index 899509b2624f..1fb9bf7945d3 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetNetworkConfigurationDnsSettings.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetNetworkConfigurationDnsSettings.Serialization.cs @@ -18,6 +18,15 @@ internal partial class VirtualMachineScaleSetNetworkConfigurationDnsSettings : I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf throw new FormatException($"The model {nameof(VirtualMachineScaleSetNetworkConfigurationDnsSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(DnsServers)) { writer.WritePropertyName("dnsServers"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf #endif } } - writer.WriteEndObject(); } VirtualMachineScaleSetNetworkConfigurationDnsSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetNetworkProfile.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetNetworkProfile.Serialization.cs index 19f9f0b031a3..d755994bd690 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetNetworkProfile.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetNetworkProfile.Serialization.cs @@ -19,6 +19,15 @@ public partial class VirtualMachineScaleSetNetworkProfile : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(VirtualMachineScaleSetNetworkProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(HealthProbe)) { writer.WritePropertyName("healthProbe"u8); @@ -62,7 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } VirtualMachineScaleSetNetworkProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetOSDisk.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetOSDisk.Serialization.cs index 2d8be182851c..025c66d78a77 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetOSDisk.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetOSDisk.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualMachineScaleSetOSDisk : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(VirtualMachineScaleSetOSDisk)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -98,7 +106,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } VirtualMachineScaleSetOSDisk IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetOSProfile.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetOSProfile.Serialization.cs index 0238da6d4ed6..93052b2e249c 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetOSProfile.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetOSProfile.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualMachineScaleSetOSProfile : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(VirtualMachineScaleSetOSProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ComputerNamePrefix)) { writer.WritePropertyName("computerNamePrefix"u8); @@ -91,7 +99,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } VirtualMachineScaleSetOSProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetPatch.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetPatch.Serialization.cs index 5cd28542f03a..05c6d3695d2d 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetPatch.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetPatch.Serialization.cs @@ -20,6 +20,15 @@ public partial class VirtualMachineScaleSetPatch : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(VirtualMachineScaleSetPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Sku)) { writer.WritePropertyName("sku"u8); @@ -53,17 +62,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR } writer.WriteEndArray(); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(UpgradePolicy)) @@ -137,22 +135,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR writer.WriteObjectValue(SkuProfile, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } VirtualMachineScaleSetPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetPriorityMixPolicy.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetPriorityMixPolicy.Serialization.cs index dc8c9eeffef9..24f4377bd23e 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetPriorityMixPolicy.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetPriorityMixPolicy.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualMachineScaleSetPriorityMixPolicy : IUtf8JsonSerializ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wr throw new FormatException($"The model {nameof(VirtualMachineScaleSetPriorityMixPolicy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(BaseRegularPriorityCount)) { writer.WritePropertyName("baseRegularPriorityCount"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter wr #endif } } - writer.WriteEndObject(); } VirtualMachineScaleSetPriorityMixPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetPublicIPAddressConfiguration.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetPublicIPAddressConfiguration.Serialization.cs index 41a798aea358..774af457c8aa 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetPublicIPAddressConfiguration.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetPublicIPAddressConfiguration.Serialization.cs @@ -19,6 +19,15 @@ public partial class VirtualMachineScaleSetPublicIPAddressConfiguration : IUtf8J void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8Js throw new FormatException($"The model {nameof(VirtualMachineScaleSetPublicIPAddressConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); if (Optional.IsDefined(Sku)) @@ -87,7 +95,6 @@ void IJsonModel.Write(Utf8Js #endif } } - writer.WriteEndObject(); } VirtualMachineScaleSetPublicIPAddressConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings.Serialization.cs index b850a26a7ee6..8463d572827d 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettin void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.W throw new FormatException($"The model {nameof(VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("domainNameLabel"u8); writer.WriteStringValue(DomainNameLabel); if (Optional.IsDefined(DomainNameLabelScope)) @@ -48,7 +56,6 @@ void IJsonModel.W #endif } } - writer.WriteEndObject(); } VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetReimageContent.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetReimageContent.Serialization.cs index a458e9d15af1..dda5daa39946 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetReimageContent.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetReimageContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualMachineScaleSetReimageContent : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(VirtualMachineScaleSetReimageContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(InstanceIds)) { writer.WritePropertyName("instanceIds"u8); @@ -36,42 +45,6 @@ void IJsonModel.Write(Utf8JsonWriter write } writer.WriteEndArray(); } - if (Optional.IsDefined(ForceUpdateOSDiskForEphemeral)) - { - writer.WritePropertyName("forceUpdateOSDiskForEphemeral"u8); - writer.WriteBooleanValue(ForceUpdateOSDiskForEphemeral.Value); - } - if (Optional.IsDefined(TempDisk)) - { - writer.WritePropertyName("tempDisk"u8); - writer.WriteBooleanValue(TempDisk.Value); - } - if (Optional.IsDefined(ExactVersion)) - { - writer.WritePropertyName("exactVersion"u8); - writer.WriteStringValue(ExactVersion); - } - if (Optional.IsDefined(OSProfile)) - { - writer.WritePropertyName("osProfile"u8); - writer.WriteObjectValue(OSProfile, options); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } VirtualMachineScaleSetReimageContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetSku.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetSku.Serialization.cs index 361549e4ca4b..f2a95a0337d5 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetSku.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetSku.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualMachineScaleSetSku : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(VirtualMachineScaleSetSku)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ResourceType)) { writer.WritePropertyName("resourceType"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } VirtualMachineScaleSetSku IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetSkuCapacity.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetSkuCapacity.Serialization.cs index 6a868230eb09..0acbfc4c5b96 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetSkuCapacity.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetSkuCapacity.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualMachineScaleSetSkuCapacity : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(VirtualMachineScaleSetSkuCapacity)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Minimum)) { writer.WritePropertyName("minimum"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } VirtualMachineScaleSetSkuCapacity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetStorageProfile.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetStorageProfile.Serialization.cs index f76da831564d..39bceb606bad 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetStorageProfile.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetStorageProfile.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualMachineScaleSetStorageProfile : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(VirtualMachineScaleSetStorageProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ImageReference)) { writer.WritePropertyName("imageReference"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } VirtualMachineScaleSetStorageProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetUpdateIPConfiguration.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetUpdateIPConfiguration.Serialization.cs index 359d8c31969c..a8e109fedecd 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetUpdateIPConfiguration.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetUpdateIPConfiguration.Serialization.cs @@ -19,6 +19,15 @@ public partial class VirtualMachineScaleSetUpdateIPConfiguration : IUtf8JsonSeri void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,17 +35,12 @@ void IJsonModel.Write(Utf8JsonWrite throw new FormatException($"The model {nameof(VirtualMachineScaleSetUpdateIPConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Subnet)) @@ -100,22 +104,6 @@ void IJsonModel.Write(Utf8JsonWrite writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } VirtualMachineScaleSetUpdateIPConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetUpdateNetworkConfiguration.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetUpdateNetworkConfiguration.Serialization.cs index 1f773fe199ed..abee83e589d7 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetUpdateNetworkConfiguration.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetUpdateNetworkConfiguration.Serialization.cs @@ -19,6 +19,15 @@ public partial class VirtualMachineScaleSetUpdateNetworkConfiguration : IUtf8Jso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,17 +35,12 @@ void IJsonModel.Write(Utf8Json throw new FormatException($"The model {nameof(VirtualMachineScaleSetUpdateNetworkConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Primary)) @@ -100,22 +104,6 @@ void IJsonModel.Write(Utf8Json writer.WriteStringValue(AuxiliarySku.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } VirtualMachineScaleSetUpdateNetworkConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetUpdateNetworkProfile.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetUpdateNetworkProfile.Serialization.cs index 9fcee90a9a0c..9e2fd791e64f 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetUpdateNetworkProfile.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetUpdateNetworkProfile.Serialization.cs @@ -19,6 +19,15 @@ public partial class VirtualMachineScaleSetUpdateNetworkProfile : IUtf8JsonSeria void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(VirtualMachineScaleSetUpdateNetworkProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(HealthProbe)) { writer.WritePropertyName("healthProbe"u8); @@ -62,7 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } VirtualMachineScaleSetUpdateNetworkProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetUpdateOSDisk.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetUpdateOSDisk.Serialization.cs index 232f54d98496..94f4344effa1 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetUpdateOSDisk.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetUpdateOSDisk.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualMachineScaleSetUpdateOSDisk : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(VirtualMachineScaleSetUpdateOSDisk)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Caching)) { writer.WritePropertyName("caching"u8); @@ -86,7 +94,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } VirtualMachineScaleSetUpdateOSDisk IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetUpdateOSProfile.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetUpdateOSProfile.Serialization.cs index a12cf451e671..3467b4897332 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetUpdateOSProfile.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetUpdateOSProfile.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualMachineScaleSetUpdateOSProfile : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(VirtualMachineScaleSetUpdateOSProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(CustomData)) { writer.WritePropertyName("customData"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } VirtualMachineScaleSetUpdateOSProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetUpdatePublicIPAddressConfiguration.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetUpdatePublicIPAddressConfiguration.Serialization.cs index 09e3d3b1bb5f..1b1366a76e06 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetUpdatePublicIPAddressConfiguration.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetUpdatePublicIPAddressConfiguration.Serialization.cs @@ -19,6 +19,15 @@ public partial class VirtualMachineScaleSetUpdatePublicIPAddressConfiguration : void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write( throw new FormatException($"The model {nameof(VirtualMachineScaleSetUpdatePublicIPAddressConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -70,7 +78,6 @@ void IJsonModel.Write( #endif } } - writer.WriteEndObject(); } VirtualMachineScaleSetUpdatePublicIPAddressConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetUpdateStorageProfile.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetUpdateStorageProfile.Serialization.cs index ee79d4444e8c..b098f11f2d9d 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetUpdateStorageProfile.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetUpdateStorageProfile.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualMachineScaleSetUpdateStorageProfile : IUtf8JsonSeria void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(VirtualMachineScaleSetUpdateStorageProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ImageReference)) { writer.WritePropertyName("imageReference"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } VirtualMachineScaleSetUpdateStorageProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetUpdateVmProfile.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetUpdateVmProfile.Serialization.cs index edd5928a0d20..6b701ae2d729 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetUpdateVmProfile.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetUpdateVmProfile.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualMachineScaleSetUpdateVmProfile : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(VirtualMachineScaleSetUpdateVmProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(OSProfile)) { writer.WritePropertyName("osProfile"u8); @@ -101,7 +109,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } VirtualMachineScaleSetUpdateVmProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetUpgradePolicy.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetUpgradePolicy.Serialization.cs index 8c0b8789b5a7..c7b9d7e6d0cb 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetUpgradePolicy.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetUpgradePolicy.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualMachineScaleSetUpgradePolicy : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(VirtualMachineScaleSetUpgradePolicy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Mode)) { writer.WritePropertyName("mode"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } VirtualMachineScaleSetUpgradePolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetVmExtensionPatch.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetVmExtensionPatch.Serialization.cs index 717582bdaa5f..8caae2567d28 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetVmExtensionPatch.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetVmExtensionPatch.Serialization.cs @@ -19,6 +19,15 @@ public partial class VirtualMachineScaleSetVmExtensionPatch : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(VirtualMachineScaleSetVmExtensionPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(ForceUpdateTag)) @@ -114,22 +103,6 @@ void IJsonModel.Write(Utf8JsonWriter wri writer.WriteObjectValue(KeyVaultProtectedSettings, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } VirtualMachineScaleSetVmExtensionPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetVmExtensionsListResult.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetVmExtensionsListResult.Serialization.cs index 5f6f3c2f63b5..5584441b0bae 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetVmExtensionsListResult.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetVmExtensionsListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class VirtualMachineScaleSetVmExtensionsListResult : IUtf8JsonS void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWrit throw new FormatException($"The model {nameof(VirtualMachineScaleSetVmExtensionsListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWrit #endif } } - writer.WriteEndObject(); } VirtualMachineScaleSetVmExtensionsListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetVmExtensionsSummary.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetVmExtensionsSummary.Serialization.cs index 696798ad93cd..1b27f74780be 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetVmExtensionsSummary.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetVmExtensionsSummary.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualMachineScaleSetVmExtensionsSummary : IUtf8JsonSerial void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(VirtualMachineScaleSetVmExtensionsSummary)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } VirtualMachineScaleSetVmExtensionsSummary IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetVmInstanceIds.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetVmInstanceIds.Serialization.cs index 48e08b6a6d6b..fb82244b1ab7 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetVmInstanceIds.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetVmInstanceIds.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualMachineScaleSetVmInstanceIds : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(VirtualMachineScaleSetVmInstanceIds)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(InstanceIds)) { writer.WritePropertyName("instanceIds"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } VirtualMachineScaleSetVmInstanceIds IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetVmInstanceRequiredIds.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetVmInstanceRequiredIds.Serialization.cs index b648a8bd82ea..056a0584b328 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetVmInstanceRequiredIds.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetVmInstanceRequiredIds.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualMachineScaleSetVmInstanceRequiredIds : IUtf8JsonSeri void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWrite throw new FormatException($"The model {nameof(VirtualMachineScaleSetVmInstanceRequiredIds)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("instanceIds"u8); writer.WriteStartArray(); foreach (var item in InstanceIds) @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWrite #endif } } - writer.WriteEndObject(); } VirtualMachineScaleSetVmInstanceRequiredIds IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetVmInstanceView.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetVmInstanceView.Serialization.cs index 3e2ded2ef845..a5513f0d0e11 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetVmInstanceView.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetVmInstanceView.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualMachineScaleSetVmInstanceView : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(VirtualMachineScaleSetVmInstanceView)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(PlatformUpdateDomain)) { writer.WritePropertyName("platformUpdateDomain"u8); @@ -136,7 +144,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } VirtualMachineScaleSetVmInstanceView IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetVmListResult.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetVmListResult.Serialization.cs index c847614ea784..9936b814b250 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetVmListResult.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetVmListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class VirtualMachineScaleSetVmListResult : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(VirtualMachineScaleSetVmListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } VirtualMachineScaleSetVmListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetVmNetworkProfileConfiguration.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetVmNetworkProfileConfiguration.Serialization.cs index 193e69e0e3e4..83234ac654d0 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetVmNetworkProfileConfiguration.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetVmNetworkProfileConfiguration.Serialization.cs @@ -18,6 +18,15 @@ internal partial class VirtualMachineScaleSetVmNetworkProfileConfiguration : IUt void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8J throw new FormatException($"The model {nameof(VirtualMachineScaleSetVmNetworkProfileConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(NetworkInterfaceConfigurations)) { writer.WritePropertyName("networkInterfaceConfigurations"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8J #endif } } - writer.WriteEndObject(); } VirtualMachineScaleSetVmNetworkProfileConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetVmProfile.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetVmProfile.Serialization.cs index 9e03d4e65e22..6e5e99d39ef7 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetVmProfile.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetVmProfile.Serialization.cs @@ -19,6 +19,15 @@ public partial class VirtualMachineScaleSetVmProfile : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(VirtualMachineScaleSetVmProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(OSProfile)) { writer.WritePropertyName("osProfile"u8); @@ -132,7 +140,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } VirtualMachineScaleSetVmProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetVmProtectionPolicy.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetVmProtectionPolicy.Serialization.cs index f3d9b25c0352..6437e2ee8487 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetVmProtectionPolicy.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetVmProtectionPolicy.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualMachineScaleSetVmProtectionPolicy : IUtf8JsonSeriali void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter w throw new FormatException($"The model {nameof(VirtualMachineScaleSetVmProtectionPolicy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ProtectFromScaleIn)) { writer.WritePropertyName("protectFromScaleIn"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter w #endif } } - writer.WriteEndObject(); } VirtualMachineScaleSetVmProtectionPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetVmReimageContent.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetVmReimageContent.Serialization.cs index 39121ba78f29..b4711ba0656c 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetVmReimageContent.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetVmReimageContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualMachineScaleSetVmReimageContent : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,43 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(VirtualMachineScaleSetVmReimageContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(ForceUpdateOSDiskForEphemeral)) { writer.WritePropertyName("forceUpdateOSDiskForEphemeral"u8); writer.WriteBooleanValue(ForceUpdateOSDiskForEphemeral.Value); } - if (Optional.IsDefined(TempDisk)) - { - writer.WritePropertyName("tempDisk"u8); - writer.WriteBooleanValue(TempDisk.Value); - } - if (Optional.IsDefined(ExactVersion)) - { - writer.WritePropertyName("exactVersion"u8); - writer.WriteStringValue(ExactVersion); - } - if (Optional.IsDefined(OSProfile)) - { - writer.WritePropertyName("osProfile"u8); - writer.WriteObjectValue(OSProfile, options); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } VirtualMachineScaleSetVmReimageContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineSize.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineSize.Serialization.cs index fd8c1d41c9ad..d0a9792f7ec5 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineSize.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineSize.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualMachineSize : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(VirtualMachineSize)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -71,7 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } VirtualMachineSize IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineSizeListResult.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineSizeListResult.Serialization.cs index 8480d5eb089f..8142d1ba0b8d 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineSizeListResult.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineSizeListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class VirtualMachineSizeListResult : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(VirtualMachineSizeListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } VirtualMachineSizeListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineSizeProperties.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineSizeProperties.Serialization.cs index 44a1c8e2df90..2bd3a7e258be 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineSizeProperties.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineSizeProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualMachineSizeProperties : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(VirtualMachineSizeProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(VCpusAvailable)) { writer.WritePropertyName("vCPUsAvailable"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } VirtualMachineSizeProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineSoftwarePatchProperties.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineSoftwarePatchProperties.Serialization.cs index 0d74e4b91023..4ea79fb36f4d 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineSoftwarePatchProperties.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineSoftwarePatchProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualMachineSoftwarePatchProperties : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(VirtualMachineSoftwarePatchProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(PatchId)) { writer.WritePropertyName("patchId"u8); @@ -96,7 +104,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } VirtualMachineSoftwarePatchProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineStatusCodeCount.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineStatusCodeCount.Serialization.cs index 810a627ffabd..1aa53bdc6457 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineStatusCodeCount.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineStatusCodeCount.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualMachineStatusCodeCount : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(VirtualMachineStatusCodeCount)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Code)) { writer.WritePropertyName("code"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } VirtualMachineStatusCodeCount IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineStorageProfile.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineStorageProfile.Serialization.cs index ed60348b206b..75f108840182 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineStorageProfile.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineStorageProfile.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualMachineStorageProfile : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(VirtualMachineStorageProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ImageReference)) { writer.WritePropertyName("imageReference"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } VirtualMachineStorageProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VmImagesInEdgeZoneListResult.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VmImagesInEdgeZoneListResult.Serialization.cs index 949dab1d5e9f..3c99fdb97070 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VmImagesInEdgeZoneListResult.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VmImagesInEdgeZoneListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class VmImagesInEdgeZoneListResult : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(VmImagesInEdgeZoneListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } VmImagesInEdgeZoneListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/WinRMConfiguration.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/WinRMConfiguration.Serialization.cs index 0aa26bbcc92d..957688ac401d 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/WinRMConfiguration.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/WinRMConfiguration.Serialization.cs @@ -18,6 +18,15 @@ internal partial class WinRMConfiguration : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(WinRMConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Listeners)) { writer.WritePropertyName("listeners"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } WinRMConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/WinRMListener.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/WinRMListener.Serialization.cs index f3286c320bb9..9ed7660f17c6 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/WinRMListener.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/WinRMListener.Serialization.cs @@ -18,6 +18,15 @@ public partial class WinRMListener : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt throw new FormatException($"The model {nameof(WinRMListener)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Protocol)) { writer.WritePropertyName("protocol"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt #endif } } - writer.WriteEndObject(); } WinRMListener IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/WindowsConfiguration.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/WindowsConfiguration.Serialization.cs index 0ad893191495..aa7246adf590 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/WindowsConfiguration.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/WindowsConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class WindowsConfiguration : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(WindowsConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ProvisionVmAgent)) { writer.WritePropertyName("provisionVMAgent"u8); @@ -81,7 +89,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } WindowsConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/WindowsParameters.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/WindowsParameters.Serialization.cs index ebcefeeaa361..34450b2600ce 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/WindowsParameters.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/WindowsParameters.Serialization.cs @@ -18,6 +18,15 @@ public partial class WindowsParameters : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(WindowsParameters)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(ClassificationsToInclude)) { writer.WritePropertyName("classificationsToInclude"u8); @@ -81,7 +89,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } WindowsParameters IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/WindowsVmGuestPatchAutomaticByPlatformSettings.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/WindowsVmGuestPatchAutomaticByPlatformSettings.Serialization.cs index 47521b12959f..1d48e4946882 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/WindowsVmGuestPatchAutomaticByPlatformSettings.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/WindowsVmGuestPatchAutomaticByPlatformSettings.Serialization.cs @@ -18,6 +18,15 @@ public partial class WindowsVmGuestPatchAutomaticByPlatformSettings : IUtf8JsonS void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWr throw new FormatException($"The model {nameof(WindowsVmGuestPatchAutomaticByPlatformSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(RebootSetting)) { writer.WritePropertyName("rebootSetting"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWr #endif } } - writer.WriteEndObject(); } WindowsVmGuestPatchAutomaticByPlatformSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/ProximityPlacementGroupData.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/ProximityPlacementGroupData.Serialization.cs index 6d14491d9b07..8e84b1669ada 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/ProximityPlacementGroupData.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/ProximityPlacementGroupData.Serialization.cs @@ -20,6 +20,15 @@ public partial class ProximityPlacementGroupData : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(ProximityPlacementGroupData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(Zones)) { writer.WritePropertyName("zones"u8); @@ -38,39 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR } writer.WriteEndArray(); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(ProximityPlacementGroupType)) @@ -119,22 +95,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR writer.WriteObjectValue(Intent, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ProximityPlacementGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestorePointData.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestorePointData.Serialization.cs index f657cb09779f..7ef242e601f3 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestorePointData.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestorePointData.Serialization.cs @@ -21,6 +21,15 @@ public partial class RestorePointData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,27 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(RestorePointData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsCollectionDefined(ExcludeDisks)) @@ -92,22 +81,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter writer.WriteObjectValue(InstanceView, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } RestorePointData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestorePointGroupData.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestorePointGroupData.Serialization.cs index 90bd60134305..53a1c7aae7f7 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestorePointGroupData.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestorePointGroupData.Serialization.cs @@ -20,6 +20,15 @@ public partial class RestorePointGroupData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,40 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(RestorePointGroupData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Source)) @@ -89,22 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } RestorePointGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/SharedGalleryData.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/SharedGalleryData.Serialization.cs index c8e246fe259b..fe3dd60a7509 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/SharedGalleryData.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/SharedGalleryData.Serialization.cs @@ -18,6 +18,15 @@ public partial class SharedGalleryData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,17 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(SharedGalleryData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(ArtifactTags)) @@ -50,30 +49,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite writer.WriteEndObject(); } writer.WriteEndObject(); - writer.WritePropertyName("identifier"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(UniqueId)) - { - writer.WritePropertyName("uniqueId"u8); - writer.WriteStringValue(UniqueId); - } - writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SharedGalleryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/SharedGalleryImageData.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/SharedGalleryImageData.Serialization.cs index 23f8e684eba0..f6203a273a54 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/SharedGalleryImageData.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/SharedGalleryImageData.Serialization.cs @@ -19,6 +19,15 @@ public partial class SharedGalleryImageData : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,17 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(SharedGalleryImageData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(OSType)) @@ -116,30 +115,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader writer.WriteEndObject(); } writer.WriteEndObject(); - writer.WritePropertyName("identifier"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(UniqueId)) - { - writer.WritePropertyName("uniqueId"u8); - writer.WriteStringValue(UniqueId); - } - writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SharedGalleryImageData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/SharedGalleryImageVersionData.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/SharedGalleryImageVersionData.Serialization.cs index 742f3afa224c..e1b5c6ca4928 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/SharedGalleryImageVersionData.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/SharedGalleryImageVersionData.Serialization.cs @@ -19,6 +19,15 @@ public partial class SharedGalleryImageVersionData : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,17 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(SharedGalleryImageVersionData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(PublishedOn)) @@ -71,30 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode writer.WriteEndObject(); } writer.WriteEndObject(); - writer.WritePropertyName("identifier"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(UniqueId)) - { - writer.WritePropertyName("uniqueId"u8); - writer.WriteStringValue(UniqueId); - } - writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SharedGalleryImageVersionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/SnapshotData.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/SnapshotData.Serialization.cs index fcf6becfe059..bddd4245e832 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/SnapshotData.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/SnapshotData.Serialization.cs @@ -21,6 +21,15 @@ public partial class SnapshotData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,7 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(SnapshotData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ManagedBy)) { writer.WritePropertyName("managedBy"u8); @@ -44,39 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti writer.WritePropertyName("extendedLocation"u8); JsonSerializer.Serialize(writer, ExtendedLocation); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(TimeCreated)) @@ -195,22 +171,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti writer.WriteStringValue(DataAccessAuthMode.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SnapshotData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/SshPublicKeyData.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/SshPublicKeyData.Serialization.cs index cb53056e48a1..3fbc5f2061cf 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/SshPublicKeyData.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/SshPublicKeyData.Serialization.cs @@ -19,6 +19,15 @@ public partial class SshPublicKeyData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,40 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(SshPublicKeyData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(PublicKey)) @@ -68,22 +44,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter writer.WriteStringValue(PublicKey); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SshPublicKeyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineData.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineData.Serialization.cs index 2c2c4b7ffec5..3efe35dfda40 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineData.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineData.Serialization.cs @@ -21,6 +21,15 @@ public partial class VirtualMachineData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,7 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(VirtualMachineData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Plan)) { writer.WritePropertyName("plan"u8); @@ -74,39 +83,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(HardwareProfile)) @@ -245,22 +221,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStringValue(TimeCreated.Value, "O"); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } VirtualMachineData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineExtensionData.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineExtensionData.Serialization.cs index 0207213c2a2b..8d0e6c226a2c 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineExtensionData.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineExtensionData.Serialization.cs @@ -20,6 +20,15 @@ public partial class VirtualMachineExtensionData : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,40 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(VirtualMachineExtensionData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(ForceUpdateTag)) @@ -148,22 +124,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } VirtualMachineExtensionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineExtensionImageData.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineExtensionImageData.Serialization.cs index 075d3d44fbe7..35ac841991fe 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineExtensionImageData.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineExtensionImageData.Serialization.cs @@ -19,6 +19,15 @@ public partial class VirtualMachineExtensionImageData : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,40 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(VirtualMachineExtensionImageData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(OperatingSystem)) @@ -88,22 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M writer.WriteBooleanValue(SupportsMultipleExtensions.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } VirtualMachineExtensionImageData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineRunCommandData.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineRunCommandData.Serialization.cs index 15ba1e81ac36..01e77ee1c34c 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineRunCommandData.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineRunCommandData.Serialization.cs @@ -20,6 +20,15 @@ public partial class VirtualMachineRunCommandData : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,40 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(VirtualMachineRunCommandData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Source)) @@ -144,22 +120,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model writer.WriteBooleanValue(TreatFailureAsDeploymentFailure.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } VirtualMachineRunCommandData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineScaleSetData.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineScaleSetData.Serialization.cs index 920f6436ca2c..c4358dba7a23 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineScaleSetData.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineScaleSetData.Serialization.cs @@ -21,6 +21,15 @@ public partial class VirtualMachineScaleSetData : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,7 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(VirtualMachineScaleSetData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Sku)) { writer.WritePropertyName("sku"u8); @@ -64,39 +73,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(UpgradePolicy)) @@ -215,22 +191,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe writer.WriteObjectValue(SkuProfile, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } VirtualMachineScaleSetData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineScaleSetExtensionData.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineScaleSetExtensionData.Serialization.cs index d993c1007fe9..68f016855927 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineScaleSetExtensionData.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineScaleSetExtensionData.Serialization.cs @@ -19,6 +19,101 @@ public partial class VirtualMachineScaleSetExtensionData : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(VirtualMachineScaleSetExtensionData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(ForceUpdateTag)) + { + writer.WritePropertyName("forceUpdateTag"u8); + writer.WriteStringValue(ForceUpdateTag); + } + if (Optional.IsDefined(Publisher)) + { + writer.WritePropertyName("publisher"u8); + writer.WriteStringValue(Publisher); + } + if (Optional.IsDefined(ExtensionType)) + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(ExtensionType); + } + if (Optional.IsDefined(TypeHandlerVersion)) + { + writer.WritePropertyName("typeHandlerVersion"u8); + writer.WriteStringValue(TypeHandlerVersion); + } + if (Optional.IsDefined(AutoUpgradeMinorVersion)) + { + writer.WritePropertyName("autoUpgradeMinorVersion"u8); + writer.WriteBooleanValue(AutoUpgradeMinorVersion.Value); + } + if (Optional.IsDefined(EnableAutomaticUpgrade)) + { + writer.WritePropertyName("enableAutomaticUpgrade"u8); + writer.WriteBooleanValue(EnableAutomaticUpgrade.Value); + } + if (Optional.IsDefined(Settings)) + { + writer.WritePropertyName("settings"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(Settings); +#else + using (JsonDocument document = JsonDocument.Parse(Settings)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + if (Optional.IsDefined(ProtectedSettings)) + { + writer.WritePropertyName("protectedSettings"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(ProtectedSettings); +#else + using (JsonDocument document = JsonDocument.Parse(ProtectedSettings)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState); + } + if (Optional.IsCollectionDefined(ProvisionAfterExtensions)) + { + writer.WritePropertyName("provisionAfterExtensions"u8); + writer.WriteStartArray(); + foreach (var item in ProvisionAfterExtensions) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(SuppressFailures)) + { + writer.WritePropertyName("suppressFailures"u8); + writer.WriteBooleanValue(SuppressFailures.Value); + } + if (Optional.IsDefined(KeyVaultProtectedSettings)) + { + writer.WritePropertyName("protectedSettingsFromKeyVault"u8); + writer.WriteObjectValue(KeyVaultProtectedSettings, options); + } + writer.WriteEndObject(); + } + VirtualMachineScaleSetExtensionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineScaleSetRollingUpgradeData.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineScaleSetRollingUpgradeData.Serialization.cs index 41b29c10a0e1..9a334b41e78c 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineScaleSetRollingUpgradeData.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineScaleSetRollingUpgradeData.Serialization.cs @@ -20,6 +20,15 @@ public partial class VirtualMachineScaleSetRollingUpgradeData : IUtf8JsonSeriali void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,40 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter w throw new FormatException($"The model {nameof(VirtualMachineScaleSetRollingUpgradeData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Policy)) @@ -84,22 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter w writer.WriteObjectValue(Error, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } VirtualMachineScaleSetRollingUpgradeData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineScaleSetVmData.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineScaleSetVmData.Serialization.cs index 07e995d5a210..59aa13a9e8d2 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineScaleSetVmData.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineScaleSetVmData.Serialization.cs @@ -21,6 +21,15 @@ public partial class VirtualMachineScaleSetVmData : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,7 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(VirtualMachineScaleSetVmData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(InstanceId)) { writer.WritePropertyName("instanceId"u8); @@ -74,39 +83,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(LatestModelApplied)) @@ -200,22 +176,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model writer.WriteStringValue(TimeCreated.Value, "O"); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } VirtualMachineScaleSetVmData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineScaleSetVmExtensionData.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineScaleSetVmExtensionData.Serialization.cs index 04cc9969521b..38fa37bc2c36 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineScaleSetVmExtensionData.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineScaleSetVmExtensionData.Serialization.cs @@ -20,6 +20,15 @@ public partial class VirtualMachineScaleSetVmExtensionData : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,32 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(VirtualMachineScaleSetVmExtensionData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Location)) { writer.WritePropertyName("location"u8); writer.WriteStringValue(Location.Value); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(ForceUpdateTag)) @@ -140,22 +129,6 @@ void IJsonModel.Write(Utf8JsonWriter writ writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } VirtualMachineScaleSetVmExtensionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/autorest.md b/sdk/compute/Azure.ResourceManager.Compute/src/autorest.md index f4a13219b07e..36545ad8978d 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/autorest.md +++ b/sdk/compute/Azure.ResourceManager.Compute/src/autorest.md @@ -20,6 +20,7 @@ skip-csproj: true modelerfour: flatten-payloads: false use-model-reader-writer: true +use-write-core: true update-required-copy: GalleryImage: OSType diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/CHANGELOG.md b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/CHANGELOG.md index 89ec9680b317..820a145f9944 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/CHANGELOG.md +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 1.0.0-beta.2 (Unreleased) +## 1.1.0-beta.1 (Unreleased) ### Features Added @@ -10,6 +10,18 @@ ### Other Changes +## 1.0.0 (2024-10-22) + +### Features Added + +This package follows the [new Azure SDK guidelines](https://azure.github.io/azure-sdk/general_introduction.html), and provides many core capabilities: + + - Support MSAL.NET, Azure.Identity is out of box for supporting MSAL.NET. + - Support [OpenTelemetry](https://opentelemetry.io/) for distributed tracing. + - HTTP pipeline with custom policies. + - Better error-handling. + - Support uniform telemetry across all languages. + ## 1.0.0-beta.1 (2024-08-28) - Initial beta version diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/README.md b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/README.md index 222548919800..b48223d63531 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/README.md +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/README.md @@ -17,7 +17,7 @@ This library follows the [new Azure SDK guidelines](https://azure.github.io/azur Install the Microsoft Azure Compute Fleet management library for .NET with [NuGet](https://www.nuget.org/): ```dotnetcli -dotnet add package Azure.ResourceManager.ComputeFleet --prerelease +dotnet add package Azure.ResourceManager.ComputeFleet ``` ### Prerequisites diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/api/Azure.ResourceManager.ComputeFleet.netstandard2.0.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/api/Azure.ResourceManager.ComputeFleet.netstandard2.0.cs index df5f5a8b381b..9bb47397d0fe 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/api/Azure.ResourceManager.ComputeFleet.netstandard2.0.cs +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/api/Azure.ResourceManager.ComputeFleet.netstandard2.0.cs @@ -24,6 +24,7 @@ public ComputeFleetData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.Models.ArmPlan Plan { get { throw null; } set { } } public Azure.ResourceManager.ComputeFleet.Models.ComputeFleetProperties Properties { get { throw null; } set { } } public System.Collections.Generic.IList Zones { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ComputeFleet.ComputeFleetData 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.ComputeFleet.ComputeFleetData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -90,6 +91,55 @@ protected MockableComputeFleetSubscriptionResource() { } } namespace Azure.ResourceManager.ComputeFleet.Models { + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AcceleratorManufacturer : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AcceleratorManufacturer(string value) { throw null; } + public static Azure.ResourceManager.ComputeFleet.Models.AcceleratorManufacturer AMD { get { throw null; } } + public static Azure.ResourceManager.ComputeFleet.Models.AcceleratorManufacturer Nvidia { get { throw null; } } + public static Azure.ResourceManager.ComputeFleet.Models.AcceleratorManufacturer Xilinx { get { throw null; } } + public bool Equals(Azure.ResourceManager.ComputeFleet.Models.AcceleratorManufacturer other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ComputeFleet.Models.AcceleratorManufacturer left, Azure.ResourceManager.ComputeFleet.Models.AcceleratorManufacturer right) { throw null; } + public static implicit operator Azure.ResourceManager.ComputeFleet.Models.AcceleratorManufacturer (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ComputeFleet.Models.AcceleratorManufacturer left, Azure.ResourceManager.ComputeFleet.Models.AcceleratorManufacturer right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AcceleratorType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AcceleratorType(string value) { throw null; } + public static Azure.ResourceManager.ComputeFleet.Models.AcceleratorType FPGA { get { throw null; } } + public static Azure.ResourceManager.ComputeFleet.Models.AcceleratorType GPU { get { throw null; } } + public bool Equals(Azure.ResourceManager.ComputeFleet.Models.AcceleratorType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ComputeFleet.Models.AcceleratorType left, Azure.ResourceManager.ComputeFleet.Models.AcceleratorType right) { throw null; } + public static implicit operator Azure.ResourceManager.ComputeFleet.Models.AcceleratorType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ComputeFleet.Models.AcceleratorType left, Azure.ResourceManager.ComputeFleet.Models.AcceleratorType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class AdditionalCapabilities : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AdditionalCapabilities() { } + public bool? IsHibernationEnabled { get { throw null; } set { } } + public bool? IsUltraSSDEnabled { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ComputeFleet.Models.AdditionalCapabilities 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.ComputeFleet.Models.AdditionalCapabilities 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; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct AdditionalInformationSettingName : System.IEquatable { @@ -108,6 +158,24 @@ namespace Azure.ResourceManager.ComputeFleet.Models public static bool operator !=(Azure.ResourceManager.ComputeFleet.Models.AdditionalInformationSettingName left, Azure.ResourceManager.ComputeFleet.Models.AdditionalInformationSettingName right) { throw null; } public override string ToString() { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ArchitectureType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ArchitectureType(string value) { throw null; } + public static Azure.ResourceManager.ComputeFleet.Models.ArchitectureType ARM64 { get { throw null; } } + public static Azure.ResourceManager.ComputeFleet.Models.ArchitectureType X64 { get { throw null; } } + public bool Equals(Azure.ResourceManager.ComputeFleet.Models.ArchitectureType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ComputeFleet.Models.ArchitectureType left, Azure.ResourceManager.ComputeFleet.Models.ArchitectureType right) { throw null; } + public static implicit operator Azure.ResourceManager.ComputeFleet.Models.ArchitectureType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ComputeFleet.Models.ArchitectureType left, Azure.ResourceManager.ComputeFleet.Models.ArchitectureType right) { throw null; } + public override string ToString() { throw null; } + } public static partial class ArmComputeFleetModelFactory { public static Azure.ResourceManager.ComputeFleet.Models.ComputeFleetApiError ComputeFleetApiError(string code = null, string target = null, string message = null, System.Collections.Generic.IEnumerable details = null, Azure.ResourceManager.ComputeFleet.Models.ComputeFleetInnerError innererror = null) { throw null; } @@ -115,9 +183,9 @@ public static partial class ArmComputeFleetModelFactory public static Azure.ResourceManager.ComputeFleet.ComputeFleetData ComputeFleetData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.ComputeFleet.Models.ComputeFleetProperties properties = null, System.Collections.Generic.IEnumerable zones = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.Models.ArmPlan plan = null) { throw null; } public static Azure.ResourceManager.ComputeFleet.Models.ComputeFleetImageReference ComputeFleetImageReference(Azure.Core.ResourceIdentifier id = null, string publisher = null, string offer = null, string sku = null, string version = null, string exactVersion = null, string sharedGalleryImageId = null, string communityGalleryImageId = null) { throw null; } public static Azure.ResourceManager.ComputeFleet.Models.ComputeFleetInnerError ComputeFleetInnerError(string exceptionType = null, string errorDetail = null) { throw null; } - public static Azure.ResourceManager.ComputeFleet.Models.ComputeFleetProperties ComputeFleetProperties(Azure.ResourceManager.ComputeFleet.Models.ComputeFleetProvisioningState? provisioningState = default(Azure.ResourceManager.ComputeFleet.Models.ComputeFleetProvisioningState?), Azure.ResourceManager.ComputeFleet.Models.SpotPriorityProfile spotPriorityProfile = null, Azure.ResourceManager.ComputeFleet.Models.RegularPriorityProfile regularPriorityProfile = null, System.Collections.Generic.IEnumerable vmSizesProfile = null, Azure.ResourceManager.ComputeFleet.Models.ComputeFleetComputeProfile computeProfile = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), string uniqueId = null) { throw null; } + public static Azure.ResourceManager.ComputeFleet.Models.ComputeFleetProperties ComputeFleetProperties(Azure.ResourceManager.ComputeFleet.Models.ComputeFleetProvisioningState? provisioningState = default(Azure.ResourceManager.ComputeFleet.Models.ComputeFleetProvisioningState?), Azure.ResourceManager.ComputeFleet.Models.SpotPriorityProfile spotPriorityProfile = null, Azure.ResourceManager.ComputeFleet.Models.RegularPriorityProfile regularPriorityProfile = null, System.Collections.Generic.IEnumerable vmSizesProfile = null, Azure.ResourceManager.ComputeFleet.Models.ComputeFleetVmAttributes vmAttributes = null, System.Collections.Generic.IEnumerable additionalLocationsLocationProfiles = null, Azure.ResourceManager.ComputeFleet.Models.ComputeFleetComputeProfile computeProfile = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), string uniqueId = null) { throw null; } public static Azure.ResourceManager.ComputeFleet.Models.ComputeFleetVmProfile ComputeFleetVmProfile(Azure.ResourceManager.ComputeFleet.Models.ComputeFleetVmssOSProfile osProfile = null, Azure.ResourceManager.ComputeFleet.Models.ComputeFleetVmssStorageProfile storageProfile = null, Azure.ResourceManager.ComputeFleet.Models.ComputeFleetVmssNetworkProfile networkProfile = null, Azure.ResourceManager.ComputeFleet.Models.ComputeFleetSecurityProfile securityProfile = null, Azure.ResourceManager.ComputeFleet.Models.ComputeFleetBootDiagnostics bootDiagnostics = null, Azure.ResourceManager.ComputeFleet.Models.ComputeFleetVmssExtensionProfile extensionProfile = null, string licenseType = null, Azure.ResourceManager.ComputeFleet.Models.ComputeFleetScheduledEventsProfile scheduledEventsProfile = null, string userData = null, Azure.Core.ResourceIdentifier capacityReservationGroupId = null, System.Collections.Generic.IEnumerable galleryApplications = null, Azure.ResourceManager.ComputeFleet.Models.ComputeFleetVmSizeProperties hardwareVmSizeProperties = null, Azure.Core.ResourceIdentifier serviceArtifactReferenceId = null, Azure.ResourceManager.ComputeFleet.Models.ComputeFleetSecurityPostureReference securityPostureReference = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?)) { throw null; } - public static Azure.ResourceManager.ComputeFleet.Models.ComputeFleetVmss ComputeFleetVmss(string id = null, string type = null, Azure.ResourceManager.ComputeFleet.Models.ComputeFleetProvisioningState operationStatus = default(Azure.ResourceManager.ComputeFleet.Models.ComputeFleetProvisioningState), Azure.ResourceManager.ComputeFleet.Models.ComputeFleetApiError error = null) { throw null; } + public static Azure.ResourceManager.ComputeFleet.Models.ComputeFleetVmss ComputeFleetVmss(Azure.Core.ResourceIdentifier id = null, string type = null, Azure.ResourceManager.ComputeFleet.Models.ComputeFleetProvisioningState operationStatus = default(Azure.ResourceManager.ComputeFleet.Models.ComputeFleetProvisioningState), Azure.ResourceManager.ComputeFleet.Models.ComputeFleetApiError error = null) { throw null; } public static Azure.ResourceManager.ComputeFleet.Models.ComputeFleetVmssExtension ComputeFleetVmssExtension(Azure.Core.ResourceIdentifier id = null, string name = null, string extensionType = null, Azure.ResourceManager.ComputeFleet.Models.ComputeFleetVmssExtensionProperties properties = null) { throw null; } public static Azure.ResourceManager.ComputeFleet.Models.ComputeFleetVmssExtensionProperties ComputeFleetVmssExtensionProperties(string forceUpdateTag = null, string publisher = null, string extensionType = null, string typeHandlerVersion = null, bool? shouldAutoUpgradeMinorVersion = default(bool?), bool? isAutomaticUpgradeEnabled = default(bool?), System.Collections.Generic.IDictionary settings = null, System.Collections.Generic.IDictionary protectedSettings = null, string provisioningState = null, System.Collections.Generic.IEnumerable provisionAfterExtensions = null, bool? isSuppressFailuresEnabled = default(bool?), Azure.ResourceManager.ComputeFleet.Models.ComputeFleetKeyVaultSecretReference protectedSettingsFromKeyVault = null) { throw null; } } @@ -129,6 +197,7 @@ internal ComputeFleetApiError() { } public Azure.ResourceManager.ComputeFleet.Models.ComputeFleetInnerError Innererror { get { throw null; } } public string Message { get { throw null; } } public string Target { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ComputeFleet.Models.ComputeFleetApiError 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.ComputeFleet.Models.ComputeFleetApiError System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -141,6 +210,7 @@ internal ComputeFleetApiErrorInfo() { } public string Code { get { throw null; } } public string Message { get { throw null; } } public string Target { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ComputeFleet.Models.ComputeFleetApiErrorInfo 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.ComputeFleet.Models.ComputeFleetApiErrorInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -152,6 +222,7 @@ public partial class ComputeFleetBootDiagnostics : System.ClientModel.Primitives public ComputeFleetBootDiagnostics() { } public bool? IsEnabled { get { throw null; } set { } } public System.Uri StorageUri { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ComputeFleet.Models.ComputeFleetBootDiagnostics 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.ComputeFleet.Models.ComputeFleetBootDiagnostics System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -180,9 +251,11 @@ public ComputeFleetBootDiagnostics() { } public partial class ComputeFleetComputeProfile : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ComputeFleetComputeProfile(Azure.ResourceManager.ComputeFleet.Models.ComputeFleetVmProfile baseVirtualMachineProfile) { } + public Azure.ResourceManager.ComputeFleet.Models.AdditionalCapabilities AdditionalVirtualMachineCapabilities { get { throw null; } set { } } public Azure.ResourceManager.ComputeFleet.Models.ComputeFleetVmProfile BaseVirtualMachineProfile { get { throw null; } set { } } public string ComputeApiVersion { get { throw null; } set { } } public int? PlatformFaultDomainCount { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ComputeFleet.Models.ComputeFleetComputeProfile 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.ComputeFleet.Models.ComputeFleetComputeProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -230,6 +303,7 @@ public partial class ComputeFleetDiffDiskSettings : System.ClientModel.Primitive public ComputeFleetDiffDiskSettings() { } public Azure.ResourceManager.ComputeFleet.Models.ComputeFleetDiffDiskOption? Option { get { throw null; } set { } } public Azure.ResourceManager.ComputeFleet.Models.ComputeFleetDiffDiskPlacement? Placement { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ComputeFleet.Models.ComputeFleetDiffDiskSettings 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.ComputeFleet.Models.ComputeFleetDiffDiskSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -342,6 +416,7 @@ public ComputeFleetImageReference() { } public string SharedGalleryImageId { get { throw null; } set { } } public string Sku { get { throw null; } set { } } public string Version { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ComputeFleet.Models.ComputeFleetImageReference 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.ComputeFleet.Models.ComputeFleetImageReference System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -353,6 +428,7 @@ public partial class ComputeFleetInnerError : System.ClientModel.Primitives.IJso internal ComputeFleetInnerError() { } public string ErrorDetail { get { throw null; } } public string ExceptionType { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ComputeFleet.Models.ComputeFleetInnerError 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.ComputeFleet.Models.ComputeFleetInnerError System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -382,6 +458,7 @@ public partial class ComputeFleetKeyVaultSecretReference : System.ClientModel.Pr public ComputeFleetKeyVaultSecretReference(System.Uri secretUri, Azure.ResourceManager.Resources.Models.WritableSubResource sourceVault) { } public System.Uri SecretUri { get { throw null; } set { } } public Azure.Core.ResourceIdentifier SourceVaultId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ComputeFleet.Models.ComputeFleetKeyVaultSecretReference 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.ComputeFleet.Models.ComputeFleetKeyVaultSecretReference System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -396,6 +473,7 @@ public ComputeFleetLinuxConfiguration() { } public bool? IsVmAgentProvisioned { get { throw null; } set { } } public Azure.ResourceManager.ComputeFleet.Models.ComputeFleetLinuxPatchSettings PatchSettings { get { throw null; } set { } } public System.Collections.Generic.IList SshPublicKeys { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ComputeFleet.Models.ComputeFleetLinuxConfiguration 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.ComputeFleet.Models.ComputeFleetLinuxConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -426,6 +504,7 @@ public ComputeFleetLinuxPatchSettings() { } public Azure.ResourceManager.ComputeFleet.Models.ComputeFleetLinuxPatchAssessmentMode? AssessmentMode { get { throw null; } set { } } public Azure.ResourceManager.ComputeFleet.Models.ComputeFleetLinuxVmGuestPatchAutomaticByPlatformSettings AutomaticByPlatformSettings { get { throw null; } set { } } public Azure.ResourceManager.ComputeFleet.Models.ComputeFleetLinuxVmGuestPatchMode? PatchMode { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ComputeFleet.Models.ComputeFleetLinuxPatchSettings 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.ComputeFleet.Models.ComputeFleetLinuxPatchSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -457,6 +536,7 @@ public partial class ComputeFleetLinuxVmGuestPatchAutomaticByPlatformSettings : public ComputeFleetLinuxVmGuestPatchAutomaticByPlatformSettings() { } public bool? IsBypassPlatformSafetyChecksOnUserScheduleEnabled { get { throw null; } set { } } public Azure.ResourceManager.ComputeFleet.Models.ComputeFleetLinuxVmGuestPatchAutomaticByPlatformRebootSetting? RebootSetting { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ComputeFleet.Models.ComputeFleetLinuxVmGuestPatchAutomaticByPlatformSettings 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.ComputeFleet.Models.ComputeFleetLinuxVmGuestPatchAutomaticByPlatformSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -561,6 +641,7 @@ public partial class ComputeFleetOSImageNotificationProfile : System.ClientModel public ComputeFleetOSImageNotificationProfile() { } public bool? IsEnabled { get { throw null; } set { } } public string NotBeforeTimeout { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ComputeFleet.Models.ComputeFleetOSImageNotificationProfile 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.ComputeFleet.Models.ComputeFleetOSImageNotificationProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -574,6 +655,7 @@ public ComputeFleetPatch() { } public Azure.ResourceManager.Models.ArmPlan Plan { get { throw null; } set { } } public Azure.ResourceManager.ComputeFleet.Models.ComputeFleetProperties Properties { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ComputeFleet.Models.ComputeFleetPatch 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.ComputeFleet.Models.ComputeFleetPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -583,13 +665,16 @@ public ComputeFleetPatch() { } public partial class ComputeFleetProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ComputeFleetProperties(System.Collections.Generic.IEnumerable vmSizesProfile, Azure.ResourceManager.ComputeFleet.Models.ComputeFleetComputeProfile computeProfile) { } + public System.Collections.Generic.IList AdditionalLocationsLocationProfiles { get { throw null; } set { } } public Azure.ResourceManager.ComputeFleet.Models.ComputeFleetComputeProfile ComputeProfile { get { throw null; } set { } } public System.DateTimeOffset? CreatedOn { get { throw null; } } public Azure.ResourceManager.ComputeFleet.Models.ComputeFleetProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.ComputeFleet.Models.RegularPriorityProfile RegularPriorityProfile { get { throw null; } set { } } public Azure.ResourceManager.ComputeFleet.Models.SpotPriorityProfile SpotPriorityProfile { get { throw null; } set { } } public string UniqueId { get { throw null; } } + public Azure.ResourceManager.ComputeFleet.Models.ComputeFleetVmAttributes VmAttributes { get { throw null; } set { } } public System.Collections.Generic.IList VmSizesProfile { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ComputeFleet.Models.ComputeFleetProperties 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.ComputeFleet.Models.ComputeFleetProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -643,6 +728,7 @@ public ComputeFleetProxyAgentSettings() { } public bool? IsEnabled { get { throw null; } set { } } public int? KeyIncarnationId { get { throw null; } set { } } public Azure.ResourceManager.ComputeFleet.Models.ProxyAgentExecuteMode? Mode { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ComputeFleet.Models.ComputeFleetProxyAgentSettings 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.ComputeFleet.Models.ComputeFleetProxyAgentSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -654,6 +740,7 @@ public partial class ComputeFleetPublicIPAddressSku : System.ClientModel.Primiti public ComputeFleetPublicIPAddressSku() { } public Azure.ResourceManager.ComputeFleet.Models.ComputeFleetPublicIPAddressSkuName? Name { get { throw null; } set { } } public Azure.ResourceManager.ComputeFleet.Models.ComputeFleetPublicIPAddressSkuTier? Tier { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ComputeFleet.Models.ComputeFleetPublicIPAddressSku 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.ComputeFleet.Models.ComputeFleetPublicIPAddressSku System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -701,6 +788,7 @@ public partial class ComputeFleetScheduledEventsProfile : System.ClientModel.Pri public ComputeFleetScheduledEventsProfile() { } public Azure.ResourceManager.ComputeFleet.Models.ComputeFleetOSImageNotificationProfile OSImageNotificationProfile { get { throw null; } set { } } public Azure.ResourceManager.ComputeFleet.Models.ComputeFleetTerminateNotificationProfile TerminateNotificationProfile { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ComputeFleet.Models.ComputeFleetScheduledEventsProfile 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.ComputeFleet.Models.ComputeFleetScheduledEventsProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -732,6 +820,7 @@ public ComputeFleetSecurityPostureReference() { } public System.Collections.Generic.IList ExcludeExtensions { get { throw null; } } public string Id { get { throw null; } set { } } public bool? IsOverridable { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ComputeFleet.Models.ComputeFleetSecurityPostureReference 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.ComputeFleet.Models.ComputeFleetSecurityPostureReference System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -746,6 +835,7 @@ public ComputeFleetSecurityProfile() { } public Azure.ResourceManager.ComputeFleet.Models.ComputeFleetSecurityType? SecurityType { get { throw null; } set { } } public Azure.ResourceManager.ComputeFleet.Models.ComputeFleetUefiSettings UefiSettings { get { throw null; } set { } } public Azure.Core.ResourceIdentifier UserAssignedIdentityResourceId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ComputeFleet.Models.ComputeFleetSecurityProfile 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.ComputeFleet.Models.ComputeFleetSecurityProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -775,6 +865,7 @@ public partial class ComputeFleetSshPublicKey : System.ClientModel.Primitives.IJ public ComputeFleetSshPublicKey() { } public string KeyData { get { throw null; } set { } } public string Path { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ComputeFleet.Models.ComputeFleetSshPublicKey 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.ComputeFleet.Models.ComputeFleetSshPublicKey System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -809,6 +900,7 @@ public partial class ComputeFleetTerminateNotificationProfile : System.ClientMod public ComputeFleetTerminateNotificationProfile() { } public bool? IsEnabled { get { throw null; } set { } } public string NotBeforeTimeout { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ComputeFleet.Models.ComputeFleetTerminateNotificationProfile 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.ComputeFleet.Models.ComputeFleetTerminateNotificationProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -820,6 +912,7 @@ public partial class ComputeFleetUefiSettings : System.ClientModel.Primitives.IJ public ComputeFleetUefiSettings() { } public bool? IsSecureBootEnabled { get { throw null; } set { } } public bool? IsVTpmEnabled { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ComputeFleet.Models.ComputeFleetUefiSettings 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.ComputeFleet.Models.ComputeFleetUefiSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -831,6 +924,7 @@ public partial class ComputeFleetVaultCertificate : System.ClientModel.Primitive public ComputeFleetVaultCertificate() { } public string CertificateStore { get { throw null; } set { } } public System.Uri CertificateUri { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ComputeFleet.Models.ComputeFleetVaultCertificate 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.ComputeFleet.Models.ComputeFleetVaultCertificate System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -842,12 +936,109 @@ public partial class ComputeFleetVaultSecretGroup : System.ClientModel.Primitive public ComputeFleetVaultSecretGroup() { } public Azure.Core.ResourceIdentifier SourceVaultId { get { throw null; } set { } } public System.Collections.Generic.IList VaultCertificates { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ComputeFleet.Models.ComputeFleetVaultSecretGroup 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.ComputeFleet.Models.ComputeFleetVaultSecretGroup 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 partial class ComputeFleetVmAttributeMinMaxDouble : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ComputeFleetVmAttributeMinMaxDouble() { } + public double? Max { get { throw null; } set { } } + public double? Min { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ComputeFleet.Models.ComputeFleetVmAttributeMinMaxDouble 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.ComputeFleet.Models.ComputeFleetVmAttributeMinMaxDouble 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 partial class ComputeFleetVmAttributeMinMaxInteger : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ComputeFleetVmAttributeMinMaxInteger() { } + public int? Max { get { throw null; } set { } } + public int? Min { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ComputeFleet.Models.ComputeFleetVmAttributeMinMaxInteger 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.ComputeFleet.Models.ComputeFleetVmAttributeMinMaxInteger 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 partial class ComputeFleetVmAttributes : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ComputeFleetVmAttributes(Azure.ResourceManager.ComputeFleet.Models.ComputeFleetVmAttributeMinMaxInteger vCpuCount, Azure.ResourceManager.ComputeFleet.Models.ComputeFleetVmAttributeMinMaxDouble memoryInGiB) { } + public Azure.ResourceManager.ComputeFleet.Models.ComputeFleetVmAttributeMinMaxInteger AcceleratorCount { get { throw null; } set { } } + public System.Collections.Generic.IList AcceleratorManufacturers { get { throw null; } } + public Azure.ResourceManager.ComputeFleet.Models.ComputeFleetVmAttributeSupport? AcceleratorSupport { get { throw null; } set { } } + public System.Collections.Generic.IList AcceleratorTypes { get { throw null; } } + public System.Collections.Generic.IList ArchitectureTypes { get { throw null; } } + public Azure.ResourceManager.ComputeFleet.Models.ComputeFleetVmAttributeSupport? BurstableSupport { get { throw null; } set { } } + public System.Collections.Generic.IList CpuManufacturers { get { throw null; } } + public Azure.ResourceManager.ComputeFleet.Models.ComputeFleetVmAttributeMinMaxInteger DataDiskCount { get { throw null; } set { } } + public System.Collections.Generic.IList ExcludedVmSizes { get { throw null; } } + public System.Collections.Generic.IList LocalStorageDiskTypes { get { throw null; } } + public Azure.ResourceManager.ComputeFleet.Models.ComputeFleetVmAttributeMinMaxDouble LocalStorageInGiB { get { throw null; } set { } } + public Azure.ResourceManager.ComputeFleet.Models.ComputeFleetVmAttributeSupport? LocalStorageSupport { get { throw null; } set { } } + public Azure.ResourceManager.ComputeFleet.Models.ComputeFleetVmAttributeMinMaxDouble MemoryInGiB { get { throw null; } set { } } + public Azure.ResourceManager.ComputeFleet.Models.ComputeFleetVmAttributeMinMaxDouble MemoryInGiBPerVCpu { get { throw null; } set { } } + public Azure.ResourceManager.ComputeFleet.Models.ComputeFleetVmAttributeMinMaxDouble NetworkBandwidthInMbps { get { throw null; } set { } } + public Azure.ResourceManager.ComputeFleet.Models.ComputeFleetVmAttributeMinMaxInteger NetworkInterfaceCount { get { throw null; } set { } } + public Azure.ResourceManager.ComputeFleet.Models.ComputeFleetVmAttributeMinMaxInteger RdmaNetworkInterfaceCount { get { throw null; } set { } } + public Azure.ResourceManager.ComputeFleet.Models.ComputeFleetVmAttributeSupport? RdmaSupport { get { throw null; } set { } } + public Azure.ResourceManager.ComputeFleet.Models.ComputeFleetVmAttributeMinMaxInteger VCpuCount { get { throw null; } set { } } + public System.Collections.Generic.IList VmCategories { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ComputeFleet.Models.ComputeFleetVmAttributes 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.ComputeFleet.Models.ComputeFleetVmAttributes 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; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ComputeFleetVmAttributeSupport : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ComputeFleetVmAttributeSupport(string value) { throw null; } + public static Azure.ResourceManager.ComputeFleet.Models.ComputeFleetVmAttributeSupport Excluded { get { throw null; } } + public static Azure.ResourceManager.ComputeFleet.Models.ComputeFleetVmAttributeSupport Included { get { throw null; } } + public static Azure.ResourceManager.ComputeFleet.Models.ComputeFleetVmAttributeSupport Required { get { throw null; } } + public bool Equals(Azure.ResourceManager.ComputeFleet.Models.ComputeFleetVmAttributeSupport other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ComputeFleet.Models.ComputeFleetVmAttributeSupport left, Azure.ResourceManager.ComputeFleet.Models.ComputeFleetVmAttributeSupport right) { throw null; } + public static implicit operator Azure.ResourceManager.ComputeFleet.Models.ComputeFleetVmAttributeSupport (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ComputeFleet.Models.ComputeFleetVmAttributeSupport left, Azure.ResourceManager.ComputeFleet.Models.ComputeFleetVmAttributeSupport right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ComputeFleetVmCategory : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ComputeFleetVmCategory(string value) { throw null; } + public static Azure.ResourceManager.ComputeFleet.Models.ComputeFleetVmCategory ComputeOptimized { get { throw null; } } + public static Azure.ResourceManager.ComputeFleet.Models.ComputeFleetVmCategory FpgaAccelerated { get { throw null; } } + public static Azure.ResourceManager.ComputeFleet.Models.ComputeFleetVmCategory GeneralPurpose { get { throw null; } } + public static Azure.ResourceManager.ComputeFleet.Models.ComputeFleetVmCategory GpuAccelerated { get { throw null; } } + public static Azure.ResourceManager.ComputeFleet.Models.ComputeFleetVmCategory HighPerformanceCompute { get { throw null; } } + public static Azure.ResourceManager.ComputeFleet.Models.ComputeFleetVmCategory MemoryOptimized { get { throw null; } } + public static Azure.ResourceManager.ComputeFleet.Models.ComputeFleetVmCategory StorageOptimized { get { throw null; } } + public bool Equals(Azure.ResourceManager.ComputeFleet.Models.ComputeFleetVmCategory other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ComputeFleet.Models.ComputeFleetVmCategory left, Azure.ResourceManager.ComputeFleet.Models.ComputeFleetVmCategory right) { throw null; } + public static implicit operator Azure.ResourceManager.ComputeFleet.Models.ComputeFleetVmCategory (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ComputeFleet.Models.ComputeFleetVmCategory left, Azure.ResourceManager.ComputeFleet.Models.ComputeFleetVmCategory right) { throw null; } + public override string ToString() { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct ComputeFleetVmDeleteOption : System.IEquatable { @@ -871,6 +1062,7 @@ public partial class ComputeFleetVmDiskSecurityProfile : System.ClientModel.Prim public ComputeFleetVmDiskSecurityProfile() { } public Azure.Core.ResourceIdentifier DiskEncryptionSetId { get { throw null; } set { } } public Azure.ResourceManager.ComputeFleet.Models.ComputeFleetSecurityEncryptionType? SecurityEncryptionType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ComputeFleet.Models.ComputeFleetVmDiskSecurityProfile 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.ComputeFleet.Models.ComputeFleetVmDiskSecurityProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -886,6 +1078,7 @@ public ComputeFleetVmGalleryApplication(Azure.Core.ResourceIdentifier packageRef public int? Order { get { throw null; } set { } } public Azure.Core.ResourceIdentifier PackageReferenceId { get { throw null; } set { } } public string Tags { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ComputeFleet.Models.ComputeFleetVmGalleryApplication 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.ComputeFleet.Models.ComputeFleetVmGalleryApplication System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -899,6 +1092,7 @@ public ComputeFleetVmGuestPatchSettings() { } public Azure.ResourceManager.ComputeFleet.Models.ComputeFleetWindowsVmGuestPatchAutomaticByPlatformSettings AutomaticByPlatformSettings { get { throw null; } set { } } public bool? IsHotPatchingEnabled { get { throw null; } set { } } public Azure.ResourceManager.ComputeFleet.Models.ComputeFleetWindowsVmGuestPatchMode? PatchMode { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ComputeFleet.Models.ComputeFleetVmGuestPatchSettings 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.ComputeFleet.Models.ComputeFleetVmGuestPatchSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -923,6 +1117,7 @@ public ComputeFleetVmProfile() { } public Azure.Core.ResourceIdentifier ServiceArtifactReferenceId { get { throw null; } set { } } public Azure.ResourceManager.ComputeFleet.Models.ComputeFleetVmssStorageProfile StorageProfile { get { throw null; } set { } } public string UserData { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ComputeFleet.Models.ComputeFleetVmProfile 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.ComputeFleet.Models.ComputeFleetVmProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -934,6 +1129,7 @@ public partial class ComputeFleetVmSizeProfile : System.ClientModel.Primitives.I public ComputeFleetVmSizeProfile(string name) { } public string Name { get { throw null; } set { } } public int? Rank { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ComputeFleet.Models.ComputeFleetVmSizeProfile 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.ComputeFleet.Models.ComputeFleetVmSizeProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -945,6 +1141,7 @@ public partial class ComputeFleetVmSizeProperties : System.ClientModel.Primitive public ComputeFleetVmSizeProperties() { } public int? VCPUsAvailable { get { throw null; } set { } } public int? VCPUsPerCore { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ComputeFleet.Models.ComputeFleetVmSizeProperties 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.ComputeFleet.Models.ComputeFleetVmSizeProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -955,9 +1152,10 @@ public partial class ComputeFleetVmss : System.ClientModel.Primitives.IJsonModel { internal ComputeFleetVmss() { } public Azure.ResourceManager.ComputeFleet.Models.ComputeFleetApiError Error { get { throw null; } } - public string Id { get { throw null; } } + public Azure.Core.ResourceIdentifier Id { get { throw null; } } public Azure.ResourceManager.ComputeFleet.Models.ComputeFleetProvisioningState OperationStatus { get { throw null; } } public string Type { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ComputeFleet.Models.ComputeFleetVmss 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.ComputeFleet.Models.ComputeFleetVmss System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -977,6 +1175,7 @@ public ComputeFleetVmssDataDisk(int lun, Azure.ResourceManager.ComputeFleet.Mode public int Lun { get { throw null; } set { } } public Azure.ResourceManager.ComputeFleet.Models.ComputeFleetVmssManagedDisk ManagedDisk { get { throw null; } set { } } public string Name { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ComputeFleet.Models.ComputeFleetVmssDataDisk 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.ComputeFleet.Models.ComputeFleetVmssDataDisk System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -990,6 +1189,7 @@ public ComputeFleetVmssExtension() { } public Azure.Core.ResourceIdentifier Id { get { throw null; } } public string Name { get { throw null; } set { } } public Azure.ResourceManager.ComputeFleet.Models.ComputeFleetVmssExtensionProperties Properties { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ComputeFleet.Models.ComputeFleetVmssExtension 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.ComputeFleet.Models.ComputeFleetVmssExtension System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1001,6 +1201,7 @@ public partial class ComputeFleetVmssExtensionProfile : System.ClientModel.Primi public ComputeFleetVmssExtensionProfile() { } public System.Collections.Generic.IList Extensions { get { throw null; } } public string ExtensionsTimeBudget { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ComputeFleet.Models.ComputeFleetVmssExtensionProfile 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.ComputeFleet.Models.ComputeFleetVmssExtensionProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1022,6 +1223,7 @@ public ComputeFleetVmssExtensionProperties() { } public System.Collections.Generic.IDictionary Settings { get { throw null; } } public bool? ShouldAutoUpgradeMinorVersion { get { throw null; } set { } } public string TypeHandlerVersion { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ComputeFleet.Models.ComputeFleetVmssExtensionProperties 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.ComputeFleet.Models.ComputeFleetVmssExtensionProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1033,6 +1235,7 @@ public partial class ComputeFleetVmssIPConfiguration : System.ClientModel.Primit public ComputeFleetVmssIPConfiguration(string name) { } public string Name { get { throw null; } set { } } public Azure.ResourceManager.ComputeFleet.Models.ComputeFleetVmssIPConfigurationProperties Properties { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ComputeFleet.Models.ComputeFleetVmssIPConfiguration 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.ComputeFleet.Models.ComputeFleetVmssIPConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1050,6 +1253,7 @@ public ComputeFleetVmssIPConfigurationProperties() { } public Azure.ResourceManager.ComputeFleet.Models.ComputeFleetIPVersion? PrivateIPAddressVersion { get { throw null; } set { } } public Azure.ResourceManager.ComputeFleet.Models.ComputeFleetVmssPublicIPAddressConfiguration PublicIPAddressConfiguration { get { throw null; } set { } } public Azure.Core.ResourceIdentifier SubnetId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ComputeFleet.Models.ComputeFleetVmssIPConfigurationProperties 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.ComputeFleet.Models.ComputeFleetVmssIPConfigurationProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1061,6 +1265,7 @@ public partial class ComputeFleetVmssIPTag : System.ClientModel.Primitives.IJson public ComputeFleetVmssIPTag() { } public string IPTagType { get { throw null; } set { } } public string Tag { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ComputeFleet.Models.ComputeFleetVmssIPTag 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.ComputeFleet.Models.ComputeFleetVmssIPTag System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1073,6 +1278,7 @@ public ComputeFleetVmssManagedDisk() { } public Azure.Core.ResourceIdentifier DiskEncryptionSetId { get { throw null; } set { } } public Azure.ResourceManager.ComputeFleet.Models.ComputeFleetVmDiskSecurityProfile SecurityProfile { get { throw null; } set { } } public Azure.ResourceManager.ComputeFleet.Models.ComputeFleetStorageAccountType? StorageAccountType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ComputeFleet.Models.ComputeFleetVmssManagedDisk 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.ComputeFleet.Models.ComputeFleetVmssManagedDisk System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1084,6 +1290,7 @@ public partial class ComputeFleetVmssNetworkConfiguration : System.ClientModel.P public ComputeFleetVmssNetworkConfiguration(string name) { } public string Name { get { throw null; } set { } } public Azure.ResourceManager.ComputeFleet.Models.ComputeFleetVmssNetworkConfigurationProperties Properties { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ComputeFleet.Models.ComputeFleetVmssNetworkConfiguration 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.ComputeFleet.Models.ComputeFleetVmssNetworkConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1104,6 +1311,7 @@ public ComputeFleetVmssNetworkConfigurationProperties(System.Collections.Generic public bool? IsPrimary { get { throw null; } set { } } public bool? IsTcpStateTrackingDisabled { get { throw null; } set { } } public Azure.Core.ResourceIdentifier NetworkSecurityGroupId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ComputeFleet.Models.ComputeFleetVmssNetworkConfigurationProperties 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.ComputeFleet.Models.ComputeFleetVmssNetworkConfigurationProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1116,6 +1324,7 @@ public ComputeFleetVmssNetworkProfile() { } public Azure.Core.ResourceIdentifier HealthProbeId { get { throw null; } set { } } public Azure.ResourceManager.ComputeFleet.Models.ComputeFleetNetworkApiVersion? NetworkApiVersion { get { throw null; } set { } } public System.Collections.Generic.IList NetworkInterfaceConfigurations { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ComputeFleet.Models.ComputeFleetVmssNetworkProfile 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.ComputeFleet.Models.ComputeFleetVmssNetworkProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1136,6 +1345,7 @@ public ComputeFleetVmssOSDisk(Azure.ResourceManager.ComputeFleet.Models.ComputeF public string Name { get { throw null; } set { } } public Azure.ResourceManager.ComputeFleet.Models.ComputeFleetOperatingSystemType? OSType { get { throw null; } set { } } public System.Collections.Generic.IList VhdContainers { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ComputeFleet.Models.ComputeFleetVmssOSDisk 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.ComputeFleet.Models.ComputeFleetVmssOSDisk System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1154,6 +1364,7 @@ public ComputeFleetVmssOSProfile() { } public Azure.ResourceManager.ComputeFleet.Models.ComputeFleetLinuxConfiguration LinuxConfiguration { get { throw null; } set { } } public System.Collections.Generic.IList Secrets { get { throw null; } } public Azure.ResourceManager.ComputeFleet.Models.ComputeFleetWindowsConfiguration WindowsConfiguration { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ComputeFleet.Models.ComputeFleetVmssOSProfile 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.ComputeFleet.Models.ComputeFleetVmssOSProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1166,6 +1377,7 @@ public ComputeFleetVmssPublicIPAddressConfiguration(string name) { } public string Name { get { throw null; } set { } } public Azure.ResourceManager.ComputeFleet.Models.ComputeFleetVmssPublicIPAddressConfigurationProperties Properties { get { throw null; } set { } } public Azure.ResourceManager.ComputeFleet.Models.ComputeFleetPublicIPAddressSku Sku { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ComputeFleet.Models.ComputeFleetVmssPublicIPAddressConfiguration 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.ComputeFleet.Models.ComputeFleetVmssPublicIPAddressConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1181,6 +1393,7 @@ public ComputeFleetVmssPublicIPAddressConfigurationProperties() { } public System.Collections.Generic.IList IPTags { get { throw null; } } public Azure.ResourceManager.ComputeFleet.Models.ComputeFleetIPVersion? PublicIPAddressVersion { get { throw null; } set { } } public Azure.Core.ResourceIdentifier PublicIPPrefixId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ComputeFleet.Models.ComputeFleetVmssPublicIPAddressConfigurationProperties 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.ComputeFleet.Models.ComputeFleetVmssPublicIPAddressConfigurationProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1192,6 +1405,7 @@ public partial class ComputeFleetVmssPublicIPAddressDnsSettings : System.ClientM public ComputeFleetVmssPublicIPAddressDnsSettings(string domainNameLabel) { } public string DomainNameLabel { get { throw null; } set { } } public Azure.ResourceManager.ComputeFleet.Models.ComputeFleetDomainNameLabelScopeType? DomainNameLabelScope { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ComputeFleet.Models.ComputeFleetVmssPublicIPAddressDnsSettings 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.ComputeFleet.Models.ComputeFleetVmssPublicIPAddressDnsSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1205,6 +1419,7 @@ public ComputeFleetVmssStorageProfile() { } public Azure.ResourceManager.ComputeFleet.Models.ComputeFleetDiskControllerType? DiskControllerType { get { throw null; } set { } } public Azure.ResourceManager.ComputeFleet.Models.ComputeFleetImageReference ImageReference { get { throw null; } set { } } public Azure.ResourceManager.ComputeFleet.Models.ComputeFleetVmssOSDisk OSDisk { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ComputeFleet.Models.ComputeFleetVmssStorageProfile 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.ComputeFleet.Models.ComputeFleetVmssStorageProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1221,6 +1436,7 @@ public ComputeFleetWindowsConfiguration() { } public Azure.ResourceManager.ComputeFleet.Models.ComputeFleetVmGuestPatchSettings PatchSettings { get { throw null; } set { } } public string TimeZone { get { throw null; } set { } } public System.Collections.Generic.IList WinRMListeners { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ComputeFleet.Models.ComputeFleetWindowsConfiguration 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.ComputeFleet.Models.ComputeFleetWindowsConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1270,6 +1486,7 @@ public partial class ComputeFleetWindowsVmGuestPatchAutomaticByPlatformSettings public ComputeFleetWindowsVmGuestPatchAutomaticByPlatformSettings() { } public bool? IsBypassPlatformSafetyChecksOnUserScheduleEnabled { get { throw null; } set { } } public Azure.ResourceManager.ComputeFleet.Models.ComputeFleetWindowsVmGuestPatchAutomaticByPlatformRebootSetting? RebootSetting { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ComputeFleet.Models.ComputeFleetWindowsVmGuestPatchAutomaticByPlatformSettings 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.ComputeFleet.Models.ComputeFleetWindowsVmGuestPatchAutomaticByPlatformSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1300,6 +1517,7 @@ public partial class ComputeFleetWinRMListener : System.ClientModel.Primitives.I public ComputeFleetWinRMListener() { } public System.Uri CertificateUri { get { throw null; } set { } } public Azure.ResourceManager.ComputeFleet.Models.ComputeFleetProtocolType? Protocol { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ComputeFleet.Models.ComputeFleetWinRMListener 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.ComputeFleet.Models.ComputeFleetWinRMListener System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1307,6 +1525,56 @@ public ComputeFleetWinRMListener() { } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct CpuManufacturer : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public CpuManufacturer(string value) { throw null; } + public static Azure.ResourceManager.ComputeFleet.Models.CpuManufacturer AMD { get { throw null; } } + public static Azure.ResourceManager.ComputeFleet.Models.CpuManufacturer Ampere { get { throw null; } } + public static Azure.ResourceManager.ComputeFleet.Models.CpuManufacturer Intel { get { throw null; } } + public static Azure.ResourceManager.ComputeFleet.Models.CpuManufacturer Microsoft { get { throw null; } } + public bool Equals(Azure.ResourceManager.ComputeFleet.Models.CpuManufacturer other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ComputeFleet.Models.CpuManufacturer left, Azure.ResourceManager.ComputeFleet.Models.CpuManufacturer right) { throw null; } + public static implicit operator Azure.ResourceManager.ComputeFleet.Models.CpuManufacturer (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ComputeFleet.Models.CpuManufacturer left, Azure.ResourceManager.ComputeFleet.Models.CpuManufacturer right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct LocalStorageDiskType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public LocalStorageDiskType(string value) { throw null; } + public static Azure.ResourceManager.ComputeFleet.Models.LocalStorageDiskType HDD { get { throw null; } } + public static Azure.ResourceManager.ComputeFleet.Models.LocalStorageDiskType SSD { get { throw null; } } + public bool Equals(Azure.ResourceManager.ComputeFleet.Models.LocalStorageDiskType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ComputeFleet.Models.LocalStorageDiskType left, Azure.ResourceManager.ComputeFleet.Models.LocalStorageDiskType right) { throw null; } + public static implicit operator Azure.ResourceManager.ComputeFleet.Models.LocalStorageDiskType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ComputeFleet.Models.LocalStorageDiskType left, Azure.ResourceManager.ComputeFleet.Models.LocalStorageDiskType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class LocationProfile : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public LocationProfile(Azure.Core.AzureLocation location) { } + public Azure.Core.AzureLocation Location { get { throw null; } set { } } + public Azure.ResourceManager.ComputeFleet.Models.ComputeFleetVmProfile VirtualMachineProfileOverride { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ComputeFleet.Models.LocationProfile 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.ComputeFleet.Models.LocationProfile 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; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct ProxyAgentExecuteMode : System.IEquatable { private readonly object _dummy; @@ -1348,6 +1616,7 @@ public RegularPriorityProfile() { } public Azure.ResourceManager.ComputeFleet.Models.RegularPriorityAllocationStrategy? AllocationStrategy { get { throw null; } set { } } public int? Capacity { get { throw null; } set { } } public int? MinCapacity { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ComputeFleet.Models.RegularPriorityProfile 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.ComputeFleet.Models.RegularPriorityProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1382,6 +1651,7 @@ public SpotPriorityProfile() { } public bool? IsMaintainEnabled { get { throw null; } set { } } public float? MaxPricePerVm { get { throw null; } set { } } public int? MinCapacity { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ComputeFleet.Models.SpotPriorityProfile 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.ComputeFleet.Models.SpotPriorityProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1395,6 +1665,7 @@ public WindowsSetupAdditionalInformation() { } public string Content { get { throw null; } set { } } public Azure.ResourceManager.ComputeFleet.Models.WindowsSetupAdditionalInformationPassName? PassName { get { throw null; } set { } } public Azure.ResourceManager.ComputeFleet.Models.AdditionalInformationSettingName? SettingName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ComputeFleet.Models.WindowsSetupAdditionalInformation 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.ComputeFleet.Models.WindowsSetupAdditionalInformation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/assets.json b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/assets.json index bd48d8ebefd9..ce6cfb5cf31e 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/assets.json +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/computefleet/Azure.ResourceManager.ComputeFleet", - "Tag": "net/computefleet/Azure.ResourceManager.ComputeFleet_18fc3c7f41" + "Tag": "net/computefleet/Azure.ResourceManager.ComputeFleet_f1f5d520b7" } diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/samples/Generated/Samples/Sample_ComputeFleetCollection.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/samples/Generated/Samples/Sample_ComputeFleetCollection.cs index 7eaf94193aa7..1f1e0989278f 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/samples/Generated/Samples/Sample_ComputeFleetCollection.cs +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/samples/Generated/Samples/Sample_ComputeFleetCollection.cs @@ -23,8 +23,8 @@ public partial class Sample_ComputeFleetCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_FleetsGet() { - // Generated from example definition: 2024-05-01-preview/Fleets_Get.json - // this example is just showing the usage of "Fleets_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-11-01/Fleets_Get.json + // this example is just showing the usage of "Fleet_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -57,8 +57,8 @@ public async Task Get_FleetsGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_FleetsGet() { - // Generated from example definition: 2024-05-01-preview/Fleets_Get.json - // this example is just showing the usage of "Fleets_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-11-01/Fleets_Get.json + // this example is just showing the usage of "Fleet_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -87,8 +87,8 @@ public async Task Exists_FleetsGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_FleetsGet() { - // Generated from example definition: 2024-05-01-preview/Fleets_Get.json - // this example is just showing the usage of "Fleets_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-11-01/Fleets_Get.json + // this example is just showing the usage of "Fleet_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -129,8 +129,8 @@ public async Task GetIfExists_FleetsGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_FleetsCreateOrUpdate() { - // Generated from example definition: 2024-05-01-preview/Fleets_CreateOrUpdate.json - // this example is just showing the usage of "Fleets_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-11-01/Fleets_CreateOrUpdate.json + // this example is just showing the usage of "Fleet_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -302,8 +302,8 @@ public async Task CreateOrUpdate_FleetsCreateOrUpdate() DiskEncryptionSetId = new ResourceIdentifier("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}"), }, }, -DiskIopsReadWrite = 27, -DiskMbpsReadWrite = 2, +DiskIopsReadWrite = 27L, +DiskMbpsReadWrite = 2L, DeleteOption = ComputeFleetDiskDeleteOptionType.Delete, } }, @@ -510,7 +510,7 @@ public async Task CreateOrUpdate_FleetsCreateOrUpdate() { Capacity = 20, MinCapacity = 10, - MaxPricePerVm = (float)0.00865, + MaxPricePerVm = 0.00865F, EvictionPolicy = ComputeFleetEvictionPolicy.Delete, AllocationStrategy = SpotAllocationStrategy.PriceCapacityOptimized, IsMaintainEnabled = true, @@ -558,8 +558,8 @@ public async Task CreateOrUpdate_FleetsCreateOrUpdate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_FleetsCreateOrUpdateMinimumSet() { - // Generated from example definition: 2024-05-01-preview/Fleets_CreateOrUpdate_MinimumSet.json - // this example is just showing the usage of "Fleets_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-11-01/Fleets_CreateOrUpdate_MinimumSet.json + // this example is just showing the usage of "Fleet_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -687,7 +687,7 @@ public async Task CreateOrUpdate_FleetsCreateOrUpdateMinimumSet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_FleetsListByResourceGroup() { - // Generated from example definition: 2024-05-01-preview/Fleets_ListByResourceGroup.json + // Generated from example definition: 2024-11-01/Fleets_ListByResourceGroup.json // this example is just showing the usage of "Fleet_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/samples/Generated/Samples/Sample_ComputeFleetResource.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/samples/Generated/Samples/Sample_ComputeFleetResource.cs index 5c6c9f19fdd7..095e2ec235d2 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/samples/Generated/Samples/Sample_ComputeFleetResource.cs +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/samples/Generated/Samples/Sample_ComputeFleetResource.cs @@ -23,8 +23,8 @@ public partial class Sample_ComputeFleetResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_FleetsGet() { - // Generated from example definition: 2024-05-01-preview/Fleets_Get.json - // this example is just showing the usage of "Fleets_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-11-01/Fleets_Get.json + // this example is just showing the usage of "Fleet_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -54,8 +54,8 @@ public async Task Get_FleetsGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_FleetsUpdate() { - // Generated from example definition: 2024-05-01-preview/Fleets_Update.json - // this example is just showing the usage of "Fleets_Update" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-11-01/Fleets_Update.json + // this example is just showing the usage of "Fleet_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -233,8 +233,8 @@ public async Task Update_FleetsUpdate() DiskEncryptionSetId = new ResourceIdentifier("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}"), }, }, -DiskIopsReadWrite = 27, -DiskMbpsReadWrite = 2, +DiskIopsReadWrite = 27L, +DiskMbpsReadWrite = 2L, DeleteOption = ComputeFleetDiskDeleteOptionType.Delete, } }, @@ -441,7 +441,7 @@ public async Task Update_FleetsUpdate() { Capacity = 20, MinCapacity = 10, - MaxPricePerVm = (float)0.00865, + MaxPricePerVm = 0.00865F, EvictionPolicy = ComputeFleetEvictionPolicy.Delete, AllocationStrategy = SpotAllocationStrategy.PriceCapacityOptimized, IsMaintainEnabled = true, @@ -469,8 +469,8 @@ public async Task Update_FleetsUpdate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_FleetsDelete() { - // Generated from example definition: 2024-05-01-preview/Fleets_Delete.json - // this example is just showing the usage of "Fleets_Delete" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-11-01/Fleets_Delete.json + // this example is just showing the usage of "Fleet_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -496,7 +496,7 @@ public async Task Delete_FleetsDelete() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetComputeFleets_FleetsListBySubscription() { - // Generated from example definition: 2024-05-01-preview/Fleets_ListBySubscription.json + // Generated from example definition: 2024-11-01/Fleets_ListBySubscription.json // this example is just showing the usage of "Fleet_ListBySubscription" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -528,7 +528,7 @@ public async Task GetComputeFleets_FleetsListBySubscription() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetVirtualMachineScaleSets_FleetsListVirtualMachineScaleSets() { - // Generated from example definition: 2024-05-01-preview/Fleets_ListVirtualMachineScaleSets.json + // Generated from example definition: 2024-11-01/Fleets_ListVirtualMachineScaleSets.json // this example is just showing the usage of "VirtualMachineScaleSet_ListVirtualMachineScaleSets" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Azure.ResourceManager.ComputeFleet.csproj b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Azure.ResourceManager.ComputeFleet.csproj index e09d0f669209..4709abaa9894 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Azure.ResourceManager.ComputeFleet.csproj +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Azure.ResourceManager.ComputeFleet.csproj @@ -1,6 +1,8 @@ - 1.0.0-beta.2 + 1.1.0-beta.1 + + 1.0.0 Azure.ResourceManager.ComputeFleet Azure Resource Manager client SDK for Azure resource provider ComputeFleet. azure;management;arm;resource manager;computefleet diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/ArmComputeFleetModelFactory.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/ArmComputeFleetModelFactory.cs index 84ec227471d8..2ba45ef79c6e 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/ArmComputeFleetModelFactory.cs +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/ArmComputeFleetModelFactory.cs @@ -52,19 +52,24 @@ public static ComputeFleetData ComputeFleetData(ResourceIdentifier id = null, st /// Configuration Options for Spot instances in Compute Fleet. /// Configuration Options for Regular instances in Compute Fleet. /// List of VM sizes supported for Compute Fleet. + /// Attribute based Fleet. + /// Represents the configuration for additional locations where Fleet resources may be deployed. /// Compute Profile to use for running user's workloads. /// Specifies the time at which the Compute Fleet is created. /// Specifies the ID which uniquely identifies a Compute Fleet. /// A new instance for mocking. - public static ComputeFleetProperties ComputeFleetProperties(ComputeFleetProvisioningState? provisioningState = null, SpotPriorityProfile spotPriorityProfile = null, RegularPriorityProfile regularPriorityProfile = null, IEnumerable vmSizesProfile = null, ComputeFleetComputeProfile computeProfile = null, DateTimeOffset? createdOn = null, string uniqueId = null) + public static ComputeFleetProperties ComputeFleetProperties(ComputeFleetProvisioningState? provisioningState = null, SpotPriorityProfile spotPriorityProfile = null, RegularPriorityProfile regularPriorityProfile = null, IEnumerable vmSizesProfile = null, ComputeFleetVmAttributes vmAttributes = null, IEnumerable additionalLocationsLocationProfiles = null, ComputeFleetComputeProfile computeProfile = null, DateTimeOffset? createdOn = null, string uniqueId = null) { vmSizesProfile ??= new List(); + additionalLocationsLocationProfiles ??= new List(); return new ComputeFleetProperties( provisioningState, spotPriorityProfile, regularPriorityProfile, vmSizesProfile?.ToList(), + vmAttributes, + additionalLocationsLocationProfiles != null ? new AdditionalLocationsProfile(additionalLocationsLocationProfiles?.ToList(), serializedAdditionalRawData: null) : null, computeProfile, createdOn, uniqueId, @@ -284,7 +289,7 @@ public static ComputeFleetVmssExtensionProperties ComputeFleetVmssExtensionPrope /// This represents the operationStatus of the VMSS in response to the last operation that was performed on it by Azure Fleet resource. /// Error Information when `operationStatus` is `Failed`. /// A new instance for mocking. - public static ComputeFleetVmss ComputeFleetVmss(string id = null, string type = null, ComputeFleetProvisioningState operationStatus = default, ComputeFleetApiError error = null) + public static ComputeFleetVmss ComputeFleetVmss(ResourceIdentifier id = null, string type = null, ComputeFleetProvisioningState operationStatus = default, ComputeFleetApiError error = null) { return new ComputeFleetVmss(id, type, operationStatus, error, serializedAdditionalRawData: null); } diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/ComputeFleetCollection.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/ComputeFleetCollection.cs index 323ce687d8fb..8a22e425510c 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/ComputeFleetCollection.cs +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/ComputeFleetCollection.cs @@ -61,11 +61,11 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id - /// Fleets_CreateOrUpdate + /// Fleet_CreateOrUpdate /// /// /// Default Api Version - /// 2024-05-01-preview + /// 2024-11-01 /// /// /// Resource @@ -110,11 +110,11 @@ public virtual async Task> CreateOrUpdateAsyn /// /// /// Operation Id - /// Fleets_CreateOrUpdate + /// Fleet_CreateOrUpdate /// /// /// Default Api Version - /// 2024-05-01-preview + /// 2024-11-01 /// /// /// Resource @@ -159,11 +159,11 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitU /// /// /// Operation Id - /// Fleets_Get + /// Fleet_Get /// /// /// Default Api Version - /// 2024-05-01-preview + /// 2024-11-01 /// /// /// Resource @@ -204,11 +204,11 @@ public virtual async Task> GetAsync(string fleetN /// /// /// Operation Id - /// Fleets_Get + /// Fleet_Get /// /// /// Default Api Version - /// 2024-05-01-preview + /// 2024-11-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string fleetName, Cancellation /// /// /// Default Api Version - /// 2024-05-01-preview + /// 2024-11-01 /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken /// /// /// Default Api Version - /// 2024-05-01-preview + /// 2024-11-01 /// /// /// Resource @@ -309,11 +309,11 @@ public virtual Pageable GetAll(CancellationToken cancellat /// /// /// Operation Id - /// Fleets_Get + /// Fleet_Get /// /// /// Default Api Version - /// 2024-05-01-preview + /// 2024-11-01 /// /// /// Resource @@ -352,11 +352,11 @@ public virtual async Task> ExistsAsync(string fleetName, Cancella /// /// /// Operation Id - /// Fleets_Get + /// Fleet_Get /// /// /// Default Api Version - /// 2024-05-01-preview + /// 2024-11-01 /// /// /// Resource @@ -395,11 +395,11 @@ public virtual Response Exists(string fleetName, CancellationToken cancell /// /// /// Operation Id - /// Fleets_Get + /// Fleet_Get /// /// /// Default Api Version - /// 2024-05-01-preview + /// 2024-11-01 /// /// /// Resource @@ -440,11 +440,11 @@ public virtual async Task> GetIfExistsAsy /// /// /// Operation Id - /// Fleets_Get + /// Fleet_Get /// /// /// Default Api Version - /// 2024-05-01-preview + /// 2024-11-01 /// /// /// Resource diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/ComputeFleetData.Serialization.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/ComputeFleetData.Serialization.cs index 25e0baf0c9de..7f5929904957 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/ComputeFleetData.Serialization.cs +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/ComputeFleetData.Serialization.cs @@ -20,6 +20,15 @@ public partial class ComputeFleetData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(ComputeFleetData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); @@ -54,55 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter writer.WritePropertyName("plan"u8); JsonSerializer.Serialize(writer, Plan); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ComputeFleetData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/ComputeFleetResource.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/ComputeFleetResource.cs index 150cc0ab22f8..59c19ff9ca4e 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/ComputeFleetResource.cs +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/ComputeFleetResource.cs @@ -100,11 +100,11 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id - /// Fleets_Get + /// Fleet_Get /// /// /// Default Api Version - /// 2024-05-01-preview + /// 2024-11-01 /// /// /// Resource @@ -140,11 +140,11 @@ public virtual async Task> GetAsync(CancellationT /// /// /// Operation Id - /// Fleets_Get + /// Fleet_Get /// /// /// Default Api Version - /// 2024-05-01-preview + /// 2024-11-01 /// /// /// Resource @@ -180,11 +180,11 @@ public virtual Response Get(CancellationToken cancellation /// /// /// Operation Id - /// Fleets_Delete + /// Fleet_Delete /// /// /// Default Api Version - /// 2024-05-01-preview + /// 2024-11-01 /// /// /// Resource @@ -222,11 +222,11 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Operation Id - /// Fleets_Delete + /// Fleet_Delete /// /// /// Default Api Version - /// 2024-05-01-preview + /// 2024-11-01 /// /// /// Resource @@ -264,11 +264,11 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Operation Id - /// Fleets_Update + /// Fleet_Update /// /// /// Default Api Version - /// 2024-05-01-preview + /// 2024-11-01 /// /// /// Resource @@ -310,11 +310,11 @@ public virtual async Task> UpdateAsync(WaitUn /// /// /// Operation Id - /// Fleets_Update + /// Fleet_Update /// /// /// Default Api Version - /// 2024-05-01-preview + /// 2024-11-01 /// /// /// Resource @@ -360,7 +360,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, Co /// /// /// Default Api Version - /// 2024-05-01-preview + /// 2024-11-01 /// /// /// Resource @@ -390,7 +390,7 @@ public virtual AsyncPageable GetVirtualMachineScaleSetsAsync(C /// /// /// Default Api Version - /// 2024-05-01-preview + /// 2024-11-01 /// /// /// Resource @@ -416,11 +416,11 @@ public virtual Pageable GetVirtualMachineScaleSets(Cancellatio /// /// /// Operation Id - /// Fleets_Get + /// Fleet_Get /// /// /// Default Api Version - /// 2024-05-01-preview + /// 2024-11-01 /// /// /// Resource @@ -478,11 +478,11 @@ public virtual async Task> AddTagAsync(string key /// /// /// Operation Id - /// Fleets_Get + /// Fleet_Get /// /// /// Default Api Version - /// 2024-05-01-preview + /// 2024-11-01 /// /// /// Resource @@ -540,11 +540,11 @@ public virtual Response AddTag(string key, string value, C /// /// /// Operation Id - /// Fleets_Get + /// Fleet_Get /// /// /// Default Api Version - /// 2024-05-01-preview + /// 2024-11-01 /// /// /// Resource @@ -597,11 +597,11 @@ public virtual async Task> SetTagsAsync(IDictiona /// /// /// Operation Id - /// Fleets_Get + /// Fleet_Get /// /// /// Default Api Version - /// 2024-05-01-preview + /// 2024-11-01 /// /// /// Resource @@ -654,11 +654,11 @@ public virtual Response SetTags(IDictionary /// /// Operation Id - /// Fleets_Get + /// Fleet_Get /// /// /// Default Api Version - /// 2024-05-01-preview + /// 2024-11-01 /// /// /// Resource @@ -714,11 +714,11 @@ public virtual async Task> RemoveTagAsync(string /// /// /// Operation Id - /// Fleets_Get + /// Fleet_Get /// /// /// Default Api Version - /// 2024-05-01-preview + /// 2024-11-01 /// /// /// Resource diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Extensions/ComputeFleetExtensions.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Extensions/ComputeFleetExtensions.cs index 70ee5bc010ec..9cca4779157c 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Extensions/ComputeFleetExtensions.cs +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Extensions/ComputeFleetExtensions.cs @@ -77,11 +77,11 @@ public static ComputeFleetCollection GetComputeFleets(this ResourceGroupResource /// /// /// Operation Id - /// Fleets_Get + /// Fleet_Get /// /// /// Default Api Version - /// 2024-05-01-preview + /// 2024-11-01 /// /// /// Resource @@ -115,11 +115,11 @@ public static async Task> GetComputeFleetAsync(th /// /// /// Operation Id - /// Fleets_Get + /// Fleet_Get /// /// /// Default Api Version - /// 2024-05-01-preview + /// 2024-11-01 /// /// /// Resource @@ -157,7 +157,7 @@ public static Response GetComputeFleet(this ResourceGroupR /// /// /// Default Api Version - /// 2024-05-01-preview + /// 2024-11-01 /// /// /// Resource @@ -193,7 +193,7 @@ public static AsyncPageable GetComputeFleetsAsync(this Sub /// /// /// Default Api Version - /// 2024-05-01-preview + /// 2024-11-01 /// /// /// Resource diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Extensions/MockableComputeFleetResourceGroupResource.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Extensions/MockableComputeFleetResourceGroupResource.cs index f1d8341de4ee..764cdb4ece65 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Extensions/MockableComputeFleetResourceGroupResource.cs +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Extensions/MockableComputeFleetResourceGroupResource.cs @@ -49,11 +49,11 @@ public virtual ComputeFleetCollection GetComputeFleets() /// /// /// Operation Id - /// Fleets_Get + /// Fleet_Get /// /// /// Default Api Version - /// 2024-05-01-preview + /// 2024-11-01 /// /// /// Resource @@ -80,11 +80,11 @@ public virtual async Task> GetComputeFleetAsync(s /// /// /// Operation Id - /// Fleets_Get + /// Fleet_Get /// /// /// Default Api Version - /// 2024-05-01-preview + /// 2024-11-01 /// /// /// Resource diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Extensions/MockableComputeFleetSubscriptionResource.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Extensions/MockableComputeFleetSubscriptionResource.cs index 76dd9cbeec5d..9de02268efb1 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Extensions/MockableComputeFleetSubscriptionResource.cs +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Extensions/MockableComputeFleetSubscriptionResource.cs @@ -52,7 +52,7 @@ private string GetApiVersionOrNull(ResourceType resourceType) /// /// /// Default Api Version - /// 2024-05-01-preview + /// 2024-11-01 /// /// /// Resource @@ -82,7 +82,7 @@ public virtual AsyncPageable GetComputeFleetsAsync(Cancell /// /// /// Default Api Version - /// 2024-05-01-preview + /// 2024-11-01 /// /// /// Resource diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/AcceleratorManufacturer.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/AcceleratorManufacturer.cs new file mode 100644 index 000000000000..37b5a090a6d2 --- /dev/null +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/AcceleratorManufacturer.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ComputeFleet.Models +{ + /// Accelerator manufacturers supported by Azure VMs. + public readonly partial struct AcceleratorManufacturer : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AcceleratorManufacturer(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AMDValue = "AMD"; + private const string NvidiaValue = "Nvidia"; + private const string XilinxValue = "Xilinx"; + + /// AMD GpuType. + public static AcceleratorManufacturer AMD { get; } = new AcceleratorManufacturer(AMDValue); + /// Nvidia GpuType. + public static AcceleratorManufacturer Nvidia { get; } = new AcceleratorManufacturer(NvidiaValue); + /// Xilinx GpuType. + public static AcceleratorManufacturer Xilinx { get; } = new AcceleratorManufacturer(XilinxValue); + /// Determines if two values are the same. + public static bool operator ==(AcceleratorManufacturer left, AcceleratorManufacturer right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AcceleratorManufacturer left, AcceleratorManufacturer right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator AcceleratorManufacturer(string value) => new AcceleratorManufacturer(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AcceleratorManufacturer other && Equals(other); + /// + public bool Equals(AcceleratorManufacturer other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/AcceleratorType.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/AcceleratorType.cs new file mode 100644 index 000000000000..c28c55d1858f --- /dev/null +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/AcceleratorType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ComputeFleet.Models +{ + /// Accelerator types supported by Azure VMs. + public readonly partial struct AcceleratorType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AcceleratorType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string GPUValue = "GPU"; + private const string FPGAValue = "FPGA"; + + /// GPU Accelerator. + public static AcceleratorType GPU { get; } = new AcceleratorType(GPUValue); + /// FPGA Accelerator. + public static AcceleratorType FPGA { get; } = new AcceleratorType(FPGAValue); + /// Determines if two values are the same. + public static bool operator ==(AcceleratorType left, AcceleratorType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AcceleratorType left, AcceleratorType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator AcceleratorType(string value) => new AcceleratorType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AcceleratorType other && Equals(other); + /// + public bool Equals(AcceleratorType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/AdditionalCapabilities.Serialization.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/AdditionalCapabilities.Serialization.cs new file mode 100644 index 000000000000..389daf23d2ab --- /dev/null +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/AdditionalCapabilities.Serialization.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ComputeFleet.Models +{ + public partial class AdditionalCapabilities : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AdditionalCapabilities)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(IsUltraSSDEnabled)) + { + writer.WritePropertyName("ultraSSDEnabled"u8); + writer.WriteBooleanValue(IsUltraSSDEnabled.Value); + } + if (Optional.IsDefined(IsHibernationEnabled)) + { + writer.WritePropertyName("hibernationEnabled"u8); + writer.WriteBooleanValue(IsHibernationEnabled.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AdditionalCapabilities IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AdditionalCapabilities)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAdditionalCapabilities(document.RootElement, options); + } + + internal static AdditionalCapabilities DeserializeAdditionalCapabilities(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + bool? ultraSSDEnabled = default; + bool? hibernationEnabled = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("ultraSSDEnabled"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + ultraSSDEnabled = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("hibernationEnabled"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + hibernationEnabled = property.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AdditionalCapabilities(ultraSSDEnabled, hibernationEnabled, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AdditionalCapabilities)} does not support writing '{options.Format}' format."); + } + } + + AdditionalCapabilities IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeAdditionalCapabilities(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AdditionalCapabilities)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/AdditionalCapabilities.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/AdditionalCapabilities.cs new file mode 100644 index 000000000000..b1c6607634d3 --- /dev/null +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/AdditionalCapabilities.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ComputeFleet.Models +{ + /// AdditionalCapabilities for VM. + public partial class AdditionalCapabilities + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public AdditionalCapabilities() + { + } + + /// Initializes a new instance of . + /// + /// The flag that enables or disables a capability to have one or more managed data disks with UltraSSD_LRS storage account type on the VM or VMSS. + /// Managed disks with storage account type UltraSSD_LRS can be added to a virtual machine or virtual machine scale set only if this property is enabled. + /// + /// The flag that enables or disables hibernation capability on the VM. + /// Keeps track of any properties unknown to the library. + internal AdditionalCapabilities(bool? isUltraSSDEnabled, bool? isHibernationEnabled, IDictionary serializedAdditionalRawData) + { + IsUltraSSDEnabled = isUltraSSDEnabled; + IsHibernationEnabled = isHibernationEnabled; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// + /// The flag that enables or disables a capability to have one or more managed data disks with UltraSSD_LRS storage account type on the VM or VMSS. + /// Managed disks with storage account type UltraSSD_LRS can be added to a virtual machine or virtual machine scale set only if this property is enabled. + /// + public bool? IsUltraSSDEnabled { get; set; } + /// The flag that enables or disables hibernation capability on the VM. + public bool? IsHibernationEnabled { get; set; } + } +} diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/AdditionalLocationsProfile.Serialization.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/AdditionalLocationsProfile.Serialization.cs new file mode 100644 index 000000000000..ea4f5ad7881f --- /dev/null +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/AdditionalLocationsProfile.Serialization.cs @@ -0,0 +1,136 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ComputeFleet.Models +{ + internal partial class AdditionalLocationsProfile : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AdditionalLocationsProfile)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("locationProfiles"u8); + writer.WriteStartArray(); + foreach (var item in LocationProfiles) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AdditionalLocationsProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AdditionalLocationsProfile)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAdditionalLocationsProfile(document.RootElement, options); + } + + internal static AdditionalLocationsProfile DeserializeAdditionalLocationsProfile(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList locationProfiles = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("locationProfiles"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(LocationProfile.DeserializeLocationProfile(item, options)); + } + locationProfiles = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AdditionalLocationsProfile(locationProfiles, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AdditionalLocationsProfile)} does not support writing '{options.Format}' format."); + } + } + + AdditionalLocationsProfile IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeAdditionalLocationsProfile(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AdditionalLocationsProfile)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/AdditionalLocationsProfile.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/AdditionalLocationsProfile.cs new file mode 100644 index 000000000000..77482496b7b3 --- /dev/null +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/AdditionalLocationsProfile.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.ComputeFleet.Models +{ + /// Represents the configuration for additional locations where Fleet resources may be deployed. + internal partial class AdditionalLocationsProfile + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The list of location profiles. + /// is null. + public AdditionalLocationsProfile(IEnumerable locationProfiles) + { + Argument.AssertNotNull(locationProfiles, nameof(locationProfiles)); + + LocationProfiles = locationProfiles.ToList(); + } + + /// Initializes a new instance of . + /// The list of location profiles. + /// Keeps track of any properties unknown to the library. + internal AdditionalLocationsProfile(IList locationProfiles, IDictionary serializedAdditionalRawData) + { + LocationProfiles = locationProfiles; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AdditionalLocationsProfile() + { + } + + /// The list of location profiles. + public IList LocationProfiles { get; } + } +} diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ArchitectureType.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ArchitectureType.cs new file mode 100644 index 000000000000..4ebb1791cff3 --- /dev/null +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ArchitectureType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ComputeFleet.Models +{ + /// Architecture types supported by Azure VMs. + public readonly partial struct ArchitectureType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ArchitectureType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ARM64Value = "ARM64"; + private const string X64Value = "X64"; + + /// ARM64 Architecture. + public static ArchitectureType ARM64 { get; } = new ArchitectureType(ARM64Value); + /// X64 Architecture. + public static ArchitectureType X64 { get; } = new ArchitectureType(X64Value); + /// Determines if two values are the same. + public static bool operator ==(ArchitectureType left, ArchitectureType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ArchitectureType left, ArchitectureType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ArchitectureType(string value) => new ArchitectureType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ArchitectureType other && Equals(other); + /// + public bool Equals(ArchitectureType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/CapacityReservationProfile.Serialization.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/CapacityReservationProfile.Serialization.cs index bea5e59707db..608a897497c4 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/CapacityReservationProfile.Serialization.cs +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/CapacityReservationProfile.Serialization.cs @@ -19,6 +19,15 @@ internal partial class CapacityReservationProfile : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(CapacityReservationProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(CapacityReservationGroup)) { writer.WritePropertyName("capacityReservationGroup"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } CapacityReservationProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetApiError.Serialization.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetApiError.Serialization.cs index d102ec8a91e4..d1508528dea9 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetApiError.Serialization.cs +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetApiError.Serialization.cs @@ -18,6 +18,15 @@ public partial class ComputeFleetApiError : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(ComputeFleetApiError)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Code)) { writer.WritePropertyName("code"u8); @@ -71,7 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } ComputeFleetApiError IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetApiErrorInfo.Serialization.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetApiErrorInfo.Serialization.cs index 79e521e9c5ac..7a90fc5dd8c2 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetApiErrorInfo.Serialization.cs +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetApiErrorInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class ComputeFleetApiErrorInfo : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(ComputeFleetApiErrorInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Code)) { writer.WritePropertyName("code"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } ComputeFleetApiErrorInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetApplicationProfile.Serialization.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetApplicationProfile.Serialization.cs index e9b1c78f85de..1b6184fa7088 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetApplicationProfile.Serialization.cs +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetApplicationProfile.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ComputeFleetApplicationProfile : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(ComputeFleetApplicationProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(GalleryApplications)) { writer.WritePropertyName("galleryApplications"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } ComputeFleetApplicationProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetBootDiagnostics.Serialization.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetBootDiagnostics.Serialization.cs index 03f7c0b17148..6b806f93e87a 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetBootDiagnostics.Serialization.cs +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetBootDiagnostics.Serialization.cs @@ -18,6 +18,15 @@ public partial class ComputeFleetBootDiagnostics : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(ComputeFleetBootDiagnostics)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IsEnabled)) { writer.WritePropertyName("enabled"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } ComputeFleetBootDiagnostics IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetComputeProfile.Serialization.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetComputeProfile.Serialization.cs index ffb1fc5d58d7..b982776a1808 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetComputeProfile.Serialization.cs +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetComputeProfile.Serialization.cs @@ -18,6 +18,15 @@ public partial class ComputeFleetComputeProfile : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(ComputeFleetComputeProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("baseVirtualMachineProfile"u8); writer.WriteObjectValue(BaseVirtualMachineProfile, options); if (Optional.IsDefined(ComputeApiVersion)) @@ -38,6 +46,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe writer.WritePropertyName("platformFaultDomainCount"u8); writer.WriteNumberValue(PlatformFaultDomainCount.Value); } + if (Optional.IsDefined(AdditionalVirtualMachineCapabilities)) + { + writer.WritePropertyName("additionalVirtualMachineCapabilities"u8); + writer.WriteObjectValue(AdditionalVirtualMachineCapabilities, options); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -53,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } ComputeFleetComputeProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -79,6 +91,7 @@ internal static ComputeFleetComputeProfile DeserializeComputeFleetComputeProfile ComputeFleetVmProfile baseVirtualMachineProfile = default; string computeApiVersion = default; int? platformFaultDomainCount = default; + AdditionalCapabilities additionalVirtualMachineCapabilities = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -102,13 +115,22 @@ internal static ComputeFleetComputeProfile DeserializeComputeFleetComputeProfile platformFaultDomainCount = property.Value.GetInt32(); continue; } + if (property.NameEquals("additionalVirtualMachineCapabilities"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + additionalVirtualMachineCapabilities = AdditionalCapabilities.DeserializeAdditionalCapabilities(property.Value, options); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new ComputeFleetComputeProfile(baseVirtualMachineProfile, computeApiVersion, platformFaultDomainCount, serializedAdditionalRawData); + return new ComputeFleetComputeProfile(baseVirtualMachineProfile, computeApiVersion, platformFaultDomainCount, additionalVirtualMachineCapabilities, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetComputeProfile.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetComputeProfile.cs index 149c34e12ef4..7522cf268571 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetComputeProfile.cs +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetComputeProfile.cs @@ -68,12 +68,19 @@ public ComputeFleetComputeProfile(ComputeFleetVmProfile baseVirtualMachineProfil /// If not specified, defaults to 1, which represents "Max Spreading" (using as many fault domains as possible). /// This property cannot be updated. /// + /// + /// Specifies VMSS and VM API entity models support two additional capabilities as of today: ultraSSDEnabled and hibernationEnabled. + /// ultraSSDEnabled: Enables UltraSSD_LRS storage account type on the VMSS VMs. + /// hibernationEnabled: Enables the hibernation capability on the VMSS VMs. + /// Default value is null if not specified. This property cannot be updated once set. + /// /// Keeps track of any properties unknown to the library. - internal ComputeFleetComputeProfile(ComputeFleetVmProfile baseVirtualMachineProfile, string computeApiVersion, int? platformFaultDomainCount, IDictionary serializedAdditionalRawData) + internal ComputeFleetComputeProfile(ComputeFleetVmProfile baseVirtualMachineProfile, string computeApiVersion, int? platformFaultDomainCount, AdditionalCapabilities additionalVirtualMachineCapabilities, IDictionary serializedAdditionalRawData) { BaseVirtualMachineProfile = baseVirtualMachineProfile; ComputeApiVersion = computeApiVersion; PlatformFaultDomainCount = platformFaultDomainCount; + AdditionalVirtualMachineCapabilities = additionalVirtualMachineCapabilities; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -97,5 +104,12 @@ internal ComputeFleetComputeProfile() /// This property cannot be updated. /// public int? PlatformFaultDomainCount { get; set; } + /// + /// Specifies VMSS and VM API entity models support two additional capabilities as of today: ultraSSDEnabled and hibernationEnabled. + /// ultraSSDEnabled: Enables UltraSSD_LRS storage account type on the VMSS VMs. + /// hibernationEnabled: Enables the hibernation capability on the VMSS VMs. + /// Default value is null if not specified. This property cannot be updated once set. + /// + public AdditionalCapabilities AdditionalVirtualMachineCapabilities { get; set; } } } diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetDiagnosticsProfile.Serialization.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetDiagnosticsProfile.Serialization.cs index 16ec9939b843..0656a16e444d 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetDiagnosticsProfile.Serialization.cs +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetDiagnosticsProfile.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ComputeFleetDiagnosticsProfile : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(ComputeFleetDiagnosticsProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(BootDiagnostics)) { writer.WritePropertyName("bootDiagnostics"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } ComputeFleetDiagnosticsProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetDiffDiskSettings.Serialization.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetDiffDiskSettings.Serialization.cs index 6aca5ab4dda3..d2071fd6d39e 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetDiffDiskSettings.Serialization.cs +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetDiffDiskSettings.Serialization.cs @@ -18,6 +18,15 @@ public partial class ComputeFleetDiffDiskSettings : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(ComputeFleetDiffDiskSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Option)) { writer.WritePropertyName("option"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } ComputeFleetDiffDiskSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetEncryptionIdentity.Serialization.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetEncryptionIdentity.Serialization.cs index 02179b39f216..e71698f74dab 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetEncryptionIdentity.Serialization.cs +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetEncryptionIdentity.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ComputeFleetEncryptionIdentity : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(ComputeFleetEncryptionIdentity)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(UserAssignedIdentityResourceId)) { writer.WritePropertyName("userAssignedIdentityResourceId"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } ComputeFleetEncryptionIdentity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetImageReference.Serialization.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetImageReference.Serialization.cs index 774950f0c8e3..e60e2087676f 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetImageReference.Serialization.cs +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetImageReference.Serialization.cs @@ -18,6 +18,15 @@ public partial class ComputeFleetImageReference : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(ComputeFleetImageReference)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -81,7 +89,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } ComputeFleetImageReference IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetInnerError.Serialization.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetInnerError.Serialization.cs index e255795755e6..6687b3b3b2f9 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetInnerError.Serialization.cs +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetInnerError.Serialization.cs @@ -18,6 +18,15 @@ public partial class ComputeFleetInnerError : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(ComputeFleetInnerError)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ExceptionType)) { writer.WritePropertyName("exceptionType"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } ComputeFleetInnerError IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetKeyVaultSecretReference.Serialization.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetKeyVaultSecretReference.Serialization.cs index 979a435b17d9..5e12c63b530b 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetKeyVaultSecretReference.Serialization.cs +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetKeyVaultSecretReference.Serialization.cs @@ -19,6 +19,15 @@ public partial class ComputeFleetKeyVaultSecretReference : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(ComputeFleetKeyVaultSecretReference)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("secretUrl"u8); writer.WriteStringValue(SecretUri.AbsoluteUri); writer.WritePropertyName("sourceVault"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } ComputeFleetKeyVaultSecretReference IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetLinuxConfiguration.Serialization.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetLinuxConfiguration.Serialization.cs index 090b425e6ecf..358f851bb9b5 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetLinuxConfiguration.Serialization.cs +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetLinuxConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class ComputeFleetLinuxConfiguration : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(ComputeFleetLinuxConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IsPasswordAuthenticationDisabled)) { writer.WritePropertyName("disablePasswordAuthentication"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } ComputeFleetLinuxConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetLinuxPatchSettings.Serialization.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetLinuxPatchSettings.Serialization.cs index 2df519de962a..264bd13b6f90 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetLinuxPatchSettings.Serialization.cs +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetLinuxPatchSettings.Serialization.cs @@ -18,6 +18,15 @@ public partial class ComputeFleetLinuxPatchSettings : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(ComputeFleetLinuxPatchSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(PatchMode)) { writer.WritePropertyName("patchMode"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } ComputeFleetLinuxPatchSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetLinuxVmGuestPatchAutomaticByPlatformSettings.Serialization.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetLinuxVmGuestPatchAutomaticByPlatformSettings.Serialization.cs index 2b8bbc2bc993..55dc12dafeff 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetLinuxVmGuestPatchAutomaticByPlatformSettings.Serialization.cs +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetLinuxVmGuestPatchAutomaticByPlatformSettings.Serialization.cs @@ -18,6 +18,15 @@ public partial class ComputeFleetLinuxVmGuestPatchAutomaticByPlatformSettings : void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write( throw new FormatException($"The model {nameof(ComputeFleetLinuxVmGuestPatchAutomaticByPlatformSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(RebootSetting)) { writer.WritePropertyName("rebootSetting"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write( #endif } } - writer.WriteEndObject(); } ComputeFleetLinuxVmGuestPatchAutomaticByPlatformSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetOSImageNotificationProfile.Serialization.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetOSImageNotificationProfile.Serialization.cs index 5e0a8b25b2e5..54ba077e6a9f 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetOSImageNotificationProfile.Serialization.cs +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetOSImageNotificationProfile.Serialization.cs @@ -18,6 +18,15 @@ public partial class ComputeFleetOSImageNotificationProfile : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(ComputeFleetOSImageNotificationProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(NotBeforeTimeout)) { writer.WritePropertyName("notBeforeTimeout"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } ComputeFleetOSImageNotificationProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetPatch.Serialization.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetPatch.Serialization.cs index d573cb9046d8..449ed3d12722 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetPatch.Serialization.cs +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetPatch.Serialization.cs @@ -19,6 +19,15 @@ public partial class ComputeFleetPatch : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(ComputeFleetPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -68,7 +76,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } ComputeFleetPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetProperties.Serialization.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetProperties.Serialization.cs index ef31137b7980..e88e59d9158f 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetProperties.Serialization.cs +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class ComputeFleetProperties : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(ComputeFleetProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) { writer.WritePropertyName("provisioningState"u8); @@ -48,6 +56,16 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader writer.WriteObjectValue(item, options); } writer.WriteEndArray(); + if (Optional.IsDefined(VmAttributes)) + { + writer.WritePropertyName("vmAttributes"u8); + writer.WriteObjectValue(VmAttributes, options); + } + if (Optional.IsDefined(AdditionalLocationsProfile)) + { + writer.WritePropertyName("additionalLocationsProfile"u8); + writer.WriteObjectValue(AdditionalLocationsProfile, options); + } writer.WritePropertyName("computeProfile"u8); writer.WriteObjectValue(ComputeProfile, options); if (options.Format != "W" && Optional.IsDefined(CreatedOn)) @@ -75,7 +93,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } ComputeFleetProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -102,6 +119,8 @@ internal static ComputeFleetProperties DeserializeComputeFleetProperties(JsonEle SpotPriorityProfile spotPriorityProfile = default; RegularPriorityProfile regularPriorityProfile = default; IList vmSizesProfile = default; + ComputeFleetVmAttributes vmAttributes = default; + AdditionalLocationsProfile additionalLocationsProfile = default; ComputeFleetComputeProfile computeProfile = default; DateTimeOffset? timeCreated = default; string uniqueId = default; @@ -146,6 +165,24 @@ internal static ComputeFleetProperties DeserializeComputeFleetProperties(JsonEle vmSizesProfile = array; continue; } + if (property.NameEquals("vmAttributes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + vmAttributes = ComputeFleetVmAttributes.DeserializeComputeFleetVmAttributes(property.Value, options); + continue; + } + if (property.NameEquals("additionalLocationsProfile"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + additionalLocationsProfile = AdditionalLocationsProfile.DeserializeAdditionalLocationsProfile(property.Value, options); + continue; + } if (property.NameEquals("computeProfile"u8)) { computeProfile = ComputeFleetComputeProfile.DeserializeComputeFleetComputeProfile(property.Value, options); @@ -176,6 +213,8 @@ internal static ComputeFleetProperties DeserializeComputeFleetProperties(JsonEle spotPriorityProfile, regularPriorityProfile, vmSizesProfile, + vmAttributes, + additionalLocationsProfile, computeProfile, timeCreated, uniqueId, diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetProperties.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetProperties.cs index fe9bffc332da..14da376694a0 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetProperties.cs +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetProperties.cs @@ -64,16 +64,20 @@ public ComputeFleetProperties(IEnumerable vmSizesProf /// Configuration Options for Spot instances in Compute Fleet. /// Configuration Options for Regular instances in Compute Fleet. /// List of VM sizes supported for Compute Fleet. + /// Attribute based Fleet. + /// Represents the configuration for additional locations where Fleet resources may be deployed. /// Compute Profile to use for running user's workloads. /// Specifies the time at which the Compute Fleet is created. /// Specifies the ID which uniquely identifies a Compute Fleet. /// Keeps track of any properties unknown to the library. - internal ComputeFleetProperties(ComputeFleetProvisioningState? provisioningState, SpotPriorityProfile spotPriorityProfile, RegularPriorityProfile regularPriorityProfile, IList vmSizesProfile, ComputeFleetComputeProfile computeProfile, DateTimeOffset? createdOn, string uniqueId, IDictionary serializedAdditionalRawData) + internal ComputeFleetProperties(ComputeFleetProvisioningState? provisioningState, SpotPriorityProfile spotPriorityProfile, RegularPriorityProfile regularPriorityProfile, IList vmSizesProfile, ComputeFleetVmAttributes vmAttributes, AdditionalLocationsProfile additionalLocationsProfile, ComputeFleetComputeProfile computeProfile, DateTimeOffset? createdOn, string uniqueId, IDictionary serializedAdditionalRawData) { ProvisioningState = provisioningState; SpotPriorityProfile = spotPriorityProfile; RegularPriorityProfile = regularPriorityProfile; VmSizesProfile = vmSizesProfile; + VmAttributes = vmAttributes; + AdditionalLocationsProfile = additionalLocationsProfile; ComputeProfile = computeProfile; CreatedOn = createdOn; UniqueId = uniqueId; @@ -93,6 +97,17 @@ internal ComputeFleetProperties() public RegularPriorityProfile RegularPriorityProfile { get; set; } /// List of VM sizes supported for Compute Fleet. public IList VmSizesProfile { get; } + /// Attribute based Fleet. + public ComputeFleetVmAttributes VmAttributes { get; set; } + /// Represents the configuration for additional locations where Fleet resources may be deployed. + internal AdditionalLocationsProfile AdditionalLocationsProfile { get; set; } + /// The list of location profiles. + public IList AdditionalLocationsLocationProfiles + { + get => AdditionalLocationsProfile is null ? default : AdditionalLocationsProfile.LocationProfiles; + set => AdditionalLocationsProfile = new AdditionalLocationsProfile(value); + } + /// Compute Profile to use for running user's workloads. public ComputeFleetComputeProfile ComputeProfile { get; set; } /// Specifies the time at which the Compute Fleet is created. diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetProxyAgentSettings.Serialization.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetProxyAgentSettings.Serialization.cs index 17a0ed47ddc2..dd4d8b8d5987 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetProxyAgentSettings.Serialization.cs +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetProxyAgentSettings.Serialization.cs @@ -18,6 +18,15 @@ public partial class ComputeFleetProxyAgentSettings : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(ComputeFleetProxyAgentSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IsEnabled)) { writer.WritePropertyName("enabled"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } ComputeFleetProxyAgentSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetPublicIPAddressSku.Serialization.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetPublicIPAddressSku.Serialization.cs index bc2f6b2907b0..d6563124248d 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetPublicIPAddressSku.Serialization.cs +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetPublicIPAddressSku.Serialization.cs @@ -18,6 +18,15 @@ public partial class ComputeFleetPublicIPAddressSku : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(ComputeFleetPublicIPAddressSku)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } ComputeFleetPublicIPAddressSku IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetScheduledEventsProfile.Serialization.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetScheduledEventsProfile.Serialization.cs index dcdb4b81dea6..97925e78e614 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetScheduledEventsProfile.Serialization.cs +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetScheduledEventsProfile.Serialization.cs @@ -18,6 +18,15 @@ public partial class ComputeFleetScheduledEventsProfile : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(ComputeFleetScheduledEventsProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(TerminateNotificationProfile)) { writer.WritePropertyName("terminateNotificationProfile"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } ComputeFleetScheduledEventsProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetSecurityPostureReference.Serialization.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetSecurityPostureReference.Serialization.cs index 9166503e4d30..75b92a0ad89f 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetSecurityPostureReference.Serialization.cs +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetSecurityPostureReference.Serialization.cs @@ -18,6 +18,15 @@ public partial class ComputeFleetSecurityPostureReference : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(ComputeFleetSecurityPostureReference)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } ComputeFleetSecurityPostureReference IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetSecurityProfile.Serialization.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetSecurityProfile.Serialization.cs index 87d89420da58..87859263e180 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetSecurityProfile.Serialization.cs +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetSecurityProfile.Serialization.cs @@ -18,6 +18,15 @@ public partial class ComputeFleetSecurityProfile : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(ComputeFleetSecurityProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(UefiSettings)) { writer.WritePropertyName("uefiSettings"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } ComputeFleetSecurityProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetSshConfiguration.Serialization.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetSshConfiguration.Serialization.cs index 791b7b0424a7..7996780b2d2a 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetSshConfiguration.Serialization.cs +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetSshConfiguration.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ComputeFleetSshConfiguration : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(ComputeFleetSshConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(PublicKeys)) { writer.WritePropertyName("publicKeys"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } ComputeFleetSshConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetSshPublicKey.Serialization.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetSshPublicKey.Serialization.cs index 99d8fe18f895..efe710da75b0 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetSshPublicKey.Serialization.cs +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetSshPublicKey.Serialization.cs @@ -18,6 +18,15 @@ public partial class ComputeFleetSshPublicKey : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(ComputeFleetSshPublicKey)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Path)) { writer.WritePropertyName("path"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } ComputeFleetSshPublicKey IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetTerminateNotificationProfile.Serialization.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetTerminateNotificationProfile.Serialization.cs index 9eede006c662..76a473232d1a 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetTerminateNotificationProfile.Serialization.cs +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetTerminateNotificationProfile.Serialization.cs @@ -18,6 +18,15 @@ public partial class ComputeFleetTerminateNotificationProfile : IUtf8JsonSeriali void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter w throw new FormatException($"The model {nameof(ComputeFleetTerminateNotificationProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(NotBeforeTimeout)) { writer.WritePropertyName("notBeforeTimeout"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter w #endif } } - writer.WriteEndObject(); } ComputeFleetTerminateNotificationProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetUefiSettings.Serialization.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetUefiSettings.Serialization.cs index c70fae5c42af..dcdc1b3ac415 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetUefiSettings.Serialization.cs +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetUefiSettings.Serialization.cs @@ -18,6 +18,15 @@ public partial class ComputeFleetUefiSettings : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(ComputeFleetUefiSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IsSecureBootEnabled)) { writer.WritePropertyName("secureBootEnabled"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } ComputeFleetUefiSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVaultCertificate.Serialization.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVaultCertificate.Serialization.cs index 2c17ffcb8e9a..323d66ccd15a 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVaultCertificate.Serialization.cs +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVaultCertificate.Serialization.cs @@ -18,6 +18,15 @@ public partial class ComputeFleetVaultCertificate : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(ComputeFleetVaultCertificate)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(CertificateUri)) { writer.WritePropertyName("certificateUrl"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } ComputeFleetVaultCertificate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVaultSecretGroup.Serialization.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVaultSecretGroup.Serialization.cs index 2aece832749b..09e6df63bc1e 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVaultSecretGroup.Serialization.cs +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVaultSecretGroup.Serialization.cs @@ -19,6 +19,15 @@ public partial class ComputeFleetVaultSecretGroup : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(ComputeFleetVaultSecretGroup)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(SourceVault)) { writer.WritePropertyName("sourceVault"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } ComputeFleetVaultSecretGroup IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVirtualHardDisk.Serialization.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVirtualHardDisk.Serialization.cs index 268137c084a8..5cb0f2037754 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVirtualHardDisk.Serialization.cs +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVirtualHardDisk.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ComputeFleetVirtualHardDisk : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(ComputeFleetVirtualHardDisk)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Uri)) { writer.WritePropertyName("uri"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } ComputeFleetVirtualHardDisk IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmAttributeMinMaxDouble.Serialization.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmAttributeMinMaxDouble.Serialization.cs new file mode 100644 index 000000000000..d170e5031047 --- /dev/null +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmAttributeMinMaxDouble.Serialization.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ComputeFleet.Models +{ + public partial class ComputeFleetVmAttributeMinMaxDouble : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ComputeFleetVmAttributeMinMaxDouble)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Min)) + { + writer.WritePropertyName("min"u8); + writer.WriteNumberValue(Min.Value); + } + if (Optional.IsDefined(Max)) + { + writer.WritePropertyName("max"u8); + writer.WriteNumberValue(Max.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ComputeFleetVmAttributeMinMaxDouble IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ComputeFleetVmAttributeMinMaxDouble)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeComputeFleetVmAttributeMinMaxDouble(document.RootElement, options); + } + + internal static ComputeFleetVmAttributeMinMaxDouble DeserializeComputeFleetVmAttributeMinMaxDouble(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + double? min = default; + double? max = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("min"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + min = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("max"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + max = property.Value.GetDouble(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ComputeFleetVmAttributeMinMaxDouble(min, max, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ComputeFleetVmAttributeMinMaxDouble)} does not support writing '{options.Format}' format."); + } + } + + ComputeFleetVmAttributeMinMaxDouble IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeComputeFleetVmAttributeMinMaxDouble(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ComputeFleetVmAttributeMinMaxDouble)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmAttributeMinMaxDouble.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmAttributeMinMaxDouble.cs new file mode 100644 index 000000000000..58dfab4ed6ff --- /dev/null +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmAttributeMinMaxDouble.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ComputeFleet.Models +{ + /// VMAttributes using double values. + public partial class ComputeFleetVmAttributeMinMaxDouble + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ComputeFleetVmAttributeMinMaxDouble() + { + } + + /// Initializes a new instance of . + /// Minimum value. default 0. Double.MinValue(). + /// Maximum value. Double.MaxValue(1.7976931348623157E+308). + /// Keeps track of any properties unknown to the library. + internal ComputeFleetVmAttributeMinMaxDouble(double? min, double? max, IDictionary serializedAdditionalRawData) + { + Min = min; + Max = max; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Minimum value. default 0. Double.MinValue(). + public double? Min { get; set; } + /// Maximum value. Double.MaxValue(1.7976931348623157E+308). + public double? Max { get; set; } + } +} diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmAttributeMinMaxInteger.Serialization.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmAttributeMinMaxInteger.Serialization.cs new file mode 100644 index 000000000000..9176a94dbdfd --- /dev/null +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmAttributeMinMaxInteger.Serialization.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ComputeFleet.Models +{ + public partial class ComputeFleetVmAttributeMinMaxInteger : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ComputeFleetVmAttributeMinMaxInteger)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Min)) + { + writer.WritePropertyName("min"u8); + writer.WriteNumberValue(Min.Value); + } + if (Optional.IsDefined(Max)) + { + writer.WritePropertyName("max"u8); + writer.WriteNumberValue(Max.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ComputeFleetVmAttributeMinMaxInteger IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ComputeFleetVmAttributeMinMaxInteger)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeComputeFleetVmAttributeMinMaxInteger(document.RootElement, options); + } + + internal static ComputeFleetVmAttributeMinMaxInteger DeserializeComputeFleetVmAttributeMinMaxInteger(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int? min = default; + int? max = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("min"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + min = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("max"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + max = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ComputeFleetVmAttributeMinMaxInteger(min, max, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ComputeFleetVmAttributeMinMaxInteger)} does not support writing '{options.Format}' format."); + } + } + + ComputeFleetVmAttributeMinMaxInteger IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeComputeFleetVmAttributeMinMaxInteger(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ComputeFleetVmAttributeMinMaxInteger)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmAttributeMinMaxInteger.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmAttributeMinMaxInteger.cs new file mode 100644 index 000000000000..32e6699582b9 --- /dev/null +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmAttributeMinMaxInteger.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ComputeFleet.Models +{ + /// While retrieving VMSizes from CRS, Min = 0 (uint.MinValue) if not specified, Max = 4294967295 (uint.MaxValue) if not specified. This allows to filter VMAttributes on all available VMSizes. + public partial class ComputeFleetVmAttributeMinMaxInteger + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ComputeFleetVmAttributeMinMaxInteger() + { + } + + /// Initializes a new instance of . + /// Min VMSize from CRS, Min = 0 (uint.MinValue) if not specified. + /// Max VMSize from CRS, Max = 4294967295 (uint.MaxValue) if not specified. + /// Keeps track of any properties unknown to the library. + internal ComputeFleetVmAttributeMinMaxInteger(int? min, int? max, IDictionary serializedAdditionalRawData) + { + Min = min; + Max = max; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Min VMSize from CRS, Min = 0 (uint.MinValue) if not specified. + public int? Min { get; set; } + /// Max VMSize from CRS, Max = 4294967295 (uint.MaxValue) if not specified. + public int? Max { get; set; } + } +} diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmAttributeSupport.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmAttributeSupport.cs new file mode 100644 index 000000000000..0dbeee6fb1fa --- /dev/null +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmAttributeSupport.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ComputeFleet.Models +{ + /// VMSizes supported by Azure VMs. Included is a union of Excluded and Required. + public readonly partial struct ComputeFleetVmAttributeSupport : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ComputeFleetVmAttributeSupport(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ExcludedValue = "Excluded"; + private const string IncludedValue = "Included"; + private const string RequiredValue = "Required"; + + /// All VMSizes having the feature support will be excluded. + public static ComputeFleetVmAttributeSupport Excluded { get; } = new ComputeFleetVmAttributeSupport(ExcludedValue); + /// VMSizes that have the feature support and that do not have the feature support will be used. Included is a union of Excluded and Required. + public static ComputeFleetVmAttributeSupport Included { get; } = new ComputeFleetVmAttributeSupport(IncludedValue); + /// Only the VMSizes having the feature support will be used. + public static ComputeFleetVmAttributeSupport Required { get; } = new ComputeFleetVmAttributeSupport(RequiredValue); + /// Determines if two values are the same. + public static bool operator ==(ComputeFleetVmAttributeSupport left, ComputeFleetVmAttributeSupport right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ComputeFleetVmAttributeSupport left, ComputeFleetVmAttributeSupport right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ComputeFleetVmAttributeSupport(string value) => new ComputeFleetVmAttributeSupport(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ComputeFleetVmAttributeSupport other && Equals(other); + /// + public bool Equals(ComputeFleetVmAttributeSupport other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmAttributes.Serialization.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmAttributes.Serialization.cs new file mode 100644 index 000000000000..a1d820e4b986 --- /dev/null +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmAttributes.Serialization.cs @@ -0,0 +1,495 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ComputeFleet.Models +{ + public partial class ComputeFleetVmAttributes : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ComputeFleetVmAttributes)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("vCpuCount"u8); + writer.WriteObjectValue(VCpuCount, options); + writer.WritePropertyName("memoryInGiB"u8); + writer.WriteObjectValue(MemoryInGiB, options); + if (Optional.IsDefined(MemoryInGiBPerVCpu)) + { + writer.WritePropertyName("memoryInGiBPerVCpu"u8); + writer.WriteObjectValue(MemoryInGiBPerVCpu, options); + } + if (Optional.IsDefined(LocalStorageSupport)) + { + writer.WritePropertyName("localStorageSupport"u8); + writer.WriteStringValue(LocalStorageSupport.Value.ToString()); + } + if (Optional.IsDefined(LocalStorageInGiB)) + { + writer.WritePropertyName("localStorageInGiB"u8); + writer.WriteObjectValue(LocalStorageInGiB, options); + } + if (Optional.IsCollectionDefined(LocalStorageDiskTypes)) + { + writer.WritePropertyName("localStorageDiskTypes"u8); + writer.WriteStartArray(); + foreach (var item in LocalStorageDiskTypes) + { + writer.WriteStringValue(item.ToString()); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(DataDiskCount)) + { + writer.WritePropertyName("dataDiskCount"u8); + writer.WriteObjectValue(DataDiskCount, options); + } + if (Optional.IsDefined(NetworkInterfaceCount)) + { + writer.WritePropertyName("networkInterfaceCount"u8); + writer.WriteObjectValue(NetworkInterfaceCount, options); + } + if (Optional.IsDefined(NetworkBandwidthInMbps)) + { + writer.WritePropertyName("networkBandwidthInMbps"u8); + writer.WriteObjectValue(NetworkBandwidthInMbps, options); + } + if (Optional.IsDefined(RdmaSupport)) + { + writer.WritePropertyName("rdmaSupport"u8); + writer.WriteStringValue(RdmaSupport.Value.ToString()); + } + if (Optional.IsDefined(RdmaNetworkInterfaceCount)) + { + writer.WritePropertyName("rdmaNetworkInterfaceCount"u8); + writer.WriteObjectValue(RdmaNetworkInterfaceCount, options); + } + if (Optional.IsDefined(AcceleratorSupport)) + { + writer.WritePropertyName("acceleratorSupport"u8); + writer.WriteStringValue(AcceleratorSupport.Value.ToString()); + } + if (Optional.IsCollectionDefined(AcceleratorManufacturers)) + { + writer.WritePropertyName("acceleratorManufacturers"u8); + writer.WriteStartArray(); + foreach (var item in AcceleratorManufacturers) + { + writer.WriteStringValue(item.ToString()); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(AcceleratorTypes)) + { + writer.WritePropertyName("acceleratorTypes"u8); + writer.WriteStartArray(); + foreach (var item in AcceleratorTypes) + { + writer.WriteStringValue(item.ToString()); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(AcceleratorCount)) + { + writer.WritePropertyName("acceleratorCount"u8); + writer.WriteObjectValue(AcceleratorCount, options); + } + if (Optional.IsCollectionDefined(VmCategories)) + { + writer.WritePropertyName("vmCategories"u8); + writer.WriteStartArray(); + foreach (var item in VmCategories) + { + writer.WriteStringValue(item.ToString()); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(ArchitectureTypes)) + { + writer.WritePropertyName("architectureTypes"u8); + writer.WriteStartArray(); + foreach (var item in ArchitectureTypes) + { + writer.WriteStringValue(item.ToString()); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(CpuManufacturers)) + { + writer.WritePropertyName("cpuManufacturers"u8); + writer.WriteStartArray(); + foreach (var item in CpuManufacturers) + { + writer.WriteStringValue(item.ToString()); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(BurstableSupport)) + { + writer.WritePropertyName("burstableSupport"u8); + writer.WriteStringValue(BurstableSupport.Value.ToString()); + } + if (Optional.IsCollectionDefined(ExcludedVmSizes)) + { + writer.WritePropertyName("excludedVMSizes"u8); + writer.WriteStartArray(); + foreach (var item in ExcludedVmSizes) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ComputeFleetVmAttributes IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ComputeFleetVmAttributes)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeComputeFleetVmAttributes(document.RootElement, options); + } + + internal static ComputeFleetVmAttributes DeserializeComputeFleetVmAttributes(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ComputeFleetVmAttributeMinMaxInteger vCpuCount = default; + ComputeFleetVmAttributeMinMaxDouble memoryInGiB = default; + ComputeFleetVmAttributeMinMaxDouble memoryInGiBPerVCpu = default; + ComputeFleetVmAttributeSupport? localStorageSupport = default; + ComputeFleetVmAttributeMinMaxDouble localStorageInGiB = default; + IList localStorageDiskTypes = default; + ComputeFleetVmAttributeMinMaxInteger dataDiskCount = default; + ComputeFleetVmAttributeMinMaxInteger networkInterfaceCount = default; + ComputeFleetVmAttributeMinMaxDouble networkBandwidthInMbps = default; + ComputeFleetVmAttributeSupport? rdmaSupport = default; + ComputeFleetVmAttributeMinMaxInteger rdmaNetworkInterfaceCount = default; + ComputeFleetVmAttributeSupport? acceleratorSupport = default; + IList acceleratorManufacturers = default; + IList acceleratorTypes = default; + ComputeFleetVmAttributeMinMaxInteger acceleratorCount = default; + IList vmCategories = default; + IList architectureTypes = default; + IList cpuManufacturers = default; + ComputeFleetVmAttributeSupport? burstableSupport = default; + IList excludedVmSizes = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("vCpuCount"u8)) + { + vCpuCount = ComputeFleetVmAttributeMinMaxInteger.DeserializeComputeFleetVmAttributeMinMaxInteger(property.Value, options); + continue; + } + if (property.NameEquals("memoryInGiB"u8)) + { + memoryInGiB = ComputeFleetVmAttributeMinMaxDouble.DeserializeComputeFleetVmAttributeMinMaxDouble(property.Value, options); + continue; + } + if (property.NameEquals("memoryInGiBPerVCpu"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + memoryInGiBPerVCpu = ComputeFleetVmAttributeMinMaxDouble.DeserializeComputeFleetVmAttributeMinMaxDouble(property.Value, options); + continue; + } + if (property.NameEquals("localStorageSupport"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + localStorageSupport = new ComputeFleetVmAttributeSupport(property.Value.GetString()); + continue; + } + if (property.NameEquals("localStorageInGiB"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + localStorageInGiB = ComputeFleetVmAttributeMinMaxDouble.DeserializeComputeFleetVmAttributeMinMaxDouble(property.Value, options); + continue; + } + if (property.NameEquals("localStorageDiskTypes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(new LocalStorageDiskType(item.GetString())); + } + localStorageDiskTypes = array; + continue; + } + if (property.NameEquals("dataDiskCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dataDiskCount = ComputeFleetVmAttributeMinMaxInteger.DeserializeComputeFleetVmAttributeMinMaxInteger(property.Value, options); + continue; + } + if (property.NameEquals("networkInterfaceCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + networkInterfaceCount = ComputeFleetVmAttributeMinMaxInteger.DeserializeComputeFleetVmAttributeMinMaxInteger(property.Value, options); + continue; + } + if (property.NameEquals("networkBandwidthInMbps"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + networkBandwidthInMbps = ComputeFleetVmAttributeMinMaxDouble.DeserializeComputeFleetVmAttributeMinMaxDouble(property.Value, options); + continue; + } + if (property.NameEquals("rdmaSupport"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + rdmaSupport = new ComputeFleetVmAttributeSupport(property.Value.GetString()); + continue; + } + if (property.NameEquals("rdmaNetworkInterfaceCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + rdmaNetworkInterfaceCount = ComputeFleetVmAttributeMinMaxInteger.DeserializeComputeFleetVmAttributeMinMaxInteger(property.Value, options); + continue; + } + if (property.NameEquals("acceleratorSupport"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + acceleratorSupport = new ComputeFleetVmAttributeSupport(property.Value.GetString()); + continue; + } + if (property.NameEquals("acceleratorManufacturers"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(new AcceleratorManufacturer(item.GetString())); + } + acceleratorManufacturers = array; + continue; + } + if (property.NameEquals("acceleratorTypes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(new AcceleratorType(item.GetString())); + } + acceleratorTypes = array; + continue; + } + if (property.NameEquals("acceleratorCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + acceleratorCount = ComputeFleetVmAttributeMinMaxInteger.DeserializeComputeFleetVmAttributeMinMaxInteger(property.Value, options); + continue; + } + if (property.NameEquals("vmCategories"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(new ComputeFleetVmCategory(item.GetString())); + } + vmCategories = array; + continue; + } + if (property.NameEquals("architectureTypes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(new ArchitectureType(item.GetString())); + } + architectureTypes = array; + continue; + } + if (property.NameEquals("cpuManufacturers"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(new CpuManufacturer(item.GetString())); + } + cpuManufacturers = array; + continue; + } + if (property.NameEquals("burstableSupport"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + burstableSupport = new ComputeFleetVmAttributeSupport(property.Value.GetString()); + continue; + } + if (property.NameEquals("excludedVMSizes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + excludedVmSizes = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ComputeFleetVmAttributes( + vCpuCount, + memoryInGiB, + memoryInGiBPerVCpu, + localStorageSupport, + localStorageInGiB, + localStorageDiskTypes ?? new ChangeTrackingList(), + dataDiskCount, + networkInterfaceCount, + networkBandwidthInMbps, + rdmaSupport, + rdmaNetworkInterfaceCount, + acceleratorSupport, + acceleratorManufacturers ?? new ChangeTrackingList(), + acceleratorTypes ?? new ChangeTrackingList(), + acceleratorCount, + vmCategories ?? new ChangeTrackingList(), + architectureTypes ?? new ChangeTrackingList(), + cpuManufacturers ?? new ChangeTrackingList(), + burstableSupport, + excludedVmSizes ?? new ChangeTrackingList(), + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ComputeFleetVmAttributes)} does not support writing '{options.Format}' format."); + } + } + + ComputeFleetVmAttributes IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeComputeFleetVmAttributes(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ComputeFleetVmAttributes)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmAttributes.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmAttributes.cs new file mode 100644 index 000000000000..1aa7f7b60228 --- /dev/null +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmAttributes.cs @@ -0,0 +1,211 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ComputeFleet.Models +{ + /// VMAttributes that will be used to filter VMSizes which will be used to build Fleet. + public partial class ComputeFleetVmAttributes + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The range of vCpuCount specified from Min to Max. Must be specified if VMAttributes are specified, either Min or Max is required if specified. + /// The range of memory specified from Min to Max. Must be specified if VMAttributes are specified, either Min or Max is required if specified. + /// or is null. + public ComputeFleetVmAttributes(ComputeFleetVmAttributeMinMaxInteger vCpuCount, ComputeFleetVmAttributeMinMaxDouble memoryInGiB) + { + Argument.AssertNotNull(vCpuCount, nameof(vCpuCount)); + Argument.AssertNotNull(memoryInGiB, nameof(memoryInGiB)); + + VCpuCount = vCpuCount; + MemoryInGiB = memoryInGiB; + LocalStorageDiskTypes = new ChangeTrackingList(); + AcceleratorManufacturers = new ChangeTrackingList(); + AcceleratorTypes = new ChangeTrackingList(); + VmCategories = new ChangeTrackingList(); + ArchitectureTypes = new ChangeTrackingList(); + CpuManufacturers = new ChangeTrackingList(); + ExcludedVmSizes = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The range of vCpuCount specified from Min to Max. Must be specified if VMAttributes are specified, either Min or Max is required if specified. + /// The range of memory specified from Min to Max. Must be specified if VMAttributes are specified, either Min or Max is required if specified. + /// The range of memory in GiB per vCPU specified from min to max. Optional parameter. Either Min or Max is required if specified. + /// Specifies whether the VMSize supporting local storage should be used to build Fleet or not. + /// + /// LocalStorageSupport should be set to "Included" or "Required" to use this VMAttribute. + /// If localStorageSupport is "Excluded", this VMAttribute can not be used. + /// + /// + /// The local storage disk types specified as a list. LocalStorageSupport should be set to "Included" or "Required" to use this VMAttribute. + /// If localStorageSupport is "Excluded", this VMAttribute can not be used. + /// + /// The range of data disk count specified from Min to Max. Optional parameter. Either Min or Max is required if specified. + /// The range of network interface count specified from Min to Max. Optional parameter. Either Min or Max is required if specified. + /// The range of network bandwidth in Mbps specified from Min to Max. Optional parameter. Either Min or Max is required if specified. + /// Specifies whether the VMSize supporting RDMA (Remote Direct Memory Access) should be used to build Fleet or not. + /// + /// The range of RDMA (Remote Direct Memory Access) network interface count specified from Min to Max. Optional parameter. Either Min or Max is required if specified. + /// rdmaSupport should be set to "Included" or "Required" to use this VMAttribute. + /// If rdmaSupport is "Excluded", this VMAttribute can not be used. + /// + /// + /// Specifies whether the VMSize supporting accelerator should be used to build Fleet or not. + /// acceleratorSupport should be set to "Included" or "Required" to use this VMAttribute. + /// If acceleratorSupport is "Excluded", this VMAttribute can not be used. + /// + /// + /// The accelerator manufacturers specified as a list. + /// acceleratorSupport should be set to "Included" or "Required" to use this VMAttribute. + /// If acceleratorSupport is "Excluded", this VMAttribute can not be used. + /// + /// + /// The accelerator types specified as a list. acceleratorSupport should be set to "Included" or "Required" to use this VMAttribute. + /// If acceleratorSupport is "Excluded", this VMAttribute can not be used. + /// + /// + /// The range of accelerator count specified from min to max. Optional parameter. Either Min or Max is required if specified. + /// acceleratorSupport should be set to "Included" or "Required" to use this VMAttribute. + /// If acceleratorSupport is "Excluded", this VMAttribute can not be used. + /// + /// The VM category specified as a list. Optional parameter. + /// The VM architecture types specified as a list. Optional parameter. + /// The VM CPU manufacturers specified as a list. Optional parameter. + /// Specifies whether the VMSize supporting burstable capability should be used to build Fleet or not. + /// Specifies which VMSizes should be excluded while building Fleet. Optional parameter. + /// Keeps track of any properties unknown to the library. + internal ComputeFleetVmAttributes(ComputeFleetVmAttributeMinMaxInteger vCpuCount, ComputeFleetVmAttributeMinMaxDouble memoryInGiB, ComputeFleetVmAttributeMinMaxDouble memoryInGiBPerVCpu, ComputeFleetVmAttributeSupport? localStorageSupport, ComputeFleetVmAttributeMinMaxDouble localStorageInGiB, IList localStorageDiskTypes, ComputeFleetVmAttributeMinMaxInteger dataDiskCount, ComputeFleetVmAttributeMinMaxInteger networkInterfaceCount, ComputeFleetVmAttributeMinMaxDouble networkBandwidthInMbps, ComputeFleetVmAttributeSupport? rdmaSupport, ComputeFleetVmAttributeMinMaxInteger rdmaNetworkInterfaceCount, ComputeFleetVmAttributeSupport? acceleratorSupport, IList acceleratorManufacturers, IList acceleratorTypes, ComputeFleetVmAttributeMinMaxInteger acceleratorCount, IList vmCategories, IList architectureTypes, IList cpuManufacturers, ComputeFleetVmAttributeSupport? burstableSupport, IList excludedVmSizes, IDictionary serializedAdditionalRawData) + { + VCpuCount = vCpuCount; + MemoryInGiB = memoryInGiB; + MemoryInGiBPerVCpu = memoryInGiBPerVCpu; + LocalStorageSupport = localStorageSupport; + LocalStorageInGiB = localStorageInGiB; + LocalStorageDiskTypes = localStorageDiskTypes; + DataDiskCount = dataDiskCount; + NetworkInterfaceCount = networkInterfaceCount; + NetworkBandwidthInMbps = networkBandwidthInMbps; + RdmaSupport = rdmaSupport; + RdmaNetworkInterfaceCount = rdmaNetworkInterfaceCount; + AcceleratorSupport = acceleratorSupport; + AcceleratorManufacturers = acceleratorManufacturers; + AcceleratorTypes = acceleratorTypes; + AcceleratorCount = acceleratorCount; + VmCategories = vmCategories; + ArchitectureTypes = architectureTypes; + CpuManufacturers = cpuManufacturers; + BurstableSupport = burstableSupport; + ExcludedVmSizes = excludedVmSizes; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ComputeFleetVmAttributes() + { + } + + /// The range of vCpuCount specified from Min to Max. Must be specified if VMAttributes are specified, either Min or Max is required if specified. + public ComputeFleetVmAttributeMinMaxInteger VCpuCount { get; set; } + /// The range of memory specified from Min to Max. Must be specified if VMAttributes are specified, either Min or Max is required if specified. + public ComputeFleetVmAttributeMinMaxDouble MemoryInGiB { get; set; } + /// The range of memory in GiB per vCPU specified from min to max. Optional parameter. Either Min or Max is required if specified. + public ComputeFleetVmAttributeMinMaxDouble MemoryInGiBPerVCpu { get; set; } + /// Specifies whether the VMSize supporting local storage should be used to build Fleet or not. + public ComputeFleetVmAttributeSupport? LocalStorageSupport { get; set; } + /// + /// LocalStorageSupport should be set to "Included" or "Required" to use this VMAttribute. + /// If localStorageSupport is "Excluded", this VMAttribute can not be used. + /// + public ComputeFleetVmAttributeMinMaxDouble LocalStorageInGiB { get; set; } + /// + /// The local storage disk types specified as a list. LocalStorageSupport should be set to "Included" or "Required" to use this VMAttribute. + /// If localStorageSupport is "Excluded", this VMAttribute can not be used. + /// + public IList LocalStorageDiskTypes { get; } + /// The range of data disk count specified from Min to Max. Optional parameter. Either Min or Max is required if specified. + public ComputeFleetVmAttributeMinMaxInteger DataDiskCount { get; set; } + /// The range of network interface count specified from Min to Max. Optional parameter. Either Min or Max is required if specified. + public ComputeFleetVmAttributeMinMaxInteger NetworkInterfaceCount { get; set; } + /// The range of network bandwidth in Mbps specified from Min to Max. Optional parameter. Either Min or Max is required if specified. + public ComputeFleetVmAttributeMinMaxDouble NetworkBandwidthInMbps { get; set; } + /// Specifies whether the VMSize supporting RDMA (Remote Direct Memory Access) should be used to build Fleet or not. + public ComputeFleetVmAttributeSupport? RdmaSupport { get; set; } + /// + /// The range of RDMA (Remote Direct Memory Access) network interface count specified from Min to Max. Optional parameter. Either Min or Max is required if specified. + /// rdmaSupport should be set to "Included" or "Required" to use this VMAttribute. + /// If rdmaSupport is "Excluded", this VMAttribute can not be used. + /// + public ComputeFleetVmAttributeMinMaxInteger RdmaNetworkInterfaceCount { get; set; } + /// + /// Specifies whether the VMSize supporting accelerator should be used to build Fleet or not. + /// acceleratorSupport should be set to "Included" or "Required" to use this VMAttribute. + /// If acceleratorSupport is "Excluded", this VMAttribute can not be used. + /// + public ComputeFleetVmAttributeSupport? AcceleratorSupport { get; set; } + /// + /// The accelerator manufacturers specified as a list. + /// acceleratorSupport should be set to "Included" or "Required" to use this VMAttribute. + /// If acceleratorSupport is "Excluded", this VMAttribute can not be used. + /// + public IList AcceleratorManufacturers { get; } + /// + /// The accelerator types specified as a list. acceleratorSupport should be set to "Included" or "Required" to use this VMAttribute. + /// If acceleratorSupport is "Excluded", this VMAttribute can not be used. + /// + public IList AcceleratorTypes { get; } + /// + /// The range of accelerator count specified from min to max. Optional parameter. Either Min or Max is required if specified. + /// acceleratorSupport should be set to "Included" or "Required" to use this VMAttribute. + /// If acceleratorSupport is "Excluded", this VMAttribute can not be used. + /// + public ComputeFleetVmAttributeMinMaxInteger AcceleratorCount { get; set; } + /// The VM category specified as a list. Optional parameter. + public IList VmCategories { get; } + /// The VM architecture types specified as a list. Optional parameter. + public IList ArchitectureTypes { get; } + /// The VM CPU manufacturers specified as a list. Optional parameter. + public IList CpuManufacturers { get; } + /// Specifies whether the VMSize supporting burstable capability should be used to build Fleet or not. + public ComputeFleetVmAttributeSupport? BurstableSupport { get; set; } + /// Specifies which VMSizes should be excluded while building Fleet. Optional parameter. + public IList ExcludedVmSizes { get; } + } +} diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmCategory.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmCategory.cs new file mode 100644 index 000000000000..5eee9116a4b9 --- /dev/null +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmCategory.cs @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ComputeFleet.Models +{ + /// + /// VMCategories defined for Azure VMs. + /// See: https://learn.microsoft.com/en-us/azure/virtual-machines/sizes/overview?tabs=breakdownseries%2Cgeneralsizelist%2Ccomputesizelist%2Cmemorysizelist%2Cstoragesizelist%2Cgpusizelist%2Cfpgasizelist%2Chpcsizelist#general-purpose + /// + public readonly partial struct ComputeFleetVmCategory : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ComputeFleetVmCategory(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string GeneralPurposeValue = "GeneralPurpose"; + private const string ComputeOptimizedValue = "ComputeOptimized"; + private const string MemoryOptimizedValue = "MemoryOptimized"; + private const string StorageOptimizedValue = "StorageOptimized"; + private const string GpuAcceleratedValue = "GpuAccelerated"; + private const string FpgaAcceleratedValue = "FpgaAccelerated"; + private const string HighPerformanceComputeValue = "HighPerformanceCompute"; + + /// General purpose VM sizes provide balanced CPU-to-memory ratio. Ideal for testing and development, small to medium databases, and low to medium traffic web servers. + public static ComputeFleetVmCategory GeneralPurpose { get; } = new ComputeFleetVmCategory(GeneralPurposeValue); + /// Compute optimized VM sizes have a high CPU-to-memory ratio. These sizes are good for medium traffic web servers, network appliances, batch processes, and application servers. + public static ComputeFleetVmCategory ComputeOptimized { get; } = new ComputeFleetVmCategory(ComputeOptimizedValue); + /// Memory optimized VM sizes offer a high memory-to-CPU ratio that is great for relational database servers, medium to large caches, and in-memory analytics. + public static ComputeFleetVmCategory MemoryOptimized { get; } = new ComputeFleetVmCategory(MemoryOptimizedValue); + /// + /// Storage optimized virtual machine (VM) sizes offer high disk throughput and IO, and are ideal for Big Data, SQL, NoSQL databases, data warehousing, and large transactional databases. + /// Examples include Cassandra, MongoDB, Cloudera, and Redis. + /// + public static ComputeFleetVmCategory StorageOptimized { get; } = new ComputeFleetVmCategory(StorageOptimizedValue); + /// + /// GPU optimized VM sizes are specialized virtual machines available with single, multiple, or fractional GPUs. + /// These sizes are designed for compute-intensive, graphics-intensive, and visualization workloads. + /// + public static ComputeFleetVmCategory GpuAccelerated { get; } = new ComputeFleetVmCategory(GpuAcceleratedValue); + /// + /// FPGA optimized VM sizes are specialized virtual machines available with single or multiple FPGA. + /// These sizes are designed for compute-intensive workloads. This article provides information about the number and type of FPGA, vCPUs, data disks, and NICs. + /// Storage throughput and network bandwidth are also included for each size in this grouping. + /// + public static ComputeFleetVmCategory FpgaAccelerated { get; } = new ComputeFleetVmCategory(FpgaAcceleratedValue); + /// + /// Azure High Performance Compute VMs are optimized for various HPC workloads such as computational fluid dynamics, finite element analysis, frontend and backend EDA, + /// rendering, molecular dynamics, computational geo science, weather simulation, and financial risk analysis. + /// + public static ComputeFleetVmCategory HighPerformanceCompute { get; } = new ComputeFleetVmCategory(HighPerformanceComputeValue); + /// Determines if two values are the same. + public static bool operator ==(ComputeFleetVmCategory left, ComputeFleetVmCategory right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ComputeFleetVmCategory left, ComputeFleetVmCategory right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ComputeFleetVmCategory(string value) => new ComputeFleetVmCategory(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ComputeFleetVmCategory other && Equals(other); + /// + public bool Equals(ComputeFleetVmCategory other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmDiskSecurityProfile.Serialization.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmDiskSecurityProfile.Serialization.cs index ce40c4d781f3..9cae6090f06d 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmDiskSecurityProfile.Serialization.cs +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmDiskSecurityProfile.Serialization.cs @@ -19,6 +19,15 @@ public partial class ComputeFleetVmDiskSecurityProfile : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(ComputeFleetVmDiskSecurityProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(SecurityEncryptionType)) { writer.WritePropertyName("securityEncryptionType"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } ComputeFleetVmDiskSecurityProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmGalleryApplication.Serialization.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmGalleryApplication.Serialization.cs index f040c5a8b34e..995427ca5f7e 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmGalleryApplication.Serialization.cs +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmGalleryApplication.Serialization.cs @@ -18,6 +18,15 @@ public partial class ComputeFleetVmGalleryApplication : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(ComputeFleetVmGalleryApplication)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -68,7 +76,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } ComputeFleetVmGalleryApplication IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmGuestPatchSettings.Serialization.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmGuestPatchSettings.Serialization.cs index 66632f12580c..9d92698c436c 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmGuestPatchSettings.Serialization.cs +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmGuestPatchSettings.Serialization.cs @@ -18,6 +18,15 @@ public partial class ComputeFleetVmGuestPatchSettings : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(ComputeFleetVmGuestPatchSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(PatchMode)) { writer.WritePropertyName("patchMode"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } ComputeFleetVmGuestPatchSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmProfile.Serialization.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmProfile.Serialization.cs index 71dbc4f83748..516a6dcd9065 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmProfile.Serialization.cs +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmProfile.Serialization.cs @@ -19,6 +19,15 @@ public partial class ComputeFleetVmProfile : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(ComputeFleetVmProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(OSProfile)) { writer.WritePropertyName("osProfile"u8); @@ -117,7 +125,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } ComputeFleetVmProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmSizeProfile.Serialization.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmSizeProfile.Serialization.cs index cdfa44806c74..f7f43a67177e 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmSizeProfile.Serialization.cs +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmSizeProfile.Serialization.cs @@ -18,6 +18,15 @@ public partial class ComputeFleetVmSizeProfile : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(ComputeFleetVmSizeProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); if (Optional.IsDefined(Rank)) @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } ComputeFleetVmSizeProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmSizeProperties.Serialization.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmSizeProperties.Serialization.cs index 643ede08cf19..cffeae723624 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmSizeProperties.Serialization.cs +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmSizeProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class ComputeFleetVmSizeProperties : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(ComputeFleetVmSizeProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(VCPUsAvailable)) { writer.WritePropertyName("vCPUsAvailable"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } ComputeFleetVmSizeProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmss.Serialization.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmss.Serialization.cs index 031e5236b3c6..d34a396db9db 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmss.Serialization.cs +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmss.Serialization.cs @@ -18,6 +18,15 @@ public partial class ComputeFleetVmss : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(ComputeFleetVmss)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W") { writer.WritePropertyName("id"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } ComputeFleetVmss IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -84,7 +91,7 @@ internal static ComputeFleetVmss DeserializeComputeFleetVmss(JsonElement element { return null; } - string id = default; + ResourceIdentifier id = default; string type = default; ComputeFleetProvisioningState operationStatus = default; ComputeFleetApiError error = default; @@ -94,7 +101,7 @@ internal static ComputeFleetVmss DeserializeComputeFleetVmss(JsonElement element { if (property.NameEquals("id"u8)) { - id = property.Value.GetString(); + id = new ResourceIdentifier(property.Value.GetString()); continue; } if (property.NameEquals("type"u8)) diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmss.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmss.cs index 37a95a7c2479..8af98cd80b82 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmss.cs +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmss.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; +using Azure.Core; namespace Azure.ResourceManager.ComputeFleet.Models { @@ -51,7 +52,7 @@ public partial class ComputeFleetVmss /// "subscriptions/{subId}/resourceGroups/{rgName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmssName}" /// /// This represents the operationStatus of the VMSS in response to the last operation that was performed on it by Azure Fleet resource. - internal ComputeFleetVmss(string id, ComputeFleetProvisioningState operationStatus) + internal ComputeFleetVmss(ResourceIdentifier id, ComputeFleetProvisioningState operationStatus) { Id = id; OperationStatus = operationStatus; @@ -66,7 +67,7 @@ internal ComputeFleetVmss(string id, ComputeFleetProvisioningState operationStat /// This represents the operationStatus of the VMSS in response to the last operation that was performed on it by Azure Fleet resource. /// Error Information when `operationStatus` is `Failed`. /// Keeps track of any properties unknown to the library. - internal ComputeFleetVmss(string id, string type, ComputeFleetProvisioningState operationStatus, ComputeFleetApiError error, IDictionary serializedAdditionalRawData) + internal ComputeFleetVmss(ResourceIdentifier id, string type, ComputeFleetProvisioningState operationStatus, ComputeFleetApiError error, IDictionary serializedAdditionalRawData) { Id = id; Type = type; @@ -84,7 +85,7 @@ internal ComputeFleetVmss() /// The compute RP resource id of the virtualMachineScaleSet /// "subscriptions/{subId}/resourceGroups/{rgName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmssName}" /// - public string Id { get; } + public ResourceIdentifier Id { get; } /// Type of the virtualMachineScaleSet. public string Type { get; } /// This represents the operationStatus of the VMSS in response to the last operation that was performed on it by Azure Fleet resource. diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmssDataDisk.Serialization.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmssDataDisk.Serialization.cs index 56ce2107147e..2dbdf45d9dd1 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmssDataDisk.Serialization.cs +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmssDataDisk.Serialization.cs @@ -18,6 +18,15 @@ public partial class ComputeFleetVmssDataDisk : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(ComputeFleetVmssDataDisk)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -85,7 +93,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } ComputeFleetVmssDataDisk IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmssExtension.Serialization.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmssExtension.Serialization.cs index 362baba23210..e84cc318db25 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmssExtension.Serialization.cs +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmssExtension.Serialization.cs @@ -18,6 +18,15 @@ public partial class ComputeFleetVmssExtension : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(ComputeFleetVmssExtension)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } ComputeFleetVmssExtension IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmssExtensionProfile.Serialization.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmssExtensionProfile.Serialization.cs index cb116c538522..d0cf4e88c06e 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmssExtensionProfile.Serialization.cs +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmssExtensionProfile.Serialization.cs @@ -18,6 +18,15 @@ public partial class ComputeFleetVmssExtensionProfile : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(ComputeFleetVmssExtensionProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Extensions)) { writer.WritePropertyName("extensions"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } ComputeFleetVmssExtensionProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmssExtensionProperties.Serialization.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmssExtensionProperties.Serialization.cs index 932366bdb235..1da0c1c4a6d4 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmssExtensionProperties.Serialization.cs +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmssExtensionProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class ComputeFleetVmssExtensionProperties : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(ComputeFleetVmssExtensionProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ForceUpdateTag)) { writer.WritePropertyName("forceUpdateTag"u8); @@ -142,7 +150,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } ComputeFleetVmssExtensionProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmssHardwareProfile.Serialization.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmssHardwareProfile.Serialization.cs index b423855e93aa..c487e019b908 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmssHardwareProfile.Serialization.cs +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmssHardwareProfile.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ComputeFleetVmssHardwareProfile : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(ComputeFleetVmssHardwareProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(VmSizeProperties)) { writer.WritePropertyName("vmSizeProperties"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } ComputeFleetVmssHardwareProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmssIPConfiguration.Serialization.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmssIPConfiguration.Serialization.cs index 226c64d6585c..6fc16fe19fe0 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmssIPConfiguration.Serialization.cs +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmssIPConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class ComputeFleetVmssIPConfiguration : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(ComputeFleetVmssIPConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); if (Optional.IsDefined(Properties)) @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } ComputeFleetVmssIPConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmssIPConfigurationProperties.Serialization.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmssIPConfigurationProperties.Serialization.cs index 9156cf8a3db6..b3151a02ffd0 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmssIPConfigurationProperties.Serialization.cs +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmssIPConfigurationProperties.Serialization.cs @@ -19,6 +19,15 @@ public partial class ComputeFleetVmssIPConfigurationProperties : IUtf8JsonSerial void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(ComputeFleetVmssIPConfigurationProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Subnet)) { writer.WritePropertyName("subnet"u8); @@ -102,7 +110,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } ComputeFleetVmssIPConfigurationProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmssIPTag.Serialization.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmssIPTag.Serialization.cs index 507e408a603a..c077b0a96e46 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmssIPTag.Serialization.cs +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmssIPTag.Serialization.cs @@ -18,6 +18,15 @@ public partial class ComputeFleetVmssIPTag : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(ComputeFleetVmssIPTag)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IPTagType)) { writer.WritePropertyName("ipTagType"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } ComputeFleetVmssIPTag IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmssManagedDisk.Serialization.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmssManagedDisk.Serialization.cs index 30355dc68eb1..f816933db8e8 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmssManagedDisk.Serialization.cs +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmssManagedDisk.Serialization.cs @@ -19,6 +19,15 @@ public partial class ComputeFleetVmssManagedDisk : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(ComputeFleetVmssManagedDisk)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(StorageAccountType)) { writer.WritePropertyName("storageAccountType"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } ComputeFleetVmssManagedDisk IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmssNetworkConfiguration.Serialization.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmssNetworkConfiguration.Serialization.cs index 68b09bc5b947..dba05725f106 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmssNetworkConfiguration.Serialization.cs +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmssNetworkConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class ComputeFleetVmssNetworkConfiguration : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(ComputeFleetVmssNetworkConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); if (Optional.IsDefined(Properties)) @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } ComputeFleetVmssNetworkConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmssNetworkConfigurationProperties.Serialization.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmssNetworkConfigurationProperties.Serialization.cs index a57d4babc99b..0ae5c88dc766 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmssNetworkConfigurationProperties.Serialization.cs +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmssNetworkConfigurationProperties.Serialization.cs @@ -19,6 +19,15 @@ public partial class ComputeFleetVmssNetworkConfigurationProperties : IUtf8JsonS void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWr throw new FormatException($"The model {nameof(ComputeFleetVmssNetworkConfigurationProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IsPrimary)) { writer.WritePropertyName("primary"u8); @@ -99,7 +107,6 @@ void IJsonModel.Write(Utf8JsonWr #endif } } - writer.WriteEndObject(); } ComputeFleetVmssNetworkConfigurationProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmssNetworkDnsSettings.Serialization.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmssNetworkDnsSettings.Serialization.cs index 5282bc5a80df..9ffae7245c73 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmssNetworkDnsSettings.Serialization.cs +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmssNetworkDnsSettings.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ComputeFleetVmssNetworkDnsSettings : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(ComputeFleetVmssNetworkDnsSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(DnsServers)) { writer.WritePropertyName("dnsServers"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } ComputeFleetVmssNetworkDnsSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmssNetworkProfile.Serialization.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmssNetworkProfile.Serialization.cs index 87f624243d6a..133e402375bf 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmssNetworkProfile.Serialization.cs +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmssNetworkProfile.Serialization.cs @@ -19,6 +19,15 @@ public partial class ComputeFleetVmssNetworkProfile : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(ComputeFleetVmssNetworkProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(HealthProbe)) { writer.WritePropertyName("healthProbe"u8); @@ -62,7 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } ComputeFleetVmssNetworkProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmssOSDisk.Serialization.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmssOSDisk.Serialization.cs index 4f726e12f929..f7569cfea9fd 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmssOSDisk.Serialization.cs +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmssOSDisk.Serialization.cs @@ -18,6 +18,15 @@ public partial class ComputeFleetVmssOSDisk : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(ComputeFleetVmssOSDisk)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -98,7 +106,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } ComputeFleetVmssOSDisk IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmssOSProfile.Serialization.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmssOSProfile.Serialization.cs index f698a839b3c8..bd812f9d5e63 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmssOSProfile.Serialization.cs +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmssOSProfile.Serialization.cs @@ -18,6 +18,15 @@ public partial class ComputeFleetVmssOSProfile : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(ComputeFleetVmssOSProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ComputerNamePrefix)) { writer.WritePropertyName("computerNamePrefix"u8); @@ -91,7 +99,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } ComputeFleetVmssOSProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmssPublicIPAddressConfiguration.Serialization.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmssPublicIPAddressConfiguration.Serialization.cs index 984746b71cf2..a2f7a54c8b93 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmssPublicIPAddressConfiguration.Serialization.cs +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmssPublicIPAddressConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class ComputeFleetVmssPublicIPAddressConfiguration : IUtf8JsonSer void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWrit throw new FormatException($"The model {nameof(ComputeFleetVmssPublicIPAddressConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); if (Optional.IsDefined(Properties)) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWrit #endif } } - writer.WriteEndObject(); } ComputeFleetVmssPublicIPAddressConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmssPublicIPAddressConfigurationProperties.Serialization.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmssPublicIPAddressConfigurationProperties.Serialization.cs index 9c5197c3c40b..0950080c8712 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmssPublicIPAddressConfigurationProperties.Serialization.cs +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmssPublicIPAddressConfigurationProperties.Serialization.cs @@ -19,6 +19,15 @@ public partial class ComputeFleetVmssPublicIPAddressConfigurationProperties : IU void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Ut throw new FormatException($"The model {nameof(ComputeFleetVmssPublicIPAddressConfigurationProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IdleTimeoutInMinutes)) { writer.WritePropertyName("idleTimeoutInMinutes"u8); @@ -77,7 +85,6 @@ void IJsonModel.Write(Ut #endif } } - writer.WriteEndObject(); } ComputeFleetVmssPublicIPAddressConfigurationProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmssPublicIPAddressDnsSettings.Serialization.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmssPublicIPAddressDnsSettings.Serialization.cs index 549d22d6b6bc..b5a5e5f41fad 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmssPublicIPAddressDnsSettings.Serialization.cs +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmssPublicIPAddressDnsSettings.Serialization.cs @@ -18,6 +18,15 @@ public partial class ComputeFleetVmssPublicIPAddressDnsSettings : IUtf8JsonSeria void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(ComputeFleetVmssPublicIPAddressDnsSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("domainNameLabel"u8); writer.WriteStringValue(DomainNameLabel); if (Optional.IsDefined(DomainNameLabelScope)) @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } ComputeFleetVmssPublicIPAddressDnsSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmssStorageProfile.Serialization.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmssStorageProfile.Serialization.cs index 525485dfa9fa..e83e7076a8a9 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmssStorageProfile.Serialization.cs +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetVmssStorageProfile.Serialization.cs @@ -18,6 +18,15 @@ public partial class ComputeFleetVmssStorageProfile : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(ComputeFleetVmssStorageProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ImageReference)) { writer.WritePropertyName("imageReference"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } ComputeFleetVmssStorageProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetWinRMListener.Serialization.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetWinRMListener.Serialization.cs index b30770bb281f..eb8b6cc1fc8a 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetWinRMListener.Serialization.cs +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetWinRMListener.Serialization.cs @@ -18,6 +18,15 @@ public partial class ComputeFleetWinRMListener : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(ComputeFleetWinRMListener)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Protocol)) { writer.WritePropertyName("protocol"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } ComputeFleetWinRMListener IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetWindowsConfiguration.Serialization.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetWindowsConfiguration.Serialization.cs index bb7cfbca2055..bb712f6e5edc 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetWindowsConfiguration.Serialization.cs +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetWindowsConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class ComputeFleetWindowsConfiguration : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(ComputeFleetWindowsConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IsVmAgentProvisioned)) { writer.WritePropertyName("provisionVMAgent"u8); @@ -81,7 +89,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } ComputeFleetWindowsConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetWindowsVmGuestPatchAutomaticByPlatformSettings.Serialization.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetWindowsVmGuestPatchAutomaticByPlatformSettings.Serialization.cs index 6f3e5079e52e..1bf93ef80fd9 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetWindowsVmGuestPatchAutomaticByPlatformSettings.Serialization.cs +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/ComputeFleetWindowsVmGuestPatchAutomaticByPlatformSettings.Serialization.cs @@ -18,6 +18,15 @@ public partial class ComputeFleetWindowsVmGuestPatchAutomaticByPlatformSettings void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Writ throw new FormatException($"The model {nameof(ComputeFleetWindowsVmGuestPatchAutomaticByPlatformSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(RebootSetting)) { writer.WritePropertyName("rebootSetting"u8); @@ -51,7 +59,6 @@ void IJsonModel.Writ #endif } } - writer.WriteEndObject(); } ComputeFleetWindowsVmGuestPatchAutomaticByPlatformSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/CpuManufacturer.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/CpuManufacturer.cs new file mode 100644 index 000000000000..e4df71fa76d9 --- /dev/null +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/CpuManufacturer.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ComputeFleet.Models +{ + /// Cpu Manufacturers supported by Azure VMs. + public readonly partial struct CpuManufacturer : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public CpuManufacturer(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string IntelValue = "Intel"; + private const string AMDValue = "AMD"; + private const string MicrosoftValue = "Microsoft"; + private const string AmpereValue = "Ampere"; + + /// Intel CPU. + public static CpuManufacturer Intel { get; } = new CpuManufacturer(IntelValue); + /// AMD CPU. + public static CpuManufacturer AMD { get; } = new CpuManufacturer(AMDValue); + /// Microsoft CPU. + public static CpuManufacturer Microsoft { get; } = new CpuManufacturer(MicrosoftValue); + /// Ampere CPU. + public static CpuManufacturer Ampere { get; } = new CpuManufacturer(AmpereValue); + /// Determines if two values are the same. + public static bool operator ==(CpuManufacturer left, CpuManufacturer right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(CpuManufacturer left, CpuManufacturer right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator CpuManufacturer(string value) => new CpuManufacturer(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is CpuManufacturer other && Equals(other); + /// + public bool Equals(CpuManufacturer other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/FleetListResult.Serialization.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/FleetListResult.Serialization.cs index 30afe9e74fd6..69b7df578526 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/FleetListResult.Serialization.cs +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/FleetListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class FleetListResult : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(FleetListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO #endif } } - writer.WriteEndObject(); } FleetListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/LocalStorageDiskType.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/LocalStorageDiskType.cs new file mode 100644 index 000000000000..c6b92dc9ce58 --- /dev/null +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/LocalStorageDiskType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ComputeFleet.Models +{ + /// Different kind of Local storage disk types supported by Azure VMs. + public readonly partial struct LocalStorageDiskType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public LocalStorageDiskType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string HDDValue = "HDD"; + private const string SSDValue = "SSD"; + + /// HDD DiskType. + public static LocalStorageDiskType HDD { get; } = new LocalStorageDiskType(HDDValue); + /// SDD DiskType. + public static LocalStorageDiskType SSD { get; } = new LocalStorageDiskType(SSDValue); + /// Determines if two values are the same. + public static bool operator ==(LocalStorageDiskType left, LocalStorageDiskType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(LocalStorageDiskType left, LocalStorageDiskType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator LocalStorageDiskType(string value) => new LocalStorageDiskType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is LocalStorageDiskType other && Equals(other); + /// + public bool Equals(LocalStorageDiskType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/LocationProfile.Serialization.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/LocationProfile.Serialization.cs new file mode 100644 index 000000000000..792c90531c35 --- /dev/null +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/LocationProfile.Serialization.cs @@ -0,0 +1,141 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ComputeFleet.Models +{ + public partial class LocationProfile : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(LocationProfile)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("location"u8); + writer.WriteStringValue(Location); + if (Optional.IsDefined(VirtualMachineProfileOverride)) + { + writer.WritePropertyName("virtualMachineProfileOverride"u8); + writer.WriteObjectValue(VirtualMachineProfileOverride, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + LocationProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(LocationProfile)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeLocationProfile(document.RootElement, options); + } + + internal static LocationProfile DeserializeLocationProfile(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + AzureLocation location = default; + ComputeFleetVmProfile virtualMachineProfileOverride = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("location"u8)) + { + location = new AzureLocation(property.Value.GetString()); + continue; + } + if (property.NameEquals("virtualMachineProfileOverride"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + virtualMachineProfileOverride = ComputeFleetVmProfile.DeserializeComputeFleetVmProfile(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new LocationProfile(location, virtualMachineProfileOverride, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(LocationProfile)} does not support writing '{options.Format}' format."); + } + } + + LocationProfile IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeLocationProfile(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(LocationProfile)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/LocationProfile.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/LocationProfile.cs new file mode 100644 index 000000000000..9b40c1a8a09b --- /dev/null +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/LocationProfile.cs @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.ComputeFleet.Models +{ + /// Represents the profile for a single additional location in the Fleet. The location and the virtualMachineProfileOverride (optional). + public partial class LocationProfile + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The ARM location name of the additional region. If LocationProfile is specified, then location is required. + public LocationProfile(AzureLocation location) + { + Location = location; + } + + /// Initializes a new instance of . + /// The ARM location name of the additional region. If LocationProfile is specified, then location is required. + /// + /// An override for computeProfile.baseVirtualMachineProfile specific to this region. + /// This override is merged with the base virtual machine profile to define the final virtual machine profile for the resources deployed in this location. + /// + /// Keeps track of any properties unknown to the library. + internal LocationProfile(AzureLocation location, ComputeFleetVmProfile virtualMachineProfileOverride, IDictionary serializedAdditionalRawData) + { + Location = location; + VirtualMachineProfileOverride = virtualMachineProfileOverride; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal LocationProfile() + { + } + + /// The ARM location name of the additional region. If LocationProfile is specified, then location is required. + public AzureLocation Location { get; set; } + /// + /// An override for computeProfile.baseVirtualMachineProfile specific to this region. + /// This override is merged with the base virtual machine profile to define the final virtual machine profile for the resources deployed in this location. + /// + public ComputeFleetVmProfile VirtualMachineProfileOverride { get; set; } + } +} diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/RegularPriorityProfile.Serialization.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/RegularPriorityProfile.Serialization.cs index 2db980f8d3f7..ced91c0af7f7 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/RegularPriorityProfile.Serialization.cs +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/RegularPriorityProfile.Serialization.cs @@ -18,6 +18,15 @@ public partial class RegularPriorityProfile : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(RegularPriorityProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Capacity)) { writer.WritePropertyName("capacity"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } RegularPriorityProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/SpotPriorityProfile.Serialization.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/SpotPriorityProfile.Serialization.cs index b9fa2a9b128a..169a556fd74a 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/SpotPriorityProfile.Serialization.cs +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/SpotPriorityProfile.Serialization.cs @@ -18,6 +18,15 @@ public partial class SpotPriorityProfile : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(SpotPriorityProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Capacity)) { writer.WritePropertyName("capacity"u8); @@ -71,7 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } SpotPriorityProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/VirtualMachineScaleSetListResult.Serialization.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/VirtualMachineScaleSetListResult.Serialization.cs index 33c194673c99..ae42f39606fd 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/VirtualMachineScaleSetListResult.Serialization.cs +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/VirtualMachineScaleSetListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class VirtualMachineScaleSetListResult : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(VirtualMachineScaleSetListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } VirtualMachineScaleSetListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/WinRMConfiguration.Serialization.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/WinRMConfiguration.Serialization.cs index 669582afd846..d08e8948107c 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/WinRMConfiguration.Serialization.cs +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/WinRMConfiguration.Serialization.cs @@ -18,6 +18,15 @@ internal partial class WinRMConfiguration : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(WinRMConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Listeners)) { writer.WritePropertyName("listeners"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } WinRMConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/WindowsSetupAdditionalInformation.Serialization.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/WindowsSetupAdditionalInformation.Serialization.cs index b4b958c1bef3..e042f711ac95 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/WindowsSetupAdditionalInformation.Serialization.cs +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/WindowsSetupAdditionalInformation.Serialization.cs @@ -18,6 +18,15 @@ public partial class WindowsSetupAdditionalInformation : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(WindowsSetupAdditionalInformation)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(PassName)) { writer.WritePropertyName("passName"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } WindowsSetupAdditionalInformation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/RestOperations/FleetsRestOperations.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/RestOperations/FleetsRestOperations.cs index 497e8c9acbcd..19a05a5d396e 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/RestOperations/FleetsRestOperations.cs +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/RestOperations/FleetsRestOperations.cs @@ -25,14 +25,14 @@ internal partial class FleetsRestOperations /// Initializes a new instance of FleetsRestOperations. /// The HTTP pipeline for sending and receiving REST requests and responses. /// The application id to use for user agent. - /// The to use. + /// Service host. /// The API version to use for this operation. /// or is null. public FleetsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-05-01-preview"; + _apiVersion = apiVersion ?? "2024-11-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/tests/Scenario/ComputeFleetCRUDTests.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/tests/Scenario/ComputeFleetCRUDTests.cs index 4bd2d4fafa51..ccb5a45159a4 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/tests/Scenario/ComputeFleetCRUDTests.cs +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/tests/Scenario/ComputeFleetCRUDTests.cs @@ -1,6 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. +using System; +using System.Linq; using System.Threading.Tasks; using Azure.Core.TestFramework; using NUnit.Framework; @@ -14,7 +16,9 @@ public ComputeFleetCRUDTests(bool isAsync) { } + // To enable record - set AZURE_TEST_MODE=Record to record the test. [TestCase] + [RecordedTest] public async Task TestCreateComputeFleet() { var computeFleetCollection = await GetComputeFleetCollectionAsync(); @@ -31,8 +35,68 @@ public async Task TestCreateComputeFleet() var getComputeFleet = await computeFleetCollection.GetAsync(computeFleetName); Assert.AreEqual(computeFleetName, getComputeFleet.Value.Data.Name); + // Check if Fleet exists. + var isExists = await computeFleetCollection.ExistsAsync(computeFleetName); + Assert.IsTrue(isExists); + // Delete the compute fleet await createFleetResult.Value.DeleteAsync(WaitUntil.Completed); + + // Check if Fleet does not exists. + isExists = await computeFleetCollection.ExistsAsync(computeFleetName); + Assert.IsFalse(isExists); + } + + [TestCase] + [RecordedTest] + public async Task TestCreateMultipleComputeFleetsAndCheck() + { + Console.WriteLine("Stating Test TestCreateMultipleComputeFleetsAndCheck"); + var computeFleetCollection = await GetComputeFleetCollectionAsync(); + var vnet = await CreateVirtualNetwork(); + var computeFleetName = Recording.GenerateAssetName("testFleetViaSDK-"); + var computeFleetData = GetBasicComputeFleetData(DefaultLocation, computeFleetName, GetSubnetId(vnet)); + + // Create the compute fleet + var createFleetResult = await computeFleetCollection.CreateOrUpdateAsync(WaitUntil.Completed, computeFleetName, computeFleetData); + Assert.AreEqual(computeFleetName, createFleetResult.Value.Data.Name); + Assert.AreEqual(DefaultLocation, createFleetResult.Value.Data.Location); + + // Get the compute fleet + var getComputeFleet = await computeFleetCollection.GetAsync(computeFleetName); + Assert.AreEqual(computeFleetName, getComputeFleet.Value.Data.Name); + + // Check if Fleet exists. + var isExists = await computeFleetCollection.ExistsAsync(computeFleetName); + Assert.IsTrue(isExists); + + // Create 2nd Fleet + var computeFleetName2nd = Recording.GenerateAssetName("testFleetViaSDK-", "multi"); + var computeFleetData2nd = GetBasicComputeFleetData(DefaultLocation, computeFleetName2nd, GetSubnetId(vnet)); + var createFleetResult2nd = await computeFleetCollection.CreateOrUpdateAsync(WaitUntil.Completed, computeFleetName2nd, computeFleetData2nd); + Assert.AreEqual(computeFleetName2nd, createFleetResult2nd.Value.Data.Name); + Assert.AreEqual(DefaultLocation, createFleetResult2nd.Value.Data.Location); + + // Check if 2nd Fleet exists. + isExists = await computeFleetCollection.ExistsAsync(computeFleetName2nd); + Assert.IsTrue(isExists); + + var fleet2nd = await computeFleetCollection.GetIfExistsAsync(computeFleetName2nd); + Assert.NotNull(fleet2nd); + + // Delete the 1st compute fleet + await createFleetResult.Value.DeleteAsync(WaitUntil.Completed); + + // Check if 1st Fleet does not exists. + isExists = await computeFleetCollection.ExistsAsync(computeFleetName); + Assert.IsFalse(isExists); + + // Delete the 2nd compute fleet + await createFleetResult2nd.Value.DeleteAsync(WaitUntil.Completed); + + // Check if 2nd Fleet does not exists. + isExists = await computeFleetCollection.ExistsAsync(computeFleetName2nd); + Assert.IsFalse(isExists); } } } diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/tsp-location.yaml b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/tsp-location.yaml index b5e602272d0c..9cb62246a668 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/tsp-location.yaml +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/tsp-location.yaml @@ -1,3 +1,4 @@ directory: specification/azurefleet/AzureFleet.Management -commit: c0a15f4623eb11f745f890089f3d46d8a538524f -repo: Azure/azure-rest-api-specs \ No newline at end of file +commit: 8ad58020cfafc5ace71d85b31272acf4d6b694d3 +repo: Azure/azure-rest-api-specs + diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/api/Azure.ResourceManager.ComputeSchedule.netstandard2.0.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/api/Azure.ResourceManager.ComputeSchedule.netstandard2.0.cs index a3f22d7e3d5e..836b8e83b6db 100644 --- a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/api/Azure.ResourceManager.ComputeSchedule.netstandard2.0.cs +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/api/Azure.ResourceManager.ComputeSchedule.netstandard2.0.cs @@ -68,6 +68,7 @@ public partial class CancelOperationsContent : System.ClientModel.Primitives.IJs public CancelOperationsContent(System.Collections.Generic.IEnumerable operationIds, string correlationId) { } public string CorrelationId { get { throw null; } } public System.Collections.Generic.IList OperationIds { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ComputeSchedule.Models.CancelOperationsContent 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.ComputeSchedule.Models.CancelOperationsContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -78,6 +79,7 @@ public partial class CancelOperationsResult : System.ClientModel.Primitives.IJso { internal CancelOperationsResult() { } public System.Collections.Generic.IReadOnlyList Results { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ComputeSchedule.Models.CancelOperationsResult 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.ComputeSchedule.Models.CancelOperationsResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -91,6 +93,7 @@ internal DeallocateResourceOperationResult() { } public Azure.Core.AzureLocation Location { get { throw null; } } public string ResourceType { get { throw null; } } public System.Collections.Generic.IReadOnlyList Results { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ComputeSchedule.Models.DeallocateResourceOperationResult 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.ComputeSchedule.Models.DeallocateResourceOperationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -103,6 +106,7 @@ public ExecuteDeallocateContent(Azure.ResourceManager.ComputeSchedule.Models.Sch public string CorrelationId { get { throw null; } } public Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionExecutionParameterDetail ExecutionParameters { get { throw null; } } public System.Collections.Generic.IList ResourcesIds { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ComputeSchedule.Models.ExecuteDeallocateContent 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.ComputeSchedule.Models.ExecuteDeallocateContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -115,6 +119,7 @@ public ExecuteHibernateContent(Azure.ResourceManager.ComputeSchedule.Models.Sche public string CorrelationId { get { throw null; } } public Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionExecutionParameterDetail ExecutionParameters { get { throw null; } } public System.Collections.Generic.IList ResourcesIds { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ComputeSchedule.Models.ExecuteHibernateContent 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.ComputeSchedule.Models.ExecuteHibernateContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -127,6 +132,7 @@ public ExecuteStartContent(Azure.ResourceManager.ComputeSchedule.Models.Schedule public string CorrelationId { get { throw null; } } public Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionExecutionParameterDetail ExecutionParameters { get { throw null; } } public System.Collections.Generic.IList ResourcesIds { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ComputeSchedule.Models.ExecuteStartContent 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.ComputeSchedule.Models.ExecuteStartContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -137,6 +143,7 @@ public partial class GetOperationErrorsContent : System.ClientModel.Primitives.I { public GetOperationErrorsContent(System.Collections.Generic.IEnumerable operationIds) { } public System.Collections.Generic.IList OperationIds { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ComputeSchedule.Models.GetOperationErrorsContent 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.ComputeSchedule.Models.GetOperationErrorsContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -147,6 +154,7 @@ public partial class GetOperationErrorsResult : System.ClientModel.Primitives.IJ { internal GetOperationErrorsResult() { } public System.Collections.Generic.IReadOnlyList Results { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ComputeSchedule.Models.GetOperationErrorsResult 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.ComputeSchedule.Models.GetOperationErrorsResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -158,6 +166,7 @@ public partial class GetOperationStatusContent : System.ClientModel.Primitives.I public GetOperationStatusContent(System.Collections.Generic.IEnumerable operationIds, string correlationId) { } public string CorrelationId { get { throw null; } } public System.Collections.Generic.IList OperationIds { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ComputeSchedule.Models.GetOperationStatusContent 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.ComputeSchedule.Models.GetOperationStatusContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -168,6 +177,7 @@ public partial class GetOperationStatusResult : System.ClientModel.Primitives.IJ { internal GetOperationStatusResult() { } public System.Collections.Generic.IReadOnlyList Results { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ComputeSchedule.Models.GetOperationStatusResult 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.ComputeSchedule.Models.GetOperationStatusResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -181,6 +191,7 @@ internal HibernateResourceOperationResult() { } public Azure.Core.AzureLocation Location { get { throw null; } } public string ResourceType { get { throw null; } } public System.Collections.Generic.IReadOnlyList Results { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ComputeSchedule.Models.HibernateResourceOperationResult 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.ComputeSchedule.Models.HibernateResourceOperationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -194,6 +205,7 @@ internal OperationErrorDetails() { } public string ErrorCode { get { throw null; } } public System.DateTimeOffset ErrorDetails { get { throw null; } } public System.DateTimeOffset TimeStamp { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ComputeSchedule.Models.OperationErrorDetails 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.ComputeSchedule.Models.OperationErrorDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -210,6 +222,7 @@ internal OperationErrorsResult() { } public string OperationId { get { throw null; } } public string RequestErrorCode { get { throw null; } } public string RequestErrorDetails { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ComputeSchedule.Models.OperationErrorsResult 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.ComputeSchedule.Models.OperationErrorsResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -230,6 +243,7 @@ internal ResourceOperationDetails() { } public Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionOperationState State { get { throw null; } } public string SubscriptionId { get { throw null; } } public string TimeZone { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ComputeSchedule.Models.ResourceOperationDetails 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.ComputeSchedule.Models.ResourceOperationDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -241,6 +255,7 @@ public partial class ResourceOperationError : System.ClientModel.Primitives.IJso internal ResourceOperationError() { } public string ErrorCode { get { throw null; } } public string ErrorDetails { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ComputeSchedule.Models.ResourceOperationError 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.ComputeSchedule.Models.ResourceOperationError System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -254,6 +269,7 @@ internal ResourceOperationResult() { } public string ErrorDetails { get { throw null; } } public Azure.ResourceManager.ComputeSchedule.Models.ResourceOperationDetails Operation { get { throw null; } } public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ComputeSchedule.Models.ResourceOperationResult 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.ComputeSchedule.Models.ResourceOperationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -304,6 +320,7 @@ public partial class ScheduledActionExecutionParameterDetail : System.ClientMode public ScheduledActionExecutionParameterDetail() { } public Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionOptimizationPreference? OptimizationPreference { get { throw null; } set { } } public Azure.ResourceManager.ComputeSchedule.Models.UserRequestRetryPolicy RetryPolicy { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionExecutionParameterDetail 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.ComputeSchedule.Models.ScheduledActionExecutionParameterDetail System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -361,6 +378,7 @@ internal StartResourceOperationResult() { } public Azure.Core.AzureLocation Location { get { throw null; } } public string ResourceType { get { throw null; } } public System.Collections.Generic.IReadOnlyList Results { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ComputeSchedule.Models.StartResourceOperationResult 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.ComputeSchedule.Models.StartResourceOperationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -374,6 +392,7 @@ public SubmitDeallocateContent(Azure.ResourceManager.ComputeSchedule.Models.User public Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionExecutionParameterDetail ExecutionParameters { get { throw null; } } public System.Collections.Generic.IList ResourcesIds { get { throw null; } } public Azure.ResourceManager.ComputeSchedule.Models.UserRequestSchedule Schedule { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ComputeSchedule.Models.SubmitDeallocateContent 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.ComputeSchedule.Models.SubmitDeallocateContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -387,6 +406,7 @@ public SubmitHibernateContent(Azure.ResourceManager.ComputeSchedule.Models.UserR public Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionExecutionParameterDetail ExecutionParameters { get { throw null; } } public System.Collections.Generic.IList ResourcesIds { get { throw null; } } public Azure.ResourceManager.ComputeSchedule.Models.UserRequestSchedule Schedule { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ComputeSchedule.Models.SubmitHibernateContent 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.ComputeSchedule.Models.SubmitHibernateContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -400,6 +420,7 @@ public SubmitStartContent(Azure.ResourceManager.ComputeSchedule.Models.UserReque public Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionExecutionParameterDetail ExecutionParameters { get { throw null; } } public System.Collections.Generic.IList ResourcesIds { get { throw null; } } public Azure.ResourceManager.ComputeSchedule.Models.UserRequestSchedule Schedule { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ComputeSchedule.Models.SubmitStartContent 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.ComputeSchedule.Models.SubmitStartContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -410,6 +431,7 @@ public partial class UserRequestResources : System.ClientModel.Primitives.IJsonM { public UserRequestResources(System.Collections.Generic.IEnumerable ids) { } public System.Collections.Generic.IList Ids { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ComputeSchedule.Models.UserRequestResources 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.ComputeSchedule.Models.UserRequestResources System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -421,6 +443,7 @@ public partial class UserRequestRetryPolicy : System.ClientModel.Primitives.IJso public UserRequestRetryPolicy() { } public int? RetryCount { get { throw null; } set { } } public int? RetryWindowInMinutes { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ComputeSchedule.Models.UserRequestRetryPolicy 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.ComputeSchedule.Models.UserRequestRetryPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -433,6 +456,7 @@ public UserRequestSchedule(System.DateTimeOffset deadLine, string timeZone, Azur public System.DateTimeOffset DeadLine { get { throw null; } } public Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionDeadlineType DeadlineType { get { throw null; } } public string TimeZone { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ComputeSchedule.Models.UserRequestSchedule 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.ComputeSchedule.Models.UserRequestSchedule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/assets.json b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/assets.json index ef6dcf4efe9e..95e650fe051a 100644 --- a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/assets.json +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/computeschedule/Azure.ResourceManager.ComputeSchedule", - "Tag": "net/computeschedule/Azure.ResourceManager.ComputeSchedule_f16d0a9f7e" + "Tag": "net/computeschedule/Azure.ResourceManager.ComputeSchedule_b95d5dae4f" } diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/CancelOperationsContent.Serialization.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/CancelOperationsContent.Serialization.cs index 379799a092d4..b620d54aea16 100644 --- a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/CancelOperationsContent.Serialization.cs +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/CancelOperationsContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class CancelOperationsContent : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(CancelOperationsContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("operationIds"u8); writer.WriteStartArray(); foreach (var item in OperationIds) @@ -50,7 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } CancelOperationsContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/CancelOperationsResult.Serialization.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/CancelOperationsResult.Serialization.cs index 05732e401362..6ea83eb6cb2e 100644 --- a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/CancelOperationsResult.Serialization.cs +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/CancelOperationsResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class CancelOperationsResult : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(CancelOperationsResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("results"u8); writer.WriteStartArray(); foreach (var item in Results) @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } CancelOperationsResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/DeallocateResourceOperationResult.Serialization.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/DeallocateResourceOperationResult.Serialization.cs index d9a7c7f85f56..caa2a1bb07b8 100644 --- a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/DeallocateResourceOperationResult.Serialization.cs +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/DeallocateResourceOperationResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class DeallocateResourceOperationResult : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(DeallocateResourceOperationResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); writer.WritePropertyName("type"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } DeallocateResourceOperationResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ExecuteDeallocateContent.Serialization.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ExecuteDeallocateContent.Serialization.cs index d0ab9097a211..b7dffb300cb0 100644 --- a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ExecuteDeallocateContent.Serialization.cs +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ExecuteDeallocateContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class ExecuteDeallocateContent : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(ExecuteDeallocateContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("executionParameters"u8); writer.WriteObjectValue(ExecutionParameters, options); writer.WritePropertyName("resources"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } ExecuteDeallocateContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ExecuteHibernateContent.Serialization.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ExecuteHibernateContent.Serialization.cs index 0fe943868771..e2490489b16e 100644 --- a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ExecuteHibernateContent.Serialization.cs +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ExecuteHibernateContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class ExecuteHibernateContent : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(ExecuteHibernateContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("executionParameters"u8); writer.WriteObjectValue(ExecutionParameters, options); writer.WritePropertyName("resources"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } ExecuteHibernateContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ExecuteStartContent.Serialization.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ExecuteStartContent.Serialization.cs index 961eb10a1b0e..f61dc1e28e3c 100644 --- a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ExecuteStartContent.Serialization.cs +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ExecuteStartContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class ExecuteStartContent : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ExecuteStartContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("executionParameters"u8); writer.WriteObjectValue(ExecutionParameters, options); writer.WritePropertyName("resources"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } ExecuteStartContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/GetOperationErrorsContent.Serialization.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/GetOperationErrorsContent.Serialization.cs index 7708a8ccb543..6c491c5106b8 100644 --- a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/GetOperationErrorsContent.Serialization.cs +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/GetOperationErrorsContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class GetOperationErrorsContent : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(GetOperationErrorsContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("operationIds"u8); writer.WriteStartArray(); foreach (var item in OperationIds) @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } GetOperationErrorsContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/GetOperationErrorsResult.Serialization.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/GetOperationErrorsResult.Serialization.cs index b6e96c0f9787..d557775833c8 100644 --- a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/GetOperationErrorsResult.Serialization.cs +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/GetOperationErrorsResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class GetOperationErrorsResult : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(GetOperationErrorsResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("results"u8); writer.WriteStartArray(); foreach (var item in Results) @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } GetOperationErrorsResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/GetOperationStatusContent.Serialization.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/GetOperationStatusContent.Serialization.cs index e8633fe4bb25..e91804c0bb9f 100644 --- a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/GetOperationStatusContent.Serialization.cs +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/GetOperationStatusContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class GetOperationStatusContent : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(GetOperationStatusContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("operationIds"u8); writer.WriteStartArray(); foreach (var item in OperationIds) @@ -50,7 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } GetOperationStatusContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/GetOperationStatusResult.Serialization.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/GetOperationStatusResult.Serialization.cs index 0a59ecebb274..fea46ab80fb0 100644 --- a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/GetOperationStatusResult.Serialization.cs +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/GetOperationStatusResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class GetOperationStatusResult : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(GetOperationStatusResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("results"u8); writer.WriteStartArray(); foreach (var item in Results) @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } GetOperationStatusResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/HibernateResourceOperationResult.Serialization.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/HibernateResourceOperationResult.Serialization.cs index 74aa2354ea2b..5b13d98aa741 100644 --- a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/HibernateResourceOperationResult.Serialization.cs +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/HibernateResourceOperationResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class HibernateResourceOperationResult : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(HibernateResourceOperationResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); writer.WritePropertyName("type"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } HibernateResourceOperationResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/OperationErrorDetails.Serialization.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/OperationErrorDetails.Serialization.cs index 08a8469c9f9b..560418b707c3 100644 --- a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/OperationErrorDetails.Serialization.cs +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/OperationErrorDetails.Serialization.cs @@ -18,6 +18,15 @@ public partial class OperationErrorDetails : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(OperationErrorDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("errorCode"u8); writer.WriteStringValue(ErrorCode); writer.WritePropertyName("errorDetails"u8); @@ -49,7 +57,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } OperationErrorDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/OperationErrorsResult.Serialization.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/OperationErrorsResult.Serialization.cs index 32733cded89f..3ca357addee4 100644 --- a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/OperationErrorsResult.Serialization.cs +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/OperationErrorsResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class OperationErrorsResult : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(OperationErrorsResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(OperationId)) { writer.WritePropertyName("operationId"u8); @@ -81,7 +89,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } OperationErrorsResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ResourceOperationDetails.Serialization.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ResourceOperationDetails.Serialization.cs index 4aa0e24533b5..bc1c5b836cef 100644 --- a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ResourceOperationDetails.Serialization.cs +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ResourceOperationDetails.Serialization.cs @@ -18,6 +18,15 @@ public partial class ResourceOperationDetails : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(ResourceOperationDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("operationId"u8); writer.WriteStringValue(OperationId); writer.WritePropertyName("resourceId"u8); @@ -75,7 +83,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } ResourceOperationDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ResourceOperationError.Serialization.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ResourceOperationError.Serialization.cs index bdc9472c4342..0a06364ffdbf 100644 --- a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ResourceOperationError.Serialization.cs +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ResourceOperationError.Serialization.cs @@ -18,6 +18,15 @@ public partial class ResourceOperationError : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(ResourceOperationError)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("errorCode"u8); writer.WriteStringValue(ErrorCode); writer.WritePropertyName("errorDetails"u8); @@ -45,7 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } ResourceOperationError IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ResourceOperationResult.Serialization.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ResourceOperationResult.Serialization.cs index 6bdfcfa35dac..fec8dcde2207 100644 --- a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ResourceOperationResult.Serialization.cs +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ResourceOperationResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class ResourceOperationResult : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(ResourceOperationResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ResourceId)) { writer.WritePropertyName("resourceId"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } ResourceOperationResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionExecutionParameterDetail.Serialization.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionExecutionParameterDetail.Serialization.cs index f746bd79997f..cd668a789db3 100644 --- a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionExecutionParameterDetail.Serialization.cs +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionExecutionParameterDetail.Serialization.cs @@ -18,6 +18,15 @@ public partial class ScheduledActionExecutionParameterDetail : IUtf8JsonSerializ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wr throw new FormatException($"The model {nameof(ScheduledActionExecutionParameterDetail)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(OptimizationPreference)) { writer.WritePropertyName("optimizationPreference"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter wr #endif } } - writer.WriteEndObject(); } ScheduledActionExecutionParameterDetail IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/StartResourceOperationResult.Serialization.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/StartResourceOperationResult.Serialization.cs index 46cab8bf532e..0ffb43b1a567 100644 --- a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/StartResourceOperationResult.Serialization.cs +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/StartResourceOperationResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class StartResourceOperationResult : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(StartResourceOperationResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); writer.WritePropertyName("type"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } StartResourceOperationResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/SubmitDeallocateContent.Serialization.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/SubmitDeallocateContent.Serialization.cs index 6a1085778c9b..b153a98ff376 100644 --- a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/SubmitDeallocateContent.Serialization.cs +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/SubmitDeallocateContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class SubmitDeallocateContent : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(SubmitDeallocateContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("schedule"u8); writer.WriteObjectValue(Schedule, options); writer.WritePropertyName("executionParameters"u8); @@ -49,7 +57,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } SubmitDeallocateContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/SubmitHibernateContent.Serialization.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/SubmitHibernateContent.Serialization.cs index eee692b405c9..1af0e226bc2d 100644 --- a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/SubmitHibernateContent.Serialization.cs +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/SubmitHibernateContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class SubmitHibernateContent : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(SubmitHibernateContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("schedule"u8); writer.WriteObjectValue(Schedule, options); writer.WritePropertyName("executionParameters"u8); @@ -49,7 +57,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } SubmitHibernateContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/SubmitStartContent.Serialization.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/SubmitStartContent.Serialization.cs index f92ab1feca5b..134c7853d85c 100644 --- a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/SubmitStartContent.Serialization.cs +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/SubmitStartContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class SubmitStartContent : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(SubmitStartContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("schedule"u8); writer.WriteObjectValue(Schedule, options); writer.WritePropertyName("executionParameters"u8); @@ -49,7 +57,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } SubmitStartContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/UserRequestResources.Serialization.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/UserRequestResources.Serialization.cs index 5f89e94e1e76..d7c8284a1da0 100644 --- a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/UserRequestResources.Serialization.cs +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/UserRequestResources.Serialization.cs @@ -18,6 +18,15 @@ public partial class UserRequestResources : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(UserRequestResources)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("ids"u8); writer.WriteStartArray(); foreach (var item in Ids) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } UserRequestResources IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/UserRequestRetryPolicy.Serialization.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/UserRequestRetryPolicy.Serialization.cs index 4099ea4aab6f..951a434f9c77 100644 --- a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/UserRequestRetryPolicy.Serialization.cs +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/UserRequestRetryPolicy.Serialization.cs @@ -18,6 +18,15 @@ public partial class UserRequestRetryPolicy : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(UserRequestRetryPolicy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(RetryCount)) { writer.WritePropertyName("retryCount"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } UserRequestRetryPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/UserRequestSchedule.Serialization.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/UserRequestSchedule.Serialization.cs index 2e270d710f9a..cf6efb6988ca 100644 --- a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/UserRequestSchedule.Serialization.cs +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/UserRequestSchedule.Serialization.cs @@ -18,6 +18,15 @@ public partial class UserRequestSchedule : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(UserRequestSchedule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("deadLine"u8); writer.WriteStringValue(DeadLine, "O"); writer.WritePropertyName("timeZone"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } UserRequestSchedule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/RestOperations/ScheduledActionsRestOperations.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/RestOperations/ScheduledActionsRestOperations.cs index 2e8e1f9c4f63..571888daa689 100644 --- a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/RestOperations/ScheduledActionsRestOperations.cs +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/RestOperations/ScheduledActionsRestOperations.cs @@ -25,7 +25,7 @@ internal partial class ScheduledActionsRestOperations /// Initializes a new instance of ScheduledActionsRestOperations. /// The HTTP pipeline for sending and receiving REST requests and responses. /// The application id to use for user agent. - /// The to use. + /// Service host. /// The API version to use for this operation. /// or is null. public ScheduledActionsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/assets.json b/sdk/containerapps/Azure.ResourceManager.AppContainers/assets.json index 9a48baaa2d01..68acd667f8e6 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/assets.json +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/containerapps/Azure.ResourceManager.AppContainers", - "Tag": "net/containerapps/Azure.ResourceManager.AppContainers_29e939e2d0" + "Tag": "net/containerapps/Azure.ResourceManager.AppContainers_d9ce2874ef" } diff --git a/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/CHANGELOG.md b/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/CHANGELOG.md index 7d64d96425e8..a320a64e8b3a 100644 --- a/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/CHANGELOG.md +++ b/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/CHANGELOG.md @@ -1,29 +1,39 @@ # Release History -## 1.3.0-beta.1 (Unreleased) +## 1.3.0-beta.2 (Unreleased) ### Features Added -- Exposed `JsonModelWriteCore` for model serialization procedure. - ### Breaking Changes ### Bugs Fixed ### Other Changes +## 1.3.0-beta.1 (2024-10-24) + +### Features Added + +- Upgraded api-version tag from 'package-2023-05' to 'package-preview-2024-05'. Tag detail available at https://github.com/Azure/azure-rest-api-specs/blob/10b3107f2eafcd428a208ec5858f3ca9261b1123/specification/containerinstance/resource-manager/readme.md. +- Exposed `JsonModelWriteCore` for model serialization procedure. + +### Other Changes + +- Upgraded Azure.Core from 1.39.0 to 1.44.1 +- Upgraded Azure.ResourceManager from 1.11.1 to 1.13.0 + ## 1.2.1 (2024-04-29) ### Features Added -- Enable the new model serialization by using the System.ClientModel, refer this [document](https://aka.ms/azsdk/net/mrw) for more details. +- Enabled the new model serialization by using the System.ClientModel, refer this [document](https://aka.ms/azsdk/net/mrw) for more details. - Add `ArmOperation.Rehydrate` and `ArmOperation.Rehydrate` static methods to rehydrate a long-running operation. ## 1.2.0 (2023-11-27) ### Features Added -- Enable mocking for extension methods, refer this [document](https://aka.ms/azsdk/net/mocking) for more details. +- Enabled mocking for extension methods, refer this [document](https://aka.ms/azsdk/net/mocking) for more details. ### Other Changes @@ -33,7 +43,7 @@ ### Features Added -- Enable the model factory feature for model mocking, more information can be found [here](https://azure.github.io/azure-sdk/dotnet_introduction.html#dotnet-mocking-factory-builder). +- Enabled the model factory feature for model mocking, more information can be found [here](https://azure.github.io/azure-sdk/dotnet_introduction.html#dotnet-mocking-factory-builder). ### Other Changes @@ -68,17 +78,21 @@ This release adds Container Security Context property for Containers with Confid - Added backward compatibility for the change of `DnsNameLabelReusePolicy` property replaced by `AutoGeneratedDnsNameLabelScope` in `ContainerGroupIPAddress`. ## 1.1.0-beta.1 (2023-01-26) + This release is a preview release for ContainerGroup Priority property and Confidential Containers. ### Features Added + - Added Priority property to ContainerGroup properties to support the public preview of Spot Containers on ACI. - Added ConfidentialComputeProperties.CcePolicy and Confidential ContainerGroupSku to support the public preview of Confidential containers on ACI with custom confidential computing enforcement policies. ### Breaking Changes + - Added Priority property to ContainerGroup properties - Added ConfidentialComputeProperties.CcePolicy and Confidential ContainerGroupSku ### Other Changes + - Updated ContainerGroupIPAddress to use AutoGeneratedDnsNameLabelScope in place of DnsNameLabelReusePolicy as DnsNameLabelReusePolicy is deprecated. ## 1.0.1 (2023-01-11) diff --git a/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/src/Azure.ResourceManager.ContainerInstance.csproj b/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/src/Azure.ResourceManager.ContainerInstance.csproj index 25802309ced3..7829a9f49743 100644 --- a/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/src/Azure.ResourceManager.ContainerInstance.csproj +++ b/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/src/Azure.ResourceManager.ContainerInstance.csproj @@ -1,6 +1,6 @@ - 1.3.0-beta.1 + 1.3.0-beta.2 1.2.1 Azure.ResourceManager.ContainerInstance diff --git a/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/src/autorest.md b/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/src/autorest.md index 72421de2da9c..21193a9e0236 100644 --- a/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/src/autorest.md +++ b/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/src/autorest.md @@ -7,7 +7,7 @@ azure-arm: true library-name: ContainerInstance namespace: Azure.ResourceManager.ContainerInstance require: https://github.com/Azure/azure-rest-api-specs/blob/10b3107f2eafcd428a208ec5858f3ca9261b1123/specification/containerinstance/resource-manager/readme.md -tag: package-preview-2024-05 +#tag: package-preview-2024-05 output-folder: $(this-folder)/Generated clear-output-folder: true sample-gen: diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/Azure.ResourceManager.ContainerOrchestratorRuntime.sln b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/Azure.ResourceManager.ContainerOrchestratorRuntime.sln new file mode 100644 index 000000000000..ab24f4d23558 --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/Azure.ResourceManager.ContainerOrchestratorRuntime.sln @@ -0,0 +1,65 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30309.148 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9F6E69E7-B27E-43EA-AC7D-D33ACA837984}") = "Azure.ResourceManager.ContainerOrchestratorRuntime", "src\Azure.ResourceManager.ContainerOrchestratorRuntime.csproj", "{0AA87EFC-F071-4EF8-AD4A-7BA7E2BF197B}" +EndProject +Project("{9F6E69E7-B27E-43EA-AC7D-D33ACA837984}") = "Azure.ResourceManager.ContainerOrchestratorRuntime.Tests", "tests\Azure.ResourceManager.ContainerOrchestratorRuntime.Tests.csproj", "{C0214FC2-88F7-400E-B1EA-DB294F675623}" +EndProject +Project("{9F6E69E7-B27E-43EA-AC7D-D33ACA837984}") = "Azure.ResourceManager.ContainerOrchestratorRuntime.Samples", "samples\Azure.ResourceManager.ContainerOrchestratorRuntime.Samples.csproj", "{ED2FB799-83E0-4781-A91E-064B30DC641B}" +EndProject +Global + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {60D44954-F0BF-41F4-AA5B-D89A885131B0} + EndGlobalSection + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|Any CPU = Release|Any CPU + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {0AA87EFC-F071-4EF8-AD4A-7BA7E2BF197B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0AA87EFC-F071-4EF8-AD4A-7BA7E2BF197B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0AA87EFC-F071-4EF8-AD4A-7BA7E2BF197B}.Debug|x64.ActiveCfg = Debug|Any CPU + {0AA87EFC-F071-4EF8-AD4A-7BA7E2BF197B}.Debug|x64.Build.0 = Debug|Any CPU + {0AA87EFC-F071-4EF8-AD4A-7BA7E2BF197B}.Debug|x86.ActiveCfg = Debug|Any CPU + {0AA87EFC-F071-4EF8-AD4A-7BA7E2BF197B}.Debug|x86.Build.0 = Debug|Any CPU + {0AA87EFC-F071-4EF8-AD4A-7BA7E2BF197B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0AA87EFC-F071-4EF8-AD4A-7BA7E2BF197B}.Release|Any CPU.Build.0 = Release|Any CPU + {0AA87EFC-F071-4EF8-AD4A-7BA7E2BF197B}.Release|x64.ActiveCfg = Release|Any CPU + {0AA87EFC-F071-4EF8-AD4A-7BA7E2BF197B}.Release|x64.Build.0 = Release|Any CPU + {0AA87EFC-F071-4EF8-AD4A-7BA7E2BF197B}.Release|x86.ActiveCfg = Release|Any CPU + {0AA87EFC-F071-4EF8-AD4A-7BA7E2BF197B}.Release|x86.Build.0 = Release|Any CPU + {C0214FC2-88F7-400E-B1EA-DB294F675623}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C0214FC2-88F7-400E-B1EA-DB294F675623}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C0214FC2-88F7-400E-B1EA-DB294F675623}.Debug|x64.ActiveCfg = Debug|Any CPU + {C0214FC2-88F7-400E-B1EA-DB294F675623}.Debug|x64.Build.0 = Debug|Any CPU + {C0214FC2-88F7-400E-B1EA-DB294F675623}.Debug|x86.ActiveCfg = Debug|Any CPU + {C0214FC2-88F7-400E-B1EA-DB294F675623}.Debug|x86.Build.0 = Debug|Any CPU + {C0214FC2-88F7-400E-B1EA-DB294F675623}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C0214FC2-88F7-400E-B1EA-DB294F675623}.Release|Any CPU.Build.0 = Release|Any CPU + {C0214FC2-88F7-400E-B1EA-DB294F675623}.Release|x64.ActiveCfg = Release|Any CPU + {C0214FC2-88F7-400E-B1EA-DB294F675623}.Release|x64.Build.0 = Release|Any CPU + {C0214FC2-88F7-400E-B1EA-DB294F675623}.Release|x86.ActiveCfg = Release|Any CPU + {C0214FC2-88F7-400E-B1EA-DB294F675623}.Release|x86.Build.0 = Release|Any CPU + {ED2FB799-83E0-4781-A91E-064B30DC641B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {ED2FB799-83E0-4781-A91E-064B30DC641B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {ED2FB799-83E0-4781-A91E-064B30DC641B}.Debug|x64.ActiveCfg = Debug|Any CPU + {ED2FB799-83E0-4781-A91E-064B30DC641B}.Debug|x64.Build.0 = Debug|Any CPU + {ED2FB799-83E0-4781-A91E-064B30DC641B}.Debug|x86.ActiveCfg = Debug|Any CPU + {ED2FB799-83E0-4781-A91E-064B30DC641B}.Debug|x86.Build.0 = Debug|Any CPU + {ED2FB799-83E0-4781-A91E-064B30DC641B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {ED2FB799-83E0-4781-A91E-064B30DC641B}.Release|Any CPU.Build.0 = Release|Any CPU + {ED2FB799-83E0-4781-A91E-064B30DC641B}.Release|x64.ActiveCfg = Release|Any CPU + {ED2FB799-83E0-4781-A91E-064B30DC641B}.Release|x64.Build.0 = Release|Any CPU + {ED2FB799-83E0-4781-A91E-064B30DC641B}.Release|x86.ActiveCfg = Release|Any CPU + {ED2FB799-83E0-4781-A91E-064B30DC641B}.Release|x86.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/CHANGELOG.md b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/CHANGELOG.md new file mode 100644 index 000000000000..b29b9e2b5d29 --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/CHANGELOG.md @@ -0,0 +1,27 @@ +# Release History + +## 1.0.0-beta.2 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + +## 1.0.0-beta.1 (2024-10-18) + +### Features Added + +This package follows the [new Azure SDK guidelines](https://azure.github.io/azure-sdk/general_introduction.html), and provides many core capabilities: + + - Support MSAL.NET, Azure.Identity is out of box for supporting MSAL.NET. + - Support [OpenTelemetry](https://opentelemetry.io/) for distributed tracing. + - HTTP pipeline with custom policies. + - Better error-handling. + - Support uniform telemetry across all languages. + +This package is a Public Preview version, so expect incompatible changes in subsequent releases as we improve the product. To provide feedback, submit an issue in our [Azure SDK for .NET GitHub repo](https://github.com/Azure/azure-sdk-for-net/issues). + +> NOTE: For more information about unified authentication, please refer to [Microsoft Azure Identity documentation for .NET](https://docs.microsoft.com//dotnet/api/overview/azure/identity-readme?view=azure-dotnet). diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/Directory.Build.props b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/Directory.Build.props new file mode 100644 index 000000000000..1a9611bd4924 --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/Directory.Build.props @@ -0,0 +1,6 @@ + + + + diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/README.md b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/README.md new file mode 100644 index 000000000000..fc43b515f672 --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/README.md @@ -0,0 +1,80 @@ +# Microsoft Azure Container Orchestrator Runtime management client library for .NET + +AKS on Azure Stack HCI 23H2 uses Azure Arc to create new Kubernetes clusters on Azure Stack HCI directly from Azure. It enables you to use familiar tools like the Azure portal, Azure CLI, and Azure Resource Manager templates to create and manage your Kubernetes clusters running on Azure Stack HCI. Since clusters are automatically connected to Arc when they are created, you can use your Microsoft Entra ID for connecting to your clusters from anywhere. This ensures your developers and application operators can provision and configure Kubernetes clusters in accordance with company policies. + +This library follows the [new Azure SDK guidelines](https://azure.github.io/azure-sdk/general_introduction.html), and provides many core capabilities: + + - Support MSAL.NET, Azure.Identity is out of box for supporting MSAL.NET. + - Support [OpenTelemetry](https://opentelemetry.io/) for distributed tracing. + - HTTP pipeline with custom policies. + - Better error-handling. + - Support uniform telemetry across all languages. + +## Getting started + +### Install the package + +Install the Microsoft Azure Container Orchestrator Runtime management library for .NET with [NuGet](https://www.nuget.org/): + +```dotnetcli +dotnet add package Azure.ResourceManager.ContainerOrchestratorRuntime --prerelease +``` + +### Prerequisites + +* You must have an [Microsoft Azure subscription](https://azure.microsoft.com/free/dotnet/). + +### Authenticate the Client + +To create an authenticated client and start interacting with Microsoft Azure resources, see the [quickstart guide here](https://github.com/Azure/azure-sdk-for-net/blob/main/doc/dev/mgmt_quickstart.md). + +## Key concepts + +Key concepts of the Microsoft Azure SDK for .NET can be found [here](https://azure.github.io/azure-sdk/dotnet_introduction.html) + +## Documentation + +Documentation is available to help you learn how to use this package: + +- [Quickstart](https://github.com/Azure/azure-sdk-for-net/blob/main/doc/dev/mgmt_quickstart.md). +- [API References](https://docs.microsoft.com/dotnet/api/?view=azure-dotnet). +- [Authentication](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/identity/Azure.Identity/README.md). + +## Examples + +Code samples for using the management library for .NET can be found in the following locations +- [.NET Management Library Code Samples](https://aka.ms/azuresdk-net-mgmt-samples) + +## Troubleshooting + +- File an issue via [GitHub Issues](https://github.com/Azure/azure-sdk-for-net/issues). +- Check [previous questions](https://stackoverflow.com/questions/tagged/azure+.net) or ask new ones on Stack Overflow using Azure and .NET tags. + +## Next steps + +For more information about Microsoft Azure SDK, see [this website](https://azure.github.io/azure-sdk/). + +## Contributing + +For details on contributing to this repository, see the [contributing +guide][cg]. + +This project welcomes contributions and suggestions. Most contributions +require you to agree to a Contributor License Agreement (CLA) declaring +that you have the right to, and actually do, grant us the rights to use +your contribution. For details, visit . + +When you submit a pull request, a CLA-bot will automatically determine +whether you need to provide a CLA and decorate the PR appropriately +(for example, label, comment). Follow the instructions provided by the +bot. You'll only need to do this action once across all repositories +using our CLA. + +This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For +more information, see the [Code of Conduct FAQ][coc_faq] or contact + with any other questions or comments. + + +[cg]: https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/resourcemanager/Azure.ResourceManager/docs/CONTRIBUTING.md +[coc]: https://opensource.microsoft.com/codeofconduct/ +[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/ \ No newline at end of file diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/api/Azure.ResourceManager.ContainerOrchestratorRuntime.netstandard2.0.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/api/Azure.ResourceManager.ContainerOrchestratorRuntime.netstandard2.0.cs new file mode 100644 index 000000000000..713b8e03fb47 --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/api/Azure.ResourceManager.ContainerOrchestratorRuntime.netstandard2.0.cs @@ -0,0 +1,608 @@ +namespace Azure.ResourceManager.ContainerOrchestratorRuntime +{ + public partial class ConnectedClusterBgpPeerCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected ConnectedClusterBgpPeerCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string bgpPeerName, Azure.ResourceManager.ContainerOrchestratorRuntime.ConnectedClusterBgpPeerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string bgpPeerName, Azure.ResourceManager.ContainerOrchestratorRuntime.ConnectedClusterBgpPeerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string bgpPeerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string bgpPeerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string bgpPeerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string bgpPeerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string bgpPeerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string bgpPeerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class ConnectedClusterBgpPeerData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ConnectedClusterBgpPeerData() { } + public Azure.ResourceManager.ContainerOrchestratorRuntime.Models.ConnectedClusterBgpPeerProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ContainerOrchestratorRuntime.ConnectedClusterBgpPeerData 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.ContainerOrchestratorRuntime.ConnectedClusterBgpPeerData 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 partial class ConnectedClusterBgpPeerResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected ConnectedClusterBgpPeerResource() { } + public virtual Azure.ResourceManager.ContainerOrchestratorRuntime.ConnectedClusterBgpPeerData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string resourceUri, string bgpPeerName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.ContainerOrchestratorRuntime.ConnectedClusterBgpPeerData 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.ContainerOrchestratorRuntime.ConnectedClusterBgpPeerData 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.ContainerOrchestratorRuntime.ConnectedClusterBgpPeerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ContainerOrchestratorRuntime.ConnectedClusterBgpPeerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class ConnectedClusterLoadBalancerCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected ConnectedClusterLoadBalancerCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string loadBalancerName, Azure.ResourceManager.ContainerOrchestratorRuntime.ConnectedClusterLoadBalancerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string loadBalancerName, Azure.ResourceManager.ContainerOrchestratorRuntime.ConnectedClusterLoadBalancerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string loadBalancerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string loadBalancerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string loadBalancerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string loadBalancerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string loadBalancerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string loadBalancerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class ConnectedClusterLoadBalancerData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ConnectedClusterLoadBalancerData() { } + public Azure.ResourceManager.ContainerOrchestratorRuntime.Models.ConnectedClusterLoadBalancerProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ContainerOrchestratorRuntime.ConnectedClusterLoadBalancerData 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.ContainerOrchestratorRuntime.ConnectedClusterLoadBalancerData 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 partial class ConnectedClusterLoadBalancerResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected ConnectedClusterLoadBalancerResource() { } + public virtual Azure.ResourceManager.ContainerOrchestratorRuntime.ConnectedClusterLoadBalancerData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string resourceUri, string loadBalancerName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.ContainerOrchestratorRuntime.ConnectedClusterLoadBalancerData 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.ContainerOrchestratorRuntime.ConnectedClusterLoadBalancerData 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.ContainerOrchestratorRuntime.ConnectedClusterLoadBalancerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ContainerOrchestratorRuntime.ConnectedClusterLoadBalancerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class ConnectedClusterServiceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected ConnectedClusterServiceCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string serviceName, Azure.ResourceManager.ContainerOrchestratorRuntime.ConnectedClusterServiceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string serviceName, Azure.ResourceManager.ContainerOrchestratorRuntime.ConnectedClusterServiceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string serviceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string serviceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string serviceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string serviceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string serviceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string serviceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class ConnectedClusterServiceData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ConnectedClusterServiceData() { } + public Azure.ResourceManager.ContainerOrchestratorRuntime.Models.ConnectedClusterServiceProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ContainerOrchestratorRuntime.ConnectedClusterServiceData 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.ContainerOrchestratorRuntime.ConnectedClusterServiceData 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 partial class ConnectedClusterServiceResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected ConnectedClusterServiceResource() { } + public virtual Azure.ResourceManager.ContainerOrchestratorRuntime.ConnectedClusterServiceData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string resourceUri, string serviceName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.ContainerOrchestratorRuntime.ConnectedClusterServiceData 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.ContainerOrchestratorRuntime.ConnectedClusterServiceData 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.ContainerOrchestratorRuntime.ConnectedClusterServiceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ContainerOrchestratorRuntime.ConnectedClusterServiceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class ConnectedClusterStorageClassCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected ConnectedClusterStorageClassCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string storageClassName, Azure.ResourceManager.ContainerOrchestratorRuntime.ConnectedClusterStorageClassData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string storageClassName, Azure.ResourceManager.ContainerOrchestratorRuntime.ConnectedClusterStorageClassData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string storageClassName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string storageClassName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string storageClassName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string storageClassName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string storageClassName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string storageClassName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class ConnectedClusterStorageClassData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ConnectedClusterStorageClassData() { } + public Azure.ResourceManager.ContainerOrchestratorRuntime.Models.ConnectedClusterStorageClassProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ContainerOrchestratorRuntime.ConnectedClusterStorageClassData 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.ContainerOrchestratorRuntime.ConnectedClusterStorageClassData 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 partial class ConnectedClusterStorageClassResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected ConnectedClusterStorageClassResource() { } + public virtual Azure.ResourceManager.ContainerOrchestratorRuntime.ConnectedClusterStorageClassData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string resourceUri, string storageClassName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.ContainerOrchestratorRuntime.ConnectedClusterStorageClassData 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.ContainerOrchestratorRuntime.ConnectedClusterStorageClassData 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.ContainerOrchestratorRuntime.Models.ConnectedClusterStorageClassPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ContainerOrchestratorRuntime.Models.ConnectedClusterStorageClassPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public static partial class ContainerOrchestratorRuntimeExtensions + { + public static Azure.Response GetConnectedClusterBgpPeer(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier scope, string bgpPeerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetConnectedClusterBgpPeerAsync(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier scope, string bgpPeerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.ContainerOrchestratorRuntime.ConnectedClusterBgpPeerResource GetConnectedClusterBgpPeerResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.ContainerOrchestratorRuntime.ConnectedClusterBgpPeerCollection GetConnectedClusterBgpPeers(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier scope) { throw null; } + public static Azure.Response GetConnectedClusterLoadBalancer(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier scope, string loadBalancerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetConnectedClusterLoadBalancerAsync(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier scope, string loadBalancerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.ContainerOrchestratorRuntime.ConnectedClusterLoadBalancerResource GetConnectedClusterLoadBalancerResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.ContainerOrchestratorRuntime.ConnectedClusterLoadBalancerCollection GetConnectedClusterLoadBalancers(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier scope) { throw null; } + public static Azure.Response GetConnectedClusterService(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier scope, string serviceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetConnectedClusterServiceAsync(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier scope, string serviceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.ContainerOrchestratorRuntime.ConnectedClusterServiceResource GetConnectedClusterServiceResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.ContainerOrchestratorRuntime.ConnectedClusterServiceCollection GetConnectedClusterServices(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier scope) { throw null; } + public static Azure.Response GetConnectedClusterStorageClass(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier scope, string storageClassName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetConnectedClusterStorageClassAsync(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier scope, string storageClassName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.ContainerOrchestratorRuntime.ConnectedClusterStorageClassCollection GetConnectedClusterStorageClasses(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier scope) { throw null; } + public static Azure.ResourceManager.ContainerOrchestratorRuntime.ConnectedClusterStorageClassResource GetConnectedClusterStorageClassResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + } +} +namespace Azure.ResourceManager.ContainerOrchestratorRuntime.Mocking +{ + public partial class MockableContainerOrchestratorRuntimeArmClient : Azure.ResourceManager.ArmResource + { + protected MockableContainerOrchestratorRuntimeArmClient() { } + public virtual Azure.Response GetConnectedClusterBgpPeer(Azure.Core.ResourceIdentifier scope, string bgpPeerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetConnectedClusterBgpPeerAsync(Azure.Core.ResourceIdentifier scope, string bgpPeerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ContainerOrchestratorRuntime.ConnectedClusterBgpPeerResource GetConnectedClusterBgpPeerResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.ContainerOrchestratorRuntime.ConnectedClusterBgpPeerCollection GetConnectedClusterBgpPeers(Azure.Core.ResourceIdentifier scope) { throw null; } + public virtual Azure.Response GetConnectedClusterLoadBalancer(Azure.Core.ResourceIdentifier scope, string loadBalancerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetConnectedClusterLoadBalancerAsync(Azure.Core.ResourceIdentifier scope, string loadBalancerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ContainerOrchestratorRuntime.ConnectedClusterLoadBalancerResource GetConnectedClusterLoadBalancerResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.ContainerOrchestratorRuntime.ConnectedClusterLoadBalancerCollection GetConnectedClusterLoadBalancers(Azure.Core.ResourceIdentifier scope) { throw null; } + public virtual Azure.Response GetConnectedClusterService(Azure.Core.ResourceIdentifier scope, string serviceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetConnectedClusterServiceAsync(Azure.Core.ResourceIdentifier scope, string serviceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ContainerOrchestratorRuntime.ConnectedClusterServiceResource GetConnectedClusterServiceResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.ContainerOrchestratorRuntime.ConnectedClusterServiceCollection GetConnectedClusterServices(Azure.Core.ResourceIdentifier scope) { throw null; } + public virtual Azure.Response GetConnectedClusterStorageClass(Azure.Core.ResourceIdentifier scope, string storageClassName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetConnectedClusterStorageClassAsync(Azure.Core.ResourceIdentifier scope, string storageClassName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ContainerOrchestratorRuntime.ConnectedClusterStorageClassCollection GetConnectedClusterStorageClasses(Azure.Core.ResourceIdentifier scope) { throw null; } + public virtual Azure.ResourceManager.ContainerOrchestratorRuntime.ConnectedClusterStorageClassResource GetConnectedClusterStorageClassResource(Azure.Core.ResourceIdentifier id) { throw null; } + } +} +namespace Azure.ResourceManager.ContainerOrchestratorRuntime.Models +{ + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AdvertiseMode : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AdvertiseMode(string value) { throw null; } + public static Azure.ResourceManager.ContainerOrchestratorRuntime.Models.AdvertiseMode Arp { get { throw null; } } + public static Azure.ResourceManager.ContainerOrchestratorRuntime.Models.AdvertiseMode Bgp { get { throw null; } } + public static Azure.ResourceManager.ContainerOrchestratorRuntime.Models.AdvertiseMode Both { get { throw null; } } + public bool Equals(Azure.ResourceManager.ContainerOrchestratorRuntime.Models.AdvertiseMode other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ContainerOrchestratorRuntime.Models.AdvertiseMode left, Azure.ResourceManager.ContainerOrchestratorRuntime.Models.AdvertiseMode right) { throw null; } + public static implicit operator Azure.ResourceManager.ContainerOrchestratorRuntime.Models.AdvertiseMode (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ContainerOrchestratorRuntime.Models.AdvertiseMode left, Azure.ResourceManager.ContainerOrchestratorRuntime.Models.AdvertiseMode right) { throw null; } + public override string ToString() { throw null; } + } + public static partial class ArmContainerOrchestratorRuntimeModelFactory + { + public static Azure.ResourceManager.ContainerOrchestratorRuntime.ConnectedClusterBgpPeerData ConnectedClusterBgpPeerData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.ContainerOrchestratorRuntime.Models.ConnectedClusterBgpPeerProperties properties = null) { throw null; } + public static Azure.ResourceManager.ContainerOrchestratorRuntime.Models.ConnectedClusterBgpPeerProperties ConnectedClusterBgpPeerProperties(int myAsn = 0, int peerAsn = 0, string peerAddress = null, Azure.ResourceManager.ContainerOrchestratorRuntime.Models.ContainerOrchestratorProvisioningState? provisioningState = default(Azure.ResourceManager.ContainerOrchestratorRuntime.Models.ContainerOrchestratorProvisioningState?)) { throw null; } + public static Azure.ResourceManager.ContainerOrchestratorRuntime.ConnectedClusterLoadBalancerData ConnectedClusterLoadBalancerData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.ContainerOrchestratorRuntime.Models.ConnectedClusterLoadBalancerProperties properties = null) { throw null; } + public static Azure.ResourceManager.ContainerOrchestratorRuntime.Models.ConnectedClusterLoadBalancerProperties ConnectedClusterLoadBalancerProperties(System.Collections.Generic.IEnumerable addresses = null, System.Collections.Generic.IDictionary serviceSelector = null, Azure.ResourceManager.ContainerOrchestratorRuntime.Models.AdvertiseMode advertiseMode = default(Azure.ResourceManager.ContainerOrchestratorRuntime.Models.AdvertiseMode), System.Collections.Generic.IEnumerable bgpPeers = null, Azure.ResourceManager.ContainerOrchestratorRuntime.Models.ContainerOrchestratorProvisioningState? provisioningState = default(Azure.ResourceManager.ContainerOrchestratorRuntime.Models.ContainerOrchestratorProvisioningState?)) { throw null; } + public static Azure.ResourceManager.ContainerOrchestratorRuntime.ConnectedClusterServiceData ConnectedClusterServiceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.ContainerOrchestratorRuntime.Models.ConnectedClusterServiceProperties properties = null) { throw null; } + public static Azure.ResourceManager.ContainerOrchestratorRuntime.Models.ConnectedClusterServiceProperties ConnectedClusterServiceProperties(System.Guid? rpObjectId = default(System.Guid?), Azure.ResourceManager.ContainerOrchestratorRuntime.Models.ContainerOrchestratorProvisioningState? provisioningState = default(Azure.ResourceManager.ContainerOrchestratorRuntime.Models.ContainerOrchestratorProvisioningState?)) { throw null; } + public static Azure.ResourceManager.ContainerOrchestratorRuntime.ConnectedClusterStorageClassData ConnectedClusterStorageClassData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.ContainerOrchestratorRuntime.Models.ConnectedClusterStorageClassProperties properties = null) { throw null; } + public static Azure.ResourceManager.ContainerOrchestratorRuntime.Models.ConnectedClusterStorageClassProperties ConnectedClusterStorageClassProperties(Azure.ResourceManager.ContainerOrchestratorRuntime.Models.VolumeExpansion? allowVolumeExpansion = default(Azure.ResourceManager.ContainerOrchestratorRuntime.Models.VolumeExpansion?), System.Collections.Generic.IEnumerable mountOptions = null, string provisioner = null, Azure.ResourceManager.ContainerOrchestratorRuntime.Models.VolumeBindingMode? volumeBindingMode = default(Azure.ResourceManager.ContainerOrchestratorRuntime.Models.VolumeBindingMode?), System.Collections.Generic.IEnumerable accessModes = null, Azure.ResourceManager.ContainerOrchestratorRuntime.Models.DataResilienceTier? dataResilience = default(Azure.ResourceManager.ContainerOrchestratorRuntime.Models.DataResilienceTier?), Azure.ResourceManager.ContainerOrchestratorRuntime.Models.FailoverTier? failoverSpeed = default(Azure.ResourceManager.ContainerOrchestratorRuntime.Models.FailoverTier?), System.Collections.Generic.IEnumerable limitations = null, Azure.ResourceManager.ContainerOrchestratorRuntime.Models.PerformanceTier? performance = default(Azure.ResourceManager.ContainerOrchestratorRuntime.Models.PerformanceTier?), long? priority = default(long?), Azure.ResourceManager.ContainerOrchestratorRuntime.Models.StorageClassTypeProperties typeProperties = null, Azure.ResourceManager.ContainerOrchestratorRuntime.Models.ContainerOrchestratorProvisioningState? provisioningState = default(Azure.ResourceManager.ContainerOrchestratorRuntime.Models.ContainerOrchestratorProvisioningState?)) { throw null; } + } + public partial class BlobStorageClassTypeProperties : Azure.ResourceManager.ContainerOrchestratorRuntime.Models.StorageClassTypeProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public BlobStorageClassTypeProperties(string azureStorageAccountName, string azureStorageAccountKey) { } + public string AzureStorageAccountKey { get { throw null; } set { } } + public string AzureStorageAccountName { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ContainerOrchestratorRuntime.Models.BlobStorageClassTypeProperties 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.ContainerOrchestratorRuntime.Models.BlobStorageClassTypeProperties 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 partial class ConnectedClusterBgpPeerProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ConnectedClusterBgpPeerProperties(int myAsn, int peerAsn, string peerAddress) { } + public int MyAsn { get { throw null; } set { } } + public string PeerAddress { get { throw null; } set { } } + public int PeerAsn { get { throw null; } set { } } + public Azure.ResourceManager.ContainerOrchestratorRuntime.Models.ContainerOrchestratorProvisioningState? ProvisioningState { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ContainerOrchestratorRuntime.Models.ConnectedClusterBgpPeerProperties 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.ContainerOrchestratorRuntime.Models.ConnectedClusterBgpPeerProperties 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 partial class ConnectedClusterLoadBalancerProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ConnectedClusterLoadBalancerProperties(System.Collections.Generic.IEnumerable addresses, Azure.ResourceManager.ContainerOrchestratorRuntime.Models.AdvertiseMode advertiseMode) { } + public System.Collections.Generic.IList Addresses { get { throw null; } } + public Azure.ResourceManager.ContainerOrchestratorRuntime.Models.AdvertiseMode AdvertiseMode { get { throw null; } set { } } + public System.Collections.Generic.IList BgpPeers { get { throw null; } } + public Azure.ResourceManager.ContainerOrchestratorRuntime.Models.ContainerOrchestratorProvisioningState? ProvisioningState { get { throw null; } } + public System.Collections.Generic.IDictionary ServiceSelector { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ContainerOrchestratorRuntime.Models.ConnectedClusterLoadBalancerProperties 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.ContainerOrchestratorRuntime.Models.ConnectedClusterLoadBalancerProperties 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 partial class ConnectedClusterServiceProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ConnectedClusterServiceProperties() { } + public Azure.ResourceManager.ContainerOrchestratorRuntime.Models.ContainerOrchestratorProvisioningState? ProvisioningState { get { throw null; } } + public System.Guid? RpObjectId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ContainerOrchestratorRuntime.Models.ConnectedClusterServiceProperties 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.ContainerOrchestratorRuntime.Models.ConnectedClusterServiceProperties 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 partial class ConnectedClusterStorageClassPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ConnectedClusterStorageClassPatch() { } + public Azure.ResourceManager.ContainerOrchestratorRuntime.Models.StorageClassPropertiesUpdate Properties { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ContainerOrchestratorRuntime.Models.ConnectedClusterStorageClassPatch 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.ContainerOrchestratorRuntime.Models.ConnectedClusterStorageClassPatch 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 partial class ConnectedClusterStorageClassProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ConnectedClusterStorageClassProperties(Azure.ResourceManager.ContainerOrchestratorRuntime.Models.StorageClassTypeProperties typeProperties) { } + public System.Collections.Generic.IList AccessModes { get { throw null; } } + public Azure.ResourceManager.ContainerOrchestratorRuntime.Models.VolumeExpansion? AllowVolumeExpansion { get { throw null; } set { } } + public Azure.ResourceManager.ContainerOrchestratorRuntime.Models.DataResilienceTier? DataResilience { get { throw null; } set { } } + public Azure.ResourceManager.ContainerOrchestratorRuntime.Models.FailoverTier? FailoverSpeed { get { throw null; } set { } } + public System.Collections.Generic.IList Limitations { get { throw null; } } + public System.Collections.Generic.IList MountOptions { get { throw null; } } + public Azure.ResourceManager.ContainerOrchestratorRuntime.Models.PerformanceTier? Performance { get { throw null; } set { } } + public long? Priority { get { throw null; } set { } } + public string Provisioner { get { throw null; } set { } } + public Azure.ResourceManager.ContainerOrchestratorRuntime.Models.ContainerOrchestratorProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.ContainerOrchestratorRuntime.Models.StorageClassTypeProperties TypeProperties { get { throw null; } set { } } + public Azure.ResourceManager.ContainerOrchestratorRuntime.Models.VolumeBindingMode? VolumeBindingMode { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ContainerOrchestratorRuntime.Models.ConnectedClusterStorageClassProperties 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.ContainerOrchestratorRuntime.Models.ConnectedClusterStorageClassProperties 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; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ContainerOrchestratorProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ContainerOrchestratorProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.ContainerOrchestratorRuntime.Models.ContainerOrchestratorProvisioningState Accepted { get { throw null; } } + public static Azure.ResourceManager.ContainerOrchestratorRuntime.Models.ContainerOrchestratorProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.ContainerOrchestratorRuntime.Models.ContainerOrchestratorProvisioningState Deleting { get { throw null; } } + public static Azure.ResourceManager.ContainerOrchestratorRuntime.Models.ContainerOrchestratorProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.ContainerOrchestratorRuntime.Models.ContainerOrchestratorProvisioningState Provisioning { get { throw null; } } + public static Azure.ResourceManager.ContainerOrchestratorRuntime.Models.ContainerOrchestratorProvisioningState Succeeded { get { throw null; } } + public static Azure.ResourceManager.ContainerOrchestratorRuntime.Models.ContainerOrchestratorProvisioningState Updating { get { throw null; } } + public bool Equals(Azure.ResourceManager.ContainerOrchestratorRuntime.Models.ContainerOrchestratorProvisioningState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ContainerOrchestratorRuntime.Models.ContainerOrchestratorProvisioningState left, Azure.ResourceManager.ContainerOrchestratorRuntime.Models.ContainerOrchestratorProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.ContainerOrchestratorRuntime.Models.ContainerOrchestratorProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ContainerOrchestratorRuntime.Models.ContainerOrchestratorProvisioningState left, Azure.ResourceManager.ContainerOrchestratorRuntime.Models.ContainerOrchestratorProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DataResilienceTier : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DataResilienceTier(string value) { throw null; } + public static Azure.ResourceManager.ContainerOrchestratorRuntime.Models.DataResilienceTier DataResilient { get { throw null; } } + public static Azure.ResourceManager.ContainerOrchestratorRuntime.Models.DataResilienceTier NotDataResilient { get { throw null; } } + public bool Equals(Azure.ResourceManager.ContainerOrchestratorRuntime.Models.DataResilienceTier other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ContainerOrchestratorRuntime.Models.DataResilienceTier left, Azure.ResourceManager.ContainerOrchestratorRuntime.Models.DataResilienceTier right) { throw null; } + public static implicit operator Azure.ResourceManager.ContainerOrchestratorRuntime.Models.DataResilienceTier (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ContainerOrchestratorRuntime.Models.DataResilienceTier left, Azure.ResourceManager.ContainerOrchestratorRuntime.Models.DataResilienceTier right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct FailoverTier : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public FailoverTier(string value) { throw null; } + public static Azure.ResourceManager.ContainerOrchestratorRuntime.Models.FailoverTier Fast { get { throw null; } } + public static Azure.ResourceManager.ContainerOrchestratorRuntime.Models.FailoverTier NotAvailable { get { throw null; } } + public static Azure.ResourceManager.ContainerOrchestratorRuntime.Models.FailoverTier Slow { get { throw null; } } + public static Azure.ResourceManager.ContainerOrchestratorRuntime.Models.FailoverTier Super { get { throw null; } } + public bool Equals(Azure.ResourceManager.ContainerOrchestratorRuntime.Models.FailoverTier other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ContainerOrchestratorRuntime.Models.FailoverTier left, Azure.ResourceManager.ContainerOrchestratorRuntime.Models.FailoverTier right) { throw null; } + public static implicit operator Azure.ResourceManager.ContainerOrchestratorRuntime.Models.FailoverTier (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ContainerOrchestratorRuntime.Models.FailoverTier left, Azure.ResourceManager.ContainerOrchestratorRuntime.Models.FailoverTier right) { throw null; } + public override string ToString() { throw null; } + } + public partial class NativeStorageClassTypeProperties : Azure.ResourceManager.ContainerOrchestratorRuntime.Models.StorageClassTypeProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public NativeStorageClassTypeProperties() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ContainerOrchestratorRuntime.Models.NativeStorageClassTypeProperties 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.ContainerOrchestratorRuntime.Models.NativeStorageClassTypeProperties 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; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct NfsDirectoryActionOnVolumeDeletion : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public NfsDirectoryActionOnVolumeDeletion(string value) { throw null; } + public static Azure.ResourceManager.ContainerOrchestratorRuntime.Models.NfsDirectoryActionOnVolumeDeletion Delete { get { throw null; } } + public static Azure.ResourceManager.ContainerOrchestratorRuntime.Models.NfsDirectoryActionOnVolumeDeletion Retain { get { throw null; } } + public bool Equals(Azure.ResourceManager.ContainerOrchestratorRuntime.Models.NfsDirectoryActionOnVolumeDeletion other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ContainerOrchestratorRuntime.Models.NfsDirectoryActionOnVolumeDeletion left, Azure.ResourceManager.ContainerOrchestratorRuntime.Models.NfsDirectoryActionOnVolumeDeletion right) { throw null; } + public static implicit operator Azure.ResourceManager.ContainerOrchestratorRuntime.Models.NfsDirectoryActionOnVolumeDeletion (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ContainerOrchestratorRuntime.Models.NfsDirectoryActionOnVolumeDeletion left, Azure.ResourceManager.ContainerOrchestratorRuntime.Models.NfsDirectoryActionOnVolumeDeletion right) { throw null; } + public override string ToString() { throw null; } + } + public partial class NfsStorageClassTypeProperties : Azure.ResourceManager.ContainerOrchestratorRuntime.Models.StorageClassTypeProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public NfsStorageClassTypeProperties(string server, string share) { } + public string MountPermissions { get { throw null; } set { } } + public Azure.ResourceManager.ContainerOrchestratorRuntime.Models.NfsDirectoryActionOnVolumeDeletion? OnDelete { get { throw null; } set { } } + public string Server { get { throw null; } set { } } + public string Share { get { throw null; } set { } } + public string SubDir { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ContainerOrchestratorRuntime.Models.NfsStorageClassTypeProperties 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.ContainerOrchestratorRuntime.Models.NfsStorageClassTypeProperties 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; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct PerformanceTier : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public PerformanceTier(string value) { throw null; } + public static Azure.ResourceManager.ContainerOrchestratorRuntime.Models.PerformanceTier Basic { get { throw null; } } + public static Azure.ResourceManager.ContainerOrchestratorRuntime.Models.PerformanceTier Premium { get { throw null; } } + public static Azure.ResourceManager.ContainerOrchestratorRuntime.Models.PerformanceTier Standard { get { throw null; } } + public static Azure.ResourceManager.ContainerOrchestratorRuntime.Models.PerformanceTier Ultra { get { throw null; } } + public static Azure.ResourceManager.ContainerOrchestratorRuntime.Models.PerformanceTier Undefined { get { throw null; } } + public bool Equals(Azure.ResourceManager.ContainerOrchestratorRuntime.Models.PerformanceTier other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ContainerOrchestratorRuntime.Models.PerformanceTier left, Azure.ResourceManager.ContainerOrchestratorRuntime.Models.PerformanceTier right) { throw null; } + public static implicit operator Azure.ResourceManager.ContainerOrchestratorRuntime.Models.PerformanceTier (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ContainerOrchestratorRuntime.Models.PerformanceTier left, Azure.ResourceManager.ContainerOrchestratorRuntime.Models.PerformanceTier right) { throw null; } + public override string ToString() { throw null; } + } + public partial class RwxStorageClassTypeProperties : Azure.ResourceManager.ContainerOrchestratorRuntime.Models.StorageClassTypeProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public RwxStorageClassTypeProperties(string backingStorageClassName) { } + public string BackingStorageClassName { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ContainerOrchestratorRuntime.Models.RwxStorageClassTypeProperties 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.ContainerOrchestratorRuntime.Models.RwxStorageClassTypeProperties 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 partial class SmbStorageClassTypeProperties : Azure.ResourceManager.ContainerOrchestratorRuntime.Models.StorageClassTypeProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SmbStorageClassTypeProperties(string source) { } + public string Domain { get { throw null; } set { } } + public string Password { get { throw null; } set { } } + public string Source { get { throw null; } set { } } + public string SubDir { get { throw null; } set { } } + public string Username { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ContainerOrchestratorRuntime.Models.SmbStorageClassTypeProperties 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.ContainerOrchestratorRuntime.Models.SmbStorageClassTypeProperties 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; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct StorageClassAccessMode : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public StorageClassAccessMode(string value) { throw null; } + public static Azure.ResourceManager.ContainerOrchestratorRuntime.Models.StorageClassAccessMode ReadWriteMany { get { throw null; } } + public static Azure.ResourceManager.ContainerOrchestratorRuntime.Models.StorageClassAccessMode ReadWriteOnce { get { throw null; } } + public bool Equals(Azure.ResourceManager.ContainerOrchestratorRuntime.Models.StorageClassAccessMode other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ContainerOrchestratorRuntime.Models.StorageClassAccessMode left, Azure.ResourceManager.ContainerOrchestratorRuntime.Models.StorageClassAccessMode right) { throw null; } + public static implicit operator Azure.ResourceManager.ContainerOrchestratorRuntime.Models.StorageClassAccessMode (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ContainerOrchestratorRuntime.Models.StorageClassAccessMode left, Azure.ResourceManager.ContainerOrchestratorRuntime.Models.StorageClassAccessMode right) { throw null; } + public override string ToString() { throw null; } + } + public partial class StorageClassPropertiesUpdate : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public StorageClassPropertiesUpdate() { } + public System.Collections.Generic.IList AccessModes { get { throw null; } } + public Azure.ResourceManager.ContainerOrchestratorRuntime.Models.VolumeExpansion? AllowVolumeExpansion { get { throw null; } set { } } + public Azure.ResourceManager.ContainerOrchestratorRuntime.Models.DataResilienceTier? DataResilience { get { throw null; } set { } } + public Azure.ResourceManager.ContainerOrchestratorRuntime.Models.FailoverTier? FailoverSpeed { get { throw null; } set { } } + public System.Collections.Generic.IList Limitations { get { throw null; } } + public System.Collections.Generic.IList MountOptions { get { throw null; } } + public Azure.ResourceManager.ContainerOrchestratorRuntime.Models.PerformanceTier? Performance { get { throw null; } set { } } + public long? Priority { get { throw null; } set { } } + public Azure.ResourceManager.ContainerOrchestratorRuntime.Models.StorageClassTypePropertiesUpdate TypeProperties { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ContainerOrchestratorRuntime.Models.StorageClassPropertiesUpdate 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.ContainerOrchestratorRuntime.Models.StorageClassPropertiesUpdate 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 abstract partial class StorageClassTypeProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected StorageClassTypeProperties() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ContainerOrchestratorRuntime.Models.StorageClassTypeProperties 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.ContainerOrchestratorRuntime.Models.StorageClassTypeProperties 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 partial class StorageClassTypePropertiesUpdate : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public StorageClassTypePropertiesUpdate() { } + public string AzureStorageAccountKey { get { throw null; } set { } } + public string AzureStorageAccountName { get { throw null; } set { } } + public string BackingStorageClassName { get { throw null; } set { } } + public string Domain { get { throw null; } set { } } + public string MountPermissions { get { throw null; } set { } } + public Azure.ResourceManager.ContainerOrchestratorRuntime.Models.NfsDirectoryActionOnVolumeDeletion? OnDelete { get { throw null; } set { } } + public string Password { get { throw null; } set { } } + public string Server { get { throw null; } set { } } + public string Share { get { throw null; } set { } } + public string Source { get { throw null; } set { } } + public string SubDir { get { throw null; } set { } } + public string Username { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ContainerOrchestratorRuntime.Models.StorageClassTypePropertiesUpdate 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.ContainerOrchestratorRuntime.Models.StorageClassTypePropertiesUpdate 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; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct VolumeBindingMode : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public VolumeBindingMode(string value) { throw null; } + public static Azure.ResourceManager.ContainerOrchestratorRuntime.Models.VolumeBindingMode Immediate { get { throw null; } } + public static Azure.ResourceManager.ContainerOrchestratorRuntime.Models.VolumeBindingMode WaitForFirstConsumer { get { throw null; } } + public bool Equals(Azure.ResourceManager.ContainerOrchestratorRuntime.Models.VolumeBindingMode other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ContainerOrchestratorRuntime.Models.VolumeBindingMode left, Azure.ResourceManager.ContainerOrchestratorRuntime.Models.VolumeBindingMode right) { throw null; } + public static implicit operator Azure.ResourceManager.ContainerOrchestratorRuntime.Models.VolumeBindingMode (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ContainerOrchestratorRuntime.Models.VolumeBindingMode left, Azure.ResourceManager.ContainerOrchestratorRuntime.Models.VolumeBindingMode right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct VolumeExpansion : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public VolumeExpansion(string value) { throw null; } + public static Azure.ResourceManager.ContainerOrchestratorRuntime.Models.VolumeExpansion Allow { get { throw null; } } + public static Azure.ResourceManager.ContainerOrchestratorRuntime.Models.VolumeExpansion Disallow { get { throw null; } } + public bool Equals(Azure.ResourceManager.ContainerOrchestratorRuntime.Models.VolumeExpansion other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ContainerOrchestratorRuntime.Models.VolumeExpansion left, Azure.ResourceManager.ContainerOrchestratorRuntime.Models.VolumeExpansion right) { throw null; } + public static implicit operator Azure.ResourceManager.ContainerOrchestratorRuntime.Models.VolumeExpansion (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ContainerOrchestratorRuntime.Models.VolumeExpansion left, Azure.ResourceManager.ContainerOrchestratorRuntime.Models.VolumeExpansion right) { throw null; } + public override string ToString() { throw null; } + } +} diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/assets.json b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/assets.json new file mode 100644 index 000000000000..39a2e0d2d096 --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/assets.json @@ -0,0 +1,6 @@ +{ + "AssetsRepo": "Azure/azure-sdk-assets", + "AssetsRepoPrefixPath": "net", + "TagPrefix": "net/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime", + "Tag": "net/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime_2b23157b56" +} diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/samples/Azure.ResourceManager.ContainerOrchestratorRuntime.Samples.csproj b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/samples/Azure.ResourceManager.ContainerOrchestratorRuntime.Samples.csproj new file mode 100644 index 000000000000..63ad3e13ada6 --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/samples/Azure.ResourceManager.ContainerOrchestratorRuntime.Samples.csproj @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/samples/Generated/Samples/Sample_ConnectedClusterBgpPeerCollection.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/samples/Generated/Samples/Sample_ConnectedClusterBgpPeerCollection.cs new file mode 100644 index 000000000000..536c0010da23 --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/samples/Generated/Samples/Sample_ConnectedClusterBgpPeerCollection.cs @@ -0,0 +1,189 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.ContainerOrchestratorRuntime.Models; + +namespace Azure.ResourceManager.ContainerOrchestratorRuntime.Samples +{ + public partial class Sample_ConnectedClusterBgpPeerCollection + { + // BgpPeers_Get + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_BgpPeersGet() + { + // Generated from example definition: 2024-03-01/BgpPeers_Get.json + // this example is just showing the usage of "BgpPeer_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ArmResource created on azure + // for more information of creating ArmResource, please refer to the document of ArmResource + + // get the collection of this ConnectedClusterBgpPeerResource + string resourceUri = "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/example/providers/Microsoft.Kubernetes/connectedClusters/cluster1"; + ResourceIdentifier scopeId = new ResourceIdentifier(string.Format("/{0}", resourceUri)); + ConnectedClusterBgpPeerCollection collection = client.GetConnectedClusterBgpPeers(scopeId); + + // invoke the operation + string bgpPeerName = "testpeer"; + ConnectedClusterBgpPeerResource result = await collection.GetAsync(bgpPeerName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ConnectedClusterBgpPeerData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // BgpPeers_Get + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_BgpPeersGet() + { + // Generated from example definition: 2024-03-01/BgpPeers_Get.json + // this example is just showing the usage of "BgpPeer_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ArmResource created on azure + // for more information of creating ArmResource, please refer to the document of ArmResource + + // get the collection of this ConnectedClusterBgpPeerResource + string resourceUri = "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/example/providers/Microsoft.Kubernetes/connectedClusters/cluster1"; + ResourceIdentifier scopeId = new ResourceIdentifier(string.Format("/{0}", resourceUri)); + ConnectedClusterBgpPeerCollection collection = client.GetConnectedClusterBgpPeers(scopeId); + + // invoke the operation + string bgpPeerName = "testpeer"; + bool result = await collection.ExistsAsync(bgpPeerName); + + Console.WriteLine($"Succeeded: {result}"); + } + + // BgpPeers_Get + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_BgpPeersGet() + { + // Generated from example definition: 2024-03-01/BgpPeers_Get.json + // this example is just showing the usage of "BgpPeer_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ArmResource created on azure + // for more information of creating ArmResource, please refer to the document of ArmResource + + // get the collection of this ConnectedClusterBgpPeerResource + string resourceUri = "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/example/providers/Microsoft.Kubernetes/connectedClusters/cluster1"; + ResourceIdentifier scopeId = new ResourceIdentifier(string.Format("/{0}", resourceUri)); + ConnectedClusterBgpPeerCollection collection = client.GetConnectedClusterBgpPeers(scopeId); + + // invoke the operation + string bgpPeerName = "testpeer"; + NullableResponse response = await collection.GetIfExistsAsync(bgpPeerName); + ConnectedClusterBgpPeerResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine($"Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ConnectedClusterBgpPeerData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + + // BgpPeers_CreateOrUpdate + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_BgpPeersCreateOrUpdate() + { + // Generated from example definition: 2024-03-01/BgpPeers_CreateOrUpdate.json + // this example is just showing the usage of "BgpPeer_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ArmResource created on azure + // for more information of creating ArmResource, please refer to the document of ArmResource + + // get the collection of this ConnectedClusterBgpPeerResource + string resourceUri = "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/example/providers/Microsoft.Kubernetes/connectedClusters/cluster1"; + ResourceIdentifier scopeId = new ResourceIdentifier(string.Format("/{0}", resourceUri)); + ConnectedClusterBgpPeerCollection collection = client.GetConnectedClusterBgpPeers(scopeId); + + // invoke the operation + string bgpPeerName = "testpeer"; + ConnectedClusterBgpPeerData data = new ConnectedClusterBgpPeerData() + { + Properties = new ConnectedClusterBgpPeerProperties(64500, 64501, "10.0.0.1"), + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, bgpPeerName, data); + ConnectedClusterBgpPeerResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ConnectedClusterBgpPeerData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // BgpPeers_List + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_BgpPeersList() + { + // Generated from example definition: 2024-03-01/BgpPeers_List.json + // this example is just showing the usage of "BgpPeer_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ArmResource created on azure + // for more information of creating ArmResource, please refer to the document of ArmResource + + // get the collection of this ConnectedClusterBgpPeerResource + string resourceUri = "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/example/providers/Microsoft.Kubernetes/connectedClusters/cluster1"; + ResourceIdentifier scopeId = new ResourceIdentifier(string.Format("/{0}", resourceUri)); + ConnectedClusterBgpPeerCollection collection = client.GetConnectedClusterBgpPeers(scopeId); + + // invoke the operation and iterate over the result + await foreach (ConnectedClusterBgpPeerResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ConnectedClusterBgpPeerData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + } +} diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/samples/Generated/Samples/Sample_ConnectedClusterBgpPeerResource.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/samples/Generated/Samples/Sample_ConnectedClusterBgpPeerResource.cs new file mode 100644 index 000000000000..86e2c9c53678 --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/samples/Generated/Samples/Sample_ConnectedClusterBgpPeerResource.cs @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.ContainerOrchestratorRuntime.Models; + +namespace Azure.ResourceManager.ContainerOrchestratorRuntime.Samples +{ + public partial class Sample_ConnectedClusterBgpPeerResource + { + // BgpPeers_Get + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_BgpPeersGet() + { + // Generated from example definition: 2024-03-01/BgpPeers_Get.json + // this example is just showing the usage of "BgpPeer_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ConnectedClusterBgpPeerResource created on azure + // for more information of creating ConnectedClusterBgpPeerResource, please refer to the document of ConnectedClusterBgpPeerResource + string resourceUri = "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/example/providers/Microsoft.Kubernetes/connectedClusters/cluster1"; + string bgpPeerName = "testpeer"; + ResourceIdentifier connectedClusterBgpPeerResourceId = ConnectedClusterBgpPeerResource.CreateResourceIdentifier(resourceUri, bgpPeerName); + ConnectedClusterBgpPeerResource connectedClusterBgpPeer = client.GetConnectedClusterBgpPeerResource(connectedClusterBgpPeerResourceId); + + // invoke the operation + ConnectedClusterBgpPeerResource result = await connectedClusterBgpPeer.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ConnectedClusterBgpPeerData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // BgpPeers_CreateOrUpdate + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_BgpPeersCreateOrUpdate() + { + // Generated from example definition: 2024-03-01/BgpPeers_CreateOrUpdate.json + // this example is just showing the usage of "BgpPeer_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ConnectedClusterBgpPeerResource created on azure + // for more information of creating ConnectedClusterBgpPeerResource, please refer to the document of ConnectedClusterBgpPeerResource + string resourceUri = "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/example/providers/Microsoft.Kubernetes/connectedClusters/cluster1"; + string bgpPeerName = "testpeer"; + ResourceIdentifier connectedClusterBgpPeerResourceId = ConnectedClusterBgpPeerResource.CreateResourceIdentifier(resourceUri, bgpPeerName); + ConnectedClusterBgpPeerResource connectedClusterBgpPeer = client.GetConnectedClusterBgpPeerResource(connectedClusterBgpPeerResourceId); + + // invoke the operation + ConnectedClusterBgpPeerData data = new ConnectedClusterBgpPeerData() + { + Properties = new ConnectedClusterBgpPeerProperties(64500, 64501, "10.0.0.1"), + }; + ArmOperation lro = await connectedClusterBgpPeer.UpdateAsync(WaitUntil.Completed, data); + ConnectedClusterBgpPeerResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ConnectedClusterBgpPeerData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // BgpPeers_Delete + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_BgpPeersDelete() + { + // Generated from example definition: 2024-03-01/BgpPeers_Delete.json + // this example is just showing the usage of "BgpPeer_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ConnectedClusterBgpPeerResource created on azure + // for more information of creating ConnectedClusterBgpPeerResource, please refer to the document of ConnectedClusterBgpPeerResource + string resourceUri = "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/example/providers/Microsoft.Kubernetes/connectedClusters/cluster1"; + string bgpPeerName = "testpeer"; + ResourceIdentifier connectedClusterBgpPeerResourceId = ConnectedClusterBgpPeerResource.CreateResourceIdentifier(resourceUri, bgpPeerName); + ConnectedClusterBgpPeerResource connectedClusterBgpPeer = client.GetConnectedClusterBgpPeerResource(connectedClusterBgpPeerResourceId); + + // invoke the operation + await connectedClusterBgpPeer.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine($"Succeeded"); + } + } +} diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/samples/Generated/Samples/Sample_ConnectedClusterLoadBalancerCollection.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/samples/Generated/Samples/Sample_ConnectedClusterLoadBalancerCollection.cs new file mode 100644 index 000000000000..aa0e857065d7 --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/samples/Generated/Samples/Sample_ConnectedClusterLoadBalancerCollection.cs @@ -0,0 +1,198 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.ContainerOrchestratorRuntime.Models; + +namespace Azure.ResourceManager.ContainerOrchestratorRuntime.Samples +{ + public partial class Sample_ConnectedClusterLoadBalancerCollection + { + // LoadBalancers_Get + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_LoadBalancersGet() + { + // Generated from example definition: 2024-03-01/LoadBalancers_Get.json + // this example is just showing the usage of "LoadBalancer_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ArmResource created on azure + // for more information of creating ArmResource, please refer to the document of ArmResource + + // get the collection of this ConnectedClusterLoadBalancerResource + string resourceUri = "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/example/providers/Microsoft.Kubernetes/connectedClusters/cluster1"; + ResourceIdentifier scopeId = new ResourceIdentifier(string.Format("/{0}", resourceUri)); + ConnectedClusterLoadBalancerCollection collection = client.GetConnectedClusterLoadBalancers(scopeId); + + // invoke the operation + string loadBalancerName = "testlb"; + ConnectedClusterLoadBalancerResource result = await collection.GetAsync(loadBalancerName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ConnectedClusterLoadBalancerData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // LoadBalancers_Get + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_LoadBalancersGet() + { + // Generated from example definition: 2024-03-01/LoadBalancers_Get.json + // this example is just showing the usage of "LoadBalancer_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ArmResource created on azure + // for more information of creating ArmResource, please refer to the document of ArmResource + + // get the collection of this ConnectedClusterLoadBalancerResource + string resourceUri = "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/example/providers/Microsoft.Kubernetes/connectedClusters/cluster1"; + ResourceIdentifier scopeId = new ResourceIdentifier(string.Format("/{0}", resourceUri)); + ConnectedClusterLoadBalancerCollection collection = client.GetConnectedClusterLoadBalancers(scopeId); + + // invoke the operation + string loadBalancerName = "testlb"; + bool result = await collection.ExistsAsync(loadBalancerName); + + Console.WriteLine($"Succeeded: {result}"); + } + + // LoadBalancers_Get + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_LoadBalancersGet() + { + // Generated from example definition: 2024-03-01/LoadBalancers_Get.json + // this example is just showing the usage of "LoadBalancer_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ArmResource created on azure + // for more information of creating ArmResource, please refer to the document of ArmResource + + // get the collection of this ConnectedClusterLoadBalancerResource + string resourceUri = "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/example/providers/Microsoft.Kubernetes/connectedClusters/cluster1"; + ResourceIdentifier scopeId = new ResourceIdentifier(string.Format("/{0}", resourceUri)); + ConnectedClusterLoadBalancerCollection collection = client.GetConnectedClusterLoadBalancers(scopeId); + + // invoke the operation + string loadBalancerName = "testlb"; + NullableResponse response = await collection.GetIfExistsAsync(loadBalancerName); + ConnectedClusterLoadBalancerResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine($"Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ConnectedClusterLoadBalancerData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + + // LoadBalancers_CreateOrUpdate + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_LoadBalancersCreateOrUpdate() + { + // Generated from example definition: 2024-03-01/LoadBalancers_CreateOrUpdate.json + // this example is just showing the usage of "LoadBalancer_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ArmResource created on azure + // for more information of creating ArmResource, please refer to the document of ArmResource + + // get the collection of this ConnectedClusterLoadBalancerResource + string resourceUri = "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/example/providers/Microsoft.Kubernetes/connectedClusters/cluster1"; + ResourceIdentifier scopeId = new ResourceIdentifier(string.Format("/{0}", resourceUri)); + ConnectedClusterLoadBalancerCollection collection = client.GetConnectedClusterLoadBalancers(scopeId); + + // invoke the operation + string loadBalancerName = "testlb"; + ConnectedClusterLoadBalancerData data = new ConnectedClusterLoadBalancerData() + { + Properties = new ConnectedClusterLoadBalancerProperties(new string[] + { +"192.168.50.1/24","192.168.51.2-192.168.51.10" + }, AdvertiseMode.Arp) + { + ServiceSelector = +{ +["app"] = "frontend", +}, + }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, loadBalancerName, data); + ConnectedClusterLoadBalancerResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ConnectedClusterLoadBalancerData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // LoadBalancers_List + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_LoadBalancersList() + { + // Generated from example definition: 2024-03-01/LoadBalancers_List.json + // this example is just showing the usage of "LoadBalancer_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ArmResource created on azure + // for more information of creating ArmResource, please refer to the document of ArmResource + + // get the collection of this ConnectedClusterLoadBalancerResource + string resourceUri = "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/example/providers/Microsoft.Kubernetes/connectedClusters/cluster1"; + ResourceIdentifier scopeId = new ResourceIdentifier(string.Format("/{0}", resourceUri)); + ConnectedClusterLoadBalancerCollection collection = client.GetConnectedClusterLoadBalancers(scopeId); + + // invoke the operation and iterate over the result + await foreach (ConnectedClusterLoadBalancerResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ConnectedClusterLoadBalancerData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + } +} diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/samples/Generated/Samples/Sample_ConnectedClusterLoadBalancerResource.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/samples/Generated/Samples/Sample_ConnectedClusterLoadBalancerResource.cs new file mode 100644 index 000000000000..5a5083af252e --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/samples/Generated/Samples/Sample_ConnectedClusterLoadBalancerResource.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.ContainerOrchestratorRuntime.Models; + +namespace Azure.ResourceManager.ContainerOrchestratorRuntime.Samples +{ + public partial class Sample_ConnectedClusterLoadBalancerResource + { + // LoadBalancers_Get + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_LoadBalancersGet() + { + // Generated from example definition: 2024-03-01/LoadBalancers_Get.json + // this example is just showing the usage of "LoadBalancer_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ConnectedClusterLoadBalancerResource created on azure + // for more information of creating ConnectedClusterLoadBalancerResource, please refer to the document of ConnectedClusterLoadBalancerResource + string resourceUri = "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/example/providers/Microsoft.Kubernetes/connectedClusters/cluster1"; + string loadBalancerName = "testlb"; + ResourceIdentifier connectedClusterLoadBalancerResourceId = ConnectedClusterLoadBalancerResource.CreateResourceIdentifier(resourceUri, loadBalancerName); + ConnectedClusterLoadBalancerResource connectedClusterLoadBalancer = client.GetConnectedClusterLoadBalancerResource(connectedClusterLoadBalancerResourceId); + + // invoke the operation + ConnectedClusterLoadBalancerResource result = await connectedClusterLoadBalancer.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ConnectedClusterLoadBalancerData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // LoadBalancers_CreateOrUpdate + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_LoadBalancersCreateOrUpdate() + { + // Generated from example definition: 2024-03-01/LoadBalancers_CreateOrUpdate.json + // this example is just showing the usage of "LoadBalancer_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ConnectedClusterLoadBalancerResource created on azure + // for more information of creating ConnectedClusterLoadBalancerResource, please refer to the document of ConnectedClusterLoadBalancerResource + string resourceUri = "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/example/providers/Microsoft.Kubernetes/connectedClusters/cluster1"; + string loadBalancerName = "testlb"; + ResourceIdentifier connectedClusterLoadBalancerResourceId = ConnectedClusterLoadBalancerResource.CreateResourceIdentifier(resourceUri, loadBalancerName); + ConnectedClusterLoadBalancerResource connectedClusterLoadBalancer = client.GetConnectedClusterLoadBalancerResource(connectedClusterLoadBalancerResourceId); + + // invoke the operation + ConnectedClusterLoadBalancerData data = new ConnectedClusterLoadBalancerData() + { + Properties = new ConnectedClusterLoadBalancerProperties(new string[] + { +"192.168.50.1/24","192.168.51.2-192.168.51.10" + }, AdvertiseMode.Arp) + { + ServiceSelector = +{ +["app"] = "frontend", +}, + }, + }; + ArmOperation lro = await connectedClusterLoadBalancer.UpdateAsync(WaitUntil.Completed, data); + ConnectedClusterLoadBalancerResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ConnectedClusterLoadBalancerData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // LoadBalancers_Delete + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_LoadBalancersDelete() + { + // Generated from example definition: 2024-03-01/LoadBalancers_Delete.json + // this example is just showing the usage of "LoadBalancer_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ConnectedClusterLoadBalancerResource created on azure + // for more information of creating ConnectedClusterLoadBalancerResource, please refer to the document of ConnectedClusterLoadBalancerResource + string resourceUri = "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/example/providers/Microsoft.Kubernetes/connectedClusters/cluster1"; + string loadBalancerName = "testlb"; + ResourceIdentifier connectedClusterLoadBalancerResourceId = ConnectedClusterLoadBalancerResource.CreateResourceIdentifier(resourceUri, loadBalancerName); + ConnectedClusterLoadBalancerResource connectedClusterLoadBalancer = client.GetConnectedClusterLoadBalancerResource(connectedClusterLoadBalancerResourceId); + + // invoke the operation + await connectedClusterLoadBalancer.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine($"Succeeded"); + } + } +} diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/samples/Generated/Samples/Sample_ConnectedClusterServiceCollection.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/samples/Generated/Samples/Sample_ConnectedClusterServiceCollection.cs new file mode 100644 index 000000000000..052a04a9a691 --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/samples/Generated/Samples/Sample_ConnectedClusterServiceCollection.cs @@ -0,0 +1,189 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.ContainerOrchestratorRuntime.Models; + +namespace Azure.ResourceManager.ContainerOrchestratorRuntime.Samples +{ + public partial class Sample_ConnectedClusterServiceCollection + { + // Services_Get + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_ServicesGet() + { + // Generated from example definition: 2024-03-01/Services_Get.json + // this example is just showing the usage of "ServiceResource_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ArmResource created on azure + // for more information of creating ArmResource, please refer to the document of ArmResource + + // get the collection of this ConnectedClusterServiceResource + string resourceUri = "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/example/providers/Microsoft.Kubernetes/connectedClusters/cluster1"; + ResourceIdentifier scopeId = new ResourceIdentifier(string.Format("/{0}", resourceUri)); + ConnectedClusterServiceCollection collection = client.GetConnectedClusterServices(scopeId); + + // invoke the operation + string serviceName = "storageclass"; + ConnectedClusterServiceResource result = await collection.GetAsync(serviceName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ConnectedClusterServiceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Services_Get + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_ServicesGet() + { + // Generated from example definition: 2024-03-01/Services_Get.json + // this example is just showing the usage of "ServiceResource_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ArmResource created on azure + // for more information of creating ArmResource, please refer to the document of ArmResource + + // get the collection of this ConnectedClusterServiceResource + string resourceUri = "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/example/providers/Microsoft.Kubernetes/connectedClusters/cluster1"; + ResourceIdentifier scopeId = new ResourceIdentifier(string.Format("/{0}", resourceUri)); + ConnectedClusterServiceCollection collection = client.GetConnectedClusterServices(scopeId); + + // invoke the operation + string serviceName = "storageclass"; + bool result = await collection.ExistsAsync(serviceName); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Services_Get + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_ServicesGet() + { + // Generated from example definition: 2024-03-01/Services_Get.json + // this example is just showing the usage of "ServiceResource_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ArmResource created on azure + // for more information of creating ArmResource, please refer to the document of ArmResource + + // get the collection of this ConnectedClusterServiceResource + string resourceUri = "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/example/providers/Microsoft.Kubernetes/connectedClusters/cluster1"; + ResourceIdentifier scopeId = new ResourceIdentifier(string.Format("/{0}", resourceUri)); + ConnectedClusterServiceCollection collection = client.GetConnectedClusterServices(scopeId); + + // invoke the operation + string serviceName = "storageclass"; + NullableResponse response = await collection.GetIfExistsAsync(serviceName); + ConnectedClusterServiceResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine($"Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ConnectedClusterServiceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + + // Services_CreateOrUpdate + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_ServicesCreateOrUpdate() + { + // Generated from example definition: 2024-03-01/Services_CreateOrUpdate.json + // this example is just showing the usage of "ServiceResource_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ArmResource created on azure + // for more information of creating ArmResource, please refer to the document of ArmResource + + // get the collection of this ConnectedClusterServiceResource + string resourceUri = "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/example/providers/Microsoft.Kubernetes/connectedClusters/cluster1"; + ResourceIdentifier scopeId = new ResourceIdentifier(string.Format("/{0}", resourceUri)); + ConnectedClusterServiceCollection collection = client.GetConnectedClusterServices(scopeId); + + // invoke the operation + string serviceName = "storageclass"; + ConnectedClusterServiceData data = new ConnectedClusterServiceData() + { + Properties = new ConnectedClusterServiceProperties(), + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, serviceName, data); + ConnectedClusterServiceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ConnectedClusterServiceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Services_List + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_ServicesList() + { + // Generated from example definition: 2024-03-01/Services_List.json + // this example is just showing the usage of "ServiceResource_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ArmResource created on azure + // for more information of creating ArmResource, please refer to the document of ArmResource + + // get the collection of this ConnectedClusterServiceResource + string resourceUri = "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/example/providers/Microsoft.Kubernetes/connectedClusters/cluster1"; + ResourceIdentifier scopeId = new ResourceIdentifier(string.Format("/{0}", resourceUri)); + ConnectedClusterServiceCollection collection = client.GetConnectedClusterServices(scopeId); + + // invoke the operation and iterate over the result + await foreach (ConnectedClusterServiceResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ConnectedClusterServiceData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + } +} diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/samples/Generated/Samples/Sample_ConnectedClusterServiceResource.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/samples/Generated/Samples/Sample_ConnectedClusterServiceResource.cs new file mode 100644 index 000000000000..78cbf04232d2 --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/samples/Generated/Samples/Sample_ConnectedClusterServiceResource.cs @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.ContainerOrchestratorRuntime.Models; + +namespace Azure.ResourceManager.ContainerOrchestratorRuntime.Samples +{ + public partial class Sample_ConnectedClusterServiceResource + { + // Services_Get + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_ServicesGet() + { + // Generated from example definition: 2024-03-01/Services_Get.json + // this example is just showing the usage of "ServiceResource_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ConnectedClusterServiceResource created on azure + // for more information of creating ConnectedClusterServiceResource, please refer to the document of ConnectedClusterServiceResource + string resourceUri = "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/example/providers/Microsoft.Kubernetes/connectedClusters/cluster1"; + string serviceName = "storageclass"; + ResourceIdentifier connectedClusterServiceResourceId = ConnectedClusterServiceResource.CreateResourceIdentifier(resourceUri, serviceName); + ConnectedClusterServiceResource connectedClusterService = client.GetConnectedClusterServiceResource(connectedClusterServiceResourceId); + + // invoke the operation + ConnectedClusterServiceResource result = await connectedClusterService.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ConnectedClusterServiceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Services_CreateOrUpdate + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_ServicesCreateOrUpdate() + { + // Generated from example definition: 2024-03-01/Services_CreateOrUpdate.json + // this example is just showing the usage of "ServiceResource_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ConnectedClusterServiceResource created on azure + // for more information of creating ConnectedClusterServiceResource, please refer to the document of ConnectedClusterServiceResource + string resourceUri = "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/example/providers/Microsoft.Kubernetes/connectedClusters/cluster1"; + string serviceName = "storageclass"; + ResourceIdentifier connectedClusterServiceResourceId = ConnectedClusterServiceResource.CreateResourceIdentifier(resourceUri, serviceName); + ConnectedClusterServiceResource connectedClusterService = client.GetConnectedClusterServiceResource(connectedClusterServiceResourceId); + + // invoke the operation + ConnectedClusterServiceData data = new ConnectedClusterServiceData() + { + Properties = new ConnectedClusterServiceProperties(), + }; + ArmOperation lro = await connectedClusterService.UpdateAsync(WaitUntil.Completed, data); + ConnectedClusterServiceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ConnectedClusterServiceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Services_Delete + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_ServicesDelete() + { + // Generated from example definition: 2024-03-01/Services_Delete.json + // this example is just showing the usage of "ServiceResource_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ConnectedClusterServiceResource created on azure + // for more information of creating ConnectedClusterServiceResource, please refer to the document of ConnectedClusterServiceResource + string resourceUri = "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/example/providers/Microsoft.Kubernetes/connectedClusters/cluster1"; + string serviceName = "storageclass"; + ResourceIdentifier connectedClusterServiceResourceId = ConnectedClusterServiceResource.CreateResourceIdentifier(resourceUri, serviceName); + ConnectedClusterServiceResource connectedClusterService = client.GetConnectedClusterServiceResource(connectedClusterServiceResourceId); + + // invoke the operation + await connectedClusterService.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine($"Succeeded"); + } + } +} diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/samples/Generated/Samples/Sample_ConnectedClusterStorageClassCollection.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/samples/Generated/Samples/Sample_ConnectedClusterStorageClassCollection.cs new file mode 100644 index 000000000000..b8d7fcc90ed2 --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/samples/Generated/Samples/Sample_ConnectedClusterStorageClassCollection.cs @@ -0,0 +1,189 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.ContainerOrchestratorRuntime.Models; + +namespace Azure.ResourceManager.ContainerOrchestratorRuntime.Samples +{ + public partial class Sample_ConnectedClusterStorageClassCollection + { + // StorageClass_Get_0 + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_StorageClassGet0() + { + // Generated from example definition: 2024-03-01/StorageClass_Get.json + // this example is just showing the usage of "StorageClassResource_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ArmResource created on azure + // for more information of creating ArmResource, please refer to the document of ArmResource + + // get the collection of this ConnectedClusterStorageClassResource + string resourceUri = "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/example/providers/Microsoft.Kubernetes/connectedClusters/cluster1"; + ResourceIdentifier scopeId = new ResourceIdentifier(string.Format("/{0}", resourceUri)); + ConnectedClusterStorageClassCollection collection = client.GetConnectedClusterStorageClasses(scopeId); + + // invoke the operation + string storageClassName = "testrwx"; + ConnectedClusterStorageClassResource result = await collection.GetAsync(storageClassName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ConnectedClusterStorageClassData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // StorageClass_Get_0 + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_StorageClassGet0() + { + // Generated from example definition: 2024-03-01/StorageClass_Get.json + // this example is just showing the usage of "StorageClassResource_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ArmResource created on azure + // for more information of creating ArmResource, please refer to the document of ArmResource + + // get the collection of this ConnectedClusterStorageClassResource + string resourceUri = "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/example/providers/Microsoft.Kubernetes/connectedClusters/cluster1"; + ResourceIdentifier scopeId = new ResourceIdentifier(string.Format("/{0}", resourceUri)); + ConnectedClusterStorageClassCollection collection = client.GetConnectedClusterStorageClasses(scopeId); + + // invoke the operation + string storageClassName = "testrwx"; + bool result = await collection.ExistsAsync(storageClassName); + + Console.WriteLine($"Succeeded: {result}"); + } + + // StorageClass_Get_0 + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_StorageClassGet0() + { + // Generated from example definition: 2024-03-01/StorageClass_Get.json + // this example is just showing the usage of "StorageClassResource_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ArmResource created on azure + // for more information of creating ArmResource, please refer to the document of ArmResource + + // get the collection of this ConnectedClusterStorageClassResource + string resourceUri = "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/example/providers/Microsoft.Kubernetes/connectedClusters/cluster1"; + ResourceIdentifier scopeId = new ResourceIdentifier(string.Format("/{0}", resourceUri)); + ConnectedClusterStorageClassCollection collection = client.GetConnectedClusterStorageClasses(scopeId); + + // invoke the operation + string storageClassName = "testrwx"; + NullableResponse response = await collection.GetIfExistsAsync(storageClassName); + ConnectedClusterStorageClassResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine($"Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ConnectedClusterStorageClassData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + + // StorageClass_CreateOrUpdate_0 + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_StorageClassCreateOrUpdate0() + { + // Generated from example definition: 2024-03-01/StorageClass_CreateOrUpdate.json + // this example is just showing the usage of "StorageClassResource_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ArmResource created on azure + // for more information of creating ArmResource, please refer to the document of ArmResource + + // get the collection of this ConnectedClusterStorageClassResource + string resourceUri = "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/example/providers/Microsoft.Kubernetes/connectedClusters/cluster1"; + ResourceIdentifier scopeId = new ResourceIdentifier(string.Format("/{0}", resourceUri)); + ConnectedClusterStorageClassCollection collection = client.GetConnectedClusterStorageClasses(scopeId); + + // invoke the operation + string storageClassName = "testrwx"; + ConnectedClusterStorageClassData data = new ConnectedClusterStorageClassData() + { + Properties = new ConnectedClusterStorageClassProperties(new RwxStorageClassTypeProperties("default")), + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, storageClassName, data); + ConnectedClusterStorageClassResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ConnectedClusterStorageClassData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // StorageClass_List_0 + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_StorageClassList0() + { + // Generated from example definition: 2024-03-01/StorageClass_List.json + // this example is just showing the usage of "StorageClassResource_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ArmResource created on azure + // for more information of creating ArmResource, please refer to the document of ArmResource + + // get the collection of this ConnectedClusterStorageClassResource + string resourceUri = "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/example/providers/Microsoft.Kubernetes/connectedClusters/cluster1"; + ResourceIdentifier scopeId = new ResourceIdentifier(string.Format("/{0}", resourceUri)); + ConnectedClusterStorageClassCollection collection = client.GetConnectedClusterStorageClasses(scopeId); + + // invoke the operation and iterate over the result + await foreach (ConnectedClusterStorageClassResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ConnectedClusterStorageClassData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + } +} diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/samples/Generated/Samples/Sample_ConnectedClusterStorageClassResource.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/samples/Generated/Samples/Sample_ConnectedClusterStorageClassResource.cs new file mode 100644 index 000000000000..b74dab2ace4d --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/samples/Generated/Samples/Sample_ConnectedClusterStorageClassResource.cs @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.ContainerOrchestratorRuntime.Models; + +namespace Azure.ResourceManager.ContainerOrchestratorRuntime.Samples +{ + public partial class Sample_ConnectedClusterStorageClassResource + { + // StorageClass_Get_0 + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_StorageClassGet0() + { + // Generated from example definition: 2024-03-01/StorageClass_Get.json + // this example is just showing the usage of "StorageClassResource_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ConnectedClusterStorageClassResource created on azure + // for more information of creating ConnectedClusterStorageClassResource, please refer to the document of ConnectedClusterStorageClassResource + string resourceUri = "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/example/providers/Microsoft.Kubernetes/connectedClusters/cluster1"; + string storageClassName = "testrwx"; + ResourceIdentifier connectedClusterStorageClassResourceId = ConnectedClusterStorageClassResource.CreateResourceIdentifier(resourceUri, storageClassName); + ConnectedClusterStorageClassResource connectedClusterStorageClass = client.GetConnectedClusterStorageClassResource(connectedClusterStorageClassResourceId); + + // invoke the operation + ConnectedClusterStorageClassResource result = await connectedClusterStorageClass.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ConnectedClusterStorageClassData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // StorageClass_Update_0 + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_StorageClassUpdate0() + { + // Generated from example definition: 2024-03-01/StorageClass_Update.json + // this example is just showing the usage of "StorageClassResource_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ConnectedClusterStorageClassResource created on azure + // for more information of creating ConnectedClusterStorageClassResource, please refer to the document of ConnectedClusterStorageClassResource + string resourceUri = "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/example/providers/Microsoft.Kubernetes/connectedClusters/cluster1"; + string storageClassName = "testrwx"; + ResourceIdentifier connectedClusterStorageClassResourceId = ConnectedClusterStorageClassResource.CreateResourceIdentifier(resourceUri, storageClassName); + ConnectedClusterStorageClassResource connectedClusterStorageClass = client.GetConnectedClusterStorageClassResource(connectedClusterStorageClassResourceId); + + // invoke the operation + ConnectedClusterStorageClassPatch patch = new ConnectedClusterStorageClassPatch() + { + Properties = new StorageClassPropertiesUpdate() + { + TypeProperties = new StorageClassTypePropertiesUpdate() + { + BackingStorageClassName = "default", + }, + }, + }; + ArmOperation lro = await connectedClusterStorageClass.UpdateAsync(WaitUntil.Completed, patch); + ConnectedClusterStorageClassResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ConnectedClusterStorageClassData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // StorageClass_Delete_0 + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_StorageClassDelete0() + { + // Generated from example definition: 2024-03-01/StorageClass_Delete.json + // this example is just showing the usage of "StorageClassResource_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ConnectedClusterStorageClassResource created on azure + // for more information of creating ConnectedClusterStorageClassResource, please refer to the document of ConnectedClusterStorageClassResource + string resourceUri = "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/example/providers/Microsoft.Kubernetes/connectedClusters/cluster1"; + string storageClassName = "testrwx"; + ResourceIdentifier connectedClusterStorageClassResourceId = ConnectedClusterStorageClassResource.CreateResourceIdentifier(resourceUri, storageClassName); + ConnectedClusterStorageClassResource connectedClusterStorageClass = client.GetConnectedClusterStorageClassResource(connectedClusterStorageClassResourceId); + + // invoke the operation + await connectedClusterStorageClass.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine($"Succeeded"); + } + } +} diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Azure.ResourceManager.ContainerOrchestratorRuntime.csproj b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Azure.ResourceManager.ContainerOrchestratorRuntime.csproj new file mode 100644 index 000000000000..b03356f08aa6 --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Azure.ResourceManager.ContainerOrchestratorRuntime.csproj @@ -0,0 +1,8 @@ + + + 1.0.0-beta.2 + Azure.ResourceManager.ContainerOrchestratorRuntime + Azure Resource Manager client SDK for Azure resource provider ContainerOrchestratorRuntime. + azure;management;arm;resource manager;containerorchestratorruntime + + diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ArmContainerOrchestratorRuntimeModelFactory.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ArmContainerOrchestratorRuntimeModelFactory.cs new file mode 100644 index 000000000000..f33ab58d1c2e --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ArmContainerOrchestratorRuntimeModelFactory.cs @@ -0,0 +1,173 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.ContainerOrchestratorRuntime.Models +{ + /// Model factory for models. + public static partial class ArmContainerOrchestratorRuntimeModelFactory + { + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// A new instance for mocking. + public static ConnectedClusterServiceData ConnectedClusterServiceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ConnectedClusterServiceProperties properties = null) + { + return new ConnectedClusterServiceData( + id, + name, + resourceType, + systemData, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The object id of the service principal of the RP provisioned in the tenant. + /// Resource provision state. + /// A new instance for mocking. + public static ConnectedClusterServiceProperties ConnectedClusterServiceProperties(Guid? rpObjectId = null, ContainerOrchestratorProvisioningState? provisioningState = null) + { + return new ConnectedClusterServiceProperties(rpObjectId, provisioningState, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// A new instance for mocking. + public static ConnectedClusterBgpPeerData ConnectedClusterBgpPeerData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ConnectedClusterBgpPeerProperties properties = null) + { + return new ConnectedClusterBgpPeerData( + id, + name, + resourceType, + systemData, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// My ASN. + /// Peer ASN. + /// Peer Address. + /// Resource provision state. + /// A new instance for mocking. + public static ConnectedClusterBgpPeerProperties ConnectedClusterBgpPeerProperties(int myAsn = default, int peerAsn = default, string peerAddress = null, ContainerOrchestratorProvisioningState? provisioningState = null) + { + return new ConnectedClusterBgpPeerProperties(myAsn, peerAsn, peerAddress, provisioningState, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// A new instance for mocking. + public static ConnectedClusterLoadBalancerData ConnectedClusterLoadBalancerData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ConnectedClusterLoadBalancerProperties properties = null) + { + return new ConnectedClusterLoadBalancerData( + id, + name, + resourceType, + systemData, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// IP Range. + /// A dynamic label mapping to select related services. For instance, if you want to create a load balancer only for services with label "a=b", then please specify {"a": "b"} in the field. + /// Advertise Mode. + /// The list of BGP peers it should advertise to. Null or empty means to advertise to all peers. + /// Resource provision state. + /// A new instance for mocking. + public static ConnectedClusterLoadBalancerProperties ConnectedClusterLoadBalancerProperties(IEnumerable addresses = null, IDictionary serviceSelector = null, AdvertiseMode advertiseMode = default, IEnumerable bgpPeers = null, ContainerOrchestratorProvisioningState? provisioningState = null) + { + addresses ??= new List(); + serviceSelector ??= new Dictionary(); + bgpPeers ??= new List(); + + return new ConnectedClusterLoadBalancerProperties( + addresses?.ToList(), + serviceSelector, + advertiseMode, + bgpPeers?.ToList(), + provisioningState, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// A new instance for mocking. + public static ConnectedClusterStorageClassData ConnectedClusterStorageClassData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ConnectedClusterStorageClassProperties properties = null) + { + return new ConnectedClusterStorageClassData( + id, + name, + resourceType, + systemData, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Volume can be expanded or not. + /// Additional mount options. + /// Provisioner name. + /// Binding mode of volumes: Immediate, WaitForFirstConsumer. + /// The access mode: [ReadWriteOnce, ReadWriteMany] or [ReadWriteOnce]. + /// Allow single data node failure. + /// Failover speed: NA, Slow, Fast. + /// Limitations of the storage class. + /// Performance tier. + /// Selection priority when multiple storage classes meet the criteria. 0: Highest, -1: Never use. + /// + /// Properties of the StorageClass + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , , , and . + /// + /// Resource provision state. + /// A new instance for mocking. + public static ConnectedClusterStorageClassProperties ConnectedClusterStorageClassProperties(VolumeExpansion? allowVolumeExpansion = null, IEnumerable mountOptions = null, string provisioner = null, VolumeBindingMode? volumeBindingMode = null, IEnumerable accessModes = null, DataResilienceTier? dataResilience = null, FailoverTier? failoverSpeed = null, IEnumerable limitations = null, PerformanceTier? performance = null, long? priority = null, StorageClassTypeProperties typeProperties = null, ContainerOrchestratorProvisioningState? provisioningState = null) + { + mountOptions ??= new List(); + accessModes ??= new List(); + limitations ??= new List(); + + return new ConnectedClusterStorageClassProperties( + allowVolumeExpansion, + mountOptions?.ToList(), + provisioner, + volumeBindingMode, + accessModes?.ToList(), + dataResilience, + failoverSpeed, + limitations?.ToList(), + performance, + priority, + typeProperties, + provisioningState, + serializedAdditionalRawData: null); + } + } +} diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterBgpPeerCollection.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterBgpPeerCollection.cs new file mode 100644 index 000000000000..0a32eb55c493 --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterBgpPeerCollection.cs @@ -0,0 +1,483 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.ContainerOrchestratorRuntime +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetConnectedClusterBgpPeers method from an instance of . + /// + public partial class ConnectedClusterBgpPeerCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _connectedClusterBgpPeerBgpPeersClientDiagnostics; + private readonly BgpPeersRestOperations _connectedClusterBgpPeerBgpPeersRestClient; + + /// Initializes a new instance of the class for mocking. + protected ConnectedClusterBgpPeerCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal ConnectedClusterBgpPeerCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _connectedClusterBgpPeerBgpPeersClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ContainerOrchestratorRuntime", ConnectedClusterBgpPeerResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ConnectedClusterBgpPeerResource.ResourceType, out string connectedClusterBgpPeerBgpPeersApiVersion); + _connectedClusterBgpPeerBgpPeersRestClient = new BgpPeersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, connectedClusterBgpPeerBgpPeersApiVersion); + } + + /// + /// Create a BgpPeer + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/bgpPeers/{bgpPeerName} + /// + /// + /// Operation Id + /// BgpPeer_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the BgpPeer. + /// Resource create parameters. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string bgpPeerName, ConnectedClusterBgpPeerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(bgpPeerName, nameof(bgpPeerName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _connectedClusterBgpPeerBgpPeersClientDiagnostics.CreateScope("ConnectedClusterBgpPeerCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _connectedClusterBgpPeerBgpPeersRestClient.CreateOrUpdateAsync(Id, bgpPeerName, data, cancellationToken).ConfigureAwait(false); + var operation = new ContainerOrchestratorRuntimeArmOperation(new ConnectedClusterBgpPeerOperationSource(Client), _connectedClusterBgpPeerBgpPeersClientDiagnostics, Pipeline, _connectedClusterBgpPeerBgpPeersRestClient.CreateCreateOrUpdateRequest(Id, bgpPeerName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create a BgpPeer + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/bgpPeers/{bgpPeerName} + /// + /// + /// Operation Id + /// BgpPeer_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the BgpPeer. + /// Resource create parameters. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string bgpPeerName, ConnectedClusterBgpPeerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(bgpPeerName, nameof(bgpPeerName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _connectedClusterBgpPeerBgpPeersClientDiagnostics.CreateScope("ConnectedClusterBgpPeerCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _connectedClusterBgpPeerBgpPeersRestClient.CreateOrUpdate(Id, bgpPeerName, data, cancellationToken); + var operation = new ContainerOrchestratorRuntimeArmOperation(new ConnectedClusterBgpPeerOperationSource(Client), _connectedClusterBgpPeerBgpPeersClientDiagnostics, Pipeline, _connectedClusterBgpPeerBgpPeersRestClient.CreateCreateOrUpdateRequest(Id, bgpPeerName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a BgpPeer + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/bgpPeers/{bgpPeerName} + /// + /// + /// Operation Id + /// BgpPeer_Get + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the BgpPeer. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string bgpPeerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(bgpPeerName, nameof(bgpPeerName)); + + using var scope = _connectedClusterBgpPeerBgpPeersClientDiagnostics.CreateScope("ConnectedClusterBgpPeerCollection.Get"); + scope.Start(); + try + { + var response = await _connectedClusterBgpPeerBgpPeersRestClient.GetAsync(Id, bgpPeerName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ConnectedClusterBgpPeerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a BgpPeer + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/bgpPeers/{bgpPeerName} + /// + /// + /// Operation Id + /// BgpPeer_Get + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the BgpPeer. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string bgpPeerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(bgpPeerName, nameof(bgpPeerName)); + + using var scope = _connectedClusterBgpPeerBgpPeersClientDiagnostics.CreateScope("ConnectedClusterBgpPeerCollection.Get"); + scope.Start(); + try + { + var response = _connectedClusterBgpPeerBgpPeersRestClient.Get(Id, bgpPeerName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ConnectedClusterBgpPeerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List BgpPeer resources by parent + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/bgpPeers + /// + /// + /// Operation Id + /// BgpPeer_List + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _connectedClusterBgpPeerBgpPeersRestClient.CreateListRequest(Id); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _connectedClusterBgpPeerBgpPeersRestClient.CreateListNextPageRequest(nextLink, Id); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ConnectedClusterBgpPeerResource(Client, ConnectedClusterBgpPeerData.DeserializeConnectedClusterBgpPeerData(e)), _connectedClusterBgpPeerBgpPeersClientDiagnostics, Pipeline, "ConnectedClusterBgpPeerCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List BgpPeer resources by parent + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/bgpPeers + /// + /// + /// Operation Id + /// BgpPeer_List + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _connectedClusterBgpPeerBgpPeersRestClient.CreateListRequest(Id); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _connectedClusterBgpPeerBgpPeersRestClient.CreateListNextPageRequest(nextLink, Id); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ConnectedClusterBgpPeerResource(Client, ConnectedClusterBgpPeerData.DeserializeConnectedClusterBgpPeerData(e)), _connectedClusterBgpPeerBgpPeersClientDiagnostics, Pipeline, "ConnectedClusterBgpPeerCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/bgpPeers/{bgpPeerName} + /// + /// + /// Operation Id + /// BgpPeer_Get + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the BgpPeer. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string bgpPeerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(bgpPeerName, nameof(bgpPeerName)); + + using var scope = _connectedClusterBgpPeerBgpPeersClientDiagnostics.CreateScope("ConnectedClusterBgpPeerCollection.Exists"); + scope.Start(); + try + { + var response = await _connectedClusterBgpPeerBgpPeersRestClient.GetAsync(Id, bgpPeerName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/bgpPeers/{bgpPeerName} + /// + /// + /// Operation Id + /// BgpPeer_Get + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the BgpPeer. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string bgpPeerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(bgpPeerName, nameof(bgpPeerName)); + + using var scope = _connectedClusterBgpPeerBgpPeersClientDiagnostics.CreateScope("ConnectedClusterBgpPeerCollection.Exists"); + scope.Start(); + try + { + var response = _connectedClusterBgpPeerBgpPeersRestClient.Get(Id, bgpPeerName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/bgpPeers/{bgpPeerName} + /// + /// + /// Operation Id + /// BgpPeer_Get + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the BgpPeer. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string bgpPeerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(bgpPeerName, nameof(bgpPeerName)); + + using var scope = _connectedClusterBgpPeerBgpPeersClientDiagnostics.CreateScope("ConnectedClusterBgpPeerCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _connectedClusterBgpPeerBgpPeersRestClient.GetAsync(Id, bgpPeerName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new ConnectedClusterBgpPeerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/bgpPeers/{bgpPeerName} + /// + /// + /// Operation Id + /// BgpPeer_Get + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the BgpPeer. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string bgpPeerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(bgpPeerName, nameof(bgpPeerName)); + + using var scope = _connectedClusterBgpPeerBgpPeersClientDiagnostics.CreateScope("ConnectedClusterBgpPeerCollection.GetIfExists"); + scope.Start(); + try + { + var response = _connectedClusterBgpPeerBgpPeersRestClient.Get(Id, bgpPeerName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new ConnectedClusterBgpPeerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterBgpPeerData.Serialization.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterBgpPeerData.Serialization.cs new file mode 100644 index 000000000000..31d9f261812b --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterBgpPeerData.Serialization.cs @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.ContainerOrchestratorRuntime.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.ContainerOrchestratorRuntime +{ + public partial class ConnectedClusterBgpPeerData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConnectedClusterBgpPeerData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + ConnectedClusterBgpPeerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConnectedClusterBgpPeerData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeConnectedClusterBgpPeerData(document.RootElement, options); + } + + internal static ConnectedClusterBgpPeerData DeserializeConnectedClusterBgpPeerData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ConnectedClusterBgpPeerProperties properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = ConnectedClusterBgpPeerProperties.DeserializeConnectedClusterBgpPeerProperties(property.Value, options); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ConnectedClusterBgpPeerData( + id, + name, + type, + systemData, + properties, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ConnectedClusterBgpPeerData)} does not support writing '{options.Format}' format."); + } + } + + ConnectedClusterBgpPeerData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeConnectedClusterBgpPeerData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ConnectedClusterBgpPeerData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeTargetResourceSettings.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterBgpPeerData.cs similarity index 60% rename from sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeTargetResourceSettings.cs rename to sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterBgpPeerData.cs index d0cbb1bbf41c..e8ec52c25c3a 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeTargetResourceSettings.cs +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterBgpPeerData.cs @@ -8,12 +8,16 @@ using System; using System.Collections.Generic; using Azure.Core; +using Azure.ResourceManager.ContainerOrchestratorRuntime.Models; using Azure.ResourceManager.Models; -namespace Azure.ResourceManager.HybridCompute.Models +namespace Azure.ResourceManager.ContainerOrchestratorRuntime { - /// The HybridComputeTargetResourceSettings. - public partial class HybridComputeTargetResourceSettings : ResourceData + /// + /// A class representing the ConnectedClusterBgpPeer data model. + /// A BgpPeer resource for an Arc connected cluster (Microsoft.Kubernetes/connectedClusters) + /// + public partial class ConnectedClusterBgpPeerData : ResourceData { /// /// Keeps track of any properties unknown to the library. @@ -47,31 +51,25 @@ public partial class HybridComputeTargetResourceSettings : ResourceData /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . - public HybridComputeTargetResourceSettings() + /// Initializes a new instance of . + public ConnectedClusterBgpPeerData() { } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. - /// Azure resource tenant Id. - /// Associated Gateway Resource Id. + /// The resource-specific properties for this resource. /// Keeps track of any properties unknown to the library. - internal HybridComputeTargetResourceSettings(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, Guid? tenantId, ResourceIdentifier gatewayResourceId, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal ConnectedClusterBgpPeerData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ConnectedClusterBgpPeerProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { - TenantId = tenantId; - GatewayResourceId = gatewayResourceId; + Properties = properties; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Azure resource tenant Id. - [WirePath("properties.tenantId")] - public Guid? TenantId { get; } - /// Associated Gateway Resource Id. - [WirePath("properties.gatewayResourceId")] - public ResourceIdentifier GatewayResourceId { get; set; } + /// The resource-specific properties for this resource. + public ConnectedClusterBgpPeerProperties Properties { get; set; } } } diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterBgpPeerResource.Serialization.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterBgpPeerResource.Serialization.cs new file mode 100644 index 000000000000..c9b1f1e68a34 --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterBgpPeerResource.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.ContainerOrchestratorRuntime +{ + public partial class ConnectedClusterBgpPeerResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + ConnectedClusterBgpPeerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + ConnectedClusterBgpPeerData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterBgpPeerResource.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterBgpPeerResource.cs new file mode 100644 index 000000000000..9d6a0c951bf2 --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterBgpPeerResource.cs @@ -0,0 +1,349 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.ContainerOrchestratorRuntime +{ + /// + /// A Class representing a ConnectedClusterBgpPeer along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetConnectedClusterBgpPeerResource method. + /// Otherwise you can get one from its parent resource using the GetConnectedClusterBgpPeer method. + /// + public partial class ConnectedClusterBgpPeerResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The resourceUri. + /// The bgpPeerName. + public static ResourceIdentifier CreateResourceIdentifier(string resourceUri, string bgpPeerName) + { + var resourceId = $"{resourceUri}/providers/Microsoft.KubernetesRuntime/bgpPeers/{bgpPeerName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _connectedClusterBgpPeerBgpPeersClientDiagnostics; + private readonly BgpPeersRestOperations _connectedClusterBgpPeerBgpPeersRestClient; + private readonly ConnectedClusterBgpPeerData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.KubernetesRuntime/bgpPeers"; + + /// Initializes a new instance of the class for mocking. + protected ConnectedClusterBgpPeerResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal ConnectedClusterBgpPeerResource(ArmClient client, ConnectedClusterBgpPeerData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal ConnectedClusterBgpPeerResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _connectedClusterBgpPeerBgpPeersClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ContainerOrchestratorRuntime", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string connectedClusterBgpPeerBgpPeersApiVersion); + _connectedClusterBgpPeerBgpPeersRestClient = new BgpPeersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, connectedClusterBgpPeerBgpPeersApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual ConnectedClusterBgpPeerData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Get a BgpPeer + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/bgpPeers/{bgpPeerName} + /// + /// + /// Operation Id + /// BgpPeer_Get + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _connectedClusterBgpPeerBgpPeersClientDiagnostics.CreateScope("ConnectedClusterBgpPeerResource.Get"); + scope.Start(); + try + { + var response = await _connectedClusterBgpPeerBgpPeersRestClient.GetAsync(Id.Parent, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ConnectedClusterBgpPeerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a BgpPeer + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/bgpPeers/{bgpPeerName} + /// + /// + /// Operation Id + /// BgpPeer_Get + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _connectedClusterBgpPeerBgpPeersClientDiagnostics.CreateScope("ConnectedClusterBgpPeerResource.Get"); + scope.Start(); + try + { + var response = _connectedClusterBgpPeerBgpPeersRestClient.Get(Id.Parent, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ConnectedClusterBgpPeerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a BgpPeer + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/bgpPeers/{bgpPeerName} + /// + /// + /// Operation Id + /// BgpPeer_Delete + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _connectedClusterBgpPeerBgpPeersClientDiagnostics.CreateScope("ConnectedClusterBgpPeerResource.Delete"); + scope.Start(); + try + { + var response = await _connectedClusterBgpPeerBgpPeersRestClient.DeleteAsync(Id.Parent, Id.Name, cancellationToken).ConfigureAwait(false); + var uri = _connectedClusterBgpPeerBgpPeersRestClient.CreateDeleteRequestUri(Id.Parent, Id.Name); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ContainerOrchestratorRuntimeArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a BgpPeer + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/bgpPeers/{bgpPeerName} + /// + /// + /// Operation Id + /// BgpPeer_Delete + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _connectedClusterBgpPeerBgpPeersClientDiagnostics.CreateScope("ConnectedClusterBgpPeerResource.Delete"); + scope.Start(); + try + { + var response = _connectedClusterBgpPeerBgpPeersRestClient.Delete(Id.Parent, Id.Name, cancellationToken); + var uri = _connectedClusterBgpPeerBgpPeersRestClient.CreateDeleteRequestUri(Id.Parent, Id.Name); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ContainerOrchestratorRuntimeArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create a BgpPeer + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/bgpPeers/{bgpPeerName} + /// + /// + /// Operation Id + /// BgpPeer_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Resource create parameters. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, ConnectedClusterBgpPeerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _connectedClusterBgpPeerBgpPeersClientDiagnostics.CreateScope("ConnectedClusterBgpPeerResource.Update"); + scope.Start(); + try + { + var response = await _connectedClusterBgpPeerBgpPeersRestClient.CreateOrUpdateAsync(Id.Parent, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new ContainerOrchestratorRuntimeArmOperation(new ConnectedClusterBgpPeerOperationSource(Client), _connectedClusterBgpPeerBgpPeersClientDiagnostics, Pipeline, _connectedClusterBgpPeerBgpPeersRestClient.CreateCreateOrUpdateRequest(Id.Parent, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create a BgpPeer + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/bgpPeers/{bgpPeerName} + /// + /// + /// Operation Id + /// BgpPeer_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Resource create parameters. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, ConnectedClusterBgpPeerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _connectedClusterBgpPeerBgpPeersClientDiagnostics.CreateScope("ConnectedClusterBgpPeerResource.Update"); + scope.Start(); + try + { + var response = _connectedClusterBgpPeerBgpPeersRestClient.CreateOrUpdate(Id.Parent, Id.Name, data, cancellationToken); + var operation = new ContainerOrchestratorRuntimeArmOperation(new ConnectedClusterBgpPeerOperationSource(Client), _connectedClusterBgpPeerBgpPeersClientDiagnostics, Pipeline, _connectedClusterBgpPeerBgpPeersRestClient.CreateCreateOrUpdateRequest(Id.Parent, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterLoadBalancerCollection.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterLoadBalancerCollection.cs new file mode 100644 index 000000000000..6ae3a2484b2a --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterLoadBalancerCollection.cs @@ -0,0 +1,483 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.ContainerOrchestratorRuntime +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetConnectedClusterLoadBalancers method from an instance of . + /// + public partial class ConnectedClusterLoadBalancerCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _connectedClusterLoadBalancerLoadBalancersClientDiagnostics; + private readonly LoadBalancersRestOperations _connectedClusterLoadBalancerLoadBalancersRestClient; + + /// Initializes a new instance of the class for mocking. + protected ConnectedClusterLoadBalancerCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal ConnectedClusterLoadBalancerCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _connectedClusterLoadBalancerLoadBalancersClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ContainerOrchestratorRuntime", ConnectedClusterLoadBalancerResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ConnectedClusterLoadBalancerResource.ResourceType, out string connectedClusterLoadBalancerLoadBalancersApiVersion); + _connectedClusterLoadBalancerLoadBalancersRestClient = new LoadBalancersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, connectedClusterLoadBalancerLoadBalancersApiVersion); + } + + /// + /// Create a LoadBalancer + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/loadBalancers/{loadBalancerName} + /// + /// + /// Operation Id + /// LoadBalancer_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the LoadBalancer. + /// Resource create parameters. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string loadBalancerName, ConnectedClusterLoadBalancerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(loadBalancerName, nameof(loadBalancerName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _connectedClusterLoadBalancerLoadBalancersClientDiagnostics.CreateScope("ConnectedClusterLoadBalancerCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _connectedClusterLoadBalancerLoadBalancersRestClient.CreateOrUpdateAsync(Id, loadBalancerName, data, cancellationToken).ConfigureAwait(false); + var operation = new ContainerOrchestratorRuntimeArmOperation(new ConnectedClusterLoadBalancerOperationSource(Client), _connectedClusterLoadBalancerLoadBalancersClientDiagnostics, Pipeline, _connectedClusterLoadBalancerLoadBalancersRestClient.CreateCreateOrUpdateRequest(Id, loadBalancerName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create a LoadBalancer + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/loadBalancers/{loadBalancerName} + /// + /// + /// Operation Id + /// LoadBalancer_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the LoadBalancer. + /// Resource create parameters. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string loadBalancerName, ConnectedClusterLoadBalancerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(loadBalancerName, nameof(loadBalancerName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _connectedClusterLoadBalancerLoadBalancersClientDiagnostics.CreateScope("ConnectedClusterLoadBalancerCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _connectedClusterLoadBalancerLoadBalancersRestClient.CreateOrUpdate(Id, loadBalancerName, data, cancellationToken); + var operation = new ContainerOrchestratorRuntimeArmOperation(new ConnectedClusterLoadBalancerOperationSource(Client), _connectedClusterLoadBalancerLoadBalancersClientDiagnostics, Pipeline, _connectedClusterLoadBalancerLoadBalancersRestClient.CreateCreateOrUpdateRequest(Id, loadBalancerName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a LoadBalancer + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/loadBalancers/{loadBalancerName} + /// + /// + /// Operation Id + /// LoadBalancer_Get + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the LoadBalancer. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string loadBalancerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(loadBalancerName, nameof(loadBalancerName)); + + using var scope = _connectedClusterLoadBalancerLoadBalancersClientDiagnostics.CreateScope("ConnectedClusterLoadBalancerCollection.Get"); + scope.Start(); + try + { + var response = await _connectedClusterLoadBalancerLoadBalancersRestClient.GetAsync(Id, loadBalancerName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ConnectedClusterLoadBalancerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a LoadBalancer + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/loadBalancers/{loadBalancerName} + /// + /// + /// Operation Id + /// LoadBalancer_Get + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the LoadBalancer. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string loadBalancerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(loadBalancerName, nameof(loadBalancerName)); + + using var scope = _connectedClusterLoadBalancerLoadBalancersClientDiagnostics.CreateScope("ConnectedClusterLoadBalancerCollection.Get"); + scope.Start(); + try + { + var response = _connectedClusterLoadBalancerLoadBalancersRestClient.Get(Id, loadBalancerName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ConnectedClusterLoadBalancerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List LoadBalancer resources by parent + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/loadBalancers + /// + /// + /// Operation Id + /// LoadBalancer_List + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _connectedClusterLoadBalancerLoadBalancersRestClient.CreateListRequest(Id); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _connectedClusterLoadBalancerLoadBalancersRestClient.CreateListNextPageRequest(nextLink, Id); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ConnectedClusterLoadBalancerResource(Client, ConnectedClusterLoadBalancerData.DeserializeConnectedClusterLoadBalancerData(e)), _connectedClusterLoadBalancerLoadBalancersClientDiagnostics, Pipeline, "ConnectedClusterLoadBalancerCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List LoadBalancer resources by parent + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/loadBalancers + /// + /// + /// Operation Id + /// LoadBalancer_List + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _connectedClusterLoadBalancerLoadBalancersRestClient.CreateListRequest(Id); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _connectedClusterLoadBalancerLoadBalancersRestClient.CreateListNextPageRequest(nextLink, Id); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ConnectedClusterLoadBalancerResource(Client, ConnectedClusterLoadBalancerData.DeserializeConnectedClusterLoadBalancerData(e)), _connectedClusterLoadBalancerLoadBalancersClientDiagnostics, Pipeline, "ConnectedClusterLoadBalancerCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/loadBalancers/{loadBalancerName} + /// + /// + /// Operation Id + /// LoadBalancer_Get + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the LoadBalancer. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string loadBalancerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(loadBalancerName, nameof(loadBalancerName)); + + using var scope = _connectedClusterLoadBalancerLoadBalancersClientDiagnostics.CreateScope("ConnectedClusterLoadBalancerCollection.Exists"); + scope.Start(); + try + { + var response = await _connectedClusterLoadBalancerLoadBalancersRestClient.GetAsync(Id, loadBalancerName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/loadBalancers/{loadBalancerName} + /// + /// + /// Operation Id + /// LoadBalancer_Get + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the LoadBalancer. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string loadBalancerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(loadBalancerName, nameof(loadBalancerName)); + + using var scope = _connectedClusterLoadBalancerLoadBalancersClientDiagnostics.CreateScope("ConnectedClusterLoadBalancerCollection.Exists"); + scope.Start(); + try + { + var response = _connectedClusterLoadBalancerLoadBalancersRestClient.Get(Id, loadBalancerName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/loadBalancers/{loadBalancerName} + /// + /// + /// Operation Id + /// LoadBalancer_Get + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the LoadBalancer. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string loadBalancerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(loadBalancerName, nameof(loadBalancerName)); + + using var scope = _connectedClusterLoadBalancerLoadBalancersClientDiagnostics.CreateScope("ConnectedClusterLoadBalancerCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _connectedClusterLoadBalancerLoadBalancersRestClient.GetAsync(Id, loadBalancerName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new ConnectedClusterLoadBalancerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/loadBalancers/{loadBalancerName} + /// + /// + /// Operation Id + /// LoadBalancer_Get + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the LoadBalancer. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string loadBalancerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(loadBalancerName, nameof(loadBalancerName)); + + using var scope = _connectedClusterLoadBalancerLoadBalancersClientDiagnostics.CreateScope("ConnectedClusterLoadBalancerCollection.GetIfExists"); + scope.Start(); + try + { + var response = _connectedClusterLoadBalancerLoadBalancersRestClient.Get(Id, loadBalancerName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new ConnectedClusterLoadBalancerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterLoadBalancerData.Serialization.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterLoadBalancerData.Serialization.cs new file mode 100644 index 000000000000..ee1281295541 --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterLoadBalancerData.Serialization.cs @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.ContainerOrchestratorRuntime.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.ContainerOrchestratorRuntime +{ + public partial class ConnectedClusterLoadBalancerData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConnectedClusterLoadBalancerData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + ConnectedClusterLoadBalancerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConnectedClusterLoadBalancerData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeConnectedClusterLoadBalancerData(document.RootElement, options); + } + + internal static ConnectedClusterLoadBalancerData DeserializeConnectedClusterLoadBalancerData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ConnectedClusterLoadBalancerProperties properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = ConnectedClusterLoadBalancerProperties.DeserializeConnectedClusterLoadBalancerProperties(property.Value, options); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ConnectedClusterLoadBalancerData( + id, + name, + type, + systemData, + properties, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ConnectedClusterLoadBalancerData)} does not support writing '{options.Format}' format."); + } + } + + ConnectedClusterLoadBalancerData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeConnectedClusterLoadBalancerData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ConnectedClusterLoadBalancerData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterLoadBalancerData.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterLoadBalancerData.cs new file mode 100644 index 000000000000..a60a5c3712ba --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterLoadBalancerData.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.ContainerOrchestratorRuntime.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.ContainerOrchestratorRuntime +{ + /// + /// A class representing the ConnectedClusterLoadBalancer data model. + /// A LoadBalancer resource for an Arc connected cluster (Microsoft.Kubernetes/connectedClusters) + /// + public partial class ConnectedClusterLoadBalancerData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ConnectedClusterLoadBalancerData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// Keeps track of any properties unknown to the library. + internal ConnectedClusterLoadBalancerData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ConnectedClusterLoadBalancerProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource-specific properties for this resource. + public ConnectedClusterLoadBalancerProperties Properties { get; set; } + } +} diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterLoadBalancerResource.Serialization.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterLoadBalancerResource.Serialization.cs new file mode 100644 index 000000000000..336ca9b2de4e --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterLoadBalancerResource.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.ContainerOrchestratorRuntime +{ + public partial class ConnectedClusterLoadBalancerResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + ConnectedClusterLoadBalancerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + ConnectedClusterLoadBalancerData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterLoadBalancerResource.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterLoadBalancerResource.cs new file mode 100644 index 000000000000..a177726af3d2 --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterLoadBalancerResource.cs @@ -0,0 +1,349 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.ContainerOrchestratorRuntime +{ + /// + /// A Class representing a ConnectedClusterLoadBalancer along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetConnectedClusterLoadBalancerResource method. + /// Otherwise you can get one from its parent resource using the GetConnectedClusterLoadBalancer method. + /// + public partial class ConnectedClusterLoadBalancerResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The resourceUri. + /// The loadBalancerName. + public static ResourceIdentifier CreateResourceIdentifier(string resourceUri, string loadBalancerName) + { + var resourceId = $"{resourceUri}/providers/Microsoft.KubernetesRuntime/loadBalancers/{loadBalancerName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _connectedClusterLoadBalancerLoadBalancersClientDiagnostics; + private readonly LoadBalancersRestOperations _connectedClusterLoadBalancerLoadBalancersRestClient; + private readonly ConnectedClusterLoadBalancerData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.KubernetesRuntime/loadBalancers"; + + /// Initializes a new instance of the class for mocking. + protected ConnectedClusterLoadBalancerResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal ConnectedClusterLoadBalancerResource(ArmClient client, ConnectedClusterLoadBalancerData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal ConnectedClusterLoadBalancerResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _connectedClusterLoadBalancerLoadBalancersClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ContainerOrchestratorRuntime", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string connectedClusterLoadBalancerLoadBalancersApiVersion); + _connectedClusterLoadBalancerLoadBalancersRestClient = new LoadBalancersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, connectedClusterLoadBalancerLoadBalancersApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual ConnectedClusterLoadBalancerData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Get a LoadBalancer + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/loadBalancers/{loadBalancerName} + /// + /// + /// Operation Id + /// LoadBalancer_Get + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _connectedClusterLoadBalancerLoadBalancersClientDiagnostics.CreateScope("ConnectedClusterLoadBalancerResource.Get"); + scope.Start(); + try + { + var response = await _connectedClusterLoadBalancerLoadBalancersRestClient.GetAsync(Id.Parent, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ConnectedClusterLoadBalancerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a LoadBalancer + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/loadBalancers/{loadBalancerName} + /// + /// + /// Operation Id + /// LoadBalancer_Get + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _connectedClusterLoadBalancerLoadBalancersClientDiagnostics.CreateScope("ConnectedClusterLoadBalancerResource.Get"); + scope.Start(); + try + { + var response = _connectedClusterLoadBalancerLoadBalancersRestClient.Get(Id.Parent, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ConnectedClusterLoadBalancerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a LoadBalancer + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/loadBalancers/{loadBalancerName} + /// + /// + /// Operation Id + /// LoadBalancer_Delete + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _connectedClusterLoadBalancerLoadBalancersClientDiagnostics.CreateScope("ConnectedClusterLoadBalancerResource.Delete"); + scope.Start(); + try + { + var response = await _connectedClusterLoadBalancerLoadBalancersRestClient.DeleteAsync(Id.Parent, Id.Name, cancellationToken).ConfigureAwait(false); + var uri = _connectedClusterLoadBalancerLoadBalancersRestClient.CreateDeleteRequestUri(Id.Parent, Id.Name); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ContainerOrchestratorRuntimeArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a LoadBalancer + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/loadBalancers/{loadBalancerName} + /// + /// + /// Operation Id + /// LoadBalancer_Delete + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _connectedClusterLoadBalancerLoadBalancersClientDiagnostics.CreateScope("ConnectedClusterLoadBalancerResource.Delete"); + scope.Start(); + try + { + var response = _connectedClusterLoadBalancerLoadBalancersRestClient.Delete(Id.Parent, Id.Name, cancellationToken); + var uri = _connectedClusterLoadBalancerLoadBalancersRestClient.CreateDeleteRequestUri(Id.Parent, Id.Name); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ContainerOrchestratorRuntimeArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create a LoadBalancer + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/loadBalancers/{loadBalancerName} + /// + /// + /// Operation Id + /// LoadBalancer_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Resource create parameters. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, ConnectedClusterLoadBalancerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _connectedClusterLoadBalancerLoadBalancersClientDiagnostics.CreateScope("ConnectedClusterLoadBalancerResource.Update"); + scope.Start(); + try + { + var response = await _connectedClusterLoadBalancerLoadBalancersRestClient.CreateOrUpdateAsync(Id.Parent, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new ContainerOrchestratorRuntimeArmOperation(new ConnectedClusterLoadBalancerOperationSource(Client), _connectedClusterLoadBalancerLoadBalancersClientDiagnostics, Pipeline, _connectedClusterLoadBalancerLoadBalancersRestClient.CreateCreateOrUpdateRequest(Id.Parent, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create a LoadBalancer + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/loadBalancers/{loadBalancerName} + /// + /// + /// Operation Id + /// LoadBalancer_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Resource create parameters. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, ConnectedClusterLoadBalancerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _connectedClusterLoadBalancerLoadBalancersClientDiagnostics.CreateScope("ConnectedClusterLoadBalancerResource.Update"); + scope.Start(); + try + { + var response = _connectedClusterLoadBalancerLoadBalancersRestClient.CreateOrUpdate(Id.Parent, Id.Name, data, cancellationToken); + var operation = new ContainerOrchestratorRuntimeArmOperation(new ConnectedClusterLoadBalancerOperationSource(Client), _connectedClusterLoadBalancerLoadBalancersClientDiagnostics, Pipeline, _connectedClusterLoadBalancerLoadBalancersRestClient.CreateCreateOrUpdateRequest(Id.Parent, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterServiceCollection.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterServiceCollection.cs new file mode 100644 index 000000000000..7d5544349133 --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterServiceCollection.cs @@ -0,0 +1,487 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.ContainerOrchestratorRuntime +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetConnectedClusterServices method from an instance of . + /// + public partial class ConnectedClusterServiceCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _connectedClusterServiceServicesClientDiagnostics; + private readonly ServicesRestOperations _connectedClusterServiceServicesRestClient; + + /// Initializes a new instance of the class for mocking. + protected ConnectedClusterServiceCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal ConnectedClusterServiceCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _connectedClusterServiceServicesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ContainerOrchestratorRuntime", ConnectedClusterServiceResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ConnectedClusterServiceResource.ResourceType, out string connectedClusterServiceServicesApiVersion); + _connectedClusterServiceServicesRestClient = new ServicesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, connectedClusterServiceServicesApiVersion); + } + + /// + /// Create a ServiceResource + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/services/{serviceName} + /// + /// + /// Operation Id + /// ServiceResource_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the the service. + /// Resource create parameters. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string serviceName, ConnectedClusterServiceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _connectedClusterServiceServicesClientDiagnostics.CreateScope("ConnectedClusterServiceCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _connectedClusterServiceServicesRestClient.CreateOrUpdateAsync(Id, serviceName, data, cancellationToken).ConfigureAwait(false); + var uri = _connectedClusterServiceServicesRestClient.CreateCreateOrUpdateRequestUri(Id, serviceName, data); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ContainerOrchestratorRuntimeArmOperation(Response.FromValue(new ConnectedClusterServiceResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create a ServiceResource + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/services/{serviceName} + /// + /// + /// Operation Id + /// ServiceResource_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the the service. + /// Resource create parameters. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string serviceName, ConnectedClusterServiceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _connectedClusterServiceServicesClientDiagnostics.CreateScope("ConnectedClusterServiceCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _connectedClusterServiceServicesRestClient.CreateOrUpdate(Id, serviceName, data, cancellationToken); + var uri = _connectedClusterServiceServicesRestClient.CreateCreateOrUpdateRequestUri(Id, serviceName, data); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ContainerOrchestratorRuntimeArmOperation(Response.FromValue(new ConnectedClusterServiceResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a ServiceResource + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/services/{serviceName} + /// + /// + /// Operation Id + /// ServiceResource_Get + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the the service. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string serviceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + + using var scope = _connectedClusterServiceServicesClientDiagnostics.CreateScope("ConnectedClusterServiceCollection.Get"); + scope.Start(); + try + { + var response = await _connectedClusterServiceServicesRestClient.GetAsync(Id, serviceName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ConnectedClusterServiceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a ServiceResource + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/services/{serviceName} + /// + /// + /// Operation Id + /// ServiceResource_Get + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the the service. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string serviceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + + using var scope = _connectedClusterServiceServicesClientDiagnostics.CreateScope("ConnectedClusterServiceCollection.Get"); + scope.Start(); + try + { + var response = _connectedClusterServiceServicesRestClient.Get(Id, serviceName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ConnectedClusterServiceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List ServiceResource resources by parent + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/services + /// + /// + /// Operation Id + /// ServiceResource_List + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _connectedClusterServiceServicesRestClient.CreateListRequest(Id); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _connectedClusterServiceServicesRestClient.CreateListNextPageRequest(nextLink, Id); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ConnectedClusterServiceResource(Client, ConnectedClusterServiceData.DeserializeConnectedClusterServiceData(e)), _connectedClusterServiceServicesClientDiagnostics, Pipeline, "ConnectedClusterServiceCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List ServiceResource resources by parent + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/services + /// + /// + /// Operation Id + /// ServiceResource_List + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _connectedClusterServiceServicesRestClient.CreateListRequest(Id); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _connectedClusterServiceServicesRestClient.CreateListNextPageRequest(nextLink, Id); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ConnectedClusterServiceResource(Client, ConnectedClusterServiceData.DeserializeConnectedClusterServiceData(e)), _connectedClusterServiceServicesClientDiagnostics, Pipeline, "ConnectedClusterServiceCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/services/{serviceName} + /// + /// + /// Operation Id + /// ServiceResource_Get + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the the service. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string serviceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + + using var scope = _connectedClusterServiceServicesClientDiagnostics.CreateScope("ConnectedClusterServiceCollection.Exists"); + scope.Start(); + try + { + var response = await _connectedClusterServiceServicesRestClient.GetAsync(Id, serviceName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/services/{serviceName} + /// + /// + /// Operation Id + /// ServiceResource_Get + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the the service. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string serviceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + + using var scope = _connectedClusterServiceServicesClientDiagnostics.CreateScope("ConnectedClusterServiceCollection.Exists"); + scope.Start(); + try + { + var response = _connectedClusterServiceServicesRestClient.Get(Id, serviceName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/services/{serviceName} + /// + /// + /// Operation Id + /// ServiceResource_Get + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the the service. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string serviceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + + using var scope = _connectedClusterServiceServicesClientDiagnostics.CreateScope("ConnectedClusterServiceCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _connectedClusterServiceServicesRestClient.GetAsync(Id, serviceName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new ConnectedClusterServiceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/services/{serviceName} + /// + /// + /// Operation Id + /// ServiceResource_Get + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the the service. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string serviceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + + using var scope = _connectedClusterServiceServicesClientDiagnostics.CreateScope("ConnectedClusterServiceCollection.GetIfExists"); + scope.Start(); + try + { + var response = _connectedClusterServiceServicesRestClient.Get(Id, serviceName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new ConnectedClusterServiceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterServiceData.Serialization.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterServiceData.Serialization.cs new file mode 100644 index 000000000000..a057f3831122 --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterServiceData.Serialization.cs @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.ContainerOrchestratorRuntime.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.ContainerOrchestratorRuntime +{ + public partial class ConnectedClusterServiceData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConnectedClusterServiceData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + ConnectedClusterServiceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConnectedClusterServiceData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeConnectedClusterServiceData(document.RootElement, options); + } + + internal static ConnectedClusterServiceData DeserializeConnectedClusterServiceData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ConnectedClusterServiceProperties properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = ConnectedClusterServiceProperties.DeserializeConnectedClusterServiceProperties(property.Value, options); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ConnectedClusterServiceData( + id, + name, + type, + systemData, + properties, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ConnectedClusterServiceData)} does not support writing '{options.Format}' format."); + } + } + + ConnectedClusterServiceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeConnectedClusterServiceData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ConnectedClusterServiceData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterServiceData.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterServiceData.cs new file mode 100644 index 000000000000..cc86f87ed5d5 --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterServiceData.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.ContainerOrchestratorRuntime.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.ContainerOrchestratorRuntime +{ + /// + /// A class representing the ConnectedClusterService data model. + /// A Service resource for an Arc connected cluster (Microsoft.Kubernetes/connectedClusters) + /// + public partial class ConnectedClusterServiceData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ConnectedClusterServiceData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// Keeps track of any properties unknown to the library. + internal ConnectedClusterServiceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ConnectedClusterServiceProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource-specific properties for this resource. + public ConnectedClusterServiceProperties Properties { get; set; } + } +} diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterServiceResource.Serialization.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterServiceResource.Serialization.cs new file mode 100644 index 000000000000..9d6e34cb7fd6 --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterServiceResource.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.ContainerOrchestratorRuntime +{ + public partial class ConnectedClusterServiceResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + ConnectedClusterServiceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + ConnectedClusterServiceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterServiceResource.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterServiceResource.cs new file mode 100644 index 000000000000..dc7430d95219 --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterServiceResource.cs @@ -0,0 +1,353 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.ContainerOrchestratorRuntime +{ + /// + /// A Class representing a ConnectedClusterService along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetConnectedClusterServiceResource method. + /// Otherwise you can get one from its parent resource using the GetConnectedClusterService method. + /// + public partial class ConnectedClusterServiceResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The resourceUri. + /// The serviceName. + public static ResourceIdentifier CreateResourceIdentifier(string resourceUri, string serviceName) + { + var resourceId = $"{resourceUri}/providers/Microsoft.KubernetesRuntime/services/{serviceName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _connectedClusterServiceServicesClientDiagnostics; + private readonly ServicesRestOperations _connectedClusterServiceServicesRestClient; + private readonly ConnectedClusterServiceData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.KubernetesRuntime/services"; + + /// Initializes a new instance of the class for mocking. + protected ConnectedClusterServiceResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal ConnectedClusterServiceResource(ArmClient client, ConnectedClusterServiceData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal ConnectedClusterServiceResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _connectedClusterServiceServicesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ContainerOrchestratorRuntime", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string connectedClusterServiceServicesApiVersion); + _connectedClusterServiceServicesRestClient = new ServicesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, connectedClusterServiceServicesApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual ConnectedClusterServiceData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Get a ServiceResource + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/services/{serviceName} + /// + /// + /// Operation Id + /// ServiceResource_Get + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _connectedClusterServiceServicesClientDiagnostics.CreateScope("ConnectedClusterServiceResource.Get"); + scope.Start(); + try + { + var response = await _connectedClusterServiceServicesRestClient.GetAsync(Id.Parent, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ConnectedClusterServiceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a ServiceResource + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/services/{serviceName} + /// + /// + /// Operation Id + /// ServiceResource_Get + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _connectedClusterServiceServicesClientDiagnostics.CreateScope("ConnectedClusterServiceResource.Get"); + scope.Start(); + try + { + var response = _connectedClusterServiceServicesRestClient.Get(Id.Parent, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ConnectedClusterServiceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a ServiceResource + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/services/{serviceName} + /// + /// + /// Operation Id + /// ServiceResource_Delete + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _connectedClusterServiceServicesClientDiagnostics.CreateScope("ConnectedClusterServiceResource.Delete"); + scope.Start(); + try + { + var response = await _connectedClusterServiceServicesRestClient.DeleteAsync(Id.Parent, Id.Name, cancellationToken).ConfigureAwait(false); + var uri = _connectedClusterServiceServicesRestClient.CreateDeleteRequestUri(Id.Parent, Id.Name); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ContainerOrchestratorRuntimeArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a ServiceResource + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/services/{serviceName} + /// + /// + /// Operation Id + /// ServiceResource_Delete + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _connectedClusterServiceServicesClientDiagnostics.CreateScope("ConnectedClusterServiceResource.Delete"); + scope.Start(); + try + { + var response = _connectedClusterServiceServicesRestClient.Delete(Id.Parent, Id.Name, cancellationToken); + var uri = _connectedClusterServiceServicesRestClient.CreateDeleteRequestUri(Id.Parent, Id.Name); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ContainerOrchestratorRuntimeArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create a ServiceResource + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/services/{serviceName} + /// + /// + /// Operation Id + /// ServiceResource_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Resource create parameters. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, ConnectedClusterServiceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _connectedClusterServiceServicesClientDiagnostics.CreateScope("ConnectedClusterServiceResource.Update"); + scope.Start(); + try + { + var response = await _connectedClusterServiceServicesRestClient.CreateOrUpdateAsync(Id.Parent, Id.Name, data, cancellationToken).ConfigureAwait(false); + var uri = _connectedClusterServiceServicesRestClient.CreateCreateOrUpdateRequestUri(Id.Parent, Id.Name, data); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ContainerOrchestratorRuntimeArmOperation(Response.FromValue(new ConnectedClusterServiceResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create a ServiceResource + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/services/{serviceName} + /// + /// + /// Operation Id + /// ServiceResource_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Resource create parameters. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, ConnectedClusterServiceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _connectedClusterServiceServicesClientDiagnostics.CreateScope("ConnectedClusterServiceResource.Update"); + scope.Start(); + try + { + var response = _connectedClusterServiceServicesRestClient.CreateOrUpdate(Id.Parent, Id.Name, data, cancellationToken); + var uri = _connectedClusterServiceServicesRestClient.CreateCreateOrUpdateRequestUri(Id.Parent, Id.Name, data); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ContainerOrchestratorRuntimeArmOperation(Response.FromValue(new ConnectedClusterServiceResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterStorageClassCollection.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterStorageClassCollection.cs new file mode 100644 index 000000000000..d7d00b85ab77 --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterStorageClassCollection.cs @@ -0,0 +1,483 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.ContainerOrchestratorRuntime +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetConnectedClusterStorageClasses method from an instance of . + /// + public partial class ConnectedClusterStorageClassCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _connectedClusterStorageClassStorageClassClientDiagnostics; + private readonly StorageClassRestOperations _connectedClusterStorageClassStorageClassRestClient; + + /// Initializes a new instance of the class for mocking. + protected ConnectedClusterStorageClassCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal ConnectedClusterStorageClassCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _connectedClusterStorageClassStorageClassClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ContainerOrchestratorRuntime", ConnectedClusterStorageClassResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ConnectedClusterStorageClassResource.ResourceType, out string connectedClusterStorageClassStorageClassApiVersion); + _connectedClusterStorageClassStorageClassRestClient = new StorageClassRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, connectedClusterStorageClassStorageClassApiVersion); + } + + /// + /// Create a StorageClassResource + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/storageClasses/{storageClassName} + /// + /// + /// Operation Id + /// StorageClassResource_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the the storage class. + /// Resource create parameters. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string storageClassName, ConnectedClusterStorageClassData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(storageClassName, nameof(storageClassName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _connectedClusterStorageClassStorageClassClientDiagnostics.CreateScope("ConnectedClusterStorageClassCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _connectedClusterStorageClassStorageClassRestClient.CreateOrUpdateAsync(Id, storageClassName, data, cancellationToken).ConfigureAwait(false); + var operation = new ContainerOrchestratorRuntimeArmOperation(new ConnectedClusterStorageClassOperationSource(Client), _connectedClusterStorageClassStorageClassClientDiagnostics, Pipeline, _connectedClusterStorageClassStorageClassRestClient.CreateCreateOrUpdateRequest(Id, storageClassName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create a StorageClassResource + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/storageClasses/{storageClassName} + /// + /// + /// Operation Id + /// StorageClassResource_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the the storage class. + /// Resource create parameters. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string storageClassName, ConnectedClusterStorageClassData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(storageClassName, nameof(storageClassName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _connectedClusterStorageClassStorageClassClientDiagnostics.CreateScope("ConnectedClusterStorageClassCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _connectedClusterStorageClassStorageClassRestClient.CreateOrUpdate(Id, storageClassName, data, cancellationToken); + var operation = new ContainerOrchestratorRuntimeArmOperation(new ConnectedClusterStorageClassOperationSource(Client), _connectedClusterStorageClassStorageClassClientDiagnostics, Pipeline, _connectedClusterStorageClassStorageClassRestClient.CreateCreateOrUpdateRequest(Id, storageClassName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a StorageClassResource + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/storageClasses/{storageClassName} + /// + /// + /// Operation Id + /// StorageClassResource_Get + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the the storage class. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string storageClassName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(storageClassName, nameof(storageClassName)); + + using var scope = _connectedClusterStorageClassStorageClassClientDiagnostics.CreateScope("ConnectedClusterStorageClassCollection.Get"); + scope.Start(); + try + { + var response = await _connectedClusterStorageClassStorageClassRestClient.GetAsync(Id, storageClassName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ConnectedClusterStorageClassResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a StorageClassResource + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/storageClasses/{storageClassName} + /// + /// + /// Operation Id + /// StorageClassResource_Get + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the the storage class. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string storageClassName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(storageClassName, nameof(storageClassName)); + + using var scope = _connectedClusterStorageClassStorageClassClientDiagnostics.CreateScope("ConnectedClusterStorageClassCollection.Get"); + scope.Start(); + try + { + var response = _connectedClusterStorageClassStorageClassRestClient.Get(Id, storageClassName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ConnectedClusterStorageClassResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List StorageClassResource resources by parent + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/storageClasses + /// + /// + /// Operation Id + /// StorageClassResource_List + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _connectedClusterStorageClassStorageClassRestClient.CreateListRequest(Id); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _connectedClusterStorageClassStorageClassRestClient.CreateListNextPageRequest(nextLink, Id); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ConnectedClusterStorageClassResource(Client, ConnectedClusterStorageClassData.DeserializeConnectedClusterStorageClassData(e)), _connectedClusterStorageClassStorageClassClientDiagnostics, Pipeline, "ConnectedClusterStorageClassCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List StorageClassResource resources by parent + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/storageClasses + /// + /// + /// Operation Id + /// StorageClassResource_List + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _connectedClusterStorageClassStorageClassRestClient.CreateListRequest(Id); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _connectedClusterStorageClassStorageClassRestClient.CreateListNextPageRequest(nextLink, Id); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ConnectedClusterStorageClassResource(Client, ConnectedClusterStorageClassData.DeserializeConnectedClusterStorageClassData(e)), _connectedClusterStorageClassStorageClassClientDiagnostics, Pipeline, "ConnectedClusterStorageClassCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/storageClasses/{storageClassName} + /// + /// + /// Operation Id + /// StorageClassResource_Get + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the the storage class. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string storageClassName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(storageClassName, nameof(storageClassName)); + + using var scope = _connectedClusterStorageClassStorageClassClientDiagnostics.CreateScope("ConnectedClusterStorageClassCollection.Exists"); + scope.Start(); + try + { + var response = await _connectedClusterStorageClassStorageClassRestClient.GetAsync(Id, storageClassName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/storageClasses/{storageClassName} + /// + /// + /// Operation Id + /// StorageClassResource_Get + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the the storage class. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string storageClassName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(storageClassName, nameof(storageClassName)); + + using var scope = _connectedClusterStorageClassStorageClassClientDiagnostics.CreateScope("ConnectedClusterStorageClassCollection.Exists"); + scope.Start(); + try + { + var response = _connectedClusterStorageClassStorageClassRestClient.Get(Id, storageClassName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/storageClasses/{storageClassName} + /// + /// + /// Operation Id + /// StorageClassResource_Get + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the the storage class. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string storageClassName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(storageClassName, nameof(storageClassName)); + + using var scope = _connectedClusterStorageClassStorageClassClientDiagnostics.CreateScope("ConnectedClusterStorageClassCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _connectedClusterStorageClassStorageClassRestClient.GetAsync(Id, storageClassName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new ConnectedClusterStorageClassResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/storageClasses/{storageClassName} + /// + /// + /// Operation Id + /// StorageClassResource_Get + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the the storage class. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string storageClassName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(storageClassName, nameof(storageClassName)); + + using var scope = _connectedClusterStorageClassStorageClassClientDiagnostics.CreateScope("ConnectedClusterStorageClassCollection.GetIfExists"); + scope.Start(); + try + { + var response = _connectedClusterStorageClassStorageClassRestClient.Get(Id, storageClassName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new ConnectedClusterStorageClassResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterStorageClassData.Serialization.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterStorageClassData.Serialization.cs new file mode 100644 index 000000000000..0a775d108c05 --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterStorageClassData.Serialization.cs @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.ContainerOrchestratorRuntime.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.ContainerOrchestratorRuntime +{ + public partial class ConnectedClusterStorageClassData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConnectedClusterStorageClassData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + ConnectedClusterStorageClassData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConnectedClusterStorageClassData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeConnectedClusterStorageClassData(document.RootElement, options); + } + + internal static ConnectedClusterStorageClassData DeserializeConnectedClusterStorageClassData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ConnectedClusterStorageClassProperties properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = ConnectedClusterStorageClassProperties.DeserializeConnectedClusterStorageClassProperties(property.Value, options); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ConnectedClusterStorageClassData( + id, + name, + type, + systemData, + properties, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ConnectedClusterStorageClassData)} does not support writing '{options.Format}' format."); + } + } + + ConnectedClusterStorageClassData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeConnectedClusterStorageClassData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ConnectedClusterStorageClassData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterStorageClassData.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterStorageClassData.cs new file mode 100644 index 000000000000..681dfac412f0 --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterStorageClassData.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.ContainerOrchestratorRuntime.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.ContainerOrchestratorRuntime +{ + /// + /// A class representing the ConnectedClusterStorageClass data model. + /// A StorageClass resource for an Arc connected cluster (Microsoft.Kubernetes/connectedClusters) + /// + public partial class ConnectedClusterStorageClassData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ConnectedClusterStorageClassData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// Keeps track of any properties unknown to the library. + internal ConnectedClusterStorageClassData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ConnectedClusterStorageClassProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource-specific properties for this resource. + public ConnectedClusterStorageClassProperties Properties { get; set; } + } +} diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterStorageClassResource.Serialization.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterStorageClassResource.Serialization.cs new file mode 100644 index 000000000000..6eb02c25c194 --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterStorageClassResource.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.ContainerOrchestratorRuntime +{ + public partial class ConnectedClusterStorageClassResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + ConnectedClusterStorageClassData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + ConnectedClusterStorageClassData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterStorageClassResource.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterStorageClassResource.cs new file mode 100644 index 000000000000..caceed5157b9 --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterStorageClassResource.cs @@ -0,0 +1,346 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.ContainerOrchestratorRuntime.Models; + +namespace Azure.ResourceManager.ContainerOrchestratorRuntime +{ + /// + /// A Class representing a ConnectedClusterStorageClass along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetConnectedClusterStorageClassResource method. + /// Otherwise you can get one from its parent resource using the GetConnectedClusterStorageClass method. + /// + public partial class ConnectedClusterStorageClassResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The resourceUri. + /// The storageClassName. + public static ResourceIdentifier CreateResourceIdentifier(string resourceUri, string storageClassName) + { + var resourceId = $"{resourceUri}/providers/Microsoft.KubernetesRuntime/storageClasses/{storageClassName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _connectedClusterStorageClassStorageClassClientDiagnostics; + private readonly StorageClassRestOperations _connectedClusterStorageClassStorageClassRestClient; + private readonly ConnectedClusterStorageClassData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.KubernetesRuntime/storageClasses"; + + /// Initializes a new instance of the class for mocking. + protected ConnectedClusterStorageClassResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal ConnectedClusterStorageClassResource(ArmClient client, ConnectedClusterStorageClassData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal ConnectedClusterStorageClassResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _connectedClusterStorageClassStorageClassClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ContainerOrchestratorRuntime", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string connectedClusterStorageClassStorageClassApiVersion); + _connectedClusterStorageClassStorageClassRestClient = new StorageClassRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, connectedClusterStorageClassStorageClassApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual ConnectedClusterStorageClassData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Get a StorageClassResource + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/storageClasses/{storageClassName} + /// + /// + /// Operation Id + /// StorageClassResource_Get + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _connectedClusterStorageClassStorageClassClientDiagnostics.CreateScope("ConnectedClusterStorageClassResource.Get"); + scope.Start(); + try + { + var response = await _connectedClusterStorageClassStorageClassRestClient.GetAsync(Id.Parent, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ConnectedClusterStorageClassResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a StorageClassResource + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/storageClasses/{storageClassName} + /// + /// + /// Operation Id + /// StorageClassResource_Get + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _connectedClusterStorageClassStorageClassClientDiagnostics.CreateScope("ConnectedClusterStorageClassResource.Get"); + scope.Start(); + try + { + var response = _connectedClusterStorageClassStorageClassRestClient.Get(Id.Parent, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ConnectedClusterStorageClassResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a StorageClassResource + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/storageClasses/{storageClassName} + /// + /// + /// Operation Id + /// StorageClassResource_Delete + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _connectedClusterStorageClassStorageClassClientDiagnostics.CreateScope("ConnectedClusterStorageClassResource.Delete"); + scope.Start(); + try + { + var response = await _connectedClusterStorageClassStorageClassRestClient.DeleteAsync(Id.Parent, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new ContainerOrchestratorRuntimeArmOperation(_connectedClusterStorageClassStorageClassClientDiagnostics, Pipeline, _connectedClusterStorageClassStorageClassRestClient.CreateDeleteRequest(Id.Parent, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a StorageClassResource + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/storageClasses/{storageClassName} + /// + /// + /// Operation Id + /// StorageClassResource_Delete + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _connectedClusterStorageClassStorageClassClientDiagnostics.CreateScope("ConnectedClusterStorageClassResource.Delete"); + scope.Start(); + try + { + var response = _connectedClusterStorageClassStorageClassRestClient.Delete(Id.Parent, Id.Name, cancellationToken); + var operation = new ContainerOrchestratorRuntimeArmOperation(_connectedClusterStorageClassStorageClassClientDiagnostics, Pipeline, _connectedClusterStorageClassStorageClassRestClient.CreateDeleteRequest(Id.Parent, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update a StorageClassResource + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/storageClasses/{storageClassName} + /// + /// + /// Operation Id + /// StorageClassResource_Update + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, ConnectedClusterStorageClassPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _connectedClusterStorageClassStorageClassClientDiagnostics.CreateScope("ConnectedClusterStorageClassResource.Update"); + scope.Start(); + try + { + var response = await _connectedClusterStorageClassStorageClassRestClient.UpdateAsync(Id.Parent, Id.Name, patch, cancellationToken).ConfigureAwait(false); + var operation = new ContainerOrchestratorRuntimeArmOperation(new ConnectedClusterStorageClassOperationSource(Client), _connectedClusterStorageClassStorageClassClientDiagnostics, Pipeline, _connectedClusterStorageClassStorageClassRestClient.CreateUpdateRequest(Id.Parent, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update a StorageClassResource + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/storageClasses/{storageClassName} + /// + /// + /// Operation Id + /// StorageClassResource_Update + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, ConnectedClusterStorageClassPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _connectedClusterStorageClassStorageClassClientDiagnostics.CreateScope("ConnectedClusterStorageClassResource.Update"); + scope.Start(); + try + { + var response = _connectedClusterStorageClassStorageClassRestClient.Update(Id.Parent, Id.Name, patch, cancellationToken); + var operation = new ContainerOrchestratorRuntimeArmOperation(new ConnectedClusterStorageClassOperationSource(Client), _connectedClusterStorageClassStorageClassClientDiagnostics, Pipeline, _connectedClusterStorageClassStorageClassRestClient.CreateUpdateRequest(Id.Parent, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Extensions/ContainerOrchestratorRuntimeExtensions.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Extensions/ContainerOrchestratorRuntimeExtensions.cs new file mode 100644 index 000000000000..5665dec37598 --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Extensions/ContainerOrchestratorRuntimeExtensions.cs @@ -0,0 +1,484 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.ResourceManager.ContainerOrchestratorRuntime.Mocking; + +namespace Azure.ResourceManager.ContainerOrchestratorRuntime +{ + /// A class to add extension methods to Azure.ResourceManager.ContainerOrchestratorRuntime. + public static partial class ContainerOrchestratorRuntimeExtensions + { + private static MockableContainerOrchestratorRuntimeArmClient GetMockableContainerOrchestratorRuntimeArmClient(ArmClient client) + { + return client.GetCachedClient(client0 => new MockableContainerOrchestratorRuntimeArmClient(client0)); + } + + /// + /// Gets a collection of ConnectedClusterStorageClassResources in the ArmClient. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The scope that the resource will apply against. + /// is null. + /// An object representing collection of ConnectedClusterStorageClassResources and their operations over a ConnectedClusterStorageClassResource. + public static ConnectedClusterStorageClassCollection GetConnectedClusterStorageClasses(this ArmClient client, ResourceIdentifier scope) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableContainerOrchestratorRuntimeArmClient(client).GetConnectedClusterStorageClasses(scope); + } + + /// + /// Get a StorageClassResource + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/storageClasses/{storageClassName} + /// + /// + /// Operation Id + /// StorageClassResource_Get + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The scope that the resource will apply against. + /// The name of the the storage class. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static async Task> GetConnectedClusterStorageClassAsync(this ArmClient client, ResourceIdentifier scope, string storageClassName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(client, nameof(client)); + + return await GetMockableContainerOrchestratorRuntimeArmClient(client).GetConnectedClusterStorageClassAsync(scope, storageClassName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a StorageClassResource + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/storageClasses/{storageClassName} + /// + /// + /// Operation Id + /// StorageClassResource_Get + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The scope that the resource will apply against. + /// The name of the the storage class. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static Response GetConnectedClusterStorageClass(this ArmClient client, ResourceIdentifier scope, string storageClassName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableContainerOrchestratorRuntimeArmClient(client).GetConnectedClusterStorageClass(scope, storageClassName, cancellationToken); + } + + /// + /// Gets a collection of ConnectedClusterLoadBalancerResources in the ArmClient. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The scope that the resource will apply against. + /// is null. + /// An object representing collection of ConnectedClusterLoadBalancerResources and their operations over a ConnectedClusterLoadBalancerResource. + public static ConnectedClusterLoadBalancerCollection GetConnectedClusterLoadBalancers(this ArmClient client, ResourceIdentifier scope) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableContainerOrchestratorRuntimeArmClient(client).GetConnectedClusterLoadBalancers(scope); + } + + /// + /// Get a LoadBalancer + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/loadBalancers/{loadBalancerName} + /// + /// + /// Operation Id + /// LoadBalancer_Get + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The scope that the resource will apply against. + /// The name of the LoadBalancer. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static async Task> GetConnectedClusterLoadBalancerAsync(this ArmClient client, ResourceIdentifier scope, string loadBalancerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(client, nameof(client)); + + return await GetMockableContainerOrchestratorRuntimeArmClient(client).GetConnectedClusterLoadBalancerAsync(scope, loadBalancerName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a LoadBalancer + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/loadBalancers/{loadBalancerName} + /// + /// + /// Operation Id + /// LoadBalancer_Get + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The scope that the resource will apply against. + /// The name of the LoadBalancer. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static Response GetConnectedClusterLoadBalancer(this ArmClient client, ResourceIdentifier scope, string loadBalancerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableContainerOrchestratorRuntimeArmClient(client).GetConnectedClusterLoadBalancer(scope, loadBalancerName, cancellationToken); + } + + /// + /// Gets a collection of ConnectedClusterBgpPeerResources in the ArmClient. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The scope that the resource will apply against. + /// is null. + /// An object representing collection of ConnectedClusterBgpPeerResources and their operations over a ConnectedClusterBgpPeerResource. + public static ConnectedClusterBgpPeerCollection GetConnectedClusterBgpPeers(this ArmClient client, ResourceIdentifier scope) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableContainerOrchestratorRuntimeArmClient(client).GetConnectedClusterBgpPeers(scope); + } + + /// + /// Get a BgpPeer + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/bgpPeers/{bgpPeerName} + /// + /// + /// Operation Id + /// BgpPeer_Get + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The scope that the resource will apply against. + /// The name of the BgpPeer. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static async Task> GetConnectedClusterBgpPeerAsync(this ArmClient client, ResourceIdentifier scope, string bgpPeerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(client, nameof(client)); + + return await GetMockableContainerOrchestratorRuntimeArmClient(client).GetConnectedClusterBgpPeerAsync(scope, bgpPeerName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a BgpPeer + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/bgpPeers/{bgpPeerName} + /// + /// + /// Operation Id + /// BgpPeer_Get + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The scope that the resource will apply against. + /// The name of the BgpPeer. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static Response GetConnectedClusterBgpPeer(this ArmClient client, ResourceIdentifier scope, string bgpPeerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableContainerOrchestratorRuntimeArmClient(client).GetConnectedClusterBgpPeer(scope, bgpPeerName, cancellationToken); + } + + /// + /// Gets a collection of ConnectedClusterServiceResources in the ArmClient. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The scope that the resource will apply against. + /// is null. + /// An object representing collection of ConnectedClusterServiceResources and their operations over a ConnectedClusterServiceResource. + public static ConnectedClusterServiceCollection GetConnectedClusterServices(this ArmClient client, ResourceIdentifier scope) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableContainerOrchestratorRuntimeArmClient(client).GetConnectedClusterServices(scope); + } + + /// + /// Get a ServiceResource + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/services/{serviceName} + /// + /// + /// Operation Id + /// ServiceResource_Get + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The scope that the resource will apply against. + /// The name of the the service. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static async Task> GetConnectedClusterServiceAsync(this ArmClient client, ResourceIdentifier scope, string serviceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(client, nameof(client)); + + return await GetMockableContainerOrchestratorRuntimeArmClient(client).GetConnectedClusterServiceAsync(scope, serviceName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a ServiceResource + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/services/{serviceName} + /// + /// + /// Operation Id + /// ServiceResource_Get + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The scope that the resource will apply against. + /// The name of the the service. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static Response GetConnectedClusterService(this ArmClient client, ResourceIdentifier scope, string serviceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableContainerOrchestratorRuntimeArmClient(client).GetConnectedClusterService(scope, serviceName, cancellationToken); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static ConnectedClusterStorageClassResource GetConnectedClusterStorageClassResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableContainerOrchestratorRuntimeArmClient(client).GetConnectedClusterStorageClassResource(id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static ConnectedClusterLoadBalancerResource GetConnectedClusterLoadBalancerResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableContainerOrchestratorRuntimeArmClient(client).GetConnectedClusterLoadBalancerResource(id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static ConnectedClusterBgpPeerResource GetConnectedClusterBgpPeerResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableContainerOrchestratorRuntimeArmClient(client).GetConnectedClusterBgpPeerResource(id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static ConnectedClusterServiceResource GetConnectedClusterServiceResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableContainerOrchestratorRuntimeArmClient(client).GetConnectedClusterServiceResource(id); + } + } +} diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Extensions/MockableContainerOrchestratorRuntimeArmClient.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Extensions/MockableContainerOrchestratorRuntimeArmClient.cs new file mode 100644 index 000000000000..12520b29891c --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Extensions/MockableContainerOrchestratorRuntimeArmClient.cs @@ -0,0 +1,376 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.ContainerOrchestratorRuntime.Mocking +{ + /// A class to add extension methods to ArmClient. + public partial class MockableContainerOrchestratorRuntimeArmClient : ArmResource + { + /// Initializes a new instance of the class for mocking. + protected MockableContainerOrchestratorRuntimeArmClient() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal MockableContainerOrchestratorRuntimeArmClient(ArmClient client, ResourceIdentifier id) : base(client, id) + { + } + + internal MockableContainerOrchestratorRuntimeArmClient(ArmClient client) : this(client, ResourceIdentifier.Root) + { + } + + private string GetApiVersionOrNull(ResourceType resourceType) + { + TryGetApiVersion(resourceType, out string apiVersion); + return apiVersion; + } + + /// Gets a collection of ConnectedClusterStorageClassResources in the ArmClient. + /// The scope that the resource will apply against. + /// An object representing collection of ConnectedClusterStorageClassResources and their operations over a ConnectedClusterStorageClassResource. + public virtual ConnectedClusterStorageClassCollection GetConnectedClusterStorageClasses(ResourceIdentifier scope) + { + return new ConnectedClusterStorageClassCollection(Client, scope); + } + + /// + /// Get a StorageClassResource + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/storageClasses/{storageClassName} + /// + /// + /// Operation Id + /// StorageClassResource_Get + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The scope that the resource will apply against. + /// The name of the the storage class. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetConnectedClusterStorageClassAsync(ResourceIdentifier scope, string storageClassName, CancellationToken cancellationToken = default) + { + return await GetConnectedClusterStorageClasses(scope).GetAsync(storageClassName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a StorageClassResource + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/storageClasses/{storageClassName} + /// + /// + /// Operation Id + /// StorageClassResource_Get + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The scope that the resource will apply against. + /// The name of the the storage class. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetConnectedClusterStorageClass(ResourceIdentifier scope, string storageClassName, CancellationToken cancellationToken = default) + { + return GetConnectedClusterStorageClasses(scope).Get(storageClassName, cancellationToken); + } + + /// Gets a collection of ConnectedClusterLoadBalancerResources in the ArmClient. + /// The scope that the resource will apply against. + /// An object representing collection of ConnectedClusterLoadBalancerResources and their operations over a ConnectedClusterLoadBalancerResource. + public virtual ConnectedClusterLoadBalancerCollection GetConnectedClusterLoadBalancers(ResourceIdentifier scope) + { + return new ConnectedClusterLoadBalancerCollection(Client, scope); + } + + /// + /// Get a LoadBalancer + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/loadBalancers/{loadBalancerName} + /// + /// + /// Operation Id + /// LoadBalancer_Get + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The scope that the resource will apply against. + /// The name of the LoadBalancer. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetConnectedClusterLoadBalancerAsync(ResourceIdentifier scope, string loadBalancerName, CancellationToken cancellationToken = default) + { + return await GetConnectedClusterLoadBalancers(scope).GetAsync(loadBalancerName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a LoadBalancer + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/loadBalancers/{loadBalancerName} + /// + /// + /// Operation Id + /// LoadBalancer_Get + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The scope that the resource will apply against. + /// The name of the LoadBalancer. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetConnectedClusterLoadBalancer(ResourceIdentifier scope, string loadBalancerName, CancellationToken cancellationToken = default) + { + return GetConnectedClusterLoadBalancers(scope).Get(loadBalancerName, cancellationToken); + } + + /// Gets a collection of ConnectedClusterBgpPeerResources in the ArmClient. + /// The scope that the resource will apply against. + /// An object representing collection of ConnectedClusterBgpPeerResources and their operations over a ConnectedClusterBgpPeerResource. + public virtual ConnectedClusterBgpPeerCollection GetConnectedClusterBgpPeers(ResourceIdentifier scope) + { + return new ConnectedClusterBgpPeerCollection(Client, scope); + } + + /// + /// Get a BgpPeer + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/bgpPeers/{bgpPeerName} + /// + /// + /// Operation Id + /// BgpPeer_Get + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The scope that the resource will apply against. + /// The name of the BgpPeer. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetConnectedClusterBgpPeerAsync(ResourceIdentifier scope, string bgpPeerName, CancellationToken cancellationToken = default) + { + return await GetConnectedClusterBgpPeers(scope).GetAsync(bgpPeerName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a BgpPeer + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/bgpPeers/{bgpPeerName} + /// + /// + /// Operation Id + /// BgpPeer_Get + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The scope that the resource will apply against. + /// The name of the BgpPeer. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetConnectedClusterBgpPeer(ResourceIdentifier scope, string bgpPeerName, CancellationToken cancellationToken = default) + { + return GetConnectedClusterBgpPeers(scope).Get(bgpPeerName, cancellationToken); + } + + /// Gets a collection of ConnectedClusterServiceResources in the ArmClient. + /// The scope that the resource will apply against. + /// An object representing collection of ConnectedClusterServiceResources and their operations over a ConnectedClusterServiceResource. + public virtual ConnectedClusterServiceCollection GetConnectedClusterServices(ResourceIdentifier scope) + { + return new ConnectedClusterServiceCollection(Client, scope); + } + + /// + /// Get a ServiceResource + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/services/{serviceName} + /// + /// + /// Operation Id + /// ServiceResource_Get + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The scope that the resource will apply against. + /// The name of the the service. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetConnectedClusterServiceAsync(ResourceIdentifier scope, string serviceName, CancellationToken cancellationToken = default) + { + return await GetConnectedClusterServices(scope).GetAsync(serviceName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a ServiceResource + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/services/{serviceName} + /// + /// + /// Operation Id + /// ServiceResource_Get + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The scope that the resource will apply against. + /// The name of the the service. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetConnectedClusterService(ResourceIdentifier scope, string serviceName, CancellationToken cancellationToken = default) + { + return GetConnectedClusterServices(scope).Get(serviceName, cancellationToken); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual ConnectedClusterStorageClassResource GetConnectedClusterStorageClassResource(ResourceIdentifier id) + { + ConnectedClusterStorageClassResource.ValidateResourceId(id); + return new ConnectedClusterStorageClassResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual ConnectedClusterLoadBalancerResource GetConnectedClusterLoadBalancerResource(ResourceIdentifier id) + { + ConnectedClusterLoadBalancerResource.ValidateResourceId(id); + return new ConnectedClusterLoadBalancerResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual ConnectedClusterBgpPeerResource GetConnectedClusterBgpPeerResource(ResourceIdentifier id) + { + ConnectedClusterBgpPeerResource.ValidateResourceId(id); + return new ConnectedClusterBgpPeerResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual ConnectedClusterServiceResource GetConnectedClusterServiceResource(ResourceIdentifier id) + { + ConnectedClusterServiceResource.ValidateResourceId(id); + return new ConnectedClusterServiceResource(Client, id); + } + } +} diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Internal/Argument.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Internal/Argument.cs new file mode 100644 index 000000000000..a65d949f1f69 --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Internal/Argument.cs @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ContainerOrchestratorRuntime +{ + internal static class Argument + { + public static void AssertNotNull(T value, string name) + { + if (value is null) + { + throw new ArgumentNullException(name); + } + } + + public static void AssertNotNull(T? value, string name) + where T : struct + { + if (!value.HasValue) + { + throw new ArgumentNullException(name); + } + } + + public static void AssertNotNullOrEmpty(IEnumerable value, string name) + { + if (value is null) + { + throw new ArgumentNullException(name); + } + if (value is ICollection collectionOfT && collectionOfT.Count == 0) + { + throw new ArgumentException("Value cannot be an empty collection.", name); + } + if (value is ICollection collection && collection.Count == 0) + { + throw new ArgumentException("Value cannot be an empty collection.", name); + } + using IEnumerator e = value.GetEnumerator(); + if (!e.MoveNext()) + { + throw new ArgumentException("Value cannot be an empty collection.", name); + } + } + + public static void AssertNotNullOrEmpty(string value, string name) + { + if (value is null) + { + throw new ArgumentNullException(name); + } + if (value.Length == 0) + { + throw new ArgumentException("Value cannot be an empty string.", name); + } + } + + public static void AssertNotNullOrWhiteSpace(string value, string name) + { + if (value is null) + { + throw new ArgumentNullException(name); + } + if (string.IsNullOrWhiteSpace(value)) + { + throw new ArgumentException("Value cannot be empty or contain only white-space characters.", name); + } + } + + public static void AssertNotDefault(ref T value, string name) + where T : struct, IEquatable + { + if (value.Equals(default)) + { + throw new ArgumentException("Value cannot be empty.", name); + } + } + + public static void AssertInRange(T value, T minimum, T maximum, string name) + where T : notnull, IComparable + { + if (minimum.CompareTo(value) > 0) + { + throw new ArgumentOutOfRangeException(name, "Value is less than the minimum allowed."); + } + if (maximum.CompareTo(value) < 0) + { + throw new ArgumentOutOfRangeException(name, "Value is greater than the maximum allowed."); + } + } + + public static void AssertEnumDefined(Type enumType, object value, string name) + { + if (!Enum.IsDefined(enumType, value)) + { + throw new ArgumentException($"Value not defined for {enumType.FullName}.", name); + } + } + + public static T CheckNotNull(T value, string name) + where T : class + { + AssertNotNull(value, name); + return value; + } + + public static string CheckNotNullOrEmpty(string value, string name) + { + AssertNotNullOrEmpty(value, name); + return value; + } + + public static void AssertNull(T value, string name, string message = null) + { + if (value != null) + { + throw new ArgumentException(message ?? "Value must be null.", name); + } + } + } +} diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Internal/ChangeTrackingDictionary.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Internal/ChangeTrackingDictionary.cs new file mode 100644 index 000000000000..523aea7871d3 --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Internal/ChangeTrackingDictionary.cs @@ -0,0 +1,167 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ContainerOrchestratorRuntime +{ + internal class ChangeTrackingDictionary : IDictionary, IReadOnlyDictionary where TKey : notnull + { + private IDictionary _innerDictionary; + + public ChangeTrackingDictionary() + { + } + + public ChangeTrackingDictionary(IDictionary dictionary) + { + if (dictionary == null) + { + return; + } + _innerDictionary = new Dictionary(dictionary); + } + + public ChangeTrackingDictionary(IReadOnlyDictionary dictionary) + { + if (dictionary == null) + { + return; + } + _innerDictionary = new Dictionary(); + foreach (var pair in dictionary) + { + _innerDictionary.Add(pair); + } + } + + public bool IsUndefined => _innerDictionary == null; + + public int Count => IsUndefined ? 0 : EnsureDictionary().Count; + + public bool IsReadOnly => IsUndefined ? false : EnsureDictionary().IsReadOnly; + + public ICollection Keys => IsUndefined ? Array.Empty() : EnsureDictionary().Keys; + + public ICollection Values => IsUndefined ? Array.Empty() : EnsureDictionary().Values; + + public TValue this[TKey key] + { + get + { + if (IsUndefined) + { + throw new KeyNotFoundException(nameof(key)); + } + return EnsureDictionary()[key]; + } + set + { + EnsureDictionary()[key] = value; + } + } + + IEnumerable IReadOnlyDictionary.Keys => Keys; + + IEnumerable IReadOnlyDictionary.Values => Values; + + public IEnumerator> GetEnumerator() + { + if (IsUndefined) + { + IEnumerator> enumerateEmpty() + { + yield break; + } + return enumerateEmpty(); + } + return EnsureDictionary().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + + public void Add(KeyValuePair item) + { + EnsureDictionary().Add(item); + } + + public void Clear() + { + EnsureDictionary().Clear(); + } + + public bool Contains(KeyValuePair item) + { + if (IsUndefined) + { + return false; + } + return EnsureDictionary().Contains(item); + } + + public void CopyTo(KeyValuePair[] array, int index) + { + if (IsUndefined) + { + return; + } + EnsureDictionary().CopyTo(array, index); + } + + public bool Remove(KeyValuePair item) + { + if (IsUndefined) + { + return false; + } + return EnsureDictionary().Remove(item); + } + + public void Add(TKey key, TValue value) + { + EnsureDictionary().Add(key, value); + } + + public bool ContainsKey(TKey key) + { + if (IsUndefined) + { + return false; + } + return EnsureDictionary().ContainsKey(key); + } + + public bool Remove(TKey key) + { + if (IsUndefined) + { + return false; + } + return EnsureDictionary().Remove(key); + } + + public bool TryGetValue(TKey key, out TValue value) + { + if (IsUndefined) + { + value = default; + return false; + } + return EnsureDictionary().TryGetValue(key, out value); + } + + public IDictionary EnsureDictionary() + { + return _innerDictionary ??= new Dictionary(); + } + } +} diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Internal/ChangeTrackingList.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Internal/ChangeTrackingList.cs new file mode 100644 index 000000000000..99ac7574a0dc --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Internal/ChangeTrackingList.cs @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.ContainerOrchestratorRuntime +{ + internal class ChangeTrackingList : IList, IReadOnlyList + { + private IList _innerList; + + public ChangeTrackingList() + { + } + + public ChangeTrackingList(IList innerList) + { + if (innerList != null) + { + _innerList = innerList; + } + } + + public ChangeTrackingList(IReadOnlyList innerList) + { + if (innerList != null) + { + _innerList = innerList.ToList(); + } + } + + public bool IsUndefined => _innerList == null; + + public int Count => IsUndefined ? 0 : EnsureList().Count; + + public bool IsReadOnly => IsUndefined ? false : EnsureList().IsReadOnly; + + public T this[int index] + { + get + { + if (IsUndefined) + { + throw new ArgumentOutOfRangeException(nameof(index)); + } + return EnsureList()[index]; + } + set + { + if (IsUndefined) + { + throw new ArgumentOutOfRangeException(nameof(index)); + } + EnsureList()[index] = value; + } + } + + public void Reset() + { + _innerList = null; + } + + public IEnumerator GetEnumerator() + { + if (IsUndefined) + { + IEnumerator enumerateEmpty() + { + yield break; + } + return enumerateEmpty(); + } + return EnsureList().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + + public void Add(T item) + { + EnsureList().Add(item); + } + + public void Clear() + { + EnsureList().Clear(); + } + + public bool Contains(T item) + { + if (IsUndefined) + { + return false; + } + return EnsureList().Contains(item); + } + + public void CopyTo(T[] array, int arrayIndex) + { + if (IsUndefined) + { + return; + } + EnsureList().CopyTo(array, arrayIndex); + } + + public bool Remove(T item) + { + if (IsUndefined) + { + return false; + } + return EnsureList().Remove(item); + } + + public int IndexOf(T item) + { + if (IsUndefined) + { + return -1; + } + return EnsureList().IndexOf(item); + } + + public void Insert(int index, T item) + { + EnsureList().Insert(index, item); + } + + public void RemoveAt(int index) + { + if (IsUndefined) + { + throw new ArgumentOutOfRangeException(nameof(index)); + } + EnsureList().RemoveAt(index); + } + + public IList EnsureList() + { + return _innerList ??= new List(); + } + } +} diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Internal/ModelSerializationExtensions.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Internal/ModelSerializationExtensions.cs new file mode 100644 index 000000000000..dada287fbfba --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Internal/ModelSerializationExtensions.cs @@ -0,0 +1,398 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Diagnostics; +using System.Globalization; +using System.Text.Json; +using System.Xml; +using Azure.Core; + +namespace Azure.ResourceManager.ContainerOrchestratorRuntime +{ + internal static class ModelSerializationExtensions + { + internal static readonly ModelReaderWriterOptions WireOptions = new ModelReaderWriterOptions("W"); + + public static object GetObject(this JsonElement element) + { + switch (element.ValueKind) + { + case JsonValueKind.String: + return element.GetString(); + case JsonValueKind.Number: + if (element.TryGetInt32(out int intValue)) + { + return intValue; + } + if (element.TryGetInt64(out long longValue)) + { + return longValue; + } + return element.GetDouble(); + case JsonValueKind.True: + return true; + case JsonValueKind.False: + return false; + case JsonValueKind.Undefined: + case JsonValueKind.Null: + return null; + case JsonValueKind.Object: + var dictionary = new Dictionary(); + foreach (var jsonProperty in element.EnumerateObject()) + { + dictionary.Add(jsonProperty.Name, jsonProperty.Value.GetObject()); + } + return dictionary; + case JsonValueKind.Array: + var list = new List(); + foreach (var item in element.EnumerateArray()) + { + list.Add(item.GetObject()); + } + return list.ToArray(); + default: + throw new NotSupportedException($"Not supported value kind {element.ValueKind}"); + } + } + + public static byte[] GetBytesFromBase64(this JsonElement element, string format) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + + return format switch + { + "U" => TypeFormatters.FromBase64UrlString(element.GetRequiredString()), + "D" => element.GetBytesFromBase64(), + _ => throw new ArgumentException($"Format is not supported: '{format}'", nameof(format)) + }; + } + + public static DateTimeOffset GetDateTimeOffset(this JsonElement element, string format) => format switch + { + "U" when element.ValueKind == JsonValueKind.Number => DateTimeOffset.FromUnixTimeSeconds(element.GetInt64()), + _ => TypeFormatters.ParseDateTimeOffset(element.GetString(), format) + }; + + public static TimeSpan GetTimeSpan(this JsonElement element, string format) => TypeFormatters.ParseTimeSpan(element.GetString(), format); + + public static char GetChar(this JsonElement element) + { + if (element.ValueKind == JsonValueKind.String) + { + var text = element.GetString(); + if (text == null || text.Length != 1) + { + throw new NotSupportedException($"Cannot convert \"{text}\" to a char"); + } + return text[0]; + } + else + { + throw new NotSupportedException($"Cannot convert {element.ValueKind} to a char"); + } + } + + [Conditional("DEBUG")] + public static void ThrowNonNullablePropertyIsNull(this JsonProperty property) + { + throw new JsonException($"A property '{property.Name}' defined as non-nullable but received as null from the service. This exception only happens in DEBUG builds of the library and would be ignored in the release build"); + } + + public static string GetRequiredString(this JsonElement element) + { + var value = element.GetString(); + if (value == null) + { + throw new InvalidOperationException($"The requested operation requires an element of type 'String', but the target element has type '{element.ValueKind}'."); + } + return value; + } + + public static void WriteStringValue(this Utf8JsonWriter writer, DateTimeOffset value, string format) + { + writer.WriteStringValue(TypeFormatters.ToString(value, format)); + } + + public static void WriteStringValue(this Utf8JsonWriter writer, DateTime value, string format) + { + writer.WriteStringValue(TypeFormatters.ToString(value, format)); + } + + public static void WriteStringValue(this Utf8JsonWriter writer, TimeSpan value, string format) + { + writer.WriteStringValue(TypeFormatters.ToString(value, format)); + } + + public static void WriteStringValue(this Utf8JsonWriter writer, char value) + { + writer.WriteStringValue(value.ToString(CultureInfo.InvariantCulture)); + } + + public static void WriteBase64StringValue(this Utf8JsonWriter writer, byte[] value, string format) + { + if (value == null) + { + writer.WriteNullValue(); + return; + } + switch (format) + { + case "U": + writer.WriteStringValue(TypeFormatters.ToBase64UrlString(value)); + break; + case "D": + writer.WriteBase64StringValue(value); + break; + default: + throw new ArgumentException($"Format is not supported: '{format}'", nameof(format)); + } + } + + public static void WriteNumberValue(this Utf8JsonWriter writer, DateTimeOffset value, string format) + { + if (format != "U") + { + throw new ArgumentOutOfRangeException(nameof(format), "Only 'U' format is supported when writing a DateTimeOffset as a Number."); + } + writer.WriteNumberValue(value.ToUnixTimeSeconds()); + } + + public static void WriteObjectValue(this Utf8JsonWriter writer, T value, ModelReaderWriterOptions options = null) + { + switch (value) + { + case null: + writer.WriteNullValue(); + break; + case IJsonModel jsonModel: + jsonModel.Write(writer, options ?? WireOptions); + break; + case IUtf8JsonSerializable serializable: + serializable.Write(writer); + break; + case byte[] bytes: + writer.WriteBase64StringValue(bytes); + break; + case BinaryData bytes0: + writer.WriteBase64StringValue(bytes0); + break; + case JsonElement json: + json.WriteTo(writer); + break; + case int i: + writer.WriteNumberValue(i); + break; + case decimal d: + writer.WriteNumberValue(d); + break; + case double d0: + if (double.IsNaN(d0)) + { + writer.WriteStringValue("NaN"); + } + else + { + writer.WriteNumberValue(d0); + } + break; + case float f: + writer.WriteNumberValue(f); + break; + case long l: + writer.WriteNumberValue(l); + break; + case string s: + writer.WriteStringValue(s); + break; + case bool b: + writer.WriteBooleanValue(b); + break; + case Guid g: + writer.WriteStringValue(g); + break; + case DateTimeOffset dateTimeOffset: + writer.WriteStringValue(dateTimeOffset, "O"); + break; + case DateTime dateTime: + writer.WriteStringValue(dateTime, "O"); + break; + case IEnumerable> enumerable: + writer.WriteStartObject(); + foreach (var pair in enumerable) + { + writer.WritePropertyName(pair.Key); + writer.WriteObjectValue(pair.Value, options); + } + writer.WriteEndObject(); + break; + case IEnumerable objectEnumerable: + writer.WriteStartArray(); + foreach (var item in objectEnumerable) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + break; + case TimeSpan timeSpan: + writer.WriteStringValue(timeSpan, "P"); + break; + default: + throw new NotSupportedException($"Not supported type {value.GetType()}"); + } + } + + public static void WriteObjectValue(this Utf8JsonWriter writer, object value, ModelReaderWriterOptions options = null) + { + writer.WriteObjectValue(value, options); + } + + internal static class TypeFormatters + { + private const string RoundtripZFormat = "yyyy-MM-ddTHH:mm:ss.fffffffZ"; + public const string DefaultNumberFormat = "G"; + + public static string ToString(bool value) => value ? "true" : "false"; + + public static string ToString(DateTime value, string format) => value.Kind switch + { + DateTimeKind.Utc => ToString((DateTimeOffset)value, format), + _ => throw new NotSupportedException($"DateTime {value} has a Kind of {value.Kind}. Azure SDK requires it to be UTC. You can call DateTime.SpecifyKind to change Kind property value to DateTimeKind.Utc.") + }; + + public static string ToString(DateTimeOffset value, string format) => format switch + { + "D" => value.ToString("yyyy-MM-dd", CultureInfo.InvariantCulture), + "U" => value.ToUnixTimeSeconds().ToString(CultureInfo.InvariantCulture), + "O" => value.ToUniversalTime().ToString(RoundtripZFormat, CultureInfo.InvariantCulture), + "o" => value.ToUniversalTime().ToString(RoundtripZFormat, CultureInfo.InvariantCulture), + "R" => value.ToString("r", CultureInfo.InvariantCulture), + _ => value.ToString(format, CultureInfo.InvariantCulture) + }; + + public static string ToString(TimeSpan value, string format) => format switch + { + "P" => XmlConvert.ToString(value), + _ => value.ToString(format, CultureInfo.InvariantCulture) + }; + + public static string ToString(byte[] value, string format) => format switch + { + "U" => ToBase64UrlString(value), + "D" => Convert.ToBase64String(value), + _ => throw new ArgumentException($"Format is not supported: '{format}'", nameof(format)) + }; + + public static string ToBase64UrlString(byte[] value) + { + int numWholeOrPartialInputBlocks = checked(value.Length + 2) / 3; + int size = checked(numWholeOrPartialInputBlocks * 4); + char[] output = new char[size]; + + int numBase64Chars = Convert.ToBase64CharArray(value, 0, value.Length, output, 0); + + int i = 0; + for (; i < numBase64Chars; i++) + { + char ch = output[i]; + if (ch == '+') + { + output[i] = '-'; + } + else + { + if (ch == '/') + { + output[i] = '_'; + } + else + { + if (ch == '=') + { + break; + } + } + } + } + + return new string(output, 0, i); + } + + public static byte[] FromBase64UrlString(string value) + { + int paddingCharsToAdd = (value.Length % 4) switch + { + 0 => 0, + 2 => 2, + 3 => 1, + _ => throw new InvalidOperationException("Malformed input") + }; + char[] output = new char[(value.Length + paddingCharsToAdd)]; + int i = 0; + for (; i < value.Length; i++) + { + char ch = value[i]; + if (ch == '-') + { + output[i] = '+'; + } + else + { + if (ch == '_') + { + output[i] = '/'; + } + else + { + output[i] = ch; + } + } + } + + for (; i < output.Length; i++) + { + output[i] = '='; + } + + return Convert.FromBase64CharArray(output, 0, output.Length); + } + + public static DateTimeOffset ParseDateTimeOffset(string value, string format) => format switch + { + "U" => DateTimeOffset.FromUnixTimeSeconds(long.Parse(value, CultureInfo.InvariantCulture)), + _ => DateTimeOffset.Parse(value, CultureInfo.InvariantCulture, DateTimeStyles.AssumeUniversal) + }; + + public static TimeSpan ParseTimeSpan(string value, string format) => format switch + { + "P" => XmlConvert.ToTimeSpan(value), + _ => TimeSpan.ParseExact(value, format, CultureInfo.InvariantCulture) + }; + + public static string ConvertToString(object value, string format = null) => value switch + { + null => "null", + string s => s, + bool b => ToString(b), + int or float or double or long or decimal => ((IFormattable)value).ToString(DefaultNumberFormat, CultureInfo.InvariantCulture), + byte[] b0 when format != null => ToString(b0, format), + IEnumerable s0 => string.Join(",", s0), + DateTimeOffset dateTime when format != null => ToString(dateTime, format), + TimeSpan timeSpan when format != null => ToString(timeSpan, format), + TimeSpan timeSpan0 => XmlConvert.ToString(timeSpan0), + Guid guid => guid.ToString(), + BinaryData binaryData => ConvertToString(binaryData.ToArray(), format), + _ => value.ToString() + }; + } + } +} diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Internal/Optional.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Internal/Optional.cs new file mode 100644 index 000000000000..49d47bb50e2e --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Internal/Optional.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; + +namespace Azure.ResourceManager.ContainerOrchestratorRuntime +{ + internal static class Optional + { + public static bool IsCollectionDefined(IEnumerable collection) + { + return !(collection is ChangeTrackingList changeTrackingList && changeTrackingList.IsUndefined); + } + + public static bool IsCollectionDefined(IDictionary collection) + { + return !(collection is ChangeTrackingDictionary changeTrackingDictionary && changeTrackingDictionary.IsUndefined); + } + + public static bool IsCollectionDefined(IReadOnlyDictionary collection) + { + return !(collection is ChangeTrackingDictionary changeTrackingDictionary && changeTrackingDictionary.IsUndefined); + } + + public static bool IsDefined(T? value) + where T : struct + { + return value.HasValue; + } + + public static bool IsDefined(object value) + { + return value != null; + } + + public static bool IsDefined(JsonElement value) + { + return value.ValueKind != JsonValueKind.Undefined; + } + + public static bool IsDefined(string value) + { + return value != null; + } + } +} diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Internal/Utf8JsonRequestContent.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Internal/Utf8JsonRequestContent.cs new file mode 100644 index 000000000000..97b1c41080d1 --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Internal/Utf8JsonRequestContent.cs @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.IO; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.ContainerOrchestratorRuntime +{ + internal class Utf8JsonRequestContent : RequestContent + { + private readonly MemoryStream _stream; + private readonly RequestContent _content; + + public Utf8JsonRequestContent() + { + _stream = new MemoryStream(); + _content = Create(_stream); + JsonWriter = new Utf8JsonWriter(_stream); + } + + public Utf8JsonWriter JsonWriter { get; } + + public override async Task WriteToAsync(Stream stream, CancellationToken cancellationToken = default) + { + await JsonWriter.FlushAsync().ConfigureAwait(false); + await _content.WriteToAsync(stream, cancellationToken).ConfigureAwait(false); + } + + public override void WriteTo(Stream stream, CancellationToken cancellationToken = default) + { + JsonWriter.Flush(); + _content.WriteTo(stream, cancellationToken); + } + + public override bool TryComputeLength(out long length) + { + length = JsonWriter.BytesCommitted + JsonWriter.BytesPending; + return true; + } + + public override void Dispose() + { + JsonWriter.Dispose(); + _content.Dispose(); + _stream.Dispose(); + } + } +} diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/LongRunningOperation/ConnectedClusterBgpPeerOperationSource.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/LongRunningOperation/ConnectedClusterBgpPeerOperationSource.cs new file mode 100644 index 000000000000..65ddf31da073 --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/LongRunningOperation/ConnectedClusterBgpPeerOperationSource.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.ContainerOrchestratorRuntime +{ + internal class ConnectedClusterBgpPeerOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal ConnectedClusterBgpPeerOperationSource(ArmClient client) + { + _client = client; + } + + ConnectedClusterBgpPeerResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = ConnectedClusterBgpPeerData.DeserializeConnectedClusterBgpPeerData(document.RootElement); + return new ConnectedClusterBgpPeerResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = ConnectedClusterBgpPeerData.DeserializeConnectedClusterBgpPeerData(document.RootElement); + return new ConnectedClusterBgpPeerResource(_client, data); + } + } +} diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/LongRunningOperation/ConnectedClusterLoadBalancerOperationSource.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/LongRunningOperation/ConnectedClusterLoadBalancerOperationSource.cs new file mode 100644 index 000000000000..89cae47fe4b8 --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/LongRunningOperation/ConnectedClusterLoadBalancerOperationSource.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.ContainerOrchestratorRuntime +{ + internal class ConnectedClusterLoadBalancerOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal ConnectedClusterLoadBalancerOperationSource(ArmClient client) + { + _client = client; + } + + ConnectedClusterLoadBalancerResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = ConnectedClusterLoadBalancerData.DeserializeConnectedClusterLoadBalancerData(document.RootElement); + return new ConnectedClusterLoadBalancerResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = ConnectedClusterLoadBalancerData.DeserializeConnectedClusterLoadBalancerData(document.RootElement); + return new ConnectedClusterLoadBalancerResource(_client, data); + } + } +} diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/LongRunningOperation/ConnectedClusterStorageClassOperationSource.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/LongRunningOperation/ConnectedClusterStorageClassOperationSource.cs new file mode 100644 index 000000000000..8c5e94773483 --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/LongRunningOperation/ConnectedClusterStorageClassOperationSource.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.ContainerOrchestratorRuntime +{ + internal class ConnectedClusterStorageClassOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal ConnectedClusterStorageClassOperationSource(ArmClient client) + { + _client = client; + } + + ConnectedClusterStorageClassResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = ConnectedClusterStorageClassData.DeserializeConnectedClusterStorageClassData(document.RootElement); + return new ConnectedClusterStorageClassResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = ConnectedClusterStorageClassData.DeserializeConnectedClusterStorageClassData(document.RootElement); + return new ConnectedClusterStorageClassResource(_client, data); + } + } +} diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/LongRunningOperation/ContainerOrchestratorRuntimeArmOperation.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/LongRunningOperation/ContainerOrchestratorRuntimeArmOperation.cs new file mode 100644 index 000000000000..8b0670504116 --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/LongRunningOperation/ContainerOrchestratorRuntimeArmOperation.cs @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.ContainerOrchestratorRuntime +{ +#pragma warning disable SA1649 // File name should match first type name + internal class ContainerOrchestratorRuntimeArmOperation : 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 ContainerOrchestratorRuntimeArmOperation for mocking. + protected ContainerOrchestratorRuntimeArmOperation() + { + } + + internal ContainerOrchestratorRuntimeArmOperation(Response response, RehydrationToken? rehydrationToken = null) + { + _operation = OperationInternal.Succeeded(response); + _completeRehydrationToken = rehydrationToken; + _operationId = GetOperationId(rehydrationToken); + } + + internal ContainerOrchestratorRuntimeArmOperation(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, "ContainerOrchestratorRuntimeArmOperation", 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; + + /// + public override RehydrationToken? GetRehydrationToken() => _nextLinkOperation?.GetRehydrationToken() ?? _completeRehydrationToken; + + /// + public override bool HasCompleted => _operation.HasCompleted; + + /// + public override Response GetRawResponse() => _operation.RawResponse; + + /// + public override Response UpdateStatus(CancellationToken cancellationToken = default) => _operation.UpdateStatus(cancellationToken); + + /// + public override ValueTask UpdateStatusAsync(CancellationToken cancellationToken = default) => _operation.UpdateStatusAsync(cancellationToken); + + /// + public override Response WaitForCompletionResponse(CancellationToken cancellationToken = default) => _operation.WaitForCompletionResponse(cancellationToken); + + /// + public override Response WaitForCompletionResponse(TimeSpan pollingInterval, CancellationToken cancellationToken = default) => _operation.WaitForCompletionResponse(pollingInterval, cancellationToken); + + /// + public override ValueTask WaitForCompletionResponseAsync(CancellationToken cancellationToken = default) => _operation.WaitForCompletionResponseAsync(cancellationToken); + + /// + public override ValueTask WaitForCompletionResponseAsync(TimeSpan pollingInterval, CancellationToken cancellationToken = default) => _operation.WaitForCompletionResponseAsync(pollingInterval, cancellationToken); + } +} diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/LongRunningOperation/ContainerOrchestratorRuntimeArmOperationOfT.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/LongRunningOperation/ContainerOrchestratorRuntimeArmOperationOfT.cs new file mode 100644 index 000000000000..6caaa91dc6d9 --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/LongRunningOperation/ContainerOrchestratorRuntimeArmOperationOfT.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.ContainerOrchestratorRuntime +{ +#pragma warning disable SA1649 // File name should match first type name + internal class ContainerOrchestratorRuntimeArmOperation : 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 ContainerOrchestratorRuntimeArmOperation for mocking. + protected ContainerOrchestratorRuntimeArmOperation() + { + } + + internal ContainerOrchestratorRuntimeArmOperation(Response response, RehydrationToken? rehydrationToken = null) + { + _operation = OperationInternal.Succeeded(response.GetRawResponse(), response.Value); + _completeRehydrationToken = rehydrationToken; + _operationId = GetOperationId(rehydrationToken); + } + + internal ContainerOrchestratorRuntimeArmOperation(IOperationSource source, 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(NextLinkOperationImplementation.Create(source, nextLinkOperation), clientDiagnostics, response, "ContainerOrchestratorRuntimeArmOperation", 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; + + /// + public override RehydrationToken? GetRehydrationToken() => _nextLinkOperation?.GetRehydrationToken() ?? _completeRehydrationToken; + + /// + public override T Value => _operation.Value; + + /// + public override bool HasValue => _operation.HasValue; + + /// + public override bool HasCompleted => _operation.HasCompleted; + + /// + public override Response GetRawResponse() => _operation.RawResponse; + + /// + public override Response UpdateStatus(CancellationToken cancellationToken = default) => _operation.UpdateStatus(cancellationToken); + + /// + public override ValueTask UpdateStatusAsync(CancellationToken cancellationToken = default) => _operation.UpdateStatusAsync(cancellationToken); + + /// + public override Response WaitForCompletion(CancellationToken cancellationToken = default) => _operation.WaitForCompletion(cancellationToken); + + /// + public override Response WaitForCompletion(TimeSpan pollingInterval, CancellationToken cancellationToken = default) => _operation.WaitForCompletion(pollingInterval, cancellationToken); + + /// + public override ValueTask> WaitForCompletionAsync(CancellationToken cancellationToken = default) => _operation.WaitForCompletionAsync(cancellationToken); + + /// + public override ValueTask> WaitForCompletionAsync(TimeSpan pollingInterval, CancellationToken cancellationToken = default) => _operation.WaitForCompletionAsync(pollingInterval, cancellationToken); + } +} diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/AdvertiseMode.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/AdvertiseMode.cs new file mode 100644 index 000000000000..1c22641d42ee --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/AdvertiseMode.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ContainerOrchestratorRuntime.Models +{ + /// Enum of advertise mode. + public readonly partial struct AdvertiseMode : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AdvertiseMode(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ArpValue = "ARP"; + private const string BgpValue = "BGP"; + private const string BothValue = "Both"; + + /// ARP advertise mode. + public static AdvertiseMode Arp { get; } = new AdvertiseMode(ArpValue); + /// BGP advertise mode. + public static AdvertiseMode Bgp { get; } = new AdvertiseMode(BgpValue); + /// both ARP and BGP advertise mode. + public static AdvertiseMode Both { get; } = new AdvertiseMode(BothValue); + /// Determines if two values are the same. + public static bool operator ==(AdvertiseMode left, AdvertiseMode right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AdvertiseMode left, AdvertiseMode right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator AdvertiseMode(string value) => new AdvertiseMode(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AdvertiseMode other && Equals(other); + /// + public bool Equals(AdvertiseMode other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/BgpPeerListResult.Serialization.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/BgpPeerListResult.Serialization.cs new file mode 100644 index 000000000000..61463c25325d --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/BgpPeerListResult.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ContainerOrchestratorRuntime.Models +{ + internal partial class BgpPeerListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BgpPeerListResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + BgpPeerListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BgpPeerListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBgpPeerListResult(document.RootElement, options); + } + + internal static BgpPeerListResult DeserializeBgpPeerListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ConnectedClusterBgpPeerData.DeserializeConnectedClusterBgpPeerData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BgpPeerListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(BgpPeerListResult)} does not support writing '{options.Format}' format."); + } + } + + BgpPeerListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeBgpPeerListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BgpPeerListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/BgpPeerListResult.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/BgpPeerListResult.cs new file mode 100644 index 000000000000..78a37cd6a785 --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/BgpPeerListResult.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.ContainerOrchestratorRuntime.Models +{ + /// The response of a BgpPeer list operation. + internal partial class BgpPeerListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The BgpPeer items on this page. + /// is null. + internal BgpPeerListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The BgpPeer items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal BgpPeerListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal BgpPeerListResult() + { + } + + /// The BgpPeer items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/BlobStorageClassTypeProperties.Serialization.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/BlobStorageClassTypeProperties.Serialization.cs new file mode 100644 index 000000000000..063c0867546f --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/BlobStorageClassTypeProperties.Serialization.cs @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ContainerOrchestratorRuntime.Models +{ + public partial class BlobStorageClassTypeProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BlobStorageClassTypeProperties)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("azureStorageAccountName"u8); + writer.WriteStringValue(AzureStorageAccountName); + writer.WritePropertyName("azureStorageAccountKey"u8); + writer.WriteStringValue(AzureStorageAccountKey); + } + + BlobStorageClassTypeProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BlobStorageClassTypeProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBlobStorageClassTypeProperties(document.RootElement, options); + } + + internal static BlobStorageClassTypeProperties DeserializeBlobStorageClassTypeProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string azureStorageAccountName = default; + string azureStorageAccountKey = default; + StorageClassType type = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("azureStorageAccountName"u8)) + { + azureStorageAccountName = property.Value.GetString(); + continue; + } + if (property.NameEquals("azureStorageAccountKey"u8)) + { + azureStorageAccountKey = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new StorageClassType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BlobStorageClassTypeProperties(type, serializedAdditionalRawData, azureStorageAccountName, azureStorageAccountKey); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(BlobStorageClassTypeProperties)} does not support writing '{options.Format}' format."); + } + } + + BlobStorageClassTypeProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeBlobStorageClassTypeProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BlobStorageClassTypeProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/BlobStorageClassTypeProperties.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/BlobStorageClassTypeProperties.cs new file mode 100644 index 000000000000..dfef894940b9 --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/BlobStorageClassTypeProperties.cs @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ContainerOrchestratorRuntime.Models +{ + /// The properties of Blob StorageClass. + public partial class BlobStorageClassTypeProperties : StorageClassTypeProperties + { + /// Initializes a new instance of . + /// Azure Storage Account Name. + /// Azure Storage Account Key. + /// or is null. + public BlobStorageClassTypeProperties(string azureStorageAccountName, string azureStorageAccountKey) + { + Argument.AssertNotNull(azureStorageAccountName, nameof(azureStorageAccountName)); + Argument.AssertNotNull(azureStorageAccountKey, nameof(azureStorageAccountKey)); + + AzureStorageAccountName = azureStorageAccountName; + AzureStorageAccountKey = azureStorageAccountKey; + Type = StorageClassType.Blob; + } + + /// Initializes a new instance of . + /// Type of the storage class. + /// Keeps track of any properties unknown to the library. + /// Azure Storage Account Name. + /// Azure Storage Account Key. + internal BlobStorageClassTypeProperties(StorageClassType type, IDictionary serializedAdditionalRawData, string azureStorageAccountName, string azureStorageAccountKey) : base(type, serializedAdditionalRawData) + { + AzureStorageAccountName = azureStorageAccountName; + AzureStorageAccountKey = azureStorageAccountKey; + Type = type; + } + + /// Initializes a new instance of for deserialization. + internal BlobStorageClassTypeProperties() + { + } + + /// Azure Storage Account Name. + public string AzureStorageAccountName { get; set; } + /// Azure Storage Account Key. + public string AzureStorageAccountKey { get; set; } + } +} diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/ConnectedClusterBgpPeerProperties.Serialization.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/ConnectedClusterBgpPeerProperties.Serialization.cs new file mode 100644 index 000000000000..d44c4b53adf0 --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/ConnectedClusterBgpPeerProperties.Serialization.cs @@ -0,0 +1,157 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ContainerOrchestratorRuntime.Models +{ + public partial class ConnectedClusterBgpPeerProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConnectedClusterBgpPeerProperties)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("myAsn"u8); + writer.WriteNumberValue(MyAsn); + writer.WritePropertyName("peerAsn"u8); + writer.WriteNumberValue(PeerAsn); + writer.WritePropertyName("peerAddress"u8); + writer.WriteStringValue(PeerAddress); + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ConnectedClusterBgpPeerProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConnectedClusterBgpPeerProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeConnectedClusterBgpPeerProperties(document.RootElement, options); + } + + internal static ConnectedClusterBgpPeerProperties DeserializeConnectedClusterBgpPeerProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int myAsn = default; + int peerAsn = default; + string peerAddress = default; + ContainerOrchestratorProvisioningState? provisioningState = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("myAsn"u8)) + { + myAsn = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("peerAsn"u8)) + { + peerAsn = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("peerAddress"u8)) + { + peerAddress = property.Value.GetString(); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new ContainerOrchestratorProvisioningState(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ConnectedClusterBgpPeerProperties(myAsn, peerAsn, peerAddress, provisioningState, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ConnectedClusterBgpPeerProperties)} does not support writing '{options.Format}' format."); + } + } + + ConnectedClusterBgpPeerProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeConnectedClusterBgpPeerProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ConnectedClusterBgpPeerProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/ConnectedClusterBgpPeerProperties.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/ConnectedClusterBgpPeerProperties.cs new file mode 100644 index 000000000000..7ed798f27d21 --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/ConnectedClusterBgpPeerProperties.cs @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ContainerOrchestratorRuntime.Models +{ + /// Details of the BgpPeer. + public partial class ConnectedClusterBgpPeerProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// My ASN. + /// Peer ASN. + /// Peer Address. + /// is null. + public ConnectedClusterBgpPeerProperties(int myAsn, int peerAsn, string peerAddress) + { + Argument.AssertNotNull(peerAddress, nameof(peerAddress)); + + MyAsn = myAsn; + PeerAsn = peerAsn; + PeerAddress = peerAddress; + } + + /// Initializes a new instance of . + /// My ASN. + /// Peer ASN. + /// Peer Address. + /// Resource provision state. + /// Keeps track of any properties unknown to the library. + internal ConnectedClusterBgpPeerProperties(int myAsn, int peerAsn, string peerAddress, ContainerOrchestratorProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) + { + MyAsn = myAsn; + PeerAsn = peerAsn; + PeerAddress = peerAddress; + ProvisioningState = provisioningState; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ConnectedClusterBgpPeerProperties() + { + } + + /// My ASN. + public int MyAsn { get; set; } + /// Peer ASN. + public int PeerAsn { get; set; } + /// Peer Address. + public string PeerAddress { get; set; } + /// Resource provision state. + public ContainerOrchestratorProvisioningState? ProvisioningState { get; } + } +} diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/ConnectedClusterLoadBalancerProperties.Serialization.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/ConnectedClusterLoadBalancerProperties.Serialization.cs new file mode 100644 index 000000000000..7602382cb022 --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/ConnectedClusterLoadBalancerProperties.Serialization.cs @@ -0,0 +1,216 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ContainerOrchestratorRuntime.Models +{ + public partial class ConnectedClusterLoadBalancerProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConnectedClusterLoadBalancerProperties)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("addresses"u8); + writer.WriteStartArray(); + foreach (var item in Addresses) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + if (Optional.IsCollectionDefined(ServiceSelector)) + { + writer.WritePropertyName("serviceSelector"u8); + writer.WriteStartObject(); + foreach (var item in ServiceSelector) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WritePropertyName("advertiseMode"u8); + writer.WriteStringValue(AdvertiseMode.ToString()); + if (Optional.IsCollectionDefined(BgpPeers)) + { + writer.WritePropertyName("bgpPeers"u8); + writer.WriteStartArray(); + foreach (var item in BgpPeers) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ConnectedClusterLoadBalancerProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConnectedClusterLoadBalancerProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeConnectedClusterLoadBalancerProperties(document.RootElement, options); + } + + internal static ConnectedClusterLoadBalancerProperties DeserializeConnectedClusterLoadBalancerProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList addresses = default; + IDictionary serviceSelector = default; + AdvertiseMode advertiseMode = default; + IList bgpPeers = default; + ContainerOrchestratorProvisioningState? provisioningState = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("addresses"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + addresses = array; + continue; + } + if (property.NameEquals("serviceSelector"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + serviceSelector = dictionary; + continue; + } + if (property.NameEquals("advertiseMode"u8)) + { + advertiseMode = new AdvertiseMode(property.Value.GetString()); + continue; + } + if (property.NameEquals("bgpPeers"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + bgpPeers = array; + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new ContainerOrchestratorProvisioningState(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ConnectedClusterLoadBalancerProperties( + addresses, + serviceSelector ?? new ChangeTrackingDictionary(), + advertiseMode, + bgpPeers ?? new ChangeTrackingList(), + provisioningState, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ConnectedClusterLoadBalancerProperties)} does not support writing '{options.Format}' format."); + } + } + + ConnectedClusterLoadBalancerProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeConnectedClusterLoadBalancerProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ConnectedClusterLoadBalancerProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/ConnectedClusterLoadBalancerProperties.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/ConnectedClusterLoadBalancerProperties.cs new file mode 100644 index 000000000000..97422adba4e1 --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/ConnectedClusterLoadBalancerProperties.cs @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.ContainerOrchestratorRuntime.Models +{ + /// Details of the LoadBalancer. + public partial class ConnectedClusterLoadBalancerProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// IP Range. + /// Advertise Mode. + /// is null. + public ConnectedClusterLoadBalancerProperties(IEnumerable addresses, AdvertiseMode advertiseMode) + { + Argument.AssertNotNull(addresses, nameof(addresses)); + + Addresses = addresses.ToList(); + ServiceSelector = new ChangeTrackingDictionary(); + AdvertiseMode = advertiseMode; + BgpPeers = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// IP Range. + /// A dynamic label mapping to select related services. For instance, if you want to create a load balancer only for services with label "a=b", then please specify {"a": "b"} in the field. + /// Advertise Mode. + /// The list of BGP peers it should advertise to. Null or empty means to advertise to all peers. + /// Resource provision state. + /// Keeps track of any properties unknown to the library. + internal ConnectedClusterLoadBalancerProperties(IList addresses, IDictionary serviceSelector, AdvertiseMode advertiseMode, IList bgpPeers, ContainerOrchestratorProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) + { + Addresses = addresses; + ServiceSelector = serviceSelector; + AdvertiseMode = advertiseMode; + BgpPeers = bgpPeers; + ProvisioningState = provisioningState; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ConnectedClusterLoadBalancerProperties() + { + } + + /// IP Range. + public IList Addresses { get; } + /// A dynamic label mapping to select related services. For instance, if you want to create a load balancer only for services with label "a=b", then please specify {"a": "b"} in the field. + public IDictionary ServiceSelector { get; } + /// Advertise Mode. + public AdvertiseMode AdvertiseMode { get; set; } + /// The list of BGP peers it should advertise to. Null or empty means to advertise to all peers. + public IList BgpPeers { get; } + /// Resource provision state. + public ContainerOrchestratorProvisioningState? ProvisioningState { get; } + } +} diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/ConnectedClusterServiceProperties.Serialization.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/ConnectedClusterServiceProperties.Serialization.cs new file mode 100644 index 000000000000..19a211e541f0 --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/ConnectedClusterServiceProperties.Serialization.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ContainerOrchestratorRuntime.Models +{ + public partial class ConnectedClusterServiceProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConnectedClusterServiceProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(RpObjectId)) + { + writer.WritePropertyName("rpObjectId"u8); + writer.WriteStringValue(RpObjectId.Value); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ConnectedClusterServiceProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConnectedClusterServiceProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeConnectedClusterServiceProperties(document.RootElement, options); + } + + internal static ConnectedClusterServiceProperties DeserializeConnectedClusterServiceProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Guid? rpObjectId = default; + ContainerOrchestratorProvisioningState? provisioningState = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("rpObjectId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + rpObjectId = property.Value.GetGuid(); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new ContainerOrchestratorProvisioningState(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ConnectedClusterServiceProperties(rpObjectId, provisioningState, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ConnectedClusterServiceProperties)} does not support writing '{options.Format}' format."); + } + } + + ConnectedClusterServiceProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeConnectedClusterServiceProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ConnectedClusterServiceProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/ai/Azure.AI.Inference/src/Generated/ChatCompletionsNamedToolSelection.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/ConnectedClusterServiceProperties.cs similarity index 62% rename from sdk/ai/Azure.AI.Inference/src/Generated/ChatCompletionsNamedToolSelection.cs rename to sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/ConnectedClusterServiceProperties.cs index e4848e2f0528..4d8e7debbdcd 100644 --- a/sdk/ai/Azure.AI.Inference/src/Generated/ChatCompletionsNamedToolSelection.cs +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/ConnectedClusterServiceProperties.cs @@ -8,14 +8,10 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Inference +namespace Azure.ResourceManager.ContainerOrchestratorRuntime.Models { - /// - /// An abstract representation of an explicit, named tool selection to use for a chat completions request. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include . - /// - public abstract partial class ChatCompletionsNamedToolSelection + /// Properties for the service resource. + public partial class ConnectedClusterServiceProperties { /// /// Keeps track of any properties unknown to the library. @@ -47,23 +43,27 @@ public abstract partial class ChatCompletionsNamedToolSelection /// /// /// - private protected IDictionary _serializedAdditionalRawData; + private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . - protected ChatCompletionsNamedToolSelection() + /// Initializes a new instance of . + public ConnectedClusterServiceProperties() { } - /// Initializes a new instance of . - /// The object type. + /// Initializes a new instance of . + /// The object id of the service principal of the RP provisioned in the tenant. + /// Resource provision state. /// Keeps track of any properties unknown to the library. - internal ChatCompletionsNamedToolSelection(string type, IDictionary serializedAdditionalRawData) + internal ConnectedClusterServiceProperties(Guid? rpObjectId, ContainerOrchestratorProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) { - Type = type; + RpObjectId = rpObjectId; + ProvisioningState = provisioningState; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The object type. - internal string Type { get; set; } + /// The object id of the service principal of the RP provisioned in the tenant. + public Guid? RpObjectId { get; } + /// Resource provision state. + public ContainerOrchestratorProvisioningState? ProvisioningState { get; } } } diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/ConnectedClusterStorageClassPatch.Serialization.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/ConnectedClusterStorageClassPatch.Serialization.cs new file mode 100644 index 000000000000..71da6ee5f3d4 --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/ConnectedClusterStorageClassPatch.Serialization.cs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ContainerOrchestratorRuntime.Models +{ + public partial class ConnectedClusterStorageClassPatch : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConnectedClusterStorageClassPatch)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ConnectedClusterStorageClassPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConnectedClusterStorageClassPatch)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeConnectedClusterStorageClassPatch(document.RootElement, options); + } + + internal static ConnectedClusterStorageClassPatch DeserializeConnectedClusterStorageClassPatch(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + StorageClassPropertiesUpdate properties = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = StorageClassPropertiesUpdate.DeserializeStorageClassPropertiesUpdate(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ConnectedClusterStorageClassPatch(properties, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ConnectedClusterStorageClassPatch)} does not support writing '{options.Format}' format."); + } + } + + ConnectedClusterStorageClassPatch IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeConnectedClusterStorageClassPatch(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ConnectedClusterStorageClassPatch)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/ConnectedClusterStorageClassPatch.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/ConnectedClusterStorageClassPatch.cs new file mode 100644 index 000000000000..fb05d9cbd203 --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/ConnectedClusterStorageClassPatch.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ContainerOrchestratorRuntime.Models +{ + /// The model for updating a storageClass. + public partial class ConnectedClusterStorageClassPatch + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ConnectedClusterStorageClassPatch() + { + } + + /// Initializes a new instance of . + /// The properties of StorageClass. + /// Keeps track of any properties unknown to the library. + internal ConnectedClusterStorageClassPatch(StorageClassPropertiesUpdate properties, IDictionary serializedAdditionalRawData) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The properties of StorageClass. + public StorageClassPropertiesUpdate Properties { get; set; } + } +} diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/ConnectedClusterStorageClassProperties.Serialization.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/ConnectedClusterStorageClassProperties.Serialization.cs new file mode 100644 index 000000000000..85d4caef8688 --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/ConnectedClusterStorageClassProperties.Serialization.cs @@ -0,0 +1,330 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ContainerOrchestratorRuntime.Models +{ + public partial class ConnectedClusterStorageClassProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConnectedClusterStorageClassProperties)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(AllowVolumeExpansion)) + { + writer.WritePropertyName("allowVolumeExpansion"u8); + writer.WriteStringValue(AllowVolumeExpansion.Value.ToString()); + } + if (Optional.IsCollectionDefined(MountOptions)) + { + writer.WritePropertyName("mountOptions"u8); + writer.WriteStartArray(); + foreach (var item in MountOptions) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Provisioner)) + { + writer.WritePropertyName("provisioner"u8); + writer.WriteStringValue(Provisioner); + } + if (Optional.IsDefined(VolumeBindingMode)) + { + writer.WritePropertyName("volumeBindingMode"u8); + writer.WriteStringValue(VolumeBindingMode.Value.ToString()); + } + if (Optional.IsCollectionDefined(AccessModes)) + { + writer.WritePropertyName("accessModes"u8); + writer.WriteStartArray(); + foreach (var item in AccessModes) + { + writer.WriteStringValue(item.ToString()); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(DataResilience)) + { + writer.WritePropertyName("dataResilience"u8); + writer.WriteStringValue(DataResilience.Value.ToString()); + } + if (Optional.IsDefined(FailoverSpeed)) + { + writer.WritePropertyName("failoverSpeed"u8); + writer.WriteStringValue(FailoverSpeed.Value.ToString()); + } + if (Optional.IsCollectionDefined(Limitations)) + { + writer.WritePropertyName("limitations"u8); + writer.WriteStartArray(); + foreach (var item in Limitations) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Performance)) + { + writer.WritePropertyName("performance"u8); + writer.WriteStringValue(Performance.Value.ToString()); + } + if (Optional.IsDefined(Priority)) + { + writer.WritePropertyName("priority"u8); + writer.WriteNumberValue(Priority.Value); + } + writer.WritePropertyName("typeProperties"u8); + writer.WriteObjectValue(TypeProperties, options); + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ConnectedClusterStorageClassProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConnectedClusterStorageClassProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeConnectedClusterStorageClassProperties(document.RootElement, options); + } + + internal static ConnectedClusterStorageClassProperties DeserializeConnectedClusterStorageClassProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + VolumeExpansion? allowVolumeExpansion = default; + IList mountOptions = default; + string provisioner = default; + VolumeBindingMode? volumeBindingMode = default; + IList accessModes = default; + DataResilienceTier? dataResilience = default; + FailoverTier? failoverSpeed = default; + IList limitations = default; + PerformanceTier? performance = default; + long? priority = default; + StorageClassTypeProperties typeProperties = default; + ContainerOrchestratorProvisioningState? provisioningState = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("allowVolumeExpansion"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + allowVolumeExpansion = new VolumeExpansion(property.Value.GetString()); + continue; + } + if (property.NameEquals("mountOptions"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + mountOptions = array; + continue; + } + if (property.NameEquals("provisioner"u8)) + { + provisioner = property.Value.GetString(); + continue; + } + if (property.NameEquals("volumeBindingMode"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + volumeBindingMode = new VolumeBindingMode(property.Value.GetString()); + continue; + } + if (property.NameEquals("accessModes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(new StorageClassAccessMode(item.GetString())); + } + accessModes = array; + continue; + } + if (property.NameEquals("dataResilience"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dataResilience = new DataResilienceTier(property.Value.GetString()); + continue; + } + if (property.NameEquals("failoverSpeed"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + failoverSpeed = new FailoverTier(property.Value.GetString()); + continue; + } + if (property.NameEquals("limitations"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + limitations = array; + continue; + } + if (property.NameEquals("performance"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + performance = new PerformanceTier(property.Value.GetString()); + continue; + } + if (property.NameEquals("priority"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + priority = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("typeProperties"u8)) + { + typeProperties = StorageClassTypeProperties.DeserializeStorageClassTypeProperties(property.Value, options); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new ContainerOrchestratorProvisioningState(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ConnectedClusterStorageClassProperties( + allowVolumeExpansion, + mountOptions ?? new ChangeTrackingList(), + provisioner, + volumeBindingMode, + accessModes ?? new ChangeTrackingList(), + dataResilience, + failoverSpeed, + limitations ?? new ChangeTrackingList(), + performance, + priority, + typeProperties, + provisioningState, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ConnectedClusterStorageClassProperties)} does not support writing '{options.Format}' format."); + } + } + + ConnectedClusterStorageClassProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeConnectedClusterStorageClassProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ConnectedClusterStorageClassProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/ConnectedClusterStorageClassProperties.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/ConnectedClusterStorageClassProperties.cs new file mode 100644 index 000000000000..38485378322d --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/ConnectedClusterStorageClassProperties.cs @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ContainerOrchestratorRuntime.Models +{ + /// Details of the StorageClass StorageClass. + public partial class ConnectedClusterStorageClassProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// + /// Properties of the StorageClass + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , , , and . + /// + /// is null. + public ConnectedClusterStorageClassProperties(StorageClassTypeProperties typeProperties) + { + Argument.AssertNotNull(typeProperties, nameof(typeProperties)); + + MountOptions = new ChangeTrackingList(); + AccessModes = new ChangeTrackingList(); + Limitations = new ChangeTrackingList(); + TypeProperties = typeProperties; + } + + /// Initializes a new instance of . + /// Volume can be expanded or not. + /// Additional mount options. + /// Provisioner name. + /// Binding mode of volumes: Immediate, WaitForFirstConsumer. + /// The access mode: [ReadWriteOnce, ReadWriteMany] or [ReadWriteOnce]. + /// Allow single data node failure. + /// Failover speed: NA, Slow, Fast. + /// Limitations of the storage class. + /// Performance tier. + /// Selection priority when multiple storage classes meet the criteria. 0: Highest, -1: Never use. + /// + /// Properties of the StorageClass + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , , , and . + /// + /// Resource provision state. + /// Keeps track of any properties unknown to the library. + internal ConnectedClusterStorageClassProperties(VolumeExpansion? allowVolumeExpansion, IList mountOptions, string provisioner, VolumeBindingMode? volumeBindingMode, IList accessModes, DataResilienceTier? dataResilience, FailoverTier? failoverSpeed, IList limitations, PerformanceTier? performance, long? priority, StorageClassTypeProperties typeProperties, ContainerOrchestratorProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) + { + AllowVolumeExpansion = allowVolumeExpansion; + MountOptions = mountOptions; + Provisioner = provisioner; + VolumeBindingMode = volumeBindingMode; + AccessModes = accessModes; + DataResilience = dataResilience; + FailoverSpeed = failoverSpeed; + Limitations = limitations; + Performance = performance; + Priority = priority; + TypeProperties = typeProperties; + ProvisioningState = provisioningState; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ConnectedClusterStorageClassProperties() + { + } + + /// Volume can be expanded or not. + public VolumeExpansion? AllowVolumeExpansion { get; set; } + /// Additional mount options. + public IList MountOptions { get; } + /// Provisioner name. + public string Provisioner { get; set; } + /// Binding mode of volumes: Immediate, WaitForFirstConsumer. + public VolumeBindingMode? VolumeBindingMode { get; set; } + /// The access mode: [ReadWriteOnce, ReadWriteMany] or [ReadWriteOnce]. + public IList AccessModes { get; } + /// Allow single data node failure. + public DataResilienceTier? DataResilience { get; set; } + /// Failover speed: NA, Slow, Fast. + public FailoverTier? FailoverSpeed { get; set; } + /// Limitations of the storage class. + public IList Limitations { get; } + /// Performance tier. + public PerformanceTier? Performance { get; set; } + /// Selection priority when multiple storage classes meet the criteria. 0: Highest, -1: Never use. + public long? Priority { get; set; } + /// + /// Properties of the StorageClass + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , , , and . + /// + public StorageClassTypeProperties TypeProperties { get; set; } + /// Resource provision state. + public ContainerOrchestratorProvisioningState? ProvisioningState { get; } + } +} diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/ContainerOrchestratorProvisioningState.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/ContainerOrchestratorProvisioningState.cs new file mode 100644 index 000000000000..4fd15f8768c8 --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/ContainerOrchestratorProvisioningState.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ContainerOrchestratorRuntime.Models +{ + /// The status of the current operation. + public readonly partial struct ContainerOrchestratorProvisioningState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ContainerOrchestratorProvisioningState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SucceededValue = "Succeeded"; + private const string FailedValue = "Failed"; + private const string CanceledValue = "Canceled"; + private const string ProvisioningValue = "Provisioning"; + private const string UpdatingValue = "Updating"; + private const string DeletingValue = "Deleting"; + private const string AcceptedValue = "Accepted"; + + /// Resource has been created. + public static ContainerOrchestratorProvisioningState Succeeded { get; } = new ContainerOrchestratorProvisioningState(SucceededValue); + /// Resource creation failed. + public static ContainerOrchestratorProvisioningState Failed { get; } = new ContainerOrchestratorProvisioningState(FailedValue); + /// Resource creation was canceled. + public static ContainerOrchestratorProvisioningState Canceled { get; } = new ContainerOrchestratorProvisioningState(CanceledValue); + /// Initial provisioning in progress. + public static ContainerOrchestratorProvisioningState Provisioning { get; } = new ContainerOrchestratorProvisioningState(ProvisioningValue); + /// Update in progress. + public static ContainerOrchestratorProvisioningState Updating { get; } = new ContainerOrchestratorProvisioningState(UpdatingValue); + /// Deletion in progress. + public static ContainerOrchestratorProvisioningState Deleting { get; } = new ContainerOrchestratorProvisioningState(DeletingValue); + /// Change accepted for processing. + public static ContainerOrchestratorProvisioningState Accepted { get; } = new ContainerOrchestratorProvisioningState(AcceptedValue); + /// Determines if two values are the same. + public static bool operator ==(ContainerOrchestratorProvisioningState left, ContainerOrchestratorProvisioningState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ContainerOrchestratorProvisioningState left, ContainerOrchestratorProvisioningState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ContainerOrchestratorProvisioningState(string value) => new ContainerOrchestratorProvisioningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ContainerOrchestratorProvisioningState other && Equals(other); + /// + public bool Equals(ContainerOrchestratorProvisioningState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/DataResilienceTier.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/DataResilienceTier.cs new file mode 100644 index 000000000000..cf1e7d79602e --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/DataResilienceTier.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ContainerOrchestratorRuntime.Models +{ + /// Data resilience tier of a storage class. + public readonly partial struct DataResilienceTier : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DataResilienceTier(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NotDataResilientValue = "NotDataResilient"; + private const string DataResilientValue = "DataResilient"; + + /// Not data resilient. + public static DataResilienceTier NotDataResilient { get; } = new DataResilienceTier(NotDataResilientValue); + /// Data resilient. + public static DataResilienceTier DataResilient { get; } = new DataResilienceTier(DataResilientValue); + /// Determines if two values are the same. + public static bool operator ==(DataResilienceTier left, DataResilienceTier right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DataResilienceTier left, DataResilienceTier right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator DataResilienceTier(string value) => new DataResilienceTier(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DataResilienceTier other && Equals(other); + /// + public bool Equals(DataResilienceTier other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/FailoverTier.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/FailoverTier.cs new file mode 100644 index 000000000000..33a052ba1c05 --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/FailoverTier.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ContainerOrchestratorRuntime.Models +{ + /// Failover tier of a storage class. + public readonly partial struct FailoverTier : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public FailoverTier(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NotAvailableValue = "NotAvailable"; + private const string SlowValue = "Slow"; + private const string FastValue = "Fast"; + private const string SuperValue = "Super"; + + /// Not available Failover Tier. + public static FailoverTier NotAvailable { get; } = new FailoverTier(NotAvailableValue); + /// Slow Failover Tier. + public static FailoverTier Slow { get; } = new FailoverTier(SlowValue); + /// Fast Failover Tier. + public static FailoverTier Fast { get; } = new FailoverTier(FastValue); + /// Super Failover Tier. + public static FailoverTier Super { get; } = new FailoverTier(SuperValue); + /// Determines if two values are the same. + public static bool operator ==(FailoverTier left, FailoverTier right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(FailoverTier left, FailoverTier right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator FailoverTier(string value) => new FailoverTier(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is FailoverTier other && Equals(other); + /// + public bool Equals(FailoverTier other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/LoadBalancerListResult.Serialization.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/LoadBalancerListResult.Serialization.cs new file mode 100644 index 000000000000..7c24e3ae2066 --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/LoadBalancerListResult.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ContainerOrchestratorRuntime.Models +{ + internal partial class LoadBalancerListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(LoadBalancerListResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + LoadBalancerListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(LoadBalancerListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeLoadBalancerListResult(document.RootElement, options); + } + + internal static LoadBalancerListResult DeserializeLoadBalancerListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ConnectedClusterLoadBalancerData.DeserializeConnectedClusterLoadBalancerData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new LoadBalancerListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(LoadBalancerListResult)} does not support writing '{options.Format}' format."); + } + } + + LoadBalancerListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeLoadBalancerListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(LoadBalancerListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/LoadBalancerListResult.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/LoadBalancerListResult.cs new file mode 100644 index 000000000000..57c5985deef7 --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/LoadBalancerListResult.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.ContainerOrchestratorRuntime.Models +{ + /// The response of a LoadBalancer list operation. + internal partial class LoadBalancerListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The LoadBalancer items on this page. + /// is null. + internal LoadBalancerListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The LoadBalancer items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal LoadBalancerListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal LoadBalancerListResult() + { + } + + /// The LoadBalancer items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/NativeStorageClassTypeProperties.Serialization.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/NativeStorageClassTypeProperties.Serialization.cs new file mode 100644 index 000000000000..67cfac9d571b --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/NativeStorageClassTypeProperties.Serialization.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ContainerOrchestratorRuntime.Models +{ + public partial class NativeStorageClassTypeProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NativeStorageClassTypeProperties)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + NativeStorageClassTypeProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NativeStorageClassTypeProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeNativeStorageClassTypeProperties(document.RootElement, options); + } + + internal static NativeStorageClassTypeProperties DeserializeNativeStorageClassTypeProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + StorageClassType type = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type"u8)) + { + type = new StorageClassType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new NativeStorageClassTypeProperties(type, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(NativeStorageClassTypeProperties)} does not support writing '{options.Format}' format."); + } + } + + NativeStorageClassTypeProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeNativeStorageClassTypeProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(NativeStorageClassTypeProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/NativeStorageClassTypeProperties.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/NativeStorageClassTypeProperties.cs new file mode 100644 index 000000000000..77801f1345e7 --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/NativeStorageClassTypeProperties.cs @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ContainerOrchestratorRuntime.Models +{ + /// The properties of Native StorageClass. + public partial class NativeStorageClassTypeProperties : StorageClassTypeProperties + { + /// Initializes a new instance of . + public NativeStorageClassTypeProperties() + { + Type = StorageClassType.Native; + } + + /// Initializes a new instance of . + /// Type of the storage class. + /// Keeps track of any properties unknown to the library. + internal NativeStorageClassTypeProperties(StorageClassType type, IDictionary serializedAdditionalRawData) : base(type, serializedAdditionalRawData) + { + Type = type; + } + } +} diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/NfsDirectoryActionOnVolumeDeletion.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/NfsDirectoryActionOnVolumeDeletion.cs new file mode 100644 index 000000000000..050175aeb6fb --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/NfsDirectoryActionOnVolumeDeletion.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ContainerOrchestratorRuntime.Models +{ + /// The action to take when a NFS volume is deleted. + public readonly partial struct NfsDirectoryActionOnVolumeDeletion : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public NfsDirectoryActionOnVolumeDeletion(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string DeleteValue = "Delete"; + private const string RetainValue = "Retain"; + + /// When the volume is deleted, delete the directory. + public static NfsDirectoryActionOnVolumeDeletion Delete { get; } = new NfsDirectoryActionOnVolumeDeletion(DeleteValue); + /// When the volume is deleted, retain the directory. + public static NfsDirectoryActionOnVolumeDeletion Retain { get; } = new NfsDirectoryActionOnVolumeDeletion(RetainValue); + /// Determines if two values are the same. + public static bool operator ==(NfsDirectoryActionOnVolumeDeletion left, NfsDirectoryActionOnVolumeDeletion right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(NfsDirectoryActionOnVolumeDeletion left, NfsDirectoryActionOnVolumeDeletion right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator NfsDirectoryActionOnVolumeDeletion(string value) => new NfsDirectoryActionOnVolumeDeletion(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is NfsDirectoryActionOnVolumeDeletion other && Equals(other); + /// + public bool Equals(NfsDirectoryActionOnVolumeDeletion other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/NfsStorageClassTypeProperties.Serialization.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/NfsStorageClassTypeProperties.Serialization.cs new file mode 100644 index 000000000000..084d515f71fa --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/NfsStorageClassTypeProperties.Serialization.cs @@ -0,0 +1,170 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ContainerOrchestratorRuntime.Models +{ + public partial class NfsStorageClassTypeProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NfsStorageClassTypeProperties)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("server"u8); + writer.WriteStringValue(Server); + writer.WritePropertyName("share"u8); + writer.WriteStringValue(Share); + if (Optional.IsDefined(SubDir)) + { + writer.WritePropertyName("subDir"u8); + writer.WriteStringValue(SubDir); + } + if (Optional.IsDefined(MountPermissions)) + { + writer.WritePropertyName("mountPermissions"u8); + writer.WriteStringValue(MountPermissions); + } + if (Optional.IsDefined(OnDelete)) + { + writer.WritePropertyName("onDelete"u8); + writer.WriteStringValue(OnDelete.Value.ToString()); + } + } + + NfsStorageClassTypeProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NfsStorageClassTypeProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeNfsStorageClassTypeProperties(document.RootElement, options); + } + + internal static NfsStorageClassTypeProperties DeserializeNfsStorageClassTypeProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string server = default; + string share = default; + string subDir = default; + string mountPermissions = default; + NfsDirectoryActionOnVolumeDeletion? onDelete = default; + StorageClassType type = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("server"u8)) + { + server = property.Value.GetString(); + continue; + } + if (property.NameEquals("share"u8)) + { + share = property.Value.GetString(); + continue; + } + if (property.NameEquals("subDir"u8)) + { + subDir = property.Value.GetString(); + continue; + } + if (property.NameEquals("mountPermissions"u8)) + { + mountPermissions = property.Value.GetString(); + continue; + } + if (property.NameEquals("onDelete"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + onDelete = new NfsDirectoryActionOnVolumeDeletion(property.Value.GetString()); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new StorageClassType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new NfsStorageClassTypeProperties( + type, + serializedAdditionalRawData, + server, + share, + subDir, + mountPermissions, + onDelete); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(NfsStorageClassTypeProperties)} does not support writing '{options.Format}' format."); + } + } + + NfsStorageClassTypeProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeNfsStorageClassTypeProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(NfsStorageClassTypeProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/NfsStorageClassTypeProperties.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/NfsStorageClassTypeProperties.cs new file mode 100644 index 000000000000..76deccf83be2 --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/NfsStorageClassTypeProperties.cs @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ContainerOrchestratorRuntime.Models +{ + /// The properties of NFS StorageClass. + public partial class NfsStorageClassTypeProperties : StorageClassTypeProperties + { + /// Initializes a new instance of . + /// NFS Server. + /// NFS share. + /// or is null. + public NfsStorageClassTypeProperties(string server, string share) + { + Argument.AssertNotNull(server, nameof(server)); + Argument.AssertNotNull(share, nameof(share)); + + Server = server; + Share = share; + Type = StorageClassType.Nfs; + } + + /// Initializes a new instance of . + /// Type of the storage class. + /// Keeps track of any properties unknown to the library. + /// NFS Server. + /// NFS share. + /// Sub directory under share. If the sub directory doesn't exist, driver will create it. + /// Mounted folder permissions. Default is 0. If set as non-zero, driver will perform `chmod` after mount. + /// The action to take when a NFS volume is deleted. Default is Delete. + internal NfsStorageClassTypeProperties(StorageClassType type, IDictionary serializedAdditionalRawData, string server, string share, string subDir, string mountPermissions, NfsDirectoryActionOnVolumeDeletion? onDelete) : base(type, serializedAdditionalRawData) + { + Server = server; + Share = share; + SubDir = subDir; + MountPermissions = mountPermissions; + OnDelete = onDelete; + Type = type; + } + + /// Initializes a new instance of for deserialization. + internal NfsStorageClassTypeProperties() + { + } + + /// NFS Server. + public string Server { get; set; } + /// NFS share. + public string Share { get; set; } + /// Sub directory under share. If the sub directory doesn't exist, driver will create it. + public string SubDir { get; set; } + /// Mounted folder permissions. Default is 0. If set as non-zero, driver will perform `chmod` after mount. + public string MountPermissions { get; set; } + /// The action to take when a NFS volume is deleted. Default is Delete. + public NfsDirectoryActionOnVolumeDeletion? OnDelete { get; set; } + } +} diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/PerformanceTier.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/PerformanceTier.cs new file mode 100644 index 000000000000..f99d4a63a4e4 --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/PerformanceTier.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ContainerOrchestratorRuntime.Models +{ + /// Performance tier of a storage class. + public readonly partial struct PerformanceTier : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public PerformanceTier(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string UndefinedValue = "Undefined"; + private const string BasicValue = "Basic"; + private const string StandardValue = "Standard"; + private const string PremiumValue = "Premium"; + private const string UltraValue = "Ultra"; + + /// Undefined Performance Tier. + public static PerformanceTier Undefined { get; } = new PerformanceTier(UndefinedValue); + /// Basic Performance Tier. + public static PerformanceTier Basic { get; } = new PerformanceTier(BasicValue); + /// Standard Performance Tier. + public static PerformanceTier Standard { get; } = new PerformanceTier(StandardValue); + /// Premium Performance Tier. + public static PerformanceTier Premium { get; } = new PerformanceTier(PremiumValue); + /// Ultra Performance Tier. + public static PerformanceTier Ultra { get; } = new PerformanceTier(UltraValue); + /// Determines if two values are the same. + public static bool operator ==(PerformanceTier left, PerformanceTier right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(PerformanceTier left, PerformanceTier right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator PerformanceTier(string value) => new PerformanceTier(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is PerformanceTier other && Equals(other); + /// + public bool Equals(PerformanceTier other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/RwxStorageClassTypeProperties.Serialization.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/RwxStorageClassTypeProperties.Serialization.cs new file mode 100644 index 000000000000..d4dc04ffd042 --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/RwxStorageClassTypeProperties.Serialization.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ContainerOrchestratorRuntime.Models +{ + public partial class RwxStorageClassTypeProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RwxStorageClassTypeProperties)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("backingStorageClassName"u8); + writer.WriteStringValue(BackingStorageClassName); + } + + RwxStorageClassTypeProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RwxStorageClassTypeProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeRwxStorageClassTypeProperties(document.RootElement, options); + } + + internal static RwxStorageClassTypeProperties DeserializeRwxStorageClassTypeProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string backingStorageClassName = default; + StorageClassType type = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("backingStorageClassName"u8)) + { + backingStorageClassName = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new StorageClassType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new RwxStorageClassTypeProperties(type, serializedAdditionalRawData, backingStorageClassName); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(RwxStorageClassTypeProperties)} does not support writing '{options.Format}' format."); + } + } + + RwxStorageClassTypeProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeRwxStorageClassTypeProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(RwxStorageClassTypeProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/RwxStorageClassTypeProperties.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/RwxStorageClassTypeProperties.cs new file mode 100644 index 000000000000..265f0aa0cab1 --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/RwxStorageClassTypeProperties.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ContainerOrchestratorRuntime.Models +{ + /// The properties of RWX StorageClass. + public partial class RwxStorageClassTypeProperties : StorageClassTypeProperties + { + /// Initializes a new instance of . + /// The backing storageclass used to create new storageclass. + /// is null. + public RwxStorageClassTypeProperties(string backingStorageClassName) + { + Argument.AssertNotNull(backingStorageClassName, nameof(backingStorageClassName)); + + BackingStorageClassName = backingStorageClassName; + Type = StorageClassType.Rwx; + } + + /// Initializes a new instance of . + /// Type of the storage class. + /// Keeps track of any properties unknown to the library. + /// The backing storageclass used to create new storageclass. + internal RwxStorageClassTypeProperties(StorageClassType type, IDictionary serializedAdditionalRawData, string backingStorageClassName) : base(type, serializedAdditionalRawData) + { + BackingStorageClassName = backingStorageClassName; + Type = type; + } + + /// Initializes a new instance of for deserialization. + internal RwxStorageClassTypeProperties() + { + } + + /// The backing storageclass used to create new storageclass. + public string BackingStorageClassName { get; set; } + } +} diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/ServiceResourceListResult.Serialization.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/ServiceResourceListResult.Serialization.cs new file mode 100644 index 000000000000..e3fb2428249c --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/ServiceResourceListResult.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ContainerOrchestratorRuntime.Models +{ + internal partial class ServiceResourceListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ServiceResourceListResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ServiceResourceListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ServiceResourceListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeServiceResourceListResult(document.RootElement, options); + } + + internal static ServiceResourceListResult DeserializeServiceResourceListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ConnectedClusterServiceData.DeserializeConnectedClusterServiceData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ServiceResourceListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ServiceResourceListResult)} does not support writing '{options.Format}' format."); + } + } + + ServiceResourceListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeServiceResourceListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ServiceResourceListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/ServiceResourceListResult.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/ServiceResourceListResult.cs new file mode 100644 index 000000000000..76bf3d695cb9 --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/ServiceResourceListResult.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.ContainerOrchestratorRuntime.Models +{ + /// The response of a ServiceResource list operation. + internal partial class ServiceResourceListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The ServiceResource items on this page. + /// is null. + internal ServiceResourceListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The ServiceResource items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal ServiceResourceListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ServiceResourceListResult() + { + } + + /// The ServiceResource items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/SmbStorageClassTypeProperties.Serialization.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/SmbStorageClassTypeProperties.Serialization.cs new file mode 100644 index 000000000000..876ea6397191 --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/SmbStorageClassTypeProperties.Serialization.cs @@ -0,0 +1,169 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ContainerOrchestratorRuntime.Models +{ + public partial class SmbStorageClassTypeProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SmbStorageClassTypeProperties)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("source"u8); + writer.WriteStringValue(Source); + if (Optional.IsDefined(SubDir)) + { + writer.WritePropertyName("subDir"u8); + writer.WriteStringValue(SubDir); + } + if (Optional.IsDefined(Username)) + { + writer.WritePropertyName("username"u8); + writer.WriteStringValue(Username); + } + if (Optional.IsDefined(Password)) + { + writer.WritePropertyName("password"u8); + writer.WriteStringValue(Password); + } + if (Optional.IsDefined(Domain)) + { + writer.WritePropertyName("domain"u8); + writer.WriteStringValue(Domain); + } + } + + SmbStorageClassTypeProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SmbStorageClassTypeProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSmbStorageClassTypeProperties(document.RootElement, options); + } + + internal static SmbStorageClassTypeProperties DeserializeSmbStorageClassTypeProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string source = default; + string subDir = default; + string username = default; + string password = default; + string domain = default; + StorageClassType type = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("source"u8)) + { + source = property.Value.GetString(); + continue; + } + if (property.NameEquals("subDir"u8)) + { + subDir = property.Value.GetString(); + continue; + } + if (property.NameEquals("username"u8)) + { + username = property.Value.GetString(); + continue; + } + if (property.NameEquals("password"u8)) + { + password = property.Value.GetString(); + continue; + } + if (property.NameEquals("domain"u8)) + { + domain = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new StorageClassType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SmbStorageClassTypeProperties( + type, + serializedAdditionalRawData, + source, + subDir, + username, + password, + domain); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SmbStorageClassTypeProperties)} does not support writing '{options.Format}' format."); + } + } + + SmbStorageClassTypeProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeSmbStorageClassTypeProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SmbStorageClassTypeProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/SmbStorageClassTypeProperties.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/SmbStorageClassTypeProperties.cs new file mode 100644 index 000000000000..e9b94101fd7d --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/SmbStorageClassTypeProperties.cs @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ContainerOrchestratorRuntime.Models +{ + /// The properties of SMB StorageClass. + public partial class SmbStorageClassTypeProperties : StorageClassTypeProperties + { + /// Initializes a new instance of . + /// SMB Source. + /// is null. + public SmbStorageClassTypeProperties(string source) + { + Argument.AssertNotNull(source, nameof(source)); + + Source = source; + Type = StorageClassType.Smb; + } + + /// Initializes a new instance of . + /// Type of the storage class. + /// Keeps track of any properties unknown to the library. + /// SMB Source. + /// Sub directory under share. If the sub directory doesn't exist, driver will create it. + /// Server username. + /// Server password. + /// Server domain. + internal SmbStorageClassTypeProperties(StorageClassType type, IDictionary serializedAdditionalRawData, string source, string subDir, string username, string password, string domain) : base(type, serializedAdditionalRawData) + { + Source = source; + SubDir = subDir; + Username = username; + Password = password; + Domain = domain; + Type = type; + } + + /// Initializes a new instance of for deserialization. + internal SmbStorageClassTypeProperties() + { + } + + /// SMB Source. + public string Source { get; set; } + /// Sub directory under share. If the sub directory doesn't exist, driver will create it. + public string SubDir { get; set; } + /// Server username. + public string Username { get; set; } + /// Server password. + public string Password { get; set; } + /// Server domain. + public string Domain { get; set; } + } +} diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/StorageClassAccessMode.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/StorageClassAccessMode.cs new file mode 100644 index 000000000000..a05429209c06 --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/StorageClassAccessMode.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ContainerOrchestratorRuntime.Models +{ + /// Storage Class Access Mode. + public readonly partial struct StorageClassAccessMode : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public StorageClassAccessMode(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ReadWriteOnceValue = "ReadWriteOnce"; + private const string ReadWriteManyValue = "ReadWriteMany"; + + /// Read Write Once (RWO) access mode. + public static StorageClassAccessMode ReadWriteOnce { get; } = new StorageClassAccessMode(ReadWriteOnceValue); + /// Read Write Many (RWX) access mode. + public static StorageClassAccessMode ReadWriteMany { get; } = new StorageClassAccessMode(ReadWriteManyValue); + /// Determines if two values are the same. + public static bool operator ==(StorageClassAccessMode left, StorageClassAccessMode right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(StorageClassAccessMode left, StorageClassAccessMode right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator StorageClassAccessMode(string value) => new StorageClassAccessMode(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is StorageClassAccessMode other && Equals(other); + /// + public bool Equals(StorageClassAccessMode other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/StorageClassPropertiesUpdate.Serialization.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/StorageClassPropertiesUpdate.Serialization.cs new file mode 100644 index 000000000000..c612c0c1aa79 --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/StorageClassPropertiesUpdate.Serialization.cs @@ -0,0 +1,293 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ContainerOrchestratorRuntime.Models +{ + public partial class StorageClassPropertiesUpdate : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(StorageClassPropertiesUpdate)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(AllowVolumeExpansion)) + { + writer.WritePropertyName("allowVolumeExpansion"u8); + writer.WriteStringValue(AllowVolumeExpansion.Value.ToString()); + } + if (Optional.IsCollectionDefined(MountOptions)) + { + writer.WritePropertyName("mountOptions"u8); + writer.WriteStartArray(); + foreach (var item in MountOptions) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(AccessModes)) + { + writer.WritePropertyName("accessModes"u8); + writer.WriteStartArray(); + foreach (var item in AccessModes) + { + writer.WriteStringValue(item.ToString()); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(DataResilience)) + { + writer.WritePropertyName("dataResilience"u8); + writer.WriteStringValue(DataResilience.Value.ToString()); + } + if (Optional.IsDefined(FailoverSpeed)) + { + writer.WritePropertyName("failoverSpeed"u8); + writer.WriteStringValue(FailoverSpeed.Value.ToString()); + } + if (Optional.IsCollectionDefined(Limitations)) + { + writer.WritePropertyName("limitations"u8); + writer.WriteStartArray(); + foreach (var item in Limitations) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Performance)) + { + writer.WritePropertyName("performance"u8); + writer.WriteStringValue(Performance.Value.ToString()); + } + if (Optional.IsDefined(Priority)) + { + writer.WritePropertyName("priority"u8); + writer.WriteNumberValue(Priority.Value); + } + if (Optional.IsDefined(TypeProperties)) + { + writer.WritePropertyName("typeProperties"u8); + writer.WriteObjectValue(TypeProperties, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + StorageClassPropertiesUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(StorageClassPropertiesUpdate)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeStorageClassPropertiesUpdate(document.RootElement, options); + } + + internal static StorageClassPropertiesUpdate DeserializeStorageClassPropertiesUpdate(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + VolumeExpansion? allowVolumeExpansion = default; + IList mountOptions = default; + IList accessModes = default; + DataResilienceTier? dataResilience = default; + FailoverTier? failoverSpeed = default; + IList limitations = default; + PerformanceTier? performance = default; + long? priority = default; + StorageClassTypePropertiesUpdate typeProperties = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("allowVolumeExpansion"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + allowVolumeExpansion = new VolumeExpansion(property.Value.GetString()); + continue; + } + if (property.NameEquals("mountOptions"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + mountOptions = array; + continue; + } + if (property.NameEquals("accessModes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(new StorageClassAccessMode(item.GetString())); + } + accessModes = array; + continue; + } + if (property.NameEquals("dataResilience"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dataResilience = new DataResilienceTier(property.Value.GetString()); + continue; + } + if (property.NameEquals("failoverSpeed"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + failoverSpeed = new FailoverTier(property.Value.GetString()); + continue; + } + if (property.NameEquals("limitations"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + limitations = array; + continue; + } + if (property.NameEquals("performance"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + performance = new PerformanceTier(property.Value.GetString()); + continue; + } + if (property.NameEquals("priority"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + priority = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("typeProperties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + typeProperties = StorageClassTypePropertiesUpdate.DeserializeStorageClassTypePropertiesUpdate(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new StorageClassPropertiesUpdate( + allowVolumeExpansion, + mountOptions ?? new ChangeTrackingList(), + accessModes ?? new ChangeTrackingList(), + dataResilience, + failoverSpeed, + limitations ?? new ChangeTrackingList(), + performance, + priority, + typeProperties, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(StorageClassPropertiesUpdate)} does not support writing '{options.Format}' format."); + } + } + + StorageClassPropertiesUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeStorageClassPropertiesUpdate(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(StorageClassPropertiesUpdate)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/StorageClassPropertiesUpdate.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/StorageClassPropertiesUpdate.cs new file mode 100644 index 000000000000..16e8bfd14f42 --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/StorageClassPropertiesUpdate.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ContainerOrchestratorRuntime.Models +{ + /// The model for updating storageClass properties. + public partial class StorageClassPropertiesUpdate + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public StorageClassPropertiesUpdate() + { + MountOptions = new ChangeTrackingList(); + AccessModes = new ChangeTrackingList(); + Limitations = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Volume can be expanded or not. + /// Additional mount options. + /// The access mode: [ReadWriteOnce, ReadWriteMany] or [ReadWriteOnce]. + /// Allow single data node failure. + /// Failover speed: NA, Slow, Fast. + /// Limitations of the storage class. + /// Performance tier. + /// Selection priority when multiple storage classes meet the criteria. 0: Highest, -1: Never use. + /// New storage class type of storageClass. + /// Keeps track of any properties unknown to the library. + internal StorageClassPropertiesUpdate(VolumeExpansion? allowVolumeExpansion, IList mountOptions, IList accessModes, DataResilienceTier? dataResilience, FailoverTier? failoverSpeed, IList limitations, PerformanceTier? performance, long? priority, StorageClassTypePropertiesUpdate typeProperties, IDictionary serializedAdditionalRawData) + { + AllowVolumeExpansion = allowVolumeExpansion; + MountOptions = mountOptions; + AccessModes = accessModes; + DataResilience = dataResilience; + FailoverSpeed = failoverSpeed; + Limitations = limitations; + Performance = performance; + Priority = priority; + TypeProperties = typeProperties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Volume can be expanded or not. + public VolumeExpansion? AllowVolumeExpansion { get; set; } + /// Additional mount options. + public IList MountOptions { get; } + /// The access mode: [ReadWriteOnce, ReadWriteMany] or [ReadWriteOnce]. + public IList AccessModes { get; } + /// Allow single data node failure. + public DataResilienceTier? DataResilience { get; set; } + /// Failover speed: NA, Slow, Fast. + public FailoverTier? FailoverSpeed { get; set; } + /// Limitations of the storage class. + public IList Limitations { get; } + /// Performance tier. + public PerformanceTier? Performance { get; set; } + /// Selection priority when multiple storage classes meet the criteria. 0: Highest, -1: Never use. + public long? Priority { get; set; } + /// New storage class type of storageClass. + public StorageClassTypePropertiesUpdate TypeProperties { get; set; } + } +} diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/StorageClassResourceListResult.Serialization.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/StorageClassResourceListResult.Serialization.cs new file mode 100644 index 000000000000..0a06507b9e20 --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/StorageClassResourceListResult.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ContainerOrchestratorRuntime.Models +{ + internal partial class StorageClassResourceListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(StorageClassResourceListResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + StorageClassResourceListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(StorageClassResourceListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeStorageClassResourceListResult(document.RootElement, options); + } + + internal static StorageClassResourceListResult DeserializeStorageClassResourceListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ConnectedClusterStorageClassData.DeserializeConnectedClusterStorageClassData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new StorageClassResourceListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(StorageClassResourceListResult)} does not support writing '{options.Format}' format."); + } + } + + StorageClassResourceListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeStorageClassResourceListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(StorageClassResourceListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/StorageClassResourceListResult.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/StorageClassResourceListResult.cs new file mode 100644 index 000000000000..3b009ba86c99 --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/StorageClassResourceListResult.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.ContainerOrchestratorRuntime.Models +{ + /// The response of a StorageClassResource list operation. + internal partial class StorageClassResourceListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The StorageClassResource items on this page. + /// is null. + internal StorageClassResourceListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The StorageClassResource items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal StorageClassResourceListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal StorageClassResourceListResult() + { + } + + /// The StorageClassResource items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/StorageClassType.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/StorageClassType.cs new file mode 100644 index 000000000000..ceee73733c39 --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/StorageClassType.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ContainerOrchestratorRuntime.Models +{ + /// Type of a storage class. + internal readonly partial struct StorageClassType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public StorageClassType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NativeValue = "Native"; + private const string RwxValue = "RWX"; + private const string BlobValue = "Blob"; + private const string NfsValue = "NFS"; + private const string SmbValue = "SMB"; + + /// Native storage class. + public static StorageClassType Native { get; } = new StorageClassType(NativeValue); + /// RWX storage class. + public static StorageClassType Rwx { get; } = new StorageClassType(RwxValue); + /// Blob storage class. + public static StorageClassType Blob { get; } = new StorageClassType(BlobValue); + /// NFS storage class. + public static StorageClassType Nfs { get; } = new StorageClassType(NfsValue); + /// SMB storage class. + public static StorageClassType Smb { get; } = new StorageClassType(SmbValue); + /// Determines if two values are the same. + public static bool operator ==(StorageClassType left, StorageClassType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(StorageClassType left, StorageClassType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator StorageClassType(string value) => new StorageClassType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is StorageClassType other && Equals(other); + /// + public bool Equals(StorageClassType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/StorageClassTypeProperties.Serialization.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/StorageClassTypeProperties.Serialization.cs new file mode 100644 index 000000000000..172388b6b1cf --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/StorageClassTypeProperties.Serialization.cs @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ContainerOrchestratorRuntime.Models +{ + [PersistableModelProxy(typeof(UnknownStorageClassTypeProperties))] + public partial class StorageClassTypeProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(StorageClassTypeProperties)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type.ToString()); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + StorageClassTypeProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(StorageClassTypeProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeStorageClassTypeProperties(document.RootElement, options); + } + + internal static StorageClassTypeProperties DeserializeStorageClassTypeProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("type", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "Blob": return BlobStorageClassTypeProperties.DeserializeBlobStorageClassTypeProperties(element, options); + case "Native": return NativeStorageClassTypeProperties.DeserializeNativeStorageClassTypeProperties(element, options); + case "NFS": return NfsStorageClassTypeProperties.DeserializeNfsStorageClassTypeProperties(element, options); + case "RWX": return RwxStorageClassTypeProperties.DeserializeRwxStorageClassTypeProperties(element, options); + case "SMB": return SmbStorageClassTypeProperties.DeserializeSmbStorageClassTypeProperties(element, options); + } + } + return UnknownStorageClassTypeProperties.DeserializeUnknownStorageClassTypeProperties(element, options); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(StorageClassTypeProperties)} does not support writing '{options.Format}' format."); + } + } + + StorageClassTypeProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeStorageClassTypeProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(StorageClassTypeProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/StorageClassTypeProperties.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/StorageClassTypeProperties.cs new file mode 100644 index 000000000000..209dff83e7a4 --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/StorageClassTypeProperties.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ContainerOrchestratorRuntime.Models +{ + /// + /// The properties of storage class of the StorageClass + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , , , and . + /// + public abstract partial class StorageClassTypeProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private protected IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + protected StorageClassTypeProperties() + { + } + + /// Initializes a new instance of . + /// Type of the storage class. + /// Keeps track of any properties unknown to the library. + internal StorageClassTypeProperties(StorageClassType type, IDictionary serializedAdditionalRawData) + { + Type = type; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Type of the storage class. + internal StorageClassType Type { get; set; } + } +} diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/StorageClassTypePropertiesUpdate.Serialization.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/StorageClassTypePropertiesUpdate.Serialization.cs new file mode 100644 index 000000000000..9e968b675a04 --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/StorageClassTypePropertiesUpdate.Serialization.cs @@ -0,0 +1,267 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ContainerOrchestratorRuntime.Models +{ + public partial class StorageClassTypePropertiesUpdate : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(StorageClassTypePropertiesUpdate)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(BackingStorageClassName)) + { + writer.WritePropertyName("backingStorageClassName"u8); + writer.WriteStringValue(BackingStorageClassName); + } + if (Optional.IsDefined(AzureStorageAccountName)) + { + writer.WritePropertyName("azureStorageAccountName"u8); + writer.WriteStringValue(AzureStorageAccountName); + } + if (Optional.IsDefined(AzureStorageAccountKey)) + { + writer.WritePropertyName("azureStorageAccountKey"u8); + writer.WriteStringValue(AzureStorageAccountKey); + } + if (Optional.IsDefined(Server)) + { + writer.WritePropertyName("server"u8); + writer.WriteStringValue(Server); + } + if (Optional.IsDefined(Share)) + { + writer.WritePropertyName("share"u8); + writer.WriteStringValue(Share); + } + if (Optional.IsDefined(SubDir)) + { + writer.WritePropertyName("subDir"u8); + writer.WriteStringValue(SubDir); + } + if (Optional.IsDefined(MountPermissions)) + { + writer.WritePropertyName("mountPermissions"u8); + writer.WriteStringValue(MountPermissions); + } + if (Optional.IsDefined(OnDelete)) + { + writer.WritePropertyName("onDelete"u8); + writer.WriteStringValue(OnDelete.Value.ToString()); + } + if (Optional.IsDefined(Source)) + { + writer.WritePropertyName("source"u8); + writer.WriteStringValue(Source); + } + if (Optional.IsDefined(Username)) + { + writer.WritePropertyName("username"u8); + writer.WriteStringValue(Username); + } + if (Optional.IsDefined(Password)) + { + writer.WritePropertyName("password"u8); + writer.WriteStringValue(Password); + } + if (Optional.IsDefined(Domain)) + { + writer.WritePropertyName("domain"u8); + writer.WriteStringValue(Domain); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + StorageClassTypePropertiesUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(StorageClassTypePropertiesUpdate)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeStorageClassTypePropertiesUpdate(document.RootElement, options); + } + + internal static StorageClassTypePropertiesUpdate DeserializeStorageClassTypePropertiesUpdate(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string backingStorageClassName = default; + string azureStorageAccountName = default; + string azureStorageAccountKey = default; + string server = default; + string share = default; + string subDir = default; + string mountPermissions = default; + NfsDirectoryActionOnVolumeDeletion? onDelete = default; + string source = default; + string username = default; + string password = default; + string domain = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("backingStorageClassName"u8)) + { + backingStorageClassName = property.Value.GetString(); + continue; + } + if (property.NameEquals("azureStorageAccountName"u8)) + { + azureStorageAccountName = property.Value.GetString(); + continue; + } + if (property.NameEquals("azureStorageAccountKey"u8)) + { + azureStorageAccountKey = property.Value.GetString(); + continue; + } + if (property.NameEquals("server"u8)) + { + server = property.Value.GetString(); + continue; + } + if (property.NameEquals("share"u8)) + { + share = property.Value.GetString(); + continue; + } + if (property.NameEquals("subDir"u8)) + { + subDir = property.Value.GetString(); + continue; + } + if (property.NameEquals("mountPermissions"u8)) + { + mountPermissions = property.Value.GetString(); + continue; + } + if (property.NameEquals("onDelete"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + onDelete = new NfsDirectoryActionOnVolumeDeletion(property.Value.GetString()); + continue; + } + if (property.NameEquals("source"u8)) + { + source = property.Value.GetString(); + continue; + } + if (property.NameEquals("username"u8)) + { + username = property.Value.GetString(); + continue; + } + if (property.NameEquals("password"u8)) + { + password = property.Value.GetString(); + continue; + } + if (property.NameEquals("domain"u8)) + { + domain = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new StorageClassTypePropertiesUpdate( + backingStorageClassName, + azureStorageAccountName, + azureStorageAccountKey, + server, + share, + subDir, + mountPermissions, + onDelete, + source, + username, + password, + domain, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(StorageClassTypePropertiesUpdate)} does not support writing '{options.Format}' format."); + } + } + + StorageClassTypePropertiesUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeStorageClassTypePropertiesUpdate(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(StorageClassTypePropertiesUpdate)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/StorageClassTypePropertiesUpdate.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/StorageClassTypePropertiesUpdate.cs new file mode 100644 index 000000000000..8a5687727b18 --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/StorageClassTypePropertiesUpdate.cs @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ContainerOrchestratorRuntime.Models +{ + /// The model for update a storageClass. + public partial class StorageClassTypePropertiesUpdate + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public StorageClassTypePropertiesUpdate() + { + } + + /// Initializes a new instance of . + /// The backing storageclass used to create new storageclass. + /// Azure Storage Account Name. + /// Azure Storage Account Key. + /// NFS Server. + /// NFS share. + /// Sub directory under share. If the sub directory doesn't exist, driver will create it. + /// Mounted folder permissions. Default is 0. If set as non-zero, driver will perform `chmod` after mount. + /// The action to take when a NFS volume is deleted. Default is Delete. + /// SMB Source. + /// Server username. + /// Server password. + /// Server domain. + /// Keeps track of any properties unknown to the library. + internal StorageClassTypePropertiesUpdate(string backingStorageClassName, string azureStorageAccountName, string azureStorageAccountKey, string server, string share, string subDir, string mountPermissions, NfsDirectoryActionOnVolumeDeletion? onDelete, string source, string username, string password, string domain, IDictionary serializedAdditionalRawData) + { + BackingStorageClassName = backingStorageClassName; + AzureStorageAccountName = azureStorageAccountName; + AzureStorageAccountKey = azureStorageAccountKey; + Server = server; + Share = share; + SubDir = subDir; + MountPermissions = mountPermissions; + OnDelete = onDelete; + Source = source; + Username = username; + Password = password; + Domain = domain; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The backing storageclass used to create new storageclass. + public string BackingStorageClassName { get; set; } + /// Azure Storage Account Name. + public string AzureStorageAccountName { get; set; } + /// Azure Storage Account Key. + public string AzureStorageAccountKey { get; set; } + /// NFS Server. + public string Server { get; set; } + /// NFS share. + public string Share { get; set; } + /// Sub directory under share. If the sub directory doesn't exist, driver will create it. + public string SubDir { get; set; } + /// Mounted folder permissions. Default is 0. If set as non-zero, driver will perform `chmod` after mount. + public string MountPermissions { get; set; } + /// The action to take when a NFS volume is deleted. Default is Delete. + public NfsDirectoryActionOnVolumeDeletion? OnDelete { get; set; } + /// SMB Source. + public string Source { get; set; } + /// Server username. + public string Username { get; set; } + /// Server password. + public string Password { get; set; } + /// Server domain. + public string Domain { get; set; } + } +} diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/UnknownStorageClassTypeProperties.Serialization.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/UnknownStorageClassTypeProperties.Serialization.cs new file mode 100644 index 000000000000..7c6b92fe8ef5 --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/UnknownStorageClassTypeProperties.Serialization.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ContainerOrchestratorRuntime.Models +{ + internal partial class UnknownStorageClassTypeProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(StorageClassTypeProperties)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + StorageClassTypeProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(StorageClassTypeProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeStorageClassTypeProperties(document.RootElement, options); + } + + internal static UnknownStorageClassTypeProperties DeserializeUnknownStorageClassTypeProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + StorageClassType type = "Unknown"; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type"u8)) + { + type = new StorageClassType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UnknownStorageClassTypeProperties(type, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(StorageClassTypeProperties)} does not support writing '{options.Format}' format."); + } + } + + StorageClassTypeProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeStorageClassTypeProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(StorageClassTypeProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/UnknownStorageClassTypeProperties.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/UnknownStorageClassTypeProperties.cs new file mode 100644 index 000000000000..8dca1d1a75cc --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/UnknownStorageClassTypeProperties.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ContainerOrchestratorRuntime.Models +{ + /// Unknown version of StorageClassTypeProperties. + internal partial class UnknownStorageClassTypeProperties : StorageClassTypeProperties + { + /// Initializes a new instance of . + /// Type of the storage class. + /// Keeps track of any properties unknown to the library. + internal UnknownStorageClassTypeProperties(StorageClassType type, IDictionary serializedAdditionalRawData) : base(type, serializedAdditionalRawData) + { + Type = type; + } + + /// Initializes a new instance of for deserialization. + internal UnknownStorageClassTypeProperties() + { + } + } +} diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/VolumeBindingMode.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/VolumeBindingMode.cs new file mode 100644 index 000000000000..35be2b1a88ee --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/VolumeBindingMode.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ContainerOrchestratorRuntime.Models +{ + /// Storage class volume binding mode. + public readonly partial struct VolumeBindingMode : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public VolumeBindingMode(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ImmediateValue = "Immediate"; + private const string WaitForFirstConsumerValue = "WaitForFirstConsumer"; + + /// Immediate binding mode. + public static VolumeBindingMode Immediate { get; } = new VolumeBindingMode(ImmediateValue); + /// Wait for first consumer binding mode. + public static VolumeBindingMode WaitForFirstConsumer { get; } = new VolumeBindingMode(WaitForFirstConsumerValue); + /// Determines if two values are the same. + public static bool operator ==(VolumeBindingMode left, VolumeBindingMode right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(VolumeBindingMode left, VolumeBindingMode right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator VolumeBindingMode(string value) => new VolumeBindingMode(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is VolumeBindingMode other && Equals(other); + /// + public bool Equals(VolumeBindingMode other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/VolumeExpansion.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/VolumeExpansion.cs new file mode 100644 index 000000000000..ff1965551f9b --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Models/VolumeExpansion.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ContainerOrchestratorRuntime.Models +{ + /// Ability to expand volumes of a storage class. + public readonly partial struct VolumeExpansion : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public VolumeExpansion(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AllowValue = "Allow"; + private const string DisallowValue = "Disallow"; + + /// Allow volume expansion. + public static VolumeExpansion Allow { get; } = new VolumeExpansion(AllowValue); + /// Disallow volume expansion. + public static VolumeExpansion Disallow { get; } = new VolumeExpansion(DisallowValue); + /// Determines if two values are the same. + public static bool operator ==(VolumeExpansion left, VolumeExpansion right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(VolumeExpansion left, VolumeExpansion right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator VolumeExpansion(string value) => new VolumeExpansion(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is VolumeExpansion other && Equals(other); + /// + public bool Equals(VolumeExpansion other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ProviderConstants.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ProviderConstants.cs new file mode 100644 index 000000000000..de0af46b5e47 --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ProviderConstants.cs @@ -0,0 +1,16 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.ContainerOrchestratorRuntime +{ + internal static class ProviderConstants + { + public static string DefaultProviderNamespace { get; } = ClientDiagnostics.GetResourceProviderNamespace(typeof(ProviderConstants).Assembly); + } +} diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/RestOperations/BgpPeersRestOperations.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/RestOperations/BgpPeersRestOperations.cs new file mode 100644 index 000000000000..4c58575a33e8 --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/RestOperations/BgpPeersRestOperations.cs @@ -0,0 +1,437 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.ContainerOrchestratorRuntime.Models; + +namespace Azure.ResourceManager.ContainerOrchestratorRuntime +{ + internal partial class BgpPeersRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of BgpPeersRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// Service host. + /// The API version to use for this operation. + /// or is null. + public BgpPeersRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2024-03-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string resourceUri, string bgpPeerName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/", false); + uri.AppendPath(resourceUri, false); + uri.AppendPath("/providers/Microsoft.KubernetesRuntime/bgpPeers/", false); + uri.AppendPath(bgpPeerName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string resourceUri, string bgpPeerName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/", false); + uri.AppendPath(resourceUri, false); + uri.AppendPath("/providers/Microsoft.KubernetesRuntime/bgpPeers/", false); + uri.AppendPath(bgpPeerName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a BgpPeer. + /// The fully qualified Azure Resource manager identifier of the resource. + /// The name of the BgpPeer. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string resourceUri, string bgpPeerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceUri, nameof(resourceUri)); + Argument.AssertNotNullOrEmpty(bgpPeerName, nameof(bgpPeerName)); + + using var message = CreateGetRequest(resourceUri, bgpPeerName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ConnectedClusterBgpPeerData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ConnectedClusterBgpPeerData.DeserializeConnectedClusterBgpPeerData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ConnectedClusterBgpPeerData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a BgpPeer. + /// The fully qualified Azure Resource manager identifier of the resource. + /// The name of the BgpPeer. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response Get(string resourceUri, string bgpPeerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceUri, nameof(resourceUri)); + Argument.AssertNotNullOrEmpty(bgpPeerName, nameof(bgpPeerName)); + + using var message = CreateGetRequest(resourceUri, bgpPeerName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ConnectedClusterBgpPeerData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ConnectedClusterBgpPeerData.DeserializeConnectedClusterBgpPeerData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ConnectedClusterBgpPeerData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string resourceUri, string bgpPeerName, ConnectedClusterBgpPeerData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/", false); + uri.AppendPath(resourceUri, false); + uri.AppendPath("/providers/Microsoft.KubernetesRuntime/bgpPeers/", false); + uri.AppendPath(bgpPeerName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string resourceUri, string bgpPeerName, ConnectedClusterBgpPeerData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/", false); + uri.AppendPath(resourceUri, false); + uri.AppendPath("/providers/Microsoft.KubernetesRuntime/bgpPeers/", false); + uri.AppendPath(bgpPeerName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create a BgpPeer. + /// The fully qualified Azure Resource manager identifier of the resource. + /// The name of the BgpPeer. + /// Resource create parameters. + /// The cancellation token to use. + /// , or is null. + /// is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string resourceUri, string bgpPeerName, ConnectedClusterBgpPeerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceUri, nameof(resourceUri)); + Argument.AssertNotNullOrEmpty(bgpPeerName, nameof(bgpPeerName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(resourceUri, bgpPeerName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create a BgpPeer. + /// The fully qualified Azure Resource manager identifier of the resource. + /// The name of the BgpPeer. + /// Resource create parameters. + /// The cancellation token to use. + /// , or is null. + /// is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string resourceUri, string bgpPeerName, ConnectedClusterBgpPeerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceUri, nameof(resourceUri)); + Argument.AssertNotNullOrEmpty(bgpPeerName, nameof(bgpPeerName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(resourceUri, bgpPeerName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string resourceUri, string bgpPeerName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/", false); + uri.AppendPath(resourceUri, false); + uri.AppendPath("/providers/Microsoft.KubernetesRuntime/bgpPeers/", false); + uri.AppendPath(bgpPeerName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string resourceUri, string bgpPeerName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/", false); + uri.AppendPath(resourceUri, false); + uri.AppendPath("/providers/Microsoft.KubernetesRuntime/bgpPeers/", false); + uri.AppendPath(bgpPeerName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete a BgpPeer. + /// The fully qualified Azure Resource manager identifier of the resource. + /// The name of the BgpPeer. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string resourceUri, string bgpPeerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceUri, nameof(resourceUri)); + Argument.AssertNotNullOrEmpty(bgpPeerName, nameof(bgpPeerName)); + + using var message = CreateDeleteRequest(resourceUri, bgpPeerName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete a BgpPeer. + /// The fully qualified Azure Resource manager identifier of the resource. + /// The name of the BgpPeer. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response Delete(string resourceUri, string bgpPeerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceUri, nameof(resourceUri)); + Argument.AssertNotNullOrEmpty(bgpPeerName, nameof(bgpPeerName)); + + using var message = CreateDeleteRequest(resourceUri, bgpPeerName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListRequestUri(string resourceUri) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/", false); + uri.AppendPath(resourceUri, false); + uri.AppendPath("/providers/Microsoft.KubernetesRuntime/bgpPeers", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListRequest(string resourceUri) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/", false); + uri.AppendPath(resourceUri, false); + uri.AppendPath("/providers/Microsoft.KubernetesRuntime/bgpPeers", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List BgpPeer resources by parent. + /// The fully qualified Azure Resource manager identifier of the resource. + /// The cancellation token to use. + /// is null. + public async Task> ListAsync(string resourceUri, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceUri, nameof(resourceUri)); + + using var message = CreateListRequest(resourceUri); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + BgpPeerListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = BgpPeerListResult.DeserializeBgpPeerListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List BgpPeer resources by parent. + /// The fully qualified Azure Resource manager identifier of the resource. + /// The cancellation token to use. + /// is null. + public Response List(string resourceUri, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceUri, nameof(resourceUri)); + + using var message = CreateListRequest(resourceUri); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + BgpPeerListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = BgpPeerListResult.DeserializeBgpPeerListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string resourceUri) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string resourceUri) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List BgpPeer resources by parent. + /// The URL to the next page of results. + /// The fully qualified Azure Resource manager identifier of the resource. + /// The cancellation token to use. + /// or is null. + public async Task> ListNextPageAsync(string nextLink, string resourceUri, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNull(resourceUri, nameof(resourceUri)); + + using var message = CreateListNextPageRequest(nextLink, resourceUri); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + BgpPeerListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = BgpPeerListResult.DeserializeBgpPeerListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List BgpPeer resources by parent. + /// The URL to the next page of results. + /// The fully qualified Azure Resource manager identifier of the resource. + /// The cancellation token to use. + /// or is null. + public Response ListNextPage(string nextLink, string resourceUri, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNull(resourceUri, nameof(resourceUri)); + + using var message = CreateListNextPageRequest(nextLink, resourceUri); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + BgpPeerListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = BgpPeerListResult.DeserializeBgpPeerListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/RestOperations/LoadBalancersRestOperations.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/RestOperations/LoadBalancersRestOperations.cs new file mode 100644 index 000000000000..65e157e71a1e --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/RestOperations/LoadBalancersRestOperations.cs @@ -0,0 +1,437 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.ContainerOrchestratorRuntime.Models; + +namespace Azure.ResourceManager.ContainerOrchestratorRuntime +{ + internal partial class LoadBalancersRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of LoadBalancersRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// Service host. + /// The API version to use for this operation. + /// or is null. + public LoadBalancersRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2024-03-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string resourceUri, string loadBalancerName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/", false); + uri.AppendPath(resourceUri, false); + uri.AppendPath("/providers/Microsoft.KubernetesRuntime/loadBalancers/", false); + uri.AppendPath(loadBalancerName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string resourceUri, string loadBalancerName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/", false); + uri.AppendPath(resourceUri, false); + uri.AppendPath("/providers/Microsoft.KubernetesRuntime/loadBalancers/", false); + uri.AppendPath(loadBalancerName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a LoadBalancer. + /// The fully qualified Azure Resource manager identifier of the resource. + /// The name of the LoadBalancer. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string resourceUri, string loadBalancerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceUri, nameof(resourceUri)); + Argument.AssertNotNullOrEmpty(loadBalancerName, nameof(loadBalancerName)); + + using var message = CreateGetRequest(resourceUri, loadBalancerName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ConnectedClusterLoadBalancerData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ConnectedClusterLoadBalancerData.DeserializeConnectedClusterLoadBalancerData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ConnectedClusterLoadBalancerData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a LoadBalancer. + /// The fully qualified Azure Resource manager identifier of the resource. + /// The name of the LoadBalancer. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response Get(string resourceUri, string loadBalancerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceUri, nameof(resourceUri)); + Argument.AssertNotNullOrEmpty(loadBalancerName, nameof(loadBalancerName)); + + using var message = CreateGetRequest(resourceUri, loadBalancerName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ConnectedClusterLoadBalancerData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ConnectedClusterLoadBalancerData.DeserializeConnectedClusterLoadBalancerData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ConnectedClusterLoadBalancerData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string resourceUri, string loadBalancerName, ConnectedClusterLoadBalancerData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/", false); + uri.AppendPath(resourceUri, false); + uri.AppendPath("/providers/Microsoft.KubernetesRuntime/loadBalancers/", false); + uri.AppendPath(loadBalancerName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string resourceUri, string loadBalancerName, ConnectedClusterLoadBalancerData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/", false); + uri.AppendPath(resourceUri, false); + uri.AppendPath("/providers/Microsoft.KubernetesRuntime/loadBalancers/", false); + uri.AppendPath(loadBalancerName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create a LoadBalancer. + /// The fully qualified Azure Resource manager identifier of the resource. + /// The name of the LoadBalancer. + /// Resource create parameters. + /// The cancellation token to use. + /// , or is null. + /// is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string resourceUri, string loadBalancerName, ConnectedClusterLoadBalancerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceUri, nameof(resourceUri)); + Argument.AssertNotNullOrEmpty(loadBalancerName, nameof(loadBalancerName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(resourceUri, loadBalancerName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create a LoadBalancer. + /// The fully qualified Azure Resource manager identifier of the resource. + /// The name of the LoadBalancer. + /// Resource create parameters. + /// The cancellation token to use. + /// , or is null. + /// is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string resourceUri, string loadBalancerName, ConnectedClusterLoadBalancerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceUri, nameof(resourceUri)); + Argument.AssertNotNullOrEmpty(loadBalancerName, nameof(loadBalancerName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(resourceUri, loadBalancerName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string resourceUri, string loadBalancerName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/", false); + uri.AppendPath(resourceUri, false); + uri.AppendPath("/providers/Microsoft.KubernetesRuntime/loadBalancers/", false); + uri.AppendPath(loadBalancerName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string resourceUri, string loadBalancerName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/", false); + uri.AppendPath(resourceUri, false); + uri.AppendPath("/providers/Microsoft.KubernetesRuntime/loadBalancers/", false); + uri.AppendPath(loadBalancerName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete a LoadBalancer. + /// The fully qualified Azure Resource manager identifier of the resource. + /// The name of the LoadBalancer. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string resourceUri, string loadBalancerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceUri, nameof(resourceUri)); + Argument.AssertNotNullOrEmpty(loadBalancerName, nameof(loadBalancerName)); + + using var message = CreateDeleteRequest(resourceUri, loadBalancerName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete a LoadBalancer. + /// The fully qualified Azure Resource manager identifier of the resource. + /// The name of the LoadBalancer. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response Delete(string resourceUri, string loadBalancerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceUri, nameof(resourceUri)); + Argument.AssertNotNullOrEmpty(loadBalancerName, nameof(loadBalancerName)); + + using var message = CreateDeleteRequest(resourceUri, loadBalancerName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListRequestUri(string resourceUri) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/", false); + uri.AppendPath(resourceUri, false); + uri.AppendPath("/providers/Microsoft.KubernetesRuntime/loadBalancers", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListRequest(string resourceUri) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/", false); + uri.AppendPath(resourceUri, false); + uri.AppendPath("/providers/Microsoft.KubernetesRuntime/loadBalancers", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List LoadBalancer resources by parent. + /// The fully qualified Azure Resource manager identifier of the resource. + /// The cancellation token to use. + /// is null. + public async Task> ListAsync(string resourceUri, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceUri, nameof(resourceUri)); + + using var message = CreateListRequest(resourceUri); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + LoadBalancerListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = LoadBalancerListResult.DeserializeLoadBalancerListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List LoadBalancer resources by parent. + /// The fully qualified Azure Resource manager identifier of the resource. + /// The cancellation token to use. + /// is null. + public Response List(string resourceUri, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceUri, nameof(resourceUri)); + + using var message = CreateListRequest(resourceUri); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + LoadBalancerListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = LoadBalancerListResult.DeserializeLoadBalancerListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string resourceUri) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string resourceUri) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List LoadBalancer resources by parent. + /// The URL to the next page of results. + /// The fully qualified Azure Resource manager identifier of the resource. + /// The cancellation token to use. + /// or is null. + public async Task> ListNextPageAsync(string nextLink, string resourceUri, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNull(resourceUri, nameof(resourceUri)); + + using var message = CreateListNextPageRequest(nextLink, resourceUri); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + LoadBalancerListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = LoadBalancerListResult.DeserializeLoadBalancerListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List LoadBalancer resources by parent. + /// The URL to the next page of results. + /// The fully qualified Azure Resource manager identifier of the resource. + /// The cancellation token to use. + /// or is null. + public Response ListNextPage(string nextLink, string resourceUri, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNull(resourceUri, nameof(resourceUri)); + + using var message = CreateListNextPageRequest(nextLink, resourceUri); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + LoadBalancerListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = LoadBalancerListResult.DeserializeLoadBalancerListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/RestOperations/ServicesRestOperations.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/RestOperations/ServicesRestOperations.cs new file mode 100644 index 000000000000..c39d63e1f99d --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/RestOperations/ServicesRestOperations.cs @@ -0,0 +1,447 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.ContainerOrchestratorRuntime.Models; + +namespace Azure.ResourceManager.ContainerOrchestratorRuntime +{ + internal partial class ServicesRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of ServicesRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// Service host. + /// The API version to use for this operation. + /// or is null. + public ServicesRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2024-03-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string resourceUri, string serviceName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/", false); + uri.AppendPath(resourceUri, false); + uri.AppendPath("/providers/Microsoft.KubernetesRuntime/services/", false); + uri.AppendPath(serviceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string resourceUri, string serviceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/", false); + uri.AppendPath(resourceUri, false); + uri.AppendPath("/providers/Microsoft.KubernetesRuntime/services/", false); + uri.AppendPath(serviceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a ServiceResource. + /// The fully qualified Azure Resource manager identifier of the resource. + /// The name of the the service. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string resourceUri, string serviceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceUri, nameof(resourceUri)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + + using var message = CreateGetRequest(resourceUri, serviceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ConnectedClusterServiceData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ConnectedClusterServiceData.DeserializeConnectedClusterServiceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ConnectedClusterServiceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a ServiceResource. + /// The fully qualified Azure Resource manager identifier of the resource. + /// The name of the the service. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response Get(string resourceUri, string serviceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceUri, nameof(resourceUri)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + + using var message = CreateGetRequest(resourceUri, serviceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ConnectedClusterServiceData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ConnectedClusterServiceData.DeserializeConnectedClusterServiceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ConnectedClusterServiceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string resourceUri, string serviceName, ConnectedClusterServiceData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/", false); + uri.AppendPath(resourceUri, false); + uri.AppendPath("/providers/Microsoft.KubernetesRuntime/services/", false); + uri.AppendPath(serviceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string resourceUri, string serviceName, ConnectedClusterServiceData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/", false); + uri.AppendPath(resourceUri, false); + uri.AppendPath("/providers/Microsoft.KubernetesRuntime/services/", false); + uri.AppendPath(serviceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create a ServiceResource. + /// The fully qualified Azure Resource manager identifier of the resource. + /// The name of the the service. + /// Resource create parameters. + /// The cancellation token to use. + /// , or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> CreateOrUpdateAsync(string resourceUri, string serviceName, ConnectedClusterServiceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceUri, nameof(resourceUri)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(resourceUri, serviceName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + { + ConnectedClusterServiceData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ConnectedClusterServiceData.DeserializeConnectedClusterServiceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create a ServiceResource. + /// The fully qualified Azure Resource manager identifier of the resource. + /// The name of the the service. + /// Resource create parameters. + /// The cancellation token to use. + /// , or is null. + /// is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string resourceUri, string serviceName, ConnectedClusterServiceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceUri, nameof(resourceUri)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(resourceUri, serviceName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + { + ConnectedClusterServiceData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ConnectedClusterServiceData.DeserializeConnectedClusterServiceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string resourceUri, string serviceName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/", false); + uri.AppendPath(resourceUri, false); + uri.AppendPath("/providers/Microsoft.KubernetesRuntime/services/", false); + uri.AppendPath(serviceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string resourceUri, string serviceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/", false); + uri.AppendPath(resourceUri, false); + uri.AppendPath("/providers/Microsoft.KubernetesRuntime/services/", false); + uri.AppendPath(serviceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete a ServiceResource. + /// The fully qualified Azure Resource manager identifier of the resource. + /// The name of the the service. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string resourceUri, string serviceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceUri, nameof(resourceUri)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + + using var message = CreateDeleteRequest(resourceUri, serviceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete a ServiceResource. + /// The fully qualified Azure Resource manager identifier of the resource. + /// The name of the the service. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response Delete(string resourceUri, string serviceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceUri, nameof(resourceUri)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + + using var message = CreateDeleteRequest(resourceUri, serviceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListRequestUri(string resourceUri) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/", false); + uri.AppendPath(resourceUri, false); + uri.AppendPath("/providers/Microsoft.KubernetesRuntime/services", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListRequest(string resourceUri) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/", false); + uri.AppendPath(resourceUri, false); + uri.AppendPath("/providers/Microsoft.KubernetesRuntime/services", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List ServiceResource resources by parent. + /// The fully qualified Azure Resource manager identifier of the resource. + /// The cancellation token to use. + /// is null. + public async Task> ListAsync(string resourceUri, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceUri, nameof(resourceUri)); + + using var message = CreateListRequest(resourceUri); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ServiceResourceListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ServiceResourceListResult.DeserializeServiceResourceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List ServiceResource resources by parent. + /// The fully qualified Azure Resource manager identifier of the resource. + /// The cancellation token to use. + /// is null. + public Response List(string resourceUri, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceUri, nameof(resourceUri)); + + using var message = CreateListRequest(resourceUri); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ServiceResourceListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ServiceResourceListResult.DeserializeServiceResourceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string resourceUri) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string resourceUri) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List ServiceResource resources by parent. + /// The URL to the next page of results. + /// The fully qualified Azure Resource manager identifier of the resource. + /// The cancellation token to use. + /// or is null. + public async Task> ListNextPageAsync(string nextLink, string resourceUri, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNull(resourceUri, nameof(resourceUri)); + + using var message = CreateListNextPageRequest(nextLink, resourceUri); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ServiceResourceListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ServiceResourceListResult.DeserializeServiceResourceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List ServiceResource resources by parent. + /// The URL to the next page of results. + /// The fully qualified Azure Resource manager identifier of the resource. + /// The cancellation token to use. + /// or is null. + public Response ListNextPage(string nextLink, string resourceUri, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNull(resourceUri, nameof(resourceUri)); + + using var message = CreateListNextPageRequest(nextLink, resourceUri); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ServiceResourceListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ServiceResourceListResult.DeserializeServiceResourceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/RestOperations/StorageClassRestOperations.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/RestOperations/StorageClassRestOperations.cs new file mode 100644 index 000000000000..031b27bb51d6 --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/RestOperations/StorageClassRestOperations.cs @@ -0,0 +1,521 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.ContainerOrchestratorRuntime.Models; + +namespace Azure.ResourceManager.ContainerOrchestratorRuntime +{ + internal partial class StorageClassRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of StorageClassRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// Service host. + /// The API version to use for this operation. + /// or is null. + public StorageClassRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2024-03-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string resourceUri, string storageClassName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/", false); + uri.AppendPath(resourceUri, false); + uri.AppendPath("/providers/Microsoft.KubernetesRuntime/storageClasses/", false); + uri.AppendPath(storageClassName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string resourceUri, string storageClassName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/", false); + uri.AppendPath(resourceUri, false); + uri.AppendPath("/providers/Microsoft.KubernetesRuntime/storageClasses/", false); + uri.AppendPath(storageClassName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a StorageClassResource. + /// The fully qualified Azure Resource manager identifier of the resource. + /// The name of the the storage class. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string resourceUri, string storageClassName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceUri, nameof(resourceUri)); + Argument.AssertNotNullOrEmpty(storageClassName, nameof(storageClassName)); + + using var message = CreateGetRequest(resourceUri, storageClassName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ConnectedClusterStorageClassData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ConnectedClusterStorageClassData.DeserializeConnectedClusterStorageClassData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ConnectedClusterStorageClassData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a StorageClassResource. + /// The fully qualified Azure Resource manager identifier of the resource. + /// The name of the the storage class. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response Get(string resourceUri, string storageClassName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceUri, nameof(resourceUri)); + Argument.AssertNotNullOrEmpty(storageClassName, nameof(storageClassName)); + + using var message = CreateGetRequest(resourceUri, storageClassName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ConnectedClusterStorageClassData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ConnectedClusterStorageClassData.DeserializeConnectedClusterStorageClassData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ConnectedClusterStorageClassData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string resourceUri, string storageClassName, ConnectedClusterStorageClassData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/", false); + uri.AppendPath(resourceUri, false); + uri.AppendPath("/providers/Microsoft.KubernetesRuntime/storageClasses/", false); + uri.AppendPath(storageClassName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string resourceUri, string storageClassName, ConnectedClusterStorageClassData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/", false); + uri.AppendPath(resourceUri, false); + uri.AppendPath("/providers/Microsoft.KubernetesRuntime/storageClasses/", false); + uri.AppendPath(storageClassName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create a StorageClassResource. + /// The fully qualified Azure Resource manager identifier of the resource. + /// The name of the the storage class. + /// Resource create parameters. + /// The cancellation token to use. + /// , or is null. + /// is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string resourceUri, string storageClassName, ConnectedClusterStorageClassData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceUri, nameof(resourceUri)); + Argument.AssertNotNullOrEmpty(storageClassName, nameof(storageClassName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(resourceUri, storageClassName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create a StorageClassResource. + /// The fully qualified Azure Resource manager identifier of the resource. + /// The name of the the storage class. + /// Resource create parameters. + /// The cancellation token to use. + /// , or is null. + /// is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string resourceUri, string storageClassName, ConnectedClusterStorageClassData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceUri, nameof(resourceUri)); + Argument.AssertNotNullOrEmpty(storageClassName, nameof(storageClassName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(resourceUri, storageClassName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUpdateRequestUri(string resourceUri, string storageClassName, ConnectedClusterStorageClassPatch patch) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/", false); + uri.AppendPath(resourceUri, false); + uri.AppendPath("/providers/Microsoft.KubernetesRuntime/storageClasses/", false); + uri.AppendPath(storageClassName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string resourceUri, string storageClassName, ConnectedClusterStorageClassPatch patch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/", false); + uri.AppendPath(resourceUri, false); + uri.AppendPath("/providers/Microsoft.KubernetesRuntime/storageClasses/", false); + uri.AppendPath(storageClassName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Update a StorageClassResource. + /// The fully qualified Azure Resource manager identifier of the resource. + /// The name of the the storage class. + /// The resource properties to be updated. + /// The cancellation token to use. + /// , or is null. + /// is an empty string, and was expected to be non-empty. + public async Task UpdateAsync(string resourceUri, string storageClassName, ConnectedClusterStorageClassPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceUri, nameof(resourceUri)); + Argument.AssertNotNullOrEmpty(storageClassName, nameof(storageClassName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(resourceUri, storageClassName, patch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Update a StorageClassResource. + /// The fully qualified Azure Resource manager identifier of the resource. + /// The name of the the storage class. + /// The resource properties to be updated. + /// The cancellation token to use. + /// , or is null. + /// is an empty string, and was expected to be non-empty. + public Response Update(string resourceUri, string storageClassName, ConnectedClusterStorageClassPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceUri, nameof(resourceUri)); + Argument.AssertNotNullOrEmpty(storageClassName, nameof(storageClassName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(resourceUri, storageClassName, patch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string resourceUri, string storageClassName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/", false); + uri.AppendPath(resourceUri, false); + uri.AppendPath("/providers/Microsoft.KubernetesRuntime/storageClasses/", false); + uri.AppendPath(storageClassName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string resourceUri, string storageClassName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/", false); + uri.AppendPath(resourceUri, false); + uri.AppendPath("/providers/Microsoft.KubernetesRuntime/storageClasses/", false); + uri.AppendPath(storageClassName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete a StorageClassResource. + /// The fully qualified Azure Resource manager identifier of the resource. + /// The name of the the storage class. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string resourceUri, string storageClassName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceUri, nameof(resourceUri)); + Argument.AssertNotNullOrEmpty(storageClassName, nameof(storageClassName)); + + using var message = CreateDeleteRequest(resourceUri, storageClassName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete a StorageClassResource. + /// The fully qualified Azure Resource manager identifier of the resource. + /// The name of the the storage class. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response Delete(string resourceUri, string storageClassName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceUri, nameof(resourceUri)); + Argument.AssertNotNullOrEmpty(storageClassName, nameof(storageClassName)); + + using var message = CreateDeleteRequest(resourceUri, storageClassName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListRequestUri(string resourceUri) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/", false); + uri.AppendPath(resourceUri, false); + uri.AppendPath("/providers/Microsoft.KubernetesRuntime/storageClasses", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListRequest(string resourceUri) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/", false); + uri.AppendPath(resourceUri, false); + uri.AppendPath("/providers/Microsoft.KubernetesRuntime/storageClasses", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List StorageClassResource resources by parent. + /// The fully qualified Azure Resource manager identifier of the resource. + /// The cancellation token to use. + /// is null. + public async Task> ListAsync(string resourceUri, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceUri, nameof(resourceUri)); + + using var message = CreateListRequest(resourceUri); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + StorageClassResourceListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = StorageClassResourceListResult.DeserializeStorageClassResourceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List StorageClassResource resources by parent. + /// The fully qualified Azure Resource manager identifier of the resource. + /// The cancellation token to use. + /// is null. + public Response List(string resourceUri, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceUri, nameof(resourceUri)); + + using var message = CreateListRequest(resourceUri); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + StorageClassResourceListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = StorageClassResourceListResult.DeserializeStorageClassResourceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string resourceUri) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string resourceUri) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List StorageClassResource resources by parent. + /// The URL to the next page of results. + /// The fully qualified Azure Resource manager identifier of the resource. + /// The cancellation token to use. + /// or is null. + public async Task> ListNextPageAsync(string nextLink, string resourceUri, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNull(resourceUri, nameof(resourceUri)); + + using var message = CreateListNextPageRequest(nextLink, resourceUri); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + StorageClassResourceListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = StorageClassResourceListResult.DeserializeStorageClassResourceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List StorageClassResource resources by parent. + /// The URL to the next page of results. + /// The fully qualified Azure Resource manager identifier of the resource. + /// The cancellation token to use. + /// or is null. + public Response ListNextPage(string nextLink, string resourceUri, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNull(resourceUri, nameof(resourceUri)); + + using var message = CreateListNextPageRequest(nextLink, resourceUri); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + StorageClassResourceListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = StorageClassResourceListResult.DeserializeStorageClassResourceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Properties/AssemblyInfo.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..f9f0f5ddbd71 --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Properties/AssemblyInfo.cs @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.Runtime.CompilerServices; + +[assembly: Azure.Core.AzureResourceProviderNamespace("Microsoft.KubernetesRuntime")] + +[assembly: InternalsVisibleTo("DynamicProxyGenAssembly2, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c547cac37abd99c8db225ef2f6c8a3602f3b3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9266654753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d15605093924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7d3113e92484cf7045cc7")] +[assembly: InternalsVisibleTo("Azure.ResourceManager.ContainerOrchestratorRuntime.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100d15ddcb29688295338af4b7686603fe614abd555e09efba8fb88ee09e1f7b1ccaeed2e8f823fa9eef3fdd60217fc012ea67d2479751a0b8c087a4185541b851bd8b16f8d91b840e51b1cb0ba6fe647997e57429265e85ef62d565db50a69ae1647d54d7bd855e4db3d8a91510e5bcbd0edfbbecaa20a7bd9ae74593daa7b11b4")] diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/autorest.md.bak b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/autorest.md.bak new file mode 100644 index 000000000000..f2c4e698847c --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/autorest.md.bak @@ -0,0 +1,75 @@ +# Generated code configuration + +Run `dotnet build /t:GenerateCode` to generate code. + +``` yaml +azure-arm: true +csharp: true +library-name: ContainerOrchestratorRuntime +namespace: Azure.ResourceManager.ContainerOrchestratorRuntime +require: https://github.com/Azure/azure-rest-api-specs/blob/c02b366afa77a3e2a746719cea713b231b4b41bb/specification/kubernetesruntime/resource-manager/readme.md +tag: package-2024-03-01 +output-folder: $(this-folder)/Generated +clear-output-folder: true +sample-gen: + output-folder: $(this-folder)/../samples/Generated + clear-output-folder: true +skip-csproj: true +modelerfour: + flatten-payloads: false + flatten-models: false +use-model-reader-writer: true +use-write-core: true + +#mgmt-debug: +# show-serialized-names: true + +rename-mapping: + AccessMode: StorageClassAccessMode + AdvertiseMode.ARP: Arp + AdvertiseMode.BGP: Bgp + BgpPeer: ConnectedClusterBgpPeer + BgpPeerProperties: ConnectedClusterBgpPeerProperties + LoadBalancer: ConnectedClusterLoadBalancer + LoadBalancerProperties: ConnectedClusterLoadBalancerProperties + ServiceResource: ConnectedClusterService + ServiceProperties: ConnectedClusterServiceProperties + StorageClassResource: ConnectedClusterStorageClass + StorageClassProperties: ConnectedClusterStorageClassProperties + ProvisioningState: ContainerOrchestratorProvisioningState + SCType: StorageClassType + SCType.RWX: Rwx + SCType.NFS: Nfs + SCType.SMB: Smb + +format-by-name-rules: + 'tenantId': 'uuid' + 'ETag': 'etag' + 'location': 'azure-location' + '*Uri': 'Uri' + '*Uris': 'Uri' + +acronym-mapping: + CPU: Cpu + CPUs: Cpus + Os: OS + Ip: IP + Ips: IPs|ips + ID: Id + IDs: Ids + VM: Vm + VMs: Vms + Vmos: VmOS + VMScaleSet: VmScaleSet + DNS: Dns + VPN: Vpn + NAT: Nat + WAN: Wan + Ipv4: IPv4|ipv4 + Ipv6: IPv6|ipv6 + Ipsec: IPsec|ipsec + SSO: Sso + URI: Uri + Etag: ETag|etag + +``` diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/tests/Azure.ResourceManager.ContainerOrchestratorRuntime.Tests.csproj b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/tests/Azure.ResourceManager.ContainerOrchestratorRuntime.Tests.csproj new file mode 100644 index 000000000000..c800c6d15be1 --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/tests/Azure.ResourceManager.ContainerOrchestratorRuntime.Tests.csproj @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/tests/ContainerOrchestratorRuntimeManagementTestBase.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/tests/ContainerOrchestratorRuntimeManagementTestBase.cs new file mode 100644 index 000000000000..fd46f384e466 --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/tests/ContainerOrchestratorRuntimeManagementTestBase.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Core; +using Azure.Core.TestFramework; +using Azure.ResourceManager.Resources; +using Azure.ResourceManager.TestFramework; +using NUnit.Framework; +using System.Threading.Tasks; + +namespace Azure.ResourceManager.ContainerOrchestratorRuntime.Tests +{ + public class ContainerOrchestratorRuntimeManagementTestBase : ManagementRecordedTestBase + { + protected ArmClient Client { get; private set; } + protected SubscriptionResource DefaultSubscription { get; private set; } + + protected ContainerOrchestratorRuntimeManagementTestBase(bool isAsync, RecordedTestMode mode) + : base(isAsync, mode) + { + } + + protected ContainerOrchestratorRuntimeManagementTestBase(bool isAsync) + : base(isAsync) + { + } + + [SetUp] + public async Task CreateCommonClient() + { + Client = GetArmClient(); + DefaultSubscription = await Client.GetDefaultSubscriptionAsync().ConfigureAwait(false); + } + + protected async Task CreateResourceGroup(SubscriptionResource subscription, string rgNamePrefix, AzureLocation location) + { + string rgName = Recording.GenerateAssetName(rgNamePrefix); + ResourceGroupData input = new ResourceGroupData(location); + var lro = await subscription.GetResourceGroups().CreateOrUpdateAsync(WaitUntil.Completed, rgName, input); + return lro.Value; + } + } +} diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/tests/ContainerOrchestratorRuntimeManagementTestEnvironment.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/tests/ContainerOrchestratorRuntimeManagementTestEnvironment.cs new file mode 100644 index 000000000000..f8e3a70ef9ea --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/tests/ContainerOrchestratorRuntimeManagementTestEnvironment.cs @@ -0,0 +1,14 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Core; +using Azure.Core.TestFramework; +using Azure.ResourceManager.Kubernetes; + +namespace Azure.ResourceManager.ContainerOrchestratorRuntime.Tests +{ + public class ContainerOrchestratorRuntimeManagementTestEnvironment : TestEnvironment + { + public ResourceIdentifier ConnectedCluster = ConnectedClusterResource.CreateResourceIdentifier("b9e38f20-7c9c-4497-a25d-1a0c5eef2108", "xinyuhe-canary", "test-cluster-euap-arc"); + } +} \ No newline at end of file diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/tests/Scenario/LoadBalancerTests.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/tests/Scenario/LoadBalancerTests.cs new file mode 100644 index 000000000000..cd03e0d8d06f --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/tests/Scenario/LoadBalancerTests.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.Threading.Tasks; +using Azure.Core.TestFramework; +using Azure.ResourceManager.ContainerOrchestratorRuntime.Models; +using Azure.ResourceManager.Kubernetes; +using NUnit.Framework; + +namespace Azure.ResourceManager.ContainerOrchestratorRuntime.Tests.Tests +{ + [TestFixture] + public class LoadBalancerTests : ContainerOrchestratorRuntimeManagementTestBase + { + public LoadBalancerTests() : base(true) + { + } + + [TestCase] + [RecordedTest] + public async Task CreateLoadBalancerAsync() + { + var connectedCluster = ConnectedClusterResource.CreateResourceIdentifier("b9e38f20-7c9c-4497-a25d-1a0c5eef2108", "xinyuhe-canary", "test-cluster-euap-arc"); + var loadBalancerCollection = new ConnectedClusterLoadBalancerCollection(Client, connectedCluster); + var loadBalancerData = new ConnectedClusterLoadBalancerData() + { + Properties = new ConnectedClusterLoadBalancerProperties(new System.Collections.Generic.List(), AdvertiseMode.Arp) + }; + loadBalancerData.Properties.Addresses.Add("192.168.10.1/32"); + var loadBalancerResource = await loadBalancerCollection.CreateOrUpdateAsync(WaitUntil.Completed, "testlb", loadBalancerData); + await loadBalancerResource.Value.DeleteAsync(WaitUntil.Completed); + var bgpPeerData = new ConnectedClusterBgpPeerData + { + Properties = new ConnectedClusterBgpPeerProperties + { + MyAsn = 64000, + PeerAsn = 64001, + PeerAddress = "192.168.2.0" + } + }; + var bgpPeerCollection = new ConnectedClusterBgpPeerCollection(Client, connectedCluster); + var bgpPeerResource = await bgpPeerCollection.CreateOrUpdateAsync(WaitUntil.Completed, "testpeer", bgpPeerData); + await bgpPeerResource.Value.DeleteAsync(WaitUntil.Completed); + } + } +} diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/tests/Scenario/StorageClassTests.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/tests/Scenario/StorageClassTests.cs new file mode 100644 index 000000000000..70378e5fc968 --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/tests/Scenario/StorageClassTests.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.Threading.Tasks; +using Azure.Core.TestFramework; +using Azure.ResourceManager.ContainerOrchestratorRuntime.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.ContainerOrchestratorRuntime.Tests.Tests +{ + [TestFixture] + public class StorageClassTests : ContainerOrchestratorRuntimeManagementTestBase + { + public StorageClassTests() : base(true) + { + } + + [TestCase] + [RecordedTest] + public async Task CreateStorageClassAsync() + { + var nfsStorageClassTypeProperties = new NfsStorageClassTypeProperties("172.23.1.4", "/"); + var storageClassData = new ConnectedClusterStorageClassData + { + Properties = new ConnectedClusterStorageClassProperties(nfsStorageClassTypeProperties) + }; + var storageClassCollection = new ConnectedClusterStorageClassCollection(Client, TestEnvironment.ConnectedCluster); + var storageClassResource = await storageClassCollection.CreateOrUpdateAsync(WaitUntil.Completed, "testsc", storageClassData); + await storageClassResource.Value.DeleteAsync(WaitUntil.Started); + } + } +} diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/tsp-location.yaml b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/tsp-location.yaml new file mode 100644 index 000000000000..5d54e9f49f79 --- /dev/null +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/tsp-location.yaml @@ -0,0 +1,3 @@ +directory: specification\kubernetesruntime\KubernetesRuntime.Management +commit: 95e89f00932d2a8f04ff80e28f8ce10ee586ca7d +repo: Azure/azure-rest-api-specs \ No newline at end of file diff --git a/sdk/containerorchestratorruntime/ci.mgmt.yml b/sdk/containerorchestratorruntime/ci.mgmt.yml new file mode 100644 index 000000000000..0a036386143b --- /dev/null +++ b/sdk/containerorchestratorruntime/ci.mgmt.yml @@ -0,0 +1,23 @@ +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. + +trigger: none +pr: + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/containerorchestratorruntime/ci.mgmt.yml + - sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/ + +extends: + template: /eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: containerorchestratorruntime + LimitForPullRequest: true + Artifacts: + - name: Azure.ResourceManager.ContainerOrchestratorRuntime + safeName: AzureResourceManagerContainerOrchestratorRuntime diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/CHANGELOG.md b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/CHANGELOG.md index 54ac09c6a7e2..11f5949af726 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/CHANGELOG.md +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 1.3.0-beta.1 (Unreleased) +## 1.3.0-beta.2 (Unreleased) ### Features Added @@ -10,6 +10,12 @@ ### Other Changes +## 1.3.0-beta.1 (2024-10-15) + +### Features Added + +- Exposed `JsonModelWriteCore` for model serialization procedure. + ## 1.2.1 (2024-04-29) ### Features Added diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/api/Azure.ResourceManager.ContainerRegistry.netstandard2.0.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/api/Azure.ResourceManager.ContainerRegistry.netstandard2.0.cs index 6949527e105d..15ae6fe1be1c 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/api/Azure.ResourceManager.ContainerRegistry.netstandard2.0.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/api/Azure.ResourceManager.ContainerRegistry.netstandard2.0.cs @@ -25,6 +25,7 @@ public ContainerRegistryAgentPoolData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState? ProvisioningState { get { throw null; } } public string Tier { get { throw null; } set { } } public Azure.Core.ResourceIdentifier VirtualNetworkSubnetResourceId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.ContainerRegistryAgentPoolData 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.ContainerRegistry.ContainerRegistryAgentPoolData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -94,6 +95,7 @@ public ContainerRegistryData(Azure.Core.AzureLocation location, Azure.ResourceMa public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistrySku Sku { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryResourceStatus Status { get { throw null; } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryZoneRedundancy? ZoneRedundancy { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.ContainerRegistryData 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.ContainerRegistry.ContainerRegistryData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -144,6 +146,7 @@ public ContainerRegistryPrivateEndpointConnectionData() { } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPrivateLinkServiceConnectionState ConnectionState { get { throw null; } set { } } public Azure.Core.ResourceIdentifier PrivateEndpointId { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.ContainerRegistryPrivateEndpointConnectionData 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.ContainerRegistry.ContainerRegistryPrivateEndpointConnectionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -205,6 +208,7 @@ internal ContainerRegistryPrivateLinkResourceData() { } public string GroupId { get { throw null; } } public System.Collections.Generic.IReadOnlyList RequiredMembers { get { throw null; } } public System.Collections.Generic.IReadOnlyList RequiredZoneNames { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.ContainerRegistryPrivateLinkResourceData 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.ContainerRegistry.ContainerRegistryPrivateLinkResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -235,6 +239,7 @@ public ContainerRegistryReplicationData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryResourceStatus Status { get { throw null; } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryZoneRedundancy? ZoneRedundancy { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.ContainerRegistryReplicationData 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.ContainerRegistry.ContainerRegistryReplicationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -375,6 +380,7 @@ public ContainerRegistryRunData() { } public string Task { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryTimerTriggerDescriptor TimerTrigger { get { throw null; } set { } } public string UpdateTriggerToken { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.ContainerRegistryRunData 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.ContainerRegistry.ContainerRegistryRunData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -435,6 +441,7 @@ public ContainerRegistryTaskData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryTaskStepProperties Step { get { throw null; } set { } } public int? TimeoutInSeconds { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryTriggerProperties Trigger { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.ContainerRegistryTaskData 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.ContainerRegistry.ContainerRegistryTaskData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -494,6 +501,7 @@ public ContainerRegistryTaskRunData() { } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRunContent RunRequest { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.ContainerRegistryRunData RunResult { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.ContainerRegistryTaskRunData 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.ContainerRegistry.ContainerRegistryTaskRunData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -546,6 +554,7 @@ public ContainerRegistryTokenData() { } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState? ProvisioningState { get { throw null; } } public Azure.Core.ResourceIdentifier ScopeMapId { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryTokenStatus? Status { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.ContainerRegistryTokenData 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.ContainerRegistry.ContainerRegistryTokenData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -595,6 +604,7 @@ public ContainerRegistryWebhookData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState? ProvisioningState { get { throw null; } } public string Scope { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryWebhookStatus? Status { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.ContainerRegistryWebhookData 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.ContainerRegistry.ContainerRegistryWebhookData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -657,6 +667,7 @@ public ScopeMapData() { } public string Description { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState? ProvisioningState { get { throw null; } } public string ScopeMapType { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.ScopeMapData 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.ContainerRegistry.ScopeMapData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -790,6 +801,7 @@ public partial class ContainerRegistryAgentPoolPatch : System.ClientModel.Primit public ContainerRegistryAgentPoolPatch() { } public int? Count { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryAgentPoolPatch 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.ContainerRegistry.Models.ContainerRegistryAgentPoolPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -800,6 +812,7 @@ public partial class ContainerRegistryAgentPoolQueueStatus : System.ClientModel. { internal ContainerRegistryAgentPoolQueueStatus() { } public int? Count { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryAgentPoolQueueStatus 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.ContainerRegistry.Models.ContainerRegistryAgentPoolQueueStatus System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -814,6 +827,7 @@ internal ContainerRegistryBaseImageDependency() { } public string Registry { get { throw null; } } public string Repository { get { throw null; } } public string Tag { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryBaseImageDependency 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.ContainerRegistry.Models.ContainerRegistryBaseImageDependency System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -846,6 +860,7 @@ public ContainerRegistryBaseImageTrigger(Azure.ResourceManager.ContainerRegistry public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryTriggerStatus? Status { get { throw null; } set { } } public string UpdateTriggerEndpoint { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryUpdateTriggerPayloadType? UpdateTriggerPayloadType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryBaseImageTrigger 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.ContainerRegistry.Models.ContainerRegistryBaseImageTrigger System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -878,6 +893,7 @@ public ContainerRegistryBaseImageTriggerUpdateContent(string name) { } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryTriggerStatus? Status { get { throw null; } set { } } public string UpdateTriggerEndpoint { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryUpdateTriggerPayloadType? UpdateTriggerPayloadType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryBaseImageTriggerUpdateContent 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.ContainerRegistry.Models.ContainerRegistryBaseImageTriggerUpdateContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -907,6 +923,7 @@ public partial class ContainerRegistryCredentialRegenerateContent : System.Clien { public ContainerRegistryCredentialRegenerateContent(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPasswordName name) { } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPasswordName Name { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryCredentialRegenerateContent 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.ContainerRegistry.Models.ContainerRegistryCredentialRegenerateContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -918,6 +935,7 @@ public partial class ContainerRegistryCredentials : System.ClientModel.Primitive public ContainerRegistryCredentials() { } public System.Collections.Generic.IDictionary CustomRegistries { get { throw null; } } public Azure.ResourceManager.ContainerRegistry.Models.SourceRegistryLoginMode? SourceRegistryLoginMode { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryCredentials 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.ContainerRegistry.Models.ContainerRegistryCredentials System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -938,6 +956,7 @@ public ContainerRegistryDockerBuildContent(string dockerFilePath, Azure.Resource public string SourceLocation { get { throw null; } set { } } public string Target { get { throw null; } set { } } public int? TimeoutInSeconds { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryDockerBuildContent 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.ContainerRegistry.Models.ContainerRegistryDockerBuildContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -953,6 +972,7 @@ public ContainerRegistryDockerBuildStep(string dockerFilePath) { } public bool? IsPushEnabled { get { throw null; } set { } } public bool? NoCache { get { throw null; } set { } } public string Target { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryDockerBuildStep 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.ContainerRegistry.Models.ContainerRegistryDockerBuildStep System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -968,6 +988,7 @@ public ContainerRegistryDockerBuildStepUpdateContent() { } public bool? IsPushEnabled { get { throw null; } set { } } public bool? NoCache { get { throw null; } set { } } public string Target { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryDockerBuildStepUpdateContent 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.ContainerRegistry.Models.ContainerRegistryDockerBuildStepUpdateContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -985,6 +1006,7 @@ public ContainerRegistryEncodedTaskRunContent(string encodedTaskContent, Azure.R public string SourceLocation { get { throw null; } set { } } public int? TimeoutInSeconds { get { throw null; } set { } } public System.Collections.Generic.IList Values { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryEncodedTaskRunContent 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.ContainerRegistry.Models.ContainerRegistryEncodedTaskRunContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -997,6 +1019,7 @@ public ContainerRegistryEncodedTaskStep(string encodedTaskContent) { } public string EncodedTaskContent { get { throw null; } set { } } public string EncodedValuesContent { get { throw null; } set { } } public System.Collections.Generic.IList Values { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryEncodedTaskStep 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.ContainerRegistry.Models.ContainerRegistryEncodedTaskStep System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1009,6 +1032,7 @@ public ContainerRegistryEncodedTaskStepUpdateContent() { } public string EncodedTaskContent { get { throw null; } set { } } public string EncodedValuesContent { get { throw null; } set { } } public System.Collections.Generic.IList Values { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryEncodedTaskStepUpdateContent 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.ContainerRegistry.Models.ContainerRegistryEncodedTaskStepUpdateContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1020,6 +1044,7 @@ public partial class ContainerRegistryEncryption : System.ClientModel.Primitives public ContainerRegistryEncryption() { } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryKeyVaultProperties KeyVaultProperties { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryEncryptionStatus? Status { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryEncryption 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.ContainerRegistry.Models.ContainerRegistryEncryption System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1073,6 +1098,7 @@ public ContainerRegistryFileTaskRunContent(string taskFilePath, Azure.ResourceMa public int? TimeoutInSeconds { get { throw null; } set { } } public System.Collections.Generic.IList Values { get { throw null; } } public string ValuesFilePath { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryFileTaskRunContent 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.ContainerRegistry.Models.ContainerRegistryFileTaskRunContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1085,6 +1111,7 @@ public ContainerRegistryFileTaskStep(string taskFilePath) { } public string TaskFilePath { get { throw null; } set { } } public System.Collections.Generic.IList Values { get { throw null; } } public string ValuesFilePath { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryFileTaskStep 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.ContainerRegistry.Models.ContainerRegistryFileTaskStep System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1097,6 +1124,7 @@ public ContainerRegistryFileTaskStepUpdateContent() { } public string TaskFilePath { get { throw null; } set { } } public System.Collections.Generic.IList Values { get { throw null; } } public string ValuesFilePath { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryFileTaskStepUpdateContent 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.ContainerRegistry.Models.ContainerRegistryFileTaskStepUpdateContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1109,6 +1137,7 @@ public ContainerRegistryGenerateCredentialsContent() { } public System.DateTimeOffset? ExpireOn { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryTokenPasswordName? Name { get { throw null; } set { } } public Azure.Core.ResourceIdentifier TokenId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryGenerateCredentialsContent 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.ContainerRegistry.Models.ContainerRegistryGenerateCredentialsContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1120,6 +1149,7 @@ public partial class ContainerRegistryGenerateCredentialsResult : System.ClientM internal ContainerRegistryGenerateCredentialsResult() { } public System.Collections.Generic.IReadOnlyList Passwords { get { throw null; } } public string Username { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryGenerateCredentialsResult 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.ContainerRegistry.Models.ContainerRegistryGenerateCredentialsResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1133,6 +1163,7 @@ public ContainerRegistryImageDescriptor() { } public string Registry { get { throw null; } set { } } public string Repository { get { throw null; } set { } } public string Tag { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryImageDescriptor 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.ContainerRegistry.Models.ContainerRegistryImageDescriptor System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1145,6 +1176,7 @@ public ContainerRegistryImageUpdateTrigger() { } public System.Guid? Id { get { throw null; } set { } } public System.Collections.Generic.IList Images { get { throw null; } } public System.DateTimeOffset? Timestamp { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryImageUpdateTrigger 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.ContainerRegistry.Models.ContainerRegistryImageUpdateTrigger System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1158,6 +1190,7 @@ public ContainerRegistryImportImageContent(Azure.ResourceManager.ContainerRegist public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryImportSource Source { get { throw null; } } public System.Collections.Generic.IList TargetTags { get { throw null; } } public System.Collections.Generic.IList UntaggedTargetRepositories { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryImportImageContent 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.ContainerRegistry.Models.ContainerRegistryImportImageContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1192,6 +1225,7 @@ public ContainerRegistryImportSource(string sourceImage) { } public System.Uri RegistryUri { get { throw null; } set { } } public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } set { } } public string SourceImage { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryImportSource 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.ContainerRegistry.Models.ContainerRegistryImportSource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1203,6 +1237,7 @@ public partial class ContainerRegistryImportSourceCredentials : System.ClientMod public ContainerRegistryImportSourceCredentials(string password) { } public string Password { get { throw null; } } public string Username { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryImportSourceCredentials 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.ContainerRegistry.Models.ContainerRegistryImportSourceCredentials System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1214,6 +1249,7 @@ public partial class ContainerRegistryIPRule : System.ClientModel.Primitives.IJs public ContainerRegistryIPRule(string ipAddressOrRange) { } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryIPRuleAction? Action { get { throw null; } set { } } public string IPAddressOrRange { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryIPRule 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.ContainerRegistry.Models.ContainerRegistryIPRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1245,6 +1281,7 @@ public ContainerRegistryKeyVaultProperties() { } public string KeyIdentifier { get { throw null; } set { } } public System.DateTimeOffset? LastKeyRotationTimestamp { get { throw null; } } public string VersionedKeyIdentifier { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryKeyVaultProperties 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.ContainerRegistry.Models.ContainerRegistryKeyVaultProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1256,6 +1293,7 @@ public partial class ContainerRegistryListCredentialsResult : System.ClientModel internal ContainerRegistryListCredentialsResult() { } public System.Collections.Generic.IReadOnlyList Passwords { get { throw null; } } public string Username { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryListCredentialsResult 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.ContainerRegistry.Models.ContainerRegistryListCredentialsResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1267,6 +1305,7 @@ public partial class ContainerRegistryNameAvailabilityContent : System.ClientMod public ContainerRegistryNameAvailabilityContent(string name) { } public string Name { get { throw null; } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryResourceType ResourceType { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNameAvailabilityContent 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.ContainerRegistry.Models.ContainerRegistryNameAvailabilityContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1279,6 +1318,7 @@ internal ContainerRegistryNameAvailableResult() { } public bool? IsNameAvailable { get { throw null; } } public string Message { get { throw null; } } public string Reason { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNameAvailableResult 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.ContainerRegistry.Models.ContainerRegistryNameAvailableResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1326,6 +1366,7 @@ public partial class ContainerRegistryNetworkRuleSet : System.ClientModel.Primit public ContainerRegistryNetworkRuleSet(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNetworkRuleDefaultAction defaultAction) { } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNetworkRuleDefaultAction DefaultAction { get { throw null; } set { } } public System.Collections.Generic.IList IPRules { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNetworkRuleSet 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.ContainerRegistry.Models.ContainerRegistryNetworkRuleSet System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1380,6 +1421,7 @@ public ContainerRegistryOverrideTaskStepProperties() { } public string Target { get { throw null; } set { } } public string UpdateTriggerToken { get { throw null; } set { } } public System.Collections.Generic.IList Values { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryOverrideTaskStepProperties 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.ContainerRegistry.Models.ContainerRegistryOverrideTaskStepProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1391,6 +1433,7 @@ public partial class ContainerRegistryPassword : System.ClientModel.Primitives.I internal ContainerRegistryPassword() { } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPasswordName? Name { get { throw null; } } public string Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPassword 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.ContainerRegistry.Models.ContainerRegistryPassword System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1415,6 +1458,7 @@ public ContainerRegistryPatch() { } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPublicNetworkAccess? PublicNetworkAccess { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistrySku Sku { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPatch 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.ContainerRegistry.Models.ContainerRegistryPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1427,6 +1471,7 @@ public ContainerRegistryPlatformProperties(Azure.ResourceManager.ContainerRegist public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryOSArchitecture? Architecture { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryOS OS { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryCpuVariant? Variant { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPlatformProperties 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.ContainerRegistry.Models.ContainerRegistryPlatformProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1439,6 +1484,7 @@ public ContainerRegistryPlatformUpdateContent() { } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryOSArchitecture? Architecture { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryOS? OS { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryCpuVariant? Variant { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPlatformUpdateContent 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.ContainerRegistry.Models.ContainerRegistryPlatformUpdateContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1452,6 +1498,7 @@ public ContainerRegistryPolicies() { } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPolicyStatus? QuarantineStatus { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRetentionPolicy RetentionPolicy { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryTrustPolicy TrustPolicy { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPolicies 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.ContainerRegistry.Models.ContainerRegistryPolicies System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1482,6 +1529,7 @@ public ContainerRegistryPrivateLinkServiceConnectionState() { } public Azure.ResourceManager.ContainerRegistry.Models.ActionsRequiredForPrivateLinkServiceConsumer? ActionsRequired { get { throw null; } set { } } public string Description { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPrivateLinkServiceConnectionStatus? Status { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPrivateLinkServiceConnectionState 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.ContainerRegistry.Models.ContainerRegistryPrivateLinkServiceConnectionState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1553,6 +1601,7 @@ public partial class ContainerRegistryReplicationPatch : System.ClientModel.Prim public ContainerRegistryReplicationPatch() { } public bool? IsRegionEndpointEnabled { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryReplicationPatch 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.ContainerRegistry.Models.ContainerRegistryReplicationPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1565,6 +1614,7 @@ internal ContainerRegistryResourceStatus() { } public string DisplayStatus { get { throw null; } } public string Message { get { throw null; } } public System.DateTimeOffset? Timestamp { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryResourceStatus 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.ContainerRegistry.Models.ContainerRegistryResourceStatus System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1594,6 +1644,7 @@ public ContainerRegistryRetentionPolicy() { } public int? Days { get { throw null; } set { } } public System.DateTimeOffset? LastUpdatedOn { get { throw null; } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPolicyStatus? Status { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRetentionPolicy 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.ContainerRegistry.Models.ContainerRegistryRetentionPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1606,6 +1657,7 @@ public ContainerRegistryRunArgument(string name, string value) { } public bool? IsSecret { get { throw null; } set { } } public string Name { get { throw null; } set { } } public string Value { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRunArgument 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.ContainerRegistry.Models.ContainerRegistryRunArgument System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1618,6 +1670,7 @@ protected ContainerRegistryRunContent() { } public string AgentPoolName { get { throw null; } set { } } public bool? IsArchiveEnabled { get { throw null; } set { } } public string LogTemplate { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRunContent 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.ContainerRegistry.Models.ContainerRegistryRunContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1629,6 +1682,7 @@ public partial class ContainerRegistryRunGetLogResult : System.ClientModel.Primi internal ContainerRegistryRunGetLogResult() { } public string LogArtifactLink { get { throw null; } } public string LogLink { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRunGetLogResult 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.ContainerRegistry.Models.ContainerRegistryRunGetLogResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1639,6 +1693,7 @@ public partial class ContainerRegistryRunPatch : System.ClientModel.Primitives.I { public ContainerRegistryRunPatch() { } public bool? IsArchiveEnabled { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRunPatch 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.ContainerRegistry.Models.ContainerRegistryRunPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1694,6 +1749,7 @@ public partial class ContainerRegistrySecretObject : System.ClientModel.Primitiv public ContainerRegistrySecretObject() { } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistrySecretObjectType? ObjectType { get { throw null; } set { } } public string Value { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistrySecretObject 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.ContainerRegistry.Models.ContainerRegistrySecretObject System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1723,6 +1779,7 @@ public partial class ContainerRegistrySku : System.ClientModel.Primitives.IJsonM public ContainerRegistrySku(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistrySkuName name) { } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistrySkuName Name { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistrySkuTier? Tier { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistrySku 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.ContainerRegistry.Models.ContainerRegistrySku System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1776,6 +1833,7 @@ public ContainerRegistrySourceTrigger(Azure.ResourceManager.ContainerRegistry.Mo public Azure.ResourceManager.ContainerRegistry.Models.SourceCodeRepoProperties SourceRepository { get { throw null; } set { } } public System.Collections.Generic.IList SourceTriggerEvents { get { throw null; } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryTriggerStatus? Status { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistrySourceTrigger 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.ContainerRegistry.Models.ContainerRegistrySourceTrigger System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1792,6 +1850,7 @@ public ContainerRegistrySourceTriggerDescriptor() { } public string ProviderType { get { throw null; } set { } } public string PullRequestId { get { throw null; } set { } } public System.Uri RepositoryUri { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistrySourceTriggerDescriptor 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.ContainerRegistry.Models.ContainerRegistrySourceTriggerDescriptor System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1823,6 +1882,7 @@ public ContainerRegistrySourceTriggerUpdateContent(string name) { } public Azure.ResourceManager.ContainerRegistry.Models.SourceCodeRepoUpdateContent SourceRepository { get { throw null; } set { } } public System.Collections.Generic.IList SourceTriggerEvents { get { throw null; } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryTriggerStatus? Status { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistrySourceTriggerUpdateContent 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.ContainerRegistry.Models.ContainerRegistrySourceTriggerUpdateContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1835,6 +1895,7 @@ public ContainerRegistryTaskOverridableValue(string name, string value) { } public bool? IsSecret { get { throw null; } set { } } public string Name { get { throw null; } set { } } public string Value { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryTaskOverridableValue 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.ContainerRegistry.Models.ContainerRegistryTaskOverridableValue System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1855,6 +1916,7 @@ public ContainerRegistryTaskPatch() { } public System.Collections.Generic.IDictionary Tags { get { throw null; } } public int? TimeoutInSeconds { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryTriggerUpdateContent Trigger { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryTaskPatch 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.ContainerRegistry.Models.ContainerRegistryTaskPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1866,6 +1928,7 @@ public partial class ContainerRegistryTaskRunContent : Azure.ResourceManager.Con public ContainerRegistryTaskRunContent(Azure.Core.ResourceIdentifier taskId) { } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryOverrideTaskStepProperties OverrideTaskStepProperties { get { throw null; } set { } } public Azure.Core.ResourceIdentifier TaskId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryTaskRunContent 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.ContainerRegistry.Models.ContainerRegistryTaskRunContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1880,6 +1943,7 @@ public ContainerRegistryTaskRunPatch() { } public Azure.Core.AzureLocation? Location { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRunContent RunRequest { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryTaskRunPatch 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.ContainerRegistry.Models.ContainerRegistryTaskRunPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1910,6 +1974,7 @@ protected ContainerRegistryTaskStepProperties() { } public System.Collections.Generic.IReadOnlyList BaseImageDependencies { get { throw null; } } public string ContextAccessToken { get { throw null; } set { } } public string ContextPath { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryTaskStepProperties 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.ContainerRegistry.Models.ContainerRegistryTaskStepProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1921,6 +1986,7 @@ public abstract partial class ContainerRegistryTaskStepUpdateContent : System.Cl protected ContainerRegistryTaskStepUpdateContent() { } public string ContextAccessToken { get { throw null; } set { } } public string ContextPath { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryTaskStepUpdateContent 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.ContainerRegistry.Models.ContainerRegistryTaskStepUpdateContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1933,6 +1999,7 @@ public ContainerRegistryTimerTrigger(string schedule, string name) { } public string Name { get { throw null; } set { } } public string Schedule { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryTriggerStatus? Status { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryTimerTrigger 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.ContainerRegistry.Models.ContainerRegistryTimerTrigger System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1944,6 +2011,7 @@ public partial class ContainerRegistryTimerTriggerDescriptor : System.ClientMode public ContainerRegistryTimerTriggerDescriptor() { } public string ScheduleOccurrence { get { throw null; } set { } } public string TimerTriggerName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryTimerTriggerDescriptor 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.ContainerRegistry.Models.ContainerRegistryTimerTriggerDescriptor System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1956,6 +2024,7 @@ public ContainerRegistryTimerTriggerUpdateContent(string name) { } public string Name { get { throw null; } } public string Schedule { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryTriggerStatus? Status { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryTimerTriggerUpdateContent 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.ContainerRegistry.Models.ContainerRegistryTimerTriggerUpdateContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1969,6 +2038,7 @@ public ContainerRegistryTokenCertificate() { } public System.DateTimeOffset? ExpireOn { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryTokenCertificateName? Name { get { throw null; } set { } } public string Thumbprint { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryTokenCertificate 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.ContainerRegistry.Models.ContainerRegistryTokenCertificate System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1998,6 +2068,7 @@ public partial class ContainerRegistryTokenCredentials : System.ClientModel.Prim public ContainerRegistryTokenCredentials() { } public System.Collections.Generic.IList Certificates { get { throw null; } } public System.Collections.Generic.IList Passwords { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryTokenCredentials 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.ContainerRegistry.Models.ContainerRegistryTokenCredentials System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2011,6 +2082,7 @@ public ContainerRegistryTokenPassword() { } public System.DateTimeOffset? ExpireOn { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryTokenPasswordName? Name { get { throw null; } set { } } public string Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryTokenPassword 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.ContainerRegistry.Models.ContainerRegistryTokenPassword System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2041,6 +2113,7 @@ public ContainerRegistryTokenPatch() { } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryTokenCredentials Credentials { get { throw null; } set { } } public Azure.Core.ResourceIdentifier ScopeMapId { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryTokenStatus? Status { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryTokenPatch 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.ContainerRegistry.Models.ContainerRegistryTokenPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2071,6 +2144,7 @@ public ContainerRegistryTriggerProperties() { } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryBaseImageTrigger BaseImageTrigger { get { throw null; } set { } } public System.Collections.Generic.IList SourceTriggers { get { throw null; } } public System.Collections.Generic.IList TimerTriggers { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryTriggerProperties 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.ContainerRegistry.Models.ContainerRegistryTriggerProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2101,6 +2175,7 @@ public ContainerRegistryTriggerUpdateContent() { } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryBaseImageTriggerUpdateContent BaseImageTrigger { get { throw null; } set { } } public System.Collections.Generic.IList SourceTriggers { get { throw null; } } public System.Collections.Generic.IList TimerTriggers { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryTriggerUpdateContent 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.ContainerRegistry.Models.ContainerRegistryTriggerUpdateContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2112,6 +2187,7 @@ public partial class ContainerRegistryTrustPolicy : System.ClientModel.Primitive public ContainerRegistryTrustPolicy() { } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryTrustPolicyType? PolicyType { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPolicyStatus? Status { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryTrustPolicy 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.ContainerRegistry.Models.ContainerRegistryTrustPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2160,6 +2236,7 @@ internal ContainerRegistryUsage() { } public long? Limit { get { throw null; } } public string Name { get { throw null; } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryUsageUnit? Unit { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryUsage 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.ContainerRegistry.Models.ContainerRegistryUsage System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2210,6 +2287,7 @@ public partial class ContainerRegistryWebhookCallbackConfig : System.ClientModel internal ContainerRegistryWebhookCallbackConfig() { } public System.Collections.Generic.IReadOnlyDictionary CustomHeaders { get { throw null; } } public System.Uri ServiceUri { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryWebhookCallbackConfig 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.ContainerRegistry.Models.ContainerRegistryWebhookCallbackConfig System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2226,6 +2304,7 @@ public ContainerRegistryWebhookCreateOrUpdateContent(Azure.Core.AzureLocation lo public System.Uri ServiceUri { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryWebhookStatus? Status { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryWebhookCreateOrUpdateContent 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.ContainerRegistry.Models.ContainerRegistryWebhookCreateOrUpdateContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2237,6 +2316,7 @@ public partial class ContainerRegistryWebhookEvent : Azure.ResourceManager.Conta internal ContainerRegistryWebhookEvent() { } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryWebhookEventRequestMessage EventRequestMessage { get { throw null; } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryWebhookEventResponseMessage EventResponseMessage { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryWebhookEvent 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.ContainerRegistry.Models.ContainerRegistryWebhookEvent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2253,6 +2333,7 @@ internal ContainerRegistryWebhookEventContent() { } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryWebhookEventSource Source { get { throw null; } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryWebhookEventTarget Target { get { throw null; } } public System.DateTimeOffset? Timestamp { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryWebhookEventContent 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.ContainerRegistry.Models.ContainerRegistryWebhookEventContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2263,6 +2344,7 @@ public partial class ContainerRegistryWebhookEventInfo : System.ClientModel.Prim { internal ContainerRegistryWebhookEventInfo() { } public System.Guid? Id { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryWebhookEventInfo 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.ContainerRegistry.Models.ContainerRegistryWebhookEventInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2277,6 +2359,7 @@ internal ContainerRegistryWebhookEventRequestContent() { } public System.Guid? Id { get { throw null; } } public string Method { get { throw null; } } public string UserAgent { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryWebhookEventRequestContent 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.ContainerRegistry.Models.ContainerRegistryWebhookEventRequestContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2291,6 +2374,7 @@ internal ContainerRegistryWebhookEventRequestMessage() { } public string Method { get { throw null; } } public System.Uri RequestUri { get { throw null; } } public string Version { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryWebhookEventRequestMessage 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.ContainerRegistry.Models.ContainerRegistryWebhookEventRequestMessage System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2305,6 +2389,7 @@ internal ContainerRegistryWebhookEventResponseMessage() { } public string ReasonPhrase { get { throw null; } } public string StatusCode { get { throw null; } } public string Version { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryWebhookEventResponseMessage 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.ContainerRegistry.Models.ContainerRegistryWebhookEventResponseMessage System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2316,6 +2401,7 @@ public partial class ContainerRegistryWebhookEventSource : System.ClientModel.Pr internal ContainerRegistryWebhookEventSource() { } public string Addr { get { throw null; } } public string InstanceId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryWebhookEventSource 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.ContainerRegistry.Models.ContainerRegistryWebhookEventSource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2334,6 +2420,7 @@ internal ContainerRegistryWebhookEventTarget() { } public string Tag { get { throw null; } } public System.Uri Uri { get { throw null; } } public string Version { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryWebhookEventTarget 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.ContainerRegistry.Models.ContainerRegistryWebhookEventTarget System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2349,6 +2436,7 @@ public ContainerRegistryWebhookPatch() { } public System.Uri ServiceUri { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryWebhookStatus? Status { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryWebhookPatch 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.ContainerRegistry.Models.ContainerRegistryWebhookPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2397,6 +2485,7 @@ public CustomRegistryCredentials() { } public string Identity { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistrySecretObject Password { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistrySecretObject UserName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.Models.CustomRegistryCredentials 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.ContainerRegistry.Models.CustomRegistryCredentials System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2408,6 +2497,7 @@ public partial class ScopeMapPatch : System.ClientModel.Primitives.IJsonModel Actions { get { throw null; } } public string Description { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.Models.ScopeMapPatch 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.ContainerRegistry.Models.ScopeMapPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2422,6 +2512,7 @@ public SourceCodeRepoAuthInfo(Azure.ResourceManager.ContainerRegistry.Models.Sou public string Scope { get { throw null; } set { } } public string Token { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.Models.SourceCodeRepoAuthTokenType TokenType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.Models.SourceCodeRepoAuthInfo 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.ContainerRegistry.Models.SourceCodeRepoAuthInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2436,6 +2527,7 @@ public SourceCodeRepoAuthInfoUpdateContent() { } public string Scope { get { throw null; } set { } } public string Token { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.Models.SourceCodeRepoAuthTokenType? TokenType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.Models.SourceCodeRepoAuthInfoUpdateContent 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.ContainerRegistry.Models.SourceCodeRepoAuthInfoUpdateContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2467,6 +2559,7 @@ public SourceCodeRepoProperties(Azure.ResourceManager.ContainerRegistry.Models.S public System.Uri RepositoryUri { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.Models.SourceCodeRepoAuthInfo SourceControlAuthProperties { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.Models.SourceControlType SourceControlType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.Models.SourceCodeRepoProperties 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.ContainerRegistry.Models.SourceCodeRepoProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2480,6 +2573,7 @@ public SourceCodeRepoUpdateContent() { } public System.Uri RepositoryUri { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.Models.SourceCodeRepoAuthInfoUpdateContent SourceControlAuthProperties { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.Models.SourceControlType? SourceControlType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.Models.SourceCodeRepoUpdateContent 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.ContainerRegistry.Models.SourceCodeRepoUpdateContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2527,6 +2621,7 @@ public partial class SourceUploadDefinition : System.ClientModel.Primitives.IJso internal SourceUploadDefinition() { } public string RelativePath { get { throw null; } } public System.Uri UploadUri { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.Models.SourceUploadDefinition 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.ContainerRegistry.Models.SourceUploadDefinition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/assets.json b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/assets.json index 6152a5d33977..af96147e0919 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/assets.json +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/containerregistry/Azure.ResourceManager.ContainerRegistry", - "Tag": "net/containerregistry/Azure.ResourceManager.ContainerRegistry_34759b85ca" + "Tag": "net/containerregistry/Azure.ResourceManager.ContainerRegistry_6cf6b7291a" } diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Azure.ResourceManager.ContainerRegistry.csproj b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Azure.ResourceManager.ContainerRegistry.csproj index 4553b4277b26..1848071ff865 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Azure.ResourceManager.ContainerRegistry.csproj +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Azure.ResourceManager.ContainerRegistry.csproj @@ -1,6 +1,6 @@ - 1.3.0-beta.1 + 1.3.0-beta.2 1.2.1 Azure.ResourceManager.ContainerRegistry diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryAgentPoolData.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryAgentPoolData.Serialization.cs index 2697e280c0a2..6902c7c0afbe 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryAgentPoolData.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryAgentPoolData.Serialization.cs @@ -22,6 +22,15 @@ public partial class ContainerRegistryAgentPoolData : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -29,40 +38,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(ContainerRegistryAgentPoolData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Count)) @@ -91,22 +67,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ContainerRegistryAgentPoolData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryData.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryData.Serialization.cs index 36a142cf14b6..3261e8a8e542 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryData.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryData.Serialization.cs @@ -22,6 +22,15 @@ public partial class ContainerRegistryData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -29,7 +38,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(ContainerRegistryData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("sku"u8); writer.WriteObjectValue(Sku, options); if (Optional.IsDefined(Identity)) @@ -37,39 +46,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW writer.WritePropertyName("identity"u8); JsonSerializer.Serialize(writer, Identity); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(LoginServer)) @@ -153,22 +129,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW writer.WriteStringValue(ZoneRedundancy.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ContainerRegistryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryPrivateEndpointConnectionData.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryPrivateEndpointConnectionData.Serialization.cs index d5c1edf79cfe..0738944ec839 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryPrivateEndpointConnectionData.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryPrivateEndpointConnectionData.Serialization.cs @@ -22,6 +22,15 @@ public partial class ContainerRegistryPrivateEndpointConnectionData : IUtf8JsonS void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -29,27 +38,7 @@ void IJsonModel.Write(Utf8JsonWr throw new FormatException($"The model {nameof(ContainerRegistryPrivateEndpointConnectionData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(PrivateEndpoint)) @@ -68,22 +57,6 @@ void IJsonModel.Write(Utf8JsonWr writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ContainerRegistryPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryPrivateLinkResourceData.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryPrivateLinkResourceData.Serialization.cs index 0d67ee1e9c54..4eeef42ee6f3 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryPrivateLinkResourceData.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryPrivateLinkResourceData.Serialization.cs @@ -21,6 +21,15 @@ public partial class ContainerRegistryPrivateLinkResourceData : IUtf8JsonSeriali void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,27 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter w throw new FormatException($"The model {nameof(ContainerRegistryPrivateLinkResourceData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(GroupId)) @@ -77,22 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter w writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ContainerRegistryPrivateLinkResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryReplicationData.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryReplicationData.Serialization.cs index ee82da1ca54c..8c4a2b7ab951 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryReplicationData.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryReplicationData.Serialization.cs @@ -22,6 +22,15 @@ public partial class ContainerRegistryReplicationData : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -29,40 +38,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(ContainerRegistryReplicationData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) @@ -86,22 +62,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M writer.WriteStringValue(ZoneRedundancy.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ContainerRegistryReplicationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryRunData.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryRunData.Serialization.cs index 0384c223e750..a098e82fa287 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryRunData.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryRunData.Serialization.cs @@ -22,6 +22,15 @@ public partial class ContainerRegistryRunData : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -29,27 +38,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(ContainerRegistryRunData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(RunId)) @@ -173,22 +162,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead writer.WriteBooleanValue(IsArchiveEnabled.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ContainerRegistryRunData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryTaskData.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryTaskData.Serialization.cs index 6831d6f736b2..74eaeff245ac 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryTaskData.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryTaskData.Serialization.cs @@ -22,6 +22,15 @@ public partial class ContainerRegistryTaskData : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -29,45 +38,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(ContainerRegistryTaskData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); JsonSerializer.Serialize(writer, Identity); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) @@ -131,22 +107,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea writer.WriteBooleanValue(IsSystemTask.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ContainerRegistryTaskData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryTaskRunData.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryTaskRunData.Serialization.cs index f9277324dbee..614e41d15ade 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryTaskRunData.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryTaskRunData.Serialization.cs @@ -21,6 +21,15 @@ public partial class ContainerRegistryTaskRunData : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,7 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(ContainerRegistryTaskRunData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); @@ -39,26 +48,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model writer.WritePropertyName("location"u8); writer.WriteStringValue(Location.Value); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) @@ -82,22 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model writer.WriteStringValue(ForceUpdateTag); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ContainerRegistryTaskRunData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryTokenData.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryTokenData.Serialization.cs index 2e5282cf1f86..8a836b87f277 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryTokenData.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryTokenData.Serialization.cs @@ -21,6 +21,15 @@ public partial class ContainerRegistryTokenData : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,27 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(ContainerRegistryTokenData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(CreatedOn)) @@ -77,22 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe writer.WriteStringValue(Status.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ContainerRegistryTokenData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryWebhookData.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryWebhookData.Serialization.cs index 323768e46ca2..1a927818cfe6 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryWebhookData.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryWebhookData.Serialization.cs @@ -22,6 +22,15 @@ public partial class ContainerRegistryWebhookData : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -29,40 +38,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(ContainerRegistryWebhookData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Status)) @@ -91,22 +67,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ContainerRegistryWebhookData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryAgentPoolListResult.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryAgentPoolListResult.Serialization.cs index e663eb410ee9..66f872f014c4 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryAgentPoolListResult.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryAgentPoolListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class ContainerRegistryAgentPoolListResult : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(ContainerRegistryAgentPoolListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } ContainerRegistryAgentPoolListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryAgentPoolPatch.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryAgentPoolPatch.Serialization.cs index 634fb18370b6..8c857942dadb 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryAgentPoolPatch.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryAgentPoolPatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class ContainerRegistryAgentPoolPatch : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(ContainerRegistryAgentPoolPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -60,7 +68,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } ContainerRegistryAgentPoolPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryAgentPoolQueueStatus.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryAgentPoolQueueStatus.Serialization.cs index 48ac91e72e8f..070ef64d79cd 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryAgentPoolQueueStatus.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryAgentPoolQueueStatus.Serialization.cs @@ -19,6 +19,15 @@ public partial class ContainerRegistryAgentPoolQueueStatus : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(ContainerRegistryAgentPoolQueueStatus)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Count)) { writer.WritePropertyName("count"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } ContainerRegistryAgentPoolQueueStatus IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryAgentProperties.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryAgentProperties.Serialization.cs index 3a362a68e5ac..fb90273a3e20 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryAgentProperties.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryAgentProperties.Serialization.cs @@ -19,6 +19,15 @@ internal partial class ContainerRegistryAgentProperties : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(ContainerRegistryAgentProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Cpu)) { writer.WritePropertyName("cpu"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } ContainerRegistryAgentProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryBaseImageDependency.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryBaseImageDependency.Serialization.cs index eff6f23ae301..64e168365e51 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryBaseImageDependency.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryBaseImageDependency.Serialization.cs @@ -19,6 +19,15 @@ public partial class ContainerRegistryBaseImageDependency : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(ContainerRegistryBaseImageDependency)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(DependencyType)) { writer.WritePropertyName("type"u8); @@ -67,7 +75,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } ContainerRegistryBaseImageDependency IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryBaseImageTrigger.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryBaseImageTrigger.Serialization.cs index a6929ac70827..8af258818408 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryBaseImageTrigger.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryBaseImageTrigger.Serialization.cs @@ -19,6 +19,15 @@ public partial class ContainerRegistryBaseImageTrigger : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(ContainerRegistryBaseImageTrigger)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("baseImageTriggerType"u8); writer.WriteStringValue(BaseImageTriggerType.ToString()); if (Optional.IsDefined(UpdateTriggerEndpoint)) @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } ContainerRegistryBaseImageTrigger IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryBaseImageTriggerUpdateContent.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryBaseImageTriggerUpdateContent.Serialization.cs index fe7c2cbe8ef9..63be3a4577fa 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryBaseImageTriggerUpdateContent.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryBaseImageTriggerUpdateContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class ContainerRegistryBaseImageTriggerUpdateContent : IUtf8JsonS void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWr throw new FormatException($"The model {nameof(ContainerRegistryBaseImageTriggerUpdateContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(BaseImageTriggerType)) { writer.WritePropertyName("baseImageTriggerType"u8); @@ -63,7 +71,6 @@ void IJsonModel.Write(Utf8JsonWr #endif } } - writer.WriteEndObject(); } ContainerRegistryBaseImageTriggerUpdateContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryCredentialRegenerateContent.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryCredentialRegenerateContent.Serialization.cs index b8dc55f9f2cd..b599be9d3cd2 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryCredentialRegenerateContent.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryCredentialRegenerateContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class ContainerRegistryCredentialRegenerateContent : IUtf8JsonSer void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWrit throw new FormatException($"The model {nameof(ContainerRegistryCredentialRegenerateContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name.ToSerialString()); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWrit #endif } } - writer.WriteEndObject(); } ContainerRegistryCredentialRegenerateContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryCredentials.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryCredentials.Serialization.cs index c4f48f9213e0..b563bc098074 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryCredentials.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryCredentials.Serialization.cs @@ -20,6 +20,15 @@ public partial class ContainerRegistryCredentials : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(ContainerRegistryCredentials)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(SourceRegistry)) { writer.WritePropertyName("sourceRegistry"u8); @@ -59,7 +67,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } ContainerRegistryCredentials IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryDockerBuildContent.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryDockerBuildContent.Serialization.cs index e67efaa2ea30..1160d09eadc9 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryDockerBuildContent.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryDockerBuildContent.Serialization.cs @@ -20,6 +20,15 @@ public partial class ContainerRegistryDockerBuildContent : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(ContainerRegistryDockerBuildContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(ImageNames)) { writer.WritePropertyName("imageNames"u8); @@ -87,39 +96,6 @@ void IJsonModel.Write(Utf8JsonWriter writer writer.WritePropertyName("credentials"u8); writer.WriteObjectValue(Credentials, options); } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(RunRequestType); - if (Optional.IsDefined(IsArchiveEnabled)) - { - writer.WritePropertyName("isArchiveEnabled"u8); - writer.WriteBooleanValue(IsArchiveEnabled.Value); - } - if (Optional.IsDefined(AgentPoolName)) - { - writer.WritePropertyName("agentPoolName"u8); - writer.WriteStringValue(AgentPoolName); - } - if (Optional.IsDefined(LogTemplate)) - { - writer.WritePropertyName("logTemplate"u8); - writer.WriteStringValue(LogTemplate); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ContainerRegistryDockerBuildContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryDockerBuildStep.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryDockerBuildStep.Serialization.cs index ffdb8bc2b647..6a60167ab0fa 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryDockerBuildStep.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryDockerBuildStep.Serialization.cs @@ -20,6 +20,15 @@ public partial class ContainerRegistryDockerBuildStep : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(ContainerRegistryDockerBuildStep)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(ImageNames)) { writer.WritePropertyName("imageNames"u8); @@ -65,44 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M } writer.WriteEndArray(); } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ContainerRegistryTaskStepType.ToString()); - if (options.Format != "W" && Optional.IsCollectionDefined(BaseImageDependencies)) - { - writer.WritePropertyName("baseImageDependencies"u8); - writer.WriteStartArray(); - foreach (var item in BaseImageDependencies) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(ContextPath)) - { - writer.WritePropertyName("contextPath"u8); - writer.WriteStringValue(ContextPath); - } - if (Optional.IsDefined(ContextAccessToken)) - { - writer.WritePropertyName("contextAccessToken"u8); - writer.WriteStringValue(ContextAccessToken); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ContainerRegistryDockerBuildStep IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryDockerBuildStepUpdateContent.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryDockerBuildStepUpdateContent.Serialization.cs index 05c587ac13e3..c6c6f18b758b 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryDockerBuildStepUpdateContent.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryDockerBuildStepUpdateContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class ContainerRegistryDockerBuildStepUpdateContent : IUtf8JsonSe void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWri throw new FormatException($"The model {nameof(ContainerRegistryDockerBuildStepUpdateContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(ImageNames)) { writer.WritePropertyName("imageNames"u8); @@ -66,34 +75,6 @@ void IJsonModel.Write(Utf8JsonWri writer.WritePropertyName("target"u8); writer.WriteStringValue(Target); } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(StepType.ToString()); - if (Optional.IsDefined(ContextPath)) - { - writer.WritePropertyName("contextPath"u8); - writer.WriteStringValue(ContextPath); - } - if (Optional.IsDefined(ContextAccessToken)) - { - writer.WritePropertyName("contextAccessToken"u8); - writer.WriteStringValue(ContextAccessToken); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ContainerRegistryDockerBuildStepUpdateContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryEncodedTaskRunContent.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryEncodedTaskRunContent.Serialization.cs index 56cc8a1e0542..0189649a81c4 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryEncodedTaskRunContent.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryEncodedTaskRunContent.Serialization.cs @@ -20,6 +20,15 @@ public partial class ContainerRegistryEncodedTaskRunContent : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(ContainerRegistryEncodedTaskRunContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("encodedTaskContent"u8); writer.WriteStringValue(EncodedTaskContent); if (Optional.IsDefined(EncodedValuesContent)) @@ -67,39 +76,6 @@ void IJsonModel.Write(Utf8JsonWriter wri writer.WritePropertyName("credentials"u8); writer.WriteObjectValue(Credentials, options); } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(RunRequestType); - if (Optional.IsDefined(IsArchiveEnabled)) - { - writer.WritePropertyName("isArchiveEnabled"u8); - writer.WriteBooleanValue(IsArchiveEnabled.Value); - } - if (Optional.IsDefined(AgentPoolName)) - { - writer.WritePropertyName("agentPoolName"u8); - writer.WriteStringValue(AgentPoolName); - } - if (Optional.IsDefined(LogTemplate)) - { - writer.WritePropertyName("logTemplate"u8); - writer.WriteStringValue(LogTemplate); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ContainerRegistryEncodedTaskRunContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryEncodedTaskStep.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryEncodedTaskStep.Serialization.cs index c0b55ee9efba..3768c3fabf76 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryEncodedTaskStep.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryEncodedTaskStep.Serialization.cs @@ -20,6 +20,15 @@ public partial class ContainerRegistryEncodedTaskStep : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(ContainerRegistryEncodedTaskStep)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("encodedTaskContent"u8); writer.WriteStringValue(EncodedTaskContent); if (Optional.IsDefined(EncodedValuesContent)) @@ -45,44 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M } writer.WriteEndArray(); } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ContainerRegistryTaskStepType.ToString()); - if (options.Format != "W" && Optional.IsCollectionDefined(BaseImageDependencies)) - { - writer.WritePropertyName("baseImageDependencies"u8); - writer.WriteStartArray(); - foreach (var item in BaseImageDependencies) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(ContextPath)) - { - writer.WritePropertyName("contextPath"u8); - writer.WriteStringValue(ContextPath); - } - if (Optional.IsDefined(ContextAccessToken)) - { - writer.WritePropertyName("contextAccessToken"u8); - writer.WriteStringValue(ContextAccessToken); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ContainerRegistryEncodedTaskStep IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryEncodedTaskStepUpdateContent.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryEncodedTaskStepUpdateContent.Serialization.cs index 1aec732a39e5..520a205e4880 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryEncodedTaskStepUpdateContent.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryEncodedTaskStepUpdateContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class ContainerRegistryEncodedTaskStepUpdateContent : IUtf8JsonSe void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWri throw new FormatException($"The model {nameof(ContainerRegistryEncodedTaskStepUpdateContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(EncodedTaskContent)) { writer.WritePropertyName("encodedTaskContent"u8); @@ -46,34 +55,6 @@ void IJsonModel.Write(Utf8JsonWri } writer.WriteEndArray(); } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(StepType.ToString()); - if (Optional.IsDefined(ContextPath)) - { - writer.WritePropertyName("contextPath"u8); - writer.WriteStringValue(ContextPath); - } - if (Optional.IsDefined(ContextAccessToken)) - { - writer.WritePropertyName("contextAccessToken"u8); - writer.WriteStringValue(ContextAccessToken); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ContainerRegistryEncodedTaskStepUpdateContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryEncryption.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryEncryption.Serialization.cs index e1ad36c22dcc..40118595169c 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryEncryption.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryEncryption.Serialization.cs @@ -19,6 +19,15 @@ public partial class ContainerRegistryEncryption : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(ContainerRegistryEncryption)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Status)) { writer.WritePropertyName("status"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } ContainerRegistryEncryption IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryExportPolicy.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryExportPolicy.Serialization.cs index 564abe4fa105..aff340fc168f 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryExportPolicy.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryExportPolicy.Serialization.cs @@ -19,6 +19,15 @@ internal partial class ContainerRegistryExportPolicy : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(ContainerRegistryExportPolicy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Status)) { writer.WritePropertyName("status"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } ContainerRegistryExportPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryFileTaskRunContent.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryFileTaskRunContent.Serialization.cs index 6d6a1520be36..0dfcbb42ada9 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryFileTaskRunContent.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryFileTaskRunContent.Serialization.cs @@ -20,6 +20,15 @@ public partial class ContainerRegistryFileTaskRunContent : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(ContainerRegistryFileTaskRunContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("taskFilePath"u8); writer.WriteStringValue(TaskFilePath); if (Optional.IsDefined(ValuesFilePath)) @@ -67,39 +76,6 @@ void IJsonModel.Write(Utf8JsonWriter writer writer.WritePropertyName("credentials"u8); writer.WriteObjectValue(Credentials, options); } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(RunRequestType); - if (Optional.IsDefined(IsArchiveEnabled)) - { - writer.WritePropertyName("isArchiveEnabled"u8); - writer.WriteBooleanValue(IsArchiveEnabled.Value); - } - if (Optional.IsDefined(AgentPoolName)) - { - writer.WritePropertyName("agentPoolName"u8); - writer.WriteStringValue(AgentPoolName); - } - if (Optional.IsDefined(LogTemplate)) - { - writer.WritePropertyName("logTemplate"u8); - writer.WriteStringValue(LogTemplate); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ContainerRegistryFileTaskRunContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryFileTaskStep.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryFileTaskStep.Serialization.cs index bd2d0d10b42f..e8b304a0b9e6 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryFileTaskStep.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryFileTaskStep.Serialization.cs @@ -20,6 +20,15 @@ public partial class ContainerRegistryFileTaskStep : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(ContainerRegistryFileTaskStep)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("taskFilePath"u8); writer.WriteStringValue(TaskFilePath); if (Optional.IsDefined(ValuesFilePath)) @@ -45,44 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode } writer.WriteEndArray(); } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ContainerRegistryTaskStepType.ToString()); - if (options.Format != "W" && Optional.IsCollectionDefined(BaseImageDependencies)) - { - writer.WritePropertyName("baseImageDependencies"u8); - writer.WriteStartArray(); - foreach (var item in BaseImageDependencies) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(ContextPath)) - { - writer.WritePropertyName("contextPath"u8); - writer.WriteStringValue(ContextPath); - } - if (Optional.IsDefined(ContextAccessToken)) - { - writer.WritePropertyName("contextAccessToken"u8); - writer.WriteStringValue(ContextAccessToken); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ContainerRegistryFileTaskStep IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryFileTaskStepUpdateContent.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryFileTaskStepUpdateContent.Serialization.cs index 51f7bcd149d6..ce4e57e0fb9d 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryFileTaskStepUpdateContent.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryFileTaskStepUpdateContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class ContainerRegistryFileTaskStepUpdateContent : IUtf8JsonSeria void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(ContainerRegistryFileTaskStepUpdateContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(TaskFilePath)) { writer.WritePropertyName("taskFilePath"u8); @@ -46,34 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter } writer.WriteEndArray(); } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(StepType.ToString()); - if (Optional.IsDefined(ContextPath)) - { - writer.WritePropertyName("contextPath"u8); - writer.WriteStringValue(ContextPath); - } - if (Optional.IsDefined(ContextAccessToken)) - { - writer.WritePropertyName("contextAccessToken"u8); - writer.WriteStringValue(ContextAccessToken); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ContainerRegistryFileTaskStepUpdateContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryGenerateCredentialsContent.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryGenerateCredentialsContent.Serialization.cs index d70b7eabcc8c..b520c91978e7 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryGenerateCredentialsContent.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryGenerateCredentialsContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class ContainerRegistryGenerateCredentialsContent : IUtf8JsonSeri void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWrite throw new FormatException($"The model {nameof(ContainerRegistryGenerateCredentialsContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(TokenId)) { writer.WritePropertyName("tokenId"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWrite #endif } } - writer.WriteEndObject(); } ContainerRegistryGenerateCredentialsContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryGenerateCredentialsResult.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryGenerateCredentialsResult.Serialization.cs index 666f9b3763d9..fd4fa4572279 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryGenerateCredentialsResult.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryGenerateCredentialsResult.Serialization.cs @@ -20,6 +20,15 @@ public partial class ContainerRegistryGenerateCredentialsResult : IUtf8JsonSeria void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(ContainerRegistryGenerateCredentialsResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Username)) { writer.WritePropertyName("username"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } ContainerRegistryGenerateCredentialsResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryIPRule.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryIPRule.Serialization.cs index 20376dc5d54f..991057291d20 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryIPRule.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryIPRule.Serialization.cs @@ -19,6 +19,15 @@ public partial class ContainerRegistryIPRule : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(ContainerRegistryIPRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Action)) { writer.WritePropertyName("action"u8); @@ -49,7 +57,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } ContainerRegistryIPRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryImageDescriptor.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryImageDescriptor.Serialization.cs index a17067af486c..6f7b2224172e 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryImageDescriptor.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryImageDescriptor.Serialization.cs @@ -19,6 +19,15 @@ public partial class ContainerRegistryImageDescriptor : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(ContainerRegistryImageDescriptor)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Registry)) { writer.WritePropertyName("registry"u8); @@ -62,7 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } ContainerRegistryImageDescriptor IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryImageUpdateTrigger.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryImageUpdateTrigger.Serialization.cs index 9e6ee4b8cb26..fa50c263e037 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryImageUpdateTrigger.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryImageUpdateTrigger.Serialization.cs @@ -20,6 +20,15 @@ public partial class ContainerRegistryImageUpdateTrigger : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(ContainerRegistryImageUpdateTrigger)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -63,7 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } ContainerRegistryImageUpdateTrigger IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryImportImageContent.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryImportImageContent.Serialization.cs index b36359800ca8..f676b4813ef0 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryImportImageContent.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryImportImageContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class ContainerRegistryImportImageContent : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(ContainerRegistryImportImageContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("source"u8); writer.WriteObjectValue(Source, options); if (Optional.IsCollectionDefined(TargetTags)) @@ -68,7 +76,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } ContainerRegistryImportImageContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryImportSource.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryImportSource.Serialization.cs index a1ab8ffedba0..6228403de7c5 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryImportSource.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryImportSource.Serialization.cs @@ -18,6 +18,15 @@ public partial class ContainerRegistryImportSource : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(ContainerRegistryImportSource)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ResourceId)) { writer.WritePropertyName("resourceId"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } ContainerRegistryImportSource IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryImportSourceCredentials.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryImportSourceCredentials.Serialization.cs index 22d075c0cbbf..e2751d320185 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryImportSourceCredentials.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryImportSourceCredentials.Serialization.cs @@ -18,6 +18,15 @@ public partial class ContainerRegistryImportSourceCredentials : IUtf8JsonSeriali void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter w throw new FormatException($"The model {nameof(ContainerRegistryImportSourceCredentials)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Username)) { writer.WritePropertyName("username"u8); @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter w #endif } } - writer.WriteEndObject(); } ContainerRegistryImportSourceCredentials IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryKeyVaultProperties.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryKeyVaultProperties.Serialization.cs index 7d5df86bed13..925c4894613d 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryKeyVaultProperties.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryKeyVaultProperties.Serialization.cs @@ -19,6 +19,15 @@ public partial class ContainerRegistryKeyVaultProperties : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(ContainerRegistryKeyVaultProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(KeyIdentifier)) { writer.WritePropertyName("keyIdentifier"u8); @@ -67,7 +75,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } ContainerRegistryKeyVaultProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryListCredentialsResult.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryListCredentialsResult.Serialization.cs index dba0a64095ff..d2a84e85fb44 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryListCredentialsResult.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryListCredentialsResult.Serialization.cs @@ -20,6 +20,15 @@ public partial class ContainerRegistryListCredentialsResult : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(ContainerRegistryListCredentialsResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Username)) { writer.WritePropertyName("username"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } ContainerRegistryListCredentialsResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryListResult.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryListResult.Serialization.cs index b8ee0128df2c..80033a0a5593 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryListResult.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class ContainerRegistryListResult : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(ContainerRegistryListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } ContainerRegistryListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryNameAvailabilityContent.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryNameAvailabilityContent.Serialization.cs index 0fa54c16b352..38b735dd8afb 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryNameAvailabilityContent.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryNameAvailabilityContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class ContainerRegistryNameAvailabilityContent : IUtf8JsonSeriali void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter w throw new FormatException($"The model {nameof(ContainerRegistryNameAvailabilityContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); writer.WritePropertyName("type"u8); @@ -45,7 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter w #endif } } - writer.WriteEndObject(); } ContainerRegistryNameAvailabilityContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryNameAvailableResult.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryNameAvailableResult.Serialization.cs index 2c0623927116..00839fe26803 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryNameAvailableResult.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryNameAvailableResult.Serialization.cs @@ -19,6 +19,15 @@ public partial class ContainerRegistryNameAvailableResult : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(ContainerRegistryNameAvailableResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IsNameAvailable)) { writer.WritePropertyName("nameAvailable"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } ContainerRegistryNameAvailableResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryNetworkRuleSet.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryNetworkRuleSet.Serialization.cs index df2e6a8a213c..63236b65e825 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryNetworkRuleSet.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryNetworkRuleSet.Serialization.cs @@ -20,6 +20,15 @@ public partial class ContainerRegistryNetworkRuleSet : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(ContainerRegistryNetworkRuleSet)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("defaultAction"u8); writer.WriteStringValue(DefaultAction.ToString()); if (Optional.IsCollectionDefined(IPRules)) @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } ContainerRegistryNetworkRuleSet IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryOverrideTaskStepProperties.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryOverrideTaskStepProperties.Serialization.cs index a7aa14a31d87..65d68ff184b1 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryOverrideTaskStepProperties.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryOverrideTaskStepProperties.Serialization.cs @@ -20,6 +20,15 @@ public partial class ContainerRegistryOverrideTaskStepProperties : IUtf8JsonSeri void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWrite throw new FormatException($"The model {nameof(ContainerRegistryOverrideTaskStepProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ContextPath)) { writer.WritePropertyName("contextPath"u8); @@ -83,7 +91,6 @@ void IJsonModel.Write(Utf8JsonWrite #endif } } - writer.WriteEndObject(); } ContainerRegistryOverrideTaskStepProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryPassword.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryPassword.Serialization.cs index 1024bd0af671..10eaf27d0926 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryPassword.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryPassword.Serialization.cs @@ -19,6 +19,15 @@ public partial class ContainerRegistryPassword : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(ContainerRegistryPassword)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } ContainerRegistryPassword IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryPatch.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryPatch.Serialization.cs index 49b2988e7eba..d9d83329c050 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryPatch.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryPatch.Serialization.cs @@ -19,6 +19,15 @@ public partial class ContainerRegistryPatch : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(ContainerRegistryPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); @@ -101,7 +109,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } ContainerRegistryPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryPlatformProperties.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryPlatformProperties.Serialization.cs index 5c59e3e8608e..431db255b252 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryPlatformProperties.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryPlatformProperties.Serialization.cs @@ -19,6 +19,15 @@ public partial class ContainerRegistryPlatformProperties : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(ContainerRegistryPlatformProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("os"u8); writer.WriteStringValue(OS.ToString()); if (Optional.IsDefined(Architecture)) @@ -54,7 +62,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } ContainerRegistryPlatformProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryPlatformUpdateContent.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryPlatformUpdateContent.Serialization.cs index 5f4a8855f154..50832f37b8d8 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryPlatformUpdateContent.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryPlatformUpdateContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class ContainerRegistryPlatformUpdateContent : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(ContainerRegistryPlatformUpdateContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(OS)) { writer.WritePropertyName("os"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } ContainerRegistryPlatformUpdateContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryPolicies.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryPolicies.Serialization.cs index cd88151a68c1..5f6553cfb577 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryPolicies.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryPolicies.Serialization.cs @@ -19,6 +19,15 @@ public partial class ContainerRegistryPolicies : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(ContainerRegistryPolicies)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(QuarantinePolicy)) { writer.WritePropertyName("quarantinePolicy"u8); @@ -62,7 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } ContainerRegistryPolicies IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryPrivateEndpointConnectionListResult.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryPrivateEndpointConnectionListResult.Serialization.cs index 0ce9617f0fdb..e6a60c8b175f 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryPrivateEndpointConnectionListResult.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryPrivateEndpointConnectionListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class ContainerRegistryPrivateEndpointConnectionListResult : IU void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8 throw new FormatException($"The model {nameof(ContainerRegistryPrivateEndpointConnectionListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8 #endif } } - writer.WriteEndObject(); } ContainerRegistryPrivateEndpointConnectionListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryPrivateLinkResourceListResult.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryPrivateLinkResourceListResult.Serialization.cs index 93c8787c40b9..ac6ce68d4570 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryPrivateLinkResourceListResult.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryPrivateLinkResourceListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class ContainerRegistryPrivateLinkResourceListResult : IUtf8Jso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWr throw new FormatException($"The model {nameof(ContainerRegistryPrivateLinkResourceListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWr #endif } } - writer.WriteEndObject(); } ContainerRegistryPrivateLinkResourceListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryPrivateLinkServiceConnectionState.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryPrivateLinkServiceConnectionState.Serialization.cs index eb2f1e06307e..db4f42f27c8d 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryPrivateLinkServiceConnectionState.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryPrivateLinkServiceConnectionState.Serialization.cs @@ -19,6 +19,15 @@ public partial class ContainerRegistryPrivateLinkServiceConnectionState : IUtf8J void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8Js throw new FormatException($"The model {nameof(ContainerRegistryPrivateLinkServiceConnectionState)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Status)) { writer.WritePropertyName("status"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8Js #endif } } - writer.WriteEndObject(); } ContainerRegistryPrivateLinkServiceConnectionState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryQuarantinePolicy.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryQuarantinePolicy.Serialization.cs index 816a5d4aa8ab..470b39c4c7be 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryQuarantinePolicy.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryQuarantinePolicy.Serialization.cs @@ -19,6 +19,15 @@ internal partial class ContainerRegistryQuarantinePolicy : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(ContainerRegistryQuarantinePolicy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Status)) { writer.WritePropertyName("status"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } ContainerRegistryQuarantinePolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryReplicationListResult.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryReplicationListResult.Serialization.cs index 058fb9b2f27d..f155f7a64108 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryReplicationListResult.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryReplicationListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class ContainerRegistryReplicationListResult : IUtf8JsonSeriali void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(ContainerRegistryReplicationListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } ContainerRegistryReplicationListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryReplicationPatch.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryReplicationPatch.Serialization.cs index df3bccd86262..ecbdbe233db8 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryReplicationPatch.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryReplicationPatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class ContainerRegistryReplicationPatch : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(ContainerRegistryReplicationPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -60,7 +68,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } ContainerRegistryReplicationPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryResourceStatus.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryResourceStatus.Serialization.cs index e544aed8d8a9..443505ec878a 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryResourceStatus.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryResourceStatus.Serialization.cs @@ -19,6 +19,15 @@ public partial class ContainerRegistryResourceStatus : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(ContainerRegistryResourceStatus)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(DisplayStatus)) { writer.WritePropertyName("displayStatus"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } ContainerRegistryResourceStatus IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryRetentionPolicy.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryRetentionPolicy.Serialization.cs index b293913ec930..d8f4143fa895 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryRetentionPolicy.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryRetentionPolicy.Serialization.cs @@ -19,6 +19,15 @@ public partial class ContainerRegistryRetentionPolicy : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(ContainerRegistryRetentionPolicy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Days)) { writer.WritePropertyName("days"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } ContainerRegistryRetentionPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryRunArgument.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryRunArgument.Serialization.cs index e127bc65eb29..ed5be02cb630 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryRunArgument.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryRunArgument.Serialization.cs @@ -19,6 +19,15 @@ public partial class ContainerRegistryRunArgument : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(ContainerRegistryRunArgument)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); writer.WritePropertyName("value"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } ContainerRegistryRunArgument IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryRunContent.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryRunContent.Serialization.cs index 7d0a32fbe877..876f4854860a 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryRunContent.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryRunContent.Serialization.cs @@ -20,6 +20,15 @@ public partial class ContainerRegistryRunContent : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(ContainerRegistryRunContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("type"u8); writer.WriteStringValue(RunRequestType); if (Optional.IsDefined(IsArchiveEnabled)) @@ -60,7 +68,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } ContainerRegistryRunContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryRunGetLogResult.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryRunGetLogResult.Serialization.cs index da6b35c84297..62e6996e6904 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryRunGetLogResult.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryRunGetLogResult.Serialization.cs @@ -19,6 +19,15 @@ public partial class ContainerRegistryRunGetLogResult : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(ContainerRegistryRunGetLogResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(LogLink)) { writer.WritePropertyName("logLink"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } ContainerRegistryRunGetLogResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryRunListResult.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryRunListResult.Serialization.cs index c59f1dacaf74..ab985c26f6ab 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryRunListResult.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryRunListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class ContainerRegistryRunListResult : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(ContainerRegistryRunListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } ContainerRegistryRunListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryRunPatch.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryRunPatch.Serialization.cs index 4b877f20208c..09bd1194a4ba 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryRunPatch.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryRunPatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class ContainerRegistryRunPatch : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(ContainerRegistryRunPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IsArchiveEnabled)) { writer.WritePropertyName("isArchiveEnabled"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } ContainerRegistryRunPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistrySecretObject.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistrySecretObject.Serialization.cs index a77471700a4a..bd0a90205805 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistrySecretObject.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistrySecretObject.Serialization.cs @@ -19,6 +19,15 @@ public partial class ContainerRegistrySecretObject : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(ContainerRegistrySecretObject)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Value)) { writer.WritePropertyName("value"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } ContainerRegistrySecretObject IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistrySku.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistrySku.Serialization.cs index ccbab2b9f988..1c9f4d56d43f 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistrySku.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistrySku.Serialization.cs @@ -19,6 +19,15 @@ public partial class ContainerRegistrySku : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(ContainerRegistrySku)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name.ToString()); if (options.Format != "W" && Optional.IsDefined(Tier)) @@ -49,7 +57,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } ContainerRegistrySku IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistrySourceTrigger.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistrySourceTrigger.Serialization.cs index 3589a3aa4c6f..513a8f4b146d 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistrySourceTrigger.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistrySourceTrigger.Serialization.cs @@ -20,6 +20,15 @@ public partial class ContainerRegistrySourceTrigger : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(ContainerRegistrySourceTrigger)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("sourceRepository"u8); writer.WriteObjectValue(SourceRepository, options); writer.WritePropertyName("sourceTriggerEvents"u8); @@ -59,7 +67,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } ContainerRegistrySourceTrigger IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistrySourceTriggerDescriptor.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistrySourceTriggerDescriptor.Serialization.cs index ebba5d6e4eeb..fb793d989a2a 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistrySourceTriggerDescriptor.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistrySourceTriggerDescriptor.Serialization.cs @@ -19,6 +19,15 @@ public partial class ContainerRegistrySourceTriggerDescriptor : IUtf8JsonSeriali void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter w throw new FormatException($"The model {nameof(ContainerRegistrySourceTriggerDescriptor)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -77,7 +85,6 @@ void IJsonModel.Write(Utf8JsonWriter w #endif } } - writer.WriteEndObject(); } ContainerRegistrySourceTriggerDescriptor IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistrySourceTriggerUpdateContent.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistrySourceTriggerUpdateContent.Serialization.cs index c0d01ce2313c..c3aa18e2c04a 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistrySourceTriggerUpdateContent.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistrySourceTriggerUpdateContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class ContainerRegistrySourceTriggerUpdateContent : IUtf8JsonSeri void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWrite throw new FormatException($"The model {nameof(ContainerRegistrySourceTriggerUpdateContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(SourceRepository)) { writer.WritePropertyName("sourceRepository"u8); @@ -63,7 +71,6 @@ void IJsonModel.Write(Utf8JsonWrite #endif } } - writer.WriteEndObject(); } ContainerRegistrySourceTriggerUpdateContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryTaskListResult.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryTaskListResult.Serialization.cs index f155af190d0a..b21d5d3cfd50 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryTaskListResult.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryTaskListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class ContainerRegistryTaskListResult : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(ContainerRegistryTaskListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } ContainerRegistryTaskListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryTaskOverridableValue.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryTaskOverridableValue.Serialization.cs index 92f266744da7..f6f8bda5edf1 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryTaskOverridableValue.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryTaskOverridableValue.Serialization.cs @@ -19,6 +19,15 @@ public partial class ContainerRegistryTaskOverridableValue : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(ContainerRegistryTaskOverridableValue)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); writer.WritePropertyName("value"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } ContainerRegistryTaskOverridableValue IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryTaskPatch.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryTaskPatch.Serialization.cs index c8febf271cc0..77a408eb34cd 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryTaskPatch.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryTaskPatch.Serialization.cs @@ -19,6 +19,15 @@ public partial class ContainerRegistryTaskPatch : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(ContainerRegistryTaskPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); @@ -106,7 +114,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } ContainerRegistryTaskPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryTaskRunContent.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryTaskRunContent.Serialization.cs index e069521b8961..ed045f2b06ee 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryTaskRunContent.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryTaskRunContent.Serialization.cs @@ -19,6 +19,15 @@ public partial class ContainerRegistryTaskRunContent : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(ContainerRegistryTaskRunContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("taskId"u8); writer.WriteStringValue(TaskId); if (Optional.IsDefined(OverrideTaskStepProperties)) @@ -34,39 +43,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo writer.WritePropertyName("overrideTaskStepProperties"u8); writer.WriteObjectValue(OverrideTaskStepProperties, options); } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(RunRequestType); - if (Optional.IsDefined(IsArchiveEnabled)) - { - writer.WritePropertyName("isArchiveEnabled"u8); - writer.WriteBooleanValue(IsArchiveEnabled.Value); - } - if (Optional.IsDefined(AgentPoolName)) - { - writer.WritePropertyName("agentPoolName"u8); - writer.WriteStringValue(AgentPoolName); - } - if (Optional.IsDefined(LogTemplate)) - { - writer.WritePropertyName("logTemplate"u8); - writer.WriteStringValue(LogTemplate); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ContainerRegistryTaskRunContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryTaskRunListResult.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryTaskRunListResult.Serialization.cs index e7106581db60..5f881e61be30 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryTaskRunListResult.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryTaskRunListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class ContainerRegistryTaskRunListResult : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(ContainerRegistryTaskRunListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } ContainerRegistryTaskRunListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryTaskRunPatch.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryTaskRunPatch.Serialization.cs index 4f819a8ea338..efc506f2ad71 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryTaskRunPatch.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryTaskRunPatch.Serialization.cs @@ -19,6 +19,15 @@ public partial class ContainerRegistryTaskRunPatch : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(ContainerRegistryTaskRunPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); @@ -76,7 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } ContainerRegistryTaskRunPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryTaskStepProperties.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryTaskStepProperties.Serialization.cs index 15a4bacf532e..e65dc0448038 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryTaskStepProperties.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryTaskStepProperties.Serialization.cs @@ -21,6 +21,15 @@ public partial class ContainerRegistryTaskStepProperties : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,7 +37,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(ContainerRegistryTaskStepProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("type"u8); writer.WriteStringValue(ContainerRegistryTaskStepType.ToString()); if (options.Format != "W" && Optional.IsCollectionDefined(BaseImageDependencies)) @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } ContainerRegistryTaskStepProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryTaskStepUpdateContent.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryTaskStepUpdateContent.Serialization.cs index a1510a60e8a4..3c12f1f131e1 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryTaskStepUpdateContent.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryTaskStepUpdateContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class ContainerRegistryTaskStepUpdateContent : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(ContainerRegistryTaskStepUpdateContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("type"u8); writer.WriteStringValue(StepType.ToString()); if (Optional.IsDefined(ContextPath)) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } ContainerRegistryTaskStepUpdateContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryTimerTrigger.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryTimerTrigger.Serialization.cs index 9c5088865b7c..7d6ce568e6ce 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryTimerTrigger.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryTimerTrigger.Serialization.cs @@ -19,6 +19,15 @@ public partial class ContainerRegistryTimerTrigger : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(ContainerRegistryTimerTrigger)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("schedule"u8); writer.WriteStringValue(Schedule); if (Optional.IsDefined(Status)) @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } ContainerRegistryTimerTrigger IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryTimerTriggerDescriptor.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryTimerTriggerDescriptor.Serialization.cs index cdb055a0fc53..1034d2464063 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryTimerTriggerDescriptor.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryTimerTriggerDescriptor.Serialization.cs @@ -19,6 +19,15 @@ public partial class ContainerRegistryTimerTriggerDescriptor : IUtf8JsonSerializ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter wr throw new FormatException($"The model {nameof(ContainerRegistryTimerTriggerDescriptor)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(TimerTriggerName)) { writer.WritePropertyName("timerTriggerName"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter wr #endif } } - writer.WriteEndObject(); } ContainerRegistryTimerTriggerDescriptor IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryTimerTriggerUpdateContent.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryTimerTriggerUpdateContent.Serialization.cs index 10424c6d6372..d69f2fb97c48 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryTimerTriggerUpdateContent.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryTimerTriggerUpdateContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class ContainerRegistryTimerTriggerUpdateContent : IUtf8JsonSeria void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(ContainerRegistryTimerTriggerUpdateContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Schedule)) { writer.WritePropertyName("schedule"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } ContainerRegistryTimerTriggerUpdateContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryTokenCertificate.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryTokenCertificate.Serialization.cs index b3879d09af8f..95053559af5a 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryTokenCertificate.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryTokenCertificate.Serialization.cs @@ -19,6 +19,15 @@ public partial class ContainerRegistryTokenCertificate : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(ContainerRegistryTokenCertificate)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -62,7 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } ContainerRegistryTokenCertificate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryTokenCredentials.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryTokenCredentials.Serialization.cs index 53365aa57e4e..3760d13d3f7c 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryTokenCredentials.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryTokenCredentials.Serialization.cs @@ -20,6 +20,15 @@ public partial class ContainerRegistryTokenCredentials : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(ContainerRegistryTokenCredentials)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Certificates)) { writer.WritePropertyName("certificates"u8); @@ -63,7 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } ContainerRegistryTokenCredentials IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryTokenListResult.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryTokenListResult.Serialization.cs index 1d6096140429..13c4da8a59e0 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryTokenListResult.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryTokenListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class ContainerRegistryTokenListResult : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(ContainerRegistryTokenListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } ContainerRegistryTokenListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryTokenPassword.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryTokenPassword.Serialization.cs index 3cd281d1db0a..f225fa301aec 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryTokenPassword.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryTokenPassword.Serialization.cs @@ -19,6 +19,15 @@ public partial class ContainerRegistryTokenPassword : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(ContainerRegistryTokenPassword)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(CreatedOn)) { writer.WritePropertyName("creationTime"u8); @@ -62,7 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } ContainerRegistryTokenPassword IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryTokenPatch.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryTokenPatch.Serialization.cs index 4b3b73142735..a5ae2d884aeb 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryTokenPatch.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryTokenPatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class ContainerRegistryTokenPatch : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(ContainerRegistryTokenPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(ScopeMapId)) @@ -59,7 +67,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } ContainerRegistryTokenPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryTriggerProperties.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryTriggerProperties.Serialization.cs index 69c2d099ad6e..80c1d4d38336 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryTriggerProperties.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryTriggerProperties.Serialization.cs @@ -20,6 +20,15 @@ public partial class ContainerRegistryTriggerProperties : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(ContainerRegistryTriggerProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(TimerTriggers)) { writer.WritePropertyName("timerTriggers"u8); @@ -68,7 +76,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } ContainerRegistryTriggerProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryTriggerUpdateContent.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryTriggerUpdateContent.Serialization.cs index 5b662f87f262..e2e52cda8a01 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryTriggerUpdateContent.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryTriggerUpdateContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class ContainerRegistryTriggerUpdateContent : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(ContainerRegistryTriggerUpdateContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(TimerTriggers)) { writer.WritePropertyName("timerTriggers"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } ContainerRegistryTriggerUpdateContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryTrustPolicy.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryTrustPolicy.Serialization.cs index 1b07ead6a152..93eed64e3b48 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryTrustPolicy.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryTrustPolicy.Serialization.cs @@ -19,6 +19,15 @@ public partial class ContainerRegistryTrustPolicy : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(ContainerRegistryTrustPolicy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(PolicyType)) { writer.WritePropertyName("type"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } ContainerRegistryTrustPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryUsage.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryUsage.Serialization.cs index fe2879457f78..58a66e3b4afd 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryUsage.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryUsage.Serialization.cs @@ -19,6 +19,15 @@ public partial class ContainerRegistryUsage : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(ContainerRegistryUsage)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -62,7 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } ContainerRegistryUsage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryUsageListResult.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryUsageListResult.Serialization.cs index 15dca9f01260..3387f0107edb 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryUsageListResult.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryUsageListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class ContainerRegistryUsageListResult : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(ContainerRegistryUsageListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } ContainerRegistryUsageListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryWebhookCallbackConfig.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryWebhookCallbackConfig.Serialization.cs index 65305f3633a9..d9eba17e79fe 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryWebhookCallbackConfig.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryWebhookCallbackConfig.Serialization.cs @@ -20,6 +20,15 @@ public partial class ContainerRegistryWebhookCallbackConfig : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(ContainerRegistryWebhookCallbackConfig)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("serviceUri"u8); writer.WriteStringValue(ServiceUri.AbsoluteUri); if (Optional.IsCollectionDefined(CustomHeaders)) @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } ContainerRegistryWebhookCallbackConfig IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryWebhookCreateOrUpdateContent.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryWebhookCreateOrUpdateContent.Serialization.cs index b12e90e751e7..24b6c413e380 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryWebhookCreateOrUpdateContent.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryWebhookCreateOrUpdateContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class ContainerRegistryWebhookCreateOrUpdateContent : IUtf8JsonSe void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWri throw new FormatException($"The model {nameof(ContainerRegistryWebhookCreateOrUpdateContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -93,7 +101,6 @@ void IJsonModel.Write(Utf8JsonWri #endif } } - writer.WriteEndObject(); } ContainerRegistryWebhookCreateOrUpdateContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryWebhookEvent.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryWebhookEvent.Serialization.cs index c5bc938c4497..d96698121d77 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryWebhookEvent.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryWebhookEvent.Serialization.cs @@ -19,6 +19,15 @@ public partial class ContainerRegistryWebhookEvent : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(ContainerRegistryWebhookEvent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(EventRequestMessage)) { writer.WritePropertyName("eventRequestMessage"u8); @@ -37,27 +46,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode writer.WritePropertyName("eventResponseMessage"u8); writer.WriteObjectValue(EventResponseMessage, options); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id.Value); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ContainerRegistryWebhookEvent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryWebhookEventActor.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryWebhookEventActor.Serialization.cs index 15644a9aef49..2e367205e88d 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryWebhookEventActor.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryWebhookEventActor.Serialization.cs @@ -19,6 +19,15 @@ internal partial class ContainerRegistryWebhookEventActor : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(ContainerRegistryWebhookEventActor)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } ContainerRegistryWebhookEventActor IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryWebhookEventContent.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryWebhookEventContent.Serialization.cs index 2c20a352d5eb..9b527a8dd36f 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryWebhookEventContent.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryWebhookEventContent.Serialization.cs @@ -19,6 +19,15 @@ public partial class ContainerRegistryWebhookEventContent : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(ContainerRegistryWebhookEventContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -77,7 +85,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } ContainerRegistryWebhookEventContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryWebhookEventInfo.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryWebhookEventInfo.Serialization.cs index 422a786932a5..9b1f7481da12 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryWebhookEventInfo.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryWebhookEventInfo.Serialization.cs @@ -19,6 +19,15 @@ public partial class ContainerRegistryWebhookEventInfo : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(ContainerRegistryWebhookEventInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } ContainerRegistryWebhookEventInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryWebhookEventListResult.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryWebhookEventListResult.Serialization.cs index 65e25deb79cb..dfcbf5da7f10 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryWebhookEventListResult.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryWebhookEventListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class ContainerRegistryWebhookEventListResult : IUtf8JsonSerial void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter wr throw new FormatException($"The model {nameof(ContainerRegistryWebhookEventListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter wr #endif } } - writer.WriteEndObject(); } ContainerRegistryWebhookEventListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryWebhookEventRequestContent.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryWebhookEventRequestContent.Serialization.cs index 8c7d034851bd..24b1987998a6 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryWebhookEventRequestContent.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryWebhookEventRequestContent.Serialization.cs @@ -19,6 +19,15 @@ public partial class ContainerRegistryWebhookEventRequestContent : IUtf8JsonSeri void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWrite throw new FormatException($"The model {nameof(ContainerRegistryWebhookEventRequestContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -67,7 +75,6 @@ void IJsonModel.Write(Utf8JsonWrite #endif } } - writer.WriteEndObject(); } ContainerRegistryWebhookEventRequestContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryWebhookEventRequestMessage.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryWebhookEventRequestMessage.Serialization.cs index a57f16cf32f5..fa1b76e16faa 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryWebhookEventRequestMessage.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryWebhookEventRequestMessage.Serialization.cs @@ -20,6 +20,15 @@ public partial class ContainerRegistryWebhookEventRequestMessage : IUtf8JsonSeri void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWrite throw new FormatException($"The model {nameof(ContainerRegistryWebhookEventRequestMessage)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Content)) { writer.WritePropertyName("content"u8); @@ -74,7 +82,6 @@ void IJsonModel.Write(Utf8JsonWrite #endif } } - writer.WriteEndObject(); } ContainerRegistryWebhookEventRequestMessage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryWebhookEventResponseMessage.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryWebhookEventResponseMessage.Serialization.cs index 338d3a76005a..fe451c746527 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryWebhookEventResponseMessage.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryWebhookEventResponseMessage.Serialization.cs @@ -20,6 +20,15 @@ public partial class ContainerRegistryWebhookEventResponseMessage : IUtf8JsonSer void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWrit throw new FormatException($"The model {nameof(ContainerRegistryWebhookEventResponseMessage)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Content)) { writer.WritePropertyName("content"u8); @@ -74,7 +82,6 @@ void IJsonModel.Write(Utf8JsonWrit #endif } } - writer.WriteEndObject(); } ContainerRegistryWebhookEventResponseMessage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryWebhookEventSource.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryWebhookEventSource.Serialization.cs index d359928f81bc..8b85d8d0f162 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryWebhookEventSource.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryWebhookEventSource.Serialization.cs @@ -19,6 +19,15 @@ public partial class ContainerRegistryWebhookEventSource : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(ContainerRegistryWebhookEventSource)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Addr)) { writer.WritePropertyName("addr"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } ContainerRegistryWebhookEventSource IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryWebhookEventTarget.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryWebhookEventTarget.Serialization.cs index 137d75b8b22d..44b261fe1410 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryWebhookEventTarget.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryWebhookEventTarget.Serialization.cs @@ -19,6 +19,15 @@ public partial class ContainerRegistryWebhookEventTarget : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(ContainerRegistryWebhookEventTarget)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(MediaType)) { writer.WritePropertyName("mediaType"u8); @@ -87,7 +95,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } ContainerRegistryWebhookEventTarget IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryWebhookListResult.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryWebhookListResult.Serialization.cs index 74c39cdd4ef7..1717aa20d4de 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryWebhookListResult.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryWebhookListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class ContainerRegistryWebhookListResult : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(ContainerRegistryWebhookListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } ContainerRegistryWebhookListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryWebhookPatch.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryWebhookPatch.Serialization.cs index f296c2ed3be9..3c3ea54bd105 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryWebhookPatch.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryWebhookPatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class ContainerRegistryWebhookPatch : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(ContainerRegistryWebhookPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -91,7 +99,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } ContainerRegistryWebhookPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/CustomRegistryCredentials.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/CustomRegistryCredentials.Serialization.cs index f5f9fef0a8f9..6611e18012ee 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/CustomRegistryCredentials.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/CustomRegistryCredentials.Serialization.cs @@ -19,6 +19,15 @@ public partial class CustomRegistryCredentials : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(CustomRegistryCredentials)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(UserName)) { writer.WritePropertyName("userName"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } CustomRegistryCredentials IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ScopeMapListResult.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ScopeMapListResult.Serialization.cs index a5109432f5b2..57e5c82953c3 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ScopeMapListResult.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ScopeMapListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class ScopeMapListResult : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ScopeMapListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } ScopeMapListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ScopeMapPatch.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ScopeMapPatch.Serialization.cs index e4993aab91e4..b7ab1579a42c 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ScopeMapPatch.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ScopeMapPatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class ScopeMapPatch : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt throw new FormatException($"The model {nameof(ScopeMapPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Description)) @@ -59,7 +67,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt #endif } } - writer.WriteEndObject(); } ScopeMapPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/SourceCodeRepoAuthInfo.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/SourceCodeRepoAuthInfo.Serialization.cs index c6a4e6b5b159..52eae79f7261 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/SourceCodeRepoAuthInfo.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/SourceCodeRepoAuthInfo.Serialization.cs @@ -19,6 +19,15 @@ public partial class SourceCodeRepoAuthInfo : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(SourceCodeRepoAuthInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("tokenType"u8); writer.WriteStringValue(TokenType.ToString()); writer.WritePropertyName("token"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } SourceCodeRepoAuthInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/SourceCodeRepoAuthInfoUpdateContent.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/SourceCodeRepoAuthInfoUpdateContent.Serialization.cs index acb2020ee8c3..edba973be20f 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/SourceCodeRepoAuthInfoUpdateContent.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/SourceCodeRepoAuthInfoUpdateContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class SourceCodeRepoAuthInfoUpdateContent : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(SourceCodeRepoAuthInfoUpdateContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(TokenType)) { writer.WritePropertyName("tokenType"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } SourceCodeRepoAuthInfoUpdateContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/SourceCodeRepoProperties.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/SourceCodeRepoProperties.Serialization.cs index 61fb25dbf1bc..76ed3c5f28c2 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/SourceCodeRepoProperties.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/SourceCodeRepoProperties.Serialization.cs @@ -19,6 +19,15 @@ public partial class SourceCodeRepoProperties : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(SourceCodeRepoProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("sourceControlType"u8); writer.WriteStringValue(SourceControlType.ToString()); writer.WritePropertyName("repositoryUrl"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } SourceCodeRepoProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/SourceCodeRepoUpdateContent.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/SourceCodeRepoUpdateContent.Serialization.cs index 955735641be1..f52c74a8f595 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/SourceCodeRepoUpdateContent.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/SourceCodeRepoUpdateContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class SourceCodeRepoUpdateContent : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(SourceCodeRepoUpdateContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(SourceControlType)) { writer.WritePropertyName("sourceControlType"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } SourceCodeRepoUpdateContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/SourceRegistryCredentials.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/SourceRegistryCredentials.Serialization.cs index 456da7aa900d..ac1910271aa1 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/SourceRegistryCredentials.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/SourceRegistryCredentials.Serialization.cs @@ -19,6 +19,15 @@ internal partial class SourceRegistryCredentials : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(SourceRegistryCredentials)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(LoginMode)) { writer.WritePropertyName("loginMode"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } SourceRegistryCredentials IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/SourceUploadDefinition.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/SourceUploadDefinition.Serialization.cs index dd9367986d10..ce00292dc264 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/SourceUploadDefinition.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/SourceUploadDefinition.Serialization.cs @@ -19,6 +19,15 @@ public partial class SourceUploadDefinition : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(SourceUploadDefinition)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(UploadUri)) { writer.WritePropertyName("uploadUrl"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } SourceUploadDefinition IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/UnknownRunRequest.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/UnknownRunRequest.Serialization.cs index 92ba2d4e2c22..7e03ef80c152 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/UnknownRunRequest.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/UnknownRunRequest.Serialization.cs @@ -19,6 +19,15 @@ internal partial class UnknownRunRequest : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,40 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(ContainerRegistryRunContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(RunRequestType); - if (Optional.IsDefined(IsArchiveEnabled)) - { - writer.WritePropertyName("isArchiveEnabled"u8); - writer.WriteBooleanValue(IsArchiveEnabled.Value); - } - if (Optional.IsDefined(AgentPoolName)) - { - writer.WritePropertyName("agentPoolName"u8); - writer.WriteStringValue(AgentPoolName); - } - if (Optional.IsDefined(LogTemplate)) - { - writer.WritePropertyName("logTemplate"u8); - writer.WriteStringValue(LogTemplate); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } ContainerRegistryRunContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/UnknownTaskStepProperties.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/UnknownTaskStepProperties.Serialization.cs index e041281837d6..db72c29aadc4 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/UnknownTaskStepProperties.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/UnknownTaskStepProperties.Serialization.cs @@ -20,6 +20,15 @@ internal partial class UnknownTaskStepProperties : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,45 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(ContainerRegistryTaskStepProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ContainerRegistryTaskStepType.ToString()); - if (options.Format != "W" && Optional.IsCollectionDefined(BaseImageDependencies)) - { - writer.WritePropertyName("baseImageDependencies"u8); - writer.WriteStartArray(); - foreach (var item in BaseImageDependencies) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(ContextPath)) - { - writer.WritePropertyName("contextPath"u8); - writer.WriteStringValue(ContextPath); - } - if (Optional.IsDefined(ContextAccessToken)) - { - writer.WritePropertyName("contextAccessToken"u8); - writer.WriteStringValue(ContextAccessToken); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } ContainerRegistryTaskStepProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/UnknownTaskStepUpdateParameters.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/UnknownTaskStepUpdateParameters.Serialization.cs index 3ab57c482605..c6928b65554f 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/UnknownTaskStepUpdateParameters.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/UnknownTaskStepUpdateParameters.Serialization.cs @@ -18,6 +18,15 @@ internal partial class UnknownTaskStepUpdateParameters : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,35 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(ContainerRegistryTaskStepUpdateContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(StepType.ToString()); - if (Optional.IsDefined(ContextPath)) - { - writer.WritePropertyName("contextPath"u8); - writer.WriteStringValue(ContextPath); - } - if (Optional.IsDefined(ContextAccessToken)) - { - writer.WritePropertyName("contextAccessToken"u8); - writer.WriteStringValue(ContextAccessToken); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } ContainerRegistryTaskStepUpdateContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ScopeMapData.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ScopeMapData.Serialization.cs index 126d4658a0c3..a397b2155f56 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ScopeMapData.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ScopeMapData.Serialization.cs @@ -22,6 +22,15 @@ public partial class ScopeMapData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -29,27 +38,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(ScopeMapData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Description)) @@ -83,22 +72,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ScopeMapData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/autorest.md b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/autorest.md index 79c3700d7b67..68b5c223f220 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/autorest.md +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/autorest.md @@ -19,6 +19,7 @@ skip-csproj: true modelerfour: flatten-payloads: false use-model-reader-writer: true +use-write-core: true enable-bicep-serialization: true # mgmt-debug: diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/CHANGELOG.md b/sdk/containerservice/Azure.ResourceManager.ContainerService/CHANGELOG.md index e7ada124b1c2..8ea41cd2e759 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/CHANGELOG.md +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/CHANGELOG.md @@ -4,6 +4,8 @@ ### Features Added +- Exposed `JsonModelWriteCore` for model serialization procedure. + ### Breaking Changes ### Bugs Fixed diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/api/Azure.ResourceManager.ContainerService.netstandard2.0.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/api/Azure.ResourceManager.ContainerService.netstandard2.0.cs index e571dd7312f7..904fe91102d0 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/api/Azure.ResourceManager.ContainerService.netstandard2.0.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/api/Azure.ResourceManager.ContainerService.netstandard2.0.cs @@ -28,6 +28,7 @@ public AgentPoolSnapshotData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.ContainerService.Models.ContainerServiceOSType? OSType { get { throw null; } } public Azure.ResourceManager.ContainerService.Models.SnapshotType? SnapshotType { get { throw null; } set { } } public string VmSize { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerService.AgentPoolSnapshotData 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.ContainerService.AgentPoolSnapshotData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -66,6 +67,7 @@ internal AgentPoolUpgradeProfileData() { } public string LatestNodeImageVersion { get { throw null; } } public Azure.ResourceManager.ContainerService.Models.ContainerServiceOSType OSType { get { throw null; } } public System.Collections.Generic.IReadOnlyList Upgrades { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerService.AgentPoolUpgradeProfileData 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.ContainerService.AgentPoolUpgradeProfileData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -152,6 +154,7 @@ public ContainerServiceAgentPoolData() { } public string VmSize { get { throw null; } set { } } public Azure.Core.ResourceIdentifier VnetSubnetId { get { throw null; } set { } } public Azure.ResourceManager.ContainerService.Models.WorkloadRuntime? WorkloadRuntime { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerService.ContainerServiceAgentPoolData 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.ContainerService.ContainerServiceAgentPoolData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -245,6 +248,7 @@ public ContainerServiceMaintenanceConfigurationData() { } public Azure.ResourceManager.ContainerService.Models.ContainerServiceMaintenanceWindow MaintenanceWindow { get { throw null; } set { } } public System.Collections.Generic.IList NotAllowedTimes { get { throw null; } } public System.Collections.Generic.IList TimesInWeek { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerService.ContainerServiceMaintenanceConfigurationData 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.ContainerService.ContainerServiceMaintenanceConfigurationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -340,6 +344,7 @@ public ContainerServiceManagedClusterData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.ContainerService.Models.UpgradeOverrideSettings UpgradeOverrideSettings { get { throw null; } set { } } public Azure.ResourceManager.ContainerService.Models.ManagedClusterWindowsProfile WindowsProfile { get { throw null; } set { } } public Azure.ResourceManager.ContainerService.Models.ManagedClusterWorkloadAutoScalerProfile WorkloadAutoScalerProfile { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerService.ContainerServiceManagedClusterData 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.ContainerService.ContainerServiceManagedClusterData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -450,6 +455,7 @@ public ContainerServicePrivateEndpointConnectionData() { } public Azure.ResourceManager.ContainerService.Models.ContainerServicePrivateLinkServiceConnectionState ConnectionState { get { throw null; } set { } } public Azure.Core.ResourceIdentifier PrivateEndpointId { get { throw null; } set { } } public Azure.ResourceManager.ContainerService.Models.ContainerServicePrivateEndpointConnectionProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerService.ContainerServicePrivateEndpointConnectionData 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.ContainerService.ContainerServicePrivateEndpointConnectionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -498,6 +504,7 @@ public ContainerServiceTrustedAccessRoleBindingData(Azure.Core.ResourceIdentifie public Azure.ResourceManager.ContainerService.Models.ContainerServiceTrustedAccessRoleBindingProvisioningState? ProvisioningState { get { throw null; } } public System.Collections.Generic.IList Roles { get { throw null; } } public Azure.Core.ResourceIdentifier SourceResourceId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerService.ContainerServiceTrustedAccessRoleBindingData 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.ContainerService.ContainerServiceTrustedAccessRoleBindingData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -528,6 +535,7 @@ public partial class ManagedClusterUpgradeProfileData : Azure.ResourceManager.Mo internal ManagedClusterUpgradeProfileData() { } public System.Collections.Generic.IReadOnlyList AgentPoolProfiles { get { throw null; } } public Azure.ResourceManager.ContainerService.Models.ManagedClusterPoolUpgradeProfile ControlPlaneProfile { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerService.ManagedClusterUpgradeProfileData 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.ContainerService.ManagedClusterUpgradeProfileData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -568,6 +576,7 @@ public partial class MeshRevisionProfileData : Azure.ResourceManager.Models.Reso { public MeshRevisionProfileData() { } public System.Collections.Generic.IList MeshRevisions { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerService.MeshRevisionProfileData 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.ContainerService.MeshRevisionProfileData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -608,6 +617,7 @@ public partial class MeshUpgradeProfileData : Azure.ResourceManager.Models.Resou { public MeshUpgradeProfileData() { } public Azure.ResourceManager.ContainerService.Models.MeshUpgradeProfileProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerService.MeshUpgradeProfileData 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.ContainerService.MeshUpgradeProfileData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -633,6 +643,7 @@ public partial class OSOptionProfileData : Azure.ResourceManager.Models.Resource { internal OSOptionProfileData() { } public System.Collections.Generic.IReadOnlyList OSOptionPropertyList { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerService.OSOptionProfileData 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.ContainerService.OSOptionProfileData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -707,6 +718,7 @@ internal AgentPoolAvailableVersion() { } public bool? IsDefault { get { throw null; } } public bool? IsPreview { get { throw null; } } public string KubernetesVersion { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerService.Models.AgentPoolAvailableVersion 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.ContainerService.Models.AgentPoolAvailableVersion System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -717,6 +729,7 @@ public partial class AgentPoolAvailableVersions : Azure.ResourceManager.Models.R { internal AgentPoolAvailableVersions() { } public System.Collections.Generic.IReadOnlyList AgentPoolVersions { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerService.Models.AgentPoolAvailableVersions 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.ContainerService.Models.AgentPoolAvailableVersions System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -765,6 +778,7 @@ public AgentPoolNetworkPortRange() { } public int? PortEnd { get { throw null; } set { } } public int? PortStart { get { throw null; } set { } } public Azure.ResourceManager.ContainerService.Models.AgentPoolNetworkPortProtocol? Protocol { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerService.Models.AgentPoolNetworkPortRange 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.ContainerService.Models.AgentPoolNetworkPortRange System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -777,6 +791,7 @@ public AgentPoolNetworkProfile() { } public System.Collections.Generic.IList AllowedHostPorts { get { throw null; } } public System.Collections.Generic.IList ApplicationSecurityGroups { get { throw null; } } public System.Collections.Generic.IList NodePublicIPTags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerService.Models.AgentPoolNetworkProfile 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.ContainerService.Models.AgentPoolNetworkProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -806,6 +821,7 @@ public partial class AgentPoolUpgradeProfilePropertiesUpgradesItem : System.Clie internal AgentPoolUpgradeProfilePropertiesUpgradesItem() { } public bool? IsPreview { get { throw null; } } public string KubernetesVersion { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerService.Models.AgentPoolUpgradeProfilePropertiesUpgradesItem 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.ContainerService.Models.AgentPoolUpgradeProfilePropertiesUpgradesItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -817,6 +833,7 @@ public partial class AgentPoolUpgradeSettings : System.ClientModel.Primitives.IJ public AgentPoolUpgradeSettings() { } public int? DrainTimeoutInMinutes { get { throw null; } set { } } public string MaxSurge { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerService.Models.AgentPoolUpgradeSettings 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.ContainerService.Models.AgentPoolUpgradeSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -887,6 +904,7 @@ public partial class CompatibleVersions : System.ClientModel.Primitives.IJsonMod public CompatibleVersions() { } public string Name { get { throw null; } set { } } public System.Collections.Generic.IList Versions { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerService.Models.CompatibleVersions 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.ContainerService.Models.CompatibleVersions System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -898,6 +916,7 @@ public partial class ContainerServiceDateSpan : System.ClientModel.Primitives.IJ public ContainerServiceDateSpan(System.DateTimeOffset start, System.DateTimeOffset end) { } public System.DateTimeOffset End { get { throw null; } set { } } public System.DateTimeOffset Start { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerService.Models.ContainerServiceDateSpan 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.ContainerService.Models.ContainerServiceDateSpan System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -909,6 +928,7 @@ public partial class ContainerServiceEndpointDependency : System.ClientModel.Pri internal ContainerServiceEndpointDependency() { } public string DomainName { get { throw null; } } public System.Collections.Generic.IReadOnlyList EndpointDetails { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerService.Models.ContainerServiceEndpointDependency 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.ContainerService.Models.ContainerServiceEndpointDependency System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -922,6 +942,7 @@ internal ContainerServiceEndpointDetail() { } public System.Net.IPAddress IPAddress { get { throw null; } } public int? Port { get { throw null; } } public string Protocol { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerService.Models.ContainerServiceEndpointDetail 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.ContainerService.Models.ContainerServiceEndpointDetail System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -933,6 +954,7 @@ public partial class ContainerServiceIPTag : System.ClientModel.Primitives.IJson public ContainerServiceIPTag() { } public string IPTagType { get { throw null; } set { } } public string Tag { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerService.Models.ContainerServiceIPTag 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.ContainerService.Models.ContainerServiceIPTag System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -944,6 +966,7 @@ public partial class ContainerServiceLinuxProfile : System.ClientModel.Primitive public ContainerServiceLinuxProfile(string adminUsername, Azure.ResourceManager.ContainerService.Models.ContainerServiceSshConfiguration ssh) { } public string AdminUsername { get { throw null; } set { } } public System.Collections.Generic.IList SshPublicKeys { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerService.Models.ContainerServiceLinuxProfile 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.ContainerService.Models.ContainerServiceLinuxProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -973,6 +996,7 @@ public partial class ContainerServiceMaintenanceAbsoluteMonthlySchedule : System public ContainerServiceMaintenanceAbsoluteMonthlySchedule(int intervalMonths, int dayOfMonth) { } public int DayOfMonth { get { throw null; } set { } } public int IntervalMonths { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerService.Models.ContainerServiceMaintenanceAbsoluteMonthlySchedule 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.ContainerService.Models.ContainerServiceMaintenanceAbsoluteMonthlySchedule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -985,6 +1009,7 @@ public ContainerServiceMaintenanceRelativeMonthlySchedule(int intervalMonths, Az public Azure.ResourceManager.ContainerService.Models.ContainerServiceWeekDay DayOfWeek { get { throw null; } set { } } public int IntervalMonths { get { throw null; } set { } } public Azure.ResourceManager.ContainerService.Models.ContainerServiceMaintenanceRelativeMonthlyScheduleWeekIndex WeekIndex { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerService.Models.ContainerServiceMaintenanceRelativeMonthlySchedule 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.ContainerService.Models.ContainerServiceMaintenanceRelativeMonthlySchedule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1019,6 +1044,7 @@ public ContainerServiceMaintenanceSchedule() { } public int? DailyIntervalDays { get { throw null; } set { } } public Azure.ResourceManager.ContainerService.Models.ContainerServiceMaintenanceRelativeMonthlySchedule RelativeMonthly { get { throw null; } set { } } public Azure.ResourceManager.ContainerService.Models.ContainerServiceMaintenanceWeeklySchedule Weekly { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerService.Models.ContainerServiceMaintenanceSchedule 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.ContainerService.Models.ContainerServiceMaintenanceSchedule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1030,6 +1056,7 @@ public partial class ContainerServiceMaintenanceWeeklySchedule : System.ClientMo public ContainerServiceMaintenanceWeeklySchedule(int intervalWeeks, Azure.ResourceManager.ContainerService.Models.ContainerServiceWeekDay dayOfWeek) { } public Azure.ResourceManager.ContainerService.Models.ContainerServiceWeekDay DayOfWeek { get { throw null; } set { } } public int IntervalWeeks { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerService.Models.ContainerServiceMaintenanceWeeklySchedule 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.ContainerService.Models.ContainerServiceMaintenanceWeeklySchedule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1045,6 +1072,7 @@ public ContainerServiceMaintenanceWindow(Azure.ResourceManager.ContainerService. public string StartDate { get { throw null; } set { } } public string StartTime { get { throw null; } set { } } public string UtcOffset { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerService.Models.ContainerServiceMaintenanceWindow 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.ContainerService.Models.ContainerServiceMaintenanceWindow System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1144,6 +1172,7 @@ public ContainerServiceNetworkProfile() { } public System.Collections.Generic.IList PodCidrs { get { throw null; } } public string ServiceCidr { get { throw null; } set { } } public System.Collections.Generic.IList ServiceCidrs { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerService.Models.ContainerServiceNetworkProfile 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.ContainerService.Models.ContainerServiceNetworkProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1173,6 +1202,7 @@ public partial class ContainerServiceOSOptionProperty : System.ClientModel.Primi internal ContainerServiceOSOptionProperty() { } public bool EnableFipsImage { get { throw null; } } public string OSType { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerService.Models.ContainerServiceOSOptionProperty 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.ContainerService.Models.ContainerServiceOSOptionProperty System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1223,6 +1253,7 @@ public partial class ContainerServiceOutboundEnvironmentEndpoint : System.Client internal ContainerServiceOutboundEnvironmentEndpoint() { } public string Category { get { throw null; } } public System.Collections.Generic.IReadOnlyList Endpoints { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerService.Models.ContainerServiceOutboundEnvironmentEndpoint 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.ContainerService.Models.ContainerServiceOutboundEnvironmentEndpoint System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1279,6 +1310,7 @@ public ContainerServicePrivateLinkResourceData() { } public Azure.Core.ResourceIdentifier PrivateLinkServiceId { get { throw null; } } public System.Collections.Generic.IList RequiredMembers { get { throw null; } } public Azure.Core.ResourceType? ResourceType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerService.Models.ContainerServicePrivateLinkResourceData 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.ContainerService.Models.ContainerServicePrivateLinkResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1290,6 +1322,7 @@ public partial class ContainerServicePrivateLinkServiceConnectionState : System. public ContainerServicePrivateLinkServiceConnectionState() { } public string Description { get { throw null; } set { } } public Azure.ResourceManager.ContainerService.Models.ContainerServicePrivateLinkServiceConnectionStatus? Status { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerService.Models.ContainerServicePrivateLinkServiceConnectionState 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.ContainerService.Models.ContainerServicePrivateLinkServiceConnectionState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1338,6 +1371,7 @@ public partial class ContainerServiceSshConfiguration : System.ClientModel.Primi { public ContainerServiceSshConfiguration(System.Collections.Generic.IEnumerable publicKeys) { } public System.Collections.Generic.IList PublicKeys { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerService.Models.ContainerServiceSshConfiguration 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.ContainerService.Models.ContainerServiceSshConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1348,6 +1382,7 @@ public partial class ContainerServiceSshPublicKey : System.ClientModel.Primitive { public ContainerServiceSshPublicKey(string keyData) { } public string KeyData { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerService.Models.ContainerServiceSshPublicKey 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.ContainerService.Models.ContainerServiceSshPublicKey System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1376,6 +1411,7 @@ public partial class ContainerServiceTagsObject : System.ClientModel.Primitives. { public ContainerServiceTagsObject() { } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerService.Models.ContainerServiceTagsObject 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.ContainerService.Models.ContainerServiceTagsObject System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1387,6 +1423,7 @@ public partial class ContainerServiceTimeInWeek : System.ClientModel.Primitives. public ContainerServiceTimeInWeek() { } public Azure.ResourceManager.ContainerService.Models.ContainerServiceWeekDay? Day { get { throw null; } set { } } public System.Collections.Generic.IList HourSlots { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerService.Models.ContainerServiceTimeInWeek 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.ContainerService.Models.ContainerServiceTimeInWeek System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1398,6 +1435,7 @@ public partial class ContainerServiceTimeSpan : System.ClientModel.Primitives.IJ public ContainerServiceTimeSpan() { } public System.DateTimeOffset? EndOn { get { throw null; } set { } } public System.DateTimeOffset? StartOn { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerService.Models.ContainerServiceTimeSpan 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.ContainerService.Models.ContainerServiceTimeSpan System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1410,6 +1448,7 @@ internal ContainerServiceTrustedAccessRole() { } public string Name { get { throw null; } } public System.Collections.Generic.IReadOnlyList Rules { get { throw null; } } public string SourceResourceType { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerService.Models.ContainerServiceTrustedAccessRole 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.ContainerService.Models.ContainerServiceTrustedAccessRole System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1445,6 +1484,7 @@ internal ContainerServiceTrustedAccessRoleRule() { } public System.Collections.Generic.IReadOnlyList ResourceNames { get { throw null; } } public System.Collections.Generic.IReadOnlyList Resources { get { throw null; } } public System.Collections.Generic.IReadOnlyList Verbs { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerService.Models.ContainerServiceTrustedAccessRoleRule 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.ContainerService.Models.ContainerServiceTrustedAccessRoleRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1457,6 +1497,7 @@ public ContainerServiceUserAssignedIdentity() { } public System.Guid? ClientId { get { throw null; } set { } } public System.Guid? ObjectId { get { throw null; } set { } } public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerService.Models.ContainerServiceUserAssignedIdentity 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.ContainerService.Models.ContainerServiceUserAssignedIdentity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1530,6 +1571,7 @@ public partial class IstioComponents : System.ClientModel.Primitives.IJsonModel< public IstioComponents() { } public System.Collections.Generic.IList EgressGateways { get { throw null; } } public System.Collections.Generic.IList IngressGateways { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerService.Models.IstioComponents 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.ContainerService.Models.IstioComponents System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1541,6 +1583,7 @@ public partial class IstioEgressGateway : System.ClientModel.Primitives.IJsonMod public IstioEgressGateway(bool isEnabled) { } public bool IsEnabled { get { throw null; } set { } } public System.Collections.Generic.IDictionary NodeSelector { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerService.Models.IstioEgressGateway 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.ContainerService.Models.IstioEgressGateway System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1552,6 +1595,7 @@ public partial class IstioIngressGateway : System.ClientModel.Primitives.IJsonMo public IstioIngressGateway(Azure.ResourceManager.ContainerService.Models.IstioIngressGatewayMode mode, bool isEnabled) { } public bool IsEnabled { get { throw null; } set { } } public Azure.ResourceManager.ContainerService.Models.IstioIngressGatewayMode Mode { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerService.Models.IstioIngressGateway 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.ContainerService.Models.IstioIngressGateway System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1584,6 +1628,7 @@ public IstioPluginCertificateAuthority() { } public string KeyObjectName { get { throw null; } set { } } public Azure.Core.ResourceIdentifier KeyVaultId { get { throw null; } set { } } public string RootCertObjectName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerService.Models.IstioPluginCertificateAuthority 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.ContainerService.Models.IstioPluginCertificateAuthority System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1596,6 +1641,7 @@ public IstioServiceMesh() { } public Azure.ResourceManager.ContainerService.Models.IstioPluginCertificateAuthority CertificateAuthorityPlugin { get { throw null; } set { } } public Azure.ResourceManager.ContainerService.Models.IstioComponents Components { get { throw null; } set { } } public System.Collections.Generic.IList Revisions { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerService.Models.IstioServiceMesh 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.ContainerService.Models.IstioServiceMesh System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1634,6 +1680,7 @@ public KubeletConfig() { } public bool? IsCpuCfsQuotaEnabled { get { throw null; } set { } } public int? PodMaxPids { get { throw null; } set { } } public string TopologyManagerPolicy { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerService.Models.KubeletConfig 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.ContainerService.Models.KubeletConfig System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1662,6 +1709,7 @@ public partial class KubernetesPatchVersion : System.ClientModel.Primitives.IJso { internal KubernetesPatchVersion() { } public System.Collections.Generic.IReadOnlyList Upgrades { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerService.Models.KubernetesPatchVersion 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.ContainerService.Models.KubernetesPatchVersion System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1693,6 +1741,7 @@ internal KubernetesVersion() { } public bool? IsPreview { get { throw null; } } public System.Collections.Generic.IReadOnlyDictionary PatchVersions { get { throw null; } } public string Version { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerService.Models.KubernetesVersion 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.ContainerService.Models.KubernetesVersion System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1703,6 +1752,7 @@ public partial class KubernetesVersionListResult : System.ClientModel.Primitives { internal KubernetesVersionListResult() { } public System.Collections.Generic.IReadOnlyList Values { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerService.Models.KubernetesVersionListResult 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.ContainerService.Models.KubernetesVersionListResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1716,6 +1766,7 @@ public LinuxOSConfig() { } public Azure.ResourceManager.ContainerService.Models.SysctlConfig Sysctls { get { throw null; } set { } } public string TransparentHugePageDefrag { get { throw null; } set { } } public string TransparentHugePageEnabled { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerService.Models.LinuxOSConfig 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.ContainerService.Models.LinuxOSConfig System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1732,6 +1783,7 @@ public ManagedClusterAadProfile() { } public System.Guid? ServerAppId { get { throw null; } set { } } public string ServerAppSecret { get { throw null; } set { } } public System.Guid? TenantId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerService.Models.ManagedClusterAadProfile 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.ContainerService.Models.ManagedClusterAadProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1742,6 +1794,7 @@ public partial class ManagedClusterAccessProfile : Azure.ResourceManager.Models. { public ManagedClusterAccessProfile(Azure.Core.AzureLocation location) { } public byte[] KubeConfig { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerService.Models.ManagedClusterAccessProfile 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.ContainerService.Models.ManagedClusterAccessProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1754,6 +1807,7 @@ public ManagedClusterAddonProfile(bool isEnabled) { } public System.Collections.Generic.IDictionary Config { get { throw null; } } public Azure.ResourceManager.ContainerService.Models.ManagedClusterAddonProfileIdentity Identity { get { throw null; } } public bool IsEnabled { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerService.Models.ManagedClusterAddonProfile 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.ContainerService.Models.ManagedClusterAddonProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1763,6 +1817,7 @@ public ManagedClusterAddonProfile(bool isEnabled) { } public partial class ManagedClusterAddonProfileIdentity : Azure.ResourceManager.ContainerService.Models.ContainerServiceUserAssignedIdentity, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ManagedClusterAddonProfileIdentity() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerService.Models.ManagedClusterAddonProfileIdentity 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.ContainerService.Models.ManagedClusterAddonProfileIdentity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1773,6 +1828,7 @@ public partial class ManagedClusterAgentPoolProfile : Azure.ResourceManager.Cont { public ManagedClusterAgentPoolProfile(string name) { } public string Name { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerService.Models.ManagedClusterAgentPoolProfile 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.ContainerService.Models.ManagedClusterAgentPoolProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1827,6 +1883,7 @@ public ManagedClusterAgentPoolProfileProperties() { } public string VmSize { get { throw null; } set { } } public Azure.Core.ResourceIdentifier VnetSubnetId { get { throw null; } set { } } public Azure.ResourceManager.ContainerService.Models.WorkloadRuntime? WorkloadRuntime { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerService.Models.ManagedClusterAgentPoolProfileProperties 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.ContainerService.Models.ManagedClusterAgentPoolProfileProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1841,6 +1898,7 @@ public ManagedClusterApiServerAccessProfile() { } public bool? EnablePrivateCluster { get { throw null; } set { } } public bool? EnablePrivateClusterPublicFqdn { get { throw null; } set { } } public string PrivateDnsZone { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerService.Models.ManagedClusterApiServerAccessProfile 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.ContainerService.Models.ManagedClusterApiServerAccessProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1867,6 +1925,7 @@ public ManagedClusterAutoScalerProfile() { } public string ScanIntervalInSeconds { get { throw null; } set { } } public string SkipNodesWithLocalStorage { get { throw null; } set { } } public string SkipNodesWithSystemPods { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerService.Models.ManagedClusterAutoScalerProfile 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.ContainerService.Models.ManagedClusterAutoScalerProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1878,6 +1937,7 @@ public partial class ManagedClusterAutoUpgradeProfile : System.ClientModel.Primi public ManagedClusterAutoUpgradeProfile() { } public Azure.ResourceManager.ContainerService.Models.ManagedClusterNodeOSUpgradeChannel? NodeOSUpgradeChannel { get { throw null; } set { } } public Azure.ResourceManager.ContainerService.Models.UpgradeChannel? UpgradeChannel { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerService.Models.ManagedClusterAutoUpgradeProfile 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.ContainerService.Models.ManagedClusterAutoUpgradeProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1889,6 +1949,7 @@ public partial class ManagedClusterCredential : System.ClientModel.Primitives.IJ internal ManagedClusterCredential() { } public string Name { get { throw null; } } public byte[] Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerService.Models.ManagedClusterCredential 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.ContainerService.Models.ManagedClusterCredential System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1899,6 +1960,7 @@ public partial class ManagedClusterCredentials : System.ClientModel.Primitives.I { internal ManagedClusterCredentials() { } public System.Collections.Generic.IReadOnlyList Kubeconfigs { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerService.Models.ManagedClusterCredentials 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.ContainerService.Models.ManagedClusterCredentials System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1912,6 +1974,7 @@ public ManagedClusterDelegatedIdentity() { } public string ReferralResource { get { throw null; } set { } } public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } set { } } public System.Guid? TenantId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerService.Models.ManagedClusterDelegatedIdentity 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.ContainerService.Models.ManagedClusterDelegatedIdentity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1925,6 +1988,7 @@ public ManagedClusterHttpProxyConfig() { } public string HttpsProxy { get { throw null; } set { } } public System.Collections.Generic.IList NoProxy { get { throw null; } } public string TrustedCA { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerService.Models.ManagedClusterHttpProxyConfig 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.ContainerService.Models.ManagedClusterHttpProxyConfig System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1992,6 +2056,7 @@ public ManagedClusterLoadBalancerProfile() { } public Azure.ResourceManager.ContainerService.Models.ManagedClusterLoadBalancerProfileManagedOutboundIPs ManagedOutboundIPs { get { throw null; } set { } } public System.Collections.Generic.IList OutboundPublicIPPrefixes { get { throw null; } } public System.Collections.Generic.IList OutboundPublicIPs { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerService.Models.ManagedClusterLoadBalancerProfile 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.ContainerService.Models.ManagedClusterLoadBalancerProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2003,6 +2068,7 @@ public partial class ManagedClusterLoadBalancerProfileManagedOutboundIPs : Syste public ManagedClusterLoadBalancerProfileManagedOutboundIPs() { } public int? Count { get { throw null; } set { } } public int? CountIPv6 { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerService.Models.ManagedClusterLoadBalancerProfileManagedOutboundIPs 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.ContainerService.Models.ManagedClusterLoadBalancerProfileManagedOutboundIPs System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2014,6 +2080,7 @@ public partial class ManagedClusterMonitorProfileKubeStateMetrics : System.Clien public ManagedClusterMonitorProfileKubeStateMetrics() { } public string MetricAnnotationsAllowList { get { throw null; } set { } } public string MetricLabelsAllowlist { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerService.Models.ManagedClusterMonitorProfileKubeStateMetrics 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.ContainerService.Models.ManagedClusterMonitorProfileKubeStateMetrics System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2025,6 +2092,7 @@ public partial class ManagedClusterMonitorProfileMetrics : System.ClientModel.Pr public ManagedClusterMonitorProfileMetrics(bool isEnabled) { } public bool IsEnabled { get { throw null; } set { } } public Azure.ResourceManager.ContainerService.Models.ManagedClusterMonitorProfileKubeStateMetrics KubeStateMetrics { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerService.Models.ManagedClusterMonitorProfileMetrics 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.ContainerService.Models.ManagedClusterMonitorProfileMetrics System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2037,6 +2105,7 @@ public ManagedClusterNatGatewayProfile() { } public System.Collections.Generic.IList EffectiveOutboundIPs { get { throw null; } } public int? IdleTimeoutInMinutes { get { throw null; } set { } } public int? ManagedOutboundIPCount { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerService.Models.ManagedClusterNatGatewayProfile 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.ContainerService.Models.ManagedClusterNatGatewayProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2067,6 +2136,7 @@ public partial class ManagedClusterOidcIssuerProfile : System.ClientModel.Primit public ManagedClusterOidcIssuerProfile() { } public bool? IsEnabled { get { throw null; } set { } } public string IssuerUriInfo { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerService.Models.ManagedClusterOidcIssuerProfile 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.ContainerService.Models.ManagedClusterOidcIssuerProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2082,6 +2152,7 @@ public ManagedClusterPodIdentity(string name, string @namespace, Azure.ResourceM public string Name { get { throw null; } set { } } public string Namespace { get { throw null; } set { } } public Azure.ResourceManager.ContainerService.Models.ManagedClusterPodIdentityProvisioningState? ProvisioningState { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerService.Models.ManagedClusterPodIdentity 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.ContainerService.Models.ManagedClusterPodIdentity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2094,6 +2165,7 @@ public ManagedClusterPodIdentityException(string name, string @namespace, System public string Name { get { throw null; } set { } } public string Namespace { get { throw null; } set { } } public System.Collections.Generic.IDictionary PodLabels { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerService.Models.ManagedClusterPodIdentityException 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.ContainerService.Models.ManagedClusterPodIdentityException System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2107,6 +2179,7 @@ public ManagedClusterPodIdentityProfile() { } public bool? IsEnabled { get { throw null; } set { } } public System.Collections.Generic.IList UserAssignedIdentities { get { throw null; } } public System.Collections.Generic.IList UserAssignedIdentityExceptions { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerService.Models.ManagedClusterPodIdentityProfile 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.ContainerService.Models.ManagedClusterPodIdentityProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2142,6 +2215,7 @@ internal ManagedClusterPoolUpgradeProfile() { } public string Name { get { throw null; } } public Azure.ResourceManager.ContainerService.Models.ContainerServiceOSType OSType { get { throw null; } } public System.Collections.Generic.IReadOnlyList Upgrades { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerService.Models.ManagedClusterPoolUpgradeProfile 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.ContainerService.Models.ManagedClusterPoolUpgradeProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2153,6 +2227,7 @@ public partial class ManagedClusterPoolUpgradeProfileUpgradesItem : System.Clien internal ManagedClusterPoolUpgradeProfileUpgradesItem() { } public bool? IsPreview { get { throw null; } } public string KubernetesVersion { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerService.Models.ManagedClusterPoolUpgradeProfileUpgradesItem 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.ContainerService.Models.ManagedClusterPoolUpgradeProfileUpgradesItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2165,6 +2240,7 @@ public ManagedClusterRunCommandContent(string command) { } public string ClusterToken { get { throw null; } set { } } public string Command { get { throw null; } } public string Context { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerService.Models.ManagedClusterRunCommandContent 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.ContainerService.Models.ManagedClusterRunCommandContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2181,6 +2257,7 @@ internal ManagedClusterRunCommandResult() { } public string ProvisioningState { get { throw null; } } public string Reason { get { throw null; } } public System.DateTimeOffset? StartedOn { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerService.Models.ManagedClusterRunCommandResult 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.ContainerService.Models.ManagedClusterRunCommandResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2194,6 +2271,7 @@ public ManagedClusterSecurityProfile() { } public Azure.ResourceManager.ContainerService.Models.ManagedClusterSecurityProfileDefender Defender { get { throw null; } set { } } public Azure.ResourceManager.ContainerService.Models.ManagedClusterSecurityProfileImageCleaner ImageCleaner { get { throw null; } set { } } public bool? IsWorkloadIdentityEnabled { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerService.Models.ManagedClusterSecurityProfile 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.ContainerService.Models.ManagedClusterSecurityProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2212,6 +2290,7 @@ public partial class ManagedClusterSecurityProfileDefender : System.ClientModel. public ManagedClusterSecurityProfileDefender() { } public bool? IsSecurityMonitoringEnabled { get { throw null; } set { } } public Azure.Core.ResourceIdentifier LogAnalyticsWorkspaceResourceId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerService.Models.ManagedClusterSecurityProfileDefender 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.ContainerService.Models.ManagedClusterSecurityProfileDefender System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2223,6 +2302,7 @@ public partial class ManagedClusterSecurityProfileImageCleaner : System.ClientMo public ManagedClusterSecurityProfileImageCleaner() { } public int? IntervalHours { get { throw null; } set { } } public bool? IsEnabled { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerService.Models.ManagedClusterSecurityProfileImageCleaner 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.ContainerService.Models.ManagedClusterSecurityProfileImageCleaner System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2236,6 +2316,7 @@ public ManagedClusterSecurityProfileKeyVaultKms() { } public string KeyId { get { throw null; } set { } } public Azure.ResourceManager.ContainerService.Models.ManagedClusterKeyVaultNetworkAccessType? KeyVaultNetworkAccess { get { throw null; } set { } } public Azure.Core.ResourceIdentifier KeyVaultResourceId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerService.Models.ManagedClusterSecurityProfileKeyVaultKms 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.ContainerService.Models.ManagedClusterSecurityProfileKeyVaultKms System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2247,6 +2328,7 @@ public partial class ManagedClusterServicePrincipalProfile : System.ClientModel. public ManagedClusterServicePrincipalProfile(string clientId) { } public string ClientId { get { throw null; } set { } } public string Secret { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerService.Models.ManagedClusterServicePrincipalProfile 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.ContainerService.Models.ManagedClusterServicePrincipalProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2258,6 +2340,7 @@ public partial class ManagedClusterSku : System.ClientModel.Primitives.IJsonMode public ManagedClusterSku() { } public Azure.ResourceManager.ContainerService.Models.ManagedClusterSkuName? Name { get { throw null; } set { } } public Azure.ResourceManager.ContainerService.Models.ManagedClusterSkuTier? Tier { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerService.Models.ManagedClusterSku 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.ContainerService.Models.ManagedClusterSku System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2316,6 +2399,7 @@ public ManagedClusterStorageProfile() { } public bool? IsFileCsiDriverEnabled { get { throw null; } set { } } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public bool? IsSnapshotControllerEnabled { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerService.Models.ManagedClusterStorageProfile 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.ContainerService.Models.ManagedClusterStorageProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2330,6 +2414,7 @@ public ManagedClusterWindowsProfile(string adminUsername) { } public Azure.ResourceManager.ContainerService.Models.WindowsGmsaProfile GmsaProfile { get { throw null; } set { } } public bool? IsCsiProxyEnabled { get { throw null; } set { } } public Azure.ResourceManager.ContainerService.Models.WindowsVmLicenseType? LicenseType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerService.Models.ManagedClusterWindowsProfile 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.ContainerService.Models.ManagedClusterWindowsProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2341,6 +2426,7 @@ public partial class ManagedClusterWorkloadAutoScalerProfile : System.ClientMode public ManagedClusterWorkloadAutoScalerProfile() { } public bool? IsKedaEnabled { get { throw null; } set { } } public bool? IsVpaEnabled { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerService.Models.ManagedClusterWorkloadAutoScalerProfile 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.ContainerService.Models.ManagedClusterWorkloadAutoScalerProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2353,6 +2439,7 @@ public MeshRevision() { } public System.Collections.Generic.IList CompatibleWith { get { throw null; } } public string Revision { get { throw null; } set { } } public System.Collections.Generic.IList Upgrades { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerService.Models.MeshRevision 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.ContainerService.Models.MeshRevision System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2362,6 +2449,7 @@ public MeshRevision() { } public partial class MeshUpgradeProfileProperties : Azure.ResourceManager.ContainerService.Models.MeshRevision, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public MeshUpgradeProfileProperties() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerService.Models.MeshUpgradeProfileProperties 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.ContainerService.Models.MeshUpgradeProfileProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2463,6 +2551,7 @@ public partial class ServiceMeshProfile : System.ClientModel.Primitives.IJsonMod public ServiceMeshProfile(Azure.ResourceManager.ContainerService.Models.ServiceMeshMode mode) { } public Azure.ResourceManager.ContainerService.Models.IstioServiceMesh Istio { get { throw null; } set { } } public Azure.ResourceManager.ContainerService.Models.ServiceMeshMode Mode { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerService.Models.ServiceMeshProfile 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.ContainerService.Models.ServiceMeshProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2517,6 +2606,7 @@ public SysctlConfig() { } public int? VmMaxMapCount { get { throw null; } set { } } public int? VmSwappiness { get { throw null; } set { } } public int? VmVfsCachePressure { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerService.Models.SysctlConfig 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.ContainerService.Models.SysctlConfig System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2549,6 +2639,7 @@ public partial class UpgradeOverrideSettings : System.ClientModel.Primitives.IJs public UpgradeOverrideSettings() { } public bool? ForceUpgrade { get { throw null; } set { } } public System.DateTimeOffset? Until { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerService.Models.UpgradeOverrideSettings 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.ContainerService.Models.UpgradeOverrideSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2561,6 +2652,7 @@ public WindowsGmsaProfile() { } public string DnsServer { get { throw null; } set { } } public bool? IsEnabled { get { throw null; } set { } } public string RootDomainName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerService.Models.WindowsGmsaProfile 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.ContainerService.Models.WindowsGmsaProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/assets.json b/sdk/containerservice/Azure.ResourceManager.ContainerService/assets.json index 29e90e5b13d7..21c0f581e0c2 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/assets.json +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/containerservice/Azure.ResourceManager.ContainerService", - "Tag": "net/containerservice/Azure.ResourceManager.ContainerService_e23b32e72d" + "Tag": "net/containerservice/Azure.ResourceManager.ContainerService_fa83a7ce07" } diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/AgentPoolSnapshotData.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/AgentPoolSnapshotData.Serialization.cs index f72ebf41fa26..c99254a7bcde 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/AgentPoolSnapshotData.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/AgentPoolSnapshotData.Serialization.cs @@ -22,6 +22,15 @@ public partial class AgentPoolSnapshotData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -29,40 +38,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(AgentPoolSnapshotData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(CreationData)) @@ -106,22 +82,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW writer.WriteBooleanValue(EnableFips.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } AgentPoolSnapshotData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/AgentPoolUpgradeProfileData.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/AgentPoolUpgradeProfileData.Serialization.cs index 20c768f5f919..8c89c84e94ee 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/AgentPoolUpgradeProfileData.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/AgentPoolUpgradeProfileData.Serialization.cs @@ -22,6 +22,15 @@ public partial class AgentPoolUpgradeProfileData : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -29,27 +38,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(AgentPoolUpgradeProfileData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); writer.WritePropertyName("kubernetesVersion"u8); @@ -72,22 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR writer.WriteStringValue(LatestNodeImageVersion); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } AgentPoolUpgradeProfileData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceAgentPoolData.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceAgentPoolData.Serialization.cs index 1c41155eeb90..39cdecd5e1e7 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceAgentPoolData.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceAgentPoolData.Serialization.cs @@ -22,6 +22,15 @@ public partial class ContainerServiceAgentPoolData : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -29,27 +38,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(ContainerServiceAgentPoolData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Count)) @@ -290,22 +279,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode writer.WriteObjectValue(NetworkProfile, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ContainerServiceAgentPoolData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceMaintenanceConfigurationData.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceMaintenanceConfigurationData.Serialization.cs index ae37e7532afd..cde4d80a25cc 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceMaintenanceConfigurationData.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceMaintenanceConfigurationData.Serialization.cs @@ -22,6 +22,15 @@ public partial class ContainerServiceMaintenanceConfigurationData : IUtf8JsonSer void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -29,27 +38,7 @@ void IJsonModel.Write(Utf8JsonWrit throw new FormatException($"The model {nameof(ContainerServiceMaintenanceConfigurationData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsCollectionDefined(TimesInWeek)) @@ -78,22 +67,6 @@ void IJsonModel.Write(Utf8JsonWrit writer.WriteObjectValue(MaintenanceWindow, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ContainerServiceMaintenanceConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceManagedClusterData.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceManagedClusterData.Serialization.cs index fadf3609ad9c..c9542e97356d 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceManagedClusterData.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceManagedClusterData.Serialization.cs @@ -23,6 +23,15 @@ public partial class ContainerServiceManagedClusterData : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -30,7 +39,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(ContainerServiceManagedClusterData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Sku)) { writer.WritePropertyName("sku"u8); @@ -46,39 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WritePropertyName("identity"u8); writer.WriteObjectValue(ClusterIdentity, options); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) @@ -299,22 +275,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteStringValue(ResourceId); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ContainerServiceManagedClusterData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServicePrivateEndpointConnectionData.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServicePrivateEndpointConnectionData.Serialization.cs index a9c98f4d1b79..579e451e6350 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServicePrivateEndpointConnectionData.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServicePrivateEndpointConnectionData.Serialization.cs @@ -22,6 +22,15 @@ public partial class ContainerServicePrivateEndpointConnectionData : IUtf8JsonSe void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -29,27 +38,7 @@ void IJsonModel.Write(Utf8JsonWri throw new FormatException($"The model {nameof(ContainerServicePrivateEndpointConnectionData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) @@ -68,22 +57,6 @@ void IJsonModel.Write(Utf8JsonWri writer.WriteObjectValue(ConnectionState, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ContainerServicePrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceTrustedAccessRoleBindingData.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceTrustedAccessRoleBindingData.Serialization.cs index b0d051ca6b19..e5bc2710de83 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceTrustedAccessRoleBindingData.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceTrustedAccessRoleBindingData.Serialization.cs @@ -22,6 +22,15 @@ public partial class ContainerServiceTrustedAccessRoleBindingData : IUtf8JsonSer void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -29,27 +38,7 @@ void IJsonModel.Write(Utf8JsonWrit throw new FormatException($"The model {nameof(ContainerServiceTrustedAccessRoleBindingData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) @@ -67,22 +56,6 @@ void IJsonModel.Write(Utf8JsonWrit } writer.WriteEndArray(); writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ContainerServiceTrustedAccessRoleBindingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ManagedClusterUpgradeProfileData.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ManagedClusterUpgradeProfileData.Serialization.cs index 37e262a17e52..db93b1ecc5bc 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ManagedClusterUpgradeProfileData.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ManagedClusterUpgradeProfileData.Serialization.cs @@ -22,6 +22,15 @@ public partial class ManagedClusterUpgradeProfileData : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -29,27 +38,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(ManagedClusterUpgradeProfileData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); writer.WritePropertyName("controlPlaneProfile"u8); @@ -62,22 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M } writer.WriteEndArray(); writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ManagedClusterUpgradeProfileData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/MeshRevisionProfileData.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/MeshRevisionProfileData.Serialization.cs index b211e55ed7ca..4232728b80f5 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/MeshRevisionProfileData.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/MeshRevisionProfileData.Serialization.cs @@ -21,6 +21,15 @@ public partial class MeshRevisionProfileData : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,48 +37,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(MeshRevisionProfileData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); writer.WriteObjectValue(Properties, options); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } MeshRevisionProfileData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/MeshUpgradeProfileData.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/MeshUpgradeProfileData.Serialization.cs index b1418187bc75..1750f594f6d5 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/MeshUpgradeProfileData.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/MeshUpgradeProfileData.Serialization.cs @@ -21,6 +21,15 @@ public partial class MeshUpgradeProfileData : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,48 +37,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(MeshUpgradeProfileData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); writer.WriteObjectValue(Properties, options); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } MeshUpgradeProfileData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AgentPoolAvailableVersion.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AgentPoolAvailableVersion.Serialization.cs index a0e326cde1ac..0cd58983d378 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AgentPoolAvailableVersion.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AgentPoolAvailableVersion.Serialization.cs @@ -19,6 +19,15 @@ public partial class AgentPoolAvailableVersion : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(AgentPoolAvailableVersion)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IsDefault)) { writer.WritePropertyName("default"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } AgentPoolAvailableVersion IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AgentPoolAvailableVersions.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AgentPoolAvailableVersions.Serialization.cs index 8084924fd103..98e5614caafa 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AgentPoolAvailableVersions.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AgentPoolAvailableVersions.Serialization.cs @@ -21,6 +21,15 @@ public partial class AgentPoolAvailableVersions : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,27 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(AgentPoolAvailableVersions)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsCollectionDefined(AgentPoolVersions)) @@ -62,22 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } AgentPoolAvailableVersions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AgentPoolNetworkPortRange.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AgentPoolNetworkPortRange.Serialization.cs index 54dd151847dd..0761f7097c85 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AgentPoolNetworkPortRange.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AgentPoolNetworkPortRange.Serialization.cs @@ -19,6 +19,15 @@ public partial class AgentPoolNetworkPortRange : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(AgentPoolNetworkPortRange)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(PortStart)) { writer.WritePropertyName("portStart"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } AgentPoolNetworkPortRange IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AgentPoolNetworkProfile.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AgentPoolNetworkProfile.Serialization.cs index b7fa48c798ce..ad0468f383c4 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AgentPoolNetworkProfile.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AgentPoolNetworkProfile.Serialization.cs @@ -20,6 +20,15 @@ public partial class AgentPoolNetworkProfile : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(AgentPoolNetworkProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(NodePublicIPTags)) { writer.WritePropertyName("nodePublicIPTags"u8); @@ -78,7 +86,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } AgentPoolNetworkProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AgentPoolSnapshotListResult.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AgentPoolSnapshotListResult.Serialization.cs index 30b99e7e52d3..143eed16970a 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AgentPoolSnapshotListResult.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AgentPoolSnapshotListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class AgentPoolSnapshotListResult : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(AgentPoolSnapshotListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } AgentPoolSnapshotListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AgentPoolUpgradeProfilePropertiesUpgradesItem.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AgentPoolUpgradeProfilePropertiesUpgradesItem.Serialization.cs index 0a75f7947cf1..2c249418ee96 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AgentPoolUpgradeProfilePropertiesUpgradesItem.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AgentPoolUpgradeProfilePropertiesUpgradesItem.Serialization.cs @@ -19,6 +19,15 @@ public partial class AgentPoolUpgradeProfilePropertiesUpgradesItem : IUtf8JsonSe void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWri throw new FormatException($"The model {nameof(AgentPoolUpgradeProfilePropertiesUpgradesItem)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(KubernetesVersion)) { writer.WritePropertyName("kubernetesVersion"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWri #endif } } - writer.WriteEndObject(); } AgentPoolUpgradeProfilePropertiesUpgradesItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AgentPoolUpgradeSettings.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AgentPoolUpgradeSettings.Serialization.cs index fdd9c1422666..aec1ab565325 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AgentPoolUpgradeSettings.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AgentPoolUpgradeSettings.Serialization.cs @@ -19,6 +19,15 @@ public partial class AgentPoolUpgradeSettings : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(AgentPoolUpgradeSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(MaxSurge)) { writer.WritePropertyName("maxSurge"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } AgentPoolUpgradeSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ClusterUpgradeSettings.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ClusterUpgradeSettings.Serialization.cs index 283a42b59937..6c7e49bd44bf 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ClusterUpgradeSettings.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ClusterUpgradeSettings.Serialization.cs @@ -19,6 +19,15 @@ internal partial class ClusterUpgradeSettings : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(ClusterUpgradeSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(OverrideSettings)) { writer.WritePropertyName("overrideSettings"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } ClusterUpgradeSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/CompatibleVersions.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/CompatibleVersions.Serialization.cs index 35e81d6d1fd6..88b8cc406c41 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/CompatibleVersions.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/CompatibleVersions.Serialization.cs @@ -20,6 +20,15 @@ public partial class CompatibleVersions : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(CompatibleVersions)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } CompatibleVersions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceAgentPoolListResult.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceAgentPoolListResult.Serialization.cs index 27953a02a149..3f8a5f758d65 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceAgentPoolListResult.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceAgentPoolListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class ContainerServiceAgentPoolListResult : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(ContainerServiceAgentPoolListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } ContainerServiceAgentPoolListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceCreationData.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceCreationData.Serialization.cs index a4e851593941..01fd98e77e9d 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceCreationData.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceCreationData.Serialization.cs @@ -19,6 +19,15 @@ internal partial class ContainerServiceCreationData : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(ContainerServiceCreationData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(SourceResourceId)) { writer.WritePropertyName("sourceResourceId"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } ContainerServiceCreationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceDateSpan.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceDateSpan.Serialization.cs index e952bfc94822..3bcb3b3773ac 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceDateSpan.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceDateSpan.Serialization.cs @@ -19,6 +19,15 @@ public partial class ContainerServiceDateSpan : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(ContainerServiceDateSpan)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("start"u8); writer.WriteStringValue(Start, "D"); writer.WritePropertyName("end"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } ContainerServiceDateSpan IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceEndpointDependency.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceEndpointDependency.Serialization.cs index 89fb69503ae7..6cf09283dae9 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceEndpointDependency.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceEndpointDependency.Serialization.cs @@ -20,6 +20,15 @@ public partial class ContainerServiceEndpointDependency : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(ContainerServiceEndpointDependency)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(DomainName)) { writer.WritePropertyName("domainName"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } ContainerServiceEndpointDependency IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceEndpointDetail.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceEndpointDetail.Serialization.cs index 88ca9173da1f..a4f62b7947cf 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceEndpointDetail.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceEndpointDetail.Serialization.cs @@ -20,6 +20,15 @@ public partial class ContainerServiceEndpointDetail : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(ContainerServiceEndpointDetail)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IPAddress)) { writer.WritePropertyName("ipAddress"u8); @@ -63,7 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } ContainerServiceEndpointDetail IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceIPTag.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceIPTag.Serialization.cs index 7a97777d4cb3..9bf1bb3ed2e1 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceIPTag.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceIPTag.Serialization.cs @@ -19,6 +19,15 @@ public partial class ContainerServiceIPTag : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(ContainerServiceIPTag)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IPTagType)) { writer.WritePropertyName("ipTagType"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } ContainerServiceIPTag IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceLinuxProfile.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceLinuxProfile.Serialization.cs index f0e118b58ad5..20d51165b50b 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceLinuxProfile.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceLinuxProfile.Serialization.cs @@ -19,6 +19,15 @@ public partial class ContainerServiceLinuxProfile : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(ContainerServiceLinuxProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("adminUsername"u8); writer.WriteStringValue(AdminUsername); writer.WritePropertyName("ssh"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } ContainerServiceLinuxProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceMaintenanceAbsoluteMonthlySchedule.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceMaintenanceAbsoluteMonthlySchedule.Serialization.cs index 7ae09090cbe1..82dcdd7b85c8 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceMaintenanceAbsoluteMonthlySchedule.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceMaintenanceAbsoluteMonthlySchedule.Serialization.cs @@ -19,6 +19,15 @@ public partial class ContainerServiceMaintenanceAbsoluteMonthlySchedule : IUtf8J void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8Js throw new FormatException($"The model {nameof(ContainerServiceMaintenanceAbsoluteMonthlySchedule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("intervalMonths"u8); writer.WriteNumberValue(IntervalMonths); writer.WritePropertyName("dayOfMonth"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8Js #endif } } - writer.WriteEndObject(); } ContainerServiceMaintenanceAbsoluteMonthlySchedule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceMaintenanceConfigurationListResult.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceMaintenanceConfigurationListResult.Serialization.cs index a06e6ba7b6f0..2f445b90f06c 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceMaintenanceConfigurationListResult.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceMaintenanceConfigurationListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class ContainerServiceMaintenanceConfigurationListResult : IUtf void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8Js throw new FormatException($"The model {nameof(ContainerServiceMaintenanceConfigurationListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8Js #endif } } - writer.WriteEndObject(); } ContainerServiceMaintenanceConfigurationListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceMaintenanceRelativeMonthlySchedule.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceMaintenanceRelativeMonthlySchedule.Serialization.cs index 4aac5bbafa6b..b9aeaeddc09d 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceMaintenanceRelativeMonthlySchedule.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceMaintenanceRelativeMonthlySchedule.Serialization.cs @@ -19,6 +19,15 @@ public partial class ContainerServiceMaintenanceRelativeMonthlySchedule : IUtf8J void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8Js throw new FormatException($"The model {nameof(ContainerServiceMaintenanceRelativeMonthlySchedule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("intervalMonths"u8); writer.WriteNumberValue(IntervalMonths); writer.WritePropertyName("weekIndex"u8); @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8Js #endif } } - writer.WriteEndObject(); } ContainerServiceMaintenanceRelativeMonthlySchedule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceMaintenanceSchedule.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceMaintenanceSchedule.Serialization.cs index 40a7dddafc27..efbb0975ee04 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceMaintenanceSchedule.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceMaintenanceSchedule.Serialization.cs @@ -19,6 +19,15 @@ public partial class ContainerServiceMaintenanceSchedule : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(ContainerServiceMaintenanceSchedule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Daily)) { writer.WritePropertyName("daily"u8); @@ -62,7 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } ContainerServiceMaintenanceSchedule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceMaintenanceWeeklySchedule.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceMaintenanceWeeklySchedule.Serialization.cs index cd1419257d4f..54892ad5ef5f 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceMaintenanceWeeklySchedule.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceMaintenanceWeeklySchedule.Serialization.cs @@ -19,6 +19,15 @@ public partial class ContainerServiceMaintenanceWeeklySchedule : IUtf8JsonSerial void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(ContainerServiceMaintenanceWeeklySchedule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("intervalWeeks"u8); writer.WriteNumberValue(IntervalWeeks); writer.WritePropertyName("dayOfWeek"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } ContainerServiceMaintenanceWeeklySchedule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceMaintenanceWindow.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceMaintenanceWindow.Serialization.cs index 73c6aebd730b..bb4dae4839c7 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceMaintenanceWindow.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceMaintenanceWindow.Serialization.cs @@ -20,6 +20,15 @@ public partial class ContainerServiceMaintenanceWindow : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(ContainerServiceMaintenanceWindow)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("schedule"u8); writer.WriteObjectValue(Schedule, options); writer.WritePropertyName("durationHours"u8); @@ -69,7 +77,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } ContainerServiceMaintenanceWindow IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceNetworkProfile.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceNetworkProfile.Serialization.cs index 01fc7a98cd96..9c13ae4250df 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceNetworkProfile.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceNetworkProfile.Serialization.cs @@ -20,6 +20,15 @@ public partial class ContainerServiceNetworkProfile : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(ContainerServiceNetworkProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(NetworkPlugin)) { writer.WritePropertyName("networkPlugin"u8); @@ -133,7 +141,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } ContainerServiceNetworkProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceOSOptionProperty.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceOSOptionProperty.Serialization.cs index 65e284639643..8843dd9a5ffa 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceOSOptionProperty.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceOSOptionProperty.Serialization.cs @@ -19,6 +19,15 @@ public partial class ContainerServiceOSOptionProperty : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(ContainerServiceOSOptionProperty)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("os-type"u8); writer.WriteStringValue(OSType); writer.WritePropertyName("enable-fips-image"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } ContainerServiceOSOptionProperty IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceOutboundEnvironmentEndpoint.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceOutboundEnvironmentEndpoint.Serialization.cs index 605b9fa20a9e..64c3ab232297 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceOutboundEnvironmentEndpoint.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceOutboundEnvironmentEndpoint.Serialization.cs @@ -20,6 +20,15 @@ public partial class ContainerServiceOutboundEnvironmentEndpoint : IUtf8JsonSeri void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWrite throw new FormatException($"The model {nameof(ContainerServiceOutboundEnvironmentEndpoint)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Category)) { writer.WritePropertyName("category"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWrite #endif } } - writer.WriteEndObject(); } ContainerServiceOutboundEnvironmentEndpoint IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServicePowerState.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServicePowerState.Serialization.cs index e056b4a5d2f4..c911cadae0bf 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServicePowerState.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServicePowerState.Serialization.cs @@ -19,6 +19,15 @@ internal partial class ContainerServicePowerState : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(ContainerServicePowerState)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Code)) { writer.WritePropertyName("code"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } ContainerServicePowerState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServicePrivateEndpointConnectionListResult.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServicePrivateEndpointConnectionListResult.Serialization.cs index b90feb90bf0b..e566a937e1b5 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServicePrivateEndpointConnectionListResult.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServicePrivateEndpointConnectionListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class ContainerServicePrivateEndpointConnectionListResult : IUt void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8J throw new FormatException($"The model {nameof(ContainerServicePrivateEndpointConnectionListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8J #endif } } - writer.WriteEndObject(); } ContainerServicePrivateEndpointConnectionListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServicePrivateLinkResourceData.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServicePrivateLinkResourceData.Serialization.cs index 9e495eb11f51..1a16263ca528 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServicePrivateLinkResourceData.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServicePrivateLinkResourceData.Serialization.cs @@ -20,6 +20,15 @@ public partial class ContainerServicePrivateLinkResourceData : IUtf8JsonSerializ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter wr throw new FormatException($"The model {nameof(ContainerServicePrivateLinkResourceData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -78,7 +86,6 @@ void IJsonModel.Write(Utf8JsonWriter wr #endif } } - writer.WriteEndObject(); } ContainerServicePrivateLinkResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServicePrivateLinkResourcesListResult.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServicePrivateLinkResourcesListResult.Serialization.cs index 80328750f0d9..7c6a3cf7434f 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServicePrivateLinkResourcesListResult.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServicePrivateLinkResourcesListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class ContainerServicePrivateLinkResourcesListResult : IUtf8Jso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWr throw new FormatException($"The model {nameof(ContainerServicePrivateLinkResourcesListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWr #endif } } - writer.WriteEndObject(); } ContainerServicePrivateLinkResourcesListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServicePrivateLinkServiceConnectionState.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServicePrivateLinkServiceConnectionState.Serialization.cs index 3ca6af2b9945..c5257a636298 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServicePrivateLinkServiceConnectionState.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServicePrivateLinkServiceConnectionState.Serialization.cs @@ -19,6 +19,15 @@ public partial class ContainerServicePrivateLinkServiceConnectionState : IUtf8Js void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8Jso throw new FormatException($"The model {nameof(ContainerServicePrivateLinkServiceConnectionState)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Status)) { writer.WritePropertyName("status"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8Jso #endif } } - writer.WriteEndObject(); } ContainerServicePrivateLinkServiceConnectionState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceSshConfiguration.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceSshConfiguration.Serialization.cs index a4c88222cdb7..699d7768cb99 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceSshConfiguration.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceSshConfiguration.Serialization.cs @@ -20,6 +20,15 @@ public partial class ContainerServiceSshConfiguration : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(ContainerServiceSshConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("publicKeys"u8); writer.WriteStartArray(); foreach (var item in PublicKeys) @@ -50,7 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } ContainerServiceSshConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceSshPublicKey.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceSshPublicKey.Serialization.cs index 6cfe38f731c3..e91ea23f1c5d 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceSshPublicKey.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceSshPublicKey.Serialization.cs @@ -19,6 +19,15 @@ public partial class ContainerServiceSshPublicKey : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(ContainerServiceSshPublicKey)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("keyData"u8); writer.WriteStringValue(KeyData); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -44,7 +52,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } ContainerServiceSshPublicKey IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceTagsObject.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceTagsObject.Serialization.cs index d1025d216e29..b35458d4cbd3 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceTagsObject.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceTagsObject.Serialization.cs @@ -18,6 +18,15 @@ public partial class ContainerServiceTagsObject : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(ContainerServiceTagsObject)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } ContainerServiceTagsObject IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceTimeInWeek.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceTimeInWeek.Serialization.cs index 424e2a8a74cd..23a3b7c194b9 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceTimeInWeek.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceTimeInWeek.Serialization.cs @@ -20,6 +20,15 @@ public partial class ContainerServiceTimeInWeek : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(ContainerServiceTimeInWeek)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Day)) { writer.WritePropertyName("day"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } ContainerServiceTimeInWeek IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceTimeSpan.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceTimeSpan.Serialization.cs index 9dc807ef0a2a..0417e9942284 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceTimeSpan.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceTimeSpan.Serialization.cs @@ -19,6 +19,15 @@ public partial class ContainerServiceTimeSpan : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(ContainerServiceTimeSpan)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(StartOn)) { writer.WritePropertyName("start"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } ContainerServiceTimeSpan IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceTrustedAccessRole.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceTrustedAccessRole.Serialization.cs index 632722cbddf2..0e3330402797 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceTrustedAccessRole.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceTrustedAccessRole.Serialization.cs @@ -20,6 +20,15 @@ public partial class ContainerServiceTrustedAccessRole : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(ContainerServiceTrustedAccessRole)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(SourceResourceType)) { writer.WritePropertyName("sourceResourceType"u8); @@ -63,7 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } ContainerServiceTrustedAccessRole IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceTrustedAccessRoleRule.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceTrustedAccessRoleRule.Serialization.cs index c4fff73090fd..0353e6220aad 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceTrustedAccessRoleRule.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceTrustedAccessRoleRule.Serialization.cs @@ -20,6 +20,15 @@ public partial class ContainerServiceTrustedAccessRoleRule : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(ContainerServiceTrustedAccessRoleRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Verbs)) { writer.WritePropertyName("verbs"u8); @@ -93,7 +101,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } ContainerServiceTrustedAccessRoleRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceUserAssignedIdentity.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceUserAssignedIdentity.Serialization.cs index 2ae95734e78f..728ce4c1cd05 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceUserAssignedIdentity.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceUserAssignedIdentity.Serialization.cs @@ -19,6 +19,15 @@ public partial class ContainerServiceUserAssignedIdentity : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(ContainerServiceUserAssignedIdentity)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ResourceId)) { writer.WritePropertyName("resourceId"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } ContainerServiceUserAssignedIdentity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/DailySchedule.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/DailySchedule.Serialization.cs index 7651721c3709..26b4ff0c3b79 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/DailySchedule.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/DailySchedule.Serialization.cs @@ -19,6 +19,15 @@ internal partial class DailySchedule : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt throw new FormatException($"The model {nameof(DailySchedule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("intervalDays"u8); writer.WriteNumberValue(IntervalDays); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -44,7 +52,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt #endif } } - writer.WriteEndObject(); } DailySchedule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/IstioCertificateAuthority.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/IstioCertificateAuthority.Serialization.cs index 75b99b255de7..6130fd5a23d0 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/IstioCertificateAuthority.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/IstioCertificateAuthority.Serialization.cs @@ -19,6 +19,15 @@ internal partial class IstioCertificateAuthority : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(IstioCertificateAuthority)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Plugin)) { writer.WritePropertyName("plugin"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } IstioCertificateAuthority IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/IstioComponents.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/IstioComponents.Serialization.cs index 910a2e1a3c35..4861c4ab459d 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/IstioComponents.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/IstioComponents.Serialization.cs @@ -20,6 +20,15 @@ public partial class IstioComponents : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(IstioComponents)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(IngressGateways)) { writer.WritePropertyName("ingressGateways"u8); @@ -63,7 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO #endif } } - writer.WriteEndObject(); } IstioComponents IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/IstioEgressGateway.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/IstioEgressGateway.Serialization.cs index 37643ad44189..02b819db69dc 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/IstioEgressGateway.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/IstioEgressGateway.Serialization.cs @@ -20,6 +20,15 @@ public partial class IstioEgressGateway : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(IstioEgressGateway)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("enabled"u8); writer.WriteBooleanValue(IsEnabled); if (Optional.IsCollectionDefined(NodeSelector)) @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } IstioEgressGateway IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/IstioIngressGateway.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/IstioIngressGateway.Serialization.cs index a44236e51797..8c2ef53a3ac9 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/IstioIngressGateway.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/IstioIngressGateway.Serialization.cs @@ -19,6 +19,15 @@ public partial class IstioIngressGateway : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(IstioIngressGateway)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("mode"u8); writer.WriteStringValue(Mode.ToString()); writer.WritePropertyName("enabled"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } IstioIngressGateway IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/IstioPluginCertificateAuthority.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/IstioPluginCertificateAuthority.Serialization.cs index 1404297d56ac..7e1c08e6fdf1 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/IstioPluginCertificateAuthority.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/IstioPluginCertificateAuthority.Serialization.cs @@ -19,6 +19,15 @@ public partial class IstioPluginCertificateAuthority : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(IstioPluginCertificateAuthority)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(KeyVaultId)) { writer.WritePropertyName("keyVaultId"u8); @@ -67,7 +75,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } IstioPluginCertificateAuthority IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/IstioServiceMesh.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/IstioServiceMesh.Serialization.cs index 250c7cd3af6d..a2ad8a209b0c 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/IstioServiceMesh.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/IstioServiceMesh.Serialization.cs @@ -20,6 +20,15 @@ public partial class IstioServiceMesh : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(IstioServiceMesh)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Components)) { writer.WritePropertyName("components"u8); @@ -63,7 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } IstioServiceMesh IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/KubeletConfig.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/KubeletConfig.Serialization.cs index c7322c76040b..8fff09734d85 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/KubeletConfig.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/KubeletConfig.Serialization.cs @@ -20,6 +20,15 @@ public partial class KubeletConfig : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt throw new FormatException($"The model {nameof(KubeletConfig)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(CpuManagerPolicy)) { writer.WritePropertyName("cpuManagerPolicy"u8); @@ -103,7 +111,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt #endif } } - writer.WriteEndObject(); } KubeletConfig IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/KubernetesPatchVersion.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/KubernetesPatchVersion.Serialization.cs index 14979789b364..c24787d9fa8e 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/KubernetesPatchVersion.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/KubernetesPatchVersion.Serialization.cs @@ -20,6 +20,15 @@ public partial class KubernetesPatchVersion : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(KubernetesPatchVersion)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Upgrades)) { writer.WritePropertyName("upgrades"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } KubernetesPatchVersion IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/KubernetesVersion.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/KubernetesVersion.Serialization.cs index b4a1da10497b..96b1eb4bbfca 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/KubernetesVersion.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/KubernetesVersion.Serialization.cs @@ -20,6 +20,15 @@ public partial class KubernetesVersion : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(KubernetesVersion)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Version)) { writer.WritePropertyName("version"u8); @@ -69,7 +77,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } KubernetesVersion IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/KubernetesVersionCapabilities.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/KubernetesVersionCapabilities.Serialization.cs index 9fd4d41da6f7..9883515282be 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/KubernetesVersionCapabilities.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/KubernetesVersionCapabilities.Serialization.cs @@ -20,6 +20,15 @@ internal partial class KubernetesVersionCapabilities : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(KubernetesVersionCapabilities)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(SupportPlan)) { writer.WritePropertyName("supportPlan"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } KubernetesVersionCapabilities IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/KubernetesVersionListResult.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/KubernetesVersionListResult.Serialization.cs index 653ef1489de3..e94bbd9c065a 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/KubernetesVersionListResult.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/KubernetesVersionListResult.Serialization.cs @@ -20,6 +20,15 @@ public partial class KubernetesVersionListResult : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(KubernetesVersionListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Values)) { writer.WritePropertyName("values"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } KubernetesVersionListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/LinuxOSConfig.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/LinuxOSConfig.Serialization.cs index fe1819f3e68d..32f1b3bd514e 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/LinuxOSConfig.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/LinuxOSConfig.Serialization.cs @@ -19,6 +19,15 @@ public partial class LinuxOSConfig : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt throw new FormatException($"The model {nameof(LinuxOSConfig)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Sysctls)) { writer.WritePropertyName("sysctls"u8); @@ -62,7 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt #endif } } - writer.WriteEndObject(); } LinuxOSConfig IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterAadProfile.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterAadProfile.Serialization.cs index e0526ed88246..78e837783383 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterAadProfile.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterAadProfile.Serialization.cs @@ -20,6 +20,15 @@ public partial class ManagedClusterAadProfile : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(ManagedClusterAadProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IsManagedAadEnabled)) { writer.WritePropertyName("managed"u8); @@ -83,7 +91,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } ManagedClusterAadProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterAccessProfile.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterAccessProfile.Serialization.cs index 523eb54b9536..e02f0832bf63 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterAccessProfile.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterAccessProfile.Serialization.cs @@ -21,6 +21,15 @@ public partial class ManagedClusterAccessProfile : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,40 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(ManagedClusterAccessProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(KubeConfig)) @@ -70,22 +46,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR writer.WriteBase64StringValue(KubeConfig, "D"); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ManagedClusterAccessProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterAddonProfile.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterAddonProfile.Serialization.cs index 9db2ecf7ae39..b866263c5c57 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterAddonProfile.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterAddonProfile.Serialization.cs @@ -20,6 +20,15 @@ public partial class ManagedClusterAddonProfile : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(ManagedClusterAddonProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("enabled"u8); writer.WriteBooleanValue(IsEnabled); if (Optional.IsCollectionDefined(Config)) @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } ManagedClusterAddonProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterAddonProfileIdentity.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterAddonProfileIdentity.Serialization.cs index 4b8286a71e27..361fc7545e93 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterAddonProfileIdentity.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterAddonProfileIdentity.Serialization.cs @@ -19,6 +19,15 @@ public partial class ManagedClusterAddonProfileIdentity : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,38 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(ManagedClusterAddonProfileIdentity)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(ResourceId)) - { - writer.WritePropertyName("resourceId"u8); - writer.WriteStringValue(ResourceId); - } - if (Optional.IsDefined(ClientId)) - { - writer.WritePropertyName("clientId"u8); - writer.WriteStringValue(ClientId.Value); - } - if (Optional.IsDefined(ObjectId)) - { - writer.WritePropertyName("objectId"u8); - writer.WriteStringValue(ObjectId.Value); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } ManagedClusterAddonProfileIdentity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterAgentPoolProfile.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterAgentPoolProfile.Serialization.cs index 7ebb36e9245b..5f75761cd221 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterAgentPoolProfile.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterAgentPoolProfile.Serialization.cs @@ -20,6 +20,15 @@ public partial class ManagedClusterAgentPoolProfile : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,262 +36,9 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(ManagedClusterAgentPoolProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); - if (Optional.IsDefined(Count)) - { - writer.WritePropertyName("count"u8); - writer.WriteNumberValue(Count.Value); - } - if (Optional.IsDefined(VmSize)) - { - writer.WritePropertyName("vmSize"u8); - writer.WriteStringValue(VmSize); - } - if (Optional.IsDefined(OSDiskSizeInGB)) - { - writer.WritePropertyName("osDiskSizeGB"u8); - writer.WriteNumberValue(OSDiskSizeInGB.Value); - } - if (Optional.IsDefined(OSDiskType)) - { - writer.WritePropertyName("osDiskType"u8); - writer.WriteStringValue(OSDiskType.Value.ToString()); - } - if (Optional.IsDefined(KubeletDiskType)) - { - writer.WritePropertyName("kubeletDiskType"u8); - writer.WriteStringValue(KubeletDiskType.Value.ToString()); - } - if (Optional.IsDefined(WorkloadRuntime)) - { - writer.WritePropertyName("workloadRuntime"u8); - writer.WriteStringValue(WorkloadRuntime.Value.ToString()); - } - if (Optional.IsDefined(VnetSubnetId)) - { - writer.WritePropertyName("vnetSubnetID"u8); - writer.WriteStringValue(VnetSubnetId); - } - if (Optional.IsDefined(PodSubnetId)) - { - writer.WritePropertyName("podSubnetID"u8); - writer.WriteStringValue(PodSubnetId); - } - if (Optional.IsDefined(MaxPods)) - { - writer.WritePropertyName("maxPods"u8); - writer.WriteNumberValue(MaxPods.Value); - } - if (Optional.IsDefined(OSType)) - { - writer.WritePropertyName("osType"u8); - writer.WriteStringValue(OSType.Value.ToString()); - } - if (Optional.IsDefined(OSSku)) - { - writer.WritePropertyName("osSKU"u8); - writer.WriteStringValue(OSSku.Value.ToString()); - } - if (Optional.IsDefined(MaxCount)) - { - writer.WritePropertyName("maxCount"u8); - writer.WriteNumberValue(MaxCount.Value); - } - if (Optional.IsDefined(MinCount)) - { - writer.WritePropertyName("minCount"u8); - writer.WriteNumberValue(MinCount.Value); - } - if (Optional.IsDefined(EnableAutoScaling)) - { - writer.WritePropertyName("enableAutoScaling"u8); - writer.WriteBooleanValue(EnableAutoScaling.Value); - } - if (Optional.IsDefined(ScaleDownMode)) - { - writer.WritePropertyName("scaleDownMode"u8); - writer.WriteStringValue(ScaleDownMode.Value.ToString()); - } - if (Optional.IsDefined(AgentPoolType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(AgentPoolType.Value.ToString()); - } - if (Optional.IsDefined(Mode)) - { - writer.WritePropertyName("mode"u8); - writer.WriteStringValue(Mode.Value.ToString()); - } - if (Optional.IsDefined(OrchestratorVersion)) - { - writer.WritePropertyName("orchestratorVersion"u8); - writer.WriteStringValue(OrchestratorVersion); - } - if (options.Format != "W" && Optional.IsDefined(CurrentOrchestratorVersion)) - { - writer.WritePropertyName("currentOrchestratorVersion"u8); - writer.WriteStringValue(CurrentOrchestratorVersion); - } - if (options.Format != "W" && Optional.IsDefined(NodeImageVersion)) - { - writer.WritePropertyName("nodeImageVersion"u8); - writer.WriteStringValue(NodeImageVersion); - } - if (Optional.IsDefined(UpgradeSettings)) - { - writer.WritePropertyName("upgradeSettings"u8); - writer.WriteObjectValue(UpgradeSettings, options); - } - if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) - { - writer.WritePropertyName("provisioningState"u8); - writer.WriteStringValue(ProvisioningState); - } - if (Optional.IsDefined(PowerState)) - { - writer.WritePropertyName("powerState"u8); - writer.WriteObjectValue(PowerState, options); - } - if (Optional.IsCollectionDefined(AvailabilityZones)) - { - writer.WritePropertyName("availabilityZones"u8); - writer.WriteStartArray(); - foreach (var item in AvailabilityZones) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(EnableNodePublicIP)) - { - writer.WritePropertyName("enableNodePublicIP"u8); - writer.WriteBooleanValue(EnableNodePublicIP.Value); - } - if (Optional.IsDefined(NodePublicIPPrefixId)) - { - writer.WritePropertyName("nodePublicIPPrefixID"u8); - writer.WriteStringValue(NodePublicIPPrefixId); - } - if (Optional.IsDefined(ScaleSetPriority)) - { - writer.WritePropertyName("scaleSetPriority"u8); - writer.WriteStringValue(ScaleSetPriority.Value.ToString()); - } - if (Optional.IsDefined(ScaleSetEvictionPolicy)) - { - writer.WritePropertyName("scaleSetEvictionPolicy"u8); - writer.WriteStringValue(ScaleSetEvictionPolicy.Value.ToString()); - } - if (Optional.IsDefined(SpotMaxPrice)) - { - writer.WritePropertyName("spotMaxPrice"u8); - writer.WriteNumberValue(SpotMaxPrice.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(NodeLabels)) - { - writer.WritePropertyName("nodeLabels"u8); - writer.WriteStartObject(); - foreach (var item in NodeLabels) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(NodeTaints)) - { - writer.WritePropertyName("nodeTaints"u8); - writer.WriteStartArray(); - foreach (var item in NodeTaints) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(ProximityPlacementGroupId)) - { - writer.WritePropertyName("proximityPlacementGroupID"u8); - writer.WriteStringValue(ProximityPlacementGroupId); - } - if (Optional.IsDefined(KubeletConfig)) - { - writer.WritePropertyName("kubeletConfig"u8); - writer.WriteObjectValue(KubeletConfig, options); - } - if (Optional.IsDefined(LinuxOSConfig)) - { - writer.WritePropertyName("linuxOSConfig"u8); - writer.WriteObjectValue(LinuxOSConfig, options); - } - if (Optional.IsDefined(EnableEncryptionAtHost)) - { - writer.WritePropertyName("enableEncryptionAtHost"u8); - writer.WriteBooleanValue(EnableEncryptionAtHost.Value); - } - if (Optional.IsDefined(EnableUltraSsd)) - { - writer.WritePropertyName("enableUltraSSD"u8); - writer.WriteBooleanValue(EnableUltraSsd.Value); - } - if (Optional.IsDefined(EnableFips)) - { - writer.WritePropertyName("enableFIPS"u8); - writer.WriteBooleanValue(EnableFips.Value); - } - if (Optional.IsDefined(GpuInstanceProfile)) - { - writer.WritePropertyName("gpuInstanceProfile"u8); - writer.WriteStringValue(GpuInstanceProfile.Value.ToString()); - } - if (Optional.IsDefined(CreationData)) - { - writer.WritePropertyName("creationData"u8); - writer.WriteObjectValue(CreationData, options); - } - if (Optional.IsDefined(CapacityReservationGroupId)) - { - writer.WritePropertyName("capacityReservationGroupID"u8); - writer.WriteStringValue(CapacityReservationGroupId); - } - if (Optional.IsDefined(HostGroupId)) - { - writer.WritePropertyName("hostGroupID"u8); - writer.WriteStringValue(HostGroupId); - } - if (Optional.IsDefined(NetworkProfile)) - { - writer.WritePropertyName("networkProfile"u8); - writer.WriteObjectValue(NetworkProfile, options); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ManagedClusterAgentPoolProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterAgentPoolProfileProperties.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterAgentPoolProfileProperties.Serialization.cs index 6925f124e6b4..82c6710a7248 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterAgentPoolProfileProperties.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterAgentPoolProfileProperties.Serialization.cs @@ -20,6 +20,15 @@ public partial class ManagedClusterAgentPoolProfileProperties : IUtf8JsonSeriali void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter w throw new FormatException($"The model {nameof(ManagedClusterAgentPoolProfileProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Count)) { writer.WritePropertyName("count"u8); @@ -280,7 +288,6 @@ void IJsonModel.Write(Utf8JsonWriter w #endif } } - writer.WriteEndObject(); } ManagedClusterAgentPoolProfileProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterApiServerAccessProfile.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterApiServerAccessProfile.Serialization.cs index 85a310f2b0e8..9fe08827650d 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterApiServerAccessProfile.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterApiServerAccessProfile.Serialization.cs @@ -20,6 +20,15 @@ public partial class ManagedClusterApiServerAccessProfile : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(ManagedClusterApiServerAccessProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(AuthorizedIPRanges)) { writer.WritePropertyName("authorizedIPRanges"u8); @@ -73,7 +81,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } ManagedClusterApiServerAccessProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterAutoScalerProfile.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterAutoScalerProfile.Serialization.cs index 9e0e1c038292..81d43aabcb6c 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterAutoScalerProfile.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterAutoScalerProfile.Serialization.cs @@ -19,6 +19,15 @@ public partial class ManagedClusterAutoScalerProfile : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(ManagedClusterAutoScalerProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(BalanceSimilarNodeGroups)) { writer.WritePropertyName("balance-similar-node-groups"u8); @@ -127,7 +135,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } ManagedClusterAutoScalerProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterAutoUpgradeProfile.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterAutoUpgradeProfile.Serialization.cs index af586ca563bf..afc4075df230 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterAutoUpgradeProfile.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterAutoUpgradeProfile.Serialization.cs @@ -19,6 +19,15 @@ public partial class ManagedClusterAutoUpgradeProfile : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(ManagedClusterAutoUpgradeProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(UpgradeChannel)) { writer.WritePropertyName("upgradeChannel"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } ManagedClusterAutoUpgradeProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterAzureMonitorProfile.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterAzureMonitorProfile.Serialization.cs index 20a757a28750..dd3cbf9c4dfb 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterAzureMonitorProfile.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterAzureMonitorProfile.Serialization.cs @@ -19,6 +19,15 @@ internal partial class ManagedClusterAzureMonitorProfile : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(ManagedClusterAzureMonitorProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Metrics)) { writer.WritePropertyName("metrics"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } ManagedClusterAzureMonitorProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterCredential.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterCredential.Serialization.cs index fff35b80c6fd..11f25646a45e 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterCredential.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterCredential.Serialization.cs @@ -19,6 +19,15 @@ public partial class ManagedClusterCredential : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(ManagedClusterCredential)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } ManagedClusterCredential IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterCredentials.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterCredentials.Serialization.cs index 922285db8fc0..9eb821e0a8ca 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterCredentials.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterCredentials.Serialization.cs @@ -20,6 +20,15 @@ public partial class ManagedClusterCredentials : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(ManagedClusterCredentials)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Kubeconfigs)) { writer.WritePropertyName("kubeconfigs"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } ManagedClusterCredentials IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterDelegatedIdentity.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterDelegatedIdentity.Serialization.cs index 83f1e01a2487..aa9ca89620cb 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterDelegatedIdentity.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterDelegatedIdentity.Serialization.cs @@ -19,6 +19,15 @@ public partial class ManagedClusterDelegatedIdentity : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(ManagedClusterDelegatedIdentity)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ResourceId)) { writer.WritePropertyName("resourceId"u8); @@ -62,7 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } ManagedClusterDelegatedIdentity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterHttpProxyConfig.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterHttpProxyConfig.Serialization.cs index 94aed451bbfd..135e3fd845f2 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterHttpProxyConfig.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterHttpProxyConfig.Serialization.cs @@ -20,6 +20,15 @@ public partial class ManagedClusterHttpProxyConfig : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(ManagedClusterHttpProxyConfig)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(HttpProxy)) { writer.WritePropertyName("httpProxy"u8); @@ -68,7 +76,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } ManagedClusterHttpProxyConfig IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterListResult.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterListResult.Serialization.cs index 97a730e1376c..eb9f870e465d 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterListResult.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class ManagedClusterListResult : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(ManagedClusterListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } ManagedClusterListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterLoadBalancerProfile.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterLoadBalancerProfile.Serialization.cs index 35a374aa336c..4713017a6c11 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterLoadBalancerProfile.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterLoadBalancerProfile.Serialization.cs @@ -21,6 +21,15 @@ public partial class ManagedClusterLoadBalancerProfile : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,7 +37,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(ManagedClusterLoadBalancerProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ManagedOutboundIPs)) { writer.WritePropertyName("managedOutboundIPs"u8); @@ -89,7 +97,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } ManagedClusterLoadBalancerProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterLoadBalancerProfileManagedOutboundIPs.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterLoadBalancerProfileManagedOutboundIPs.Serialization.cs index 26e7564f2bab..ed9d33af556e 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterLoadBalancerProfileManagedOutboundIPs.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterLoadBalancerProfileManagedOutboundIPs.Serialization.cs @@ -19,6 +19,15 @@ public partial class ManagedClusterLoadBalancerProfileManagedOutboundIPs : IUtf8 void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8J throw new FormatException($"The model {nameof(ManagedClusterLoadBalancerProfileManagedOutboundIPs)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Count)) { writer.WritePropertyName("count"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8J #endif } } - writer.WriteEndObject(); } ManagedClusterLoadBalancerProfileManagedOutboundIPs IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterLoadBalancerProfileOutboundIPPrefixes.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterLoadBalancerProfileOutboundIPPrefixes.Serialization.cs index a472f3280cd8..27ff09ca6d66 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterLoadBalancerProfileOutboundIPPrefixes.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterLoadBalancerProfileOutboundIPPrefixes.Serialization.cs @@ -21,6 +21,15 @@ internal partial class ManagedClusterLoadBalancerProfileOutboundIPPrefixes : IUt void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,7 +37,6 @@ void IJsonModel.Write(Utf8J throw new FormatException($"The model {nameof(ManagedClusterLoadBalancerProfileOutboundIPPrefixes)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(PublicIPPrefixes)) { writer.WritePropertyName("publicIPPrefixes"u8); @@ -54,7 +62,6 @@ void IJsonModel.Write(Utf8J #endif } } - writer.WriteEndObject(); } ManagedClusterLoadBalancerProfileOutboundIPPrefixes IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterLoadBalancerProfileOutboundIPs.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterLoadBalancerProfileOutboundIPs.Serialization.cs index 75f94dda6d1c..ea7737c1b4cd 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterLoadBalancerProfileOutboundIPs.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterLoadBalancerProfileOutboundIPs.Serialization.cs @@ -21,6 +21,15 @@ internal partial class ManagedClusterLoadBalancerProfileOutboundIPs : IUtf8JsonS void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,7 +37,6 @@ void IJsonModel.Write(Utf8JsonWrit throw new FormatException($"The model {nameof(ManagedClusterLoadBalancerProfileOutboundIPs)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(PublicIPs)) { writer.WritePropertyName("publicIPs"u8); @@ -54,7 +62,6 @@ void IJsonModel.Write(Utf8JsonWrit #endif } } - writer.WriteEndObject(); } ManagedClusterLoadBalancerProfileOutboundIPs IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterManagedOutboundIPProfile.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterManagedOutboundIPProfile.Serialization.cs index 4386240984b9..8dfcd1eb52ed 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterManagedOutboundIPProfile.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterManagedOutboundIPProfile.Serialization.cs @@ -19,6 +19,15 @@ internal partial class ManagedClusterManagedOutboundIPProfile : IUtf8JsonSeriali void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(ManagedClusterManagedOutboundIPProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Count)) { writer.WritePropertyName("count"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } ManagedClusterManagedOutboundIPProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterMonitorProfileKubeStateMetrics.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterMonitorProfileKubeStateMetrics.Serialization.cs index 932416d684ba..ac2ec9496293 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterMonitorProfileKubeStateMetrics.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterMonitorProfileKubeStateMetrics.Serialization.cs @@ -19,6 +19,15 @@ public partial class ManagedClusterMonitorProfileKubeStateMetrics : IUtf8JsonSer void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWrit throw new FormatException($"The model {nameof(ManagedClusterMonitorProfileKubeStateMetrics)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(MetricLabelsAllowlist)) { writer.WritePropertyName("metricLabelsAllowlist"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWrit #endif } } - writer.WriteEndObject(); } ManagedClusterMonitorProfileKubeStateMetrics IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterMonitorProfileMetrics.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterMonitorProfileMetrics.Serialization.cs index 770cecca13dc..e4e628ff4204 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterMonitorProfileMetrics.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterMonitorProfileMetrics.Serialization.cs @@ -19,6 +19,15 @@ public partial class ManagedClusterMonitorProfileMetrics : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(ManagedClusterMonitorProfileMetrics)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("enabled"u8); writer.WriteBooleanValue(IsEnabled); if (Optional.IsDefined(KubeStateMetrics)) @@ -49,7 +57,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } ManagedClusterMonitorProfileMetrics IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterNatGatewayProfile.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterNatGatewayProfile.Serialization.cs index 9d1f1889c394..3619fe2fc0b9 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterNatGatewayProfile.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterNatGatewayProfile.Serialization.cs @@ -21,6 +21,15 @@ public partial class ManagedClusterNatGatewayProfile : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,7 +37,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(ManagedClusterNatGatewayProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ManagedOutboundIPProfile)) { writer.WritePropertyName("managedOutboundIPProfile"u8); @@ -64,7 +72,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } ManagedClusterNatGatewayProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterOidcIssuerProfile.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterOidcIssuerProfile.Serialization.cs index 455270a9f3d0..17e50fe1db91 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterOidcIssuerProfile.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterOidcIssuerProfile.Serialization.cs @@ -19,6 +19,15 @@ public partial class ManagedClusterOidcIssuerProfile : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(ManagedClusterOidcIssuerProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(IssuerUriInfo)) { writer.WritePropertyName("issuerURL"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } ManagedClusterOidcIssuerProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterPodIdentity.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterPodIdentity.Serialization.cs index 08725bf68374..d2b34f2bd71e 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterPodIdentity.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterPodIdentity.Serialization.cs @@ -19,6 +19,15 @@ public partial class ManagedClusterPodIdentity : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(ManagedClusterPodIdentity)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); writer.WritePropertyName("namespace"u8); @@ -63,7 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } ManagedClusterPodIdentity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterPodIdentityException.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterPodIdentityException.Serialization.cs index 89a978047246..a5baf0167e90 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterPodIdentityException.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterPodIdentityException.Serialization.cs @@ -20,6 +20,15 @@ public partial class ManagedClusterPodIdentityException : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(ManagedClusterPodIdentityException)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); writer.WritePropertyName("namespace"u8); @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } ManagedClusterPodIdentityException IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterPodIdentityProfile.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterPodIdentityProfile.Serialization.cs index ef3e69889d8a..60299ae33315 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterPodIdentityProfile.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterPodIdentityProfile.Serialization.cs @@ -20,6 +20,15 @@ public partial class ManagedClusterPodIdentityProfile : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(ManagedClusterPodIdentityProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IsEnabled)) { writer.WritePropertyName("enabled"u8); @@ -73,7 +81,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } ManagedClusterPodIdentityProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterPodIdentityProvisioningError.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterPodIdentityProvisioningError.Serialization.cs index 660fda50f30c..deaa8bddc9bf 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterPodIdentityProvisioningError.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterPodIdentityProvisioningError.Serialization.cs @@ -19,6 +19,15 @@ internal partial class ManagedClusterPodIdentityProvisioningError : IUtf8JsonSer void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(ManagedClusterPodIdentityProvisioningError)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ErrorDetail)) { writer.WritePropertyName("error"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } ManagedClusterPodIdentityProvisioningError IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterPodIdentityProvisioningInfo.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterPodIdentityProvisioningInfo.Serialization.cs index b6fe6fa1fef2..b869d7e2128c 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterPodIdentityProvisioningInfo.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterPodIdentityProvisioningInfo.Serialization.cs @@ -19,6 +19,15 @@ internal partial class ManagedClusterPodIdentityProvisioningInfo : IUtf8JsonSeri void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(ManagedClusterPodIdentityProvisioningInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Error)) { writer.WritePropertyName("error"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } ManagedClusterPodIdentityProvisioningInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterPoolUpgradeProfile.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterPoolUpgradeProfile.Serialization.cs index c4056ef7dd5f..cadaa568e9d6 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterPoolUpgradeProfile.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterPoolUpgradeProfile.Serialization.cs @@ -20,6 +20,15 @@ public partial class ManagedClusterPoolUpgradeProfile : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(ManagedClusterPoolUpgradeProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("kubernetesVersion"u8); writer.WriteStringValue(KubernetesVersion); if (Optional.IsDefined(Name)) @@ -62,7 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } ManagedClusterPoolUpgradeProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterPoolUpgradeProfileUpgradesItem.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterPoolUpgradeProfileUpgradesItem.Serialization.cs index 89a9362cef48..1a03d5c018a5 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterPoolUpgradeProfileUpgradesItem.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterPoolUpgradeProfileUpgradesItem.Serialization.cs @@ -19,6 +19,15 @@ public partial class ManagedClusterPoolUpgradeProfileUpgradesItem : IUtf8JsonSer void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWrit throw new FormatException($"The model {nameof(ManagedClusterPoolUpgradeProfileUpgradesItem)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(KubernetesVersion)) { writer.WritePropertyName("kubernetesVersion"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWrit #endif } } - writer.WriteEndObject(); } ManagedClusterPoolUpgradeProfileUpgradesItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterRunCommandContent.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterRunCommandContent.Serialization.cs index 1c42d6a5c68c..5ce8fb97ef1f 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterRunCommandContent.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterRunCommandContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class ManagedClusterRunCommandContent : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(ManagedClusterRunCommandContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("command"u8); writer.WriteStringValue(Command); if (Optional.IsDefined(Context)) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } ManagedClusterRunCommandContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterRunCommandResult.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterRunCommandResult.Serialization.cs index 830e8c3908cf..264b88600404 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterRunCommandResult.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterRunCommandResult.Serialization.cs @@ -19,6 +19,15 @@ public partial class ManagedClusterRunCommandResult : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(ManagedClusterRunCommandResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -80,7 +88,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } ManagedClusterRunCommandResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterSecurityProfile.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterSecurityProfile.Serialization.cs index ae5bbd263f18..40d208c02228 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterSecurityProfile.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterSecurityProfile.Serialization.cs @@ -19,6 +19,15 @@ public partial class ManagedClusterSecurityProfile : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(ManagedClusterSecurityProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Defender)) { writer.WritePropertyName("defender"u8); @@ -62,7 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } ManagedClusterSecurityProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterSecurityProfileDefender.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterSecurityProfileDefender.Serialization.cs index 852f47d67663..1c8364d19964 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterSecurityProfileDefender.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterSecurityProfileDefender.Serialization.cs @@ -19,6 +19,15 @@ public partial class ManagedClusterSecurityProfileDefender : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(ManagedClusterSecurityProfileDefender)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(LogAnalyticsWorkspaceResourceId)) { writer.WritePropertyName("logAnalyticsWorkspaceResourceId"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } ManagedClusterSecurityProfileDefender IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterSecurityProfileDefenderSecurityMonitoring.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterSecurityProfileDefenderSecurityMonitoring.Serialization.cs index 46f95261caea..2976d4f5ecc4 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterSecurityProfileDefenderSecurityMonitoring.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterSecurityProfileDefenderSecurityMonitoring.Serialization.cs @@ -19,6 +19,15 @@ internal partial class ManagedClusterSecurityProfileDefenderSecurityMonitoring : void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(U throw new FormatException($"The model {nameof(ManagedClusterSecurityProfileDefenderSecurityMonitoring)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IsSecurityMonitoringEnabled)) { writer.WritePropertyName("enabled"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(U #endif } } - writer.WriteEndObject(); } ManagedClusterSecurityProfileDefenderSecurityMonitoring IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterSecurityProfileImageCleaner.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterSecurityProfileImageCleaner.Serialization.cs index 3c13cde43a9d..a4871ab40074 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterSecurityProfileImageCleaner.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterSecurityProfileImageCleaner.Serialization.cs @@ -19,6 +19,15 @@ public partial class ManagedClusterSecurityProfileImageCleaner : IUtf8JsonSerial void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(ManagedClusterSecurityProfileImageCleaner)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IsEnabled)) { writer.WritePropertyName("enabled"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } ManagedClusterSecurityProfileImageCleaner IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterSecurityProfileKeyVaultKms.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterSecurityProfileKeyVaultKms.Serialization.cs index c20948a01a4b..89f0d96aebf3 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterSecurityProfileKeyVaultKms.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterSecurityProfileKeyVaultKms.Serialization.cs @@ -19,6 +19,15 @@ public partial class ManagedClusterSecurityProfileKeyVaultKms : IUtf8JsonSeriali void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter w throw new FormatException($"The model {nameof(ManagedClusterSecurityProfileKeyVaultKms)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IsEnabled)) { writer.WritePropertyName("enabled"u8); @@ -62,7 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter w #endif } } - writer.WriteEndObject(); } ManagedClusterSecurityProfileKeyVaultKms IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterSecurityProfileWorkloadIdentity.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterSecurityProfileWorkloadIdentity.Serialization.cs index c413f9d3f067..6e9f24adb8e2 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterSecurityProfileWorkloadIdentity.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterSecurityProfileWorkloadIdentity.Serialization.cs @@ -19,6 +19,15 @@ internal partial class ManagedClusterSecurityProfileWorkloadIdentity : IUtf8Json void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWri throw new FormatException($"The model {nameof(ManagedClusterSecurityProfileWorkloadIdentity)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IsWorkloadIdentityEnabled)) { writer.WritePropertyName("enabled"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWri #endif } } - writer.WriteEndObject(); } ManagedClusterSecurityProfileWorkloadIdentity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterServicePrincipalProfile.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterServicePrincipalProfile.Serialization.cs index ffce9049f1ee..7f1552d66f23 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterServicePrincipalProfile.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterServicePrincipalProfile.Serialization.cs @@ -19,6 +19,15 @@ public partial class ManagedClusterServicePrincipalProfile : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(ManagedClusterServicePrincipalProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("clientId"u8); writer.WriteStringValue(ClientId); if (Optional.IsDefined(Secret)) @@ -49,7 +57,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } ManagedClusterServicePrincipalProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterSku.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterSku.Serialization.cs index 1943b1deffaf..4b62f7cfe76d 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterSku.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterSku.Serialization.cs @@ -19,6 +19,15 @@ public partial class ManagedClusterSku : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(ManagedClusterSku)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } ManagedClusterSku IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterStorageProfile.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterStorageProfile.Serialization.cs index 7609230d5cd1..183e6f0f384e 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterStorageProfile.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterStorageProfile.Serialization.cs @@ -19,6 +19,15 @@ public partial class ManagedClusterStorageProfile : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(ManagedClusterStorageProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(DiskCsiDriver)) { writer.WritePropertyName("diskCSIDriver"u8); @@ -62,7 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } ManagedClusterStorageProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterStorageProfileBlobCsiDriver.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterStorageProfileBlobCsiDriver.Serialization.cs index ba8d9b0e0096..d5cbafb5b469 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterStorageProfileBlobCsiDriver.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterStorageProfileBlobCsiDriver.Serialization.cs @@ -19,6 +19,15 @@ internal partial class ManagedClusterStorageProfileBlobCsiDriver : IUtf8JsonSeri void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(ManagedClusterStorageProfileBlobCsiDriver)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IsEnabled)) { writer.WritePropertyName("enabled"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } ManagedClusterStorageProfileBlobCsiDriver IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterStorageProfileDiskCsiDriver.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterStorageProfileDiskCsiDriver.Serialization.cs index e1dd7a3b1bf7..3d899a10b593 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterStorageProfileDiskCsiDriver.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterStorageProfileDiskCsiDriver.Serialization.cs @@ -19,6 +19,15 @@ internal partial class ManagedClusterStorageProfileDiskCsiDriver : IUtf8JsonSeri void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(ManagedClusterStorageProfileDiskCsiDriver)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IsEnabled)) { writer.WritePropertyName("enabled"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } ManagedClusterStorageProfileDiskCsiDriver IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterStorageProfileFileCsiDriver.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterStorageProfileFileCsiDriver.Serialization.cs index 4f7441082925..bc335387f4c2 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterStorageProfileFileCsiDriver.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterStorageProfileFileCsiDriver.Serialization.cs @@ -19,6 +19,15 @@ internal partial class ManagedClusterStorageProfileFileCsiDriver : IUtf8JsonSeri void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(ManagedClusterStorageProfileFileCsiDriver)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IsEnabled)) { writer.WritePropertyName("enabled"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } ManagedClusterStorageProfileFileCsiDriver IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterStorageProfileSnapshotController.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterStorageProfileSnapshotController.Serialization.cs index 31c2ac7cf5fd..2af1be253474 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterStorageProfileSnapshotController.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterStorageProfileSnapshotController.Serialization.cs @@ -19,6 +19,15 @@ internal partial class ManagedClusterStorageProfileSnapshotController : IUtf8Jso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWr throw new FormatException($"The model {nameof(ManagedClusterStorageProfileSnapshotController)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IsEnabled)) { writer.WritePropertyName("enabled"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWr #endif } } - writer.WriteEndObject(); } ManagedClusterStorageProfileSnapshotController IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterVerticalPodAutoscaler.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterVerticalPodAutoscaler.Serialization.cs index a2807a112fde..bb37033fc09e 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterVerticalPodAutoscaler.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterVerticalPodAutoscaler.Serialization.cs @@ -19,6 +19,15 @@ internal partial class ManagedClusterVerticalPodAutoscaler : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(ManagedClusterVerticalPodAutoscaler)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("enabled"u8); writer.WriteBooleanValue(IsVpaEnabled); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -44,7 +52,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } ManagedClusterVerticalPodAutoscaler IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterWindowsProfile.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterWindowsProfile.Serialization.cs index a5551f5e3a3b..02fce48e3ee4 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterWindowsProfile.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterWindowsProfile.Serialization.cs @@ -19,6 +19,15 @@ public partial class ManagedClusterWindowsProfile : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(ManagedClusterWindowsProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("adminUsername"u8); writer.WriteStringValue(AdminUsername); if (Optional.IsDefined(AdminPassword)) @@ -64,7 +72,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } ManagedClusterWindowsProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterWorkloadAutoScalerProfile.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterWorkloadAutoScalerProfile.Serialization.cs index 4cb88f999ed7..b48d1243b825 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterWorkloadAutoScalerProfile.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterWorkloadAutoScalerProfile.Serialization.cs @@ -19,6 +19,15 @@ public partial class ManagedClusterWorkloadAutoScalerProfile : IUtf8JsonSerializ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter wr throw new FormatException($"The model {nameof(ManagedClusterWorkloadAutoScalerProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Keda)) { writer.WritePropertyName("keda"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter wr #endif } } - writer.WriteEndObject(); } ManagedClusterWorkloadAutoScalerProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterWorkloadAutoScalerProfileKeda.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterWorkloadAutoScalerProfileKeda.Serialization.cs index bbfcf7d77863..f854a303585e 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterWorkloadAutoScalerProfileKeda.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterWorkloadAutoScalerProfileKeda.Serialization.cs @@ -19,6 +19,15 @@ internal partial class ManagedClusterWorkloadAutoScalerProfileKeda : IUtf8JsonSe void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWrite throw new FormatException($"The model {nameof(ManagedClusterWorkloadAutoScalerProfileKeda)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("enabled"u8); writer.WriteBooleanValue(IsKedaEnabled); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -44,7 +52,6 @@ void IJsonModel.Write(Utf8JsonWrite #endif } } - writer.WriteEndObject(); } ManagedClusterWorkloadAutoScalerProfileKeda IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/MeshRevision.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/MeshRevision.Serialization.cs index d377cef3c7de..63e992700ab7 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/MeshRevision.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/MeshRevision.Serialization.cs @@ -20,6 +20,15 @@ public partial class MeshRevision : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(MeshRevision)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Revision)) { writer.WritePropertyName("revision"u8); @@ -68,7 +76,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti #endif } } - writer.WriteEndObject(); } MeshRevision IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/MeshRevisionProfileList.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/MeshRevisionProfileList.Serialization.cs index 48394d106756..38dc939c38cc 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/MeshRevisionProfileList.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/MeshRevisionProfileList.Serialization.cs @@ -20,6 +20,15 @@ internal partial class MeshRevisionProfileList : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(MeshRevisionProfileList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } MeshRevisionProfileList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/MeshRevisionProfileProperties.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/MeshRevisionProfileProperties.Serialization.cs index 51419dbde639..fbb8dbd9deef 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/MeshRevisionProfileProperties.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/MeshRevisionProfileProperties.Serialization.cs @@ -20,6 +20,15 @@ internal partial class MeshRevisionProfileProperties : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(MeshRevisionProfileProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(MeshRevisions)) { writer.WritePropertyName("meshRevisions"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } MeshRevisionProfileProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/MeshUpgradeProfileList.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/MeshUpgradeProfileList.Serialization.cs index 6e9f87d3ffe2..b75a48a85cd3 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/MeshUpgradeProfileList.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/MeshUpgradeProfileList.Serialization.cs @@ -20,6 +20,15 @@ internal partial class MeshUpgradeProfileList : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(MeshUpgradeProfileList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } MeshUpgradeProfileList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/MeshUpgradeProfileProperties.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/MeshUpgradeProfileProperties.Serialization.cs index c782f490258b..2e7c147abba1 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/MeshUpgradeProfileProperties.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/MeshUpgradeProfileProperties.Serialization.cs @@ -20,6 +20,15 @@ public partial class MeshUpgradeProfileProperties : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,48 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(MeshUpgradeProfileProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(Revision)) - { - writer.WritePropertyName("revision"u8); - writer.WriteStringValue(Revision); - } - if (Optional.IsCollectionDefined(Upgrades)) - { - writer.WritePropertyName("upgrades"u8); - writer.WriteStartArray(); - foreach (var item in Upgrades) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(CompatibleWith)) - { - writer.WritePropertyName("compatibleWith"u8); - writer.WriteStartArray(); - foreach (var item in CompatibleWith) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } MeshUpgradeProfileProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/OutboundEnvironmentEndpointListResult.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/OutboundEnvironmentEndpointListResult.Serialization.cs index ff6dda3d0a39..561e8128aec6 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/OutboundEnvironmentEndpointListResult.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/OutboundEnvironmentEndpointListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class OutboundEnvironmentEndpointListResult : IUtf8JsonSerializ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(OutboundEnvironmentEndpointListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } OutboundEnvironmentEndpointListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ServiceMeshProfile.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ServiceMeshProfile.Serialization.cs index 7b15f715f116..075e297b696d 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ServiceMeshProfile.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ServiceMeshProfile.Serialization.cs @@ -19,6 +19,15 @@ public partial class ServiceMeshProfile : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ServiceMeshProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("mode"u8); writer.WriteStringValue(Mode.ToString()); if (Optional.IsDefined(Istio)) @@ -49,7 +57,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } ServiceMeshProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/SysctlConfig.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/SysctlConfig.Serialization.cs index 2ccc3284518f..4db64daaeb32 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/SysctlConfig.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/SysctlConfig.Serialization.cs @@ -19,6 +19,15 @@ public partial class SysctlConfig : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(SysctlConfig)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(NetCoreSomaxconn)) { writer.WritePropertyName("netCoreSomaxconn"u8); @@ -182,7 +190,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti #endif } } - writer.WriteEndObject(); } SysctlConfig IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/TrustedAccessRoleBindingListResult.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/TrustedAccessRoleBindingListResult.Serialization.cs index f5800152bcf5..86b7caa9fe79 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/TrustedAccessRoleBindingListResult.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/TrustedAccessRoleBindingListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class TrustedAccessRoleBindingListResult : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(TrustedAccessRoleBindingListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } TrustedAccessRoleBindingListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/TrustedAccessRoleListResult.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/TrustedAccessRoleListResult.Serialization.cs index 5faf8cb7d5a6..c13868bc0f60 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/TrustedAccessRoleListResult.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/TrustedAccessRoleListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class TrustedAccessRoleListResult : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(TrustedAccessRoleListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } TrustedAccessRoleListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/UpgradeOverrideSettings.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/UpgradeOverrideSettings.Serialization.cs index 487408ebb75e..a008718ead02 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/UpgradeOverrideSettings.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/UpgradeOverrideSettings.Serialization.cs @@ -19,6 +19,15 @@ public partial class UpgradeOverrideSettings : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(UpgradeOverrideSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ForceUpgrade)) { writer.WritePropertyName("forceUpgrade"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } UpgradeOverrideSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/WindowsGmsaProfile.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/WindowsGmsaProfile.Serialization.cs index f8349347c3cd..948a1af73081 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/WindowsGmsaProfile.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/WindowsGmsaProfile.Serialization.cs @@ -19,6 +19,15 @@ public partial class WindowsGmsaProfile : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(WindowsGmsaProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IsEnabled)) { writer.WritePropertyName("enabled"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } WindowsGmsaProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/OSOptionProfileData.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/OSOptionProfileData.Serialization.cs index 63a5f5d57147..c2dc2b9eb88a 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/OSOptionProfileData.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/OSOptionProfileData.Serialization.cs @@ -22,6 +22,15 @@ public partial class OSOptionProfileData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -29,27 +38,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(OSOptionProfileData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); writer.WritePropertyName("osOptionPropertyList"u8); @@ -60,22 +49,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri } writer.WriteEndArray(); writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } OSOptionProfileData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/autorest.md b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/autorest.md index c904c624099b..904ebeb6fb3c 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/autorest.md +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/autorest.md @@ -20,6 +20,7 @@ modelerfour: flatten-payloads: false use-model-reader-writer: true enable-bicep-serialization: true +use-write-core: true #mgmt-debug: # show-serialized-names: true diff --git a/sdk/core/Azure.Core/CHANGELOG.md b/sdk/core/Azure.Core/CHANGELOG.md index 8ee241db0a11..90f2f9fec090 100644 --- a/sdk/core/Azure.Core/CHANGELOG.md +++ b/sdk/core/Azure.Core/CHANGELOG.md @@ -10,6 +10,14 @@ ### Other Changes +- Use `BinaryData.Empty` for `PipelineResponse.Content` when HTTP message has no content. + +## 1.44.1 (2024-10-09) + +### Other Changes + +- Upgraded `System.Text.Json` package dependency to 6.0.10 for security fix ([#46134](https://github.com/Azure/azure-sdk-for-net/pull/46508)). + ## 1.44.0 (2024-10-03) ### Features Added diff --git a/sdk/core/Azure.Core/src/Azure.Core.csproj b/sdk/core/Azure.Core/src/Azure.Core.csproj index 59be7dee7370..98a0969eadd8 100644 --- a/sdk/core/Azure.Core/src/Azure.Core.csproj +++ b/sdk/core/Azure.Core/src/Azure.Core.csproj @@ -4,7 +4,7 @@ Microsoft Azure Client Pipeline 1.45.0-beta.1 - 1.44.0 + 1.44.1 Microsoft Azure Client Pipeline enable $(DefineConstants);AZURE_NULLABLE;HAS_INTERNALS_VISIBLE_CORE diff --git a/sdk/core/Azure.Core/src/Response.cs b/sdk/core/Azure.Core/src/Response.cs index b602db8621c6..4d3239ea99c0 100644 --- a/sdk/core/Azure.Core/src/Response.cs +++ b/sdk/core/Azure.Core/src/Response.cs @@ -41,9 +41,6 @@ public abstract class Response : IDisposable /// public virtual ResponseHeaders Headers => new ResponseHeaders(this); - // TODO(matell): The .NET Framework team plans to add BinaryData.Empty in dotnet/runtime#49670, and we can use it then. - private static readonly BinaryData s_EmptyBinaryData = new BinaryData(Array.Empty()); - /// /// Gets the contents of HTTP response, if it is available. /// @@ -56,7 +53,7 @@ public virtual BinaryData Content { if (ContentStream == null) { - return s_EmptyBinaryData; + return BinaryData.Empty; } MemoryStream? memoryContent = ContentStream as MemoryStream; diff --git a/sdk/core/Azure.Core/src/Shared/AzureEventSource.cs b/sdk/core/Azure.Core/src/Shared/AzureEventSource.cs index 8fcd6be7d86e..7bbf6ccf7fca 100644 --- a/sdk/core/Azure.Core/src/Shared/AzureEventSource.cs +++ b/sdk/core/Azure.Core/src/Shared/AzureEventSource.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. +// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #nullable enable @@ -12,6 +12,9 @@ namespace Azure.Core.Diagnostics { internal abstract class AzureEventSource: EventSource { + private protected const string EventSourceRequiresUnreferencedCodeMessage = "EventSource will serialize the whole object graph. Trimmer will not safely handle this case because properties may be trimmed. This can be suppressed if the object is a primitive type"; + private protected const string EventSourceSuppressMessage = "Parameters to this method are primitive and are trimmer safe."; + private const string SharedDataKey = "_AzureEventSourceNamesInUse"; private static readonly HashSet NamesInUse; diff --git a/sdk/core/System.ClientModel/CHANGELOG.md b/sdk/core/System.ClientModel/CHANGELOG.md index 9261db0fb9fc..c18beee0b217 100644 --- a/sdk/core/System.ClientModel/CHANGELOG.md +++ b/sdk/core/System.ClientModel/CHANGELOG.md @@ -10,6 +10,14 @@ ### Other Changes +- Use `BinaryData.Empty` for `PipelineResponse.Content` when HTTP message has no content ([#46669](https://github.com/Azure/azure-sdk-for-net/pull/46669)). + +## 1.2.1 (2024-10-09) + +### Bugs Fixed + +- Upgraded `System.Text.Json` package dependency to 6.0.10 for security fix ([#46134](https://github.com/Azure/azure-sdk-for-net/pull/46508)). + ## 1.2.0 (2024-10-03) ### Other Changes diff --git a/sdk/core/System.ClientModel/src/Message/PipelineResponse.cs b/sdk/core/System.ClientModel/src/Message/PipelineResponse.cs index 76e513639c27..7e968f3c36d1 100644 --- a/sdk/core/System.ClientModel/src/Message/PipelineResponse.cs +++ b/sdk/core/System.ClientModel/src/Message/PipelineResponse.cs @@ -12,9 +12,6 @@ namespace System.ClientModel.Primitives; /// public abstract class PipelineResponse : IDisposable { - // TODO(matell): The .NET Framework team plans to add BinaryData.Empty in dotnet/runtime#49670, and we can use it then. - internal static readonly BinaryData s_EmptyBinaryData = new(Array.Empty()); - /// /// Gets the status code of the HTTP response. /// diff --git a/sdk/core/System.ClientModel/src/Pipeline/HttpClientPipelineTransport.Response.cs b/sdk/core/System.ClientModel/src/Pipeline/HttpClientPipelineTransport.Response.cs index 72f7413255a7..244e9ba9b60e 100644 --- a/sdk/core/System.ClientModel/src/Pipeline/HttpClientPipelineTransport.Response.cs +++ b/sdk/core/System.ClientModel/src/Pipeline/HttpClientPipelineTransport.Response.cs @@ -100,7 +100,7 @@ private async ValueTask BufferContentSyncOrAsync(CancellationToken c { // Content is not buffered but there is no source stream. // Our contract from Azure.Core is to return BinaryData.Empty in this case. - _bufferedContent = s_EmptyBinaryData; + _bufferedContent = BinaryData.Empty; return _bufferedContent; } diff --git a/sdk/core/System.ClientModel/src/System.ClientModel.csproj b/sdk/core/System.ClientModel/src/System.ClientModel.csproj index daa1a5edc47a..4d71f77c5dba 100644 --- a/sdk/core/System.ClientModel/src/System.ClientModel.csproj +++ b/sdk/core/System.ClientModel/src/System.ClientModel.csproj @@ -4,7 +4,7 @@ Contains building blocks for clients that call cloud services. 1.3.0-beta.1 - 1.2.0 + 1.2.1 enable netstandard2.0;net6.0 DotNetPackageIcon.png diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/CHANGELOG.md b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/CHANGELOG.md index 45e21244fa2e..7c8fb276ec27 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/CHANGELOG.md +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/CHANGELOG.md @@ -4,6 +4,8 @@ ### Features Added +- Exposed `JsonModelWriteCore` for model serialization procedure. + ### Breaking Changes ### Bugs Fixed diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/api/Azure.ResourceManager.CosmosDB.netstandard2.0.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/api/Azure.ResourceManager.CosmosDB.netstandard2.0.cs index c262fc79dc27..2fe760ea46b1 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/api/Azure.ResourceManager.CosmosDB.netstandard2.0.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/api/Azure.ResourceManager.CosmosDB.netstandard2.0.cs @@ -22,6 +22,7 @@ public partial class CassandraClusterData : Azure.ResourceManager.Models.Tracked public CassandraClusterData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.CassandraClusterProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.CassandraClusterData 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.CosmosDB.CassandraClusterData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -97,6 +98,7 @@ public partial class CassandraDataCenterData : Azure.ResourceManager.Models.Reso { public CassandraDataCenterData() { } public Azure.ResourceManager.CosmosDB.Models.CassandraDataCenterProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.CassandraDataCenterData 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.CosmosDB.CassandraDataCenterData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -145,6 +147,7 @@ public CassandraKeyspaceData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.CassandraKeyspacePropertiesConfig Options { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.ExtendedCassandraKeyspaceResourceInfo Resource { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.CassandraKeyspaceData 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.CosmosDB.CassandraKeyspaceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -233,6 +236,7 @@ public CassandraTableData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.CassandraTablePropertiesConfig Options { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.ExtendedCassandraTableResourceInfo Resource { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.CassandraTableData 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.CosmosDB.CassandraTableData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -315,6 +319,7 @@ public CassandraViewGetResultData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.CassandraViewGetPropertiesOptions Options { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.CassandraViewGetPropertiesResource Resource { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.CassandraViewGetResultData 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.CosmosDB.CassandraViewGetResultData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -442,6 +447,7 @@ public CosmosDBAccountData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.CosmosDB.Models.CosmosDBAccountRestoreParameters RestoreParameters { get { throw null; } set { } } public System.Collections.Generic.IList VirtualNetworkRules { get { throw null; } } public System.Collections.Generic.IReadOnlyList WriteLocations { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.CosmosDBAccountData 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.CosmosDB.CosmosDBAccountData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -655,6 +661,7 @@ public partial class CosmosDBLocationData : Azure.ResourceManager.Models.Resourc { public CosmosDBLocationData() { } public Azure.ResourceManager.CosmosDB.Models.CosmosDBLocationProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.CosmosDBLocationData 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.CosmosDB.CosmosDBLocationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -703,6 +710,7 @@ public CosmosDBPrivateEndpointConnectionData() { } public string GroupId { get { throw null; } set { } } public Azure.Core.ResourceIdentifier PrivateEndpointId { get { throw null; } set { } } public string ProvisioningState { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.CosmosDBPrivateEndpointConnectionData 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.CosmosDB.CosmosDBPrivateEndpointConnectionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -764,6 +772,7 @@ public CosmosDBPrivateLinkResourceData() { } public string GroupId { get { throw null; } } public System.Collections.Generic.IReadOnlyList RequiredMembers { get { throw null; } } public System.Collections.Generic.IReadOnlyList RequiredZoneNames { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.CosmosDBPrivateLinkResourceData 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.CosmosDB.CosmosDBPrivateLinkResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -791,6 +800,7 @@ public partial class CosmosDBServiceData : Azure.ResourceManager.Models.Resource { public CosmosDBServiceData() { } public Azure.ResourceManager.CosmosDB.Models.CosmosDBServiceProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.CosmosDBServiceData 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.CosmosDB.CosmosDBServiceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -837,6 +847,7 @@ public partial class CosmosDBSqlClientEncryptionKeyData : Azure.ResourceManager. { public CosmosDBSqlClientEncryptionKeyData() { } public Azure.ResourceManager.CosmosDB.Models.CosmosDBSqlClientEncryptionKeyProperties Resource { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.CosmosDBSqlClientEncryptionKeyData 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.CosmosDB.CosmosDBSqlClientEncryptionKeyData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -883,6 +894,7 @@ public CosmosDBSqlContainerData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.CosmosDBSqlContainerPropertiesConfig Options { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.ExtendedCosmosDBSqlContainerResourceInfo Resource { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.CosmosDBSqlContainerData 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.CosmosDB.CosmosDBSqlContainerData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -982,6 +994,7 @@ public CosmosDBSqlDatabaseData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.CosmosDBSqlDatabasePropertiesConfig Options { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.ExtendedCosmosDBSqlDatabaseResourceInfo Resource { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.CosmosDBSqlDatabaseData 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.CosmosDB.CosmosDBSqlDatabaseData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1076,6 +1089,7 @@ public CosmosDBSqlRoleAssignmentData() { } public System.Guid? PrincipalId { get { throw null; } set { } } public Azure.Core.ResourceIdentifier RoleDefinitionId { get { throw null; } set { } } public string Scope { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.CosmosDBSqlRoleAssignmentData 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.CosmosDB.CosmosDBSqlRoleAssignmentData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1125,6 +1139,7 @@ public CosmosDBSqlRoleDefinitionData() { } public System.Collections.Generic.IList Permissions { get { throw null; } } public Azure.ResourceManager.CosmosDB.Models.CosmosDBSqlRoleDefinitionType? RoleDefinitionType { get { throw null; } set { } } public string RoleName { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.CosmosDBSqlRoleDefinitionData 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.CosmosDB.CosmosDBSqlRoleDefinitionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1172,6 +1187,7 @@ public partial class CosmosDBSqlStoredProcedureData : Azure.ResourceManager.Mode public CosmosDBSqlStoredProcedureData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.ExtendedCosmosDBSqlStoredProcedureResourceInfo Resource { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.CosmosDBSqlStoredProcedureData 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.CosmosDB.CosmosDBSqlStoredProcedureData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1225,6 +1241,7 @@ public partial class CosmosDBSqlTriggerData : Azure.ResourceManager.Models.Track public CosmosDBSqlTriggerData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.ExtendedCosmosDBSqlTriggerResourceInfo Resource { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.CosmosDBSqlTriggerData 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.CosmosDB.CosmosDBSqlTriggerData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1278,6 +1295,7 @@ public partial class CosmosDBSqlUserDefinedFunctionData : Azure.ResourceManager. public CosmosDBSqlUserDefinedFunctionData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.ExtendedCosmosDBSqlUserDefinedFunctionResourceInfo Resource { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.CosmosDBSqlUserDefinedFunctionData 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.CosmosDB.CosmosDBSqlUserDefinedFunctionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1332,6 +1350,7 @@ public CosmosDBTableData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.CosmosDBTablePropertiesOptions Options { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.CosmosDBTablePropertiesResource Resource { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.CosmosDBTableData 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.CosmosDB.CosmosDBTableData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1390,6 +1409,7 @@ public CosmosDBThroughputPoolAccountData() { } public Azure.Core.AzureLocation? AccountLocation { get { throw null; } set { } } public Azure.Core.ResourceIdentifier AccountResourceIdentifier { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.CosmosDBStatus? ProvisioningState { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.CosmosDBThroughputPoolAccountData 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.CosmosDB.CosmosDBThroughputPoolAccountData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1437,6 +1457,7 @@ public partial class CosmosDBThroughputPoolData : Azure.ResourceManager.Models.T public CosmosDBThroughputPoolData(Azure.Core.AzureLocation location) { } public int? MaxThroughput { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.CosmosDBStatus? ProvisioningState { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.CosmosDBThroughputPoolData 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.CosmosDB.CosmosDBThroughputPoolData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1523,6 +1544,7 @@ public DataTransferJobGetResultData() { } public string Status { get { throw null; } } public long? TotalCount { get { throw null; } } public int? WorkerCount { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.DataTransferJobGetResultData 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.CosmosDB.DataTransferJobGetResultData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1577,6 +1599,7 @@ public GraphResourceGetResultData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.GraphResourceGetPropertiesOptions Options { get { throw null; } set { } } public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.GraphResourceGetResultData 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.CosmosDB.GraphResourceGetResultData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1631,6 +1654,7 @@ public GremlinDatabaseData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.GremlinDatabasePropertiesConfig Options { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.ExtendedGremlinDatabaseResourceInfo Resource { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.GremlinDatabaseData 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.CosmosDB.GremlinDatabaseData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1716,6 +1740,7 @@ public GremlinGraphData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.GremlinGraphPropertiesConfig Options { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.ExtendedGremlinGraphResourceInfo Resource { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.GremlinGraphData 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.CosmosDB.GremlinGraphData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1800,6 +1825,7 @@ public MongoDBCollectionData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.MongoDBCollectionPropertiesConfig Options { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.ExtendedMongoDBCollectionResourceInfo Resource { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.MongoDBCollectionData 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.CosmosDB.MongoDBCollectionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1890,6 +1916,7 @@ public MongoDBDatabaseData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.MongoDBDatabasePropertiesConfig Options { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.ExtendedMongoDBDatabaseResourceInfo Resource { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.MongoDBDatabaseData 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.CosmosDB.MongoDBDatabaseData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1983,6 +2010,7 @@ public MongoDBRoleDefinitionData() { } public Azure.ResourceManager.CosmosDB.Models.MongoDBRoleDefinitionType? RoleDefinitionType { get { throw null; } set { } } public string RoleName { get { throw null; } set { } } public System.Collections.Generic.IList Roles { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.MongoDBRoleDefinitionData 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.CosmosDB.MongoDBRoleDefinitionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2034,6 +2062,7 @@ public MongoDBUserDefinitionData() { } public string Password { get { throw null; } set { } } public System.Collections.Generic.IList Roles { get { throw null; } } public string UserName { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.MongoDBUserDefinitionData 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.CosmosDB.MongoDBUserDefinitionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2078,6 +2107,7 @@ public partial class NetworkSecurityPerimeterConfigurationData : Azure.ResourceM { public NetworkSecurityPerimeterConfigurationData() { } public Azure.ResourceManager.CosmosDB.Models.NetworkSecurityPerimeterConfigurationProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.NetworkSecurityPerimeterConfigurationData 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.CosmosDB.NetworkSecurityPerimeterConfigurationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2126,6 +2156,7 @@ internal RestorableCosmosDBAccountData() { } public Azure.Core.AzureLocation? Location { get { throw null; } } public System.DateTimeOffset? OldestRestorableOn { get { throw null; } } public System.Collections.Generic.IReadOnlyList RestorableLocations { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.RestorableCosmosDBAccountData 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.CosmosDB.RestorableCosmosDBAccountData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2188,6 +2219,7 @@ public partial class ThroughputSettingData : Azure.ResourceManager.Models.Tracke public ThroughputSettingData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.ExtendedThroughputSettingsResourceInfo Resource { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.ThroughputSettingData 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.CosmosDB.ThroughputSettingData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2284,6 +2316,7 @@ public partial class AccessRule : 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.CosmosDB.Models.AccessRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2318,6 +2351,7 @@ public AccessRuleProperties() { } public System.Collections.Generic.IList NetworkSecurityPerimeters { get { throw null; } } public System.Collections.Generic.IList PhoneNumbers { get { throw null; } } public System.Collections.Generic.IList Subscriptions { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.AccessRuleProperties 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.CosmosDB.Models.AccessRuleProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2497,6 +2531,7 @@ public AuthenticationMethodLdapProperties() { } public int? ServerPort { get { throw null; } set { } } public string ServiceUserDistinguishedName { get { throw null; } set { } } public string ServiceUserPassword { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.AuthenticationMethodLdapProperties 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.CosmosDB.Models.AuthenticationMethodLdapProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2509,6 +2544,7 @@ public AutoscaleSettingsResourceInfo(int maxThroughput) { } public Azure.ResourceManager.CosmosDB.Models.ThroughputPolicyResourceInfo AutoUpgradeThroughputPolicy { get { throw null; } set { } } public int MaxThroughput { get { throw null; } set { } } public int? TargetMaxThroughput { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.AutoscaleSettingsResourceInfo 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.CosmosDB.Models.AutoscaleSettingsResourceInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2520,6 +2556,7 @@ public partial class AzureBlobDataTransferDataSourceSink : Azure.ResourceManager public AzureBlobDataTransferDataSourceSink(string containerName) { } public string ContainerName { get { throw null; } set { } } public System.Uri EndpointUri { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.AzureBlobDataTransferDataSourceSink 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.CosmosDB.Models.AzureBlobDataTransferDataSourceSink System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2532,6 +2569,7 @@ public BackupPolicyMigrationState() { } public System.DateTimeOffset? StartOn { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.BackupPolicyMigrationStatus? Status { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.BackupPolicyType? TargetType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.BackupPolicyMigrationState 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.CosmosDB.Models.BackupPolicyMigrationState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2580,6 +2618,7 @@ public partial class BaseCosmosDataTransferDataSourceSink : Azure.ResourceManage { public BaseCosmosDataTransferDataSourceSink() { } public string RemoteAccountName { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.BaseCosmosDataTransferDataSourceSink 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.CosmosDB.Models.BaseCosmosDataTransferDataSourceSink System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2614,6 +2653,7 @@ public CapacityModeChangeTransitionState() { } public Azure.ResourceManager.CosmosDB.Models.CapacityModeTransitionStatus? CapacityModeTransitionStatus { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.CapacityMode? CurrentCapacityMode { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.CapacityMode? PreviousCapacityMode { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.CapacityModeChangeTransitionState 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.CosmosDB.Models.CapacityModeChangeTransitionState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2683,6 +2723,7 @@ public partial class CassandraCertificate : System.ClientModel.Primitives.IJsonM { public CassandraCertificate() { } public string Pem { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.CassandraCertificate 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.CosmosDB.Models.CassandraCertificate System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2697,6 +2738,7 @@ internal CassandraClusterBackupResourceInfo() { } public System.DateTimeOffset? BackupStartTimestamp { get { throw null; } } public Azure.ResourceManager.CosmosDB.Models.CassandraClusterBackupState? BackupState { get { throw null; } } public System.DateTimeOffset? BackupStopTimestamp { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.CassandraClusterBackupResourceInfo 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.CosmosDB.Models.CassandraClusterBackupResourceInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2709,6 +2751,7 @@ public CassandraClusterBackupSchedule() { } public string CronExpression { get { throw null; } set { } } public int? RetentionInHours { get { throw null; } set { } } public string ScheduleName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.CassandraClusterBackupSchedule 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.CosmosDB.Models.CassandraClusterBackupSchedule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2748,6 +2791,7 @@ internal CassandraClusterCommand() { } public string Result { get { throw null; } } public bool? ShouldStopCassandraBeforeStart { get { throw null; } } public Azure.ResourceManager.CosmosDB.Models.CassandraClusterCommandStatus? Status { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.CassandraClusterCommand 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.CosmosDB.Models.CassandraClusterCommand System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2797,6 +2841,7 @@ internal CassandraClusterDataCenterNodeItem() { } public string Status { get { throw null; } } public string Timestamp { get { throw null; } } public System.Collections.Generic.IReadOnlyList Tokens { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.CassandraClusterDataCenterNodeItem 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.CosmosDB.Models.CassandraClusterDataCenterNodeItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2808,6 +2853,7 @@ public partial class CassandraClusterKey : System.ClientModel.Primitives.IJsonMo public CassandraClusterKey() { } public string Name { get { throw null; } set { } } public string OrderBy { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.CassandraClusterKey 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.CosmosDB.Models.CassandraClusterKey System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2843,6 +2889,7 @@ public CassandraClusterProperties() { } public string RestoreFromBackupId { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.ScheduledEventStrategy? ScheduledEventStrategy { get { throw null; } set { } } public System.Collections.Generic.IReadOnlyList SeedNodes { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.CassandraClusterProperties 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.CosmosDB.Models.CassandraClusterProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2857,6 +2904,7 @@ internal CassandraClusterPublicStatus() { } public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } public Azure.ETag? ETag { get { throw null; } } public Azure.ResourceManager.CosmosDB.Models.CassandraReaperStatus ReaperStatus { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.CassandraClusterPublicStatus 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.CosmosDB.Models.CassandraClusterPublicStatus System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2869,6 +2917,7 @@ internal CassandraClusterPublicStatusDataCentersItem() { } public string Name { get { throw null; } } public System.Collections.Generic.IReadOnlyList Nodes { get { throw null; } } public System.Collections.Generic.IReadOnlyList SeedNodes { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.CassandraClusterPublicStatusDataCentersItem 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.CosmosDB.Models.CassandraClusterPublicStatusDataCentersItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2898,6 +2947,7 @@ public partial class CassandraColumn : System.ClientModel.Primitives.IJsonModel< public CassandraColumn() { } public string CassandraColumnType { get { throw null; } set { } } public string Name { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.CassandraColumn 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.CosmosDB.Models.CassandraColumn System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2908,6 +2958,7 @@ public partial class CassandraCommandOutput : System.ClientModel.Primitives.IJso { internal CassandraCommandOutput() { } public string CommandOutput { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.CassandraCommandOutput 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.CosmosDB.Models.CassandraCommandOutput System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2922,6 +2973,7 @@ public CassandraCommandPostBody(string command, string host) { } public bool? CassandraStopStart { get { throw null; } set { } } public string Command { get { throw null; } } public string Host { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.CassandraCommandPostBody 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.CosmosDB.Models.CassandraCommandPostBody System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2936,6 +2988,7 @@ internal CassandraConnectionError() { } public string IPFrom { get { throw null; } } public string IPTo { get { throw null; } } public int? Port { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.CassandraConnectionError 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.CosmosDB.Models.CassandraConnectionError System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2983,6 +3036,7 @@ public CassandraDataCenterProperties() { } public Azure.ResourceManager.CosmosDB.Models.CassandraProvisioningState? ProvisioningState { get { throw null; } set { } } public System.Collections.Generic.IReadOnlyList SeedNodes { get { throw null; } } public string Sku { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.CassandraDataCenterProperties 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.CosmosDB.Models.CassandraDataCenterProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2993,6 +3047,7 @@ public partial class CassandraDataCenterSeedNode : System.ClientModel.Primitives { public CassandraDataCenterSeedNode() { } public string IPAddress { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.CassandraDataCenterSeedNode 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.CosmosDB.Models.CassandraDataCenterSeedNode System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3006,6 +3061,7 @@ public CassandraError() { } public string Code { get { throw null; } set { } } public string Message { get { throw null; } set { } } public string Target { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.CassandraError 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.CosmosDB.Models.CassandraError System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3018,6 +3074,7 @@ public CassandraKeyspaceCreateOrUpdateContent(Azure.Core.AzureLocation location, public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.CosmosDBCreateUpdateConfig Options { get { throw null; } set { } } public string ResourceKeyspaceName { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.CassandraKeyspaceCreateOrUpdateContent 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.CosmosDB.Models.CassandraKeyspaceCreateOrUpdateContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3027,6 +3084,7 @@ public CassandraKeyspaceCreateOrUpdateContent(Azure.Core.AzureLocation location, public partial class CassandraKeyspacePropertiesConfig : Azure.ResourceManager.CosmosDB.Models.CosmosDBBaseConfig, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public CassandraKeyspacePropertiesConfig() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.CassandraKeyspacePropertiesConfig 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.CosmosDB.Models.CassandraKeyspacePropertiesConfig System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3037,6 +3095,7 @@ public partial class CassandraKeyspaceResourceInfo : System.ClientModel.Primitiv { public CassandraKeyspaceResourceInfo(string keyspaceName) { } public string KeyspaceName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.CassandraKeyspaceResourceInfo 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.CosmosDB.Models.CassandraKeyspaceResourceInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3068,6 +3127,7 @@ public partial class CassandraPartitionKey : System.ClientModel.Primitives.IJson { public CassandraPartitionKey() { } public string Name { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.CassandraPartitionKey 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.CosmosDB.Models.CassandraPartitionKey System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3102,6 +3162,7 @@ internal CassandraReaperStatus() { } public bool? IsHealthy { get { throw null; } } public System.Collections.Generic.IReadOnlyDictionary RepairRunIds { get { throw null; } } public System.Collections.Generic.IReadOnlyDictionary RepairSchedules { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.CassandraReaperStatus 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.CosmosDB.Models.CassandraReaperStatus System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3114,6 +3175,7 @@ public CassandraSchema() { } public System.Collections.Generic.IList ClusterKeys { get { throw null; } } public System.Collections.Generic.IList Columns { get { throw null; } } public System.Collections.Generic.IList PartitionKeys { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.CassandraSchema 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.CosmosDB.Models.CassandraSchema System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3126,6 +3188,7 @@ public CassandraTableCreateOrUpdateContent(Azure.Core.AzureLocation location, Az public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.CosmosDBCreateUpdateConfig Options { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.CassandraTableResourceInfo Resource { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.CassandraTableCreateOrUpdateContent 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.CosmosDB.Models.CassandraTableCreateOrUpdateContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3135,6 +3198,7 @@ public CassandraTableCreateOrUpdateContent(Azure.Core.AzureLocation location, Az public partial class CassandraTablePropertiesConfig : Azure.ResourceManager.CosmosDB.Models.CosmosDBBaseConfig, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public CassandraTablePropertiesConfig() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.CassandraTablePropertiesConfig 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.CosmosDB.Models.CassandraTablePropertiesConfig System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3148,6 +3212,7 @@ public CassandraTableResourceInfo(string tableName) { } public int? DefaultTtl { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.CassandraSchema Schema { get { throw null; } set { } } public string TableName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.CassandraTableResourceInfo 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.CosmosDB.Models.CassandraTableResourceInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3157,6 +3222,7 @@ public CassandraTableResourceInfo(string tableName) { } public partial class CassandraViewGetPropertiesOptions : Azure.ResourceManager.CosmosDB.Models.CosmosDBBaseConfig, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public CassandraViewGetPropertiesOptions() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.CassandraViewGetPropertiesOptions 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.CosmosDB.Models.CassandraViewGetPropertiesOptions System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3169,6 +3235,7 @@ public partial class CassandraViewGetPropertiesResource : Azure.ResourceManager. public Azure.ETag? ETag { get { throw null; } } public string Rid { get { throw null; } } public float? Timestamp { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.CassandraViewGetPropertiesResource 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.CosmosDB.Models.CassandraViewGetPropertiesResource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3181,6 +3248,7 @@ public CassandraViewGetResultCreateOrUpdateContent(Azure.Core.AzureLocation loca public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.CosmosDBCreateUpdateConfig Options { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.CassandraViewResource Resource { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.CassandraViewGetResultCreateOrUpdateContent 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.CosmosDB.Models.CassandraViewGetResultCreateOrUpdateContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3192,6 +3260,7 @@ public partial class CassandraViewResource : System.ClientModel.Primitives.IJson public CassandraViewResource(string id, string viewDefinition) { } public string Id { get { throw null; } set { } } public string ViewDefinition { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.CassandraViewResource 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.CosmosDB.Models.CassandraViewResource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3221,6 +3290,7 @@ public partial class ComputedProperty : System.ClientModel.Primitives.IJsonModel public ComputedProperty() { } public string Name { get { throw null; } set { } } public string Query { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.ComputedProperty 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.CosmosDB.Models.ComputedProperty System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3251,6 +3321,7 @@ public ConflictResolutionPolicy() { } public string ConflictResolutionPath { get { throw null; } set { } } public string ConflictResolutionProcedure { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.ConflictResolutionMode? Mode { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.ConflictResolutionPolicy 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.CosmosDB.Models.ConflictResolutionPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3280,6 +3351,7 @@ public ConsistencyPolicy(Azure.ResourceManager.CosmosDB.Models.DefaultConsistenc public Azure.ResourceManager.CosmosDB.Models.DefaultConsistencyLevel DefaultConsistencyLevel { get { throw null; } set { } } public int? MaxIntervalInSeconds { get { throw null; } set { } } public long? MaxStalenessPrefix { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.ConsistencyPolicy 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.CosmosDB.Models.ConsistencyPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3290,6 +3362,7 @@ public partial class ContinuousBackupRestoreLocation : System.ClientModel.Primit { public ContinuousBackupRestoreLocation() { } public Azure.Core.AzureLocation? Location { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.ContinuousBackupRestoreLocation 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.CosmosDB.Models.ContinuousBackupRestoreLocation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3300,6 +3373,7 @@ public partial class ContinuousModeBackupPolicy : Azure.ResourceManager.CosmosDB { public ContinuousModeBackupPolicy() { } public Azure.ResourceManager.CosmosDB.Models.ContinuousTier? ContinuousModeTier { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.ContinuousModeBackupPolicy 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.CosmosDB.Models.ContinuousModeBackupPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3329,6 +3403,7 @@ public partial class CosmosCassandraDataTransferDataSourceSink : Azure.ResourceM public CosmosCassandraDataTransferDataSourceSink(string keyspaceName, string tableName) { } public string KeyspaceName { get { throw null; } set { } } public string TableName { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.CosmosCassandraDataTransferDataSourceSink 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.CosmosDB.Models.CosmosCassandraDataTransferDataSourceSink System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3339,6 +3414,7 @@ public abstract partial class CosmosDBAccountBackupPolicy : System.ClientModel.P { protected CosmosDBAccountBackupPolicy() { } public Azure.ResourceManager.CosmosDB.Models.BackupPolicyMigrationState MigrationState { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.CosmosDBAccountBackupPolicy 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.CosmosDB.Models.CosmosDBAccountBackupPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3349,6 +3425,7 @@ public partial class CosmosDBAccountCapability : System.ClientModel.Primitives.I { public CosmosDBAccountCapability() { } public string Name { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.CosmosDBAccountCapability 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.CosmosDB.Models.CosmosDBAccountCapability System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3362,6 +3439,7 @@ internal CosmosDBAccountConnectionString() { } public string Description { get { throw null; } } public Azure.ResourceManager.CosmosDB.Models.CosmosDBKind? KeyKind { get { throw null; } } public Azure.ResourceManager.CosmosDB.Models.CosmosDBType? KeyType { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.CosmosDBAccountConnectionString 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.CosmosDB.Models.CosmosDBAccountConnectionString System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3376,6 +3454,7 @@ public CosmosDBAccountCorsPolicy(string allowedOrigins) { } public string AllowedOrigins { get { throw null; } set { } } public string ExposedHeaders { get { throw null; } set { } } public long? MaxAgeInSeconds { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.CosmosDBAccountCorsPolicy 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.CosmosDB.Models.CosmosDBAccountCorsPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3443,6 +3522,7 @@ public CosmosDBAccountCreateOrUpdateContent(Azure.Core.AzureLocation location, S public Azure.ResourceManager.CosmosDB.Models.CosmosDBPublicNetworkAccess? PublicNetworkAccess { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.CosmosDBAccountRestoreParameters RestoreParameters { get { throw null; } set { } } public System.Collections.Generic.IList VirtualNetworkRules { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.CosmosDBAccountCreateOrUpdateContent 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.CosmosDB.Models.CosmosDBAccountCreateOrUpdateContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3474,6 +3554,7 @@ public partial class CosmosDBAccountKeyList : Azure.ResourceManager.CosmosDB.Mod internal CosmosDBAccountKeyList() { } public string PrimaryMasterKey { get { throw null; } } public string SecondaryMasterKey { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.CosmosDBAccountKeyList 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.CosmosDB.Models.CosmosDBAccountKeyList System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3508,6 +3589,7 @@ public CosmosDBAccountLocation() { } public bool? IsZoneRedundant { get { throw null; } set { } } public Azure.Core.AzureLocation? LocationName { get { throw null; } set { } } public string ProvisioningState { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.CosmosDBAccountLocation 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.CosmosDB.Models.CosmosDBAccountLocation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3572,6 +3654,7 @@ public CosmosDBAccountPatch() { } public Azure.ResourceManager.CosmosDB.Models.CosmosDBPublicNetworkAccess? PublicNetworkAccess { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } public System.Collections.Generic.IList VirtualNetworkRules { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.CosmosDBAccountPatch 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.CosmosDB.Models.CosmosDBAccountPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3583,6 +3666,7 @@ public partial class CosmosDBAccountReadOnlyKeyList : System.ClientModel.Primiti internal CosmosDBAccountReadOnlyKeyList() { } public string PrimaryReadonlyMasterKey { get { throw null; } } public string SecondaryReadonlyMasterKey { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.CosmosDBAccountReadOnlyKeyList 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.CosmosDB.Models.CosmosDBAccountReadOnlyKeyList System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3593,6 +3677,7 @@ public partial class CosmosDBAccountRegenerateKeyContent : System.ClientModel.Pr { public CosmosDBAccountRegenerateKeyContent(Azure.ResourceManager.CosmosDB.Models.CosmosDBAccountKeyKind keyKind) { } public Azure.ResourceManager.CosmosDB.Models.CosmosDBAccountKeyKind KeyKind { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.CosmosDBAccountRegenerateKeyContent 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.CosmosDB.Models.CosmosDBAccountRegenerateKeyContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3624,6 +3709,7 @@ public CosmosDBAccountRestoreParameters() { } public Azure.ResourceManager.CosmosDB.Models.CosmosDBAccountRestoreMode? RestoreMode { get { throw null; } set { } } public string SourceBackupLocation { get { throw null; } set { } } public System.Collections.Generic.IList TablesToRestore { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.CosmosDBAccountRestoreParameters 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.CosmosDB.Models.CosmosDBAccountRestoreParameters System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3656,6 +3742,7 @@ public partial class CosmosDBBackupInformation : System.ClientModel.Primitives.I { internal CosmosDBBackupInformation() { } public System.DateTimeOffset? ContinuousBackupInformationLatestRestorableTimestamp { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.CosmosDBBackupInformation 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.CosmosDB.Models.CosmosDBBackupInformation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3686,6 +3773,7 @@ public partial class CosmosDBBaseConfig : System.ClientModel.Primitives.IJsonMod public CosmosDBBaseConfig() { } public int? AutoscaleMaxThroughput { get { throw null; } set { } } public int? Throughput { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.CosmosDBBaseConfig 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.CosmosDB.Models.CosmosDBBaseConfig System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3701,6 +3789,7 @@ internal CosmosDBBaseMetric() { } public System.DateTimeOffset? StartOn { get { throw null; } } public string TimeGrain { get { throw null; } } public Azure.ResourceManager.CosmosDB.Models.CosmosDBMetricUnitType? Unit { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.CosmosDBBaseMetric 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.CosmosDB.Models.CosmosDBBaseMetric System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3715,6 +3804,7 @@ internal CosmosDBBaseUsage() { } public Azure.ResourceManager.CosmosDB.Models.CosmosDBMetricName Name { get { throw null; } } public string QuotaPeriod { get { throw null; } } public Azure.ResourceManager.CosmosDB.Models.CosmosDBMetricUnitType? Unit { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.CosmosDBBaseUsage 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.CosmosDB.Models.CosmosDBBaseUsage System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3728,6 +3818,7 @@ public CosmosDBClientEncryptionIncludedPath(string path, string clientEncryption public string EncryptionAlgorithm { get { throw null; } set { } } public string EncryptionType { get { throw null; } set { } } public string Path { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.CosmosDBClientEncryptionIncludedPath 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.CosmosDB.Models.CosmosDBClientEncryptionIncludedPath System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3739,6 +3830,7 @@ public partial class CosmosDBClientEncryptionPolicy : System.ClientModel.Primiti public CosmosDBClientEncryptionPolicy(System.Collections.Generic.IEnumerable includedPaths, int policyFormatVersion) { } public System.Collections.Generic.IList IncludedPaths { get { throw null; } } public int PolicyFormatVersion { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.CosmosDBClientEncryptionPolicy 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.CosmosDB.Models.CosmosDBClientEncryptionPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3750,6 +3842,7 @@ public partial class CosmosDBCompositePath : System.ClientModel.Primitives.IJson public CosmosDBCompositePath() { } public Azure.ResourceManager.CosmosDB.Models.CompositePathSortOrder? Order { get { throw null; } set { } } public string Path { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.CosmosDBCompositePath 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.CosmosDB.Models.CosmosDBCompositePath System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3763,6 +3856,7 @@ public CosmosDBContainerPartitionKey() { } public Azure.ResourceManager.CosmosDB.Models.CosmosDBPartitionKind? Kind { get { throw null; } set { } } public System.Collections.Generic.IList Paths { get { throw null; } } public int? Version { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.CosmosDBContainerPartitionKey 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.CosmosDB.Models.CosmosDBContainerPartitionKey System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3774,6 +3868,7 @@ public partial class CosmosDBCreateUpdateConfig : System.ClientModel.Primitives. public CosmosDBCreateUpdateConfig() { } public int? AutoscaleMaxThroughput { get { throw null; } set { } } public int? Throughput { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.CosmosDBCreateUpdateConfig 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.CosmosDB.Models.CosmosDBCreateUpdateConfig System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3807,6 +3902,7 @@ public partial class CosmosDBErrorResult : System.ClientModel.Primitives.IJsonMo internal CosmosDBErrorResult() { } public string Code { get { throw null; } } public string Message { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.CosmosDBErrorResult 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.CosmosDB.Models.CosmosDBErrorResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3817,6 +3913,7 @@ public partial class CosmosDBExcludedPath : System.ClientModel.Primitives.IJsonM { public CosmosDBExcludedPath() { } public string Path { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.CosmosDBExcludedPath 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.CosmosDB.Models.CosmosDBExcludedPath System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3827,6 +3924,7 @@ public partial class CosmosDBFailoverPolicies : System.ClientModel.Primitives.IJ { public CosmosDBFailoverPolicies(System.Collections.Generic.IEnumerable failoverPolicies) { } public System.Collections.Generic.IList FailoverPolicies { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.CosmosDBFailoverPolicies 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.CosmosDB.Models.CosmosDBFailoverPolicies System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3839,6 +3937,7 @@ public CosmosDBFailoverPolicy() { } public int? FailoverPriority { get { throw null; } set { } } public string Id { get { throw null; } } public Azure.Core.AzureLocation? LocationName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.CosmosDBFailoverPolicy 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.CosmosDB.Models.CosmosDBFailoverPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3850,6 +3949,7 @@ public partial class CosmosDBIncludedPath : System.ClientModel.Primitives.IJsonM public CosmosDBIncludedPath() { } public System.Collections.Generic.IList Indexes { get { throw null; } } public string Path { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.CosmosDBIncludedPath 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.CosmosDB.Models.CosmosDBIncludedPath System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3884,6 +3984,7 @@ public CosmosDBIndexingPolicy() { } public Azure.ResourceManager.CosmosDB.Models.CosmosDBIndexingMode? IndexingMode { get { throw null; } set { } } public bool? IsAutomatic { get { throw null; } set { } } public System.Collections.Generic.IList SpatialIndexes { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.CosmosDBIndexingPolicy 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.CosmosDB.Models.CosmosDBIndexingPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3913,6 +4014,7 @@ public partial class CosmosDBIPAddressOrRange : System.ClientModel.Primitives.IJ { public CosmosDBIPAddressOrRange() { } public string IPAddressOrRange { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.CosmosDBIPAddressOrRange 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.CosmosDB.Models.CosmosDBIPAddressOrRange System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3926,6 +4028,7 @@ public CosmosDBKeyWrapMetadata() { } public string CosmosDBKeyWrapMetadataType { get { throw null; } set { } } public string Name { get { throw null; } set { } } public string Value { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.CosmosDBKeyWrapMetadata 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.CosmosDB.Models.CosmosDBKeyWrapMetadata System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3961,6 +4064,7 @@ public CosmosDBLocationProperties() { } public bool? IsSubscriptionRegionAccessAllowedForAz { get { throw null; } } public bool? IsSubscriptionRegionAccessAllowedForRegular { get { throw null; } } public Azure.ResourceManager.CosmosDB.Models.CosmosDBStatus? Status { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.CosmosDBLocationProperties 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.CosmosDB.Models.CosmosDBLocationProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3972,6 +4076,7 @@ public partial class CosmosDBMetricAvailability : System.ClientModel.Primitives. internal CosmosDBMetricAvailability() { } public string Retention { get { throw null; } } public string TimeGrain { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.CosmosDBMetricAvailability 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.CosmosDB.Models.CosmosDBMetricAvailability System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3986,6 +4091,7 @@ internal CosmosDBMetricDefinition() { } public Azure.ResourceManager.CosmosDB.Models.CosmosDBMetricPrimaryAggregationType? PrimaryAggregationType { get { throw null; } } public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } } public Azure.ResourceManager.CosmosDB.Models.CosmosDBMetricUnitType? Unit { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.CosmosDBMetricDefinition 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.CosmosDB.Models.CosmosDBMetricDefinition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3997,6 +4103,7 @@ public partial class CosmosDBMetricName : System.ClientModel.Primitives.IJsonMod internal CosmosDBMetricName() { } public string LocalizedValue { get { throw null; } } public string Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.CosmosDBMetricName 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.CosmosDB.Models.CosmosDBMetricName System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4057,6 +4164,7 @@ internal CosmosDBMetricValue() { } public double? Minimum { get { throw null; } } public System.DateTimeOffset? Timestamp { get { throw null; } } public double? Total { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.CosmosDBMetricValue 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.CosmosDB.Models.CosmosDBMetricValue System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4128,6 +4236,7 @@ public CosmosDBPathIndexes() { } public Azure.ResourceManager.CosmosDB.Models.CosmosDBDataType? DataType { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.CosmosDBIndexKind? Kind { get { throw null; } set { } } public int? Precision { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.CosmosDBPathIndexes 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.CosmosDB.Models.CosmosDBPathIndexes System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4143,6 +4252,7 @@ internal CosmosDBPercentileMetric() { } public System.DateTimeOffset? StartOn { get { throw null; } } public string TimeGrain { get { throw null; } } public Azure.ResourceManager.CosmosDB.Models.CosmosDBMetricUnitType? Unit { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.CosmosDBPercentileMetric 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.CosmosDB.Models.CosmosDBPercentileMetric System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4155,6 +4265,7 @@ public CosmosDBPrivateLinkServiceConnectionStateProperty() { } public string ActionsRequired { get { throw null; } } public string Description { get { throw null; } set { } } public string Status { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.CosmosDBPrivateLinkServiceConnectionStateProperty 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.CosmosDB.Models.CosmosDBPrivateLinkServiceConnectionStateProperty System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4186,6 +4297,7 @@ internal CosmosDBRegionalService() { } public Azure.Core.AzureLocation? Location { get { throw null; } } public string Name { get { throw null; } } public Azure.ResourceManager.CosmosDB.Models.CosmosDBServiceStatus? Status { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.CosmosDBRegionalService 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.CosmosDB.Models.CosmosDBRegionalService System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4221,6 +4333,7 @@ public CosmosDBServiceCreateOrUpdateContent() { } public Azure.ResourceManager.CosmosDB.Models.CosmosDBServiceSize? InstanceSize { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.ServiceResourceCreateUpdateProperties Properties { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.CosmosDBServiceType? ServiceType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.CosmosDBServiceCreateOrUpdateContent 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.CosmosDB.Models.CosmosDBServiceCreateOrUpdateContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4235,6 +4348,7 @@ public CosmosDBServiceProperties() { } public int? InstanceCount { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.CosmosDBServiceSize? InstanceSize { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.CosmosDBServiceStatus? Status { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.CosmosDBServiceProperties 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.CosmosDB.Models.CosmosDBServiceProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4326,6 +4440,7 @@ public partial class CosmosDBSqlClientEncryptionKeyCreateOrUpdateContent : Syste { public CosmosDBSqlClientEncryptionKeyCreateOrUpdateContent(Azure.ResourceManager.CosmosDB.Models.CosmosDBSqlClientEncryptionKeyResourceInfo resource) { } public Azure.ResourceManager.CosmosDB.Models.CosmosDBSqlClientEncryptionKeyResourceInfo Resource { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.CosmosDBSqlClientEncryptionKeyCreateOrUpdateContent 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.CosmosDB.Models.CosmosDBSqlClientEncryptionKeyCreateOrUpdateContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4338,6 +4453,7 @@ public CosmosDBSqlClientEncryptionKeyProperties() { } public Azure.ETag? ETag { get { throw null; } } public string Rid { get { throw null; } } public float? Timestamp { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.CosmosDBSqlClientEncryptionKeyProperties 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.CosmosDB.Models.CosmosDBSqlClientEncryptionKeyProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4351,6 +4467,7 @@ public CosmosDBSqlClientEncryptionKeyResourceInfo() { } public string Id { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.CosmosDBKeyWrapMetadata KeyWrapMetadata { get { throw null; } set { } } public byte[] WrappedDataEncryptionKey { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.CosmosDBSqlClientEncryptionKeyResourceInfo 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.CosmosDB.Models.CosmosDBSqlClientEncryptionKeyResourceInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4363,6 +4480,7 @@ public CosmosDBSqlContainerCreateOrUpdateContent(Azure.Core.AzureLocation locati public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.CosmosDBCreateUpdateConfig Options { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.CosmosDBSqlContainerResourceInfo Resource { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.CosmosDBSqlContainerCreateOrUpdateContent 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.CosmosDB.Models.CosmosDBSqlContainerCreateOrUpdateContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4372,6 +4490,7 @@ public CosmosDBSqlContainerCreateOrUpdateContent(Azure.Core.AzureLocation locati public partial class CosmosDBSqlContainerPropertiesConfig : Azure.ResourceManager.CosmosDB.Models.CosmosDBBaseConfig, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public CosmosDBSqlContainerPropertiesConfig() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.CosmosDBSqlContainerPropertiesConfig 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.CosmosDB.Models.CosmosDBSqlContainerPropertiesConfig System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4393,6 +4512,7 @@ public CosmosDBSqlContainerResourceInfo(string containerName) { } public Azure.ResourceManager.CosmosDB.Models.CosmosDBContainerPartitionKey PartitionKey { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.ResourceRestoreParameters RestoreParameters { get { throw null; } set { } } public System.Collections.Generic.IList UniqueKeys { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.CosmosDBSqlContainerResourceInfo 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.CosmosDB.Models.CosmosDBSqlContainerResourceInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4406,6 +4526,7 @@ public CosmosDBSqlDatabaseCreateOrUpdateContent(Azure.Core.AzureLocation locatio public Azure.ResourceManager.CosmosDB.Models.CosmosDBCreateUpdateConfig Options { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.CosmosDBSqlDatabaseResourceInfo Resource { get { throw null; } set { } } public string ResourceDatabaseName { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.CosmosDBSqlDatabaseCreateOrUpdateContent 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.CosmosDB.Models.CosmosDBSqlDatabaseCreateOrUpdateContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4415,6 +4536,7 @@ public CosmosDBSqlDatabaseCreateOrUpdateContent(Azure.Core.AzureLocation locatio public partial class CosmosDBSqlDatabasePropertiesConfig : Azure.ResourceManager.CosmosDB.Models.CosmosDBBaseConfig, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public CosmosDBSqlDatabasePropertiesConfig() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.CosmosDBSqlDatabasePropertiesConfig 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.CosmosDB.Models.CosmosDBSqlDatabasePropertiesConfig System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4427,6 +4549,7 @@ public CosmosDBSqlDatabaseResourceInfo(string databaseName) { } public Azure.ResourceManager.CosmosDB.Models.CosmosDBAccountCreateMode? CreateMode { get { throw null; } set { } } public string DatabaseName { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.ResourceRestoreParameters RestoreParameters { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.CosmosDBSqlDatabaseResourceInfo 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.CosmosDB.Models.CosmosDBSqlDatabaseResourceInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4439,6 +4562,7 @@ public CosmosDBSqlRoleAssignmentCreateOrUpdateContent() { } public System.Guid? PrincipalId { get { throw null; } set { } } public Azure.Core.ResourceIdentifier RoleDefinitionId { get { throw null; } set { } } public string Scope { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.CosmosDBSqlRoleAssignmentCreateOrUpdateContent 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.CosmosDB.Models.CosmosDBSqlRoleAssignmentCreateOrUpdateContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4452,6 +4576,7 @@ public CosmosDBSqlRoleDefinitionCreateOrUpdateContent() { } public System.Collections.Generic.IList Permissions { get { throw null; } } public Azure.ResourceManager.CosmosDB.Models.CosmosDBSqlRoleDefinitionType? RoleDefinitionType { get { throw null; } set { } } public string RoleName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.CosmosDBSqlRoleDefinitionCreateOrUpdateContent 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.CosmosDB.Models.CosmosDBSqlRoleDefinitionCreateOrUpdateContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4468,6 +4593,7 @@ public partial class CosmosDBSqlRolePermission : System.ClientModel.Primitives.I public CosmosDBSqlRolePermission() { } public System.Collections.Generic.IList DataActions { get { throw null; } } public System.Collections.Generic.IList NotDataActions { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.CosmosDBSqlRolePermission 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.CosmosDB.Models.CosmosDBSqlRolePermission System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4480,6 +4606,7 @@ public CosmosDBSqlStoredProcedureCreateOrUpdateContent(Azure.Core.AzureLocation public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.CosmosDBCreateUpdateConfig Options { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.CosmosDBSqlStoredProcedureResourceInfo Resource { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.CosmosDBSqlStoredProcedureCreateOrUpdateContent 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.CosmosDB.Models.CosmosDBSqlStoredProcedureCreateOrUpdateContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4491,6 +4618,7 @@ public partial class CosmosDBSqlStoredProcedureResourceInfo : System.ClientModel public CosmosDBSqlStoredProcedureResourceInfo(string storedProcedureName) { } public string Body { get { throw null; } set { } } public string StoredProcedureName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.CosmosDBSqlStoredProcedureResourceInfo 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.CosmosDB.Models.CosmosDBSqlStoredProcedureResourceInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4503,6 +4631,7 @@ public CosmosDBSqlTriggerCreateOrUpdateContent(Azure.Core.AzureLocation location public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.CosmosDBCreateUpdateConfig Options { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.CosmosDBSqlTriggerResourceInfo Resource { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.CosmosDBSqlTriggerCreateOrUpdateContent 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.CosmosDB.Models.CosmosDBSqlTriggerCreateOrUpdateContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4537,6 +4666,7 @@ public CosmosDBSqlTriggerResourceInfo(string triggerName) { } public string TriggerName { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.CosmosDBSqlTriggerOperation? TriggerOperation { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.CosmosDBSqlTriggerType? TriggerType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.CosmosDBSqlTriggerResourceInfo 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.CosmosDB.Models.CosmosDBSqlTriggerResourceInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4567,6 +4697,7 @@ public CosmosDBSqlUserDefinedFunctionCreateOrUpdateContent(Azure.Core.AzureLocat public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.CosmosDBCreateUpdateConfig Options { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.CosmosDBSqlUserDefinedFunctionResourceInfo Resource { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.CosmosDBSqlUserDefinedFunctionCreateOrUpdateContent 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.CosmosDB.Models.CosmosDBSqlUserDefinedFunctionCreateOrUpdateContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4578,6 +4709,7 @@ public partial class CosmosDBSqlUserDefinedFunctionResourceInfo : System.ClientM public CosmosDBSqlUserDefinedFunctionResourceInfo(string functionName) { } public string Body { get { throw null; } set { } } public string FunctionName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.CosmosDBSqlUserDefinedFunctionResourceInfo 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.CosmosDB.Models.CosmosDBSqlUserDefinedFunctionResourceInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4616,6 +4748,7 @@ public CosmosDBTableCreateOrUpdateContent(Azure.Core.AzureLocation location, Azu public Azure.ResourceManager.CosmosDB.Models.CosmosDBCreateUpdateConfig Options { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.CosmosDBTableResourceInfo Resource { get { throw null; } set { } } public string ResourceTableName { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.CosmosDBTableCreateOrUpdateContent 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.CosmosDB.Models.CosmosDBTableCreateOrUpdateContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4625,6 +4758,7 @@ public CosmosDBTableCreateOrUpdateContent(Azure.Core.AzureLocation location, Azu public partial class CosmosDBTablePropertiesOptions : Azure.ResourceManager.CosmosDB.Models.CosmosDBBaseConfig, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public CosmosDBTablePropertiesOptions() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.CosmosDBTablePropertiesOptions 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.CosmosDB.Models.CosmosDBTablePropertiesOptions System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4637,6 +4771,7 @@ public CosmosDBTablePropertiesResource(string tableName) : base (default(string) public Azure.ETag? ETag { get { throw null; } } public string Rid { get { throw null; } } public float? Timestamp { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.CosmosDBTablePropertiesResource 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.CosmosDB.Models.CosmosDBTablePropertiesResource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4649,6 +4784,7 @@ public CosmosDBTableResourceInfo(string tableName) { } public Azure.ResourceManager.CosmosDB.Models.CosmosDBAccountCreateMode? CreateMode { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.ResourceRestoreParameters RestoreParameters { get { throw null; } set { } } public string TableName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.CosmosDBTableResourceInfo 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.CosmosDB.Models.CosmosDBTableResourceInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4660,6 +4796,7 @@ public partial class CosmosDBThroughputPoolPatch : System.ClientModel.Primitives public CosmosDBThroughputPoolPatch() { } public int? MaxThroughput { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.CosmosDBStatus? ProvisioningState { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.CosmosDBThroughputPoolPatch 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.CosmosDB.Models.CosmosDBThroughputPoolPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4695,6 +4832,7 @@ public partial class CosmosDBUniqueKey : System.ClientModel.Primitives.IJsonMode { public CosmosDBUniqueKey() { } public System.Collections.Generic.IList Paths { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.CosmosDBUniqueKey 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.CosmosDB.Models.CosmosDBUniqueKey System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4706,6 +4844,7 @@ public partial class CosmosDBVirtualNetworkRule : System.ClientModel.Primitives. public CosmosDBVirtualNetworkRule() { } public Azure.Core.ResourceIdentifier Id { get { throw null; } set { } } public bool? IgnoreMissingVnetServiceEndpoint { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.CosmosDBVirtualNetworkRule 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.CosmosDB.Models.CosmosDBVirtualNetworkRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4717,6 +4856,7 @@ public partial class CosmosMongoDataTransferDataSourceSink : Azure.ResourceManag public CosmosMongoDataTransferDataSourceSink(string databaseName, string collectionName) { } public string CollectionName { get { throw null; } set { } } public string DatabaseName { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.CosmosMongoDataTransferDataSourceSink 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.CosmosDB.Models.CosmosMongoDataTransferDataSourceSink System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4728,6 +4868,7 @@ public partial class CosmosSqlDataTransferDataSourceSink : Azure.ResourceManager public CosmosSqlDataTransferDataSourceSink(string databaseName, string containerName) { } public string ContainerName { get { throw null; } set { } } public string DatabaseName { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.CosmosSqlDataTransferDataSourceSink 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.CosmosDB.Models.CosmosSqlDataTransferDataSourceSink System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4741,6 +4882,7 @@ internal DatabaseAccountKeysMetadata() { } public System.DateTimeOffset? PrimaryReadonlyMasterKeyGeneratedOn { get { throw null; } } public System.DateTimeOffset? SecondaryMasterKeyGeneratedOn { get { throw null; } } public System.DateTimeOffset? SecondaryReadonlyMasterKeyGeneratedOn { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.DatabaseAccountKeysMetadata 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.CosmosDB.Models.DatabaseAccountKeysMetadata System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4752,6 +4894,7 @@ public partial class DatabaseRestoreResourceInfo : System.ClientModel.Primitives public DatabaseRestoreResourceInfo() { } public System.Collections.Generic.IList CollectionNames { get { throw null; } } public string DatabaseName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.DatabaseRestoreResourceInfo 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.CosmosDB.Models.DatabaseRestoreResourceInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4761,6 +4904,7 @@ public DatabaseRestoreResourceInfo() { } public abstract partial class DataTransferDataSourceSink : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { protected DataTransferDataSourceSink() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.DataTransferDataSourceSink 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.CosmosDB.Models.DataTransferDataSourceSink System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4771,6 +4915,7 @@ public partial class DataTransferJobGetResultCreateOrUpdateContent : Azure.Resou { public DataTransferJobGetResultCreateOrUpdateContent(Azure.ResourceManager.CosmosDB.Models.DataTransferJobProperties properties) { } public Azure.ResourceManager.CosmosDB.Models.DataTransferJobProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.DataTransferJobGetResultCreateOrUpdateContent 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.CosmosDB.Models.DataTransferJobGetResultCreateOrUpdateContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4809,6 +4954,7 @@ public DataTransferJobProperties(Azure.ResourceManager.CosmosDB.Models.DataTrans public string Status { get { throw null; } } public long? TotalCount { get { throw null; } } public int? WorkerCount { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.DataTransferJobProperties 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.CosmosDB.Models.DataTransferJobProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4818,6 +4964,7 @@ public DataTransferJobProperties(Azure.ResourceManager.CosmosDB.Models.DataTrans public partial class DataTransferRegionalService : Azure.ResourceManager.CosmosDB.Models.CosmosDBRegionalService, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal DataTransferRegionalService() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.DataTransferRegionalService 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.CosmosDB.Models.DataTransferRegionalService System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4828,6 +4975,7 @@ public partial class DataTransferServiceProperties : Azure.ResourceManager.Cosmo { public DataTransferServiceProperties() { } public System.Collections.Generic.IReadOnlyList Locations { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.DataTransferServiceProperties 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.CosmosDB.Models.DataTransferServiceProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4837,6 +4985,7 @@ public DataTransferServiceProperties() { } public partial class DataTransferServiceResourceCreateUpdateProperties : Azure.ResourceManager.CosmosDB.Models.ServiceResourceCreateUpdateProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DataTransferServiceResourceCreateUpdateProperties() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.DataTransferServiceResourceCreateUpdateProperties 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.CosmosDB.Models.DataTransferServiceResourceCreateUpdateProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4899,6 +5048,7 @@ public ExtendedCassandraKeyspaceResourceInfo(string keyspaceName) : base (defaul public Azure.ETag? ETag { get { throw null; } } public string Rid { get { throw null; } } public float? Timestamp { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.ExtendedCassandraKeyspaceResourceInfo 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.CosmosDB.Models.ExtendedCassandraKeyspaceResourceInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4911,6 +5061,7 @@ public ExtendedCassandraTableResourceInfo(string tableName) : base (default(stri public Azure.ETag? ETag { get { throw null; } } public string Rid { get { throw null; } } public float? Timestamp { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.ExtendedCassandraTableResourceInfo 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.CosmosDB.Models.ExtendedCassandraTableResourceInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4923,6 +5074,7 @@ public ExtendedCosmosDBSqlContainerResourceInfo(string containerName) : base (de public Azure.ETag? ETag { get { throw null; } } public string Rid { get { throw null; } } public float? Timestamp { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.ExtendedCosmosDBSqlContainerResourceInfo 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.CosmosDB.Models.ExtendedCosmosDBSqlContainerResourceInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4937,6 +5089,7 @@ public ExtendedCosmosDBSqlDatabaseResourceInfo(string databaseName) : base (defa public string Rid { get { throw null; } } public float? Timestamp { get { throw null; } } public string Users { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.ExtendedCosmosDBSqlDatabaseResourceInfo 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.CosmosDB.Models.ExtendedCosmosDBSqlDatabaseResourceInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4949,6 +5102,7 @@ public ExtendedCosmosDBSqlStoredProcedureResourceInfo(string storedProcedureName public Azure.ETag? ETag { get { throw null; } } public string Rid { get { throw null; } } public float? Timestamp { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.ExtendedCosmosDBSqlStoredProcedureResourceInfo 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.CosmosDB.Models.ExtendedCosmosDBSqlStoredProcedureResourceInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4961,6 +5115,7 @@ public ExtendedCosmosDBSqlTriggerResourceInfo(string triggerName) : base (defaul public Azure.ETag? ETag { get { throw null; } } public string Rid { get { throw null; } } public float? Timestamp { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.ExtendedCosmosDBSqlTriggerResourceInfo 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.CosmosDB.Models.ExtendedCosmosDBSqlTriggerResourceInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4973,6 +5128,7 @@ public ExtendedCosmosDBSqlUserDefinedFunctionResourceInfo(string functionName) : public Azure.ETag? ETag { get { throw null; } } public string Rid { get { throw null; } } public float? Timestamp { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.ExtendedCosmosDBSqlUserDefinedFunctionResourceInfo 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.CosmosDB.Models.ExtendedCosmosDBSqlUserDefinedFunctionResourceInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4985,6 +5141,7 @@ public ExtendedGremlinDatabaseResourceInfo(string databaseName) : base (default( public Azure.ETag? ETag { get { throw null; } } public string Rid { get { throw null; } } public float? Timestamp { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.ExtendedGremlinDatabaseResourceInfo 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.CosmosDB.Models.ExtendedGremlinDatabaseResourceInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4997,6 +5154,7 @@ public ExtendedGremlinGraphResourceInfo(string graphName) : base (default(string public Azure.ETag? ETag { get { throw null; } } public string Rid { get { throw null; } } public float? Timestamp { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.ExtendedGremlinGraphResourceInfo 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.CosmosDB.Models.ExtendedGremlinGraphResourceInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5009,6 +5167,7 @@ public ExtendedMongoDBCollectionResourceInfo(string collectionName) : base (defa public Azure.ETag? ETag { get { throw null; } } public string Rid { get { throw null; } } public float? Timestamp { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.ExtendedMongoDBCollectionResourceInfo 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.CosmosDB.Models.ExtendedMongoDBCollectionResourceInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5021,6 +5180,7 @@ public ExtendedMongoDBDatabaseResourceInfo(string databaseName) : base (default( public Azure.ETag? ETag { get { throw null; } } public string Rid { get { throw null; } } public float? Timestamp { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.ExtendedMongoDBDatabaseResourceInfo 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.CosmosDB.Models.ExtendedMongoDBDatabaseResourceInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5037,6 +5197,7 @@ internal ExtendedRestorableGremlinDatabaseResourceInfo() { } public string EventTimestamp { get { throw null; } } public Azure.ResourceManager.CosmosDB.Models.CosmosDBOperationType? OperationType { get { throw null; } } public string Rid { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.ExtendedRestorableGremlinDatabaseResourceInfo 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.CosmosDB.Models.ExtendedRestorableGremlinDatabaseResourceInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5053,6 +5214,7 @@ internal ExtendedRestorableGremlinGraphResourceInfo() { } public string GraphName { get { throw null; } } public Azure.ResourceManager.CosmosDB.Models.CosmosDBOperationType? OperationType { get { throw null; } } public string Rid { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.ExtendedRestorableGremlinGraphResourceInfo 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.CosmosDB.Models.ExtendedRestorableGremlinGraphResourceInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5069,6 +5231,7 @@ internal ExtendedRestorableMongoDBCollectionResourceInfo() { } public string EventTimestamp { get { throw null; } } public Azure.ResourceManager.CosmosDB.Models.CosmosDBOperationType? OperationType { get { throw null; } } public string Rid { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.ExtendedRestorableMongoDBCollectionResourceInfo 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.CosmosDB.Models.ExtendedRestorableMongoDBCollectionResourceInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5085,6 +5248,7 @@ internal ExtendedRestorableMongoDBDatabaseResourceInfo() { } public string EventTimestamp { get { throw null; } } public Azure.ResourceManager.CosmosDB.Models.CosmosDBOperationType? OperationType { get { throw null; } } public string Rid { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.ExtendedRestorableMongoDBDatabaseResourceInfo 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.CosmosDB.Models.ExtendedRestorableMongoDBDatabaseResourceInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5102,6 +5266,7 @@ internal ExtendedRestorableSqlContainerResourceInfo() { } public string EventTimestamp { get { throw null; } } public Azure.ResourceManager.CosmosDB.Models.CosmosDBOperationType? OperationType { get { throw null; } } public string Rid { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.ExtendedRestorableSqlContainerResourceInfo 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.CosmosDB.Models.ExtendedRestorableSqlContainerResourceInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5119,6 +5284,7 @@ internal ExtendedRestorableSqlDatabaseResourceInfo() { } public string EventTimestamp { get { throw null; } } public Azure.ResourceManager.CosmosDB.Models.CosmosDBOperationType? OperationType { get { throw null; } } public string Rid { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.ExtendedRestorableSqlDatabaseResourceInfo 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.CosmosDB.Models.ExtendedRestorableSqlDatabaseResourceInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5135,6 +5301,7 @@ internal ExtendedRestorableTableResourceInfo() { } public string Rid { get { throw null; } } public string TableId { get { throw null; } } public string TableName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.ExtendedRestorableTableResourceInfo 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.CosmosDB.Models.ExtendedRestorableTableResourceInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5147,6 +5314,7 @@ public ExtendedThroughputSettingsResourceInfo() { } public Azure.ETag? ETag { get { throw null; } } public string Rid { get { throw null; } } public float? Timestamp { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.ExtendedThroughputSettingsResourceInfo 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.CosmosDB.Models.ExtendedThroughputSettingsResourceInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5157,6 +5325,7 @@ public partial class GraphApiComputeRegionalService : Azure.ResourceManager.Cosm { internal GraphApiComputeRegionalService() { } public string GraphApiComputeEndpoint { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.GraphApiComputeRegionalService 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.CosmosDB.Models.GraphApiComputeRegionalService System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5168,6 +5337,7 @@ public partial class GraphApiComputeServiceProperties : Azure.ResourceManager.Co public GraphApiComputeServiceProperties() { } public string GraphApiComputeEndpoint { get { throw null; } set { } } public System.Collections.Generic.IReadOnlyList Locations { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.GraphApiComputeServiceProperties 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.CosmosDB.Models.GraphApiComputeServiceProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5177,6 +5347,7 @@ public GraphApiComputeServiceProperties() { } public partial class GraphApiComputeServiceResourceCreateUpdateProperties : Azure.ResourceManager.CosmosDB.Models.ServiceResourceCreateUpdateProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public GraphApiComputeServiceResourceCreateUpdateProperties() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.GraphApiComputeServiceResourceCreateUpdateProperties 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.CosmosDB.Models.GraphApiComputeServiceResourceCreateUpdateProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5186,6 +5357,7 @@ public GraphApiComputeServiceResourceCreateUpdateProperties() { } public partial class GraphResourceGetPropertiesOptions : Azure.ResourceManager.CosmosDB.Models.CosmosDBBaseConfig, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public GraphResourceGetPropertiesOptions() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.GraphResourceGetPropertiesOptions 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.CosmosDB.Models.GraphResourceGetPropertiesOptions System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5198,6 +5370,7 @@ public GraphResourceGetResultCreateOrUpdateContent(Azure.Core.AzureLocation loca public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.CosmosDBCreateUpdateConfig Options { get { throw null; } set { } } public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.GraphResourceGetResultCreateOrUpdateContent 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.CosmosDB.Models.GraphResourceGetResultCreateOrUpdateContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5211,6 +5384,7 @@ public GremlinDatabaseCreateOrUpdateContent(Azure.Core.AzureLocation location, A public Azure.ResourceManager.CosmosDB.Models.CosmosDBCreateUpdateConfig Options { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.GremlinDatabaseResourceInfo Resource { get { throw null; } set { } } public string ResourceDatabaseName { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.GremlinDatabaseCreateOrUpdateContent 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.CosmosDB.Models.GremlinDatabaseCreateOrUpdateContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5220,6 +5394,7 @@ public GremlinDatabaseCreateOrUpdateContent(Azure.Core.AzureLocation location, A public partial class GremlinDatabasePropertiesConfig : Azure.ResourceManager.CosmosDB.Models.CosmosDBBaseConfig, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public GremlinDatabasePropertiesConfig() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.GremlinDatabasePropertiesConfig 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.CosmosDB.Models.GremlinDatabasePropertiesConfig System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5232,6 +5407,7 @@ public GremlinDatabaseResourceInfo(string databaseName) { } public Azure.ResourceManager.CosmosDB.Models.CosmosDBAccountCreateMode? CreateMode { get { throw null; } set { } } public string DatabaseName { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.ResourceRestoreParameters RestoreParameters { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.GremlinDatabaseResourceInfo 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.CosmosDB.Models.GremlinDatabaseResourceInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5243,6 +5419,7 @@ public partial class GremlinDatabaseRestoreResourceInfo : System.ClientModel.Pri public GremlinDatabaseRestoreResourceInfo() { } public string DatabaseName { get { throw null; } set { } } public System.Collections.Generic.IList GraphNames { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.GremlinDatabaseRestoreResourceInfo 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.CosmosDB.Models.GremlinDatabaseRestoreResourceInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5255,6 +5432,7 @@ public GremlinGraphCreateOrUpdateContent(Azure.Core.AzureLocation location, Azur public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.CosmosDBCreateUpdateConfig Options { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.GremlinGraphResourceInfo Resource { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.GremlinGraphCreateOrUpdateContent 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.CosmosDB.Models.GremlinGraphCreateOrUpdateContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5264,6 +5442,7 @@ public GremlinGraphCreateOrUpdateContent(Azure.Core.AzureLocation location, Azur public partial class GremlinGraphPropertiesConfig : Azure.ResourceManager.CosmosDB.Models.CosmosDBBaseConfig, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public GremlinGraphPropertiesConfig() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.GremlinGraphPropertiesConfig 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.CosmosDB.Models.GremlinGraphPropertiesConfig System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5282,6 +5461,7 @@ public GremlinGraphResourceInfo(string graphName) { } public Azure.ResourceManager.CosmosDB.Models.CosmosDBContainerPartitionKey PartitionKey { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.ResourceRestoreParameters RestoreParameters { get { throw null; } set { } } public System.Collections.Generic.IList UniqueKeys { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.GremlinGraphResourceInfo 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.CosmosDB.Models.GremlinGraphResourceInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5314,6 +5494,7 @@ public MaterializedViewDefinition(string sourceCollectionId, string definition) public string Definition { get { throw null; } set { } } public string SourceCollectionId { get { throw null; } set { } } public string SourceCollectionRid { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.MaterializedViewDefinition 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.CosmosDB.Models.MaterializedViewDefinition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5323,6 +5504,7 @@ public MaterializedViewDefinition(string sourceCollectionId, string definition) public partial class MaterializedViewsBuilderRegionalService : Azure.ResourceManager.CosmosDB.Models.CosmosDBRegionalService, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal MaterializedViewsBuilderRegionalService() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.MaterializedViewsBuilderRegionalService 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.CosmosDB.Models.MaterializedViewsBuilderRegionalService System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5333,6 +5515,7 @@ public partial class MaterializedViewsBuilderServiceProperties : Azure.ResourceM { public MaterializedViewsBuilderServiceProperties() { } public System.Collections.Generic.IReadOnlyList Locations { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.MaterializedViewsBuilderServiceProperties 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.CosmosDB.Models.MaterializedViewsBuilderServiceProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5342,6 +5525,7 @@ public MaterializedViewsBuilderServiceProperties() { } public partial class MaterializedViewsBuilderServiceResourceCreateUpdateProperties : Azure.ResourceManager.CosmosDB.Models.ServiceResourceCreateUpdateProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public MaterializedViewsBuilderServiceResourceCreateUpdateProperties() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.MaterializedViewsBuilderServiceResourceCreateUpdateProperties 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.CosmosDB.Models.MaterializedViewsBuilderServiceResourceCreateUpdateProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5352,6 +5536,7 @@ public partial class MergeParameters : System.ClientModel.Primitives.IJsonModel< { public MergeParameters() { } public bool? IsDryRun { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.MergeParameters 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.CosmosDB.Models.MergeParameters System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5364,6 +5549,7 @@ public MongoDBCollectionCreateOrUpdateContent(Azure.Core.AzureLocation location, public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.CosmosDBCreateUpdateConfig Options { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.MongoDBCollectionResourceInfo Resource { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.MongoDBCollectionCreateOrUpdateContent 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.CosmosDB.Models.MongoDBCollectionCreateOrUpdateContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5373,6 +5559,7 @@ public MongoDBCollectionCreateOrUpdateContent(Azure.Core.AzureLocation location, public partial class MongoDBCollectionPropertiesConfig : Azure.ResourceManager.CosmosDB.Models.CosmosDBBaseConfig, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public MongoDBCollectionPropertiesConfig() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.MongoDBCollectionPropertiesConfig 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.CosmosDB.Models.MongoDBCollectionPropertiesConfig System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5388,6 +5575,7 @@ public MongoDBCollectionResourceInfo(string collectionName) { } public System.Collections.Generic.IList Indexes { get { throw null; } } public Azure.ResourceManager.CosmosDB.Models.ResourceRestoreParameters RestoreParameters { get { throw null; } set { } } public System.Collections.Generic.IDictionary ShardKey { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.MongoDBCollectionResourceInfo 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.CosmosDB.Models.MongoDBCollectionResourceInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5401,6 +5589,7 @@ public MongoDBDatabaseCreateOrUpdateContent(Azure.Core.AzureLocation location, A public Azure.ResourceManager.CosmosDB.Models.CosmosDBCreateUpdateConfig Options { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.MongoDBDatabaseResourceInfo Resource { get { throw null; } set { } } public string ResourceDatabaseName { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.MongoDBDatabaseCreateOrUpdateContent 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.CosmosDB.Models.MongoDBDatabaseCreateOrUpdateContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5410,6 +5599,7 @@ public MongoDBDatabaseCreateOrUpdateContent(Azure.Core.AzureLocation location, A public partial class MongoDBDatabasePropertiesConfig : Azure.ResourceManager.CosmosDB.Models.CosmosDBBaseConfig, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public MongoDBDatabasePropertiesConfig() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.MongoDBDatabasePropertiesConfig 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.CosmosDB.Models.MongoDBDatabasePropertiesConfig System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5422,6 +5612,7 @@ public MongoDBDatabaseResourceInfo(string databaseName) { } public Azure.ResourceManager.CosmosDB.Models.CosmosDBAccountCreateMode? CreateMode { get { throw null; } set { } } public string DatabaseName { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.ResourceRestoreParameters RestoreParameters { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.MongoDBDatabaseResourceInfo 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.CosmosDB.Models.MongoDBDatabaseResourceInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5433,6 +5624,7 @@ public partial class MongoDBIndex : System.ClientModel.Primitives.IJsonModel Keys { get { throw null; } } public Azure.ResourceManager.CosmosDB.Models.MongoDBIndexConfig Options { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.MongoDBIndex 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.CosmosDB.Models.MongoDBIndex System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5444,6 +5636,7 @@ public partial class MongoDBIndexConfig : System.ClientModel.Primitives.IJsonMod public MongoDBIndexConfig() { } public int? ExpireAfterSeconds { get { throw null; } set { } } public bool? IsUnique { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.MongoDBIndexConfig 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.CosmosDB.Models.MongoDBIndexConfig System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5455,6 +5648,7 @@ public partial class MongoDBPrivilege : System.ClientModel.Primitives.IJsonModel public MongoDBPrivilege() { } public System.Collections.Generic.IList Actions { get { throw null; } } public Azure.ResourceManager.CosmosDB.Models.MongoDBPrivilegeResourceInfo Resource { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.MongoDBPrivilege 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.CosmosDB.Models.MongoDBPrivilege System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5466,6 +5660,7 @@ public partial class MongoDBPrivilegeResourceInfo : System.ClientModel.Primitive public MongoDBPrivilegeResourceInfo() { } public string Collection { get { throw null; } set { } } public string DBName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.MongoDBPrivilegeResourceInfo 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.CosmosDB.Models.MongoDBPrivilegeResourceInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5477,6 +5672,7 @@ public partial class MongoDBRole : 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.CosmosDB.Models.MongoDBRole System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5491,6 +5687,7 @@ public MongoDBRoleDefinitionCreateOrUpdateContent() { } public System.Collections.Generic.IList Privileges { get { throw null; } } public string RoleName { get { throw null; } set { } } public System.Collections.Generic.IList Roles { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.MongoDBRoleDefinitionCreateOrUpdateContent 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.CosmosDB.Models.MongoDBRoleDefinitionCreateOrUpdateContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5511,6 +5708,7 @@ public MongoDBUserDefinitionCreateOrUpdateContent() { } public string Password { get { throw null; } set { } } public System.Collections.Generic.IList Roles { get { throw null; } } public string UserName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.MongoDBUserDefinitionCreateOrUpdateContent 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.CosmosDB.Models.MongoDBUserDefinitionCreateOrUpdateContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5528,6 +5726,7 @@ public NetworkSecurityPerimeter() { } public Azure.Core.ResourceIdentifier Id { get { throw null; } set { } } public Azure.Core.AzureLocation? Location { get { throw null; } set { } } public System.Guid? PerimeterGuid { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.NetworkSecurityPerimeter 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.CosmosDB.Models.NetworkSecurityPerimeter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5542,6 +5741,7 @@ public NetworkSecurityPerimeterConfigurationProperties() { } public System.Collections.Generic.IReadOnlyList ProvisioningIssues { get { throw null; } } public Azure.ResourceManager.CosmosDB.Models.NetworkSecurityPerimeterConfigurationProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.CosmosDB.Models.ResourceAssociation ResourceAssociation { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.NetworkSecurityPerimeterConfigurationProperties 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.CosmosDB.Models.NetworkSecurityPerimeterConfigurationProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5579,6 +5779,7 @@ public NetworkSecurityProfile() { } public int? DiagnosticSettingsVersion { get { throw null; } set { } } public System.Collections.Generic.IList EnabledLogCategories { get { throw null; } } public string Name { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.NetworkSecurityProfile 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.CosmosDB.Models.NetworkSecurityProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5590,6 +5791,7 @@ public partial class PartitionMetric : Azure.ResourceManager.CosmosDB.Models.Cos internal PartitionMetric() { } public System.Guid? PartitionId { get { throw null; } } public string PartitionKeyRangeId { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.PartitionMetric 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.CosmosDB.Models.PartitionMetric System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5601,6 +5803,7 @@ public partial class PartitionUsage : Azure.ResourceManager.CosmosDB.Models.Cosm internal PartitionUsage() { } public System.Guid? PartitionId { get { throw null; } } public string PartitionKeyRangeId { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.PartitionUsage 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.CosmosDB.Models.PartitionUsage System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5617,6 +5820,7 @@ internal PercentileMetricValue() { } public double? P90 { get { throw null; } } public double? P95 { get { throw null; } } public double? P99 { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.PercentileMetricValue 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.CosmosDB.Models.PercentileMetricValue System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5627,6 +5831,7 @@ public partial class PeriodicModeBackupPolicy : Azure.ResourceManager.CosmosDB.M { public PeriodicModeBackupPolicy() { } public Azure.ResourceManager.CosmosDB.Models.PeriodicModeProperties PeriodicModeProperties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.PeriodicModeBackupPolicy 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.CosmosDB.Models.PeriodicModeBackupPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5639,6 +5844,7 @@ public PeriodicModeProperties() { } public int? BackupIntervalInMinutes { get { throw null; } set { } } public int? BackupRetentionIntervalInHours { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.CosmosDBBackupStorageRedundancy? BackupStorageRedundancy { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.PeriodicModeProperties 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.CosmosDB.Models.PeriodicModeProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5650,6 +5856,7 @@ public partial class PhysicalPartitionStorageInfo : System.ClientModel.Primitive internal PhysicalPartitionStorageInfo() { } public string Id { get { throw null; } } public double? StorageInKB { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.PhysicalPartitionStorageInfo 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.CosmosDB.Models.PhysicalPartitionStorageInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5660,6 +5867,7 @@ public partial class PhysicalPartitionStorageInfoCollection : System.ClientModel { internal PhysicalPartitionStorageInfoCollection() { } public System.Collections.Generic.IReadOnlyList PhysicalPartitionStorageInfoCollectionValue { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.PhysicalPartitionStorageInfoCollection 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.CosmosDB.Models.PhysicalPartitionStorageInfoCollection System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5671,6 +5879,7 @@ public partial class PhysicalPartitionThroughputInfoResource : System.ClientMode public PhysicalPartitionThroughputInfoResource(string id) { } public string Id { get { throw null; } set { } } public double? Throughput { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.PhysicalPartitionThroughputInfoResource 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.CosmosDB.Models.PhysicalPartitionThroughputInfoResource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5682,6 +5891,7 @@ public partial class PhysicalPartitionThroughputInfoResult : Azure.ResourceManag public PhysicalPartitionThroughputInfoResult(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public System.Collections.Generic.IList ResourcePhysicalPartitionThroughputInfo { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.PhysicalPartitionThroughputInfoResult 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.CosmosDB.Models.PhysicalPartitionThroughputInfoResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5693,6 +5903,7 @@ public partial class ProvisioningIssue : System.ClientModel.Primitives.IJsonMode internal ProvisioningIssue() { } public string Name { get { throw null; } } public Azure.ResourceManager.CosmosDB.Models.ProvisioningIssueProperties Properties { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.ProvisioningIssue 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.CosmosDB.Models.ProvisioningIssue System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5707,6 +5918,7 @@ internal ProvisioningIssueProperties() { } public Azure.ResourceManager.CosmosDB.Models.Severity? Severity { get { throw null; } } public System.Collections.Generic.IReadOnlyList SuggestedAccessRules { get { throw null; } } public System.Collections.Generic.IReadOnlyList SuggestedResourceIds { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.ProvisioningIssueProperties 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.CosmosDB.Models.ProvisioningIssueProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5718,6 +5930,7 @@ public partial class RedistributeThroughputParameters : Azure.ResourceManager.Mo public RedistributeThroughputParameters(Azure.Core.AzureLocation location, Azure.ResourceManager.CosmosDB.Models.RedistributeThroughputPropertiesResource resource) { } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.RedistributeThroughputPropertiesResource Resource { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.RedistributeThroughputParameters 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.CosmosDB.Models.RedistributeThroughputParameters System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5730,6 +5943,7 @@ public RedistributeThroughputPropertiesResource(Azure.ResourceManager.CosmosDB.M public System.Collections.Generic.IList SourcePhysicalPartitionThroughputInfo { get { throw null; } } public System.Collections.Generic.IList TargetPhysicalPartitionThroughputInfo { get { throw null; } } public Azure.ResourceManager.CosmosDB.Models.ThroughputPolicyType ThroughputPolicy { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.RedistributeThroughputPropertiesResource 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.CosmosDB.Models.RedistributeThroughputPropertiesResource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5740,6 +5954,7 @@ public partial class RegionForOnlineOffline : System.ClientModel.Primitives.IJso { public RegionForOnlineOffline(string region) { } public string Region { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.RegionForOnlineOffline 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.CosmosDB.Models.RegionForOnlineOffline System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5751,6 +5966,7 @@ public partial class ResourceAssociation : System.ClientModel.Primitives.IJsonMo public ResourceAssociation() { } public Azure.ResourceManager.CosmosDB.Models.ResourceAssociationAccessMode? AccessMode { get { throw null; } set { } } public string Name { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.ResourceAssociation 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.CosmosDB.Models.ResourceAssociation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5779,6 +5995,7 @@ public ResourceAssociation() { } public partial class ResourceRestoreParameters : Azure.ResourceManager.CosmosDB.Models.RestoreParametersBase, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ResourceRestoreParameters() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.ResourceRestoreParameters 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.CosmosDB.Models.ResourceRestoreParameters System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5789,6 +6006,7 @@ public partial class RestorableGremlinDatabase : Azure.ResourceManager.Models.Re { internal RestorableGremlinDatabase() { } public Azure.ResourceManager.CosmosDB.Models.ExtendedRestorableGremlinDatabaseResourceInfo Resource { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.RestorableGremlinDatabase 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.CosmosDB.Models.RestorableGremlinDatabase System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5799,6 +6017,7 @@ public partial class RestorableGremlinGraph : Azure.ResourceManager.Models.Resou { internal RestorableGremlinGraph() { } public Azure.ResourceManager.CosmosDB.Models.ExtendedRestorableGremlinGraphResourceInfo Resource { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.RestorableGremlinGraph 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.CosmosDB.Models.RestorableGremlinGraph System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5810,6 +6029,7 @@ public partial class RestorableGremlinResourceData : Azure.ResourceManager.Model internal RestorableGremlinResourceData() { } public string DatabaseName { get { throw null; } } public System.Collections.Generic.IReadOnlyList GraphNames { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.RestorableGremlinResourceData 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.CosmosDB.Models.RestorableGremlinResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5823,6 +6043,7 @@ internal RestorableLocationResourceInfo() { } public System.DateTimeOffset? DeletedOn { get { throw null; } } public Azure.Core.AzureLocation? LocationName { get { throw null; } } public string RegionalDatabaseAccountInstanceId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.RestorableLocationResourceInfo 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.CosmosDB.Models.RestorableLocationResourceInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5833,6 +6054,7 @@ public partial class RestorableMongoDBCollection : Azure.ResourceManager.Models. { internal RestorableMongoDBCollection() { } public Azure.ResourceManager.CosmosDB.Models.ExtendedRestorableMongoDBCollectionResourceInfo Resource { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.RestorableMongoDBCollection 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.CosmosDB.Models.RestorableMongoDBCollection System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5843,6 +6065,7 @@ public partial class RestorableMongoDBDatabase : Azure.ResourceManager.Models.Re { internal RestorableMongoDBDatabase() { } public Azure.ResourceManager.CosmosDB.Models.ExtendedRestorableMongoDBDatabaseResourceInfo Resource { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.RestorableMongoDBDatabase 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.CosmosDB.Models.RestorableMongoDBDatabase System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5854,6 +6077,7 @@ public partial class RestorableMongoDBResourceData : Azure.ResourceManager.Model internal RestorableMongoDBResourceData() { } public System.Collections.Generic.IReadOnlyList CollectionNames { get { throw null; } } public string DatabaseName { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.RestorableMongoDBResourceData 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.CosmosDB.Models.RestorableMongoDBResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5864,6 +6088,7 @@ public partial class RestorableSqlContainer : Azure.ResourceManager.Models.Resou { internal RestorableSqlContainer() { } public Azure.ResourceManager.CosmosDB.Models.ExtendedRestorableSqlContainerResourceInfo Resource { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.RestorableSqlContainer 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.CosmosDB.Models.RestorableSqlContainer System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5877,6 +6102,7 @@ public RestorableSqlContainerPropertiesResourceContainer(string containerName) : public string Rid { get { throw null; } } public string Self { get { throw null; } } public float? Timestamp { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.RestorableSqlContainerPropertiesResourceContainer 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.CosmosDB.Models.RestorableSqlContainerPropertiesResourceContainer System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5887,6 +6113,7 @@ public partial class RestorableSqlDatabase : Azure.ResourceManager.Models.Resour { internal RestorableSqlDatabase() { } public Azure.ResourceManager.CosmosDB.Models.ExtendedRestorableSqlDatabaseResourceInfo Resource { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.RestorableSqlDatabase 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.CosmosDB.Models.RestorableSqlDatabase System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5902,6 +6129,7 @@ public RestorableSqlDatabasePropertiesResourceDatabase(string databaseName) : ba public string Self { get { throw null; } } public float? Timestamp { get { throw null; } } public string Users { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.RestorableSqlDatabasePropertiesResourceDatabase 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.CosmosDB.Models.RestorableSqlDatabasePropertiesResourceDatabase System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5913,6 +6141,7 @@ public partial class RestorableSqlResourceData : Azure.ResourceManager.Models.Re internal RestorableSqlResourceData() { } public System.Collections.Generic.IReadOnlyList CollectionNames { get { throw null; } } public string DatabaseName { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.RestorableSqlResourceData 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.CosmosDB.Models.RestorableSqlResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5923,6 +6152,7 @@ public partial class RestorableTable : Azure.ResourceManager.Models.ResourceData { internal RestorableTable() { } public Azure.ResourceManager.CosmosDB.Models.ExtendedRestorableTableResourceInfo Resource { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.RestorableTable 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.CosmosDB.Models.RestorableTable System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5935,6 +6165,7 @@ internal RestorableTableResourceData() { } public string Id { get { throw null; } } public string Name { get { throw null; } } public string ResourceType { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.RestorableTableResourceData 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.CosmosDB.Models.RestorableTableResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5947,6 +6178,7 @@ public RestoreParametersBase() { } public bool? IsRestoreWithTtlDisabled { get { throw null; } set { } } public string RestoreSource { get { throw null; } set { } } public System.DateTimeOffset? RestoreTimestampInUtc { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.RestoreParametersBase 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.CosmosDB.Models.RestoreParametersBase System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5958,6 +6190,7 @@ public partial class RetrieveThroughputParameters : Azure.ResourceManager.Models public RetrieveThroughputParameters(Azure.Core.AzureLocation location, Azure.ResourceManager.CosmosDB.Models.RetrieveThroughputPropertiesResource resource) { } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public System.Collections.Generic.IList ResourcePhysicalPartitionIds { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.RetrieveThroughputParameters 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.CosmosDB.Models.RetrieveThroughputParameters System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5968,6 +6201,7 @@ public partial class RetrieveThroughputPropertiesResource : System.ClientModel.P { public RetrieveThroughputPropertiesResource(System.Collections.Generic.IEnumerable physicalPartitionIds) { } public System.Collections.Generic.IList PhysicalPartitionIds { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.RetrieveThroughputPropertiesResource 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.CosmosDB.Models.RetrieveThroughputPropertiesResource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6016,6 +6250,7 @@ public abstract partial class ServiceResourceCreateUpdateProperties : System.Cli protected ServiceResourceCreateUpdateProperties() { } public int? InstanceCount { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.CosmosDBServiceSize? InstanceSize { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.ServiceResourceCreateUpdateProperties 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.CosmosDB.Models.ServiceResourceCreateUpdateProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6045,6 +6280,7 @@ public partial class SpatialSpec : System.ClientModel.Primitives.IJsonModel Types { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.SpatialSpec 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.CosmosDB.Models.SpatialSpec System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6055,6 +6291,7 @@ public partial class SqlDedicatedGatewayRegionalService : Azure.ResourceManager. { internal SqlDedicatedGatewayRegionalService() { } public string SqlDedicatedGatewayEndpoint { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.SqlDedicatedGatewayRegionalService 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.CosmosDB.Models.SqlDedicatedGatewayRegionalService System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6067,6 +6304,7 @@ public SqlDedicatedGatewayServiceProperties() { } public Azure.ResourceManager.CosmosDB.Models.DedicatedGatewayType? DedicatedGatewayType { get { throw null; } set { } } public System.Collections.Generic.IReadOnlyList Locations { get { throw null; } } public string SqlDedicatedGatewayEndpoint { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.SqlDedicatedGatewayServiceProperties 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.CosmosDB.Models.SqlDedicatedGatewayServiceProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6077,6 +6315,7 @@ public partial class SqlDedicatedGatewayServiceResourceCreateUpdateProperties : { public SqlDedicatedGatewayServiceResourceCreateUpdateProperties() { } public Azure.ResourceManager.CosmosDB.Models.DedicatedGatewayType? DedicatedGatewayType { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.SqlDedicatedGatewayServiceResourceCreateUpdateProperties 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.CosmosDB.Models.SqlDedicatedGatewayServiceResourceCreateUpdateProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6088,6 +6327,7 @@ public partial class ThroughputPolicyResourceInfo : System.ClientModel.Primitive public ThroughputPolicyResourceInfo() { } public int? IncrementPercent { get { throw null; } set { } } public bool? IsEnabled { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.ThroughputPolicyResourceInfo 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.CosmosDB.Models.ThroughputPolicyResourceInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6122,6 +6362,7 @@ public ThroughputSettingsResourceInfo() { } public string OfferReplacePending { get { throw null; } } public string SoftAllowedMaximumThroughput { get { throw null; } } public int? Throughput { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.ThroughputSettingsResourceInfo 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.CosmosDB.Models.ThroughputSettingsResourceInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6133,6 +6374,7 @@ public partial class ThroughputSettingsUpdateData : Azure.ResourceManager.Models public ThroughputSettingsUpdateData(Azure.Core.AzureLocation location, Azure.ResourceManager.CosmosDB.Models.ThroughputSettingsResourceInfo resource) { } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public Azure.ResourceManager.CosmosDB.Models.ThroughputSettingsResourceInfo Resource { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.CosmosDB.Models.ThroughputSettingsUpdateData 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.CosmosDB.Models.ThroughputSettingsUpdateData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/assets.json b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/assets.json index d36929614e01..60caa289ca17 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/assets.json +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/cosmosdb/Azure.ResourceManager.CosmosDB", - "Tag": "net/cosmosdb/Azure.ResourceManager.CosmosDB_4896b8af3d" + "Tag": "net/cosmosdb/Azure.ResourceManager.CosmosDB_91f3220bd8" } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/samples/Generated/Samples/Sample_CosmosDBAccountCollection.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/samples/Generated/Samples/Sample_CosmosDBAccountCollection.cs index 5a92cbae4f1e..7675e92f83bb 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/samples/Generated/Samples/Sample_CosmosDBAccountCollection.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/samples/Generated/Samples/Sample_CosmosDBAccountCollection.cs @@ -166,7 +166,7 @@ public async Task CreateOrUpdate_CosmosDBDatabaseAccountCreateMax() Kind = CosmosDBAccountKind.MongoDB, ConsistencyPolicy = new ConsistencyPolicy(DefaultConsistencyLevel.BoundedStaleness) { - MaxStalenessPrefix = 200, + MaxStalenessPrefix = 200L, MaxIntervalInSeconds = 10, }, IPRules = @@ -328,7 +328,7 @@ public async Task CreateOrUpdate_CosmosDBRestoreDatabaseAccountCreateUpdateJson( Kind = CosmosDBAccountKind.GlobalDocumentDB, ConsistencyPolicy = new ConsistencyPolicy(DefaultConsistencyLevel.BoundedStaleness) { - MaxStalenessPrefix = 200, + MaxStalenessPrefix = 200L, MaxIntervalInSeconds = 10, }, KeyVaultKeyUri = new Uri("https://myKeyVault.vault.azure.net"), diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/samples/Generated/Samples/Sample_CosmosDBAccountResource.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/samples/Generated/Samples/Sample_CosmosDBAccountResource.cs index 6023b3f192a0..c464a4eef5ed 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/samples/Generated/Samples/Sample_CosmosDBAccountResource.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/samples/Generated/Samples/Sample_CosmosDBAccountResource.cs @@ -86,7 +86,7 @@ public async Task Update_CosmosDBDatabaseAccountPatch() }, ConsistencyPolicy = new ConsistencyPolicy(DefaultConsistencyLevel.BoundedStaleness) { - MaxStalenessPrefix = 200, + MaxStalenessPrefix = 200L, MaxIntervalInSeconds = 10, }, IPRules = diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CassandraClusterData.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CassandraClusterData.Serialization.cs index 00df94ee51e3..fbc9c1469a36 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CassandraClusterData.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CassandraClusterData.Serialization.cs @@ -22,6 +22,15 @@ public partial class CassandraClusterData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -29,7 +38,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(CassandraClusterData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); @@ -40,55 +49,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr writer.WritePropertyName("identity"u8); JsonSerializer.Serialize(writer, Identity); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } CassandraClusterData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CassandraDataCenterData.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CassandraDataCenterData.Serialization.cs index 7b91e1e7d679..682bea2228a6 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CassandraDataCenterData.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CassandraDataCenterData.Serialization.cs @@ -21,6 +21,15 @@ public partial class CassandraDataCenterData : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,48 +37,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(CassandraDataCenterData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); writer.WriteObjectValue(Properties, options); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } CassandraDataCenterData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CassandraKeyspaceData.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CassandraKeyspaceData.Serialization.cs index 074a6a239663..055f7a03a3a8 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CassandraKeyspaceData.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CassandraKeyspaceData.Serialization.cs @@ -22,6 +22,15 @@ public partial class CassandraKeyspaceData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -29,46 +38,13 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(CassandraKeyspaceData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; JsonSerializer.Serialize(writer, Identity, serializeOptions); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Resource)) @@ -82,22 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW writer.WriteObjectValue(Options, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } CassandraKeyspaceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CassandraTableData.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CassandraTableData.Serialization.cs index 98274578431d..7e971bbf6ef6 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CassandraTableData.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CassandraTableData.Serialization.cs @@ -22,6 +22,15 @@ public partial class CassandraTableData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -29,46 +38,13 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(CassandraTableData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; JsonSerializer.Serialize(writer, Identity, serializeOptions); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Resource)) @@ -82,22 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit writer.WriteObjectValue(Options, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } CassandraTableData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CassandraViewGetResultData.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CassandraViewGetResultData.Serialization.cs index dda3d0de1eb7..5bfe68e8d452 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CassandraViewGetResultData.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CassandraViewGetResultData.Serialization.cs @@ -22,6 +22,15 @@ public partial class CassandraViewGetResultData : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -29,46 +38,13 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(CassandraViewGetResultData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; JsonSerializer.Serialize(writer, Identity, serializeOptions); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Resource)) @@ -82,22 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe writer.WriteObjectValue(Options, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } CassandraViewGetResultData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBAccountData.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBAccountData.Serialization.cs index 0a489937adec..62f789c6f8c1 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBAccountData.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBAccountData.Serialization.cs @@ -22,6 +22,15 @@ public partial class CosmosDBAccountData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -29,7 +38,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(CosmosDBAccountData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Kind)) { writer.WritePropertyName("kind"u8); @@ -41,39 +50,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; JsonSerializer.Serialize(writer, Identity, serializeOptions); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) @@ -362,22 +338,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri writer.WriteBooleanValue(EnablePerRegionPerPartitionAutoscale.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } CosmosDBAccountData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBLocationData.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBLocationData.Serialization.cs index 9f613c9a0617..09431f46e43a 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBLocationData.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBLocationData.Serialization.cs @@ -21,6 +21,15 @@ public partial class CosmosDBLocationData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,48 +37,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(CosmosDBLocationData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); writer.WriteObjectValue(Properties, options); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } CosmosDBLocationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBPrivateEndpointConnectionData.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBPrivateEndpointConnectionData.Serialization.cs index c9c48df8b08f..ea7553ad3da6 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBPrivateEndpointConnectionData.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBPrivateEndpointConnectionData.Serialization.cs @@ -21,6 +21,15 @@ public partial class CosmosDBPrivateEndpointConnectionData : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,27 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(CosmosDBPrivateEndpointConnectionData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(PrivateEndpoint)) @@ -72,22 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writ writer.WriteStringValue(ProvisioningState); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } CosmosDBPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBPrivateLinkResourceData.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBPrivateLinkResourceData.Serialization.cs index e9aeeaf9c0b9..cd3375a5c1b7 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBPrivateLinkResourceData.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBPrivateLinkResourceData.Serialization.cs @@ -21,6 +21,15 @@ public partial class CosmosDBPrivateLinkResourceData : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,27 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(CosmosDBPrivateLinkResourceData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(GroupId)) @@ -77,22 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } CosmosDBPrivateLinkResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBServiceData.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBServiceData.Serialization.cs index a8209784bcff..c654cde9bf78 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBServiceData.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBServiceData.Serialization.cs @@ -21,6 +21,15 @@ public partial class CosmosDBServiceData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,48 +37,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(CosmosDBServiceData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); writer.WriteObjectValue(Properties, options); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } CosmosDBServiceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlClientEncryptionKeyData.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlClientEncryptionKeyData.Serialization.cs index a5b6f4b70b71..97324b0a9b94 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlClientEncryptionKeyData.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlClientEncryptionKeyData.Serialization.cs @@ -21,6 +21,15 @@ public partial class CosmosDBSqlClientEncryptionKeyData : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,27 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(CosmosDBSqlClientEncryptionKeyData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Resource)) @@ -57,22 +46,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteObjectValue(Resource, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } CosmosDBSqlClientEncryptionKeyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlContainerData.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlContainerData.Serialization.cs index 9b42f5b0caed..005a2be0d125 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlContainerData.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlContainerData.Serialization.cs @@ -22,6 +22,15 @@ public partial class CosmosDBSqlContainerData : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -29,46 +38,13 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(CosmosDBSqlContainerData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; JsonSerializer.Serialize(writer, Identity, serializeOptions); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Resource)) @@ -82,22 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead writer.WriteObjectValue(Options, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } CosmosDBSqlContainerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlDatabaseData.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlDatabaseData.Serialization.cs index db802a7149d8..390dd4463fc0 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlDatabaseData.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlDatabaseData.Serialization.cs @@ -22,6 +22,15 @@ public partial class CosmosDBSqlDatabaseData : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -29,46 +38,13 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(CosmosDBSqlDatabaseData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; JsonSerializer.Serialize(writer, Identity, serializeOptions); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Resource)) @@ -82,22 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade writer.WriteObjectValue(Options, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } CosmosDBSqlDatabaseData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlRoleAssignmentData.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlRoleAssignmentData.Serialization.cs index 9a5d23bc0aa5..1f4c945b4f6f 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlRoleAssignmentData.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlRoleAssignmentData.Serialization.cs @@ -20,6 +20,15 @@ public partial class CosmosDBSqlRoleAssignmentData : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(CosmosDBSqlRoleAssignmentData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(RoleDefinitionId)) @@ -66,22 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode writer.WriteStringValue(PrincipalId.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } CosmosDBSqlRoleAssignmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlRoleDefinitionData.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlRoleDefinitionData.Serialization.cs index 9290af21d81a..01ea8f076d57 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlRoleDefinitionData.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlRoleDefinitionData.Serialization.cs @@ -22,6 +22,15 @@ public partial class CosmosDBSqlRoleDefinitionData : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -29,27 +38,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(CosmosDBSqlRoleDefinitionData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(RoleName)) @@ -83,22 +72,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } CosmosDBSqlRoleDefinitionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlStoredProcedureData.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlStoredProcedureData.Serialization.cs index d7b1c42b674b..2370f9e1be87 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlStoredProcedureData.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlStoredProcedureData.Serialization.cs @@ -22,6 +22,15 @@ public partial class CosmosDBSqlStoredProcedureData : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -29,46 +38,13 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(CosmosDBSqlStoredProcedureData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; JsonSerializer.Serialize(writer, Identity, serializeOptions); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Resource)) @@ -77,22 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod writer.WriteObjectValue(Resource, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } CosmosDBSqlStoredProcedureData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlTriggerData.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlTriggerData.Serialization.cs index f7ac7a840113..5a1797357e81 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlTriggerData.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlTriggerData.Serialization.cs @@ -22,6 +22,15 @@ public partial class CosmosDBSqlTriggerData : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -29,46 +38,13 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(CosmosDBSqlTriggerData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; JsonSerializer.Serialize(writer, Identity, serializeOptions); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Resource)) @@ -77,22 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader writer.WriteObjectValue(Resource, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } CosmosDBSqlTriggerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlUserDefinedFunctionData.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlUserDefinedFunctionData.Serialization.cs index 089a5bc8ef35..c774f7620b96 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlUserDefinedFunctionData.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlUserDefinedFunctionData.Serialization.cs @@ -22,6 +22,15 @@ public partial class CosmosDBSqlUserDefinedFunctionData : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -29,46 +38,13 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(CosmosDBSqlUserDefinedFunctionData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; JsonSerializer.Serialize(writer, Identity, serializeOptions); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Resource)) @@ -77,22 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteObjectValue(Resource, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } CosmosDBSqlUserDefinedFunctionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBTableData.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBTableData.Serialization.cs index b4b14ebd0d88..725b45b0b7cd 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBTableData.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBTableData.Serialization.cs @@ -22,6 +22,15 @@ public partial class CosmosDBTableData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -29,46 +38,13 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(CosmosDBTableData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; JsonSerializer.Serialize(writer, Identity, serializeOptions); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Resource)) @@ -82,22 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite writer.WriteObjectValue(Options, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } CosmosDBTableData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBThroughputPoolAccountData.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBThroughputPoolAccountData.Serialization.cs index 52478831ea40..c7981782b019 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBThroughputPoolAccountData.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBThroughputPoolAccountData.Serialization.cs @@ -21,6 +21,15 @@ public partial class CosmosDBThroughputPoolAccountData : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,27 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(CosmosDBThroughputPoolAccountData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(ProvisioningState)) @@ -72,22 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteStringValue(AccountInstanceId); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } CosmosDBThroughputPoolAccountData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBThroughputPoolData.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBThroughputPoolData.Serialization.cs index 25017af2cfb9..8efb9d1add78 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBThroughputPoolData.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBThroughputPoolData.Serialization.cs @@ -22,6 +22,15 @@ public partial class CosmosDBThroughputPoolData : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -29,40 +38,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(CosmosDBThroughputPoolData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(ProvisioningState)) @@ -76,22 +52,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe writer.WriteNumberValue(MaxThroughput.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } CosmosDBThroughputPoolData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/DataTransferJobGetResultData.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/DataTransferJobGetResultData.Serialization.cs index 1cfeffb56917..a698d8d2dd8e 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/DataTransferJobGetResultData.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/DataTransferJobGetResultData.Serialization.cs @@ -21,6 +21,15 @@ public partial class DataTransferJobGetResultData : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,27 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(DataTransferJobGetResultData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(JobName)) @@ -107,22 +96,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model writer.WriteStringValue(Mode.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } DataTransferJobGetResultData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/GraphResourceGetResultData.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/GraphResourceGetResultData.Serialization.cs index 7a2d7010da26..8515677a3191 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/GraphResourceGetResultData.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/GraphResourceGetResultData.Serialization.cs @@ -23,6 +23,15 @@ public partial class GraphResourceGetResultData : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -30,46 +39,13 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(GraphResourceGetResultData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; JsonSerializer.Serialize(writer, Identity, serializeOptions); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Resource)) @@ -83,22 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe writer.WriteObjectValue(Options, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } GraphResourceGetResultData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/GremlinDatabaseData.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/GremlinDatabaseData.Serialization.cs index 14949bb6f7b6..004ed6405666 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/GremlinDatabaseData.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/GremlinDatabaseData.Serialization.cs @@ -22,6 +22,15 @@ public partial class GremlinDatabaseData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -29,46 +38,13 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(GremlinDatabaseData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; JsonSerializer.Serialize(writer, Identity, serializeOptions); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Resource)) @@ -82,22 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri writer.WriteObjectValue(Options, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } GremlinDatabaseData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/GremlinGraphData.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/GremlinGraphData.Serialization.cs index 21dac0e3f4ae..a7c49307ed24 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/GremlinGraphData.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/GremlinGraphData.Serialization.cs @@ -22,6 +22,15 @@ public partial class GremlinGraphData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -29,46 +38,13 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(GremlinGraphData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; JsonSerializer.Serialize(writer, Identity, serializeOptions); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Resource)) @@ -82,22 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter writer.WriteObjectValue(Options, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } GremlinGraphData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/AccessRule.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/AccessRule.Serialization.cs index c92851b175a9..0cc1c9822add 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/AccessRule.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/AccessRule.Serialization.cs @@ -19,6 +19,15 @@ public partial class AccessRule : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOption throw new FormatException($"The model {nameof(AccessRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOption #endif } } - writer.WriteEndObject(); } AccessRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/AccessRuleProperties.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/AccessRuleProperties.Serialization.cs index cd897a3892f0..e7c72c057924 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/AccessRuleProperties.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/AccessRuleProperties.Serialization.cs @@ -21,6 +21,15 @@ public partial class AccessRuleProperties : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,7 +37,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(AccessRuleProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Direction)) { writer.WritePropertyName("direction"u8); @@ -109,7 +117,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } AccessRuleProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/AccountKeyMetadata.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/AccountKeyMetadata.Serialization.cs index e778ac3f9c07..cd8c9469e4d7 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/AccountKeyMetadata.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/AccountKeyMetadata.Serialization.cs @@ -19,6 +19,15 @@ internal partial class AccountKeyMetadata : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(AccountKeyMetadata)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(GeneratedOn)) { writer.WritePropertyName("generationTime"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } AccountKeyMetadata IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/AnalyticalStorageConfiguration.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/AnalyticalStorageConfiguration.Serialization.cs index 97f4ada05f0e..233a7f33871b 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/AnalyticalStorageConfiguration.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/AnalyticalStorageConfiguration.Serialization.cs @@ -19,6 +19,15 @@ internal partial class AnalyticalStorageConfiguration : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(AnalyticalStorageConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(SchemaType)) { writer.WritePropertyName("schemaType"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } AnalyticalStorageConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ApiProperties.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ApiProperties.Serialization.cs index 21b01a80fb73..dd6d20cef0c3 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ApiProperties.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ApiProperties.Serialization.cs @@ -19,6 +19,15 @@ internal partial class ApiProperties : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt throw new FormatException($"The model {nameof(ApiProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ServerVersion)) { writer.WritePropertyName("serverVersion"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt #endif } } - writer.WriteEndObject(); } ApiProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/AuthenticationMethodLdapProperties.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/AuthenticationMethodLdapProperties.Serialization.cs index fff48ef148ac..09c01bf291b9 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/AuthenticationMethodLdapProperties.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/AuthenticationMethodLdapProperties.Serialization.cs @@ -20,6 +20,15 @@ public partial class AuthenticationMethodLdapProperties : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(AuthenticationMethodLdapProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ServerHostname)) { writer.WritePropertyName("serverHostname"u8); @@ -88,7 +96,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } AuthenticationMethodLdapProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/AutoUpgradePolicyResourceInfo.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/AutoUpgradePolicyResourceInfo.Serialization.cs index 73b90e7dc050..7a5c0bb71fdb 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/AutoUpgradePolicyResourceInfo.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/AutoUpgradePolicyResourceInfo.Serialization.cs @@ -19,6 +19,15 @@ internal partial class AutoUpgradePolicyResourceInfo : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(AutoUpgradePolicyResourceInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ThroughputPolicy)) { writer.WritePropertyName("throughputPolicy"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } AutoUpgradePolicyResourceInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/AutoscaleSettings.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/AutoscaleSettings.Serialization.cs index 953d1327b62d..4ef18110a237 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/AutoscaleSettings.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/AutoscaleSettings.Serialization.cs @@ -19,6 +19,15 @@ internal partial class AutoscaleSettings : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(AutoscaleSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(MaxThroughput)) { writer.WritePropertyName("maxThroughput"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } AutoscaleSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/AutoscaleSettingsResourceInfo.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/AutoscaleSettingsResourceInfo.Serialization.cs index 6de45420c7ce..b8a1df73577f 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/AutoscaleSettingsResourceInfo.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/AutoscaleSettingsResourceInfo.Serialization.cs @@ -19,6 +19,15 @@ public partial class AutoscaleSettingsResourceInfo : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(AutoscaleSettingsResourceInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("maxThroughput"u8); writer.WriteNumberValue(MaxThroughput); if (Optional.IsDefined(AutoUpgradePolicy)) @@ -54,7 +62,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } AutoscaleSettingsResourceInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/AzureBlobDataTransferDataSourceSink.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/AzureBlobDataTransferDataSourceSink.Serialization.cs index a7dfdd43049e..1c55b637ec67 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/AzureBlobDataTransferDataSourceSink.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/AzureBlobDataTransferDataSourceSink.Serialization.cs @@ -19,6 +19,15 @@ public partial class AzureBlobDataTransferDataSourceSink : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(AzureBlobDataTransferDataSourceSink)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("containerName"u8); writer.WriteStringValue(ContainerName); if (Optional.IsDefined(EndpointUri)) @@ -34,24 +43,6 @@ void IJsonModel.Write(Utf8JsonWriter writer writer.WritePropertyName("endpointUrl"u8); writer.WriteStringValue(EndpointUri.AbsoluteUri); } - writer.WritePropertyName("component"u8); - writer.WriteStringValue(Component.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } AzureBlobDataTransferDataSourceSink IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/BackupPolicyMigrationState.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/BackupPolicyMigrationState.Serialization.cs index 6a8c812c76f5..1550d0c250eb 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/BackupPolicyMigrationState.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/BackupPolicyMigrationState.Serialization.cs @@ -19,6 +19,15 @@ public partial class BackupPolicyMigrationState : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(BackupPolicyMigrationState)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Status)) { writer.WritePropertyName("status"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } BackupPolicyMigrationState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/BaseCosmosDataTransferDataSourceSink.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/BaseCosmosDataTransferDataSourceSink.Serialization.cs index 45fe531a8667..d4f74b855192 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/BaseCosmosDataTransferDataSourceSink.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/BaseCosmosDataTransferDataSourceSink.Serialization.cs @@ -19,6 +19,15 @@ public partial class BaseCosmosDataTransferDataSourceSink : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,30 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(BaseCosmosDataTransferDataSourceSink)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(RemoteAccountName)) { writer.WritePropertyName("remoteAccountName"u8); writer.WriteStringValue(RemoteAccountName); } - writer.WritePropertyName("component"u8); - writer.WriteStringValue(Component.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } BaseCosmosDataTransferDataSourceSink IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CapacityModeChangeTransitionState.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CapacityModeChangeTransitionState.Serialization.cs index db4ddb606122..612a2fd889e1 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CapacityModeChangeTransitionState.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CapacityModeChangeTransitionState.Serialization.cs @@ -19,6 +19,15 @@ public partial class CapacityModeChangeTransitionState : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(CapacityModeChangeTransitionState)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(CapacityModeTransitionStatus)) { writer.WritePropertyName("capacityModeTransitionStatus"u8); @@ -72,7 +80,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } CapacityModeChangeTransitionState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraCertificate.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraCertificate.Serialization.cs index 19a8e81d7233..13495324e5ca 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraCertificate.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraCertificate.Serialization.cs @@ -19,6 +19,15 @@ public partial class CassandraCertificate : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(CassandraCertificate)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Pem)) { writer.WritePropertyName("pem"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } CassandraCertificate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraClusterBackupResourceInfo.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraClusterBackupResourceInfo.Serialization.cs index fa718e7abcd9..34f1433d5c5f 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraClusterBackupResourceInfo.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraClusterBackupResourceInfo.Serialization.cs @@ -19,6 +19,15 @@ public partial class CassandraClusterBackupResourceInfo : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(CassandraClusterBackupResourceInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(BackupId)) { writer.WritePropertyName("backupId"u8); @@ -67,7 +75,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } CassandraClusterBackupResourceInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraClusterBackupSchedule.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraClusterBackupSchedule.Serialization.cs index 5312824b9616..000d5f5dd78c 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraClusterBackupSchedule.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraClusterBackupSchedule.Serialization.cs @@ -19,6 +19,15 @@ public partial class CassandraClusterBackupSchedule : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(CassandraClusterBackupSchedule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ScheduleName)) { writer.WritePropertyName("scheduleName"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } CassandraClusterBackupSchedule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraClusterCommand.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraClusterCommand.Serialization.cs index f1401c33c3ed..8964be1de3a9 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraClusterCommand.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraClusterCommand.Serialization.cs @@ -19,6 +19,15 @@ public partial class CassandraClusterCommand : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(CassandraClusterCommand)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Command)) { writer.WritePropertyName("command"u8); @@ -99,7 +107,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } CassandraClusterCommand IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraClusterDataCenterNodeItem.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraClusterDataCenterNodeItem.Serialization.cs index 41539485aace..3960a57cad6f 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraClusterDataCenterNodeItem.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraClusterDataCenterNodeItem.Serialization.cs @@ -20,6 +20,15 @@ public partial class CassandraClusterDataCenterNodeItem : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(CassandraClusterDataCenterNodeItem)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Address)) { writer.WritePropertyName("address"u8); @@ -138,7 +146,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } CassandraClusterDataCenterNodeItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraClusterKey.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraClusterKey.Serialization.cs index 0a90c280f48c..fa2f4cdba1f1 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraClusterKey.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraClusterKey.Serialization.cs @@ -19,6 +19,15 @@ public partial class CassandraClusterKey : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(CassandraClusterKey)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } CassandraClusterKey IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraClusterListResult.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraClusterListResult.Serialization.cs index 7aed35e4be3a..78d3705633d1 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraClusterListResult.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraClusterListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class CassandraClusterListResult : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(CassandraClusterListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } CassandraClusterListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraClusterProperties.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraClusterProperties.Serialization.cs index 477cf23bd823..f3a749d257b1 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraClusterProperties.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraClusterProperties.Serialization.cs @@ -20,6 +20,15 @@ public partial class CassandraClusterProperties : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(CassandraClusterProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ProvisioningState)) { writer.WritePropertyName("provisioningState"u8); @@ -213,7 +221,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } CassandraClusterProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraClusterPublicStatus.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraClusterPublicStatus.Serialization.cs index 4ea42e176a78..dea56815aaa3 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraClusterPublicStatus.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraClusterPublicStatus.Serialization.cs @@ -20,6 +20,15 @@ public partial class CassandraClusterPublicStatus : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(CassandraClusterPublicStatus)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ETag)) { writer.WritePropertyName("eTag"u8); @@ -83,7 +91,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } CassandraClusterPublicStatus IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraClusterPublicStatusDataCentersItem.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraClusterPublicStatusDataCentersItem.Serialization.cs index f6f8e6f6f567..fbef6c03ac2a 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraClusterPublicStatusDataCentersItem.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraClusterPublicStatusDataCentersItem.Serialization.cs @@ -20,6 +20,15 @@ public partial class CassandraClusterPublicStatusDataCentersItem : IUtf8JsonSeri void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWrite throw new FormatException($"The model {nameof(CassandraClusterPublicStatusDataCentersItem)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -68,7 +76,6 @@ void IJsonModel.Write(Utf8JsonWrite #endif } } - writer.WriteEndObject(); } CassandraClusterPublicStatusDataCentersItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraColumn.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraColumn.Serialization.cs index f6040e564275..f1d345f5154e 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraColumn.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraColumn.Serialization.cs @@ -19,6 +19,15 @@ public partial class CassandraColumn : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(CassandraColumn)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO #endif } } - writer.WriteEndObject(); } CassandraColumn IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraCommandOutput.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraCommandOutput.Serialization.cs index c9597607a6d3..674158f36a25 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraCommandOutput.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraCommandOutput.Serialization.cs @@ -19,6 +19,15 @@ public partial class CassandraCommandOutput : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(CassandraCommandOutput)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(CommandOutput)) { writer.WritePropertyName("commandOutput"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } CassandraCommandOutput IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraCommandPostBody.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraCommandPostBody.Serialization.cs index 58ba02e0e5a9..472d70f5090c 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraCommandPostBody.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraCommandPostBody.Serialization.cs @@ -18,6 +18,15 @@ public partial class CassandraCommandPostBody : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(CassandraCommandPostBody)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("command"u8); writer.WriteStringValue(Command); if (Optional.IsCollectionDefined(Arguments)) @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } CassandraCommandPostBody IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraConnectionError.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraConnectionError.Serialization.cs index 2ac78aca35fb..142aaf95155a 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraConnectionError.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraConnectionError.Serialization.cs @@ -19,6 +19,15 @@ public partial class CassandraConnectionError : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(CassandraConnectionError)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ConnectionState)) { writer.WritePropertyName("connectionState"u8); @@ -67,7 +75,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } CassandraConnectionError IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraDataCenterListResult.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraDataCenterListResult.Serialization.cs index f1b9efbc9a76..7086ec8d6278 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraDataCenterListResult.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraDataCenterListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class CassandraDataCenterListResult : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(CassandraDataCenterListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } CassandraDataCenterListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraDataCenterProperties.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraDataCenterProperties.Serialization.cs index 6eadbe6ec165..86973ff0858a 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraDataCenterProperties.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraDataCenterProperties.Serialization.cs @@ -20,6 +20,15 @@ public partial class CassandraDataCenterProperties : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(CassandraDataCenterProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ProvisioningState)) { writer.WritePropertyName("provisioningState"u8); @@ -128,7 +136,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } CassandraDataCenterProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraDataCenterSeedNode.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraDataCenterSeedNode.Serialization.cs index 64ed4585e353..557f982416e4 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraDataCenterSeedNode.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraDataCenterSeedNode.Serialization.cs @@ -19,6 +19,15 @@ public partial class CassandraDataCenterSeedNode : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(CassandraDataCenterSeedNode)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IPAddress)) { writer.WritePropertyName("ipAddress"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } CassandraDataCenterSeedNode IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraError.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraError.Serialization.cs index 2be5198a4797..ef1ffd706ac8 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraError.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraError.Serialization.cs @@ -19,6 +19,15 @@ public partial class CassandraError : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(CassandraError)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Code)) { writer.WritePropertyName("code"u8); @@ -62,7 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp #endif } } - writer.WriteEndObject(); } CassandraError IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraKeyspaceCreateOrUpdateContent.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraKeyspaceCreateOrUpdateContent.Serialization.cs index 6e1f2937fc84..73e8526ea2ba 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraKeyspaceCreateOrUpdateContent.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraKeyspaceCreateOrUpdateContent.Serialization.cs @@ -21,6 +21,15 @@ public partial class CassandraKeyspaceCreateOrUpdateContent : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,46 +37,13 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(CassandraKeyspaceCreateOrUpdateContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; JsonSerializer.Serialize(writer, Identity, serializeOptions); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); writer.WritePropertyName("resource"u8); @@ -78,22 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter wri writer.WriteObjectValue(Options, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } CassandraKeyspaceCreateOrUpdateContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraKeyspaceListResult.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraKeyspaceListResult.Serialization.cs index 3ac82f12c82c..a5b66884c1a1 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraKeyspaceListResult.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraKeyspaceListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class CassandraKeyspaceListResult : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(CassandraKeyspaceListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } CassandraKeyspaceListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraKeyspacePropertiesConfig.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraKeyspacePropertiesConfig.Serialization.cs index 65377cd7a16b..ade9530fb4d1 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraKeyspacePropertiesConfig.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraKeyspacePropertiesConfig.Serialization.cs @@ -19,6 +19,15 @@ public partial class CassandraKeyspacePropertiesConfig : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,33 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(CassandraKeyspacePropertiesConfig)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(Throughput)) - { - writer.WritePropertyName("throughput"u8); - writer.WriteNumberValue(Throughput.Value); - } - if (Optional.IsDefined(AutoscaleSettings)) - { - writer.WritePropertyName("autoscaleSettings"u8); - writer.WriteObjectValue(AutoscaleSettings, options); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } CassandraKeyspacePropertiesConfig IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraKeyspaceResourceInfo.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraKeyspaceResourceInfo.Serialization.cs index 64a1da95c0f8..4959798fac1f 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraKeyspaceResourceInfo.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraKeyspaceResourceInfo.Serialization.cs @@ -19,6 +19,15 @@ public partial class CassandraKeyspaceResourceInfo : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(CassandraKeyspaceResourceInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("id"u8); writer.WriteStringValue(KeyspaceName); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -44,7 +52,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } CassandraKeyspaceResourceInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraPartitionKey.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraPartitionKey.Serialization.cs index 4f3d8507c991..26cf93119470 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraPartitionKey.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraPartitionKey.Serialization.cs @@ -19,6 +19,15 @@ public partial class CassandraPartitionKey : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(CassandraPartitionKey)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } CassandraPartitionKey IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraReaperStatus.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraReaperStatus.Serialization.cs index f884afb8ebd5..6baf759918b3 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraReaperStatus.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraReaperStatus.Serialization.cs @@ -20,6 +20,15 @@ public partial class CassandraReaperStatus : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(CassandraReaperStatus)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IsHealthy)) { writer.WritePropertyName("healthy"u8); @@ -70,7 +78,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } CassandraReaperStatus IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraSchema.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraSchema.Serialization.cs index 4c4e54730a7e..2ec62449f271 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraSchema.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraSchema.Serialization.cs @@ -20,6 +20,15 @@ public partial class CassandraSchema : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(CassandraSchema)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Columns)) { writer.WritePropertyName("columns"u8); @@ -73,7 +81,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO #endif } } - writer.WriteEndObject(); } CassandraSchema IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraTableCreateOrUpdateContent.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraTableCreateOrUpdateContent.Serialization.cs index 1ae0e1ea253a..f43158ba1e47 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraTableCreateOrUpdateContent.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraTableCreateOrUpdateContent.Serialization.cs @@ -21,6 +21,15 @@ public partial class CassandraTableCreateOrUpdateContent : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,46 +37,13 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(CassandraTableCreateOrUpdateContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; JsonSerializer.Serialize(writer, Identity, serializeOptions); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); writer.WritePropertyName("resource"u8); @@ -78,22 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer writer.WriteObjectValue(Options, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } CassandraTableCreateOrUpdateContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraTableListResult.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraTableListResult.Serialization.cs index c18ead2dea09..485294f91f28 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraTableListResult.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraTableListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class CassandraTableListResult : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(CassandraTableListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } CassandraTableListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraTablePropertiesConfig.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraTablePropertiesConfig.Serialization.cs index 50379824a799..3f9d7ab29e66 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraTablePropertiesConfig.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraTablePropertiesConfig.Serialization.cs @@ -19,6 +19,15 @@ public partial class CassandraTablePropertiesConfig : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,33 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(CassandraTablePropertiesConfig)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(Throughput)) - { - writer.WritePropertyName("throughput"u8); - writer.WriteNumberValue(Throughput.Value); - } - if (Optional.IsDefined(AutoscaleSettings)) - { - writer.WritePropertyName("autoscaleSettings"u8); - writer.WriteObjectValue(AutoscaleSettings, options); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } CassandraTablePropertiesConfig IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraTableResourceInfo.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraTableResourceInfo.Serialization.cs index 5e471aab20dd..84ef8c9c25e1 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraTableResourceInfo.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraTableResourceInfo.Serialization.cs @@ -19,6 +19,15 @@ public partial class CassandraTableResourceInfo : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(CassandraTableResourceInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("id"u8); writer.WriteStringValue(TableName); if (Optional.IsDefined(DefaultTtl)) @@ -59,7 +67,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } CassandraTableResourceInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraViewGetPropertiesOptions.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraViewGetPropertiesOptions.Serialization.cs index f8540c148381..ff38532d3c31 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraViewGetPropertiesOptions.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraViewGetPropertiesOptions.Serialization.cs @@ -19,6 +19,15 @@ public partial class CassandraViewGetPropertiesOptions : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,33 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(CassandraViewGetPropertiesOptions)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(Throughput)) - { - writer.WritePropertyName("throughput"u8); - writer.WriteNumberValue(Throughput.Value); - } - if (Optional.IsDefined(AutoscaleSettings)) - { - writer.WritePropertyName("autoscaleSettings"u8); - writer.WriteObjectValue(AutoscaleSettings, options); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } CassandraViewGetPropertiesOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraViewGetPropertiesResource.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraViewGetPropertiesResource.Serialization.cs index 66002ffbc000..2a0290b15fda 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraViewGetPropertiesResource.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraViewGetPropertiesResource.Serialization.cs @@ -19,6 +19,15 @@ public partial class CassandraViewGetPropertiesResource : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(CassandraViewGetPropertiesResource)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(Rid)) { writer.WritePropertyName("_rid"u8); @@ -42,26 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WritePropertyName("_etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - writer.WritePropertyName("viewDefinition"u8); - writer.WriteStringValue(ViewDefinition); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } CassandraViewGetPropertiesResource IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraViewGetResultCreateOrUpdateContent.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraViewGetResultCreateOrUpdateContent.Serialization.cs index a7faa3184ab9..5d69dedeafce 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraViewGetResultCreateOrUpdateContent.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraViewGetResultCreateOrUpdateContent.Serialization.cs @@ -21,6 +21,15 @@ public partial class CassandraViewGetResultCreateOrUpdateContent : IUtf8JsonSeri void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,46 +37,13 @@ void IJsonModel.Write(Utf8JsonWrite throw new FormatException($"The model {nameof(CassandraViewGetResultCreateOrUpdateContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; JsonSerializer.Serialize(writer, Identity, serializeOptions); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); writer.WritePropertyName("resource"u8); @@ -78,22 +54,6 @@ void IJsonModel.Write(Utf8JsonWrite writer.WriteObjectValue(Options, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } CassandraViewGetResultCreateOrUpdateContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraViewListResult.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraViewListResult.Serialization.cs index f6147d64a37b..1641028a48f8 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraViewListResult.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraViewListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class CassandraViewListResult : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(CassandraViewListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } CassandraViewListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraViewResource.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraViewResource.Serialization.cs index dce1d590180d..2e475f84b183 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraViewResource.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraViewResource.Serialization.cs @@ -19,6 +19,15 @@ public partial class CassandraViewResource : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(CassandraViewResource)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("id"u8); writer.WriteStringValue(Id); writer.WritePropertyName("viewDefinition"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } CassandraViewResource IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ClientEncryptionKeysListResult.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ClientEncryptionKeysListResult.Serialization.cs index 972da124150c..0b8f42ed90d1 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ClientEncryptionKeysListResult.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ClientEncryptionKeysListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class ClientEncryptionKeysListResult : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(ClientEncryptionKeysListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } ClientEncryptionKeysListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ComputedProperty.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ComputedProperty.Serialization.cs index 40f5f5d6d9b3..93969769e691 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ComputedProperty.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ComputedProperty.Serialization.cs @@ -19,6 +19,15 @@ public partial class ComputedProperty : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(ComputedProperty)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } ComputedProperty IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ConflictResolutionPolicy.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ConflictResolutionPolicy.Serialization.cs index ef438c79c00c..223a4c64b7c9 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ConflictResolutionPolicy.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ConflictResolutionPolicy.Serialization.cs @@ -19,6 +19,15 @@ public partial class ConflictResolutionPolicy : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(ConflictResolutionPolicy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Mode)) { writer.WritePropertyName("mode"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } ConflictResolutionPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ConsistencyPolicy.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ConsistencyPolicy.Serialization.cs index c64ed420823e..4d2f5d29a501 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ConsistencyPolicy.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ConsistencyPolicy.Serialization.cs @@ -19,6 +19,15 @@ public partial class ConsistencyPolicy : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(ConsistencyPolicy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("defaultConsistencyLevel"u8); writer.WriteStringValue(DefaultConsistencyLevel.ToSerialString()); if (Optional.IsDefined(MaxStalenessPrefix)) @@ -54,7 +62,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } ConsistencyPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ContinuousBackupInformation.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ContinuousBackupInformation.Serialization.cs index ea04c1a0f724..d517616fe765 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ContinuousBackupInformation.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ContinuousBackupInformation.Serialization.cs @@ -19,6 +19,15 @@ internal partial class ContinuousBackupInformation : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(ContinuousBackupInformation)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(LatestRestorableTimestamp)) { writer.WritePropertyName("latestRestorableTimestamp"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } ContinuousBackupInformation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ContinuousBackupRestoreLocation.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ContinuousBackupRestoreLocation.Serialization.cs index 72553090f026..69c51d6f836c 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ContinuousBackupRestoreLocation.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ContinuousBackupRestoreLocation.Serialization.cs @@ -18,6 +18,15 @@ public partial class ContinuousBackupRestoreLocation : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(ContinuousBackupRestoreLocation)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Location)) { writer.WritePropertyName("location"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } ContinuousBackupRestoreLocation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ContinuousModeBackupPolicy.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ContinuousModeBackupPolicy.Serialization.cs index 21f35e39d08f..c7bb38e76196 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ContinuousModeBackupPolicy.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ContinuousModeBackupPolicy.Serialization.cs @@ -19,6 +19,15 @@ public partial class ContinuousModeBackupPolicy : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,35 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(ContinuousModeBackupPolicy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(ContinuousModeProperties)) { writer.WritePropertyName("continuousModeProperties"u8); writer.WriteObjectValue(ContinuousModeProperties, options); } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(BackupPolicyType.ToString()); - if (Optional.IsDefined(MigrationState)) - { - writer.WritePropertyName("migrationState"u8); - writer.WriteObjectValue(MigrationState, options); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ContinuousModeBackupPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ContinuousModeProperties.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ContinuousModeProperties.Serialization.cs index 615fad5160fd..dece046ae081 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ContinuousModeProperties.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ContinuousModeProperties.Serialization.cs @@ -19,6 +19,15 @@ internal partial class ContinuousModeProperties : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(ContinuousModeProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Tier)) { writer.WritePropertyName("tier"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } ContinuousModeProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosCassandraDataTransferDataSourceSink.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosCassandraDataTransferDataSourceSink.Serialization.cs index 8a8a6a3ad091..b778484ea44c 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosCassandraDataTransferDataSourceSink.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosCassandraDataTransferDataSourceSink.Serialization.cs @@ -19,6 +19,15 @@ public partial class CosmosCassandraDataTransferDataSourceSink : IUtf8JsonSerial void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,34 +35,11 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(CosmosCassandraDataTransferDataSourceSink)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("keyspaceName"u8); writer.WriteStringValue(KeyspaceName); writer.WritePropertyName("tableName"u8); writer.WriteStringValue(TableName); - if (Optional.IsDefined(RemoteAccountName)) - { - writer.WritePropertyName("remoteAccountName"u8); - writer.WriteStringValue(RemoteAccountName); - } - writer.WritePropertyName("component"u8); - writer.WriteStringValue(Component.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } CosmosCassandraDataTransferDataSourceSink IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBAccountBackupPolicy.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBAccountBackupPolicy.Serialization.cs index 0efd4410921f..398414b8c4d1 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBAccountBackupPolicy.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBAccountBackupPolicy.Serialization.cs @@ -20,6 +20,15 @@ public partial class CosmosDBAccountBackupPolicy : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(CosmosDBAccountBackupPolicy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("type"u8); writer.WriteStringValue(BackupPolicyType.ToString()); if (Optional.IsDefined(MigrationState)) @@ -50,7 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } CosmosDBAccountBackupPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBAccountCapability.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBAccountCapability.Serialization.cs index 335d543fc863..8b3f94c9c879 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBAccountCapability.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBAccountCapability.Serialization.cs @@ -19,6 +19,15 @@ public partial class CosmosDBAccountCapability : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(CosmosDBAccountCapability)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } CosmosDBAccountCapability IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBAccountCapacity.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBAccountCapacity.Serialization.cs index d2ea1a3c81c7..52fc7f6ad534 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBAccountCapacity.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBAccountCapacity.Serialization.cs @@ -19,6 +19,15 @@ internal partial class CosmosDBAccountCapacity : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(CosmosDBAccountCapacity)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(TotalThroughputLimit)) { writer.WritePropertyName("totalThroughputLimit"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } CosmosDBAccountCapacity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBAccountConnectionString.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBAccountConnectionString.Serialization.cs index ce14bfc307d4..8ece2d9d674c 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBAccountConnectionString.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBAccountConnectionString.Serialization.cs @@ -19,6 +19,15 @@ public partial class CosmosDBAccountConnectionString : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(CosmosDBAccountConnectionString)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ConnectionString)) { writer.WritePropertyName("connectionString"u8); @@ -62,7 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } CosmosDBAccountConnectionString IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBAccountCorsPolicy.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBAccountCorsPolicy.Serialization.cs index d3f13e29cd88..dd48f0974a39 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBAccountCorsPolicy.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBAccountCorsPolicy.Serialization.cs @@ -19,6 +19,15 @@ public partial class CosmosDBAccountCorsPolicy : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(CosmosDBAccountCorsPolicy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("allowedOrigins"u8); writer.WriteStringValue(AllowedOrigins); if (Optional.IsDefined(AllowedMethods)) @@ -64,7 +72,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } CosmosDBAccountCorsPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBAccountCreateOrUpdateContent.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBAccountCreateOrUpdateContent.Serialization.cs index e46744332f7c..ac5a45046677 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBAccountCreateOrUpdateContent.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBAccountCreateOrUpdateContent.Serialization.cs @@ -21,6 +21,15 @@ public partial class CosmosDBAccountCreateOrUpdateContent : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,7 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(CosmosDBAccountCreateOrUpdateContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Kind)) { writer.WritePropertyName("kind"u8); @@ -40,39 +49,6 @@ void IJsonModel.Write(Utf8JsonWriter write var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; JsonSerializer.Serialize(writer, Identity, serializeOptions); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(ConsistencyPolicy)) @@ -295,22 +271,6 @@ void IJsonModel.Write(Utf8JsonWriter write writer.WriteBooleanValue(EnablePerRegionPerPartitionAutoscale.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } CosmosDBAccountCreateOrUpdateContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBAccountKeyList.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBAccountKeyList.Serialization.cs index dd75819b8277..5e3bba2b1ca9 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBAccountKeyList.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBAccountKeyList.Serialization.cs @@ -19,6 +19,15 @@ public partial class CosmosDBAccountKeyList : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(CosmosDBAccountKeyList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(PrimaryMasterKey)) { writer.WritePropertyName("primaryMasterKey"u8); @@ -37,32 +46,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader writer.WritePropertyName("secondaryMasterKey"u8); writer.WriteStringValue(SecondaryMasterKey); } - if (options.Format != "W" && Optional.IsDefined(PrimaryReadonlyMasterKey)) - { - writer.WritePropertyName("primaryReadonlyMasterKey"u8); - writer.WriteStringValue(PrimaryReadonlyMasterKey); - } - if (options.Format != "W" && Optional.IsDefined(SecondaryReadonlyMasterKey)) - { - writer.WritePropertyName("secondaryReadonlyMasterKey"u8); - writer.WriteStringValue(SecondaryReadonlyMasterKey); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } CosmosDBAccountKeyList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBAccountLocation.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBAccountLocation.Serialization.cs index 143646769232..933db923aa3b 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBAccountLocation.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBAccountLocation.Serialization.cs @@ -19,6 +19,15 @@ public partial class CosmosDBAccountLocation : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(CosmosDBAccountLocation)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -72,7 +80,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } CosmosDBAccountLocation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBAccountPatch.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBAccountPatch.Serialization.cs index 8112c3ba607c..8ee3d06654c1 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBAccountPatch.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBAccountPatch.Serialization.cs @@ -19,6 +19,15 @@ public partial class CosmosDBAccountPatch : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(CosmosDBAccountPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -277,7 +285,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } CosmosDBAccountPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBAccountReadOnlyKeyList.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBAccountReadOnlyKeyList.Serialization.cs index 22ed9fc8a2b0..28e7ee9b6153 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBAccountReadOnlyKeyList.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBAccountReadOnlyKeyList.Serialization.cs @@ -19,6 +19,15 @@ public partial class CosmosDBAccountReadOnlyKeyList : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(CosmosDBAccountReadOnlyKeyList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(PrimaryReadonlyMasterKey)) { writer.WritePropertyName("primaryReadonlyMasterKey"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } CosmosDBAccountReadOnlyKeyList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBAccountRegenerateKeyContent.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBAccountRegenerateKeyContent.Serialization.cs index b5c32d4f6472..36b28a45d8cc 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBAccountRegenerateKeyContent.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBAccountRegenerateKeyContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class CosmosDBAccountRegenerateKeyContent : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(CosmosDBAccountRegenerateKeyContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("keyKind"u8); writer.WriteStringValue(KeyKind.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } CosmosDBAccountRegenerateKeyContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBAccountRestoreParameters.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBAccountRestoreParameters.Serialization.cs index 7385cc676e8b..8767bfca33e7 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBAccountRestoreParameters.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBAccountRestoreParameters.Serialization.cs @@ -20,6 +20,15 @@ public partial class CosmosDBAccountRestoreParameters : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(CosmosDBAccountRestoreParameters)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(RestoreMode)) { writer.WritePropertyName("restoreMode"u8); @@ -68,37 +77,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M writer.WritePropertyName("sourceBackupLocation"u8); writer.WriteStringValue(SourceBackupLocation); } - if (Optional.IsDefined(RestoreSource)) - { - writer.WritePropertyName("restoreSource"u8); - writer.WriteStringValue(RestoreSource); - } - if (Optional.IsDefined(RestoreTimestampInUtc)) - { - writer.WritePropertyName("restoreTimestampInUtc"u8); - writer.WriteStringValue(RestoreTimestampInUtc.Value, "O"); - } - if (Optional.IsDefined(IsRestoreWithTtlDisabled)) - { - writer.WritePropertyName("restoreWithTtlDisabled"u8); - writer.WriteBooleanValue(IsRestoreWithTtlDisabled.Value); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } CosmosDBAccountRestoreParameters IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBBackupInformation.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBBackupInformation.Serialization.cs index 1b634124c714..fc243acd6cce 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBBackupInformation.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBBackupInformation.Serialization.cs @@ -19,6 +19,15 @@ public partial class CosmosDBBackupInformation : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(CosmosDBBackupInformation)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ContinuousBackupInformation)) { writer.WritePropertyName("continuousBackupInformation"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } CosmosDBBackupInformation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBBaseConfig.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBBaseConfig.Serialization.cs index ccb931bd19ef..eba63e36fed2 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBBaseConfig.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBBaseConfig.Serialization.cs @@ -19,6 +19,15 @@ public partial class CosmosDBBaseConfig : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(CosmosDBBaseConfig)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Throughput)) { writer.WritePropertyName("throughput"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } CosmosDBBaseConfig IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBBaseMetric.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBBaseMetric.Serialization.cs index a95609a02d8f..8662a5d22606 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBBaseMetric.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBBaseMetric.Serialization.cs @@ -20,6 +20,15 @@ public partial class CosmosDBBaseMetric : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(CosmosDBBaseMetric)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(StartOn)) { writer.WritePropertyName("startTime"u8); @@ -78,7 +86,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } CosmosDBBaseMetric IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBBaseUsage.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBBaseUsage.Serialization.cs index f6a880342df2..8e027dae2893 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBBaseUsage.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBBaseUsage.Serialization.cs @@ -19,6 +19,15 @@ public partial class CosmosDBBaseUsage : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(CosmosDBBaseUsage)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Unit)) { writer.WritePropertyName("unit"u8); @@ -67,7 +75,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } CosmosDBBaseUsage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBClientEncryptionIncludedPath.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBClientEncryptionIncludedPath.Serialization.cs index 8717e1a330a8..af05cd0c722c 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBClientEncryptionIncludedPath.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBClientEncryptionIncludedPath.Serialization.cs @@ -19,6 +19,15 @@ public partial class CosmosDBClientEncryptionIncludedPath : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(CosmosDBClientEncryptionIncludedPath)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("path"u8); writer.WriteStringValue(Path); writer.WritePropertyName("clientEncryptionKeyId"u8); @@ -50,7 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } CosmosDBClientEncryptionIncludedPath IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBClientEncryptionPolicy.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBClientEncryptionPolicy.Serialization.cs index 3aa6a1353f75..804cf0028711 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBClientEncryptionPolicy.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBClientEncryptionPolicy.Serialization.cs @@ -20,6 +20,15 @@ public partial class CosmosDBClientEncryptionPolicy : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(CosmosDBClientEncryptionPolicy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("includedPaths"u8); writer.WriteStartArray(); foreach (var item in IncludedPaths) @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } CosmosDBClientEncryptionPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBCompositePath.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBCompositePath.Serialization.cs index 9262aaf997bc..58e3a3b4d6ab 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBCompositePath.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBCompositePath.Serialization.cs @@ -19,6 +19,15 @@ public partial class CosmosDBCompositePath : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(CosmosDBCompositePath)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Path)) { writer.WritePropertyName("path"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } CosmosDBCompositePath IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBContainerPartitionKey.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBContainerPartitionKey.Serialization.cs index 49fc78eaae99..c39d5d2f4dcf 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBContainerPartitionKey.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBContainerPartitionKey.Serialization.cs @@ -20,6 +20,15 @@ public partial class CosmosDBContainerPartitionKey : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(CosmosDBContainerPartitionKey)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Paths)) { writer.WritePropertyName("paths"u8); @@ -68,7 +76,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } CosmosDBContainerPartitionKey IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBCreateUpdateConfig.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBCreateUpdateConfig.Serialization.cs index 1344f7fae2d9..52ad20fe7c1a 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBCreateUpdateConfig.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBCreateUpdateConfig.Serialization.cs @@ -19,6 +19,15 @@ public partial class CosmosDBCreateUpdateConfig : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(CosmosDBCreateUpdateConfig)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Throughput)) { writer.WritePropertyName("throughput"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } CosmosDBCreateUpdateConfig IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBErrorResult.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBErrorResult.Serialization.cs index df618d0989e8..377ddf33e6e0 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBErrorResult.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBErrorResult.Serialization.cs @@ -19,6 +19,15 @@ public partial class CosmosDBErrorResult : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(CosmosDBErrorResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Code)) { writer.WritePropertyName("code"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } CosmosDBErrorResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBExcludedPath.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBExcludedPath.Serialization.cs index ef3599ff4c0c..3b772ba354b6 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBExcludedPath.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBExcludedPath.Serialization.cs @@ -19,6 +19,15 @@ public partial class CosmosDBExcludedPath : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(CosmosDBExcludedPath)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Path)) { writer.WritePropertyName("path"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } CosmosDBExcludedPath IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBFailoverPolicies.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBFailoverPolicies.Serialization.cs index ef976e0e580c..dff425fabf06 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBFailoverPolicies.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBFailoverPolicies.Serialization.cs @@ -18,6 +18,15 @@ public partial class CosmosDBFailoverPolicies : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(CosmosDBFailoverPolicies)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("failoverPolicies"u8); writer.WriteStartArray(); foreach (var item in FailoverPolicies) @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } CosmosDBFailoverPolicies IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBFailoverPolicy.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBFailoverPolicy.Serialization.cs index afb06cae5699..2ebee1ec6411 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBFailoverPolicy.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBFailoverPolicy.Serialization.cs @@ -19,6 +19,15 @@ public partial class CosmosDBFailoverPolicy : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(CosmosDBFailoverPolicy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } CosmosDBFailoverPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBIPAddressOrRange.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBIPAddressOrRange.Serialization.cs index 6180ffcc344a..54d52bf3e66a 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBIPAddressOrRange.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBIPAddressOrRange.Serialization.cs @@ -19,6 +19,15 @@ public partial class CosmosDBIPAddressOrRange : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(CosmosDBIPAddressOrRange)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IPAddressOrRange)) { writer.WritePropertyName("ipAddressOrRange"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } CosmosDBIPAddressOrRange IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBIncludedPath.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBIncludedPath.Serialization.cs index e30f35902eba..3e1f85033e4d 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBIncludedPath.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBIncludedPath.Serialization.cs @@ -20,6 +20,15 @@ public partial class CosmosDBIncludedPath : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(CosmosDBIncludedPath)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Path)) { writer.WritePropertyName("path"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } CosmosDBIncludedPath IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBIndexingPolicy.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBIndexingPolicy.Serialization.cs index a23ce682b340..2c62b2396b35 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBIndexingPolicy.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBIndexingPolicy.Serialization.cs @@ -20,6 +20,15 @@ public partial class CosmosDBIndexingPolicy : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(CosmosDBIndexingPolicy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IsAutomatic)) { writer.WritePropertyName("automatic"u8); @@ -103,7 +111,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } CosmosDBIndexingPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBKeyWrapMetadata.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBKeyWrapMetadata.Serialization.cs index 28f0ad6e8e09..a20af498d9d9 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBKeyWrapMetadata.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBKeyWrapMetadata.Serialization.cs @@ -19,6 +19,15 @@ public partial class CosmosDBKeyWrapMetadata : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(CosmosDBKeyWrapMetadata)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -62,7 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } CosmosDBKeyWrapMetadata IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBLocationListResult.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBLocationListResult.Serialization.cs index 9ff07a3af94f..de5c5b3c17c0 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBLocationListResult.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBLocationListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class CosmosDBLocationListResult : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(CosmosDBLocationListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } CosmosDBLocationListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBLocationProperties.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBLocationProperties.Serialization.cs index 6fb1f7b55e0c..60602b75dc44 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBLocationProperties.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBLocationProperties.Serialization.cs @@ -20,6 +20,15 @@ public partial class CosmosDBLocationProperties : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(CosmosDBLocationProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(DoesSupportAvailabilityZone)) { writer.WritePropertyName("supportsAvailabilityZone"u8); @@ -78,7 +86,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } CosmosDBLocationProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBMetricAvailability.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBMetricAvailability.Serialization.cs index b1a93749b425..04850eb6a4ec 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBMetricAvailability.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBMetricAvailability.Serialization.cs @@ -19,6 +19,15 @@ public partial class CosmosDBMetricAvailability : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(CosmosDBMetricAvailability)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(TimeGrain)) { writer.WritePropertyName("timeGrain"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } CosmosDBMetricAvailability IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBMetricDefinition.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBMetricDefinition.Serialization.cs index 9f573f84b963..40752047a202 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBMetricDefinition.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBMetricDefinition.Serialization.cs @@ -20,6 +20,15 @@ public partial class CosmosDBMetricDefinition : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(CosmosDBMetricDefinition)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(MetricAvailabilities)) { writer.WritePropertyName("metricAvailabilities"u8); @@ -73,7 +81,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } CosmosDBMetricDefinition IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBMetricDefinitionsListResult.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBMetricDefinitionsListResult.Serialization.cs index 667133c4688e..dc0ac6042d3d 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBMetricDefinitionsListResult.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBMetricDefinitionsListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class CosmosDBMetricDefinitionsListResult : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(CosmosDBMetricDefinitionsListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } CosmosDBMetricDefinitionsListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBMetricListResult.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBMetricListResult.Serialization.cs index 988bc56e3e09..c80aa9f7b267 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBMetricListResult.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBMetricListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class CosmosDBMetricListResult : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(CosmosDBMetricListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } CosmosDBMetricListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBMetricName.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBMetricName.Serialization.cs index 02c5afd76979..514e8dbabf67 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBMetricName.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBMetricName.Serialization.cs @@ -19,6 +19,15 @@ public partial class CosmosDBMetricName : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(CosmosDBMetricName)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Value)) { writer.WritePropertyName("value"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } CosmosDBMetricName IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBMetricValue.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBMetricValue.Serialization.cs index 660fe1419617..ed3cb20be45c 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBMetricValue.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBMetricValue.Serialization.cs @@ -19,6 +19,15 @@ public partial class CosmosDBMetricValue : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(CosmosDBMetricValue)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Count)) { writer.WritePropertyName("_count"u8); @@ -72,7 +80,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } CosmosDBMetricValue IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBPathIndexes.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBPathIndexes.Serialization.cs index c22175f46d5f..62216a882c37 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBPathIndexes.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBPathIndexes.Serialization.cs @@ -19,6 +19,15 @@ public partial class CosmosDBPathIndexes : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(CosmosDBPathIndexes)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(DataType)) { writer.WritePropertyName("dataType"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } CosmosDBPathIndexes IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBPercentileMetric.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBPercentileMetric.Serialization.cs index f4312e8a2fa4..9c2e911f02ff 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBPercentileMetric.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBPercentileMetric.Serialization.cs @@ -20,6 +20,15 @@ public partial class CosmosDBPercentileMetric : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(CosmosDBPercentileMetric)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(StartOn)) { writer.WritePropertyName("startTime"u8); @@ -78,7 +86,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } CosmosDBPercentileMetric IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBPrivateEndpointConnectionListResult.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBPrivateEndpointConnectionListResult.Serialization.cs index 62b027daa3f4..33bf3e7896f8 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBPrivateEndpointConnectionListResult.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBPrivateEndpointConnectionListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class CosmosDBPrivateEndpointConnectionListResult : IUtf8JsonSe void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWrite throw new FormatException($"The model {nameof(CosmosDBPrivateEndpointConnectionListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWrite #endif } } - writer.WriteEndObject(); } CosmosDBPrivateEndpointConnectionListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBPrivateLinkResourceListResult.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBPrivateLinkResourceListResult.Serialization.cs index cc9e4c122ada..b1af4d6d7eb3 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBPrivateLinkResourceListResult.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBPrivateLinkResourceListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class CosmosDBPrivateLinkResourceListResult : IUtf8JsonSerializ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(CosmosDBPrivateLinkResourceListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } CosmosDBPrivateLinkResourceListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBPrivateLinkServiceConnectionStateProperty.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBPrivateLinkServiceConnectionStateProperty.Serialization.cs index c663bf3cf2bf..9c0c4de03eef 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBPrivateLinkServiceConnectionStateProperty.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBPrivateLinkServiceConnectionStateProperty.Serialization.cs @@ -19,6 +19,15 @@ public partial class CosmosDBPrivateLinkServiceConnectionStateProperty : IUtf8Js void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8Jso throw new FormatException($"The model {nameof(CosmosDBPrivateLinkServiceConnectionStateProperty)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Status)) { writer.WritePropertyName("status"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8Jso #endif } } - writer.WriteEndObject(); } CosmosDBPrivateLinkServiceConnectionStateProperty IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBRegionalService.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBRegionalService.Serialization.cs index f5ca1803053f..34f042bb0a23 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBRegionalService.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBRegionalService.Serialization.cs @@ -19,6 +19,15 @@ public partial class CosmosDBRegionalService : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(CosmosDBRegionalService)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } CosmosDBRegionalService IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBServiceCreateOrUpdateContent.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBServiceCreateOrUpdateContent.Serialization.cs index 64452ff95b9e..c68631e8627b 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBServiceCreateOrUpdateContent.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBServiceCreateOrUpdateContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class CosmosDBServiceCreateOrUpdateContent : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(CosmosDBServiceCreateOrUpdateContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } CosmosDBServiceCreateOrUpdateContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBServiceListResult.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBServiceListResult.Serialization.cs index 0a8370572184..2dede352c8fb 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBServiceListResult.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBServiceListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class CosmosDBServiceListResult : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(CosmosDBServiceListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } CosmosDBServiceListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBServiceProperties.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBServiceProperties.Serialization.cs index 38c2b909a84a..678995e6f256 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBServiceProperties.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBServiceProperties.Serialization.cs @@ -19,6 +19,15 @@ public partial class CosmosDBServiceProperties : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(CosmosDBServiceProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(CreatedOn)) { writer.WritePropertyName("creationTime"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea } #endif } - writer.WriteEndObject(); } CosmosDBServiceProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlClientEncryptionKeyCreateOrUpdateContent.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlClientEncryptionKeyCreateOrUpdateContent.Serialization.cs index 41a6f3eb31a3..c090732cc3c6 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlClientEncryptionKeyCreateOrUpdateContent.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlClientEncryptionKeyCreateOrUpdateContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class CosmosDBSqlClientEncryptionKeyCreateOrUpdateContent : IUtf8 void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8J throw new FormatException($"The model {nameof(CosmosDBSqlClientEncryptionKeyCreateOrUpdateContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); writer.WritePropertyName("resource"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8J #endif } } - writer.WriteEndObject(); } CosmosDBSqlClientEncryptionKeyCreateOrUpdateContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlClientEncryptionKeyProperties.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlClientEncryptionKeyProperties.Serialization.cs index 8cfb52ebb28c..f3977f797f1b 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlClientEncryptionKeyProperties.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlClientEncryptionKeyProperties.Serialization.cs @@ -19,6 +19,15 @@ public partial class CosmosDBSqlClientEncryptionKeyProperties : IUtf8JsonSeriali void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter w throw new FormatException($"The model {nameof(CosmosDBSqlClientEncryptionKeyProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(Rid)) { writer.WritePropertyName("_rid"u8); @@ -42,42 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter w writer.WritePropertyName("_etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(EncryptionAlgorithm)) - { - writer.WritePropertyName("encryptionAlgorithm"u8); - writer.WriteStringValue(EncryptionAlgorithm); - } - if (Optional.IsDefined(WrappedDataEncryptionKey)) - { - writer.WritePropertyName("wrappedDataEncryptionKey"u8); - writer.WriteBase64StringValue(WrappedDataEncryptionKey, "D"); - } - if (Optional.IsDefined(KeyWrapMetadata)) - { - writer.WritePropertyName("keyWrapMetadata"u8); - writer.WriteObjectValue(KeyWrapMetadata, options); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } CosmosDBSqlClientEncryptionKeyProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlClientEncryptionKeyResourceInfo.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlClientEncryptionKeyResourceInfo.Serialization.cs index 37bdb109b0ba..8a41c1007dac 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlClientEncryptionKeyResourceInfo.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlClientEncryptionKeyResourceInfo.Serialization.cs @@ -19,6 +19,15 @@ public partial class CosmosDBSqlClientEncryptionKeyResourceInfo : IUtf8JsonSeria void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(CosmosDBSqlClientEncryptionKeyResourceInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -62,7 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } CosmosDBSqlClientEncryptionKeyResourceInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlContainerCreateOrUpdateContent.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlContainerCreateOrUpdateContent.Serialization.cs index 3dea4a88918d..c1d55f43b8ec 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlContainerCreateOrUpdateContent.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlContainerCreateOrUpdateContent.Serialization.cs @@ -21,6 +21,15 @@ public partial class CosmosDBSqlContainerCreateOrUpdateContent : IUtf8JsonSerial void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,46 +37,13 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(CosmosDBSqlContainerCreateOrUpdateContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; JsonSerializer.Serialize(writer, Identity, serializeOptions); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); writer.WritePropertyName("resource"u8); @@ -78,22 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer.WriteObjectValue(Options, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } CosmosDBSqlContainerCreateOrUpdateContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlContainerListResult.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlContainerListResult.Serialization.cs index adfc1327760b..8777ae8b0529 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlContainerListResult.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlContainerListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class CosmosDBSqlContainerListResult : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(CosmosDBSqlContainerListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } CosmosDBSqlContainerListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlContainerPropertiesConfig.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlContainerPropertiesConfig.Serialization.cs index 9174f36070df..f092ae9694e1 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlContainerPropertiesConfig.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlContainerPropertiesConfig.Serialization.cs @@ -19,6 +19,15 @@ public partial class CosmosDBSqlContainerPropertiesConfig : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,33 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(CosmosDBSqlContainerPropertiesConfig)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(Throughput)) - { - writer.WritePropertyName("throughput"u8); - writer.WriteNumberValue(Throughput.Value); - } - if (Optional.IsDefined(AutoscaleSettings)) - { - writer.WritePropertyName("autoscaleSettings"u8); - writer.WriteObjectValue(AutoscaleSettings, options); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } CosmosDBSqlContainerPropertiesConfig IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlContainerResourceInfo.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlContainerResourceInfo.Serialization.cs index 320d288e1805..4f7aa7d91ddb 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlContainerResourceInfo.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlContainerResourceInfo.Serialization.cs @@ -20,6 +20,15 @@ public partial class CosmosDBSqlContainerResourceInfo : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(CosmosDBSqlContainerResourceInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("id"u8); writer.WriteStringValue(ContainerName); if (Optional.IsDefined(IndexingPolicy)) @@ -105,7 +113,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } CosmosDBSqlContainerResourceInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlDatabaseCreateOrUpdateContent.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlDatabaseCreateOrUpdateContent.Serialization.cs index cb33383f6dd1..c9c7f75a0256 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlDatabaseCreateOrUpdateContent.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlDatabaseCreateOrUpdateContent.Serialization.cs @@ -21,6 +21,15 @@ public partial class CosmosDBSqlDatabaseCreateOrUpdateContent : IUtf8JsonSeriali void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,46 +37,13 @@ void IJsonModel.Write(Utf8JsonWriter w throw new FormatException($"The model {nameof(CosmosDBSqlDatabaseCreateOrUpdateContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; JsonSerializer.Serialize(writer, Identity, serializeOptions); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); writer.WritePropertyName("resource"u8); @@ -78,22 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter w writer.WriteObjectValue(Options, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } CosmosDBSqlDatabaseCreateOrUpdateContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlDatabaseListResult.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlDatabaseListResult.Serialization.cs index 30c6c2dfac12..54d8d8bb1906 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlDatabaseListResult.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlDatabaseListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class CosmosDBSqlDatabaseListResult : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(CosmosDBSqlDatabaseListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } CosmosDBSqlDatabaseListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlDatabasePropertiesConfig.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlDatabasePropertiesConfig.Serialization.cs index 5f03d95c7918..87733d47161d 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlDatabasePropertiesConfig.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlDatabasePropertiesConfig.Serialization.cs @@ -19,6 +19,15 @@ public partial class CosmosDBSqlDatabasePropertiesConfig : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,33 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(CosmosDBSqlDatabasePropertiesConfig)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(Throughput)) - { - writer.WritePropertyName("throughput"u8); - writer.WriteNumberValue(Throughput.Value); - } - if (Optional.IsDefined(AutoscaleSettings)) - { - writer.WritePropertyName("autoscaleSettings"u8); - writer.WriteObjectValue(AutoscaleSettings, options); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } CosmosDBSqlDatabasePropertiesConfig IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlDatabaseResourceInfo.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlDatabaseResourceInfo.Serialization.cs index 429d4b910593..5038042fa29d 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlDatabaseResourceInfo.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlDatabaseResourceInfo.Serialization.cs @@ -19,6 +19,15 @@ public partial class CosmosDBSqlDatabaseResourceInfo : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(CosmosDBSqlDatabaseResourceInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("id"u8); writer.WriteStringValue(DatabaseName); if (Optional.IsDefined(RestoreParameters)) @@ -54,7 +62,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } CosmosDBSqlDatabaseResourceInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlRoleAssignmentCreateOrUpdateContent.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlRoleAssignmentCreateOrUpdateContent.Serialization.cs index 75357c84b6e4..289f1fc06eef 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlRoleAssignmentCreateOrUpdateContent.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlRoleAssignmentCreateOrUpdateContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class CosmosDBSqlRoleAssignmentCreateOrUpdateContent : IUtf8JsonS void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWr throw new FormatException($"The model {nameof(CosmosDBSqlRoleAssignmentCreateOrUpdateContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(RoleDefinitionId)) @@ -59,7 +67,6 @@ void IJsonModel.Write(Utf8JsonWr #endif } } - writer.WriteEndObject(); } CosmosDBSqlRoleAssignmentCreateOrUpdateContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlRoleAssignmentList.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlRoleAssignmentList.Serialization.cs index 68d544bc2725..107074252d66 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlRoleAssignmentList.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlRoleAssignmentList.Serialization.cs @@ -20,6 +20,15 @@ internal partial class CosmosDBSqlRoleAssignmentList : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(CosmosDBSqlRoleAssignmentList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } CosmosDBSqlRoleAssignmentList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlRoleDefinitionCreateOrUpdateContent.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlRoleDefinitionCreateOrUpdateContent.Serialization.cs index 08ab66c3e817..6da92bf3ca3d 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlRoleDefinitionCreateOrUpdateContent.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlRoleDefinitionCreateOrUpdateContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class CosmosDBSqlRoleDefinitionCreateOrUpdateContent : IUtf8JsonS void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWr throw new FormatException($"The model {nameof(CosmosDBSqlRoleDefinitionCreateOrUpdateContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(RoleName)) @@ -74,7 +82,6 @@ void IJsonModel.Write(Utf8JsonWr #endif } } - writer.WriteEndObject(); } CosmosDBSqlRoleDefinitionCreateOrUpdateContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlRoleDefinitionList.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlRoleDefinitionList.Serialization.cs index 02f98845a4a0..0eb193e2e281 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlRoleDefinitionList.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlRoleDefinitionList.Serialization.cs @@ -20,6 +20,15 @@ internal partial class CosmosDBSqlRoleDefinitionList : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(CosmosDBSqlRoleDefinitionList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } CosmosDBSqlRoleDefinitionList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlRolePermission.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlRolePermission.Serialization.cs index 0dce32a4fe17..e3c937cafaae 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlRolePermission.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlRolePermission.Serialization.cs @@ -20,6 +20,15 @@ public partial class CosmosDBSqlRolePermission : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(CosmosDBSqlRolePermission)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(DataActions)) { writer.WritePropertyName("dataActions"u8); @@ -63,7 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } CosmosDBSqlRolePermission IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlStoredProcedureCreateOrUpdateContent.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlStoredProcedureCreateOrUpdateContent.Serialization.cs index 4733d4d938ad..010ff04e75ce 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlStoredProcedureCreateOrUpdateContent.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlStoredProcedureCreateOrUpdateContent.Serialization.cs @@ -21,6 +21,15 @@ public partial class CosmosDBSqlStoredProcedureCreateOrUpdateContent : IUtf8Json void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,46 +37,13 @@ void IJsonModel.Write(Utf8JsonW throw new FormatException($"The model {nameof(CosmosDBSqlStoredProcedureCreateOrUpdateContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; JsonSerializer.Serialize(writer, Identity, serializeOptions); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); writer.WritePropertyName("resource"u8); @@ -78,22 +54,6 @@ void IJsonModel.Write(Utf8JsonW writer.WriteObjectValue(Options, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } CosmosDBSqlStoredProcedureCreateOrUpdateContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlStoredProcedureListResult.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlStoredProcedureListResult.Serialization.cs index 23e7c8e25d76..f23b48829b0c 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlStoredProcedureListResult.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlStoredProcedureListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class CosmosDBSqlStoredProcedureListResult : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(CosmosDBSqlStoredProcedureListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } CosmosDBSqlStoredProcedureListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlStoredProcedureResourceInfo.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlStoredProcedureResourceInfo.Serialization.cs index e90af617f5c4..e8c9d36b7e16 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlStoredProcedureResourceInfo.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlStoredProcedureResourceInfo.Serialization.cs @@ -19,6 +19,15 @@ public partial class CosmosDBSqlStoredProcedureResourceInfo : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(CosmosDBSqlStoredProcedureResourceInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("id"u8); writer.WriteStringValue(StoredProcedureName); if (Optional.IsDefined(Body)) @@ -49,7 +57,6 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } CosmosDBSqlStoredProcedureResourceInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlTriggerCreateOrUpdateContent.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlTriggerCreateOrUpdateContent.Serialization.cs index 043b0e925b5b..0889346fce9f 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlTriggerCreateOrUpdateContent.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlTriggerCreateOrUpdateContent.Serialization.cs @@ -21,6 +21,15 @@ public partial class CosmosDBSqlTriggerCreateOrUpdateContent : IUtf8JsonSerializ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,46 +37,13 @@ void IJsonModel.Write(Utf8JsonWriter wr throw new FormatException($"The model {nameof(CosmosDBSqlTriggerCreateOrUpdateContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; JsonSerializer.Serialize(writer, Identity, serializeOptions); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); writer.WritePropertyName("resource"u8); @@ -78,22 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter wr writer.WriteObjectValue(Options, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } CosmosDBSqlTriggerCreateOrUpdateContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlTriggerListResult.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlTriggerListResult.Serialization.cs index 0e66179a9244..b70ae921f084 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlTriggerListResult.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlTriggerListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class CosmosDBSqlTriggerListResult : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(CosmosDBSqlTriggerListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } CosmosDBSqlTriggerListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlTriggerResourceInfo.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlTriggerResourceInfo.Serialization.cs index ea9ca1ba1216..64be96caf298 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlTriggerResourceInfo.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlTriggerResourceInfo.Serialization.cs @@ -19,6 +19,15 @@ public partial class CosmosDBSqlTriggerResourceInfo : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(CosmosDBSqlTriggerResourceInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("id"u8); writer.WriteStringValue(TriggerName); if (Optional.IsDefined(Body)) @@ -59,7 +67,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } CosmosDBSqlTriggerResourceInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlUserDefinedFunctionCreateOrUpdateContent.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlUserDefinedFunctionCreateOrUpdateContent.Serialization.cs index 95ede0aab61a..1277f2d17212 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlUserDefinedFunctionCreateOrUpdateContent.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlUserDefinedFunctionCreateOrUpdateContent.Serialization.cs @@ -21,6 +21,15 @@ public partial class CosmosDBSqlUserDefinedFunctionCreateOrUpdateContent : IUtf8 void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,46 +37,13 @@ void IJsonModel.Write(Utf8J throw new FormatException($"The model {nameof(CosmosDBSqlUserDefinedFunctionCreateOrUpdateContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; JsonSerializer.Serialize(writer, Identity, serializeOptions); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); writer.WritePropertyName("resource"u8); @@ -78,22 +54,6 @@ void IJsonModel.Write(Utf8J writer.WriteObjectValue(Options, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } CosmosDBSqlUserDefinedFunctionCreateOrUpdateContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlUserDefinedFunctionListResult.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlUserDefinedFunctionListResult.Serialization.cs index 786d4be35f33..0efdd1f53f1f 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlUserDefinedFunctionListResult.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlUserDefinedFunctionListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class CosmosDBSqlUserDefinedFunctionListResult : IUtf8JsonSeria void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter w throw new FormatException($"The model {nameof(CosmosDBSqlUserDefinedFunctionListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter w #endif } } - writer.WriteEndObject(); } CosmosDBSqlUserDefinedFunctionListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlUserDefinedFunctionResourceInfo.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlUserDefinedFunctionResourceInfo.Serialization.cs index 21d5c76756f7..fa9e01c77fbc 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlUserDefinedFunctionResourceInfo.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBSqlUserDefinedFunctionResourceInfo.Serialization.cs @@ -19,6 +19,15 @@ public partial class CosmosDBSqlUserDefinedFunctionResourceInfo : IUtf8JsonSeria void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(CosmosDBSqlUserDefinedFunctionResourceInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("id"u8); writer.WriteStringValue(FunctionName); if (Optional.IsDefined(Body)) @@ -49,7 +57,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } CosmosDBSqlUserDefinedFunctionResourceInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBTableCreateOrUpdateContent.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBTableCreateOrUpdateContent.Serialization.cs index 87c96d666096..e7c14dbdad35 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBTableCreateOrUpdateContent.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBTableCreateOrUpdateContent.Serialization.cs @@ -21,6 +21,15 @@ public partial class CosmosDBTableCreateOrUpdateContent : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,46 +37,13 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(CosmosDBTableCreateOrUpdateContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; JsonSerializer.Serialize(writer, Identity, serializeOptions); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); writer.WritePropertyName("resource"u8); @@ -78,22 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteObjectValue(Options, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } CosmosDBTableCreateOrUpdateContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBTableListResult.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBTableListResult.Serialization.cs index 56676a837544..cf2467ee1080 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBTableListResult.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBTableListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class CosmosDBTableListResult : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(CosmosDBTableListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } CosmosDBTableListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBTablePropertiesOptions.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBTablePropertiesOptions.Serialization.cs index 5e7c376a3186..8ae1dc698f46 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBTablePropertiesOptions.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBTablePropertiesOptions.Serialization.cs @@ -19,6 +19,15 @@ public partial class CosmosDBTablePropertiesOptions : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,33 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(CosmosDBTablePropertiesOptions)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(Throughput)) - { - writer.WritePropertyName("throughput"u8); - writer.WriteNumberValue(Throughput.Value); - } - if (Optional.IsDefined(AutoscaleSettings)) - { - writer.WritePropertyName("autoscaleSettings"u8); - writer.WriteObjectValue(AutoscaleSettings, options); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } CosmosDBTablePropertiesOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBTablePropertiesResource.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBTablePropertiesResource.Serialization.cs index 5c7b87745025..392b334de9b8 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBTablePropertiesResource.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBTablePropertiesResource.Serialization.cs @@ -19,6 +19,15 @@ public partial class CosmosDBTablePropertiesResource : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(CosmosDBTablePropertiesResource)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(Rid)) { writer.WritePropertyName("_rid"u8); @@ -42,34 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo writer.WritePropertyName("_etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - writer.WritePropertyName("id"u8); - writer.WriteStringValue(TableName); - if (Optional.IsDefined(RestoreParameters)) - { - writer.WritePropertyName("restoreParameters"u8); - writer.WriteObjectValue(RestoreParameters, options); - } - if (Optional.IsDefined(CreateMode)) - { - writer.WritePropertyName("createMode"u8); - writer.WriteStringValue(CreateMode.Value.ToString()); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } CosmosDBTablePropertiesResource IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBTableResourceInfo.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBTableResourceInfo.Serialization.cs index 24c295dedef7..ebcc840546e3 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBTableResourceInfo.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBTableResourceInfo.Serialization.cs @@ -19,6 +19,15 @@ public partial class CosmosDBTableResourceInfo : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(CosmosDBTableResourceInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("id"u8); writer.WriteStringValue(TableName); if (Optional.IsDefined(RestoreParameters)) @@ -54,7 +62,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } CosmosDBTableResourceInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBThroughputPoolPatch.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBThroughputPoolPatch.Serialization.cs index 5a27e018de6a..d497a35295af 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBThroughputPoolPatch.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBThroughputPoolPatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class CosmosDBThroughputPoolPatch : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(CosmosDBThroughputPoolPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(ProvisioningState)) @@ -54,7 +62,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } CosmosDBThroughputPoolPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBUniqueKey.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBUniqueKey.Serialization.cs index bd87989ba4c0..45349c1ff5c2 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBUniqueKey.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBUniqueKey.Serialization.cs @@ -20,6 +20,15 @@ public partial class CosmosDBUniqueKey : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(CosmosDBUniqueKey)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Paths)) { writer.WritePropertyName("paths"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } CosmosDBUniqueKey IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBUniqueKeyPolicy.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBUniqueKeyPolicy.Serialization.cs index b2f73def4cfb..d015cc9c851d 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBUniqueKeyPolicy.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBUniqueKeyPolicy.Serialization.cs @@ -20,6 +20,15 @@ internal partial class CosmosDBUniqueKeyPolicy : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(CosmosDBUniqueKeyPolicy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(UniqueKeys)) { writer.WritePropertyName("uniqueKeys"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } CosmosDBUniqueKeyPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBUsagesResult.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBUsagesResult.Serialization.cs index d693b67e5b09..66ed665d1905 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBUsagesResult.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBUsagesResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class CosmosDBUsagesResult : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(CosmosDBUsagesResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } CosmosDBUsagesResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBVirtualNetworkRule.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBVirtualNetworkRule.Serialization.cs index fa1c57c8c0d0..3672eec89726 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBVirtualNetworkRule.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosDBVirtualNetworkRule.Serialization.cs @@ -19,6 +19,15 @@ public partial class CosmosDBVirtualNetworkRule : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(CosmosDBVirtualNetworkRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } CosmosDBVirtualNetworkRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosMongoDataTransferDataSourceSink.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosMongoDataTransferDataSourceSink.Serialization.cs index c853f46f4ba6..e4b057c968d6 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosMongoDataTransferDataSourceSink.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosMongoDataTransferDataSourceSink.Serialization.cs @@ -19,6 +19,15 @@ public partial class CosmosMongoDataTransferDataSourceSink : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,34 +35,11 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(CosmosMongoDataTransferDataSourceSink)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("databaseName"u8); writer.WriteStringValue(DatabaseName); writer.WritePropertyName("collectionName"u8); writer.WriteStringValue(CollectionName); - if (Optional.IsDefined(RemoteAccountName)) - { - writer.WritePropertyName("remoteAccountName"u8); - writer.WriteStringValue(RemoteAccountName); - } - writer.WritePropertyName("component"u8); - writer.WriteStringValue(Component.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } CosmosMongoDataTransferDataSourceSink IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosSqlDataTransferDataSourceSink.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosSqlDataTransferDataSourceSink.Serialization.cs index 5d192f6f9b5b..936d74518638 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosSqlDataTransferDataSourceSink.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CosmosSqlDataTransferDataSourceSink.Serialization.cs @@ -19,6 +19,15 @@ public partial class CosmosSqlDataTransferDataSourceSink : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,34 +35,11 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(CosmosSqlDataTransferDataSourceSink)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("databaseName"u8); writer.WriteStringValue(DatabaseName); writer.WritePropertyName("containerName"u8); writer.WriteStringValue(ContainerName); - if (Optional.IsDefined(RemoteAccountName)) - { - writer.WritePropertyName("remoteAccountName"u8); - writer.WriteStringValue(RemoteAccountName); - } - writer.WritePropertyName("component"u8); - writer.WriteStringValue(Component.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } CosmosSqlDataTransferDataSourceSink IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/DataTransferDataSourceSink.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/DataTransferDataSourceSink.Serialization.cs index c703b56f5c56..4295991895ae 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/DataTransferDataSourceSink.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/DataTransferDataSourceSink.Serialization.cs @@ -20,6 +20,15 @@ public partial class DataTransferDataSourceSink : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(DataTransferDataSourceSink)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("component"u8); writer.WriteStringValue(Component.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -45,7 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } DataTransferDataSourceSink IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/DataTransferJobFeedResults.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/DataTransferJobFeedResults.Serialization.cs index 2bde9271b81a..1e5df3f842d4 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/DataTransferJobFeedResults.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/DataTransferJobFeedResults.Serialization.cs @@ -20,6 +20,15 @@ internal partial class DataTransferJobFeedResults : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(DataTransferJobFeedResults)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } DataTransferJobFeedResults IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/DataTransferJobGetResultCreateOrUpdateContent.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/DataTransferJobGetResultCreateOrUpdateContent.Serialization.cs index e58c1dcf7a0b..0312847163d9 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/DataTransferJobGetResultCreateOrUpdateContent.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/DataTransferJobGetResultCreateOrUpdateContent.Serialization.cs @@ -20,6 +20,15 @@ public partial class DataTransferJobGetResultCreateOrUpdateContent : IUtf8JsonSe void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,45 +36,9 @@ void IJsonModel.Write(Utf8JsonWri throw new FormatException($"The model {nameof(DataTransferJobGetResultCreateOrUpdateContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteObjectValue(Properties, options); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } DataTransferJobGetResultCreateOrUpdateContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/DataTransferJobProperties.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/DataTransferJobProperties.Serialization.cs index c037da8e0c4a..d6aca8c77df2 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/DataTransferJobProperties.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/DataTransferJobProperties.Serialization.cs @@ -19,6 +19,15 @@ public partial class DataTransferJobProperties : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(DataTransferJobProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(JobName)) { writer.WritePropertyName("jobName"u8); @@ -91,7 +99,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } DataTransferJobProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/DataTransferRegionalService.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/DataTransferRegionalService.Serialization.cs index 555678c55ade..84f871acfd44 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/DataTransferRegionalService.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/DataTransferRegionalService.Serialization.cs @@ -19,6 +19,15 @@ public partial class DataTransferRegionalService : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,38 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(DataTransferRegionalService)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (options.Format != "W" && Optional.IsDefined(Status)) - { - writer.WritePropertyName("status"u8); - writer.WriteStringValue(Status.Value.ToString()); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } DataTransferRegionalService IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/DataTransferServiceProperties.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/DataTransferServiceProperties.Serialization.cs index 320f0ad46e1f..01e313fce040 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/DataTransferServiceProperties.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/DataTransferServiceProperties.Serialization.cs @@ -20,6 +20,15 @@ public partial class DataTransferServiceProperties : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(DataTransferServiceProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsCollectionDefined(Locations)) { writer.WritePropertyName("locations"u8); @@ -38,28 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode } writer.WriteEndArray(); } - if (options.Format != "W" && Optional.IsDefined(CreatedOn)) - { - writer.WritePropertyName("creationTime"u8); - writer.WriteStringValue(CreatedOn.Value, "O"); - } - if (Optional.IsDefined(InstanceSize)) - { - writer.WritePropertyName("instanceSize"u8); - writer.WriteStringValue(InstanceSize.Value.ToString()); - } - if (Optional.IsDefined(InstanceCount)) - { - writer.WritePropertyName("instanceCount"u8); - writer.WriteNumberValue(InstanceCount.Value); - } - writer.WritePropertyName("serviceType"u8); - writer.WriteStringValue(ServiceType.ToString()); - if (options.Format != "W" && Optional.IsDefined(Status)) - { - writer.WritePropertyName("status"u8); - writer.WriteStringValue(Status.Value.ToString()); - } foreach (var item in AdditionalProperties) { writer.WritePropertyName(item.Key); @@ -72,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode } #endif } - writer.WriteEndObject(); } DataTransferServiceProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/DataTransferServiceResourceCreateUpdateProperties.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/DataTransferServiceResourceCreateUpdateProperties.Serialization.cs index 96f35c847fab..34b1d6eac376 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/DataTransferServiceResourceCreateUpdateProperties.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/DataTransferServiceResourceCreateUpdateProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class DataTransferServiceResourceCreateUpdateProperties : IUtf8Js void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,35 +34,7 @@ void IJsonModel.Write(Utf8Jso throw new FormatException($"The model {nameof(DataTransferServiceResourceCreateUpdateProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(InstanceSize)) - { - writer.WritePropertyName("instanceSize"u8); - writer.WriteStringValue(InstanceSize.Value.ToString()); - } - if (Optional.IsDefined(InstanceCount)) - { - writer.WritePropertyName("instanceCount"u8); - writer.WriteNumberValue(InstanceCount.Value); - } - writer.WritePropertyName("serviceType"u8); - writer.WriteStringValue(ServiceType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } DataTransferServiceResourceCreateUpdateProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/DatabaseAccountKeysMetadata.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/DatabaseAccountKeysMetadata.Serialization.cs index e185107d4ed0..f9eb77fb92d9 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/DatabaseAccountKeysMetadata.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/DatabaseAccountKeysMetadata.Serialization.cs @@ -19,6 +19,15 @@ public partial class DatabaseAccountKeysMetadata : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(DatabaseAccountKeysMetadata)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(PrimaryMasterKey)) { writer.WritePropertyName("primaryMasterKey"u8); @@ -62,7 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } DatabaseAccountKeysMetadata IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/DatabaseAccountListConnectionStringsResult.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/DatabaseAccountListConnectionStringsResult.Serialization.cs index 9c1fef41bdad..9bb2e5520b61 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/DatabaseAccountListConnectionStringsResult.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/DatabaseAccountListConnectionStringsResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class DatabaseAccountListConnectionStringsResult : IUtf8JsonSer void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(DatabaseAccountListConnectionStringsResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(ConnectionStrings)) { writer.WritePropertyName("connectionStrings"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } DatabaseAccountListConnectionStringsResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/DatabaseAccountsListResult.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/DatabaseAccountsListResult.Serialization.cs index 0e3430cea6d0..752c23726886 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/DatabaseAccountsListResult.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/DatabaseAccountsListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class DatabaseAccountsListResult : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(DatabaseAccountsListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } DatabaseAccountsListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/DatabaseRestoreResourceInfo.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/DatabaseRestoreResourceInfo.Serialization.cs index f368ec515c07..aa8c77982485 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/DatabaseRestoreResourceInfo.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/DatabaseRestoreResourceInfo.Serialization.cs @@ -20,6 +20,15 @@ public partial class DatabaseRestoreResourceInfo : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(DatabaseRestoreResourceInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(DatabaseName)) { writer.WritePropertyName("databaseName"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } DatabaseRestoreResourceInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/DiagnosticLogSettings.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/DiagnosticLogSettings.Serialization.cs index 10229b3ded13..e68a0886038e 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/DiagnosticLogSettings.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/DiagnosticLogSettings.Serialization.cs @@ -19,6 +19,15 @@ internal partial class DiagnosticLogSettings : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(DiagnosticLogSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(EnableFullTextQuery)) { writer.WritePropertyName("enableFullTextQuery"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } DiagnosticLogSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedCassandraKeyspaceResourceInfo.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedCassandraKeyspaceResourceInfo.Serialization.cs index a8f6c6253a30..62a4dcaedd24 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedCassandraKeyspaceResourceInfo.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedCassandraKeyspaceResourceInfo.Serialization.cs @@ -19,6 +19,15 @@ public partial class ExtendedCassandraKeyspaceResourceInfo : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(ExtendedCassandraKeyspaceResourceInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(Rid)) { writer.WritePropertyName("_rid"u8); @@ -42,24 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writ writer.WritePropertyName("_etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - writer.WritePropertyName("id"u8); - writer.WriteStringValue(KeyspaceName); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ExtendedCassandraKeyspaceResourceInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedCassandraTableResourceInfo.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedCassandraTableResourceInfo.Serialization.cs index 93e830607d90..12f4228b2e5a 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedCassandraTableResourceInfo.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedCassandraTableResourceInfo.Serialization.cs @@ -19,6 +19,15 @@ public partial class ExtendedCassandraTableResourceInfo : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(ExtendedCassandraTableResourceInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(Rid)) { writer.WritePropertyName("_rid"u8); @@ -42,39 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WritePropertyName("_etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - writer.WritePropertyName("id"u8); - writer.WriteStringValue(TableName); - if (Optional.IsDefined(DefaultTtl)) - { - writer.WritePropertyName("defaultTtl"u8); - writer.WriteNumberValue(DefaultTtl.Value); - } - if (Optional.IsDefined(Schema)) - { - writer.WritePropertyName("schema"u8); - writer.WriteObjectValue(Schema, options); - } - if (Optional.IsDefined(AnalyticalStorageTtl)) - { - writer.WritePropertyName("analyticalStorageTtl"u8); - writer.WriteNumberValue(AnalyticalStorageTtl.Value); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ExtendedCassandraTableResourceInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedCosmosDBSqlContainerResourceInfo.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedCosmosDBSqlContainerResourceInfo.Serialization.cs index 38c9cc44a336..0f9778faa975 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedCosmosDBSqlContainerResourceInfo.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedCosmosDBSqlContainerResourceInfo.Serialization.cs @@ -20,6 +20,15 @@ public partial class ExtendedCosmosDBSqlContainerResourceInfo : IUtf8JsonSeriali void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter w throw new FormatException($"The model {nameof(ExtendedCosmosDBSqlContainerResourceInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(Rid)) { writer.WritePropertyName("_rid"u8); @@ -43,84 +52,6 @@ void IJsonModel.Write(Utf8JsonWriter w writer.WritePropertyName("_etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - writer.WritePropertyName("id"u8); - writer.WriteStringValue(ContainerName); - if (Optional.IsDefined(IndexingPolicy)) - { - writer.WritePropertyName("indexingPolicy"u8); - writer.WriteObjectValue(IndexingPolicy, options); - } - if (Optional.IsDefined(PartitionKey)) - { - writer.WritePropertyName("partitionKey"u8); - writer.WriteObjectValue(PartitionKey, options); - } - if (Optional.IsDefined(DefaultTtl)) - { - writer.WritePropertyName("defaultTtl"u8); - writer.WriteNumberValue(DefaultTtl.Value); - } - if (Optional.IsDefined(UniqueKeyPolicy)) - { - writer.WritePropertyName("uniqueKeyPolicy"u8); - writer.WriteObjectValue(UniqueKeyPolicy, options); - } - if (Optional.IsDefined(ConflictResolutionPolicy)) - { - writer.WritePropertyName("conflictResolutionPolicy"u8); - writer.WriteObjectValue(ConflictResolutionPolicy, options); - } - if (Optional.IsDefined(ClientEncryptionPolicy)) - { - writer.WritePropertyName("clientEncryptionPolicy"u8); - writer.WriteObjectValue(ClientEncryptionPolicy, options); - } - if (Optional.IsDefined(AnalyticalStorageTtl)) - { - writer.WritePropertyName("analyticalStorageTtl"u8); - writer.WriteNumberValue(AnalyticalStorageTtl.Value); - } - if (Optional.IsDefined(RestoreParameters)) - { - writer.WritePropertyName("restoreParameters"u8); - writer.WriteObjectValue(RestoreParameters, options); - } - if (Optional.IsDefined(CreateMode)) - { - writer.WritePropertyName("createMode"u8); - writer.WriteStringValue(CreateMode.Value.ToString()); - } - if (Optional.IsDefined(MaterializedViewDefinition)) - { - writer.WritePropertyName("materializedViewDefinition"u8); - writer.WriteObjectValue(MaterializedViewDefinition, options); - } - if (Optional.IsCollectionDefined(ComputedProperties)) - { - writer.WritePropertyName("computedProperties"u8); - writer.WriteStartArray(); - foreach (var item in ComputedProperties) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ExtendedCosmosDBSqlContainerResourceInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedCosmosDBSqlDatabaseResourceInfo.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedCosmosDBSqlDatabaseResourceInfo.Serialization.cs index 7b27df82b29d..b1cce37a6062 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedCosmosDBSqlDatabaseResourceInfo.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedCosmosDBSqlDatabaseResourceInfo.Serialization.cs @@ -19,6 +19,15 @@ public partial class ExtendedCosmosDBSqlDatabaseResourceInfo : IUtf8JsonSerializ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter wr throw new FormatException($"The model {nameof(ExtendedCosmosDBSqlDatabaseResourceInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Colls)) { writer.WritePropertyName("_colls"u8); @@ -52,34 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter wr writer.WritePropertyName("_etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - writer.WritePropertyName("id"u8); - writer.WriteStringValue(DatabaseName); - if (Optional.IsDefined(RestoreParameters)) - { - writer.WritePropertyName("restoreParameters"u8); - writer.WriteObjectValue(RestoreParameters, options); - } - if (Optional.IsDefined(CreateMode)) - { - writer.WritePropertyName("createMode"u8); - writer.WriteStringValue(CreateMode.Value.ToString()); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ExtendedCosmosDBSqlDatabaseResourceInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedCosmosDBSqlStoredProcedureResourceInfo.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedCosmosDBSqlStoredProcedureResourceInfo.Serialization.cs index 41471aadb20f..a97395c11e45 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedCosmosDBSqlStoredProcedureResourceInfo.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedCosmosDBSqlStoredProcedureResourceInfo.Serialization.cs @@ -19,6 +19,15 @@ public partial class ExtendedCosmosDBSqlStoredProcedureResourceInfo : IUtf8JsonS void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,7 @@ void IJsonModel.Write(Utf8JsonWr throw new FormatException($"The model {nameof(ExtendedCosmosDBSqlStoredProcedureResourceInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(Rid)) { writer.WritePropertyName("_rid"u8); @@ -42,29 +51,6 @@ void IJsonModel.Write(Utf8JsonWr writer.WritePropertyName("_etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - writer.WritePropertyName("id"u8); - writer.WriteStringValue(StoredProcedureName); - if (Optional.IsDefined(Body)) - { - writer.WritePropertyName("body"u8); - writer.WriteStringValue(Body); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ExtendedCosmosDBSqlStoredProcedureResourceInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedCosmosDBSqlTriggerResourceInfo.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedCosmosDBSqlTriggerResourceInfo.Serialization.cs index 9ddb3aec44e8..d5c2e0c2ec59 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedCosmosDBSqlTriggerResourceInfo.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedCosmosDBSqlTriggerResourceInfo.Serialization.cs @@ -19,6 +19,15 @@ public partial class ExtendedCosmosDBSqlTriggerResourceInfo : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(ExtendedCosmosDBSqlTriggerResourceInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(Rid)) { writer.WritePropertyName("_rid"u8); @@ -42,39 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter wri writer.WritePropertyName("_etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - writer.WritePropertyName("id"u8); - writer.WriteStringValue(TriggerName); - if (Optional.IsDefined(Body)) - { - writer.WritePropertyName("body"u8); - writer.WriteStringValue(Body); - } - if (Optional.IsDefined(TriggerType)) - { - writer.WritePropertyName("triggerType"u8); - writer.WriteStringValue(TriggerType.Value.ToString()); - } - if (Optional.IsDefined(TriggerOperation)) - { - writer.WritePropertyName("triggerOperation"u8); - writer.WriteStringValue(TriggerOperation.Value.ToString()); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ExtendedCosmosDBSqlTriggerResourceInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedCosmosDBSqlUserDefinedFunctionResourceInfo.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedCosmosDBSqlUserDefinedFunctionResourceInfo.Serialization.cs index aeff88c51ec8..fb078c7b860c 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedCosmosDBSqlUserDefinedFunctionResourceInfo.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedCosmosDBSqlUserDefinedFunctionResourceInfo.Serialization.cs @@ -19,6 +19,15 @@ public partial class ExtendedCosmosDBSqlUserDefinedFunctionResourceInfo : IUtf8J void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,7 @@ void IJsonModel.Write(Utf8Js throw new FormatException($"The model {nameof(ExtendedCosmosDBSqlUserDefinedFunctionResourceInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(Rid)) { writer.WritePropertyName("_rid"u8); @@ -42,29 +51,6 @@ void IJsonModel.Write(Utf8Js writer.WritePropertyName("_etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - writer.WritePropertyName("id"u8); - writer.WriteStringValue(FunctionName); - if (Optional.IsDefined(Body)) - { - writer.WritePropertyName("body"u8); - writer.WriteStringValue(Body); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ExtendedCosmosDBSqlUserDefinedFunctionResourceInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedGremlinDatabaseResourceInfo.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedGremlinDatabaseResourceInfo.Serialization.cs index f40c97f16f6f..b9e1c9e265ef 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedGremlinDatabaseResourceInfo.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedGremlinDatabaseResourceInfo.Serialization.cs @@ -19,6 +19,15 @@ public partial class ExtendedGremlinDatabaseResourceInfo : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(ExtendedGremlinDatabaseResourceInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(Rid)) { writer.WritePropertyName("_rid"u8); @@ -42,34 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer writer.WritePropertyName("_etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - writer.WritePropertyName("id"u8); - writer.WriteStringValue(DatabaseName); - if (Optional.IsDefined(RestoreParameters)) - { - writer.WritePropertyName("restoreParameters"u8); - writer.WriteObjectValue(RestoreParameters, options); - } - if (Optional.IsDefined(CreateMode)) - { - writer.WritePropertyName("createMode"u8); - writer.WriteStringValue(CreateMode.Value.ToString()); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ExtendedGremlinDatabaseResourceInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedGremlinGraphResourceInfo.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedGremlinGraphResourceInfo.Serialization.cs index 826a15d6ed91..94da76c891e4 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedGremlinGraphResourceInfo.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedGremlinGraphResourceInfo.Serialization.cs @@ -19,6 +19,15 @@ public partial class ExtendedGremlinGraphResourceInfo : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(ExtendedGremlinGraphResourceInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(Rid)) { writer.WritePropertyName("_rid"u8); @@ -42,64 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M writer.WritePropertyName("_etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - writer.WritePropertyName("id"u8); - writer.WriteStringValue(GraphName); - if (Optional.IsDefined(IndexingPolicy)) - { - writer.WritePropertyName("indexingPolicy"u8); - writer.WriteObjectValue(IndexingPolicy, options); - } - if (Optional.IsDefined(PartitionKey)) - { - writer.WritePropertyName("partitionKey"u8); - writer.WriteObjectValue(PartitionKey, options); - } - if (Optional.IsDefined(DefaultTtl)) - { - writer.WritePropertyName("defaultTtl"u8); - writer.WriteNumberValue(DefaultTtl.Value); - } - if (Optional.IsDefined(UniqueKeyPolicy)) - { - writer.WritePropertyName("uniqueKeyPolicy"u8); - writer.WriteObjectValue(UniqueKeyPolicy, options); - } - if (Optional.IsDefined(ConflictResolutionPolicy)) - { - writer.WritePropertyName("conflictResolutionPolicy"u8); - writer.WriteObjectValue(ConflictResolutionPolicy, options); - } - if (Optional.IsDefined(AnalyticalStorageTtl)) - { - writer.WritePropertyName("analyticalStorageTtl"u8); - writer.WriteNumberValue(AnalyticalStorageTtl.Value); - } - if (Optional.IsDefined(RestoreParameters)) - { - writer.WritePropertyName("restoreParameters"u8); - writer.WriteObjectValue(RestoreParameters, options); - } - if (Optional.IsDefined(CreateMode)) - { - writer.WritePropertyName("createMode"u8); - writer.WriteStringValue(CreateMode.Value.ToString()); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ExtendedGremlinGraphResourceInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedMongoDBCollectionResourceInfo.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedMongoDBCollectionResourceInfo.Serialization.cs index 0cf07353ddac..5fff64e46ced 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedMongoDBCollectionResourceInfo.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedMongoDBCollectionResourceInfo.Serialization.cs @@ -20,6 +20,15 @@ public partial class ExtendedMongoDBCollectionResourceInfo : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(ExtendedMongoDBCollectionResourceInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(Rid)) { writer.WritePropertyName("_rid"u8); @@ -43,60 +52,6 @@ void IJsonModel.Write(Utf8JsonWriter writ writer.WritePropertyName("_etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - writer.WritePropertyName("id"u8); - writer.WriteStringValue(CollectionName); - if (Optional.IsCollectionDefined(ShardKey)) - { - writer.WritePropertyName("shardKey"u8); - writer.WriteStartObject(); - foreach (var item in ShardKey) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Indexes)) - { - writer.WritePropertyName("indexes"u8); - writer.WriteStartArray(); - foreach (var item in Indexes) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(AnalyticalStorageTtl)) - { - writer.WritePropertyName("analyticalStorageTtl"u8); - writer.WriteNumberValue(AnalyticalStorageTtl.Value); - } - if (Optional.IsDefined(RestoreParameters)) - { - writer.WritePropertyName("restoreParameters"u8); - writer.WriteObjectValue(RestoreParameters, options); - } - if (Optional.IsDefined(CreateMode)) - { - writer.WritePropertyName("createMode"u8); - writer.WriteStringValue(CreateMode.Value.ToString()); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ExtendedMongoDBCollectionResourceInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedMongoDBDatabaseResourceInfo.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedMongoDBDatabaseResourceInfo.Serialization.cs index c2b1bae3719f..aea3139f15c3 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedMongoDBDatabaseResourceInfo.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedMongoDBDatabaseResourceInfo.Serialization.cs @@ -19,6 +19,15 @@ public partial class ExtendedMongoDBDatabaseResourceInfo : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(ExtendedMongoDBDatabaseResourceInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(Rid)) { writer.WritePropertyName("_rid"u8); @@ -42,34 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer writer.WritePropertyName("_etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - writer.WritePropertyName("id"u8); - writer.WriteStringValue(DatabaseName); - if (Optional.IsDefined(RestoreParameters)) - { - writer.WritePropertyName("restoreParameters"u8); - writer.WriteObjectValue(RestoreParameters, options); - } - if (Optional.IsDefined(CreateMode)) - { - writer.WritePropertyName("createMode"u8); - writer.WriteStringValue(CreateMode.Value.ToString()); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ExtendedMongoDBDatabaseResourceInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedRestorableGremlinDatabaseResourceInfo.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedRestorableGremlinDatabaseResourceInfo.Serialization.cs index 45a8454980c9..a8c425ed235f 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedRestorableGremlinDatabaseResourceInfo.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedRestorableGremlinDatabaseResourceInfo.Serialization.cs @@ -19,6 +19,15 @@ public partial class ExtendedRestorableGremlinDatabaseResourceInfo : IUtf8JsonSe void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWri throw new FormatException($"The model {nameof(ExtendedRestorableGremlinDatabaseResourceInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Rid)) { writer.WritePropertyName("_rid"u8); @@ -77,7 +85,6 @@ void IJsonModel.Write(Utf8JsonWri #endif } } - writer.WriteEndObject(); } ExtendedRestorableGremlinDatabaseResourceInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedRestorableGremlinGraphResourceInfo.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedRestorableGremlinGraphResourceInfo.Serialization.cs index 606e37ecd953..296907795a65 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedRestorableGremlinGraphResourceInfo.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedRestorableGremlinGraphResourceInfo.Serialization.cs @@ -19,6 +19,15 @@ public partial class ExtendedRestorableGremlinGraphResourceInfo : IUtf8JsonSeria void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(ExtendedRestorableGremlinGraphResourceInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Rid)) { writer.WritePropertyName("_rid"u8); @@ -77,7 +85,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } ExtendedRestorableGremlinGraphResourceInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedRestorableMongoDBCollectionResourceInfo.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedRestorableMongoDBCollectionResourceInfo.Serialization.cs index 62d11b7857a3..1d55cbee467a 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedRestorableMongoDBCollectionResourceInfo.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedRestorableMongoDBCollectionResourceInfo.Serialization.cs @@ -19,6 +19,15 @@ public partial class ExtendedRestorableMongoDBCollectionResourceInfo : IUtf8Json void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonW throw new FormatException($"The model {nameof(ExtendedRestorableMongoDBCollectionResourceInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Rid)) { writer.WritePropertyName("_rid"u8); @@ -77,7 +85,6 @@ void IJsonModel.Write(Utf8JsonW #endif } } - writer.WriteEndObject(); } ExtendedRestorableMongoDBCollectionResourceInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedRestorableMongoDBDatabaseResourceInfo.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedRestorableMongoDBDatabaseResourceInfo.Serialization.cs index fb349862ec02..0104df851a53 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedRestorableMongoDBDatabaseResourceInfo.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedRestorableMongoDBDatabaseResourceInfo.Serialization.cs @@ -19,6 +19,15 @@ public partial class ExtendedRestorableMongoDBDatabaseResourceInfo : IUtf8JsonSe void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWri throw new FormatException($"The model {nameof(ExtendedRestorableMongoDBDatabaseResourceInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Rid)) { writer.WritePropertyName("_rid"u8); @@ -77,7 +85,6 @@ void IJsonModel.Write(Utf8JsonWri #endif } } - writer.WriteEndObject(); } ExtendedRestorableMongoDBDatabaseResourceInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedRestorableSqlContainerResourceInfo.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedRestorableSqlContainerResourceInfo.Serialization.cs index c6214b71bc86..29b1d50a3bb3 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedRestorableSqlContainerResourceInfo.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedRestorableSqlContainerResourceInfo.Serialization.cs @@ -19,6 +19,15 @@ public partial class ExtendedRestorableSqlContainerResourceInfo : IUtf8JsonSeria void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(ExtendedRestorableSqlContainerResourceInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Rid)) { writer.WritePropertyName("_rid"u8); @@ -82,7 +90,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } ExtendedRestorableSqlContainerResourceInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedRestorableSqlDatabaseResourceInfo.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedRestorableSqlDatabaseResourceInfo.Serialization.cs index 86bb5a3be42b..3c587608f8c6 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedRestorableSqlDatabaseResourceInfo.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedRestorableSqlDatabaseResourceInfo.Serialization.cs @@ -19,6 +19,15 @@ public partial class ExtendedRestorableSqlDatabaseResourceInfo : IUtf8JsonSerial void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(ExtendedRestorableSqlDatabaseResourceInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Rid)) { writer.WritePropertyName("_rid"u8); @@ -82,7 +90,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } ExtendedRestorableSqlDatabaseResourceInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedRestorableTableResourceInfo.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedRestorableTableResourceInfo.Serialization.cs index ddc677c8e144..c73d33152a88 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedRestorableTableResourceInfo.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedRestorableTableResourceInfo.Serialization.cs @@ -19,6 +19,15 @@ public partial class ExtendedRestorableTableResourceInfo : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(ExtendedRestorableTableResourceInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Rid)) { writer.WritePropertyName("_rid"u8); @@ -77,7 +85,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } ExtendedRestorableTableResourceInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedThroughputSettingsResourceInfo.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedThroughputSettingsResourceInfo.Serialization.cs index 8bf010ecc831..0289016c61af 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedThroughputSettingsResourceInfo.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ExtendedThroughputSettingsResourceInfo.Serialization.cs @@ -19,6 +19,15 @@ public partial class ExtendedThroughputSettingsResourceInfo : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(ExtendedThroughputSettingsResourceInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(Rid)) { writer.WritePropertyName("_rid"u8); @@ -42,52 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter wri writer.WritePropertyName("_etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Throughput)) - { - writer.WritePropertyName("throughput"u8); - writer.WriteNumberValue(Throughput.Value); - } - if (Optional.IsDefined(AutoscaleSettings)) - { - writer.WritePropertyName("autoscaleSettings"u8); - writer.WriteObjectValue(AutoscaleSettings, options); - } - if (options.Format != "W" && Optional.IsDefined(MinimumThroughput)) - { - writer.WritePropertyName("minimumThroughput"u8); - writer.WriteStringValue(MinimumThroughput); - } - if (options.Format != "W" && Optional.IsDefined(OfferReplacePending)) - { - writer.WritePropertyName("offerReplacePending"u8); - writer.WriteStringValue(OfferReplacePending); - } - if (options.Format != "W" && Optional.IsDefined(InstantMaximumThroughput)) - { - writer.WritePropertyName("instantMaximumThroughput"u8); - writer.WriteStringValue(InstantMaximumThroughput); - } - if (options.Format != "W" && Optional.IsDefined(SoftAllowedMaximumThroughput)) - { - writer.WritePropertyName("softAllowedMaximumThroughput"u8); - writer.WriteStringValue(SoftAllowedMaximumThroughput); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ExtendedThroughputSettingsResourceInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GraphApiComputeRegionalService.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GraphApiComputeRegionalService.Serialization.cs index 1ca2651bbce9..7b1e023a8ea5 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GraphApiComputeRegionalService.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GraphApiComputeRegionalService.Serialization.cs @@ -19,6 +19,15 @@ public partial class GraphApiComputeRegionalService : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,43 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(GraphApiComputeRegionalService)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(GraphApiComputeEndpoint)) { writer.WritePropertyName("graphApiComputeEndpoint"u8); writer.WriteStringValue(GraphApiComputeEndpoint); } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (options.Format != "W" && Optional.IsDefined(Status)) - { - writer.WritePropertyName("status"u8); - writer.WriteStringValue(Status.Value.ToString()); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } GraphApiComputeRegionalService IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GraphApiComputeServiceProperties.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GraphApiComputeServiceProperties.Serialization.cs index 73a9635f5d2b..675899374a83 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GraphApiComputeServiceProperties.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GraphApiComputeServiceProperties.Serialization.cs @@ -20,6 +20,15 @@ public partial class GraphApiComputeServiceProperties : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(GraphApiComputeServiceProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(GraphApiComputeEndpoint)) { writer.WritePropertyName("graphApiComputeEndpoint"u8); @@ -43,28 +52,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M } writer.WriteEndArray(); } - if (options.Format != "W" && Optional.IsDefined(CreatedOn)) - { - writer.WritePropertyName("creationTime"u8); - writer.WriteStringValue(CreatedOn.Value, "O"); - } - if (Optional.IsDefined(InstanceSize)) - { - writer.WritePropertyName("instanceSize"u8); - writer.WriteStringValue(InstanceSize.Value.ToString()); - } - if (Optional.IsDefined(InstanceCount)) - { - writer.WritePropertyName("instanceCount"u8); - writer.WriteNumberValue(InstanceCount.Value); - } - writer.WritePropertyName("serviceType"u8); - writer.WriteStringValue(ServiceType.ToString()); - if (options.Format != "W" && Optional.IsDefined(Status)) - { - writer.WritePropertyName("status"u8); - writer.WriteStringValue(Status.Value.ToString()); - } foreach (var item in AdditionalProperties) { writer.WritePropertyName(item.Key); @@ -77,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M } #endif } - writer.WriteEndObject(); } GraphApiComputeServiceProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GraphApiComputeServiceResourceCreateUpdateProperties.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GraphApiComputeServiceResourceCreateUpdateProperties.Serialization.cs index 1489375d86f5..0cff6befe01e 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GraphApiComputeServiceResourceCreateUpdateProperties.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GraphApiComputeServiceResourceCreateUpdateProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class GraphApiComputeServiceResourceCreateUpdateProperties : IUtf void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,35 +34,7 @@ void IJsonModel.Write(Utf8 throw new FormatException($"The model {nameof(GraphApiComputeServiceResourceCreateUpdateProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(InstanceSize)) - { - writer.WritePropertyName("instanceSize"u8); - writer.WriteStringValue(InstanceSize.Value.ToString()); - } - if (Optional.IsDefined(InstanceCount)) - { - writer.WritePropertyName("instanceCount"u8); - writer.WriteNumberValue(InstanceCount.Value); - } - writer.WritePropertyName("serviceType"u8); - writer.WriteStringValue(ServiceType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } GraphApiComputeServiceResourceCreateUpdateProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GraphResourceGetPropertiesOptions.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GraphResourceGetPropertiesOptions.Serialization.cs index b596b434dbd6..e0554e345682 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GraphResourceGetPropertiesOptions.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GraphResourceGetPropertiesOptions.Serialization.cs @@ -19,6 +19,15 @@ public partial class GraphResourceGetPropertiesOptions : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,33 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(GraphResourceGetPropertiesOptions)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(Throughput)) - { - writer.WritePropertyName("throughput"u8); - writer.WriteNumberValue(Throughput.Value); - } - if (Optional.IsDefined(AutoscaleSettings)) - { - writer.WritePropertyName("autoscaleSettings"u8); - writer.WriteObjectValue(AutoscaleSettings, options); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } GraphResourceGetPropertiesOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GraphResourceGetResultCreateOrUpdateContent.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GraphResourceGetResultCreateOrUpdateContent.Serialization.cs index 672c9ad5d5cb..5df884e44ffe 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GraphResourceGetResultCreateOrUpdateContent.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GraphResourceGetResultCreateOrUpdateContent.Serialization.cs @@ -22,6 +22,15 @@ public partial class GraphResourceGetResultCreateOrUpdateContent : IUtf8JsonSeri void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -29,46 +38,13 @@ void IJsonModel.Write(Utf8JsonWrite throw new FormatException($"The model {nameof(GraphResourceGetResultCreateOrUpdateContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; JsonSerializer.Serialize(writer, Identity, serializeOptions); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); writer.WritePropertyName("resource"u8); @@ -79,22 +55,6 @@ void IJsonModel.Write(Utf8JsonWrite writer.WriteObjectValue(Options, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } GraphResourceGetResultCreateOrUpdateContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GraphResourcesListResult.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GraphResourcesListResult.Serialization.cs index f00a5061ab48..6b51f9f2fdc9 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GraphResourcesListResult.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GraphResourcesListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class GraphResourcesListResult : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(GraphResourcesListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } GraphResourcesListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GremlinDatabaseCreateOrUpdateContent.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GremlinDatabaseCreateOrUpdateContent.Serialization.cs index ff46c6e2103b..2e5a328b4e78 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GremlinDatabaseCreateOrUpdateContent.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GremlinDatabaseCreateOrUpdateContent.Serialization.cs @@ -21,6 +21,15 @@ public partial class GremlinDatabaseCreateOrUpdateContent : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,46 +37,13 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(GremlinDatabaseCreateOrUpdateContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; JsonSerializer.Serialize(writer, Identity, serializeOptions); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); writer.WritePropertyName("resource"u8); @@ -78,22 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter write writer.WriteObjectValue(Options, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } GremlinDatabaseCreateOrUpdateContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GremlinDatabaseListResult.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GremlinDatabaseListResult.Serialization.cs index 7b2bb97896b8..d50333353c62 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GremlinDatabaseListResult.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GremlinDatabaseListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class GremlinDatabaseListResult : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(GremlinDatabaseListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } GremlinDatabaseListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GremlinDatabasePropertiesConfig.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GremlinDatabasePropertiesConfig.Serialization.cs index 178fd6a131f5..bb20680acae7 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GremlinDatabasePropertiesConfig.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GremlinDatabasePropertiesConfig.Serialization.cs @@ -19,6 +19,15 @@ public partial class GremlinDatabasePropertiesConfig : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,33 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(GremlinDatabasePropertiesConfig)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(Throughput)) - { - writer.WritePropertyName("throughput"u8); - writer.WriteNumberValue(Throughput.Value); - } - if (Optional.IsDefined(AutoscaleSettings)) - { - writer.WritePropertyName("autoscaleSettings"u8); - writer.WriteObjectValue(AutoscaleSettings, options); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } GremlinDatabasePropertiesConfig IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GremlinDatabaseResourceInfo.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GremlinDatabaseResourceInfo.Serialization.cs index 1585b3ca4a2a..d3b8a59a3ce2 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GremlinDatabaseResourceInfo.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GremlinDatabaseResourceInfo.Serialization.cs @@ -19,6 +19,15 @@ public partial class GremlinDatabaseResourceInfo : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(GremlinDatabaseResourceInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("id"u8); writer.WriteStringValue(DatabaseName); if (Optional.IsDefined(RestoreParameters)) @@ -54,7 +62,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } GremlinDatabaseResourceInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GremlinDatabaseRestoreResourceInfo.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GremlinDatabaseRestoreResourceInfo.Serialization.cs index 8d54bce19275..91ce3e88ab68 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GremlinDatabaseRestoreResourceInfo.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GremlinDatabaseRestoreResourceInfo.Serialization.cs @@ -20,6 +20,15 @@ public partial class GremlinDatabaseRestoreResourceInfo : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(GremlinDatabaseRestoreResourceInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(DatabaseName)) { writer.WritePropertyName("databaseName"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } GremlinDatabaseRestoreResourceInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GremlinGraphCreateOrUpdateContent.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GremlinGraphCreateOrUpdateContent.Serialization.cs index e3680fed5987..a0463bcb3150 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GremlinGraphCreateOrUpdateContent.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GremlinGraphCreateOrUpdateContent.Serialization.cs @@ -21,6 +21,15 @@ public partial class GremlinGraphCreateOrUpdateContent : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,46 +37,13 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(GremlinGraphCreateOrUpdateContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; JsonSerializer.Serialize(writer, Identity, serializeOptions); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); writer.WritePropertyName("resource"u8); @@ -78,22 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteObjectValue(Options, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } GremlinGraphCreateOrUpdateContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GremlinGraphListResult.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GremlinGraphListResult.Serialization.cs index c69967f259ec..e7b1d901de54 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GremlinGraphListResult.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GremlinGraphListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class GremlinGraphListResult : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(GremlinGraphListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } GremlinGraphListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GremlinGraphPropertiesConfig.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GremlinGraphPropertiesConfig.Serialization.cs index 7f5e2dc36b2f..2ce66298d35a 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GremlinGraphPropertiesConfig.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GremlinGraphPropertiesConfig.Serialization.cs @@ -19,6 +19,15 @@ public partial class GremlinGraphPropertiesConfig : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,33 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(GremlinGraphPropertiesConfig)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(Throughput)) - { - writer.WritePropertyName("throughput"u8); - writer.WriteNumberValue(Throughput.Value); - } - if (Optional.IsDefined(AutoscaleSettings)) - { - writer.WritePropertyName("autoscaleSettings"u8); - writer.WriteObjectValue(AutoscaleSettings, options); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } GremlinGraphPropertiesConfig IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GremlinGraphResourceInfo.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GremlinGraphResourceInfo.Serialization.cs index 030fb82b9131..ed573b14b664 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GremlinGraphResourceInfo.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/GremlinGraphResourceInfo.Serialization.cs @@ -19,6 +19,15 @@ public partial class GremlinGraphResourceInfo : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(GremlinGraphResourceInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("id"u8); writer.WriteStringValue(GraphName); if (Optional.IsDefined(IndexingPolicy)) @@ -84,7 +92,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } GremlinGraphResourceInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ListBackups.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ListBackups.Serialization.cs index 242a9a8c2c49..cb17f48f0c1c 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ListBackups.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ListBackups.Serialization.cs @@ -20,6 +20,15 @@ internal partial class ListBackups : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio throw new FormatException($"The model {nameof(ListBackups)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio #endif } } - writer.WriteEndObject(); } ListBackups IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ListCommands.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ListCommands.Serialization.cs index d16c6979ea3f..fefeb5ec9e88 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ListCommands.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ListCommands.Serialization.cs @@ -20,6 +20,15 @@ internal partial class ListCommands : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(ListCommands)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti #endif } } - writer.WriteEndObject(); } ListCommands IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MaterializedViewDefinition.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MaterializedViewDefinition.Serialization.cs index 4856a1ed72c1..148961a3057c 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MaterializedViewDefinition.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MaterializedViewDefinition.Serialization.cs @@ -19,6 +19,15 @@ public partial class MaterializedViewDefinition : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(MaterializedViewDefinition)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(SourceCollectionRid)) { writer.WritePropertyName("sourceCollectionRid"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } MaterializedViewDefinition IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MaterializedViewsBuilderRegionalService.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MaterializedViewsBuilderRegionalService.Serialization.cs index f20d8c53bccf..4391ae637ba4 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MaterializedViewsBuilderRegionalService.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MaterializedViewsBuilderRegionalService.Serialization.cs @@ -19,6 +19,15 @@ public partial class MaterializedViewsBuilderRegionalService : IUtf8JsonSerializ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,38 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter wr throw new FormatException($"The model {nameof(MaterializedViewsBuilderRegionalService)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (options.Format != "W" && Optional.IsDefined(Status)) - { - writer.WritePropertyName("status"u8); - writer.WriteStringValue(Status.Value.ToString()); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } MaterializedViewsBuilderRegionalService IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MaterializedViewsBuilderServiceProperties.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MaterializedViewsBuilderServiceProperties.Serialization.cs index fb716a375efb..bfcb4cbf0a92 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MaterializedViewsBuilderServiceProperties.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MaterializedViewsBuilderServiceProperties.Serialization.cs @@ -20,6 +20,15 @@ public partial class MaterializedViewsBuilderServiceProperties : IUtf8JsonSerial void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(MaterializedViewsBuilderServiceProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsCollectionDefined(Locations)) { writer.WritePropertyName("locations"u8); @@ -38,28 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter } writer.WriteEndArray(); } - if (options.Format != "W" && Optional.IsDefined(CreatedOn)) - { - writer.WritePropertyName("creationTime"u8); - writer.WriteStringValue(CreatedOn.Value, "O"); - } - if (Optional.IsDefined(InstanceSize)) - { - writer.WritePropertyName("instanceSize"u8); - writer.WriteStringValue(InstanceSize.Value.ToString()); - } - if (Optional.IsDefined(InstanceCount)) - { - writer.WritePropertyName("instanceCount"u8); - writer.WriteNumberValue(InstanceCount.Value); - } - writer.WritePropertyName("serviceType"u8); - writer.WriteStringValue(ServiceType.ToString()); - if (options.Format != "W" && Optional.IsDefined(Status)) - { - writer.WritePropertyName("status"u8); - writer.WriteStringValue(Status.Value.ToString()); - } foreach (var item in AdditionalProperties) { writer.WritePropertyName(item.Key); @@ -72,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter } #endif } - writer.WriteEndObject(); } MaterializedViewsBuilderServiceProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MaterializedViewsBuilderServiceResourceCreateUpdateProperties.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MaterializedViewsBuilderServiceResourceCreateUpdateProperties.Serialization.cs index 4ad07019cfb3..4a3c079fbc68 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MaterializedViewsBuilderServiceResourceCreateUpdateProperties.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MaterializedViewsBuilderServiceResourceCreateUpdateProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class MaterializedViewsBuilderServiceResourceCreateUpdateProperti void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,35 +34,7 @@ void IJsonModel.W throw new FormatException($"The model {nameof(MaterializedViewsBuilderServiceResourceCreateUpdateProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(InstanceSize)) - { - writer.WritePropertyName("instanceSize"u8); - writer.WriteStringValue(InstanceSize.Value.ToString()); - } - if (Optional.IsDefined(InstanceCount)) - { - writer.WritePropertyName("instanceCount"u8); - writer.WriteNumberValue(InstanceCount.Value); - } - writer.WritePropertyName("serviceType"u8); - writer.WriteStringValue(ServiceType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } MaterializedViewsBuilderServiceResourceCreateUpdateProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MergeParameters.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MergeParameters.Serialization.cs index 1fcc123a5530..7fa43a5cb630 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MergeParameters.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MergeParameters.Serialization.cs @@ -18,6 +18,15 @@ public partial class MergeParameters : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(MergeParameters)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IsDryRun)) { writer.WritePropertyName("isDryRun"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO #endif } } - writer.WriteEndObject(); } MergeParameters IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBCollectionCreateOrUpdateContent.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBCollectionCreateOrUpdateContent.Serialization.cs index 66a97aabb73c..1e351718f51f 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBCollectionCreateOrUpdateContent.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBCollectionCreateOrUpdateContent.Serialization.cs @@ -21,6 +21,15 @@ public partial class MongoDBCollectionCreateOrUpdateContent : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,46 +37,13 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(MongoDBCollectionCreateOrUpdateContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; JsonSerializer.Serialize(writer, Identity, serializeOptions); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); writer.WritePropertyName("resource"u8); @@ -78,22 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter wri writer.WriteObjectValue(Options, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } MongoDBCollectionCreateOrUpdateContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBCollectionListResult.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBCollectionListResult.Serialization.cs index 2afc73da615a..0ac8c78d165d 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBCollectionListResult.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBCollectionListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class MongoDBCollectionListResult : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(MongoDBCollectionListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } MongoDBCollectionListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBCollectionPropertiesConfig.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBCollectionPropertiesConfig.Serialization.cs index 94f7285a7f4f..efa1cb862249 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBCollectionPropertiesConfig.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBCollectionPropertiesConfig.Serialization.cs @@ -19,6 +19,15 @@ public partial class MongoDBCollectionPropertiesConfig : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,33 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(MongoDBCollectionPropertiesConfig)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(Throughput)) - { - writer.WritePropertyName("throughput"u8); - writer.WriteNumberValue(Throughput.Value); - } - if (Optional.IsDefined(AutoscaleSettings)) - { - writer.WritePropertyName("autoscaleSettings"u8); - writer.WriteObjectValue(AutoscaleSettings, options); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } MongoDBCollectionPropertiesConfig IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBCollectionResourceInfo.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBCollectionResourceInfo.Serialization.cs index 109ca22b7b83..d82546cbab6b 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBCollectionResourceInfo.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBCollectionResourceInfo.Serialization.cs @@ -20,6 +20,15 @@ public partial class MongoDBCollectionResourceInfo : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(MongoDBCollectionResourceInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("id"u8); writer.WriteStringValue(CollectionName); if (Optional.IsCollectionDefined(ShardKey)) @@ -81,7 +89,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } MongoDBCollectionResourceInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBDatabaseCreateOrUpdateContent.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBDatabaseCreateOrUpdateContent.Serialization.cs index d7cb06e66414..8162fefb6832 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBDatabaseCreateOrUpdateContent.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBDatabaseCreateOrUpdateContent.Serialization.cs @@ -21,6 +21,15 @@ public partial class MongoDBDatabaseCreateOrUpdateContent : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,46 +37,13 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(MongoDBDatabaseCreateOrUpdateContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; JsonSerializer.Serialize(writer, Identity, serializeOptions); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); writer.WritePropertyName("resource"u8); @@ -78,22 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter write writer.WriteObjectValue(Options, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } MongoDBDatabaseCreateOrUpdateContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBDatabaseListResult.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBDatabaseListResult.Serialization.cs index d54848f9bb99..f31007b5cc9f 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBDatabaseListResult.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBDatabaseListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class MongoDBDatabaseListResult : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(MongoDBDatabaseListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } MongoDBDatabaseListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBDatabasePropertiesConfig.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBDatabasePropertiesConfig.Serialization.cs index 670e3aacce89..999049ebb8a4 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBDatabasePropertiesConfig.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBDatabasePropertiesConfig.Serialization.cs @@ -19,6 +19,15 @@ public partial class MongoDBDatabasePropertiesConfig : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,33 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(MongoDBDatabasePropertiesConfig)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(Throughput)) - { - writer.WritePropertyName("throughput"u8); - writer.WriteNumberValue(Throughput.Value); - } - if (Optional.IsDefined(AutoscaleSettings)) - { - writer.WritePropertyName("autoscaleSettings"u8); - writer.WriteObjectValue(AutoscaleSettings, options); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } MongoDBDatabasePropertiesConfig IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBDatabaseResourceInfo.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBDatabaseResourceInfo.Serialization.cs index e6ab0fabae3a..a0ab5283a7bd 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBDatabaseResourceInfo.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBDatabaseResourceInfo.Serialization.cs @@ -19,6 +19,15 @@ public partial class MongoDBDatabaseResourceInfo : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(MongoDBDatabaseResourceInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("id"u8); writer.WriteStringValue(DatabaseName); if (Optional.IsDefined(RestoreParameters)) @@ -54,7 +62,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } MongoDBDatabaseResourceInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBIndex.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBIndex.Serialization.cs index 460c3d09bf08..bdc0db9910e0 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBIndex.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBIndex.Serialization.cs @@ -19,6 +19,15 @@ public partial class MongoDBIndex : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(MongoDBIndex)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Key)) { writer.WritePropertyName("key"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti #endif } } - writer.WriteEndObject(); } MongoDBIndex IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBIndexConfig.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBIndexConfig.Serialization.cs index 8f5b1aad1c8d..d5ea5f1e7448 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBIndexConfig.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBIndexConfig.Serialization.cs @@ -19,6 +19,15 @@ public partial class MongoDBIndexConfig : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(MongoDBIndexConfig)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ExpireAfterSeconds)) { writer.WritePropertyName("expireAfterSeconds"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } MongoDBIndexConfig IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBPrivilege.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBPrivilege.Serialization.cs index 0af7cac9e27f..903afa4f131f 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBPrivilege.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBPrivilege.Serialization.cs @@ -20,6 +20,15 @@ public partial class MongoDBPrivilege : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(MongoDBPrivilege)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Resource)) { writer.WritePropertyName("resource"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } MongoDBPrivilege IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBPrivilegeResourceInfo.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBPrivilegeResourceInfo.Serialization.cs index 3f6272853f51..71a3a0115bbd 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBPrivilegeResourceInfo.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBPrivilegeResourceInfo.Serialization.cs @@ -19,6 +19,15 @@ public partial class MongoDBPrivilegeResourceInfo : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(MongoDBPrivilegeResourceInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(DBName)) { writer.WritePropertyName("db"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } MongoDBPrivilegeResourceInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBRole.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBRole.Serialization.cs index 97eaad7bbce2..5f8a50f6a8bd 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBRole.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBRole.Serialization.cs @@ -19,6 +19,15 @@ public partial class MongoDBRole : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio throw new FormatException($"The model {nameof(MongoDBRole)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(DBName)) { writer.WritePropertyName("db"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio #endif } } - writer.WriteEndObject(); } MongoDBRole IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBRoleDefinitionCreateOrUpdateContent.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBRoleDefinitionCreateOrUpdateContent.Serialization.cs index c0d1571dda29..95a557767253 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBRoleDefinitionCreateOrUpdateContent.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBRoleDefinitionCreateOrUpdateContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class MongoDBRoleDefinitionCreateOrUpdateContent : IUtf8JsonSeria void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(MongoDBRoleDefinitionCreateOrUpdateContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(RoleName)) @@ -79,7 +87,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } MongoDBRoleDefinitionCreateOrUpdateContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBRoleDefinitionListResult.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBRoleDefinitionListResult.Serialization.cs index 851624673c5d..4a6fc515909f 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBRoleDefinitionListResult.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBRoleDefinitionListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class MongoDBRoleDefinitionListResult : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(MongoDBRoleDefinitionListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } MongoDBRoleDefinitionListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBUserDefinitionCreateOrUpdateContent.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBUserDefinitionCreateOrUpdateContent.Serialization.cs index 28866eac4562..ccad2c721fe2 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBUserDefinitionCreateOrUpdateContent.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBUserDefinitionCreateOrUpdateContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class MongoDBUserDefinitionCreateOrUpdateContent : IUtf8JsonSeria void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(MongoDBUserDefinitionCreateOrUpdateContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(UserName)) @@ -79,7 +87,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } MongoDBUserDefinitionCreateOrUpdateContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBUserDefinitionListResult.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBUserDefinitionListResult.Serialization.cs index 9c4404916864..9b68a2188c4a 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBUserDefinitionListResult.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoDBUserDefinitionListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class MongoDBUserDefinitionListResult : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(MongoDBUserDefinitionListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } MongoDBUserDefinitionListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoIndexKeys.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoIndexKeys.Serialization.cs index 547efe17afa7..82cdaf86a0df 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoIndexKeys.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/MongoIndexKeys.Serialization.cs @@ -20,6 +20,15 @@ internal partial class MongoIndexKeys : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(MongoIndexKeys)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Keys)) { writer.WritePropertyName("keys"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp #endif } } - writer.WriteEndObject(); } MongoIndexKeys IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/NetworkSecurityPerimeter.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/NetworkSecurityPerimeter.Serialization.cs index 0f1a348e6a32..2201730376fe 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/NetworkSecurityPerimeter.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/NetworkSecurityPerimeter.Serialization.cs @@ -19,6 +19,15 @@ public partial class NetworkSecurityPerimeter : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(NetworkSecurityPerimeter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } NetworkSecurityPerimeter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/NetworkSecurityPerimeterConfigurationListResult.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/NetworkSecurityPerimeterConfigurationListResult.Serialization.cs index 941563248e65..acb5696a8a4f 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/NetworkSecurityPerimeterConfigurationListResult.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/NetworkSecurityPerimeterConfigurationListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class NetworkSecurityPerimeterConfigurationListResult : IUtf8Js void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonW throw new FormatException($"The model {nameof(NetworkSecurityPerimeterConfigurationListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonW #endif } } - writer.WriteEndObject(); } NetworkSecurityPerimeterConfigurationListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/NetworkSecurityPerimeterConfigurationProperties.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/NetworkSecurityPerimeterConfigurationProperties.Serialization.cs index 52e5510825bb..b1496c4bc2fa 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/NetworkSecurityPerimeterConfigurationProperties.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/NetworkSecurityPerimeterConfigurationProperties.Serialization.cs @@ -20,6 +20,15 @@ public partial class NetworkSecurityPerimeterConfigurationProperties : IUtf8Json void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonW throw new FormatException($"The model {nameof(NetworkSecurityPerimeterConfigurationProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) { writer.WritePropertyName("provisioningState"u8); @@ -73,7 +81,6 @@ void IJsonModel.Write(Utf8JsonW #endif } } - writer.WriteEndObject(); } NetworkSecurityPerimeterConfigurationProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/NetworkSecurityProfile.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/NetworkSecurityProfile.Serialization.cs index 154b9b9f4e36..20f069e4e726 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/NetworkSecurityProfile.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/NetworkSecurityProfile.Serialization.cs @@ -20,6 +20,15 @@ public partial class NetworkSecurityProfile : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(NetworkSecurityProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -78,7 +86,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } NetworkSecurityProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/PartitionMetric.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/PartitionMetric.Serialization.cs index 360e3135fbbf..c8acd4b8f644 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/PartitionMetric.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/PartitionMetric.Serialization.cs @@ -20,6 +20,15 @@ public partial class PartitionMetric : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(PartitionMetric)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(PartitionId)) { writer.WritePropertyName("partitionId"u8); @@ -38,57 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO writer.WritePropertyName("partitionKeyRangeId"u8); writer.WriteStringValue(PartitionKeyRangeId); } - if (options.Format != "W" && Optional.IsDefined(StartOn)) - { - writer.WritePropertyName("startTime"u8); - writer.WriteStringValue(StartOn.Value, "O"); - } - if (options.Format != "W" && Optional.IsDefined(EndOn)) - { - writer.WritePropertyName("endTime"u8); - writer.WriteStringValue(EndOn.Value, "O"); - } - if (options.Format != "W" && Optional.IsDefined(TimeGrain)) - { - writer.WritePropertyName("timeGrain"u8); - writer.WriteStringValue(TimeGrain); - } - if (options.Format != "W" && Optional.IsDefined(Unit)) - { - writer.WritePropertyName("unit"u8); - writer.WriteStringValue(Unit.Value.ToString()); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteObjectValue(Name, options); - } - if (options.Format != "W" && Optional.IsCollectionDefined(MetricValues)) - { - writer.WritePropertyName("metricValues"u8); - writer.WriteStartArray(); - foreach (var item in MetricValues) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } PartitionMetric IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/PartitionMetricListResult.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/PartitionMetricListResult.Serialization.cs index 2d9002d9347f..72cbba71ae4f 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/PartitionMetricListResult.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/PartitionMetricListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class PartitionMetricListResult : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(PartitionMetricListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } PartitionMetricListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/PartitionUsage.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/PartitionUsage.Serialization.cs index ee7d85d4da9f..6adfe62b759d 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/PartitionUsage.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/PartitionUsage.Serialization.cs @@ -19,6 +19,15 @@ public partial class PartitionUsage : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(PartitionUsage)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(PartitionId)) { writer.WritePropertyName("partitionId"u8); @@ -37,47 +46,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp writer.WritePropertyName("partitionKeyRangeId"u8); writer.WriteStringValue(PartitionKeyRangeId); } - if (options.Format != "W" && Optional.IsDefined(Unit)) - { - writer.WritePropertyName("unit"u8); - writer.WriteStringValue(Unit.Value.ToString()); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteObjectValue(Name, options); - } - if (options.Format != "W" && Optional.IsDefined(QuotaPeriod)) - { - writer.WritePropertyName("quotaPeriod"u8); - writer.WriteStringValue(QuotaPeriod); - } - if (options.Format != "W" && Optional.IsDefined(Limit)) - { - writer.WritePropertyName("limit"u8); - writer.WriteNumberValue(Limit.Value); - } - if (options.Format != "W" && Optional.IsDefined(CurrentValue)) - { - writer.WritePropertyName("currentValue"u8); - writer.WriteNumberValue(CurrentValue.Value); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } PartitionUsage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/PartitionUsagesResult.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/PartitionUsagesResult.Serialization.cs index daddf31dad32..a6dfd22a8e69 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/PartitionUsagesResult.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/PartitionUsagesResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class PartitionUsagesResult : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(PartitionUsagesResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } PartitionUsagesResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/PercentileMetricListResult.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/PercentileMetricListResult.Serialization.cs index c24685e0db74..66a20fc9f1ee 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/PercentileMetricListResult.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/PercentileMetricListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class PercentileMetricListResult : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(PercentileMetricListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } PercentileMetricListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/PercentileMetricValue.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/PercentileMetricValue.Serialization.cs index 94566185a9a9..1d54fa18f765 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/PercentileMetricValue.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/PercentileMetricValue.Serialization.cs @@ -19,6 +19,15 @@ public partial class PercentileMetricValue : IUtf8JsonSerializable, IJsonModel

((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(PercentileMetricValue)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(P10)) { writer.WritePropertyName("P10"u8); @@ -62,52 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW writer.WritePropertyName("P99"u8); writer.WriteNumberValue(P99.Value); } - if (options.Format != "W" && Optional.IsDefined(Count)) - { - writer.WritePropertyName("_count"u8); - writer.WriteNumberValue(Count.Value); - } - if (options.Format != "W" && Optional.IsDefined(Average)) - { - writer.WritePropertyName("average"u8); - writer.WriteNumberValue(Average.Value); - } - if (options.Format != "W" && Optional.IsDefined(Maximum)) - { - writer.WritePropertyName("maximum"u8); - writer.WriteNumberValue(Maximum.Value); - } - if (options.Format != "W" && Optional.IsDefined(Minimum)) - { - writer.WritePropertyName("minimum"u8); - writer.WriteNumberValue(Minimum.Value); - } - if (options.Format != "W" && Optional.IsDefined(Timestamp)) - { - writer.WritePropertyName("timestamp"u8); - writer.WriteStringValue(Timestamp.Value, "O"); - } - if (options.Format != "W" && Optional.IsDefined(Total)) - { - writer.WritePropertyName("total"u8); - writer.WriteNumberValue(Total.Value); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } PercentileMetricValue IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/PeriodicModeBackupPolicy.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/PeriodicModeBackupPolicy.Serialization.cs index e543fb39594d..2c4f77581572 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/PeriodicModeBackupPolicy.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/PeriodicModeBackupPolicy.Serialization.cs @@ -19,6 +19,15 @@ public partial class PeriodicModeBackupPolicy : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,35 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(PeriodicModeBackupPolicy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(PeriodicModeProperties)) { writer.WritePropertyName("periodicModeProperties"u8); writer.WriteObjectValue(PeriodicModeProperties, options); } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(BackupPolicyType.ToString()); - if (Optional.IsDefined(MigrationState)) - { - writer.WritePropertyName("migrationState"u8); - writer.WriteObjectValue(MigrationState, options); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } PeriodicModeBackupPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/PeriodicModeProperties.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/PeriodicModeProperties.Serialization.cs index 0713551592a6..605f7159a357 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/PeriodicModeProperties.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/PeriodicModeProperties.Serialization.cs @@ -19,6 +19,15 @@ public partial class PeriodicModeProperties : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(PeriodicModeProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(BackupIntervalInMinutes)) { writer.WritePropertyName("backupIntervalInMinutes"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } PeriodicModeProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/PhysicalPartitionStorageInfo.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/PhysicalPartitionStorageInfo.Serialization.cs index a572464131fc..52dbfc4bbbd5 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/PhysicalPartitionStorageInfo.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/PhysicalPartitionStorageInfo.Serialization.cs @@ -19,6 +19,15 @@ public partial class PhysicalPartitionStorageInfo : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(PhysicalPartitionStorageInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } PhysicalPartitionStorageInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/PhysicalPartitionStorageInfoCollection.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/PhysicalPartitionStorageInfoCollection.Serialization.cs index ed2bb4b36431..1b0f7165cb74 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/PhysicalPartitionStorageInfoCollection.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/PhysicalPartitionStorageInfoCollection.Serialization.cs @@ -20,6 +20,15 @@ public partial class PhysicalPartitionStorageInfoCollection : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(PhysicalPartitionStorageInfoCollection)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(PhysicalPartitionStorageInfoCollectionValue)) { writer.WritePropertyName("physicalPartitionStorageInfoCollection"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } PhysicalPartitionStorageInfoCollection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/PhysicalPartitionThroughputInfoProperties.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/PhysicalPartitionThroughputInfoProperties.Serialization.cs index 6bc181c170b0..7617b7fe0d1f 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/PhysicalPartitionThroughputInfoProperties.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/PhysicalPartitionThroughputInfoProperties.Serialization.cs @@ -20,6 +20,15 @@ internal partial class PhysicalPartitionThroughputInfoProperties : IUtf8JsonSeri void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(PhysicalPartitionThroughputInfoProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(PhysicalPartitionThroughputInfo)) { writer.WritePropertyName("physicalPartitionThroughputInfo"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } PhysicalPartitionThroughputInfoProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/PhysicalPartitionThroughputInfoResource.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/PhysicalPartitionThroughputInfoResource.Serialization.cs index f3f7e055ab13..553f257c5f4d 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/PhysicalPartitionThroughputInfoResource.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/PhysicalPartitionThroughputInfoResource.Serialization.cs @@ -19,6 +19,15 @@ public partial class PhysicalPartitionThroughputInfoResource : IUtf8JsonSerializ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter wr throw new FormatException($"The model {nameof(PhysicalPartitionThroughputInfoResource)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("id"u8); writer.WriteStringValue(Id); if (Optional.IsDefined(Throughput)) @@ -49,7 +57,6 @@ void IJsonModel.Write(Utf8JsonWriter wr #endif } } - writer.WriteEndObject(); } PhysicalPartitionThroughputInfoResource IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/PhysicalPartitionThroughputInfoResult.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/PhysicalPartitionThroughputInfoResult.Serialization.cs index fb2383870ae5..7b9e1a2647c0 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/PhysicalPartitionThroughputInfoResult.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/PhysicalPartitionThroughputInfoResult.Serialization.cs @@ -21,6 +21,15 @@ public partial class PhysicalPartitionThroughputInfoResult : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,46 +37,13 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(PhysicalPartitionThroughputInfoResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; JsonSerializer.Serialize(writer, Identity, serializeOptions); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Resource)) @@ -76,22 +52,6 @@ void IJsonModel.Write(Utf8JsonWriter writ writer.WriteObjectValue(Resource, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } PhysicalPartitionThroughputInfoResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/PhysicalPartitionThroughputInfoResultPropertiesResource.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/PhysicalPartitionThroughputInfoResultPropertiesResource.Serialization.cs index 1cdc443d18f8..a0e69f10f0cf 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/PhysicalPartitionThroughputInfoResultPropertiesResource.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/PhysicalPartitionThroughputInfoResultPropertiesResource.Serialization.cs @@ -20,6 +20,15 @@ internal partial class PhysicalPartitionThroughputInfoResultPropertiesResource : void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,33 +36,7 @@ void IJsonModel.Write(U throw new FormatException($"The model {nameof(PhysicalPartitionThroughputInfoResultPropertiesResource)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(PhysicalPartitionThroughputInfo)) - { - writer.WritePropertyName("physicalPartitionThroughputInfo"u8); - writer.WriteStartArray(); - foreach (var item in PhysicalPartitionThroughputInfo) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } PhysicalPartitionThroughputInfoResultPropertiesResource IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/PrivateEndpointProperty.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/PrivateEndpointProperty.Serialization.cs index c0534ddb7684..90ca326831bf 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/PrivateEndpointProperty.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/PrivateEndpointProperty.Serialization.cs @@ -19,6 +19,15 @@ internal partial class PrivateEndpointProperty : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(PrivateEndpointProperty)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } PrivateEndpointProperty IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ProvisioningIssue.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ProvisioningIssue.Serialization.cs index 3ad4d9f142b2..aa914b1111ff 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ProvisioningIssue.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ProvisioningIssue.Serialization.cs @@ -19,6 +19,15 @@ public partial class ProvisioningIssue : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(ProvisioningIssue)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } ProvisioningIssue IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ProvisioningIssueProperties.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ProvisioningIssueProperties.Serialization.cs index 5cfce516a6f9..735be1d4d631 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ProvisioningIssueProperties.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ProvisioningIssueProperties.Serialization.cs @@ -20,6 +20,15 @@ public partial class ProvisioningIssueProperties : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(ProvisioningIssueProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(IssueType)) { writer.WritePropertyName("issueType"u8); @@ -83,7 +91,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } ProvisioningIssueProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RedistributeThroughputParameters.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RedistributeThroughputParameters.Serialization.cs index 1163bc237047..a4a4c684ba24 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RedistributeThroughputParameters.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RedistributeThroughputParameters.Serialization.cs @@ -21,6 +21,15 @@ public partial class RedistributeThroughputParameters : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,67 +37,18 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(RedistributeThroughputParameters)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; JsonSerializer.Serialize(writer, Identity, serializeOptions); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); writer.WritePropertyName("resource"u8); writer.WriteObjectValue(Resource, options); writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } RedistributeThroughputParameters IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RedistributeThroughputPropertiesResource.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RedistributeThroughputPropertiesResource.Serialization.cs index 7ef27772ab3f..17861718e332 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RedistributeThroughputPropertiesResource.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RedistributeThroughputPropertiesResource.Serialization.cs @@ -20,6 +20,15 @@ public partial class RedistributeThroughputPropertiesResource : IUtf8JsonSeriali void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter w throw new FormatException($"The model {nameof(RedistributeThroughputPropertiesResource)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("throughputPolicy"u8); writer.WriteStringValue(ThroughputPolicy.ToString()); writer.WritePropertyName("targetPhysicalPartitionThroughputInfo"u8); @@ -59,7 +67,6 @@ void IJsonModel.Write(Utf8JsonWriter w #endif } } - writer.WriteEndObject(); } RedistributeThroughputPropertiesResource IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RegionForOnlineOffline.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RegionForOnlineOffline.Serialization.cs index 5e5120953311..a916746278b7 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RegionForOnlineOffline.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RegionForOnlineOffline.Serialization.cs @@ -18,6 +18,15 @@ public partial class RegionForOnlineOffline : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(RegionForOnlineOffline)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("region"u8); writer.WriteStringValue(Region); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } RegionForOnlineOffline IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ResourceAssociation.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ResourceAssociation.Serialization.cs index a61d7bd79944..7820540e1995 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ResourceAssociation.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ResourceAssociation.Serialization.cs @@ -19,6 +19,15 @@ public partial class ResourceAssociation : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ResourceAssociation)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } ResourceAssociation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ResourceRestoreParameters.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ResourceRestoreParameters.Serialization.cs index 204d89a8981b..e2d8754823dd 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ResourceRestoreParameters.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ResourceRestoreParameters.Serialization.cs @@ -19,6 +19,15 @@ public partial class ResourceRestoreParameters : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,38 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(ResourceRestoreParameters)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(RestoreSource)) - { - writer.WritePropertyName("restoreSource"u8); - writer.WriteStringValue(RestoreSource); - } - if (Optional.IsDefined(RestoreTimestampInUtc)) - { - writer.WritePropertyName("restoreTimestampInUtc"u8); - writer.WriteStringValue(RestoreTimestampInUtc.Value, "O"); - } - if (Optional.IsDefined(IsRestoreWithTtlDisabled)) - { - writer.WritePropertyName("restoreWithTtlDisabled"u8); - writer.WriteBooleanValue(IsRestoreWithTtlDisabled.Value); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } ResourceRestoreParameters IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableDatabaseAccountsListResult.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableDatabaseAccountsListResult.Serialization.cs index 88d28c8fed60..7391d90075dd 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableDatabaseAccountsListResult.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableDatabaseAccountsListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class RestorableDatabaseAccountsListResult : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(RestorableDatabaseAccountsListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } RestorableDatabaseAccountsListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableGremlinDatabase.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableGremlinDatabase.Serialization.cs index 0bdd260d4b4a..edf4576a6730 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableGremlinDatabase.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableGremlinDatabase.Serialization.cs @@ -20,6 +20,15 @@ public partial class RestorableGremlinDatabase : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(RestorableGremlinDatabase)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Resource)) @@ -56,22 +45,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea writer.WriteObjectValue(Resource, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } RestorableGremlinDatabase IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableGremlinDatabasesListResult.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableGremlinDatabasesListResult.Serialization.cs index d2f2f98a41c3..5910271e8fd0 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableGremlinDatabasesListResult.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableGremlinDatabasesListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class RestorableGremlinDatabasesListResult : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(RestorableGremlinDatabasesListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } RestorableGremlinDatabasesListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableGremlinGraph.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableGremlinGraph.Serialization.cs index 0e35bde27f38..47c71e42ba6f 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableGremlinGraph.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableGremlinGraph.Serialization.cs @@ -20,6 +20,15 @@ public partial class RestorableGremlinGraph : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(RestorableGremlinGraph)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Resource)) @@ -56,22 +45,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader writer.WriteObjectValue(Resource, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } RestorableGremlinGraph IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableGremlinGraphsListResult.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableGremlinGraphsListResult.Serialization.cs index cd1afdca26a3..e643ca5083da 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableGremlinGraphsListResult.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableGremlinGraphsListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class RestorableGremlinGraphsListResult : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(RestorableGremlinGraphsListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } RestorableGremlinGraphsListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableGremlinResourceData.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableGremlinResourceData.Serialization.cs index 10c0a05fa1a7..89a378d1275e 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableGremlinResourceData.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableGremlinResourceData.Serialization.cs @@ -21,6 +21,15 @@ public partial class RestorableGremlinResourceData : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,7 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(RestorableGremlinResourceData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(DatabaseName)) { writer.WritePropertyName("databaseName"u8); @@ -44,42 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode } writer.WriteEndArray(); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } RestorableGremlinResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableGremlinResourcesListResult.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableGremlinResourcesListResult.Serialization.cs index 5ef9255b17b7..78f902e4e551 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableGremlinResourcesListResult.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableGremlinResourcesListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class RestorableGremlinResourcesListResult : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(RestorableGremlinResourcesListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } RestorableGremlinResourcesListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableLocationResourceInfo.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableLocationResourceInfo.Serialization.cs index b6ccc080a5ad..3deead949c51 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableLocationResourceInfo.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableLocationResourceInfo.Serialization.cs @@ -19,6 +19,15 @@ public partial class RestorableLocationResourceInfo : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(RestorableLocationResourceInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(LocationName)) { writer.WritePropertyName("locationName"u8); @@ -62,7 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } RestorableLocationResourceInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableMongoDBCollection.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableMongoDBCollection.Serialization.cs index c5f4a2ad4865..1440d6c53c71 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableMongoDBCollection.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableMongoDBCollection.Serialization.cs @@ -20,6 +20,15 @@ public partial class RestorableMongoDBCollection : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(RestorableMongoDBCollection)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Resource)) @@ -56,22 +45,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR writer.WriteObjectValue(Resource, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } RestorableMongoDBCollection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableMongoDBCollectionsListResult.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableMongoDBCollectionsListResult.Serialization.cs index 73e451ebef2a..27f5978ad2d0 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableMongoDBCollectionsListResult.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableMongoDBCollectionsListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class RestorableMongoDBCollectionsListResult : IUtf8JsonSeriali void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(RestorableMongoDBCollectionsListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } RestorableMongoDBCollectionsListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableMongoDBDatabase.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableMongoDBDatabase.Serialization.cs index 1fa6de11e752..155e13bf3287 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableMongoDBDatabase.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableMongoDBDatabase.Serialization.cs @@ -20,6 +20,15 @@ public partial class RestorableMongoDBDatabase : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(RestorableMongoDBDatabase)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Resource)) @@ -56,22 +45,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea writer.WriteObjectValue(Resource, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } RestorableMongoDBDatabase IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableMongoDBDatabasesListResult.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableMongoDBDatabasesListResult.Serialization.cs index f5450d484453..4b3b29c19345 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableMongoDBDatabasesListResult.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableMongoDBDatabasesListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class RestorableMongoDBDatabasesListResult : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(RestorableMongoDBDatabasesListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } RestorableMongoDBDatabasesListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableMongoDBResourceData.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableMongoDBResourceData.Serialization.cs index 2540ed9fb6c1..d066d1465abe 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableMongoDBResourceData.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableMongoDBResourceData.Serialization.cs @@ -21,6 +21,15 @@ public partial class RestorableMongoDBResourceData : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,7 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(RestorableMongoDBResourceData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(DatabaseName)) { writer.WritePropertyName("databaseName"u8); @@ -44,42 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode } writer.WriteEndArray(); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } RestorableMongoDBResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableMongoDBResourcesListResult.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableMongoDBResourcesListResult.Serialization.cs index 1a8c13440664..2360b6282db0 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableMongoDBResourcesListResult.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableMongoDBResourcesListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class RestorableMongoDBResourcesListResult : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(RestorableMongoDBResourcesListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } RestorableMongoDBResourcesListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableSqlContainer.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableSqlContainer.Serialization.cs index 793accaf91aa..7499b5a3d054 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableSqlContainer.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableSqlContainer.Serialization.cs @@ -20,6 +20,15 @@ public partial class RestorableSqlContainer : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(RestorableSqlContainer)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Resource)) @@ -56,22 +45,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader writer.WriteObjectValue(Resource, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } RestorableSqlContainer IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableSqlContainerPropertiesResourceContainer.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableSqlContainerPropertiesResourceContainer.Serialization.cs index ae926e9fc922..46c8a6f24449 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableSqlContainerPropertiesResourceContainer.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableSqlContainerPropertiesResourceContainer.Serialization.cs @@ -20,6 +20,15 @@ public partial class RestorableSqlContainerPropertiesResourceContainer : IUtf8Js void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8Jso throw new FormatException($"The model {nameof(RestorableSqlContainerPropertiesResourceContainer)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(Self)) { writer.WritePropertyName("_self"u8); @@ -48,84 +57,6 @@ void IJsonModel.Write(Utf8Jso writer.WritePropertyName("_etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - writer.WritePropertyName("id"u8); - writer.WriteStringValue(ContainerName); - if (Optional.IsDefined(IndexingPolicy)) - { - writer.WritePropertyName("indexingPolicy"u8); - writer.WriteObjectValue(IndexingPolicy, options); - } - if (Optional.IsDefined(PartitionKey)) - { - writer.WritePropertyName("partitionKey"u8); - writer.WriteObjectValue(PartitionKey, options); - } - if (Optional.IsDefined(DefaultTtl)) - { - writer.WritePropertyName("defaultTtl"u8); - writer.WriteNumberValue(DefaultTtl.Value); - } - if (Optional.IsDefined(UniqueKeyPolicy)) - { - writer.WritePropertyName("uniqueKeyPolicy"u8); - writer.WriteObjectValue(UniqueKeyPolicy, options); - } - if (Optional.IsDefined(ConflictResolutionPolicy)) - { - writer.WritePropertyName("conflictResolutionPolicy"u8); - writer.WriteObjectValue(ConflictResolutionPolicy, options); - } - if (Optional.IsDefined(ClientEncryptionPolicy)) - { - writer.WritePropertyName("clientEncryptionPolicy"u8); - writer.WriteObjectValue(ClientEncryptionPolicy, options); - } - if (Optional.IsDefined(AnalyticalStorageTtl)) - { - writer.WritePropertyName("analyticalStorageTtl"u8); - writer.WriteNumberValue(AnalyticalStorageTtl.Value); - } - if (Optional.IsDefined(RestoreParameters)) - { - writer.WritePropertyName("restoreParameters"u8); - writer.WriteObjectValue(RestoreParameters, options); - } - if (Optional.IsDefined(CreateMode)) - { - writer.WritePropertyName("createMode"u8); - writer.WriteStringValue(CreateMode.Value.ToString()); - } - if (Optional.IsDefined(MaterializedViewDefinition)) - { - writer.WritePropertyName("materializedViewDefinition"u8); - writer.WriteObjectValue(MaterializedViewDefinition, options); - } - if (Optional.IsCollectionDefined(ComputedProperties)) - { - writer.WritePropertyName("computedProperties"u8); - writer.WriteStartArray(); - foreach (var item in ComputedProperties) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } RestorableSqlContainerPropertiesResourceContainer IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableSqlContainersListResult.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableSqlContainersListResult.Serialization.cs index adec3abb1be0..afc47bb32f14 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableSqlContainersListResult.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableSqlContainersListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class RestorableSqlContainersListResult : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(RestorableSqlContainersListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } RestorableSqlContainersListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableSqlDatabase.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableSqlDatabase.Serialization.cs index 9b9e3f64ccde..786a76be4ae4 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableSqlDatabase.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableSqlDatabase.Serialization.cs @@ -20,6 +20,15 @@ public partial class RestorableSqlDatabase : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(RestorableSqlDatabase)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Resource)) @@ -56,22 +45,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW writer.WriteObjectValue(Resource, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } RestorableSqlDatabase IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableSqlDatabasePropertiesResourceDatabase.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableSqlDatabasePropertiesResourceDatabase.Serialization.cs index b51085656e1f..7d477850e17f 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableSqlDatabasePropertiesResourceDatabase.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableSqlDatabasePropertiesResourceDatabase.Serialization.cs @@ -19,6 +19,15 @@ public partial class RestorableSqlDatabasePropertiesResourceDatabase : IUtf8Json void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,7 @@ void IJsonModel.Write(Utf8JsonW throw new FormatException($"The model {nameof(RestorableSqlDatabasePropertiesResourceDatabase)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(Colls)) { writer.WritePropertyName("_colls"u8); @@ -57,34 +66,6 @@ void IJsonModel.Write(Utf8JsonW writer.WritePropertyName("_etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - writer.WritePropertyName("id"u8); - writer.WriteStringValue(DatabaseName); - if (Optional.IsDefined(RestoreParameters)) - { - writer.WritePropertyName("restoreParameters"u8); - writer.WriteObjectValue(RestoreParameters, options); - } - if (Optional.IsDefined(CreateMode)) - { - writer.WritePropertyName("createMode"u8); - writer.WriteStringValue(CreateMode.Value.ToString()); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } RestorableSqlDatabasePropertiesResourceDatabase IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableSqlDatabasesListResult.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableSqlDatabasesListResult.Serialization.cs index 84b8cc798366..bf585a581c59 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableSqlDatabasesListResult.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableSqlDatabasesListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class RestorableSqlDatabasesListResult : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(RestorableSqlDatabasesListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } RestorableSqlDatabasesListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableSqlResourceData.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableSqlResourceData.Serialization.cs index 70e4c5e2b09f..d26090d19f9a 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableSqlResourceData.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableSqlResourceData.Serialization.cs @@ -21,6 +21,15 @@ public partial class RestorableSqlResourceData : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,7 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(RestorableSqlResourceData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(DatabaseName)) { writer.WritePropertyName("databaseName"u8); @@ -44,42 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea } writer.WriteEndArray(); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } RestorableSqlResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableSqlResourcesListResult.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableSqlResourcesListResult.Serialization.cs index 3211570ef905..a2f794efdd93 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableSqlResourcesListResult.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableSqlResourcesListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class RestorableSqlResourcesListResult : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(RestorableSqlResourcesListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } RestorableSqlResourcesListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableTable.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableTable.Serialization.cs index 2f37521bbb0d..127e2ceefa5a 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableTable.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableTable.Serialization.cs @@ -20,6 +20,15 @@ public partial class RestorableTable : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(RestorableTable)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Resource)) @@ -56,22 +45,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO writer.WriteObjectValue(Resource, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } RestorableTable IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableTableResourceData.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableTableResourceData.Serialization.cs index 56e0b046b2b8..fbb0fa1eb081 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableTableResourceData.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableTableResourceData.Serialization.cs @@ -19,6 +19,15 @@ public partial class RestorableTableResourceData : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(RestorableTableResourceData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } RestorableTableResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableTableResourcesListResult.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableTableResourcesListResult.Serialization.cs index f35018c96409..e2e82dcf8520 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableTableResourcesListResult.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableTableResourcesListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class RestorableTableResourcesListResult : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(RestorableTableResourcesListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } RestorableTableResourcesListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableTablesListResult.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableTablesListResult.Serialization.cs index 583a3e0efb2d..890ba5d32e6a 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableTablesListResult.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestorableTablesListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class RestorableTablesListResult : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(RestorableTablesListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } RestorableTablesListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestoreParametersBase.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestoreParametersBase.Serialization.cs index a7f6baadc1b0..47341e7d63a8 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestoreParametersBase.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RestoreParametersBase.Serialization.cs @@ -19,6 +19,15 @@ public partial class RestoreParametersBase : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(RestoreParametersBase)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(RestoreSource)) { writer.WritePropertyName("restoreSource"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } RestoreParametersBase IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RetrieveThroughputParameters.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RetrieveThroughputParameters.Serialization.cs index 2adaa73f9dd4..8d2ddb933b04 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RetrieveThroughputParameters.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RetrieveThroughputParameters.Serialization.cs @@ -21,6 +21,15 @@ public partial class RetrieveThroughputParameters : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,67 +37,18 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(RetrieveThroughputParameters)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; JsonSerializer.Serialize(writer, Identity, serializeOptions); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); writer.WritePropertyName("resource"u8); writer.WriteObjectValue(Resource, options); writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } RetrieveThroughputParameters IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RetrieveThroughputPropertiesResource.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RetrieveThroughputPropertiesResource.Serialization.cs index ad10bd2bd2cb..ed27bbbe0a62 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RetrieveThroughputPropertiesResource.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/RetrieveThroughputPropertiesResource.Serialization.cs @@ -21,6 +21,15 @@ public partial class RetrieveThroughputPropertiesResource : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,7 +37,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(RetrieveThroughputPropertiesResource)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("physicalPartitionIds"u8); writer.WriteStartArray(); foreach (var item in PhysicalPartitionIds) @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } RetrieveThroughputPropertiesResource IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ServiceResourceCreateUpdateProperties.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ServiceResourceCreateUpdateProperties.Serialization.cs index 3da3ce3ad9eb..ef6843e533ac 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ServiceResourceCreateUpdateProperties.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ServiceResourceCreateUpdateProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class ServiceResourceCreateUpdateProperties : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(ServiceResourceCreateUpdateProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(InstanceSize)) { writer.WritePropertyName("instanceSize"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } ServiceResourceCreateUpdateProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/SpatialSpec.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/SpatialSpec.Serialization.cs index 32797dcdc6dd..659f672d5dec 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/SpatialSpec.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/SpatialSpec.Serialization.cs @@ -20,6 +20,15 @@ public partial class SpatialSpec : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio throw new FormatException($"The model {nameof(SpatialSpec)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Path)) { writer.WritePropertyName("path"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio #endif } } - writer.WriteEndObject(); } SpatialSpec IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/SqlDedicatedGatewayRegionalService.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/SqlDedicatedGatewayRegionalService.Serialization.cs index 6608bc316b5b..bffedeeb0797 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/SqlDedicatedGatewayRegionalService.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/SqlDedicatedGatewayRegionalService.Serialization.cs @@ -19,6 +19,15 @@ public partial class SqlDedicatedGatewayRegionalService : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,43 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(SqlDedicatedGatewayRegionalService)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(SqlDedicatedGatewayEndpoint)) { writer.WritePropertyName("sqlDedicatedGatewayEndpoint"u8); writer.WriteStringValue(SqlDedicatedGatewayEndpoint); } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (options.Format != "W" && Optional.IsDefined(Status)) - { - writer.WritePropertyName("status"u8); - writer.WriteStringValue(Status.Value.ToString()); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SqlDedicatedGatewayRegionalService IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/SqlDedicatedGatewayServiceProperties.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/SqlDedicatedGatewayServiceProperties.Serialization.cs index dafdb7e2755f..46d52efdcab0 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/SqlDedicatedGatewayServiceProperties.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/SqlDedicatedGatewayServiceProperties.Serialization.cs @@ -20,6 +20,15 @@ public partial class SqlDedicatedGatewayServiceProperties : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(SqlDedicatedGatewayServiceProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(SqlDedicatedGatewayEndpoint)) { writer.WritePropertyName("sqlDedicatedGatewayEndpoint"u8); @@ -48,28 +57,6 @@ void IJsonModel.Write(Utf8JsonWriter write } writer.WriteEndArray(); } - if (options.Format != "W" && Optional.IsDefined(CreatedOn)) - { - writer.WritePropertyName("creationTime"u8); - writer.WriteStringValue(CreatedOn.Value, "O"); - } - if (Optional.IsDefined(InstanceSize)) - { - writer.WritePropertyName("instanceSize"u8); - writer.WriteStringValue(InstanceSize.Value.ToString()); - } - if (Optional.IsDefined(InstanceCount)) - { - writer.WritePropertyName("instanceCount"u8); - writer.WriteNumberValue(InstanceCount.Value); - } - writer.WritePropertyName("serviceType"u8); - writer.WriteStringValue(ServiceType.ToString()); - if (options.Format != "W" && Optional.IsDefined(Status)) - { - writer.WritePropertyName("status"u8); - writer.WriteStringValue(Status.Value.ToString()); - } foreach (var item in AdditionalProperties) { writer.WritePropertyName(item.Key); @@ -82,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter write } #endif } - writer.WriteEndObject(); } SqlDedicatedGatewayServiceProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/SqlDedicatedGatewayServiceResourceCreateUpdateProperties.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/SqlDedicatedGatewayServiceResourceCreateUpdateProperties.Serialization.cs index 2341f3c86234..ade8fa6e719b 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/SqlDedicatedGatewayServiceResourceCreateUpdateProperties.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/SqlDedicatedGatewayServiceResourceCreateUpdateProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class SqlDedicatedGatewayServiceResourceCreateUpdateProperties : void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,40 +34,12 @@ void IJsonModel.Write( throw new FormatException($"The model {nameof(SqlDedicatedGatewayServiceResourceCreateUpdateProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(DedicatedGatewayType)) { writer.WritePropertyName("dedicatedGatewayType"u8); writer.WriteStringValue(DedicatedGatewayType.Value.ToString()); } - if (Optional.IsDefined(InstanceSize)) - { - writer.WritePropertyName("instanceSize"u8); - writer.WriteStringValue(InstanceSize.Value.ToString()); - } - if (Optional.IsDefined(InstanceCount)) - { - writer.WritePropertyName("instanceCount"u8); - writer.WriteNumberValue(InstanceCount.Value); - } - writer.WritePropertyName("serviceType"u8); - writer.WriteStringValue(ServiceType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SqlDedicatedGatewayServiceResourceCreateUpdateProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ThroughputPolicyResourceInfo.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ThroughputPolicyResourceInfo.Serialization.cs index 6bc6ec10e2b4..a609ab241971 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ThroughputPolicyResourceInfo.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ThroughputPolicyResourceInfo.Serialization.cs @@ -19,6 +19,15 @@ public partial class ThroughputPolicyResourceInfo : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(ThroughputPolicyResourceInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IsEnabled)) { writer.WritePropertyName("isEnabled"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } ThroughputPolicyResourceInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ThroughputPoolAccountsListResult.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ThroughputPoolAccountsListResult.Serialization.cs index b25cf83d836c..b60e6244e0d4 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ThroughputPoolAccountsListResult.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ThroughputPoolAccountsListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class ThroughputPoolAccountsListResult : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(ThroughputPoolAccountsListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } ThroughputPoolAccountsListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ThroughputPoolsListResult.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ThroughputPoolsListResult.Serialization.cs index 7cca36703583..0c937569e3a3 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ThroughputPoolsListResult.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ThroughputPoolsListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class ThroughputPoolsListResult : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(ThroughputPoolsListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } ThroughputPoolsListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ThroughputSettingsResourceInfo.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ThroughputSettingsResourceInfo.Serialization.cs index f1a5ec694247..3bc4b16d377d 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ThroughputSettingsResourceInfo.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ThroughputSettingsResourceInfo.Serialization.cs @@ -19,6 +19,15 @@ public partial class ThroughputSettingsResourceInfo : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(ThroughputSettingsResourceInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Throughput)) { writer.WritePropertyName("throughput"u8); @@ -72,7 +80,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } ThroughputSettingsResourceInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ThroughputSettingsUpdateData.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ThroughputSettingsUpdateData.Serialization.cs index 2a6222569248..c0731217dcc3 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ThroughputSettingsUpdateData.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/ThroughputSettingsUpdateData.Serialization.cs @@ -21,6 +21,15 @@ public partial class ThroughputSettingsUpdateData : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,67 +37,18 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(ThroughputSettingsUpdateData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; JsonSerializer.Serialize(writer, Identity, serializeOptions); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); writer.WritePropertyName("resource"u8); writer.WriteObjectValue(Resource, options); writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ThroughputSettingsUpdateData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/UnknownBackupPolicy.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/UnknownBackupPolicy.Serialization.cs index a4b6daddd3bf..d0d4e9c3ab1c 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/UnknownBackupPolicy.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/UnknownBackupPolicy.Serialization.cs @@ -19,6 +19,15 @@ internal partial class UnknownBackupPolicy : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,30 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(CosmosDBAccountBackupPolicy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(BackupPolicyType.ToString()); - if (Optional.IsDefined(MigrationState)) - { - writer.WritePropertyName("migrationState"u8); - writer.WriteObjectValue(MigrationState, options); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } CosmosDBAccountBackupPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/UnknownDataTransferDataSourceSink.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/UnknownDataTransferDataSourceSink.Serialization.cs index 504a2110bb4d..635af56d9427 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/UnknownDataTransferDataSourceSink.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/UnknownDataTransferDataSourceSink.Serialization.cs @@ -19,6 +19,15 @@ internal partial class UnknownDataTransferDataSourceSink : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,25 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(DataTransferDataSourceSink)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("component"u8); - writer.WriteStringValue(Component.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } DataTransferDataSourceSink IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/UnknownServiceResourceCreateUpdateProperties.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/UnknownServiceResourceCreateUpdateProperties.Serialization.cs index 932c20c07f51..4ab6cd74071d 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/UnknownServiceResourceCreateUpdateProperties.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/UnknownServiceResourceCreateUpdateProperties.Serialization.cs @@ -18,6 +18,15 @@ internal partial class UnknownServiceResourceCreateUpdateProperties : IUtf8JsonS void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,35 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(ServiceResourceCreateUpdateProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(InstanceSize)) - { - writer.WritePropertyName("instanceSize"u8); - writer.WriteStringValue(InstanceSize.Value.ToString()); - } - if (Optional.IsDefined(InstanceCount)) - { - writer.WritePropertyName("instanceCount"u8); - writer.WriteNumberValue(InstanceCount.Value); - } - writer.WritePropertyName("serviceType"u8); - writer.WriteStringValue(ServiceType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } ServiceResourceCreateUpdateProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/UnknownServiceResourceProperties.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/UnknownServiceResourceProperties.Serialization.cs index 07abdf1fe85d..5af89fab9fb5 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/UnknownServiceResourceProperties.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/UnknownServiceResourceProperties.Serialization.cs @@ -19,6 +19,15 @@ internal partial class UnknownServiceResourceProperties : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,29 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(CosmosDBServiceProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W" && Optional.IsDefined(CreatedOn)) - { - writer.WritePropertyName("creationTime"u8); - writer.WriteStringValue(CreatedOn.Value, "O"); - } - if (Optional.IsDefined(InstanceSize)) - { - writer.WritePropertyName("instanceSize"u8); - writer.WriteStringValue(InstanceSize.Value.ToString()); - } - if (Optional.IsDefined(InstanceCount)) - { - writer.WritePropertyName("instanceCount"u8); - writer.WriteNumberValue(InstanceCount.Value); - } - writer.WritePropertyName("serviceType"u8); - writer.WriteStringValue(ServiceType.ToString()); - if (options.Format != "W" && Optional.IsDefined(Status)) - { - writer.WritePropertyName("status"u8); - writer.WriteStringValue(Status.Value.ToString()); - } + base.JsonModelWriteCore(writer, options); foreach (var item in AdditionalProperties) { writer.WritePropertyName(item.Key); @@ -61,7 +48,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea } #endif } - writer.WriteEndObject(); } CosmosDBServiceProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/MongoDBCollectionData.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/MongoDBCollectionData.Serialization.cs index 9dd32c56d83c..846659064c3f 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/MongoDBCollectionData.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/MongoDBCollectionData.Serialization.cs @@ -22,6 +22,15 @@ public partial class MongoDBCollectionData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -29,46 +38,13 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(MongoDBCollectionData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; JsonSerializer.Serialize(writer, Identity, serializeOptions); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Resource)) @@ -82,22 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW writer.WriteObjectValue(Options, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } MongoDBCollectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/MongoDBDatabaseData.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/MongoDBDatabaseData.Serialization.cs index d18b18b64154..b18cdee8f97f 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/MongoDBDatabaseData.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/MongoDBDatabaseData.Serialization.cs @@ -22,6 +22,15 @@ public partial class MongoDBDatabaseData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -29,46 +38,13 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(MongoDBDatabaseData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; JsonSerializer.Serialize(writer, Identity, serializeOptions); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Resource)) @@ -82,22 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri writer.WriteObjectValue(Options, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } MongoDBDatabaseData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/MongoDBRoleDefinitionData.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/MongoDBRoleDefinitionData.Serialization.cs index f494784e31eb..32deb330430e 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/MongoDBRoleDefinitionData.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/MongoDBRoleDefinitionData.Serialization.cs @@ -22,6 +22,15 @@ public partial class MongoDBRoleDefinitionData : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -29,27 +38,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(MongoDBRoleDefinitionData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(RoleName)) @@ -88,22 +77,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } MongoDBRoleDefinitionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/MongoDBUserDefinitionData.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/MongoDBUserDefinitionData.Serialization.cs index 4dbfb90cbcf6..6e4d5bcc87e2 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/MongoDBUserDefinitionData.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/MongoDBUserDefinitionData.Serialization.cs @@ -22,6 +22,15 @@ public partial class MongoDBUserDefinitionData : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -29,27 +38,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(MongoDBUserDefinitionData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(UserName)) @@ -88,22 +77,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea writer.WriteStringValue(Mechanisms); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } MongoDBUserDefinitionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/NetworkSecurityPerimeterConfigurationData.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/NetworkSecurityPerimeterConfigurationData.Serialization.cs index 0505e42a6b88..a86383273c50 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/NetworkSecurityPerimeterConfigurationData.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/NetworkSecurityPerimeterConfigurationData.Serialization.cs @@ -21,6 +21,15 @@ public partial class NetworkSecurityPerimeterConfigurationData : IUtf8JsonSerial void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,48 +37,12 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(NetworkSecurityPerimeterConfigurationData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); writer.WriteObjectValue(Properties, options); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NetworkSecurityPerimeterConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestorableCosmosDBAccountData.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestorableCosmosDBAccountData.Serialization.cs index 9837575f9dc1..0de995a52723 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestorableCosmosDBAccountData.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestorableCosmosDBAccountData.Serialization.cs @@ -22,6 +22,15 @@ public partial class RestorableCosmosDBAccountData : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -29,32 +38,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(RestorableCosmosDBAccountData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Location)) { writer.WritePropertyName("location"u8); writer.WriteStringValue(Location.Value); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(AccountName)) @@ -93,22 +82,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } RestorableCosmosDBAccountData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/ThroughputSettingData.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/ThroughputSettingData.Serialization.cs index 21b4a4133bd8..1670f6a5310a 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/ThroughputSettingData.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/ThroughputSettingData.Serialization.cs @@ -22,6 +22,15 @@ public partial class ThroughputSettingData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -29,46 +38,13 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(ThroughputSettingData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; JsonSerializer.Serialize(writer, Identity, serializeOptions); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Resource)) @@ -77,22 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW writer.WriteObjectValue(Resource, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ThroughputSettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/autorest.md b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/autorest.md index 34c76f1254ca..28ee9633524d 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/autorest.md +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/autorest.md @@ -21,6 +21,7 @@ modelerfour: flatten-payloads: false lenient-model-deduplication: true use-model-reader-writer: true +use-write-core: true enable-bicep-serialization: true #mgmt-debug: diff --git a/sdk/customer-insights/Azure.ResourceManager.CustomerInsights/samples/Generated/Samples/Sample_KpiResourceFormatCollection.cs b/sdk/customer-insights/Azure.ResourceManager.CustomerInsights/samples/Generated/Samples/Sample_KpiResourceFormatCollection.cs index db333b157ef9..7dbe330f8882 100644 --- a/sdk/customer-insights/Azure.ResourceManager.CustomerInsights/samples/Generated/Samples/Sample_KpiResourceFormatCollection.cs +++ b/sdk/customer-insights/Azure.ResourceManager.CustomerInsights/samples/Generated/Samples/Sample_KpiResourceFormatCollection.cs @@ -61,7 +61,7 @@ public async Task CreateOrUpdate_KpiCreateOrUpdate() { "SavingAccountBalance" }, - ThresHolds = new KpiThresholds(5, 50, true), + ThresHolds = new KpiThresholds(5M, 50M, true), Aliases = { new KpiAlias("alias","Id+4") diff --git a/sdk/customer-insights/Azure.ResourceManager.CustomerInsights/samples/Generated/Samples/Sample_KpiResourceFormatResource.cs b/sdk/customer-insights/Azure.ResourceManager.CustomerInsights/samples/Generated/Samples/Sample_KpiResourceFormatResource.cs index 8ecbcea94f1e..b97e4b655e61 100644 --- a/sdk/customer-insights/Azure.ResourceManager.CustomerInsights/samples/Generated/Samples/Sample_KpiResourceFormatResource.cs +++ b/sdk/customer-insights/Azure.ResourceManager.CustomerInsights/samples/Generated/Samples/Sample_KpiResourceFormatResource.cs @@ -58,7 +58,7 @@ public async Task Update_KpiCreateOrUpdate() { "SavingAccountBalance" }, - ThresHolds = new KpiThresholds(5, 50, true), + ThresHolds = new KpiThresholds(5M, 50M, true), Aliases = { new KpiAlias("alias","Id+4") diff --git a/sdk/datafactory/Azure.ResourceManager.DataFactory/CHANGELOG.md b/sdk/datafactory/Azure.ResourceManager.DataFactory/CHANGELOG.md index e74133f870a9..5192c7c02bae 100644 --- a/sdk/datafactory/Azure.ResourceManager.DataFactory/CHANGELOG.md +++ b/sdk/datafactory/Azure.ResourceManager.DataFactory/CHANGELOG.md @@ -1,17 +1,28 @@ # Release History -## 1.5.0-beta.1 (Unreleased) +## 1.6.0-beta.1 (Unreleased) ### Features Added -- Exposed `JsonModelWriteCore` for model serialization procedure. - ### Breaking Changes ### Bugs Fixed ### Other Changes +## 1.5.0 (2024-10-24) + +### Features Added + +- Add pageSize support to Salesforce V2 Source. +- Add pageSize support to ServiceNow V2 Source. +- Add host property to Snowflake linked service. +- Exposed `JsonModelWriteCore` for model serialization procedure. + +### Bugs Fixed + +- Fix missing authenticationType in PostgreSQL V2 linked service. + ## 1.4.0 (2024-09-10) ### Features Added diff --git a/sdk/datafactory/Azure.ResourceManager.DataFactory/api/Azure.ResourceManager.DataFactory.netstandard2.0.cs b/sdk/datafactory/Azure.ResourceManager.DataFactory/api/Azure.ResourceManager.DataFactory.netstandard2.0.cs index 9beaf9426c3a..67a06849fec3 100644 --- a/sdk/datafactory/Azure.ResourceManager.DataFactory/api/Azure.ResourceManager.DataFactory.netstandard2.0.cs +++ b/sdk/datafactory/Azure.ResourceManager.DataFactory/api/Azure.ResourceManager.DataFactory.netstandard2.0.cs @@ -9259,7 +9259,10 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write } public partial class PostgreSqlV2LinkedService : Azure.ResourceManager.DataFactory.Models.DataFactoryLinkedServiceProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public PostgreSqlV2LinkedService(Azure.Core.Expressions.DataFactory.DataFactoryElement server, Azure.Core.Expressions.DataFactory.DataFactoryElement username, Azure.Core.Expressions.DataFactory.DataFactoryElement database, Azure.Core.Expressions.DataFactory.DataFactoryElement sslMode) { } + public PostgreSqlV2LinkedService(Azure.Core.Expressions.DataFactory.DataFactoryElement server, Azure.Core.Expressions.DataFactory.DataFactoryElement username, Azure.Core.Expressions.DataFactory.DataFactoryElement database, Azure.Core.Expressions.DataFactory.DataFactoryElement authenticationType, Azure.Core.Expressions.DataFactory.DataFactoryElement sslMode) { } + public Azure.Core.Expressions.DataFactory.DataFactoryElement AuthenticationType { get { throw null; } set { } } public Azure.Core.Expressions.DataFactory.DataFactoryElement CommandTimeout { get { throw null; } set { } } public Azure.Core.Expressions.DataFactory.DataFactoryElement ConnectionTimeout { get { throw null; } set { } } public Azure.Core.Expressions.DataFactory.DataFactoryElement Database { get { throw null; } set { } } @@ -10112,6 +10115,7 @@ public partial class SalesforceV2Source : Azure.ResourceManager.DataFactory.Mode { public SalesforceV2Source() { } public Azure.Core.Expressions.DataFactory.DataFactoryElement IncludeDeletedObjects { get { throw null; } set { } } + public Azure.Core.Expressions.DataFactory.DataFactoryElement PageSize { get { throw null; } set { } } public Azure.Core.Expressions.DataFactory.DataFactoryElement Query { get { throw null; } set { } } public Azure.Core.Expressions.DataFactory.DataFactoryElement SoqlQuery { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -10845,6 +10849,7 @@ public partial class ServiceNowV2Source : Azure.ResourceManager.DataFactory.Mode { public ServiceNowV2Source() { } public Azure.ResourceManager.DataFactory.Models.DataFactoryExpressionV2 Expression { get { throw null; } set { } } + public Azure.Core.Expressions.DataFactory.DataFactoryElement PageSize { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DataFactory.Models.ServiceNowV2Source 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) { } @@ -11180,6 +11185,7 @@ public SnowflakeV2LinkedService(Azure.Core.Expressions.DataFactory.DataFactoryEl public Azure.Core.Expressions.DataFactory.DataFactorySecret ClientSecret { get { throw null; } set { } } public Azure.Core.Expressions.DataFactory.DataFactoryElement Database { get { throw null; } set { } } public string EncryptedCredential { get { throw null; } set { } } + public Azure.Core.Expressions.DataFactory.DataFactoryElement Host { get { throw null; } set { } } public Azure.Core.Expressions.DataFactory.DataFactorySecret Password { get { throw null; } set { } } public Azure.Core.Expressions.DataFactory.DataFactorySecret PrivateKey { get { throw null; } set { } } public Azure.Core.Expressions.DataFactory.DataFactorySecret PrivateKeyPassphrase { get { throw null; } set { } } diff --git a/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Azure.ResourceManager.DataFactory.csproj b/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Azure.ResourceManager.DataFactory.csproj index 862e0cd17efb..5e226512a638 100644 --- a/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Azure.ResourceManager.DataFactory.csproj +++ b/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Azure.ResourceManager.DataFactory.csproj @@ -1,8 +1,8 @@ - 1.5.0-beta.1 + 1.6.0-beta.1 - 1.4.0 + 1.5.0 Azure.ResourceManager.DataFactory Microsoft Azure Resource Manager client SDK for Azure resource provider Microsoft.DataFactory. azure;management;arm;resource manager;datafactory diff --git a/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Customized/Models/PostgreSqlV2LinkedService.cs b/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Customized/Models/PostgreSqlV2LinkedService.cs new file mode 100644 index 000000000000..c9dbd061e8cc --- /dev/null +++ b/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Customized/Models/PostgreSqlV2LinkedService.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System; +using System.ComponentModel; +using Azure.Core.Expressions.DataFactory; + +namespace Azure.ResourceManager.DataFactory.Models +{ + ///

Linked service for PostgreSQLV2 data source. + public partial class PostgreSqlV2LinkedService : DataFactoryLinkedServiceProperties + { + /// Initializes a new instance of . + /// Server name for connection. Type: string. + /// Username for authentication. Type: string. + /// Database name for connection. Type: string. + /// SSL mode for connection. Type: integer. 0: disable, 1:allow, 2: prefer, 3: require, 4: verify-ca, 5: verify-full. Type: integer. + /// , , or is null. + [EditorBrowsable(EditorBrowsableState.Never)] + public PostgreSqlV2LinkedService(DataFactoryElement server, DataFactoryElement username, DataFactoryElement database, DataFactoryElement sslMode) + { + Argument.AssertNotNull(server, nameof(server)); + Argument.AssertNotNull(username, nameof(username)); + Argument.AssertNotNull(database, nameof(database)); + Argument.AssertNotNull(sslMode, nameof(sslMode)); + + Server = server; + Username = username; + Database = database; + SslMode = sslMode; + LinkedServiceType = "PostgreSqlV2"; + } + } +} diff --git a/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/Models/PostgreSqlV2LinkedService.Serialization.cs b/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/Models/PostgreSqlV2LinkedService.Serialization.cs index 963813ff62c1..ccaefe8e037d 100644 --- a/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/Models/PostgreSqlV2LinkedService.Serialization.cs +++ b/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/Models/PostgreSqlV2LinkedService.Serialization.cs @@ -49,6 +49,8 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri JsonSerializer.Serialize(writer, Username); writer.WritePropertyName("database"u8); JsonSerializer.Serialize(writer, Database); + writer.WritePropertyName("authenticationType"u8); + JsonSerializer.Serialize(writer, AuthenticationType); writer.WritePropertyName("sslMode"u8); JsonSerializer.Serialize(writer, SslMode); if (Optional.IsDefined(Schema)) @@ -166,6 +168,7 @@ internal static PostgreSqlV2LinkedService DeserializePostgreSqlV2LinkedService(J DataFactoryElement port = default; DataFactoryElement username = default; DataFactoryElement database = default; + DataFactoryElement authenticationType = default; DataFactoryElement sslMode = default; DataFactoryElement schema = default; DataFactoryElement pooling = default; @@ -277,6 +280,11 @@ internal static PostgreSqlV2LinkedService DeserializePostgreSqlV2LinkedService(J database = JsonSerializer.Deserialize>(property0.Value.GetRawText()); continue; } + if (property0.NameEquals("authenticationType"u8)) + { + authenticationType = JsonSerializer.Deserialize>(property0.Value.GetRawText()); + continue; + } if (property0.NameEquals("sslMode"u8)) { sslMode = JsonSerializer.Deserialize>(property0.Value.GetRawText()); @@ -422,6 +430,7 @@ internal static PostgreSqlV2LinkedService DeserializePostgreSqlV2LinkedService(J port, username, database, + authenticationType, sslMode, schema, pooling, diff --git a/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/Models/PostgreSqlV2LinkedService.cs b/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/Models/PostgreSqlV2LinkedService.cs index 9cc6851dfd52..490ee849179d 100644 --- a/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/Models/PostgreSqlV2LinkedService.cs +++ b/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/Models/PostgreSqlV2LinkedService.cs @@ -18,18 +18,21 @@ public partial class PostgreSqlV2LinkedService : DataFactoryLinkedServicePropert /// Server name for connection. Type: string. /// Username for authentication. Type: string. /// Database name for connection. Type: string. + /// The authentication type to use. Type: string. /// SSL mode for connection. Type: integer. 0: disable, 1:allow, 2: prefer, 3: require, 4: verify-ca, 5: verify-full. Type: integer. - /// , , or is null. - public PostgreSqlV2LinkedService(DataFactoryElement server, DataFactoryElement username, DataFactoryElement database, DataFactoryElement sslMode) + /// , , , or is null. + public PostgreSqlV2LinkedService(DataFactoryElement server, DataFactoryElement username, DataFactoryElement database, DataFactoryElement authenticationType, DataFactoryElement sslMode) { Argument.AssertNotNull(server, nameof(server)); Argument.AssertNotNull(username, nameof(username)); Argument.AssertNotNull(database, nameof(database)); + Argument.AssertNotNull(authenticationType, nameof(authenticationType)); Argument.AssertNotNull(sslMode, nameof(sslMode)); Server = server; Username = username; Database = database; + AuthenticationType = authenticationType; SslMode = sslMode; LinkedServiceType = "PostgreSqlV2"; } @@ -46,6 +49,7 @@ public PostgreSqlV2LinkedService(DataFactoryElement server, DataFactoryE /// The port for the connection. Type: integer. /// Username for authentication. Type: string. /// Database name for connection. Type: string. + /// The authentication type to use. Type: string. /// SSL mode for connection. Type: integer. 0: disable, 1:allow, 2: prefer, 3: require, 4: verify-ca, 5: verify-full. Type: integer. /// Sets the schema search path. Type: string. /// Whether connection pooling should be used. Type: boolean. @@ -61,12 +65,13 @@ public PostgreSqlV2LinkedService(DataFactoryElement server, DataFactoryE /// Gets or sets the .NET encoding that will be used to encode/decode PostgreSQL string data. Type: string. /// The Azure key vault secret reference of password in connection string. Type: string. /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - internal PostgreSqlV2LinkedService(string linkedServiceType, string linkedServiceVersion, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, DataFactoryElement server, DataFactoryElement port, DataFactoryElement username, DataFactoryElement database, DataFactoryElement sslMode, DataFactoryElement schema, DataFactoryElement pooling, DataFactoryElement connectionTimeout, DataFactoryElement commandTimeout, DataFactoryElement trustServerCertificate, DataFactoryElement sslCertificate, DataFactoryElement sslKey, DataFactoryElement sslPassword, DataFactoryElement readBufferSize, DataFactoryElement logParameters, DataFactoryElement timezone, DataFactoryElement encoding, DataFactoryKeyVaultSecret password, string encryptedCredential) : base(linkedServiceType, linkedServiceVersion, connectVia, description, parameters, annotations, additionalProperties) + internal PostgreSqlV2LinkedService(string linkedServiceType, string linkedServiceVersion, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, DataFactoryElement server, DataFactoryElement port, DataFactoryElement username, DataFactoryElement database, DataFactoryElement authenticationType, DataFactoryElement sslMode, DataFactoryElement schema, DataFactoryElement pooling, DataFactoryElement connectionTimeout, DataFactoryElement commandTimeout, DataFactoryElement trustServerCertificate, DataFactoryElement sslCertificate, DataFactoryElement sslKey, DataFactoryElement sslPassword, DataFactoryElement readBufferSize, DataFactoryElement logParameters, DataFactoryElement timezone, DataFactoryElement encoding, DataFactoryKeyVaultSecret password, string encryptedCredential) : base(linkedServiceType, linkedServiceVersion, connectVia, description, parameters, annotations, additionalProperties) { Server = server; Port = port; Username = username; Database = database; + AuthenticationType = authenticationType; SslMode = sslMode; Schema = schema; Pooling = pooling; @@ -98,6 +103,8 @@ internal PostgreSqlV2LinkedService() public DataFactoryElement Username { get; set; } /// Database name for connection. Type: string. public DataFactoryElement Database { get; set; } + /// The authentication type to use. Type: string. + public DataFactoryElement AuthenticationType { get; set; } /// SSL mode for connection. Type: integer. 0: disable, 1:allow, 2: prefer, 3: require, 4: verify-ca, 5: verify-full. Type: integer. public DataFactoryElement SslMode { get; set; } /// Sets the schema search path. Type: string. diff --git a/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/Models/SalesforceV2Source.Serialization.cs b/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/Models/SalesforceV2Source.Serialization.cs index b35d1969531f..e1d3746ab423 100644 --- a/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/Models/SalesforceV2Source.Serialization.cs +++ b/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/Models/SalesforceV2Source.Serialization.cs @@ -51,6 +51,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("includeDeletedObjects"u8); JsonSerializer.Serialize(writer, IncludeDeletedObjects); } + if (Optional.IsDefined(PageSize)) + { + writer.WritePropertyName("pageSize"u8); + JsonSerializer.Serialize(writer, PageSize); + } foreach (var item in AdditionalProperties) { writer.WritePropertyName(item.Key); @@ -88,6 +93,7 @@ internal static SalesforceV2Source DeserializeSalesforceV2Source(JsonElement ele DataFactoryElement soqlQuery = default; DataFactoryElement query = default; DataFactoryElement includeDeletedObjects = default; + DataFactoryElement pageSize = default; DataFactoryElement queryTimeout = default; BinaryData additionalColumns = default; string type = default; @@ -126,6 +132,15 @@ internal static SalesforceV2Source DeserializeSalesforceV2Source(JsonElement ele includeDeletedObjects = JsonSerializer.Deserialize>(property.Value.GetRawText()); continue; } + if (property.NameEquals("pageSize"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + pageSize = JsonSerializer.Deserialize>(property.Value.GetRawText()); + continue; + } if (property.NameEquals("queryTimeout"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -199,7 +214,8 @@ internal static SalesforceV2Source DeserializeSalesforceV2Source(JsonElement ele additionalColumns, soqlQuery, query, - includeDeletedObjects); + includeDeletedObjects, + pageSize); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/Models/SalesforceV2Source.cs b/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/Models/SalesforceV2Source.cs index 5b09cb5c1337..cc837f8609f5 100644 --- a/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/Models/SalesforceV2Source.cs +++ b/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/Models/SalesforceV2Source.cs @@ -32,11 +32,13 @@ public SalesforceV2Source() /// Deprecating, please use 'query' property instead. Type: string (or Expression with resultType string). /// You can only use Salesforce Object Query Language (SOQL) query with limitations. For SOQL limitations, see this article: https://developer.salesforce.com/docs/atlas.en-us.api_asynch.meta/api_asynch/queries.htm#SOQL%20Considerations. If query is not specified, all the data of the Salesforce object specified in ObjectApiName/reportId in dataset will be retrieved. Type: string (or Expression with resultType string). /// This property control whether query result contains Deleted objects. Default is false. Type: boolean (or Expression with resultType boolean). - internal SalesforceV2Source(string copySourceType, DataFactoryElement sourceRetryCount, DataFactoryElement sourceRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary additionalProperties, DataFactoryElement queryTimeout, BinaryData additionalColumns, DataFactoryElement soqlQuery, DataFactoryElement query, DataFactoryElement includeDeletedObjects) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties, queryTimeout, additionalColumns) + /// Page size for each http request, too large pageSize will caused timeout, default 300,000. Type: integer (or Expression with resultType integer). + internal SalesforceV2Source(string copySourceType, DataFactoryElement sourceRetryCount, DataFactoryElement sourceRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary additionalProperties, DataFactoryElement queryTimeout, BinaryData additionalColumns, DataFactoryElement soqlQuery, DataFactoryElement query, DataFactoryElement includeDeletedObjects, DataFactoryElement pageSize) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties, queryTimeout, additionalColumns) { SoqlQuery = soqlQuery; Query = query; IncludeDeletedObjects = includeDeletedObjects; + PageSize = pageSize; CopySourceType = copySourceType ?? "SalesforceV2Source"; } @@ -46,5 +48,7 @@ internal SalesforceV2Source(string copySourceType, DataFactoryElement sourc public DataFactoryElement Query { get; set; } /// This property control whether query result contains Deleted objects. Default is false. Type: boolean (or Expression with resultType boolean). public DataFactoryElement IncludeDeletedObjects { get; set; } + /// Page size for each http request, too large pageSize will caused timeout, default 300,000. Type: integer (or Expression with resultType integer). + public DataFactoryElement PageSize { get; set; } } } diff --git a/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/Models/ServiceNowV2Source.Serialization.cs b/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/Models/ServiceNowV2Source.Serialization.cs index 2d40098816e7..bb09bfbc9067 100644 --- a/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/Models/ServiceNowV2Source.Serialization.cs +++ b/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/Models/ServiceNowV2Source.Serialization.cs @@ -41,6 +41,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("expression"u8); writer.WriteObjectValue(Expression, options); } + if (Optional.IsDefined(PageSize)) + { + writer.WritePropertyName("pageSize"u8); + JsonSerializer.Serialize(writer, PageSize); + } foreach (var item in AdditionalProperties) { writer.WritePropertyName(item.Key); @@ -76,6 +81,7 @@ internal static ServiceNowV2Source DeserializeServiceNowV2Source(JsonElement ele return null; } DataFactoryExpressionV2 expression = default; + DataFactoryElement pageSize = default; DataFactoryElement queryTimeout = default; BinaryData additionalColumns = default; string type = default; @@ -96,6 +102,15 @@ internal static ServiceNowV2Source DeserializeServiceNowV2Source(JsonElement ele expression = DataFactoryExpressionV2.DeserializeDataFactoryExpressionV2(property.Value, options); continue; } + if (property.NameEquals("pageSize"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + pageSize = JsonSerializer.Deserialize>(property.Value.GetRawText()); + continue; + } if (property.NameEquals("queryTimeout"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -167,7 +182,8 @@ internal static ServiceNowV2Source DeserializeServiceNowV2Source(JsonElement ele additionalProperties, queryTimeout, additionalColumns, - expression); + expression, + pageSize); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/Models/ServiceNowV2Source.cs b/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/Models/ServiceNowV2Source.cs index 62e0c258de31..3817f061ee6c 100644 --- a/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/Models/ServiceNowV2Source.cs +++ b/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/Models/ServiceNowV2Source.cs @@ -30,13 +30,17 @@ public ServiceNowV2Source() /// Query timeout. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). /// Specifies the additional columns to be added to source data. Type: array of objects(AdditionalColumns) (or Expression with resultType array of objects). /// Expression to filter data from source. - internal ServiceNowV2Source(string copySourceType, DataFactoryElement sourceRetryCount, DataFactoryElement sourceRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary additionalProperties, DataFactoryElement queryTimeout, BinaryData additionalColumns, DataFactoryExpressionV2 expression) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties, queryTimeout, additionalColumns) + /// Page size of the result. Type: integer (or Expression with resultType integer). + internal ServiceNowV2Source(string copySourceType, DataFactoryElement sourceRetryCount, DataFactoryElement sourceRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary additionalProperties, DataFactoryElement queryTimeout, BinaryData additionalColumns, DataFactoryExpressionV2 expression, DataFactoryElement pageSize) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties, queryTimeout, additionalColumns) { Expression = expression; + PageSize = pageSize; CopySourceType = copySourceType ?? "ServiceNowV2Source"; } /// Expression to filter data from source. public DataFactoryExpressionV2 Expression { get; set; } + /// Page size of the result. Type: integer (or Expression with resultType integer). + public DataFactoryElement PageSize { get; set; } } } diff --git a/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/Models/SnowflakeV2LinkedService.Serialization.cs b/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/Models/SnowflakeV2LinkedService.Serialization.cs index 3e0b1987f5d9..04a036cc8523 100644 --- a/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/Models/SnowflakeV2LinkedService.Serialization.cs +++ b/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/Models/SnowflakeV2LinkedService.Serialization.cs @@ -89,6 +89,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("privateKeyPassphrase"u8); JsonSerializer.Serialize(writer, PrivateKeyPassphrase); } + if (Optional.IsDefined(Host)) + { + writer.WritePropertyName("host"u8); + JsonSerializer.Serialize(writer, Host); + } if (Optional.IsDefined(EncryptedCredential)) { writer.WritePropertyName("encryptedCredential"u8); @@ -147,6 +152,7 @@ internal static SnowflakeV2LinkedService DeserializeSnowflakeV2LinkedService(Jso DataFactoryElement scope = default; DataFactorySecret privateKey = default; DataFactorySecret privateKeyPassphrase = default; + DataFactoryElement host = default; string encryptedCredential = default; IDictionary additionalProperties = default; Dictionary additionalPropertiesDictionary = new Dictionary(); @@ -316,6 +322,15 @@ internal static SnowflakeV2LinkedService DeserializeSnowflakeV2LinkedService(Jso privateKeyPassphrase = JsonSerializer.Deserialize(property0.Value.GetRawText()); continue; } + if (property0.NameEquals("host"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + host = JsonSerializer.Deserialize>(property0.Value.GetRawText()); + continue; + } if (property0.NameEquals("encryptedCredential"u8)) { encryptedCredential = property0.Value.GetString(); @@ -347,6 +362,7 @@ internal static SnowflakeV2LinkedService DeserializeSnowflakeV2LinkedService(Jso scope, privateKey, privateKeyPassphrase, + host, encryptedCredential); } diff --git a/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/Models/SnowflakeV2LinkedService.cs b/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/Models/SnowflakeV2LinkedService.cs index f09175ddf311..7e2365d2318d 100644 --- a/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/Models/SnowflakeV2LinkedService.cs +++ b/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/Models/SnowflakeV2LinkedService.cs @@ -51,8 +51,9 @@ public SnowflakeV2LinkedService(DataFactoryElement accountIdentifier, Da /// The scope of the application registered in Azure Active Directory for AADServicePrincipal authentication. /// The Azure key vault secret reference of privateKey for KeyPair auth. /// The Azure key vault secret reference of private key password for KeyPair auth with encrypted private key. + /// The host name of the Snowflake account. /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - internal SnowflakeV2LinkedService(string linkedServiceType, string linkedServiceVersion, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, DataFactoryElement accountIdentifier, DataFactoryElement user, DataFactorySecret password, DataFactoryElement database, DataFactoryElement warehouse, SnowflakeAuthenticationType? authenticationType, DataFactoryElement clientId, DataFactorySecret clientSecret, DataFactoryElement tenantId, DataFactoryElement scope, DataFactorySecret privateKey, DataFactorySecret privateKeyPassphrase, string encryptedCredential) : base(linkedServiceType, linkedServiceVersion, connectVia, description, parameters, annotations, additionalProperties) + internal SnowflakeV2LinkedService(string linkedServiceType, string linkedServiceVersion, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, DataFactoryElement accountIdentifier, DataFactoryElement user, DataFactorySecret password, DataFactoryElement database, DataFactoryElement warehouse, SnowflakeAuthenticationType? authenticationType, DataFactoryElement clientId, DataFactorySecret clientSecret, DataFactoryElement tenantId, DataFactoryElement scope, DataFactorySecret privateKey, DataFactorySecret privateKeyPassphrase, DataFactoryElement host, string encryptedCredential) : base(linkedServiceType, linkedServiceVersion, connectVia, description, parameters, annotations, additionalProperties) { AccountIdentifier = accountIdentifier; User = user; @@ -66,6 +67,7 @@ internal SnowflakeV2LinkedService(string linkedServiceType, string linkedService Scope = scope; PrivateKey = privateKey; PrivateKeyPassphrase = privateKeyPassphrase; + Host = host; EncryptedCredential = encryptedCredential; LinkedServiceType = linkedServiceType ?? "SnowflakeV2"; } @@ -99,6 +101,8 @@ internal SnowflakeV2LinkedService() public DataFactorySecret PrivateKey { get; set; } /// The Azure key vault secret reference of private key password for KeyPair auth with encrypted private key. public DataFactorySecret PrivateKeyPassphrase { get; set; } + /// The host name of the Snowflake account. + public DataFactoryElement Host { get; set; } /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. public string EncryptedCredential { get; set; } } diff --git a/sdk/datafactory/Azure.ResourceManager.DataFactory/src/autorest.md b/sdk/datafactory/Azure.ResourceManager.DataFactory/src/autorest.md index 16fe93617a19..4ba733d5f9a5 100644 --- a/sdk/datafactory/Azure.ResourceManager.DataFactory/src/autorest.md +++ b/sdk/datafactory/Azure.ResourceManager.DataFactory/src/autorest.md @@ -8,7 +8,7 @@ azure-arm: true csharp: true library-name: DataFactory namespace: Azure.ResourceManager.DataFactory -require: https://github.com/Azure/azure-rest-api-specs/blob/1ad29756bd141a47cac770140105a706d065ae1b/specification/datafactory/resource-manager/readme.md +require: https://github.com/Azure/azure-rest-api-specs/blob/b2d15ba74c547ac29ca371932fd8117707c98524/specification/datafactory/resource-manager/readme.md output-folder: $(this-folder)/Generated clear-output-folder: true sample-gen: diff --git a/sdk/devcenter/Azure.Developer.DevCenter/CHANGELOG.md b/sdk/devcenter/Azure.Developer.DevCenter/CHANGELOG.md index 4fbccbd001d5..2c505ef54b6c 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/CHANGELOG.md +++ b/sdk/devcenter/Azure.Developer.DevCenter/CHANGELOG.md @@ -4,6 +4,8 @@ ### Features Added +- Exposed `JsonModelWriteCore` for model serialization procedure. + ### Breaking Changes ### Bugs Fixed diff --git a/sdk/devcenter/Azure.Developer.DevCenter/api/Azure.Developer.DevCenter.netstandard2.0.cs b/sdk/devcenter/Azure.Developer.DevCenter/api/Azure.Developer.DevCenter.netstandard2.0.cs index 8eb054972a63..95e5f86363f7 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/api/Azure.Developer.DevCenter.netstandard2.0.cs +++ b/sdk/devcenter/Azure.Developer.DevCenter/api/Azure.Developer.DevCenter.netstandard2.0.cs @@ -170,6 +170,7 @@ public DevBox(string name, string poolName) { } public Azure.Developer.DevCenter.Models.DevBoxStorageProfile StorageProfile { get { throw null; } } public System.Guid? UniqueId { get { throw null; } } public System.Guid? UserId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Developer.DevCenter.Models.DevBox 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.Developer.DevCenter.Models.DevBox System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -184,6 +185,7 @@ internal DevBoxAction() { } public Azure.Developer.DevCenter.Models.DevBoxNextAction NextAction { get { throw null; } } public string SourceId { get { throw null; } } public System.DateTimeOffset? SuspendedUntil { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Developer.DevCenter.Models.DevBoxAction 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.Developer.DevCenter.Models.DevBoxAction System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -197,6 +199,7 @@ internal DevBoxActionDelayResult() { } public string ActionName { get { throw null; } } public Azure.Developer.DevCenter.Models.DevBoxActionDelayStatus DelayStatus { get { throw null; } } public Azure.ResponseError Error { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Developer.DevCenter.Models.DevBoxActionDelayResult 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.Developer.DevCenter.Models.DevBoxActionDelayResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -244,6 +247,7 @@ public DevBoxHardwareProfile() { } public int? MemoryGB { get { throw null; } } public Azure.Developer.DevCenter.Models.SkuName? SkuName { get { throw null; } } public int? VCPUs { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Developer.DevCenter.Models.DevBoxHardwareProfile 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.Developer.DevCenter.Models.DevBoxHardwareProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -258,6 +262,7 @@ public DevBoxImageReference() { } public string OSBuildNumber { get { throw null; } } public System.DateTimeOffset? PublishedDate { get { throw null; } } public string Version { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Developer.DevCenter.Models.DevBoxImageReference 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.Developer.DevCenter.Models.DevBoxImageReference System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -268,6 +273,7 @@ public partial class DevBoxNextAction : System.ClientModel.Primitives.IJsonModel { internal DevBoxNextAction() { } public System.DateTimeOffset ScheduledTime { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Developer.DevCenter.Models.DevBoxNextAction 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.Developer.DevCenter.Models.DevBoxNextAction System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -304,6 +310,7 @@ internal DevBoxPool() { } public Azure.Developer.DevCenter.Models.DevBoxOSType? OSType { get { throw null; } } public Azure.Developer.DevCenter.Models.StopOnDisconnectConfiguration StopOnDisconnect { get { throw null; } } public Azure.Developer.DevCenter.Models.DevBoxStorageProfile StorageProfile { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Developer.DevCenter.Models.DevBoxPool 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.Developer.DevCenter.Models.DevBoxPool System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -346,6 +353,7 @@ internal DevBoxSchedule() { } public Azure.Developer.DevCenter.Models.ScheduleType ScheduleType { get { throw null; } } public string Time { get { throw null; } } public string TimeZone { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Developer.DevCenter.Models.DevBoxSchedule 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.Developer.DevCenter.Models.DevBoxSchedule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -356,6 +364,7 @@ public partial class DevBoxStorageProfile : System.ClientModel.Primitives.IJsonM { public DevBoxStorageProfile() { } public Azure.Developer.DevCenter.Models.OSDisk OSDisk { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Developer.DevCenter.Models.DevBoxStorageProfile 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.Developer.DevCenter.Models.DevBoxStorageProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -366,6 +375,7 @@ public partial class DevCenterCatalog : System.ClientModel.Primitives.IJsonModel { internal DevCenterCatalog() { } public string Name { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Developer.DevCenter.Models.DevCenterCatalog 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.Developer.DevCenter.Models.DevCenterCatalog System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -384,6 +394,7 @@ public DevCenterEnvironment(string environmentName, string environmentTypeName, public Azure.Developer.DevCenter.Models.EnvironmentProvisioningState? ProvisioningState { get { throw null; } } public Azure.Core.ResourceIdentifier ResourceGroupId { get { throw null; } } public System.Guid? UserId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Developer.DevCenter.Models.DevCenterEnvironment 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.Developer.DevCenter.Models.DevCenterEnvironment System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -396,6 +407,7 @@ internal DevCenterEnvironmentType() { } public Azure.Core.ResourceIdentifier DeploymentTargetId { get { throw null; } } public string Name { get { throw null; } } public Azure.Developer.DevCenter.Models.EnvironmentTypeStatus Status { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Developer.DevCenter.Models.DevCenterEnvironmentType 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.Developer.DevCenter.Models.DevCenterEnvironmentType System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -429,6 +441,7 @@ internal DevCenterProject() { } public string Description { get { throw null; } } public int? MaxDevBoxesPerUser { get { throw null; } } public string Name { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Developer.DevCenter.Models.DevCenterProject 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.Developer.DevCenter.Models.DevCenterProject System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -445,6 +458,7 @@ internal EnvironmentDefinition() { } public System.Collections.Generic.IReadOnlyList Parameters { get { throw null; } } public string ParametersSchema { get { throw null; } } public string TemplatePath { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Developer.DevCenter.Models.EnvironmentDefinition 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.Developer.DevCenter.Models.EnvironmentDefinition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -462,6 +476,7 @@ internal EnvironmentDefinitionParameter() { } public Azure.Developer.DevCenter.Models.EnvironmentDefinitionParameterType ParameterType { get { throw null; } } public bool? ReadOnly { get { throw null; } } public bool Required { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Developer.DevCenter.Models.EnvironmentDefinitionParameter 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.Developer.DevCenter.Models.EnvironmentDefinitionParameter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -578,6 +593,7 @@ public partial class OSDisk : 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.Developer.DevCenter.Models.OSDisk System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -631,6 +647,7 @@ public partial class RemoteConnection : System.ClientModel.Primitives.IJsonModel internal RemoteConnection() { } public System.Uri RdpConnectionUri { get { throw null; } } public System.Uri WebUri { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Developer.DevCenter.Models.RemoteConnection 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.Developer.DevCenter.Models.RemoteConnection System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -714,6 +731,7 @@ public partial class StopOnDisconnectConfiguration : System.ClientModel.Primitiv internal StopOnDisconnectConfiguration() { } public int? GracePeriodMinutes { get { throw null; } } public Azure.Developer.DevCenter.Models.StopOnDisconnectStatus Status { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Developer.DevCenter.Models.StopOnDisconnectConfiguration 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.Developer.DevCenter.Models.StopOnDisconnectConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } diff --git a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/DeploymentEnvironmentsClient.cs b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/DeploymentEnvironmentsClient.cs index cc35748b809f..c22ac63469a0 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/DeploymentEnvironmentsClient.cs +++ b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/DeploymentEnvironmentsClient.cs @@ -101,7 +101,7 @@ public virtual Response GetEnvironment(string projectName, } ///
- /// [Protocol Method] Gets an environment + /// [Protocol Method] Gets an environment. /// /// /// @@ -145,7 +145,7 @@ public virtual async Task GetEnvironmentAsync(string projectName, stri } /// - /// [Protocol Method] Gets an environment + /// [Protocol Method] Gets an environment. /// /// /// @@ -223,7 +223,7 @@ public virtual Response GetCatalog(string projectName, string } /// - /// [Protocol Method] Gets the specified catalog within the project + /// [Protocol Method] Gets the specified catalog within the project. /// /// /// @@ -265,7 +265,7 @@ public virtual async Task GetCatalogAsync(string projectName, string c } /// - /// [Protocol Method] Gets the specified catalog within the project + /// [Protocol Method] Gets the specified catalog within the project. /// /// /// @@ -919,7 +919,7 @@ public virtual Pageable GetEnvironmentDefinitionsByCatalog(string pr } /// Lists all environment types configured for a project. - /// The DevCenter Project upon which to execute operations. + /// Name of the project. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. @@ -935,7 +935,7 @@ public virtual AsyncPageable GetEnvironmentTypesAsync( } /// Lists all environment types configured for a project. - /// The DevCenter Project upon which to execute operations. + /// Name of the project. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. @@ -965,7 +965,7 @@ public virtual Pageable GetEnvironmentTypes(string pro /// /// /// - /// The DevCenter Project upon which to execute operations. + /// Name of the project. /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// is null. /// is an empty string, and was expected to be non-empty. @@ -996,7 +996,7 @@ public virtual AsyncPageable GetEnvironmentTypesAsync(string project /// /// /// - /// The DevCenter Project upon which to execute operations. + /// Name of the project. /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// is null. /// is an empty string, and was expected to be non-empty. diff --git a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/DevBoxesClient.cs b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/DevBoxesClient.cs index e657c7524da0..2293aca62b78 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/DevBoxesClient.cs +++ b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/DevBoxesClient.cs @@ -97,7 +97,7 @@ public virtual Response GetPool(string projectName, string poolName, } /// - /// [Protocol Method] Gets a pool + /// [Protocol Method] Gets a pool. /// /// /// @@ -139,7 +139,7 @@ public virtual async Task GetPoolAsync(string projectName, string pool } /// - /// [Protocol Method] Gets a pool + /// [Protocol Method] Gets a pool. /// /// /// @@ -345,7 +345,7 @@ public virtual Response GetDevBox(string projectName, string userId, str } /// - /// [Protocol Method] Gets a Dev Box + /// [Protocol Method] Gets a Dev Box. /// /// /// @@ -389,7 +389,7 @@ public virtual async Task GetDevBoxAsync(string projectName, string us } /// - /// [Protocol Method] Gets a Dev Box + /// [Protocol Method] Gets a Dev Box. /// /// /// @@ -471,7 +471,7 @@ public virtual Response GetRemoteConnection(string projectName } /// - /// [Protocol Method] Gets RDP Connection info + /// [Protocol Method] Gets RDP Connection info. /// /// /// @@ -515,7 +515,7 @@ public virtual async Task GetRemoteConnectionAsync(string projectName, } /// - /// [Protocol Method] Gets RDP Connection info + /// [Protocol Method] Gets RDP Connection info. /// /// /// @@ -781,7 +781,7 @@ public virtual Response SkipAction(string projectName, string userId, string dev /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. /// Display name for the Dev Box. /// The name of the action. - /// The time to delay the Dev Box action or actions until. + /// The time to delay the Dev Box action or actions until, in RFC3339 format. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -803,7 +803,7 @@ public virtual async Task> DelayActionAsync(string projec /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. /// Display name for the Dev Box. /// The name of the action. - /// The time to delay the Dev Box action or actions until. + /// The time to delay the Dev Box action or actions until, in RFC3339 format. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -839,7 +839,7 @@ public virtual Response DelayAction(string projectName, string use /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. /// Display name for the Dev Box. /// The name of the action. - /// The time to delay the Dev Box action or actions until. + /// The time to delay the Dev Box action or actions until, in RFC3339 format. /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -886,7 +886,7 @@ public virtual async Task DelayActionAsync(string projectName, string /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. /// Display name for the Dev Box. /// The name of the action. - /// The time to delay the Dev Box action or actions until. + /// The time to delay the Dev Box action or actions until, in RFC3339 format. /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -947,7 +947,7 @@ public virtual Pageable GetPools(string projectName, CancellationTok } /// - /// [Protocol Method] Lists available pools + /// [Protocol Method] Lists available pools. /// /// /// @@ -978,7 +978,7 @@ public virtual AsyncPageable GetPoolsAsync(string projectName, Reque } /// - /// [Protocol Method] Lists available pools + /// [Protocol Method] Lists available pools. /// /// /// @@ -1008,9 +1008,9 @@ public virtual Pageable GetPools(string projectName, RequestContext return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "DevBoxesClient.GetPools", "value", "nextLink", context); } - /// Lists available schedules for a pool. - /// Name of the project. - /// Pool name. + /// Lists all schedules within a pool that are configured by your project administrator. + /// The DevCenter Project upon which to execute operations. + /// The name of a pool of Dev Boxes. /// The cancellation token to use. /// or is null. /// or is an empty string, and was expected to be non-empty. @@ -1026,9 +1026,9 @@ public virtual AsyncPageable GetSchedulesAsync(string projectNam return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => DevBoxSchedule.DeserializeDevBoxSchedule(e), ClientDiagnostics, _pipeline, "DevBoxesClient.GetSchedules", "value", "nextLink", context); } - /// Lists available schedules for a pool. - /// Name of the project. - /// Pool name. + /// Lists all schedules within a pool that are configured by your project administrator. + /// The DevCenter Project upon which to execute operations. + /// The name of a pool of Dev Boxes. /// The cancellation token to use. /// or is null. /// or is an empty string, and was expected to be non-empty. @@ -1045,7 +1045,7 @@ public virtual Pageable GetSchedules(string projectName, string } /// - /// [Protocol Method] Lists available schedules for a pool. + /// [Protocol Method] Lists all schedules within a pool that are configured by your project administrator. /// /// /// @@ -1059,8 +1059,8 @@ public virtual Pageable GetSchedules(string projectName, string /// /// /// - /// Name of the project. - /// Pool name. + /// The DevCenter Project upon which to execute operations. + /// The name of a pool of Dev Boxes. /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// or is null. /// or is an empty string, and was expected to be non-empty. @@ -1078,7 +1078,7 @@ public virtual AsyncPageable GetSchedulesAsync(string projectName, s } /// - /// [Protocol Method] Lists available schedules for a pool. + /// [Protocol Method] Lists all schedules within a pool that are configured by your project administrator. /// /// /// @@ -1092,8 +1092,8 @@ public virtual AsyncPageable GetSchedulesAsync(string projectName, s /// /// /// - /// Name of the project. - /// Pool name. + /// The DevCenter Project upon which to execute operations. + /// The name of a pool of Dev Boxes. /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// or is null. /// or is an empty string, and was expected to be non-empty. @@ -1494,7 +1494,7 @@ public virtual Pageable GetDevBoxActions(string projectName, string /// Name of the project. /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. /// Display name for the Dev Box. - /// The time to delay the Dev Box action or actions until. + /// The time to delay the Dev Box action or actions until, in RFC3339 format. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -1515,7 +1515,7 @@ public virtual AsyncPageable DelayAllActionsAsync(strin /// Name of the project. /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. /// Display name for the Dev Box. - /// The time to delay the Dev Box action or actions until. + /// The time to delay the Dev Box action or actions until, in RFC3339 format. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -1550,7 +1550,7 @@ public virtual Pageable DelayAllActions(string projectN /// Name of the project. /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. /// Display name for the Dev Box. - /// The time to delay the Dev Box action or actions until. + /// The time to delay the Dev Box action or actions until, in RFC3339 format. /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -1586,7 +1586,7 @@ public virtual AsyncPageable DelayAllActionsAsync(string projectName /// Name of the project. /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. /// Display name for the Dev Box. - /// The time to delay the Dev Box action or actions until. + /// The time to delay the Dev Box action or actions until, in RFC3339 format. /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -1615,7 +1615,7 @@ public virtual Pageable DelayAllActions(string projectName, string u /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The DevCenter Project upon which to execute the operation. + /// The DevCenter Project upon which to execute operations. /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. /// The name of a Dev Box. /// The content to send as the body of the request. @@ -1657,7 +1657,7 @@ public virtual async Task> CreateDevBoxAsync(WaitUntil wai /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The DevCenter Project upon which to execute the operation. + /// The DevCenter Project upon which to execute operations. /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. /// The name of a Dev Box. /// The content to send as the body of the request. @@ -1772,7 +1772,7 @@ public virtual Operation DeleteDevBox(WaitUntil waitUntil, string projectName, s // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method /// - /// [Protocol Method] Starts a Dev Box + /// [Protocol Method] Starts a Dev Box. /// /// /// @@ -1813,7 +1813,7 @@ public virtual async Task StartDevBoxAsync(WaitUntil waitUntil, strin // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method /// - /// [Protocol Method] Starts a Dev Box + /// [Protocol Method] Starts a Dev Box. /// /// /// @@ -1854,7 +1854,7 @@ public virtual Operation StartDevBox(WaitUntil waitUntil, string projectName, st // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method /// - /// [Protocol Method] Stops a Dev Box + /// [Protocol Method] Stops a Dev Box. /// /// /// @@ -1896,7 +1896,7 @@ public virtual async Task StopDevBoxAsync(WaitUntil waitUntil, string // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method /// - /// [Protocol Method] Stops a Dev Box + /// [Protocol Method] Stops a Dev Box. /// /// /// @@ -1938,7 +1938,7 @@ public virtual Operation StopDevBox(WaitUntil waitUntil, string projectName, str // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method /// - /// [Protocol Method] Restarts a Dev Box + /// [Protocol Method] Restarts a Dev Box. /// /// /// @@ -1979,7 +1979,7 @@ public virtual async Task RestartDevBoxAsync(WaitUntil waitUntil, str // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method /// - /// [Protocol Method] Restarts a Dev Box + /// [Protocol Method] Restarts a Dev Box. /// /// /// diff --git a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/DevCenterModelFactory.cs b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/DevCenterModelFactory.cs index ea10b8dc1251..31af969b8fd0 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/DevCenterModelFactory.cs +++ b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/DevCenterModelFactory.cs @@ -85,7 +85,7 @@ public static OSDisk OSDisk(int? diskSizeGB = null) /// The version of the image. /// The operating system of the image. /// The operating system build number of the image. - /// The datetime that the backing image version was published. + /// The datetime that the backing image version was published, in RFC3339 format. /// A new instance for mocking. public static DevBoxImageReference DevBoxImageReference(string name = null, string version = null, string operatingSystem = null, string osBuildNumber = null, DateTimeOffset? publishedDate = null) { @@ -156,7 +156,7 @@ public static DevBoxSchedule DevBoxSchedule(string name = null, ScheduleType sch /// Information about the Dev Box's hardware resources. /// Storage settings for this Dev Box. /// Information about the image used for this Dev Box. - /// Creation time of this Dev Box. + /// Creation time of this Dev Box, in RFC3339 format. /// Indicates whether the owner of the Dev Box is a local administrator. /// A new instance for mocking. public static DevBox DevBox(string name = null, string projectName = null, string poolName = null, HibernateSupport? hibernateSupport = null, DevBoxProvisioningState? provisioningState = null, string actionState = null, PowerState? powerState = null, Guid? uniqueId = null, ResponseError error = null, AzureLocation? location = null, DevBoxOSType? osType = null, Guid? userId = null, DevBoxHardwareProfile hardwareProfile = null, DevBoxStorageProfile storageProfile = null, DevBoxImageReference imageReference = null, DateTimeOffset? createdTime = null, LocalAdministratorStatus? localAdministratorStatus = null) @@ -195,7 +195,7 @@ public static RemoteConnection RemoteConnection(Uri webUri = null, Uri rdpConnec /// The name of the action. /// The action that will be taken. /// The id of the resource which triggered this action. - /// The earliest time that the action could occur (UTC). + /// The earliest time that the action could occur (UTC), in RFC3339 format. /// Details about the next run of this action. /// A new instance for mocking. public static DevBoxAction DevBoxAction(string name = null, DevBoxActionType actionType = default, string sourceId = null, DateTimeOffset? suspendedUntil = null, DevBoxNextAction nextAction = null) @@ -210,7 +210,7 @@ public static DevBoxAction DevBoxAction(string name = null, DevBoxActionType act } /// Initializes a new instance of . - /// The time the action will be triggered (UTC). + /// The time the action will be triggered (UTC), in RFC3339 format. /// A new instance for mocking. public static DevBoxNextAction DevBoxNextAction(DateTimeOffset scheduledTime = default) { @@ -295,7 +295,7 @@ public static EnvironmentDefinition EnvironmentDefinition(string id = null, stri /// Default value of the parameter. /// /// A string of one of the basic JSON types (number, integer, array, object, - /// boolean, string) + /// boolean, string). /// /// /// Whether or not this parameter is read-only. If true, default should have a diff --git a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBox.Serialization.cs b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBox.Serialization.cs index 066bf0bf65dd..bb4754e3bb6b 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBox.Serialization.cs +++ b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBox.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevBox : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions op throw new FormatException($"The model {nameof(DevBox)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W") { writer.WritePropertyName("name"u8); @@ -123,7 +131,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions op #endif } } - writer.WriteEndObject(); } DevBox IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBox.cs b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBox.cs index 57e8e92069bb..06201ba6539c 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBox.cs +++ b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBox.cs @@ -71,7 +71,7 @@ public partial class DevBox /// Information about the Dev Box's hardware resources. /// Storage settings for this Dev Box. /// Information about the image used for this Dev Box. - /// Creation time of this Dev Box. + /// Creation time of this Dev Box, in RFC3339 format. /// Indicates whether the owner of the Dev Box is a local administrator. /// Keeps track of any properties unknown to the library. internal DevBox(string name, string projectName, string poolName, HibernateSupport? hibernateSupport, DevBoxProvisioningState? provisioningState, string actionState, PowerState? powerState, Guid? uniqueId, ResponseError error, AzureLocation? location, DevBoxOSType? osType, Guid? userId, DevBoxHardwareProfile hardwareProfile, DevBoxStorageProfile storageProfile, DevBoxImageReference imageReference, DateTimeOffset? createdTime, LocalAdministratorStatus? localAdministratorStatus, IDictionary serializedAdditionalRawData) @@ -140,7 +140,7 @@ internal DevBox() public DevBoxStorageProfile StorageProfile { get; } /// Information about the image used for this Dev Box. public DevBoxImageReference ImageReference { get; } - /// Creation time of this Dev Box. + /// Creation time of this Dev Box, in RFC3339 format. public DateTimeOffset? CreatedTime { get; } /// Indicates whether the owner of the Dev Box is a local administrator. public LocalAdministratorStatus? LocalAdministratorStatus { get; set; } diff --git a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxAction.Serialization.cs b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxAction.Serialization.cs index 4c5195decf76..06721a907491 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxAction.Serialization.cs +++ b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxAction.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevBoxAction : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(DevBoxAction)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W") { writer.WritePropertyName("name"u8); @@ -60,7 +68,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti #endif } } - writer.WriteEndObject(); } DevBoxAction IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxAction.cs b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxAction.cs index c204cd48b228..c5f0e218e802 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxAction.cs +++ b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxAction.cs @@ -61,7 +61,7 @@ internal DevBoxAction(DevBoxActionType actionType, string sourceId) /// The name of the action. /// The action that will be taken. /// The id of the resource which triggered this action. - /// The earliest time that the action could occur (UTC). + /// The earliest time that the action could occur (UTC), in RFC3339 format. /// Details about the next run of this action. /// Keeps track of any properties unknown to the library. internal DevBoxAction(string name, DevBoxActionType actionType, string sourceId, DateTimeOffset? suspendedUntil, DevBoxNextAction nextAction, IDictionary serializedAdditionalRawData) @@ -85,7 +85,7 @@ internal DevBoxAction() public DevBoxActionType ActionType { get; } /// The id of the resource which triggered this action. public string SourceId { get; } - /// The earliest time that the action could occur (UTC). + /// The earliest time that the action could occur (UTC), in RFC3339 format. public DateTimeOffset? SuspendedUntil { get; } /// Details about the next run of this action. public DevBoxNextAction NextAction { get; } diff --git a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxActionDelayResult.Serialization.cs b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxActionDelayResult.Serialization.cs index 90b8cc68585b..ad8681e69599 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxActionDelayResult.Serialization.cs +++ b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxActionDelayResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevBoxActionDelayResult : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(DevBoxActionDelayResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(ActionName); writer.WritePropertyName("result"u8); @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } DevBoxActionDelayResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxHardwareProfile.Serialization.cs b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxHardwareProfile.Serialization.cs index cc9f1469f91b..2144cf2034ec 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxHardwareProfile.Serialization.cs +++ b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxHardwareProfile.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevBoxHardwareProfile : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(DevBoxHardwareProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(SkuName)) { writer.WritePropertyName("skuName"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } DevBoxHardwareProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxImageReference.Serialization.cs b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxImageReference.Serialization.cs index 98271755058f..e3480721bd9c 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxImageReference.Serialization.cs +++ b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxImageReference.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevBoxImageReference : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(DevBoxImageReference)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } DevBoxImageReference IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxImageReference.cs b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxImageReference.cs index f007cf201494..1d98878c22cc 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxImageReference.cs +++ b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxImageReference.cs @@ -55,7 +55,7 @@ public DevBoxImageReference() /// The version of the image. /// The operating system of the image. /// The operating system build number of the image. - /// The datetime that the backing image version was published. + /// The datetime that the backing image version was published, in RFC3339 format. /// Keeps track of any properties unknown to the library. internal DevBoxImageReference(string name, string version, string operatingSystem, string osBuildNumber, DateTimeOffset? publishedDate, IDictionary serializedAdditionalRawData) { @@ -75,7 +75,7 @@ internal DevBoxImageReference(string name, string version, string operatingSyste public string OperatingSystem { get; } /// The operating system build number of the image. public string OSBuildNumber { get; } - /// The datetime that the backing image version was published. + /// The datetime that the backing image version was published, in RFC3339 format. public DateTimeOffset? PublishedDate { get; } } } diff --git a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxNextAction.Serialization.cs b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxNextAction.Serialization.cs index 76036d73ca70..da7d2142f43a 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxNextAction.Serialization.cs +++ b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxNextAction.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevBoxNextAction : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(DevBoxNextAction)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("scheduledTime"u8); writer.WriteStringValue(ScheduledTime, "O"); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } DevBoxNextAction IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxNextAction.cs b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxNextAction.cs index 7abeb1fff11c..3e6d5cad2f7e 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxNextAction.cs +++ b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxNextAction.cs @@ -46,14 +46,14 @@ public partial class DevBoxNextAction private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// The time the action will be triggered (UTC). + /// The time the action will be triggered (UTC), in RFC3339 format. internal DevBoxNextAction(DateTimeOffset scheduledTime) { ScheduledTime = scheduledTime; } /// Initializes a new instance of . - /// The time the action will be triggered (UTC). + /// The time the action will be triggered (UTC), in RFC3339 format. /// Keeps track of any properties unknown to the library. internal DevBoxNextAction(DateTimeOffset scheduledTime, IDictionary serializedAdditionalRawData) { @@ -66,7 +66,7 @@ internal DevBoxNextAction() { } - /// The time the action will be triggered (UTC). + /// The time the action will be triggered (UTC), in RFC3339 format. public DateTimeOffset ScheduledTime { get; } } } diff --git a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxPool.Serialization.cs b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxPool.Serialization.cs index 38fadfba7edc..843302299202 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxPool.Serialization.cs +++ b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxPool.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevBoxPool : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOption throw new FormatException($"The model {nameof(DevBoxPool)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W") { writer.WritePropertyName("name"u8); @@ -85,7 +93,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOption #endif } } - writer.WriteEndObject(); } DevBoxPool IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxSchedule.Serialization.cs b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxSchedule.Serialization.cs index f3d3d9ed7875..d08806248262 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxSchedule.Serialization.cs +++ b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxSchedule.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevBoxSchedule : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(DevBoxSchedule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W") { writer.WritePropertyName("name"u8); @@ -54,7 +62,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp #endif } } - writer.WriteEndObject(); } DevBoxSchedule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxStorageProfile.Serialization.cs b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxStorageProfile.Serialization.cs index 12ec22c9ee7c..bbd578008a53 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxStorageProfile.Serialization.cs +++ b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxStorageProfile.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevBoxStorageProfile : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(DevBoxStorageProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(OSDisk)) { writer.WritePropertyName("osDisk"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } DevBoxStorageProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevCenterCatalog.Serialization.cs b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevCenterCatalog.Serialization.cs index 2e84ca0135d8..7e3254851bbd 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevCenterCatalog.Serialization.cs +++ b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevCenterCatalog.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevCenterCatalog : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(DevCenterCatalog)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W") { writer.WritePropertyName("name"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } DevCenterCatalog IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevCenterEnvironment.Serialization.cs b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevCenterEnvironment.Serialization.cs index 6e10bfb23094..31d7cb8cb722 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevCenterEnvironment.Serialization.cs +++ b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevCenterEnvironment.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevCenterEnvironment : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(DevCenterEnvironment)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Parameters)) { writer.WritePropertyName("parameters"u8); @@ -95,7 +103,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } DevCenterEnvironment IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevCenterEnvironmentType.Serialization.cs b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevCenterEnvironmentType.Serialization.cs index f17dca7b2f2c..3e473e3fe6e3 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevCenterEnvironmentType.Serialization.cs +++ b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevCenterEnvironmentType.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevCenterEnvironmentType : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,9 +34,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(DevCenterEnvironmentType)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); + if (options.Format != "W") + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } writer.WritePropertyName("deploymentTargetId"u8); writer.WriteStringValue(DeploymentTargetId); writer.WritePropertyName("status"u8); @@ -47,7 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } DevCenterEnvironmentType IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevCenterEnvironmentType.cs b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevCenterEnvironmentType.cs index a9d9a7bb8d38..7ab4e428ebf5 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevCenterEnvironmentType.cs +++ b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevCenterEnvironmentType.cs @@ -47,20 +47,17 @@ public partial class DevCenterEnvironmentType private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// Name of the environment type. /// /// Id of a subscription or management group that the environment type will be /// mapped to. The environment's resources will be deployed into this subscription /// or management group. /// /// Indicates whether this environment type is enabled for use in this project. - /// or is null. - internal DevCenterEnvironmentType(string name, ResourceIdentifier deploymentTargetId, EnvironmentTypeStatus status) + /// is null. + internal DevCenterEnvironmentType(ResourceIdentifier deploymentTargetId, EnvironmentTypeStatus status) { - Argument.AssertNotNull(name, nameof(name)); Argument.AssertNotNull(deploymentTargetId, nameof(deploymentTargetId)); - Name = name; DeploymentTargetId = deploymentTargetId; Status = status; } diff --git a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevCenterProject.Serialization.cs b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevCenterProject.Serialization.cs index 720b17604b19..831844edf586 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevCenterProject.Serialization.cs +++ b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevCenterProject.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevCenterProject : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(DevCenterProject)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W") { writer.WritePropertyName("name"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } DevCenterProject IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/EnvironmentDefinition.Serialization.cs b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/EnvironmentDefinition.Serialization.cs index 982c1964c9ba..b5748cef5823 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/EnvironmentDefinition.Serialization.cs +++ b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/EnvironmentDefinition.Serialization.cs @@ -18,6 +18,15 @@ public partial class EnvironmentDefinition : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(EnvironmentDefinition)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("id"u8); writer.WriteStringValue(Id); if (options.Format != "W") @@ -75,7 +83,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } EnvironmentDefinition IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/EnvironmentDefinitionParameter.Serialization.cs b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/EnvironmentDefinitionParameter.Serialization.cs index 3c060ecc42e6..61fc9370a303 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/EnvironmentDefinitionParameter.Serialization.cs +++ b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/EnvironmentDefinitionParameter.Serialization.cs @@ -18,6 +18,15 @@ public partial class EnvironmentDefinitionParameter : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(EnvironmentDefinitionParameter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("id"u8); writer.WriteStringValue(Id); if (Optional.IsDefined(Name)) @@ -77,7 +85,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } EnvironmentDefinitionParameter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/EnvironmentDefinitionParameter.cs b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/EnvironmentDefinitionParameter.cs index c67ea98e4a76..22fe93a82fe5 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/EnvironmentDefinitionParameter.cs +++ b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/EnvironmentDefinitionParameter.cs @@ -49,7 +49,7 @@ public partial class EnvironmentDefinitionParameter /// Unique ID of the parameter. /// /// A string of one of the basic JSON types (number, integer, array, object, - /// boolean, string) + /// boolean, string). /// /// Whether or not this parameter is required. /// is null. @@ -70,7 +70,7 @@ internal EnvironmentDefinitionParameter(string id, EnvironmentDefinitionParamete /// Default value of the parameter. /// /// A string of one of the basic JSON types (number, integer, array, object, - /// boolean, string) + /// boolean, string). /// /// /// Whether or not this parameter is read-only. If true, default should have a @@ -107,7 +107,7 @@ internal EnvironmentDefinitionParameter() public string DefaultValue { get; } /// /// A string of one of the basic JSON types (number, integer, array, object, - /// boolean, string) + /// boolean, string). /// public EnvironmentDefinitionParameterType ParameterType { get; } /// diff --git a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/OSDisk.Serialization.cs b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/OSDisk.Serialization.cs index 5aba522369ea..9935abde0f1b 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/OSDisk.Serialization.cs +++ b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/OSDisk.Serialization.cs @@ -18,6 +18,15 @@ public partial class OSDisk : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions op throw new FormatException($"The model {nameof(OSDisk)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(DiskSizeGB)) { writer.WritePropertyName("diskSizeGB"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions op #endif } } - writer.WriteEndObject(); } OSDisk IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/RemoteConnection.Serialization.cs b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/RemoteConnection.Serialization.cs index 4ea169aaa1fe..c5cc10ee6e3a 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/RemoteConnection.Serialization.cs +++ b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/RemoteConnection.Serialization.cs @@ -18,6 +18,15 @@ public partial class RemoteConnection : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(RemoteConnection)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(WebUri)) { writer.WritePropertyName("webUrl"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } RemoteConnection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/StopOnDisconnectConfiguration.Serialization.cs b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/StopOnDisconnectConfiguration.Serialization.cs index ccac05e31e34..95fe6183f279 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/StopOnDisconnectConfiguration.Serialization.cs +++ b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/StopOnDisconnectConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class StopOnDisconnectConfiguration : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(StopOnDisconnectConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("status"u8); writer.WriteStringValue(Status.ToString()); if (Optional.IsDefined(GracePeriodMinutes)) @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } StopOnDisconnectConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devcenter/Azure.Developer.DevCenter/tests/Generated/Samples/Samples_DeploymentEnvironmentsClient.cs b/sdk/devcenter/Azure.Developer.DevCenter/tests/Generated/Samples/Samples_DeploymentEnvironmentsClient.cs index 3bac6833b92d..fc4ba880bfc1 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/tests/Generated/Samples/Samples_DeploymentEnvironmentsClient.cs +++ b/sdk/devcenter/Azure.Developer.DevCenter/tests/Generated/Samples/Samples_DeploymentEnvironmentsClient.cs @@ -479,7 +479,7 @@ public async Task Example_EnvironmentClientOperations_GetEnvironmentDefinitionsB [Test] [Ignore("Only validating compilation of examples")] - public void Example_EnvironmentClientOperations_GetEnvironmentTypes_ListsAllEnvironmentTypesConfiguredForAProject() + public void Example_EnvironmentType_GetEnvironmentTypes_ListsAllEnvironmentTypesConfiguredForAProject() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -496,7 +496,7 @@ public void Example_EnvironmentClientOperations_GetEnvironmentTypes_ListsAllEnvi [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_EnvironmentClientOperations_GetEnvironmentTypes_ListsAllEnvironmentTypesConfiguredForAProject_Async() + public async Task Example_EnvironmentType_GetEnvironmentTypes_ListsAllEnvironmentTypesConfiguredForAProject_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -513,7 +513,7 @@ public async Task Example_EnvironmentClientOperations_GetEnvironmentTypes_ListsA [Test] [Ignore("Only validating compilation of examples")] - public void Example_EnvironmentClientOperations_GetEnvironmentTypes_ListsAllEnvironmentTypesConfiguredForAProject_Convenience() + public void Example_EnvironmentType_GetEnvironmentTypes_ListsAllEnvironmentTypesConfiguredForAProject_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -526,7 +526,7 @@ public void Example_EnvironmentClientOperations_GetEnvironmentTypes_ListsAllEnvi [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_EnvironmentClientOperations_GetEnvironmentTypes_ListsAllEnvironmentTypesConfiguredForAProject_Convenience_Async() + public async Task Example_EnvironmentType_GetEnvironmentTypes_ListsAllEnvironmentTypesConfiguredForAProject_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); diff --git a/sdk/devcenter/Azure.Developer.DevCenter/tests/Generated/Samples/Samples_DevBoxesClient.cs b/sdk/devcenter/Azure.Developer.DevCenter/tests/Generated/Samples/Samples_DevBoxesClient.cs index 227fde00f705..35a98bd001e3 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/tests/Generated/Samples/Samples_DevBoxesClient.cs +++ b/sdk/devcenter/Azure.Developer.DevCenter/tests/Generated/Samples/Samples_DevBoxesClient.cs @@ -427,7 +427,7 @@ public async Task Example_Pool_GetPools_ListsAvailablePools_Convenience_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Schedule_GetSchedules_ListsAvailableSchedulesForAPool() + public void Example_DevBoxesClientOperations_GetSchedules_ListsAvailableSchedulesForAPool() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -446,7 +446,7 @@ public void Example_Schedule_GetSchedules_ListsAvailableSchedulesForAPool() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Schedule_GetSchedules_ListsAvailableSchedulesForAPool_Async() + public async Task Example_DevBoxesClientOperations_GetSchedules_ListsAvailableSchedulesForAPool_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -465,7 +465,7 @@ public async Task Example_Schedule_GetSchedules_ListsAvailableSchedulesForAPool_ [Test] [Ignore("Only validating compilation of examples")] - public void Example_Schedule_GetSchedules_ListsAvailableSchedulesForAPool_Convenience() + public void Example_DevBoxesClientOperations_GetSchedules_ListsAvailableSchedulesForAPool_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -478,7 +478,7 @@ public void Example_Schedule_GetSchedules_ListsAvailableSchedulesForAPool_Conven [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Schedule_GetSchedules_ListsAvailableSchedulesForAPool_Convenience_Async() + public async Task Example_DevBoxesClientOperations_GetSchedules_ListsAvailableSchedulesForAPool_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); diff --git a/sdk/devcenter/Azure.Developer.DevCenter/tsp-location.yaml b/sdk/devcenter/Azure.Developer.DevCenter/tsp-location.yaml index c744b507b924..8ea42aae47b3 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/tsp-location.yaml +++ b/sdk/devcenter/Azure.Developer.DevCenter/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/devcenter/DevCenter -commit: 63dc797c014849ef0c5da7eb91197975efb6a474 +commit: 7b35ea773c62c90b8f77d563cd315fec658ca287 repo: Azure/azure-rest-api-specs cleanup: false diff --git a/sdk/devcenter/tests.yml b/sdk/devcenter/tests.yml index 3a81489b2c5f..27ea8595efc8 100644 --- a/sdk/devcenter/tests.yml +++ b/sdk/devcenter/tests.yml @@ -7,7 +7,8 @@ extends: SDKType: client DeployTestResources: true TimeoutInMinutes: 240 + UseFederatedAuth: false #This looks to be another sub so it will need a new service connection to run CloudConfig: - Public: - SubscriptionConfiguration: $(sub-config-devcenter-test-resources) - Location: "eastus" + Public: + SubscriptionConfiguration: $(sub-config-devcenter-test-resources) + Location: "eastus" diff --git a/sdk/deviceprovisioningservices/Azure.ResourceManager.DeviceProvisioningServices/samples/Generated/Samples/Sample_DeviceProvisioningServiceCollection.cs b/sdk/deviceprovisioningservices/Azure.ResourceManager.DeviceProvisioningServices/samples/Generated/Samples/Sample_DeviceProvisioningServiceCollection.cs index 4ca8b2b859a1..2b1950d89a92 100644 --- a/sdk/deviceprovisioningservices/Azure.ResourceManager.DeviceProvisioningServices/samples/Generated/Samples/Sample_DeviceProvisioningServiceCollection.cs +++ b/sdk/deviceprovisioningservices/Azure.ResourceManager.DeviceProvisioningServices/samples/Generated/Samples/Sample_DeviceProvisioningServiceCollection.cs @@ -153,7 +153,7 @@ public async Task CreateOrUpdate_DPSCreate() }, new DeviceProvisioningServicesSkuInfo() { Name = DeviceProvisioningServicesSku.S1, - Capacity = 1, + Capacity = 1L, }) { Tags = diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/api/Azure.ResourceManager.DevOpsInfrastructure.netstandard2.0.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/api/Azure.ResourceManager.DevOpsInfrastructure.netstandard2.0.cs index e442d25585f9..86448afdc637 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/api/Azure.ResourceManager.DevOpsInfrastructure.netstandard2.0.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/api/Azure.ResourceManager.DevOpsInfrastructure.netstandard2.0.cs @@ -37,6 +37,7 @@ public partial class DevOpsPoolData : Azure.ResourceManager.Models.TrackedResour public DevOpsPoolData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public Azure.ResourceManager.DevOpsInfrastructure.Models.DevOpsPoolProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevOpsInfrastructure.DevOpsPoolData 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.DevOpsInfrastructure.DevOpsPoolData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -120,6 +121,7 @@ public partial class AutomaticResourcePredictionsProfile : Azure.ResourceManager { public AutomaticResourcePredictionsProfile() { } public Azure.ResourceManager.DevOpsInfrastructure.Models.PredictionPreference? PredictionPreference { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevOpsInfrastructure.Models.AutomaticResourcePredictionsProfile 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.DevOpsInfrastructure.Models.AutomaticResourcePredictionsProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -131,6 +133,7 @@ public partial class DevOpsAzureOrganizationProfile : Azure.ResourceManager.DevO public DevOpsAzureOrganizationProfile(System.Collections.Generic.IEnumerable organizations) { } public System.Collections.Generic.IList Organizations { get { throw null; } } public Azure.ResourceManager.DevOpsInfrastructure.Models.DevOpsAzurePermissionProfile PermissionProfile { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevOpsInfrastructure.Models.DevOpsAzureOrganizationProfile 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.DevOpsInfrastructure.Models.DevOpsAzureOrganizationProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -143,6 +146,7 @@ public DevOpsAzurePermissionProfile(Azure.ResourceManager.DevOpsInfrastructure.M public System.Collections.Generic.IList Groups { get { throw null; } } public Azure.ResourceManager.DevOpsInfrastructure.Models.DevOpsAzurePermissionType Kind { get { throw null; } set { } } public System.Collections.Generic.IList Users { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevOpsInfrastructure.Models.DevOpsAzurePermissionProfile 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.DevOpsInfrastructure.Models.DevOpsAzurePermissionProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -172,6 +176,7 @@ public partial class DevOpsAzureSku : 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.DevOpsInfrastructure.Models.DevOpsAzureSku System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -185,6 +190,7 @@ public DevOpsDataDisk() { } public int? DiskSizeGiB { get { throw null; } set { } } public string DriveLetter { get { throw null; } set { } } public Azure.ResourceManager.DevOpsInfrastructure.Models.DevOpsStorageAccountType? StorageAccountType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevOpsInfrastructure.Models.DevOpsDataDisk 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.DevOpsInfrastructure.Models.DevOpsDataDisk System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -213,6 +219,7 @@ public DevOpsDataDisk() { } public abstract partial class DevOpsFabricProfile : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { protected DevOpsFabricProfile() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevOpsInfrastructure.Models.DevOpsFabricProfile 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.DevOpsInfrastructure.Models.DevOpsFabricProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -224,6 +231,7 @@ public partial class DevOpsGitHubOrganization : System.ClientModel.Primitives.IJ public DevOpsGitHubOrganization(System.Uri uri) { } public System.Collections.Generic.IList Repositories { get { throw null; } } public System.Uri Uri { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevOpsInfrastructure.Models.DevOpsGitHubOrganization 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.DevOpsInfrastructure.Models.DevOpsGitHubOrganization System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -234,6 +242,7 @@ public partial class DevOpsGitHubOrganizationProfile : Azure.ResourceManager.Dev { public DevOpsGitHubOrganizationProfile(System.Collections.Generic.IEnumerable organizations) { } public System.Collections.Generic.IList Organizations { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevOpsInfrastructure.Models.DevOpsGitHubOrganizationProfile 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.DevOpsInfrastructure.Models.DevOpsGitHubOrganizationProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -244,6 +253,7 @@ public partial class DevOpsImageVersion : Azure.ResourceManager.Models.ResourceD { internal DevOpsImageVersion() { } public string ImageVersion { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevOpsInfrastructure.Models.DevOpsImageVersion 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.DevOpsInfrastructure.Models.DevOpsImageVersion System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -297,6 +307,7 @@ public DevOpsOrganization(System.Uri uri) { } public int? Parallelism { get { throw null; } set { } } public System.Collections.Generic.IList Projects { get { throw null; } } public System.Uri Uri { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevOpsInfrastructure.Models.DevOpsOrganization 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.DevOpsInfrastructure.Models.DevOpsOrganization System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -306,6 +317,7 @@ public DevOpsOrganization(System.Uri uri) { } public abstract partial class DevOpsOrganizationProfile : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { protected DevOpsOrganizationProfile() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevOpsInfrastructure.Models.DevOpsOrganizationProfile 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.DevOpsInfrastructure.Models.DevOpsOrganizationProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -317,6 +329,7 @@ public partial class DevOpsOSProfile : System.ClientModel.Primitives.IJsonModel< public DevOpsOSProfile() { } public Azure.ResourceManager.DevOpsInfrastructure.Models.DevOpsLogonType? LogonType { get { throw null; } set { } } public Azure.ResourceManager.DevOpsInfrastructure.Models.SecretsManagementSettings SecretsManagementSettings { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevOpsInfrastructure.Models.DevOpsOSProfile 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.DevOpsInfrastructure.Models.DevOpsOSProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -328,6 +341,7 @@ public abstract partial class DevOpsPoolAgentProfile : System.ClientModel.Primit protected DevOpsPoolAgentProfile() { } public Azure.ResourceManager.DevOpsInfrastructure.Models.ResourcePredictions ResourcePredictions { get { throw null; } set { } } public Azure.ResourceManager.DevOpsInfrastructure.Models.ResourcePredictionsProfile ResourcePredictionsProfile { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevOpsInfrastructure.Models.DevOpsPoolAgentProfile 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.DevOpsInfrastructure.Models.DevOpsPoolAgentProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -340,6 +354,7 @@ public DevOpsPoolPatch() { } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public Azure.ResourceManager.DevOpsInfrastructure.Models.PoolUpdateProperties Properties { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevOpsInfrastructure.Models.DevOpsPoolPatch 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.DevOpsInfrastructure.Models.DevOpsPoolPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -355,6 +370,7 @@ public DevOpsPoolProperties(int maximumConcurrency, Azure.ResourceManager.DevOps public int MaximumConcurrency { get { throw null; } set { } } public Azure.ResourceManager.DevOpsInfrastructure.Models.DevOpsOrganizationProfile OrganizationProfile { get { throw null; } set { } } public Azure.ResourceManager.DevOpsInfrastructure.Models.DevOpsInfrastructureProvisioningState? ProvisioningState { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevOpsInfrastructure.Models.DevOpsPoolProperties 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.DevOpsInfrastructure.Models.DevOpsPoolProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -368,6 +384,7 @@ public DevOpsPoolVmImage() { } public string Buffer { get { throw null; } set { } } public string ResourceId { get { throw null; } set { } } public string WellKnownImageName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevOpsInfrastructure.Models.DevOpsPoolVmImage 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.DevOpsInfrastructure.Models.DevOpsPoolVmImage System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -378,6 +395,7 @@ public partial class DevOpsResourceDetails : Azure.ResourceManager.Models.Resour { internal DevOpsResourceDetails() { } public Azure.ResourceManager.DevOpsInfrastructure.Models.DevOpsResourceDetailsProperties Properties { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevOpsInfrastructure.Models.DevOpsResourceDetails 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.DevOpsInfrastructure.Models.DevOpsResourceDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -390,6 +408,7 @@ internal DevOpsResourceDetailsProperties() { } public string Image { get { throw null; } } public string ImageVersion { get { throw null; } } public Azure.ResourceManager.DevOpsInfrastructure.Models.DevOpsResourceStatus Status { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevOpsInfrastructure.Models.DevOpsResourceDetailsProperties 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.DevOpsInfrastructure.Models.DevOpsResourceDetailsProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -404,6 +423,7 @@ internal DevOpsResourceQuota() { } public long Limit { get { throw null; } } public Azure.ResourceManager.DevOpsInfrastructure.Models.DevOpsResourceQuotaName Name { get { throw null; } } public string Unit { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevOpsInfrastructure.Models.DevOpsResourceQuota 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.DevOpsInfrastructure.Models.DevOpsResourceQuota System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -415,6 +435,7 @@ public partial class DevOpsResourceQuotaName : System.ClientModel.Primitives.IJs internal DevOpsResourceQuotaName() { } public string LocalizedValue { get { throw null; } } public string Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevOpsInfrastructure.Models.DevOpsResourceQuotaName 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.DevOpsInfrastructure.Models.DevOpsResourceQuotaName System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -425,6 +446,7 @@ public partial class DevOpsResourceSku : Azure.ResourceManager.Models.ResourceDa { internal DevOpsResourceSku() { } public Azure.ResourceManager.DevOpsInfrastructure.Models.DevOpsResourceSkuProperties Properties { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevOpsInfrastructure.Models.DevOpsResourceSku 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.DevOpsInfrastructure.Models.DevOpsResourceSku System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -442,6 +464,7 @@ internal DevOpsResourceSkuProperties() { } public System.Collections.Generic.IReadOnlyList Restrictions { get { throw null; } } public string Size { get { throw null; } } public string Tier { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevOpsInfrastructure.Models.DevOpsResourceSkuProperties 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.DevOpsInfrastructure.Models.DevOpsResourceSkuProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -480,6 +503,7 @@ public partial class DevOpsStateful : Azure.ResourceManager.DevOpsInfrastructure public DevOpsStateful() { } public string GracePeriodTimeSpan { get { throw null; } set { } } public string MaxAgentLifetime { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevOpsInfrastructure.Models.DevOpsStateful 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.DevOpsInfrastructure.Models.DevOpsStateful System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -489,6 +513,7 @@ public DevOpsStateful() { } public partial class DevOpsStatelessAgentProfile : Azure.ResourceManager.DevOpsInfrastructure.Models.DevOpsPoolAgentProfile, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DevOpsStatelessAgentProfile() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevOpsInfrastructure.Models.DevOpsStatelessAgentProfile 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.DevOpsInfrastructure.Models.DevOpsStatelessAgentProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -521,6 +546,7 @@ public partial class DevOpsStorageProfile : System.ClientModel.Primitives.IJsonM public DevOpsStorageProfile() { } public System.Collections.Generic.IList DataDisks { get { throw null; } } public Azure.ResourceManager.DevOpsInfrastructure.Models.OSDiskStorageAccountType? OSDiskStorageAccountType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevOpsInfrastructure.Models.DevOpsStorageProfile 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.DevOpsInfrastructure.Models.DevOpsStorageProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -535,6 +561,7 @@ public DevOpsVmssFabricProfile(Azure.ResourceManager.DevOpsInfrastructure.Models public Azure.ResourceManager.DevOpsInfrastructure.Models.DevOpsOSProfile OSProfile { get { throw null; } set { } } public string SkuName { get { throw null; } set { } } public Azure.ResourceManager.DevOpsInfrastructure.Models.DevOpsStorageProfile StorageProfile { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevOpsInfrastructure.Models.DevOpsVmssFabricProfile 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.DevOpsInfrastructure.Models.DevOpsVmssFabricProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -544,6 +571,7 @@ public DevOpsVmssFabricProfile(Azure.ResourceManager.DevOpsInfrastructure.Models public partial class ManualResourcePredictionsProfile : Azure.ResourceManager.DevOpsInfrastructure.Models.ResourcePredictionsProfile, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ManualResourcePredictionsProfile() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevOpsInfrastructure.Models.ManualResourcePredictionsProfile 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.DevOpsInfrastructure.Models.ManualResourcePredictionsProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -578,6 +606,7 @@ public PoolUpdateProperties() { } public int? MaximumConcurrency { get { throw null; } set { } } public Azure.ResourceManager.DevOpsInfrastructure.Models.DevOpsOrganizationProfile OrganizationProfile { get { throw null; } set { } } public Azure.ResourceManager.DevOpsInfrastructure.Models.DevOpsInfrastructureProvisioningState? ProvisioningState { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevOpsInfrastructure.Models.PoolUpdateProperties 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.DevOpsInfrastructure.Models.PoolUpdateProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -608,6 +637,7 @@ public PoolUpdateProperties() { } public partial class ResourcePredictions : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ResourcePredictions() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevOpsInfrastructure.Models.ResourcePredictions 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.DevOpsInfrastructure.Models.ResourcePredictions System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -617,6 +647,7 @@ public ResourcePredictions() { } public abstract partial class ResourcePredictionsProfile : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { protected ResourcePredictionsProfile() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevOpsInfrastructure.Models.ResourcePredictionsProfile 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.DevOpsInfrastructure.Models.ResourcePredictionsProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -628,6 +659,7 @@ public partial class ResourceSkuCapabilities : System.ClientModel.Primitives.IJs internal ResourceSkuCapabilities() { } public string Name { get { throw null; } } public string Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevOpsInfrastructure.Models.ResourceSkuCapabilities 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.DevOpsInfrastructure.Models.ResourceSkuCapabilities System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -640,6 +672,7 @@ internal ResourceSkuLocationInfo() { } public Azure.Core.AzureLocation Location { get { throw null; } } public System.Collections.Generic.IReadOnlyList ZoneDetails { get { throw null; } } public System.Collections.Generic.IReadOnlyList Zones { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevOpsInfrastructure.Models.ResourceSkuLocationInfo 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.DevOpsInfrastructure.Models.ResourceSkuLocationInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -651,6 +684,7 @@ public partial class ResourceSkuRestrictionInfo : System.ClientModel.Primitives. internal ResourceSkuRestrictionInfo() { } public System.Collections.Generic.IReadOnlyList Locations { get { throw null; } } public System.Collections.Generic.IReadOnlyList Zones { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevOpsInfrastructure.Models.ResourceSkuRestrictionInfo 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.DevOpsInfrastructure.Models.ResourceSkuRestrictionInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -664,6 +698,7 @@ internal ResourceSkuRestrictions() { } public Azure.ResourceManager.DevOpsInfrastructure.Models.ResourceSkuRestrictionInfo RestrictionInfo { get { throw null; } } public Azure.ResourceManager.DevOpsInfrastructure.Models.ResourceSkuRestrictionsType? RestrictionsType { get { throw null; } } public System.Collections.Generic.IReadOnlyList Values { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevOpsInfrastructure.Models.ResourceSkuRestrictions 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.DevOpsInfrastructure.Models.ResourceSkuRestrictions System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -711,6 +746,7 @@ public partial class ResourceSkuZoneDetails : System.ClientModel.Primitives.IJso internal ResourceSkuZoneDetails() { } public System.Collections.Generic.IReadOnlyList Capabilities { get { throw null; } } public System.Collections.Generic.IReadOnlyList Name { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevOpsInfrastructure.Models.ResourceSkuZoneDetails 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.DevOpsInfrastructure.Models.ResourceSkuZoneDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -723,6 +759,7 @@ public SecretsManagementSettings(System.Collections.Generic.IEnumerable ObservedCertificates { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevOpsInfrastructure.Models.SecretsManagementSettings 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.DevOpsInfrastructure.Models.SecretsManagementSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/samples/Generated/Samples/Sample_DevOpsPoolCollection.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/samples/Generated/Samples/Sample_DevOpsPoolCollection.cs index e6528a67834c..4dea936a499c 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/samples/Generated/Samples/Sample_DevOpsPoolCollection.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/samples/Generated/Samples/Sample_DevOpsPoolCollection.cs @@ -21,8 +21,8 @@ public partial class Sample_DevOpsPoolCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_PoolsGet() { - // Generated from example definition: 2024-04-04-preview/GetPool.json - // this example is just showing the usage of "Pools_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-10-19/GetPool.json + // this example is just showing the usage of "Pool_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -55,8 +55,8 @@ public async Task Get_PoolsGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_PoolsGet() { - // Generated from example definition: 2024-04-04-preview/GetPool.json - // this example is just showing the usage of "Pools_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-10-19/GetPool.json + // this example is just showing the usage of "Pool_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -85,8 +85,8 @@ public async Task Exists_PoolsGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_PoolsGet() { - // Generated from example definition: 2024-04-04-preview/GetPool.json - // this example is just showing the usage of "Pools_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-10-19/GetPool.json + // this example is just showing the usage of "Pool_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -127,8 +127,8 @@ public async Task GetIfExists_PoolsGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_PoolsCreateOrUpdate() { - // Generated from example definition: 2024-04-04-preview/CreateOrUpdatePool.json - // this example is just showing the usage of "Pools_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-10-19/CreateOrUpdatePool.json + // this example is just showing the usage of "Pool_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -178,7 +178,7 @@ public async Task CreateOrUpdate_PoolsCreateOrUpdate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_PoolsListByResourceGroup() { - // Generated from example definition: 2024-04-04-preview/ListPoolsBySubscriptionAndResourceGroup.json + // Generated from example definition: 2024-10-19/ListPoolsBySubscriptionAndResourceGroup.json // this example is just showing the usage of "Pool_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/samples/Generated/Samples/Sample_DevOpsPoolResource.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/samples/Generated/Samples/Sample_DevOpsPoolResource.cs index 2cee55b0d0df..ab797cfd3832 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/samples/Generated/Samples/Sample_DevOpsPoolResource.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/samples/Generated/Samples/Sample_DevOpsPoolResource.cs @@ -21,8 +21,8 @@ public partial class Sample_DevOpsPoolResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_PoolsGet() { - // Generated from example definition: 2024-04-04-preview/GetPool.json - // this example is just showing the usage of "Pools_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-10-19/GetPool.json + // this example is just showing the usage of "Pool_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -52,8 +52,8 @@ public async Task Get_PoolsGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_PoolsUpdate() { - // Generated from example definition: 2024-04-04-preview/UpdatePool.json - // this example is just showing the usage of "Pools_Update" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-10-19/UpdatePool.json + // this example is just showing the usage of "Pool_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -85,8 +85,8 @@ public async Task Update_PoolsUpdate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_PoolsDelete() { - // Generated from example definition: 2024-04-04-preview/DeletePool.json - // this example is just showing the usage of "Pools_Delete" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-10-19/DeletePool.json + // this example is just showing the usage of "Pool_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -112,7 +112,7 @@ public async Task Delete_PoolsDelete() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetDevOpsPools_PoolsListBySubscription() { - // Generated from example definition: 2024-04-04-preview/ListPoolsBySubscription.json + // Generated from example definition: 2024-10-19/ListPoolsBySubscription.json // this example is just showing the usage of "Pool_ListBySubscription" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -144,7 +144,7 @@ public async Task GetDevOpsPools_PoolsListBySubscription() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetResourceDetails_ResourceDetailsListByPool() { - // Generated from example definition: 2024-04-04-preview/ResourceDetails_ListByPool.json + // Generated from example definition: 2024-10-19/ResourceDetails_ListByPool.json // this example is just showing the usage of "ResourceDetailsObject_ListByPool" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/samples/Generated/Samples/Sample_ResourceGroupResourceExtensions.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/samples/Generated/Samples/Sample_ResourceGroupResourceExtensions.cs index 7a4cdecbf4d6..214351704086 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/samples/Generated/Samples/Sample_ResourceGroupResourceExtensions.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/samples/Generated/Samples/Sample_ResourceGroupResourceExtensions.cs @@ -21,7 +21,7 @@ public partial class Sample_ResourceGroupResourceExtensions [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetImageVersionsByImage_ImageVersionsListByImage() { - // Generated from example definition: 2024-04-04-preview/ImageVersions_ListByImage.json + // Generated from example definition: 2024-10-19/ImageVersions_ListByImage.json // this example is just showing the usage of "ImageVersion_ListByImage" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs index 19b6955303f4..05839dc7be6d 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs @@ -21,7 +21,7 @@ public partial class Sample_SubscriptionResourceExtensions [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetSkusByLocation_SkuListByLocation() { - // Generated from example definition: 2024-04-04-preview/Sku_ListByLocation.json + // Generated from example definition: 2024-10-19/Sku_ListByLocation.json // this example is just showing the usage of "ResourceSku_ListByLocation" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -50,7 +50,7 @@ public async Task GetSkusByLocation_SkuListByLocation() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetUsages_SubscriptionUsagesUsages() { - // Generated from example definition: 2024-04-04-preview/SubscriptionUsages_Usages.json + // Generated from example definition: 2024-10-19/SubscriptionUsages_Usages.json // this example is just showing the usage of "SubscriptionUsages_GetUsages" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/DevOpsPoolCollection.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/DevOpsPoolCollection.cs index c3b7212f1c20..1e2ea411a868 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/DevOpsPoolCollection.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/DevOpsPoolCollection.cs @@ -61,11 +61,11 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id - /// Pools_CreateOrUpdate + /// Pool_CreateOrUpdate /// /// /// Default Api Version - /// 2024-04-04-preview + /// 2024-10-19 /// /// /// Resource @@ -110,11 +110,11 @@ public virtual async Task> CreateOrUpdateAsync( /// /// /// Operation Id - /// Pools_CreateOrUpdate + /// Pool_CreateOrUpdate /// /// /// Default Api Version - /// 2024-04-04-preview + /// 2024-10-19 /// /// /// Resource @@ -159,11 +159,11 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUnt /// /// /// Operation Id - /// Pools_Get + /// Pool_Get /// /// /// Default Api Version - /// 2024-04-04-preview + /// 2024-10-19 /// /// /// Resource @@ -204,11 +204,11 @@ public virtual async Task> GetAsync(string poolName /// /// /// Operation Id - /// Pools_Get + /// Pool_Get /// /// /// Default Api Version - /// 2024-04-04-preview + /// 2024-10-19 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string poolName, CancellationTok /// /// /// Default Api Version - /// 2024-04-04-preview + /// 2024-10-19 /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken c /// /// /// Default Api Version - /// 2024-04-04-preview + /// 2024-10-19 /// /// /// Resource @@ -309,11 +309,11 @@ public virtual Pageable GetAll(CancellationToken cancellatio /// /// /// Operation Id - /// Pools_Get + /// Pool_Get /// /// /// Default Api Version - /// 2024-04-04-preview + /// 2024-10-19 /// /// /// Resource @@ -352,11 +352,11 @@ public virtual async Task> ExistsAsync(string poolName, Cancellat /// /// /// Operation Id - /// Pools_Get + /// Pool_Get /// /// /// Default Api Version - /// 2024-04-04-preview + /// 2024-10-19 /// /// /// Resource @@ -395,11 +395,11 @@ public virtual Response Exists(string poolName, CancellationToken cancella /// /// /// Operation Id - /// Pools_Get + /// Pool_Get /// /// /// Default Api Version - /// 2024-04-04-preview + /// 2024-10-19 /// /// /// Resource @@ -440,11 +440,11 @@ public virtual async Task> GetIfExistsAsync /// /// /// Operation Id - /// Pools_Get + /// Pool_Get /// /// /// Default Api Version - /// 2024-04-04-preview + /// 2024-10-19 /// /// /// Resource diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/DevOpsPoolData.Serialization.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/DevOpsPoolData.Serialization.cs index 8fcebc834997..e7a3eaf366e9 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/DevOpsPoolData.Serialization.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/DevOpsPoolData.Serialization.cs @@ -20,6 +20,15 @@ public partial class DevOpsPoolData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(DevOpsPoolData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); @@ -39,55 +48,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; JsonSerializer.Serialize(writer, Identity, serializeOptions); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } DevOpsPoolData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/DevOpsPoolResource.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/DevOpsPoolResource.cs index 7f9b5b717537..a3b6aeebb638 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/DevOpsPoolResource.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/DevOpsPoolResource.cs @@ -104,11 +104,11 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id - /// Pools_Get + /// Pool_Get /// /// /// Default Api Version - /// 2024-04-04-preview + /// 2024-10-19 /// /// /// Resource @@ -144,11 +144,11 @@ public virtual async Task> GetAsync(CancellationTok /// /// /// Operation Id - /// Pools_Get + /// Pool_Get /// /// /// Default Api Version - /// 2024-04-04-preview + /// 2024-10-19 /// /// /// Resource @@ -184,11 +184,11 @@ public virtual Response Get(CancellationToken cancellationTo /// /// /// Operation Id - /// Pools_Delete + /// Pool_Delete /// /// /// Default Api Version - /// 2024-04-04-preview + /// 2024-10-19 /// /// /// Resource @@ -226,11 +226,11 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Operation Id - /// Pools_Delete + /// Pool_Delete /// /// /// Default Api Version - /// 2024-04-04-preview + /// 2024-10-19 /// /// /// Resource @@ -268,11 +268,11 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Operation Id - /// Pools_Update + /// Pool_Update /// /// /// Default Api Version - /// 2024-04-04-preview + /// 2024-10-19 /// /// /// Resource @@ -314,11 +314,11 @@ public virtual async Task> UpdateAsync(WaitUnti /// /// /// Operation Id - /// Pools_Update + /// Pool_Update /// /// /// Default Api Version - /// 2024-04-04-preview + /// 2024-10-19 /// /// /// Resource @@ -364,7 +364,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, DevO /// /// /// Default Api Version - /// 2024-04-04-preview + /// 2024-10-19 /// /// /// @@ -390,7 +390,7 @@ public virtual AsyncPageable GetResourceDetailsAsync(Canc /// /// /// Default Api Version - /// 2024-04-04-preview + /// 2024-10-19 /// /// /// @@ -412,11 +412,11 @@ public virtual Pageable GetResourceDetails(CancellationTo /// /// /// Operation Id - /// Pools_Get + /// Pool_Get /// /// /// Default Api Version - /// 2024-04-04-preview + /// 2024-10-19 /// /// /// Resource @@ -474,11 +474,11 @@ public virtual async Task> AddTagAsync(string key, /// /// /// Operation Id - /// Pools_Get + /// Pool_Get /// /// /// Default Api Version - /// 2024-04-04-preview + /// 2024-10-19 /// /// /// Resource @@ -536,11 +536,11 @@ public virtual Response AddTag(string key, string value, Can /// /// /// Operation Id - /// Pools_Get + /// Pool_Get /// /// /// Default Api Version - /// 2024-04-04-preview + /// 2024-10-19 /// /// /// Resource @@ -593,11 +593,11 @@ public virtual async Task> SetTagsAsync(IDictionary /// /// /// Operation Id - /// Pools_Get + /// Pool_Get /// /// /// Default Api Version - /// 2024-04-04-preview + /// 2024-10-19 /// /// /// Resource @@ -650,11 +650,11 @@ public virtual Response SetTags(IDictionary /// /// /// Operation Id - /// Pools_Get + /// Pool_Get /// /// /// Default Api Version - /// 2024-04-04-preview + /// 2024-10-19 /// /// /// Resource @@ -710,11 +710,11 @@ public virtual async Task> RemoveTagAsync(string ke /// /// /// Operation Id - /// Pools_Get + /// Pool_Get /// /// /// Default Api Version - /// 2024-04-04-preview + /// 2024-10-19 /// /// /// Resource diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Extensions/DevOpsInfrastructureExtensions.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Extensions/DevOpsInfrastructureExtensions.cs index a9bf98370e27..3e3e44d9dcd3 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Extensions/DevOpsInfrastructureExtensions.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Extensions/DevOpsInfrastructureExtensions.cs @@ -78,11 +78,11 @@ public static DevOpsPoolCollection GetDevOpsPools(this ResourceGroupResource res /// /// /// Operation Id - /// Pools_Get + /// Pool_Get /// /// /// Default Api Version - /// 2024-04-04-preview + /// 2024-10-19 /// /// /// Resource @@ -116,11 +116,11 @@ public static async Task> GetDevOpsPoolAsync(this R /// /// /// Operation Id - /// Pools_Get + /// Pool_Get /// /// /// Default Api Version - /// 2024-04-04-preview + /// 2024-10-19 /// /// /// Resource @@ -158,7 +158,7 @@ public static Response GetDevOpsPool(this ResourceGroupResou /// /// /// Default Api Version - /// 2024-04-04-preview + /// 2024-10-19 /// /// /// @@ -192,7 +192,7 @@ public static AsyncPageable GetImageVersionsByImageAsync(thi /// /// /// Default Api Version - /// 2024-04-04-preview + /// 2024-10-19 /// /// /// @@ -226,7 +226,7 @@ public static Pageable GetImageVersionsByImage(this Resource /// /// /// Default Api Version - /// 2024-04-04-preview + /// 2024-10-19 /// /// /// Resource @@ -262,7 +262,7 @@ public static AsyncPageable GetDevOpsPoolsAsync(this Subscri /// /// /// Default Api Version - /// 2024-04-04-preview + /// 2024-10-19 /// /// /// Resource @@ -298,7 +298,7 @@ public static Pageable GetDevOpsPools(this SubscriptionResou /// /// /// Default Api Version - /// 2024-04-04-preview + /// 2024-10-19 /// /// /// @@ -332,7 +332,7 @@ public static AsyncPageable GetSkusByLocationAsync(this Subsc /// /// /// Default Api Version - /// 2024-04-04-preview + /// 2024-10-19 /// /// /// @@ -366,7 +366,7 @@ public static Pageable GetSkusByLocation(this SubscriptionRes /// /// /// Default Api Version - /// 2024-04-04-preview + /// 2024-10-19 /// /// /// @@ -399,7 +399,7 @@ public static AsyncPageable GetUsagesAsync(this Subscriptio /// /// /// Default Api Version - /// 2024-04-04-preview + /// 2024-10-19 /// /// /// diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Extensions/MockableDevOpsInfrastructureResourceGroupResource.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Extensions/MockableDevOpsInfrastructureResourceGroupResource.cs index 295f5577449a..fbfc1fee6226 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Extensions/MockableDevOpsInfrastructureResourceGroupResource.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Extensions/MockableDevOpsInfrastructureResourceGroupResource.cs @@ -58,11 +58,11 @@ public virtual DevOpsPoolCollection GetDevOpsPools() /// /// /// Operation Id - /// Pools_Get + /// Pool_Get /// /// /// Default Api Version - /// 2024-04-04-preview + /// 2024-10-19 /// /// /// Resource @@ -89,11 +89,11 @@ public virtual async Task> GetDevOpsPoolAsync(strin /// /// /// Operation Id - /// Pools_Get + /// Pool_Get /// /// /// Default Api Version - /// 2024-04-04-preview + /// 2024-10-19 /// /// /// Resource @@ -124,7 +124,7 @@ public virtual Response GetDevOpsPool(string poolName, Cance /// /// /// Default Api Version - /// 2024-04-04-preview + /// 2024-10-19 /// /// /// @@ -155,7 +155,7 @@ public virtual AsyncPageable GetImageVersionsByImageAsync(st /// /// /// Default Api Version - /// 2024-04-04-preview + /// 2024-10-19 /// /// /// diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Extensions/MockableDevOpsInfrastructureSubscriptionResource.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Extensions/MockableDevOpsInfrastructureSubscriptionResource.cs index 31ebae1bc7d5..224f919ee0d4 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Extensions/MockableDevOpsInfrastructureSubscriptionResource.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Extensions/MockableDevOpsInfrastructureSubscriptionResource.cs @@ -62,7 +62,7 @@ private string GetApiVersionOrNull(ResourceType resourceType) /// /// /// Default Api Version - /// 2024-04-04-preview + /// 2024-10-19 /// /// /// Resource @@ -92,7 +92,7 @@ public virtual AsyncPageable GetDevOpsPoolsAsync(Cancellatio /// /// /// Default Api Version - /// 2024-04-04-preview + /// 2024-10-19 /// /// /// Resource @@ -122,7 +122,7 @@ public virtual Pageable GetDevOpsPools(CancellationToken can /// /// /// Default Api Version - /// 2024-04-04-preview + /// 2024-10-19 /// /// /// @@ -153,7 +153,7 @@ public virtual AsyncPageable GetSkusByLocationAsync(string lo /// /// /// Default Api Version - /// 2024-04-04-preview + /// 2024-10-19 /// /// /// @@ -184,7 +184,7 @@ public virtual Pageable GetSkusByLocation(string locationName /// /// /// Default Api Version - /// 2024-04-04-preview + /// 2024-10-19 /// /// /// @@ -211,7 +211,7 @@ public virtual AsyncPageable GetUsagesAsync(AzureLocation l /// /// /// Default Api Version - /// 2024-04-04-preview + /// 2024-10-19 /// /// /// diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/AutomaticResourcePredictionsProfile.Serialization.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/AutomaticResourcePredictionsProfile.Serialization.cs index 00065e571c2e..0c0ab9b71d7b 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/AutomaticResourcePredictionsProfile.Serialization.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/AutomaticResourcePredictionsProfile.Serialization.cs @@ -18,6 +18,15 @@ public partial class AutomaticResourcePredictionsProfile : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,30 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(AutomaticResourcePredictionsProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(PredictionPreference)) { writer.WritePropertyName("predictionPreference"u8); writer.WriteStringValue(PredictionPreference.Value.ToString()); } - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } AutomaticResourcePredictionsProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsAzureOrganizationProfile.Serialization.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsAzureOrganizationProfile.Serialization.cs index 998f14f7e4d7..028b2221e555 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsAzureOrganizationProfile.Serialization.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsAzureOrganizationProfile.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevOpsAzureOrganizationProfile : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(DevOpsAzureOrganizationProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("organizations"u8); writer.WriteStartArray(); foreach (var item in Organizations) @@ -38,24 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod writer.WritePropertyName("permissionProfile"u8); writer.WriteObjectValue(PermissionProfile, options); } - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } DevOpsAzureOrganizationProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsAzurePermissionProfile.Serialization.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsAzurePermissionProfile.Serialization.cs index 07499a6b3487..aec8b360045c 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsAzurePermissionProfile.Serialization.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsAzurePermissionProfile.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevOpsAzurePermissionProfile : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(DevOpsAzurePermissionProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("kind"u8); writer.WriteStringValue(Kind.ToString()); if (Optional.IsCollectionDefined(Users)) @@ -63,7 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } DevOpsAzurePermissionProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsAzureSku.Serialization.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsAzureSku.Serialization.cs index 1b252ecda819..e2d99dba5b86 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsAzureSku.Serialization.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsAzureSku.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevOpsAzureSku : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(DevOpsAzureSku)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp #endif } } - writer.WriteEndObject(); } DevOpsAzureSku IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsDataDisk.Serialization.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsDataDisk.Serialization.cs index d19917eb6bf1..9c4bda04dbce 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsDataDisk.Serialization.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsDataDisk.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevOpsDataDisk : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(DevOpsDataDisk)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Caching)) { writer.WritePropertyName("caching"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp #endif } } - writer.WriteEndObject(); } DevOpsDataDisk IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsFabricProfile.Serialization.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsFabricProfile.Serialization.cs index 9210aaf661a0..b739cbdd6ce1 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsFabricProfile.Serialization.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsFabricProfile.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevOpsFabricProfile : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(DevOpsFabricProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("kind"u8); writer.WriteStringValue(Kind); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } DevOpsFabricProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsGitHubOrganization.Serialization.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsGitHubOrganization.Serialization.cs index f4211c7661f7..96a04d3ed903 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsGitHubOrganization.Serialization.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsGitHubOrganization.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevOpsGitHubOrganization : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(DevOpsGitHubOrganization)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("url"u8); writer.WriteStringValue(Uri.AbsoluteUri); if (Optional.IsCollectionDefined(Repositories)) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } DevOpsGitHubOrganization IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsGitHubOrganizationProfile.Serialization.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsGitHubOrganizationProfile.Serialization.cs index dcc96683c0dd..09652452fc43 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsGitHubOrganizationProfile.Serialization.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsGitHubOrganizationProfile.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevOpsGitHubOrganizationProfile : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(DevOpsGitHubOrganizationProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("organizations"u8); writer.WriteStartArray(); foreach (var item in Organizations) @@ -33,24 +42,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo writer.WriteObjectValue(item, options); } writer.WriteEndArray(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } DevOpsGitHubOrganizationProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsImageVersion.Serialization.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsImageVersion.Serialization.cs index 9f05796cb7b3..9619cd3aea4d 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsImageVersion.Serialization.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsImageVersion.Serialization.cs @@ -19,6 +19,15 @@ public partial class DevOpsImageVersion : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,48 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(DevOpsImageVersion)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); writer.WriteObjectValue(Properties, options); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } DevOpsImageVersion IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsNetworkProfile.Serialization.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsNetworkProfile.Serialization.cs index 7d5706986723..377e03707355 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsNetworkProfile.Serialization.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsNetworkProfile.Serialization.cs @@ -18,6 +18,15 @@ internal partial class DevOpsNetworkProfile : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(DevOpsNetworkProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("subnetId"u8); writer.WriteStringValue(SubnetId); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } DevOpsNetworkProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsOSProfile.Serialization.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsOSProfile.Serialization.cs index 7f485e953d66..608bce5f3d14 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsOSProfile.Serialization.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsOSProfile.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevOpsOSProfile : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(DevOpsOSProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(SecretsManagementSettings)) { writer.WritePropertyName("secretsManagementSettings"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO #endif } } - writer.WriteEndObject(); } DevOpsOSProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsOrganization.Serialization.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsOrganization.Serialization.cs index 6898a14e3970..c5fe16dff19b 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsOrganization.Serialization.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsOrganization.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevOpsOrganization : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(DevOpsOrganization)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("url"u8); writer.WriteStringValue(Uri.AbsoluteUri); if (Optional.IsCollectionDefined(Projects)) @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } DevOpsOrganization IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsOrganizationProfile.Serialization.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsOrganizationProfile.Serialization.cs index 744bade7b9b7..d0704281aa73 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsOrganizationProfile.Serialization.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsOrganizationProfile.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevOpsOrganizationProfile : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(DevOpsOrganizationProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("kind"u8); writer.WriteStringValue(Kind); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } DevOpsOrganizationProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsPoolAgentProfile.Serialization.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsPoolAgentProfile.Serialization.cs index 22629940ae40..648dce410096 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsPoolAgentProfile.Serialization.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsPoolAgentProfile.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevOpsPoolAgentProfile : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(DevOpsPoolAgentProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("kind"u8); writer.WriteStringValue(Kind); if (Optional.IsDefined(ResourcePredictions)) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } DevOpsPoolAgentProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsPoolPatch.Serialization.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsPoolPatch.Serialization.cs index c4b90c62290a..e38bb428bbf4 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsPoolPatch.Serialization.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsPoolPatch.Serialization.cs @@ -19,6 +19,15 @@ public partial class DevOpsPoolPatch : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(DevOpsPoolPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); @@ -64,7 +72,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO #endif } } - writer.WriteEndObject(); } DevOpsPoolPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsPoolProperties.Serialization.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsPoolProperties.Serialization.cs index ceca3c0c668c..c377d1a2a91a 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsPoolProperties.Serialization.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsPoolProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevOpsPoolProperties : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(DevOpsPoolProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ProvisioningState)) { writer.WritePropertyName("provisioningState"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } DevOpsPoolProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsPoolVmImage.Serialization.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsPoolVmImage.Serialization.cs index 243dceeaa207..899cb9091b97 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsPoolVmImage.Serialization.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsPoolVmImage.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevOpsPoolVmImage : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(DevOpsPoolVmImage)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ResourceId)) { writer.WritePropertyName("resourceId"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } DevOpsPoolVmImage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsResourceDetails.Serialization.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsResourceDetails.Serialization.cs index 4b2bb7a61e96..14599e133777 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsResourceDetails.Serialization.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsResourceDetails.Serialization.cs @@ -19,6 +19,15 @@ public partial class DevOpsResourceDetails : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,48 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(DevOpsResourceDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); writer.WriteObjectValue(Properties, options); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } DevOpsResourceDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsResourceDetailsProperties.Serialization.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsResourceDetailsProperties.Serialization.cs index dd4ffca851b6..e000da3def69 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsResourceDetailsProperties.Serialization.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsResourceDetailsProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevOpsResourceDetailsProperties : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(DevOpsResourceDetailsProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("status"u8); writer.WriteStringValue(Status.ToString()); writer.WritePropertyName("image"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } DevOpsResourceDetailsProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsResourceQuota.Serialization.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsResourceQuota.Serialization.cs index a9171f48574c..06a7449c3727 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsResourceQuota.Serialization.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsResourceQuota.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevOpsResourceQuota : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(DevOpsResourceQuota)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -54,7 +62,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } DevOpsResourceQuota IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsResourceQuotaName.Serialization.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsResourceQuotaName.Serialization.cs index 0148e2bdf29f..b2fa5081643d 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsResourceQuotaName.Serialization.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsResourceQuotaName.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevOpsResourceQuotaName : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(DevOpsResourceQuotaName)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Value)) { writer.WritePropertyName("value"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } DevOpsResourceQuotaName IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsResourceSku.Serialization.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsResourceSku.Serialization.cs index 93e052793145..2c31403eff47 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsResourceSku.Serialization.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsResourceSku.Serialization.cs @@ -19,6 +19,15 @@ public partial class DevOpsResourceSku : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,48 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(DevOpsResourceSku)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); writer.WriteObjectValue(Properties, options); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } DevOpsResourceSku IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsResourceSkuProperties.Serialization.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsResourceSkuProperties.Serialization.cs index a24f43426193..c4769042d001 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsResourceSkuProperties.Serialization.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsResourceSkuProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevOpsResourceSkuProperties : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(DevOpsResourceSkuProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("resourceType"u8); writer.WriteStringValue(ResourceType); writer.WritePropertyName("tier"u8); @@ -77,7 +85,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } DevOpsResourceSkuProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsStateful.Serialization.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsStateful.Serialization.cs index a7761657f6da..ccda30adaaf0 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsStateful.Serialization.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsStateful.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevOpsStateful : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(DevOpsStateful)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(MaxAgentLifetime)) { writer.WritePropertyName("maxAgentLifetime"u8); @@ -36,34 +45,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp writer.WritePropertyName("gracePeriodTimeSpan"u8); writer.WriteStringValue(GracePeriodTimeSpan); } - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind); - if (Optional.IsDefined(ResourcePredictions)) - { - writer.WritePropertyName("resourcePredictions"u8); - writer.WriteObjectValue(ResourcePredictions, options); - } - if (Optional.IsDefined(ResourcePredictionsProfile)) - { - writer.WritePropertyName("resourcePredictionsProfile"u8); - writer.WriteObjectValue(ResourcePredictionsProfile, options); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } DevOpsStateful IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsStatelessAgentProfile.Serialization.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsStatelessAgentProfile.Serialization.cs index 87ab6674bd3d..0dd3862730ea 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsStatelessAgentProfile.Serialization.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsStatelessAgentProfile.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevOpsStatelessAgentProfile : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,35 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(DevOpsStatelessAgentProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind); - if (Optional.IsDefined(ResourcePredictions)) - { - writer.WritePropertyName("resourcePredictions"u8); - writer.WriteObjectValue(ResourcePredictions, options); - } - if (Optional.IsDefined(ResourcePredictionsProfile)) - { - writer.WritePropertyName("resourcePredictionsProfile"u8); - writer.WriteObjectValue(ResourcePredictionsProfile, options); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } DevOpsStatelessAgentProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsStorageProfile.Serialization.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsStorageProfile.Serialization.cs index 054c49753c6d..89a0b03a40f7 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsStorageProfile.Serialization.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsStorageProfile.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevOpsStorageProfile : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(DevOpsStorageProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(OSDiskStorageAccountType)) { writer.WritePropertyName("osDiskStorageAccountType"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } DevOpsStorageProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsVmssFabricProfile.Serialization.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsVmssFabricProfile.Serialization.cs index cdf037d387f2..1fa07bdeda65 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsVmssFabricProfile.Serialization.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsVmssFabricProfile.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevOpsVmssFabricProfile : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(DevOpsVmssFabricProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("sku"u8); writer.WriteObjectValue(Sku, options); writer.WritePropertyName("images"u8); @@ -50,24 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade writer.WritePropertyName("networkProfile"u8); writer.WriteObjectValue(NetworkProfile, options); } - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } DevOpsVmssFabricProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/ImageVersionListResult.Serialization.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/ImageVersionListResult.Serialization.cs index 46848a65f140..071c7dbc662d 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/ImageVersionListResult.Serialization.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/ImageVersionListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ImageVersionListResult : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(ImageVersionListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } ImageVersionListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/ImageVersionProperties.Serialization.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/ImageVersionProperties.Serialization.cs index 5db6dc664b62..07a5f57215df 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/ImageVersionProperties.Serialization.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/ImageVersionProperties.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ImageVersionProperties : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(ImageVersionProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("version"u8); writer.WriteStringValue(Version); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } ImageVersionProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/ManualResourcePredictionsProfile.Serialization.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/ManualResourcePredictionsProfile.Serialization.cs index 26c0d6338c1c..2cfc2a23f4d1 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/ManualResourcePredictionsProfile.Serialization.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/ManualResourcePredictionsProfile.Serialization.cs @@ -18,6 +18,15 @@ public partial class ManualResourcePredictionsProfile : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,25 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(ManualResourcePredictionsProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } ManualResourcePredictionsProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/PagedQuota.Serialization.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/PagedQuota.Serialization.cs index 44ca51dcf734..2054ee4bf72d 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/PagedQuota.Serialization.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/PagedQuota.Serialization.cs @@ -18,6 +18,15 @@ internal partial class PagedQuota : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOption throw new FormatException($"The model {nameof(PagedQuota)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOption #endif } } - writer.WriteEndObject(); } PagedQuota IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/PoolListResult.Serialization.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/PoolListResult.Serialization.cs index de2998264bd8..50403fa492dc 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/PoolListResult.Serialization.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/PoolListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class PoolListResult : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(PoolListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp #endif } } - writer.WriteEndObject(); } PoolListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/PoolUpdateProperties.Serialization.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/PoolUpdateProperties.Serialization.cs index d883ecb32722..33977e54ec53 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/PoolUpdateProperties.Serialization.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/PoolUpdateProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class PoolUpdateProperties : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(PoolUpdateProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ProvisioningState)) { writer.WritePropertyName("provisioningState"u8); @@ -71,7 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } PoolUpdateProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/ResourceDetailsObjectListResult.Serialization.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/ResourceDetailsObjectListResult.Serialization.cs index 6679c7aa0f5a..e163c1ae65f7 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/ResourceDetailsObjectListResult.Serialization.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/ResourceDetailsObjectListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ResourceDetailsObjectListResult : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(ResourceDetailsObjectListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } ResourceDetailsObjectListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/ResourcePredictions.Serialization.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/ResourcePredictions.Serialization.cs index 8e7ed5d9faf6..966dee375dc2 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/ResourcePredictions.Serialization.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/ResourcePredictions.Serialization.cs @@ -18,6 +18,15 @@ public partial class ResourcePredictions : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ResourcePredictions)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -41,7 +49,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } ResourcePredictions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/ResourcePredictionsProfile.Serialization.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/ResourcePredictionsProfile.Serialization.cs index 94186c99a4a5..06c40df17bbe 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/ResourcePredictionsProfile.Serialization.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/ResourcePredictionsProfile.Serialization.cs @@ -18,6 +18,15 @@ public partial class ResourcePredictionsProfile : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(ResourcePredictionsProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("kind"u8); writer.WriteStringValue(Kind.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } ResourcePredictionsProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/ResourceSkuCapabilities.Serialization.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/ResourceSkuCapabilities.Serialization.cs index 833dda3bdede..95fdacf6e4df 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/ResourceSkuCapabilities.Serialization.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/ResourceSkuCapabilities.Serialization.cs @@ -18,6 +18,15 @@ public partial class ResourceSkuCapabilities : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(ResourceSkuCapabilities)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); writer.WritePropertyName("value"u8); @@ -45,7 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } ResourceSkuCapabilities IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/ResourceSkuListResult.Serialization.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/ResourceSkuListResult.Serialization.cs index 538c9004dceb..bb65ba349920 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/ResourceSkuListResult.Serialization.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/ResourceSkuListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ResourceSkuListResult : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(ResourceSkuListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } ResourceSkuListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/ResourceSkuLocationInfo.Serialization.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/ResourceSkuLocationInfo.Serialization.cs index d0367c6da682..7fe16ae7e942 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/ResourceSkuLocationInfo.Serialization.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/ResourceSkuLocationInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class ResourceSkuLocationInfo : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(ResourceSkuLocationInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("location"u8); writer.WriteStringValue(Location); writer.WritePropertyName("zones"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } ResourceSkuLocationInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/ResourceSkuRestrictionInfo.Serialization.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/ResourceSkuRestrictionInfo.Serialization.cs index 9bece7615b28..47884f1a1e74 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/ResourceSkuRestrictionInfo.Serialization.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/ResourceSkuRestrictionInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class ResourceSkuRestrictionInfo : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(ResourceSkuRestrictionInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Locations)) { writer.WritePropertyName("locations"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } ResourceSkuRestrictionInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/ResourceSkuRestrictions.Serialization.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/ResourceSkuRestrictions.Serialization.cs index a7aeb1722c27..cca5172f8e10 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/ResourceSkuRestrictions.Serialization.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/ResourceSkuRestrictions.Serialization.cs @@ -18,6 +18,15 @@ public partial class ResourceSkuRestrictions : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(ResourceSkuRestrictions)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(RestrictionsType)) { writer.WritePropertyName("type"u8); @@ -60,7 +68,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } ResourceSkuRestrictions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/ResourceSkuZoneDetails.Serialization.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/ResourceSkuZoneDetails.Serialization.cs index 7072eb02e5fc..30fb5d3b04a9 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/ResourceSkuZoneDetails.Serialization.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/ResourceSkuZoneDetails.Serialization.cs @@ -18,6 +18,15 @@ public partial class ResourceSkuZoneDetails : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(ResourceSkuZoneDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStartArray(); foreach (var item in Name) @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } ResourceSkuZoneDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/SecretsManagementSettings.Serialization.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/SecretsManagementSettings.Serialization.cs index e1581b2fd763..8586fc37da26 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/SecretsManagementSettings.Serialization.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/SecretsManagementSettings.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecretsManagementSettings : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(SecretsManagementSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(CertificateStoreLocation)) { writer.WritePropertyName("certificateStoreLocation"u8); @@ -60,7 +68,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } SecretsManagementSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/UnknownDevOpsFabricProfile.Serialization.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/UnknownDevOpsFabricProfile.Serialization.cs index 948fd70a39db..d4f1624f1b97 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/UnknownDevOpsFabricProfile.Serialization.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/UnknownDevOpsFabricProfile.Serialization.cs @@ -18,6 +18,15 @@ internal partial class UnknownDevOpsFabricProfile : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,25 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(DevOpsFabricProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } DevOpsFabricProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/UnknownDevOpsOrganizationProfile.Serialization.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/UnknownDevOpsOrganizationProfile.Serialization.cs index ac042593eb90..0d0df67a1e54 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/UnknownDevOpsOrganizationProfile.Serialization.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/UnknownDevOpsOrganizationProfile.Serialization.cs @@ -18,6 +18,15 @@ internal partial class UnknownDevOpsOrganizationProfile : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,25 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(DevOpsOrganizationProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } DevOpsOrganizationProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/UnknownDevOpsPoolAgentProfile.Serialization.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/UnknownDevOpsPoolAgentProfile.Serialization.cs index 9e690608365f..71080d649c8b 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/UnknownDevOpsPoolAgentProfile.Serialization.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/UnknownDevOpsPoolAgentProfile.Serialization.cs @@ -18,6 +18,15 @@ internal partial class UnknownDevOpsPoolAgentProfile : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,35 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(DevOpsPoolAgentProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind); - if (Optional.IsDefined(ResourcePredictions)) - { - writer.WritePropertyName("resourcePredictions"u8); - writer.WriteObjectValue(ResourcePredictions, options); - } - if (Optional.IsDefined(ResourcePredictionsProfile)) - { - writer.WritePropertyName("resourcePredictionsProfile"u8); - writer.WriteObjectValue(ResourcePredictionsProfile, options); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } DevOpsPoolAgentProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/UnknownResourcePredictionsProfile.Serialization.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/UnknownResourcePredictionsProfile.Serialization.cs index ad142d7a4355..bbbbf275ea43 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/UnknownResourcePredictionsProfile.Serialization.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/UnknownResourcePredictionsProfile.Serialization.cs @@ -18,6 +18,15 @@ internal partial class UnknownResourcePredictionsProfile : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,25 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(ResourcePredictionsProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } ResourcePredictionsProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/RestOperations/ImageVersionsRestOperations.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/RestOperations/ImageVersionsRestOperations.cs index cb5672c238b1..d99ce4db4901 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/RestOperations/ImageVersionsRestOperations.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/RestOperations/ImageVersionsRestOperations.cs @@ -25,14 +25,14 @@ internal partial class ImageVersionsRestOperations /// Initializes a new instance of ImageVersionsRestOperations. /// The HTTP pipeline for sending and receiving REST requests and responses. /// The application id to use for user agent. - /// The to use. + /// Service host. /// The API version to use for this operation. /// or is null. public ImageVersionsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-04-04-preview"; + _apiVersion = apiVersion ?? "2024-10-19"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/RestOperations/PoolsRestOperations.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/RestOperations/PoolsRestOperations.cs index c02d8de271e6..f1005eb73419 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/RestOperations/PoolsRestOperations.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/RestOperations/PoolsRestOperations.cs @@ -25,14 +25,14 @@ internal partial class PoolsRestOperations /// Initializes a new instance of PoolsRestOperations. /// The HTTP pipeline for sending and receiving REST requests and responses. /// The application id to use for user agent. - /// The to use. + /// Service host. /// The API version to use for this operation. /// or is null. public PoolsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-04-04-preview"; + _apiVersion = apiVersion ?? "2024-10-19"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/RestOperations/ResourceDetailsRestOperations.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/RestOperations/ResourceDetailsRestOperations.cs index 523632817e19..991d05cc6df2 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/RestOperations/ResourceDetailsRestOperations.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/RestOperations/ResourceDetailsRestOperations.cs @@ -25,14 +25,14 @@ internal partial class ResourceDetailsRestOperations /// Initializes a new instance of ResourceDetailsRestOperations. /// The HTTP pipeline for sending and receiving REST requests and responses. /// The application id to use for user agent. - /// The to use. + /// Service host. /// The API version to use for this operation. /// or is null. public ResourceDetailsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-04-04-preview"; + _apiVersion = apiVersion ?? "2024-10-19"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/RestOperations/SkuRestOperations.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/RestOperations/SkuRestOperations.cs index a1139b4ebcda..440151280b09 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/RestOperations/SkuRestOperations.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/RestOperations/SkuRestOperations.cs @@ -25,14 +25,14 @@ internal partial class SkuRestOperations /// Initializes a new instance of SkuRestOperations. /// The HTTP pipeline for sending and receiving REST requests and responses. /// The application id to use for user agent. - /// The to use. + /// Service host. /// The API version to use for this operation. /// or is null. public SkuRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-04-04-preview"; + _apiVersion = apiVersion ?? "2024-10-19"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/RestOperations/SubscriptionUsagesRestOperations.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/RestOperations/SubscriptionUsagesRestOperations.cs index 5c9caf66e18a..31da558f182f 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/RestOperations/SubscriptionUsagesRestOperations.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/RestOperations/SubscriptionUsagesRestOperations.cs @@ -25,14 +25,14 @@ internal partial class SubscriptionUsagesRestOperations /// Initializes a new instance of SubscriptionUsagesRestOperations. /// The HTTP pipeline for sending and receiving REST requests and responses. /// The application id to use for user agent. - /// The to use. + /// Service host. /// The API version to use for this operation. /// or is null. public SubscriptionUsagesRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-04-04-preview"; + _apiVersion = apiVersion ?? "2024-10-19"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/autorest.md.bak b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/autorest.md.bak index b2458498bcdd..6167719c510f 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/autorest.md.bak +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/autorest.md.bak @@ -7,7 +7,7 @@ azure-arm: true csharp: true library-name: DevOpsInfrastructure namespace: Azure.ResourceManager.DevOpsInfrastructure -require: https://github.com/Azure/azure-rest-api-specs/blob/afd7c70e8ddcb6be12fd834a2296b367f06a4f64/specification/devopsinfrastructure/resource-manager/readme.md +require: https://github.com/Azure/azure-rest-api-specs/blob/ae950a4d68bd5bae23f85a8d575a213e9b0442d3/specification/devopsinfrastructure/resource-manager/readme.md #tag: package-preview-2024-04 output-folder: $(this-folder)/Generated clear-output-folder: true diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/tsp-location.yaml b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/tsp-location.yaml index ec4d97f30e9b..bea97fb31977 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/tsp-location.yaml +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/tsp-location.yaml @@ -1,3 +1,3 @@ directory: specification/devopsinfrastructure -commit: 16d5475c14c0d620f59d186b5a8c94a06ee85da0 +commit: f37b54b187bac95237c62478a10b94e9cff236f3 repo: Azure/azure-rest-api-specs \ No newline at end of file diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/CHANGELOG.md b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/CHANGELOG.md index 99cd9dc99bc4..b4c6c5d21316 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/CHANGELOG.md +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/CHANGELOG.md @@ -5,6 +5,7 @@ ### Features Added - Enable the new model serialization by using the System.ClientModel, refer this [document](https://aka.ms/azsdk/net/mrw) for more details. +- Exposed `JsonModelWriteCore` for model serialization procedure. ### Breaking Changes diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/api/Azure.ResourceManager.DevTestLabs.netstandard2.0.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/api/Azure.ResourceManager.DevTestLabs.netstandard2.0.cs index 1cf5c88b3cb2..7d826e109d4d 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/api/Azure.ResourceManager.DevTestLabs.netstandard2.0.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/api/Azure.ResourceManager.DevTestLabs.netstandard2.0.cs @@ -26,6 +26,7 @@ public DevTestLabArmTemplateData(Azure.Core.AzureLocation location) { } public bool? IsEnabled { get { throw null; } } public System.Collections.Generic.IReadOnlyList ParametersValueFilesInfo { get { throw null; } } public string Publisher { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.DevTestLabArmTemplateData 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.DevTestLabs.DevTestLabArmTemplateData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -73,6 +74,7 @@ public DevTestLabArtifactData(Azure.Core.AzureLocation location) { } public string Publisher { get { throw null; } } public string TargetOSType { get { throw null; } } public string Title { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.DevTestLabArtifactData 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.DevTestLabs.DevTestLabArtifactData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -127,6 +129,7 @@ public DevTestLabArtifactSourceData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.DevTestLabs.Models.DevTestLabEnableStatus? Status { get { throw null; } set { } } public System.Guid? UniqueIdentifier { get { throw null; } } public System.Uri Uri { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.DevTestLabArtifactSourceData 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.DevTestLabs.DevTestLabArtifactSourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -206,6 +209,7 @@ public DevTestLabCostData(Azure.Core.AzureLocation location) { } public System.DateTimeOffset? StartOn { get { throw null; } set { } } public Azure.ResourceManager.DevTestLabs.Models.DevTestLabTargetCost TargetCost { get { throw null; } set { } } public System.Guid? UniqueIdentifier { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.DevTestLabCostData 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.DevTestLabs.DevTestLabCostData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -267,6 +271,7 @@ public DevTestLabCustomImageData(Azure.Core.AzureLocation location) { } public System.Guid? UniqueIdentifier { get { throw null; } } public Azure.ResourceManager.DevTestLabs.Models.DevTestLabCustomImageVhd Vhd { get { throw null; } set { } } public Azure.ResourceManager.DevTestLabs.Models.DevTestLabCustomImageVm Vm { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.DevTestLabCustomImageData 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.DevTestLabs.DevTestLabCustomImageData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -321,6 +326,7 @@ public DevTestLabData(Azure.Core.AzureLocation location) { } public System.Guid? UniqueIdentifier { get { throw null; } } public string VaultName { get { throw null; } } public string VmCreationResourceGroup { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.DevTestLabData 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.DevTestLabs.DevTestLabData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -358,6 +364,7 @@ public DevTestLabDiskData(Azure.Core.AzureLocation location) { } public string ProvisioningState { get { throw null; } } public string StorageAccountId { get { throw null; } set { } } public System.Guid? UniqueIdentifier { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.DevTestLabDiskData 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.DevTestLabs.DevTestLabDiskData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -419,6 +426,7 @@ public DevTestLabEnvironmentData(Azure.Core.AzureLocation location) { } public string ProvisioningState { get { throw null; } } public string ResourceGroupId { get { throw null; } } public System.Guid? UniqueIdentifier { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.DevTestLabEnvironmentData 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.DevTestLabs.DevTestLabEnvironmentData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -478,6 +486,7 @@ public DevTestLabFormulaData(Azure.Core.AzureLocation location) { } public string OSType { get { throw null; } set { } } public string ProvisioningState { get { throw null; } } public System.Guid? UniqueIdentifier { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.DevTestLabFormulaData 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.DevTestLabs.DevTestLabFormulaData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -583,6 +592,7 @@ public DevTestLabNotificationChannelData(Azure.Core.AzureLocation location) { } public string ProvisioningState { get { throw null; } } public System.Guid? UniqueIdentifier { get { throw null; } } public System.Uri WebHookUri { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.DevTestLabNotificationChannelData 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.DevTestLabs.DevTestLabNotificationChannelData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -645,6 +655,7 @@ public DevTestLabPolicyData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.DevTestLabs.Models.DevTestLabPolicyStatus? Status { get { throw null; } set { } } public string Threshold { get { throw null; } set { } } public System.Guid? UniqueIdentifier { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.DevTestLabPolicyData 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.DevTestLabs.DevTestLabPolicyData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -783,6 +794,7 @@ public DevTestLabScheduleData(Azure.Core.AzureLocation location) { } public string TimeZoneId { get { throw null; } set { } } public System.Guid? UniqueIdentifier { get { throw null; } } public Azure.ResourceManager.DevTestLabs.Models.DevTestLabWeekDetails WeeklyRecurrence { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.DevTestLabScheduleData 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.DevTestLabs.DevTestLabScheduleData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -839,6 +851,7 @@ public DevTestLabSecretData(Azure.Core.AzureLocation location) { } public string ProvisioningState { get { throw null; } } public System.Guid? UniqueIdentifier { get { throw null; } } public string Value { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.DevTestLabSecretData 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.DevTestLabs.DevTestLabSecretData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -895,6 +908,7 @@ public DevTestLabServiceFabricData(Azure.Core.AzureLocation location) { } public string ExternalServiceFabricId { get { throw null; } set { } } public string ProvisioningState { get { throw null; } } public System.Guid? UniqueIdentifier { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.DevTestLabServiceFabricData 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.DevTestLabs.DevTestLabServiceFabricData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -995,6 +1009,7 @@ public partial class DevTestLabServiceRunnerData : Azure.ResourceManager.Models. { public DevTestLabServiceRunnerData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.DevTestLabs.Models.DevTestLabManagedIdentity Identity { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.DevTestLabServiceRunnerData 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.DevTestLabs.DevTestLabServiceRunnerData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1085,6 +1100,7 @@ public DevTestLabUserData(Azure.Core.AzureLocation location) { } public string ProvisioningState { get { throw null; } } public Azure.ResourceManager.DevTestLabs.Models.DevTestLabUserSecretStore SecretStore { get { throw null; } set { } } public System.Guid? UniqueIdentifier { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.DevTestLabUserData 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.DevTestLabs.DevTestLabUserData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1156,6 +1172,7 @@ public DevTestLabVirtualNetworkData(Azure.Core.AzureLocation location) { } public string ProvisioningState { get { throw null; } } public System.Collections.Generic.IList SubnetOverrides { get { throw null; } } public System.Guid? UniqueIdentifier { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.DevTestLabVirtualNetworkData 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.DevTestLabs.DevTestLabVirtualNetworkData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1242,6 +1259,7 @@ public DevTestLabVmData(Azure.Core.AzureLocation location) { } public System.Guid? UniqueIdentifier { get { throw null; } } public string UserName { get { throw null; } set { } } public Azure.ResourceManager.DevTestLabs.Models.DevTestLabVmCreationSource? VmCreationSource { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.DevTestLabVmData 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.DevTestLabs.DevTestLabVmData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1440,6 +1458,7 @@ public AttachNewDataDiskDetails() { } public string DiskName { get { throw null; } set { } } public int? DiskSizeGiB { get { throw null; } set { } } public Azure.ResourceManager.DevTestLabs.Models.DevTestLabStorageType? DiskType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.AttachNewDataDiskDetails 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.DevTestLabs.Models.AttachNewDataDiskDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1453,6 +1472,7 @@ internal ComputeDataDisk() { } public System.Uri DiskUri { get { throw null; } } public string ManagedDiskId { get { throw null; } } public string Name { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.ComputeDataDisk 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.DevTestLabs.Models.ComputeDataDisk System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1465,6 +1485,7 @@ internal ComputeVmInstanceViewStatus() { } public string Code { get { throw null; } } public string DisplayStatus { get { throw null; } } public string Message { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.ComputeVmInstanceViewStatus 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.DevTestLabs.Models.ComputeVmInstanceViewStatus System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1481,6 +1502,7 @@ internal ComputeVmProperties() { } public string OSType { get { throw null; } } public System.Collections.Generic.IReadOnlyList Statuses { get { throw null; } } public string VmSize { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.ComputeVmProperties 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.DevTestLabs.Models.ComputeVmProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1497,6 +1519,7 @@ public DevTestLabAnnouncement() { } public string ProvisioningState { get { throw null; } } public string Title { get { throw null; } set { } } public System.Guid? UniqueIdentifier { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabAnnouncement 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.DevTestLabs.Models.DevTestLabAnnouncement System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1508,6 +1531,7 @@ public partial class DevTestLabApplicableSchedule : Azure.ResourceManager.Models public DevTestLabApplicableSchedule(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.DevTestLabs.DevTestLabScheduleData LabVmsShutdown { get { throw null; } set { } } public Azure.ResourceManager.DevTestLabs.DevTestLabScheduleData LabVmsStartup { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabApplicableSchedule 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.DevTestLabs.Models.DevTestLabApplicableSchedule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1519,6 +1543,7 @@ public partial class DevTestLabArmTemplateInfo : System.ClientModel.Primitives.I internal DevTestLabArmTemplateInfo() { } public System.BinaryData Parameters { get { throw null; } } public System.BinaryData Template { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabArmTemplateInfo 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.DevTestLabs.Models.DevTestLabArmTemplateInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1530,6 +1555,7 @@ public partial class DevTestLabArmTemplateParameter : System.ClientModel.Primiti public DevTestLabArmTemplateParameter() { } public string Name { get { throw null; } set { } } public string Value { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabArmTemplateParameter 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.DevTestLabs.Models.DevTestLabArmTemplateParameter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1542,6 +1568,7 @@ internal DevTestLabArtifactDeploymentStatus() { } public int? ArtifactsApplied { get { throw null; } } public string DeploymentStatus { get { throw null; } } public int? TotalArtifacts { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabArtifactDeploymentStatus 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.DevTestLabs.Models.DevTestLabArtifactDeploymentStatus System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1555,6 +1582,7 @@ public DevTestLabArtifactGenerateArmTemplateContent() { } public Azure.Core.AzureLocation? Location { get { throw null; } set { } } public System.Collections.Generic.IList Parameters { get { throw null; } } public string VmName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabArtifactGenerateArmTemplateContent 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.DevTestLabs.Models.DevTestLabArtifactGenerateArmTemplateContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1571,6 +1599,7 @@ public DevTestLabArtifactInstallInfo() { } public System.Collections.Generic.IList Parameters { get { throw null; } } public string Status { get { throw null; } set { } } public string VmExtensionStatusMessage { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabArtifactInstallInfo 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.DevTestLabs.Models.DevTestLabArtifactInstallInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1582,6 +1611,7 @@ public partial class DevTestLabArtifactParameter : System.ClientModel.Primitives public DevTestLabArtifactParameter() { } public string Name { get { throw null; } set { } } public string Value { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabArtifactParameter 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.DevTestLabs.Models.DevTestLabArtifactParameter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1591,6 +1621,7 @@ public DevTestLabArtifactParameter() { } public partial class DevTestLabArtifactSourcePatch : Azure.ResourceManager.DevTestLabs.Models.DevTestLabResourcePatch, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DevTestLabArtifactSourcePatch() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabArtifactSourcePatch 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.DevTestLabs.Models.DevTestLabArtifactSourcePatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1603,6 +1634,7 @@ internal DevTestLabCostDetails() { } public double? Cost { get { throw null; } } public Azure.ResourceManager.DevTestLabs.Models.DevTestLabCostType? CostType { get { throw null; } } public System.DateTimeOffset? On { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabCostDetails 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.DevTestLabs.Models.DevTestLabCostDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1617,6 +1649,7 @@ public DevTestLabCostThreshold() { } public Azure.ResourceManager.DevTestLabs.Models.DevTestLabCostThresholdStatus? SendNotificationWhenExceeded { get { throw null; } set { } } public string ThresholdId { get { throw null; } set { } } public double? ThresholdValue { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabCostThreshold 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.DevTestLabs.Models.DevTestLabCostThreshold System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1682,6 +1715,7 @@ public DevTestLabCostThreshold() { } public partial class DevTestLabCustomImagePatch : Azure.ResourceManager.DevTestLabs.Models.DevTestLabResourcePatch, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DevTestLabCustomImagePatch() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabCustomImagePatch 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.DevTestLabs.Models.DevTestLabCustomImagePatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1694,6 +1728,7 @@ public DevTestLabCustomImagePlan() { } public string Id { get { throw null; } set { } } public string Offer { get { throw null; } set { } } public string Publisher { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabCustomImagePlan 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.DevTestLabs.Models.DevTestLabCustomImagePlan System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1706,6 +1741,7 @@ public DevTestLabCustomImageVhd(Azure.ResourceManager.DevTestLabs.Models.DevTest public string ImageName { get { throw null; } set { } } public bool? IsSysPrepEnabled { get { throw null; } set { } } public Azure.ResourceManager.DevTestLabs.Models.DevTestLabCustomImageOSType OSType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabCustomImageVhd 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.DevTestLabs.Models.DevTestLabCustomImageVhd System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1718,6 +1754,7 @@ public DevTestLabCustomImageVm() { } public Azure.ResourceManager.DevTestLabs.Models.DevTestLabLinuxOSState? LinuxOSState { get { throw null; } set { } } public string SourceVmId { get { throw null; } set { } } public Azure.ResourceManager.DevTestLabs.Models.WindowsOSState? WindowsOSState { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabCustomImageVm 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.DevTestLabs.Models.DevTestLabCustomImageVm System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1730,6 +1767,7 @@ public DevTestLabDataDiskProperties() { } public Azure.ResourceManager.DevTestLabs.Models.AttachNewDataDiskDetails AttachNewDataDiskOptions { get { throw null; } set { } } public Azure.Core.ResourceIdentifier ExistingLabDiskId { get { throw null; } set { } } public Azure.ResourceManager.DevTestLabs.Models.DevTestLabHostCachingOption? HostCaching { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabDataDiskProperties 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.DevTestLabs.Models.DevTestLabDataDiskProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1741,6 +1779,7 @@ public partial class DevTestLabDataDiskStorageTypeInfo : System.ClientModel.Prim public DevTestLabDataDiskStorageTypeInfo() { } public string Lun { get { throw null; } set { } } public Azure.ResourceManager.DevTestLabs.Models.DevTestLabStorageType? StorageType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabDataDiskStorageTypeInfo 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.DevTestLabs.Models.DevTestLabDataDiskStorageTypeInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1751,6 +1790,7 @@ public partial class DevTestLabDiskAttachContent : System.ClientModel.Primitives { public DevTestLabDiskAttachContent() { } public Azure.Core.ResourceIdentifier LeasedByLabVmId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabDiskAttachContent 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.DevTestLabs.Models.DevTestLabDiskAttachContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1761,6 +1801,7 @@ public partial class DevTestLabDiskDetachContent : System.ClientModel.Primitives { public DevTestLabDiskDetachContent() { } public Azure.Core.ResourceIdentifier LeasedByLabVmId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabDiskDetachContent 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.DevTestLabs.Models.DevTestLabDiskDetachContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1770,6 +1811,7 @@ public DevTestLabDiskDetachContent() { } public partial class DevTestLabDiskPatch : Azure.ResourceManager.DevTestLabs.Models.DevTestLabResourcePatch, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DevTestLabDiskPatch() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabDiskPatch 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.DevTestLabs.Models.DevTestLabDiskPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1799,6 +1841,7 @@ public partial class DevTestLabEnvironmentDeployment : System.ClientModel.Primit public DevTestLabEnvironmentDeployment() { } public Azure.Core.ResourceIdentifier ArmTemplateId { get { throw null; } set { } } public System.Collections.Generic.IList Parameters { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabEnvironmentDeployment 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.DevTestLabs.Models.DevTestLabEnvironmentDeployment System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1808,6 +1851,7 @@ public DevTestLabEnvironmentDeployment() { } public partial class DevTestLabEnvironmentPatch : Azure.ResourceManager.DevTestLabs.Models.DevTestLabResourcePatch, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DevTestLabEnvironmentPatch() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabEnvironmentPatch 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.DevTestLabs.Models.DevTestLabEnvironmentPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1836,6 +1880,7 @@ public partial class DevTestLabEvaluatePoliciesContent : System.ClientModel.Prim { public DevTestLabEvaluatePoliciesContent() { } public System.Collections.Generic.IList Policies { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabEvaluatePoliciesContent 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.DevTestLabs.Models.DevTestLabEvaluatePoliciesContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1846,6 +1891,7 @@ public partial class DevTestLabEvaluatePoliciesResult : System.ClientModel.Primi { internal DevTestLabEvaluatePoliciesResult() { } public System.Collections.Generic.IReadOnlyList Results { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabEvaluatePoliciesResult 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.DevTestLabs.Models.DevTestLabEvaluatePoliciesResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1859,6 +1905,7 @@ public DevTestLabEvaluatePolicy() { } public string FactName { get { throw null; } set { } } public string UserObjectId { get { throw null; } set { } } public string ValueOffset { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabEvaluatePolicy 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.DevTestLabs.Models.DevTestLabEvaluatePolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1870,6 +1917,7 @@ public partial class DevTestLabExportResourceUsageContent : System.ClientModel.P public DevTestLabExportResourceUsageContent() { } public System.Uri BlobStorageAbsoluteSasUri { get { throw null; } set { } } public System.DateTimeOffset? UsageStartOn { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabExportResourceUsageContent 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.DevTestLabs.Models.DevTestLabExportResourceUsageContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1881,6 +1929,7 @@ public partial class DevTestLabExternalSubnet : System.ClientModel.Primitives.IJ internal DevTestLabExternalSubnet() { } public Azure.Core.ResourceIdentifier Id { get { throw null; } } public string Name { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabExternalSubnet 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.DevTestLabs.Models.DevTestLabExternalSubnet System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1908,6 +1957,7 @@ internal DevTestLabExternalSubnet() { } public partial class DevTestLabFormulaPatch : Azure.ResourceManager.DevTestLabs.Models.DevTestLabResourcePatch, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DevTestLabFormulaPatch() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabFormulaPatch 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.DevTestLabs.Models.DevTestLabFormulaPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1925,6 +1975,7 @@ public DevTestLabGalleryImage(Azure.Core.AzureLocation location) { } public bool? IsEnabled { get { throw null; } set { } } public bool? IsPlanAuthorized { get { throw null; } set { } } public string PlanId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabGalleryImage 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.DevTestLabs.Models.DevTestLabGalleryImage System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1939,6 +1990,7 @@ public DevTestLabGalleryImageReference() { } public string Publisher { get { throw null; } set { } } public string Sku { get { throw null; } set { } } public string Version { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabGalleryImageReference 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.DevTestLabs.Models.DevTestLabGalleryImageReference System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1949,6 +2001,7 @@ public partial class DevTestLabGenerateUploadUriContent : System.ClientModel.Pri { public DevTestLabGenerateUploadUriContent() { } public string BlobName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabGenerateUploadUriContent 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.DevTestLabs.Models.DevTestLabGenerateUploadUriContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1959,6 +2012,7 @@ public partial class DevTestLabGenerateUploadUriResult : System.ClientModel.Prim { internal DevTestLabGenerateUploadUriResult() { } public System.Uri UploadUri { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabGenerateUploadUriResult 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.DevTestLabs.Models.DevTestLabGenerateUploadUriResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1970,6 +2024,7 @@ public partial class DevTestLabGlobalScheduleRetargetContent : System.ClientMode public DevTestLabGlobalScheduleRetargetContent() { } public Azure.Core.ResourceIdentifier CurrentResourceId { get { throw null; } set { } } public Azure.Core.ResourceIdentifier TargetResourceId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabGlobalScheduleRetargetContent 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.DevTestLabs.Models.DevTestLabGlobalScheduleRetargetContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2000,6 +2055,7 @@ public partial class DevTestLabImportVmContent : System.ClientModel.Primitives.I public DevTestLabImportVmContent() { } public string DestinationVmName { get { throw null; } set { } } public Azure.Core.ResourceIdentifier SourceVmResourceId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabImportVmContent 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.DevTestLabs.Models.DevTestLabImportVmContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2012,6 +2068,7 @@ public DevTestLabInboundNatRule() { } public int? BackendPort { get { throw null; } set { } } public int? FrontendPort { get { throw null; } set { } } public Azure.ResourceManager.DevTestLabs.Models.DevTestLabTransportProtocol? TransportProtocol { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabInboundNatRule 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.DevTestLabs.Models.DevTestLabInboundNatRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2062,6 +2119,7 @@ public DevTestLabNetworkInterface() { } public string SshAuthority { get { throw null; } set { } } public Azure.Core.ResourceIdentifier SubnetId { get { throw null; } set { } } public Azure.Core.ResourceIdentifier VirtualNetworkId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabNetworkInterface 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.DevTestLabs.Models.DevTestLabNetworkInterface System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2072,6 +2130,7 @@ public partial class DevTestLabNotificationChannelEvent : System.ClientModel.Pri { public DevTestLabNotificationChannelEvent() { } public Azure.ResourceManager.DevTestLabs.Models.DevTestLabNotificationChannelEventType? EventName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabNotificationChannelEvent 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.DevTestLabs.Models.DevTestLabNotificationChannelEvent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2101,6 +2160,7 @@ public partial class DevTestLabNotificationChannelNotifyContent : System.ClientM public DevTestLabNotificationChannelNotifyContent() { } public Azure.ResourceManager.DevTestLabs.Models.DevTestLabNotificationChannelEventType? EventName { get { throw null; } set { } } public string JsonPayload { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabNotificationChannelNotifyContent 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.DevTestLabs.Models.DevTestLabNotificationChannelNotifyContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2110,6 +2170,7 @@ public DevTestLabNotificationChannelNotifyContent() { } public partial class DevTestLabNotificationChannelPatch : Azure.ResourceManager.DevTestLabs.Models.DevTestLabResourcePatch, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DevTestLabNotificationChannelPatch() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabNotificationChannelPatch 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.DevTestLabs.Models.DevTestLabNotificationChannelPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2124,6 +2185,7 @@ public DevTestLabNotificationSettings() { } public Azure.ResourceManager.DevTestLabs.Models.DevTestLabEnableStatus? Status { get { throw null; } set { } } public int? TimeInMinutes { get { throw null; } set { } } public System.Uri WebhookUri { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabNotificationSettings 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.DevTestLabs.Models.DevTestLabNotificationSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2135,6 +2197,7 @@ public partial class DevTestLabParameter : System.ClientModel.Primitives.IJsonMo public DevTestLabParameter() { } public string Name { get { throw null; } set { } } public string Value { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabParameter 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.DevTestLabs.Models.DevTestLabParameter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2146,6 +2209,7 @@ public partial class DevTestLabParametersValueFileInfo : System.ClientModel.Prim internal DevTestLabParametersValueFileInfo() { } public string FileName { get { throw null; } } public System.BinaryData ParametersValueInfo { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabParametersValueFileInfo 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.DevTestLabs.Models.DevTestLabParametersValueFileInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2155,6 +2219,7 @@ internal DevTestLabParametersValueFileInfo() { } public partial class DevTestLabPatch : Azure.ResourceManager.DevTestLabs.Models.DevTestLabResourcePatch, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DevTestLabPatch() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabPatch 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.DevTestLabs.Models.DevTestLabPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2208,6 +2273,7 @@ public DevTestLabPatch() { } public partial class DevTestLabPolicyPatch : Azure.ResourceManager.DevTestLabs.Models.DevTestLabResourcePatch, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DevTestLabPolicyPatch() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabPolicyPatch 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.DevTestLabs.Models.DevTestLabPolicyPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2219,6 +2285,7 @@ public partial class DevTestLabPolicySetResult : System.ClientModel.Primitives.I internal DevTestLabPolicySetResult() { } public bool? HasError { get { throw null; } } public System.Collections.Generic.IReadOnlyList PolicyViolations { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabPolicySetResult 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.DevTestLabs.Models.DevTestLabPolicySetResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2248,6 +2315,7 @@ public partial class DevTestLabPolicyViolation : System.ClientModel.Primitives.I internal DevTestLabPolicyViolation() { } public string Code { get { throw null; } } public string Message { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabPolicyViolation 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.DevTestLabs.Models.DevTestLabPolicyViolation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2259,6 +2327,7 @@ public partial class DevTestLabPort : 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.DevTestLabs.Models.DevTestLabPort System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2287,6 +2356,7 @@ public partial class DevTestLabRdpConnection : System.ClientModel.Primitives.IJs { internal DevTestLabRdpConnection() { } public string Contents { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabRdpConnection 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.DevTestLabs.Models.DevTestLabRdpConnection System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2323,6 +2393,7 @@ internal DevTestLabResourceCost() { } public string ResourceStatus { get { throw null; } } public string ResourceType { get { throw null; } } public string ResourceUniqueId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabResourceCost 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.DevTestLabs.Models.DevTestLabResourceCost System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2333,6 +2404,7 @@ public partial class DevTestLabResourcePatch : System.ClientModel.Primitives.IJs { public DevTestLabResourcePatch() { } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabResourcePatch 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.DevTestLabs.Models.DevTestLabResourcePatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2353,6 +2425,7 @@ public DevTestLabScheduleCreationParameter() { } public string TaskType { get { throw null; } set { } } public string TimeZoneId { get { throw null; } set { } } public Azure.ResourceManager.DevTestLabs.Models.DevTestLabWeekDetails WeeklyRecurrence { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabScheduleCreationParameter 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.DevTestLabs.Models.DevTestLabScheduleCreationParameter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2362,6 +2435,7 @@ public DevTestLabScheduleCreationParameter() { } public partial class DevTestLabSchedulePatch : Azure.ResourceManager.DevTestLabs.Models.DevTestLabResourcePatch, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DevTestLabSchedulePatch() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabSchedulePatch 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.DevTestLabs.Models.DevTestLabSchedulePatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2371,6 +2445,7 @@ public DevTestLabSchedulePatch() { } public partial class DevTestLabSecretPatch : Azure.ResourceManager.DevTestLabs.Models.DevTestLabResourcePatch, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DevTestLabSecretPatch() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabSecretPatch 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.DevTestLabs.Models.DevTestLabSecretPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2380,6 +2455,7 @@ public DevTestLabSecretPatch() { } public partial class DevTestLabServiceFabricPatch : Azure.ResourceManager.DevTestLabs.Models.DevTestLabResourcePatch, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DevTestLabServiceFabricPatch() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabServiceFabricPatch 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.DevTestLabs.Models.DevTestLabServiceFabricPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2430,6 +2506,7 @@ public DevTestLabSubnet() { } public Azure.ResourceManager.DevTestLabs.Models.DevTestLabUsagePermissionType? AllowPublicIP { get { throw null; } set { } } public string LabSubnetName { get { throw null; } set { } } public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabSubnet 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.DevTestLabs.Models.DevTestLabSubnet System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2445,6 +2522,7 @@ public DevTestLabSubnetOverride() { } public Azure.ResourceManager.DevTestLabs.Models.DevTestLabUsagePermissionType? UseInVmCreationPermission { get { throw null; } set { } } public Azure.ResourceManager.DevTestLabs.Models.DevTestLabUsagePermissionType? UsePublicIPAddressPermission { get { throw null; } set { } } public string VirtualNetworkPoolName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabSubnetOverride 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.DevTestLabs.Models.DevTestLabSubnetOverride System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2456,6 +2534,7 @@ public partial class DevTestLabSupport : System.ClientModel.Primitives.IJsonMode public DevTestLabSupport() { } public Azure.ResourceManager.DevTestLabs.Models.DevTestLabEnableStatus? Enabled { get { throw null; } set { } } public string Markdown { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabSupport 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.DevTestLabs.Models.DevTestLabSupport System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2471,6 +2550,7 @@ public DevTestLabTargetCost() { } public Azure.ResourceManager.DevTestLabs.Models.DevTestLabReportingCycleType? CycleType { get { throw null; } set { } } public Azure.ResourceManager.DevTestLabs.Models.DevTestLabTargetCostStatus? Status { get { throw null; } set { } } public int? Target { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabTargetCost 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.DevTestLabs.Models.DevTestLabTargetCost System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2540,6 +2620,7 @@ public DevTestLabUserIdentity() { } public string PrincipalId { get { throw null; } set { } } public string PrincipalName { get { throw null; } set { } } public System.Guid? TenantId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabUserIdentity 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.DevTestLabs.Models.DevTestLabUserIdentity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2549,6 +2630,7 @@ public DevTestLabUserIdentity() { } public partial class DevTestLabUserPatch : Azure.ResourceManager.DevTestLabs.Models.DevTestLabResourcePatch, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DevTestLabUserPatch() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabUserPatch 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.DevTestLabs.Models.DevTestLabUserPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2560,6 +2642,7 @@ public partial class DevTestLabUserSecretStore : System.ClientModel.Primitives.I public DevTestLabUserSecretStore() { } public Azure.Core.ResourceIdentifier KeyVaultId { get { throw null; } set { } } public System.Uri KeyVaultUri { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabUserSecretStore 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.DevTestLabs.Models.DevTestLabUserSecretStore System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2569,6 +2652,7 @@ public DevTestLabUserSecretStore() { } public partial class DevTestLabVirtualNetworkPatch : Azure.ResourceManager.DevTestLabs.Models.DevTestLabResourcePatch, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DevTestLabVirtualNetworkPatch() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabVirtualNetworkPatch 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.DevTestLabs.Models.DevTestLabVirtualNetworkPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2579,6 +2663,7 @@ public partial class DevTestLabVmApplyArtifactsContent : System.ClientModel.Prim { public DevTestLabVmApplyArtifactsContent() { } public System.Collections.Generic.IList Artifacts { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabVmApplyArtifactsContent 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.DevTestLabs.Models.DevTestLabVmApplyArtifactsContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2615,6 +2700,7 @@ public DevTestLabVmCreationContent() { } public string StorageType { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } public string UserName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabVmCreationContent 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.DevTestLabs.Models.DevTestLabVmCreationContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2644,6 +2730,7 @@ public partial class DevTestLabVmDetachDataDiskContent : System.ClientModel.Prim { public DevTestLabVmDetachDataDiskContent() { } public Azure.Core.ResourceIdentifier ExistingLabDiskId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabVmDetachDataDiskContent 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.DevTestLabs.Models.DevTestLabVmDetachDataDiskContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2653,6 +2740,7 @@ public DevTestLabVmDetachDataDiskContent() { } public partial class DevTestLabVmPatch : Azure.ResourceManager.DevTestLabs.Models.DevTestLabResourcePatch, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DevTestLabVmPatch() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabVmPatch 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.DevTestLabs.Models.DevTestLabVmPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2663,6 +2751,7 @@ public partial class DevTestLabVmResizeContent : System.ClientModel.Primitives.I { public DevTestLabVmResizeContent() { } public string Size { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabVmResizeContent 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.DevTestLabs.Models.DevTestLabVmResizeContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2674,6 +2763,7 @@ public partial class DevTestLabWeekDetails : System.ClientModel.Primitives.IJson public DevTestLabWeekDetails() { } public string Time { get { throw null; } set { } } public System.Collections.Generic.IList Weekdays { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabWeekDetails 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.DevTestLabs.Models.DevTestLabWeekDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/assets.json b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/assets.json index b9f532b202a5..60a2669b5a2e 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/assets.json +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/devtestlabs/Azure.ResourceManager.DevTestLabs", - "Tag": "net/devtestlabs/Azure.ResourceManager.DevTestLabs_31d4429b57" + "Tag": "net/devtestlabs/Azure.ResourceManager.DevTestLabs_9654836287" } diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabArmTemplateData.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabArmTemplateData.Serialization.cs index e47cb5c27f86..511af8984d25 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabArmTemplateData.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabArmTemplateData.Serialization.cs @@ -20,6 +20,15 @@ public partial class DevTestLabArmTemplateData : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,40 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(DevTestLabArmTemplateData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(DisplayName)) @@ -116,22 +92,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea writer.WriteBooleanValue(IsEnabled.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } DevTestLabArmTemplateData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabArtifactData.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabArtifactData.Serialization.cs index c49e6ae6488b..d742af3214b9 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabArtifactData.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabArtifactData.Serialization.cs @@ -19,6 +19,15 @@ public partial class DevTestLabArtifactData : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,40 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(DevTestLabArtifactData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Title)) @@ -110,22 +86,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader writer.WriteStringValue(CreatedOn.Value, "O"); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } DevTestLabArtifactData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabArtifactSourceData.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabArtifactSourceData.Serialization.cs index 7dde45bd386a..3c55f8354d66 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabArtifactSourceData.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabArtifactSourceData.Serialization.cs @@ -20,6 +20,15 @@ public partial class DevTestLabArtifactSourceData : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,40 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(DevTestLabArtifactSourceData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(DisplayName)) @@ -119,22 +95,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model writer.WriteStringValue(UniqueIdentifier.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } DevTestLabArtifactSourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabCostData.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabCostData.Serialization.cs index a21f8dd786c5..f1cf888d6e69 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabCostData.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabCostData.Serialization.cs @@ -20,6 +20,15 @@ public partial class DevTestLabCostData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,40 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(DevTestLabCostData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(TargetCost)) @@ -124,22 +100,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStringValue(UniqueIdentifier.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } DevTestLabCostData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabCustomImageData.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabCustomImageData.Serialization.cs index 371190816cd6..98f0465799e2 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabCustomImageData.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabCustomImageData.Serialization.cs @@ -20,6 +20,15 @@ public partial class DevTestLabCustomImageData : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,40 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(DevTestLabCustomImageData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Vm)) @@ -129,22 +105,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea writer.WriteStringValue(UniqueIdentifier.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } DevTestLabCustomImageData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabData.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabData.Serialization.cs index 4963703b1fd8..d5a531cefa49 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabData.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabData.Serialization.cs @@ -20,6 +20,15 @@ public partial class DevTestLabData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,40 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(DevTestLabData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(DefaultStorageAccount)) @@ -180,22 +156,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp writer.WriteStringValue(UniqueIdentifier.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } DevTestLabData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabDiskData.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabDiskData.Serialization.cs index f96ee3c0bf12..86ea5876a264 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabDiskData.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabDiskData.Serialization.cs @@ -20,6 +20,15 @@ public partial class DevTestLabDiskData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,40 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(DevTestLabDiskData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(DiskType)) @@ -119,22 +95,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStringValue(UniqueIdentifier.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } DevTestLabDiskData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabEnvironmentData.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabEnvironmentData.Serialization.cs index 1ed6b261db37..eb0fb475cb36 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabEnvironmentData.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabEnvironmentData.Serialization.cs @@ -20,6 +20,15 @@ public partial class DevTestLabEnvironmentData : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,40 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(DevTestLabEnvironmentData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(DeploymentProperties)) @@ -94,22 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea writer.WriteStringValue(UniqueIdentifier.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } DevTestLabEnvironmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabFormulaData.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabFormulaData.Serialization.cs index 104fe3ea9a98..8afa0d0690b6 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabFormulaData.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabFormulaData.Serialization.cs @@ -20,6 +20,15 @@ public partial class DevTestLabFormulaData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,40 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(DevTestLabFormulaData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Description)) @@ -104,22 +80,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW writer.WriteStringValue(UniqueIdentifier.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } DevTestLabFormulaData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabNotificationChannelData.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabNotificationChannelData.Serialization.cs index bb775d6d4ea0..22a7c0c9581b 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabNotificationChannelData.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabNotificationChannelData.Serialization.cs @@ -20,6 +20,15 @@ public partial class DevTestLabNotificationChannelData : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,40 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(DevTestLabNotificationChannelData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(WebHookUri)) @@ -109,22 +85,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteStringValue(UniqueIdentifier.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } DevTestLabNotificationChannelData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabPolicyData.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabPolicyData.Serialization.cs index 8393639eda80..023e92773857 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabPolicyData.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabPolicyData.Serialization.cs @@ -20,6 +20,15 @@ public partial class DevTestLabPolicyData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,40 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(DevTestLabPolicyData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Description)) @@ -109,22 +85,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr writer.WriteStringValue(UniqueIdentifier.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } DevTestLabPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabScheduleData.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabScheduleData.Serialization.cs index fa0ecd6bc267..1659fd6f875a 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabScheduleData.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabScheduleData.Serialization.cs @@ -20,6 +20,15 @@ public partial class DevTestLabScheduleData : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,40 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(DevTestLabScheduleData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Status)) @@ -119,22 +95,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader writer.WriteStringValue(UniqueIdentifier.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } DevTestLabScheduleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabSecretData.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabSecretData.Serialization.cs index a5655f7cdb89..e41b3c4e7be4 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabSecretData.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabSecretData.Serialization.cs @@ -19,6 +19,15 @@ public partial class DevTestLabSecretData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,40 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(DevTestLabSecretData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Value)) @@ -78,22 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr writer.WriteStringValue(UniqueIdentifier.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } DevTestLabSecretData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabServiceFabricData.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabServiceFabricData.Serialization.cs index 7d87b3f58035..bd1768f772ab 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabServiceFabricData.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabServiceFabricData.Serialization.cs @@ -20,6 +20,15 @@ public partial class DevTestLabServiceFabricData : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,40 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(DevTestLabServiceFabricData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(ExternalServiceFabricId)) @@ -89,22 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR writer.WriteStringValue(UniqueIdentifier.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } DevTestLabServiceFabricData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabServiceRunnerData.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabServiceRunnerData.Serialization.cs index 32690dc677b5..fd2583db1417 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabServiceRunnerData.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabServiceRunnerData.Serialization.cs @@ -20,6 +20,15 @@ public partial class DevTestLabServiceRunnerData : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,61 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(DevTestLabServiceRunnerData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); writer.WriteObjectValue(Identity, options); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } DevTestLabServiceRunnerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabUserData.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabUserData.Serialization.cs index c9d35c0449f2..35bf0acc8bb0 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabUserData.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabUserData.Serialization.cs @@ -20,6 +20,15 @@ public partial class DevTestLabUserData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,40 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(DevTestLabUserData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Identity)) @@ -89,22 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStringValue(UniqueIdentifier.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } DevTestLabUserData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabVirtualNetworkData.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabVirtualNetworkData.Serialization.cs index bc56828cb09d..caea8b9aa1dd 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabVirtualNetworkData.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabVirtualNetworkData.Serialization.cs @@ -20,6 +20,15 @@ public partial class DevTestLabVirtualNetworkData : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,40 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(DevTestLabVirtualNetworkData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsCollectionDefined(AllowedSubnets)) @@ -119,22 +95,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model writer.WriteStringValue(UniqueIdentifier.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } DevTestLabVirtualNetworkData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabVmData.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabVmData.Serialization.cs index 71305a507827..9502dec884d9 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabVmData.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabVmData.Serialization.cs @@ -20,6 +20,15 @@ public partial class DevTestLabVmData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,40 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(DevTestLabVmData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Notes)) @@ -254,22 +230,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter writer.WriteStringValue(UniqueIdentifier.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } DevTestLabVmData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/ArmTemplateList.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/ArmTemplateList.Serialization.cs index fc2df1817860..05013b860bad 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/ArmTemplateList.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/ArmTemplateList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ArmTemplateList : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(ArmTemplateList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO #endif } } - writer.WriteEndObject(); } ArmTemplateList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/ArtifactList.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/ArtifactList.Serialization.cs index 82efb244c0f7..f169e361dff8 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/ArtifactList.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/ArtifactList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ArtifactList : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(ArtifactList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti #endif } } - writer.WriteEndObject(); } ArtifactList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/ArtifactSourceList.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/ArtifactSourceList.Serialization.cs index 8061bc054b49..4d8e2249e515 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/ArtifactSourceList.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/ArtifactSourceList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ArtifactSourceList : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ArtifactSourceList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } ArtifactSourceList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/AttachNewDataDiskDetails.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/AttachNewDataDiskDetails.Serialization.cs index a32ce29c47dc..a7ffdd84f5c0 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/AttachNewDataDiskDetails.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/AttachNewDataDiskDetails.Serialization.cs @@ -18,6 +18,15 @@ public partial class AttachNewDataDiskDetails : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(AttachNewDataDiskDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(DiskSizeGiB)) { writer.WritePropertyName("diskSizeGiB"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } AttachNewDataDiskDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/BulkCreationParameters.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/BulkCreationParameters.Serialization.cs index 9d9aa8210877..f0f38d779eba 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/BulkCreationParameters.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/BulkCreationParameters.Serialization.cs @@ -18,6 +18,15 @@ internal partial class BulkCreationParameters : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(BulkCreationParameters)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(InstanceCount)) { writer.WritePropertyName("instanceCount"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } BulkCreationParameters IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/ComputeDataDisk.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/ComputeDataDisk.Serialization.cs index 02d122e3ee18..acbc352a52fc 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/ComputeDataDisk.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/ComputeDataDisk.Serialization.cs @@ -18,6 +18,15 @@ public partial class ComputeDataDisk : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(ComputeDataDisk)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO #endif } } - writer.WriteEndObject(); } ComputeDataDisk IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/ComputeVmInstanceViewStatus.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/ComputeVmInstanceViewStatus.Serialization.cs index 14decb938f07..6814337835ca 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/ComputeVmInstanceViewStatus.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/ComputeVmInstanceViewStatus.Serialization.cs @@ -18,6 +18,15 @@ public partial class ComputeVmInstanceViewStatus : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(ComputeVmInstanceViewStatus)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Code)) { writer.WritePropertyName("code"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } ComputeVmInstanceViewStatus IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/ComputeVmProperties.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/ComputeVmProperties.Serialization.cs index 7f21f1abd11b..e63ac7cc59b9 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/ComputeVmProperties.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/ComputeVmProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class ComputeVmProperties : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ComputeVmProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Statuses)) { writer.WritePropertyName("statuses"u8); @@ -91,7 +99,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } ComputeVmProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/CustomImageList.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/CustomImageList.Serialization.cs index 5d454ae76ce6..65f051503637 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/CustomImageList.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/CustomImageList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class CustomImageList : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(CustomImageList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO #endif } } - writer.WriteEndObject(); } CustomImageList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DayDetails.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DayDetails.Serialization.cs index 1c68c36bf9ba..2bd6d1bcd17d 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DayDetails.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DayDetails.Serialization.cs @@ -18,6 +18,15 @@ internal partial class DayDetails : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOption throw new FormatException($"The model {nameof(DayDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Time)) { writer.WritePropertyName("time"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOption #endif } } - writer.WriteEndObject(); } DayDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabAnnouncement.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabAnnouncement.Serialization.cs index 4466c2269f4b..dd656a7c7352 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabAnnouncement.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabAnnouncement.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabAnnouncement : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(DevTestLabAnnouncement)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Title)) { writer.WritePropertyName("title"u8); @@ -76,7 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } DevTestLabAnnouncement IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabApplicableSchedule.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabApplicableSchedule.Serialization.cs index c9697aac1f50..fb15c6320d36 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabApplicableSchedule.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabApplicableSchedule.Serialization.cs @@ -19,6 +19,15 @@ public partial class DevTestLabApplicableSchedule : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,40 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(DevTestLabApplicableSchedule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(LabVmsShutdown)) @@ -73,22 +49,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model writer.WriteObjectValue(LabVmsStartup, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } DevTestLabApplicableSchedule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabArmTemplateInfo.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabArmTemplateInfo.Serialization.cs index d46aedcfaf0d..a4d67c887437 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabArmTemplateInfo.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabArmTemplateInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabArmTemplateInfo : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(DevTestLabArmTemplateInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Template)) { writer.WritePropertyName("template"u8); @@ -65,7 +73,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } DevTestLabArmTemplateInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabArmTemplateParameter.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabArmTemplateParameter.Serialization.cs index 10c90d35d282..c2ca30c38e37 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabArmTemplateParameter.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabArmTemplateParameter.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabArmTemplateParameter : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(DevTestLabArmTemplateParameter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } DevTestLabArmTemplateParameter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabArtifactDeploymentStatus.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabArtifactDeploymentStatus.Serialization.cs index 69be75f63a66..9d64cad4a1cf 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabArtifactDeploymentStatus.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabArtifactDeploymentStatus.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabArtifactDeploymentStatus : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(DevTestLabArtifactDeploymentStatus)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(DeploymentStatus)) { writer.WritePropertyName("deploymentStatus"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } DevTestLabArtifactDeploymentStatus IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabArtifactGenerateArmTemplateContent.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabArtifactGenerateArmTemplateContent.Serialization.cs index 2992b981a759..53649a3610cb 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabArtifactGenerateArmTemplateContent.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabArtifactGenerateArmTemplateContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabArtifactGenerateArmTemplateContent : IUtf8JsonSer void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWrit throw new FormatException($"The model {nameof(DevTestLabArtifactGenerateArmTemplateContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(VmName)) { writer.WritePropertyName("virtualMachineName"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWrit #endif } } - writer.WriteEndObject(); } DevTestLabArtifactGenerateArmTemplateContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabArtifactInstallInfo.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabArtifactInstallInfo.Serialization.cs index f0ff5ed41e5a..087f3f78e6dd 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabArtifactInstallInfo.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabArtifactInstallInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabArtifactInstallInfo : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(DevTestLabArtifactInstallInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ArtifactId)) { writer.WritePropertyName("artifactId"u8); @@ -81,7 +89,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } DevTestLabArtifactInstallInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabArtifactParameter.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabArtifactParameter.Serialization.cs index d7833d4f4a91..1607b4e5a9c4 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabArtifactParameter.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabArtifactParameter.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabArtifactParameter : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(DevTestLabArtifactParameter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } DevTestLabArtifactParameter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabArtifactSourcePatch.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabArtifactSourcePatch.Serialization.cs index d641fe7cbb76..03e884e814fe 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabArtifactSourcePatch.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabArtifactSourcePatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabArtifactSourcePatch : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,34 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(DevTestLabArtifactSourcePatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } DevTestLabArtifactSourcePatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabCostDetails.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabCostDetails.Serialization.cs index 04b75a95f44b..2f02a968be99 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabCostDetails.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabCostDetails.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabCostDetails : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(DevTestLabCostDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(On)) { writer.WritePropertyName("date"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } DevTestLabCostDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabCostThreshold.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabCostThreshold.Serialization.cs index 035962fb6838..518ff59103a2 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabCostThreshold.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabCostThreshold.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabCostThreshold : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(DevTestLabCostThreshold)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ThresholdId)) { writer.WritePropertyName("thresholdId"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } DevTestLabCostThreshold IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabCustomImagePatch.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabCustomImagePatch.Serialization.cs index 9a30c217a14f..2001a87e166c 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabCustomImagePatch.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabCustomImagePatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabCustomImagePatch : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,34 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(DevTestLabCustomImagePatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } DevTestLabCustomImagePatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabCustomImagePlan.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabCustomImagePlan.Serialization.cs index 723bff3c10e0..58bbd4ee52b4 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabCustomImagePlan.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabCustomImagePlan.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabCustomImagePlan : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(DevTestLabCustomImagePlan)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } DevTestLabCustomImagePlan IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabCustomImageVhd.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabCustomImageVhd.Serialization.cs index f0f876b7fded..d8348e742c66 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabCustomImageVhd.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabCustomImageVhd.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabCustomImageVhd : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(DevTestLabCustomImageVhd)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ImageName)) { writer.WritePropertyName("imageName"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } DevTestLabCustomImageVhd IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabCustomImageVm.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabCustomImageVm.Serialization.cs index 26bad0777494..5b801a7b12c6 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabCustomImageVm.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabCustomImageVm.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabCustomImageVm : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(DevTestLabCustomImageVm)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(SourceVmId)) { writer.WritePropertyName("sourceVmId"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } DevTestLabCustomImageVm IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabDataDiskProperties.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabDataDiskProperties.Serialization.cs index c1bde310f478..45d9c194c7df 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabDataDiskProperties.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabDataDiskProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabDataDiskProperties : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(DevTestLabDataDiskProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(AttachNewDataDiskOptions)) { writer.WritePropertyName("attachNewDataDiskOptions"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } DevTestLabDataDiskProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabDataDiskStorageTypeInfo.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabDataDiskStorageTypeInfo.Serialization.cs index 8874dfa8cfa5..e914572345b9 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabDataDiskStorageTypeInfo.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabDataDiskStorageTypeInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabDataDiskStorageTypeInfo : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(DevTestLabDataDiskStorageTypeInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Lun)) { writer.WritePropertyName("lun"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } DevTestLabDataDiskStorageTypeInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabDiskAttachContent.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabDiskAttachContent.Serialization.cs index 445998e3667b..b035e1e6f69b 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabDiskAttachContent.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabDiskAttachContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabDiskAttachContent : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(DevTestLabDiskAttachContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(LeasedByLabVmId)) { writer.WritePropertyName("leasedByLabVmId"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } DevTestLabDiskAttachContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabDiskDetachContent.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabDiskDetachContent.Serialization.cs index 327987204761..f5450a31d5b3 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabDiskDetachContent.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabDiskDetachContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabDiskDetachContent : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(DevTestLabDiskDetachContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(LeasedByLabVmId)) { writer.WritePropertyName("leasedByLabVmId"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } DevTestLabDiskDetachContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabDiskPatch.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabDiskPatch.Serialization.cs index bbb6162eee18..768f9458afde 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabDiskPatch.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabDiskPatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabDiskPatch : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,34 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(DevTestLabDiskPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } DevTestLabDiskPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabEnvironmentDeployment.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabEnvironmentDeployment.Serialization.cs index dd3380cf7b87..054bf5fb31ba 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabEnvironmentDeployment.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabEnvironmentDeployment.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabEnvironmentDeployment : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(DevTestLabEnvironmentDeployment)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ArmTemplateId)) { writer.WritePropertyName("armTemplateId"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } DevTestLabEnvironmentDeployment IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabEnvironmentPatch.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabEnvironmentPatch.Serialization.cs index 071a827a1dbf..990878a4f9f5 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabEnvironmentPatch.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabEnvironmentPatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabEnvironmentPatch : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,34 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(DevTestLabEnvironmentPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } DevTestLabEnvironmentPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabEvaluatePoliciesContent.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabEvaluatePoliciesContent.Serialization.cs index c1109e9d767f..465b331bb78b 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabEvaluatePoliciesContent.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabEvaluatePoliciesContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabEvaluatePoliciesContent : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(DevTestLabEvaluatePoliciesContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Policies)) { writer.WritePropertyName("policies"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } DevTestLabEvaluatePoliciesContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabEvaluatePoliciesResult.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabEvaluatePoliciesResult.Serialization.cs index 4c07e7c6f626..8d7a50949149 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabEvaluatePoliciesResult.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabEvaluatePoliciesResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabEvaluatePoliciesResult : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(DevTestLabEvaluatePoliciesResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Results)) { writer.WritePropertyName("results"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } DevTestLabEvaluatePoliciesResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabEvaluatePolicy.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabEvaluatePolicy.Serialization.cs index ae97e419f8fc..b61c6c79a32e 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabEvaluatePolicy.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabEvaluatePolicy.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabEvaluatePolicy : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(DevTestLabEvaluatePolicy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(FactName)) { writer.WritePropertyName("factName"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } DevTestLabEvaluatePolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabExportResourceUsageContent.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabExportResourceUsageContent.Serialization.cs index aaa96770eed7..9fac958c242d 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabExportResourceUsageContent.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabExportResourceUsageContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabExportResourceUsageContent : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(DevTestLabExportResourceUsageContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(BlobStorageAbsoluteSasUri)) { writer.WritePropertyName("blobStorageAbsoluteSasUri"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } DevTestLabExportResourceUsageContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabExternalSubnet.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabExternalSubnet.Serialization.cs index 3eb7edc59336..ddcf630caf5c 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabExternalSubnet.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabExternalSubnet.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabExternalSubnet : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(DevTestLabExternalSubnet)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } DevTestLabExternalSubnet IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabFormulaPatch.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabFormulaPatch.Serialization.cs index e51b07f08c82..222871416a37 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabFormulaPatch.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabFormulaPatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabFormulaPatch : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,34 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(DevTestLabFormulaPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } DevTestLabFormulaPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabGalleryImage.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabGalleryImage.Serialization.cs index c7282ef392a6..ba03da5ee15c 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabGalleryImage.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabGalleryImage.Serialization.cs @@ -19,6 +19,15 @@ public partial class DevTestLabGalleryImage : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,40 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(DevTestLabGalleryImage)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Author)) @@ -103,22 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader writer.WriteBooleanValue(IsPlanAuthorized.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } DevTestLabGalleryImage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabGalleryImageReference.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabGalleryImageReference.Serialization.cs index ef94f5ee44b2..2628cf2b1c82 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabGalleryImageReference.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabGalleryImageReference.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabGalleryImageReference : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(DevTestLabGalleryImageReference)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Offer)) { writer.WritePropertyName("offer"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } DevTestLabGalleryImageReference IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabGenerateUploadUriContent.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabGenerateUploadUriContent.Serialization.cs index a5960bbaeb79..2ee65e1ac982 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabGenerateUploadUriContent.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabGenerateUploadUriContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabGenerateUploadUriContent : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(DevTestLabGenerateUploadUriContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(BlobName)) { writer.WritePropertyName("blobName"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } DevTestLabGenerateUploadUriContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabGenerateUploadUriResult.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabGenerateUploadUriResult.Serialization.cs index 08057b105cda..1a0bfb967daf 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabGenerateUploadUriResult.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabGenerateUploadUriResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabGenerateUploadUriResult : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(DevTestLabGenerateUploadUriResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(UploadUri)) { writer.WritePropertyName("uploadUri"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } DevTestLabGenerateUploadUriResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabGlobalScheduleRetargetContent.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabGlobalScheduleRetargetContent.Serialization.cs index 1d0e93db7f76..a688e482d5e8 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabGlobalScheduleRetargetContent.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabGlobalScheduleRetargetContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabGlobalScheduleRetargetContent : IUtf8JsonSerializ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wr throw new FormatException($"The model {nameof(DevTestLabGlobalScheduleRetargetContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(CurrentResourceId)) { writer.WritePropertyName("currentResourceId"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter wr #endif } } - writer.WriteEndObject(); } DevTestLabGlobalScheduleRetargetContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabImportVmContent.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabImportVmContent.Serialization.cs index dfe8e80f001e..66448d4533b5 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabImportVmContent.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabImportVmContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabImportVmContent : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(DevTestLabImportVmContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(SourceVmResourceId)) { writer.WritePropertyName("sourceVirtualMachineResourceId"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } DevTestLabImportVmContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabInboundNatRule.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabInboundNatRule.Serialization.cs index 761922ff528e..ce716c348132 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabInboundNatRule.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabInboundNatRule.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabInboundNatRule : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(DevTestLabInboundNatRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(TransportProtocol)) { writer.WritePropertyName("transportProtocol"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } DevTestLabInboundNatRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabNetworkInterface.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabNetworkInterface.Serialization.cs index 3026dbbdcd53..5da19539c09b 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabNetworkInterface.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabNetworkInterface.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabNetworkInterface : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(DevTestLabNetworkInterface)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(VirtualNetworkId)) { writer.WritePropertyName("virtualNetworkId"u8); @@ -86,7 +94,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } DevTestLabNetworkInterface IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabNotificationChannelEvent.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabNotificationChannelEvent.Serialization.cs index e46c57004584..1b4afe2403b6 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabNotificationChannelEvent.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabNotificationChannelEvent.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabNotificationChannelEvent : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(DevTestLabNotificationChannelEvent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(EventName)) { writer.WritePropertyName("eventName"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } DevTestLabNotificationChannelEvent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabNotificationChannelNotifyContent.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabNotificationChannelNotifyContent.Serialization.cs index c179c9a52650..6e670e1877cc 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabNotificationChannelNotifyContent.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabNotificationChannelNotifyContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabNotificationChannelNotifyContent : IUtf8JsonSeria void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(DevTestLabNotificationChannelNotifyContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(EventName)) { writer.WritePropertyName("eventName"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } DevTestLabNotificationChannelNotifyContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabNotificationChannelPatch.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabNotificationChannelPatch.Serialization.cs index eab49a9d10bb..e52512a2e229 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabNotificationChannelPatch.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabNotificationChannelPatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabNotificationChannelPatch : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,34 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(DevTestLabNotificationChannelPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } DevTestLabNotificationChannelPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabNotificationSettings.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabNotificationSettings.Serialization.cs index f7b054ab3d92..81b3c59d92d6 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabNotificationSettings.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabNotificationSettings.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabNotificationSettings : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(DevTestLabNotificationSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Status)) { writer.WritePropertyName("status"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } DevTestLabNotificationSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabParameter.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabParameter.Serialization.cs index 4dd0371cb7ac..cf237fe01602 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabParameter.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabParameter.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabParameter : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(DevTestLabParameter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } DevTestLabParameter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabParametersValueFileInfo.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabParametersValueFileInfo.Serialization.cs index 64f5233f2ba4..121766917cf2 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabParametersValueFileInfo.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabParametersValueFileInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabParametersValueFileInfo : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(DevTestLabParametersValueFileInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(FileName)) { writer.WritePropertyName("fileName"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } DevTestLabParametersValueFileInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabPatch.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabPatch.Serialization.cs index 3d5cb7a66b03..d396aff1c49f 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabPatch.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabPatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabPatch : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,34 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(DevTestLabPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } DevTestLabPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabPolicyPatch.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabPolicyPatch.Serialization.cs index 2025ff4067b1..fffcdf0f1c4f 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabPolicyPatch.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabPolicyPatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabPolicyPatch : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,34 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(DevTestLabPolicyPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } DevTestLabPolicyPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabPolicySetResult.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabPolicySetResult.Serialization.cs index 7aaf0b5c817e..0fd4b17d8d4d 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabPolicySetResult.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabPolicySetResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabPolicySetResult : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(DevTestLabPolicySetResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(HasError)) { writer.WritePropertyName("hasError"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } DevTestLabPolicySetResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabPolicyViolation.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabPolicyViolation.Serialization.cs index 60ff721b4c0f..d0b0aafdc118 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabPolicyViolation.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabPolicyViolation.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabPolicyViolation : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(DevTestLabPolicyViolation)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Code)) { writer.WritePropertyName("code"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } DevTestLabPolicyViolation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabPort.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabPort.Serialization.cs index e3db12d9ccbc..3c91bbaff2fd 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabPort.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabPort.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabPort : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(DevTestLabPort)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(TransportProtocol)) { writer.WritePropertyName("transportProtocol"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp #endif } } - writer.WriteEndObject(); } DevTestLabPort IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabRdpConnection.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabRdpConnection.Serialization.cs index fa0dcb364c63..894e086aed67 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabRdpConnection.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabRdpConnection.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabRdpConnection : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(DevTestLabRdpConnection)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Contents)) { writer.WritePropertyName("contents"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } DevTestLabRdpConnection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabResourceCost.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabResourceCost.Serialization.cs index efb097086245..064b5b837b83 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabResourceCost.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabResourceCost.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabResourceCost : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(DevTestLabResourceCost)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ResourceName)) { writer.WritePropertyName("resourcename"u8); @@ -86,7 +94,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } DevTestLabResourceCost IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabResourcePatch.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabResourcePatch.Serialization.cs index 099673f27cc2..d026494660ef 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabResourcePatch.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabResourcePatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabResourcePatch : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(DevTestLabResourcePatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } DevTestLabResourcePatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabScheduleCreationParameter.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabScheduleCreationParameter.Serialization.cs index b7b1c6f64756..ea3e3d11cbc7 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabScheduleCreationParameter.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabScheduleCreationParameter.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabScheduleCreationParameter : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(DevTestLabScheduleCreationParameter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -105,7 +113,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } DevTestLabScheduleCreationParameter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabSchedulePatch.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabSchedulePatch.Serialization.cs index ba35da8386f4..71d7cf382187 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabSchedulePatch.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabSchedulePatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabSchedulePatch : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,34 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(DevTestLabSchedulePatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } DevTestLabSchedulePatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabSecretPatch.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabSecretPatch.Serialization.cs index e63a187b52a8..4a168d91499b 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabSecretPatch.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabSecretPatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabSecretPatch : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,34 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(DevTestLabSecretPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } DevTestLabSecretPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabServiceFabricPatch.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabServiceFabricPatch.Serialization.cs index 09d8e6d77a2f..f6b12c4ce05f 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabServiceFabricPatch.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabServiceFabricPatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabServiceFabricPatch : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,34 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(DevTestLabServiceFabricPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } DevTestLabServiceFabricPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabSubnet.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabSubnet.Serialization.cs index d23e0056f14b..baee32818ec4 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabSubnet.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabSubnet.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabSubnet : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(DevTestLabSubnet)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ResourceId)) { writer.WritePropertyName("resourceId"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } DevTestLabSubnet IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabSubnetOverride.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabSubnetOverride.Serialization.cs index 3cfa602f8647..8ede87e2187c 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabSubnetOverride.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabSubnetOverride.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabSubnetOverride : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(DevTestLabSubnetOverride)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ResourceId)) { writer.WritePropertyName("resourceId"u8); @@ -71,7 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } DevTestLabSubnetOverride IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabSupport.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabSupport.Serialization.cs index 558aa68ec518..8b265005e09c 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabSupport.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabSupport.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabSupport : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(DevTestLabSupport)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Enabled)) { writer.WritePropertyName("enabled"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } DevTestLabSupport IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabTargetCost.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabTargetCost.Serialization.cs index 73fb2eeedaf7..b5744fa42786 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabTargetCost.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabTargetCost.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabTargetCost : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(DevTestLabTargetCost)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Status)) { writer.WritePropertyName("status"u8); @@ -76,7 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } DevTestLabTargetCost IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabUserIdentity.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabUserIdentity.Serialization.cs index ce47a3646e81..9120fe0706f5 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabUserIdentity.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabUserIdentity.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabUserIdentity : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(DevTestLabUserIdentity)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(PrincipalName)) { writer.WritePropertyName("principalName"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } DevTestLabUserIdentity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabUserPatch.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabUserPatch.Serialization.cs index 94e6b5ca256b..a1f8215f4aae 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabUserPatch.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabUserPatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabUserPatch : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,34 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(DevTestLabUserPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } DevTestLabUserPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabUserSecretStore.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabUserSecretStore.Serialization.cs index 16e67a05bcab..696bc9918c1c 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabUserSecretStore.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabUserSecretStore.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabUserSecretStore : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(DevTestLabUserSecretStore)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(KeyVaultUri)) { writer.WritePropertyName("keyVaultUri"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } DevTestLabUserSecretStore IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabVirtualNetworkPatch.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabVirtualNetworkPatch.Serialization.cs index 19b640673654..6fa7fb0396e2 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabVirtualNetworkPatch.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabVirtualNetworkPatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabVirtualNetworkPatch : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,34 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(DevTestLabVirtualNetworkPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } DevTestLabVirtualNetworkPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabVmApplyArtifactsContent.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabVmApplyArtifactsContent.Serialization.cs index 16c5d2e063e3..2a52dc77d7f4 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabVmApplyArtifactsContent.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabVmApplyArtifactsContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabVmApplyArtifactsContent : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(DevTestLabVmApplyArtifactsContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Artifacts)) { writer.WritePropertyName("artifacts"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } DevTestLabVmApplyArtifactsContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabVmCreationContent.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabVmCreationContent.Serialization.cs index 03d57300a675..587b53caa776 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabVmCreationContent.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabVmCreationContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabVmCreationContent : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(DevTestLabVmCreationContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -200,7 +208,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } DevTestLabVmCreationContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabVmDetachDataDiskContent.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabVmDetachDataDiskContent.Serialization.cs index 75df4a0da052..ac4ba166394a 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabVmDetachDataDiskContent.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabVmDetachDataDiskContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabVmDetachDataDiskContent : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(DevTestLabVmDetachDataDiskContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ExistingLabDiskId)) { writer.WritePropertyName("existingLabDiskId"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } DevTestLabVmDetachDataDiskContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabVmPatch.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabVmPatch.Serialization.cs index 9e3c2211c032..caefcb83b766 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabVmPatch.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabVmPatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabVmPatch : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,34 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(DevTestLabVmPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } DevTestLabVmPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabVmResizeContent.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabVmResizeContent.Serialization.cs index aed23431fa73..a7f46a32898e 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabVmResizeContent.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabVmResizeContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabVmResizeContent : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(DevTestLabVmResizeContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Size)) { writer.WritePropertyName("size"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } DevTestLabVmResizeContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabWeekDetails.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabWeekDetails.Serialization.cs index 35eb46577cf0..c2b4bb7c2c7e 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabWeekDetails.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabWeekDetails.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabWeekDetails : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(DevTestLabWeekDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Weekdays)) { writer.WritePropertyName("weekdays"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } DevTestLabWeekDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DiskList.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DiskList.Serialization.cs index 9aaa0a44d5d8..1b5312cb0101 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DiskList.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DiskList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class DiskList : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions throw new FormatException($"The model {nameof(DiskList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions #endif } } - writer.WriteEndObject(); } DiskList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DtlEnvironmentList.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DtlEnvironmentList.Serialization.cs index a073d91fa4ac..6993f7c0534e 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DtlEnvironmentList.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DtlEnvironmentList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class DtlEnvironmentList : IUtf8JsonSerializable, IJsonModel
((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(DtlEnvironmentList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } DtlEnvironmentList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/FormulaList.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/FormulaList.Serialization.cs index fb50cdf4b5d9..0814a5c1793e 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/FormulaList.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/FormulaList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class FormulaList : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio throw new FormatException($"The model {nameof(FormulaList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio #endif } } - writer.WriteEndObject(); } FormulaList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/FormulaPropertiesFromVm.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/FormulaPropertiesFromVm.Serialization.cs index be1333ebda5a..899299e5a3d5 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/FormulaPropertiesFromVm.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/FormulaPropertiesFromVm.Serialization.cs @@ -18,6 +18,15 @@ internal partial class FormulaPropertiesFromVm : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(FormulaPropertiesFromVm)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(LabVmId)) { writer.WritePropertyName("labVmId"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } FormulaPropertiesFromVm IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/GalleryImageList.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/GalleryImageList.Serialization.cs index fecc6f2ea642..ca32d3cb6058 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/GalleryImageList.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/GalleryImageList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class GalleryImageList : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(GalleryImageList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } GalleryImageList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/HourDetails.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/HourDetails.Serialization.cs index 19a116d85726..b6cd8ec8d076 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/HourDetails.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/HourDetails.Serialization.cs @@ -18,6 +18,15 @@ internal partial class HourDetails : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio throw new FormatException($"The model {nameof(HourDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Minute)) { writer.WritePropertyName("minute"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio #endif } } - writer.WriteEndObject(); } HourDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/LabCostSummaryProperties.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/LabCostSummaryProperties.Serialization.cs index 72a7ea84852b..257432f8fee3 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/LabCostSummaryProperties.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/LabCostSummaryProperties.Serialization.cs @@ -18,6 +18,15 @@ internal partial class LabCostSummaryProperties : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(LabCostSummaryProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(EstimatedLabCost)) { writer.WritePropertyName("estimatedLabCost"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } LabCostSummaryProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/LabList.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/LabList.Serialization.cs index 8862bded1b6e..2d4652f4b653 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/LabList.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/LabList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class LabList : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions o throw new FormatException($"The model {nameof(LabList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions o #endif } } - writer.WriteEndObject(); } LabList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/LabVhdList.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/LabVhdList.Serialization.cs index 0d913da624e6..09181a49b55e 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/LabVhdList.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/LabVhdList.Serialization.cs @@ -19,6 +19,15 @@ internal partial class LabVhdList : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOption throw new FormatException($"The model {nameof(LabVhdList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOption #endif } } - writer.WriteEndObject(); } LabVhdList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/LabVmList.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/LabVmList.Serialization.cs index f5bf07c0fff4..9f4929923c5b 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/LabVmList.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/LabVmList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class LabVmList : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions throw new FormatException($"The model {nameof(LabVmList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions #endif } } - writer.WriteEndObject(); } LabVmList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/LinuxOSInfo.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/LinuxOSInfo.Serialization.cs index 71fae48f61db..af7555e0cc68 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/LinuxOSInfo.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/LinuxOSInfo.Serialization.cs @@ -18,6 +18,15 @@ internal partial class LinuxOSInfo : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio throw new FormatException($"The model {nameof(LinuxOSInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(LinuxOSState)) { writer.WritePropertyName("linuxOsState"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio #endif } } - writer.WriteEndObject(); } LinuxOSInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/NotificationChannelList.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/NotificationChannelList.Serialization.cs index 8607a969def8..4067579019a9 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/NotificationChannelList.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/NotificationChannelList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class NotificationChannelList : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(NotificationChannelList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } NotificationChannelList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/PercentageCostThresholdProperties.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/PercentageCostThresholdProperties.Serialization.cs index dd014af900b2..3f5ffad52205 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/PercentageCostThresholdProperties.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/PercentageCostThresholdProperties.Serialization.cs @@ -18,6 +18,15 @@ internal partial class PercentageCostThresholdProperties : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(PercentageCostThresholdProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ThresholdValue)) { writer.WritePropertyName("thresholdValue"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } PercentageCostThresholdProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/PolicyList.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/PolicyList.Serialization.cs index 58dfa622fc50..4bdc83f2d42a 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/PolicyList.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/PolicyList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class PolicyList : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOption throw new FormatException($"The model {nameof(PolicyList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOption #endif } } - writer.WriteEndObject(); } PolicyList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/ScheduleList.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/ScheduleList.Serialization.cs index 4830b76d07c6..425c1c7c641c 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/ScheduleList.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/ScheduleList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ScheduleList : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(ScheduleList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti #endif } } - writer.WriteEndObject(); } ScheduleList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/SecretList.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/SecretList.Serialization.cs index 2e7b54a16125..5a6330255c02 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/SecretList.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/SecretList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class SecretList : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOption throw new FormatException($"The model {nameof(SecretList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOption #endif } } - writer.WriteEndObject(); } SecretList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/ServiceFabricList.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/ServiceFabricList.Serialization.cs index 4ffe83f5b548..d5f82acc6e12 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/ServiceFabricList.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/ServiceFabricList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ServiceFabricList : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(ServiceFabricList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } ServiceFabricList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/SharedPublicIPAddressConfiguration.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/SharedPublicIPAddressConfiguration.Serialization.cs index 8f81be495cf9..abac05777135 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/SharedPublicIPAddressConfiguration.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/SharedPublicIPAddressConfiguration.Serialization.cs @@ -18,6 +18,15 @@ internal partial class SharedPublicIPAddressConfiguration : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(SharedPublicIPAddressConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(InboundNatRules)) { writer.WritePropertyName("inboundNatRules"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } SharedPublicIPAddressConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/SubnetSharedPublicIPAddressConfiguration.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/SubnetSharedPublicIPAddressConfiguration.Serialization.cs index 4eb6afd1cdd0..571a3839bd35 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/SubnetSharedPublicIPAddressConfiguration.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/SubnetSharedPublicIPAddressConfiguration.Serialization.cs @@ -18,6 +18,15 @@ internal partial class SubnetSharedPublicIPAddressConfiguration : IUtf8JsonSeria void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter w throw new FormatException($"The model {nameof(SubnetSharedPublicIPAddressConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(AllowedPorts)) { writer.WritePropertyName("allowedPorts"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter w #endif } } - writer.WriteEndObject(); } SubnetSharedPublicIPAddressConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/UserList.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/UserList.Serialization.cs index 773173999e1e..b9e3c6638374 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/UserList.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/UserList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class UserList : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions throw new FormatException($"The model {nameof(UserList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions #endif } } - writer.WriteEndObject(); } UserList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/VirtualNetworkList.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/VirtualNetworkList.Serialization.cs index e0ada8492617..f34ada3a6435 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/VirtualNetworkList.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/VirtualNetworkList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class VirtualNetworkList : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(VirtualNetworkList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } VirtualNetworkList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/WindowsOSInfo.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/WindowsOSInfo.Serialization.cs index 2d4177f41960..c566fd89237e 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/WindowsOSInfo.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/WindowsOSInfo.Serialization.cs @@ -18,6 +18,15 @@ internal partial class WindowsOSInfo : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt throw new FormatException($"The model {nameof(WindowsOSInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(WindowsOSState)) { writer.WritePropertyName("windowsOsState"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt #endif } } - writer.WriteEndObject(); } WindowsOSInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/autorest.md b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/autorest.md index 12d95d0225ef..b102935df80f 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/autorest.md +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/autorest.md @@ -19,6 +19,7 @@ skip-csproj: true modelerfour: flatten-payloads: false use-model-reader-writer: true +use-write-core: true list-exception: - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/costs/{name} diff --git a/sdk/digitaltwins/Azure.DigitalTwins.Core/samples/DigitalTwinsClientSample/DigitalTwinsClientSample.csproj b/sdk/digitaltwins/Azure.DigitalTwins.Core/samples/DigitalTwinsClientSample/DigitalTwinsClientSample.csproj index 6ccbeae386f9..010cf00ca241 100644 --- a/sdk/digitaltwins/Azure.DigitalTwins.Core/samples/DigitalTwinsClientSample/DigitalTwinsClientSample.csproj +++ b/sdk/digitaltwins/Azure.DigitalTwins.Core/samples/DigitalTwinsClientSample/DigitalTwinsClientSample.csproj @@ -17,7 +17,7 @@ - + diff --git a/sdk/digitaltwins/tests.yml b/sdk/digitaltwins/tests.yml index f75d7c49f83f..e34aeff22e03 100644 --- a/sdk/digitaltwins/tests.yml +++ b/sdk/digitaltwins/tests.yml @@ -1,13 +1,9 @@ trigger: none extends: - template: ../../eng/pipelines/templates/stages/archetype-sdk-tests.yml + template: /eng/pipelines/templates/stages/archetype-sdk-tests.yml parameters: ServiceDirectory: digitaltwins CloudConfig: Public: - ServiceConnection: azure-sdk-tests - SubscriptionConfigurationFilePaths: - - eng/common/TestResources/sub-config/AzurePublicMsft.json Location: westcentralus - Clouds: Public diff --git a/sdk/dns/Azure.ResourceManager.Dns/src/Generated/Extensions/DnsExtensions.cs b/sdk/dns/Azure.ResourceManager.Dns/src/Generated/Extensions/DnsExtensions.cs index 1def7832e4c9..ffdedc373a7e 100644 --- a/sdk/dns/Azure.ResourceManager.Dns/src/Generated/Extensions/DnsExtensions.cs +++ b/sdk/dns/Azure.ResourceManager.Dns/src/Generated/Extensions/DnsExtensions.cs @@ -54,7 +54,7 @@ public static DnssecConfigResource GetDnssecConfigResource(this ArmClient client /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// You can use to create a from its components. /// /// Mocking /// To mock this method, please mock instead. @@ -73,7 +73,7 @@ public static DnsARecordResource GetDnsARecordResource(this ArmClient client, Re /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// You can use to create a from its components. /// /// Mocking /// To mock this method, please mock instead. @@ -92,7 +92,7 @@ public static DnsAaaaRecordResource GetDnsAaaaRecordResource(this ArmClient clie /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// You can use to create a from its components. /// /// Mocking /// To mock this method, please mock instead. @@ -111,7 +111,7 @@ public static DnsCaaRecordResource GetDnsCaaRecordResource(this ArmClient client /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// You can use to create a from its components. /// /// Mocking /// To mock this method, please mock instead. @@ -130,7 +130,7 @@ public static DnsCnameRecordResource GetDnsCnameRecordResource(this ArmClient cl /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// You can use to create a from its components. /// /// Mocking /// To mock this method, please mock instead. @@ -149,7 +149,7 @@ public static DnsMXRecordResource GetDnsMXRecordResource(this ArmClient client, /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// You can use to create a from its components. /// /// Mocking /// To mock this method, please mock instead. @@ -168,7 +168,7 @@ public static DnsNSRecordResource GetDnsNSRecordResource(this ArmClient client, /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// You can use to create a from its components. /// /// Mocking /// To mock this method, please mock instead. @@ -187,7 +187,7 @@ public static DnsPtrRecordResource GetDnsPtrRecordResource(this ArmClient client /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// You can use to create a from its components. /// /// Mocking /// To mock this method, please mock instead. @@ -206,7 +206,7 @@ public static DnsSoaRecordResource GetDnsSoaRecordResource(this ArmClient client /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// You can use to create a from its components. /// /// Mocking /// To mock this method, please mock instead. @@ -225,7 +225,7 @@ public static DnsSrvRecordResource GetDnsSrvRecordResource(this ArmClient client /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// You can use to create a from its components. /// /// Mocking /// To mock this method, please mock instead. @@ -244,7 +244,7 @@ public static DnsTxtRecordResource GetDnsTxtRecordResource(this ArmClient client /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// You can use to create a from its components. /// /// Mocking /// To mock this method, please mock instead. @@ -263,7 +263,7 @@ public static DnsTlsaRecordResource GetDnsTlsaRecordResource(this ArmClient clie /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// You can use to create a from its components. /// /// Mocking /// To mock this method, please mock instead. @@ -282,7 +282,7 @@ public static DnsDSRecordResource GetDnsDSRecordResource(this ArmClient client, /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// You can use to create a from its components. /// /// Mocking /// To mock this method, please mock instead. @@ -301,7 +301,7 @@ public static DnsNaptrRecordResource GetDnsNaptrRecordResource(this ArmClient cl /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// You can use to create a from its components. /// /// Mocking /// To mock this method, please mock instead. diff --git a/sdk/dns/Azure.ResourceManager.Dns/src/Generated/Extensions/MockableDnsArmClient.cs b/sdk/dns/Azure.ResourceManager.Dns/src/Generated/Extensions/MockableDnsArmClient.cs index a9250dc2abbb..f8d35dea3e1f 100644 --- a/sdk/dns/Azure.ResourceManager.Dns/src/Generated/Extensions/MockableDnsArmClient.cs +++ b/sdk/dns/Azure.ResourceManager.Dns/src/Generated/Extensions/MockableDnsArmClient.cs @@ -48,7 +48,7 @@ public virtual DnssecConfigResource GetDnssecConfigResource(ResourceIdentifier i /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// You can use to create a from its components. /// /// The resource ID of the resource to get. /// Returns a object. @@ -60,7 +60,7 @@ public virtual DnsARecordResource GetDnsARecordResource(ResourceIdentifier id) /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// You can use to create a from its components. /// /// The resource ID of the resource to get. /// Returns a object. @@ -72,7 +72,7 @@ public virtual DnsAaaaRecordResource GetDnsAaaaRecordResource(ResourceIdentifier /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// You can use to create a from its components. /// /// The resource ID of the resource to get. /// Returns a object. @@ -84,7 +84,7 @@ public virtual DnsCaaRecordResource GetDnsCaaRecordResource(ResourceIdentifier i /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// You can use to create a from its components. /// /// The resource ID of the resource to get. /// Returns a object. @@ -96,7 +96,7 @@ public virtual DnsCnameRecordResource GetDnsCnameRecordResource(ResourceIdentifi /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// You can use to create a from its components. /// /// The resource ID of the resource to get. /// Returns a object. @@ -108,7 +108,7 @@ public virtual DnsMXRecordResource GetDnsMXRecordResource(ResourceIdentifier id) /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// You can use to create a from its components. /// /// The resource ID of the resource to get. /// Returns a object. @@ -120,7 +120,7 @@ public virtual DnsNSRecordResource GetDnsNSRecordResource(ResourceIdentifier id) /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// You can use to create a from its components. /// /// The resource ID of the resource to get. /// Returns a object. @@ -132,7 +132,7 @@ public virtual DnsPtrRecordResource GetDnsPtrRecordResource(ResourceIdentifier i /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// You can use to create a from its components. /// /// The resource ID of the resource to get. /// Returns a object. @@ -144,7 +144,7 @@ public virtual DnsSoaRecordResource GetDnsSoaRecordResource(ResourceIdentifier i /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// You can use to create a from its components. /// /// The resource ID of the resource to get. /// Returns a object. @@ -156,7 +156,7 @@ public virtual DnsSrvRecordResource GetDnsSrvRecordResource(ResourceIdentifier i /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// You can use to create a from its components. /// /// The resource ID of the resource to get. /// Returns a object. @@ -168,7 +168,7 @@ public virtual DnsTxtRecordResource GetDnsTxtRecordResource(ResourceIdentifier i /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// You can use to create a from its components. /// /// The resource ID of the resource to get. /// Returns a object. @@ -180,7 +180,7 @@ public virtual DnsTlsaRecordResource GetDnsTlsaRecordResource(ResourceIdentifier /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// You can use to create a from its components. /// /// The resource ID of the resource to get. /// Returns a object. @@ -192,7 +192,7 @@ public virtual DnsDSRecordResource GetDnsDSRecordResource(ResourceIdentifier id) /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// You can use to create a from its components. /// /// The resource ID of the resource to get. /// Returns a object. @@ -204,7 +204,7 @@ public virtual DnsNaptrRecordResource GetDnsNaptrRecordResource(ResourceIdentifi /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// You can use to create a from its components. /// /// The resource ID of the resource to get. /// Returns a object. diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/CHANGELOG.md b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/CHANGELOG.md index 7b4c1239ccc9..f36cc628a0df 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/CHANGELOG.md +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/CHANGELOG.md @@ -1,17 +1,16 @@ # Release History -## 1.2.0-beta.1 (Unreleased) +## 1.2.0-beta.1 (2024-10-18) ### Features Added - Enable the new model serialization by using the System.ClientModel, refer this [document](https://aka.ms/azsdk/net/mrw) for more details. - Exposed `JsonModelWriteCore` for model serialization procedure. - -### Breaking Changes - -### Bugs Fixed - -### Other Changes +- Add DNS Security Policy functionality for the following resources: + - DNS Security Policy + - DNS Security Policy Links + - Dns Security Rules + - DNS Resolver Domain Lists ## 1.1.0 (2023-11-27) diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/api/Azure.ResourceManager.DnsResolver.netstandard2.0.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/api/Azure.ResourceManager.DnsResolver.netstandard2.0.cs index 15d9242acc7a..a005ccac78ed 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/api/Azure.ResourceManager.DnsResolver.netstandard2.0.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/api/Azure.ResourceManager.DnsResolver.netstandard2.0.cs @@ -196,6 +196,62 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write 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 DnsResolverDomainListCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected DnsResolverDomainListCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string dnsResolverDomainListName, Azure.ResourceManager.DnsResolver.DnsResolverDomainListData data, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string dnsResolverDomainListName, Azure.ResourceManager.DnsResolver.DnsResolverDomainListData data, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string dnsResolverDomainListName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string dnsResolverDomainListName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string dnsResolverDomainListName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string dnsResolverDomainListName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string dnsResolverDomainListName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string dnsResolverDomainListName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class DnsResolverDomainListData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DnsResolverDomainListData(Azure.Core.AzureLocation location, System.Collections.Generic.IEnumerable domains) { } + public System.Collections.Generic.IList Domains { get { throw null; } } + public Azure.ETag? ETag { get { throw null; } } + public Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState? ProvisioningState { get { throw null; } } + public System.Guid? ResourceGuid { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DnsResolver.DnsResolverDomainListData 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.DnsResolver.DnsResolverDomainListData 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 partial class DnsResolverDomainListResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected DnsResolverDomainListResource() { } + public virtual Azure.ResourceManager.DnsResolver.DnsResolverDomainListData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string dnsResolverDomainListName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + 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.DnsResolver.DnsResolverDomainListData 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.DnsResolver.DnsResolverDomainListData 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.DnsResolver.Models.DnsResolverDomainListPatch patch, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DnsResolver.Models.DnsResolverDomainListPatch patch, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } public static partial class DnsResolverExtensions { public static Azure.ResourceManager.DnsResolver.DnsForwardingRuleResource GetDnsForwardingRuleResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } @@ -208,12 +264,26 @@ public static partial class DnsResolverExtensions public static Azure.ResourceManager.DnsResolver.DnsForwardingRulesetVirtualNetworkLinkResource GetDnsForwardingRulesetVirtualNetworkLinkResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.Response GetDnsResolver(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string dnsResolverName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> GetDnsResolverAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string dnsResolverName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Response GetDnsResolverDomainList(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string dnsResolverDomainListName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetDnsResolverDomainListAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string dnsResolverDomainListName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.DnsResolver.DnsResolverDomainListResource GetDnsResolverDomainListResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.DnsResolver.DnsResolverDomainListCollection GetDnsResolverDomainLists(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetDnsResolverDomainLists(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetDnsResolverDomainListsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.DnsResolver.DnsResolverInboundEndpointResource GetDnsResolverInboundEndpointResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.DnsResolver.DnsResolverOutboundEndpointResource GetDnsResolverOutboundEndpointResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.DnsResolver.DnsResolverPolicyCollection GetDnsResolverPolicies(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetDnsResolverPolicies(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetDnsResolverPoliciesAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Response GetDnsResolverPolicy(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string dnsResolverPolicyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetDnsResolverPolicyAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string dnsResolverPolicyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.DnsResolver.DnsResolverPolicyResource GetDnsResolverPolicyResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.DnsResolver.DnsResolverPolicyVirtualNetworkLinkResource GetDnsResolverPolicyVirtualNetworkLinkResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.DnsResolver.DnsResolverResource GetDnsResolverResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.DnsResolver.DnsResolverCollection GetDnsResolvers(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } public static Azure.Pageable GetDnsResolvers(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.AsyncPageable GetDnsResolversAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.DnsResolver.DnsSecurityRuleResource GetDnsSecurityRuleResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.DnsResolver.VirtualNetworkDnsResolverResource GetVirtualNetworkDnsResolverResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } } public partial class DnsResolverInboundEndpointCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable @@ -328,6 +398,122 @@ protected DnsResolverOutboundEndpointResource() { } public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.DnsResolver.Models.DnsResolverOutboundEndpointPatch patch, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DnsResolver.Models.DnsResolverOutboundEndpointPatch patch, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } + public partial class DnsResolverPolicyCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected DnsResolverPolicyCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string dnsResolverPolicyName, Azure.ResourceManager.DnsResolver.DnsResolverPolicyData data, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string dnsResolverPolicyName, Azure.ResourceManager.DnsResolver.DnsResolverPolicyData data, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string dnsResolverPolicyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string dnsResolverPolicyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string dnsResolverPolicyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string dnsResolverPolicyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string dnsResolverPolicyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string dnsResolverPolicyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class DnsResolverPolicyData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DnsResolverPolicyData(Azure.Core.AzureLocation location) { } + public Azure.ETag? ETag { get { throw null; } } + public Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState? ProvisioningState { get { throw null; } } + public System.Guid? ResourceGuid { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DnsResolver.DnsResolverPolicyData 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.DnsResolver.DnsResolverPolicyData 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 partial class DnsResolverPolicyResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected DnsResolverPolicyResource() { } + public virtual Azure.ResourceManager.DnsResolver.DnsResolverPolicyData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string dnsResolverPolicyName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetDnsResolverPolicyVirtualNetworkLink(string dnsResolverPolicyVirtualNetworkLinkName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDnsResolverPolicyVirtualNetworkLinkAsync(string dnsResolverPolicyVirtualNetworkLinkName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.DnsResolver.DnsResolverPolicyVirtualNetworkLinkCollection GetDnsResolverPolicyVirtualNetworkLinks() { throw null; } + public virtual Azure.Response GetDnsSecurityRule(string dnsSecurityRuleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDnsSecurityRuleAsync(string dnsSecurityRuleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.DnsResolver.DnsSecurityRuleCollection GetDnsSecurityRules() { throw null; } + public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + 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.DnsResolver.DnsResolverPolicyData 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.DnsResolver.DnsResolverPolicyData 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.DnsResolver.Models.DnsResolverPolicyPatch patch, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DnsResolver.Models.DnsResolverPolicyPatch patch, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class DnsResolverPolicyVirtualNetworkLinkCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected DnsResolverPolicyVirtualNetworkLinkCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string dnsResolverPolicyVirtualNetworkLinkName, Azure.ResourceManager.DnsResolver.DnsResolverPolicyVirtualNetworkLinkData data, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string dnsResolverPolicyVirtualNetworkLinkName, Azure.ResourceManager.DnsResolver.DnsResolverPolicyVirtualNetworkLinkData data, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string dnsResolverPolicyVirtualNetworkLinkName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string dnsResolverPolicyVirtualNetworkLinkName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string dnsResolverPolicyVirtualNetworkLinkName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string dnsResolverPolicyVirtualNetworkLinkName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string dnsResolverPolicyVirtualNetworkLinkName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string dnsResolverPolicyVirtualNetworkLinkName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class DnsResolverPolicyVirtualNetworkLinkData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DnsResolverPolicyVirtualNetworkLinkData(Azure.Core.AzureLocation location, Azure.ResourceManager.Resources.Models.WritableSubResource virtualNetwork) { } + public Azure.ETag? ETag { get { throw null; } } + public Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState? ProvisioningState { get { throw null; } } + public Azure.Core.ResourceIdentifier VirtualNetworkId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DnsResolver.DnsResolverPolicyVirtualNetworkLinkData 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.DnsResolver.DnsResolverPolicyVirtualNetworkLinkData 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 partial class DnsResolverPolicyVirtualNetworkLinkResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected DnsResolverPolicyVirtualNetworkLinkResource() { } + public virtual Azure.ResourceManager.DnsResolver.DnsResolverPolicyVirtualNetworkLinkData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string dnsResolverPolicyName, string dnsResolverPolicyVirtualNetworkLinkName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + 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.DnsResolver.DnsResolverPolicyVirtualNetworkLinkData 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.DnsResolver.DnsResolverPolicyVirtualNetworkLinkData 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.DnsResolver.Models.DnsResolverPolicyVirtualNetworkLinkPatch patch, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DnsResolver.Models.DnsResolverPolicyVirtualNetworkLinkPatch patch, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } public partial class DnsResolverResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public static readonly Azure.Core.ResourceType ResourceType; @@ -359,12 +545,72 @@ protected DnsResolverResource() { } public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.DnsResolver.Models.DnsResolverPatch patch, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DnsResolver.Models.DnsResolverPatch patch, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } + public partial class DnsSecurityRuleCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected DnsSecurityRuleCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string dnsSecurityRuleName, Azure.ResourceManager.DnsResolver.DnsSecurityRuleData data, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string dnsSecurityRuleName, Azure.ResourceManager.DnsResolver.DnsSecurityRuleData data, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string dnsSecurityRuleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string dnsSecurityRuleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string dnsSecurityRuleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string dnsSecurityRuleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string dnsSecurityRuleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string dnsSecurityRuleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class DnsSecurityRuleData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DnsSecurityRuleData(Azure.Core.AzureLocation location, int priority, Azure.ResourceManager.DnsResolver.Models.DnsSecurityRuleAction action, System.Collections.Generic.IEnumerable dnsResolverDomainLists) { } + public Azure.ResourceManager.DnsResolver.Models.DnsSecurityRuleAction Action { get { throw null; } set { } } + public System.Collections.Generic.IList DnsResolverDomainLists { get { throw null; } } + public Azure.ResourceManager.DnsResolver.Models.DnsSecurityRuleState? DnsSecurityRuleState { get { throw null; } set { } } + public Azure.ETag? ETag { get { throw null; } } + public int Priority { get { throw null; } set { } } + public Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DnsResolver.DnsSecurityRuleData 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.DnsResolver.DnsSecurityRuleData 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 partial class DnsSecurityRuleResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected DnsSecurityRuleResource() { } + public virtual Azure.ResourceManager.DnsResolver.DnsSecurityRuleData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string dnsResolverPolicyName, string dnsSecurityRuleName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + 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.DnsResolver.DnsSecurityRuleData 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.DnsResolver.DnsSecurityRuleData 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.DnsResolver.Models.DnsSecurityRulePatch patch, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DnsResolver.Models.DnsSecurityRulePatch patch, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } public partial class VirtualNetworkDnsResolverResource : Azure.ResourceManager.ArmResource { public static readonly Azure.Core.ResourceType ResourceType; protected VirtualNetworkDnsResolverResource() { } public virtual Azure.Pageable GetDnsForwardingRulesets(int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetDnsForwardingRulesetsAsync(int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetDnsResolverPoliciesByVirtualNetwork(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetDnsResolverPoliciesByVirtualNetworkAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetDnsResolvers(int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetDnsResolversAsync(int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } @@ -377,9 +623,13 @@ protected MockableDnsResolverArmClient() { } public virtual Azure.ResourceManager.DnsResolver.DnsForwardingRuleResource GetDnsForwardingRuleResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.DnsResolver.DnsForwardingRulesetResource GetDnsForwardingRulesetResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.DnsResolver.DnsForwardingRulesetVirtualNetworkLinkResource GetDnsForwardingRulesetVirtualNetworkLinkResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.DnsResolver.DnsResolverDomainListResource GetDnsResolverDomainListResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.DnsResolver.DnsResolverInboundEndpointResource GetDnsResolverInboundEndpointResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.DnsResolver.DnsResolverOutboundEndpointResource GetDnsResolverOutboundEndpointResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.DnsResolver.DnsResolverPolicyResource GetDnsResolverPolicyResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.DnsResolver.DnsResolverPolicyVirtualNetworkLinkResource GetDnsResolverPolicyVirtualNetworkLinkResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.DnsResolver.DnsResolverResource GetDnsResolverResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.DnsResolver.DnsSecurityRuleResource GetDnsSecurityRuleResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.DnsResolver.VirtualNetworkDnsResolverResource GetVirtualNetworkDnsResolverResource(Azure.Core.ResourceIdentifier id) { throw null; } } public partial class MockableDnsResolverResourceGroupResource : Azure.ResourceManager.ArmResource @@ -390,6 +640,12 @@ protected MockableDnsResolverResourceGroupResource() { } public virtual Azure.ResourceManager.DnsResolver.DnsForwardingRulesetCollection GetDnsForwardingRulesets() { throw null; } public virtual Azure.Response GetDnsResolver(string dnsResolverName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetDnsResolverAsync(string dnsResolverName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetDnsResolverDomainList(string dnsResolverDomainListName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDnsResolverDomainListAsync(string dnsResolverDomainListName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.DnsResolver.DnsResolverDomainListCollection GetDnsResolverDomainLists() { throw null; } + public virtual Azure.ResourceManager.DnsResolver.DnsResolverPolicyCollection GetDnsResolverPolicies() { throw null; } + public virtual Azure.Response GetDnsResolverPolicy(string dnsResolverPolicyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDnsResolverPolicyAsync(string dnsResolverPolicyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.DnsResolver.DnsResolverCollection GetDnsResolvers() { throw null; } } public partial class MockableDnsResolverSubscriptionResource : Azure.ResourceManager.ArmResource @@ -397,6 +653,10 @@ public partial class MockableDnsResolverSubscriptionResource : Azure.ResourceMan protected MockableDnsResolverSubscriptionResource() { } public virtual Azure.Pageable GetDnsForwardingRulesets(int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetDnsForwardingRulesetsAsync(int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetDnsResolverDomainLists(int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetDnsResolverDomainListsAsync(int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetDnsResolverPolicies(int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetDnsResolverPoliciesAsync(int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetDnsResolvers(int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetDnsResolversAsync(int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } @@ -409,10 +669,31 @@ public static partial class ArmDnsResolverModelFactory public static Azure.ResourceManager.DnsResolver.DnsForwardingRulesetData DnsForwardingRulesetData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ETag? etag = default(Azure.ETag?), System.Collections.Generic.IEnumerable dnsResolverOutboundEndpoints = null, Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState? provisioningState = default(Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState?), System.Guid? resourceGuid = default(System.Guid?)) { throw null; } public static Azure.ResourceManager.DnsResolver.DnsForwardingRulesetVirtualNetworkLinkData DnsForwardingRulesetVirtualNetworkLinkData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ETag? etag = default(Azure.ETag?), Azure.Core.ResourceIdentifier virtualNetworkId = null, System.Collections.Generic.IDictionary metadata = null, Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState? provisioningState = default(Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState?)) { throw null; } public static Azure.ResourceManager.DnsResolver.DnsResolverData DnsResolverData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ETag? etag = default(Azure.ETag?), Azure.Core.ResourceIdentifier virtualNetworkId = null, Azure.ResourceManager.DnsResolver.Models.DnsResolverState? dnsResolverState = default(Azure.ResourceManager.DnsResolver.Models.DnsResolverState?), Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState? provisioningState = default(Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState?), System.Guid? resourceGuid = default(System.Guid?)) { throw null; } + public static Azure.ResourceManager.DnsResolver.DnsResolverDomainListData DnsResolverDomainListData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ETag? etag = default(Azure.ETag?), System.Collections.Generic.IEnumerable domains = null, Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState? provisioningState = default(Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState?), System.Guid? resourceGuid = default(System.Guid?)) { throw null; } public static Azure.ResourceManager.DnsResolver.DnsResolverInboundEndpointData DnsResolverInboundEndpointData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ETag? etag = default(Azure.ETag?), System.Collections.Generic.IEnumerable ipConfigurations = null, Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState? provisioningState = default(Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState?), System.Guid? resourceGuid = default(System.Guid?)) { throw null; } public static Azure.ResourceManager.DnsResolver.DnsResolverOutboundEndpointData DnsResolverOutboundEndpointData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ETag? etag = default(Azure.ETag?), Azure.Core.ResourceIdentifier subnetId = null, Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState? provisioningState = default(Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState?), System.Guid? resourceGuid = default(System.Guid?)) { throw null; } + public static Azure.ResourceManager.DnsResolver.DnsResolverPolicyData DnsResolverPolicyData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ETag? etag = default(Azure.ETag?), Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState? provisioningState = default(Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState?), System.Guid? resourceGuid = default(System.Guid?)) { throw null; } + public static Azure.ResourceManager.DnsResolver.DnsResolverPolicyVirtualNetworkLinkData DnsResolverPolicyVirtualNetworkLinkData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ETag? etag = default(Azure.ETag?), Azure.Core.ResourceIdentifier virtualNetworkId = null, Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState? provisioningState = default(Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState?)) { throw null; } + public static Azure.ResourceManager.DnsResolver.DnsSecurityRuleData DnsSecurityRuleData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ETag? etag = default(Azure.ETag?), int priority = 0, Azure.ResourceManager.DnsResolver.Models.DnsSecurityRuleAction action = null, System.Collections.Generic.IEnumerable dnsResolverDomainLists = null, Azure.ResourceManager.DnsResolver.Models.DnsSecurityRuleState? dnsSecurityRuleState = default(Azure.ResourceManager.DnsResolver.Models.DnsSecurityRuleState?), Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState? provisioningState = default(Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState?)) { throw null; } public static Azure.ResourceManager.DnsResolver.Models.VirtualNetworkDnsForwardingRuleset VirtualNetworkDnsForwardingRuleset(Azure.Core.ResourceIdentifier id = null, Azure.Core.ResourceIdentifier virtualNetworkLinkId = null) { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct BlockResponseCode : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public BlockResponseCode(string value) { throw null; } + public static Azure.ResourceManager.DnsResolver.Models.BlockResponseCode Servfail { get { throw null; } } + public bool Equals(Azure.ResourceManager.DnsResolver.Models.BlockResponseCode other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.DnsResolver.Models.BlockResponseCode left, Azure.ResourceManager.DnsResolver.Models.BlockResponseCode right) { throw null; } + public static implicit operator Azure.ResourceManager.DnsResolver.Models.BlockResponseCode (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DnsResolver.Models.BlockResponseCode left, Azure.ResourceManager.DnsResolver.Models.BlockResponseCode right) { throw null; } + public override string ToString() { throw null; } + } public partial class DnsForwardingRulePatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DnsForwardingRulePatch() { } @@ -467,6 +748,18 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.DnsResolver.Models.DnsForwardingRuleState left, Azure.ResourceManager.DnsResolver.Models.DnsForwardingRuleState right) { throw null; } public override string ToString() { throw null; } } + public partial class DnsResolverDomainListPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DnsResolverDomainListPatch() { } + public System.Collections.Generic.IList Domains { get { throw null; } } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DnsResolver.Models.DnsResolverDomainListPatch 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.DnsResolver.Models.DnsResolverDomainListPatch 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 partial class DnsResolverInboundEndpointPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DnsResolverInboundEndpointPatch() { } @@ -500,6 +793,28 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer 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 DnsResolverPolicyPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DnsResolverPolicyPatch() { } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DnsResolver.Models.DnsResolverPolicyPatch 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.DnsResolver.Models.DnsResolverPolicyPatch 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 partial class DnsResolverPolicyVirtualNetworkLinkPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DnsResolverPolicyVirtualNetworkLinkPatch() { } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DnsResolver.Models.DnsResolverPolicyVirtualNetworkLinkPatch 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.DnsResolver.Models.DnsResolverPolicyVirtualNetworkLinkPatch 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; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct DnsResolverProvisioningState : System.IEquatable { @@ -540,6 +855,70 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.DnsResolver.Models.DnsResolverState left, Azure.ResourceManager.DnsResolver.Models.DnsResolverState right) { throw null; } public override string ToString() { throw null; } } + public partial class DnsSecurityRuleAction : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DnsSecurityRuleAction() { } + public Azure.ResourceManager.DnsResolver.Models.DnsSecurityRuleActionType? ActionType { get { throw null; } set { } } + public Azure.ResourceManager.DnsResolver.Models.BlockResponseCode? BlockResponseCode { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DnsResolver.Models.DnsSecurityRuleAction 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.DnsResolver.Models.DnsSecurityRuleAction 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; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DnsSecurityRuleActionType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DnsSecurityRuleActionType(string value) { throw null; } + public static Azure.ResourceManager.DnsResolver.Models.DnsSecurityRuleActionType Alert { get { throw null; } } + public static Azure.ResourceManager.DnsResolver.Models.DnsSecurityRuleActionType Allow { get { throw null; } } + public static Azure.ResourceManager.DnsResolver.Models.DnsSecurityRuleActionType Block { get { throw null; } } + public bool Equals(Azure.ResourceManager.DnsResolver.Models.DnsSecurityRuleActionType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.DnsResolver.Models.DnsSecurityRuleActionType left, Azure.ResourceManager.DnsResolver.Models.DnsSecurityRuleActionType right) { throw null; } + public static implicit operator Azure.ResourceManager.DnsResolver.Models.DnsSecurityRuleActionType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DnsResolver.Models.DnsSecurityRuleActionType left, Azure.ResourceManager.DnsResolver.Models.DnsSecurityRuleActionType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class DnsSecurityRulePatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DnsSecurityRulePatch() { } + public Azure.ResourceManager.DnsResolver.Models.DnsSecurityRuleAction Action { get { throw null; } set { } } + public System.Collections.Generic.IList DnsResolverDomainLists { get { throw null; } } + public Azure.ResourceManager.DnsResolver.Models.DnsSecurityRuleState? DnsSecurityRuleState { get { throw null; } set { } } + public int? Priority { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DnsResolver.Models.DnsSecurityRulePatch 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.DnsResolver.Models.DnsSecurityRulePatch 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; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DnsSecurityRuleState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DnsSecurityRuleState(string value) { throw null; } + public static Azure.ResourceManager.DnsResolver.Models.DnsSecurityRuleState Disabled { get { throw null; } } + public static Azure.ResourceManager.DnsResolver.Models.DnsSecurityRuleState Enabled { get { throw null; } } + public bool Equals(Azure.ResourceManager.DnsResolver.Models.DnsSecurityRuleState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.DnsResolver.Models.DnsSecurityRuleState left, Azure.ResourceManager.DnsResolver.Models.DnsSecurityRuleState right) { throw null; } + public static implicit operator Azure.ResourceManager.DnsResolver.Models.DnsSecurityRuleState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DnsResolver.Models.DnsSecurityRuleState left, Azure.ResourceManager.DnsResolver.Models.DnsSecurityRuleState right) { throw null; } + public override string ToString() { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct InboundEndpointIPAllocationMethod : System.IEquatable { diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/assets.json b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/assets.json index 2a3e7214b4c3..afed3d8d1bd5 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/assets.json +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/dnsresolver/Azure.ResourceManager.DnsResolver", - "Tag": "net/dnsresolver/Azure.ResourceManager.DnsResolver_fc065926f5" + "Tag": "net/dnsresolver/Azure.ResourceManager.DnsResolver_24b7185c51" } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/ArmDnsResolverModelFactory.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/ArmDnsResolverModelFactory.cs index 20baf4eaf477..36d2fc4a724d 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/ArmDnsResolverModelFactory.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/ArmDnsResolverModelFactory.cs @@ -206,5 +206,127 @@ public static VirtualNetworkDnsForwardingRuleset VirtualNetworkDnsForwardingRule { return new VirtualNetworkDnsForwardingRuleset(id, virtualNetworkLinkId != null ? ResourceManagerModelFactory.WritableSubResource(virtualNetworkLinkId) : null, serializedAdditionalRawData: null); } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// ETag of the DNS resolver policy. + /// The current provisioning state of the DNS resolver policy. This is a read-only property and any attempt to set this value will be ignored. + /// The resourceGuid property of the DNS resolver policy resource. + /// A new instance for mocking. + public static DnsResolverPolicyData DnsResolverPolicyData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ETag? etag = null, DnsResolverProvisioningState? provisioningState = null, Guid? resourceGuid = null) + { + tags ??= new Dictionary(); + + return new DnsResolverPolicyData( + id, + name, + resourceType, + systemData, + tags, + location, + etag, + provisioningState, + resourceGuid, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// ETag of the DNS security rule. + /// The priority of the DNS security rule. + /// The action to take on DNS requests that match the DNS security rule. + /// DNS resolver policy domains lists that the DNS security rule applies to. + /// The state of DNS security rule. + /// The current provisioning state of the DNS security rule. This is a read-only property and any attempt to set this value will be ignored. + /// A new instance for mocking. + public static DnsSecurityRuleData DnsSecurityRuleData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ETag? etag = null, int priority = default, DnsSecurityRuleAction action = null, IEnumerable dnsResolverDomainLists = null, DnsSecurityRuleState? dnsSecurityRuleState = null, DnsResolverProvisioningState? provisioningState = null) + { + tags ??= new Dictionary(); + dnsResolverDomainLists ??= new List(); + + return new DnsSecurityRuleData( + id, + name, + resourceType, + systemData, + tags, + location, + etag, + priority, + action, + dnsResolverDomainLists?.ToList(), + dnsSecurityRuleState, + provisioningState, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// ETag of the DNS resolver policy virtual network link. + /// The reference to the virtual network. This cannot be changed after creation. + /// The current provisioning state of the DNS resolver policy virtual network link. This is a read-only property and any attempt to set this value will be ignored. + /// A new instance for mocking. + public static DnsResolverPolicyVirtualNetworkLinkData DnsResolverPolicyVirtualNetworkLinkData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ETag? etag = null, ResourceIdentifier virtualNetworkId = null, DnsResolverProvisioningState? provisioningState = null) + { + tags ??= new Dictionary(); + + return new DnsResolverPolicyVirtualNetworkLinkData( + id, + name, + resourceType, + systemData, + tags, + location, + etag, + virtualNetworkId != null ? ResourceManagerModelFactory.WritableSubResource(virtualNetworkId) : null, + provisioningState, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// ETag of the DNS resolver domain list. + /// The domains in the domain list. + /// The current provisioning state of the DNS resolver domain list. This is a read-only property and any attempt to set this value will be ignored. + /// The resourceGuid property of the DNS resolver domain list resource. + /// A new instance for mocking. + public static DnsResolverDomainListData DnsResolverDomainListData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ETag? etag = null, IEnumerable domains = null, DnsResolverProvisioningState? provisioningState = null, Guid? resourceGuid = null) + { + tags ??= new Dictionary(); + domains ??= new List(); + + return new DnsResolverDomainListData( + id, + name, + resourceType, + systemData, + tags, + location, + etag, + domains?.ToList(), + provisioningState, + resourceGuid, + serializedAdditionalRawData: null); + } } } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRuleCollection.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRuleCollection.cs index 38cf093d20dc..266f58828707 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRuleCollection.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRuleCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -117,7 +117,7 @@ public virtual async Task> CreateOrUpdat /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -170,7 +170,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -215,7 +215,7 @@ public virtual async Task> GetAsync(string f /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -260,7 +260,7 @@ public virtual Response Get(string forwardingRuleName /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -291,7 +291,7 @@ public virtual AsyncPageable GetAllAsync(int? top = n /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -322,7 +322,7 @@ public virtual Pageable GetAll(int? top = null, Cance /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -365,7 +365,7 @@ public virtual async Task> ExistsAsync(string forwardingRuleName, /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -408,7 +408,7 @@ public virtual Response Exists(string forwardingRuleName, CancellationToke /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -453,7 +453,7 @@ public virtual async Task> GetIfExis /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRuleResource.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRuleResource.cs index 255d66a37496..ffb498cb8c03 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRuleResource.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRuleResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Cancella /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken cancell /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, string /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -272,7 +272,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, string ifMatch = null, C /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -315,7 +315,7 @@ public virtual async Task> UpdateAsync(DnsFo /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRulesetCollection.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRulesetCollection.cs index 35d55eb3b0a1..3d9789adba84 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRulesetCollection.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRulesetCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task> CreateOrUp /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -167,7 +167,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUnt /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -212,7 +212,7 @@ public virtual async Task> GetAsync(strin /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -257,7 +257,7 @@ public virtual Response Get(string rulesetName, Ca /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -288,7 +288,7 @@ public virtual AsyncPageable GetAllAsync(int? top /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -319,7 +319,7 @@ public virtual Pageable GetAll(int? top = null, Ca /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -362,7 +362,7 @@ public virtual async Task> ExistsAsync(string rulesetName, Cancel /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -405,7 +405,7 @@ public virtual Response Exists(string rulesetName, CancellationToken cance /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -450,7 +450,7 @@ public virtual async Task> GetIfE /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRulesetResource.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRulesetResource.cs index 8cf88a71468b..d0dbc6c3e84d 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRulesetResource.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRulesetResource.cs @@ -110,7 +110,7 @@ public virtual DnsForwardingRuleCollection GetDnsForwardingRules() /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetDnsForwardingR /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -179,7 +179,7 @@ public virtual DnsForwardingRulesetVirtualNetworkLinkCollection GetDnsForwarding /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -210,7 +210,7 @@ public virtual async Task /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -241,7 +241,7 @@ public virtual Response GetDnsFo /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -281,7 +281,7 @@ public virtual async Task> GetAsync(Cance /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -321,7 +321,7 @@ public virtual Response Get(CancellationToken canc /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -364,7 +364,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, string /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -407,7 +407,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, string ifMatch = null, C /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -454,7 +454,7 @@ public virtual async Task> UpdateAsyn /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -501,7 +501,7 @@ public virtual ArmOperation Update(WaitUntil waitU /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -563,7 +563,7 @@ public virtual async Task> AddTagAsync(st /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -625,7 +625,7 @@ public virtual Response AddTag(string key, string /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -682,7 +682,7 @@ public virtual async Task> SetTagsAsync(I /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -739,7 +739,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -799,7 +799,7 @@ public virtual async Task> RemoveTagAsync /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRulesetVirtualNetworkLinkCollection.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRulesetVirtualNetworkLinkCollection.cs index cfa028473172..0c410059b1e1 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRulesetVirtualNetworkLinkCollection.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRulesetVirtualNetworkLinkCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation Crea /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(stri /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -287,7 +287,7 @@ public virtual AsyncPageable Get /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -318,7 +318,7 @@ public virtual Pageable GetAll(i /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -361,7 +361,7 @@ public virtual async Task> ExistsAsync(string virtualNetworkLinkN /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -404,7 +404,7 @@ public virtual Response Exists(string virtualNetworkLinkName, Cancellation /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -449,7 +449,7 @@ public virtual async Task /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRulesetVirtualNetworkLinkResource.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRulesetVirtualNetworkLinkResource.cs index b9f576b570e7..8fb7d95eea61 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRulesetVirtualNetworkLinkResource.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRulesetVirtualNetworkLinkResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(Canc /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, string /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -268,7 +268,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, string ifMatch = null, C /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -315,7 +315,7 @@ public virtual async Task /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverCollection.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverCollection.cs index 3ed1b2761c73..9e47260b6d33 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverCollection.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task> CreateOrUpdateAsync /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -167,7 +167,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUn /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -212,7 +212,7 @@ public virtual async Task> GetAsync(string dnsReso /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -257,7 +257,7 @@ public virtual Response Get(string dnsResolverName, Cancell /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -288,7 +288,7 @@ public virtual AsyncPageable GetAllAsync(int? top = null, C /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -319,7 +319,7 @@ public virtual Pageable GetAll(int? top = null, Cancellatio /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -362,7 +362,7 @@ public virtual async Task> ExistsAsync(string dnsResolverName, Ca /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -405,7 +405,7 @@ public virtual Response Exists(string dnsResolverName, CancellationToken c /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -450,7 +450,7 @@ public virtual async Task> GetIfExistsAsyn /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverDomainListCollection.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverDomainListCollection.cs new file mode 100644 index 000000000000..6bd5bc5f2eea --- /dev/null +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverDomainListCollection.cs @@ -0,0 +1,500 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.DnsResolver +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetDnsResolverDomainLists method from an instance of . + /// + public partial class DnsResolverDomainListCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _dnsResolverDomainListClientDiagnostics; + private readonly DnsResolverDomainListsRestOperations _dnsResolverDomainListRestClient; + + /// Initializes a new instance of the class for mocking. + protected DnsResolverDomainListCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal DnsResolverDomainListCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _dnsResolverDomainListClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DnsResolver", DnsResolverDomainListResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(DnsResolverDomainListResource.ResourceType, out string dnsResolverDomainListApiVersion); + _dnsResolverDomainListRestClient = new DnsResolverDomainListsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dnsResolverDomainListApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceGroupResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceGroupResource.ResourceType), nameof(id)); + } + + /// + /// Creates or updates a DNS resolver domain list. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverDomainLists/{dnsResolverDomainListName} + /// + /// + /// Operation Id + /// DnsResolverDomainLists_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2023-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the DNS resolver domain list. + /// Parameters supplied to the CreateOrUpdate operation. + /// ETag of the resource. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting any concurrent changes. + /// Set to '*' to allow a new resource to be created, but to prevent updating an existing resource. Other values will be ignored. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string dnsResolverDomainListName, DnsResolverDomainListData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(dnsResolverDomainListName, nameof(dnsResolverDomainListName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _dnsResolverDomainListClientDiagnostics.CreateScope("DnsResolverDomainListCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _dnsResolverDomainListRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, dnsResolverDomainListName, data, ifMatch, ifNoneMatch, cancellationToken).ConfigureAwait(false); + var operation = new DnsResolverArmOperation(new DnsResolverDomainListOperationSource(Client), _dnsResolverDomainListClientDiagnostics, Pipeline, _dnsResolverDomainListRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, dnsResolverDomainListName, data, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or updates a DNS resolver domain list. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverDomainLists/{dnsResolverDomainListName} + /// + /// + /// Operation Id + /// DnsResolverDomainLists_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2023-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the DNS resolver domain list. + /// Parameters supplied to the CreateOrUpdate operation. + /// ETag of the resource. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting any concurrent changes. + /// Set to '*' to allow a new resource to be created, but to prevent updating an existing resource. Other values will be ignored. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string dnsResolverDomainListName, DnsResolverDomainListData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(dnsResolverDomainListName, nameof(dnsResolverDomainListName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _dnsResolverDomainListClientDiagnostics.CreateScope("DnsResolverDomainListCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _dnsResolverDomainListRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, dnsResolverDomainListName, data, ifMatch, ifNoneMatch, cancellationToken); + var operation = new DnsResolverArmOperation(new DnsResolverDomainListOperationSource(Client), _dnsResolverDomainListClientDiagnostics, Pipeline, _dnsResolverDomainListRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, dnsResolverDomainListName, data, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets properties of a DNS resolver domain list. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverDomainLists/{dnsResolverDomainListName} + /// + /// + /// Operation Id + /// DnsResolverDomainLists_Get + /// + /// + /// Default Api Version + /// 2023-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the DNS resolver domain list. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string dnsResolverDomainListName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(dnsResolverDomainListName, nameof(dnsResolverDomainListName)); + + using var scope = _dnsResolverDomainListClientDiagnostics.CreateScope("DnsResolverDomainListCollection.Get"); + scope.Start(); + try + { + var response = await _dnsResolverDomainListRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, dnsResolverDomainListName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DnsResolverDomainListResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets properties of a DNS resolver domain list. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverDomainLists/{dnsResolverDomainListName} + /// + /// + /// Operation Id + /// DnsResolverDomainLists_Get + /// + /// + /// Default Api Version + /// 2023-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the DNS resolver domain list. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string dnsResolverDomainListName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(dnsResolverDomainListName, nameof(dnsResolverDomainListName)); + + using var scope = _dnsResolverDomainListClientDiagnostics.CreateScope("DnsResolverDomainListCollection.Get"); + scope.Start(); + try + { + var response = _dnsResolverDomainListRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, dnsResolverDomainListName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DnsResolverDomainListResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Lists DNS resolver domain lists within a resource group. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverDomainLists + /// + /// + /// Operation Id + /// DnsResolverDomainLists_ListByResourceGroup + /// + /// + /// Default Api Version + /// 2023-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The maximum number of results to return. If not specified, returns up to 100 results. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(int? top = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _dnsResolverDomainListRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName, top); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dnsResolverDomainListRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, top); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DnsResolverDomainListResource(Client, DnsResolverDomainListData.DeserializeDnsResolverDomainListData(e)), _dnsResolverDomainListClientDiagnostics, Pipeline, "DnsResolverDomainListCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Lists DNS resolver domain lists within a resource group. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverDomainLists + /// + /// + /// Operation Id + /// DnsResolverDomainLists_ListByResourceGroup + /// + /// + /// Default Api Version + /// 2023-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The maximum number of results to return. If not specified, returns up to 100 results. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(int? top = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _dnsResolverDomainListRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName, top); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dnsResolverDomainListRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, top); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DnsResolverDomainListResource(Client, DnsResolverDomainListData.DeserializeDnsResolverDomainListData(e)), _dnsResolverDomainListClientDiagnostics, Pipeline, "DnsResolverDomainListCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverDomainLists/{dnsResolverDomainListName} + /// + /// + /// Operation Id + /// DnsResolverDomainLists_Get + /// + /// + /// Default Api Version + /// 2023-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the DNS resolver domain list. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string dnsResolverDomainListName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(dnsResolverDomainListName, nameof(dnsResolverDomainListName)); + + using var scope = _dnsResolverDomainListClientDiagnostics.CreateScope("DnsResolverDomainListCollection.Exists"); + scope.Start(); + try + { + var response = await _dnsResolverDomainListRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, dnsResolverDomainListName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverDomainLists/{dnsResolverDomainListName} + /// + /// + /// Operation Id + /// DnsResolverDomainLists_Get + /// + /// + /// Default Api Version + /// 2023-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the DNS resolver domain list. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string dnsResolverDomainListName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(dnsResolverDomainListName, nameof(dnsResolverDomainListName)); + + using var scope = _dnsResolverDomainListClientDiagnostics.CreateScope("DnsResolverDomainListCollection.Exists"); + scope.Start(); + try + { + var response = _dnsResolverDomainListRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, dnsResolverDomainListName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverDomainLists/{dnsResolverDomainListName} + /// + /// + /// Operation Id + /// DnsResolverDomainLists_Get + /// + /// + /// Default Api Version + /// 2023-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the DNS resolver domain list. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string dnsResolverDomainListName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(dnsResolverDomainListName, nameof(dnsResolverDomainListName)); + + using var scope = _dnsResolverDomainListClientDiagnostics.CreateScope("DnsResolverDomainListCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _dnsResolverDomainListRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, dnsResolverDomainListName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new DnsResolverDomainListResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverDomainLists/{dnsResolverDomainListName} + /// + /// + /// Operation Id + /// DnsResolverDomainLists_Get + /// + /// + /// Default Api Version + /// 2023-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the DNS resolver domain list. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string dnsResolverDomainListName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(dnsResolverDomainListName, nameof(dnsResolverDomainListName)); + + using var scope = _dnsResolverDomainListClientDiagnostics.CreateScope("DnsResolverDomainListCollection.GetIfExists"); + scope.Start(); + try + { + var response = _dnsResolverDomainListRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, dnsResolverDomainListName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new DnsResolverDomainListResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverDomainListData.Serialization.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverDomainListData.Serialization.cs new file mode 100644 index 000000000000..37ea80af12ba --- /dev/null +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverDomainListData.Serialization.cs @@ -0,0 +1,244 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.DnsResolver.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.DnsResolver +{ + public partial class DnsResolverDomainListData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DnsResolverDomainListData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (options.Format != "W" && Optional.IsDefined(ETag)) + { + writer.WritePropertyName("etag"u8); + writer.WriteStringValue(ETag.Value.ToString()); + } + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + writer.WritePropertyName("domains"u8); + writer.WriteStartArray(); + foreach (var item in Domains) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(ResourceGuid)) + { + writer.WritePropertyName("resourceGuid"u8); + writer.WriteStringValue(ResourceGuid.Value); + } + writer.WriteEndObject(); + } + + DnsResolverDomainListData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DnsResolverDomainListData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDnsResolverDomainListData(document.RootElement, options); + } + + internal static DnsResolverDomainListData DeserializeDnsResolverDomainListData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ETag? etag = default; + IDictionary tags = default; + AzureLocation location = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IList domains = default; + DnsResolverProvisioningState? provisioningState = default; + Guid? resourceGuid = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("etag"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + etag = new ETag(property.Value.GetString()); + continue; + } + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("location"u8)) + { + location = new AzureLocation(property.Value.GetString()); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("domains"u8)) + { + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + domains = array; + continue; + } + if (property0.NameEquals("provisioningState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new DnsResolverProvisioningState(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("resourceGuid"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + resourceGuid = property0.Value.GetGuid(); + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DnsResolverDomainListData( + id, + name, + type, + systemData, + tags ?? new ChangeTrackingDictionary(), + location, + etag, + domains, + provisioningState, + resourceGuid, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DnsResolverDomainListData)} does not support writing '{options.Format}' format."); + } + } + + DnsResolverDomainListData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeDnsResolverDomainListData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DnsResolverDomainListData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverDomainListData.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverDomainListData.cs new file mode 100644 index 000000000000..b911f6de43a2 --- /dev/null +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverDomainListData.cs @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Core; +using Azure.ResourceManager.DnsResolver.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.DnsResolver +{ + /// + /// A class representing the DnsResolverDomainList data model. + /// Describes a DNS resolver domain list. + /// + public partial class DnsResolverDomainListData : TrackedResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The location. + /// The domains in the domain list. + /// is null. + public DnsResolverDomainListData(AzureLocation location, IEnumerable domains) : base(location) + { + Argument.AssertNotNull(domains, nameof(domains)); + + Domains = domains.ToList(); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// ETag of the DNS resolver domain list. + /// The domains in the domain list. + /// The current provisioning state of the DNS resolver domain list. This is a read-only property and any attempt to set this value will be ignored. + /// The resourceGuid property of the DNS resolver domain list resource. + /// Keeps track of any properties unknown to the library. + internal DnsResolverDomainListData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ETag? etag, IList domains, DnsResolverProvisioningState? provisioningState, Guid? resourceGuid, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + { + ETag = etag; + Domains = domains; + ProvisioningState = provisioningState; + ResourceGuid = resourceGuid; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DnsResolverDomainListData() + { + } + + /// ETag of the DNS resolver domain list. + public ETag? ETag { get; } + /// The domains in the domain list. + public IList Domains { get; } + /// The current provisioning state of the DNS resolver domain list. This is a read-only property and any attempt to set this value will be ignored. + public DnsResolverProvisioningState? ProvisioningState { get; } + /// The resourceGuid property of the DNS resolver domain list resource. + public Guid? ResourceGuid { get; } + } +} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverDomainListResource.Serialization.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverDomainListResource.Serialization.cs new file mode 100644 index 000000000000..8e232c955a9c --- /dev/null +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverDomainListResource.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.DnsResolver +{ + public partial class DnsResolverDomainListResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + DnsResolverDomainListData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + DnsResolverDomainListData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/MachineRunCommandResource.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverDomainListResource.cs similarity index 56% rename from sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/MachineRunCommandResource.cs rename to sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverDomainListResource.cs index a2e72e8173a3..6861574160d1 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/MachineRunCommandResource.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverDomainListResource.cs @@ -12,57 +12,58 @@ using System.Threading.Tasks; using Azure.Core; using Azure.Core.Pipeline; +using Azure.ResourceManager.DnsResolver.Models; +using Azure.ResourceManager.Resources; -namespace Azure.ResourceManager.HybridCompute +namespace Azure.ResourceManager.DnsResolver { /// - /// A Class representing a MachineRunCommand along with the instance operations that can be performed on it. - /// If you have a you can construct a - /// from an instance of using the GetMachineRunCommandResource method. - /// Otherwise you can get one from its parent resource using the GetMachineRunCommand method. + /// A Class representing a DnsResolverDomainList along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetDnsResolverDomainListResource method. + /// Otherwise you can get one from its parent resource using the GetDnsResolverDomainList method. /// - public partial class MachineRunCommandResource : ArmResource + public partial class DnsResolverDomainListResource : ArmResource { - /// Generate the resource identifier of a instance. + /// Generate the resource identifier of a instance. /// The subscriptionId. /// The resourceGroupName. - /// The machineName. - /// The runCommandName. - public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string machineName, string runCommandName) + /// The dnsResolverDomainListName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string dnsResolverDomainListName) { - var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/runCommands/{runCommandName}"; + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverDomainLists/{dnsResolverDomainListName}"; return new ResourceIdentifier(resourceId); } - private readonly ClientDiagnostics _machineRunCommandClientDiagnostics; - private readonly MachineRunCommandsRestOperations _machineRunCommandRestClient; - private readonly MachineRunCommandData _data; + private readonly ClientDiagnostics _dnsResolverDomainListClientDiagnostics; + private readonly DnsResolverDomainListsRestOperations _dnsResolverDomainListRestClient; + private readonly DnsResolverDomainListData _data; /// Gets the resource type for the operations. - public static readonly ResourceType ResourceType = "Microsoft.HybridCompute/machines/runCommands"; + public static readonly ResourceType ResourceType = "Microsoft.Network/dnsResolverDomainLists"; - /// Initializes a new instance of the class for mocking. - protected MachineRunCommandResource() + /// Initializes a new instance of the class for mocking. + protected DnsResolverDomainListResource() { } - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// The client parameters to use in these operations. /// The resource that is the target of operations. - internal MachineRunCommandResource(ArmClient client, MachineRunCommandData data) : this(client, data.Id) + internal DnsResolverDomainListResource(ArmClient client, DnsResolverDomainListData data) : this(client, data.Id) { HasData = true; _data = data; } - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// The client parameters to use in these operations. /// The identifier of the resource that is the target of operations. - internal MachineRunCommandResource(ArmClient client, ResourceIdentifier id) : base(client, id) + internal DnsResolverDomainListResource(ArmClient client, ResourceIdentifier id) : base(client, id) { - _machineRunCommandClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.HybridCompute", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string machineRunCommandApiVersion); - _machineRunCommandRestClient = new MachineRunCommandsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, machineRunCommandApiVersion); + _dnsResolverDomainListClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DnsResolver", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string dnsResolverDomainListApiVersion); + _dnsResolverDomainListRestClient = new DnsResolverDomainListsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dnsResolverDomainListApiVersion); #if DEBUG ValidateResourceId(Id); #endif @@ -73,7 +74,7 @@ internal MachineRunCommandResource(ArmClient client, ResourceIdentifier id) : ba /// Gets the data representing this Feature. /// Throws if there is no data loaded in the current instance. - public virtual MachineRunCommandData Data + public virtual DnsResolverDomainListData Data { get { @@ -90,37 +91,37 @@ internal static void ValidateResourceId(ResourceIdentifier id) } /// - /// The operation to get a run command. + /// Gets properties of a DNS resolver domain list. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/runCommands/{runCommandName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverDomainLists/{dnsResolverDomainListName} /// /// /// Operation Id - /// MachineRunCommands_Get + /// DnsResolverDomainLists_Get /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2023-07-01-preview /// /// /// Resource - /// + /// /// /// /// /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) { - using var scope = _machineRunCommandClientDiagnostics.CreateScope("MachineRunCommandResource.Get"); + using var scope = _dnsResolverDomainListClientDiagnostics.CreateScope("DnsResolverDomainListResource.Get"); scope.Start(); try { - var response = await _machineRunCommandRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var response = await _dnsResolverDomainListRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new MachineRunCommandResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new DnsResolverDomainListResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -130,37 +131,37 @@ public virtual async Task> GetAsync(Cancella } /// - /// The operation to get a run command. + /// Gets properties of a DNS resolver domain list. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/runCommands/{runCommandName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverDomainLists/{dnsResolverDomainListName} /// /// /// Operation Id - /// MachineRunCommands_Get + /// DnsResolverDomainLists_Get /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2023-07-01-preview /// /// /// Resource - /// + /// /// /// /// /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) + public virtual Response Get(CancellationToken cancellationToken = default) { - using var scope = _machineRunCommandClientDiagnostics.CreateScope("MachineRunCommandResource.Get"); + using var scope = _dnsResolverDomainListClientDiagnostics.CreateScope("DnsResolverDomainListResource.Get"); scope.Start(); try { - var response = _machineRunCommandRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var response = _dnsResolverDomainListRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new MachineRunCommandResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new DnsResolverDomainListResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -170,36 +171,37 @@ public virtual Response Get(CancellationToken cancell } /// - /// The operation to delete a run command. + /// Deletes a DNS resolver domain list. WARNING: This operation cannot be undone. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/runCommands/{runCommandName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverDomainLists/{dnsResolverDomainListName} /// /// /// Operation Id - /// MachineRunCommands_Delete + /// DnsResolverDomainLists_Delete /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2023-07-01-preview /// /// /// Resource - /// + /// /// /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// ETag of the resource. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting any concurrent changes. /// The cancellation token to use. - public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + public virtual async Task DeleteAsync(WaitUntil waitUntil, string ifMatch = null, CancellationToken cancellationToken = default) { - using var scope = _machineRunCommandClientDiagnostics.CreateScope("MachineRunCommandResource.Delete"); + using var scope = _dnsResolverDomainListClientDiagnostics.CreateScope("DnsResolverDomainListResource.Delete"); scope.Start(); try { - var response = await _machineRunCommandRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new HybridComputeArmOperation(_machineRunCommandClientDiagnostics, Pipeline, _machineRunCommandRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + var response = await _dnsResolverDomainListRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, ifMatch, cancellationToken).ConfigureAwait(false); + var operation = new DnsResolverArmOperation(_dnsResolverDomainListClientDiagnostics, Pipeline, _dnsResolverDomainListRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, ifMatch).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -212,36 +214,37 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell } /// - /// The operation to delete a run command. + /// Deletes a DNS resolver domain list. WARNING: This operation cannot be undone. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/runCommands/{runCommandName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverDomainLists/{dnsResolverDomainListName} /// /// /// Operation Id - /// MachineRunCommands_Delete + /// DnsResolverDomainLists_Delete /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2023-07-01-preview /// /// /// Resource - /// + /// /// /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// ETag of the resource. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting any concurrent changes. /// The cancellation token to use. - public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + public virtual ArmOperation Delete(WaitUntil waitUntil, string ifMatch = null, CancellationToken cancellationToken = default) { - using var scope = _machineRunCommandClientDiagnostics.CreateScope("MachineRunCommandResource.Delete"); + using var scope = _dnsResolverDomainListClientDiagnostics.CreateScope("DnsResolverDomainListResource.Delete"); scope.Start(); try { - var response = _machineRunCommandRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - var operation = new HybridComputeArmOperation(_machineRunCommandClientDiagnostics, Pipeline, _machineRunCommandRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + var response = _dnsResolverDomainListRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, ifMatch, cancellationToken); + var operation = new DnsResolverArmOperation(_dnsResolverDomainListClientDiagnostics, Pipeline, _dnsResolverDomainListRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, ifMatch).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -254,40 +257,41 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel } /// - /// The operation to create or update a run command. + /// Updates a DNS resolver domain list. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/runCommands/{runCommandName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverDomainLists/{dnsResolverDomainListName} /// /// /// Operation Id - /// MachineRunCommands_CreateOrUpdate + /// DnsResolverDomainLists_Update /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2023-07-01-preview /// /// /// Resource - /// + /// /// /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Parameters supplied to the Create Run Command. + /// Parameters supplied to the Update operation. + /// ETag of the resource. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting any concurrent changes. /// The cancellation token to use. - /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, MachineRunCommandData data, CancellationToken cancellationToken = default) + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, DnsResolverDomainListPatch patch, string ifMatch = null, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(data, nameof(data)); + Argument.AssertNotNull(patch, nameof(patch)); - using var scope = _machineRunCommandClientDiagnostics.CreateScope("MachineRunCommandResource.Update"); + using var scope = _dnsResolverDomainListClientDiagnostics.CreateScope("DnsResolverDomainListResource.Update"); scope.Start(); try { - var response = await _machineRunCommandRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); - var operation = new HybridComputeArmOperation(new MachineRunCommandOperationSource(Client), _machineRunCommandClientDiagnostics, Pipeline, _machineRunCommandRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = await _dnsResolverDomainListRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, ifMatch, cancellationToken).ConfigureAwait(false); + var operation = new DnsResolverArmOperation(new DnsResolverDomainListOperationSource(Client), _dnsResolverDomainListClientDiagnostics, Pipeline, _dnsResolverDomainListRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, ifMatch).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -300,40 +304,41 @@ public virtual async Task> UpdateAsync(W } /// - /// The operation to create or update a run command. + /// Updates a DNS resolver domain list. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/runCommands/{runCommandName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverDomainLists/{dnsResolverDomainListName} /// /// /// Operation Id - /// MachineRunCommands_CreateOrUpdate + /// DnsResolverDomainLists_Update /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2023-07-01-preview /// /// /// Resource - /// + /// /// /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Parameters supplied to the Create Run Command. + /// Parameters supplied to the Update operation. + /// ETag of the resource. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting any concurrent changes. /// The cancellation token to use. - /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, MachineRunCommandData data, CancellationToken cancellationToken = default) + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, DnsResolverDomainListPatch patch, string ifMatch = null, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(data, nameof(data)); + Argument.AssertNotNull(patch, nameof(patch)); - using var scope = _machineRunCommandClientDiagnostics.CreateScope("MachineRunCommandResource.Update"); + using var scope = _dnsResolverDomainListClientDiagnostics.CreateScope("DnsResolverDomainListResource.Update"); scope.Start(); try { - var response = _machineRunCommandRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); - var operation = new HybridComputeArmOperation(new MachineRunCommandOperationSource(Client), _machineRunCommandClientDiagnostics, Pipeline, _machineRunCommandRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = _dnsResolverDomainListRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, ifMatch, cancellationToken); + var operation = new DnsResolverArmOperation(new DnsResolverDomainListOperationSource(Client), _dnsResolverDomainListClientDiagnostics, Pipeline, _dnsResolverDomainListRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, ifMatch).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -350,19 +355,19 @@ public virtual ArmOperation Update(WaitUntil waitUnti /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/runCommands/{runCommandName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverDomainLists/{dnsResolverDomainListName} /// /// /// Operation Id - /// MachineRunCommands_Get + /// DnsResolverDomainLists_Get /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2023-07-01-preview /// /// /// Resource - /// + /// /// /// /// @@ -370,12 +375,12 @@ public virtual ArmOperation Update(WaitUntil waitUnti /// The value for the tag. /// The cancellation token to use. /// or is null. - public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) + public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) { Argument.AssertNotNull(key, nameof(key)); Argument.AssertNotNull(value, nameof(value)); - using var scope = _machineRunCommandClientDiagnostics.CreateScope("MachineRunCommandResource.AddTag"); + using var scope = _dnsResolverDomainListClientDiagnostics.CreateScope("DnsResolverDomainListResource.AddTag"); scope.Start(); try { @@ -384,14 +389,19 @@ public virtual async Task> AddTagAsync(strin var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); originalTags.Value.Data.TagValues[key] = value; await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _machineRunCommandRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new MachineRunCommandResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + var originalResponse = await _dnsResolverDomainListRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new DnsResolverDomainListResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else { var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - current.Tags[key] = value; - var result = await UpdateAsync(WaitUntil.Completed, current, cancellationToken: cancellationToken).ConfigureAwait(false); + var patch = new DnsResolverDomainListPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); return Response.FromValue(result.Value, result.GetRawResponse()); } } @@ -407,19 +417,19 @@ public virtual async Task> AddTagAsync(strin /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/runCommands/{runCommandName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverDomainLists/{dnsResolverDomainListName} /// /// /// Operation Id - /// MachineRunCommands_Get + /// DnsResolverDomainLists_Get /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2023-07-01-preview /// /// /// Resource - /// + /// /// /// /// @@ -427,12 +437,12 @@ public virtual async Task> AddTagAsync(strin /// The value for the tag. /// The cancellation token to use. /// or is null. - public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) + public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) { Argument.AssertNotNull(key, nameof(key)); Argument.AssertNotNull(value, nameof(value)); - using var scope = _machineRunCommandClientDiagnostics.CreateScope("MachineRunCommandResource.AddTag"); + using var scope = _dnsResolverDomainListClientDiagnostics.CreateScope("DnsResolverDomainListResource.AddTag"); scope.Start(); try { @@ -441,14 +451,19 @@ public virtual Response AddTag(string key, string val var originalTags = GetTagResource().Get(cancellationToken); originalTags.Value.Data.TagValues[key] = value; GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _machineRunCommandRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - return Response.FromValue(new MachineRunCommandResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + var originalResponse = _dnsResolverDomainListRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new DnsResolverDomainListResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else { var current = Get(cancellationToken: cancellationToken).Value.Data; - current.Tags[key] = value; - var result = Update(WaitUntil.Completed, current, cancellationToken: cancellationToken); + var patch = new DnsResolverDomainListPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); return Response.FromValue(result.Value, result.GetRawResponse()); } } @@ -464,30 +479,30 @@ public virtual Response AddTag(string key, string val /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/runCommands/{runCommandName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverDomainLists/{dnsResolverDomainListName} /// /// /// Operation Id - /// MachineRunCommands_Get + /// DnsResolverDomainLists_Get /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2023-07-01-preview /// /// /// Resource - /// + /// /// /// /// /// The set of tags to use as replacement. /// The cancellation token to use. /// is null. - public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) + public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) { Argument.AssertNotNull(tags, nameof(tags)); - using var scope = _machineRunCommandClientDiagnostics.CreateScope("MachineRunCommandResource.SetTags"); + using var scope = _dnsResolverDomainListClientDiagnostics.CreateScope("DnsResolverDomainListResource.SetTags"); scope.Start(); try { @@ -497,14 +512,15 @@ public virtual async Task> SetTagsAsync(IDic var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); originalTags.Value.Data.TagValues.ReplaceWith(tags); await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _machineRunCommandRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new MachineRunCommandResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + var originalResponse = await _dnsResolverDomainListRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new DnsResolverDomainListResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else { var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - current.Tags.ReplaceWith(tags); - var result = await UpdateAsync(WaitUntil.Completed, current, cancellationToken: cancellationToken).ConfigureAwait(false); + var patch = new DnsResolverDomainListPatch(); + patch.Tags.ReplaceWith(tags); + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); return Response.FromValue(result.Value, result.GetRawResponse()); } } @@ -520,30 +536,30 @@ public virtual async Task> SetTagsAsync(IDic /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/runCommands/{runCommandName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverDomainLists/{dnsResolverDomainListName} /// /// /// Operation Id - /// MachineRunCommands_Get + /// DnsResolverDomainLists_Get /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2023-07-01-preview /// /// /// Resource - /// + /// /// /// /// /// The set of tags to use as replacement. /// The cancellation token to use. /// is null. - public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) + public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) { Argument.AssertNotNull(tags, nameof(tags)); - using var scope = _machineRunCommandClientDiagnostics.CreateScope("MachineRunCommandResource.SetTags"); + using var scope = _dnsResolverDomainListClientDiagnostics.CreateScope("DnsResolverDomainListResource.SetTags"); scope.Start(); try { @@ -553,14 +569,15 @@ public virtual Response SetTags(IDictionary SetTags(IDictionary /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/runCommands/{runCommandName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverDomainLists/{dnsResolverDomainListName} /// /// /// Operation Id - /// MachineRunCommands_Get + /// DnsResolverDomainLists_Get /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2023-07-01-preview /// /// /// Resource - /// + /// /// /// /// /// The key for the tag. /// The cancellation token to use. /// is null. - public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) + public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) { Argument.AssertNotNull(key, nameof(key)); - using var scope = _machineRunCommandClientDiagnostics.CreateScope("MachineRunCommandResource.RemoveTag"); + using var scope = _dnsResolverDomainListClientDiagnostics.CreateScope("DnsResolverDomainListResource.RemoveTag"); scope.Start(); try { @@ -608,14 +625,19 @@ public virtual async Task> RemoveTagAsync(st var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); originalTags.Value.Data.TagValues.Remove(key); await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _machineRunCommandRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new MachineRunCommandResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + var originalResponse = await _dnsResolverDomainListRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new DnsResolverDomainListResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else { var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - current.Tags.Remove(key); - var result = await UpdateAsync(WaitUntil.Completed, current, cancellationToken: cancellationToken).ConfigureAwait(false); + var patch = new DnsResolverDomainListPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); return Response.FromValue(result.Value, result.GetRawResponse()); } } @@ -631,30 +653,30 @@ public virtual async Task> RemoveTagAsync(st /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/runCommands/{runCommandName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverDomainLists/{dnsResolverDomainListName} /// /// /// Operation Id - /// MachineRunCommands_Get + /// DnsResolverDomainLists_Get /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2023-07-01-preview /// /// /// Resource - /// + /// /// /// /// /// The key for the tag. /// The cancellation token to use. /// is null. - public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) + public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) { Argument.AssertNotNull(key, nameof(key)); - using var scope = _machineRunCommandClientDiagnostics.CreateScope("MachineRunCommandResource.RemoveTag"); + using var scope = _dnsResolverDomainListClientDiagnostics.CreateScope("DnsResolverDomainListResource.RemoveTag"); scope.Start(); try { @@ -663,14 +685,19 @@ public virtual Response RemoveTag(string key, Cancell var originalTags = GetTagResource().Get(cancellationToken); originalTags.Value.Data.TagValues.Remove(key); GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _machineRunCommandRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - return Response.FromValue(new MachineRunCommandResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + var originalResponse = _dnsResolverDomainListRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new DnsResolverDomainListResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else { var current = Get(cancellationToken: cancellationToken).Value.Data; - current.Tags.Remove(key); - var result = Update(WaitUntil.Completed, current, cancellationToken: cancellationToken); + var patch = new DnsResolverDomainListPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); return Response.FromValue(result.Value, result.GetRawResponse()); } } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverInboundEndpointCollection.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverInboundEndpointCollection.cs index a40a0fafd2ed..f8c3a4eb5aab 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverInboundEndpointCollection.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverInboundEndpointCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> Crea /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOrUpdate(W /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string inboundEn /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -287,7 +287,7 @@ public virtual AsyncPageable GetAllAsync(int /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -318,7 +318,7 @@ public virtual Pageable GetAll(int? top = nu /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -361,7 +361,7 @@ public virtual async Task> ExistsAsync(string inboundEndpointName /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -404,7 +404,7 @@ public virtual Response Exists(string inboundEndpointName, CancellationTok /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -449,7 +449,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverInboundEndpointResource.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverInboundEndpointResource.cs index d6e926b3280d..c5756885bdb6 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverInboundEndpointResource.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverInboundEndpointResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationToke /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -226,7 +226,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, string /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -269,7 +269,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, string ifMatch = null, C /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -316,7 +316,7 @@ public virtual async Task> Upda /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -363,7 +363,7 @@ public virtual ArmOperation Update(WaitUntil /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -425,7 +425,7 @@ public virtual async Task> AddTagAs /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -487,7 +487,7 @@ public virtual Response AddTag(string key, s /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -544,7 +544,7 @@ public virtual async Task> SetTagsA /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -601,7 +601,7 @@ public virtual Response SetTags(IDictionary< /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -661,7 +661,7 @@ public virtual async Task> RemoveTa /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverOutboundEndpointCollection.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverOutboundEndpointCollection.cs index a88d29679a78..035d84c40b95 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverOutboundEndpointCollection.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverOutboundEndpointCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> Cre /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOrUpdate( /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAsyn /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string outbound /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -287,7 +287,7 @@ public virtual AsyncPageable GetAllAsync(in /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -318,7 +318,7 @@ public virtual Pageable GetAll(int? top = n /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -361,7 +361,7 @@ public virtual async Task> ExistsAsync(string outboundEndpointNam /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -404,7 +404,7 @@ public virtual Response Exists(string outboundEndpointName, CancellationTo /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -449,7 +449,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverOutboundEndpointResource.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverOutboundEndpointResource.cs index 172713538798..fc91a12b44a2 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverOutboundEndpointResource.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverOutboundEndpointResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsyn /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationTok /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -226,7 +226,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, string /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -269,7 +269,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, string ifMatch = null, C /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -316,7 +316,7 @@ public virtual async Task> Upd /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -363,7 +363,7 @@ public virtual ArmOperation Update(WaitUnti /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -425,7 +425,7 @@ public virtual async Task> AddTagA /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -487,7 +487,7 @@ public virtual Response AddTag(string key, /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -544,7 +544,7 @@ public virtual async Task> SetTags /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -601,7 +601,7 @@ public virtual Response SetTags(IDictionary /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -661,7 +661,7 @@ public virtual async Task> RemoveT /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverPolicyCollection.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverPolicyCollection.cs new file mode 100644 index 000000000000..42bf813d68c1 --- /dev/null +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverPolicyCollection.cs @@ -0,0 +1,500 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.DnsResolver +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetDnsResolverPolicies method from an instance of . + /// + public partial class DnsResolverPolicyCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _dnsResolverPolicyClientDiagnostics; + private readonly DnsResolverPoliciesRestOperations _dnsResolverPolicyRestClient; + + /// Initializes a new instance of the class for mocking. + protected DnsResolverPolicyCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal DnsResolverPolicyCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _dnsResolverPolicyClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DnsResolver", DnsResolverPolicyResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(DnsResolverPolicyResource.ResourceType, out string dnsResolverPolicyApiVersion); + _dnsResolverPolicyRestClient = new DnsResolverPoliciesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dnsResolverPolicyApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceGroupResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceGroupResource.ResourceType), nameof(id)); + } + + /// + /// Creates or updates a DNS resolver policy. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName} + /// + /// + /// Operation Id + /// DnsResolverPolicies_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2023-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the DNS resolver policy. + /// Parameters supplied to the CreateOrUpdate operation. + /// ETag of the resource. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting any concurrent changes. + /// Set to '*' to allow a new resource to be created, but to prevent updating an existing resource. Other values will be ignored. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string dnsResolverPolicyName, DnsResolverPolicyData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(dnsResolverPolicyName, nameof(dnsResolverPolicyName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _dnsResolverPolicyClientDiagnostics.CreateScope("DnsResolverPolicyCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _dnsResolverPolicyRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, dnsResolverPolicyName, data, ifMatch, ifNoneMatch, cancellationToken).ConfigureAwait(false); + var operation = new DnsResolverArmOperation(new DnsResolverPolicyOperationSource(Client), _dnsResolverPolicyClientDiagnostics, Pipeline, _dnsResolverPolicyRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, dnsResolverPolicyName, data, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or updates a DNS resolver policy. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName} + /// + /// + /// Operation Id + /// DnsResolverPolicies_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2023-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the DNS resolver policy. + /// Parameters supplied to the CreateOrUpdate operation. + /// ETag of the resource. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting any concurrent changes. + /// Set to '*' to allow a new resource to be created, but to prevent updating an existing resource. Other values will be ignored. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string dnsResolverPolicyName, DnsResolverPolicyData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(dnsResolverPolicyName, nameof(dnsResolverPolicyName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _dnsResolverPolicyClientDiagnostics.CreateScope("DnsResolverPolicyCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _dnsResolverPolicyRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, dnsResolverPolicyName, data, ifMatch, ifNoneMatch, cancellationToken); + var operation = new DnsResolverArmOperation(new DnsResolverPolicyOperationSource(Client), _dnsResolverPolicyClientDiagnostics, Pipeline, _dnsResolverPolicyRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, dnsResolverPolicyName, data, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets properties of a DNS resolver policy. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName} + /// + /// + /// Operation Id + /// DnsResolverPolicies_Get + /// + /// + /// Default Api Version + /// 2023-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the DNS resolver policy. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string dnsResolverPolicyName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(dnsResolverPolicyName, nameof(dnsResolverPolicyName)); + + using var scope = _dnsResolverPolicyClientDiagnostics.CreateScope("DnsResolverPolicyCollection.Get"); + scope.Start(); + try + { + var response = await _dnsResolverPolicyRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, dnsResolverPolicyName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DnsResolverPolicyResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets properties of a DNS resolver policy. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName} + /// + /// + /// Operation Id + /// DnsResolverPolicies_Get + /// + /// + /// Default Api Version + /// 2023-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the DNS resolver policy. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string dnsResolverPolicyName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(dnsResolverPolicyName, nameof(dnsResolverPolicyName)); + + using var scope = _dnsResolverPolicyClientDiagnostics.CreateScope("DnsResolverPolicyCollection.Get"); + scope.Start(); + try + { + var response = _dnsResolverPolicyRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, dnsResolverPolicyName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DnsResolverPolicyResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Lists DNS resolver policies within a resource group. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies + /// + /// + /// Operation Id + /// DnsResolverPolicies_ListByResourceGroup + /// + /// + /// Default Api Version + /// 2023-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The maximum number of results to return. If not specified, returns up to 100 results. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(int? top = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _dnsResolverPolicyRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName, top); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dnsResolverPolicyRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, top); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DnsResolverPolicyResource(Client, DnsResolverPolicyData.DeserializeDnsResolverPolicyData(e)), _dnsResolverPolicyClientDiagnostics, Pipeline, "DnsResolverPolicyCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Lists DNS resolver policies within a resource group. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies + /// + /// + /// Operation Id + /// DnsResolverPolicies_ListByResourceGroup + /// + /// + /// Default Api Version + /// 2023-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The maximum number of results to return. If not specified, returns up to 100 results. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(int? top = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _dnsResolverPolicyRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName, top); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dnsResolverPolicyRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, top); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DnsResolverPolicyResource(Client, DnsResolverPolicyData.DeserializeDnsResolverPolicyData(e)), _dnsResolverPolicyClientDiagnostics, Pipeline, "DnsResolverPolicyCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName} + /// + /// + /// Operation Id + /// DnsResolverPolicies_Get + /// + /// + /// Default Api Version + /// 2023-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the DNS resolver policy. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string dnsResolverPolicyName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(dnsResolverPolicyName, nameof(dnsResolverPolicyName)); + + using var scope = _dnsResolverPolicyClientDiagnostics.CreateScope("DnsResolverPolicyCollection.Exists"); + scope.Start(); + try + { + var response = await _dnsResolverPolicyRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, dnsResolverPolicyName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName} + /// + /// + /// Operation Id + /// DnsResolverPolicies_Get + /// + /// + /// Default Api Version + /// 2023-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the DNS resolver policy. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string dnsResolverPolicyName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(dnsResolverPolicyName, nameof(dnsResolverPolicyName)); + + using var scope = _dnsResolverPolicyClientDiagnostics.CreateScope("DnsResolverPolicyCollection.Exists"); + scope.Start(); + try + { + var response = _dnsResolverPolicyRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, dnsResolverPolicyName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName} + /// + /// + /// Operation Id + /// DnsResolverPolicies_Get + /// + /// + /// Default Api Version + /// 2023-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the DNS resolver policy. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string dnsResolverPolicyName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(dnsResolverPolicyName, nameof(dnsResolverPolicyName)); + + using var scope = _dnsResolverPolicyClientDiagnostics.CreateScope("DnsResolverPolicyCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _dnsResolverPolicyRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, dnsResolverPolicyName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new DnsResolverPolicyResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName} + /// + /// + /// Operation Id + /// DnsResolverPolicies_Get + /// + /// + /// Default Api Version + /// 2023-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the DNS resolver policy. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string dnsResolverPolicyName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(dnsResolverPolicyName, nameof(dnsResolverPolicyName)); + + using var scope = _dnsResolverPolicyClientDiagnostics.CreateScope("DnsResolverPolicyCollection.GetIfExists"); + scope.Start(); + try + { + var response = _dnsResolverPolicyRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, dnsResolverPolicyName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new DnsResolverPolicyResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverPolicyData.Serialization.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverPolicyData.Serialization.cs new file mode 100644 index 000000000000..9c120800f4b7 --- /dev/null +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverPolicyData.Serialization.cs @@ -0,0 +1,225 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.DnsResolver.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.DnsResolver +{ + public partial class DnsResolverPolicyData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DnsResolverPolicyData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (options.Format != "W" && Optional.IsDefined(ETag)) + { + writer.WritePropertyName("etag"u8); + writer.WriteStringValue(ETag.Value.ToString()); + } + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(ResourceGuid)) + { + writer.WritePropertyName("resourceGuid"u8); + writer.WriteStringValue(ResourceGuid.Value); + } + writer.WriteEndObject(); + } + + DnsResolverPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DnsResolverPolicyData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDnsResolverPolicyData(document.RootElement, options); + } + + internal static DnsResolverPolicyData DeserializeDnsResolverPolicyData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ETag? etag = default; + IDictionary tags = default; + AzureLocation location = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + DnsResolverProvisioningState? provisioningState = default; + Guid? resourceGuid = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("etag"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + etag = new ETag(property.Value.GetString()); + continue; + } + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("location"u8)) + { + location = new AzureLocation(property.Value.GetString()); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("provisioningState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new DnsResolverProvisioningState(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("resourceGuid"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + resourceGuid = property0.Value.GetGuid(); + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DnsResolverPolicyData( + id, + name, + type, + systemData, + tags ?? new ChangeTrackingDictionary(), + location, + etag, + provisioningState, + resourceGuid, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DnsResolverPolicyData)} does not support writing '{options.Format}' format."); + } + } + + DnsResolverPolicyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeDnsResolverPolicyData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DnsResolverPolicyData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverPolicyData.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverPolicyData.cs new file mode 100644 index 000000000000..c8c4f9e9923f --- /dev/null +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverPolicyData.cs @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.DnsResolver.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.DnsResolver +{ + /// + /// A class representing the DnsResolverPolicy data model. + /// Describes a DNS resolver policy. + /// + public partial class DnsResolverPolicyData : TrackedResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The location. + public DnsResolverPolicyData(AzureLocation location) : base(location) + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// ETag of the DNS resolver policy. + /// The current provisioning state of the DNS resolver policy. This is a read-only property and any attempt to set this value will be ignored. + /// The resourceGuid property of the DNS resolver policy resource. + /// Keeps track of any properties unknown to the library. + internal DnsResolverPolicyData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ETag? etag, DnsResolverProvisioningState? provisioningState, Guid? resourceGuid, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + { + ETag = etag; + ProvisioningState = provisioningState; + ResourceGuid = resourceGuid; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DnsResolverPolicyData() + { + } + + /// ETag of the DNS resolver policy. + public ETag? ETag { get; } + /// The current provisioning state of the DNS resolver policy. This is a read-only property and any attempt to set this value will be ignored. + public DnsResolverProvisioningState? ProvisioningState { get; } + /// The resourceGuid property of the DNS resolver policy resource. + public Guid? ResourceGuid { get; } + } +} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverPolicyResource.Serialization.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverPolicyResource.Serialization.cs new file mode 100644 index 000000000000..63a7d0797309 --- /dev/null +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverPolicyResource.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.DnsResolver +{ + public partial class DnsResolverPolicyResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + DnsResolverPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + DnsResolverPolicyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverPolicyResource.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverPolicyResource.cs new file mode 100644 index 000000000000..143ac6b4ff7a --- /dev/null +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverPolicyResource.cs @@ -0,0 +1,849 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.DnsResolver.Models; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.DnsResolver +{ + /// + /// A Class representing a DnsResolverPolicy along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetDnsResolverPolicyResource method. + /// Otherwise you can get one from its parent resource using the GetDnsResolverPolicy method. + /// + public partial class DnsResolverPolicyResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The dnsResolverPolicyName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string dnsResolverPolicyName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _dnsResolverPolicyClientDiagnostics; + private readonly DnsResolverPoliciesRestOperations _dnsResolverPolicyRestClient; + private readonly DnsResolverPolicyData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Network/dnsResolverPolicies"; + + /// Initializes a new instance of the class for mocking. + protected DnsResolverPolicyResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal DnsResolverPolicyResource(ArmClient client, DnsResolverPolicyData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal DnsResolverPolicyResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _dnsResolverPolicyClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DnsResolver", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string dnsResolverPolicyApiVersion); + _dnsResolverPolicyRestClient = new DnsResolverPoliciesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dnsResolverPolicyApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual DnsResolverPolicyData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// Gets a collection of DnsSecurityRuleResources in the DnsResolverPolicy. + /// An object representing collection of DnsSecurityRuleResources and their operations over a DnsSecurityRuleResource. + public virtual DnsSecurityRuleCollection GetDnsSecurityRules() + { + return GetCachedClient(client => new DnsSecurityRuleCollection(client, Id)); + } + + /// + /// Gets properties of a DNS security rule for a DNS resolver policy. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName}/dnsSecurityRules/{dnsSecurityRuleName} + /// + /// + /// Operation Id + /// DnsSecurityRules_Get + /// + /// + /// Default Api Version + /// 2023-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the DNS security rule. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetDnsSecurityRuleAsync(string dnsSecurityRuleName, CancellationToken cancellationToken = default) + { + return await GetDnsSecurityRules().GetAsync(dnsSecurityRuleName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets properties of a DNS security rule for a DNS resolver policy. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName}/dnsSecurityRules/{dnsSecurityRuleName} + /// + /// + /// Operation Id + /// DnsSecurityRules_Get + /// + /// + /// Default Api Version + /// 2023-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the DNS security rule. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetDnsSecurityRule(string dnsSecurityRuleName, CancellationToken cancellationToken = default) + { + return GetDnsSecurityRules().Get(dnsSecurityRuleName, cancellationToken); + } + + /// Gets a collection of DnsResolverPolicyVirtualNetworkLinkResources in the DnsResolverPolicy. + /// An object representing collection of DnsResolverPolicyVirtualNetworkLinkResources and their operations over a DnsResolverPolicyVirtualNetworkLinkResource. + public virtual DnsResolverPolicyVirtualNetworkLinkCollection GetDnsResolverPolicyVirtualNetworkLinks() + { + return GetCachedClient(client => new DnsResolverPolicyVirtualNetworkLinkCollection(client, Id)); + } + + /// + /// Gets properties of a DNS resolver policy virtual network link. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName}/virtualNetworkLinks/{dnsResolverPolicyVirtualNetworkLinkName} + /// + /// + /// Operation Id + /// DnsResolverPolicyVirtualNetworkLinks_Get + /// + /// + /// Default Api Version + /// 2023-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the DNS resolver policy virtual network link for the DNS resolver policy. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetDnsResolverPolicyVirtualNetworkLinkAsync(string dnsResolverPolicyVirtualNetworkLinkName, CancellationToken cancellationToken = default) + { + return await GetDnsResolverPolicyVirtualNetworkLinks().GetAsync(dnsResolverPolicyVirtualNetworkLinkName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets properties of a DNS resolver policy virtual network link. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName}/virtualNetworkLinks/{dnsResolverPolicyVirtualNetworkLinkName} + /// + /// + /// Operation Id + /// DnsResolverPolicyVirtualNetworkLinks_Get + /// + /// + /// Default Api Version + /// 2023-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the DNS resolver policy virtual network link for the DNS resolver policy. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetDnsResolverPolicyVirtualNetworkLink(string dnsResolverPolicyVirtualNetworkLinkName, CancellationToken cancellationToken = default) + { + return GetDnsResolverPolicyVirtualNetworkLinks().Get(dnsResolverPolicyVirtualNetworkLinkName, cancellationToken); + } + + /// + /// Gets properties of a DNS resolver policy. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName} + /// + /// + /// Operation Id + /// DnsResolverPolicies_Get + /// + /// + /// Default Api Version + /// 2023-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _dnsResolverPolicyClientDiagnostics.CreateScope("DnsResolverPolicyResource.Get"); + scope.Start(); + try + { + var response = await _dnsResolverPolicyRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DnsResolverPolicyResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets properties of a DNS resolver policy. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName} + /// + /// + /// Operation Id + /// DnsResolverPolicies_Get + /// + /// + /// Default Api Version + /// 2023-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _dnsResolverPolicyClientDiagnostics.CreateScope("DnsResolverPolicyResource.Get"); + scope.Start(); + try + { + var response = _dnsResolverPolicyRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DnsResolverPolicyResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes a DNS resolver policy. WARNING: This operation cannot be undone. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName} + /// + /// + /// Operation Id + /// DnsResolverPolicies_Delete + /// + /// + /// Default Api Version + /// 2023-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// ETag of the resource. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting any concurrent changes. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, string ifMatch = null, CancellationToken cancellationToken = default) + { + using var scope = _dnsResolverPolicyClientDiagnostics.CreateScope("DnsResolverPolicyResource.Delete"); + scope.Start(); + try + { + var response = await _dnsResolverPolicyRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, ifMatch, cancellationToken).ConfigureAwait(false); + var operation = new DnsResolverArmOperation(_dnsResolverPolicyClientDiagnostics, Pipeline, _dnsResolverPolicyRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, ifMatch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes a DNS resolver policy. WARNING: This operation cannot be undone. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName} + /// + /// + /// Operation Id + /// DnsResolverPolicies_Delete + /// + /// + /// Default Api Version + /// 2023-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// ETag of the resource. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting any concurrent changes. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, string ifMatch = null, CancellationToken cancellationToken = default) + { + using var scope = _dnsResolverPolicyClientDiagnostics.CreateScope("DnsResolverPolicyResource.Delete"); + scope.Start(); + try + { + var response = _dnsResolverPolicyRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, ifMatch, cancellationToken); + var operation = new DnsResolverArmOperation(_dnsResolverPolicyClientDiagnostics, Pipeline, _dnsResolverPolicyRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, ifMatch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Updates a DNS resolver policy. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName} + /// + /// + /// Operation Id + /// DnsResolverPolicies_Update + /// + /// + /// Default Api Version + /// 2023-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Parameters supplied to the Update operation. + /// ETag of the resource. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting any concurrent changes. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, DnsResolverPolicyPatch patch, string ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _dnsResolverPolicyClientDiagnostics.CreateScope("DnsResolverPolicyResource.Update"); + scope.Start(); + try + { + var response = await _dnsResolverPolicyRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, ifMatch, cancellationToken).ConfigureAwait(false); + var operation = new DnsResolverArmOperation(new DnsResolverPolicyOperationSource(Client), _dnsResolverPolicyClientDiagnostics, Pipeline, _dnsResolverPolicyRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, ifMatch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Updates a DNS resolver policy. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName} + /// + /// + /// Operation Id + /// DnsResolverPolicies_Update + /// + /// + /// Default Api Version + /// 2023-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Parameters supplied to the Update operation. + /// ETag of the resource. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting any concurrent changes. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, DnsResolverPolicyPatch patch, string ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _dnsResolverPolicyClientDiagnostics.CreateScope("DnsResolverPolicyResource.Update"); + scope.Start(); + try + { + var response = _dnsResolverPolicyRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, ifMatch, cancellationToken); + var operation = new DnsResolverArmOperation(new DnsResolverPolicyOperationSource(Client), _dnsResolverPolicyClientDiagnostics, Pipeline, _dnsResolverPolicyRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, ifMatch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName} + /// + /// + /// Operation Id + /// DnsResolverPolicies_Get + /// + /// + /// Default Api Version + /// 2023-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _dnsResolverPolicyClientDiagnostics.CreateScope("DnsResolverPolicyResource.AddTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues[key] = value; + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _dnsResolverPolicyRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new DnsResolverPolicyResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new DnsResolverPolicyPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName} + /// + /// + /// Operation Id + /// DnsResolverPolicies_Get + /// + /// + /// Default Api Version + /// 2023-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _dnsResolverPolicyClientDiagnostics.CreateScope("DnsResolverPolicyResource.AddTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues[key] = value; + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _dnsResolverPolicyRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new DnsResolverPolicyResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new DnsResolverPolicyPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName} + /// + /// + /// Operation Id + /// DnsResolverPolicies_Get + /// + /// + /// Default Api Version + /// 2023-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _dnsResolverPolicyClientDiagnostics.CreateScope("DnsResolverPolicyResource.SetTags"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + await GetTagResource().DeleteAsync(WaitUntil.Completed, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _dnsResolverPolicyRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new DnsResolverPolicyResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new DnsResolverPolicyPatch(); + patch.Tags.ReplaceWith(tags); + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName} + /// + /// + /// Operation Id + /// DnsResolverPolicies_Get + /// + /// + /// Default Api Version + /// 2023-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _dnsResolverPolicyClientDiagnostics.CreateScope("DnsResolverPolicyResource.SetTags"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + GetTagResource().Delete(WaitUntil.Completed, cancellationToken: cancellationToken); + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _dnsResolverPolicyRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new DnsResolverPolicyResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new DnsResolverPolicyPatch(); + patch.Tags.ReplaceWith(tags); + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName} + /// + /// + /// Operation Id + /// DnsResolverPolicies_Get + /// + /// + /// Default Api Version + /// 2023-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _dnsResolverPolicyClientDiagnostics.CreateScope("DnsResolverPolicyResource.RemoveTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.Remove(key); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _dnsResolverPolicyRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new DnsResolverPolicyResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new DnsResolverPolicyPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName} + /// + /// + /// Operation Id + /// DnsResolverPolicies_Get + /// + /// + /// Default Api Version + /// 2023-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _dnsResolverPolicyClientDiagnostics.CreateScope("DnsResolverPolicyResource.RemoveTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.Remove(key); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _dnsResolverPolicyRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new DnsResolverPolicyResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new DnsResolverPolicyPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverPolicyVirtualNetworkLinkCollection.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverPolicyVirtualNetworkLinkCollection.cs new file mode 100644 index 000000000000..02f37e6b3614 --- /dev/null +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverPolicyVirtualNetworkLinkCollection.cs @@ -0,0 +1,499 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.DnsResolver +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetDnsResolverPolicyVirtualNetworkLinks method from an instance of . + /// + public partial class DnsResolverPolicyVirtualNetworkLinkCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _dnsResolverPolicyVirtualNetworkLinkClientDiagnostics; + private readonly DnsResolverPolicyVirtualNetworkLinksRestOperations _dnsResolverPolicyVirtualNetworkLinkRestClient; + + /// Initializes a new instance of the class for mocking. + protected DnsResolverPolicyVirtualNetworkLinkCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal DnsResolverPolicyVirtualNetworkLinkCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _dnsResolverPolicyVirtualNetworkLinkClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DnsResolver", DnsResolverPolicyVirtualNetworkLinkResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(DnsResolverPolicyVirtualNetworkLinkResource.ResourceType, out string dnsResolverPolicyVirtualNetworkLinkApiVersion); + _dnsResolverPolicyVirtualNetworkLinkRestClient = new DnsResolverPolicyVirtualNetworkLinksRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dnsResolverPolicyVirtualNetworkLinkApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != DnsResolverPolicyResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, DnsResolverPolicyResource.ResourceType), nameof(id)); + } + + /// + /// Creates or updates a DNS resolver policy virtual network link. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName}/virtualNetworkLinks/{dnsResolverPolicyVirtualNetworkLinkName} + /// + /// + /// Operation Id + /// DnsResolverPolicyVirtualNetworkLinks_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2023-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the DNS resolver policy virtual network link for the DNS resolver policy. + /// Parameters supplied to the CreateOrUpdate operation. + /// ETag of the resource. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting any concurrent changes. + /// Set to '*' to allow a new resource to be created, but to prevent updating an existing resource. Other values will be ignored. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string dnsResolverPolicyVirtualNetworkLinkName, DnsResolverPolicyVirtualNetworkLinkData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(dnsResolverPolicyVirtualNetworkLinkName, nameof(dnsResolverPolicyVirtualNetworkLinkName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _dnsResolverPolicyVirtualNetworkLinkClientDiagnostics.CreateScope("DnsResolverPolicyVirtualNetworkLinkCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _dnsResolverPolicyVirtualNetworkLinkRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, dnsResolverPolicyVirtualNetworkLinkName, data, ifMatch, ifNoneMatch, cancellationToken).ConfigureAwait(false); + var operation = new DnsResolverArmOperation(new DnsResolverPolicyVirtualNetworkLinkOperationSource(Client), _dnsResolverPolicyVirtualNetworkLinkClientDiagnostics, Pipeline, _dnsResolverPolicyVirtualNetworkLinkRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, dnsResolverPolicyVirtualNetworkLinkName, data, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or updates a DNS resolver policy virtual network link. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName}/virtualNetworkLinks/{dnsResolverPolicyVirtualNetworkLinkName} + /// + /// + /// Operation Id + /// DnsResolverPolicyVirtualNetworkLinks_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2023-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the DNS resolver policy virtual network link for the DNS resolver policy. + /// Parameters supplied to the CreateOrUpdate operation. + /// ETag of the resource. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting any concurrent changes. + /// Set to '*' to allow a new resource to be created, but to prevent updating an existing resource. Other values will be ignored. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string dnsResolverPolicyVirtualNetworkLinkName, DnsResolverPolicyVirtualNetworkLinkData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(dnsResolverPolicyVirtualNetworkLinkName, nameof(dnsResolverPolicyVirtualNetworkLinkName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _dnsResolverPolicyVirtualNetworkLinkClientDiagnostics.CreateScope("DnsResolverPolicyVirtualNetworkLinkCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _dnsResolverPolicyVirtualNetworkLinkRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, dnsResolverPolicyVirtualNetworkLinkName, data, ifMatch, ifNoneMatch, cancellationToken); + var operation = new DnsResolverArmOperation(new DnsResolverPolicyVirtualNetworkLinkOperationSource(Client), _dnsResolverPolicyVirtualNetworkLinkClientDiagnostics, Pipeline, _dnsResolverPolicyVirtualNetworkLinkRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, dnsResolverPolicyVirtualNetworkLinkName, data, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets properties of a DNS resolver policy virtual network link. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName}/virtualNetworkLinks/{dnsResolverPolicyVirtualNetworkLinkName} + /// + /// + /// Operation Id + /// DnsResolverPolicyVirtualNetworkLinks_Get + /// + /// + /// Default Api Version + /// 2023-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the DNS resolver policy virtual network link for the DNS resolver policy. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string dnsResolverPolicyVirtualNetworkLinkName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(dnsResolverPolicyVirtualNetworkLinkName, nameof(dnsResolverPolicyVirtualNetworkLinkName)); + + using var scope = _dnsResolverPolicyVirtualNetworkLinkClientDiagnostics.CreateScope("DnsResolverPolicyVirtualNetworkLinkCollection.Get"); + scope.Start(); + try + { + var response = await _dnsResolverPolicyVirtualNetworkLinkRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, dnsResolverPolicyVirtualNetworkLinkName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DnsResolverPolicyVirtualNetworkLinkResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets properties of a DNS resolver policy virtual network link. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName}/virtualNetworkLinks/{dnsResolverPolicyVirtualNetworkLinkName} + /// + /// + /// Operation Id + /// DnsResolverPolicyVirtualNetworkLinks_Get + /// + /// + /// Default Api Version + /// 2023-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the DNS resolver policy virtual network link for the DNS resolver policy. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string dnsResolverPolicyVirtualNetworkLinkName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(dnsResolverPolicyVirtualNetworkLinkName, nameof(dnsResolverPolicyVirtualNetworkLinkName)); + + using var scope = _dnsResolverPolicyVirtualNetworkLinkClientDiagnostics.CreateScope("DnsResolverPolicyVirtualNetworkLinkCollection.Get"); + scope.Start(); + try + { + var response = _dnsResolverPolicyVirtualNetworkLinkRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, dnsResolverPolicyVirtualNetworkLinkName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DnsResolverPolicyVirtualNetworkLinkResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Lists DNS resolver policy virtual network links. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName}/virtualNetworkLinks + /// + /// + /// Operation Id + /// DnsResolverPolicyVirtualNetworkLinks_List + /// + /// + /// Default Api Version + /// 2023-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The maximum number of results to return. If not specified, returns up to 100 results. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(int? top = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _dnsResolverPolicyVirtualNetworkLinkRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, top); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dnsResolverPolicyVirtualNetworkLinkRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, top); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DnsResolverPolicyVirtualNetworkLinkResource(Client, DnsResolverPolicyVirtualNetworkLinkData.DeserializeDnsResolverPolicyVirtualNetworkLinkData(e)), _dnsResolverPolicyVirtualNetworkLinkClientDiagnostics, Pipeline, "DnsResolverPolicyVirtualNetworkLinkCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Lists DNS resolver policy virtual network links. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName}/virtualNetworkLinks + /// + /// + /// Operation Id + /// DnsResolverPolicyVirtualNetworkLinks_List + /// + /// + /// Default Api Version + /// 2023-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The maximum number of results to return. If not specified, returns up to 100 results. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(int? top = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _dnsResolverPolicyVirtualNetworkLinkRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, top); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dnsResolverPolicyVirtualNetworkLinkRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, top); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DnsResolverPolicyVirtualNetworkLinkResource(Client, DnsResolverPolicyVirtualNetworkLinkData.DeserializeDnsResolverPolicyVirtualNetworkLinkData(e)), _dnsResolverPolicyVirtualNetworkLinkClientDiagnostics, Pipeline, "DnsResolverPolicyVirtualNetworkLinkCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName}/virtualNetworkLinks/{dnsResolverPolicyVirtualNetworkLinkName} + /// + /// + /// Operation Id + /// DnsResolverPolicyVirtualNetworkLinks_Get + /// + /// + /// Default Api Version + /// 2023-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the DNS resolver policy virtual network link for the DNS resolver policy. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string dnsResolverPolicyVirtualNetworkLinkName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(dnsResolverPolicyVirtualNetworkLinkName, nameof(dnsResolverPolicyVirtualNetworkLinkName)); + + using var scope = _dnsResolverPolicyVirtualNetworkLinkClientDiagnostics.CreateScope("DnsResolverPolicyVirtualNetworkLinkCollection.Exists"); + scope.Start(); + try + { + var response = await _dnsResolverPolicyVirtualNetworkLinkRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, dnsResolverPolicyVirtualNetworkLinkName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName}/virtualNetworkLinks/{dnsResolverPolicyVirtualNetworkLinkName} + /// + /// + /// Operation Id + /// DnsResolverPolicyVirtualNetworkLinks_Get + /// + /// + /// Default Api Version + /// 2023-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the DNS resolver policy virtual network link for the DNS resolver policy. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string dnsResolverPolicyVirtualNetworkLinkName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(dnsResolverPolicyVirtualNetworkLinkName, nameof(dnsResolverPolicyVirtualNetworkLinkName)); + + using var scope = _dnsResolverPolicyVirtualNetworkLinkClientDiagnostics.CreateScope("DnsResolverPolicyVirtualNetworkLinkCollection.Exists"); + scope.Start(); + try + { + var response = _dnsResolverPolicyVirtualNetworkLinkRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, dnsResolverPolicyVirtualNetworkLinkName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName}/virtualNetworkLinks/{dnsResolverPolicyVirtualNetworkLinkName} + /// + /// + /// Operation Id + /// DnsResolverPolicyVirtualNetworkLinks_Get + /// + /// + /// Default Api Version + /// 2023-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the DNS resolver policy virtual network link for the DNS resolver policy. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string dnsResolverPolicyVirtualNetworkLinkName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(dnsResolverPolicyVirtualNetworkLinkName, nameof(dnsResolverPolicyVirtualNetworkLinkName)); + + using var scope = _dnsResolverPolicyVirtualNetworkLinkClientDiagnostics.CreateScope("DnsResolverPolicyVirtualNetworkLinkCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _dnsResolverPolicyVirtualNetworkLinkRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, dnsResolverPolicyVirtualNetworkLinkName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new DnsResolverPolicyVirtualNetworkLinkResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName}/virtualNetworkLinks/{dnsResolverPolicyVirtualNetworkLinkName} + /// + /// + /// Operation Id + /// DnsResolverPolicyVirtualNetworkLinks_Get + /// + /// + /// Default Api Version + /// 2023-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the DNS resolver policy virtual network link for the DNS resolver policy. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string dnsResolverPolicyVirtualNetworkLinkName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(dnsResolverPolicyVirtualNetworkLinkName, nameof(dnsResolverPolicyVirtualNetworkLinkName)); + + using var scope = _dnsResolverPolicyVirtualNetworkLinkClientDiagnostics.CreateScope("DnsResolverPolicyVirtualNetworkLinkCollection.GetIfExists"); + scope.Start(); + try + { + var response = _dnsResolverPolicyVirtualNetworkLinkRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, dnsResolverPolicyVirtualNetworkLinkName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new DnsResolverPolicyVirtualNetworkLinkResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverPolicyVirtualNetworkLinkData.Serialization.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverPolicyVirtualNetworkLinkData.Serialization.cs new file mode 100644 index 000000000000..09e8196fa403 --- /dev/null +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverPolicyVirtualNetworkLinkData.Serialization.cs @@ -0,0 +1,219 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.DnsResolver.Models; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.Resources.Models; + +namespace Azure.ResourceManager.DnsResolver +{ + public partial class DnsResolverPolicyVirtualNetworkLinkData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DnsResolverPolicyVirtualNetworkLinkData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (options.Format != "W" && Optional.IsDefined(ETag)) + { + writer.WritePropertyName("etag"u8); + writer.WriteStringValue(ETag.Value.ToString()); + } + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + writer.WritePropertyName("virtualNetwork"u8); + JsonSerializer.Serialize(writer, VirtualNetwork); + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + writer.WriteEndObject(); + } + + DnsResolverPolicyVirtualNetworkLinkData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DnsResolverPolicyVirtualNetworkLinkData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDnsResolverPolicyVirtualNetworkLinkData(document.RootElement, options); + } + + internal static DnsResolverPolicyVirtualNetworkLinkData DeserializeDnsResolverPolicyVirtualNetworkLinkData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ETag? etag = default; + IDictionary tags = default; + AzureLocation location = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + WritableSubResource virtualNetwork = default; + DnsResolverProvisioningState? provisioningState = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("etag"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + etag = new ETag(property.Value.GetString()); + continue; + } + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("location"u8)) + { + location = new AzureLocation(property.Value.GetString()); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("virtualNetwork"u8)) + { + virtualNetwork = JsonSerializer.Deserialize(property0.Value.GetRawText()); + continue; + } + if (property0.NameEquals("provisioningState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new DnsResolverProvisioningState(property0.Value.GetString()); + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DnsResolverPolicyVirtualNetworkLinkData( + id, + name, + type, + systemData, + tags ?? new ChangeTrackingDictionary(), + location, + etag, + virtualNetwork, + provisioningState, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DnsResolverPolicyVirtualNetworkLinkData)} does not support writing '{options.Format}' format."); + } + } + + DnsResolverPolicyVirtualNetworkLinkData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeDnsResolverPolicyVirtualNetworkLinkData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DnsResolverPolicyVirtualNetworkLinkData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverPolicyVirtualNetworkLinkData.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverPolicyVirtualNetworkLinkData.cs new file mode 100644 index 000000000000..be6cc28f570c --- /dev/null +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverPolicyVirtualNetworkLinkData.cs @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.DnsResolver.Models; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.Resources.Models; + +namespace Azure.ResourceManager.DnsResolver +{ + /// + /// A class representing the DnsResolverPolicyVirtualNetworkLink data model. + /// Describes a DNS resolver policy virtual network link. + /// + public partial class DnsResolverPolicyVirtualNetworkLinkData : TrackedResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The location. + /// The reference to the virtual network. This cannot be changed after creation. + /// is null. + public DnsResolverPolicyVirtualNetworkLinkData(AzureLocation location, WritableSubResource virtualNetwork) : base(location) + { + Argument.AssertNotNull(virtualNetwork, nameof(virtualNetwork)); + + VirtualNetwork = virtualNetwork; + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// ETag of the DNS resolver policy virtual network link. + /// The reference to the virtual network. This cannot be changed after creation. + /// The current provisioning state of the DNS resolver policy virtual network link. This is a read-only property and any attempt to set this value will be ignored. + /// Keeps track of any properties unknown to the library. + internal DnsResolverPolicyVirtualNetworkLinkData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ETag? etag, WritableSubResource virtualNetwork, DnsResolverProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + { + ETag = etag; + VirtualNetwork = virtualNetwork; + ProvisioningState = provisioningState; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DnsResolverPolicyVirtualNetworkLinkData() + { + } + + /// ETag of the DNS resolver policy virtual network link. + public ETag? ETag { get; } + /// The reference to the virtual network. This cannot be changed after creation. + internal WritableSubResource VirtualNetwork { get; set; } + /// Gets or sets Id. + public ResourceIdentifier VirtualNetworkId + { + get => VirtualNetwork is null ? default : VirtualNetwork.Id; + set + { + if (VirtualNetwork is null) + VirtualNetwork = new WritableSubResource(); + VirtualNetwork.Id = value; + } + } + + /// The current provisioning state of the DNS resolver policy virtual network link. This is a read-only property and any attempt to set this value will be ignored. + public DnsResolverProvisioningState? ProvisioningState { get; } + } +} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverPolicyVirtualNetworkLinkResource.Serialization.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverPolicyVirtualNetworkLinkResource.Serialization.cs new file mode 100644 index 000000000000..e1505de10248 --- /dev/null +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverPolicyVirtualNetworkLinkResource.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.DnsResolver +{ + public partial class DnsResolverPolicyVirtualNetworkLinkResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + DnsResolverPolicyVirtualNetworkLinkData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + DnsResolverPolicyVirtualNetworkLinkData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverPolicyVirtualNetworkLinkResource.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverPolicyVirtualNetworkLinkResource.cs new file mode 100644 index 000000000000..6c297f0cd695 --- /dev/null +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverPolicyVirtualNetworkLinkResource.cs @@ -0,0 +1,711 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.DnsResolver.Models; + +namespace Azure.ResourceManager.DnsResolver +{ + /// + /// A Class representing a DnsResolverPolicyVirtualNetworkLink along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetDnsResolverPolicyVirtualNetworkLinkResource method. + /// Otherwise you can get one from its parent resource using the GetDnsResolverPolicyVirtualNetworkLink method. + /// + public partial class DnsResolverPolicyVirtualNetworkLinkResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The dnsResolverPolicyName. + /// The dnsResolverPolicyVirtualNetworkLinkName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string dnsResolverPolicyName, string dnsResolverPolicyVirtualNetworkLinkName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName}/virtualNetworkLinks/{dnsResolverPolicyVirtualNetworkLinkName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _dnsResolverPolicyVirtualNetworkLinkClientDiagnostics; + private readonly DnsResolverPolicyVirtualNetworkLinksRestOperations _dnsResolverPolicyVirtualNetworkLinkRestClient; + private readonly DnsResolverPolicyVirtualNetworkLinkData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Network/dnsResolverPolicies/virtualNetworkLinks"; + + /// Initializes a new instance of the class for mocking. + protected DnsResolverPolicyVirtualNetworkLinkResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal DnsResolverPolicyVirtualNetworkLinkResource(ArmClient client, DnsResolverPolicyVirtualNetworkLinkData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal DnsResolverPolicyVirtualNetworkLinkResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _dnsResolverPolicyVirtualNetworkLinkClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DnsResolver", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string dnsResolverPolicyVirtualNetworkLinkApiVersion); + _dnsResolverPolicyVirtualNetworkLinkRestClient = new DnsResolverPolicyVirtualNetworkLinksRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dnsResolverPolicyVirtualNetworkLinkApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual DnsResolverPolicyVirtualNetworkLinkData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Gets properties of a DNS resolver policy virtual network link. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName}/virtualNetworkLinks/{dnsResolverPolicyVirtualNetworkLinkName} + /// + /// + /// Operation Id + /// DnsResolverPolicyVirtualNetworkLinks_Get + /// + /// + /// Default Api Version + /// 2023-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _dnsResolverPolicyVirtualNetworkLinkClientDiagnostics.CreateScope("DnsResolverPolicyVirtualNetworkLinkResource.Get"); + scope.Start(); + try + { + var response = await _dnsResolverPolicyVirtualNetworkLinkRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DnsResolverPolicyVirtualNetworkLinkResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets properties of a DNS resolver policy virtual network link. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName}/virtualNetworkLinks/{dnsResolverPolicyVirtualNetworkLinkName} + /// + /// + /// Operation Id + /// DnsResolverPolicyVirtualNetworkLinks_Get + /// + /// + /// Default Api Version + /// 2023-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _dnsResolverPolicyVirtualNetworkLinkClientDiagnostics.CreateScope("DnsResolverPolicyVirtualNetworkLinkResource.Get"); + scope.Start(); + try + { + var response = _dnsResolverPolicyVirtualNetworkLinkRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DnsResolverPolicyVirtualNetworkLinkResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes a DNS resolver policy virtual network link. WARNING: This operation cannot be undone. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName}/virtualNetworkLinks/{dnsResolverPolicyVirtualNetworkLinkName} + /// + /// + /// Operation Id + /// DnsResolverPolicyVirtualNetworkLinks_Delete + /// + /// + /// Default Api Version + /// 2023-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// ETag of the resource. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting any concurrent changes. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, string ifMatch = null, CancellationToken cancellationToken = default) + { + using var scope = _dnsResolverPolicyVirtualNetworkLinkClientDiagnostics.CreateScope("DnsResolverPolicyVirtualNetworkLinkResource.Delete"); + scope.Start(); + try + { + var response = await _dnsResolverPolicyVirtualNetworkLinkRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, cancellationToken).ConfigureAwait(false); + var operation = new DnsResolverArmOperation(_dnsResolverPolicyVirtualNetworkLinkClientDiagnostics, Pipeline, _dnsResolverPolicyVirtualNetworkLinkRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes a DNS resolver policy virtual network link. WARNING: This operation cannot be undone. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName}/virtualNetworkLinks/{dnsResolverPolicyVirtualNetworkLinkName} + /// + /// + /// Operation Id + /// DnsResolverPolicyVirtualNetworkLinks_Delete + /// + /// + /// Default Api Version + /// 2023-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// ETag of the resource. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting any concurrent changes. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, string ifMatch = null, CancellationToken cancellationToken = default) + { + using var scope = _dnsResolverPolicyVirtualNetworkLinkClientDiagnostics.CreateScope("DnsResolverPolicyVirtualNetworkLinkResource.Delete"); + scope.Start(); + try + { + var response = _dnsResolverPolicyVirtualNetworkLinkRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, cancellationToken); + var operation = new DnsResolverArmOperation(_dnsResolverPolicyVirtualNetworkLinkClientDiagnostics, Pipeline, _dnsResolverPolicyVirtualNetworkLinkRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Updates a DNS resolver policy virtual network link. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName}/virtualNetworkLinks/{dnsResolverPolicyVirtualNetworkLinkName} + /// + /// + /// Operation Id + /// DnsResolverPolicyVirtualNetworkLinks_Update + /// + /// + /// Default Api Version + /// 2023-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Parameters supplied to the Update operation. + /// ETag of the resource. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting any concurrent changes. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, DnsResolverPolicyVirtualNetworkLinkPatch patch, string ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _dnsResolverPolicyVirtualNetworkLinkClientDiagnostics.CreateScope("DnsResolverPolicyVirtualNetworkLinkResource.Update"); + scope.Start(); + try + { + var response = await _dnsResolverPolicyVirtualNetworkLinkRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, ifMatch, cancellationToken).ConfigureAwait(false); + var operation = new DnsResolverArmOperation(new DnsResolverPolicyVirtualNetworkLinkOperationSource(Client), _dnsResolverPolicyVirtualNetworkLinkClientDiagnostics, Pipeline, _dnsResolverPolicyVirtualNetworkLinkRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, ifMatch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Updates a DNS resolver policy virtual network link. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName}/virtualNetworkLinks/{dnsResolverPolicyVirtualNetworkLinkName} + /// + /// + /// Operation Id + /// DnsResolverPolicyVirtualNetworkLinks_Update + /// + /// + /// Default Api Version + /// 2023-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Parameters supplied to the Update operation. + /// ETag of the resource. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting any concurrent changes. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, DnsResolverPolicyVirtualNetworkLinkPatch patch, string ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _dnsResolverPolicyVirtualNetworkLinkClientDiagnostics.CreateScope("DnsResolverPolicyVirtualNetworkLinkResource.Update"); + scope.Start(); + try + { + var response = _dnsResolverPolicyVirtualNetworkLinkRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, ifMatch, cancellationToken); + var operation = new DnsResolverArmOperation(new DnsResolverPolicyVirtualNetworkLinkOperationSource(Client), _dnsResolverPolicyVirtualNetworkLinkClientDiagnostics, Pipeline, _dnsResolverPolicyVirtualNetworkLinkRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, ifMatch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName}/virtualNetworkLinks/{dnsResolverPolicyVirtualNetworkLinkName} + /// + /// + /// Operation Id + /// DnsResolverPolicyVirtualNetworkLinks_Get + /// + /// + /// Default Api Version + /// 2023-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _dnsResolverPolicyVirtualNetworkLinkClientDiagnostics.CreateScope("DnsResolverPolicyVirtualNetworkLinkResource.AddTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues[key] = value; + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _dnsResolverPolicyVirtualNetworkLinkRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new DnsResolverPolicyVirtualNetworkLinkResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new DnsResolverPolicyVirtualNetworkLinkPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName}/virtualNetworkLinks/{dnsResolverPolicyVirtualNetworkLinkName} + /// + /// + /// Operation Id + /// DnsResolverPolicyVirtualNetworkLinks_Get + /// + /// + /// Default Api Version + /// 2023-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _dnsResolverPolicyVirtualNetworkLinkClientDiagnostics.CreateScope("DnsResolverPolicyVirtualNetworkLinkResource.AddTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues[key] = value; + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _dnsResolverPolicyVirtualNetworkLinkRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new DnsResolverPolicyVirtualNetworkLinkResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new DnsResolverPolicyVirtualNetworkLinkPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName}/virtualNetworkLinks/{dnsResolverPolicyVirtualNetworkLinkName} + /// + /// + /// Operation Id + /// DnsResolverPolicyVirtualNetworkLinks_Get + /// + /// + /// Default Api Version + /// 2023-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _dnsResolverPolicyVirtualNetworkLinkClientDiagnostics.CreateScope("DnsResolverPolicyVirtualNetworkLinkResource.SetTags"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + await GetTagResource().DeleteAsync(WaitUntil.Completed, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _dnsResolverPolicyVirtualNetworkLinkRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new DnsResolverPolicyVirtualNetworkLinkResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new DnsResolverPolicyVirtualNetworkLinkPatch(); + patch.Tags.ReplaceWith(tags); + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName}/virtualNetworkLinks/{dnsResolverPolicyVirtualNetworkLinkName} + /// + /// + /// Operation Id + /// DnsResolverPolicyVirtualNetworkLinks_Get + /// + /// + /// Default Api Version + /// 2023-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _dnsResolverPolicyVirtualNetworkLinkClientDiagnostics.CreateScope("DnsResolverPolicyVirtualNetworkLinkResource.SetTags"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + GetTagResource().Delete(WaitUntil.Completed, cancellationToken: cancellationToken); + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _dnsResolverPolicyVirtualNetworkLinkRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new DnsResolverPolicyVirtualNetworkLinkResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new DnsResolverPolicyVirtualNetworkLinkPatch(); + patch.Tags.ReplaceWith(tags); + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName}/virtualNetworkLinks/{dnsResolverPolicyVirtualNetworkLinkName} + /// + /// + /// Operation Id + /// DnsResolverPolicyVirtualNetworkLinks_Get + /// + /// + /// Default Api Version + /// 2023-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _dnsResolverPolicyVirtualNetworkLinkClientDiagnostics.CreateScope("DnsResolverPolicyVirtualNetworkLinkResource.RemoveTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.Remove(key); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _dnsResolverPolicyVirtualNetworkLinkRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new DnsResolverPolicyVirtualNetworkLinkResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new DnsResolverPolicyVirtualNetworkLinkPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName}/virtualNetworkLinks/{dnsResolverPolicyVirtualNetworkLinkName} + /// + /// + /// Operation Id + /// DnsResolverPolicyVirtualNetworkLinks_Get + /// + /// + /// Default Api Version + /// 2023-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _dnsResolverPolicyVirtualNetworkLinkClientDiagnostics.CreateScope("DnsResolverPolicyVirtualNetworkLinkResource.RemoveTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.Remove(key); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _dnsResolverPolicyVirtualNetworkLinkRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new DnsResolverPolicyVirtualNetworkLinkResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new DnsResolverPolicyVirtualNetworkLinkPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverResource.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverResource.cs index ea72be9cf507..2cc180b5eb02 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverResource.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverResource.cs @@ -110,7 +110,7 @@ public virtual DnsResolverInboundEndpointCollection GetDnsResolverInboundEndpoin /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetDnsRe /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -179,7 +179,7 @@ public virtual DnsResolverOutboundEndpointCollection GetDnsResolverOutboundEndpo /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -210,7 +210,7 @@ public virtual async Task> GetDnsR /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -241,7 +241,7 @@ public virtual Response GetDnsResolverOutbo /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -281,7 +281,7 @@ public virtual async Task> GetAsync(CancellationTo /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -321,7 +321,7 @@ public virtual Response Get(CancellationToken cancellationT /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -364,7 +364,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, string /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -407,7 +407,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, string ifMatch = null, C /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -454,7 +454,7 @@ public virtual async Task> UpdateAsync(WaitUnt /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -501,7 +501,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, Dns /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -563,7 +563,7 @@ public virtual async Task> AddTagAsync(string key, /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -625,7 +625,7 @@ public virtual Response AddTag(string key, string value, Ca /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -682,7 +682,7 @@ public virtual async Task> SetTagsAsync(IDictionar /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -739,7 +739,7 @@ public virtual Response SetTags(IDictionary /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -799,7 +799,7 @@ public virtual async Task> RemoveTagAsync(string k /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsSecurityRuleCollection.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsSecurityRuleCollection.cs new file mode 100644 index 000000000000..3af6c0c5919d --- /dev/null +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsSecurityRuleCollection.cs @@ -0,0 +1,499 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.DnsResolver +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetDnsSecurityRules method from an instance of . + /// + public partial class DnsSecurityRuleCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _dnsSecurityRuleClientDiagnostics; + private readonly DnsSecurityRulesRestOperations _dnsSecurityRuleRestClient; + + /// Initializes a new instance of the class for mocking. + protected DnsSecurityRuleCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal DnsSecurityRuleCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _dnsSecurityRuleClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DnsResolver", DnsSecurityRuleResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(DnsSecurityRuleResource.ResourceType, out string dnsSecurityRuleApiVersion); + _dnsSecurityRuleRestClient = new DnsSecurityRulesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dnsSecurityRuleApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != DnsResolverPolicyResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, DnsResolverPolicyResource.ResourceType), nameof(id)); + } + + /// + /// Creates or updates a DNS security rule for a DNS resolver policy. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName}/dnsSecurityRules/{dnsSecurityRuleName} + /// + /// + /// Operation Id + /// DnsSecurityRules_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2023-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the DNS security rule. + /// Parameters supplied to the CreateOrUpdate operation. + /// ETag of the resource. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting any concurrent changes. + /// Set to '*' to allow a new resource to be created, but to prevent updating an existing resource. Other values will be ignored. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string dnsSecurityRuleName, DnsSecurityRuleData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(dnsSecurityRuleName, nameof(dnsSecurityRuleName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _dnsSecurityRuleClientDiagnostics.CreateScope("DnsSecurityRuleCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _dnsSecurityRuleRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, dnsSecurityRuleName, data, ifMatch, ifNoneMatch, cancellationToken).ConfigureAwait(false); + var operation = new DnsResolverArmOperation(new DnsSecurityRuleOperationSource(Client), _dnsSecurityRuleClientDiagnostics, Pipeline, _dnsSecurityRuleRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, dnsSecurityRuleName, data, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or updates a DNS security rule for a DNS resolver policy. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName}/dnsSecurityRules/{dnsSecurityRuleName} + /// + /// + /// Operation Id + /// DnsSecurityRules_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2023-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the DNS security rule. + /// Parameters supplied to the CreateOrUpdate operation. + /// ETag of the resource. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting any concurrent changes. + /// Set to '*' to allow a new resource to be created, but to prevent updating an existing resource. Other values will be ignored. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string dnsSecurityRuleName, DnsSecurityRuleData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(dnsSecurityRuleName, nameof(dnsSecurityRuleName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _dnsSecurityRuleClientDiagnostics.CreateScope("DnsSecurityRuleCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _dnsSecurityRuleRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, dnsSecurityRuleName, data, ifMatch, ifNoneMatch, cancellationToken); + var operation = new DnsResolverArmOperation(new DnsSecurityRuleOperationSource(Client), _dnsSecurityRuleClientDiagnostics, Pipeline, _dnsSecurityRuleRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, dnsSecurityRuleName, data, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets properties of a DNS security rule for a DNS resolver policy. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName}/dnsSecurityRules/{dnsSecurityRuleName} + /// + /// + /// Operation Id + /// DnsSecurityRules_Get + /// + /// + /// Default Api Version + /// 2023-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the DNS security rule. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string dnsSecurityRuleName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(dnsSecurityRuleName, nameof(dnsSecurityRuleName)); + + using var scope = _dnsSecurityRuleClientDiagnostics.CreateScope("DnsSecurityRuleCollection.Get"); + scope.Start(); + try + { + var response = await _dnsSecurityRuleRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, dnsSecurityRuleName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DnsSecurityRuleResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets properties of a DNS security rule for a DNS resolver policy. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName}/dnsSecurityRules/{dnsSecurityRuleName} + /// + /// + /// Operation Id + /// DnsSecurityRules_Get + /// + /// + /// Default Api Version + /// 2023-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the DNS security rule. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string dnsSecurityRuleName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(dnsSecurityRuleName, nameof(dnsSecurityRuleName)); + + using var scope = _dnsSecurityRuleClientDiagnostics.CreateScope("DnsSecurityRuleCollection.Get"); + scope.Start(); + try + { + var response = _dnsSecurityRuleRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, dnsSecurityRuleName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DnsSecurityRuleResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Lists DNS security rules for a DNS resolver policy. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName}/dnsSecurityRules + /// + /// + /// Operation Id + /// DnsSecurityRules_List + /// + /// + /// Default Api Version + /// 2023-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The maximum number of results to return. If not specified, returns up to 100 results. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(int? top = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _dnsSecurityRuleRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, top); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dnsSecurityRuleRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, top); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DnsSecurityRuleResource(Client, DnsSecurityRuleData.DeserializeDnsSecurityRuleData(e)), _dnsSecurityRuleClientDiagnostics, Pipeline, "DnsSecurityRuleCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Lists DNS security rules for a DNS resolver policy. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName}/dnsSecurityRules + /// + /// + /// Operation Id + /// DnsSecurityRules_List + /// + /// + /// Default Api Version + /// 2023-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The maximum number of results to return. If not specified, returns up to 100 results. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(int? top = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _dnsSecurityRuleRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, top); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dnsSecurityRuleRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, top); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DnsSecurityRuleResource(Client, DnsSecurityRuleData.DeserializeDnsSecurityRuleData(e)), _dnsSecurityRuleClientDiagnostics, Pipeline, "DnsSecurityRuleCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName}/dnsSecurityRules/{dnsSecurityRuleName} + /// + /// + /// Operation Id + /// DnsSecurityRules_Get + /// + /// + /// Default Api Version + /// 2023-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the DNS security rule. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string dnsSecurityRuleName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(dnsSecurityRuleName, nameof(dnsSecurityRuleName)); + + using var scope = _dnsSecurityRuleClientDiagnostics.CreateScope("DnsSecurityRuleCollection.Exists"); + scope.Start(); + try + { + var response = await _dnsSecurityRuleRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, dnsSecurityRuleName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName}/dnsSecurityRules/{dnsSecurityRuleName} + /// + /// + /// Operation Id + /// DnsSecurityRules_Get + /// + /// + /// Default Api Version + /// 2023-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the DNS security rule. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string dnsSecurityRuleName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(dnsSecurityRuleName, nameof(dnsSecurityRuleName)); + + using var scope = _dnsSecurityRuleClientDiagnostics.CreateScope("DnsSecurityRuleCollection.Exists"); + scope.Start(); + try + { + var response = _dnsSecurityRuleRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, dnsSecurityRuleName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName}/dnsSecurityRules/{dnsSecurityRuleName} + /// + /// + /// Operation Id + /// DnsSecurityRules_Get + /// + /// + /// Default Api Version + /// 2023-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the DNS security rule. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string dnsSecurityRuleName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(dnsSecurityRuleName, nameof(dnsSecurityRuleName)); + + using var scope = _dnsSecurityRuleClientDiagnostics.CreateScope("DnsSecurityRuleCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _dnsSecurityRuleRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, dnsSecurityRuleName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new DnsSecurityRuleResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName}/dnsSecurityRules/{dnsSecurityRuleName} + /// + /// + /// Operation Id + /// DnsSecurityRules_Get + /// + /// + /// Default Api Version + /// 2023-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the DNS security rule. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string dnsSecurityRuleName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(dnsSecurityRuleName, nameof(dnsSecurityRuleName)); + + using var scope = _dnsSecurityRuleClientDiagnostics.CreateScope("DnsSecurityRuleCollection.GetIfExists"); + scope.Start(); + try + { + var response = _dnsSecurityRuleRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, dnsSecurityRuleName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new DnsSecurityRuleResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsSecurityRuleData.Serialization.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsSecurityRuleData.Serialization.cs new file mode 100644 index 000000000000..50bce91b5f8e --- /dev/null +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsSecurityRuleData.Serialization.cs @@ -0,0 +1,263 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.DnsResolver.Models; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.Resources.Models; + +namespace Azure.ResourceManager.DnsResolver +{ + public partial class DnsSecurityRuleData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DnsSecurityRuleData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (options.Format != "W" && Optional.IsDefined(ETag)) + { + writer.WritePropertyName("etag"u8); + writer.WriteStringValue(ETag.Value.ToString()); + } + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + writer.WritePropertyName("priority"u8); + writer.WriteNumberValue(Priority); + writer.WritePropertyName("action"u8); + writer.WriteObjectValue(Action, options); + writer.WritePropertyName("dnsResolverDomainLists"u8); + writer.WriteStartArray(); + foreach (var item in DnsResolverDomainLists) + { + JsonSerializer.Serialize(writer, item); + } + writer.WriteEndArray(); + if (Optional.IsDefined(DnsSecurityRuleState)) + { + writer.WritePropertyName("dnsSecurityRuleState"u8); + writer.WriteStringValue(DnsSecurityRuleState.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + writer.WriteEndObject(); + } + + DnsSecurityRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DnsSecurityRuleData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDnsSecurityRuleData(document.RootElement, options); + } + + internal static DnsSecurityRuleData DeserializeDnsSecurityRuleData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ETag? etag = default; + IDictionary tags = default; + AzureLocation location = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + int priority = default; + DnsSecurityRuleAction action = default; + IList dnsResolverDomainLists = default; + DnsSecurityRuleState? dnsSecurityRuleState = default; + DnsResolverProvisioningState? provisioningState = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("etag"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + etag = new ETag(property.Value.GetString()); + continue; + } + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("location"u8)) + { + location = new AzureLocation(property.Value.GetString()); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("priority"u8)) + { + priority = property0.Value.GetInt32(); + continue; + } + if (property0.NameEquals("action"u8)) + { + action = DnsSecurityRuleAction.DeserializeDnsSecurityRuleAction(property0.Value, options); + continue; + } + if (property0.NameEquals("dnsResolverDomainLists"u8)) + { + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(JsonSerializer.Deserialize(item.GetRawText())); + } + dnsResolverDomainLists = array; + continue; + } + if (property0.NameEquals("dnsSecurityRuleState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dnsSecurityRuleState = new DnsSecurityRuleState(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("provisioningState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new DnsResolverProvisioningState(property0.Value.GetString()); + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DnsSecurityRuleData( + id, + name, + type, + systemData, + tags ?? new ChangeTrackingDictionary(), + location, + etag, + priority, + action, + dnsResolverDomainLists, + dnsSecurityRuleState, + provisioningState, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DnsSecurityRuleData)} does not support writing '{options.Format}' format."); + } + } + + DnsSecurityRuleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeDnsSecurityRuleData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DnsSecurityRuleData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsSecurityRuleData.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsSecurityRuleData.cs new file mode 100644 index 000000000000..12f1d9cbd105 --- /dev/null +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsSecurityRuleData.cs @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Core; +using Azure.ResourceManager.DnsResolver.Models; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.Resources.Models; + +namespace Azure.ResourceManager.DnsResolver +{ + /// + /// A class representing the DnsSecurityRule data model. + /// Describes a DNS security rule. + /// + public partial class DnsSecurityRuleData : TrackedResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The location. + /// The priority of the DNS security rule. + /// The action to take on DNS requests that match the DNS security rule. + /// DNS resolver policy domains lists that the DNS security rule applies to. + /// or is null. + public DnsSecurityRuleData(AzureLocation location, int priority, DnsSecurityRuleAction action, IEnumerable dnsResolverDomainLists) : base(location) + { + Argument.AssertNotNull(action, nameof(action)); + Argument.AssertNotNull(dnsResolverDomainLists, nameof(dnsResolverDomainLists)); + + Priority = priority; + Action = action; + DnsResolverDomainLists = dnsResolverDomainLists.ToList(); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// ETag of the DNS security rule. + /// The priority of the DNS security rule. + /// The action to take on DNS requests that match the DNS security rule. + /// DNS resolver policy domains lists that the DNS security rule applies to. + /// The state of DNS security rule. + /// The current provisioning state of the DNS security rule. This is a read-only property and any attempt to set this value will be ignored. + /// Keeps track of any properties unknown to the library. + internal DnsSecurityRuleData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ETag? etag, int priority, DnsSecurityRuleAction action, IList dnsResolverDomainLists, DnsSecurityRuleState? dnsSecurityRuleState, DnsResolverProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + { + ETag = etag; + Priority = priority; + Action = action; + DnsResolverDomainLists = dnsResolverDomainLists; + DnsSecurityRuleState = dnsSecurityRuleState; + ProvisioningState = provisioningState; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DnsSecurityRuleData() + { + } + + /// ETag of the DNS security rule. + public ETag? ETag { get; } + /// The priority of the DNS security rule. + public int Priority { get; set; } + /// The action to take on DNS requests that match the DNS security rule. + public DnsSecurityRuleAction Action { get; set; } + /// DNS resolver policy domains lists that the DNS security rule applies to. + public IList DnsResolverDomainLists { get; } + /// The state of DNS security rule. + public DnsSecurityRuleState? DnsSecurityRuleState { get; set; } + /// The current provisioning state of the DNS security rule. This is a read-only property and any attempt to set this value will be ignored. + public DnsResolverProvisioningState? ProvisioningState { get; } + } +} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsSecurityRuleResource.Serialization.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsSecurityRuleResource.Serialization.cs new file mode 100644 index 000000000000..b5f26a710cc7 --- /dev/null +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsSecurityRuleResource.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.DnsResolver +{ + public partial class DnsSecurityRuleResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + DnsSecurityRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + DnsSecurityRuleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeGatewayResource.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsSecurityRuleResource.cs similarity index 53% rename from sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeGatewayResource.cs rename to sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsSecurityRuleResource.cs index 341b964fe557..39a55cc73c5a 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeGatewayResource.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsSecurityRuleResource.cs @@ -12,58 +12,58 @@ using System.Threading.Tasks; using Azure.Core; using Azure.Core.Pipeline; -using Azure.ResourceManager.HybridCompute.Models; -using Azure.ResourceManager.Resources; +using Azure.ResourceManager.DnsResolver.Models; -namespace Azure.ResourceManager.HybridCompute +namespace Azure.ResourceManager.DnsResolver { /// - /// A Class representing a HybridComputeGateway along with the instance operations that can be performed on it. - /// If you have a you can construct a - /// from an instance of using the GetHybridComputeGatewayResource method. - /// Otherwise you can get one from its parent resource using the GetHybridComputeGateway method. + /// A Class representing a DnsSecurityRule along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetDnsSecurityRuleResource method. + /// Otherwise you can get one from its parent resource using the GetDnsSecurityRule method. /// - public partial class HybridComputeGatewayResource : ArmResource + public partial class DnsSecurityRuleResource : ArmResource { - /// Generate the resource identifier of a instance. + /// Generate the resource identifier of a instance. /// The subscriptionId. /// The resourceGroupName. - /// The gatewayName. - public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string gatewayName) + /// The dnsResolverPolicyName. + /// The dnsSecurityRuleName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string dnsResolverPolicyName, string dnsSecurityRuleName) { - var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/gateways/{gatewayName}"; + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName}/dnsSecurityRules/{dnsSecurityRuleName}"; return new ResourceIdentifier(resourceId); } - private readonly ClientDiagnostics _hybridComputeGatewayGatewaysClientDiagnostics; - private readonly GatewaysRestOperations _hybridComputeGatewayGatewaysRestClient; - private readonly HybridComputeGatewayData _data; + private readonly ClientDiagnostics _dnsSecurityRuleClientDiagnostics; + private readonly DnsSecurityRulesRestOperations _dnsSecurityRuleRestClient; + private readonly DnsSecurityRuleData _data; /// Gets the resource type for the operations. - public static readonly ResourceType ResourceType = "Microsoft.HybridCompute/gateways"; + public static readonly ResourceType ResourceType = "Microsoft.Network/dnsResolverPolicies/dnsSecurityRules"; - /// Initializes a new instance of the class for mocking. - protected HybridComputeGatewayResource() + /// Initializes a new instance of the class for mocking. + protected DnsSecurityRuleResource() { } - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// The client parameters to use in these operations. /// The resource that is the target of operations. - internal HybridComputeGatewayResource(ArmClient client, HybridComputeGatewayData data) : this(client, data.Id) + internal DnsSecurityRuleResource(ArmClient client, DnsSecurityRuleData data) : this(client, data.Id) { HasData = true; _data = data; } - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// The client parameters to use in these operations. /// The identifier of the resource that is the target of operations. - internal HybridComputeGatewayResource(ArmClient client, ResourceIdentifier id) : base(client, id) + internal DnsSecurityRuleResource(ArmClient client, ResourceIdentifier id) : base(client, id) { - _hybridComputeGatewayGatewaysClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.HybridCompute", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string hybridComputeGatewayGatewaysApiVersion); - _hybridComputeGatewayGatewaysRestClient = new GatewaysRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, hybridComputeGatewayGatewaysApiVersion); + _dnsSecurityRuleClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DnsResolver", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string dnsSecurityRuleApiVersion); + _dnsSecurityRuleRestClient = new DnsSecurityRulesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dnsSecurityRuleApiVersion); #if DEBUG ValidateResourceId(Id); #endif @@ -74,7 +74,7 @@ internal HybridComputeGatewayResource(ArmClient client, ResourceIdentifier id) : /// Gets the data representing this Feature. /// Throws if there is no data loaded in the current instance. - public virtual HybridComputeGatewayData Data + public virtual DnsSecurityRuleData Data { get { @@ -91,37 +91,37 @@ internal static void ValidateResourceId(ResourceIdentifier id) } /// - /// Retrieves information about the view of a gateway. + /// Gets properties of a DNS security rule for a DNS resolver policy. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/gateways/{gatewayName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName}/dnsSecurityRules/{dnsSecurityRuleName} /// /// /// Operation Id - /// Gateways_Get + /// DnsSecurityRules_Get /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2023-07-01-preview /// /// /// Resource - /// + /// /// /// /// /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) { - using var scope = _hybridComputeGatewayGatewaysClientDiagnostics.CreateScope("HybridComputeGatewayResource.Get"); + using var scope = _dnsSecurityRuleClientDiagnostics.CreateScope("DnsSecurityRuleResource.Get"); scope.Start(); try { - var response = await _hybridComputeGatewayGatewaysRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var response = await _dnsSecurityRuleRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new HybridComputeGatewayResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new DnsSecurityRuleResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -131,37 +131,37 @@ public virtual async Task> GetAsync(Cance } /// - /// Retrieves information about the view of a gateway. + /// Gets properties of a DNS security rule for a DNS resolver policy. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/gateways/{gatewayName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName}/dnsSecurityRules/{dnsSecurityRuleName} /// /// /// Operation Id - /// Gateways_Get + /// DnsSecurityRules_Get /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2023-07-01-preview /// /// /// Resource - /// + /// /// /// /// /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) + public virtual Response Get(CancellationToken cancellationToken = default) { - using var scope = _hybridComputeGatewayGatewaysClientDiagnostics.CreateScope("HybridComputeGatewayResource.Get"); + using var scope = _dnsSecurityRuleClientDiagnostics.CreateScope("DnsSecurityRuleResource.Get"); scope.Start(); try { - var response = _hybridComputeGatewayGatewaysRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var response = _dnsSecurityRuleRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new HybridComputeGatewayResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new DnsSecurityRuleResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -171,36 +171,37 @@ public virtual Response Get(CancellationToken canc } /// - /// The operation to delete a gateway. + /// Deletes a DNS security rule for a DNS resolver policy. WARNING: This operation cannot be undone. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/gateways/{gatewayName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName}/dnsSecurityRules/{dnsSecurityRuleName} /// /// /// Operation Id - /// Gateways_Delete + /// DnsSecurityRules_Delete /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2023-07-01-preview /// /// /// Resource - /// + /// /// /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// ETag of the resource. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting any concurrent changes. /// The cancellation token to use. - public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + public virtual async Task DeleteAsync(WaitUntil waitUntil, string ifMatch = null, CancellationToken cancellationToken = default) { - using var scope = _hybridComputeGatewayGatewaysClientDiagnostics.CreateScope("HybridComputeGatewayResource.Delete"); + using var scope = _dnsSecurityRuleClientDiagnostics.CreateScope("DnsSecurityRuleResource.Delete"); scope.Start(); try { - var response = await _hybridComputeGatewayGatewaysRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new HybridComputeArmOperation(_hybridComputeGatewayGatewaysClientDiagnostics, Pipeline, _hybridComputeGatewayGatewaysRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + var response = await _dnsSecurityRuleRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, cancellationToken).ConfigureAwait(false); + var operation = new DnsResolverArmOperation(_dnsSecurityRuleClientDiagnostics, Pipeline, _dnsSecurityRuleRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -213,36 +214,37 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell } /// - /// The operation to delete a gateway. + /// Deletes a DNS security rule for a DNS resolver policy. WARNING: This operation cannot be undone. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/gateways/{gatewayName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName}/dnsSecurityRules/{dnsSecurityRuleName} /// /// /// Operation Id - /// Gateways_Delete + /// DnsSecurityRules_Delete /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2023-07-01-preview /// /// /// Resource - /// + /// /// /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// ETag of the resource. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting any concurrent changes. /// The cancellation token to use. - public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + public virtual ArmOperation Delete(WaitUntil waitUntil, string ifMatch = null, CancellationToken cancellationToken = default) { - using var scope = _hybridComputeGatewayGatewaysClientDiagnostics.CreateScope("HybridComputeGatewayResource.Delete"); + using var scope = _dnsSecurityRuleClientDiagnostics.CreateScope("DnsSecurityRuleResource.Delete"); scope.Start(); try { - var response = _hybridComputeGatewayGatewaysRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - var operation = new HybridComputeArmOperation(_hybridComputeGatewayGatewaysClientDiagnostics, Pipeline, _hybridComputeGatewayGatewaysRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + var response = _dnsSecurityRuleRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, cancellationToken); + var operation = new DnsResolverArmOperation(_dnsSecurityRuleClientDiagnostics, Pipeline, _dnsSecurityRuleRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -255,39 +257,44 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel } /// - /// The operation to update a gateway. + /// Updates a DNS security rule. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/gateways/{gatewayName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName}/dnsSecurityRules/{dnsSecurityRuleName} /// /// /// Operation Id - /// Gateways_Update + /// DnsSecurityRules_Update /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2023-07-01-preview /// /// /// Resource - /// + /// /// /// /// - /// Parameters supplied to the Update gateway operation. + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Parameters supplied to the Update operation. + /// ETag of the resource. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting any concurrent changes. /// The cancellation token to use. /// is null. - public virtual async Task> UpdateAsync(HybridComputeGatewayPatch patch, CancellationToken cancellationToken = default) + public virtual async Task> UpdateAsync(WaitUntil waitUntil, DnsSecurityRulePatch patch, string ifMatch = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(patch, nameof(patch)); - using var scope = _hybridComputeGatewayGatewaysClientDiagnostics.CreateScope("HybridComputeGatewayResource.Update"); + using var scope = _dnsSecurityRuleClientDiagnostics.CreateScope("DnsSecurityRuleResource.Update"); scope.Start(); try { - var response = await _hybridComputeGatewayGatewaysRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new HybridComputeGatewayResource(Client, response.Value), response.GetRawResponse()); + var response = await _dnsSecurityRuleRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, ifMatch, cancellationToken).ConfigureAwait(false); + var operation = new DnsResolverArmOperation(new DnsSecurityRuleOperationSource(Client), _dnsSecurityRuleClientDiagnostics, Pipeline, _dnsSecurityRuleRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, ifMatch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; } catch (Exception e) { @@ -297,39 +304,44 @@ public virtual async Task> UpdateAsync(Hy } /// - /// The operation to update a gateway. + /// Updates a DNS security rule. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/gateways/{gatewayName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName}/dnsSecurityRules/{dnsSecurityRuleName} /// /// /// Operation Id - /// Gateways_Update + /// DnsSecurityRules_Update /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2023-07-01-preview /// /// /// Resource - /// + /// /// /// /// - /// Parameters supplied to the Update gateway operation. + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Parameters supplied to the Update operation. + /// ETag of the resource. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting any concurrent changes. /// The cancellation token to use. /// is null. - public virtual Response Update(HybridComputeGatewayPatch patch, CancellationToken cancellationToken = default) + public virtual ArmOperation Update(WaitUntil waitUntil, DnsSecurityRulePatch patch, string ifMatch = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(patch, nameof(patch)); - using var scope = _hybridComputeGatewayGatewaysClientDiagnostics.CreateScope("HybridComputeGatewayResource.Update"); + using var scope = _dnsSecurityRuleClientDiagnostics.CreateScope("DnsSecurityRuleResource.Update"); scope.Start(); try { - var response = _hybridComputeGatewayGatewaysRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken); - return Response.FromValue(new HybridComputeGatewayResource(Client, response.Value), response.GetRawResponse()); + var response = _dnsSecurityRuleRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, ifMatch, cancellationToken); + var operation = new DnsResolverArmOperation(new DnsSecurityRuleOperationSource(Client), _dnsSecurityRuleClientDiagnostics, Pipeline, _dnsSecurityRuleRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, ifMatch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; } catch (Exception e) { @@ -343,19 +355,19 @@ public virtual Response Update(HybridComputeGatewa /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/gateways/{gatewayName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName}/dnsSecurityRules/{dnsSecurityRuleName} /// /// /// Operation Id - /// Gateways_Get + /// DnsSecurityRules_Get /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2023-07-01-preview /// /// /// Resource - /// + /// /// /// /// @@ -363,12 +375,12 @@ public virtual Response Update(HybridComputeGatewa /// The value for the tag. /// The cancellation token to use. /// or is null. - public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) + public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) { Argument.AssertNotNull(key, nameof(key)); Argument.AssertNotNull(value, nameof(value)); - using var scope = _hybridComputeGatewayGatewaysClientDiagnostics.CreateScope("HybridComputeGatewayResource.AddTag"); + using var scope = _dnsSecurityRuleClientDiagnostics.CreateScope("DnsSecurityRuleResource.AddTag"); scope.Start(); try { @@ -377,20 +389,20 @@ public virtual async Task> AddTagAsync(st var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); originalTags.Value.Data.TagValues[key] = value; await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _hybridComputeGatewayGatewaysRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new HybridComputeGatewayResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + var originalResponse = await _dnsSecurityRuleRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new DnsSecurityRuleResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else { var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new HybridComputeGatewayPatch(); + var patch = new DnsSecurityRulePatch(); foreach (var tag in current.Tags) { patch.Tags.Add(tag); } patch.Tags[key] = value; - var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); - return result; + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); } } catch (Exception e) @@ -405,19 +417,19 @@ public virtual async Task> AddTagAsync(st /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/gateways/{gatewayName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName}/dnsSecurityRules/{dnsSecurityRuleName} /// /// /// Operation Id - /// Gateways_Get + /// DnsSecurityRules_Get /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2023-07-01-preview /// /// /// Resource - /// + /// /// /// /// @@ -425,12 +437,12 @@ public virtual async Task> AddTagAsync(st /// The value for the tag. /// The cancellation token to use. /// or is null. - public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) + public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) { Argument.AssertNotNull(key, nameof(key)); Argument.AssertNotNull(value, nameof(value)); - using var scope = _hybridComputeGatewayGatewaysClientDiagnostics.CreateScope("HybridComputeGatewayResource.AddTag"); + using var scope = _dnsSecurityRuleClientDiagnostics.CreateScope("DnsSecurityRuleResource.AddTag"); scope.Start(); try { @@ -439,20 +451,20 @@ public virtual Response AddTag(string key, string var originalTags = GetTagResource().Get(cancellationToken); originalTags.Value.Data.TagValues[key] = value; GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _hybridComputeGatewayGatewaysRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - return Response.FromValue(new HybridComputeGatewayResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + var originalResponse = _dnsSecurityRuleRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new DnsSecurityRuleResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else { var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new HybridComputeGatewayPatch(); + var patch = new DnsSecurityRulePatch(); foreach (var tag in current.Tags) { patch.Tags.Add(tag); } patch.Tags[key] = value; - var result = Update(patch, cancellationToken: cancellationToken); - return result; + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); } } catch (Exception e) @@ -467,30 +479,30 @@ public virtual Response AddTag(string key, string /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/gateways/{gatewayName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName}/dnsSecurityRules/{dnsSecurityRuleName} /// /// /// Operation Id - /// Gateways_Get + /// DnsSecurityRules_Get /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2023-07-01-preview /// /// /// Resource - /// + /// /// /// /// /// The set of tags to use as replacement. /// The cancellation token to use. /// is null. - public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) + public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) { Argument.AssertNotNull(tags, nameof(tags)); - using var scope = _hybridComputeGatewayGatewaysClientDiagnostics.CreateScope("HybridComputeGatewayResource.SetTags"); + using var scope = _dnsSecurityRuleClientDiagnostics.CreateScope("DnsSecurityRuleResource.SetTags"); scope.Start(); try { @@ -500,16 +512,16 @@ public virtual async Task> SetTagsAsync(I var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); originalTags.Value.Data.TagValues.ReplaceWith(tags); await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _hybridComputeGatewayGatewaysRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new HybridComputeGatewayResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + var originalResponse = await _dnsSecurityRuleRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new DnsSecurityRuleResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else { var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new HybridComputeGatewayPatch(); + var patch = new DnsSecurityRulePatch(); patch.Tags.ReplaceWith(tags); - var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); - return result; + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); } } catch (Exception e) @@ -524,30 +536,30 @@ public virtual async Task> SetTagsAsync(I /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/gateways/{gatewayName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName}/dnsSecurityRules/{dnsSecurityRuleName} /// /// /// Operation Id - /// Gateways_Get + /// DnsSecurityRules_Get /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2023-07-01-preview /// /// /// Resource - /// + /// /// /// /// /// The set of tags to use as replacement. /// The cancellation token to use. /// is null. - public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) + public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) { Argument.AssertNotNull(tags, nameof(tags)); - using var scope = _hybridComputeGatewayGatewaysClientDiagnostics.CreateScope("HybridComputeGatewayResource.SetTags"); + using var scope = _dnsSecurityRuleClientDiagnostics.CreateScope("DnsSecurityRuleResource.SetTags"); scope.Start(); try { @@ -557,16 +569,16 @@ public virtual Response SetTags(IDictionary SetTags(IDictionary /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/gateways/{gatewayName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName}/dnsSecurityRules/{dnsSecurityRuleName} /// /// /// Operation Id - /// Gateways_Get + /// DnsSecurityRules_Get /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2023-07-01-preview /// /// /// Resource - /// + /// /// /// /// /// The key for the tag. /// The cancellation token to use. /// is null. - public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) + public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) { Argument.AssertNotNull(key, nameof(key)); - using var scope = _hybridComputeGatewayGatewaysClientDiagnostics.CreateScope("HybridComputeGatewayResource.RemoveTag"); + using var scope = _dnsSecurityRuleClientDiagnostics.CreateScope("DnsSecurityRuleResource.RemoveTag"); scope.Start(); try { @@ -613,20 +625,20 @@ public virtual async Task> RemoveTagAsync var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); originalTags.Value.Data.TagValues.Remove(key); await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _hybridComputeGatewayGatewaysRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new HybridComputeGatewayResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + var originalResponse = await _dnsSecurityRuleRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new DnsSecurityRuleResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else { var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new HybridComputeGatewayPatch(); + var patch = new DnsSecurityRulePatch(); foreach (var tag in current.Tags) { patch.Tags.Add(tag); } patch.Tags.Remove(key); - var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); - return result; + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); } } catch (Exception e) @@ -641,30 +653,30 @@ public virtual async Task> RemoveTagAsync /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/gateways/{gatewayName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName}/dnsSecurityRules/{dnsSecurityRuleName} /// /// /// Operation Id - /// Gateways_Get + /// DnsSecurityRules_Get /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2023-07-01-preview /// /// /// Resource - /// + /// /// /// /// /// The key for the tag. /// The cancellation token to use. /// is null. - public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) + public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) { Argument.AssertNotNull(key, nameof(key)); - using var scope = _hybridComputeGatewayGatewaysClientDiagnostics.CreateScope("HybridComputeGatewayResource.RemoveTag"); + using var scope = _dnsSecurityRuleClientDiagnostics.CreateScope("DnsSecurityRuleResource.RemoveTag"); scope.Start(); try { @@ -673,20 +685,20 @@ public virtual Response RemoveTag(string key, Canc var originalTags = GetTagResource().Get(cancellationToken); originalTags.Value.Data.TagValues.Remove(key); GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _hybridComputeGatewayGatewaysRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - return Response.FromValue(new HybridComputeGatewayResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + var originalResponse = _dnsSecurityRuleRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new DnsSecurityRuleResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else { var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new HybridComputeGatewayPatch(); + var patch = new DnsSecurityRulePatch(); foreach (var tag in current.Tags) { patch.Tags.Add(tag); } patch.Tags.Remove(key); - var result = Update(patch, cancellationToken: cancellationToken); - return result; + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); } } catch (Exception e) diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Extensions/DnsResolverExtensions.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Extensions/DnsResolverExtensions.cs index d19928a39312..0a8644e11603 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Extensions/DnsResolverExtensions.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Extensions/DnsResolverExtensions.cs @@ -146,6 +146,82 @@ public static DnsForwardingRulesetVirtualNetworkLinkResource GetDnsForwardingRul return GetMockableDnsResolverArmClient(client).GetDnsForwardingRulesetVirtualNetworkLinkResource(id); } + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static DnsResolverPolicyResource GetDnsResolverPolicyResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableDnsResolverArmClient(client).GetDnsResolverPolicyResource(id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static DnsSecurityRuleResource GetDnsSecurityRuleResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableDnsResolverArmClient(client).GetDnsSecurityRuleResource(id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static DnsResolverPolicyVirtualNetworkLinkResource GetDnsResolverPolicyVirtualNetworkLinkResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableDnsResolverArmClient(client).GetDnsResolverPolicyVirtualNetworkLinkResource(id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static DnsResolverDomainListResource GetDnsResolverDomainListResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableDnsResolverArmClient(client).GetDnsResolverDomainListResource(id); + } + /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// You can use to create a from its components. @@ -195,7 +271,7 @@ public static DnsResolverCollection GetDnsResolvers(this ResourceGroupResource r /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -233,7 +309,7 @@ public static async Task> GetDnsResolverAsync(this /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -288,7 +364,7 @@ public static DnsForwardingRulesetCollection GetDnsForwardingRulesets(this Resou /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -326,7 +402,7 @@ public static async Task> GetDnsForwardin /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -351,6 +427,192 @@ public static Response GetDnsForwardingRuleset(thi return GetMockableDnsResolverResourceGroupResource(resourceGroupResource).GetDnsForwardingRuleset(rulesetName, cancellationToken); } + /// + /// Gets a collection of DnsResolverPolicyResources in the ResourceGroupResource. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// is null. + /// An object representing collection of DnsResolverPolicyResources and their operations over a DnsResolverPolicyResource. + public static DnsResolverPolicyCollection GetDnsResolverPolicies(this ResourceGroupResource resourceGroupResource) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableDnsResolverResourceGroupResource(resourceGroupResource).GetDnsResolverPolicies(); + } + + /// + /// Gets properties of a DNS resolver policy. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName} + /// + /// + /// Operation Id + /// DnsResolverPolicies_Get + /// + /// + /// Default Api Version + /// 2023-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the DNS resolver policy. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static async Task> GetDnsResolverPolicyAsync(this ResourceGroupResource resourceGroupResource, string dnsResolverPolicyName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return await GetMockableDnsResolverResourceGroupResource(resourceGroupResource).GetDnsResolverPolicyAsync(dnsResolverPolicyName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets properties of a DNS resolver policy. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName} + /// + /// + /// Operation Id + /// DnsResolverPolicies_Get + /// + /// + /// Default Api Version + /// 2023-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the DNS resolver policy. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static Response GetDnsResolverPolicy(this ResourceGroupResource resourceGroupResource, string dnsResolverPolicyName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableDnsResolverResourceGroupResource(resourceGroupResource).GetDnsResolverPolicy(dnsResolverPolicyName, cancellationToken); + } + + /// + /// Gets a collection of DnsResolverDomainListResources in the ResourceGroupResource. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// is null. + /// An object representing collection of DnsResolverDomainListResources and their operations over a DnsResolverDomainListResource. + public static DnsResolverDomainListCollection GetDnsResolverDomainLists(this ResourceGroupResource resourceGroupResource) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableDnsResolverResourceGroupResource(resourceGroupResource).GetDnsResolverDomainLists(); + } + + /// + /// Gets properties of a DNS resolver domain list. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverDomainLists/{dnsResolverDomainListName} + /// + /// + /// Operation Id + /// DnsResolverDomainLists_Get + /// + /// + /// Default Api Version + /// 2023-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the DNS resolver domain list. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static async Task> GetDnsResolverDomainListAsync(this ResourceGroupResource resourceGroupResource, string dnsResolverDomainListName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return await GetMockableDnsResolverResourceGroupResource(resourceGroupResource).GetDnsResolverDomainListAsync(dnsResolverDomainListName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets properties of a DNS resolver domain list. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverDomainLists/{dnsResolverDomainListName} + /// + /// + /// Operation Id + /// DnsResolverDomainLists_Get + /// + /// + /// Default Api Version + /// 2023-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the DNS resolver domain list. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static Response GetDnsResolverDomainList(this ResourceGroupResource resourceGroupResource, string dnsResolverDomainListName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableDnsResolverResourceGroupResource(resourceGroupResource).GetDnsResolverDomainList(dnsResolverDomainListName, cancellationToken); + } + /// /// Lists DNS resolvers in all resource groups of a subscription. /// @@ -364,7 +626,7 @@ public static Response GetDnsForwardingRuleset(thi /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -401,7 +663,7 @@ public static AsyncPageable GetDnsResolversAsync(this Subsc /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -438,7 +700,7 @@ public static Pageable GetDnsResolvers(this SubscriptionRes /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -475,7 +737,7 @@ public static AsyncPageable GetDnsForwardingRulese /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -498,5 +760,153 @@ public static Pageable GetDnsForwardingRulesets(th return GetMockableDnsResolverSubscriptionResource(subscriptionResource).GetDnsForwardingRulesets(top, cancellationToken); } + + /// + /// Lists DNS resolver policies in all resource groups of a subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Network/dnsResolverPolicies + /// + /// + /// Operation Id + /// DnsResolverPolicies_List + /// + /// + /// Default Api Version + /// 2023-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The maximum number of results to return. If not specified, returns up to 100 results. + /// The cancellation token to use. + /// is null. + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetDnsResolverPoliciesAsync(this SubscriptionResource subscriptionResource, int? top = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableDnsResolverSubscriptionResource(subscriptionResource).GetDnsResolverPoliciesAsync(top, cancellationToken); + } + + /// + /// Lists DNS resolver policies in all resource groups of a subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Network/dnsResolverPolicies + /// + /// + /// Operation Id + /// DnsResolverPolicies_List + /// + /// + /// Default Api Version + /// 2023-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The maximum number of results to return. If not specified, returns up to 100 results. + /// The cancellation token to use. + /// is null. + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetDnsResolverPolicies(this SubscriptionResource subscriptionResource, int? top = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableDnsResolverSubscriptionResource(subscriptionResource).GetDnsResolverPolicies(top, cancellationToken); + } + + /// + /// Lists DNS resolver domain lists in all resource groups of a subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Network/dnsResolverDomainLists + /// + /// + /// Operation Id + /// DnsResolverDomainLists_List + /// + /// + /// Default Api Version + /// 2023-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The maximum number of results to return. If not specified, returns up to 100 results. + /// The cancellation token to use. + /// is null. + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetDnsResolverDomainListsAsync(this SubscriptionResource subscriptionResource, int? top = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableDnsResolverSubscriptionResource(subscriptionResource).GetDnsResolverDomainListsAsync(top, cancellationToken); + } + + /// + /// Lists DNS resolver domain lists in all resource groups of a subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Network/dnsResolverDomainLists + /// + /// + /// Operation Id + /// DnsResolverDomainLists_List + /// + /// + /// Default Api Version + /// 2023-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The maximum number of results to return. If not specified, returns up to 100 results. + /// The cancellation token to use. + /// is null. + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetDnsResolverDomainLists(this SubscriptionResource subscriptionResource, int? top = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableDnsResolverSubscriptionResource(subscriptionResource).GetDnsResolverDomainLists(top, cancellationToken); + } } } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Extensions/MockableDnsResolverArmClient.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Extensions/MockableDnsResolverArmClient.cs index bee86dcf9d88..fe7c724bb0fd 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Extensions/MockableDnsResolverArmClient.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Extensions/MockableDnsResolverArmClient.cs @@ -106,6 +106,54 @@ public virtual DnsForwardingRulesetVirtualNetworkLinkResource GetDnsForwardingRu return new DnsForwardingRulesetVirtualNetworkLinkResource(Client, id); } + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual DnsResolverPolicyResource GetDnsResolverPolicyResource(ResourceIdentifier id) + { + DnsResolverPolicyResource.ValidateResourceId(id); + return new DnsResolverPolicyResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual DnsSecurityRuleResource GetDnsSecurityRuleResource(ResourceIdentifier id) + { + DnsSecurityRuleResource.ValidateResourceId(id); + return new DnsSecurityRuleResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual DnsResolverPolicyVirtualNetworkLinkResource GetDnsResolverPolicyVirtualNetworkLinkResource(ResourceIdentifier id) + { + DnsResolverPolicyVirtualNetworkLinkResource.ValidateResourceId(id); + return new DnsResolverPolicyVirtualNetworkLinkResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual DnsResolverDomainListResource GetDnsResolverDomainListResource(ResourceIdentifier id) + { + DnsResolverDomainListResource.ValidateResourceId(id); + return new DnsResolverDomainListResource(Client, id); + } + /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// You can use to create a from its components. diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Extensions/MockableDnsResolverResourceGroupResource.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Extensions/MockableDnsResolverResourceGroupResource.cs index dcbcca030803..5bd8723fdc94 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Extensions/MockableDnsResolverResourceGroupResource.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Extensions/MockableDnsResolverResourceGroupResource.cs @@ -53,7 +53,7 @@ public virtual DnsResolverCollection GetDnsResolvers() /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -84,7 +84,7 @@ public virtual async Task> GetDnsResolverAsync(str /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -122,7 +122,7 @@ public virtual DnsForwardingRulesetCollection GetDnsForwardingRulesets() /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -153,7 +153,7 @@ public virtual async Task> GetDnsForwardi /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -170,5 +170,143 @@ public virtual Response GetDnsForwardingRuleset(st { return GetDnsForwardingRulesets().Get(rulesetName, cancellationToken); } + + /// Gets a collection of DnsResolverPolicyResources in the ResourceGroupResource. + /// An object representing collection of DnsResolverPolicyResources and their operations over a DnsResolverPolicyResource. + public virtual DnsResolverPolicyCollection GetDnsResolverPolicies() + { + return GetCachedClient(client => new DnsResolverPolicyCollection(client, Id)); + } + + /// + /// Gets properties of a DNS resolver policy. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName} + /// + /// + /// Operation Id + /// DnsResolverPolicies_Get + /// + /// + /// Default Api Version + /// 2023-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the DNS resolver policy. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetDnsResolverPolicyAsync(string dnsResolverPolicyName, CancellationToken cancellationToken = default) + { + return await GetDnsResolverPolicies().GetAsync(dnsResolverPolicyName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets properties of a DNS resolver policy. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName} + /// + /// + /// Operation Id + /// DnsResolverPolicies_Get + /// + /// + /// Default Api Version + /// 2023-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the DNS resolver policy. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetDnsResolverPolicy(string dnsResolverPolicyName, CancellationToken cancellationToken = default) + { + return GetDnsResolverPolicies().Get(dnsResolverPolicyName, cancellationToken); + } + + /// Gets a collection of DnsResolverDomainListResources in the ResourceGroupResource. + /// An object representing collection of DnsResolverDomainListResources and their operations over a DnsResolverDomainListResource. + public virtual DnsResolverDomainListCollection GetDnsResolverDomainLists() + { + return GetCachedClient(client => new DnsResolverDomainListCollection(client, Id)); + } + + /// + /// Gets properties of a DNS resolver domain list. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverDomainLists/{dnsResolverDomainListName} + /// + /// + /// Operation Id + /// DnsResolverDomainLists_Get + /// + /// + /// Default Api Version + /// 2023-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the DNS resolver domain list. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetDnsResolverDomainListAsync(string dnsResolverDomainListName, CancellationToken cancellationToken = default) + { + return await GetDnsResolverDomainLists().GetAsync(dnsResolverDomainListName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets properties of a DNS resolver domain list. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverDomainLists/{dnsResolverDomainListName} + /// + /// + /// Operation Id + /// DnsResolverDomainLists_Get + /// + /// + /// Default Api Version + /// 2023-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the DNS resolver domain list. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetDnsResolverDomainList(string dnsResolverDomainListName, CancellationToken cancellationToken = default) + { + return GetDnsResolverDomainLists().Get(dnsResolverDomainListName, cancellationToken); + } } } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Extensions/MockableDnsResolverSubscriptionResource.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Extensions/MockableDnsResolverSubscriptionResource.cs index c49b9047248e..3d6400b09296 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Extensions/MockableDnsResolverSubscriptionResource.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Extensions/MockableDnsResolverSubscriptionResource.cs @@ -19,6 +19,10 @@ public partial class MockableDnsResolverSubscriptionResource : ArmResource private DnsResolversRestOperations _dnsResolverRestClient; private ClientDiagnostics _dnsForwardingRulesetClientDiagnostics; private DnsForwardingRulesetsRestOperations _dnsForwardingRulesetRestClient; + private ClientDiagnostics _dnsResolverPolicyClientDiagnostics; + private DnsResolverPoliciesRestOperations _dnsResolverPolicyRestClient; + private ClientDiagnostics _dnsResolverDomainListClientDiagnostics; + private DnsResolverDomainListsRestOperations _dnsResolverDomainListRestClient; /// Initializes a new instance of the class for mocking. protected MockableDnsResolverSubscriptionResource() @@ -36,6 +40,10 @@ internal MockableDnsResolverSubscriptionResource(ArmClient client, ResourceIdent private DnsResolversRestOperations DnsResolverRestClient => _dnsResolverRestClient ??= new DnsResolversRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(DnsResolverResource.ResourceType)); private ClientDiagnostics DnsForwardingRulesetClientDiagnostics => _dnsForwardingRulesetClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.DnsResolver", DnsForwardingRulesetResource.ResourceType.Namespace, Diagnostics); private DnsForwardingRulesetsRestOperations DnsForwardingRulesetRestClient => _dnsForwardingRulesetRestClient ??= new DnsForwardingRulesetsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(DnsForwardingRulesetResource.ResourceType)); + private ClientDiagnostics DnsResolverPolicyClientDiagnostics => _dnsResolverPolicyClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.DnsResolver", DnsResolverPolicyResource.ResourceType.Namespace, Diagnostics); + private DnsResolverPoliciesRestOperations DnsResolverPolicyRestClient => _dnsResolverPolicyRestClient ??= new DnsResolverPoliciesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(DnsResolverPolicyResource.ResourceType)); + private ClientDiagnostics DnsResolverDomainListClientDiagnostics => _dnsResolverDomainListClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.DnsResolver", DnsResolverDomainListResource.ResourceType.Namespace, Diagnostics); + private DnsResolverDomainListsRestOperations DnsResolverDomainListRestClient => _dnsResolverDomainListRestClient ??= new DnsResolverDomainListsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(DnsResolverDomainListResource.ResourceType)); private string GetApiVersionOrNull(ResourceType resourceType) { @@ -56,7 +64,7 @@ private string GetApiVersionOrNull(ResourceType resourceType) /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -87,7 +95,7 @@ public virtual AsyncPageable GetDnsResolversAsync(int? top /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -118,7 +126,7 @@ public virtual Pageable GetDnsResolvers(int? top = null, Ca /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -149,7 +157,7 @@ public virtual AsyncPageable GetDnsForwardingRules /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -166,5 +174,129 @@ public virtual Pageable GetDnsForwardingRulesets(i HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => DnsForwardingRulesetRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, top); return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DnsForwardingRulesetResource(Client, DnsForwardingRulesetData.DeserializeDnsForwardingRulesetData(e)), DnsForwardingRulesetClientDiagnostics, Pipeline, "MockableDnsResolverSubscriptionResource.GetDnsForwardingRulesets", "value", "nextLink", cancellationToken); } + + /// + /// Lists DNS resolver policies in all resource groups of a subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Network/dnsResolverPolicies + /// + /// + /// Operation Id + /// DnsResolverPolicies_List + /// + /// + /// Default Api Version + /// 2023-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The maximum number of results to return. If not specified, returns up to 100 results. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetDnsResolverPoliciesAsync(int? top = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => DnsResolverPolicyRestClient.CreateListRequest(Id.SubscriptionId, top); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => DnsResolverPolicyRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, top); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DnsResolverPolicyResource(Client, DnsResolverPolicyData.DeserializeDnsResolverPolicyData(e)), DnsResolverPolicyClientDiagnostics, Pipeline, "MockableDnsResolverSubscriptionResource.GetDnsResolverPolicies", "value", "nextLink", cancellationToken); + } + + /// + /// Lists DNS resolver policies in all resource groups of a subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Network/dnsResolverPolicies + /// + /// + /// Operation Id + /// DnsResolverPolicies_List + /// + /// + /// Default Api Version + /// 2023-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The maximum number of results to return. If not specified, returns up to 100 results. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetDnsResolverPolicies(int? top = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => DnsResolverPolicyRestClient.CreateListRequest(Id.SubscriptionId, top); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => DnsResolverPolicyRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, top); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DnsResolverPolicyResource(Client, DnsResolverPolicyData.DeserializeDnsResolverPolicyData(e)), DnsResolverPolicyClientDiagnostics, Pipeline, "MockableDnsResolverSubscriptionResource.GetDnsResolverPolicies", "value", "nextLink", cancellationToken); + } + + /// + /// Lists DNS resolver domain lists in all resource groups of a subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Network/dnsResolverDomainLists + /// + /// + /// Operation Id + /// DnsResolverDomainLists_List + /// + /// + /// Default Api Version + /// 2023-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The maximum number of results to return. If not specified, returns up to 100 results. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetDnsResolverDomainListsAsync(int? top = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => DnsResolverDomainListRestClient.CreateListRequest(Id.SubscriptionId, top); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => DnsResolverDomainListRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, top); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DnsResolverDomainListResource(Client, DnsResolverDomainListData.DeserializeDnsResolverDomainListData(e)), DnsResolverDomainListClientDiagnostics, Pipeline, "MockableDnsResolverSubscriptionResource.GetDnsResolverDomainLists", "value", "nextLink", cancellationToken); + } + + /// + /// Lists DNS resolver domain lists in all resource groups of a subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Network/dnsResolverDomainLists + /// + /// + /// Operation Id + /// DnsResolverDomainLists_List + /// + /// + /// Default Api Version + /// 2023-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The maximum number of results to return. If not specified, returns up to 100 results. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetDnsResolverDomainLists(int? top = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => DnsResolverDomainListRestClient.CreateListRequest(Id.SubscriptionId, top); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => DnsResolverDomainListRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, top); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DnsResolverDomainListResource(Client, DnsResolverDomainListData.DeserializeDnsResolverDomainListData(e)), DnsResolverDomainListClientDiagnostics, Pipeline, "MockableDnsResolverSubscriptionResource.GetDnsResolverDomainLists", "value", "nextLink", cancellationToken); + } } } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/LongRunningOperation/DnsResolverDomainListOperationSource.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/LongRunningOperation/DnsResolverDomainListOperationSource.cs new file mode 100644 index 000000000000..455f629a0051 --- /dev/null +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/LongRunningOperation/DnsResolverDomainListOperationSource.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.DnsResolver +{ + internal class DnsResolverDomainListOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal DnsResolverDomainListOperationSource(ArmClient client) + { + _client = client; + } + + DnsResolverDomainListResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = DnsResolverDomainListData.DeserializeDnsResolverDomainListData(document.RootElement); + return new DnsResolverDomainListResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = DnsResolverDomainListData.DeserializeDnsResolverDomainListData(document.RootElement); + return new DnsResolverDomainListResource(_client, data); + } + } +} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/LongRunningOperation/DnsResolverPolicyOperationSource.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/LongRunningOperation/DnsResolverPolicyOperationSource.cs new file mode 100644 index 000000000000..aef111b75e66 --- /dev/null +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/LongRunningOperation/DnsResolverPolicyOperationSource.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.DnsResolver +{ + internal class DnsResolverPolicyOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal DnsResolverPolicyOperationSource(ArmClient client) + { + _client = client; + } + + DnsResolverPolicyResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = DnsResolverPolicyData.DeserializeDnsResolverPolicyData(document.RootElement); + return new DnsResolverPolicyResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = DnsResolverPolicyData.DeserializeDnsResolverPolicyData(document.RootElement); + return new DnsResolverPolicyResource(_client, data); + } + } +} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/LongRunningOperation/DnsResolverPolicyVirtualNetworkLinkOperationSource.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/LongRunningOperation/DnsResolverPolicyVirtualNetworkLinkOperationSource.cs new file mode 100644 index 000000000000..c5f64a4b4da4 --- /dev/null +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/LongRunningOperation/DnsResolverPolicyVirtualNetworkLinkOperationSource.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.DnsResolver +{ + internal class DnsResolverPolicyVirtualNetworkLinkOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal DnsResolverPolicyVirtualNetworkLinkOperationSource(ArmClient client) + { + _client = client; + } + + DnsResolverPolicyVirtualNetworkLinkResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = DnsResolverPolicyVirtualNetworkLinkData.DeserializeDnsResolverPolicyVirtualNetworkLinkData(document.RootElement); + return new DnsResolverPolicyVirtualNetworkLinkResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = DnsResolverPolicyVirtualNetworkLinkData.DeserializeDnsResolverPolicyVirtualNetworkLinkData(document.RootElement); + return new DnsResolverPolicyVirtualNetworkLinkResource(_client, data); + } + } +} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/LongRunningOperation/DnsSecurityRuleOperationSource.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/LongRunningOperation/DnsSecurityRuleOperationSource.cs new file mode 100644 index 000000000000..b7a37d677d98 --- /dev/null +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/LongRunningOperation/DnsSecurityRuleOperationSource.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.DnsResolver +{ + internal class DnsSecurityRuleOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal DnsSecurityRuleOperationSource(ArmClient client) + { + _client = client; + } + + DnsSecurityRuleResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = DnsSecurityRuleData.DeserializeDnsSecurityRuleData(document.RootElement); + return new DnsSecurityRuleResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = DnsSecurityRuleData.DeserializeDnsSecurityRuleData(document.RootElement); + return new DnsSecurityRuleResource(_client, data); + } + } +} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/BlockResponseCode.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/BlockResponseCode.cs new file mode 100644 index 000000000000..d90e68da243e --- /dev/null +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/BlockResponseCode.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.DnsResolver.Models +{ + /// The response code for block actions. + public readonly partial struct BlockResponseCode : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public BlockResponseCode(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ServfailValue = "SERVFAIL"; + + /// SERVFAIL. + public static BlockResponseCode Servfail { get; } = new BlockResponseCode(ServfailValue); + /// Determines if two values are the same. + public static bool operator ==(BlockResponseCode left, BlockResponseCode right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(BlockResponseCode left, BlockResponseCode right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator BlockResponseCode(string value) => new BlockResponseCode(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is BlockResponseCode other && Equals(other); + /// + public bool Equals(BlockResponseCode other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeGatewayPatch.Serialization.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverDomainListPatch.Serialization.cs similarity index 55% rename from sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeGatewayPatch.Serialization.cs rename to sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverDomainListPatch.Serialization.cs index 5ce50ad3c40b..ae2935aee9c2 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeGatewayPatch.Serialization.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverDomainListPatch.Serialization.cs @@ -11,13 +11,13 @@ using System.Text.Json; using Azure.Core; -namespace Azure.ResourceManager.HybridCompute.Models +namespace Azure.ResourceManager.DnsResolver.Models { - public partial class HybridComputeGatewayPatch : IUtf8JsonSerializable, IJsonModel + public partial class DnsResolverDomainListPatch : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -26,43 +26,68 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea /// The JSON writer. /// The client options for reading and writing models. - protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(HybridComputeGatewayPatch)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(DnsResolverDomainListPatch)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); - if (Optional.IsCollectionDefined(AllowedFeatures)) + if (Optional.IsCollectionDefined(Domains)) { - writer.WritePropertyName("allowedFeatures"u8); + writer.WritePropertyName("domains"u8); writer.WriteStartArray(); - foreach (var item in AllowedFeatures) + foreach (var item in Domains) { writer.WriteStringValue(item); } writer.WriteEndArray(); } writer.WriteEndObject(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } } - HybridComputeGatewayPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + DnsResolverDomainListPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(HybridComputeGatewayPatch)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(DnsResolverDomainListPatch)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeHybridComputeGatewayPatch(document.RootElement, options); + return DeserializeDnsResolverDomainListPatch(document.RootElement, options); } - internal static HybridComputeGatewayPatch DeserializeHybridComputeGatewayPatch(JsonElement element, ModelReaderWriterOptions options = null) + internal static DnsResolverDomainListPatch DeserializeDnsResolverDomainListPatch(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -71,7 +96,7 @@ internal static HybridComputeGatewayPatch DeserializeHybridComputeGatewayPatch(J return null; } IDictionary tags = default; - IList allowedFeatures = default; + IList domains = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -99,7 +124,7 @@ internal static HybridComputeGatewayPatch DeserializeHybridComputeGatewayPatch(J } foreach (var property0 in property.Value.EnumerateObject()) { - if (property0.NameEquals("allowedFeatures"u8)) + if (property0.NameEquals("domains"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { @@ -110,7 +135,7 @@ internal static HybridComputeGatewayPatch DeserializeHybridComputeGatewayPatch(J { array.Add(item.GetString()); } - allowedFeatures = array; + domains = array; continue; } } @@ -122,38 +147,38 @@ internal static HybridComputeGatewayPatch DeserializeHybridComputeGatewayPatch(J } } serializedAdditionalRawData = rawDataDictionary; - return new HybridComputeGatewayPatch(tags ?? new ChangeTrackingDictionary(), serializedAdditionalRawData, allowedFeatures ?? new ChangeTrackingList()); + return new DnsResolverDomainListPatch(tags ?? new ChangeTrackingDictionary(), domains ?? new ChangeTrackingList(), serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options); default: - throw new FormatException($"The model {nameof(HybridComputeGatewayPatch)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(DnsResolverDomainListPatch)} does not support writing '{options.Format}' format."); } } - HybridComputeGatewayPatch IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + DnsResolverDomainListPatch IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data); - return DeserializeHybridComputeGatewayPatch(document.RootElement, options); + return DeserializeDnsResolverDomainListPatch(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(HybridComputeGatewayPatch)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(DnsResolverDomainListPatch)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverDomainListPatch.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverDomainListPatch.cs new file mode 100644 index 000000000000..85f570486d94 --- /dev/null +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverDomainListPatch.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.DnsResolver.Models +{ + /// Describes a DNS resolver domain list for PATCH operation. + public partial class DnsResolverDomainListPatch + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DnsResolverDomainListPatch() + { + Tags = new ChangeTrackingDictionary(); + Domains = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Tags for DNS resolver domain list. + /// The domains in the domain list. + /// Keeps track of any properties unknown to the library. + internal DnsResolverDomainListPatch(IDictionary tags, IList domains, IDictionary serializedAdditionalRawData) + { + Tags = tags; + Domains = domains; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Tags for DNS resolver domain list. + public IDictionary Tags { get; } + /// The domains in the domain list. + public IList Domains { get; } + } +} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverDomainListResult.Serialization.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverDomainListResult.Serialization.cs new file mode 100644 index 000000000000..c1e7f451e27c --- /dev/null +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverDomainListResult.Serialization.cs @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DnsResolver.Models +{ + internal partial class DnsResolverDomainListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DnsResolverDomainListResult)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(Value)) + { + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DnsResolverDomainListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DnsResolverDomainListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDnsResolverDomainListResult(document.RootElement, options); + } + + internal static DnsResolverDomainListResult DeserializeDnsResolverDomainListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + string nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DnsResolverDomainListData.DeserializeDnsResolverDomainListData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DnsResolverDomainListResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DnsResolverDomainListResult)} does not support writing '{options.Format}' format."); + } + } + + DnsResolverDomainListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeDnsResolverDomainListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DnsResolverDomainListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverDomainListResult.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverDomainListResult.cs new file mode 100644 index 000000000000..154da1abd511 --- /dev/null +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverDomainListResult.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.DnsResolver.Models +{ + /// The response to an enumeration operation on DNS resolver domain lists. + internal partial class DnsResolverDomainListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal DnsResolverDomainListResult() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Enumeration of the DNS resolver domain lists. + /// The continuation token for the next page of results. + /// Keeps track of any properties unknown to the library. + internal DnsResolverDomainListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Enumeration of the DNS resolver domain lists. + public IReadOnlyList Value { get; } + /// The continuation token for the next page of results. + public string NextLink { get; } + } +} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverPolicyListResult.Serialization.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverPolicyListResult.Serialization.cs new file mode 100644 index 000000000000..62ee34b8e56e --- /dev/null +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverPolicyListResult.Serialization.cs @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DnsResolver.Models +{ + internal partial class DnsResolverPolicyListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DnsResolverPolicyListResult)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(Value)) + { + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DnsResolverPolicyListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DnsResolverPolicyListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDnsResolverPolicyListResult(document.RootElement, options); + } + + internal static DnsResolverPolicyListResult DeserializeDnsResolverPolicyListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + string nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DnsResolverPolicyData.DeserializeDnsResolverPolicyData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DnsResolverPolicyListResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DnsResolverPolicyListResult)} does not support writing '{options.Format}' format."); + } + } + + DnsResolverPolicyListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeDnsResolverPolicyListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DnsResolverPolicyListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/MachineRunCommandsListResult.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverPolicyListResult.cs similarity index 62% rename from sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/MachineRunCommandsListResult.cs rename to sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverPolicyListResult.cs index 259a29d2891d..8ff57fca8d6e 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/MachineRunCommandsListResult.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverPolicyListResult.cs @@ -8,10 +8,10 @@ using System; using System.Collections.Generic; -namespace Azure.ResourceManager.HybridCompute.Models +namespace Azure.ResourceManager.DnsResolver.Models { - /// Describes the Run Commands List Result. - internal partial class MachineRunCommandsListResult + /// The response to an enumeration operation on DNS resolver policies. + internal partial class DnsResolverPolicyListResult { /// /// Keeps track of any properties unknown to the library. @@ -45,26 +45,26 @@ internal partial class MachineRunCommandsListResult /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . - internal MachineRunCommandsListResult() + /// Initializes a new instance of . + internal DnsResolverPolicyListResult() { - Value = new ChangeTrackingList(); + Value = new ChangeTrackingList(); } - /// Initializes a new instance of . - /// The list of run commands. - /// The uri to fetch the next page of run commands. Call ListNext() with this to fetch the next page of run commands. + /// Initializes a new instance of . + /// Enumeration of the DNS resolver policies. + /// The continuation token for the next page of results. /// Keeps track of any properties unknown to the library. - internal MachineRunCommandsListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal DnsResolverPolicyListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The list of run commands. - public IReadOnlyList Value { get; } - /// The uri to fetch the next page of run commands. Call ListNext() with this to fetch the next page of run commands. + /// Enumeration of the DNS resolver policies. + public IReadOnlyList Value { get; } + /// The continuation token for the next page of results. public string NextLink { get; } } } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverPolicyPatch.Serialization.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverPolicyPatch.Serialization.cs new file mode 100644 index 000000000000..1613aef06be8 --- /dev/null +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverPolicyPatch.Serialization.cs @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DnsResolver.Models +{ + public partial class DnsResolverPolicyPatch : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DnsResolverPolicyPatch)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DnsResolverPolicyPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DnsResolverPolicyPatch)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDnsResolverPolicyPatch(document.RootElement, options); + } + + internal static DnsResolverPolicyPatch DeserializeDnsResolverPolicyPatch(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IDictionary tags = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DnsResolverPolicyPatch(tags ?? new ChangeTrackingDictionary(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DnsResolverPolicyPatch)} does not support writing '{options.Format}' format."); + } + } + + DnsResolverPolicyPatch IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeDnsResolverPolicyPatch(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DnsResolverPolicyPatch)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverPolicyPatch.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverPolicyPatch.cs new file mode 100644 index 000000000000..69a87aaa5be6 --- /dev/null +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverPolicyPatch.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.DnsResolver.Models +{ + /// Describes a DNS resolver policy for PATCH operation. + public partial class DnsResolverPolicyPatch + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DnsResolverPolicyPatch() + { + Tags = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// Tags for DNS resolver policy. + /// Keeps track of any properties unknown to the library. + internal DnsResolverPolicyPatch(IDictionary tags, IDictionary serializedAdditionalRawData) + { + Tags = tags; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Tags for DNS resolver policy. + public IDictionary Tags { get; } + } +} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverPolicyVirtualNetworkLinkListResult.Serialization.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverPolicyVirtualNetworkLinkListResult.Serialization.cs new file mode 100644 index 000000000000..1098b6df168d --- /dev/null +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverPolicyVirtualNetworkLinkListResult.Serialization.cs @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DnsResolver.Models +{ + internal partial class DnsResolverPolicyVirtualNetworkLinkListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DnsResolverPolicyVirtualNetworkLinkListResult)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(Value)) + { + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DnsResolverPolicyVirtualNetworkLinkListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DnsResolverPolicyVirtualNetworkLinkListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDnsResolverPolicyVirtualNetworkLinkListResult(document.RootElement, options); + } + + internal static DnsResolverPolicyVirtualNetworkLinkListResult DeserializeDnsResolverPolicyVirtualNetworkLinkListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + string nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DnsResolverPolicyVirtualNetworkLinkData.DeserializeDnsResolverPolicyVirtualNetworkLinkData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DnsResolverPolicyVirtualNetworkLinkListResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DnsResolverPolicyVirtualNetworkLinkListResult)} does not support writing '{options.Format}' format."); + } + } + + DnsResolverPolicyVirtualNetworkLinkListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeDnsResolverPolicyVirtualNetworkLinkListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DnsResolverPolicyVirtualNetworkLinkListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverPolicyVirtualNetworkLinkListResult.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverPolicyVirtualNetworkLinkListResult.cs new file mode 100644 index 000000000000..c97e63e8e665 --- /dev/null +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverPolicyVirtualNetworkLinkListResult.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.DnsResolver.Models +{ + /// The response to an enumeration operation on DNS resolver policy virtual network links. + internal partial class DnsResolverPolicyVirtualNetworkLinkListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal DnsResolverPolicyVirtualNetworkLinkListResult() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Enumeration of the DNS resolver policy virtual network links. + /// The continuation token for the next page of results. + /// Keeps track of any properties unknown to the library. + internal DnsResolverPolicyVirtualNetworkLinkListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Enumeration of the DNS resolver policy virtual network links. + public IReadOnlyList Value { get; } + /// The continuation token for the next page of results. + public string NextLink { get; } + } +} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverPolicyVirtualNetworkLinkPatch.Serialization.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverPolicyVirtualNetworkLinkPatch.Serialization.cs new file mode 100644 index 000000000000..9c549acfda71 --- /dev/null +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverPolicyVirtualNetworkLinkPatch.Serialization.cs @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DnsResolver.Models +{ + public partial class DnsResolverPolicyVirtualNetworkLinkPatch : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DnsResolverPolicyVirtualNetworkLinkPatch)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DnsResolverPolicyVirtualNetworkLinkPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DnsResolverPolicyVirtualNetworkLinkPatch)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDnsResolverPolicyVirtualNetworkLinkPatch(document.RootElement, options); + } + + internal static DnsResolverPolicyVirtualNetworkLinkPatch DeserializeDnsResolverPolicyVirtualNetworkLinkPatch(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IDictionary tags = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DnsResolverPolicyVirtualNetworkLinkPatch(tags ?? new ChangeTrackingDictionary(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DnsResolverPolicyVirtualNetworkLinkPatch)} does not support writing '{options.Format}' format."); + } + } + + DnsResolverPolicyVirtualNetworkLinkPatch IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeDnsResolverPolicyVirtualNetworkLinkPatch(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DnsResolverPolicyVirtualNetworkLinkPatch)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverPolicyVirtualNetworkLinkPatch.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverPolicyVirtualNetworkLinkPatch.cs new file mode 100644 index 000000000000..8d84dc39849b --- /dev/null +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverPolicyVirtualNetworkLinkPatch.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.DnsResolver.Models +{ + /// Describes a DNS resolver policy virtual network link for PATCH operation. + public partial class DnsResolverPolicyVirtualNetworkLinkPatch + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DnsResolverPolicyVirtualNetworkLinkPatch() + { + Tags = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// Tags for the DNS resolver policy virtual network link. + /// Keeps track of any properties unknown to the library. + internal DnsResolverPolicyVirtualNetworkLinkPatch(IDictionary tags, IDictionary serializedAdditionalRawData) + { + Tags = tags; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Tags for the DNS resolver policy virtual network link. + public IDictionary Tags { get; } + } +} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsSecurityRuleAction.Serialization.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsSecurityRuleAction.Serialization.cs new file mode 100644 index 000000000000..d55663ca144d --- /dev/null +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsSecurityRuleAction.Serialization.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DnsResolver.Models +{ + public partial class DnsSecurityRuleAction : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DnsSecurityRuleAction)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(ActionType)) + { + writer.WritePropertyName("actionType"u8); + writer.WriteStringValue(ActionType.Value.ToString()); + } + if (Optional.IsDefined(BlockResponseCode)) + { + writer.WritePropertyName("blockResponseCode"u8); + writer.WriteStringValue(BlockResponseCode.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DnsSecurityRuleAction IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DnsSecurityRuleAction)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDnsSecurityRuleAction(document.RootElement, options); + } + + internal static DnsSecurityRuleAction DeserializeDnsSecurityRuleAction(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DnsSecurityRuleActionType? actionType = default; + BlockResponseCode? blockResponseCode = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("actionType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + actionType = new DnsSecurityRuleActionType(property.Value.GetString()); + continue; + } + if (property.NameEquals("blockResponseCode"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + blockResponseCode = new BlockResponseCode(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DnsSecurityRuleAction(actionType, blockResponseCode, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DnsSecurityRuleAction)} does not support writing '{options.Format}' format."); + } + } + + DnsSecurityRuleAction IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeDnsSecurityRuleAction(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DnsSecurityRuleAction)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsSecurityRuleAction.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsSecurityRuleAction.cs new file mode 100644 index 000000000000..7ed7262c0583 --- /dev/null +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsSecurityRuleAction.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.DnsResolver.Models +{ + /// The action to take on DNS requests that match the DNS security rule. + public partial class DnsSecurityRuleAction + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DnsSecurityRuleAction() + { + } + + /// Initializes a new instance of . + /// The type of action to take. + /// The response code for block actions. + /// Keeps track of any properties unknown to the library. + internal DnsSecurityRuleAction(DnsSecurityRuleActionType? actionType, BlockResponseCode? blockResponseCode, IDictionary serializedAdditionalRawData) + { + ActionType = actionType; + BlockResponseCode = blockResponseCode; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The type of action to take. + public DnsSecurityRuleActionType? ActionType { get; set; } + /// The response code for block actions. + public BlockResponseCode? BlockResponseCode { get; set; } + } +} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsSecurityRuleActionType.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsSecurityRuleActionType.cs new file mode 100644 index 000000000000..3202ee2bcfb6 --- /dev/null +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsSecurityRuleActionType.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.DnsResolver.Models +{ + /// The type of action to take. + public readonly partial struct DnsSecurityRuleActionType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DnsSecurityRuleActionType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AllowValue = "Allow"; + private const string AlertValue = "Alert"; + private const string BlockValue = "Block"; + + /// Allow. + public static DnsSecurityRuleActionType Allow { get; } = new DnsSecurityRuleActionType(AllowValue); + /// Alert. + public static DnsSecurityRuleActionType Alert { get; } = new DnsSecurityRuleActionType(AlertValue); + /// Block. + public static DnsSecurityRuleActionType Block { get; } = new DnsSecurityRuleActionType(BlockValue); + /// Determines if two values are the same. + public static bool operator ==(DnsSecurityRuleActionType left, DnsSecurityRuleActionType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DnsSecurityRuleActionType left, DnsSecurityRuleActionType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator DnsSecurityRuleActionType(string value) => new DnsSecurityRuleActionType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DnsSecurityRuleActionType other && Equals(other); + /// + public bool Equals(DnsSecurityRuleActionType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsSecurityRuleListResult.Serialization.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsSecurityRuleListResult.Serialization.cs new file mode 100644 index 000000000000..1edf3165c63c --- /dev/null +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsSecurityRuleListResult.Serialization.cs @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DnsResolver.Models +{ + internal partial class DnsSecurityRuleListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DnsSecurityRuleListResult)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(Value)) + { + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DnsSecurityRuleListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DnsSecurityRuleListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDnsSecurityRuleListResult(document.RootElement, options); + } + + internal static DnsSecurityRuleListResult DeserializeDnsSecurityRuleListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + string nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DnsSecurityRuleData.DeserializeDnsSecurityRuleData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DnsSecurityRuleListResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DnsSecurityRuleListResult)} does not support writing '{options.Format}' format."); + } + } + + DnsSecurityRuleListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeDnsSecurityRuleListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DnsSecurityRuleListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsSecurityRuleListResult.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsSecurityRuleListResult.cs new file mode 100644 index 000000000000..2caf0fa7bd27 --- /dev/null +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsSecurityRuleListResult.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.DnsResolver.Models +{ + /// The response to an enumeration operation on DNS security rules within a DNS resolver policy. + internal partial class DnsSecurityRuleListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal DnsSecurityRuleListResult() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Enumeration of the DNS security rules. + /// The continuation token for the next page of results. + /// Keeps track of any properties unknown to the library. + internal DnsSecurityRuleListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Enumeration of the DNS security rules. + public IReadOnlyList Value { get; } + /// The continuation token for the next page of results. + public string NextLink { get; } + } +} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsSecurityRulePatch.Serialization.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsSecurityRulePatch.Serialization.cs new file mode 100644 index 000000000000..6dca9843cf94 --- /dev/null +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsSecurityRulePatch.Serialization.cs @@ -0,0 +1,236 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Resources.Models; + +namespace Azure.ResourceManager.DnsResolver.Models +{ + public partial class DnsSecurityRulePatch : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DnsSecurityRulePatch)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(Action)) + { + writer.WritePropertyName("action"u8); + writer.WriteObjectValue(Action, options); + } + if (Optional.IsCollectionDefined(DnsResolverDomainLists)) + { + writer.WritePropertyName("dnsResolverDomainLists"u8); + writer.WriteStartArray(); + foreach (var item in DnsResolverDomainLists) + { + JsonSerializer.Serialize(writer, item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(DnsSecurityRuleState)) + { + writer.WritePropertyName("dnsSecurityRuleState"u8); + writer.WriteStringValue(DnsSecurityRuleState.Value.ToString()); + } + if (Optional.IsDefined(Priority)) + { + writer.WritePropertyName("priority"u8); + writer.WriteNumberValue(Priority.Value); + } + writer.WriteEndObject(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DnsSecurityRulePatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DnsSecurityRulePatch)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDnsSecurityRulePatch(document.RootElement, options); + } + + internal static DnsSecurityRulePatch DeserializeDnsSecurityRulePatch(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IDictionary tags = default; + DnsSecurityRuleAction action = default; + IList dnsResolverDomainLists = default; + DnsSecurityRuleState? dnsSecurityRuleState = default; + int? priority = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("action"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + action = DnsSecurityRuleAction.DeserializeDnsSecurityRuleAction(property0.Value, options); + continue; + } + if (property0.NameEquals("dnsResolverDomainLists"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(JsonSerializer.Deserialize(item.GetRawText())); + } + dnsResolverDomainLists = array; + continue; + } + if (property0.NameEquals("dnsSecurityRuleState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dnsSecurityRuleState = new DnsSecurityRuleState(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("priority"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + priority = property0.Value.GetInt32(); + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DnsSecurityRulePatch( + tags ?? new ChangeTrackingDictionary(), + action, + dnsResolverDomainLists ?? new ChangeTrackingList(), + dnsSecurityRuleState, + priority, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DnsSecurityRulePatch)} does not support writing '{options.Format}' format."); + } + } + + DnsSecurityRulePatch IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeDnsSecurityRulePatch(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DnsSecurityRulePatch)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsSecurityRulePatch.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsSecurityRulePatch.cs new file mode 100644 index 000000000000..14ff31677085 --- /dev/null +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsSecurityRulePatch.cs @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.ResourceManager.Resources.Models; + +namespace Azure.ResourceManager.DnsResolver.Models +{ + /// Describes a DNS security rule for PATCH operation. + public partial class DnsSecurityRulePatch + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DnsSecurityRulePatch() + { + Tags = new ChangeTrackingDictionary(); + DnsResolverDomainLists = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Tags for DNS security rule. + /// The action to take on DNS requests that match the DNS security rule. + /// DNS resolver policy domains lists that the DNS security rule applies to. + /// The state of DNS security rule. + /// The priority of the DNS security rule. + /// Keeps track of any properties unknown to the library. + internal DnsSecurityRulePatch(IDictionary tags, DnsSecurityRuleAction action, IList dnsResolverDomainLists, DnsSecurityRuleState? dnsSecurityRuleState, int? priority, IDictionary serializedAdditionalRawData) + { + Tags = tags; + Action = action; + DnsResolverDomainLists = dnsResolverDomainLists; + DnsSecurityRuleState = dnsSecurityRuleState; + Priority = priority; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Tags for DNS security rule. + public IDictionary Tags { get; } + /// The action to take on DNS requests that match the DNS security rule. + public DnsSecurityRuleAction Action { get; set; } + /// DNS resolver policy domains lists that the DNS security rule applies to. + public IList DnsResolverDomainLists { get; } + /// The state of DNS security rule. + public DnsSecurityRuleState? DnsSecurityRuleState { get; set; } + /// The priority of the DNS security rule. + public int? Priority { get; set; } + } +} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsSecurityRuleState.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsSecurityRuleState.cs new file mode 100644 index 000000000000..8b22ea325780 --- /dev/null +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsSecurityRuleState.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.DnsResolver.Models +{ + /// The state of DNS security rule. + public readonly partial struct DnsSecurityRuleState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DnsSecurityRuleState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string EnabledValue = "Enabled"; + private const string DisabledValue = "Disabled"; + + /// Enabled. + public static DnsSecurityRuleState Enabled { get; } = new DnsSecurityRuleState(EnabledValue); + /// Disabled. + public static DnsSecurityRuleState Disabled { get; } = new DnsSecurityRuleState(DisabledValue); + /// Determines if two values are the same. + public static bool operator ==(DnsSecurityRuleState left, DnsSecurityRuleState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DnsSecurityRuleState left, DnsSecurityRuleState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator DnsSecurityRuleState(string value) => new DnsSecurityRuleState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DnsSecurityRuleState other && Equals(other); + /// + public bool Equals(DnsSecurityRuleState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/DnsForwardingRulesetsRestOperations.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/DnsForwardingRulesetsRestOperations.cs index 972aac31d4e4..fc46fecf3868 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/DnsForwardingRulesetsRestOperations.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/DnsForwardingRulesetsRestOperations.cs @@ -32,7 +32,7 @@ public DnsForwardingRulesetsRestOperations(HttpPipeline pipeline, string applica { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-07-01"; + _apiVersion = apiVersion ?? "2023-07-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -83,7 +83,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates or updates a DNS forwarding ruleset. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the DNS forwarding ruleset. /// Parameters supplied to the CreateOrUpdate operation. @@ -113,7 +113,7 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re } /// Creates or updates a DNS forwarding ruleset. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the DNS forwarding ruleset. /// Parameters supplied to the CreateOrUpdate operation. @@ -185,7 +185,7 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Updates a DNS forwarding ruleset. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the DNS forwarding ruleset. /// Parameters supplied to the Update operation. @@ -213,7 +213,7 @@ public async Task UpdateAsync(string subscriptionId, string resourceGr } /// Updates a DNS forwarding ruleset. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the DNS forwarding ruleset. /// Parameters supplied to the Update operation. @@ -279,7 +279,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes a DNS forwarding ruleset. WARNING: This operation cannot be undone. All forwarding rules within the ruleset will be deleted. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the DNS forwarding ruleset. /// ETag of the resource. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting any concurrent changes. @@ -306,7 +306,7 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes a DNS forwarding ruleset. WARNING: This operation cannot be undone. All forwarding rules within the ruleset will be deleted. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the DNS forwarding ruleset. /// ETag of the resource. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting any concurrent changes. @@ -367,7 +367,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets a DNS forwarding ruleset properties. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the DNS forwarding ruleset. /// The cancellation token to use. @@ -398,7 +398,7 @@ public async Task> GetAsync(string subscripti } /// Gets a DNS forwarding ruleset properties. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the DNS forwarding ruleset. /// The cancellation token to use. @@ -469,7 +469,7 @@ internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, str } /// Lists DNS forwarding rulesets within a resource group. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The maximum number of results to return. If not specified, returns up to 100 results. /// The cancellation token to use. @@ -497,7 +497,7 @@ public async Task> ListByResourceGroupA } /// Lists DNS forwarding rulesets within a resource group. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The maximum number of results to return. If not specified, returns up to 100 results. /// The cancellation token to use. @@ -561,7 +561,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, int? top) } /// Lists DNS forwarding rulesets in all resource groups of a subscription. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The maximum number of results to return. If not specified, returns up to 100 results. /// The cancellation token to use. /// is null. @@ -587,7 +587,7 @@ public async Task> ListAsync(string sub } /// Lists DNS forwarding rulesets in all resource groups of a subscription. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The maximum number of results to return. If not specified, returns up to 100 results. /// The cancellation token to use. /// is null. @@ -657,7 +657,7 @@ internal HttpMessage CreateListByVirtualNetworkRequest(string subscriptionId, st } /// Lists DNS forwarding ruleset resource IDs attached to a virtual network. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the virtual network. /// The maximum number of results to return. If not specified, returns up to 100 results. @@ -687,7 +687,7 @@ public async Task> ListBy } /// Lists DNS forwarding ruleset resource IDs attached to a virtual network. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the virtual network. /// The maximum number of results to return. If not specified, returns up to 100 results. @@ -740,7 +740,7 @@ internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, s /// Lists DNS forwarding rulesets within a resource group. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The maximum number of results to return. If not specified, returns up to 100 results. /// The cancellation token to use. @@ -770,7 +770,7 @@ public async Task> ListByResourceGroupN /// Lists DNS forwarding rulesets within a resource group. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The maximum number of results to return. If not specified, returns up to 100 results. /// The cancellation token to use. @@ -822,7 +822,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// Lists DNS forwarding rulesets in all resource groups of a subscription. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The maximum number of results to return. If not specified, returns up to 100 results. /// The cancellation token to use. /// or is null. @@ -850,7 +850,7 @@ public async Task> ListNextPageAsync(st /// Lists DNS forwarding rulesets in all resource groups of a subscription. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The maximum number of results to return. If not specified, returns up to 100 results. /// The cancellation token to use. /// or is null. @@ -900,7 +900,7 @@ internal HttpMessage CreateListByVirtualNetworkNextPageRequest(string nextLink, /// Lists DNS forwarding ruleset resource IDs attached to a virtual network. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the virtual network. /// The maximum number of results to return. If not specified, returns up to 100 results. @@ -932,7 +932,7 @@ public async Task> ListBy /// Lists DNS forwarding ruleset resource IDs attached to a virtual network. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the virtual network. /// The maximum number of results to return. If not specified, returns up to 100 results. diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/RestOperations/GatewaysRestOperations.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/DnsResolverDomainListsRestOperations.cs similarity index 62% rename from sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/RestOperations/GatewaysRestOperations.cs rename to sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/DnsResolverDomainListsRestOperations.cs index 4d34765a6e06..a8b410955188 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/RestOperations/GatewaysRestOperations.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/DnsResolverDomainListsRestOperations.cs @@ -11,32 +11,32 @@ using System.Threading.Tasks; using Azure.Core; using Azure.Core.Pipeline; -using Azure.ResourceManager.HybridCompute.Models; +using Azure.ResourceManager.DnsResolver.Models; -namespace Azure.ResourceManager.HybridCompute +namespace Azure.ResourceManager.DnsResolver { - internal partial class GatewaysRestOperations + internal partial class DnsResolverDomainListsRestOperations { private readonly TelemetryDetails _userAgent; private readonly HttpPipeline _pipeline; private readonly Uri _endpoint; private readonly string _apiVersion; - /// Initializes a new instance of GatewaysRestOperations. + /// Initializes a new instance of DnsResolverDomainListsRestOperations. /// The HTTP pipeline for sending and receiving REST requests and responses. /// The application id to use for user agent. /// server parameter. /// Api Version. /// or is null. - public GatewaysRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + public DnsResolverDomainListsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-05-20-preview"; + _apiVersion = apiVersion ?? "2023-07-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string gatewayName, HybridComputeGatewayData data) + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string dnsResolverDomainListName, DnsResolverDomainListData data, string ifMatch, string ifNoneMatch) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -44,13 +44,13 @@ internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.HybridCompute/gateways/", false); - uri.AppendPath(gatewayName, true); + uri.AppendPath("/providers/Microsoft.Network/dnsResolverDomainLists/", false); + uri.AppendPath(dnsResolverDomainListName, true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string gatewayName, HybridComputeGatewayData data) + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string dnsResolverDomainListName, DnsResolverDomainListData data, string ifMatch, string ifNoneMatch) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -61,10 +61,18 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.HybridCompute/gateways/", false); - uri.AppendPath(gatewayName, true); + uri.AppendPath("/providers/Microsoft.Network/dnsResolverDomainLists/", false); + uri.AppendPath(dnsResolverDomainListName, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; + if (ifMatch != null) + { + request.Headers.Add("If-Match", ifMatch); + } + if (ifNoneMatch != null) + { + request.Headers.Add("If-None-Match", ifNoneMatch); + } request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); var content = new Utf8JsonRequestContent(); @@ -74,22 +82,24 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r return message; } - /// The operation to create or update a gateway. - /// The ID of the target subscription. + /// Creates or updates a DNS resolver domain list. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// The name of the Gateway. - /// Parameters supplied to the Create gateway operation. + /// The name of the DNS resolver domain list. + /// Parameters supplied to the CreateOrUpdate operation. + /// ETag of the resource. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting any concurrent changes. + /// Set to '*' to allow a new resource to be created, but to prevent updating an existing resource. Other values will be ignored. /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string gatewayName, HybridComputeGatewayData data, CancellationToken cancellationToken = default) + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string dnsResolverDomainListName, DnsResolverDomainListData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(gatewayName, nameof(gatewayName)); + Argument.AssertNotNullOrEmpty(dnsResolverDomainListName, nameof(dnsResolverDomainListName)); Argument.AssertNotNull(data, nameof(data)); - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, gatewayName, data); + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, dnsResolverDomainListName, data, ifMatch, ifNoneMatch); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -101,22 +111,24 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re } } - /// The operation to create or update a gateway. - /// The ID of the target subscription. + /// Creates or updates a DNS resolver domain list. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// The name of the Gateway. - /// Parameters supplied to the Create gateway operation. + /// The name of the DNS resolver domain list. + /// Parameters supplied to the CreateOrUpdate operation. + /// ETag of the resource. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting any concurrent changes. + /// Set to '*' to allow a new resource to be created, but to prevent updating an existing resource. Other values will be ignored. /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string gatewayName, HybridComputeGatewayData data, CancellationToken cancellationToken = default) + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string dnsResolverDomainListName, DnsResolverDomainListData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(gatewayName, nameof(gatewayName)); + Argument.AssertNotNullOrEmpty(dnsResolverDomainListName, nameof(dnsResolverDomainListName)); Argument.AssertNotNull(data, nameof(data)); - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, gatewayName, data); + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, dnsResolverDomainListName, data, ifMatch, ifNoneMatch); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -128,7 +140,7 @@ public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, } } - internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string gatewayName, HybridComputeGatewayPatch patch) + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string dnsResolverDomainListName, DnsResolverDomainListPatch patch, string ifMatch) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -136,13 +148,13 @@ internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.HybridCompute/gateways/", false); - uri.AppendPath(gatewayName, true); + uri.AppendPath("/providers/Microsoft.Network/dnsResolverDomainLists/", false); + uri.AppendPath(dnsResolverDomainListName, true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string gatewayName, HybridComputeGatewayPatch patch) + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string dnsResolverDomainListName, DnsResolverDomainListPatch patch, string ifMatch) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -153,10 +165,14 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.HybridCompute/gateways/", false); - uri.AppendPath(gatewayName, true); + uri.AppendPath("/providers/Microsoft.Network/dnsResolverDomainLists/", false); + uri.AppendPath(dnsResolverDomainListName, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; + if (ifMatch != null) + { + request.Headers.Add("If-Match", ifMatch); + } request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); var content = new Utf8JsonRequestContent(); @@ -166,69 +182,63 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG return message; } - /// The operation to update a gateway. - /// The ID of the target subscription. + /// Updates a DNS resolver domain list. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// The name of the Gateway. - /// Parameters supplied to the Update gateway operation. + /// The name of the DNS resolver domain list. + /// Parameters supplied to the Update operation. + /// ETag of the resource. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting any concurrent changes. /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> UpdateAsync(string subscriptionId, string resourceGroupName, string gatewayName, HybridComputeGatewayPatch patch, CancellationToken cancellationToken = default) + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string dnsResolverDomainListName, DnsResolverDomainListPatch patch, string ifMatch = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(gatewayName, nameof(gatewayName)); + Argument.AssertNotNullOrEmpty(dnsResolverDomainListName, nameof(dnsResolverDomainListName)); Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, gatewayName, patch); + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, dnsResolverDomainListName, patch, ifMatch); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - { - HybridComputeGatewayData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = HybridComputeGatewayData.DeserializeHybridComputeGatewayData(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } } - /// The operation to update a gateway. - /// The ID of the target subscription. + /// Updates a DNS resolver domain list. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// The name of the Gateway. - /// Parameters supplied to the Update gateway operation. + /// The name of the DNS resolver domain list. + /// Parameters supplied to the Update operation. + /// ETag of the resource. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting any concurrent changes. /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response Update(string subscriptionId, string resourceGroupName, string gatewayName, HybridComputeGatewayPatch patch, CancellationToken cancellationToken = default) + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string dnsResolverDomainListName, DnsResolverDomainListPatch patch, string ifMatch = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(gatewayName, nameof(gatewayName)); + Argument.AssertNotNullOrEmpty(dnsResolverDomainListName, nameof(dnsResolverDomainListName)); Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, gatewayName, patch); + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, dnsResolverDomainListName, patch, ifMatch); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - { - HybridComputeGatewayData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = HybridComputeGatewayData.DeserializeHybridComputeGatewayData(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string gatewayName) + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string dnsResolverDomainListName, string ifMatch) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -236,95 +246,89 @@ internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string res uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.HybridCompute/gateways/", false); - uri.AppendPath(gatewayName, true); + uri.AppendPath("/providers/Microsoft.Network/dnsResolverDomainLists/", false); + uri.AppendPath(dnsResolverDomainListName, true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string gatewayName) + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string dnsResolverDomainListName, string ifMatch) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Get; + request.Method = RequestMethod.Delete; 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.HybridCompute/gateways/", false); - uri.AppendPath(gatewayName, true); + uri.AppendPath("/providers/Microsoft.Network/dnsResolverDomainLists/", false); + uri.AppendPath(dnsResolverDomainListName, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; + if (ifMatch != null) + { + request.Headers.Add("If-Match", ifMatch); + } request.Headers.Add("Accept", "application/json"); _userAgent.Apply(message); return message; } - /// Retrieves information about the view of a gateway. - /// The ID of the target subscription. + /// Deletes a DNS resolver domain list. WARNING: This operation cannot be undone. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// The name of the Gateway. + /// The name of the DNS resolver domain list. + /// ETag of the resource. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting any concurrent changes. /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string gatewayName, CancellationToken cancellationToken = default) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string dnsResolverDomainListName, string ifMatch = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(gatewayName, nameof(gatewayName)); + Argument.AssertNotNullOrEmpty(dnsResolverDomainListName, nameof(dnsResolverDomainListName)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, gatewayName); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, dnsResolverDomainListName, ifMatch); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 200: - { - HybridComputeGatewayData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = HybridComputeGatewayData.DeserializeHybridComputeGatewayData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((HybridComputeGatewayData)null, message.Response); + case 202: + case 204: + return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Retrieves information about the view of a gateway. - /// The ID of the target subscription. + /// Deletes a DNS resolver domain list. WARNING: This operation cannot be undone. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// The name of the Gateway. + /// The name of the DNS resolver domain list. + /// ETag of the resource. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting any concurrent changes. /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string gatewayName, CancellationToken cancellationToken = default) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string dnsResolverDomainListName, string ifMatch = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(gatewayName, nameof(gatewayName)); + Argument.AssertNotNullOrEmpty(dnsResolverDomainListName, nameof(dnsResolverDomainListName)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, gatewayName); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, dnsResolverDomainListName, ifMatch); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 200: - { - HybridComputeGatewayData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = HybridComputeGatewayData.DeserializeHybridComputeGatewayData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((HybridComputeGatewayData)null, message.Response); + case 202: + case 204: + return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string gatewayName) + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string dnsResolverDomainListName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -332,25 +336,25 @@ internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.HybridCompute/gateways/", false); - uri.AppendPath(gatewayName, true); + uri.AppendPath("/providers/Microsoft.Network/dnsResolverDomainLists/", false); + uri.AppendPath(dnsResolverDomainListName, true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string gatewayName) + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string dnsResolverDomainListName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Delete; + request.Method = RequestMethod.Get; 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.HybridCompute/gateways/", false); - uri.AppendPath(gatewayName, true); + uri.AppendPath("/providers/Microsoft.Network/dnsResolverDomainLists/", false); + uri.AppendPath(dnsResolverDomainListName, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -358,57 +362,69 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG return message; } - /// The operation to delete a gateway. - /// The ID of the target subscription. + /// Gets properties of a DNS resolver domain list. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// The name of the Gateway. + /// The name of the DNS resolver domain list. /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string gatewayName, CancellationToken cancellationToken = default) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string dnsResolverDomainListName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(gatewayName, nameof(gatewayName)); + Argument.AssertNotNullOrEmpty(dnsResolverDomainListName, nameof(dnsResolverDomainListName)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, gatewayName); + using var message = CreateGetRequest(subscriptionId, resourceGroupName, dnsResolverDomainListName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 202: - case 204: - return message.Response; + case 200: + { + DnsResolverDomainListData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = DnsResolverDomainListData.DeserializeDnsResolverDomainListData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DnsResolverDomainListData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - /// The operation to delete a gateway. - /// The ID of the target subscription. + /// Gets properties of a DNS resolver domain list. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// The name of the Gateway. + /// The name of the DNS resolver domain list. /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response Delete(string subscriptionId, string resourceGroupName, string gatewayName, CancellationToken cancellationToken = default) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string dnsResolverDomainListName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(gatewayName, nameof(gatewayName)); + Argument.AssertNotNullOrEmpty(dnsResolverDomainListName, nameof(dnsResolverDomainListName)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, gatewayName); + using var message = CreateGetRequest(subscriptionId, resourceGroupName, dnsResolverDomainListName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 202: - case 204: - return message.Response; + case 200: + { + DnsResolverDomainListData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = DnsResolverDomainListData.DeserializeDnsResolverDomainListData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DnsResolverDomainListData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateListByResourceGroupRequestUri(string subscriptionId, string resourceGroupName) + internal RequestUriBuilder CreateListByResourceGroupRequestUri(string subscriptionId, string resourceGroupName, int? top) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -416,12 +432,16 @@ internal RequestUriBuilder CreateListByResourceGroupRequestUri(string subscripti uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.HybridCompute/gateways", false); + uri.AppendPath("/providers/Microsoft.Network/dnsResolverDomainLists", false); uri.AppendQuery("api-version", _apiVersion, true); + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } return uri; } - internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, string resourceGroupName) + internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, string resourceGroupName, int? top) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -432,34 +452,39 @@ internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, str uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.HybridCompute/gateways", false); + uri.AppendPath("/providers/Microsoft.Network/dnsResolverDomainLists", false); uri.AppendQuery("api-version", _apiVersion, true); + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } request.Uri = uri; request.Headers.Add("Accept", "application/json"); _userAgent.Apply(message); return message; } - /// The operation to get all gateways of a non-Azure machine. - /// The ID of the target subscription. + /// Lists DNS resolver domain lists within a resource group. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. + /// The maximum number of results to return. If not specified, returns up to 100 results. /// The cancellation token to use. /// or is null. /// or is an empty string, and was expected to be non-empty. - public async Task> ListByResourceGroupAsync(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + public async Task> ListByResourceGroupAsync(string subscriptionId, string resourceGroupName, int? top = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); + using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName, top); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - GatewaysListResult value = default; + DnsResolverDomainListResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = GatewaysListResult.DeserializeGatewaysListResult(document.RootElement); + value = DnsResolverDomainListResult.DeserializeDnsResolverDomainListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -467,26 +492,27 @@ public async Task> ListByResourceGroupAsync(string } } - /// The operation to get all gateways of a non-Azure machine. - /// The ID of the target subscription. + /// Lists DNS resolver domain lists within a resource group. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. + /// The maximum number of results to return. If not specified, returns up to 100 results. /// The cancellation token to use. /// or is null. /// or is an empty string, and was expected to be non-empty. - public Response ListByResourceGroup(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + public Response ListByResourceGroup(string subscriptionId, string resourceGroupName, int? top = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); + using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName, top); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - GatewaysListResult value = default; + DnsResolverDomainListResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = GatewaysListResult.DeserializeGatewaysListResult(document.RootElement); + value = DnsResolverDomainListResult.DeserializeDnsResolverDomainListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -494,18 +520,22 @@ public Response ListByResourceGroup(string subscriptionId, s } } - internal RequestUriBuilder CreateListBySubscriptionRequestUri(string subscriptionId) + internal RequestUriBuilder CreateListRequestUri(string subscriptionId, int? top) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); uri.AppendPath(subscriptionId, true); - uri.AppendPath("/providers/Microsoft.HybridCompute/gateways", false); + uri.AppendPath("/providers/Microsoft.Network/dnsResolverDomainLists", false); uri.AppendQuery("api-version", _apiVersion, true); + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } return uri; } - internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId) + internal HttpMessage CreateListRequest(string subscriptionId, int? top) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -514,32 +544,37 @@ internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId) uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); uri.AppendPath(subscriptionId, true); - uri.AppendPath("/providers/Microsoft.HybridCompute/gateways", false); + uri.AppendPath("/providers/Microsoft.Network/dnsResolverDomainLists", false); uri.AppendQuery("api-version", _apiVersion, true); + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } request.Uri = uri; request.Headers.Add("Accept", "application/json"); _userAgent.Apply(message); return message; } - /// The operation to get all gateways of a non-Azure machine. - /// The ID of the target subscription. + /// Lists DNS resolver domain lists in all resource groups of a subscription. + /// The ID of the target subscription. The value must be an UUID. + /// The maximum number of results to return. If not specified, returns up to 100 results. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. - public async Task> ListBySubscriptionAsync(string subscriptionId, CancellationToken cancellationToken = default) + public async Task> ListAsync(string subscriptionId, int? top = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - using var message = CreateListBySubscriptionRequest(subscriptionId); + using var message = CreateListRequest(subscriptionId, top); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - GatewaysListResult value = default; + DnsResolverDomainListResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = GatewaysListResult.DeserializeGatewaysListResult(document.RootElement); + value = DnsResolverDomainListResult.DeserializeDnsResolverDomainListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -547,24 +582,25 @@ public async Task> ListBySubscriptionAsync(string s } } - /// The operation to get all gateways of a non-Azure machine. - /// The ID of the target subscription. + /// Lists DNS resolver domain lists in all resource groups of a subscription. + /// The ID of the target subscription. The value must be an UUID. + /// The maximum number of results to return. If not specified, returns up to 100 results. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. - public Response ListBySubscription(string subscriptionId, CancellationToken cancellationToken = default) + public Response List(string subscriptionId, int? top = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - using var message = CreateListBySubscriptionRequest(subscriptionId); + using var message = CreateListRequest(subscriptionId, top); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - GatewaysListResult value = default; + DnsResolverDomainListResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = GatewaysListResult.DeserializeGatewaysListResult(document.RootElement); + value = DnsResolverDomainListResult.DeserializeDnsResolverDomainListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -572,7 +608,7 @@ public Response ListBySubscription(string subscriptionId, Ca } } - internal RequestUriBuilder CreateListByResourceGroupNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName) + internal RequestUriBuilder CreateListByResourceGroupNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, int? top) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -580,7 +616,7 @@ internal RequestUriBuilder CreateListByResourceGroupNextPageRequestUri(string ne return uri; } - internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName) + internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, int? top) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -594,28 +630,29 @@ internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, s return message; } - /// The operation to get all gateways of a non-Azure machine. + /// Lists DNS resolver domain lists within a resource group. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. + /// The maximum number of results to return. If not specified, returns up to 100 results. /// The cancellation token to use. /// , or is null. /// or is an empty string, and was expected to be non-empty. - public async Task> ListByResourceGroupNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + public async Task> ListByResourceGroupNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, int? top = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); + using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName, top); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - GatewaysListResult value = default; + DnsResolverDomainListResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = GatewaysListResult.DeserializeGatewaysListResult(document.RootElement); + value = DnsResolverDomainListResult.DeserializeDnsResolverDomainListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -623,28 +660,29 @@ public async Task> ListByResourceGroupNextPageAsync } } - /// The operation to get all gateways of a non-Azure machine. + /// Lists DNS resolver domain lists within a resource group. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. + /// The maximum number of results to return. If not specified, returns up to 100 results. /// The cancellation token to use. /// , or is null. /// or is an empty string, and was expected to be non-empty. - public Response ListByResourceGroupNextPage(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + public Response ListByResourceGroupNextPage(string nextLink, string subscriptionId, string resourceGroupName, int? top = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); + using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName, top); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - GatewaysListResult value = default; + DnsResolverDomainListResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = GatewaysListResult.DeserializeGatewaysListResult(document.RootElement); + value = DnsResolverDomainListResult.DeserializeDnsResolverDomainListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -652,7 +690,7 @@ public Response ListByResourceGroupNextPage(string nextLink, } } - internal RequestUriBuilder CreateListBySubscriptionNextPageRequestUri(string nextLink, string subscriptionId) + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, int? top) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -660,7 +698,7 @@ internal RequestUriBuilder CreateListBySubscriptionNextPageRequestUri(string nex return uri; } - internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, string subscriptionId) + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, int? top) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -674,26 +712,27 @@ internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, st return message; } - /// The operation to get all gateways of a non-Azure machine. + /// Lists DNS resolver domain lists in all resource groups of a subscription. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. + /// The maximum number of results to return. If not specified, returns up to 100 results. /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. - public async Task> ListBySubscriptionNextPageAsync(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, int? top = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId); + using var message = CreateListNextPageRequest(nextLink, subscriptionId, top); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - GatewaysListResult value = default; + DnsResolverDomainListResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = GatewaysListResult.DeserializeGatewaysListResult(document.RootElement); + value = DnsResolverDomainListResult.DeserializeDnsResolverDomainListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -701,26 +740,27 @@ public async Task> ListBySubscriptionNextPageAsync( } } - /// The operation to get all gateways of a non-Azure machine. + /// Lists DNS resolver domain lists in all resource groups of a subscription. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. + /// The maximum number of results to return. If not specified, returns up to 100 results. /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. - public Response ListBySubscriptionNextPage(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) + public Response ListNextPage(string nextLink, string subscriptionId, int? top = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId); + using var message = CreateListNextPageRequest(nextLink, subscriptionId, top); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - GatewaysListResult value = default; + DnsResolverDomainListResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = GatewaysListResult.DeserializeGatewaysListResult(document.RootElement); + value = DnsResolverDomainListResult.DeserializeDnsResolverDomainListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/DnsResolverPoliciesRestOperations.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/DnsResolverPoliciesRestOperations.cs new file mode 100644 index 000000000000..341bd4a07a10 --- /dev/null +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/DnsResolverPoliciesRestOperations.cs @@ -0,0 +1,949 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.DnsResolver.Models; + +namespace Azure.ResourceManager.DnsResolver +{ + internal partial class DnsResolverPoliciesRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of DnsResolverPoliciesRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public DnsResolverPoliciesRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2023-07-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string dnsResolverPolicyName, DnsResolverPolicyData data, string ifMatch, string ifNoneMatch) + { + 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.Network/dnsResolverPolicies/", false); + uri.AppendPath(dnsResolverPolicyName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string dnsResolverPolicyName, DnsResolverPolicyData data, string ifMatch, string ifNoneMatch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + 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.Network/dnsResolverPolicies/", false); + uri.AppendPath(dnsResolverPolicyName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + if (ifMatch != null) + { + request.Headers.Add("If-Match", ifMatch); + } + if (ifNoneMatch != null) + { + request.Headers.Add("If-None-Match", ifNoneMatch); + } + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Creates or updates a DNS resolver policy. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the DNS resolver policy. + /// Parameters supplied to the CreateOrUpdate operation. + /// ETag of the resource. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting any concurrent changes. + /// Set to '*' to allow a new resource to be created, but to prevent updating an existing resource. Other values will be ignored. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string dnsResolverPolicyName, DnsResolverPolicyData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(dnsResolverPolicyName, nameof(dnsResolverPolicyName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, dnsResolverPolicyName, data, ifMatch, ifNoneMatch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Creates or updates a DNS resolver policy. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the DNS resolver policy. + /// Parameters supplied to the CreateOrUpdate operation. + /// ETag of the resource. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting any concurrent changes. + /// Set to '*' to allow a new resource to be created, but to prevent updating an existing resource. Other values will be ignored. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string dnsResolverPolicyName, DnsResolverPolicyData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(dnsResolverPolicyName, nameof(dnsResolverPolicyName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, dnsResolverPolicyName, data, ifMatch, ifNoneMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string dnsResolverPolicyName, DnsResolverPolicyPatch patch, string ifMatch) + { + 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.Network/dnsResolverPolicies/", false); + uri.AppendPath(dnsResolverPolicyName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string dnsResolverPolicyName, DnsResolverPolicyPatch patch, string ifMatch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.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.Network/dnsResolverPolicies/", false); + uri.AppendPath(dnsResolverPolicyName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + if (ifMatch != null) + { + request.Headers.Add("If-Match", ifMatch); + } + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Updates a DNS resolver policy. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the DNS resolver policy. + /// Parameters supplied to the Update operation. + /// ETag of the resource. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting any concurrent changes. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string dnsResolverPolicyName, DnsResolverPolicyPatch patch, string ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(dnsResolverPolicyName, nameof(dnsResolverPolicyName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, dnsResolverPolicyName, patch, ifMatch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Updates a DNS resolver policy. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the DNS resolver policy. + /// Parameters supplied to the Update operation. + /// ETag of the resource. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting any concurrent changes. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string dnsResolverPolicyName, DnsResolverPolicyPatch patch, string ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(dnsResolverPolicyName, nameof(dnsResolverPolicyName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, dnsResolverPolicyName, patch, ifMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string dnsResolverPolicyName, string ifMatch) + { + 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.Network/dnsResolverPolicies/", false); + uri.AppendPath(dnsResolverPolicyName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string dnsResolverPolicyName, string ifMatch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + 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.Network/dnsResolverPolicies/", false); + uri.AppendPath(dnsResolverPolicyName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + if (ifMatch != null) + { + request.Headers.Add("If-Match", ifMatch); + } + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Deletes a DNS resolver policy. WARNING: This operation cannot be undone. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the DNS resolver policy. + /// ETag of the resource. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting any concurrent changes. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string dnsResolverPolicyName, string ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(dnsResolverPolicyName, nameof(dnsResolverPolicyName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, dnsResolverPolicyName, ifMatch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Deletes a DNS resolver policy. WARNING: This operation cannot be undone. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the DNS resolver policy. + /// ETag of the resource. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting any concurrent changes. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string dnsResolverPolicyName, string ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(dnsResolverPolicyName, nameof(dnsResolverPolicyName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, dnsResolverPolicyName, ifMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string dnsResolverPolicyName) + { + 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.Network/dnsResolverPolicies/", false); + uri.AppendPath(dnsResolverPolicyName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string dnsResolverPolicyName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + 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.Network/dnsResolverPolicies/", false); + uri.AppendPath(dnsResolverPolicyName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets properties of a DNS resolver policy. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the DNS resolver policy. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string dnsResolverPolicyName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(dnsResolverPolicyName, nameof(dnsResolverPolicyName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, dnsResolverPolicyName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DnsResolverPolicyData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = DnsResolverPolicyData.DeserializeDnsResolverPolicyData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DnsResolverPolicyData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets properties of a DNS resolver policy. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the DNS resolver policy. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string dnsResolverPolicyName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(dnsResolverPolicyName, nameof(dnsResolverPolicyName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, dnsResolverPolicyName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DnsResolverPolicyData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = DnsResolverPolicyData.DeserializeDnsResolverPolicyData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DnsResolverPolicyData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByResourceGroupRequestUri(string subscriptionId, string resourceGroupName, int? top) + { + 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.Network/dnsResolverPolicies", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + return uri; + } + + internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, string resourceGroupName, int? top) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + 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.Network/dnsResolverPolicies", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists DNS resolver policies within a resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The maximum number of results to return. If not specified, returns up to 100 results. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListByResourceGroupAsync(string subscriptionId, string resourceGroupName, int? top = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName, top); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DnsResolverPolicyListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = DnsResolverPolicyListResult.DeserializeDnsResolverPolicyListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists DNS resolver policies within a resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The maximum number of results to return. If not specified, returns up to 100 results. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListByResourceGroup(string subscriptionId, string resourceGroupName, int? top = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName, top); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DnsResolverPolicyListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = DnsResolverPolicyListResult.DeserializeDnsResolverPolicyListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListRequestUri(string subscriptionId, int? top) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.Network/dnsResolverPolicies", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + return uri; + } + + internal HttpMessage CreateListRequest(string subscriptionId, int? top) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.Network/dnsResolverPolicies", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists DNS resolver policies in all resource groups of a subscription. + /// The ID of the target subscription. The value must be an UUID. + /// The maximum number of results to return. If not specified, returns up to 100 results. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, int? top = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListRequest(subscriptionId, top); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DnsResolverPolicyListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = DnsResolverPolicyListResult.DeserializeDnsResolverPolicyListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists DNS resolver policies in all resource groups of a subscription. + /// The ID of the target subscription. The value must be an UUID. + /// The maximum number of results to return. If not specified, returns up to 100 results. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, int? top = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListRequest(subscriptionId, top); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DnsResolverPolicyListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = DnsResolverPolicyListResult.DeserializeDnsResolverPolicyListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByVirtualNetworkRequestUri(string subscriptionId, string resourceGroupName, string virtualNetworkName) + { + 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.Network/virtualNetworks/", false); + uri.AppendPath(virtualNetworkName, true); + uri.AppendPath("/listDnsResolverPolicies", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByVirtualNetworkRequest(string subscriptionId, string resourceGroupName, string virtualNetworkName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + 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.Network/virtualNetworks/", false); + uri.AppendPath(virtualNetworkName, true); + uri.AppendPath("/listDnsResolverPolicies", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists DNS resolver policy resource IDs linked to a virtual network. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the virtual network. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByVirtualNetworkAsync(string subscriptionId, string resourceGroupName, string virtualNetworkName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(virtualNetworkName, nameof(virtualNetworkName)); + + using var message = CreateListByVirtualNetworkRequest(subscriptionId, resourceGroupName, virtualNetworkName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SubResourceListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = SubResourceListResult.DeserializeSubResourceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists DNS resolver policy resource IDs linked to a virtual network. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the virtual network. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByVirtualNetwork(string subscriptionId, string resourceGroupName, string virtualNetworkName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(virtualNetworkName, nameof(virtualNetworkName)); + + using var message = CreateListByVirtualNetworkRequest(subscriptionId, resourceGroupName, virtualNetworkName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SubResourceListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = SubResourceListResult.DeserializeSubResourceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByResourceGroupNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, int? top) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, int? top) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists DNS resolver policies within a resource group. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The maximum number of results to return. If not specified, returns up to 100 results. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListByResourceGroupNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, int? top = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName, top); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DnsResolverPolicyListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = DnsResolverPolicyListResult.DeserializeDnsResolverPolicyListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists DNS resolver policies within a resource group. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The maximum number of results to return. If not specified, returns up to 100 results. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListByResourceGroupNextPage(string nextLink, string subscriptionId, string resourceGroupName, int? top = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName, top); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DnsResolverPolicyListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = DnsResolverPolicyListResult.DeserializeDnsResolverPolicyListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, int? top) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, int? top) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists DNS resolver policies in all resource groups of a subscription. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The maximum number of results to return. If not specified, returns up to 100 results. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, int? top = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, top); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DnsResolverPolicyListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = DnsResolverPolicyListResult.DeserializeDnsResolverPolicyListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists DNS resolver policies in all resource groups of a subscription. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The maximum number of results to return. If not specified, returns up to 100 results. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, int? top = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, top); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DnsResolverPolicyListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = DnsResolverPolicyListResult.DeserializeDnsResolverPolicyListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByVirtualNetworkNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string virtualNetworkName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByVirtualNetworkNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string virtualNetworkName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists DNS resolver policy resource IDs linked to a virtual network. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the virtual network. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByVirtualNetworkNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string virtualNetworkName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(virtualNetworkName, nameof(virtualNetworkName)); + + using var message = CreateListByVirtualNetworkNextPageRequest(nextLink, subscriptionId, resourceGroupName, virtualNetworkName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SubResourceListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = SubResourceListResult.DeserializeSubResourceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists DNS resolver policy resource IDs linked to a virtual network. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the virtual network. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByVirtualNetworkNextPage(string nextLink, string subscriptionId, string resourceGroupName, string virtualNetworkName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(virtualNetworkName, nameof(virtualNetworkName)); + + using var message = CreateListByVirtualNetworkNextPageRequest(nextLink, subscriptionId, resourceGroupName, virtualNetworkName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SubResourceListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = SubResourceListResult.DeserializeSubResourceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/DnsResolverPolicyVirtualNetworkLinksRestOperations.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/DnsResolverPolicyVirtualNetworkLinksRestOperations.cs new file mode 100644 index 000000000000..fd68efd24af9 --- /dev/null +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/DnsResolverPolicyVirtualNetworkLinksRestOperations.cs @@ -0,0 +1,649 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.DnsResolver.Models; + +namespace Azure.ResourceManager.DnsResolver +{ + internal partial class DnsResolverPolicyVirtualNetworkLinksRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of DnsResolverPolicyVirtualNetworkLinksRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public DnsResolverPolicyVirtualNetworkLinksRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2023-07-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string dnsResolverPolicyName, string dnsResolverPolicyVirtualNetworkLinkName, DnsResolverPolicyVirtualNetworkLinkData data, string ifMatch, string ifNoneMatch) + { + 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.Network/dnsResolverPolicies/", false); + uri.AppendPath(dnsResolverPolicyName, true); + uri.AppendPath("/virtualNetworkLinks/", false); + uri.AppendPath(dnsResolverPolicyVirtualNetworkLinkName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string dnsResolverPolicyName, string dnsResolverPolicyVirtualNetworkLinkName, DnsResolverPolicyVirtualNetworkLinkData data, string ifMatch, string ifNoneMatch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + 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.Network/dnsResolverPolicies/", false); + uri.AppendPath(dnsResolverPolicyName, true); + uri.AppendPath("/virtualNetworkLinks/", false); + uri.AppendPath(dnsResolverPolicyVirtualNetworkLinkName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + if (ifMatch != null) + { + request.Headers.Add("If-Match", ifMatch); + } + if (ifNoneMatch != null) + { + request.Headers.Add("If-None-Match", ifNoneMatch); + } + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Creates or updates a DNS resolver policy virtual network link. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the DNS resolver policy. + /// The name of the DNS resolver policy virtual network link for the DNS resolver policy. + /// Parameters supplied to the CreateOrUpdate operation. + /// ETag of the resource. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting any concurrent changes. + /// Set to '*' to allow a new resource to be created, but to prevent updating an existing resource. Other values will be ignored. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string dnsResolverPolicyName, string dnsResolverPolicyVirtualNetworkLinkName, DnsResolverPolicyVirtualNetworkLinkData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(dnsResolverPolicyName, nameof(dnsResolverPolicyName)); + Argument.AssertNotNullOrEmpty(dnsResolverPolicyVirtualNetworkLinkName, nameof(dnsResolverPolicyVirtualNetworkLinkName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, dnsResolverPolicyName, dnsResolverPolicyVirtualNetworkLinkName, data, ifMatch, ifNoneMatch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Creates or updates a DNS resolver policy virtual network link. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the DNS resolver policy. + /// The name of the DNS resolver policy virtual network link for the DNS resolver policy. + /// Parameters supplied to the CreateOrUpdate operation. + /// ETag of the resource. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting any concurrent changes. + /// Set to '*' to allow a new resource to be created, but to prevent updating an existing resource. Other values will be ignored. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string dnsResolverPolicyName, string dnsResolverPolicyVirtualNetworkLinkName, DnsResolverPolicyVirtualNetworkLinkData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(dnsResolverPolicyName, nameof(dnsResolverPolicyName)); + Argument.AssertNotNullOrEmpty(dnsResolverPolicyVirtualNetworkLinkName, nameof(dnsResolverPolicyVirtualNetworkLinkName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, dnsResolverPolicyName, dnsResolverPolicyVirtualNetworkLinkName, data, ifMatch, ifNoneMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string dnsResolverPolicyName, string dnsResolverPolicyVirtualNetworkLinkName, DnsResolverPolicyVirtualNetworkLinkPatch patch, string ifMatch) + { + 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.Network/dnsResolverPolicies/", false); + uri.AppendPath(dnsResolverPolicyName, true); + uri.AppendPath("/virtualNetworkLinks/", false); + uri.AppendPath(dnsResolverPolicyVirtualNetworkLinkName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string dnsResolverPolicyName, string dnsResolverPolicyVirtualNetworkLinkName, DnsResolverPolicyVirtualNetworkLinkPatch patch, string ifMatch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.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.Network/dnsResolverPolicies/", false); + uri.AppendPath(dnsResolverPolicyName, true); + uri.AppendPath("/virtualNetworkLinks/", false); + uri.AppendPath(dnsResolverPolicyVirtualNetworkLinkName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + if (ifMatch != null) + { + request.Headers.Add("If-Match", ifMatch); + } + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Updates a DNS resolver policy virtual network link. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the DNS resolver policy. + /// The name of the DNS resolver policy virtual network link for the DNS resolver policy. + /// Parameters supplied to the Update operation. + /// ETag of the resource. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting any concurrent changes. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string dnsResolverPolicyName, string dnsResolverPolicyVirtualNetworkLinkName, DnsResolverPolicyVirtualNetworkLinkPatch patch, string ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(dnsResolverPolicyName, nameof(dnsResolverPolicyName)); + Argument.AssertNotNullOrEmpty(dnsResolverPolicyVirtualNetworkLinkName, nameof(dnsResolverPolicyVirtualNetworkLinkName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, dnsResolverPolicyName, dnsResolverPolicyVirtualNetworkLinkName, patch, ifMatch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Updates a DNS resolver policy virtual network link. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the DNS resolver policy. + /// The name of the DNS resolver policy virtual network link for the DNS resolver policy. + /// Parameters supplied to the Update operation. + /// ETag of the resource. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting any concurrent changes. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string dnsResolverPolicyName, string dnsResolverPolicyVirtualNetworkLinkName, DnsResolverPolicyVirtualNetworkLinkPatch patch, string ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(dnsResolverPolicyName, nameof(dnsResolverPolicyName)); + Argument.AssertNotNullOrEmpty(dnsResolverPolicyVirtualNetworkLinkName, nameof(dnsResolverPolicyVirtualNetworkLinkName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, dnsResolverPolicyName, dnsResolverPolicyVirtualNetworkLinkName, patch, ifMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string dnsResolverPolicyName, string dnsResolverPolicyVirtualNetworkLinkName, string ifMatch) + { + 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.Network/dnsResolverPolicies/", false); + uri.AppendPath(dnsResolverPolicyName, true); + uri.AppendPath("/virtualNetworkLinks/", false); + uri.AppendPath(dnsResolverPolicyVirtualNetworkLinkName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string dnsResolverPolicyName, string dnsResolverPolicyVirtualNetworkLinkName, string ifMatch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + 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.Network/dnsResolverPolicies/", false); + uri.AppendPath(dnsResolverPolicyName, true); + uri.AppendPath("/virtualNetworkLinks/", false); + uri.AppendPath(dnsResolverPolicyVirtualNetworkLinkName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + if (ifMatch != null) + { + request.Headers.Add("If-Match", ifMatch); + } + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Deletes a DNS resolver policy virtual network link. WARNING: This operation cannot be undone. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the DNS resolver policy. + /// The name of the DNS resolver policy virtual network link for the DNS resolver policy. + /// ETag of the resource. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting any concurrent changes. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string dnsResolverPolicyName, string dnsResolverPolicyVirtualNetworkLinkName, string ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(dnsResolverPolicyName, nameof(dnsResolverPolicyName)); + Argument.AssertNotNullOrEmpty(dnsResolverPolicyVirtualNetworkLinkName, nameof(dnsResolverPolicyVirtualNetworkLinkName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, dnsResolverPolicyName, dnsResolverPolicyVirtualNetworkLinkName, ifMatch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Deletes a DNS resolver policy virtual network link. WARNING: This operation cannot be undone. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the DNS resolver policy. + /// The name of the DNS resolver policy virtual network link for the DNS resolver policy. + /// ETag of the resource. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting any concurrent changes. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string dnsResolverPolicyName, string dnsResolverPolicyVirtualNetworkLinkName, string ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(dnsResolverPolicyName, nameof(dnsResolverPolicyName)); + Argument.AssertNotNullOrEmpty(dnsResolverPolicyVirtualNetworkLinkName, nameof(dnsResolverPolicyVirtualNetworkLinkName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, dnsResolverPolicyName, dnsResolverPolicyVirtualNetworkLinkName, ifMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string dnsResolverPolicyName, string dnsResolverPolicyVirtualNetworkLinkName) + { + 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.Network/dnsResolverPolicies/", false); + uri.AppendPath(dnsResolverPolicyName, true); + uri.AppendPath("/virtualNetworkLinks/", false); + uri.AppendPath(dnsResolverPolicyVirtualNetworkLinkName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string dnsResolverPolicyName, string dnsResolverPolicyVirtualNetworkLinkName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + 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.Network/dnsResolverPolicies/", false); + uri.AppendPath(dnsResolverPolicyName, true); + uri.AppendPath("/virtualNetworkLinks/", false); + uri.AppendPath(dnsResolverPolicyVirtualNetworkLinkName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets properties of a DNS resolver policy virtual network link. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the DNS resolver policy. + /// The name of the DNS resolver policy virtual network link for the DNS resolver policy. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string dnsResolverPolicyName, string dnsResolverPolicyVirtualNetworkLinkName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(dnsResolverPolicyName, nameof(dnsResolverPolicyName)); + Argument.AssertNotNullOrEmpty(dnsResolverPolicyVirtualNetworkLinkName, nameof(dnsResolverPolicyVirtualNetworkLinkName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, dnsResolverPolicyName, dnsResolverPolicyVirtualNetworkLinkName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DnsResolverPolicyVirtualNetworkLinkData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = DnsResolverPolicyVirtualNetworkLinkData.DeserializeDnsResolverPolicyVirtualNetworkLinkData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DnsResolverPolicyVirtualNetworkLinkData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets properties of a DNS resolver policy virtual network link. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the DNS resolver policy. + /// The name of the DNS resolver policy virtual network link for the DNS resolver policy. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string dnsResolverPolicyName, string dnsResolverPolicyVirtualNetworkLinkName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(dnsResolverPolicyName, nameof(dnsResolverPolicyName)); + Argument.AssertNotNullOrEmpty(dnsResolverPolicyVirtualNetworkLinkName, nameof(dnsResolverPolicyVirtualNetworkLinkName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, dnsResolverPolicyName, dnsResolverPolicyVirtualNetworkLinkName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DnsResolverPolicyVirtualNetworkLinkData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = DnsResolverPolicyVirtualNetworkLinkData.DeserializeDnsResolverPolicyVirtualNetworkLinkData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DnsResolverPolicyVirtualNetworkLinkData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string dnsResolverPolicyName, int? top) + { + 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.Network/dnsResolverPolicies/", false); + uri.AppendPath(dnsResolverPolicyName, true); + uri.AppendPath("/virtualNetworkLinks", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + return uri; + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string dnsResolverPolicyName, int? top) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + 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.Network/dnsResolverPolicies/", false); + uri.AppendPath(dnsResolverPolicyName, true); + uri.AppendPath("/virtualNetworkLinks", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists DNS resolver policy virtual network links. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the DNS resolver policy. + /// The maximum number of results to return. If not specified, returns up to 100 results. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string dnsResolverPolicyName, int? top = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(dnsResolverPolicyName, nameof(dnsResolverPolicyName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, dnsResolverPolicyName, top); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DnsResolverPolicyVirtualNetworkLinkListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = DnsResolverPolicyVirtualNetworkLinkListResult.DeserializeDnsResolverPolicyVirtualNetworkLinkListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists DNS resolver policy virtual network links. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the DNS resolver policy. + /// The maximum number of results to return. If not specified, returns up to 100 results. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string dnsResolverPolicyName, int? top = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(dnsResolverPolicyName, nameof(dnsResolverPolicyName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, dnsResolverPolicyName, top); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DnsResolverPolicyVirtualNetworkLinkListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = DnsResolverPolicyVirtualNetworkLinkListResult.DeserializeDnsResolverPolicyVirtualNetworkLinkListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string dnsResolverPolicyName, int? top) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string dnsResolverPolicyName, int? top) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists DNS resolver policy virtual network links. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the DNS resolver policy. + /// The maximum number of results to return. If not specified, returns up to 100 results. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string dnsResolverPolicyName, int? top = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(dnsResolverPolicyName, nameof(dnsResolverPolicyName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, dnsResolverPolicyName, top); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DnsResolverPolicyVirtualNetworkLinkListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = DnsResolverPolicyVirtualNetworkLinkListResult.DeserializeDnsResolverPolicyVirtualNetworkLinkListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists DNS resolver policy virtual network links. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the DNS resolver policy. + /// The maximum number of results to return. If not specified, returns up to 100 results. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string dnsResolverPolicyName, int? top = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(dnsResolverPolicyName, nameof(dnsResolverPolicyName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, dnsResolverPolicyName, top); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DnsResolverPolicyVirtualNetworkLinkListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = DnsResolverPolicyVirtualNetworkLinkListResult.DeserializeDnsResolverPolicyVirtualNetworkLinkListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/DnsResolversRestOperations.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/DnsResolversRestOperations.cs index 0090db7fa7d2..80959dac5538 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/DnsResolversRestOperations.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/DnsResolversRestOperations.cs @@ -32,7 +32,7 @@ public DnsResolversRestOperations(HttpPipeline pipeline, string applicationId, U { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-07-01"; + _apiVersion = apiVersion ?? "2023-07-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -83,7 +83,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates or updates a DNS resolver. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the DNS resolver. /// Parameters supplied to the CreateOrUpdate operation. @@ -113,7 +113,7 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re } /// Creates or updates a DNS resolver. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the DNS resolver. /// Parameters supplied to the CreateOrUpdate operation. @@ -185,7 +185,7 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Updates a DNS resolver. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the DNS resolver. /// Parameters supplied to the Update operation. @@ -213,7 +213,7 @@ public async Task UpdateAsync(string subscriptionId, string resourceGr } /// Updates a DNS resolver. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the DNS resolver. /// Parameters supplied to the Update operation. @@ -279,7 +279,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes a DNS resolver. WARNING: This operation cannot be undone. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the DNS resolver. /// ETag of the resource. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting any concurrent changes. @@ -306,7 +306,7 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes a DNS resolver. WARNING: This operation cannot be undone. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the DNS resolver. /// ETag of the resource. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting any concurrent changes. @@ -367,7 +367,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets properties of a DNS resolver. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the DNS resolver. /// The cancellation token to use. @@ -398,7 +398,7 @@ public async Task> GetAsync(string subscriptionId, str } /// Gets properties of a DNS resolver. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the DNS resolver. /// The cancellation token to use. @@ -469,7 +469,7 @@ internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, str } /// Lists DNS resolvers within a resource group. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The maximum number of results to return. If not specified, returns up to 100 results. /// The cancellation token to use. @@ -497,7 +497,7 @@ public async Task> ListByResourceGroupAsync(stri } /// Lists DNS resolvers within a resource group. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The maximum number of results to return. If not specified, returns up to 100 results. /// The cancellation token to use. @@ -561,7 +561,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, int? top) } /// Lists DNS resolvers in all resource groups of a subscription. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The maximum number of results to return. If not specified, returns up to 100 results. /// The cancellation token to use. /// is null. @@ -587,7 +587,7 @@ public async Task> ListAsync(string subscription } /// Lists DNS resolvers in all resource groups of a subscription. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The maximum number of results to return. If not specified, returns up to 100 results. /// The cancellation token to use. /// is null. @@ -657,7 +657,7 @@ internal HttpMessage CreateListByVirtualNetworkRequest(string subscriptionId, st } /// Lists DNS resolver resource IDs linked to a virtual network. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the virtual network. /// The maximum number of results to return. If not specified, returns up to 100 results. @@ -687,7 +687,7 @@ public async Task> ListByVirtualNetworkAsync(str } /// Lists DNS resolver resource IDs linked to a virtual network. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the virtual network. /// The maximum number of results to return. If not specified, returns up to 100 results. @@ -740,7 +740,7 @@ internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, s /// Lists DNS resolvers within a resource group. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The maximum number of results to return. If not specified, returns up to 100 results. /// The cancellation token to use. @@ -770,7 +770,7 @@ public async Task> ListByResourceGroupNextPageAs /// Lists DNS resolvers within a resource group. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The maximum number of results to return. If not specified, returns up to 100 results. /// The cancellation token to use. @@ -822,7 +822,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// Lists DNS resolvers in all resource groups of a subscription. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The maximum number of results to return. If not specified, returns up to 100 results. /// The cancellation token to use. /// or is null. @@ -850,7 +850,7 @@ public async Task> ListNextPageAsync(string next /// Lists DNS resolvers in all resource groups of a subscription. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The maximum number of results to return. If not specified, returns up to 100 results. /// The cancellation token to use. /// or is null. @@ -900,7 +900,7 @@ internal HttpMessage CreateListByVirtualNetworkNextPageRequest(string nextLink, /// Lists DNS resolver resource IDs linked to a virtual network. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the virtual network. /// The maximum number of results to return. If not specified, returns up to 100 results. @@ -932,7 +932,7 @@ public async Task> ListByVirtualNetworkNextPageA /// Lists DNS resolver resource IDs linked to a virtual network. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the virtual network. /// The maximum number of results to return. If not specified, returns up to 100 results. diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/DnsSecurityRulesRestOperations.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/DnsSecurityRulesRestOperations.cs new file mode 100644 index 000000000000..777bda40209a --- /dev/null +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/DnsSecurityRulesRestOperations.cs @@ -0,0 +1,649 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.DnsResolver.Models; + +namespace Azure.ResourceManager.DnsResolver +{ + internal partial class DnsSecurityRulesRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of DnsSecurityRulesRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public DnsSecurityRulesRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2023-07-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string dnsResolverPolicyName, string dnsSecurityRuleName, DnsSecurityRuleData data, string ifMatch, string ifNoneMatch) + { + 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.Network/dnsResolverPolicies/", false); + uri.AppendPath(dnsResolverPolicyName, true); + uri.AppendPath("/dnsSecurityRules/", false); + uri.AppendPath(dnsSecurityRuleName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string dnsResolverPolicyName, string dnsSecurityRuleName, DnsSecurityRuleData data, string ifMatch, string ifNoneMatch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + 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.Network/dnsResolverPolicies/", false); + uri.AppendPath(dnsResolverPolicyName, true); + uri.AppendPath("/dnsSecurityRules/", false); + uri.AppendPath(dnsSecurityRuleName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + if (ifMatch != null) + { + request.Headers.Add("If-Match", ifMatch); + } + if (ifNoneMatch != null) + { + request.Headers.Add("If-None-Match", ifNoneMatch); + } + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Creates or updates a DNS security rule for a DNS resolver policy. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the DNS resolver policy. + /// The name of the DNS security rule. + /// Parameters supplied to the CreateOrUpdate operation. + /// ETag of the resource. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting any concurrent changes. + /// Set to '*' to allow a new resource to be created, but to prevent updating an existing resource. Other values will be ignored. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string dnsResolverPolicyName, string dnsSecurityRuleName, DnsSecurityRuleData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(dnsResolverPolicyName, nameof(dnsResolverPolicyName)); + Argument.AssertNotNullOrEmpty(dnsSecurityRuleName, nameof(dnsSecurityRuleName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, dnsResolverPolicyName, dnsSecurityRuleName, data, ifMatch, ifNoneMatch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Creates or updates a DNS security rule for a DNS resolver policy. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the DNS resolver policy. + /// The name of the DNS security rule. + /// Parameters supplied to the CreateOrUpdate operation. + /// ETag of the resource. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting any concurrent changes. + /// Set to '*' to allow a new resource to be created, but to prevent updating an existing resource. Other values will be ignored. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string dnsResolverPolicyName, string dnsSecurityRuleName, DnsSecurityRuleData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(dnsResolverPolicyName, nameof(dnsResolverPolicyName)); + Argument.AssertNotNullOrEmpty(dnsSecurityRuleName, nameof(dnsSecurityRuleName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, dnsResolverPolicyName, dnsSecurityRuleName, data, ifMatch, ifNoneMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string dnsResolverPolicyName, string dnsSecurityRuleName, DnsSecurityRulePatch patch, string ifMatch) + { + 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.Network/dnsResolverPolicies/", false); + uri.AppendPath(dnsResolverPolicyName, true); + uri.AppendPath("/dnsSecurityRules/", false); + uri.AppendPath(dnsSecurityRuleName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string dnsResolverPolicyName, string dnsSecurityRuleName, DnsSecurityRulePatch patch, string ifMatch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.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.Network/dnsResolverPolicies/", false); + uri.AppendPath(dnsResolverPolicyName, true); + uri.AppendPath("/dnsSecurityRules/", false); + uri.AppendPath(dnsSecurityRuleName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + if (ifMatch != null) + { + request.Headers.Add("If-Match", ifMatch); + } + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Updates a DNS security rule. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the DNS resolver policy. + /// The name of the DNS security rule. + /// Parameters supplied to the Update operation. + /// ETag of the resource. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting any concurrent changes. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string dnsResolverPolicyName, string dnsSecurityRuleName, DnsSecurityRulePatch patch, string ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(dnsResolverPolicyName, nameof(dnsResolverPolicyName)); + Argument.AssertNotNullOrEmpty(dnsSecurityRuleName, nameof(dnsSecurityRuleName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, dnsResolverPolicyName, dnsSecurityRuleName, patch, ifMatch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Updates a DNS security rule. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the DNS resolver policy. + /// The name of the DNS security rule. + /// Parameters supplied to the Update operation. + /// ETag of the resource. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting any concurrent changes. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string dnsResolverPolicyName, string dnsSecurityRuleName, DnsSecurityRulePatch patch, string ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(dnsResolverPolicyName, nameof(dnsResolverPolicyName)); + Argument.AssertNotNullOrEmpty(dnsSecurityRuleName, nameof(dnsSecurityRuleName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, dnsResolverPolicyName, dnsSecurityRuleName, patch, ifMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string dnsResolverPolicyName, string dnsSecurityRuleName, string ifMatch) + { + 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.Network/dnsResolverPolicies/", false); + uri.AppendPath(dnsResolverPolicyName, true); + uri.AppendPath("/dnsSecurityRules/", false); + uri.AppendPath(dnsSecurityRuleName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string dnsResolverPolicyName, string dnsSecurityRuleName, string ifMatch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + 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.Network/dnsResolverPolicies/", false); + uri.AppendPath(dnsResolverPolicyName, true); + uri.AppendPath("/dnsSecurityRules/", false); + uri.AppendPath(dnsSecurityRuleName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + if (ifMatch != null) + { + request.Headers.Add("If-Match", ifMatch); + } + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Deletes a DNS security rule for a DNS resolver policy. WARNING: This operation cannot be undone. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the DNS resolver policy. + /// The name of the DNS security rule. + /// ETag of the resource. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting any concurrent changes. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string dnsResolverPolicyName, string dnsSecurityRuleName, string ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(dnsResolverPolicyName, nameof(dnsResolverPolicyName)); + Argument.AssertNotNullOrEmpty(dnsSecurityRuleName, nameof(dnsSecurityRuleName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, dnsResolverPolicyName, dnsSecurityRuleName, ifMatch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Deletes a DNS security rule for a DNS resolver policy. WARNING: This operation cannot be undone. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the DNS resolver policy. + /// The name of the DNS security rule. + /// ETag of the resource. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting any concurrent changes. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string dnsResolverPolicyName, string dnsSecurityRuleName, string ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(dnsResolverPolicyName, nameof(dnsResolverPolicyName)); + Argument.AssertNotNullOrEmpty(dnsSecurityRuleName, nameof(dnsSecurityRuleName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, dnsResolverPolicyName, dnsSecurityRuleName, ifMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string dnsResolverPolicyName, string dnsSecurityRuleName) + { + 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.Network/dnsResolverPolicies/", false); + uri.AppendPath(dnsResolverPolicyName, true); + uri.AppendPath("/dnsSecurityRules/", false); + uri.AppendPath(dnsSecurityRuleName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string dnsResolverPolicyName, string dnsSecurityRuleName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + 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.Network/dnsResolverPolicies/", false); + uri.AppendPath(dnsResolverPolicyName, true); + uri.AppendPath("/dnsSecurityRules/", false); + uri.AppendPath(dnsSecurityRuleName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets properties of a DNS security rule for a DNS resolver policy. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the DNS resolver policy. + /// The name of the DNS security rule. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string dnsResolverPolicyName, string dnsSecurityRuleName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(dnsResolverPolicyName, nameof(dnsResolverPolicyName)); + Argument.AssertNotNullOrEmpty(dnsSecurityRuleName, nameof(dnsSecurityRuleName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, dnsResolverPolicyName, dnsSecurityRuleName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DnsSecurityRuleData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = DnsSecurityRuleData.DeserializeDnsSecurityRuleData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DnsSecurityRuleData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets properties of a DNS security rule for a DNS resolver policy. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the DNS resolver policy. + /// The name of the DNS security rule. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string dnsResolverPolicyName, string dnsSecurityRuleName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(dnsResolverPolicyName, nameof(dnsResolverPolicyName)); + Argument.AssertNotNullOrEmpty(dnsSecurityRuleName, nameof(dnsSecurityRuleName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, dnsResolverPolicyName, dnsSecurityRuleName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DnsSecurityRuleData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = DnsSecurityRuleData.DeserializeDnsSecurityRuleData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DnsSecurityRuleData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string dnsResolverPolicyName, int? top) + { + 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.Network/dnsResolverPolicies/", false); + uri.AppendPath(dnsResolverPolicyName, true); + uri.AppendPath("/dnsSecurityRules", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + return uri; + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string dnsResolverPolicyName, int? top) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + 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.Network/dnsResolverPolicies/", false); + uri.AppendPath(dnsResolverPolicyName, true); + uri.AppendPath("/dnsSecurityRules", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists DNS security rules for a DNS resolver policy. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the DNS resolver policy. + /// The maximum number of results to return. If not specified, returns up to 100 results. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string dnsResolverPolicyName, int? top = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(dnsResolverPolicyName, nameof(dnsResolverPolicyName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, dnsResolverPolicyName, top); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DnsSecurityRuleListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = DnsSecurityRuleListResult.DeserializeDnsSecurityRuleListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists DNS security rules for a DNS resolver policy. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the DNS resolver policy. + /// The maximum number of results to return. If not specified, returns up to 100 results. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string dnsResolverPolicyName, int? top = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(dnsResolverPolicyName, nameof(dnsResolverPolicyName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, dnsResolverPolicyName, top); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DnsSecurityRuleListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = DnsSecurityRuleListResult.DeserializeDnsSecurityRuleListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string dnsResolverPolicyName, int? top) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string dnsResolverPolicyName, int? top) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists DNS security rules for a DNS resolver policy. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the DNS resolver policy. + /// The maximum number of results to return. If not specified, returns up to 100 results. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string dnsResolverPolicyName, int? top = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(dnsResolverPolicyName, nameof(dnsResolverPolicyName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, dnsResolverPolicyName, top); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DnsSecurityRuleListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = DnsSecurityRuleListResult.DeserializeDnsSecurityRuleListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists DNS security rules for a DNS resolver policy. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the DNS resolver policy. + /// The maximum number of results to return. If not specified, returns up to 100 results. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string dnsResolverPolicyName, int? top = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(dnsResolverPolicyName, nameof(dnsResolverPolicyName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, dnsResolverPolicyName, top); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DnsSecurityRuleListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = DnsSecurityRuleListResult.DeserializeDnsSecurityRuleListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/ForwardingRulesRestOperations.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/ForwardingRulesRestOperations.cs index 15a969e1a053..5259d0fb36a7 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/ForwardingRulesRestOperations.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/ForwardingRulesRestOperations.cs @@ -32,7 +32,7 @@ public ForwardingRulesRestOperations(HttpPipeline pipeline, string applicationId { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-07-01"; + _apiVersion = apiVersion ?? "2023-07-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -87,7 +87,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates or updates a forwarding rule in a DNS forwarding ruleset. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the DNS forwarding ruleset. /// The name of the forwarding rule. @@ -123,7 +123,7 @@ public async Task> CreateOrUpdateAsync(string su } /// Creates or updates a forwarding rule in a DNS forwarding ruleset. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the DNS forwarding ruleset. /// The name of the forwarding rule. @@ -205,7 +205,7 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Updates a forwarding rule in a DNS forwarding ruleset. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the DNS forwarding ruleset. /// The name of the forwarding rule. @@ -239,7 +239,7 @@ public async Task> UpdateAsync(string subscripti } /// Updates a forwarding rule in a DNS forwarding ruleset. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the DNS forwarding ruleset. /// The name of the forwarding rule. @@ -315,7 +315,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes a forwarding rule in a DNS forwarding ruleset. WARNING: This operation cannot be undone. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the DNS forwarding ruleset. /// The name of the forwarding rule. @@ -343,7 +343,7 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes a forwarding rule in a DNS forwarding ruleset. WARNING: This operation cannot be undone. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the DNS forwarding ruleset. /// The name of the forwarding rule. @@ -409,7 +409,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets properties of a forwarding rule in a DNS forwarding ruleset. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the DNS forwarding ruleset. /// The name of the forwarding rule. @@ -442,7 +442,7 @@ public async Task> GetAsync(string subscriptionI } /// Gets properties of a forwarding rule in a DNS forwarding ruleset. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the DNS forwarding ruleset. /// The name of the forwarding rule. @@ -519,7 +519,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro } /// Lists forwarding rules in a DNS forwarding ruleset. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the DNS forwarding ruleset. /// The maximum number of results to return. If not specified, returns up to 100 results. @@ -549,7 +549,7 @@ public async Task> ListAsync(string subscript } /// Lists forwarding rules in a DNS forwarding ruleset. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the DNS forwarding ruleset. /// The maximum number of results to return. If not specified, returns up to 100 results. @@ -602,7 +602,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// Lists forwarding rules in a DNS forwarding ruleset. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the DNS forwarding ruleset. /// The maximum number of results to return. If not specified, returns up to 100 results. @@ -634,7 +634,7 @@ public async Task> ListNextPageAsync(string n /// Lists forwarding rules in a DNS forwarding ruleset. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the DNS forwarding ruleset. /// The maximum number of results to return. If not specified, returns up to 100 results. diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/InboundEndpointsRestOperations.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/InboundEndpointsRestOperations.cs index a2e7f9d3a2b1..e4ff89cdb383 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/InboundEndpointsRestOperations.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/InboundEndpointsRestOperations.cs @@ -32,7 +32,7 @@ public InboundEndpointsRestOperations(HttpPipeline pipeline, string applicationI { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-07-01"; + _apiVersion = apiVersion ?? "2023-07-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -87,7 +87,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates or updates an inbound endpoint for a DNS resolver. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the DNS resolver. /// The name of the inbound endpoint for the DNS resolver. @@ -119,7 +119,7 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re } /// Creates or updates an inbound endpoint for a DNS resolver. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the DNS resolver. /// The name of the inbound endpoint for the DNS resolver. @@ -197,7 +197,7 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Updates an inbound endpoint for a DNS resolver. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the DNS resolver. /// The name of the inbound endpoint for the DNS resolver. @@ -227,7 +227,7 @@ public async Task UpdateAsync(string subscriptionId, string resourceGr } /// Updates an inbound endpoint for a DNS resolver. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the DNS resolver. /// The name of the inbound endpoint for the DNS resolver. @@ -299,7 +299,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes an inbound endpoint for a DNS resolver. WARNING: This operation cannot be undone. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the DNS resolver. /// The name of the inbound endpoint for the DNS resolver. @@ -328,7 +328,7 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes an inbound endpoint for a DNS resolver. WARNING: This operation cannot be undone. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the DNS resolver. /// The name of the inbound endpoint for the DNS resolver. @@ -395,7 +395,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets properties of an inbound endpoint for a DNS resolver. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the DNS resolver. /// The name of the inbound endpoint for the DNS resolver. @@ -428,7 +428,7 @@ public async Task> GetAsync(string subs } /// Gets properties of an inbound endpoint for a DNS resolver. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the DNS resolver. /// The name of the inbound endpoint for the DNS resolver. @@ -505,7 +505,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro } /// Lists inbound endpoints for a DNS resolver. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the DNS resolver. /// The maximum number of results to return. If not specified, returns up to 100 results. @@ -535,7 +535,7 @@ public async Task> ListAsync(string subscrip } /// Lists inbound endpoints for a DNS resolver. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the DNS resolver. /// The maximum number of results to return. If not specified, returns up to 100 results. @@ -588,7 +588,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// Lists inbound endpoints for a DNS resolver. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the DNS resolver. /// The maximum number of results to return. If not specified, returns up to 100 results. @@ -620,7 +620,7 @@ public async Task> ListNextPageAsync(string /// Lists inbound endpoints for a DNS resolver. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the DNS resolver. /// The maximum number of results to return. If not specified, returns up to 100 results. diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/OutboundEndpointsRestOperations.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/OutboundEndpointsRestOperations.cs index 737e0ddb1a4a..c11e7cfa7ef5 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/OutboundEndpointsRestOperations.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/OutboundEndpointsRestOperations.cs @@ -32,7 +32,7 @@ public OutboundEndpointsRestOperations(HttpPipeline pipeline, string application { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-07-01"; + _apiVersion = apiVersion ?? "2023-07-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -87,7 +87,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates or updates an outbound endpoint for a DNS resolver. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the DNS resolver. /// The name of the outbound endpoint for the DNS resolver. @@ -119,7 +119,7 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re } /// Creates or updates an outbound endpoint for a DNS resolver. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the DNS resolver. /// The name of the outbound endpoint for the DNS resolver. @@ -197,7 +197,7 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Updates an outbound endpoint for a DNS resolver. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the DNS resolver. /// The name of the outbound endpoint for the DNS resolver. @@ -227,7 +227,7 @@ public async Task UpdateAsync(string subscriptionId, string resourceGr } /// Updates an outbound endpoint for a DNS resolver. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the DNS resolver. /// The name of the outbound endpoint for the DNS resolver. @@ -299,7 +299,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes an outbound endpoint for a DNS resolver. WARNING: This operation cannot be undone. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the DNS resolver. /// The name of the outbound endpoint for the DNS resolver. @@ -328,7 +328,7 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes an outbound endpoint for a DNS resolver. WARNING: This operation cannot be undone. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the DNS resolver. /// The name of the outbound endpoint for the DNS resolver. @@ -395,7 +395,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets properties of an outbound endpoint for a DNS resolver. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the DNS resolver. /// The name of the outbound endpoint for the DNS resolver. @@ -428,7 +428,7 @@ public async Task> GetAsync(string sub } /// Gets properties of an outbound endpoint for a DNS resolver. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the DNS resolver. /// The name of the outbound endpoint for the DNS resolver. @@ -505,7 +505,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro } /// Lists outbound endpoints for a DNS resolver. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the DNS resolver. /// The maximum number of results to return. If not specified, returns up to 100 results. @@ -535,7 +535,7 @@ public async Task> ListAsync(string subscri } /// Lists outbound endpoints for a DNS resolver. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the DNS resolver. /// The maximum number of results to return. If not specified, returns up to 100 results. @@ -588,7 +588,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// Lists outbound endpoints for a DNS resolver. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the DNS resolver. /// The maximum number of results to return. If not specified, returns up to 100 results. @@ -620,7 +620,7 @@ public async Task> ListNextPageAsync(string /// Lists outbound endpoints for a DNS resolver. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the DNS resolver. /// The maximum number of results to return. If not specified, returns up to 100 results. diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/VirtualNetworkLinksRestOperations.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/VirtualNetworkLinksRestOperations.cs index c7cf10b302b1..323e6c80eb0d 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/VirtualNetworkLinksRestOperations.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/VirtualNetworkLinksRestOperations.cs @@ -32,7 +32,7 @@ public VirtualNetworkLinksRestOperations(HttpPipeline pipeline, string applicati { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-07-01"; + _apiVersion = apiVersion ?? "2023-07-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -87,7 +87,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates or updates a virtual network link to a DNS forwarding ruleset. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the DNS forwarding ruleset. /// The name of the virtual network link. @@ -119,7 +119,7 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re } /// Creates or updates a virtual network link to a DNS forwarding ruleset. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the DNS forwarding ruleset. /// The name of the virtual network link. @@ -197,7 +197,7 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Updates a virtual network link to a DNS forwarding ruleset. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the DNS forwarding ruleset. /// The name of the virtual network link. @@ -227,7 +227,7 @@ public async Task UpdateAsync(string subscriptionId, string resourceGr } /// Updates a virtual network link to a DNS forwarding ruleset. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the DNS forwarding ruleset. /// The name of the virtual network link. @@ -299,7 +299,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes a virtual network link to a DNS forwarding ruleset. WARNING: This operation cannot be undone. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the DNS forwarding ruleset. /// The name of the virtual network link. @@ -328,7 +328,7 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes a virtual network link to a DNS forwarding ruleset. WARNING: This operation cannot be undone. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the DNS forwarding ruleset. /// The name of the virtual network link. @@ -395,7 +395,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets properties of a virtual network link to a DNS forwarding ruleset. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the DNS forwarding ruleset. /// The name of the virtual network link. @@ -428,7 +428,7 @@ public async Task> GetAsync } /// Gets properties of a virtual network link to a DNS forwarding ruleset. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the DNS forwarding ruleset. /// The name of the virtual network link. @@ -505,7 +505,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro } /// Lists virtual network links to a DNS forwarding ruleset. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the DNS forwarding ruleset. /// The maximum number of results to return. If not specified, returns up to 100 results. @@ -535,7 +535,7 @@ public async Task> ListAsync(string subsc } /// Lists virtual network links to a DNS forwarding ruleset. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the DNS forwarding ruleset. /// The maximum number of results to return. If not specified, returns up to 100 results. @@ -588,7 +588,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// Lists virtual network links to a DNS forwarding ruleset. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the DNS forwarding ruleset. /// The maximum number of results to return. If not specified, returns up to 100 results. @@ -620,7 +620,7 @@ public async Task> ListNextPageAsync(stri /// Lists virtual network links to a DNS forwarding ruleset. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the DNS forwarding ruleset. /// The maximum number of results to return. If not specified, returns up to 100 results. diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/VirtualNetworkDnsResolverResource.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/VirtualNetworkDnsResolverResource.cs index 19e93e1018bb..22ac369eb7f4 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/VirtualNetworkDnsResolverResource.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/VirtualNetworkDnsResolverResource.cs @@ -37,6 +37,8 @@ internal static ResourceIdentifier CreateResourceIdentifier(string subscriptionI private readonly DnsResolversRestOperations _dnsResolverRestClient; private readonly ClientDiagnostics _dnsForwardingRulesetClientDiagnostics; private readonly DnsForwardingRulesetsRestOperations _dnsForwardingRulesetRestClient; + private readonly ClientDiagnostics _dnsResolverPolicyClientDiagnostics; + private readonly DnsResolverPoliciesRestOperations _dnsResolverPolicyRestClient; /// Initializes a new instance of the class for mocking. protected VirtualNetworkDnsResolverResource() @@ -54,6 +56,9 @@ internal VirtualNetworkDnsResolverResource(ArmClient client, ResourceIdentifier _dnsForwardingRulesetClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DnsResolver", DnsForwardingRulesetResource.ResourceType.Namespace, Diagnostics); TryGetApiVersion(DnsForwardingRulesetResource.ResourceType, out string dnsForwardingRulesetApiVersion); _dnsForwardingRulesetRestClient = new DnsForwardingRulesetsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dnsForwardingRulesetApiVersion); + _dnsResolverPolicyClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DnsResolver", DnsResolverPolicyResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(DnsResolverPolicyResource.ResourceType, out string dnsResolverPolicyApiVersion); + _dnsResolverPolicyRestClient = new DnsResolverPoliciesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dnsResolverPolicyApiVersion); #if DEBUG ValidateResourceId(Id); #endif @@ -81,7 +86,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -112,7 +117,7 @@ public virtual AsyncPageable GetDnsResolversAsync(int? top /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -143,7 +148,7 @@ public virtual Pageable GetDnsResolvers(int? top = null, Ca /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -174,7 +179,7 @@ public virtual AsyncPageable GetDnsForwardin /// /// /// Default Api Version - /// 2022-07-01 + /// 2023-07-01-preview /// /// /// Resource @@ -191,5 +196,65 @@ public virtual Pageable GetDnsForwardingRule HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dnsForwardingRulesetRestClient.CreateListByVirtualNetworkNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, top); return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => VirtualNetworkDnsForwardingRuleset.DeserializeVirtualNetworkDnsForwardingRuleset(e), _dnsForwardingRulesetClientDiagnostics, Pipeline, "VirtualNetworkDnsResolverResource.GetDnsForwardingRulesets", "value", "nextLink", cancellationToken); } + + /// + /// Lists DNS resolver policy resource IDs linked to a virtual network. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/listDnsResolverPolicies + /// + /// + /// Operation Id + /// DnsResolverPolicies_ListByVirtualNetwork + /// + /// + /// Default Api Version + /// 2023-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetDnsResolverPoliciesByVirtualNetworkAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _dnsResolverPolicyRestClient.CreateListByVirtualNetworkRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dnsResolverPolicyRestClient.CreateListByVirtualNetworkNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => JsonSerializer.Deserialize(e.GetRawText()), _dnsResolverPolicyClientDiagnostics, Pipeline, "VirtualNetworkDnsResolverResource.GetDnsResolverPoliciesByVirtualNetwork", "value", "nextLink", cancellationToken); + } + + /// + /// Lists DNS resolver policy resource IDs linked to a virtual network. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/listDnsResolverPolicies + /// + /// + /// Operation Id + /// DnsResolverPolicies_ListByVirtualNetwork + /// + /// + /// Default Api Version + /// 2023-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetDnsResolverPoliciesByVirtualNetwork(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _dnsResolverPolicyRestClient.CreateListByVirtualNetworkRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dnsResolverPolicyRestClient.CreateListByVirtualNetworkNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => JsonSerializer.Deserialize(e.GetRawText()), _dnsResolverPolicyClientDiagnostics, Pipeline, "VirtualNetworkDnsResolverResource.GetDnsResolverPoliciesByVirtualNetwork", "value", "nextLink", cancellationToken); + } } } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/autorest.md b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/autorest.md index a3ecaa000dd1..0f0186cd9648 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/autorest.md +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/autorest.md @@ -4,7 +4,7 @@ Run `dotnet build /t:GenerateCode` to generate code. ``` yaml azure-arm: true -require: https://github.com/Azure/azure-rest-api-specs/blob/a9e895ccfe29d0646795f7ff1cb78e185bd09529/specification/dnsresolver/resource-manager/readme.md +require: https://github.com/Azure/azure-rest-api-specs/blob/b26a190235f162b15d77dad889d104d06871fb4f/specification/dnsresolver/resource-manager/readme.md library-name: dnsresolver namespace: Azure.ResourceManager.DnsResolver output-folder: $(this-folder)/Generated @@ -70,6 +70,7 @@ rename-mapping: IpAllocationMethod: InboundEndpointIPAllocationMethod OutboundEndpoint: DnsResolverOutboundEndpoint VirtualNetworkLink: DnsForwardingRulesetVirtualNetworkLink + ActionType: DnsSecurityRuleActionType directive: - from: dnsresolver.json diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/tests/DnsResolverTestBase.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/tests/DnsResolverTestBase.cs index 04e505605fe9..acd9569ad716 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/tests/DnsResolverTestBase.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/tests/DnsResolverTestBase.cs @@ -18,6 +18,7 @@ public class DnsResolverTestBase : ManagementRecordedTestBase AzureLocation.AustraliaEast; + protected int DefaultDnsSecurityRulePriority => 100; protected ArmClient Client { get; private set; } protected SubscriptionResource DefaultSubscription { get; private set; } public DnsResolverTestBase(bool isAsync) : base(isAsync) diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/tests/Tests/DnsResolverDomainListTests.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/tests/Tests/DnsResolverDomainListTests.cs new file mode 100644 index 000000000000..e9b3be0c4698 --- /dev/null +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/tests/Tests/DnsResolverDomainListTests.cs @@ -0,0 +1,103 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.Collections.Generic; +using System.Threading.Tasks; +using NUnit.Framework; +using Azure.Core.TestFramework; +using Azure.ResourceManager.Resources.Models; +using Azure.Core; +using Azure.ResourceManager.DnsResolver.Models; + +namespace Azure.ResourceManager.DnsResolver.Tests +{ + public class DnsResolverDomainListTests : DnsResolverTestBase + { + private DnsResolverDomainListCollection _dnsResolverDomainListCollection; + + public DnsResolverDomainListTests(bool async) : base(async)//, RecordedTestMode.Record) + { + } + + public async Task CreateDnsResolverDomainListCollectionAsync() + { + var subscription = await Client.GetSubscriptions().GetAsync(TestEnvironment.SubscriptionId); + var resourceGroup = await CreateResourceGroupAsync(); + + _dnsResolverDomainListCollection = resourceGroup.GetDnsResolverDomainLists(); + } + + [Test] + [RecordedTest] + public async Task CreateDnsResolverDomainListAsync() + { + // ARRANGE + var dnsResolverDomainListName = Recording.GenerateAssetName("dnsResolverDomainList-"); + await CreateDnsResolverDomainListCollectionAsync(); + var dnsResolverDomainListData = new DnsResolverDomainListData(this.DefaultLocation, new List() { "example.com.", "contoso.com." }); + + // ACT + var dnsResolverDomainList = await _dnsResolverDomainListCollection.CreateOrUpdateAsync(WaitUntil.Completed, dnsResolverDomainListName, dnsResolverDomainListData); + + // ASSERT + Assert.AreEqual(dnsResolverDomainList.Value.Data.ProvisioningState, DnsResolverProvisioningState.Succeeded); + } + + [Test] + [RecordedTest] + public async Task GetDnsResolverDomainListAsync() + { + // ARRANGE + var dnsResolverDomainListName = Recording.GenerateAssetName("dnsResolverDomainList-"); + await CreateDnsResolverDomainListCollectionAsync(); + var dnsResolverDomainListData = new DnsResolverDomainListData(this.DefaultLocation, new List() { "example.com.", "contoso.com." }); + + await _dnsResolverDomainListCollection.CreateOrUpdateAsync(WaitUntil.Completed, dnsResolverDomainListName, dnsResolverDomainListData); + + // ACT + var retrievedDnsResolverDomainList = await _dnsResolverDomainListCollection.GetAsync(dnsResolverDomainListName); + + // ASSERT + Assert.AreEqual(retrievedDnsResolverDomainList.Value.Data.Name, dnsResolverDomainListName); + } + + [Test] + [RecordedTest] + public async Task UpdateDnsResolverDomainListAsync() + { + // ARRANGE + var dnsResolverDomainListName = Recording.GenerateAssetName("dnsResolverDomainList-"); + var newTagKey = Recording.GenerateAlphaNumericId("tagKey"); + var newTagValue = Recording.GenerateAlphaNumericId("tagValue"); + await CreateDnsResolverDomainListCollectionAsync(); + var dnsResolverDomainListData = new DnsResolverDomainListData(this.DefaultLocation, new List() { "example.com.", "contoso.com." }); + + var createdDnsResolverDomainList = await _dnsResolverDomainListCollection.CreateOrUpdateAsync(WaitUntil.Completed, dnsResolverDomainListName, dnsResolverDomainListData); + + // ACT + var patchedDnsResolverDomainList = await createdDnsResolverDomainList.Value.AddTagAsync(newTagKey, newTagValue); + + // ASSERT + CollectionAssert.AreEquivalent(new Dictionary { { newTagKey, newTagValue } }, patchedDnsResolverDomainList.Value.Data.Tags); + } + + [Test] + [RecordedTest] + public async Task RemoveDnsResolverDomainListAsync() + { + // ARRANGE + var dnsResolverDomainListName = Recording.GenerateAssetName("dnsResolverDomainList-"); + await CreateDnsResolverDomainListCollectionAsync(); + var dnsResolverDomainListData = new DnsResolverDomainListData(this.DefaultLocation, new List() { "example.com." , "contoso.com."}); + + var dnsResolverDomainList = await _dnsResolverDomainListCollection.CreateOrUpdateAsync(WaitUntil.Completed, dnsResolverDomainListName, dnsResolverDomainListData); + + // ACT + await dnsResolverDomainList.Value.DeleteAsync(WaitUntil.Completed); + + // ASSERT + var getDnsResolverDomainListResult = await _dnsResolverDomainListCollection.ExistsAsync(dnsResolverDomainListName); + Assert.AreEqual(getDnsResolverDomainListResult.Value, false); + } + } +} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/tests/Tests/DnsResolverPolicyLinkTests.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/tests/Tests/DnsResolverPolicyLinkTests.cs new file mode 100644 index 000000000000..aeb990b08da9 --- /dev/null +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/tests/Tests/DnsResolverPolicyLinkTests.cs @@ -0,0 +1,130 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +using System.Threading.Tasks; +using NUnit.Framework; +using Azure.Core.TestFramework; +using Azure.ResourceManager.Resources.Models; +using Azure.Core; +using Azure.ResourceManager.DnsResolver.Models; +using System.Linq; +using System.Collections.Generic; + +namespace Azure.ResourceManager.DnsResolver.Tests +{ + public class DnsResolverPolicyLinkTests : DnsResolverTestBase + { + private DnsResolverPolicyCollection _dnsResolverPolicyCollection; + private DnsResolverPolicyResource _dnsResolverPolicy; + private string _dnsResolverPolicyName; + + public DnsResolverPolicyLinkTests(bool async) : base(async)//, RecordedTestMode.Record) + { + } + + public async Task CreateDnsResolverCollection() + { + var vnetName = Recording.GenerateAssetName("vnet-"); + _dnsResolverPolicyName = Recording.GenerateAssetName("dnsResolverPolicy-"); + var resourceGroup = await CreateResourceGroupAsync(); + _dnsResolverPolicyCollection = resourceGroup.GetDnsResolverPolicies(); + + await CreateVirtualNetworkAsync(); + _dnsResolverPolicy = await CreateDnsResolverPolicy(_dnsResolverPolicyName); + } + + private async Task CreateDnsResolverPolicy(string dnsResolverPolicyName) + { + var dnsResolverPolicyData = new DnsResolverPolicyData(this.DefaultLocation); + + return (await _dnsResolverPolicyCollection.CreateOrUpdateAsync(WaitUntil.Completed, dnsResolverPolicyName, dnsResolverPolicyData)).Value; + } + + [Test] + [RecordedTest] + public async Task CreateDnsResolverPolicyLink() + { + // ARRANGE + var dnsResolverPolicyLinkName = Recording.GenerateAssetName("dnsResolverPolicyLink-"); + await CreateDnsResolverCollection(); + var dnsResolverPolicyLinkData = new DnsResolverPolicyVirtualNetworkLinkData(this.DefaultLocation, new WritableSubResource + { + Id = new ResourceIdentifier(DefaultVnetID), + }); + + // ACT + var createdDnsResolverPolicyLink = await _dnsResolverPolicy.GetDnsResolverPolicyVirtualNetworkLinks().CreateOrUpdateAsync(WaitUntil.Completed, dnsResolverPolicyLinkName, dnsResolverPolicyLinkData); + + // ASSERT + Assert.AreEqual(createdDnsResolverPolicyLink.Value.Data.ProvisioningState, DnsResolverProvisioningState.Succeeded); + } + + [Test] + [RecordedTest] + public async Task GetDnsResolverPolicyLink() + { + // ARRANGE + var dnsResolverPolicyLinkName = Recording.GenerateAssetName("dnsResolverPolicyLink-"); + await CreateDnsResolverCollection(); + var dnsResolverPolicyLinkData = new DnsResolverPolicyVirtualNetworkLinkData(this.DefaultLocation, new WritableSubResource + { + Id = new ResourceIdentifier(DefaultVnetID), + }); + + await _dnsResolverPolicy.GetDnsResolverPolicyVirtualNetworkLinks().CreateOrUpdateAsync(WaitUntil.Completed, dnsResolverPolicyLinkName, dnsResolverPolicyLinkData); + + // ACT + var retrievedDnsResolverPolicyLink = await _dnsResolverPolicy.GetDnsResolverPolicyVirtualNetworkLinks().GetAsync(dnsResolverPolicyLinkName); + + // ASSERT + Assert.AreEqual(retrievedDnsResolverPolicyLink.Value.Data.Name, dnsResolverPolicyLinkName); + } + + [Test] + [RecordedTest] + public async Task UpdateDnsResolverPolicyLink() + { + // ARRANGE + var dnsResolverPolicyLinkName = Recording.GenerateAssetName("dnsResolverPolicyLink-"); + var newTagKey = Recording.GenerateAlphaNumericId("tagKey"); + var newTagValue = Recording.GenerateAlphaNumericId("tagValue"); + await CreateDnsResolverCollection(); + var dnsResolverPolicyLinkData = new DnsResolverPolicyVirtualNetworkLinkData(this.DefaultLocation, new WritableSubResource + { + Id = new ResourceIdentifier(DefaultVnetID), + }); + + var createdDnsResolverPolicyLink = await _dnsResolverPolicy.GetDnsResolverPolicyVirtualNetworkLinks().CreateOrUpdateAsync(WaitUntil.Completed, dnsResolverPolicyLinkName, dnsResolverPolicyLinkData); + + var patchableDnsResolverPolicyLinkData = new DnsResolverPolicyVirtualNetworkLinkPatch(); + patchableDnsResolverPolicyLinkData.Tags.Add(newTagKey, newTagValue); + + // ACT + var patchedDnsResolverPolicyLink = await createdDnsResolverPolicyLink.Value.UpdateAsync(WaitUntil.Completed, patchableDnsResolverPolicyLinkData); + + // ASSERT + CollectionAssert.AreEquivalent(patchedDnsResolverPolicyLink.Value.Data.Tags, patchableDnsResolverPolicyLinkData.Tags); + } + + [Test] + [RecordedTest] + public async Task RemoveDnsResolverPolicyLink() + { + // ARRANGE + var dnsResolverPolicyLinkName = Recording.GenerateAssetName("dnsResolverPolicyLink-"); + await CreateDnsResolverCollection(); + var dnsResolverPolicyLinkData = new DnsResolverPolicyVirtualNetworkLinkData(this.DefaultLocation, new WritableSubResource + { + Id = new ResourceIdentifier(DefaultVnetID), + }); + + var createdDnsResolverPolicyLink = await _dnsResolverPolicy.GetDnsResolverPolicyVirtualNetworkLinks().CreateOrUpdateAsync(WaitUntil.Completed, dnsResolverPolicyLinkName, dnsResolverPolicyLinkData); + + // ACT + await createdDnsResolverPolicyLink.Value.DeleteAsync(WaitUntil.Completed); + + // ASSERT + var getDnsResolverPolicyLink = await _dnsResolverPolicy.GetDnsResolverPolicyVirtualNetworkLinks().ExistsAsync(dnsResolverPolicyLinkName); + Assert.AreEqual(getDnsResolverPolicyLink.Value, false); + } + } +} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/tests/Tests/DnsResolverPolicyTests.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/tests/Tests/DnsResolverPolicyTests.cs new file mode 100644 index 000000000000..955330a6d406 --- /dev/null +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/tests/Tests/DnsResolverPolicyTests.cs @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.Collections.Generic; +using System.Threading.Tasks; +using NUnit.Framework; +using Azure.Core.TestFramework; +using Azure.ResourceManager.Resources.Models; +using Azure.Core; +using Azure.ResourceManager.DnsResolver.Models; + +namespace Azure.ResourceManager.DnsResolver.Tests +{ + public class DnsResolverPolicyTests : DnsResolverTestBase + { + private DnsResolverPolicyCollection _dnsResolverPolicyCollection; + + public DnsResolverPolicyTests(bool async) : base(async)//, RecordedTestMode.Record) + { + } + + public async Task CreateDnsResolverPolicyCollectionAsync() + { + var subscription = await Client.GetSubscriptions().GetAsync(TestEnvironment.SubscriptionId); + var resourceGroup = await CreateResourceGroupAsync(); + + _dnsResolverPolicyCollection = resourceGroup.GetDnsResolverPolicies(); + } + + [Test] + [RecordedTest] + public async Task CreateDnsResolverPolicyAsync() + { + // ARRANGE + var dnsResolverPolicyName = Recording.GenerateAssetName("dnsResolverPolicy-"); + await CreateDnsResolverPolicyCollectionAsync(); + var dnsResolverPolicyData = new DnsResolverPolicyData(this.DefaultLocation); + + // ACT + var dnsResolverPolicy = await _dnsResolverPolicyCollection.CreateOrUpdateAsync(WaitUntil.Completed, dnsResolverPolicyName, dnsResolverPolicyData); + + // ASSERT + Assert.AreEqual(dnsResolverPolicy.Value.Data.ProvisioningState, DnsResolverProvisioningState.Succeeded); + } + + [Test] + [RecordedTest] + public async Task GetDnsResolverPolicyAsync() + { + // ARRANGE + var dnsResolverPolicyName = Recording.GenerateAssetName("dnsResolverPolicy-"); + await CreateDnsResolverPolicyCollectionAsync(); + ; + var dnsResolverPolicyData = new DnsResolverPolicyData(this.DefaultLocation); + + await _dnsResolverPolicyCollection.CreateOrUpdateAsync(WaitUntil.Completed, dnsResolverPolicyName, dnsResolverPolicyData); + + // ACT + var retrievedDnsResolverPolicy = await _dnsResolverPolicyCollection.GetAsync(dnsResolverPolicyName); + + // ASSERT + Assert.AreEqual(retrievedDnsResolverPolicy.Value.Data.Name, dnsResolverPolicyName); + } + + [Test] + [RecordedTest] + public async Task UpdateDnsResolverPolicyAsync() + { + // ARRANGE + var dnsResolverPolicyName = Recording.GenerateAssetName("dnsResolverPolicy-"); + var newTagKey = Recording.GenerateAlphaNumericId("tagKey"); + var newTagValue = Recording.GenerateAlphaNumericId("tagValue"); + await CreateDnsResolverPolicyCollectionAsync(); + var dnsResolverPolicyData = new DnsResolverPolicyData(this.DefaultLocation); + + var createdDnsResolverPolicy = await _dnsResolverPolicyCollection.CreateOrUpdateAsync(WaitUntil.Completed, dnsResolverPolicyName, dnsResolverPolicyData); + + // ACT + var patchedDnsResolverPolicy = await createdDnsResolverPolicy.Value.AddTagAsync(newTagKey, newTagValue); + + // ASSERT + CollectionAssert.AreEquivalent(new Dictionary { { newTagKey, newTagValue } }, patchedDnsResolverPolicy.Value.Data.Tags); + } + + [Test] + [RecordedTest] + public async Task RemoveDnsResolverPolicyAsync() + { + // ARRANGE + var dnsResolverPolicyName = Recording.GenerateAssetName("dnsResolverPolicy-"); + await CreateDnsResolverPolicyCollectionAsync(); + var dnsResolverPolicyData = new DnsResolverPolicyData(this.DefaultLocation); + + var dnsResolverPolicy = await _dnsResolverPolicyCollection.CreateOrUpdateAsync(WaitUntil.Completed, dnsResolverPolicyName, dnsResolverPolicyData); + + // ACT + await dnsResolverPolicy.Value.DeleteAsync(WaitUntil.Completed); + + // ASSERT + var getDnsResolverPolicyResult = await _dnsResolverPolicyCollection.ExistsAsync(dnsResolverPolicyName); + Assert.AreEqual(getDnsResolverPolicyResult.Value, false); + } + } +} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/tests/Tests/DnsResolverTests.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/tests/Tests/DnsResolverTests.cs index 36af1e8de427..7b50a0199eae 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/tests/Tests/DnsResolverTests.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/tests/Tests/DnsResolverTests.cs @@ -76,7 +76,6 @@ public async Task GetDnsResolverAsync() [Test] [RecordedTest] - [Ignore("Lack of testing resources")] public async Task UpdateDnsResolverAsync() { // ARRANGE diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/tests/Tests/DnsSecurityRuleTests.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/tests/Tests/DnsSecurityRuleTests.cs new file mode 100644 index 000000000000..9d89fce049e3 --- /dev/null +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/tests/Tests/DnsSecurityRuleTests.cs @@ -0,0 +1,166 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +using System.Threading.Tasks; +using NUnit.Framework; +using Azure.Core.TestFramework; +using Azure.ResourceManager.Resources.Models; +using Azure.Core; +using Azure.ResourceManager.DnsResolver.Models; +using System.Linq; +using System.Collections.Generic; + +namespace Azure.ResourceManager.DnsResolver.Tests +{ + public class DnsSecurityRuleTests : DnsResolverTestBase + { + private DnsResolverPolicyCollection _dnsResolverPolicyCollection; + private DnsResolverDomainListCollection _dnsResolverDomainListCollection; + private DnsResolverPolicyResource _dnsResolverPolicy; + private DnsResolverDomainListResource _dnsResolverDomainList; + private string _dnsResolverPolicyName; + private string _dnsResolverDomainListName; + + public DnsSecurityRuleTests(bool async) : base(async)//, RecordedTestMode.Record) + { + } + + public async Task CreateDnsResolverCollection() + { + _dnsResolverPolicyName = Recording.GenerateAssetName("dnsResolverPolicy-"); + _dnsResolverDomainListName = Recording.GenerateAssetName("dnsResolverDomainList-"); + var resourceGroup = await CreateResourceGroupAsync(); + _dnsResolverPolicyCollection = resourceGroup.GetDnsResolverPolicies(); + _dnsResolverDomainListCollection = resourceGroup.GetDnsResolverDomainLists(); + + _dnsResolverPolicy = await CreateDnsResolverPolicy(_dnsResolverPolicyName); + _dnsResolverDomainList = await CreateDnsResolverDomainList(_dnsResolverDomainListName); + } + + private async Task CreateDnsResolverPolicy(string dnsResolverPolicyName) + { + var dnsResolverPolicyData = new DnsResolverPolicyData(this.DefaultLocation); + + return (await _dnsResolverPolicyCollection.CreateOrUpdateAsync(WaitUntil.Completed, dnsResolverPolicyName, dnsResolverPolicyData)).Value; + } + + private async Task CreateDnsResolverDomainList(string dnsResolverDomainListName) + { + var defaultDomains = new List() { "test.com.", "env.com." }; + var dnsResolverDomainListData = new DnsResolverDomainListData(this.DefaultLocation, defaultDomains); + + return (await _dnsResolverDomainListCollection.CreateOrUpdateAsync(WaitUntil.Completed, dnsResolverDomainListName, dnsResolverDomainListData)).Value; + } + + [Test] + [RecordedTest] + public async Task CreateDnsSecurityRule() + { + // ARRANGE + var dnsSecurityRuleName = Recording.GenerateAssetName("dnsSecurityRule-"); + await CreateDnsResolverCollection(); + var dnsSecurityRuleAction = new DnsSecurityRuleAction() { ActionType = DnsSecurityRuleActionType.Block, BlockResponseCode = BlockResponseCode.Servfail }; + + var dnsSecurityRuleData = new DnsSecurityRuleData(this.DefaultLocation, this.DefaultDnsSecurityRulePriority, dnsSecurityRuleAction, + new List { + new WritableSubResource + { + Id = new ResourceIdentifier(_dnsResolverDomainList.Id), + } + } + ); + + // ACT + var createdDnsSecurityRule = await _dnsResolverPolicy.GetDnsSecurityRules().CreateOrUpdateAsync(WaitUntil.Completed, dnsSecurityRuleName, dnsSecurityRuleData); + + // ASSERT + Assert.AreEqual(createdDnsSecurityRule.Value.Data.ProvisioningState, DnsResolverProvisioningState.Succeeded); + } + + [Test] + [RecordedTest] + public async Task GetDnsSecurityRule() + { + // ARRANGE + var dnsSecurityRuleName = Recording.GenerateAssetName("dnsSecurityRule-"); + await CreateDnsResolverCollection(); + var dnsSecurityRuleAction = new DnsSecurityRuleAction() { ActionType = DnsSecurityRuleActionType.Block, BlockResponseCode = BlockResponseCode.Servfail }; + + var dnsSecurityRuleData = new DnsSecurityRuleData(this.DefaultLocation, this.DefaultDnsSecurityRulePriority, dnsSecurityRuleAction, + new List { + new WritableSubResource + { + Id = new ResourceIdentifier(_dnsResolverDomainList.Id), + } + } + ); + + await _dnsResolverPolicy.GetDnsSecurityRules().CreateOrUpdateAsync(WaitUntil.Completed, dnsSecurityRuleName, dnsSecurityRuleData); + + // ACT + var retrievedDnsSecurityRule = await _dnsResolverPolicy.GetDnsSecurityRules().GetAsync(dnsSecurityRuleName); + + // ASSERT + Assert.AreEqual(retrievedDnsSecurityRule.Value.Data.Name, dnsSecurityRuleName); + } + + [Test] + [RecordedTest] + public async Task UpdateDnsSecurityRule() + { + // ARRANGE + var dnsSecurityRuleName = Recording.GenerateAssetName("dnsSecurityRule-"); + var newTagKey = Recording.GenerateAlphaNumericId("tagKey"); + var newTagValue = Recording.GenerateAlphaNumericId("tagValue"); + await CreateDnsResolverCollection(); + var dnsSecurityRuleAction = new DnsSecurityRuleAction() { ActionType = DnsSecurityRuleActionType.Block, BlockResponseCode = BlockResponseCode.Servfail }; + + var dnsSecurityRuleData = new DnsSecurityRuleData(this.DefaultLocation, this.DefaultDnsSecurityRulePriority, dnsSecurityRuleAction, + new List { + new WritableSubResource + { + Id = new ResourceIdentifier(_dnsResolverDomainList.Id), + } + } + ); + + var createdDnsSecurityRule = await _dnsResolverPolicy.GetDnsSecurityRules().CreateOrUpdateAsync(WaitUntil.Completed, dnsSecurityRuleName, dnsSecurityRuleData); + + var patchableDnsSecurityRuleData = new DnsSecurityRulePatch(); + patchableDnsSecurityRuleData.Tags.Add(newTagKey, newTagValue); + + // ACT + var patchedDnsSecurityRule = await createdDnsSecurityRule.Value.UpdateAsync(WaitUntil.Completed, patchableDnsSecurityRuleData); + + // ASSERT + CollectionAssert.AreEquivalent(patchedDnsSecurityRule.Value.Data.Tags, patchableDnsSecurityRuleData.Tags); + } + + [Test] + [RecordedTest] + public async Task RemoveDnsSecurityRule() + { + // ARRANGE + var dnsSecurityRuleName = Recording.GenerateAssetName("dnsSecurityRule-"); + await CreateDnsResolverCollection(); + var dnsSecurityRuleAction = new DnsSecurityRuleAction() { ActionType = DnsSecurityRuleActionType.Block, BlockResponseCode = BlockResponseCode.Servfail }; + + var dnsSecurityRuleData = new DnsSecurityRuleData(this.DefaultLocation, this.DefaultDnsSecurityRulePriority, dnsSecurityRuleAction, + new List { + new WritableSubResource + { + Id = new ResourceIdentifier(_dnsResolverDomainList.Id), + } + } + ); + + var createdDnsSecurityRule = await _dnsResolverPolicy.GetDnsSecurityRules().CreateOrUpdateAsync(WaitUntil.Completed, dnsSecurityRuleName, dnsSecurityRuleData); + + // ACT + await createdDnsSecurityRule.Value.DeleteAsync(WaitUntil.Completed); + + // ASSERT + var getDnsSecurityRule = await _dnsResolverPolicy.GetDnsSecurityRules().ExistsAsync(dnsSecurityRuleName); + Assert.AreEqual(getDnsSecurityRule.Value, false); + } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/MigrationGuide.md b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/MigrationGuide.md index 5fb053949d8b..7b3f614f2431 100644 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/MigrationGuide.md +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/MigrationGuide.md @@ -65,8 +65,7 @@ We continue to support API key and AAD authentication methods when creating the Creating new clients in `Azure.AI.FormRecognizer`: ```C# string endpoint = ""; -string apiKey = ""; -var credential = new AzureKeyCredential(apiKey); +var credential = new DefaultAzureCredential(); var documentAnalysisClient = new DocumentAnalysisClient(new Uri(endpoint), credential); var documentModelAdministrationClient = new DocumentModelAdministrationClient(new Uri(endpoint), credential); @@ -75,8 +74,7 @@ var documentModelAdministrationClient = new DocumentModelAdministrationClient(ne Creating new clients in `Azure.AI.DocumentIntelligence`: ```C# Snippet:Migration_CreateBothDocumentIntelligenceClients string endpoint = ""; -string apiKey = ""; -var credential = new AzureKeyCredential(apiKey); +var credential = new DefaultAzureCredential(); var documentIntelligenceClient = new DocumentIntelligenceClient(new Uri(endpoint), credential); var documentIntelligenceAdministrationClient = new DocumentIntelligenceAdministrationClient(new Uri(endpoint), credential); @@ -352,7 +350,7 @@ Differences between the versions: Building a document model with `Azure.AI.FormRecognizer`: ```C# Uri blobContainerUri = new Uri(""); -var client = new DocumentModelAdministrationClient(new Uri(endpoint), new AzureKeyCredential(apiKey)); +var client = new DocumentModelAdministrationClient(new Uri(endpoint), new DefaultAzureCredential()); BuildDocumentModelOperation operation = await client.BuildDocumentModelAsync(WaitUntil.Completed, blobContainerUri, DocumentBuildMode.Template); DocumentModelDetails model = operation.Value; diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/README.md b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/README.md index c3b3afa841d7..a37e5d5aa240 100644 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/README.md +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/README.md @@ -97,7 +97,7 @@ az cognitiveservices account keys list --name "" --resource-group Once you have the value for the API key, create an `AzureKeyCredential`. With the endpoint and key credential, you can create the [`DocumentIntelligenceClient`][doc_intelligence_client_class]: -```C# Snippet:CreateDocumentIntelligenceClient +```C# Snippet:CreateDocumentIntelligenceClientApiKey string endpoint = ""; string apiKey = ""; var client = new DocumentIntelligenceClient(new Uri(endpoint), new AzureKeyCredential(apiKey)); @@ -117,9 +117,10 @@ You will also need to [register a new AAD application][register_aad_app] and [gr Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, AZURE_CLIENT_SECRET. -```C# Snippet:CreateDocumentIntelligenceClientTokenCredential +```C# Snippet:CreateDocumentIntelligenceClient string endpoint = ""; -var client = new DocumentIntelligenceClient(new Uri(endpoint), new DefaultAzureCredential()); +var credential = new DefaultAzureCredential(); +var client = new DocumentIntelligenceClient(new Uri(endpoint), credential); ``` ## Key concepts diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/assets.json b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/assets.json index a44682a71766..82a37d28ea5c 100644 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/assets.json +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/documentintelligence/Azure.AI.DocumentIntelligence", - "Tag": "net/documentintelligence/Azure.AI.DocumentIntelligence_76280009cf" + "Tag": "net/documentintelligence/Azure.AI.DocumentIntelligence_ac9b1a968f" } diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/samples/Sample_AddOnCapabilities.md b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/samples/Sample_AddOnCapabilities.md index a794fc8daeb8..05821f5b86f3 100644 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/samples/Sample_AddOnCapabilities.md +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/samples/Sample_AddOnCapabilities.md @@ -14,8 +14,8 @@ You can set `endpoint` and `apiKey` based on an environment variable, a configur ```C# Snippet:CreateDocumentIntelligenceClient string endpoint = ""; -string apiKey = ""; -var client = new DocumentIntelligenceClient(new Uri(endpoint), new AzureKeyCredential(apiKey)); +var credential = new DefaultAzureCredential(); +var client = new DocumentIntelligenceClient(new Uri(endpoint), credential); ``` ## High resolution extraction diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/samples/Sample_AnalyzeWithPrebuiltModel.md b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/samples/Sample_AnalyzeWithPrebuiltModel.md index 569c0572800a..192bbf5273e4 100644 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/samples/Sample_AnalyzeWithPrebuiltModel.md +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/samples/Sample_AnalyzeWithPrebuiltModel.md @@ -12,8 +12,8 @@ You can set `endpoint` and `apiKey` based on an environment variable, a configur ```C# Snippet:CreateDocumentIntelligenceClient string endpoint = ""; -string apiKey = ""; -var client = new DocumentIntelligenceClient(new Uri(endpoint), new AzureKeyCredential(apiKey)); +var credential = new DefaultAzureCredential(); +var client = new DocumentIntelligenceClient(new Uri(endpoint), credential); ``` ## Use a prebuilt model to analyze a document from a URI diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/samples/Sample_BuildCustomModel.md b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/samples/Sample_BuildCustomModel.md index 5d9de4d43513..a902cd6a55f5 100644 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/samples/Sample_BuildCustomModel.md +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/samples/Sample_BuildCustomModel.md @@ -14,8 +14,8 @@ You can set `endpoint` and `apiKey` based on an environment variable, a configur ```C# Snippet:CreateDocumentIntelligenceAdministrationClient string endpoint = ""; -string apiKey = ""; -var client = new DocumentIntelligenceAdministrationClient(new Uri(endpoint), new AzureKeyCredential(apiKey)); +var credential = new DefaultAzureCredential(); +var client = new DocumentIntelligenceAdministrationClient(new Uri(endpoint), credential); ``` ## Build a custom model diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/samples/Sample_BuildDocumentClassifier.md b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/samples/Sample_BuildDocumentClassifier.md index 662516c84cd6..4486d3a2a3b2 100644 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/samples/Sample_BuildDocumentClassifier.md +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/samples/Sample_BuildDocumentClassifier.md @@ -14,8 +14,8 @@ You can set `endpoint` and `apiKey` based on an environment variable, a configur ```C# Snippet:CreateDocumentIntelligenceAdministrationClient string endpoint = ""; -string apiKey = ""; -var client = new DocumentIntelligenceAdministrationClient(new Uri(endpoint), new AzureKeyCredential(apiKey)); +var credential = new DefaultAzureCredential(); +var client = new DocumentIntelligenceAdministrationClient(new Uri(endpoint), credential); ``` ## Build a document classifier diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/samples/Sample_ClassifyDocument.md b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/samples/Sample_ClassifyDocument.md index 4622f4127021..6bcf6bfa4c7a 100644 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/samples/Sample_ClassifyDocument.md +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/samples/Sample_ClassifyDocument.md @@ -12,8 +12,8 @@ You can set `endpoint` and `apiKey` based on an environment variable, a configur ```C# Snippet:CreateDocumentIntelligenceClient string endpoint = ""; -string apiKey = ""; -var client = new DocumentIntelligenceClient(new Uri(endpoint), new AzureKeyCredential(apiKey)); +var credential = new DefaultAzureCredential(); +var client = new DocumentIntelligenceClient(new Uri(endpoint), credential); ``` ## Classify a document from a URI diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/samples/Sample_CopyCustomModel.md b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/samples/Sample_CopyCustomModel.md index 1f4f186a5ae0..a09ad62aa5d4 100644 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/samples/Sample_CopyCustomModel.md +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/samples/Sample_CopyCustomModel.md @@ -26,8 +26,8 @@ The source client that contains the custom model to copy. ```C# Snippet:DocumentIntelligenceSampleCreateCopySourceClient string sourceEndpoint = ""; -string sourceApiKey = ""; -var sourceClient = new DocumentIntelligenceAdministrationClient(new Uri(sourceEndpoint), new AzureKeyCredential(sourceApiKey)); +var sourceResourceCredential = new DefaultAzureCredential(); +var sourceClient = new DocumentIntelligenceAdministrationClient(new Uri(sourceEndpoint), sourceResourceCredential); ``` ### Target client @@ -36,8 +36,8 @@ The target client to copy the custom model to. ```C# Snippet:DocumentIntelligenceSampleCreateCopyTargetClient string targetEndpoint = ""; -string targetApiKey = ""; -var targetClient = new DocumentIntelligenceAdministrationClient(new Uri(targetEndpoint), new AzureKeyCredential(targetApiKey)); +var targetResourceCredential = new DefaultAzureCredential(); +var targetClient = new DocumentIntelligenceAdministrationClient(new Uri(targetEndpoint), targetResourceCredential); ``` ### Authorize the copy diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/samples/Sample_ExtractLayout.md b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/samples/Sample_ExtractLayout.md index 6c3c32580ee9..2d1b1f5f04d2 100644 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/samples/Sample_ExtractLayout.md +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/samples/Sample_ExtractLayout.md @@ -12,8 +12,8 @@ You can set `endpoint` and `apiKey` based on an environment variable, a configur ```C# Snippet:CreateDocumentIntelligenceClient string endpoint = ""; -string apiKey = ""; -var client = new DocumentIntelligenceClient(new Uri(endpoint), new AzureKeyCredential(apiKey)); +var credential = new DefaultAzureCredential(); +var client = new DocumentIntelligenceClient(new Uri(endpoint), credential); ``` ## Extract the layout of a document from a URI diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/samples/Sample_ExtractLayoutAsMarkdown.md b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/samples/Sample_ExtractLayoutAsMarkdown.md index 727a90dcc29e..0dd816583ebe 100644 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/samples/Sample_ExtractLayoutAsMarkdown.md +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/samples/Sample_ExtractLayoutAsMarkdown.md @@ -12,8 +12,8 @@ You can set `endpoint` and `apiKey` based on an environment variable, a configur ```C# Snippet:CreateDocumentIntelligenceClient string endpoint = ""; -string apiKey = ""; -var client = new DocumentIntelligenceClient(new Uri(endpoint), new AzureKeyCredential(apiKey)); +var credential = new DefaultAzureCredential(); +var client = new DocumentIntelligenceClient(new Uri(endpoint), credential); ``` ## Extract the layout of a document as Markdown diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/samples/Sample_GetAndListOperations.md b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/samples/Sample_GetAndListOperations.md index de3ee51532b3..4f261237cf1e 100644 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/samples/Sample_GetAndListOperations.md +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/samples/Sample_GetAndListOperations.md @@ -12,8 +12,8 @@ You can set `endpoint` and `apiKey` based on an environment variable, a configur ```C# Snippet:CreateDocumentIntelligenceAdministrationClient string endpoint = ""; -string apiKey = ""; -var client = new DocumentIntelligenceAdministrationClient(new Uri(endpoint), new AzureKeyCredential(apiKey)); +var credential = new DefaultAzureCredential(); +var client = new DocumentIntelligenceAdministrationClient(new Uri(endpoint), credential); ``` ## Get and List Document Model Operations diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/samples/Sample_ManageModels.md b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/samples/Sample_ManageModels.md index 26794bb45373..d29f14b500a8 100644 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/samples/Sample_ManageModels.md +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/samples/Sample_ManageModels.md @@ -12,8 +12,8 @@ You can set `endpoint` and `apiKey` based on an environment variable, a configur ```C# Snippet:CreateDocumentIntelligenceAdministrationClient string endpoint = ""; -string apiKey = ""; -var client = new DocumentIntelligenceAdministrationClient(new Uri(endpoint), new AzureKeyCredential(apiKey)); +var credential = new DefaultAzureCredential(); +var client = new DocumentIntelligenceAdministrationClient(new Uri(endpoint), credential); ``` ## Model administration operations diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/samples/Sample_ModelCompose.md b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/samples/Sample_ModelCompose.md index c42f0f450f1b..c3796d2b90cd 100644 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/samples/Sample_ModelCompose.md +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/samples/Sample_ModelCompose.md @@ -12,8 +12,8 @@ You can set `endpoint` and `apiKey` based on an environment variable, a configur ```C# Snippet:CreateDocumentIntelligenceAdministrationClient string endpoint = ""; -string apiKey = ""; -var client = new DocumentIntelligenceAdministrationClient(new Uri(endpoint), new AzureKeyCredential(apiKey)); +var credential = new DefaultAzureCredential(); +var client = new DocumentIntelligenceAdministrationClient(new Uri(endpoint), credential); ``` ## Compose a model diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/DocumentIntelligenceAdministrationClient/DocumentIntelligenceAdministrationClientLiveTests.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/DocumentIntelligenceAdministrationClient/DocumentIntelligenceAdministrationClientLiveTests.cs index e71a0d1ab3b8..0960675610c0 100644 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/DocumentIntelligenceAdministrationClient/DocumentIntelligenceAdministrationClientLiveTests.cs +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/DocumentIntelligenceAdministrationClient/DocumentIntelligenceAdministrationClientLiveTests.cs @@ -15,10 +15,9 @@ public DocumentIntelligenceAdministrationClientLiveTests(bool isAsync) } [RecordedTest] - [Ignore("https://github.com/Azure/azure-sdk-for-net/issues/40054")] - public async Task DocumentIntelligenceAdministrationClientCanAuthenticateWithTokenCredential() + public async Task DocumentIntelligenceAdministrationClientCanAuthenticateWithApiKey() { - var client = CreateDocumentIntelligenceAdministrationClient(useTokenCredential: true); + var client = CreateDocumentIntelligenceAdministrationClient(useApiKey: true); Response response = await client.GetResourceInfoAsync(); Response rawResponse = response.GetRawResponse(); diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/DocumentIntelligenceClient/DocumentIntelligenceClientLiveTests.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/DocumentIntelligenceClient/DocumentIntelligenceClientLiveTests.cs index 076bd30d577a..06e2824b41f3 100644 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/DocumentIntelligenceClient/DocumentIntelligenceClientLiveTests.cs +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/DocumentIntelligenceClient/DocumentIntelligenceClientLiveTests.cs @@ -15,10 +15,9 @@ public DocumentIntelligenceClientLiveTests(bool isAsync) } [RecordedTest] - [Ignore("https://github.com/Azure/azure-sdk-for-net/issues/40054")] - public async Task DocumentIntelligenceClientCanAuthenticateWithTokenCredential() + public async Task DocumentIntelligenceClientCanAuthenticateWithApiKey() { - var client = CreateDocumentIntelligenceClient(useTokenCredential: true); + var client = CreateDocumentIntelligenceClient(useApiKey: true); var content = new AnalyzeDocumentContent() { diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/Infrastructure/DocumentIntelligenceLiveTestBase.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/Infrastructure/DocumentIntelligenceLiveTestBase.cs index 2ba694f3ccaf..5e15593536d3 100644 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/Infrastructure/DocumentIntelligenceLiveTestBase.cs +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/Infrastructure/DocumentIntelligenceLiveTestBase.cs @@ -21,41 +21,41 @@ public DocumentIntelligenceLiveTestBase(bool isAsync, RecordedTestMode? mode = n protected string ServiceVersionString { get; } = "2024-07-31-preview"; - protected DocumentIntelligenceClient CreateDocumentIntelligenceClient(bool useTokenCredential = false) + protected DocumentIntelligenceClient CreateDocumentIntelligenceClient(bool useApiKey = false) { var endpoint = new Uri(TestEnvironment.Endpoint); var options = InstrumentClientOptions(new DocumentIntelligenceClientOptions()); DocumentIntelligenceClient nonInstrumentedClient; - if (useTokenCredential) + if (useApiKey) { - nonInstrumentedClient = new DocumentIntelligenceClient(endpoint, TestEnvironment.Credential, options); + var credential = new AzureKeyCredential(TestEnvironment.ApiKey); + nonInstrumentedClient = new DocumentIntelligenceClient(endpoint, credential, options); } else { - var credential = new AzureKeyCredential(TestEnvironment.ApiKey); - nonInstrumentedClient = new DocumentIntelligenceClient(endpoint, credential, options); + nonInstrumentedClient = new DocumentIntelligenceClient(endpoint, TestEnvironment.Credential, options); } return InstrumentClient(nonInstrumentedClient); } - protected DocumentIntelligenceAdministrationClient CreateDocumentIntelligenceAdministrationClient(bool useTokenCredential = false) + protected DocumentIntelligenceAdministrationClient CreateDocumentIntelligenceAdministrationClient(bool useApiKey = false) { var endpoint = new Uri(TestEnvironment.Endpoint); var options = InstrumentClientOptions(new DocumentIntelligenceClientOptions()); DocumentIntelligenceAdministrationClient nonInstrumentedClient; - if (useTokenCredential) + if (useApiKey) { - nonInstrumentedClient = new DocumentIntelligenceAdministrationClient(endpoint, TestEnvironment.Credential, options); + var credential = new AzureKeyCredential(TestEnvironment.ApiKey); + nonInstrumentedClient = new DocumentIntelligenceAdministrationClient(endpoint, credential, options); } else { - var credential = new AzureKeyCredential(TestEnvironment.ApiKey); - nonInstrumentedClient = new DocumentIntelligenceAdministrationClient(endpoint, credential, options); + nonInstrumentedClient = new DocumentIntelligenceAdministrationClient(endpoint, TestEnvironment.Credential, options); } return InstrumentClient(nonInstrumentedClient); diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/Infrastructure/DocumentIntelligenceTestEnvironment.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/Infrastructure/DocumentIntelligenceTestEnvironment.cs index 43ccbde453d6..88872f260da7 100644 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/Infrastructure/DocumentIntelligenceTestEnvironment.cs +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/Infrastructure/DocumentIntelligenceTestEnvironment.cs @@ -6,6 +6,7 @@ using System.Reflection; using System.Threading.Tasks; using Azure.Core.TestFramework; +using Azure.Identity; namespace Azure.AI.DocumentIntelligence.Tests { @@ -56,12 +57,12 @@ public static BinaryData CreateBinaryData(string filename) protected override async ValueTask IsEnvironmentReadyAsync() { var endpoint = new Uri(Endpoint); - var keyCredential = new AzureKeyCredential(ApiKey); - var keyCredentialClient = new DocumentIntelligenceAdministrationClient(endpoint, keyCredential); + var credential = Credential; + var client = new DocumentIntelligenceAdministrationClient(endpoint, credential); try { - await keyCredentialClient.GetResourceInfoAsync(); + await client.GetResourceInfoAsync(); } catch (RequestFailedException e) when (e.Status == 401) { diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/samples/DocumentIntelligenceSamples.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/samples/DocumentIntelligenceSamples.cs index fdc69eaf66a2..5971d426eba8 100644 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/samples/DocumentIntelligenceSamples.cs +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/samples/DocumentIntelligenceSamples.cs @@ -10,7 +10,7 @@ namespace Azure.AI.DocumentIntelligence.Samples [AsyncOnly] // Ensure that each sample will only run once. public partial class DocumentIntelligenceSamples : RecordedTestBase { - public DocumentIntelligenceSamples(bool isAsync) : base(isAsync, RecordedTestMode.Live) + public DocumentIntelligenceSamples(bool isAsync) : base(isAsync) { } } diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/samples/SampleAnalyzeWithPrebuiltModelWithBase64.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/samples/SampleAnalyzeWithPrebuiltModelWithBase64.cs index 9f63f918ca62..15da927b6f89 100644 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/samples/SampleAnalyzeWithPrebuiltModelWithBase64.cs +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/samples/SampleAnalyzeWithPrebuiltModelWithBase64.cs @@ -16,8 +16,7 @@ public partial class DocumentIntelligenceSamples public async Task AnalyzeWithPrebuiltModelWithBase64Async() { string endpoint = TestEnvironment.Endpoint; - string apiKey = TestEnvironment.ApiKey; - var client = new DocumentIntelligenceClient(new Uri(endpoint), new AzureKeyCredential(apiKey)); + var client = new DocumentIntelligenceClient(new Uri(endpoint), TestEnvironment.Credential); #region Snippet:DocumentIntelligenceAnalyzeWithPrebuiltModelWithBase64Async #if SNIPPET diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/samples/SampleSnippets.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/samples/SampleSnippets.cs index bc30d5782226..d166e87293ed 100644 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/samples/SampleSnippets.cs +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/samples/SampleSnippets.cs @@ -18,25 +18,27 @@ public void CreateDocumentIntelligenceClient() #region Snippet:CreateDocumentIntelligenceClient #if SNIPPET string endpoint = ""; - string apiKey = ""; + var credential = new DefaultAzureCredential(); #else string endpoint = TestEnvironment.Endpoint; - string apiKey = TestEnvironment.ApiKey; + var credential = TestEnvironment.Credential; #endif - var client = new DocumentIntelligenceClient(new Uri(endpoint), new AzureKeyCredential(apiKey)); + var client = new DocumentIntelligenceClient(new Uri(endpoint), credential); #endregion } [RecordedTest] - public void CreateDocumentIntelligenceClientTokenCredential() + public void CreateDocumentIntelligenceClientApiKey() { - #region Snippet:CreateDocumentIntelligenceClientTokenCredential + #region Snippet:CreateDocumentIntelligenceClientApiKey #if SNIPPET string endpoint = ""; + string apiKey = ""; #else string endpoint = TestEnvironment.Endpoint; + string apiKey = TestEnvironment.ApiKey; #endif - var client = new DocumentIntelligenceClient(new Uri(endpoint), new DefaultAzureCredential()); + var client = new DocumentIntelligenceClient(new Uri(endpoint), new AzureKeyCredential(apiKey)); #endregion } @@ -46,12 +48,12 @@ public void CreateDocumentIntelligenceAdministrationClient() #region Snippet:CreateDocumentIntelligenceAdministrationClient #if SNIPPET string endpoint = ""; - string apiKey = ""; + var credential = new DefaultAzureCredential(); #else string endpoint = TestEnvironment.Endpoint; - string apiKey = TestEnvironment.ApiKey; + var credential = TestEnvironment.Credential; #endif - var client = new DocumentIntelligenceAdministrationClient(new Uri(endpoint), new AzureKeyCredential(apiKey)); + var client = new DocumentIntelligenceAdministrationClient(new Uri(endpoint), credential); #endregion } @@ -61,12 +63,11 @@ public void CreateBothDocumentIntelligenceClients() #region Snippet:Migration_CreateBothDocumentIntelligenceClients #if SNIPPET string endpoint = ""; - string apiKey = ""; + var credential = new DefaultAzureCredential(); #else string endpoint = TestEnvironment.Endpoint; - string apiKey = TestEnvironment.ApiKey; + var credential = TestEnvironment.Credential; #endif - var credential = new AzureKeyCredential(apiKey); var documentIntelligenceClient = new DocumentIntelligenceClient(new Uri(endpoint), credential); var documentIntelligenceAdministrationClient = new DocumentIntelligenceAdministrationClient(new Uri(endpoint), credential); @@ -77,8 +78,7 @@ public void CreateBothDocumentIntelligenceClients() public async Task BadRequestSnippet() { string endpoint = TestEnvironment.Endpoint; - string apiKey = TestEnvironment.ApiKey; - var client = new DocumentIntelligenceClient(new Uri(endpoint), new AzureKeyCredential(apiKey)); + var client = new DocumentIntelligenceClient(new Uri(endpoint), TestEnvironment.Credential); #region Snippet:DocumentIntelligenceBadRequest var content = new AnalyzeDocumentContent() @@ -101,8 +101,7 @@ public async Task BadRequestSnippet() public async Task GetWordsSnippet() { string endpoint = TestEnvironment.Endpoint; - string apiKey = TestEnvironment.ApiKey; - var client = new DocumentIntelligenceClient(new Uri(endpoint), new AzureKeyCredential(apiKey)); + var client = new DocumentIntelligenceClient(new Uri(endpoint), TestEnvironment.Credential); #region Snippet:Migration_DocumentIntelligenceGetWordsUsage #if SNIPPET diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/samples/Sample_AnalyzeWithAddOnCapabilities.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/samples/Sample_AnalyzeWithAddOnCapabilities.cs index 169bf3f768bc..3dd5cc8ba013 100644 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/samples/Sample_AnalyzeWithAddOnCapabilities.cs +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/samples/Sample_AnalyzeWithAddOnCapabilities.cs @@ -16,8 +16,7 @@ public partial class DocumentIntelligenceSamples public async Task AnalyzeWithFormulaExtraction() { string endpoint = TestEnvironment.Endpoint; - string apiKey = TestEnvironment.ApiKey; - var client = new DocumentIntelligenceClient(new Uri(endpoint), new AzureKeyCredential(apiKey)); + var client = new DocumentIntelligenceClient(new Uri(endpoint), TestEnvironment.Credential); #region Snippet:DocumentIntelligenceSampleFormulaExtraction #if SNIPPET @@ -65,8 +64,7 @@ public async Task AnalyzeWithFormulaExtraction() public async Task AnalyzeWithFontStyling() { string endpoint = TestEnvironment.Endpoint; - string apiKey = TestEnvironment.ApiKey; - var client = new DocumentIntelligenceClient(new Uri(endpoint), new AzureKeyCredential(apiKey)); + var client = new DocumentIntelligenceClient(new Uri(endpoint), TestEnvironment.Credential); #region Snippet:DocumentIntelligenceSampleFontStyling #if SNIPPET @@ -229,8 +227,7 @@ public async Task AnalyzeWithFontStyling() public async Task AnalyzeWithBarcodeExtraction() { string endpoint = TestEnvironment.Endpoint; - string apiKey = TestEnvironment.ApiKey; - var client = new DocumentIntelligenceClient(new Uri(endpoint), new AzureKeyCredential(apiKey)); + var client = new DocumentIntelligenceClient(new Uri(endpoint), TestEnvironment.Credential); #region Snippet:DocumentIntelligenceSampleBarcodeExtraction #if SNIPPET @@ -280,8 +277,7 @@ public async Task AnalyzeWithBarcodeExtraction() public async Task AnalyzeWithLanguageDetection() { string endpoint = TestEnvironment.Endpoint; - string apiKey = TestEnvironment.ApiKey; - var client = new DocumentIntelligenceClient(new Uri(endpoint), new AzureKeyCredential(apiKey)); + var client = new DocumentIntelligenceClient(new Uri(endpoint), TestEnvironment.Credential); #region Snippet:DocumentIntelligenceSampleLanguageDetection #if SNIPPET @@ -323,8 +319,7 @@ public async Task AnalyzeWithLanguageDetection() public async Task AnalyzeWithKeyValuePairs() { string endpoint = TestEnvironment.Endpoint; - string apiKey = TestEnvironment.ApiKey; - var client = new DocumentIntelligenceClient(new Uri(endpoint), new AzureKeyCredential(apiKey)); + var client = new DocumentIntelligenceClient(new Uri(endpoint), TestEnvironment.Credential); #region Snippet:DocumentIntelligenceSampleKeyValuePairsExtraction #if SNIPPET diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/samples/Sample_AnalyzeWithPrebuiltModelFromUri.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/samples/Sample_AnalyzeWithPrebuiltModelFromUri.cs index 4b2e7967194d..9c7538a11187 100644 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/samples/Sample_AnalyzeWithPrebuiltModelFromUri.cs +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/samples/Sample_AnalyzeWithPrebuiltModelFromUri.cs @@ -15,8 +15,7 @@ public partial class DocumentIntelligenceSamples public async Task AnalyzeWithPrebuiltModelFromUriAsync() { string endpoint = TestEnvironment.Endpoint; - string apiKey = TestEnvironment.ApiKey; - var client = new DocumentIntelligenceClient(new Uri(endpoint), new AzureKeyCredential(apiKey)); + var client = new DocumentIntelligenceClient(new Uri(endpoint), TestEnvironment.Credential); #region Snippet:DocumentIntelligenceAnalyzeWithPrebuiltModelFromUriAsync #if SNIPPET diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/samples/Sample_BuildCustomModelAsync.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/samples/Sample_BuildCustomModelAsync.cs index c23a1a9b7bb2..1988e301887a 100644 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/samples/Sample_BuildCustomModelAsync.cs +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/samples/Sample_BuildCustomModelAsync.cs @@ -14,8 +14,7 @@ public partial class DocumentIntelligenceSamples public async Task BuildCustomModelAsync() { string endpoint = TestEnvironment.Endpoint; - string apiKey = TestEnvironment.ApiKey; - var client = new DocumentIntelligenceAdministrationClient(new Uri(endpoint), new AzureKeyCredential(apiKey)); + var client = new DocumentIntelligenceAdministrationClient(new Uri(endpoint), TestEnvironment.Credential); #region Snippet:DocumentIntelligenceSampleBuildModel // For this sample, you can use the training documents found in the `trainingFiles` folder. diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/samples/Sample_BuildDocumentClassifierAsync.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/samples/Sample_BuildDocumentClassifierAsync.cs index a9059699e148..55d793d53563 100644 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/samples/Sample_BuildDocumentClassifierAsync.cs +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/samples/Sample_BuildDocumentClassifierAsync.cs @@ -14,8 +14,7 @@ public partial class DocumentIntelligenceSamples public async Task BuildDocumentClassifierAsync() { string endpoint = TestEnvironment.Endpoint; - string apiKey = TestEnvironment.ApiKey; - var client = new DocumentIntelligenceAdministrationClient(new Uri(endpoint), new AzureKeyCredential(apiKey)); + var client = new DocumentIntelligenceAdministrationClient(new Uri(endpoint), TestEnvironment.Credential); #region Snippet:DocumentIntelligenceSampleBuildClassifier // For this sample, you can use the training documents found in the `classifierTrainingFiles` folder. diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/samples/Sample_ClassifyDocumentFromUriAsync.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/samples/Sample_ClassifyDocumentFromUriAsync.cs index 3cf9d721b59d..77f8e090e5b0 100644 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/samples/Sample_ClassifyDocumentFromUriAsync.cs +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/samples/Sample_ClassifyDocumentFromUriAsync.cs @@ -15,9 +15,8 @@ public partial class DocumentIntelligenceSamples public async Task ClassifyDocumentFromUriAsync() { string endpoint = TestEnvironment.Endpoint; - string apiKey = TestEnvironment.ApiKey; - var client = new DocumentIntelligenceClient(new Uri(endpoint), new AzureKeyCredential(apiKey)); - var adminClient = new DocumentIntelligenceAdministrationClient(new Uri(endpoint), new AzureKeyCredential(apiKey)); + var client = new DocumentIntelligenceClient(new Uri(endpoint), TestEnvironment.Credential); + var adminClient = new DocumentIntelligenceAdministrationClient(new Uri(endpoint), TestEnvironment.Credential); string setupClassifierId = Guid.NewGuid().ToString(); Uri blobContainerUri = new Uri(TestEnvironment.ClassifierTrainingSasUrl); diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/samples/Sample_ComposeModelAsync.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/samples/Sample_ComposeModelAsync.cs index 5b62541c4a3d..245798e26acd 100644 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/samples/Sample_ComposeModelAsync.cs +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/samples/Sample_ComposeModelAsync.cs @@ -5,7 +5,6 @@ using System.Collections.Generic; using System.Threading.Tasks; using Azure.Core.TestFramework; -using NUnit.Framework; namespace Azure.AI.DocumentIntelligence.Samples { @@ -15,8 +14,7 @@ public partial class DocumentIntelligenceSamples public async Task ComposeModelAsync() { string endpoint = TestEnvironment.Endpoint; - string apiKey = TestEnvironment.ApiKey; - var client = new DocumentIntelligenceAdministrationClient(new Uri(endpoint), new AzureKeyCredential(apiKey)); + var client = new DocumentIntelligenceAdministrationClient(new Uri(endpoint), TestEnvironment.Credential); #region Snippet:DocumentIntelligenceSampleBuildVariousModels // For this sample, you can use the training documents found in the `trainingFiles` folder. diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/samples/Sample_CopyModelToAsync.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/samples/Sample_CopyModelToAsync.cs index 2da068c23ad7..eef61ad2e2f3 100644 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/samples/Sample_CopyModelToAsync.cs +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/samples/Sample_CopyModelToAsync.cs @@ -4,6 +4,7 @@ using System; using System.Threading.Tasks; using Azure.Core.TestFramework; +using Azure.Identity; namespace Azure.AI.DocumentIntelligence.Samples { @@ -15,12 +16,12 @@ public async Task CopyModelToAsync() #region Snippet:DocumentIntelligenceSampleCreateCopySourceClient #if SNIPPET string sourceEndpoint = ""; - string sourceApiKey = ""; + var sourceResourceCredential = new DefaultAzureCredential(); #else string sourceEndpoint = TestEnvironment.Endpoint; - string sourceApiKey = TestEnvironment.ApiKey; + var sourceResourceCredential = TestEnvironment.Credential; #endif - var sourceClient = new DocumentIntelligenceAdministrationClient(new Uri(sourceEndpoint), new AzureKeyCredential(sourceApiKey)); + var sourceClient = new DocumentIntelligenceAdministrationClient(new Uri(sourceEndpoint), sourceResourceCredential); #endregion // For the purpose of this sample, we are going to create a model to copy. Note that @@ -38,12 +39,12 @@ public async Task CopyModelToAsync() #region Snippet:DocumentIntelligenceSampleCreateCopyTargetClient #if SNIPPET string targetEndpoint = ""; - string targetApiKey = ""; + var targetResourceCredential = new DefaultAzureCredential(); #else string targetEndpoint = TestEnvironment.Endpoint; - string targetApiKey = TestEnvironment.ApiKey; + var targetResourceCredential = TestEnvironment.Credential; #endif - var targetClient = new DocumentIntelligenceAdministrationClient(new Uri(targetEndpoint), new AzureKeyCredential(targetApiKey)); + var targetClient = new DocumentIntelligenceAdministrationClient(new Uri(targetEndpoint), targetResourceCredential); #endregion #region Snippet:DocumentIntelligenceSampleGetCopyAuthorization diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/samples/Sample_ExtractLayoutAsMarkdownAsync.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/samples/Sample_ExtractLayoutAsMarkdownAsync.cs index 447538501ea3..d55a20f520d4 100644 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/samples/Sample_ExtractLayoutAsMarkdownAsync.cs +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/samples/Sample_ExtractLayoutAsMarkdownAsync.cs @@ -14,8 +14,7 @@ public partial class DocumentIntelligenceSamples public async Task ExtractLayoutAsMarkdownAsync() { string endpoint = TestEnvironment.Endpoint; - string apiKey = TestEnvironment.ApiKey; - var client = new DocumentIntelligenceClient(new Uri(endpoint), new AzureKeyCredential(apiKey)); + var client = new DocumentIntelligenceClient(new Uri(endpoint), TestEnvironment.Credential); #region Snippet:DocumentIntelligenceExtractLayoutAsMarkdownAsync #if SNIPPET diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/samples/Sample_ExtractLayoutFromUriAsync.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/samples/Sample_ExtractLayoutFromUriAsync.cs index 14296a51c55a..e0f2c50c906e 100644 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/samples/Sample_ExtractLayoutFromUriAsync.cs +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/samples/Sample_ExtractLayoutFromUriAsync.cs @@ -15,7 +15,7 @@ public async Task ExtractLayoutFromUriAsync() { string endpoint = TestEnvironment.Endpoint; string apiKey = TestEnvironment.ApiKey; - var client = new DocumentIntelligenceClient(new Uri(endpoint), new AzureKeyCredential(apiKey)); + var client = new DocumentIntelligenceClient(new Uri(endpoint), TestEnvironment.Credential); #region Snippet:DocumentIntelligenceExtractLayoutFromUriAsync #if SNIPPET diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/samples/Sample_GetAndListOperationsAsync.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/samples/Sample_GetAndListOperationsAsync.cs index cb5964474abf..0b70ff07dfb8 100644 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/samples/Sample_GetAndListOperationsAsync.cs +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/samples/Sample_GetAndListOperationsAsync.cs @@ -13,8 +13,7 @@ public partial class DocumentIntelligenceSamples public async Task GetAndListOperationsAsync() { string endpoint = TestEnvironment.Endpoint; - string apiKey = TestEnvironment.ApiKey; - var client = new DocumentIntelligenceAdministrationClient(new Uri(endpoint), new AzureKeyCredential(apiKey)); + var client = new DocumentIntelligenceAdministrationClient(new Uri(endpoint), TestEnvironment.Credential); // Build a custom model to make sure that there is at least one operation. string modelId = Guid.NewGuid().ToString(); diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/samples/Sample_ManageModelsAsync.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/samples/Sample_ManageModelsAsync.cs index d4dc678953a8..e5c84bf6d705 100644 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/samples/Sample_ManageModelsAsync.cs +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/samples/Sample_ManageModelsAsync.cs @@ -13,8 +13,7 @@ public partial class DocumentIntelligenceSamples public async Task ManageModelsAsync() { string endpoint = TestEnvironment.Endpoint; - string apiKey = TestEnvironment.ApiKey; - var client = new DocumentIntelligenceAdministrationClient(new Uri(endpoint), new AzureKeyCredential(apiKey)); + var client = new DocumentIntelligenceAdministrationClient(new Uri(endpoint), TestEnvironment.Credential); // Build to make sure that there is at least one custom model. string setupModelId = Guid.NewGuid().ToString(); diff --git a/sdk/documentintelligence/tests.yml b/sdk/documentintelligence/tests.yml index f36931843304..4fb588b2f362 100644 --- a/sdk/documentintelligence/tests.yml +++ b/sdk/documentintelligence/tests.yml @@ -1,13 +1,9 @@ trigger: none extends: - template: ../../eng/pipelines/templates/stages/archetype-sdk-tests.yml + template: /eng/pipelines/templates/stages/archetype-sdk-tests.yml parameters: ServiceDirectory: documentintelligence CloudConfig: Public: - ServiceConnection: azure-sdk-tests - SubscriptionConfigurationFilePaths: - - eng/common/TestResources/sub-config/AzurePublicMsft.json Location: 'eastus' - SupportedClouds: 'Public' diff --git a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/Docs/EasmClient.xml b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/Docs/EasmClient.xml index 315aea4ad7e4..57b7b001be07 100644 --- a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/Docs/EasmClient.xml +++ b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/Docs/EasmClient.xml @@ -415,7 +415,7 @@ DiscoveryGroupPayload body = new DiscoveryGroupPayload { Description = "This is a disco group", Tier = "advanced", - FrequencyMilliseconds = 604800000, + FrequencyMilliseconds = 604800000L, Seeds = {new DiscoverySource { Kind = DiscoverySourceKind.Host, @@ -437,7 +437,7 @@ DiscoveryGroupPayload body = new DiscoveryGroupPayload { Description = "This is a disco group", Tier = "advanced", - FrequencyMilliseconds = 604800000, + FrequencyMilliseconds = 604800000L, Seeds = {new DiscoverySource { Kind = DiscoverySourceKind.Host, @@ -458,7 +458,7 @@ EasmClient client = new EasmClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { description = "This is a disco group", - frequencyMilliseconds = 604800000, + frequencyMilliseconds = 604800000L, tier = "advanced", seeds = new object[] { @@ -486,7 +486,7 @@ EasmClient client = new EasmClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { description = "This is a disco group", - frequencyMilliseconds = 604800000, + frequencyMilliseconds = 604800000L, tier = "advanced", seeds = new object[] { @@ -565,7 +565,7 @@ DiscoveryGroupPayload body = new DiscoveryGroupPayload { Description = "This is a disco group", Tier = "advanced", - FrequencyMilliseconds = 604800000, + FrequencyMilliseconds = 604800000L, Seeds = {new DiscoverySource { Kind = DiscoverySourceKind.Host, @@ -587,7 +587,7 @@ DiscoveryGroupPayload body = new DiscoveryGroupPayload { Description = "This is a disco group", Tier = "advanced", - FrequencyMilliseconds = 604800000, + FrequencyMilliseconds = 604800000L, Seeds = {new DiscoverySource { Kind = DiscoverySourceKind.Host, @@ -608,7 +608,7 @@ EasmClient client = new EasmClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { description = "This is a disco group", - frequencyMilliseconds = 604800000, + frequencyMilliseconds = 604800000L, tier = "advanced", seeds = new object[] { @@ -636,7 +636,7 @@ EasmClient client = new EasmClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { description = "This is a disco group", - frequencyMilliseconds = 604800000, + frequencyMilliseconds = 604800000L, tier = "advanced", seeds = new object[] { diff --git a/sdk/easm/Azure.Analytics.Defender.Easm/tests/Generated/Samples/Samples_EasmClient.cs b/sdk/easm/Azure.Analytics.Defender.Easm/tests/Generated/Samples/Samples_EasmClient.cs index dadfc56f3114..437666172da9 100644 --- a/sdk/easm/Azure.Analytics.Defender.Easm/tests/Generated/Samples/Samples_EasmClient.cs +++ b/sdk/easm/Azure.Analytics.Defender.Easm/tests/Generated/Samples/Samples_EasmClient.cs @@ -429,7 +429,7 @@ public void Example_EasmClient_ValidateDiscoveryGroup_DiscoveryGroupsValidateDis using RequestContent content = RequestContent.Create(new { description = "This is a disco group", - frequencyMilliseconds = 604800000, + frequencyMilliseconds = 604800000L, tier = "advanced", seeds = new object[] { @@ -457,7 +457,7 @@ public async Task Example_EasmClient_ValidateDiscoveryGroup_DiscoveryGroupsValid using RequestContent content = RequestContent.Create(new { description = "This is a disco group", - frequencyMilliseconds = 604800000, + frequencyMilliseconds = 604800000L, tier = "advanced", seeds = new object[] { @@ -486,7 +486,7 @@ public void Example_EasmClient_ValidateDiscoveryGroup_DiscoveryGroupsValidateDis { Description = "This is a disco group", Tier = "advanced", - FrequencyMilliseconds = 604800000, + FrequencyMilliseconds = 604800000L, Seeds = {new DiscoverySource { Kind = DiscoverySourceKind.Host, @@ -508,7 +508,7 @@ public async Task Example_EasmClient_ValidateDiscoveryGroup_DiscoveryGroupsValid { Description = "This is a disco group", Tier = "advanced", - FrequencyMilliseconds = 604800000, + FrequencyMilliseconds = 604800000L, Seeds = {new DiscoverySource { Kind = DiscoverySourceKind.Host, @@ -579,7 +579,7 @@ public void Example_DiscoGroup_CreateOrReplaceDiscoveryGroup_DiscoveryGroupsCrea using RequestContent content = RequestContent.Create(new { description = "This is a disco group", - frequencyMilliseconds = 604800000, + frequencyMilliseconds = 604800000L, tier = "advanced", seeds = new object[] { @@ -607,7 +607,7 @@ public async Task Example_DiscoGroup_CreateOrReplaceDiscoveryGroup_DiscoveryGrou using RequestContent content = RequestContent.Create(new { description = "This is a disco group", - frequencyMilliseconds = 604800000, + frequencyMilliseconds = 604800000L, tier = "advanced", seeds = new object[] { @@ -636,7 +636,7 @@ public void Example_DiscoGroup_CreateOrReplaceDiscoveryGroup_DiscoveryGroupsCrea { Description = "This is a disco group", Tier = "advanced", - FrequencyMilliseconds = 604800000, + FrequencyMilliseconds = 604800000L, Seeds = {new DiscoverySource { Kind = DiscoverySourceKind.Host, @@ -658,7 +658,7 @@ public async Task Example_DiscoGroup_CreateOrReplaceDiscoveryGroup_DiscoveryGrou { Description = "This is a disco group", Tier = "advanced", - FrequencyMilliseconds = 604800000, + FrequencyMilliseconds = 604800000L, Seeds = {new DiscoverySource { Kind = DiscoverySourceKind.Host, diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/CHANGELOG.md b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/CHANGELOG.md index 8db840bfa6f4..d16780db67fa 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/CHANGELOG.md +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/CHANGELOG.md @@ -5,6 +5,7 @@ ### Features Added - Enable the new model serialization by using the System.ClientModel, refer this [document](https://aka.ms/azsdk/net/mrw) for more details. +- Exposed `JsonModelWriteCore` for model serialization procedure. ### Breaking Changes diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/api/Azure.ResourceManager.EdgeOrder.netstandard2.0.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/api/Azure.ResourceManager.EdgeOrder.netstandard2.0.cs index 73c9f988060d..2ca3c496da0e 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/api/Azure.ResourceManager.EdgeOrder.netstandard2.0.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/api/Azure.ResourceManager.EdgeOrder.netstandard2.0.cs @@ -23,6 +23,7 @@ public EdgeOrderAddressData(Azure.Core.AzureLocation location, Azure.ResourceMan public Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAddressValidationStatus? AddressValidationStatus { get { throw null; } } public Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAddressContactDetails ContactDetails { get { throw null; } set { } } public Azure.ResourceManager.EdgeOrder.Models.EdgeOrderShippingAddress ShippingAddress { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EdgeOrder.EdgeOrderAddressData 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.EdgeOrder.EdgeOrderAddressData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -70,6 +71,7 @@ public EdgeOrderData() { } public Azure.ResourceManager.EdgeOrder.Models.EdgeOrderStageDetails CurrentStage { get { throw null; } } public System.Collections.Generic.IReadOnlyList OrderItemIds { get { throw null; } } public System.Collections.Generic.IReadOnlyList OrderStageHistory { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EdgeOrder.EdgeOrderData 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.EdgeOrder.EdgeOrderData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -129,6 +131,7 @@ public EdgeOrderItemData(Azure.Core.AzureLocation location, Azure.ResourceManage public Azure.Core.ResourceIdentifier OrderId { get { throw null; } set { } } public Azure.ResourceManager.EdgeOrder.Models.EdgeOrderItemDetails OrderItemDetails { get { throw null; } set { } } public System.DateTimeOffset? StartOn { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EdgeOrder.EdgeOrderItemData 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.EdgeOrder.EdgeOrderItemData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -263,6 +266,7 @@ public partial class ConfigurationFilters : System.ClientModel.Primitives.IJsonM public ConfigurationFilters(Azure.ResourceManager.EdgeOrder.Models.HierarchyInformation hierarchyInformation) { } public System.Collections.Generic.IList FilterableProperty { get { throw null; } } public Azure.ResourceManager.EdgeOrder.Models.HierarchyInformation HierarchyInformation { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EdgeOrder.Models.ConfigurationFilters 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.EdgeOrder.Models.ConfigurationFilters System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -274,6 +278,7 @@ public partial class ConfigurationsContent : System.ClientModel.Primitives.IJson public ConfigurationsContent(System.Collections.Generic.IEnumerable configurationFilters) { } public System.Collections.Generic.IList ConfigurationFilters { get { throw null; } } public Azure.ResourceManager.EdgeOrder.Models.CustomerSubscriptionDetails CustomerSubscriptionDetails { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EdgeOrder.Models.ConfigurationsContent 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.EdgeOrder.Models.ConfigurationsContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -286,6 +291,7 @@ public CustomerSubscriptionDetails(string quotaId) { } public string LocationPlacementId { get { throw null; } set { } } public string QuotaId { get { throw null; } } public System.Collections.Generic.IList RegisteredFeatures { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EdgeOrder.Models.CustomerSubscriptionDetails 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.EdgeOrder.Models.CustomerSubscriptionDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -297,6 +303,7 @@ public partial class CustomerSubscriptionRegisteredFeatures : System.ClientModel public CustomerSubscriptionRegisteredFeatures() { } public string Name { get { throw null; } set { } } public string State { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EdgeOrder.Models.CustomerSubscriptionRegisteredFeatures 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.EdgeOrder.Models.CustomerSubscriptionRegisteredFeatures System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -347,6 +354,7 @@ public EdgeOrderAddressContactDetails(string contactName, string phone, System.C public string Mobile { get { throw null; } set { } } public string Phone { get { throw null; } set { } } public string PhoneExtension { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAddressContactDetails 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.EdgeOrder.Models.EdgeOrderAddressContactDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -359,6 +367,7 @@ public EdgeOrderAddressPatch() { } public Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAddressContactDetails ContactDetails { get { throw null; } set { } } public Azure.ResourceManager.EdgeOrder.Models.EdgeOrderShippingAddress ShippingAddress { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAddressPatch 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.EdgeOrder.Models.EdgeOrderAddressPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -408,6 +417,7 @@ public partial class EdgeOrderItemAddressDetails : System.ClientModel.Primitives public EdgeOrderItemAddressDetails(Azure.ResourceManager.EdgeOrder.Models.EdgeOrderItemAddressProperties forwardAddress) { } public Azure.ResourceManager.EdgeOrder.Models.EdgeOrderItemAddressProperties ForwardAddress { get { throw null; } set { } } public Azure.ResourceManager.EdgeOrder.Models.EdgeOrderItemAddressProperties ReturnAddress { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EdgeOrder.Models.EdgeOrderItemAddressDetails 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.EdgeOrder.Models.EdgeOrderItemAddressDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -420,6 +430,7 @@ public EdgeOrderItemAddressProperties(Azure.ResourceManager.EdgeOrder.Models.Edg public Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAddressValidationStatus? AddressValidationStatus { get { throw null; } } public Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAddressContactDetails ContactDetails { get { throw null; } set { } } public Azure.ResourceManager.EdgeOrder.Models.EdgeOrderShippingAddress ShippingAddress { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EdgeOrder.Models.EdgeOrderItemAddressProperties 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.EdgeOrder.Models.EdgeOrderItemAddressProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -430,6 +441,7 @@ public partial class EdgeOrderItemCancellationReason : System.ClientModel.Primit { public EdgeOrderItemCancellationReason(string reason) { } public string Reason { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EdgeOrder.Models.EdgeOrderItemCancellationReason 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.EdgeOrder.Models.EdgeOrderItemCancellationReason System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -455,6 +467,7 @@ public EdgeOrderItemDetails(Azure.ResourceManager.EdgeOrder.Models.ProductDetail public string ReturnReason { get { throw null; } } public Azure.ResourceManager.EdgeOrder.Models.OrderItemReturnStatus? ReturnStatus { get { throw null; } } public Azure.ResourceManager.EdgeOrder.Models.ReverseShippingDetails ReverseShippingDetails { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EdgeOrder.Models.EdgeOrderItemDetails 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.EdgeOrder.Models.EdgeOrderItemDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -468,6 +481,7 @@ public EdgeOrderItemPatch() { } public System.Collections.Generic.IList NotificationEmailList { get { throw null; } } public Azure.ResourceManager.EdgeOrder.Models.OrderItemPreferences Preferences { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EdgeOrder.Models.EdgeOrderItemPatch 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.EdgeOrder.Models.EdgeOrderItemPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -481,6 +495,7 @@ public EdgeOrderItemReturnContent(string returnReason) { } public Azure.ResourceManager.EdgeOrder.Models.EdgeOrderItemAddressProperties ReturnAddress { get { throw null; } set { } } public string ReturnReason { get { throw null; } } public string ServiceTag { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EdgeOrder.Models.EdgeOrderItemReturnContent 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.EdgeOrder.Models.EdgeOrderItemReturnContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -498,6 +513,7 @@ internal EdgeOrderProduct() { } public System.Collections.Generic.IReadOnlyList FilterableProperties { get { throw null; } } public Azure.ResourceManager.EdgeOrder.Models.HierarchyInformation HierarchyInformation { get { throw null; } } public System.Collections.Generic.IReadOnlyList ImageInformation { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProduct 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.EdgeOrder.Models.EdgeOrderProduct System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -511,6 +527,7 @@ internal EdgeOrderProductBillingMeterDetails() { } public Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductMeterDetails MeterDetails { get { throw null; } } public Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductMeteringType? MeteringType { get { throw null; } } public string Name { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductBillingMeterDetails 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.EdgeOrder.Models.EdgeOrderProductBillingMeterDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -540,6 +557,7 @@ public partial class EdgeOrderProductCostInformation : System.ClientModel.Primit internal EdgeOrderProductCostInformation() { } public System.Uri BillingInfoUri { get { throw null; } } public System.Collections.Generic.IReadOnlyList BillingMeterDetails { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductCostInformation 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.EdgeOrder.Models.EdgeOrderProductCostInformation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -552,6 +570,7 @@ internal EdgeOrderProductDeviceDetails() { } public string ManagementResourceId { get { throw null; } } public string ManagementResourceTenantId { get { throw null; } } public string SerialNumber { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductDeviceDetails 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.EdgeOrder.Models.EdgeOrderProductDeviceDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -563,6 +582,7 @@ public partial class EdgeOrderProductImageInformation : System.ClientModel.Primi internal EdgeOrderProductImageInformation() { } public Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductImageType? ImageType { get { throw null; } } public System.Uri ImageUri { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductImageInformation 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.EdgeOrder.Models.EdgeOrderProductImageInformation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -593,6 +613,7 @@ public abstract partial class EdgeOrderProductMeterDetails : System.ClientModel. protected EdgeOrderProductMeterDetails() { } public Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductChargingType? ChargingType { get { throw null; } } public double? Multiplier { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductMeterDetails 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.EdgeOrder.Models.EdgeOrderProductMeterDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -631,6 +652,7 @@ public EdgeOrderShippingAddress(string streetAddress1, string country) { } public string StreetAddress2 { get { throw null; } set { } } public string StreetAddress3 { get { throw null; } set { } } public string ZipExtendedCode { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EdgeOrder.Models.EdgeOrderShippingAddress 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.EdgeOrder.Models.EdgeOrderShippingAddress System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -644,6 +666,7 @@ internal EdgeOrderStageDetails() { } public Azure.ResourceManager.EdgeOrder.Models.EdgeOrderStageName? StageName { get { throw null; } } public Azure.ResourceManager.EdgeOrder.Models.EdgeOrderStageStatus? StageStatus { get { throw null; } } public System.DateTimeOffset? StartOn { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EdgeOrder.Models.EdgeOrderStageDetails 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.EdgeOrder.Models.EdgeOrderStageDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -705,6 +728,7 @@ public partial class FilterableProperty : System.ClientModel.Primitives.IJsonMod public FilterableProperty(Azure.ResourceManager.EdgeOrder.Models.SupportedFilterType supportedFilterType, System.Collections.Generic.IEnumerable supportedValues) { } public Azure.ResourceManager.EdgeOrder.Models.SupportedFilterType SupportedFilterType { get { throw null; } set { } } public System.Collections.Generic.IList SupportedValues { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EdgeOrder.Models.FilterableProperty 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.EdgeOrder.Models.FilterableProperty System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -718,6 +742,7 @@ internal ForwardShippingDetails() { } public string CarrierName { get { throw null; } } public string TrackingId { get { throw null; } } public System.Uri TrackingUri { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EdgeOrder.Models.ForwardShippingDetails 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.EdgeOrder.Models.ForwardShippingDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -731,6 +756,7 @@ public HierarchyInformation() { } public string ProductFamilyName { get { throw null; } set { } } public string ProductLineName { get { throw null; } set { } } public string ProductName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EdgeOrder.Models.HierarchyInformation 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.EdgeOrder.Models.HierarchyInformation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -742,6 +768,7 @@ public partial class NotificationPreference : System.ClientModel.Primitives.IJso public NotificationPreference(Azure.ResourceManager.EdgeOrder.Models.NotificationStageName stageName, bool isNotificationRequired) { } public bool IsNotificationRequired { get { throw null; } set { } } public Azure.ResourceManager.EdgeOrder.Models.NotificationStageName StageName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EdgeOrder.Models.NotificationPreference 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.EdgeOrder.Models.NotificationPreference System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -792,6 +819,7 @@ public OrderItemPreferences() { } public System.Collections.Generic.IList NotificationPreferences { get { throw null; } } public string PreferredManagementResourceId { get { throw null; } set { } } public Azure.ResourceManager.EdgeOrder.Models.TransportShipmentType? TransportPreferencesPreferredShipmentType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EdgeOrder.Models.OrderItemPreferences 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.EdgeOrder.Models.OrderItemPreferences System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -839,6 +867,7 @@ public partial class Pav2MeterDetails : Azure.ResourceManager.EdgeOrder.Models.E { internal Pav2MeterDetails() { } public System.Guid? MeterGuid { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EdgeOrder.Models.Pav2MeterDetails 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.EdgeOrder.Models.Pav2MeterDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -851,6 +880,7 @@ internal ProductAvailabilityInformation() { } public Azure.ResourceManager.EdgeOrder.Models.ProductAvailabilityStage? AvailabilityStage { get { throw null; } } public Azure.ResourceManager.EdgeOrder.Models.ProductDisabledReason? DisabledReason { get { throw null; } } public string DisabledReasonMessage { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EdgeOrder.Models.ProductAvailabilityInformation 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.EdgeOrder.Models.ProductAvailabilityInformation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -891,6 +921,7 @@ internal ProductConfiguration() { } public Azure.ResourceManager.EdgeOrder.Models.HierarchyInformation HierarchyInformation { get { throw null; } } public System.Collections.Generic.IReadOnlyList ImageInformation { get { throw null; } } public System.Collections.Generic.IReadOnlyList Specifications { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EdgeOrder.Models.ProductConfiguration 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.EdgeOrder.Models.ProductConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -906,6 +937,7 @@ internal ProductDescription() { } public System.Collections.Generic.IReadOnlyList Links { get { throw null; } } public string LongDescription { get { throw null; } } public string ShortDescription { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EdgeOrder.Models.ProductDescription 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.EdgeOrder.Models.ProductDescription System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -937,6 +969,7 @@ public ProductDetails(Azure.ResourceManager.EdgeOrder.Models.HierarchyInformatio public Azure.ResourceManager.EdgeOrder.Models.ProductDisplayInfo DisplayInfo { get { throw null; } set { } } public Azure.ResourceManager.EdgeOrder.Models.HierarchyInformation HierarchyInformation { get { throw null; } set { } } public Azure.ResourceManager.EdgeOrder.Models.DoubleEncryptionStatus? ProductDoubleEncryptionStatus { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EdgeOrder.Models.ProductDetails 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.EdgeOrder.Models.ProductDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -953,6 +986,7 @@ internal ProductDimensions() { } public double? Weight { get { throw null; } } public Azure.ResourceManager.EdgeOrder.Models.ProductWeightMeasurementUnit? WeightUnit { get { throw null; } } public double? Width { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EdgeOrder.Models.ProductDimensions 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.EdgeOrder.Models.ProductDimensions System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -988,6 +1022,7 @@ public partial class ProductDisplayInfo : System.ClientModel.Primitives.IJsonMod public ProductDisplayInfo() { } public string ConfigurationDisplayName { get { throw null; } } public string ProductFamilyDisplayName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EdgeOrder.Models.ProductDisplayInfo 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.EdgeOrder.Models.ProductDisplayInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -999,6 +1034,7 @@ public partial class ProductFamiliesContent : System.ClientModel.Primitives.IJso public ProductFamiliesContent(System.Collections.Generic.IDictionary> filterableProperties) { } public Azure.ResourceManager.EdgeOrder.Models.CustomerSubscriptionDetails CustomerSubscriptionDetails { get { throw null; } set { } } public System.Collections.Generic.IDictionary> FilterableProperties { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EdgeOrder.Models.ProductFamiliesContent 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.EdgeOrder.Models.ProductFamiliesContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1017,6 +1053,7 @@ internal ProductFamiliesMetadata() { } public System.Collections.Generic.IReadOnlyList ImageInformation { get { throw null; } } public System.Collections.Generic.IReadOnlyList ProductLines { get { throw null; } } public System.Collections.Generic.IReadOnlyList ResourceProviderDetails { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EdgeOrder.Models.ProductFamiliesMetadata 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.EdgeOrder.Models.ProductFamiliesMetadata System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1035,6 +1072,7 @@ internal ProductFamily() { } public System.Collections.Generic.IReadOnlyList ImageInformation { get { throw null; } } public System.Collections.Generic.IReadOnlyList ProductLines { get { throw null; } } public System.Collections.Generic.IReadOnlyList ResourceProviderDetails { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EdgeOrder.Models.ProductFamily 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.EdgeOrder.Models.ProductFamily System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1070,6 +1108,7 @@ internal ProductLine() { } public Azure.ResourceManager.EdgeOrder.Models.HierarchyInformation HierarchyInformation { get { throw null; } } public System.Collections.Generic.IReadOnlyList ImageInformation { get { throw null; } } public System.Collections.Generic.IReadOnlyList Products { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EdgeOrder.Models.ProductLine 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.EdgeOrder.Models.ProductLine System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1081,6 +1120,7 @@ public partial class ProductLink : 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.EdgeOrder.Models.ProductLink System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1114,6 +1154,7 @@ public partial class ProductSpecification : System.ClientModel.Primitives.IJsonM internal ProductSpecification() { } public string Name { get { throw null; } } public string Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EdgeOrder.Models.ProductSpecification 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.EdgeOrder.Models.ProductSpecification System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1144,6 +1185,7 @@ internal PurchaseMeterDetails() { } public string ProductId { get { throw null; } } public string SkuId { get { throw null; } } public string TermId { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EdgeOrder.Models.PurchaseMeterDetails 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.EdgeOrder.Models.PurchaseMeterDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1154,6 +1196,7 @@ public partial class ResourceProviderDetails : System.ClientModel.Primitives.IJs { internal ResourceProviderDetails() { } public string ResourceProviderNamespace { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EdgeOrder.Models.ResourceProviderDetails 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.EdgeOrder.Models.ResourceProviderDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1168,6 +1211,7 @@ internal ReverseShippingDetails() { } public string SasKeyForLabel { get { throw null; } } public string TrackingId { get { throw null; } } public System.Uri TrackingUri { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EdgeOrder.Models.ReverseShippingDetails 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.EdgeOrder.Models.ReverseShippingDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/assets.json b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/assets.json index 85a018e4b22d..98925aea8e0f 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/assets.json +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/edgeorder/Azure.ResourceManager.EdgeOrder", - "Tag": "net/edgeorder/Azure.ResourceManager.EdgeOrder_c727fcd3ee" + "Tag": "net/edgeorder/Azure.ResourceManager.EdgeOrder_23af777640" } diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/EdgeOrderAddressData.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/EdgeOrderAddressData.Serialization.cs index d5939f3e468f..dfee310fcc35 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/EdgeOrderAddressData.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/EdgeOrderAddressData.Serialization.cs @@ -20,6 +20,15 @@ public partial class EdgeOrderAddressData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,40 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(EdgeOrderAddressData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(ShippingAddress)) @@ -76,22 +52,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr writer.WriteStringValue(AddressValidationStatus.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } EdgeOrderAddressData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/EdgeOrderData.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/EdgeOrderData.Serialization.cs index f3461441cd5f..2ed21df79d09 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/EdgeOrderData.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/EdgeOrderData.Serialization.cs @@ -20,6 +20,15 @@ public partial class EdgeOrderData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt throw new FormatException($"The model {nameof(EdgeOrderData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(OrderItemIds)) @@ -81,22 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } EdgeOrderData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/EdgeOrderItemData.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/EdgeOrderItemData.Serialization.cs index 6f44d1fe2d9e..0f5f30602be9 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/EdgeOrderItemData.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/EdgeOrderItemData.Serialization.cs @@ -20,6 +20,15 @@ public partial class EdgeOrderItemData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,40 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(EdgeOrderItemData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); writer.WritePropertyName("orderItemDetails"u8); @@ -75,22 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite writer.WritePropertyName("orderId"u8); writer.WriteStringValue(OrderId); writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } EdgeOrderItemData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/AddressResourceList.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/AddressResourceList.Serialization.cs index 2792ed4927d1..8568146761cb 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/AddressResourceList.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/AddressResourceList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class AddressResourceList : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(AddressResourceList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } AddressResourceList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ConfigurationFilters.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ConfigurationFilters.Serialization.cs index ad0c3d837a2a..4d1179c90cfc 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ConfigurationFilters.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ConfigurationFilters.Serialization.cs @@ -18,6 +18,15 @@ public partial class ConfigurationFilters : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(ConfigurationFilters)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("hierarchyInformation"u8); writer.WriteObjectValue(HierarchyInformation, options); if (Optional.IsCollectionDefined(FilterableProperty)) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } ConfigurationFilters IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ConfigurationsContent.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ConfigurationsContent.Serialization.cs index 24f9e83b0da0..39055ed80576 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ConfigurationsContent.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ConfigurationsContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class ConfigurationsContent : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(ConfigurationsContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("configurationFilters"u8); writer.WriteStartArray(); foreach (var item in ConfigurationFilters) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } ConfigurationsContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/CustomerSubscriptionDetails.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/CustomerSubscriptionDetails.Serialization.cs index 2c57d9c8c1af..3b2a62f9f2c8 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/CustomerSubscriptionDetails.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/CustomerSubscriptionDetails.Serialization.cs @@ -18,6 +18,15 @@ public partial class CustomerSubscriptionDetails : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(CustomerSubscriptionDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(RegisteredFeatures)) { writer.WritePropertyName("registeredFeatures"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } CustomerSubscriptionDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/CustomerSubscriptionRegisteredFeatures.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/CustomerSubscriptionRegisteredFeatures.Serialization.cs index 3a9568f925a7..70cef59318ad 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/CustomerSubscriptionRegisteredFeatures.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/CustomerSubscriptionRegisteredFeatures.Serialization.cs @@ -18,6 +18,15 @@ public partial class CustomerSubscriptionRegisteredFeatures : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(CustomerSubscriptionRegisteredFeatures)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } CustomerSubscriptionRegisteredFeatures IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderAddressContactDetails.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderAddressContactDetails.Serialization.cs index 86adf41eb352..e27767e8f87e 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderAddressContactDetails.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderAddressContactDetails.Serialization.cs @@ -18,6 +18,15 @@ public partial class EdgeOrderAddressContactDetails : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(EdgeOrderAddressContactDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("contactName"u8); writer.WriteStringValue(ContactName); writer.WritePropertyName("phone"u8); @@ -62,7 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } EdgeOrderAddressContactDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderAddressPatch.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderAddressPatch.Serialization.cs index 3f0a7d41efaf..ab32b0a6e995 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderAddressPatch.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderAddressPatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class EdgeOrderAddressPatch : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(EdgeOrderAddressPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -65,7 +73,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } EdgeOrderAddressPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderItemAddressDetails.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderItemAddressDetails.Serialization.cs index 815d9c77e362..88f63916cd81 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderItemAddressDetails.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderItemAddressDetails.Serialization.cs @@ -18,6 +18,15 @@ public partial class EdgeOrderItemAddressDetails : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(EdgeOrderItemAddressDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("forwardAddress"u8); writer.WriteObjectValue(ForwardAddress, options); if (options.Format != "W" && Optional.IsDefined(ReturnAddress)) @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } EdgeOrderItemAddressDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderItemAddressProperties.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderItemAddressProperties.Serialization.cs index 99834375b557..5ee6397eae77 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderItemAddressProperties.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderItemAddressProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class EdgeOrderItemAddressProperties : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(EdgeOrderItemAddressProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ShippingAddress)) { writer.WritePropertyName("shippingAddress"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } EdgeOrderItemAddressProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderItemCancellationReason.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderItemCancellationReason.Serialization.cs index 16572cfbaf6d..20f2a8b71795 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderItemCancellationReason.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderItemCancellationReason.Serialization.cs @@ -18,6 +18,15 @@ public partial class EdgeOrderItemCancellationReason : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(EdgeOrderItemCancellationReason)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("reason"u8); writer.WriteStringValue(Reason); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } EdgeOrderItemCancellationReason IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderItemDetails.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderItemDetails.Serialization.cs index 04fa99f25922..c483e0eef163 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderItemDetails.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderItemDetails.Serialization.cs @@ -18,6 +18,15 @@ public partial class EdgeOrderItemDetails : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(EdgeOrderItemDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("productDetails"u8); writer.WriteObjectValue(ProductDetails, options); writer.WritePropertyName("orderItemType"u8); @@ -130,7 +138,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } EdgeOrderItemDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderItemPatch.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderItemPatch.Serialization.cs index b53b0b4f1dbc..4911f6c5f289 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderItemPatch.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderItemPatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class EdgeOrderItemPatch : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(EdgeOrderItemPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -75,7 +83,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } EdgeOrderItemPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderItemReturnContent.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderItemReturnContent.Serialization.cs index 14fc92dff5a5..dd35acef35d5 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderItemReturnContent.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderItemReturnContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class EdgeOrderItemReturnContent : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(EdgeOrderItemReturnContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ReturnAddress)) { writer.WritePropertyName("returnAddress"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } EdgeOrderItemReturnContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderProduct.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderProduct.Serialization.cs index 810fd559a33f..c79c71f63486 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderProduct.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderProduct.Serialization.cs @@ -18,6 +18,15 @@ public partial class EdgeOrderProduct : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(EdgeOrderProduct)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(DisplayName)) @@ -99,7 +107,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } EdgeOrderProduct IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderProductBillingMeterDetails.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderProductBillingMeterDetails.Serialization.cs index 6957c5d2dd5e..c408ba06fb68 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderProductBillingMeterDetails.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderProductBillingMeterDetails.Serialization.cs @@ -18,6 +18,15 @@ public partial class EdgeOrderProductBillingMeterDetails : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(EdgeOrderProductBillingMeterDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } EdgeOrderProductBillingMeterDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderProductCostInformation.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderProductCostInformation.Serialization.cs index bfe8547017c8..3ba96037093c 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderProductCostInformation.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderProductCostInformation.Serialization.cs @@ -18,6 +18,15 @@ public partial class EdgeOrderProductCostInformation : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(EdgeOrderProductCostInformation)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(BillingMeterDetails)) { writer.WritePropertyName("billingMeterDetails"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } EdgeOrderProductCostInformation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderProductDeviceDetails.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderProductDeviceDetails.Serialization.cs index a55177542b46..7b64f830ad5a 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderProductDeviceDetails.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderProductDeviceDetails.Serialization.cs @@ -18,6 +18,15 @@ public partial class EdgeOrderProductDeviceDetails : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(EdgeOrderProductDeviceDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(SerialNumber)) { writer.WritePropertyName("serialNumber"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } EdgeOrderProductDeviceDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderProductImageInformation.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderProductImageInformation.Serialization.cs index 6ddd9ca74d2f..bcb40618c6ec 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderProductImageInformation.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderProductImageInformation.Serialization.cs @@ -18,6 +18,15 @@ public partial class EdgeOrderProductImageInformation : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(EdgeOrderProductImageInformation)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ImageType)) { writer.WritePropertyName("imageType"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } EdgeOrderProductImageInformation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderProductMeterDetails.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderProductMeterDetails.Serialization.cs index 0a149df7d85c..47fd03ed1f4c 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderProductMeterDetails.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderProductMeterDetails.Serialization.cs @@ -18,6 +18,15 @@ public partial class EdgeOrderProductMeterDetails : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(EdgeOrderProductMeterDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("billingType"u8); writer.WriteStringValue(BillingType.ToString()); if (options.Format != "W" && Optional.IsDefined(Multiplier)) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } EdgeOrderProductMeterDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderShippingAddress.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderShippingAddress.Serialization.cs index a8a28f15f59c..72f2cf49407c 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderShippingAddress.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderShippingAddress.Serialization.cs @@ -18,6 +18,15 @@ public partial class EdgeOrderShippingAddress : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(EdgeOrderShippingAddress)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("streetAddress1"u8); writer.WriteStringValue(StreetAddress1); if (Optional.IsDefined(StreetAddress2)) @@ -85,7 +93,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } EdgeOrderShippingAddress IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderStageDetails.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderStageDetails.Serialization.cs index 8d7e1a90c976..1e94e537ec59 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderStageDetails.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderStageDetails.Serialization.cs @@ -18,6 +18,15 @@ public partial class EdgeOrderStageDetails : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(EdgeOrderStageDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(StageStatus)) { writer.WritePropertyName("stageStatus"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } EdgeOrderStageDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EncryptionPreferences.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EncryptionPreferences.Serialization.cs index 26b856d007ea..fef1f9828d88 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EncryptionPreferences.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EncryptionPreferences.Serialization.cs @@ -18,6 +18,15 @@ internal partial class EncryptionPreferences : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(EncryptionPreferences)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(DoubleEncryptionStatus)) { writer.WritePropertyName("doubleEncryptionStatus"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } EncryptionPreferences IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/FilterableProperty.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/FilterableProperty.Serialization.cs index a845ec5746e5..458867de58bc 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/FilterableProperty.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/FilterableProperty.Serialization.cs @@ -18,6 +18,15 @@ public partial class FilterableProperty : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(FilterableProperty)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("type"u8); writer.WriteStringValue(SupportedFilterType.ToString()); writer.WritePropertyName("supportedValues"u8); @@ -50,7 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } FilterableProperty IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ForwardShippingDetails.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ForwardShippingDetails.Serialization.cs index 3a34f478b2c1..bd5bb1a1bbe5 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ForwardShippingDetails.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ForwardShippingDetails.Serialization.cs @@ -18,6 +18,15 @@ public partial class ForwardShippingDetails : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(ForwardShippingDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(CarrierName)) { writer.WritePropertyName("carrierName"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } ForwardShippingDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/HierarchyInformation.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/HierarchyInformation.Serialization.cs index 1a5561aa953d..65f85dc2c361 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/HierarchyInformation.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/HierarchyInformation.Serialization.cs @@ -18,6 +18,15 @@ public partial class HierarchyInformation : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(HierarchyInformation)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ProductFamilyName)) { writer.WritePropertyName("productFamilyName"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } HierarchyInformation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ManagementResourcePreferences.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ManagementResourcePreferences.Serialization.cs index 2c7f68fbb38d..782f85ba04ea 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ManagementResourcePreferences.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ManagementResourcePreferences.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ManagementResourcePreferences : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(ManagementResourcePreferences)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(PreferredManagementResourceId)) { writer.WritePropertyName("preferredManagementResourceId"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } ManagementResourcePreferences IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/NotificationPreference.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/NotificationPreference.Serialization.cs index a0af0bef2be1..45b68cbdca23 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/NotificationPreference.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/NotificationPreference.Serialization.cs @@ -18,6 +18,15 @@ public partial class NotificationPreference : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(NotificationPreference)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("stageName"u8); writer.WriteStringValue(StageName.ToString()); writer.WritePropertyName("sendNotification"u8); @@ -45,7 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } NotificationPreference IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/OrderItemPreferences.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/OrderItemPreferences.Serialization.cs index f83d8056daf2..79bf4917fe3c 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/OrderItemPreferences.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/OrderItemPreferences.Serialization.cs @@ -18,6 +18,15 @@ public partial class OrderItemPreferences : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(OrderItemPreferences)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(NotificationPreferences)) { writer.WritePropertyName("notificationPreferences"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } OrderItemPreferences IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/OrderItemResourceList.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/OrderItemResourceList.Serialization.cs index 60ff9ad0cc27..64149d1f48ed 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/OrderItemResourceList.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/OrderItemResourceList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class OrderItemResourceList : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(OrderItemResourceList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } OrderItemResourceList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/OrderResourceList.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/OrderResourceList.Serialization.cs index 05e224e748f4..b138d94026ea 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/OrderResourceList.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/OrderResourceList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class OrderResourceList : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(OrderResourceList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } OrderResourceList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/Pav2MeterDetails.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/Pav2MeterDetails.Serialization.cs index b39704a0cf4d..d42d2a5b37e5 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/Pav2MeterDetails.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/Pav2MeterDetails.Serialization.cs @@ -18,6 +18,15 @@ public partial class Pav2MeterDetails : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,40 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(Pav2MeterDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(MeterGuid)) { writer.WritePropertyName("meterGuid"u8); writer.WriteStringValue(MeterGuid.Value); } - writer.WritePropertyName("billingType"u8); - writer.WriteStringValue(BillingType.ToString()); - if (options.Format != "W" && Optional.IsDefined(Multiplier)) - { - writer.WritePropertyName("multiplier"u8); - writer.WriteNumberValue(Multiplier.Value); - } - if (options.Format != "W" && Optional.IsDefined(ChargingType)) - { - writer.WritePropertyName("chargingType"u8); - writer.WriteStringValue(ChargingType.Value.ToString()); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } Pav2MeterDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductAvailabilityInformation.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductAvailabilityInformation.Serialization.cs index 246d61c21874..837bac6ca06f 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductAvailabilityInformation.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductAvailabilityInformation.Serialization.cs @@ -18,6 +18,15 @@ public partial class ProductAvailabilityInformation : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(ProductAvailabilityInformation)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(AvailabilityStage)) { writer.WritePropertyName("availabilityStage"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } ProductAvailabilityInformation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductConfiguration.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductConfiguration.Serialization.cs index 0f2da63a722e..45745b0102f3 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductConfiguration.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class ProductConfiguration : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(ProductConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(DisplayName)) @@ -104,7 +112,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } ProductConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductConfigurations.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductConfigurations.Serialization.cs index fbd229418715..0494bff3f2ac 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductConfigurations.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductConfigurations.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ProductConfigurations : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(ProductConfigurations)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } ProductConfigurations IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductDescription.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductDescription.Serialization.cs index 5e6859a08688..c2c669a5aed3 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductDescription.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductDescription.Serialization.cs @@ -18,6 +18,15 @@ public partial class ProductDescription : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ProductDescription)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(DescriptionType)) { writer.WritePropertyName("descriptionType"u8); @@ -86,7 +94,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } ProductDescription IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductDetails.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductDetails.Serialization.cs index 67f1bbf5e3ae..4e74a2dfc7b2 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductDetails.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductDetails.Serialization.cs @@ -18,6 +18,15 @@ public partial class ProductDetails : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(ProductDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(DisplayInfo)) { writer.WritePropertyName("displayInfo"u8); @@ -68,7 +76,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp #endif } } - writer.WriteEndObject(); } ProductDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductDimensions.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductDimensions.Serialization.cs index e5ac4cd1d711..6973755d3df2 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductDimensions.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductDimensions.Serialization.cs @@ -18,6 +18,15 @@ public partial class ProductDimensions : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(ProductDimensions)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Length)) { writer.WritePropertyName("length"u8); @@ -76,7 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } ProductDimensions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductDisplayInfo.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductDisplayInfo.Serialization.cs index 68133ec8fa23..f9a558fe2092 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductDisplayInfo.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductDisplayInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class ProductDisplayInfo : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ProductDisplayInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProductFamilyDisplayName)) { writer.WritePropertyName("productFamilyDisplayName"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } ProductDisplayInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductFamilies.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductFamilies.Serialization.cs index 0bbb417bf7c0..6792e6361cb7 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductFamilies.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductFamilies.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ProductFamilies : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(ProductFamilies)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO #endif } } - writer.WriteEndObject(); } ProductFamilies IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductFamiliesContent.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductFamiliesContent.Serialization.cs index 68503b8079e0..dd72e35fb630 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductFamiliesContent.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductFamiliesContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class ProductFamiliesContent : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(ProductFamiliesContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("filterableProperties"u8); writer.WriteStartObject(); foreach (var item in FilterableProperties) @@ -64,7 +72,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } ProductFamiliesContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductFamiliesMetadata.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductFamiliesMetadata.Serialization.cs index 3f0cd2c907f9..3961953bec7b 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductFamiliesMetadata.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductFamiliesMetadata.Serialization.cs @@ -18,6 +18,15 @@ public partial class ProductFamiliesMetadata : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(ProductFamiliesMetadata)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(DisplayName)) @@ -109,7 +117,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } ProductFamiliesMetadata IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductFamiliesMetadataListResult.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductFamiliesMetadataListResult.Serialization.cs index 242dc50077bb..824dc924623a 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductFamiliesMetadataListResult.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductFamiliesMetadataListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ProductFamiliesMetadataListResult : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(ProductFamiliesMetadataListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } ProductFamiliesMetadataListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductFamily.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductFamily.Serialization.cs index 4a3018ac818d..c21a1bdcfab4 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductFamily.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductFamily.Serialization.cs @@ -18,6 +18,15 @@ public partial class ProductFamily : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt throw new FormatException($"The model {nameof(ProductFamily)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(DisplayName)) @@ -109,7 +117,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt #endif } } - writer.WriteEndObject(); } ProductFamily IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductLine.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductLine.Serialization.cs index 91b48aa2439f..79a4167a0cc0 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductLine.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductLine.Serialization.cs @@ -18,6 +18,15 @@ public partial class ProductLine : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio throw new FormatException($"The model {nameof(ProductLine)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(DisplayName)) @@ -99,7 +107,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio #endif } } - writer.WriteEndObject(); } ProductLine IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductLink.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductLink.Serialization.cs index ec5a86794baf..f87ce89d6833 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductLink.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductLink.Serialization.cs @@ -18,6 +18,15 @@ public partial class ProductLink : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio throw new FormatException($"The model {nameof(ProductLink)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(LinkType)) { writer.WritePropertyName("linkType"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio #endif } } - writer.WriteEndObject(); } ProductLink IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductSpecification.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductSpecification.Serialization.cs index 3a4f757a1847..35e8c9989d7c 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductSpecification.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductSpecification.Serialization.cs @@ -18,6 +18,15 @@ public partial class ProductSpecification : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(ProductSpecification)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } ProductSpecification IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/PurchaseMeterDetails.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/PurchaseMeterDetails.Serialization.cs index 6494412c6088..a38ea836f2ee 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/PurchaseMeterDetails.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/PurchaseMeterDetails.Serialization.cs @@ -18,6 +18,15 @@ public partial class PurchaseMeterDetails : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(PurchaseMeterDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ProductId)) { writer.WritePropertyName("productId"u8); @@ -41,34 +50,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr writer.WritePropertyName("termId"u8); writer.WriteStringValue(TermId); } - writer.WritePropertyName("billingType"u8); - writer.WriteStringValue(BillingType.ToString()); - if (options.Format != "W" && Optional.IsDefined(Multiplier)) - { - writer.WritePropertyName("multiplier"u8); - writer.WriteNumberValue(Multiplier.Value); - } - if (options.Format != "W" && Optional.IsDefined(ChargingType)) - { - writer.WritePropertyName("chargingType"u8); - writer.WriteStringValue(ChargingType.Value.ToString()); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } PurchaseMeterDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ResourceProviderDetails.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ResourceProviderDetails.Serialization.cs index b2b9246e83b5..d36c11a5fe15 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ResourceProviderDetails.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ResourceProviderDetails.Serialization.cs @@ -18,6 +18,15 @@ public partial class ResourceProviderDetails : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(ResourceProviderDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ResourceProviderNamespace)) { writer.WritePropertyName("resourceProviderNamespace"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } ResourceProviderDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ReverseShippingDetails.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ReverseShippingDetails.Serialization.cs index c9f4c4f18ba1..abbb59e0c0ba 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ReverseShippingDetails.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ReverseShippingDetails.Serialization.cs @@ -18,6 +18,15 @@ public partial class ReverseShippingDetails : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(ReverseShippingDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(SasKeyForLabel)) { writer.WritePropertyName("sasKeyForLabel"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } ReverseShippingDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/TransportPreferences.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/TransportPreferences.Serialization.cs index 4ff669cd74dd..ccda9e25b68d 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/TransportPreferences.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/TransportPreferences.Serialization.cs @@ -18,6 +18,15 @@ internal partial class TransportPreferences : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(TransportPreferences)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("preferredShipmentType"u8); writer.WriteStringValue(PreferredShipmentType.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } TransportPreferences IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/UnknownMeterDetails.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/UnknownMeterDetails.Serialization.cs index 9a34125fc7c3..16873849a01f 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/UnknownMeterDetails.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/UnknownMeterDetails.Serialization.cs @@ -18,6 +18,15 @@ internal partial class UnknownMeterDetails : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,35 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(EdgeOrderProductMeterDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("billingType"u8); - writer.WriteStringValue(BillingType.ToString()); - if (options.Format != "W" && Optional.IsDefined(Multiplier)) - { - writer.WritePropertyName("multiplier"u8); - writer.WriteNumberValue(Multiplier.Value); - } - if (options.Format != "W" && Optional.IsDefined(ChargingType)) - { - writer.WritePropertyName("chargingType"u8); - writer.WriteStringValue(ChargingType.Value.ToString()); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } EdgeOrderProductMeterDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/autorest.md b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/autorest.md index ce5764286e24..cf42d91c5a3f 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/autorest.md +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/autorest.md @@ -18,6 +18,7 @@ skip-csproj: true modelerfour: flatten-payloads: false use-model-reader-writer: true +use-write-core: true list-exception: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/locations/{location}/orders/{orderName} diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/CHANGELOG.md b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/CHANGELOG.md index 69bbae2cf608..8f8a5b6e0c3c 100644 --- a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/CHANGELOG.md +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 1.2.0-beta.1 (Unreleased) +## 1.2.0-beta.2 (Unreleased) ### Features Added @@ -10,6 +10,13 @@ ### Other Changes +## 1.2.0-beta.1 (2024-10-21) + +### Features Added + +- Upgraded api-version tag from 'package-2024-05' to 'package-preview-2024-06'. Tag detail available at https://github.com/Azure/azure-rest-api-specs/blob/9a8af2acfafc4d7a23eff41b859d2d332f51b0bc/specification/elasticsan/resource-manager/readme.md. + - Supported auto scale policy for ElasticSan. + ## 1.1.0 (2024-09-27) ### Features Added diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/api/Azure.ResourceManager.ElasticSan.netstandard2.0.cs b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/api/Azure.ResourceManager.ElasticSan.netstandard2.0.cs index 3d0fe46719d7..a88bc4acd4c3 100644 --- a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/api/Azure.ResourceManager.ElasticSan.netstandard2.0.cs +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/api/Azure.ResourceManager.ElasticSan.netstandard2.0.cs @@ -26,6 +26,7 @@ public ElasticSanData(Azure.Core.AzureLocation location, Azure.ResourceManager.E public System.Collections.Generic.IReadOnlyList PrivateEndpointConnections { get { throw null; } } public Azure.ResourceManager.ElasticSan.Models.ElasticSanProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.ElasticSan.Models.ElasticSanPublicNetworkAccess? PublicNetworkAccess { get { throw null; } set { } } + public Azure.ResourceManager.ElasticSan.Models.ScaleUpProperties ScaleUpProperties { get { throw null; } set { } } public Azure.ResourceManager.ElasticSan.Models.ElasticSanSku Sku { get { throw null; } set { } } public long? TotalIops { get { throw null; } } public long? TotalMbps { get { throw null; } } @@ -331,7 +332,9 @@ namespace Azure.ResourceManager.ElasticSan.Models { public static partial class ArmElasticSanModelFactory { - public static Azure.ResourceManager.ElasticSan.ElasticSanData ElasticSanData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.ElasticSan.Models.ElasticSanSku sku = null, System.Collections.Generic.IEnumerable availabilityZones = null, Azure.ResourceManager.ElasticSan.Models.ElasticSanProvisioningState? provisioningState = default(Azure.ResourceManager.ElasticSan.Models.ElasticSanProvisioningState?), long baseSizeTiB = (long)0, long extendedCapacitySizeTiB = (long)0, long? totalVolumeSizeGiB = default(long?), long? volumeGroupCount = default(long?), long? totalIops = default(long?), long? totalMbps = default(long?), long? totalSizeTiB = default(long?), System.Collections.Generic.IEnumerable privateEndpointConnections = null, Azure.ResourceManager.ElasticSan.Models.ElasticSanPublicNetworkAccess? publicNetworkAccess = default(Azure.ResourceManager.ElasticSan.Models.ElasticSanPublicNetworkAccess?)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.ElasticSan.ElasticSanData ElasticSanData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, Azure.ResourceManager.ElasticSan.Models.ElasticSanSku sku, System.Collections.Generic.IEnumerable availabilityZones, Azure.ResourceManager.ElasticSan.Models.ElasticSanProvisioningState? provisioningState, long baseSizeTiB, long extendedCapacitySizeTiB, long? totalVolumeSizeGiB, long? volumeGroupCount, long? totalIops, long? totalMbps, long? totalSizeTiB, System.Collections.Generic.IEnumerable privateEndpointConnections, Azure.ResourceManager.ElasticSan.Models.ElasticSanPublicNetworkAccess? publicNetworkAccess) { throw null; } + public static Azure.ResourceManager.ElasticSan.ElasticSanData ElasticSanData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.ElasticSan.Models.ElasticSanSku sku = null, System.Collections.Generic.IEnumerable availabilityZones = null, Azure.ResourceManager.ElasticSan.Models.ElasticSanProvisioningState? provisioningState = default(Azure.ResourceManager.ElasticSan.Models.ElasticSanProvisioningState?), long baseSizeTiB = (long)0, long extendedCapacitySizeTiB = (long)0, long? totalVolumeSizeGiB = default(long?), long? volumeGroupCount = default(long?), long? totalIops = default(long?), long? totalMbps = default(long?), long? totalSizeTiB = default(long?), System.Collections.Generic.IEnumerable privateEndpointConnections = null, Azure.ResourceManager.ElasticSan.Models.ElasticSanPublicNetworkAccess? publicNetworkAccess = default(Azure.ResourceManager.ElasticSan.Models.ElasticSanPublicNetworkAccess?), Azure.ResourceManager.ElasticSan.Models.ScaleUpProperties scaleUpProperties = null) { throw null; } public static Azure.ResourceManager.ElasticSan.Models.ElasticSanKeyVaultProperties ElasticSanKeyVaultProperties(string keyName = null, string keyVersion = null, System.Uri keyVaultUri = null, string currentVersionedKeyIdentifier = null, System.DateTimeOffset? lastKeyRotationTimestamp = default(System.DateTimeOffset?), System.DateTimeOffset? currentVersionedKeyExpirationTimestamp = default(System.DateTimeOffset?)) { throw null; } public static Azure.ResourceManager.ElasticSan.ElasticSanPrivateEndpointConnectionData ElasticSanPrivateEndpointConnectionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.ElasticSan.Models.ElasticSanProvisioningState? provisioningState = default(Azure.ResourceManager.ElasticSan.Models.ElasticSanProvisioningState?), Azure.Core.ResourceIdentifier privateEndpointId = null, Azure.ResourceManager.ElasticSan.Models.ElasticSanPrivateLinkServiceConnectionState connectionState = null, System.Collections.Generic.IEnumerable groupIds = null) { throw null; } public static Azure.ResourceManager.ElasticSan.Models.ElasticSanPrivateLinkResource ElasticSanPrivateLinkResource(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string groupId = null, System.Collections.Generic.IEnumerable requiredMembers = null, System.Collections.Generic.IEnumerable requiredZoneNames = null) { throw null; } @@ -345,6 +348,25 @@ public static partial class ArmElasticSanModelFactory public static Azure.ResourceManager.ElasticSan.ElasticSanVolumeGroupData ElasticSanVolumeGroupData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.ElasticSan.Models.ElasticSanProvisioningState? provisioningState = default(Azure.ResourceManager.ElasticSan.Models.ElasticSanProvisioningState?), Azure.ResourceManager.ElasticSan.Models.ElasticSanStorageTargetType? protocolType = default(Azure.ResourceManager.ElasticSan.Models.ElasticSanStorageTargetType?), Azure.ResourceManager.ElasticSan.Models.ElasticSanEncryptionType? encryption = default(Azure.ResourceManager.ElasticSan.Models.ElasticSanEncryptionType?), Azure.ResourceManager.ElasticSan.Models.ElasticSanEncryptionProperties encryptionProperties = null, System.Collections.Generic.IEnumerable virtualNetworkRules = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null, bool? enforceDataIntegrityCheckForIscsi = default(bool?)) { throw null; } public static Azure.ResourceManager.ElasticSan.Models.IscsiTargetInfo IscsiTargetInfo(string targetIqn = null, string targetPortalHostname = null, int? targetPortalPort = default(int?), Azure.ResourceManager.ElasticSan.Models.ElasticSanProvisioningState? provisioningState = default(Azure.ResourceManager.ElasticSan.Models.ElasticSanProvisioningState?), Azure.ResourceManager.ElasticSan.Models.ResourceOperationalStatus? status = default(Azure.ResourceManager.ElasticSan.Models.ResourceOperationalStatus?)) { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AutoScalePolicyEnforcement : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AutoScalePolicyEnforcement(string value) { throw null; } + public static Azure.ResourceManager.ElasticSan.Models.AutoScalePolicyEnforcement Disabled { get { throw null; } } + public static Azure.ResourceManager.ElasticSan.Models.AutoScalePolicyEnforcement Enabled { get { throw null; } } + public static Azure.ResourceManager.ElasticSan.Models.AutoScalePolicyEnforcement None { get { throw null; } } + public bool Equals(Azure.ResourceManager.ElasticSan.Models.AutoScalePolicyEnforcement other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ElasticSan.Models.AutoScalePolicyEnforcement left, Azure.ResourceManager.ElasticSan.Models.AutoScalePolicyEnforcement right) { throw null; } + public static implicit operator Azure.ResourceManager.ElasticSan.Models.AutoScalePolicyEnforcement (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ElasticSan.Models.AutoScalePolicyEnforcement left, Azure.ResourceManager.ElasticSan.Models.AutoScalePolicyEnforcement right) { throw null; } + public override string ToString() { throw null; } + } public partial class ElasticSanEncryptionProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ElasticSanEncryptionProperties() { } @@ -397,6 +419,7 @@ public ElasticSanPatch() { } public long? BaseSizeTiB { get { throw null; } set { } } public long? ExtendedCapacitySizeTiB { get { throw null; } set { } } public Azure.ResourceManager.ElasticSan.Models.ElasticSanPublicNetworkAccess? PublicNetworkAccess { get { throw null; } set { } } + public Azure.ResourceManager.ElasticSan.Models.ScaleUpProperties ScaleUpProperties { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ElasticSan.Models.ElasticSanPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -727,6 +750,20 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.ElasticSan.Models.ResourceOperationalStatus left, Azure.ResourceManager.ElasticSan.Models.ResourceOperationalStatus right) { throw null; } public override string ToString() { throw null; } } + public partial class ScaleUpProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ScaleUpProperties() { } + public Azure.ResourceManager.ElasticSan.Models.AutoScalePolicyEnforcement? AutoScalePolicyEnforcement { get { throw null; } set { } } + public long? CapacityUnitScaleUpLimitTiB { get { throw null; } set { } } + public long? IncreaseCapacityUnitByTiB { get { throw null; } set { } } + public long? UnusedSizeTiB { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ElasticSan.Models.ScaleUpProperties 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.ElasticSan.Models.ScaleUpProperties 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 partial class SnapshotCreationInfo : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public SnapshotCreationInfo(Azure.Core.ResourceIdentifier sourceId) { } diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/assets.json b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/assets.json index b9892120d476..c6e34982cba7 100644 --- a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/assets.json +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/elasticsan/Azure.ResourceManager.ElasticSan", - "Tag": "net/elasticsan/Azure.ResourceManager.ElasticSan_5c252d7ded" + "Tag": "net/elasticsan/Azure.ResourceManager.ElasticSan_578a9889d9" } diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/samples/Generated/Samples/Sample_ElasticSanCollection.cs b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/samples/Generated/Samples/Sample_ElasticSanCollection.cs index f3ba7b810e21..16761476a789 100644 --- a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/samples/Generated/Samples/Sample_ElasticSanCollection.cs +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/samples/Generated/Samples/Sample_ElasticSanCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_ElasticSanCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ElasticSansListByResourceGroupMaximumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/ElasticSans_ListByResourceGroup_MaximumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/ElasticSans_ListByResourceGroup_MaximumSet_Gen.json // this example is just showing the usage of "ElasticSans_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -57,7 +57,7 @@ public async Task GetAll_ElasticSansListByResourceGroupMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ElasticSansListByResourceGroupMinimumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/ElasticSans_ListByResourceGroup_MinimumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/ElasticSans_ListByResourceGroup_MinimumSet_Gen.json // this example is just showing the usage of "ElasticSans_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -93,7 +93,7 @@ public async Task GetAll_ElasticSansListByResourceGroupMinimumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ElasticSansCreateMaximumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/ElasticSans_Create_MaximumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/ElasticSans_Create_MaximumSet_Gen.json // this example is just showing the usage of "ElasticSans_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -116,16 +116,23 @@ public async Task CreateOrUpdate_ElasticSansCreateMaximumSetGen() ElasticSanData data = new ElasticSanData(new AzureLocation("France Central"), new ElasticSanSku(ElasticSanSkuName.PremiumLrs) { Tier = ElasticSanSkuTier.Premium, - }, 5, 25) + }, 1L, 3L) { AvailabilityZones = { -"1" +"xoz" }, PublicNetworkAccess = ElasticSanPublicNetworkAccess.Enabled, + ScaleUpProperties = new ScaleUpProperties() + { + UnusedSizeTiB = 24L, + IncreaseCapacityUnitByTiB = 4L, + CapacityUnitScaleUpLimitTiB = 17L, + AutoScalePolicyEnforcement = AutoScalePolicyEnforcement.None, + }, Tags = { -["key9316"] = "ihndtieqibtob", +["key9706"] = "haitqqakcntcpalkzqmjmcnifnhd", }, }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, elasticSanName, data); @@ -143,7 +150,7 @@ public async Task CreateOrUpdate_ElasticSansCreateMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ElasticSansCreateMinimumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/ElasticSans_Create_MinimumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/ElasticSans_Create_MinimumSet_Gen.json // this example is just showing the usage of "ElasticSans_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -163,7 +170,7 @@ public async Task CreateOrUpdate_ElasticSansCreateMinimumSetGen() // invoke the operation string elasticSanName = "elasticsanname"; - ElasticSanData data = new ElasticSanData(new AzureLocation("France Central"), new ElasticSanSku(ElasticSanSkuName.PremiumLrs), 15, 27); + ElasticSanData data = new ElasticSanData(new AzureLocation("France Central"), new ElasticSanSku(ElasticSanSkuName.PremiumLrs), 1L, 3L); ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, elasticSanName, data); ElasticSanResource result = lro.Value; @@ -179,7 +186,7 @@ public async Task CreateOrUpdate_ElasticSansCreateMinimumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ElasticSansGetMaximumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/ElasticSans_Get_MaximumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/ElasticSans_Get_MaximumSet_Gen.json // this example is just showing the usage of "ElasticSans_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -213,7 +220,7 @@ public async Task Get_ElasticSansGetMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ElasticSansGetMaximumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/ElasticSans_Get_MaximumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/ElasticSans_Get_MaximumSet_Gen.json // this example is just showing the usage of "ElasticSans_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -243,7 +250,7 @@ public async Task Exists_ElasticSansGetMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ElasticSansGetMaximumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/ElasticSans_Get_MaximumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/ElasticSans_Get_MaximumSet_Gen.json // this example is just showing the usage of "ElasticSans_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -285,7 +292,7 @@ public async Task GetIfExists_ElasticSansGetMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ElasticSansGetMinimumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/ElasticSans_Get_MinimumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/ElasticSans_Get_MinimumSet_Gen.json // this example is just showing the usage of "ElasticSans_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -319,7 +326,7 @@ public async Task Get_ElasticSansGetMinimumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ElasticSansGetMinimumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/ElasticSans_Get_MinimumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/ElasticSans_Get_MinimumSet_Gen.json // this example is just showing the usage of "ElasticSans_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -349,7 +356,7 @@ public async Task Exists_ElasticSansGetMinimumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ElasticSansGetMinimumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/ElasticSans_Get_MinimumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/ElasticSans_Get_MinimumSet_Gen.json // this example is just showing the usage of "ElasticSans_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/samples/Generated/Samples/Sample_ElasticSanPrivateEndpointConnectionCollection.cs b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/samples/Generated/Samples/Sample_ElasticSanPrivateEndpointConnectionCollection.cs index 95002714166a..c1ea895e01a3 100644 --- a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/samples/Generated/Samples/Sample_ElasticSanPrivateEndpointConnectionCollection.cs +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/samples/Generated/Samples/Sample_ElasticSanPrivateEndpointConnectionCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ElasticSanPrivateEndpointConnectionCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_PrivateEndpointConnectionsCreateMaximumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/PrivateEndpointConnections_Create_MaximumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/PrivateEndpointConnections_Create_MaximumSet_Gen.json // this example is just showing the usage of "PrivateEndpointConnections_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -68,7 +68,7 @@ public async Task CreateOrUpdate_PrivateEndpointConnectionsCreateMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_PrivateEndpointConnectionsCreateMinimumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/PrivateEndpointConnections_Create_MinimumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/PrivateEndpointConnections_Create_MinimumSet_Gen.json // this example is just showing the usage of "PrivateEndpointConnections_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -105,7 +105,7 @@ public async Task CreateOrUpdate_PrivateEndpointConnectionsCreateMinimumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_PrivateEndpointConnectionsGetMaximumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/PrivateEndpointConnections_Get_MaximumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/PrivateEndpointConnections_Get_MaximumSet_Gen.json // this example is just showing the usage of "PrivateEndpointConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -140,7 +140,7 @@ public async Task Get_PrivateEndpointConnectionsGetMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_PrivateEndpointConnectionsGetMaximumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/PrivateEndpointConnections_Get_MaximumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/PrivateEndpointConnections_Get_MaximumSet_Gen.json // this example is just showing the usage of "PrivateEndpointConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -171,7 +171,7 @@ public async Task Exists_PrivateEndpointConnectionsGetMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_PrivateEndpointConnectionsGetMaximumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/PrivateEndpointConnections_Get_MaximumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/PrivateEndpointConnections_Get_MaximumSet_Gen.json // this example is just showing the usage of "PrivateEndpointConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -214,7 +214,7 @@ public async Task GetIfExists_PrivateEndpointConnectionsGetMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_PrivateEndpointConnectionsGetMinimumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/PrivateEndpointConnections_Get_MinimumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/PrivateEndpointConnections_Get_MinimumSet_Gen.json // this example is just showing the usage of "PrivateEndpointConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -249,7 +249,7 @@ public async Task Get_PrivateEndpointConnectionsGetMinimumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_PrivateEndpointConnectionsGetMinimumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/PrivateEndpointConnections_Get_MinimumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/PrivateEndpointConnections_Get_MinimumSet_Gen.json // this example is just showing the usage of "PrivateEndpointConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -280,7 +280,7 @@ public async Task Exists_PrivateEndpointConnectionsGetMinimumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_PrivateEndpointConnectionsGetMinimumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/PrivateEndpointConnections_Get_MinimumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/PrivateEndpointConnections_Get_MinimumSet_Gen.json // this example is just showing the usage of "PrivateEndpointConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -323,7 +323,7 @@ public async Task GetIfExists_PrivateEndpointConnectionsGetMinimumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_PrivateEndpointConnectionsListMaximumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/PrivateEndpointConnections_List_MaximumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/PrivateEndpointConnections_List_MaximumSet_Gen.json // this example is just showing the usage of "PrivateEndpointConnections_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -360,7 +360,7 @@ public async Task GetAll_PrivateEndpointConnectionsListMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_PrivateEndpointConnectionsListMinimumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/PrivateEndpointConnections_List_MinimumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/PrivateEndpointConnections_List_MinimumSet_Gen.json // this example is just showing the usage of "PrivateEndpointConnections_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/samples/Generated/Samples/Sample_ElasticSanPrivateEndpointConnectionResource.cs b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/samples/Generated/Samples/Sample_ElasticSanPrivateEndpointConnectionResource.cs index 354cd17644b7..54a57fa1ebc7 100644 --- a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/samples/Generated/Samples/Sample_ElasticSanPrivateEndpointConnectionResource.cs +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/samples/Generated/Samples/Sample_ElasticSanPrivateEndpointConnectionResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ElasticSanPrivateEndpointConnectionResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_PrivateEndpointConnectionsCreateMaximumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/PrivateEndpointConnections_Create_MaximumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/PrivateEndpointConnections_Create_MaximumSet_Gen.json // this example is just showing the usage of "PrivateEndpointConnections_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -65,7 +65,7 @@ public async Task Update_PrivateEndpointConnectionsCreateMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_PrivateEndpointConnectionsCreateMinimumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/PrivateEndpointConnections_Create_MinimumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/PrivateEndpointConnections_Create_MinimumSet_Gen.json // this example is just showing the usage of "PrivateEndpointConnections_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -99,7 +99,7 @@ public async Task Update_PrivateEndpointConnectionsCreateMinimumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_PrivateEndpointConnectionsGetMaximumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/PrivateEndpointConnections_Get_MaximumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/PrivateEndpointConnections_Get_MaximumSet_Gen.json // this example is just showing the usage of "PrivateEndpointConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -131,7 +131,7 @@ public async Task Get_PrivateEndpointConnectionsGetMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_PrivateEndpointConnectionsGetMinimumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/PrivateEndpointConnections_Get_MinimumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/PrivateEndpointConnections_Get_MinimumSet_Gen.json // this example is just showing the usage of "PrivateEndpointConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -163,7 +163,7 @@ public async Task Get_PrivateEndpointConnectionsGetMinimumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_PrivateEndpointConnectionsDeleteMaximumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/PrivateEndpointConnections_Delete_MaximumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/PrivateEndpointConnections_Delete_MaximumSet_Gen.json // this example is just showing the usage of "PrivateEndpointConnections_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -191,7 +191,7 @@ public async Task Delete_PrivateEndpointConnectionsDeleteMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_PrivateEndpointConnectionsDeleteMinimumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/PrivateEndpointConnections_Delete_MinimumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/PrivateEndpointConnections_Delete_MinimumSet_Gen.json // this example is just showing the usage of "PrivateEndpointConnections_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/samples/Generated/Samples/Sample_ElasticSanResource.cs b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/samples/Generated/Samples/Sample_ElasticSanResource.cs index 2a712934c8a5..bc81b8f74c0f 100644 --- a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/samples/Generated/Samples/Sample_ElasticSanResource.cs +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/samples/Generated/Samples/Sample_ElasticSanResource.cs @@ -21,7 +21,7 @@ public partial class Sample_ElasticSanResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetElasticSans_ElasticSansListBySubscriptionMaximumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/ElasticSans_ListBySubscription_MaximumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/ElasticSans_ListBySubscription_MaximumSet_Gen.json // this example is just showing the usage of "ElasticSans_ListBySubscription" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -53,7 +53,7 @@ public async Task GetElasticSans_ElasticSansListBySubscriptionMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetElasticSans_ElasticSansListBySubscriptionMinimumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/ElasticSans_ListBySubscription_MinimumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/ElasticSans_ListBySubscription_MinimumSet_Gen.json // this example is just showing the usage of "ElasticSans_ListBySubscription" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -85,7 +85,7 @@ public async Task GetElasticSans_ElasticSansListBySubscriptionMinimumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ElasticSansUpdateMaximumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/ElasticSans_Update_MaximumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/ElasticSans_Update_MaximumSet_Gen.json // this example is just showing the usage of "ElasticSans_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -106,11 +106,18 @@ public async Task Update_ElasticSansUpdateMaximumSetGen() { Tags = { -["key1931"] = "yhjwkgmrrwrcoxblgwgzjqusch", +["key5945"] = "eufqmxresekerilkgvfzddolxzas", }, - BaseSizeTiB = 13, - ExtendedCapacitySizeTiB = 29, + BaseSizeTiB = 21L, + ExtendedCapacitySizeTiB = 10L, PublicNetworkAccess = ElasticSanPublicNetworkAccess.Enabled, + ScaleUpProperties = new ScaleUpProperties() + { + UnusedSizeTiB = 24L, + IncreaseCapacityUnitByTiB = 4L, + CapacityUnitScaleUpLimitTiB = 17L, + AutoScalePolicyEnforcement = AutoScalePolicyEnforcement.None, + }, }; ArmOperation lro = await elasticSan.UpdateAsync(WaitUntil.Completed, patch); ElasticSanResource result = lro.Value; @@ -127,7 +134,7 @@ public async Task Update_ElasticSansUpdateMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ElasticSansUpdateMinimumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/ElasticSans_Update_MinimumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/ElasticSans_Update_MinimumSet_Gen.json // this example is just showing the usage of "ElasticSans_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -160,7 +167,7 @@ public async Task Update_ElasticSansUpdateMinimumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_ElasticSansDeleteMaximumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/ElasticSans_Delete_MaximumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/ElasticSans_Delete_MaximumSet_Gen.json // this example is just showing the usage of "ElasticSans_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -187,7 +194,7 @@ public async Task Delete_ElasticSansDeleteMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_ElasticSansDeleteMinimumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/ElasticSans_Delete_MinimumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/ElasticSans_Delete_MinimumSet_Gen.json // this example is just showing the usage of "ElasticSans_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -214,7 +221,7 @@ public async Task Delete_ElasticSansDeleteMinimumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ElasticSansGetMaximumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/ElasticSans_Get_MaximumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/ElasticSans_Get_MaximumSet_Gen.json // this example is just showing the usage of "ElasticSans_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -245,7 +252,7 @@ public async Task Get_ElasticSansGetMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ElasticSansGetMinimumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/ElasticSans_Get_MinimumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/ElasticSans_Get_MinimumSet_Gen.json // this example is just showing the usage of "ElasticSans_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -276,7 +283,7 @@ public async Task Get_ElasticSansGetMinimumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetPrivateLinkResources_PrivateLinkResourcesListByElasticSanMaximumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/PrivateLinkResources_ListByElasticSan_MaximumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/PrivateLinkResources_ListByElasticSan_MaximumSet_Gen.json // this example is just showing the usage of "PrivateLinkResources_ListByElasticSan" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -306,7 +313,7 @@ public async Task GetPrivateLinkResources_PrivateLinkResourcesListByElasticSanMa [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetPrivateLinkResources_PrivateLinkResourcesListByElasticSanMinimumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/PrivateLinkResources_ListByElasticSan_MinimumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/PrivateLinkResources_ListByElasticSan_MinimumSet_Gen.json // this example is just showing the usage of "PrivateLinkResources_ListByElasticSan" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/samples/Generated/Samples/Sample_ElasticSanSnapshotCollection.cs b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/samples/Generated/Samples/Sample_ElasticSanSnapshotCollection.cs index 53f2e28976c5..5b3b23950ab6 100644 --- a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/samples/Generated/Samples/Sample_ElasticSanSnapshotCollection.cs +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/samples/Generated/Samples/Sample_ElasticSanSnapshotCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ElasticSanSnapshotCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_VolumeSnapshotsListByVolumeGroupMaximumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/VolumeSnapshots_ListByVolumeGroup_MaximumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeSnapshots_ListByVolumeGroup_MaximumSet_Gen.json // this example is just showing the usage of "VolumeSnapshots_ListByVolumeGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -59,7 +59,7 @@ public async Task GetAll_VolumeSnapshotsListByVolumeGroupMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_VolumeSnapshotsListByVolumeGroupMinimumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/VolumeSnapshots_ListByVolumeGroup_MinimumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeSnapshots_ListByVolumeGroup_MinimumSet_Gen.json // this example is just showing the usage of "VolumeSnapshots_ListByVolumeGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -97,7 +97,7 @@ public async Task GetAll_VolumeSnapshotsListByVolumeGroupMinimumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_VolumeSnapshotsCreateMaximumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/VolumeSnapshots_Create_MaximumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeSnapshots_Create_MaximumSet_Gen.json // this example is just showing the usage of "VolumeSnapshots_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -135,7 +135,7 @@ public async Task CreateOrUpdate_VolumeSnapshotsCreateMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_VolumeSnapshotsCreateMinimumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/VolumeSnapshots_Create_MinimumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeSnapshots_Create_MinimumSet_Gen.json // this example is just showing the usage of "VolumeSnapshots_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -173,7 +173,7 @@ public async Task CreateOrUpdate_VolumeSnapshotsCreateMinimumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_VolumeSnapshotsGetMaximumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/VolumeSnapshots_Get_MaximumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeSnapshots_Get_MaximumSet_Gen.json // this example is just showing the usage of "VolumeSnapshots_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -209,7 +209,7 @@ public async Task Get_VolumeSnapshotsGetMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_VolumeSnapshotsGetMaximumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/VolumeSnapshots_Get_MaximumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeSnapshots_Get_MaximumSet_Gen.json // this example is just showing the usage of "VolumeSnapshots_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -241,7 +241,7 @@ public async Task Exists_VolumeSnapshotsGetMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_VolumeSnapshotsGetMaximumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/VolumeSnapshots_Get_MaximumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeSnapshots_Get_MaximumSet_Gen.json // this example is just showing the usage of "VolumeSnapshots_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -285,7 +285,7 @@ public async Task GetIfExists_VolumeSnapshotsGetMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_VolumeSnapshotsGetMinimumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/VolumeSnapshots_Get_MinimumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeSnapshots_Get_MinimumSet_Gen.json // this example is just showing the usage of "VolumeSnapshots_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -321,7 +321,7 @@ public async Task Get_VolumeSnapshotsGetMinimumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_VolumeSnapshotsGetMinimumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/VolumeSnapshots_Get_MinimumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeSnapshots_Get_MinimumSet_Gen.json // this example is just showing the usage of "VolumeSnapshots_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -353,7 +353,7 @@ public async Task Exists_VolumeSnapshotsGetMinimumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_VolumeSnapshotsGetMinimumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/VolumeSnapshots_Get_MinimumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeSnapshots_Get_MinimumSet_Gen.json // this example is just showing the usage of "VolumeSnapshots_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/samples/Generated/Samples/Sample_ElasticSanSnapshotResource.cs b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/samples/Generated/Samples/Sample_ElasticSanSnapshotResource.cs index 415099e0485f..906ff3c1f80f 100644 --- a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/samples/Generated/Samples/Sample_ElasticSanSnapshotResource.cs +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/samples/Generated/Samples/Sample_ElasticSanSnapshotResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ElasticSanSnapshotResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_VolumeSnapshotsCreateMaximumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/VolumeSnapshots_Create_MaximumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeSnapshots_Create_MaximumSet_Gen.json // this example is just showing the usage of "VolumeSnapshots_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -55,7 +55,7 @@ public async Task Update_VolumeSnapshotsCreateMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_VolumeSnapshotsCreateMinimumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/VolumeSnapshots_Create_MinimumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeSnapshots_Create_MinimumSet_Gen.json // this example is just showing the usage of "VolumeSnapshots_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -90,7 +90,7 @@ public async Task Update_VolumeSnapshotsCreateMinimumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_VolumeSnapshotsDeleteMaximumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/VolumeSnapshots_Delete_MaximumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeSnapshots_Delete_MaximumSet_Gen.json // this example is just showing the usage of "VolumeSnapshots_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -119,7 +119,7 @@ public async Task Delete_VolumeSnapshotsDeleteMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_VolumeSnapshotsDeleteMinimumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/VolumeSnapshots_Delete_MinimumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeSnapshots_Delete_MinimumSet_Gen.json // this example is just showing the usage of "VolumeSnapshots_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -148,7 +148,7 @@ public async Task Delete_VolumeSnapshotsDeleteMinimumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_VolumeSnapshotsGetMaximumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/VolumeSnapshots_Get_MaximumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeSnapshots_Get_MaximumSet_Gen.json // this example is just showing the usage of "VolumeSnapshots_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -181,7 +181,7 @@ public async Task Get_VolumeSnapshotsGetMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_VolumeSnapshotsGetMinimumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/VolumeSnapshots_Get_MinimumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeSnapshots_Get_MinimumSet_Gen.json // this example is just showing the usage of "VolumeSnapshots_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/samples/Generated/Samples/Sample_ElasticSanVolumeCollection.cs b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/samples/Generated/Samples/Sample_ElasticSanVolumeCollection.cs index fe92c33b50dc..f8a2c2e3dbd8 100644 --- a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/samples/Generated/Samples/Sample_ElasticSanVolumeCollection.cs +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/samples/Generated/Samples/Sample_ElasticSanVolumeCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ElasticSanVolumeCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_VolumesCreateMaximumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/Volumes_Create_MaximumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/Volumes_Create_MaximumSet_Gen.json // this example is just showing the usage of "Volumes_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -42,7 +42,7 @@ public async Task CreateOrUpdate_VolumesCreateMaximumSetGen() // invoke the operation string volumeName = "volumename"; - ElasticSanVolumeData data = new ElasticSanVolumeData(9) + ElasticSanVolumeData data = new ElasticSanVolumeData(9L) { CreationData = new ElasticSanVolumeDataSourceInfo() { @@ -66,7 +66,7 @@ public async Task CreateOrUpdate_VolumesCreateMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_VolumesCreateMinimumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/Volumes_Create_MinimumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/Volumes_Create_MinimumSet_Gen.json // this example is just showing the usage of "Volumes_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -88,7 +88,7 @@ public async Task CreateOrUpdate_VolumesCreateMinimumSetGen() // invoke the operation string volumeName = "volumename"; - ElasticSanVolumeData data = new ElasticSanVolumeData(9); + ElasticSanVolumeData data = new ElasticSanVolumeData(9L); ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, volumeName, data); ElasticSanVolumeResource result = lro.Value; @@ -104,7 +104,7 @@ public async Task CreateOrUpdate_VolumesCreateMinimumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_VolumesGetMaximumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/Volumes_Get_MaximumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/Volumes_Get_MaximumSet_Gen.json // this example is just showing the usage of "Volumes_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -140,7 +140,7 @@ public async Task Get_VolumesGetMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_VolumesGetMaximumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/Volumes_Get_MaximumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/Volumes_Get_MaximumSet_Gen.json // this example is just showing the usage of "Volumes_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -172,7 +172,7 @@ public async Task Exists_VolumesGetMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_VolumesGetMaximumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/Volumes_Get_MaximumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/Volumes_Get_MaximumSet_Gen.json // this example is just showing the usage of "Volumes_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -216,7 +216,7 @@ public async Task GetIfExists_VolumesGetMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_VolumesGetMinimumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/Volumes_Get_MinimumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/Volumes_Get_MinimumSet_Gen.json // this example is just showing the usage of "Volumes_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -252,7 +252,7 @@ public async Task Get_VolumesGetMinimumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_VolumesGetMinimumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/Volumes_Get_MinimumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/Volumes_Get_MinimumSet_Gen.json // this example is just showing the usage of "Volumes_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -284,7 +284,7 @@ public async Task Exists_VolumesGetMinimumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_VolumesGetMinimumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/Volumes_Get_MinimumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/Volumes_Get_MinimumSet_Gen.json // this example is just showing the usage of "Volumes_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -328,7 +328,7 @@ public async Task GetIfExists_VolumesGetMinimumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_VolumesListByVolumeGroupMaximumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/Volumes_ListByVolumeGroup_MaximumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/Volumes_ListByVolumeGroup_MaximumSet_Gen.json // this example is just showing the usage of "Volumes_ListByVolumeGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -366,7 +366,7 @@ public async Task GetAll_VolumesListByVolumeGroupMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_VolumesListByVolumeGroupMinimumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/Volumes_ListByVolumeGroup_MinimumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/Volumes_ListByVolumeGroup_MinimumSet_Gen.json // this example is just showing the usage of "Volumes_ListByVolumeGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/samples/Generated/Samples/Sample_ElasticSanVolumeGroupCollection.cs b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/samples/Generated/Samples/Sample_ElasticSanVolumeGroupCollection.cs index ad4fa30be1b6..bd85eb4197fe 100644 --- a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/samples/Generated/Samples/Sample_ElasticSanVolumeGroupCollection.cs +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/samples/Generated/Samples/Sample_ElasticSanVolumeGroupCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_ElasticSanVolumeGroupCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_VolumeGroupsListByElasticSanMaximumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/VolumeGroups_ListByElasticSan_MaximumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeGroups_ListByElasticSan_MaximumSet_Gen.json // this example is just showing the usage of "VolumeGroups_ListByElasticSan" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -58,7 +58,7 @@ public async Task GetAll_VolumeGroupsListByElasticSanMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_VolumeGroupsListByElasticSanMinimumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/VolumeGroups_ListByElasticSan_MinimumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeGroups_ListByElasticSan_MinimumSet_Gen.json // this example is just showing the usage of "VolumeGroups_ListByElasticSan" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -95,7 +95,7 @@ public async Task GetAll_VolumeGroupsListByElasticSanMinimumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_VolumeGroupsCreateMaximumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/VolumeGroups_Create_MaximumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeGroups_Create_MaximumSet_Gen.json // this example is just showing the usage of "VolumeGroups_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -161,7 +161,7 @@ public async Task CreateOrUpdate_VolumeGroupsCreateMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_VolumeGroupsCreateMinimumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/VolumeGroups_Create_MinimumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeGroups_Create_MinimumSet_Gen.json // this example is just showing the usage of "VolumeGroups_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -198,7 +198,7 @@ public async Task CreateOrUpdate_VolumeGroupsCreateMinimumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_VolumeGroupsGetMaximumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/VolumeGroups_Get_MaximumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeGroups_Get_MaximumSet_Gen.json // this example is just showing the usage of "VolumeGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -233,7 +233,7 @@ public async Task Get_VolumeGroupsGetMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_VolumeGroupsGetMaximumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/VolumeGroups_Get_MaximumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeGroups_Get_MaximumSet_Gen.json // this example is just showing the usage of "VolumeGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -264,7 +264,7 @@ public async Task Exists_VolumeGroupsGetMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_VolumeGroupsGetMaximumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/VolumeGroups_Get_MaximumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeGroups_Get_MaximumSet_Gen.json // this example is just showing the usage of "VolumeGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -307,7 +307,7 @@ public async Task GetIfExists_VolumeGroupsGetMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_VolumeGroupsGetMinimumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/VolumeGroups_Get_MinimumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeGroups_Get_MinimumSet_Gen.json // this example is just showing the usage of "VolumeGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -342,7 +342,7 @@ public async Task Get_VolumeGroupsGetMinimumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_VolumeGroupsGetMinimumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/VolumeGroups_Get_MinimumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeGroups_Get_MinimumSet_Gen.json // this example is just showing the usage of "VolumeGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -373,7 +373,7 @@ public async Task Exists_VolumeGroupsGetMinimumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_VolumeGroupsGetMinimumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/VolumeGroups_Get_MinimumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeGroups_Get_MinimumSet_Gen.json // this example is just showing the usage of "VolumeGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/samples/Generated/Samples/Sample_ElasticSanVolumeGroupResource.cs b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/samples/Generated/Samples/Sample_ElasticSanVolumeGroupResource.cs index dfef0d83051e..961879b53dc3 100644 --- a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/samples/Generated/Samples/Sample_ElasticSanVolumeGroupResource.cs +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/samples/Generated/Samples/Sample_ElasticSanVolumeGroupResource.cs @@ -21,7 +21,7 @@ public partial class Sample_ElasticSanVolumeGroupResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_VolumeGroupsUpdateMaximumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/VolumeGroups_Update_MaximumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeGroups_Update_MaximumSet_Gen.json // this example is just showing the usage of "VolumeGroups_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -84,7 +84,7 @@ public async Task Update_VolumeGroupsUpdateMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_VolumeGroupsUpdateMinimumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/VolumeGroups_Update_MinimumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeGroups_Update_MinimumSet_Gen.json // this example is just showing the usage of "VolumeGroups_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -118,7 +118,7 @@ public async Task Update_VolumeGroupsUpdateMinimumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_VolumeGroupsDeleteMaximumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/VolumeGroups_Delete_MaximumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeGroups_Delete_MaximumSet_Gen.json // this example is just showing the usage of "VolumeGroups_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -146,7 +146,7 @@ public async Task Delete_VolumeGroupsDeleteMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_VolumeGroupsDeleteMinimumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/VolumeGroups_Delete_MinimumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeGroups_Delete_MinimumSet_Gen.json // this example is just showing the usage of "VolumeGroups_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -174,7 +174,7 @@ public async Task Delete_VolumeGroupsDeleteMinimumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_VolumeGroupsGetMaximumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/VolumeGroups_Get_MaximumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeGroups_Get_MaximumSet_Gen.json // this example is just showing the usage of "VolumeGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -206,7 +206,7 @@ public async Task Get_VolumeGroupsGetMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_VolumeGroupsGetMinimumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/VolumeGroups_Get_MinimumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeGroups_Get_MinimumSet_Gen.json // this example is just showing the usage of "VolumeGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/samples/Generated/Samples/Sample_ElasticSanVolumeResource.cs b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/samples/Generated/Samples/Sample_ElasticSanVolumeResource.cs index 414fa74ae937..cbe76d2b7f44 100644 --- a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/samples/Generated/Samples/Sample_ElasticSanVolumeResource.cs +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/samples/Generated/Samples/Sample_ElasticSanVolumeResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ElasticSanVolumeResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_VolumesUpdateMaximumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/Volumes_Update_MaximumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/Volumes_Update_MaximumSet_Gen.json // this example is just showing the usage of "Volumes_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -41,7 +41,7 @@ public async Task Update_VolumesUpdateMaximumSetGen() // invoke the operation ElasticSanVolumePatch patch = new ElasticSanVolumePatch() { - SizeGiB = 11, + SizeGiB = 11L, }; ArmOperation lro = await elasticSanVolume.UpdateAsync(WaitUntil.Completed, patch); ElasticSanVolumeResource result = lro.Value; @@ -58,7 +58,7 @@ public async Task Update_VolumesUpdateMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_VolumesUpdateMinimumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/Volumes_Update_MinimumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/Volumes_Update_MinimumSet_Gen.json // this example is just showing the usage of "Volumes_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -93,7 +93,7 @@ public async Task Update_VolumesUpdateMinimumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_VolumesDeleteMaximumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/Volumes_Delete_MaximumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/Volumes_Delete_MaximumSet_Gen.json // this example is just showing the usage of "Volumes_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -124,7 +124,7 @@ public async Task Delete_VolumesDeleteMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_VolumesDeleteMinimumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/Volumes_Delete_MinimumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/Volumes_Delete_MinimumSet_Gen.json // this example is just showing the usage of "Volumes_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -153,7 +153,7 @@ public async Task Delete_VolumesDeleteMinimumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_VolumesGetMaximumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/Volumes_Get_MaximumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/Volumes_Get_MaximumSet_Gen.json // this example is just showing the usage of "Volumes_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -186,7 +186,7 @@ public async Task Get_VolumesGetMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_VolumesGetMinimumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/Volumes_Get_MinimumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/Volumes_Get_MinimumSet_Gen.json // this example is just showing the usage of "Volumes_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs index 3faaf86a58f6..c8a43afb412a 100644 --- a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs @@ -21,7 +21,7 @@ public partial class Sample_SubscriptionResourceExtensions [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetSkus_SkusListMaximumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/Skus_List_MaximumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/Skus_List_MaximumSet_Gen.json // this example is just showing the usage of "Skus_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -50,7 +50,7 @@ public async Task GetSkus_SkusListMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetSkus_SkusListMinimumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/Skus_List_MinimumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/Skus_List_MinimumSet_Gen.json // this example is just showing the usage of "Skus_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Azure.ResourceManager.ElasticSan.csproj b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Azure.ResourceManager.ElasticSan.csproj index 3f384813f603..d9e9ecec9605 100644 --- a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Azure.ResourceManager.ElasticSan.csproj +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Azure.ResourceManager.ElasticSan.csproj @@ -1,6 +1,6 @@ - 1.2.0-beta.1 + 1.2.0-beta.2 1.1.0 Azure.ResourceManager.ElasticSan diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ArmElasticSanModelFactory.cs b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ArmElasticSanModelFactory.cs index 8c56c67eb5e2..400b1b5d726f 100644 --- a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ArmElasticSanModelFactory.cs +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ArmElasticSanModelFactory.cs @@ -80,8 +80,9 @@ public static ElasticSanSkuCapability ElasticSanSkuCapability(string name = null /// Total size of the Elastic San appliance in TB. /// The list of Private Endpoint Connections. /// Allow or disallow public network access to ElasticSan. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. + /// Auto Scale Properties for Elastic San Appliance. /// A new instance for mocking. - public static ElasticSanData ElasticSanData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ElasticSanSku sku = null, IEnumerable availabilityZones = null, ElasticSanProvisioningState? provisioningState = null, long baseSizeTiB = default, long extendedCapacitySizeTiB = default, long? totalVolumeSizeGiB = null, long? volumeGroupCount = null, long? totalIops = null, long? totalMbps = null, long? totalSizeTiB = null, IEnumerable privateEndpointConnections = null, ElasticSanPublicNetworkAccess? publicNetworkAccess = null) + public static ElasticSanData ElasticSanData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ElasticSanSku sku = null, IEnumerable availabilityZones = null, ElasticSanProvisioningState? provisioningState = null, long baseSizeTiB = default, long extendedCapacitySizeTiB = default, long? totalVolumeSizeGiB = null, long? volumeGroupCount = null, long? totalIops = null, long? totalMbps = null, long? totalSizeTiB = null, IEnumerable privateEndpointConnections = null, ElasticSanPublicNetworkAccess? publicNetworkAccess = null, ScaleUpProperties scaleUpProperties = null) { tags ??= new Dictionary(); availabilityZones ??= new List(); @@ -106,6 +107,7 @@ public static ElasticSanData ElasticSanData(ResourceIdentifier id = null, string totalSizeTiB, privateEndpointConnections?.ToList(), publicNetworkAccess, + scaleUpProperties != null ? new AutoScaleProperties(scaleUpProperties, serializedAdditionalRawData: null) : null, serializedAdditionalRawData: null); } @@ -285,6 +287,32 @@ public static ElasticSanSnapshotData ElasticSanSnapshotData(ResourceIdentifier i serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// resource sku. + /// Logical zone for Elastic San resource; example: ["1"]. + /// State of the operation on the resource. + /// Base size of the Elastic San appliance in TiB. + /// Extended size of the Elastic San appliance in TiB. + /// Total size of the provisioned Volumes in GiB. + /// Total number of volume groups in this Elastic San appliance. + /// Total Provisioned IOPS of the Elastic San appliance. + /// Total Provisioned MBps Elastic San appliance. + /// Total size of the Elastic San appliance in TB. + /// The list of Private Endpoint Connections. + /// Allow or disallow public network access to ElasticSan. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static ElasticSanData ElasticSanData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ElasticSanSku sku, IEnumerable availabilityZones, ElasticSanProvisioningState? provisioningState, long baseSizeTiB, long extendedCapacitySizeTiB, long? totalVolumeSizeGiB, long? volumeGroupCount, long? totalIops, long? totalMbps, long? totalSizeTiB, IEnumerable privateEndpointConnections, ElasticSanPublicNetworkAccess? publicNetworkAccess) + { + return ElasticSanData(id: id, name: name, resourceType: resourceType, systemData: systemData, tags: tags, location: location, sku: sku, availabilityZones: availabilityZones, provisioningState: provisioningState, baseSizeTiB: baseSizeTiB, extendedCapacitySizeTiB: extendedCapacitySizeTiB, totalVolumeSizeGiB: totalVolumeSizeGiB, volumeGroupCount: volumeGroupCount, totalIops: totalIops, totalMbps: totalMbps, totalSizeTiB: totalSizeTiB, privateEndpointConnections: privateEndpointConnections, publicNetworkAccess: publicNetworkAccess, scaleUpProperties: default); + } + /// Initializes a new instance of . /// The id. /// The name. diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanCollection.cs b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanCollection.cs index 2c7fb875e1a7..a59ebfddae71 100644 --- a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanCollection.cs +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdateAsync( /// /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUnt /// /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(string elasticS /// /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string elasticSanName, Cancellat /// /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken c /// /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationToken cancellatio /// /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string elasticSanName, Can /// /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string elasticSanName, CancellationToken ca /// /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task> GetIfExistsAsync /// /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// Resource diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanData.Serialization.cs b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanData.Serialization.cs index 4e86fd92fbe9..4937b2813902 100644 --- a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanData.Serialization.cs +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanData.Serialization.cs @@ -100,6 +100,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("publicNetworkAccess"u8); writer.WriteStringValue(PublicNetworkAccess.Value.ToString()); } + if (Optional.IsDefined(AutoScaleProperties)) + { + writer.WritePropertyName("autoScaleProperties"u8); + writer.WriteObjectValue(AutoScaleProperties, options); + } writer.WriteEndObject(); } @@ -141,6 +146,7 @@ internal static ElasticSanData DeserializeElasticSanData(JsonElement element, Mo long? totalSizeTiB = default; IReadOnlyList privateEndpointConnections = default; ElasticSanPublicNetworkAccess? publicNetworkAccess = default; + AutoScaleProperties autoScaleProperties = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -303,6 +309,15 @@ internal static ElasticSanData DeserializeElasticSanData(JsonElement element, Mo publicNetworkAccess = new ElasticSanPublicNetworkAccess(property0.Value.GetString()); continue; } + if (property0.NameEquals("autoScaleProperties"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + autoScaleProperties = AutoScaleProperties.DeserializeAutoScaleProperties(property0.Value, options); + continue; + } } continue; } @@ -331,6 +346,7 @@ internal static ElasticSanData DeserializeElasticSanData(JsonElement element, Mo totalSizeTiB, privateEndpointConnections ?? new ChangeTrackingList(), publicNetworkAccess, + autoScaleProperties, serializedAdditionalRawData); } diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanData.cs b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanData.cs index 4ad17e35a32e..f0d645e79f2a 100644 --- a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanData.cs +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanData.cs @@ -87,8 +87,9 @@ public ElasticSanData(AzureLocation location, ElasticSanSku sku, long baseSizeTi /// Total size of the Elastic San appliance in TB. /// The list of Private Endpoint Connections. /// Allow or disallow public network access to ElasticSan. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. + /// Auto Scale Properties for Elastic San Appliance. /// Keeps track of any properties unknown to the library. - internal ElasticSanData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ElasticSanSku sku, IList availabilityZones, ElasticSanProvisioningState? provisioningState, long baseSizeTiB, long extendedCapacitySizeTiB, long? totalVolumeSizeGiB, long? volumeGroupCount, long? totalIops, long? totalMbps, long? totalSizeTiB, IReadOnlyList privateEndpointConnections, ElasticSanPublicNetworkAccess? publicNetworkAccess, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + internal ElasticSanData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ElasticSanSku sku, IList availabilityZones, ElasticSanProvisioningState? provisioningState, long baseSizeTiB, long extendedCapacitySizeTiB, long? totalVolumeSizeGiB, long? volumeGroupCount, long? totalIops, long? totalMbps, long? totalSizeTiB, IReadOnlyList privateEndpointConnections, ElasticSanPublicNetworkAccess? publicNetworkAccess, AutoScaleProperties autoScaleProperties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { Sku = sku; AvailabilityZones = availabilityZones; @@ -102,6 +103,7 @@ internal ElasticSanData(ResourceIdentifier id, string name, ResourceType resourc TotalSizeTiB = totalSizeTiB; PrivateEndpointConnections = privateEndpointConnections; PublicNetworkAccess = publicNetworkAccess; + AutoScaleProperties = autoScaleProperties; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -134,5 +136,18 @@ internal ElasticSanData() public IReadOnlyList PrivateEndpointConnections { get; } /// Allow or disallow public network access to ElasticSan. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. public ElasticSanPublicNetworkAccess? PublicNetworkAccess { get; set; } + /// Auto Scale Properties for Elastic San Appliance. + internal AutoScaleProperties AutoScaleProperties { get; set; } + /// Scale up settings on Elastic San Appliance. + public ScaleUpProperties ScaleUpProperties + { + get => AutoScaleProperties is null ? default : AutoScaleProperties.ScaleUpProperties; + set + { + if (AutoScaleProperties is null) + AutoScaleProperties = new AutoScaleProperties(); + AutoScaleProperties.ScaleUpProperties = value; + } + } } } diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanPrivateEndpointConnectionCollection.cs b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanPrivateEndpointConnectionCollection.cs index 2abb41c54c00..76a1161e4f90 100644 --- a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanPrivateEndpointConnectionCollection.cs +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanPrivateEndpointConnectionCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateO /// /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string /// /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// Resource @@ -281,7 +281,7 @@ public virtual AsyncPageable GetAll /// /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// Resource @@ -310,7 +310,7 @@ public virtual Pageable GetAll(Canc /// /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// Resource @@ -353,7 +353,7 @@ public virtual async Task> ExistsAsync(string privateEndpointConn /// /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// Resource @@ -396,7 +396,7 @@ public virtual Response Exists(string privateEndpointConnectionName, Cance /// /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// Resource @@ -441,7 +441,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// Resource diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanPrivateEndpointConnectionResource.cs b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanPrivateEndpointConnectionResource.cs index 00fadde27087..6ca2995c72c4 100644 --- a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanPrivateEndpointConnectionResource.cs +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanPrivateEndpointConnectionResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(Cancell /// /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// Resource @@ -265,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// Resource diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanResource.cs b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanResource.cs index 8a02c9be0b10..ad27eed54c6d 100644 --- a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanResource.cs +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanResource.cs @@ -115,7 +115,7 @@ public virtual ElasticSanVolumeGroupCollection GetElasticSanVolumeGroups() /// /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// Resource @@ -146,7 +146,7 @@ public virtual async Task> GetElasticSan /// /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// Resource @@ -184,7 +184,7 @@ public virtual ElasticSanPrivateEndpointConnectionCollection GetElasticSanPrivat /// /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// Resource @@ -215,7 +215,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// Resource @@ -246,7 +246,7 @@ public virtual Response GetElasticS /// /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// Resource @@ -286,7 +286,7 @@ public virtual async Task> GetAsync(CancellationTok /// /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// Resource @@ -326,7 +326,7 @@ public virtual Response Get(CancellationToken cancellationTo /// /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// Resource @@ -368,7 +368,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// Resource @@ -410,7 +410,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// Resource @@ -456,7 +456,7 @@ public virtual async Task> UpdateAsync(WaitUnti /// /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// Resource @@ -502,7 +502,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, Elas /// /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// @@ -527,7 +527,7 @@ public virtual AsyncPageable GetPrivateLinkResour /// /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// @@ -552,7 +552,7 @@ public virtual Pageable GetPrivateLinkResources(C /// /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// Resource @@ -614,7 +614,7 @@ public virtual async Task> AddTagAsync(string key, /// /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// Resource @@ -676,7 +676,7 @@ public virtual Response AddTag(string key, string value, Can /// /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// Resource @@ -733,7 +733,7 @@ public virtual async Task> SetTagsAsync(IDictionary /// /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// Resource @@ -790,7 +790,7 @@ public virtual Response SetTags(IDictionary /// /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// Resource @@ -850,7 +850,7 @@ public virtual async Task> RemoveTagAsync(string ke /// /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// Resource diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanSnapshotCollection.cs b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanSnapshotCollection.cs index 232d49430620..6c8a029a526e 100644 --- a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanSnapshotCollection.cs +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanSnapshotCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUpda /// /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(string /// /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string snapshotName, Can /// /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(string filt /// /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// Resource @@ -314,7 +314,7 @@ public virtual Pageable GetAll(string filter = null, /// /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// Resource @@ -357,7 +357,7 @@ public virtual async Task> ExistsAsync(string snapshotName, Cance /// /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// Resource @@ -400,7 +400,7 @@ public virtual Response Exists(string snapshotName, CancellationToken canc /// /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// Resource @@ -445,7 +445,7 @@ public virtual async Task> GetIfExi /// /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// Resource diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanSnapshotResource.cs b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanSnapshotResource.cs index 987f546c1060..b04bcb5a3337 100644 --- a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanSnapshotResource.cs +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanSnapshotResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Cancell /// /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken cancel /// /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// Resource @@ -266,7 +266,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// Resource @@ -312,7 +312,7 @@ public virtual async Task> UpdateAsync( /// /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// Resource diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanVolumeCollection.cs b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanVolumeCollection.cs index 9cc844281b67..291314425c3a 100644 --- a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanVolumeCollection.cs +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanVolumeCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUpdate /// /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil w /// /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(string vo /// /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string volumeName, Cancell /// /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(CancellationT /// /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken cance /// /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string volumeName, Cancell /// /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string volumeName, CancellationToken cancel /// /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> GetIfExist /// /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// Resource diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanVolumeGroupCollection.cs b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanVolumeGroupCollection.cs index 443bfae3e80c..b24296fde6ce 100644 --- a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanVolumeGroupCollection.cs +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanVolumeGroupCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrU /// /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUn /// /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(stri /// /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string volumeGroupNam /// /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(Cancella /// /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken /// /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string volumeGroupName, Ca /// /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string volumeGroupName, CancellationToken c /// /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> GetIf /// /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// Resource diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanVolumeGroupResource.cs b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanVolumeGroupResource.cs index d0aaf385ed3c..11e63e4cace3 100644 --- a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanVolumeGroupResource.cs +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanVolumeGroupResource.cs @@ -109,7 +109,7 @@ public virtual ElasticSanVolumeCollection GetElasticSanVolumes() /// /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// Resource @@ -140,7 +140,7 @@ public virtual async Task> GetElasticSanVolum /// /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// Resource @@ -178,7 +178,7 @@ public virtual ElasticSanSnapshotCollection GetElasticSanSnapshots() /// /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// Resource @@ -209,7 +209,7 @@ public virtual async Task> GetElasticSanSna /// /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// Resource @@ -240,7 +240,7 @@ public virtual Response GetElasticSanSnapshot(string /// /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// Resource @@ -280,7 +280,7 @@ public virtual async Task> GetAsync(Canc /// /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// Resource @@ -320,7 +320,7 @@ public virtual Response Get(CancellationToken can /// /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// Resource @@ -362,7 +362,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// Resource @@ -404,7 +404,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// Resource @@ -450,7 +450,7 @@ public virtual async Task> UpdateAsy /// /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// Resource diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanVolumeResource.cs b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanVolumeResource.cs index 64e86174c72f..6d292f51bae8 100644 --- a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanVolumeResource.cs +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanVolumeResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync(Cancellat /// /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationToken cancella /// /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, XmsDele /// /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// Resource @@ -271,7 +271,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, XmsDeleteSnapshot? xmsDe /// /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// Resource @@ -317,7 +317,7 @@ public virtual async Task> UpdateAsync(Wa /// /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// Resource diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Extensions/ElasticSanExtensions.cs b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Extensions/ElasticSanExtensions.cs index 73f9b817f611..fb50b9b834ca 100644 --- a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Extensions/ElasticSanExtensions.cs +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Extensions/ElasticSanExtensions.cs @@ -158,7 +158,7 @@ public static ElasticSanCollection GetElasticSans(this ResourceGroupResource res /// /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// Resource @@ -196,7 +196,7 @@ public static async Task> GetElasticSanAsync(this R /// /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// Resource @@ -234,7 +234,7 @@ public static Response GetElasticSan(this ResourceGroupResou /// /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// @@ -267,7 +267,7 @@ public static AsyncPageable GetSkusAsync(this Subscrip /// /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// @@ -300,7 +300,7 @@ public static Pageable GetSkus(this SubscriptionResour /// /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// Resource @@ -336,7 +336,7 @@ public static AsyncPageable GetElasticSansAsync(this Subscri /// /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// Resource diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Extensions/MockableElasticSanResourceGroupResource.cs b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Extensions/MockableElasticSanResourceGroupResource.cs index ecabbf03abf7..eb482308a3b7 100644 --- a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Extensions/MockableElasticSanResourceGroupResource.cs +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Extensions/MockableElasticSanResourceGroupResource.cs @@ -53,7 +53,7 @@ public virtual ElasticSanCollection GetElasticSans() /// /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// Resource @@ -84,7 +84,7 @@ public virtual async Task> GetElasticSanAsync(strin /// /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// Resource diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Extensions/MockableElasticSanSubscriptionResource.cs b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Extensions/MockableElasticSanSubscriptionResource.cs index ace589c2a577..6e3996d7bc75 100644 --- a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Extensions/MockableElasticSanSubscriptionResource.cs +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Extensions/MockableElasticSanSubscriptionResource.cs @@ -57,7 +57,7 @@ private string GetApiVersionOrNull(ResourceType resourceType) /// /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// @@ -83,7 +83,7 @@ public virtual AsyncPageable GetSkusAsync(string filte /// /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// @@ -109,7 +109,7 @@ public virtual Pageable GetSkus(string filter = null, /// /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// Resource @@ -139,7 +139,7 @@ public virtual AsyncPageable GetElasticSansAsync(Cancellatio /// /// /// Default Api Version - /// 2024-05-01 + /// 2024-06-01-preview /// /// /// Resource diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Models/AutoScalePolicyEnforcement.cs b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Models/AutoScalePolicyEnforcement.cs new file mode 100644 index 000000000000..368078e412f1 --- /dev/null +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Models/AutoScalePolicyEnforcement.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ElasticSan.Models +{ + /// Enable or Disable scale up setting on Elastic San Appliance. + public readonly partial struct AutoScalePolicyEnforcement : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AutoScalePolicyEnforcement(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NoneValue = "None"; + private const string EnabledValue = "Enabled"; + private const string DisabledValue = "Disabled"; + + /// None. + public static AutoScalePolicyEnforcement None { get; } = new AutoScalePolicyEnforcement(NoneValue); + /// Enabled. + public static AutoScalePolicyEnforcement Enabled { get; } = new AutoScalePolicyEnforcement(EnabledValue); + /// Disabled. + public static AutoScalePolicyEnforcement Disabled { get; } = new AutoScalePolicyEnforcement(DisabledValue); + /// Determines if two values are the same. + public static bool operator ==(AutoScalePolicyEnforcement left, AutoScalePolicyEnforcement right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AutoScalePolicyEnforcement left, AutoScalePolicyEnforcement right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator AutoScalePolicyEnforcement(string value) => new AutoScalePolicyEnforcement(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AutoScalePolicyEnforcement other && Equals(other); + /// + public bool Equals(AutoScalePolicyEnforcement other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Models/AutoScaleProperties.Serialization.cs b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Models/AutoScaleProperties.Serialization.cs new file mode 100644 index 000000000000..dbf0c93f0c7a --- /dev/null +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Models/AutoScaleProperties.Serialization.cs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ElasticSan.Models +{ + internal partial class AutoScaleProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AutoScaleProperties)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(ScaleUpProperties)) + { + writer.WritePropertyName("scaleUpProperties"u8); + writer.WriteObjectValue(ScaleUpProperties, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AutoScaleProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AutoScaleProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAutoScaleProperties(document.RootElement, options); + } + + internal static AutoScaleProperties DeserializeAutoScaleProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ScaleUpProperties scaleUpProperties = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("scaleUpProperties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + scaleUpProperties = ScaleUpProperties.DeserializeScaleUpProperties(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AutoScaleProperties(scaleUpProperties, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AutoScaleProperties)} does not support writing '{options.Format}' format."); + } + } + + AutoScaleProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeAutoScaleProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AutoScaleProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Models/AutoScaleProperties.cs b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Models/AutoScaleProperties.cs new file mode 100644 index 000000000000..891f9eb25737 --- /dev/null +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Models/AutoScaleProperties.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ElasticSan.Models +{ + /// The auto scale settings on Elastic San Appliance. + internal partial class AutoScaleProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public AutoScaleProperties() + { + } + + /// Initializes a new instance of . + /// Scale up settings on Elastic San Appliance. + /// Keeps track of any properties unknown to the library. + internal AutoScaleProperties(ScaleUpProperties scaleUpProperties, IDictionary serializedAdditionalRawData) + { + ScaleUpProperties = scaleUpProperties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Scale up settings on Elastic San Appliance. + public ScaleUpProperties ScaleUpProperties { get; set; } + } +} diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Models/ElasticSanPatch.Serialization.cs b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Models/ElasticSanPatch.Serialization.cs index 0ba3eae17f93..e0579cd2b80d 100644 --- a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Models/ElasticSanPatch.Serialization.cs +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Models/ElasticSanPatch.Serialization.cs @@ -62,6 +62,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("publicNetworkAccess"u8); writer.WriteStringValue(PublicNetworkAccess.Value.ToString()); } + if (Optional.IsDefined(AutoScaleProperties)) + { + writer.WritePropertyName("autoScaleProperties"u8); + writer.WriteObjectValue(AutoScaleProperties, options); + } writer.WriteEndObject(); if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -104,6 +109,7 @@ internal static ElasticSanPatch DeserializeElasticSanPatch(JsonElement element, long? baseSizeTiB = default; long? extendedCapacitySizeTiB = default; ElasticSanPublicNetworkAccess? publicNetworkAccess = default; + AutoScaleProperties autoScaleProperties = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -158,6 +164,15 @@ internal static ElasticSanPatch DeserializeElasticSanPatch(JsonElement element, publicNetworkAccess = new ElasticSanPublicNetworkAccess(property0.Value.GetString()); continue; } + if (property0.NameEquals("autoScaleProperties"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + autoScaleProperties = AutoScaleProperties.DeserializeAutoScaleProperties(property0.Value, options); + continue; + } } continue; } @@ -167,7 +182,13 @@ internal static ElasticSanPatch DeserializeElasticSanPatch(JsonElement element, } } serializedAdditionalRawData = rawDataDictionary; - return new ElasticSanPatch(tags ?? new ChangeTrackingDictionary(), baseSizeTiB, extendedCapacitySizeTiB, publicNetworkAccess, serializedAdditionalRawData); + return new ElasticSanPatch( + tags ?? new ChangeTrackingDictionary(), + baseSizeTiB, + extendedCapacitySizeTiB, + publicNetworkAccess, + autoScaleProperties, + serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Models/ElasticSanPatch.cs b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Models/ElasticSanPatch.cs index 1a73c2128047..f25c80f00329 100644 --- a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Models/ElasticSanPatch.cs +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Models/ElasticSanPatch.cs @@ -56,13 +56,15 @@ public ElasticSanPatch() /// Base size of the Elastic San appliance in TiB. /// Extended size of the Elastic San appliance in TiB. /// Allow or disallow public network access to ElasticSan Account. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. + /// Auto Scale Properties for Elastic San Appliance. /// Keeps track of any properties unknown to the library. - internal ElasticSanPatch(IDictionary tags, long? baseSizeTiB, long? extendedCapacitySizeTiB, ElasticSanPublicNetworkAccess? publicNetworkAccess, IDictionary serializedAdditionalRawData) + internal ElasticSanPatch(IDictionary tags, long? baseSizeTiB, long? extendedCapacitySizeTiB, ElasticSanPublicNetworkAccess? publicNetworkAccess, AutoScaleProperties autoScaleProperties, IDictionary serializedAdditionalRawData) { Tags = tags; BaseSizeTiB = baseSizeTiB; ExtendedCapacitySizeTiB = extendedCapacitySizeTiB; PublicNetworkAccess = publicNetworkAccess; + AutoScaleProperties = autoScaleProperties; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -74,5 +76,18 @@ internal ElasticSanPatch(IDictionary tags, long? baseSizeTiB, lo public long? ExtendedCapacitySizeTiB { get; set; } /// Allow or disallow public network access to ElasticSan Account. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. public ElasticSanPublicNetworkAccess? PublicNetworkAccess { get; set; } + /// Auto Scale Properties for Elastic San Appliance. + internal AutoScaleProperties AutoScaleProperties { get; set; } + /// Scale up settings on Elastic San Appliance. + public ScaleUpProperties ScaleUpProperties + { + get => AutoScaleProperties is null ? default : AutoScaleProperties.ScaleUpProperties; + set + { + if (AutoScaleProperties is null) + AutoScaleProperties = new AutoScaleProperties(); + AutoScaleProperties.ScaleUpProperties = value; + } + } } } diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Models/ScaleUpProperties.Serialization.cs b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Models/ScaleUpProperties.Serialization.cs new file mode 100644 index 000000000000..f3b4d03d698c --- /dev/null +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Models/ScaleUpProperties.Serialization.cs @@ -0,0 +1,178 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ElasticSan.Models +{ + public partial class ScaleUpProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ScaleUpProperties)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(UnusedSizeTiB)) + { + writer.WritePropertyName("unusedSizeTiB"u8); + writer.WriteNumberValue(UnusedSizeTiB.Value); + } + if (Optional.IsDefined(IncreaseCapacityUnitByTiB)) + { + writer.WritePropertyName("increaseCapacityUnitByTiB"u8); + writer.WriteNumberValue(IncreaseCapacityUnitByTiB.Value); + } + if (Optional.IsDefined(CapacityUnitScaleUpLimitTiB)) + { + writer.WritePropertyName("capacityUnitScaleUpLimitTiB"u8); + writer.WriteNumberValue(CapacityUnitScaleUpLimitTiB.Value); + } + if (Optional.IsDefined(AutoScalePolicyEnforcement)) + { + writer.WritePropertyName("autoScalePolicyEnforcement"u8); + writer.WriteStringValue(AutoScalePolicyEnforcement.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ScaleUpProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ScaleUpProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeScaleUpProperties(document.RootElement, options); + } + + internal static ScaleUpProperties DeserializeScaleUpProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + long? unusedSizeTiB = default; + long? increaseCapacityUnitByTiB = default; + long? capacityUnitScaleUpLimitTiB = default; + AutoScalePolicyEnforcement? autoScalePolicyEnforcement = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("unusedSizeTiB"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + unusedSizeTiB = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("increaseCapacityUnitByTiB"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + increaseCapacityUnitByTiB = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("capacityUnitScaleUpLimitTiB"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + capacityUnitScaleUpLimitTiB = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("autoScalePolicyEnforcement"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + autoScalePolicyEnforcement = new AutoScalePolicyEnforcement(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ScaleUpProperties(unusedSizeTiB, increaseCapacityUnitByTiB, capacityUnitScaleUpLimitTiB, autoScalePolicyEnforcement, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ScaleUpProperties)} does not support writing '{options.Format}' format."); + } + } + + ScaleUpProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeScaleUpProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ScaleUpProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Models/ScaleUpProperties.cs b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Models/ScaleUpProperties.cs new file mode 100644 index 000000000000..082e4dfec41e --- /dev/null +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Models/ScaleUpProperties.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ElasticSan.Models +{ + /// Scale up properties on Elastic San Appliance. + public partial class ScaleUpProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ScaleUpProperties() + { + } + + /// Initializes a new instance of . + /// Unused size on Elastic San appliance in TiB. + /// Unit to increase Capacity Unit on Elastic San appliance in TiB. + /// Maximum scale up size on Elastic San appliance in TiB. + /// Enable or Disable scale up setting on Elastic San Appliance. + /// Keeps track of any properties unknown to the library. + internal ScaleUpProperties(long? unusedSizeTiB, long? increaseCapacityUnitByTiB, long? capacityUnitScaleUpLimitTiB, AutoScalePolicyEnforcement? autoScalePolicyEnforcement, IDictionary serializedAdditionalRawData) + { + UnusedSizeTiB = unusedSizeTiB; + IncreaseCapacityUnitByTiB = increaseCapacityUnitByTiB; + CapacityUnitScaleUpLimitTiB = capacityUnitScaleUpLimitTiB; + AutoScalePolicyEnforcement = autoScalePolicyEnforcement; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Unused size on Elastic San appliance in TiB. + public long? UnusedSizeTiB { get; set; } + /// Unit to increase Capacity Unit on Elastic San appliance in TiB. + public long? IncreaseCapacityUnitByTiB { get; set; } + /// Maximum scale up size on Elastic San appliance in TiB. + public long? CapacityUnitScaleUpLimitTiB { get; set; } + /// Enable or Disable scale up setting on Elastic San Appliance. + public AutoScalePolicyEnforcement? AutoScalePolicyEnforcement { get; set; } + } +} diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/RestOperations/ElasticSansRestOperations.cs b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/RestOperations/ElasticSansRestOperations.cs index f63db67d7459..ce50e0c2b9f8 100644 --- a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/RestOperations/ElasticSansRestOperations.cs +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/RestOperations/ElasticSansRestOperations.cs @@ -32,7 +32,7 @@ public ElasticSansRestOperations(HttpPipeline pipeline, string applicationId, Ur { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-05-01"; + _apiVersion = apiVersion ?? "2024-06-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs index 1e24bd4f420d..f07bcf5fa282 100644 --- a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs @@ -32,7 +32,7 @@ public PrivateEndpointConnectionsRestOperations(HttpPipeline pipeline, string ap { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-05-01"; + _apiVersion = apiVersion ?? "2024-06-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs index a97a3346918b..59e9224c7180 100644 --- a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs @@ -32,7 +32,7 @@ public PrivateLinkResourcesRestOperations(HttpPipeline pipeline, string applicat { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-05-01"; + _apiVersion = apiVersion ?? "2024-06-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/RestOperations/SkusRestOperations.cs b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/RestOperations/SkusRestOperations.cs index 5f3cb68b48b1..8a73e779c983 100644 --- a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/RestOperations/SkusRestOperations.cs +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/RestOperations/SkusRestOperations.cs @@ -32,7 +32,7 @@ public SkusRestOperations(HttpPipeline pipeline, string applicationId, Uri endpo { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-05-01"; + _apiVersion = apiVersion ?? "2024-06-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/RestOperations/VolumeGroupsRestOperations.cs b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/RestOperations/VolumeGroupsRestOperations.cs index c93a706d4e2a..a9008335d169 100644 --- a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/RestOperations/VolumeGroupsRestOperations.cs +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/RestOperations/VolumeGroupsRestOperations.cs @@ -32,7 +32,7 @@ public VolumeGroupsRestOperations(HttpPipeline pipeline, string applicationId, U { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-05-01"; + _apiVersion = apiVersion ?? "2024-06-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/RestOperations/VolumeSnapshotsRestOperations.cs b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/RestOperations/VolumeSnapshotsRestOperations.cs index cafc00e70953..d1d85676522c 100644 --- a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/RestOperations/VolumeSnapshotsRestOperations.cs +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/RestOperations/VolumeSnapshotsRestOperations.cs @@ -32,7 +32,7 @@ public VolumeSnapshotsRestOperations(HttpPipeline pipeline, string applicationId { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-05-01"; + _apiVersion = apiVersion ?? "2024-06-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/RestOperations/VolumesRestOperations.cs b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/RestOperations/VolumesRestOperations.cs index 33c9c258deb4..d2a1b0d8ee89 100644 --- a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/RestOperations/VolumesRestOperations.cs +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/RestOperations/VolumesRestOperations.cs @@ -32,7 +32,7 @@ public VolumesRestOperations(HttpPipeline pipeline, string applicationId, Uri en { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-05-01"; + _apiVersion = apiVersion ?? "2024-06-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/autorest.md b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/autorest.md index a3f47137b32b..c0ad3628b34e 100644 --- a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/autorest.md +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/autorest.md @@ -9,7 +9,7 @@ csharp: true library-name: ElasticSan namespace: Azure.ResourceManager.ElasticSan # default tag is a preview version -require: https://github.com/Azure/azure-rest-api-specs/blob/262a9d16d94c3448fc7f37c840757f6e74acf7de/specification/elasticsan/resource-manager/readme.md +require: https://github.com/Azure/azure-rest-api-specs/blob/9a8af2acfafc4d7a23eff41b859d2d332f51b0bc/specification/elasticsan/resource-manager/readme.md output-folder: $(this-folder)/Generated clear-output-folder: true sample-gen: diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/tests/Scenario/ElasticSanCollectionTests.cs b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/tests/Scenario/ElasticSanCollectionTests.cs index 982a808e4259..51f066ce6cd1 100644 --- a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/tests/Scenario/ElasticSanCollectionTests.cs +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/tests/Scenario/ElasticSanCollectionTests.cs @@ -31,6 +31,13 @@ public async Task CreateOrUpdate() ElasticSanData data = GetDefaultElasticSanParameters(TestLocation); data.Tags.Add("tag1", "value1"); data.PublicNetworkAccess = Models.ElasticSanPublicNetworkAccess.Enabled; + data.ScaleUpProperties = new Models.ScaleUpProperties + { + AutoScalePolicyEnforcement = Models.AutoScalePolicyEnforcement.Disabled, + CapacityUnitScaleUpLimitTiB = 24, + IncreaseCapacityUnitByTiB = 1, + UnusedSizeTiB = 5 + }; string elasticSanName = Recording.GenerateAssetName("testsan-"); ElasticSanResource elasticSan1 = (await elasticSanCollection.CreateOrUpdateAsync(WaitUntil.Completed, elasticSanName, data)).Value; @@ -40,6 +47,10 @@ public async Task CreateOrUpdate() Assert.IsTrue(elasticSan1.Data.Tags.ContainsKey("tag1")); Assert.AreEqual("value1", elasticSan1.Data.Tags["tag1"]); Assert.AreEqual("Enabled", elasticSan1.Data.PublicNetworkAccess.Value.ToString()); + Assert.AreEqual(elasticSan1.Data.ScaleUpProperties.AutoScalePolicyEnforcement, Models.AutoScalePolicyEnforcement.Disabled); + Assert.AreEqual(elasticSan1.Data.ScaleUpProperties.IncreaseCapacityUnitByTiB, 1); + Assert.AreEqual(elasticSan1.Data.ScaleUpProperties.CapacityUnitScaleUpLimitTiB, 24); + Assert.AreEqual(elasticSan1.Data.ScaleUpProperties.UnusedSizeTiB, 5); // Skip the validation for AvailabilityZone as the server won't return the property elasticSan1 = (await elasticSanCollection.CreateOrUpdateAsync(WaitUntil.Completed, elasticSanName, GetDefaultElasticSanParameters(TestLocation, 2, 7))).Value; @@ -49,6 +60,7 @@ public async Task CreateOrUpdate() Assert.IsEmpty(elasticSan1.Data.Tags); Assert.IsEmpty(elasticSan1.Data.AvailabilityZones); Assert.AreEqual(null, elasticSan1.Data.PublicNetworkAccess); + Assert.IsNull(elasticSan1.Data.ScaleUpProperties); await elasticSan1.DeleteAsync(WaitUntil.Completed); } diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/tests/Scenario/ElasticSanResourceTests.cs b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/tests/Scenario/ElasticSanResourceTests.cs index bd703197f436..bd1400e90c49 100644 --- a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/tests/Scenario/ElasticSanResourceTests.cs +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/tests/Scenario/ElasticSanResourceTests.cs @@ -72,6 +72,13 @@ public async Task UpdateAndDelete() BaseSizeTiB = 2, ExtendedCapacitySizeTiB = 7, }; + patch.ScaleUpProperties = new ScaleUpProperties + { + UnusedSizeTiB = 2, + IncreaseCapacityUnitByTiB = 2, + CapacityUnitScaleUpLimitTiB = 25, + AutoScalePolicyEnforcement = AutoScalePolicyEnforcement.Enabled, + }; patch.Tags.Add("tag3", "val3"); ElasticSanResource elasticSan2 = (await elasticSan1.UpdateAsync(WaitUntil.Completed, patch)).Value; Assert.AreEqual(2, elasticSan2.Data.BaseSizeTiB); @@ -79,6 +86,10 @@ public async Task UpdateAndDelete() Assert.AreEqual(elasticSan1.Id.Name, elasticSan2.Id.Name); Assert.AreEqual(elasticSan1.Data.Name, elasticSan2.Data.Name); Assert.GreaterOrEqual(elasticSan2.Data.Tags.Count, 1); + Assert.AreEqual(elasticSan2.Data.ScaleUpProperties.CapacityUnitScaleUpLimitTiB, 25); + Assert.AreEqual(elasticSan2.Data.ScaleUpProperties.UnusedSizeTiB, 2); + Assert.AreEqual(elasticSan2.Data.ScaleUpProperties.IncreaseCapacityUnitByTiB, 2); + Assert.AreEqual(elasticSan2.Data.ScaleUpProperties.AutoScalePolicyEnforcement.Value, AutoScalePolicyEnforcement.Enabled); await elasticSan1.DeleteAsync(WaitUntil.Completed); Assert.IsFalse(await _collection.ExistsAsync(elasticSanName)); diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/SystemEventsClient.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/SystemEventsClient.cs index 7508b4660ffb..3d19f6f8d843 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/SystemEventsClient.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/SystemEventsClient.cs @@ -30,14 +30,14 @@ protected SystemEventsClient() } /// Initializes a new instance of SystemEventsClient. - /// The to use. + /// Service host. /// is null. public SystemEventsClient(Uri endpoint) : this(endpoint, new SystemEventsClientOptions()) { } /// Initializes a new instance of SystemEventsClient. - /// The to use. + /// Service host. /// The options for configuring the client. /// is null. public SystemEventsClient(Uri endpoint, SystemEventsClientOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/CHANGELOG.md b/sdk/eventgrid/Azure.Messaging.EventGrid/CHANGELOG.md index ea511e5679db..cfdfbcce52d0 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/CHANGELOG.md +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 4.27.0-beta.1 (Unreleased) +## 4.28.0-beta.1 (Unreleased) ### Features Added @@ -10,6 +10,12 @@ ### Other Changes +## 4.27.0 (2024-10-14) + +### Features Added + +- Added `OnBehalfOfCallee` property to `AcsIncomingCallEventData` event. + ## 4.26.0 (2024-09-18) ### Features Added diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/api/Azure.Messaging.EventGrid.netstandard2.0.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/api/Azure.Messaging.EventGrid.netstandard2.0.cs index d46b804bc7de..b5a2de6e80e0 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/api/Azure.Messaging.EventGrid.netstandard2.0.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/api/Azure.Messaging.EventGrid.netstandard2.0.cs @@ -74,7 +74,9 @@ public static partial class EventGridModelFactory public static Azure.Messaging.EventGrid.SystemEvents.AcsEmailEngagementTrackingReportReceivedEventData AcsEmailEngagementTrackingReportReceivedEventData(string sender, string messageId, System.DateTimeOffset? userActionTimestamp, string engagementContext, string userAgent, Azure.Messaging.EventGrid.SystemEvents.AcsUserEngagement? engagement) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsEmailEngagementTrackingReportReceivedEventData AcsEmailEngagementTrackingReportReceivedEventData(string sender = null, string recipient = null, string messageId = null, System.DateTimeOffset? userActionTimestamp = default(System.DateTimeOffset?), string engagementContext = null, string userAgent = null, Azure.Messaging.EventGrid.SystemEvents.AcsUserEngagement? engagement = default(Azure.Messaging.EventGrid.SystemEvents.AcsUserEngagement?)) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsIncomingCallCustomContext AcsIncomingCallCustomContext(System.Collections.Generic.IReadOnlyDictionary sipHeaders = null, System.Collections.Generic.IReadOnlyDictionary voipHeaders = null) { throw null; } - public static Azure.Messaging.EventGrid.SystemEvents.AcsIncomingCallEventData AcsIncomingCallEventData(Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel toCommunicationIdentifier = null, Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel fromCommunicationIdentifier = null, string serverCallId = null, string callerDisplayName = null, Azure.Messaging.EventGrid.SystemEvents.AcsIncomingCallCustomContext customContext = null, string incomingCallContext = null, string correlationId = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsIncomingCallEventData AcsIncomingCallEventData(Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel toCommunicationIdentifier = null, Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel fromCommunicationIdentifier = null, string serverCallId = null, string callerDisplayName = null, Azure.Messaging.EventGrid.SystemEvents.AcsIncomingCallCustomContext customContext = null, string incomingCallContext = null, Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel onBehalfOfCallee = null, string correlationId = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.Messaging.EventGrid.SystemEvents.AcsIncomingCallEventData AcsIncomingCallEventData(Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel toCommunicationIdentifier, Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel fromCommunicationIdentifier, string serverCallId, string callerDisplayName, Azure.Messaging.EventGrid.SystemEvents.AcsIncomingCallCustomContext customContext, string incomingCallContext, string correlationId) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsMessageButtonContent AcsMessageButtonContent(string text = null, string payload = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsMessageContext AcsMessageContext(string from = null, string messageId = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsMessageInteractiveButtonReplyContent AcsMessageInteractiveButtonReplyContent(string buttonId = null, string title = null) { throw null; } @@ -1025,6 +1027,7 @@ internal AcsIncomingCallEventData() { } public Azure.Messaging.EventGrid.SystemEvents.AcsIncomingCallCustomContext CustomContext { get { throw null; } } public Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel FromCommunicationIdentifier { get { throw null; } } public string IncomingCallContext { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel OnBehalfOfCallee { get { throw null; } } public string ServerCallId { get { throw null; } } public Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel ToCommunicationIdentifier { get { throw null; } } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Azure.Messaging.EventGrid.csproj b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Azure.Messaging.EventGrid.csproj index bd7df53da744..2b4743a842a8 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Azure.Messaging.EventGrid.csproj +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Azure.Messaging.EventGrid.csproj @@ -2,9 +2,9 @@ This library can be used to publish events to Azure Event Grid and to consume events delivered by EventGrid. It also defines the event schemas for the events published to EventGrid by various Azure services. Microsoft Azure.Messaging.EventGrid client library - 4.27.0-beta.1 + 4.28.0-beta.1 - 4.26.0 + 4.27.0 Microsoft Azure EventGrid;Event Grid;Event Grid Publishing; true $(RequiredTargetFrameworks) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Customization/EventGridModelFactory.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Customization/EventGridModelFactory.cs index 66865ffa41ac..0a20091e92ab 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Customization/EventGridModelFactory.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Customization/EventGridModelFactory.cs @@ -694,6 +694,29 @@ public static AcsRouterJobReceivedEventData AcsRouterJobReceivedEventData(string return new AcsRouterJobReceivedEventData(jobId, channelReference, channelId, queueId, labels, tags, status, classificationPolicyId, priority, requestedWorkerSelectors?.ToList(), scheduledOn, unavailableForMatching); } + /// Initializes a new instance of . + /// The communication identifier of the target user. + /// The communication identifier of the user who initiated the call. + /// The Id of the server call. + /// Display name of caller. + /// Custom Context of Incoming Call. + /// Signed incoming call context. + /// CorrelationId (CallId). + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static AcsIncomingCallEventData AcsIncomingCallEventData(CommunicationIdentifierModel toCommunicationIdentifier, CommunicationIdentifierModel fromCommunicationIdentifier, string serverCallId, string callerDisplayName, AcsIncomingCallCustomContext customContext, string incomingCallContext, string correlationId) + { + return new AcsIncomingCallEventData( + toCommunicationIdentifier, + fromCommunicationIdentifier, + serverCallId, + callerDisplayName, + customContext, + incomingCallContext, + default, + correlationId); + } + /// Initializes a new instance of ResourceNotificationsResourceUpdatedDetails. /// id of the resource for which the event is being emitted. /// name of the resource for which the event is being emitted. diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/EventGridModelFactory.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/EventGridModelFactory.cs index 02ef86bc66ca..36bbe3accadf 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/EventGridModelFactory.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/EventGridModelFactory.cs @@ -2104,9 +2104,10 @@ public static WebAppServicePlanUpdatedEventDataSku WebAppServicePlanUpdatedEvent /// Display name of caller. /// Custom Context of Incoming Call. /// Signed incoming call context. + /// The communication identifier of the user on behalf of whom the call is made. /// CorrelationId (CallId). /// A new instance for mocking. - public static AcsIncomingCallEventData AcsIncomingCallEventData(CommunicationIdentifierModel toCommunicationIdentifier = null, CommunicationIdentifierModel fromCommunicationIdentifier = null, string serverCallId = null, string callerDisplayName = null, AcsIncomingCallCustomContext customContext = null, string incomingCallContext = null, string correlationId = null) + public static AcsIncomingCallEventData AcsIncomingCallEventData(CommunicationIdentifierModel toCommunicationIdentifier = null, CommunicationIdentifierModel fromCommunicationIdentifier = null, string serverCallId = null, string callerDisplayName = null, AcsIncomingCallCustomContext customContext = null, string incomingCallContext = null, CommunicationIdentifierModel onBehalfOfCallee = null, string correlationId = null) { return new AcsIncomingCallEventData( toCommunicationIdentifier, @@ -2115,6 +2116,7 @@ public static AcsIncomingCallEventData AcsIncomingCallEventData(CommunicationIde callerDisplayName, customContext, incomingCallContext, + onBehalfOfCallee, correlationId); } @@ -3534,7 +3536,7 @@ public static AcsMessageInteractiveButtonReplyContent AcsMessageInteractiveButto /// Initializes a new instance of . /// The ID of the selected list item. /// The title of the selected list item. - /// The sescription of the selected row. + /// The description of the selected row. /// A new instance for mocking. public static AcsMessageInteractiveListReplyContent AcsMessageInteractiveListReplyContent(string listItemId = null, string title = null, string description = null) { diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsIncomingCallEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsIncomingCallEventData.Serialization.cs index b612c18397f3..dbd0f968eb7f 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsIncomingCallEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsIncomingCallEventData.Serialization.cs @@ -26,6 +26,7 @@ internal static AcsIncomingCallEventData DeserializeAcsIncomingCallEventData(Jso string callerDisplayName = default; AcsIncomingCallCustomContext customContext = default; string incomingCallContext = default; + CommunicationIdentifierModel onBehalfOfCallee = default; string correlationId = default; foreach (var property in element.EnumerateObject()) { @@ -71,6 +72,15 @@ internal static AcsIncomingCallEventData DeserializeAcsIncomingCallEventData(Jso incomingCallContext = property.Value.GetString(); continue; } + if (property.NameEquals("onBehalfOfCallee"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + onBehalfOfCallee = CommunicationIdentifierModel.DeserializeCommunicationIdentifierModel(property.Value); + continue; + } if (property.NameEquals("correlationId"u8)) { correlationId = property.Value.GetString(); @@ -84,6 +94,7 @@ internal static AcsIncomingCallEventData DeserializeAcsIncomingCallEventData(Jso callerDisplayName, customContext, incomingCallContext, + onBehalfOfCallee, correlationId); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsIncomingCallEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsIncomingCallEventData.cs index afef29bfb67e..bfde5f5399b1 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsIncomingCallEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsIncomingCallEventData.cs @@ -22,8 +22,9 @@ internal AcsIncomingCallEventData() /// Display name of caller. /// Custom Context of Incoming Call. /// Signed incoming call context. + /// The communication identifier of the user on behalf of whom the call is made. /// CorrelationId (CallId). - internal AcsIncomingCallEventData(CommunicationIdentifierModel toCommunicationIdentifier, CommunicationIdentifierModel fromCommunicationIdentifier, string serverCallId, string callerDisplayName, AcsIncomingCallCustomContext customContext, string incomingCallContext, string correlationId) + internal AcsIncomingCallEventData(CommunicationIdentifierModel toCommunicationIdentifier, CommunicationIdentifierModel fromCommunicationIdentifier, string serverCallId, string callerDisplayName, AcsIncomingCallCustomContext customContext, string incomingCallContext, CommunicationIdentifierModel onBehalfOfCallee, string correlationId) { ToCommunicationIdentifier = toCommunicationIdentifier; FromCommunicationIdentifier = fromCommunicationIdentifier; @@ -31,6 +32,7 @@ internal AcsIncomingCallEventData(CommunicationIdentifierModel toCommunicationId CallerDisplayName = callerDisplayName; CustomContext = customContext; IncomingCallContext = incomingCallContext; + OnBehalfOfCallee = onBehalfOfCallee; CorrelationId = correlationId; } @@ -46,6 +48,8 @@ internal AcsIncomingCallEventData(CommunicationIdentifierModel toCommunicationId public AcsIncomingCallCustomContext CustomContext { get; } /// Signed incoming call context. public string IncomingCallContext { get; } + /// The communication identifier of the user on behalf of whom the call is made. + public CommunicationIdentifierModel OnBehalfOfCallee { get; } /// CorrelationId (CallId). public string CorrelationId { get; } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsMessageInteractiveListReplyContent.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsMessageInteractiveListReplyContent.cs index 0ae51800a68b..84d58f3c7f58 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsMessageInteractiveListReplyContent.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsMessageInteractiveListReplyContent.cs @@ -18,7 +18,7 @@ internal AcsMessageInteractiveListReplyContent() /// Initializes a new instance of . /// The ID of the selected list item. /// The title of the selected list item. - /// The sescription of the selected row. + /// The description of the selected row. internal AcsMessageInteractiveListReplyContent(string listItemId, string title, string description) { ListItemId = listItemId; @@ -30,7 +30,7 @@ internal AcsMessageInteractiveListReplyContent(string listItemId, string title, public string ListItemId { get; } /// The title of the selected list item. public string Title { get; } - /// The sescription of the selected row. + /// The description of the selected row. public string Description { get; } } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/autorest.md b/sdk/eventgrid/Azure.Messaging.EventGrid/src/autorest.md index 93e46b27d82f..da4fb78ad757 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/autorest.md +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/autorest.md @@ -4,7 +4,7 @@ Run `dotnet build /t:GenerateCode` to generate code. ``` yaml title: EventGridClient -require: https://github.com/Azure/azure-rest-api-specs/blob/6c709e5a3325eaa862649acee2252ce1c8166042/specification/eventgrid/data-plane/readme.md +require: https://github.com/Azure/azure-rest-api-specs/blob/012021c786c360e0c34faf7af888c7fd7dbe2df5/specification/eventgrid/data-plane/readme.md generation1-convenience-client: true model-factory-for-hlc: - MediaJobOutputAsset @@ -191,7 +191,6 @@ directive: - from: swagger-document where: $.definitions.MediaJobOutput transform: > - $.required.push("@odata.type"); $["x-csharp-usage"] = "model,output"; ``` diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/CHANGELOG.md b/sdk/eventgrid/Azure.ResourceManager.EventGrid/CHANGELOG.md index 1c11b222b6e2..22b8157ba98e 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/CHANGELOG.md +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/CHANGELOG.md @@ -4,6 +4,8 @@ ### Features Added +- Exposed `JsonModelWriteCore` for model serialization procedure. + ### Breaking Changes ### Bugs Fixed diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/api/Azure.ResourceManager.EventGrid.netstandard2.0.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/api/Azure.ResourceManager.EventGrid.netstandard2.0.cs index 00479d78b5ee..be57a6a1a94c 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/api/Azure.ResourceManager.EventGrid.netstandard2.0.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/api/Azure.ResourceManager.EventGrid.netstandard2.0.cs @@ -25,6 +25,7 @@ public CaCertificateData() { } public System.DateTimeOffset? ExpiryTimeInUtc { get { throw null; } } public System.DateTimeOffset? IssueTimeInUtc { get { throw null; } } public Azure.ResourceManager.EventGrid.Models.CaCertificateProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.CaCertificateData 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.EventGrid.CaCertificateData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -143,6 +144,7 @@ public partial class DomainTopicData : Azure.ResourceManager.Models.ResourceData { public DomainTopicData() { } public Azure.ResourceManager.EventGrid.Models.DomainTopicProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.DomainTopicData 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.EventGrid.DomainTopicData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -247,6 +249,7 @@ public EventGridDomainData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.EventGrid.Models.EventGridDomainProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.EventGrid.Models.EventGridPublicNetworkAccess? PublicNetworkAccess { get { throw null; } set { } } public Azure.ResourceManager.EventGrid.Models.EventGridSku? SkuName { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.EventGridDomainData 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.EventGrid.EventGridDomainData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -494,6 +497,7 @@ public EventGridNamespaceClientData() { } public string Description { get { throw null; } set { } } public Azure.ResourceManager.EventGrid.Models.EventGridNamespaceClientProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.EventGrid.Models.EventGridNamespaceClientState? State { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.EventGridNamespaceClientData 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.EventGrid.EventGridNamespaceClientData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -523,6 +527,7 @@ public EventGridNamespaceClientGroupData() { } public string Description { get { throw null; } set { } } public Azure.ResourceManager.EventGrid.Models.ClientGroupProvisioningState? ProvisioningState { get { throw null; } } public string Query { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.EventGridNamespaceClientGroupData 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.EventGrid.EventGridNamespaceClientGroupData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -597,6 +602,7 @@ public EventGridNamespaceData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.EventGrid.Models.NamespaceSku Sku { get { throw null; } set { } } public Azure.ResourceManager.EventGrid.Models.TopicsConfiguration TopicsConfiguration { get { throw null; } set { } } public Azure.ResourceManager.EventGrid.Models.TopicSpacesConfiguration TopicSpacesConfiguration { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.EventGridNamespaceData 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.EventGrid.EventGridNamespaceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -628,6 +634,7 @@ public EventGridNamespacePermissionBindingData() { } public Azure.ResourceManager.EventGrid.Models.PermissionType? Permission { get { throw null; } set { } } public Azure.ResourceManager.EventGrid.Models.PermissionBindingProvisioningState? ProvisioningState { get { throw null; } } public string TopicSpaceName { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.EventGridNamespacePermissionBindingData 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.EventGrid.EventGridNamespacePermissionBindingData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -745,6 +752,7 @@ public EventGridPrivateEndpointConnectionData() { } public System.Collections.Generic.IList GroupIds { get { throw null; } } public Azure.Core.ResourceIdentifier PrivateEndpointId { get { throw null; } set { } } public Azure.ResourceManager.EventGrid.Models.EventGridResourceProvisioningState? ProvisioningState { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.EventGridPrivateEndpointConnectionData 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.EventGrid.EventGridPrivateEndpointConnectionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -758,6 +766,7 @@ internal EventGridPrivateLinkResourceData() { } public string GroupId { get { throw null; } } public System.Collections.Generic.IReadOnlyList RequiredMembers { get { throw null; } } public System.Collections.Generic.IReadOnlyList RequiredZoneNames { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.EventGridPrivateLinkResourceData 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.EventGrid.EventGridPrivateLinkResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -778,6 +787,7 @@ public EventGridSubscriptionData() { } public Azure.ResourceManager.EventGrid.Models.EventSubscriptionProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.EventGrid.Models.EventSubscriptionRetryPolicy RetryPolicy { get { throw null; } set { } } public string Topic { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.EventGridSubscriptionData 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.EventGrid.EventGridSubscriptionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -820,6 +830,7 @@ public EventGridTopicData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.EventGrid.Models.EventGridTopicProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.EventGrid.Models.EventGridPublicNetworkAccess? PublicNetworkAccess { get { throw null; } set { } } public Azure.ResourceManager.EventGrid.Models.EventGridSku? SkuName { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.EventGridTopicData 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.EventGrid.EventGridTopicData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -978,6 +989,7 @@ public partial class ExtensionTopicData : Azure.ResourceManager.Models.ResourceD public ExtensionTopicData() { } public string Description { get { throw null; } set { } } public string SystemTopic { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.ExtensionTopicData 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.EventGrid.ExtensionTopicData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1023,6 +1035,7 @@ public NamespaceTopicData() { } public Azure.ResourceManager.EventGrid.Models.EventInputSchema? InputSchema { get { throw null; } set { } } public Azure.ResourceManager.EventGrid.Models.NamespaceTopicProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.EventGrid.Models.PublisherType? PublisherType { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.NamespaceTopicData 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.EventGrid.NamespaceTopicData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1054,6 +1067,7 @@ public NamespaceTopicEventSubscriptionData() { } public System.DateTimeOffset? ExpireOn { get { throw null; } set { } } public Azure.ResourceManager.EventGrid.Models.FiltersConfiguration FiltersConfiguration { get { throw null; } set { } } public Azure.ResourceManager.EventGrid.Models.SubscriptionProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.NamespaceTopicEventSubscriptionData 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.EventGrid.NamespaceTopicEventSubscriptionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1117,6 +1131,7 @@ public NetworkSecurityPerimeterConfigurationData() { } public System.Collections.Generic.IList ProvisioningIssues { get { throw null; } } public Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterConfigProvisioningState? ProvisioningState { get { throw null; } set { } } public Azure.ResourceManager.EventGrid.Models.ResourceAssociation ResourceAssociation { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.NetworkSecurityPerimeterConfigurationData 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.EventGrid.NetworkSecurityPerimeterConfigurationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1128,6 +1143,7 @@ public partial class PartnerConfigurationData : Azure.ResourceManager.Models.Tra public PartnerConfigurationData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.EventGrid.Models.PartnerAuthorization PartnerAuthorization { get { throw null; } set { } } public Azure.ResourceManager.EventGrid.Models.PartnerConfigurationProvisioningState? ProvisioningState { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.PartnerConfigurationData 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.EventGrid.PartnerConfigurationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1192,6 +1208,7 @@ public PartnerDestinationData(Azure.Core.AzureLocation location) { } public string MessageForActivation { get { throw null; } set { } } public System.Guid? PartnerRegistrationImmutableId { get { throw null; } set { } } public Azure.ResourceManager.EventGrid.Models.PartnerDestinationProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.PartnerDestinationData 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.EventGrid.PartnerDestinationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1252,6 +1269,7 @@ public PartnerNamespaceChannelData() { } public Azure.ResourceManager.EventGrid.Models.PartnerTopicInfo PartnerTopicInfo { get { throw null; } set { } } public Azure.ResourceManager.EventGrid.Models.PartnerNamespaceChannelProvisioningState? ProvisioningState { get { throw null; } set { } } public Azure.ResourceManager.EventGrid.Models.PartnerTopicReadinessState? ReadinessState { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.PartnerNamespaceChannelData 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.EventGrid.PartnerNamespaceChannelData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1308,6 +1326,7 @@ public PartnerNamespaceData(Azure.Core.AzureLocation location) { } public System.Collections.Generic.IReadOnlyList PrivateEndpointConnections { get { throw null; } } public Azure.ResourceManager.EventGrid.Models.PartnerNamespaceProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.EventGrid.Models.EventGridPublicNetworkAccess? PublicNetworkAccess { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.PartnerNamespaceData 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.EventGrid.PartnerNamespaceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1404,6 +1423,7 @@ public partial class PartnerRegistrationData : Azure.ResourceManager.Models.Trac public PartnerRegistrationData(Azure.Core.AzureLocation location) { } public System.Guid? PartnerRegistrationImmutableId { get { throw null; } set { } } public Azure.ResourceManager.EventGrid.Models.PartnerRegistrationProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.PartnerRegistrationData 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.EventGrid.PartnerRegistrationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1464,6 +1484,7 @@ public PartnerTopicData(Azure.Core.AzureLocation location) { } public string PartnerTopicFriendlyDescription { get { throw null; } set { } } public Azure.ResourceManager.EventGrid.Models.PartnerTopicProvisioningState? ProvisioningState { get { throw null; } } public string Source { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.PartnerTopicData 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.EventGrid.PartnerTopicData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1567,6 +1588,7 @@ public SystemTopicData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.EventGrid.Models.EventGridResourceProvisioningState? ProvisioningState { get { throw null; } } public Azure.Core.ResourceIdentifier Source { get { throw null; } set { } } public string TopicType { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.SystemTopicData 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.EventGrid.SystemTopicData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1736,6 +1758,7 @@ public TopicSpaceData() { } public string Description { get { throw null; } set { } } public Azure.ResourceManager.EventGrid.Models.TopicSpaceProvisioningState? ProvisioningState { get { throw null; } } public System.Collections.Generic.IList TopicTemplates { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.TopicSpaceData 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.EventGrid.TopicSpaceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1789,6 +1812,7 @@ public TopicTypeData() { } public string SourceResourceFormat { get { throw null; } set { } } public System.Collections.Generic.IList SupportedLocations { get { throw null; } } public System.Collections.Generic.IList SupportedScopesForSource { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.TopicTypeData 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.EventGrid.TopicTypeData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1836,6 +1860,7 @@ public VerifiedPartnerData() { } public System.Guid? PartnerRegistrationImmutableId { get { throw null; } set { } } public Azure.ResourceManager.EventGrid.Models.PartnerDetails PartnerTopicDetails { get { throw null; } set { } } public Azure.ResourceManager.EventGrid.Models.VerifiedPartnerProvisioningState? ProvisioningState { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.VerifiedPartnerData 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.EventGrid.VerifiedPartnerData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1985,6 +2010,7 @@ public abstract partial class AdvancedFilter : System.ClientModel.Primitives.IJs { protected AdvancedFilter() { } public string Key { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.AdvancedFilter 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.EventGrid.Models.AdvancedFilter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2056,6 +2082,7 @@ public partial class AzureADPartnerClientAuthentication : Azure.ResourceManager. public AzureADPartnerClientAuthentication() { } public System.Uri AzureActiveDirectoryApplicationIdOrUri { get { throw null; } set { } } public string AzureActiveDirectoryTenantId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.AzureADPartnerClientAuthentication 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.EventGrid.Models.AzureADPartnerClientAuthentication System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2069,6 +2096,7 @@ public AzureFunctionEventSubscriptionDestination() { } public int? MaxEventsPerBatch { get { throw null; } set { } } public int? PreferredBatchSizeInKilobytes { get { throw null; } set { } } public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.AzureFunctionEventSubscriptionDestination 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.EventGrid.Models.AzureFunctionEventSubscriptionDestination System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2079,6 +2107,7 @@ public partial class BoolEqualsAdvancedFilter : Azure.ResourceManager.EventGrid. { public BoolEqualsAdvancedFilter() { } public bool? Value { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.BoolEqualsAdvancedFilter 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.EventGrid.Models.BoolEqualsAdvancedFilter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2089,6 +2118,7 @@ public partial class BoolEqualsFilter : Azure.ResourceManager.EventGrid.Models.E { public BoolEqualsFilter() { } public bool? Value { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.BoolEqualsFilter 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.EventGrid.Models.BoolEqualsFilter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2123,6 +2153,7 @@ public partial class ClientAuthenticationSettings : System.ClientModel.Primitive public ClientAuthenticationSettings() { } public System.Collections.Generic.IList AlternativeAuthenticationNameSources { get { throw null; } } public Azure.ResourceManager.EventGrid.Models.CustomJwtAuthenticationSettings CustomJwtAuthentication { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.ClientAuthenticationSettings 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.EventGrid.Models.ClientAuthenticationSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2134,6 +2165,7 @@ public partial class ClientCertificateAuthentication : System.ClientModel.Primit public ClientCertificateAuthentication() { } public System.Collections.Generic.IList AllowedThumbprints { get { throw null; } } public Azure.ResourceManager.EventGrid.Models.ClientCertificateValidationScheme? ValidationScheme { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.ClientCertificateAuthentication 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.EventGrid.Models.ClientCertificateAuthentication System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2194,6 +2226,7 @@ public CustomDomainConfiguration(string fullyQualifiedDomainName) { } public string FullyQualifiedDomainName { get { throw null; } set { } } public Azure.ResourceManager.EventGrid.Models.CustomDomainIdentity Identity { get { throw null; } set { } } public Azure.ResourceManager.EventGrid.Models.CustomDomainValidationState? ValidationState { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.CustomDomainConfiguration 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.EventGrid.Models.CustomDomainConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2205,6 +2238,7 @@ public partial class CustomDomainIdentity : System.ClientModel.Primitives.IJsonM public CustomDomainIdentity() { } public Azure.ResourceManager.EventGrid.Models.CustomDomainIdentityType? IdentityType { get { throw null; } set { } } public string UserAssignedIdentity { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.CustomDomainIdentity 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.EventGrid.Models.CustomDomainIdentity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2234,6 +2268,7 @@ public partial class CustomDomainOwnershipValidationResult : System.ClientModel. internal CustomDomainOwnershipValidationResult() { } public System.Collections.Generic.IReadOnlyList CustomDomainsForTopicsConfiguration { get { throw null; } } public System.Collections.Generic.IReadOnlyList CustomDomainsForTopicSpacesConfiguration { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.CustomDomainOwnershipValidationResult 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.EventGrid.Models.CustomDomainOwnershipValidationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2264,6 +2299,7 @@ public partial class CustomJwtAuthenticationManagedIdentity : System.ClientModel public CustomJwtAuthenticationManagedIdentity(Azure.ResourceManager.EventGrid.Models.CustomJwtAuthenticationManagedIdentityType identityType) { } public Azure.ResourceManager.EventGrid.Models.CustomJwtAuthenticationManagedIdentityType IdentityType { get { throw null; } set { } } public string UserAssignedIdentity { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.CustomJwtAuthenticationManagedIdentity 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.EventGrid.Models.CustomJwtAuthenticationManagedIdentity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2293,6 +2329,7 @@ public partial class CustomJwtAuthenticationSettings : System.ClientModel.Primit public CustomJwtAuthenticationSettings() { } public System.Collections.Generic.IList IssuerCertificates { get { throw null; } } public string TokenIssuer { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.CustomJwtAuthenticationSettings 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.EventGrid.Models.CustomJwtAuthenticationSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2320,6 +2357,7 @@ public CustomJwtAuthenticationSettings() { } public abstract partial class DeadLetterDestination : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { protected DeadLetterDestination() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.DeadLetterDestination 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.EventGrid.Models.DeadLetterDestination System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2331,6 +2369,7 @@ public partial class DeadLetterWithResourceIdentity : System.ClientModel.Primiti public DeadLetterWithResourceIdentity() { } public Azure.ResourceManager.EventGrid.Models.DeadLetterDestination DeadLetterDestination { get { throw null; } set { } } public Azure.ResourceManager.EventGrid.Models.EventSubscriptionIdentity Identity { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.DeadLetterWithResourceIdentity 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.EventGrid.Models.DeadLetterWithResourceIdentity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2341,6 +2380,7 @@ public abstract partial class DeliveryAttributeMapping : System.ClientModel.Prim { protected DeliveryAttributeMapping() { } public string Name { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.DeliveryAttributeMapping 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.EventGrid.Models.DeliveryAttributeMapping System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2353,6 +2393,7 @@ public DeliveryConfiguration() { } public Azure.ResourceManager.EventGrid.Models.DeliveryMode? DeliveryMode { get { throw null; } set { } } public Azure.ResourceManager.EventGrid.Models.PushInfo Push { get { throw null; } set { } } public Azure.ResourceManager.EventGrid.Models.QueueInfo Queue { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.DeliveryConfiguration 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.EventGrid.Models.DeliveryConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2399,6 +2440,7 @@ public partial class DeliveryWithResourceIdentity : System.ClientModel.Primitive public DeliveryWithResourceIdentity() { } public Azure.ResourceManager.EventGrid.Models.EventSubscriptionDestination Destination { get { throw null; } set { } } public Azure.ResourceManager.EventGrid.Models.EventSubscriptionIdentity Identity { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.DeliveryWithResourceIdentity 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.EventGrid.Models.DeliveryWithResourceIdentity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2431,6 +2473,7 @@ public partial class DynamicDeliveryAttributeMapping : Azure.ResourceManager.Eve { public DynamicDeliveryAttributeMapping() { } public string SourceField { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.DynamicDeliveryAttributeMapping 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.EventGrid.Models.DynamicDeliveryAttributeMapping System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2442,6 +2485,7 @@ public partial class DynamicRoutingEnrichment : System.ClientModel.Primitives.IJ public DynamicRoutingEnrichment() { } public string Key { get { throw null; } set { } } public string Value { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.DynamicRoutingEnrichment 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.EventGrid.Models.DynamicRoutingEnrichment System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2498,6 +2542,7 @@ public EventGridDomainPatch() { } public Azure.ResourceManager.EventGrid.Models.EventGridPublicNetworkAccess? PublicNetworkAccess { get { throw null; } set { } } public Azure.ResourceManager.EventGrid.Models.EventGridSku? SkuName { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.EventGridDomainPatch 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.EventGrid.Models.EventGridDomainPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2530,6 +2575,7 @@ public partial class EventGridDomainRegenerateKeyContent : System.ClientModel.Pr { public EventGridDomainRegenerateKeyContent(string keyName) { } public string KeyName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.EventGridDomainRegenerateKeyContent 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.EventGrid.Models.EventGridDomainRegenerateKeyContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2541,6 +2587,7 @@ public partial class EventGridDomainSharedAccessKeys : System.ClientModel.Primit internal EventGridDomainSharedAccessKeys() { } public string Key1 { get { throw null; } } public string Key2 { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.EventGridDomainSharedAccessKeys 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.EventGrid.Models.EventGridDomainSharedAccessKeys System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2551,6 +2598,7 @@ public abstract partial class EventGridFilter : System.ClientModel.Primitives.IJ { protected EventGridFilter() { } public string Key { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.EventGridFilter 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.EventGrid.Models.EventGridFilter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2562,6 +2610,7 @@ public partial class EventGridInboundIPRule : System.ClientModel.Primitives.IJso public EventGridInboundIPRule() { } public Azure.ResourceManager.EventGrid.Models.EventGridIPActionType? Action { get { throw null; } set { } } public string IPMask { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.EventGridInboundIPRule 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.EventGrid.Models.EventGridInboundIPRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2590,6 +2639,7 @@ public EventGridInboundIPRule() { } public abstract partial class EventGridInputSchemaMapping : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { protected EventGridInputSchemaMapping() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.EventGridInputSchemaMapping 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.EventGrid.Models.EventGridInputSchemaMapping System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2622,6 +2672,7 @@ public EventGridJsonInputSchemaMapping() { } public string IdSourceField { get { throw null; } set { } } public Azure.ResourceManager.EventGrid.Models.JsonFieldWithDefault Subject { get { throw null; } set { } } public string TopicSourceField { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.EventGridJsonInputSchemaMapping 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.EventGrid.Models.EventGridJsonInputSchemaMapping System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2679,6 +2730,7 @@ public EventGridNamespacePatch() { } public System.Collections.Generic.IDictionary Tags { get { throw null; } } public System.Collections.Generic.IList TopicsCustomDomains { get { throw null; } } public Azure.ResourceManager.EventGrid.Models.UpdateTopicSpacesConfigurationInfo TopicSpacesConfiguration { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.EventGridNamespacePatch 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.EventGrid.Models.EventGridNamespacePatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2691,6 +2743,7 @@ public EventGridPartnerContent() { } public System.DateTimeOffset? AuthorizationExpireOn { get { throw null; } set { } } public string PartnerName { get { throw null; } set { } } public System.Guid? PartnerRegistrationImmutableId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.EventGridPartnerContent 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.EventGrid.Models.EventGridPartnerContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2703,6 +2756,7 @@ public EventGridPrivateEndpointConnectionState() { } public string ActionsRequired { get { throw null; } set { } } public string Description { get { throw null; } set { } } public Azure.ResourceManager.EventGrid.Models.EventGridPrivateEndpointPersistedConnectionStatus? Status { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.EventGridPrivateEndpointConnectionState 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.EventGrid.Models.EventGridPrivateEndpointConnectionState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2835,6 +2889,7 @@ public EventGridSubscriptionPatch() { } public Azure.ResourceManager.EventGrid.Models.EventSubscriptionFilter Filter { get { throw null; } set { } } public System.Collections.Generic.IList Labels { get { throw null; } } public Azure.ResourceManager.EventGrid.Models.EventSubscriptionRetryPolicy RetryPolicy { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.EventGridSubscriptionPatch 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.EventGrid.Models.EventGridSubscriptionPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2853,6 +2908,7 @@ public EventGridTopicPatch() { } public Azure.ResourceManager.EventGrid.Models.EventGridPublicNetworkAccess? PublicNetworkAccess { get { throw null; } set { } } public Azure.ResourceManager.EventGrid.Models.EventGridSku? SkuName { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.EventGridTopicPatch 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.EventGrid.Models.EventGridTopicPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2886,6 +2942,7 @@ public partial class EventHubEventSubscriptionDestination : Azure.ResourceManage public EventHubEventSubscriptionDestination() { } public System.Collections.Generic.IList DeliveryAttributeMappings { get { throw null; } } public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.EventHubEventSubscriptionDestination 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.EventGrid.Models.EventHubEventSubscriptionDestination System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2912,6 +2969,7 @@ public EventHubEventSubscriptionDestination() { } public abstract partial class EventSubscriptionDestination : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { protected EventSubscriptionDestination() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.EventSubscriptionDestination 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.EventGrid.Models.EventSubscriptionDestination System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2927,6 +2985,7 @@ public EventSubscriptionFilter() { } public bool? IsSubjectCaseSensitive { get { throw null; } set { } } public string SubjectBeginsWith { get { throw null; } set { } } public string SubjectEndsWith { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.EventSubscriptionFilter 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.EventGrid.Models.EventSubscriptionFilter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2937,6 +2996,7 @@ public partial class EventSubscriptionFullUri : System.ClientModel.Primitives.IJ { internal EventSubscriptionFullUri() { } public System.Uri Endpoint { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.EventSubscriptionFullUri 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.EventGrid.Models.EventSubscriptionFullUri System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2948,6 +3008,7 @@ public partial class EventSubscriptionIdentity : System.ClientModel.Primitives.I public EventSubscriptionIdentity() { } public Azure.ResourceManager.EventGrid.Models.EventSubscriptionIdentityType? IdentityType { get { throw null; } set { } } public string UserAssignedIdentity { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.EventSubscriptionIdentity 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.EventGrid.Models.EventSubscriptionIdentity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3000,6 +3061,7 @@ public partial class EventSubscriptionRetryPolicy : System.ClientModel.Primitive public EventSubscriptionRetryPolicy() { } public int? EventTimeToLiveInMinutes { get { throw null; } set { } } public int? MaxDeliveryAttempts { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.EventSubscriptionRetryPolicy 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.EventGrid.Models.EventSubscriptionRetryPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3013,6 +3075,7 @@ public EventTypeUnderTopic() { } public string DisplayName { get { throw null; } set { } } public bool? IsInDefaultSet { get { throw null; } set { } } public System.Uri SchemaUri { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.EventTypeUnderTopic 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.EventGrid.Models.EventTypeUnderTopic System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3024,6 +3087,7 @@ public partial class FiltersConfiguration : System.ClientModel.Primitives.IJsonM public FiltersConfiguration() { } public System.Collections.Generic.IList Filters { get { throw null; } } public System.Collections.Generic.IList IncludedEventTypes { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.FiltersConfiguration 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.EventGrid.Models.FiltersConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3035,6 +3099,7 @@ public partial class HybridConnectionEventSubscriptionDestination : Azure.Resour public HybridConnectionEventSubscriptionDestination() { } public System.Collections.Generic.IList DeliveryAttributeMappings { get { throw null; } } public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.HybridConnectionEventSubscriptionDestination 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.EventGrid.Models.HybridConnectionEventSubscriptionDestination System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3048,6 +3113,7 @@ public InlineEventProperties() { } public string Description { get { throw null; } set { } } public string DisplayName { get { throw null; } set { } } public System.Uri DocumentationUri { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.InlineEventProperties 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.EventGrid.Models.InlineEventProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3057,6 +3123,7 @@ public InlineEventProperties() { } public partial class IsNotNullAdvancedFilter : Azure.ResourceManager.EventGrid.Models.AdvancedFilter, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public IsNotNullAdvancedFilter() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.IsNotNullAdvancedFilter 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.EventGrid.Models.IsNotNullAdvancedFilter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3066,6 +3133,7 @@ public IsNotNullAdvancedFilter() { } public partial class IsNotNullFilter : Azure.ResourceManager.EventGrid.Models.EventGridFilter, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public IsNotNullFilter() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.IsNotNullFilter 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.EventGrid.Models.IsNotNullFilter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3075,6 +3143,7 @@ public IsNotNullFilter() { } public partial class IsNullOrUndefinedAdvancedFilter : Azure.ResourceManager.EventGrid.Models.AdvancedFilter, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public IsNullOrUndefinedAdvancedFilter() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.IsNullOrUndefinedAdvancedFilter 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.EventGrid.Models.IsNullOrUndefinedAdvancedFilter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3084,6 +3153,7 @@ public IsNullOrUndefinedAdvancedFilter() { } public partial class IsNullOrUndefinedFilter : Azure.ResourceManager.EventGrid.Models.EventGridFilter, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public IsNullOrUndefinedFilter() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.IsNullOrUndefinedFilter 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.EventGrid.Models.IsNullOrUndefinedFilter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3095,6 +3165,7 @@ public partial class IssuerCertificateInfo : System.ClientModel.Primitives.IJson public IssuerCertificateInfo(System.Uri certificateUri) { } public System.Uri CertificateUri { get { throw null; } set { } } public Azure.ResourceManager.EventGrid.Models.CustomJwtAuthenticationManagedIdentity Identity { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.IssuerCertificateInfo 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.EventGrid.Models.IssuerCertificateInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3106,6 +3177,7 @@ public partial class JsonFieldWithDefault : System.ClientModel.Primitives.IJsonM public JsonFieldWithDefault() { } public string DefaultValue { get { throw null; } set { } } public string SourceField { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.JsonFieldWithDefault 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.EventGrid.Models.JsonFieldWithDefault System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3118,6 +3190,7 @@ public MonitorAlertEventSubscriptionDestination() { } public System.Collections.Generic.IList ActionGroups { get { throw null; } } public string Description { get { throw null; } set { } } public Azure.ResourceManager.EventGrid.Models.MonitorAlertSeverity? Severity { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.MonitorAlertEventSubscriptionDestination 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.EventGrid.Models.MonitorAlertEventSubscriptionDestination System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3175,6 +3248,7 @@ public partial class NamespaceRegenerateKeyContent : System.ClientModel.Primitiv { public NamespaceRegenerateKeyContent(string keyName) { } public string KeyName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.NamespaceRegenerateKeyContent 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.EventGrid.Models.NamespaceRegenerateKeyContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3186,6 +3260,7 @@ public partial class NamespaceSharedAccessKeys : System.ClientModel.Primitives.I internal NamespaceSharedAccessKeys() { } public string Key1 { get { throw null; } } public string Key2 { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.NamespaceSharedAccessKeys 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.EventGrid.Models.NamespaceSharedAccessKeys System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3197,6 +3272,7 @@ public partial class NamespaceSku : 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.EventGrid.Models.NamespaceSku System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3207,6 +3283,7 @@ public partial class NamespaceTopicEventSubscriptionDestination : Azure.Resource { public NamespaceTopicEventSubscriptionDestination() { } public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.NamespaceTopicEventSubscriptionDestination 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.EventGrid.Models.NamespaceTopicEventSubscriptionDestination System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3220,6 +3297,7 @@ public NamespaceTopicEventSubscriptionPatch() { } public Azure.ResourceManager.EventGrid.Models.DeliverySchema? EventDeliverySchema { get { throw null; } set { } } public System.DateTimeOffset? ExpireOn { get { throw null; } set { } } public Azure.ResourceManager.EventGrid.Models.FiltersConfiguration FiltersConfiguration { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.NamespaceTopicEventSubscriptionPatch 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.EventGrid.Models.NamespaceTopicEventSubscriptionPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3230,6 +3308,7 @@ public partial class NamespaceTopicPatch : System.ClientModel.Primitives.IJsonMo { public NamespaceTopicPatch() { } public int? EventRetentionInDays { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.NamespaceTopicPatch 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.EventGrid.Models.NamespaceTopicPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3314,6 +3393,7 @@ public NetworkSecurityPerimeterConfigurationIssues() { } public Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterConfigurationIssueSeverity? Severity { get { throw null; } set { } } public System.Collections.Generic.IList SuggestedAccessRules { get { throw null; } } public System.Collections.Generic.IList SuggestedResourceIds { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterConfigurationIssues 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.EventGrid.Models.NetworkSecurityPerimeterConfigurationIssues System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3366,6 +3446,7 @@ public NetworkSecurityPerimeterConfigurationProfile() { } public string DiagnosticSettingsVersion { get { throw null; } set { } } public System.Collections.Generic.IList EnabledLogCategories { get { throw null; } } public string Name { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterConfigurationProfile 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.EventGrid.Models.NetworkSecurityPerimeterConfigurationProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3378,6 +3459,7 @@ public NetworkSecurityPerimeterInfo() { } public string Id { get { throw null; } set { } } public Azure.Core.AzureLocation? Location { get { throw null; } set { } } public string PerimeterGuid { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterInfo 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.EventGrid.Models.NetworkSecurityPerimeterInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3397,6 +3479,7 @@ public NetworkSecurityPerimeterProfileAccessRule() { } public System.Collections.Generic.IList NetworkSecurityPerimeters { get { throw null; } } public System.Collections.Generic.IList PhoneNumbers { get { throw null; } } public System.Collections.Generic.IList Subscriptions { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterProfileAccessRule 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.EventGrid.Models.NetworkSecurityPerimeterProfileAccessRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3425,6 +3508,7 @@ public partial class NumberGreaterThanAdvancedFilter : Azure.ResourceManager.Eve { public NumberGreaterThanAdvancedFilter() { } public double? Value { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.NumberGreaterThanAdvancedFilter 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.EventGrid.Models.NumberGreaterThanAdvancedFilter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3435,6 +3519,7 @@ public partial class NumberGreaterThanFilter : Azure.ResourceManager.EventGrid.M { public NumberGreaterThanFilter() { } public double? Value { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.NumberGreaterThanFilter 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.EventGrid.Models.NumberGreaterThanFilter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3445,6 +3530,7 @@ public partial class NumberGreaterThanOrEqualsAdvancedFilter : Azure.ResourceMan { public NumberGreaterThanOrEqualsAdvancedFilter() { } public double? Value { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.NumberGreaterThanOrEqualsAdvancedFilter 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.EventGrid.Models.NumberGreaterThanOrEqualsAdvancedFilter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3455,6 +3541,7 @@ public partial class NumberGreaterThanOrEqualsFilter : Azure.ResourceManager.Eve { public NumberGreaterThanOrEqualsFilter() { } public double? Value { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.NumberGreaterThanOrEqualsFilter 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.EventGrid.Models.NumberGreaterThanOrEqualsFilter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3465,6 +3552,7 @@ public partial class NumberInAdvancedFilter : Azure.ResourceManager.EventGrid.Mo { public NumberInAdvancedFilter() { } public System.Collections.Generic.IList Values { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.NumberInAdvancedFilter 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.EventGrid.Models.NumberInAdvancedFilter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3475,6 +3563,7 @@ public partial class NumberInFilter : Azure.ResourceManager.EventGrid.Models.Eve { public NumberInFilter() { } public System.Collections.Generic.IList Values { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.NumberInFilter 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.EventGrid.Models.NumberInFilter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3485,6 +3574,7 @@ public partial class NumberInRangeAdvancedFilter : Azure.ResourceManager.EventGr { public NumberInRangeAdvancedFilter() { } public System.Collections.Generic.IList> Values { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.NumberInRangeAdvancedFilter 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.EventGrid.Models.NumberInRangeAdvancedFilter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3495,6 +3585,7 @@ public partial class NumberInRangeFilter : Azure.ResourceManager.EventGrid.Model { public NumberInRangeFilter() { } public System.Collections.Generic.IList> Values { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.NumberInRangeFilter 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.EventGrid.Models.NumberInRangeFilter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3505,6 +3596,7 @@ public partial class NumberLessThanAdvancedFilter : Azure.ResourceManager.EventG { public NumberLessThanAdvancedFilter() { } public double? Value { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.NumberLessThanAdvancedFilter 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.EventGrid.Models.NumberLessThanAdvancedFilter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3515,6 +3607,7 @@ public partial class NumberLessThanFilter : Azure.ResourceManager.EventGrid.Mode { public NumberLessThanFilter() { } public double? Value { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.NumberLessThanFilter 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.EventGrid.Models.NumberLessThanFilter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3525,6 +3618,7 @@ public partial class NumberLessThanOrEqualsAdvancedFilter : Azure.ResourceManage { public NumberLessThanOrEqualsAdvancedFilter() { } public double? Value { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.NumberLessThanOrEqualsAdvancedFilter 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.EventGrid.Models.NumberLessThanOrEqualsAdvancedFilter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3535,6 +3629,7 @@ public partial class NumberLessThanOrEqualsFilter : Azure.ResourceManager.EventG { public NumberLessThanOrEqualsFilter() { } public double? Value { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.NumberLessThanOrEqualsFilter 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.EventGrid.Models.NumberLessThanOrEqualsFilter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3545,6 +3640,7 @@ public partial class NumberNotInAdvancedFilter : Azure.ResourceManager.EventGrid { public NumberNotInAdvancedFilter() { } public System.Collections.Generic.IList Values { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.NumberNotInAdvancedFilter 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.EventGrid.Models.NumberNotInAdvancedFilter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3555,6 +3651,7 @@ public partial class NumberNotInFilter : Azure.ResourceManager.EventGrid.Models. { public NumberNotInFilter() { } public System.Collections.Generic.IList Values { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.NumberNotInFilter 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.EventGrid.Models.NumberNotInFilter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3565,6 +3662,7 @@ public partial class NumberNotInRangeAdvancedFilter : Azure.ResourceManager.Even { public NumberNotInRangeAdvancedFilter() { } public System.Collections.Generic.IList> Values { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.NumberNotInRangeAdvancedFilter 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.EventGrid.Models.NumberNotInRangeAdvancedFilter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3575,6 +3673,7 @@ public partial class NumberNotInRangeFilter : Azure.ResourceManager.EventGrid.Mo { public NumberNotInRangeFilter() { } public System.Collections.Generic.IList> Values { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.NumberNotInRangeFilter 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.EventGrid.Models.NumberNotInRangeFilter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3586,6 +3685,7 @@ public partial class PartnerAuthorization : System.ClientModel.Primitives.IJsonM public PartnerAuthorization() { } public System.Collections.Generic.IList AuthorizedPartnersList { get { throw null; } } public int? DefaultMaximumExpirationTimeInDays { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.PartnerAuthorization 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.EventGrid.Models.PartnerAuthorization System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3595,6 +3695,7 @@ public PartnerAuthorization() { } public abstract partial class PartnerClientAuthentication : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { protected PartnerClientAuthentication() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.PartnerClientAuthentication 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.EventGrid.Models.PartnerClientAuthentication System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3606,6 +3707,7 @@ public partial class PartnerConfigurationPatch : System.ClientModel.Primitives.I public PartnerConfigurationPatch() { } public int? DefaultMaximumExpirationTimeInDays { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.PartnerConfigurationPatch 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.EventGrid.Models.PartnerConfigurationPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3660,6 +3762,7 @@ protected PartnerDestinationInfo() { } public string Name { get { throw null; } set { } } public string ResourceGroupName { get { throw null; } set { } } public System.Collections.Generic.IList ResourceMoveChangeHistory { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.PartnerDestinationInfo 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.EventGrid.Models.PartnerDestinationInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3670,6 +3773,7 @@ public partial class PartnerDestinationPatch : System.ClientModel.Primitives.IJs { public PartnerDestinationPatch() { } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.PartnerDestinationPatch 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.EventGrid.Models.PartnerDestinationPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3705,6 +3809,7 @@ public PartnerDetails() { } public string Description { get { throw null; } set { } } public string LongDescription { get { throw null; } set { } } public System.Uri SetupUri { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.PartnerDetails 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.EventGrid.Models.PartnerDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3715,6 +3820,7 @@ public partial class PartnerEventSubscriptionDestination : Azure.ResourceManager { public PartnerEventSubscriptionDestination() { } public string ResourceId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.PartnerEventSubscriptionDestination 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.EventGrid.Models.PartnerEventSubscriptionDestination System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3727,6 +3833,7 @@ public PartnerNamespaceChannelPatch() { } public Azure.ResourceManager.EventGrid.Models.PartnerTopicEventTypeInfo EventTypeInfo { get { throw null; } set { } } public System.DateTimeOffset? ExpireOnIfNotActivated { get { throw null; } set { } } public Azure.ResourceManager.EventGrid.Models.PartnerUpdateDestinationInfo PartnerDestinationInfo { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.PartnerNamespaceChannelPatch 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.EventGrid.Models.PartnerNamespaceChannelPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3783,6 +3890,7 @@ public PartnerNamespacePatch() { } public Azure.ResourceManager.EventGrid.Models.TlsVersion? MinimumTlsVersionAllowed { get { throw null; } set { } } public Azure.ResourceManager.EventGrid.Models.EventGridPublicNetworkAccess? PublicNetworkAccess { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.PartnerNamespacePatch 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.EventGrid.Models.PartnerNamespacePatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3815,6 +3923,7 @@ public partial class PartnerNamespaceRegenerateKeyContent : System.ClientModel.P { public PartnerNamespaceRegenerateKeyContent(string keyName) { } public string KeyName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.PartnerNamespaceRegenerateKeyContent 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.EventGrid.Models.PartnerNamespaceRegenerateKeyContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3826,6 +3935,7 @@ public partial class PartnerNamespaceSharedAccessKeys : System.ClientModel.Primi internal PartnerNamespaceSharedAccessKeys() { } public string Key1 { get { throw null; } } public string Key2 { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.PartnerNamespaceSharedAccessKeys 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.EventGrid.Models.PartnerNamespaceSharedAccessKeys System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3836,6 +3946,7 @@ public partial class PartnerRegistrationPatch : System.ClientModel.Primitives.IJ { public PartnerRegistrationPatch() { } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.PartnerRegistrationPatch 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.EventGrid.Models.PartnerRegistrationPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3888,6 +3999,7 @@ public partial class PartnerTopicEventTypeInfo : System.ClientModel.Primitives.I public PartnerTopicEventTypeInfo() { } public System.Collections.Generic.IDictionary InlineEventTypes { get { throw null; } } public Azure.ResourceManager.EventGrid.Models.EventDefinitionKind? Kind { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.PartnerTopicEventTypeInfo 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.EventGrid.Models.PartnerTopicEventTypeInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3902,6 +4014,7 @@ public PartnerTopicInfo() { } public string Name { get { throw null; } set { } } public string ResourceGroupName { get { throw null; } set { } } public string Source { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.PartnerTopicInfo 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.EventGrid.Models.PartnerTopicInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3913,6 +4026,7 @@ public partial class PartnerTopicPatch : System.ClientModel.Primitives.IJsonMode public PartnerTopicPatch() { } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.PartnerTopicPatch 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.EventGrid.Models.PartnerTopicPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3981,6 +4095,7 @@ public PartnerTopicPatch() { } public abstract partial class PartnerUpdateDestinationInfo : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { protected PartnerUpdateDestinationInfo() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.PartnerUpdateDestinationInfo 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.EventGrid.Models.PartnerUpdateDestinationInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4053,6 +4168,7 @@ public PushInfo() { } public Azure.ResourceManager.EventGrid.Models.EventSubscriptionDestination Destination { get { throw null; } set { } } public string EventTimeToLive { get { throw null; } set { } } public int? MaxDeliveryCount { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.PushInfo 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.EventGrid.Models.PushInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4066,6 +4182,7 @@ public QueueInfo() { } public System.TimeSpan? EventTimeToLive { get { throw null; } set { } } public int? MaxDeliveryCount { get { throw null; } set { } } public int? ReceiveLockDurationInSeconds { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.QueueInfo 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.EventGrid.Models.QueueInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4077,6 +4194,7 @@ public partial class ResourceAssociation : System.ClientModel.Primitives.IJsonMo public ResourceAssociation() { } public Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterAssociationAccessMode? AccessMode { get { throw null; } set { } } public string Name { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.ResourceAssociation 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.EventGrid.Models.ResourceAssociation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4107,6 +4225,7 @@ public ResourceMoveChangeHistory() { } public string AzureSubscriptionId { get { throw null; } set { } } public System.DateTimeOffset? ChangedTimeUtc { get { throw null; } set { } } public string ResourceGroupName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.ResourceMoveChangeHistory 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.EventGrid.Models.ResourceMoveChangeHistory System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4118,6 +4237,7 @@ public partial class RoutingEnrichments : System.ClientModel.Primitives.IJsonMod public RoutingEnrichments() { } public System.Collections.Generic.IList Dynamic { get { throw null; } } public System.Collections.Generic.IList Static { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.RoutingEnrichments 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.EventGrid.Models.RoutingEnrichments System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4129,6 +4249,7 @@ public partial class RoutingIdentityInfo : System.ClientModel.Primitives.IJsonMo public RoutingIdentityInfo() { } public Azure.ResourceManager.EventGrid.Models.RoutingIdentityType? IdentityType { get { throw null; } set { } } public string UserAssignedIdentity { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.RoutingIdentityInfo 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.EventGrid.Models.RoutingIdentityInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4159,6 +4280,7 @@ public partial class ServiceBusQueueEventSubscriptionDestination : Azure.Resourc public ServiceBusQueueEventSubscriptionDestination() { } public System.Collections.Generic.IList DeliveryAttributeMappings { get { throw null; } } public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.ServiceBusQueueEventSubscriptionDestination 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.EventGrid.Models.ServiceBusQueueEventSubscriptionDestination System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4170,6 +4292,7 @@ public partial class ServiceBusTopicEventSubscriptionDestination : Azure.Resourc public ServiceBusTopicEventSubscriptionDestination() { } public System.Collections.Generic.IList DeliveryAttributeMappings { get { throw null; } } public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.ServiceBusTopicEventSubscriptionDestination 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.EventGrid.Models.ServiceBusTopicEventSubscriptionDestination System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4181,6 +4304,7 @@ public partial class StaticDeliveryAttributeMapping : Azure.ResourceManager.Even public StaticDeliveryAttributeMapping() { } public bool? IsSecret { get { throw null; } set { } } public string Value { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.StaticDeliveryAttributeMapping 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.EventGrid.Models.StaticDeliveryAttributeMapping System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4191,6 +4315,7 @@ public abstract partial class StaticRoutingEnrichment : System.ClientModel.Primi { protected StaticRoutingEnrichment() { } public string Key { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.StaticRoutingEnrichment 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.EventGrid.Models.StaticRoutingEnrichment System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4201,6 +4326,7 @@ public partial class StaticStringRoutingEnrichment : Azure.ResourceManager.Event { public StaticStringRoutingEnrichment() { } public string Value { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.StaticStringRoutingEnrichment 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.EventGrid.Models.StaticStringRoutingEnrichment System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4212,6 +4338,7 @@ public partial class StorageBlobDeadLetterDestination : Azure.ResourceManager.Ev public StorageBlobDeadLetterDestination() { } public string BlobContainerName { get { throw null; } set { } } public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.StorageBlobDeadLetterDestination 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.EventGrid.Models.StorageBlobDeadLetterDestination System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4224,6 +4351,7 @@ public StorageQueueEventSubscriptionDestination() { } public long? QueueMessageTimeToLiveInSeconds { get { throw null; } set { } } public string QueueName { get { throw null; } set { } } public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.StorageQueueEventSubscriptionDestination 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.EventGrid.Models.StorageQueueEventSubscriptionDestination System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4234,6 +4362,7 @@ public partial class StringBeginsWithAdvancedFilter : Azure.ResourceManager.Even { public StringBeginsWithAdvancedFilter() { } public System.Collections.Generic.IList Values { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.StringBeginsWithAdvancedFilter 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.EventGrid.Models.StringBeginsWithAdvancedFilter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4244,6 +4373,7 @@ public partial class StringBeginsWithFilter : Azure.ResourceManager.EventGrid.Mo { public StringBeginsWithFilter() { } public System.Collections.Generic.IList Values { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.StringBeginsWithFilter 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.EventGrid.Models.StringBeginsWithFilter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4254,6 +4384,7 @@ public partial class StringContainsAdvancedFilter : Azure.ResourceManager.EventG { public StringContainsAdvancedFilter() { } public System.Collections.Generic.IList Values { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.StringContainsAdvancedFilter 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.EventGrid.Models.StringContainsAdvancedFilter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4264,6 +4395,7 @@ public partial class StringContainsFilter : Azure.ResourceManager.EventGrid.Mode { public StringContainsFilter() { } public System.Collections.Generic.IList Values { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.StringContainsFilter 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.EventGrid.Models.StringContainsFilter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4274,6 +4406,7 @@ public partial class StringEndsWithAdvancedFilter : Azure.ResourceManager.EventG { public StringEndsWithAdvancedFilter() { } public System.Collections.Generic.IList Values { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.StringEndsWithAdvancedFilter 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.EventGrid.Models.StringEndsWithAdvancedFilter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4284,6 +4417,7 @@ public partial class StringEndsWithFilter : Azure.ResourceManager.EventGrid.Mode { public StringEndsWithFilter() { } public System.Collections.Generic.IList Values { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.StringEndsWithFilter 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.EventGrid.Models.StringEndsWithFilter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4294,6 +4428,7 @@ public partial class StringInAdvancedFilter : Azure.ResourceManager.EventGrid.Mo { public StringInAdvancedFilter() { } public System.Collections.Generic.IList Values { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.StringInAdvancedFilter 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.EventGrid.Models.StringInAdvancedFilter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4304,6 +4439,7 @@ public partial class StringInFilter : Azure.ResourceManager.EventGrid.Models.Eve { public StringInFilter() { } public System.Collections.Generic.IList Values { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.StringInFilter 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.EventGrid.Models.StringInFilter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4314,6 +4450,7 @@ public partial class StringNotBeginsWithAdvancedFilter : Azure.ResourceManager.E { public StringNotBeginsWithAdvancedFilter() { } public System.Collections.Generic.IList Values { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.StringNotBeginsWithAdvancedFilter 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.EventGrid.Models.StringNotBeginsWithAdvancedFilter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4324,6 +4461,7 @@ public partial class StringNotBeginsWithFilter : Azure.ResourceManager.EventGrid { public StringNotBeginsWithFilter() { } public System.Collections.Generic.IList Values { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.StringNotBeginsWithFilter 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.EventGrid.Models.StringNotBeginsWithFilter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4334,6 +4472,7 @@ public partial class StringNotContainsAdvancedFilter : Azure.ResourceManager.Eve { public StringNotContainsAdvancedFilter() { } public System.Collections.Generic.IList Values { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.StringNotContainsAdvancedFilter 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.EventGrid.Models.StringNotContainsAdvancedFilter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4344,6 +4483,7 @@ public partial class StringNotContainsFilter : Azure.ResourceManager.EventGrid.M { public StringNotContainsFilter() { } public System.Collections.Generic.IList Values { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.StringNotContainsFilter 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.EventGrid.Models.StringNotContainsFilter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4354,6 +4494,7 @@ public partial class StringNotEndsWithAdvancedFilter : Azure.ResourceManager.Eve { public StringNotEndsWithAdvancedFilter() { } public System.Collections.Generic.IList Values { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.StringNotEndsWithAdvancedFilter 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.EventGrid.Models.StringNotEndsWithAdvancedFilter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4364,6 +4505,7 @@ public partial class StringNotEndsWithFilter : Azure.ResourceManager.EventGrid.M { public StringNotEndsWithFilter() { } public System.Collections.Generic.IList Values { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.StringNotEndsWithFilter 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.EventGrid.Models.StringNotEndsWithFilter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4374,6 +4516,7 @@ public partial class StringNotInAdvancedFilter : Azure.ResourceManager.EventGrid { public StringNotInAdvancedFilter() { } public System.Collections.Generic.IList Values { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.StringNotInAdvancedFilter 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.EventGrid.Models.StringNotInAdvancedFilter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4384,6 +4527,7 @@ public partial class StringNotInFilter : Azure.ResourceManager.EventGrid.Models. { public StringNotInFilter() { } public System.Collections.Generic.IList Values { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.StringNotInFilter 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.EventGrid.Models.StringNotInFilter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4394,6 +4538,7 @@ public partial class SubscriptionFullUri : System.ClientModel.Primitives.IJsonMo { internal SubscriptionFullUri() { } public System.Uri EndpointUri { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.SubscriptionFullUri 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.EventGrid.Models.SubscriptionFullUri System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4432,6 +4577,7 @@ public partial class SystemTopicPatch : System.ClientModel.Primitives.IJsonModel public SystemTopicPatch() { } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.SystemTopicPatch 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.EventGrid.Models.SystemTopicPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4461,6 +4607,7 @@ public partial class TopicRegenerateKeyContent : System.ClientModel.Primitives.I { public TopicRegenerateKeyContent(string keyName) { } public string KeyName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.TopicRegenerateKeyContent 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.EventGrid.Models.TopicRegenerateKeyContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4472,6 +4619,7 @@ public partial class TopicsConfiguration : System.ClientModel.Primitives.IJsonMo public TopicsConfiguration() { } public System.Collections.Generic.IList CustomDomains { get { throw null; } } public string Hostname { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.TopicsConfiguration 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.EventGrid.Models.TopicsConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4483,6 +4631,7 @@ public partial class TopicSharedAccessKeys : System.ClientModel.Primitives.IJson internal TopicSharedAccessKeys() { } public string Key1 { get { throw null; } } public string Key2 { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.TopicSharedAccessKeys 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.EventGrid.Models.TopicSharedAccessKeys System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4524,6 +4673,7 @@ public TopicSpacesConfiguration() { } public Azure.ResourceManager.EventGrid.Models.RoutingEnrichments RoutingEnrichments { get { throw null; } set { } } public Azure.ResourceManager.EventGrid.Models.RoutingIdentityInfo RoutingIdentityInfo { get { throw null; } set { } } public Azure.ResourceManager.EventGrid.Models.TopicSpacesConfigurationState? State { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.TopicSpacesConfiguration 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.EventGrid.Models.TopicSpacesConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4553,6 +4703,7 @@ public partial class TopicTypeAdditionalEnforcedPermission : System.ClientModel. public TopicTypeAdditionalEnforcedPermission() { } public bool? IsDataAction { get { throw null; } set { } } public string PermissionName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.TopicTypeAdditionalEnforcedPermission 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.EventGrid.Models.TopicTypeAdditionalEnforcedPermission System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4612,6 +4763,7 @@ public UpdateTopicSpacesConfigurationInfo() { } public Azure.ResourceManager.EventGrid.Models.RoutingEnrichments RoutingEnrichments { get { throw null; } set { } } public Azure.ResourceManager.EventGrid.Models.RoutingIdentityInfo RoutingIdentityInfo { get { throw null; } set { } } public Azure.ResourceManager.EventGrid.Models.TopicSpacesConfigurationState? State { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.UpdateTopicSpacesConfigurationInfo 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.EventGrid.Models.UpdateTopicSpacesConfigurationInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4651,6 +4803,7 @@ public WebHookEventSubscriptionDestination() { } public Azure.ResourceManager.EventGrid.Models.TlsVersion? MinimumTlsVersionAllowed { get { throw null; } set { } } public int? PreferredBatchSizeInKilobytes { get { throw null; } set { } } public string UriOrAzureActiveDirectoryApplicationId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.WebHookEventSubscriptionDestination 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.EventGrid.Models.WebHookEventSubscriptionDestination System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4663,6 +4816,7 @@ public WebhookPartnerDestinationInfo() { } public Azure.ResourceManager.EventGrid.Models.PartnerClientAuthentication ClientAuthentication { get { throw null; } set { } } public System.Uri EndpointBaseUri { get { throw null; } set { } } public System.Uri EndpointUri { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.WebhookPartnerDestinationInfo 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.EventGrid.Models.WebhookPartnerDestinationInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4675,6 +4829,7 @@ public WebhookUpdatePartnerDestinationInfo() { } public Azure.ResourceManager.EventGrid.Models.PartnerClientAuthentication ClientAuthentication { get { throw null; } set { } } public System.Uri EndpointBaseUri { get { throw null; } set { } } public System.Uri EndpointUri { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.WebhookUpdatePartnerDestinationInfo 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.EventGrid.Models.WebhookUpdatePartnerDestinationInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/assets.json b/sdk/eventgrid/Azure.ResourceManager.EventGrid/assets.json index 42dbdb11e056..8a8e88635eda 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/assets.json +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/eventgrid/Azure.ResourceManager.EventGrid", - "Tag": "net/eventgrid/Azure.ResourceManager.EventGrid_2b2cd910f4" + "Tag": "net/eventgrid/Azure.ResourceManager.EventGrid_877309fc97" } diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_EventSubscriptionCollection.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_EventSubscriptionCollection.cs index 41c1d1ce7a8b..d53b216efa90 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_EventSubscriptionCollection.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_EventSubscriptionCollection.cs @@ -1445,7 +1445,7 @@ public async Task CreateOrUpdate_EventSubscriptionsCreateOrUpdateForCustomTopicS { ResourceId = new ResourceIdentifier("/subscriptions/d33c5f7a-02ea-40f4-bf52-07f17e84d6a8/resourceGroups/TestRG/providers/Microsoft.Storage/storageAccounts/contosostg"), QueueName = "queue1", - QueueMessageTimeToLiveInSeconds = 300, + QueueMessageTimeToLiveInSeconds = 300L, }, Filter = new EventSubscriptionFilter() { diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_EventSubscriptionResource.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_EventSubscriptionResource.cs index 5b99180bfe81..31a4ee474860 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_EventSubscriptionResource.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/samples/Generated/Samples/Sample_EventSubscriptionResource.cs @@ -795,7 +795,7 @@ public async Task Update_EventSubscriptionsUpdateForCustomTopicStorageQueueDesti { ResourceId = new ResourceIdentifier("/subscriptions/d33c5f7a-02ea-40f4-bf52-07f17e84d6a8/resourceGroups/TestRG/providers/Microsoft.Storage/storageAccounts/contosostg"), QueueName = "queue1", - QueueMessageTimeToLiveInSeconds = 300, + QueueMessageTimeToLiveInSeconds = 300L, }, Filter = new EventSubscriptionFilter() { diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/CaCertificateData.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/CaCertificateData.Serialization.cs index e591002ed998..30f223d945b4 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/CaCertificateData.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/CaCertificateData.Serialization.cs @@ -21,6 +21,15 @@ public partial class CaCertificateData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,27 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(CaCertificateData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Description)) @@ -77,22 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } CaCertificateData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/DomainTopicData.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/DomainTopicData.Serialization.cs index 656b6a429451..96ae56e0b254 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/DomainTopicData.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/DomainTopicData.Serialization.cs @@ -21,6 +21,15 @@ public partial class DomainTopicData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,27 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(DomainTopicData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) @@ -57,22 +46,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } DomainTopicData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridDomainData.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridDomainData.Serialization.cs index 321ed63e3842..859017ab9de9 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridDomainData.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridDomainData.Serialization.cs @@ -22,6 +22,15 @@ public partial class EventGridDomainData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -29,7 +38,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(EventGridDomainData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Sku)) { writer.WritePropertyName("sku"u8); @@ -40,39 +49,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("identity"u8); JsonSerializer.Serialize(writer, Identity); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(PrivateEndpointConnections)) @@ -156,22 +132,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri writer.WriteStringValue(DataResidencyBoundary.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } EventGridDomainData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridNamespaceClientData.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridNamespaceClientData.Serialization.cs index e4235148ae1c..4fcb407da420 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridNamespaceClientData.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridNamespaceClientData.Serialization.cs @@ -22,6 +22,15 @@ public partial class EventGridNamespaceClientData : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -29,27 +38,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(EventGridNamespaceClientData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Description)) @@ -101,22 +90,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } EventGridNamespaceClientData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridNamespaceClientGroupData.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridNamespaceClientGroupData.Serialization.cs index c1010d1cd98f..db5c213e6b23 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridNamespaceClientGroupData.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridNamespaceClientGroupData.Serialization.cs @@ -21,6 +21,15 @@ public partial class EventGridNamespaceClientGroupData : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,27 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(EventGridNamespaceClientGroupData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Description)) @@ -67,22 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } EventGridNamespaceClientGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridNamespaceData.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridNamespaceData.Serialization.cs index f426ef6031ee..753f1c3e936c 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridNamespaceData.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridNamespaceData.Serialization.cs @@ -22,6 +22,15 @@ public partial class EventGridNamespaceData : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -29,7 +38,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(EventGridNamespaceData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Sku)) { writer.WritePropertyName("sku"u8); @@ -40,39 +49,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader writer.WritePropertyName("identity"u8); JsonSerializer.Serialize(writer, Identity); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsCollectionDefined(PrivateEndpointConnections)) @@ -126,22 +102,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader writer.WriteStringValue(MinimumTlsVersionAllowed.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } EventGridNamespaceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridNamespacePermissionBindingData.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridNamespacePermissionBindingData.Serialization.cs index aa01f5dee632..1101d41b345e 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridNamespacePermissionBindingData.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridNamespacePermissionBindingData.Serialization.cs @@ -21,6 +21,15 @@ public partial class EventGridNamespacePermissionBindingData : IUtf8JsonSerializ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,27 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter wr throw new FormatException($"The model {nameof(EventGridNamespacePermissionBindingData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Description)) @@ -77,22 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter wr writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } EventGridNamespacePermissionBindingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridPrivateEndpointConnectionData.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridPrivateEndpointConnectionData.Serialization.cs index d2e101f13c36..3a6b50c68c5a 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridPrivateEndpointConnectionData.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridPrivateEndpointConnectionData.Serialization.cs @@ -23,6 +23,15 @@ public partial class EventGridPrivateEndpointConnectionData : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -30,27 +39,7 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(EventGridPrivateEndpointConnectionData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(PrivateEndpoint)) @@ -79,22 +68,6 @@ void IJsonModel.Write(Utf8JsonWriter wri writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } EventGridPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridPrivateLinkResourceData.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridPrivateLinkResourceData.Serialization.cs index 4bb66dfe1448..87c385e1905a 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridPrivateLinkResourceData.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridPrivateLinkResourceData.Serialization.cs @@ -21,6 +21,15 @@ public partial class EventGridPrivateLinkResourceData : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,27 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(EventGridPrivateLinkResourceData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(GroupId)) @@ -82,22 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } EventGridPrivateLinkResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridSubscriptionData.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridSubscriptionData.Serialization.cs index 38d8a78ed08b..b951e6f04776 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridSubscriptionData.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridSubscriptionData.Serialization.cs @@ -22,6 +22,15 @@ public partial class EventGridSubscriptionData : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -29,27 +38,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(EventGridSubscriptionData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Topic)) @@ -113,22 +102,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea writer.WriteObjectValue(DeadLetterWithResourceIdentity, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } EventGridSubscriptionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridTopicData.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridTopicData.Serialization.cs index 330f10642f1c..1507670d4c83 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridTopicData.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridTopicData.Serialization.cs @@ -23,6 +23,15 @@ public partial class EventGridTopicData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -30,7 +39,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(EventGridTopicData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Sku)) { writer.WritePropertyName("sku"u8); @@ -51,39 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("extendedLocation"u8); JsonSerializer.Serialize(writer, ExtendedLocation); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(PrivateEndpointConnections)) @@ -157,22 +133,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStringValue(DataResidencyBoundary.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } EventGridTopicData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/ExtensionTopicData.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/ExtensionTopicData.Serialization.cs index 170f51470a52..f4510372999a 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/ExtensionTopicData.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/ExtensionTopicData.Serialization.cs @@ -20,6 +20,15 @@ public partial class ExtensionTopicData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ExtensionTopicData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Description)) @@ -61,22 +50,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStringValue(SystemTopic); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ExtensionTopicData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/AdvancedFilter.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/AdvancedFilter.Serialization.cs index 1a3d4adb67f8..bf88bf2dd5e0 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/AdvancedFilter.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/AdvancedFilter.Serialization.cs @@ -20,6 +20,15 @@ public partial class AdvancedFilter : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(AdvancedFilter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("operatorType"u8); writer.WriteStringValue(OperatorType.ToString()); if (Optional.IsDefined(Key)) @@ -50,7 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp #endif } } - writer.WriteEndObject(); } AdvancedFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/AzureADPartnerClientAuthentication.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/AzureADPartnerClientAuthentication.Serialization.cs index 77c57617ad88..14c763de184a 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/AzureADPartnerClientAuthentication.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/AzureADPartnerClientAuthentication.Serialization.cs @@ -19,6 +19,15 @@ public partial class AzureADPartnerClientAuthentication : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,9 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(AzureADPartnerClientAuthentication)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("clientAuthenticationType"u8); - writer.WriteStringValue(ClientAuthenticationType.ToString()); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(AzureActiveDirectoryTenantId)) @@ -42,22 +49,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteStringValue(AzureActiveDirectoryApplicationIdOrUri.AbsoluteUri); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } AzureADPartnerClientAuthentication IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/AzureFunctionEventSubscriptionDestination.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/AzureFunctionEventSubscriptionDestination.Serialization.cs index 213dea1914eb..abbc8b0b51d1 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/AzureFunctionEventSubscriptionDestination.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/AzureFunctionEventSubscriptionDestination.Serialization.cs @@ -20,6 +20,15 @@ public partial class AzureFunctionEventSubscriptionDestination : IUtf8JsonSerial void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,9 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(AzureFunctionEventSubscriptionDestination)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("endpointType"u8); - writer.WriteStringValue(EndpointType.ToString()); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(ResourceId)) @@ -58,22 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } AzureFunctionEventSubscriptionDestination IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/BoolEqualsAdvancedFilter.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/BoolEqualsAdvancedFilter.Serialization.cs index 3938b544dc5c..93bd1e3b17be 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/BoolEqualsAdvancedFilter.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/BoolEqualsAdvancedFilter.Serialization.cs @@ -19,6 +19,15 @@ public partial class BoolEqualsAdvancedFilter : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,35 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(BoolEqualsAdvancedFilter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Value)) { writer.WritePropertyName("value"u8); writer.WriteBooleanValue(Value.Value); } - writer.WritePropertyName("operatorType"u8); - writer.WriteStringValue(OperatorType.ToString()); - if (Optional.IsDefined(Key)) - { - writer.WritePropertyName("key"u8); - writer.WriteStringValue(Key); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } BoolEqualsAdvancedFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/BoolEqualsFilter.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/BoolEqualsFilter.Serialization.cs index 7240e52a778c..01dff9ae3f70 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/BoolEqualsFilter.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/BoolEqualsFilter.Serialization.cs @@ -19,6 +19,15 @@ public partial class BoolEqualsFilter : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,35 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(BoolEqualsFilter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Value)) { writer.WritePropertyName("value"u8); writer.WriteBooleanValue(Value.Value); } - writer.WritePropertyName("operatorType"u8); - writer.WriteStringValue(OperatorType.ToString()); - if (Optional.IsDefined(Key)) - { - writer.WritePropertyName("key"u8); - writer.WriteStringValue(Key); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } BoolEqualsFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/CaCertificatesListResult.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/CaCertificatesListResult.Serialization.cs index 64e8e2d08156..7ae1348e91bc 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/CaCertificatesListResult.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/CaCertificatesListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class CaCertificatesListResult : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(CaCertificatesListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } CaCertificatesListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ChannelsListResult.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ChannelsListResult.Serialization.cs index ff767b8bf1d2..21fd7884cce0 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ChannelsListResult.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ChannelsListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class ChannelsListResult : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ChannelsListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } ChannelsListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ClientAuthenticationSettings.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ClientAuthenticationSettings.Serialization.cs index f9848547234f..44995a3b791c 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ClientAuthenticationSettings.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ClientAuthenticationSettings.Serialization.cs @@ -20,6 +20,15 @@ public partial class ClientAuthenticationSettings : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(ClientAuthenticationSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(AlternativeAuthenticationNameSources)) { writer.WritePropertyName("alternativeAuthenticationNameSources"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } ClientAuthenticationSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ClientCertificateAuthentication.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ClientCertificateAuthentication.Serialization.cs index 583f84ddc204..2a78c8d03021 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ClientCertificateAuthentication.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ClientCertificateAuthentication.Serialization.cs @@ -20,6 +20,15 @@ public partial class ClientCertificateAuthentication : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(ClientCertificateAuthentication)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ValidationScheme)) { writer.WritePropertyName("validationScheme"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } ClientCertificateAuthentication IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ClientGroupsListResult.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ClientGroupsListResult.Serialization.cs index 81a5449217a9..3c33f88e4691 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ClientGroupsListResult.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ClientGroupsListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class ClientGroupsListResult : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(ClientGroupsListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } ClientGroupsListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ClientsListResult.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ClientsListResult.Serialization.cs index b5b4e782c68d..2fc0a1e65cd7 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ClientsListResult.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ClientsListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class ClientsListResult : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(ClientsListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } ClientsListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/CustomDomainConfiguration.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/CustomDomainConfiguration.Serialization.cs index 3ef217757c7b..f8dc8b27813c 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/CustomDomainConfiguration.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/CustomDomainConfiguration.Serialization.cs @@ -19,6 +19,15 @@ public partial class CustomDomainConfiguration : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(CustomDomainConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("fullyQualifiedDomainName"u8); writer.WriteStringValue(FullyQualifiedDomainName); if (Optional.IsDefined(ValidationState)) @@ -69,7 +77,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } CustomDomainConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/CustomDomainIdentity.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/CustomDomainIdentity.Serialization.cs index ab5f2a72fa96..a748d982e050 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/CustomDomainIdentity.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/CustomDomainIdentity.Serialization.cs @@ -19,6 +19,15 @@ public partial class CustomDomainIdentity : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(CustomDomainIdentity)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IdentityType)) { writer.WritePropertyName("type"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } CustomDomainIdentity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/CustomDomainOwnershipValidationResult.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/CustomDomainOwnershipValidationResult.Serialization.cs index 07735044bd3a..4dd44b884dbf 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/CustomDomainOwnershipValidationResult.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/CustomDomainOwnershipValidationResult.Serialization.cs @@ -20,6 +20,15 @@ public partial class CustomDomainOwnershipValidationResult : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(CustomDomainOwnershipValidationResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(CustomDomainsForTopicsConfiguration)) { writer.WritePropertyName("customDomainsForTopicsConfiguration"u8); @@ -63,7 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } CustomDomainOwnershipValidationResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/CustomJwtAuthenticationManagedIdentity.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/CustomJwtAuthenticationManagedIdentity.Serialization.cs index c3d7965e3579..9efc5c658ab7 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/CustomJwtAuthenticationManagedIdentity.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/CustomJwtAuthenticationManagedIdentity.Serialization.cs @@ -19,6 +19,15 @@ public partial class CustomJwtAuthenticationManagedIdentity : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(CustomJwtAuthenticationManagedIdentity)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("type"u8); writer.WriteStringValue(IdentityType.ToString()); if (Optional.IsDefined(UserAssignedIdentity)) @@ -49,7 +57,6 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } CustomJwtAuthenticationManagedIdentity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/CustomJwtAuthenticationSettings.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/CustomJwtAuthenticationSettings.Serialization.cs index 213735a6e7b1..58f6f62c7b6d 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/CustomJwtAuthenticationSettings.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/CustomJwtAuthenticationSettings.Serialization.cs @@ -20,6 +20,15 @@ public partial class CustomJwtAuthenticationSettings : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(CustomJwtAuthenticationSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(TokenIssuer)) { writer.WritePropertyName("tokenIssuer"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } CustomJwtAuthenticationSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/DeadLetterDestination.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/DeadLetterDestination.Serialization.cs index edc82a6d8610..ca74862c5934 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/DeadLetterDestination.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/DeadLetterDestination.Serialization.cs @@ -20,6 +20,15 @@ public partial class DeadLetterDestination : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(DeadLetterDestination)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("endpointType"u8); writer.WriteStringValue(EndpointType.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -45,7 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } DeadLetterDestination IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/DeadLetterWithResourceIdentity.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/DeadLetterWithResourceIdentity.Serialization.cs index 51d2d5adacf7..e5aaae524ab7 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/DeadLetterWithResourceIdentity.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/DeadLetterWithResourceIdentity.Serialization.cs @@ -19,6 +19,15 @@ public partial class DeadLetterWithResourceIdentity : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(DeadLetterWithResourceIdentity)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } DeadLetterWithResourceIdentity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/DeliveryAttributeListResult.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/DeliveryAttributeListResult.Serialization.cs index b79a921e1823..98617dbbea43 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/DeliveryAttributeListResult.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/DeliveryAttributeListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class DeliveryAttributeListResult : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(DeliveryAttributeListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } DeliveryAttributeListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/DeliveryAttributeMapping.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/DeliveryAttributeMapping.Serialization.cs index 5aeb2f4950f2..6cf8caf28155 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/DeliveryAttributeMapping.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/DeliveryAttributeMapping.Serialization.cs @@ -20,6 +20,15 @@ public partial class DeliveryAttributeMapping : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(DeliveryAttributeMapping)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -50,7 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } DeliveryAttributeMapping IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/DeliveryConfiguration.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/DeliveryConfiguration.Serialization.cs index 72f759731115..a5e5ccc74a1d 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/DeliveryConfiguration.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/DeliveryConfiguration.Serialization.cs @@ -19,6 +19,15 @@ public partial class DeliveryConfiguration : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(DeliveryConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(DeliveryMode)) { writer.WritePropertyName("deliveryMode"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } DeliveryConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/DeliveryWithResourceIdentity.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/DeliveryWithResourceIdentity.Serialization.cs index 316baa1717fc..9adf4453407f 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/DeliveryWithResourceIdentity.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/DeliveryWithResourceIdentity.Serialization.cs @@ -19,6 +19,15 @@ public partial class DeliveryWithResourceIdentity : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(DeliveryWithResourceIdentity)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } DeliveryWithResourceIdentity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/DomainTopicsListResult.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/DomainTopicsListResult.Serialization.cs index e41b6b93f5aa..8993e184b565 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/DomainTopicsListResult.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/DomainTopicsListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class DomainTopicsListResult : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(DomainTopicsListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } DomainTopicsListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/DomainsListResult.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/DomainsListResult.Serialization.cs index 8e1ec40a8e35..4770b510c46b 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/DomainsListResult.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/DomainsListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class DomainsListResult : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(DomainsListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } DomainsListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/DynamicDeliveryAttributeMapping.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/DynamicDeliveryAttributeMapping.Serialization.cs index 0057888fa07a..979e6dfe5175 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/DynamicDeliveryAttributeMapping.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/DynamicDeliveryAttributeMapping.Serialization.cs @@ -19,6 +19,15 @@ public partial class DynamicDeliveryAttributeMapping : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,14 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(DynamicDeliveryAttributeMapping)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(MappingType.ToString()); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(SourceField)) @@ -42,22 +44,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo writer.WriteStringValue(SourceField); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } DynamicDeliveryAttributeMapping IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/DynamicRoutingEnrichment.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/DynamicRoutingEnrichment.Serialization.cs index b506a3c300e7..e907a51d44f3 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/DynamicRoutingEnrichment.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/DynamicRoutingEnrichment.Serialization.cs @@ -19,6 +19,15 @@ public partial class DynamicRoutingEnrichment : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(DynamicRoutingEnrichment)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Key)) { writer.WritePropertyName("key"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } DynamicRoutingEnrichment IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridDomainPatch.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridDomainPatch.Serialization.cs index 15eb467e6597..fa023aaac57e 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridDomainPatch.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridDomainPatch.Serialization.cs @@ -19,6 +19,15 @@ public partial class EventGridDomainPatch : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(EventGridDomainPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -111,7 +119,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } EventGridDomainPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridDomainRegenerateKeyContent.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridDomainRegenerateKeyContent.Serialization.cs index 8aa674acc092..f57c6ce3bfa6 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridDomainRegenerateKeyContent.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridDomainRegenerateKeyContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class EventGridDomainRegenerateKeyContent : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(EventGridDomainRegenerateKeyContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("keyName"u8); writer.WriteStringValue(KeyName); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } EventGridDomainRegenerateKeyContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridDomainSharedAccessKeys.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridDomainSharedAccessKeys.Serialization.cs index 57b3c6fd9004..6a5e4fd79fb7 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridDomainSharedAccessKeys.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridDomainSharedAccessKeys.Serialization.cs @@ -19,6 +19,15 @@ public partial class EventGridDomainSharedAccessKeys : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(EventGridDomainSharedAccessKeys)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Key1)) { writer.WritePropertyName("key1"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } EventGridDomainSharedAccessKeys IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridFilter.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridFilter.Serialization.cs index dc47541f93f0..7cdffaa06e2a 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridFilter.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridFilter.Serialization.cs @@ -20,6 +20,15 @@ public partial class EventGridFilter : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(EventGridFilter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("operatorType"u8); writer.WriteStringValue(OperatorType.ToString()); if (Optional.IsDefined(Key)) @@ -50,7 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO #endif } } - writer.WriteEndObject(); } EventGridFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridInboundIPRule.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridInboundIPRule.Serialization.cs index 18dde1a0ef9c..94d147e5d90c 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridInboundIPRule.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridInboundIPRule.Serialization.cs @@ -19,6 +19,15 @@ public partial class EventGridInboundIPRule : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(EventGridInboundIPRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IPMask)) { writer.WritePropertyName("ipMask"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } EventGridInboundIPRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridInputSchemaMapping.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridInputSchemaMapping.Serialization.cs index b63e84cbcc91..ef5e21e32627 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridInputSchemaMapping.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridInputSchemaMapping.Serialization.cs @@ -20,6 +20,15 @@ public partial class EventGridInputSchemaMapping : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(EventGridInputSchemaMapping)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("inputSchemaMappingType"u8); writer.WriteStringValue(InputSchemaMappingType.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -45,7 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } EventGridInputSchemaMapping IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridJsonInputSchemaMapping.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridJsonInputSchemaMapping.Serialization.cs index c5edb5b2ef12..d6579e96cb49 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridJsonInputSchemaMapping.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridJsonInputSchemaMapping.Serialization.cs @@ -19,6 +19,15 @@ public partial class EventGridJsonInputSchemaMapping : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,9 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(EventGridJsonInputSchemaMapping)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("inputSchemaMappingType"u8); - writer.WriteStringValue(InputSchemaMappingType.ToString()); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Id)) @@ -62,22 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo writer.WriteObjectValue(DataVersion, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } EventGridJsonInputSchemaMapping IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridNamespacePatch.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridNamespacePatch.Serialization.cs index 42bc0c351897..24ae7a85e9a6 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridNamespacePatch.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridNamespacePatch.Serialization.cs @@ -19,6 +19,15 @@ public partial class EventGridNamespacePatch : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(EventGridNamespacePatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -91,7 +99,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } EventGridNamespacePatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridPartnerContent.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridPartnerContent.Serialization.cs index a038781b2ec2..bc23a1cd8068 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridPartnerContent.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridPartnerContent.Serialization.cs @@ -19,6 +19,15 @@ public partial class EventGridPartnerContent : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(EventGridPartnerContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(PartnerRegistrationImmutableId)) { writer.WritePropertyName("partnerRegistrationImmutableId"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } EventGridPartnerContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridPrivateEndpointConnectionListResult.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridPrivateEndpointConnectionListResult.Serialization.cs index ce4023ce6544..f24279319550 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridPrivateEndpointConnectionListResult.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridPrivateEndpointConnectionListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class EventGridPrivateEndpointConnectionListResult : IUtf8JsonS void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWrit throw new FormatException($"The model {nameof(EventGridPrivateEndpointConnectionListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWrit #endif } } - writer.WriteEndObject(); } EventGridPrivateEndpointConnectionListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridPrivateEndpointConnectionState.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridPrivateEndpointConnectionState.Serialization.cs index 68f90bab8835..4dc266b02004 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridPrivateEndpointConnectionState.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridPrivateEndpointConnectionState.Serialization.cs @@ -19,6 +19,15 @@ public partial class EventGridPrivateEndpointConnectionState : IUtf8JsonSerializ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter wr throw new FormatException($"The model {nameof(EventGridPrivateEndpointConnectionState)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Status)) { writer.WritePropertyName("status"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter wr #endif } } - writer.WriteEndObject(); } EventGridPrivateEndpointConnectionState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridSubscriptionPatch.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridSubscriptionPatch.Serialization.cs index 387ea7b1fb3e..64c4aa03cf4b 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridSubscriptionPatch.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridSubscriptionPatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class EventGridSubscriptionPatch : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(EventGridSubscriptionPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Destination)) { writer.WritePropertyName("destination"u8); @@ -91,7 +99,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } EventGridSubscriptionPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridTopicPatch.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridTopicPatch.Serialization.cs index 6d480ef19f75..a20d31e0e557 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridTopicPatch.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridTopicPatch.Serialization.cs @@ -19,6 +19,15 @@ public partial class EventGridTopicPatch : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(EventGridTopicPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -101,7 +109,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } EventGridTopicPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventHubEventSubscriptionDestination.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventHubEventSubscriptionDestination.Serialization.cs index 496baf8d9ed2..ec340ced26d7 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventHubEventSubscriptionDestination.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventHubEventSubscriptionDestination.Serialization.cs @@ -20,6 +20,15 @@ public partial class EventHubEventSubscriptionDestination : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,9 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(EventHubEventSubscriptionDestination)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("endpointType"u8); - writer.WriteStringValue(EndpointType.ToString()); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(ResourceId)) @@ -48,22 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter write writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } EventHubEventSubscriptionDestination IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventSubscriptionDestination.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventSubscriptionDestination.Serialization.cs index 4343ca9f676b..b47ac8039cee 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventSubscriptionDestination.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventSubscriptionDestination.Serialization.cs @@ -20,6 +20,15 @@ public partial class EventSubscriptionDestination : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(EventSubscriptionDestination)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("endpointType"u8); writer.WriteStringValue(EndpointType.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -45,7 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } EventSubscriptionDestination IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventSubscriptionFilter.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventSubscriptionFilter.Serialization.cs index efb370fc4151..77c9585cbca1 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventSubscriptionFilter.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventSubscriptionFilter.Serialization.cs @@ -20,6 +20,15 @@ public partial class EventSubscriptionFilter : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(EventSubscriptionFilter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(SubjectBeginsWith)) { writer.WritePropertyName("subjectBeginsWith"u8); @@ -83,7 +91,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } EventSubscriptionFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventSubscriptionFullUri.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventSubscriptionFullUri.Serialization.cs index c88dfdc5d1ee..62aef65434c2 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventSubscriptionFullUri.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventSubscriptionFullUri.Serialization.cs @@ -19,6 +19,15 @@ public partial class EventSubscriptionFullUri : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(EventSubscriptionFullUri)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Endpoint)) { writer.WritePropertyName("endpointUrl"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } EventSubscriptionFullUri IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventSubscriptionIdentity.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventSubscriptionIdentity.Serialization.cs index 7f4c3b273d30..8d8089dcac9d 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventSubscriptionIdentity.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventSubscriptionIdentity.Serialization.cs @@ -19,6 +19,15 @@ public partial class EventSubscriptionIdentity : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(EventSubscriptionIdentity)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IdentityType)) { writer.WritePropertyName("type"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } EventSubscriptionIdentity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventSubscriptionRetryPolicy.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventSubscriptionRetryPolicy.Serialization.cs index 649ece8cae06..aa19f3ea4d4a 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventSubscriptionRetryPolicy.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventSubscriptionRetryPolicy.Serialization.cs @@ -19,6 +19,15 @@ public partial class EventSubscriptionRetryPolicy : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(EventSubscriptionRetryPolicy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(MaxDeliveryAttempts)) { writer.WritePropertyName("maxDeliveryAttempts"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } EventSubscriptionRetryPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventSubscriptionsListResult.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventSubscriptionsListResult.Serialization.cs index 16908f38e03d..3009c8f3329b 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventSubscriptionsListResult.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventSubscriptionsListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class EventSubscriptionsListResult : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(EventSubscriptionsListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } EventSubscriptionsListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventTypeUnderTopic.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventTypeUnderTopic.Serialization.cs index f04d9784ef5b..2c2a7c5b5f0c 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventTypeUnderTopic.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventTypeUnderTopic.Serialization.cs @@ -20,6 +20,15 @@ public partial class EventTypeUnderTopic : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(EventTypeUnderTopic)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(DisplayName)) @@ -71,22 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri writer.WriteBooleanValue(IsInDefaultSet.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } EventTypeUnderTopic IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventTypesListResult.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventTypesListResult.Serialization.cs index cea5402a7a7d..30e8bffc04e3 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventTypesListResult.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventTypesListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class EventTypesListResult : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(EventTypesListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } EventTypesListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/FiltersConfiguration.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/FiltersConfiguration.Serialization.cs index 7ab8447d83e0..5cdd7fe92e57 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/FiltersConfiguration.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/FiltersConfiguration.Serialization.cs @@ -20,6 +20,15 @@ public partial class FiltersConfiguration : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(FiltersConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(IncludedEventTypes)) { writer.WritePropertyName("includedEventTypes"u8); @@ -63,7 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } FiltersConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/HybridConnectionEventSubscriptionDestination.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/HybridConnectionEventSubscriptionDestination.Serialization.cs index 10ecd015e502..eeb4ed23fc2b 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/HybridConnectionEventSubscriptionDestination.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/HybridConnectionEventSubscriptionDestination.Serialization.cs @@ -20,6 +20,15 @@ public partial class HybridConnectionEventSubscriptionDestination : IUtf8JsonSer void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,9 +36,7 @@ void IJsonModel.Write(Utf8JsonWrit throw new FormatException($"The model {nameof(HybridConnectionEventSubscriptionDestination)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("endpointType"u8); - writer.WriteStringValue(EndpointType.ToString()); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(ResourceId)) @@ -48,22 +55,6 @@ void IJsonModel.Write(Utf8JsonWrit writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } HybridConnectionEventSubscriptionDestination IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/InlineEventProperties.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/InlineEventProperties.Serialization.cs index 2878c245eebd..5b8a2d7b9df4 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/InlineEventProperties.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/InlineEventProperties.Serialization.cs @@ -19,6 +19,15 @@ public partial class InlineEventProperties : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(InlineEventProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Description)) { writer.WritePropertyName("description"u8); @@ -62,7 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } InlineEventProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/IsNotNullAdvancedFilter.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/IsNotNullAdvancedFilter.Serialization.cs index a68d51e02f85..088bfe6a262a 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/IsNotNullAdvancedFilter.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/IsNotNullAdvancedFilter.Serialization.cs @@ -19,6 +19,15 @@ public partial class IsNotNullAdvancedFilter : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,30 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(IsNotNullAdvancedFilter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("operatorType"u8); - writer.WriteStringValue(OperatorType.ToString()); - if (Optional.IsDefined(Key)) - { - writer.WritePropertyName("key"u8); - writer.WriteStringValue(Key); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } IsNotNullAdvancedFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/IsNotNullFilter.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/IsNotNullFilter.Serialization.cs index e0f4bda403d4..61dfa5f3696b 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/IsNotNullFilter.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/IsNotNullFilter.Serialization.cs @@ -19,6 +19,15 @@ public partial class IsNotNullFilter : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,30 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(IsNotNullFilter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("operatorType"u8); - writer.WriteStringValue(OperatorType.ToString()); - if (Optional.IsDefined(Key)) - { - writer.WritePropertyName("key"u8); - writer.WriteStringValue(Key); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } IsNotNullFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/IsNullOrUndefinedAdvancedFilter.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/IsNullOrUndefinedAdvancedFilter.Serialization.cs index 9725c33aba59..4c2816db582d 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/IsNullOrUndefinedAdvancedFilter.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/IsNullOrUndefinedAdvancedFilter.Serialization.cs @@ -19,6 +19,15 @@ public partial class IsNullOrUndefinedAdvancedFilter : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,30 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(IsNullOrUndefinedAdvancedFilter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("operatorType"u8); - writer.WriteStringValue(OperatorType.ToString()); - if (Optional.IsDefined(Key)) - { - writer.WritePropertyName("key"u8); - writer.WriteStringValue(Key); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } IsNullOrUndefinedAdvancedFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/IsNullOrUndefinedFilter.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/IsNullOrUndefinedFilter.Serialization.cs index b737d4ee3a59..024a6584115f 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/IsNullOrUndefinedFilter.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/IsNullOrUndefinedFilter.Serialization.cs @@ -19,6 +19,15 @@ public partial class IsNullOrUndefinedFilter : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,30 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(IsNullOrUndefinedFilter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("operatorType"u8); - writer.WriteStringValue(OperatorType.ToString()); - if (Optional.IsDefined(Key)) - { - writer.WritePropertyName("key"u8); - writer.WriteStringValue(Key); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } IsNullOrUndefinedFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/IssuerCertificateInfo.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/IssuerCertificateInfo.Serialization.cs index 1c33ba2e1141..51e638efe5db 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/IssuerCertificateInfo.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/IssuerCertificateInfo.Serialization.cs @@ -19,6 +19,15 @@ public partial class IssuerCertificateInfo : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(IssuerCertificateInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("certificateUrl"u8); writer.WriteStringValue(CertificateUri.AbsoluteUri); if (Optional.IsDefined(Identity)) @@ -49,7 +57,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } IssuerCertificateInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/JsonField.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/JsonField.Serialization.cs index f1fd82e56c84..7d5ae0cb4a1d 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/JsonField.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/JsonField.Serialization.cs @@ -19,6 +19,15 @@ internal partial class JsonField : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions throw new FormatException($"The model {nameof(JsonField)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(SourceField)) { writer.WritePropertyName("sourceField"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions #endif } } - writer.WriteEndObject(); } JsonField IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/JsonFieldWithDefault.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/JsonFieldWithDefault.Serialization.cs index ae03afc29f09..0c4d0e936c02 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/JsonFieldWithDefault.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/JsonFieldWithDefault.Serialization.cs @@ -19,6 +19,15 @@ public partial class JsonFieldWithDefault : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(JsonFieldWithDefault)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(SourceField)) { writer.WritePropertyName("sourceField"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } JsonFieldWithDefault IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/MonitorAlertEventSubscriptionDestination.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/MonitorAlertEventSubscriptionDestination.Serialization.cs index d686369d92ef..38eebf6eb57f 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/MonitorAlertEventSubscriptionDestination.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/MonitorAlertEventSubscriptionDestination.Serialization.cs @@ -20,6 +20,15 @@ public partial class MonitorAlertEventSubscriptionDestination : IUtf8JsonSeriali void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,9 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter w throw new FormatException($"The model {nameof(MonitorAlertEventSubscriptionDestination)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("endpointType"u8); - writer.WriteStringValue(EndpointType.ToString()); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Severity)) @@ -58,22 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter w writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } MonitorAlertEventSubscriptionDestination IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespaceRegenerateKeyContent.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespaceRegenerateKeyContent.Serialization.cs index 1131b0c18794..3d678c5eeaab 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespaceRegenerateKeyContent.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespaceRegenerateKeyContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class NamespaceRegenerateKeyContent : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(NamespaceRegenerateKeyContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("keyName"u8); writer.WriteStringValue(KeyName); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } NamespaceRegenerateKeyContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespaceSharedAccessKeys.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespaceSharedAccessKeys.Serialization.cs index 4212c638f229..7ec85bfae5c4 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespaceSharedAccessKeys.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespaceSharedAccessKeys.Serialization.cs @@ -19,6 +19,15 @@ public partial class NamespaceSharedAccessKeys : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(NamespaceSharedAccessKeys)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Key1)) { writer.WritePropertyName("key1"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } NamespaceSharedAccessKeys IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespaceSku.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespaceSku.Serialization.cs index 9365f85286dd..3ef0aab5becb 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespaceSku.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespaceSku.Serialization.cs @@ -19,6 +19,15 @@ public partial class NamespaceSku : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(NamespaceSku)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti #endif } } - writer.WriteEndObject(); } NamespaceSku IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespaceTopicEventSubscriptionDestination.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespaceTopicEventSubscriptionDestination.Serialization.cs index 1a90dd13b5e6..218c4ae2b440 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespaceTopicEventSubscriptionDestination.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespaceTopicEventSubscriptionDestination.Serialization.cs @@ -19,6 +19,15 @@ public partial class NamespaceTopicEventSubscriptionDestination : IUtf8JsonSeria void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,9 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(NamespaceTopicEventSubscriptionDestination)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("endpointType"u8); - writer.WriteStringValue(EndpointType.ToString()); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(ResourceId)) @@ -37,22 +44,6 @@ void IJsonModel.Write(Utf8JsonWriter writer.WriteStringValue(ResourceId); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NamespaceTopicEventSubscriptionDestination IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespaceTopicEventSubscriptionPatch.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespaceTopicEventSubscriptionPatch.Serialization.cs index 73a8de0a52ff..e4398dd58827 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespaceTopicEventSubscriptionPatch.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespaceTopicEventSubscriptionPatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class NamespaceTopicEventSubscriptionPatch : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(NamespaceTopicEventSubscriptionPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(DeliveryConfiguration)) @@ -64,7 +72,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } NamespaceTopicEventSubscriptionPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespaceTopicPatch.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespaceTopicPatch.Serialization.cs index 05e8d1502441..9e8d171d6845 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespaceTopicPatch.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespaceTopicPatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class NamespaceTopicPatch : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(NamespaceTopicPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(EventRetentionInDays)) @@ -49,7 +57,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } NamespaceTopicPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespaceTopicsListResult.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespaceTopicsListResult.Serialization.cs index 6bb7d5d15bcd..61bbde70b2ac 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespaceTopicsListResult.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespaceTopicsListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class NamespaceTopicsListResult : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(NamespaceTopicsListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } NamespaceTopicsListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespacesListResult.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespacesListResult.Serialization.cs index ab13451286bd..628161529f88 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespacesListResult.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespacesListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class NamespacesListResult : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(NamespacesListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } NamespacesListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NetworkSecurityPerimeterConfigurationIssues.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NetworkSecurityPerimeterConfigurationIssues.Serialization.cs index 608c22e4e5ce..844cdb6b299a 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NetworkSecurityPerimeterConfigurationIssues.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NetworkSecurityPerimeterConfigurationIssues.Serialization.cs @@ -20,6 +20,15 @@ public partial class NetworkSecurityPerimeterConfigurationIssues : IUtf8JsonSeri void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWrite throw new FormatException($"The model {nameof(NetworkSecurityPerimeterConfigurationIssues)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -86,7 +94,6 @@ void IJsonModel.Write(Utf8JsonWrite #endif } } - writer.WriteEndObject(); } NetworkSecurityPerimeterConfigurationIssues IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NetworkSecurityPerimeterConfigurationList.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NetworkSecurityPerimeterConfigurationList.Serialization.cs index c8db0008251d..b1cb2f4feb7b 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NetworkSecurityPerimeterConfigurationList.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NetworkSecurityPerimeterConfigurationList.Serialization.cs @@ -20,6 +20,15 @@ internal partial class NetworkSecurityPerimeterConfigurationList : IUtf8JsonSeri void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(NetworkSecurityPerimeterConfigurationList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } NetworkSecurityPerimeterConfigurationList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NetworkSecurityPerimeterConfigurationProfile.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NetworkSecurityPerimeterConfigurationProfile.Serialization.cs index c28e0068304e..fa75b35eaedb 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NetworkSecurityPerimeterConfigurationProfile.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NetworkSecurityPerimeterConfigurationProfile.Serialization.cs @@ -20,6 +20,15 @@ public partial class NetworkSecurityPerimeterConfigurationProfile : IUtf8JsonSer void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWrit throw new FormatException($"The model {nameof(NetworkSecurityPerimeterConfigurationProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -78,7 +86,6 @@ void IJsonModel.Write(Utf8JsonWrit #endif } } - writer.WriteEndObject(); } NetworkSecurityPerimeterConfigurationProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NetworkSecurityPerimeterInfo.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NetworkSecurityPerimeterInfo.Serialization.cs index 4c026d4b7694..8bdbe1ee7b9d 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NetworkSecurityPerimeterInfo.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NetworkSecurityPerimeterInfo.Serialization.cs @@ -19,6 +19,15 @@ public partial class NetworkSecurityPerimeterInfo : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(NetworkSecurityPerimeterInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } NetworkSecurityPerimeterInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NetworkSecurityPerimeterProfileAccessRule.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NetworkSecurityPerimeterProfileAccessRule.Serialization.cs index 00306919e254..68900be5cf07 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NetworkSecurityPerimeterProfileAccessRule.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NetworkSecurityPerimeterProfileAccessRule.Serialization.cs @@ -21,6 +21,15 @@ public partial class NetworkSecurityPerimeterProfileAccessRule : IUtf8JsonSerial void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,7 +37,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(NetworkSecurityPerimeterProfileAccessRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(FullyQualifiedArmId)) { writer.WritePropertyName("fullyQualifiedArmId"u8); @@ -127,7 +135,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } NetworkSecurityPerimeterProfileAccessRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberGreaterThanAdvancedFilter.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberGreaterThanAdvancedFilter.Serialization.cs index 04777c4a0a83..e618e05d2de5 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberGreaterThanAdvancedFilter.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberGreaterThanAdvancedFilter.Serialization.cs @@ -19,6 +19,15 @@ public partial class NumberGreaterThanAdvancedFilter : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,35 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(NumberGreaterThanAdvancedFilter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Value)) { writer.WritePropertyName("value"u8); writer.WriteNumberValue(Value.Value); } - writer.WritePropertyName("operatorType"u8); - writer.WriteStringValue(OperatorType.ToString()); - if (Optional.IsDefined(Key)) - { - writer.WritePropertyName("key"u8); - writer.WriteStringValue(Key); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NumberGreaterThanAdvancedFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberGreaterThanFilter.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberGreaterThanFilter.Serialization.cs index 62b0bb1a9a27..4641d788e14f 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberGreaterThanFilter.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberGreaterThanFilter.Serialization.cs @@ -19,6 +19,15 @@ public partial class NumberGreaterThanFilter : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,35 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(NumberGreaterThanFilter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Value)) { writer.WritePropertyName("value"u8); writer.WriteNumberValue(Value.Value); } - writer.WritePropertyName("operatorType"u8); - writer.WriteStringValue(OperatorType.ToString()); - if (Optional.IsDefined(Key)) - { - writer.WritePropertyName("key"u8); - writer.WriteStringValue(Key); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NumberGreaterThanFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberGreaterThanOrEqualsAdvancedFilter.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberGreaterThanOrEqualsAdvancedFilter.Serialization.cs index ffca3dbd9bb3..fa4baac589df 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberGreaterThanOrEqualsAdvancedFilter.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberGreaterThanOrEqualsAdvancedFilter.Serialization.cs @@ -19,6 +19,15 @@ public partial class NumberGreaterThanOrEqualsAdvancedFilter : IUtf8JsonSerializ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,35 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter wr throw new FormatException($"The model {nameof(NumberGreaterThanOrEqualsAdvancedFilter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Value)) { writer.WritePropertyName("value"u8); writer.WriteNumberValue(Value.Value); } - writer.WritePropertyName("operatorType"u8); - writer.WriteStringValue(OperatorType.ToString()); - if (Optional.IsDefined(Key)) - { - writer.WritePropertyName("key"u8); - writer.WriteStringValue(Key); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NumberGreaterThanOrEqualsAdvancedFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberGreaterThanOrEqualsFilter.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberGreaterThanOrEqualsFilter.Serialization.cs index 760ead103a0d..77b83ddd8817 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberGreaterThanOrEqualsFilter.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberGreaterThanOrEqualsFilter.Serialization.cs @@ -19,6 +19,15 @@ public partial class NumberGreaterThanOrEqualsFilter : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,35 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(NumberGreaterThanOrEqualsFilter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Value)) { writer.WritePropertyName("value"u8); writer.WriteNumberValue(Value.Value); } - writer.WritePropertyName("operatorType"u8); - writer.WriteStringValue(OperatorType.ToString()); - if (Optional.IsDefined(Key)) - { - writer.WritePropertyName("key"u8); - writer.WriteStringValue(Key); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NumberGreaterThanOrEqualsFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberInAdvancedFilter.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberInAdvancedFilter.Serialization.cs index 0c0656e8990a..4e46f7f3eb7d 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberInAdvancedFilter.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberInAdvancedFilter.Serialization.cs @@ -20,6 +20,15 @@ public partial class NumberInAdvancedFilter : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(NumberInAdvancedFilter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(Values)) { writer.WritePropertyName("values"u8); @@ -38,29 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader } writer.WriteEndArray(); } - writer.WritePropertyName("operatorType"u8); - writer.WriteStringValue(OperatorType.ToString()); - if (Optional.IsDefined(Key)) - { - writer.WritePropertyName("key"u8); - writer.WriteStringValue(Key); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NumberInAdvancedFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberInFilter.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberInFilter.Serialization.cs index e24ed20330a7..ef612b7aafc6 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberInFilter.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberInFilter.Serialization.cs @@ -20,6 +20,15 @@ public partial class NumberInFilter : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(NumberInFilter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(Values)) { writer.WritePropertyName("values"u8); @@ -38,29 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp } writer.WriteEndArray(); } - writer.WritePropertyName("operatorType"u8); - writer.WriteStringValue(OperatorType.ToString()); - if (Optional.IsDefined(Key)) - { - writer.WritePropertyName("key"u8); - writer.WriteStringValue(Key); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NumberInFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberInRangeAdvancedFilter.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberInRangeAdvancedFilter.Serialization.cs index e77cbb444f65..121375692454 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberInRangeAdvancedFilter.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberInRangeAdvancedFilter.Serialization.cs @@ -20,6 +20,15 @@ public partial class NumberInRangeAdvancedFilter : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(NumberInRangeAdvancedFilter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(Values)) { writer.WritePropertyName("values"u8); @@ -48,29 +57,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR } writer.WriteEndArray(); } - writer.WritePropertyName("operatorType"u8); - writer.WriteStringValue(OperatorType.ToString()); - if (Optional.IsDefined(Key)) - { - writer.WritePropertyName("key"u8); - writer.WriteStringValue(Key); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NumberInRangeAdvancedFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberInRangeFilter.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberInRangeFilter.Serialization.cs index 49ffc56bf33a..a393dc6753f9 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberInRangeFilter.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberInRangeFilter.Serialization.cs @@ -20,6 +20,15 @@ public partial class NumberInRangeFilter : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(NumberInRangeFilter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(Values)) { writer.WritePropertyName("values"u8); @@ -48,29 +57,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri } writer.WriteEndArray(); } - writer.WritePropertyName("operatorType"u8); - writer.WriteStringValue(OperatorType.ToString()); - if (Optional.IsDefined(Key)) - { - writer.WritePropertyName("key"u8); - writer.WriteStringValue(Key); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NumberInRangeFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberLessThanAdvancedFilter.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberLessThanAdvancedFilter.Serialization.cs index 3fb165b00fc2..8d0cd1325e56 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberLessThanAdvancedFilter.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberLessThanAdvancedFilter.Serialization.cs @@ -19,6 +19,15 @@ public partial class NumberLessThanAdvancedFilter : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,35 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(NumberLessThanAdvancedFilter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Value)) { writer.WritePropertyName("value"u8); writer.WriteNumberValue(Value.Value); } - writer.WritePropertyName("operatorType"u8); - writer.WriteStringValue(OperatorType.ToString()); - if (Optional.IsDefined(Key)) - { - writer.WritePropertyName("key"u8); - writer.WriteStringValue(Key); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NumberLessThanAdvancedFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberLessThanFilter.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberLessThanFilter.Serialization.cs index 126dfc471907..d61f3cfbbde9 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberLessThanFilter.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberLessThanFilter.Serialization.cs @@ -19,6 +19,15 @@ public partial class NumberLessThanFilter : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,35 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(NumberLessThanFilter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Value)) { writer.WritePropertyName("value"u8); writer.WriteNumberValue(Value.Value); } - writer.WritePropertyName("operatorType"u8); - writer.WriteStringValue(OperatorType.ToString()); - if (Optional.IsDefined(Key)) - { - writer.WritePropertyName("key"u8); - writer.WriteStringValue(Key); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NumberLessThanFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberLessThanOrEqualsAdvancedFilter.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberLessThanOrEqualsAdvancedFilter.Serialization.cs index c873e6b67854..a4eeb3103a12 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberLessThanOrEqualsAdvancedFilter.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberLessThanOrEqualsAdvancedFilter.Serialization.cs @@ -19,6 +19,15 @@ public partial class NumberLessThanOrEqualsAdvancedFilter : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,35 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(NumberLessThanOrEqualsAdvancedFilter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Value)) { writer.WritePropertyName("value"u8); writer.WriteNumberValue(Value.Value); } - writer.WritePropertyName("operatorType"u8); - writer.WriteStringValue(OperatorType.ToString()); - if (Optional.IsDefined(Key)) - { - writer.WritePropertyName("key"u8); - writer.WriteStringValue(Key); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NumberLessThanOrEqualsAdvancedFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberLessThanOrEqualsFilter.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberLessThanOrEqualsFilter.Serialization.cs index 5b59a05bb2d0..1de7eecc8a40 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberLessThanOrEqualsFilter.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberLessThanOrEqualsFilter.Serialization.cs @@ -19,6 +19,15 @@ public partial class NumberLessThanOrEqualsFilter : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,35 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(NumberLessThanOrEqualsFilter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Value)) { writer.WritePropertyName("value"u8); writer.WriteNumberValue(Value.Value); } - writer.WritePropertyName("operatorType"u8); - writer.WriteStringValue(OperatorType.ToString()); - if (Optional.IsDefined(Key)) - { - writer.WritePropertyName("key"u8); - writer.WriteStringValue(Key); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NumberLessThanOrEqualsFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberNotInAdvancedFilter.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberNotInAdvancedFilter.Serialization.cs index 3101e1dd64d5..7881665e0911 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberNotInAdvancedFilter.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberNotInAdvancedFilter.Serialization.cs @@ -20,6 +20,15 @@ public partial class NumberNotInAdvancedFilter : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(NumberNotInAdvancedFilter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(Values)) { writer.WritePropertyName("values"u8); @@ -38,29 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea } writer.WriteEndArray(); } - writer.WritePropertyName("operatorType"u8); - writer.WriteStringValue(OperatorType.ToString()); - if (Optional.IsDefined(Key)) - { - writer.WritePropertyName("key"u8); - writer.WriteStringValue(Key); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NumberNotInAdvancedFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberNotInFilter.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberNotInFilter.Serialization.cs index ce6a6f7ce223..f3b5648a5250 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberNotInFilter.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberNotInFilter.Serialization.cs @@ -20,6 +20,15 @@ public partial class NumberNotInFilter : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(NumberNotInFilter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(Values)) { writer.WritePropertyName("values"u8); @@ -38,29 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite } writer.WriteEndArray(); } - writer.WritePropertyName("operatorType"u8); - writer.WriteStringValue(OperatorType.ToString()); - if (Optional.IsDefined(Key)) - { - writer.WritePropertyName("key"u8); - writer.WriteStringValue(Key); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NumberNotInFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberNotInRangeAdvancedFilter.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberNotInRangeAdvancedFilter.Serialization.cs index c12cf812482e..7ed37a04272e 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberNotInRangeAdvancedFilter.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberNotInRangeAdvancedFilter.Serialization.cs @@ -20,6 +20,15 @@ public partial class NumberNotInRangeAdvancedFilter : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(NumberNotInRangeAdvancedFilter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(Values)) { writer.WritePropertyName("values"u8); @@ -48,29 +57,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod } writer.WriteEndArray(); } - writer.WritePropertyName("operatorType"u8); - writer.WriteStringValue(OperatorType.ToString()); - if (Optional.IsDefined(Key)) - { - writer.WritePropertyName("key"u8); - writer.WriteStringValue(Key); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NumberNotInRangeAdvancedFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberNotInRangeFilter.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberNotInRangeFilter.Serialization.cs index b4f09c0a1b81..b5b4ea470317 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberNotInRangeFilter.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberNotInRangeFilter.Serialization.cs @@ -20,6 +20,15 @@ public partial class NumberNotInRangeFilter : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(NumberNotInRangeFilter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(Values)) { writer.WritePropertyName("values"u8); @@ -48,29 +57,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader } writer.WriteEndArray(); } - writer.WritePropertyName("operatorType"u8); - writer.WriteStringValue(OperatorType.ToString()); - if (Optional.IsDefined(Key)) - { - writer.WritePropertyName("key"u8); - writer.WriteStringValue(Key); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NumberNotInRangeFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerAuthorization.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerAuthorization.Serialization.cs index 67fb86b64f98..7b912d44c3de 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerAuthorization.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerAuthorization.Serialization.cs @@ -20,6 +20,15 @@ public partial class PartnerAuthorization : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(PartnerAuthorization)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(DefaultMaximumExpirationTimeInDays)) { writer.WritePropertyName("defaultMaximumExpirationTimeInDays"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } PartnerAuthorization IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerClientAuthentication.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerClientAuthentication.Serialization.cs index e49cc746d805..2e8126e4458e 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerClientAuthentication.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerClientAuthentication.Serialization.cs @@ -20,6 +20,15 @@ public partial class PartnerClientAuthentication : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(PartnerClientAuthentication)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("clientAuthenticationType"u8); writer.WriteStringValue(ClientAuthenticationType.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -45,7 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } PartnerClientAuthentication IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerConfigurationPatch.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerConfigurationPatch.Serialization.cs index 05f89e55196a..bbb8b02d3852 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerConfigurationPatch.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerConfigurationPatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class PartnerConfigurationPatch : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(PartnerConfigurationPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -60,7 +68,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } PartnerConfigurationPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerConfigurationsListResult.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerConfigurationsListResult.Serialization.cs index 04d099aeab8d..3c0123b4f742 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerConfigurationsListResult.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerConfigurationsListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class PartnerConfigurationsListResult : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(PartnerConfigurationsListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } PartnerConfigurationsListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerDestinationInfo.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerDestinationInfo.Serialization.cs index 7ebdc16fc710..e94842bee4d7 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerDestinationInfo.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerDestinationInfo.Serialization.cs @@ -21,6 +21,15 @@ public partial class PartnerDestinationInfo : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,7 +37,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(PartnerDestinationInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(AzureSubscriptionId)) { writer.WritePropertyName("azureSubscriptionId"u8); @@ -76,7 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } PartnerDestinationInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerDestinationPatch.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerDestinationPatch.Serialization.cs index 331f65b6f5c9..a9a2928c6b72 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerDestinationPatch.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerDestinationPatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class PartnerDestinationPatch : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(PartnerDestinationPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } PartnerDestinationPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerDestinationsListResult.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerDestinationsListResult.Serialization.cs index e9590ee24295..6f205e47ade6 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerDestinationsListResult.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerDestinationsListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class PartnerDestinationsListResult : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(PartnerDestinationsListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } PartnerDestinationsListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerDetails.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerDetails.Serialization.cs index f7ffe542c868..04b4407b5aea 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerDetails.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerDetails.Serialization.cs @@ -19,6 +19,15 @@ public partial class PartnerDetails : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(PartnerDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Description)) { writer.WritePropertyName("description"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp #endif } } - writer.WriteEndObject(); } PartnerDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerEventSubscriptionDestination.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerEventSubscriptionDestination.Serialization.cs index 989fe24bc203..06f3110e0e82 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerEventSubscriptionDestination.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerEventSubscriptionDestination.Serialization.cs @@ -19,6 +19,15 @@ public partial class PartnerEventSubscriptionDestination : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,9 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(PartnerEventSubscriptionDestination)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("endpointType"u8); - writer.WriteStringValue(EndpointType.ToString()); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(ResourceId)) @@ -37,22 +44,6 @@ void IJsonModel.Write(Utf8JsonWriter writer writer.WriteStringValue(ResourceId); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } PartnerEventSubscriptionDestination IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerNamespaceChannelPatch.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerNamespaceChannelPatch.Serialization.cs index a5426ce79deb..659c82a5f0f2 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerNamespaceChannelPatch.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerNamespaceChannelPatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class PartnerNamespaceChannelPatch : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(PartnerNamespaceChannelPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(ExpireOnIfNotActivated)) @@ -59,7 +67,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } PartnerNamespaceChannelPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerNamespacePatch.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerNamespacePatch.Serialization.cs index 028a13dc4f54..259b1cf57485 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerNamespacePatch.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerNamespacePatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class PartnerNamespacePatch : IUtf8JsonSerializable, IJsonModel

((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(PartnerNamespacePatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -80,7 +88,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } PartnerNamespacePatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerNamespaceRegenerateKeyContent.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerNamespaceRegenerateKeyContent.Serialization.cs index 4914c90045fd..063d4b7cb32c 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerNamespaceRegenerateKeyContent.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerNamespaceRegenerateKeyContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class PartnerNamespaceRegenerateKeyContent : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(PartnerNamespaceRegenerateKeyContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("keyName"u8); writer.WriteStringValue(KeyName); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } PartnerNamespaceRegenerateKeyContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerNamespaceSharedAccessKeys.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerNamespaceSharedAccessKeys.Serialization.cs index f4826228ccbb..54d6ab9728c8 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerNamespaceSharedAccessKeys.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerNamespaceSharedAccessKeys.Serialization.cs @@ -19,6 +19,15 @@ public partial class PartnerNamespaceSharedAccessKeys : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(PartnerNamespaceSharedAccessKeys)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Key1)) { writer.WritePropertyName("key1"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } PartnerNamespaceSharedAccessKeys IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerNamespacesListResult.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerNamespacesListResult.Serialization.cs index 1546d9a98578..08b6e3ae4560 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerNamespacesListResult.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerNamespacesListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class PartnerNamespacesListResult : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(PartnerNamespacesListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } PartnerNamespacesListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerRegistrationPatch.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerRegistrationPatch.Serialization.cs index c746575ab40e..ad095a051d7f 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerRegistrationPatch.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerRegistrationPatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class PartnerRegistrationPatch : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(PartnerRegistrationPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } PartnerRegistrationPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerRegistrationsListResult.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerRegistrationsListResult.Serialization.cs index ba517c017649..259b9e8dc3a4 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerRegistrationsListResult.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerRegistrationsListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class PartnerRegistrationsListResult : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(PartnerRegistrationsListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } PartnerRegistrationsListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerTopicEventTypeInfo.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerTopicEventTypeInfo.Serialization.cs index 29c3bd4d75f6..d821bbfab22f 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerTopicEventTypeInfo.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerTopicEventTypeInfo.Serialization.cs @@ -20,6 +20,15 @@ public partial class PartnerTopicEventTypeInfo : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(PartnerTopicEventTypeInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Kind)) { writer.WritePropertyName("kind"u8); @@ -59,7 +67,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } PartnerTopicEventTypeInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerTopicInfo.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerTopicInfo.Serialization.cs index 8cbd117147a1..31e3337c3930 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerTopicInfo.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerTopicInfo.Serialization.cs @@ -19,6 +19,15 @@ public partial class PartnerTopicInfo : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(PartnerTopicInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(AzureSubscriptionId)) { writer.WritePropertyName("azureSubscriptionId"u8); @@ -67,7 +75,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } PartnerTopicInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerTopicPatch.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerTopicPatch.Serialization.cs index e581b905657c..b1306b1978a3 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerTopicPatch.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerTopicPatch.Serialization.cs @@ -19,6 +19,15 @@ public partial class PartnerTopicPatch : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(PartnerTopicPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } PartnerTopicPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerTopicsListResult.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerTopicsListResult.Serialization.cs index cb8b07b37951..f45ba4d678eb 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerTopicsListResult.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerTopicsListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class PartnerTopicsListResult : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(PartnerTopicsListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } PartnerTopicsListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerUpdateDestinationInfo.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerUpdateDestinationInfo.Serialization.cs index 97e542f9d44b..f2567012788e 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerUpdateDestinationInfo.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerUpdateDestinationInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class PartnerUpdateDestinationInfo : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(PartnerUpdateDestinationInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("endpointType"u8); writer.WriteStringValue(EndpointType.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } PartnerUpdateDestinationInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerUpdateTopicInfo.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerUpdateTopicInfo.Serialization.cs index 388a734fa042..a9583fe28af9 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerUpdateTopicInfo.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerUpdateTopicInfo.Serialization.cs @@ -18,6 +18,15 @@ internal partial class PartnerUpdateTopicInfo : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(PartnerUpdateTopicInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(EventTypeInfo)) { writer.WritePropertyName("eventTypeInfo"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } PartnerUpdateTopicInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PermissionBindingsListResult.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PermissionBindingsListResult.Serialization.cs index 4f7471c74546..4e92fb083912 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PermissionBindingsListResult.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PermissionBindingsListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class PermissionBindingsListResult : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(PermissionBindingsListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } PermissionBindingsListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PrivateLinkResourcesListResult.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PrivateLinkResourcesListResult.Serialization.cs index 32f7cd5c9a9c..75422a2cf069 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PrivateLinkResourcesListResult.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PrivateLinkResourcesListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class PrivateLinkResourcesListResult : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(PrivateLinkResourcesListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } PrivateLinkResourcesListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PushInfo.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PushInfo.Serialization.cs index f547910cb0fc..9ad27d434229 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PushInfo.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PushInfo.Serialization.cs @@ -19,6 +19,15 @@ public partial class PushInfo : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions throw new FormatException($"The model {nameof(PushInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(MaxDeliveryCount)) { writer.WritePropertyName("maxDeliveryCount"u8); @@ -67,7 +75,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions #endif } } - writer.WriteEndObject(); } PushInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/QueueInfo.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/QueueInfo.Serialization.cs index e4f6de59ef36..777dbb419255 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/QueueInfo.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/QueueInfo.Serialization.cs @@ -19,6 +19,15 @@ public partial class QueueInfo : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions throw new FormatException($"The model {nameof(QueueInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ReceiveLockDurationInSeconds)) { writer.WritePropertyName("receiveLockDurationInSeconds"u8); @@ -62,7 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions #endif } } - writer.WriteEndObject(); } QueueInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ResourceAssociation.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ResourceAssociation.Serialization.cs index 7cb2860af3aa..f8c070fdc5da 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ResourceAssociation.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ResourceAssociation.Serialization.cs @@ -19,6 +19,15 @@ public partial class ResourceAssociation : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ResourceAssociation)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } ResourceAssociation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ResourceMoveChangeHistory.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ResourceMoveChangeHistory.Serialization.cs index 4e5ab7945713..5fb42d10dfbe 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ResourceMoveChangeHistory.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ResourceMoveChangeHistory.Serialization.cs @@ -19,6 +19,15 @@ public partial class ResourceMoveChangeHistory : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(ResourceMoveChangeHistory)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(AzureSubscriptionId)) { writer.WritePropertyName("azureSubscriptionId"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } ResourceMoveChangeHistory IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ResourceSku.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ResourceSku.Serialization.cs index e4df9e33aa71..8044aaa69566 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ResourceSku.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ResourceSku.Serialization.cs @@ -19,6 +19,15 @@ internal partial class ResourceSku : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio throw new FormatException($"The model {nameof(ResourceSku)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio #endif } } - writer.WriteEndObject(); } ResourceSku IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/RoutingEnrichments.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/RoutingEnrichments.Serialization.cs index 005f9a5b95f3..fe89a48def4b 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/RoutingEnrichments.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/RoutingEnrichments.Serialization.cs @@ -20,6 +20,15 @@ public partial class RoutingEnrichments : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(RoutingEnrichments)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Static)) { writer.WritePropertyName("static"u8); @@ -63,7 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } RoutingEnrichments IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/RoutingIdentityInfo.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/RoutingIdentityInfo.Serialization.cs index 77b1d4393a39..26f94155ae22 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/RoutingIdentityInfo.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/RoutingIdentityInfo.Serialization.cs @@ -19,6 +19,15 @@ public partial class RoutingIdentityInfo : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(RoutingIdentityInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IdentityType)) { writer.WritePropertyName("type"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } RoutingIdentityInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ServiceBusQueueEventSubscriptionDestination.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ServiceBusQueueEventSubscriptionDestination.Serialization.cs index 5d949817ad6b..7931c1d27565 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ServiceBusQueueEventSubscriptionDestination.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ServiceBusQueueEventSubscriptionDestination.Serialization.cs @@ -20,6 +20,15 @@ public partial class ServiceBusQueueEventSubscriptionDestination : IUtf8JsonSeri void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,9 +36,7 @@ void IJsonModel.Write(Utf8JsonWrite throw new FormatException($"The model {nameof(ServiceBusQueueEventSubscriptionDestination)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("endpointType"u8); - writer.WriteStringValue(EndpointType.ToString()); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(ResourceId)) @@ -48,22 +55,6 @@ void IJsonModel.Write(Utf8JsonWrite writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ServiceBusQueueEventSubscriptionDestination IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ServiceBusTopicEventSubscriptionDestination.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ServiceBusTopicEventSubscriptionDestination.Serialization.cs index fea904208b0e..944b6a037e29 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ServiceBusTopicEventSubscriptionDestination.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ServiceBusTopicEventSubscriptionDestination.Serialization.cs @@ -20,6 +20,15 @@ public partial class ServiceBusTopicEventSubscriptionDestination : IUtf8JsonSeri void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,9 +36,7 @@ void IJsonModel.Write(Utf8JsonWrite throw new FormatException($"The model {nameof(ServiceBusTopicEventSubscriptionDestination)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("endpointType"u8); - writer.WriteStringValue(EndpointType.ToString()); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(ResourceId)) @@ -48,22 +55,6 @@ void IJsonModel.Write(Utf8JsonWrite writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ServiceBusTopicEventSubscriptionDestination IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StaticDeliveryAttributeMapping.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StaticDeliveryAttributeMapping.Serialization.cs index 2829d13b55c3..2911017d3a9e 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StaticDeliveryAttributeMapping.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StaticDeliveryAttributeMapping.Serialization.cs @@ -19,6 +19,15 @@ public partial class StaticDeliveryAttributeMapping : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,14 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(StaticDeliveryAttributeMapping)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(MappingType.ToString()); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Value)) @@ -47,22 +49,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod writer.WriteBooleanValue(IsSecret.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } StaticDeliveryAttributeMapping IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StaticRoutingEnrichment.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StaticRoutingEnrichment.Serialization.cs index e9efa2dc40d8..49cd26f48604 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StaticRoutingEnrichment.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StaticRoutingEnrichment.Serialization.cs @@ -20,6 +20,15 @@ public partial class StaticRoutingEnrichment : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(StaticRoutingEnrichment)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Key)) { writer.WritePropertyName("key"u8); @@ -50,7 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } StaticRoutingEnrichment IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StaticStringRoutingEnrichment.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StaticStringRoutingEnrichment.Serialization.cs index 29056849421d..e8691bbe580c 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StaticStringRoutingEnrichment.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StaticStringRoutingEnrichment.Serialization.cs @@ -19,6 +19,15 @@ public partial class StaticStringRoutingEnrichment : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,35 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(StaticStringRoutingEnrichment)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Value)) { writer.WritePropertyName("value"u8); writer.WriteStringValue(Value); } - if (Optional.IsDefined(Key)) - { - writer.WritePropertyName("key"u8); - writer.WriteStringValue(Key); - } - writer.WritePropertyName("valueType"u8); - writer.WriteStringValue(ValueType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } StaticStringRoutingEnrichment IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StorageBlobDeadLetterDestination.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StorageBlobDeadLetterDestination.Serialization.cs index 9b875d214bc6..d33248eb4154 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StorageBlobDeadLetterDestination.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StorageBlobDeadLetterDestination.Serialization.cs @@ -19,6 +19,15 @@ public partial class StorageBlobDeadLetterDestination : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,9 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(StorageBlobDeadLetterDestination)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("endpointType"u8); - writer.WriteStringValue(EndpointType.ToString()); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(ResourceId)) @@ -42,22 +49,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M writer.WriteStringValue(BlobContainerName); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } StorageBlobDeadLetterDestination IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StorageQueueEventSubscriptionDestination.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StorageQueueEventSubscriptionDestination.Serialization.cs index be4229660504..b960863984e5 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StorageQueueEventSubscriptionDestination.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StorageQueueEventSubscriptionDestination.Serialization.cs @@ -19,6 +19,15 @@ public partial class StorageQueueEventSubscriptionDestination : IUtf8JsonSeriali void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,9 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter w throw new FormatException($"The model {nameof(StorageQueueEventSubscriptionDestination)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("endpointType"u8); - writer.WriteStringValue(EndpointType.ToString()); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(ResourceId)) @@ -47,22 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter w writer.WriteNumberValue(QueueMessageTimeToLiveInSeconds.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } StorageQueueEventSubscriptionDestination IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringBeginsWithAdvancedFilter.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringBeginsWithAdvancedFilter.Serialization.cs index 4f563f518288..d0ae84bae265 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringBeginsWithAdvancedFilter.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringBeginsWithAdvancedFilter.Serialization.cs @@ -20,6 +20,15 @@ public partial class StringBeginsWithAdvancedFilter : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(StringBeginsWithAdvancedFilter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(Values)) { writer.WritePropertyName("values"u8); @@ -38,29 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod } writer.WriteEndArray(); } - writer.WritePropertyName("operatorType"u8); - writer.WriteStringValue(OperatorType.ToString()); - if (Optional.IsDefined(Key)) - { - writer.WritePropertyName("key"u8); - writer.WriteStringValue(Key); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } StringBeginsWithAdvancedFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringBeginsWithFilter.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringBeginsWithFilter.Serialization.cs index 667c79224bbb..70b6f876f180 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringBeginsWithFilter.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringBeginsWithFilter.Serialization.cs @@ -20,6 +20,15 @@ public partial class StringBeginsWithFilter : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(StringBeginsWithFilter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(Values)) { writer.WritePropertyName("values"u8); @@ -38,29 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader } writer.WriteEndArray(); } - writer.WritePropertyName("operatorType"u8); - writer.WriteStringValue(OperatorType.ToString()); - if (Optional.IsDefined(Key)) - { - writer.WritePropertyName("key"u8); - writer.WriteStringValue(Key); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } StringBeginsWithFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringContainsAdvancedFilter.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringContainsAdvancedFilter.Serialization.cs index 5b171e692a30..5eae35233f7c 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringContainsAdvancedFilter.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringContainsAdvancedFilter.Serialization.cs @@ -20,6 +20,15 @@ public partial class StringContainsAdvancedFilter : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(StringContainsAdvancedFilter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(Values)) { writer.WritePropertyName("values"u8); @@ -38,29 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model } writer.WriteEndArray(); } - writer.WritePropertyName("operatorType"u8); - writer.WriteStringValue(OperatorType.ToString()); - if (Optional.IsDefined(Key)) - { - writer.WritePropertyName("key"u8); - writer.WriteStringValue(Key); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } StringContainsAdvancedFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringContainsFilter.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringContainsFilter.Serialization.cs index 3d4ba3ce832e..35a2ee6a8442 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringContainsFilter.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringContainsFilter.Serialization.cs @@ -20,6 +20,15 @@ public partial class StringContainsFilter : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(StringContainsFilter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(Values)) { writer.WritePropertyName("values"u8); @@ -38,29 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr } writer.WriteEndArray(); } - writer.WritePropertyName("operatorType"u8); - writer.WriteStringValue(OperatorType.ToString()); - if (Optional.IsDefined(Key)) - { - writer.WritePropertyName("key"u8); - writer.WriteStringValue(Key); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } StringContainsFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringEndsWithAdvancedFilter.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringEndsWithAdvancedFilter.Serialization.cs index f255dd3759af..eeec2cecd994 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringEndsWithAdvancedFilter.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringEndsWithAdvancedFilter.Serialization.cs @@ -20,6 +20,15 @@ public partial class StringEndsWithAdvancedFilter : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(StringEndsWithAdvancedFilter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(Values)) { writer.WritePropertyName("values"u8); @@ -38,29 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model } writer.WriteEndArray(); } - writer.WritePropertyName("operatorType"u8); - writer.WriteStringValue(OperatorType.ToString()); - if (Optional.IsDefined(Key)) - { - writer.WritePropertyName("key"u8); - writer.WriteStringValue(Key); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } StringEndsWithAdvancedFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringEndsWithFilter.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringEndsWithFilter.Serialization.cs index 0428dde996b3..90997c6cc722 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringEndsWithFilter.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringEndsWithFilter.Serialization.cs @@ -20,6 +20,15 @@ public partial class StringEndsWithFilter : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(StringEndsWithFilter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(Values)) { writer.WritePropertyName("values"u8); @@ -38,29 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr } writer.WriteEndArray(); } - writer.WritePropertyName("operatorType"u8); - writer.WriteStringValue(OperatorType.ToString()); - if (Optional.IsDefined(Key)) - { - writer.WritePropertyName("key"u8); - writer.WriteStringValue(Key); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } StringEndsWithFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringInAdvancedFilter.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringInAdvancedFilter.Serialization.cs index 2d5b2089c042..39a749369f60 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringInAdvancedFilter.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringInAdvancedFilter.Serialization.cs @@ -20,6 +20,15 @@ public partial class StringInAdvancedFilter : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(StringInAdvancedFilter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(Values)) { writer.WritePropertyName("values"u8); @@ -38,29 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader } writer.WriteEndArray(); } - writer.WritePropertyName("operatorType"u8); - writer.WriteStringValue(OperatorType.ToString()); - if (Optional.IsDefined(Key)) - { - writer.WritePropertyName("key"u8); - writer.WriteStringValue(Key); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } StringInAdvancedFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringInFilter.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringInFilter.Serialization.cs index 6cd98e9adf5c..9a68fcb980db 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringInFilter.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringInFilter.Serialization.cs @@ -20,6 +20,15 @@ public partial class StringInFilter : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(StringInFilter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(Values)) { writer.WritePropertyName("values"u8); @@ -38,29 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp } writer.WriteEndArray(); } - writer.WritePropertyName("operatorType"u8); - writer.WriteStringValue(OperatorType.ToString()); - if (Optional.IsDefined(Key)) - { - writer.WritePropertyName("key"u8); - writer.WriteStringValue(Key); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } StringInFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringNotBeginsWithAdvancedFilter.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringNotBeginsWithAdvancedFilter.Serialization.cs index 803239dfa98f..eded7d7c9fea 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringNotBeginsWithAdvancedFilter.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringNotBeginsWithAdvancedFilter.Serialization.cs @@ -20,6 +20,15 @@ public partial class StringNotBeginsWithAdvancedFilter : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(StringNotBeginsWithAdvancedFilter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(Values)) { writer.WritePropertyName("values"u8); @@ -38,29 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, } writer.WriteEndArray(); } - writer.WritePropertyName("operatorType"u8); - writer.WriteStringValue(OperatorType.ToString()); - if (Optional.IsDefined(Key)) - { - writer.WritePropertyName("key"u8); - writer.WriteStringValue(Key); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } StringNotBeginsWithAdvancedFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringNotBeginsWithFilter.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringNotBeginsWithFilter.Serialization.cs index fe59b5ea5388..df131e177428 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringNotBeginsWithFilter.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringNotBeginsWithFilter.Serialization.cs @@ -20,6 +20,15 @@ public partial class StringNotBeginsWithFilter : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(StringNotBeginsWithFilter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(Values)) { writer.WritePropertyName("values"u8); @@ -38,29 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea } writer.WriteEndArray(); } - writer.WritePropertyName("operatorType"u8); - writer.WriteStringValue(OperatorType.ToString()); - if (Optional.IsDefined(Key)) - { - writer.WritePropertyName("key"u8); - writer.WriteStringValue(Key); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } StringNotBeginsWithFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringNotContainsAdvancedFilter.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringNotContainsAdvancedFilter.Serialization.cs index 718c7038b80e..2fad23bdb178 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringNotContainsAdvancedFilter.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringNotContainsAdvancedFilter.Serialization.cs @@ -20,6 +20,15 @@ public partial class StringNotContainsAdvancedFilter : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(StringNotContainsAdvancedFilter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(Values)) { writer.WritePropertyName("values"u8); @@ -38,29 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo } writer.WriteEndArray(); } - writer.WritePropertyName("operatorType"u8); - writer.WriteStringValue(OperatorType.ToString()); - if (Optional.IsDefined(Key)) - { - writer.WritePropertyName("key"u8); - writer.WriteStringValue(Key); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } StringNotContainsAdvancedFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringNotContainsFilter.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringNotContainsFilter.Serialization.cs index 2f3830c50f90..ad88aa6f7da7 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringNotContainsFilter.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringNotContainsFilter.Serialization.cs @@ -20,6 +20,15 @@ public partial class StringNotContainsFilter : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(StringNotContainsFilter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(Values)) { writer.WritePropertyName("values"u8); @@ -38,29 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade } writer.WriteEndArray(); } - writer.WritePropertyName("operatorType"u8); - writer.WriteStringValue(OperatorType.ToString()); - if (Optional.IsDefined(Key)) - { - writer.WritePropertyName("key"u8); - writer.WriteStringValue(Key); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } StringNotContainsFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringNotEndsWithAdvancedFilter.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringNotEndsWithAdvancedFilter.Serialization.cs index 9ff2486cf361..7b661ca58f8a 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringNotEndsWithAdvancedFilter.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringNotEndsWithAdvancedFilter.Serialization.cs @@ -20,6 +20,15 @@ public partial class StringNotEndsWithAdvancedFilter : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(StringNotEndsWithAdvancedFilter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(Values)) { writer.WritePropertyName("values"u8); @@ -38,29 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo } writer.WriteEndArray(); } - writer.WritePropertyName("operatorType"u8); - writer.WriteStringValue(OperatorType.ToString()); - if (Optional.IsDefined(Key)) - { - writer.WritePropertyName("key"u8); - writer.WriteStringValue(Key); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } StringNotEndsWithAdvancedFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringNotEndsWithFilter.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringNotEndsWithFilter.Serialization.cs index 7277be7acaa7..d92af5c44bec 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringNotEndsWithFilter.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringNotEndsWithFilter.Serialization.cs @@ -20,6 +20,15 @@ public partial class StringNotEndsWithFilter : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(StringNotEndsWithFilter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(Values)) { writer.WritePropertyName("values"u8); @@ -38,29 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade } writer.WriteEndArray(); } - writer.WritePropertyName("operatorType"u8); - writer.WriteStringValue(OperatorType.ToString()); - if (Optional.IsDefined(Key)) - { - writer.WritePropertyName("key"u8); - writer.WriteStringValue(Key); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } StringNotEndsWithFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringNotInAdvancedFilter.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringNotInAdvancedFilter.Serialization.cs index d7d37e834dbb..579df82fe813 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringNotInAdvancedFilter.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringNotInAdvancedFilter.Serialization.cs @@ -20,6 +20,15 @@ public partial class StringNotInAdvancedFilter : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(StringNotInAdvancedFilter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(Values)) { writer.WritePropertyName("values"u8); @@ -38,29 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea } writer.WriteEndArray(); } - writer.WritePropertyName("operatorType"u8); - writer.WriteStringValue(OperatorType.ToString()); - if (Optional.IsDefined(Key)) - { - writer.WritePropertyName("key"u8); - writer.WriteStringValue(Key); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } StringNotInAdvancedFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringNotInFilter.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringNotInFilter.Serialization.cs index 67d407393018..0fb27578d8e2 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringNotInFilter.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringNotInFilter.Serialization.cs @@ -20,6 +20,15 @@ public partial class StringNotInFilter : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(StringNotInFilter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(Values)) { writer.WritePropertyName("values"u8); @@ -38,29 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite } writer.WriteEndArray(); } - writer.WritePropertyName("operatorType"u8); - writer.WriteStringValue(OperatorType.ToString()); - if (Optional.IsDefined(Key)) - { - writer.WritePropertyName("key"u8); - writer.WriteStringValue(Key); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } StringNotInFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/SubscriptionFullUri.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/SubscriptionFullUri.Serialization.cs index 59d16699ab76..44ed2350fafb 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/SubscriptionFullUri.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/SubscriptionFullUri.Serialization.cs @@ -19,6 +19,15 @@ public partial class SubscriptionFullUri : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(SubscriptionFullUri)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(EndpointUri)) { writer.WritePropertyName("endpointUrl"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } SubscriptionFullUri IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/SubscriptionsListResult.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/SubscriptionsListResult.Serialization.cs index ecf4e0c0f624..30e0edc4a750 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/SubscriptionsListResult.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/SubscriptionsListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class SubscriptionsListResult : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(SubscriptionsListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } SubscriptionsListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/SystemTopicPatch.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/SystemTopicPatch.Serialization.cs index 0af7a4650ae4..314c407abc8a 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/SystemTopicPatch.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/SystemTopicPatch.Serialization.cs @@ -19,6 +19,15 @@ public partial class SystemTopicPatch : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(SystemTopicPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } SystemTopicPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/SystemTopicsListResult.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/SystemTopicsListResult.Serialization.cs index 25f4f384dc4f..7e8a7af730e4 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/SystemTopicsListResult.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/SystemTopicsListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class SystemTopicsListResult : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(SystemTopicsListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } SystemTopicsListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/TopicRegenerateKeyContent.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/TopicRegenerateKeyContent.Serialization.cs index a56fbb5acf37..3822911df747 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/TopicRegenerateKeyContent.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/TopicRegenerateKeyContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class TopicRegenerateKeyContent : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(TopicRegenerateKeyContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("keyName"u8); writer.WriteStringValue(KeyName); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } TopicRegenerateKeyContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/TopicSharedAccessKeys.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/TopicSharedAccessKeys.Serialization.cs index b09a4e375e9e..0b64787a76d3 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/TopicSharedAccessKeys.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/TopicSharedAccessKeys.Serialization.cs @@ -19,6 +19,15 @@ public partial class TopicSharedAccessKeys : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(TopicSharedAccessKeys)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Key1)) { writer.WritePropertyName("key1"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } TopicSharedAccessKeys IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/TopicSpacesConfiguration.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/TopicSpacesConfiguration.Serialization.cs index fccba5285d6a..aadc5efa6725 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/TopicSpacesConfiguration.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/TopicSpacesConfiguration.Serialization.cs @@ -20,6 +20,15 @@ public partial class TopicSpacesConfiguration : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(TopicSpacesConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(State)) { writer.WritePropertyName("state"u8); @@ -93,7 +101,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } TopicSpacesConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/TopicSpacesListResult.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/TopicSpacesListResult.Serialization.cs index 81dfb87dcdca..ebe9d1ec919c 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/TopicSpacesListResult.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/TopicSpacesListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class TopicSpacesListResult : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(TopicSpacesListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } TopicSpacesListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/TopicTypeAdditionalEnforcedPermission.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/TopicTypeAdditionalEnforcedPermission.Serialization.cs index fa1361c880fd..a73165c5aad6 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/TopicTypeAdditionalEnforcedPermission.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/TopicTypeAdditionalEnforcedPermission.Serialization.cs @@ -19,6 +19,15 @@ public partial class TopicTypeAdditionalEnforcedPermission : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(TopicTypeAdditionalEnforcedPermission)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(PermissionName)) { writer.WritePropertyName("permissionName"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } TopicTypeAdditionalEnforcedPermission IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/TopicTypesListResult.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/TopicTypesListResult.Serialization.cs index 0fbe736e695b..e0319a24e581 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/TopicTypesListResult.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/TopicTypesListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class TopicTypesListResult : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(TopicTypesListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } TopicTypesListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/TopicsConfiguration.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/TopicsConfiguration.Serialization.cs index b72eccfed06f..3a26eb350ea4 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/TopicsConfiguration.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/TopicsConfiguration.Serialization.cs @@ -20,6 +20,15 @@ public partial class TopicsConfiguration : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(TopicsConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Hostname)) { writer.WritePropertyName("hostname"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } TopicsConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/TopicsListResult.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/TopicsListResult.Serialization.cs index 957c3760d163..4c1af6aaa4de 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/TopicsListResult.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/TopicsListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class TopicsListResult : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(TopicsListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } TopicsListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UnknownAdvancedFilter.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UnknownAdvancedFilter.Serialization.cs index 5895109f0e58..72c56f407a8b 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UnknownAdvancedFilter.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UnknownAdvancedFilter.Serialization.cs @@ -19,6 +19,15 @@ internal partial class UnknownAdvancedFilter : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,30 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(AdvancedFilter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("operatorType"u8); - writer.WriteStringValue(OperatorType.ToString()); - if (Optional.IsDefined(Key)) - { - writer.WritePropertyName("key"u8); - writer.WriteStringValue(Key); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } AdvancedFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UnknownDeadLetterDestination.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UnknownDeadLetterDestination.Serialization.cs index 8f2e54875e3c..158ddddc840c 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UnknownDeadLetterDestination.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UnknownDeadLetterDestination.Serialization.cs @@ -19,6 +19,15 @@ internal partial class UnknownDeadLetterDestination : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,25 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(DeadLetterDestination)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("endpointType"u8); - writer.WriteStringValue(EndpointType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } DeadLetterDestination IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UnknownDeliveryAttributeMapping.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UnknownDeliveryAttributeMapping.Serialization.cs index ed9aa9326bdb..43cf19f4f9d6 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UnknownDeliveryAttributeMapping.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UnknownDeliveryAttributeMapping.Serialization.cs @@ -19,6 +19,15 @@ internal partial class UnknownDeliveryAttributeMapping : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,30 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(DeliveryAttributeMapping)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(MappingType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } DeliveryAttributeMapping IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UnknownEventSubscriptionDestination.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UnknownEventSubscriptionDestination.Serialization.cs index aacd633aaf93..7d71ca5a0596 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UnknownEventSubscriptionDestination.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UnknownEventSubscriptionDestination.Serialization.cs @@ -19,6 +19,15 @@ internal partial class UnknownEventSubscriptionDestination : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,25 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(EventSubscriptionDestination)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("endpointType"u8); - writer.WriteStringValue(EndpointType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } EventSubscriptionDestination IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UnknownFilter.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UnknownFilter.Serialization.cs index 1aafb8682239..9a869af0954f 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UnknownFilter.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UnknownFilter.Serialization.cs @@ -19,6 +19,15 @@ internal partial class UnknownFilter : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,30 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(EventGridFilter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("operatorType"u8); - writer.WriteStringValue(OperatorType.ToString()); - if (Optional.IsDefined(Key)) - { - writer.WritePropertyName("key"u8); - writer.WriteStringValue(Key); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } EventGridFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UnknownInputSchemaMapping.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UnknownInputSchemaMapping.Serialization.cs index 857dcf5fd6a9..7727c33ed38e 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UnknownInputSchemaMapping.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UnknownInputSchemaMapping.Serialization.cs @@ -19,6 +19,15 @@ internal partial class UnknownInputSchemaMapping : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,25 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(EventGridInputSchemaMapping)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("inputSchemaMappingType"u8); - writer.WriteStringValue(InputSchemaMappingType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } EventGridInputSchemaMapping IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UnknownPartnerClientAuthentication.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UnknownPartnerClientAuthentication.Serialization.cs index 308e84814160..067ce6776b8d 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UnknownPartnerClientAuthentication.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UnknownPartnerClientAuthentication.Serialization.cs @@ -19,6 +19,15 @@ internal partial class UnknownPartnerClientAuthentication : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,25 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(PartnerClientAuthentication)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("clientAuthenticationType"u8); - writer.WriteStringValue(ClientAuthenticationType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } PartnerClientAuthentication IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UnknownPartnerDestinationInfo.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UnknownPartnerDestinationInfo.Serialization.cs index 0161f83636d4..0020ac59c046 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UnknownPartnerDestinationInfo.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UnknownPartnerDestinationInfo.Serialization.cs @@ -20,6 +20,15 @@ internal partial class UnknownPartnerDestinationInfo : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,55 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(PartnerDestinationInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(AzureSubscriptionId)) - { - writer.WritePropertyName("azureSubscriptionId"u8); - writer.WriteStringValue(AzureSubscriptionId); - } - if (Optional.IsDefined(ResourceGroupName)) - { - writer.WritePropertyName("resourceGroupName"u8); - writer.WriteStringValue(ResourceGroupName); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - writer.WritePropertyName("endpointType"u8); - writer.WriteStringValue(EndpointType.ToString()); - if (Optional.IsDefined(EndpointServiceContext)) - { - writer.WritePropertyName("endpointServiceContext"u8); - writer.WriteStringValue(EndpointServiceContext); - } - if (Optional.IsCollectionDefined(ResourceMoveChangeHistory)) - { - writer.WritePropertyName("resourceMoveChangeHistory"u8); - writer.WriteStartArray(); - foreach (var item in ResourceMoveChangeHistory) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } PartnerDestinationInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UnknownPartnerUpdateDestinationInfo.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UnknownPartnerUpdateDestinationInfo.Serialization.cs index 96848f890fb6..528d06d2525f 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UnknownPartnerUpdateDestinationInfo.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UnknownPartnerUpdateDestinationInfo.Serialization.cs @@ -18,6 +18,15 @@ internal partial class UnknownPartnerUpdateDestinationInfo : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,25 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(PartnerUpdateDestinationInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("endpointType"u8); - writer.WriteStringValue(EndpointType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } PartnerUpdateDestinationInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UnknownStaticRoutingEnrichment.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UnknownStaticRoutingEnrichment.Serialization.cs index faf995855bf8..601bf8290495 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UnknownStaticRoutingEnrichment.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UnknownStaticRoutingEnrichment.Serialization.cs @@ -19,6 +19,15 @@ internal partial class UnknownStaticRoutingEnrichment : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,30 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(StaticRoutingEnrichment)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(Key)) - { - writer.WritePropertyName("key"u8); - writer.WriteStringValue(Key); - } - writer.WritePropertyName("valueType"u8); - writer.WriteStringValue(ValueType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } StaticRoutingEnrichment IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UpdateTopicSpacesConfigurationInfo.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UpdateTopicSpacesConfigurationInfo.Serialization.cs index 119d4d12b56f..991c58168f0e 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UpdateTopicSpacesConfigurationInfo.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UpdateTopicSpacesConfigurationInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class UpdateTopicSpacesConfigurationInfo : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(UpdateTopicSpacesConfigurationInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(State)) { writer.WritePropertyName("state"u8); @@ -86,7 +94,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } UpdateTopicSpacesConfigurationInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UpdateTopicsConfigurationInfo.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UpdateTopicsConfigurationInfo.Serialization.cs index 45348bb54ab4..74df838c4194 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UpdateTopicsConfigurationInfo.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UpdateTopicsConfigurationInfo.Serialization.cs @@ -18,6 +18,15 @@ internal partial class UpdateTopicsConfigurationInfo : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(UpdateTopicsConfigurationInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(CustomDomains)) { writer.WritePropertyName("customDomains"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } UpdateTopicsConfigurationInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/VerifiedPartnersListResult.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/VerifiedPartnersListResult.Serialization.cs index d3d924402269..351db97307d8 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/VerifiedPartnersListResult.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/VerifiedPartnersListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class VerifiedPartnersListResult : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(VerifiedPartnersListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } VerifiedPartnersListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/WebHookEventSubscriptionDestination.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/WebHookEventSubscriptionDestination.Serialization.cs index 4db9502ee6a2..7e4afd229fd9 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/WebHookEventSubscriptionDestination.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/WebHookEventSubscriptionDestination.Serialization.cs @@ -20,6 +20,15 @@ public partial class WebHookEventSubscriptionDestination : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,9 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(WebHookEventSubscriptionDestination)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("endpointType"u8); - writer.WriteStringValue(EndpointType.ToString()); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Endpoint)) @@ -78,22 +85,6 @@ void IJsonModel.Write(Utf8JsonWriter writer writer.WriteStringValue(MinimumTlsVersionAllowed.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } WebHookEventSubscriptionDestination IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/WebhookPartnerDestinationInfo.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/WebhookPartnerDestinationInfo.Serialization.cs index 866dda8a30c1..702d47930d46 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/WebhookPartnerDestinationInfo.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/WebhookPartnerDestinationInfo.Serialization.cs @@ -20,6 +20,15 @@ public partial class WebhookPartnerDestinationInfo : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,39 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(WebhookPartnerDestinationInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(AzureSubscriptionId)) - { - writer.WritePropertyName("azureSubscriptionId"u8); - writer.WriteStringValue(AzureSubscriptionId); - } - if (Optional.IsDefined(ResourceGroupName)) - { - writer.WritePropertyName("resourceGroupName"u8); - writer.WriteStringValue(ResourceGroupName); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - writer.WritePropertyName("endpointType"u8); - writer.WriteStringValue(EndpointType.ToString()); - if (Optional.IsDefined(EndpointServiceContext)) - { - writer.WritePropertyName("endpointServiceContext"u8); - writer.WriteStringValue(EndpointServiceContext); - } - if (Optional.IsCollectionDefined(ResourceMoveChangeHistory)) - { - writer.WritePropertyName("resourceMoveChangeHistory"u8); - writer.WriteStartArray(); - foreach (var item in ResourceMoveChangeHistory) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(EndpointUri)) @@ -78,22 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode writer.WriteObjectValue(ClientAuthentication, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } WebhookPartnerDestinationInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/WebhookUpdatePartnerDestinationInfo.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/WebhookUpdatePartnerDestinationInfo.Serialization.cs index 562cd6110c64..1234535d6307 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/WebhookUpdatePartnerDestinationInfo.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/WebhookUpdatePartnerDestinationInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class WebhookUpdatePartnerDestinationInfo : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,9 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(WebhookUpdatePartnerDestinationInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("endpointType"u8); - writer.WriteStringValue(EndpointType.ToString()); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(EndpointUri)) @@ -46,22 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer writer.WriteObjectValue(ClientAuthentication, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } WebhookUpdatePartnerDestinationInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/NamespaceTopicData.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/NamespaceTopicData.Serialization.cs index f5bcb2e88ed3..0a6b83957964 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/NamespaceTopicData.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/NamespaceTopicData.Serialization.cs @@ -21,6 +21,15 @@ public partial class NamespaceTopicData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,27 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(NamespaceTopicData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) @@ -72,22 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNumberValue(EventRetentionInDays.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NamespaceTopicData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/NamespaceTopicEventSubscriptionData.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/NamespaceTopicEventSubscriptionData.Serialization.cs index 5bafc657a2b4..933a413923e0 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/NamespaceTopicEventSubscriptionData.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/NamespaceTopicEventSubscriptionData.Serialization.cs @@ -21,6 +21,15 @@ public partial class NamespaceTopicEventSubscriptionData : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,27 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(NamespaceTopicEventSubscriptionData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) @@ -77,22 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer writer.WriteStringValue(ExpireOn.Value, "O"); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NamespaceTopicEventSubscriptionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/NetworkSecurityPerimeterConfigurationData.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/NetworkSecurityPerimeterConfigurationData.Serialization.cs index dae1b98b455d..8d85a5d48aa9 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/NetworkSecurityPerimeterConfigurationData.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/NetworkSecurityPerimeterConfigurationData.Serialization.cs @@ -22,6 +22,15 @@ public partial class NetworkSecurityPerimeterConfigurationData : IUtf8JsonSerial void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -29,27 +38,7 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(NetworkSecurityPerimeterConfigurationData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(ProvisioningState)) @@ -83,22 +72,6 @@ void IJsonModel.Write(Utf8JsonWriter writer.WriteObjectValue(Profile, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NetworkSecurityPerimeterConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerConfigurationData.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerConfigurationData.Serialization.cs index 9d499cf37dd5..21855ba976bf 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerConfigurationData.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerConfigurationData.Serialization.cs @@ -22,6 +22,15 @@ public partial class PartnerConfigurationData : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -29,40 +38,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(PartnerConfigurationData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(PartnerAuthorization)) @@ -76,22 +52,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } PartnerConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerDestinationData.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerDestinationData.Serialization.cs index 103b354c1a0a..ec251e36cb8d 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerDestinationData.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerDestinationData.Serialization.cs @@ -22,6 +22,15 @@ public partial class PartnerDestinationData : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -29,40 +38,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(PartnerDestinationData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(PartnerRegistrationImmutableId)) @@ -101,22 +77,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader writer.WriteStringValue(MessageForActivation); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } PartnerDestinationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerNamespaceChannelData.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerNamespaceChannelData.Serialization.cs index 96b1995c46a4..7a516ee2415a 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerNamespaceChannelData.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerNamespaceChannelData.Serialization.cs @@ -21,6 +21,15 @@ public partial class PartnerNamespaceChannelData : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,27 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(PartnerNamespaceChannelData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(ChannelType)) @@ -87,22 +76,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR writer.WriteStringValue(ExpireOnIfNotActivated.Value, "O"); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } PartnerNamespaceChannelData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerNamespaceData.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerNamespaceData.Serialization.cs index 41711983d107..c777b12effd3 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerNamespaceData.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerNamespaceData.Serialization.cs @@ -22,6 +22,15 @@ public partial class PartnerNamespaceData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -29,40 +38,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(PartnerNamespaceData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(PrivateEndpointConnections)) @@ -121,22 +97,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr writer.WriteStringValue(PartnerTopicRoutingMode.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } PartnerNamespaceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerRegistrationData.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerRegistrationData.Serialization.cs index b96a01c8d632..bd91844b6e1e 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerRegistrationData.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerRegistrationData.Serialization.cs @@ -22,6 +22,15 @@ public partial class PartnerRegistrationData : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -29,40 +38,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(PartnerRegistrationData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) @@ -76,22 +52,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade writer.WriteStringValue(PartnerRegistrationImmutableId.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } PartnerRegistrationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerTopicData.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerTopicData.Serialization.cs index db184581ea63..429cc24a1403 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerTopicData.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerTopicData.Serialization.cs @@ -22,6 +22,15 @@ public partial class PartnerTopicData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -29,45 +38,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(PartnerTopicData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); JsonSerializer.Serialize(writer, Identity); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(PartnerRegistrationImmutableId)) @@ -111,22 +87,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter writer.WriteStringValue(MessageForActivation); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } PartnerTopicData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/SystemTopicData.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/SystemTopicData.Serialization.cs index 388df6ff7c2c..91506bdfdfe6 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/SystemTopicData.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/SystemTopicData.Serialization.cs @@ -22,6 +22,15 @@ public partial class SystemTopicData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -29,45 +38,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(SystemTopicData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); JsonSerializer.Serialize(writer, Identity); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) @@ -91,22 +67,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO writer.WriteStringValue(MetricResourceId.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SystemTopicData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/TopicSpaceData.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/TopicSpaceData.Serialization.cs index 02ea96d406b7..02ed78bd145a 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/TopicSpaceData.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/TopicSpaceData.Serialization.cs @@ -22,6 +22,15 @@ public partial class TopicSpaceData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -29,27 +38,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(TopicSpaceData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Description)) @@ -73,22 +62,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } TopicSpaceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/TopicTypeData.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/TopicTypeData.Serialization.cs index ac42cafaae19..6d0e54b4458e 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/TopicTypeData.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/TopicTypeData.Serialization.cs @@ -22,6 +22,15 @@ public partial class TopicTypeData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -29,27 +38,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt throw new FormatException($"The model {nameof(TopicTypeData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Provider)) @@ -118,22 +107,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } TopicTypeData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/VerifiedPartnerData.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/VerifiedPartnerData.Serialization.cs index 1393a44541de..b30670cb03c9 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/VerifiedPartnerData.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/VerifiedPartnerData.Serialization.cs @@ -21,6 +21,15 @@ public partial class VerifiedPartnerData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,27 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(VerifiedPartnerData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(PartnerRegistrationImmutableId)) @@ -82,22 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } VerifiedPartnerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/autorest.md b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/autorest.md index 5d8dddc6df2a..04976772edbf 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/autorest.md +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/autorest.md @@ -27,6 +27,7 @@ skip-csproj: true modelerfour: flatten-payloads: false use-model-reader-writer: true +use-write-core: true enable-bicep-serialization: true #mgmt-debug: diff --git a/sdk/eventhub/Azure.Messaging.EventHubs.Processor/CHANGELOG.md b/sdk/eventhub/Azure.Messaging.EventHubs.Processor/CHANGELOG.md index 9abde4ca607e..1ff0490d96f1 100755 --- a/sdk/eventhub/Azure.Messaging.EventHubs.Processor/CHANGELOG.md +++ b/sdk/eventhub/Azure.Messaging.EventHubs.Processor/CHANGELOG.md @@ -10,6 +10,8 @@ ### Other Changes +- Added annotations to make the package compatible with trimming and native AOT compilation. + ## 5.11.5 (2024-08-14) ### Other Changes diff --git a/sdk/eventhub/Azure.Messaging.EventHubs.Processor/README.md b/sdk/eventhub/Azure.Messaging.EventHubs.Processor/README.md index 6e8a98dfd82c..249e00b10454 100755 --- a/sdk/eventhub/Azure.Messaging.EventHubs.Processor/README.md +++ b/sdk/eventhub/Azure.Messaging.EventHubs.Processor/README.md @@ -120,10 +120,12 @@ var processor = new EventProcessorClient(storageClient, consumerGroup, eventHubs In order to use the `EventProcessorClient`, handlers for event processing and errors must be provided. These handlers are considered self-contained and developers are responsible for ensuring that exceptions within the handler code are accounted for. ```C# Snippet:EventHubs_Processor_ReadMe_ConfigureHandlers -var storageConnectionString = "<< CONNECTION STRING FOR THE STORAGE ACCOUNT >>"; +var credential = new DefaultAzureCredential(); + +var storageAccountEndpoint = "<< Account Uri (likely similar to https://{your-account}.blob.core.windows.net) >>"; var blobContainerName = "<< NAME OF THE BLOB CONTAINER >>"; -var eventHubsConnectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; +var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; var consumerGroup = "<< NAME OF THE EVENT HUB CONSUMER GROUP >>"; @@ -157,8 +159,23 @@ async Task processErrorHandler(ProcessErrorEventArgs eventArgs) } } -var storageClient = new BlobContainerClient(storageConnectionString, blobContainerName); -var processor = new EventProcessorClient(storageClient, consumerGroup, eventHubsConnectionString, eventHubName); +var blobUriBuilder = new BlobUriBuilder(new Uri(storageAccountEndpoint)) +{ + BlobContainerName = blobContainerName +}; + +var storageClient = new BlobContainerClient( + blobUriBuilder.ToUri(), + credential); + +var processor = new EventProcessorClient +( + storageClient, + consumerGroup, + fullyQualifiedNamespace, + eventHubName, + credential +); processor.ProcessEventAsync += processEventHandler; processor.ProcessErrorAsync += processErrorHandler; @@ -172,18 +189,35 @@ The `EventProcessorClient` will perform its processing in the background once it var cancellationSource = new CancellationTokenSource(); cancellationSource.CancelAfter(TimeSpan.FromSeconds(45)); -var storageConnectionString = "<< CONNECTION STRING FOR THE STORAGE ACCOUNT >>"; +var credential = new DefaultAzureCredential(); + +var storageAccountEndpoint = "<< Account Uri (likely similar to https://{your-account}.blob.core.windows.net) >>"; var blobContainerName = "<< NAME OF THE BLOB CONTAINER >>"; -var eventHubsConnectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; +var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; var consumerGroup = "<< NAME OF THE EVENT HUB CONSUMER GROUP >>"; Task processEventHandler(ProcessEventArgs eventArgs) => Task.CompletedTask; Task processErrorHandler(ProcessErrorEventArgs eventArgs) => Task.CompletedTask; -var storageClient = new BlobContainerClient(storageConnectionString, blobContainerName); -var processor = new EventProcessorClient(storageClient, consumerGroup, eventHubsConnectionString, eventHubName); +var blobUriBuilder = new BlobUriBuilder(new Uri(storageAccountEndpoint)) +{ + BlobContainerName = blobContainerName +}; + +var storageClient = new BlobContainerClient( + blobUriBuilder.ToUri(), + credential); + +var processor = new EventProcessorClient +( + storageClient, + consumerGroup, + fullyQualifiedNamespace, + eventHubName, + credential +); processor.ProcessEventAsync += processEventHandler; processor.ProcessErrorAsync += processErrorHandler; @@ -225,13 +259,22 @@ To make use of an Active Directory principal with Azure Storage blob containers, ```C# Snippet:EventHubs_Processor_ReadMe_CreateWithIdentity var credential = new DefaultAzureCredential(); -var blobStorageUrl ="<< FULLY-QUALIFIED CONTAINER URL (like https://myaccount.blob.core.windows.net/mycontainer) >>"; -var fullyQualifiedNamespace = "<< FULLY-QUALIFIED EVENT HUBS NAMESPACE (like something.servicebus.windows.net) >>"; +var storageAccountEndpoint = "<< Account Uri (likely similar to https://{your-account}.blob.core.windows.net) >>"; +var blobContainerName = "<< NAME OF THE BLOB CONTAINER >>"; + +var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; var consumerGroup = "<< NAME OF THE EVENT HUB CONSUMER GROUP >>"; -var storageClient = new BlobContainerClient(new Uri(blobStorageUrl), credential); +var blobUriBuilder = new BlobUriBuilder(new Uri(storageAccountEndpoint)) +{ + BlobContainerName = blobContainerName +}; + +var storageClient = new BlobContainerClient( + blobUriBuilder.ToUri(), + credential); var processor = new EventProcessorClient ( diff --git a/sdk/eventhub/Azure.Messaging.EventHubs.Processor/samples/Sample01_HelloWorld.md b/sdk/eventhub/Azure.Messaging.EventHubs.Processor/samples/Sample01_HelloWorld.md index e4333c783818..d53cb5b42835 100644 --- a/sdk/eventhub/Azure.Messaging.EventHubs.Processor/samples/Sample01_HelloWorld.md +++ b/sdk/eventhub/Azure.Messaging.EventHubs.Processor/samples/Sample01_HelloWorld.md @@ -12,13 +12,13 @@ To begin, please ensure that you're familiar with the items discussed in the [Ge ## Client lifetime -Each of the Event Hubs client types is safe to cache and use for the lifetime of the application, which is best practice when the application publishes or reads events regularly or semi-regularly. The clients are responsible for efficient resource management, working to keep resource usage low during periods of inactivity and manage health during periods of higher use. +Each of the Event Hubs client types is safe to cache and use for the lifetime of the application, which is best practice when the application publishes or reads events regularly or semi-regularly. The clients are responsible for efficient resource management, working to keep resource usage low during periods of inactivity and manage health during periods of higher use. For the `EventProcessorClient`, calling the `StopProcessingAsync` method when your application is closing will ensure that network resources and other unmanaged objects are cleaned up. Calling either the `CloseAsync` or `DisposeAsync` method on the `EventHubProducerClient` will perform the equivalent clean-up. ## Publish events -To publish events, we will make use of the `EventHubsProducerClient`. Because this is the only area of our sample that will be publishing events, we will close the client once publishing has completed. In the majority of real-world scenarios, closing the producer when the application exits is the preferred pattern. +To publish events, we will make use of the `EventHubsProducerClient`. Because this is the only area of our sample that will be publishing events, we will close the client once publishing has completed. In the majority of real-world scenarios, closing the producer when the application exits is the preferred pattern. So that we have something to process, our example will publish a full batch of events. The `EventHubDataBatch` exists to ensure that a set of events can safely be published without exceeding the size allowed by the Event Hub. The `EventDataBatch` queries the service to understand the maximum size and is responsible for accurately measuring each event as it is added to the batch. When its `TryAdd` method returns `false`, the event is too large to fit into the batch. @@ -74,9 +74,9 @@ finally Now that the events have been published, we'll process them using the `EventProcessorClient`. It's important to note that because events are not removed when reading, you are likely to see events that had been previously published as well as those from the batch that we just sent, if you're using an existing Event Hub. -The `EventProcessorClient` is associated with a specific Event Hub and [consumer group](https://docs.microsoft.com/azure/event-hubs/event-hubs-features#consumer-groups). Conceptually, the consumer group is a label that identifies one or more event consumers as a set. Often, consumer groups are named after the responsibility of the consumer in an application, such as "Telemetry" or "OrderProcessing". When an Event Hub is created, a default consumer group is created for it. The default group, named "$Default", is what we'll be using for illustration. +The `EventProcessorClient` is associated with a specific Event Hub and [consumer group](https://learn.microsoft.com/azure/event-hubs/event-hubs-features#consumer-groups). Conceptually, the consumer group is a label that identifies one or more event consumers as a set. Often, consumer groups are named after the responsibility of the consumer in an application, such as "Telemetry" or "OrderProcessing". When an Event Hub is created, a default consumer group is created for it. The default group, named "$Default", is what we'll be using for illustration. -When events are published, they will continue to exist in the Event Hub and be available for consuming until they reach an age greater than the [retention period](https://docs.microsoft.com//azure/event-hubs/event-hubs-faq#what-is-the-maximum-retention-period-for-events). Once removed, the events are no longer available to be read and cannot be recovered. Though the Event Hubs service is free to remove events older than the retention period, it does not do so deterministically; there is no guarantee of when events will be removed. +When events are published, they will continue to exist in the Event Hub and be available for consuming until they reach an age greater than the [retention period](https://learn.microsoft.com//azure/event-hubs/event-hubs-faq#what-is-the-maximum-retention-period-for-events). Once removed, the events are no longer available to be read and cannot be recovered. Though the Event Hubs service is free to remove events older than the retention period, it does not do so deterministically; there is no guarantee of when events will be removed. Each `EventProcessorClient` has its own full view of the events each partition of an Event Hub, meaning that events are available to all processors and are not removed from the partition when a processor reads them. This allows for one or more of the different Event Hub clients to read and process events from the partition at different speeds and beginning with different events without interfering with one another. @@ -218,4 +218,4 @@ finally processor.ProcessEventAsync -= processEventHandler; processor.ProcessErrorAsync -= processErrorHandler; } -``` \ No newline at end of file +``` diff --git a/sdk/eventhub/Azure.Messaging.EventHubs.Processor/samples/Sample02_EventProcessorConfiguration.md b/sdk/eventhub/Azure.Messaging.EventHubs.Processor/samples/Sample02_EventProcessorConfiguration.md index fdb831d8d6d3..c4c30bb32749 100755 --- a/sdk/eventhub/Azure.Messaging.EventHubs.Processor/samples/Sample02_EventProcessorConfiguration.md +++ b/sdk/eventhub/Azure.Messaging.EventHubs.Processor/samples/Sample02_EventProcessorConfiguration.md @@ -34,13 +34,13 @@ As part of its normal operation, an `EventProcessorClient` needs to enumerate th ## Controlling processor identity -When constructing an `EventProcessorClient`, it is recommended that you set a stable unique identifier for the instance. This can be done by setting the [Identifier](https://learn.microsoft.com/dotnet/api/azure.messaging.eventhubs.eventprocessorclientoptions.identifier?view=azure-dotnet#azure-messaging-eventhubs-eventprocessorclientoptions-identifier) property of [EventProcessorClientOptions](https://learn.microsoft.com/dotnet/api/azure.messaging.eventhubs.eventprocessorclientoptions) and passing the options to the constructor. +When constructing an `EventProcessorClient`, it is recommended that you set a stable unique identifier for the instance. This can be done by setting the [Identifier](https://learn.microsoft.com/dotnet/api/azure.messaging.eventhubs.eventprocessorclientoptions.identifier?view=azure-dotnet#azure-messaging-eventhubs-eventprocessorclientoptions-identifier) property of [EventProcessorClientOptions](https://learn.microsoft.com/dotnet/api/azure.messaging.eventhubs.eventprocessorclientoptions) and passing the options to the constructor. A stable identifier allows the processor to recover partition ownership when an application or host instance is restarted. It also aids readability in Azure SDK logs and allows for more easily correlating logs to a specific processor instance. ## Influencing load balancing behavior -To scale event processing, you can run multiple instances of the `EventProcessorClient` and they will coordinate to balance work between them. The responsibility for processing is distributed among each of the active processors configured to read from the same Event Hub and using the same consumer group. To balance work, each active `EventProcessorClient` instance will assume responsibility for processing a set of Event Hub partitions, referred to as "owning" the partitions. The processors collaborate on ownership using storage as a central point of coordination. +To scale event processing, you can run multiple instances of the `EventProcessorClient` and they will coordinate to balance work between them. The responsibility for processing is distributed among each of the active processors configured to read from the same Event Hub and using the same consumer group. To balance work, each active `EventProcessorClient` instance will assume responsibility for processing a set of Event Hub partitions, referred to as "owning" the partitions. The processors collaborate on ownership using storage as a central point of coordination. While an `EventProcessorClient` is running, it will periodically perform a load balancing cycle in which it audits its own health and inspects the current state of collaboration with other processors. As part of that cycle, it will refresh the timestamp on an ownership record for each partition that it owns. These ownership records help to ensure that each `EventProcessorClient` understands how to maintain its fair share of partitions. @@ -48,13 +48,15 @@ There are several configuration options that can be used together to influence t ### Load balancing strategy -This controls the approach that the `EventProcessorClient` will use to make decisions about how aggressively to request partition ownership; this is most impactful during the initial startup or when recovering from a crash. More information on the strategies available can be found in the [documentation](https://docs.microsoft.com/dotnet/api/azure.messaging.eventhubs.processor.loadbalancingstrategy). +This controls the approach that the `EventProcessorClient` will use to make decisions about how aggressively to request partition ownership; this is most impactful during the initial startup or when recovering from a crash. More information on the strategies available can be found in the [documentation](https://learn.microsoft.com/dotnet/api/azure.messaging.eventhubs.processor.loadbalancingstrategy). ```C# Snippet:EventHubs_Processor_Sample02_LoadBalancingStrategy -var storageConnectionString = "<< CONNECTION STRING FOR THE STORAGE ACCOUNT >>"; +var credential = new DefaultAzureCredential(); + +var storageAccountEndpoint = "<< Account Uri (likely similar to https://{your-account}.blob.core.windows.net) >>"; var blobContainerName = "<< NAME OF THE BLOB CONTAINER >>"; -var eventHubsConnectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; +var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; var consumerGroup = "<< NAME OF THE EVENT HUB CONSUMER GROUP >>"; @@ -63,29 +65,37 @@ var processorOptions = new EventProcessorClientOptions LoadBalancingStrategy = LoadBalancingStrategy.Greedy }; +var blobUriBuilder = new BlobUriBuilder(new Uri(storageAccountEndpoint)) +{ + BlobContainerName = blobContainerName +}; + var storageClient = new BlobContainerClient( - storageConnectionString, - blobContainerName); + blobUriBuilder.ToUri(), + credential); var processor = new EventProcessorClient( storageClient, consumerGroup, - eventHubsConnectionString, + fullyQualifiedNamespace, eventHubName, + credential, processorOptions); ``` ### Load balancing intervals -There are two intervals considered during load balancing which can influence its behavior. The `LoadBalancingUpdateInterval` controls how frequently a load balancing cycle is run. During the load balancing cycle, the `EventProcessorClient` will attempt to refresh its ownership record for each partition that it owns. The `PartitionOwnershipExpirationInterval` controls how long an ownership record is considered valid. If the processor does not update an ownership record before this interval elapses, the partition represented by this record is considered unowned and is eligible to be claimed by another processor. +There are two intervals considered during load balancing which can influence its behavior. The `LoadBalancingUpdateInterval` controls how frequently a load balancing cycle is run. During the load balancing cycle, the `EventProcessorClient` will attempt to refresh its ownership record for each partition that it owns. The `PartitionOwnershipExpirationInterval` controls how long an ownership record is considered valid. If the processor does not update an ownership record before this interval elapses, the partition represented by this record is considered unowned and is eligible to be claimed by another processor. It is recommended that the `PartitionOwnershipExpirationInterval` be at least 3 times greater than the `LoadBalancingUpdateInterval` and very strongly advised that it should be no less than twice as long. When these intervals are too close together, ownership may expire before it is renewed during load balancing which will cause partitions to migrate. ```C# Snippet:EventHubs_Processor_Sample02_LoadBalancingIntervals -var storageConnectionString = "<< CONNECTION STRING FOR THE STORAGE ACCOUNT >>"; +var credential = new DefaultAzureCredential(); + +var storageAccountEndpoint = "<< Account Uri (likely similar to https://{your-account}.blob.core.windows.net) >>"; var blobContainerName = "<< NAME OF THE BLOB CONTAINER >>"; -var eventHubsConnectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; +var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; var consumerGroup = "<< NAME OF THE EVENT HUB CONSUMER GROUP >>"; @@ -95,27 +105,35 @@ var processorOptions = new EventProcessorClientOptions PartitionOwnershipExpirationInterval = TimeSpan.FromSeconds(30) }; +var blobUriBuilder = new BlobUriBuilder(new Uri(storageAccountEndpoint)) +{ + BlobContainerName = blobContainerName +}; + var storageClient = new BlobContainerClient( - storageConnectionString, - blobContainerName); + blobUriBuilder.ToUri(), + credential); var processor = new EventProcessorClient( storageClient, consumerGroup, - eventHubsConnectionString, + fullyQualifiedNamespace, eventHubName, + credential, processorOptions); ``` -## Using web sockets +## Using web sockets Communication with the Event Hubs service can be configured by adjusting the `EventHubConfigurationOptions` that are exposed by the `ConnectionOptions` member of a client options type. By default, the `EventProcessorClient` communicates using the AMQP protocol over TCP. Some application host environments prefer to restrict raw TCP socket use, especially in many enterprise or VPN scenarios. In these environments, or when a proxy is in use, communication with the Event Hubs service can make use of web sockets by configuring the client's connection settings. ```C# Snippet:EventHubs_Processor_Sample02_TransportFullConnectionOptions -var storageConnectionString = "<< CONNECTION STRING FOR THE STORAGE ACCOUNT >>"; +var credential = new DefaultAzureCredential(); + +var storageAccountEndpoint = "<< Account Uri (likely similar to https://{your-account}.blob.core.windows.net) >>"; var blobContainerName = "<< NAME OF THE BLOB CONTAINER >>"; -var eventHubsConnectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; +var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; var consumerGroup = "<< NAME OF THE EVENT HUB CONSUMER GROUP >>"; @@ -127,51 +145,67 @@ var processorOptions = new EventProcessorClientOptions } }; +var blobUriBuilder = new BlobUriBuilder(new Uri(storageAccountEndpoint)) +{ + BlobContainerName = blobContainerName +}; + var storageClient = new BlobContainerClient( - storageConnectionString, - blobContainerName); + blobUriBuilder.ToUri(), + credential); var processor = new EventProcessorClient( storageClient, consumerGroup, - eventHubsConnectionString, + fullyQualifiedNamespace, eventHubName, + credential, processorOptions); ``` The connection options are populated by default; you may set just the desired properties rather than creating a new instance, if you prefer. ```C# Snippet:EventHubs_Processor_Sample02_TransportProperty -var storageConnectionString = "<< CONNECTION STRING FOR THE STORAGE ACCOUNT >>"; +var credential = new DefaultAzureCredential(); + +var storageAccountEndpoint = "<< Account Uri (likely similar to https://{your-account}.blob.core.windows.net) >>"; var blobContainerName = "<< NAME OF THE BLOB CONTAINER >>"; -var eventHubsConnectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; +var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; var consumerGroup = "<< NAME OF THE EVENT HUB CONSUMER GROUP >>"; var processorOptions = new EventProcessorClientOptions(); processorOptions.ConnectionOptions.TransportType = EventHubsTransportType.AmqpWebSockets; +var blobUriBuilder = new BlobUriBuilder(new Uri(storageAccountEndpoint)) +{ + BlobContainerName = blobContainerName +}; + var storageClient = new BlobContainerClient( - storageConnectionString, - blobContainerName); + blobUriBuilder.ToUri(), + credential); var processor = new EventProcessorClient( storageClient, consumerGroup, - eventHubsConnectionString, + fullyQualifiedNamespace, eventHubName, + credential, processorOptions); ``` ## Setting a custom proxy -A common scenario for adjusting the connection options is configuring a proxy. Proxy support takes the form of the [IWebProxy](https://docs.microsoft.com/dotnet/api/system.net.iwebproxy?view=netcore-3.1) interface, of which [WebProxy](https://docs.microsoft.com/dotnet/api/system.net.webproxy?view=netcore-3.1) is the most common default implementation. Event Hubs supports a proxy only when using `AmqpWebSockets` as the transport type. +A common scenario for adjusting the connection options is configuring a proxy. Proxy support takes the form of the [IWebProxy](https://learn.microsoft.com/dotnet/api/system.net.iwebproxy?view=netcore-3.1) interface, of which [WebProxy](https://learn.microsoft.com/dotnet/api/system.net.webproxy?view=netcore-3.1) is the most common default implementation. Event Hubs supports a proxy only when using `AmqpWebSockets` as the transport type. ```C# Snippet:EventHubs_Processor_Sample02_ProxyFullConnectionOptions -var storageConnectionString = "<< CONNECTION STRING FOR THE STORAGE ACCOUNT >>"; +var credential = new DefaultAzureCredential(); + +var storageAccountEndpoint = "<< Account Uri (likely similar to https://{your-account}.blob.core.windows.net) >>"; var blobContainerName = "<< NAME OF THE BLOB CONTAINER >>"; -var eventHubsConnectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; +var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; var consumerGroup = "<< NAME OF THE EVENT HUB CONSUMER GROUP >>"; @@ -184,25 +218,33 @@ var processorOptions = new EventProcessorClientOptions } }; +var blobUriBuilder = new BlobUriBuilder(new Uri(storageAccountEndpoint)) +{ + BlobContainerName = blobContainerName +}; + var storageClient = new BlobContainerClient( - storageConnectionString, - blobContainerName); + blobUriBuilder.ToUri(), + credential); var processor = new EventProcessorClient( storageClient, consumerGroup, - eventHubsConnectionString, + fullyQualifiedNamespace, eventHubName, + credential, processorOptions); ``` The connection options are populated by default; you may set just the desired properties rather than creating a new instance, if you prefer. ```C# Snippet:EventHubs_Processor_Sample02_ProxyProperty -var storageConnectionString = "<< CONNECTION STRING FOR THE STORAGE ACCOUNT >>"; +var credential = new DefaultAzureCredential(); + +var storageAccountEndpoint = "<< Account Uri (likely similar to https://{your-account}.blob.core.windows.net) >>"; var blobContainerName = "<< NAME OF THE BLOB CONTAINER >>"; -var eventHubsConnectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; +var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; var consumerGroup = "<< NAME OF THE EVENT HUB CONSUMER GROUP >>"; @@ -210,21 +252,27 @@ var processorOptions = new EventProcessorClientOptions(); processorOptions.ConnectionOptions.TransportType = EventHubsTransportType.AmqpWebSockets; processorOptions.ConnectionOptions.Proxy = new WebProxy("https://proxyserver:80", true); +var blobUriBuilder = new BlobUriBuilder(new Uri(storageAccountEndpoint)) +{ + BlobContainerName = blobContainerName +}; + var storageClient = new BlobContainerClient( - storageConnectionString, - blobContainerName); + blobUriBuilder.ToUri(), + credential); var processor = new EventProcessorClient( storageClient, consumerGroup, - eventHubsConnectionString, + fullyQualifiedNamespace, eventHubName, + credential, processorOptions); ``` ## Using the default system proxy -To use the default proxy for your environment, the recommended approach is to make use of [HttpClient.DefaultProxy](https://docs.microsoft.com/dotnet/api/system.net.http.httpclient.defaultproxy?view=netcore-3.1), which will attempt to detect proxy settings from the ambient environment in a manner consistent with expectations for the target platform. +To use the default proxy for your environment, the recommended approach is to make use of [HttpClient.DefaultProxy](https://learn.microsoft.com/dotnet/api/system.net.http.httpclient.defaultproxy?view=netcore-3.1), which will attempt to detect proxy settings from the ambient environment in a manner consistent with expectations for the target platform. **Note:** This member was first introduced in .NET Core 3.1 and is not supported for earlier target frameworks. @@ -243,39 +291,49 @@ Connections to the Azure Event Hubs service are made using the fully qualified n However, a custom address is required for proper routing by some environments, such as those using unconventional proxy configurations or certain configurations of an Express Route circuit. To support these scenarios, a custom endpoint address may be specified as part of the connection options. This custom address will take precedence for establishing the connection to the Event Hubs service. ```C# Snippet:EventHubs_Processor_Sample02_ConnectionOptionsCustomEndpoint -var storageConnectionString = "<< CONNECTION STRING FOR THE STORAGE ACCOUNT >>"; +var credential = new DefaultAzureCredential(); + +var storageAccountEndpoint = "<< Account Uri (likely similar to https://{your-account}.blob.core.windows.net) >>"; var blobContainerName = "<< NAME OF THE BLOB CONTAINER >>"; -var eventHubsConnectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; +var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; var consumerGroup = "<< NAME OF THE EVENT HUB CONSUMER GROUP >>"; var processorOptions = new EventProcessorClientOptions(); processorOptions.ConnectionOptions.CustomEndpointAddress = new Uri("amqps://app-gateway.mycompany.com"); +var blobUriBuilder = new BlobUriBuilder(new Uri(storageAccountEndpoint)) +{ + BlobContainerName = blobContainerName +}; + var storageClient = new BlobContainerClient( - storageConnectionString, - blobContainerName); + blobUriBuilder.ToUri(), + credential); var processor = new EventProcessorClient( storageClient, consumerGroup, - eventHubsConnectionString, + fullyQualifiedNamespace, eventHubName, + credential, processorOptions); ``` ## Influencing SSL certificate validation -For some environments using a proxy or custom gateway for routing traffic to Event Hubs, a certificate not trusted by the root certificate authorities may be issued. This can often be a self-signed certificate from the gateway or one issued by a company's internal certificate authority. +For some environments using a proxy or custom gateway for routing traffic to Event Hubs, a certificate not trusted by the root certificate authorities may be issued. This can often be a self-signed certificate from the gateway or one issued by a company's internal certificate authority. -By default, these certificates are not trusted by the Event Hubs client library and the connection will be refused. To enable these scenarios, a [RemoteCertificateValidationCallback](https://docs.microsoft.com/dotnet/api/system.net.security.remotecertificatevalidationcallback) can be registered to provide custom validation logic for remote certificates. This allows an application to override the default trust decision and assert responsibility for accepting or rejecting the certificate. +By default, these certificates are not trusted by the Event Hubs client library and the connection will be refused. To enable these scenarios, a [RemoteCertificateValidationCallback](https://learn.microsoft.com/dotnet/api/system.net.security.remotecertificatevalidationcallback) can be registered to provide custom validation logic for remote certificates. This allows an application to override the default trust decision and assert responsibility for accepting or rejecting the certificate. ```C# Snippet:EventHubs_Processor_Sample02_RemoteCertificateValidationCallback -var storageConnectionString = "<< CONNECTION STRING FOR THE STORAGE ACCOUNT >>"; +var credential = new DefaultAzureCredential(); + +var storageAccountEndpoint = "<< Account Uri (likely similar to https://{your-account}.blob.core.windows.net) >>"; var blobContainerName = "<< NAME OF THE BLOB CONTAINER >>"; -var eventHubsConnectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; +var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; var consumerGroup = "<< NAME OF THE EVENT HUB CONSUMER GROUP >>"; @@ -299,15 +357,21 @@ static bool ValidateServerCertificate( var processorOptions = new EventProcessorClientOptions(); processorOptions.ConnectionOptions.CertificateValidationCallback = ValidateServerCertificate; +var blobUriBuilder = new BlobUriBuilder(new Uri(storageAccountEndpoint)) +{ + BlobContainerName = blobContainerName +}; + var storageClient = new BlobContainerClient( - storageConnectionString, - blobContainerName); + blobUriBuilder.ToUri(), + credential); var processor = new EventProcessorClient( storageClient, consumerGroup, - eventHubsConnectionString, + fullyQualifiedNamespace, eventHubName, + credential, processorOptions); ``` @@ -315,13 +379,15 @@ var processor = new EventProcessorClient( The built-in retry policy offers an implementation for an exponential back-off strategy by default, as this provides a good balance between making forward progress and allowing for transient issues that may take some time to resolve. The built-in policy also offers a fixed strategy for those cases where your application requires that you have a deterministic understanding of how long an operation may take. -The values used as thresholds for the different aspects of these strategies can be configured by adjusting the `EventHubsRetryOptions` that are exposed by the `RetryOptions` member of a client options type. +The values used as thresholds for the different aspects of these strategies can be configured by adjusting the `EventHubsRetryOptions` that are exposed by the `RetryOptions` member of a client options type. ```C# Snippet:EventHubs_Processor_Sample02_RetryWithFullOptions -var storageConnectionString = "<< CONNECTION STRING FOR THE STORAGE ACCOUNT >>"; +var credential = new DefaultAzureCredential(); + +var storageAccountEndpoint = "<< Account Uri (likely similar to https://{your-account}.blob.core.windows.net) >>"; var blobContainerName = "<< NAME OF THE BLOB CONTAINER >>"; -var eventHubsConnectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; +var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; var consumerGroup = "<< NAME OF THE EVENT HUB CONSUMER GROUP >>"; @@ -336,25 +402,33 @@ var processorOptions = new EventProcessorClientOptions } }; +var blobUriBuilder = new BlobUriBuilder(new Uri(storageAccountEndpoint)) +{ + BlobContainerName = blobContainerName +}; + var storageClient = new BlobContainerClient( - storageConnectionString, - blobContainerName); + blobUriBuilder.ToUri(), + credential); var processor = new EventProcessorClient( storageClient, consumerGroup, - eventHubsConnectionString, + fullyQualifiedNamespace, eventHubName, + credential, processorOptions); ``` The retry options are populated by default; you may set just the desired properties rather than creating a new instance, if you prefer. ```C# Snippet:EventHubs_Processor_Sample02_RetryByProperty -var storageConnectionString = "<< CONNECTION STRING FOR THE STORAGE ACCOUNT >>"; +var credential = new DefaultAzureCredential(); + +var storageAccountEndpoint = "<< Account Uri (likely similar to https://{your-account}.blob.core.windows.net) >>"; var blobContainerName = "<< NAME OF THE BLOB CONTAINER >>"; -var eventHubsConnectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; +var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; var consumerGroup = "<< NAME OF THE EVENT HUB CONSUMER GROUP >>"; @@ -362,15 +436,21 @@ var processorOptions = new EventProcessorClientOptions(); processorOptions.RetryOptions.Mode = EventHubsRetryMode.Fixed; processorOptions.RetryOptions.MaximumRetries = 5; +var blobUriBuilder = new BlobUriBuilder(new Uri(storageAccountEndpoint)) +{ + BlobContainerName = blobContainerName +}; + var storageClient = new BlobContainerClient( - storageConnectionString, - blobContainerName); + blobUriBuilder.ToUri(), + credential); var processor = new EventProcessorClient( storageClient, consumerGroup, - eventHubsConnectionString, + fullyQualifiedNamespace, eventHubName, + credential, processorOptions); ``` @@ -423,4 +503,4 @@ var options = new EventHubsRetryOptions { CustomRetryPolicy = new ExampleRetryPolicy() }; -``` \ No newline at end of file +``` diff --git a/sdk/eventhub/Azure.Messaging.EventHubs.Processor/samples/Sample03_EventProcessorHandlers.md b/sdk/eventhub/Azure.Messaging.EventHubs.Processor/samples/Sample03_EventProcessorHandlers.md index df93787629a5..9e23058e482a 100644 --- a/sdk/eventhub/Azure.Messaging.EventHubs.Processor/samples/Sample03_EventProcessorHandlers.md +++ b/sdk/eventhub/Azure.Messaging.EventHubs.Processor/samples/Sample03_EventProcessorHandlers.md @@ -1,6 +1,6 @@ # Event Processor Handlers -Once started, the majority of work performed by the `EventProcessorClient` takes place in the background. Interaction with the host application takes place using .NET [events](https://docs.microsoft.com/dotnet/standard/events/), allowing the processor to surface information and the application to influence processor behavior. Unlike most .NET events, those used by the processor are asynchronous and allow only a single handler to be subscribed. +Once started, the majority of work performed by the `EventProcessorClient` takes place in the background. Interaction with the host application takes place using .NET [events](https://learn.microsoft.com/dotnet/standard/events/), allowing the processor to surface information and the application to influence processor behavior. Unlike most .NET events, those used by the processor are asynchronous and allow only a single handler to be subscribed. This sample details the means to receive information and interact with the `EventProcessorClient` as it is running and demonstrates how to configure the event handlers for some common scenarios. To begin, please ensure that you're familiar with the items discussed in the [Getting started](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/eventhub/Azure.Messaging.EventHubs.Processor/samples#getting-started) section of the README, and have the prerequisites and connection string information available. @@ -21,31 +21,39 @@ This sample details the means to receive information and interact with the `Even ## Process Event -The processor will invoke the `ProcessEventAsync` handler when an event read from the Event Hubs service is available for processing or, if the [MaximumWaitTime](https://docs.microsoft.com/dotnet/api/azure.messaging.eventhubs.eventprocessorclientoptions.maximumwaittime?view=azure-dotnet#Azure_Messaging_EventHubs_EventProcessorClientOptions_MaximumWaitTime) was specified, when that duration has elapsed without an event being available. This handler will be invoked concurrently, limited to one call per partition. The processor will await each invocation to ensure that the events from the same partition are processed one-at-a-time in the order that they were read from the partition. +The processor will invoke the `ProcessEventAsync` handler when an event read from the Event Hubs service is available for processing or, if the [MaximumWaitTime](https://learn.microsoft.com/dotnet/api/azure.messaging.eventhubs.eventprocessorclientoptions.maximumwaittime?view=azure-dotnet#Azure_Messaging_EventHubs_EventProcessorClientOptions_MaximumWaitTime) was specified, when that duration has elapsed without an event being available. This handler will be invoked concurrently, limited to one call per partition. The processor will await each invocation to ensure that the events from the same partition are processed one-at-a-time in the order that they were read from the partition. Processing events are covered in more depth for different scenarios in [Sample04_ProcessingEvents](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/eventhub/Azure.Messaging.EventHubs.Processor/samples/Sample04_ProcessingEvents.md). ### Respecting cancellation -The [event arguments](https://docs.microsoft.com/dotnet/api/azure.messaging.eventhubs.processor.processeventargs?view=azure-dotnet) contain a cancellation token that the `EventProcessorClient` uses to signal the handler that processing should cease as soon as possible. This is most commonly seen when the `EventProcessorClient` is stopping or has encountered an unrecoverable problem. It is up to the handler to decide whether to take action to process the event and, perhaps, record a checkpoint or to cancel immediately. If the handler chooses not to process the event, the data will not be lost and the event will be replayed when the partition processed in the future, so long as the event is not used to create a checkpoint. +The [event arguments](https://learn.microsoft.com/dotnet/api/azure.messaging.eventhubs.processor.processeventargs?view=azure-dotnet) contain a cancellation token that the `EventProcessorClient` uses to signal the handler that processing should cease as soon as possible. This is most commonly seen when the `EventProcessorClient` is stopping or has encountered an unrecoverable problem. It is up to the handler to decide whether to take action to process the event and, perhaps, record a checkpoint or to cancel immediately. If the handler chooses not to process the event, the data will not be lost and the event will be replayed when the partition processed in the future, so long as the event is not used to create a checkpoint. ```C# Snippet:EventHubs_Processor_Sample03_EventHandlerCancellation -var storageConnectionString = "<< CONNECTION STRING FOR THE STORAGE ACCOUNT >>"; +var credential = new DefaultAzureCredential(); + +var storageAccountEndpoint = "<< Account Uri (likely similar to https://{your-account}.blob.core.windows.net) >>"; var blobContainerName = "<< NAME OF THE BLOB CONTAINER >>"; -var eventHubsConnectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; +var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; var consumerGroup = "<< NAME OF THE EVENT HUB CONSUMER GROUP >>"; +var blobUriBuilder = new BlobUriBuilder(new Uri(storageAccountEndpoint)) +{ + BlobContainerName = blobContainerName +}; + var storageClient = new BlobContainerClient( - storageConnectionString, - blobContainerName); + blobUriBuilder.ToUri(), + credential); var processor = new EventProcessorClient( storageClient, consumerGroup, - eventHubsConnectionString, - eventHubName); + fullyQualifiedNamespace, + eventHubName, + credential); Task processEventHandler(ProcessEventArgs args) { @@ -92,25 +100,33 @@ It is important to note that the error handler is **_NOT_** invoked for failures ### Inspecting error details -The [event arguments](https://docs.microsoft.com/dotnet/api/azure.messaging.eventhubs.processor.processerroreventargs?view=azure-dotnet) contain a cancellation token that the `EventProcessorClient` uses to signal the handler that processing should cease as soon as possible. This is most commonly seen when the `EventProcessorClient` is stopping or has encountered an unrecoverable problem. It is up to the handler to decide whether to take action for the error or cancel immediately. The arguments also contain information about the exception that was observed, the operation that the processor was performing at the time, and the partition that the operation was associated with, if any. +The [event arguments](https://learn.microsoft.com/dotnet/api/azure.messaging.eventhubs.processor.processerroreventargs?view=azure-dotnet) contain a cancellation token that the `EventProcessorClient` uses to signal the handler that processing should cease as soon as possible. This is most commonly seen when the `EventProcessorClient` is stopping or has encountered an unrecoverable problem. It is up to the handler to decide whether to take action for the error or cancel immediately. The arguments also contain information about the exception that was observed, the operation that the processor was performing at the time, and the partition that the operation was associated with, if any. ```C# Snippet:EventHubs_Processor_Sample03_ErrorHandlerArgs -var storageConnectionString = "<< CONNECTION STRING FOR THE STORAGE ACCOUNT >>"; +var credential = new DefaultAzureCredential(); + +var storageAccountEndpoint = "<< Account Uri (likely similar to https://{your-account}.blob.core.windows.net) >>"; var blobContainerName = "<< NAME OF THE BLOB CONTAINER >>"; -var eventHubsConnectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; +var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; var consumerGroup = "<< NAME OF THE EVENT HUB CONSUMER GROUP >>"; +var blobUriBuilder = new BlobUriBuilder(new Uri(storageAccountEndpoint)) +{ + BlobContainerName = blobContainerName +}; + var storageClient = new BlobContainerClient( - storageConnectionString, - blobContainerName); + blobUriBuilder.ToUri(), + credential); var processor = new EventProcessorClient( storageClient, consumerGroup, - eventHubsConnectionString, - eventHubName); + fullyQualifiedNamespace, + eventHubName, + credential); Task processErrorHandler(ProcessErrorEventArgs args) { @@ -154,7 +170,7 @@ finally ### Reacting to processor errors -The exceptions surfaced to your error handler represent a failure within the infrastructure of the processor. The processor is highly resilient; there is generally no action needed by your application to react to occasional errors. +The exceptions surfaced to your error handler represent a failure within the infrastructure of the processor. The processor is highly resilient; there is generally no action needed by your application to react to occasional errors. The processor lacks insight into your application, host environment, and error patterns observed over time. If you're seeing frequent exceptions in your handler or consistent patterns - those often indicate a problem that needs to be addressed. While the processor is likely to recover from that specific instance of the error but, in aggregate, there may need to consider a wider problem. @@ -165,22 +181,30 @@ The error handler (but no other event handler) may safely call `StopProcessingAs This example demonstrates signaling the application to stop processing if the application is out of memory and restarting the processor if it indicates that it has stopped running. ```C# Snippet:EventHubs_Processor_Sample03_ErrorHandlerCancellationRecovery -var storageConnectionString = "<< CONNECTION STRING FOR THE STORAGE ACCOUNT >>"; +var credential = new DefaultAzureCredential(); + +var storageAccountEndpoint = "<< Account Uri (likely similar to https://{your-account}.blob.core.windows.net) >>"; var blobContainerName = "<< NAME OF THE BLOB CONTAINER >>"; -var eventHubsConnectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; +var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; var consumerGroup = "<< NAME OF THE EVENT HUB CONSUMER GROUP >>"; +var blobUriBuilder = new BlobUriBuilder(new Uri(storageAccountEndpoint)) +{ + BlobContainerName = blobContainerName +}; + var storageClient = new BlobContainerClient( - storageConnectionString, - blobContainerName); + blobUriBuilder.ToUri(), + credential); var processor = new EventProcessorClient( storageClient, consumerGroup, - eventHubsConnectionString, - eventHubName); + fullyQualifiedNamespace, + eventHubName, + credential); // This token is used to control processing, // if signaled, then processing will be stopped. @@ -281,26 +305,34 @@ When the `EventProcessorClient` begins processing, it will take ownership over a ### Requesting a default starting point for the partition When a partition is initialized, one of the decisions made is where in the partition's event stream to begin processing. If a checkpoint exists for a partition, processing will begin at the next available event after the checkpoint. When no checkpoint is found for a partition, a default location is used. One of the common reasons that you may choose to participate in initialization is to influence where to begin processing when a checkpoint is not found, overriding the default. - -The [event arguments](https://docs.microsoft.com/dotnet/api/azure.messaging.eventhubs.processor.partitioninitializingeventargs?view=azure-dotnet) contain a `DefaultStartingPosition` which can be used to influence where processing begins when a checkpoint is unavailable. The arguments also contain a cancellation token that the `EventProcessorClient` uses to signal the handler that initialization should cease as soon as possible. This is most commonly seen when the `EventProcessorClient` is stopping or has encountered an unrecoverable problem. It is up to the handler to decide whether to take action or to cancel immediately, but there typically is no benefit to continuing initialization when the token has been signaled. + +The [event arguments](https://learn.microsoft.com/dotnet/api/azure.messaging.eventhubs.processor.partitioninitializingeventargs?view=azure-dotnet) contain a `DefaultStartingPosition` which can be used to influence where processing begins when a checkpoint is unavailable. The arguments also contain a cancellation token that the `EventProcessorClient` uses to signal the handler that initialization should cease as soon as possible. This is most commonly seen when the `EventProcessorClient` is stopping or has encountered an unrecoverable problem. It is up to the handler to decide whether to take action or to cancel immediately, but there typically is no benefit to continuing initialization when the token has been signaled. ```C# Snippet:EventHubs_Processor_Sample03_InitializeHandlerArgs -var storageConnectionString = "<< CONNECTION STRING FOR THE STORAGE ACCOUNT >>"; +var credential = new DefaultAzureCredential(); + +var storageAccountEndpoint = "<< Account Uri (likely similar to https://{your-account}.blob.core.windows.net) >>"; var blobContainerName = "<< NAME OF THE BLOB CONTAINER >>"; -var eventHubsConnectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; +var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; var consumerGroup = "<< NAME OF THE EVENT HUB CONSUMER GROUP >>"; +var blobUriBuilder = new BlobUriBuilder(new Uri(storageAccountEndpoint)) +{ + BlobContainerName = blobContainerName +}; + var storageClient = new BlobContainerClient( - storageConnectionString, - blobContainerName); + blobUriBuilder.ToUri(), + credential); var processor = new EventProcessorClient( storageClient, consumerGroup, - eventHubsConnectionString, - eventHubName); + fullyQualifiedNamespace, + eventHubName, + credential); Task initializeEventHandler(PartitionInitializingEventArgs args) { @@ -350,25 +382,33 @@ The processor will invoke the `PartitionClosingAsync` handler when processing fo ### Inspecting closing details -The [event arguments](https://docs.microsoft.com/dotnet/api/azure.messaging.eventhubs.processor.partitionclosingeventargs?view=azure-dotnet) contain a cancellation token that the `EventProcessorClient` uses to signal the handler that processing should cease as soon as possible. This is most commonly seen when the `EventProcessorClient` is stopping or has encountered an unrecoverable problem. It is up to the handler to decide whether to take action for the error to cancel immediately. The arguments also contain information about the reason for closing the partition and the partition being closed. +The [event arguments](https://learn.microsoft.com/dotnet/api/azure.messaging.eventhubs.processor.partitionclosingeventargs?view=azure-dotnet) contain a cancellation token that the `EventProcessorClient` uses to signal the handler that processing should cease as soon as possible. This is most commonly seen when the `EventProcessorClient` is stopping or has encountered an unrecoverable problem. It is up to the handler to decide whether to take action for the error to cancel immediately. The arguments also contain information about the reason for closing the partition and the partition being closed. ```C# Snippet:EventHubs_Processor_Sample03_CloseHandlerArgs -var storageConnectionString = "<< CONNECTION STRING FOR THE STORAGE ACCOUNT >>"; +var credential = new DefaultAzureCredential(); + +var storageAccountEndpoint = "<< Account Uri (likely similar to https://{your-account}.blob.core.windows.net) >>"; var blobContainerName = "<< NAME OF THE BLOB CONTAINER >>"; -var eventHubsConnectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; +var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; var consumerGroup = "<< NAME OF THE EVENT HUB CONSUMER GROUP >>"; +var blobUriBuilder = new BlobUriBuilder(new Uri(storageAccountEndpoint)) +{ + BlobContainerName = blobContainerName +}; + var storageClient = new BlobContainerClient( - storageConnectionString, - blobContainerName); + blobUriBuilder.ToUri(), + credential); var processor = new EventProcessorClient( storageClient, consumerGroup, - eventHubsConnectionString, - eventHubName); + fullyQualifiedNamespace, + eventHubName, + credential); Task closeEventHandler(PartitionClosingEventArgs args) { @@ -425,22 +465,30 @@ The following examples discuss common guidance for handlers used with the `Event It is extremely important that you always guard against exceptions in your handler code; it is strongly recommended to wrap your entire handler in a `try/catch` block and ensure that you do not re-throw exceptions. The processor does not have enough understanding of your handler code to determine the correct action to take in the face of an exception nor to understand whether it is safe to assume that processing has not been corrupted. Any exceptions thrown from your handler will not be caught by the processor and will NOT be redirected to the error handler. This will typically cause processing for the partition to abort, and be restarted, but may also crash your application process. ```C# Snippet:EventHubs_Processor_Sample03_EventHandlerExceptionHandling -var storageConnectionString = "<< CONNECTION STRING FOR THE STORAGE ACCOUNT >>"; +var credential = new DefaultAzureCredential(); + +var storageAccountEndpoint = "<< Account Uri (likely similar to https://{your-account}.blob.core.windows.net) >>"; var blobContainerName = "<< NAME OF THE BLOB CONTAINER >>"; -var eventHubsConnectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; +var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; var consumerGroup = "<< NAME OF THE EVENT HUB CONSUMER GROUP >>"; +var blobUriBuilder = new BlobUriBuilder(new Uri(storageAccountEndpoint)) +{ + BlobContainerName = blobContainerName +}; + var storageClient = new BlobContainerClient( - storageConnectionString, - blobContainerName); + blobUriBuilder.ToUri(), + credential); var processor = new EventProcessorClient( storageClient, consumerGroup, - eventHubsConnectionString, - eventHubName); + fullyQualifiedNamespace, + eventHubName, + credential); Task processEventHandler(ProcessEventArgs args) { @@ -479,22 +527,30 @@ finally With the notable exception of the `ProcessErrorAsync` handler, the `EventProcessorClient` will await a handler when it is invoked. Because of this, you are unable to safely perform operations on the client, such as calling `StopProcessingAsync` when an exception is observed. Doing so is likely to result in a deadlock. A common technique to work around this limitation for is to signal a cancellation token observed by the application. ```C# Snippet:EventHubs_Processor_Sample03_EventHandlerStopOnException -var storageConnectionString = "<< CONNECTION STRING FOR THE STORAGE ACCOUNT >>"; +var credential = new DefaultAzureCredential(); + +var storageAccountEndpoint = "<< Account Uri (likely similar to https://{your-account}.blob.core.windows.net) >>"; var blobContainerName = "<< NAME OF THE BLOB CONTAINER >>"; -var eventHubsConnectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; +var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; var consumerGroup = "<< NAME OF THE EVENT HUB CONSUMER GROUP >>"; +var blobUriBuilder = new BlobUriBuilder(new Uri(storageAccountEndpoint)) +{ + BlobContainerName = blobContainerName +}; + var storageClient = new BlobContainerClient( - storageConnectionString, - blobContainerName); + blobUriBuilder.ToUri(), + credential); var processor = new EventProcessorClient( storageClient, consumerGroup, - eventHubsConnectionString, - eventHubName); + fullyQualifiedNamespace, + eventHubName, + credential); // This token is used to control processing, // if signaled, then processing will be stopped. @@ -568,4 +624,4 @@ finally processor.ProcessEventAsync -= processEventHandler; processor.ProcessErrorAsync -= processErrorHandler; } -``` \ No newline at end of file +``` diff --git a/sdk/eventhub/Azure.Messaging.EventHubs.Processor/samples/Sample04_ProcessingEvents.md b/sdk/eventhub/Azure.Messaging.EventHubs.Processor/samples/Sample04_ProcessingEvents.md index 3e09dfd8e3fe..17864c4779d2 100644 --- a/sdk/eventhub/Azure.Messaging.EventHubs.Processor/samples/Sample04_ProcessingEvents.md +++ b/sdk/eventhub/Azure.Messaging.EventHubs.Processor/samples/Sample04_ProcessingEvents.md @@ -21,19 +21,19 @@ This sample demonstrates scenarios for processing events read from the Event Hub The `EventProcessorClient` is intended to provide a robust and resilient client for processing events from an Event Hub and is capable of automatically managing the recovery process for transient failures. It will also collaborate with other `EventProcessorClient` instances to dynamically distribute and share processing responsibility as processors are added and removed from the group. -The `EventProcessorClient` is safe to cache and use for the lifetime of the application, which is best practice when the application processes events regularly or semi-regularly. The processor is responsible for efficient resource management, working to keep resource usage low during periods of inactivity and manage health during periods of higher use. Calling the `StopProcessingAsync` method when your application is closing will ensure that network resources and other unmanaged objects are cleaned up. +The `EventProcessorClient` is safe to cache and use for the lifetime of the application, which is best practice when the application processes events regularly or semi-regularly. The processor is responsible for efficient resource management, working to keep resource usage low during periods of inactivity and manage health during periods of higher use. Calling the `StopProcessingAsync` method when your application is closing will ensure that network resources and other unmanaged objects are cleaned up. ## Event lifetime -When events are published, they will continue to exist in the Event Hub and be available for consuming until they reach an age greater than the [retention period](https://docs.microsoft.com//azure/event-hubs/event-hubs-faq#what-is-the-maximum-retention-period-for-events). Once removed, the events are no longer available to be read and cannot be recovered. Though the Event Hubs service is free to remove events older than the retention period, it does not do so deterministically; there is no guarantee of when events will be removed. +When events are published, they will continue to exist in the Event Hub and be available for consuming until they reach an age greater than the [retention period](https://learn.microsoft.com//azure/event-hubs/event-hubs-faq#what-is-the-maximum-retention-period-for-events). Once removed, the events are no longer available to be read and cannot be recovered. Though the Event Hubs service is free to remove events older than the retention period, it does not do so deterministically; there is no guarantee of when events will be removed. ## Processing and consumer groups -An `EventProcessorClient` is associated with a specific Event Hub and [consumer group](https://docs.microsoft.com/azure/event-hubs/event-hubs-features#consumer-groups). Conceptually, the consumer group is a label that identifies one or more event consumers as a set. Often, consumer groups are named after the responsibility of the consumer in an application, such as "Telemetry" or "OrderProcessing". When an Event Hub is created, a default consumer group is created for it, named "$Default." These examples will make use of the default consumer group for illustration. +An `EventProcessorClient` is associated with a specific Event Hub and [consumer group](https://learn.microsoft.com/azure/event-hubs/event-hubs-features#consumer-groups). Conceptually, the consumer group is a label that identifies one or more event consumers as a set. Often, consumer groups are named after the responsibility of the consumer in an application, such as "Telemetry" or "OrderProcessing". When an Event Hub is created, a default consumer group is created for it, named "$Default." These examples will make use of the default consumer group for illustration. ## Processing and partitions -Every event that is published is sent to one of the [partitions](https://docs.microsoft.com/azure/architecture/reference-architectures/event-hubs/partitioning-in-event-hubs-and-kafka) of the Event Hub. When processing events, the `EventProcessorClient` will take ownership over a set of partitions to process, treating each as an independent unit of work. This allows the processor to isolate partitions from one another, helping to ensure that a failure in one partition does not impact processing for another. +Every event that is published is sent to one of the [partitions](https://learn.microsoft.com/azure/architecture/reference-architectures/event-hubs/partitioning-in-event-hubs-and-kafka) of the Event Hub. When processing events, the `EventProcessorClient` will take ownership over a set of partitions to process, treating each as an independent unit of work. This allows the processor to isolate partitions from one another, helping to ensure that a failure in one partition does not impact processing for another. ## Checkpointing @@ -43,25 +43,25 @@ When an event processor connects, it will begin reading events at the checkpoint ## Load balancing -If more than one `EventProcessorClient` is configured to process an Event Hub, belongs to the same consumer group, and make use of the same Blob Storage container, those processors will collaborate using Blob storage to share responsibility for processing the partitions of the Event Hub. Each `EventProcessorClient` will claim ownership of partitions until each had an equal share; the processors will ensure that each partition belongs to only a single processor. As processors are added or removed from the group, the partitions will be redistributed to keep the work even. +If more than one `EventProcessorClient` is configured to process an Event Hub, belongs to the same consumer group, and make use of the same Blob Storage container, those processors will collaborate using Blob storage to share responsibility for processing the partitions of the Event Hub. Each `EventProcessorClient` will claim ownership of partitions until each had an equal share; the processors will ensure that each partition belongs to only a single processor. As processors are added or removed from the group, the partitions will be redistributed to keep the work even. -An important call-out is that Event Hubs has an [at-least-once delivery guarantee](https://docs.microsoft.com/azure/event-grid/compare-messaging-services#event-hubs); it is highly recommended to ensure that your processing is resilient to event duplication in whatever way is appropriate for your application scenarios. +An important call-out is that Event Hubs has an [at-least-once delivery guarantee](https://learn.microsoft.com/azure/event-grid/compare-messaging-services#event-hubs); it is highly recommended to ensure that your processing is resilient to event duplication in whatever way is appropriate for your application scenarios. This can be observed when a processor is starting up, as it will attempt to claim ownership of partitions by taking those that do not currently have owners. In the case where a processor isn’t able to reach its fair share by claiming unowned partitions, it will attempt to steal ownership from other processors. During this time, the new owner will begin reading from the last recorded checkpoint. At the same time, the old owner may be dispatching the events that it last read to the handler for processing; it will not understand that ownership has changed until it attempts to read the next set of events from the Event Hubs service. -As a result, you are likely to see some duplicate events being processed when `EventProcessorClients` join or leave the consumer group, which will subside when the processors have reached a stable state with respect to load balancing. The duration of that window will differ depending on the configuration of your processor and your checkpointing strategy. +As a result, you are likely to see some duplicate events being processed when `EventProcessorClients` join or leave the consumer group, which will subside when the processors have reached a stable state with respect to load balancing. The duration of that window will differ depending on the configuration of your processor and your checkpointing strategy. ## Starting and stopping processing -Once it has been configured, the `EventProcessorClient` must be explicitly started by calling its [StartProcessingAsync](https://docs.microsoft.com/dotnet/api/azure.messaging.eventhubs.eventprocessorclient.startprocessingasync?view=azure-dotnet#Azure_Messaging_EventHubs_EventProcessorClient_StartProcessingAsync_System_Threading_CancellationToken_) method to begin processing. After being started, processing is performed in the background and will continue until the processor has been explicitly stopped by calling its [StopProcessingAsync](https://docs.microsoft.com/dotnet/api/azure.messaging.eventhubs.eventprocessorclient.stopprocessingasync?view=azure-dotnet) method. While this allows the application code to perform other tasks, it also places the responsibility of ensuring that the process does not terminate during processing if there are no other tasks being performed. +Once it has been configured, the `EventProcessorClient` must be explicitly started by calling its [StartProcessingAsync](https://learn.microsoft.com/dotnet/api/azure.messaging.eventhubs.eventprocessorclient.startprocessingasync?view=azure-dotnet#Azure_Messaging_EventHubs_EventProcessorClient_StartProcessingAsync_System_Threading_CancellationToken_) method to begin processing. After being started, processing is performed in the background and will continue until the processor has been explicitly stopped by calling its [StopProcessingAsync](https://learn.microsoft.com/dotnet/api/azure.messaging.eventhubs.eventprocessorclient.stopprocessingasync?view=azure-dotnet) method. While this allows the application code to perform other tasks, it also places the responsibility of ensuring that the process does not terminate during processing if there are no other tasks being performed. + + When stopping, the processor will relinquish ownership of partitions that it was responsible for processing and clean up network resources used for communication with the Event Hubs service. As a result, this method will perform network I/O and may need to wait for partition reads that were active to complete. Due to service calls and network latency, an invocation of this method may take slightly longer than the configured [MaximumWaitTime](https://learn.microsoft.com/dotnet/api/azure.messaging.eventhubs.eventprocessorclientoptions.maximumwaittime?view=azure-dotnet#Azure_Messaging_EventHubs_EventProcessorClientOptions_MaximumWaitTime). In the case where the wait time was not configured, stopping may take slightly longer than the [TryTimeout](https://learn.microsoft.com/dotnet/api/azure.messaging.eventhubs.eventhubsretryoptions.trytimeout?view=azure-dotnet#Azure_Messaging_EventHubs_EventHubsRetryOptions_TryTimeout) of the active retry policy. By default, this is 60 seconds. - When stopping, the processor will relinquish ownership of partitions that it was responsible for processing and clean up network resources used for communication with the Event Hubs service. As a result, this method will perform network I/O and may need to wait for partition reads that were active to complete. Due to service calls and network latency, an invocation of this method may take slightly longer than the configured [MaximumWaitTime](https://docs.microsoft.com/dotnet/api/azure.messaging.eventhubs.eventprocessorclientoptions.maximumwaittime?view=azure-dotnet#Azure_Messaging_EventHubs_EventProcessorClientOptions_MaximumWaitTime). In the case where the wait time was not configured, stopping may take slightly longer than the [TryTimeout](https://docs.microsoft.com/dotnet/api/azure.messaging.eventhubs.eventhubsretryoptions.trytimeout?view=azure-dotnet#Azure_Messaging_EventHubs_EventHubsRetryOptions_TryTimeout) of the active retry policy. By default, this is 60 seconds. - For more information on configuring the `TryTimeout`, see: [Configuring the timeout used for Event Hubs service operations](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/eventhub/Azure.Messaging.EventHubs.Processor/samples/Sample02_EventProcessorConfiguration.md#configuring-the-timeout-used-for-event-hubs-service-operations). - + ## Interacting with the processor while running -The act of processing events read from the partition and handling any errors that occur is delegated by the `EventProcessorClient` to code that you provide using the [.NET event pattern](https://docs.microsoft.com/dotnet/csharp/event-pattern). This allows your logic to concentrate on delivering business value while the processor handles the tasks associated with reading events, managing the partitions, and allowing state to be persisted in the form of checkpoints. +The act of processing events read from the partition and handling any errors that occur is delegated by the `EventProcessorClient` to code that you provide using the [.NET event pattern](https://learn.microsoft.com/dotnet/csharp/event-pattern). This allows your logic to concentrate on delivering business value while the processor handles the tasks associated with reading events, managing the partitions, and allowing state to be persisted in the form of checkpoints. An in-depth discussion of the handlers used with the `EventProcessorClient` along with guidance for implementing them can be found in the sample: [Event Processor Handlers](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/eventhub/Azure.Messaging.EventHubs.Processor/samples/Sample03_EventProcessorHandlers.md). The following examples will assume familiarity with best practices for handler implementation and will often avoid going into detail in the interest of brevity. @@ -70,22 +70,30 @@ An in-depth discussion of the handlers used with the `EventProcessorClient` alon At minimum, the `EventProcessorClient` will make sure that you've registered a handler for processing events and receiving notification about exceptions the processor encounters before it will begin processing events. This example illustrates a common general pattern for processing, without taking checkpointing into consideration. ```C# Snippet:EventHubs_Processor_Sample04_BasicEventProcessing -var storageConnectionString = "<< CONNECTION STRING FOR THE STORAGE ACCOUNT >>"; +var credential = new DefaultAzureCredential(); + +var storageAccountEndpoint = "<< Account Uri (likely similar to https://{your-account}.blob.core.windows.net) >>"; var blobContainerName = "<< NAME OF THE BLOB CONTAINER >>"; -var eventHubsConnectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; +var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; var consumerGroup = "<< NAME OF THE EVENT HUB CONSUMER GROUP >>"; +var blobUriBuilder = new BlobUriBuilder(new Uri(storageAccountEndpoint)) +{ + BlobContainerName = blobContainerName +}; + var storageClient = new BlobContainerClient( - storageConnectionString, - blobContainerName); + blobUriBuilder.ToUri(), + credential); var processor = new EventProcessorClient( storageClient, consumerGroup, - eventHubsConnectionString, - eventHubName); + fullyQualifiedNamespace, + eventHubName, + credential); Task processEventHandler(ProcessEventArgs args) { @@ -196,25 +204,33 @@ The creation of checkpoints comes at a cost, both in terms of processing perform In either case, it is important to understand that your processing must be tolerant of receiving the same event to be processed more than once; the Event Hubs service, like most messaging platforms, guarantees at-least-once delivery. Even were you to create a checkpoint for each event that you process, it is entirely possible that you would receive that same event again from the service. -This example illustrates checkpointing after 25 events have been processed for a given partition. +This example illustrates checkpointing after 25 events have been processed for a given partition. ```C# Snippet:EventHubs_Processor_Sample04_CheckpointByEventCount -var storageConnectionString = "<< CONNECTION STRING FOR THE STORAGE ACCOUNT >>"; +var credential = new DefaultAzureCredential(); + +var storageAccountEndpoint = "<< Account Uri (likely similar to https://{your-account}.blob.core.windows.net) >>"; var blobContainerName = "<< NAME OF THE BLOB CONTAINER >>"; -var eventHubsConnectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; +var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; var consumerGroup = "<< NAME OF THE EVENT HUB CONSUMER GROUP >>"; +var blobUriBuilder = new BlobUriBuilder(new Uri(storageAccountEndpoint)) +{ + BlobContainerName = blobContainerName +}; + var storageClient = new BlobContainerClient( - storageConnectionString, - blobContainerName); + blobUriBuilder.ToUri(), + credential); var processor = new EventProcessorClient( storageClient, consumerGroup, - eventHubsConnectionString, - eventHubName); + fullyQualifiedNamespace, + eventHubName, + credential); const int EventsBeforeCheckpoint = 25; var partitionEventCount = new ConcurrentDictionary(); @@ -305,22 +321,30 @@ When a partition is initialized, one of the decisions made is where in the parti This example will demonstrate choosing to start with the event closest to being on or after the current date and time. ```C# Snippet:EventHubs_Processor_Sample04_InitializePartition -var storageConnectionString = "<< CONNECTION STRING FOR THE STORAGE ACCOUNT >>"; +var credential = new DefaultAzureCredential(); + +var storageAccountEndpoint = "<< Account Uri (likely similar to https://{your-account}.blob.core.windows.net) >>"; var blobContainerName = "<< NAME OF THE BLOB CONTAINER >>"; -var eventHubsConnectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; +var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; var consumerGroup = "<< NAME OF THE EVENT HUB CONSUMER GROUP >>"; +var blobUriBuilder = new BlobUriBuilder(new Uri(storageAccountEndpoint)) +{ + BlobContainerName = blobContainerName +}; + var storageClient = new BlobContainerClient( - storageConnectionString, - blobContainerName); + blobUriBuilder.ToUri(), + credential); var processor = new EventProcessorClient( storageClient, consumerGroup, - eventHubsConnectionString, - eventHubName); + fullyQualifiedNamespace, + eventHubName, + credential); Task initializeEventHandler(PartitionInitializingEventArgs args) { @@ -397,34 +421,42 @@ finally ## Heartbeat while processing events -It is often helpful for an application to understand whether an `EventProcessorClient` instance is still healthy but no events were available for its partitions versus when the processor or its host may have stopped. This can be accomplished by setting a maximum wait time for events to be available to read from the Event Hubs service. +It is often helpful for an application to understand whether an `EventProcessorClient` instance is still healthy but no events were available for its partitions versus when the processor or its host may have stopped. This can be accomplished by setting a maximum wait time for events to be available to read from the Event Hubs service. -When the wait time is set, if no events are read within that interval, the processor will invoke the `ProcessEventAsync` handler and pass a set of arguments that indicates no event was available, using the [MaximumWaitTime](https://docs.microsoft.com/dotnet/api/azure.messaging.eventhubs.eventprocessorclientoptions.maximumwaittime?view=azure-dotnet) of the `EventProcessorClientOptions`. +When the wait time is set, if no events are read within that interval, the processor will invoke the `ProcessEventAsync` handler and pass a set of arguments that indicates no event was available, using the [MaximumWaitTime](https://learn.microsoft.com/dotnet/api/azure.messaging.eventhubs.eventprocessorclientoptions.maximumwaittime?view=azure-dotnet) of the `EventProcessorClientOptions`. This example demonstrates emitting a heartbeat to the host application whenever an event is processed or after a maximum of 250 milliseconds passes with no event. ```C# Snippet:EventHubs_Processor_Sample04_ProcessWithHeartbeat -var storageConnectionString = "<< CONNECTION STRING FOR THE STORAGE ACCOUNT >>"; +var credential = new DefaultAzureCredential(); + +var storageAccountEndpoint = "<< Account Uri (likely similar to https://{your-account}.blob.core.windows.net) >>"; var blobContainerName = "<< NAME OF THE BLOB CONTAINER >>"; -var eventHubsConnectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; +var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; var consumerGroup = "<< NAME OF THE EVENT HUB CONSUMER GROUP >>"; -var storageClient = new BlobContainerClient( - storageConnectionString, - blobContainerName); - var processorOptions = new EventProcessorClientOptions { MaximumWaitTime = TimeSpan.FromMilliseconds(250) }; +var blobUriBuilder = new BlobUriBuilder(new Uri(storageAccountEndpoint)) +{ + BlobContainerName = blobContainerName +}; + +var storageClient = new BlobContainerClient( + blobUriBuilder.ToUri(), + credential); + var processor = new EventProcessorClient( storageClient, consumerGroup, - eventHubsConnectionString, + fullyQualifiedNamespace, eventHubName, + credential, processorOptions); async Task processEventHandler(ProcessEventArgs args) @@ -491,4 +523,4 @@ finally processor.ProcessEventAsync -= processEventHandler; processor.ProcessErrorAsync -= Application.ProcessorErrorHandler; } -``` \ No newline at end of file +``` diff --git a/sdk/eventhub/Azure.Messaging.EventHubs.Processor/samples/Sample05_IdentityAndSharedAccessCredentials.md b/sdk/eventhub/Azure.Messaging.EventHubs.Processor/samples/Sample05_IdentityAndSharedAccessCredentials.md index 63b2b692f5fe..2f79adf3c97e 100644 --- a/sdk/eventhub/Azure.Messaging.EventHubs.Processor/samples/Sample05_IdentityAndSharedAccessCredentials.md +++ b/sdk/eventhub/Azure.Messaging.EventHubs.Processor/samples/Sample05_IdentityAndSharedAccessCredentials.md @@ -16,7 +16,7 @@ This sample demonstrates using credentials to authorize clients with the Event H ## Prerequisites -To begin, please ensure that you're familiar with the items discussed in the [Getting started](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/eventhub/Azure.Messaging.EventHubs.Processor/samples#getting-started) section of the README. You will also need to the fully qualified namespace for the Event Hubs resource that you would like to use. This can be found in the Azure Portal view of the Event Hubs namespace in the "Overview" tab. In the center pane, the "essentials" area will list a "hostname." This is the fully qualified namespace and is likely be similar to: `{your-namespace}.servicebus.windows.net`. +To begin, please ensure that you're familiar with the items discussed in the [Getting started](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/eventhub/Azure.Messaging.EventHubs.Processor/samples#getting-started) section of the README. You will also need to the fully qualified namespace for the Event Hubs resource that you would like to use. This can be found in the Azure Portal view of the Event Hubs namespace in the "Overview" tab. In the center pane, the "essentials" area will list a "hostname." This is the fully qualified namespace and is likely be similar to: `{your-namespace}.servicebus.windows.net`. If you'd like to use an identity credential for accessing Azure Storage, you will need one of the Blob service endpoint URLs. These can be found in the Azure Portal view of the Azure Storage account in the "Properties" area under the "Settings" tab. Either the primary or secondary endpoint can be used, but you'll need to ensure that "Blob service" appears under the endpoint that you've selected for it to be valid. This endpoint is likely similar to: `{your-account-name}.blob.core.windows.net`. @@ -24,30 +24,30 @@ Depending on the type of authorization that you wish to use, additional setup ma ### Identity authorization -**Azure.Identity** +**Azure.Identity** -The `Azure.Identity` library is recommended for identity-based authentication across the different sources supported by the Azure platform for [role-based access control (RBAC)](https://docs.microsoft.com/azure/role-based-access-control/overview). This includes Azure Active Directory principals and Managed Identities. To allow for the best developer experience, and one that supports promoting applications between environments without code changes, this sample will concentrate on the `DefaultAzureCredential`. Please see the [Azure.Identity README](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/identity/Azure.Identity/README.md#defaultazurecredential) for details on configuring your environment for `DefaultAzureCredential` integration. +The `Azure.Identity` library is recommended for identity-based authentication across the different sources supported by the Azure platform for [role-based access control (RBAC)](https://learn.microsoft.com/azure/role-based-access-control/overview). This includes Azure Active Directory principals and Managed Identities. To allow for the best developer experience, and one that supports promoting applications between environments without code changes, this sample will concentrate on the `DefaultAzureCredential`. Please see the [Azure.Identity README](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/identity/Azure.Identity/README.md#defaultazurecredential) for details on configuring your environment for `DefaultAzureCredential` integration. -**Role Assignments** +**Role Assignments** -Once your environment is configured, you'll need to ensure that the principal that you've chosen has access to your Event Hubs resources in Azure. To do so, they will need to be assigned the appropriate role. For those unfamiliar with role assignments, it is recommended to follow [these steps](https://docs.microsoft.com/azure/event-hubs/authenticate-managed-identity?tabs=latest#to-assign-azure-roles-using-the-azure-portal) in the Azure portal for the most intuitive experience. Roles may also be assigned via the [Azure CLI](https://docs.microsoft.com/cli/azure/role/assignment?view=azure-cli-latest#az_role_assignment_create) or [PowerShell](https://docs.microsoft.com/powershell/module/az.resources/new-azroleassignment), though these require more in-depth knowledge of the Azure platform and may be difficult for developers exploring Azure for the first time. +Once your environment is configured, you'll need to ensure that the principal that you've chosen has access to your Event Hubs resources in Azure. To do so, they will need to be assigned the appropriate role. For those unfamiliar with role assignments, it is recommended to follow [these steps](https://learn.microsoft.com/azure/event-hubs/authenticate-managed-identity?tabs=latest#to-assign-azure-roles-using-the-azure-portal) in the Azure portal for the most intuitive experience. Roles may also be assigned via the [Azure CLI](https://learn.microsoft.com/cli/azure/role/assignment?view=azure-cli-latest#az_role_assignment_create) or [PowerShell](https://learn.microsoft.com/powershell/module/az.resources/new-azroleassignment), though these require more in-depth knowledge of the Azure platform and may be difficult for developers exploring Azure for the first time. -The available role choices for Event Hubs are: +The available role choices for Event Hubs are: -- [Azure Event Hubs Data Owner](https://docs.microsoft.com/azure/role-based-access-control/built-in-roles#azure-event-hubs-data-owner) for full access to read and publish events. -- [Azure Event Hubs Data Receiver](https://docs.microsoft.com/azure/role-based-access-control/built-in-roles#azure-event-hubs-data-receiver) for the ability to read events but not publish them. +- [Azure Event Hubs Data Owner](https://learn.microsoft.com/azure/role-based-access-control/built-in-roles#azure-event-hubs-data-owner) for full access to read and publish events. +- [Azure Event Hubs Data Receiver](https://learn.microsoft.com/azure/role-based-access-control/built-in-roles#azure-event-hubs-data-receiver) for the ability to read events but not publish them. -You will also need to ensure that your principal is assigned the [Storage Blob Data Contributor](https://docs.microsoft.com/azure/role-based-access-control/built-in-roles#storage-blob-data-contributor) role for the Blob Storage container that you're using for checkpoint and ownership data. +You will also need to ensure that your principal is assigned the [Storage Blob Data Contributor](https://learn.microsoft.com/azure/role-based-access-control/built-in-roles#storage-blob-data-contributor) role for the Blob Storage container that you're using for checkpoint and ownership data. ### Event Hubs Shared Access Signature authorization Shared access signatures (SAS) are recommended over shared access keys, when RBAC cannot be used. A shared access signature allows for granular and time-limited access to Event Hubs resources. In order to use SAS-based authorization, a token needs to be generated and the associated Event Hubs resource needs to be configured to authorize its use. -The steps to to generate a SAS token can be found in the article "[Authenticate access to Event Hubs resources using shared access signatures (SAS)](https://docs.microsoft.com/azure/event-hubs/authenticate-shared-access-signature)", with details for some additional languages detailed in the article "[Generate SAS token](https://docs.microsoft.com/rest/api/eventhub/generate-sas-token)". Information about configuring SAS authorization can be found in the article "[Authorizing access to Event Hubs resources using Shared Access Signatures](https://docs.microsoft.com/azure/event-hubs/authorize-access-shared-access-signature)". +The steps to to generate a SAS token can be found in the article "[Authenticate access to Event Hubs resources using shared access signatures (SAS)](https://learn.microsoft.com/azure/event-hubs/authenticate-shared-access-signature)", with details for some additional languages detailed in the article "[Generate SAS token](https://learn.microsoft.com/rest/api/eventhub/generate-sas-token)". Information about configuring SAS authorization can be found in the article "[Authorizing access to Event Hubs resources using Shared Access Signatures](https://learn.microsoft.com/azure/event-hubs/authorize-access-shared-access-signature)". ### Event Hubs Shared Access Key authorization -Shared access keys for Event Hubs authorization are generated when access policies are created for an Event Hubs namespace or one of its Event Hub instances. Since these keys are most often used in association with a connection string, the article "[Get an Event Hubs connection string](https://docs.microsoft.com/azure/event-hubs/event-hubs-get-connection-string#get-connection-string-from-the-portal)" is the best source of information on generating and accessing them. +Shared access keys for Event Hubs authorization are generated when access policies are created for an Event Hubs namespace or one of its Event Hub instances. Since these keys are most often used in association with a connection string, the article "[Get an Event Hubs connection string](https://learn.microsoft.com/azure/event-hubs/event-hubs-get-connection-string#get-connection-string-from-the-portal)" is the best source of information on generating and accessing them. In step 6 of the article, the policy that you select will be the name of your shared access key when used for credential authorization. In step 7, you'll want to copy the "Primary key" rather than connection string. @@ -55,22 +55,24 @@ In step 6 of the article, the policy that you select will be the name of your sh The `EventProcessorClient` is intended to provide a robust and resilient client for processing events from an Event Hub and is capable of automatically managing the recovery process for transient failures. It will also collaborate with other `EventProcessorClient` instances to dynamically distribute and share processing responsibility as processors are added and removed from the group. -The `EventProcessorClient` is safe to cache and use for the lifetime of the application, which is best practice when the application processes events regularly or semi-regularly. The processor is responsible for efficient resource management, working to keep resource usage low during periods of inactivity and manage health during periods of higher use. Calling the `StopProcessingAsync` method when your application is closing will ensure that network resources and other unmanaged objects are cleaned up. +The `EventProcessorClient` is safe to cache and use for the lifetime of the application, which is best practice when the application processes events regularly or semi-regularly. The processor is responsible for efficient resource management, working to keep resource usage low during periods of inactivity and manage health during periods of higher use. Calling the `StopProcessingAsync` method when your application is closing will ensure that network resources and other unmanaged objects are cleaned up. ## Processing events with identity-based authorization ```C# Snippet:EventHubs_Processor_Sample05_DefaultAzureCredential var credential = new DefaultAzureCredential(); -var storageEndpoint = "<< STORAGE ENDPOINT (likely similar to {your-account}.blob.core.windows.net) >>"; +var storageAccountEndpoint = "<< Account Uri (likely similar to https://{your-account}.blob.core.windows.net) >>"; var blobContainerName = "<< NAME OF THE BLOB CONTAINER >>"; var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; var consumerGroup = "<< NAME OF THE EVENT HUB CONSUMER GROUP >>"; -var blobUriBuilder = new BlobUriBuilder(new Uri(storageEndpoint)); -blobUriBuilder.BlobContainerName = blobContainerName; +var blobUriBuilder = new BlobUriBuilder(new Uri(storageAccountEndpoint)) +{ + BlobContainerName = blobContainerName +}; var storageClient = new BlobContainerClient( blobUriBuilder.ToUri(), @@ -347,4 +349,4 @@ finally processor.ProcessEventAsync -= Application.ProcessorEventHandler; processor.ProcessErrorAsync -= Application.ProcessorErrorHandler; } -``` \ No newline at end of file +``` diff --git a/sdk/eventhub/Azure.Messaging.EventHubs.Processor/samples/Sample06_RequestingStorageServiceVersions.md b/sdk/eventhub/Azure.Messaging.EventHubs.Processor/samples/Sample06_RequestingStorageServiceVersions.md index b1cd782660c4..065e1f67e8ea 100644 --- a/sdk/eventhub/Azure.Messaging.EventHubs.Processor/samples/Sample06_RequestingStorageServiceVersions.md +++ b/sdk/eventhub/Azure.Messaging.EventHubs.Processor/samples/Sample06_RequestingStorageServiceVersions.md @@ -1,6 +1,6 @@ # Requesting Azure Storage Service Versions -This sample demonstrates configuring the Blob Storage client to use a specific version of the service, rather than the default. This is useful when the Azure environment that you are targeting supports a different version of Blob Storage service than is available in the Azure public cloud. For example, if you are running Event Hubs on an Azure Stack Hub version 2002, the highest available version for the Storage service is version 2017-11-09. In this case, you will need to use the following code to change the Blob Storage service API version to 2017-11-09. For more information on the Azure Storage service versions supported on Azure Stack Hub, please refer to the [Azure Stack documentation](https://docs.microsoft.com/azure-stack/user/azure-stack-acs-differences). +This sample demonstrates configuring the Blob Storage client to use a specific version of the service, rather than the default. This is useful when the Azure environment that you are targeting supports a different version of Blob Storage service than is available in the Azure public cloud. For example, if you are running Event Hubs on an Azure Stack Hub version 2002, the highest available version for the Storage service is version 2017-11-09. In this case, you will need to use the following code to change the Blob Storage service API version to 2017-11-09. For more information on the Azure Storage service versions supported on Azure Stack Hub, please refer to the [Azure Stack documentation](https://learn.microsoft.com/azure-stack/user/azure-stack-acs-differences). To begin, please ensure that you're familiar with the items discussed in the [Event Processor Handlers](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/eventhub/Azure.Messaging.EventHubs.Processor/samples/Sample03_EventProcessorHandlers.md) sample. You'll also need to have the prerequisites and connection string information available, as discussed in the [Getting started](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/eventhub/Azure.Messaging.EventHubs.Processor/samples#getting-started) section of the README. @@ -10,7 +10,7 @@ To begin, please ensure that you're familiar with the items discussed in the [Ev ## Configuring the Blob Storage client - This sample demonstrates using an [Azure.Core](https://docs.microsoft.com/dotnet/api/overview/azure/core-readme) pipeline policy to request the Blob Storage client request use of a specific service version. + This sample demonstrates using an [Azure.Core](https://learn.microsoft.com/dotnet/api/overview/azure/core-readme) pipeline policy to request the Blob Storage client request use of a specific service version. ```C# Snippet:EventHubs_Processor_Sample06_StorageVersionPolicy ///

@@ -50,10 +50,12 @@ private class StorageApiVersionPolicy : HttpPipelineSynchronousPolicy ``` ```C# Snippet:EventHubs_Processor_Sample06_ChooseStorageVersion -var storageConnectionString = "<< CONNECTION STRING FOR THE STORAGE ACCOUNT >>"; +var credential = new DefaultAzureCredential(); + +var storageAccountEndpoint = "<< Account Uri (likely similar to https://{your-account}.blob.core.windows.net) >>"; var blobContainerName = "<< NAME OF THE BLOB CONTAINER >>"; -var eventHubsConnectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; +var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; var consumerGroup = "<< NAME OF THE EVENT HUB CONSUMER GROUP >>"; @@ -63,16 +65,22 @@ storageClientOptions.AddPolicy( new StorageApiVersionPolicy(), HttpPipelinePosition.PerCall); +var blobUriBuilder = new BlobUriBuilder(new Uri(storageAccountEndpoint)) +{ + BlobContainerName = blobContainerName +}; + var storageClient = new BlobContainerClient( - storageConnectionString, - blobContainerName, + blobUriBuilder.ToUri(), + credential, storageClientOptions); var processor = new EventProcessorClient( storageClient, consumerGroup, - eventHubsConnectionString, - eventHubName); + fullyQualifiedNamespace, + eventHubName, + credential); try { @@ -125,4 +133,4 @@ finally processor.ProcessEventAsync -= Application.ProcessorEventHandler; processor.ProcessErrorAsync -= Application.ProcessorErrorHandler; } -``` \ No newline at end of file +``` diff --git a/sdk/eventhub/Azure.Messaging.EventHubs.Processor/samples/Sample07_BatchProcessing.md b/sdk/eventhub/Azure.Messaging.EventHubs.Processor/samples/Sample07_BatchProcessing.md index febb3126fa08..a94329be5282 100644 --- a/sdk/eventhub/Azure.Messaging.EventHubs.Processor/samples/Sample07_BatchProcessing.md +++ b/sdk/eventhub/Azure.Messaging.EventHubs.Processor/samples/Sample07_BatchProcessing.md @@ -24,15 +24,17 @@ public class SimpleBatchProcessor : PluggableCheckpointStoreEventProcessor - + - + diff --git a/sdk/eventhub/Azure.Messaging.EventHubs.Processor/src/Azure.Messaging.EventHubs.Processor.csproj b/sdk/eventhub/Azure.Messaging.EventHubs.Processor/src/Azure.Messaging.EventHubs.Processor.csproj index b6005a5e9c68..8d86942d6405 100644 --- a/sdk/eventhub/Azure.Messaging.EventHubs.Processor/src/Azure.Messaging.EventHubs.Processor.csproj +++ b/sdk/eventhub/Azure.Messaging.EventHubs.Processor/src/Azure.Messaging.EventHubs.Processor.csproj @@ -7,6 +7,8 @@ Azure;Event Hubs;EventHubs;.NET;Event Processor;EventProcessor;$(PackageCommonTags) $(RequiredTargetFrameworks) true + true + true diff --git a/sdk/eventhub/Azure.Messaging.EventHubs.Processor/src/Diagnostics/BlobEventStoreEventSource.cs b/sdk/eventhub/Azure.Messaging.EventHubs.Processor/src/Diagnostics/BlobEventStoreEventSource.cs index 2598b3656ac9..872c0a146f21 100644 --- a/sdk/eventhub/Azure.Messaging.EventHubs.Processor/src/Diagnostics/BlobEventStoreEventSource.cs +++ b/sdk/eventhub/Azure.Messaging.EventHubs.Processor/src/Diagnostics/BlobEventStoreEventSource.cs @@ -3,6 +3,7 @@ using System; using System.Diagnostics.Tracing; +using System.Diagnostics.CodeAnalysis; using System.Runtime.CompilerServices; using Azure.Core.Diagnostics; using Azure.Messaging.EventHubs.Primitives; @@ -91,6 +92,7 @@ public virtual void ListOwnershipStart(string fullyQualifiedNamespace, /// The amount of ownership received from the storage service. /// [Event(22, Level = EventLevel.Verbose, Message = "Completed listing ownership for FullyQualifiedNamespace: '{0}'; EventHubName: '{1}'; ConsumerGroup: '{2}'. There were {3} ownership entries were found.")] + [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2026", Justification = EventSourceSuppressMessage)] public virtual void ListOwnershipComplete(string fullyQualifiedNamespace, string eventHubName, string consumerGroup, @@ -434,6 +436,7 @@ public virtual void GetCheckpointError(string fullyQualifiedNamespace, /// [NonEvent] [MethodImpl(MethodImplOptions.AggressiveInlining)] + [RequiresUnreferencedCode(EventSourceRequiresUnreferencedCodeMessage)] private unsafe void WriteEvent(int eventId, string arg1, string arg2, @@ -476,6 +479,7 @@ private unsafe void WriteEvent(int eventId, /// [NonEvent] [MethodImpl(MethodImplOptions.AggressiveInlining)] + [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2026", Justification = EventSourceSuppressMessage)] private unsafe void WriteEvent(int eventId, string arg1, string arg2, @@ -518,6 +522,7 @@ private unsafe void WriteEvent(int eventId, /// [NonEvent] [MethodImpl(MethodImplOptions.AggressiveInlining)] + [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2026", Justification = EventSourceSuppressMessage)] private unsafe void WriteEvent(int eventId, string arg1, string arg2, @@ -567,6 +572,7 @@ private unsafe void WriteEvent(int eventId, /// [NonEvent] [MethodImpl(MethodImplOptions.AggressiveInlining)] + [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2026", Justification = EventSourceSuppressMessage)] private unsafe void WriteEvent(int eventId, string arg1, string arg2, @@ -621,6 +627,7 @@ private unsafe void WriteEvent(int eventId, /// [NonEvent] [MethodImpl(MethodImplOptions.AggressiveInlining)] + [RequiresUnreferencedCode(EventSourceRequiresUnreferencedCodeMessage)] private unsafe void WriteEvent(int eventId, string arg1, string arg2, @@ -677,6 +684,7 @@ private unsafe void WriteEvent(int eventId, /// [NonEvent] [MethodImpl(MethodImplOptions.AggressiveInlining)] + [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2026", Justification = EventSourceSuppressMessage)] private unsafe void WriteEvent(int eventId, string arg1, string arg2, @@ -744,6 +752,7 @@ private unsafe void WriteEvent(int eventId, /// [NonEvent] [MethodImpl(MethodImplOptions.AggressiveInlining)] + [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2026", Justification = EventSourceSuppressMessage)] private unsafe void WriteEvent(int eventId, string arg1, string arg2, diff --git a/sdk/eventhub/Azure.Messaging.EventHubs.Processor/src/Diagnostics/EventProcessorClientEventSource.cs b/sdk/eventhub/Azure.Messaging.EventHubs.Processor/src/Diagnostics/EventProcessorClientEventSource.cs index c9f480105ef2..d22b36948279 100644 --- a/sdk/eventhub/Azure.Messaging.EventHubs.Processor/src/Diagnostics/EventProcessorClientEventSource.cs +++ b/sdk/eventhub/Azure.Messaging.EventHubs.Processor/src/Diagnostics/EventProcessorClientEventSource.cs @@ -2,6 +2,7 @@ // Licensed under the MIT License. using System; +using System.Diagnostics.CodeAnalysis; using System.Diagnostics.Tracing; using System.Runtime.CompilerServices; using Azure.Core.Diagnostics; @@ -235,6 +236,7 @@ public virtual void EventBatchProcessingHandlerCall(string sequenceNumber, /// [NonEvent] [MethodImpl(MethodImplOptions.AggressiveInlining)] + [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2026", Justification = EventSourceSuppressMessage)] private unsafe void WriteEvent(int eventId, string arg1, string arg2, @@ -278,6 +280,7 @@ private unsafe void WriteEvent(int eventId, /// [NonEvent] [MethodImpl(MethodImplOptions.AggressiveInlining)] + [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2026", Justification = EventSourceSuppressMessage)] private unsafe void WriteEvent(int eventId, string arg1, string arg2, @@ -327,6 +330,7 @@ private unsafe void WriteEvent(int eventId, /// [NonEvent] [MethodImpl(MethodImplOptions.AggressiveInlining)] + [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2026", Justification = EventSourceSuppressMessage)] private unsafe void WriteEvent(int eventId, string arg1, string arg2, diff --git a/sdk/eventhub/Azure.Messaging.EventHubs.Processor/tests/Processor/EventProcessorClientLiveTests.cs b/sdk/eventhub/Azure.Messaging.EventHubs.Processor/tests/Processor/EventProcessorClientLiveTests.cs index fc8cc1f32674..1a505588d2fb 100644 --- a/sdk/eventhub/Azure.Messaging.EventHubs.Processor/tests/Processor/EventProcessorClientLiveTests.cs +++ b/sdk/eventhub/Azure.Messaging.EventHubs.Processor/tests/Processor/EventProcessorClientLiveTests.cs @@ -47,7 +47,6 @@ public async Task EventsCanBeReadByOneProcessorClient(LoadBalancingStrategy load // Setup the environment. await using EventHubScope scope = await EventHubScope.CreateAsync(2); - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); using var cancellationSource = new CancellationTokenSource(); cancellationSource.CancelAfter(EventHubsTestEnvironment.Instance.TestExecutionTimeLimit); @@ -55,7 +54,7 @@ public async Task EventsCanBeReadByOneProcessorClient(LoadBalancingStrategy load // Send a set of events. var sourceEvents = EventGenerator.CreateEvents(50).ToList(); - var sentCount = await SendEvents(connectionString, sourceEvents, cancellationSource.Token); + var sentCount = await SendEvents(scope.EventHubName, sourceEvents, cancellationSource.Token); Assert.That(sentCount, Is.EqualTo(sourceEvents.Count), "Not all of the source events were sent."); @@ -64,7 +63,7 @@ public async Task EventsCanBeReadByOneProcessorClient(LoadBalancingStrategy load var processedEvents = new ConcurrentDictionary(); var completionSource = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); var options = new EventProcessorOptions { LoadBalancingUpdateInterval = TimeSpan.FromMilliseconds(250), LoadBalancingStrategy = loadBalancingStrategy }; - var processor = CreateProcessor(scope.ConsumerGroups.First(), connectionString, options: options); + var processor = CreateProcessorWithIdentity(scope.ConsumerGroups.First(), scope.EventHubName, options: options); processor.ProcessErrorAsync += CreateAssertingErrorHandler(); processor.ProcessEventAsync += CreateEventTrackingHandler(sentCount, processedEvents, completionSource, cancellationSource.Token); @@ -92,7 +91,7 @@ public async Task EventsCanBeReadByOneProcessorClient(LoadBalancingStrategy load /// /// [Test] - public async Task EventsCanBeReadByOneProcessorClientUsingAnIdentityCredential() + public async Task EventsCanBeReadByOneProcessorClientUsingTheConnectionString() { // Setup the environment. @@ -105,7 +104,7 @@ public async Task EventsCanBeReadByOneProcessorClientUsingAnIdentityCredential() // Send a set of events. var sourceEvents = EventGenerator.CreateEvents(50).ToList(); - var sentCount = await SendEvents(connectionString, sourceEvents, cancellationSource.Token); + var sentCount = await SendEvents(scope.EventHubName, sourceEvents, cancellationSource.Token); Assert.That(sentCount, Is.EqualTo(sourceEvents.Count), "Not all of the source events were sent."); @@ -114,7 +113,7 @@ public async Task EventsCanBeReadByOneProcessorClientUsingAnIdentityCredential() var processedEvents = new ConcurrentDictionary(); var completionSource = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); var options = new EventProcessorOptions { LoadBalancingUpdateInterval = TimeSpan.FromMilliseconds(250) }; - var processor = CreateProcessorWithIdentity(scope.ConsumerGroups.First(), scope.EventHubName, options: options); + var processor = CreateProcessor(scope.ConsumerGroups.First(), connectionString, options: options); processor.ProcessErrorAsync += CreateAssertingErrorHandler(); processor.ProcessEventAsync += CreateEventTrackingHandler(sentCount, processedEvents, completionSource, cancellationSource.Token); @@ -147,7 +146,6 @@ public async Task EventsCanBeReadByOneProcessorClientUsingTheSharedKeyCredential // Setup the environment. await using EventHubScope scope = await EventHubScope.CreateAsync(2); - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); using var cancellationSource = new CancellationTokenSource(); cancellationSource.CancelAfter(EventHubsTestEnvironment.Instance.TestExecutionTimeLimit); @@ -155,7 +153,7 @@ public async Task EventsCanBeReadByOneProcessorClientUsingTheSharedKeyCredential // Send a set of events. var sourceEvents = EventGenerator.CreateEvents(50).ToList(); - var sentCount = await SendEvents(connectionString, sourceEvents, cancellationSource.Token); + var sentCount = await SendEvents(scope.EventHubName, sourceEvents, cancellationSource.Token); Assert.That(sentCount, Is.EqualTo(sourceEvents.Count), "Not all of the source events were sent."); @@ -197,7 +195,6 @@ public async Task EventsCanBeReadByOneProcessorClientUsingTheSasCredential() // Setup the environment. await using EventHubScope scope = await EventHubScope.CreateAsync(2); - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); using var cancellationSource = new CancellationTokenSource(); cancellationSource.CancelAfter(EventHubsTestEnvironment.Instance.TestExecutionTimeLimit); @@ -205,7 +202,7 @@ public async Task EventsCanBeReadByOneProcessorClientUsingTheSasCredential() // Send a set of events. var sourceEvents = EventGenerator.CreateEvents(50).ToList(); - var sentCount = await SendEvents(connectionString, sourceEvents, cancellationSource.Token); + var sentCount = await SendEvents(scope.EventHubName, sourceEvents, cancellationSource.Token); Assert.That(sentCount, Is.EqualTo(sourceEvents.Count), "Not all of the source events were sent."); @@ -247,7 +244,6 @@ public async Task EventsCanBeReadByMultipleProcessorClients() // Setup the environment. await using EventHubScope scope = await EventHubScope.CreateAsync(4); - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); using var cancellationSource = new CancellationTokenSource(); cancellationSource.CancelAfter(EventHubsTestEnvironment.Instance.TestExecutionTimeLimit); @@ -255,7 +251,7 @@ public async Task EventsCanBeReadByMultipleProcessorClients() // Send a set of events. var sourceEvents = EventGenerator.CreateEvents(500).ToList(); - var sentCount = await SendEvents(connectionString, sourceEvents, cancellationSource.Token); + var sentCount = await SendEvents(scope.EventHubName, sourceEvents, cancellationSource.Token); Assert.That(sentCount, Is.EqualTo(sourceEvents.Count), "Not all of the source events were sent."); @@ -271,8 +267,8 @@ public async Task EventsCanBeReadByMultipleProcessorClients() var processors = new[] { - CreateProcessor(scope.ConsumerGroups.First(), connectionString, options: options), - CreateProcessor(scope.ConsumerGroups.First(), connectionString, options: options) + CreateProcessorWithIdentity(scope.ConsumerGroups.First(), scope.EventHubName, options: options), + CreateProcessorWithIdentity(scope.ConsumerGroups.First(), scope.EventHubName, options: options) }; foreach (var processor in processors) @@ -314,14 +310,16 @@ public async Task ProcessorClientCreatesOwnership() var partitionIds = new HashSet(); await using EventHubScope scope = await EventHubScope.CreateAsync(partitionCount); - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); using var cancellationSource = new CancellationTokenSource(); cancellationSource.CancelAfter(EventHubsTestEnvironment.Instance.TestExecutionTimeLimit); // Discover the partitions. - await using (var producer = new EventHubProducerClient(connectionString)) + await using (var producer = new EventHubProducerClient( + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential)) { foreach (var partitionId in (await producer.GetPartitionIdsAsync())) { @@ -332,7 +330,7 @@ public async Task ProcessorClientCreatesOwnership() // Send a set of events. var sourceEvents = EventGenerator.CreateEvents(200).ToList(); - var sentCount = await SendEvents(connectionString, sourceEvents, cancellationSource.Token); + var sentCount = await SendEvents(scope.EventHubName, sourceEvents, cancellationSource.Token); Assert.That(sentCount, Is.EqualTo(sourceEvents.Count), "Not all of the source events were sent."); @@ -379,7 +377,6 @@ public async Task ProcessorClientCanStartFromAnInitialPosition() // Setup the environment. await using EventHubScope scope = await EventHubScope.CreateAsync(1); - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); using var cancellationSource = new CancellationTokenSource(); cancellationSource.CancelAfter(EventHubsTestEnvironment.Instance.TestExecutionTimeLimit); @@ -388,7 +385,7 @@ public async Task ProcessorClientCanStartFromAnInitialPosition() var sourceEvents = EventGenerator.CreateEvents(25).ToList(); var lastSourceEvent = sourceEvents.Last(); - var sentCount = await SendEvents(connectionString, sourceEvents, cancellationSource.Token); + var sentCount = await SendEvents(scope.EventHubName, sourceEvents, cancellationSource.Token); Assert.That(sentCount, Is.EqualTo(sourceEvents.Count), "Not all of the source events were sent."); @@ -396,7 +393,11 @@ public async Task ProcessorClientCanStartFromAnInitialPosition() var startingOffset = 0L; - await using (var consumer = new EventHubConsumerClient(scope.ConsumerGroups.First(), connectionString)) + await using (var consumer = new EventHubConsumerClient( + scope.ConsumerGroups.First(), + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential)) { await foreach (var partitionEvent in consumer.ReadEventsAsync(new ReadEventOptions { MaximumWaitTime = null }, cancellationSource.Token)) { @@ -412,7 +413,7 @@ public async Task ProcessorClientCanStartFromAnInitialPosition() // Send the second set of events to be read by the processor. sourceEvents = EventGenerator.CreateEvents(20).ToList(); - sentCount = await SendEvents(connectionString, sourceEvents, cancellationSource.Token); + sentCount = await SendEvents(scope.EventHubName, sourceEvents, cancellationSource.Token); Assert.That(sentCount, Is.EqualTo(sourceEvents.Count), "Not all of the source events were sent."); @@ -421,7 +422,7 @@ public async Task ProcessorClientCanStartFromAnInitialPosition() var processedEvents = new ConcurrentDictionary(); var completionSource = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); var options = new EventProcessorOptions { LoadBalancingUpdateInterval = TimeSpan.FromMilliseconds(250) }; - var processor = CreateProcessor(scope.ConsumerGroups.First(), connectionString, options: options); + var processor = CreateProcessorWithIdentity(scope.ConsumerGroups.First(), scope.EventHubName, options: options); processor.PartitionInitializingAsync += args => { @@ -460,7 +461,6 @@ public async Task ProcessorClientBeginsWithTheNextEventAfterCheckpointing() // Setup the environment. await using EventHubScope scope = await EventHubScope.CreateAsync(1); - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); using var cancellationSource = new CancellationTokenSource(); cancellationSource.CancelAfter(EventHubsTestEnvironment.Instance.TestExecutionTimeLimit); @@ -473,7 +473,7 @@ public async Task ProcessorClientBeginsWithTheNextEventAfterCheckpointing() var afterCheckpointEvents = EventGenerator.CreateEvents(segmentEventCount).ToList(); var sourceEvents = Enumerable.Concat(beforeCheckpointEvents, afterCheckpointEvents).ToList(); var checkpointEvent = beforeCheckpointEvents.Last(); - var sentCount = await SendEvents(connectionString, sourceEvents, cancellationSource.Token); + var sentCount = await SendEvents(scope.EventHubName, sourceEvents, cancellationSource.Token); Assert.That(sentCount, Is.EqualTo(sourceEvents.Count), "Not all of the source events were sent."); @@ -493,7 +493,7 @@ public async Task ProcessorClientBeginsWithTheNextEventAfterCheckpointing() var beforeCheckpointProcessHandler = CreateEventTrackingHandler(segmentEventCount, processedEvents, completionSource, cancellationSource.Token, processedEventCallback); var options = new EventProcessorOptions { LoadBalancingUpdateInterval = TimeSpan.FromMilliseconds(250) }; var checkpointStore = new InMemoryCheckpointStore(_ => { }); - var processor = CreateProcessor(scope.ConsumerGroups.First(), connectionString, checkpointStore, options); + var processor = CreateProcessorWithIdentity(scope.ConsumerGroups.First(), scope.EventHubName, checkpointStore, options); processor.ProcessErrorAsync += CreateAssertingErrorHandler(); processor.ProcessEventAsync += beforeCheckpointProcessHandler; @@ -590,7 +590,13 @@ public async Task ProcessorClientDetectsAnInvalidEventHubName(bool async) // Create the processor and attempt to start. - var processor = new EventProcessorClient(Mock.Of(), EventHubConsumerClient.DefaultConsumerGroupName, EventHubsTestEnvironment.Instance.EventHubsConnectionString, "fake"); + var processor = new EventProcessorClient( + Mock.Of(), + EventHubConsumerClient.DefaultConsumerGroupName, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + "fake", + EventHubsTestEnvironment.Instance.Credential); + processor.ProcessErrorAsync += _ => Task.CompletedTask; processor.ProcessEventAsync += _ => Task.CompletedTask; @@ -627,8 +633,23 @@ public async Task ProcessorClientDetectsAnInvalidConsumerGroup(bool async) // Create the processor and attempt to start. - var containerClient = new BlobContainerClient(StorageTestEnvironment.Instance.StorageConnectionString, storageScope.ContainerName); - var processor = new EventProcessorClient(containerClient, "fake", EventHubsTestEnvironment.Instance.EventHubsConnectionString, scope.EventHubName); + var blobUri = new Uri($"https://{ StorageTestEnvironment.Instance.StorageAccountName }.{ StorageTestEnvironment.Instance.StorageEndpointSuffix}"); + + var blobUriBuilder = new BlobUriBuilder(blobUri) + { + BlobContainerName = storageScope.ContainerName + }; + + var storageClient = new BlobContainerClient( + blobUriBuilder.ToUri(), + EventHubsTestEnvironment.Instance.Credential); + + var processor = new EventProcessorClient( + storageClient, + "fake", + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential); processor.ProcessErrorAsync += _ => Task.CompletedTask; processor.ProcessEventAsync += _ => Task.CompletedTask; @@ -647,13 +668,14 @@ public async Task ProcessorClientDetectsAnInvalidConsumerGroup(bool async) } /// - /// Verifies that the can read a set of published events. + /// Verifies that the detects an invalid connection + /// to Storage. /// /// [Test] [TestCase(true)] [TestCase(false)] - public async Task ProcessorClientDetectsAnInvalidStorageConnectionString(bool async) + public async Task ProcessorClientDetectsAnInvalidStorageConnection(bool async) { // Setup the environment. @@ -665,9 +687,24 @@ public async Task ProcessorClientDetectsAnInvalidStorageConnectionString(bool as // Create the processor and attempt to start. - var storageConnectionString = StorageTestEnvironment.Instance.StorageConnectionString.Replace(StorageTestEnvironment.Instance.StorageEndpointSuffix, "fake.com"); - var containerClient = new BlobContainerClient(storageConnectionString, storageScope.ContainerName); - var processor = new EventProcessorClient(containerClient, eventHubScope.ConsumerGroups[0], EventHubsTestEnvironment.Instance.EventHubsConnectionString, eventHubScope.EventHubName); + var blobUri = new Uri($"https://{ StorageTestEnvironment.Instance.StorageAccountName }.{ StorageTestEnvironment.Instance.StorageEndpointSuffix}"); + + var blobUriBuilder = new BlobUriBuilder(blobUri) + { + BlobContainerName = storageScope.ContainerName + }; + + var containerClient = new BlobContainerClient( + blobUriBuilder.ToUri(), + EventHubsTestEnvironment.Instance.Credential); + + var processor = new EventProcessorClient( + containerClient, + eventHubScope.ConsumerGroups[0], + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + eventHubScope.EventHubName, + EventHubsTestEnvironment.Instance.Credential); + processor.ProcessErrorAsync += _ => Task.CompletedTask; processor.ProcessEventAsync += _ => Task.CompletedTask; @@ -702,8 +739,24 @@ public async Task ProcessorClientDetectsAnInvalidStorageContainer(bool async) // Create the processor and attempt to start. - var containerClient = new BlobContainerClient(StorageTestEnvironment.Instance.StorageConnectionString, "fake"); - var processor = new EventProcessorClient(containerClient, eventHubScope.ConsumerGroups[0], EventHubsTestEnvironment.Instance.EventHubsConnectionString, eventHubScope.EventHubName); + var blobUri = new Uri($"https://{ StorageTestEnvironment.Instance.StorageAccountName }.{ StorageTestEnvironment.Instance.StorageEndpointSuffix}"); + + var blobUriBuilder = new BlobUriBuilder(blobUri) + { + BlobContainerName = "fake" + }; + + var containerClient = new BlobContainerClient( + blobUriBuilder.ToUri(), + EventHubsTestEnvironment.Instance.Credential); + + var processor = new EventProcessorClient( + containerClient, + eventHubScope.ConsumerGroups[0], + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + eventHubScope.EventHubName, + EventHubsTestEnvironment.Instance.Credential); + processor.ProcessErrorAsync += _ => Task.CompletedTask; processor.ProcessEventAsync += _ => Task.CompletedTask; @@ -733,14 +786,13 @@ public async Task ProcessorClientStopsWithoutWaitingForTimeoutWhenPartitionsAreE // Setup the environment. await using EventHubScope scope = await EventHubScope.CreateAsync(4); - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); using var cancellationSource = new CancellationTokenSource(); cancellationSource.CancelAfter(EventHubsTestEnvironment.Instance.TestExecutionTimeLimit); // Send a single event. - var sentCount = await SendEvents(connectionString, EventGenerator.CreateEvents(1), cancellationSource.Token); + var sentCount = await SendEvents(scope.EventHubName, EventGenerator.CreateEvents(1), cancellationSource.Token); Assert.That(sentCount, Is.EqualTo(1), "A single event should have been sent."); // Attempt to read events using the longest possible TryTimeout. @@ -750,7 +802,7 @@ public async Task ProcessorClientStopsWithoutWaitingForTimeoutWhenPartitionsAreE var processedEvents = new ConcurrentDictionary(); var completionSource = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); - var processor = CreateProcessor(scope.ConsumerGroups.First(), connectionString, options: options); + var processor = CreateProcessorWithIdentity(scope.ConsumerGroups.First(), scope.EventHubName, options: options); processor.ProcessErrorAsync += CreateAssertingErrorHandler(); processor.ProcessEventAsync += CreateEventTrackingHandler(sentCount, processedEvents, completionSource, cancellationSource.Token); @@ -792,14 +844,13 @@ public async Task ProcessorClientCanRestartAfterStopping() // Setup the environment. await using EventHubScope scope = await EventHubScope.CreateAsync(4); - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); using var cancellationSource = new CancellationTokenSource(); cancellationSource.CancelAfter(EventHubsTestEnvironment.Instance.TestExecutionTimeLimit); // Send a single event. - var sentCount = await SendEvents(connectionString, EventGenerator.CreateEvents(1), cancellationSource.Token); + var sentCount = await SendEvents(scope.EventHubName, EventGenerator.CreateEvents(1), cancellationSource.Token); Assert.That(sentCount, Is.EqualTo(1), "A single event should have been sent."); // Attempt to read events using the longest possible TryTimeout. @@ -809,7 +860,7 @@ public async Task ProcessorClientCanRestartAfterStopping() var processedEvents = new ConcurrentDictionary(); var completionSource = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); - var processor = CreateProcessor(scope.ConsumerGroups.First(), connectionString, options: options); + var processor = CreateProcessorWithIdentity(scope.ConsumerGroups.First(), scope.EventHubName, options: options); var activeEventHandler = CreateEventTrackingHandler(sentCount, processedEvents, completionSource, cancellationSource.Token); processor.ProcessEventAsync += activeEventHandler; @@ -833,7 +884,7 @@ public async Task ProcessorClientCanRestartAfterStopping() // Send another single event to prove restart was successful. - sentCount = await SendEvents(connectionString, EventGenerator.CreateEvents(1), cancellationSource.Token); + sentCount = await SendEvents(scope.EventHubName, EventGenerator.CreateEvents(1), cancellationSource.Token); Assert.That(sentCount, Is.EqualTo(1), "A single event should have been sent."); // Reset the event handler so that it uses a completion source that hasn't been signaled.. @@ -870,14 +921,13 @@ public async Task ProcessorClientCeasesProcessingWhenStopping() // Setup the environment. await using EventHubScope scope = await EventHubScope.CreateAsync(4); - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); using var cancellationSource = new CancellationTokenSource(); cancellationSource.CancelAfter(EventHubsTestEnvironment.Instance.TestExecutionTimeLimit); // Publish some events - var sentCount = await SendEvents(connectionString, EventGenerator.CreateSmallEvents(400), cancellationSource.Token); + var sentCount = await SendEvents(scope.EventHubName, EventGenerator.CreateSmallEvents(400), cancellationSource.Token); Assert.That(sentCount, Is.EqualTo(400), "All generated events should have been published."); // Attempt to read events using the longest possible TryTimeout. @@ -889,7 +939,7 @@ public async Task ProcessorClientCeasesProcessingWhenStopping() var eventsProcessedAfterStop = false; var readCount = 0; var completionSource = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); - var processor = CreateProcessor(scope.ConsumerGroups.First(), connectionString, options: options); + var processor = CreateProcessorWithIdentity(scope.ConsumerGroups.First(), scope.EventHubName, options: options); processor.ProcessEventAsync += args => { @@ -937,7 +987,6 @@ public async Task ProcessorClientCanCheckpointAfterStopping() // Setup the environment. await using EventHubScope scope = await EventHubScope.CreateAsync(1); - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); using var cancellationSource = new CancellationTokenSource(); cancellationSource.CancelAfter(EventHubsTestEnvironment.Instance.TestExecutionTimeLimit); @@ -951,7 +1000,7 @@ public async Task ProcessorClientCanCheckpointAfterStopping() var sourceEvents = Enumerable.Concat(beforeCheckpointEvents, afterCheckpointEvents).ToList(); var checkpointEvent = beforeCheckpointEvents.Last(); var checkpointArgs = default(ProcessEventArgs); - var sentCount = await SendEvents(connectionString, sourceEvents, cancellationSource.Token); + var sentCount = await SendEvents(scope.EventHubName, sourceEvents, cancellationSource.Token); Assert.That(sentCount, Is.EqualTo(sourceEvents.Count), "Not all of the source events were sent."); @@ -973,7 +1022,7 @@ public async Task ProcessorClientCanCheckpointAfterStopping() var beforeCheckpointProcessHandler = CreateEventTrackingHandler(segmentEventCount, processedEvents, completionSource, cancellationSource.Token, processedEventCallback); var options = new EventProcessorOptions { LoadBalancingUpdateInterval = TimeSpan.FromMilliseconds(250) }; var checkpointStore = new InMemoryCheckpointStore(_ => { }); - var processor = CreateProcessor(scope.ConsumerGroups.First(), connectionString, checkpointStore, options); + var processor = CreateProcessorWithIdentity(scope.ConsumerGroups.First(), scope.EventHubName, checkpointStore, options); processor.ProcessErrorAsync += CreateAssertingErrorHandler(); processor.ProcessEventAsync += beforeCheckpointProcessHandler; @@ -1112,19 +1161,22 @@ private EventProcessorClient CreateProcessorWithSharedAccessSignature(string con /// Sends a set of events using a new producer to do so. ///
/// - /// The connection string to use when creating the producer. + /// The name of the Event Hub to use when creating the producer. /// The set of events to send. /// The token used to signal a cancellation request. /// /// The count of events that were sent. /// - private async Task SendEvents(string connectionString, + private async Task SendEvents(string eventHubName, IEnumerable sourceEvents, CancellationToken cancellationToken) { var sentCount = 0; - await using (var producer = new EventHubProducerClient(connectionString)) + await using (var producer = new EventHubProducerClient( + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + eventHubName, + EventHubsTestEnvironment.Instance.Credential)) { foreach (var batch in (await EventGenerator.BuildBatchesAsync(sourceEvents, producer, default, cancellationToken))) { diff --git a/sdk/eventhub/Azure.Messaging.EventHubs.Processor/tests/Snippets/MigrationGuideSnippetsLiveTests.cs b/sdk/eventhub/Azure.Messaging.EventHubs.Processor/tests/Snippets/MigrationGuideSnippetsLiveTests.cs index f62558c7a0b3..7916e042b8cd 100644 --- a/sdk/eventhub/Azure.Messaging.EventHubs.Processor/tests/Snippets/MigrationGuideSnippetsLiveTests.cs +++ b/sdk/eventhub/Azure.Messaging.EventHubs.Processor/tests/Snippets/MigrationGuideSnippetsLiveTests.cs @@ -9,6 +9,8 @@ using System.Text.Json; using System.Threading; using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; using Azure.Messaging.EventHubs.Consumer; using Azure.Storage.Blobs; using Azure.Storage.Blobs.Models; @@ -38,19 +40,23 @@ public async Task MigrateCheckpoints() #region Snippet:EventHubs_Migrate_Checkpoints #if SNIPPET + var credential = new DefaultAzureCredential(); + var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; var consumerGroup = "<< NAME OF THE EVENT HUB CONSUMER GROUP >>"; - var storageConnectionString = "<< CONNECTION STRING FOR THE STORAGE ACCOUNT >>"; + var storageAccountEndpoint = "<< Account Uri (likely similar to https://{your-account}.blob.core.windows.net) >>"; var blobContainerName = "<< NAME OF THE BLOB CONTAINER >>"; var legacyBlobContainerName = "<< NAME OF THE BLOB CONTAINER THAT CONTAINS THE LEGACY DATA>>"; #else + var credential = EventHubsTestEnvironment.Instance.Credential; + var fullyQualifiedNamespace = EventHubsTestEnvironment.Instance.FullyQualifiedNamespace; var eventHubName = "fake-hub"; var consumerGroup = EventHubConsumerClient.DefaultConsumerGroupName; - var storageConnectionString = StorageTestEnvironment.Instance.StorageConnectionString; + var storageAccountEndpoint = $"https://{ StorageTestEnvironment.Instance.StorageAccountName }.blob.{ StorageTestEnvironment.Instance.StorageEndpointSuffix}"; var blobContainerName = storageScope.ContainerName; #endif @@ -63,9 +69,10 @@ public async Task MigrateCheckpoints() #if SNIPPET var legacyCheckpoints = await ReadLegacyCheckpoints( - storageConnectionString, + storageAccountEndpoint, legacyBlobContainerName, consumerGroup, + credential, cancellationSource.Token); #else var legacyCheckpoints = ReadFakeLegacyCheckpoints("fake"); @@ -90,7 +97,15 @@ public async Task MigrateCheckpoints() // assumes that the connection string grants the appropriate permissions to create a // container in the storage account. - var storageClient = new BlobContainerClient(storageConnectionString, blobContainerName); + var blobUriBuilder = new BlobUriBuilder(new Uri(storageAccountEndpoint)) + { + BlobContainerName = blobContainerName + }; + + var storageClient = new BlobContainerClient( + blobUriBuilder.ToUri(), + credential); + await storageClient.CreateIfNotExistsAsync(cancellationToken: cancellationSource.Token); // Translate each of the legacy checkpoints, storing the offset and @@ -160,12 +175,20 @@ private IEnumerable ReadFakeLegacyCheckpoints(string fakeCo #region Snippet:EventHubs_Migrate_LegacyCheckpoints private async Task> ReadLegacyCheckpoints( - string connectionString, + string storageAccountEndpoint, string container, string consumerGroup, + TokenCredential credential, CancellationToken cancellationToken) { - var storageClient = new BlobContainerClient(connectionString, container); + var blobUriBuilder = new BlobUriBuilder(new Uri(storageAccountEndpoint)) + { + BlobContainerName = container + }; + + var storageClient = new BlobContainerClient( + blobUriBuilder.ToUri(), + credential); // If there is no container, no action can be taken. diff --git a/sdk/eventhub/Azure.Messaging.EventHubs.Processor/tests/Snippets/ReadMeSnippetsLiveTests.cs b/sdk/eventhub/Azure.Messaging.EventHubs.Processor/tests/Snippets/ReadMeSnippetsLiveTests.cs index 79b33991df58..cd3fde8c9856 100644 --- a/sdk/eventhub/Azure.Messaging.EventHubs.Processor/tests/Snippets/ReadMeSnippetsLiveTests.cs +++ b/sdk/eventhub/Azure.Messaging.EventHubs.Processor/tests/Snippets/ReadMeSnippetsLiveTests.cs @@ -67,18 +67,23 @@ public void ConfigureHandlers() #region Snippet:EventHubs_Processor_ReadMe_ConfigureHandlers #if SNIPPET - var storageConnectionString = "<< CONNECTION STRING FOR THE STORAGE ACCOUNT >>"; + var credential = new DefaultAzureCredential(); + + var storageAccountEndpoint = "<< Account Uri (likely similar to https://{your-account}.blob.core.windows.net) >>"; var blobContainerName = "<< NAME OF THE BLOB CONTAINER >>"; - var eventHubsConnectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; + var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; var consumerGroup = "<< NAME OF THE EVENT HUB CONSUMER GROUP >>"; #else - var storageConnectionString = StorageTestEnvironment.Instance.StorageConnectionString; - var blobContainerName = "not-real"; - var eventHubsConnectionString = EventHubsTestEnvironment.Instance.EventHubsConnectionString; - var eventHubName = "fakeHub"; - var consumerGroup = "fakeConsumer"; + var credential = EventHubsTestEnvironment.Instance.Credential; + + var fullyQualifiedNamespace = EventHubsTestEnvironment.Instance.FullyQualifiedNamespace; + var eventHubName = "fake-hub"; + var consumerGroup = EventHubConsumerClient.DefaultConsumerGroupName; + + var storageAccountEndpoint = $"https://{ StorageTestEnvironment.Instance.StorageAccountName }.blob.{ StorageTestEnvironment.Instance.StorageEndpointSuffix}"; + var blobContainerName = "fake"; #endif async Task processEventHandler(ProcessEventArgs eventArgs) @@ -111,8 +116,23 @@ async Task processErrorHandler(ProcessErrorEventArgs eventArgs) } } - var storageClient = new BlobContainerClient(storageConnectionString, blobContainerName); - var processor = new EventProcessorClient(storageClient, consumerGroup, eventHubsConnectionString, eventHubName); + var blobUriBuilder = new BlobUriBuilder(new Uri(storageAccountEndpoint)) + { + BlobContainerName = blobContainerName + }; + + var storageClient = new BlobContainerClient( + blobUriBuilder.ToUri(), + credential); + + var processor = new EventProcessorClient + ( + storageClient, + consumerGroup, + fullyQualifiedNamespace, + eventHubName, + credential + ); processor.ProcessEventAsync += processEventHandler; processor.ProcessErrorAsync += processErrorHandler; @@ -139,25 +159,45 @@ public async Task ProcessUntilCanceled() cancellationSource.CancelAfter(TimeSpan.FromSeconds(45)); #if SNIPPET - var storageConnectionString = "<< CONNECTION STRING FOR THE STORAGE ACCOUNT >>"; + var credential = new DefaultAzureCredential(); + + var storageAccountEndpoint = "<< Account Uri (likely similar to https://{your-account}.blob.core.windows.net) >>"; var blobContainerName = "<< NAME OF THE BLOB CONTAINER >>"; - var eventHubsConnectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; + var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; var consumerGroup = "<< NAME OF THE EVENT HUB CONSUMER GROUP >>"; #else - var storageConnectionString = StorageTestEnvironment.Instance.StorageConnectionString; - var blobContainerName = storageScope.ContainerName; - var eventHubsConnectionString = EventHubsTestEnvironment.Instance.EventHubsConnectionString; + var credential = EventHubsTestEnvironment.Instance.Credential; + + var fullyQualifiedNamespace = EventHubsTestEnvironment.Instance.FullyQualifiedNamespace; var eventHubName = eventHubScope.EventHubName; - var consumerGroup = eventHubScope.ConsumerGroups.First(); + var consumerGroup = EventHubConsumerClient.DefaultConsumerGroupName; + + var storageAccountEndpoint = $"https://{ StorageTestEnvironment.Instance.StorageAccountName }.blob.{ StorageTestEnvironment.Instance.StorageEndpointSuffix}"; + var blobContainerName = storageScope.ContainerName; #endif Task processEventHandler(ProcessEventArgs eventArgs) => Task.CompletedTask; Task processErrorHandler(ProcessErrorEventArgs eventArgs) => Task.CompletedTask; - var storageClient = new BlobContainerClient(storageConnectionString, blobContainerName); - var processor = new EventProcessorClient(storageClient, consumerGroup, eventHubsConnectionString, eventHubName); + var blobUriBuilder = new BlobUriBuilder(new Uri(storageAccountEndpoint)) + { + BlobContainerName = blobContainerName + }; + + var storageClient = new BlobContainerClient( + blobUriBuilder.ToUri(), + credential); + + var processor = new EventProcessorClient + ( + storageClient, + consumerGroup, + fullyQualifiedNamespace, + eventHubName, + credential + ); processor.ProcessEventAsync += processEventHandler; processor.ProcessErrorAsync += processErrorHandler; @@ -202,20 +242,32 @@ public void CreateWithIdentity() #if SNIPPET var credential = new DefaultAzureCredential(); - var blobStorageUrl ="<< FULLY-QUALIFIED CONTAINER URL (like https://myaccount.blob.core.windows.net/mycontainer) >>"; - var fullyQualifiedNamespace = "<< FULLY-QUALIFIED EVENT HUBS NAMESPACE (like something.servicebus.windows.net) >>"; + var storageAccountEndpoint = "<< Account Uri (likely similar to https://{your-account}.blob.core.windows.net) >>"; + var blobContainerName = "<< NAME OF THE BLOB CONTAINER >>"; + + var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; var consumerGroup = "<< NAME OF THE EVENT HUB CONSUMER GROUP >>"; #else var credential = EventHubsTestEnvironment.Instance.Credential; - var blobStorageUrl = $"https://{ StorageTestEnvironment.Instance.StorageAccountName }.{ StorageTestEnvironment.Instance.StorageEndpointSuffix }/{ "fake-container" }"; + var fullyQualifiedNamespace = EventHubsTestEnvironment.Instance.FullyQualifiedNamespace; - var eventHubName = "fakeHub"; - var consumerGroup = "fakeConsumer"; + var eventHubName = "fake-hub"; + var consumerGroup = EventHubConsumerClient.DefaultConsumerGroupName; + + var storageAccountEndpoint = $"https://{ StorageTestEnvironment.Instance.StorageAccountName }.blob.{ StorageTestEnvironment.Instance.StorageEndpointSuffix}"; + var blobContainerName = "fake"; #endif - var storageClient = new BlobContainerClient(new Uri(blobStorageUrl), credential); + var blobUriBuilder = new BlobUriBuilder(new Uri(storageAccountEndpoint)) + { + BlobContainerName = blobContainerName + }; + + var storageClient = new BlobContainerClient( + blobUriBuilder.ToUri(), + credential); var processor = new EventProcessorClient ( diff --git a/sdk/eventhub/Azure.Messaging.EventHubs.Processor/tests/Snippets/Sample02_EventProcessorConfigurationLiveTests.cs b/sdk/eventhub/Azure.Messaging.EventHubs.Processor/tests/Snippets/Sample02_EventProcessorConfigurationLiveTests.cs index 5d3d0d6f03cc..6a3292e873e5 100644 --- a/sdk/eventhub/Azure.Messaging.EventHubs.Processor/tests/Snippets/Sample02_EventProcessorConfigurationLiveTests.cs +++ b/sdk/eventhub/Azure.Messaging.EventHubs.Processor/tests/Snippets/Sample02_EventProcessorConfigurationLiveTests.cs @@ -5,6 +5,7 @@ using System.Net; using System.Net.Security; using System.Security.Cryptography.X509Certificates; +using Azure.Identity; using Azure.Messaging.EventHubs.Processor; using Azure.Storage.Blobs; using NUnit.Framework; @@ -31,18 +32,23 @@ public void ConfigureLoadBalancingStrategy() #region Snippet:EventHubs_Processor_Sample02_LoadBalancingStrategy #if SNIPPET - var storageConnectionString = "<< CONNECTION STRING FOR THE STORAGE ACCOUNT >>"; + var credential = new DefaultAzureCredential(); + + var storageAccountEndpoint = "<< Account Uri (likely similar to https://{your-account}.blob.core.windows.net) >>"; var blobContainerName = "<< NAME OF THE BLOB CONTAINER >>"; - var eventHubsConnectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; + var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; var consumerGroup = "<< NAME OF THE EVENT HUB CONSUMER GROUP >>"; #else - var storageConnectionString = StorageTestEnvironment.Instance.StorageConnectionString; - var blobContainerName = "not-real"; - var eventHubsConnectionString = EventHubsTestEnvironment.Instance.EventHubsConnectionString; - var eventHubName = "fakeHub"; - var consumerGroup = "fakeConsumer"; + var credential = EventHubsTestEnvironment.Instance.Credential; + + var fullyQualifiedNamespace = EventHubsTestEnvironment.Instance.FullyQualifiedNamespace; + var eventHubName = "fake"; + var consumerGroup = "$Default"; + + var storageAccountEndpoint = $"https://{ StorageTestEnvironment.Instance.StorageAccountName }.blob.{ StorageTestEnvironment.Instance.StorageEndpointSuffix}"; + var blobContainerName = "fake"; #endif var processorOptions = new EventProcessorClientOptions @@ -50,15 +56,21 @@ public void ConfigureLoadBalancingStrategy() LoadBalancingStrategy = LoadBalancingStrategy.Greedy }; + var blobUriBuilder = new BlobUriBuilder(new Uri(storageAccountEndpoint)) + { + BlobContainerName = blobContainerName + }; + var storageClient = new BlobContainerClient( - storageConnectionString, - blobContainerName); + blobUriBuilder.ToUri(), + credential); var processor = new EventProcessorClient( storageClient, consumerGroup, - eventHubsConnectionString, + fullyQualifiedNamespace, eventHubName, + credential, processorOptions); #endregion @@ -74,18 +86,23 @@ public void ConfigureLoadBalancingIntervals() #region Snippet:EventHubs_Processor_Sample02_LoadBalancingIntervals #if SNIPPET - var storageConnectionString = "<< CONNECTION STRING FOR THE STORAGE ACCOUNT >>"; + var credential = new DefaultAzureCredential(); + + var storageAccountEndpoint = "<< Account Uri (likely similar to https://{your-account}.blob.core.windows.net) >>"; var blobContainerName = "<< NAME OF THE BLOB CONTAINER >>"; - var eventHubsConnectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; + var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; var consumerGroup = "<< NAME OF THE EVENT HUB CONSUMER GROUP >>"; #else - var storageConnectionString = StorageTestEnvironment.Instance.StorageConnectionString; - var blobContainerName = "not-real"; - var eventHubsConnectionString = EventHubsTestEnvironment.Instance.EventHubsConnectionString; - var eventHubName = "fakeHub"; - var consumerGroup = "fakeConsumer"; + var credential = EventHubsTestEnvironment.Instance.Credential; + + var fullyQualifiedNamespace = EventHubsTestEnvironment.Instance.FullyQualifiedNamespace; + var eventHubName = "fake"; + var consumerGroup = "$Default"; + + var storageAccountEndpoint = $"https://{ StorageTestEnvironment.Instance.StorageAccountName }.blob.{ StorageTestEnvironment.Instance.StorageEndpointSuffix}"; + var blobContainerName = "fake"; #endif var processorOptions = new EventProcessorClientOptions @@ -94,15 +111,21 @@ public void ConfigureLoadBalancingIntervals() PartitionOwnershipExpirationInterval = TimeSpan.FromSeconds(30) }; + var blobUriBuilder = new BlobUriBuilder(new Uri(storageAccountEndpoint)) + { + BlobContainerName = blobContainerName + }; + var storageClient = new BlobContainerClient( - storageConnectionString, - blobContainerName); + blobUriBuilder.ToUri(), + credential); var processor = new EventProcessorClient( storageClient, consumerGroup, - eventHubsConnectionString, + fullyQualifiedNamespace, eventHubName, + credential, processorOptions); #endregion @@ -118,18 +141,23 @@ public void ConfigureTransportWithFullOptions() #region Snippet:EventHubs_Processor_Sample02_TransportFullConnectionOptions #if SNIPPET - var storageConnectionString = "<< CONNECTION STRING FOR THE STORAGE ACCOUNT >>"; + var credential = new DefaultAzureCredential(); + + var storageAccountEndpoint = "<< Account Uri (likely similar to https://{your-account}.blob.core.windows.net) >>"; var blobContainerName = "<< NAME OF THE BLOB CONTAINER >>"; - var eventHubsConnectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; + var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; var consumerGroup = "<< NAME OF THE EVENT HUB CONSUMER GROUP >>"; #else - var storageConnectionString = StorageTestEnvironment.Instance.StorageConnectionString; - var blobContainerName = "not-real"; - var eventHubsConnectionString = EventHubsTestEnvironment.Instance.EventHubsConnectionString; - var eventHubName = "fakeHub"; - var consumerGroup = "fakeConsumer"; + var credential = EventHubsTestEnvironment.Instance.Credential; + + var fullyQualifiedNamespace = EventHubsTestEnvironment.Instance.FullyQualifiedNamespace; + var eventHubName = "fake"; + var consumerGroup = "$Default"; + + var storageAccountEndpoint = $"https://{ StorageTestEnvironment.Instance.StorageAccountName }.blob.{ StorageTestEnvironment.Instance.StorageEndpointSuffix}"; + var blobContainerName = "fake"; #endif var processorOptions = new EventProcessorClientOptions @@ -140,15 +168,21 @@ public void ConfigureTransportWithFullOptions() } }; + var blobUriBuilder = new BlobUriBuilder(new Uri(storageAccountEndpoint)) + { + BlobContainerName = blobContainerName + }; + var storageClient = new BlobContainerClient( - storageConnectionString, - blobContainerName); + blobUriBuilder.ToUri(), + credential); var processor = new EventProcessorClient( storageClient, consumerGroup, - eventHubsConnectionString, + fullyQualifiedNamespace, eventHubName, + credential, processorOptions); #endregion @@ -164,32 +198,43 @@ public void ConfigureTransportByProperty() #region Snippet:EventHubs_Processor_Sample02_TransportProperty #if SNIPPET - var storageConnectionString = "<< CONNECTION STRING FOR THE STORAGE ACCOUNT >>"; + var credential = new DefaultAzureCredential(); + + var storageAccountEndpoint = "<< Account Uri (likely similar to https://{your-account}.blob.core.windows.net) >>"; var blobContainerName = "<< NAME OF THE BLOB CONTAINER >>"; - var eventHubsConnectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; + var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; var consumerGroup = "<< NAME OF THE EVENT HUB CONSUMER GROUP >>"; #else - var storageConnectionString = StorageTestEnvironment.Instance.StorageConnectionString; - var blobContainerName = "not-real"; - var eventHubsConnectionString = EventHubsTestEnvironment.Instance.EventHubsConnectionString; - var eventHubName = "fakeHub"; - var consumerGroup = "fakeConsumer"; + var credential = EventHubsTestEnvironment.Instance.Credential; + + var fullyQualifiedNamespace = EventHubsTestEnvironment.Instance.FullyQualifiedNamespace; + var eventHubName = "fake"; + var consumerGroup = "$Default"; + + var storageAccountEndpoint = $"https://{ StorageTestEnvironment.Instance.StorageAccountName }.blob.{ StorageTestEnvironment.Instance.StorageEndpointSuffix}"; + var blobContainerName = "fake"; #endif var processorOptions = new EventProcessorClientOptions(); processorOptions.ConnectionOptions.TransportType = EventHubsTransportType.AmqpWebSockets; + var blobUriBuilder = new BlobUriBuilder(new Uri(storageAccountEndpoint)) + { + BlobContainerName = blobContainerName + }; + var storageClient = new BlobContainerClient( - storageConnectionString, - blobContainerName); + blobUriBuilder.ToUri(), + credential); var processor = new EventProcessorClient( storageClient, consumerGroup, - eventHubsConnectionString, + fullyQualifiedNamespace, eventHubName, + credential, processorOptions); #endregion @@ -205,18 +250,23 @@ public void ConfigureProxyWithFullOptions() #region Snippet:EventHubs_Processor_Sample02_ProxyFullConnectionOptions #if SNIPPET - var storageConnectionString = "<< CONNECTION STRING FOR THE STORAGE ACCOUNT >>"; + var credential = new DefaultAzureCredential(); + + var storageAccountEndpoint = "<< Account Uri (likely similar to https://{your-account}.blob.core.windows.net) >>"; var blobContainerName = "<< NAME OF THE BLOB CONTAINER >>"; - var eventHubsConnectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; + var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; var consumerGroup = "<< NAME OF THE EVENT HUB CONSUMER GROUP >>"; #else - var storageConnectionString = StorageTestEnvironment.Instance.StorageConnectionString; - var blobContainerName = "not-real"; - var eventHubsConnectionString = EventHubsTestEnvironment.Instance.EventHubsConnectionString; - var eventHubName = "fakeHub"; - var consumerGroup = "fakeConsumer"; + var credential = EventHubsTestEnvironment.Instance.Credential; + + var fullyQualifiedNamespace = EventHubsTestEnvironment.Instance.FullyQualifiedNamespace; + var eventHubName = "fake"; + var consumerGroup = "$Default"; + + var storageAccountEndpoint = $"https://{ StorageTestEnvironment.Instance.StorageAccountName }.blob.{ StorageTestEnvironment.Instance.StorageEndpointSuffix}"; + var blobContainerName = "fake"; #endif var processorOptions = new EventProcessorClientOptions @@ -228,15 +278,21 @@ public void ConfigureProxyWithFullOptions() } }; + var blobUriBuilder = new BlobUriBuilder(new Uri(storageAccountEndpoint)) + { + BlobContainerName = blobContainerName + }; + var storageClient = new BlobContainerClient( - storageConnectionString, - blobContainerName); + blobUriBuilder.ToUri(), + credential); var processor = new EventProcessorClient( storageClient, consumerGroup, - eventHubsConnectionString, + fullyQualifiedNamespace, eventHubName, + credential, processorOptions); #endregion @@ -252,33 +308,44 @@ public void ConfigureProxyByProperty() #region Snippet:EventHubs_Processor_Sample02_ProxyProperty #if SNIPPET - var storageConnectionString = "<< CONNECTION STRING FOR THE STORAGE ACCOUNT >>"; + var credential = new DefaultAzureCredential(); + + var storageAccountEndpoint = "<< Account Uri (likely similar to https://{your-account}.blob.core.windows.net) >>"; var blobContainerName = "<< NAME OF THE BLOB CONTAINER >>"; - var eventHubsConnectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; + var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; var consumerGroup = "<< NAME OF THE EVENT HUB CONSUMER GROUP >>"; #else - var storageConnectionString = StorageTestEnvironment.Instance.StorageConnectionString; - var blobContainerName = "not-real"; - var eventHubsConnectionString = EventHubsTestEnvironment.Instance.EventHubsConnectionString; - var eventHubName = "fakeHub"; - var consumerGroup = "fakeConsumer"; + var credential = EventHubsTestEnvironment.Instance.Credential; + + var fullyQualifiedNamespace = EventHubsTestEnvironment.Instance.FullyQualifiedNamespace; + var eventHubName = "fake"; + var consumerGroup = "$Default"; + + var storageAccountEndpoint = $"https://{ StorageTestEnvironment.Instance.StorageAccountName }.blob.{ StorageTestEnvironment.Instance.StorageEndpointSuffix}"; + var blobContainerName = "fake"; #endif var processorOptions = new EventProcessorClientOptions(); processorOptions.ConnectionOptions.TransportType = EventHubsTransportType.AmqpWebSockets; processorOptions.ConnectionOptions.Proxy = new WebProxy("https://proxyserver:80", true); + var blobUriBuilder = new BlobUriBuilder(new Uri(storageAccountEndpoint)) + { + BlobContainerName = blobContainerName + }; + var storageClient = new BlobContainerClient( - storageConnectionString, - blobContainerName); + blobUriBuilder.ToUri(), + credential); var processor = new EventProcessorClient( storageClient, consumerGroup, - eventHubsConnectionString, + fullyQualifiedNamespace, eventHubName, + credential, processorOptions); #endregion @@ -294,32 +361,43 @@ public void ConfigureCustomEndpointAddress() #region Snippet:EventHubs_Processor_Sample02_ConnectionOptionsCustomEndpoint #if SNIPPET - var storageConnectionString = "<< CONNECTION STRING FOR THE STORAGE ACCOUNT >>"; + var credential = new DefaultAzureCredential(); + + var storageAccountEndpoint = "<< Account Uri (likely similar to https://{your-account}.blob.core.windows.net) >>"; var blobContainerName = "<< NAME OF THE BLOB CONTAINER >>"; - var eventHubsConnectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; + var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; var consumerGroup = "<< NAME OF THE EVENT HUB CONSUMER GROUP >>"; #else - var storageConnectionString = StorageTestEnvironment.Instance.StorageConnectionString; - var blobContainerName = "not-real"; - var eventHubsConnectionString = EventHubsTestEnvironment.Instance.EventHubsConnectionString; - var eventHubName = "fakeHub"; - var consumerGroup = "fakeConsumer"; + var credential = EventHubsTestEnvironment.Instance.Credential; + + var fullyQualifiedNamespace = EventHubsTestEnvironment.Instance.FullyQualifiedNamespace; + var eventHubName = "fake"; + var consumerGroup = "$Default"; + + var storageAccountEndpoint = $"https://{ StorageTestEnvironment.Instance.StorageAccountName }.blob.{ StorageTestEnvironment.Instance.StorageEndpointSuffix}"; + var blobContainerName = "fake"; #endif var processorOptions = new EventProcessorClientOptions(); processorOptions.ConnectionOptions.CustomEndpointAddress = new Uri("amqps://app-gateway.mycompany.com"); + var blobUriBuilder = new BlobUriBuilder(new Uri(storageAccountEndpoint)) + { + BlobContainerName = blobContainerName + }; + var storageClient = new BlobContainerClient( - storageConnectionString, - blobContainerName); + blobUriBuilder.ToUri(), + credential); var processor = new EventProcessorClient( storageClient, consumerGroup, - eventHubsConnectionString, + fullyQualifiedNamespace, eventHubName, + credential, processorOptions); #endregion @@ -335,18 +413,23 @@ public void ConfigureRemoteCertificateValidationCallback() #region Snippet:EventHubs_Processor_Sample02_RemoteCertificateValidationCallback #if SNIPPET - var storageConnectionString = "<< CONNECTION STRING FOR THE STORAGE ACCOUNT >>"; + var credential = new DefaultAzureCredential(); + + var storageAccountEndpoint = "<< Account Uri (likely similar to https://{your-account}.blob.core.windows.net) >>"; var blobContainerName = "<< NAME OF THE BLOB CONTAINER >>"; - var eventHubsConnectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; + var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; var consumerGroup = "<< NAME OF THE EVENT HUB CONSUMER GROUP >>"; #else - var storageConnectionString = StorageTestEnvironment.Instance.StorageConnectionString; - var blobContainerName = "not-real"; - var eventHubsConnectionString = EventHubsTestEnvironment.Instance.EventHubsConnectionString; - var eventHubName = "fakeHub"; - var consumerGroup = "fakeConsumer"; + var credential = EventHubsTestEnvironment.Instance.Credential; + + var fullyQualifiedNamespace = EventHubsTestEnvironment.Instance.FullyQualifiedNamespace; + var eventHubName = "fake"; + var consumerGroup = "$Default"; + + var storageAccountEndpoint = $"https://{ StorageTestEnvironment.Instance.StorageAccountName }.blob.{ StorageTestEnvironment.Instance.StorageEndpointSuffix}"; + var blobContainerName = "fake"; #endif static bool ValidateServerCertificate( @@ -369,15 +452,21 @@ static bool ValidateServerCertificate( var processorOptions = new EventProcessorClientOptions(); processorOptions.ConnectionOptions.CertificateValidationCallback = ValidateServerCertificate; + var blobUriBuilder = new BlobUriBuilder(new Uri(storageAccountEndpoint)) + { + BlobContainerName = blobContainerName + }; + var storageClient = new BlobContainerClient( - storageConnectionString, - blobContainerName); + blobUriBuilder.ToUri(), + credential); var processor = new EventProcessorClient( storageClient, consumerGroup, - eventHubsConnectionString, + fullyQualifiedNamespace, eventHubName, + credential, processorOptions); #endregion @@ -393,18 +482,23 @@ public void ConfigureRetryWithFullOptions() #region Snippet:EventHubs_Processor_Sample02_RetryWithFullOptions #if SNIPPET - var storageConnectionString = "<< CONNECTION STRING FOR THE STORAGE ACCOUNT >>"; + var credential = new DefaultAzureCredential(); + + var storageAccountEndpoint = "<< Account Uri (likely similar to https://{your-account}.blob.core.windows.net) >>"; var blobContainerName = "<< NAME OF THE BLOB CONTAINER >>"; - var eventHubsConnectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; + var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; var consumerGroup = "<< NAME OF THE EVENT HUB CONSUMER GROUP >>"; #else - var storageConnectionString = StorageTestEnvironment.Instance.StorageConnectionString; - var blobContainerName = "not-real"; - var eventHubsConnectionString = EventHubsTestEnvironment.Instance.EventHubsConnectionString; - var eventHubName = "fakeHub"; - var consumerGroup = "fakeConsumer"; + var credential = EventHubsTestEnvironment.Instance.Credential; + + var fullyQualifiedNamespace = EventHubsTestEnvironment.Instance.FullyQualifiedNamespace; + var eventHubName = "fake"; + var consumerGroup = "$Default"; + + var storageAccountEndpoint = $"https://{ StorageTestEnvironment.Instance.StorageAccountName }.blob.{ StorageTestEnvironment.Instance.StorageEndpointSuffix}"; + var blobContainerName = "fake"; #endif var processorOptions = new EventProcessorClientOptions @@ -418,15 +512,21 @@ public void ConfigureRetryWithFullOptions() } }; + var blobUriBuilder = new BlobUriBuilder(new Uri(storageAccountEndpoint)) + { + BlobContainerName = blobContainerName + }; + var storageClient = new BlobContainerClient( - storageConnectionString, - blobContainerName); + blobUriBuilder.ToUri(), + credential); var processor = new EventProcessorClient( storageClient, consumerGroup, - eventHubsConnectionString, + fullyQualifiedNamespace, eventHubName, + credential, processorOptions); #endregion @@ -442,33 +542,44 @@ public void ConfigureRetryByProperty() #region Snippet:EventHubs_Processor_Sample02_RetryByProperty #if SNIPPET - var storageConnectionString = "<< CONNECTION STRING FOR THE STORAGE ACCOUNT >>"; + var credential = new DefaultAzureCredential(); + + var storageAccountEndpoint = "<< Account Uri (likely similar to https://{your-account}.blob.core.windows.net) >>"; var blobContainerName = "<< NAME OF THE BLOB CONTAINER >>"; - var eventHubsConnectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; + var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; var consumerGroup = "<< NAME OF THE EVENT HUB CONSUMER GROUP >>"; #else - var storageConnectionString = StorageTestEnvironment.Instance.StorageConnectionString; - var blobContainerName = "not-real"; - var eventHubsConnectionString = EventHubsTestEnvironment.Instance.EventHubsConnectionString; - var eventHubName = "fakeHub"; - var consumerGroup = "fakeConsumer"; + var credential = EventHubsTestEnvironment.Instance.Credential; + + var fullyQualifiedNamespace = EventHubsTestEnvironment.Instance.FullyQualifiedNamespace; + var eventHubName = "fake"; + var consumerGroup = "$Default"; + + var storageAccountEndpoint = $"https://{ StorageTestEnvironment.Instance.StorageAccountName }.blob.{ StorageTestEnvironment.Instance.StorageEndpointSuffix}"; + var blobContainerName = "fake"; #endif var processorOptions = new EventProcessorClientOptions(); processorOptions.RetryOptions.Mode = EventHubsRetryMode.Fixed; processorOptions.RetryOptions.MaximumRetries = 5; + var blobUriBuilder = new BlobUriBuilder(new Uri(storageAccountEndpoint)) + { + BlobContainerName = blobContainerName + }; + var storageClient = new BlobContainerClient( - storageConnectionString, - blobContainerName); + blobUriBuilder.ToUri(), + credential); var processor = new EventProcessorClient( storageClient, consumerGroup, - eventHubsConnectionString, + fullyQualifiedNamespace, eventHubName, + credential, processorOptions); #endregion diff --git a/sdk/eventhub/Azure.Messaging.EventHubs.Processor/tests/Snippets/Sample03_EventProcessorHandlersLiveTests.cs b/sdk/eventhub/Azure.Messaging.EventHubs.Processor/tests/Snippets/Sample03_EventProcessorHandlersLiveTests.cs index d4c74c52e1ac..163821a58f81 100644 --- a/sdk/eventhub/Azure.Messaging.EventHubs.Processor/tests/Snippets/Sample03_EventProcessorHandlersLiveTests.cs +++ b/sdk/eventhub/Azure.Messaging.EventHubs.Processor/tests/Snippets/Sample03_EventProcessorHandlersLiveTests.cs @@ -6,6 +6,7 @@ using System.Linq; using System.Threading; using System.Threading.Tasks; +using Azure.Identity; using Azure.Messaging.EventHubs.Consumer; using Azure.Messaging.EventHubs.Processor; using Azure.Storage.Blobs; @@ -33,29 +34,40 @@ public void EventHandlerExceptionHandling() #region Snippet:EventHubs_Processor_Sample03_EventHandlerExceptionHandling #if SNIPPET - var storageConnectionString = "<< CONNECTION STRING FOR THE STORAGE ACCOUNT >>"; + var credential = new DefaultAzureCredential(); + + var storageAccountEndpoint = "<< Account Uri (likely similar to https://{your-account}.blob.core.windows.net) >>"; var blobContainerName = "<< NAME OF THE BLOB CONTAINER >>"; - var eventHubsConnectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; + var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; var consumerGroup = "<< NAME OF THE EVENT HUB CONSUMER GROUP >>"; #else - var storageConnectionString = StorageTestEnvironment.Instance.StorageConnectionString; - var blobContainerName = "not-real"; - var eventHubsConnectionString = EventHubsTestEnvironment.Instance.EventHubsConnectionString; - var eventHubName = "fakeHub"; - var consumerGroup = "fakeConsumer"; + var credential = EventHubsTestEnvironment.Instance.Credential; + + var fullyQualifiedNamespace = EventHubsTestEnvironment.Instance.FullyQualifiedNamespace; + var eventHubName = "fake"; + var consumerGroup = "$Default"; + + var storageAccountEndpoint = $"https://{ StorageTestEnvironment.Instance.StorageAccountName }.blob.{ StorageTestEnvironment.Instance.StorageEndpointSuffix}"; + var blobContainerName = "fake"; #endif + var blobUriBuilder = new BlobUriBuilder(new Uri(storageAccountEndpoint)) + { + BlobContainerName = blobContainerName + }; + var storageClient = new BlobContainerClient( - storageConnectionString, - blobContainerName); + blobUriBuilder.ToUri(), + credential); var processor = new EventProcessorClient( storageClient, consumerGroup, - eventHubsConnectionString, - eventHubName); + fullyQualifiedNamespace, + eventHubName, + credential); Task processEventHandler(ProcessEventArgs args) { @@ -101,29 +113,40 @@ public void EventHandlerCancellation() #region Snippet:EventHubs_Processor_Sample03_EventHandlerCancellation #if SNIPPET - var storageConnectionString = "<< CONNECTION STRING FOR THE STORAGE ACCOUNT >>"; + var credential = new DefaultAzureCredential(); + + var storageAccountEndpoint = "<< Account Uri (likely similar to https://{your-account}.blob.core.windows.net) >>"; var blobContainerName = "<< NAME OF THE BLOB CONTAINER >>"; - var eventHubsConnectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; + var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; var consumerGroup = "<< NAME OF THE EVENT HUB CONSUMER GROUP >>"; #else - var storageConnectionString = StorageTestEnvironment.Instance.StorageConnectionString; - var blobContainerName = "not-real"; - var eventHubsConnectionString = EventHubsTestEnvironment.Instance.EventHubsConnectionString; - var eventHubName = "fakeHub"; - var consumerGroup = "fakeConsumer"; + var credential = EventHubsTestEnvironment.Instance.Credential; + + var fullyQualifiedNamespace = EventHubsTestEnvironment.Instance.FullyQualifiedNamespace; + var eventHubName = "fake"; + var consumerGroup = "$Default"; + + var storageAccountEndpoint = $"https://{ StorageTestEnvironment.Instance.StorageAccountName }.blob.{ StorageTestEnvironment.Instance.StorageEndpointSuffix}"; + var blobContainerName = "fake"; #endif + var blobUriBuilder = new BlobUriBuilder(new Uri(storageAccountEndpoint)) + { + BlobContainerName = blobContainerName + }; + var storageClient = new BlobContainerClient( - storageConnectionString, - blobContainerName); + blobUriBuilder.ToUri(), + credential); var processor = new EventProcessorClient( storageClient, consumerGroup, - eventHubsConnectionString, - eventHubName); + fullyQualifiedNamespace, + eventHubName, + credential); Task processEventHandler(ProcessEventArgs args) { @@ -177,29 +200,40 @@ public async Task EventHandlerStopOnException() #region Snippet:EventHubs_Processor_Sample03_EventHandlerStopOnException #if SNIPPET - var storageConnectionString = "<< CONNECTION STRING FOR THE STORAGE ACCOUNT >>"; + var credential = new DefaultAzureCredential(); + + var storageAccountEndpoint = "<< Account Uri (likely similar to https://{your-account}.blob.core.windows.net) >>"; var blobContainerName = "<< NAME OF THE BLOB CONTAINER >>"; - var eventHubsConnectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; + var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; var consumerGroup = "<< NAME OF THE EVENT HUB CONSUMER GROUP >>"; #else - var storageConnectionString = StorageTestEnvironment.Instance.StorageConnectionString; - var blobContainerName = storageScope.ContainerName; - var eventHubsConnectionString = EventHubsTestEnvironment.Instance.EventHubsConnectionString; + var credential = EventHubsTestEnvironment.Instance.Credential; + + var fullyQualifiedNamespace = EventHubsTestEnvironment.Instance.FullyQualifiedNamespace; var eventHubName = eventHubScope.EventHubName; - var consumerGroup = eventHubScope.ConsumerGroups.First(); + var consumerGroup = "$Default"; + + var storageAccountEndpoint = $"https://{ StorageTestEnvironment.Instance.StorageAccountName }.blob.{ StorageTestEnvironment.Instance.StorageEndpointSuffix}"; + var blobContainerName = storageScope.ContainerName; #endif + var blobUriBuilder = new BlobUriBuilder(new Uri(storageAccountEndpoint)) + { + BlobContainerName = blobContainerName + }; + var storageClient = new BlobContainerClient( - storageConnectionString, - blobContainerName); + blobUriBuilder.ToUri(), + credential); var processor = new EventProcessorClient( storageClient, consumerGroup, - eventHubsConnectionString, - eventHubName); + fullyQualifiedNamespace, + eventHubName, + credential); // This token is used to control processing, // if signaled, then processing will be stopped. @@ -290,29 +324,40 @@ public void ErrorHandlerArgs() #region Snippet:EventHubs_Processor_Sample03_ErrorHandlerArgs #if SNIPPET - var storageConnectionString = "<< CONNECTION STRING FOR THE STORAGE ACCOUNT >>"; + var credential = new DefaultAzureCredential(); + + var storageAccountEndpoint = "<< Account Uri (likely similar to https://{your-account}.blob.core.windows.net) >>"; var blobContainerName = "<< NAME OF THE BLOB CONTAINER >>"; - var eventHubsConnectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; + var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; var consumerGroup = "<< NAME OF THE EVENT HUB CONSUMER GROUP >>"; #else - var storageConnectionString = StorageTestEnvironment.Instance.StorageConnectionString; - var blobContainerName = "not-real"; - var eventHubsConnectionString = EventHubsTestEnvironment.Instance.EventHubsConnectionString; - var eventHubName = "fakeHub"; - var consumerGroup = "fakeConsumer"; + var credential = EventHubsTestEnvironment.Instance.Credential; + + var fullyQualifiedNamespace = EventHubsTestEnvironment.Instance.FullyQualifiedNamespace; + var eventHubName = "fake"; + var consumerGroup = "$Default"; + + var storageAccountEndpoint = $"https://{ StorageTestEnvironment.Instance.StorageAccountName }.blob.{ StorageTestEnvironment.Instance.StorageEndpointSuffix}"; + var blobContainerName = "fake"; #endif + var blobUriBuilder = new BlobUriBuilder(new Uri(storageAccountEndpoint)) + { + BlobContainerName = blobContainerName + }; + var storageClient = new BlobContainerClient( - storageConnectionString, - blobContainerName); + blobUriBuilder.ToUri(), + credential); var processor = new EventProcessorClient( storageClient, consumerGroup, - eventHubsConnectionString, - eventHubName); + fullyQualifiedNamespace, + eventHubName, + credential); Task processErrorHandler(ProcessErrorEventArgs args) { @@ -369,29 +414,40 @@ public async Task ErrorHandlerCancellationRecovery() #region Snippet:EventHubs_Processor_Sample03_ErrorHandlerCancellationRecovery #if SNIPPET - var storageConnectionString = "<< CONNECTION STRING FOR THE STORAGE ACCOUNT >>"; + var credential = new DefaultAzureCredential(); + + var storageAccountEndpoint = "<< Account Uri (likely similar to https://{your-account}.blob.core.windows.net) >>"; var blobContainerName = "<< NAME OF THE BLOB CONTAINER >>"; - var eventHubsConnectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; + var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; var consumerGroup = "<< NAME OF THE EVENT HUB CONSUMER GROUP >>"; #else - var storageConnectionString = StorageTestEnvironment.Instance.StorageConnectionString; - var blobContainerName = storageScope.ContainerName; - var eventHubsConnectionString = EventHubsTestEnvironment.Instance.EventHubsConnectionString; + var credential = EventHubsTestEnvironment.Instance.Credential; + + var fullyQualifiedNamespace = EventHubsTestEnvironment.Instance.FullyQualifiedNamespace; var eventHubName = eventHubScope.EventHubName; - var consumerGroup = eventHubScope.ConsumerGroups.First(); + var consumerGroup = "$Default"; + + var storageAccountEndpoint = $"https://{ StorageTestEnvironment.Instance.StorageAccountName }.blob.{ StorageTestEnvironment.Instance.StorageEndpointSuffix}"; + var blobContainerName = storageScope.ContainerName; #endif + var blobUriBuilder = new BlobUriBuilder(new Uri(storageAccountEndpoint)) + { + BlobContainerName = blobContainerName + }; + var storageClient = new BlobContainerClient( - storageConnectionString, - blobContainerName); + blobUriBuilder.ToUri(), + credential); var processor = new EventProcessorClient( storageClient, consumerGroup, - eventHubsConnectionString, - eventHubName); + fullyQualifiedNamespace, + eventHubName, + credential); // This token is used to control processing, // if signaled, then processing will be stopped. @@ -500,29 +556,40 @@ public void InitializeHandlerArgs() #region Snippet:EventHubs_Processor_Sample03_InitializeHandlerArgs #if SNIPPET - var storageConnectionString = "<< CONNECTION STRING FOR THE STORAGE ACCOUNT >>"; + var credential = new DefaultAzureCredential(); + + var storageAccountEndpoint = "<< Account Uri (likely similar to https://{your-account}.blob.core.windows.net) >>"; var blobContainerName = "<< NAME OF THE BLOB CONTAINER >>"; - var eventHubsConnectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; + var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; var consumerGroup = "<< NAME OF THE EVENT HUB CONSUMER GROUP >>"; #else - var storageConnectionString = StorageTestEnvironment.Instance.StorageConnectionString; - var blobContainerName = "not-real"; - var eventHubsConnectionString = EventHubsTestEnvironment.Instance.EventHubsConnectionString; - var eventHubName = "fakeHub"; - var consumerGroup = "fakeConsumer"; + var credential = EventHubsTestEnvironment.Instance.Credential; + + var fullyQualifiedNamespace = EventHubsTestEnvironment.Instance.FullyQualifiedNamespace; + var eventHubName = "fake"; + var consumerGroup = "$Default"; + + var storageAccountEndpoint = $"https://{ StorageTestEnvironment.Instance.StorageAccountName }.blob.{ StorageTestEnvironment.Instance.StorageEndpointSuffix}"; + var blobContainerName = "fake"; #endif + var blobUriBuilder = new BlobUriBuilder(new Uri(storageAccountEndpoint)) + { + BlobContainerName = blobContainerName + }; + var storageClient = new BlobContainerClient( - storageConnectionString, - blobContainerName); + blobUriBuilder.ToUri(), + credential); var processor = new EventProcessorClient( storageClient, consumerGroup, - eventHubsConnectionString, - eventHubName); + fullyQualifiedNamespace, + eventHubName, + credential); Task initializeEventHandler(PartitionInitializingEventArgs args) { @@ -578,29 +645,40 @@ public void CloseHandlerArgs() #region Snippet:EventHubs_Processor_Sample03_CloseHandlerArgs #if SNIPPET - var storageConnectionString = "<< CONNECTION STRING FOR THE STORAGE ACCOUNT >>"; + var credential = new DefaultAzureCredential(); + + var storageAccountEndpoint = "<< Account Uri (likely similar to https://{your-account}.blob.core.windows.net) >>"; var blobContainerName = "<< NAME OF THE BLOB CONTAINER >>"; - var eventHubsConnectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; + var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; var consumerGroup = "<< NAME OF THE EVENT HUB CONSUMER GROUP >>"; #else - var storageConnectionString = StorageTestEnvironment.Instance.StorageConnectionString; - var blobContainerName = "not-real"; - var eventHubsConnectionString = EventHubsTestEnvironment.Instance.EventHubsConnectionString; - var eventHubName = "fakeHub"; - var consumerGroup = "fakeConsumer"; + var credential = EventHubsTestEnvironment.Instance.Credential; + + var fullyQualifiedNamespace = EventHubsTestEnvironment.Instance.FullyQualifiedNamespace; + var eventHubName = "fake"; + var consumerGroup = "$Default"; + + var storageAccountEndpoint = $"https://{ StorageTestEnvironment.Instance.StorageAccountName }.blob.{ StorageTestEnvironment.Instance.StorageEndpointSuffix}"; + var blobContainerName = "fake"; #endif + var blobUriBuilder = new BlobUriBuilder(new Uri(storageAccountEndpoint)) + { + BlobContainerName = blobContainerName + }; + var storageClient = new BlobContainerClient( - storageConnectionString, - blobContainerName); + blobUriBuilder.ToUri(), + credential); var processor = new EventProcessorClient( storageClient, consumerGroup, - eventHubsConnectionString, - eventHubName); + fullyQualifiedNamespace, + eventHubName, + credential); Task closeEventHandler(PartitionClosingEventArgs args) { diff --git a/sdk/eventhub/Azure.Messaging.EventHubs.Processor/tests/Snippets/Sample04_ProcessingEventsLiveTests.cs b/sdk/eventhub/Azure.Messaging.EventHubs.Processor/tests/Snippets/Sample04_ProcessingEventsLiveTests.cs index b736b6d04f9a..8725db5627df 100644 --- a/sdk/eventhub/Azure.Messaging.EventHubs.Processor/tests/Snippets/Sample04_ProcessingEventsLiveTests.cs +++ b/sdk/eventhub/Azure.Messaging.EventHubs.Processor/tests/Snippets/Sample04_ProcessingEventsLiveTests.cs @@ -7,6 +7,7 @@ using System.Linq; using System.Threading; using System.Threading.Tasks; +using Azure.Identity; using Azure.Messaging.EventHubs.Consumer; using Azure.Messaging.EventHubs.Processor; using Azure.Storage.Blobs; @@ -37,29 +38,40 @@ public async Task BasicEventProcessing() #region Snippet:EventHubs_Processor_Sample04_BasicEventProcessing #if SNIPPET - var storageConnectionString = "<< CONNECTION STRING FOR THE STORAGE ACCOUNT >>"; + var credential = new DefaultAzureCredential(); + + var storageAccountEndpoint = "<< Account Uri (likely similar to https://{your-account}.blob.core.windows.net) >>"; var blobContainerName = "<< NAME OF THE BLOB CONTAINER >>"; - var eventHubsConnectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; + var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; var consumerGroup = "<< NAME OF THE EVENT HUB CONSUMER GROUP >>"; #else - var storageConnectionString = StorageTestEnvironment.Instance.StorageConnectionString; - var blobContainerName = storageScope.ContainerName; - var eventHubsConnectionString = EventHubsTestEnvironment.Instance.EventHubsConnectionString; + var credential = EventHubsTestEnvironment.Instance.Credential; + + var fullyQualifiedNamespace = EventHubsTestEnvironment.Instance.FullyQualifiedNamespace; var eventHubName = eventHubScope.EventHubName; var consumerGroup = eventHubScope.ConsumerGroups.First(); + + var storageAccountEndpoint = $"https://{ StorageTestEnvironment.Instance.StorageAccountName }.blob.{ StorageTestEnvironment.Instance.StorageEndpointSuffix}"; + var blobContainerName = storageScope.ContainerName; #endif + var blobUriBuilder = new BlobUriBuilder(new Uri(storageAccountEndpoint)) + { + BlobContainerName = blobContainerName + }; + var storageClient = new BlobContainerClient( - storageConnectionString, - blobContainerName); + blobUriBuilder.ToUri(), + credential); var processor = new EventProcessorClient( storageClient, consumerGroup, - eventHubsConnectionString, - eventHubName); + fullyQualifiedNamespace, + eventHubName, + credential); Task processEventHandler(ProcessEventArgs args) { @@ -177,29 +189,40 @@ public async Task CheckpointByEventCount() #region Snippet:EventHubs_Processor_Sample04_CheckpointByEventCount #if SNIPPET - var storageConnectionString = "<< CONNECTION STRING FOR THE STORAGE ACCOUNT >>"; + var credential = new DefaultAzureCredential(); + + var storageAccountEndpoint = "<< Account Uri (likely similar to https://{your-account}.blob.core.windows.net) >>"; var blobContainerName = "<< NAME OF THE BLOB CONTAINER >>"; - var eventHubsConnectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; + var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; var consumerGroup = "<< NAME OF THE EVENT HUB CONSUMER GROUP >>"; #else - var storageConnectionString = StorageTestEnvironment.Instance.StorageConnectionString; - var blobContainerName = storageScope.ContainerName; - var eventHubsConnectionString = EventHubsTestEnvironment.Instance.EventHubsConnectionString; + var credential = EventHubsTestEnvironment.Instance.Credential; + + var fullyQualifiedNamespace = EventHubsTestEnvironment.Instance.FullyQualifiedNamespace; var eventHubName = eventHubScope.EventHubName; var consumerGroup = eventHubScope.ConsumerGroups.First(); + + var storageAccountEndpoint = $"https://{ StorageTestEnvironment.Instance.StorageAccountName }.blob.{ StorageTestEnvironment.Instance.StorageEndpointSuffix}"; + var blobContainerName = storageScope.ContainerName; #endif + var blobUriBuilder = new BlobUriBuilder(new Uri(storageAccountEndpoint)) + { + BlobContainerName = blobContainerName + }; + var storageClient = new BlobContainerClient( - storageConnectionString, - blobContainerName); + blobUriBuilder.ToUri(), + credential); var processor = new EventProcessorClient( storageClient, consumerGroup, - eventHubsConnectionString, - eventHubName); + fullyQualifiedNamespace, + eventHubName, + credential); const int EventsBeforeCheckpoint = 25; var partitionEventCount = new ConcurrentDictionary(); @@ -298,29 +321,40 @@ public async Task InitializePartition() #region Snippet:EventHubs_Processor_Sample04_InitializePartition #if SNIPPET - var storageConnectionString = "<< CONNECTION STRING FOR THE STORAGE ACCOUNT >>"; + var credential = new DefaultAzureCredential(); + + var storageAccountEndpoint = "<< Account Uri (likely similar to https://{your-account}.blob.core.windows.net) >>"; var blobContainerName = "<< NAME OF THE BLOB CONTAINER >>"; - var eventHubsConnectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; + var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; var consumerGroup = "<< NAME OF THE EVENT HUB CONSUMER GROUP >>"; #else - var storageConnectionString = StorageTestEnvironment.Instance.StorageConnectionString; - var blobContainerName = storageScope.ContainerName; - var eventHubsConnectionString = EventHubsTestEnvironment.Instance.EventHubsConnectionString; + var credential = EventHubsTestEnvironment.Instance.Credential; + + var fullyQualifiedNamespace = EventHubsTestEnvironment.Instance.FullyQualifiedNamespace; var eventHubName = eventHubScope.EventHubName; var consumerGroup = eventHubScope.ConsumerGroups.First(); + + var storageAccountEndpoint = $"https://{ StorageTestEnvironment.Instance.StorageAccountName }.blob.{ StorageTestEnvironment.Instance.StorageEndpointSuffix}"; + var blobContainerName = storageScope.ContainerName; #endif + var blobUriBuilder = new BlobUriBuilder(new Uri(storageAccountEndpoint)) + { + BlobContainerName = blobContainerName + }; + var storageClient = new BlobContainerClient( - storageConnectionString, - blobContainerName); + blobUriBuilder.ToUri(), + credential); var processor = new EventProcessorClient( storageClient, consumerGroup, - eventHubsConnectionString, - eventHubName); + fullyQualifiedNamespace, + eventHubName, + credential); Task initializeEventHandler(PartitionInitializingEventArgs args) { @@ -410,34 +444,45 @@ public async Task ProcessWithHeartbeat() #region Snippet:EventHubs_Processor_Sample04_ProcessWithHeartbeat #if SNIPPET - var storageConnectionString = "<< CONNECTION STRING FOR THE STORAGE ACCOUNT >>"; + var credential = new DefaultAzureCredential(); + + var storageAccountEndpoint = "<< Account Uri (likely similar to https://{your-account}.blob.core.windows.net) >>"; var blobContainerName = "<< NAME OF THE BLOB CONTAINER >>"; - var eventHubsConnectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; + var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; var consumerGroup = "<< NAME OF THE EVENT HUB CONSUMER GROUP >>"; #else - var storageConnectionString = StorageTestEnvironment.Instance.StorageConnectionString; - var blobContainerName = storageScope.ContainerName; - var eventHubsConnectionString = EventHubsTestEnvironment.Instance.EventHubsConnectionString; + var credential = EventHubsTestEnvironment.Instance.Credential; + + var fullyQualifiedNamespace = EventHubsTestEnvironment.Instance.FullyQualifiedNamespace; var eventHubName = eventHubScope.EventHubName; var consumerGroup = eventHubScope.ConsumerGroups.First(); -#endif - var storageClient = new BlobContainerClient( - storageConnectionString, - blobContainerName); + var storageAccountEndpoint = $"https://{ StorageTestEnvironment.Instance.StorageAccountName }.blob.{ StorageTestEnvironment.Instance.StorageEndpointSuffix}"; + var blobContainerName = storageScope.ContainerName; +#endif var processorOptions = new EventProcessorClientOptions { MaximumWaitTime = TimeSpan.FromMilliseconds(250) }; + var blobUriBuilder = new BlobUriBuilder(new Uri(storageAccountEndpoint)) + { + BlobContainerName = blobContainerName + }; + + var storageClient = new BlobContainerClient( + blobUriBuilder.ToUri(), + credential); + var processor = new EventProcessorClient( storageClient, consumerGroup, - eventHubsConnectionString, + fullyQualifiedNamespace, eventHubName, + credential, processorOptions); async Task processEventHandler(ProcessEventArgs args) diff --git a/sdk/eventhub/Azure.Messaging.EventHubs.Processor/tests/Snippets/Sample05_IdentityAndSharedAccessCredentialsLiveTests.cs b/sdk/eventhub/Azure.Messaging.EventHubs.Processor/tests/Snippets/Sample05_IdentityAndSharedAccessCredentialsLiveTests.cs index 8b2697a9d05e..e10c8cd100cc 100644 --- a/sdk/eventhub/Azure.Messaging.EventHubs.Processor/tests/Snippets/Sample05_IdentityAndSharedAccessCredentialsLiveTests.cs +++ b/sdk/eventhub/Azure.Messaging.EventHubs.Processor/tests/Snippets/Sample05_IdentityAndSharedAccessCredentialsLiveTests.cs @@ -39,7 +39,7 @@ public async Task DefaultAzureCredential() #if SNIPPET var credential = new DefaultAzureCredential(); - var storageEndpoint = "<< STORAGE ENDPOINT (likely similar to {your-account}.blob.core.windows.net) >>"; + var storageAccountEndpoint = "<< Account Uri (likely similar to https://{your-account}.blob.core.windows.net) >>"; var blobContainerName = "<< NAME OF THE BLOB CONTAINER >>"; var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; @@ -47,15 +47,19 @@ public async Task DefaultAzureCredential() var consumerGroup = "<< NAME OF THE EVENT HUB CONSUMER GROUP >>"; #else var credential = EventHubsTestEnvironment.Instance.Credential; - var storageEndpoint = new BlobServiceClient(StorageTestEnvironment.Instance.StorageConnectionString).Uri.ToString(); - var blobContainerName = storageScope.ContainerName; + var fullyQualifiedNamespace = EventHubsTestEnvironment.Instance.FullyQualifiedNamespace; var eventHubName = eventHubScope.EventHubName; var consumerGroup = eventHubScope.ConsumerGroups.First(); + + var storageAccountEndpoint = $"https://{ StorageTestEnvironment.Instance.StorageAccountName }.blob.{ StorageTestEnvironment.Instance.StorageEndpointSuffix}"; + var blobContainerName = storageScope.ContainerName; #endif - var blobUriBuilder = new BlobUriBuilder(new Uri(storageEndpoint)); - blobUriBuilder.BlobContainerName = blobContainerName; + var blobUriBuilder = new BlobUriBuilder(new Uri(storageAccountEndpoint)) + { + BlobContainerName = blobContainerName + }; var storageClient = new BlobContainerClient( blobUriBuilder.ToUri(), diff --git a/sdk/eventhub/Azure.Messaging.EventHubs.Processor/tests/Snippets/Sample06_RequestingStorageServiceVersionsLiveTests.cs b/sdk/eventhub/Azure.Messaging.EventHubs.Processor/tests/Snippets/Sample06_RequestingStorageServiceVersionsLiveTests.cs index 2a7b0639ffd1..e6c49f55cda0 100644 --- a/sdk/eventhub/Azure.Messaging.EventHubs.Processor/tests/Snippets/Sample06_RequestingStorageServiceVersionsLiveTests.cs +++ b/sdk/eventhub/Azure.Messaging.EventHubs.Processor/tests/Snippets/Sample06_RequestingStorageServiceVersionsLiveTests.cs @@ -7,6 +7,7 @@ using System.Threading.Tasks; using Azure.Core; using Azure.Core.Pipeline; +using Azure.Identity; using Azure.Messaging.EventHubs.Processor; using Azure.Storage.Blobs; using NUnit.Framework; @@ -36,18 +37,23 @@ public async Task ProcessEvents() #region Snippet:EventHubs_Processor_Sample06_ChooseStorageVersion #if SNIPPET - var storageConnectionString = "<< CONNECTION STRING FOR THE STORAGE ACCOUNT >>"; + var credential = new DefaultAzureCredential(); + + var storageAccountEndpoint = "<< Account Uri (likely similar to https://{your-account}.blob.core.windows.net) >>"; var blobContainerName = "<< NAME OF THE BLOB CONTAINER >>"; - var eventHubsConnectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; + var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; var consumerGroup = "<< NAME OF THE EVENT HUB CONSUMER GROUP >>"; #else - var storageConnectionString = StorageTestEnvironment.Instance.StorageConnectionString; - var blobContainerName = storageScope.ContainerName; - var eventHubsConnectionString = EventHubsTestEnvironment.Instance.EventHubsConnectionString; + var credential = EventHubsTestEnvironment.Instance.Credential; + + var fullyQualifiedNamespace = EventHubsTestEnvironment.Instance.FullyQualifiedNamespace; var eventHubName = eventHubScope.EventHubName; var consumerGroup = eventHubScope.ConsumerGroups.First(); + + var storageAccountEndpoint = $"https://{ StorageTestEnvironment.Instance.StorageAccountName }.blob.{ StorageTestEnvironment.Instance.StorageEndpointSuffix}"; + var blobContainerName = storageScope.ContainerName; #endif var storageClientOptions = new BlobClientOptions(); @@ -56,16 +62,22 @@ public async Task ProcessEvents() new StorageApiVersionPolicy(), HttpPipelinePosition.PerCall); + var blobUriBuilder = new BlobUriBuilder(new Uri(storageAccountEndpoint)) + { + BlobContainerName = blobContainerName + }; + var storageClient = new BlobContainerClient( - storageConnectionString, - blobContainerName, + blobUriBuilder.ToUri(), + credential, storageClientOptions); var processor = new EventProcessorClient( storageClient, consumerGroup, - eventHubsConnectionString, - eventHubName); + fullyQualifiedNamespace, + eventHubName, + credential); try { diff --git a/sdk/eventhub/Azure.Messaging.EventHubs.Processor/tests/Snippets/Sample07_BatchProcessingLiveTests.cs b/sdk/eventhub/Azure.Messaging.EventHubs.Processor/tests/Snippets/Sample07_BatchProcessingLiveTests.cs index 3fe28b1eb7d4..417b717aff96 100644 --- a/sdk/eventhub/Azure.Messaging.EventHubs.Processor/tests/Snippets/Sample07_BatchProcessingLiveTests.cs +++ b/sdk/eventhub/Azure.Messaging.EventHubs.Processor/tests/Snippets/Sample07_BatchProcessingLiveTests.cs @@ -6,6 +6,8 @@ using System.Linq; using System.Threading; using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; using Azure.Messaging.EventHubs.Primitives; using Azure.Messaging.EventHubs.Processor; using Azure.Storage.Blobs; @@ -36,23 +38,33 @@ public async Task ProcessByBatch() #region Snippet:EventHubs_Processor_Sample07_ProcessByBatch_Usage #if SNIPPET - var storageConnectionString = "<< CONNECTION STRING FOR THE STORAGE ACCOUNT >>"; + var credential = new DefaultAzureCredential(); + + var storageAccountEndpoint = "<< Account Uri (likely similar to https://{your-account}.blob.core.windows.net) >>"; var blobContainerName = "<< NAME OF THE BLOB CONTAINER >>"; - var eventHubsConnectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; + var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; var consumerGroup = "<< NAME OF THE EVENT HUB CONSUMER GROUP >>"; #else - var storageConnectionString = StorageTestEnvironment.Instance.StorageConnectionString; - var blobContainerName = storageScope.ContainerName; - var eventHubsConnectionString = EventHubsTestEnvironment.Instance.EventHubsConnectionString; + var credential = EventHubsTestEnvironment.Instance.Credential; + + var fullyQualifiedNamespace = EventHubsTestEnvironment.Instance.FullyQualifiedNamespace; var eventHubName = eventHubScope.EventHubName; var consumerGroup = eventHubScope.ConsumerGroups.First(); + + var storageAccountEndpoint = $"https://{ StorageTestEnvironment.Instance.StorageAccountName }.blob.{ StorageTestEnvironment.Instance.StorageEndpointSuffix}"; + var blobContainerName = storageScope.ContainerName; #endif + var blobUriBuilder = new BlobUriBuilder(new Uri(storageAccountEndpoint)) + { + BlobContainerName = blobContainerName + }; + var storageClient = new BlobContainerClient( - storageConnectionString, - blobContainerName); + blobUriBuilder.ToUri(), + credential); var checkpointStore = new BlobCheckpointStore(storageClient); var maximumBatchSize = 100; @@ -61,8 +73,9 @@ public async Task ProcessByBatch() checkpointStore, maximumBatchSize, consumerGroup, - eventHubsConnectionString, - eventHubName); + fullyQualifiedNamespace, + eventHubName, + credential); using var cancellationSource = new CancellationTokenSource(); cancellationSource.CancelAfter(TimeSpan.FromSeconds(30)); @@ -103,15 +116,17 @@ public class SimpleBatchProcessor : PluggableCheckpointStoreEventProcessor` also offers native batch processing, a greater level of control over communication with the Event Hubs service, and a less opinionated API. The caveat is that this comes with additional complexity and exists as an abstract base, which needs to be extended. +- The [PluggableCheckpointStoreEventProcessor<TPartition>](https://learn.microsoft.com/dotnet/api/azure.messaging.eventhubs.primitives.PluggableCheckpointStoreEventProcessor-1?view=azure-dotnet) provides a base for creating a custom processor for reading and processing events from all partitions of an Event Hub, using the provided checkpoint store for state persistence. It fills a role similar to the [EventProcessorClient](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/eventhub/Azure.Messaging.EventHubs.Processor/samples) from the [Azure.Messaging.EventHubs.Processor](https://www.nuget.org/packages/Azure.Messaging.EventHubs.Processor) package, with cooperative load balancing and resiliency as its core features. However, `PluggableCheckpointStoreEventProcessor` also offers native batch processing, a greater level of control over communication with the Event Hubs service, and a less opinionated API. The caveat is that this comes with additional complexity and exists as an abstract base, which needs to be extended. -- The [EventProcessor<TPartition>](https://docs.microsoft.com/dotnet/api/azure.messaging.eventhubs.primitives.eventprocessor-1?view=azure-dotnet) is our lowest-level base for creating a custom processor allowing the greatest degree of customizability. It fills a role similar to the [PluggableCheckpointStoreEventProcessor<TPartition>](https://docs.microsoft.com/dotnet/api/azure.messaging.eventhubs.primitives.PluggableCheckpointStoreEventProcessor-1?view=azure-dotnet), with cooperative load balancing, resiliency, and batch processing as its core features. However, `EventProcessor` also provides the ability to customize checkpoint storage, including using different stores for ownership and checkpoint data. `EventProcessor` exists as an abstract base, which needs to be extended. More on the design and philosophy behind this type can be found in its [design document](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/eventhub/Azure.Messaging.EventHubs/design/proposal-event-processor%7BT%7D.md). +- The [EventProcessor<TPartition>](https://learn.microsoft.com/dotnet/api/azure.messaging.eventhubs.primitives.eventprocessor-1?view=azure-dotnet) is our lowest-level base for creating a custom processor allowing the greatest degree of customizability. It fills a role similar to the [PluggableCheckpointStoreEventProcessor<TPartition>](https://learn.microsoft.com/dotnet/api/azure.messaging.eventhubs.primitives.PluggableCheckpointStoreEventProcessor-1?view=azure-dotnet), with cooperative load balancing, resiliency, and batch processing as its core features. However, `EventProcessor` also provides the ability to customize checkpoint storage, including using different stores for ownership and checkpoint data. `EventProcessor` exists as an abstract base, which needs to be extended. More on the design and philosophy behind this type can be found in its [design document](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/eventhub/Azure.Messaging.EventHubs/design/proposal-event-processor%7BT%7D.md). ### Client constructors @@ -206,10 +206,14 @@ finally In the `Azure.Messaging.EventHubs` library, the `EventHubProducerClient` is used as the publisher for a batch created with its default configuration. ```C# Snippet:EventHubs_Sample04_AutomaticRouting -var connectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; +var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; +var credential = new DefaultAzureCredential(); -var producer = new EventHubProducerClient(connectionString, eventHubName); +var producer = new EventHubProducerClient( + fullyQualifiedNamespace, + eventHubName, + credential); try { @@ -276,10 +280,14 @@ finally In the `Azure.Messaging.EventHubs` library, the `EventHubProducerClient` is used as the publisher for a batch created with a partition key specified as an option. ```C# Snippet:EventHubs_Sample04_PartitionKey -var connectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; +var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; +var credential = new DefaultAzureCredential(); -var producer = new EventHubProducerClient(connectionString, eventHubName); +var producer = new EventHubProducerClient( + fullyQualifiedNamespace, + eventHubName, + credential); try { @@ -351,10 +359,14 @@ finally In the `Azure.Messaging.EventHubs` library, the `EventHubProducerClient` is used as the publisher for a batch created with a partition identifier specified as an option. ```C# Snippet:EventHubs_Sample04_PartitionId -var connectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; +var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; +var credential = new DefaultAzureCredential(); -var producer = new EventHubProducerClient(connectionString, eventHubName); +var producer = new EventHubProducerClient( + fullyQualifiedNamespace, + eventHubName, + credential); try { @@ -387,7 +399,7 @@ finally ### Reading events -In the `Microsoft.Azure.EventHubs` library, reading events can be performed by either the `EventProcessorHost` or the `PartitionReceiver`, depending on whether you would like to read from all partitions of an Event Hub or a single partition. Generally, using the `EventProcessorHost` is the preferred approach for most production scenarios. +In the `Microsoft.Azure.EventHubs` library, reading events can be performed by either the `EventProcessorHost` or the `PartitionReceiver`, depending on whether you would like to read from all partitions of an Event Hub or a single partition. Generally, using the `EventProcessorHost` is the preferred approach for most production scenarios. The `Azure.Messaging.EventHubs` library also provides multiple types for reading events, with the `EventProcessorClient` focused on reading from all partitions, and the `EventHubConsumerClient` and `PartitionReceiver` focused on reading from a single partition. The `EventProcessorClient` is the preferred approach for most production scenarios. For a detailed discussion of common scenarios and options, please see the [Event Processor Client](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/eventhub/Azure.Messaging.EventHubs.Processor/samples) and [Reading Events](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/eventhub/Azure.Messaging.EventHubs/samples/Sample05_ReadingEvents.md) samples. @@ -658,17 +670,19 @@ finally } ``` -In the `Azure.Messaging.EventHubs` library, the `EventHubConsumerClient` can be used to read events from a partition in a streaming manner using the asynchronous enumerator pattern. +In the `Azure.Messaging.EventHubs` library, the `EventHubConsumerClient` can be used to read events from a partition in a streaming manner using the asynchronous enumerator pattern. ```C# Snippet:EventHubs_Sample05_ReadPartition -var connectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; +var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; +var credential = new DefaultAzureCredential(); var consumerGroup = EventHubConsumerClient.DefaultConsumerGroupName; var consumer = new EventHubConsumerClient( consumerGroup, - connectionString, - eventHubName); + fullyQualifiedNamespace, + eventHubName, + credential); try { @@ -703,8 +717,9 @@ finally For those that prefer a batched approach to reading, `Azure.Messaging.EventHubs` also offers a `PartitionReceiver` that follows pull-based semantics. ```C# Snippet:EventHubs_Sample05_ReadPartitionWithReceiver -var connectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; +var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; +var credential = new DefaultAzureCredential(); var consumerGroup = EventHubConsumerClient.DefaultConsumerGroupName; using CancellationTokenSource cancellationSource = new CancellationTokenSource(); @@ -712,7 +727,10 @@ cancellationSource.CancelAfter(TimeSpan.FromSeconds(30)); string firstPartition; -await using (var producer = new EventHubProducerClient(connectionString, eventHubName)) +await using (var producer = new EventHubProducerClient( + fullyQualifiedNamespace, + eventHubName, + credential)) { firstPartition = (await producer.GetPartitionIdsAsync()).First(); } @@ -721,8 +739,9 @@ var receiver = new PartitionReceiver( consumerGroup, firstPartition, EventPosition.Earliest, - connectionString, - eventHubName); + fullyQualifiedNamespace, + eventHubName, + credential); try { @@ -762,7 +781,7 @@ In `Azure.Messaging.EventHubs`, Activity baggage is not currently flowed through ## Migrating EventProcessorHost checkpoints -In `Microsoft.Azure.EventHubs`, the `EventProcessorHost` supported a model of pluggable storage providers for checkpoint data, using Azure Storage Blobs as the default. Using the Azure Storage checkpoint manager, the lease and checkpoint information is stored as a JSON blob appearing within the Azure Storage account provided to the `EventProcessorHost`. More details can be found in the [documentation](https://docs.microsoft.com/azure/event-hubs/event-hubs-event-processor-host#partition-ownership-tracking). +In `Microsoft.Azure.EventHubs`, the `EventProcessorHost` supported a model of pluggable storage providers for checkpoint data, using Azure Storage Blobs as the default. Using the Azure Storage checkpoint manager, the lease and checkpoint information is stored as a JSON blob appearing within the Azure Storage account provided to the `EventProcessorHost`. More details can be found in the [documentation](https://learn.microsoft.com/azure/event-hubs/event-hubs-event-processor-host#partition-ownership-tracking). In `Azure.Messaging.EventHubs`, the `EventProcessorClient` is an opinionated implementation, storing checkpoints in Azure Storage Blobs using the blob metadata to track information. Unfortunately, the `EventProcessorClient` is unable to consume legacy checkpoints due to the differences in format, approach, and the possibility of a custom checkpoint provider having been used. @@ -777,14 +796,16 @@ private class MigrationCheckpoint } ``` -The `Azure.Messaging.EventHubs` checkpoints are expected by the `EventProcessorClient` to exist in a specifically named blob per partition that contains two metadata attributes. Any content of the blob itself is ignored. Casing is significant where both the name of the blob and the metadata attributes are concerned and must be lowercase. +The `Azure.Messaging.EventHubs` checkpoints are expected by the `EventProcessorClient` to exist in a specifically named blob per partition that contains two metadata attributes. Any content of the blob itself is ignored. Casing is significant where both the name of the blob and the metadata attributes are concerned and must be lowercase. ```C# Snippet:EventHubs_Migrate_Checkpoints +var credential = new DefaultAzureCredential(); + var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; var consumerGroup = "<< NAME OF THE EVENT HUB CONSUMER GROUP >>"; -var storageConnectionString = "<< CONNECTION STRING FOR THE STORAGE ACCOUNT >>"; +var storageAccountEndpoint = "<< Account Uri (likely similar to https://{your-account}.blob.core.windows.net) >>"; var blobContainerName = "<< NAME OF THE BLOB CONTAINER >>"; var legacyBlobContainerName = "<< NAME OF THE BLOB CONTAINER THAT CONTAINS THE LEGACY DATA>>"; @@ -796,9 +817,10 @@ using var cancellationSource = new CancellationTokenSource(); // Note: The ReadLegacyCheckpoints method will be defined in another snippet. var legacyCheckpoints = await ReadLegacyCheckpoints( - storageConnectionString, + storageAccountEndpoint, legacyBlobContainerName, consumerGroup, + credential, cancellationSource.Token); // The member names of MigrationCheckpoint match the names of the checkpoint @@ -820,7 +842,15 @@ var prefix = string.Format( // assumes that the connection string grants the appropriate permissions to create a // container in the storage account. -var storageClient = new BlobContainerClient(storageConnectionString, blobContainerName); +var blobUriBuilder = new BlobUriBuilder(new Uri(storageAccountEndpoint)) +{ + BlobContainerName = blobContainerName +}; + +var storageClient = new BlobContainerClient( + blobUriBuilder.ToUri(), + credential); + await storageClient.CreateIfNotExistsAsync(cancellationToken: cancellationSource.Token); // Translate each of the legacy checkpoints, storing the offset and @@ -849,12 +879,20 @@ The following snippet to read and parse legacy checkpoints assumes that the defa ```C# Snippet:EventHubs_Migrate_LegacyCheckpoints private async Task> ReadLegacyCheckpoints( - string connectionString, + string storageAccountEndpoint, string container, string consumerGroup, + TokenCredential credential, CancellationToken cancellationToken) { - var storageClient = new BlobContainerClient(connectionString, container); + var blobUriBuilder = new BlobUriBuilder(new Uri(storageAccountEndpoint)) + { + BlobContainerName = container + }; + + var storageClient = new BlobContainerClient( + blobUriBuilder.ToUri(), + credential); // If there is no container, no action can be taken. diff --git a/sdk/eventhub/Azure.Messaging.EventHubs/MigrationGuide_WindowsAzureServiceBus.md b/sdk/eventhub/Azure.Messaging.EventHubs/MigrationGuide_WindowsAzureServiceBus.md index 6ad936287d76..deae35e89f4f 100644 --- a/sdk/eventhub/Azure.Messaging.EventHubs/MigrationGuide_WindowsAzureServiceBus.md +++ b/sdk/eventhub/Azure.Messaging.EventHubs/MigrationGuide_WindowsAzureServiceBus.md @@ -164,10 +164,14 @@ finally In the `Azure.Messaging.EventHubs` library, the `EventHubProducerClient` is used as the publisher for a batch created with its default configuration. ```C# Snippet:EventHubs_Sample04_AutomaticRouting -var connectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; +var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; +var credential = new DefaultAzureCredential(); -var producer = new EventHubProducerClient(connectionString, eventHubName); +var producer = new EventHubProducerClient( + fullyQualifiedNamespace, + eventHubName, + credential); try { @@ -227,10 +231,14 @@ finally In the `Azure.Messaging.EventHubs` library, the `EventHubProducerClient` is used as the publisher for a batch created with a partition key specified as an option. ```C# Snippet:EventHubs_Sample04_PartitionKey -var connectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; +var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; +var credential = new DefaultAzureCredential(); -var producer = new EventHubProducerClient(connectionString, eventHubName); +var producer = new EventHubProducerClient( + fullyQualifiedNamespace, + eventHubName, + credential); try { @@ -299,10 +307,14 @@ finally In the `Azure.Messaging.EventHubs` library, the `EventHubProducerClient` is used as the publisher for a batch created with a partition identifier specified as an option. ```C# Snippet:EventHubs_Sample04_PartitionId -var connectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; +var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; +var credential = new DefaultAzureCredential(); -var producer = new EventHubProducerClient(connectionString, eventHubName); +var producer = new EventHubProducerClient( + fullyQualifiedNamespace, + eventHubName, + credential); try { @@ -588,14 +600,16 @@ finally In the `Azure.Messaging.EventHubs` library, the `EventHubConsumerClient` can be used to read events from a partition in a streaming manner using the asynchronous enumerator pattern. ```C# Snippet:EventHubs_Sample05_ReadPartition -var connectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; +var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; +var credential = new DefaultAzureCredential(); var consumerGroup = EventHubConsumerClient.DefaultConsumerGroupName; var consumer = new EventHubConsumerClient( consumerGroup, - connectionString, - eventHubName); + fullyQualifiedNamespace, + eventHubName, + credential); try { @@ -630,8 +644,9 @@ finally For those that prefer a batched approach to reading, `Azure.Messaging.EventHubs` also offers a `PartitionReceiver` that follows pull-based semantics. ```C# Snippet:EventHubs_Sample05_ReadPartitionWithReceiver -var connectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; +var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; +var credential = new DefaultAzureCredential(); var consumerGroup = EventHubConsumerClient.DefaultConsumerGroupName; using CancellationTokenSource cancellationSource = new CancellationTokenSource(); @@ -639,7 +654,10 @@ cancellationSource.CancelAfter(TimeSpan.FromSeconds(30)); string firstPartition; -await using (var producer = new EventHubProducerClient(connectionString, eventHubName)) +await using (var producer = new EventHubProducerClient( + fullyQualifiedNamespace, + eventHubName, + credential)) { firstPartition = (await producer.GetPartitionIdsAsync()).First(); } @@ -648,8 +666,9 @@ var receiver = new PartitionReceiver( consumerGroup, firstPartition, EventPosition.Earliest, - connectionString, - eventHubName); + fullyQualifiedNamespace, + eventHubName, + credential); try { diff --git a/sdk/eventhub/Azure.Messaging.EventHubs/README.md b/sdk/eventhub/Azure.Messaging.EventHubs/README.md index ff5bd91461f8..8470eb1c1fbc 100755 --- a/sdk/eventhub/Azure.Messaging.EventHubs/README.md +++ b/sdk/eventhub/Azure.Messaging.EventHubs/README.md @@ -26,7 +26,7 @@ The Azure Event Hubs client library allows for publishing and consuming of Azure Visual Studio users wishing to take full advantage of the C# 8.0 syntax will need to use Visual Studio 2019 or later. Visual Studio 2019, including the free Community edition, can be downloaded [here](https://visualstudio.microsoft.com). Users of Visual Studio 2017 can take advantage of the C# 8 syntax by making use of the [Microsoft.Net.Compilers NuGet package](https://www.nuget.org/packages/Microsoft.Net.Compilers/) and setting the language version, though the editing experience may not be ideal. - You can still use the library with previous C# language versions, but will need to manage asynchronous enumerable and asynchronous disposable members manually rather than benefiting from the new syntax. You may still target any framework version supported by your .NET Core SDK, including earlier versions of .NET Core or the .NET framework. For more information, see: [how to specify target frameworks](https://learn.microsoft.com/dotnet/standard/frameworks#how-to-specify-target-frameworks). + You can still use the library with previous C# language versions, but will need to manage asynchronous enumerable and asynchronous disposable members manually rather than benefiting from the new syntax. You may still target any framework version supported by your .NET Core SDK, including earlier versions of .NET Core or the .NET framework. For more information, see: [how to specify target frameworks](https://learn.microsoft.com/dotnet/standard/frameworks#how-to-specify-target-frameworks). **Important Note:** In order to build or run the [examples](#examples) and the [samples](#next-steps) without modification, use of C# 11.0 is necessary. You can still run the samples if you decide to tweak them for other language versions. An example of doing so is available in the sample: [Earlier Language Versions](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/eventhub/Azure.Messaging.EventHubs/samples/Sample07_EarlierLanguageVersions.md). To quickly create a basic set of Event Hubs resources in Azure and to receive a connection string for them, you can deploy our sample template by clicking: @@ -66,13 +66,13 @@ For examples of authenticating the Event Hubs clients for an ASP.NET Core applic - An **Event Hub client** is the primary interface for developers interacting with the Event Hubs client library. There are several different Event Hub clients, each dedicated to a specific use of Event Hubs, such as publishing or consuming events. -- An **Event Hub producer** is a type of client that serves as a source of telemetry data, diagnostics information, usage logs, or other log data, as part of an embedded device solution, a mobile device application, a game title running on a console or other device, some client or server based business solution, or a web site. +- An **Event Hub producer** is a type of client that serves as a source of telemetry data, diagnostics information, usage logs, or other log data, as part of an embedded device solution, a mobile device application, a game title running on a console or other device, some client or server based business solution, or a web site. -- An **Event Hub consumer** is a type of client which reads information from the Event Hub and allows processing of it. Processing may involve aggregation, complex computation and filtering. Processing may also involve distribution or storage of the information in a raw or transformed fashion. Event Hub consumers are often robust and high-scale platform infrastructure parts with built-in analytics capabilities, like Azure Stream Analytics, Apache Spark, or Apache Storm. +- An **Event Hub consumer** is a type of client which reads information from the Event Hub and allows processing of it. Processing may involve aggregation, complex computation and filtering. Processing may also involve distribution or storage of the information in a raw or transformed fashion. Event Hub consumers are often robust and high-scale platform infrastructure parts with built-in analytics capabilities, like Azure Stream Analytics, Apache Spark, or Apache Storm. - A **partition** is an ordered sequence of events that is held in an Event Hub. Partitions are a means of data organization associated with the parallelism required by event consumers. Azure Event Hubs provides message streaming through a partitioned consumer pattern in which each consumer only reads a specific subset, or partition, of the message stream. As newer events arrive, they are added to the end of this sequence. The number of partitions is specified at the time an Event Hub is created and cannot be changed. -- A **consumer group** is a view of an entire Event Hub. Consumer groups enable multiple consuming applications to each have a separate view of the event stream, and to read the stream independently at their own pace and from their own position. There can be at most 5 concurrent readers on a partition per consumer group; however it is recommended that there is only one active consumer for a given partition and consumer group pairing. Each active reader receives all of the events from its partition; if there are multiple readers on the same partition, then they will receive duplicate events. +- A **consumer group** is a view of an entire Event Hub. Consumer groups enable multiple consuming applications to each have a separate view of the event stream, and to read the stream independently at their own pace and from their own position. There can be at most 5 concurrent readers on a partition per consumer group; however it is recommended that there is only one active consumer for a given partition and consumer group pairing. Each active reader receives all of the events from its partition; if there are multiple readers on the same partition, then they will receive duplicate events. For more concepts and deeper discussion, see: [Event Hubs Features](https://learn.microsoft.com/azure/event-hubs/event-hubs-features). @@ -82,7 +82,7 @@ Each of the Event Hubs client types is safe to cache and use as a singleton for ### Thread safety -We guarantee that all client instance methods are thread-safe and independent of each other ([guideline](https://azure.github.io/azure-sdk/dotnet_introduction.html#dotnet-service-methods-thread-safety)). This ensures that the recommendation of reusing client instances is always safe, even across threads. +We guarantee that all client instance methods are thread-safe and independent of each other ([guideline](https://azure.github.io/azure-sdk/dotnet_introduction.html#dotnet-service-methods-thread-safety)). This ensures that the recommendation of reusing client instances is always safe, even across threads. The data model types, such as `EventData` and `EventDataBatch` are not thread-safe. They should not be shared across threads nor used concurrently with client methods. @@ -212,18 +212,35 @@ Since the `EventProcessorClient` has a dependency on Azure Storage blobs for per var cancellationSource = new CancellationTokenSource(); cancellationSource.CancelAfter(TimeSpan.FromSeconds(45)); -var storageConnectionString = "<< CONNECTION STRING FOR THE STORAGE ACCOUNT >>"; +var credential = new DefaultAzureCredential(); + +var storageAccountEndpoint = "<< Account Uri (likely similar to https://{your-account}.blob.core.windows.net) >>"; var blobContainerName = "<< NAME OF THE BLOB CONTAINER >>"; -var eventHubsConnectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; +var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; var consumerGroup = "<< NAME OF THE EVENT HUB CONSUMER GROUP >>"; Task processEventHandler(ProcessEventArgs eventArgs) => Task.CompletedTask; Task processErrorHandler(ProcessErrorEventArgs eventArgs) => Task.CompletedTask; -var storageClient = new BlobContainerClient(storageConnectionString, blobContainerName); -var processor = new EventProcessorClient(storageClient, consumerGroup, eventHubsConnectionString, eventHubName); +var blobUriBuilder = new BlobUriBuilder(new Uri(storageAccountEndpoint)) +{ + BlobContainerName = blobContainerName +}; + +var storageClient = new BlobContainerClient( + blobUriBuilder.ToUri(), + credential); + +var processor = new EventProcessorClient +( + storageClient, + consumerGroup, + fullyQualifiedNamespace, + eventHubName, + credential +); processor.ProcessEventAsync += processEventHandler; processor.ProcessErrorAsync += processErrorHandler; @@ -305,7 +322,7 @@ public void ConfigureServices(IServiceCollection services) { builder.AddEventHubProducerClient(Configuration.GetConnectionString("EventHubs")); }); - + services.AddControllers(); } ``` @@ -337,7 +354,7 @@ public void ConfigureServices(IServiceCollection services) // register that instance as the default credential instead. builder.UseCredential(new ManagedIdentityCredential()); }); - + services.AddControllers(); } ``` @@ -360,7 +377,7 @@ The Event Hubs client library is also instrumented for distributed tracing using Beyond the introductory scenarios discussed, the Azure Event Hubs client library offers support for additional scenarios to help take advantage of the full feature set of the Azure Event Hubs service. In order to help explore some of these scenarios, the Event Hubs client library offers a project of samples to serve as an illustration for common scenarios. Please see the samples [README](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/eventhub/Azure.Messaging.EventHubs/samples/README.md) for details. -## Contributing +## Contributing This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com. diff --git a/sdk/eventhub/Azure.Messaging.EventHubs/TROUBLESHOOTING.md b/sdk/eventhub/Azure.Messaging.EventHubs/TROUBLESHOOTING.md index 3c63e5dfdd25..f651fca83dc7 100644 --- a/sdk/eventhub/Azure.Messaging.EventHubs/TROUBLESHOOTING.md +++ b/sdk/eventhub/Azure.Messaging.EventHubs/TROUBLESHOOTING.md @@ -231,7 +231,7 @@ Generally, it is recommended that an event processor own no more than 3 partitio Further reading: - [Debug ThreadPool Starvation][DebugThreadPoolStarvation] -- [Diagnosing .NET Core ThreadPool Starvation with PerfView (Why my service is not saturating all cores or seems to stall)](https://docs.microsoft.com/archive/blogs/vancem/diagnosing-net-core-threadpool-starvation-with-perfview-why-my-service-is-not-saturating-all-cores-or-seems-to-stall) +- [Diagnosing .NET Core ThreadPool Starvation with PerfView (Why my service is not saturating all cores or seems to stall)](https://learn.microsoft.com/archive/blogs/vancem/diagnosing-net-core-threadpool-starvation-with-perfview-why-my-service-is-not-saturating-all-cores-or-seems-to-stall) - [Diagnosing ThreadPool Exhaustion Issues in .NET Core Apps][DiagnoseThreadPoolExhaustion] _(video)_ #### "Soft Delete" or "Blob versioning" is enabled for a Blob Storage checkpoint store: @@ -453,28 +453,28 @@ For more information on ways to request support, please see: [Support][SUPPORT]. [MigrationGuideT1]: https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/eventhub/Azure.Messaging.EventHubs/MigrationGuide.md [SUPPORT]: https://github.com/Azure/azure-sdk-for-net/blob/main/SUPPORT.md - -[AuthorizeSAS]: https://docs.microsoft.com/azure/event-hubs/authorize-access-shared-access-signature -[AzureSdkNetLogging]: https://docs.microsoft.com/dotnet/azure/sdk/logging#map-to-aspnet-core-logging -[DebugThreadPoolStarvation]: https://docs.microsoft.com/dotnet/core/diagnostics/debug-threadpool-starvation -[DependencyInjectionAzureFunctions]: https://docs.microsoft.com/azure/azure-functions/functions-dotnet-dependency-injection -[DependencyInjectionAzureSdk]: https://docs.microsoft.com/dotnet/azure/sdk/dependency-injection -[DiagnoseThreadPoolExhaustion]: https://docs.microsoft.com/shows/on-net/diagnosing-thread-pool-exhaustion-issues-in-net-core-apps -[EventHubsException]: https://docs.microsoft.com/dotnet/api/azure.messaging.eventhubs.eventhubsexception -[EventHubsIPAddresses]: https://docs.microsoft.com/azure/event-hubs/troubleshooting-guide#what-ip-addresses-do-i-need-to-allow -[EventHubsMessagingExceptions]: https://docs.microsoft.com/azure/event-hubs/event-hubs-messaging-exceptions -[EventHubsQuotas]: https://docs.microsoft.com/azure/event-hubs/event-hubs-quotas -[EventHubsRetryOptions]: https://docs.microsoft.com/dotnet/api/azure.messaging.eventhubs.eventhubsretryoptions -[EventHubsTroubleshooting]: https://docs.microsoft.com/azure/event-hubs/troubleshooting-guide -[GetConnectionString]: https://docs.microsoft.com/azure/event-hubs/event-hubs-get-connection-string -[IoTHubDocs]: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-endpoints -[IoTEventHubEndpoint]: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messages-read-builtin -[IoTHubSAS]: https://docs.microsoft.com/azure/iot-hub/iot-hub-dev-guide-sas#security-tokens -[RBAC]: https://docs.microsoft.com/azure/event-hubs/authorize-access-azure-active-directory -[SoftDeleteBlobStorage]: https://docs.microsoft.com/azure/storage/blobs/soft-delete-blob-overview -[VersioningBlobStorage]: https://docs.microsoft.com/azure/storage/blobs/versioning-overview -[TroubleshootAuthenticationAuthorization]: https://docs.microsoft.com/azure/event-hubs/troubleshoot-authentication-authorization -[UnauthorizedAccessException]: https://docs.microsoft.com/dotnet/api/system.unauthorizedaccessexception + +[AuthorizeSAS]: https://learn.microsoft.com/azure/event-hubs/authorize-access-shared-access-signature +[AzureSdkNetLogging]: https://learn.microsoft.com/dotnet/azure/sdk/logging#map-to-aspnet-core-logging +[DebugThreadPoolStarvation]: https://learn.microsoft.com/dotnet/core/diagnostics/debug-threadpool-starvation +[DependencyInjectionAzureFunctions]: https://learn.microsoft.com/azure/azure-functions/functions-dotnet-dependency-injection +[DependencyInjectionAzureSdk]: https://learn.microsoft.com/dotnet/azure/sdk/dependency-injection +[DiagnoseThreadPoolExhaustion]: https://learn.microsoft.com/shows/on-net/diagnosing-thread-pool-exhaustion-issues-in-net-core-apps +[EventHubsException]: https://learn.microsoft.com/dotnet/api/azure.messaging.eventhubs.eventhubsexception +[EventHubsIPAddresses]: https://learn.microsoft.com/azure/event-hubs/troubleshooting-guide#what-ip-addresses-do-i-need-to-allow +[EventHubsMessagingExceptions]: https://learn.microsoft.com/azure/event-hubs/event-hubs-messaging-exceptions +[EventHubsQuotas]: https://learn.microsoft.com/azure/event-hubs/event-hubs-quotas +[EventHubsRetryOptions]: https://learn.microsoft.com/dotnet/api/azure.messaging.eventhubs.eventhubsretryoptions +[EventHubsTroubleshooting]: https://learn.microsoft.com/azure/event-hubs/troubleshooting-guide +[GetConnectionString]: https://learn.microsoft.com/azure/event-hubs/event-hubs-get-connection-string +[IoTHubDocs]: https://learn.microsoft.com/azure/iot-hub/iot-hub-devguide-endpoints +[IoTEventHubEndpoint]: https://learn.microsoft.com/azure/iot-hub/iot-hub-devguide-messages-read-builtin +[IoTHubSAS]: https://learn.microsoft.com/azure/iot-hub/iot-hub-dev-guide-sas#security-tokens +[RBAC]: https://learn.microsoft.com/azure/event-hubs/authorize-access-azure-active-directory +[SoftDeleteBlobStorage]: https://learn.microsoft.com/azure/storage/blobs/soft-delete-blob-overview +[VersioningBlobStorage]: https://learn.microsoft.com/azure/storage/blobs/versioning-overview +[TroubleshootAuthenticationAuthorization]: https://learn.microsoft.com/azure/event-hubs/troubleshoot-authentication-authorization +[UnauthorizedAccessException]: https://learn.microsoft.com/dotnet/api/system.unauthorizedaccessexception [AmqpSpec]: https://docs.oasis-open.org/amqp/core/v1.0/os/amqp-core-types-v1.0-os.html diff --git a/sdk/eventhub/Azure.Messaging.EventHubs/samples/README.md b/sdk/eventhub/Azure.Messaging.EventHubs/samples/README.md index 971ea3fdcb31..4c6018fcf396 100644 --- a/sdk/eventhub/Azure.Messaging.EventHubs/samples/README.md +++ b/sdk/eventhub/Azure.Messaging.EventHubs/samples/README.md @@ -11,11 +11,11 @@ description: Samples for the Azure.Messaging.EventHubs client library # Azure.Messaging.EventHubs Samples -The Azure Event Hubs client library offers samples in two forms. Common application scenarios are presented as markdown documents, providing a detailed explanation of context while also demonstrating implementation details with snippets of code. More specialized scenarios are presented as stand-alone projects to both illustrate the deeper end-to-end context and allow exploring interactively. +The Azure Event Hubs client library offers samples in two forms. Common application scenarios are presented as markdown documents, providing a detailed explanation of context while also demonstrating implementation details with snippets of code. More specialized scenarios are presented as stand-alone projects to both illustrate the deeper end-to-end context and allow exploring interactively. The markdown-based samples are ordered by increasing complexity, starting with more basic scenarios to help get started quickly. Though each sample is independent, they will assume an understanding of the content discussed in earlier samples. -Each of the application samples are intended to be self-contained and focused on illustrating one specific scenario. The simplest way to begin is to launch the project for debugging in Visual Studio, or your preferred IDE, and provide the Event Hubs connection information in response to the prompts. Each of these sample applications is accompanied by a dedicated README, offering more specific detail about its hosting needs and operation. +Each of the application samples are intended to be self-contained and focused on illustrating one specific scenario. The simplest way to begin is to launch the project for debugging in Visual Studio, or your preferred IDE, and provide the Event Hubs connection information in response to the prompts. Each of these sample applications is accompanied by a dedicated README, offering more specific detail about its hosting needs and operation. ## Getting started @@ -23,13 +23,13 @@ Each of the application samples are intended to be self-contained and focused on - **Azure Subscription:** To use Azure services, including Azure Event Hubs, you'll need a subscription. If you do not have an existing Azure account, you may sign up for a [free trial](https://azure.microsoft.com/free/dotnet/) or use your [Visual Studio Subscription](https://visualstudio.microsoft.com/subscriptions/) benefits when you [create an account](https://azure.microsoft.com/account). -- **Event Hubs namespace with an Event Hub:** To interact with Azure Event Hubs, you'll also need to have a namespace and Event Hub available. If you are not familiar with creating Azure resources, you may wish to follow the step-by-step guide for [creating an Event Hub using the Azure portal](https://docs.microsoft.com/azure/event-hubs/event-hubs-create). There, you can also find detailed instructions for using the Azure CLI, Azure PowerShell, or Azure Resource Manager (ARM) templates to create an Event Hub. +- **Event Hubs namespace with an Event Hub:** To interact with Azure Event Hubs, you'll also need to have a namespace and Event Hub available. If you are not familiar with creating Azure resources, you may wish to follow the step-by-step guide for [creating an Event Hub using the Azure portal](https://learn.microsoft.com/azure/event-hubs/event-hubs-create). There, you can also find detailed instructions for using the Azure CLI, Azure PowerShell, or Azure Resource Manager (ARM) templates to create an Event Hub. -- **C# 8.0:** The Azure Event Hubs client library makes use of new features that were introduced in C# 8.0. In order to take advantage of the C# 8.0 syntax, it is recommended that you compile using the [.NET Core SDK](https://dotnet.microsoft.com/download) 3.0 or higher with a [language version](https://docs.microsoft.com/dotnet/csharp/language-reference/configure-language-version#override-a-default) of `latest`. +- **C# 8.0:** The Azure Event Hubs client library makes use of new features that were introduced in C# 8.0. In order to take advantage of the C# 8.0 syntax, it is recommended that you compile using the [.NET Core SDK](https://dotnet.microsoft.com/download) 3.0 or higher with a [language version](https://learn.microsoft.com/dotnet/csharp/language-reference/configure-language-version#override-a-default) of `latest`. Visual Studio users wishing to take full advantage of the C# 8.0 syntax will need to use Visual Studio 2019 or later. Visual Studio 2019, including the free Community edition, can be downloaded [here](https://visualstudio.microsoft.com). Users of Visual Studio 2017 can take advantage of the C# 8 syntax by making use of the [Microsoft.Net.Compilers NuGet package](https://www.nuget.org/packages/Microsoft.Net.Compilers/) and setting the language version, though the editing experience may not be ideal. - You can still use the library with previous C# language versions, but will need to manage asynchronous enumerable and asynchronous disposable members manually rather than benefiting from the new syntax. You may still target any framework version supported by your .NET Core SDK, including earlier versions of .NET Core or the .NET framework. For more information, see: [how to specify target frameworks](https://docs.microsoft.com/dotnet/standard/frameworks#how-to-specify-target-frameworks). + You can still use the library with previous C# language versions, but will need to manage asynchronous enumerable and asynchronous disposable members manually rather than benefiting from the new syntax. You may still target any framework version supported by your .NET Core SDK, including earlier versions of .NET Core or the .NET framework. For more information, see: [how to specify target frameworks](https://learn.microsoft.com/dotnet/standard/frameworks#how-to-specify-target-frameworks). To quickly create a basic set of Event Hubs resources in Azure and to receive a connection string for them, you can deploy our sample template by clicking: @@ -45,44 +45,44 @@ dotnet add package Azure.Messaging.EventHubs ### Authenticate the client -For the Event Hubs client library to interact with an Event Hub, it will need to understand how to connect and authorize with it. The easiest means for doing so is to use a connection string, which is created automatically when creating an Event Hubs namespace. If you aren't familiar with using connection strings with Event Hubs, you may wish to follow the step-by-step guide to [get an Event Hubs connection string](https://docs.microsoft.com/azure/event-hubs/event-hubs-get-connection-string). +For the Event Hubs client library to interact with an Event Hub, it will need to understand how to connect and authorize with it. The easiest means for doing so is to use a connection string, which is created automatically when creating an Event Hubs namespace. If you aren't familiar with using connection strings with Event Hubs, you may wish to follow the step-by-step guide to [get an Event Hubs connection string](https://learn.microsoft.com/azure/event-hubs/event-hubs-get-connection-string). ## Common samples -- [Hello world](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/eventhub/Azure.Messaging.EventHubs/samples/Sample01_HelloWorld.md) - An introduction to Event Hubs, illustrating the basic flow of events through an Event Hub, with the goal of quickly allowing you to view events being published and read from the Event Hubs service. - -- [Event Hubs Clients](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/eventhub/Azure.Messaging.EventHubs/samples/Sample02_EventHubsClients.md) - An overview of the Event Hubs clients, detailing the available client types, the scenarios they serve, and demonstrating options for customizing their configuration, such as specifying a proxy. - -- [Event Hubs Metadata](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/eventhub/Azure.Messaging.EventHubs/samples/Sample03_EventHubMetadata.md) - A discussion of the metadata available for an Event Hub instance and demonstration of how to query and inspect the information. - -- [Publishing Events](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/eventhub/Azure.Messaging.EventHubs/samples/Sample04_PublishingEvents.md) - A deep dive into publishing events using the Event Hubs client library, detailing the different options available and illustrating common scenarios. - -- [Reading Events](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/eventhub/Azure.Messaging.EventHubs/samples/Sample05_ReadingEvents.md) - A deep dive into reading events using the Event Hubs client library, detailing the different options available and illustrating common scenarios. - -- [Identity and Shared Access Credentials](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/eventhub/Azure.Messaging.EventHubs/samples/Sample06_IdentityAndSharedAccessCredentials.md) - A discussion of the different types of authorization supported, focusing on identity-based credentials for Azure Active Directory and use the of shared access signatures and keys. - -- [Earlier Language Versions](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/eventhub/Azure.Messaging.EventHubs/samples/Sample07_EarlierLanguageVersions.md) +- [Hello world](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/eventhub/Azure.Messaging.EventHubs/samples/Sample01_HelloWorld.md) + An introduction to Event Hubs, illustrating the basic flow of events through an Event Hub, with the goal of quickly allowing you to view events being published and read from the Event Hubs service. + +- [Event Hubs Clients](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/eventhub/Azure.Messaging.EventHubs/samples/Sample02_EventHubsClients.md) + An overview of the Event Hubs clients, detailing the available client types, the scenarios they serve, and demonstrating options for customizing their configuration, such as specifying a proxy. + +- [Event Hubs Metadata](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/eventhub/Azure.Messaging.EventHubs/samples/Sample03_EventHubMetadata.md) + A discussion of the metadata available for an Event Hub instance and demonstration of how to query and inspect the information. + +- [Publishing Events](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/eventhub/Azure.Messaging.EventHubs/samples/Sample04_PublishingEvents.md) + A deep dive into publishing events using the Event Hubs client library, detailing the different options available and illustrating common scenarios. + +- [Reading Events](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/eventhub/Azure.Messaging.EventHubs/samples/Sample05_ReadingEvents.md) + A deep dive into reading events using the Event Hubs client library, detailing the different options available and illustrating common scenarios. + +- [Identity and Shared Access Credentials](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/eventhub/Azure.Messaging.EventHubs/samples/Sample06_IdentityAndSharedAccessCredentials.md) + A discussion of the different types of authorization supported, focusing on identity-based credentials for Azure Active Directory and use the of shared access signatures and keys. + +- [Earlier Language Versions](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/eventhub/Azure.Messaging.EventHubs/samples/Sample07_EarlierLanguageVersions.md) A demonstration of how to interact with the client library using earlier versions of C#, where newer syntax for asynchronous enumeration and disposal are not available. -- [Building a Custom Event Processor using EventProcessor<TPartition>](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/eventhub/Azure.Messaging.EventHubs/samples/Sample08_CustomEventProcessor.md) +- [Building a Custom Event Processor using EventProcessor<TPartition>](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/eventhub/Azure.Messaging.EventHubs/samples/Sample08_CustomEventProcessor.md) An introduction to the `EventProcessor` base class which is used when building advanced processors which need full control over state management. -- [Observable Event Data Batch](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/eventhub/Azure.Messaging.EventHubs/samples/Sample09_ObservableEventBatch.md) +- [Observable Event Data Batch](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/eventhub/Azure.Messaging.EventHubs/samples/Sample09_ObservableEventBatch.md) A demonstration of how to write an `ObservableEventDataBatch` class that wraps an `EventDataBatch` in order to allow an application to read events that have been added to a batch. -- [Capturing Event Hubs logs using AzureEventSourceListener class](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/eventhub/Azure.Messaging.EventHubs/samples/Sample10_AzureEventSourceListener.md) +- [Capturing Event Hubs logs using AzureEventSourceListener class](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/eventhub/Azure.Messaging.EventHubs/samples/Sample10_AzureEventSourceListener.md) A demonstration of how to use the [`AzureEventSourceListener`](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/samples/Diagnostics.md#logging) from the `Azure.Core` package to capture logs emitted by the Event Hubs client library. - -- [Mocking Client Types](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/eventhub/Azure.Messaging.EventHubs/samples/Sample11_MockingClientTypes.md) + +- [Mocking Client Types](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/eventhub/Azure.Messaging.EventHubs/samples/Sample11_MockingClientTypes.md) A demonstration of how to mock the types in the Event Hubs client library, focusing on common application scenarios. -## Contributing +## Contributing This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com. diff --git a/sdk/eventhub/Azure.Messaging.EventHubs/samples/Sample01_HelloWorld.md b/sdk/eventhub/Azure.Messaging.EventHubs/samples/Sample01_HelloWorld.md index 56f67e85c771..150f71450953 100644 --- a/sdk/eventhub/Azure.Messaging.EventHubs/samples/Sample01_HelloWorld.md +++ b/sdk/eventhub/Azure.Messaging.EventHubs/samples/Sample01_HelloWorld.md @@ -15,9 +15,11 @@ To begin, please ensure that you're familiar with the items discussed in the [Ge To interact with Event Hubs, a client is needed for each area of functionality - such as publishing and reading of events. All clients are scoped to a single Event Hub instance under an Event Hubs namespace, and clients that read events are also scoped to a consumer group. For this example, we'll configure our clients using the set of information that follows. ```C# Snippet:EventHubs_SamplesCommon_ConsumerBasicConfig -var connectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; +var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; var consumerGroup = EventHubConsumerClient.DefaultConsumerGroupName; + +var credential = new DefaultAzureCredential(); ``` Each of the Event Hubs client types are safe to cache and use for the lifetime of the application, which is best practice when the application publishes or reads events regularly or semi-regularly. The clients hold responsibility for efficient resource management, working to keep resource usage low during periods of inactivity and manage health during periods of higher use. Calling either the `CloseAsync` or `DisposeAsync` method on a client as the application is shutting down will ensure that network resources and other unmanaged objects are properly cleaned up. @@ -29,7 +31,7 @@ var consumer = new EventHubConsumerClient(consumerGroup, connectionString, event ## Publish events -To publish events, we will need the `EventHubsProducerClient` that was created. Because this is the only area of our sample that will be publishing events, we will close the client once publishing has completed. In the majority of real-world scenarios, closing the producer when the application exits is often the preferred pattern. +To publish events, we will need the `EventHubsProducerClient` that was created. Because this is the only area of our sample that will be publishing events, we will close the client once publishing has completed. In the majority of real-world scenarios, closing the producer when the application exits is often the preferred pattern. So that we have something to read, our example will publish a full batch of events. The `EventHubDataBatch` exists to ensure that a set of events can safely be published without exceeding the size allowed by the Event Hub. The `EventDataBatch` queries the service to understand the maximum size and is responsible for accurately measuring each event as it is added to the batch. When its `TryAdd` method returns `false`, the event is too large to fit into the batch. @@ -80,11 +82,11 @@ finally Now that the events have been published, we'll read back all events from the Event Hub using the `EventHubConsumerClient` that was created. It's important to note that because events are not removed when reading, if you're using an existing Event Hub, you are likely to see events that had been previously published as well as those from the batch that we just sent. -An Event Hub consumer is associated with a specific Event Hub and [consumer group](https://docs.microsoft.com/azure/event-hubs/event-hubs-features#consumer-groups). Conceptually, the consumer group is a label that identifies one or more event consumers as a set. Often, consumer groups are named after the responsibility of the consumer in an application, such as "Telemetry" or "OrderProcessing". When an Event Hub is created, a default consumer group is created for it, named "$Default." The default group is what we'll be using for illustration. +An Event Hub consumer is associated with a specific Event Hub and [consumer group](https://learn.microsoft.com/azure/event-hubs/event-hubs-features#consumer-groups). Conceptually, the consumer group is a label that identifies one or more event consumers as a set. Often, consumer groups are named after the responsibility of the consumer in an application, such as "Telemetry" or "OrderProcessing". When an Event Hub is created, a default consumer group is created for it, named "$Default." The default group is what we'll be using for illustration. Each consumer has a unique view of the events in a partition that it reads from, which means that events are available to all consumers and are not removed from the partition when read. This allows consumers to read and process events from the Event Hub at different speeds without interfering with one another. -When events are published, they will continue to exist in the Event Hub and be available for consuming until they reach an age where they are older than the [retention period](https://docs.microsoft.com//azure/event-hubs/event-hubs-faq#what-is-the-maximum-retention-period-for-events). Once removed, the events are no longer available to be read and cannot be recovered. Though the Event Hubs service is free to remove events older than the retention period, it does not do so deterministically; there is no guarantee of when events will be removed. +When events are published, they will continue to exist in the Event Hub and be available for consuming until they reach an age where they are older than the [retention period](https://learn.microsoft.com//azure/event-hubs/event-hubs-faq#what-is-the-maximum-retention-period-for-events). Once removed, the events are no longer available to be read and cannot be recovered. Though the Event Hubs service is free to remove events older than the retention period, it does not do so deterministically; there is no guarantee of when events will be removed. ```C# Snippet:EventHubs_Sample01_ReadEvents try @@ -125,6 +127,6 @@ finally } ``` -This example makes use of the `ReadEvents` method of the `EventHubConsumerClient`, which allows it to see events from all [partitions](https://docs.microsoft.com/azure/event-hubs/event-hubs-features#partitions) of an Event Hub. While this is convenient to use for exploration, we strongly recommend not using it for production scenarios. `ReadEvents` does not guarantee fairness amongst the partitions during iteration; each of the partitions compete to publish events to be read. Depending on how service communication takes place, there may be a clustering of events per partition and a noticeable bias for a given partition or subset of partitions. +This example makes use of the `ReadEvents` method of the `EventHubConsumerClient`, which allows it to see events from all [partitions](https://learn.microsoft.com/azure/event-hubs/event-hubs-features#partitions) of an Event Hub. While this is convenient to use for exploration, we strongly recommend not using it for production scenarios. `ReadEvents` does not guarantee fairness amongst the partitions during iteration; each of the partitions compete to publish events to be read. Depending on how service communication takes place, there may be a clustering of events per partition and a noticeable bias for a given partition or subset of partitions. -To read from all partitions in a production application, we recommend preferring the [EventProcessorClient](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/eventhub/Azure.Messaging.EventHubs.Processor/samples) or a custom [EventProcessor](https://docs.microsoft.com/dotnet/api/azure.messaging.eventhubs.primitives.eventprocessor-1?view=azure-dotnet) implementation. \ No newline at end of file +To read from all partitions in a production application, we recommend preferring the [EventProcessorClient](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/eventhub/Azure.Messaging.EventHubs.Processor/samples) or a custom [EventProcessor](https://learn.microsoft.com/dotnet/api/azure.messaging.eventhubs.primitives.eventprocessor-1?view=azure-dotnet) implementation. diff --git a/sdk/eventhub/Azure.Messaging.EventHubs/samples/Sample02_EventHubsClients.md b/sdk/eventhub/Azure.Messaging.EventHubs/samples/Sample02_EventHubsClients.md index f5f70c1d665f..0727e9e67882 100644 --- a/sdk/eventhub/Azure.Messaging.EventHubs/samples/Sample02_EventHubsClients.md +++ b/sdk/eventhub/Azure.Messaging.EventHubs/samples/Sample02_EventHubsClients.md @@ -20,25 +20,25 @@ This sample details the client types available for the Event Hubs client library ## Hierarchy -Because each client provides the developer experience for an area of Event Hubs functionality, to provide the best experience, it is important that it offers an API focused on a concrete set of scenarios. Because applications have different needs, we wanted to offer support for more specialized scenarios without introducing additional complexity to the more common scenarios. To achieve this, the client hierarchy was designed to align with two general categories, mainstream and specialized. +Because each client provides the developer experience for an area of Event Hubs functionality, to provide the best experience, it is important that it offers an API focused on a concrete set of scenarios. Because applications have different needs, we wanted to offer support for more specialized scenarios without introducing additional complexity to the more common scenarios. To achieve this, the client hierarchy was designed to align with two general categories, mainstream and specialized. The mainstream set of clients provides an approachable onboarding experience for those new to Event Hubs with a clear step-up path to production use for the most common application scenarios. The specialized set of clients is focused on high-throughput and allowing developers to assert a higher degree of control, at the cost of more complexity in their use. This section will briefly introduce the clients in both categories, though samples will continue to focus heavily on the mainstream clients. **Mainstream** -- The [EventHubBufferedProducerClient](https://docs.microsoft.com/dotnet/api/azure.messaging.eventhubs.producer?view=azure-dotnet) publishes events using a deferred model where events are collected into a buffer and the producer has responsibility for implicitly batching and sending them. More on the design and philosophy behind this type can be found in its [design document](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/eventhub/Azure.Messaging.EventHubs/design/proposal-event-hub-buffered-producer.md). +- The [EventHubBufferedProducerClient](https://learn.microsoft.com/dotnet/api/azure.messaging.eventhubs.producer?view=azure-dotnet) publishes events using a deferred model where events are collected into a buffer and the producer has responsibility for implicitly batching and sending them. More on the design and philosophy behind this type can be found in its [design document](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/eventhub/Azure.Messaging.EventHubs/design/proposal-event-hub-buffered-producer.md). -- The [EventHubProducerClient](https://docs.microsoft.com/dotnet/api/azure.messaging.eventhubs.producer.eventhubproducerclient?view=azure-dotnet) publishes events with explicit model where callers have responsibility for management of batches and controlling when events are sent. - -- The [EventHubConsumerClient](https://docs.microsoft.com/dotnet/api/azure.messaging.eventhubs.consumer.eventhubconsumerclient?view=azure-dotnet) supports reading events from a single partition and also offers an easy way to familiarize yourself with Event Hubs by reading from all partitions without the rigor and complexity that you would need in a production application. For reading events from all partitions in a production scenario, we strongly recommend using the [EventProcessorClient](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/eventhub/Azure.Messaging.EventHubs.Processor/samples) from the [Azure.Messaging.EventHubs.Processor](https://www.nuget.org/packages/Azure.Messaging.EventHubs.Processor) package over the `EventHubConsumerClient`. +- The [EventHubProducerClient](https://learn.microsoft.com/dotnet/api/azure.messaging.eventhubs.producer.eventhubproducerclient?view=azure-dotnet) publishes events with explicit model where callers have responsibility for management of batches and controlling when events are sent. + +- The [EventHubConsumerClient](https://learn.microsoft.com/dotnet/api/azure.messaging.eventhubs.consumer.eventhubconsumerclient?view=azure-dotnet) supports reading events from a single partition and also offers an easy way to familiarize yourself with Event Hubs by reading from all partitions without the rigor and complexity that you would need in a production application. For reading events from all partitions in a production scenario, we strongly recommend using the [EventProcessorClient](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/eventhub/Azure.Messaging.EventHubs.Processor/samples) from the [Azure.Messaging.EventHubs.Processor](https://www.nuget.org/packages/Azure.Messaging.EventHubs.Processor) package over the `EventHubConsumerClient`. **Specialized** -- The [PartitionReceiver](https://docs.microsoft.com/dotnet/api/azure.messaging.eventhubs.primitives.partitionreceiver?view=azure-dotnet) is responsible for reading events from a specific partition of an Event Hub, with a greater level of control over communication with the Event Hubs service than is offered by other event consumers. More detail on the design and philosophy for the `PartitionReceiver` can be found in its [design document](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/eventhub/Azure.Messaging.EventHubs/design/proposal-partition-receiver.md). +- The [PartitionReceiver](https://learn.microsoft.com/dotnet/api/azure.messaging.eventhubs.primitives.partitionreceiver?view=azure-dotnet) is responsible for reading events from a specific partition of an Event Hub, with a greater level of control over communication with the Event Hubs service than is offered by other event consumers. More detail on the design and philosophy for the `PartitionReceiver` can be found in its [design document](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/eventhub/Azure.Messaging.EventHubs/design/proposal-partition-receiver.md). -- The [PluggableCheckpointStoreEventProcessor<TPartition>](https://docs.microsoft.com/dotnet/api/azure.messaging.eventhubs.primitives.PluggableCheckpointStoreEventProcessor-1?view=azure-dotnet) provides a base for creating a custom processor for reading and processing events from all partitions of an Event Hub, using the provided checkpoint store for state persistence. It fills a role similar to the [EventProcessorClient](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/eventhub/Azure.Messaging.EventHubs.Processor/samples) from the [Azure.Messaging.EventHubs.Processor](https://www.nuget.org/packages/Azure.Messaging.EventHubs.Processor) package, with cooperative load balancing and resiliency as its core features. However, `PluggableCheckpointStoreEventProcessor` also offers native batch processing, a greater level of control over communication with the Event Hubs service, and a less opinionated API. The caveat is that this comes with additional complexity and exists as an abstract base, which needs to be extended. +- The [PluggableCheckpointStoreEventProcessor<TPartition>](https://learn.microsoft.com/dotnet/api/azure.messaging.eventhubs.primitives.PluggableCheckpointStoreEventProcessor-1?view=azure-dotnet) provides a base for creating a custom processor for reading and processing events from all partitions of an Event Hub, using the provided checkpoint store for state persistence. It fills a role similar to the [EventProcessorClient](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/eventhub/Azure.Messaging.EventHubs.Processor/samples) from the [Azure.Messaging.EventHubs.Processor](https://www.nuget.org/packages/Azure.Messaging.EventHubs.Processor) package, with cooperative load balancing and resiliency as its core features. However, `PluggableCheckpointStoreEventProcessor` also offers native batch processing, a greater level of control over communication with the Event Hubs service, and a less opinionated API. The caveat is that this comes with additional complexity and exists as an abstract base, which needs to be extended. -- The [EventProcessor<TPartition>](https://docs.microsoft.com/dotnet/api/azure.messaging.eventhubs.primitives.eventprocessor-1?view=azure-dotnet) is our lowest-level base for creating a custom processor allowing the greatest degree of customizability. It fills a role similar to the [PluggableCheckpointStoreEventProcessor<TPartition>](https://docs.microsoft.com/dotnet/api/azure.messaging.eventhubs.primitives.PluggableCheckpointStoreEventProcessor-1?view=azure-dotnet), with cooperative load balancing, resiliency, and batch processing as its core features. However, `EventProcessor` also provides the ability to customize checkpoint storage, including using different stores for ownership and checkpoint data. `EventProcessor` exists as an abstract base, which needs to be extended. More on the design and philosophy behind this type can be found in its [design document](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/eventhub/Azure.Messaging.EventHubs/design/proposal-event-processor%7BT%7D.md). +- The [EventProcessor<TPartition>](https://learn.microsoft.com/dotnet/api/azure.messaging.eventhubs.primitives.eventprocessor-1?view=azure-dotnet) is our lowest-level base for creating a custom processor allowing the greatest degree of customizability. It fills a role similar to the [PluggableCheckpointStoreEventProcessor<TPartition>](https://learn.microsoft.com/dotnet/api/azure.messaging.eventhubs.primitives.PluggableCheckpointStoreEventProcessor-1?view=azure-dotnet), with cooperative load balancing, resiliency, and batch processing as its core features. However, `EventProcessor` also provides the ability to customize checkpoint storage, including using different stores for ownership and checkpoint data. `EventProcessor` exists as an abstract base, which needs to be extended. More on the design and philosophy behind this type can be found in its [design document](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/eventhub/Azure.Messaging.EventHubs/design/proposal-event-processor%7BT%7D.md). ## Lifetime @@ -48,15 +48,16 @@ Each of the Event Hubs client types is safe to cache and use as a singleton for Each of the Event Hubs client types in the library supports a set of options to configure its behavior. In addition to influencing a client's area of functionality, the options also support configuration common across all areas. These common options are focused on communication with the Event Hubs service and core functionality; they appear as members of the client options. -### Using web sockets +### Using web sockets Communication with the Event Hubs service can be configured by adjusting the `EventHubConfigurationOptions` that are exposed by the `ConnectionOptions` member of a client options type. By default, the Event Hubs clients communicate using the AMQP protocol over TCP. Some application host environments prefer to restrict raw TCP socket use, especially in many enterprise or VPN scenarios. In these environments, or when a proxy is in use, communication with the Event Hubs service can make use of web sockets by configuring the client's connection settings. For illustration, the `EventHubProducerClientOptions` are demonstrated, but the concept and form are common across the client options types. ```C# Snippet:EventHubs_Sample02_ProducerTransportFullConnectionOptions -var connectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; +var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; +var credential = new DefaultAzureCredential(); var producerOptions = new EventHubProducerClientOptions { @@ -67,34 +68,38 @@ var producerOptions = new EventHubProducerClientOptions }; var producer = new EventHubProducerClient( - connectionString, + fullyQualifiedNamespace, eventHubName, + credential, producerOptions); ``` The connection options are populated by default; you may set just the desired properties rather than creating a new instance, if you prefer. ```C# Snippet:EventHubs_Sample02_ProducerTransportProperty -var connectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; +var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; +var credential = new DefaultAzureCredential(); var producerOptions = new EventHubProducerClientOptions(); producerOptions.ConnectionOptions.TransportType = EventHubsTransportType.AmqpWebSockets; var producer = new EventHubProducerClient( - connectionString, + fullyQualifiedNamespace, eventHubName, + credential, producerOptions); ``` ### Setting a custom proxy -A common scenario for adjusting the connection options is configuring a proxy. Proxy support takes the form of the [IWebProxy](https://docs.microsoft.com/dotnet/api/system.net.iwebproxy?view=netcore-3.1) interface, of which [WebProxy](https://docs.microsoft.com/dotnet/api/system.net.webproxy?view=netcore-3.1) is the most common default implementation. Event Hubs supports a proxy only when using `AmqpWebSockets` as the transport type. +A common scenario for adjusting the connection options is configuring a proxy. Proxy support takes the form of the [IWebProxy](https://learn.microsoft.com/dotnet/api/system.net.iwebproxy?view=netcore-3.1) interface, of which [WebProxy](https://learn.microsoft.com/dotnet/api/system.net.webproxy?view=netcore-3.1) is the most common default implementation. Event Hubs supports a proxy only when using `AmqpWebSockets` as the transport type. For illustration, the `EventHubProducerClientOptions` are demonstrated, but the concept and form are common across the client options types. ```C# Snippet:EventHubs_Sample02_ProducerProxyFullConnectionOptions -var connectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; +var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; +var credential = new DefaultAzureCredential(); var producerOptions = new EventHubProducerClientOptions { @@ -106,30 +111,33 @@ var producerOptions = new EventHubProducerClientOptions }; var producer = new EventHubProducerClient( - connectionString, + fullyQualifiedNamespace, eventHubName, + credential, producerOptions); ``` The connection options are populated by default; you may set just the desired properties rather than creating a new instance, if you prefer. ```C# Snippet:EventHubs_Sample02_ProducerProxyProperty -var connectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; +var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; +var credential = new DefaultAzureCredential(); var producerOptions = new EventHubProducerClientOptions(); producerOptions.ConnectionOptions.TransportType = EventHubsTransportType.AmqpWebSockets; producerOptions.ConnectionOptions.Proxy = new WebProxy("https://proxyserver:80", true); var producer = new EventHubProducerClient( - connectionString, + fullyQualifiedNamespace, eventHubName, + credential, producerOptions); ``` ### Using the default system proxy -To use the default proxy for your environment, the recommended approach is to make use of [HttpClient.DefaultProxy](https://docs.microsoft.com/dotnet/api/system.net.http.httpclient.defaultproxy?view=netcore-3.1), which will attempt to detect proxy settings from the ambient environment in a manner consistent with expectations for the target platform. Unfortunately, this member was added for .NET Core 3.1 and is not supported for earlier target frameworks. +To use the default proxy for your environment, the recommended approach is to make use of [HttpClient.DefaultProxy](https://learn.microsoft.com/dotnet/api/system.net.http.httpclient.defaultproxy?view=netcore-3.1), which will attempt to detect proxy settings from the ambient environment in a manner consistent with expectations for the target platform. Unfortunately, this member was added for .NET Core 3.1 and is not supported for earlier target frameworks. ```C# Snippet:EventHubs_Sample02_ConnectionOptionsDefaultProxy var options = new EventHubConnectionOptions @@ -146,27 +154,30 @@ Connections to the Azure Event Hubs service are made using the fully qualified n Some environments using unconventional proxy configurations or with certain configurations of an Express Route circuit require a custom address be used for proper routing, leaving are unable to connect from their on-premises network to the Event Hubs service using the assigned endpoint address. To support these scenarios, a custom endpoint address may be specified as part of the connection options. This custom address will take precedence for establishing the connection to the Event Hubs service. ```C# Snippet:EventHubs_Sample02_ConnectionOptionsCustomEndpoint -var connectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; +var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; +var credential = new DefaultAzureCredential(); var producerOptions = new EventHubProducerClientOptions(); producerOptions.ConnectionOptions.CustomEndpointAddress = new Uri("amqps://app-gateway.mycompany.com"); var producer = new EventHubProducerClient( - connectionString, + fullyQualifiedNamespace, eventHubName, + credential, producerOptions); ``` ### Influencing SSL certificate validation -For some environments using a proxy or custom gateway for routing traffic to Event Hubs, a certificate not trusted by the root certificate authorities may be issued. This can often be a self-signed certificate from the gateway or one issued by a company's internal certificate authority. +For some environments using a proxy or custom gateway for routing traffic to Event Hubs, a certificate not trusted by the root certificate authorities may be issued. This can often be a self-signed certificate from the gateway or one issued by a company's internal certificate authority. -By default, these certificates are not trusted by the Event Hubs client library and the connection will be refused. To enable these scenarios, a [RemoteCertificateValidationCallback](https://docs.microsoft.com/dotnet/api/system.net.security.remotecertificatevalidationcallback) can be registered to provide custom validation logic for remote certificates. This allows an application to override the default trust decision and assert responsibility for accepting or rejecting the certificate. +By default, these certificates are not trusted by the Event Hubs client library and the connection will be refused. To enable these scenarios, a [RemoteCertificateValidationCallback](https://learn.microsoft.com/dotnet/api/system.net.security.remotecertificatevalidationcallback) can be registered to provide custom validation logic for remote certificates. This allows an application to override the default trust decision and assert responsibility for accepting or rejecting the certificate. ```C# Snippet:EventHubs_Sample02_RemoteCertificateValidationCallback -var connectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; +var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; +var credential = new DefaultAzureCredential(); static bool ValidateServerCertificate( object sender, @@ -189,8 +200,9 @@ var producerOptions = new EventHubProducerClientOptions(); producerOptions.ConnectionOptions.CertificateValidationCallback = ValidateServerCertificate; var producer = new EventHubProducerClient( - connectionString, + fullyQualifiedNamespace, eventHubName, + credential, producerOptions); ``` @@ -201,8 +213,9 @@ The built-in retry policy offers an implementation for an exponential back-off s The values used as thresholds for the different aspects of these strategies can be configured by adjusting the `EventHubsRetryOptions` that are exposed by the `RetryOptions` member of a client options type. For illustration, the `EventHubConsumerClientOptions` are demonstrated, but the concept and form are common across the client options types. ```C# Snippet:EventHubs_Sample02_ConsumerRetryWithFullOptions -var connectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; +var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; +var credential = new DefaultAzureCredential(); var consumerGroup = EventHubConsumerClient.DefaultConsumerGroupName; var consumerOptions = new EventHubConsumerClientOptions @@ -218,16 +231,18 @@ var consumerOptions = new EventHubConsumerClientOptions var consumer = new EventHubConsumerClient( consumerGroup, - connectionString, + fullyQualifiedNamespace, eventHubName, + credential, consumerOptions); ``` The retry options are populated by default; you may set just the desired properties rather than creating a new instance, if you prefer. ```C# Snippet:EventHubs_Sample02_ConsumerRetryByProperty -var connectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; +var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; +var credential = new DefaultAzureCredential(); var consumerGroup = EventHubConsumerClient.DefaultConsumerGroupName; var consumerOptions = new EventHubConsumerClientOptions(); @@ -236,8 +251,9 @@ consumerOptions.RetryOptions.MaximumRetries = 5; var consumer = new EventHubConsumerClient( consumerGroup, - connectionString, + fullyQualifiedNamespace, eventHubName, + credential, consumerOptions); ``` @@ -288,4 +304,4 @@ var options = new EventHubsRetryOptions { CustomRetryPolicy = new ExampleRetryPolicy() }; -``` \ No newline at end of file +``` diff --git a/sdk/eventhub/Azure.Messaging.EventHubs/samples/Sample03_EventHubMetadata.md b/sdk/eventhub/Azure.Messaging.EventHubs/samples/Sample03_EventHubMetadata.md index 198b62bb51ac..85759f4524b0 100644 --- a/sdk/eventhub/Azure.Messaging.EventHubs/samples/Sample03_EventHubMetadata.md +++ b/sdk/eventhub/Azure.Messaging.EventHubs/samples/Sample03_EventHubMetadata.md @@ -11,7 +11,7 @@ This sample discusses the metadata available for an Event Hub instance and demon # Client types -Querying and inspecting metadata is a common scenario when publishing and reading events. As a result, the core operations are available to the `EventHubProducerClient` and `EventHubConsumerClient`. +Querying and inspecting metadata is a common scenario when publishing and reading events. As a result, the core operations are available to the `EventHubProducerClient` and `EventHubConsumerClient`. Both the `EventHubProducerClient` and `EventHubConsumerClient` are safe to cache and use for the lifetime of an application, which is best practice when the application publishes or reads events regularly or semi-regularly. The clients are responsible for efficient resource management, working to keep resource usage low during periods of inactivity and manage health during periods of higher use. Calling either the `CloseAsync` or `DisposeAsync` method on a client as the application is shutting down will ensure that network resources and other unmanaged objects are properly cleaned up. @@ -20,10 +20,14 @@ Both the `EventHubProducerClient` and `EventHubConsumerClient` are safe to cache Because the Event Hubs clients operate on a specific Event Hub, it is often helpful for them to have knowledge of its context. In particular, it is common for clients to understand the partitions available. The ability to query the Event Hub properties is available using the `EventHubProducerClient` and `EventHubConsumerClient`. For illustration, the `EventHubProducerClient` is demonstrated, but the concept and form are common across both clients. ```C# Snippet:EventHubs_Sample03_InspectHub -var connectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; +var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; +var credential = new DefaultAzureCredential(); -var producer = new EventHubProducerClient(connectionString, eventHubName); +var producer = new EventHubProducerClient( + fullyQualifiedNamespace, + eventHubName, + credential); try { @@ -45,10 +49,14 @@ finally Due to their importance, there is also a shorthand way to query the partitions of an Event Hub. This capability is available using the `EventHubProducerClient` and `EventHubConsumerClient`. For illustration, the `EventHubProducerClient` is demonstrated, but the concept and form are common across both clients. ```C# Snippet:EventHubs_Sample03_QueryPartitions -var connectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; +var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; +var credential = new DefaultAzureCredential(); -var producer = new EventHubProducerClient(connectionString, eventHubName); +var producer = new EventHubProducerClient( + fullyQualifiedNamespace, + eventHubName, + credential); try { @@ -70,11 +78,16 @@ This query is useful for occasionally inspecting partitions, but should not be u For illustration, the `EventHubConsumerClient` is demonstrated, but the concept and form are common across both clients. ```C# Snippet:EventHubs_Sample03_InspectPartition -var connectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; +var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; +var credential = new DefaultAzureCredential(); var consumerGroup = EventHubConsumerClient.DefaultConsumerGroupName; -var consumer = new EventHubConsumerClient(consumerGroup, connectionString, eventHubName); +var consumer = new EventHubConsumerClient( + consumerGroup, + fullyQualifiedNamespace, + eventHubName, + credential); try { @@ -94,4 +107,4 @@ finally { await consumer.CloseAsync(); } -``` \ No newline at end of file +``` diff --git a/sdk/eventhub/Azure.Messaging.EventHubs/samples/Sample04_PublishingEvents.md b/sdk/eventhub/Azure.Messaging.EventHubs/samples/Sample04_PublishingEvents.md index 523c0d66d6f7..94ca65f79971 100644 --- a/sdk/eventhub/Azure.Messaging.EventHubs/samples/Sample04_PublishingEvents.md +++ b/sdk/eventhub/Azure.Messaging.EventHubs/samples/Sample04_PublishingEvents.md @@ -33,11 +33,11 @@ The `EventHubBufferedProducerClient` aims to reduce complexity by owning the res ## Event lifetime -When events are published, they will continue to exist in the Event Hub and be available for consuming until they reach an age where they are older than the [retention period](https://docs.microsoft.com//azure/event-hubs/event-hubs-faq#what-is-the-maximum-retention-period-for-events). After that point in time, the Event Hubs service may chose to remove them from the partition. Once removed, an event is no longer available to be read and cannot be recovered. Though the Event Hubs service is free to remove events older than the retention period, it does not do so deterministically; there is no guarantee of when events will be removed. +When events are published, they will continue to exist in the Event Hub and be available for consuming until they reach an age where they are older than the [retention period](https://learn.microsoft.com//azure/event-hubs/event-hubs-faq#what-is-the-maximum-retention-period-for-events). After that point in time, the Event Hubs service may chose to remove them from the partition. Once removed, an event is no longer available to be read and cannot be recovered. Though the Event Hubs service is free to remove events older than the retention period, it does not do so deterministically; there is no guarantee of when events will be removed. ## Publishing size constraints -There is a limit to the size (in bytes) that can be published in a single operation. To accurately determine the size of an event, it must be measured in the format used by the active protocol in order to properly account for overhead. The size limit is controlled by the Event Hubs service and differs for different types of Event Hub instances. +There is a limit to the size (in bytes) that can be published in a single operation. To accurately determine the size of an event, it must be measured in the format used by the active protocol in order to properly account for overhead. The size limit is controlled by the Event Hubs service and differs for different types of Event Hub instances. Applications using the `EventHubBufferedProducerClient` do not need to track size limitations; the producer will ensure that batches are correctly sized when publishing. @@ -50,10 +50,14 @@ All of the events that belong to an `EventDataBatch` are considered part of a si To create an `EventDataBatch`, the `EventProducerClient` must be used, as the size limit is queried from the Event Hubs service the first time that a batch is created. After the size has been queried once, batch creation will not incur the cost of a service request. The `EventDataBatch` follows a `TryAdd` pattern; if the call returns `true` then the event was accepted into the batch. If not, then the event was unable to fit. To avoid accidentally losing events, it is recommended to check the return value when adding events. ```C# Snippet:EventHubs_Sample04_EventBatch -var connectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; +var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; +var credential = new DefaultAzureCredential(); -var producer = new EventHubProducerClient(connectionString, eventHubName); +var producer = new EventHubProducerClient( + fullyQualifiedNamespace, + eventHubName, + credential); try { @@ -76,7 +80,7 @@ The `EventDataBatch` is scoped to a single publish operation. Once that operati ## Publishing and partitions -Every event that is published is sent to one of the [partitions](https://docs.microsoft.com/azure/architecture/reference-architectures/event-hubs/partitioning-in-event-hubs-and-kafka) of the Event Hub. The application may request publishing to a specific partition, grouped using a partition key, or allow the partition to be chosen automatically. +Every event that is published is sent to one of the [partitions](https://learn.microsoft.com/azure/architecture/reference-architectures/event-hubs/partitioning-in-event-hubs-and-kafka) of the Event Hub. The application may request publishing to a specific partition, grouped using a partition key, or allow the partition to be chosen automatically. When using the `EventHubProducerClient`, each batch must choose the partition assignment strategy at the time it is created, and that strategy is applied to all events in the batch. The `EventHubBufferedProducerClient` allows the partition assignment strategy to be chosen for each individual event that is enqueued, and the producer will ensure that batches are constructed with the proper strategy. @@ -89,10 +93,14 @@ Allowing automatic assignment to partitions is recommended when publishing needs When using the `EventHubBufferedProducerClient`, events enqueued with no options specified will be automatically routed. Because the producer manages publishing, there is no explicit call. When the producer is closed, it will ensure that any remaining enqueued events have been published. All of your event data will be published to one of the Event Hub partitions, though there may be a slight delay until it is available to be read. ```C# Snippet:EventHubs_Sample04_AutomaticRoutingBuffered -var connectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; +var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; +var credential = new DefaultAzureCredential(); -var producer = new EventHubBufferedProducerClient(connectionString, eventHubName); +var producer = new EventHubBufferedProducerClient( + fullyQualifiedNamespace, + eventHubName, + credential); // The failure handler is required and invoked after all allowable // retries were applied. @@ -133,10 +141,14 @@ finally When using the `EventHubProducerClient` a batch is first created and then published. The `SendAsync` call will receive an acknowledgment from the Event Hubs service; so long as no exception is thrown, your application can consider publishing successful. All of your event data will be published to one of the Event Hub partitions, though there may be a slight delay until it is available to be read. ```C# Snippet:EventHubs_Sample04_AutomaticRouting -var connectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; +var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; +var credential = new DefaultAzureCredential(); -var producer = new EventHubProducerClient(connectionString, eventHubName); +var producer = new EventHubProducerClient( + fullyQualifiedNamespace, + eventHubName, + credential); try { @@ -163,7 +175,7 @@ finally ## Publishing events with a partition key When publishing events, it may be desirable to request that the Event Hubs service keep the different event batches together on the same partition. This can be accomplished by setting a partition key when creating the batch. The partition key is NOT the identifier of a specific partition. Rather, it is an arbitrary piece of string data that Event Hubs uses as the basis to compute a hash value. Event Hubs will associate the hash value with a specific partition, ensuring that any events published with the same partition key are routed to the same partition. - + There is no means of predicting which partition will be associated with a given partition key; we can only be assured that it will be a consistent choice of partition. If you have a need to understand which exact partition an event is published to, you will need to specify the partition directly rather than using a partition key. ### Event Hub Buffered Producer Client @@ -173,10 +185,14 @@ When using the `EventHubBufferedProducerClient`, events are enqueued with a part **Note:** It is important to be aware that if you are using a partition key, you may not also specify a partition identifier; they are mutually exclusive. ```C# Snippet:EventHubs_Sample04_PartitionKeyBuffered -var connectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; +var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; +var credential = new DefaultAzureCredential(); -var producer = new EventHubBufferedProducerClient(connectionString, eventHubName); +var producer = new EventHubBufferedProducerClient( + fullyQualifiedNamespace, + eventHubName, + credential); // The failure handler is required and invoked after all allowable // retries were applied. @@ -224,10 +240,14 @@ When using the `EventHubProducerClient` a batch is first created with a partitio **Note:** It is important to be aware that if you are using a partition key, you may not also specify a partition identifier; they are mutually exclusive. ```C# Snippet:EventHubs_Sample04_PartitionKey -var connectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; +var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; +var credential = new DefaultAzureCredential(); -var producer = new EventHubProducerClient(connectionString, eventHubName); +var producer = new EventHubProducerClient( + fullyQualifiedNamespace, + eventHubName, + credential); try { @@ -258,7 +278,7 @@ finally ## Publishing events to a specific partition -When publishing, it may be desirable to request that the Event Hubs service place a batch on a specific partition, for organization and processing. For example, you may have designated one partition of your Event Hub as being responsible for all of your telemetry-related events. This can be accomplished by setting the identifier of the desired partition when creating the batch. +When publishing, it may be desirable to request that the Event Hubs service place a batch on a specific partition, for organization and processing. For example, you may have designated one partition of your Event Hub as being responsible for all of your telemetry-related events. This can be accomplished by setting the identifier of the desired partition when creating the batch. ### Event Hub Buffered Producer Client @@ -267,10 +287,14 @@ When using the `EventHubBufferedProducerClient`, events are enqueued with a part **Note:** It is important to be aware that if you are using a partition key, you may not also specify a partition identifier; they are mutually exclusive. ```C# Snippet:EventHubs_Sample04_PartitionIdBuffered -var connectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; +var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; +var credential = new DefaultAzureCredential(); -var producer = new EventHubBufferedProducerClient(connectionString, eventHubName); +var producer = new EventHubBufferedProducerClient( + fullyQualifiedNamespace, + eventHubName, + credential); // The failure handler is required and invoked after all allowable // retries were applied. @@ -320,10 +344,14 @@ When using the `EventHubProducerClient` a batch is first created with a partitio **Note:** It is important to be aware that if you are using a partition identifier, you may not also specify a partition key; they are mutually exclusive. ```C# Snippet:EventHubs_Sample04_PartitionId -var connectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; +var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; +var credential = new DefaultAzureCredential(); -var producer = new EventHubProducerClient(connectionString, eventHubName); +var producer = new EventHubProducerClient( + fullyQualifiedNamespace, + eventHubName, + credential); try { @@ -361,10 +389,14 @@ Because an event consists mainly of an opaque set of bytes, it may be difficult This metadata is not used by, or in any way meaningful to, the Event Hubs service; it exists only for coordination between event publishers and consumers. ```C# Snippet:EventHubs_Sample04_CustomMetadata -var connectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; +var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; +var credential = new DefaultAzureCredential(); -var producer = new EventHubBufferedProducerClient(connectionString, eventHubName); +var producer = new EventHubBufferedProducerClient( + fullyQualifiedNamespace, + eventHubName, + credential); // The failure handler is required and invoked after all allowable // retries were applied. @@ -426,15 +458,15 @@ It is also important that you guard against exceptions in your handler code; it ## Tuning throughput for buffered publishing -To ensure consistent performance and throughput, it is common for applications to make decisions around the pattern of publishing that they use - adjusting the frequency that batches are sent and how many operations take place concurrently. Because the `EventHubBufferedProducerClient` manages batches and publishing in the background, your application cannot directly control these aspects. +To ensure consistent performance and throughput, it is common for applications to make decisions around the pattern of publishing that they use - adjusting the frequency that batches are sent and how many operations take place concurrently. Because the `EventHubBufferedProducerClient` manages batches and publishing in the background, your application cannot directly control these aspects. Because the handlers are awaited, it is strongly advised that you *not* invoke `CloseAsync` or `DisposeAsync` from the handlers; doing so is likely to result in a deadlock scenario. It is safe to attempt to resend events by adding them to the back of the buffer by calling `EnqueueEventAsync` or `EnqueueEventsAsync` -By default, the `EventHubBufferedProducerClient` uses a set of values that will perform well for general-case scenarios, balancing consistent performance with ensuring that the order of events is maintained. In the case where your application has different needs, it can provide a set of options when constructing the producer that will influence publishing behavior and help ensure that it is optimal for your specific scenarios. +By default, the `EventHubBufferedProducerClient` uses a set of values that will perform well for general-case scenarios, balancing consistent performance with ensuring that the order of events is maintained. In the case where your application has different needs, it can provide a set of options when constructing the producer that will influence publishing behavior and help ensure that it is optimal for your specific scenarios. The performance-related settings are: -- **MaximumWaitTime**: This is the longest that the producer will wait for a batch to be full before publishing. For applications that publish frequently, waiting longer for a full batch may improve efficiency. For applications that publish infrequently or sporadically, a lower value will ensure that events are not held in buffer waiting. The default wait time is 1 second. +- **MaximumWaitTime**: This is the longest that the producer will wait for a batch to be full before publishing. For applications that publish frequently, waiting longer for a full batch may improve efficiency. For applications that publish infrequently or sporadically, a lower value will ensure that events are not held in buffer waiting. The default wait time is 1 second. - **MaximumConcurrentSends**: The number of concurrent `SendAsync` calls that the producer will make. Each call is a network request that publishes a single batch. A higher degree of concurrency can improve throughput for applications that use an Event Hub with a large number of partitions. Because the producer is highly asynchronous and is running background tasks, we recommend being careful when selecting a value to avoid creating contention in the thread pool. Testing under normal load is essential. The default concurrency is equal to the number of cores in the host environment. @@ -442,13 +474,14 @@ The performance-related settings are: - **MaximumEventBufferLengthPerPartition**: The maximum number of events that can be buffered for each individual partition. This is intended to ensure that your application does not run out of memory if buffering happens more frequently than events can be published. When this limit is reached, your application can continue to call `EnqueueEventAsync` or `EnqueueEventsAsync` without an error; the call will block until space is available. For applications that publish a high number of smaller-sized events, increasing this limit may help to improve throughput. For scenarios where the application is buffering large events and needs to control memory use, lowering this limit may be helpful. The default buffer length is 1500 events per partition. -- **EnableIdempotentRetries**: Indicates whether or not events should be published using idempotent semantics for retries. If enabled, retries during publishing will attempt to avoid duplication with a small cost to overall performance and throughput. +- **EnableIdempotentRetries**: Indicates whether or not events should be published using idempotent semantics for retries. If enabled, retries during publishing will attempt to avoid duplication with a small cost to overall performance and throughput. **_NOTE:_** Enabling idempotent retries does not guarantee exactly-once semantics. The Event Hubs at-least-once delivery contract still applies; duplicates are still possible but the chance of them occurring is much lower when idempotent retries are enabled. ```C# Snippet:EventHubs_Sample04_BufferedConfiguration -var connectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; +var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; +var credential = new DefaultAzureCredential(); var options = new EventHubBufferedProducerClientOptions { @@ -459,7 +492,11 @@ var options = new EventHubBufferedProducerClientOptions EnableIdempotentRetries = true }; -var producer = new EventHubBufferedProducerClient(connectionString, eventHubName, options); +var producer = new EventHubBufferedProducerClient( + fullyQualifiedNamespace, + eventHubName, + credential, + options); // The failure handler is required and invoked after all allowable // retries were applied. @@ -497,17 +534,22 @@ finally ## Creating and publishing multiple batches -Because an `EventDataBatch` is scoped to a single publish operation, it is often necessary to more than a single batch to publish events. This can take many forms, with varying levels of sophistication and complexity, depending on an application's needs. One common approach is to stage the events to be published in a `Queue` and use that as a source for building batches. +Because an `EventDataBatch` is scoped to a single publish operation, it is often necessary to more than a single batch to publish events. This can take many forms, with varying levels of sophistication and complexity, depending on an application's needs. One common approach is to stage the events to be published in a `Queue` and use that as a source for building batches. The following illustration breaks the process into discrete steps, transforming the queue of events into a set of batches to be published. This is done to help isolate the logic of creating batches for readability. Production applications may wish to publish batches as they become full to make more efficient use of resources. **Note:** The batch is responsible for unmanaged resources; it is recommended that you `Dispose` the batch after it has been published. ```C# Snippet:EventHubs_Sample04_MultipleBatches -var connectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; +var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; +var credential = new DefaultAzureCredential(); + +var producer = new EventHubProducerClient( + fullyQualifiedNamespace, + eventHubName, + credential); -var producer = new EventHubProducerClient(connectionString, eventHubName); var batches = default(IEnumerable); var eventsToSend = new Queue(); @@ -576,17 +618,21 @@ private static async Task> BuildBatchesAsync( ## Publishing events with an implicit batch -In scenarios where an application using the `EventProducerClient` wishes to publish events more frequently and is not concerned with exceeding the size limitation, it is reasonable to bypass the safety offered by using the `EventDataBatch` to offer minor throughput gains and fewer memory allocations. In support of this scenario, the `EventProducerClient` offers a `SendAsync` overload that accepts a set of events. This method delegates validation to the Event Hubs service to avoid the performance cost of a client-side measurement. If the set of events that was published exceeds the size limit, an [EventHubsException](https://docs.microsoft.com/dotnet/api/azure.messaging.eventhubs.eventhubsexception?view=azure-dotnet) will be surfaced with its `Reason` set to [MessageSizeExceeded](https://docs.microsoft.com/dotnet/api/azure.messaging.eventhubs.eventhubsexception.failurereason?view=azure-dotnet). +In scenarios where an application using the `EventProducerClient` wishes to publish events more frequently and is not concerned with exceeding the size limitation, it is reasonable to bypass the safety offered by using the `EventDataBatch` to offer minor throughput gains and fewer memory allocations. In support of this scenario, the `EventProducerClient` offers a `SendAsync` overload that accepts a set of events. This method delegates validation to the Event Hubs service to avoid the performance cost of a client-side measurement. If the set of events that was published exceeds the size limit, an [EventHubsException](https://learn.microsoft.com/dotnet/api/azure.messaging.eventhubs.eventhubsexception?view=azure-dotnet) will be surfaced with its `Reason` set to [MessageSizeExceeded](https://learn.microsoft.com/dotnet/api/azure.messaging.eventhubs.eventhubsexception.failurereason?view=azure-dotnet). When events are passed in this form, the `EventProducerClient` will package them as a single publishing operation. When the set is published, the result is atomic; either publishing was successful for all events, or it has failed for all events. Partial success or failure when publishing a batch is not possible. When published, the `EventHubProducerClient` will receive an acknowledgment from the Event Hubs service; so long as no exception is thrown by this call, your application can consider publishing successful. The service assumes responsibility for delivery of the set. All of your event data will be published to one of the Event Hub partitions, though there may be a slight delay until it is available to be read. ```C# Snippet:EventHubs_Sample04_NoBatch -var connectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; +var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; +var credential = new DefaultAzureCredential(); -var producer = new EventHubProducerClient(connectionString, eventHubName); +var producer = new EventHubProducerClient( + fullyQualifiedNamespace, + eventHubName, + credential); try { @@ -611,10 +657,14 @@ finally In some scenarios, such as when bandwidth is limited or publishers need to maintain control over how much data is transmitted at a time, a custom size limit (in bytes) may be specified when creating an `EventDataBatch`. This will override the default limit specified by the Event Hub and allows an application to use the `EventDataBatch` to ensure that the size of events can be measured accurately and deterministically. It is important to note that the custom limit may not exceed the limit specified by the Event Hub. ```C# Snippet:EventHubs_Sample04_CustomBatchSize -var connectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; +var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; +var credential = new DefaultAzureCredential(); -var producer = new EventHubProducerClient(connectionString, eventHubName); +var producer = new EventHubProducerClient( + fullyQualifiedNamespace, + eventHubName, + credential); try { @@ -641,4 +691,4 @@ finally { await producer.CloseAsync(); } -``` \ No newline at end of file +``` diff --git a/sdk/eventhub/Azure.Messaging.EventHubs/samples/Sample05_ReadingEvents.md b/sdk/eventhub/Azure.Messaging.EventHubs/samples/Sample05_ReadingEvents.md index 445232b74daf..7350b783ebd0 100644 --- a/sdk/eventhub/Azure.Messaging.EventHubs/samples/Sample05_ReadingEvents.md +++ b/sdk/eventhub/Azure.Messaging.EventHubs/samples/Sample05_ReadingEvents.md @@ -27,37 +27,39 @@ Each of the event consumer client types are safe to cache and use for the lifeti ## Event lifetime -When events are published, they will continue to exist in the Event Hub and be available for consuming until they reach an age where they are older than the [retention period](https://docs.microsoft.com//azure/event-hubs/event-hubs-faq#what-is-the-maximum-retention-period-for-events). After that point in time, the Event Hubs service may chose to remove them from the partition. Once removed, an event is no longer available to be read and cannot be recovered. Though the Event Hubs service is free to remove events older than the retention period, it does not do so deterministically; there is no guarantee of when events will be removed. +When events are published, they will continue to exist in the Event Hub and be available for consuming until they reach an age where they are older than the [retention period](https://learn.microsoft.com//azure/event-hubs/event-hubs-faq#what-is-the-maximum-retention-period-for-events). After that point in time, the Event Hubs service may chose to remove them from the partition. Once removed, an event is no longer available to be read and cannot be recovered. Though the Event Hubs service is free to remove events older than the retention period, it does not do so deterministically; there is no guarantee of when events will be removed. ## Reading and consumer groups -An Event Hub consumer is associated with a specific Event Hub and [consumer group](https://docs.microsoft.com/azure/event-hubs/event-hubs-features#consumer-groups). Conceptually, the consumer group is a label that identifies one or more event consumers as a set. Often, consumer groups are named after the responsibility of the consumer in an application, such as "Telemetry" or "OrderProcessing". When an Event Hub is created, a default consumer group is created for it, named "$Default." These examples will make use of the default consumer group for illustration. +An Event Hub consumer is associated with a specific Event Hub and [consumer group](https://learn.microsoft.com/azure/event-hubs/event-hubs-features#consumer-groups). Conceptually, the consumer group is a label that identifies one or more event consumers as a set. Often, consumer groups are named after the responsibility of the consumer in an application, such as "Telemetry" or "OrderProcessing". When an Event Hub is created, a default consumer group is created for it, named "$Default." These examples will make use of the default consumer group for illustration. Each consumer has a unique view of the events in a partition that it reads from, which means that events are available to all consumers and are not removed from the partition when read. This allows consumers to read and process events from the Event Hub at different speeds without interfering with one another. ## Reading and partitions -Every event that is published is sent to one of the [partitions](https://docs.microsoft.com/azure/architecture/reference-architectures/event-hubs/partitioning-in-event-hubs-and-kafka) of the Event Hub. When reading events, an application may be interested in reading events from all partitions or limiting to a single partition, depending on the application scenarios and throughput needs. The `EventHubConsumerClient` is not associated with any specific partition and the same instance can be used for reading from multiple partitions. +Every event that is published is sent to one of the [partitions](https://learn.microsoft.com/azure/architecture/reference-architectures/event-hubs/partitioning-in-event-hubs-and-kafka) of the Event Hub. When reading events, an application may be interested in reading events from all partitions or limiting to a single partition, depending on the application scenarios and throughput needs. The `EventHubConsumerClient` is not associated with any specific partition and the same instance can be used for reading from multiple partitions. The `EventHubConsumerClient` supports reading events from a single partition and also offers an easy way to familiarize yourself with Event Hubs by reading from all partitions without the rigor and complexity that you would need in a production application. For reading events from all partitions in a production scenario, we strongly recommend using the [EventProcessorClient](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/eventhub/Azure.Messaging.EventHubs.Processor/samples) from the [Azure.Messaging.EventHubs.Processor](https://www.nuget.org/packages/Azure.Messaging.EventHubs.Processor) package over the `EventHubConsumerClient`. ## Read events from all partitions -The `ReadEventsAsync` method of the `EventHubConsumerClient` allows events to be read from each partition for prototyping and exploring, but is not a recommended approach for production scenarios. Events are consumed as an [Async Enumerable](https://docs.microsoft.com/archive/msdn-magazine/2019/november/csharp-iterating-with-async-enumerables-in-csharp-8), where enumeration will emit events one-by-one. By default, reading starts from the beginning of partitions and all events present will be surfaced. +The `ReadEventsAsync` method of the `EventHubConsumerClient` allows events to be read from each partition for prototyping and exploring, but is not a recommended approach for production scenarios. Events are consumed as an [Async Enumerable](https://learn.microsoft.com/archive/msdn-magazine/2019/november/csharp-iterating-with-async-enumerables-in-csharp-8), where enumeration will emit events one-by-one. By default, reading starts from the beginning of partitions and all events present will be surfaced. -Because an Event Hub represents a potentially infinite series of events, the enumerator will not exit when no events are available in the Event Hub partitions. Instead, it will wait for more events to be published. To stop reading, applications will need to either signal a [CancellationToken](https://docs.microsoft.com/dotnet/api/system.threading.cancellationtoken?view=netcore-3.1) or call `break` from the body of the loop. +Because an Event Hub represents a potentially infinite series of events, the enumerator will not exit when no events are available in the Event Hub partitions. Instead, it will wait for more events to be published. To stop reading, applications will need to either signal a [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken?view=netcore-3.1) or call `break` from the body of the loop. This example illustrates stopping after either 3 events have been read or 45 seconds has elapsed, whichever occurs first. ```C# Snippet:EventHubs_Sample05_ReadAllPartitions -var connectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; +var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; +var credential = new DefaultAzureCredential(); var consumerGroup = EventHubConsumerClient.DefaultConsumerGroupName; var consumer = new EventHubConsumerClient( consumerGroup, - connectionString, - eventHubName); + fullyQualifiedNamespace, + eventHubName, + credential); try { @@ -94,19 +96,21 @@ finally ## Read events from all partitions with a maximum wait time -When using `ReadEventAsync`, it can sometimes be advantageous to ensure that the [Async Enumerable](https://docs.microsoft.com/archive/msdn-magazine/2019/november/csharp-iterating-with-async-enumerables-in-csharp-8) returns control to the application's code in the loop body periodically, whether an event was available or not. This allows for the application to detect when events are no longer being published and is often used for emitting heartbeat data as a health check for consumers. +When using `ReadEventAsync`, it can sometimes be advantageous to ensure that the [Async Enumerable](https://learn.microsoft.com/archive/msdn-magazine/2019/november/csharp-iterating-with-async-enumerables-in-csharp-8) returns control to the application's code in the loop body periodically, whether an event was available or not. This allows for the application to detect when events are no longer being published and is often used for emitting heartbeat data as a health check for consumers. This example illustrates waiting for a maximum of one second for an event to be read; if no event was available in that time, the loop ticks with an empty `PartitionEvent`. Once the example loop has ticked a total of 10 times, with or without an event available, it will exit. ```C# Snippet:EventHubs_Sample05_ReadAllPartitionsWaitTime -var connectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; +var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; +var credential = new DefaultAzureCredential(); var consumerGroup = EventHubConsumerClient.DefaultConsumerGroupName; var consumer = new EventHubConsumerClient( consumerGroup, - connectionString, - eventHubName); + fullyQualifiedNamespace, + eventHubName, + credential); try { @@ -152,14 +156,16 @@ By default, reading starts from the beginning of partitions. It is possible to This example illustrates reading from the end of each partition, and will do so for 30 seconds regardless of how many events have been read. ```C# Snippet:EventHubs_Sample05_ReadAllPartitionsFromLatest -var connectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; +var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; +var credential = new DefaultAzureCredential(); var consumerGroup = EventHubConsumerClient.DefaultConsumerGroupName; var consumer = new EventHubConsumerClient( consumerGroup, - connectionString, - eventHubName); + fullyQualifiedNamespace, + eventHubName, + credential); try { @@ -189,21 +195,23 @@ finally ## Read events from a partition -The `ReadEventsFromPartitionAsync` method of the `EventHubConsumerClient` allows events to be read from a specific partition and is suitable for production scenarios. Events are consumed as an [Async Enumerable](https://docs.microsoft.com/archive/msdn-magazine/2019/november/csharp-iterating-with-async-enumerables-in-csharp-8), where enumeration will emit events one-by-one. `ReadEventsFromPartitionAsync` targets a single partition, allowing consumers to request reading from a specific location in the partition's event stream by creating an [EventPosition](https://docs.microsoft.com/dotnet/api/azure.messaging.eventhubs.consumer.eventposition?view=azure-dotnet). +The `ReadEventsFromPartitionAsync` method of the `EventHubConsumerClient` allows events to be read from a specific partition and is suitable for production scenarios. Events are consumed as an [Async Enumerable](https://learn.microsoft.com/archive/msdn-magazine/2019/november/csharp-iterating-with-async-enumerables-in-csharp-8), where enumeration will emit events one-by-one. `ReadEventsFromPartitionAsync` targets a single partition, allowing consumers to request reading from a specific location in the partition's event stream by creating an [EventPosition](https://learn.microsoft.com/dotnet/api/azure.messaging.eventhubs.consumer.eventposition?view=azure-dotnet). -Because an Event Hub represents a potentially infinite series of events, the enumerator will not exit when no further events are available in the Event Hub partitions. Instead, it will wait for more events to be published. To stop reading, applications will need to either signal a [CancellationToken](https://docs.microsoft.com/dotnet/api/system.threading.cancellationtoken?view=netcore-3.1) or call `break` from the body of the loop. +Because an Event Hub represents a potentially infinite series of events, the enumerator will not exit when no further events are available in the Event Hub partitions. Instead, it will wait for more events to be published. To stop reading, applications will need to either signal a [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken?view=netcore-3.1) or call `break` from the body of the loop. This example illustrates the `CancellationToken` approach, reading from the beginning of the partition for only 30 seconds, regardless of how many events are read. ```C# Snippet:EventHubs_Sample05_ReadPartition -var connectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; +var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; +var credential = new DefaultAzureCredential(); var consumerGroup = EventHubConsumerClient.DefaultConsumerGroupName; var consumer = new EventHubConsumerClient( consumerGroup, - connectionString, - eventHubName); + fullyQualifiedNamespace, + eventHubName, + credential); try { @@ -237,19 +245,21 @@ finally ## Read events from a partition with a maximum wait time -When using `ReadEventsFromPartitionAsync`, it can sometimes be advantageous to ensure that the [Async Enumerable](https://docs.microsoft.com/archive/msdn-magazine/2019/november/csharp-iterating-with-async-enumerables-in-csharp-8) returns control to the application's code in the loop body periodically, whether an event was available or not. This allows for the application to detect when events are no longer being published and is often used for emitting heartbeat data as a health check for consumers. +When using `ReadEventsFromPartitionAsync`, it can sometimes be advantageous to ensure that the [Async Enumerable](https://learn.microsoft.com/archive/msdn-magazine/2019/november/csharp-iterating-with-async-enumerables-in-csharp-8) returns control to the application's code in the loop body periodically, whether an event was available or not. This allows for the application to detect when events are no longer being published and is often used for emitting heartbeat data as a health check for consumers. This example illustrates waiting for a maximum of one second for an event to be read; if no event was available, the loop ticks with an empty `PartitionEvent`. Once the example loop has ticked a total of 10 times, with or without an event available, it will exit. ```C# Snippet:EventHubs_Sample05_ReadPartitionWaitTime -var connectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; +var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; +var credential = new DefaultAzureCredential(); var consumerGroup = EventHubConsumerClient.DefaultConsumerGroupName; var consumer = new EventHubConsumerClient( consumerGroup, - connectionString, - eventHubName); + fullyQualifiedNamespace, + eventHubName, + credential); try { @@ -308,14 +318,16 @@ finally When reading event from a partition, consumers can request to begin reading from the partition's event stream at a specific point in time. This example illustrates reading events starting with an hour prior to the current time, and will continue reading for a duration of 30 seconds before cancellation is triggered. ```C# Snippet:EventHubs_Sample05_ReadPartitionFromDate -var connectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; +var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; +var credential = new DefaultAzureCredential(); var consumerGroup = EventHubConsumerClient.DefaultConsumerGroupName; var consumer = new EventHubConsumerClient( consumerGroup, - connectionString, - eventHubName); + fullyQualifiedNamespace, + eventHubName, + credential); try { @@ -356,14 +368,16 @@ When reading event from a partition, consumers can request to begin reading from This example illustrates reading events starting with the last offset that was published to the partition, and will do so for 30 seconds regardless of how many events have been read. ```C# Snippet:EventHubs_Sample05_ReadPartitionFromOffset -var connectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; +var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; +var credential = new DefaultAzureCredential(); var consumerGroup = EventHubConsumerClient.DefaultConsumerGroupName; var consumer = new EventHubConsumerClient( consumerGroup, - connectionString, - eventHubName); + fullyQualifiedNamespace, + eventHubName, + credential); try { @@ -398,19 +412,21 @@ finally ## Read events from a partition, starting from a specific sequence number -When reading event from a partition, consumers can request to begin reading from the partition's event stream at a specific sequence number. This is often used when a consumer has already processed some events from the partition and would like to resume from that point rather than reprocessing. Sequence numbers follow a consistent pattern within the context of a specific partition; they will be contiguous and in increasing order. +When reading event from a partition, consumers can request to begin reading from the partition's event stream at a specific sequence number. This is often used when a consumer has already processed some events from the partition and would like to resume from that point rather than reprocessing. Sequence numbers follow a consistent pattern within the context of a specific partition; they will be contiguous and in increasing order. This example illustrates reading events starting with the last sequence number that was published to the partition, and will do so for 30 seconds regardless of how many events have been read. ```C# Snippet:EventHubs_Sample05_ReadPartitionFromSequence -var connectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; +var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; +var credential = new DefaultAzureCredential(); var consumerGroup = EventHubConsumerClient.DefaultConsumerGroupName; var consumer = new EventHubConsumerClient( consumerGroup, - connectionString, - eventHubName); + fullyQualifiedNamespace, + eventHubName, + credential); try { @@ -445,21 +461,23 @@ finally ## Query partition information while reading -Some application scenarios call for understanding the "backlog" of events in an Event Hub, where an event being consumed is compared with the latest event available in the partition to understand how many events have accumulated and have yet to be processed. This allows applications to make reasoned decisions about scaling consumers or throttling publishers to ensure that event processing does not fall too far behind. +Some application scenarios call for understanding the "backlog" of events in an Event Hub, where an event being consumed is compared with the latest event available in the partition to understand how many events have accumulated and have yet to be processed. This allows applications to make reasoned decisions about scaling consumers or throttling publishers to ensure that event processing does not fall too far behind. While the `EventHubConsumerClient` can be used to directly query the partition, doing so frequently is likely to impact performance. When partition information is needed often, an option can be set when reading events to query the last published event information for the partition in real-time and surface it with events being processed. This example illustrates requesting information on the last published event for the partition while reading events. Reading will be performed for 30 seconds regardless of how many events have been read. ```C# Snippet:EventHubs_Sample05_ReadPartitionTrackLastEnqueued -var connectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; +var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; +var credential = new DefaultAzureCredential(); var consumerGroup = EventHubConsumerClient.DefaultConsumerGroupName; var consumer = new EventHubConsumerClient( consumerGroup, - connectionString, - eventHubName); + fullyQualifiedNamespace, + eventHubName, + credential); try { @@ -505,12 +523,13 @@ finally When an application is working at a high volume and is willing to accept additional complexity to maximize throughput, the `PartitionReceiver` is worthy of consideration. It provides a very thin wrapper over the Event Hubs transport, allowing events to be read in batches as well as supporting options to control transport behavior. More detail on the design and philosophy for the `PartitionReceiver` can be found in its [design document](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/eventhub/Azure.Messaging.EventHubs/design/proposal-partition-receiver.md). -Because the receiver endeavors to avoid adding overhead, it does not follow the patterns established in the `EventHubConsumerClient` nor offer some of its convenience. Of particular note is that the model for reading events is based on polling with its `ReceiveBatchAsync` method instead of an iterator. It is also important to be aware that the transport library is timeout-based and will not honor cancellation when a service operation is active. +Because the receiver endeavors to avoid adding overhead, it does not follow the patterns established in the `EventHubConsumerClient` nor offer some of its convenience. Of particular note is that the model for reading events is based on polling with its `ReceiveBatchAsync` method instead of an iterator. It is also important to be aware that the transport library is timeout-based and will not honor cancellation when a service operation is active. This example illustrates the basic flow of reading events and will do so for 30 seconds regardless of how many events have been read. ```C# Snippet:EventHubs_Sample05_ReadPartitionWithReceiver -var connectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; +var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; +var credential = new DefaultAzureCredential(); var consumerGroup = EventHubConsumerClient.DefaultConsumerGroupName; using CancellationTokenSource cancellationSource = new CancellationTokenSource(); @@ -518,7 +537,10 @@ cancellationSource.CancelAfter(TimeSpan.FromSeconds(30)); string firstPartition; -await using (var producer = new EventHubProducerClient(connectionString, eventHubName)) +await using (var producer = new EventHubProducerClient( + fullyQualifiedNamespace, + eventHubName, + credential)) { firstPartition = (await producer.GetPartitionIdsAsync()).First(); } @@ -527,8 +549,9 @@ var receiver = new PartitionReceiver( consumerGroup, firstPartition, EventPosition.Earliest, - connectionString, - eventHubName); + fullyQualifiedNamespace, + eventHubName, + credential); try { diff --git a/sdk/eventhub/Azure.Messaging.EventHubs/samples/Sample06_IdentityAndSharedAccessCredentials.md b/sdk/eventhub/Azure.Messaging.EventHubs/samples/Sample06_IdentityAndSharedAccessCredentials.md index 01ab385b5b05..6fd231158eee 100644 --- a/sdk/eventhub/Azure.Messaging.EventHubs/samples/Sample06_IdentityAndSharedAccessCredentials.md +++ b/sdk/eventhub/Azure.Messaging.EventHubs/samples/Sample06_IdentityAndSharedAccessCredentials.md @@ -23,29 +23,29 @@ Depending on the type of authorization that you wish to use, additional setup ma ### Identity authorization -**Azure.Identity** +**Azure.Identity** -The `Azure.Identity` library is recommended for identity-based authentication across the different sources supported by the Azure platform for [role-based access control (RBAC)](https://docs.microsoft.com/azure/role-based-access-control/overview). This includes Azure Active Directory principals and Managed Identities. To allow for the best developer experience, and one that supports promoting applications between environments without code changes, this sample will concentrate on the `DefaultAzureCredential`. Please see the [Azure.Identity README](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/identity/Azure.Identity/README.md#defaultazurecredential) for details on configuring your environment for `DefaultAzureCredential` integration. +The `Azure.Identity` library is recommended for identity-based authentication across the different sources supported by the Azure platform for [role-based access control (RBAC)](https://learn.microsoft.com/azure/role-based-access-control/overview). This includes Azure Active Directory principals and Managed Identities. To allow for the best developer experience, and one that supports promoting applications between environments without code changes, this sample will concentrate on the `DefaultAzureCredential`. Please see the [Azure.Identity README](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/identity/Azure.Identity/README.md#defaultazurecredential) for details on configuring your environment for `DefaultAzureCredential` integration. -**Role Assignments** +**Role Assignments** -Once your environment is configured, you'll need to ensure that the principal that you've chosen has access to your Event Hubs resources in Azure. To do so, they will need to be assigned the appropriate role. For those unfamiliar with role assignments, it is recommended to follow [these steps](https://docs.microsoft.com/azure/event-hubs/authenticate-managed-identity?tabs=latest#to-assign-azure-roles-using-the-azure-portal) in the Azure portal for the most intuitive experience. Roles may also be assigned via the [Azure CLI](https://docs.microsoft.com/cli/azure/role/assignment?view=azure-cli-latest#az_role_assignment_create) or [PowerShell](https://docs.microsoft.com/powershell/module/az.resources/new-azroleassignment), though these require more in-depth knowledge of the Azure platform and may be difficult for developers exploring Azure for the first time. +Once your environment is configured, you'll need to ensure that the principal that you've chosen has access to your Event Hubs resources in Azure. To do so, they will need to be assigned the appropriate role. For those unfamiliar with role assignments, it is recommended to follow [these steps](https://learn.microsoft.com/azure/event-hubs/authenticate-managed-identity?tabs=latest#to-assign-azure-roles-using-the-azure-portal) in the Azure portal for the most intuitive experience. Roles may also be assigned via the [Azure CLI](https://learn.microsoft.com/cli/azure/role/assignment?view=azure-cli-latest#az_role_assignment_create) or [PowerShell](https://learn.microsoft.com/powershell/module/az.resources/new-azroleassignment), though these require more in-depth knowledge of the Azure platform and may be difficult for developers exploring Azure for the first time. -The available role choices for Event Hubs are: +The available role choices for Event Hubs are: -- [Azure Event Hubs Data Owner](https://docs.microsoft.com/azure/role-based-access-control/built-in-roles#azure-event-hubs-data-owner) for full access to read and publish events. -- [Azure Event Hubs Data Receiver](https://docs.microsoft.com/azure/role-based-access-control/built-in-roles#azure-event-hubs-data-receiver) for the ability to read events but not publish them. -- [Azure Event Hubs Data Sender](https://docs.microsoft.com/azure/role-based-access-control/built-in-roles#azure-event-hubs-data-sender) for the ability to publish events but not read them. +- [Azure Event Hubs Data Owner](https://learn.microsoft.com/azure/role-based-access-control/built-in-roles#azure-event-hubs-data-owner) for full access to read and publish events. +- [Azure Event Hubs Data Receiver](https://learn.microsoft.com/azure/role-based-access-control/built-in-roles#azure-event-hubs-data-receiver) for the ability to read events but not publish them. +- [Azure Event Hubs Data Sender](https://learn.microsoft.com/azure/role-based-access-control/built-in-roles#azure-event-hubs-data-sender) for the ability to publish events but not read them. ### Event Hubs Shared Access Signature authorization Shared access signatures (SAS) are recommended over shared access keys when RBAC cannot be used. A shared access signature allows for granular and time-limited access to Event Hubs resources. In order to use SAS-based authorization, a token needs to be generated and the associated Event Hubs resource needs to be configured to authorize its use. -The steps to generate a SAS token can be found in the [example below](#generating-sas-tokens) and are detailed in the article "[Authenticate access to Event Hubs resources using shared access signatures (SAS)](https://docs.microsoft.com/azure/event-hubs/authenticate-shared-access-signature)". Details for for some additional languages are discussed in the article "[Generate SAS token](https://docs.microsoft.com/rest/api/eventhub/generate-sas-token)". Information about configuring SAS authorization can be found in the article "[Authorizing access to Event Hubs resources using Shared Access Signatures](https://docs.microsoft.com/azure/event-hubs/authorize-access-shared-access-signature)". +The steps to generate a SAS token can be found in the [example below](#generating-sas-tokens) and are detailed in the article "[Authenticate access to Event Hubs resources using shared access signatures (SAS)](https://learn.microsoft.com/azure/event-hubs/authenticate-shared-access-signature)". Details for for some additional languages are discussed in the article "[Generate SAS token](https://learn.microsoft.com/rest/api/eventhub/generate-sas-token)". Information about configuring SAS authorization can be found in the article "[Authorizing access to Event Hubs resources using Shared Access Signatures](https://learn.microsoft.com/azure/event-hubs/authorize-access-shared-access-signature)". ### Event Hubs Shared Access Key authorization -Shared access keys for Event Hubs authorization are generated when access policies are created for an Event Hubs namespace or one of its Event Hub instances. Since these keys are most often used in association with a connection string, the article "[Get an Event Hubs connection string](https://docs.microsoft.com/azure/event-hubs/event-hubs-get-connection-string#get-connection-string-from-the-portal)" is the best source of information on generating and accessing them. +Shared access keys for Event Hubs authorization are generated when access policies are created for an Event Hubs namespace or one of its Event Hub instances. Since these keys are most often used in association with a connection string, the article "[Get an Event Hubs connection string](https://learn.microsoft.com/azure/event-hubs/event-hubs-get-connection-string#get-connection-string-from-the-portal)" is the best source of information on generating and accessing them. In step 6 of the article, the policy that you select will be the name of your shared access key when used for credential authorization. In step 7, you'll want to copy the "Primary key" rather than connection string. diff --git a/sdk/eventhub/Azure.Messaging.EventHubs/samples/Sample07_EarlierLanguageVersions.md b/sdk/eventhub/Azure.Messaging.EventHubs/samples/Sample07_EarlierLanguageVersions.md index f63525cf3146..b10c08f00868 100644 --- a/sdk/eventhub/Azure.Messaging.EventHubs/samples/Sample07_EarlierLanguageVersions.md +++ b/sdk/eventhub/Azure.Messaging.EventHubs/samples/Sample07_EarlierLanguageVersions.md @@ -1,25 +1,29 @@ # Using Earlier Versions of C# and Visual Studio -The Azure Event Hubs client library makes use of new features that were introduced in C# 8.0. In order to take advantage of the C# 8.0 syntax, it is recommended that you compile using the [.NET Core SDK](https://dotnet.microsoft.com/download) 3.0 or higher with a [language version](https://docs.microsoft.com/dotnet/csharp/language-reference/configure-language-version#override-a-default) of `latest`. It is also possible to compile with the .NET Core SDK 2.1.x using a language version of `preview`. +The Azure Event Hubs client library makes use of new features that were introduced in C# 8.0. In order to take advantage of the C# 8.0 syntax, it is recommended that you compile using the [.NET Core SDK](https://dotnet.microsoft.com/download) 3.0 or higher with a [language version](https://learn.microsoft.com/dotnet/csharp/language-reference/configure-language-version#override-a-default) of `latest`. It is also possible to compile with the .NET Core SDK 2.1.x using a language version of `preview`. Visual Studio users wishing to take full advantage of the C# 8.0 syntax will need to use Visual Studio 2019 or later. Visual Studio 2019, including the free Community edition, can be downloaded [here](https://visualstudio.microsoft.com). Users of Visual Studio 2017 can take advantage of the C# 8 syntax by making use of the [Microsoft.Net.Compilers NuGet package](https://www.nuget.org/packages/Microsoft.Net.Compilers/) and setting the language version, though the editing experience may not be ideal. - You can still use the Event Hubs client library with previous C# language versions, by managing asynchronous enumerable and asynchronous disposable members manually rather than benefiting from the new syntax. You may still target any framework version that can consume a `netstandard2.0` package, including earlier versions of .NET Core or the .NET framework. For more information, see the [.NET Standard](https://docs.microsoft.com/dotnet/standard/net-standard) documentation and [how to specify target frameworks](https://docs.microsoft.com/dotnet/standard/frameworks#how-to-specify-target-frameworks). - + You can still use the Event Hubs client library with previous C# language versions, by managing asynchronous enumerable and asynchronous disposable members manually rather than benefiting from the new syntax. You may still target any framework version that can consume a `netstandard2.0` package, including earlier versions of .NET Core or the .NET framework. For more information, see the [.NET Standard](https://learn.microsoft.com/dotnet/standard/net-standard) documentation and [how to specify target frameworks](https://learn.microsoft.com/dotnet/standard/frameworks#how-to-specify-target-frameworks). + ## Table of contents - [Publish a batch of events using C# 7](#publish-a-batch-of-events-using-c-7) - [Read events from all partitions using C# 7](#read-events-from-all-partitions-using-c-7) ## Publish a batch of events using C# 7 - + This example illustrates publishing a batch with a single event, allowing the Event Hubs service to assign the partition to which it will be published. For more information on publishing, see: [Sample04_PublishingEvents](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/eventhub/Azure.Messaging.EventHubs/samples/Sample04_PublishingEvents.md). - + ```C# Snippet:EventHubs_Sample07_Publish -var connectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; +var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; +var credential = new DefaultAzureCredential(); -var producer = new EventHubProducerClient(connectionString, eventHubName); +var producer = new EventHubProducerClient( + fullyQualifiedNamespace, + eventHubName, + credential); try { @@ -47,14 +51,16 @@ The `ReadEventsAsync` method of the `EventHubConsumerClient` allows events to be This example illustrates reading either 50 events or stopping after 30 seconds has elapsed, whichever occurs first. For more information on publishing, see: [Sample05_ReadingEvents](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/eventhub/Azure.Messaging.EventHubs/samples/Sample05_ReadingEvents.md). ```C# Snippet:EventHubs_Sample07_ReadAllPartitions -var connectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; +var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; +var credential = new DefaultAzureCredential(); var consumerGroup = EventHubConsumerClient.DefaultConsumerGroupName; var consumer = new EventHubConsumerClient( consumerGroup, - connectionString, - eventHubName); + fullyQualifiedNamespace, + eventHubName, + credential); try { @@ -101,6 +107,6 @@ finally await consumer.CloseAsync(); } ``` - - + + diff --git a/sdk/eventhub/Azure.Messaging.EventHubs/samples/Sample08_CustomEventProcessor.md b/sdk/eventhub/Azure.Messaging.EventHubs/samples/Sample08_CustomEventProcessor.md index 38db6ff2f12c..4bee9d82a794 100644 --- a/sdk/eventhub/Azure.Messaging.EventHubs/samples/Sample08_CustomEventProcessor.md +++ b/sdk/eventhub/Azure.Messaging.EventHubs/samples/Sample08_CustomEventProcessor.md @@ -58,15 +58,17 @@ public class CustomProcessor : PluggableCheckpointStoreEventProcessor diff --git a/sdk/eventhub/Azure.Messaging.EventHubs/samples/Sample09_ObservableEventBatch.md b/sdk/eventhub/Azure.Messaging.EventHubs/samples/Sample09_ObservableEventBatch.md index cc41ffb6798f..687f3c2805f3 100644 --- a/sdk/eventhub/Azure.Messaging.EventHubs/samples/Sample09_ObservableEventBatch.md +++ b/sdk/eventhub/Azure.Messaging.EventHubs/samples/Sample09_ObservableEventBatch.md @@ -93,10 +93,14 @@ An `EventHubProducerClient` is safe to cache and use for the lifetime of the app ## Accessing the EventData Instances ```C# Snippet:Sample09_AccessingEventData -var connectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; +var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; +var credential = new DefaultAzureCredential(); -var producer = new EventHubProducerClient(connectionString, eventHubName); +var producer = new EventHubProducerClient( + fullyQualifiedNamespace, + eventHubName, + credential); try { @@ -135,10 +139,14 @@ finally This sample demonstrates how to add an `EventData` identification property that can be used to verify that a given event ID was added to the observable batch. ```C# Snippet:Sample09_CheckingBatch -var connectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; +var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; +var credential = new DefaultAzureCredential(); -var producer = new EventHubProducerClient(connectionString, eventHubName); +var producer = new EventHubProducerClient( + fullyQualifiedNamespace, + eventHubName, + credential); try { diff --git a/sdk/eventhub/Azure.Messaging.EventHubs/samples/Sample10_AzureEventSourceListener.md b/sdk/eventhub/Azure.Messaging.EventHubs/samples/Sample10_AzureEventSourceListener.md index d9b9be2f3665..b1e656b278b4 100644 --- a/sdk/eventhub/Azure.Messaging.EventHubs/samples/Sample10_AzureEventSourceListener.md +++ b/sdk/eventhub/Azure.Messaging.EventHubs/samples/Sample10_AzureEventSourceListener.md @@ -1,6 +1,6 @@ # Capturing Event Hubs logs using the AzureEventSourceListener -The Event Hubs client library is instrumented using the .NET [`EventSource`](https://docs.microsoft.com/dotnet/api/system.diagnostics.tracing.eventsource) mechanism for logging. When instrumenting or diagnosing issues with applications that consume the library, it is often helpful to have access to the Event Hubs logs. The following scenarios demonstrate how to use the [`AzureEventSourceListener`](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/samples/Diagnostics.md#logging) from the `Azure.Core` package to capture logs emitted by the Event Hubs client library. +The Event Hubs client library is instrumented using the .NET [`EventSource`](https://learn.microsoft.com/dotnet/api/system.diagnostics.tracing.eventsource) mechanism for logging. When instrumenting or diagnosing issues with applications that consume the library, it is often helpful to have access to the Event Hubs logs. The following scenarios demonstrate how to use the [`AzureEventSourceListener`](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/samples/Diagnostics.md#logging) from the `Azure.Core` package to capture logs emitted by the Event Hubs client library. ## Table of contents @@ -28,9 +28,14 @@ The following snippet demonstrates an example of capturing all log information f This example captures all Azure SDK logs from any client library in use, writing them to the standard `Console` output stream. ```C# Snippet:EventHubs_Sample10_ConsoleListener -var connectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; +var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; -var producer = new EventHubProducerClient(connectionString, eventHubName); +var credential = new DefaultAzureCredential(); + +var producer = new EventHubProducerClient( + fullyQualifiedNamespace, + eventHubName, + credential); using AzureEventSourceListener consoleListener = AzureEventSourceListener.CreateConsoleLogger(EventLevel.LogAlways); @@ -52,12 +57,17 @@ finally ## Capture all events and write them to `Trace` -Similar to the previous example, this snippet captures all logs, but writes them to [`Trace`](https://docs.microsoft.com/dotnet/api/system.diagnostics.trace) output. This approach may be desirable for applications that do not have the `Console` available. +Similar to the previous example, this snippet captures all logs, but writes them to [`Trace`](https://learn.microsoft.com/dotnet/api/system.diagnostics.trace) output. This approach may be desirable for applications that do not have the `Console` available. ```C# Snippet:EventHubs_Sample10_TraceListener -var connectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; +var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; -var producer = new EventHubProducerClient(connectionString, eventHubName); +var credential = new DefaultAzureCredential(); + +var producer = new EventHubProducerClient( + fullyQualifiedNamespace, + eventHubName, + credential); using AzureEventSourceListener traceListener = AzureEventSourceListener.CreateTraceLogger(EventLevel.LogAlways); @@ -83,12 +93,17 @@ This examples demonstrates using a callback with the listener to allow custom lo In the snippet below, the `Verbose` messages for the `Azure-Identity` event source are captured and written to `Trace` output. Log messages for the `Azure-Messaging-EventHubs` event source are filtered to capture only a specific set to aid in debugging publishing, which are then written to the standard `Console` output. -More information about the `args` parameter for the callback can be found in the [EventWrittenEventArgs](https://docs.microsoft.com/dotnet/api/system.diagnostics.tracing.eventwritteneventargs) documentation.. +More information about the `args` parameter for the callback can be found in the [EventWrittenEventArgs](https://learn.microsoft.com/dotnet/api/system.diagnostics.tracing.eventwritteneventargs) documentation.. ```C# Snippet:EventHubs_Sample10_CustomListenerWithFilter -var connectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; +var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; -var producer = new EventHubProducerClient(connectionString, eventHubName); +var credential = new DefaultAzureCredential(); + +var producer = new EventHubProducerClient( + fullyQualifiedNamespace, + eventHubName, + credential); using AzureEventSourceListener customListener = new AzureEventSourceListener((args, message) => { @@ -130,12 +145,17 @@ finally For scenarios where capturing logs to `Trace` or `Console` outputs isn't ideal, log information can be streamed into a variety of targets, such as Azure Storage, databases, and files for durable persistence. This example demonstrates capturing error logs to a text file so that they can be analyzed later, while capturing non-error information to `Console` output. ```C# Snippet:EventHubs_Sample10_CustomListenerWithFile -var connectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; +var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; -var producer = new EventHubProducerClient(connectionString, eventHubName); +var credential = new DefaultAzureCredential(); using Stream stream = new FileStream("<< PATH TO THE FILE >>", FileMode.OpenOrCreate, FileAccess.Write); +var producer = new EventHubProducerClient( + fullyQualifiedNamespace, + eventHubName, + credential); + using StreamWriter streamWriter = new StreamWriter(stream) { AutoFlush = true diff --git a/sdk/eventhub/Azure.Messaging.EventHubs/samples/Sample11_MockingClientTypes.md b/sdk/eventhub/Azure.Messaging.EventHubs/samples/Sample11_MockingClientTypes.md index 261fe72ca243..e148dd792149 100644 --- a/sdk/eventhub/Azure.Messaging.EventHubs/samples/Sample11_MockingClientTypes.md +++ b/sdk/eventhub/Azure.Messaging.EventHubs/samples/Sample11_MockingClientTypes.md @@ -20,8 +20,8 @@ For more general information and examples on mocking with the Azure SDK, please ## Publishing events with the `EventHubProducerClient` -When using batches to publish to Event Hubs, the key interactions with the `EventHubProducerClient` are calling `CreateBatchAsync` to create the batch and `SendAsync` to publish it. - Mocked batches accept a `List` that is used as a backing store and can be inspected to verify that the application is adding events to the batch as expected. The custom `TryAdd` callback can be used to control the decision for whether an event is accepted into the batch or is rejected. +When using batches to publish to Event Hubs, the key interactions with the `EventHubProducerClient` are calling `CreateBatchAsync` to create the batch and `SendAsync` to publish it. + Mocked batches accept a `List` that is used as a backing store and can be inspected to verify that the application is adding events to the batch as expected. The custom `TryAdd` callback can be used to control the decision for whether an event is accepted into the batch or is rejected. This snippet demonstrates mocking the `EventHubProducerClient`, and creating `EventDataBatch` instances using the `EventHubsModelFactory`. @@ -321,7 +321,7 @@ await foreach (PartitionEvent receivedEvent in consumer.ReadEventsFromPartitionA ## Consuming events using the `PartitionReceiver` -The sample below illustrates how to mock a `PartitionReceiver`, and set up its `ReceiveBatchAsync` method to return a simple data batch. +The sample below illustrates how to mock a `PartitionReceiver`, and set up its `ReceiveBatchAsync` method to return a simple data batch. Given the purpose of the `PartitionReceiver`, it is anticipated that most applications will have complex code surrounding their receivers, so this snippet is intentionally simple, with the focus being on using the `EventHubsModelFactory` to mock events being returned from the broker. @@ -493,4 +493,4 @@ string[] consumerPartitions = new string[] { "0", "1", "2" }; mockConsumer .Setup(p => p.GetPartitionIdsAsync(It.IsAny())) .ReturnsAsync(consumerPartitions); -``` \ No newline at end of file +``` diff --git a/sdk/eventhub/Azure.Messaging.EventHubs/src/Amqp/AmqpClient.cs b/sdk/eventhub/Azure.Messaging.EventHubs/src/Amqp/AmqpClient.cs index 75cdfefd8f29..759822e9ffa4 100644 --- a/sdk/eventhub/Azure.Messaging.EventHubs/src/Amqp/AmqpClient.cs +++ b/sdk/eventhub/Azure.Messaging.EventHubs/src/Amqp/AmqpClient.cs @@ -200,7 +200,7 @@ protected AmqpClient(string host, clientOptions.CertificateValidationCallback); ManagementLink = new FaultTolerantAmqpObject( - linkTimeout => ConnectionScope.OpenManagementLinkAsync(operationTimeout, linkTimeout, CancellationToken.None), + linkTimeout => CreateManagementLinkAsync(operationTimeout, linkTimeout, CancellationToken.None), link => { link.Session?.SafeClose(); @@ -545,6 +545,35 @@ public override async Task CloseAsync(CancellationToken cancellationToken) } } + /// + /// Creates the AMQP link to be used for management operations and ensures + /// that any corresponding state has been updated based on the link configuration. + /// + /// + /// The timeout to apply to management operations using the link.. + /// The timeout to apply for creating the link. + /// The cancellation token to consider when creating the link. + /// + /// The AMQP link to use for management operations. + /// + private async Task CreateManagementLinkAsync(TimeSpan operationTimeout, + TimeSpan linkTimeout, + CancellationToken cancellationToken) + { + var link = default(RequestResponseAmqpLink); + + try + { + link = await ConnectionScope.OpenManagementLinkAsync(operationTimeout, linkTimeout, CancellationToken.None).ConfigureAwait(false); + } + catch (Exception ex) + { + ExceptionDispatchInfo.Capture(ex.TranslateConnectionCloseDuringLinkCreationException(EventHubName)).Throw(); + } + + return link; + } + /// /// Acquires an access token for authorization with the Event Hubs service. /// diff --git a/sdk/eventhub/Azure.Messaging.EventHubs/src/Azure.Messaging.EventHubs.csproj b/sdk/eventhub/Azure.Messaging.EventHubs/src/Azure.Messaging.EventHubs.csproj index b1757bfcae28..6c36318bcf20 100644 --- a/sdk/eventhub/Azure.Messaging.EventHubs/src/Azure.Messaging.EventHubs.csproj +++ b/sdk/eventhub/Azure.Messaging.EventHubs/src/Azure.Messaging.EventHubs.csproj @@ -7,6 +7,8 @@ Azure;Event Hubs;EventHubs;.NET;AMQP;IoT;$(PackageCommonTags) $(RequiredTargetFrameworks) true + true + true diff --git a/sdk/eventhub/Azure.Messaging.EventHubs/src/Compatibility/EventHubClientBuilderExtensions.cs b/sdk/eventhub/Azure.Messaging.EventHubs/src/Compatibility/EventHubClientBuilderExtensions.cs index 68f164d8bde9..850f40f3eca8 100755 --- a/sdk/eventhub/Azure.Messaging.EventHubs/src/Compatibility/EventHubClientBuilderExtensions.cs +++ b/sdk/eventhub/Azure.Messaging.EventHubs/src/Compatibility/EventHubClientBuilderExtensions.cs @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. +using System.Diagnostics.CodeAnalysis; using Azure.Core.Extensions; using Azure.Messaging.EventHubs.Consumer; using Azure.Messaging.EventHubs.Producer; @@ -46,6 +47,8 @@ public static IAzureClientBuilder instance with connection options loaded from the provided instance. ///
/// + [RequiresUnreferencedCode("Binding strongly typed objects to configuration values is not supported with trimming. Use the Configuration Binder Source Generator (EnableConfigurationBindingGenerator=true) instead.")] + [RequiresDynamicCode("Binding strongly typed objects to configuration values requires generating dynamic code at runtime, for example instantiating generic types. Use the Configuration Binder Source Generator (EnableConfigurationBindingGenerator=true) instead.")] public static IAzureClientBuilder AddEventHubProducerClient(this TBuilder builder, TConfiguration configuration) where TBuilder : IAzureClientFactoryBuilderWithConfiguration { @@ -86,6 +89,8 @@ public static IAzureClientBuilder instance with connection options loaded from the provided instance. ///
/// + [RequiresUnreferencedCode("Binding strongly typed objects to configuration values is not supported with trimming. Use the Configuration Binder Source Generator (EnableConfigurationBindingGenerator=true) instead.")] + [RequiresDynamicCode("Binding strongly typed objects to configuration values requires generating dynamic code at runtime, for example instantiating generic types. Use the Configuration Binder Source Generator (EnableConfigurationBindingGenerator=true) instead.")] public static IAzureClientBuilder AddEventHubConsumerClient(this TBuilder builder, TConfiguration configuration) where TBuilder : IAzureClientFactoryBuilderWithConfiguration { diff --git a/sdk/eventhub/Azure.Messaging.EventHubs/src/Diagnostics/EventHubsEventSource.cs b/sdk/eventhub/Azure.Messaging.EventHubs/src/Diagnostics/EventHubsEventSource.cs index 13fabb5aa997..b4a66fc2c8b7 100644 --- a/sdk/eventhub/Azure.Messaging.EventHubs/src/Diagnostics/EventHubsEventSource.cs +++ b/sdk/eventhub/Azure.Messaging.EventHubs/src/Diagnostics/EventHubsEventSource.cs @@ -2,6 +2,7 @@ // Licensed under the MIT License. using System; +using System.Diagnostics.CodeAnalysis; using System.Diagnostics.Tracing; using System.Globalization; using System.IO.Pipes; @@ -848,6 +849,7 @@ public virtual void EventProcessorPartitionProcessingStopError(string partitionI /// The duration that the end-to-end stop operation took for the partition, in seconds. /// [Event(42, Level = EventLevel.Verbose, Message = "Completed stopping processing for partition '{0}' by processor instance with identifier '{1}' for Event Hub: {2} and Consumer Group: {3}. Duration: '{4:0.00}' seconds.")] + [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2026", Justification = EventSourceSuppressMessage)] public virtual void EventProcessorPartitionProcessingStopComplete(string partitionId, string identifier, string eventHubName, @@ -988,6 +990,7 @@ public virtual void IdempotentSynchronizationRelease(string eventHubName, /// The ending sequence number of partition state used for publishing. /// [Event(49, Level = EventLevel.Verbose, Message = "Idempotently publishing for Event Hub: {0} (Partition Id: '{1}') is publishing events with the sequence number range from '{2}` to '{3}'.")] + [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2026", Justification = EventSourceSuppressMessage)] public virtual void IdempotentSequencePublish(string eventHubName, string partitionId, long startSequenceNumber, @@ -1009,6 +1012,7 @@ public virtual void IdempotentSequencePublish(string eventHubName, /// The sequence number of partition state after the update. /// [Event(50, Level = EventLevel.Verbose, Message = "Idempotently publishing for Event Hub: {0} (Partition Id: '{1}') has updated the tracked sequence number from '{2}` to '{3}'.")] + [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2026", Justification = EventSourceSuppressMessage)] public virtual void IdempotentSequenceUpdate(string eventHubName, string partitionId, long oldSequenceNumber, @@ -1067,6 +1071,7 @@ public virtual void IdempotentPublishError(string eventHubName, /// The sequence number last published to the partition for the producer group. /// [Event(53, Level = EventLevel.Informational, Message = "Initializing idempotent publishing state for Event Hub: {0} (Partition Id: '{1}'). Producer Group Id: '{2}', Owner Level: '{3}', Last Published Sequence: '{4}'.")] + [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2026", Justification = EventSourceSuppressMessage)] public virtual void IdempotentPublishInitializeState(string eventHubName, string partitionId, long producerGroupId, @@ -1717,6 +1722,7 @@ public virtual void BufferedProducerManagementCycleStart(string identifier, /// The delay, in seconds, that will be observed before the next cycle starts. /// [Event(85, Level = EventLevel.Verbose, Message = "A background management cycle has completed for the buffered producer instance with identifier '{0}' for Event Hub: {1}. Total partition count: '{2}'. Duration: '{3:0.00}' seconds. Next cycle in '{4:0.00}' seconds.")] + [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2026", Justification = EventSourceSuppressMessage)] public virtual void BufferedProducerManagementCycleComplete(string identifier, string eventHubName, int totalPartitionCount, @@ -1808,6 +1814,7 @@ public virtual void BufferedProducerEventBatchPublishStart(string identifier, /// The total duration that the cycle took to complete, in seconds. /// [Event(89, Level = EventLevel.Informational, Message = "Completed publishing a batch of events for buffered producer instance with identifier '{0}' to Event Hub: {1}, Partition Id: '{2}', Operation Id: '{3}', Events in the Batch: '{4}', Duration: '{5:0.00}' seconds.")] + [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2026", Justification = EventSourceSuppressMessage)] public virtual void BufferedProducerEventBatchPublishComplete(string identifier, string eventHubName, string partitionId, @@ -1856,6 +1863,7 @@ public virtual void BufferedProducerEventBatchPublishError(string identifier, /// The duration that operation has been running, in seconds. /// [Event(91, Level = EventLevel.Verbose, Message = "An event has been added to a batch being published for buffered producer instance with identifier '{0}' to Event Hub: {1}, Partition Id: '{2}', Operation Id: '{3}'. Events in the Batch: '{4}'. Current duration of batch building: {5:0.00} seconds.")] + [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2026", Justification = EventSourceSuppressMessage)] public virtual void BufferedProducerEventBatchPublishEventAdded(string identifier, string eventHubName, string partitionId, @@ -1881,6 +1889,7 @@ public virtual void BufferedProducerEventBatchPublishEventAdded(string identifie /// The duration that operation has been running, in seconds. /// [Event(92, Level = EventLevel.Verbose, Message = "No event was available to be read for the batch being published for buffered producer instance with identifier '{0}' to Event Hub: {1}, Partition Id: '{2}', Operation Id: '{3}'. Delay before reading again: {4:0.00} seconds. Current duration of batch building: {5:0.00} seconds.")] + [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2026", Justification = EventSourceSuppressMessage)] public virtual void BufferedProducerEventBatchPublishNoEventRead(string identifier, string eventHubName, string partitionId, @@ -2078,6 +2087,7 @@ public void UnexpectedException(string errorMessage) /// The number of partitions owned at the beginning of the cycle. /// [Event(101, Level = EventLevel.Verbose, Message = "A load balancing cycle has started for the processor instance with identifier '{0}' for Event Hub: {1}. Total partition count: '{2}'. Owned partition count: '{3}'. ")] + [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2026", Justification = EventSourceSuppressMessage)] public virtual void EventProcessorLoadBalancingCycleStart(string identifier, string eventHubName, int totalPartitionCount, @@ -2554,6 +2564,7 @@ public virtual void PartitionProcessorStoppingCancellationWarning(string partiti /// The message for the exception that occurred. /// [Event(122, Level = EventLevel.Warning, Message = "The Event Hubs service is throttling the buffered producer instance with identifier '{0}' for Event Hub: {1}, Partition Id: '{2}', Operation Id: '{3}'. To avoid overloading the service, publishing of this batch will delay for {4} seconds. This batch has attempted a delay to avoid throttling {5} times. This is non-fatal and publishing will continue to retry.")] + [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2026", Justification = EventSourceSuppressMessage)] public virtual void BufferedProducerThrottleDelay(string identifier, string eventHubName, string partitionId, @@ -2799,6 +2810,7 @@ public virtual void EventProcessorFatalTaskError(string identifier, /// A link to the Event Hubs troubleshooting guide. /// [Event(103, Level = EventLevel.Warning, Message = "A load balancing cycle has taken too long to complete for the processor instance with identifier '{0}' for Event Hub: {1}. A slow cycle can cause stability issues with partition ownership. Consider investigating storage latency and thread pool health. Common causes are latency in storage operations and too many partitions owned. You may also want to consider increasing the 'PartitionOwnershipExpirationInterval' in the processor options. Cycle Duration: '{2:0.00}' seconds. Partition Ownership Duration: '{3:0.00}' seconds. {4}")] + [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2026", Justification = EventSourceSuppressMessage)] private void EventProcessorLoadBalancingCycleSlowWarningCore(string identifier, string eventHubName, double durationSeconds, @@ -2821,6 +2833,7 @@ private void EventProcessorLoadBalancingCycleSlowWarningCore(string identifier, /// A link to the Event Hubs troubleshooting guide. /// [Event(104, Level = EventLevel.Warning, Message = "The processor instance with identifier '{0}' for Event Hub: {1} owns a higher than recommended number of partitions for average workloads. Owning too many partitions may cause slow performance and stability issues. Consider monitoring performance and partition ownership stability to ensure that they meet expectations. If not, adding processors to the group may help. Total partition count: '{2}'. Owned partition count: '{3}'. Maximum recommended partitions owned: '{4}'. This warning is based on a general heuristic that will differ between applications. If you are not experiencing issues, this warning is safe to ignore. {5}")] + [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2026", Justification = EventSourceSuppressMessage)] private void EventProcessorHighPartitionOwnershipWarningCore(string identifier, string eventHubName, int totalPartitionCount, @@ -2869,6 +2882,7 @@ private void EventProcessorPartitionProcessingEventPositionDeterminedCore(string /// A link to the Event Hubs troubleshooting guide. /// [Event(128, Level = EventLevel.Warning, Message = "The 'PartitionOwnershipExpirationInterval' and 'LoadBalancingUpdateInterval' are configured using intervals that may cause stability issues with partition ownership for the processor instance with identifier '{0}' for Event Hub: {1}. It is recommended that the 'PartitionOwnershipExpirationInterval' be at least 3 times greater than the 'LoadBalancingUpdateInterval' and very strongly advised that it should be no less than twice as long. When these intervals are too close together, ownership may expire before it is renewed during load balancing which will cause partitions to migrate. Consider adjusting the intervals in the processor options if you experience issues. Load Balancing Interval '{2:0.00}' seconds. Partition Ownership Interval '{3:0.00}' seconds. {4}")] + [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2026", Justification = EventSourceSuppressMessage)] private void ProcessorLoadBalancingIntervalsTooCloseWarningCore(string identifier, string eventHubName, double loadBalancingIntervalSeconds, @@ -2897,6 +2911,7 @@ private void ProcessorLoadBalancingIntervalsTooCloseWarningCore(string identifie /// [NonEvent] [MethodImpl(MethodImplOptions.AggressiveInlining)] + [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2026", Justification = EventSourceSuppressMessage)] private unsafe void EventReceiveCompleteCore(int eventId, string eventHubName, string consumerGroup, @@ -2970,6 +2985,7 @@ private unsafe void EventReceiveCompleteCore(int eventId, /// [NonEvent] [MethodImpl(MethodImplOptions.AggressiveInlining)] + [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2026", Justification = EventSourceSuppressMessage)] private unsafe void EventPublishCompleteCore(int eventId, string eventHubName, string partitionIdOrKey, @@ -3018,6 +3034,7 @@ private unsafe void EventPublishCompleteCore(int eventId, /// [NonEvent] [MethodImpl(MethodImplOptions.AggressiveInlining)] + [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2026", Justification = EventSourceSuppressMessage)] private unsafe void EventProcessorLoadBalancingCycleCompleteCore(int eventId, string identifier, string eventHubName, @@ -3067,6 +3084,7 @@ private unsafe void EventProcessorLoadBalancingCycleCompleteCore(int eventId, /// [NonEvent] [MethodImpl(MethodImplOptions.AggressiveInlining)] + [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2026", Justification = EventSourceSuppressMessage)] private unsafe void BufferedProducerPublishingAwaitAllStartCore(int eventId, string identifier, string eventHubName, @@ -3110,6 +3128,7 @@ private unsafe void BufferedProducerPublishingAwaitAllStartCore(int eventId, /// [NonEvent] [MethodImpl(MethodImplOptions.AggressiveInlining)] + [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2026", Justification = EventSourceSuppressMessage)] private unsafe void BufferedProducerPublishingAwaitCompleteCore(int eventId, string identifier, string eventHubName, @@ -3157,6 +3176,7 @@ private unsafe void BufferedProducerPublishingAwaitCompleteCore(int eventId, /// [NonEvent] [MethodImpl(MethodImplOptions.AggressiveInlining)] + [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2026", Justification = EventSourceSuppressMessage)] private unsafe void BufferedProducerPublishingAwaitStartCore(int eventId, string identifier, string eventHubName, @@ -3201,6 +3221,7 @@ private unsafe void BufferedProducerPublishingAwaitStartCore(int eventId, /// [NonEvent] [MethodImpl(MethodImplOptions.AggressiveInlining)] + [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2026", Justification = EventSourceSuppressMessage)] private unsafe void BufferedProducerPublishingAwaitAllCompleteCore(int eventId, string identifier, string eventHubName, @@ -3249,6 +3270,7 @@ private unsafe void BufferedProducerPublishingAwaitAllCompleteCore(int eventId, /// [NonEvent] [MethodImpl(MethodImplOptions.AggressiveInlining)] + [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2026", Justification = EventSourceSuppressMessage)] private unsafe void BufferedProducerEventEnqueuedCore(int eventId, string identifier, string eventHubName, @@ -3304,6 +3326,7 @@ private unsafe void BufferedProducerEventEnqueuedCore(int eventId, /// [NonEvent] [MethodImpl(MethodImplOptions.AggressiveInlining)] + [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2026", Justification = EventSourceSuppressMessage)] private unsafe void EventProcessorProcessingHandlerStartCore(int eventId, string partitionId, string identifier, @@ -3368,6 +3391,7 @@ private unsafe void EventProcessorProcessingHandlerStartCore(int eventId, /// [NonEvent] [MethodImpl(MethodImplOptions.AggressiveInlining)] + [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2026", Justification = EventSourceSuppressMessage)] private unsafe void EventProcessorProcessingHandlerCompleteCore(int eventId, string partitionId, string identifier, @@ -3424,6 +3448,7 @@ private unsafe void EventProcessorProcessingHandlerCompleteCore(int eventId, /// [NonEvent] [MethodImpl(MethodImplOptions.AggressiveInlining)] + [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2026", Justification = EventSourceSuppressMessage)] private unsafe void BufferedProducerIdleCompleteCore(int eventId, string identifier, string eventHubName, @@ -3470,6 +3495,7 @@ private unsafe void BufferedProducerIdleCompleteCore(int eventId, /// [NonEvent] [MethodImpl(MethodImplOptions.AggressiveInlining)] + [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2026", Justification = EventSourceSuppressMessage)] private unsafe void EventProcessorPartitionProcessingCycleCompleteCore(int eventId, string partitionId, string identifier, @@ -3540,6 +3566,7 @@ private unsafe void EventProcessorPartitionProcessingCycleCompleteCore(int event /// [NonEvent] [MethodImpl(MethodImplOptions.AggressiveInlining)] + [RequiresUnreferencedCode(EventSourceRequiresUnreferencedCodeMessage)] private unsafe void WriteEvent(int eventId, string arg1, string arg2, @@ -3583,6 +3610,7 @@ private unsafe void WriteEvent(int eventId, /// [NonEvent] [MethodImpl(MethodImplOptions.AggressiveInlining)] + [RequiresUnreferencedCode(EventSourceRequiresUnreferencedCodeMessage)] private unsafe void WriteEvent(int eventId, string arg1, string arg2, @@ -3632,6 +3660,7 @@ private unsafe void WriteEvent(int eventId, /// [NonEvent] [MethodImpl(MethodImplOptions.AggressiveInlining)] + [RequiresUnreferencedCode(EventSourceRequiresUnreferencedCodeMessage)] private unsafe void WriteEvent(int eventId, string arg1, string arg2, @@ -3685,6 +3714,7 @@ private unsafe void WriteEvent(int eventId, /// [NonEvent] [MethodImpl(MethodImplOptions.AggressiveInlining)] + [RequiresUnreferencedCode(EventSourceRequiresUnreferencedCodeMessage)] private unsafe void WriteEvent(int eventId, string arg1, string arg2, @@ -3734,6 +3764,7 @@ private unsafe void WriteEvent(int eventId, /// [NonEvent] [MethodImpl(MethodImplOptions.AggressiveInlining)] + [RequiresUnreferencedCode(EventSourceRequiresUnreferencedCodeMessage)] private unsafe void WriteEvent(int eventId, string arg1, string arg2, @@ -3789,6 +3820,7 @@ private unsafe void WriteEvent(int eventId, /// [NonEvent] [MethodImpl(MethodImplOptions.AggressiveInlining)] + [RequiresUnreferencedCode(EventSourceRequiresUnreferencedCodeMessage)] private unsafe void WriteEvent(int eventId, string arg1, string arg2, @@ -3847,6 +3879,7 @@ private unsafe void WriteEvent(int eventId, /// [NonEvent] [MethodImpl(MethodImplOptions.AggressiveInlining)] + [RequiresUnreferencedCode(EventSourceRequiresUnreferencedCodeMessage)] private unsafe void WriteEvent(int eventId, string arg1, string arg2, @@ -3894,6 +3927,7 @@ private unsafe void WriteEvent(int eventId, /// [NonEvent] [MethodImpl(MethodImplOptions.AggressiveInlining)] + [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2026", Justification = EventSourceSuppressMessage)] private unsafe void WriteEvent(int eventId, string arg1, string arg2, @@ -3937,6 +3971,7 @@ private unsafe void WriteEvent(int eventId, /// [NonEvent] [MethodImpl(MethodImplOptions.AggressiveInlining)] + [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2026", Justification = EventSourceSuppressMessage)] private unsafe void WriteEvent(int eventId, string arg1, string arg2, @@ -3986,6 +4021,7 @@ private unsafe void WriteEvent(int eventId, /// [NonEvent] [MethodImpl(MethodImplOptions.AggressiveInlining)] + [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2026", Justification = EventSourceSuppressMessage)] private unsafe void WriteEvent(int eventId, string arg1, string arg2, @@ -4041,6 +4077,7 @@ private unsafe void WriteEvent(int eventId, /// [NonEvent] [MethodImpl(MethodImplOptions.AggressiveInlining)] + [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2026", Justification = EventSourceSuppressMessage)] private unsafe void WriteEvent(int eventId, string arg1, string arg2, @@ -4102,6 +4139,7 @@ private unsafe void WriteEvent(int eventId, /// [NonEvent] [MethodImpl(MethodImplOptions.AggressiveInlining)] + [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2026", Justification = EventSourceSuppressMessage)] private unsafe void WriteEvent(int eventId, string arg1, string arg2, @@ -4168,6 +4206,7 @@ private unsafe void WriteEvent(int eventId, /// [NonEvent] [MethodImpl(MethodImplOptions.AggressiveInlining)] + [RequiresUnreferencedCode(EventSourceRequiresUnreferencedCodeMessage)] private unsafe void WriteEvent(int eventId, string arg1, string arg2, diff --git a/sdk/eventhub/Azure.Messaging.EventHubs/tests/Connection/EventHubConnectionLiveTests.cs b/sdk/eventhub/Azure.Messaging.EventHubs/tests/Connection/EventHubConnectionLiveTests.cs index 39a8be6f94af..bd9bb804f922 100644 --- a/sdk/eventhub/Azure.Messaging.EventHubs/tests/Connection/EventHubConnectionLiveTests.cs +++ b/sdk/eventhub/Azure.Messaging.EventHubs/tests/Connection/EventHubConnectionLiveTests.cs @@ -198,9 +198,11 @@ public async Task ConnectionTransportCanRetrieveProperties(EventHubsTransportTyp await using (EventHubScope scope = await EventHubScope.CreateAsync(partitionCount)) { - var connectionString = EventHubsTestEnvironment.Instance.EventHubsConnectionString; - - await using (var connection = new TestConnectionWithRetryPolicy(connectionString, scope.EventHubName, new EventHubConnectionOptions { TransportType = transportType })) + await using (var connection = new TestConnectionWithRetryPolicy( + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential, + new EventHubConnectionOptions { TransportType = transportType })) { EventHubProperties properties = await connection.GetPropertiesAsync(); @@ -228,18 +230,11 @@ public async Task ConnectionTransportCanRetrievePartitionProperties(EventHubsTra { var options = new EventHubConnectionOptions(); - var credential = new SharedAccessCredential - ( - new SharedAccessSignature - ( - $"{ options.TransportType.GetUriScheme() }://{ EventHubsTestEnvironment.Instance.FullyQualifiedNamespace }/{ scope.EventHubName }".ToLowerInvariant(), - EventHubsTestEnvironment.Instance.SharedAccessKeyName, - EventHubsTestEnvironment.Instance.SharedAccessKey, - TimeSpan.FromHours(4) - ) - ); - - await using (var connection = new TestConnectionWithRetryPolicy(EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, scope.EventHubName, credential, new EventHubConnectionOptions { TransportType = transportType })) + await using (var connection = new TestConnectionWithRetryPolicy( + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential, + new EventHubConnectionOptions { TransportType = transportType })) { var cancellation = new CancellationTokenSource(TimeSpan.FromSeconds(20)); var properties = await connection.GetPropertiesAsync(); @@ -266,9 +261,10 @@ public async Task ConnectionTransportPartitionIdsMatchPartitionProperties() { await using (EventHubScope scope = await EventHubScope.CreateAsync(4)) { - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); - - await using (var connection = new TestConnectionWithRetryPolicy(connectionString)) + await using (var connection = new TestConnectionWithRetryPolicy( + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential)) { EventHubProperties properties = await connection.GetPropertiesAsync(); var partitions = await connection.GetPartitionIdsAsync(); @@ -291,9 +287,10 @@ public async Task ConnectionTransportCannotRetrieveMetadataWhenClosed() { await using (EventHubScope scope = await EventHubScope.CreateAsync(1)) { - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); - - await using (var connection = new TestConnectionWithRetryPolicy(connectionString)) + await using (var connection = new TestConnectionWithRetryPolicy( + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential)) { var partition = (await connection.GetPartitionIdsAsync()).First(); @@ -324,9 +321,10 @@ public async Task ConnectionTransportCannotRetrievePartitionPropertiesWhenPartit { await using (EventHubScope scope = await EventHubScope.CreateAsync(1)) { - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); - - await using (var connection = new TestConnectionWithRetryPolicy(connectionString)) + await using (var connection = new TestConnectionWithRetryPolicy( + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential)) { Assert.That(async () => await connection.GetPartitionPropertiesAsync(invalidPartition), Throws.TypeOf()); } @@ -343,7 +341,6 @@ public async Task ConnectionTransportCannotRetrieveMetadataWhenProxyIsInvalid() { await using (EventHubScope scope = await EventHubScope.CreateAsync(1)) { - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); var retryOptions = new EventHubsRetryOptions { TryTimeout = TimeSpan.FromMinutes(2) }; var clientOptions = new EventHubConnectionOptions @@ -352,8 +349,16 @@ public async Task ConnectionTransportCannotRetrieveMetadataWhenProxyIsInvalid() TransportType = EventHubsTransportType.AmqpWebSockets }; - await using (var connection = new TestConnectionWithRetryPolicy(connectionString)) - await using (var invalidProxyConnection = new TestConnectionWithRetryPolicy(connectionString, clientOptions)) + await using (var connection = new TestConnectionWithRetryPolicy( + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential)) + + await using (var invalidProxyConnection = new TestConnectionWithRetryPolicy( + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential, + clientOptions)) { connection.RetryPolicy = new BasicRetryPolicy(retryOptions); invalidProxyConnection.RetryPolicy = new BasicRetryPolicy(retryOptions); @@ -377,7 +382,6 @@ public async Task ConnectionTransportCannotRetrieveMetadataWhenCustomValidationR { await using (EventHubScope scope = await EventHubScope.CreateAsync(1)) { - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); var retryOptions = new EventHubsRetryOptions { TryTimeout = TimeSpan.FromMinutes(2) }; var clientOptions = new EventHubConnectionOptions @@ -385,8 +389,16 @@ public async Task ConnectionTransportCannotRetrieveMetadataWhenCustomValidationR CertificateValidationCallback = (object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors errors) => false }; - await using (var connection = new TestConnectionWithRetryPolicy(connectionString)) - await using (var certificateRejectingConnection = new TestConnectionWithRetryPolicy(connectionString, clientOptions)) + await using (var connection = new TestConnectionWithRetryPolicy( + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential)) + + await using (var certificateRejectingConnection = new TestConnectionWithRetryPolicy( + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential, + clientOptions)) { connection.RetryPolicy = new BasicRetryPolicy(retryOptions); certificateRejectingConnection.RetryPolicy = new BasicRetryPolicy(retryOptions); @@ -410,7 +422,6 @@ public async Task ConnectionTransportCanRetrieveMetadataWhenCustomValidationAcce { await using (EventHubScope scope = await EventHubScope.CreateAsync(1)) { - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); var retryOptions = new EventHubsRetryOptions { TryTimeout = TimeSpan.FromMinutes(2) }; var clientOptions = new EventHubConnectionOptions @@ -418,7 +429,11 @@ public async Task ConnectionTransportCanRetrieveMetadataWhenCustomValidationAcce CertificateValidationCallback = (object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors errors) => true }; - await using (var connection = new TestConnectionWithRetryPolicy(connectionString, clientOptions)) + await using (var connection = new TestConnectionWithRetryPolicy( + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential, + clientOptions)) { connection.RetryPolicy = new BasicRetryPolicy(retryOptions); diff --git a/sdk/eventhub/Azure.Messaging.EventHubs/tests/Consumer/EventHubConsumerClientLiveTests.cs b/sdk/eventhub/Azure.Messaging.EventHubs/tests/Consumer/EventHubConsumerClientLiveTests.cs index 4188aa6467ab..b322cbc6777d 100644 --- a/sdk/eventhub/Azure.Messaging.EventHubs/tests/Consumer/EventHubConsumerClientLiveTests.cs +++ b/sdk/eventhub/Azure.Messaging.EventHubs/tests/Consumer/EventHubConsumerClientLiveTests.cs @@ -56,9 +56,11 @@ public async Task ConsumerWithNoOptionsCanRead(EventHubsTransportType transportT using var cancellationSource = new CancellationTokenSource(); cancellationSource.CancelAfter(EventHubsTestEnvironment.Instance.TestExecutionTimeLimit); - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); - - await using (var connection = new EventHubConnection(connectionString, new EventHubConnectionOptions { TransportType = transportType })) + await using (var connection = new EventHubConnection( + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential, + new EventHubConnectionOptions { TransportType = transportType })) { var partition = (await connection.GetPartitionIdsAsync(new EventHubsRetryOptions().ToRetryPolicy(), cancellationSource.Token)).First(); @@ -91,7 +93,12 @@ public async Task ConsumerWithOptionsCanRead(EventHubsTransportType transportTyp options.RetryOptions.MaximumRetries = 7; options.ConnectionOptions.TransportType = transportType; - await using (var consumer = new EventHubConsumerClient(EventHubConsumerClient.DefaultConsumerGroupName, EventHubsTestEnvironment.Instance.EventHubsConnectionString, scope.EventHubName, options)) + await using (var consumer = new EventHubConsumerClient( + EventHubConsumerClient.DefaultConsumerGroupName, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential, + options)) { var partition = (await consumer.GetPartitionIdsAsync(cancellationSource.Token)).First(); Assert.That(async () => await ReadNothingAsync(consumer, partition, cancellationSource.Token, EventPosition.Latest), Throws.Nothing); @@ -125,7 +132,12 @@ public async Task ConsumerWithCustomBufferSizesCanRead(EventHubsTransportType tr } }; - await using (var consumer = new EventHubConsumerClient(EventHubConsumerClient.DefaultConsumerGroupName, EventHubsTestEnvironment.Instance.EventHubsConnectionString, scope.EventHubName, options)) + await using (var consumer = new EventHubConsumerClient( + EventHubConsumerClient.DefaultConsumerGroupName, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential, + options)) { var partition = (await consumer.GetPartitionIdsAsync(cancellationSource.Token)).First(); Assert.That(async () => await ReadNothingAsync(consumer, partition, cancellationSource.Token, EventPosition.Latest), Throws.Nothing); @@ -148,13 +160,16 @@ public async Task ConsumerCanReadSingleZeroLengthEvent() using var cancellationSource = new CancellationTokenSource(); cancellationSource.CancelAfter(EventHubsTestEnvironment.Instance.TestExecutionTimeLimit); - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); var singleEvent = EventGenerator.CreateEventFromBody(Array.Empty()); - await using (var consumer = new EventHubConsumerClient(EventHubConsumerClient.DefaultConsumerGroupName, connectionString)) + await using (var consumer = new EventHubConsumerClient( + EventHubConsumerClient.DefaultConsumerGroupName, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential)) { var partition = (await consumer.GetPartitionIdsAsync(cancellationSource.Token)).First(); - await SendEventsAsync(connectionString, new EventData[] { singleEvent }, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); + await SendEventsAsync(scope.EventHubName, new EventData[] { singleEvent }, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); // Read the events and validate the resulting state. @@ -182,13 +197,16 @@ public async Task ConsumerCanReadSingleEvent() using var cancellationSource = new CancellationTokenSource(); cancellationSource.CancelAfter(EventHubsTestEnvironment.Instance.TestExecutionTimeLimit); - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); var singleEvent = EventGenerator.CreateEvents(1).Single(); - await using (var consumer = new EventHubConsumerClient(EventHubConsumerClient.DefaultConsumerGroupName, connectionString)) + await using (var consumer = new EventHubConsumerClient( + EventHubConsumerClient.DefaultConsumerGroupName, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential)) { var partition = (await consumer.GetPartitionIdsAsync(cancellationSource.Token)).First(); - await SendEventsAsync(connectionString, new EventData[] { singleEvent }, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); + await SendEventsAsync(scope.EventHubName, new EventData[] { singleEvent }, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); // Read the events and validate the resulting state. @@ -220,12 +238,15 @@ public async Task ConsumerCanReadSingleLargeEvent() new Random().NextBytes(buffer); var singleEvent = EventGenerator.CreateEventFromBody(buffer); - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); - await using (var consumer = new EventHubConsumerClient(EventHubConsumerClient.DefaultConsumerGroupName, connectionString)) + await using (var consumer = new EventHubConsumerClient( + EventHubConsumerClient.DefaultConsumerGroupName, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential)) { var partition = (await consumer.GetPartitionIdsAsync(cancellationSource.Token)).First(); - await SendEventsAsync(connectionString, new EventData[] { singleEvent }, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); + await SendEventsAsync(scope.EventHubName, new EventData[] { singleEvent }, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); // Read the events and validate the resulting state. @@ -253,17 +274,19 @@ public async Task ConsumerCanReadBatchOfZeroLengthEvents() using var cancellationSource = new CancellationTokenSource(); cancellationSource.CancelAfter(EventHubsTestEnvironment.Instance.TestExecutionTimeLimit); - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); - var sourceEvents = Enumerable .Range(0, 25) .Select(index => EventGenerator.CreateEventFromBody(Array.Empty())) .ToList(); - await using (var consumer = new EventHubConsumerClient(EventHubConsumerClient.DefaultConsumerGroupName, connectionString)) + await using (var consumer = new EventHubConsumerClient( + EventHubConsumerClient.DefaultConsumerGroupName, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential)) { var partition = (await consumer.GetPartitionIdsAsync(cancellationSource.Token)).First(); - await SendEventsAsync(connectionString, sourceEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); + await SendEventsAsync(scope.EventHubName, sourceEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); // Read the events and validate the resulting state. @@ -295,13 +318,16 @@ public async Task ConsumerCanReadBatchOfEvents() using var cancellationSource = new CancellationTokenSource(); cancellationSource.CancelAfter(EventHubsTestEnvironment.Instance.TestExecutionTimeLimit); - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); var sourceEvents = EventGenerator.CreateEvents(200).ToList(); - await using (var consumer = new EventHubConsumerClient(EventHubConsumerClient.DefaultConsumerGroupName, connectionString)) + await using (var consumer = new EventHubConsumerClient( + EventHubConsumerClient.DefaultConsumerGroupName, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential)) { var partition = (await consumer.GetPartitionIdsAsync(cancellationSource.Token)).First(); - await SendEventsAsync(connectionString, sourceEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); + await SendEventsAsync(scope.EventHubName, sourceEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); // Read the events and validate the resulting state. @@ -333,13 +359,16 @@ public async Task ConsumerWithAnIdentifierCanReadEvents() using var cancellationSource = new CancellationTokenSource(); cancellationSource.CancelAfter(EventHubsTestEnvironment.Instance.TestExecutionTimeLimit); - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); var sourceEvents = EventGenerator.CreateEvents(200).ToList(); - - await using (var consumer = new EventHubConsumerClient(EventHubConsumerClient.DefaultConsumerGroupName, connectionString, new EventHubConsumerClientOptions { Identifier = "BobTheConsumer" })) + await using (var consumer = new EventHubConsumerClient( + EventHubConsumerClient.DefaultConsumerGroupName, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential, + new EventHubConsumerClientOptions { Identifier = "BobTheConsumer" })) { var partition = (await consumer.GetPartitionIdsAsync(cancellationSource.Token)).First(); - await SendEventsAsync(connectionString, sourceEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); + await SendEventsAsync(scope.EventHubName, sourceEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); // Read the events and validate the resulting state. @@ -371,13 +400,16 @@ public async Task ConsumerCanReadBatchOfEventsWithCustomPrefetchAndBatchCounts() using var cancellationSource = new CancellationTokenSource(); cancellationSource.CancelAfter(EventHubsTestEnvironment.Instance.TestExecutionTimeLimit); - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); var sourceEvents = EventGenerator.CreateEvents(200).ToList(); - await using (var consumer = new EventHubConsumerClient(EventHubConsumerClient.DefaultConsumerGroupName, connectionString)) + await using (var consumer = new EventHubConsumerClient( + EventHubConsumerClient.DefaultConsumerGroupName, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential)) { var partition = (await consumer.GetPartitionIdsAsync(cancellationSource.Token)).First(); - await SendEventsAsync(connectionString, sourceEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); + await SendEventsAsync(scope.EventHubName, sourceEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); // Read the events and validate the resulting state. @@ -410,13 +442,16 @@ public async Task ConsumerCanReadBatchOfEventsWithCustomPrefetchAndBatchCountsAn using var cancellationSource = new CancellationTokenSource(); cancellationSource.CancelAfter(EventHubsTestEnvironment.Instance.TestExecutionTimeLimit); - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); var sourceEvents = EventGenerator.CreateEvents(200).ToList(); - await using (var consumer = new EventHubConsumerClient(EventHubConsumerClient.DefaultConsumerGroupName, connectionString)) + await using (var consumer = new EventHubConsumerClient( + EventHubConsumerClient.DefaultConsumerGroupName, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential)) { var partition = (await consumer.GetPartitionIdsAsync(cancellationSource.Token)).First(); - await SendEventsAsync(connectionString, sourceEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); + await SendEventsAsync(scope.EventHubName, sourceEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); // Read the events and validate the resulting state. @@ -449,13 +484,16 @@ public async Task ConsumerCanReadEventsWithPrefetchDisabled() using var cancellationSource = new CancellationTokenSource(); cancellationSource.CancelAfter(EventHubsTestEnvironment.Instance.TestExecutionTimeLimit); - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); var sourceEvents = EventGenerator.CreateEvents(200).ToList(); - await using (var consumer = new EventHubConsumerClient(EventHubConsumerClient.DefaultConsumerGroupName, connectionString)) + await using (var consumer = new EventHubConsumerClient( + EventHubConsumerClient.DefaultConsumerGroupName, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential)) { var partition = (await consumer.GetPartitionIdsAsync(cancellationSource.Token)).First(); - await SendEventsAsync(connectionString, sourceEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); + await SendEventsAsync(scope.EventHubName, sourceEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); // Read the events and validate the resulting state. @@ -487,8 +525,6 @@ [Test]public async Task ConsumerCanReadEventsWithCustomProperties() using var cancellationSource = new CancellationTokenSource(); cancellationSource.CancelAfter(EventHubsTestEnvironment.Instance.TestExecutionTimeLimit); - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); - var sourceEvents = EventGenerator.CreateEvents(50) .Select(current => { @@ -499,10 +535,14 @@ [Test]public async Task ConsumerCanReadEventsWithCustomProperties() }) .ToList(); - await using (var consumer = new EventHubConsumerClient(EventHubConsumerClient.DefaultConsumerGroupName, connectionString)) + await using (var consumer = new EventHubConsumerClient( + EventHubConsumerClient.DefaultConsumerGroupName, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential)) { var partition = (await consumer.GetPartitionIdsAsync(cancellationSource.Token)).First(); - await SendEventsAsync(connectionString, sourceEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); + await SendEventsAsync(scope.EventHubName, sourceEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); // Read the events and validate the resulting state. @@ -533,8 +573,6 @@ [Test]public async Task ConsumerCanReadEventsWithBinaryProperties() using var cancellationSource = new CancellationTokenSource(); cancellationSource.CancelAfter(EventHubsTestEnvironment.Instance.TestExecutionTimeLimit); - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); - var sourceEvents = EventGenerator.CreateEvents(5) .Select(current => { @@ -545,10 +583,14 @@ [Test]public async Task ConsumerCanReadEventsWithBinaryProperties() }) .ToList(); - await using (var consumer = new EventHubConsumerClient(EventHubConsumerClient.DefaultConsumerGroupName, connectionString)) + await using (var consumer = new EventHubConsumerClient( + EventHubConsumerClient.DefaultConsumerGroupName, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential)) { var partition = (await consumer.GetPartitionIdsAsync(cancellationSource.Token)).First(); - await SendEventsAsync(connectionString, sourceEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); + await SendEventsAsync(scope.EventHubName, sourceEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); // Read the events and validate the resulting state. @@ -573,22 +615,19 @@ [Test]public async Task ConsumerCanReadEventsWithBinaryProperties() ///
/// [Test] - public async Task ConsumerCanReadEventsUsingAnIdentityCredential() + public async Task ConsumerCanReadEventsUsingTheConnectionString() { await using (EventHubScope scope = await EventHubScope.CreateAsync(1)) { using var cancellationSource = new CancellationTokenSource(); cancellationSource.CancelAfter(EventHubsTestEnvironment.Instance.TestExecutionTimeLimit); - var credential = EventHubsTestEnvironment.Instance.Credential; var sourceEvents = EventGenerator.CreateEvents(50).ToList(); - await using (var consumer = new EventHubConsumerClient(EventHubConsumerClient.DefaultConsumerGroupName, EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, scope.EventHubName, credential)) + await using (var consumer = new EventHubConsumerClient(EventHubConsumerClient.DefaultConsumerGroupName, EventHubsTestEnvironment.Instance.EventHubsConnectionString, scope.EventHubName)) { var partition = (await consumer.GetPartitionIdsAsync(cancellationSource.Token)).First(); - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); - - await SendEventsAsync(connectionString, sourceEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); + await SendEventsAsync(scope.EventHubName, sourceEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); // Read the events and validate the resulting state. @@ -626,9 +665,7 @@ public async Task ConsumerCanReadEventsUsingTheSharedKeyCredential() await using (var consumer = new EventHubConsumerClient(EventHubConsumerClient.DefaultConsumerGroupName, EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, scope.EventHubName, credential)) { var partition = (await consumer.GetPartitionIdsAsync(cancellationSource.Token)).First(); - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); - - await SendEventsAsync(connectionString, sourceEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); + await SendEventsAsync(scope.EventHubName, sourceEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); // Read the events and validate the resulting state. @@ -669,9 +706,7 @@ public async Task ConsumerCanReadEventsUsingTheSasCredential() await using (var consumer = new EventHubConsumerClient(EventHubConsumerClient.DefaultConsumerGroupName, EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, scope.EventHubName, credential, options)) { var partition = (await consumer.GetPartitionIdsAsync(cancellationSource.Token)).First(); - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); - - await SendEventsAsync(connectionString, sourceEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); + await SendEventsAsync(scope.EventHubName, sourceEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); // Read the events and validate the resulting state. @@ -703,13 +738,16 @@ public async Task ConsumerCanReadFromEarliest() using var cancellationSource = new CancellationTokenSource(); cancellationSource.CancelAfter(EventHubsTestEnvironment.Instance.TestExecutionTimeLimit); - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); var sourceEvents = EventGenerator.CreateEvents(200).ToList(); - await using (var consumer = new EventHubConsumerClient(EventHubConsumerClient.DefaultConsumerGroupName, connectionString)) + await using (var consumer = new EventHubConsumerClient( + EventHubConsumerClient.DefaultConsumerGroupName, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential)) { var partition = (await consumer.GetPartitionIdsAsync(cancellationSource.Token)).First(); - await SendEventsAsync(connectionString, sourceEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); + await SendEventsAsync(scope.EventHubName, sourceEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); // Read the events and validate the resulting state. @@ -741,15 +779,18 @@ public async Task ConsumerCanReadFromLatest() using var cancellationSource = new CancellationTokenSource(); cancellationSource.CancelAfter(EventHubsTestEnvironment.Instance.TestExecutionTimeLimit); - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); var sourceEvents = EventGenerator.CreateEvents(200).ToList(); - await using (var consumer = new EventHubConsumerClient(EventHubConsumerClient.DefaultConsumerGroupName, connectionString)) + await using (var consumer = new EventHubConsumerClient( + EventHubConsumerClient.DefaultConsumerGroupName, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential)) { // Send a set of seed events to the partition, which should not be read. var partition = (await consumer.GetPartitionIdsAsync(cancellationSource.Token)).First(); - await SendEventsAsync(connectionString, EventGenerator.CreateEvents(50), new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); + await SendEventsAsync(scope.EventHubName, EventGenerator.CreateEvents(50), new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); // Begin reading though no events have been published. This is necessary to open the connection and // ensure that the consumer is watching the partition. @@ -759,7 +800,7 @@ public async Task ConsumerCanReadFromLatest() // Give the consumer a moment to ensure that it is established and then send events for it to read. await Task.Delay(250); - await SendEventsAsync(connectionString, sourceEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); + await SendEventsAsync(scope.EventHubName, sourceEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); // Await reading of the events and validate the resulting state. @@ -794,11 +835,14 @@ public async Task ConsumerCanReadFromOffset(bool isInclusive) using var cancellationSource = new CancellationTokenSource(); cancellationSource.CancelAfter(EventHubsTestEnvironment.Instance.TestExecutionTimeLimit); - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); var seedEvents = EventGenerator.CreateEvents(50).ToList(); var sourceEvents = EventGenerator.CreateEvents(100).ToList(); - await using (var consumer = new EventHubConsumerClient(EventHubConsumerClient.DefaultConsumerGroupName, connectionString)) + await using (var consumer = new EventHubConsumerClient( + EventHubConsumerClient.DefaultConsumerGroupName, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential)) { // Seed the partition with a set of events prior to reading. When the send call returns, all events were // accepted by the Event Hubs service and should be available in the partition. Provide a minor delay to @@ -806,7 +850,7 @@ public async Task ConsumerCanReadFromOffset(bool isInclusive) var partition = (await consumer.GetPartitionIdsAsync(cancellationSource.Token)).First(); - await SendEventsAsync(connectionString, seedEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); + await SendEventsAsync(scope.EventHubName, seedEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); await Task.Delay(250); // Query the partition and determine the offset of the last enqueued event, then send the new set @@ -815,7 +859,7 @@ public async Task ConsumerCanReadFromOffset(bool isInclusive) var lastOffset = (await consumer.GetPartitionPropertiesAsync(partition, cancellationSource.Token)).LastEnqueuedOffset; var startingPosition = EventPosition.FromOffset(lastOffset, isInclusive); - await SendEventsAsync(connectionString, sourceEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); + await SendEventsAsync(scope.EventHubName, sourceEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); // Read the events and validate the resulting state. @@ -861,11 +905,14 @@ public async Task ConsumerCanReadFromSequenceNumber(bool isInclusive) using var cancellationSource = new CancellationTokenSource(); cancellationSource.CancelAfter(EventHubsTestEnvironment.Instance.TestExecutionTimeLimit); - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); var seedEvents = EventGenerator.CreateEvents(50).ToList(); var sourceEvents = EventGenerator.CreateEvents(100).ToList(); - await using (var consumer = new EventHubConsumerClient(EventHubConsumerClient.DefaultConsumerGroupName, connectionString)) + await using (var consumer = new EventHubConsumerClient( + EventHubConsumerClient.DefaultConsumerGroupName, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential)) { // Seed the partition with a set of events prior to reading. When the send call returns, all events were // accepted by the Event Hubs service and should be available in the partition. Provide a minor delay to @@ -873,7 +920,7 @@ public async Task ConsumerCanReadFromSequenceNumber(bool isInclusive) var partition = (await consumer.GetPartitionIdsAsync(cancellationSource.Token)).First(); - await SendEventsAsync(connectionString, seedEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); + await SendEventsAsync(scope.EventHubName, seedEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); await Task.Delay(250); // Query the partition and determine the offset of the last enqueued event, then send the new set @@ -882,7 +929,7 @@ public async Task ConsumerCanReadFromSequenceNumber(bool isInclusive) var lastSequence = (await consumer.GetPartitionPropertiesAsync(partition, cancellationSource.Token)).LastEnqueuedSequenceNumber; var startingPosition = EventPosition.FromSequenceNumber(lastSequence, isInclusive); - await SendEventsAsync(connectionString, sourceEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); + await SendEventsAsync(scope.EventHubName, sourceEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); // Read the events and validate the resulting state. @@ -926,11 +973,14 @@ public async Task ConsumerCanReadFromEnqueuedTime() using var cancellationSource = new CancellationTokenSource(); cancellationSource.CancelAfter(EventHubsTestEnvironment.Instance.TestExecutionTimeLimit); - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); var seedEvents = EventGenerator.CreateEvents(50).ToList(); var sourceEvents = EventGenerator.CreateEvents(100).ToList(); - await using (var consumer = new EventHubConsumerClient(EventHubConsumerClient.DefaultConsumerGroupName, connectionString)) + await using (var consumer = new EventHubConsumerClient( + EventHubConsumerClient.DefaultConsumerGroupName, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential)) { // Seed the partition with a set of events prior to reading. When the send call returns, all events were // accepted by the Event Hubs service and should be available in the partition. Provide a minor delay to @@ -938,7 +988,7 @@ public async Task ConsumerCanReadFromEnqueuedTime() var partition = (await consumer.GetPartitionIdsAsync(cancellationSource.Token)).First(); - await SendEventsAsync(connectionString, seedEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); + await SendEventsAsync(scope.EventHubName, seedEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); await Task.Delay(TimeSpan.FromSeconds(2)); // Query the partition and determine the offset of the last enqueued event, then send the new set @@ -947,7 +997,7 @@ public async Task ConsumerCanReadFromEnqueuedTime() var lastEnqueuedTime = (await consumer.GetPartitionPropertiesAsync(partition, cancellationSource.Token)).LastEnqueuedTime; var startingPosition = EventPosition.FromEnqueuedTime(lastEnqueuedTime); - await SendEventsAsync(connectionString, sourceEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); + await SendEventsAsync(scope.EventHubName, sourceEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); // Read the events and validate the resulting state. @@ -984,18 +1034,22 @@ public async Task ConsumerCanReadConcurrentlyFromMultiplePartitions() using var cancellationSource = new CancellationTokenSource(); cancellationSource.CancelAfter(EventHubsTestEnvironment.Instance.TestExecutionTimeLimit); - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); var sourceEvents = EventGenerator.CreateEvents(200).ToList(); var expectedEvents = sourceEvents.Select(evt => evt.MessageId); - await using (var consumer = new EventHubConsumerClient(EventHubConsumerClient.DefaultConsumerGroupName, connectionString, new EventHubConsumerClientOptions { Identifier = "BobTheConsumer" })) + await using (var consumer = new EventHubConsumerClient( + EventHubConsumerClient.DefaultConsumerGroupName, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential, + new EventHubConsumerClientOptions { Identifier = "BobTheConsumer" })) { var partitions = await consumer.GetPartitionIdsAsync(cancellationSource.Token); await Task.WhenAll ( - SendEventsAsync(connectionString, sourceEvents, new CreateBatchOptions { PartitionId = partitions[0] }, cancellationSource.Token), - SendEventsAsync(connectionString, sourceEvents, new CreateBatchOptions { PartitionId = partitions[1] }, cancellationSource.Token) + SendEventsAsync(scope.EventHubName, sourceEvents, new CreateBatchOptions { PartitionId = partitions[0] }, cancellationSource.Token), + SendEventsAsync(scope.EventHubName, sourceEvents, new CreateBatchOptions { PartitionId = partitions[1] }, cancellationSource.Token) ); // Read the events and validate the resulting state. @@ -1041,15 +1095,23 @@ public async Task ConsumerCanReadFromMultipleConsumerGroups() using var cancellationSource = new CancellationTokenSource(); cancellationSource.CancelAfter(EventHubsTestEnvironment.Instance.TestExecutionTimeLimit); - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); var sourceEvents = EventGenerator.CreateEvents(100).ToList(); var expectedEvents = sourceEvents.Select(evt => evt.MessageId); - await using (var customConsumer = new EventHubConsumerClient(customConsumerGroup, connectionString)) - await using (var defaultConsumer = new EventHubConsumerClient(EventHubConsumerClient.DefaultConsumerGroupName, connectionString)) + await using (var customConsumer = new EventHubConsumerClient( + EventHubConsumerClient.DefaultConsumerGroupName, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential)) + + await using (var defaultConsumer = new EventHubConsumerClient( + EventHubConsumerClient.DefaultConsumerGroupName, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential)) { var partition = (await defaultConsumer.GetPartitionIdsAsync(cancellationSource.Token)).First(); - await SendEventsAsync(connectionString, sourceEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); + await SendEventsAsync(scope.EventHubName, sourceEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); // Read the events and validate the resulting state. @@ -1089,15 +1151,16 @@ public async Task ConsumerCannotReadAcrossPartitions() using var cancellationSource = new CancellationTokenSource(); cancellationSource.CancelAfter(EventHubsTestEnvironment.Instance.TestExecutionTimeLimit); - var credential = EventHubsTestEnvironment.Instance.Credential; var sourceEvents = EventGenerator.CreateEvents(50).ToList(); - await using (var consumer = new EventHubConsumerClient(EventHubConsumerClient.DefaultConsumerGroupName, EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, scope.EventHubName, credential)) + await using (var consumer = new EventHubConsumerClient( + EventHubConsumerClient.DefaultConsumerGroupName, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential)) { var partitions = (await consumer.GetPartitionIdsAsync(cancellationSource.Token)).ToArray(); - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); - - await SendEventsAsync(connectionString, sourceEvents, new CreateBatchOptions { PartitionId = partitions[0] }, cancellationSource.Token); + await SendEventsAsync(scope.EventHubName, sourceEvents, new CreateBatchOptions { PartitionId = partitions[0] }, cancellationSource.Token); // Attempt to read from the empty partition and verify that no events are observed. Because no events are expected, the // read operation will not naturally complete; limit the read to only a couple of seconds and trigger cancellation. @@ -1129,13 +1192,16 @@ public async Task ConsumerCannotReadWhenClosed() using var cancellationSource = new CancellationTokenSource(); cancellationSource.CancelAfter(EventHubsTestEnvironment.Instance.TestExecutionTimeLimit); - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); var sourceEvents = EventGenerator.CreateSmallEvents(100).ToList(); - await using (var consumer = new EventHubConsumerClient(EventHubConsumerClient.DefaultConsumerGroupName, connectionString)) + await using (var consumer = new EventHubConsumerClient( + EventHubConsumerClient.DefaultConsumerGroupName, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential)) { var partition = (await consumer.GetPartitionIdsAsync(cancellationSource.Token)).First(); - await SendEventsAsync(connectionString, sourceEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); + await SendEventsAsync(scope.EventHubName, sourceEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); // Create a local function that will close the consumer after five events have // been read. Because the close happens in the middle of iteration, allow for a short @@ -1175,14 +1241,13 @@ public async Task ConsumerCannotReadWhenSharedConnectionIsClosed() using var cancellationSource = new CancellationTokenSource(); cancellationSource.CancelAfter(EventHubsTestEnvironment.Instance.TestExecutionTimeLimit); - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); var sourceEvents = EventGenerator.CreateSmallEvents(100).ToList(); - await using (var connection = new EventHubConnection(connectionString)) + await using (var connection = new EventHubConnection(EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, scope.EventHubName, EventHubsTestEnvironment.Instance.Credential)) await using (var consumer = new EventHubConsumerClient(EventHubConsumerClient.DefaultConsumerGroupName, connection)) { var partition = (await consumer.GetPartitionIdsAsync(cancellationSource.Token)).First(); - await SendEventsAsync(connectionString, sourceEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); + await SendEventsAsync(scope.EventHubName, sourceEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); // Create a local function that will close the connection after five events have // been read. Because the close happens in the middle of iteration, allow for a short @@ -1222,7 +1287,11 @@ public async Task ConsumerCannotReadFromInvalidPartition() using var cancellationSource = new CancellationTokenSource(); cancellationSource.CancelAfter(EventHubsTestEnvironment.Instance.TestExecutionTimeLimit); - await using (var consumer = new EventHubConsumerClient(EventHubConsumerClient.DefaultConsumerGroupName, EventHubsTestEnvironment.Instance.EventHubsConnectionString, scope.EventHubName)) + await using (var consumer = new EventHubConsumerClient( + EventHubConsumerClient.DefaultConsumerGroupName, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential)) { var invalidPartition = "-1"; var readTask = ReadNothingAsync(consumer, invalidPartition, cancellationSource.Token); @@ -1250,8 +1319,8 @@ public async Task ConsumerCannotReadFromInvalidConsumerGroup() var invalidConsumerGroup = "ThisIsFake"; - await using (var producer = new EventHubProducerClient(EventHubsTestEnvironment.Instance.EventHubsConnectionString, scope.EventHubName)) - await using (var consumer = new EventHubConsumerClient(invalidConsumerGroup, EventHubsTestEnvironment.Instance.EventHubsConnectionString, scope.EventHubName)) + await using (var producer = new EventHubProducerClient(EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, scope.EventHubName, EventHubsTestEnvironment.Instance.Credential)) + await using (var consumer = new EventHubConsumerClient(invalidConsumerGroup, EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, scope.EventHubName, EventHubsTestEnvironment.Instance.Credential)) { var partition = (await producer.GetPartitionIdsAsync(cancellationSource.Token)).First(); var readTask = ReadNothingAsync(consumer, partition, cancellationSource.Token); @@ -1284,8 +1353,8 @@ public async Task ConsumerCannotReadWithInvalidProxy() clientOptions.ConnectionOptions.Proxy = new WebProxy("http://1.2.3.4:9999"); clientOptions.ConnectionOptions.TransportType = EventHubsTransportType.AmqpWebSockets; - await using (var producer = new EventHubProducerClient(EventHubsTestEnvironment.Instance.EventHubsConnectionString, scope.EventHubName)) - await using (var invalidProxyConsumer = new EventHubConsumerClient(EventHubConsumerClient.DefaultConsumerGroupName, EventHubsTestEnvironment.Instance.EventHubsConnectionString, scope.EventHubName, clientOptions)) + await using (var producer = new EventHubProducerClient(EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, scope.EventHubName, EventHubsTestEnvironment.Instance.Credential)) + await using (var invalidProxyConsumer = new EventHubConsumerClient(EventHubConsumerClient.DefaultConsumerGroupName, EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, scope.EventHubName, EventHubsTestEnvironment.Instance.Credential, clientOptions)) { var partition = (await producer.GetPartitionIdsAsync(cancellationSource.Token)).First(); @@ -1316,13 +1385,16 @@ public async Task ConsumerCannotReadAsNonExclusiveWhenAnExclusiveReaderIsActive( exclusiveOptions.PrefetchCount = LowPrefetchCount; exclusiveOptions.OwnerLevel = 20; - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); var sourceEvents = EventGenerator.CreateSmallEvents(200).ToList(); - await using (var consumer = new EventHubConsumerClient(EventHubConsumerClient.DefaultConsumerGroupName, connectionString)) + await using (var consumer = new EventHubConsumerClient( + EventHubConsumerClient.DefaultConsumerGroupName, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential)) { var partition = (await consumer.GetPartitionIdsAsync(cancellationSource.Token)).First(); - await SendEventsAsync(connectionString, sourceEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); + await SendEventsAsync(scope.EventHubName, sourceEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); var exclusiveMonitor = MonitorReadingEventsFromPartition(consumer, partition, null, cancellationSource.Token, readOptions: exclusiveOptions); await Task.WhenAny(exclusiveMonitor.StartCompletion.Task, Task.Delay(Timeout.Infinite, cancellationSource.Token)); @@ -1359,13 +1431,16 @@ public async Task ConsumerCannotReadWithLowerOwnerLevelThanActiveReader() lowerOptions.PrefetchCount = LowPrefetchCount; lowerOptions.OwnerLevel = 20; - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); var sourceEvents = EventGenerator.CreateSmallEvents(200).ToList(); - await using (var consumer = new EventHubConsumerClient(EventHubConsumerClient.DefaultConsumerGroupName, connectionString)) + await using (var consumer = new EventHubConsumerClient( + EventHubConsumerClient.DefaultConsumerGroupName, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential)) { var partition = (await consumer.GetPartitionIdsAsync(cancellationSource.Token)).First(); - await SendEventsAsync(connectionString, sourceEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); + await SendEventsAsync(scope.EventHubName, sourceEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); var higherMonitor = MonitorReadingEventsFromPartition(consumer, partition, null, cancellationSource.Token, readOptions: higherOptions); await Task.WhenAny(higherMonitor.StartCompletion.Task, Task.Delay(Timeout.Infinite, cancellationSource.Token)); @@ -1402,11 +1477,14 @@ public async Task ConsumerCanReadFromMultiplePartitionsWithDifferentActiveOwnerL lowerOptions.PrefetchCount = LowPrefetchCount; lowerOptions.OwnerLevel = 20; - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); var sourceEvents = EventGenerator.CreateSmallEvents(100).ToList(); var expectedEvents = sourceEvents.Select(evt => evt.MessageId); - await using (var consumer = new EventHubConsumerClient(EventHubConsumerClient.DefaultConsumerGroupName, connectionString)) + await using (var consumer = new EventHubConsumerClient( + EventHubConsumerClient.DefaultConsumerGroupName, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential)) { var partitions = (await consumer.GetPartitionIdsAsync(cancellationSource.Token)).Take(2).ToArray(); @@ -1414,8 +1492,8 @@ public async Task ConsumerCanReadFromMultiplePartitionsWithDifferentActiveOwnerL await Task.WhenAll ( - SendEventsAsync(connectionString, sourceEvents, new CreateBatchOptions { PartitionId = partitions[0] }, cancellationSource.Token), - SendEventsAsync(connectionString, sourceEvents, new CreateBatchOptions { PartitionId = partitions[1] }, cancellationSource.Token) + SendEventsAsync(scope.EventHubName, sourceEvents, new CreateBatchOptions { PartitionId = partitions[0] }, cancellationSource.Token), + SendEventsAsync(scope.EventHubName, sourceEvents, new CreateBatchOptions { PartitionId = partitions[1] }, cancellationSource.Token) ); // Read from each partition, allowing the higher level operation to begin first. Both read operations should be @@ -1462,15 +1540,23 @@ public async Task ConsumerCanReadFromMultipleConsumerGroupsWithDifferentActiveOw lowerOptions.PrefetchCount = LowPrefetchCount; lowerOptions.OwnerLevel = 20; - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); var sourceEvents = EventGenerator.CreateSmallEvents(100).ToList(); var expectedEvents = sourceEvents.Select(evt => evt.MessageId); - await using (var firstGroupConsumer = new EventHubConsumerClient(scope.ConsumerGroups[0], connectionString)) - await using (var secondGroupConsumer = new EventHubConsumerClient(scope.ConsumerGroups[1], connectionString)) + await using (var firstGroupConsumer = new EventHubConsumerClient( + consumerGroups[0], + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential)) + + await using (var secondGroupConsumer = new EventHubConsumerClient( + consumerGroups[1], + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential)) { var partition = (await firstGroupConsumer.GetPartitionIdsAsync(cancellationSource.Token)).First(); - await SendEventsAsync(connectionString, sourceEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); + await SendEventsAsync(scope.EventHubName, sourceEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); // Read from each partition, allowing the higher level operation to begin first. Both read operations should be // successful and read all events from their respective partition. @@ -1515,14 +1601,17 @@ public async Task ExclusiveConsumerSupersedesNonExclusiveActiveReader() nonExclusiveOptions.CacheEventCount = 10; nonExclusiveOptions.MaximumWaitTime = TimeSpan.FromMilliseconds(150); - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); var sourceEvents = EventGenerator.CreateSmallEvents(2500).ToList(); var expectedEvents = sourceEvents.Select(evt => evt.MessageId); - await using (var consumer = new EventHubConsumerClient(EventHubConsumerClient.DefaultConsumerGroupName, connectionString)) + await using (var consumer = new EventHubConsumerClient( + EventHubConsumerClient.DefaultConsumerGroupName, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential)) { var partition = (await consumer.GetPartitionIdsAsync(cancellationSource.Token)).First(); - await SendEventsAsync(connectionString, sourceEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); + await SendEventsAsync(scope.EventHubName, sourceEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); // Start the non-exclusive read, waiting until at least some events were read before starting the exclusive reader. @@ -1581,14 +1670,17 @@ public async Task ConsumerWithHigherOwnerLevelSupersedesActiveReader() lowerOptions.OwnerLevel = 20; lowerOptions.MaximumWaitTime = TimeSpan.FromMilliseconds(150); - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); var sourceEvents = EventGenerator.CreateSmallEvents(2500).ToList(); var expectedEvents = sourceEvents.Select(evt => evt.MessageId); - await using (var consumer = new EventHubConsumerClient(EventHubConsumerClient.DefaultConsumerGroupName, connectionString)) + await using (var consumer = new EventHubConsumerClient( + EventHubConsumerClient.DefaultConsumerGroupName, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential)) { var partition = (await consumer.GetPartitionIdsAsync(cancellationSource.Token)).First(); - await SendEventsAsync(connectionString, sourceEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); + await SendEventsAsync(scope.EventHubName, sourceEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); // Start the lower level read, waiting until at least some events were read before starting the higher reader. @@ -1640,11 +1732,14 @@ public async Task ExclusiveConsumerDoesNotSupersedeNonExclusiveActiveReaderOnAno exclusiveOptions.PrefetchCount = LowPrefetchCount; exclusiveOptions.OwnerLevel = 20; - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); var sourceEvents = EventGenerator.CreateSmallEvents(100).ToList(); var expectedEvents = sourceEvents.Select(evt => evt.MessageId); - await using (var consumer = new EventHubConsumerClient(EventHubConsumerClient.DefaultConsumerGroupName, connectionString)) + await using (var consumer = new EventHubConsumerClient( + EventHubConsumerClient.DefaultConsumerGroupName, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential)) { var partitions = (await consumer.GetPartitionIdsAsync(cancellationSource.Token)).Take(2).ToArray(); @@ -1652,8 +1747,8 @@ public async Task ExclusiveConsumerDoesNotSupersedeNonExclusiveActiveReaderOnAno await Task.WhenAll ( - SendEventsAsync(connectionString, sourceEvents, new CreateBatchOptions { PartitionId = partitions[0] }, cancellationSource.Token), - SendEventsAsync(connectionString, sourceEvents, new CreateBatchOptions { PartitionId = partitions[1] }, cancellationSource.Token) + SendEventsAsync(scope.EventHubName, sourceEvents, new CreateBatchOptions { PartitionId = partitions[0] }, cancellationSource.Token), + SendEventsAsync(scope.EventHubName, sourceEvents, new CreateBatchOptions { PartitionId = partitions[1] }, cancellationSource.Token) ); // Start the non-exclusive read, waiting until at least some events were read before starting the exclusive reader. @@ -1707,15 +1802,23 @@ public async Task ExclusiveConsumerDoesNotSupersedeNonExclusiveActiveReaderOnAno exclusiveOptions.PrefetchCount = LowPrefetchCount; exclusiveOptions.OwnerLevel = 20; - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); var sourceEvents = EventGenerator.CreateSmallEvents(200).ToList(); var expectedEvents = sourceEvents.Select(evt => evt.MessageId); - await using (var nonExclusiveConsumer = new EventHubConsumerClient(scope.ConsumerGroups[0], connectionString)) - await using (var exclusiveConsumer = new EventHubConsumerClient(scope.ConsumerGroups[1], connectionString)) + await using (var nonExclusiveConsumer = new EventHubConsumerClient( + consumerGroups[0], + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential)) + + await using (var exclusiveConsumer = new EventHubConsumerClient( + consumerGroups[1], + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential)) { var partition = (await exclusiveConsumer.GetPartitionIdsAsync(cancellationSource.Token)).First(); - await SendEventsAsync(connectionString, sourceEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); + await SendEventsAsync(scope.EventHubName, sourceEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); // Start the non-exclusive read, waiting until at least some events were read before starting the exclusive reader. @@ -1762,13 +1865,16 @@ public async Task ConsumerIsNotCompromisedByFailureToReadFromInvalidPartition() using var cancellationSource = new CancellationTokenSource(); cancellationSource.CancelAfter(EventHubsTestEnvironment.Instance.TestExecutionTimeLimit); - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); var sourceEvents = EventGenerator.CreateEvents(50).ToList(); - await using (var consumer = new EventHubConsumerClient(EventHubConsumerClient.DefaultConsumerGroupName, EventHubsTestEnvironment.Instance.EventHubsConnectionString, scope.EventHubName)) + await using (var consumer = new EventHubConsumerClient( + EventHubConsumerClient.DefaultConsumerGroupName, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential)) { var partition = (await consumer.GetPartitionIdsAsync(cancellationSource.Token)).First(); - await SendEventsAsync(connectionString, sourceEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); + await SendEventsAsync(scope.EventHubName, sourceEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); // Attempt to read from an invalid partition and confirm failure. @@ -1816,11 +1922,14 @@ public async Task ConsumerIsNotCompromisedByBeingSupersededByAnotherReaderWithHi lowerOptions.CacheEventCount = 10; lowerOptions.MaximumWaitTime = TimeSpan.FromMilliseconds(150); - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); var sourceEvents = EventGenerator.CreateSmallEvents(2500).ToList(); var expectedEvents = sourceEvents.Select(evt => evt.MessageId); - await using (var consumer = new EventHubConsumerClient(EventHubConsumerClient.DefaultConsumerGroupName, connectionString)) + await using (var consumer = new EventHubConsumerClient( + EventHubConsumerClient.DefaultConsumerGroupName, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential)) { var partitions = (await consumer.GetPartitionIdsAsync(cancellationSource.Token)).Take(2).ToArray(); @@ -1828,8 +1937,8 @@ public async Task ConsumerIsNotCompromisedByBeingSupersededByAnotherReaderWithHi await Task.WhenAll ( - SendEventsAsync(connectionString, sourceEvents, new CreateBatchOptions { PartitionId = partitions[0] }, cancellationSource.Token), - SendEventsAsync(connectionString, sourceEvents, new CreateBatchOptions { PartitionId = partitions[1] }, cancellationSource.Token) + SendEventsAsync(scope.EventHubName, sourceEvents, new CreateBatchOptions { PartitionId = partitions[0] }, cancellationSource.Token), + SendEventsAsync(scope.EventHubName, sourceEvents, new CreateBatchOptions { PartitionId = partitions[1] }, cancellationSource.Token) ); // Start the lower level read, waiting until at least some events were read before starting the higher reader. @@ -1885,7 +1994,11 @@ public async Task ConsumerRespectsTheWaitTimeWhenReading() using var cancellationSource = new CancellationTokenSource(); cancellationSource.CancelAfter(EventHubsTestEnvironment.Instance.TestExecutionTimeLimit); - await using (var consumer = new EventHubConsumerClient(EventHubConsumerClient.DefaultConsumerGroupName, EventHubsTestEnvironment.Instance.EventHubsConnectionString, scope.EventHubName)) + await using (var consumer = new EventHubConsumerClient( + EventHubConsumerClient.DefaultConsumerGroupName, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential)) { var partition = (await consumer.GetPartitionIdsAsync(cancellationSource.Token)).First(); var options = new ReadEventOptions { MaximumWaitTime = TimeSpan.FromMilliseconds(100) }; @@ -1931,7 +2044,12 @@ public async Task ConsumerCanQueryEventHubProperties(EventHubsTransportType tran using var cancellationSource = new CancellationTokenSource(); cancellationSource.CancelAfter(EventHubsTestEnvironment.Instance.TestExecutionTimeLimit); - await using (var consumer = new EventHubConsumerClient(EventHubConsumerClient.DefaultConsumerGroupName, EventHubsTestEnvironment.Instance.EventHubsConnectionString, scope.EventHubName, clientOptions)) + await using (var consumer = new EventHubConsumerClient( + EventHubConsumerClient.DefaultConsumerGroupName, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential, + clientOptions)) { var properties = await consumer.GetEventHubPropertiesAsync(cancellationSource.Token); Assert.That(cancellationSource.IsCancellationRequested, Is.False, "The cancellation token should not have been signaled."); @@ -1961,10 +2079,14 @@ public async Task ConsumerCanQueryPartitionProperties(EventHubsTransportType tra using var cancellationSource = new CancellationTokenSource(); cancellationSource.CancelAfter(EventHubsTestEnvironment.Instance.TestExecutionTimeLimit); - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); var clientOptions = new EventHubConsumerClientOptions { ConnectionOptions = new EventHubConnectionOptions { TransportType = transportType } }; - await using (var consumer = new EventHubConsumerClient(EventHubConsumerClient.DefaultConsumerGroupName, connectionString, scope.EventHubName, clientOptions)) + await using (var consumer = new EventHubConsumerClient( + EventHubConsumerClient.DefaultConsumerGroupName, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential, + clientOptions)) { var properties = await consumer.GetEventHubPropertiesAsync(); var partition = properties.PartitionIds.First(); @@ -1995,7 +2117,11 @@ public async Task ConnectionTransportPartitionIdsMatchPartitionProperties() using var cancellationSource = new CancellationTokenSource(); cancellationSource.CancelAfter(EventHubsTestEnvironment.Instance.TestExecutionTimeLimit); - await using (var consumer = new EventHubConsumerClient(EventHubConsumerClient.DefaultConsumerGroupName, EventHubsTestEnvironment.Instance.EventHubsConnectionString, scope.EventHubName)) + await using (var consumer = new EventHubConsumerClient( + EventHubConsumerClient.DefaultConsumerGroupName, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential)) { var properties = await consumer.GetEventHubPropertiesAsync(cancellationSource.Token); var partitions = await consumer.GetPartitionIdsAsync(cancellationSource.Token); @@ -2022,7 +2148,11 @@ public async Task ConsumerCannotRetrieveMetadataWhenClosed() using var cancellationSource = new CancellationTokenSource(); cancellationSource.CancelAfter(EventHubsTestEnvironment.Instance.TestExecutionTimeLimit); - await using (var consumer = new EventHubConsumerClient(EventHubConsumerClient.DefaultConsumerGroupName, EventHubsTestEnvironment.Instance.EventHubsConnectionString, scope.EventHubName)) + await using (var consumer = new EventHubConsumerClient( + EventHubConsumerClient.DefaultConsumerGroupName, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential)) { var partition = (await consumer.GetPartitionIdsAsync(cancellationSource.Token)).First(); @@ -2058,7 +2188,11 @@ public async Task ConsumerCannotRetrievePartitionPropertiesWithInvalidPartitionI using var cancellationSource = new CancellationTokenSource(); cancellationSource.CancelAfter(EventHubsTestEnvironment.Instance.TestExecutionTimeLimit); - await using (var consumer = new EventHubConsumerClient(EventHubConsumerClient.DefaultConsumerGroupName, EventHubsTestEnvironment.Instance.EventHubsConnectionString, scope.EventHubName)) + await using (var consumer = new EventHubConsumerClient( + EventHubConsumerClient.DefaultConsumerGroupName, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential)) { Assert.That(async () => await consumer.GetPartitionPropertiesAsync(invalidPartition, cancellationSource.Token), Throws.TypeOf()); Assert.That(cancellationSource.IsCancellationRequested, Is.False, "The cancellation token should not have been signaled."); @@ -2079,8 +2213,6 @@ public async Task ConsumerCannotRetrieveMetadataWithInvalidProxy() using var cancellationSource = new CancellationTokenSource(); cancellationSource.CancelAfter(EventHubsTestEnvironment.Instance.TestExecutionTimeLimit); - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); - var invalidProxyOptions = new EventHubConsumerClientOptions(); invalidProxyOptions.RetryOptions.MaximumRetries = 0; invalidProxyOptions.RetryOptions.MaximumDelay = TimeSpan.FromMilliseconds(5); @@ -2088,8 +2220,18 @@ public async Task ConsumerCannotRetrieveMetadataWithInvalidProxy() invalidProxyOptions.ConnectionOptions.Proxy = new WebProxy("http://1.2.3.4:9999"); invalidProxyOptions.ConnectionOptions.TransportType = EventHubsTransportType.AmqpWebSockets; - await using (var consumer = new EventHubConsumerClient(EventHubConsumerClient.DefaultConsumerGroupName, connectionString)) - await using (var invalidProxyConsumer = new EventHubConsumerClient(EventHubConsumerClient.DefaultConsumerGroupName, connectionString, invalidProxyOptions)) + await using (var consumer = new EventHubConsumerClient( + EventHubConsumerClient.DefaultConsumerGroupName, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential)) + + await using (var invalidProxyConsumer = new EventHubConsumerClient( + EventHubConsumerClient.DefaultConsumerGroupName, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential, + invalidProxyOptions)) { var partition = (await consumer.GetPartitionIdsAsync(cancellationSource.Token)).First(); @@ -2118,14 +2260,17 @@ public async Task ConsumerCanReadFromAllPartitions() using var cancellationSource = new CancellationTokenSource(); cancellationSource.CancelAfter(EventHubsTestEnvironment.Instance.TestExecutionTimeLimit); - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); var sourceEvents = EventGenerator.CreateEvents(100).ToList(); - await using (var consumer = new EventHubConsumerClient(EventHubConsumerClient.DefaultConsumerGroupName, connectionString)) + await using (var consumer = new EventHubConsumerClient( + EventHubConsumerClient.DefaultConsumerGroupName, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential)) { var partitions = (await consumer.GetPartitionIdsAsync(cancellationSource.Token)).ToArray(); - var sendCount = await SendEventsToAllPartitionsAsync(connectionString, sourceEvents, partitions, cancellationSource.Token); + var sendCount = await SendEventsToAllPartitionsAsync(scope.EventHubName, sourceEvents, partitions, cancellationSource.Token); Assert.That(sendCount, Is.EqualTo(sourceEvents.Count), "All of the events should have been sent."); // Read the events and validate the resulting state. @@ -2158,20 +2303,23 @@ public async Task ConsumerCanReadFromAllPartitionsWithCustomPrefetchAndBatchCoun using var cancellationSource = new CancellationTokenSource(); cancellationSource.CancelAfter(EventHubsTestEnvironment.Instance.TestExecutionTimeLimit); - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); var sourceEvents = EventGenerator.CreateEvents(100).ToList(); - await using (var consumer = new EventHubConsumerClient(EventHubConsumerClient.DefaultConsumerGroupName, connectionString)) + await using (var consumer = new EventHubConsumerClient( + EventHubConsumerClient.DefaultConsumerGroupName, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential)) { var partitions = (await consumer.GetPartitionIdsAsync(cancellationSource.Token)).ToArray(); - var sendCount = await SendEventsToAllPartitionsAsync(connectionString, sourceEvents, partitions, cancellationSource.Token); + var sendCount = await SendEventsToAllPartitionsAsync(scope.EventHubName, sourceEvents, partitions, cancellationSource.Token); Assert.That(sendCount, Is.EqualTo(sourceEvents.Count), "All of the events should have been sent."); // Read the events and validate the resulting state. var readOptions = new ReadEventOptions { PrefetchCount = 50, CacheEventCount = 50 }; - var readState = await ReadEventsFromAllPartitionsAsync(consumer,sourceEvents.Select(evt => evt.MessageId), cancellationSource.Token, readOptions: readOptions); + var readState = await ReadEventsFromAllPartitionsAsync(consumer, sourceEvents.Select(evt => evt.MessageId), cancellationSource.Token, readOptions: readOptions); Assert.That(cancellationSource.IsCancellationRequested, Is.False, "The cancellation token should not have been signaled."); foreach (var sourceEvent in sourceEvents) @@ -2192,22 +2340,21 @@ public async Task ConsumerCanReadFromAllPartitionsWithCustomPrefetchAndBatchCoun ///
/// [Test] - public async Task ConsumerCanReadFromAllPartitionsUsingAnIdentityCredential() + public async Task ConsumerCanReadFromAllPartitionsUsingTheConnectionString() { await using (EventHubScope scope = await EventHubScope.CreateAsync(4)) { using var cancellationSource = new CancellationTokenSource(); cancellationSource.CancelAfter(EventHubsTestEnvironment.Instance.TestExecutionTimeLimit); - var credential = EventHubsTestEnvironment.Instance.Credential; + var connectionString = EventHubsTestEnvironment.Instance.EventHubsConnectionString; var sourceEvents = EventGenerator.CreateEvents(100).ToList(); - await using (var consumer = new EventHubConsumerClient(EventHubConsumerClient.DefaultConsumerGroupName, EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, scope.EventHubName, credential)) + await using (var consumer = new EventHubConsumerClient(EventHubConsumerClient.DefaultConsumerGroupName, connectionString, scope.EventHubName)) { - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); var partitions = (await consumer.GetPartitionIdsAsync(cancellationSource.Token)).ToArray(); + var sendCount = await SendEventsToAllPartitionsAsync(scope.EventHubName, sourceEvents, partitions, cancellationSource.Token); - var sendCount = await SendEventsToAllPartitionsAsync(connectionString, sourceEvents, partitions, cancellationSource.Token); Assert.That(sendCount, Is.EqualTo(sourceEvents.Count), "All of the events should have been sent."); // Read the events and validate the resulting state. @@ -2245,10 +2392,9 @@ public async Task ConsumerCanReadFromAllPartitionsUsingTheSharedKeyCredential() await using (var consumer = new EventHubConsumerClient(EventHubConsumerClient.DefaultConsumerGroupName, EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, scope.EventHubName, credential)) { - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); var partitions = (await consumer.GetPartitionIdsAsync(cancellationSource.Token)).ToArray(); + var sendCount = await SendEventsToAllPartitionsAsync(scope.EventHubName, sourceEvents, partitions, cancellationSource.Token); - var sendCount = await SendEventsToAllPartitionsAsync(connectionString, sourceEvents, partitions, cancellationSource.Token); Assert.That(sendCount, Is.EqualTo(sourceEvents.Count), "All of the events should have been sent."); // Read the events and validate the resulting state. @@ -2289,10 +2435,9 @@ public async Task ConsumerCanReadFromAllPartitionsUsingTheSasCredential() await using (var consumer = new EventHubConsumerClient(EventHubConsumerClient.DefaultConsumerGroupName, EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, scope.EventHubName, credential, options)) { - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); var partitions = (await consumer.GetPartitionIdsAsync(cancellationSource.Token)).ToArray(); + var sendCount = await SendEventsToAllPartitionsAsync(scope.EventHubName, sourceEvents, partitions, cancellationSource.Token); - var sendCount = await SendEventsToAllPartitionsAsync(connectionString, sourceEvents, partitions, cancellationSource.Token); Assert.That(sendCount, Is.EqualTo(sourceEvents.Count), "All of the events should have been sent."); // Read the events and validate the resulting state. @@ -2325,25 +2470,28 @@ public async Task ConsumerCanReadFromAllPartitionsStartingWithLatest() using var cancellationSource = new CancellationTokenSource(); cancellationSource.CancelAfter(EventHubsTestEnvironment.Instance.TestExecutionTimeLimit); - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); - var sourceEvents = EventGenerator.CreateEvents(100).ToList(); + var sourceEvents = EventGenerator.CreateEvents(50).ToList(); - await using (var consumer = new EventHubConsumerClient(EventHubConsumerClient.DefaultConsumerGroupName, connectionString)) + await using (var consumer = new EventHubConsumerClient( + EventHubConsumerClient.DefaultConsumerGroupName, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential)) { // Send a set of seed events, which should not be read. var partitions = (await consumer.GetPartitionIdsAsync(cancellationSource.Token)).ToArray(); - await SendEventsToAllPartitionsAsync(connectionString, EventGenerator.CreateEvents(50), partitions, cancellationSource.Token); + await SendEventsToAllPartitionsAsync(scope.EventHubName, EventGenerator.CreateEvents(50), partitions, cancellationSource.Token); // Begin reading though no events have been published. This is necessary to open the connection and // ensure that the consumer is watching the partition. - var readTask = ReadEventsFromAllPartitionsAsync(consumer,sourceEvents.Select(evt => evt.MessageId), cancellationSource.Token, startFromEarliest: false); + var readTask = ReadEventsFromAllPartitionsAsync(consumer, sourceEvents.Select(evt => evt.MessageId), cancellationSource.Token, startFromEarliest: false); // Give the consumer a moment to ensure that it is established and then send events for it to read. - await Task.Delay(250); - await SendEventsToAllPartitionsAsync(connectionString, sourceEvents, partitions, cancellationSource.Token); + await Task.Delay(1500); + await SendEventsToAllPartitionsAsync(scope.EventHubName, sourceEvents, partitions, cancellationSource.Token); // Read the events and validate the resulting state. @@ -2537,21 +2685,24 @@ private async Task ReadNothingAsync(EventHubConsumerClient consumer, /// Sends a set of events using a new producer to do so. ///
/// - /// The connection string to use when creating the producer. + /// The name of the Event Hub to use when creating the producer. /// The set of events to send. /// The set of options to apply when creating batches. /// The token used to signal a cancellation request. /// /// The count of events that were sent. /// - private async Task SendEventsAsync(string connectionString, + private async Task SendEventsAsync(string eventHubName, IEnumerable sourceEvents, CreateBatchOptions batchOptions = default, CancellationToken cancellationToken = default) { var sentCount = 0; - await using (var producer = new EventHubProducerClient(connectionString)) + await using (var producer = new EventHubProducerClient( + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + eventHubName, + EventHubsTestEnvironment.Instance.Credential)) { foreach (var batch in (await EventGenerator.BuildBatchesAsync(sourceEvents, producer, batchOptions, cancellationToken))) { @@ -2570,14 +2721,14 @@ private async Task SendEventsAsync(string connectionString, /// distribution with no guaranteed ordering. ///
/// - /// The connection string to use when creating the producer. + /// The Event Hub name to use when creating the producer. /// The set of events to send. /// The set of partitions to send events to. /// The token used to signal a cancellation request. /// /// The count of events that were sent. /// - private async Task SendEventsToAllPartitionsAsync(string connectionString, + private async Task SendEventsToAllPartitionsAsync(string eventHubName, IEnumerable sourceEvents, string[] partitionIds, CancellationToken cancellationToken = default) @@ -2587,7 +2738,7 @@ private async Task SendEventsToAllPartitionsAsync(string connectionString, .Select(eventGroup => { var options = new CreateBatchOptions { PartitionId = partitionIds[eventGroup.Key] }; - return SendEventsAsync(connectionString, eventGroup, options, cancellationToken); + return SendEventsAsync(eventHubName, eventGroup, options, cancellationToken); }); var sendCounts = await Task.WhenAll(sendTasks).ConfigureAwait(false); diff --git a/sdk/eventhub/Azure.Messaging.EventHubs/tests/Primitives/PartitionReceiverLiveTests.cs b/sdk/eventhub/Azure.Messaging.EventHubs/tests/Primitives/PartitionReceiverLiveTests.cs index 4389704f6148..ef02b92dff63 100644 --- a/sdk/eventhub/Azure.Messaging.EventHubs/tests/Primitives/PartitionReceiverLiveTests.cs +++ b/sdk/eventhub/Azure.Messaging.EventHubs/tests/Primitives/PartitionReceiverLiveTests.cs @@ -56,13 +56,21 @@ public async Task ReceiverWithNoOptionsCanRead(EventHubsTransportType transportT using var cancellationSource = new CancellationTokenSource(); cancellationSource.CancelAfter(EventHubsTestEnvironment.Instance.TestExecutionTimeLimit); - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); - - await using (var connection = new EventHubConnection(connectionString, new EventHubConnectionOptions { TransportType = transportType })) + await using (var connection = new EventHubConnection( + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential, + new EventHubConnectionOptions { TransportType = transportType })) { var partition = (await connection.GetPartitionIdsAsync(new EventHubsRetryOptions().ToRetryPolicy(), cancellationSource.Token)).First(); - await using (var receiver = new PartitionReceiver(EventHubConsumerClient.DefaultConsumerGroupName, partition, EventPosition.Earliest, connectionString)) + await using (var receiver = new PartitionReceiver( + EventHubConsumerClient.DefaultConsumerGroupName, + partition, + EventPosition.Earliest, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential)) { Assert.That(async () => await ReadNothingAsync(receiver, cancellationSource.Token), Throws.Nothing); } @@ -91,10 +99,16 @@ public async Task ReceiverWithOptionsCanRead(EventHubsTransportType transportTyp options.RetryOptions.MaximumRetries = 7; options.ConnectionOptions.TransportType = transportType; - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); - var partition = (await QueryPartitionsAsync(connectionString, cancellationSource.Token)).First(); + var partition = (await QueryPartitionsAsync(scope.EventHubName, cancellationSource.Token)).First(); - await using (var receiver = new PartitionReceiver(EventHubConsumerClient.DefaultConsumerGroupName, partition, EventPosition.Earliest, connectionString, options)) + await using (var receiver = new PartitionReceiver( + EventHubConsumerClient.DefaultConsumerGroupName, + partition, + EventPosition.Earliest, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential, + options)) { Assert.That(async () => await ReadNothingAsync(receiver, cancellationSource.Token), Throws.Nothing); } @@ -116,13 +130,18 @@ public async Task ReceiverCanReadSingleZeroLengthEvent() using var cancellationSource = new CancellationTokenSource(); cancellationSource.CancelAfter(EventHubsTestEnvironment.Instance.TestExecutionTimeLimit); - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); var singleEvent = EventGenerator.CreateEventFromBody(Array.Empty()); + var partition = (await QueryPartitionsAsync(scope.EventHubName, cancellationSource.Token)).First(); - var partition = (await QueryPartitionsAsync(connectionString, cancellationSource.Token)).First(); - await SendEventsAsync(connectionString, new EventData[] { singleEvent }, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); + await SendEventsAsync(scope.EventHubName, new EventData[] { singleEvent }, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); - await using (var receiver = new PartitionReceiver(EventHubConsumerClient.DefaultConsumerGroupName, partition, EventPosition.Earliest, connectionString)) + await using (var receiver = new PartitionReceiver( + EventHubConsumerClient.DefaultConsumerGroupName, + partition, + EventPosition.Earliest, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential)) { var readState = await ReadEventsAsync(receiver, new HashSet { singleEvent.MessageId }, cancellationSource.Token); @@ -148,13 +167,18 @@ public async Task ReceiverCanReadSingleEvent() using var cancellationSource = new CancellationTokenSource(); cancellationSource.CancelAfter(EventHubsTestEnvironment.Instance.TestExecutionTimeLimit); - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); var singleEvent = EventGenerator.CreateEvents(1).Single(); + var partition = (await QueryPartitionsAsync(scope.EventHubName, cancellationSource.Token)).First(); - var partition = (await QueryPartitionsAsync(connectionString, cancellationSource.Token)).First(); - await SendEventsAsync(connectionString, new EventData[] { singleEvent }, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); + await SendEventsAsync(scope.EventHubName, new EventData[] { singleEvent }, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); - await using (var receiver = new PartitionReceiver(EventHubConsumerClient.DefaultConsumerGroupName, partition, EventPosition.Earliest, connectionString)) + await using (var receiver = new PartitionReceiver( + EventHubConsumerClient.DefaultConsumerGroupName, + partition, + EventPosition.Earliest, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential)) { var readState = await ReadEventsAsync(receiver, new HashSet { singleEvent.MessageId }, cancellationSource.Token); @@ -184,12 +208,17 @@ public async Task ReceiverCanReadSingleLargeEvent() new Random().NextBytes(buffer); var singleEvent = EventGenerator.CreateEventFromBody(buffer); - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); + var partition = (await QueryPartitionsAsync(scope.EventHubName, cancellationSource.Token)).First(); - var partition = (await QueryPartitionsAsync(connectionString, cancellationSource.Token)).First(); - await SendEventsAsync(connectionString, new EventData[] { singleEvent }, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); + await SendEventsAsync(scope.EventHubName, new EventData[] { singleEvent }, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); - await using (var receiver = new PartitionReceiver(EventHubConsumerClient.DefaultConsumerGroupName, partition, EventPosition.Earliest, connectionString)) + await using (var receiver = new PartitionReceiver( + EventHubConsumerClient.DefaultConsumerGroupName, + partition, + EventPosition.Earliest, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential)) { var readState = await ReadEventsAsync(receiver, new HashSet { singleEvent.MessageId }, cancellationSource.Token); @@ -220,13 +249,18 @@ public async Task ReceiverCanReadBatchOfZeroLengthEvents() .Select(index => EventGenerator.CreateEventFromBody(Array.Empty())) .ToList(); - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); - var partition = (await QueryPartitionsAsync(connectionString, cancellationSource.Token)).First(); - await SendEventsAsync(connectionString, sourceEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); + var partition = (await QueryPartitionsAsync(scope.EventHubName, cancellationSource.Token)).First(); + await SendEventsAsync(scope.EventHubName, sourceEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); - await using (var receiver = new PartitionReceiver(EventHubConsumerClient.DefaultConsumerGroupName, partition, EventPosition.Earliest, connectionString)) + await using (var receiver = new PartitionReceiver( + EventHubConsumerClient.DefaultConsumerGroupName, + partition, + EventPosition.Earliest, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential)) { - var readState = await ReadEventsAsync(receiver,sourceEvents.Select(evt => evt.MessageId), cancellationSource.Token); + var readState = await ReadEventsAsync(receiver, sourceEvents.Select(evt => evt.MessageId), cancellationSource.Token); Assert.That(cancellationSource.IsCancellationRequested, Is.False, "The cancellation token should not have been signaled."); foreach (var sourceEvent in sourceEvents) @@ -254,15 +288,20 @@ public async Task ReceiverCanReadBatchOfEvents() using var cancellationSource = new CancellationTokenSource(); cancellationSource.CancelAfter(EventHubsTestEnvironment.Instance.TestExecutionTimeLimit); - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); var sourceEvents = EventGenerator.CreateEvents(200).ToList(); + var partition = (await QueryPartitionsAsync(scope.EventHubName, cancellationSource.Token)).First(); - var partition = (await QueryPartitionsAsync(connectionString, cancellationSource.Token)).First(); - await SendEventsAsync(connectionString, sourceEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); + await SendEventsAsync(scope.EventHubName, sourceEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); - await using (var receiver = new PartitionReceiver(EventHubConsumerClient.DefaultConsumerGroupName, partition, EventPosition.Earliest, connectionString)) + await using (var receiver = new PartitionReceiver( + EventHubConsumerClient.DefaultConsumerGroupName, + partition, + EventPosition.Earliest, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential)) { - var readState = await ReadEventsAsync(receiver,sourceEvents.Select(evt => evt.MessageId), cancellationSource.Token); + var readState = await ReadEventsAsync(receiver, sourceEvents.Select(evt => evt.MessageId), cancellationSource.Token); Assert.That(cancellationSource.IsCancellationRequested, Is.False, "The cancellation token should not have been signaled."); foreach (var sourceEvent in sourceEvents) @@ -290,20 +329,26 @@ public async Task ReceiverCanReadBatchOfEventsWithPrefetchSize() using var cancellationSource = new CancellationTokenSource(); cancellationSource.CancelAfter(EventHubsTestEnvironment.Instance.TestExecutionTimeLimit); - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); var sourceEvents = EventGenerator.CreateEvents(200).ToList(); + var partition = (await QueryPartitionsAsync(scope.EventHubName, cancellationSource.Token)).First(); - var partition = (await QueryPartitionsAsync(connectionString, cancellationSource.Token)).First(); - await SendEventsAsync(connectionString, sourceEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); + await SendEventsAsync(scope.EventHubName, sourceEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); var recieverOptions = new PartitionReceiverOptions { PrefetchSizeInBytes = 64 }; - await using (var receiver = new PartitionReceiver(EventHubConsumerClient.DefaultConsumerGroupName, partition, EventPosition.Earliest, connectionString, recieverOptions)) + await using (var receiver = new PartitionReceiver( + EventHubConsumerClient.DefaultConsumerGroupName, + partition, + EventPosition.Earliest, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential, + recieverOptions)) { - var readState = await ReadEventsAsync(receiver,sourceEvents.Select(evt => evt.MessageId), cancellationSource.Token); + var readState = await ReadEventsAsync(receiver, sourceEvents.Select(evt => evt.MessageId), cancellationSource.Token); Assert.That(cancellationSource.IsCancellationRequested, Is.False, "The cancellation token should not have been signaled."); foreach (var sourceEvent in sourceEvents) @@ -341,13 +386,18 @@ public async Task ReceiverCanReadEventsWithCustomProperties() }) .ToList(); - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); - var partition = (await QueryPartitionsAsync(connectionString, cancellationSource.Token)).First(); - await SendEventsAsync(connectionString, sourceEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); + var partition = (await QueryPartitionsAsync(scope.EventHubName, cancellationSource.Token)).First(); + await SendEventsAsync(scope.EventHubName, sourceEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); - await using (var receiver = new PartitionReceiver(EventHubConsumerClient.DefaultConsumerGroupName, partition, EventPosition.Earliest, connectionString)) + await using (var receiver = new PartitionReceiver( + EventHubConsumerClient.DefaultConsumerGroupName, + partition, + EventPosition.Earliest, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential)) { - var readState = await ReadEventsAsync(receiver,sourceEvents.Select(evt => evt.MessageId), cancellationSource.Token); + var readState = await ReadEventsAsync(receiver, sourceEvents.Select(evt => evt.MessageId), cancellationSource.Token); Assert.That(cancellationSource.IsCancellationRequested, Is.False, "The cancellation token should not have been signaled."); foreach (var sourceEvent in sourceEvents) @@ -368,7 +418,7 @@ public async Task ReceiverCanReadEventsWithCustomProperties() ///
/// [Test] - public async Task ReceiverCanReadEventsUsingAnIdentityCredential() + public async Task ReceiverCanReadEventsUsingTheConnectionString() { await using (EventHubScope scope = await EventHubScope.CreateAsync(1)) { @@ -379,12 +429,12 @@ public async Task ReceiverCanReadEventsUsingAnIdentityCredential() var sourceEvents = EventGenerator.CreateEvents(50).ToList(); var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); - var partition = (await QueryPartitionsAsync(connectionString, cancellationSource.Token)).First(); - await SendEventsAsync(connectionString, sourceEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); + var partition = (await QueryPartitionsAsync(scope.EventHubName, cancellationSource.Token)).First(); + await SendEventsAsync(scope.EventHubName, sourceEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); - await using (var receiver = new PartitionReceiver(EventHubConsumerClient.DefaultConsumerGroupName, partition, EventPosition.Earliest, EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, scope.EventHubName, credential)) + await using (var receiver = new PartitionReceiver(EventHubConsumerClient.DefaultConsumerGroupName, partition, EventPosition.Earliest, connectionString)) { - var readState = await ReadEventsAsync(receiver,sourceEvents.Select(evt => evt.MessageId), cancellationSource.Token); + var readState = await ReadEventsAsync(receiver, sourceEvents.Select(evt => evt.MessageId), cancellationSource.Token); Assert.That(cancellationSource.IsCancellationRequested, Is.False, "The cancellation token should not have been signaled."); foreach (var sourceEvent in sourceEvents) @@ -415,13 +465,12 @@ public async Task ReceiverCanReadEventsUsingTheSharedKeyCredential() var credential = new AzureNamedKeyCredential(EventHubsTestEnvironment.Instance.SharedAccessKeyName, EventHubsTestEnvironment.Instance.SharedAccessKey); var sourceEvents = EventGenerator.CreateEvents(50).ToList(); - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); - var partition = (await QueryPartitionsAsync(connectionString, cancellationSource.Token)).First(); - await SendEventsAsync(connectionString, sourceEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); + var partition = (await QueryPartitionsAsync(scope.EventHubName, cancellationSource.Token)).First(); + await SendEventsAsync(scope.EventHubName, sourceEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); await using (var receiver = new PartitionReceiver(EventHubConsumerClient.DefaultConsumerGroupName, partition, EventPosition.Earliest, EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, scope.EventHubName, credential)) { - var readState = await ReadEventsAsync(receiver,sourceEvents.Select(evt => evt.MessageId), cancellationSource.Token); + var readState = await ReadEventsAsync(receiver, sourceEvents.Select(evt => evt.MessageId), cancellationSource.Token); Assert.That(cancellationSource.IsCancellationRequested, Is.False, "The cancellation token should not have been signaled."); foreach (var sourceEvent in sourceEvents) @@ -455,13 +504,12 @@ public async Task ReceiverCanReadEventsUsingTheSasCredential() var credential = new AzureSasCredential(signature.Value); var sourceEvents = EventGenerator.CreateEvents(50).ToList(); - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); - var partition = (await QueryPartitionsAsync(connectionString, cancellationSource.Token)).First(); - await SendEventsAsync(connectionString, sourceEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); + var partition = (await QueryPartitionsAsync(scope.EventHubName, cancellationSource.Token)).First(); + await SendEventsAsync(scope.EventHubName, sourceEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); await using (var receiver = new PartitionReceiver(EventHubConsumerClient.DefaultConsumerGroupName, partition, EventPosition.Earliest, EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, scope.EventHubName, credential, options)) { - var readState = await ReadEventsAsync(receiver,sourceEvents.Select(evt => evt.MessageId), cancellationSource.Token); + var readState = await ReadEventsAsync(receiver, sourceEvents.Select(evt => evt.MessageId), cancellationSource.Token); Assert.That(cancellationSource.IsCancellationRequested, Is.False, "The cancellation token should not have been signaled."); foreach (var sourceEvent in sourceEvents) @@ -489,15 +537,20 @@ public async Task ReceiverCanReadFromEarliest() using var cancellationSource = new CancellationTokenSource(); cancellationSource.CancelAfter(EventHubsTestEnvironment.Instance.TestExecutionTimeLimit); - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); var sourceEvents = EventGenerator.CreateEvents(200).ToList(); + var partition = (await QueryPartitionsAsync(scope.EventHubName, cancellationSource.Token)).First(); - var partition = (await QueryPartitionsAsync(connectionString, cancellationSource.Token)).First(); - await SendEventsAsync(connectionString, sourceEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); + await SendEventsAsync(scope.EventHubName, sourceEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); - await using (var receiver = new PartitionReceiver(EventHubConsumerClient.DefaultConsumerGroupName, partition, EventPosition.Earliest, connectionString)) + await using (var receiver = new PartitionReceiver( + EventHubConsumerClient.DefaultConsumerGroupName, + partition, + EventPosition.Earliest, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential)) { - var readState = await ReadEventsAsync(receiver,sourceEvents.Select(evt => evt.MessageId), cancellationSource.Token); + var readState = await ReadEventsAsync(receiver, sourceEvents.Select(evt => evt.MessageId), cancellationSource.Token); Assert.That(cancellationSource.IsCancellationRequested, Is.False, "The cancellation token should not have been signaled."); foreach (var sourceEvent in sourceEvents) @@ -525,25 +578,30 @@ public async Task ReceiverCanReadFromLatest() using var cancellationSource = new CancellationTokenSource(); cancellationSource.CancelAfter(EventHubsTestEnvironment.Instance.TestExecutionTimeLimit); - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); - var partition = (await QueryPartitionsAsync(connectionString, cancellationSource.Token)).First(); + var partition = (await QueryPartitionsAsync(scope.EventHubName, cancellationSource.Token)).First(); var sourceEvents = EventGenerator.CreateEvents(200).ToList(); - await using (var receiver = new PartitionReceiver(EventHubConsumerClient.DefaultConsumerGroupName, partition, EventPosition.Latest, connectionString)) + await using (var receiver = new PartitionReceiver( + EventHubConsumerClient.DefaultConsumerGroupName, + partition, + EventPosition.Latest, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential)) { // Send a set of seed events to the partition, which should not be read. - await SendEventsAsync(connectionString, EventGenerator.CreateEvents(50), new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); + await SendEventsAsync(scope.EventHubName, EventGenerator.CreateEvents(50), new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); // Begin reading though no events have been published. This is necessary to open the connection and // ensure that the receiver is watching the partition. - var readTask = ReadEventsAsync(receiver,sourceEvents.Select(evt => evt.MessageId), cancellationSource.Token); + var readTask = ReadEventsAsync(receiver, sourceEvents.Select(evt => evt.MessageId), cancellationSource.Token); // Give the receiver a moment to ensure that it is established and then send events for it to read. await Task.Delay(250); - await SendEventsAsync(connectionString, sourceEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); + await SendEventsAsync(scope.EventHubName, sourceEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); // Await reading of the events and validate the resulting state. @@ -578,8 +636,7 @@ public async Task ReceiverCanReadFromOffset(bool isInclusive) using var cancellationSource = new CancellationTokenSource(); cancellationSource.CancelAfter(EventHubsTestEnvironment.Instance.TestExecutionTimeLimit); - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); - var partition = (await QueryPartitionsAsync(connectionString, cancellationSource.Token)).First(); + var partition = (await QueryPartitionsAsync(scope.EventHubName, cancellationSource.Token)).First(); var seedEvents = EventGenerator.CreateEvents(50).ToList(); var sourceEvents = EventGenerator.CreateEvents(100).ToList(); @@ -593,20 +650,29 @@ public async Task ReceiverCanReadFromOffset(bool isInclusive) long lastOffset; EventPosition startingPosition; - await using (var producer = new EventHubProducerClient(connectionString)) + await using (var producer = new EventHubProducerClient( + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential)) { - await SendEventsAsync(connectionString, seedEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); + await SendEventsAsync(scope.EventHubName, seedEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); await Task.Delay(250); lastOffset = (await producer.GetPartitionPropertiesAsync(partition, cancellationSource.Token)).LastEnqueuedOffset; startingPosition = EventPosition.FromOffset(lastOffset, isInclusive); - await SendEventsAsync(connectionString, sourceEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); + await SendEventsAsync(scope.EventHubName, sourceEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); } // Read the events and validate the resulting state. - await using (var receiver = new PartitionReceiver(EventHubConsumerClient.DefaultConsumerGroupName, partition, startingPosition, connectionString)) + await using (var receiver = new PartitionReceiver( + EventHubConsumerClient.DefaultConsumerGroupName, + partition, + startingPosition, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential)) { var expectedCount = sourceEvents.Count; var expectedEvents = sourceEvents.Select(evt => evt.MessageId); @@ -650,8 +716,7 @@ public async Task ReceiverCanReadFromSequenceNumber(bool isInclusive) using var cancellationSource = new CancellationTokenSource(); cancellationSource.CancelAfter(EventHubsTestEnvironment.Instance.TestExecutionTimeLimit); - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); - var partition = (await QueryPartitionsAsync(connectionString, cancellationSource.Token)).First(); + var partition = (await QueryPartitionsAsync(scope.EventHubName, cancellationSource.Token)).First(); var seedEvents = EventGenerator.CreateEvents(50).ToList(); var sourceEvents = EventGenerator.CreateEvents(100).ToList(); @@ -665,20 +730,29 @@ public async Task ReceiverCanReadFromSequenceNumber(bool isInclusive) long lastSequence; EventPosition startingPosition; - await using (var producer = new EventHubProducerClient(connectionString)) + await using (var producer = new EventHubProducerClient( + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential)) { - await SendEventsAsync(connectionString, seedEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); + await SendEventsAsync(scope.EventHubName, seedEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); await Task.Delay(250); lastSequence = (await producer.GetPartitionPropertiesAsync(partition, cancellationSource.Token)).LastEnqueuedSequenceNumber; startingPosition = EventPosition.FromSequenceNumber(lastSequence, isInclusive); - await SendEventsAsync(connectionString, sourceEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); + await SendEventsAsync(scope.EventHubName, sourceEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); } // Read the events and validate the resulting state. - await using (var receiver = new PartitionReceiver(EventHubConsumerClient.DefaultConsumerGroupName, partition, startingPosition, connectionString)) + await using (var receiver = new PartitionReceiver( + EventHubConsumerClient.DefaultConsumerGroupName, + partition, + startingPosition, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential)) { var expectedCount = sourceEvents.Count; var expectedEvents = sourceEvents.Select(evt => evt.MessageId); @@ -720,8 +794,7 @@ public async Task ReceiverCanReadFromEnqueuedTime() using var cancellationSource = new CancellationTokenSource(); cancellationSource.CancelAfter(EventHubsTestEnvironment.Instance.TestExecutionTimeLimit); - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); - var partition = (await QueryPartitionsAsync(connectionString, cancellationSource.Token)).First(); + var partition = (await QueryPartitionsAsync(scope.EventHubName, cancellationSource.Token)).First(); var seedEvents = EventGenerator.CreateEvents(50).ToList(); var sourceEvents = EventGenerator.CreateEvents(100).ToList(); @@ -735,22 +808,31 @@ public async Task ReceiverCanReadFromEnqueuedTime() DateTimeOffset lastEnqueuedTime; EventPosition startingPosition; - await using (var producer = new EventHubProducerClient(connectionString)) + await using (var producer = new EventHubProducerClient( + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential)) { - await SendEventsAsync(connectionString, seedEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); + await SendEventsAsync(scope.EventHubName, seedEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); await Task.Delay(TimeSpan.FromSeconds(2)); lastEnqueuedTime = (await producer.GetPartitionPropertiesAsync(partition, cancellationSource.Token)).LastEnqueuedTime; startingPosition = EventPosition.FromEnqueuedTime(lastEnqueuedTime); - await SendEventsAsync(connectionString, sourceEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); + await SendEventsAsync(scope.EventHubName, sourceEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); } // Read the events and validate the resulting state. - await using (var receiver = new PartitionReceiver(EventHubConsumerClient.DefaultConsumerGroupName, partition, startingPosition, connectionString)) + await using (var receiver = new PartitionReceiver( + EventHubConsumerClient.DefaultConsumerGroupName, + partition, + startingPosition, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential)) { - var readState = await ReadEventsAsync(receiver,sourceEvents.Select(evt => evt.MessageId), cancellationSource.Token); + var readState = await ReadEventsAsync(receiver, sourceEvents.Select(evt => evt.MessageId), cancellationSource.Token); Assert.That(cancellationSource.IsCancellationRequested, Is.False, "The cancellation token should not have been signaled."); // The exact number of events returned by the service may vary due to clock skew and how reader is positioned; ensure that @@ -785,14 +867,26 @@ public async Task ReceiverCanReadFromMultipleConsumerGroups() using var cancellationSource = new CancellationTokenSource(); cancellationSource.CancelAfter(EventHubsTestEnvironment.Instance.TestExecutionTimeLimit); - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); var sourceEvents = EventGenerator.CreateEvents(50).ToList(); - - var partition = (await QueryPartitionsAsync(connectionString, cancellationSource.Token)).First(); - await SendEventsAsync(connectionString, sourceEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); - - await using (var customReceiver = new PartitionReceiver(customConsumerGroup, partition, EventPosition.Earliest, connectionString)) - await using (var defaultReceiver = new PartitionReceiver(EventHubConsumerClient.DefaultConsumerGroupName, partition, EventPosition.Earliest, connectionString)) + var partition = (await QueryPartitionsAsync(scope.EventHubName, cancellationSource.Token)).First(); + + await SendEventsAsync(scope.EventHubName, sourceEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); + + await using (var customReceiver = new PartitionReceiver( + customConsumerGroup, + partition, + EventPosition.Earliest, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential)) + + await using (var defaultReceiver = new PartitionReceiver( + EventHubConsumerClient.DefaultConsumerGroupName, + partition, + EventPosition.Earliest, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential)) { var expectedEvents = sourceEvents.Select(evt => evt.MessageId); @@ -833,10 +927,20 @@ public async Task ReceiverCannotReadFromInvalidConsumerGroup() cancellationSource.CancelAfter(EventHubsTestEnvironment.Instance.TestExecutionTimeLimit); var invalidConsumerGroup = "ThisIsFake"; - var partition = (await QueryPartitionsAsync(EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName), cancellationSource.Token)).First(); - - await using (var producer = new EventHubProducerClient(EventHubsTestEnvironment.Instance.EventHubsConnectionString, scope.EventHubName)) - await using (var receiver = new PartitionReceiver(invalidConsumerGroup, partition, EventPosition.Earliest, EventHubsTestEnvironment.Instance.EventHubsConnectionString, scope.EventHubName)) + var partition = (await QueryPartitionsAsync(scope.EventHubName, cancellationSource.Token)).First(); + + await using (var producer = new EventHubProducerClient( + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential)) + + await using (var receiver = new PartitionReceiver( + invalidConsumerGroup, + partition, + EventPosition.Earliest, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential)) { var readTask = ReadNothingAsync(receiver, cancellationSource.Token); @@ -868,9 +972,16 @@ public async Task ReceiverCannotReadWithInvalidProxy() clientOptions.ConnectionOptions.Proxy = new WebProxy("http://1.2.3.4:9999"); clientOptions.ConnectionOptions.TransportType = EventHubsTransportType.AmqpWebSockets; - var partition = (await QueryPartitionsAsync(EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName), cancellationSource.Token)).First(); + var partition = (await QueryPartitionsAsync(scope.EventHubName, cancellationSource.Token)).First(); - await using (var invalidProxyReceiver = new PartitionReceiver(EventHubConsumerClient.DefaultConsumerGroupName, partition, EventPosition.Earliest, EventHubsTestEnvironment.Instance.EventHubsConnectionString, scope.EventHubName, clientOptions)) + await using (var invalidProxyReceiver = new PartitionReceiver( + EventHubConsumerClient.DefaultConsumerGroupName, + partition, + EventPosition.Earliest, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential, + clientOptions)) { // The sockets implementation in .NET Core on some platforms, such as Linux, does not trigger a specific socket exception and // will, instead, hang indefinitely. The try timeout is intentionally set to a value smaller than the cancellation token to @@ -895,16 +1006,20 @@ public async Task ReceiverCannotReadAcrossPartitions() using var cancellationSource = new CancellationTokenSource(); cancellationSource.CancelAfter(EventHubsTestEnvironment.Instance.TestExecutionTimeLimit); - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); - var credential = EventHubsTestEnvironment.Instance.Credential; var sourceEvents = EventGenerator.CreateEvents(50).ToList(); // Send events to the second partition, which should not be visible to the receiver. - var partitions = await QueryPartitionsAsync(connectionString, cancellationSource.Token); - await SendEventsAsync(connectionString, sourceEvents, new CreateBatchOptions { PartitionId = partitions[1] }, cancellationSource.Token); + var partitions = await QueryPartitionsAsync(scope.EventHubName, cancellationSource.Token); + await SendEventsAsync(scope.EventHubName, sourceEvents, new CreateBatchOptions { PartitionId = partitions[1] }, cancellationSource.Token); - await using (var receiver = new PartitionReceiver(EventHubConsumerClient.DefaultConsumerGroupName, partitions[0], EventPosition.Earliest, EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, scope.EventHubName, credential)) + await using (var receiver = new PartitionReceiver( + EventHubConsumerClient.DefaultConsumerGroupName, + partitions[0], + EventPosition.Earliest, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential)) { // Attempt to read from the empty partition and verify that no events are observed. Because no events are expected, the // read operation will not naturally complete; limit the read to only a couple of seconds and trigger cancellation. @@ -912,7 +1027,7 @@ public async Task ReceiverCannotReadAcrossPartitions() using var readCancellation = CancellationTokenSource.CreateLinkedTokenSource(cancellationSource.Token); readCancellation.CancelAfter(TimeSpan.FromSeconds(15)); - var readState = await ReadEventsAsync(receiver,sourceEvents.Select(evt => evt.MessageId), readCancellation.Token, waitTime: TimeSpan.FromMilliseconds(250)); + var readState = await ReadEventsAsync(receiver, sourceEvents.Select(evt => evt.MessageId), readCancellation.Token, waitTime: TimeSpan.FromMilliseconds(250)); Assert.That(cancellationSource.IsCancellationRequested, Is.False, "The main cancellation token should not have been signaled."); Assert.That(readState.Events.Count, Is.Zero, "No events should have been read from the empty partition."); @@ -936,13 +1051,19 @@ public async Task ReceiverCannotReadWhenClosed() using var cancellationSource = new CancellationTokenSource(); cancellationSource.CancelAfter(EventHubsTestEnvironment.Instance.TestExecutionTimeLimit); - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); var sourceEvents = EventGenerator.CreateSmallEvents(100).ToList(); - - var partition = (await QueryPartitionsAsync(connectionString, cancellationSource.Token)).First(); - await SendEventsAsync(connectionString, sourceEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); - - await using (var receiver = new PartitionReceiver(EventHubConsumerClient.DefaultConsumerGroupName, partition, EventPosition.Earliest, connectionString, LowPrefetchOptions)) + var partition = (await QueryPartitionsAsync(scope.EventHubName, cancellationSource.Token)).First(); + + await SendEventsAsync(scope.EventHubName, sourceEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); + + await using (var receiver = new PartitionReceiver( + EventHubConsumerClient.DefaultConsumerGroupName, + partition, + EventPosition.Earliest, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential, + LowPrefetchOptions)) { // Create a local function that will close the receiver after five events have // been read. Because the close happens during the read loop, allow for a short @@ -959,7 +1080,7 @@ async Task closeAfterFewRead(ReadState state) return true; } - var readTask = ReadEventsAsync(receiver,sourceEvents.Select(evt => evt.MessageId), cancellationSource.Token, iterationCallback: closeAfterFewRead); + var readTask = ReadEventsAsync(receiver, sourceEvents.Select(evt => evt.MessageId), cancellationSource.Token, iterationCallback: closeAfterFewRead); Assert.That(async () => await readTask, Throws.InstanceOf().And.Property(nameof(EventHubsException.Reason)).EqualTo(EventHubsException.FailureReason.ClientClosed)); Assert.That(cancellationSource.IsCancellationRequested, Is.False, "The cancellation token should not have been signaled."); @@ -982,14 +1103,22 @@ public async Task ReceiverCannotReadWhenSharedConnectionIsClosed() using var cancellationSource = new CancellationTokenSource(); cancellationSource.CancelAfter(EventHubsTestEnvironment.Instance.TestExecutionTimeLimit); - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); var sourceEvents = EventGenerator.CreateSmallEvents(100).ToList(); + var partition = (await QueryPartitionsAsync(scope.EventHubName, cancellationSource.Token)).First(); + + await SendEventsAsync(scope.EventHubName, sourceEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); - var partition = (await QueryPartitionsAsync(connectionString, cancellationSource.Token)).First(); - await SendEventsAsync(connectionString, sourceEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); + await using (var connection = new EventHubConnection( + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential)) - await using (var connection = new EventHubConnection(connectionString)) - await using (var receiver = new PartitionReceiver(EventHubConsumerClient.DefaultConsumerGroupName, partition, EventPosition.Earliest, connection, LowPrefetchOptions)) + await using (var receiver = new PartitionReceiver( + EventHubConsumerClient.DefaultConsumerGroupName, + partition, + EventPosition.Earliest, + connection, + LowPrefetchOptions)) { // Create a local function that will close the connection after five events have // been read. Because the close happens during the read loop, allow for a short @@ -1006,7 +1135,7 @@ async Task closeAfterFewRead(ReadState state) return true; } - var readTask = ReadEventsAsync(receiver,sourceEvents.Select(evt => evt.MessageId), cancellationSource.Token, iterationCallback: closeAfterFewRead); + var readTask = ReadEventsAsync(receiver, sourceEvents.Select(evt => evt.MessageId), cancellationSource.Token, iterationCallback: closeAfterFewRead); Assert.That(async () => await readTask, Throws.InstanceOf().And.Property(nameof(EventHubsException.Reason)).EqualTo(EventHubsException.FailureReason.ClientClosed)); Assert.That(cancellationSource.IsCancellationRequested, Is.False, "The cancellation token should not have been signaled."); @@ -1029,7 +1158,13 @@ public async Task ReceiverCannotReadFromInvalidPartition() using var cancellationSource = new CancellationTokenSource(); cancellationSource.CancelAfter(EventHubsTestEnvironment.Instance.TestExecutionTimeLimit); - await using (var receiver = new PartitionReceiver(EventHubConsumerClient.DefaultConsumerGroupName, "-1", EventPosition.Earliest, EventHubsTestEnvironment.Instance.EventHubsConnectionString, scope.EventHubName)) + await using (var receiver = new PartitionReceiver( + EventHubConsumerClient.DefaultConsumerGroupName, + "-1", + EventPosition.Earliest, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential)) { var readTask = ReadNothingAsync(receiver, cancellationSource.Token); @@ -1054,13 +1189,19 @@ public async Task ReceiversWithAnIdentityCanRead() using var cancellationSource = new CancellationTokenSource(); cancellationSource.CancelAfter(EventHubsTestEnvironment.Instance.TestExecutionTimeLimit); - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); var sourceEvents = EventGenerator.CreateSmallEvents(200).ToList(); - var partition = (await QueryPartitionsAsync(connectionString, cancellationSource.Token)).First(); - - await SendEventsAsync(connectionString, sourceEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); - - await using (var receiver = new PartitionReceiver(EventHubConsumerClient.DefaultConsumerGroupName, partition, EventPosition.Earliest, connectionString, new PartitionReceiverOptions { Identifier = "first" })) + var partition = (await QueryPartitionsAsync(scope.EventHubName, cancellationSource.Token)).First(); + + await SendEventsAsync(scope.EventHubName, sourceEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); + + await using (var receiver = new PartitionReceiver( + EventHubConsumerClient.DefaultConsumerGroupName, + partition, + EventPosition.Earliest, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential, + new PartitionReceiverOptions { Identifier = "first" })) { var monitor = MonitorReadingEvents(receiver,sourceEvents.Select(evt => evt.MessageId), cancellationSource.Token); @@ -1093,18 +1234,32 @@ public async Task MultipleReceiversCanReadConcurrently() using var cancellationSource = new CancellationTokenSource(); cancellationSource.CancelAfter(EventHubsTestEnvironment.Instance.TestExecutionTimeLimit); - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); var sourceEvents = EventGenerator.CreateSmallEvents(200).ToList(); - var partitions = await QueryPartitionsAsync(connectionString, cancellationSource.Token); + var partitions = await QueryPartitionsAsync(scope.EventHubName, cancellationSource.Token); await Task.WhenAll ( - SendEventsAsync(connectionString, sourceEvents, new CreateBatchOptions { PartitionId = partitions[0] }, cancellationSource.Token), - SendEventsAsync(connectionString, sourceEvents, new CreateBatchOptions { PartitionId = partitions[1] }, cancellationSource.Token) + SendEventsAsync(scope.EventHubName, sourceEvents, new CreateBatchOptions { PartitionId = partitions[0] }, cancellationSource.Token), + SendEventsAsync(scope.EventHubName, sourceEvents, new CreateBatchOptions { PartitionId = partitions[1] }, cancellationSource.Token) ); - await using (var firstReceiver = new PartitionReceiver(EventHubConsumerClient.DefaultConsumerGroupName, partitions[0], EventPosition.Earliest, connectionString, new PartitionReceiverOptions { Identifier = "first" })) - await using (var secondReceiver = new PartitionReceiver(EventHubConsumerClient.DefaultConsumerGroupName, partitions[1], EventPosition.Earliest, connectionString, new PartitionReceiverOptions { Identifier = "second" })) + await using (var firstReceiver = new PartitionReceiver( + EventHubConsumerClient.DefaultConsumerGroupName, + partitions[0], + EventPosition.Earliest, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential, + new PartitionReceiverOptions { Identifier = "first" })) + + await using (var secondReceiver = new PartitionReceiver( + EventHubConsumerClient.DefaultConsumerGroupName, + partitions[1], + EventPosition.Earliest, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential, + new PartitionReceiverOptions { Identifier = "second" })) { var expectedEvents = sourceEvents.Select(evt => evt.MessageId); var firstMonitor = MonitorReadingEvents(firstReceiver, expectedEvents, cancellationSource.Token); @@ -1147,14 +1302,28 @@ public async Task ReceiverCannotReadAsNonExclusiveWhenAnExclusiveReaderIsActive( cancellationSource.CancelAfter(EventHubsTestEnvironment.Instance.TestExecutionTimeLimit); var exclusiveOptions = new PartitionReceiverOptions { OwnerLevel = 20, PrefetchCount = LowPrefetchCount }; - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); var sourceEvents = EventGenerator.CreateSmallEvents(200).ToList(); - - var partition = (await QueryPartitionsAsync(connectionString, cancellationSource.Token)).First(); - await SendEventsAsync(connectionString, sourceEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); - - await using (var exclusiveReceiver = new PartitionReceiver(EventHubConsumerClient.DefaultConsumerGroupName, partition, EventPosition.Earliest, connectionString, exclusiveOptions)) - await using (var nonExclusiveReceiver = new PartitionReceiver(EventHubConsumerClient.DefaultConsumerGroupName, partition, EventPosition.Earliest, connectionString, LowPrefetchOptions)) + var partition = (await QueryPartitionsAsync(scope.EventHubName, cancellationSource.Token)).First(); + + await SendEventsAsync(scope.EventHubName, sourceEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); + + await using (var exclusiveReceiver = new PartitionReceiver( + EventHubConsumerClient.DefaultConsumerGroupName, + partition, + EventPosition.Earliest, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential, + exclusiveOptions)) + + await using (var nonExclusiveReceiver = new PartitionReceiver( + EventHubConsumerClient.DefaultConsumerGroupName, + partition, + EventPosition.Earliest, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential, + LowPrefetchOptions)) { var exclusiveMonitor = MonitorReadingEvents(exclusiveReceiver, null, cancellationSource.Token); await Task.WhenAny(exclusiveMonitor.StartCompletion.Task, Task.Delay(Timeout.Infinite, cancellationSource.Token)); @@ -1185,14 +1354,28 @@ public async Task ReceiverCannotReadWithLowerOwnerLevelThanActiveReader() var higherOptions = new PartitionReceiverOptions { OwnerLevel = 40, PrefetchCount = LowPrefetchCount }; var lowerOptions = new PartitionReceiverOptions { OwnerLevel = 20, PrefetchCount = LowPrefetchCount }; - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); var sourceEvents = EventGenerator.CreateSmallEvents(200).ToList(); - - var partition = (await QueryPartitionsAsync(connectionString, cancellationSource.Token)).First(); - await SendEventsAsync(connectionString, sourceEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); - - await using (var higherReceiver = new PartitionReceiver(EventHubConsumerClient.DefaultConsumerGroupName, partition, EventPosition.Earliest, connectionString, higherOptions)) - await using (var lowerReceiver = new PartitionReceiver(EventHubConsumerClient.DefaultConsumerGroupName, partition, EventPosition.Earliest, connectionString, lowerOptions)) + var partition = (await QueryPartitionsAsync(scope.EventHubName, cancellationSource.Token)).First(); + + await SendEventsAsync(scope.EventHubName, sourceEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); + + await using (var higherReceiver = new PartitionReceiver( + EventHubConsumerClient.DefaultConsumerGroupName, + partition, + EventPosition.Earliest, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential, + higherOptions)) + + await using (var lowerReceiver = new PartitionReceiver( + EventHubConsumerClient.DefaultConsumerGroupName, + partition, + EventPosition.Earliest, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential, + lowerOptions)) { var expectedEvents = sourceEvents.Select(evt => evt.MessageId); @@ -1225,23 +1408,37 @@ public async Task ReceiverCanReadFromMultiplePartitionsWithDifferentActiveOwnerL var higherOptions = new PartitionReceiverOptions { OwnerLevel = 40, PrefetchCount = LowPrefetchCount }; var lowerOptions = new PartitionReceiverOptions { OwnerLevel = 20, PrefetchCount = LowPrefetchCount }; - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); var sourceEvents = EventGenerator.CreateSmallEvents(200).ToList(); - var partitions = await QueryPartitionsAsync(connectionString, cancellationSource.Token); + var partitions = await QueryPartitionsAsync(scope.EventHubName, cancellationSource.Token); // Send the same set of events to both partitions. await Task.WhenAll ( - SendEventsAsync(connectionString, sourceEvents, new CreateBatchOptions { PartitionId = partitions[0] }, cancellationSource.Token), - SendEventsAsync(connectionString, sourceEvents, new CreateBatchOptions { PartitionId = partitions[1] }, cancellationSource.Token) + SendEventsAsync(scope.EventHubName, sourceEvents, new CreateBatchOptions { PartitionId = partitions[0] }, cancellationSource.Token), + SendEventsAsync(scope.EventHubName, sourceEvents, new CreateBatchOptions { PartitionId = partitions[1] }, cancellationSource.Token) ); // Read from each partition, allowing the higher level operation to begin first. Both read operations should be // successful and read all events from their respective partition. - await using (var higherReceiver = new PartitionReceiver(EventHubConsumerClient.DefaultConsumerGroupName, partitions[0], EventPosition.Earliest, connectionString, higherOptions)) - await using (var lowerReceiver = new PartitionReceiver(EventHubConsumerClient.DefaultConsumerGroupName, partitions[1], EventPosition.Earliest, connectionString, lowerOptions)) + await using (var higherReceiver = new PartitionReceiver( + EventHubConsumerClient.DefaultConsumerGroupName, + partitions[0], + EventPosition.Earliest, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential, + higherOptions)) + + await using (var lowerReceiver = new PartitionReceiver( + EventHubConsumerClient.DefaultConsumerGroupName, + partitions[1], + EventPosition.Earliest, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential, + lowerOptions)) { var expectedEvents = sourceEvents.Select(evt => evt.MessageId); var higherMonitor = MonitorReadingEvents(higherReceiver, expectedEvents, cancellationSource.Token); @@ -1279,14 +1476,28 @@ public async Task ReceiverCanReadFromMultipleConsumerGroupsWithDifferentActiveOw var higherOptions = new PartitionReceiverOptions { OwnerLevel = 40, PrefetchCount = LowPrefetchCount }; var lowerOptions = new PartitionReceiverOptions { OwnerLevel = 20, PrefetchCount = LowPrefetchCount }; - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); var sourceEvents = EventGenerator.CreateSmallEvents(200).ToList(); - var partition = (await QueryPartitionsAsync(connectionString, cancellationSource.Token)).First(); - await SendEventsAsync(connectionString, sourceEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); - - await using (var higherReceiver = new PartitionReceiver(scope.ConsumerGroups[0], partition, EventPosition.Earliest, connectionString, higherOptions)) - await using (var lowerReceiver = new PartitionReceiver(scope.ConsumerGroups[1], partition, EventPosition.Earliest, connectionString, lowerOptions)) + var partition = (await QueryPartitionsAsync(scope.EventHubName, cancellationSource.Token)).First(); + await SendEventsAsync(scope.EventHubName, sourceEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); + + await using (var higherReceiver = new PartitionReceiver( + scope.ConsumerGroups[0], + partition, + EventPosition.Earliest, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential, + higherOptions)) + + await using (var lowerReceiver = new PartitionReceiver( + scope.ConsumerGroups[1], + partition, + EventPosition.Earliest, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential, + lowerOptions)) { // Read from each partition, allowing the higher level operation to begin first. Both read operations should be // successful and read all events from their respective partition. @@ -1324,15 +1535,29 @@ public async Task ExclusiveReceiverSupercedesNonExclusiveActiveReader() cancellationSource.CancelAfter(EventHubsTestEnvironment.Instance.TestExecutionTimeLimit); var exclusiveOptions = new PartitionReceiverOptions { OwnerLevel = 20, PrefetchCount = LowPrefetchCount }; - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); var sourceEvents = EventGenerator.CreateSmallEvents(200).ToList(); var expectedEvents = sourceEvents.Select(evt => evt.MessageId); - var partition = (await QueryPartitionsAsync(connectionString, cancellationSource.Token)).First(); - await SendEventsAsync(connectionString, sourceEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); - - await using (var nonExclusiveReceiver = new PartitionReceiver(EventHubConsumerClient.DefaultConsumerGroupName, partition, EventPosition.Earliest, connectionString, LowPrefetchOptions)) - await using (var exclusiveReceiver = new PartitionReceiver(EventHubConsumerClient.DefaultConsumerGroupName, partition, EventPosition.Earliest, connectionString, exclusiveOptions)) + var partition = (await QueryPartitionsAsync(scope.EventHubName, cancellationSource.Token)).First(); + await SendEventsAsync(scope.EventHubName, sourceEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); + + await using (var nonExclusiveReceiver = new PartitionReceiver( + EventHubConsumerClient.DefaultConsumerGroupName, + partition, + EventPosition.Earliest, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential, + LowPrefetchOptions)) + + await using (var exclusiveReceiver = new PartitionReceiver( + EventHubConsumerClient.DefaultConsumerGroupName, + partition, + EventPosition.Earliest, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential, + exclusiveOptions)) { // Start the non-exclusive read, waiting until at least some events were read before starting the exclusive reader. @@ -1382,15 +1607,29 @@ public async Task ReceiverWithHigherOwnerLevelSupercedesActiveReader() var higherOptions = new PartitionReceiverOptions { OwnerLevel = 40, PrefetchCount = LowPrefetchCount }; var lowerOptions = new PartitionReceiverOptions { OwnerLevel = 20, PrefetchCount = LowPrefetchCount }; - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); var sourceEvents = EventGenerator.CreateSmallEvents(200).ToList(); var expectedEvents = sourceEvents.Select(evt => evt.MessageId); - var partition = (await QueryPartitionsAsync(connectionString, cancellationSource.Token)).First(); - await SendEventsAsync(connectionString, sourceEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); - - await using (var higherReceiver = new PartitionReceiver(EventHubConsumerClient.DefaultConsumerGroupName, partition, EventPosition.Earliest, connectionString, higherOptions)) - await using (var lowerReceiver = new PartitionReceiver(EventHubConsumerClient.DefaultConsumerGroupName, partition, EventPosition.Earliest, connectionString, lowerOptions)) + var partition = (await QueryPartitionsAsync(scope.EventHubName, cancellationSource.Token)).First(); + await SendEventsAsync(scope.EventHubName, sourceEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); + + await using (var higherReceiver = new PartitionReceiver( + EventHubConsumerClient.DefaultConsumerGroupName, + partition, + EventPosition.Earliest, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential, + higherOptions)) + + await using (var lowerReceiver = new PartitionReceiver( + EventHubConsumerClient.DefaultConsumerGroupName, + partition, + EventPosition.Earliest, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential, + lowerOptions)) { // Start the lower level read, waiting until at least some events were read before starting the higher reader. @@ -1431,7 +1670,7 @@ public async Task ReceiverWithHigherOwnerLevelSupercedesActiveReader() /// /// [Test] - public async Task ExclusiveReceiverDoesNotSupercedNonExclusiveActiveReaderOnAnotherPartition() + public async Task ExclusiveReceiverDoesNotSupersedeNonExclusiveActiveReaderOnAnotherPartition() { await using (EventHubScope scope = await EventHubScope.CreateAsync(2)) { @@ -1439,21 +1678,35 @@ public async Task ExclusiveReceiverDoesNotSupercedNonExclusiveActiveReaderOnAnot cancellationSource.CancelAfter(EventHubsTestEnvironment.Instance.TestExecutionTimeLimit); var exclusiveOptions = new PartitionReceiverOptions { OwnerLevel = 20, PrefetchCount = LowPrefetchCount }; - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); var sourceEvents = EventGenerator.CreateSmallEvents(200).ToList(); var expectedEvents = sourceEvents.Select(evt => evt.MessageId); - var partitions = await QueryPartitionsAsync(connectionString, cancellationSource.Token); + var partitions = await QueryPartitionsAsync(scope.EventHubName, cancellationSource.Token); // Send the same set of events to both partitions. await Task.WhenAll ( - SendEventsAsync(connectionString, sourceEvents, new CreateBatchOptions { PartitionId = partitions[0] }, cancellationSource.Token), - SendEventsAsync(connectionString, sourceEvents, new CreateBatchOptions { PartitionId = partitions[1] }, cancellationSource.Token) + SendEventsAsync(scope.EventHubName, sourceEvents, new CreateBatchOptions { PartitionId = partitions[0] }, cancellationSource.Token), + SendEventsAsync(scope.EventHubName, sourceEvents, new CreateBatchOptions { PartitionId = partitions[1] }, cancellationSource.Token) ); - await using (var nonExclusiveReceiver = new PartitionReceiver(EventHubConsumerClient.DefaultConsumerGroupName, partitions[0], EventPosition.Earliest, connectionString, LowPrefetchOptions)) - await using (var exclusiveReceiver = new PartitionReceiver(EventHubConsumerClient.DefaultConsumerGroupName, partitions[1], EventPosition.Earliest, connectionString, exclusiveOptions)) + await using (var nonExclusiveReceiver = new PartitionReceiver( + EventHubConsumerClient.DefaultConsumerGroupName, + partitions[0], + EventPosition.Earliest, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential, + LowPrefetchOptions)) + + await using (var exclusiveReceiver = new PartitionReceiver( + EventHubConsumerClient.DefaultConsumerGroupName, + partitions[1], + EventPosition.Earliest, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential, + exclusiveOptions)) { // Start the non-exclusive read, waiting until at least some events were read before starting the exclusive reader. @@ -1493,7 +1746,7 @@ await Task.WhenAll /// /// [Test] - public async Task ExclusiveReceiverDoesNotSupercedNonExclusiveActiveReaderOnAnotherConsumerGroup() + public async Task ExclusiveReceiverDoesNotSupersedeNonExclusiveActiveReaderOnAnotherConsumerGroup() { var ConsumerGroups = new[] { "customGroup", "customTwo" }; @@ -1503,15 +1756,29 @@ public async Task ExclusiveReceiverDoesNotSupercedNonExclusiveActiveReaderOnAnot cancellationSource.CancelAfter(EventHubsTestEnvironment.Instance.TestExecutionTimeLimit); var exclusiveOptions = new PartitionReceiverOptions { OwnerLevel = 20, PrefetchCount = LowPrefetchCount }; - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); var sourceEvents = EventGenerator.CreateSmallEvents(200).ToList(); var expectedEvents = sourceEvents.Select(evt => evt.MessageId); - var partition = (await QueryPartitionsAsync(connectionString, cancellationSource.Token)).First(); - await SendEventsAsync(connectionString, sourceEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); - - await using (var nonExclusiveReceiver = new PartitionReceiver(scope.ConsumerGroups[0], partition, EventPosition.Earliest, connectionString, LowPrefetchOptions)) - await using (var exclusiveReceiver = new PartitionReceiver(scope.ConsumerGroups[1], partition, EventPosition.Earliest, connectionString, exclusiveOptions)) + var partition = (await QueryPartitionsAsync(scope.EventHubName, cancellationSource.Token)).First(); + await SendEventsAsync(scope.EventHubName, sourceEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); + + await using (var nonExclusiveReceiver = new PartitionReceiver( + scope.ConsumerGroups[0], + partition, + EventPosition.Earliest, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential, + LowPrefetchOptions)) + + await using (var exclusiveReceiver = new PartitionReceiver( + scope.ConsumerGroups[1], + partition, + EventPosition.Earliest, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential, + exclusiveOptions)) { // Start the non-exclusive read, waiting until at least some events were read before starting the exclusive reader. @@ -1560,15 +1827,29 @@ public async Task ReceiverIsNotCompromisedByBeingSupercededByAnotherReaderWithHi var higherOptions = new PartitionReceiverOptions { OwnerLevel = 40, PrefetchCount = LowPrefetchCount }; var lowerOptions = new PartitionReceiverOptions { OwnerLevel = 20, PrefetchCount = LowPrefetchCount }; - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); var sourceEvents = EventGenerator.CreateSmallEvents(200).ToList(); var expectedEvents = sourceEvents.Select(evt => evt.MessageId); - var partition = (await QueryPartitionsAsync(connectionString, cancellationSource.Token)).First(); - await SendEventsAsync(connectionString, sourceEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); - - await using (var higherReceiver = new PartitionReceiver(EventHubConsumerClient.DefaultConsumerGroupName, partition, EventPosition.Earliest, connectionString, higherOptions)) - await using (var lowerReceiver = new PartitionReceiver(EventHubConsumerClient.DefaultConsumerGroupName, partition, EventPosition.Earliest, connectionString, lowerOptions)) + var partition = (await QueryPartitionsAsync(scope.EventHubName, cancellationSource.Token)).First(); + await SendEventsAsync(scope.EventHubName, sourceEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); + + await using (var higherReceiver = new PartitionReceiver( + EventHubConsumerClient.DefaultConsumerGroupName, + partition, + EventPosition.Earliest, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential, + higherOptions)) + + await using (var lowerReceiver = new PartitionReceiver( + EventHubConsumerClient.DefaultConsumerGroupName, + partition, + EventPosition.Earliest, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential, + lowerOptions)) { // Start the lower level read, waiting until at least some events were read before starting the higher reader. @@ -1619,12 +1900,11 @@ public async Task ExclusiveReceiverDetectsAnotherExclusiveReaderWithSameLevel() using var cancellationSource = new CancellationTokenSource(); cancellationSource.CancelAfter(EventHubsTestEnvironment.Instance.TestExecutionTimeLimit); - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); - var partition = (await QueryPartitionsAsync(connectionString, cancellationSource.Token)).First(); + var partition = (await QueryPartitionsAsync(scope.EventHubName, cancellationSource.Token)).First(); // Seed the partition with events. - await SendEventsAsync(connectionString, EventGenerator.CreateSmallEvents(250), new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); + await SendEventsAsync(scope.EventHubName, EventGenerator.CreateSmallEvents(250), new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); // Create the receivers and read concurrently in the background until the initial receiver recognizes the partition has been stolen. @@ -1633,8 +1913,23 @@ public async Task ExclusiveReceiverDetectsAnotherExclusiveReaderWithSameLevel() var capturedException = default(Exception); var completionSource = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); - await using var firstReceiver = new PartitionReceiver(EventHubConsumerClient.DefaultConsumerGroupName, partition, EventPosition.Earliest, connectionString, receiverOptions); - await using var secondReceiver = new PartitionReceiver(EventHubConsumerClient.DefaultConsumerGroupName, partition, EventPosition.Earliest, connectionString, receiverOptions); + await using var firstReceiver = new PartitionReceiver( + EventHubConsumerClient.DefaultConsumerGroupName, + partition, + EventPosition.Earliest, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential, + receiverOptions); + + await using var secondReceiver = new PartitionReceiver( + EventHubConsumerClient.DefaultConsumerGroupName, + partition, + EventPosition.Earliest, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential, + receiverOptions); var firstReceiverTask = Task.Run(async () => { @@ -1709,12 +2004,11 @@ public async Task ExclusiveReceiverCanReassertOwnershipFromAnotherExclusiveReade using var cancellationSource = new CancellationTokenSource(); cancellationSource.CancelAfter(EventHubsTestEnvironment.Instance.TestExecutionTimeLimit); - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); - var partition = (await QueryPartitionsAsync(connectionString, cancellationSource.Token)).First(); + var partition = (await QueryPartitionsAsync(scope.EventHubName, cancellationSource.Token)).First(); // Seed the partition with events. - await SendEventsAsync(connectionString, EventGenerator.CreateSmallEvents(250), new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); + await SendEventsAsync(scope.EventHubName, EventGenerator.CreateSmallEvents(250), new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); // Create the receivers and read concurrently in the background until the initial receiver recognizes the partition has been stolen. @@ -1723,8 +2017,23 @@ public async Task ExclusiveReceiverCanReassertOwnershipFromAnotherExclusiveReade var completionSource = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); var secondReceiverStolen = false; - await using var firstReceiver = new PartitionReceiver(EventHubConsumerClient.DefaultConsumerGroupName, partition, EventPosition.Earliest, connectionString, receiverOptions); - await using var secondReceiver = new PartitionReceiver(EventHubConsumerClient.DefaultConsumerGroupName, partition, EventPosition.Earliest, connectionString, receiverOptions); + await using var firstReceiver = new PartitionReceiver( + EventHubConsumerClient.DefaultConsumerGroupName, + partition, + EventPosition.Earliest, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential, + receiverOptions); + + await using var secondReceiver = new PartitionReceiver( + EventHubConsumerClient.DefaultConsumerGroupName, + partition, + EventPosition.Earliest, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential, + receiverOptions); var firstReceiverTask = Task.Run(async () => { @@ -1826,10 +2135,15 @@ public async Task ReceiverRespectsTheWaitTimeWhenReading() using var cancellationSource = new CancellationTokenSource(); cancellationSource.CancelAfter(EventHubsTestEnvironment.Instance.TestExecutionTimeLimit); - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); - var partition = (await QueryPartitionsAsync(connectionString, cancellationSource.Token)).First(); + var partition = (await QueryPartitionsAsync(scope.EventHubName, cancellationSource.Token)).First(); - await using (var receiver = new PartitionReceiver(EventHubConsumerClient.DefaultConsumerGroupName, partition, EventPosition.Earliest, EventHubsTestEnvironment.Instance.EventHubsConnectionString, scope.EventHubName)) + await using (var receiver = new PartitionReceiver( + EventHubConsumerClient.DefaultConsumerGroupName, + partition, + EventPosition.Earliest, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential)) { var waitTime = TimeSpan.FromMilliseconds(100); var desiredEmptyBatches = 10; @@ -1869,8 +2183,7 @@ public async Task ReceiverCanReadEventsWithAFullyPopulatedAmqpMessage() using var cancellationSource = new CancellationTokenSource(); cancellationSource.CancelAfter(EventHubsTestEnvironment.Instance.TestExecutionTimeLimit); - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); - var partition = (await QueryPartitionsAsync(connectionString, cancellationSource.Token)).First(); + var partition = (await QueryPartitionsAsync(scope.EventHubName, cancellationSource.Token)).First(); var message = new AmqpAnnotatedMessage(AmqpMessageBody.FromData(new ReadOnlyMemory[] { new byte[] { 0x11, 0x22, 0x33 } })); var eventData = new EventData(message); @@ -1921,10 +2234,21 @@ public async Task ReceiverCanReadEventsWithAFullyPopulatedAmqpMessage() // Publish the event and then read it back. - await using var producer = new EventHubProducerClient(connectionString); + await using var producer = new EventHubProducerClient( + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential); + await producer.SendAsync(new[] { eventData }, new SendEventOptions { PartitionId = partition }); - await using var receiver = new PartitionReceiver(EventHubConsumerClient.DefaultConsumerGroupName, partition, EventPosition.Earliest, connectionString); + await using var receiver = new PartitionReceiver( + EventHubConsumerClient.DefaultConsumerGroupName, + partition, + EventPosition.Earliest, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential); + var readState = await ReadEventsAsync(receiver, new HashSet { eventData.MessageId }, cancellationSource.Token); Assert.That(cancellationSource.IsCancellationRequested, Is.False, "The cancellation token should not have been signaled."); @@ -1980,8 +2304,7 @@ public async Task ReceiverCanReadEventsWithAValueBody() using var cancellationSource = new CancellationTokenSource(); cancellationSource.CancelAfter(EventHubsTestEnvironment.Instance.TestExecutionTimeLimit); - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); - var partition = (await QueryPartitionsAsync(connectionString, cancellationSource.Token)).First(); + var partition = (await QueryPartitionsAsync(scope.EventHubName, cancellationSource.Token)).First(); var value = new Dictionary { { "key", "value" } }; var message = new AmqpAnnotatedMessage(AmqpMessageBody.FromValue(value)); var eventData = new EventData(message) { MessageId = Guid.NewGuid().ToString() }; @@ -1990,10 +2313,21 @@ public async Task ReceiverCanReadEventsWithAValueBody() // Publish the event and then read it back. - await using var producer = new EventHubProducerClient(connectionString); + await using var producer = new EventHubProducerClient( + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential); + await producer.SendAsync(new[] { eventData }, new SendEventOptions { PartitionId = partition }); - await using var receiver = new PartitionReceiver(EventHubConsumerClient.DefaultConsumerGroupName, partition, EventPosition.Earliest, connectionString); + await using var receiver = new PartitionReceiver( + EventHubConsumerClient.DefaultConsumerGroupName, + partition, + EventPosition.Earliest, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential); + var readState = await ReadEventsAsync(receiver, new HashSet { eventData.MessageId }, cancellationSource.Token); Assert.That(cancellationSource.IsCancellationRequested, Is.False, "The cancellation token should not have been signaled."); @@ -2024,8 +2358,7 @@ public async Task ReceiverCanReadEventsWithASequenceBody() using var cancellationSource = new CancellationTokenSource(); cancellationSource.CancelAfter(EventHubsTestEnvironment.Instance.TestExecutionTimeLimit); - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); - var partition = (await QueryPartitionsAsync(connectionString, cancellationSource.Token)).First(); + var partition = (await QueryPartitionsAsync(scope.EventHubName, cancellationSource.Token)).First(); var value = new[] { new List { "1", 2 } }; var message = new AmqpAnnotatedMessage(AmqpMessageBody.FromSequence(value)); var eventData = new EventData(message) { MessageId = Guid.NewGuid().ToString() }; @@ -2034,10 +2367,21 @@ public async Task ReceiverCanReadEventsWithASequenceBody() // Publish the event and then read it back. - await using var producer = new EventHubProducerClient(connectionString); + await using var producer = new EventHubProducerClient( + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential); + await producer.SendAsync(new[] { eventData }, new SendEventOptions { PartitionId = partition }); - await using var receiver = new PartitionReceiver(EventHubConsumerClient.DefaultConsumerGroupName, partition, EventPosition.Earliest, connectionString); + await using var receiver = new PartitionReceiver( + EventHubConsumerClient.DefaultConsumerGroupName, + partition, + EventPosition.Earliest, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential); + var readState = await ReadEventsAsync(receiver, new HashSet { eventData.MessageId }, cancellationSource.Token); Assert.That(cancellationSource.IsCancellationRequested, Is.False, "The cancellation token should not have been signaled."); @@ -2072,11 +2416,17 @@ public async Task ReceiverCanRetrievePartitionProperties(EventHubsTransportType using var cancellationSource = new CancellationTokenSource(); cancellationSource.CancelAfter(EventHubsTestEnvironment.Instance.TestExecutionTimeLimit); - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); var receiverOptions = new PartitionReceiverOptions { ConnectionOptions = new EventHubConnectionOptions { TransportType = transportType } }; - var partition = (await QueryPartitionsAsync(connectionString, cancellationSource.Token)).First(); - - await using (var receiver = new PartitionReceiver(EventHubConsumerClient.DefaultConsumerGroupName, partition, EventPosition.Earliest, connectionString, receiverOptions)) + var partition = (await QueryPartitionsAsync(scope.EventHubName, cancellationSource.Token)).First(); + + await using (var receiver = new PartitionReceiver( + EventHubConsumerClient.DefaultConsumerGroupName, + partition, + EventPosition.Earliest, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential, + receiverOptions)) { var partitionProperties = await receiver.GetPartitionPropertiesAsync(cancellationSource.Token); Assert.That(cancellationSource.IsCancellationRequested, Is.False, "The cancellation token should not have been signaled."); @@ -2104,14 +2454,20 @@ public async Task ReceiverCannotRetrievePartitionPropertiesWhenConnectionIsClose using var cancellationSource = new CancellationTokenSource(); cancellationSource.CancelAfter(EventHubsTestEnvironment.Instance.TestExecutionTimeLimit); - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); - var connection = new EventHubConnection(connectionString); - var partition = (await QueryPartitionsAsync(connectionString, cancellationSource.Token)).First(); + var connection = new EventHubConnection( + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential); + + var partition = (await QueryPartitionsAsync(scope.EventHubName, cancellationSource.Token)).First(); - await using (var receiver = new PartitionReceiver(EventHubConsumerClient.DefaultConsumerGroupName, partition, EventPosition.Earliest, connection)) + await using (var receiver = new PartitionReceiver( + EventHubConsumerClient.DefaultConsumerGroupName, + partition, + EventPosition.Earliest, + connection)) { Assert.That(async () => await receiver.GetPartitionPropertiesAsync(cancellationSource.Token), Throws.Nothing); - await connection.CloseAsync(cancellationSource.Token); Assert.That(async () => await receiver.GetPartitionPropertiesAsync(cancellationSource.Token), Throws.InstanceOf().And.Property(nameof(EventHubsException.Reason)).EqualTo(EventHubsException.FailureReason.ClientClosed)); @@ -2133,8 +2489,7 @@ public async Task ReceiverCannotRetrieveMetadataWithInvalidProxy() using var cancellationSource = new CancellationTokenSource(); cancellationSource.CancelAfter(EventHubsTestEnvironment.Instance.TestExecutionTimeLimit); - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); - var partition = (await QueryPartitionsAsync(connectionString, cancellationSource.Token)).First(); + var partition = (await QueryPartitionsAsync(scope.EventHubName, cancellationSource.Token)).First(); var invalidProxyOptions = new PartitionReceiverOptions(); invalidProxyOptions.RetryOptions.MaximumRetries = 0; @@ -2143,7 +2498,14 @@ public async Task ReceiverCannotRetrieveMetadataWithInvalidProxy() invalidProxyOptions.ConnectionOptions.Proxy = new WebProxy("http://1.2.3.4:9999"); invalidProxyOptions.ConnectionOptions.TransportType = EventHubsTransportType.AmqpWebSockets; - await using (var receiver = new PartitionReceiver(EventHubConsumerClient.DefaultConsumerGroupName, partition, EventPosition.Earliest, connectionString, invalidProxyOptions)) + await using (var receiver = new PartitionReceiver( + EventHubConsumerClient.DefaultConsumerGroupName, + partition, + EventPosition.Earliest, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential, + invalidProxyOptions)) { // The sockets implementation in .NET Core on some platforms, such as Linux, does not trigger a specific socket exception and // will, instead, hang indefinitely. The try timeout is intentionally set to a value smaller than the cancellation token to @@ -2159,15 +2521,18 @@ public async Task ReceiverCannotRetrieveMetadataWithInvalidProxy() /// Reads the list of partition identifiers for an Event Hub instance. /// /// - /// The connection string to use when creating the producer. + /// The Event Hub Name to use when creating the producer. /// The token used to signal a cancellation request. /// /// The set of partition identifiers. /// - private async Task QueryPartitionsAsync(string connectionString, + private async Task QueryPartitionsAsync(string eventHubName, CancellationToken cancellationToken = default) { - await using (var producer = new EventHubProducerClient(connectionString)) + await using (var producer = new EventHubProducerClient( + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + eventHubName, + EventHubsTestEnvironment.Instance.Credential)) { return await producer.GetPartitionIdsAsync(cancellationToken); } @@ -2177,21 +2542,24 @@ private async Task QueryPartitionsAsync(string connectionString, /// Sends a set of events using a new producer to do so. /// /// - /// The connection string to use when creating the producer. + /// The Event Hub Name to use when creating the producer. /// The set of events to send. /// The set of options to apply when creating batches. /// The token used to signal a cancellation request. /// /// The count of events that were sent. /// - private async Task SendEventsAsync(string connectionString, + private async Task SendEventsAsync(string eventHubName, IEnumerable sourceEvents, CreateBatchOptions batchOptions = default, CancellationToken cancellationToken = default) { var sentCount = 0; - await using (var producer = new EventHubProducerClient(connectionString)) + await using (var producer = new EventHubProducerClient( + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + eventHubName, + EventHubsTestEnvironment.Instance.Credential)) { foreach (var batch in (await EventGenerator.BuildBatchesAsync(sourceEvents, producer, batchOptions, cancellationToken))) { diff --git a/sdk/eventhub/Azure.Messaging.EventHubs/tests/Producer/EventHubBufferedProducerClientLiveTests.cs b/sdk/eventhub/Azure.Messaging.EventHubs/tests/Producer/EventHubBufferedProducerClientLiveTests.cs index e7cfd9cf875f..18882e31e530 100644 --- a/sdk/eventhub/Azure.Messaging.EventHubs/tests/Producer/EventHubBufferedProducerClientLiveTests.cs +++ b/sdk/eventhub/Azure.Messaging.EventHubs/tests/Producer/EventHubBufferedProducerClientLiveTests.cs @@ -53,7 +53,7 @@ public async Task ProducerCanPublishRoundRobinWithDefaultOptions() var completionSource = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); await using var scope = await EventHubScope.CreateAsync(partitionCount); - await using var producer = new EventHubBufferedProducerClient(EventHubsTestEnvironment.Instance.EventHubsConnectionString, scope.EventHubName); + await using var producer = new EventHubBufferedProducerClient(EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, scope.EventHubName, EventHubsTestEnvironment.Instance.Credential); producer.SendEventBatchSucceededAsync += args => { @@ -103,7 +103,10 @@ public async Task ProducerCanPublishRoundRobinWithDefaultOptions() // Read back the events and ensure all were successfully published. - await using var consumerClient = new EventHubConsumerClient(EventHubConsumerClient.DefaultConsumerGroupName, EventHubsTestEnvironment.Instance.EventHubsConnectionString, scope.EventHubName); + await using var consumerClient = new EventHubConsumerClient( + EventHubConsumerClient.DefaultConsumerGroupName, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, EventHubsTestEnvironment.Instance.Credential); await foreach (var partitionEvent in consumerClient.ReadEventsAsync(cancellationSource.Token)) { @@ -148,7 +151,7 @@ public async Task ProducerCanPublishUsingPartitionKeysWithDefaultOptions() var completionSource = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); await using var scope = await EventHubScope.CreateAsync(partitionCount); - await using var producer = new EventHubBufferedProducerClient(EventHubsTestEnvironment.Instance.EventHubsConnectionString, scope.EventHubName); + await using var producer = new EventHubBufferedProducerClient(EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, scope.EventHubName, EventHubsTestEnvironment.Instance.Credential); producer.SendEventBatchSucceededAsync += args => { @@ -206,7 +209,10 @@ public async Task ProducerCanPublishUsingPartitionKeysWithDefaultOptions() // Read back the events and ensure all were successfully published. - await using var consumerClient = new EventHubConsumerClient(EventHubConsumerClient.DefaultConsumerGroupName, EventHubsTestEnvironment.Instance.EventHubsConnectionString, scope.EventHubName); + await using var consumerClient = new EventHubConsumerClient( + EventHubConsumerClient.DefaultConsumerGroupName, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, EventHubsTestEnvironment.Instance.Credential); await foreach (var partitionEvent in consumerClient.ReadEventsAsync(cancellationSource.Token)) { @@ -251,7 +257,7 @@ public async Task ProducerCanPublishToPartitionIdsWithDefaultOptions() var completionSource = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); await using var scope = await EventHubScope.CreateAsync(partitionCount); - await using var producer = new EventHubBufferedProducerClient(EventHubsTestEnvironment.Instance.EventHubsConnectionString, scope.EventHubName); + await using var producer = new EventHubBufferedProducerClient(EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, scope.EventHubName, EventHubsTestEnvironment.Instance.Credential); var partitions = await producer.GetPartitionIdsAsync(cancellationSource.Token); @@ -311,7 +317,10 @@ public async Task ProducerCanPublishToPartitionIdsWithDefaultOptions() // Read back the events and ensure all were successfully published. - await using var consumerClient = new EventHubConsumerClient(EventHubConsumerClient.DefaultConsumerGroupName, EventHubsTestEnvironment.Instance.EventHubsConnectionString, scope.EventHubName); + await using var consumerClient = new EventHubConsumerClient( + EventHubConsumerClient.DefaultConsumerGroupName, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, EventHubsTestEnvironment.Instance.Credential); await foreach (var partitionEvent in consumerClient.ReadEventsAsync(cancellationSource.Token)) { @@ -355,7 +364,7 @@ public async Task ProducerCanPublishHeterogeneousEventsWithDefaultOptions() var completionSource = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); await using var scope = await EventHubScope.CreateAsync(partitionCount); - await using var producer = new EventHubBufferedProducerClient(EventHubsTestEnvironment.Instance.EventHubsConnectionString, scope.EventHubName); + await using var producer = new EventHubBufferedProducerClient(EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, scope.EventHubName, EventHubsTestEnvironment.Instance.Credential); var partitions = await producer.GetPartitionIdsAsync(cancellationSource.Token); @@ -421,7 +430,10 @@ public async Task ProducerCanPublishHeterogeneousEventsWithDefaultOptions() // Read back the events and ensure all were successfully published. - await using var consumerClient = new EventHubConsumerClient(EventHubConsumerClient.DefaultConsumerGroupName, EventHubsTestEnvironment.Instance.EventHubsConnectionString, scope.EventHubName); + await using var consumerClient = new EventHubConsumerClient( + EventHubConsumerClient.DefaultConsumerGroupName, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, EventHubsTestEnvironment.Instance.Credential); await foreach (var partitionEvent in consumerClient.ReadEventsAsync(cancellationSource.Token)) { @@ -467,7 +479,7 @@ public async Task ProducerCanPublishWithRestrictedConcurrency() var options = new EventHubBufferedProducerClientOptions { MaximumConcurrentSends = concurrentSends }; await using var scope = await EventHubScope.CreateAsync(partitionCount); - await using var producer = new EventHubBufferedProducerClient(EventHubsTestEnvironment.Instance.EventHubsConnectionString, scope.EventHubName, options); + await using var producer = new EventHubBufferedProducerClient(EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, scope.EventHubName, EventHubsTestEnvironment.Instance.Credential, options); var partitions = await producer.GetPartitionIdsAsync(cancellationSource.Token); @@ -533,7 +545,10 @@ public async Task ProducerCanPublishWithRestrictedConcurrency() // Read back the events and ensure all were successfully published. - await using var consumerClient = new EventHubConsumerClient(EventHubConsumerClient.DefaultConsumerGroupName, EventHubsTestEnvironment.Instance.EventHubsConnectionString, scope.EventHubName); + await using var consumerClient = new EventHubConsumerClient( + EventHubConsumerClient.DefaultConsumerGroupName, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, EventHubsTestEnvironment.Instance.Credential); await foreach (var partitionEvent in consumerClient.ReadEventsAsync(cancellationSource.Token)) { @@ -582,7 +597,7 @@ public async Task ProducerCanPublishWithConcurrentPartitions() }; await using var scope = await EventHubScope.CreateAsync(partitionCount); - await using var producer = new EventHubBufferedProducerClient(EventHubsTestEnvironment.Instance.EventHubsConnectionString, scope.EventHubName, options); + await using var producer = new EventHubBufferedProducerClient(EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, scope.EventHubName, EventHubsTestEnvironment.Instance.Credential, options); producer.SendEventBatchSucceededAsync += args => { @@ -632,7 +647,10 @@ public async Task ProducerCanPublishWithConcurrentPartitions() // Read back the events and ensure all were successfully published. - await using var consumerClient = new EventHubConsumerClient(EventHubConsumerClient.DefaultConsumerGroupName, EventHubsTestEnvironment.Instance.EventHubsConnectionString, scope.EventHubName); + await using var consumerClient = new EventHubConsumerClient( + EventHubConsumerClient.DefaultConsumerGroupName, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, EventHubsTestEnvironment.Instance.Credential); await foreach (var partitionEvent in consumerClient.ReadEventsAsync(cancellationSource.Token)) { @@ -686,7 +704,7 @@ public async Task ProducerCanPublishAfterIdle() .Callback(() => idleCompletionSource.TrySetResult(true)); await using var scope = await EventHubScope.CreateAsync(partitionCount); - await using var producer = new EventHubBufferedProducerClient(EventHubsTestEnvironment.Instance.EventHubsConnectionString, scope.EventHubName); + await using var producer = new EventHubBufferedProducerClient(EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, scope.EventHubName, EventHubsTestEnvironment.Instance.Credential); var partitions = await producer.GetPartitionIdsAsync(cancellationSource.Token); @@ -760,7 +778,10 @@ public async Task ProducerCanPublishAfterIdle() // Read back the events and ensure all were successfully published. - await using var consumerClient = new EventHubConsumerClient(EventHubConsumerClient.DefaultConsumerGroupName, EventHubsTestEnvironment.Instance.EventHubsConnectionString, scope.EventHubName); + await using var consumerClient = new EventHubConsumerClient( + EventHubConsumerClient.DefaultConsumerGroupName, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, EventHubsTestEnvironment.Instance.Credential); await foreach (var partitionEvent in consumerClient.ReadEventsAsync(cancellationSource.Token)) { @@ -806,7 +827,7 @@ public async Task ProducerCanPublishAfterFlush() var options = new EventHubBufferedProducerClientOptions { MaximumConcurrentSends = eventSetCount }; await using var scope = await EventHubScope.CreateAsync(1); - await using var producer = new EventHubBufferedProducerClient(EventHubsTestEnvironment.Instance.EventHubsConnectionString, scope.EventHubName, options); + await using var producer = new EventHubBufferedProducerClient(EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, scope.EventHubName, EventHubsTestEnvironment.Instance.Credential, options); producer.SendEventBatchSucceededAsync += args => { @@ -846,7 +867,10 @@ public async Task ProducerCanPublishAfterFlush() // Read back the events and ensure all were successfully published. - await using var consumerClient = new EventHubConsumerClient(EventHubConsumerClient.DefaultConsumerGroupName, EventHubsTestEnvironment.Instance.EventHubsConnectionString, scope.EventHubName); + await using var consumerClient = new EventHubConsumerClient( + EventHubConsumerClient.DefaultConsumerGroupName, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, EventHubsTestEnvironment.Instance.Credential); await foreach (var partitionEvent in consumerClient.ReadEventsAsync(cancellationSource.Token)) { @@ -894,7 +918,7 @@ public async Task FlushSendsAllEventsAndWaitsForHandlersWithDefaultOptions() var options = new EventHubBufferedProducerClientOptions { MaximumConcurrentSends = partitionCount }; await using var scope = await EventHubScope.CreateAsync(partitionCount); - await using var producer = new EventHubBufferedProducerClient(EventHubsTestEnvironment.Instance.EventHubsConnectionString, scope.EventHubName, options); + await using var producer = new EventHubBufferedProducerClient(EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, scope.EventHubName, EventHubsTestEnvironment.Instance.Credential, options); producer.SendEventBatchSucceededAsync += args => { @@ -940,7 +964,10 @@ public async Task FlushSendsAllEventsAndWaitsForHandlersWithDefaultOptions() // Read back the events and ensure all were successfully published. - await using var consumerClient = new EventHubConsumerClient(EventHubConsumerClient.DefaultConsumerGroupName, EventHubsTestEnvironment.Instance.EventHubsConnectionString, scope.EventHubName); + await using var consumerClient = new EventHubConsumerClient( + EventHubConsumerClient.DefaultConsumerGroupName, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, EventHubsTestEnvironment.Instance.Credential); await foreach (var partitionEvent in consumerClient.ReadEventsAsync(cancellationSource.Token)) { @@ -995,7 +1022,7 @@ public async Task FlushSendsAllEventsAndWaitsForHandlersWithConcurrentPartitions }; await using var scope = await EventHubScope.CreateAsync(partitionCount); - await using var producer = new EventHubBufferedProducerClient(EventHubsTestEnvironment.Instance.EventHubsConnectionString, scope.EventHubName, options); + await using var producer = new EventHubBufferedProducerClient(EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, scope.EventHubName, EventHubsTestEnvironment.Instance.Credential, options); producer.SendEventBatchSucceededAsync += args => { @@ -1041,7 +1068,10 @@ public async Task FlushSendsAllEventsAndWaitsForHandlersWithConcurrentPartitions // Read back the events and ensure all were successfully published. - await using var consumerClient = new EventHubConsumerClient(EventHubConsumerClient.DefaultConsumerGroupName, EventHubsTestEnvironment.Instance.EventHubsConnectionString, scope.EventHubName); + await using var consumerClient = new EventHubConsumerClient( + EventHubConsumerClient.DefaultConsumerGroupName, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, EventHubsTestEnvironment.Instance.Credential); await foreach (var partitionEvent in consumerClient.ReadEventsAsync(cancellationSource.Token)) { @@ -1089,7 +1119,7 @@ public async Task CloseSendsAllEventsAndWaitsForHandlersWhenFlushingWithDefaultO var options = new EventHubBufferedProducerClientOptions { MaximumConcurrentSends = partitionCount }; await using var scope = await EventHubScope.CreateAsync(partitionCount); - await using var producer = new EventHubBufferedProducerClient(EventHubsTestEnvironment.Instance.EventHubsConnectionString, scope.EventHubName, options); + await using var producer = new EventHubBufferedProducerClient(EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, scope.EventHubName, EventHubsTestEnvironment.Instance.Credential, options); producer.SendEventBatchSucceededAsync += args => { @@ -1135,7 +1165,10 @@ public async Task CloseSendsAllEventsAndWaitsForHandlersWhenFlushingWithDefaultO // Read back the events and ensure all were successfully published. - await using var consumerClient = new EventHubConsumerClient(EventHubConsumerClient.DefaultConsumerGroupName, EventHubsTestEnvironment.Instance.EventHubsConnectionString, scope.EventHubName); + await using var consumerClient = new EventHubConsumerClient( + EventHubConsumerClient.DefaultConsumerGroupName, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, EventHubsTestEnvironment.Instance.Credential); await foreach (var partitionEvent in consumerClient.ReadEventsAsync(cancellationSource.Token)) { @@ -1185,7 +1218,7 @@ public async Task CloseSendsAllEventsAndWaitsForHandlersWhenFlushingWithConcurre }; await using var scope = await EventHubScope.CreateAsync(partitionCount); - await using var producer = new EventHubBufferedProducerClient(EventHubsTestEnvironment.Instance.EventHubsConnectionString, scope.EventHubName, options); + await using var producer = new EventHubBufferedProducerClient(EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, scope.EventHubName, EventHubsTestEnvironment.Instance.Credential, options); producer.SendEventBatchSucceededAsync += args => { @@ -1231,7 +1264,10 @@ public async Task CloseSendsAllEventsAndWaitsForHandlersWhenFlushingWithConcurre // Read back the events and ensure all were successfully published. - await using var consumerClient = new EventHubConsumerClient(EventHubConsumerClient.DefaultConsumerGroupName, EventHubsTestEnvironment.Instance.EventHubsConnectionString, scope.EventHubName); + await using var consumerClient = new EventHubConsumerClient( + EventHubConsumerClient.DefaultConsumerGroupName, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, EventHubsTestEnvironment.Instance.Credential); await foreach (var partitionEvent in consumerClient.ReadEventsAsync(cancellationSource.Token)) { @@ -1273,7 +1309,7 @@ public async Task CloseAbandonsEventsAndHandlersWhenClearingWithDefaultOptions() var options = new EventHubBufferedProducerClientOptions { MaximumConcurrentSends = partitionCount }; await using var scope = await EventHubScope.CreateAsync(partitionCount); - await using var producer = new EventHubBufferedProducerClient(EventHubsTestEnvironment.Instance.EventHubsConnectionString, scope.EventHubName, options); + await using var producer = new EventHubBufferedProducerClient(EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, scope.EventHubName, EventHubsTestEnvironment.Instance.Credential, options); producer.SendEventBatchFailedAsync += args => { @@ -1319,7 +1355,7 @@ public async Task CloseAbandonsEventsAndHandlersWhenClearingWithConcurrentPartit }; await using var scope = await EventHubScope.CreateAsync(partitionCount); - await using var producer = new EventHubBufferedProducerClient(EventHubsTestEnvironment.Instance.EventHubsConnectionString, scope.EventHubName, options); + await using var producer = new EventHubBufferedProducerClient(EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, scope.EventHubName, EventHubsTestEnvironment.Instance.Credential, options); producer.SendEventBatchFailedAsync += args => { @@ -1373,7 +1409,7 @@ public async Task CloseSendsEventsWhenFlushingAfterIdle() .Callback(() => idleCompletionSource.TrySetResult(true)); await using var scope = await EventHubScope.CreateAsync(partitionCount); - await using var producer = new EventHubBufferedProducerClient(EventHubsTestEnvironment.Instance.EventHubsConnectionString, scope.EventHubName, options); + await using var producer = new EventHubBufferedProducerClient(EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, scope.EventHubName, EventHubsTestEnvironment.Instance.Credential, options); producer.Logger = mockLogger.Object; @@ -1433,7 +1469,10 @@ public async Task CloseSendsEventsWhenFlushingAfterIdle() // Read back the events and ensure all were successfully published. - await using var consumerClient = new EventHubConsumerClient(EventHubConsumerClient.DefaultConsumerGroupName, EventHubsTestEnvironment.Instance.EventHubsConnectionString, scope.EventHubName); + await using var consumerClient = new EventHubConsumerClient( + EventHubConsumerClient.DefaultConsumerGroupName, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, EventHubsTestEnvironment.Instance.Credential); await foreach (var partitionEvent in consumerClient.ReadEventsAsync(cancellationSource.Token)) { @@ -1483,7 +1522,7 @@ public async Task CloseIsSuccessfulWhileIdle() .Callback(() => completionSource.TrySetResult(true)); await using var scope = await EventHubScope.CreateAsync(partitionCount); - await using var producer = new EventHubBufferedProducerClient(EventHubsTestEnvironment.Instance.EventHubsConnectionString, scope.EventHubName, options); + await using var producer = new EventHubBufferedProducerClient(EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, scope.EventHubName, EventHubsTestEnvironment.Instance.Credential, options); producer.Logger = mockLogger.Object; producer.SendEventBatchSucceededAsync += args => Task.CompletedTask; @@ -1523,11 +1562,10 @@ public async Task CloseIsSuccessfulWhileIdle() public async Task ProducerCanRetrieveEventHubProperties(EventHubsTransportType transportType) { var partitionCount = 4; - var connectionString = EventHubsTestEnvironment.Instance.EventHubsConnectionString; var producerOptions = new EventHubBufferedProducerClientOptions { ConnectionOptions = new EventHubConnectionOptions { TransportType = transportType } }; await using var scope = await EventHubScope.CreateAsync(partitionCount); - await using var producer = new EventHubBufferedProducerClient(connectionString, scope.EventHubName, producerOptions); + await using var producer = new EventHubBufferedProducerClient(EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, scope.EventHubName, EventHubsTestEnvironment.Instance.Credential, producerOptions); var properties = await producer.GetEventHubPropertiesAsync(); @@ -1548,11 +1586,10 @@ public async Task ProducerCanRetrieveEventHubProperties(EventHubsTransportType t public async Task ProducerCanRetrievePartitionProperties(EventHubsTransportType transportType) { var partitionCount = 4; - var connectionString = EventHubsTestEnvironment.Instance.EventHubsConnectionString; var producerOptions = new EventHubBufferedProducerClientOptions { ConnectionOptions = new EventHubConnectionOptions { TransportType = transportType } }; await using var scope = await EventHubScope.CreateAsync(partitionCount); - await using var producer = new EventHubBufferedProducerClient(connectionString, scope.EventHubName, producerOptions); + await using var producer = new EventHubBufferedProducerClient(EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, scope.EventHubName, EventHubsTestEnvironment.Instance.Credential, producerOptions); var cancellation = new CancellationTokenSource(TimeSpan.FromSeconds(20)); var properties = await producer.GetEventHubPropertiesAsync(); @@ -1576,7 +1613,7 @@ public async Task ProducerCanRetrievePartitionProperties(EventHubsTransportType public async Task ConnectionTransportPartitionIdsMatchPartitionProperties() { await using var scope = await EventHubScope.CreateAsync(4); - await using var producer = new EventHubBufferedProducerClient(EventHubsTestEnvironment.Instance.EventHubsConnectionString, scope.EventHubName); + await using var producer = new EventHubBufferedProducerClient(EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, scope.EventHubName, EventHubsTestEnvironment.Instance.Credential); var properties = await producer.GetEventHubPropertiesAsync(); var partitions = await producer.GetPartitionIdsAsync(); @@ -1596,7 +1633,7 @@ public async Task ConnectionTransportPartitionIdsMatchPartitionProperties() public async Task ProducerCannotRetrieveMetadataWhenClosed() { await using var scope = await EventHubScope.CreateAsync(1); - await using var producer = new EventHubBufferedProducerClient(EventHubsTestEnvironment.Instance.EventHubsConnectionString, scope.EventHubName); + await using var producer = new EventHubBufferedProducerClient(EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, scope.EventHubName, EventHubsTestEnvironment.Instance.Credential); var partition = (await producer.GetPartitionIdsAsync()).First(); @@ -1624,7 +1661,7 @@ public async Task ProducerCannotRetrieveMetadataWhenClosed() public async Task ProducerCannotRetrievePartitionPropertiesWhenPartitionIdIsInvalid(string invalidPartition) { await using var scope = await EventHubScope.CreateAsync(1); - await using var producer = new EventHubBufferedProducerClient(EventHubsTestEnvironment.Instance.EventHubsConnectionString, scope.EventHubName); + await using var producer = new EventHubBufferedProducerClient(EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, scope.EventHubName, EventHubsTestEnvironment.Instance.Credential); Assert.That(async () => await producer.GetPartitionPropertiesAsync(invalidPartition), Throws.TypeOf()); } @@ -1649,8 +1686,8 @@ public async Task ProducerCannotRetrieveMetadataWhenProxyIsInvalid() }; await using var scope = await EventHubScope.CreateAsync(1); - await using var producer = new EventHubBufferedProducerClient(EventHubsTestEnvironment.Instance.EventHubsConnectionString, scope.EventHubName); - await using var invalidProxyProducer = new EventHubBufferedProducerClient(EventHubsTestEnvironment.Instance.EventHubsConnectionString, scope.EventHubName, invalidProxyOptions); + await using var producer = new EventHubBufferedProducerClient(EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, scope.EventHubName, EventHubsTestEnvironment.Instance.Credential); + await using var invalidProxyProducer = new EventHubBufferedProducerClient(EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, scope.EventHubName, EventHubsTestEnvironment.Instance.Credential, invalidProxyOptions); var partition = (await producer.GetPartitionIdsAsync()).First(); diff --git a/sdk/eventhub/Azure.Messaging.EventHubs/tests/Producer/EventHubProducerClientLiveTests.cs b/sdk/eventhub/Azure.Messaging.EventHubs/tests/Producer/EventHubProducerClientLiveTests.cs index 05cdb4dcf1f5..38bb0890967f 100644 --- a/sdk/eventhub/Azure.Messaging.EventHubs/tests/Producer/EventHubProducerClientLiveTests.cs +++ b/sdk/eventhub/Azure.Messaging.EventHubs/tests/Producer/EventHubProducerClientLiveTests.cs @@ -14,7 +14,6 @@ using Azure.Messaging.EventHubs.Consumer; using Azure.Messaging.EventHubs.Core; using Azure.Messaging.EventHubs.Producer; -using Microsoft.Azure.Amqp.Framing; using NUnit.Framework; namespace Azure.Messaging.EventHubs.Tests @@ -52,9 +51,7 @@ public async Task ProducerWithNoOptionsCanSend(EventHubsTransportType transportT { await using (EventHubScope scope = await EventHubScope.CreateAsync(1)) { - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); - - await using (var connection = new EventHubConnection(connectionString, new EventHubConnectionOptions { TransportType = transportType })) + await using (var connection = new EventHubConnection(EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, scope.EventHubName, EventHubsTestEnvironment.Instance.Credential, new EventHubConnectionOptions { TransportType = transportType })) await using (var producer = new EventHubProducerClient(connection)) { EventData[] events = new[] { new EventData(Encoding.UTF8.GetBytes("AWord")) }; @@ -75,15 +72,13 @@ public async Task ProducerWithOptionsCanSend(EventHubsTransportType transportTyp { await using (EventHubScope scope = await EventHubScope.CreateAsync(1)) { - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); - var producerOptions = new EventHubProducerClientOptions { RetryOptions = new EventHubsRetryOptions { MaximumRetries = 5 }, ConnectionOptions = new EventHubConnectionOptions { TransportType = transportType } }; - await using (var producer = new EventHubProducerClient(connectionString, producerOptions)) + await using (var producer = new EventHubProducerClient(EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, scope.EventHubName, EventHubsTestEnvironment.Instance.Credential, producerOptions)) { EventData[] events = new[] { new EventData(Encoding.UTF8.GetBytes("AWord")) }; Assert.That(async () => await producer.SendAsync(events), Throws.Nothing); @@ -103,8 +98,6 @@ public async Task ProducerWithCustomBufferSizesCanSend(EventHubsTransportType tr { await using (EventHubScope scope = await EventHubScope.CreateAsync(1)) { - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); - var producerOptions = new EventHubProducerClientOptions { ConnectionOptions = new EventHubConnectionOptions @@ -114,7 +107,7 @@ public async Task ProducerWithCustomBufferSizesCanSend(EventHubsTransportType tr } }; - await using (var producer = new EventHubProducerClient(connectionString, producerOptions)) + await using (var producer = new EventHubProducerClient(EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, scope.EventHubName, EventHubsTestEnvironment.Instance.Credential, producerOptions)) { EventData[] events = new[] { new EventData(Encoding.UTF8.GetBytes("AWord")) }; Assert.That(async () => await producer.SendAsync(events), Throws.Nothing); @@ -132,9 +125,7 @@ public async Task ProducerWithIdentifierCanSend() { await using (EventHubScope scope = await EventHubScope.CreateAsync(1)) { - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); - - await using (var producer = new EventHubProducerClient(connectionString, new EventHubProducerClientOptions { Identifier = "CustomIdentif13r!" })) + await using (var producer = new EventHubProducerClient(EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, scope.EventHubName, EventHubsTestEnvironment.Instance.Credential, new EventHubProducerClientOptions { Identifier = "CustomIdentif13r!" })) { var events = new[] { new EventData(Encoding.UTF8.GetBytes("AWord")) }; Assert.That(async () => await producer.SendAsync(events), Throws.Nothing); @@ -151,7 +142,7 @@ public async Task ProducerWithIdentifierCanSend() public async Task ProducerCanSendToASpecificPartition() { await using EventHubScope scope = await EventHubScope.CreateAsync(4); - await using var producer = new EventHubProducerClient(EventHubsTestEnvironment.Instance.EventHubsConnectionString, scope.EventHubName); + await using var producer = new EventHubProducerClient(EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, scope.EventHubName, EventHubsTestEnvironment.Instance.Credential); using var cancellationSource = new CancellationTokenSource(); cancellationSource.CancelAfter(EventHubsTestEnvironment.Instance.TestExecutionTimeLimit); @@ -177,8 +168,9 @@ public async Task ProducerCanSendToASpecificPartition() await using var consumer = new EventHubConsumerClient( EventHubConsumerClient.DefaultConsumerGroupName, - EventHubsTestEnvironment.Instance.EventHubsConnectionString, - scope.EventHubName); + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential); try { @@ -212,7 +204,7 @@ public async Task ProducerCanSendToASpecificPartition() public async Task ProducerCanSendAnEventBatchToASpecificPartition() { await using EventHubScope scope = await EventHubScope.CreateAsync(4); - await using var producer = new EventHubProducerClient(EventHubsTestEnvironment.Instance.EventHubsConnectionString, scope.EventHubName); + await using var producer = new EventHubProducerClient(EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, scope.EventHubName, EventHubsTestEnvironment.Instance.Credential); using var cancellationSource = new CancellationTokenSource(); cancellationSource.CancelAfter(EventHubsTestEnvironment.Instance.TestExecutionTimeLimit); @@ -245,8 +237,9 @@ public async Task ProducerCanSendAnEventBatchToASpecificPartition() await using var consumer = new EventHubConsumerClient( EventHubConsumerClient.DefaultConsumerGroupName, - EventHubsTestEnvironment.Instance.EventHubsConnectionString, - scope.EventHubName); + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential); try { @@ -295,9 +288,7 @@ public async Task ProducerCanSendEventsWithCustomProperties() events[index].Properties["Type"] = $"com.microsoft.test.Type{ index }"; } - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); - - await using (var producer = new EventHubProducerClient(connectionString)) + await using (var producer = new EventHubProducerClient(EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, scope.EventHubName, EventHubsTestEnvironment.Instance.Credential)) { Assert.That(async () => await producer.SendAsync(events), Throws.Nothing); } @@ -313,7 +304,7 @@ public async Task ProducerCanSendEventsWithCustomProperties() public async Task ProducerCanSendEventsUsingAPartitionHashKey() { await using EventHubScope scope = await EventHubScope.CreateAsync(4); - await using var producer = new EventHubProducerClient(EventHubsTestEnvironment.Instance.EventHubsConnectionString, scope.EventHubName); + await using var producer = new EventHubProducerClient(EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, scope.EventHubName, EventHubsTestEnvironment.Instance.Credential); using var cancellationSource = new CancellationTokenSource(); cancellationSource.CancelAfter(EventHubsTestEnvironment.Instance.TestExecutionTimeLimit); @@ -339,8 +330,9 @@ public async Task ProducerCanSendEventsUsingAPartitionHashKey() await using var consumer = new EventHubConsumerClient( EventHubConsumerClient.DefaultConsumerGroupName, - EventHubsTestEnvironment.Instance.EventHubsConnectionString, - scope.EventHubName); + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential); try { @@ -379,7 +371,7 @@ public async Task ProducerCanSendEventsUsingAPartitionHashKey() public async Task ProducerCanSendAnEventBatchUsingAPartitionHashKey() { await using EventHubScope scope = await EventHubScope.CreateAsync(4); - await using var producer = new EventHubProducerClient(EventHubsTestEnvironment.Instance.EventHubsConnectionString, scope.EventHubName); + await using var producer = new EventHubProducerClient(EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, scope.EventHubName, EventHubsTestEnvironment.Instance.Credential); using var cancellationSource = new CancellationTokenSource(); cancellationSource.CancelAfter(EventHubsTestEnvironment.Instance.TestExecutionTimeLimit); @@ -412,8 +404,9 @@ public async Task ProducerCanSendAnEventBatchUsingAPartitionHashKey() await using var consumer = new EventHubConsumerClient( EventHubConsumerClient.DefaultConsumerGroupName, - EventHubsTestEnvironment.Instance.EventHubsConnectionString, - scope.EventHubName); + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential); try { @@ -453,13 +446,14 @@ public async Task ProducerCanSendSingleLargeEventInASet() { await using (EventHubScope scope = await EventHubScope.CreateAsync(1)) { - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); - - await using (var producer = new EventHubProducerClient(connectionString, new EventHubProducerClientOptions { RetryOptions = new EventHubsRetryOptions { TryTimeout = TimeSpan.FromMinutes(5) } })) + await using (var producer = new EventHubProducerClient( + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential, + new EventHubProducerClientOptions { RetryOptions = new EventHubsRetryOptions { TryTimeout = TimeSpan.FromMinutes(5) } })) { // Actual limit is 1046520 for a single event. EventData[] eventSet = new[] { new EventData(new byte[100000]) }; - Assert.That(async () => await producer.SendAsync(eventSet), Throws.Nothing); } } @@ -475,9 +469,7 @@ public async Task ProducerCanSendASetOfEvents() { await using (EventHubScope scope = await EventHubScope.CreateAsync(1)) { - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); - - await using (var producer = new EventHubProducerClient(connectionString)) + await using (var producer = new EventHubProducerClient(EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, scope.EventHubName, EventHubsTestEnvironment.Instance.Credential)) { EventData[] events = new[] { @@ -501,9 +493,7 @@ public async Task ProducerCanSendZeroLengthSet() { await using (EventHubScope scope = await EventHubScope.CreateAsync(1)) { - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); - - await using (var producer = new EventHubProducerClient(connectionString)) + await using (var producer = new EventHubProducerClient(EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, scope.EventHubName, EventHubsTestEnvironment.Instance.Credential)) { EventData[] events = new[] { @@ -527,9 +517,11 @@ public async Task ProducerCanSendLargeSet() { await using (EventHubScope scope = await EventHubScope.CreateAsync(1)) { - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); - - await using (var producer = new EventHubProducerClient(connectionString, new EventHubProducerClientOptions { RetryOptions = new EventHubsRetryOptions { TryTimeout = TimeSpan.FromMinutes(5) } })) + await using (var producer = new EventHubProducerClient( + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential, + new EventHubProducerClientOptions { RetryOptions = new EventHubsRetryOptions { TryTimeout = TimeSpan.FromMinutes(5) } })) { // Actual limit is 1046520 for a single event. EventData[] events = new[] @@ -554,9 +546,7 @@ public async Task ProducerCanSendAnEventBatch() { await using (EventHubScope scope = await EventHubScope.CreateAsync(1)) { - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); - - await using (var producer = new EventHubProducerClient(connectionString)) + await using (var producer = new EventHubProducerClient(EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, scope.EventHubName, EventHubsTestEnvironment.Instance.Credential)) { using EventDataBatch batch = await producer.CreateBatchAsync(); @@ -576,13 +566,13 @@ public async Task ProducerCanSendAnEventBatch() /// /// [Test] - public async Task ProducerCanSendAnEventBatchUsingAnIdentityCredential() + public async Task ProducerCanSendAnEventBatchUsingAConnectionString() { await using (EventHubScope scope = await EventHubScope.CreateAsync(1)) { var credential = EventHubsTestEnvironment.Instance.Credential; - await using (var producer = new EventHubProducerClient(EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, scope.EventHubName, credential)) + await using (var producer = new EventHubProducerClient(EventHubsTestEnvironment.Instance.EventHubsConnectionString, scope.EventHubName)) { using EventDataBatch batch = await producer.CreateBatchAsync(); @@ -667,9 +657,7 @@ public async Task ProducerCanSendZeroLengthEventBatch() { await using (EventHubScope scope = await EventHubScope.CreateAsync(1)) { - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); - - await using (var producer = new EventHubProducerClient(connectionString)) + await using (var producer = new EventHubProducerClient(EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, scope.EventHubName, EventHubsTestEnvironment.Instance.Credential)) { using EventDataBatch batch = await producer.CreateBatchAsync(); batch.TryAdd(new EventData(new BinaryData(Array.Empty()))); @@ -690,9 +678,11 @@ public async Task ProducerCanSendLargeEventBatch() { await using (EventHubScope scope = await EventHubScope.CreateAsync(1)) { - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); - - await using (var producer = new EventHubProducerClient(connectionString, new EventHubProducerClientOptions { RetryOptions = new EventHubsRetryOptions { TryTimeout = TimeSpan.FromMinutes(5) } })) + await using (var producer = new EventHubProducerClient( + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential, + new EventHubProducerClientOptions { RetryOptions = new EventHubsRetryOptions { TryTimeout = TimeSpan.FromMinutes(5) } })) { using EventDataBatch batch = await producer.CreateBatchAsync(); @@ -718,9 +708,7 @@ public async Task ProducerCanSendWithBinaryApplicationProperties() { await using (EventHubScope scope = await EventHubScope.CreateAsync(1)) { - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); - - await using var producer = new EventHubProducerClient(connectionString); + await using var producer = new EventHubProducerClient(EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, scope.EventHubName, EventHubsTestEnvironment.Instance.Credential); var eventData = new EventData(Encoding.UTF8.GetBytes("AWord")); eventData.Properties["TestByteArray"] = new byte[] { 0x12, 0x34, 0x56, 0x78 }; @@ -740,9 +728,7 @@ public async Task ProducerCannotSendSetLargerThanMaximumSize() { await using (EventHubScope scope = await EventHubScope.CreateAsync(1)) { - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); - - await using (var producer = new EventHubProducerClient(connectionString)) + await using (var producer = new EventHubProducerClient(EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, scope.EventHubName, EventHubsTestEnvironment.Instance.Credential)) { // Actual limit is 1046520 for a single event. @@ -768,9 +754,7 @@ public async Task ProducerCanSendWhenPartitionIsNull() { await using (EventHubScope scope = await EventHubScope.CreateAsync(1)) { - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); - - await using (var producer = new EventHubProducerClient(connectionString)) + await using (var producer = new EventHubProducerClient(EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, scope.EventHubName, EventHubsTestEnvironment.Instance.Credential)) { EventData[] events = new[] { new EventData(Encoding.UTF8.GetBytes("Will it work")) }; Assert.That(async () => await producer.SendAsync(events, new SendEventOptions { PartitionId = null }), Throws.Nothing); @@ -788,9 +772,7 @@ public async Task ProducerCannotSendWhenClosed() { await using (EventHubScope scope = await EventHubScope.CreateAsync(1)) { - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); - - await using (var producer = new EventHubProducerClient(connectionString)) + await using (var producer = new EventHubProducerClient(EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, scope.EventHubName, EventHubsTestEnvironment.Instance.Credential)) { EventData[] events = new[] { new EventData(Encoding.UTF8.GetBytes("Dummy event")) }; Assert.That(async () => await producer.SendAsync(events), Throws.Nothing); @@ -811,9 +793,7 @@ public async Task ProducerCannotSendWhenSharedConnectionIsClosed() { await using (EventHubScope scope = await EventHubScope.CreateAsync(1)) { - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); - - await using (var connection = new EventHubConnection(connectionString)) + await using (var connection = new EventHubConnection(EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, scope.EventHubName, EventHubsTestEnvironment.Instance.Credential)) await using (var producer = new EventHubProducerClient(connection)) { EventData[] events = new[] { new EventData(Encoding.UTF8.GetBytes("Dummy event")) }; @@ -839,9 +819,7 @@ public async Task ProducerCannotSendToInvalidPartition(string invalidPartition) { await using (EventHubScope scope = await EventHubScope.CreateAsync(1)) { - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); - - await using (var connection = new EventHubConnection(connectionString)) + await using (var connection = new EventHubConnection(EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, scope.EventHubName, EventHubsTestEnvironment.Instance.Credential)) { EventData[] events = new[] { new EventData(Encoding.UTF8.GetBytes("Lorem Ipsum")) }; @@ -863,9 +841,7 @@ public async Task SendSetUpdatesPartitionProperties() { await using (EventHubScope scope = await EventHubScope.CreateAsync(1)) { - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); - - await using (var connection = new EventHubConnection(connectionString)) + await using (var connection = new EventHubConnection(EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, scope.EventHubName, EventHubsTestEnvironment.Instance.Credential)) { var partition = (await connection.GetPartitionIdsAsync(DefaultRetryPolicy)).First(); EventData[] events = new[] { new EventData(Encoding.UTF8.GetBytes("I should update stuff")) }; @@ -877,13 +853,11 @@ public async Task SendSetUpdatesPartitionProperties() await producer.SendAsync(events, new SendEventOptions { PartitionId = partition }); PartitionProperties oldPartitionProperties = await producer.GetPartitionPropertiesAsync(partition); - Assert.That(oldPartitionProperties, Is.Not.Null, "A set of partition properties should have been returned."); await producer.SendAsync(events); PartitionProperties newPartitionProperties = await producer.GetPartitionPropertiesAsync(partition); - Assert.That(newPartitionProperties, Is.Not.Null, "A set of partition properties should have been returned."); // The following properties should not have been altered. @@ -911,9 +885,7 @@ public async Task SendBatchUpdatesPartitionProperties() { await using (EventHubScope scope = await EventHubScope.CreateAsync(1)) { - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); - - await using (var connection = new EventHubConnection(connectionString)) + await using (var connection = new EventHubConnection(EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, scope.EventHubName, EventHubsTestEnvironment.Instance.Credential)) { var partition = (await connection.GetPartitionIdsAsync(DefaultRetryPolicy)).First(); @@ -964,9 +936,7 @@ public async Task SendDoesNotUpdatePartitionPropertiesWhenSendingToDifferentPart { await using (EventHubScope scope = await EventHubScope.CreateAsync(2)) { - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); - - await using (var connection = new EventHubConnection(connectionString)) + await using (var connection = new EventHubConnection(EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, scope.EventHubName, EventHubsTestEnvironment.Instance.Credential)) { var partitionIds = await connection.GetPartitionIdsAsync(DefaultRetryPolicy); EventData[] events = new[] { new EventData(Encoding.UTF8.GetBytes("I should not update stuff")) }; @@ -1015,9 +985,7 @@ public async Task ProducerDoesNotSendToSpecificPartitionWhenPartitionIdIsNotSpec await using (EventHubScope scope = await EventHubScope.CreateAsync(partitions)) { - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); - - await using (var connection = new EventHubConnection(connectionString)) + await using (var connection = new EventHubConnection(EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, scope.EventHubName, EventHubsTestEnvironment.Instance.Credential)) { await using (var producer = new EventHubProducerClient(connection)) await using (var consumer = new EventHubConsumerClient(EventHubConsumerClient.DefaultConsumerGroupName, connection)) @@ -1089,9 +1057,7 @@ public async Task ProducerSendsEventsInTheSameSetToTheSamePartition() await using (EventHubScope scope = await EventHubScope.CreateAsync(partitions)) { - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); - - await using (var connection = new EventHubConnection(connectionString)) + await using (var connection = new EventHubConnection(EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, scope.EventHubName, EventHubsTestEnvironment.Instance.Credential)) await using (var producer = new EventHubProducerClient(connection)) await using (var consumer = new EventHubConsumerClient(EventHubConsumerClient.DefaultConsumerGroupName, connection)) { @@ -1158,9 +1124,7 @@ public async Task ProducerSendsEventsWithTheSamePartitionHashKeyToTheSamePartiti await using (EventHubScope scope = await EventHubScope.CreateAsync(partitions)) { - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); - - await using (var connection = new EventHubConnection(connectionString)) + await using (var connection = new EventHubConnection(EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, scope.EventHubName, EventHubsTestEnvironment.Instance.Credential)) await using (var producer = new EventHubProducerClient(connection)) await using (var consumer = new EventHubConsumerClient(EventHubConsumerClient.DefaultConsumerGroupName, connection)) { @@ -1225,8 +1189,6 @@ public async Task ProducerCannotSendWhenProxyIsInvalid() { await using (EventHubScope scope = await EventHubScope.CreateAsync(1)) { - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); - var producerOptions = new EventHubProducerClientOptions { RetryOptions = new EventHubsRetryOptions { TryTimeout = TimeSpan.FromMinutes(2) }, @@ -1238,7 +1200,11 @@ public async Task ProducerCannotSendWhenProxyIsInvalid() } }; - await using (var invalidProxyProducer = new EventHubProducerClient(connectionString, producerOptions)) + await using (var invalidProxyProducer = new EventHubProducerClient( + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential, + producerOptions)) { Assert.That(async () => await invalidProxyProducer.SendAsync(new[] { new EventData(new byte[1]) }), Throws.InstanceOf().Or.InstanceOf()); } @@ -1304,7 +1270,7 @@ public async Task ProducerCanSendEventsWithAFullyPopulatedAmqpMessage() // Attempt to send and validate the operation was not rejected. - await using var producer = new EventHubProducerClient(EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName)); + await using var producer = new EventHubProducerClient(EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, scope.EventHubName, EventHubsTestEnvironment.Instance.Credential); Assert.That(async () => await producer.SendAsync(new[] { eventData }), Throws.Nothing); } } @@ -1325,7 +1291,7 @@ public async Task ProducerCanSendEventsWithValueBodies() // Attempt to send and validate the operation was not rejected. - await using var producer = new EventHubProducerClient(EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName)); + await using var producer = new EventHubProducerClient(EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, scope.EventHubName, EventHubsTestEnvironment.Instance.Credential); Assert.That(async () => await producer.SendAsync(new[] { eventData }), Throws.Nothing); } } @@ -1346,7 +1312,7 @@ public async Task ProducerCanSendEventsWithSequenceBodies() // Attempt to send and validate the operation was not rejected. - await using var producer = new EventHubProducerClient(EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName)); + await using var producer = new EventHubProducerClient(EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, scope.EventHubName, EventHubsTestEnvironment.Instance.Credential); Assert.That(async () => await producer.SendAsync(new[] { eventData }), Throws.Nothing); } } @@ -1368,7 +1334,7 @@ public async Task ProducerCanRetrieveEventHubProperties(EventHubsTransportType t var connectionString = EventHubsTestEnvironment.Instance.EventHubsConnectionString; var producerOptions = new EventHubProducerClientOptions { ConnectionOptions = new EventHubConnectionOptions { TransportType = transportType } }; - await using (var producer = new EventHubProducerClient(connectionString, scope.EventHubName, producerOptions)) + await using (var producer = new EventHubProducerClient(EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, scope.EventHubName, EventHubsTestEnvironment.Instance.Credential, producerOptions)) { EventHubProperties properties = await producer.GetEventHubPropertiesAsync(); @@ -1395,10 +1361,9 @@ public async Task ProducerCanRetrievePartitionProperties(EventHubsTransportType await using (EventHubScope scope = await EventHubScope.CreateAsync(partitionCount)) { var options = new EventHubConnectionOptions(); - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); var producerOptions = new EventHubProducerClientOptions { ConnectionOptions = new EventHubConnectionOptions { TransportType = transportType } }; - await using (var producer = new EventHubProducerClient(connectionString, scope.EventHubName, producerOptions)) + await using (var producer = new EventHubProducerClient(EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, scope.EventHubName, EventHubsTestEnvironment.Instance.Credential, producerOptions)) { var cancellation = new CancellationTokenSource(TimeSpan.FromSeconds(20)); var properties = await producer.GetEventHubPropertiesAsync(); @@ -1425,9 +1390,7 @@ public async Task ConnectionTransportPartitionIdsMatchPartitionProperties() { await using (EventHubScope scope = await EventHubScope.CreateAsync(4)) { - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); - - await using (var producer = new EventHubProducerClient(connectionString)) + await using (var producer = new EventHubProducerClient(EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, scope.EventHubName, EventHubsTestEnvironment.Instance.Credential)) { EventHubProperties properties = await producer.GetEventHubPropertiesAsync(); var partitions = await producer.GetPartitionIdsAsync(); @@ -1450,9 +1413,7 @@ public async Task ProducerCannotRetrieveMetadataWhenClosed() { await using (EventHubScope scope = await EventHubScope.CreateAsync(1)) { - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); - - await using (var producer = new EventHubProducerClient(connectionString)) + await using (var producer = new EventHubProducerClient(EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, scope.EventHubName, EventHubsTestEnvironment.Instance.Credential)) { var partition = (await producer.GetPartitionIdsAsync()).First(); @@ -1483,9 +1444,7 @@ public async Task ProducerCannotRetrievePartitionPropertiesWhenPartitionIdIsInva { await using (EventHubScope scope = await EventHubScope.CreateAsync(1)) { - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); - - await using (var producer = new EventHubProducerClient(connectionString)) + await using (var producer = new EventHubProducerClient(EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, scope.EventHubName, EventHubsTestEnvironment.Instance.Credential)) { Assert.That(async () => await producer.GetPartitionPropertiesAsync(invalidPartition), Throws.TypeOf()); } @@ -1502,8 +1461,6 @@ public async Task ProducerCannotRetrieveMetadataWhenProxyIsInvalid() { await using (EventHubScope scope = await EventHubScope.CreateAsync(1)) { - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); - var invalidProxyOptions = new EventHubProducerClientOptions { RetryOptions = new EventHubsRetryOptions { TryTimeout = TimeSpan.FromMinutes(2) }, @@ -1515,8 +1472,8 @@ public async Task ProducerCannotRetrieveMetadataWhenProxyIsInvalid() } }; - await using (var producer = new EventHubProducerClient(connectionString)) - await using (var invalidProxyProducer = new EventHubProducerClient(connectionString, invalidProxyOptions)) + await using (var producer = new EventHubProducerClient(EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, scope.EventHubName, EventHubsTestEnvironment.Instance.Credential)) + await using (var invalidProxyProducer = new EventHubProducerClient(EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, scope.EventHubName, EventHubsTestEnvironment.Instance.Credential, invalidProxyOptions)) { var partition = (await producer.GetPartitionIdsAsync()).First(); diff --git a/sdk/eventhub/Azure.Messaging.EventHubs/tests/Producer/IdempotentPublishingLiveTests.cs b/sdk/eventhub/Azure.Messaging.EventHubs/tests/Producer/IdempotentPublishingLiveTests.cs index ef9288494662..b9db032af87c 100644 --- a/sdk/eventhub/Azure.Messaging.EventHubs/tests/Producer/IdempotentPublishingLiveTests.cs +++ b/sdk/eventhub/Azure.Messaging.EventHubs/tests/Producer/IdempotentPublishingLiveTests.cs @@ -36,13 +36,17 @@ public async Task ProducerCanOptIntoIdempotentPublishing() { await using (EventHubScope scope = await EventHubScope.CreateAsync(1)) { - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); - var options = new EventHubProducerClientOptions { EnableIdempotentPartitions = true }; - var cancellationSource = new CancellationTokenSource(); cancellationSource.CancelAfter(EventHubsTestEnvironment.Instance.TestExecutionTimeLimit); - await using var producer = new EventHubProducerClient(connectionString, options); + var options = new EventHubProducerClientOptions { EnableIdempotentPartitions = true }; + + await using var producer = new EventHubProducerClient( + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential, + options); + Assert.That(async () => await producer.GetPartitionIdsAsync(cancellationSource.Token), Throws.Nothing); } } @@ -59,13 +63,16 @@ public async Task ProducerCanPublishEvents(EventHubsTransportType transportType) { await using (EventHubScope scope = await EventHubScope.CreateAsync(1)) { - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); - var options = new EventHubProducerClientOptions { EnableIdempotentPartitions = true, ConnectionOptions = new EventHubConnectionOptions { TransportType = transportType } }; + var cancellationSource = new CancellationTokenSource(); + cancellationSource.CancelAfter(EventHubsTestEnvironment.Instance.TestExecutionTimeLimit); - await using var producer = new EventHubProducerClient(connectionString, options); + var options = new EventHubProducerClientOptions { EnableIdempotentPartitions = true, ConnectionOptions = new EventHubConnectionOptions { TransportType = transportType } }; - var cancellationSource = new CancellationTokenSource(); - cancellationSource.CancelAfter(EventHubsTestEnvironment.Instance.TestExecutionTimeLimit); + await using var producer = new EventHubProducerClient( + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential, + options); var partition = (await producer.GetPartitionIdsAsync(cancellationSource.Token)).First(); var sendOptions = new SendEventOptions { PartitionId = partition }; @@ -87,14 +94,17 @@ public async Task ProducerCanPublishBatches(EventHubsTransportType transportType { await using (EventHubScope scope = await EventHubScope.CreateAsync(1)) { - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); - var options = new EventHubProducerClientOptions { EnableIdempotentPartitions = true, ConnectionOptions = new EventHubConnectionOptions { TransportType = transportType } }; - - await using var producer = new EventHubProducerClient(connectionString, options); - var cancellationSource = new CancellationTokenSource(); cancellationSource.CancelAfter(EventHubsTestEnvironment.Instance.TestExecutionTimeLimit); + var options = new EventHubProducerClientOptions { EnableIdempotentPartitions = true, ConnectionOptions = new EventHubConnectionOptions { TransportType = transportType } }; + + await using var producer = new EventHubProducerClient( + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential, + options); + var partition = (await producer.GetPartitionIdsAsync()).First(); var batchOptions = new CreateBatchOptions { PartitionId = partition }; @@ -123,10 +133,13 @@ public async Task ProducerCanPublishEventsAfterAnException() var cancellationSource = new CancellationTokenSource(); cancellationSource.CancelAfter(EventHubsTestEnvironment.Instance.TestExecutionTimeLimit); - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); var options = new EventHubProducerClientOptions { EnableIdempotentPartitions = true }; - await using var producer = new EventHubProducerClient(connectionString, options); + await using var producer = new EventHubProducerClient( + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential, + options); var partition = (await producer.GetPartitionIdsAsync()).First(); var sendOptions = new SendEventOptions { PartitionId = partition }; @@ -167,10 +180,13 @@ public async Task ProducerCanPublishBatchesAfterAnException() var cancellationSource = new CancellationTokenSource(); cancellationSource.CancelAfter(EventHubsTestEnvironment.Instance.TestExecutionTimeLimit); - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); var options = new EventHubProducerClientOptions { EnableIdempotentPartitions = true }; - await using var producer = new EventHubProducerClient(connectionString, options); + await using var producer = new EventHubProducerClient( + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential, + options); var partition = (await producer.GetPartitionIdsAsync()).First(); var batchOptions = new CreateBatchOptions { PartitionId = partition }; @@ -214,14 +230,17 @@ public async Task ProducerInitializesPropertiesWhenRequested() { await using (EventHubScope scope = await EventHubScope.CreateAsync(2)) { - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); - var options = new EventHubProducerClientOptions { EnableIdempotentPartitions = true }; - - await using var producer = new EventHubProducerClient(connectionString, options); - var cancellationSource = new CancellationTokenSource(); cancellationSource.CancelAfter(EventHubsTestEnvironment.Instance.TestExecutionTimeLimit); + var options = new EventHubProducerClientOptions { EnableIdempotentPartitions = true }; + + await using var producer = new EventHubProducerClient( + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential, + options); + var partition = (await producer.GetPartitionIdsAsync(cancellationSource.Token)).Last(); var partitionProperties = await producer.GetPartitionPublishingPropertiesAsync(partition); @@ -243,14 +262,17 @@ public async Task ProducerInitializesPropertiesWhenPublishing() { await using (EventHubScope scope = await EventHubScope.CreateAsync(1)) { - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); - var options = new EventHubProducerClientOptions { EnableIdempotentPartitions = true }; - - await using var producer = new EventHubProducerClient(connectionString, options); - var cancellationSource = new CancellationTokenSource(); cancellationSource.CancelAfter(EventHubsTestEnvironment.Instance.TestExecutionTimeLimit); + var options = new EventHubProducerClientOptions { EnableIdempotentPartitions = true }; + + await using var producer = new EventHubProducerClient( + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential, + options); + var partition = (await producer.GetPartitionIdsAsync(cancellationSource.Token)).First(); var sendOptions = new SendEventOptions { PartitionId = partition }; @@ -276,14 +298,17 @@ public async Task ProducerManagesConcurrencyWhenPublishingEvents() { await using (EventHubScope scope = await EventHubScope.CreateAsync(1)) { - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); - var options = new EventHubProducerClientOptions { EnableIdempotentPartitions = true }; - - await using var producer = new EventHubProducerClient(connectionString, options); - var cancellationSource = new CancellationTokenSource(); cancellationSource.CancelAfter(EventHubsTestEnvironment.Instance.TestExecutionTimeLimit); + var options = new EventHubProducerClientOptions { EnableIdempotentPartitions = true }; + + await using var producer = new EventHubProducerClient( + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential, + options); + var partition = (await producer.GetPartitionIdsAsync(cancellationSource.Token)).First(); var sendOptions = new SendEventOptions { PartitionId = partition }; @@ -313,14 +338,17 @@ public async Task ProducerManagesConcurrencyWhenPublishingBatches() { await using (EventHubScope scope = await EventHubScope.CreateAsync(1)) { - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); - var options = new EventHubProducerClientOptions { EnableIdempotentPartitions = true }; - - await using var producer = new EventHubProducerClient(connectionString, options); - var cancellationSource = new CancellationTokenSource(); cancellationSource.CancelAfter(EventHubsTestEnvironment.Instance.TestExecutionTimeLimit); + var options = new EventHubProducerClientOptions { EnableIdempotentPartitions = true }; + + await using var producer = new EventHubProducerClient( + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential, + options); + var partition = (await producer.GetPartitionIdsAsync(cancellationSource.Token)).First(); var batchOptions = new CreateBatchOptions { PartitionId = partition }; @@ -356,13 +384,16 @@ public async Task ProducerAllowsPublishingConcurrentlyToDifferentPartitions() { await using (EventHubScope scope = await EventHubScope.CreateAsync(4)) { - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); - var options = new EventHubProducerClientOptions { EnableIdempotentPartitions = true }; + var cancellationSource = new CancellationTokenSource(); + cancellationSource.CancelAfter(EventHubsTestEnvironment.Instance.TestExecutionTimeLimit); - await using var producer = new EventHubProducerClient(connectionString, options); + var options = new EventHubProducerClientOptions { EnableIdempotentPartitions = true }; - var cancellationSource = new CancellationTokenSource(); - cancellationSource.CancelAfter(EventHubsTestEnvironment.Instance.TestExecutionTimeLimit); + await using var producer = new EventHubProducerClient( + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential, + options); async Task sendEvents(string partition, int delayMilliseconds) { @@ -393,14 +424,17 @@ public async Task ProducerSequencesEvents() { await using (EventHubScope scope = await EventHubScope.CreateAsync(2)) { - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); - var options = new EventHubProducerClientOptions { EnableIdempotentPartitions = true }; - - await using var producer = new EventHubProducerClient(connectionString, options); - var cancellationSource = new CancellationTokenSource(); cancellationSource.CancelAfter(EventHubsTestEnvironment.Instance.TestExecutionTimeLimit); + var options = new EventHubProducerClientOptions { EnableIdempotentPartitions = true }; + + await using var producer = new EventHubProducerClient( + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential, + options); + var partition = (await producer.GetPartitionIdsAsync(cancellationSource.Token)).Last(); var sendOptions = new SendEventOptions { PartitionId = partition }; @@ -430,14 +464,17 @@ public async Task ProducerSequencesBatches() { await using (EventHubScope scope = await EventHubScope.CreateAsync(2)) { - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); - var options = new EventHubProducerClientOptions { EnableIdempotentPartitions = true }; - - await using var producer = new EventHubProducerClient(connectionString, options); - var cancellationSource = new CancellationTokenSource(); cancellationSource.CancelAfter(EventHubsTestEnvironment.Instance.TestExecutionTimeLimit); + var options = new EventHubProducerClientOptions { EnableIdempotentPartitions = true }; + + await using var producer = new EventHubProducerClient( + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential, + options); + var partition = (await producer.GetPartitionIdsAsync(cancellationSource.Token)).Last(); var batchOptions = new CreateBatchOptions { PartitionId = partition }; @@ -479,14 +516,17 @@ public async Task ProducerUpdatesPropertiesAfterPublishingEvents() { await using (EventHubScope scope = await EventHubScope.CreateAsync(1)) { - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); - var options = new EventHubProducerClientOptions { EnableIdempotentPartitions = true }; - - await using var producer = new EventHubProducerClient(connectionString, options); - var cancellationSource = new CancellationTokenSource(); cancellationSource.CancelAfter(EventHubsTestEnvironment.Instance.TestExecutionTimeLimit); + var options = new EventHubProducerClientOptions { EnableIdempotentPartitions = true }; + + await using var producer = new EventHubProducerClient( + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential, + options); + var partition = (await producer.GetPartitionIdsAsync(cancellationSource.Token)).First(); var initialPartitionProperties = await producer.GetPartitionPublishingPropertiesAsync(partition); @@ -512,14 +552,17 @@ public async Task ProducerUpdatesPropertiesAfterPublishingBatches() { await using (EventHubScope scope = await EventHubScope.CreateAsync(1)) { - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); - var options = new EventHubProducerClientOptions { EnableIdempotentPartitions = true }; - - await using var producer = new EventHubProducerClient(connectionString, options); - var cancellationSource = new CancellationTokenSource(); cancellationSource.CancelAfter(EventHubsTestEnvironment.Instance.TestExecutionTimeLimit); + var options = new EventHubProducerClientOptions { EnableIdempotentPartitions = true }; + + await using var producer = new EventHubProducerClient( + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential, + options); + var partition = (await producer.GetPartitionIdsAsync(cancellationSource.Token)).First(); var initialPartitionProperties = await producer.GetPartitionPublishingPropertiesAsync(partition); var batchOptions = new CreateBatchOptions { PartitionId = partition }; @@ -549,7 +592,6 @@ public async Task ProducerCanInitializeWithPartitionOptions() { await using (EventHubScope scope = await EventHubScope.CreateAsync(2)) { - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); var options = new EventHubProducerClientOptions { EnableIdempotentPartitions = true }; var cancellationSource = new CancellationTokenSource(); @@ -560,7 +602,7 @@ public async Task ProducerCanInitializeWithPartitionOptions() // Create a producer for a small scope that will Send some events and read the properties. - await using (var initialProducer = new EventHubProducerClient(connectionString, options)) + await using (var initialProducer = new EventHubProducerClient(EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, scope.EventHubName, EventHubsTestEnvironment.Instance.Credential, options)) { partition = (await initialProducer.GetPartitionIdsAsync(cancellationSource.Token)).Last(); @@ -577,7 +619,12 @@ public async Task ProducerCanInitializeWithPartitionOptions() StartingSequenceNumber = partitionProperties.LastPublishedSequenceNumber }); - await using var producer = new EventHubProducerClient(connectionString, options); + await using var producer = new EventHubProducerClient( + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential, + options); + Assert.That(async () => await producer.SendAsync(EventGenerator.CreateEvents(10), new SendEventOptions { PartitionId = partition }, cancellationSource.Token), Throws.Nothing); } } @@ -592,7 +639,6 @@ public async Task ProducerCanInitializeWithPartialPartitionOptions() { await using (EventHubScope scope = await EventHubScope.CreateAsync(2)) { - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); var options = new EventHubProducerClientOptions { EnableIdempotentPartitions = true }; var cancellationSource = new CancellationTokenSource(); @@ -603,7 +649,7 @@ public async Task ProducerCanInitializeWithPartialPartitionOptions() // Create a producer for a small scope that will Send some events and read the properties. - await using (var initialProducer = new EventHubProducerClient(connectionString, options)) + await using (var initialProducer = new EventHubProducerClient(EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, scope.EventHubName, EventHubsTestEnvironment.Instance.Credential, options)) { partition = (await initialProducer.GetPartitionIdsAsync(cancellationSource.Token)).Last(); @@ -620,7 +666,12 @@ public async Task ProducerCanInitializeWithPartialPartitionOptions() }); Assert.That(options.PartitionOptions[partition].StartingSequenceNumber.HasValue, Is.False, "The partition options should not specifiy a starting sequence number."); - await using var producer = new EventHubProducerClient(connectionString, options); + + await using var producer = new EventHubProducerClient( + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential, + options); // Verify that the properties were fully initialized when using partial options. @@ -647,7 +698,6 @@ public async Task ProducerIsRejectedWithPartitionOptionsForInvalidState() { await using (EventHubScope scope = await EventHubScope.CreateAsync(2)) { - var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); var options = new EventHubProducerClientOptions { EnableIdempotentPartitions = true }; var cancellationSource = new CancellationTokenSource(); @@ -658,7 +708,7 @@ public async Task ProducerIsRejectedWithPartitionOptionsForInvalidState() // Create a producer for a small scope that will Send some events and read the properties. - await using (var initialProducer = new EventHubProducerClient(connectionString, options)) + await using (var initialProducer = new EventHubProducerClient(EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, scope.EventHubName, EventHubsTestEnvironment.Instance.Credential, options)) { partition = (await initialProducer.GetPartitionIdsAsync(cancellationSource.Token)).Last(); @@ -675,7 +725,11 @@ public async Task ProducerIsRejectedWithPartitionOptionsForInvalidState() StartingSequenceNumber = (partitionProperties.LastPublishedSequenceNumber - 5) }); - await using var producer = new EventHubProducerClient(connectionString, options); + await using var producer = new EventHubProducerClient( + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential, + options); Assert.That(async () => await producer.SendAsync(EventGenerator.CreateEvents(10), new SendEventOptions { PartitionId = partition }, cancellationSource.Token), Throws.InstanceOf().And.Property("Reason").EqualTo(EventHubsException.FailureReason.InvalidClientState)); diff --git a/sdk/eventhub/Azure.Messaging.EventHubs/tests/Snippets/ReadMeSnippetsLiveTests.cs b/sdk/eventhub/Azure.Messaging.EventHubs/tests/Snippets/ReadMeSnippetsLiveTests.cs index 14d6f446a2d3..516efb9c9add 100644 --- a/sdk/eventhub/Azure.Messaging.EventHubs/tests/Snippets/ReadMeSnippetsLiveTests.cs +++ b/sdk/eventhub/Azure.Messaging.EventHubs/tests/Snippets/ReadMeSnippetsLiveTests.cs @@ -37,7 +37,7 @@ public async Task CreateWithConnectionString() var eventHubName = "<< NAME OF THE EVENT HUB >>"; #else var connectionString = EventHubsTestEnvironment.Instance.EventHubsConnectionString; - var eventHubName = "fakeHub"; + var eventHubName = "fake"; #endif // It is recommended that you cache the Event Hubs clients for the lifetime of your diff --git a/sdk/eventhub/Azure.Messaging.EventHubs/tests/Snippets/Sample01_HelloWorldLiveTests.cs b/sdk/eventhub/Azure.Messaging.EventHubs/tests/Snippets/Sample01_HelloWorldLiveTests.cs index 1624d277a606..fb570965c0d5 100644 --- a/sdk/eventhub/Azure.Messaging.EventHubs/tests/Snippets/Sample01_HelloWorldLiveTests.cs +++ b/sdk/eventhub/Azure.Messaging.EventHubs/tests/Snippets/Sample01_HelloWorldLiveTests.cs @@ -5,6 +5,7 @@ using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; +using Azure.Identity; using Azure.Messaging.EventHubs.Consumer; using Azure.Messaging.EventHubs.Producer; using NUnit.Framework; @@ -57,9 +58,10 @@ public async Task PublishEvents() { await using var scope = await EventHubScope.CreateAsync(1); - var connectionString = EventHubsTestEnvironment.Instance.EventHubsConnectionString; - var eventHubName = scope.EventHubName; - var producer = new EventHubProducerClient(connectionString, eventHubName); + var producer = new EventHubProducerClient( + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential); #region Snippet:EventHubs_Sample01_PublishEvents @@ -116,9 +118,11 @@ public async Task ReadEvents() { await using var scope = await EventHubScope.CreateAsync(1); - var connectionString = EventHubsTestEnvironment.Instance.EventHubsConnectionString; - var eventHubName = scope.EventHubName; - var consumer = new EventHubConsumerClient(EventHubConsumerClient.DefaultConsumerGroupName, connectionString, eventHubName); + var consumer = new EventHubConsumerClient( + EventHubConsumerClient.DefaultConsumerGroupName, + EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, + scope.EventHubName, + EventHubsTestEnvironment.Instance.Credential); #region Snippet:EventHubs_Sample01_ReadEvents diff --git a/sdk/eventhub/Azure.Messaging.EventHubs/tests/Snippets/Sample02_EventHubsClientsLiveTests.cs b/sdk/eventhub/Azure.Messaging.EventHubs/tests/Snippets/Sample02_EventHubsClientsLiveTests.cs index b15f992a9914..1583a2560b02 100644 --- a/sdk/eventhub/Azure.Messaging.EventHubs/tests/Snippets/Sample02_EventHubsClientsLiveTests.cs +++ b/sdk/eventhub/Azure.Messaging.EventHubs/tests/Snippets/Sample02_EventHubsClientsLiveTests.cs @@ -8,6 +8,7 @@ using System.Security.Cryptography.X509Certificates; using System.Threading; using System.Threading.Tasks; +using Azure.Identity; using Azure.Messaging.EventHubs.Consumer; using Azure.Messaging.EventHubs.Producer; using NUnit.Framework; @@ -34,11 +35,13 @@ public async Task ConfigureProducerTransportWithFullOptions() #region Snippet:EventHubs_Sample02_ProducerTransportFullConnectionOptions #if SNIPPET - var connectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; + var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; + var credential = new DefaultAzureCredential(); #else - var connectionString = EventHubsTestEnvironment.Instance.EventHubsConnectionString; + var fullyQualifiedNamespace = EventHubsTestEnvironment.Instance.FullyQualifiedNamespace; var eventHubName = "fake"; + var credential = EventHubsTestEnvironment.Instance.Credential; #endif var producerOptions = new EventHubProducerClientOptions @@ -50,8 +53,9 @@ public async Task ConfigureProducerTransportWithFullOptions() }; var producer = new EventHubProducerClient( - connectionString, + fullyQualifiedNamespace, eventHubName, + credential, producerOptions); #endregion @@ -72,19 +76,22 @@ public async Task ConfigureProducerTransportByProperty() #region Snippet:EventHubs_Sample02_ProducerTransportProperty #if SNIPPET - var connectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; + var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; + var credential = new DefaultAzureCredential(); #else - var connectionString = EventHubsTestEnvironment.Instance.EventHubsConnectionString; + var fullyQualifiedNamespace = EventHubsTestEnvironment.Instance.FullyQualifiedNamespace; var eventHubName = "fake"; + var credential = EventHubsTestEnvironment.Instance.Credential; #endif var producerOptions = new EventHubProducerClientOptions(); producerOptions.ConnectionOptions.TransportType = EventHubsTransportType.AmqpWebSockets; var producer = new EventHubProducerClient( - connectionString, + fullyQualifiedNamespace, eventHubName, + credential, producerOptions); #endregion @@ -105,11 +112,13 @@ public async Task ConfigureProducerProxyWithFullOptions() #region Snippet:EventHubs_Sample02_ProducerProxyFullConnectionOptions #if SNIPPET - var connectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; + var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; + var credential = new DefaultAzureCredential(); #else - var connectionString = EventHubsTestEnvironment.Instance.EventHubsConnectionString; + var fullyQualifiedNamespace = EventHubsTestEnvironment.Instance.FullyQualifiedNamespace; var eventHubName = "fake"; + var credential = EventHubsTestEnvironment.Instance.Credential; #endif var producerOptions = new EventHubProducerClientOptions @@ -122,8 +131,9 @@ public async Task ConfigureProducerProxyWithFullOptions() }; var producer = new EventHubProducerClient( - connectionString, + fullyQualifiedNamespace, eventHubName, + credential, producerOptions); #endregion @@ -144,11 +154,13 @@ public async Task ConfigureProducerProxyByProperty() #region Snippet:EventHubs_Sample02_ProducerProxyProperty #if SNIPPET - var connectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; + var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; + var credential = new DefaultAzureCredential(); #else - var connectionString = EventHubsTestEnvironment.Instance.EventHubsConnectionString; + var fullyQualifiedNamespace = EventHubsTestEnvironment.Instance.FullyQualifiedNamespace; var eventHubName = "fake"; + var credential = EventHubsTestEnvironment.Instance.Credential; #endif var producerOptions = new EventHubProducerClientOptions(); @@ -156,8 +168,9 @@ public async Task ConfigureProducerProxyByProperty() producerOptions.ConnectionOptions.Proxy = new WebProxy("https://proxyserver:80", true); var producer = new EventHubProducerClient( - connectionString, + fullyQualifiedNamespace, eventHubName, + credential, producerOptions); #endregion @@ -178,19 +191,22 @@ public async Task ConfigureCustomEndpointAddress() #region Snippet:EventHubs_Sample02_ConnectionOptionsCustomEndpoint #if SNIPPET - var connectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; + var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; + var credential = new DefaultAzureCredential(); #else - var connectionString = EventHubsTestEnvironment.Instance.EventHubsConnectionString; + var fullyQualifiedNamespace = EventHubsTestEnvironment.Instance.FullyQualifiedNamespace; var eventHubName = "fake"; + var credential = EventHubsTestEnvironment.Instance.Credential; #endif var producerOptions = new EventHubProducerClientOptions(); producerOptions.ConnectionOptions.CustomEndpointAddress = new Uri("amqps://app-gateway.mycompany.com"); var producer = new EventHubProducerClient( - connectionString, + fullyQualifiedNamespace, eventHubName, + credential, producerOptions); #endregion @@ -211,11 +227,13 @@ public async Task ConfigureRemoteCertificateValidationCallback() #region Snippet:EventHubs_Sample02_RemoteCertificateValidationCallback #if SNIPPET - var connectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; + var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; + var credential = new DefaultAzureCredential(); #else - var connectionString = EventHubsTestEnvironment.Instance.EventHubsConnectionString; - var eventHubName = "fake"; + var fullyQualifiedNamespace = EventHubsTestEnvironment.Instance.FullyQualifiedNamespace; + var eventHubName = "fakse"; + var credential = EventHubsTestEnvironment.Instance.Credential; #endif static bool ValidateServerCertificate( @@ -239,8 +257,9 @@ static bool ValidateServerCertificate( producerOptions.ConnectionOptions.CertificateValidationCallback = ValidateServerCertificate; var producer = new EventHubProducerClient( - connectionString, + fullyQualifiedNamespace, eventHubName, + credential, producerOptions); #endregion @@ -261,11 +280,13 @@ public async Task ConfigureConsumerRetryWithFullOptions() #region Snippet:EventHubs_Sample02_ConsumerRetryWithFullOptions #if SNIPPET - var connectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; + var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; + var credential = new DefaultAzureCredential(); #else - var connectionString = EventHubsTestEnvironment.Instance.EventHubsConnectionString; + var fullyQualifiedNamespace = EventHubsTestEnvironment.Instance.FullyQualifiedNamespace; var eventHubName = "fake"; + var credential = EventHubsTestEnvironment.Instance.Credential; #endif var consumerGroup = EventHubConsumerClient.DefaultConsumerGroupName; @@ -282,8 +303,9 @@ public async Task ConfigureConsumerRetryWithFullOptions() var consumer = new EventHubConsumerClient( consumerGroup, - connectionString, + fullyQualifiedNamespace, eventHubName, + credential, consumerOptions); #endregion @@ -304,11 +326,13 @@ public async Task ConfigureConsumerRetryByProperty() #region Snippet:EventHubs_Sample02_ConsumerRetryByProperty #if SNIPPET - var connectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; + var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; + var credential = new DefaultAzureCredential(); #else - var connectionString = EventHubsTestEnvironment.Instance.EventHubsConnectionString; + var fullyQualifiedNamespace = EventHubsTestEnvironment.Instance.FullyQualifiedNamespace; var eventHubName = "fake"; + var credential = EventHubsTestEnvironment.Instance.Credential; #endif var consumerGroup = EventHubConsumerClient.DefaultConsumerGroupName; @@ -318,8 +342,9 @@ public async Task ConfigureConsumerRetryByProperty() var consumer = new EventHubConsumerClient( consumerGroup, - connectionString, + fullyQualifiedNamespace, eventHubName, + credential, consumerOptions); #endregion diff --git a/sdk/eventhub/Azure.Messaging.EventHubs/tests/Snippets/Sample03_EventHubMetadataLiveTests.cs b/sdk/eventhub/Azure.Messaging.EventHubs/tests/Snippets/Sample03_EventHubMetadataLiveTests.cs index 0baaba8e7613..c758b7b90efe 100644 --- a/sdk/eventhub/Azure.Messaging.EventHubs/tests/Snippets/Sample03_EventHubMetadataLiveTests.cs +++ b/sdk/eventhub/Azure.Messaging.EventHubs/tests/Snippets/Sample03_EventHubMetadataLiveTests.cs @@ -4,6 +4,7 @@ using System.Diagnostics; using System.Linq; using System.Threading.Tasks; +using Azure.Identity; using Azure.Messaging.EventHubs.Consumer; using Azure.Messaging.EventHubs.Producer; using NUnit.Framework; @@ -32,14 +33,19 @@ public async Task InspectHub() #region Snippet:EventHubs_Sample03_InspectHub #if SNIPPET - var connectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; + var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; + var credential = new DefaultAzureCredential(); #else - var connectionString = EventHubsTestEnvironment.Instance.EventHubsConnectionString; + var fullyQualifiedNamespace = EventHubsTestEnvironment.Instance.FullyQualifiedNamespace; var eventHubName = scope.EventHubName; + var credential = EventHubsTestEnvironment.Instance.Credential; #endif - var producer = new EventHubProducerClient(connectionString, eventHubName); + var producer = new EventHubProducerClient( + fullyQualifiedNamespace, + eventHubName, + credential); try { @@ -70,14 +76,19 @@ public async Task QueryPartitions() #region Snippet:EventHubs_Sample03_QueryPartitions #if SNIPPET - var connectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; + var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; + var credential = new DefaultAzureCredential(); #else - var connectionString = EventHubsTestEnvironment.Instance.EventHubsConnectionString; + var fullyQualifiedNamespace = EventHubsTestEnvironment.Instance.FullyQualifiedNamespace; var eventHubName = scope.EventHubName; + var credential = EventHubsTestEnvironment.Instance.Credential; #endif - var producer = new EventHubProducerClient(connectionString, eventHubName); + var producer = new EventHubProducerClient( + fullyQualifiedNamespace, + eventHubName, + credential); try { @@ -104,15 +115,21 @@ public async Task InspectPartition() #region Snippet:EventHubs_Sample03_InspectPartition #if SNIPPET - var connectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; + var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; + var credential = new DefaultAzureCredential(); #else - var connectionString = EventHubsTestEnvironment.Instance.EventHubsConnectionString; + var fullyQualifiedNamespace = EventHubsTestEnvironment.Instance.FullyQualifiedNamespace; var eventHubName = scope.EventHubName; + var credential = EventHubsTestEnvironment.Instance.Credential; #endif var consumerGroup = EventHubConsumerClient.DefaultConsumerGroupName; - var consumer = new EventHubConsumerClient(consumerGroup, connectionString, eventHubName); + var consumer = new EventHubConsumerClient( + consumerGroup, + fullyQualifiedNamespace, + eventHubName, + credential); try { diff --git a/sdk/eventhub/Azure.Messaging.EventHubs/tests/Snippets/Sample04_PublishingEventsLiveTests.cs b/sdk/eventhub/Azure.Messaging.EventHubs/tests/Snippets/Sample04_PublishingEventsLiveTests.cs index bd42c3c9b92d..c5702ebac6e7 100644 --- a/sdk/eventhub/Azure.Messaging.EventHubs/tests/Snippets/Sample04_PublishingEventsLiveTests.cs +++ b/sdk/eventhub/Azure.Messaging.EventHubs/tests/Snippets/Sample04_PublishingEventsLiveTests.cs @@ -6,6 +6,7 @@ using System.Diagnostics; using System.Linq; using System.Threading.Tasks; +using Azure.Identity; using Azure.Messaging.EventHubs.Producer; using NUnit.Framework; @@ -33,14 +34,19 @@ public async Task EventBatch() #region Snippet:EventHubs_Sample04_EventBatch #if SNIPPET - var connectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; + var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; + var credential = new DefaultAzureCredential(); #else - var connectionString = EventHubsTestEnvironment.Instance.EventHubsConnectionString; + var fullyQualifiedNamespace = EventHubsTestEnvironment.Instance.FullyQualifiedNamespace; var eventHubName = scope.EventHubName; + var credential = EventHubsTestEnvironment.Instance.Credential; #endif - var producer = new EventHubProducerClient(connectionString, eventHubName); + var producer = new EventHubProducerClient( + fullyQualifiedNamespace, + eventHubName, + credential); try { @@ -73,14 +79,19 @@ public async Task AutomaticRouting() #region Snippet:EventHubs_Sample04_AutomaticRouting #if SNIPPET - var connectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; + var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; + var credential = new DefaultAzureCredential(); #else - var connectionString = EventHubsTestEnvironment.Instance.EventHubsConnectionString; + var fullyQualifiedNamespace = EventHubsTestEnvironment.Instance.FullyQualifiedNamespace; var eventHubName = scope.EventHubName; + var credential = EventHubsTestEnvironment.Instance.Credential; #endif - var producer = new EventHubProducerClient(connectionString, eventHubName); + var producer = new EventHubProducerClient( + fullyQualifiedNamespace, + eventHubName, + credential); try { @@ -118,14 +129,19 @@ public async Task AutomaticRoutingBuffered() #region Snippet:EventHubs_Sample04_AutomaticRoutingBuffered #if SNIPPET - var connectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; + var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; + var credential = new DefaultAzureCredential(); #else - var connectionString = EventHubsTestEnvironment.Instance.EventHubsConnectionString; + var fullyQualifiedNamespace = EventHubsTestEnvironment.Instance.FullyQualifiedNamespace; var eventHubName = scope.EventHubName; + var credential = EventHubsTestEnvironment.Instance.Credential; #endif - var producer = new EventHubBufferedProducerClient(connectionString, eventHubName); + var producer = new EventHubBufferedProducerClient( + fullyQualifiedNamespace, + eventHubName, + credential); // The failure handler is required and invoked after all allowable // retries were applied. @@ -175,14 +191,19 @@ public async Task PartitionKey() #region Snippet:EventHubs_Sample04_PartitionKey #if SNIPPET - var connectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; + var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; + var credential = new DefaultAzureCredential(); #else - var connectionString = EventHubsTestEnvironment.Instance.EventHubsConnectionString; + var fullyQualifiedNamespace = EventHubsTestEnvironment.Instance.FullyQualifiedNamespace; var eventHubName = scope.EventHubName; + var credential = EventHubsTestEnvironment.Instance.Credential; #endif - var producer = new EventHubProducerClient(connectionString, eventHubName); + var producer = new EventHubProducerClient( + fullyQualifiedNamespace, + eventHubName, + credential); try { @@ -225,14 +246,19 @@ public async Task PartitionKeyBuffered() #region Snippet:EventHubs_Sample04_PartitionKeyBuffered #if SNIPPET - var connectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; + var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; + var credential = new DefaultAzureCredential(); #else - var connectionString = EventHubsTestEnvironment.Instance.EventHubsConnectionString; + var fullyQualifiedNamespace = EventHubsTestEnvironment.Instance.FullyQualifiedNamespace; var eventHubName = scope.EventHubName; + var credential = EventHubsTestEnvironment.Instance.Credential; #endif - var producer = new EventHubBufferedProducerClient(connectionString, eventHubName); + var producer = new EventHubBufferedProducerClient( + fullyQualifiedNamespace, + eventHubName, + credential); // The failure handler is required and invoked after all allowable // retries were applied. @@ -287,14 +313,19 @@ public async Task PartitionId() #region Snippet:EventHubs_Sample04_PartitionId #if SNIPPET - var connectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; + var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; + var credential = new DefaultAzureCredential(); #else - var connectionString = EventHubsTestEnvironment.Instance.EventHubsConnectionString; + var fullyQualifiedNamespace = EventHubsTestEnvironment.Instance.FullyQualifiedNamespace; var eventHubName = scope.EventHubName; + var credential = EventHubsTestEnvironment.Instance.Credential; #endif - var producer = new EventHubProducerClient(connectionString, eventHubName); + var producer = new EventHubProducerClient( + fullyQualifiedNamespace, + eventHubName, + credential); try { @@ -339,14 +370,19 @@ public async Task PartitionIdBuffered() #region Snippet:EventHubs_Sample04_PartitionIdBuffered #if SNIPPET - var connectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; + var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; + var credential = new DefaultAzureCredential(); #else - var connectionString = EventHubsTestEnvironment.Instance.EventHubsConnectionString; + var fullyQualifiedNamespace = EventHubsTestEnvironment.Instance.FullyQualifiedNamespace; var eventHubName = scope.EventHubName; + var credential = EventHubsTestEnvironment.Instance.Credential; #endif - var producer = new EventHubBufferedProducerClient(connectionString, eventHubName); + var producer = new EventHubBufferedProducerClient( + fullyQualifiedNamespace, + eventHubName, + credential); // The failure handler is required and invoked after all allowable // retries were applied. @@ -403,14 +439,19 @@ public async Task CustomMetadata() #region Snippet:EventHubs_Sample04_CustomMetadata #if SNIPPET - var connectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; + var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; + var credential = new DefaultAzureCredential(); #else - var connectionString = EventHubsTestEnvironment.Instance.EventHubsConnectionString; + var fullyQualifiedNamespace = EventHubsTestEnvironment.Instance.FullyQualifiedNamespace; var eventHubName = scope.EventHubName; + var credential = EventHubsTestEnvironment.Instance.Credential; #endif - var producer = new EventHubBufferedProducerClient(connectionString, eventHubName); + var producer = new EventHubBufferedProducerClient( + fullyQualifiedNamespace, + eventHubName, + credential); // The failure handler is required and invoked after all allowable // retries were applied. @@ -478,11 +519,13 @@ public async Task BufferedConfiguration() #region Snippet:EventHubs_Sample04_BufferedConfiguration #if SNIPPET - var connectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; + var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; + var credential = new DefaultAzureCredential(); #else - var connectionString = EventHubsTestEnvironment.Instance.EventHubsConnectionString; + var fullyQualifiedNamespace = EventHubsTestEnvironment.Instance.FullyQualifiedNamespace; var eventHubName = scope.EventHubName; + var credential = EventHubsTestEnvironment.Instance.Credential; #endif var options = new EventHubBufferedProducerClientOptions @@ -494,7 +537,11 @@ public async Task BufferedConfiguration() EnableIdempotentRetries = true }; - var producer = new EventHubBufferedProducerClient(connectionString, eventHubName, options); + var producer = new EventHubBufferedProducerClient( + fullyQualifiedNamespace, + eventHubName, + credential, + options); // The failure handler is required and invoked after all allowable // retries were applied. @@ -544,14 +591,19 @@ public async Task NoBatch() #region Snippet:EventHubs_Sample04_NoBatch #if SNIPPET - var connectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; + var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; + var credential = new DefaultAzureCredential(); #else - var connectionString = EventHubsTestEnvironment.Instance.EventHubsConnectionString; + var fullyQualifiedNamespace = EventHubsTestEnvironment.Instance.FullyQualifiedNamespace; var eventHubName = scope.EventHubName; + var credential = EventHubsTestEnvironment.Instance.Credential; #endif - var producer = new EventHubProducerClient(connectionString, eventHubName); + var producer = new EventHubProducerClient( + fullyQualifiedNamespace, + eventHubName, + credential); try { @@ -585,14 +637,20 @@ public async Task MultipleBatches() #region Snippet:EventHubs_Sample04_MultipleBatches #if SNIPPET - var connectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; + var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; + var credential = new DefaultAzureCredential(); #else - var connectionString = EventHubsTestEnvironment.Instance.EventHubsConnectionString; + var fullyQualifiedNamespace = EventHubsTestEnvironment.Instance.FullyQualifiedNamespace; var eventHubName = scope.EventHubName; + var credential = EventHubsTestEnvironment.Instance.Credential; #endif - var producer = new EventHubProducerClient(connectionString, eventHubName); + var producer = new EventHubProducerClient( + fullyQualifiedNamespace, + eventHubName, + credential); + var batches = default(IEnumerable); var eventsToSend = new Queue(); @@ -635,14 +693,19 @@ public async Task CustomBatchSize() #region Snippet:EventHubs_Sample04_CustomBatchSize #if SNIPPET - var connectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; + var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; + var credential = new DefaultAzureCredential(); #else - var connectionString = EventHubsTestEnvironment.Instance.EventHubsConnectionString; + var fullyQualifiedNamespace = EventHubsTestEnvironment.Instance.FullyQualifiedNamespace; var eventHubName = scope.EventHubName; + var credential = EventHubsTestEnvironment.Instance.Credential; #endif - var producer = new EventHubProducerClient(connectionString, eventHubName); + var producer = new EventHubProducerClient( + fullyQualifiedNamespace, + eventHubName, + credential); try { diff --git a/sdk/eventhub/Azure.Messaging.EventHubs/tests/Snippets/Sample05_ReadingEventsLiveTests.cs b/sdk/eventhub/Azure.Messaging.EventHubs/tests/Snippets/Sample05_ReadingEventsLiveTests.cs index 598fd6bd77a5..0f7cf87fe79f 100644 --- a/sdk/eventhub/Azure.Messaging.EventHubs/tests/Snippets/Sample05_ReadingEventsLiveTests.cs +++ b/sdk/eventhub/Azure.Messaging.EventHubs/tests/Snippets/Sample05_ReadingEventsLiveTests.cs @@ -9,6 +9,7 @@ using System.Reflection; using System.Threading; using System.Threading.Tasks; +using Azure.Identity; using Azure.Messaging.EventHubs.Consumer; using Azure.Messaging.EventHubs.Primitives; using Azure.Messaging.EventHubs.Producer; @@ -38,18 +39,21 @@ public async Task ReadAllPartitions() #region Snippet:EventHubs_Sample05_ReadAllPartitions #if SNIPPET - var connectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; + var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; + var credential = new DefaultAzureCredential(); #else - var connectionString = EventHubsTestEnvironment.Instance.EventHubsConnectionString; + var fullyQualifiedNamespace = EventHubsTestEnvironment.Instance.FullyQualifiedNamespace; var eventHubName = scope.EventHubName; + var credential = EventHubsTestEnvironment.Instance.Credential; #endif var consumerGroup = EventHubConsumerClient.DefaultConsumerGroupName; var consumer = new EventHubConsumerClient( consumerGroup, - connectionString, - eventHubName); + fullyQualifiedNamespace, + eventHubName, + credential); try { @@ -98,18 +102,21 @@ public async Task ReadAllPartitionsWaitTime() #region Snippet:EventHubs_Sample05_ReadAllPartitionsWaitTime #if SNIPPET - var connectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; + var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; + var credential = new DefaultAzureCredential(); #else - var connectionString = EventHubsTestEnvironment.Instance.EventHubsConnectionString; + var fullyQualifiedNamespace = EventHubsTestEnvironment.Instance.FullyQualifiedNamespace; var eventHubName = scope.EventHubName; + var credential = EventHubsTestEnvironment.Instance.Credential; #endif var consumerGroup = EventHubConsumerClient.DefaultConsumerGroupName; var consumer = new EventHubConsumerClient( consumerGroup, - connectionString, - eventHubName); + fullyQualifiedNamespace, + eventHubName, + credential); try { @@ -163,18 +170,21 @@ public async Task ReadAllPartitionsFromLatest() #region Snippet:EventHubs_Sample05_ReadAllPartitionsFromLatest #if SNIPPET - var connectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; + var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; + var credential = new DefaultAzureCredential(); #else - var connectionString = EventHubsTestEnvironment.Instance.EventHubsConnectionString; + var fullyQualifiedNamespace = EventHubsTestEnvironment.Instance.FullyQualifiedNamespace; var eventHubName = scope.EventHubName; + var credential = EventHubsTestEnvironment.Instance.Credential; #endif var consumerGroup = EventHubConsumerClient.DefaultConsumerGroupName; var consumer = new EventHubConsumerClient( consumerGroup, - connectionString, - eventHubName); + fullyQualifiedNamespace, + eventHubName, + credential); try { @@ -216,18 +226,21 @@ public async Task ReadPartition() #region Snippet:EventHubs_Sample05_ReadPartition #if SNIPPET - var connectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; + var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; + var credential = new DefaultAzureCredential(); #else - var connectionString = EventHubsTestEnvironment.Instance.EventHubsConnectionString; + var fullyQualifiedNamespace = EventHubsTestEnvironment.Instance.FullyQualifiedNamespace; var eventHubName = scope.EventHubName; + var credential = EventHubsTestEnvironment.Instance.Credential; #endif var consumerGroup = EventHubConsumerClient.DefaultConsumerGroupName; var consumer = new EventHubConsumerClient( consumerGroup, - connectionString, - eventHubName); + fullyQualifiedNamespace, + eventHubName, + credential); try { @@ -273,18 +286,21 @@ public async Task ReadPartitionWaitTime() #region Snippet:EventHubs_Sample05_ReadPartitionWaitTime #if SNIPPET - var connectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; + var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; + var credential = new DefaultAzureCredential(); #else - var connectionString = EventHubsTestEnvironment.Instance.EventHubsConnectionString; + var fullyQualifiedNamespace = EventHubsTestEnvironment.Instance.FullyQualifiedNamespace; var eventHubName = scope.EventHubName; + var credential = EventHubsTestEnvironment.Instance.Credential; #endif var consumerGroup = EventHubConsumerClient.DefaultConsumerGroupName; var consumer = new EventHubConsumerClient( consumerGroup, - connectionString, - eventHubName); + fullyQualifiedNamespace, + eventHubName, + credential); try { @@ -352,18 +368,21 @@ public async Task ReadPartitionFromDate() #region Snippet:EventHubs_Sample05_ReadPartitionFromDate #if SNIPPET - var connectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; + var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; + var credential = new DefaultAzureCredential(); #else - var connectionString = EventHubsTestEnvironment.Instance.EventHubsConnectionString; + var fullyQualifiedNamespace = EventHubsTestEnvironment.Instance.FullyQualifiedNamespace; var eventHubName = scope.EventHubName; + var credential = EventHubsTestEnvironment.Instance.Credential; #endif var consumerGroup = EventHubConsumerClient.DefaultConsumerGroupName; var consumer = new EventHubConsumerClient( consumerGroup, - connectionString, - eventHubName); + fullyQualifiedNamespace, + eventHubName, + credential); try { @@ -411,18 +430,21 @@ public async Task ReadPartitionFromOffset() #region Snippet:EventHubs_Sample05_ReadPartitionFromOffset #if SNIPPET - var connectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; + var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; + var credential = new DefaultAzureCredential(); #else - var connectionString = EventHubsTestEnvironment.Instance.EventHubsConnectionString; + var fullyQualifiedNamespace = EventHubsTestEnvironment.Instance.FullyQualifiedNamespace; var eventHubName = scope.EventHubName; + var credential = EventHubsTestEnvironment.Instance.Credential; #endif var consumerGroup = EventHubConsumerClient.DefaultConsumerGroupName; var consumer = new EventHubConsumerClient( consumerGroup, - connectionString, - eventHubName); + fullyQualifiedNamespace, + eventHubName, + credential); try { @@ -469,18 +491,21 @@ public async Task ReadPartitionFromSequence() #region Snippet:EventHubs_Sample05_ReadPartitionFromSequence #if SNIPPET - var connectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; + var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; + var credential = new DefaultAzureCredential(); #else - var connectionString = EventHubsTestEnvironment.Instance.EventHubsConnectionString; + var fullyQualifiedNamespace = EventHubsTestEnvironment.Instance.FullyQualifiedNamespace; var eventHubName = scope.EventHubName; + var credential = EventHubsTestEnvironment.Instance.Credential; #endif var consumerGroup = EventHubConsumerClient.DefaultConsumerGroupName; var consumer = new EventHubConsumerClient( consumerGroup, - connectionString, - eventHubName); + fullyQualifiedNamespace, + eventHubName, + credential); try { @@ -527,18 +552,21 @@ public async Task ReadPartitionTrackLastEnqueued() #region Snippet:EventHubs_Sample05_ReadPartitionTrackLastEnqueued #if SNIPPET - var connectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; + var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; + var credential = new DefaultAzureCredential(); #else - var connectionString = EventHubsTestEnvironment.Instance.EventHubsConnectionString; + var fullyQualifiedNamespace = EventHubsTestEnvironment.Instance.FullyQualifiedNamespace; var eventHubName = scope.EventHubName; + var credential = EventHubsTestEnvironment.Instance.Credential; #endif var consumerGroup = EventHubConsumerClient.DefaultConsumerGroupName; var consumer = new EventHubConsumerClient( consumerGroup, - connectionString, - eventHubName); + fullyQualifiedNamespace, + eventHubName, + credential); try { @@ -594,11 +622,13 @@ public async Task ReadPartitionWithReceiver() #region Snippet:EventHubs_Sample05_ReadPartitionWithReceiver #if SNIPPET - var connectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; + var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; + var credential = new DefaultAzureCredential(); #else - var connectionString = EventHubsTestEnvironment.Instance.EventHubsConnectionString; + var fullyQualifiedNamespace = EventHubsTestEnvironment.Instance.FullyQualifiedNamespace; var eventHubName = scope.EventHubName; + var credential = EventHubsTestEnvironment.Instance.Credential; #endif var consumerGroup = EventHubConsumerClient.DefaultConsumerGroupName; @@ -607,7 +637,10 @@ public async Task ReadPartitionWithReceiver() string firstPartition; - await using (var producer = new EventHubProducerClient(connectionString, eventHubName)) + await using (var producer = new EventHubProducerClient( + fullyQualifiedNamespace, + eventHubName, + credential)) { firstPartition = (await producer.GetPartitionIdsAsync()).First(); } @@ -616,8 +649,9 @@ public async Task ReadPartitionWithReceiver() consumerGroup, firstPartition, EventPosition.Earliest, - connectionString, - eventHubName); + fullyQualifiedNamespace, + eventHubName, + credential); try { diff --git a/sdk/eventhub/Azure.Messaging.EventHubs/tests/Snippets/Sample07_EarlierLanguageVersionsLiveTests.cs b/sdk/eventhub/Azure.Messaging.EventHubs/tests/Snippets/Sample07_EarlierLanguageVersionsLiveTests.cs index c3476139f975..b4ac38e697b2 100644 --- a/sdk/eventhub/Azure.Messaging.EventHubs/tests/Snippets/Sample07_EarlierLanguageVersionsLiveTests.cs +++ b/sdk/eventhub/Azure.Messaging.EventHubs/tests/Snippets/Sample07_EarlierLanguageVersionsLiveTests.cs @@ -6,6 +6,7 @@ using System.Diagnostics; using System.Threading; using System.Threading.Tasks; +using Azure.Identity; using Azure.Messaging.EventHubs.Consumer; using Azure.Messaging.EventHubs.Producer; using NUnit.Framework; @@ -34,14 +35,19 @@ public async Task Publish() #region Snippet:EventHubs_Sample07_Publish #if SNIPPET - var connectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; + var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; + var credential = new DefaultAzureCredential(); #else - var connectionString = EventHubsTestEnvironment.Instance.EventHubsConnectionString; + var fullyQualifiedNamespace = EventHubsTestEnvironment.Instance.FullyQualifiedNamespace; var eventHubName = scope.EventHubName; + var credential = EventHubsTestEnvironment.Instance.Credential; #endif - var producer = new EventHubProducerClient(connectionString, eventHubName); + var producer = new EventHubProducerClient( + fullyQualifiedNamespace, + eventHubName, + credential); try { @@ -76,18 +82,21 @@ public async Task ReadAllPartitions() #region Snippet:EventHubs_Sample07_ReadAllPartitions #if SNIPPET - var connectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; + var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; + var credential = new DefaultAzureCredential(); #else - var connectionString = EventHubsTestEnvironment.Instance.EventHubsConnectionString; + var fullyQualifiedNamespace = EventHubsTestEnvironment.Instance.FullyQualifiedNamespace; var eventHubName = scope.EventHubName; + var credential = EventHubsTestEnvironment.Instance.Credential; #endif var consumerGroup = EventHubConsumerClient.DefaultConsumerGroupName; var consumer = new EventHubConsumerClient( consumerGroup, - connectionString, - eventHubName); + fullyQualifiedNamespace, + eventHubName, + credential); try { diff --git a/sdk/eventhub/Azure.Messaging.EventHubs/tests/Snippets/Sample08_CustomEventProcessorLiveTests.cs b/sdk/eventhub/Azure.Messaging.EventHubs/tests/Snippets/Sample08_CustomEventProcessorLiveTests.cs index 597c620fba3a..cbda1869d434 100644 --- a/sdk/eventhub/Azure.Messaging.EventHubs/tests/Snippets/Sample08_CustomEventProcessorLiveTests.cs +++ b/sdk/eventhub/Azure.Messaging.EventHubs/tests/Snippets/Sample08_CustomEventProcessorLiveTests.cs @@ -9,6 +9,7 @@ using System.Threading; using System.Threading.Tasks; using Azure.Core; +using Azure.Identity; using Azure.Messaging.EventHubs.Consumer; using Azure.Messaging.EventHubs.Primitives; using Azure.Messaging.EventHubs.Processor; @@ -48,18 +49,26 @@ public async Task CustomProcessorUse() #region Snippet:EventHubs_Sample08_CustomProcessorUse #if SNIPPET - var storageConnectionString = "<< CONNECTION STRING FOR THE STORAGE ACCOUNT >>"; + var credential = new DefaultAzureCredential(); + + var storageAccountEndpoint = "<< Account Uri (likely similar to https://{your-account}.blob.core.windows.net) >>"; var blobContainerName = "<< NAME OF THE BLOB CONTAINER >>"; - var eventHubsConnectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; + var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; var consumerGroup = "<< NAME OF THE EVENT HUB CONSUMER GROUP >>"; + var blobUriBuilder = new BlobUriBuilder(new Uri(storageAccountEndpoint)) + { + BlobContainerName = blobContainerName + }; + var storageClient = new BlobContainerClient( - storageConnectionString, - blobContainerName); + blobUriBuilder.ToUri(), + credential); #else - var eventHubsConnectionString = EventHubsTestEnvironment.Instance.EventHubsConnectionString; + var credential = EventHubsTestEnvironment.Instance.Credential; + var fullyQualifiedNamespace = EventHubsTestEnvironment.Instance.FullyQualifiedNamespace; var eventHubName = eventHubScope.EventHubName; var consumerGroup = eventHubScope.ConsumerGroups.First(); var storageClient = Mock.Of(); @@ -71,8 +80,9 @@ public async Task CustomProcessorUse() storageClient, maximumBatchSize, consumerGroup, - eventHubsConnectionString, - eventHubName); + fullyQualifiedNamespace, + eventHubName, + credential); using var cancellationSource = new CancellationTokenSource(); cancellationSource.CancelAfter(TimeSpan.FromSeconds(30)); @@ -113,8 +123,9 @@ public CustomProcessor( BlobContainerClient storageClient, int eventBatchMaximumCount, string consumerGroup, - string connectionString, + string fullyQualifiedNamespace, string eventHubName, + TokenCredential credential, EventProcessorOptions clientOptions = default) : base( #if SNIPPET @@ -124,8 +135,9 @@ public CustomProcessor( #endif eventBatchMaximumCount, consumerGroup, - connectionString, + fullyQualifiedNamespace, eventHubName, + credential, clientOptions) { } diff --git a/sdk/eventhub/Azure.Messaging.EventHubs/tests/Snippets/Sample09_ObservableEventBatchLiveTests.cs b/sdk/eventhub/Azure.Messaging.EventHubs/tests/Snippets/Sample09_ObservableEventBatchLiveTests.cs index 51fa5e13c178..4c1983986ba2 100644 --- a/sdk/eventhub/Azure.Messaging.EventHubs/tests/Snippets/Sample09_ObservableEventBatchLiveTests.cs +++ b/sdk/eventhub/Azure.Messaging.EventHubs/tests/Snippets/Sample09_ObservableEventBatchLiveTests.cs @@ -6,6 +6,7 @@ using System.Diagnostics; using System.Linq; using System.Threading.Tasks; +using Azure.Identity; using Azure.Messaging.EventHubs.Producer; using NUnit.Framework; @@ -32,14 +33,19 @@ public async Task Sample09_AccessingEventData() #region Snippet:Sample09_AccessingEventData #if SNIPPET - var connectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; + var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; + var credential = new DefaultAzureCredential(); #else - var connectionString = EventHubsTestEnvironment.Instance.EventHubsConnectionString; + var fullyQualifiedNamespace = EventHubsTestEnvironment.Instance.FullyQualifiedNamespace; var eventHubName = scope.EventHubName; + var credential = EventHubsTestEnvironment.Instance.Credential; #endif - var producer = new EventHubProducerClient(connectionString, eventHubName); + var producer = new EventHubProducerClient( + fullyQualifiedNamespace, + eventHubName, + credential); try { @@ -86,14 +92,19 @@ public async Task Sample09_CheckingBatch() #region Snippet:Sample09_CheckingBatch #if SNIPPET - var connectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; + var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; + var credential = new DefaultAzureCredential(); #else - var connectionString = EventHubsTestEnvironment.Instance.EventHubsConnectionString; + var fullyQualifiedNamespace = EventHubsTestEnvironment.Instance.FullyQualifiedNamespace; var eventHubName = scope.EventHubName; + var credential = EventHubsTestEnvironment.Instance.Credential; #endif - var producer = new EventHubProducerClient(connectionString, eventHubName); + var producer = new EventHubProducerClient( + fullyQualifiedNamespace, + eventHubName, + credential); try { diff --git a/sdk/eventhub/Azure.Messaging.EventHubs/tests/Snippets/Sample10_AzureEventSourceListenerTests.cs b/sdk/eventhub/Azure.Messaging.EventHubs/tests/Snippets/Sample10_AzureEventSourceListenerTests.cs index edb4fe5a9b44..3b11046118e6 100644 --- a/sdk/eventhub/Azure.Messaging.EventHubs/tests/Snippets/Sample10_AzureEventSourceListenerTests.cs +++ b/sdk/eventhub/Azure.Messaging.EventHubs/tests/Snippets/Sample10_AzureEventSourceListenerTests.cs @@ -7,6 +7,7 @@ using System.IO; using System.Threading.Tasks; using Azure.Core.Diagnostics; +using Azure.Identity; using Azure.Messaging.EventHubs.Producer; using NUnit.Framework; @@ -33,13 +34,19 @@ public async Task ConsoleListener() #region Snippet:EventHubs_Sample10_ConsoleListener #if SNIPPET - var connectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; + var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; + var credential = new DefaultAzureCredential(); #else - var connectionString = EventHubsTestEnvironment.Instance.EventHubsConnectionString; + var fullyQualifiedNamespace = EventHubsTestEnvironment.Instance.FullyQualifiedNamespace; var eventHubName = scope.EventHubName; + var credential = EventHubsTestEnvironment.Instance.Credential; #endif - var producer = new EventHubProducerClient(connectionString, eventHubName); + + var producer = new EventHubProducerClient( + fullyQualifiedNamespace, + eventHubName, + credential); using AzureEventSourceListener consoleListener = AzureEventSourceListener.CreateConsoleLogger(EventLevel.LogAlways); @@ -71,13 +78,19 @@ public async Task TraceListener() #region Snippet:EventHubs_Sample10_TraceListener #if SNIPPET - var connectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; + var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; + var credential = new DefaultAzureCredential(); #else - var connectionString = EventHubsTestEnvironment.Instance.EventHubsConnectionString; + var fullyQualifiedNamespace = EventHubsTestEnvironment.Instance.FullyQualifiedNamespace; var eventHubName = scope.EventHubName; + var credential = EventHubsTestEnvironment.Instance.Credential; #endif - var producer = new EventHubProducerClient(connectionString, eventHubName); + + var producer = new EventHubProducerClient( + fullyQualifiedNamespace, + eventHubName, + credential); using AzureEventSourceListener traceListener = AzureEventSourceListener.CreateTraceLogger(EventLevel.LogAlways); @@ -109,13 +122,19 @@ public async Task CustomListenerWithFilter() #region Snippet:EventHubs_Sample10_CustomListenerWithFilter #if SNIPPET - var connectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; + var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; + var credential = new DefaultAzureCredential(); #else - var connectionString = EventHubsTestEnvironment.Instance.EventHubsConnectionString; + var fullyQualifiedNamespace = EventHubsTestEnvironment.Instance.FullyQualifiedNamespace; var eventHubName = scope.EventHubName; + var credential = EventHubsTestEnvironment.Instance.Credential; #endif - var producer = new EventHubProducerClient(connectionString, eventHubName); + + var producer = new EventHubProducerClient( + fullyQualifiedNamespace, + eventHubName, + credential); using AzureEventSourceListener customListener = new AzureEventSourceListener((args, message) => { @@ -164,19 +183,24 @@ public async Task CustomListenerWithFile() #region Snippet:EventHubs_Sample10_CustomListenerWithFile #if SNIPPET - var connectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; + var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; - var producer = new EventHubProducerClient(connectionString, eventHubName); + var credential = new DefaultAzureCredential(); using Stream stream = new FileStream("<< PATH TO THE FILE >>", FileMode.OpenOrCreate, FileAccess.Write); #else - var connectionString = EventHubsTestEnvironment.Instance.EventHubsConnectionString; + var fullyQualifiedNamespace = EventHubsTestEnvironment.Instance.FullyQualifiedNamespace; var eventHubName = scope.EventHubName; - var producer = new EventHubProducerClient(connectionString, eventHubName); + var credential = EventHubsTestEnvironment.Instance.Credential; using Stream stream = new MemoryStream(); #endif + var producer = new EventHubProducerClient( + fullyQualifiedNamespace, + eventHubName, + credential); + using StreamWriter streamWriter = new StreamWriter(stream) { AutoFlush = true diff --git a/sdk/eventhub/Azure.Messaging.EventHubs/tests/Snippets/SamplesCommonTests.cs b/sdk/eventhub/Azure.Messaging.EventHubs/tests/Snippets/SamplesCommonTests.cs index c6d01c3da7b4..fe1ced34a650 100644 --- a/sdk/eventhub/Azure.Messaging.EventHubs/tests/Snippets/SamplesCommonTests.cs +++ b/sdk/eventhub/Azure.Messaging.EventHubs/tests/Snippets/SamplesCommonTests.cs @@ -2,6 +2,7 @@ // Licensed under the MIT License. using Azure.Messaging.EventHubs.Consumer; +using Azure.Identity; using NUnit.Framework; namespace Azure.Messaging.EventHubs.Tests @@ -23,14 +24,17 @@ public void ConsumerBasicConfiguration() { #region Snippet:EventHubs_SamplesCommon_ConsumerBasicConfig - var connectionString = "<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>"; + var fullyQualifiedNamespace = "<< NAMESPACE (likely similar to {your-namespace}.servicebus.windows.net) >>"; var eventHubName = "<< NAME OF THE EVENT HUB >>"; var consumerGroup = EventHubConsumerClient.DefaultConsumerGroupName; + var credential = new DefaultAzureCredential(); + #endregion - Assert.That(connectionString, Is.Not.Null); + Assert.That(fullyQualifiedNamespace, Is.Not.Null); Assert.That(eventHubName, Is.Not.Null); + Assert.That(credential, Is.Not.Null); Assert.That(consumerGroup, Is.Not.Null); } } diff --git a/sdk/eventhub/Azure.ResourceManager.EventHubs/CHANGELOG.md b/sdk/eventhub/Azure.ResourceManager.EventHubs/CHANGELOG.md index a2fd0d61ef3c..195f02c0dfad 100644 --- a/sdk/eventhub/Azure.ResourceManager.EventHubs/CHANGELOG.md +++ b/sdk/eventhub/Azure.ResourceManager.EventHubs/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 1.2.0-beta.1 (Unreleased) +## 1.2.0-beta.2 (Unreleased) ### Features Added @@ -10,6 +10,12 @@ ### Other Changes +## 1.2.0-beta.1 (2024-10-15) + +### Features Added + +- Exposed `JsonModelWriteCore` for model serialization procedure. + ## 1.1.0 (2024-06-14) ### Features Added diff --git a/sdk/eventhub/Azure.ResourceManager.EventHubs/api/Azure.ResourceManager.EventHubs.netstandard2.0.cs b/sdk/eventhub/Azure.ResourceManager.EventHubs/api/Azure.ResourceManager.EventHubs.netstandard2.0.cs index 48d97dcec682..fa38c4482619 100644 --- a/sdk/eventhub/Azure.ResourceManager.EventHubs/api/Azure.ResourceManager.EventHubs.netstandard2.0.cs +++ b/sdk/eventhub/Azure.ResourceManager.EventHubs/api/Azure.ResourceManager.EventHubs.netstandard2.0.cs @@ -72,6 +72,7 @@ public EventHubData() { } public Azure.ResourceManager.EventHubs.Models.EventHubEntityStatus? Status { get { throw null; } set { } } public System.DateTimeOffset? UpdatedOn { get { throw null; } } public string UserMetadata { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventHubs.EventHubData 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.EventHubs.EventHubData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -127,6 +128,7 @@ public EventHubsApplicationGroupData() { } public bool? IsEnabled { get { throw null; } set { } } public Azure.Core.AzureLocation? Location { get { throw null; } } public System.Collections.Generic.IList Policies { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventHubs.EventHubsApplicationGroupData 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.EventHubs.EventHubsApplicationGroupData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -157,6 +159,7 @@ public partial class EventHubsAuthorizationRuleData : Azure.ResourceManager.Mode public EventHubsAuthorizationRuleData() { } public Azure.Core.AzureLocation? Location { get { throw null; } } public System.Collections.Generic.IList Rights { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventHubs.EventHubsAuthorizationRuleData 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.EventHubs.EventHubsAuthorizationRuleData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -190,6 +193,7 @@ public EventHubsClusterData(Azure.Core.AzureLocation location) { } public string Status { get { throw null; } } public bool? SupportsScaling { get { throw null; } set { } } public System.DateTimeOffset? UpdatedOn { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventHubs.EventHubsClusterData 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.EventHubs.EventHubsClusterData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -251,6 +255,7 @@ public EventHubsConsumerGroupData() { } public Azure.Core.AzureLocation? Location { get { throw null; } } public System.DateTimeOffset? UpdatedOn { get { throw null; } } public string UserMetadata { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventHubs.EventHubsConsumerGroupData 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.EventHubs.EventHubsConsumerGroupData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -334,6 +339,7 @@ public EventHubsDisasterRecoveryData() { } public long? PendingReplicationOperationsCount { get { throw null; } } public Azure.ResourceManager.EventHubs.Models.EventHubsDisasterRecoveryProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.EventHubs.Models.EventHubsDisasterRecoveryRole? Role { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventHubs.EventHubsDisasterRecoveryData 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.EventHubs.EventHubsDisasterRecoveryData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -474,6 +480,7 @@ public EventHubsNamespaceData(Azure.Core.AzureLocation location) { } public string Status { get { throw null; } } public System.DateTimeOffset? UpdatedOn { get { throw null; } } public bool? ZoneRedundant { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventHubs.EventHubsNamespaceData 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.EventHubs.EventHubsNamespaceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -541,6 +548,7 @@ public EventHubsNetworkRuleSetData() { } public Azure.ResourceManager.EventHubs.Models.EventHubsPublicNetworkAccessFlag? PublicNetworkAccess { get { throw null; } set { } } public bool? TrustedServiceAccessEnabled { get { throw null; } set { } } public System.Collections.Generic.IList VirtualNetworkRules { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventHubs.EventHubsNetworkRuleSetData 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.EventHubs.EventHubsNetworkRuleSetData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -588,6 +596,7 @@ public EventHubsPrivateEndpointConnectionData() { } public Azure.Core.AzureLocation? Location { get { throw null; } } public Azure.Core.ResourceIdentifier PrivateEndpointId { get { throw null; } set { } } public Azure.ResourceManager.EventHubs.Models.EventHubsPrivateEndpointConnectionProvisioningState? ProvisioningState { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventHubs.EventHubsPrivateEndpointConnectionData 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.EventHubs.EventHubsPrivateEndpointConnectionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -640,6 +649,7 @@ public EventHubsSchemaGroupData() { } public Azure.ResourceManager.EventHubs.Models.EventHubsSchemaCompatibility? SchemaCompatibility { get { throw null; } set { } } public Azure.ResourceManager.EventHubs.Models.EventHubsSchemaType? SchemaType { get { throw null; } set { } } public System.DateTimeOffset? UpdatedAtUtc { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventHubs.EventHubsSchemaGroupData 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.EventHubs.EventHubsSchemaGroupData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -739,6 +749,7 @@ public partial class AvailableCluster : System.ClientModel.Primitives.IJsonModel { internal AvailableCluster() { } public Azure.Core.AzureLocation? Location { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventHubs.Models.AvailableCluster 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.EventHubs.Models.AvailableCluster System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -754,6 +765,7 @@ public CaptureDescription() { } public int? IntervalInSeconds { get { throw null; } set { } } public int? SizeLimitInBytes { get { throw null; } set { } } public bool? SkipEmptyArchives { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventHubs.Models.CaptureDescription 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.EventHubs.Models.CaptureDescription System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -782,6 +794,7 @@ public partial class ClusterQuotaConfigurationProperties : System.ClientModel.Pr { public ClusterQuotaConfigurationProperties() { } public System.Collections.Generic.IDictionary Settings { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventHubs.Models.ClusterQuotaConfigurationProperties 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.EventHubs.Models.ClusterQuotaConfigurationProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -804,6 +817,7 @@ public EventHubDestination() { } public Azure.ResourceManager.EventHubs.Models.EventHubsCaptureIdentity Identity { get { throw null; } set { } } public string Name { get { throw null; } set { } } public Azure.Core.ResourceIdentifier StorageAccountResourceId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventHubs.Models.EventHubDestination 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.EventHubs.Models.EventHubDestination System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -832,6 +846,7 @@ internal EventHubsAccessKeys() { } public string PrimaryKey { get { throw null; } } public string SecondaryConnectionString { get { throw null; } } public string SecondaryKey { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventHubs.Models.EventHubsAccessKeys 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.EventHubs.Models.EventHubsAccessKeys System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -879,6 +894,7 @@ public abstract partial class EventHubsApplicationGroupPolicy : System.ClientMod { protected EventHubsApplicationGroupPolicy(string name) { } public string Name { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventHubs.Models.EventHubsApplicationGroupPolicy 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.EventHubs.Models.EventHubsApplicationGroupPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -890,6 +906,7 @@ public partial class EventHubsCaptureIdentity : System.ClientModel.Primitives.IJ public EventHubsCaptureIdentity() { } public Azure.ResourceManager.EventHubs.Models.EventHubsCaptureIdentityType? IdentityType { get { throw null; } set { } } public string UserAssignedIdentity { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventHubs.Models.EventHubsCaptureIdentity 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.EventHubs.Models.EventHubsCaptureIdentity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -930,6 +947,7 @@ public partial class EventHubsClusterSku : System.ClientModel.Primitives.IJsonMo public EventHubsClusterSku(Azure.ResourceManager.EventHubs.Models.EventHubsClusterSkuName name) { } public int? Capacity { get { throw null; } set { } } public Azure.ResourceManager.EventHubs.Models.EventHubsClusterSkuName Name { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventHubs.Models.EventHubsClusterSku 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.EventHubs.Models.EventHubsClusterSku System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -971,6 +989,7 @@ public EventHubsEncryption() { } public Azure.ResourceManager.EventHubs.Models.EventHubsKeySource? KeySource { get { throw null; } set { } } public System.Collections.Generic.IList KeyVaultProperties { get { throw null; } } public bool? RequireInfrastructureEncryption { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventHubs.Models.EventHubsEncryption 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.EventHubs.Models.EventHubsEncryption System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1001,6 +1020,7 @@ public EventHubsKeyVaultProperties() { } public System.Uri KeyVaultUri { get { throw null; } set { } } public string KeyVersion { get { throw null; } set { } } public string UserAssignedIdentity { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventHubs.Models.EventHubsKeyVaultProperties 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.EventHubs.Models.EventHubsKeyVaultProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1031,6 +1051,7 @@ public partial class EventHubsNameAvailabilityContent : System.ClientModel.Primi { public EventHubsNameAvailabilityContent(string name) { } public string Name { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventHubs.Models.EventHubsNameAvailabilityContent 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.EventHubs.Models.EventHubsNameAvailabilityContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1043,6 +1064,7 @@ internal EventHubsNameAvailabilityResult() { } public string Message { get { throw null; } } public bool? NameAvailable { get { throw null; } } public Azure.ResourceManager.EventHubs.Models.EventHubsNameUnavailableReason? Reason { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventHubs.Models.EventHubsNameAvailabilityResult 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.EventHubs.Models.EventHubsNameAvailabilityResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1098,6 +1120,7 @@ public partial class EventHubsNetworkRuleSetIPRules : System.ClientModel.Primiti public EventHubsNetworkRuleSetIPRules() { } public Azure.ResourceManager.EventHubs.Models.EventHubsNetworkRuleIPAction? Action { get { throw null; } set { } } public string IPMask { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventHubs.Models.EventHubsNetworkRuleSetIPRules 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.EventHubs.Models.EventHubsNetworkRuleSetIPRules System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1109,6 +1132,7 @@ public partial class EventHubsNetworkRuleSetVirtualNetworkRules : System.ClientM public EventHubsNetworkRuleSetVirtualNetworkRules() { } public bool? IgnoreMissingVnetServiceEndpoint { get { throw null; } set { } } public Azure.Core.ResourceIdentifier SubnetId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventHubs.Models.EventHubsNetworkRuleSetVirtualNetworkRules 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.EventHubs.Models.EventHubsNetworkRuleSetVirtualNetworkRules System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1121,6 +1145,7 @@ internal EventHubsNetworkSecurityPerimeter() { } public string Id { get { throw null; } } public Azure.Core.AzureLocation? Location { get { throw null; } } public string PerimeterGuid { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventHubs.Models.EventHubsNetworkSecurityPerimeter 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.EventHubs.Models.EventHubsNetworkSecurityPerimeter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1140,6 +1165,7 @@ public EventHubsNetworkSecurityPerimeterConfiguration() { } public Azure.ResourceManager.EventHubs.Models.EventHubsNetworkSecurityPerimeterConfigurationProvisioningState? ProvisioningState { get { throw null; } set { } } public Azure.ResourceManager.EventHubs.Models.EventHubsNetworkSecurityPerimeterConfigurationPropertiesResourceAssociation ResourceAssociation { get { throw null; } } public Azure.Core.ResourceIdentifier SourceResourceId { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventHubs.Models.EventHubsNetworkSecurityPerimeterConfiguration 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.EventHubs.Models.EventHubsNetworkSecurityPerimeterConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1152,6 +1178,7 @@ internal EventHubsNetworkSecurityPerimeterConfigurationPropertiesProfile() { } public System.Collections.Generic.IReadOnlyList AccessRules { get { throw null; } } public string AccessRulesVersion { get { throw null; } } public string Name { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventHubs.Models.EventHubsNetworkSecurityPerimeterConfigurationPropertiesProfile 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.EventHubs.Models.EventHubsNetworkSecurityPerimeterConfigurationPropertiesProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1163,6 +1190,7 @@ public partial class EventHubsNetworkSecurityPerimeterConfigurationPropertiesRes internal EventHubsNetworkSecurityPerimeterConfigurationPropertiesResourceAssociation() { } public Azure.ResourceManager.EventHubs.Models.EventHubsResourceAssociationAccessMode? AccessMode { get { throw null; } } public string Name { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventHubs.Models.EventHubsNetworkSecurityPerimeterConfigurationPropertiesResourceAssociation 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.EventHubs.Models.EventHubsNetworkSecurityPerimeterConfigurationPropertiesResourceAssociation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1200,6 +1228,7 @@ public partial class EventHubsNspAccessRule : Azure.ResourceManager.Models.Resou { internal EventHubsNspAccessRule() { } public Azure.ResourceManager.EventHubs.Models.EventHubsNspAccessRuleProperties Properties { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventHubs.Models.EventHubsNspAccessRule 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.EventHubs.Models.EventHubsNspAccessRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1232,6 +1261,7 @@ internal EventHubsNspAccessRuleProperties() { } public System.Collections.Generic.IReadOnlyList FullyQualifiedDomainNames { get { throw null; } } public System.Collections.Generic.IReadOnlyList NetworkSecurityPerimeters { get { throw null; } } public System.Collections.Generic.IReadOnlyList Subscriptions { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventHubs.Models.EventHubsNspAccessRuleProperties 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.EventHubs.Models.EventHubsNspAccessRuleProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1286,6 +1316,7 @@ internal EventHubsPrivateLinkResourceData() { } public string GroupId { get { throw null; } } public System.Collections.Generic.IReadOnlyList RequiredMembers { get { throw null; } } public System.Collections.Generic.IReadOnlyList RequiredZoneNames { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventHubs.Models.EventHubsPrivateLinkResourceData 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.EventHubs.Models.EventHubsPrivateLinkResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1297,6 +1328,7 @@ public partial class EventHubsPrivateLinkServiceConnectionState : System.ClientM public EventHubsPrivateLinkServiceConnectionState() { } public string Description { get { throw null; } set { } } public Azure.ResourceManager.EventHubs.Models.EventHubsPrivateLinkConnectionStatus? Status { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventHubs.Models.EventHubsPrivateLinkServiceConnectionState 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.EventHubs.Models.EventHubsPrivateLinkServiceConnectionState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1308,6 +1340,7 @@ public partial class EventHubsProvisioningIssue : System.ClientModel.Primitives. public EventHubsProvisioningIssue() { } public string Name { get { throw null; } set { } } public Azure.ResourceManager.EventHubs.Models.EventHubsProvisioningIssueProperties Properties { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventHubs.Models.EventHubsProvisioningIssue 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.EventHubs.Models.EventHubsProvisioningIssue System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1319,6 +1352,7 @@ public partial class EventHubsProvisioningIssueProperties : System.ClientModel.P internal EventHubsProvisioningIssueProperties() { } public string Description { get { throw null; } } public string IssueType { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventHubs.Models.EventHubsProvisioningIssueProperties 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.EventHubs.Models.EventHubsProvisioningIssueProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1368,6 +1402,7 @@ public partial class EventHubsRegenerateAccessKeyContent : System.ClientModel.Pr public EventHubsRegenerateAccessKeyContent(Azure.ResourceManager.EventHubs.Models.EventHubsAccessKeyType keyType) { } public string Key { get { throw null; } set { } } public Azure.ResourceManager.EventHubs.Models.EventHubsAccessKeyType KeyType { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventHubs.Models.EventHubsRegenerateAccessKeyContent 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.EventHubs.Models.EventHubsRegenerateAccessKeyContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1438,6 +1473,7 @@ public EventHubsSku(Azure.ResourceManager.EventHubs.Models.EventHubsSkuName name public int? Capacity { get { throw null; } set { } } public Azure.ResourceManager.EventHubs.Models.EventHubsSkuName Name { get { throw null; } set { } } public Azure.ResourceManager.EventHubs.Models.EventHubsSkuTier? Tier { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventHubs.Models.EventHubsSku 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.EventHubs.Models.EventHubsSku System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1487,6 +1523,7 @@ public partial class EventHubsThrottlingPolicy : Azure.ResourceManager.EventHubs public EventHubsThrottlingPolicy(string name, long rateLimitThreshold, Azure.ResourceManager.EventHubs.Models.EventHubsMetricId metricId) : base (default(string)) { } public Azure.ResourceManager.EventHubs.Models.EventHubsMetricId MetricId { get { throw null; } set { } } public long RateLimitThreshold { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventHubs.Models.EventHubsThrottlingPolicy 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.EventHubs.Models.EventHubsThrottlingPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1518,6 +1555,7 @@ public RetentionDescription() { } public Azure.ResourceManager.EventHubs.Models.CleanupPolicyRetentionDescription? CleanupPolicy { get { throw null; } set { } } public long? RetentionTimeInHours { get { throw null; } set { } } public int? TombstoneRetentionTimeInHours { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventHubs.Models.RetentionDescription 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.EventHubs.Models.RetentionDescription System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } diff --git a/sdk/eventhub/Azure.ResourceManager.EventHubs/assets.json b/sdk/eventhub/Azure.ResourceManager.EventHubs/assets.json index 26e3c419d59f..6caaf2312294 100644 --- a/sdk/eventhub/Azure.ResourceManager.EventHubs/assets.json +++ b/sdk/eventhub/Azure.ResourceManager.EventHubs/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/eventhub/Azure.ResourceManager.EventHubs", - "Tag": "net/eventhub/Azure.ResourceManager.EventHubs_d00062f6b8" + "Tag": "net/eventhub/Azure.ResourceManager.EventHubs_051d9da9a8" } diff --git a/sdk/eventhub/Azure.ResourceManager.EventHubs/samples/Generated/Samples/Sample_EventHubCollection.cs b/sdk/eventhub/Azure.ResourceManager.EventHubs/samples/Generated/Samples/Sample_EventHubCollection.cs index 8bb8d832fd6f..f22c72b89de3 100644 --- a/sdk/eventhub/Azure.ResourceManager.EventHubs/samples/Generated/Samples/Sample_EventHubCollection.cs +++ b/sdk/eventhub/Azure.ResourceManager.EventHubs/samples/Generated/Samples/Sample_EventHubCollection.cs @@ -80,7 +80,7 @@ public async Task CreateOrUpdate_EventHubCreate() string eventHubName = "sdk-EventHub-6547"; EventHubData data = new EventHubData() { - PartitionCount = 4, + PartitionCount = 4L, Status = EventHubEntityStatus.Active, UserMetadata = "key", CaptureDescription = new CaptureDescription() @@ -105,7 +105,7 @@ public async Task CreateOrUpdate_EventHubCreate() RetentionDescription = new RetentionDescription() { CleanupPolicy = CleanupPolicyRetentionDescription.Compaction, - RetentionTimeInHours = 96, + RetentionTimeInHours = 96L, TombstoneRetentionTimeInHours = 1, }, }; diff --git a/sdk/eventhub/Azure.ResourceManager.EventHubs/samples/Generated/Samples/Sample_EventHubResource.cs b/sdk/eventhub/Azure.ResourceManager.EventHubs/samples/Generated/Samples/Sample_EventHubResource.cs index 8a5fcecbc171..c778482b8243 100644 --- a/sdk/eventhub/Azure.ResourceManager.EventHubs/samples/Generated/Samples/Sample_EventHubResource.cs +++ b/sdk/eventhub/Azure.ResourceManager.EventHubs/samples/Generated/Samples/Sample_EventHubResource.cs @@ -40,7 +40,7 @@ public async Task Update_EventHubCreate() // invoke the operation EventHubData data = new EventHubData() { - PartitionCount = 4, + PartitionCount = 4L, Status = EventHubEntityStatus.Active, UserMetadata = "key", CaptureDescription = new CaptureDescription() @@ -65,7 +65,7 @@ public async Task Update_EventHubCreate() RetentionDescription = new RetentionDescription() { CleanupPolicy = CleanupPolicyRetentionDescription.Compaction, - RetentionTimeInHours = 96, + RetentionTimeInHours = 96L, TombstoneRetentionTimeInHours = 1, }, }; diff --git a/sdk/eventhub/Azure.ResourceManager.EventHubs/samples/Generated/Samples/Sample_EventHubsApplicationGroupCollection.cs b/sdk/eventhub/Azure.ResourceManager.EventHubs/samples/Generated/Samples/Sample_EventHubsApplicationGroupCollection.cs index 928a69fbb44f..d2ce6e5a5079 100644 --- a/sdk/eventhub/Azure.ResourceManager.EventHubs/samples/Generated/Samples/Sample_EventHubsApplicationGroupCollection.cs +++ b/sdk/eventhub/Azure.ResourceManager.EventHubs/samples/Generated/Samples/Sample_EventHubsApplicationGroupCollection.cs @@ -84,7 +84,7 @@ public async Task CreateOrUpdate_ApplicationGroupCreate() ClientAppGroupIdentifier = "SASKeyName=KeyName", Policies = { -new EventHubsThrottlingPolicy("ThrottlingPolicy1",7912,EventHubsMetricId.IncomingMessages),new EventHubsThrottlingPolicy("ThrottlingPolicy2",3951729,EventHubsMetricId.IncomingBytes),new EventHubsThrottlingPolicy("ThrottlingPolicy3",245175,EventHubsMetricId.OutgoingBytes) +new EventHubsThrottlingPolicy("ThrottlingPolicy1",7912L,EventHubsMetricId.IncomingMessages),new EventHubsThrottlingPolicy("ThrottlingPolicy2",3951729L,EventHubsMetricId.IncomingBytes),new EventHubsThrottlingPolicy("ThrottlingPolicy3",245175L,EventHubsMetricId.OutgoingBytes) }, }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, applicationGroupName, data); diff --git a/sdk/eventhub/Azure.ResourceManager.EventHubs/samples/Generated/Samples/Sample_EventHubsApplicationGroupResource.cs b/sdk/eventhub/Azure.ResourceManager.EventHubs/samples/Generated/Samples/Sample_EventHubsApplicationGroupResource.cs index ddf4ce022a23..e8f6112e298e 100644 --- a/sdk/eventhub/Azure.ResourceManager.EventHubs/samples/Generated/Samples/Sample_EventHubsApplicationGroupResource.cs +++ b/sdk/eventhub/Azure.ResourceManager.EventHubs/samples/Generated/Samples/Sample_EventHubsApplicationGroupResource.cs @@ -44,7 +44,7 @@ public async Task Update_ApplicationGroupCreate() ClientAppGroupIdentifier = "SASKeyName=KeyName", Policies = { -new EventHubsThrottlingPolicy("ThrottlingPolicy1",7912,EventHubsMetricId.IncomingMessages),new EventHubsThrottlingPolicy("ThrottlingPolicy2",3951729,EventHubsMetricId.IncomingBytes),new EventHubsThrottlingPolicy("ThrottlingPolicy3",245175,EventHubsMetricId.OutgoingBytes) +new EventHubsThrottlingPolicy("ThrottlingPolicy1",7912L,EventHubsMetricId.IncomingMessages),new EventHubsThrottlingPolicy("ThrottlingPolicy2",3951729L,EventHubsMetricId.IncomingBytes),new EventHubsThrottlingPolicy("ThrottlingPolicy3",245175L,EventHubsMetricId.OutgoingBytes) }, }; ArmOperation lro = await eventHubsApplicationGroup.UpdateAsync(WaitUntil.Completed, data); diff --git a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Azure.ResourceManager.EventHubs.csproj b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Azure.ResourceManager.EventHubs.csproj index 8b3dd9d7a252..0c1cce02a864 100644 --- a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Azure.ResourceManager.EventHubs.csproj +++ b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Azure.ResourceManager.EventHubs.csproj @@ -1,6 +1,6 @@ - 1.2.0-beta.1 + 1.2.0-beta.2 1.1.0 Azure.ResourceManager.EventHubs diff --git a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/EventHubData.Serialization.cs b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/EventHubData.Serialization.cs index 742d0dd6a5a1..afba204a44de 100644 --- a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/EventHubData.Serialization.cs +++ b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/EventHubData.Serialization.cs @@ -22,6 +22,15 @@ public partial class EventHubData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -29,32 +38,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(EventHubData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(Location)) { writer.WritePropertyName("location"u8); writer.WriteStringValue(Location.Value); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(PartitionIds)) @@ -103,22 +92,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti writer.WriteObjectValue(RetentionDescription, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } EventHubData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/EventHubsApplicationGroupData.Serialization.cs b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/EventHubsApplicationGroupData.Serialization.cs index d9219ee44715..b6414bdd1f84 100644 --- a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/EventHubsApplicationGroupData.Serialization.cs +++ b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/EventHubsApplicationGroupData.Serialization.cs @@ -22,6 +22,15 @@ public partial class EventHubsApplicationGroupData : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -29,32 +38,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(EventHubsApplicationGroupData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(Location)) { writer.WritePropertyName("location"u8); writer.WriteStringValue(Location.Value); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(IsEnabled)) @@ -78,22 +67,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } EventHubsApplicationGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/EventHubsAuthorizationRuleData.Serialization.cs b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/EventHubsAuthorizationRuleData.Serialization.cs index db4e8e0ebe50..f329a85bb2b8 100644 --- a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/EventHubsAuthorizationRuleData.Serialization.cs +++ b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/EventHubsAuthorizationRuleData.Serialization.cs @@ -22,6 +22,15 @@ public partial class EventHubsAuthorizationRuleData : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -29,32 +38,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(EventHubsAuthorizationRuleData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(Location)) { writer.WritePropertyName("location"u8); writer.WriteStringValue(Location.Value); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsCollectionDefined(Rights)) @@ -68,22 +57,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } EventHubsAuthorizationRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/EventHubsClusterData.Serialization.cs b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/EventHubsClusterData.Serialization.cs index 3549325e20a1..1b5b4f977780 100644 --- a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/EventHubsClusterData.Serialization.cs +++ b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/EventHubsClusterData.Serialization.cs @@ -22,6 +22,15 @@ public partial class EventHubsClusterData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -29,45 +38,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(EventHubsClusterData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Sku)) { writer.WritePropertyName("sku"u8); writer.WriteObjectValue(Sku, options); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(CreatedOn)) @@ -101,22 +77,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr writer.WriteBooleanValue(SupportsScaling.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } EventHubsClusterData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/EventHubsConsumerGroupData.Serialization.cs b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/EventHubsConsumerGroupData.Serialization.cs index 17d295d4c05c..f87d600463f4 100644 --- a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/EventHubsConsumerGroupData.Serialization.cs +++ b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/EventHubsConsumerGroupData.Serialization.cs @@ -20,6 +20,15 @@ public partial class EventHubsConsumerGroupData : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,32 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(EventHubsConsumerGroupData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(Location)) { writer.WritePropertyName("location"u8); writer.WriteStringValue(Location.Value); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(CreatedOn)) @@ -71,22 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe writer.WriteStringValue(UserMetadata); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } EventHubsConsumerGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/EventHubsDisasterRecoveryData.Serialization.cs b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/EventHubsDisasterRecoveryData.Serialization.cs index 66d3752084a1..a96510c189dd 100644 --- a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/EventHubsDisasterRecoveryData.Serialization.cs +++ b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/EventHubsDisasterRecoveryData.Serialization.cs @@ -21,6 +21,15 @@ public partial class EventHubsDisasterRecoveryData : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,32 +37,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(EventHubsDisasterRecoveryData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(Location)) { writer.WritePropertyName("location"u8); writer.WriteStringValue(Location.Value); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) @@ -82,22 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode writer.WriteNumberValue(PendingReplicationOperationsCount.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } EventHubsDisasterRecoveryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/EventHubsNamespaceData.Serialization.cs b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/EventHubsNamespaceData.Serialization.cs index 23b029c19dac..83790580457b 100644 --- a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/EventHubsNamespaceData.Serialization.cs +++ b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/EventHubsNamespaceData.Serialization.cs @@ -22,6 +22,15 @@ public partial class EventHubsNamespaceData : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -29,7 +38,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(EventHubsNamespaceData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Sku)) { writer.WritePropertyName("sku"u8); @@ -40,39 +49,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader writer.WritePropertyName("identity"u8); JsonSerializer.Serialize(writer, Identity); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(MinimumTlsVersion)) @@ -166,22 +142,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader writer.WriteStringValue(AlternateName); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } EventHubsNamespaceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/EventHubsNetworkRuleSetData.Serialization.cs b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/EventHubsNetworkRuleSetData.Serialization.cs index 886d1e6733c2..6215e1b7031b 100644 --- a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/EventHubsNetworkRuleSetData.Serialization.cs +++ b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/EventHubsNetworkRuleSetData.Serialization.cs @@ -22,6 +22,15 @@ public partial class EventHubsNetworkRuleSetData : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -29,32 +38,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(EventHubsNetworkRuleSetData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(Location)) { writer.WritePropertyName("location"u8); writer.WriteStringValue(Location.Value); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(TrustedServiceAccessEnabled)) @@ -93,22 +82,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR writer.WriteStringValue(PublicNetworkAccess.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } EventHubsNetworkRuleSetData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/EventHubsPrivateEndpointConnectionData.Serialization.cs b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/EventHubsPrivateEndpointConnectionData.Serialization.cs index c423dd8684da..285ddceb5e0e 100644 --- a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/EventHubsPrivateEndpointConnectionData.Serialization.cs +++ b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/EventHubsPrivateEndpointConnectionData.Serialization.cs @@ -22,6 +22,15 @@ public partial class EventHubsPrivateEndpointConnectionData : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -29,32 +38,12 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(EventHubsPrivateEndpointConnectionData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(Location)) { writer.WritePropertyName("location"u8); writer.WriteStringValue(Location.Value); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(PrivateEndpoint)) @@ -73,22 +62,6 @@ void IJsonModel.Write(Utf8JsonWriter wri writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } EventHubsPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/EventHubsSchemaGroupData.Serialization.cs b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/EventHubsSchemaGroupData.Serialization.cs index de98e8b88841..df50907be4ad 100644 --- a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/EventHubsSchemaGroupData.Serialization.cs +++ b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/EventHubsSchemaGroupData.Serialization.cs @@ -22,6 +22,15 @@ public partial class EventHubsSchemaGroupData : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -29,32 +38,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(EventHubsSchemaGroupData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(Location)) { writer.WritePropertyName("location"u8); writer.WriteStringValue(Location.Value); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(UpdatedAtUtc)) @@ -94,22 +83,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead writer.WriteStringValue(SchemaType.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } EventHubsSchemaGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/ArmDisasterRecoveryListResult.Serialization.cs b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/ArmDisasterRecoveryListResult.Serialization.cs index 2010fb49bcef..3b504bdd9360 100644 --- a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/ArmDisasterRecoveryListResult.Serialization.cs +++ b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/ArmDisasterRecoveryListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class ArmDisasterRecoveryListResult : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(ArmDisasterRecoveryListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } ArmDisasterRecoveryListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/AuthorizationRuleListResult.Serialization.cs b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/AuthorizationRuleListResult.Serialization.cs index 2c74ad3f7ecc..ee41fed24926 100644 --- a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/AuthorizationRuleListResult.Serialization.cs +++ b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/AuthorizationRuleListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class AuthorizationRuleListResult : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(AuthorizationRuleListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } AuthorizationRuleListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/AvailableCluster.Serialization.cs b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/AvailableCluster.Serialization.cs index 89971431c293..066843c9fa4d 100644 --- a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/AvailableCluster.Serialization.cs +++ b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/AvailableCluster.Serialization.cs @@ -19,6 +19,15 @@ public partial class AvailableCluster : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(AvailableCluster)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Location)) { writer.WritePropertyName("location"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } AvailableCluster IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/AvailableClustersList.Serialization.cs b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/AvailableClustersList.Serialization.cs index 94221f0d0da9..e2e0825f8904 100644 --- a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/AvailableClustersList.Serialization.cs +++ b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/AvailableClustersList.Serialization.cs @@ -20,6 +20,15 @@ internal partial class AvailableClustersList : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(AvailableClustersList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } AvailableClustersList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/CaptureDescription.Serialization.cs b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/CaptureDescription.Serialization.cs index 4ce7aa5255f9..4b8027528df6 100644 --- a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/CaptureDescription.Serialization.cs +++ b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/CaptureDescription.Serialization.cs @@ -19,6 +19,15 @@ public partial class CaptureDescription : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(CaptureDescription)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Enabled)) { writer.WritePropertyName("enabled"u8); @@ -72,7 +80,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } CaptureDescription IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/ClusterListResult.Serialization.cs b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/ClusterListResult.Serialization.cs index 0ccfc03e61b4..e15a4e633193 100644 --- a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/ClusterListResult.Serialization.cs +++ b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/ClusterListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class ClusterListResult : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(ClusterListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } ClusterListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/ClusterQuotaConfigurationProperties.Serialization.cs b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/ClusterQuotaConfigurationProperties.Serialization.cs index 469100664156..3082e576b574 100644 --- a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/ClusterQuotaConfigurationProperties.Serialization.cs +++ b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/ClusterQuotaConfigurationProperties.Serialization.cs @@ -20,6 +20,15 @@ public partial class ClusterQuotaConfigurationProperties : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(ClusterQuotaConfigurationProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Settings)) { writer.WritePropertyName("settings"u8); @@ -54,7 +62,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } ClusterQuotaConfigurationProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/ConsumerGroupListResult.Serialization.cs b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/ConsumerGroupListResult.Serialization.cs index 087fd78028d5..9f5e04315d97 100644 --- a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/ConsumerGroupListResult.Serialization.cs +++ b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/ConsumerGroupListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class ConsumerGroupListResult : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(ConsumerGroupListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } ConsumerGroupListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EHNamespaceIdListResult.Serialization.cs b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EHNamespaceIdListResult.Serialization.cs index 5c2f539a3447..3398a2b6c605 100644 --- a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EHNamespaceIdListResult.Serialization.cs +++ b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EHNamespaceIdListResult.Serialization.cs @@ -21,6 +21,15 @@ internal partial class EHNamespaceIdListResult : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,7 +37,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(EHNamespaceIdListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -54,7 +62,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } EHNamespaceIdListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EHNamespaceListResult.Serialization.cs b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EHNamespaceListResult.Serialization.cs index ab440a0fe5f8..bf9a18254840 100644 --- a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EHNamespaceListResult.Serialization.cs +++ b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EHNamespaceListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class EHNamespaceListResult : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(EHNamespaceListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } EHNamespaceListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubDestination.Serialization.cs b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubDestination.Serialization.cs index 67ed1d25f323..e4ce41a5c33f 100644 --- a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubDestination.Serialization.cs +++ b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubDestination.Serialization.cs @@ -19,6 +19,15 @@ public partial class EventHubDestination : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(EventHubDestination)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -85,7 +93,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } EventHubDestination IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubListResult.Serialization.cs b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubListResult.Serialization.cs index 38b6ec5be665..198d59ca6b1a 100644 --- a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubListResult.Serialization.cs +++ b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class EventHubListResult : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(EventHubListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } EventHubListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubsAccessKeys.Serialization.cs b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubsAccessKeys.Serialization.cs index fcb61d5c9dfb..6fdb8949cc62 100644 --- a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubsAccessKeys.Serialization.cs +++ b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubsAccessKeys.Serialization.cs @@ -19,6 +19,15 @@ public partial class EventHubsAccessKeys : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(EventHubsAccessKeys)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(PrimaryConnectionString)) { writer.WritePropertyName("primaryConnectionString"u8); @@ -77,7 +85,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } EventHubsAccessKeys IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubsApplicationGroupListResult.Serialization.cs b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubsApplicationGroupListResult.Serialization.cs index 829c89564afc..98869ac87324 100644 --- a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubsApplicationGroupListResult.Serialization.cs +++ b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubsApplicationGroupListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class EventHubsApplicationGroupListResult : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(EventHubsApplicationGroupListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } EventHubsApplicationGroupListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubsApplicationGroupPolicy.Serialization.cs b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubsApplicationGroupPolicy.Serialization.cs index 26bf7c944fdb..83b26f6ddacd 100644 --- a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubsApplicationGroupPolicy.Serialization.cs +++ b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubsApplicationGroupPolicy.Serialization.cs @@ -20,6 +20,15 @@ public partial class EventHubsApplicationGroupPolicy : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(EventHubsApplicationGroupPolicy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); writer.WritePropertyName("type"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } EventHubsApplicationGroupPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubsCaptureIdentity.Serialization.cs b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubsCaptureIdentity.Serialization.cs index 86cb32a6bd18..66509408611d 100644 --- a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubsCaptureIdentity.Serialization.cs +++ b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubsCaptureIdentity.Serialization.cs @@ -19,6 +19,15 @@ public partial class EventHubsCaptureIdentity : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(EventHubsCaptureIdentity)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IdentityType)) { writer.WritePropertyName("type"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } EventHubsCaptureIdentity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubsClusterSku.Serialization.cs b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubsClusterSku.Serialization.cs index f8cfcd061d3a..7debcf6e7dd3 100644 --- a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubsClusterSku.Serialization.cs +++ b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubsClusterSku.Serialization.cs @@ -19,6 +19,15 @@ public partial class EventHubsClusterSku : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(EventHubsClusterSku)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name.ToString()); if (Optional.IsDefined(Capacity)) @@ -49,7 +57,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } EventHubsClusterSku IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubsEncryption.Serialization.cs b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubsEncryption.Serialization.cs index 4712f5c0dffa..4d701f7aebd0 100644 --- a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubsEncryption.Serialization.cs +++ b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubsEncryption.Serialization.cs @@ -20,6 +20,15 @@ public partial class EventHubsEncryption : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(EventHubsEncryption)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(KeyVaultProperties)) { writer.WritePropertyName("keyVaultProperties"u8); @@ -63,7 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } EventHubsEncryption IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubsKeyVaultProperties.Serialization.cs b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubsKeyVaultProperties.Serialization.cs index 596ce2b26ad5..e284758f4a49 100644 --- a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubsKeyVaultProperties.Serialization.cs +++ b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubsKeyVaultProperties.Serialization.cs @@ -19,6 +19,15 @@ public partial class EventHubsKeyVaultProperties : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(EventHubsKeyVaultProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(KeyName)) { writer.WritePropertyName("keyName"u8); @@ -62,7 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } EventHubsKeyVaultProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubsNameAvailabilityContent.Serialization.cs b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubsNameAvailabilityContent.Serialization.cs index b5356b212d92..98ea97fefb70 100644 --- a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubsNameAvailabilityContent.Serialization.cs +++ b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubsNameAvailabilityContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class EventHubsNameAvailabilityContent : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(EventHubsNameAvailabilityContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } EventHubsNameAvailabilityContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubsNameAvailabilityResult.Serialization.cs b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubsNameAvailabilityResult.Serialization.cs index b19f99f73bb8..9e46e6d61268 100644 --- a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubsNameAvailabilityResult.Serialization.cs +++ b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubsNameAvailabilityResult.Serialization.cs @@ -19,6 +19,15 @@ public partial class EventHubsNameAvailabilityResult : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(EventHubsNameAvailabilityResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Message)) { writer.WritePropertyName("message"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } EventHubsNameAvailabilityResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubsNetworkRuleSetIPRules.Serialization.cs b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubsNetworkRuleSetIPRules.Serialization.cs index 8542f8f0fd27..c7c424a80c4f 100644 --- a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubsNetworkRuleSetIPRules.Serialization.cs +++ b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubsNetworkRuleSetIPRules.Serialization.cs @@ -19,6 +19,15 @@ public partial class EventHubsNetworkRuleSetIPRules : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(EventHubsNetworkRuleSetIPRules)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IPMask)) { writer.WritePropertyName("ipMask"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } EventHubsNetworkRuleSetIPRules IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubsNetworkRuleSetVirtualNetworkRules.Serialization.cs b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubsNetworkRuleSetVirtualNetworkRules.Serialization.cs index c5fab83f040d..c91cae85c00a 100644 --- a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubsNetworkRuleSetVirtualNetworkRules.Serialization.cs +++ b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubsNetworkRuleSetVirtualNetworkRules.Serialization.cs @@ -20,6 +20,15 @@ public partial class EventHubsNetworkRuleSetVirtualNetworkRules : IUtf8JsonSeria void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(EventHubsNetworkRuleSetVirtualNetworkRules)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Subnet)) { writer.WritePropertyName("subnet"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } EventHubsNetworkRuleSetVirtualNetworkRules IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubsNetworkSecurityPerimeter.Serialization.cs b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubsNetworkSecurityPerimeter.Serialization.cs index 7c70c8572ccd..dca9a6f99504 100644 --- a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubsNetworkSecurityPerimeter.Serialization.cs +++ b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubsNetworkSecurityPerimeter.Serialization.cs @@ -19,6 +19,15 @@ public partial class EventHubsNetworkSecurityPerimeter : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(EventHubsNetworkSecurityPerimeter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } EventHubsNetworkSecurityPerimeter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubsNetworkSecurityPerimeterConfiguration.Serialization.cs b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubsNetworkSecurityPerimeterConfiguration.Serialization.cs index 2b66a544c770..863c07b24bb2 100644 --- a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubsNetworkSecurityPerimeterConfiguration.Serialization.cs +++ b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubsNetworkSecurityPerimeterConfiguration.Serialization.cs @@ -21,6 +21,15 @@ public partial class EventHubsNetworkSecurityPerimeterConfiguration : IUtf8JsonS void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,32 +37,12 @@ void IJsonModel.Write(Utf8JsonWr throw new FormatException($"The model {nameof(EventHubsNetworkSecurityPerimeterConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(Location)) { writer.WritePropertyName("location"u8); writer.WriteStringValue(Location.Value); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(ProvisioningState)) @@ -112,22 +101,6 @@ void IJsonModel.Write(Utf8JsonWr writer.WriteStringValue(SourceResourceId); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } EventHubsNetworkSecurityPerimeterConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubsNetworkSecurityPerimeterConfigurationPropertiesProfile.Serialization.cs b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubsNetworkSecurityPerimeterConfigurationPropertiesProfile.Serialization.cs index 362c496796d0..131bf9b4aae6 100644 --- a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubsNetworkSecurityPerimeterConfigurationPropertiesProfile.Serialization.cs +++ b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubsNetworkSecurityPerimeterConfigurationPropertiesProfile.Serialization.cs @@ -20,6 +20,15 @@ public partial class EventHubsNetworkSecurityPerimeterConfigurationPropertiesPro void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel throw new FormatException($"The model {nameof(EventHubsNetworkSecurityPerimeterConfigurationPropertiesProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -63,7 +71,6 @@ void IJsonModel #endif } } - writer.WriteEndObject(); } EventHubsNetworkSecurityPerimeterConfigurationPropertiesProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubsNetworkSecurityPerimeterConfigurationPropertiesResourceAssociation.Serialization.cs b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubsNetworkSecurityPerimeterConfigurationPropertiesResourceAssociation.Serialization.cs index efdbfedaab0f..42cc15654e78 100644 --- a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubsNetworkSecurityPerimeterConfigurationPropertiesResourceAssociation.Serialization.cs +++ b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubsNetworkSecurityPerimeterConfigurationPropertiesResourceAssociation.Serialization.cs @@ -19,6 +19,15 @@ public partial class EventHubsNetworkSecurityPerimeterConfigurationPropertiesRes void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubsNspAccessRule.Serialization.cs b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubsNspAccessRule.Serialization.cs index 66c4db3926c7..77c455b2b489 100644 --- a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubsNspAccessRule.Serialization.cs +++ b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubsNspAccessRule.Serialization.cs @@ -20,6 +20,15 @@ public partial class EventHubsNspAccessRule : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,48 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(EventHubsNspAccessRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); writer.WriteObjectValue(Properties, options); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } EventHubsNspAccessRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubsNspAccessRuleProperties.Serialization.cs b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubsNspAccessRuleProperties.Serialization.cs index ae1bdb6b2835..5b1efb149e11 100644 --- a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubsNspAccessRuleProperties.Serialization.cs +++ b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubsNspAccessRuleProperties.Serialization.cs @@ -21,6 +21,15 @@ public partial class EventHubsNspAccessRuleProperties : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,7 +37,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(EventHubsNspAccessRuleProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Direction)) { writer.WritePropertyName("direction"u8); @@ -89,7 +97,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } EventHubsNspAccessRuleProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubsPrivateEndpointConnectionListResult.Serialization.cs b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubsPrivateEndpointConnectionListResult.Serialization.cs index 617f44e79a1b..37bb7d71c2b9 100644 --- a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubsPrivateEndpointConnectionListResult.Serialization.cs +++ b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubsPrivateEndpointConnectionListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class EventHubsPrivateEndpointConnectionListResult : IUtf8JsonS void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWrit throw new FormatException($"The model {nameof(EventHubsPrivateEndpointConnectionListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWrit #endif } } - writer.WriteEndObject(); } EventHubsPrivateEndpointConnectionListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubsPrivateLinkResourceData.Serialization.cs b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubsPrivateLinkResourceData.Serialization.cs index fa34583b9224..4213baeb924e 100644 --- a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubsPrivateLinkResourceData.Serialization.cs +++ b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubsPrivateLinkResourceData.Serialization.cs @@ -21,6 +21,15 @@ public partial class EventHubsPrivateLinkResourceData : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,27 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(EventHubsPrivateLinkResourceData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(GroupId)) @@ -77,22 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } EventHubsPrivateLinkResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubsPrivateLinkServiceConnectionState.Serialization.cs b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubsPrivateLinkServiceConnectionState.Serialization.cs index bb00bece2dc9..9c7c00437256 100644 --- a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubsPrivateLinkServiceConnectionState.Serialization.cs +++ b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubsPrivateLinkServiceConnectionState.Serialization.cs @@ -19,6 +19,15 @@ public partial class EventHubsPrivateLinkServiceConnectionState : IUtf8JsonSeria void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(EventHubsPrivateLinkServiceConnectionState)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Status)) { writer.WritePropertyName("status"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } EventHubsPrivateLinkServiceConnectionState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubsProvisioningIssue.Serialization.cs b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubsProvisioningIssue.Serialization.cs index 70991261655e..338b848898e0 100644 --- a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubsProvisioningIssue.Serialization.cs +++ b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubsProvisioningIssue.Serialization.cs @@ -19,6 +19,15 @@ public partial class EventHubsProvisioningIssue : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(EventHubsProvisioningIssue)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } EventHubsProvisioningIssue IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubsProvisioningIssueProperties.Serialization.cs b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubsProvisioningIssueProperties.Serialization.cs index 0941e019695c..c9bab0fa708a 100644 --- a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubsProvisioningIssueProperties.Serialization.cs +++ b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubsProvisioningIssueProperties.Serialization.cs @@ -19,6 +19,15 @@ public partial class EventHubsProvisioningIssueProperties : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(EventHubsProvisioningIssueProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IssueType)) { writer.WritePropertyName("issueType"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } EventHubsProvisioningIssueProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubsRegenerateAccessKeyContent.Serialization.cs b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubsRegenerateAccessKeyContent.Serialization.cs index 72bd2b754087..cadabe738502 100644 --- a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubsRegenerateAccessKeyContent.Serialization.cs +++ b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubsRegenerateAccessKeyContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class EventHubsRegenerateAccessKeyContent : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(EventHubsRegenerateAccessKeyContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("keyType"u8); writer.WriteStringValue(KeyType.ToString()); if (Optional.IsDefined(Key)) @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } EventHubsRegenerateAccessKeyContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubsSku.Serialization.cs b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubsSku.Serialization.cs index d00b1c79965f..e581ab412227 100644 --- a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubsSku.Serialization.cs +++ b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubsSku.Serialization.cs @@ -19,6 +19,15 @@ public partial class EventHubsSku : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(EventHubsSku)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name.ToString()); if (Optional.IsDefined(Tier)) @@ -54,7 +62,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti #endif } } - writer.WriteEndObject(); } EventHubsSku IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubsThrottlingPolicy.Serialization.cs b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubsThrottlingPolicy.Serialization.cs index 22537820cb7a..75b1e0260430 100644 --- a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubsThrottlingPolicy.Serialization.cs +++ b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/EventHubsThrottlingPolicy.Serialization.cs @@ -19,6 +19,15 @@ public partial class EventHubsThrottlingPolicy : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,31 +35,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(EventHubsThrottlingPolicy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("rateLimitThreshold"u8); writer.WriteNumberValue(RateLimitThreshold); writer.WritePropertyName("metricId"u8); writer.WriteStringValue(MetricId.ToString()); - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ApplicationGroupPolicyType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } EventHubsThrottlingPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/NetworkRuleSetListResult.Serialization.cs b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/NetworkRuleSetListResult.Serialization.cs index 8524ec56b81b..c3746f31519c 100644 --- a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/NetworkRuleSetListResult.Serialization.cs +++ b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/NetworkRuleSetListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class NetworkRuleSetListResult : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(NetworkRuleSetListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } NetworkRuleSetListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/NetworkSecurityPerimeterConfigurationList.Serialization.cs b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/NetworkSecurityPerimeterConfigurationList.Serialization.cs index b0a55c91bdad..70d00a44917c 100644 --- a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/NetworkSecurityPerimeterConfigurationList.Serialization.cs +++ b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/NetworkSecurityPerimeterConfigurationList.Serialization.cs @@ -20,6 +20,15 @@ internal partial class NetworkSecurityPerimeterConfigurationList : IUtf8JsonSeri void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(NetworkSecurityPerimeterConfigurationList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } NetworkSecurityPerimeterConfigurationList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/PrivateLinkResourcesListResult.Serialization.cs b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/PrivateLinkResourcesListResult.Serialization.cs index 4cfe5c4aef0b..49dd1adfbfd5 100644 --- a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/PrivateLinkResourcesListResult.Serialization.cs +++ b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/PrivateLinkResourcesListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class PrivateLinkResourcesListResult : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(PrivateLinkResourcesListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } PrivateLinkResourcesListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/RetentionDescription.Serialization.cs b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/RetentionDescription.Serialization.cs index b30b1646088f..7d2946a4f649 100644 --- a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/RetentionDescription.Serialization.cs +++ b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/RetentionDescription.Serialization.cs @@ -19,6 +19,15 @@ public partial class RetentionDescription : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(RetentionDescription)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(CleanupPolicy)) { writer.WritePropertyName("cleanupPolicy"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } RetentionDescription IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/SchemaGroupListResult.Serialization.cs b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/SchemaGroupListResult.Serialization.cs index 9bb2fa5ee8d2..a07c6c06810e 100644 --- a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/SchemaGroupListResult.Serialization.cs +++ b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/SchemaGroupListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class SchemaGroupListResult : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(SchemaGroupListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } SchemaGroupListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/UnknownApplicationGroupPolicy.Serialization.cs b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/UnknownApplicationGroupPolicy.Serialization.cs index e544fd52f605..c4b7b820b4ce 100644 --- a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/UnknownApplicationGroupPolicy.Serialization.cs +++ b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/UnknownApplicationGroupPolicy.Serialization.cs @@ -19,6 +19,15 @@ internal partial class UnknownApplicationGroupPolicy : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(EventHubsApplicationGroupPolicy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ApplicationGroupPolicyType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } EventHubsApplicationGroupPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/UserAssignedIdentityProperties.Serialization.cs b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/UserAssignedIdentityProperties.Serialization.cs index bb25aaca1d51..e52e8fad4911 100644 --- a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/UserAssignedIdentityProperties.Serialization.cs +++ b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/Models/UserAssignedIdentityProperties.Serialization.cs @@ -19,6 +19,15 @@ internal partial class UserAssignedIdentityProperties : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(UserAssignedIdentityProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(UserAssignedIdentity)) { writer.WritePropertyName("userAssignedIdentity"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } UserAssignedIdentityProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/autorest.md b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/autorest.md index 2b14f1ef8a21..a2c67313bd3a 100644 --- a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/autorest.md +++ b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/autorest.md @@ -18,6 +18,7 @@ modelerfour: flatten-payloads: false use-model-reader-writer: true enable-bicep-serialization: true +use-write-core: true #mgmt-debug: # show-serialized-names: true diff --git a/sdk/eventhub/Azure.ResourceManager.EventHubs/tests/Azure.ResourceManager.EventHubs.Tests.csproj b/sdk/eventhub/Azure.ResourceManager.EventHubs/tests/Azure.ResourceManager.EventHubs.Tests.csproj index 27a2c73367da..84468afdac39 100644 --- a/sdk/eventhub/Azure.ResourceManager.EventHubs/tests/Azure.ResourceManager.EventHubs.Tests.csproj +++ b/sdk/eventhub/Azure.ResourceManager.EventHubs/tests/Azure.ResourceManager.EventHubs.Tests.csproj @@ -6,7 +6,7 @@ - + diff --git a/sdk/eventhub/ci.yml b/sdk/eventhub/ci.yml index d17eacf2bbfb..33adf5a1c759 100644 --- a/sdk/eventhub/ci.yml +++ b/sdk/eventhub/ci.yml @@ -40,3 +40,9 @@ extends: safeName: AzureMessagingEventHubs - name: Azure.Messaging.EventHubs.Processor safeName: AzureMessagingEventHubsProcessor + CheckAotCompat: true + AOTTestInputs: + - ArtifactName: Azure.Messaging.EventHubs + ExpectedWarningsFilepath: None + - ArtifactName: Azure.Messaging.EventHubs.Processor + ExpectedWarningsFilepath: None \ No newline at end of file diff --git a/sdk/extension-wcf/tests.yml b/sdk/extension-wcf/tests.yml deleted file mode 100644 index 53fbe6244970..000000000000 --- a/sdk/extension-wcf/tests.yml +++ /dev/null @@ -1,31 +0,0 @@ -trigger: none - -extends: - template: /eng/pipelines/templates/stages/archetype-sdk-tests.yml - parameters: - ServiceDirectory: extension-wcf - BuildInParallel: true - TimeoutInMinutes: 180 - Location: canadacentral - CloudConfig: - Preview: - ServiceConnection: azure-sdk-tests-preview - SubscriptionConfigurationFilePaths: - - eng/common/TestResources/sub-config/AzurePreviewMsft.json - PrivatePreview: - SubscriptionConfiguration: $(sub-config-storage-test-resources) - Clouds: Preview - SupportedClouds: Preview, PrivatePreview - MatrixReplace: - # Use dedicated storage pool in canadacentral with higher memory capacity - - Pool=.*LINUXPOOL.*/azsdk-pool-mms-ubuntu-2004-storage - - Pool=.*WINDOWSPOOL.*/azsdk-pool-mms-win-2022-general - EnvVars: - DYLD_LIBRARY_PATH: /usr/local/opt/openssl@3/lib - ${{ if not(contains(variables['Build.DefinitionName'], 'tests-weekly')) }}: - AZURE_ONLY_TEST_LATEST_SERVICE_VERSION: true - TestSetupSteps: - - template: /sdk/storage/tests-install-azurite.yml - - bash: brew install openssl@3 - displayName: (MacOS) Install OpenSSL - condition: contains(variables['OSVmImage'], 'mac') diff --git a/sdk/fabric/Azure.ResourceManager.Fabric/api/Azure.ResourceManager.Fabric.netstandard2.0.cs b/sdk/fabric/Azure.ResourceManager.Fabric/api/Azure.ResourceManager.Fabric.netstandard2.0.cs index bf79428af9d6..dcb36b235493 100644 --- a/sdk/fabric/Azure.ResourceManager.Fabric/api/Azure.ResourceManager.Fabric.netstandard2.0.cs +++ b/sdk/fabric/Azure.ResourceManager.Fabric/api/Azure.ResourceManager.Fabric.netstandard2.0.cs @@ -22,6 +22,7 @@ public partial class FabricCapacityData : Azure.ResourceManager.Models.TrackedRe public FabricCapacityData(Azure.Core.AzureLocation location, Azure.ResourceManager.Fabric.Models.FabricCapacityProperties properties, Azure.ResourceManager.Fabric.Models.FabricSku sku) { } public Azure.ResourceManager.Fabric.Models.FabricCapacityProperties Properties { get { throw null; } set { } } public Azure.ResourceManager.Fabric.Models.FabricSku Sku { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Fabric.FabricCapacityData 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.Fabric.FabricCapacityData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -112,6 +113,7 @@ public partial class FabricCapacityAdministration : System.ClientModel.Primitive { public FabricCapacityAdministration(System.Collections.Generic.IEnumerable members) { } public System.Collections.Generic.IList Members { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Fabric.Models.FabricCapacityAdministration 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.Fabric.Models.FabricCapacityAdministration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -124,6 +126,7 @@ public FabricCapacityPatch() { } public System.Collections.Generic.IList AdministrationMembers { get { throw null; } } public Azure.ResourceManager.Fabric.Models.FabricSku Sku { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Fabric.Models.FabricCapacityPatch 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.Fabric.Models.FabricCapacityPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -136,6 +139,7 @@ public FabricCapacityProperties(Azure.ResourceManager.Fabric.Models.FabricCapaci public System.Collections.Generic.IList AdministrationMembers { get { throw null; } set { } } public Azure.ResourceManager.Fabric.Models.FabricProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.Fabric.Models.FabricResourceState? State { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Fabric.Models.FabricCapacityProperties 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.Fabric.Models.FabricCapacityProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -147,6 +151,7 @@ public partial class FabricNameAvailabilityContent : System.ClientModel.Primitiv public FabricNameAvailabilityContent() { } public string Name { get { throw null; } set { } } public string ResourceType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Fabric.Models.FabricNameAvailabilityContent 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.Fabric.Models.FabricNameAvailabilityContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -159,6 +164,7 @@ internal FabricNameAvailabilityResult() { } public bool? IsNameAvailable { get { throw null; } } public string Message { get { throw null; } } public Azure.ResourceManager.Fabric.Models.FabricNameUnavailableReason? Reason { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Fabric.Models.FabricNameAvailabilityResult 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.Fabric.Models.FabricNameAvailabilityResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -238,6 +244,7 @@ public partial class FabricSku : 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.Fabric.Models.FabricSku System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -249,6 +256,7 @@ public partial class FabricSkuDetailsForExistingCapacity : System.ClientModel.Pr internal FabricSkuDetailsForExistingCapacity() { } public string ResourceType { get { throw null; } } public Azure.ResourceManager.Fabric.Models.FabricSku Sku { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Fabric.Models.FabricSkuDetailsForExistingCapacity 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.Fabric.Models.FabricSkuDetailsForExistingCapacity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -261,6 +269,7 @@ internal FabricSkuDetailsForNewCapacity() { } public System.Collections.Generic.IReadOnlyList Locations { get { throw null; } } public string Name { get { throw null; } } public string ResourceType { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Fabric.Models.FabricSkuDetailsForNewCapacity 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.Fabric.Models.FabricSkuDetailsForNewCapacity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } diff --git a/sdk/fabric/Azure.ResourceManager.Fabric/assets.json b/sdk/fabric/Azure.ResourceManager.Fabric/assets.json index c3c46b4a847b..3cc388845072 100644 --- a/sdk/fabric/Azure.ResourceManager.Fabric/assets.json +++ b/sdk/fabric/Azure.ResourceManager.Fabric/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/fabric/Azure.ResourceManager.Fabric", - "Tag": "net/fabric/Azure.ResourceManager.Fabric_534510186b" + "Tag": "net/fabric/Azure.ResourceManager.Fabric_b752e2691a" } diff --git a/sdk/fabric/Azure.ResourceManager.Fabric/samples/Generated/Samples/Sample_FabricCapacityCollection.cs b/sdk/fabric/Azure.ResourceManager.Fabric/samples/Generated/Samples/Sample_FabricCapacityCollection.cs index 798e19a81460..b044aaf06a34 100644 --- a/sdk/fabric/Azure.ResourceManager.Fabric/samples/Generated/Samples/Sample_FabricCapacityCollection.cs +++ b/sdk/fabric/Azure.ResourceManager.Fabric/samples/Generated/Samples/Sample_FabricCapacityCollection.cs @@ -22,7 +22,7 @@ public partial class Sample_FabricCapacityCollection public async Task Get_GetACapacity() { // Generated from example definition: 2023-11-01/FabricCapacities_Get.json - // this example is just showing the usage of "FabricCapacities_Get" operation, for the dependent resources, they will have to be created separately. + // this example is just showing the usage of "FabricCapacity_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -56,7 +56,7 @@ public async Task Get_GetACapacity() public async Task Exists_GetACapacity() { // Generated from example definition: 2023-11-01/FabricCapacities_Get.json - // this example is just showing the usage of "FabricCapacities_Get" operation, for the dependent resources, they will have to be created separately. + // this example is just showing the usage of "FabricCapacity_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -86,7 +86,7 @@ public async Task Exists_GetACapacity() public async Task GetIfExists_GetACapacity() { // Generated from example definition: 2023-11-01/FabricCapacities_Get.json - // this example is just showing the usage of "FabricCapacities_Get" operation, for the dependent resources, they will have to be created separately. + // this example is just showing the usage of "FabricCapacity_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -128,7 +128,7 @@ public async Task GetIfExists_GetACapacity() public async Task CreateOrUpdate_CreateOrUpdateACapacity() { // Generated from example definition: 2023-11-01/FabricCapacities_CreateOrUpdate.json - // this example is just showing the usage of "FabricCapacities_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + // this example is just showing the usage of "FabricCapacity_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); diff --git a/sdk/fabric/Azure.ResourceManager.Fabric/samples/Generated/Samples/Sample_FabricCapacityResource.cs b/sdk/fabric/Azure.ResourceManager.Fabric/samples/Generated/Samples/Sample_FabricCapacityResource.cs index 190e042f948f..e00f07d4aa84 100644 --- a/sdk/fabric/Azure.ResourceManager.Fabric/samples/Generated/Samples/Sample_FabricCapacityResource.cs +++ b/sdk/fabric/Azure.ResourceManager.Fabric/samples/Generated/Samples/Sample_FabricCapacityResource.cs @@ -22,7 +22,7 @@ public partial class Sample_FabricCapacityResource public async Task Get_GetACapacity() { // Generated from example definition: 2023-11-01/FabricCapacities_Get.json - // this example is just showing the usage of "FabricCapacities_Get" operation, for the dependent resources, they will have to be created separately. + // this example is just showing the usage of "FabricCapacity_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -53,7 +53,7 @@ public async Task Get_GetACapacity() public async Task Update_UpdateCapacityProperties() { // Generated from example definition: 2023-11-01/FabricCapacities_Update.json - // this example is just showing the usage of "FabricCapacities_Update" operation, for the dependent resources, they will have to be created separately. + // this example is just showing the usage of "FabricCapacity_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -97,7 +97,7 @@ public async Task Update_UpdateCapacityProperties() public async Task Delete_DeleteACapacity() { // Generated from example definition: 2023-11-01/FabricCapacities_Delete.json - // this example is just showing the usage of "FabricCapacities_Delete" operation, for the dependent resources, they will have to be created separately. + // this example is just showing the usage of "FabricCapacity_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); diff --git a/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Extensions/FabricExtensions.cs b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Extensions/FabricExtensions.cs index c84b2defd5ab..ed974a30caaf 100644 --- a/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Extensions/FabricExtensions.cs +++ b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Extensions/FabricExtensions.cs @@ -78,7 +78,7 @@ public static FabricCapacityCollection GetFabricCapacities(this ResourceGroupRes /// /// /// Operation Id - /// FabricCapacities_Get + /// FabricCapacity_Get /// /// /// Default Api Version @@ -116,7 +116,7 @@ public static async Task> GetFabricCapacityAsyn /// /// /// Operation Id - /// FabricCapacities_Get + /// FabricCapacity_Get /// /// /// Default Api Version diff --git a/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Extensions/MockableFabricResourceGroupResource.cs b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Extensions/MockableFabricResourceGroupResource.cs index 714f57ccf218..889c9fd5efe8 100644 --- a/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Extensions/MockableFabricResourceGroupResource.cs +++ b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Extensions/MockableFabricResourceGroupResource.cs @@ -49,7 +49,7 @@ public virtual FabricCapacityCollection GetFabricCapacities() /// /// /// Operation Id - /// FabricCapacities_Get + /// FabricCapacity_Get /// /// /// Default Api Version @@ -80,7 +80,7 @@ public virtual async Task> GetFabricCapacityAsy /// /// /// Operation Id - /// FabricCapacities_Get + /// FabricCapacity_Get /// /// /// Default Api Version diff --git a/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/FabricCapacityCollection.cs b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/FabricCapacityCollection.cs index 84a48d56d1ff..db3ef094894a 100644 --- a/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/FabricCapacityCollection.cs +++ b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/FabricCapacityCollection.cs @@ -61,7 +61,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id - /// FabricCapacities_CreateOrUpdate + /// FabricCapacity_CreateOrUpdate /// /// /// Default Api Version @@ -110,7 +110,7 @@ public virtual async Task> CreateOrUpdateAs /// /// /// Operation Id - /// FabricCapacities_CreateOrUpdate + /// FabricCapacity_CreateOrUpdate /// /// /// Default Api Version @@ -159,7 +159,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wai /// /// /// Operation Id - /// FabricCapacities_Get + /// FabricCapacity_Get /// /// /// Default Api Version @@ -204,7 +204,7 @@ public virtual async Task> GetAsync(string capa /// /// /// Operation Id - /// FabricCapacities_Get + /// FabricCapacity_Get /// /// /// Default Api Version @@ -309,7 +309,7 @@ public virtual Pageable GetAll(CancellationToken cancell /// /// /// Operation Id - /// FabricCapacities_Get + /// FabricCapacity_Get /// /// /// Default Api Version @@ -352,7 +352,7 @@ public virtual async Task> ExistsAsync(string capacityName, Cance /// /// /// Operation Id - /// FabricCapacities_Get + /// FabricCapacity_Get /// /// /// Default Api Version @@ -395,7 +395,7 @@ public virtual Response Exists(string capacityName, CancellationToken canc /// /// /// Operation Id - /// FabricCapacities_Get + /// FabricCapacity_Get /// /// /// Default Api Version @@ -440,7 +440,7 @@ public virtual async Task> GetIfExistsA /// /// /// Operation Id - /// FabricCapacities_Get + /// FabricCapacity_Get /// /// /// Default Api Version diff --git a/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/FabricCapacityData.Serialization.cs b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/FabricCapacityData.Serialization.cs index e91f40c85251..19036f77d3de 100644 --- a/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/FabricCapacityData.Serialization.cs +++ b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/FabricCapacityData.Serialization.cs @@ -20,6 +20,15 @@ public partial class FabricCapacityData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,60 +36,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(FabricCapacityData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteObjectValue(Properties, options); writer.WritePropertyName("sku"u8); writer.WriteObjectValue(Sku, options); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } FabricCapacityData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/FabricCapacityResource.cs b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/FabricCapacityResource.cs index a1815213478e..646a5cf80b01 100644 --- a/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/FabricCapacityResource.cs +++ b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/FabricCapacityResource.cs @@ -100,7 +100,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id - /// FabricCapacities_Get + /// FabricCapacity_Get /// /// /// Default Api Version @@ -140,7 +140,7 @@ public virtual async Task> GetAsync(Cancellatio /// /// /// Operation Id - /// FabricCapacities_Get + /// FabricCapacity_Get /// /// /// Default Api Version @@ -180,7 +180,7 @@ public virtual Response Get(CancellationToken cancellati /// /// /// Operation Id - /// FabricCapacities_Delete + /// FabricCapacity_Delete /// /// /// Default Api Version @@ -222,7 +222,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Operation Id - /// FabricCapacities_Delete + /// FabricCapacity_Delete /// /// /// Default Api Version @@ -264,7 +264,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Operation Id - /// FabricCapacities_Update + /// FabricCapacity_Update /// /// /// Default Api Version @@ -310,7 +310,7 @@ public virtual async Task> UpdateAsync(Wait /// /// /// Operation Id - /// FabricCapacities_Update + /// FabricCapacity_Update /// /// /// Default Api Version @@ -584,7 +584,7 @@ public virtual Pageable GetSkusForCapacity( /// /// /// Operation Id - /// FabricCapacities_Get + /// FabricCapacity_Get /// /// /// Default Api Version @@ -646,7 +646,7 @@ public virtual async Task> AddTagAsync(string k /// /// /// Operation Id - /// FabricCapacities_Get + /// FabricCapacity_Get /// /// /// Default Api Version @@ -708,7 +708,7 @@ public virtual Response AddTag(string key, string value, /// /// /// Operation Id - /// FabricCapacities_Get + /// FabricCapacity_Get /// /// /// Default Api Version @@ -765,7 +765,7 @@ public virtual async Task> SetTagsAsync(IDictio /// /// /// Operation Id - /// FabricCapacities_Get + /// FabricCapacity_Get /// /// /// Default Api Version @@ -822,7 +822,7 @@ public virtual Response SetTags(IDictionary /// /// Operation Id - /// FabricCapacities_Get + /// FabricCapacity_Get /// /// /// Default Api Version @@ -882,7 +882,7 @@ public virtual async Task> RemoveTagAsync(strin /// /// /// Operation Id - /// FabricCapacities_Get + /// FabricCapacity_Get /// /// /// Default Api Version diff --git a/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/FabricCapacityAdministration.Serialization.cs b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/FabricCapacityAdministration.Serialization.cs index 1cb046e48eca..98592a37013b 100644 --- a/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/FabricCapacityAdministration.Serialization.cs +++ b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/FabricCapacityAdministration.Serialization.cs @@ -18,6 +18,15 @@ public partial class FabricCapacityAdministration : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(FabricCapacityAdministration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("members"u8); writer.WriteStartArray(); foreach (var item in Members) @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } FabricCapacityAdministration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/FabricCapacityListResult.Serialization.cs b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/FabricCapacityListResult.Serialization.cs index bccd53b92842..c5a9015a3824 100644 --- a/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/FabricCapacityListResult.Serialization.cs +++ b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/FabricCapacityListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class FabricCapacityListResult : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(FabricCapacityListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } FabricCapacityListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/FabricCapacityPatch.Serialization.cs b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/FabricCapacityPatch.Serialization.cs index f0b2dc018e88..462bc4bf56f1 100644 --- a/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/FabricCapacityPatch.Serialization.cs +++ b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/FabricCapacityPatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class FabricCapacityPatch : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(FabricCapacityPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Sku)) { writer.WritePropertyName("sku"u8); @@ -62,7 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } FabricCapacityPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/FabricCapacityProperties.Serialization.cs b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/FabricCapacityProperties.Serialization.cs index 39710deaff0e..69159aea4ecd 100644 --- a/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/FabricCapacityProperties.Serialization.cs +++ b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/FabricCapacityProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class FabricCapacityProperties : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(FabricCapacityProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) { writer.WritePropertyName("provisioningState"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } FabricCapacityProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/FabricCapacityUpdateProperties.Serialization.cs b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/FabricCapacityUpdateProperties.Serialization.cs index 9a303843fe28..bea667801961 100644 --- a/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/FabricCapacityUpdateProperties.Serialization.cs +++ b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/FabricCapacityUpdateProperties.Serialization.cs @@ -18,6 +18,15 @@ internal partial class FabricCapacityUpdateProperties : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(FabricCapacityUpdateProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Administration)) { writer.WritePropertyName("administration"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } FabricCapacityUpdateProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/FabricNameAvailabilityContent.Serialization.cs b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/FabricNameAvailabilityContent.Serialization.cs index e721dc3f6603..a6f5b87e0f86 100644 --- a/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/FabricNameAvailabilityContent.Serialization.cs +++ b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/FabricNameAvailabilityContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class FabricNameAvailabilityContent : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(FabricNameAvailabilityContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } FabricNameAvailabilityContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/FabricNameAvailabilityResult.Serialization.cs b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/FabricNameAvailabilityResult.Serialization.cs index aca8cb51ea55..5fdc3a9f6013 100644 --- a/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/FabricNameAvailabilityResult.Serialization.cs +++ b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/FabricNameAvailabilityResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class FabricNameAvailabilityResult : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(FabricNameAvailabilityResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IsNameAvailable)) { writer.WritePropertyName("nameAvailable"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } FabricNameAvailabilityResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/FabricSku.Serialization.cs b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/FabricSku.Serialization.cs index 926eb2f4a52a..dbc3919d5ffd 100644 --- a/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/FabricSku.Serialization.cs +++ b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/FabricSku.Serialization.cs @@ -18,6 +18,15 @@ public partial class FabricSku : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions throw new FormatException($"The model {nameof(FabricSku)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); writer.WritePropertyName("tier"u8); @@ -45,7 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions #endif } } - writer.WriteEndObject(); } FabricSku IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/FabricSkuDetailsForExistingCapacity.Serialization.cs b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/FabricSkuDetailsForExistingCapacity.Serialization.cs index fd454e930dd3..b6d9abf1d7fe 100644 --- a/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/FabricSkuDetailsForExistingCapacity.Serialization.cs +++ b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/FabricSkuDetailsForExistingCapacity.Serialization.cs @@ -18,6 +18,15 @@ public partial class FabricSkuDetailsForExistingCapacity : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(FabricSkuDetailsForExistingCapacity)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("resourceType"u8); writer.WriteStringValue(ResourceType); writer.WritePropertyName("sku"u8); @@ -45,7 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } FabricSkuDetailsForExistingCapacity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/FabricSkuDetailsForNewCapacity.Serialization.cs b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/FabricSkuDetailsForNewCapacity.Serialization.cs index d89ffaa65580..4c587c23347a 100644 --- a/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/FabricSkuDetailsForNewCapacity.Serialization.cs +++ b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/FabricSkuDetailsForNewCapacity.Serialization.cs @@ -18,6 +18,15 @@ public partial class FabricSkuDetailsForNewCapacity : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(FabricSkuDetailsForNewCapacity)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("resourceType"u8); writer.WriteStringValue(ResourceType); writer.WritePropertyName("name"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } FabricSkuDetailsForNewCapacity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/RpSkuEnumerationForExistingResourceResult.Serialization.cs b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/RpSkuEnumerationForExistingResourceResult.Serialization.cs index f16c83c65fae..0ed7a81f5160 100644 --- a/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/RpSkuEnumerationForExistingResourceResult.Serialization.cs +++ b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/RpSkuEnumerationForExistingResourceResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class RpSkuEnumerationForExistingResourceResult : IUtf8JsonSeri void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(RpSkuEnumerationForExistingResourceResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } RpSkuEnumerationForExistingResourceResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/RpSkuEnumerationForNewResourceResult.Serialization.cs b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/RpSkuEnumerationForNewResourceResult.Serialization.cs index 95453a73fdd8..5705868116f5 100644 --- a/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/RpSkuEnumerationForNewResourceResult.Serialization.cs +++ b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/RpSkuEnumerationForNewResourceResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class RpSkuEnumerationForNewResourceResult : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(RpSkuEnumerationForNewResourceResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } RpSkuEnumerationForNewResourceResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/RestOperations/FabricCapacitiesRestOperations.cs b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/RestOperations/FabricCapacitiesRestOperations.cs index 92f198ab1e48..d1d4d7df75cd 100644 --- a/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/RestOperations/FabricCapacitiesRestOperations.cs +++ b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/RestOperations/FabricCapacitiesRestOperations.cs @@ -25,7 +25,7 @@ internal partial class FabricCapacitiesRestOperations /// Initializes a new instance of FabricCapacitiesRestOperations. /// The HTTP pipeline for sending and receiving REST requests and responses. /// The application id to use for user agent. - /// The to use. + /// Service host. /// The API version to use for this operation. /// or is null. public FabricCapacitiesRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) diff --git a/sdk/face/Azure.AI.Vision.Face/CHANGELOG.md b/sdk/face/Azure.AI.Vision.Face/CHANGELOG.md index d6f4e1c0204c..4ab0cb342b4e 100644 --- a/sdk/face/Azure.AI.Vision.Face/CHANGELOG.md +++ b/sdk/face/Azure.AI.Vision.Face/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 1.0.0-beta.2 (Unreleased) +## 1.0.0-beta.3 (Unreleased) ### Features Added @@ -10,6 +10,29 @@ ### Other Changes +## 1.0.0-beta.2 (2024-10-23) + +- Added support for the Large Face List and Large Person Group: + - Added client `LargeFaceListClient` and `LargePersonGroupClient`. + - Added operations `FindSimilarFromLargeFaceList`, `IdentifyFromLargePersonGroup` and `VerifyFromLargePersonGroup` to `FaceClient`. + - Added models for supporting Large Face List and Large Person Group. +- Added support for latest Detect Liveness Session API: + - Added operations `GetSessionImage` and `DetectFromSessionImage` to `FaceSessionClient`. + - Added properties `EnableSessionImage ` and `LivenessSingleModalModel` to model `CreateLivenessSessionContent`. + - Added model `CreateLivenessWithVerifySessionContent`. + +### Breaking Changes + +- Changed the parameter of `CreateLivenessWithVerifySession` from model `CreateLivenessSessionContent` to `CreateLivenessWithVerifySessionContent`. + +### Bugs Fixed + +- Remove `Mask` from `FaceAsttributes.Detection01`, which is not supported. + +### Other Changes + +- Change the default service API version to `v1.2-preview.1`. + ## 1.0.0-beta.1 (2024-05-27) This is the first preview Azure AI Face client library that follows the [.NET Azure SDK Design Guidelines](https://azure.github.io/azure-sdk/dotnet_introduction.html). diff --git a/sdk/face/Azure.AI.Vision.Face/README.md b/sdk/face/Azure.AI.Vision.Face/README.md index 9fc534e3991f..aa672c377782 100644 --- a/sdk/face/Azure.AI.Vision.Face/README.md +++ b/sdk/face/Azure.AI.Vision.Face/README.md @@ -6,6 +6,7 @@ The Azure AI Face service provides AI algorithms that detect, recognize, and ana - Liveness detection - Face recognition - Face verification ("one-to-one" matching) + - Face identification ("one-to-many" matching) - Find similar faces - Group faces @@ -97,6 +98,28 @@ AzureKeyCredential credential = new AzureKeyCredential(""); var client = new FaceClient(endpoint, credential); ``` +### Service API versions + +The client library targets the latest service API version by default. A client instance accepts an optional service API version parameter from its options to specify which API version service to communicate. + +#### Select a service API version + +You have the flexibility to explicitly select a supported service API version when instantiating a client by configuring its associated options. This ensures that the client can communicate with services using the specified API version. + +For example, + +```C# Snippet:CreateFaceClientWithVersion +Uri endpoint = new Uri(""); +DefaultAzureCredential credential = new DefaultAzureCredential(); +AzureAIVisionFaceClientOptions options = new AzureAIVisionFaceClientOptions(AzureAIVisionFaceClientOptions.ServiceVersion.V1_2_Preview_1); +FaceClient client = new FaceClient(endpoint, credential, options); +``` + +When selecting an API version, it's important to verify that there are no breaking changes compared to the latest API version. If there are significant differences, API calls may fail due to incompatibility. + +Always ensure that the chosen API version is fully supported and operational for your specific use case and that it aligns with the service's versioning policy. + + ## Key concepts ### FaceClient @@ -104,11 +127,18 @@ var client = new FaceClient(endpoint, credential); `FaceClient` provides operations for: - Face detection and analysis: Detect human faces in an image and return the rectangle coordinates of their locations, and optionally with landmarks, and face-related attributes. This operation is required as a first step in all the other face recognition scenarios. -- Face recognition: Confirm that a user is who they claim to be based on how closely their face data matches the target face. - Support Face verification ("one-to-one" matching). +- Face recognition: Confirm that a user is who they claim to be based on how closely their face data matches the target face. It includes Face verification ("one-to-one" matching) and Face identification ("one-to-many" matching). - Finding similar faces from a smaller set of faces that look similar to the target face. - Grouping faces into several smaller groups based on similarity. +### FaceAdministrationClient + +`FaceAdministrationClient` is provided to interact with the following data structures that hold data on faces and +persons for Face recognition: + +- LargeFaceList +- LargePersonGroup + ### FaceSessionClient `FaceSessionClient` is provided to interact with sessions which is used for Liveness detection. @@ -163,7 +193,7 @@ foreach (var detectedFace in detectedFaces) { Console.WriteLine($"Face Rectangle: left={detectedFace.FaceRectangle.Left}, top={detectedFace.FaceRectangle.Top}, width={detectedFace.FaceRectangle.Width}, height={detectedFace.FaceRectangle.Height}"); Console.WriteLine($"Head pose: pitch={detectedFace.FaceAttributes.HeadPose.Pitch}, roll={detectedFace.FaceAttributes.HeadPose.Roll}, yaw={detectedFace.FaceAttributes.HeadPose.Yaw}"); - Console.WriteLine($"Mask: {detectedFace.FaceAttributes.Mask}"); + Console.WriteLine($"Mask: NoseAndMouthCovered={detectedFace.FaceAttributes.Mask.NoseAndMouthCovered}, Type={detectedFace.FaceAttributes.Mask.Type}"); Console.WriteLine($"Quality: {detectedFace.FaceAttributes.QualityForRecognition}"); Console.WriteLine($"Recognition model: {detectedFace.RecognitionModel}"); Console.WriteLine($"Landmarks: "); diff --git a/sdk/face/Azure.AI.Vision.Face/api/Azure.AI.Vision.Face.netstandard2.0.cs b/sdk/face/Azure.AI.Vision.Face/api/Azure.AI.Vision.Face.netstandard2.0.cs index b437cafe7b63..b929533c8f99 100644 --- a/sdk/face/Azure.AI.Vision.Face/api/Azure.AI.Vision.Face.netstandard2.0.cs +++ b/sdk/face/Azure.AI.Vision.Face/api/Azure.AI.Vision.Face.netstandard2.0.cs @@ -30,32 +30,53 @@ internal AccessoryItem() { } public static bool operator !=(Azure.AI.Vision.Face.AccessoryType left, Azure.AI.Vision.Face.AccessoryType right) { throw null; } public override string ToString() { throw null; } } + public partial class AddFaceResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AddFaceResult() { } + public System.Guid PersistedFaceId { get { throw null; } } + Azure.AI.Vision.Face.AddFaceResult 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.AI.Vision.Face.AddFaceResult 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 static partial class AIVisionFaceModelFactory { public static Azure.AI.Vision.Face.AccessoryItem AccessoryItem(Azure.AI.Vision.Face.AccessoryType type = default(Azure.AI.Vision.Face.AccessoryType), float confidence = 0f) { throw null; } + public static Azure.AI.Vision.Face.AddFaceResult AddFaceResult(System.Guid persistedFaceId = default(System.Guid)) { throw null; } public static Azure.AI.Vision.Face.AuditLivenessResponseInfo AuditLivenessResponseInfo(Azure.AI.Vision.Face.LivenessResponseBody body = null, int statusCode = 0, long latencyInMilliseconds = (long)0) { throw null; } public static Azure.AI.Vision.Face.AuditRequestInfo AuditRequestInfo(string url = null, string method = null, long? contentLength = default(long?), string contentType = null, string userAgent = null) { throw null; } public static Azure.AI.Vision.Face.BlurProperties BlurProperties(Azure.AI.Vision.Face.BlurLevel blurLevel = default(Azure.AI.Vision.Face.BlurLevel), float value = 0f) { throw null; } - public static Azure.AI.Vision.Face.CreateLivenessSessionContent CreateLivenessSessionContent(Azure.AI.Vision.Face.LivenessOperationMode livenessOperationMode = default(Azure.AI.Vision.Face.LivenessOperationMode), bool? sendResultsToClient = default(bool?), bool? deviceCorrelationIdSetInClient = default(bool?), string deviceCorrelationId = null, int? authTokenTimeToLiveInSeconds = default(int?)) { throw null; } + public static Azure.AI.Vision.Face.CreateLivenessSessionContent CreateLivenessSessionContent(Azure.AI.Vision.Face.LivenessOperationMode livenessOperationMode = default(Azure.AI.Vision.Face.LivenessOperationMode), bool? sendResultsToClient = default(bool?), bool? deviceCorrelationIdSetInClient = default(bool?), bool? enableSessionImage = default(bool?), Azure.AI.Vision.Face.LivenessModel? livenessSingleModalModel = default(Azure.AI.Vision.Face.LivenessModel?), string deviceCorrelationId = null, int? authTokenTimeToLiveInSeconds = default(int?)) { throw null; } public static Azure.AI.Vision.Face.CreateLivenessSessionResult CreateLivenessSessionResult(string sessionId = null, string authToken = null) { throw null; } + public static Azure.AI.Vision.Face.CreateLivenessWithVerifySessionContent CreateLivenessWithVerifySessionContent(Azure.AI.Vision.Face.LivenessOperationMode livenessOperationMode = default(Azure.AI.Vision.Face.LivenessOperationMode), bool? sendResultsToClient = default(bool?), bool? deviceCorrelationIdSetInClient = default(bool?), bool? enableSessionImage = default(bool?), Azure.AI.Vision.Face.LivenessModel? livenessSingleModalModel = default(Azure.AI.Vision.Face.LivenessModel?), string deviceCorrelationId = null, int? authTokenTimeToLiveInSeconds = default(int?), bool? returnVerifyImageHash = default(bool?), float? verifyConfidenceThreshold = default(float?)) { throw null; } public static Azure.AI.Vision.Face.CreateLivenessWithVerifySessionResult CreateLivenessWithVerifySessionResult(string sessionId = null, string authToken = null, Azure.AI.Vision.Face.LivenessWithVerifyImage verifyImage = null) { throw null; } + public static Azure.AI.Vision.Face.CreatePersonResult CreatePersonResult(System.Guid personId = default(System.Guid)) { throw null; } public static Azure.AI.Vision.Face.ExposureProperties ExposureProperties(Azure.AI.Vision.Face.ExposureLevel exposureLevel = default(Azure.AI.Vision.Face.ExposureLevel), float value = 0f) { throw null; } public static Azure.AI.Vision.Face.FaceAttributes FaceAttributes(float? age = default(float?), float? smile = default(float?), Azure.AI.Vision.Face.FacialHair facialHair = null, Azure.AI.Vision.Face.GlassesType? glasses = default(Azure.AI.Vision.Face.GlassesType?), Azure.AI.Vision.Face.HeadPose headPose = null, Azure.AI.Vision.Face.HairProperties hair = null, Azure.AI.Vision.Face.OcclusionProperties occlusion = null, System.Collections.Generic.IEnumerable accessories = null, Azure.AI.Vision.Face.BlurProperties blur = null, Azure.AI.Vision.Face.ExposureProperties exposure = null, Azure.AI.Vision.Face.NoiseProperties noise = null, Azure.AI.Vision.Face.MaskProperties mask = null, Azure.AI.Vision.Face.QualityForRecognition? qualityForRecognition = default(Azure.AI.Vision.Face.QualityForRecognition?)) { throw null; } public static Azure.AI.Vision.Face.FaceDetectionResult FaceDetectionResult(System.Guid? faceId = default(System.Guid?), Azure.AI.Vision.Face.FaceRecognitionModel? recognitionModel = default(Azure.AI.Vision.Face.FaceRecognitionModel?), Azure.AI.Vision.Face.FaceRectangle faceRectangle = null, Azure.AI.Vision.Face.FaceLandmarks faceLandmarks = null, Azure.AI.Vision.Face.FaceAttributes faceAttributes = null) { throw null; } public static Azure.AI.Vision.Face.FaceFindSimilarResult FaceFindSimilarResult(float confidence = 0f, System.Guid? faceId = default(System.Guid?), System.Guid? persistedFaceId = default(System.Guid?)) { throw null; } public static Azure.AI.Vision.Face.FaceGroupingResult FaceGroupingResult(System.Collections.Generic.IEnumerable> groups = null, System.Collections.Generic.IEnumerable messyGroup = null) { throw null; } + public static Azure.AI.Vision.Face.FaceIdentificationCandidate FaceIdentificationCandidate(System.Guid personId = default(System.Guid), float confidence = 0f) { throw null; } + public static Azure.AI.Vision.Face.FaceIdentificationResult FaceIdentificationResult(System.Guid faceId = default(System.Guid), System.Collections.Generic.IEnumerable candidates = null) { throw null; } public static Azure.AI.Vision.Face.FaceLandmarks FaceLandmarks(Azure.AI.Vision.Face.LandmarkCoordinate pupilLeft = null, Azure.AI.Vision.Face.LandmarkCoordinate pupilRight = null, Azure.AI.Vision.Face.LandmarkCoordinate noseTip = null, Azure.AI.Vision.Face.LandmarkCoordinate mouthLeft = null, Azure.AI.Vision.Face.LandmarkCoordinate mouthRight = null, Azure.AI.Vision.Face.LandmarkCoordinate eyebrowLeftOuter = null, Azure.AI.Vision.Face.LandmarkCoordinate eyebrowLeftInner = null, Azure.AI.Vision.Face.LandmarkCoordinate eyeLeftOuter = null, Azure.AI.Vision.Face.LandmarkCoordinate eyeLeftTop = null, Azure.AI.Vision.Face.LandmarkCoordinate eyeLeftBottom = null, Azure.AI.Vision.Face.LandmarkCoordinate eyeLeftInner = null, Azure.AI.Vision.Face.LandmarkCoordinate eyebrowRightInner = null, Azure.AI.Vision.Face.LandmarkCoordinate eyebrowRightOuter = null, Azure.AI.Vision.Face.LandmarkCoordinate eyeRightInner = null, Azure.AI.Vision.Face.LandmarkCoordinate eyeRightTop = null, Azure.AI.Vision.Face.LandmarkCoordinate eyeRightBottom = null, Azure.AI.Vision.Face.LandmarkCoordinate eyeRightOuter = null, Azure.AI.Vision.Face.LandmarkCoordinate noseRootLeft = null, Azure.AI.Vision.Face.LandmarkCoordinate noseRootRight = null, Azure.AI.Vision.Face.LandmarkCoordinate noseLeftAlarTop = null, Azure.AI.Vision.Face.LandmarkCoordinate noseRightAlarTop = null, Azure.AI.Vision.Face.LandmarkCoordinate noseLeftAlarOutTip = null, Azure.AI.Vision.Face.LandmarkCoordinate noseRightAlarOutTip = null, Azure.AI.Vision.Face.LandmarkCoordinate upperLipTop = null, Azure.AI.Vision.Face.LandmarkCoordinate upperLipBottom = null, Azure.AI.Vision.Face.LandmarkCoordinate underLipTop = null, Azure.AI.Vision.Face.LandmarkCoordinate underLipBottom = null) { throw null; } public static Azure.AI.Vision.Face.FaceRectangle FaceRectangle(int top = 0, int left = 0, int width = 0, int height = 0) { throw null; } + public static Azure.AI.Vision.Face.FaceTrainingResult FaceTrainingResult(Azure.AI.Vision.Face.FaceOperationStatus status = default(Azure.AI.Vision.Face.FaceOperationStatus), System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastActionDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastSuccessfulTrainingDateTime = default(System.DateTimeOffset), string message = null) { throw null; } public static Azure.AI.Vision.Face.FaceVerificationResult FaceVerificationResult(bool isIdentical = false, float confidence = 0f) { throw null; } public static Azure.AI.Vision.Face.FacialHair FacialHair(float moustache = 0f, float beard = 0f, float sideburns = 0f) { throw null; } public static Azure.AI.Vision.Face.HairColor HairColor(Azure.AI.Vision.Face.HairColorType color = default(Azure.AI.Vision.Face.HairColorType), float confidence = 0f) { throw null; } public static Azure.AI.Vision.Face.HairProperties HairProperties(float bald = 0f, bool invisible = false, System.Collections.Generic.IEnumerable hairColor = null) { throw null; } public static Azure.AI.Vision.Face.HeadPose HeadPose(float pitch = 0f, float roll = 0f, float yaw = 0f) { throw null; } public static Azure.AI.Vision.Face.LandmarkCoordinate LandmarkCoordinate(float x = 0f, float y = 0f) { throw null; } + public static Azure.AI.Vision.Face.LargeFaceList LargeFaceList(string name = null, string userData = null, Azure.AI.Vision.Face.FaceRecognitionModel? recognitionModel = default(Azure.AI.Vision.Face.FaceRecognitionModel?), string largeFaceListId = null) { throw null; } + public static Azure.AI.Vision.Face.LargeFaceListFace LargeFaceListFace(System.Guid persistedFaceId = default(System.Guid), string userData = null) { throw null; } + public static Azure.AI.Vision.Face.LargePersonGroup LargePersonGroup(string name = null, string userData = null, Azure.AI.Vision.Face.FaceRecognitionModel? recognitionModel = default(Azure.AI.Vision.Face.FaceRecognitionModel?), string largePersonGroupId = null) { throw null; } + public static Azure.AI.Vision.Face.LargePersonGroupPerson LargePersonGroupPerson(System.Guid personId = default(System.Guid), string name = null, string userData = null, System.Collections.Generic.IEnumerable persistedFaceIds = null) { throw null; } + public static Azure.AI.Vision.Face.LargePersonGroupPersonFace LargePersonGroupPersonFace(System.Guid persistedFaceId = default(System.Guid), string userData = null) { throw null; } public static Azure.AI.Vision.Face.LivenessOutputsTarget LivenessOutputsTarget(Azure.AI.Vision.Face.FaceRectangle faceRectangle = null, string fileName = null, int timeOffsetWithinFile = 0, Azure.AI.Vision.Face.FaceImageType imageType = default(Azure.AI.Vision.Face.FaceImageType)) { throw null; } public static Azure.AI.Vision.Face.LivenessResponseBody LivenessResponseBody(Azure.AI.Vision.Face.FaceLivenessDecision? livenessDecision = default(Azure.AI.Vision.Face.FaceLivenessDecision?), Azure.AI.Vision.Face.LivenessOutputsTarget target = null, Azure.AI.Vision.Face.LivenessModel? modelVersionUsed = default(Azure.AI.Vision.Face.LivenessModel?), Azure.AI.Vision.Face.LivenessWithVerifyOutputs verifyResult = null, System.Collections.Generic.IReadOnlyDictionary additionalProperties = null) { throw null; } public static Azure.AI.Vision.Face.LivenessSession LivenessSession(string id = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset? sessionStartDateTime = default(System.DateTimeOffset?), bool sessionExpired = false, string deviceCorrelationId = null, int? authTokenTimeToLiveInSeconds = default(int?), Azure.AI.Vision.Face.FaceSessionStatus status = default(Azure.AI.Vision.Face.FaceSessionStatus), Azure.AI.Vision.Face.LivenessSessionAuditEntry result = null) { throw null; } - public static Azure.AI.Vision.Face.LivenessSessionAuditEntry LivenessSessionAuditEntry(long id = (long)0, string sessionId = null, string requestId = null, string clientRequestId = null, System.DateTimeOffset receivedDateTime = default(System.DateTimeOffset), Azure.AI.Vision.Face.AuditRequestInfo request = null, Azure.AI.Vision.Face.AuditLivenessResponseInfo response = null, string digest = null) { throw null; } + public static Azure.AI.Vision.Face.LivenessSessionAuditEntry LivenessSessionAuditEntry(long id = (long)0, string sessionId = null, string requestId = null, string clientRequestId = null, System.DateTimeOffset receivedDateTime = default(System.DateTimeOffset), Azure.AI.Vision.Face.AuditRequestInfo request = null, Azure.AI.Vision.Face.AuditLivenessResponseInfo response = null, string digest = null, string sessionImageId = null, string verifyImageHash = null) { throw null; } public static Azure.AI.Vision.Face.LivenessSessionItem LivenessSessionItem(string id = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset? sessionStartDateTime = default(System.DateTimeOffset?), bool sessionExpired = false, string deviceCorrelationId = null, int? authTokenTimeToLiveInSeconds = default(int?)) { throw null; } public static Azure.AI.Vision.Face.LivenessWithVerifyImage LivenessWithVerifyImage(Azure.AI.Vision.Face.FaceRectangle faceRectangle = null, Azure.AI.Vision.Face.QualityForRecognition qualityForRecognition = default(Azure.AI.Vision.Face.QualityForRecognition)) { throw null; } public static Azure.AI.Vision.Face.LivenessWithVerifyOutputs LivenessWithVerifyOutputs(Azure.AI.Vision.Face.LivenessWithVerifyImage verifyImage = null, float matchConfidence = 0f, bool isIdentical = false) { throw null; } @@ -92,10 +113,11 @@ internal AuditRequestInfo() { } } public partial class AzureAIVisionFaceClientOptions : Azure.Core.ClientOptions { - public AzureAIVisionFaceClientOptions(Azure.AI.Vision.Face.AzureAIVisionFaceClientOptions.ServiceVersion version = Azure.AI.Vision.Face.AzureAIVisionFaceClientOptions.ServiceVersion.V1_1_Preview_1) { } + public AzureAIVisionFaceClientOptions(Azure.AI.Vision.Face.AzureAIVisionFaceClientOptions.ServiceVersion version = Azure.AI.Vision.Face.AzureAIVisionFaceClientOptions.ServiceVersion.V1_2_Preview_1) { } public enum ServiceVersion { V1_1_Preview_1 = 1, + V1_2_Preview_1 = 2, } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] @@ -134,7 +156,9 @@ public CreateLivenessSessionContent(Azure.AI.Vision.Face.LivenessOperationMode l public int? AuthTokenTimeToLiveInSeconds { get { throw null; } set { } } public string DeviceCorrelationId { get { throw null; } set { } } public bool? DeviceCorrelationIdSetInClient { get { throw null; } set { } } + public bool? EnableSessionImage { get { throw null; } set { } } public Azure.AI.Vision.Face.LivenessOperationMode LivenessOperationMode { get { throw null; } } + public Azure.AI.Vision.Face.LivenessModel? LivenessSingleModalModel { get { throw null; } set { } } public bool? SendResultsToClient { get { throw null; } set { } } Azure.AI.Vision.Face.CreateLivenessSessionContent 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) { } @@ -153,6 +177,24 @@ internal CreateLivenessSessionResult() { } 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 CreateLivenessWithVerifySessionContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public CreateLivenessWithVerifySessionContent(Azure.AI.Vision.Face.LivenessOperationMode livenessOperationMode) { } + public int? AuthTokenTimeToLiveInSeconds { get { throw null; } set { } } + public string DeviceCorrelationId { get { throw null; } set { } } + public bool? DeviceCorrelationIdSetInClient { get { throw null; } set { } } + public bool? EnableSessionImage { get { throw null; } set { } } + public Azure.AI.Vision.Face.LivenessOperationMode LivenessOperationMode { get { throw null; } } + public Azure.AI.Vision.Face.LivenessModel? LivenessSingleModalModel { get { throw null; } set { } } + public bool? ReturnVerifyImageHash { get { throw null; } set { } } + public bool? SendResultsToClient { get { throw null; } set { } } + public float? VerifyConfidenceThreshold { get { throw null; } set { } } + Azure.AI.Vision.Face.CreateLivenessWithVerifySessionContent 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.AI.Vision.Face.CreateLivenessWithVerifySessionContent 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 partial class CreateLivenessWithVerifySessionResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal CreateLivenessWithVerifySessionResult() { } @@ -165,6 +207,16 @@ internal CreateLivenessWithVerifySessionResult() { } 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 CreatePersonResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal CreatePersonResult() { } + public System.Guid PersonId { get { throw null; } } + Azure.AI.Vision.Face.CreatePersonResult 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.AI.Vision.Face.CreatePersonResult 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; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct ExposureLevel : System.IEquatable { @@ -195,6 +247,17 @@ internal ExposureProperties() { } 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 FaceAdministrationClient + { + protected FaceAdministrationClient() { } + public FaceAdministrationClient(System.Uri endpoint, Azure.AzureKeyCredential credential) { } + public FaceAdministrationClient(System.Uri endpoint, Azure.AzureKeyCredential credential, Azure.AI.Vision.Face.AzureAIVisionFaceClientOptions options) { } + public FaceAdministrationClient(System.Uri endpoint, Azure.Core.TokenCredential credential) { } + public FaceAdministrationClient(System.Uri endpoint, Azure.Core.TokenCredential credential, Azure.AI.Vision.Face.AzureAIVisionFaceClientOptions options) { } + public virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get { throw null; } } + public virtual Azure.AI.Vision.Face.LargeFaceListClient GetLargeFaceListClient(string largeFaceListId) { throw null; } + public virtual Azure.AI.Vision.Face.LargePersonGroupClient GetLargePersonGroupClient(string largePersonGroupId) { throw null; } + } public partial class FaceAttributes : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal FaceAttributes() { } @@ -253,7 +316,6 @@ public partial struct Detection01 public static Azure.AI.Vision.Face.FaceAttributeType Exposure { get { throw null; } } public static Azure.AI.Vision.Face.FaceAttributeType Glasses { get { throw null; } } public static Azure.AI.Vision.Face.FaceAttributeType HeadPose { get { throw null; } } - public static Azure.AI.Vision.Face.FaceAttributeType Mask { get { throw null; } } public static Azure.AI.Vision.Face.FaceAttributeType Noise { get { throw null; } } public static Azure.AI.Vision.Face.FaceAttributeType Occlusion { get { throw null; } } } @@ -291,14 +353,26 @@ public FaceClient(System.Uri endpoint, Azure.Core.TokenCredential credential, Az public virtual Azure.Response> FindSimilar(System.Guid faceId, System.Collections.Generic.IEnumerable faceIds, int? maxNumOfCandidatesReturned = default(int?), Azure.AI.Vision.Face.FindSimilarMatchMode? mode = default(Azure.AI.Vision.Face.FindSimilarMatchMode?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task FindSimilarAsync(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } public virtual System.Threading.Tasks.Task>> FindSimilarAsync(System.Guid faceId, System.Collections.Generic.IEnumerable faceIds, int? maxNumOfCandidatesReturned = default(int?), Azure.AI.Vision.Face.FindSimilarMatchMode? mode = default(Azure.AI.Vision.Face.FindSimilarMatchMode?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response FindSimilarFromLargeFaceList(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response> FindSimilarFromLargeFaceList(System.Guid faceId, string largeFaceListId, int? maxNumOfCandidatesReturned = default(int?), Azure.AI.Vision.Face.FindSimilarMatchMode? mode = default(Azure.AI.Vision.Face.FindSimilarMatchMode?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task FindSimilarFromLargeFaceListAsync(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task>> FindSimilarFromLargeFaceListAsync(System.Guid faceId, string largeFaceListId, int? maxNumOfCandidatesReturned = default(int?), Azure.AI.Vision.Face.FindSimilarMatchMode? mode = default(Azure.AI.Vision.Face.FindSimilarMatchMode?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Group(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } public virtual Azure.Response Group(System.Collections.Generic.IEnumerable faceIds, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task GroupAsync(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } public virtual System.Threading.Tasks.Task> GroupAsync(System.Collections.Generic.IEnumerable faceIds, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response IdentifyFromLargePersonGroup(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response> IdentifyFromLargePersonGroup(System.Collections.Generic.IEnumerable faceIds, string largePersonGroupId, int? maxNumOfCandidatesReturned = default(int?), float? confidenceThreshold = default(float?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task IdentifyFromLargePersonGroupAsync(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task>> IdentifyFromLargePersonGroupAsync(System.Collections.Generic.IEnumerable faceIds, string largePersonGroupId, int? maxNumOfCandidatesReturned = default(int?), float? confidenceThreshold = default(float?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response VerifyFaceToFace(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } public virtual Azure.Response VerifyFaceToFace(System.Guid faceId1, System.Guid faceId2, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task VerifyFaceToFaceAsync(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } public virtual System.Threading.Tasks.Task> VerifyFaceToFaceAsync(System.Guid faceId1, System.Guid faceId2, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response VerifyFromLargePersonGroup(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response VerifyFromLargePersonGroup(System.Guid faceId, string largePersonGroupId, System.Guid personId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task VerifyFromLargePersonGroupAsync(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task> VerifyFromLargePersonGroupAsync(System.Guid faceId, string largePersonGroupId, System.Guid personId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct FaceDetectionModel : System.IEquatable @@ -356,6 +430,28 @@ internal FaceGroupingResult() { } 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 FaceIdentificationCandidate : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal FaceIdentificationCandidate() { } + public float Confidence { get { throw null; } } + public System.Guid PersonId { get { throw null; } } + Azure.AI.Vision.Face.FaceIdentificationCandidate 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.AI.Vision.Face.FaceIdentificationCandidate 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 partial class FaceIdentificationResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal FaceIdentificationResult() { } + public System.Collections.Generic.IReadOnlyList Candidates { get { throw null; } } + public System.Guid FaceId { get { throw null; } } + Azure.AI.Vision.Face.FaceIdentificationResult 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.AI.Vision.Face.FaceIdentificationResult 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; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct FaceImageType : System.IEquatable { @@ -431,6 +527,26 @@ internal FaceLandmarks() { } public override string ToString() { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct FaceOperationStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public FaceOperationStatus(string value) { throw null; } + public static Azure.AI.Vision.Face.FaceOperationStatus Failed { get { throw null; } } + public static Azure.AI.Vision.Face.FaceOperationStatus NotStarted { get { throw null; } } + public static Azure.AI.Vision.Face.FaceOperationStatus Running { get { throw null; } } + public static Azure.AI.Vision.Face.FaceOperationStatus Succeeded { get { throw null; } } + public bool Equals(Azure.AI.Vision.Face.FaceOperationStatus other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.AI.Vision.Face.FaceOperationStatus left, Azure.AI.Vision.Face.FaceOperationStatus right) { throw null; } + public static implicit operator Azure.AI.Vision.Face.FaceOperationStatus (string value) { throw null; } + public static bool operator !=(Azure.AI.Vision.Face.FaceOperationStatus left, Azure.AI.Vision.Face.FaceOperationStatus right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct FaceRecognitionModel : System.IEquatable { private readonly object _dummy; @@ -475,12 +591,16 @@ public FaceSessionClient(System.Uri endpoint, Azure.Core.TokenCredential credent public virtual Azure.Response CreateLivenessSession(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } public virtual System.Threading.Tasks.Task> CreateLivenessSessionAsync(Azure.AI.Vision.Face.CreateLivenessSessionContent body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task CreateLivenessSessionAsync(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual Azure.Response CreateLivenessWithVerifySession(Azure.AI.Vision.Face.CreateLivenessSessionContent createLivenessSessionContent, System.IO.Stream verifyImage, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateLivenessWithVerifySessionAsync(Azure.AI.Vision.Face.CreateLivenessSessionContent createLivenessSessionContent, System.IO.Stream verifyImage, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response CreateLivenessWithVerifySession(Azure.AI.Vision.Face.CreateLivenessWithVerifySessionContent jsonContent, System.IO.Stream verifyImage, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateLivenessWithVerifySessionAsync(Azure.AI.Vision.Face.CreateLivenessWithVerifySessionContent jsonContent, System.IO.Stream verifyImage, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response DeleteLivenessSession(string sessionId, Azure.RequestContext context = null) { throw null; } public virtual System.Threading.Tasks.Task DeleteLivenessSessionAsync(string sessionId, Azure.RequestContext context = null) { throw null; } public virtual Azure.Response DeleteLivenessWithVerifySession(string sessionId, Azure.RequestContext context = null) { throw null; } public virtual System.Threading.Tasks.Task DeleteLivenessWithVerifySessionAsync(string sessionId, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response DetectFromSessionImage(Azure.Core.RequestContent content, string detectionModel = null, string recognitionModel = null, bool? returnFaceId = default(bool?), System.Collections.Generic.IEnumerable returnFaceAttributes = null, bool? returnFaceLandmarks = default(bool?), bool? returnRecognitionModel = default(bool?), int? faceIdTimeToLive = default(int?), Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response> DetectFromSessionImage(string sessionImageId, Azure.AI.Vision.Face.FaceDetectionModel? detectionModel = default(Azure.AI.Vision.Face.FaceDetectionModel?), Azure.AI.Vision.Face.FaceRecognitionModel? recognitionModel = default(Azure.AI.Vision.Face.FaceRecognitionModel?), bool? returnFaceId = default(bool?), System.Collections.Generic.IEnumerable returnFaceAttributes = null, bool? returnFaceLandmarks = default(bool?), bool? returnRecognitionModel = default(bool?), int? faceIdTimeToLive = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DetectFromSessionImageAsync(Azure.Core.RequestContent content, string detectionModel = null, string recognitionModel = null, bool? returnFaceId = default(bool?), System.Collections.Generic.IEnumerable returnFaceAttributes = null, bool? returnFaceLandmarks = default(bool?), bool? returnRecognitionModel = default(bool?), int? faceIdTimeToLive = default(int?), Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task>> DetectFromSessionImageAsync(string sessionImageId, Azure.AI.Vision.Face.FaceDetectionModel? detectionModel = default(Azure.AI.Vision.Face.FaceDetectionModel?), Azure.AI.Vision.Face.FaceRecognitionModel? recognitionModel = default(Azure.AI.Vision.Face.FaceRecognitionModel?), bool? returnFaceId = default(bool?), System.Collections.Generic.IEnumerable returnFaceAttributes = null, bool? returnFaceLandmarks = default(bool?), bool? returnRecognitionModel = default(bool?), int? faceIdTimeToLive = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetLivenessSessionAuditEntries(string sessionId, string start, int? top, Azure.RequestContext context) { throw null; } public virtual Azure.Response> GetLivenessSessionAuditEntries(string sessionId, string start = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task GetLivenessSessionAuditEntriesAsync(string sessionId, string start, int? top, Azure.RequestContext context) { throw null; } @@ -505,6 +625,10 @@ public FaceSessionClient(System.Uri endpoint, Azure.Core.TokenCredential credent public virtual Azure.Response> GetLivenessWithVerifySessions(string start = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task GetLivenessWithVerifySessionsAsync(string start, int? top, Azure.RequestContext context) { throw null; } public virtual System.Threading.Tasks.Task>> GetLivenessWithVerifySessionsAsync(string start = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetSessionImage(string sessionImageId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetSessionImage(string sessionImageId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetSessionImageAsync(string sessionImageId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetSessionImageAsync(string sessionImageId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct FaceSessionStatus : System.IEquatable @@ -525,6 +649,20 @@ public FaceSessionClient(System.Uri endpoint, Azure.Core.TokenCredential credent public static bool operator !=(Azure.AI.Vision.Face.FaceSessionStatus left, Azure.AI.Vision.Face.FaceSessionStatus right) { throw null; } public override string ToString() { throw null; } } + public partial class FaceTrainingResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal FaceTrainingResult() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public System.DateTimeOffset LastActionDateTime { get { throw null; } } + public System.DateTimeOffset LastSuccessfulTrainingDateTime { get { throw null; } } + public string Message { get { throw null; } } + public Azure.AI.Vision.Face.FaceOperationStatus Status { get { throw null; } } + Azure.AI.Vision.Face.FaceTrainingResult 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.AI.Vision.Face.FaceTrainingResult 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 partial class FaceVerificationResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal FaceVerificationResult() { } @@ -656,16 +794,185 @@ internal LandmarkCoordinate() { } 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 LargeFaceList : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal LargeFaceList() { } + public string LargeFaceListId { get { throw null; } } + public string Name { get { throw null; } } + public Azure.AI.Vision.Face.FaceRecognitionModel? RecognitionModel { get { throw null; } } + public string UserData { get { throw null; } } + Azure.AI.Vision.Face.LargeFaceList 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.AI.Vision.Face.LargeFaceList 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 partial class LargeFaceListClient + { + protected LargeFaceListClient() { } + public LargeFaceListClient(System.Uri endpoint, Azure.AzureKeyCredential credential, string largeFaceListId) { } + public LargeFaceListClient(System.Uri endpoint, Azure.AzureKeyCredential credential, string largeFaceListId, Azure.AI.Vision.Face.AzureAIVisionFaceClientOptions options) { } + public LargeFaceListClient(System.Uri endpoint, Azure.Core.TokenCredential credential, string largeFaceListId) { } + public LargeFaceListClient(System.Uri endpoint, Azure.Core.TokenCredential credential, string largeFaceListId, Azure.AI.Vision.Face.AzureAIVisionFaceClientOptions options) { } + public virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get { throw null; } } + public virtual Azure.Response AddFace(Azure.Core.RequestContent content, System.Collections.Generic.IEnumerable targetFace = null, string detectionModel = null, string userData = null, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response AddFace(System.BinaryData imageContent, System.Collections.Generic.IEnumerable targetFace = null, Azure.AI.Vision.Face.FaceDetectionModel? detectionModel = default(Azure.AI.Vision.Face.FaceDetectionModel?), string userData = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response AddFace(System.Uri uri, System.Collections.Generic.IEnumerable targetFace = null, Azure.AI.Vision.Face.FaceDetectionModel? detectionModel = default(Azure.AI.Vision.Face.FaceDetectionModel?), string userData = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task AddFaceAsync(Azure.Core.RequestContent content, System.Collections.Generic.IEnumerable targetFace = null, string detectionModel = null, string userData = null, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task> AddFaceAsync(System.BinaryData imageContent, System.Collections.Generic.IEnumerable targetFace = null, Azure.AI.Vision.Face.FaceDetectionModel? detectionModel = default(Azure.AI.Vision.Face.FaceDetectionModel?), string userData = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> AddFaceAsync(System.Uri uri, System.Collections.Generic.IEnumerable targetFace = null, Azure.AI.Vision.Face.FaceDetectionModel? detectionModel = default(Azure.AI.Vision.Face.FaceDetectionModel?), string userData = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Create(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response Create(string name, string userData = null, Azure.AI.Vision.Face.FaceRecognitionModel? recognitionModel = default(Azure.AI.Vision.Face.FaceRecognitionModel?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task CreateAsync(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task CreateAsync(string name, string userData = null, Azure.AI.Vision.Face.FaceRecognitionModel? recognitionModel = default(Azure.AI.Vision.Face.FaceRecognitionModel?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Delete(Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response DeleteFace(System.Guid persistedFaceId, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task DeleteFaceAsync(System.Guid persistedFaceId, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response GetFace(System.Guid persistedFaceId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetFace(System.Guid persistedFaceId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetFaceAsync(System.Guid persistedFaceId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetFaceAsync(System.Guid persistedFaceId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetFaces(string start, int? top, Azure.RequestContext context) { throw null; } + public virtual Azure.Response> GetFaces(string start = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetFacesAsync(string start, int? top, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task>> GetFacesAsync(string start = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetLargeFaceList(bool? returnRecognitionModel, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetLargeFaceList(bool? returnRecognitionModel = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetLargeFaceListAsync(bool? returnRecognitionModel, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetLargeFaceListAsync(bool? returnRecognitionModel = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetLargeFaceLists(string start, int? top, bool? returnRecognitionModel, Azure.RequestContext context) { throw null; } + public virtual Azure.Response> GetLargeFaceLists(string start = null, int? top = default(int?), bool? returnRecognitionModel = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetLargeFaceListsAsync(string start, int? top, bool? returnRecognitionModel, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task>> GetLargeFaceListsAsync(string start = null, int? top = default(int?), bool? returnRecognitionModel = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetTrainingStatus(Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetTrainingStatus(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetTrainingStatusAsync(Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetTrainingStatusAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation Train(Azure.WaitUntil waitUntil, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task TrainAsync(Azure.WaitUntil waitUntil, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response Update(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task UpdateAsync(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response UpdateFace(System.Guid persistedFaceId, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task UpdateFaceAsync(System.Guid persistedFaceId, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + } + public partial class LargeFaceListFace : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal LargeFaceListFace() { } + public System.Guid PersistedFaceId { get { throw null; } } + public string UserData { get { throw null; } } + Azure.AI.Vision.Face.LargeFaceListFace 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.AI.Vision.Face.LargeFaceListFace 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 partial class LargePersonGroup : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal LargePersonGroup() { } + public string LargePersonGroupId { get { throw null; } } + public string Name { get { throw null; } } + public Azure.AI.Vision.Face.FaceRecognitionModel? RecognitionModel { get { throw null; } } + public string UserData { get { throw null; } } + Azure.AI.Vision.Face.LargePersonGroup 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.AI.Vision.Face.LargePersonGroup 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 partial class LargePersonGroupClient + { + protected LargePersonGroupClient() { } + public LargePersonGroupClient(System.Uri endpoint, Azure.AzureKeyCredential credential, string largePersonGroupId) { } + public LargePersonGroupClient(System.Uri endpoint, Azure.AzureKeyCredential credential, string largePersonGroupId, Azure.AI.Vision.Face.AzureAIVisionFaceClientOptions options) { } + public LargePersonGroupClient(System.Uri endpoint, Azure.Core.TokenCredential credential, string largePersonGroupId) { } + public LargePersonGroupClient(System.Uri endpoint, Azure.Core.TokenCredential credential, string largePersonGroupId, Azure.AI.Vision.Face.AzureAIVisionFaceClientOptions options) { } + public virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get { throw null; } } + public virtual Azure.Response AddFace(System.Guid personId, Azure.Core.RequestContent content, System.Collections.Generic.IEnumerable targetFace = null, string detectionModel = null, string userData = null, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response AddFace(System.Guid personId, System.BinaryData imageContent, System.Collections.Generic.IEnumerable targetFace = null, Azure.AI.Vision.Face.FaceDetectionModel? detectionModel = default(Azure.AI.Vision.Face.FaceDetectionModel?), string userData = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response AddFace(System.Guid personId, System.Uri uri, System.Collections.Generic.IEnumerable targetFace = null, Azure.AI.Vision.Face.FaceDetectionModel? detectionModel = default(Azure.AI.Vision.Face.FaceDetectionModel?), string userData = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task AddFaceAsync(System.Guid personId, Azure.Core.RequestContent content, System.Collections.Generic.IEnumerable targetFace = null, string detectionModel = null, string userData = null, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task> AddFaceAsync(System.Guid personId, System.BinaryData imageContent, System.Collections.Generic.IEnumerable targetFace = null, Azure.AI.Vision.Face.FaceDetectionModel? detectionModel = default(Azure.AI.Vision.Face.FaceDetectionModel?), string userData = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> AddFaceAsync(System.Guid personId, System.Uri uri, System.Collections.Generic.IEnumerable targetFace = null, Azure.AI.Vision.Face.FaceDetectionModel? detectionModel = default(Azure.AI.Vision.Face.FaceDetectionModel?), string userData = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Create(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response Create(string name, string userData = null, Azure.AI.Vision.Face.FaceRecognitionModel? recognitionModel = default(Azure.AI.Vision.Face.FaceRecognitionModel?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task CreateAsync(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task CreateAsync(string name, string userData = null, Azure.AI.Vision.Face.FaceRecognitionModel? recognitionModel = default(Azure.AI.Vision.Face.FaceRecognitionModel?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response CreatePerson(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response CreatePerson(string name, string userData = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task CreatePersonAsync(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task> CreatePersonAsync(string name, string userData = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Delete(Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response DeleteFace(System.Guid personId, System.Guid persistedFaceId, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task DeleteFaceAsync(System.Guid personId, System.Guid persistedFaceId, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response DeletePerson(System.Guid personId, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task DeletePersonAsync(System.Guid personId, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response GetFace(System.Guid personId, System.Guid persistedFaceId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetFace(System.Guid personId, System.Guid persistedFaceId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetFaceAsync(System.Guid personId, System.Guid persistedFaceId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetFaceAsync(System.Guid personId, System.Guid persistedFaceId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetLargePersonGroup(bool? returnRecognitionModel, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetLargePersonGroup(bool? returnRecognitionModel = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetLargePersonGroupAsync(bool? returnRecognitionModel, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetLargePersonGroupAsync(bool? returnRecognitionModel = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetLargePersonGroups(string start, int? top, bool? returnRecognitionModel, Azure.RequestContext context) { throw null; } + public virtual Azure.Response> GetLargePersonGroups(string start = null, int? top = default(int?), bool? returnRecognitionModel = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetLargePersonGroupsAsync(string start, int? top, bool? returnRecognitionModel, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task>> GetLargePersonGroupsAsync(string start = null, int? top = default(int?), bool? returnRecognitionModel = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetPerson(System.Guid personId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetPerson(System.Guid personId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetPersonAsync(System.Guid personId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetPersonAsync(System.Guid personId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetPersons(string start, int? top, Azure.RequestContext context) { throw null; } + public virtual Azure.Response> GetPersons(string start = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetPersonsAsync(string start, int? top, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task>> GetPersonsAsync(string start = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetTrainingStatus(Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetTrainingStatus(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetTrainingStatusAsync(Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetTrainingStatusAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation Train(Azure.WaitUntil waitUntil, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task TrainAsync(Azure.WaitUntil waitUntil, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response Update(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task UpdateAsync(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response UpdateFace(System.Guid personId, System.Guid persistedFaceId, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task UpdateFaceAsync(System.Guid personId, System.Guid persistedFaceId, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response UpdatePerson(System.Guid personId, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task UpdatePersonAsync(System.Guid personId, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + } + public partial class LargePersonGroupPerson : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal LargePersonGroupPerson() { } + public string Name { get { throw null; } } + public System.Collections.Generic.IReadOnlyList PersistedFaceIds { get { throw null; } } + public System.Guid PersonId { get { throw null; } } + public string UserData { get { throw null; } } + Azure.AI.Vision.Face.LargePersonGroupPerson 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.AI.Vision.Face.LargePersonGroupPerson 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 partial class LargePersonGroupPersonFace : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal LargePersonGroupPersonFace() { } + public System.Guid PersistedFaceId { get { throw null; } } + public string UserData { get { throw null; } } + Azure.AI.Vision.Face.LargePersonGroupPersonFace 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.AI.Vision.Face.LargePersonGroupPersonFace 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; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct LivenessModel : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; public LivenessModel(string value) { throw null; } - public static Azure.AI.Vision.Face.LivenessModel V20200215Preview01 { get { throw null; } } - public static Azure.AI.Vision.Face.LivenessModel V20211112Preview03 { get { throw null; } } public static Azure.AI.Vision.Face.LivenessModel V20221015Preview04 { get { throw null; } } - public static Azure.AI.Vision.Face.LivenessModel V20230302Preview05 { get { throw null; } } + public static Azure.AI.Vision.Face.LivenessModel V20231220Preview06 { get { throw null; } } public bool Equals(Azure.AI.Vision.Face.LivenessModel other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } @@ -749,6 +1056,8 @@ internal LivenessSessionAuditEntry() { } public string RequestId { get { throw null; } } public Azure.AI.Vision.Face.AuditLivenessResponseInfo Response { get { throw null; } } public string SessionId { get { throw null; } } + public string SessionImageId { get { throw null; } } + public string VerifyImageHash { get { throw null; } } Azure.AI.Vision.Face.LivenessSessionAuditEntry 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.AI.Vision.Face.LivenessSessionAuditEntry System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -907,6 +1216,9 @@ namespace Microsoft.Extensions.Azure { public static partial class AIVisionFaceClientBuilderExtensions { + public static Azure.Core.Extensions.IAzureClientBuilder AddFaceAdministrationClient(this TBuilder builder, System.Uri endpoint) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithCredential { throw null; } + public static Azure.Core.Extensions.IAzureClientBuilder AddFaceAdministrationClient(this TBuilder builder, System.Uri endpoint, Azure.AzureKeyCredential credential) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilder { throw null; } + public static Azure.Core.Extensions.IAzureClientBuilder AddFaceAdministrationClient(this TBuilder builder, TConfiguration configuration) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithConfiguration { throw null; } public static Azure.Core.Extensions.IAzureClientBuilder AddFaceClient(this TBuilder builder, System.Uri endpoint) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithCredential { throw null; } public static Azure.Core.Extensions.IAzureClientBuilder AddFaceClient(this TBuilder builder, System.Uri endpoint, Azure.AzureKeyCredential credential) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilder { throw null; } public static Azure.Core.Extensions.IAzureClientBuilder AddFaceClient(this TBuilder builder, TConfiguration configuration) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithConfiguration { throw null; } diff --git a/sdk/face/Azure.AI.Vision.Face/assets.json b/sdk/face/Azure.AI.Vision.Face/assets.json index 8436ed4868b6..d3d91b3944d1 100644 --- a/sdk/face/Azure.AI.Vision.Face/assets.json +++ b/sdk/face/Azure.AI.Vision.Face/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/face/Azure.AI.Vision.Face", - "Tag": "net/face/Azure.AI.Vision.Face_7088055bd6" + "Tag": "net/face/Azure.AI.Vision.Face_a2e6c14099" } diff --git a/sdk/face/Azure.AI.Vision.Face/samples/README.md b/sdk/face/Azure.AI.Vision.Face/samples/README.md index a03d90e21460..a232abf279ae 100644 --- a/sdk/face/Azure.AI.Vision.Face/samples/README.md +++ b/sdk/face/Azure.AI.Vision.Face/samples/README.md @@ -17,3 +17,6 @@ Azure AI Vision Face is a cloud service that gives you access to advanced algor - From URL - Detect liveness in faces with session [synchronously](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/face/Azure.AI.Vision.Face/tests/samples/Sample2_DetectLivenessWithSession.cs) or [asynchronously](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/face/Azure.AI.Vision.Face/tests/samples/Sample2_DetectLivenessWithSessionAsync.cs) - Detect liveness with face verification with session [synchronously](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/face/Azure.AI.Vision.Face/tests/samples/Sample3_DetectLivenessWithVerifyWithSession.cs) or [asynchronously](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/face/Azure.AI.Vision.Face/tests/samples/Sample3_DetectLivenessWithVerifyWithSessionAsync.cs) +- Stateless face recognition [synchronously](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/face/Azure.AI.Vision.Face/tests/samples/Sample4_StatelessFaceRecognition.cs) or [asynchronously](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/face/Azure.AI.Vision.Face/tests/samples/Sample4_StatelessFaceRecognitionAsync.cs) +- Verification and identification from Large Person Group [synchronously](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/face/Azure.AI.Vision.Face/tests/samples/Sample5_LargePersonGroup.cs) or [asynchronously](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/face/Azure.AI.Vision.Face/tests/samples/Sample5_LargePersonGroupAsync.cs) +- Find similar faces from a large face list [synchronously](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/face/Azure.AI.Vision.Face/tests/samples/Sample6_LargeFaceList.cs) or [asynchronously](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/face/Azure.AI.Vision.Face/tests/samples/Sample6_LargeFaceListAsync.cs) diff --git a/sdk/face/Azure.AI.Vision.Face/samples/Sample1_FaceDetection.md b/sdk/face/Azure.AI.Vision.Face/samples/Sample1_FaceDetection.md index 525a132c8c0a..3c4bc395708c 100644 --- a/sdk/face/Azure.AI.Vision.Face/samples/Sample1_FaceDetection.md +++ b/sdk/face/Azure.AI.Vision.Face/samples/Sample1_FaceDetection.md @@ -37,7 +37,7 @@ foreach (var detectedFace in detectedFaces) { Console.WriteLine($"Face Rectangle: left={detectedFace.FaceRectangle.Left}, top={detectedFace.FaceRectangle.Top}, width={detectedFace.FaceRectangle.Width}, height={detectedFace.FaceRectangle.Height}"); Console.WriteLine($"Head pose: pitch={detectedFace.FaceAttributes.HeadPose.Pitch}, roll={detectedFace.FaceAttributes.HeadPose.Roll}, yaw={detectedFace.FaceAttributes.HeadPose.Yaw}"); - Console.WriteLine($"Mask: {detectedFace.FaceAttributes.Mask}"); + Console.WriteLine($"Mask: NoseAndMouthCovered={detectedFace.FaceAttributes.Mask.NoseAndMouthCovered}, Type={detectedFace.FaceAttributes.Mask.Type}"); Console.WriteLine($"Quality: {detectedFace.FaceAttributes.QualityForRecognition}"); Console.WriteLine($"Recognition model: {detectedFace.RecognitionModel}"); Console.WriteLine($"Landmarks: "); diff --git a/sdk/face/Azure.AI.Vision.Face/samples/Sample1_FaceDetectionAsync.md b/sdk/face/Azure.AI.Vision.Face/samples/Sample1_FaceDetectionAsync.md index 927aee767096..e209e80a57f0 100644 --- a/sdk/face/Azure.AI.Vision.Face/samples/Sample1_FaceDetectionAsync.md +++ b/sdk/face/Azure.AI.Vision.Face/samples/Sample1_FaceDetectionAsync.md @@ -37,7 +37,7 @@ foreach (var detectedFace in detectedFaces) { Console.WriteLine($"Face Rectangle: left={detectedFace.FaceRectangle.Left}, top={detectedFace.FaceRectangle.Top}, width={detectedFace.FaceRectangle.Width}, height={detectedFace.FaceRectangle.Height}"); Console.WriteLine($"Head pose: pitch={detectedFace.FaceAttributes.HeadPose.Pitch}, roll={detectedFace.FaceAttributes.HeadPose.Roll}, yaw={detectedFace.FaceAttributes.HeadPose.Yaw}"); - Console.WriteLine($"Mask: {detectedFace.FaceAttributes.Mask}"); + Console.WriteLine($"Mask: NoseAndMouthCovered={detectedFace.FaceAttributes.Mask.NoseAndMouthCovered}, Type={detectedFace.FaceAttributes.Mask.Type}"); Console.WriteLine($"Quality: {detectedFace.FaceAttributes.QualityForRecognition}"); Console.WriteLine($"Recognition model: {detectedFace.RecognitionModel}"); Console.WriteLine($"Landmarks: "); diff --git a/sdk/face/Azure.AI.Vision.Face/samples/Sample3_DetectLivenessWithVerifyWithSession.md b/sdk/face/Azure.AI.Vision.Face/samples/Sample3_DetectLivenessWithVerifyWithSession.md index 3431006c1ade..ac54d7b9e9cc 100644 --- a/sdk/face/Azure.AI.Vision.Face/samples/Sample3_DetectLivenessWithVerifyWithSession.md +++ b/sdk/face/Azure.AI.Vision.Face/samples/Sample3_DetectLivenessWithVerifyWithSession.md @@ -29,7 +29,7 @@ var sessionClient = new FaceSessionClient(endpoint, credential); Before you can detect liveness in a face, you need to create a liveness detection session with Azure AI Face Service. The service creates a liveness-session and responds back with a session-authorization-token. ```C# Snippet:CreateLivenessWithVerifySession -var parameters = new CreateLivenessSessionContent(LivenessOperationMode.Passive) { +var parameters = new CreateLivenessWithVerifySessionContent(LivenessOperationMode.Passive) { SendResultsToClient = true, DeviceCorrelationId = Guid.NewGuid().ToString(), }; diff --git a/sdk/face/Azure.AI.Vision.Face/samples/Sample3_DetectLivenessWithVerifyWithSessionAsync.md b/sdk/face/Azure.AI.Vision.Face/samples/Sample3_DetectLivenessWithVerifyWithSessionAsync.md index c81086e225e4..0b18fbcb5109 100644 --- a/sdk/face/Azure.AI.Vision.Face/samples/Sample3_DetectLivenessWithVerifyWithSessionAsync.md +++ b/sdk/face/Azure.AI.Vision.Face/samples/Sample3_DetectLivenessWithVerifyWithSessionAsync.md @@ -29,7 +29,7 @@ var sessionClient = new FaceSessionClient(endpoint, credential); Before you can detect liveness in a face, you need to create a liveness detection session with Azure AI Face Service. The service creates a liveness-session and responds back with a session-authorization-token. ```C# Snippet:CreateLivenessWithVerifySessionAsync -var parameters = new CreateLivenessSessionContent(LivenessOperationMode.Passive) { +var parameters = new CreateLivenessWithVerifySessionContent(LivenessOperationMode.Passive) { SendResultsToClient = true, DeviceCorrelationId = Guid.NewGuid().ToString(), }; diff --git a/sdk/face/Azure.AI.Vision.Face/samples/Sample4_StatelessFaceRecognition.md b/sdk/face/Azure.AI.Vision.Face/samples/Sample4_StatelessFaceRecognition.md new file mode 100644 index 000000000000..51e00cce5df4 --- /dev/null +++ b/sdk/face/Azure.AI.Vision.Face/samples/Sample4_StatelessFaceRecognition.md @@ -0,0 +1,113 @@ +# Stateless face recognition + +This sample demonstrates how to recognize faces in an image without data structure. + +To get started you'll need an Azure AI resource or a Face resource. See [README][README] for prerequisites and instructions. + +## Creating a `FaceClient` + +To create a new `FaceClient` you need the endpoint and credentials from your resource. In the sample below you'll use a `DefaultAzureCredential` object to authenticate. You can set `endpoint` based on an environment variable, a configuration setting, or any way that works for your application. See [Authenticate the client][README_authticate] for instructions. + +```C# Snippet:CreateFaceClient +Uri endpoint = new Uri(""); +DefaultAzureCredential credential = new DefaultAzureCredential(); +var client = new FaceClient(endpoint, credential); +``` + +## Verify whether two faces belong to the same person + +To verify whether two faces belong to the same person, you can use the `VerifyFaceToFace` method. This method returns a `FaceVerificationResult` object that contains a `Confidence` score indicating the similarity between the two faces. + +```C# Snippet:VerifyFaceToFace +var data = new (string Name, Uri Uri)[] { + ("Dad image 1", new Uri(FaceTestConstant.UrlFamily1Dad1Image)), + ("Dad image 2", new Uri(FaceTestConstant.UrlFamily1Dad2Image)), + ("Son image 1", new Uri(FaceTestConstant.UrlFamily1Son1Image)) +}; +var faceIds = new List(); + +foreach (var tuple in data) +{ + var detectResponse = client.Detect(tuple.Uri, FaceDetectionModel.Detection03, FaceRecognitionModel.Recognition04, true); + Console.WriteLine($"Detected {detectResponse.Value.Count} face(s) in the image '{tuple.Name}'."); + faceIds.Add(detectResponse.Value.Single().FaceId.Value); +} + +var verifyDad1Dad2Response = client.VerifyFaceToFace(faceIds[0], faceIds[1]); +Console.WriteLine($"Verification between Dad image 1 and Dad image 2: {verifyDad1Dad2Response.Value.Confidence}"); +Console.WriteLine($"Is the same person: {verifyDad1Dad2Response.Value.IsIdentical}"); + +var verifyDad1SonResponse = client.VerifyFaceToFace(faceIds[0], faceIds[2]); +Console.WriteLine($"Verification between Dad image 1 and Son image 1: {verifyDad1SonResponse.Value.Confidence}"); +Console.WriteLine($"Is the same person: {verifyDad1SonResponse.Value.IsIdentical}"); +``` + +## Find similar faces from a list of faces + +To find similar faces from a list of faces, you can use the `FindSimilar` method. This method returns a list of `FaceFindSimilarResult` objects that contain the `FaceId` of the face and a `Confidence` score indicating the similarity between the face and the query face. + +```C# Snippet:FindSimilar +var dadImage = new Uri(FaceTestConstant.UrlFamily1Dad1Image); +var detectDadResponse = client.Detect(dadImage, FaceDetectionModel.Detection03, FaceRecognitionModel.Recognition04, true); +Console.WriteLine($"Detected {detectDadResponse.Value.Count} face(s) in the Dad image."); +var dadFaceId = detectDadResponse.Value.Single().FaceId.Value; + +var targetImage = new Uri(FaceTestConstant.UrlIdentification1Image); +var detectResponse = client.Detect(targetImage, FaceDetectionModel.Detection03, FaceRecognitionModel.Recognition04, true); +Console.WriteLine($"Detected {detectResponse.Value.Count} face(s) in the image."); +var faceIds = detectResponse.Value.Select(face => face.FaceId.Value); + +var response = client.FindSimilar(dadFaceId, faceIds); +var similarFaces = response.Value; +Console.WriteLine($"Found {similarFaces.Count} similar face(s) in the target image."); +foreach (var similarFace in similarFaces) +{ + Console.WriteLine($"Face ID: {similarFace.FaceId}, confidence: {similarFace.Confidence}"); +} +``` + +## Group faces + +To group faces, you can use the `Group` method. This method returns a `FaceGroupingResult` objects that contain a 2 dimensional array of faces. Each array represents a group of faces that belong to the same person. There is also a faces array that contains all the faces that were not grouped. + +```C# Snippet:Group +var targetImages = new (string, Uri)[] { + ("Group image", new Uri(FaceTestConstant.UrlIdentification1Image)), + ("Dad image 1", new Uri(FaceTestConstant.UrlFamily1Dad1Image)), + ("Dad image 2", new Uri(FaceTestConstant.UrlFamily1Dad2Image)), + ("Son image 1", new Uri(FaceTestConstant.UrlFamily1Son1Image)) +}; +var faceIds = new Dictionary(); + +foreach (var (imageName, targetImage) in targetImages) +{ + var detectResponse = client.Detect(targetImage, FaceDetectionModel.Detection03, FaceRecognitionModel.Recognition04, true); + Console.WriteLine($"Detected {detectResponse.Value.Count} face(s) in the image '{imageName}'."); + foreach (var face in detectResponse.Value) + { + faceIds[face.FaceId.Value] = (face, imageName); + } +} + +var groupResponse = client.Group(faceIds.Keys); +var groups = groupResponse.Value; + +Console.WriteLine($"Found {groups.Groups.Count} group(s) in the target images."); +foreach (var group in groups.Groups) +{ + Console.WriteLine($"Group: "); + foreach (var faceId in group) + { + Console.WriteLine($" {faceId} from '{faceIds[faceId].Item2}', face rectangle: {faceIds[faceId].Item1.FaceRectangle.Left}, {faceIds[faceId].Item1.FaceRectangle.Top}, {faceIds[faceId].Item1.FaceRectangle.Width}, {faceIds[faceId].Item1.FaceRectangle.Height}"); + } +} + +Console.WriteLine($"Found {groups.MessyGroup.Count} face(s) that are not in any group."); +foreach (var faceId in groups.MessyGroup) +{ + Console.WriteLine($" {faceId} from '{faceIds[faceId].Item2}', face rectangle: {faceIds[faceId].Item1.FaceRectangle.Left}, {faceIds[faceId].Item1.FaceRectangle.Top}, {faceIds[faceId].Item1.FaceRectangle.Width}, {faceIds[faceId].Item1.FaceRectangle.Height}"); +} +``` + +[README]: https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/face/Azure.AI.Vision.Face#getting-started +[README_authticate]: https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/face/Azure.AI.Vision.Face#authenticate-the-client diff --git a/sdk/face/Azure.AI.Vision.Face/samples/Sample4_StatelessFaceRecognitionAsync.md b/sdk/face/Azure.AI.Vision.Face/samples/Sample4_StatelessFaceRecognitionAsync.md new file mode 100644 index 000000000000..d92f93d64690 --- /dev/null +++ b/sdk/face/Azure.AI.Vision.Face/samples/Sample4_StatelessFaceRecognitionAsync.md @@ -0,0 +1,113 @@ +# Stateless face recognition + +This sample demonstrates how to recognize faces in an image without data structure. + +To get started you'll need an Azure AI resource or a Face resource. See [README][README] for prerequisites and instructions. + +## Creating a `FaceClient` + +To create a new `FaceClient` you need the endpoint and credentials from your resource. In the sample below you'll use a `DefaultAzureCredential` object to authenticate. You can set `endpoint` based on an environment variable, a configuration setting, or any way that works for your application. See [Authenticate the client][README_authticate] for instructions. + +```C# Snippet:CreateFaceClient +Uri endpoint = new Uri(""); +DefaultAzureCredential credential = new DefaultAzureCredential(); +var client = new FaceClient(endpoint, credential); +``` + +## Verify whether two faces belong to the same person + +To verify whether two faces belong to the same person, you can use the `VerifyFaceToFaceAsync` method. This method returns a `FaceVerificationResult` object that contains a `Confidence` score indicating the similarity between the two faces. + +```C# Snippet:VerifyFaceToFaceAsync +var data = new (string Name, Uri Uri)[] { + ("Dad image 1", new Uri(FaceTestConstant.UrlFamily1Dad1Image)), + ("Dad image 2", new Uri(FaceTestConstant.UrlFamily1Dad2Image)), + ("Son image 1", new Uri(FaceTestConstant.UrlFamily1Son1Image)) +}; +var faceIds = new List(); + +foreach (var tuple in data) +{ + var detectResponse = await client.DetectAsync(tuple.Uri, FaceDetectionModel.Detection03, FaceRecognitionModel.Recognition04, true); + Console.WriteLine($"Detected {detectResponse.Value.Count} face(s) in the image '{tuple.Name}'."); + faceIds.Add(detectResponse.Value.Single().FaceId.Value); +} + +var verifyDad1Dad2Response = await client.VerifyFaceToFaceAsync(faceIds[0], faceIds[1]); +Console.WriteLine($"Verification between Dad image 1 and Dad image 2: {verifyDad1Dad2Response.Value.Confidence}"); +Console.WriteLine($"Is the same person: {verifyDad1Dad2Response.Value.IsIdentical}"); + +var verifyDad1SonResponse = await client.VerifyFaceToFaceAsync(faceIds[0], faceIds[2]); +Console.WriteLine($"Verification between Dad image 1 and Son image 1: {verifyDad1SonResponse.Value.Confidence}"); +Console.WriteLine($"Is the same person: {verifyDad1SonResponse.Value.IsIdentical}"); +``` + +## Find similar faces from a list of faces + +To find similar faces from a list of faces, you can use the `FindSimilarAsync` method. This method returns a list of `FaceFindSimilarResult` objects that contain the `FaceId` of the face and a `Confidence` score indicating the similarity between the face and the query face. + +```C# Snippet:FindSimilarAsync +var dadImage = new Uri(FaceTestConstant.UrlFamily1Dad1Image); +var detectDadResponse = await client.DetectAsync(dadImage, FaceDetectionModel.Detection03, FaceRecognitionModel.Recognition04, true); +Console.WriteLine($"Detected {detectDadResponse.Value.Count} face(s) in the Dad image."); +var dadFaceId = detectDadResponse.Value.Single().FaceId.Value; + +var targetImage = new Uri(FaceTestConstant.UrlIdentification1Image); +var detectResponse = await client.DetectAsync(targetImage, FaceDetectionModel.Detection03, FaceRecognitionModel.Recognition04, true); +Console.WriteLine($"Detected {detectResponse.Value.Count} face(s) in the image."); +var faceIds = detectResponse.Value.Select(face => face.FaceId.Value); + +var response = await client.FindSimilarAsync(dadFaceId, faceIds); +var similarFaces = response.Value; +Console.WriteLine($"Found {similarFaces.Count} similar face(s) in the target image."); +foreach (var similarFace in similarFaces) +{ + Console.WriteLine($"Face ID: {similarFace.FaceId}, confidence: {similarFace.Confidence}"); +} +``` + +## Group faces + +To group faces, you can use the `GroupAsync` method. This method returns a `FaceGroupingResult` objects that contain a 2 dimensional array of faces. Each array represents a group of faces that belong to the same person. There is also a faces array that contains all the faces that were not grouped. + +```C# Snippet:GroupAsync +var targetImages = new (string, Uri)[] { + ("Group image", new Uri(FaceTestConstant.UrlIdentification1Image)), + ("Dad image 1", new Uri(FaceTestConstant.UrlFamily1Dad1Image)), + ("Dad image 2", new Uri(FaceTestConstant.UrlFamily1Dad2Image)), + ("Son image 1", new Uri(FaceTestConstant.UrlFamily1Son1Image)) +}; +var faceIds = new Dictionary(); + +foreach (var (imageName, targetImage) in targetImages) +{ + var detectResponse = await client.DetectAsync(targetImage, FaceDetectionModel.Detection03, FaceRecognitionModel.Recognition04, true); + Console.WriteLine($"Detected {detectResponse.Value.Count} face(s) in the image '{imageName}'."); + foreach (var face in detectResponse.Value) + { + faceIds[face.FaceId.Value] = (face, imageName); + } +} + +var groupResponse = await client.GroupAsync(faceIds.Keys); +var groups = groupResponse.Value; + +Console.WriteLine($"Found {groups.Groups.Count} group(s) in the target images."); +foreach (var group in groups.Groups) +{ + Console.WriteLine($"Group: "); + foreach (var faceId in group) + { + Console.WriteLine($" {faceId} from '{faceIds[faceId].Item2}', face rectangle: {faceIds[faceId].Item1.FaceRectangle.Left}, {faceIds[faceId].Item1.FaceRectangle.Top}, {faceIds[faceId].Item1.FaceRectangle.Width}, {faceIds[faceId].Item1.FaceRectangle.Height}"); + } +} + +Console.WriteLine($"Found {groups.MessyGroup.Count} face(s) that are not in any group."); +foreach (var faceId in groups.MessyGroup) +{ + Console.WriteLine($" {faceId} from '{faceIds[faceId].Item2}', face rectangle: {faceIds[faceId].Item1.FaceRectangle.Left}, {faceIds[faceId].Item1.FaceRectangle.Top}, {faceIds[faceId].Item1.FaceRectangle.Width}, {faceIds[faceId].Item1.FaceRectangle.Height}"); +} +``` + +[README]: https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/face/Azure.AI.Vision.Face#getting-started +[README_authticate]: https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/face/Azure.AI.Vision.Face#authenticate-the-client diff --git a/sdk/face/Azure.AI.Vision.Face/samples/Sample5_LargePersonGroup.md b/sdk/face/Azure.AI.Vision.Face/samples/Sample5_LargePersonGroup.md new file mode 100644 index 000000000000..45ccc1266a85 --- /dev/null +++ b/sdk/face/Azure.AI.Vision.Face/samples/Sample5_LargePersonGroup.md @@ -0,0 +1,91 @@ +# Verification and identification from Large Person Group + +This sample demonstrates how to verify and identify faces from a large person group. + +To get started you'll need an Azure AI resource or a Face resource. See [README][README] for prerequisites and instructions. + +## Create the Large Person Group + +To create a large person group, you'll need `LargePersonGroupClient` object. + +```C# Snippet:CreateLargePersonGroupClient +Uri endpoint = new Uri(""); +DefaultAzureCredential credential = new DefaultAzureCredential(); +var groupClient = new LargePersonGroupClient(endpoint, credential, id); +``` + +Call `Create` to create a large person group. You need to provide the ID of the large person group you want to create with a name and optional user data. + +```C# Snippet:VerifyAndIdentifyFromLargePersonGroup_CreateLargePersonGroup +groupClient.Create("Family 1", userData: "A sweet family", recognitionModel: FaceRecognitionModel.Recognition04); +``` + +## Create the `Person` with faces in the Large Person Group + +The `Person` object is used to represent the individual you want to identify. You can call `CreateLargePersonGroupPerson` to create it within Large Person Group. Call `AddLargePersonGroupPersonFace` to add faces to the person. + +```C# Snippet:VerifyAndIdentifyFromLargePersonGroup_CreatePersonAndAddFaces +var persons = new[] +{ + new { Name = "Bill", UserData = "Dad", ImageUrls = new[] { FaceTestConstant.UrlFamily1Dad1Image, FaceTestConstant.UrlFamily1Dad2Image } }, + new { Name = "Clare", UserData = "Mom", ImageUrls = new[] { FaceTestConstant.UrlFamily1Mom1Image, FaceTestConstant.UrlFamily1Mom2Image } }, + new { Name = "Ron", UserData = "Son", ImageUrls = new[] { FaceTestConstant.UrlFamily1Son1Image, FaceTestConstant.UrlFamily1Son2Image } } +}; +var personIds = new Dictionary(); + +foreach (var person in persons) +{ + var createPersonResponse = groupClient.CreatePerson(person.Name, userData: person.UserData); + var personId = createPersonResponse.Value.PersonId; + personIds.Add(person.Name, personId); + + foreach (var imageUrl in person.ImageUrls) + { + groupClient.AddFace(personId, new Uri(imageUrl), userData: $"{person.UserData}-{imageUrl}", detectionModel: FaceDetectionModel.Detection03); + } +} +``` + +## Train the Large Person Group before performing identification + +Before you can identify faces, you must train the large person group. Call `TrainLargePersonGroup` to start the training process. `TrainLargePersonGroup` is a long-running operation that may take a while to complete. + +```C# Snippet:VerifyAndIdentifyFromLargePersonGroup_Train +var operation = groupClient.Train(WaitUntil.Completed); +operation.WaitForCompletionResponse(); +``` + +## Verify a face against a `Person` in the Large Person Group + +To verify a face against a `Person` in the large person group, call `VerifyFromLargePersonGroup`. This method returns a `VerifyResult` object that contains the confidence score of the verification. + +```C# Snippet:VerifyAndIdentifyFromLargePersonGroup_Verify +var verifyDadResponse = faceClient.VerifyFromLargePersonGroup(faceId, groupId, personIds["Bill"]); +Console.WriteLine($"Is the detected face Bill? {verifyDadResponse.Value.IsIdentical} ({verifyDadResponse.Value.Confidence})"); + +var verifyMomResponse = faceClient.VerifyFromLargePersonGroup(faceId, groupId, personIds["Clare"]); +Console.WriteLine($"Is the detected face Clare? {verifyMomResponse.Value.IsIdentical} ({verifyMomResponse.Value.Confidence})"); +``` + +## Identify a face from the Large Person Group + +To identify a face from the large person group, call `IdentifyFromLargePersonGroup`. This method returns a list of `IdentifyResult` objects, each containing the `Person` ID and the confidence score of the identification. + +```C# Snippet:VerifyAndIdentifyFromLargePersonGroup_Identify +var identifyResponse = faceClient.IdentifyFromLargePersonGroup(new[] { faceId }, groupId); +foreach (var candidate in identifyResponse.Value[0].Candidates) +{ + var person = groupClient.GetPerson(candidate.PersonId); + Console.WriteLine($"The detected face belongs to {person.Value.Name} ({candidate.Confidence})"); +} +``` + +## Delete the Large Person Group + +When you no longer need the large person group, you can delete it by calling `DeleteLargePersonGroup`. The associated persons and faces will also be deleted. + +```C# Snippet:VerifyAndIdentifyFromLargePersonGroup_DeleteLargePersonGroup +groupClient.Delete(); +``` + +[README]: https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/face/Azure.AI.Vision.Face#getting-started \ No newline at end of file diff --git a/sdk/face/Azure.AI.Vision.Face/samples/Sample5_LargePersonGroupAsync.md b/sdk/face/Azure.AI.Vision.Face/samples/Sample5_LargePersonGroupAsync.md new file mode 100644 index 000000000000..aad36e849fe3 --- /dev/null +++ b/sdk/face/Azure.AI.Vision.Face/samples/Sample5_LargePersonGroupAsync.md @@ -0,0 +1,91 @@ +# Verification and identification from Large Person Group + +This sample demonstrates how to verify and identify faces from a large person group. + +To get started you'll need an Azure AI resource or a Face resource. See [README][README] for prerequisites and instructions. + +## Create the Large Person Group + +To create a large person group, you'll need `LargePersonGroupClient` object. + +```C# Snippet:CreateLargePersonGroupClient +Uri endpoint = new Uri(""); +DefaultAzureCredential credential = new DefaultAzureCredential(); +var groupClient = new LargePersonGroupClient(endpoint, credential, id); +``` + +Call `CreateAsync` to create a large person group. You need to provide the ID of the large person group you want to create with a name and optional user data. + +```C# Snippet:VerifyAndIdentifyFromLargePersonGroup_CreateLargePersonGroupAsync +await groupClient.CreateAsync("Family 1", userData: "A sweet family", recognitionModel: FaceRecognitionModel.Recognition04); +``` + +## Create the `Person` with faces in the Large Person Group + +The `Person` object is used to represent the individual you want to identify. You can call `CreateLargePersonGroupPerson` to create it within Large Person Group. Call `AddLargePersonGroupPersonFace` to add faces to the person. + +```C# Snippet:VerifyAndIdentifyFromLargePersonGroup_CreatePersonAndAddFacesAsync +var persons = new[] +{ + new { Name = "Bill", UserData = "Dad", ImageUrls = new[] { FaceTestConstant.UrlFamily1Dad1Image, FaceTestConstant.UrlFamily1Dad2Image } }, + new { Name = "Clare", UserData = "Mom", ImageUrls = new[] { FaceTestConstant.UrlFamily1Mom1Image, FaceTestConstant.UrlFamily1Mom2Image } }, + new { Name = "Ron", UserData = "Son", ImageUrls = new[] { FaceTestConstant.UrlFamily1Son1Image, FaceTestConstant.UrlFamily1Son2Image } } +}; +var personIds = new Dictionary(); + +foreach (var person in persons) +{ + var createPersonResponse = await groupClient.CreatePersonAsync(person.Name, userData: person.UserData); + var personId = createPersonResponse.Value.PersonId; + personIds.Add(person.Name, personId); + + foreach (var imageUrl in person.ImageUrls) + { + await groupClient.AddFaceAsync(personId, new Uri(imageUrl), userData: $"{person.UserData}-{imageUrl}", detectionModel: FaceDetectionModel.Detection03); + } +} +``` + +## Train the Large Person Group before performing identification + +Before you can identify faces, you must train the large person group. Call `TrainLargePersonGroup` to start the training process. `TrainLargePersonGroup` is a long-running operation that may take a while to complete. + +```C# Snippet:VerifyAndIdentifyFromLargePersonGroup_TrainAsync +var operation = await groupClient.TrainAsync(WaitUntil.Completed); +await operation.WaitForCompletionResponseAsync(); +``` + +## Verify a face against a `Person` in the Large Person Group + +To verify a face against a `Person` in the large person group, call `VerifyFromLargePersonGroup`. This method returns a `VerifyResult` object that contains the confidence score of the verification. + +```C# Snippet:VerifyAndIdentifyFromLargePersonGroup_VerifyAsync +var verifyDadResponse = await faceClient.VerifyFromLargePersonGroupAsync(faceId, groupId, personIds["Bill"]); +Console.WriteLine($"Is the detected face Bill? {verifyDadResponse.Value.IsIdentical} ({verifyDadResponse.Value.Confidence})"); + +var verifyMomResponse = await faceClient.VerifyFromLargePersonGroupAsync(faceId, groupId, personIds["Clare"]); +Console.WriteLine($"Is the detected face Clare? {verifyMomResponse.Value.IsIdentical} ({verifyMomResponse.Value.Confidence})"); +``` + +## Identify a face from the Large Person Group + +To identify a face from the large person group, call `IdentifyFromLargePersonGroup`. This method returns a list of `IdentifyResult` objects, each containing the `Person` ID and the confidence score of the identification. + +```C# Snippet:VerifyAndIdentifyFromLargePersonGroup_IdentifyAsync +var identifyResponse = await faceClient.IdentifyFromLargePersonGroupAsync(new[] { faceId }, groupId); +foreach (var candidate in identifyResponse.Value[0].Candidates) +{ + var person = await groupClient.GetPersonAsync(candidate.PersonId); + Console.WriteLine($"The detected face belongs to {person.Value.Name} ({candidate.Confidence})"); +} +``` + +## Delete the Large Person Group + +When you no longer need the large person group, you can delete it by calling `DeleteLargePersonGroup`. The associated persons and faces will also be deleted. + +```C# Snippet:VerifyAndIdentifyFromLargePersonGroup_DeleteLargePersonGroupAsync +await groupClient.DeleteAsync(); +``` + +[README]: https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/face/Azure.AI.Vision.Face#getting-started \ No newline at end of file diff --git a/sdk/face/Azure.AI.Vision.Face/samples/Sample6_LargeFaceList.md b/sdk/face/Azure.AI.Vision.Face/samples/Sample6_LargeFaceList.md new file mode 100644 index 000000000000..48a672b4153f --- /dev/null +++ b/sdk/face/Azure.AI.Vision.Face/samples/Sample6_LargeFaceList.md @@ -0,0 +1,76 @@ +# Find similar faces from a large face list + +This sample demonstrates how to find similar faces from a large face list. + +To get started you'll need an Azure AI resource or a Face resource. See [README][README] for prerequisites and instructions. + +## Create the Large Face List + +To create a large face list, you'll need `LargeFaceListClient` object. + +```C# Snippet:CreateLargeFaceListClient +Uri endpoint = new Uri(""); +DefaultAzureCredential credential = new DefaultAzureCredential(); +var listClient = new LargeFaceListClient(endpoint, credential, id); +``` + +Call `Create` to create a large face list. You can specify the `name` and `userData` for the large face list. + +```C# Snippet:CreateLargeFaceList +listClient.Create("Family 1", userData: "A sweet family", recognitionModel: FaceRecognitionModel.Recognition04); +``` + +## Add faces to the Large Face List + +To add faces to the large face list, call `AddFace`. You can specify the `imageUri` and `userData` for the face. + +```C# Snippet:AddFacesToLargeFaceList +var faces = new[] +{ + new { UserData = "Dad", ImageUrl = new Uri(FaceTestConstant.UrlFamily1Dad1Image) }, + new { UserData = "Mom", ImageUrl = new Uri(FaceTestConstant.UrlFamily1Mom1Image) }, + new { UserData = "Son", ImageUrl = new Uri(FaceTestConstant.UrlFamily1Son1Image) } +}; +var faceIds = new Dictionary(); + +foreach (var face in faces) +{ + var addFaceResponse = listClient.AddFace(face.ImageUrl, userData: face.UserData); + faceIds[addFaceResponse.Value.PersistedFaceId] = face.UserData; +} +``` + +## Train the Large Face List before finding similar faces + +Before you can identify faces, you must train the large face list by calling `Train`. This method is asynchronous and returns an `Operation` object that you can use to wait for the training to complete. + +```C# Snippet:TrainLargeFaceList +var operation = listClient.Train(WaitUntil.Completed); +operation.WaitForCompletionResponse(); +``` + +## Find similar faces from the Large Face List + +To find similar faces from the large face list, call `FindSimilar`. This method returns a list of `FaceSimilarResult` objects that contain the `FaceId` of the face and a `Confidence` score indicating the similarity between the face and the query face. + +```C# Snippet:FindSimilarFromLargeFaceList +var faceClient = CreateClient(); +var detectResponse = faceClient.Detect(new Uri(FaceTestConstant.UrlFamily1Dad3Image), FaceDetectionModel.Detection03, FaceRecognitionModel.Recognition04, true); +var faceId = detectResponse.Value[0].FaceId.Value; + +var findSimilarResponse = faceClient.FindSimilarFromLargeFaceList(faceId, listId); +foreach (var similarFace in findSimilarResponse.Value) +{ + Console.WriteLine($"The detected face is similar to the face with '{faceIds[similarFace.PersistedFaceId.Value]}' ID {similarFace.PersistedFaceId} ({similarFace.Confidence})"); +} +``` + +## Delete the Large Face List + +When you no longer need the large face list, you can delete it by calling `Delete`. + +```C# Snippet:DeleteLargeFaceList +listClient.Delete(); +``` + +[README]: https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/face/Azure.AI.Vision.Face#getting-started \ No newline at end of file diff --git a/sdk/face/Azure.AI.Vision.Face/samples/Sample6_LargeFaceListAsync.md b/sdk/face/Azure.AI.Vision.Face/samples/Sample6_LargeFaceListAsync.md new file mode 100644 index 000000000000..d75368e1d4cd --- /dev/null +++ b/sdk/face/Azure.AI.Vision.Face/samples/Sample6_LargeFaceListAsync.md @@ -0,0 +1,76 @@ +# Find similar faces from a large face list + +This sample demonstrates how to find similar faces from a large face list. + +To get started you'll need an Azure AI resource or a Face resource. See [README][README] for prerequisites and instructions. + +## Create the Large Face List + +To create a large face list, you'll need `LargeFaceListClient` object. + +```C# Snippet:CreateLargeFaceListClient +Uri endpoint = new Uri(""); +DefaultAzureCredential credential = new DefaultAzureCredential(); +var listClient = new LargeFaceListClient(endpoint, credential, id); +``` + +Call `CreateAsync` to create a large face list. You can specify the `name` and `userData` for the large face list. + +```C# Snippet:CreateLargeFaceListAsync +await listClient.CreateAsync("Family 1", userData: "A sweet family", recognitionModel: FaceRecognitionModel.Recognition04); +``` + +## Add faces to the Large Face List + +To add faces to the large face list, call `AddFaceAsync`. You can specify the `imageUri` and `userData` for the face. + +```C# Snippet:AddFacesToLargeFaceListAsync +var faces = new[] +{ + new { UserData = "Dad", ImageUrl = new Uri(FaceTestConstant.UrlFamily1Dad1Image) }, + new { UserData = "Mom", ImageUrl = new Uri(FaceTestConstant.UrlFamily1Mom1Image) }, + new { UserData = "Son", ImageUrl = new Uri(FaceTestConstant.UrlFamily1Son1Image) } +}; +var faceIds = new Dictionary(); + +foreach (var face in faces) +{ + var addFaceResponse = await listClient.AddFaceAsync(face.ImageUrl, userData: face.UserData); + faceIds[addFaceResponse.Value.PersistedFaceId] = face.UserData; +} +``` + +## Train the Large Face List before finding similar faces + +Before you can identify faces, you must train the large face list by calling `TrainAsync`. This method is asynchronous and returns an `Operation` object that you can use to wait for the training to complete. + +```C# Snippet:TrainLargeFaceListAsync +var operation = await listClient.TrainAsync(WaitUntil.Completed); +await operation.WaitForCompletionResponseAsync(); +``` + +## Find similar faces from the Large Face List + +To find similar faces from the large face list, call `FindSimilarAsync`. This method returns a list of `FaceSimilarResult` objects that contain the `FaceId` of the face and a `Confidence` score indicating the similarity between the face and the query face. + +```C# Snippet:FindSimilarFromLargeFaceListAsync +var faceClient = CreateClient(); +var detectResponse = await faceClient.DetectAsync(new Uri(FaceTestConstant.UrlFamily1Dad3Image), FaceDetectionModel.Detection03, FaceRecognitionModel.Recognition04, true); +var faceId = detectResponse.Value[0].FaceId.Value; + +var findSimilarResponse = await faceClient.FindSimilarFromLargeFaceListAsync(faceId, listId); +foreach (var similarFace in findSimilarResponse.Value) +{ + Console.WriteLine($"The detected face is similar to the face with '{faceIds[similarFace.PersistedFaceId.Value]}' ID {similarFace.PersistedFaceId} ({similarFace.Confidence})"); +} +``` + +## Delete the Large Face List + +When you no longer need the large face list, you can delete it by calling `DeleteAsync`. + +```C# Snippet:DeleteLargeFaceListAsync +await listClient.DeleteAsync(); +``` + +[README]: https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/face/Azure.AI.Vision.Face#getting-started \ No newline at end of file diff --git a/sdk/face/Azure.AI.Vision.Face/src/Azure.AI.Vision.Face.csproj b/sdk/face/Azure.AI.Vision.Face/src/Azure.AI.Vision.Face.csproj index 592d3418961e..a4d0eac930b7 100644 --- a/sdk/face/Azure.AI.Vision.Face/src/Azure.AI.Vision.Face.csproj +++ b/sdk/face/Azure.AI.Vision.Face/src/Azure.AI.Vision.Face.csproj @@ -2,7 +2,7 @@ This is the Azure.AI.Vision.Face client library for developing .NET applications with rich experience. Azure SDK Code Generation Azure.AI.Vision.Face for Azure Data Plane - 1.0.0-beta.2 + 1.0.0-beta.3 Azure.AI.Vision.Face $(RequiredTargetFrameworks) true diff --git a/sdk/face/Azure.AI.Vision.Face/src/Custom/FaceAttributeType.cs b/sdk/face/Azure.AI.Vision.Face/src/Custom/FaceAttributeType.cs index 0ce23a8eabef..7385634d4772 100644 --- a/sdk/face/Azure.AI.Vision.Face/src/Custom/FaceAttributeType.cs +++ b/sdk/face/Azure.AI.Vision.Face/src/Custom/FaceAttributeType.cs @@ -24,8 +24,6 @@ public struct Detection01 { public static FaceAttributeType Exposure { get; } = FaceAttributeType.Exposure; /// Noise level of face pixels. Level returns 'Low', 'Medium' and 'High'. Value returns a number between [0,1], the larger the noisier. public static FaceAttributeType Noise { get; } = FaceAttributeType.Noise; - /// Whether each face is wearing a mask. Mask type returns 'noMask', 'faceMask', 'otherMaskOrOcclusion', or 'uncertain'. Value returns a boolean 'noseAndMouthCovered' indicating whether nose and mouth are covered. - public static FaceAttributeType Mask { get; } = FaceAttributeType.Mask; } /// Available attributes for detection03 model. diff --git a/sdk/face/Azure.AI.Vision.Face/src/Custom/FaceClient.cs b/sdk/face/Azure.AI.Vision.Face/src/Custom/FaceClient.cs index 3cda0ed2a9a9..3035e6864a98 100644 --- a/sdk/face/Azure.AI.Vision.Face/src/Custom/FaceClient.cs +++ b/sdk/face/Azure.AI.Vision.Face/src/Custom/FaceClient.cs @@ -25,22 +25,7 @@ public partial class FaceClient /// The number of seconds for the face ID being cached. Supported range from 60 seconds up to 86400 seconds. The default value is 86400 (24 hours). /// The cancellation token to use. /// is null. - /// - /// > [!IMPORTANT] - /// > To mitigate potential misuse that can subject people to stereotyping, discrimination, or unfair denial of services, we are retiring Face API attributes that predict emotion, gender, age, smile, facial hair, hair, and makeup. Read more about this decision https://azure.microsoft.com/en-us/blog/responsible-ai-investments-and-safeguards-for-facial-recognition/. - /// - /// * - /// * No image will be stored. Only the extracted face feature(s) will be stored on server. The faceId is an identifier of the face feature and will be used in "Identify", "Verify", and "Find Similar". The stored face features will expire and be deleted at the time specified by faceIdTimeToLive after the original detection call. - /// * Optional parameters include faceId, landmarks, and attributes. Attributes include headPose, glasses, occlusion, accessories, blur, exposure, noise, mask, and qualityForRecognition. Some of the results returned for specific attributes may not be highly accurate. - /// * JPEG, PNG, GIF (the first frame), and BMP format are supported. The allowed image file size is from 1KB to 6MB. - /// * The minimum detectable face size is 36x36 pixels in an image no larger than 1920x1080 pixels. Images with dimensions higher than 1920x1080 pixels will need a proportionally larger minimum face size. - /// * Up to 100 faces can be returned for an image. Faces are ranked by face rectangle size from large to small. - /// * For optimal results when querying "Identify", "Verify", and "Find Similar" ('returnFaceId' is true), please use faces that are: frontal, clear, and with a minimum size of 200x200 pixels (100 pixels between eyes). - /// * Different 'detectionModel' values can be provided. To use and compare different detection models, please refer to https://learn.microsoft.com/en-us/azure/ai-services/computer-vision/how-to/specify-detection-model - /// * 'detection_02': Face attributes and landmarks are disabled if you choose this detection model. - /// * 'detection_03': Face attributes (mask and headPose only) and landmarks are supported if you choose this detection model. - /// * Different 'recognitionModel' values are provided. If follow-up operations like "Verify", "Identify", "Find Similar" are needed, please specify the recognition model with 'recognitionModel' parameter. The default value for 'recognitionModel' is 'recognition_01', if latest model needed, please explicitly specify the model you need in this parameter. Once specified, the detected faceIds will be associated with the specified recognition model. More details, please refer to https://learn.microsoft.com/en-us/azure/ai-services/computer-vision/how-to/specify-recognition-model. - /// + /// Please refer to https://learn.microsoft.com/rest/api/face/face-detection-operations/detect-from-url for more details. [ForwardsClientCalls] public virtual Task>> DetectAsync( Uri url, @@ -72,22 +57,7 @@ public virtual Task>> DetectAsync( /// The number of seconds for the face ID being cached. Supported range from 60 seconds up to 86400 seconds. The default value is 86400 (24 hours). /// The cancellation token to use. /// is null. - /// - /// > [!IMPORTANT] - /// > To mitigate potential misuse that can subject people to stereotyping, discrimination, or unfair denial of services, we are retiring Face API attributes that predict emotion, gender, age, smile, facial hair, hair, and makeup. Read more about this decision https://azure.microsoft.com/en-us/blog/responsible-ai-investments-and-safeguards-for-facial-recognition/. - /// - /// * - /// * No image will be stored. Only the extracted face feature(s) will be stored on server. The faceId is an identifier of the face feature and will be used in "Identify", "Verify", and "Find Similar". The stored face features will expire and be deleted at the time specified by faceIdTimeToLive after the original detection call. - /// * Optional parameters include faceId, landmarks, and attributes. Attributes include headPose, glasses, occlusion, accessories, blur, exposure, noise, mask, and qualityForRecognition. Some of the results returned for specific attributes may not be highly accurate. - /// * JPEG, PNG, GIF (the first frame), and BMP format are supported. The allowed image file size is from 1KB to 6MB. - /// * The minimum detectable face size is 36x36 pixels in an image no larger than 1920x1080 pixels. Images with dimensions higher than 1920x1080 pixels will need a proportionally larger minimum face size. - /// * Up to 100 faces can be returned for an image. Faces are ranked by face rectangle size from large to small. - /// * For optimal results when querying "Identify", "Verify", and "Find Similar" ('returnFaceId' is true), please use faces that are: frontal, clear, and with a minimum size of 200x200 pixels (100 pixels between eyes). - /// * Different 'detectionModel' values can be provided. To use and compare different detection models, please refer to https://learn.microsoft.com/en-us/azure/ai-services/computer-vision/how-to/specify-detection-model - /// * 'detection_02': Face attributes and landmarks are disabled if you choose this detection model. - /// * 'detection_03': Face attributes (mask and headPose only) and landmarks are supported if you choose this detection model. - /// * Different 'recognitionModel' values are provided. If follow-up operations like "Verify", "Identify", "Find Similar" are needed, please specify the recognition model with 'recognitionModel' parameter. The default value for 'recognitionModel' is 'recognition_01', if latest model needed, please explicitly specify the model you need in this parameter. Once specified, the detected faceIds will be associated with the specified recognition model. More details, please refer to https://learn.microsoft.com/en-us/azure/ai-services/computer-vision/how-to/specify-recognition-model. - /// + /// Please refer to https://learn.microsoft.com/rest/api/face/face-detection-operations/detect-from-url for more details. [ForwardsClientCalls] public virtual Response> Detect( Uri url, @@ -119,22 +89,7 @@ public virtual Response> Detect( /// The number of seconds for the face ID being cached. Supported range from 60 seconds up to 86400 seconds. The default value is 86400 (24 hours). /// The cancellation token to use. /// is null. - /// - /// > [!IMPORTANT] - /// > To mitigate potential misuse that can subject people to stereotyping, discrimination, or unfair denial of services, we are retiring Face API attributes that predict emotion, gender, age, smile, facial hair, hair, and makeup. Read more about this decision https://azure.microsoft.com/en-us/blog/responsible-ai-investments-and-safeguards-for-facial-recognition/. - /// - /// * - /// * No image will be stored. Only the extracted face feature(s) will be stored on server. The faceId is an identifier of the face feature and will be used in "Identify", "Verify", and "Find Similar". The stored face features will expire and be deleted at the time specified by faceIdTimeToLive after the original detection call. - /// * Optional parameters include faceId, landmarks, and attributes. Attributes include headPose, glasses, occlusion, accessories, blur, exposure, noise, mask, and qualityForRecognition. Some of the results returned for specific attributes may not be highly accurate. - /// * JPEG, PNG, GIF (the first frame), and BMP format are supported. The allowed image file size is from 1KB to 6MB. - /// * The minimum detectable face size is 36x36 pixels in an image no larger than 1920x1080 pixels. Images with dimensions higher than 1920x1080 pixels will need a proportionally larger minimum face size. - /// * Up to 100 faces can be returned for an image. Faces are ranked by face rectangle size from large to small. - /// * For optimal results when querying "Identify", "Verify", and "Find Similar" ('returnFaceId' is true), please use faces that are: frontal, clear, and with a minimum size of 200x200 pixels (100 pixels between eyes). - /// * Different 'detectionModel' values can be provided. To use and compare different detection models, please refer to https://learn.microsoft.com/en-us/azure/ai-services/computer-vision/how-to/specify-detection-model - /// * 'detection_02': Face attributes and landmarks are disabled if you choose this detection model. - /// * 'detection_03': Face attributes (mask and headPose only) and landmarks are supported if you choose this detection model. - /// * Different 'recognitionModel' values are provided. If follow-up operations like "Verify", "Identify", "Find Similar" are needed, please specify the recognition model with 'recognitionModel' parameter. The default value for 'recognitionModel' is 'recognition_01', if latest model needed, please explicitly specify the model you need in this parameter. Once specified, the detected faceIds will be associated with the specified recognition model. More details, please refer to https://learn.microsoft.com/en-us/azure/ai-services/computer-vision/how-to/specify-recognition-model. - /// + /// Please refer to https://learn.microsoft.com/rest/api/face/face-detection-operations/detect for more details. [ForwardsClientCalls] public virtual Task>> DetectAsync( BinaryData imageContent, @@ -166,22 +121,7 @@ public virtual Task>> DetectAsync( /// The number of seconds for the face ID being cached. Supported range from 60 seconds up to 86400 seconds. The default value is 86400 (24 hours). /// The cancellation token to use. /// is null. - /// - /// > [!IMPORTANT] - /// > To mitigate potential misuse that can subject people to stereotyping, discrimination, or unfair denial of services, we are retiring Face API attributes that predict emotion, gender, age, smile, facial hair, hair, and makeup. Read more about this decision https://azure.microsoft.com/en-us/blog/responsible-ai-investments-and-safeguards-for-facial-recognition/. - /// - /// * - /// * No image will be stored. Only the extracted face feature(s) will be stored on server. The faceId is an identifier of the face feature and will be used in "Identify", "Verify", and "Find Similar". The stored face features will expire and be deleted at the time specified by faceIdTimeToLive after the original detection call. - /// * Optional parameters include faceId, landmarks, and attributes. Attributes include headPose, glasses, occlusion, accessories, blur, exposure, noise, mask, and qualityForRecognition. Some of the results returned for specific attributes may not be highly accurate. - /// * JPEG, PNG, GIF (the first frame), and BMP format are supported. The allowed image file size is from 1KB to 6MB. - /// * The minimum detectable face size is 36x36 pixels in an image no larger than 1920x1080 pixels. Images with dimensions higher than 1920x1080 pixels will need a proportionally larger minimum face size. - /// * Up to 100 faces can be returned for an image. Faces are ranked by face rectangle size from large to small. - /// * For optimal results when querying "Identify", "Verify", and "Find Similar" ('returnFaceId' is true), please use faces that are: frontal, clear, and with a minimum size of 200x200 pixels (100 pixels between eyes). - /// * Different 'detectionModel' values can be provided. To use and compare different detection models, please refer to https://learn.microsoft.com/en-us/azure/ai-services/computer-vision/how-to/specify-detection-model - /// * 'detection_02': Face attributes and landmarks are disabled if you choose this detection model. - /// * 'detection_03': Face attributes (mask and headPose only) and landmarks are supported if you choose this detection model. - /// * Different 'recognitionModel' values are provided. If follow-up operations like "Verify", "Identify", "Find Similar" are needed, please specify the recognition model with 'recognitionModel' parameter. The default value for 'recognitionModel' is 'recognition_01', if latest model needed, please explicitly specify the model you need in this parameter. Once specified, the detected faceIds will be associated with the specified recognition model. More details, please refer to https://learn.microsoft.com/en-us/azure/ai-services/computer-vision/how-to/specify-recognition-model. - /// + /// Please refer to https://learn.microsoft.com/rest/api/face/face-detection-operations/detect for more details. [ForwardsClientCalls] public virtual Response> Detect( BinaryData imageContent, diff --git a/sdk/face/Azure.AI.Vision.Face/src/Custom/FaceSessionClient.cs b/sdk/face/Azure.AI.Vision.Face/src/Custom/FaceSessionClient.cs index a49be1714b3b..dd468dfa9589 100644 --- a/sdk/face/Azure.AI.Vision.Face/src/Custom/FaceSessionClient.cs +++ b/sdk/face/Azure.AI.Vision.Face/src/Custom/FaceSessionClient.cs @@ -13,83 +13,43 @@ namespace Azure.AI.Vision.Face public partial class FaceSessionClient { /// Create a new liveness session with verify. Provide the verify image during session creation. - /// Parameters for liveness with verify session creation. + /// Parameters for liveness with verify session creation. /// Image binary data for verify image, can be provided as session creation time or during the /detectLivenessWithVerify/singleModal /// /// The cancellation token to use. - /// is null. - /// - /// A session is best for client device scenarios where developers want to authorize a client device to perform only a liveness detection without granting full access to their resource. Created sessions have a limited life span and only authorize clients to perform the desired action before access is expired. - /// - /// Permissions includes... - /// > - /// * - /// * Ability to call /detectLivenessWithVerify/singleModal for up to 3 retries. - /// * A token lifetime of 10 minutes. - /// - /// > [!NOTE] - /// > - /// > * - /// > * Client access can be revoked by deleting the session using the Delete Liveness With Verify Session operation. - /// > * To retrieve a result, use the Get Liveness With Verify Session. - /// > * To audit the individual requests that a client has made to your resource, use the List Liveness With Verify Session Audit Entries. - /// - /// Recommended Option: VerifyImage is provided during session creation. - /// Alternative Option: Client device submits VerifyImage during the /detectLivenessWithVerify/singleModal call. - /// > [!NOTE] - /// > Extra measures should be taken to validate that the client is sending the expected VerifyImage. - /// + /// is null. + /// Please refer to https://learn.microsoft.com/rest/api/face/liveness-session-operations/create-liveness-with-verify-session-with-verify-image for more details. [ForwardsClientCalls] - public virtual async Task> CreateLivenessWithVerifySessionAsync(CreateLivenessSessionContent createLivenessSessionContent, Stream verifyImage, CancellationToken cancellationToken = default) + public virtual async Task> CreateLivenessWithVerifySessionAsync(CreateLivenessWithVerifySessionContent jsonContent, Stream verifyImage, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(createLivenessSessionContent, nameof(createLivenessSessionContent)); + Argument.AssertNotNull(jsonContent, nameof(jsonContent)); if (verifyImage == null) { - return await CreateLivenessWithVerifySessionAsync(createLivenessSessionContent, cancellationToken).ConfigureAwait(false); + return await CreateLivenessWithVerifySessionAsync(jsonContent, cancellationToken).ConfigureAwait(false); } - var createLivenessWithVerifySessionContent = new CreateLivenessWithVerifySessionContent(createLivenessSessionContent, verifyImage); - return await CreateLivenessWithVerifySessionWithVerifyImageAsync(createLivenessWithVerifySessionContent, cancellationToken).ConfigureAwait(false); + CreateLivenessWithVerifySessionMultipartContent multipartContent = new CreateLivenessWithVerifySessionMultipartContent(jsonContent, verifyImage); + return await CreateLivenessWithVerifySessionWithVerifyImageAsync(multipartContent, cancellationToken).ConfigureAwait(false); } /// Create a new liveness session with verify. Provide the verify image during session creation. - /// Parameters for liveness with verify session creation. + /// Parameters for liveness with verify session creation. /// Image binary data for verify image, can be provided as session creation time or during the /detectLivenessWithVerify/singleModal /// /// The cancellation token to use. - /// is null. - /// - /// A session is best for client device scenarios where developers want to authorize a client device to perform only a liveness detection without granting full access to their resource. Created sessions have a limited life span and only authorize clients to perform the desired action before access is expired. - /// - /// Permissions includes... - /// > - /// * - /// * Ability to call /detectLivenessWithVerify/singleModal for up to 3 retries. - /// * A token lifetime of 10 minutes. - /// - /// > [!NOTE] - /// > - /// > * - /// > * Client access can be revoked by deleting the session using the Delete Liveness With Verify Session operation. - /// > * To retrieve a result, use the Get Liveness With Verify Session. - /// > * To audit the individual requests that a client has made to your resource, use the List Liveness With Verify Session Audit Entries. - /// - /// Recommended Option: VerifyImage is provided during session creation. - /// Alternative Option: Client device submits VerifyImage during the /detectLivenessWithVerify/singleModal call. - /// > [!NOTE] - /// > Extra measures should be taken to validate that the client is sending the expected VerifyImage. - /// + /// is null. + /// Please refer to https://learn.microsoft.com/rest/api/face/liveness-session-operations/create-liveness-with-verify-session-with-verify-image for more details. [ForwardsClientCalls] - public virtual Response CreateLivenessWithVerifySession(CreateLivenessSessionContent createLivenessSessionContent, Stream verifyImage, CancellationToken cancellationToken = default) + public virtual Response CreateLivenessWithVerifySession(CreateLivenessWithVerifySessionContent jsonContent, Stream verifyImage, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(createLivenessSessionContent, nameof(createLivenessSessionContent)); + Argument.AssertNotNull(jsonContent, nameof(jsonContent)); if (verifyImage == null) { - return CreateLivenessWithVerifySession(createLivenessSessionContent, cancellationToken); + return CreateLivenessWithVerifySession(jsonContent, cancellationToken); } - var createLivenessWithVerifySessionContent = new CreateLivenessWithVerifySessionContent(createLivenessSessionContent, verifyImage); - return CreateLivenessWithVerifySessionWithVerifyImage(createLivenessWithVerifySessionContent, cancellationToken); + CreateLivenessWithVerifySessionMultipartContent multipartContent = new CreateLivenessWithVerifySessionMultipartContent(jsonContent, verifyImage); + return CreateLivenessWithVerifySessionWithVerifyImage(multipartContent, cancellationToken); } } } diff --git a/sdk/face/Azure.AI.Vision.Face/src/Custom/LargeFaceListClient.cs b/sdk/face/Azure.AI.Vision.Face/src/Custom/LargeFaceListClient.cs new file mode 100644 index 000000000000..2f62101aa423 --- /dev/null +++ b/sdk/face/Azure.AI.Vision.Face/src/Custom/LargeFaceListClient.cs @@ -0,0 +1,214 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.AI.Vision.Face +{ + // Data plane generated sub-client. + /// The LargeFaceList sub-client. + [CodeGenClient("LargeFaceListClientImpl")] + public partial class LargeFaceListClient + { + /// Initializes a new instance of FaceClient. + /// + /// Supported Cognitive Services endpoints (protocol and hostname, for example: + /// https://{resource-name}.cognitiveservices.azure.com). + /// + /// Valid character is letter in lower case or digit or '-' or '_', maximum length is 64. + /// A credential used to authenticate to an Azure Service. + /// or is null. + public LargeFaceListClient(Uri endpoint, AzureKeyCredential credential, string largeFaceListId) : this(endpoint, credential, largeFaceListId, new AzureAIVisionFaceClientOptions()) + { + } + + /// Initializes a new instance of FaceClient. + /// + /// Valid character is letter in lower case or digit or '-' or '_', maximum length is 64. + /// Supported Cognitive Services endpoints (protocol and hostname, for example: + /// https://{resource-name}.cognitiveservices.azure.com). + /// + /// A credential used to authenticate to an Azure Service. + /// or is null. + public LargeFaceListClient(Uri endpoint, TokenCredential credential, string largeFaceListId) : this(endpoint, credential, largeFaceListId, new AzureAIVisionFaceClientOptions()) + { + } + + /// Initializes a new instance of LargeFaceListClient. + /// + /// Supported Cognitive Services endpoints (protocol and hostname, for example: + /// https://{resource-name}.cognitiveservices.azure.com). + /// + /// Valid character is letter in lower case or digit or '-' or '_', maximum length is 64. + /// A credential used to authenticate to an Azure Service. + /// The options for configuring the client. + /// or is null. + public LargeFaceListClient(Uri endpoint, AzureKeyCredential credential, string largeFaceListId, AzureAIVisionFaceClientOptions options) + { + Argument.AssertNotNull(endpoint, nameof(endpoint)); + Argument.AssertNotNull(credential, nameof(credential)); + options ??= new AzureAIVisionFaceClientOptions(); + + ClientDiagnostics = new ClientDiagnostics(options, true); + _keyCredential = credential; + _pipeline = HttpPipelineBuilder.Build(options, Array.Empty(), new HttpPipelinePolicy[] { new AzureKeyCredentialPolicy(_keyCredential, AuthorizationHeader) }, new ResponseClassifier()); + _endpoint = endpoint; + _apiVersion = options.Version; + _largeFaceListId = largeFaceListId; + } + + /// Initializes a new instance of FaceClient. + /// + /// Supported Cognitive Services endpoints (protocol and hostname, for example: + /// https://{resource-name}.cognitiveservices.azure.com). + /// + /// Valid character is letter in lower case or digit or '-' or '_', maximum length is 64. + /// A credential used to authenticate to an Azure Service. + /// The options for configuring the client. + /// or is null. + public LargeFaceListClient(Uri endpoint, TokenCredential credential, string largeFaceListId, AzureAIVisionFaceClientOptions options) + { + Argument.AssertNotNull(endpoint, nameof(endpoint)); + Argument.AssertNotNull(credential, nameof(credential)); + options ??= new AzureAIVisionFaceClientOptions(); + + ClientDiagnostics = new ClientDiagnostics(options, true); + _tokenCredential = credential; + _pipeline = HttpPipelineBuilder.Build(options, Array.Empty(), new HttpPipelinePolicy[] { new BearerTokenAuthenticationPolicy(_tokenCredential, AuthorizationScopes) }, new ResponseClassifier()); + _endpoint = endpoint; + _apiVersion = options.Version; + _largeFaceListId = largeFaceListId; + } + + /// Add a face to a specified Large Face List, up to 1,000,000 faces. + /// URL of input image. + /// A face rectangle to specify the target face to be added to a person, in the format of 'targetFace=left,top,width,height'. + /// The 'detectionModel' associated with the detected faceIds. Supported 'detectionModel' values include 'detection_01', 'detection_02' and 'detection_03'. The default value is 'detection_01'. + /// User-provided data attached to the face. The size limit is 1K. + /// The cancellation token to use. + /// is null. + /// Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/add-large-face-list-face-from-url for more details. + [ForwardsClientCalls] + public virtual Task> AddFaceAsync(Uri uri, IEnumerable targetFace = null, FaceDetectionModel? detectionModel = null, string userData = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(uri, nameof(uri)); + + return AddFaceFromUrlImplAsync(uri, targetFace, detectionModel, userData, cancellationToken); + } + + /// Add a face to a specified Large Face List, up to 1,000,000 faces. + /// URL of input image. + /// A face rectangle to specify the target face to be added to a person, in the format of 'targetFace=left,top,width,height'. + /// The 'detectionModel' associated with the detected faceIds. Supported 'detectionModel' values include 'detection_01', 'detection_02' and 'detection_03'. The default value is 'detection_01'. + /// User-provided data attached to the face. The size limit is 1K. + /// The cancellation token to use. + /// is null. + /// Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/add-large-face-list-face-from-url for more details. + [ForwardsClientCalls] + public virtual Response AddFace(Uri uri, IEnumerable targetFace = null, FaceDetectionModel? detectionModel = null, string userData = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(uri, nameof(uri)); + + return AddFaceFromUrlImpl(uri, targetFace, detectionModel, userData, cancellationToken); + } + + /// Add a face to a specified Large Face List, up to 1,000,000 faces. + /// The image to be analyzed. + /// A face rectangle to specify the target face to be added to a person, in the format of 'targetFace=left,top,width,height'. + /// The 'detectionModel' associated with the detected faceIds. Supported 'detectionModel' values include 'detection_01', 'detection_02' and 'detection_03'. The default value is 'detection_01'. + /// User-provided data attached to the face. The size limit is 1K. + /// The cancellation token to use. + /// is null. + /// Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/add-large-face-list-face for more details. + [ForwardsClientCalls] + public virtual Task> AddFaceAsync(BinaryData imageContent, IEnumerable targetFace = null, FaceDetectionModel? detectionModel = null, string userData = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(imageContent, nameof(imageContent)); + + return AddFaceImplAsync(imageContent, targetFace, detectionModel, userData, cancellationToken); + } + + /// Add a face to a specified Large Face List, up to 1,000,000 faces. + /// The image to be analyzed. + /// A face rectangle to specify the target face to be added to a person, in the format of 'targetFace=left,top,width,height'. + /// The 'detectionModel' associated with the detected faceIds. Supported 'detectionModel' values include 'detection_01', 'detection_02' and 'detection_03'. The default value is 'detection_01'. + /// User-provided data attached to the face. The size limit is 1K. + /// The cancellation token to use. + /// is null. + /// Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/add-large-face-list-face for more details. + [ForwardsClientCalls] + public virtual Response AddFace(BinaryData imageContent, IEnumerable targetFace = null, FaceDetectionModel? detectionModel = null, string userData = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(imageContent, nameof(imageContent)); + + return AddFaceImpl(imageContent, targetFace, detectionModel, userData, cancellationToken); + } + + /// + /// [Protocol Method] Add a face to a specified Large Face List, up to 1,000,000 faces. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The content to send as the body of the request. + /// A face rectangle to specify the target face to be added to a person, in the format of 'targetFace=left,top,width,height'. + /// The 'detectionModel' associated with the detected faceIds. Supported 'detectionModel' values include 'detection_01', 'detection_02' and 'detection_03'. The default value is 'detection_01'. Allowed values: "detection_01" | "detection_02" | "detection_03". + /// User-provided data attached to the face. The size limit is 1K. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + [ForwardsClientCalls] + public virtual Task AddFaceAsync(RequestContent content, IEnumerable targetFace = null, string detectionModel = null, string userData = null, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + return AddFaceImplAsync(content, targetFace, detectionModel, userData, context); + } + + /// + /// [Protocol Method] Add a face to a specified Large Face List, up to 1,000,000 faces. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The content to send as the body of the request. + /// A face rectangle to specify the target face to be added to a person, in the format of 'targetFace=left,top,width,height'. + /// The 'detectionModel' associated with the detected faceIds. Supported 'detectionModel' values include 'detection_01', 'detection_02' and 'detection_03'. The default value is 'detection_01'. Allowed values: "detection_01" | "detection_02" | "detection_03". + /// User-provided data attached to the face. The size limit is 1K. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + [ForwardsClientCalls] + public virtual Response AddFace(RequestContent content, IEnumerable targetFace = null, string detectionModel = null, string userData = null, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + return AddFaceImpl(content, targetFace, detectionModel, userData, context); + } + } +} \ No newline at end of file diff --git a/sdk/face/Azure.AI.Vision.Face/src/Custom/LargePersonGroupClient.cs b/sdk/face/Azure.AI.Vision.Face/src/Custom/LargePersonGroupClient.cs new file mode 100644 index 000000000000..7c8ecaf0975f --- /dev/null +++ b/sdk/face/Azure.AI.Vision.Face/src/Custom/LargePersonGroupClient.cs @@ -0,0 +1,220 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.AI.Vision.Face +{ + // Data plane generated sub-client. + /// The LargePersonGroup sub-client. + [CodeGenClient("LargePersonGroupClientImpl")] + public partial class LargePersonGroupClient + { + /// Initializes a new instance of FaceClient. + /// + /// Supported Cognitive Services endpoints (protocol and hostname, for example: + /// https://{resource-name}.cognitiveservices.azure.com). + /// + /// ID of the container. + /// A credential used to authenticate to an Azure Service. + /// or is null. + public LargePersonGroupClient(Uri endpoint, AzureKeyCredential credential, string largePersonGroupId) : this(endpoint, credential, largePersonGroupId, new AzureAIVisionFaceClientOptions()) + { + } + + /// Initializes a new instance of FaceClient. + /// + /// Supported Cognitive Services endpoints (protocol and hostname, for example: + /// https://{resource-name}.cognitiveservices.azure.com). + /// + /// ID of the container. + /// A credential used to authenticate to an Azure Service. + /// or is null. + public LargePersonGroupClient(Uri endpoint, TokenCredential credential, string largePersonGroupId) : this(endpoint, credential, largePersonGroupId, new AzureAIVisionFaceClientOptions()) + { + } + + /// Initializes a new instance of LargePersonGroupClient. + /// + /// Supported Cognitive Services endpoints (protocol and hostname, for example: + /// https://{resource-name}.cognitiveservices.azure.com). + /// + /// ID of the container. + /// A credential used to authenticate to an Azure Service. + /// The options for configuring the client. + /// or is null. + public LargePersonGroupClient(Uri endpoint, AzureKeyCredential credential, string largePersonGroupId, AzureAIVisionFaceClientOptions options) + { + Argument.AssertNotNull(endpoint, nameof(endpoint)); + Argument.AssertNotNull(credential, nameof(credential)); + options ??= new AzureAIVisionFaceClientOptions(); + + ClientDiagnostics = new ClientDiagnostics(options, true); + _keyCredential = credential; + _pipeline = HttpPipelineBuilder.Build(options, Array.Empty(), new HttpPipelinePolicy[] { new AzureKeyCredentialPolicy(_keyCredential, AuthorizationHeader) }, new ResponseClassifier()); + _endpoint = endpoint; + _apiVersion = options.Version; + _largePersonGroupId = largePersonGroupId; + } + + /// Initializes a new instance of FaceClient. + /// + /// Supported Cognitive Services endpoints (protocol and hostname, for example: + /// https://{resource-name}.cognitiveservices.azure.com). + /// + /// ID of the container. + /// A credential used to authenticate to an Azure Service. + /// The options for configuring the client. + /// or is null. + public LargePersonGroupClient(Uri endpoint, TokenCredential credential, string largePersonGroupId, AzureAIVisionFaceClientOptions options) + { + Argument.AssertNotNull(endpoint, nameof(endpoint)); + Argument.AssertNotNull(credential, nameof(credential)); + options ??= new AzureAIVisionFaceClientOptions(); + + ClientDiagnostics = new ClientDiagnostics(options, true); + _tokenCredential = credential; + _pipeline = HttpPipelineBuilder.Build(options, Array.Empty(), new HttpPipelinePolicy[] { new BearerTokenAuthenticationPolicy(_tokenCredential, AuthorizationScopes) }, new ResponseClassifier()); + _endpoint = endpoint; + _apiVersion = options.Version; + _largePersonGroupId = largePersonGroupId; + } + + /// Add a face to a person into a Large Person Group for face identification or verification. + /// ID of the person. + /// URL of input image. + /// A face rectangle to specify the target face to be added to a person, in the format of 'targetFace=left,top,width,height'. + /// The 'detectionModel' associated with the detected faceIds. Supported 'detectionModel' values include 'detection_01', 'detection_02' and 'detection_03'. The default value is 'detection_01'. + /// User-provided data attached to the face. The size limit is 1K. + /// The cancellation token to use. + /// is null. + /// Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/add-large-person-group-person-face-from-url for more details. + [ForwardsClientCalls] + public virtual Task> AddFaceAsync(Guid personId, Uri uri, IEnumerable targetFace = null, FaceDetectionModel? detectionModel = null, string userData = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(uri, nameof(uri)); + + return AddFaceFromUrlImplAsync(personId, uri, targetFace, detectionModel, userData, cancellationToken); + } + + /// Add a face to a person into a Large Person Group for face identification or verification. + /// ID of the person. + /// URL of input image. + /// A face rectangle to specify the target face to be added to a person, in the format of 'targetFace=left,top,width,height'. + /// The 'detectionModel' associated with the detected faceIds. Supported 'detectionModel' values include 'detection_01', 'detection_02' and 'detection_03'. The default value is 'detection_01'. + /// User-provided data attached to the face. The size limit is 1K. + /// The cancellation token to use. + /// is null. + /// Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/add-large-person-group-person-face-from-url for more details. + [ForwardsClientCalls] + public virtual Response AddFace(Guid personId, Uri uri, IEnumerable targetFace = null, FaceDetectionModel? detectionModel = null, string userData = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(uri, nameof(uri)); + + return AddFaceFromUrlImpl(personId, uri, targetFace, detectionModel, userData, cancellationToken); + } + + /// Add a face to a person into a Large Person Group for face identification or verification. + /// ID of the person. + /// The image to be analyzed. + /// A face rectangle to specify the target face to be added to a person, in the format of 'targetFace=left,top,width,height'. + /// The 'detectionModel' associated with the detected faceIds. Supported 'detectionModel' values include 'detection_01', 'detection_02' and 'detection_03'. The default value is 'detection_01'. + /// User-provided data attached to the face. The size limit is 1K. + /// The cancellation token to use. + /// is null. + /// Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/add-large-person-group-person-face for more details. + [ForwardsClientCalls] + public virtual Task> AddFaceAsync(Guid personId, BinaryData imageContent, IEnumerable targetFace = null, FaceDetectionModel? detectionModel = null, string userData = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(imageContent, nameof(imageContent)); + + return AddFaceImplAsync(personId, imageContent, targetFace, detectionModel, userData, cancellationToken); + } + + /// Add a face to a person into a Large Person Group for face identification or verification. + /// ID of the person. + /// The image to be analyzed. + /// A face rectangle to specify the target face to be added to a person, in the format of 'targetFace=left,top,width,height'. + /// The 'detectionModel' associated with the detected faceIds. Supported 'detectionModel' values include 'detection_01', 'detection_02' and 'detection_03'. The default value is 'detection_01'. + /// User-provided data attached to the face. The size limit is 1K. + /// The cancellation token to use. + /// is null. + /// Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/add-large-person-group-person-face for more details. + [ForwardsClientCalls] + public virtual Response AddFace(Guid personId, BinaryData imageContent, IEnumerable targetFace = null, FaceDetectionModel? detectionModel = null, string userData = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(imageContent, nameof(imageContent)); + + return AddFaceImpl(personId, imageContent, targetFace, detectionModel, userData, cancellationToken); + } + + /// + /// [Protocol Method] Add a face to a person into a Large Person Group for face identification or verification. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the ser convenience overload with strongly typed models first. + /// + /// + /// + /// + /// ID of the person. + /// The content to send as the body of the request. + /// A face rectangle to specify the target face to be added to a person, in the format of 'targetFace=left,top,width,height'. + /// The 'detectionModel' associated with the detected faceIds. Supported 'detectionModel' values include 'detection_01', 'detection_02' and 'detection_03'. The default value is 'detection_01'. Allowed values: "detection_01" | "detection_02" | "detection_03". + /// User-provided data attached to the face. The size limit is 1K. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + [ForwardsClientCalls] + public virtual Task AddFaceAsync(Guid personId, RequestContent content, IEnumerable targetFace = null, string detectionModel = null, string userData = null, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + return AddFaceImplAsync(personId, content, targetFace, detectionModel, userData, context); + } + + /// + /// [Protocol Method] Add a face to a person into a Large Person Group for face identification or verification. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the ser convenience overload with strongly typed models first. + /// + /// + /// + /// + /// ID of the person. + /// The content to send as the body of the request. + /// A face rectangle to specify the target face to be added to a person, in the format of 'targetFace=left,top,width,height'. + /// The 'detectionModel' associated with the detected faceIds. Supported 'detectionModel' values include 'detection_01', 'detection_02' and 'detection_03'. The default value is 'detection_01'. Allowed values: "detection_01" | "detection_02" | "detection_03". + /// User-provided data attached to the face. The size limit is 1K. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + [ForwardsClientCalls] + public virtual Response AddFace(Guid personId, RequestContent content, IEnumerable targetFace = null, string detectionModel = null, string userData = null, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + return AddFaceImpl(personId, content, targetFace, detectionModel, userData, context); + } + } +} \ No newline at end of file diff --git a/sdk/face/Azure.AI.Vision.Face/src/Generated/AIVisionFaceClientBuilderExtensions.cs b/sdk/face/Azure.AI.Vision.Face/src/Generated/AIVisionFaceClientBuilderExtensions.cs index fdc44b3da4e3..d1ff0bc7e195 100644 --- a/sdk/face/Azure.AI.Vision.Face/src/Generated/AIVisionFaceClientBuilderExtensions.cs +++ b/sdk/face/Azure.AI.Vision.Face/src/Generated/AIVisionFaceClientBuilderExtensions.cs @@ -12,9 +12,34 @@ namespace Microsoft.Extensions.Azure { - /// Extension methods to add , to client builder. + /// Extension methods to add , , to client builder. public static partial class AIVisionFaceClientBuilderExtensions { + /// Registers a instance. + /// The builder to register with. + /// + /// Supported Cognitive Services endpoints (protocol and hostname, for example: + /// https://{resource-name}.cognitiveservices.azure.com). + /// + /// A credential used to authenticate to an Azure Service. + public static IAzureClientBuilder AddFaceAdministrationClient(this TBuilder builder, Uri endpoint, AzureKeyCredential credential) + where TBuilder : IAzureClientFactoryBuilder + { + return builder.RegisterClientFactory((options) => new FaceAdministrationClient(endpoint, credential, options)); + } + + /// Registers a instance. + /// The builder to register with. + /// + /// Supported Cognitive Services endpoints (protocol and hostname, for example: + /// https://{resource-name}.cognitiveservices.azure.com). + /// + public static IAzureClientBuilder AddFaceAdministrationClient(this TBuilder builder, Uri endpoint) + where TBuilder : IAzureClientFactoryBuilderWithCredential + { + return builder.RegisterClientFactory((options, cred) => new FaceAdministrationClient(endpoint, cred, options)); + } + /// Registers a instance. /// The builder to register with. /// @@ -65,6 +90,14 @@ public static IAzureClientBuilder((options, cred) => new FaceSessionClient(endpoint, cred, options)); } + /// Registers a instance. + /// The builder to register with. + /// The configuration values. + public static IAzureClientBuilder AddFaceAdministrationClient(this TBuilder builder, TConfiguration configuration) + where TBuilder : IAzureClientFactoryBuilderWithConfiguration + { + return builder.RegisterClientFactory(configuration); + } /// Registers a instance. /// The builder to register with. /// The configuration values. diff --git a/sdk/face/Azure.AI.Vision.Face/src/Generated/AIVisionFaceModelFactory.cs b/sdk/face/Azure.AI.Vision.Face/src/Generated/AIVisionFaceModelFactory.cs index f85eca044688..49e4e7fad35a 100644 --- a/sdk/face/Azure.AI.Vision.Face/src/Generated/AIVisionFaceModelFactory.cs +++ b/sdk/face/Azure.AI.Vision.Face/src/Generated/AIVisionFaceModelFactory.cs @@ -14,6 +14,93 @@ namespace Azure.AI.Vision.Face /// Model factory for models. public static partial class AIVisionFaceModelFactory { + /// Initializes a new instance of . + /// User defined name, maximum length is 128. + /// Optional user defined data. Length should not exceed 16K. + /// Name of recognition model. Recognition model is used when the face features are extracted and associated with detected faceIds. + /// ID of the container. + /// A new instance for mocking. + public static LargePersonGroup LargePersonGroup(string name = null, string userData = null, FaceRecognitionModel? recognitionModel = null, string largePersonGroupId = null) + { + return new LargePersonGroup(name, userData, recognitionModel, largePersonGroupId, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Training status of the container. + /// A combined UTC date and time string that describes the created time of the person group, large person group or large face list. + /// A combined UTC date and time string that describes the last modify time of the person group, large person group or large face list, could be null value when the group is not successfully trained. + /// A combined UTC date and time string that describes the last successful training time of the person group, large person group or large face list. + /// Show failure message when training failed (omitted when training succeed). + /// A new instance for mocking. + public static FaceTrainingResult FaceTrainingResult(FaceOperationStatus status = default, DateTimeOffset createdDateTime = default, DateTimeOffset lastActionDateTime = default, DateTimeOffset lastSuccessfulTrainingDateTime = default, string message = null) + { + return new FaceTrainingResult( + status, + createdDateTime, + lastActionDateTime, + lastSuccessfulTrainingDateTime, + message, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Person ID of the person. + /// A new instance for mocking. + public static CreatePersonResult CreatePersonResult(Guid personId = default) + { + return new CreatePersonResult(personId, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// ID of the person. + /// User defined name, maximum length is 128. + /// Optional user defined data. Length should not exceed 16K. + /// Face ids of registered faces in the person. + /// A new instance for mocking. + public static LargePersonGroupPerson LargePersonGroupPerson(Guid personId = default, string name = null, string userData = null, IEnumerable persistedFaceIds = null) + { + persistedFaceIds ??= new List(); + + return new LargePersonGroupPerson(personId, name, userData, persistedFaceIds?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Persisted Face ID of the added face, which is persisted and will not expire. Different from faceId which is created in "Detect" and will expire in 24 hours after the detection call. + /// A new instance for mocking. + public static AddFaceResult AddFaceResult(Guid persistedFaceId = default) + { + return new AddFaceResult(persistedFaceId, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Face ID of the face. + /// User-provided data attached to the face. The length limit is 1K. + /// A new instance for mocking. + public static LargePersonGroupPersonFace LargePersonGroupPersonFace(Guid persistedFaceId = default, string userData = null) + { + return new LargePersonGroupPersonFace(persistedFaceId, userData, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// User defined name, maximum length is 128. + /// Optional user defined data. Length should not exceed 16K. + /// Name of recognition model. Recognition model is used when the face features are extracted and associated with detected faceIds. + /// Valid character is letter in lower case or digit or '-' or '_', maximum length is 64. + /// A new instance for mocking. + public static LargeFaceList LargeFaceList(string name = null, string userData = null, FaceRecognitionModel? recognitionModel = null, string largeFaceListId = null) + { + return new LargeFaceList(name, userData, recognitionModel, largeFaceListId, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Face ID of the face. + /// User-provided data attached to the face. The length limit is 1K. + /// A new instance for mocking. + public static LargeFaceListFace LargeFaceListFace(Guid persistedFaceId = default, string userData = null) + { + return new LargeFaceListFace(persistedFaceId, userData, serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// Unique faceId of the detected face, created by detection API and it will expire 24 hours after the detection call. To return this, it requires 'returnFaceId' parameter to be true. /// The 'recognitionModel' associated with this faceId. This is only returned when 'returnRecognitionModel' is explicitly set as true. @@ -277,19 +364,43 @@ public static FaceGroupingResult FaceGroupingResult(IEnumerable> gro return new FaceGroupingResult(groups?.ToList(), messyGroup?.ToList(), serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// faceId of the query face. + /// Identified person candidates for that face (ranked by confidence). Array size should be no larger than input maxNumOfCandidatesReturned. If no person is identified, will return an empty array. + /// A new instance for mocking. + public static FaceIdentificationResult FaceIdentificationResult(Guid faceId = default, IEnumerable candidates = null) + { + candidates ??= new List(); + + return new FaceIdentificationResult(faceId, candidates?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// personId of candidate person. + /// Confidence value of the candidate. The higher confidence, the more similar. Range between [0,1]. + /// A new instance for mocking. + public static FaceIdentificationCandidate FaceIdentificationCandidate(Guid personId = default, float confidence = default) + { + return new FaceIdentificationCandidate(personId, confidence, serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// Type of liveness mode the client should follow. /// Whether or not to allow a '200 - Success' response body to be sent to the client, which may be undesirable for security reasons. Default is false, clients will receive a '204 - NoContent' empty body response. Regardless of selection, calling Session GetResult will always contain a response body enabling business logic to be implemented. /// Whether or not to allow client to set their own 'deviceCorrelationId' via the Vision SDK. Default is false, and 'deviceCorrelationId' must be set in this request body. + /// Whether or not store the session image. + /// The model version used for liveness classification. This is an optional parameter, and if this is not specified, then the latest supported model version will be chosen. /// Unique Guid per each end-user device. This is to provide rate limiting and anti-hammering. If 'deviceCorrelationIdSetInClient' is true in this request, this 'deviceCorrelationId' must be null. /// Seconds the session should last for. Range is 60 to 86400 seconds. Default value is 600. /// A new instance for mocking. - public static CreateLivenessSessionContent CreateLivenessSessionContent(LivenessOperationMode livenessOperationMode = default, bool? sendResultsToClient = null, bool? deviceCorrelationIdSetInClient = null, string deviceCorrelationId = null, int? authTokenTimeToLiveInSeconds = null) + public static CreateLivenessSessionContent CreateLivenessSessionContent(LivenessOperationMode livenessOperationMode = default, bool? sendResultsToClient = null, bool? deviceCorrelationIdSetInClient = null, bool? enableSessionImage = null, LivenessModel? livenessSingleModalModel = null, string deviceCorrelationId = null, int? authTokenTimeToLiveInSeconds = null) { return new CreateLivenessSessionContent( livenessOperationMode, sendResultsToClient, deviceCorrelationIdSetInClient, + enableSessionImage, + livenessSingleModalModel, deviceCorrelationId, authTokenTimeToLiveInSeconds, serializedAdditionalRawData: null); @@ -337,8 +448,10 @@ public static LivenessSession LivenessSession(string id = null, DateTimeOffset c /// The request of this entry. /// The response of this entry. /// The server calculated digest for this request. If the client reported digest differs from the server calculated digest, then the message integrity between the client and service has been compromised and the result should not be trusted. For more information, see how to guides on how to leverage this value to secure your end-to-end solution. + /// The image ID of the session request. + /// The sha256 hash of the verify-image in the request. /// A new instance for mocking. - public static LivenessSessionAuditEntry LivenessSessionAuditEntry(long id = default, string sessionId = null, string requestId = null, string clientRequestId = null, DateTimeOffset receivedDateTime = default, AuditRequestInfo request = null, AuditLivenessResponseInfo response = null, string digest = null) + public static LivenessSessionAuditEntry LivenessSessionAuditEntry(long id = default, string sessionId = null, string requestId = null, string clientRequestId = null, DateTimeOffset receivedDateTime = default, AuditRequestInfo request = null, AuditLivenessResponseInfo response = null, string digest = null, string sessionImageId = null, string verifyImageHash = null) { return new LivenessSessionAuditEntry( id, @@ -349,6 +462,8 @@ public static LivenessSessionAuditEntry LivenessSessionAuditEntry(long id = defa request, response, digest, + sessionImageId, + verifyImageHash, serializedAdditionalRawData: null); } @@ -444,6 +559,32 @@ public static LivenessSessionItem LivenessSessionItem(string id = null, DateTime serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// Type of liveness mode the client should follow. + /// Whether or not to allow a '200 - Success' response body to be sent to the client, which may be undesirable for security reasons. Default is false, clients will receive a '204 - NoContent' empty body response. Regardless of selection, calling Session GetResult will always contain a response body enabling business logic to be implemented. + /// Whether or not to allow client to set their own 'deviceCorrelationId' via the Vision SDK. Default is false, and 'deviceCorrelationId' must be set in this request body. + /// Whether or not store the session image. + /// The model version used for liveness classification. This is an optional parameter, and if this is not specified, then the latest supported model version will be chosen. + /// Unique Guid per each end-user device. This is to provide rate limiting and anti-hammering. If 'deviceCorrelationIdSetInClient' is true in this request, this 'deviceCorrelationId' must be null. + /// Seconds the session should last for. Range is 60 to 86400 seconds. Default value is 600. + /// Whether or not return the verify image hash. + /// Threshold for confidence of the face verification. + /// A new instance for mocking. + public static CreateLivenessWithVerifySessionContent CreateLivenessWithVerifySessionContent(LivenessOperationMode livenessOperationMode = default, bool? sendResultsToClient = null, bool? deviceCorrelationIdSetInClient = null, bool? enableSessionImage = null, LivenessModel? livenessSingleModalModel = null, string deviceCorrelationId = null, int? authTokenTimeToLiveInSeconds = null, bool? returnVerifyImageHash = null, float? verifyConfidenceThreshold = null) + { + return new CreateLivenessWithVerifySessionContent( + livenessOperationMode, + sendResultsToClient, + deviceCorrelationIdSetInClient, + enableSessionImage, + livenessSingleModalModel, + deviceCorrelationId, + authTokenTimeToLiveInSeconds, + returnVerifyImageHash, + verifyConfidenceThreshold, + serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The unique session ID of the created session. It will expire 48 hours after it was created or may be deleted sooner using the corresponding Session DELETE operation. /// Bearer token to provide authentication for the Vision SDK running on a client application. This Bearer token has limited permissions to perform only the required action and expires after the TTL time. It is also auditable. diff --git a/sdk/ai/Azure.AI.Inference/src/Generated/UnknownChatCompletionsNamedToolSelection.Serialization.cs b/sdk/face/Azure.AI.Vision.Face/src/Generated/AddFaceFromUrlRequest.Serialization.cs similarity index 54% rename from sdk/ai/Azure.AI.Inference/src/Generated/UnknownChatCompletionsNamedToolSelection.Serialization.cs rename to sdk/face/Azure.AI.Vision.Face/src/Generated/AddFaceFromUrlRequest.Serialization.cs index c3c50bb2e9e9..4068e6fba19a 100644 --- a/sdk/ai/Azure.AI.Inference/src/Generated/UnknownChatCompletionsNamedToolSelection.Serialization.cs +++ b/sdk/face/Azure.AI.Vision.Face/src/Generated/AddFaceFromUrlRequest.Serialization.cs @@ -11,23 +11,23 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Inference +namespace Azure.AI.Vision.Face { - internal partial class UnknownChatCompletionsNamedToolSelection : IUtf8JsonSerializable, IJsonModel + internal partial class AddFaceFromUrlRequest : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(ChatCompletionsNamedToolSelection)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(AddFaceFromUrlRequest)} does not support writing '{format}' format."); } writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type); + writer.WritePropertyName("url"u8); + writer.WriteStringValue(Uri.AbsoluteUri); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -46,19 +46,19 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteEndObject(); } - ChatCompletionsNamedToolSelection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + AddFaceFromUrlRequest IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(ChatCompletionsNamedToolSelection)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(AddFaceFromUrlRequest)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeChatCompletionsNamedToolSelection(document.RootElement, options); + return DeserializeAddFaceFromUrlRequest(document.RootElement, options); } - internal static UnknownChatCompletionsNamedToolSelection DeserializeUnknownChatCompletionsNamedToolSelection(JsonElement element, ModelReaderWriterOptions options = null) + internal static AddFaceFromUrlRequest DeserializeAddFaceFromUrlRequest(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -66,14 +66,14 @@ internal static UnknownChatCompletionsNamedToolSelection DeserializeUnknownChatC { return null; } - string type = "Unknown"; + Uri url = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("type"u8)) + if (property.NameEquals("url"u8)) { - type = property.Value.GetString(); + url = new Uri(property.Value.GetString()); continue; } if (options.Format != "W") @@ -82,53 +82,53 @@ internal static UnknownChatCompletionsNamedToolSelection DeserializeUnknownChatC } } serializedAdditionalRawData = rawDataDictionary; - return new UnknownChatCompletionsNamedToolSelection(type, serializedAdditionalRawData); + return new AddFaceFromUrlRequest(url, serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options); default: - throw new FormatException($"The model {nameof(ChatCompletionsNamedToolSelection)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(AddFaceFromUrlRequest)} does not support writing '{options.Format}' format."); } } - ChatCompletionsNamedToolSelection IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + AddFaceFromUrlRequest IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data); - return DeserializeChatCompletionsNamedToolSelection(document.RootElement, options); + return DeserializeAddFaceFromUrlRequest(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(ChatCompletionsNamedToolSelection)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(AddFaceFromUrlRequest)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; /// Deserializes the model from a raw response. /// The response to deserialize the model from. - internal static new UnknownChatCompletionsNamedToolSelection FromResponse(Response response) + internal static AddFaceFromUrlRequest FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); - return DeserializeUnknownChatCompletionsNamedToolSelection(document.RootElement); + return DeserializeAddFaceFromUrlRequest(document.RootElement); } /// Convert into a . - internal override RequestContent ToRequestContent() + internal virtual RequestContent ToRequestContent() { var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); return content; } } diff --git a/sdk/face/Azure.AI.Vision.Face/src/Generated/AddFaceFromUrlRequest.cs b/sdk/face/Azure.AI.Vision.Face/src/Generated/AddFaceFromUrlRequest.cs new file mode 100644 index 000000000000..f6d64f1102d7 --- /dev/null +++ b/sdk/face/Azure.AI.Vision.Face/src/Generated/AddFaceFromUrlRequest.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Vision.Face +{ + /// The AddFaceFromUrlRequest. + internal partial class AddFaceFromUrlRequest + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// URL of input image. + /// is null. + internal AddFaceFromUrlRequest(Uri uri) + { + Argument.AssertNotNull(uri, nameof(uri)); + + Uri = uri; + } + + /// Initializes a new instance of . + /// URL of input image. + /// Keeps track of any properties unknown to the library. + internal AddFaceFromUrlRequest(Uri uri, IDictionary serializedAdditionalRawData) + { + Uri = uri; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AddFaceFromUrlRequest() + { + } + + /// URL of input image. + public Uri Uri { get; } + } +} diff --git a/sdk/face/Azure.AI.Vision.Face/src/Generated/AddFaceFromUrlRequest1.Serialization.cs b/sdk/face/Azure.AI.Vision.Face/src/Generated/AddFaceFromUrlRequest1.Serialization.cs new file mode 100644 index 000000000000..6afe63d8fb43 --- /dev/null +++ b/sdk/face/Azure.AI.Vision.Face/src/Generated/AddFaceFromUrlRequest1.Serialization.cs @@ -0,0 +1,135 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Vision.Face +{ + internal partial class AddFaceFromUrlRequest1 : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AddFaceFromUrlRequest1)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("url"u8); + writer.WriteStringValue(Uri.AbsoluteUri); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + AddFaceFromUrlRequest1 IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AddFaceFromUrlRequest1)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAddFaceFromUrlRequest1(document.RootElement, options); + } + + internal static AddFaceFromUrlRequest1 DeserializeAddFaceFromUrlRequest1(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Uri url = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("url"u8)) + { + url = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AddFaceFromUrlRequest1(url, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AddFaceFromUrlRequest1)} does not support writing '{options.Format}' format."); + } + } + + AddFaceFromUrlRequest1 IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeAddFaceFromUrlRequest1(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AddFaceFromUrlRequest1)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AddFaceFromUrlRequest1 FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeAddFaceFromUrlRequest1(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/face/Azure.AI.Vision.Face/src/Generated/AddFaceFromUrlRequest1.cs b/sdk/face/Azure.AI.Vision.Face/src/Generated/AddFaceFromUrlRequest1.cs new file mode 100644 index 000000000000..2bce74bdbf08 --- /dev/null +++ b/sdk/face/Azure.AI.Vision.Face/src/Generated/AddFaceFromUrlRequest1.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Vision.Face +{ + /// The AddFaceFromUrlRequest1. + internal partial class AddFaceFromUrlRequest1 + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// URL of input image. + /// is null. + internal AddFaceFromUrlRequest1(Uri uri) + { + Argument.AssertNotNull(uri, nameof(uri)); + + Uri = uri; + } + + /// Initializes a new instance of . + /// URL of input image. + /// Keeps track of any properties unknown to the library. + internal AddFaceFromUrlRequest1(Uri uri, IDictionary serializedAdditionalRawData) + { + Uri = uri; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AddFaceFromUrlRequest1() + { + } + + /// URL of input image. + public Uri Uri { get; } + } +} diff --git a/sdk/face/Azure.AI.Vision.Face/src/Generated/AddFaceResult.Serialization.cs b/sdk/face/Azure.AI.Vision.Face/src/Generated/AddFaceResult.Serialization.cs new file mode 100644 index 000000000000..716408b25a91 --- /dev/null +++ b/sdk/face/Azure.AI.Vision.Face/src/Generated/AddFaceResult.Serialization.cs @@ -0,0 +1,135 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Vision.Face +{ + public partial class AddFaceResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AddFaceResult)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("persistedFaceId"u8); + writer.WriteStringValue(PersistedFaceId); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + AddFaceResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AddFaceResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAddFaceResult(document.RootElement, options); + } + + internal static AddFaceResult DeserializeAddFaceResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Guid persistedFaceId = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("persistedFaceId"u8)) + { + persistedFaceId = property.Value.GetGuid(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AddFaceResult(persistedFaceId, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AddFaceResult)} does not support writing '{options.Format}' format."); + } + } + + AddFaceResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeAddFaceResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AddFaceResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AddFaceResult FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeAddFaceResult(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/face/Azure.AI.Vision.Face/src/Generated/AddFaceResult.cs b/sdk/face/Azure.AI.Vision.Face/src/Generated/AddFaceResult.cs new file mode 100644 index 000000000000..28ad972fc9d5 --- /dev/null +++ b/sdk/face/Azure.AI.Vision.Face/src/Generated/AddFaceResult.cs @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Vision.Face +{ + /// Response body for adding face. + public partial class AddFaceResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Persisted Face ID of the added face, which is persisted and will not expire. Different from faceId which is created in "Detect" and will expire in 24 hours after the detection call. + internal AddFaceResult(Guid persistedFaceId) + { + PersistedFaceId = persistedFaceId; + } + + /// Initializes a new instance of . + /// Persisted Face ID of the added face, which is persisted and will not expire. Different from faceId which is created in "Detect" and will expire in 24 hours after the detection call. + /// Keeps track of any properties unknown to the library. + internal AddFaceResult(Guid persistedFaceId, IDictionary serializedAdditionalRawData) + { + PersistedFaceId = persistedFaceId; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AddFaceResult() + { + } + + /// Persisted Face ID of the added face, which is persisted and will not expire. Different from faceId which is created in "Detect" and will expire in 24 hours after the detection call. + public Guid PersistedFaceId { get; } + } +} diff --git a/sdk/face/Azure.AI.Vision.Face/src/Generated/AzureAIVisionFaceClientOptions.cs b/sdk/face/Azure.AI.Vision.Face/src/Generated/AzureAIVisionFaceClientOptions.cs index a8cf7ed227cc..a27f25f2a008 100644 --- a/sdk/face/Azure.AI.Vision.Face/src/Generated/AzureAIVisionFaceClientOptions.cs +++ b/sdk/face/Azure.AI.Vision.Face/src/Generated/AzureAIVisionFaceClientOptions.cs @@ -13,13 +13,15 @@ namespace Azure.AI.Vision.Face /// Client options for Azure.AI.Vision.Face library clients. public partial class AzureAIVisionFaceClientOptions : ClientOptions { - private const ServiceVersion LatestVersion = ServiceVersion.V1_1_Preview_1; + private const ServiceVersion LatestVersion = ServiceVersion.V1_2_Preview_1; /// The version of the service to use. public enum ServiceVersion { /// Service version "v1.1-preview.1". V1_1_Preview_1 = 1, + /// Service version "v1.2-preview.1". + V1_2_Preview_1 = 2, } internal string Version { get; } @@ -30,6 +32,7 @@ public AzureAIVisionFaceClientOptions(ServiceVersion version = LatestVersion) Version = version switch { ServiceVersion.V1_1_Preview_1 => "v1.1-preview.1", + ServiceVersion.V1_2_Preview_1 => "v1.2-preview.1", _ => throw new NotSupportedException() }; } diff --git a/sdk/face/Azure.AI.Vision.Face/src/Generated/CreateLivenessSessionContent.Serialization.cs b/sdk/face/Azure.AI.Vision.Face/src/Generated/CreateLivenessSessionContent.Serialization.cs index 5890a4f74258..b32ad1822811 100644 --- a/sdk/face/Azure.AI.Vision.Face/src/Generated/CreateLivenessSessionContent.Serialization.cs +++ b/sdk/face/Azure.AI.Vision.Face/src/Generated/CreateLivenessSessionContent.Serialization.cs @@ -38,6 +38,16 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model writer.WritePropertyName("deviceCorrelationIdSetInClient"u8); writer.WriteBooleanValue(DeviceCorrelationIdSetInClient.Value); } + if (Optional.IsDefined(EnableSessionImage)) + { + writer.WritePropertyName("enableSessionImage"u8); + writer.WriteBooleanValue(EnableSessionImage.Value); + } + if (Optional.IsDefined(LivenessSingleModalModel)) + { + writer.WritePropertyName("livenessSingleModalModel"u8); + writer.WriteStringValue(LivenessSingleModalModel.Value.ToString()); + } if (Optional.IsDefined(DeviceCorrelationId)) { writer.WritePropertyName("deviceCorrelationId"u8); @@ -89,6 +99,8 @@ internal static CreateLivenessSessionContent DeserializeCreateLivenessSessionCon LivenessOperationMode livenessOperationMode = default; bool? sendResultsToClient = default; bool? deviceCorrelationIdSetInClient = default; + bool? enableSessionImage = default; + LivenessModel? livenessSingleModalModel = default; string deviceCorrelationId = default; int? authTokenTimeToLiveInSeconds = default; IDictionary serializedAdditionalRawData = default; @@ -118,6 +130,24 @@ internal static CreateLivenessSessionContent DeserializeCreateLivenessSessionCon deviceCorrelationIdSetInClient = property.Value.GetBoolean(); continue; } + if (property.NameEquals("enableSessionImage"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + enableSessionImage = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("livenessSingleModalModel"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + livenessSingleModalModel = new LivenessModel(property.Value.GetString()); + continue; + } if (property.NameEquals("deviceCorrelationId"u8)) { deviceCorrelationId = property.Value.GetString(); @@ -142,6 +172,8 @@ internal static CreateLivenessSessionContent DeserializeCreateLivenessSessionCon livenessOperationMode, sendResultsToClient, deviceCorrelationIdSetInClient, + enableSessionImage, + livenessSingleModalModel, deviceCorrelationId, authTokenTimeToLiveInSeconds, serializedAdditionalRawData); diff --git a/sdk/face/Azure.AI.Vision.Face/src/Generated/CreateLivenessSessionContent.cs b/sdk/face/Azure.AI.Vision.Face/src/Generated/CreateLivenessSessionContent.cs index eb27333cbe93..9de38ee841c6 100644 --- a/sdk/face/Azure.AI.Vision.Face/src/Generated/CreateLivenessSessionContent.cs +++ b/sdk/face/Azure.AI.Vision.Face/src/Generated/CreateLivenessSessionContent.cs @@ -10,7 +10,7 @@ namespace Azure.AI.Vision.Face { - /// Request for creating liveness session. + /// Request model for creating liveness session. public partial class CreateLivenessSessionContent { /// @@ -56,14 +56,18 @@ public CreateLivenessSessionContent(LivenessOperationMode livenessOperationMode) /// Type of liveness mode the client should follow. /// Whether or not to allow a '200 - Success' response body to be sent to the client, which may be undesirable for security reasons. Default is false, clients will receive a '204 - NoContent' empty body response. Regardless of selection, calling Session GetResult will always contain a response body enabling business logic to be implemented. /// Whether or not to allow client to set their own 'deviceCorrelationId' via the Vision SDK. Default is false, and 'deviceCorrelationId' must be set in this request body. + /// Whether or not store the session image. + /// The model version used for liveness classification. This is an optional parameter, and if this is not specified, then the latest supported model version will be chosen. /// Unique Guid per each end-user device. This is to provide rate limiting and anti-hammering. If 'deviceCorrelationIdSetInClient' is true in this request, this 'deviceCorrelationId' must be null. /// Seconds the session should last for. Range is 60 to 86400 seconds. Default value is 600. /// Keeps track of any properties unknown to the library. - internal CreateLivenessSessionContent(LivenessOperationMode livenessOperationMode, bool? sendResultsToClient, bool? deviceCorrelationIdSetInClient, string deviceCorrelationId, int? authTokenTimeToLiveInSeconds, IDictionary serializedAdditionalRawData) + internal CreateLivenessSessionContent(LivenessOperationMode livenessOperationMode, bool? sendResultsToClient, bool? deviceCorrelationIdSetInClient, bool? enableSessionImage, LivenessModel? livenessSingleModalModel, string deviceCorrelationId, int? authTokenTimeToLiveInSeconds, IDictionary serializedAdditionalRawData) { LivenessOperationMode = livenessOperationMode; SendResultsToClient = sendResultsToClient; DeviceCorrelationIdSetInClient = deviceCorrelationIdSetInClient; + EnableSessionImage = enableSessionImage; + LivenessSingleModalModel = livenessSingleModalModel; DeviceCorrelationId = deviceCorrelationId; AuthTokenTimeToLiveInSeconds = authTokenTimeToLiveInSeconds; _serializedAdditionalRawData = serializedAdditionalRawData; @@ -80,6 +84,10 @@ internal CreateLivenessSessionContent() public bool? SendResultsToClient { get; set; } /// Whether or not to allow client to set their own 'deviceCorrelationId' via the Vision SDK. Default is false, and 'deviceCorrelationId' must be set in this request body. public bool? DeviceCorrelationIdSetInClient { get; set; } + /// Whether or not store the session image. + public bool? EnableSessionImage { get; set; } + /// The model version used for liveness classification. This is an optional parameter, and if this is not specified, then the latest supported model version will be chosen. + public LivenessModel? LivenessSingleModalModel { get; set; } /// Unique Guid per each end-user device. This is to provide rate limiting and anti-hammering. If 'deviceCorrelationIdSetInClient' is true in this request, this 'deviceCorrelationId' must be null. public string DeviceCorrelationId { get; set; } /// Seconds the session should last for. Range is 60 to 86400 seconds. Default value is 600. diff --git a/sdk/face/Azure.AI.Vision.Face/src/Generated/CreateLivenessWithVerifySessionContent.Serialization.cs b/sdk/face/Azure.AI.Vision.Face/src/Generated/CreateLivenessWithVerifySessionContent.Serialization.cs index 6b713f68b180..443812ef9cf0 100644 --- a/sdk/face/Azure.AI.Vision.Face/src/Generated/CreateLivenessWithVerifySessionContent.Serialization.cs +++ b/sdk/face/Azure.AI.Vision.Face/src/Generated/CreateLivenessWithVerifySessionContent.Serialization.cs @@ -8,13 +8,12 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; -using System.IO; using System.Text.Json; using Azure.Core; namespace Azure.AI.Vision.Face { - internal partial class CreateLivenessWithVerifySessionContent : IUtf8JsonSerializable, IJsonModel + public partial class CreateLivenessWithVerifySessionContent : IUtf8JsonSerializable, IJsonModel { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); @@ -27,17 +26,48 @@ void IJsonModel.Write(Utf8JsonWriter wri } writer.WriteStartObject(); - writer.WritePropertyName("Parameters"u8); - writer.WriteObjectValue(Parameters, options); - writer.WritePropertyName("VerifyImage"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(global::System.BinaryData.FromStream(VerifyImage)); -#else - using (JsonDocument document = JsonDocument.Parse(BinaryData.FromStream(VerifyImage))) + writer.WritePropertyName("livenessOperationMode"u8); + writer.WriteStringValue(LivenessOperationMode.ToString()); + if (Optional.IsDefined(SendResultsToClient)) { - JsonSerializer.Serialize(writer, document.RootElement); + writer.WritePropertyName("sendResultsToClient"u8); + writer.WriteBooleanValue(SendResultsToClient.Value); + } + if (Optional.IsDefined(DeviceCorrelationIdSetInClient)) + { + writer.WritePropertyName("deviceCorrelationIdSetInClient"u8); + writer.WriteBooleanValue(DeviceCorrelationIdSetInClient.Value); + } + if (Optional.IsDefined(EnableSessionImage)) + { + writer.WritePropertyName("enableSessionImage"u8); + writer.WriteBooleanValue(EnableSessionImage.Value); + } + if (Optional.IsDefined(LivenessSingleModalModel)) + { + writer.WritePropertyName("livenessSingleModalModel"u8); + writer.WriteStringValue(LivenessSingleModalModel.Value.ToString()); + } + if (Optional.IsDefined(DeviceCorrelationId)) + { + writer.WritePropertyName("deviceCorrelationId"u8); + writer.WriteStringValue(DeviceCorrelationId); + } + if (Optional.IsDefined(AuthTokenTimeToLiveInSeconds)) + { + writer.WritePropertyName("authTokenTimeToLiveInSeconds"u8); + writer.WriteNumberValue(AuthTokenTimeToLiveInSeconds.Value); + } + if (Optional.IsDefined(ReturnVerifyImageHash)) + { + writer.WritePropertyName("returnVerifyImageHash"u8); + writer.WriteBooleanValue(ReturnVerifyImageHash.Value); + } + if (Optional.IsDefined(VerifyConfidenceThreshold)) + { + writer.WritePropertyName("verifyConfidenceThreshold"u8); + writer.WriteNumberValue(VerifyConfidenceThreshold.Value); } -#endif if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -76,20 +106,90 @@ internal static CreateLivenessWithVerifySessionContent DeserializeCreateLiveness { return null; } - CreateLivenessSessionContent parameters = default; - Stream verifyImage = default; + LivenessOperationMode livenessOperationMode = default; + bool? sendResultsToClient = default; + bool? deviceCorrelationIdSetInClient = default; + bool? enableSessionImage = default; + LivenessModel? livenessSingleModalModel = default; + string deviceCorrelationId = default; + int? authTokenTimeToLiveInSeconds = default; + bool? returnVerifyImageHash = default; + float? verifyConfidenceThreshold = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("Parameters"u8)) + if (property.NameEquals("livenessOperationMode"u8)) + { + livenessOperationMode = new LivenessOperationMode(property.Value.GetString()); + continue; + } + if (property.NameEquals("sendResultsToClient"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sendResultsToClient = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("deviceCorrelationIdSetInClient"u8)) { - parameters = CreateLivenessSessionContent.DeserializeCreateLivenessSessionContent(property.Value, options); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + deviceCorrelationIdSetInClient = property.Value.GetBoolean(); continue; } - if (property.NameEquals("VerifyImage"u8)) + if (property.NameEquals("enableSessionImage"u8)) { - verifyImage = BinaryData.FromString(property.Value.GetRawText()).ToStream(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + enableSessionImage = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("livenessSingleModalModel"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + livenessSingleModalModel = new LivenessModel(property.Value.GetString()); + continue; + } + if (property.NameEquals("deviceCorrelationId"u8)) + { + deviceCorrelationId = property.Value.GetString(); + continue; + } + if (property.NameEquals("authTokenTimeToLiveInSeconds"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + authTokenTimeToLiveInSeconds = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("returnVerifyImageHash"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + returnVerifyImageHash = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("verifyConfidenceThreshold"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + verifyConfidenceThreshold = property.Value.GetSingle(); continue; } if (options.Format != "W") @@ -98,30 +198,17 @@ internal static CreateLivenessWithVerifySessionContent DeserializeCreateLiveness } } serializedAdditionalRawData = rawDataDictionary; - return new CreateLivenessWithVerifySessionContent(parameters, verifyImage, serializedAdditionalRawData); - } - - private BinaryData SerializeMultipart(ModelReaderWriterOptions options) - { - using MultipartFormDataRequestContent content = ToMultipartRequestContent(); - using MemoryStream stream = new MemoryStream(); - content.WriteTo(stream); - if (stream.Position > int.MaxValue) - { - return BinaryData.FromStream(stream); - } - else - { - return new BinaryData(stream.GetBuffer().AsMemory(0, (int)stream.Position)); - } - } - - internal virtual MultipartFormDataRequestContent ToMultipartRequestContent() - { - MultipartFormDataRequestContent content = new MultipartFormDataRequestContent(); - content.Add(ModelReaderWriter.Write(Parameters, ModelSerializationExtensions.WireOptions), "Parameters"); - content.Add(VerifyImage, "VerifyImage", "VerifyImage", "application/octet-stream"); - return content; + return new CreateLivenessWithVerifySessionContent( + livenessOperationMode, + sendResultsToClient, + deviceCorrelationIdSetInClient, + enableSessionImage, + livenessSingleModalModel, + deviceCorrelationId, + authTokenTimeToLiveInSeconds, + returnVerifyImageHash, + verifyConfidenceThreshold, + serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) @@ -132,8 +219,6 @@ BinaryData IPersistableModel.Write(Model { case "J": return ModelReaderWriter.Write(this, options); - case "MFD": - return SerializeMultipart(options); default: throw new FormatException($"The model {nameof(CreateLivenessWithVerifySessionContent)} does not support writing '{options.Format}' format."); } @@ -155,7 +240,7 @@ CreateLivenessWithVerifySessionContent IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "MFD"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; /// Deserializes the model from a raw response. /// The response to deserialize the model from. diff --git a/sdk/face/Azure.AI.Vision.Face/src/Generated/CreateLivenessWithVerifySessionContent.cs b/sdk/face/Azure.AI.Vision.Face/src/Generated/CreateLivenessWithVerifySessionContent.cs index 5d6d724fdbda..99e890eaf7e3 100644 --- a/sdk/face/Azure.AI.Vision.Face/src/Generated/CreateLivenessWithVerifySessionContent.cs +++ b/sdk/face/Azure.AI.Vision.Face/src/Generated/CreateLivenessWithVerifySessionContent.cs @@ -7,12 +7,11 @@ using System; using System.Collections.Generic; -using System.IO; namespace Azure.AI.Vision.Face { - /// Request of liveness with verify session creation. - internal partial class CreateLivenessWithVerifySessionContent + /// Request for creating liveness with verify session. + public partial class CreateLivenessWithVerifySessionContent { /// /// Keeps track of any properties unknown to the library. @@ -47,26 +46,34 @@ internal partial class CreateLivenessWithVerifySessionContent private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// The parameters for creating session. - /// The image stream for verify. Content-Disposition header field for this part must have filename. - /// or is null. - public CreateLivenessWithVerifySessionContent(CreateLivenessSessionContent parameters, Stream verifyImage) + /// Type of liveness mode the client should follow. + public CreateLivenessWithVerifySessionContent(LivenessOperationMode livenessOperationMode) { - Argument.AssertNotNull(parameters, nameof(parameters)); - Argument.AssertNotNull(verifyImage, nameof(verifyImage)); - - Parameters = parameters; - VerifyImage = verifyImage; + LivenessOperationMode = livenessOperationMode; } /// Initializes a new instance of . - /// The parameters for creating session. - /// The image stream for verify. Content-Disposition header field for this part must have filename. + /// Type of liveness mode the client should follow. + /// Whether or not to allow a '200 - Success' response body to be sent to the client, which may be undesirable for security reasons. Default is false, clients will receive a '204 - NoContent' empty body response. Regardless of selection, calling Session GetResult will always contain a response body enabling business logic to be implemented. + /// Whether or not to allow client to set their own 'deviceCorrelationId' via the Vision SDK. Default is false, and 'deviceCorrelationId' must be set in this request body. + /// Whether or not store the session image. + /// The model version used for liveness classification. This is an optional parameter, and if this is not specified, then the latest supported model version will be chosen. + /// Unique Guid per each end-user device. This is to provide rate limiting and anti-hammering. If 'deviceCorrelationIdSetInClient' is true in this request, this 'deviceCorrelationId' must be null. + /// Seconds the session should last for. Range is 60 to 86400 seconds. Default value is 600. + /// Whether or not return the verify image hash. + /// Threshold for confidence of the face verification. /// Keeps track of any properties unknown to the library. - internal CreateLivenessWithVerifySessionContent(CreateLivenessSessionContent parameters, Stream verifyImage, IDictionary serializedAdditionalRawData) + internal CreateLivenessWithVerifySessionContent(LivenessOperationMode livenessOperationMode, bool? sendResultsToClient, bool? deviceCorrelationIdSetInClient, bool? enableSessionImage, LivenessModel? livenessSingleModalModel, string deviceCorrelationId, int? authTokenTimeToLiveInSeconds, bool? returnVerifyImageHash, float? verifyConfidenceThreshold, IDictionary serializedAdditionalRawData) { - Parameters = parameters; - VerifyImage = verifyImage; + LivenessOperationMode = livenessOperationMode; + SendResultsToClient = sendResultsToClient; + DeviceCorrelationIdSetInClient = deviceCorrelationIdSetInClient; + EnableSessionImage = enableSessionImage; + LivenessSingleModalModel = livenessSingleModalModel; + DeviceCorrelationId = deviceCorrelationId; + AuthTokenTimeToLiveInSeconds = authTokenTimeToLiveInSeconds; + ReturnVerifyImageHash = returnVerifyImageHash; + VerifyConfidenceThreshold = verifyConfidenceThreshold; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -75,9 +82,23 @@ internal CreateLivenessWithVerifySessionContent() { } - /// The parameters for creating session. - public CreateLivenessSessionContent Parameters { get; } - /// The image stream for verify. Content-Disposition header field for this part must have filename. - public Stream VerifyImage { get; } + /// Type of liveness mode the client should follow. + public LivenessOperationMode LivenessOperationMode { get; } + /// Whether or not to allow a '200 - Success' response body to be sent to the client, which may be undesirable for security reasons. Default is false, clients will receive a '204 - NoContent' empty body response. Regardless of selection, calling Session GetResult will always contain a response body enabling business logic to be implemented. + public bool? SendResultsToClient { get; set; } + /// Whether or not to allow client to set their own 'deviceCorrelationId' via the Vision SDK. Default is false, and 'deviceCorrelationId' must be set in this request body. + public bool? DeviceCorrelationIdSetInClient { get; set; } + /// Whether or not store the session image. + public bool? EnableSessionImage { get; set; } + /// The model version used for liveness classification. This is an optional parameter, and if this is not specified, then the latest supported model version will be chosen. + public LivenessModel? LivenessSingleModalModel { get; set; } + /// Unique Guid per each end-user device. This is to provide rate limiting and anti-hammering. If 'deviceCorrelationIdSetInClient' is true in this request, this 'deviceCorrelationId' must be null. + public string DeviceCorrelationId { get; set; } + /// Seconds the session should last for. Range is 60 to 86400 seconds. Default value is 600. + public int? AuthTokenTimeToLiveInSeconds { get; set; } + /// Whether or not return the verify image hash. + public bool? ReturnVerifyImageHash { get; set; } + /// Threshold for confidence of the face verification. + public float? VerifyConfidenceThreshold { get; set; } } } diff --git a/sdk/face/Azure.AI.Vision.Face/src/Generated/CreateLivenessWithVerifySessionMultipartContent.Serialization.cs b/sdk/face/Azure.AI.Vision.Face/src/Generated/CreateLivenessWithVerifySessionMultipartContent.Serialization.cs new file mode 100644 index 000000000000..cccaed59a390 --- /dev/null +++ b/sdk/face/Azure.AI.Vision.Face/src/Generated/CreateLivenessWithVerifySessionMultipartContent.Serialization.cs @@ -0,0 +1,176 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Vision.Face +{ + internal partial class CreateLivenessWithVerifySessionMultipartContent : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CreateLivenessWithVerifySessionMultipartContent)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("Parameters"u8); + writer.WriteObjectValue(Parameters, options); + writer.WritePropertyName("VerifyImage"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(global::System.BinaryData.FromStream(VerifyImage)); +#else + using (JsonDocument document = JsonDocument.Parse(BinaryData.FromStream(VerifyImage))) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + CreateLivenessWithVerifySessionMultipartContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CreateLivenessWithVerifySessionMultipartContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCreateLivenessWithVerifySessionMultipartContent(document.RootElement, options); + } + + internal static CreateLivenessWithVerifySessionMultipartContent DeserializeCreateLivenessWithVerifySessionMultipartContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + CreateLivenessWithVerifySessionContent parameters = default; + Stream verifyImage = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("Parameters"u8)) + { + parameters = CreateLivenessWithVerifySessionContent.DeserializeCreateLivenessWithVerifySessionContent(property.Value, options); + continue; + } + if (property.NameEquals("VerifyImage"u8)) + { + verifyImage = BinaryData.FromString(property.Value.GetRawText()).ToStream(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CreateLivenessWithVerifySessionMultipartContent(parameters, verifyImage, serializedAdditionalRawData); + } + + private BinaryData SerializeMultipart(ModelReaderWriterOptions options) + { + using MultipartFormDataRequestContent content = ToMultipartRequestContent(); + using MemoryStream stream = new MemoryStream(); + content.WriteTo(stream); + if (stream.Position > int.MaxValue) + { + return BinaryData.FromStream(stream); + } + else + { + return new BinaryData(stream.GetBuffer().AsMemory(0, (int)stream.Position)); + } + } + + internal virtual MultipartFormDataRequestContent ToMultipartRequestContent() + { + MultipartFormDataRequestContent content = new MultipartFormDataRequestContent(); + content.Add(ModelReaderWriter.Write(Parameters, ModelSerializationExtensions.WireOptions), "Parameters"); + content.Add(VerifyImage, "VerifyImage", "VerifyImage", "application/octet-stream"); + return content; + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "MFD": + return SerializeMultipart(options); + default: + throw new FormatException($"The model {nameof(CreateLivenessWithVerifySessionMultipartContent)} does not support writing '{options.Format}' format."); + } + } + + CreateLivenessWithVerifySessionMultipartContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeCreateLivenessWithVerifySessionMultipartContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CreateLivenessWithVerifySessionMultipartContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "MFD"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static CreateLivenessWithVerifySessionMultipartContent FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeCreateLivenessWithVerifySessionMultipartContent(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/face/Azure.AI.Vision.Face/src/Generated/CreateLivenessWithVerifySessionMultipartContent.cs b/sdk/face/Azure.AI.Vision.Face/src/Generated/CreateLivenessWithVerifySessionMultipartContent.cs new file mode 100644 index 000000000000..972c14733528 --- /dev/null +++ b/sdk/face/Azure.AI.Vision.Face/src/Generated/CreateLivenessWithVerifySessionMultipartContent.cs @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.IO; + +namespace Azure.AI.Vision.Face +{ + /// Request of liveness with verify session creation. + internal partial class CreateLivenessWithVerifySessionMultipartContent + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The parameters for creating session. + /// The image stream for verify. Content-Disposition header field for this part must have filename. + /// or is null. + public CreateLivenessWithVerifySessionMultipartContent(CreateLivenessWithVerifySessionContent parameters, Stream verifyImage) + { + Argument.AssertNotNull(parameters, nameof(parameters)); + Argument.AssertNotNull(verifyImage, nameof(verifyImage)); + + Parameters = parameters; + VerifyImage = verifyImage; + } + + /// Initializes a new instance of . + /// The parameters for creating session. + /// The image stream for verify. Content-Disposition header field for this part must have filename. + /// Keeps track of any properties unknown to the library. + internal CreateLivenessWithVerifySessionMultipartContent(CreateLivenessWithVerifySessionContent parameters, Stream verifyImage, IDictionary serializedAdditionalRawData) + { + Parameters = parameters; + VerifyImage = verifyImage; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal CreateLivenessWithVerifySessionMultipartContent() + { + } + + /// The parameters for creating session. + public CreateLivenessWithVerifySessionContent Parameters { get; } + /// The image stream for verify. Content-Disposition header field for this part must have filename. + public Stream VerifyImage { get; } + } +} diff --git a/sdk/face/Azure.AI.Vision.Face/src/Generated/CreatePersonRequest.Serialization.cs b/sdk/face/Azure.AI.Vision.Face/src/Generated/CreatePersonRequest.Serialization.cs new file mode 100644 index 000000000000..682c4f08d863 --- /dev/null +++ b/sdk/face/Azure.AI.Vision.Face/src/Generated/CreatePersonRequest.Serialization.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Vision.Face +{ + internal partial class CreatePersonRequest : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CreatePersonRequest)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + if (Optional.IsDefined(UserData)) + { + writer.WritePropertyName("userData"u8); + writer.WriteStringValue(UserData); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + CreatePersonRequest IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CreatePersonRequest)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCreatePersonRequest(document.RootElement, options); + } + + internal static CreatePersonRequest DeserializeCreatePersonRequest(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + string userData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("userData"u8)) + { + userData = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CreatePersonRequest(name, userData, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(CreatePersonRequest)} does not support writing '{options.Format}' format."); + } + } + + CreatePersonRequest IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeCreatePersonRequest(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CreatePersonRequest)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static CreatePersonRequest FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeCreatePersonRequest(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/RunCommandInputParameter.cs b/sdk/face/Azure.AI.Vision.Face/src/Generated/CreatePersonRequest.cs similarity index 57% rename from sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/RunCommandInputParameter.cs rename to sdk/face/Azure.AI.Vision.Face/src/Generated/CreatePersonRequest.cs index 055d761f8885..5f2cefbcce5b 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/RunCommandInputParameter.cs +++ b/sdk/face/Azure.AI.Vision.Face/src/Generated/CreatePersonRequest.cs @@ -8,10 +8,10 @@ using System; using System.Collections.Generic; -namespace Azure.ResourceManager.HybridCompute.Models +namespace Azure.AI.Vision.Face { - /// Describes the properties of a run command parameter. - public partial class RunCommandInputParameter + /// The CreatePersonRequest. + internal partial class CreatePersonRequest { /// /// Keeps track of any properties unknown to the library. @@ -45,40 +45,35 @@ public partial class RunCommandInputParameter /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . - /// The run command parameter name. - /// The run command parameter value. - /// or is null. - public RunCommandInputParameter(string name, string value) + /// Initializes a new instance of . + /// User defined name, maximum length is 128. + /// is null. + internal CreatePersonRequest(string name) { Argument.AssertNotNull(name, nameof(name)); - Argument.AssertNotNull(value, nameof(value)); Name = name; - Value = value; } - /// Initializes a new instance of . - /// The run command parameter name. - /// The run command parameter value. + /// Initializes a new instance of . + /// User defined name, maximum length is 128. + /// Optional user defined data. Length should not exceed 16K. /// Keeps track of any properties unknown to the library. - internal RunCommandInputParameter(string name, string value, IDictionary serializedAdditionalRawData) + internal CreatePersonRequest(string name, string userData, IDictionary serializedAdditionalRawData) { Name = name; - Value = value; + UserData = userData; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal RunCommandInputParameter() + /// Initializes a new instance of for deserialization. + internal CreatePersonRequest() { } - /// The run command parameter name. - [WirePath("name")] - public string Name { get; set; } - /// The run command parameter value. - [WirePath("value")] - public string Value { get; set; } + /// User defined name, maximum length is 128. + public string Name { get; } + /// Optional user defined data. Length should not exceed 16K. + public string UserData { get; } } } diff --git a/sdk/face/Azure.AI.Vision.Face/src/Generated/CreatePersonResult.Serialization.cs b/sdk/face/Azure.AI.Vision.Face/src/Generated/CreatePersonResult.Serialization.cs new file mode 100644 index 000000000000..e0afa23647b8 --- /dev/null +++ b/sdk/face/Azure.AI.Vision.Face/src/Generated/CreatePersonResult.Serialization.cs @@ -0,0 +1,135 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Vision.Face +{ + public partial class CreatePersonResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CreatePersonResult)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("personId"u8); + writer.WriteStringValue(PersonId); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + CreatePersonResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CreatePersonResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCreatePersonResult(document.RootElement, options); + } + + internal static CreatePersonResult DeserializeCreatePersonResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Guid personId = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("personId"u8)) + { + personId = property.Value.GetGuid(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CreatePersonResult(personId, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(CreatePersonResult)} does not support writing '{options.Format}' format."); + } + } + + CreatePersonResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeCreatePersonResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CreatePersonResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static CreatePersonResult FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeCreatePersonResult(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/face/Azure.AI.Vision.Face/src/Generated/CreatePersonResult.cs b/sdk/face/Azure.AI.Vision.Face/src/Generated/CreatePersonResult.cs new file mode 100644 index 000000000000..d2b993228dd6 --- /dev/null +++ b/sdk/face/Azure.AI.Vision.Face/src/Generated/CreatePersonResult.cs @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Vision.Face +{ + /// Response of create person. + public partial class CreatePersonResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Person ID of the person. + internal CreatePersonResult(Guid personId) + { + PersonId = personId; + } + + /// Initializes a new instance of . + /// Person ID of the person. + /// Keeps track of any properties unknown to the library. + internal CreatePersonResult(Guid personId, IDictionary serializedAdditionalRawData) + { + PersonId = personId; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal CreatePersonResult() + { + } + + /// Person ID of the person. + public Guid PersonId { get; } + } +} diff --git a/sdk/ai/Azure.AI.Inference/src/Generated/ChatCompletionsNamedFunctionToolSelection.Serialization.cs b/sdk/face/Azure.AI.Vision.Face/src/Generated/CreateRequest.Serialization.cs similarity index 50% rename from sdk/ai/Azure.AI.Inference/src/Generated/ChatCompletionsNamedFunctionToolSelection.Serialization.cs rename to sdk/face/Azure.AI.Vision.Face/src/Generated/CreateRequest.Serialization.cs index 96cea7708042..5dddb239ac5c 100644 --- a/sdk/ai/Azure.AI.Inference/src/Generated/ChatCompletionsNamedFunctionToolSelection.Serialization.cs +++ b/sdk/face/Azure.AI.Vision.Face/src/Generated/CreateRequest.Serialization.cs @@ -11,25 +11,33 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Inference +namespace Azure.AI.Vision.Face { - public partial class ChatCompletionsNamedFunctionToolSelection : IUtf8JsonSerializable, IJsonModel + internal partial class CreateRequest : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(ChatCompletionsNamedFunctionToolSelection)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(CreateRequest)} does not support writing '{format}' format."); } writer.WriteStartObject(); - writer.WritePropertyName("function"u8); - writer.WriteObjectValue(Function, options); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type); + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + if (Optional.IsDefined(UserData)) + { + writer.WritePropertyName("userData"u8); + writer.WriteStringValue(UserData); + } + if (Optional.IsDefined(RecognitionModel)) + { + writer.WritePropertyName("recognitionModel"u8); + writer.WriteStringValue(RecognitionModel.Value.ToString()); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -48,19 +56,19 @@ void IJsonModel.Write(Utf8JsonWriter writer.WriteEndObject(); } - ChatCompletionsNamedFunctionToolSelection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + CreateRequest IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(ChatCompletionsNamedFunctionToolSelection)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(CreateRequest)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeChatCompletionsNamedFunctionToolSelection(document.RootElement, options); + return DeserializeCreateRequest(document.RootElement, options); } - internal static ChatCompletionsNamedFunctionToolSelection DeserializeChatCompletionsNamedFunctionToolSelection(JsonElement element, ModelReaderWriterOptions options = null) + internal static CreateRequest DeserializeCreateRequest(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -68,20 +76,30 @@ internal static ChatCompletionsNamedFunctionToolSelection DeserializeChatComplet { return null; } - ChatCompletionsFunctionToolSelection function = default; - string type = default; + string name = default; + string userData = default; + FaceRecognitionModel? recognitionModel = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("function"u8)) + if (property.NameEquals("name"u8)) { - function = ChatCompletionsFunctionToolSelection.DeserializeChatCompletionsFunctionToolSelection(property.Value, options); + name = property.Value.GetString(); continue; } - if (property.NameEquals("type"u8)) + if (property.NameEquals("userData"u8)) { - type = property.Value.GetString(); + userData = property.Value.GetString(); + continue; + } + if (property.NameEquals("recognitionModel"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + recognitionModel = new FaceRecognitionModel(property.Value.GetString()); continue; } if (options.Format != "W") @@ -90,50 +108,50 @@ internal static ChatCompletionsNamedFunctionToolSelection DeserializeChatComplet } } serializedAdditionalRawData = rawDataDictionary; - return new ChatCompletionsNamedFunctionToolSelection(type, serializedAdditionalRawData, function); + return new CreateRequest(name, userData, recognitionModel, serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options); default: - throw new FormatException($"The model {nameof(ChatCompletionsNamedFunctionToolSelection)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(CreateRequest)} does not support writing '{options.Format}' format."); } } - ChatCompletionsNamedFunctionToolSelection IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + CreateRequest IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data); - return DeserializeChatCompletionsNamedFunctionToolSelection(document.RootElement, options); + return DeserializeCreateRequest(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(ChatCompletionsNamedFunctionToolSelection)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(CreateRequest)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; /// Deserializes the model from a raw response. /// The response to deserialize the model from. - internal static new ChatCompletionsNamedFunctionToolSelection FromResponse(Response response) + internal static CreateRequest FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); - return DeserializeChatCompletionsNamedFunctionToolSelection(document.RootElement); + return DeserializeCreateRequest(document.RootElement); } /// Convert into a . - internal override RequestContent ToRequestContent() + internal virtual RequestContent ToRequestContent() { var content = new Utf8JsonRequestContent(); content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); diff --git a/sdk/face/Azure.AI.Vision.Face/src/Generated/CreateRequest.cs b/sdk/face/Azure.AI.Vision.Face/src/Generated/CreateRequest.cs new file mode 100644 index 000000000000..28b037d301c9 --- /dev/null +++ b/sdk/face/Azure.AI.Vision.Face/src/Generated/CreateRequest.cs @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Vision.Face +{ + /// The CreateRequest. + internal partial class CreateRequest + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// User defined name, maximum length is 128. + /// is null. + internal CreateRequest(string name) + { + Argument.AssertNotNull(name, nameof(name)); + + Name = name; + } + + /// Initializes a new instance of . + /// User defined name, maximum length is 128. + /// Optional user defined data. Length should not exceed 16K. + /// The 'recognitionModel' associated with this face list. Supported 'recognitionModel' values include 'recognition_01', 'recognition_02, 'recognition_03', and 'recognition_04'. The default value is 'recognition_01'. 'recognition_04' is recommended since its accuracy is improved on faces wearing masks compared with 'recognition_03', and its overall accuracy is improved compared with 'recognition_01' and 'recognition_02'. + /// Keeps track of any properties unknown to the library. + internal CreateRequest(string name, string userData, FaceRecognitionModel? recognitionModel, IDictionary serializedAdditionalRawData) + { + Name = name; + UserData = userData; + RecognitionModel = recognitionModel; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal CreateRequest() + { + } + + /// User defined name, maximum length is 128. + public string Name { get; } + /// Optional user defined data. Length should not exceed 16K. + public string UserData { get; } + /// The 'recognitionModel' associated with this face list. Supported 'recognitionModel' values include 'recognition_01', 'recognition_02, 'recognition_03', and 'recognition_04'. The default value is 'recognition_01'. 'recognition_04' is recommended since its accuracy is improved on faces wearing masks compared with 'recognition_03', and its overall accuracy is improved compared with 'recognition_01' and 'recognition_02'. + public FaceRecognitionModel? RecognitionModel { get; } + } +} diff --git a/sdk/face/Azure.AI.Vision.Face/src/Generated/CreateRequest1.Serialization.cs b/sdk/face/Azure.AI.Vision.Face/src/Generated/CreateRequest1.Serialization.cs new file mode 100644 index 000000000000..2d7461262254 --- /dev/null +++ b/sdk/face/Azure.AI.Vision.Face/src/Generated/CreateRequest1.Serialization.cs @@ -0,0 +1,161 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Vision.Face +{ + internal partial class CreateRequest1 : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CreateRequest1)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + if (Optional.IsDefined(UserData)) + { + writer.WritePropertyName("userData"u8); + writer.WriteStringValue(UserData); + } + if (Optional.IsDefined(RecognitionModel)) + { + writer.WritePropertyName("recognitionModel"u8); + writer.WriteStringValue(RecognitionModel.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + CreateRequest1 IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CreateRequest1)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCreateRequest1(document.RootElement, options); + } + + internal static CreateRequest1 DeserializeCreateRequest1(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + string userData = default; + FaceRecognitionModel? recognitionModel = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("userData"u8)) + { + userData = property.Value.GetString(); + continue; + } + if (property.NameEquals("recognitionModel"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + recognitionModel = new FaceRecognitionModel(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CreateRequest1(name, userData, recognitionModel, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(CreateRequest1)} does not support writing '{options.Format}' format."); + } + } + + CreateRequest1 IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeCreateRequest1(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CreateRequest1)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static CreateRequest1 FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeCreateRequest1(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/face/Azure.AI.Vision.Face/src/Generated/CreateRequest1.cs b/sdk/face/Azure.AI.Vision.Face/src/Generated/CreateRequest1.cs new file mode 100644 index 000000000000..6c354abd8419 --- /dev/null +++ b/sdk/face/Azure.AI.Vision.Face/src/Generated/CreateRequest1.cs @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Vision.Face +{ + /// The CreateRequest1. + internal partial class CreateRequest1 + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// User defined name, maximum length is 128. + /// is null. + internal CreateRequest1(string name) + { + Argument.AssertNotNull(name, nameof(name)); + + Name = name; + } + + /// Initializes a new instance of . + /// User defined name, maximum length is 128. + /// Optional user defined data. Length should not exceed 16K. + /// The 'recognitionModel' associated with this face list. Supported 'recognitionModel' values include 'recognition_01', 'recognition_02, 'recognition_03', and 'recognition_04'. The default value is 'recognition_01'. 'recognition_04' is recommended since its accuracy is improved on faces wearing masks compared with 'recognition_03', and its overall accuracy is improved compared with 'recognition_01' and 'recognition_02'. + /// Keeps track of any properties unknown to the library. + internal CreateRequest1(string name, string userData, FaceRecognitionModel? recognitionModel, IDictionary serializedAdditionalRawData) + { + Name = name; + UserData = userData; + RecognitionModel = recognitionModel; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal CreateRequest1() + { + } + + /// User defined name, maximum length is 128. + public string Name { get; } + /// Optional user defined data. Length should not exceed 16K. + public string UserData { get; } + /// The 'recognitionModel' associated with this face list. Supported 'recognitionModel' values include 'recognition_01', 'recognition_02, 'recognition_03', and 'recognition_04'. The default value is 'recognition_01'. 'recognition_04' is recommended since its accuracy is improved on faces wearing masks compared with 'recognition_03', and its overall accuracy is improved compared with 'recognition_01' and 'recognition_02'. + public FaceRecognitionModel? RecognitionModel { get; } + } +} diff --git a/sdk/ai/Azure.AI.Inference/src/Generated/UnknownChatCompletionsToolDefinition.Serialization.cs b/sdk/face/Azure.AI.Vision.Face/src/Generated/DetectFromSessionImageRequest.Serialization.cs similarity index 60% rename from sdk/ai/Azure.AI.Inference/src/Generated/UnknownChatCompletionsToolDefinition.Serialization.cs rename to sdk/face/Azure.AI.Vision.Face/src/Generated/DetectFromSessionImageRequest.Serialization.cs index 0fd79deb8261..df96544d127a 100644 --- a/sdk/ai/Azure.AI.Inference/src/Generated/UnknownChatCompletionsToolDefinition.Serialization.cs +++ b/sdk/face/Azure.AI.Vision.Face/src/Generated/DetectFromSessionImageRequest.Serialization.cs @@ -11,23 +11,23 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Inference +namespace Azure.AI.Vision.Face { - internal partial class UnknownChatCompletionsToolDefinition : IUtf8JsonSerializable, IJsonModel + internal partial class DetectFromSessionImageRequest : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(ChatCompletionsToolDefinition)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(DetectFromSessionImageRequest)} does not support writing '{format}' format."); } writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type); + writer.WritePropertyName("sessionImageId"u8); + writer.WriteStringValue(SessionImageId); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -46,19 +46,19 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode writer.WriteEndObject(); } - ChatCompletionsToolDefinition IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + DetectFromSessionImageRequest IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(ChatCompletionsToolDefinition)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(DetectFromSessionImageRequest)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeChatCompletionsToolDefinition(document.RootElement, options); + return DeserializeDetectFromSessionImageRequest(document.RootElement, options); } - internal static UnknownChatCompletionsToolDefinition DeserializeUnknownChatCompletionsToolDefinition(JsonElement element, ModelReaderWriterOptions options = null) + internal static DetectFromSessionImageRequest DeserializeDetectFromSessionImageRequest(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -66,14 +66,14 @@ internal static UnknownChatCompletionsToolDefinition DeserializeUnknownChatCompl { return null; } - string type = "Unknown"; + string sessionImageId = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("type"u8)) + if (property.NameEquals("sessionImageId"u8)) { - type = property.Value.GetString(); + sessionImageId = property.Value.GetString(); continue; } if (options.Format != "W") @@ -82,53 +82,53 @@ internal static UnknownChatCompletionsToolDefinition DeserializeUnknownChatCompl } } serializedAdditionalRawData = rawDataDictionary; - return new UnknownChatCompletionsToolDefinition(type, serializedAdditionalRawData); + return new DetectFromSessionImageRequest(sessionImageId, serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options); default: - throw new FormatException($"The model {nameof(ChatCompletionsToolDefinition)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(DetectFromSessionImageRequest)} does not support writing '{options.Format}' format."); } } - ChatCompletionsToolDefinition IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + DetectFromSessionImageRequest IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data); - return DeserializeChatCompletionsToolDefinition(document.RootElement, options); + return DeserializeDetectFromSessionImageRequest(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(ChatCompletionsToolDefinition)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(DetectFromSessionImageRequest)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; /// Deserializes the model from a raw response. /// The response to deserialize the model from. - internal static new UnknownChatCompletionsToolDefinition FromResponse(Response response) + internal static DetectFromSessionImageRequest FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); - return DeserializeUnknownChatCompletionsToolDefinition(document.RootElement); + return DeserializeDetectFromSessionImageRequest(document.RootElement); } /// Convert into a . - internal override RequestContent ToRequestContent() + internal virtual RequestContent ToRequestContent() { var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); return content; } } diff --git a/sdk/face/Azure.AI.Vision.Face/src/Generated/DetectFromSessionImageRequest.cs b/sdk/face/Azure.AI.Vision.Face/src/Generated/DetectFromSessionImageRequest.cs new file mode 100644 index 000000000000..637773ec68ff --- /dev/null +++ b/sdk/face/Azure.AI.Vision.Face/src/Generated/DetectFromSessionImageRequest.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Vision.Face +{ + /// The DetectFromSessionImageRequest. + internal partial class DetectFromSessionImageRequest + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Id of session image. + /// is null. + internal DetectFromSessionImageRequest(string sessionImageId) + { + Argument.AssertNotNull(sessionImageId, nameof(sessionImageId)); + + SessionImageId = sessionImageId; + } + + /// Initializes a new instance of . + /// Id of session image. + /// Keeps track of any properties unknown to the library. + internal DetectFromSessionImageRequest(string sessionImageId, IDictionary serializedAdditionalRawData) + { + SessionImageId = sessionImageId; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DetectFromSessionImageRequest() + { + } + + /// Id of session image. + public string SessionImageId { get; } + } +} diff --git a/sdk/face/Azure.AI.Vision.Face/src/Generated/Docs/FaceClient.xml b/sdk/face/Azure.AI.Vision.Face/src/Generated/Docs/FaceClient.xml index 14e05d4067a3..e4da2138d7f3 100644 --- a/sdk/face/Azure.AI.Vision.Face/src/Generated/Docs/FaceClient.xml +++ b/sdk/face/Azure.AI.Vision.Face/src/Generated/Docs/FaceClient.xml @@ -213,6 +213,208 @@ Response response = client.Group(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("groups")[0][0].ToString()); Console.WriteLine(result.GetProperty("messyGroup")[0].ToString()); +]]> + + + +This sample shows how to call FindSimilarFromLargeFaceListAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +FaceClient client = new FaceClient(endpoint, credential); + +Response> response = await client.FindSimilarFromLargeFaceListAsync(Guid.Parse("c5c24a82-6845-4031-9d5d-978df9175426"), "your_large_face_list_id"); +]]> + + + +This sample shows how to call FindSimilarFromLargeFaceList. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +FaceClient client = new FaceClient(endpoint, credential); + +Response> response = client.FindSimilarFromLargeFaceList(Guid.Parse("c5c24a82-6845-4031-9d5d-978df9175426"), "your_large_face_list_id"); +]]> + + + +This sample shows how to call FindSimilarFromLargeFaceListAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +FaceClient client = new FaceClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + faceId = "c5c24a82-6845-4031-9d5d-978df9175426", + maxNumOfCandidatesReturned = 3, + mode = "matchPerson", + largeFaceListId = "your_large_face_list_id", +}); +Response response = await client.FindSimilarFromLargeFaceListAsync(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result[0].GetProperty("confidence").ToString()); +]]> + + + +This sample shows how to call FindSimilarFromLargeFaceList and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +FaceClient client = new FaceClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + faceId = "c5c24a82-6845-4031-9d5d-978df9175426", + maxNumOfCandidatesReturned = 3, + mode = "matchPerson", + largeFaceListId = "your_large_face_list_id", +}); +Response response = client.FindSimilarFromLargeFaceList(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result[0].GetProperty("confidence").ToString()); +]]> + + + +This sample shows how to call IdentifyFromLargePersonGroupAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +FaceClient client = new FaceClient(endpoint, credential); + +Response> response = await client.IdentifyFromLargePersonGroupAsync(new Guid[] { Guid.Parse("c5c24a82-6845-4031-9d5d-978df9175426") }, "your_large_person_group_id"); +]]> + + + +This sample shows how to call IdentifyFromLargePersonGroup. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +FaceClient client = new FaceClient(endpoint, credential); + +Response> response = client.IdentifyFromLargePersonGroup(new Guid[] { Guid.Parse("c5c24a82-6845-4031-9d5d-978df9175426") }, "your_large_person_group_id"); +]]> + + + +This sample shows how to call IdentifyFromLargePersonGroupAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +FaceClient client = new FaceClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + faceIds = new object[] + { + "c5c24a82-6845-4031-9d5d-978df9175426" + }, + largePersonGroupId = "your_large_person_group_id", + maxNumOfCandidatesReturned = 9, + confidenceThreshold = 0.7F, +}); +Response response = await client.IdentifyFromLargePersonGroupAsync(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result[0].GetProperty("faceId").ToString()); +Console.WriteLine(result[0].GetProperty("candidates")[0].GetProperty("personId").ToString()); +Console.WriteLine(result[0].GetProperty("candidates")[0].GetProperty("confidence").ToString()); +]]> + + + +This sample shows how to call IdentifyFromLargePersonGroup and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +FaceClient client = new FaceClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + faceIds = new object[] + { + "c5c24a82-6845-4031-9d5d-978df9175426" + }, + largePersonGroupId = "your_large_person_group_id", + maxNumOfCandidatesReturned = 9, + confidenceThreshold = 0.7F, +}); +Response response = client.IdentifyFromLargePersonGroup(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result[0].GetProperty("faceId").ToString()); +Console.WriteLine(result[0].GetProperty("candidates")[0].GetProperty("personId").ToString()); +Console.WriteLine(result[0].GetProperty("candidates")[0].GetProperty("confidence").ToString()); +]]> + + + +This sample shows how to call VerifyFromLargePersonGroupAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +FaceClient client = new FaceClient(endpoint, credential); + +Response response = await client.VerifyFromLargePersonGroupAsync(Guid.Parse("c5c24a82-6845-4031-9d5d-978df9175426"), "your_large_person_group", Guid.Parse("815df99c-598f-4926-930a-a734b3fd651c")); +]]> + + + +This sample shows how to call VerifyFromLargePersonGroup. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +FaceClient client = new FaceClient(endpoint, credential); + +Response response = client.VerifyFromLargePersonGroup(Guid.Parse("c5c24a82-6845-4031-9d5d-978df9175426"), "your_large_person_group", Guid.Parse("815df99c-598f-4926-930a-a734b3fd651c")); +]]> + + + +This sample shows how to call VerifyFromLargePersonGroupAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +FaceClient client = new FaceClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + faceId = "c5c24a82-6845-4031-9d5d-978df9175426", + personId = "815df99c-598f-4926-930a-a734b3fd651c", + largePersonGroupId = "your_large_person_group", +}); +Response response = await client.VerifyFromLargePersonGroupAsync(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("isIdentical").ToString()); +Console.WriteLine(result.GetProperty("confidence").ToString()); +]]> + + + +This sample shows how to call VerifyFromLargePersonGroup and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +FaceClient client = new FaceClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + faceId = "c5c24a82-6845-4031-9d5d-978df9175426", + personId = "815df99c-598f-4926-930a-a734b3fd651c", + largePersonGroupId = "your_large_person_group", +}); +Response response = client.VerifyFromLargePersonGroup(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("isIdentical").ToString()); +Console.WriteLine(result.GetProperty("confidence").ToString()); ]]> diff --git a/sdk/face/Azure.AI.Vision.Face/src/Generated/Docs/FaceSessionClient.xml b/sdk/face/Azure.AI.Vision.Face/src/Generated/Docs/FaceSessionClient.xml index 3ab65974a572..3754a0217479 100644 --- a/sdk/face/Azure.AI.Vision.Face/src/Generated/Docs/FaceSessionClient.xml +++ b/sdk/face/Azure.AI.Vision.Face/src/Generated/Docs/FaceSessionClient.xml @@ -497,6 +497,120 @@ Console.WriteLine(result[0].GetProperty("response").GetProperty("body").ToString Console.WriteLine(result[0].GetProperty("response").GetProperty("statusCode").ToString()); Console.WriteLine(result[0].GetProperty("response").GetProperty("latencyInMilliseconds").ToString()); Console.WriteLine(result[0].GetProperty("digest").ToString()); +]]> + + + +This sample shows how to call DetectFromSessionImageAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +FaceSessionClient client = new FaceSessionClient(endpoint, credential); + +Response> response = await client.DetectFromSessionImageAsync("aa93ce80-9a9b-48bd-ae1a-1c7543841e92"); +]]> + + + +This sample shows how to call DetectFromSessionImage. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +FaceSessionClient client = new FaceSessionClient(endpoint, credential); + +Response> response = client.DetectFromSessionImage("aa93ce80-9a9b-48bd-ae1a-1c7543841e92"); +]]> + + + +This sample shows how to call DetectFromSessionImageAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +FaceSessionClient client = new FaceSessionClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + sessionImageId = "aa93ce80-9a9b-48bd-ae1a-1c7543841e92", +}); +Response response = await client.DetectFromSessionImageAsync(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result[0].GetProperty("faceRectangle").GetProperty("top").ToString()); +Console.WriteLine(result[0].GetProperty("faceRectangle").GetProperty("left").ToString()); +Console.WriteLine(result[0].GetProperty("faceRectangle").GetProperty("width").ToString()); +Console.WriteLine(result[0].GetProperty("faceRectangle").GetProperty("height").ToString()); +]]> + + + +This sample shows how to call DetectFromSessionImage and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +FaceSessionClient client = new FaceSessionClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + sessionImageId = "aa93ce80-9a9b-48bd-ae1a-1c7543841e92", +}); +Response response = client.DetectFromSessionImage(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result[0].GetProperty("faceRectangle").GetProperty("top").ToString()); +Console.WriteLine(result[0].GetProperty("faceRectangle").GetProperty("left").ToString()); +Console.WriteLine(result[0].GetProperty("faceRectangle").GetProperty("width").ToString()); +Console.WriteLine(result[0].GetProperty("faceRectangle").GetProperty("height").ToString()); +]]> + + + +This sample shows how to call GetSessionImageAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +FaceSessionClient client = new FaceSessionClient(endpoint, credential); + +Response response = await client.GetSessionImageAsync("3d035d35-2e01-4ed4-8935-577afde9caaa"); +]]> + + + +This sample shows how to call GetSessionImage. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +FaceSessionClient client = new FaceSessionClient(endpoint, credential); + +Response response = client.GetSessionImage("3d035d35-2e01-4ed4-8935-577afde9caaa"); +]]> + + + +This sample shows how to call GetSessionImageAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +FaceSessionClient client = new FaceSessionClient(endpoint, credential); + +Response response = await client.GetSessionImageAsync("3d035d35-2e01-4ed4-8935-577afde9caaa", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> + + + +This sample shows how to call GetSessionImage and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +FaceSessionClient client = new FaceSessionClient(endpoint, credential); + +Response response = client.GetSessionImage("3d035d35-2e01-4ed4-8935-577afde9caaa", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); ]]> diff --git a/sdk/face/Azure.AI.Vision.Face/src/Generated/Docs/LargeFaceListClient.xml b/sdk/face/Azure.AI.Vision.Face/src/Generated/Docs/LargeFaceListClient.xml new file mode 100644 index 000000000000..67af72d4e83f --- /dev/null +++ b/sdk/face/Azure.AI.Vision.Face/src/Generated/Docs/LargeFaceListClient.xml @@ -0,0 +1,469 @@ + + + + + +This sample shows how to call CreateAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +LargeFaceListClient client = new FaceAdministrationClient(endpoint, credential).GetLargeFaceListClient("your_large_face_list_id"); + +Response response = await client.CreateAsync("your_large_face_list_name"); +]]> + + + +This sample shows how to call Create. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +LargeFaceListClient client = new FaceAdministrationClient(endpoint, credential).GetLargeFaceListClient("your_large_face_list_id"); + +Response response = client.Create("your_large_face_list_name"); +]]> + + + +This sample shows how to call CreateAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +LargeFaceListClient client = new FaceAdministrationClient(endpoint, credential).GetLargeFaceListClient("your_large_face_list_id"); + +using RequestContent content = RequestContent.Create(new +{ + name = "your_large_face_list_name", + userData = "your_user_data", + recognitionModel = "recognition_01", +}); +Response response = await client.CreateAsync(content); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call Create. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +LargeFaceListClient client = new FaceAdministrationClient(endpoint, credential).GetLargeFaceListClient("your_large_face_list_id"); + +using RequestContent content = RequestContent.Create(new +{ + name = "your_large_face_list_name", + userData = "your_user_data", + recognitionModel = "recognition_01", +}); +Response response = client.Create(content); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call DeleteAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +LargeFaceListClient client = new FaceAdministrationClient(endpoint, credential).GetLargeFaceListClient("your_large_face_list_id"); + +Response response = await client.DeleteAsync(); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call Delete. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +LargeFaceListClient client = new FaceAdministrationClient(endpoint, credential).GetLargeFaceListClient("your_large_face_list_id"); + +Response response = client.Delete(); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call GetLargeFaceListAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +LargeFaceListClient client = new FaceAdministrationClient(endpoint, credential).GetLargeFaceListClient("your_large_face_list_id"); + +Response response = await client.GetLargeFaceListAsync(); +]]> + + + +This sample shows how to call GetLargeFaceList. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +LargeFaceListClient client = new FaceAdministrationClient(endpoint, credential).GetLargeFaceListClient("your_large_face_list_id"); + +Response response = client.GetLargeFaceList(); +]]> + + + +This sample shows how to call GetLargeFaceListAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +LargeFaceListClient client = new FaceAdministrationClient(endpoint, credential).GetLargeFaceListClient("your_large_face_list_id"); + +Response response = await client.GetLargeFaceListAsync(true, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("largeFaceListId").ToString()); +]]> + + + +This sample shows how to call GetLargeFaceList and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +LargeFaceListClient client = new FaceAdministrationClient(endpoint, credential).GetLargeFaceListClient("your_large_face_list_id"); + +Response response = client.GetLargeFaceList(true, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("largeFaceListId").ToString()); +]]> + + + +This sample shows how to call UpdateAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +LargeFaceListClient client = new FaceAdministrationClient(endpoint, credential).GetLargeFaceListClient("your_large_face_list_id"); + +using RequestContent content = RequestContent.Create(new +{ + name = "your_large_face_list_name", + userData = "your_user_data", +}); +Response response = await client.UpdateAsync(content); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call Update. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +LargeFaceListClient client = new FaceAdministrationClient(endpoint, credential).GetLargeFaceListClient("your_large_face_list_id"); + +using RequestContent content = RequestContent.Create(new +{ + name = "your_large_face_list_name", + userData = "your_user_data", +}); +Response response = client.Update(content); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call GetLargeFaceListsAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +LargeFaceListClient client = new FaceAdministrationClient(endpoint, credential).GetLargeFaceListClient(null); + +Response> response = await client.GetLargeFaceListsAsync(); +]]> + + + +This sample shows how to call GetLargeFaceLists. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +LargeFaceListClient client = new FaceAdministrationClient(endpoint, credential).GetLargeFaceListClient(null); + +Response> response = client.GetLargeFaceLists(); +]]> + + + +This sample shows how to call GetLargeFaceListsAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +LargeFaceListClient client = new FaceAdministrationClient(endpoint, credential).GetLargeFaceListClient(null); + +Response response = await client.GetLargeFaceListsAsync("my_list_id", 20, true, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result[0].GetProperty("name").ToString()); +Console.WriteLine(result[0].GetProperty("largeFaceListId").ToString()); +]]> + + + +This sample shows how to call GetLargeFaceLists and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +LargeFaceListClient client = new FaceAdministrationClient(endpoint, credential).GetLargeFaceListClient(null); + +Response response = client.GetLargeFaceLists("my_list_id", 20, true, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result[0].GetProperty("name").ToString()); +Console.WriteLine(result[0].GetProperty("largeFaceListId").ToString()); +]]> + + + +This sample shows how to call GetTrainingStatusAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +LargeFaceListClient client = new FaceAdministrationClient(endpoint, credential).GetLargeFaceListClient("your_large_face_list_id"); + +Response response = await client.GetTrainingStatusAsync(); +]]> + + + +This sample shows how to call GetTrainingStatus. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +LargeFaceListClient client = new FaceAdministrationClient(endpoint, credential).GetLargeFaceListClient("your_large_face_list_id"); + +Response response = client.GetTrainingStatus(); +]]> + + + +This sample shows how to call GetTrainingStatusAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +LargeFaceListClient client = new FaceAdministrationClient(endpoint, credential).GetLargeFaceListClient("your_large_face_list_id"); + +Response response = await client.GetTrainingStatusAsync(null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastSuccessfulTrainingDateTime").ToString()); +]]> + + + +This sample shows how to call GetTrainingStatus and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +LargeFaceListClient client = new FaceAdministrationClient(endpoint, credential).GetLargeFaceListClient("your_large_face_list_id"); + +Response response = client.GetTrainingStatus(null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastSuccessfulTrainingDateTime").ToString()); +]]> + + + +This sample shows how to call DeleteFaceAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +LargeFaceListClient client = new FaceAdministrationClient(endpoint, credential).GetLargeFaceListClient("your_large_face_list_id"); + +Response response = await client.DeleteFaceAsync(Guid.Parse("43897a75-8d6f-42cf-885e-74832febb055")); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call DeleteFace. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +LargeFaceListClient client = new FaceAdministrationClient(endpoint, credential).GetLargeFaceListClient("your_large_face_list_id"); + +Response response = client.DeleteFace(Guid.Parse("43897a75-8d6f-42cf-885e-74832febb055")); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call GetFaceAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +LargeFaceListClient client = new FaceAdministrationClient(endpoint, credential).GetLargeFaceListClient("your_large_face_list_id"); + +Response response = await client.GetFaceAsync(Guid.Parse("43897a75-8d6f-42cf-885e-74832febb055")); +]]> + + + +This sample shows how to call GetFace. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +LargeFaceListClient client = new FaceAdministrationClient(endpoint, credential).GetLargeFaceListClient("your_large_face_list_id"); + +Response response = client.GetFace(Guid.Parse("43897a75-8d6f-42cf-885e-74832febb055")); +]]> + + + +This sample shows how to call GetFaceAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +LargeFaceListClient client = new FaceAdministrationClient(endpoint, credential).GetLargeFaceListClient("your_large_face_list_id"); + +Response response = await client.GetFaceAsync(Guid.Parse("43897a75-8d6f-42cf-885e-74832febb055"), null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("persistedFaceId").ToString()); +]]> + + + +This sample shows how to call GetFace and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +LargeFaceListClient client = new FaceAdministrationClient(endpoint, credential).GetLargeFaceListClient("your_large_face_list_id"); + +Response response = client.GetFace(Guid.Parse("43897a75-8d6f-42cf-885e-74832febb055"), null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("persistedFaceId").ToString()); +]]> + + + +This sample shows how to call UpdateFaceAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +LargeFaceListClient client = new FaceAdministrationClient(endpoint, credential).GetLargeFaceListClient("your_large_face_list_id"); + +using RequestContent content = RequestContent.Create(new +{ + userData = "your_user_data", +}); +Response response = await client.UpdateFaceAsync(Guid.Parse("43897a75-8d6f-42cf-885e-74832febb055"), content); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call UpdateFace. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +LargeFaceListClient client = new FaceAdministrationClient(endpoint, credential).GetLargeFaceListClient("your_large_face_list_id"); + +using RequestContent content = RequestContent.Create(new +{ + userData = "your_user_data", +}); +Response response = client.UpdateFace(Guid.Parse("43897a75-8d6f-42cf-885e-74832febb055"), content); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call GetFacesAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +LargeFaceListClient client = new FaceAdministrationClient(endpoint, credential).GetLargeFaceListClient("your_large_face_list_id"); + +Response> response = await client.GetFacesAsync(); +]]> + + + +This sample shows how to call GetFaces. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +LargeFaceListClient client = new FaceAdministrationClient(endpoint, credential).GetLargeFaceListClient("your_large_face_list_id"); + +Response> response = client.GetFaces(); +]]> + + + +This sample shows how to call GetFacesAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +LargeFaceListClient client = new FaceAdministrationClient(endpoint, credential).GetLargeFaceListClient("your_large_face_list_id"); + +Response response = await client.GetFacesAsync("00000000-0000-0000-0000-000000000000", 20, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result[0].GetProperty("persistedFaceId").ToString()); +]]> + + + +This sample shows how to call GetFaces and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +LargeFaceListClient client = new FaceAdministrationClient(endpoint, credential).GetLargeFaceListClient("your_large_face_list_id"); + +Response response = client.GetFaces("00000000-0000-0000-0000-000000000000", 20, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result[0].GetProperty("persistedFaceId").ToString()); +]]> + + + +This sample shows how to call TrainAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +LargeFaceListClient client = new FaceAdministrationClient(endpoint, credential).GetLargeFaceListClient("your_large_face_list_id"); + +Operation operation = await client.TrainAsync(WaitUntil.Completed); +]]> + + + +This sample shows how to call Train. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +LargeFaceListClient client = new FaceAdministrationClient(endpoint, credential).GetLargeFaceListClient("your_large_face_list_id"); + +Operation operation = client.Train(WaitUntil.Completed); +]]> + + + \ No newline at end of file diff --git a/sdk/face/Azure.AI.Vision.Face/src/Generated/Docs/LargePersonGroupClient.xml b/sdk/face/Azure.AI.Vision.Face/src/Generated/Docs/LargePersonGroupClient.xml new file mode 100644 index 000000000000..99d900e0bce4 --- /dev/null +++ b/sdk/face/Azure.AI.Vision.Face/src/Generated/Docs/LargePersonGroupClient.xml @@ -0,0 +1,645 @@ + + + + + +This sample shows how to call CreateAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +LargePersonGroupClient client = new FaceAdministrationClient(endpoint, credential).GetLargePersonGroupClient("your_large_person_group_id"); + +Response response = await client.CreateAsync("your_large_person_group_name"); +]]> + + + +This sample shows how to call Create. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +LargePersonGroupClient client = new FaceAdministrationClient(endpoint, credential).GetLargePersonGroupClient("your_large_person_group_id"); + +Response response = client.Create("your_large_person_group_name"); +]]> + + + +This sample shows how to call CreateAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +LargePersonGroupClient client = new FaceAdministrationClient(endpoint, credential).GetLargePersonGroupClient("your_large_person_group_id"); + +using RequestContent content = RequestContent.Create(new +{ + name = "your_large_person_group_name", + userData = "your_user_data", + recognitionModel = "recognition_01", +}); +Response response = await client.CreateAsync(content); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call Create. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +LargePersonGroupClient client = new FaceAdministrationClient(endpoint, credential).GetLargePersonGroupClient("your_large_person_group_id"); + +using RequestContent content = RequestContent.Create(new +{ + name = "your_large_person_group_name", + userData = "your_user_data", + recognitionModel = "recognition_01", +}); +Response response = client.Create(content); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call DeleteAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +LargePersonGroupClient client = new FaceAdministrationClient(endpoint, credential).GetLargePersonGroupClient("your_large_person_group_id"); + +Response response = await client.DeleteAsync(); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call Delete. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +LargePersonGroupClient client = new FaceAdministrationClient(endpoint, credential).GetLargePersonGroupClient("your_large_person_group_id"); + +Response response = client.Delete(); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call GetLargePersonGroupAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +LargePersonGroupClient client = new FaceAdministrationClient(endpoint, credential).GetLargePersonGroupClient("your_large_person_group_id"); + +Response response = await client.GetLargePersonGroupAsync(); +]]> + + + +This sample shows how to call GetLargePersonGroup. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +LargePersonGroupClient client = new FaceAdministrationClient(endpoint, credential).GetLargePersonGroupClient("your_large_person_group_id"); + +Response response = client.GetLargePersonGroup(); +]]> + + + +This sample shows how to call GetLargePersonGroupAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +LargePersonGroupClient client = new FaceAdministrationClient(endpoint, credential).GetLargePersonGroupClient("your_large_person_group_id"); + +Response response = await client.GetLargePersonGroupAsync(true, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("largePersonGroupId").ToString()); +]]> + + + +This sample shows how to call GetLargePersonGroup and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +LargePersonGroupClient client = new FaceAdministrationClient(endpoint, credential).GetLargePersonGroupClient("your_large_person_group_id"); + +Response response = client.GetLargePersonGroup(true, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("largePersonGroupId").ToString()); +]]> + + + +This sample shows how to call UpdateAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +LargePersonGroupClient client = new FaceAdministrationClient(endpoint, credential).GetLargePersonGroupClient("your_large_person_group_id"); + +using RequestContent content = RequestContent.Create(new +{ + name = "your_large_person_group_name", + userData = "your_user_data", +}); +Response response = await client.UpdateAsync(content); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call Update. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +LargePersonGroupClient client = new FaceAdministrationClient(endpoint, credential).GetLargePersonGroupClient("your_large_person_group_id"); + +using RequestContent content = RequestContent.Create(new +{ + name = "your_large_person_group_name", + userData = "your_user_data", +}); +Response response = client.Update(content); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call GetLargePersonGroupsAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +LargePersonGroupClient client = new FaceAdministrationClient(endpoint, credential).GetLargePersonGroupClient(null); + +Response> response = await client.GetLargePersonGroupsAsync(); +]]> + + + +This sample shows how to call GetLargePersonGroups. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +LargePersonGroupClient client = new FaceAdministrationClient(endpoint, credential).GetLargePersonGroupClient(null); + +Response> response = client.GetLargePersonGroups(); +]]> + + + +This sample shows how to call GetLargePersonGroupsAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +LargePersonGroupClient client = new FaceAdministrationClient(endpoint, credential).GetLargePersonGroupClient(null); + +Response response = await client.GetLargePersonGroupsAsync("00000000-0000-0000-0000-000000000000", 20, true, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result[0].GetProperty("name").ToString()); +Console.WriteLine(result[0].GetProperty("largePersonGroupId").ToString()); +]]> + + + +This sample shows how to call GetLargePersonGroups and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +LargePersonGroupClient client = new FaceAdministrationClient(endpoint, credential).GetLargePersonGroupClient(null); + +Response response = client.GetLargePersonGroups("00000000-0000-0000-0000-000000000000", 20, true, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result[0].GetProperty("name").ToString()); +Console.WriteLine(result[0].GetProperty("largePersonGroupId").ToString()); +]]> + + + +This sample shows how to call GetTrainingStatusAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +LargePersonGroupClient client = new FaceAdministrationClient(endpoint, credential).GetLargePersonGroupClient("your_large_person_group_id"); + +Response response = await client.GetTrainingStatusAsync(); +]]> + + + +This sample shows how to call GetTrainingStatus. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +LargePersonGroupClient client = new FaceAdministrationClient(endpoint, credential).GetLargePersonGroupClient("your_large_person_group_id"); + +Response response = client.GetTrainingStatus(); +]]> + + + +This sample shows how to call GetTrainingStatusAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +LargePersonGroupClient client = new FaceAdministrationClient(endpoint, credential).GetLargePersonGroupClient("your_large_person_group_id"); + +Response response = await client.GetTrainingStatusAsync(null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastSuccessfulTrainingDateTime").ToString()); +]]> + + + +This sample shows how to call GetTrainingStatus and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +LargePersonGroupClient client = new FaceAdministrationClient(endpoint, credential).GetLargePersonGroupClient("your_large_person_group_id"); + +Response response = client.GetTrainingStatus(null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastSuccessfulTrainingDateTime").ToString()); +]]> + + + +This sample shows how to call CreatePersonAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +LargePersonGroupClient client = new FaceAdministrationClient(endpoint, credential).GetLargePersonGroupClient("your_large_person_group_id"); + +Response response = await client.CreatePersonAsync("your_large_person_group_person_name"); +]]> + + + +This sample shows how to call CreatePerson. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +LargePersonGroupClient client = new FaceAdministrationClient(endpoint, credential).GetLargePersonGroupClient("your_large_person_group_id"); + +Response response = client.CreatePerson("your_large_person_group_person_name"); +]]> + + + +This sample shows how to call CreatePersonAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +LargePersonGroupClient client = new FaceAdministrationClient(endpoint, credential).GetLargePersonGroupClient("your_large_person_group_id"); + +using RequestContent content = RequestContent.Create(new +{ + name = "your_large_person_group_person_name", + userData = "your_user_data", +}); +Response response = await client.CreatePersonAsync(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("personId").ToString()); +]]> + + + +This sample shows how to call CreatePerson and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +LargePersonGroupClient client = new FaceAdministrationClient(endpoint, credential).GetLargePersonGroupClient("your_large_person_group_id"); + +using RequestContent content = RequestContent.Create(new +{ + name = "your_large_person_group_person_name", + userData = "your_user_data", +}); +Response response = client.CreatePerson(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("personId").ToString()); +]]> + + + +This sample shows how to call DeletePersonAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +LargePersonGroupClient client = new FaceAdministrationClient(endpoint, credential).GetLargePersonGroupClient("your_large_person_group_id"); + +Response response = await client.DeletePersonAsync(Guid.Parse("25985303-c537-4467-b41d-bdb45cd95ca1")); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call DeletePerson. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +LargePersonGroupClient client = new FaceAdministrationClient(endpoint, credential).GetLargePersonGroupClient("your_large_person_group_id"); + +Response response = client.DeletePerson(Guid.Parse("25985303-c537-4467-b41d-bdb45cd95ca1")); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call GetPersonAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +LargePersonGroupClient client = new FaceAdministrationClient(endpoint, credential).GetLargePersonGroupClient("your_large_person_group_id"); + +Response response = await client.GetPersonAsync(Guid.Parse("25985303-c537-4467-b41d-bdb45cd95ca1")); +]]> + + + +This sample shows how to call GetPerson. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +LargePersonGroupClient client = new FaceAdministrationClient(endpoint, credential).GetLargePersonGroupClient("your_large_person_group_id"); + +Response response = client.GetPerson(Guid.Parse("25985303-c537-4467-b41d-bdb45cd95ca1")); +]]> + + + +This sample shows how to call GetPersonAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +LargePersonGroupClient client = new FaceAdministrationClient(endpoint, credential).GetLargePersonGroupClient("your_large_person_group_id"); + +Response response = await client.GetPersonAsync(Guid.Parse("25985303-c537-4467-b41d-bdb45cd95ca1"), null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("personId").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +]]> + + + +This sample shows how to call GetPerson and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +LargePersonGroupClient client = new FaceAdministrationClient(endpoint, credential).GetLargePersonGroupClient("your_large_person_group_id"); + +Response response = client.GetPerson(Guid.Parse("25985303-c537-4467-b41d-bdb45cd95ca1"), null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("personId").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +]]> + + + +This sample shows how to call UpdatePersonAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +LargePersonGroupClient client = new FaceAdministrationClient(endpoint, credential).GetLargePersonGroupClient("your_large_person_group_id"); + +using RequestContent content = RequestContent.Create(new +{ + name = "your_large_person_group_person_name", + userData = "your_user_data", +}); +Response response = await client.UpdatePersonAsync(Guid.Parse("25985303-c537-4467-b41d-bdb45cd95ca1"), content); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call UpdatePerson. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +LargePersonGroupClient client = new FaceAdministrationClient(endpoint, credential).GetLargePersonGroupClient("your_large_person_group_id"); + +using RequestContent content = RequestContent.Create(new +{ + name = "your_large_person_group_person_name", + userData = "your_user_data", +}); +Response response = client.UpdatePerson(Guid.Parse("25985303-c537-4467-b41d-bdb45cd95ca1"), content); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call GetPersonsAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +LargePersonGroupClient client = new FaceAdministrationClient(endpoint, credential).GetLargePersonGroupClient("your_large_person_group_id"); + +Response> response = await client.GetPersonsAsync(); +]]> + + + +This sample shows how to call GetPersons. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +LargePersonGroupClient client = new FaceAdministrationClient(endpoint, credential).GetLargePersonGroupClient("your_large_person_group_id"); + +Response> response = client.GetPersons(); +]]> + + + +This sample shows how to call GetPersonsAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +LargePersonGroupClient client = new FaceAdministrationClient(endpoint, credential).GetLargePersonGroupClient("your_large_person_group_id"); + +Response response = await client.GetPersonsAsync("00000000-0000-0000-0000-000000000000", 20, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result[0].GetProperty("personId").ToString()); +Console.WriteLine(result[0].GetProperty("name").ToString()); +]]> + + + +This sample shows how to call GetPersons and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +LargePersonGroupClient client = new FaceAdministrationClient(endpoint, credential).GetLargePersonGroupClient("your_large_person_group_id"); + +Response response = client.GetPersons("00000000-0000-0000-0000-000000000000", 20, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result[0].GetProperty("personId").ToString()); +Console.WriteLine(result[0].GetProperty("name").ToString()); +]]> + + + +This sample shows how to call DeleteFaceAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +LargePersonGroupClient client = new FaceAdministrationClient(endpoint, credential).GetLargePersonGroupClient("your_large_person_group_id"); + +Response response = await client.DeleteFaceAsync(Guid.Parse("25985303-c537-4467-b41d-bdb45cd95ca1"), Guid.Parse("43897a75-8d6f-42cf-885e-74832febb055")); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call DeleteFace. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +LargePersonGroupClient client = new FaceAdministrationClient(endpoint, credential).GetLargePersonGroupClient("your_large_person_group_id"); + +Response response = client.DeleteFace(Guid.Parse("25985303-c537-4467-b41d-bdb45cd95ca1"), Guid.Parse("43897a75-8d6f-42cf-885e-74832febb055")); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call GetFaceAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +LargePersonGroupClient client = new FaceAdministrationClient(endpoint, credential).GetLargePersonGroupClient("your_large_person_group_id"); + +Response response = await client.GetFaceAsync(Guid.Parse("25985303-c537-4467-b41d-bdb45cd95ca1"), Guid.Parse("43897a75-8d6f-42cf-885e-74832febb055")); +]]> + + + +This sample shows how to call GetFace. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +LargePersonGroupClient client = new FaceAdministrationClient(endpoint, credential).GetLargePersonGroupClient("your_large_person_group_id"); + +Response response = client.GetFace(Guid.Parse("25985303-c537-4467-b41d-bdb45cd95ca1"), Guid.Parse("43897a75-8d6f-42cf-885e-74832febb055")); +]]> + + + +This sample shows how to call GetFaceAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +LargePersonGroupClient client = new FaceAdministrationClient(endpoint, credential).GetLargePersonGroupClient("your_large_person_group_id"); + +Response response = await client.GetFaceAsync(Guid.Parse("25985303-c537-4467-b41d-bdb45cd95ca1"), Guid.Parse("43897a75-8d6f-42cf-885e-74832febb055"), null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("persistedFaceId").ToString()); +]]> + + + +This sample shows how to call GetFace and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +LargePersonGroupClient client = new FaceAdministrationClient(endpoint, credential).GetLargePersonGroupClient("your_large_person_group_id"); + +Response response = client.GetFace(Guid.Parse("25985303-c537-4467-b41d-bdb45cd95ca1"), Guid.Parse("43897a75-8d6f-42cf-885e-74832febb055"), null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("persistedFaceId").ToString()); +]]> + + + +This sample shows how to call UpdateFaceAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +LargePersonGroupClient client = new FaceAdministrationClient(endpoint, credential).GetLargePersonGroupClient("your_large_person_group_id"); + +using RequestContent content = RequestContent.Create(new +{ + userData = "your_user_data", +}); +Response response = await client.UpdateFaceAsync(Guid.Parse("25985303-c537-4467-b41d-bdb45cd95ca1"), Guid.Parse("43897a75-8d6f-42cf-885e-74832febb055"), content); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call UpdateFace. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +LargePersonGroupClient client = new FaceAdministrationClient(endpoint, credential).GetLargePersonGroupClient("your_large_person_group_id"); + +using RequestContent content = RequestContent.Create(new +{ + userData = "your_user_data", +}); +Response response = client.UpdateFace(Guid.Parse("25985303-c537-4467-b41d-bdb45cd95ca1"), Guid.Parse("43897a75-8d6f-42cf-885e-74832febb055"), content); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call TrainAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +LargePersonGroupClient client = new FaceAdministrationClient(endpoint, credential).GetLargePersonGroupClient("your_large_person_group_id"); + +Operation operation = await client.TrainAsync(WaitUntil.Completed); +]]> + + + +This sample shows how to call Train. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +LargePersonGroupClient client = new FaceAdministrationClient(endpoint, credential).GetLargePersonGroupClient("your_large_person_group_id"); + +Operation operation = client.Train(WaitUntil.Completed); +]]> + + + \ No newline at end of file diff --git a/sdk/face/Azure.AI.Vision.Face/src/Generated/FaceAdministrationClient.cs b/sdk/face/Azure.AI.Vision.Face/src/Generated/FaceAdministrationClient.cs new file mode 100644 index 000000000000..f1f0cc7b85f6 --- /dev/null +++ b/sdk/face/Azure.AI.Vision.Face/src/Generated/FaceAdministrationClient.cs @@ -0,0 +1,123 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.AI.Vision.Face +{ + // Data plane generated client. + /// The FaceAdministration service client. + public partial class FaceAdministrationClient + { + private const string AuthorizationHeader = "Ocp-Apim-Subscription-Key"; + private readonly AzureKeyCredential _keyCredential; + private static readonly string[] AuthorizationScopes = new string[] { "https://cognitiveservices.azure.com/.default" }; + private readonly TokenCredential _tokenCredential; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// The ClientDiagnostics is used to provide tracing support for the client library. + internal ClientDiagnostics ClientDiagnostics { get; } + + /// The HTTP pipeline for sending and receiving REST requests and responses. + public virtual HttpPipeline Pipeline => _pipeline; + + /// Initializes a new instance of FaceAdministrationClient for mocking. + protected FaceAdministrationClient() + { + } + + /// Initializes a new instance of FaceAdministrationClient. + /// + /// Supported Cognitive Services endpoints (protocol and hostname, for example: + /// https://{resource-name}.cognitiveservices.azure.com). + /// + /// A credential used to authenticate to an Azure Service. + /// or is null. + public FaceAdministrationClient(Uri endpoint, AzureKeyCredential credential) : this(endpoint, credential, new AzureAIVisionFaceClientOptions()) + { + } + + /// Initializes a new instance of FaceAdministrationClient. + /// + /// Supported Cognitive Services endpoints (protocol and hostname, for example: + /// https://{resource-name}.cognitiveservices.azure.com). + /// + /// A credential used to authenticate to an Azure Service. + /// or is null. + public FaceAdministrationClient(Uri endpoint, TokenCredential credential) : this(endpoint, credential, new AzureAIVisionFaceClientOptions()) + { + } + + /// Initializes a new instance of FaceAdministrationClient. + /// + /// Supported Cognitive Services endpoints (protocol and hostname, for example: + /// https://{resource-name}.cognitiveservices.azure.com). + /// + /// A credential used to authenticate to an Azure Service. + /// The options for configuring the client. + /// or is null. + public FaceAdministrationClient(Uri endpoint, AzureKeyCredential credential, AzureAIVisionFaceClientOptions options) + { + Argument.AssertNotNull(endpoint, nameof(endpoint)); + Argument.AssertNotNull(credential, nameof(credential)); + options ??= new AzureAIVisionFaceClientOptions(); + + ClientDiagnostics = new ClientDiagnostics(options, true); + _keyCredential = credential; + _pipeline = HttpPipelineBuilder.Build(options, Array.Empty(), new HttpPipelinePolicy[] { new AzureKeyCredentialPolicy(_keyCredential, AuthorizationHeader) }, new ResponseClassifier()); + _endpoint = endpoint; + _apiVersion = options.Version; + } + + /// Initializes a new instance of FaceAdministrationClient. + /// + /// Supported Cognitive Services endpoints (protocol and hostname, for example: + /// https://{resource-name}.cognitiveservices.azure.com). + /// + /// A credential used to authenticate to an Azure Service. + /// The options for configuring the client. + /// or is null. + public FaceAdministrationClient(Uri endpoint, TokenCredential credential, AzureAIVisionFaceClientOptions options) + { + Argument.AssertNotNull(endpoint, nameof(endpoint)); + Argument.AssertNotNull(credential, nameof(credential)); + options ??= new AzureAIVisionFaceClientOptions(); + + ClientDiagnostics = new ClientDiagnostics(options, true); + _tokenCredential = credential; + _pipeline = HttpPipelineBuilder.Build(options, Array.Empty(), new HttpPipelinePolicy[] { new BearerTokenAuthenticationPolicy(_tokenCredential, AuthorizationScopes) }, new ResponseClassifier()); + _endpoint = endpoint; + _apiVersion = options.Version; + } + + /// Initializes a new instance of LargeFaceListClient. + /// Valid character is letter in lower case or digit or '-' or '_', maximum length is 64. + /// is null. + /// is an empty string, and was expected to be non-empty. + public virtual LargeFaceListClient GetLargeFaceListClient(string largeFaceListId) + { + Argument.AssertNotNullOrEmpty(largeFaceListId, nameof(largeFaceListId)); + + return new LargeFaceListClient(ClientDiagnostics, _pipeline, _keyCredential, _tokenCredential, _endpoint, largeFaceListId, _apiVersion); + } + + /// Initializes a new instance of LargePersonGroupClient. + /// ID of the container. + /// is null. + /// is an empty string, and was expected to be non-empty. + public virtual LargePersonGroupClient GetLargePersonGroupClient(string largePersonGroupId) + { + Argument.AssertNotNullOrEmpty(largePersonGroupId, nameof(largePersonGroupId)); + + return new LargePersonGroupClient(ClientDiagnostics, _pipeline, _keyCredential, _tokenCredential, _endpoint, largePersonGroupId, _apiVersion); + } + } +} diff --git a/sdk/face/Azure.AI.Vision.Face/src/Generated/FaceClient.cs b/sdk/face/Azure.AI.Vision.Face/src/Generated/FaceClient.cs index 1a0b973e9201..7cb8c3849ea7 100644 --- a/sdk/face/Azure.AI.Vision.Face/src/Generated/FaceClient.cs +++ b/sdk/face/Azure.AI.Vision.Face/src/Generated/FaceClient.cs @@ -105,7 +105,7 @@ public FaceClient(Uri endpoint, TokenCredential credential, AzureAIVisionFaceCli /// Detect human faces in an image, return face rectangles, and optionally with faceIds, landmarks, and attributes. /// URL of input image. - /// The 'detectionModel' associated with the detected faceIds. Supported 'detectionModel' values include 'detection_01', 'detection_02' and 'detection_03'. The default value is 'detection_01'. + /// The 'detectionModel' associated with the detected faceIds. Supported 'detectionModel' values include 'detection_01', 'detection_02' and 'detection_03'. The default value is 'detection_01'. 'detection_03' is recommended since its accuracy is improved on smaller faces (64x64 pixels) and rotated face orientations. /// The 'recognitionModel' associated with the detected faceIds. Supported 'recognitionModel' values include 'recognition_01', 'recognition_02', 'recognition_03' or 'recognition_04'. The default value is 'recognition_01'. 'recognition_04' is recommended since its accuracy is improved on faces wearing masks compared with 'recognition_03', and its overall accuracy is improved compared with 'recognition_01' and 'recognition_02'. /// Return faceIds of the detected faces or not. The default value is true. /// Analyze and return the one or more specified face attributes in the comma-separated string like 'returnFaceAttributes=headPose,glasses'. Face attribute analysis has additional computational and time cost. @@ -114,22 +114,7 @@ public FaceClient(Uri endpoint, TokenCredential credential, AzureAIVisionFaceCli /// The number of seconds for the face ID being cached. Supported range from 60 seconds up to 86400 seconds. The default value is 86400 (24 hours). /// The cancellation token to use. /// is null. - /// - /// > [!IMPORTANT] - /// > To mitigate potential misuse that can subject people to stereotyping, discrimination, or unfair denial of services, we are retiring Face API attributes that predict emotion, gender, age, smile, facial hair, hair, and makeup. Read more about this decision https://azure.microsoft.com/blog/responsible-ai-investments-and-safeguards-for-facial-recognition/. - /// - /// * - /// * No image will be stored. Only the extracted face feature(s) will be stored on server. The faceId is an identifier of the face feature and will be used in "Identify", "Verify", and "Find Similar". The stored face features will expire and be deleted at the time specified by faceIdTimeToLive after the original detection call. - /// * Optional parameters include faceId, landmarks, and attributes. Attributes include headPose, glasses, occlusion, accessories, blur, exposure, noise, mask, and qualityForRecognition. Some of the results returned for specific attributes may not be highly accurate. - /// * JPEG, PNG, GIF (the first frame), and BMP format are supported. The allowed image file size is from 1KB to 6MB. - /// * The minimum detectable face size is 36x36 pixels in an image no larger than 1920x1080 pixels. Images with dimensions higher than 1920x1080 pixels will need a proportionally larger minimum face size. - /// * Up to 100 faces can be returned for an image. Faces are ranked by face rectangle size from large to small. - /// * For optimal results when querying "Identify", "Verify", and "Find Similar" ('returnFaceId' is true), please use faces that are: frontal, clear, and with a minimum size of 200x200 pixels (100 pixels between eyes). - /// * Different 'detectionModel' values can be provided. To use and compare different detection models, please refer to https://learn.microsoft.com/azure/ai-services/computer-vision/how-to/specify-detection-model - /// * 'detection_02': Face attributes and landmarks are disabled if you choose this detection model. - /// * 'detection_03': Face attributes (mask, blur, and headPose) and landmarks are supported if you choose this detection model. - /// * Different 'recognitionModel' values are provided. If follow-up operations like "Verify", "Identify", "Find Similar" are needed, please specify the recognition model with 'recognitionModel' parameter. The default value for 'recognitionModel' is 'recognition_01', if latest model needed, please explicitly specify the model you need in this parameter. Once specified, the detected faceIds will be associated with the specified recognition model. More details, please refer to https://learn.microsoft.com/azure/ai-services/computer-vision/how-to/specify-recognition-model. - /// + /// Please refer to https://learn.microsoft.com/rest/api/face/face-detection-operations/detect-from-url for more details. internal virtual async Task>> DetectFromUrlImplAsync(Uri uri, FaceDetectionModel? detectionModel = null, FaceRecognitionModel? recognitionModel = null, bool? returnFaceId = null, IEnumerable returnFaceAttributes = null, bool? returnFaceLandmarks = null, bool? returnRecognitionModel = null, int? faceIdTimeToLive = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(uri, nameof(uri)); @@ -150,7 +135,7 @@ internal virtual async Task>> Detect /// Detect human faces in an image, return face rectangles, and optionally with faceIds, landmarks, and attributes. /// URL of input image. - /// The 'detectionModel' associated with the detected faceIds. Supported 'detectionModel' values include 'detection_01', 'detection_02' and 'detection_03'. The default value is 'detection_01'. + /// The 'detectionModel' associated with the detected faceIds. Supported 'detectionModel' values include 'detection_01', 'detection_02' and 'detection_03'. The default value is 'detection_01'. 'detection_03' is recommended since its accuracy is improved on smaller faces (64x64 pixels) and rotated face orientations. /// The 'recognitionModel' associated with the detected faceIds. Supported 'recognitionModel' values include 'recognition_01', 'recognition_02', 'recognition_03' or 'recognition_04'. The default value is 'recognition_01'. 'recognition_04' is recommended since its accuracy is improved on faces wearing masks compared with 'recognition_03', and its overall accuracy is improved compared with 'recognition_01' and 'recognition_02'. /// Return faceIds of the detected faces or not. The default value is true. /// Analyze and return the one or more specified face attributes in the comma-separated string like 'returnFaceAttributes=headPose,glasses'. Face attribute analysis has additional computational and time cost. @@ -159,22 +144,7 @@ internal virtual async Task>> Detect /// The number of seconds for the face ID being cached. Supported range from 60 seconds up to 86400 seconds. The default value is 86400 (24 hours). /// The cancellation token to use. /// is null. - /// - /// > [!IMPORTANT] - /// > To mitigate potential misuse that can subject people to stereotyping, discrimination, or unfair denial of services, we are retiring Face API attributes that predict emotion, gender, age, smile, facial hair, hair, and makeup. Read more about this decision https://azure.microsoft.com/blog/responsible-ai-investments-and-safeguards-for-facial-recognition/. - /// - /// * - /// * No image will be stored. Only the extracted face feature(s) will be stored on server. The faceId is an identifier of the face feature and will be used in "Identify", "Verify", and "Find Similar". The stored face features will expire and be deleted at the time specified by faceIdTimeToLive after the original detection call. - /// * Optional parameters include faceId, landmarks, and attributes. Attributes include headPose, glasses, occlusion, accessories, blur, exposure, noise, mask, and qualityForRecognition. Some of the results returned for specific attributes may not be highly accurate. - /// * JPEG, PNG, GIF (the first frame), and BMP format are supported. The allowed image file size is from 1KB to 6MB. - /// * The minimum detectable face size is 36x36 pixels in an image no larger than 1920x1080 pixels. Images with dimensions higher than 1920x1080 pixels will need a proportionally larger minimum face size. - /// * Up to 100 faces can be returned for an image. Faces are ranked by face rectangle size from large to small. - /// * For optimal results when querying "Identify", "Verify", and "Find Similar" ('returnFaceId' is true), please use faces that are: frontal, clear, and with a minimum size of 200x200 pixels (100 pixels between eyes). - /// * Different 'detectionModel' values can be provided. To use and compare different detection models, please refer to https://learn.microsoft.com/azure/ai-services/computer-vision/how-to/specify-detection-model - /// * 'detection_02': Face attributes and landmarks are disabled if you choose this detection model. - /// * 'detection_03': Face attributes (mask, blur, and headPose) and landmarks are supported if you choose this detection model. - /// * Different 'recognitionModel' values are provided. If follow-up operations like "Verify", "Identify", "Find Similar" are needed, please specify the recognition model with 'recognitionModel' parameter. The default value for 'recognitionModel' is 'recognition_01', if latest model needed, please explicitly specify the model you need in this parameter. Once specified, the detected faceIds will be associated with the specified recognition model. More details, please refer to https://learn.microsoft.com/azure/ai-services/computer-vision/how-to/specify-recognition-model. - /// + /// Please refer to https://learn.microsoft.com/rest/api/face/face-detection-operations/detect-from-url for more details. internal virtual Response> DetectFromUrlImpl(Uri uri, FaceDetectionModel? detectionModel = null, FaceRecognitionModel? recognitionModel = null, bool? returnFaceId = null, IEnumerable returnFaceAttributes = null, bool? returnFaceLandmarks = null, bool? returnRecognitionModel = null, int? faceIdTimeToLive = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(uri, nameof(uri)); @@ -209,7 +179,7 @@ internal virtual Response> DetectFromUrlImpl( /// /// /// The content to send as the body of the request. - /// The 'detectionModel' associated with the detected faceIds. Supported 'detectionModel' values include 'detection_01', 'detection_02' and 'detection_03'. The default value is 'detection_01'. Allowed values: "detection_01" | "detection_02" | "detection_03". + /// The 'detectionModel' associated with the detected faceIds. Supported 'detectionModel' values include 'detection_01', 'detection_02' and 'detection_03'. The default value is 'detection_01'. 'detection_03' is recommended since its accuracy is improved on smaller faces (64x64 pixels) and rotated face orientations. Allowed values: "detection_01" | "detection_02" | "detection_03". /// The 'recognitionModel' associated with the detected faceIds. Supported 'recognitionModel' values include 'recognition_01', 'recognition_02', 'recognition_03' or 'recognition_04'. The default value is 'recognition_01'. 'recognition_04' is recommended since its accuracy is improved on faces wearing masks compared with 'recognition_03', and its overall accuracy is improved compared with 'recognition_01' and 'recognition_02'. Allowed values: "recognition_01" | "recognition_02" | "recognition_03" | "recognition_04". /// Return faceIds of the detected faces or not. The default value is true. /// Analyze and return the one or more specified face attributes in the comma-separated string like 'returnFaceAttributes=headPose,glasses'. Face attribute analysis has additional computational and time cost. @@ -254,7 +224,7 @@ internal virtual async Task DetectFromUrlImplAsync(RequestContent cont /// /// /// The content to send as the body of the request. - /// The 'detectionModel' associated with the detected faceIds. Supported 'detectionModel' values include 'detection_01', 'detection_02' and 'detection_03'. The default value is 'detection_01'. Allowed values: "detection_01" | "detection_02" | "detection_03". + /// The 'detectionModel' associated with the detected faceIds. Supported 'detectionModel' values include 'detection_01', 'detection_02' and 'detection_03'. The default value is 'detection_01'. 'detection_03' is recommended since its accuracy is improved on smaller faces (64x64 pixels) and rotated face orientations. Allowed values: "detection_01" | "detection_02" | "detection_03". /// The 'recognitionModel' associated with the detected faceIds. Supported 'recognitionModel' values include 'recognition_01', 'recognition_02', 'recognition_03' or 'recognition_04'. The default value is 'recognition_01'. 'recognition_04' is recommended since its accuracy is improved on faces wearing masks compared with 'recognition_03', and its overall accuracy is improved compared with 'recognition_01' and 'recognition_02'. Allowed values: "recognition_01" | "recognition_02" | "recognition_03" | "recognition_04". /// Return faceIds of the detected faces or not. The default value is true. /// Analyze and return the one or more specified face attributes in the comma-separated string like 'returnFaceAttributes=headPose,glasses'. Face attribute analysis has additional computational and time cost. @@ -285,7 +255,7 @@ internal virtual Response DetectFromUrlImpl(RequestContent content, string detec /// Detect human faces in an image, return face rectangles, and optionally with faceIds, landmarks, and attributes. /// The input image binary. - /// The 'detectionModel' associated with the detected faceIds. Supported 'detectionModel' values include 'detection_01', 'detection_02' and 'detection_03'. The default value is 'detection_01'. + /// The 'detectionModel' associated with the detected faceIds. Supported 'detectionModel' values include 'detection_01', 'detection_02' and 'detection_03'. The default value is 'detection_01'. 'detection_03' is recommended since its accuracy is improved on smaller faces (64x64 pixels) and rotated face orientations. /// The 'recognitionModel' associated with the detected faceIds. Supported 'recognitionModel' values include 'recognition_01', 'recognition_02', 'recognition_03' or 'recognition_04'. The default value is 'recognition_01'. 'recognition_04' is recommended since its accuracy is improved on faces wearing masks compared with 'recognition_03', and its overall accuracy is improved compared with 'recognition_01' and 'recognition_02'. /// Return faceIds of the detected faces or not. The default value is true. /// Analyze and return the one or more specified face attributes in the comma-separated string like 'returnFaceAttributes=headPose,glasses'. Face attribute analysis has additional computational and time cost. @@ -294,22 +264,7 @@ internal virtual Response DetectFromUrlImpl(RequestContent content, string detec /// The number of seconds for the face ID being cached. Supported range from 60 seconds up to 86400 seconds. The default value is 86400 (24 hours). /// The cancellation token to use. /// is null. - /// - /// > [!IMPORTANT] - /// > To mitigate potential misuse that can subject people to stereotyping, discrimination, or unfair denial of services, we are retiring Face API attributes that predict emotion, gender, age, smile, facial hair, hair, and makeup. Read more about this decision https://azure.microsoft.com/blog/responsible-ai-investments-and-safeguards-for-facial-recognition/. - /// - /// * - /// * No image will be stored. Only the extracted face feature(s) will be stored on server. The faceId is an identifier of the face feature and will be used in "Identify", "Verify", and "Find Similar". The stored face features will expire and be deleted at the time specified by faceIdTimeToLive after the original detection call. - /// * Optional parameters include faceId, landmarks, and attributes. Attributes include headPose, glasses, occlusion, accessories, blur, exposure, noise, mask, and qualityForRecognition. Some of the results returned for specific attributes may not be highly accurate. - /// * JPEG, PNG, GIF (the first frame), and BMP format are supported. The allowed image file size is from 1KB to 6MB. - /// * The minimum detectable face size is 36x36 pixels in an image no larger than 1920x1080 pixels. Images with dimensions higher than 1920x1080 pixels will need a proportionally larger minimum face size. - /// * Up to 100 faces can be returned for an image. Faces are ranked by face rectangle size from large to small. - /// * For optimal results when querying "Identify", "Verify", and "Find Similar" ('returnFaceId' is true), please use faces that are: frontal, clear, and with a minimum size of 200x200 pixels (100 pixels between eyes). - /// * Different 'detectionModel' values can be provided. To use and compare different detection models, please refer to https://learn.microsoft.com/azure/ai-services/computer-vision/how-to/specify-detection-model - /// * 'detection_02': Face attributes and landmarks are disabled if you choose this detection model. - /// * 'detection_03': Face attributes (mask, blur, and headPose) and landmarks are supported if you choose this detection model. - /// * Different 'recognitionModel' values are provided. If follow-up operations like "Verify", "Identify", "Find Similar" are needed, please specify the recognition model with 'recognitionModel' parameter. The default value for 'recognitionModel' is 'recognition_01', if latest model needed, please explicitly specify the model you need in this parameter. Once specified, the detected faceIds will be associated with the specified recognition model. More details, please refer to https://learn.microsoft.com/azure/ai-services/computer-vision/how-to/specify-recognition-model. - /// + /// Please refer to https://learn.microsoft.com/rest/api/face/face-detection-operations/detect for more details. internal virtual async Task>> DetectImplAsync(BinaryData imageContent, FaceDetectionModel? detectionModel = null, FaceRecognitionModel? recognitionModel = null, bool? returnFaceId = null, IEnumerable returnFaceAttributes = null, bool? returnFaceLandmarks = null, bool? returnRecognitionModel = null, int? faceIdTimeToLive = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(imageContent, nameof(imageContent)); @@ -330,7 +285,7 @@ internal virtual async Task>> Detect /// Detect human faces in an image, return face rectangles, and optionally with faceIds, landmarks, and attributes. /// The input image binary. - /// The 'detectionModel' associated with the detected faceIds. Supported 'detectionModel' values include 'detection_01', 'detection_02' and 'detection_03'. The default value is 'detection_01'. + /// The 'detectionModel' associated with the detected faceIds. Supported 'detectionModel' values include 'detection_01', 'detection_02' and 'detection_03'. The default value is 'detection_01'. 'detection_03' is recommended since its accuracy is improved on smaller faces (64x64 pixels) and rotated face orientations. /// The 'recognitionModel' associated with the detected faceIds. Supported 'recognitionModel' values include 'recognition_01', 'recognition_02', 'recognition_03' or 'recognition_04'. The default value is 'recognition_01'. 'recognition_04' is recommended since its accuracy is improved on faces wearing masks compared with 'recognition_03', and its overall accuracy is improved compared with 'recognition_01' and 'recognition_02'. /// Return faceIds of the detected faces or not. The default value is true. /// Analyze and return the one or more specified face attributes in the comma-separated string like 'returnFaceAttributes=headPose,glasses'. Face attribute analysis has additional computational and time cost. @@ -339,22 +294,7 @@ internal virtual async Task>> Detect /// The number of seconds for the face ID being cached. Supported range from 60 seconds up to 86400 seconds. The default value is 86400 (24 hours). /// The cancellation token to use. /// is null. - /// - /// > [!IMPORTANT] - /// > To mitigate potential misuse that can subject people to stereotyping, discrimination, or unfair denial of services, we are retiring Face API attributes that predict emotion, gender, age, smile, facial hair, hair, and makeup. Read more about this decision https://azure.microsoft.com/blog/responsible-ai-investments-and-safeguards-for-facial-recognition/. - /// - /// * - /// * No image will be stored. Only the extracted face feature(s) will be stored on server. The faceId is an identifier of the face feature and will be used in "Identify", "Verify", and "Find Similar". The stored face features will expire and be deleted at the time specified by faceIdTimeToLive after the original detection call. - /// * Optional parameters include faceId, landmarks, and attributes. Attributes include headPose, glasses, occlusion, accessories, blur, exposure, noise, mask, and qualityForRecognition. Some of the results returned for specific attributes may not be highly accurate. - /// * JPEG, PNG, GIF (the first frame), and BMP format are supported. The allowed image file size is from 1KB to 6MB. - /// * The minimum detectable face size is 36x36 pixels in an image no larger than 1920x1080 pixels. Images with dimensions higher than 1920x1080 pixels will need a proportionally larger minimum face size. - /// * Up to 100 faces can be returned for an image. Faces are ranked by face rectangle size from large to small. - /// * For optimal results when querying "Identify", "Verify", and "Find Similar" ('returnFaceId' is true), please use faces that are: frontal, clear, and with a minimum size of 200x200 pixels (100 pixels between eyes). - /// * Different 'detectionModel' values can be provided. To use and compare different detection models, please refer to https://learn.microsoft.com/azure/ai-services/computer-vision/how-to/specify-detection-model - /// * 'detection_02': Face attributes and landmarks are disabled if you choose this detection model. - /// * 'detection_03': Face attributes (mask, blur, and headPose) and landmarks are supported if you choose this detection model. - /// * Different 'recognitionModel' values are provided. If follow-up operations like "Verify", "Identify", "Find Similar" are needed, please specify the recognition model with 'recognitionModel' parameter. The default value for 'recognitionModel' is 'recognition_01', if latest model needed, please explicitly specify the model you need in this parameter. Once specified, the detected faceIds will be associated with the specified recognition model. More details, please refer to https://learn.microsoft.com/azure/ai-services/computer-vision/how-to/specify-recognition-model. - /// + /// Please refer to https://learn.microsoft.com/rest/api/face/face-detection-operations/detect for more details. internal virtual Response> DetectImpl(BinaryData imageContent, FaceDetectionModel? detectionModel = null, FaceRecognitionModel? recognitionModel = null, bool? returnFaceId = null, IEnumerable returnFaceAttributes = null, bool? returnFaceLandmarks = null, bool? returnRecognitionModel = null, int? faceIdTimeToLive = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(imageContent, nameof(imageContent)); @@ -389,7 +329,7 @@ internal virtual Response> DetectImpl(BinaryD /// /// /// The content to send as the body of the request. - /// The 'detectionModel' associated with the detected faceIds. Supported 'detectionModel' values include 'detection_01', 'detection_02' and 'detection_03'. The default value is 'detection_01'. Allowed values: "detection_01" | "detection_02" | "detection_03". + /// The 'detectionModel' associated with the detected faceIds. Supported 'detectionModel' values include 'detection_01', 'detection_02' and 'detection_03'. The default value is 'detection_01'. 'detection_03' is recommended since its accuracy is improved on smaller faces (64x64 pixels) and rotated face orientations. Allowed values: "detection_01" | "detection_02" | "detection_03". /// The 'recognitionModel' associated with the detected faceIds. Supported 'recognitionModel' values include 'recognition_01', 'recognition_02', 'recognition_03' or 'recognition_04'. The default value is 'recognition_01'. 'recognition_04' is recommended since its accuracy is improved on faces wearing masks compared with 'recognition_03', and its overall accuracy is improved compared with 'recognition_01' and 'recognition_02'. Allowed values: "recognition_01" | "recognition_02" | "recognition_03" | "recognition_04". /// Return faceIds of the detected faces or not. The default value is true. /// Analyze and return the one or more specified face attributes in the comma-separated string like 'returnFaceAttributes=headPose,glasses'. Face attribute analysis has additional computational and time cost. @@ -434,7 +374,7 @@ internal virtual async Task DetectImplAsync(RequestContent content, st /// /// /// The content to send as the body of the request. - /// The 'detectionModel' associated with the detected faceIds. Supported 'detectionModel' values include 'detection_01', 'detection_02' and 'detection_03'. The default value is 'detection_01'. Allowed values: "detection_01" | "detection_02" | "detection_03". + /// The 'detectionModel' associated with the detected faceIds. Supported 'detectionModel' values include 'detection_01', 'detection_02' and 'detection_03'. The default value is 'detection_01'. 'detection_03' is recommended since its accuracy is improved on smaller faces (64x64 pixels) and rotated face orientations. Allowed values: "detection_01" | "detection_02" | "detection_03". /// The 'recognitionModel' associated with the detected faceIds. Supported 'recognitionModel' values include 'recognition_01', 'recognition_02', 'recognition_03' or 'recognition_04'. The default value is 'recognition_01'. 'recognition_04' is recommended since its accuracy is improved on faces wearing masks compared with 'recognition_03', and its overall accuracy is improved compared with 'recognition_01' and 'recognition_02'. Allowed values: "recognition_01" | "recognition_02" | "recognition_03" | "recognition_04". /// Return faceIds of the detected faces or not. The default value is true. /// Analyze and return the one or more specified face attributes in the comma-separated string like 'returnFaceAttributes=headPose,glasses'. Face attribute analysis has additional computational and time cost. @@ -470,13 +410,7 @@ internal virtual Response DetectImpl(RequestContent content, string detectionMod /// Similar face searching mode. It can be 'matchPerson' or 'matchFace'. Default value is 'matchPerson'. /// The cancellation token to use. /// is null. - /// - /// Depending on the input the returned similar faces list contains faceIds or persistedFaceIds ranked by similarity. - /// - /// Find similar has two working modes, "matchPerson" and "matchFace". "matchPerson" is the default mode that it tries to find faces of the same person as possible by using internal same-person thresholds. It is useful to find a known person's other photos. Note that an empty list will be returned if no faces pass the internal thresholds. "matchFace" mode ignores same-person thresholds and returns ranked similar faces anyway, even the similarity is low. It can be used in the cases like searching celebrity-looking faces. - /// - /// The 'recognitionModel' associated with the query faceId should be the same as the 'recognitionModel' used by the target faceId array. - /// + /// Please refer to https://learn.microsoft.com/rest/api/face/face-recognition-operations/find-similar for more details. /// public virtual async Task>> FindSimilarAsync(Guid faceId, IEnumerable faceIds, int? maxNumOfCandidatesReturned = null, FindSimilarMatchMode? mode = null, CancellationToken cancellationToken = default) { @@ -503,13 +437,7 @@ public virtual async Task>> FindSi /// Similar face searching mode. It can be 'matchPerson' or 'matchFace'. Default value is 'matchPerson'. /// The cancellation token to use. /// is null. - /// - /// Depending on the input the returned similar faces list contains faceIds or persistedFaceIds ranked by similarity. - /// - /// Find similar has two working modes, "matchPerson" and "matchFace". "matchPerson" is the default mode that it tries to find faces of the same person as possible by using internal same-person thresholds. It is useful to find a known person's other photos. Note that an empty list will be returned if no faces pass the internal thresholds. "matchFace" mode ignores same-person thresholds and returns ranked similar faces anyway, even the similarity is low. It can be used in the cases like searching celebrity-looking faces. - /// - /// The 'recognitionModel' associated with the query faceId should be the same as the 'recognitionModel' used by the target faceId array. - /// + /// Please refer to https://learn.microsoft.com/rest/api/face/face-recognition-operations/find-similar for more details. /// public virtual Response> FindSimilar(Guid faceId, IEnumerable faceIds, int? maxNumOfCandidatesReturned = null, FindSimilarMatchMode? mode = null, CancellationToken cancellationToken = default) { @@ -611,14 +539,7 @@ public virtual Response FindSimilar(RequestContent content, RequestContext conte /// The faceId of one face, come from "Detect". /// The faceId of another face, come from "Detect". /// The cancellation token to use. - /// - /// > [!NOTE] - /// > - /// > * - /// > * Higher face image quality means better identification precision. Please consider high-quality faces: frontal, clear, and face size is 200x200 pixels (100 pixels between eyes) or bigger. - /// > * For the scenarios that are sensitive to accuracy please make your own judgment. - /// > * The 'recognitionModel' associated with the both faces should be the same. - /// + /// Please refer to https://learn.microsoft.com/rest/api/face/face-recognition-operations/verify-face-to-face for more details. /// public virtual async Task> VerifyFaceToFaceAsync(Guid faceId1, Guid faceId2, CancellationToken cancellationToken = default) { @@ -632,14 +553,7 @@ public virtual async Task> VerifyFaceToFaceAsyn /// The faceId of one face, come from "Detect". /// The faceId of another face, come from "Detect". /// The cancellation token to use. - /// - /// > [!NOTE] - /// > - /// > * - /// > * Higher face image quality means better identification precision. Please consider high-quality faces: frontal, clear, and face size is 200x200 pixels (100 pixels between eyes) or bigger. - /// > * For the scenarios that are sensitive to accuracy please make your own judgment. - /// > * The 'recognitionModel' associated with the both faces should be the same. - /// + /// Please refer to https://learn.microsoft.com/rest/api/face/face-recognition-operations/verify-face-to-face for more details. /// public virtual Response VerifyFaceToFace(Guid faceId1, Guid faceId2, CancellationToken cancellationToken = default) { @@ -731,14 +645,7 @@ public virtual Response VerifyFaceToFace(RequestContent content, RequestContext /// Array of candidate faceIds created by "Detect". The maximum is 1000 faces. /// The cancellation token to use. /// is null. - /// - /// > - /// * - /// * The output is one or more disjointed face groups and a messyGroup. A face group contains faces that have similar looking, often of the same person. Face groups are ranked by group size, i.e. number of faces. Notice that faces belonging to a same person might be split into several groups in the result. - /// * MessyGroup is a special face group containing faces that cannot find any similar counterpart face from original faces. The messyGroup will not appear in the result if all faces found their counterparts. - /// * Group API needs at least 2 candidate faces and 1000 at most. We suggest to try "Verify Face To Face" when you only have 2 candidate faces. - /// * The 'recognitionModel' associated with the query faces' faceIds should be the same. - /// + /// Please refer to https://learn.microsoft.com/rest/api/face/face-recognition-operations/group for more details. /// public virtual async Task> GroupAsync(IEnumerable faceIds, CancellationToken cancellationToken = default) { @@ -754,14 +661,7 @@ public virtual async Task> GroupAsync(IEnumerable Array of candidate faceIds created by "Detect". The maximum is 1000 faces. /// The cancellation token to use. /// is null. - /// - /// > - /// * - /// * The output is one or more disjointed face groups and a messyGroup. A face group contains faces that have similar looking, often of the same person. Face groups are ranked by group size, i.e. number of faces. Notice that faces belonging to a same person might be split into several groups in the result. - /// * MessyGroup is a special face group containing faces that cannot find any similar counterpart face from original faces. The messyGroup will not appear in the result if all faces found their counterparts. - /// * Group API needs at least 2 candidate faces and 1000 at most. We suggest to try "Verify Face To Face" when you only have 2 candidate faces. - /// * The 'recognitionModel' associated with the query faces' faceIds should be the same. - /// + /// Please refer to https://learn.microsoft.com/rest/api/face/face-recognition-operations/group for more details. /// public virtual Response Group(IEnumerable faceIds, CancellationToken cancellationToken = default) { @@ -851,6 +751,386 @@ public virtual Response Group(RequestContent content, RequestContext context = n } } + /// Given query face's faceId, to search the similar-looking faces from a Large Face List. A 'largeFaceListId' is created by Create Large Face List. + /// faceId of the query face. User needs to call "Detect" first to get a valid faceId. Note that this faceId is not persisted and will expire 24 hours after the detection call. + /// An existing user-specified unique candidate Large Face List, created in "Create Large Face List". Large Face List contains a set of persistedFaceIds which are persisted and will never expire. + /// The number of top similar faces returned. The valid range is [1, 1000]. Default value is 20. + /// Similar face searching mode. It can be 'matchPerson' or 'matchFace'. Default value is 'matchPerson'. + /// The cancellation token to use. + /// is null. + /// Please refer to https://learn.microsoft.com/rest/api/face/face-recognition-operations/find-similar-from-large-face-list for more details. + /// + public virtual async Task>> FindSimilarFromLargeFaceListAsync(Guid faceId, string largeFaceListId, int? maxNumOfCandidatesReturned = null, FindSimilarMatchMode? mode = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(largeFaceListId, nameof(largeFaceListId)); + + FindSimilarFromLargeFaceListRequest findSimilarFromLargeFaceListRequest = new FindSimilarFromLargeFaceListRequest(faceId, maxNumOfCandidatesReturned, mode, largeFaceListId, null); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await FindSimilarFromLargeFaceListAsync(findSimilarFromLargeFaceListRequest.ToRequestContent(), context).ConfigureAwait(false); + IReadOnlyList value = default; + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + List array = new List(); + foreach (var item in document.RootElement.EnumerateArray()) + { + array.Add(FaceFindSimilarResult.DeserializeFaceFindSimilarResult(item)); + } + value = array; + return Response.FromValue(value, response); + } + + /// Given query face's faceId, to search the similar-looking faces from a Large Face List. A 'largeFaceListId' is created by Create Large Face List. + /// faceId of the query face. User needs to call "Detect" first to get a valid faceId. Note that this faceId is not persisted and will expire 24 hours after the detection call. + /// An existing user-specified unique candidate Large Face List, created in "Create Large Face List". Large Face List contains a set of persistedFaceIds which are persisted and will never expire. + /// The number of top similar faces returned. The valid range is [1, 1000]. Default value is 20. + /// Similar face searching mode. It can be 'matchPerson' or 'matchFace'. Default value is 'matchPerson'. + /// The cancellation token to use. + /// is null. + /// Please refer to https://learn.microsoft.com/rest/api/face/face-recognition-operations/find-similar-from-large-face-list for more details. + /// + public virtual Response> FindSimilarFromLargeFaceList(Guid faceId, string largeFaceListId, int? maxNumOfCandidatesReturned = null, FindSimilarMatchMode? mode = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(largeFaceListId, nameof(largeFaceListId)); + + FindSimilarFromLargeFaceListRequest findSimilarFromLargeFaceListRequest = new FindSimilarFromLargeFaceListRequest(faceId, maxNumOfCandidatesReturned, mode, largeFaceListId, null); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = FindSimilarFromLargeFaceList(findSimilarFromLargeFaceListRequest.ToRequestContent(), context); + IReadOnlyList value = default; + using var document = JsonDocument.Parse(response.ContentStream); + List array = new List(); + foreach (var item in document.RootElement.EnumerateArray()) + { + array.Add(FaceFindSimilarResult.DeserializeFaceFindSimilarResult(item)); + } + value = array; + return Response.FromValue(value, response); + } + + /// + /// [Protocol Method] Given query face's faceId, to search the similar-looking faces from a Large Face List. A 'largeFaceListId' is created by Create Large Face List. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task FindSimilarFromLargeFaceListAsync(RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("FaceClient.FindSimilarFromLargeFaceList"); + scope.Start(); + try + { + using HttpMessage message = CreateFindSimilarFromLargeFaceListRequest(content, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Given query face's faceId, to search the similar-looking faces from a Large Face List. A 'largeFaceListId' is created by Create Large Face List. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response FindSimilarFromLargeFaceList(RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("FaceClient.FindSimilarFromLargeFaceList"); + scope.Start(); + try + { + using HttpMessage message = CreateFindSimilarFromLargeFaceListRequest(content, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// 1-to-many identification to find the closest matches of the specific query person face from a Large Person Group. + /// Array of query faces faceIds, created by the "Detect". Each of the faces are identified independently. The valid number of faceIds is between [1, 10]. + /// largePersonGroupId of the target Large Person Group, created by "Create Large Person Group". Parameter personGroupId and largePersonGroupId should not be provided at the same time. + /// The range of maxNumOfCandidatesReturned is between 1 and 100. Default value is 10. + /// Customized identification confidence threshold, in the range of [0, 1]. Advanced user can tweak this value to override default internal threshold for better precision on their scenario data. Note there is no guarantee of this threshold value working on other data and after algorithm updates. + /// The cancellation token to use. + /// or is null. + /// Please refer to https://learn.microsoft.com/rest/api/face/face-recognition-operations/identify-from-person-group for more details. + /// + public virtual async Task>> IdentifyFromLargePersonGroupAsync(IEnumerable faceIds, string largePersonGroupId, int? maxNumOfCandidatesReturned = null, float? confidenceThreshold = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(faceIds, nameof(faceIds)); + Argument.AssertNotNull(largePersonGroupId, nameof(largePersonGroupId)); + + IdentifyFromLargePersonGroupRequest identifyFromLargePersonGroupRequest = new IdentifyFromLargePersonGroupRequest(faceIds.ToList(), largePersonGroupId, maxNumOfCandidatesReturned, confidenceThreshold, null); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await IdentifyFromLargePersonGroupAsync(identifyFromLargePersonGroupRequest.ToRequestContent(), context).ConfigureAwait(false); + IReadOnlyList value = default; + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + List array = new List(); + foreach (var item in document.RootElement.EnumerateArray()) + { + array.Add(FaceIdentificationResult.DeserializeFaceIdentificationResult(item)); + } + value = array; + return Response.FromValue(value, response); + } + + /// 1-to-many identification to find the closest matches of the specific query person face from a Large Person Group. + /// Array of query faces faceIds, created by the "Detect". Each of the faces are identified independently. The valid number of faceIds is between [1, 10]. + /// largePersonGroupId of the target Large Person Group, created by "Create Large Person Group". Parameter personGroupId and largePersonGroupId should not be provided at the same time. + /// The range of maxNumOfCandidatesReturned is between 1 and 100. Default value is 10. + /// Customized identification confidence threshold, in the range of [0, 1]. Advanced user can tweak this value to override default internal threshold for better precision on their scenario data. Note there is no guarantee of this threshold value working on other data and after algorithm updates. + /// The cancellation token to use. + /// or is null. + /// Please refer to https://learn.microsoft.com/rest/api/face/face-recognition-operations/identify-from-person-group for more details. + /// + public virtual Response> IdentifyFromLargePersonGroup(IEnumerable faceIds, string largePersonGroupId, int? maxNumOfCandidatesReturned = null, float? confidenceThreshold = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(faceIds, nameof(faceIds)); + Argument.AssertNotNull(largePersonGroupId, nameof(largePersonGroupId)); + + IdentifyFromLargePersonGroupRequest identifyFromLargePersonGroupRequest = new IdentifyFromLargePersonGroupRequest(faceIds.ToList(), largePersonGroupId, maxNumOfCandidatesReturned, confidenceThreshold, null); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = IdentifyFromLargePersonGroup(identifyFromLargePersonGroupRequest.ToRequestContent(), context); + IReadOnlyList value = default; + using var document = JsonDocument.Parse(response.ContentStream); + List array = new List(); + foreach (var item in document.RootElement.EnumerateArray()) + { + array.Add(FaceIdentificationResult.DeserializeFaceIdentificationResult(item)); + } + value = array; + return Response.FromValue(value, response); + } + + /// + /// [Protocol Method] 1-to-many identification to find the closest matches of the specific query person face from a Large Person Group. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task IdentifyFromLargePersonGroupAsync(RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("FaceClient.IdentifyFromLargePersonGroup"); + scope.Start(); + try + { + using HttpMessage message = CreateIdentifyFromLargePersonGroupRequest(content, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] 1-to-many identification to find the closest matches of the specific query person face from a Large Person Group. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response IdentifyFromLargePersonGroup(RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("FaceClient.IdentifyFromLargePersonGroup"); + scope.Start(); + try + { + using HttpMessage message = CreateIdentifyFromLargePersonGroupRequest(content, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Verify whether a face belongs to a person in a Large Person Group. + /// The faceId of the face, come from "Detect". + /// Using existing largePersonGroupId and personId for fast loading a specified person. largePersonGroupId is created in "Create Large Person Group". + /// Specify a certain person in Large Person Group. + /// The cancellation token to use. + /// is null. + /// Please refer to https://learn.microsoft.com/rest/api/face/face-recognition-operations/verify-from-large-person-group for more details. + /// + public virtual async Task> VerifyFromLargePersonGroupAsync(Guid faceId, string largePersonGroupId, Guid personId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(largePersonGroupId, nameof(largePersonGroupId)); + + VerifyFromLargePersonGroupRequest verifyFromLargePersonGroupRequest = new VerifyFromLargePersonGroupRequest(faceId, largePersonGroupId, personId, null); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await VerifyFromLargePersonGroupAsync(verifyFromLargePersonGroupRequest.ToRequestContent(), context).ConfigureAwait(false); + return Response.FromValue(FaceVerificationResult.FromResponse(response), response); + } + + /// Verify whether a face belongs to a person in a Large Person Group. + /// The faceId of the face, come from "Detect". + /// Using existing largePersonGroupId and personId for fast loading a specified person. largePersonGroupId is created in "Create Large Person Group". + /// Specify a certain person in Large Person Group. + /// The cancellation token to use. + /// is null. + /// Please refer to https://learn.microsoft.com/rest/api/face/face-recognition-operations/verify-from-large-person-group for more details. + /// + public virtual Response VerifyFromLargePersonGroup(Guid faceId, string largePersonGroupId, Guid personId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(largePersonGroupId, nameof(largePersonGroupId)); + + VerifyFromLargePersonGroupRequest verifyFromLargePersonGroupRequest = new VerifyFromLargePersonGroupRequest(faceId, largePersonGroupId, personId, null); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = VerifyFromLargePersonGroup(verifyFromLargePersonGroupRequest.ToRequestContent(), context); + return Response.FromValue(FaceVerificationResult.FromResponse(response), response); + } + + /// + /// [Protocol Method] Verify whether a face belongs to a person in a Large Person Group. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task VerifyFromLargePersonGroupAsync(RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("FaceClient.VerifyFromLargePersonGroup"); + scope.Start(); + try + { + using HttpMessage message = CreateVerifyFromLargePersonGroupRequest(content, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Verify whether a face belongs to a person in a Large Person Group. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response VerifyFromLargePersonGroup(RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("FaceClient.VerifyFromLargePersonGroup"); + scope.Start(); + try + { + using HttpMessage message = CreateVerifyFromLargePersonGroupRequest(content, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + internal HttpMessage CreateDetectFromUrlImplRequest(RequestContent content, string detectionModel, string recognitionModel, bool? returnFaceId, IEnumerable returnFaceAttributes, bool? returnFaceLandmarks, bool? returnRecognitionModel, int? faceIdTimeToLive, RequestContext context) { var message = _pipeline.CreateMessage(context, ResponseClassifier200); @@ -992,6 +1272,57 @@ internal HttpMessage CreateGroupRequest(RequestContent content, RequestContext c return message; } + internal HttpMessage CreateFindSimilarFromLargeFaceListRequest(RequestContent content, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/face/", false); + uri.AppendRaw(_apiVersion, true); + uri.AppendPath("/findsimilars", false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateIdentifyFromLargePersonGroupRequest(RequestContent content, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/face/", false); + uri.AppendRaw(_apiVersion, true); + uri.AppendPath("/identify", false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateVerifyFromLargePersonGroupRequest(RequestContent content, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/face/", false); + uri.AppendRaw(_apiVersion, true); + uri.AppendPath("/verify", false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + private static RequestContext DefaultRequestContext = new RequestContext(); internal static RequestContext FromCancellationToken(CancellationToken cancellationToken = default) { diff --git a/sdk/face/Azure.AI.Vision.Face/src/Generated/FaceIdentificationCandidate.Serialization.cs b/sdk/face/Azure.AI.Vision.Face/src/Generated/FaceIdentificationCandidate.Serialization.cs new file mode 100644 index 000000000000..3d0dcf5633df --- /dev/null +++ b/sdk/face/Azure.AI.Vision.Face/src/Generated/FaceIdentificationCandidate.Serialization.cs @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Vision.Face +{ + public partial class FaceIdentificationCandidate : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FaceIdentificationCandidate)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("personId"u8); + writer.WriteStringValue(PersonId); + writer.WritePropertyName("confidence"u8); + writer.WriteNumberValue(Confidence); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + FaceIdentificationCandidate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FaceIdentificationCandidate)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFaceIdentificationCandidate(document.RootElement, options); + } + + internal static FaceIdentificationCandidate DeserializeFaceIdentificationCandidate(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Guid personId = default; + float confidence = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("personId"u8)) + { + personId = property.Value.GetGuid(); + continue; + } + if (property.NameEquals("confidence"u8)) + { + confidence = property.Value.GetSingle(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new FaceIdentificationCandidate(personId, confidence, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(FaceIdentificationCandidate)} does not support writing '{options.Format}' format."); + } + } + + FaceIdentificationCandidate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeFaceIdentificationCandidate(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FaceIdentificationCandidate)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static FaceIdentificationCandidate FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeFaceIdentificationCandidate(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/face/Azure.AI.Vision.Face/src/Generated/FaceIdentificationCandidate.cs b/sdk/face/Azure.AI.Vision.Face/src/Generated/FaceIdentificationCandidate.cs new file mode 100644 index 000000000000..b4fcaba1400b --- /dev/null +++ b/sdk/face/Azure.AI.Vision.Face/src/Generated/FaceIdentificationCandidate.cs @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Vision.Face +{ + /// Candidate for identify call. + public partial class FaceIdentificationCandidate + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// personId of candidate person. + /// Confidence value of the candidate. The higher confidence, the more similar. Range between [0,1]. + internal FaceIdentificationCandidate(Guid personId, float confidence) + { + PersonId = personId; + Confidence = confidence; + } + + /// Initializes a new instance of . + /// personId of candidate person. + /// Confidence value of the candidate. The higher confidence, the more similar. Range between [0,1]. + /// Keeps track of any properties unknown to the library. + internal FaceIdentificationCandidate(Guid personId, float confidence, IDictionary serializedAdditionalRawData) + { + PersonId = personId; + Confidence = confidence; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal FaceIdentificationCandidate() + { + } + + /// personId of candidate person. + public Guid PersonId { get; } + /// Confidence value of the candidate. The higher confidence, the more similar. Range between [0,1]. + public float Confidence { get; } + } +} diff --git a/sdk/face/Azure.AI.Vision.Face/src/Generated/FaceIdentificationResult.Serialization.cs b/sdk/face/Azure.AI.Vision.Face/src/Generated/FaceIdentificationResult.Serialization.cs new file mode 100644 index 000000000000..edee38653822 --- /dev/null +++ b/sdk/face/Azure.AI.Vision.Face/src/Generated/FaceIdentificationResult.Serialization.cs @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Vision.Face +{ + public partial class FaceIdentificationResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FaceIdentificationResult)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("faceId"u8); + writer.WriteStringValue(FaceId); + writer.WritePropertyName("candidates"u8); + writer.WriteStartArray(); + foreach (var item in Candidates) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + FaceIdentificationResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FaceIdentificationResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFaceIdentificationResult(document.RootElement, options); + } + + internal static FaceIdentificationResult DeserializeFaceIdentificationResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Guid faceId = default; + IReadOnlyList candidates = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("faceId"u8)) + { + faceId = property.Value.GetGuid(); + continue; + } + if (property.NameEquals("candidates"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(FaceIdentificationCandidate.DeserializeFaceIdentificationCandidate(item, options)); + } + candidates = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new FaceIdentificationResult(faceId, candidates, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(FaceIdentificationResult)} does not support writing '{options.Format}' format."); + } + } + + FaceIdentificationResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeFaceIdentificationResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FaceIdentificationResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static FaceIdentificationResult FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeFaceIdentificationResult(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/face/Azure.AI.Vision.Face/src/Generated/FaceIdentificationResult.cs b/sdk/face/Azure.AI.Vision.Face/src/Generated/FaceIdentificationResult.cs new file mode 100644 index 000000000000..1489f5061145 --- /dev/null +++ b/sdk/face/Azure.AI.Vision.Face/src/Generated/FaceIdentificationResult.cs @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.AI.Vision.Face +{ + /// Identify result. + public partial class FaceIdentificationResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// faceId of the query face. + /// Identified person candidates for that face (ranked by confidence). Array size should be no larger than input maxNumOfCandidatesReturned. If no person is identified, will return an empty array. + /// is null. + internal FaceIdentificationResult(Guid faceId, IEnumerable candidates) + { + Argument.AssertNotNull(candidates, nameof(candidates)); + + FaceId = faceId; + Candidates = candidates.ToList(); + } + + /// Initializes a new instance of . + /// faceId of the query face. + /// Identified person candidates for that face (ranked by confidence). Array size should be no larger than input maxNumOfCandidatesReturned. If no person is identified, will return an empty array. + /// Keeps track of any properties unknown to the library. + internal FaceIdentificationResult(Guid faceId, IReadOnlyList candidates, IDictionary serializedAdditionalRawData) + { + FaceId = faceId; + Candidates = candidates; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal FaceIdentificationResult() + { + } + + /// faceId of the query face. + public Guid FaceId { get; } + /// Identified person candidates for that face (ranked by confidence). Array size should be no larger than input maxNumOfCandidatesReturned. If no person is identified, will return an empty array. + public IReadOnlyList Candidates { get; } + } +} diff --git a/sdk/face/Azure.AI.Vision.Face/src/Generated/FaceOperationStatus.cs b/sdk/face/Azure.AI.Vision.Face/src/Generated/FaceOperationStatus.cs new file mode 100644 index 000000000000..67683c753b30 --- /dev/null +++ b/sdk/face/Azure.AI.Vision.Face/src/Generated/FaceOperationStatus.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.AI.Vision.Face +{ + /// The status of long running operation. + public readonly partial struct FaceOperationStatus : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public FaceOperationStatus(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NotStartedValue = "notStarted"; + private const string RunningValue = "running"; + private const string SucceededValue = "succeeded"; + private const string FailedValue = "failed"; + + /// The operation is not started. + public static FaceOperationStatus NotStarted { get; } = new FaceOperationStatus(NotStartedValue); + /// The operation is still running. + public static FaceOperationStatus Running { get; } = new FaceOperationStatus(RunningValue); + /// The operation is succeeded. + public static FaceOperationStatus Succeeded { get; } = new FaceOperationStatus(SucceededValue); + /// The operation is failed. + public static FaceOperationStatus Failed { get; } = new FaceOperationStatus(FailedValue); + /// Determines if two values are the same. + public static bool operator ==(FaceOperationStatus left, FaceOperationStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(FaceOperationStatus left, FaceOperationStatus right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator FaceOperationStatus(string value) => new FaceOperationStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is FaceOperationStatus other && Equals(other); + /// + public bool Equals(FaceOperationStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/face/Azure.AI.Vision.Face/src/Generated/FaceSessionClient.cs b/sdk/face/Azure.AI.Vision.Face/src/Generated/FaceSessionClient.cs index 4019a5bc3493..f3f4c70329ee 100644 --- a/sdk/face/Azure.AI.Vision.Face/src/Generated/FaceSessionClient.cs +++ b/sdk/face/Azure.AI.Vision.Face/src/Generated/FaceSessionClient.cs @@ -106,18 +106,7 @@ public FaceSessionClient(Uri endpoint, TokenCredential credential, AzureAIVision /// Body parameter. /// The cancellation token to use. /// is null. - /// - /// A session is best for client device scenarios where developers want to authorize a client device to perform only a liveness detection without granting full access to their resource. Created sessions have a limited life span and only authorize clients to perform the desired action before access is expired. - /// - /// Permissions includes... - /// > - /// * - /// * Ability to call /detectLiveness/singleModal for up to 3 retries. - /// * A token lifetime of 10 minutes. - /// - /// > [!NOTE] - /// > Client access can be revoked by deleting the session using the Delete Liveness Session operation. To retrieve a result, use the Get Liveness Session. To audit the individual requests that a client has made to your resource, use the List Liveness Session Audit Entries. - /// + /// Please refer to https://learn.microsoft.com/rest/api/face/liveness-session-operations/create-liveness-session for more details. /// public virtual async Task> CreateLivenessSessionAsync(CreateLivenessSessionContent body, CancellationToken cancellationToken = default) { @@ -133,18 +122,7 @@ public virtual async Task> CreateLivenessS /// Body parameter. /// The cancellation token to use. /// is null. - /// - /// A session is best for client device scenarios where developers want to authorize a client device to perform only a liveness detection without granting full access to their resource. Created sessions have a limited life span and only authorize clients to perform the desired action before access is expired. - /// - /// Permissions includes... - /// > - /// * - /// * Ability to call /detectLiveness/singleModal for up to 3 retries. - /// * A token lifetime of 10 minutes. - /// - /// > [!NOTE] - /// > Client access can be revoked by deleting the session using the Delete Liveness Session operation. To retrieve a result, use the Get Liveness Session. To audit the individual requests that a client has made to your resource, use the List Liveness Session Audit Entries. - /// + /// Please refer to https://learn.microsoft.com/rest/api/face/liveness-session-operations/create-liveness-session for more details. /// public virtual Response CreateLivenessSession(CreateLivenessSessionContent body, CancellationToken cancellationToken = default) { @@ -306,7 +284,7 @@ public virtual Response DeleteLivenessSession(string sessionId, RequestContext c } } - /// Get session result of detectLiveness/singleModal call. + /// Please refer to https://learn.microsoft.com/rest/api/face/liveness-session-operations/get-liveness-session-result for more details. /// The unique ID to reference this session. /// The cancellation token to use. /// is null. @@ -321,7 +299,7 @@ public virtual async Task> GetLivenessSessionResultAsy return Response.FromValue(LivenessSession.FromResponse(response), response); } - /// Get session result of detectLiveness/singleModal call. + /// Please refer to https://learn.microsoft.com/rest/api/face/liveness-session-operations/get-liveness-session-result for more details. /// The unique ID to reference this session. /// The cancellation token to use. /// is null. @@ -337,7 +315,7 @@ public virtual Response GetLivenessSessionResult(string session } /// - /// [Protocol Method] Get session result of detectLiveness/singleModal call. + /// [Protocol Method] Please refer to https://learn.microsoft.com/rest/api/face/liveness-session-operations/get-liveness-session-result for more details. /// /// /// @@ -377,7 +355,7 @@ public virtual async Task GetLivenessSessionResultAsync(string session } /// - /// [Protocol Method] Get session result of detectLiveness/singleModal call. + /// [Protocol Method] Please refer to https://learn.microsoft.com/rest/api/face/liveness-session-operations/get-liveness-session-result for more details. /// /// /// @@ -420,11 +398,7 @@ public virtual Response GetLivenessSessionResult(string sessionId, RequestContex /// List resources greater than the "start". It contains no more than 64 characters. Default is empty. /// The number of items to list, ranging in [1, 1000]. Default is 1000. /// The cancellation token to use. - /// - /// List sessions from the last sessionId greater than the 'start'. - /// - /// The result should be ordered by sessionId in ascending order. - /// + /// Please refer to https://learn.microsoft.com/rest/api/face/liveness-session-operations/get-liveness-sessions for more details. /// public virtual async Task>> GetLivenessSessionsAsync(string start = null, int? top = null, CancellationToken cancellationToken = default) { @@ -445,11 +419,7 @@ public virtual async Task>> GetLiven /// List resources greater than the "start". It contains no more than 64 characters. Default is empty. /// The number of items to list, ranging in [1, 1000]. Default is 1000. /// The cancellation token to use. - /// - /// List sessions from the last sessionId greater than the 'start'. - /// - /// The result should be ordered by sessionId in ascending order. - /// + /// Please refer to https://learn.microsoft.com/rest/api/face/liveness-session-operations/get-liveness-sessions for more details. /// public virtual Response> GetLivenessSessions(string start = null, int? top = null, CancellationToken cancellationToken = default) { @@ -540,7 +510,7 @@ public virtual Response GetLivenessSessions(string start, int? top, RequestConte } } - /// Gets session requests and response body for the session. + /// Please refer to https://learn.microsoft.com/rest/api/face/liveness-session-operations/get-liveness-session-audit-entries for more details. /// The unique ID to reference this session. /// List resources greater than the "start". It contains no more than 64 characters. Default is empty. /// The number of items to list, ranging in [1, 1000]. Default is 1000. @@ -565,7 +535,7 @@ public virtual async Task>> Ge return Response.FromValue(value, response); } - /// Gets session requests and response body for the session. + /// Please refer to https://learn.microsoft.com/rest/api/face/liveness-session-operations/get-liveness-session-audit-entries for more details. /// The unique ID to reference this session. /// List resources greater than the "start". It contains no more than 64 characters. Default is empty. /// The number of items to list, ranging in [1, 1000]. Default is 1000. @@ -591,7 +561,7 @@ public virtual Response> GetLivenessSes } /// - /// [Protocol Method] Gets session requests and response body for the session. + /// [Protocol Method] Please refer to https://learn.microsoft.com/rest/api/face/liveness-session-operations/get-liveness-session-audit-entries for more details. /// /// /// @@ -633,7 +603,7 @@ public virtual async Task GetLivenessSessionAuditEntriesAsync(string s } /// - /// [Protocol Method] Gets session requests and response body for the session. + /// [Protocol Method] Please refer to https://learn.microsoft.com/rest/api/face/liveness-session-operations/get-liveness-session-audit-entries for more details. /// /// /// @@ -678,27 +648,8 @@ public virtual Response GetLivenessSessionAuditEntries(string sessionId, string /// Body parameter. /// The cancellation token to use. /// is null. - /// - /// A session is best for client device scenarios where developers want to authorize a client device to perform only a liveness detection without granting full access to their resource. Created sessions have a limited life span and only authorize clients to perform the desired action before access is expired. - /// - /// Permissions includes... - /// > - /// * - /// * Ability to call /detectLivenessWithVerify/singleModal for up to 3 retries. - /// * A token lifetime of 10 minutes. - /// - /// > [!NOTE] - /// > - /// > * - /// > * Client access can be revoked by deleting the session using the Delete Liveness With Verify Session operation. - /// > * To retrieve a result, use the Get Liveness With Verify Session. - /// > * To audit the individual requests that a client has made to your resource, use the List Liveness With Verify Session Audit Entries. - /// - /// Alternative Option: Client device submits VerifyImage during the /detectLivenessWithVerify/singleModal call. - /// > [!NOTE] - /// > Extra measures should be taken to validate that the client is sending the expected VerifyImage. - /// - internal virtual async Task> CreateLivenessWithVerifySessionAsync(CreateLivenessSessionContent body, CancellationToken cancellationToken = default) + /// Please refer to https://learn.microsoft.com/rest/api/face/liveness-session-operations/create-liveness-with-verify-session for more details. + internal virtual async Task> CreateLivenessWithVerifySessionAsync(CreateLivenessWithVerifySessionContent body, CancellationToken cancellationToken = default) { Argument.AssertNotNull(body, nameof(body)); @@ -712,27 +663,8 @@ internal virtual async Task> Cre /// Body parameter. /// The cancellation token to use. /// is null. - /// - /// A session is best for client device scenarios where developers want to authorize a client device to perform only a liveness detection without granting full access to their resource. Created sessions have a limited life span and only authorize clients to perform the desired action before access is expired. - /// - /// Permissions includes... - /// > - /// * - /// * Ability to call /detectLivenessWithVerify/singleModal for up to 3 retries. - /// * A token lifetime of 10 minutes. - /// - /// > [!NOTE] - /// > - /// > * - /// > * Client access can be revoked by deleting the session using the Delete Liveness With Verify Session operation. - /// > * To retrieve a result, use the Get Liveness With Verify Session. - /// > * To audit the individual requests that a client has made to your resource, use the List Liveness With Verify Session Audit Entries. - /// - /// Alternative Option: Client device submits VerifyImage during the /detectLivenessWithVerify/singleModal call. - /// > [!NOTE] - /// > Extra measures should be taken to validate that the client is sending the expected VerifyImage. - /// - internal virtual Response CreateLivenessWithVerifySession(CreateLivenessSessionContent body, CancellationToken cancellationToken = default) + /// Please refer to https://learn.microsoft.com/rest/api/face/liveness-session-operations/create-liveness-with-verify-session for more details. + internal virtual Response CreateLivenessWithVerifySession(CreateLivenessWithVerifySessionContent body, CancellationToken cancellationToken = default) { Argument.AssertNotNull(body, nameof(body)); @@ -752,7 +684,7 @@ internal virtual Response CreateLivenessW /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// @@ -790,7 +722,7 @@ internal virtual async Task CreateLivenessWithVerifySessionAsync(Reque /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// @@ -822,25 +754,8 @@ internal virtual Response CreateLivenessWithVerifySession(RequestContent content /// Request content of liveness with verify session creation. /// The cancellation token to use. /// is null. - /// - /// A session is best for client device scenarios where developers want to authorize a client device to perform only a liveness detection without granting full access to their resource. Created sessions have a limited life span and only authorize clients to perform the desired action before access is expired. - /// - /// Permissions includes... - /// > - /// * - /// * Ability to call /detectLivenessWithVerify/singleModal for up to 3 retries. - /// * A token lifetime of 10 minutes. - /// - /// > [!NOTE] - /// > - /// > * - /// > * Client access can be revoked by deleting the session using the Delete Liveness With Verify Session operation. - /// > * To retrieve a result, use the Get Liveness With Verify Session. - /// > * To audit the individual requests that a client has made to your resource, use the List Liveness With Verify Session Audit Entries. - /// - /// Recommended Option: VerifyImage is provided during session creation. - /// - internal virtual async Task> CreateLivenessWithVerifySessionWithVerifyImageAsync(CreateLivenessWithVerifySessionContent body, CancellationToken cancellationToken = default) + /// Please refer to https://learn.microsoft.com/rest/api/face/liveness-session-operations/create-liveness-with-verify-session-with-verify-image for more details. + internal virtual async Task> CreateLivenessWithVerifySessionWithVerifyImageAsync(CreateLivenessWithVerifySessionMultipartContent body, CancellationToken cancellationToken = default) { Argument.AssertNotNull(body, nameof(body)); @@ -854,25 +769,8 @@ internal virtual async Task> Cre /// Request content of liveness with verify session creation. /// The cancellation token to use. /// is null. - /// - /// A session is best for client device scenarios where developers want to authorize a client device to perform only a liveness detection without granting full access to their resource. Created sessions have a limited life span and only authorize clients to perform the desired action before access is expired. - /// - /// Permissions includes... - /// > - /// * - /// * Ability to call /detectLivenessWithVerify/singleModal for up to 3 retries. - /// * A token lifetime of 10 minutes. - /// - /// > [!NOTE] - /// > - /// > * - /// > * Client access can be revoked by deleting the session using the Delete Liveness With Verify Session operation. - /// > * To retrieve a result, use the Get Liveness With Verify Session. - /// > * To audit the individual requests that a client has made to your resource, use the List Liveness With Verify Session Audit Entries. - /// - /// Recommended Option: VerifyImage is provided during session creation. - /// - internal virtual Response CreateLivenessWithVerifySessionWithVerifyImage(CreateLivenessWithVerifySessionContent body, CancellationToken cancellationToken = default) + /// Please refer to https://learn.microsoft.com/rest/api/face/liveness-session-operations/create-liveness-with-verify-session-with-verify-image for more details. + internal virtual Response CreateLivenessWithVerifySessionWithVerifyImage(CreateLivenessWithVerifySessionMultipartContent body, CancellationToken cancellationToken = default) { Argument.AssertNotNull(body, nameof(body)); @@ -892,7 +790,7 @@ internal virtual Response CreateLivenessW /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// @@ -931,7 +829,7 @@ internal virtual async Task CreateLivenessWithVerifySessionWithVerifyI /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// @@ -1032,7 +930,7 @@ public virtual Response DeleteLivenessWithVerifySession(string sessionId, Reques } } - /// Get session result of detectLivenessWithVerify/singleModal call. + /// Please refer to https://learn.microsoft.com/rest/api/face/liveness-session-operations/get-liveness-with-verify-session-result for more details. /// The unique ID to reference this session. /// The cancellation token to use. /// is null. @@ -1047,7 +945,7 @@ public virtual async Task> GetLivenessWithVe return Response.FromValue(LivenessWithVerifySession.FromResponse(response), response); } - /// Get session result of detectLivenessWithVerify/singleModal call. + /// Please refer to https://learn.microsoft.com/rest/api/face/liveness-session-operations/get-liveness-with-verify-session-result for more details. /// The unique ID to reference this session. /// The cancellation token to use. /// is null. @@ -1063,7 +961,7 @@ public virtual Response GetLivenessWithVerifySessionR } /// - /// [Protocol Method] Get session result of detectLivenessWithVerify/singleModal call. + /// [Protocol Method] Please refer to https://learn.microsoft.com/rest/api/face/liveness-session-operations/get-liveness-with-verify-session-result for more details. /// /// /// @@ -1103,7 +1001,7 @@ public virtual async Task GetLivenessWithVerifySessionResultAsync(stri } /// - /// [Protocol Method] Get session result of detectLivenessWithVerify/singleModal call. + /// [Protocol Method] Please refer to https://learn.microsoft.com/rest/api/face/liveness-session-operations/get-liveness-with-verify-session-result for more details. /// /// /// @@ -1146,11 +1044,7 @@ public virtual Response GetLivenessWithVerifySessionResult(string sessionId, Req /// List resources greater than the "start". It contains no more than 64 characters. Default is empty. /// The number of items to list, ranging in [1, 1000]. Default is 1000. /// The cancellation token to use. - /// - /// List sessions from the last sessionId greater than the "start". - /// - /// The result should be ordered by sessionId in ascending order. - /// + /// Please refer to https://learn.microsoft.com/rest/api/face/liveness-session-operations/get-liveness-with-verify-sessions for more details. /// public virtual async Task>> GetLivenessWithVerifySessionsAsync(string start = null, int? top = null, CancellationToken cancellationToken = default) { @@ -1171,11 +1065,7 @@ public virtual async Task>> GetLiven /// List resources greater than the "start". It contains no more than 64 characters. Default is empty. /// The number of items to list, ranging in [1, 1000]. Default is 1000. /// The cancellation token to use. - /// - /// List sessions from the last sessionId greater than the "start". - /// - /// The result should be ordered by sessionId in ascending order. - /// + /// Please refer to https://learn.microsoft.com/rest/api/face/liveness-session-operations/get-liveness-with-verify-sessions for more details. /// public virtual Response> GetLivenessWithVerifySessions(string start = null, int? top = null, CancellationToken cancellationToken = default) { @@ -1266,7 +1156,7 @@ public virtual Response GetLivenessWithVerifySessions(string start, int? top, Re } } - /// Gets session requests and response body for the session. + /// Please refer to https://learn.microsoft.com/rest/api/face/liveness-session-operations/get-liveness-with-verify-session-audit-entries for more details. /// The unique ID to reference this session. /// List resources greater than the "start". It contains no more than 64 characters. Default is empty. /// The number of items to list, ranging in [1, 1000]. Default is 1000. @@ -1291,7 +1181,7 @@ public virtual async Task>> Ge return Response.FromValue(value, response); } - /// Gets session requests and response body for the session. + /// Please refer to https://learn.microsoft.com/rest/api/face/liveness-session-operations/get-liveness-with-verify-session-audit-entries for more details. /// The unique ID to reference this session. /// List resources greater than the "start". It contains no more than 64 characters. Default is empty. /// The number of items to list, ranging in [1, 1000]. Default is 1000. @@ -1317,7 +1207,7 @@ public virtual Response> GetLivenessWit } /// - /// [Protocol Method] Gets session requests and response body for the session. + /// [Protocol Method] Please refer to https://learn.microsoft.com/rest/api/face/liveness-session-operations/get-liveness-with-verify-session-audit-entries for more details. /// /// /// @@ -1359,7 +1249,7 @@ public virtual async Task GetLivenessWithVerifySessionAuditEntriesAsyn } /// - /// [Protocol Method] Gets session requests and response body for the session. + /// [Protocol Method] Please refer to https://learn.microsoft.com/rest/api/face/liveness-session-operations/get-liveness-with-verify-session-audit-entries for more details. /// /// /// @@ -1400,6 +1290,270 @@ public virtual Response GetLivenessWithVerifySessionAuditEntries(string sessionI } } + /// Detect human faces in an image, return face rectangles, and optionally with faceIds, landmarks, and attributes. + /// Id of session image. + /// The 'detectionModel' associated with the detected faceIds. Supported 'detectionModel' values include 'detection_01', 'detection_02' and 'detection_03'. The default value is 'detection_01'. 'detection_03' is recommended since its accuracy is improved on smaller faces (64x64 pixels) and rotated face orientations. + /// The 'recognitionModel' associated with the detected faceIds. Supported 'recognitionModel' values include 'recognition_01', 'recognition_02', 'recognition_03' or 'recognition_04'. The default value is 'recognition_01'. 'recognition_04' is recommended since its accuracy is improved on faces wearing masks compared with 'recognition_03', and its overall accuracy is improved compared with 'recognition_01' and 'recognition_02'. + /// Return faceIds of the detected faces or not. The default value is true. + /// Analyze and return the one or more specified face attributes in the comma-separated string like 'returnFaceAttributes=headPose,glasses'. Face attribute analysis has additional computational and time cost. + /// Return face landmarks of the detected faces or not. The default value is false. + /// Return 'recognitionModel' or not. The default value is false. This is only applicable when returnFaceId = true. + /// The number of seconds for the face ID being cached. Supported range from 60 seconds up to 86400 seconds. The default value is 86400 (24 hours). + /// The cancellation token to use. + /// is null. + /// Please refer to https://learn.microsoft.com/rest/api/face/face-detection-operations/detect-from-session-image-id for more details. + /// + public virtual async Task>> DetectFromSessionImageAsync(string sessionImageId, FaceDetectionModel? detectionModel = null, FaceRecognitionModel? recognitionModel = null, bool? returnFaceId = null, IEnumerable returnFaceAttributes = null, bool? returnFaceLandmarks = null, bool? returnRecognitionModel = null, int? faceIdTimeToLive = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(sessionImageId, nameof(sessionImageId)); + + DetectFromSessionImageRequest detectFromSessionImageRequest = new DetectFromSessionImageRequest(sessionImageId, null); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await DetectFromSessionImageAsync(detectFromSessionImageRequest.ToRequestContent(), detectionModel?.ToString(), recognitionModel?.ToString(), returnFaceId, returnFaceAttributes, returnFaceLandmarks, returnRecognitionModel, faceIdTimeToLive, context).ConfigureAwait(false); + IReadOnlyList value = default; + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + List array = new List(); + foreach (var item in document.RootElement.EnumerateArray()) + { + array.Add(FaceDetectionResult.DeserializeFaceDetectionResult(item)); + } + value = array; + return Response.FromValue(value, response); + } + + /// Detect human faces in an image, return face rectangles, and optionally with faceIds, landmarks, and attributes. + /// Id of session image. + /// The 'detectionModel' associated with the detected faceIds. Supported 'detectionModel' values include 'detection_01', 'detection_02' and 'detection_03'. The default value is 'detection_01'. 'detection_03' is recommended since its accuracy is improved on smaller faces (64x64 pixels) and rotated face orientations. + /// The 'recognitionModel' associated with the detected faceIds. Supported 'recognitionModel' values include 'recognition_01', 'recognition_02', 'recognition_03' or 'recognition_04'. The default value is 'recognition_01'. 'recognition_04' is recommended since its accuracy is improved on faces wearing masks compared with 'recognition_03', and its overall accuracy is improved compared with 'recognition_01' and 'recognition_02'. + /// Return faceIds of the detected faces or not. The default value is true. + /// Analyze and return the one or more specified face attributes in the comma-separated string like 'returnFaceAttributes=headPose,glasses'. Face attribute analysis has additional computational and time cost. + /// Return face landmarks of the detected faces or not. The default value is false. + /// Return 'recognitionModel' or not. The default value is false. This is only applicable when returnFaceId = true. + /// The number of seconds for the face ID being cached. Supported range from 60 seconds up to 86400 seconds. The default value is 86400 (24 hours). + /// The cancellation token to use. + /// is null. + /// Please refer to https://learn.microsoft.com/rest/api/face/face-detection-operations/detect-from-session-image-id for more details. + /// + public virtual Response> DetectFromSessionImage(string sessionImageId, FaceDetectionModel? detectionModel = null, FaceRecognitionModel? recognitionModel = null, bool? returnFaceId = null, IEnumerable returnFaceAttributes = null, bool? returnFaceLandmarks = null, bool? returnRecognitionModel = null, int? faceIdTimeToLive = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(sessionImageId, nameof(sessionImageId)); + + DetectFromSessionImageRequest detectFromSessionImageRequest = new DetectFromSessionImageRequest(sessionImageId, null); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = DetectFromSessionImage(detectFromSessionImageRequest.ToRequestContent(), detectionModel?.ToString(), recognitionModel?.ToString(), returnFaceId, returnFaceAttributes, returnFaceLandmarks, returnRecognitionModel, faceIdTimeToLive, context); + IReadOnlyList value = default; + using var document = JsonDocument.Parse(response.ContentStream); + List array = new List(); + foreach (var item in document.RootElement.EnumerateArray()) + { + array.Add(FaceDetectionResult.DeserializeFaceDetectionResult(item)); + } + value = array; + return Response.FromValue(value, response); + } + + /// + /// [Protocol Method] Detect human faces in an image, return face rectangles, and optionally with faceIds, landmarks, and attributes. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The content to send as the body of the request. + /// The 'detectionModel' associated with the detected faceIds. Supported 'detectionModel' values include 'detection_01', 'detection_02' and 'detection_03'. The default value is 'detection_01'. 'detection_03' is recommended since its accuracy is improved on smaller faces (64x64 pixels) and rotated face orientations. Allowed values: "detection_01" | "detection_02" | "detection_03". + /// The 'recognitionModel' associated with the detected faceIds. Supported 'recognitionModel' values include 'recognition_01', 'recognition_02', 'recognition_03' or 'recognition_04'. The default value is 'recognition_01'. 'recognition_04' is recommended since its accuracy is improved on faces wearing masks compared with 'recognition_03', and its overall accuracy is improved compared with 'recognition_01' and 'recognition_02'. Allowed values: "recognition_01" | "recognition_02" | "recognition_03" | "recognition_04". + /// Return faceIds of the detected faces or not. The default value is true. + /// Analyze and return the one or more specified face attributes in the comma-separated string like 'returnFaceAttributes=headPose,glasses'. Face attribute analysis has additional computational and time cost. + /// Return face landmarks of the detected faces or not. The default value is false. + /// Return 'recognitionModel' or not. The default value is false. This is only applicable when returnFaceId = true. + /// The number of seconds for the face ID being cached. Supported range from 60 seconds up to 86400 seconds. The default value is 86400 (24 hours). + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task DetectFromSessionImageAsync(RequestContent content, string detectionModel = null, string recognitionModel = null, bool? returnFaceId = null, IEnumerable returnFaceAttributes = null, bool? returnFaceLandmarks = null, bool? returnRecognitionModel = null, int? faceIdTimeToLive = null, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("FaceSessionClient.DetectFromSessionImage"); + scope.Start(); + try + { + using HttpMessage message = CreateDetectFromSessionImageRequest(content, detectionModel, recognitionModel, returnFaceId, returnFaceAttributes, returnFaceLandmarks, returnRecognitionModel, faceIdTimeToLive, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Detect human faces in an image, return face rectangles, and optionally with faceIds, landmarks, and attributes. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The content to send as the body of the request. + /// The 'detectionModel' associated with the detected faceIds. Supported 'detectionModel' values include 'detection_01', 'detection_02' and 'detection_03'. The default value is 'detection_01'. 'detection_03' is recommended since its accuracy is improved on smaller faces (64x64 pixels) and rotated face orientations. Allowed values: "detection_01" | "detection_02" | "detection_03". + /// The 'recognitionModel' associated with the detected faceIds. Supported 'recognitionModel' values include 'recognition_01', 'recognition_02', 'recognition_03' or 'recognition_04'. The default value is 'recognition_01'. 'recognition_04' is recommended since its accuracy is improved on faces wearing masks compared with 'recognition_03', and its overall accuracy is improved compared with 'recognition_01' and 'recognition_02'. Allowed values: "recognition_01" | "recognition_02" | "recognition_03" | "recognition_04". + /// Return faceIds of the detected faces or not. The default value is true. + /// Analyze and return the one or more specified face attributes in the comma-separated string like 'returnFaceAttributes=headPose,glasses'. Face attribute analysis has additional computational and time cost. + /// Return face landmarks of the detected faces or not. The default value is false. + /// Return 'recognitionModel' or not. The default value is false. This is only applicable when returnFaceId = true. + /// The number of seconds for the face ID being cached. Supported range from 60 seconds up to 86400 seconds. The default value is 86400 (24 hours). + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response DetectFromSessionImage(RequestContent content, string detectionModel = null, string recognitionModel = null, bool? returnFaceId = null, IEnumerable returnFaceAttributes = null, bool? returnFaceLandmarks = null, bool? returnRecognitionModel = null, int? faceIdTimeToLive = null, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("FaceSessionClient.DetectFromSessionImage"); + scope.Start(); + try + { + using HttpMessage message = CreateDetectFromSessionImageRequest(content, detectionModel, recognitionModel, returnFaceId, returnFaceAttributes, returnFaceLandmarks, returnRecognitionModel, faceIdTimeToLive, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Please refer to https://learn.microsoft.com/rest/api/face/liveness-session-operations/get-session-image for more details. + /// The request ID of the image to be retrieved. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetSessionImageAsync(string sessionImageId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(sessionImageId, nameof(sessionImageId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetSessionImageAsync(sessionImageId, context).ConfigureAwait(false); + return Response.FromValue(response.Content, response); + } + + /// Please refer to https://learn.microsoft.com/rest/api/face/liveness-session-operations/get-session-image for more details. + /// The request ID of the image to be retrieved. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Response GetSessionImage(string sessionImageId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(sessionImageId, nameof(sessionImageId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetSessionImage(sessionImageId, context); + return Response.FromValue(response.Content, response); + } + + /// + /// [Protocol Method] Please refer to https://learn.microsoft.com/rest/api/face/liveness-session-operations/get-session-image for more details. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The request ID of the image to be retrieved. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task GetSessionImageAsync(string sessionImageId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(sessionImageId, nameof(sessionImageId)); + + using var scope = ClientDiagnostics.CreateScope("FaceSessionClient.GetSessionImage"); + scope.Start(); + try + { + using HttpMessage message = CreateGetSessionImageRequest(sessionImageId, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Please refer to https://learn.microsoft.com/rest/api/face/liveness-session-operations/get-session-image for more details. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The request ID of the image to be retrieved. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response GetSessionImage(string sessionImageId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(sessionImageId, nameof(sessionImageId)); + + using var scope = ClientDiagnostics.CreateScope("FaceSessionClient.GetSessionImage"); + scope.Start(); + try + { + using HttpMessage message = CreateGetSessionImageRequest(sessionImageId, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + internal HttpMessage CreateCreateLivenessSessionRequest(RequestContent content, RequestContext context) { var message = _pipeline.CreateMessage(context, ResponseClassifier200); @@ -1611,6 +1765,67 @@ internal HttpMessage CreateGetLivenessWithVerifySessionAuditEntriesRequest(strin return message; } + internal HttpMessage CreateDetectFromSessionImageRequest(RequestContent content, string detectionModel, string recognitionModel, bool? returnFaceId, IEnumerable returnFaceAttributes, bool? returnFaceLandmarks, bool? returnRecognitionModel, int? faceIdTimeToLive, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/face/", false); + uri.AppendRaw(_apiVersion, true); + uri.AppendPath("/detect", false); + if (detectionModel != null) + { + uri.AppendQuery("detectionModel", detectionModel, true); + } + if (recognitionModel != null) + { + uri.AppendQuery("recognitionModel", recognitionModel, true); + } + if (returnFaceId != null) + { + uri.AppendQuery("returnFaceId", returnFaceId.Value, true); + } + if (returnFaceAttributes != null && !(returnFaceAttributes is ChangeTrackingList changeTrackingList && changeTrackingList.IsUndefined)) + { + uri.AppendQueryDelimited("returnFaceAttributes", returnFaceAttributes, ",", true); + } + if (returnFaceLandmarks != null) + { + uri.AppendQuery("returnFaceLandmarks", returnFaceLandmarks.Value, true); + } + if (returnRecognitionModel != null) + { + uri.AppendQuery("returnRecognitionModel", returnRecognitionModel.Value, true); + } + if (faceIdTimeToLive != null) + { + uri.AppendQuery("faceIdTimeToLive", faceIdTimeToLive.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateGetSessionImageRequest(string sessionImageId, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/face/", false); + uri.AppendRaw(_apiVersion, true); + uri.AppendPath("/session/sessionImages/", false); + uri.AppendPath(sessionImageId, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/octet-stream"); + return message; + } + private static RequestContext DefaultRequestContext = new RequestContext(); internal static RequestContext FromCancellationToken(CancellationToken cancellationToken = default) { diff --git a/sdk/face/Azure.AI.Vision.Face/src/Generated/FaceTrainingResult.Serialization.cs b/sdk/face/Azure.AI.Vision.Face/src/Generated/FaceTrainingResult.Serialization.cs new file mode 100644 index 000000000000..3baf11bb5f72 --- /dev/null +++ b/sdk/face/Azure.AI.Vision.Face/src/Generated/FaceTrainingResult.Serialization.cs @@ -0,0 +1,176 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Vision.Face +{ + public partial class FaceTrainingResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FaceTrainingResult)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.ToString()); + writer.WritePropertyName("createdDateTime"u8); + writer.WriteStringValue(CreatedDateTime, "O"); + writer.WritePropertyName("lastActionDateTime"u8); + writer.WriteStringValue(LastActionDateTime, "O"); + writer.WritePropertyName("lastSuccessfulTrainingDateTime"u8); + writer.WriteStringValue(LastSuccessfulTrainingDateTime, "O"); + if (Optional.IsDefined(Message)) + { + writer.WritePropertyName("message"u8); + writer.WriteStringValue(Message); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + FaceTrainingResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FaceTrainingResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFaceTrainingResult(document.RootElement, options); + } + + internal static FaceTrainingResult DeserializeFaceTrainingResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + FaceOperationStatus status = default; + DateTimeOffset createdDateTime = default; + DateTimeOffset lastActionDateTime = default; + DateTimeOffset lastSuccessfulTrainingDateTime = default; + string message = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("status"u8)) + { + status = new FaceOperationStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("createdDateTime"u8)) + { + createdDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("lastActionDateTime"u8)) + { + lastActionDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("lastSuccessfulTrainingDateTime"u8)) + { + lastSuccessfulTrainingDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("message"u8)) + { + message = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new FaceTrainingResult( + status, + createdDateTime, + lastActionDateTime, + lastSuccessfulTrainingDateTime, + message, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(FaceTrainingResult)} does not support writing '{options.Format}' format."); + } + } + + FaceTrainingResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeFaceTrainingResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FaceTrainingResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static FaceTrainingResult FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeFaceTrainingResult(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/face/Azure.AI.Vision.Face/src/Generated/FaceTrainingResult.cs b/sdk/face/Azure.AI.Vision.Face/src/Generated/FaceTrainingResult.cs new file mode 100644 index 000000000000..79ac7a85a12b --- /dev/null +++ b/sdk/face/Azure.AI.Vision.Face/src/Generated/FaceTrainingResult.cs @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Vision.Face +{ + /// Training result of a container. + public partial class FaceTrainingResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Training status of the container. + /// A combined UTC date and time string that describes the created time of the person group, large person group or large face list. + /// A combined UTC date and time string that describes the last modify time of the person group, large person group or large face list, could be null value when the group is not successfully trained. + /// A combined UTC date and time string that describes the last successful training time of the person group, large person group or large face list. + internal FaceTrainingResult(FaceOperationStatus status, DateTimeOffset createdDateTime, DateTimeOffset lastActionDateTime, DateTimeOffset lastSuccessfulTrainingDateTime) + { + Status = status; + CreatedDateTime = createdDateTime; + LastActionDateTime = lastActionDateTime; + LastSuccessfulTrainingDateTime = lastSuccessfulTrainingDateTime; + } + + /// Initializes a new instance of . + /// Training status of the container. + /// A combined UTC date and time string that describes the created time of the person group, large person group or large face list. + /// A combined UTC date and time string that describes the last modify time of the person group, large person group or large face list, could be null value when the group is not successfully trained. + /// A combined UTC date and time string that describes the last successful training time of the person group, large person group or large face list. + /// Show failure message when training failed (omitted when training succeed). + /// Keeps track of any properties unknown to the library. + internal FaceTrainingResult(FaceOperationStatus status, DateTimeOffset createdDateTime, DateTimeOffset lastActionDateTime, DateTimeOffset lastSuccessfulTrainingDateTime, string message, IDictionary serializedAdditionalRawData) + { + Status = status; + CreatedDateTime = createdDateTime; + LastActionDateTime = lastActionDateTime; + LastSuccessfulTrainingDateTime = lastSuccessfulTrainingDateTime; + Message = message; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal FaceTrainingResult() + { + } + + /// Training status of the container. + public FaceOperationStatus Status { get; } + /// A combined UTC date and time string that describes the created time of the person group, large person group or large face list. + public DateTimeOffset CreatedDateTime { get; } + /// A combined UTC date and time string that describes the last modify time of the person group, large person group or large face list, could be null value when the group is not successfully trained. + public DateTimeOffset LastActionDateTime { get; } + /// A combined UTC date and time string that describes the last successful training time of the person group, large person group or large face list. + public DateTimeOffset LastSuccessfulTrainingDateTime { get; } + /// Show failure message when training failed (omitted when training succeed). + public string Message { get; } + } +} diff --git a/sdk/face/Azure.AI.Vision.Face/src/Generated/FindSimilarFromLargeFaceListRequest.Serialization.cs b/sdk/face/Azure.AI.Vision.Face/src/Generated/FindSimilarFromLargeFaceListRequest.Serialization.cs new file mode 100644 index 000000000000..dedc938a5798 --- /dev/null +++ b/sdk/face/Azure.AI.Vision.Face/src/Generated/FindSimilarFromLargeFaceListRequest.Serialization.cs @@ -0,0 +1,173 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Vision.Face +{ + internal partial class FindSimilarFromLargeFaceListRequest : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FindSimilarFromLargeFaceListRequest)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("faceId"u8); + writer.WriteStringValue(FaceId); + if (Optional.IsDefined(MaxNumOfCandidatesReturned)) + { + writer.WritePropertyName("maxNumOfCandidatesReturned"u8); + writer.WriteNumberValue(MaxNumOfCandidatesReturned.Value); + } + if (Optional.IsDefined(Mode)) + { + writer.WritePropertyName("mode"u8); + writer.WriteStringValue(Mode.Value.ToString()); + } + writer.WritePropertyName("largeFaceListId"u8); + writer.WriteStringValue(LargeFaceListId); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + FindSimilarFromLargeFaceListRequest IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FindSimilarFromLargeFaceListRequest)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFindSimilarFromLargeFaceListRequest(document.RootElement, options); + } + + internal static FindSimilarFromLargeFaceListRequest DeserializeFindSimilarFromLargeFaceListRequest(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Guid faceId = default; + int? maxNumOfCandidatesReturned = default; + FindSimilarMatchMode? mode = default; + string largeFaceListId = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("faceId"u8)) + { + faceId = property.Value.GetGuid(); + continue; + } + if (property.NameEquals("maxNumOfCandidatesReturned"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + maxNumOfCandidatesReturned = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("mode"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + mode = new FindSimilarMatchMode(property.Value.GetString()); + continue; + } + if (property.NameEquals("largeFaceListId"u8)) + { + largeFaceListId = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new FindSimilarFromLargeFaceListRequest(faceId, maxNumOfCandidatesReturned, mode, largeFaceListId, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(FindSimilarFromLargeFaceListRequest)} does not support writing '{options.Format}' format."); + } + } + + FindSimilarFromLargeFaceListRequest IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeFindSimilarFromLargeFaceListRequest(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FindSimilarFromLargeFaceListRequest)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static FindSimilarFromLargeFaceListRequest FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeFindSimilarFromLargeFaceListRequest(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/face/Azure.AI.Vision.Face/src/Generated/FindSimilarFromLargeFaceListRequest.cs b/sdk/face/Azure.AI.Vision.Face/src/Generated/FindSimilarFromLargeFaceListRequest.cs new file mode 100644 index 000000000000..8603dc4b91cf --- /dev/null +++ b/sdk/face/Azure.AI.Vision.Face/src/Generated/FindSimilarFromLargeFaceListRequest.cs @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Vision.Face +{ + /// The FindSimilarFromLargeFaceListRequest. + internal partial class FindSimilarFromLargeFaceListRequest + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// faceId of the query face. User needs to call "Detect" first to get a valid faceId. Note that this faceId is not persisted and will expire 24 hours after the detection call. + /// An existing user-specified unique candidate Large Face List, created in "Create Large Face List". Large Face List contains a set of persistedFaceIds which are persisted and will never expire. + /// is null. + internal FindSimilarFromLargeFaceListRequest(Guid faceId, string largeFaceListId) + { + Argument.AssertNotNull(largeFaceListId, nameof(largeFaceListId)); + + FaceId = faceId; + LargeFaceListId = largeFaceListId; + } + + /// Initializes a new instance of . + /// faceId of the query face. User needs to call "Detect" first to get a valid faceId. Note that this faceId is not persisted and will expire 24 hours after the detection call. + /// The number of top similar faces returned. The valid range is [1, 1000]. Default value is 20. + /// Similar face searching mode. It can be 'matchPerson' or 'matchFace'. Default value is 'matchPerson'. + /// An existing user-specified unique candidate Large Face List, created in "Create Large Face List". Large Face List contains a set of persistedFaceIds which are persisted and will never expire. + /// Keeps track of any properties unknown to the library. + internal FindSimilarFromLargeFaceListRequest(Guid faceId, int? maxNumOfCandidatesReturned, FindSimilarMatchMode? mode, string largeFaceListId, IDictionary serializedAdditionalRawData) + { + FaceId = faceId; + MaxNumOfCandidatesReturned = maxNumOfCandidatesReturned; + Mode = mode; + LargeFaceListId = largeFaceListId; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal FindSimilarFromLargeFaceListRequest() + { + } + + /// faceId of the query face. User needs to call "Detect" first to get a valid faceId. Note that this faceId is not persisted and will expire 24 hours after the detection call. + public Guid FaceId { get; } + /// The number of top similar faces returned. The valid range is [1, 1000]. Default value is 20. + public int? MaxNumOfCandidatesReturned { get; } + /// Similar face searching mode. It can be 'matchPerson' or 'matchFace'. Default value is 'matchPerson'. + public FindSimilarMatchMode? Mode { get; } + /// An existing user-specified unique candidate Large Face List, created in "Create Large Face List". Large Face List contains a set of persistedFaceIds which are persisted and will never expire. + public string LargeFaceListId { get; } + } +} diff --git a/sdk/face/Azure.AI.Vision.Face/src/Generated/IdentifyFromLargePersonGroupRequest.Serialization.cs b/sdk/face/Azure.AI.Vision.Face/src/Generated/IdentifyFromLargePersonGroupRequest.Serialization.cs new file mode 100644 index 000000000000..44d5b2573408 --- /dev/null +++ b/sdk/face/Azure.AI.Vision.Face/src/Generated/IdentifyFromLargePersonGroupRequest.Serialization.cs @@ -0,0 +1,183 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Vision.Face +{ + internal partial class IdentifyFromLargePersonGroupRequest : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(IdentifyFromLargePersonGroupRequest)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("faceIds"u8); + writer.WriteStartArray(); + foreach (var item in FaceIds) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + writer.WritePropertyName("largePersonGroupId"u8); + writer.WriteStringValue(LargePersonGroupId); + if (Optional.IsDefined(MaxNumOfCandidatesReturned)) + { + writer.WritePropertyName("maxNumOfCandidatesReturned"u8); + writer.WriteNumberValue(MaxNumOfCandidatesReturned.Value); + } + if (Optional.IsDefined(ConfidenceThreshold)) + { + writer.WritePropertyName("confidenceThreshold"u8); + writer.WriteNumberValue(ConfidenceThreshold.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + IdentifyFromLargePersonGroupRequest IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(IdentifyFromLargePersonGroupRequest)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeIdentifyFromLargePersonGroupRequest(document.RootElement, options); + } + + internal static IdentifyFromLargePersonGroupRequest DeserializeIdentifyFromLargePersonGroupRequest(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList faceIds = default; + string largePersonGroupId = default; + int? maxNumOfCandidatesReturned = default; + float? confidenceThreshold = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("faceIds"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetGuid()); + } + faceIds = array; + continue; + } + if (property.NameEquals("largePersonGroupId"u8)) + { + largePersonGroupId = property.Value.GetString(); + continue; + } + if (property.NameEquals("maxNumOfCandidatesReturned"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + maxNumOfCandidatesReturned = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("confidenceThreshold"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + confidenceThreshold = property.Value.GetSingle(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new IdentifyFromLargePersonGroupRequest(faceIds, largePersonGroupId, maxNumOfCandidatesReturned, confidenceThreshold, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(IdentifyFromLargePersonGroupRequest)} does not support writing '{options.Format}' format."); + } + } + + IdentifyFromLargePersonGroupRequest IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeIdentifyFromLargePersonGroupRequest(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(IdentifyFromLargePersonGroupRequest)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static IdentifyFromLargePersonGroupRequest FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeIdentifyFromLargePersonGroupRequest(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/face/Azure.AI.Vision.Face/src/Generated/IdentifyFromLargePersonGroupRequest.cs b/sdk/face/Azure.AI.Vision.Face/src/Generated/IdentifyFromLargePersonGroupRequest.cs new file mode 100644 index 000000000000..f8ae4acdf23c --- /dev/null +++ b/sdk/face/Azure.AI.Vision.Face/src/Generated/IdentifyFromLargePersonGroupRequest.cs @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.AI.Vision.Face +{ + /// The IdentifyFromLargePersonGroupRequest. + internal partial class IdentifyFromLargePersonGroupRequest + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Array of query faces faceIds, created by the "Detect". Each of the faces are identified independently. The valid number of faceIds is between [1, 10]. + /// largePersonGroupId of the target Large Person Group, created by "Create Large Person Group". Parameter personGroupId and largePersonGroupId should not be provided at the same time. + /// or is null. + internal IdentifyFromLargePersonGroupRequest(IEnumerable faceIds, string largePersonGroupId) + { + Argument.AssertNotNull(faceIds, nameof(faceIds)); + Argument.AssertNotNull(largePersonGroupId, nameof(largePersonGroupId)); + + FaceIds = faceIds.ToList(); + LargePersonGroupId = largePersonGroupId; + } + + /// Initializes a new instance of . + /// Array of query faces faceIds, created by the "Detect". Each of the faces are identified independently. The valid number of faceIds is between [1, 10]. + /// largePersonGroupId of the target Large Person Group, created by "Create Large Person Group". Parameter personGroupId and largePersonGroupId should not be provided at the same time. + /// The range of maxNumOfCandidatesReturned is between 1 and 100. Default value is 10. + /// Customized identification confidence threshold, in the range of [0, 1]. Advanced user can tweak this value to override default internal threshold for better precision on their scenario data. Note there is no guarantee of this threshold value working on other data and after algorithm updates. + /// Keeps track of any properties unknown to the library. + internal IdentifyFromLargePersonGroupRequest(IReadOnlyList faceIds, string largePersonGroupId, int? maxNumOfCandidatesReturned, float? confidenceThreshold, IDictionary serializedAdditionalRawData) + { + FaceIds = faceIds; + LargePersonGroupId = largePersonGroupId; + MaxNumOfCandidatesReturned = maxNumOfCandidatesReturned; + ConfidenceThreshold = confidenceThreshold; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal IdentifyFromLargePersonGroupRequest() + { + } + + /// Array of query faces faceIds, created by the "Detect". Each of the faces are identified independently. The valid number of faceIds is between [1, 10]. + public IReadOnlyList FaceIds { get; } + /// largePersonGroupId of the target Large Person Group, created by "Create Large Person Group". Parameter personGroupId and largePersonGroupId should not be provided at the same time. + public string LargePersonGroupId { get; } + /// The range of maxNumOfCandidatesReturned is between 1 and 100. Default value is 10. + public int? MaxNumOfCandidatesReturned { get; } + /// Customized identification confidence threshold, in the range of [0, 1]. Advanced user can tweak this value to override default internal threshold for better precision on their scenario data. Note there is no guarantee of this threshold value working on other data and after algorithm updates. + public float? ConfidenceThreshold { get; } + } +} diff --git a/sdk/face/Azure.AI.Vision.Face/src/Generated/LargeFaceList.Serialization.cs b/sdk/face/Azure.AI.Vision.Face/src/Generated/LargeFaceList.Serialization.cs new file mode 100644 index 000000000000..d52d68e0bc12 --- /dev/null +++ b/sdk/face/Azure.AI.Vision.Face/src/Generated/LargeFaceList.Serialization.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Vision.Face +{ + public partial class LargeFaceList : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(LargeFaceList)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + if (Optional.IsDefined(UserData)) + { + writer.WritePropertyName("userData"u8); + writer.WriteStringValue(UserData); + } + if (Optional.IsDefined(RecognitionModel)) + { + writer.WritePropertyName("recognitionModel"u8); + writer.WriteStringValue(RecognitionModel.Value.ToString()); + } + if (options.Format != "W") + { + writer.WritePropertyName("largeFaceListId"u8); + writer.WriteStringValue(LargeFaceListId); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + LargeFaceList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(LargeFaceList)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeLargeFaceList(document.RootElement, options); + } + + internal static LargeFaceList DeserializeLargeFaceList(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + string userData = default; + FaceRecognitionModel? recognitionModel = default; + string largeFaceListId = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("userData"u8)) + { + userData = property.Value.GetString(); + continue; + } + if (property.NameEquals("recognitionModel"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + recognitionModel = new FaceRecognitionModel(property.Value.GetString()); + continue; + } + if (property.NameEquals("largeFaceListId"u8)) + { + largeFaceListId = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new LargeFaceList(name, userData, recognitionModel, largeFaceListId, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(LargeFaceList)} does not support writing '{options.Format}' format."); + } + } + + LargeFaceList IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeLargeFaceList(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(LargeFaceList)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static LargeFaceList FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeLargeFaceList(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/face/Azure.AI.Vision.Face/src/Generated/LargeFaceList.cs b/sdk/face/Azure.AI.Vision.Face/src/Generated/LargeFaceList.cs new file mode 100644 index 000000000000..586366e51336 --- /dev/null +++ b/sdk/face/Azure.AI.Vision.Face/src/Generated/LargeFaceList.cs @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Vision.Face +{ + /// Large face list is a list of faces, up to 1,000,000 faces. + public partial class LargeFaceList + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// User defined name, maximum length is 128. + /// is null. + internal LargeFaceList(string name) + { + Argument.AssertNotNull(name, nameof(name)); + + Name = name; + } + + /// Initializes a new instance of . + /// User defined name, maximum length is 128. + /// Optional user defined data. Length should not exceed 16K. + /// Name of recognition model. Recognition model is used when the face features are extracted and associated with detected faceIds. + /// Valid character is letter in lower case or digit or '-' or '_', maximum length is 64. + /// Keeps track of any properties unknown to the library. + internal LargeFaceList(string name, string userData, FaceRecognitionModel? recognitionModel, string largeFaceListId, IDictionary serializedAdditionalRawData) + { + Name = name; + UserData = userData; + RecognitionModel = recognitionModel; + LargeFaceListId = largeFaceListId; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal LargeFaceList() + { + } + + /// User defined name, maximum length is 128. + public string Name { get; } + /// Optional user defined data. Length should not exceed 16K. + public string UserData { get; } + /// Name of recognition model. Recognition model is used when the face features are extracted and associated with detected faceIds. + public FaceRecognitionModel? RecognitionModel { get; } + /// Valid character is letter in lower case or digit or '-' or '_', maximum length is 64. + public string LargeFaceListId { get; } + } +} diff --git a/sdk/face/Azure.AI.Vision.Face/src/Generated/LargeFaceListClient.cs b/sdk/face/Azure.AI.Vision.Face/src/Generated/LargeFaceListClient.cs new file mode 100644 index 000000000000..2d63f135f43c --- /dev/null +++ b/sdk/face/Azure.AI.Vision.Face/src/Generated/LargeFaceListClient.cs @@ -0,0 +1,1548 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.AI.Vision.Face +{ + // Data plane generated sub-client. + /// The LargeFaceList sub-client. + public partial class LargeFaceListClient + { + private const string AuthorizationHeader = "Ocp-Apim-Subscription-Key"; + private readonly AzureKeyCredential _keyCredential; + private static readonly string[] AuthorizationScopes = new string[] { "https://cognitiveservices.azure.com/.default" }; + private readonly TokenCredential _tokenCredential; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _largeFaceListId; + private readonly string _apiVersion; + + /// The ClientDiagnostics is used to provide tracing support for the client library. + internal ClientDiagnostics ClientDiagnostics { get; } + + /// The HTTP pipeline for sending and receiving REST requests and responses. + public virtual HttpPipeline Pipeline => _pipeline; + + /// Initializes a new instance of LargeFaceListClient for mocking. + protected LargeFaceListClient() + { + } + + /// Initializes a new instance of LargeFaceListClient. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The key credential to copy. + /// The token credential to copy. + /// + /// Supported Cognitive Services endpoints (protocol and hostname, for example: + /// https://{resource-name}.cognitiveservices.azure.com). + /// + /// Valid character is letter in lower case or digit or '-' or '_', maximum length is 64. + /// API Version. Allowed values: "v1.1-preview.1" | "v1.2-preview.1". + internal LargeFaceListClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, AzureKeyCredential keyCredential, TokenCredential tokenCredential, Uri endpoint, string largeFaceListId, string apiVersion) + { + ClientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + _keyCredential = keyCredential; + _tokenCredential = tokenCredential; + _endpoint = endpoint; + _largeFaceListId = largeFaceListId; + _apiVersion = apiVersion; + } + + /// Create an empty Large Face List with user-specified largeFaceListId, name, an optional userData and recognitionModel. + /// User defined name, maximum length is 128. + /// Optional user defined data. Length should not exceed 16K. + /// The 'recognitionModel' associated with this face list. Supported 'recognitionModel' values include 'recognition_01', 'recognition_02, 'recognition_03', and 'recognition_04'. The default value is 'recognition_01'. 'recognition_04' is recommended since its accuracy is improved on faces wearing masks compared with 'recognition_03', and its overall accuracy is improved compared with 'recognition_01' and 'recognition_02'. + /// The cancellation token to use. + /// is null. + /// Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/create-large-face-list for more details. + /// + public virtual async Task CreateAsync(string name, string userData = null, FaceRecognitionModel? recognitionModel = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(name, nameof(name)); + + CreateRequest1 createRequest1 = new CreateRequest1(name, userData, recognitionModel, null); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await CreateAsync(createRequest1.ToRequestContent(), context).ConfigureAwait(false); + return response; + } + + /// Create an empty Large Face List with user-specified largeFaceListId, name, an optional userData and recognitionModel. + /// User defined name, maximum length is 128. + /// Optional user defined data. Length should not exceed 16K. + /// The 'recognitionModel' associated with this face list. Supported 'recognitionModel' values include 'recognition_01', 'recognition_02, 'recognition_03', and 'recognition_04'. The default value is 'recognition_01'. 'recognition_04' is recommended since its accuracy is improved on faces wearing masks compared with 'recognition_03', and its overall accuracy is improved compared with 'recognition_01' and 'recognition_02'. + /// The cancellation token to use. + /// is null. + /// Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/create-large-face-list for more details. + /// + public virtual Response Create(string name, string userData = null, FaceRecognitionModel? recognitionModel = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(name, nameof(name)); + + CreateRequest1 createRequest1 = new CreateRequest1(name, userData, recognitionModel, null); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = Create(createRequest1.ToRequestContent(), context); + return response; + } + + /// + /// [Protocol Method] Create an empty Large Face List with user-specified largeFaceListId, name, an optional userData and recognitionModel. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task CreateAsync(RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("LargeFaceListClient.Create"); + scope.Start(); + try + { + using HttpMessage message = CreateCreateRequest(content, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Create an empty Large Face List with user-specified largeFaceListId, name, an optional userData and recognitionModel. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response Create(RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("LargeFaceListClient.Create"); + scope.Start(); + try + { + using HttpMessage message = CreateCreateRequest(content, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method + /// + /// [Protocol Method] Delete a face from a Large Face List by specified largeFaceListId and persistedFaceId. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task DeleteAsync(RequestContext context = null) + { + using var scope = ClientDiagnostics.CreateScope("LargeFaceListClient.Delete"); + scope.Start(); + try + { + using HttpMessage message = CreateDeleteRequest(context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method + /// + /// [Protocol Method] Delete a face from a Large Face List by specified largeFaceListId and persistedFaceId. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response Delete(RequestContext context = null) + { + using var scope = ClientDiagnostics.CreateScope("LargeFaceListClient.Delete"); + scope.Start(); + try + { + using HttpMessage message = CreateDeleteRequest(context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/get-large-face-list for more details. + /// Return 'recognitionModel' or not. The default value is false. + /// The cancellation token to use. + /// + public virtual async Task> GetLargeFaceListAsync(bool? returnRecognitionModel = null, CancellationToken cancellationToken = default) + { + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetLargeFaceListAsync(returnRecognitionModel, context).ConfigureAwait(false); + return Response.FromValue(LargeFaceList.FromResponse(response), response); + } + + /// Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/get-large-face-list for more details. + /// Return 'recognitionModel' or not. The default value is false. + /// The cancellation token to use. + /// + public virtual Response GetLargeFaceList(bool? returnRecognitionModel = null, CancellationToken cancellationToken = default) + { + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetLargeFaceList(returnRecognitionModel, context); + return Response.FromValue(LargeFaceList.FromResponse(response), response); + } + + /// + /// [Protocol Method] Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/get-large-face-list for more details. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// Return 'recognitionModel' or not. The default value is false. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task GetLargeFaceListAsync(bool? returnRecognitionModel, RequestContext context) + { + using var scope = ClientDiagnostics.CreateScope("LargeFaceListClient.GetLargeFaceList"); + scope.Start(); + try + { + using HttpMessage message = CreateGetLargeFaceListRequest(returnRecognitionModel, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/get-large-face-list for more details. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// Return 'recognitionModel' or not. The default value is false. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response GetLargeFaceList(bool? returnRecognitionModel, RequestContext context) + { + using var scope = ClientDiagnostics.CreateScope("LargeFaceListClient.GetLargeFaceList"); + scope.Start(); + try + { + using HttpMessage message = CreateGetLargeFaceListRequest(returnRecognitionModel, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/update-large-face-list for more details. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task UpdateAsync(RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("LargeFaceListClient.Update"); + scope.Start(); + try + { + using HttpMessage message = CreateUpdateRequest(content, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/update-large-face-list for more details. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response Update(RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("LargeFaceListClient.Update"); + scope.Start(); + try + { + using HttpMessage message = CreateUpdateRequest(content, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// List Large Face Lists' information of largeFaceListId, name, userData and recognitionModel. + /// List resources greater than the "start". It contains no more than 64 characters. Default is empty. + /// The number of items to list, ranging in [1, 1000]. Default is 1000. + /// Return 'recognitionModel' or not. The default value is false. + /// The cancellation token to use. + /// Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/get-large-face-lists for more details. + /// + public virtual async Task>> GetLargeFaceListsAsync(string start = null, int? top = null, bool? returnRecognitionModel = null, CancellationToken cancellationToken = default) + { + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetLargeFaceListsAsync(start, top, returnRecognitionModel, context).ConfigureAwait(false); + IReadOnlyList value = default; + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + List array = new List(); + foreach (var item in document.RootElement.EnumerateArray()) + { + array.Add(LargeFaceList.DeserializeLargeFaceList(item)); + } + value = array; + return Response.FromValue(value, response); + } + + /// List Large Face Lists' information of largeFaceListId, name, userData and recognitionModel. + /// List resources greater than the "start". It contains no more than 64 characters. Default is empty. + /// The number of items to list, ranging in [1, 1000]. Default is 1000. + /// Return 'recognitionModel' or not. The default value is false. + /// The cancellation token to use. + /// Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/get-large-face-lists for more details. + /// + public virtual Response> GetLargeFaceLists(string start = null, int? top = null, bool? returnRecognitionModel = null, CancellationToken cancellationToken = default) + { + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetLargeFaceLists(start, top, returnRecognitionModel, context); + IReadOnlyList value = default; + using var document = JsonDocument.Parse(response.ContentStream); + List array = new List(); + foreach (var item in document.RootElement.EnumerateArray()) + { + array.Add(LargeFaceList.DeserializeLargeFaceList(item)); + } + value = array; + return Response.FromValue(value, response); + } + + /// + /// [Protocol Method] List Large Face Lists' information of largeFaceListId, name, userData and recognitionModel. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// List resources greater than the "start". It contains no more than 64 characters. Default is empty. + /// The number of items to list, ranging in [1, 1000]. Default is 1000. + /// Return 'recognitionModel' or not. The default value is false. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task GetLargeFaceListsAsync(string start, int? top, bool? returnRecognitionModel, RequestContext context) + { + using var scope = ClientDiagnostics.CreateScope("LargeFaceListClient.GetLargeFaceLists"); + scope.Start(); + try + { + using HttpMessage message = CreateGetLargeFaceListsRequest(start, top, returnRecognitionModel, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] List Large Face Lists' information of largeFaceListId, name, userData and recognitionModel. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// List resources greater than the "start". It contains no more than 64 characters. Default is empty. + /// The number of items to list, ranging in [1, 1000]. Default is 1000. + /// Return 'recognitionModel' or not. The default value is false. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response GetLargeFaceLists(string start, int? top, bool? returnRecognitionModel, RequestContext context) + { + using var scope = ClientDiagnostics.CreateScope("LargeFaceListClient.GetLargeFaceLists"); + scope.Start(); + try + { + using HttpMessage message = CreateGetLargeFaceListsRequest(start, top, returnRecognitionModel, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/get-large-face-list-training-status for more details. + /// The cancellation token to use. + /// + public virtual async Task> GetTrainingStatusAsync(CancellationToken cancellationToken = default) + { + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetTrainingStatusAsync(context).ConfigureAwait(false); + return Response.FromValue(FaceTrainingResult.FromResponse(response), response); + } + + /// Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/get-large-face-list-training-status for more details. + /// The cancellation token to use. + /// + public virtual Response GetTrainingStatus(CancellationToken cancellationToken = default) + { + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetTrainingStatus(context); + return Response.FromValue(FaceTrainingResult.FromResponse(response), response); + } + + /// + /// [Protocol Method] Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/get-large-face-list-training-status for more details. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task GetTrainingStatusAsync(RequestContext context) + { + using var scope = ClientDiagnostics.CreateScope("LargeFaceListClient.GetTrainingStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetTrainingStatusRequest(context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/get-large-face-list-training-status for more details. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response GetTrainingStatus(RequestContext context) + { + using var scope = ClientDiagnostics.CreateScope("LargeFaceListClient.GetTrainingStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetTrainingStatusRequest(context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Add a face to a specified Large Face List, up to 1,000,000 faces. + /// URL of input image. + /// A face rectangle to specify the target face to be added to a person, in the format of 'targetFace=left,top,width,height'. + /// The 'detectionModel' associated with the detected faceIds. Supported 'detectionModel' values include 'detection_01', 'detection_02' and 'detection_03'. The default value is 'detection_01'. + /// User-provided data attached to the face. The size limit is 1K. + /// The cancellation token to use. + /// is null. + /// Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/add-large-face-list-face-from-url for more details. + internal virtual async Task> AddFaceFromUrlImplAsync(Uri uri, IEnumerable targetFace = null, FaceDetectionModel? detectionModel = null, string userData = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(uri, nameof(uri)); + + AddFaceFromUrlRequest1 addFaceFromUrlRequest1 = new AddFaceFromUrlRequest1(uri, null); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await AddFaceFromUrlImplAsync(addFaceFromUrlRequest1.ToRequestContent(), targetFace, detectionModel?.ToString(), userData, context).ConfigureAwait(false); + return Response.FromValue(AddFaceResult.FromResponse(response), response); + } + + /// Add a face to a specified Large Face List, up to 1,000,000 faces. + /// URL of input image. + /// A face rectangle to specify the target face to be added to a person, in the format of 'targetFace=left,top,width,height'. + /// The 'detectionModel' associated with the detected faceIds. Supported 'detectionModel' values include 'detection_01', 'detection_02' and 'detection_03'. The default value is 'detection_01'. + /// User-provided data attached to the face. The size limit is 1K. + /// The cancellation token to use. + /// is null. + /// Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/add-large-face-list-face-from-url for more details. + internal virtual Response AddFaceFromUrlImpl(Uri uri, IEnumerable targetFace = null, FaceDetectionModel? detectionModel = null, string userData = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(uri, nameof(uri)); + + AddFaceFromUrlRequest1 addFaceFromUrlRequest1 = new AddFaceFromUrlRequest1(uri, null); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = AddFaceFromUrlImpl(addFaceFromUrlRequest1.ToRequestContent(), targetFace, detectionModel?.ToString(), userData, context); + return Response.FromValue(AddFaceResult.FromResponse(response), response); + } + + /// + /// [Protocol Method] Add a face to a specified Large Face List, up to 1,000,000 faces. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The content to send as the body of the request. + /// A face rectangle to specify the target face to be added to a person, in the format of 'targetFace=left,top,width,height'. + /// The 'detectionModel' associated with the detected faceIds. Supported 'detectionModel' values include 'detection_01', 'detection_02' and 'detection_03'. The default value is 'detection_01'. Allowed values: "detection_01" | "detection_02" | "detection_03". + /// User-provided data attached to the face. The size limit is 1K. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + internal virtual async Task AddFaceFromUrlImplAsync(RequestContent content, IEnumerable targetFace = null, string detectionModel = null, string userData = null, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("LargeFaceListClient.AddFaceFromUrlImpl"); + scope.Start(); + try + { + using HttpMessage message = CreateAddFaceFromUrlImplRequest(content, targetFace, detectionModel, userData, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Add a face to a specified Large Face List, up to 1,000,000 faces. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The content to send as the body of the request. + /// A face rectangle to specify the target face to be added to a person, in the format of 'targetFace=left,top,width,height'. + /// The 'detectionModel' associated with the detected faceIds. Supported 'detectionModel' values include 'detection_01', 'detection_02' and 'detection_03'. The default value is 'detection_01'. Allowed values: "detection_01" | "detection_02" | "detection_03". + /// User-provided data attached to the face. The size limit is 1K. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + internal virtual Response AddFaceFromUrlImpl(RequestContent content, IEnumerable targetFace = null, string detectionModel = null, string userData = null, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("LargeFaceListClient.AddFaceFromUrlImpl"); + scope.Start(); + try + { + using HttpMessage message = CreateAddFaceFromUrlImplRequest(content, targetFace, detectionModel, userData, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Add a face to a specified Large Face List, up to 1,000,000 faces. + /// The image to be analyzed. + /// A face rectangle to specify the target face to be added to a person, in the format of 'targetFace=left,top,width,height'. + /// The 'detectionModel' associated with the detected faceIds. Supported 'detectionModel' values include 'detection_01', 'detection_02' and 'detection_03'. The default value is 'detection_01'. + /// User-provided data attached to the face. The size limit is 1K. + /// The cancellation token to use. + /// is null. + /// Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/add-large-face-list-face for more details. + internal virtual async Task> AddFaceImplAsync(BinaryData imageContent, IEnumerable targetFace = null, FaceDetectionModel? detectionModel = null, string userData = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(imageContent, nameof(imageContent)); + + using RequestContent content = imageContent; + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await AddFaceImplAsync(content, targetFace, detectionModel?.ToString(), userData, context).ConfigureAwait(false); + return Response.FromValue(AddFaceResult.FromResponse(response), response); + } + + /// Add a face to a specified Large Face List, up to 1,000,000 faces. + /// The image to be analyzed. + /// A face rectangle to specify the target face to be added to a person, in the format of 'targetFace=left,top,width,height'. + /// The 'detectionModel' associated with the detected faceIds. Supported 'detectionModel' values include 'detection_01', 'detection_02' and 'detection_03'. The default value is 'detection_01'. + /// User-provided data attached to the face. The size limit is 1K. + /// The cancellation token to use. + /// is null. + /// Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/add-large-face-list-face for more details. + internal virtual Response AddFaceImpl(BinaryData imageContent, IEnumerable targetFace = null, FaceDetectionModel? detectionModel = null, string userData = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(imageContent, nameof(imageContent)); + + using RequestContent content = imageContent; + RequestContext context = FromCancellationToken(cancellationToken); + Response response = AddFaceImpl(content, targetFace, detectionModel?.ToString(), userData, context); + return Response.FromValue(AddFaceResult.FromResponse(response), response); + } + + /// + /// [Protocol Method] Add a face to a specified Large Face List, up to 1,000,000 faces. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The content to send as the body of the request. + /// A face rectangle to specify the target face to be added to a person, in the format of 'targetFace=left,top,width,height'. + /// The 'detectionModel' associated with the detected faceIds. Supported 'detectionModel' values include 'detection_01', 'detection_02' and 'detection_03'. The default value is 'detection_01'. Allowed values: "detection_01" | "detection_02" | "detection_03". + /// User-provided data attached to the face. The size limit is 1K. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + internal virtual async Task AddFaceImplAsync(RequestContent content, IEnumerable targetFace = null, string detectionModel = null, string userData = null, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("LargeFaceListClient.AddFaceImpl"); + scope.Start(); + try + { + using HttpMessage message = CreateAddFaceImplRequest(content, targetFace, detectionModel, userData, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Add a face to a specified Large Face List, up to 1,000,000 faces. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The content to send as the body of the request. + /// A face rectangle to specify the target face to be added to a person, in the format of 'targetFace=left,top,width,height'. + /// The 'detectionModel' associated with the detected faceIds. Supported 'detectionModel' values include 'detection_01', 'detection_02' and 'detection_03'. The default value is 'detection_01'. Allowed values: "detection_01" | "detection_02" | "detection_03". + /// User-provided data attached to the face. The size limit is 1K. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + internal virtual Response AddFaceImpl(RequestContent content, IEnumerable targetFace = null, string detectionModel = null, string userData = null, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("LargeFaceListClient.AddFaceImpl"); + scope.Start(); + try + { + using HttpMessage message = CreateAddFaceImplRequest(content, targetFace, detectionModel, userData, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method + /// + /// [Protocol Method] Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/delete-large-face-list-face for more details. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Face ID of the face. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task DeleteFaceAsync(Guid persistedFaceId, RequestContext context = null) + { + using var scope = ClientDiagnostics.CreateScope("LargeFaceListClient.DeleteFace"); + scope.Start(); + try + { + using HttpMessage message = CreateDeleteFaceRequest(persistedFaceId, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method + /// + /// [Protocol Method] Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/delete-large-face-list-face for more details. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Face ID of the face. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response DeleteFace(Guid persistedFaceId, RequestContext context = null) + { + using var scope = ClientDiagnostics.CreateScope("LargeFaceListClient.DeleteFace"); + scope.Start(); + try + { + using HttpMessage message = CreateDeleteFaceRequest(persistedFaceId, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/get-large-face-list-face for more details. + /// Face ID of the face. + /// The cancellation token to use. + /// + public virtual async Task> GetFaceAsync(Guid persistedFaceId, CancellationToken cancellationToken = default) + { + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetFaceAsync(persistedFaceId, context).ConfigureAwait(false); + return Response.FromValue(LargeFaceListFace.FromResponse(response), response); + } + + /// Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/get-large-face-list-face for more details. + /// Face ID of the face. + /// The cancellation token to use. + /// + public virtual Response GetFace(Guid persistedFaceId, CancellationToken cancellationToken = default) + { + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetFace(persistedFaceId, context); + return Response.FromValue(LargeFaceListFace.FromResponse(response), response); + } + + /// + /// [Protocol Method] Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/get-large-face-list-face for more details. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// Face ID of the face. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task GetFaceAsync(Guid persistedFaceId, RequestContext context) + { + using var scope = ClientDiagnostics.CreateScope("LargeFaceListClient.GetFace"); + scope.Start(); + try + { + using HttpMessage message = CreateGetFaceRequest(persistedFaceId, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/get-large-face-list-face for more details. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// Face ID of the face. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response GetFace(Guid persistedFaceId, RequestContext context) + { + using var scope = ClientDiagnostics.CreateScope("LargeFaceListClient.GetFace"); + scope.Start(); + try + { + using HttpMessage message = CreateGetFaceRequest(persistedFaceId, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/update-large-face-list-face for more details. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Face ID of the face. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task UpdateFaceAsync(Guid persistedFaceId, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("LargeFaceListClient.UpdateFace"); + scope.Start(); + try + { + using HttpMessage message = CreateUpdateFaceRequest(persistedFaceId, content, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/update-large-face-list-face for more details. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Face ID of the face. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response UpdateFace(Guid persistedFaceId, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("LargeFaceListClient.UpdateFace"); + scope.Start(); + try + { + using HttpMessage message = CreateUpdateFaceRequest(persistedFaceId, content, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// List faces' persistedFaceId and userData in a specified Large Face List. + /// List resources greater than the "start". It contains no more than 64 characters. Default is empty. + /// The number of items to list, ranging in [1, 1000]. Default is 1000. + /// The cancellation token to use. + /// Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/get-large-face-list-faces for more details. + /// + public virtual async Task>> GetFacesAsync(string start = null, int? top = null, CancellationToken cancellationToken = default) + { + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetFacesAsync(start, top, context).ConfigureAwait(false); + IReadOnlyList value = default; + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + List array = new List(); + foreach (var item in document.RootElement.EnumerateArray()) + { + array.Add(LargeFaceListFace.DeserializeLargeFaceListFace(item)); + } + value = array; + return Response.FromValue(value, response); + } + + /// List faces' persistedFaceId and userData in a specified Large Face List. + /// List resources greater than the "start". It contains no more than 64 characters. Default is empty. + /// The number of items to list, ranging in [1, 1000]. Default is 1000. + /// The cancellation token to use. + /// Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/get-large-face-list-faces for more details. + /// + public virtual Response> GetFaces(string start = null, int? top = null, CancellationToken cancellationToken = default) + { + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetFaces(start, top, context); + IReadOnlyList value = default; + using var document = JsonDocument.Parse(response.ContentStream); + List array = new List(); + foreach (var item in document.RootElement.EnumerateArray()) + { + array.Add(LargeFaceListFace.DeserializeLargeFaceListFace(item)); + } + value = array; + return Response.FromValue(value, response); + } + + /// + /// [Protocol Method] List faces' persistedFaceId and userData in a specified Large Face List. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// List resources greater than the "start". It contains no more than 64 characters. Default is empty. + /// The number of items to list, ranging in [1, 1000]. Default is 1000. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task GetFacesAsync(string start, int? top, RequestContext context) + { + using var scope = ClientDiagnostics.CreateScope("LargeFaceListClient.GetFaces"); + scope.Start(); + try + { + using HttpMessage message = CreateGetFacesRequest(start, top, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] List faces' persistedFaceId and userData in a specified Large Face List. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// List resources greater than the "start". It contains no more than 64 characters. Default is empty. + /// The number of items to list, ranging in [1, 1000]. Default is 1000. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response GetFaces(string start, int? top, RequestContext context) + { + using var scope = ClientDiagnostics.CreateScope("LargeFaceListClient.GetFaces"); + scope.Start(); + try + { + using HttpMessage message = CreateGetFacesRequest(start, top, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method + /// + /// [Protocol Method] Submit a Large Face List training task. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The representing an asynchronous operation on the service. + /// + public virtual async Task TrainAsync(WaitUntil waitUntil, RequestContext context = null) + { + using var scope = ClientDiagnostics.CreateScope("LargeFaceListClient.Train"); + scope.Start(); + try + { + using HttpMessage message = CreateTrainRequest(context); + return await ProtocolOperationHelpers.ProcessMessageWithoutResponseValueAsync(_pipeline, message, ClientDiagnostics, "LargeFaceListClient.Train", OperationFinalStateVia.OperationLocation, context, waitUntil).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method + /// + /// [Protocol Method] Submit a Large Face List training task. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The representing an asynchronous operation on the service. + /// + public virtual Operation Train(WaitUntil waitUntil, RequestContext context = null) + { + using var scope = ClientDiagnostics.CreateScope("LargeFaceListClient.Train"); + scope.Start(); + try + { + using HttpMessage message = CreateTrainRequest(context); + return ProtocolOperationHelpers.ProcessMessageWithoutResponseValue(_pipeline, message, ClientDiagnostics, "LargeFaceListClient.Train", OperationFinalStateVia.OperationLocation, context, waitUntil); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + internal HttpMessage CreateCreateRequest(RequestContent content, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/face/", false); + uri.AppendRaw(_apiVersion, true); + uri.AppendPath("/largefacelists/", false); + uri.AppendPath(_largeFaceListId, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateDeleteRequest(RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/face/", false); + uri.AppendRaw(_apiVersion, true); + uri.AppendPath("/largefacelists/", false); + uri.AppendPath(_largeFaceListId, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetLargeFaceListRequest(bool? returnRecognitionModel, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/face/", false); + uri.AppendRaw(_apiVersion, true); + uri.AppendPath("/largefacelists/", false); + uri.AppendPath(_largeFaceListId, true); + if (returnRecognitionModel != null) + { + uri.AppendQuery("returnRecognitionModel", returnRecognitionModel.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateUpdateRequest(RequestContent content, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/face/", false); + uri.AppendRaw(_apiVersion, true); + uri.AppendPath("/largefacelists/", false); + uri.AppendPath(_largeFaceListId, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateGetLargeFaceListsRequest(string start, int? top, bool? returnRecognitionModel, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/face/", false); + uri.AppendRaw(_apiVersion, true); + uri.AppendPath("/largefacelists", false); + if (start != null) + { + uri.AppendQuery("start", start, true); + } + if (top != null) + { + uri.AppendQuery("top", top.Value, true); + } + if (returnRecognitionModel != null) + { + uri.AppendQuery("returnRecognitionModel", returnRecognitionModel.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetTrainingStatusRequest(RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/face/", false); + uri.AppendRaw(_apiVersion, true); + uri.AppendPath("/largefacelists/", false); + uri.AppendPath(_largeFaceListId, true); + uri.AppendPath("/training", false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateTrainRequest(RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier202); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/face/", false); + uri.AppendRaw(_apiVersion, true); + uri.AppendPath("/largefacelists/", false); + uri.AppendPath(_largeFaceListId, true); + uri.AppendPath("/train", false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateAddFaceFromUrlImplRequest(RequestContent content, IEnumerable targetFace, string detectionModel, string userData, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/face/", false); + uri.AppendRaw(_apiVersion, true); + uri.AppendPath("/largefacelists/", false); + uri.AppendPath(_largeFaceListId, true); + uri.AppendPath("/persistedfaces", false); + if (targetFace != null && !(targetFace is ChangeTrackingList changeTrackingList && changeTrackingList.IsUndefined)) + { + uri.AppendQueryDelimited("targetFace", targetFace, ",", true); + } + if (detectionModel != null) + { + uri.AppendQuery("detectionModel", detectionModel, true); + } + if (userData != null) + { + uri.AppendQuery("userData", userData, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateAddFaceImplRequest(RequestContent content, IEnumerable targetFace, string detectionModel, string userData, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/face/", false); + uri.AppendRaw(_apiVersion, true); + uri.AppendPath("/largefacelists/", false); + uri.AppendPath(_largeFaceListId, true); + uri.AppendPath("/persistedfaces", false); + if (targetFace != null && !(targetFace is ChangeTrackingList changeTrackingList && changeTrackingList.IsUndefined)) + { + uri.AppendQueryDelimited("targetFace", targetFace, ",", true); + } + if (detectionModel != null) + { + uri.AppendQuery("detectionModel", detectionModel, true); + } + if (userData != null) + { + uri.AppendQuery("userData", userData, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/octet-stream"); + request.Content = content; + return message; + } + + internal HttpMessage CreateDeleteFaceRequest(Guid persistedFaceId, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/face/", false); + uri.AppendRaw(_apiVersion, true); + uri.AppendPath("/largefacelists/", false); + uri.AppendPath(_largeFaceListId, true); + uri.AppendPath("/persistedfaces/", false); + uri.AppendPath(persistedFaceId, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetFaceRequest(Guid persistedFaceId, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/face/", false); + uri.AppendRaw(_apiVersion, true); + uri.AppendPath("/largefacelists/", false); + uri.AppendPath(_largeFaceListId, true); + uri.AppendPath("/persistedfaces/", false); + uri.AppendPath(persistedFaceId, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateUpdateFaceRequest(Guid persistedFaceId, RequestContent content, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/face/", false); + uri.AppendRaw(_apiVersion, true); + uri.AppendPath("/largefacelists/", false); + uri.AppendPath(_largeFaceListId, true); + uri.AppendPath("/persistedfaces/", false); + uri.AppendPath(persistedFaceId, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateGetFacesRequest(string start, int? top, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/face/", false); + uri.AppendRaw(_apiVersion, true); + uri.AppendPath("/largefacelists/", false); + uri.AppendPath(_largeFaceListId, true); + uri.AppendPath("/persistedfaces", false); + if (start != null) + { + uri.AppendQuery("start", start, true); + } + if (top != null) + { + uri.AppendQuery("top", top.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + private static RequestContext DefaultRequestContext = new RequestContext(); + internal static RequestContext FromCancellationToken(CancellationToken cancellationToken = default) + { + if (!cancellationToken.CanBeCanceled) + { + return DefaultRequestContext; + } + + return new RequestContext() { CancellationToken = cancellationToken }; + } + + private static ResponseClassifier _responseClassifier200; + private static ResponseClassifier ResponseClassifier200 => _responseClassifier200 ??= new StatusCodeClassifier(stackalloc ushort[] { 200 }); + private static ResponseClassifier _responseClassifier202; + private static ResponseClassifier ResponseClassifier202 => _responseClassifier202 ??= new StatusCodeClassifier(stackalloc ushort[] { 202 }); + } +} diff --git a/sdk/face/Azure.AI.Vision.Face/src/Generated/LargeFaceListFace.Serialization.cs b/sdk/face/Azure.AI.Vision.Face/src/Generated/LargeFaceListFace.Serialization.cs new file mode 100644 index 000000000000..2f9621a39bbc --- /dev/null +++ b/sdk/face/Azure.AI.Vision.Face/src/Generated/LargeFaceListFace.Serialization.cs @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Vision.Face +{ + public partial class LargeFaceListFace : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(LargeFaceListFace)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (options.Format != "W") + { + writer.WritePropertyName("persistedFaceId"u8); + writer.WriteStringValue(PersistedFaceId); + } + if (Optional.IsDefined(UserData)) + { + writer.WritePropertyName("userData"u8); + writer.WriteStringValue(UserData); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + LargeFaceListFace IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(LargeFaceListFace)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeLargeFaceListFace(document.RootElement, options); + } + + internal static LargeFaceListFace DeserializeLargeFaceListFace(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Guid persistedFaceId = default; + string userData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("persistedFaceId"u8)) + { + persistedFaceId = property.Value.GetGuid(); + continue; + } + if (property.NameEquals("userData"u8)) + { + userData = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new LargeFaceListFace(persistedFaceId, userData, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(LargeFaceListFace)} does not support writing '{options.Format}' format."); + } + } + + LargeFaceListFace IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeLargeFaceListFace(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(LargeFaceListFace)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static LargeFaceListFace FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeLargeFaceListFace(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/face/Azure.AI.Vision.Face/src/Generated/LargeFaceListFace.cs b/sdk/face/Azure.AI.Vision.Face/src/Generated/LargeFaceListFace.cs new file mode 100644 index 000000000000..6a0efa75f2a0 --- /dev/null +++ b/sdk/face/Azure.AI.Vision.Face/src/Generated/LargeFaceListFace.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Vision.Face +{ + /// Face resource for large face list. + public partial class LargeFaceListFace + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal LargeFaceListFace() + { + } + + /// Initializes a new instance of . + /// Face ID of the face. + /// User-provided data attached to the face. The length limit is 1K. + /// Keeps track of any properties unknown to the library. + internal LargeFaceListFace(Guid persistedFaceId, string userData, IDictionary serializedAdditionalRawData) + { + PersistedFaceId = persistedFaceId; + UserData = userData; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Face ID of the face. + public Guid PersistedFaceId { get; } + /// User-provided data attached to the face. The length limit is 1K. + public string UserData { get; } + } +} diff --git a/sdk/face/Azure.AI.Vision.Face/src/Generated/LargePersonGroup.Serialization.cs b/sdk/face/Azure.AI.Vision.Face/src/Generated/LargePersonGroup.Serialization.cs new file mode 100644 index 000000000000..0a39ef9f4066 --- /dev/null +++ b/sdk/face/Azure.AI.Vision.Face/src/Generated/LargePersonGroup.Serialization.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Vision.Face +{ + public partial class LargePersonGroup : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(LargePersonGroup)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + if (Optional.IsDefined(UserData)) + { + writer.WritePropertyName("userData"u8); + writer.WriteStringValue(UserData); + } + if (Optional.IsDefined(RecognitionModel)) + { + writer.WritePropertyName("recognitionModel"u8); + writer.WriteStringValue(RecognitionModel.Value.ToString()); + } + if (options.Format != "W") + { + writer.WritePropertyName("largePersonGroupId"u8); + writer.WriteStringValue(LargePersonGroupId); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + LargePersonGroup IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(LargePersonGroup)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeLargePersonGroup(document.RootElement, options); + } + + internal static LargePersonGroup DeserializeLargePersonGroup(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + string userData = default; + FaceRecognitionModel? recognitionModel = default; + string largePersonGroupId = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("userData"u8)) + { + userData = property.Value.GetString(); + continue; + } + if (property.NameEquals("recognitionModel"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + recognitionModel = new FaceRecognitionModel(property.Value.GetString()); + continue; + } + if (property.NameEquals("largePersonGroupId"u8)) + { + largePersonGroupId = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new LargePersonGroup(name, userData, recognitionModel, largePersonGroupId, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(LargePersonGroup)} does not support writing '{options.Format}' format."); + } + } + + LargePersonGroup IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeLargePersonGroup(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(LargePersonGroup)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static LargePersonGroup FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeLargePersonGroup(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/face/Azure.AI.Vision.Face/src/Generated/LargePersonGroup.cs b/sdk/face/Azure.AI.Vision.Face/src/Generated/LargePersonGroup.cs new file mode 100644 index 000000000000..a38758c190fd --- /dev/null +++ b/sdk/face/Azure.AI.Vision.Face/src/Generated/LargePersonGroup.cs @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Vision.Face +{ + /// The container of the uploaded person data, including face recognition feature, and up to 1,000,000 people. + public partial class LargePersonGroup + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// User defined name, maximum length is 128. + /// is null. + internal LargePersonGroup(string name) + { + Argument.AssertNotNull(name, nameof(name)); + + Name = name; + } + + /// Initializes a new instance of . + /// User defined name, maximum length is 128. + /// Optional user defined data. Length should not exceed 16K. + /// Name of recognition model. Recognition model is used when the face features are extracted and associated with detected faceIds. + /// ID of the container. + /// Keeps track of any properties unknown to the library. + internal LargePersonGroup(string name, string userData, FaceRecognitionModel? recognitionModel, string largePersonGroupId, IDictionary serializedAdditionalRawData) + { + Name = name; + UserData = userData; + RecognitionModel = recognitionModel; + LargePersonGroupId = largePersonGroupId; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal LargePersonGroup() + { + } + + /// User defined name, maximum length is 128. + public string Name { get; } + /// Optional user defined data. Length should not exceed 16K. + public string UserData { get; } + /// Name of recognition model. Recognition model is used when the face features are extracted and associated with detected faceIds. + public FaceRecognitionModel? RecognitionModel { get; } + /// ID of the container. + public string LargePersonGroupId { get; } + } +} diff --git a/sdk/face/Azure.AI.Vision.Face/src/Generated/LargePersonGroupClient.cs b/sdk/face/Azure.AI.Vision.Face/src/Generated/LargePersonGroupClient.cs new file mode 100644 index 000000000000..0944da52e3a8 --- /dev/null +++ b/sdk/face/Azure.AI.Vision.Face/src/Generated/LargePersonGroupClient.cs @@ -0,0 +1,1991 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.AI.Vision.Face +{ + // Data plane generated sub-client. + /// The LargePersonGroup sub-client. + public partial class LargePersonGroupClient + { + private const string AuthorizationHeader = "Ocp-Apim-Subscription-Key"; + private readonly AzureKeyCredential _keyCredential; + private static readonly string[] AuthorizationScopes = new string[] { "https://cognitiveservices.azure.com/.default" }; + private readonly TokenCredential _tokenCredential; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _largePersonGroupId; + private readonly string _apiVersion; + + /// The ClientDiagnostics is used to provide tracing support for the client library. + internal ClientDiagnostics ClientDiagnostics { get; } + + /// The HTTP pipeline for sending and receiving REST requests and responses. + public virtual HttpPipeline Pipeline => _pipeline; + + /// Initializes a new instance of LargePersonGroupClient for mocking. + protected LargePersonGroupClient() + { + } + + /// Initializes a new instance of LargePersonGroupClient. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The key credential to copy. + /// The token credential to copy. + /// + /// Supported Cognitive Services endpoints (protocol and hostname, for example: + /// https://{resource-name}.cognitiveservices.azure.com). + /// + /// ID of the container. + /// API Version. Allowed values: "v1.1-preview.1" | "v1.2-preview.1". + internal LargePersonGroupClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, AzureKeyCredential keyCredential, TokenCredential tokenCredential, Uri endpoint, string largePersonGroupId, string apiVersion) + { + ClientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + _keyCredential = keyCredential; + _tokenCredential = tokenCredential; + _endpoint = endpoint; + _largePersonGroupId = largePersonGroupId; + _apiVersion = apiVersion; + } + + /// Create a new Large Person Group with user-specified largePersonGroupId, name, an optional userData and recognitionModel. + /// User defined name, maximum length is 128. + /// Optional user defined data. Length should not exceed 16K. + /// The 'recognitionModel' associated with this face list. Supported 'recognitionModel' values include 'recognition_01', 'recognition_02, 'recognition_03', and 'recognition_04'. The default value is 'recognition_01'. 'recognition_04' is recommended since its accuracy is improved on faces wearing masks compared with 'recognition_03', and its overall accuracy is improved compared with 'recognition_01' and 'recognition_02'. + /// The cancellation token to use. + /// is null. + /// Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/create-large-person-group for more details. + /// + public virtual async Task CreateAsync(string name, string userData = null, FaceRecognitionModel? recognitionModel = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(name, nameof(name)); + + CreateRequest createRequest = new CreateRequest(name, userData, recognitionModel, null); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await CreateAsync(createRequest.ToRequestContent(), context).ConfigureAwait(false); + return response; + } + + /// Create a new Large Person Group with user-specified largePersonGroupId, name, an optional userData and recognitionModel. + /// User defined name, maximum length is 128. + /// Optional user defined data. Length should not exceed 16K. + /// The 'recognitionModel' associated with this face list. Supported 'recognitionModel' values include 'recognition_01', 'recognition_02, 'recognition_03', and 'recognition_04'. The default value is 'recognition_01'. 'recognition_04' is recommended since its accuracy is improved on faces wearing masks compared with 'recognition_03', and its overall accuracy is improved compared with 'recognition_01' and 'recognition_02'. + /// The cancellation token to use. + /// is null. + /// Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/create-large-person-group for more details. + /// + public virtual Response Create(string name, string userData = null, FaceRecognitionModel? recognitionModel = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(name, nameof(name)); + + CreateRequest createRequest = new CreateRequest(name, userData, recognitionModel, null); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = Create(createRequest.ToRequestContent(), context); + return response; + } + + /// + /// [Protocol Method] Create a new Large Person Group with user-specified largePersonGroupId, name, an optional userData and recognitionModel. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task CreateAsync(RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("LargePersonGroupClient.Create"); + scope.Start(); + try + { + using HttpMessage message = CreateCreateRequest(content, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Create a new Large Person Group with user-specified largePersonGroupId, name, an optional userData and recognitionModel. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response Create(RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("LargePersonGroupClient.Create"); + scope.Start(); + try + { + using HttpMessage message = CreateCreateRequest(content, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method + /// + /// [Protocol Method] Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/delete-large-person-group for more details. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task DeleteAsync(RequestContext context = null) + { + using var scope = ClientDiagnostics.CreateScope("LargePersonGroupClient.Delete"); + scope.Start(); + try + { + using HttpMessage message = CreateDeleteRequest(context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method + /// + /// [Protocol Method] Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/delete-large-person-group for more details. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response Delete(RequestContext context = null) + { + using var scope = ClientDiagnostics.CreateScope("LargePersonGroupClient.Delete"); + scope.Start(); + try + { + using HttpMessage message = CreateDeleteRequest(context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/get-large-person-group for more details. + /// Return 'recognitionModel' or not. The default value is false. + /// The cancellation token to use. + /// + public virtual async Task> GetLargePersonGroupAsync(bool? returnRecognitionModel = null, CancellationToken cancellationToken = default) + { + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetLargePersonGroupAsync(returnRecognitionModel, context).ConfigureAwait(false); + return Response.FromValue(LargePersonGroup.FromResponse(response), response); + } + + /// Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/get-large-person-group for more details. + /// Return 'recognitionModel' or not. The default value is false. + /// The cancellation token to use. + /// + public virtual Response GetLargePersonGroup(bool? returnRecognitionModel = null, CancellationToken cancellationToken = default) + { + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetLargePersonGroup(returnRecognitionModel, context); + return Response.FromValue(LargePersonGroup.FromResponse(response), response); + } + + /// + /// [Protocol Method] Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/get-large-person-group for more details. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// Return 'recognitionModel' or not. The default value is false. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task GetLargePersonGroupAsync(bool? returnRecognitionModel, RequestContext context) + { + using var scope = ClientDiagnostics.CreateScope("LargePersonGroupClient.GetLargePersonGroup"); + scope.Start(); + try + { + using HttpMessage message = CreateGetLargePersonGroupRequest(returnRecognitionModel, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/get-large-person-group for more details. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// Return 'recognitionModel' or not. The default value is false. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response GetLargePersonGroup(bool? returnRecognitionModel, RequestContext context) + { + using var scope = ClientDiagnostics.CreateScope("LargePersonGroupClient.GetLargePersonGroup"); + scope.Start(); + try + { + using HttpMessage message = CreateGetLargePersonGroupRequest(returnRecognitionModel, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/update-large-person-group for more details. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task UpdateAsync(RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("LargePersonGroupClient.Update"); + scope.Start(); + try + { + using HttpMessage message = CreateUpdateRequest(content, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/update-large-person-group for more details. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response Update(RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("LargePersonGroupClient.Update"); + scope.Start(); + try + { + using HttpMessage message = CreateUpdateRequest(content, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// List all existing Large Person Groups' largePersonGroupId, name, userData and recognitionModel. + /// List resources greater than the "start". It contains no more than 64 characters. Default is empty. + /// The number of items to list, ranging in [1, 1000]. Default is 1000. + /// Return 'recognitionModel' or not. The default value is false. + /// The cancellation token to use. + /// Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/get-large-person-groups for more details. + /// + public virtual async Task>> GetLargePersonGroupsAsync(string start = null, int? top = null, bool? returnRecognitionModel = null, CancellationToken cancellationToken = default) + { + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetLargePersonGroupsAsync(start, top, returnRecognitionModel, context).ConfigureAwait(false); + IReadOnlyList value = default; + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + List array = new List(); + foreach (var item in document.RootElement.EnumerateArray()) + { + array.Add(LargePersonGroup.DeserializeLargePersonGroup(item)); + } + value = array; + return Response.FromValue(value, response); + } + + /// List all existing Large Person Groups' largePersonGroupId, name, userData and recognitionModel. + /// List resources greater than the "start". It contains no more than 64 characters. Default is empty. + /// The number of items to list, ranging in [1, 1000]. Default is 1000. + /// Return 'recognitionModel' or not. The default value is false. + /// The cancellation token to use. + /// Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/get-large-person-groups for more details. + /// + public virtual Response> GetLargePersonGroups(string start = null, int? top = null, bool? returnRecognitionModel = null, CancellationToken cancellationToken = default) + { + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetLargePersonGroups(start, top, returnRecognitionModel, context); + IReadOnlyList value = default; + using var document = JsonDocument.Parse(response.ContentStream); + List array = new List(); + foreach (var item in document.RootElement.EnumerateArray()) + { + array.Add(LargePersonGroup.DeserializeLargePersonGroup(item)); + } + value = array; + return Response.FromValue(value, response); + } + + /// + /// [Protocol Method] List all existing Large Person Groups' largePersonGroupId, name, userData and recognitionModel. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// List resources greater than the "start". It contains no more than 64 characters. Default is empty. + /// The number of items to list, ranging in [1, 1000]. Default is 1000. + /// Return 'recognitionModel' or not. The default value is false. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task GetLargePersonGroupsAsync(string start, int? top, bool? returnRecognitionModel, RequestContext context) + { + using var scope = ClientDiagnostics.CreateScope("LargePersonGroupClient.GetLargePersonGroups"); + scope.Start(); + try + { + using HttpMessage message = CreateGetLargePersonGroupsRequest(start, top, returnRecognitionModel, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] List all existing Large Person Groups' largePersonGroupId, name, userData and recognitionModel. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// List resources greater than the "start". It contains no more than 64 characters. Default is empty. + /// The number of items to list, ranging in [1, 1000]. Default is 1000. + /// Return 'recognitionModel' or not. The default value is false. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response GetLargePersonGroups(string start, int? top, bool? returnRecognitionModel, RequestContext context) + { + using var scope = ClientDiagnostics.CreateScope("LargePersonGroupClient.GetLargePersonGroups"); + scope.Start(); + try + { + using HttpMessage message = CreateGetLargePersonGroupsRequest(start, top, returnRecognitionModel, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// To check Large Person Group training status completed or still ongoing. Large Person Group training is an asynchronous operation triggered by "Train Large Person Group" API. + /// The cancellation token to use. + /// Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/get-large-person-group-training-status for more details. + /// + public virtual async Task> GetTrainingStatusAsync(CancellationToken cancellationToken = default) + { + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetTrainingStatusAsync(context).ConfigureAwait(false); + return Response.FromValue(FaceTrainingResult.FromResponse(response), response); + } + + /// To check Large Person Group training status completed or still ongoing. Large Person Group training is an asynchronous operation triggered by "Train Large Person Group" API. + /// The cancellation token to use. + /// Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/get-large-person-group-training-status for more details. + /// + public virtual Response GetTrainingStatus(CancellationToken cancellationToken = default) + { + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetTrainingStatus(context); + return Response.FromValue(FaceTrainingResult.FromResponse(response), response); + } + + /// + /// [Protocol Method] To check Large Person Group training status completed or still ongoing. Large Person Group training is an asynchronous operation triggered by "Train Large Person Group" API. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task GetTrainingStatusAsync(RequestContext context) + { + using var scope = ClientDiagnostics.CreateScope("LargePersonGroupClient.GetTrainingStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetTrainingStatusRequest(context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] To check Large Person Group training status completed or still ongoing. Large Person Group training is an asynchronous operation triggered by "Train Large Person Group" API. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response GetTrainingStatus(RequestContext context) + { + using var scope = ClientDiagnostics.CreateScope("LargePersonGroupClient.GetTrainingStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetTrainingStatusRequest(context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Create a new person in a specified Large Person Group. To add face to this person, please call "Add Large Person Group Person Face". + /// User defined name, maximum length is 128. + /// Optional user defined data. Length should not exceed 16K. + /// The cancellation token to use. + /// is null. + /// Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/create-large-person-group-person for more details. + /// + public virtual async Task> CreatePersonAsync(string name, string userData = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(name, nameof(name)); + + CreatePersonRequest createPersonRequest = new CreatePersonRequest(name, userData, null); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await CreatePersonAsync(createPersonRequest.ToRequestContent(), context).ConfigureAwait(false); + return Response.FromValue(CreatePersonResult.FromResponse(response), response); + } + + /// Create a new person in a specified Large Person Group. To add face to this person, please call "Add Large Person Group Person Face". + /// User defined name, maximum length is 128. + /// Optional user defined data. Length should not exceed 16K. + /// The cancellation token to use. + /// is null. + /// Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/create-large-person-group-person for more details. + /// + public virtual Response CreatePerson(string name, string userData = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(name, nameof(name)); + + CreatePersonRequest createPersonRequest = new CreatePersonRequest(name, userData, null); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = CreatePerson(createPersonRequest.ToRequestContent(), context); + return Response.FromValue(CreatePersonResult.FromResponse(response), response); + } + + /// + /// [Protocol Method] Create a new person in a specified Large Person Group. To add face to this person, please call "Add Large Person Group Person Face". + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task CreatePersonAsync(RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("LargePersonGroupClient.CreatePerson"); + scope.Start(); + try + { + using HttpMessage message = CreateCreatePersonRequest(content, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Create a new person in a specified Large Person Group. To add face to this person, please call "Add Large Person Group Person Face". + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response CreatePerson(RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("LargePersonGroupClient.CreatePerson"); + scope.Start(); + try + { + using HttpMessage message = CreateCreatePersonRequest(content, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method + /// + /// [Protocol Method] Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/delete-large-person-group-person for more details. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// ID of the person. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task DeletePersonAsync(Guid personId, RequestContext context = null) + { + using var scope = ClientDiagnostics.CreateScope("LargePersonGroupClient.DeletePerson"); + scope.Start(); + try + { + using HttpMessage message = CreateDeletePersonRequest(personId, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method + /// + /// [Protocol Method] Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/delete-large-person-group-person for more details. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// ID of the person. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response DeletePerson(Guid personId, RequestContext context = null) + { + using var scope = ClientDiagnostics.CreateScope("LargePersonGroupClient.DeletePerson"); + scope.Start(); + try + { + using HttpMessage message = CreateDeletePersonRequest(personId, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/get-large-person-group-person for more details. + /// ID of the person. + /// The cancellation token to use. + /// + public virtual async Task> GetPersonAsync(Guid personId, CancellationToken cancellationToken = default) + { + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetPersonAsync(personId, context).ConfigureAwait(false); + return Response.FromValue(LargePersonGroupPerson.FromResponse(response), response); + } + + /// Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/get-large-person-group-person for more details. + /// ID of the person. + /// The cancellation token to use. + /// + public virtual Response GetPerson(Guid personId, CancellationToken cancellationToken = default) + { + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetPerson(personId, context); + return Response.FromValue(LargePersonGroupPerson.FromResponse(response), response); + } + + /// + /// [Protocol Method] Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/get-large-person-group-person for more details. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// ID of the person. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task GetPersonAsync(Guid personId, RequestContext context) + { + using var scope = ClientDiagnostics.CreateScope("LargePersonGroupClient.GetPerson"); + scope.Start(); + try + { + using HttpMessage message = CreateGetPersonRequest(personId, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/get-large-person-group-person for more details. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// ID of the person. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response GetPerson(Guid personId, RequestContext context) + { + using var scope = ClientDiagnostics.CreateScope("LargePersonGroupClient.GetPerson"); + scope.Start(); + try + { + using HttpMessage message = CreateGetPersonRequest(personId, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/update-large-person-group-person for more details. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// ID of the person. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task UpdatePersonAsync(Guid personId, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("LargePersonGroupClient.UpdatePerson"); + scope.Start(); + try + { + using HttpMessage message = CreateUpdatePersonRequest(personId, content, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/update-large-person-group-person for more details. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// ID of the person. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response UpdatePerson(Guid personId, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("LargePersonGroupClient.UpdatePerson"); + scope.Start(); + try + { + using HttpMessage message = CreateUpdatePersonRequest(personId, content, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// List all persons' information in the specified Large Person Group, including personId, name, userData and persistedFaceIds of registered person faces. + /// List resources greater than the "start". It contains no more than 64 characters. Default is empty. + /// The number of items to list, ranging in [1, 1000]. Default is 1000. + /// The cancellation token to use. + /// Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/get-large-person-group-persons for more details. + /// + public virtual async Task>> GetPersonsAsync(string start = null, int? top = null, CancellationToken cancellationToken = default) + { + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetPersonsAsync(start, top, context).ConfigureAwait(false); + IReadOnlyList value = default; + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + List array = new List(); + foreach (var item in document.RootElement.EnumerateArray()) + { + array.Add(LargePersonGroupPerson.DeserializeLargePersonGroupPerson(item)); + } + value = array; + return Response.FromValue(value, response); + } + + /// List all persons' information in the specified Large Person Group, including personId, name, userData and persistedFaceIds of registered person faces. + /// List resources greater than the "start". It contains no more than 64 characters. Default is empty. + /// The number of items to list, ranging in [1, 1000]. Default is 1000. + /// The cancellation token to use. + /// Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/get-large-person-group-persons for more details. + /// + public virtual Response> GetPersons(string start = null, int? top = null, CancellationToken cancellationToken = default) + { + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetPersons(start, top, context); + IReadOnlyList value = default; + using var document = JsonDocument.Parse(response.ContentStream); + List array = new List(); + foreach (var item in document.RootElement.EnumerateArray()) + { + array.Add(LargePersonGroupPerson.DeserializeLargePersonGroupPerson(item)); + } + value = array; + return Response.FromValue(value, response); + } + + /// + /// [Protocol Method] List all persons' information in the specified Large Person Group, including personId, name, userData and persistedFaceIds of registered person faces. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// List resources greater than the "start". It contains no more than 64 characters. Default is empty. + /// The number of items to list, ranging in [1, 1000]. Default is 1000. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task GetPersonsAsync(string start, int? top, RequestContext context) + { + using var scope = ClientDiagnostics.CreateScope("LargePersonGroupClient.GetPersons"); + scope.Start(); + try + { + using HttpMessage message = CreateGetPersonsRequest(start, top, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] List all persons' information in the specified Large Person Group, including personId, name, userData and persistedFaceIds of registered person faces. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// List resources greater than the "start". It contains no more than 64 characters. Default is empty. + /// The number of items to list, ranging in [1, 1000]. Default is 1000. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response GetPersons(string start, int? top, RequestContext context) + { + using var scope = ClientDiagnostics.CreateScope("LargePersonGroupClient.GetPersons"); + scope.Start(); + try + { + using HttpMessage message = CreateGetPersonsRequest(start, top, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Add a face to a person into a Large Person Group for face identification or verification. + /// ID of the person. + /// URL of input image. + /// A face rectangle to specify the target face to be added to a person, in the format of 'targetFace=left,top,width,height'. + /// The 'detectionModel' associated with the detected faceIds. Supported 'detectionModel' values include 'detection_01', 'detection_02' and 'detection_03'. The default value is 'detection_01'. + /// User-provided data attached to the face. The size limit is 1K. + /// The cancellation token to use. + /// is null. + /// Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/add-large-person-group-person-face-from-url for more details. + internal virtual async Task> AddFaceFromUrlImplAsync(Guid personId, Uri uri, IEnumerable targetFace = null, FaceDetectionModel? detectionModel = null, string userData = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(uri, nameof(uri)); + + AddFaceFromUrlRequest addFaceFromUrlRequest = new AddFaceFromUrlRequest(uri, null); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await AddFaceFromUrlImplAsync(personId, addFaceFromUrlRequest.ToRequestContent(), targetFace, detectionModel?.ToString(), userData, context).ConfigureAwait(false); + return Response.FromValue(AddFaceResult.FromResponse(response), response); + } + + /// Add a face to a person into a Large Person Group for face identification or verification. + /// ID of the person. + /// URL of input image. + /// A face rectangle to specify the target face to be added to a person, in the format of 'targetFace=left,top,width,height'. + /// The 'detectionModel' associated with the detected faceIds. Supported 'detectionModel' values include 'detection_01', 'detection_02' and 'detection_03'. The default value is 'detection_01'. + /// User-provided data attached to the face. The size limit is 1K. + /// The cancellation token to use. + /// is null. + /// Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/add-large-person-group-person-face-from-url for more details. + internal virtual Response AddFaceFromUrlImpl(Guid personId, Uri uri, IEnumerable targetFace = null, FaceDetectionModel? detectionModel = null, string userData = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(uri, nameof(uri)); + + AddFaceFromUrlRequest addFaceFromUrlRequest = new AddFaceFromUrlRequest(uri, null); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = AddFaceFromUrlImpl(personId, addFaceFromUrlRequest.ToRequestContent(), targetFace, detectionModel?.ToString(), userData, context); + return Response.FromValue(AddFaceResult.FromResponse(response), response); + } + + /// + /// [Protocol Method] Add a face to a person into a Large Person Group for face identification or verification. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// ID of the person. + /// The content to send as the body of the request. + /// A face rectangle to specify the target face to be added to a person, in the format of 'targetFace=left,top,width,height'. + /// The 'detectionModel' associated with the detected faceIds. Supported 'detectionModel' values include 'detection_01', 'detection_02' and 'detection_03'. The default value is 'detection_01'. Allowed values: "detection_01" | "detection_02" | "detection_03". + /// User-provided data attached to the face. The size limit is 1K. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + internal virtual async Task AddFaceFromUrlImplAsync(Guid personId, RequestContent content, IEnumerable targetFace = null, string detectionModel = null, string userData = null, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("LargePersonGroupClient.AddFaceFromUrlImpl"); + scope.Start(); + try + { + using HttpMessage message = CreateAddFaceFromUrlImplRequest(personId, content, targetFace, detectionModel, userData, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Add a face to a person into a Large Person Group for face identification or verification. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// ID of the person. + /// The content to send as the body of the request. + /// A face rectangle to specify the target face to be added to a person, in the format of 'targetFace=left,top,width,height'. + /// The 'detectionModel' associated with the detected faceIds. Supported 'detectionModel' values include 'detection_01', 'detection_02' and 'detection_03'. The default value is 'detection_01'. Allowed values: "detection_01" | "detection_02" | "detection_03". + /// User-provided data attached to the face. The size limit is 1K. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + internal virtual Response AddFaceFromUrlImpl(Guid personId, RequestContent content, IEnumerable targetFace = null, string detectionModel = null, string userData = null, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("LargePersonGroupClient.AddFaceFromUrlImpl"); + scope.Start(); + try + { + using HttpMessage message = CreateAddFaceFromUrlImplRequest(personId, content, targetFace, detectionModel, userData, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Add a face to a person into a Large Person Group for face identification or verification. + /// ID of the person. + /// The image to be analyzed. + /// A face rectangle to specify the target face to be added to a person, in the format of 'targetFace=left,top,width,height'. + /// The 'detectionModel' associated with the detected faceIds. Supported 'detectionModel' values include 'detection_01', 'detection_02' and 'detection_03'. The default value is 'detection_01'. + /// User-provided data attached to the face. The size limit is 1K. + /// The cancellation token to use. + /// is null. + /// Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/add-large-person-group-person-face for more details. + internal virtual async Task> AddFaceImplAsync(Guid personId, BinaryData imageContent, IEnumerable targetFace = null, FaceDetectionModel? detectionModel = null, string userData = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(imageContent, nameof(imageContent)); + + using RequestContent content = imageContent; + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await AddFaceImplAsync(personId, content, targetFace, detectionModel?.ToString(), userData, context).ConfigureAwait(false); + return Response.FromValue(AddFaceResult.FromResponse(response), response); + } + + /// Add a face to a person into a Large Person Group for face identification or verification. + /// ID of the person. + /// The image to be analyzed. + /// A face rectangle to specify the target face to be added to a person, in the format of 'targetFace=left,top,width,height'. + /// The 'detectionModel' associated with the detected faceIds. Supported 'detectionModel' values include 'detection_01', 'detection_02' and 'detection_03'. The default value is 'detection_01'. + /// User-provided data attached to the face. The size limit is 1K. + /// The cancellation token to use. + /// is null. + /// Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/add-large-person-group-person-face for more details. + internal virtual Response AddFaceImpl(Guid personId, BinaryData imageContent, IEnumerable targetFace = null, FaceDetectionModel? detectionModel = null, string userData = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(imageContent, nameof(imageContent)); + + using RequestContent content = imageContent; + RequestContext context = FromCancellationToken(cancellationToken); + Response response = AddFaceImpl(personId, content, targetFace, detectionModel?.ToString(), userData, context); + return Response.FromValue(AddFaceResult.FromResponse(response), response); + } + + /// + /// [Protocol Method] Add a face to a person into a Large Person Group for face identification or verification. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// ID of the person. + /// The content to send as the body of the request. + /// A face rectangle to specify the target face to be added to a person, in the format of 'targetFace=left,top,width,height'. + /// The 'detectionModel' associated with the detected faceIds. Supported 'detectionModel' values include 'detection_01', 'detection_02' and 'detection_03'. The default value is 'detection_01'. Allowed values: "detection_01" | "detection_02" | "detection_03". + /// User-provided data attached to the face. The size limit is 1K. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + internal virtual async Task AddFaceImplAsync(Guid personId, RequestContent content, IEnumerable targetFace = null, string detectionModel = null, string userData = null, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("LargePersonGroupClient.AddFaceImpl"); + scope.Start(); + try + { + using HttpMessage message = CreateAddFaceImplRequest(personId, content, targetFace, detectionModel, userData, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Add a face to a person into a Large Person Group for face identification or verification. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// ID of the person. + /// The content to send as the body of the request. + /// A face rectangle to specify the target face to be added to a person, in the format of 'targetFace=left,top,width,height'. + /// The 'detectionModel' associated with the detected faceIds. Supported 'detectionModel' values include 'detection_01', 'detection_02' and 'detection_03'. The default value is 'detection_01'. Allowed values: "detection_01" | "detection_02" | "detection_03". + /// User-provided data attached to the face. The size limit is 1K. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + internal virtual Response AddFaceImpl(Guid personId, RequestContent content, IEnumerable targetFace = null, string detectionModel = null, string userData = null, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("LargePersonGroupClient.AddFaceImpl"); + scope.Start(); + try + { + using HttpMessage message = CreateAddFaceImplRequest(personId, content, targetFace, detectionModel, userData, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method + /// + /// [Protocol Method] Delete a face from a person in a Large Person Group by specified largePersonGroupId, personId and persistedFaceId. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// ID of the person. + /// Face ID of the face. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task DeleteFaceAsync(Guid personId, Guid persistedFaceId, RequestContext context = null) + { + using var scope = ClientDiagnostics.CreateScope("LargePersonGroupClient.DeleteFace"); + scope.Start(); + try + { + using HttpMessage message = CreateDeleteFaceRequest(personId, persistedFaceId, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method + /// + /// [Protocol Method] Delete a face from a person in a Large Person Group by specified largePersonGroupId, personId and persistedFaceId. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// ID of the person. + /// Face ID of the face. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response DeleteFace(Guid personId, Guid persistedFaceId, RequestContext context = null) + { + using var scope = ClientDiagnostics.CreateScope("LargePersonGroupClient.DeleteFace"); + scope.Start(); + try + { + using HttpMessage message = CreateDeleteFaceRequest(personId, persistedFaceId, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/get-large-person-group-person-face for more details. + /// ID of the person. + /// Face ID of the face. + /// The cancellation token to use. + /// + public virtual async Task> GetFaceAsync(Guid personId, Guid persistedFaceId, CancellationToken cancellationToken = default) + { + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetFaceAsync(personId, persistedFaceId, context).ConfigureAwait(false); + return Response.FromValue(LargePersonGroupPersonFace.FromResponse(response), response); + } + + /// Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/get-large-person-group-person-face for more details. + /// ID of the person. + /// Face ID of the face. + /// The cancellation token to use. + /// + public virtual Response GetFace(Guid personId, Guid persistedFaceId, CancellationToken cancellationToken = default) + { + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetFace(personId, persistedFaceId, context); + return Response.FromValue(LargePersonGroupPersonFace.FromResponse(response), response); + } + + /// + /// [Protocol Method] Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/get-large-person-group-person-face for more details. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// ID of the person. + /// Face ID of the face. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task GetFaceAsync(Guid personId, Guid persistedFaceId, RequestContext context) + { + using var scope = ClientDiagnostics.CreateScope("LargePersonGroupClient.GetFace"); + scope.Start(); + try + { + using HttpMessage message = CreateGetFaceRequest(personId, persistedFaceId, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/get-large-person-group-person-face for more details. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// ID of the person. + /// Face ID of the face. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response GetFace(Guid personId, Guid persistedFaceId, RequestContext context) + { + using var scope = ClientDiagnostics.CreateScope("LargePersonGroupClient.GetFace"); + scope.Start(); + try + { + using HttpMessage message = CreateGetFaceRequest(personId, persistedFaceId, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/update-large-person-group-person-face for more details. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// ID of the person. + /// Face ID of the face. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task UpdateFaceAsync(Guid personId, Guid persistedFaceId, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("LargePersonGroupClient.UpdateFace"); + scope.Start(); + try + { + using HttpMessage message = CreateUpdateFaceRequest(personId, persistedFaceId, content, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/update-large-person-group-person-face for more details. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// ID of the person. + /// Face ID of the face. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response UpdateFace(Guid personId, Guid persistedFaceId, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("LargePersonGroupClient.UpdateFace"); + scope.Start(); + try + { + using HttpMessage message = CreateUpdateFaceRequest(personId, persistedFaceId, content, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method + /// + /// [Protocol Method] Submit a Large Person Group training task. Training is a crucial step that only a trained Large Person Group can be used by "Identify From Large Person Group". + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The representing an asynchronous operation on the service. + /// + public virtual async Task TrainAsync(WaitUntil waitUntil, RequestContext context = null) + { + using var scope = ClientDiagnostics.CreateScope("LargePersonGroupClient.Train"); + scope.Start(); + try + { + using HttpMessage message = CreateTrainRequest(context); + return await ProtocolOperationHelpers.ProcessMessageWithoutResponseValueAsync(_pipeline, message, ClientDiagnostics, "LargePersonGroupClient.Train", OperationFinalStateVia.OperationLocation, context, waitUntil).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method + /// + /// [Protocol Method] Submit a Large Person Group training task. Training is a crucial step that only a trained Large Person Group can be used by "Identify From Large Person Group". + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The representing an asynchronous operation on the service. + /// + public virtual Operation Train(WaitUntil waitUntil, RequestContext context = null) + { + using var scope = ClientDiagnostics.CreateScope("LargePersonGroupClient.Train"); + scope.Start(); + try + { + using HttpMessage message = CreateTrainRequest(context); + return ProtocolOperationHelpers.ProcessMessageWithoutResponseValue(_pipeline, message, ClientDiagnostics, "LargePersonGroupClient.Train", OperationFinalStateVia.OperationLocation, context, waitUntil); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + internal HttpMessage CreateCreateRequest(RequestContent content, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/face/", false); + uri.AppendRaw(_apiVersion, true); + uri.AppendPath("/largepersongroups/", false); + uri.AppendPath(_largePersonGroupId, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateDeleteRequest(RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/face/", false); + uri.AppendRaw(_apiVersion, true); + uri.AppendPath("/largepersongroups/", false); + uri.AppendPath(_largePersonGroupId, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetLargePersonGroupRequest(bool? returnRecognitionModel, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/face/", false); + uri.AppendRaw(_apiVersion, true); + uri.AppendPath("/largepersongroups/", false); + uri.AppendPath(_largePersonGroupId, true); + if (returnRecognitionModel != null) + { + uri.AppendQuery("returnRecognitionModel", returnRecognitionModel.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateUpdateRequest(RequestContent content, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/face/", false); + uri.AppendRaw(_apiVersion, true); + uri.AppendPath("/largepersongroups/", false); + uri.AppendPath(_largePersonGroupId, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateGetLargePersonGroupsRequest(string start, int? top, bool? returnRecognitionModel, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/face/", false); + uri.AppendRaw(_apiVersion, true); + uri.AppendPath("/largepersongroups", false); + if (start != null) + { + uri.AppendQuery("start", start, true); + } + if (top != null) + { + uri.AppendQuery("top", top.Value, true); + } + if (returnRecognitionModel != null) + { + uri.AppendQuery("returnRecognitionModel", returnRecognitionModel.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetTrainingStatusRequest(RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/face/", false); + uri.AppendRaw(_apiVersion, true); + uri.AppendPath("/largepersongroups/", false); + uri.AppendPath(_largePersonGroupId, true); + uri.AppendPath("/training", false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateTrainRequest(RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier202); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/face/", false); + uri.AppendRaw(_apiVersion, true); + uri.AppendPath("/largepersongroups/", false); + uri.AppendPath(_largePersonGroupId, true); + uri.AppendPath("/train", false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateCreatePersonRequest(RequestContent content, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/face/", false); + uri.AppendRaw(_apiVersion, true); + uri.AppendPath("/largepersongroups/", false); + uri.AppendPath(_largePersonGroupId, true); + uri.AppendPath("/persons", false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateDeletePersonRequest(Guid personId, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/face/", false); + uri.AppendRaw(_apiVersion, true); + uri.AppendPath("/largepersongroups/", false); + uri.AppendPath(_largePersonGroupId, true); + uri.AppendPath("/persons/", false); + uri.AppendPath(personId, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetPersonRequest(Guid personId, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/face/", false); + uri.AppendRaw(_apiVersion, true); + uri.AppendPath("/largepersongroups/", false); + uri.AppendPath(_largePersonGroupId, true); + uri.AppendPath("/persons/", false); + uri.AppendPath(personId, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateUpdatePersonRequest(Guid personId, RequestContent content, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/face/", false); + uri.AppendRaw(_apiVersion, true); + uri.AppendPath("/largepersongroups/", false); + uri.AppendPath(_largePersonGroupId, true); + uri.AppendPath("/persons/", false); + uri.AppendPath(personId, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateGetPersonsRequest(string start, int? top, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/face/", false); + uri.AppendRaw(_apiVersion, true); + uri.AppendPath("/largepersongroups/", false); + uri.AppendPath(_largePersonGroupId, true); + uri.AppendPath("/persons", false); + if (start != null) + { + uri.AppendQuery("start", start, true); + } + if (top != null) + { + uri.AppendQuery("top", top.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateAddFaceFromUrlImplRequest(Guid personId, RequestContent content, IEnumerable targetFace, string detectionModel, string userData, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/face/", false); + uri.AppendRaw(_apiVersion, true); + uri.AppendPath("/largepersongroups/", false); + uri.AppendPath(_largePersonGroupId, true); + uri.AppendPath("/persons/", false); + uri.AppendPath(personId, true); + uri.AppendPath("/persistedfaces", false); + if (targetFace != null && !(targetFace is ChangeTrackingList changeTrackingList && changeTrackingList.IsUndefined)) + { + uri.AppendQueryDelimited("targetFace", targetFace, ",", true); + } + if (detectionModel != null) + { + uri.AppendQuery("detectionModel", detectionModel, true); + } + if (userData != null) + { + uri.AppendQuery("userData", userData, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateAddFaceImplRequest(Guid personId, RequestContent content, IEnumerable targetFace, string detectionModel, string userData, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/face/", false); + uri.AppendRaw(_apiVersion, true); + uri.AppendPath("/largepersongroups/", false); + uri.AppendPath(_largePersonGroupId, true); + uri.AppendPath("/persons/", false); + uri.AppendPath(personId, true); + uri.AppendPath("/persistedfaces", false); + if (targetFace != null && !(targetFace is ChangeTrackingList changeTrackingList && changeTrackingList.IsUndefined)) + { + uri.AppendQueryDelimited("targetFace", targetFace, ",", true); + } + if (detectionModel != null) + { + uri.AppendQuery("detectionModel", detectionModel, true); + } + if (userData != null) + { + uri.AppendQuery("userData", userData, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/octet-stream"); + request.Content = content; + return message; + } + + internal HttpMessage CreateDeleteFaceRequest(Guid personId, Guid persistedFaceId, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/face/", false); + uri.AppendRaw(_apiVersion, true); + uri.AppendPath("/largepersongroups/", false); + uri.AppendPath(_largePersonGroupId, true); + uri.AppendPath("/persons/", false); + uri.AppendPath(personId, true); + uri.AppendPath("/persistedfaces/", false); + uri.AppendPath(persistedFaceId, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetFaceRequest(Guid personId, Guid persistedFaceId, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/face/", false); + uri.AppendRaw(_apiVersion, true); + uri.AppendPath("/largepersongroups/", false); + uri.AppendPath(_largePersonGroupId, true); + uri.AppendPath("/persons/", false); + uri.AppendPath(personId, true); + uri.AppendPath("/persistedfaces/", false); + uri.AppendPath(persistedFaceId, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateUpdateFaceRequest(Guid personId, Guid persistedFaceId, RequestContent content, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/face/", false); + uri.AppendRaw(_apiVersion, true); + uri.AppendPath("/largepersongroups/", false); + uri.AppendPath(_largePersonGroupId, true); + uri.AppendPath("/persons/", false); + uri.AppendPath(personId, true); + uri.AppendPath("/persistedfaces/", false); + uri.AppendPath(persistedFaceId, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + + private static RequestContext DefaultRequestContext = new RequestContext(); + internal static RequestContext FromCancellationToken(CancellationToken cancellationToken = default) + { + if (!cancellationToken.CanBeCanceled) + { + return DefaultRequestContext; + } + + return new RequestContext() { CancellationToken = cancellationToken }; + } + + private static ResponseClassifier _responseClassifier200; + private static ResponseClassifier ResponseClassifier200 => _responseClassifier200 ??= new StatusCodeClassifier(stackalloc ushort[] { 200 }); + private static ResponseClassifier _responseClassifier202; + private static ResponseClassifier ResponseClassifier202 => _responseClassifier202 ??= new StatusCodeClassifier(stackalloc ushort[] { 202 }); + } +} diff --git a/sdk/face/Azure.AI.Vision.Face/src/Generated/LargePersonGroupPerson.Serialization.cs b/sdk/face/Azure.AI.Vision.Face/src/Generated/LargePersonGroupPerson.Serialization.cs new file mode 100644 index 000000000000..eb363bd7f27c --- /dev/null +++ b/sdk/face/Azure.AI.Vision.Face/src/Generated/LargePersonGroupPerson.Serialization.cs @@ -0,0 +1,182 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Vision.Face +{ + public partial class LargePersonGroupPerson : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(LargePersonGroupPerson)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (options.Format != "W") + { + writer.WritePropertyName("personId"u8); + writer.WriteStringValue(PersonId); + } + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + if (Optional.IsDefined(UserData)) + { + writer.WritePropertyName("userData"u8); + writer.WriteStringValue(UserData); + } + if (Optional.IsCollectionDefined(PersistedFaceIds)) + { + writer.WritePropertyName("persistedFaceIds"u8); + writer.WriteStartArray(); + foreach (var item in PersistedFaceIds) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + LargePersonGroupPerson IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(LargePersonGroupPerson)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeLargePersonGroupPerson(document.RootElement, options); + } + + internal static LargePersonGroupPerson DeserializeLargePersonGroupPerson(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Guid personId = default; + string name = default; + string userData = default; + IReadOnlyList persistedFaceIds = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("personId"u8)) + { + personId = property.Value.GetGuid(); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("userData"u8)) + { + userData = property.Value.GetString(); + continue; + } + if (property.NameEquals("persistedFaceIds"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetGuid()); + } + persistedFaceIds = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new LargePersonGroupPerson(personId, name, userData, persistedFaceIds ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(LargePersonGroupPerson)} does not support writing '{options.Format}' format."); + } + } + + LargePersonGroupPerson IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeLargePersonGroupPerson(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(LargePersonGroupPerson)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static LargePersonGroupPerson FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeLargePersonGroupPerson(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/face/Azure.AI.Vision.Face/src/Generated/LargePersonGroupPerson.cs b/sdk/face/Azure.AI.Vision.Face/src/Generated/LargePersonGroupPerson.cs new file mode 100644 index 000000000000..1884b1812ec4 --- /dev/null +++ b/sdk/face/Azure.AI.Vision.Face/src/Generated/LargePersonGroupPerson.cs @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Vision.Face +{ + /// The person in a specified large person group. To add face to this person, please call "Add Large Person Group Person Face". + public partial class LargePersonGroupPerson + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// User defined name, maximum length is 128. + /// is null. + internal LargePersonGroupPerson(string name) + { + Argument.AssertNotNull(name, nameof(name)); + + Name = name; + PersistedFaceIds = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// ID of the person. + /// User defined name, maximum length is 128. + /// Optional user defined data. Length should not exceed 16K. + /// Face ids of registered faces in the person. + /// Keeps track of any properties unknown to the library. + internal LargePersonGroupPerson(Guid personId, string name, string userData, IReadOnlyList persistedFaceIds, IDictionary serializedAdditionalRawData) + { + PersonId = personId; + Name = name; + UserData = userData; + PersistedFaceIds = persistedFaceIds; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal LargePersonGroupPerson() + { + } + + /// ID of the person. + public Guid PersonId { get; } + /// User defined name, maximum length is 128. + public string Name { get; } + /// Optional user defined data. Length should not exceed 16K. + public string UserData { get; } + /// Face ids of registered faces in the person. + public IReadOnlyList PersistedFaceIds { get; } + } +} diff --git a/sdk/face/Azure.AI.Vision.Face/src/Generated/LargePersonGroupPersonFace.Serialization.cs b/sdk/face/Azure.AI.Vision.Face/src/Generated/LargePersonGroupPersonFace.Serialization.cs new file mode 100644 index 000000000000..a602eb3457e0 --- /dev/null +++ b/sdk/face/Azure.AI.Vision.Face/src/Generated/LargePersonGroupPersonFace.Serialization.cs @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Vision.Face +{ + public partial class LargePersonGroupPersonFace : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(LargePersonGroupPersonFace)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (options.Format != "W") + { + writer.WritePropertyName("persistedFaceId"u8); + writer.WriteStringValue(PersistedFaceId); + } + if (Optional.IsDefined(UserData)) + { + writer.WritePropertyName("userData"u8); + writer.WriteStringValue(UserData); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + LargePersonGroupPersonFace IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(LargePersonGroupPersonFace)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeLargePersonGroupPersonFace(document.RootElement, options); + } + + internal static LargePersonGroupPersonFace DeserializeLargePersonGroupPersonFace(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Guid persistedFaceId = default; + string userData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("persistedFaceId"u8)) + { + persistedFaceId = property.Value.GetGuid(); + continue; + } + if (property.NameEquals("userData"u8)) + { + userData = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new LargePersonGroupPersonFace(persistedFaceId, userData, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(LargePersonGroupPersonFace)} does not support writing '{options.Format}' format."); + } + } + + LargePersonGroupPersonFace IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeLargePersonGroupPersonFace(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(LargePersonGroupPersonFace)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static LargePersonGroupPersonFace FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeLargePersonGroupPersonFace(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/face/Azure.AI.Vision.Face/src/Generated/LargePersonGroupPersonFace.cs b/sdk/face/Azure.AI.Vision.Face/src/Generated/LargePersonGroupPersonFace.cs new file mode 100644 index 000000000000..56aa4d0061ff --- /dev/null +++ b/sdk/face/Azure.AI.Vision.Face/src/Generated/LargePersonGroupPersonFace.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Vision.Face +{ + /// Face resource for large person group person. + public partial class LargePersonGroupPersonFace + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal LargePersonGroupPersonFace() + { + } + + /// Initializes a new instance of . + /// Face ID of the face. + /// User-provided data attached to the face. The length limit is 1K. + /// Keeps track of any properties unknown to the library. + internal LargePersonGroupPersonFace(Guid persistedFaceId, string userData, IDictionary serializedAdditionalRawData) + { + PersistedFaceId = persistedFaceId; + UserData = userData; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Face ID of the face. + public Guid PersistedFaceId { get; } + /// User-provided data attached to the face. The length limit is 1K. + public string UserData { get; } + } +} diff --git a/sdk/face/Azure.AI.Vision.Face/src/Generated/LivenessModel.cs b/sdk/face/Azure.AI.Vision.Face/src/Generated/LivenessModel.cs index 2a3c6d8b1280..f5a0af9fc967 100644 --- a/sdk/face/Azure.AI.Vision.Face/src/Generated/LivenessModel.cs +++ b/sdk/face/Azure.AI.Vision.Face/src/Generated/LivenessModel.cs @@ -22,19 +22,13 @@ public LivenessModel(string value) _value = value ?? throw new ArgumentNullException(nameof(value)); } - private const string V20200215Preview01Value = "2020-02-15-preview.01"; - private const string V20211112Preview03Value = "2021-11-12-preview.03"; private const string V20221015Preview04Value = "2022-10-15-preview.04"; - private const string V20230302Preview05Value = "2023-03-02-preview.05"; + private const string V20231220Preview06Value = "2023-12-20-preview.06"; - /// 2020-02-15-preview.01. - public static LivenessModel V20200215Preview01 { get; } = new LivenessModel(V20200215Preview01Value); - /// 2021-11-12-preview.03. - public static LivenessModel V20211112Preview03 { get; } = new LivenessModel(V20211112Preview03Value); /// 2022-10-15-preview.04. public static LivenessModel V20221015Preview04 { get; } = new LivenessModel(V20221015Preview04Value); - /// 2023-03-02-preview.05. - public static LivenessModel V20230302Preview05 { get; } = new LivenessModel(V20230302Preview05Value); + /// 2023-12-20-preview.06. + public static LivenessModel V20231220Preview06 { get; } = new LivenessModel(V20231220Preview06Value); /// Determines if two values are the same. public static bool operator ==(LivenessModel left, LivenessModel right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/face/Azure.AI.Vision.Face/src/Generated/LivenessOperationMode.cs b/sdk/face/Azure.AI.Vision.Face/src/Generated/LivenessOperationMode.cs index b29e45e21167..a1b1ed8b4884 100644 --- a/sdk/face/Azure.AI.Vision.Face/src/Generated/LivenessOperationMode.cs +++ b/sdk/face/Azure.AI.Vision.Face/src/Generated/LivenessOperationMode.cs @@ -10,7 +10,7 @@ namespace Azure.AI.Vision.Face { - /// The liveness operation mode to drive the client’s end-user experience. + /// The liveness operation mode to drive the client's end-user experience. public readonly partial struct LivenessOperationMode : IEquatable { private readonly string _value; @@ -25,9 +25,9 @@ public LivenessOperationMode(string value) private const string PassiveValue = "Passive"; private const string PassiveActiveValue = "PassiveActive"; - /// Utilizes a passive liveness technique that requires no additional actions from the user. Requires normal indoor lighting and high screen brightness for optimal performance. And thus, this mode has a narrow operational envelope and will not be suitable for scenarios that requires the end-user’s to be in bright lighting conditions. Note: this is the only supported mode for the Mobile (iOS and Android) solution. + /// Utilizes a passive liveness technique that requires no additional actions from the user. Requires normal indoor lighting and high screen brightness for optimal performance. And thus, this mode has a narrow operational envelope and will not be suitable for scenarios that requires the end-user's to be in bright lighting conditions. Note: this is the only supported mode for the Mobile (iOS and Android) solution. public static LivenessOperationMode Passive { get; } = new LivenessOperationMode(PassiveValue); - /// This mode utilizes a hybrid passive or active liveness technique that necessitates user cooperation. It is optimized to require active motion only under suboptimal lighting conditions. Unlike the passive mode, this mode has no lighting restrictions, and thus offering a broader operational envelope. This mode is preferable on Web based solutions due to the lack of automatic screen brightness control available on browsers which hinders the Passive mode’s operational envelope on Web based solutions. + /// This mode utilizes a hybrid passive or active liveness technique that necessitates user cooperation. It is optimized to require active motion only under suboptimal lighting conditions. Unlike the passive mode, this mode has no lighting restrictions, and thus offering a broader operational envelope. This mode is preferable on Web based solutions due to the lack of automatic screen brightness control available on browsers which hinders the Passive mode's operational envelope on Web based solutions. public static LivenessOperationMode PassiveActive { get; } = new LivenessOperationMode(PassiveActiveValue); /// Determines if two values are the same. public static bool operator ==(LivenessOperationMode left, LivenessOperationMode right) => left.Equals(right); diff --git a/sdk/face/Azure.AI.Vision.Face/src/Generated/LivenessSessionAuditEntry.Serialization.cs b/sdk/face/Azure.AI.Vision.Face/src/Generated/LivenessSessionAuditEntry.Serialization.cs index 8db941366715..203873526c05 100644 --- a/sdk/face/Azure.AI.Vision.Face/src/Generated/LivenessSessionAuditEntry.Serialization.cs +++ b/sdk/face/Azure.AI.Vision.Face/src/Generated/LivenessSessionAuditEntry.Serialization.cs @@ -42,6 +42,16 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea writer.WriteObjectValue(Response, options); writer.WritePropertyName("digest"u8); writer.WriteStringValue(Digest); + if (Optional.IsDefined(SessionImageId)) + { + writer.WritePropertyName("sessionImageId"u8); + writer.WriteStringValue(SessionImageId); + } + if (Optional.IsDefined(VerifyImageHash)) + { + writer.WritePropertyName("verifyImageHash"u8); + writer.WriteStringValue(VerifyImageHash); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -88,6 +98,8 @@ internal static LivenessSessionAuditEntry DeserializeLivenessSessionAuditEntry(J AuditRequestInfo request = default; AuditLivenessResponseInfo response = default; string digest = default; + string sessionImageId = default; + string verifyImageHash = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -132,6 +144,16 @@ internal static LivenessSessionAuditEntry DeserializeLivenessSessionAuditEntry(J digest = property.Value.GetString(); continue; } + if (property.NameEquals("sessionImageId"u8)) + { + sessionImageId = property.Value.GetString(); + continue; + } + if (property.NameEquals("verifyImageHash"u8)) + { + verifyImageHash = property.Value.GetString(); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -147,6 +169,8 @@ internal static LivenessSessionAuditEntry DeserializeLivenessSessionAuditEntry(J request, response, digest, + sessionImageId, + verifyImageHash, serializedAdditionalRawData); } diff --git a/sdk/face/Azure.AI.Vision.Face/src/Generated/LivenessSessionAuditEntry.cs b/sdk/face/Azure.AI.Vision.Face/src/Generated/LivenessSessionAuditEntry.cs index 999391540240..46b364a13ffd 100644 --- a/sdk/face/Azure.AI.Vision.Face/src/Generated/LivenessSessionAuditEntry.cs +++ b/sdk/face/Azure.AI.Vision.Face/src/Generated/LivenessSessionAuditEntry.cs @@ -83,8 +83,10 @@ internal LivenessSessionAuditEntry(long id, string sessionId, string requestId, /// The request of this entry. /// The response of this entry. /// The server calculated digest for this request. If the client reported digest differs from the server calculated digest, then the message integrity between the client and service has been compromised and the result should not be trusted. For more information, see how to guides on how to leverage this value to secure your end-to-end solution. + /// The image ID of the session request. + /// The sha256 hash of the verify-image in the request. /// Keeps track of any properties unknown to the library. - internal LivenessSessionAuditEntry(long id, string sessionId, string requestId, string clientRequestId, DateTimeOffset receivedDateTime, AuditRequestInfo request, AuditLivenessResponseInfo response, string digest, IDictionary serializedAdditionalRawData) + internal LivenessSessionAuditEntry(long id, string sessionId, string requestId, string clientRequestId, DateTimeOffset receivedDateTime, AuditRequestInfo request, AuditLivenessResponseInfo response, string digest, string sessionImageId, string verifyImageHash, IDictionary serializedAdditionalRawData) { Id = id; SessionId = sessionId; @@ -94,6 +96,8 @@ internal LivenessSessionAuditEntry(long id, string sessionId, string requestId, Request = request; Response = response; Digest = digest; + SessionImageId = sessionImageId; + VerifyImageHash = verifyImageHash; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -118,5 +122,9 @@ internal LivenessSessionAuditEntry() public AuditLivenessResponseInfo Response { get; } /// The server calculated digest for this request. If the client reported digest differs from the server calculated digest, then the message integrity between the client and service has been compromised and the result should not be trusted. For more information, see how to guides on how to leverage this value to secure your end-to-end solution. public string Digest { get; } + /// The image ID of the session request. + public string SessionImageId { get; } + /// The sha256 hash of the verify-image in the request. + public string VerifyImageHash { get; } } } diff --git a/sdk/face/Azure.AI.Vision.Face/src/Generated/VerifyFromLargePersonGroupRequest.Serialization.cs b/sdk/face/Azure.AI.Vision.Face/src/Generated/VerifyFromLargePersonGroupRequest.Serialization.cs new file mode 100644 index 000000000000..fa9cc27b3b68 --- /dev/null +++ b/sdk/face/Azure.AI.Vision.Face/src/Generated/VerifyFromLargePersonGroupRequest.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Vision.Face +{ + internal partial class VerifyFromLargePersonGroupRequest : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(VerifyFromLargePersonGroupRequest)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("faceId"u8); + writer.WriteStringValue(FaceId); + writer.WritePropertyName("largePersonGroupId"u8); + writer.WriteStringValue(LargePersonGroupId); + writer.WritePropertyName("personId"u8); + writer.WriteStringValue(PersonId); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + VerifyFromLargePersonGroupRequest IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(VerifyFromLargePersonGroupRequest)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeVerifyFromLargePersonGroupRequest(document.RootElement, options); + } + + internal static VerifyFromLargePersonGroupRequest DeserializeVerifyFromLargePersonGroupRequest(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Guid faceId = default; + string largePersonGroupId = default; + Guid personId = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("faceId"u8)) + { + faceId = property.Value.GetGuid(); + continue; + } + if (property.NameEquals("largePersonGroupId"u8)) + { + largePersonGroupId = property.Value.GetString(); + continue; + } + if (property.NameEquals("personId"u8)) + { + personId = property.Value.GetGuid(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new VerifyFromLargePersonGroupRequest(faceId, largePersonGroupId, personId, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(VerifyFromLargePersonGroupRequest)} does not support writing '{options.Format}' format."); + } + } + + VerifyFromLargePersonGroupRequest IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeVerifyFromLargePersonGroupRequest(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(VerifyFromLargePersonGroupRequest)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static VerifyFromLargePersonGroupRequest FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeVerifyFromLargePersonGroupRequest(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/face/Azure.AI.Vision.Face/src/Generated/VerifyFromLargePersonGroupRequest.cs b/sdk/face/Azure.AI.Vision.Face/src/Generated/VerifyFromLargePersonGroupRequest.cs new file mode 100644 index 000000000000..e78b93c002c1 --- /dev/null +++ b/sdk/face/Azure.AI.Vision.Face/src/Generated/VerifyFromLargePersonGroupRequest.cs @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Vision.Face +{ + /// The VerifyFromLargePersonGroupRequest. + internal partial class VerifyFromLargePersonGroupRequest + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The faceId of the face, come from "Detect". + /// Using existing largePersonGroupId and personId for fast loading a specified person. largePersonGroupId is created in "Create Large Person Group". + /// Specify a certain person in Large Person Group. + /// is null. + internal VerifyFromLargePersonGroupRequest(Guid faceId, string largePersonGroupId, Guid personId) + { + Argument.AssertNotNull(largePersonGroupId, nameof(largePersonGroupId)); + + FaceId = faceId; + LargePersonGroupId = largePersonGroupId; + PersonId = personId; + } + + /// Initializes a new instance of . + /// The faceId of the face, come from "Detect". + /// Using existing largePersonGroupId and personId for fast loading a specified person. largePersonGroupId is created in "Create Large Person Group". + /// Specify a certain person in Large Person Group. + /// Keeps track of any properties unknown to the library. + internal VerifyFromLargePersonGroupRequest(Guid faceId, string largePersonGroupId, Guid personId, IDictionary serializedAdditionalRawData) + { + FaceId = faceId; + LargePersonGroupId = largePersonGroupId; + PersonId = personId; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal VerifyFromLargePersonGroupRequest() + { + } + + /// The faceId of the face, come from "Detect". + public Guid FaceId { get; } + /// Using existing largePersonGroupId and personId for fast loading a specified person. largePersonGroupId is created in "Create Large Person Group". + public string LargePersonGroupId { get; } + /// Specify a certain person in Large Person Group. + public Guid PersonId { get; } + } +} diff --git a/sdk/face/Azure.AI.Vision.Face/tests/FaceSessionClient/FaceSessionClientTests.cs b/sdk/face/Azure.AI.Vision.Face/tests/FaceSessionClient/FaceSessionClientTests.cs index 9dbc472ffddc..49c92be1ef92 100644 --- a/sdk/face/Azure.AI.Vision.Face/tests/FaceSessionClient/FaceSessionClientTests.cs +++ b/sdk/face/Azure.AI.Vision.Face/tests/FaceSessionClient/FaceSessionClientTests.cs @@ -200,7 +200,7 @@ protected async Task CreateLivenessWithVe { var client = CreateSessionClient(nonRecordingClient: nonRecordingClient); - var createContent = new CreateLivenessSessionContent(LivenessOperationMode.Passive) + var createContent = new CreateLivenessWithVerifySessionContent(LivenessOperationMode.Passive) { DeviceCorrelationId = DeviceCorrelationId, }; diff --git a/sdk/face/Azure.AI.Vision.Face/tests/Generated/Samples/Samples_FaceClient.cs b/sdk/face/Azure.AI.Vision.Face/tests/Generated/Samples/Samples_FaceClient.cs index 0e9369d88787..eb2118560eaf 100644 --- a/sdk/face/Azure.AI.Vision.Face/tests/Generated/Samples/Samples_FaceClient.cs +++ b/sdk/face/Azure.AI.Vision.Face/tests/Generated/Samples/Samples_FaceClient.cs @@ -230,5 +230,207 @@ public async Task Example_FaceClient_Group_GroupFaceIDs_Convenience_Async() Response response = await client.GroupAsync(new Guid[] { Guid.Parse("c5c24a82-6845-4031-9d5d-978df9175426"), Guid.Parse("015839fb-fbd9-4f79-ace9-7675fc2f1dd9"), Guid.Parse("65d083d4-9447-47d1-af30-b626144bf0fb"), Guid.Parse("fce92aed-d578-4d2e-8114-068f8af4492e"), Guid.Parse("30ea1073-cc9e-4652-b1e3-d08fb7b95315"), Guid.Parse("be386ab3-af91-4104-9e6d-4dae4c9fddb7"), Guid.Parse("fbd2a038-dbff-452c-8e79-2ee81b1aa84e"), Guid.Parse("b64d5e15-8257-4af2-b20a-5a750f8940e7") }); } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_FaceClient_FindSimilarFromLargeFaceList_FindSimilarFromLargeFaceList() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + FaceClient client = new FaceClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + faceId = "c5c24a82-6845-4031-9d5d-978df9175426", + maxNumOfCandidatesReturned = 3, + mode = "matchPerson", + largeFaceListId = "your_large_face_list_id", + }); + Response response = client.FindSimilarFromLargeFaceList(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result[0].GetProperty("confidence").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_FaceClient_FindSimilarFromLargeFaceList_FindSimilarFromLargeFaceList_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + FaceClient client = new FaceClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + faceId = "c5c24a82-6845-4031-9d5d-978df9175426", + maxNumOfCandidatesReturned = 3, + mode = "matchPerson", + largeFaceListId = "your_large_face_list_id", + }); + Response response = await client.FindSimilarFromLargeFaceListAsync(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result[0].GetProperty("confidence").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_FaceClient_FindSimilarFromLargeFaceList_FindSimilarFromLargeFaceList_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + FaceClient client = new FaceClient(endpoint, credential); + + Response> response = client.FindSimilarFromLargeFaceList(Guid.Parse("c5c24a82-6845-4031-9d5d-978df9175426"), "your_large_face_list_id"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_FaceClient_FindSimilarFromLargeFaceList_FindSimilarFromLargeFaceList_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + FaceClient client = new FaceClient(endpoint, credential); + + Response> response = await client.FindSimilarFromLargeFaceListAsync(Guid.Parse("c5c24a82-6845-4031-9d5d-978df9175426"), "your_large_face_list_id"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_FaceClient_IdentifyFromLargePersonGroup_IdentifyFromLargePersonGroup() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + FaceClient client = new FaceClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + faceIds = new object[] + { +"c5c24a82-6845-4031-9d5d-978df9175426" + }, + largePersonGroupId = "your_large_person_group_id", + maxNumOfCandidatesReturned = 9, + confidenceThreshold = 0.7F, + }); + Response response = client.IdentifyFromLargePersonGroup(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result[0].GetProperty("faceId").ToString()); + Console.WriteLine(result[0].GetProperty("candidates")[0].GetProperty("personId").ToString()); + Console.WriteLine(result[0].GetProperty("candidates")[0].GetProperty("confidence").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_FaceClient_IdentifyFromLargePersonGroup_IdentifyFromLargePersonGroup_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + FaceClient client = new FaceClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + faceIds = new object[] + { +"c5c24a82-6845-4031-9d5d-978df9175426" + }, + largePersonGroupId = "your_large_person_group_id", + maxNumOfCandidatesReturned = 9, + confidenceThreshold = 0.7F, + }); + Response response = await client.IdentifyFromLargePersonGroupAsync(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result[0].GetProperty("faceId").ToString()); + Console.WriteLine(result[0].GetProperty("candidates")[0].GetProperty("personId").ToString()); + Console.WriteLine(result[0].GetProperty("candidates")[0].GetProperty("confidence").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_FaceClient_IdentifyFromLargePersonGroup_IdentifyFromLargePersonGroup_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + FaceClient client = new FaceClient(endpoint, credential); + + Response> response = client.IdentifyFromLargePersonGroup(new Guid[] { Guid.Parse("c5c24a82-6845-4031-9d5d-978df9175426") }, "your_large_person_group_id"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_FaceClient_IdentifyFromLargePersonGroup_IdentifyFromLargePersonGroup_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + FaceClient client = new FaceClient(endpoint, credential); + + Response> response = await client.IdentifyFromLargePersonGroupAsync(new Guid[] { Guid.Parse("c5c24a82-6845-4031-9d5d-978df9175426") }, "your_large_person_group_id"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_FaceClient_VerifyFromLargePersonGroup_VerifyFromLargePersonGroup() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + FaceClient client = new FaceClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + faceId = "c5c24a82-6845-4031-9d5d-978df9175426", + personId = "815df99c-598f-4926-930a-a734b3fd651c", + largePersonGroupId = "your_large_person_group", + }); + Response response = client.VerifyFromLargePersonGroup(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("isIdentical").ToString()); + Console.WriteLine(result.GetProperty("confidence").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_FaceClient_VerifyFromLargePersonGroup_VerifyFromLargePersonGroup_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + FaceClient client = new FaceClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + faceId = "c5c24a82-6845-4031-9d5d-978df9175426", + personId = "815df99c-598f-4926-930a-a734b3fd651c", + largePersonGroupId = "your_large_person_group", + }); + Response response = await client.VerifyFromLargePersonGroupAsync(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("isIdentical").ToString()); + Console.WriteLine(result.GetProperty("confidence").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_FaceClient_VerifyFromLargePersonGroup_VerifyFromLargePersonGroup_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + FaceClient client = new FaceClient(endpoint, credential); + + Response response = client.VerifyFromLargePersonGroup(Guid.Parse("c5c24a82-6845-4031-9d5d-978df9175426"), "your_large_person_group", Guid.Parse("815df99c-598f-4926-930a-a734b3fd651c")); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_FaceClient_VerifyFromLargePersonGroup_VerifyFromLargePersonGroup_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + FaceClient client = new FaceClient(endpoint, credential); + + Response response = await client.VerifyFromLargePersonGroupAsync(Guid.Parse("c5c24a82-6845-4031-9d5d-978df9175426"), "your_large_person_group", Guid.Parse("815df99c-598f-4926-930a-a734b3fd651c")); + } } } diff --git a/sdk/face/Azure.AI.Vision.Face/tests/Generated/Samples/Samples_FaceSessionClient.cs b/sdk/face/Azure.AI.Vision.Face/tests/Generated/Samples/Samples_FaceSessionClient.cs index 533e4ac10132..b793cf92c5e9 100644 --- a/sdk/face/Azure.AI.Vision.Face/tests/Generated/Samples/Samples_FaceSessionClient.cs +++ b/sdk/face/Azure.AI.Vision.Face/tests/Generated/Samples/Samples_FaceSessionClient.cs @@ -514,5 +514,119 @@ public async Task Example_FaceSessionClient_GetLivenessWithVerifySessionAuditEnt Response> response = await client.GetLivenessWithVerifySessionAuditEntriesAsync("b12e033e-bda7-4b83-a211-e721c661f30e"); } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_FaceSessionClient_DetectFromSessionImage_DetectFromSessionImageId() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + FaceSessionClient client = new FaceSessionClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + sessionImageId = "aa93ce80-9a9b-48bd-ae1a-1c7543841e92", + }); + Response response = client.DetectFromSessionImage(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result[0].GetProperty("faceRectangle").GetProperty("top").ToString()); + Console.WriteLine(result[0].GetProperty("faceRectangle").GetProperty("left").ToString()); + Console.WriteLine(result[0].GetProperty("faceRectangle").GetProperty("width").ToString()); + Console.WriteLine(result[0].GetProperty("faceRectangle").GetProperty("height").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_FaceSessionClient_DetectFromSessionImage_DetectFromSessionImageId_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + FaceSessionClient client = new FaceSessionClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + sessionImageId = "aa93ce80-9a9b-48bd-ae1a-1c7543841e92", + }); + Response response = await client.DetectFromSessionImageAsync(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result[0].GetProperty("faceRectangle").GetProperty("top").ToString()); + Console.WriteLine(result[0].GetProperty("faceRectangle").GetProperty("left").ToString()); + Console.WriteLine(result[0].GetProperty("faceRectangle").GetProperty("width").ToString()); + Console.WriteLine(result[0].GetProperty("faceRectangle").GetProperty("height").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_FaceSessionClient_DetectFromSessionImage_DetectFromSessionImageId_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + FaceSessionClient client = new FaceSessionClient(endpoint, credential); + + Response> response = client.DetectFromSessionImage("aa93ce80-9a9b-48bd-ae1a-1c7543841e92"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_FaceSessionClient_DetectFromSessionImage_DetectFromSessionImageId_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + FaceSessionClient client = new FaceSessionClient(endpoint, credential); + + Response> response = await client.DetectFromSessionImageAsync("aa93ce80-9a9b-48bd-ae1a-1c7543841e92"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_FaceSessionClient_GetSessionImage_GetSessionImage() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + FaceSessionClient client = new FaceSessionClient(endpoint, credential); + + Response response = client.GetSessionImage("3d035d35-2e01-4ed4-8935-577afde9caaa", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_FaceSessionClient_GetSessionImage_GetSessionImage_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + FaceSessionClient client = new FaceSessionClient(endpoint, credential); + + Response response = await client.GetSessionImageAsync("3d035d35-2e01-4ed4-8935-577afde9caaa", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_FaceSessionClient_GetSessionImage_GetSessionImage_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + FaceSessionClient client = new FaceSessionClient(endpoint, credential); + + Response response = client.GetSessionImage("3d035d35-2e01-4ed4-8935-577afde9caaa"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_FaceSessionClient_GetSessionImage_GetSessionImage_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + FaceSessionClient client = new FaceSessionClient(endpoint, credential); + + Response response = await client.GetSessionImageAsync("3d035d35-2e01-4ed4-8935-577afde9caaa"); + } } } diff --git a/sdk/face/Azure.AI.Vision.Face/tests/Generated/Samples/Samples_LargeFaceListClient.cs b/sdk/face/Azure.AI.Vision.Face/tests/Generated/Samples/Samples_LargeFaceListClient.cs new file mode 100644 index 000000000000..f08bb21a79c9 --- /dev/null +++ b/sdk/face/Azure.AI.Vision.Face/tests/Generated/Samples/Samples_LargeFaceListClient.cs @@ -0,0 +1,484 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using NUnit.Framework; + +namespace Azure.AI.Vision.Face.Samples +{ + public partial class Samples_LargeFaceListClient + { + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_LargeFaceList_Create_CreateLargeFaceList() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + LargeFaceListClient client = new FaceAdministrationClient(endpoint, credential).GetLargeFaceListClient("your_large_face_list_id"); + + using RequestContent content = RequestContent.Create(new + { + name = "your_large_face_list_name", + userData = "your_user_data", + recognitionModel = "recognition_01", + }); + Response response = client.Create(content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_LargeFaceList_Create_CreateLargeFaceList_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + LargeFaceListClient client = new FaceAdministrationClient(endpoint, credential).GetLargeFaceListClient("your_large_face_list_id"); + + using RequestContent content = RequestContent.Create(new + { + name = "your_large_face_list_name", + userData = "your_user_data", + recognitionModel = "recognition_01", + }); + Response response = await client.CreateAsync(content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_LargeFaceList_Create_CreateLargeFaceList_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + LargeFaceListClient client = new FaceAdministrationClient(endpoint, credential).GetLargeFaceListClient("your_large_face_list_id"); + + Response response = client.Create("your_large_face_list_name"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_LargeFaceList_Create_CreateLargeFaceList_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + LargeFaceListClient client = new FaceAdministrationClient(endpoint, credential).GetLargeFaceListClient("your_large_face_list_id"); + + Response response = await client.CreateAsync("your_large_face_list_name"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_LargeFaceList_Delete_DeleteLargeFaceList() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + LargeFaceListClient client = new FaceAdministrationClient(endpoint, credential).GetLargeFaceListClient("your_large_face_list_id"); + + Response response = client.Delete(); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_LargeFaceList_Delete_DeleteLargeFaceList_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + LargeFaceListClient client = new FaceAdministrationClient(endpoint, credential).GetLargeFaceListClient("your_large_face_list_id"); + + Response response = await client.DeleteAsync(); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_LargeFaceList_GetLargeFaceList_GetLargeFaceList() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + LargeFaceListClient client = new FaceAdministrationClient(endpoint, credential).GetLargeFaceListClient("your_large_face_list_id"); + + Response response = client.GetLargeFaceList(true, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("largeFaceListId").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_LargeFaceList_GetLargeFaceList_GetLargeFaceList_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + LargeFaceListClient client = new FaceAdministrationClient(endpoint, credential).GetLargeFaceListClient("your_large_face_list_id"); + + Response response = await client.GetLargeFaceListAsync(true, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("largeFaceListId").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_LargeFaceList_GetLargeFaceList_GetLargeFaceList_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + LargeFaceListClient client = new FaceAdministrationClient(endpoint, credential).GetLargeFaceListClient("your_large_face_list_id"); + + Response response = client.GetLargeFaceList(); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_LargeFaceList_GetLargeFaceList_GetLargeFaceList_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + LargeFaceListClient client = new FaceAdministrationClient(endpoint, credential).GetLargeFaceListClient("your_large_face_list_id"); + + Response response = await client.GetLargeFaceListAsync(); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_LargeFaceList_Update_UpdateLargeFaceList() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + LargeFaceListClient client = new FaceAdministrationClient(endpoint, credential).GetLargeFaceListClient("your_large_face_list_id"); + + using RequestContent content = RequestContent.Create(new + { + name = "your_large_face_list_name", + userData = "your_user_data", + }); + Response response = client.Update(content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_LargeFaceList_Update_UpdateLargeFaceList_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + LargeFaceListClient client = new FaceAdministrationClient(endpoint, credential).GetLargeFaceListClient("your_large_face_list_id"); + + using RequestContent content = RequestContent.Create(new + { + name = "your_large_face_list_name", + userData = "your_user_data", + }); + Response response = await client.UpdateAsync(content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_LargeFaceList_GetLargeFaceLists_GetLargeFaceLists() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + LargeFaceListClient client = new FaceAdministrationClient(endpoint, credential).GetLargeFaceListClient(null); + + Response response = client.GetLargeFaceLists("my_list_id", 20, true, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("largeFaceListId").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_LargeFaceList_GetLargeFaceLists_GetLargeFaceLists_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + LargeFaceListClient client = new FaceAdministrationClient(endpoint, credential).GetLargeFaceListClient(null); + + Response response = await client.GetLargeFaceListsAsync("my_list_id", 20, true, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("largeFaceListId").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_LargeFaceList_GetLargeFaceLists_GetLargeFaceLists_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + LargeFaceListClient client = new FaceAdministrationClient(endpoint, credential).GetLargeFaceListClient(null); + + Response> response = client.GetLargeFaceLists(); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_LargeFaceList_GetLargeFaceLists_GetLargeFaceLists_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + LargeFaceListClient client = new FaceAdministrationClient(endpoint, credential).GetLargeFaceListClient(null); + + Response> response = await client.GetLargeFaceListsAsync(); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_LargeFaceList_GetTrainingStatus_GetTrainingStatusOfLargeFaceList() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + LargeFaceListClient client = new FaceAdministrationClient(endpoint, credential).GetLargeFaceListClient("your_large_face_list_id"); + + Response response = client.GetTrainingStatus(null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastSuccessfulTrainingDateTime").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_LargeFaceList_GetTrainingStatus_GetTrainingStatusOfLargeFaceList_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + LargeFaceListClient client = new FaceAdministrationClient(endpoint, credential).GetLargeFaceListClient("your_large_face_list_id"); + + Response response = await client.GetTrainingStatusAsync(null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastSuccessfulTrainingDateTime").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_LargeFaceList_GetTrainingStatus_GetTrainingStatusOfLargeFaceList_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + LargeFaceListClient client = new FaceAdministrationClient(endpoint, credential).GetLargeFaceListClient("your_large_face_list_id"); + + Response response = client.GetTrainingStatus(); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_LargeFaceList_GetTrainingStatus_GetTrainingStatusOfLargeFaceList_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + LargeFaceListClient client = new FaceAdministrationClient(endpoint, credential).GetLargeFaceListClient("your_large_face_list_id"); + + Response response = await client.GetTrainingStatusAsync(); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_LargeFaceListFace_DeleteFace_DeleteFaceFromLargeFaceList() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + LargeFaceListClient client = new FaceAdministrationClient(endpoint, credential).GetLargeFaceListClient("your_large_face_list_id"); + + Response response = client.DeleteFace(Guid.Parse("43897a75-8d6f-42cf-885e-74832febb055")); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_LargeFaceListFace_DeleteFace_DeleteFaceFromLargeFaceList_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + LargeFaceListClient client = new FaceAdministrationClient(endpoint, credential).GetLargeFaceListClient("your_large_face_list_id"); + + Response response = await client.DeleteFaceAsync(Guid.Parse("43897a75-8d6f-42cf-885e-74832febb055")); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_LargeFaceListFace_GetFace_GetFaceFromLargeFaceList() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + LargeFaceListClient client = new FaceAdministrationClient(endpoint, credential).GetLargeFaceListClient("your_large_face_list_id"); + + Response response = client.GetFace(Guid.Parse("43897a75-8d6f-42cf-885e-74832febb055"), null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("persistedFaceId").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_LargeFaceListFace_GetFace_GetFaceFromLargeFaceList_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + LargeFaceListClient client = new FaceAdministrationClient(endpoint, credential).GetLargeFaceListClient("your_large_face_list_id"); + + Response response = await client.GetFaceAsync(Guid.Parse("43897a75-8d6f-42cf-885e-74832febb055"), null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("persistedFaceId").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_LargeFaceListFace_GetFace_GetFaceFromLargeFaceList_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + LargeFaceListClient client = new FaceAdministrationClient(endpoint, credential).GetLargeFaceListClient("your_large_face_list_id"); + + Response response = client.GetFace(Guid.Parse("43897a75-8d6f-42cf-885e-74832febb055")); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_LargeFaceListFace_GetFace_GetFaceFromLargeFaceList_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + LargeFaceListClient client = new FaceAdministrationClient(endpoint, credential).GetLargeFaceListClient("your_large_face_list_id"); + + Response response = await client.GetFaceAsync(Guid.Parse("43897a75-8d6f-42cf-885e-74832febb055")); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_LargeFaceListFace_UpdateFace_UpdateFaceInLargeFaceList() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + LargeFaceListClient client = new FaceAdministrationClient(endpoint, credential).GetLargeFaceListClient("your_large_face_list_id"); + + using RequestContent content = RequestContent.Create(new + { + userData = "your_user_data", + }); + Response response = client.UpdateFace(Guid.Parse("43897a75-8d6f-42cf-885e-74832febb055"), content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_LargeFaceListFace_UpdateFace_UpdateFaceInLargeFaceList_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + LargeFaceListClient client = new FaceAdministrationClient(endpoint, credential).GetLargeFaceListClient("your_large_face_list_id"); + + using RequestContent content = RequestContent.Create(new + { + userData = "your_user_data", + }); + Response response = await client.UpdateFaceAsync(Guid.Parse("43897a75-8d6f-42cf-885e-74832febb055"), content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_LargeFaceListFace_GetFaces_GetFacesFromLargeFaceList() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + LargeFaceListClient client = new FaceAdministrationClient(endpoint, credential).GetLargeFaceListClient("your_large_face_list_id"); + + Response response = client.GetFaces("00000000-0000-0000-0000-000000000000", 20, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result[0].GetProperty("persistedFaceId").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_LargeFaceListFace_GetFaces_GetFacesFromLargeFaceList_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + LargeFaceListClient client = new FaceAdministrationClient(endpoint, credential).GetLargeFaceListClient("your_large_face_list_id"); + + Response response = await client.GetFacesAsync("00000000-0000-0000-0000-000000000000", 20, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result[0].GetProperty("persistedFaceId").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_LargeFaceListFace_GetFaces_GetFacesFromLargeFaceList_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + LargeFaceListClient client = new FaceAdministrationClient(endpoint, credential).GetLargeFaceListClient("your_large_face_list_id"); + + Response> response = client.GetFaces(); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_LargeFaceListFace_GetFaces_GetFacesFromLargeFaceList_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + LargeFaceListClient client = new FaceAdministrationClient(endpoint, credential).GetLargeFaceListClient("your_large_face_list_id"); + + Response> response = await client.GetFacesAsync(); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_LargeFaceList_Train_TrainLargeFaceList() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + LargeFaceListClient client = new FaceAdministrationClient(endpoint, credential).GetLargeFaceListClient("your_large_face_list_id"); + + Operation operation = client.Train(WaitUntil.Completed); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_LargeFaceList_Train_TrainLargeFaceList_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + LargeFaceListClient client = new FaceAdministrationClient(endpoint, credential).GetLargeFaceListClient("your_large_face_list_id"); + + Operation operation = await client.TrainAsync(WaitUntil.Completed); + } + } +} diff --git a/sdk/face/Azure.AI.Vision.Face/tests/Generated/Samples/Samples_LargePersonGroupClient.cs b/sdk/face/Azure.AI.Vision.Face/tests/Generated/Samples/Samples_LargePersonGroupClient.cs new file mode 100644 index 000000000000..8d667ade83b4 --- /dev/null +++ b/sdk/face/Azure.AI.Vision.Face/tests/Generated/Samples/Samples_LargePersonGroupClient.cs @@ -0,0 +1,660 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using NUnit.Framework; + +namespace Azure.AI.Vision.Face.Samples +{ + public partial class Samples_LargePersonGroupClient + { + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_LargePersonGroup_Create_CreateLargePersonGroup() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + LargePersonGroupClient client = new FaceAdministrationClient(endpoint, credential).GetLargePersonGroupClient("your_large_person_group_id"); + + using RequestContent content = RequestContent.Create(new + { + name = "your_large_person_group_name", + userData = "your_user_data", + recognitionModel = "recognition_01", + }); + Response response = client.Create(content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_LargePersonGroup_Create_CreateLargePersonGroup_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + LargePersonGroupClient client = new FaceAdministrationClient(endpoint, credential).GetLargePersonGroupClient("your_large_person_group_id"); + + using RequestContent content = RequestContent.Create(new + { + name = "your_large_person_group_name", + userData = "your_user_data", + recognitionModel = "recognition_01", + }); + Response response = await client.CreateAsync(content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_LargePersonGroup_Create_CreateLargePersonGroup_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + LargePersonGroupClient client = new FaceAdministrationClient(endpoint, credential).GetLargePersonGroupClient("your_large_person_group_id"); + + Response response = client.Create("your_large_person_group_name"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_LargePersonGroup_Create_CreateLargePersonGroup_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + LargePersonGroupClient client = new FaceAdministrationClient(endpoint, credential).GetLargePersonGroupClient("your_large_person_group_id"); + + Response response = await client.CreateAsync("your_large_person_group_name"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_LargePersonGroup_Delete_DeleteLargePersonGroup() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + LargePersonGroupClient client = new FaceAdministrationClient(endpoint, credential).GetLargePersonGroupClient("your_large_person_group_id"); + + Response response = client.Delete(); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_LargePersonGroup_Delete_DeleteLargePersonGroup_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + LargePersonGroupClient client = new FaceAdministrationClient(endpoint, credential).GetLargePersonGroupClient("your_large_person_group_id"); + + Response response = await client.DeleteAsync(); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_LargePersonGroup_GetLargePersonGroup_GetLargePersonGroup() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + LargePersonGroupClient client = new FaceAdministrationClient(endpoint, credential).GetLargePersonGroupClient("your_large_person_group_id"); + + Response response = client.GetLargePersonGroup(true, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("largePersonGroupId").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_LargePersonGroup_GetLargePersonGroup_GetLargePersonGroup_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + LargePersonGroupClient client = new FaceAdministrationClient(endpoint, credential).GetLargePersonGroupClient("your_large_person_group_id"); + + Response response = await client.GetLargePersonGroupAsync(true, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("largePersonGroupId").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_LargePersonGroup_GetLargePersonGroup_GetLargePersonGroup_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + LargePersonGroupClient client = new FaceAdministrationClient(endpoint, credential).GetLargePersonGroupClient("your_large_person_group_id"); + + Response response = client.GetLargePersonGroup(); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_LargePersonGroup_GetLargePersonGroup_GetLargePersonGroup_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + LargePersonGroupClient client = new FaceAdministrationClient(endpoint, credential).GetLargePersonGroupClient("your_large_person_group_id"); + + Response response = await client.GetLargePersonGroupAsync(); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_LargePersonGroup_Update_UpdateLargePersonGroup() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + LargePersonGroupClient client = new FaceAdministrationClient(endpoint, credential).GetLargePersonGroupClient("your_large_person_group_id"); + + using RequestContent content = RequestContent.Create(new + { + name = "your_large_person_group_name", + userData = "your_user_data", + }); + Response response = client.Update(content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_LargePersonGroup_Update_UpdateLargePersonGroup_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + LargePersonGroupClient client = new FaceAdministrationClient(endpoint, credential).GetLargePersonGroupClient("your_large_person_group_id"); + + using RequestContent content = RequestContent.Create(new + { + name = "your_large_person_group_name", + userData = "your_user_data", + }); + Response response = await client.UpdateAsync(content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_LargePersonGroup_GetLargePersonGroups_GetLargePersonGroups() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + LargePersonGroupClient client = new FaceAdministrationClient(endpoint, credential).GetLargePersonGroupClient(null); + + Response response = client.GetLargePersonGroups("00000000-0000-0000-0000-000000000000", 20, true, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("largePersonGroupId").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_LargePersonGroup_GetLargePersonGroups_GetLargePersonGroups_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + LargePersonGroupClient client = new FaceAdministrationClient(endpoint, credential).GetLargePersonGroupClient(null); + + Response response = await client.GetLargePersonGroupsAsync("00000000-0000-0000-0000-000000000000", 20, true, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("largePersonGroupId").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_LargePersonGroup_GetLargePersonGroups_GetLargePersonGroups_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + LargePersonGroupClient client = new FaceAdministrationClient(endpoint, credential).GetLargePersonGroupClient(null); + + Response> response = client.GetLargePersonGroups(); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_LargePersonGroup_GetLargePersonGroups_GetLargePersonGroups_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + LargePersonGroupClient client = new FaceAdministrationClient(endpoint, credential).GetLargePersonGroupClient(null); + + Response> response = await client.GetLargePersonGroupsAsync(); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_LargePersonGroup_GetTrainingStatus_GetTrainingStatusOfLargePersonGroup() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + LargePersonGroupClient client = new FaceAdministrationClient(endpoint, credential).GetLargePersonGroupClient("your_large_person_group_id"); + + Response response = client.GetTrainingStatus(null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastSuccessfulTrainingDateTime").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_LargePersonGroup_GetTrainingStatus_GetTrainingStatusOfLargePersonGroup_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + LargePersonGroupClient client = new FaceAdministrationClient(endpoint, credential).GetLargePersonGroupClient("your_large_person_group_id"); + + Response response = await client.GetTrainingStatusAsync(null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastSuccessfulTrainingDateTime").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_LargePersonGroup_GetTrainingStatus_GetTrainingStatusOfLargePersonGroup_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + LargePersonGroupClient client = new FaceAdministrationClient(endpoint, credential).GetLargePersonGroupClient("your_large_person_group_id"); + + Response response = client.GetTrainingStatus(); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_LargePersonGroup_GetTrainingStatus_GetTrainingStatusOfLargePersonGroup_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + LargePersonGroupClient client = new FaceAdministrationClient(endpoint, credential).GetLargePersonGroupClient("your_large_person_group_id"); + + Response response = await client.GetTrainingStatusAsync(); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_LargePersonGroupPerson_CreatePerson_CreatePersonInLargePersonGroup() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + LargePersonGroupClient client = new FaceAdministrationClient(endpoint, credential).GetLargePersonGroupClient("your_large_person_group_id"); + + using RequestContent content = RequestContent.Create(new + { + name = "your_large_person_group_person_name", + userData = "your_user_data", + }); + Response response = client.CreatePerson(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("personId").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_LargePersonGroupPerson_CreatePerson_CreatePersonInLargePersonGroup_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + LargePersonGroupClient client = new FaceAdministrationClient(endpoint, credential).GetLargePersonGroupClient("your_large_person_group_id"); + + using RequestContent content = RequestContent.Create(new + { + name = "your_large_person_group_person_name", + userData = "your_user_data", + }); + Response response = await client.CreatePersonAsync(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("personId").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_LargePersonGroupPerson_CreatePerson_CreatePersonInLargePersonGroup_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + LargePersonGroupClient client = new FaceAdministrationClient(endpoint, credential).GetLargePersonGroupClient("your_large_person_group_id"); + + Response response = client.CreatePerson("your_large_person_group_person_name"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_LargePersonGroupPerson_CreatePerson_CreatePersonInLargePersonGroup_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + LargePersonGroupClient client = new FaceAdministrationClient(endpoint, credential).GetLargePersonGroupClient("your_large_person_group_id"); + + Response response = await client.CreatePersonAsync("your_large_person_group_person_name"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_LargePersonGroupPerson_DeletePerson_DeletePersonFromLargePersonGroup() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + LargePersonGroupClient client = new FaceAdministrationClient(endpoint, credential).GetLargePersonGroupClient("your_large_person_group_id"); + + Response response = client.DeletePerson(Guid.Parse("25985303-c537-4467-b41d-bdb45cd95ca1")); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_LargePersonGroupPerson_DeletePerson_DeletePersonFromLargePersonGroup_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + LargePersonGroupClient client = new FaceAdministrationClient(endpoint, credential).GetLargePersonGroupClient("your_large_person_group_id"); + + Response response = await client.DeletePersonAsync(Guid.Parse("25985303-c537-4467-b41d-bdb45cd95ca1")); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_LargePersonGroupPerson_GetPerson_GetPersonFromLargePersonGroup() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + LargePersonGroupClient client = new FaceAdministrationClient(endpoint, credential).GetLargePersonGroupClient("your_large_person_group_id"); + + Response response = client.GetPerson(Guid.Parse("25985303-c537-4467-b41d-bdb45cd95ca1"), null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("personId").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_LargePersonGroupPerson_GetPerson_GetPersonFromLargePersonGroup_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + LargePersonGroupClient client = new FaceAdministrationClient(endpoint, credential).GetLargePersonGroupClient("your_large_person_group_id"); + + Response response = await client.GetPersonAsync(Guid.Parse("25985303-c537-4467-b41d-bdb45cd95ca1"), null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("personId").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_LargePersonGroupPerson_GetPerson_GetPersonFromLargePersonGroup_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + LargePersonGroupClient client = new FaceAdministrationClient(endpoint, credential).GetLargePersonGroupClient("your_large_person_group_id"); + + Response response = client.GetPerson(Guid.Parse("25985303-c537-4467-b41d-bdb45cd95ca1")); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_LargePersonGroupPerson_GetPerson_GetPersonFromLargePersonGroup_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + LargePersonGroupClient client = new FaceAdministrationClient(endpoint, credential).GetLargePersonGroupClient("your_large_person_group_id"); + + Response response = await client.GetPersonAsync(Guid.Parse("25985303-c537-4467-b41d-bdb45cd95ca1")); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_LargePersonGroupPerson_UpdatePerson_UpdatePersonInLargePersonGroup() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + LargePersonGroupClient client = new FaceAdministrationClient(endpoint, credential).GetLargePersonGroupClient("your_large_person_group_id"); + + using RequestContent content = RequestContent.Create(new + { + name = "your_large_person_group_person_name", + userData = "your_user_data", + }); + Response response = client.UpdatePerson(Guid.Parse("25985303-c537-4467-b41d-bdb45cd95ca1"), content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_LargePersonGroupPerson_UpdatePerson_UpdatePersonInLargePersonGroup_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + LargePersonGroupClient client = new FaceAdministrationClient(endpoint, credential).GetLargePersonGroupClient("your_large_person_group_id"); + + using RequestContent content = RequestContent.Create(new + { + name = "your_large_person_group_person_name", + userData = "your_user_data", + }); + Response response = await client.UpdatePersonAsync(Guid.Parse("25985303-c537-4467-b41d-bdb45cd95ca1"), content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_LargePersonGroupPerson_GetPersons_GetPersonsFromLargePersonGroup() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + LargePersonGroupClient client = new FaceAdministrationClient(endpoint, credential).GetLargePersonGroupClient("your_large_person_group_id"); + + Response response = client.GetPersons("00000000-0000-0000-0000-000000000000", 20, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result[0].GetProperty("personId").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_LargePersonGroupPerson_GetPersons_GetPersonsFromLargePersonGroup_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + LargePersonGroupClient client = new FaceAdministrationClient(endpoint, credential).GetLargePersonGroupClient("your_large_person_group_id"); + + Response response = await client.GetPersonsAsync("00000000-0000-0000-0000-000000000000", 20, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result[0].GetProperty("personId").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_LargePersonGroupPerson_GetPersons_GetPersonsFromLargePersonGroup_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + LargePersonGroupClient client = new FaceAdministrationClient(endpoint, credential).GetLargePersonGroupClient("your_large_person_group_id"); + + Response> response = client.GetPersons(); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_LargePersonGroupPerson_GetPersons_GetPersonsFromLargePersonGroup_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + LargePersonGroupClient client = new FaceAdministrationClient(endpoint, credential).GetLargePersonGroupClient("your_large_person_group_id"); + + Response> response = await client.GetPersonsAsync(); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_LargePersonGroupPersonFace_DeleteFace_DeleteFaceFromLargePersonGroupPerson() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + LargePersonGroupClient client = new FaceAdministrationClient(endpoint, credential).GetLargePersonGroupClient("your_large_person_group_id"); + + Response response = client.DeleteFace(Guid.Parse("25985303-c537-4467-b41d-bdb45cd95ca1"), Guid.Parse("43897a75-8d6f-42cf-885e-74832febb055")); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_LargePersonGroupPersonFace_DeleteFace_DeleteFaceFromLargePersonGroupPerson_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + LargePersonGroupClient client = new FaceAdministrationClient(endpoint, credential).GetLargePersonGroupClient("your_large_person_group_id"); + + Response response = await client.DeleteFaceAsync(Guid.Parse("25985303-c537-4467-b41d-bdb45cd95ca1"), Guid.Parse("43897a75-8d6f-42cf-885e-74832febb055")); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_LargePersonGroupPersonFace_GetFace_GetFaceFromLargePersonGroupPerson() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + LargePersonGroupClient client = new FaceAdministrationClient(endpoint, credential).GetLargePersonGroupClient("your_large_person_group_id"); + + Response response = client.GetFace(Guid.Parse("25985303-c537-4467-b41d-bdb45cd95ca1"), Guid.Parse("43897a75-8d6f-42cf-885e-74832febb055"), null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("persistedFaceId").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_LargePersonGroupPersonFace_GetFace_GetFaceFromLargePersonGroupPerson_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + LargePersonGroupClient client = new FaceAdministrationClient(endpoint, credential).GetLargePersonGroupClient("your_large_person_group_id"); + + Response response = await client.GetFaceAsync(Guid.Parse("25985303-c537-4467-b41d-bdb45cd95ca1"), Guid.Parse("43897a75-8d6f-42cf-885e-74832febb055"), null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("persistedFaceId").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_LargePersonGroupPersonFace_GetFace_GetFaceFromLargePersonGroupPerson_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + LargePersonGroupClient client = new FaceAdministrationClient(endpoint, credential).GetLargePersonGroupClient("your_large_person_group_id"); + + Response response = client.GetFace(Guid.Parse("25985303-c537-4467-b41d-bdb45cd95ca1"), Guid.Parse("43897a75-8d6f-42cf-885e-74832febb055")); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_LargePersonGroupPersonFace_GetFace_GetFaceFromLargePersonGroupPerson_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + LargePersonGroupClient client = new FaceAdministrationClient(endpoint, credential).GetLargePersonGroupClient("your_large_person_group_id"); + + Response response = await client.GetFaceAsync(Guid.Parse("25985303-c537-4467-b41d-bdb45cd95ca1"), Guid.Parse("43897a75-8d6f-42cf-885e-74832febb055")); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_LargePersonGroupPersonFace_UpdateFace_UpdateFaceInLargePersonGroupPerson() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + LargePersonGroupClient client = new FaceAdministrationClient(endpoint, credential).GetLargePersonGroupClient("your_large_person_group_id"); + + using RequestContent content = RequestContent.Create(new + { + userData = "your_user_data", + }); + Response response = client.UpdateFace(Guid.Parse("25985303-c537-4467-b41d-bdb45cd95ca1"), Guid.Parse("43897a75-8d6f-42cf-885e-74832febb055"), content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_LargePersonGroupPersonFace_UpdateFace_UpdateFaceInLargePersonGroupPerson_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + LargePersonGroupClient client = new FaceAdministrationClient(endpoint, credential).GetLargePersonGroupClient("your_large_person_group_id"); + + using RequestContent content = RequestContent.Create(new + { + userData = "your_user_data", + }); + Response response = await client.UpdateFaceAsync(Guid.Parse("25985303-c537-4467-b41d-bdb45cd95ca1"), Guid.Parse("43897a75-8d6f-42cf-885e-74832febb055"), content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_LargePersonGroup_Train_TrainLargePersonGroup() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + LargePersonGroupClient client = new FaceAdministrationClient(endpoint, credential).GetLargePersonGroupClient("your_large_person_group_id"); + + Operation operation = client.Train(WaitUntil.Completed); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_LargePersonGroup_Train_TrainLargePersonGroup_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + LargePersonGroupClient client = new FaceAdministrationClient(endpoint, credential).GetLargePersonGroupClient("your_large_person_group_id"); + + Operation operation = await client.TrainAsync(WaitUntil.Completed); + } + } +} diff --git a/sdk/face/Azure.AI.Vision.Face/tests/samples/FaceSamplesBase.cs b/sdk/face/Azure.AI.Vision.Face/tests/samples/FaceSamplesBase.cs index 96d8c24cc236..19f26b3ceb13 100644 --- a/sdk/face/Azure.AI.Vision.Face/tests/samples/FaceSamplesBase.cs +++ b/sdk/face/Azure.AI.Vision.Face/tests/samples/FaceSamplesBase.cs @@ -40,6 +40,34 @@ public FaceSessionClient CreateSessionClient() return sessionClient; } + public LargePersonGroupClient CreateLargePersonGroupClient(string id) + { + #region Snippet:CreateLargePersonGroupClient +#if SNIPPET + Uri endpoint = new Uri(""); +#else + var endpoint = TestEnvironment.GetUrlVariable("FACE_ENDPOINT"); +#endif + DefaultAzureCredential credential = new DefaultAzureCredential(); + var groupClient = new LargePersonGroupClient(endpoint, credential, id); + #endregion + return groupClient; + } + + public LargeFaceListClient CreateLargeFaceListClient(string id) + { + #region Snippet:CreateLargeFaceListClient +#if SNIPPET + Uri endpoint = new Uri(""); +#else + var endpoint = TestEnvironment.GetUrlVariable("FACE_ENDPOINT"); +#endif + DefaultAzureCredential credential = new DefaultAzureCredential(); + var listClient = new LargeFaceListClient(endpoint, credential, id); + #endregion + return listClient; + } + public FaceClient CreateClientWithKey() { #region Snippet:CreateFaceClientWithKey @@ -49,5 +77,16 @@ public FaceClient CreateClientWithKey() #endregion return client; } + + public FaceClient CreateClientWithSpecifyVersion() + { + #region Snippet:CreateFaceClientWithVersion + Uri endpoint = new Uri(""); + DefaultAzureCredential credential = new DefaultAzureCredential(); + AzureAIVisionFaceClientOptions options = new AzureAIVisionFaceClientOptions(AzureAIVisionFaceClientOptions.ServiceVersion.V1_2_Preview_1); + FaceClient client = new FaceClient(endpoint, credential, options); + #endregion + return client; + } } } diff --git a/sdk/face/Azure.AI.Vision.Face/tests/samples/Sample1_FaceDetection.cs b/sdk/face/Azure.AI.Vision.Face/tests/samples/Sample1_FaceDetection.cs index 86a53d0cdd9c..fcf0d41a4c3a 100644 --- a/sdk/face/Azure.AI.Vision.Face/tests/samples/Sample1_FaceDetection.cs +++ b/sdk/face/Azure.AI.Vision.Face/tests/samples/Sample1_FaceDetection.cs @@ -37,7 +37,7 @@ public void Detect() { Console.WriteLine($"Face Rectangle: left={detectedFace.FaceRectangle.Left}, top={detectedFace.FaceRectangle.Top}, width={detectedFace.FaceRectangle.Width}, height={detectedFace.FaceRectangle.Height}"); Console.WriteLine($"Head pose: pitch={detectedFace.FaceAttributes.HeadPose.Pitch}, roll={detectedFace.FaceAttributes.HeadPose.Roll}, yaw={detectedFace.FaceAttributes.HeadPose.Yaw}"); - Console.WriteLine($"Mask: {detectedFace.FaceAttributes.Mask}"); + Console.WriteLine($"Mask: NoseAndMouthCovered={detectedFace.FaceAttributes.Mask.NoseAndMouthCovered}, Type={detectedFace.FaceAttributes.Mask.Type}"); Console.WriteLine($"Quality: {detectedFace.FaceAttributes.QualityForRecognition}"); Console.WriteLine($"Recognition model: {detectedFace.RecognitionModel}"); Console.WriteLine($"Landmarks: "); diff --git a/sdk/face/Azure.AI.Vision.Face/tests/samples/Sample1_FaceDetectionAsync.cs b/sdk/face/Azure.AI.Vision.Face/tests/samples/Sample1_FaceDetectionAsync.cs index e3fb7b3e2356..5fd99ba02f32 100644 --- a/sdk/face/Azure.AI.Vision.Face/tests/samples/Sample1_FaceDetectionAsync.cs +++ b/sdk/face/Azure.AI.Vision.Face/tests/samples/Sample1_FaceDetectionAsync.cs @@ -37,7 +37,7 @@ public async Task DetectAsync() { Console.WriteLine($"Face Rectangle: left={detectedFace.FaceRectangle.Left}, top={detectedFace.FaceRectangle.Top}, width={detectedFace.FaceRectangle.Width}, height={detectedFace.FaceRectangle.Height}"); Console.WriteLine($"Head pose: pitch={detectedFace.FaceAttributes.HeadPose.Pitch}, roll={detectedFace.FaceAttributes.HeadPose.Roll}, yaw={detectedFace.FaceAttributes.HeadPose.Yaw}"); - Console.WriteLine($"Mask: {detectedFace.FaceAttributes.Mask}"); + Console.WriteLine($"Mask: NoseAndMouthCovered={detectedFace.FaceAttributes.Mask.NoseAndMouthCovered}, Type={detectedFace.FaceAttributes.Mask.Type}"); Console.WriteLine($"Quality: {detectedFace.FaceAttributes.QualityForRecognition}"); Console.WriteLine($"Recognition model: {detectedFace.RecognitionModel}"); Console.WriteLine($"Landmarks: "); diff --git a/sdk/face/Azure.AI.Vision.Face/tests/samples/Sample3_DetectLivenessWithVerifyWithSession.cs b/sdk/face/Azure.AI.Vision.Face/tests/samples/Sample3_DetectLivenessWithVerifyWithSession.cs index fbdf0e5ace8a..bdbfd2144031 100644 --- a/sdk/face/Azure.AI.Vision.Face/tests/samples/Sample3_DetectLivenessWithVerifyWithSession.cs +++ b/sdk/face/Azure.AI.Vision.Face/tests/samples/Sample3_DetectLivenessWithVerifyWithSession.cs @@ -20,7 +20,7 @@ public void CreateDetectLivenessWithVerifySession(bool deleteSession) var sessionClient = CreateSessionClient(); #region Snippet:CreateLivenessWithVerifySession - var parameters = new CreateLivenessSessionContent(LivenessOperationMode.Passive) { + var parameters = new CreateLivenessWithVerifySessionContent(LivenessOperationMode.Passive) { SendResultsToClient = true, DeviceCorrelationId = Guid.NewGuid().ToString(), }; diff --git a/sdk/face/Azure.AI.Vision.Face/tests/samples/Sample3_DetectLivenessWithVerifyWithSessionAsync.cs b/sdk/face/Azure.AI.Vision.Face/tests/samples/Sample3_DetectLivenessWithVerifyWithSessionAsync.cs index d9160dbd6b1e..39e220103bae 100644 --- a/sdk/face/Azure.AI.Vision.Face/tests/samples/Sample3_DetectLivenessWithVerifyWithSessionAsync.cs +++ b/sdk/face/Azure.AI.Vision.Face/tests/samples/Sample3_DetectLivenessWithVerifyWithSessionAsync.cs @@ -19,7 +19,7 @@ public async Task CreateDetectLivenessWithVerifySessionAsync(bool deleteSession) var sessionClient = CreateSessionClient(); #region Snippet:CreateLivenessWithVerifySessionAsync - var parameters = new CreateLivenessSessionContent(LivenessOperationMode.Passive) { + var parameters = new CreateLivenessWithVerifySessionContent(LivenessOperationMode.Passive) { SendResultsToClient = true, DeviceCorrelationId = Guid.NewGuid().ToString(), }; diff --git a/sdk/face/Azure.AI.Vision.Face/tests/samples/Sample4_StatelessFaceRecognition.cs b/sdk/face/Azure.AI.Vision.Face/tests/samples/Sample4_StatelessFaceRecognition.cs new file mode 100644 index 000000000000..7daf2a582619 --- /dev/null +++ b/sdk/face/Azure.AI.Vision.Face/tests/samples/Sample4_StatelessFaceRecognition.cs @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.AI.Vision.Face.Tests; +using Azure.Core.TestFramework; +using NUnit.Framework; + +namespace Azure.AI.Vision.Face.Samples +{ + public partial class Sample4_StatelessFaceRecognition : FaceSamplesBase + { + [Test] + public void Grouping() + { + var client = CreateClient(); + #region Snippet:Group + var targetImages = new (string, Uri)[] { + ("Group image", new Uri(FaceTestConstant.UrlIdentification1Image)), + ("Dad image 1", new Uri(FaceTestConstant.UrlFamily1Dad1Image)), + ("Dad image 2", new Uri(FaceTestConstant.UrlFamily1Dad2Image)), + ("Son image 1", new Uri(FaceTestConstant.UrlFamily1Son1Image)) + }; + var faceIds = new Dictionary(); + + foreach (var (imageName, targetImage) in targetImages) + { + var detectResponse = client.Detect(targetImage, FaceDetectionModel.Detection03, FaceRecognitionModel.Recognition04, true); + Console.WriteLine($"Detected {detectResponse.Value.Count} face(s) in the image '{imageName}'."); + foreach (var face in detectResponse.Value) + { + faceIds[face.FaceId.Value] = (face, imageName); + } + } + + var groupResponse = client.Group(faceIds.Keys); + var groups = groupResponse.Value; + + Console.WriteLine($"Found {groups.Groups.Count} group(s) in the target images."); + foreach (var group in groups.Groups) + { + Console.WriteLine($"Group: "); + foreach (var faceId in group) + { + Console.WriteLine($" {faceId} from '{faceIds[faceId].Item2}', face rectangle: {faceIds[faceId].Item1.FaceRectangle.Left}, {faceIds[faceId].Item1.FaceRectangle.Top}, {faceIds[faceId].Item1.FaceRectangle.Width}, {faceIds[faceId].Item1.FaceRectangle.Height}"); + } + } + + Console.WriteLine($"Found {groups.MessyGroup.Count} face(s) that are not in any group."); + foreach (var faceId in groups.MessyGroup) + { + Console.WriteLine($" {faceId} from '{faceIds[faceId].Item2}', face rectangle: {faceIds[faceId].Item1.FaceRectangle.Left}, {faceIds[faceId].Item1.FaceRectangle.Top}, {faceIds[faceId].Item1.FaceRectangle.Width}, {faceIds[faceId].Item1.FaceRectangle.Height}"); + } + #endregion + } + + [Test] + public void Verification() + { + var client = CreateClient(); + #region Snippet:VerifyFaceToFace + var data = new (string Name, Uri Uri)[] { + ("Dad image 1", new Uri(FaceTestConstant.UrlFamily1Dad1Image)), + ("Dad image 2", new Uri(FaceTestConstant.UrlFamily1Dad2Image)), + ("Son image 1", new Uri(FaceTestConstant.UrlFamily1Son1Image)) + }; + var faceIds = new List(); + + foreach (var tuple in data) + { + var detectResponse = client.Detect(tuple.Uri, FaceDetectionModel.Detection03, FaceRecognitionModel.Recognition04, true); + Console.WriteLine($"Detected {detectResponse.Value.Count} face(s) in the image '{tuple.Name}'."); + faceIds.Add(detectResponse.Value.Single().FaceId.Value); + } + + var verifyDad1Dad2Response = client.VerifyFaceToFace(faceIds[0], faceIds[1]); + Console.WriteLine($"Verification between Dad image 1 and Dad image 2: {verifyDad1Dad2Response.Value.Confidence}"); + Console.WriteLine($"Is the same person: {verifyDad1Dad2Response.Value.IsIdentical}"); + + var verifyDad1SonResponse = client.VerifyFaceToFace(faceIds[0], faceIds[2]); + Console.WriteLine($"Verification between Dad image 1 and Son image 1: {verifyDad1SonResponse.Value.Confidence}"); + Console.WriteLine($"Is the same person: {verifyDad1SonResponse.Value.IsIdentical}"); + #endregion + } + + [Test] + public void FindSimilar() + { + var client = CreateClient(); + #region Snippet:FindSimilar + var dadImage = new Uri(FaceTestConstant.UrlFamily1Dad1Image); + var detectDadResponse = client.Detect(dadImage, FaceDetectionModel.Detection03, FaceRecognitionModel.Recognition04, true); + Console.WriteLine($"Detected {detectDadResponse.Value.Count} face(s) in the Dad image."); + var dadFaceId = detectDadResponse.Value.Single().FaceId.Value; + + var targetImage = new Uri(FaceTestConstant.UrlIdentification1Image); + var detectResponse = client.Detect(targetImage, FaceDetectionModel.Detection03, FaceRecognitionModel.Recognition04, true); + Console.WriteLine($"Detected {detectResponse.Value.Count} face(s) in the image."); + var faceIds = detectResponse.Value.Select(face => face.FaceId.Value); + + var response = client.FindSimilar(dadFaceId, faceIds); + var similarFaces = response.Value; + Console.WriteLine($"Found {similarFaces.Count} similar face(s) in the target image."); + foreach (var similarFace in similarFaces) + { + Console.WriteLine($"Face ID: {similarFace.FaceId}, confidence: {similarFace.Confidence}"); + } + #endregion + } + } +} diff --git a/sdk/face/Azure.AI.Vision.Face/tests/samples/Sample4_StatelessFaceRecognitionAsync.cs b/sdk/face/Azure.AI.Vision.Face/tests/samples/Sample4_StatelessFaceRecognitionAsync.cs new file mode 100644 index 000000000000..f32e0dfe5e77 --- /dev/null +++ b/sdk/face/Azure.AI.Vision.Face/tests/samples/Sample4_StatelessFaceRecognitionAsync.cs @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using Azure.AI.Vision.Face.Tests; +using Azure.Core.TestFramework; +using NUnit.Framework; + +namespace Azure.AI.Vision.Face.Samples +{ + public partial class Sample4_StatelessFaceRecognition : FaceSamplesBase + { + [Test] + public async Task GroupingAsync() + { + var client = CreateClient(); + #region Snippet:GroupAsync + var targetImages = new (string, Uri)[] { + ("Group image", new Uri(FaceTestConstant.UrlIdentification1Image)), + ("Dad image 1", new Uri(FaceTestConstant.UrlFamily1Dad1Image)), + ("Dad image 2", new Uri(FaceTestConstant.UrlFamily1Dad2Image)), + ("Son image 1", new Uri(FaceTestConstant.UrlFamily1Son1Image)) + }; + var faceIds = new Dictionary(); + + foreach (var (imageName, targetImage) in targetImages) + { + var detectResponse = await client.DetectAsync(targetImage, FaceDetectionModel.Detection03, FaceRecognitionModel.Recognition04, true); + Console.WriteLine($"Detected {detectResponse.Value.Count} face(s) in the image '{imageName}'."); + foreach (var face in detectResponse.Value) + { + faceIds[face.FaceId.Value] = (face, imageName); + } + } + + var groupResponse = await client.GroupAsync(faceIds.Keys); + var groups = groupResponse.Value; + + Console.WriteLine($"Found {groups.Groups.Count} group(s) in the target images."); + foreach (var group in groups.Groups) + { + Console.WriteLine($"Group: "); + foreach (var faceId in group) + { + Console.WriteLine($" {faceId} from '{faceIds[faceId].Item2}', face rectangle: {faceIds[faceId].Item1.FaceRectangle.Left}, {faceIds[faceId].Item1.FaceRectangle.Top}, {faceIds[faceId].Item1.FaceRectangle.Width}, {faceIds[faceId].Item1.FaceRectangle.Height}"); + } + } + + Console.WriteLine($"Found {groups.MessyGroup.Count} face(s) that are not in any group."); + foreach (var faceId in groups.MessyGroup) + { + Console.WriteLine($" {faceId} from '{faceIds[faceId].Item2}', face rectangle: {faceIds[faceId].Item1.FaceRectangle.Left}, {faceIds[faceId].Item1.FaceRectangle.Top}, {faceIds[faceId].Item1.FaceRectangle.Width}, {faceIds[faceId].Item1.FaceRectangle.Height}"); + } + #endregion + } + + [Test] + public async Task VerificationAsync() + { + var client = CreateClient(); + #region Snippet:VerifyFaceToFaceAsync + var data = new (string Name, Uri Uri)[] { + ("Dad image 1", new Uri(FaceTestConstant.UrlFamily1Dad1Image)), + ("Dad image 2", new Uri(FaceTestConstant.UrlFamily1Dad2Image)), + ("Son image 1", new Uri(FaceTestConstant.UrlFamily1Son1Image)) + }; + var faceIds = new List(); + + foreach (var tuple in data) + { + var detectResponse = await client.DetectAsync(tuple.Uri, FaceDetectionModel.Detection03, FaceRecognitionModel.Recognition04, true); + Console.WriteLine($"Detected {detectResponse.Value.Count} face(s) in the image '{tuple.Name}'."); + faceIds.Add(detectResponse.Value.Single().FaceId.Value); + } + + var verifyDad1Dad2Response = await client.VerifyFaceToFaceAsync(faceIds[0], faceIds[1]); + Console.WriteLine($"Verification between Dad image 1 and Dad image 2: {verifyDad1Dad2Response.Value.Confidence}"); + Console.WriteLine($"Is the same person: {verifyDad1Dad2Response.Value.IsIdentical}"); + + var verifyDad1SonResponse = await client.VerifyFaceToFaceAsync(faceIds[0], faceIds[2]); + Console.WriteLine($"Verification between Dad image 1 and Son image 1: {verifyDad1SonResponse.Value.Confidence}"); + Console.WriteLine($"Is the same person: {verifyDad1SonResponse.Value.IsIdentical}"); + #endregion + } + + [Test] + public async Task FindSimilarAsync() + { + var client = CreateClient(); + #region Snippet:FindSimilarAsync + var dadImage = new Uri(FaceTestConstant.UrlFamily1Dad1Image); + var detectDadResponse = await client.DetectAsync(dadImage, FaceDetectionModel.Detection03, FaceRecognitionModel.Recognition04, true); + Console.WriteLine($"Detected {detectDadResponse.Value.Count} face(s) in the Dad image."); + var dadFaceId = detectDadResponse.Value.Single().FaceId.Value; + + var targetImage = new Uri(FaceTestConstant.UrlIdentification1Image); + var detectResponse = await client.DetectAsync(targetImage, FaceDetectionModel.Detection03, FaceRecognitionModel.Recognition04, true); + Console.WriteLine($"Detected {detectResponse.Value.Count} face(s) in the image."); + var faceIds = detectResponse.Value.Select(face => face.FaceId.Value); + + var response = await client.FindSimilarAsync(dadFaceId, faceIds); + var similarFaces = response.Value; + Console.WriteLine($"Found {similarFaces.Count} similar face(s) in the target image."); + foreach (var similarFace in similarFaces) + { + Console.WriteLine($"Face ID: {similarFace.FaceId}, confidence: {similarFace.Confidence}"); + } + #endregion + } + } +} diff --git a/sdk/face/Azure.AI.Vision.Face/tests/samples/Sample5_LargePersonGroup.cs b/sdk/face/Azure.AI.Vision.Face/tests/samples/Sample5_LargePersonGroup.cs new file mode 100644 index 000000000000..4df6ff03d421 --- /dev/null +++ b/sdk/face/Azure.AI.Vision.Face/tests/samples/Sample5_LargePersonGroup.cs @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Threading.Tasks; +using Azure.AI.Vision.Face.Tests; +using Azure.Core.TestFramework; +using NUnit.Framework; + +namespace Azure.AI.Vision.Face.Samples +{ + public partial class Sample5_LargePersonGroup : FaceSamplesBase + { + [Test] + public void VerifyAndIdentifyFromLargePersonGroup() + { + var groupId = "lpg_family1"; + var groupClient = CreateLargePersonGroupClient(groupId); + #region Snippet:VerifyAndIdentifyFromLargePersonGroup_CreateLargePersonGroup + + groupClient.Create("Family 1", userData: "A sweet family", recognitionModel: FaceRecognitionModel.Recognition04); + #endregion + + #region Snippet:VerifyAndIdentifyFromLargePersonGroup_CreatePersonAndAddFaces + var persons = new[] + { + new { Name = "Bill", UserData = "Dad", ImageUrls = new[] { FaceTestConstant.UrlFamily1Dad1Image, FaceTestConstant.UrlFamily1Dad2Image } }, + new { Name = "Clare", UserData = "Mom", ImageUrls = new[] { FaceTestConstant.UrlFamily1Mom1Image, FaceTestConstant.UrlFamily1Mom2Image } }, + new { Name = "Ron", UserData = "Son", ImageUrls = new[] { FaceTestConstant.UrlFamily1Son1Image, FaceTestConstant.UrlFamily1Son2Image } } + }; + var personIds = new Dictionary(); + + foreach (var person in persons) + { + var createPersonResponse = groupClient.CreatePerson(person.Name, userData: person.UserData); + var personId = createPersonResponse.Value.PersonId; + personIds.Add(person.Name, personId); + + foreach (var imageUrl in person.ImageUrls) + { + groupClient.AddFace(personId, new Uri(imageUrl), userData: $"{person.UserData}-{imageUrl}", detectionModel: FaceDetectionModel.Detection03); + } + } + #endregion + + #region Snippet:VerifyAndIdentifyFromLargePersonGroup_Train + var operation = groupClient.Train(WaitUntil.Completed); + operation.WaitForCompletionResponse(); + #endregion + + var faceClient = CreateClient(); + var detectResponse = faceClient.Detect(new Uri(FaceTestConstant.UrlFamily1Dad3Image), FaceDetectionModel.Detection03, FaceRecognitionModel.Recognition04, true); + var faceId = detectResponse.Value[0].FaceId.Value; + + #region Snippet:VerifyAndIdentifyFromLargePersonGroup_Verify + var verifyDadResponse = faceClient.VerifyFromLargePersonGroup(faceId, groupId, personIds["Bill"]); + Console.WriteLine($"Is the detected face Bill? {verifyDadResponse.Value.IsIdentical} ({verifyDadResponse.Value.Confidence})"); + + var verifyMomResponse = faceClient.VerifyFromLargePersonGroup(faceId, groupId, personIds["Clare"]); + Console.WriteLine($"Is the detected face Clare? {verifyMomResponse.Value.IsIdentical} ({verifyMomResponse.Value.Confidence})"); + #endregion + + #region Snippet:VerifyAndIdentifyFromLargePersonGroup_Identify + var identifyResponse = faceClient.IdentifyFromLargePersonGroup(new[] { faceId }, groupId); + foreach (var candidate in identifyResponse.Value[0].Candidates) + { + var person = groupClient.GetPerson(candidate.PersonId); + Console.WriteLine($"The detected face belongs to {person.Value.Name} ({candidate.Confidence})"); + } + #endregion + + #region Snippet:VerifyAndIdentifyFromLargePersonGroup_DeleteLargePersonGroup + groupClient.Delete(); + #endregion + } + } +} \ No newline at end of file diff --git a/sdk/face/Azure.AI.Vision.Face/tests/samples/Sample5_LargePersonGroupAsync.cs b/sdk/face/Azure.AI.Vision.Face/tests/samples/Sample5_LargePersonGroupAsync.cs new file mode 100644 index 000000000000..1a610d3c1f5c --- /dev/null +++ b/sdk/face/Azure.AI.Vision.Face/tests/samples/Sample5_LargePersonGroupAsync.cs @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Threading.Tasks; +using Azure.AI.Vision.Face.Tests; +using Azure.Core.TestFramework; +using NUnit.Framework; + +namespace Azure.AI.Vision.Face.Samples +{ + public partial class Sample5_LargePersonGroup : FaceSamplesBase + { + [Test] + public async Task VerifyAndIdentifyFromLargePersonGroupAsync() + { + var groupId = "lpg_family1"; + var groupClient = CreateLargePersonGroupClient(groupId); + #region Snippet:VerifyAndIdentifyFromLargePersonGroup_CreateLargePersonGroupAsync + + await groupClient.CreateAsync("Family 1", userData: "A sweet family", recognitionModel: FaceRecognitionModel.Recognition04); + #endregion + + #region Snippet:VerifyAndIdentifyFromLargePersonGroup_CreatePersonAndAddFacesAsync + var persons = new[] + { + new { Name = "Bill", UserData = "Dad", ImageUrls = new[] { FaceTestConstant.UrlFamily1Dad1Image, FaceTestConstant.UrlFamily1Dad2Image } }, + new { Name = "Clare", UserData = "Mom", ImageUrls = new[] { FaceTestConstant.UrlFamily1Mom1Image, FaceTestConstant.UrlFamily1Mom2Image } }, + new { Name = "Ron", UserData = "Son", ImageUrls = new[] { FaceTestConstant.UrlFamily1Son1Image, FaceTestConstant.UrlFamily1Son2Image } } + }; + var personIds = new Dictionary(); + + foreach (var person in persons) + { + var createPersonResponse = await groupClient.CreatePersonAsync(person.Name, userData: person.UserData); + var personId = createPersonResponse.Value.PersonId; + personIds.Add(person.Name, personId); + + foreach (var imageUrl in person.ImageUrls) + { + await groupClient.AddFaceAsync(personId, new Uri(imageUrl), userData: $"{person.UserData}-{imageUrl}", detectionModel: FaceDetectionModel.Detection03); + } + } + #endregion + + #region Snippet:VerifyAndIdentifyFromLargePersonGroup_TrainAsync + var operation = await groupClient.TrainAsync(WaitUntil.Completed); + await operation.WaitForCompletionResponseAsync(); + #endregion + + var faceClient = CreateClient(); + var detectResponse = await faceClient.DetectAsync(new Uri(FaceTestConstant.UrlFamily1Dad3Image), FaceDetectionModel.Detection03, FaceRecognitionModel.Recognition04, true); + var faceId = detectResponse.Value[0].FaceId.Value; + + #region Snippet:VerifyAndIdentifyFromLargePersonGroup_VerifyAsync + var verifyDadResponse = await faceClient.VerifyFromLargePersonGroupAsync(faceId, groupId, personIds["Bill"]); + Console.WriteLine($"Is the detected face Bill? {verifyDadResponse.Value.IsIdentical} ({verifyDadResponse.Value.Confidence})"); + + var verifyMomResponse = await faceClient.VerifyFromLargePersonGroupAsync(faceId, groupId, personIds["Clare"]); + Console.WriteLine($"Is the detected face Clare? {verifyMomResponse.Value.IsIdentical} ({verifyMomResponse.Value.Confidence})"); + #endregion + + #region Snippet:VerifyAndIdentifyFromLargePersonGroup_IdentifyAsync + var identifyResponse = await faceClient.IdentifyFromLargePersonGroupAsync(new[] { faceId }, groupId); + foreach (var candidate in identifyResponse.Value[0].Candidates) + { + var person = await groupClient.GetPersonAsync(candidate.PersonId); + Console.WriteLine($"The detected face belongs to {person.Value.Name} ({candidate.Confidence})"); + } + #endregion + + #region Snippet:VerifyAndIdentifyFromLargePersonGroup_DeleteLargePersonGroupAsync + await groupClient.DeleteAsync(); + #endregion + } + } +} \ No newline at end of file diff --git a/sdk/face/Azure.AI.Vision.Face/tests/samples/Sample6_LargeFaceList.cs b/sdk/face/Azure.AI.Vision.Face/tests/samples/Sample6_LargeFaceList.cs new file mode 100644 index 000000000000..3eace9b52a6b --- /dev/null +++ b/sdk/face/Azure.AI.Vision.Face/tests/samples/Sample6_LargeFaceList.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Threading.Tasks; +using Azure.AI.Vision.Face.Tests; +using Azure.Core.TestFramework; +using NUnit.Framework; + +namespace Azure.AI.Vision.Face.Samples +{ + public partial class Sample6_LargeFaceList : FaceSamplesBase + { + [Test] + public void FindSimilarFromLargeFaceList() + { + var listId = "lfl_family1"; + var listClient = CreateLargeFaceListClient(listId); + + #region Snippet:CreateLargeFaceList + listClient.Create("Family 1", userData: "A sweet family", recognitionModel: FaceRecognitionModel.Recognition04); + #endregion + + #region Snippet:AddFacesToLargeFaceList + var faces = new[] + { + new { UserData = "Dad", ImageUrl = new Uri(FaceTestConstant.UrlFamily1Dad1Image) }, + new { UserData = "Mom", ImageUrl = new Uri(FaceTestConstant.UrlFamily1Mom1Image) }, + new { UserData = "Son", ImageUrl = new Uri(FaceTestConstant.UrlFamily1Son1Image) } + }; + var faceIds = new Dictionary(); + + foreach (var face in faces) + { + var addFaceResponse = listClient.AddFace(face.ImageUrl, userData: face.UserData); + faceIds[addFaceResponse.Value.PersistedFaceId] = face.UserData; + } + #endregion + + #region Snippet:TrainLargeFaceList + var operation = listClient.Train(WaitUntil.Completed); + operation.WaitForCompletionResponse(); + #endregion + + #region Snippet:FindSimilarFromLargeFaceList + var faceClient = CreateClient(); + var detectResponse = faceClient.Detect(new Uri(FaceTestConstant.UrlFamily1Dad3Image), FaceDetectionModel.Detection03, FaceRecognitionModel.Recognition04, true); + var faceId = detectResponse.Value[0].FaceId.Value; + + var findSimilarResponse = faceClient.FindSimilarFromLargeFaceList(faceId, listId); + foreach (var similarFace in findSimilarResponse.Value) + { + Console.WriteLine($"The detected face is similar to the face with '{faceIds[similarFace.PersistedFaceId.Value]}' ID {similarFace.PersistedFaceId} ({similarFace.Confidence})"); + } + #endregion + + #region Snippet:DeleteLargeFaceList + listClient.Delete(); + #endregion + } + } +} diff --git a/sdk/face/Azure.AI.Vision.Face/tests/samples/Sample6_LargeFaceListAsync.cs b/sdk/face/Azure.AI.Vision.Face/tests/samples/Sample6_LargeFaceListAsync.cs new file mode 100644 index 000000000000..cb9f47de66fe --- /dev/null +++ b/sdk/face/Azure.AI.Vision.Face/tests/samples/Sample6_LargeFaceListAsync.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Threading.Tasks; +using Azure.AI.Vision.Face.Tests; +using Azure.Core.TestFramework; +using NUnit.Framework; + +namespace Azure.AI.Vision.Face.Samples +{ + public partial class Sample6_LargeFaceList : FaceSamplesBase + { + [Test] + public async Task FindSimilarFromLargeFaceListAsync() + { + var listId = "lfl_family1"; + var listClient = CreateLargeFaceListClient(listId); + + #region Snippet:CreateLargeFaceListAsync + await listClient.CreateAsync("Family 1", userData: "A sweet family", recognitionModel: FaceRecognitionModel.Recognition04); + #endregion + + #region Snippet:AddFacesToLargeFaceListAsync + var faces = new[] + { + new { UserData = "Dad", ImageUrl = new Uri(FaceTestConstant.UrlFamily1Dad1Image) }, + new { UserData = "Mom", ImageUrl = new Uri(FaceTestConstant.UrlFamily1Mom1Image) }, + new { UserData = "Son", ImageUrl = new Uri(FaceTestConstant.UrlFamily1Son1Image) } + }; + var faceIds = new Dictionary(); + + foreach (var face in faces) + { + var addFaceResponse = await listClient.AddFaceAsync(face.ImageUrl, userData: face.UserData); + faceIds[addFaceResponse.Value.PersistedFaceId] = face.UserData; + } + #endregion + + #region Snippet:TrainLargeFaceListAsync + var operation = await listClient.TrainAsync(WaitUntil.Completed); + await operation.WaitForCompletionResponseAsync(); + #endregion + + #region Snippet:FindSimilarFromLargeFaceListAsync + var faceClient = CreateClient(); + var detectResponse = await faceClient.DetectAsync(new Uri(FaceTestConstant.UrlFamily1Dad3Image), FaceDetectionModel.Detection03, FaceRecognitionModel.Recognition04, true); + var faceId = detectResponse.Value[0].FaceId.Value; + + var findSimilarResponse = await faceClient.FindSimilarFromLargeFaceListAsync(faceId, listId); + foreach (var similarFace in findSimilarResponse.Value) + { + Console.WriteLine($"The detected face is similar to the face with '{faceIds[similarFace.PersistedFaceId.Value]}' ID {similarFace.PersistedFaceId} ({similarFace.Confidence})"); + } + #endregion + + #region Snippet:DeleteLargeFaceListAsync + await listClient.DeleteAsync(); + #endregion + } + } +} diff --git a/sdk/face/Azure.AI.Vision.Face/tsp-location.yaml b/sdk/face/Azure.AI.Vision.Face/tsp-location.yaml index d170fcf1cfd5..aa57e9f30142 100644 --- a/sdk/face/Azure.AI.Vision.Face/tsp-location.yaml +++ b/sdk/face/Azure.AI.Vision.Face/tsp-location.yaml @@ -1,5 +1,5 @@ directory: specification/ai/Face -commit: b9652b3e860e690c9ff53866071c591d59fed907 +commit: 4037b28c1014648f4cfa6f8c965e45f2476652e2 repo: Azure/azure-rest-api-specs additionalDirectories: [] diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/CHANGELOG.md b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/CHANGELOG.md index aa83382bdbdf..f2728211a959 100644 --- a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/CHANGELOG.md +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/CHANGELOG.md @@ -1,17 +1,23 @@ # Release History -## 1.1.0-beta.1 (Unreleased) +## 1.1.0-beta.2 (Unreleased) ### Features Added -- Enable the new model serialization by using the System.ClientModel, refer this [document](https://aka.ms/azsdk/net/mrw) for more details. - ### Breaking Changes ### Bugs Fixed ### Other Changes +## 1.1.0-beta.1 (2024-10-10) + +### Features Added + +- Add AutoUpgrade and AutoUpgradeProfile support +- Enable the new model serialization by using the System.ClientModel, refer this [document](https://aka.ms/azsdk/net/mrw) for more details. +- Exposed `JsonModelWriteCore` for model serialization procedure. + ## 1.0.0 (2023-12-13) This package is the first stable release of the Kubernetes Fleet management library. diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/api/Azure.ResourceManager.ContainerServiceFleet.netstandard2.0.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/api/Azure.ResourceManager.ContainerServiceFleet.netstandard2.0.cs index e80578ed5889..9f9e2768319f 100644 --- a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/api/Azure.ResourceManager.ContainerServiceFleet.netstandard2.0.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/api/Azure.ResourceManager.ContainerServiceFleet.netstandard2.0.cs @@ -1,5 +1,57 @@ namespace Azure.ResourceManager.ContainerServiceFleet { + public partial class AutoUpgradeProfileCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected AutoUpgradeProfileCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string autoUpgradeProfileName, Azure.ResourceManager.ContainerServiceFleet.AutoUpgradeProfileData data, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string autoUpgradeProfileName, Azure.ResourceManager.ContainerServiceFleet.AutoUpgradeProfileData data, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string autoUpgradeProfileName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string autoUpgradeProfileName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string autoUpgradeProfileName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string autoUpgradeProfileName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string autoUpgradeProfileName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string autoUpgradeProfileName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class AutoUpgradeProfileData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AutoUpgradeProfileData() { } + public Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetUpgradeChannel? Channel { get { throw null; } set { } } + public bool? Disabled { get { throw null; } set { } } + public Azure.ETag? ETag { get { throw null; } } + public Azure.ResourceManager.ContainerServiceFleet.Models.AutoUpgradeProfileProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.ContainerServiceFleet.Models.AutoUpgradeNodeImageSelectionType? SelectionType { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier UpdateStrategyId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ContainerServiceFleet.AutoUpgradeProfileData 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.ContainerServiceFleet.AutoUpgradeProfileData 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 partial class AutoUpgradeProfileResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected AutoUpgradeProfileResource() { } + public virtual Azure.ResourceManager.ContainerServiceFleet.AutoUpgradeProfileData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string fleetName, string autoUpgradeProfileName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.ContainerServiceFleet.AutoUpgradeProfileData 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.ContainerServiceFleet.AutoUpgradeProfileData 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.ContainerServiceFleet.AutoUpgradeProfileData data, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ContainerServiceFleet.AutoUpgradeProfileData data, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } public partial class ContainerServiceFleetCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected ContainerServiceFleetCollection() { } @@ -21,8 +73,10 @@ public partial class ContainerServiceFleetData : Azure.ResourceManager.Models.Tr { public ContainerServiceFleetData(Azure.Core.AzureLocation location) { } public Azure.ETag? ETag { get { throw null; } } + public Azure.ResourceManager.ContainerServiceFleet.Models.FleetHubProfile HubProfile { get { throw null; } set { } } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public Azure.ResourceManager.ContainerServiceFleet.Models.FleetProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerServiceFleet.ContainerServiceFleetData 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.ContainerServiceFleet.ContainerServiceFleetData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -31,6 +85,7 @@ public ContainerServiceFleetData(Azure.Core.AzureLocation location) { } } public static partial class ContainerServiceFleetExtensions { + public static Azure.ResourceManager.ContainerServiceFleet.AutoUpgradeProfileResource GetAutoUpgradeProfileResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.Response GetContainerServiceFleet(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string fleetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> GetContainerServiceFleetAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string fleetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.ContainerServiceFleet.ContainerServiceFleetMemberResource GetContainerServiceFleetMemberResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } @@ -65,6 +120,7 @@ public ContainerServiceFleetMemberData() { } public Azure.ETag? ETag { get { throw null; } } public string Group { get { throw null; } set { } } public Azure.ResourceManager.ContainerServiceFleet.Models.FleetMemberProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerServiceFleet.ContainerServiceFleetMemberData 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.ContainerServiceFleet.ContainerServiceFleetMemberData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -103,6 +159,9 @@ protected ContainerServiceFleetResource() { } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetAutoUpgradeProfile(string autoUpgradeProfileName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAutoUpgradeProfileAsync(string autoUpgradeProfileName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ContainerServiceFleet.AutoUpgradeProfileCollection GetAutoUpgradeProfiles() { throw null; } public virtual Azure.Response GetContainerServiceFleetMember(string fleetMemberName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetContainerServiceFleetMemberAsync(string fleetMemberName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ContainerServiceFleet.ContainerServiceFleetMemberCollection GetContainerServiceFleetMembers() { throw null; } @@ -152,6 +211,7 @@ public ContainerServiceFleetUpdateRunData() { } public Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetUpdateRunStatus Status { get { throw null; } } public System.Collections.Generic.IList StrategyStages { get { throw null; } set { } } public Azure.Core.ResourceIdentifier UpdateStrategyId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerServiceFleet.ContainerServiceFleetUpdateRunData 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.ContainerServiceFleet.ContainerServiceFleetUpdateRunData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -169,6 +229,8 @@ protected ContainerServiceFleetUpdateRunResource() { } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Skip(Azure.WaitUntil waitUntil, Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetSkipProperties body, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> SkipAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetSkipProperties body, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ArmOperation Start(Azure.WaitUntil waitUntil, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> StartAsync(Azure.WaitUntil waitUntil, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ArmOperation Stop(Azure.WaitUntil waitUntil, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -204,6 +266,7 @@ public FleetUpdateStrategyData() { } public Azure.ETag? ETag { get { throw null; } } public Azure.ResourceManager.ContainerServiceFleet.Models.FleetUpdateStrategyProvisioningState? ProvisioningState { get { throw null; } } public System.Collections.Generic.IList StrategyStages { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerServiceFleet.FleetUpdateStrategyData 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.ContainerServiceFleet.FleetUpdateStrategyData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -235,6 +298,7 @@ namespace Azure.ResourceManager.ContainerServiceFleet.Mocking public partial class MockableContainerServiceFleetArmClient : Azure.ResourceManager.ArmResource { protected MockableContainerServiceFleetArmClient() { } + public virtual Azure.ResourceManager.ContainerServiceFleet.AutoUpgradeProfileResource GetAutoUpgradeProfileResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.ContainerServiceFleet.ContainerServiceFleetMemberResource GetContainerServiceFleetMemberResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.ContainerServiceFleet.ContainerServiceFleetResource GetContainerServiceFleetResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.ContainerServiceFleet.ContainerServiceFleetUpdateRunResource GetContainerServiceFleetUpdateRunResource(Azure.Core.ResourceIdentifier id) { throw null; } @@ -258,7 +322,10 @@ namespace Azure.ResourceManager.ContainerServiceFleet.Models { public static partial class ArmContainerServiceFleetModelFactory { - public static Azure.ResourceManager.ContainerServiceFleet.ContainerServiceFleetData ContainerServiceFleetData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ETag? eTag = default(Azure.ETag?), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.ContainerServiceFleet.Models.FleetProvisioningState? provisioningState = default(Azure.ResourceManager.ContainerServiceFleet.Models.FleetProvisioningState?)) { throw null; } + public static Azure.ResourceManager.ContainerServiceFleet.AutoUpgradeProfileData AutoUpgradeProfileData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ETag? eTag = default(Azure.ETag?), Azure.ResourceManager.ContainerServiceFleet.Models.AutoUpgradeProfileProvisioningState? provisioningState = default(Azure.ResourceManager.ContainerServiceFleet.Models.AutoUpgradeProfileProvisioningState?), Azure.Core.ResourceIdentifier updateStrategyId = null, Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetUpgradeChannel? channel = default(Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetUpgradeChannel?), Azure.ResourceManager.ContainerServiceFleet.Models.AutoUpgradeNodeImageSelectionType? selectionType = default(Azure.ResourceManager.ContainerServiceFleet.Models.AutoUpgradeNodeImageSelectionType?), bool? disabled = default(bool?)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.ContainerServiceFleet.ContainerServiceFleetData ContainerServiceFleetData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, Azure.ETag? eTag, Azure.ResourceManager.Models.ManagedServiceIdentity identity, Azure.ResourceManager.ContainerServiceFleet.Models.FleetProvisioningState? provisioningState) { throw null; } + public static Azure.ResourceManager.ContainerServiceFleet.ContainerServiceFleetData ContainerServiceFleetData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ETag? eTag = default(Azure.ETag?), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.ContainerServiceFleet.Models.FleetProvisioningState? provisioningState = default(Azure.ResourceManager.ContainerServiceFleet.Models.FleetProvisioningState?), Azure.ResourceManager.ContainerServiceFleet.Models.FleetHubProfile hubProfile = null) { throw null; } public static Azure.ResourceManager.ContainerServiceFleet.ContainerServiceFleetMemberData ContainerServiceFleetMemberData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ETag? eTag = default(Azure.ETag?), Azure.Core.ResourceIdentifier clusterResourceId = null, string group = null, Azure.ResourceManager.ContainerServiceFleet.Models.FleetMemberProvisioningState? provisioningState = default(Azure.ResourceManager.ContainerServiceFleet.Models.FleetMemberProvisioningState?)) { throw null; } public static Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetUpdateGroupStatus ContainerServiceFleetUpdateGroupStatus(Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetUpdateStatus status = null, string name = null, System.Collections.Generic.IEnumerable members = null) { throw null; } public static Azure.ResourceManager.ContainerServiceFleet.ContainerServiceFleetUpdateRunData ContainerServiceFleetUpdateRunData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ETag? eTag = default(Azure.ETag?), Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetUpdateRunProvisioningState? provisioningState = default(Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetUpdateRunProvisioningState?), Azure.Core.ResourceIdentifier updateStrategyId = null, System.Collections.Generic.IEnumerable strategyStages = null, Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetManagedClusterUpdate managedClusterUpdate = null, Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetUpdateRunStatus status = null) { throw null; } @@ -268,15 +335,81 @@ public static partial class ArmContainerServiceFleetModelFactory public static Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetWaitStatus ContainerServiceFleetWaitStatus(Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetUpdateStatus status = null, int? waitDurationInSeconds = default(int?)) { throw null; } public static Azure.ResourceManager.ContainerServiceFleet.Models.FleetCredentialResult FleetCredentialResult(string name = null, byte[] value = null) { throw null; } public static Azure.ResourceManager.ContainerServiceFleet.Models.FleetCredentialResults FleetCredentialResults(System.Collections.Generic.IEnumerable kubeconfigs = null) { throw null; } + public static Azure.ResourceManager.ContainerServiceFleet.Models.FleetHubProfile FleetHubProfile(string dnsPrefix = null, Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetAPIServerAccessProfile apiServerAccessProfile = null, Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetAgentProfile agentProfile = null, string fqdn = null, string kubernetesVersion = null, string portalFqdn = null) { throw null; } public static Azure.ResourceManager.ContainerServiceFleet.FleetUpdateStrategyData FleetUpdateStrategyData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ETag? eTag = default(Azure.ETag?), Azure.ResourceManager.ContainerServiceFleet.Models.FleetUpdateStrategyProvisioningState? provisioningState = default(Azure.ResourceManager.ContainerServiceFleet.Models.FleetUpdateStrategyProvisioningState?), System.Collections.Generic.IEnumerable strategyStages = null) { throw null; } public static Azure.ResourceManager.ContainerServiceFleet.Models.MemberUpdateStatus MemberUpdateStatus(Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetUpdateStatus status = null, string name = null, Azure.Core.ResourceIdentifier clusterResourceId = null, string operationId = null, string message = null) { throw null; } public static Azure.ResourceManager.ContainerServiceFleet.Models.NodeImageVersion NodeImageVersion(string version = null) { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AutoUpgradeNodeImageSelectionType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AutoUpgradeNodeImageSelectionType(string value) { throw null; } + public static Azure.ResourceManager.ContainerServiceFleet.Models.AutoUpgradeNodeImageSelectionType Consistent { get { throw null; } } + public static Azure.ResourceManager.ContainerServiceFleet.Models.AutoUpgradeNodeImageSelectionType Latest { get { throw null; } } + public bool Equals(Azure.ResourceManager.ContainerServiceFleet.Models.AutoUpgradeNodeImageSelectionType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ContainerServiceFleet.Models.AutoUpgradeNodeImageSelectionType left, Azure.ResourceManager.ContainerServiceFleet.Models.AutoUpgradeNodeImageSelectionType right) { throw null; } + public static implicit operator Azure.ResourceManager.ContainerServiceFleet.Models.AutoUpgradeNodeImageSelectionType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ContainerServiceFleet.Models.AutoUpgradeNodeImageSelectionType left, Azure.ResourceManager.ContainerServiceFleet.Models.AutoUpgradeNodeImageSelectionType right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AutoUpgradeProfileProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AutoUpgradeProfileProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.ContainerServiceFleet.Models.AutoUpgradeProfileProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.ContainerServiceFleet.Models.AutoUpgradeProfileProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.ContainerServiceFleet.Models.AutoUpgradeProfileProvisioningState Succeeded { get { throw null; } } + public bool Equals(Azure.ResourceManager.ContainerServiceFleet.Models.AutoUpgradeProfileProvisioningState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ContainerServiceFleet.Models.AutoUpgradeProfileProvisioningState left, Azure.ResourceManager.ContainerServiceFleet.Models.AutoUpgradeProfileProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.ContainerServiceFleet.Models.AutoUpgradeProfileProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ContainerServiceFleet.Models.AutoUpgradeProfileProvisioningState left, Azure.ResourceManager.ContainerServiceFleet.Models.AutoUpgradeProfileProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ContainerServiceFleetAgentProfile : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ContainerServiceFleetAgentProfile() { } + public Azure.Core.ResourceIdentifier SubnetId { get { throw null; } set { } } + public string VmSize { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetAgentProfile 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.ContainerServiceFleet.Models.ContainerServiceFleetAgentProfile 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 partial class ContainerServiceFleetAPIServerAccessProfile : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ContainerServiceFleetAPIServerAccessProfile() { } + public bool? EnablePrivateCluster { get { throw null; } set { } } + public bool? EnableVnetIntegration { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier SubnetId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetAPIServerAccessProfile 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.ContainerServiceFleet.Models.ContainerServiceFleetAPIServerAccessProfile 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 partial class ContainerServiceFleetManagedClusterUpdate : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ContainerServiceFleetManagedClusterUpdate(Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetManagedClusterUpgradeSpec upgrade) { } + public Azure.ResourceManager.ContainerServiceFleet.Models.NodeImageSelection NodeImageSelection { get { throw null; } set { } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.ContainerServiceFleet.Models.NodeImageSelectionType? SelectionType { get { throw null; } set { } } public Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetManagedClusterUpgradeSpec Upgrade { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetManagedClusterUpdate 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.ContainerServiceFleet.Models.ContainerServiceFleetManagedClusterUpdate System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -288,6 +421,7 @@ public partial class ContainerServiceFleetManagedClusterUpgradeSpec : System.Cli public ContainerServiceFleetManagedClusterUpgradeSpec(Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetManagedClusterUpgradeType upgradeType) { } public string KubernetesVersion { get { throw null; } set { } } public Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetManagedClusterUpgradeType UpgradeType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetManagedClusterUpgradeSpec 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.ContainerServiceFleet.Models.ContainerServiceFleetManagedClusterUpgradeSpec System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -300,6 +434,7 @@ public ContainerServiceFleetManagedClusterUpgradeSpec(Azure.ResourceManager.Cont private readonly object _dummy; private readonly int _dummyPrimitive; public ContainerServiceFleetManagedClusterUpgradeType(string value) { throw null; } + public static Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetManagedClusterUpgradeType ControlPlaneOnly { get { throw null; } } public static Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetManagedClusterUpgradeType Full { get { throw null; } } public static Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetManagedClusterUpgradeType NodeImageOnly { get { throw null; } } public bool Equals(Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetManagedClusterUpgradeType other) { throw null; } @@ -316,6 +451,7 @@ public partial class ContainerServiceFleetMemberPatch : System.ClientModel.Primi { public ContainerServiceFleetMemberPatch() { } public string Group { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetMemberPatch 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.ContainerServiceFleet.Models.ContainerServiceFleetMemberPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -327,16 +463,61 @@ public partial class ContainerServiceFleetPatch : System.ClientModel.Primitives. public ContainerServiceFleetPatch() { } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetPatch 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.ContainerServiceFleet.Models.ContainerServiceFleetPatch 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 partial class ContainerServiceFleetSkipProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ContainerServiceFleetSkipProperties(System.Collections.Generic.IEnumerable targets) { } + public System.Collections.Generic.IList Targets { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetSkipProperties 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.ContainerServiceFleet.Models.ContainerServiceFleetSkipProperties 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 partial class ContainerServiceFleetSkipTarget : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ContainerServiceFleetSkipTarget(Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetTargetType targetType, string name) { } + public string Name { get { throw null; } } + public Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetTargetType TargetType { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetSkipTarget 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.ContainerServiceFleet.Models.ContainerServiceFleetSkipTarget 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; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ContainerServiceFleetTargetType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ContainerServiceFleetTargetType(string value) { throw null; } + public static Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetTargetType AfterStageWait { get { throw null; } } + public static Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetTargetType Group { get { throw null; } } + public static Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetTargetType Member { get { throw null; } } + public static Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetTargetType Stage { get { throw null; } } + public bool Equals(Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetTargetType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetTargetType left, Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetTargetType right) { throw null; } + public static implicit operator Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetTargetType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetTargetType left, Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetTargetType right) { throw null; } + public override string ToString() { throw null; } + } public partial class ContainerServiceFleetUpdateGroup : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ContainerServiceFleetUpdateGroup(string name) { } public string Name { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetUpdateGroup 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.ContainerServiceFleet.Models.ContainerServiceFleetUpdateGroup System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -349,6 +530,7 @@ internal ContainerServiceFleetUpdateGroupStatus() { } public System.Collections.Generic.IReadOnlyList Members { get { throw null; } } public string Name { get { throw null; } } public Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetUpdateStatus Status { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetUpdateGroupStatus 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.ContainerServiceFleet.Models.ContainerServiceFleetUpdateGroupStatus System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -380,6 +562,7 @@ internal ContainerServiceFleetUpdateRunStatus() { } public System.Collections.Generic.IReadOnlyList SelectedNodeImageVersions { get { throw null; } } public System.Collections.Generic.IReadOnlyList Stages { get { throw null; } } public Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetUpdateStatus Status { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetUpdateRunStatus 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.ContainerServiceFleet.Models.ContainerServiceFleetUpdateRunStatus System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -392,6 +575,7 @@ public ContainerServiceFleetUpdateStage(string name) { } public int? AfterStageWaitInSeconds { get { throw null; } set { } } public System.Collections.Generic.IList Groups { get { throw null; } } public string Name { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetUpdateStage 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.ContainerServiceFleet.Models.ContainerServiceFleetUpdateStage System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -405,6 +589,7 @@ internal ContainerServiceFleetUpdateStageStatus() { } public System.Collections.Generic.IReadOnlyList Groups { get { throw null; } } public string Name { get { throw null; } } public Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetUpdateStatus Status { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetUpdateStageStatus 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.ContainerServiceFleet.Models.ContainerServiceFleetUpdateStageStatus System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -441,17 +626,38 @@ internal ContainerServiceFleetUpdateStatus() { } public Azure.ResponseError Error { get { throw null; } } public System.DateTimeOffset? StartOn { get { throw null; } } public Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetUpdateState? State { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetUpdateStatus 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.ContainerServiceFleet.Models.ContainerServiceFleetUpdateStatus 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; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ContainerServiceFleetUpgradeChannel : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ContainerServiceFleetUpgradeChannel(string value) { throw null; } + public static Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetUpgradeChannel NodeImage { get { throw null; } } + public static Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetUpgradeChannel Rapid { get { throw null; } } + public static Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetUpgradeChannel Stable { get { throw null; } } + public bool Equals(Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetUpgradeChannel other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetUpgradeChannel left, Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetUpgradeChannel right) { throw null; } + public static implicit operator Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetUpgradeChannel (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetUpgradeChannel left, Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetUpgradeChannel right) { throw null; } + public override string ToString() { throw null; } + } public partial class ContainerServiceFleetWaitStatus : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal ContainerServiceFleetWaitStatus() { } public Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetUpdateStatus Status { get { throw null; } } public int? WaitDurationInSeconds { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetWaitStatus 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.ContainerServiceFleet.Models.ContainerServiceFleetWaitStatus System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -463,6 +669,7 @@ public partial class FleetCredentialResult : System.ClientModel.Primitives.IJson internal FleetCredentialResult() { } public string Name { get { throw null; } } public byte[] Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerServiceFleet.Models.FleetCredentialResult 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.ContainerServiceFleet.Models.FleetCredentialResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -473,12 +680,29 @@ public partial class FleetCredentialResults : System.ClientModel.Primitives.IJso { internal FleetCredentialResults() { } public System.Collections.Generic.IReadOnlyList Kubeconfigs { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerServiceFleet.Models.FleetCredentialResults 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.ContainerServiceFleet.Models.FleetCredentialResults 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 partial class FleetHubProfile : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public FleetHubProfile() { } + public Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetAgentProfile AgentProfile { get { throw null; } set { } } + public Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetAPIServerAccessProfile ApiServerAccessProfile { get { throw null; } set { } } + public string DnsPrefix { get { throw null; } set { } } + public string Fqdn { get { throw null; } } + public string KubernetesVersion { get { throw null; } } + public string PortalFqdn { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ContainerServiceFleet.Models.FleetHubProfile 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.ContainerServiceFleet.Models.FleetHubProfile 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; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct FleetMemberProvisioningState : System.IEquatable { @@ -550,12 +774,25 @@ internal MemberUpdateStatus() { } public string Name { get { throw null; } } public string OperationId { get { throw null; } } public Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetUpdateStatus Status { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerServiceFleet.Models.MemberUpdateStatus 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.ContainerServiceFleet.Models.MemberUpdateStatus 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 partial class NodeImageSelection : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public NodeImageSelection(Azure.ResourceManager.ContainerServiceFleet.Models.NodeImageSelectionType selectionType) { } + public System.Collections.Generic.IList CustomNodeImageVersions { get { throw null; } } + public Azure.ResourceManager.ContainerServiceFleet.Models.NodeImageSelectionType SelectionType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ContainerServiceFleet.Models.NodeImageSelection 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.ContainerServiceFleet.Models.NodeImageSelection 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; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct NodeImageSelectionType : System.IEquatable { @@ -563,6 +800,7 @@ internal MemberUpdateStatus() { } private readonly int _dummyPrimitive; public NodeImageSelectionType(string value) { throw null; } public static Azure.ResourceManager.ContainerServiceFleet.Models.NodeImageSelectionType Consistent { get { throw null; } } + public static Azure.ResourceManager.ContainerServiceFleet.Models.NodeImageSelectionType Custom { get { throw null; } } public static Azure.ResourceManager.ContainerServiceFleet.Models.NodeImageSelectionType Latest { get { throw null; } } public bool Equals(Azure.ResourceManager.ContainerServiceFleet.Models.NodeImageSelectionType other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] @@ -576,8 +814,9 @@ internal MemberUpdateStatus() { } } public partial class NodeImageVersion : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - internal NodeImageVersion() { } + public NodeImageVersion() { } public string Version { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerServiceFleet.Models.NodeImageVersion 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.ContainerServiceFleet.Models.NodeImageVersion System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/assets.json b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/assets.json index dd935d390aa3..6733078d8720 100644 --- a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/assets.json +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/fleet/Azure.ResourceManager.ContainerServiceFleet", - "Tag": "net/fleet/Azure.ResourceManager.ContainerServiceFleet_d1cc30d3cd" + "Tag": "net/fleet/Azure.ResourceManager.ContainerServiceFleet_7e685762c6" } diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/samples/Generated/Samples/Sample_AutoUpgradeProfileCollection.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/samples/Generated/Samples/Sample_AutoUpgradeProfileCollection.cs new file mode 100644 index 000000000000..6323445b066b --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/samples/Generated/Samples/Sample_AutoUpgradeProfileCollection.cs @@ -0,0 +1,204 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.ContainerServiceFleet.Models; + +namespace Azure.ResourceManager.ContainerServiceFleet.Samples +{ + public partial class Sample_AutoUpgradeProfileCollection + { + // Lists the AutoUpgradeProfile resources by fleet. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_ListsTheAutoUpgradeProfileResourcesByFleet() + { + // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/examples/AutoUpgradeProfiles_ListByFleet.json + // this example is just showing the usage of "AutoUpgradeProfiles_ListByFleet" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ContainerServiceFleetResource created on azure + // for more information of creating ContainerServiceFleetResource, please refer to the document of ContainerServiceFleetResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg1"; + string fleetName = "fleet1"; + ResourceIdentifier containerServiceFleetResourceId = ContainerServiceFleetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName); + ContainerServiceFleetResource containerServiceFleet = client.GetContainerServiceFleetResource(containerServiceFleetResourceId); + + // get the collection of this AutoUpgradeProfileResource + AutoUpgradeProfileCollection collection = containerServiceFleet.GetAutoUpgradeProfiles(); + + // invoke the operation and iterate over the result + await foreach (AutoUpgradeProfileResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AutoUpgradeProfileData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Gets an AutoUpgradeProfile resource. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetsAnAutoUpgradeProfileResource() + { + // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/examples/AutoUpgradeProfiles_Get.json + // this example is just showing the usage of "AutoUpgradeProfiles_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ContainerServiceFleetResource created on azure + // for more information of creating ContainerServiceFleetResource, please refer to the document of ContainerServiceFleetResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg1"; + string fleetName = "fleet1"; + ResourceIdentifier containerServiceFleetResourceId = ContainerServiceFleetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName); + ContainerServiceFleetResource containerServiceFleet = client.GetContainerServiceFleetResource(containerServiceFleetResourceId); + + // get the collection of this AutoUpgradeProfileResource + AutoUpgradeProfileCollection collection = containerServiceFleet.GetAutoUpgradeProfiles(); + + // invoke the operation + string autoUpgradeProfileName = "autoupgradeprofile1"; + AutoUpgradeProfileResource result = await collection.GetAsync(autoUpgradeProfileName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AutoUpgradeProfileData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Gets an AutoUpgradeProfile resource. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_GetsAnAutoUpgradeProfileResource() + { + // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/examples/AutoUpgradeProfiles_Get.json + // this example is just showing the usage of "AutoUpgradeProfiles_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ContainerServiceFleetResource created on azure + // for more information of creating ContainerServiceFleetResource, please refer to the document of ContainerServiceFleetResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg1"; + string fleetName = "fleet1"; + ResourceIdentifier containerServiceFleetResourceId = ContainerServiceFleetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName); + ContainerServiceFleetResource containerServiceFleet = client.GetContainerServiceFleetResource(containerServiceFleetResourceId); + + // get the collection of this AutoUpgradeProfileResource + AutoUpgradeProfileCollection collection = containerServiceFleet.GetAutoUpgradeProfiles(); + + // invoke the operation + string autoUpgradeProfileName = "autoupgradeprofile1"; + bool result = await collection.ExistsAsync(autoUpgradeProfileName); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Gets an AutoUpgradeProfile resource. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_GetsAnAutoUpgradeProfileResource() + { + // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/examples/AutoUpgradeProfiles_Get.json + // this example is just showing the usage of "AutoUpgradeProfiles_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ContainerServiceFleetResource created on azure + // for more information of creating ContainerServiceFleetResource, please refer to the document of ContainerServiceFleetResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg1"; + string fleetName = "fleet1"; + ResourceIdentifier containerServiceFleetResourceId = ContainerServiceFleetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName); + ContainerServiceFleetResource containerServiceFleet = client.GetContainerServiceFleetResource(containerServiceFleetResourceId); + + // get the collection of this AutoUpgradeProfileResource + AutoUpgradeProfileCollection collection = containerServiceFleet.GetAutoUpgradeProfiles(); + + // invoke the operation + string autoUpgradeProfileName = "autoupgradeprofile1"; + NullableResponse response = await collection.GetIfExistsAsync(autoUpgradeProfileName); + AutoUpgradeProfileResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine($"Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AutoUpgradeProfileData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + + // Create an AutoUpgradeProfile. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_CreateAnAutoUpgradeProfile() + { + // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/examples/AutoUpgradeProfiles_CreateOrUpdate.json + // this example is just showing the usage of "AutoUpgradeProfiles_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ContainerServiceFleetResource created on azure + // for more information of creating ContainerServiceFleetResource, please refer to the document of ContainerServiceFleetResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg1"; + string fleetName = "fleet1"; + ResourceIdentifier containerServiceFleetResourceId = ContainerServiceFleetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName); + ContainerServiceFleetResource containerServiceFleet = client.GetContainerServiceFleetResource(containerServiceFleetResourceId); + + // get the collection of this AutoUpgradeProfileResource + AutoUpgradeProfileCollection collection = containerServiceFleet.GetAutoUpgradeProfiles(); + + // invoke the operation + string autoUpgradeProfileName = "autoupgradeprofile1"; + AutoUpgradeProfileData data = new AutoUpgradeProfileData() + { + Channel = ContainerServiceFleetUpgradeChannel.Stable, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, autoUpgradeProfileName, data); + AutoUpgradeProfileResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AutoUpgradeProfileData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/samples/Generated/Samples/Sample_AutoUpgradeProfileResource.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/samples/Generated/Samples/Sample_AutoUpgradeProfileResource.cs new file mode 100644 index 000000000000..e05407f26281 --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/samples/Generated/Samples/Sample_AutoUpgradeProfileResource.cs @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.ContainerServiceFleet.Models; + +namespace Azure.ResourceManager.ContainerServiceFleet.Samples +{ + public partial class Sample_AutoUpgradeProfileResource + { + // Gets an AutoUpgradeProfile resource. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetsAnAutoUpgradeProfileResource() + { + // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/examples/AutoUpgradeProfiles_Get.json + // this example is just showing the usage of "AutoUpgradeProfiles_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AutoUpgradeProfileResource created on azure + // for more information of creating AutoUpgradeProfileResource, please refer to the document of AutoUpgradeProfileResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg1"; + string fleetName = "fleet1"; + string autoUpgradeProfileName = "autoupgradeprofile1"; + ResourceIdentifier autoUpgradeProfileResourceId = AutoUpgradeProfileResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName, autoUpgradeProfileName); + AutoUpgradeProfileResource autoUpgradeProfile = client.GetAutoUpgradeProfileResource(autoUpgradeProfileResourceId); + + // invoke the operation + AutoUpgradeProfileResource result = await autoUpgradeProfile.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AutoUpgradeProfileData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Create an AutoUpgradeProfile. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_CreateAnAutoUpgradeProfile() + { + // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/examples/AutoUpgradeProfiles_CreateOrUpdate.json + // this example is just showing the usage of "AutoUpgradeProfiles_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AutoUpgradeProfileResource created on azure + // for more information of creating AutoUpgradeProfileResource, please refer to the document of AutoUpgradeProfileResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg1"; + string fleetName = "fleet1"; + string autoUpgradeProfileName = "autoupgradeprofile1"; + ResourceIdentifier autoUpgradeProfileResourceId = AutoUpgradeProfileResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName, autoUpgradeProfileName); + AutoUpgradeProfileResource autoUpgradeProfile = client.GetAutoUpgradeProfileResource(autoUpgradeProfileResourceId); + + // invoke the operation + AutoUpgradeProfileData data = new AutoUpgradeProfileData() + { + Channel = ContainerServiceFleetUpgradeChannel.Stable, + }; + ArmOperation lro = await autoUpgradeProfile.UpdateAsync(WaitUntil.Completed, data); + AutoUpgradeProfileResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AutoUpgradeProfileData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Delete an AutoUpgradeProfile resource. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_DeleteAnAutoUpgradeProfileResource() + { + // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/examples/AutoUpgradeProfiles_Delete.json + // this example is just showing the usage of "AutoUpgradeProfiles_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AutoUpgradeProfileResource created on azure + // for more information of creating AutoUpgradeProfileResource, please refer to the document of AutoUpgradeProfileResource + string subscriptionId = "subid1"; + string resourceGroupName = "rg1"; + string fleetName = "fleet1"; + string autoUpgradeProfileName = "autoupgradeprofile1"; + ResourceIdentifier autoUpgradeProfileResourceId = AutoUpgradeProfileResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName, autoUpgradeProfileName); + AutoUpgradeProfileResource autoUpgradeProfile = client.GetAutoUpgradeProfileResource(autoUpgradeProfileResourceId); + + // invoke the operation + await autoUpgradeProfile.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine($"Succeeded"); + } + } +} diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/samples/Generated/Samples/Sample_ContainerServiceFleetCollection.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/samples/Generated/Samples/Sample_ContainerServiceFleetCollection.cs index 47dbcf3f0265..da6d1136d291 100644 --- a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/samples/Generated/Samples/Sample_ContainerServiceFleetCollection.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/samples/Generated/Samples/Sample_ContainerServiceFleetCollection.cs @@ -9,6 +9,7 @@ using System.Threading.Tasks; using Azure.Core; using Azure.Identity; +using Azure.ResourceManager.ContainerServiceFleet.Models; using Azure.ResourceManager.Resources; namespace Azure.ResourceManager.ContainerServiceFleet.Samples @@ -20,7 +21,7 @@ public partial class Sample_ContainerServiceFleetCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListsTheFleetResourcesInAResourceGroup() { - // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/Fleets_ListByResourceGroup.json + // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/examples/Fleets_ListByResourceGroup.json // this example is just showing the usage of "Fleets_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -56,7 +57,7 @@ public async Task GetAll_ListsTheFleetResourcesInAResourceGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetsAFleetResource() { - // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/Fleets_Get.json + // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/examples/Fleets_Get.json // this example is just showing the usage of "Fleets_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -90,7 +91,7 @@ public async Task Get_GetsAFleetResource() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetsAFleetResource() { - // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/Fleets_Get.json + // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/examples/Fleets_Get.json // this example is just showing the usage of "Fleets_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -120,7 +121,7 @@ public async Task Exists_GetsAFleetResource() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetsAFleetResource() { - // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/Fleets_Get.json + // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/examples/Fleets_Get.json // this example is just showing the usage of "Fleets_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -162,7 +163,7 @@ public async Task GetIfExists_GetsAFleetResource() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreatesAFleetResourceWithALongRunningOperation() { - // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/Fleets_CreateOrUpdate.json + // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/examples/Fleets_CreateOrUpdate.json // this example is just showing the usage of "Fleets_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -184,6 +185,14 @@ public async Task CreateOrUpdate_CreatesAFleetResourceWithALongRunningOperation( string fleetName = "fleet1"; ContainerServiceFleetData data = new ContainerServiceFleetData(new AzureLocation("East US")) { + HubProfile = new FleetHubProfile() + { + DnsPrefix = "dnsprefix1", + AgentProfile = new ContainerServiceFleetAgentProfile() + { + VmSize = "Standard_DS1", + }, + }, Tags = { ["archv2"] = "", diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/samples/Generated/Samples/Sample_ContainerServiceFleetMemberCollection.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/samples/Generated/Samples/Sample_ContainerServiceFleetMemberCollection.cs index 9d2dccbd7370..e3b55ac6806d 100644 --- a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/samples/Generated/Samples/Sample_ContainerServiceFleetMemberCollection.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/samples/Generated/Samples/Sample_ContainerServiceFleetMemberCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ContainerServiceFleetMemberCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListsTheMembersOfAFleet() { - // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/FleetMembers_ListByFleet.json + // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/examples/FleetMembers_ListByFleet.json // this example is just showing the usage of "FleetMembers_ListByFleet" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -56,7 +56,7 @@ public async Task GetAll_ListsTheMembersOfAFleet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetsAFleetMemberResource() { - // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/FleetMembers_Get.json + // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/examples/FleetMembers_Get.json // this example is just showing the usage of "FleetMembers_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -91,7 +91,7 @@ public async Task Get_GetsAFleetMemberResource() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetsAFleetMemberResource() { - // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/FleetMembers_Get.json + // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/examples/FleetMembers_Get.json // this example is just showing the usage of "FleetMembers_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -122,7 +122,7 @@ public async Task Exists_GetsAFleetMemberResource() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetsAFleetMemberResource() { - // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/FleetMembers_Get.json + // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/examples/FleetMembers_Get.json // this example is just showing the usage of "FleetMembers_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -165,7 +165,7 @@ public async Task GetIfExists_GetsAFleetMemberResource() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreatesAFleetMemberResourceWithALongRunningOperation() { - // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/FleetMembers_Create.json + // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/examples/FleetMembers_Create.json // this example is just showing the usage of "FleetMembers_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/samples/Generated/Samples/Sample_ContainerServiceFleetMemberResource.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/samples/Generated/Samples/Sample_ContainerServiceFleetMemberResource.cs index d0ffdd1e175b..044df0cc0abb 100644 --- a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/samples/Generated/Samples/Sample_ContainerServiceFleetMemberResource.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/samples/Generated/Samples/Sample_ContainerServiceFleetMemberResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ContainerServiceFleetMemberResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetsAFleetMemberResource() { - // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/FleetMembers_Get.json + // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/examples/FleetMembers_Get.json // this example is just showing the usage of "FleetMembers_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -52,7 +52,7 @@ public async Task Get_GetsAFleetMemberResource() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdatesAFleetMemberResourceSynchronously() { - // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/FleetMembers_Update.json + // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/examples/FleetMembers_Update.json // this example is just showing the usage of "FleetMembers_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -89,7 +89,7 @@ public async Task Update_UpdatesAFleetMemberResourceSynchronously() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeletesAFleetMemberResourceAsynchronouslyWithALongRunningOperation() { - // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/FleetMembers_Delete.json + // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/examples/FleetMembers_Delete.json // this example is just showing the usage of "FleetMembers_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/samples/Generated/Samples/Sample_ContainerServiceFleetResource.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/samples/Generated/Samples/Sample_ContainerServiceFleetResource.cs index 3817bc55392e..46c179410db4 100644 --- a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/samples/Generated/Samples/Sample_ContainerServiceFleetResource.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/samples/Generated/Samples/Sample_ContainerServiceFleetResource.cs @@ -21,7 +21,7 @@ public partial class Sample_ContainerServiceFleetResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetContainerServiceFleets_ListsTheFleetResourcesInASubscription() { - // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/Fleets_ListBySub.json + // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/examples/Fleets_ListBySub.json // this example is just showing the usage of "Fleets_ListBySubscription" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -53,7 +53,7 @@ public async Task GetContainerServiceFleets_ListsTheFleetResourcesInASubscriptio [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetsAFleetResource() { - // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/Fleets_Get.json + // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/examples/Fleets_Get.json // this example is just showing the usage of "Fleets_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -84,7 +84,7 @@ public async Task Get_GetsAFleetResource() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdateAFleet() { - // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/Fleets_PatchTags.json + // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/examples/Fleets_PatchTags.json // this example is just showing the usage of "Fleets_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -125,7 +125,7 @@ public async Task Update_UpdateAFleet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeletesAFleetResourceAsynchronouslyWithALongRunningOperation() { - // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/Fleets_Delete.json + // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/examples/Fleets_Delete.json // this example is just showing the usage of "Fleets_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -152,7 +152,7 @@ public async Task Delete_DeletesAFleetResourceAsynchronouslyWithALongRunningOper [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetCredentials_ListsTheUserCredentialsOfAFleet() { - // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/Fleets_ListCredentialsResult.json + // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/examples/Fleets_ListCredentialsResult.json // this example is just showing the usage of "Fleets_ListCredentials" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/samples/Generated/Samples/Sample_ContainerServiceFleetUpdateRunCollection.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/samples/Generated/Samples/Sample_ContainerServiceFleetUpdateRunCollection.cs index 7392dcdbe620..d699768d78b4 100644 --- a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/samples/Generated/Samples/Sample_ContainerServiceFleetUpdateRunCollection.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/samples/Generated/Samples/Sample_ContainerServiceFleetUpdateRunCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ContainerServiceFleetUpdateRunCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListsTheUpdateRunResourcesByFleet() { - // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/UpdateRuns_ListByFleet.json + // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/examples/UpdateRuns_ListByFleet.json // this example is just showing the usage of "UpdateRuns_ListByFleet" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -57,7 +57,7 @@ public async Task GetAll_ListsTheUpdateRunResourcesByFleet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetsAnUpdateRunResource() { - // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/UpdateRuns_Get.json + // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/examples/UpdateRuns_Get.json // this example is just showing the usage of "UpdateRuns_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -92,7 +92,7 @@ public async Task Get_GetsAnUpdateRunResource() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetsAnUpdateRunResource() { - // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/UpdateRuns_Get.json + // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/examples/UpdateRuns_Get.json // this example is just showing the usage of "UpdateRuns_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -123,7 +123,7 @@ public async Task Exists_GetsAnUpdateRunResource() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetsAnUpdateRunResource() { - // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/UpdateRuns_Get.json + // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/examples/UpdateRuns_Get.json // this example is just showing the usage of "UpdateRuns_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -166,7 +166,7 @@ public async Task GetIfExists_GetsAnUpdateRunResource() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateAnUpdateRun() { - // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/UpdateRuns_CreateOrUpdate.json + // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/examples/UpdateRuns_CreateOrUpdate.json // this example is just showing the usage of "UpdateRuns_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -206,7 +206,7 @@ public async Task CreateOrUpdate_CreateAnUpdateRun() KubernetesVersion = "1.26.1", }) { - SelectionType = NodeImageSelectionType.Latest, + NodeImageSelection = new NodeImageSelection(NodeImageSelectionType.Latest), }, }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, updateRunName, data); diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/samples/Generated/Samples/Sample_ContainerServiceFleetUpdateRunResource.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/samples/Generated/Samples/Sample_ContainerServiceFleetUpdateRunResource.cs index 54a3321de84b..5c93bd897c7b 100644 --- a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/samples/Generated/Samples/Sample_ContainerServiceFleetUpdateRunResource.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/samples/Generated/Samples/Sample_ContainerServiceFleetUpdateRunResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ContainerServiceFleetUpdateRunResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetsAnUpdateRunResource() { - // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/UpdateRuns_Get.json + // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/examples/UpdateRuns_Get.json // this example is just showing the usage of "UpdateRuns_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -52,7 +52,7 @@ public async Task Get_GetsAnUpdateRunResource() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreateAnUpdateRun() { - // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/UpdateRuns_CreateOrUpdate.json + // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/examples/UpdateRuns_CreateOrUpdate.json // this example is just showing the usage of "UpdateRuns_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -89,7 +89,7 @@ public async Task Update_CreateAnUpdateRun() KubernetesVersion = "1.26.1", }) { - SelectionType = NodeImageSelectionType.Latest, + NodeImageSelection = new NodeImageSelection(NodeImageSelectionType.Latest), }, }; ArmOperation lro = await containerServiceFleetUpdateRun.UpdateAsync(WaitUntil.Completed, data); @@ -107,7 +107,7 @@ public async Task Update_CreateAnUpdateRun() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteAnUpdateRunResource() { - // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/UpdateRuns_Delete.json + // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/examples/UpdateRuns_Delete.json // this example is just showing the usage of "UpdateRuns_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -130,12 +130,49 @@ public async Task Delete_DeleteAnUpdateRunResource() Console.WriteLine($"Succeeded"); } + // Skips one or more member/group/stage/afterStageWait(s) of an UpdateRun. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Skip_SkipsOneOrMoreMemberGroupStageAfterStageWaitSOfAnUpdateRun() + { + // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/examples/UpdateRuns_Skip.json + // this example is just showing the usage of "UpdateRuns_Skip" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ContainerServiceFleetUpdateRunResource created on azure + // for more information of creating ContainerServiceFleetUpdateRunResource, please refer to the document of ContainerServiceFleetUpdateRunResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg1"; + string fleetName = "fleet1"; + string updateRunName = "run1"; + ResourceIdentifier containerServiceFleetUpdateRunResourceId = ContainerServiceFleetUpdateRunResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName, updateRunName); + ContainerServiceFleetUpdateRunResource containerServiceFleetUpdateRun = client.GetContainerServiceFleetUpdateRunResource(containerServiceFleetUpdateRunResourceId); + + // invoke the operation + ContainerServiceFleetSkipProperties body = new ContainerServiceFleetSkipProperties(new ContainerServiceFleetSkipTarget[] + { +new ContainerServiceFleetSkipTarget(ContainerServiceFleetTargetType.Member,"member-one"),new ContainerServiceFleetSkipTarget(ContainerServiceFleetTargetType.AfterStageWait,"stage1") + }); + ArmOperation lro = await containerServiceFleetUpdateRun.SkipAsync(WaitUntil.Completed, body); + ContainerServiceFleetUpdateRunResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ContainerServiceFleetUpdateRunData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + // Starts an UpdateRun. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Start_StartsAnUpdateRun() { - // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/UpdateRuns_Start.json + // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/examples/UpdateRuns_Start.json // this example is just showing the usage of "UpdateRuns_Start" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -168,7 +205,7 @@ public async Task Start_StartsAnUpdateRun() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Stop_StopsAnUpdateRun() { - // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/UpdateRuns_Stop.json + // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/examples/UpdateRuns_Stop.json // this example is just showing the usage of "UpdateRuns_Stop" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/samples/Generated/Samples/Sample_FleetUpdateStrategyCollection.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/samples/Generated/Samples/Sample_FleetUpdateStrategyCollection.cs index 1391422b6af5..5a6c7f18f027 100644 --- a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/samples/Generated/Samples/Sample_FleetUpdateStrategyCollection.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/samples/Generated/Samples/Sample_FleetUpdateStrategyCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_FleetUpdateStrategyCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListTheFleetUpdateStrategyResourcesByFleet() { - // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/UpdateStrategies_ListByFleet.json + // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/examples/UpdateStrategies_ListByFleet.json // this example is just showing the usage of "FleetUpdateStrategies_ListByFleet" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -57,7 +57,7 @@ public async Task GetAll_ListTheFleetUpdateStrategyResourcesByFleet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAFleetUpdateStrategyResource() { - // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/UpdateStrategies_Get.json + // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/examples/UpdateStrategies_Get.json // this example is just showing the usage of "FleetUpdateStrategies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -92,7 +92,7 @@ public async Task Get_GetAFleetUpdateStrategyResource() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAFleetUpdateStrategyResource() { - // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/UpdateStrategies_Get.json + // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/examples/UpdateStrategies_Get.json // this example is just showing the usage of "FleetUpdateStrategies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -123,7 +123,7 @@ public async Task Exists_GetAFleetUpdateStrategyResource() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetAFleetUpdateStrategyResource() { - // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/UpdateStrategies_Get.json + // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/examples/UpdateStrategies_Get.json // this example is just showing the usage of "FleetUpdateStrategies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -166,7 +166,7 @@ public async Task GetIfExists_GetAFleetUpdateStrategyResource() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateAFleetUpdateStrategy() { - // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/UpdateStrategies_CreateOrUpdate.json + // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/examples/UpdateStrategies_CreateOrUpdate.json // this example is just showing the usage of "FleetUpdateStrategies_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/samples/Generated/Samples/Sample_FleetUpdateStrategyResource.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/samples/Generated/Samples/Sample_FleetUpdateStrategyResource.cs index 9303f3adb271..112ed43b8333 100644 --- a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/samples/Generated/Samples/Sample_FleetUpdateStrategyResource.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/samples/Generated/Samples/Sample_FleetUpdateStrategyResource.cs @@ -20,7 +20,7 @@ public partial class Sample_FleetUpdateStrategyResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAFleetUpdateStrategyResource() { - // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/UpdateStrategies_Get.json + // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/examples/UpdateStrategies_Get.json // this example is just showing the usage of "FleetUpdateStrategies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -52,7 +52,7 @@ public async Task Get_GetAFleetUpdateStrategyResource() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreateAFleetUpdateStrategy() { - // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/UpdateStrategies_CreateOrUpdate.json + // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/examples/UpdateStrategies_CreateOrUpdate.json // this example is just showing the usage of "FleetUpdateStrategies_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -99,7 +99,7 @@ public async Task Update_CreateAFleetUpdateStrategy() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteAFleetUpdateStrategyResource() { - // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/UpdateStrategies_Delete.json + // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/examples/UpdateStrategies_Delete.json // this example is just showing the usage of "FleetUpdateStrategies_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Azure.ResourceManager.ContainerServiceFleet.csproj b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Azure.ResourceManager.ContainerServiceFleet.csproj index 265452ef51a5..6d1832eab0c4 100644 --- a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Azure.ResourceManager.ContainerServiceFleet.csproj +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Azure.ResourceManager.ContainerServiceFleet.csproj @@ -1,6 +1,6 @@ - 1.1.0-beta.1 + 1.1.0-beta.2 1.0.0 Azure.ResourceManager.ContainerServiceFleet diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Customized/ContainerServiceFleetManagedClusterUpdate.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Customized/ContainerServiceFleetManagedClusterUpdate.cs new file mode 100644 index 000000000000..71f4ae8d12ce --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Customized/ContainerServiceFleetManagedClusterUpdate.cs @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System; +using System.Collections.Generic; +using System.ComponentModel; + +namespace Azure.ResourceManager.ContainerServiceFleet.Models +{ + public partial class ContainerServiceFleetManagedClusterUpdate + { + /// The node image upgrade type. + [EditorBrowsable(EditorBrowsableState.Never)] + public NodeImageSelectionType? SelectionType + { + get => NodeImageSelection is null ? default(NodeImageSelectionType?) : NodeImageSelection.SelectionType; + set + { + NodeImageSelection = value.HasValue ? new NodeImageSelection(value.Value) : null; + } + } + } +} \ No newline at end of file diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/ArmContainerServiceFleetModelFactory.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/ArmContainerServiceFleetModelFactory.cs index 32f57a392309..6c1a73fc7969 100644 --- a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/ArmContainerServiceFleetModelFactory.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/ArmContainerServiceFleetModelFactory.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; +using System.ComponentModel; using System.Linq; using Azure.Core; using Azure.ResourceManager.Models; @@ -26,8 +27,9 @@ public static partial class ArmContainerServiceFleetModelFactory /// If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. /// Managed identity. /// The status of the last operation. + /// The FleetHubProfile configures the Fleet's hub. /// A new instance for mocking. - public static ContainerServiceFleetData ContainerServiceFleetData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ETag? eTag = null, ManagedServiceIdentity identity = null, FleetProvisioningState? provisioningState = null) + public static ContainerServiceFleetData ContainerServiceFleetData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ETag? eTag = null, ManagedServiceIdentity identity = null, FleetProvisioningState? provisioningState = null, FleetHubProfile hubProfile = null) { tags ??= new Dictionary(); @@ -41,6 +43,60 @@ public static ContainerServiceFleetData ContainerServiceFleetData(ResourceIdenti eTag, identity, provisioningState, + hubProfile, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// DNS prefix used to create the FQDN for the Fleet hub. + /// The access profile for the Fleet hub API server. + /// The agent profile for the Fleet hub. + /// The FQDN of the Fleet hub. + /// The Kubernetes version of the Fleet hub. + /// The Azure Portal FQDN of the Fleet hub. + /// A new instance for mocking. + public static FleetHubProfile FleetHubProfile(string dnsPrefix = null, ContainerServiceFleetAPIServerAccessProfile apiServerAccessProfile = null, ContainerServiceFleetAgentProfile agentProfile = null, string fqdn = null, string kubernetesVersion = null, string portalFqdn = null) + { + return new FleetHubProfile( + dnsPrefix, + apiServerAccessProfile, + agentProfile, + fqdn, + kubernetesVersion, + portalFqdn, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. + /// The provisioning state of the AutoUpgradeProfile resource. + /// The resource id of the UpdateStrategy resource to reference. If not specified, the auto upgrade will run on all clusters which are members of the fleet. + /// Configures how auto-upgrade will be run. + /// The node image upgrade to be applied to the target clusters in auto upgrade. + /// + /// If set to False: the auto upgrade has effect - target managed clusters will be upgraded on schedule. + /// If set to True: the auto upgrade has no effect - no upgrade will be run on the target managed clusters. + /// This is a boolean and not an enum because enabled/disabled are all available states of the auto upgrade profile. + /// By default, this is set to False. + /// + /// A new instance for mocking. + public static AutoUpgradeProfileData AutoUpgradeProfileData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ETag? eTag = null, AutoUpgradeProfileProvisioningState? provisioningState = null, ResourceIdentifier updateStrategyId = null, ContainerServiceFleetUpgradeChannel? channel = null, AutoUpgradeNodeImageSelectionType? selectionType = null, bool? disabled = null) + { + return new AutoUpgradeProfileData( + id, + name, + resourceType, + systemData, + eTag, + provisioningState, + updateStrategyId, + channel, + selectionType.HasValue ? new AutoUpgradeNodeImageSelection(selectionType.Value, serializedAdditionalRawData: null) : null, + disabled, serializedAdditionalRawData: null); } @@ -134,6 +190,14 @@ public static ContainerServiceFleetUpdateRunData ContainerServiceFleetUpdateRunD serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// The image version to upgrade the nodes to (e.g., 'AKSUbuntu-1804gen2containerd-2022.12.13'). + /// A new instance for mocking. + public static NodeImageVersion NodeImageVersion(string version = null) + { + return new NodeImageVersion(version, serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The status of the UpdateRun. /// The stages composing an update run. Stages are run sequentially withing an UpdateRun. @@ -210,14 +274,6 @@ public static ContainerServiceFleetWaitStatus ContainerServiceFleetWaitStatus(Co return new ContainerServiceFleetWaitStatus(status, waitDurationInSeconds, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The image version to upgrade the nodes to (e.g., 'AKSUbuntu-1804gen2containerd-2022.12.13'). - /// A new instance for mocking. - public static NodeImageVersion NodeImageVersion(string version = null) - { - return new NodeImageVersion(version, serializedAdditionalRawData: null); - } - /// Initializes a new instance of . /// The id. /// The name. @@ -241,5 +297,22 @@ public static FleetUpdateStrategyData FleetUpdateStrategyData(ResourceIdentifier strategyStages != null ? new ContainerServiceFleetUpdateRunStrategy(strategyStages?.ToList(), serializedAdditionalRawData: null) : null, serializedAdditionalRawData: null); } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. + /// Managed identity. + /// The status of the last operation. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static ContainerServiceFleetData ContainerServiceFleetData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ETag? eTag, ManagedServiceIdentity identity, FleetProvisioningState? provisioningState) + { + return ContainerServiceFleetData(id: id, name: name, resourceType: resourceType, systemData: systemData, tags: tags, location: location, eTag: eTag, identity: identity, provisioningState: provisioningState, hubProfile: default); + } } } diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/AutoUpgradeProfileCollection.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/AutoUpgradeProfileCollection.cs new file mode 100644 index 000000000000..7cb39a39a567 --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/AutoUpgradeProfileCollection.cs @@ -0,0 +1,497 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.ContainerServiceFleet +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get an instance call the GetAutoUpgradeProfiles method from an instance of . + /// + public partial class AutoUpgradeProfileCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _autoUpgradeProfileClientDiagnostics; + private readonly AutoUpgradeProfilesRestOperations _autoUpgradeProfileRestClient; + + /// Initializes a new instance of the class for mocking. + protected AutoUpgradeProfileCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal AutoUpgradeProfileCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _autoUpgradeProfileClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ContainerServiceFleet", AutoUpgradeProfileResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(AutoUpgradeProfileResource.ResourceType, out string autoUpgradeProfileApiVersion); + _autoUpgradeProfileRestClient = new AutoUpgradeProfilesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, autoUpgradeProfileApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ContainerServiceFleetResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ContainerServiceFleetResource.ResourceType), nameof(id)); + } + + /// + /// Create a AutoUpgradeProfile + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/autoUpgradeProfiles/{autoUpgradeProfileName} + /// + /// + /// Operation Id + /// AutoUpgradeProfiles_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-05-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the AutoUpgradeProfile resource. + /// Resource create parameters. + /// The request should only proceed if an entity matches this string. + /// The request should only proceed if no entity matches this string. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string autoUpgradeProfileName, AutoUpgradeProfileData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(autoUpgradeProfileName, nameof(autoUpgradeProfileName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _autoUpgradeProfileClientDiagnostics.CreateScope("AutoUpgradeProfileCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _autoUpgradeProfileRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, autoUpgradeProfileName, data, ifMatch, ifNoneMatch, cancellationToken).ConfigureAwait(false); + var operation = new ContainerServiceFleetArmOperation(new AutoUpgradeProfileOperationSource(Client), _autoUpgradeProfileClientDiagnostics, Pipeline, _autoUpgradeProfileRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, autoUpgradeProfileName, data, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create a AutoUpgradeProfile + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/autoUpgradeProfiles/{autoUpgradeProfileName} + /// + /// + /// Operation Id + /// AutoUpgradeProfiles_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-05-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the AutoUpgradeProfile resource. + /// Resource create parameters. + /// The request should only proceed if an entity matches this string. + /// The request should only proceed if no entity matches this string. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string autoUpgradeProfileName, AutoUpgradeProfileData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(autoUpgradeProfileName, nameof(autoUpgradeProfileName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _autoUpgradeProfileClientDiagnostics.CreateScope("AutoUpgradeProfileCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _autoUpgradeProfileRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, autoUpgradeProfileName, data, ifMatch, ifNoneMatch, cancellationToken); + var operation = new ContainerServiceFleetArmOperation(new AutoUpgradeProfileOperationSource(Client), _autoUpgradeProfileClientDiagnostics, Pipeline, _autoUpgradeProfileRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, autoUpgradeProfileName, data, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a AutoUpgradeProfile + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/autoUpgradeProfiles/{autoUpgradeProfileName} + /// + /// + /// Operation Id + /// AutoUpgradeProfiles_Get + /// + /// + /// Default Api Version + /// 2024-05-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the AutoUpgradeProfile resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string autoUpgradeProfileName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(autoUpgradeProfileName, nameof(autoUpgradeProfileName)); + + using var scope = _autoUpgradeProfileClientDiagnostics.CreateScope("AutoUpgradeProfileCollection.Get"); + scope.Start(); + try + { + var response = await _autoUpgradeProfileRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, autoUpgradeProfileName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new AutoUpgradeProfileResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a AutoUpgradeProfile + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/autoUpgradeProfiles/{autoUpgradeProfileName} + /// + /// + /// Operation Id + /// AutoUpgradeProfiles_Get + /// + /// + /// Default Api Version + /// 2024-05-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the AutoUpgradeProfile resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string autoUpgradeProfileName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(autoUpgradeProfileName, nameof(autoUpgradeProfileName)); + + using var scope = _autoUpgradeProfileClientDiagnostics.CreateScope("AutoUpgradeProfileCollection.Get"); + scope.Start(); + try + { + var response = _autoUpgradeProfileRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, autoUpgradeProfileName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new AutoUpgradeProfileResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List AutoUpgradeProfile resources by Fleet + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/autoUpgradeProfiles + /// + /// + /// Operation Id + /// AutoUpgradeProfiles_ListByFleet + /// + /// + /// Default Api Version + /// 2024-05-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _autoUpgradeProfileRestClient.CreateListByFleetRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _autoUpgradeProfileRestClient.CreateListByFleetNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new AutoUpgradeProfileResource(Client, AutoUpgradeProfileData.DeserializeAutoUpgradeProfileData(e)), _autoUpgradeProfileClientDiagnostics, Pipeline, "AutoUpgradeProfileCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List AutoUpgradeProfile resources by Fleet + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/autoUpgradeProfiles + /// + /// + /// Operation Id + /// AutoUpgradeProfiles_ListByFleet + /// + /// + /// Default Api Version + /// 2024-05-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _autoUpgradeProfileRestClient.CreateListByFleetRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _autoUpgradeProfileRestClient.CreateListByFleetNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new AutoUpgradeProfileResource(Client, AutoUpgradeProfileData.DeserializeAutoUpgradeProfileData(e)), _autoUpgradeProfileClientDiagnostics, Pipeline, "AutoUpgradeProfileCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/autoUpgradeProfiles/{autoUpgradeProfileName} + /// + /// + /// Operation Id + /// AutoUpgradeProfiles_Get + /// + /// + /// Default Api Version + /// 2024-05-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the AutoUpgradeProfile resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string autoUpgradeProfileName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(autoUpgradeProfileName, nameof(autoUpgradeProfileName)); + + using var scope = _autoUpgradeProfileClientDiagnostics.CreateScope("AutoUpgradeProfileCollection.Exists"); + scope.Start(); + try + { + var response = await _autoUpgradeProfileRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, autoUpgradeProfileName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/autoUpgradeProfiles/{autoUpgradeProfileName} + /// + /// + /// Operation Id + /// AutoUpgradeProfiles_Get + /// + /// + /// Default Api Version + /// 2024-05-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the AutoUpgradeProfile resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string autoUpgradeProfileName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(autoUpgradeProfileName, nameof(autoUpgradeProfileName)); + + using var scope = _autoUpgradeProfileClientDiagnostics.CreateScope("AutoUpgradeProfileCollection.Exists"); + scope.Start(); + try + { + var response = _autoUpgradeProfileRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, autoUpgradeProfileName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/autoUpgradeProfiles/{autoUpgradeProfileName} + /// + /// + /// Operation Id + /// AutoUpgradeProfiles_Get + /// + /// + /// Default Api Version + /// 2024-05-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the AutoUpgradeProfile resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string autoUpgradeProfileName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(autoUpgradeProfileName, nameof(autoUpgradeProfileName)); + + using var scope = _autoUpgradeProfileClientDiagnostics.CreateScope("AutoUpgradeProfileCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _autoUpgradeProfileRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, autoUpgradeProfileName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new AutoUpgradeProfileResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/autoUpgradeProfiles/{autoUpgradeProfileName} + /// + /// + /// Operation Id + /// AutoUpgradeProfiles_Get + /// + /// + /// Default Api Version + /// 2024-05-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the AutoUpgradeProfile resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string autoUpgradeProfileName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(autoUpgradeProfileName, nameof(autoUpgradeProfileName)); + + using var scope = _autoUpgradeProfileClientDiagnostics.CreateScope("AutoUpgradeProfileCollection.GetIfExists"); + scope.Start(); + try + { + var response = _autoUpgradeProfileRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, autoUpgradeProfileName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new AutoUpgradeProfileResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/AutoUpgradeProfileData.Serialization.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/AutoUpgradeProfileData.Serialization.cs new file mode 100644 index 000000000000..83170695a595 --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/AutoUpgradeProfileData.Serialization.cs @@ -0,0 +1,250 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.ContainerServiceFleet.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.ContainerServiceFleet +{ + public partial class AutoUpgradeProfileData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AutoUpgradeProfileData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (options.Format != "W" && Optional.IsDefined(ETag)) + { + writer.WritePropertyName("eTag"u8); + writer.WriteStringValue(ETag.Value.ToString()); + } + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (Optional.IsDefined(UpdateStrategyId)) + { + writer.WritePropertyName("updateStrategyId"u8); + writer.WriteStringValue(UpdateStrategyId); + } + if (Optional.IsDefined(Channel)) + { + writer.WritePropertyName("channel"u8); + writer.WriteStringValue(Channel.Value.ToString()); + } + if (Optional.IsDefined(NodeImageSelection)) + { + writer.WritePropertyName("nodeImageSelection"u8); + writer.WriteObjectValue(NodeImageSelection, options); + } + if (Optional.IsDefined(Disabled)) + { + writer.WritePropertyName("disabled"u8); + writer.WriteBooleanValue(Disabled.Value); + } + writer.WriteEndObject(); + } + + AutoUpgradeProfileData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AutoUpgradeProfileData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAutoUpgradeProfileData(document.RootElement, options); + } + + internal static AutoUpgradeProfileData DeserializeAutoUpgradeProfileData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ETag? eTag = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + AutoUpgradeProfileProvisioningState? provisioningState = default; + ResourceIdentifier updateStrategyId = default; + ContainerServiceFleetUpgradeChannel? channel = default; + AutoUpgradeNodeImageSelection nodeImageSelection = default; + bool? disabled = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("eTag"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + eTag = new ETag(property.Value.GetString()); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("provisioningState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new AutoUpgradeProfileProvisioningState(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("updateStrategyId"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + updateStrategyId = new ResourceIdentifier(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("channel"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + channel = new ContainerServiceFleetUpgradeChannel(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("nodeImageSelection"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nodeImageSelection = AutoUpgradeNodeImageSelection.DeserializeAutoUpgradeNodeImageSelection(property0.Value, options); + continue; + } + if (property0.NameEquals("disabled"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + disabled = property0.Value.GetBoolean(); + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AutoUpgradeProfileData( + id, + name, + type, + systemData, + eTag, + provisioningState, + updateStrategyId, + channel, + nodeImageSelection, + disabled, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AutoUpgradeProfileData)} does not support writing '{options.Format}' format."); + } + } + + AutoUpgradeProfileData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeAutoUpgradeProfileData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AutoUpgradeProfileData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/AutoUpgradeProfileData.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/AutoUpgradeProfileData.cs new file mode 100644 index 000000000000..4b97106a4984 --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/AutoUpgradeProfileData.cs @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.ContainerServiceFleet.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.ContainerServiceFleet +{ + /// + /// A class representing the AutoUpgradeProfile data model. + /// The AutoUpgradeProfile resource. + /// + public partial class AutoUpgradeProfileData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public AutoUpgradeProfileData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. + /// The provisioning state of the AutoUpgradeProfile resource. + /// The resource id of the UpdateStrategy resource to reference. If not specified, the auto upgrade will run on all clusters which are members of the fleet. + /// Configures how auto-upgrade will be run. + /// The node image upgrade to be applied to the target clusters in auto upgrade. + /// + /// If set to False: the auto upgrade has effect - target managed clusters will be upgraded on schedule. + /// If set to True: the auto upgrade has no effect - no upgrade will be run on the target managed clusters. + /// This is a boolean and not an enum because enabled/disabled are all available states of the auto upgrade profile. + /// By default, this is set to False. + /// + /// Keeps track of any properties unknown to the library. + internal AutoUpgradeProfileData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ETag? eTag, AutoUpgradeProfileProvisioningState? provisioningState, ResourceIdentifier updateStrategyId, ContainerServiceFleetUpgradeChannel? channel, AutoUpgradeNodeImageSelection nodeImageSelection, bool? disabled, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + ETag = eTag; + ProvisioningState = provisioningState; + UpdateStrategyId = updateStrategyId; + Channel = channel; + NodeImageSelection = nodeImageSelection; + Disabled = disabled; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. + public ETag? ETag { get; } + /// The provisioning state of the AutoUpgradeProfile resource. + public AutoUpgradeProfileProvisioningState? ProvisioningState { get; } + /// The resource id of the UpdateStrategy resource to reference. If not specified, the auto upgrade will run on all clusters which are members of the fleet. + public ResourceIdentifier UpdateStrategyId { get; set; } + /// Configures how auto-upgrade will be run. + public ContainerServiceFleetUpgradeChannel? Channel { get; set; } + /// The node image upgrade to be applied to the target clusters in auto upgrade. + internal AutoUpgradeNodeImageSelection NodeImageSelection { get; set; } + /// The node image upgrade type. + public AutoUpgradeNodeImageSelectionType? SelectionType + { + get => NodeImageSelection is null ? default(AutoUpgradeNodeImageSelectionType?) : NodeImageSelection.SelectionType; + set + { + NodeImageSelection = value.HasValue ? new AutoUpgradeNodeImageSelection(value.Value) : null; + } + } + + /// + /// If set to False: the auto upgrade has effect - target managed clusters will be upgraded on schedule. + /// If set to True: the auto upgrade has no effect - no upgrade will be run on the target managed clusters. + /// This is a boolean and not an enum because enabled/disabled are all available states of the auto upgrade profile. + /// By default, this is set to False. + /// + public bool? Disabled { get; set; } + } +} diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/AutoUpgradeProfileResource.Serialization.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/AutoUpgradeProfileResource.Serialization.cs new file mode 100644 index 000000000000..9df7a8401d6f --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/AutoUpgradeProfileResource.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.ContainerServiceFleet +{ + public partial class AutoUpgradeProfileResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + AutoUpgradeProfileData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + AutoUpgradeProfileData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/AutoUpgradeProfileResource.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/AutoUpgradeProfileResource.cs new file mode 100644 index 000000000000..c5deec2cc26f --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/AutoUpgradeProfileResource.cs @@ -0,0 +1,353 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.ContainerServiceFleet +{ + /// + /// A Class representing an AutoUpgradeProfile along with the instance operations that can be performed on it. + /// If you have a you can construct an + /// from an instance of using the GetAutoUpgradeProfileResource method. + /// Otherwise you can get one from its parent resource using the GetAutoUpgradeProfile method. + /// + public partial class AutoUpgradeProfileResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The fleetName. + /// The autoUpgradeProfileName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string fleetName, string autoUpgradeProfileName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/autoUpgradeProfiles/{autoUpgradeProfileName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _autoUpgradeProfileClientDiagnostics; + private readonly AutoUpgradeProfilesRestOperations _autoUpgradeProfileRestClient; + private readonly AutoUpgradeProfileData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.ContainerService/fleets/autoUpgradeProfiles"; + + /// Initializes a new instance of the class for mocking. + protected AutoUpgradeProfileResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal AutoUpgradeProfileResource(ArmClient client, AutoUpgradeProfileData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal AutoUpgradeProfileResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _autoUpgradeProfileClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ContainerServiceFleet", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string autoUpgradeProfileApiVersion); + _autoUpgradeProfileRestClient = new AutoUpgradeProfilesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, autoUpgradeProfileApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual AutoUpgradeProfileData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Get a AutoUpgradeProfile + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/autoUpgradeProfiles/{autoUpgradeProfileName} + /// + /// + /// Operation Id + /// AutoUpgradeProfiles_Get + /// + /// + /// Default Api Version + /// 2024-05-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _autoUpgradeProfileClientDiagnostics.CreateScope("AutoUpgradeProfileResource.Get"); + scope.Start(); + try + { + var response = await _autoUpgradeProfileRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new AutoUpgradeProfileResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a AutoUpgradeProfile + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/autoUpgradeProfiles/{autoUpgradeProfileName} + /// + /// + /// Operation Id + /// AutoUpgradeProfiles_Get + /// + /// + /// Default Api Version + /// 2024-05-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _autoUpgradeProfileClientDiagnostics.CreateScope("AutoUpgradeProfileResource.Get"); + scope.Start(); + try + { + var response = _autoUpgradeProfileRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new AutoUpgradeProfileResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a AutoUpgradeProfile + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/autoUpgradeProfiles/{autoUpgradeProfileName} + /// + /// + /// Operation Id + /// AutoUpgradeProfiles_Delete + /// + /// + /// Default Api Version + /// 2024-05-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The request should only proceed if an entity matches this string. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, string ifMatch = null, CancellationToken cancellationToken = default) + { + using var scope = _autoUpgradeProfileClientDiagnostics.CreateScope("AutoUpgradeProfileResource.Delete"); + scope.Start(); + try + { + var response = await _autoUpgradeProfileRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, cancellationToken).ConfigureAwait(false); + var operation = new ContainerServiceFleetArmOperation(_autoUpgradeProfileClientDiagnostics, Pipeline, _autoUpgradeProfileRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a AutoUpgradeProfile + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/autoUpgradeProfiles/{autoUpgradeProfileName} + /// + /// + /// Operation Id + /// AutoUpgradeProfiles_Delete + /// + /// + /// Default Api Version + /// 2024-05-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The request should only proceed if an entity matches this string. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, string ifMatch = null, CancellationToken cancellationToken = default) + { + using var scope = _autoUpgradeProfileClientDiagnostics.CreateScope("AutoUpgradeProfileResource.Delete"); + scope.Start(); + try + { + var response = _autoUpgradeProfileRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, cancellationToken); + var operation = new ContainerServiceFleetArmOperation(_autoUpgradeProfileClientDiagnostics, Pipeline, _autoUpgradeProfileRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create a AutoUpgradeProfile + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/autoUpgradeProfiles/{autoUpgradeProfileName} + /// + /// + /// Operation Id + /// AutoUpgradeProfiles_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-05-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Resource create parameters. + /// The request should only proceed if an entity matches this string. + /// The request should only proceed if no entity matches this string. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, AutoUpgradeProfileData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _autoUpgradeProfileClientDiagnostics.CreateScope("AutoUpgradeProfileResource.Update"); + scope.Start(); + try + { + var response = await _autoUpgradeProfileRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, ifMatch, ifNoneMatch, cancellationToken).ConfigureAwait(false); + var operation = new ContainerServiceFleetArmOperation(new AutoUpgradeProfileOperationSource(Client), _autoUpgradeProfileClientDiagnostics, Pipeline, _autoUpgradeProfileRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create a AutoUpgradeProfile + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/autoUpgradeProfiles/{autoUpgradeProfileName} + /// + /// + /// Operation Id + /// AutoUpgradeProfiles_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-05-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Resource create parameters. + /// The request should only proceed if an entity matches this string. + /// The request should only proceed if no entity matches this string. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, AutoUpgradeProfileData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _autoUpgradeProfileClientDiagnostics.CreateScope("AutoUpgradeProfileResource.Update"); + scope.Start(); + try + { + var response = _autoUpgradeProfileRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, ifMatch, ifNoneMatch, cancellationToken); + var operation = new ContainerServiceFleetArmOperation(new AutoUpgradeProfileOperationSource(Client), _autoUpgradeProfileClientDiagnostics, Pipeline, _autoUpgradeProfileRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/ContainerServiceFleetCollection.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/ContainerServiceFleetCollection.cs index 1c90020d7bf3..45c7429dcb9e 100644 --- a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/ContainerServiceFleetCollection.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/ContainerServiceFleetCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-10-15 + /// 2024-05-02-preview /// /// /// Resource @@ -91,7 +91,7 @@ public virtual async Task> CreateOrU try { var response = await _containerServiceFleetFleetsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, fleetName, data, ifMatch, ifNoneMatch, cancellationToken).ConfigureAwait(false); - var operation = new ContainerServiceFleetArmOperation(new ContainerServiceFleetOperationSource(Client), _containerServiceFleetFleetsClientDiagnostics, Pipeline, _containerServiceFleetFleetsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, fleetName, data, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.AzureAsyncOperation, apiVersionOverrideValue: "2016-03-30"); + var operation = new ContainerServiceFleetArmOperation(new ContainerServiceFleetOperationSource(Client), _containerServiceFleetFleetsClientDiagnostics, Pipeline, _containerServiceFleetFleetsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, fleetName, data, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -116,7 +116,7 @@ public virtual async Task> CreateOrU /// /// /// Default Api Version - /// 2023-10-15 + /// 2024-05-02-preview /// /// /// Resource @@ -142,7 +142,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUn try { var response = _containerServiceFleetFleetsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, fleetName, data, ifMatch, ifNoneMatch, cancellationToken); - var operation = new ContainerServiceFleetArmOperation(new ContainerServiceFleetOperationSource(Client), _containerServiceFleetFleetsClientDiagnostics, Pipeline, _containerServiceFleetFleetsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, fleetName, data, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.AzureAsyncOperation, apiVersionOverrideValue: "2016-03-30"); + var operation = new ContainerServiceFleetArmOperation(new ContainerServiceFleetOperationSource(Client), _containerServiceFleetFleetsClientDiagnostics, Pipeline, _containerServiceFleetFleetsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, fleetName, data, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -167,7 +167,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUn /// /// /// Default Api Version - /// 2023-10-15 + /// 2024-05-02-preview /// /// /// Resource @@ -212,7 +212,7 @@ public virtual async Task> GetAsync(stri /// /// /// Default Api Version - /// 2023-10-15 + /// 2024-05-02-preview /// /// /// Resource @@ -257,7 +257,7 @@ public virtual Response Get(string fleetName, Can /// /// /// Default Api Version - /// 2023-10-15 + /// 2024-05-02-preview /// /// /// Resource @@ -287,7 +287,7 @@ public virtual AsyncPageable GetAllAsync(Cancella /// /// /// Default Api Version - /// 2023-10-15 + /// 2024-05-02-preview /// /// /// Resource @@ -317,7 +317,7 @@ public virtual Pageable GetAll(CancellationToken /// /// /// Default Api Version - /// 2023-10-15 + /// 2024-05-02-preview /// /// /// Resource @@ -360,7 +360,7 @@ public virtual async Task> ExistsAsync(string fleetName, Cancella /// /// /// Default Api Version - /// 2023-10-15 + /// 2024-05-02-preview /// /// /// Resource @@ -403,7 +403,7 @@ public virtual Response Exists(string fleetName, CancellationToken cancell /// /// /// Default Api Version - /// 2023-10-15 + /// 2024-05-02-preview /// /// /// Resource @@ -448,7 +448,7 @@ public virtual async Task> GetIf /// /// /// Default Api Version - /// 2023-10-15 + /// 2024-05-02-preview /// /// /// Resource diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/ContainerServiceFleetData.Serialization.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/ContainerServiceFleetData.Serialization.cs index e77d973b76c4..c12e6149f4e9 100644 --- a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/ContainerServiceFleetData.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/ContainerServiceFleetData.Serialization.cs @@ -20,6 +20,15 @@ public partial class ContainerServiceFleetData : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(ContainerServiceFleetData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("eTag"u8); @@ -38,39 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea writer.WritePropertyName("identity"u8); JsonSerializer.Serialize(writer, Identity); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) @@ -78,21 +54,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea writer.WritePropertyName("provisioningState"u8); writer.WriteStringValue(ProvisioningState.Value.ToString()); } - writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) + if (Optional.IsDefined(HubProfile)) { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } + writer.WritePropertyName("hubProfile"u8); + writer.WriteObjectValue(HubProfile, options); } writer.WriteEndObject(); } @@ -126,6 +91,7 @@ internal static ContainerServiceFleetData DeserializeContainerServiceFleetData(J ResourceType type = default; SystemData systemData = default; FleetProvisioningState? provisioningState = default; + FleetHubProfile hubProfile = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -209,6 +175,15 @@ internal static ContainerServiceFleetData DeserializeContainerServiceFleetData(J provisioningState = new FleetProvisioningState(property0.Value.GetString()); continue; } + if (property0.NameEquals("hubProfile"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + hubProfile = FleetHubProfile.DeserializeFleetHubProfile(property0.Value, options); + continue; + } } continue; } @@ -228,6 +203,7 @@ internal static ContainerServiceFleetData DeserializeContainerServiceFleetData(J eTag, identity, provisioningState, + hubProfile, serializedAdditionalRawData); } diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/ContainerServiceFleetData.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/ContainerServiceFleetData.cs index 9bb52ac45394..f0f517e6dfcc 100644 --- a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/ContainerServiceFleetData.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/ContainerServiceFleetData.cs @@ -67,12 +67,14 @@ public ContainerServiceFleetData(AzureLocation location) : base(location) /// If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. /// Managed identity. /// The status of the last operation. + /// The FleetHubProfile configures the Fleet's hub. /// Keeps track of any properties unknown to the library. - internal ContainerServiceFleetData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ETag? eTag, ManagedServiceIdentity identity, FleetProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + internal ContainerServiceFleetData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ETag? eTag, ManagedServiceIdentity identity, FleetProvisioningState? provisioningState, FleetHubProfile hubProfile, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { ETag = eTag; Identity = identity; ProvisioningState = provisioningState; + HubProfile = hubProfile; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -87,5 +89,7 @@ internal ContainerServiceFleetData() public ManagedServiceIdentity Identity { get; set; } /// The status of the last operation. public FleetProvisioningState? ProvisioningState { get; } + /// The FleetHubProfile configures the Fleet's hub. + public FleetHubProfile HubProfile { get; set; } } } diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/ContainerServiceFleetMemberCollection.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/ContainerServiceFleetMemberCollection.cs index cc491e0f95ab..b7aea330dc85 100644 --- a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/ContainerServiceFleetMemberCollection.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/ContainerServiceFleetMemberCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-10-15 + /// 2024-05-02-preview /// /// /// Resource @@ -90,7 +90,7 @@ public virtual async Task> Cre try { var response = await _containerServiceFleetMemberFleetMembersRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fleetMemberName, data, ifMatch, ifNoneMatch, cancellationToken).ConfigureAwait(false); - var operation = new ContainerServiceFleetArmOperation(new ContainerServiceFleetMemberOperationSource(Client), _containerServiceFleetMemberFleetMembersClientDiagnostics, Pipeline, _containerServiceFleetMemberFleetMembersRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fleetMemberName, data, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.AzureAsyncOperation, apiVersionOverrideValue: "2016-03-30"); + var operation = new ContainerServiceFleetArmOperation(new ContainerServiceFleetMemberOperationSource(Client), _containerServiceFleetMemberFleetMembersClientDiagnostics, Pipeline, _containerServiceFleetMemberFleetMembersRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fleetMemberName, data, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -115,7 +115,7 @@ public virtual async Task> Cre /// /// /// Default Api Version - /// 2023-10-15 + /// 2024-05-02-preview /// /// /// Resource @@ -141,7 +141,7 @@ public virtual ArmOperation CreateOrUpdate( try { var response = _containerServiceFleetMemberFleetMembersRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fleetMemberName, data, ifMatch, ifNoneMatch, cancellationToken); - var operation = new ContainerServiceFleetArmOperation(new ContainerServiceFleetMemberOperationSource(Client), _containerServiceFleetMemberFleetMembersClientDiagnostics, Pipeline, _containerServiceFleetMemberFleetMembersRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fleetMemberName, data, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.AzureAsyncOperation, apiVersionOverrideValue: "2016-03-30"); + var operation = new ContainerServiceFleetArmOperation(new ContainerServiceFleetMemberOperationSource(Client), _containerServiceFleetMemberFleetMembersClientDiagnostics, Pipeline, _containerServiceFleetMemberFleetMembersRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fleetMemberName, data, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOrUpdate( /// /// /// Default Api Version - /// 2023-10-15 + /// 2024-05-02-preview /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAsyn /// /// /// Default Api Version - /// 2023-10-15 + /// 2024-05-02-preview /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string fleetMem /// /// /// Default Api Version - /// 2023-10-15 + /// 2024-05-02-preview /// /// /// Resource @@ -286,7 +286,7 @@ public virtual AsyncPageable GetAllAsync(Ca /// /// /// Default Api Version - /// 2023-10-15 + /// 2024-05-02-preview /// /// /// Resource @@ -316,7 +316,7 @@ public virtual Pageable GetAll(Cancellation /// /// /// Default Api Version - /// 2023-10-15 + /// 2024-05-02-preview /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string fleetMemberName, Ca /// /// /// Default Api Version - /// 2023-10-15 + /// 2024-05-02-preview /// /// /// Resource @@ -402,7 +402,7 @@ public virtual Response Exists(string fleetMemberName, CancellationToken c /// /// /// Default Api Version - /// 2023-10-15 + /// 2024-05-02-preview /// /// /// Resource @@ -447,7 +447,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-10-15 + /// 2024-05-02-preview /// /// /// Resource diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/ContainerServiceFleetMemberData.Serialization.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/ContainerServiceFleetMemberData.Serialization.cs index 300826deb9e2..b105a4089293 100644 --- a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/ContainerServiceFleetMemberData.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/ContainerServiceFleetMemberData.Serialization.cs @@ -20,6 +20,15 @@ public partial class ContainerServiceFleetMemberData : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,32 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(ContainerServiceFleetMemberData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("eTag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(ClusterResourceId)) @@ -71,22 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ContainerServiceFleetMemberData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/ContainerServiceFleetMemberResource.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/ContainerServiceFleetMemberResource.cs index ad605737e361..e0683ad16deb 100644 --- a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/ContainerServiceFleetMemberResource.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/ContainerServiceFleetMemberResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-10-15 + /// 2024-05-02-preview /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsyn /// /// /// Default Api Version - /// 2023-10-15 + /// 2024-05-02-preview /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationTok /// /// /// Default Api Version - /// 2023-10-15 + /// 2024-05-02-preview /// /// /// Resource @@ -200,7 +200,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, string try { var response = await _containerServiceFleetMemberFleetMembersRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, cancellationToken).ConfigureAwait(false); - var operation = new ContainerServiceFleetArmOperation(_containerServiceFleetMemberFleetMembersClientDiagnostics, Pipeline, _containerServiceFleetMemberFleetMembersRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch).Request, response, OperationFinalStateVia.Location, apiVersionOverrideValue: "2016-03-30"); + var operation = new ContainerServiceFleetArmOperation(_containerServiceFleetMemberFleetMembersClientDiagnostics, Pipeline, _containerServiceFleetMemberFleetMembersRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, string /// /// /// Default Api Version - /// 2023-10-15 + /// 2024-05-02-preview /// /// /// Resource @@ -243,7 +243,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, string ifMatch = null, C try { var response = _containerServiceFleetMemberFleetMembersRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, cancellationToken); - var operation = new ContainerServiceFleetArmOperation(_containerServiceFleetMemberFleetMembersClientDiagnostics, Pipeline, _containerServiceFleetMemberFleetMembersRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch).Request, response, OperationFinalStateVia.Location, apiVersionOverrideValue: "2016-03-30"); + var operation = new ContainerServiceFleetArmOperation(_containerServiceFleetMemberFleetMembersClientDiagnostics, Pipeline, _containerServiceFleetMemberFleetMembersRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -268,7 +268,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, string ifMatch = null, C /// /// /// Default Api Version - /// 2023-10-15 + /// 2024-05-02-preview /// /// /// Resource @@ -290,7 +290,7 @@ public virtual async Task> Upd try { var response = await _containerServiceFleetMemberFleetMembersRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, ifMatch, cancellationToken).ConfigureAwait(false); - var operation = new ContainerServiceFleetArmOperation(new ContainerServiceFleetMemberOperationSource(Client), _containerServiceFleetMemberFleetMembersClientDiagnostics, Pipeline, _containerServiceFleetMemberFleetMembersRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, ifMatch).Request, response, OperationFinalStateVia.Location, apiVersionOverrideValue: "2016-03-30"); + var operation = new ContainerServiceFleetArmOperation(new ContainerServiceFleetMemberOperationSource(Client), _containerServiceFleetMemberFleetMembersClientDiagnostics, Pipeline, _containerServiceFleetMemberFleetMembersRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, ifMatch).Request, response, OperationFinalStateVia.OriginalUri); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -315,7 +315,7 @@ public virtual async Task> Upd /// /// /// Default Api Version - /// 2023-10-15 + /// 2024-05-02-preview /// /// /// Resource @@ -337,7 +337,7 @@ public virtual ArmOperation Update(WaitUnti try { var response = _containerServiceFleetMemberFleetMembersRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, ifMatch, cancellationToken); - var operation = new ContainerServiceFleetArmOperation(new ContainerServiceFleetMemberOperationSource(Client), _containerServiceFleetMemberFleetMembersClientDiagnostics, Pipeline, _containerServiceFleetMemberFleetMembersRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, ifMatch).Request, response, OperationFinalStateVia.Location, apiVersionOverrideValue: "2016-03-30"); + var operation = new ContainerServiceFleetArmOperation(new ContainerServiceFleetMemberOperationSource(Client), _containerServiceFleetMemberFleetMembersClientDiagnostics, Pipeline, _containerServiceFleetMemberFleetMembersRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, ifMatch).Request, response, OperationFinalStateVia.OriginalUri); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/ContainerServiceFleetResource.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/ContainerServiceFleetResource.cs index aee0906c7577..99c0fb94def0 100644 --- a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/ContainerServiceFleetResource.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/ContainerServiceFleetResource.cs @@ -90,6 +90,75 @@ internal static void ValidateResourceId(ResourceIdentifier id) throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); } + /// Gets a collection of AutoUpgradeProfileResources in the ContainerServiceFleet. + /// An object representing collection of AutoUpgradeProfileResources and their operations over a AutoUpgradeProfileResource. + public virtual AutoUpgradeProfileCollection GetAutoUpgradeProfiles() + { + return GetCachedClient(client => new AutoUpgradeProfileCollection(client, Id)); + } + + /// + /// Get a AutoUpgradeProfile + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/autoUpgradeProfiles/{autoUpgradeProfileName} + /// + /// + /// Operation Id + /// AutoUpgradeProfiles_Get + /// + /// + /// Default Api Version + /// 2024-05-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the AutoUpgradeProfile resource. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetAutoUpgradeProfileAsync(string autoUpgradeProfileName, CancellationToken cancellationToken = default) + { + return await GetAutoUpgradeProfiles().GetAsync(autoUpgradeProfileName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a AutoUpgradeProfile + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/autoUpgradeProfiles/{autoUpgradeProfileName} + /// + /// + /// Operation Id + /// AutoUpgradeProfiles_Get + /// + /// + /// Default Api Version + /// 2024-05-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the AutoUpgradeProfile resource. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetAutoUpgradeProfile(string autoUpgradeProfileName, CancellationToken cancellationToken = default) + { + return GetAutoUpgradeProfiles().Get(autoUpgradeProfileName, cancellationToken); + } + /// Gets a collection of ContainerServiceFleetMemberResources in the ContainerServiceFleet. /// An object representing collection of ContainerServiceFleetMemberResources and their operations over a ContainerServiceFleetMemberResource. public virtual ContainerServiceFleetMemberCollection GetContainerServiceFleetMembers() @@ -110,7 +179,7 @@ public virtual ContainerServiceFleetMemberCollection GetContainerServiceFleetMem /// /// /// Default Api Version - /// 2023-10-15 + /// 2024-05-02-preview /// /// /// Resource @@ -141,7 +210,7 @@ public virtual async Task> GetCont /// /// /// Default Api Version - /// 2023-10-15 + /// 2024-05-02-preview /// /// /// Resource @@ -179,7 +248,7 @@ public virtual ContainerServiceFleetUpdateRunCollection GetContainerServiceFleet /// /// /// Default Api Version - /// 2023-10-15 + /// 2024-05-02-preview /// /// /// Resource @@ -210,7 +279,7 @@ public virtual async Task> GetC /// /// /// Default Api Version - /// 2023-10-15 + /// 2024-05-02-preview /// /// /// Resource @@ -248,7 +317,7 @@ public virtual FleetUpdateStrategyCollection GetFleetUpdateStrategies() /// /// /// Default Api Version - /// 2023-10-15 + /// 2024-05-02-preview /// /// /// Resource @@ -279,7 +348,7 @@ public virtual async Task> GetFleetUpdateS /// /// /// Default Api Version - /// 2023-10-15 + /// 2024-05-02-preview /// /// /// Resource @@ -310,7 +379,7 @@ public virtual Response GetFleetUpdateStrategy(stri /// /// /// Default Api Version - /// 2023-10-15 + /// 2024-05-02-preview /// /// /// Resource @@ -350,7 +419,7 @@ public virtual async Task> GetAsync(Canc /// /// /// Default Api Version - /// 2023-10-15 + /// 2024-05-02-preview /// /// /// Resource @@ -390,7 +459,7 @@ public virtual Response Get(CancellationToken can /// /// /// Default Api Version - /// 2023-10-15 + /// 2024-05-02-preview /// /// /// Resource @@ -408,7 +477,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, string try { var response = await _containerServiceFleetFleetsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, ifMatch, cancellationToken).ConfigureAwait(false); - var operation = new ContainerServiceFleetArmOperation(_containerServiceFleetFleetsClientDiagnostics, Pipeline, _containerServiceFleetFleetsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, ifMatch).Request, response, OperationFinalStateVia.Location, apiVersionOverrideValue: "2016-03-30"); + var operation = new ContainerServiceFleetArmOperation(_containerServiceFleetFleetsClientDiagnostics, Pipeline, _containerServiceFleetFleetsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, ifMatch).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -433,7 +502,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, string /// /// /// Default Api Version - /// 2023-10-15 + /// 2024-05-02-preview /// /// /// Resource @@ -451,7 +520,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, string ifMatch = null, C try { var response = _containerServiceFleetFleetsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, ifMatch, cancellationToken); - var operation = new ContainerServiceFleetArmOperation(_containerServiceFleetFleetsClientDiagnostics, Pipeline, _containerServiceFleetFleetsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, ifMatch).Request, response, OperationFinalStateVia.Location, apiVersionOverrideValue: "2016-03-30"); + var operation = new ContainerServiceFleetArmOperation(_containerServiceFleetFleetsClientDiagnostics, Pipeline, _containerServiceFleetFleetsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, ifMatch).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -476,7 +545,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, string ifMatch = null, C /// /// /// Default Api Version - /// 2023-10-15 + /// 2024-05-02-preview /// /// /// Resource @@ -498,7 +567,7 @@ public virtual async Task> UpdateAsy try { var response = await _containerServiceFleetFleetsRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, ifMatch, cancellationToken).ConfigureAwait(false); - var operation = new ContainerServiceFleetArmOperation(new ContainerServiceFleetOperationSource(Client), _containerServiceFleetFleetsClientDiagnostics, Pipeline, _containerServiceFleetFleetsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, ifMatch).Request, response, OperationFinalStateVia.Location, apiVersionOverrideValue: "2016-03-30"); + var operation = new ContainerServiceFleetArmOperation(new ContainerServiceFleetOperationSource(Client), _containerServiceFleetFleetsClientDiagnostics, Pipeline, _containerServiceFleetFleetsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, ifMatch).Request, response, OperationFinalStateVia.OriginalUri); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -523,7 +592,7 @@ public virtual async Task> UpdateAsy /// /// /// Default Api Version - /// 2023-10-15 + /// 2024-05-02-preview /// /// /// Resource @@ -545,7 +614,7 @@ public virtual ArmOperation Update(WaitUntil wait try { var response = _containerServiceFleetFleetsRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, ifMatch, cancellationToken); - var operation = new ContainerServiceFleetArmOperation(new ContainerServiceFleetOperationSource(Client), _containerServiceFleetFleetsClientDiagnostics, Pipeline, _containerServiceFleetFleetsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, ifMatch).Request, response, OperationFinalStateVia.Location, apiVersionOverrideValue: "2016-03-30"); + var operation = new ContainerServiceFleetArmOperation(new ContainerServiceFleetOperationSource(Client), _containerServiceFleetFleetsClientDiagnostics, Pipeline, _containerServiceFleetFleetsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, ifMatch).Request, response, OperationFinalStateVia.OriginalUri); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -570,7 +639,7 @@ public virtual ArmOperation Update(WaitUntil wait /// /// /// Default Api Version - /// 2023-10-15 + /// 2024-05-02-preview /// /// /// Resource @@ -608,7 +677,7 @@ public virtual async Task> GetCredentialsAsync( /// /// /// Default Api Version - /// 2023-10-15 + /// 2024-05-02-preview /// /// /// Resource @@ -646,7 +715,7 @@ public virtual Response GetCredentials(CancellationToken /// /// /// Default Api Version - /// 2023-10-15 + /// 2024-05-02-preview /// /// /// Resource @@ -708,7 +777,7 @@ public virtual async Task> AddTagAsync(s /// /// /// Default Api Version - /// 2023-10-15 + /// 2024-05-02-preview /// /// /// Resource @@ -770,7 +839,7 @@ public virtual Response AddTag(string key, string /// /// /// Default Api Version - /// 2023-10-15 + /// 2024-05-02-preview /// /// /// Resource @@ -827,7 +896,7 @@ public virtual async Task> SetTagsAsync( /// /// /// Default Api Version - /// 2023-10-15 + /// 2024-05-02-preview /// /// /// Resource @@ -884,7 +953,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2023-10-15 + /// 2024-05-02-preview /// /// /// Resource @@ -944,7 +1013,7 @@ public virtual async Task> RemoveTagAsyn /// /// /// Default Api Version - /// 2023-10-15 + /// 2024-05-02-preview /// /// /// Resource diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/ContainerServiceFleetUpdateRunCollection.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/ContainerServiceFleetUpdateRunCollection.cs index b9ea5fa9a816..7a27bc475f7f 100644 --- a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/ContainerServiceFleetUpdateRunCollection.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/ContainerServiceFleetUpdateRunCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-10-15 + /// 2024-05-02-preview /// /// /// Resource @@ -90,7 +90,7 @@ public virtual async Task> try { var response = await _containerServiceFleetUpdateRunUpdateRunsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, updateRunName, data, ifMatch, ifNoneMatch, cancellationToken).ConfigureAwait(false); - var operation = new ContainerServiceFleetArmOperation(new ContainerServiceFleetUpdateRunOperationSource(Client), _containerServiceFleetUpdateRunUpdateRunsClientDiagnostics, Pipeline, _containerServiceFleetUpdateRunUpdateRunsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, updateRunName, data, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.AzureAsyncOperation, apiVersionOverrideValue: "2016-03-30"); + var operation = new ContainerServiceFleetArmOperation(new ContainerServiceFleetUpdateRunOperationSource(Client), _containerServiceFleetUpdateRunUpdateRunsClientDiagnostics, Pipeline, _containerServiceFleetUpdateRunUpdateRunsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, updateRunName, data, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -115,7 +115,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-10-15 + /// 2024-05-02-preview /// /// /// Resource @@ -141,7 +141,7 @@ public virtual ArmOperation CreateOrUpda try { var response = _containerServiceFleetUpdateRunUpdateRunsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, updateRunName, data, ifMatch, ifNoneMatch, cancellationToken); - var operation = new ContainerServiceFleetArmOperation(new ContainerServiceFleetUpdateRunOperationSource(Client), _containerServiceFleetUpdateRunUpdateRunsClientDiagnostics, Pipeline, _containerServiceFleetUpdateRunUpdateRunsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, updateRunName, data, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.AzureAsyncOperation, apiVersionOverrideValue: "2016-03-30"); + var operation = new ContainerServiceFleetArmOperation(new ContainerServiceFleetUpdateRunOperationSource(Client), _containerServiceFleetUpdateRunUpdateRunsClientDiagnostics, Pipeline, _containerServiceFleetUpdateRunUpdateRunsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, updateRunName, data, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOrUpda /// /// /// Default Api Version - /// 2023-10-15 + /// 2024-05-02-preview /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetA /// /// /// Default Api Version - /// 2023-10-15 + /// 2024-05-02-preview /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string updat /// /// /// Default Api Version - /// 2023-10-15 + /// 2024-05-02-preview /// /// /// Resource @@ -286,7 +286,7 @@ public virtual AsyncPageable GetAllAsync /// /// /// Default Api Version - /// 2023-10-15 + /// 2024-05-02-preview /// /// /// Resource @@ -316,7 +316,7 @@ public virtual Pageable GetAll(Cancellat /// /// /// Default Api Version - /// 2023-10-15 + /// 2024-05-02-preview /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string updateRunName, Canc /// /// /// Default Api Version - /// 2023-10-15 + /// 2024-05-02-preview /// /// /// Resource @@ -402,7 +402,7 @@ public virtual Response Exists(string updateRunName, CancellationToken can /// /// /// Default Api Version - /// 2023-10-15 + /// 2024-05-02-preview /// /// /// Resource @@ -447,7 +447,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-10-15 + /// 2024-05-02-preview /// /// /// Resource diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/ContainerServiceFleetUpdateRunData.Serialization.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/ContainerServiceFleetUpdateRunData.Serialization.cs index 1f8a417f22df..a9ca6c21bebd 100644 --- a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/ContainerServiceFleetUpdateRunData.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/ContainerServiceFleetUpdateRunData.Serialization.cs @@ -20,6 +20,15 @@ public partial class ContainerServiceFleetUpdateRunData : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,32 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(ContainerServiceFleetUpdateRunData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("eTag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) @@ -81,22 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteObjectValue(Status, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ContainerServiceFleetUpdateRunData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/ContainerServiceFleetUpdateRunResource.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/ContainerServiceFleetUpdateRunResource.cs index 55d15c849262..4d87ffb505b2 100644 --- a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/ContainerServiceFleetUpdateRunResource.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/ContainerServiceFleetUpdateRunResource.cs @@ -11,6 +11,7 @@ using System.Threading.Tasks; using Azure.Core; using Azure.Core.Pipeline; +using Azure.ResourceManager.ContainerServiceFleet.Models; namespace Azure.ResourceManager.ContainerServiceFleet { @@ -101,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-10-15 + /// 2024-05-02-preview /// /// /// Resource @@ -141,7 +142,7 @@ public virtual async Task> GetA /// /// /// Default Api Version - /// 2023-10-15 + /// 2024-05-02-preview /// /// /// Resource @@ -181,7 +182,7 @@ public virtual Response Get(Cancellation /// /// /// Default Api Version - /// 2023-10-15 + /// 2024-05-02-preview /// /// /// Resource @@ -199,7 +200,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, string try { var response = await _containerServiceFleetUpdateRunUpdateRunsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, cancellationToken).ConfigureAwait(false); - var operation = new ContainerServiceFleetArmOperation(_containerServiceFleetUpdateRunUpdateRunsClientDiagnostics, Pipeline, _containerServiceFleetUpdateRunUpdateRunsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch).Request, response, OperationFinalStateVia.Location, apiVersionOverrideValue: "2016-03-30"); + var operation = new ContainerServiceFleetArmOperation(_containerServiceFleetUpdateRunUpdateRunsClientDiagnostics, Pipeline, _containerServiceFleetUpdateRunUpdateRunsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -224,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, string /// /// /// Default Api Version - /// 2023-10-15 + /// 2024-05-02-preview /// /// /// Resource @@ -242,7 +243,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, string ifMatch = null, C try { var response = _containerServiceFleetUpdateRunUpdateRunsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, cancellationToken); - var operation = new ContainerServiceFleetArmOperation(_containerServiceFleetUpdateRunUpdateRunsClientDiagnostics, Pipeline, _containerServiceFleetUpdateRunUpdateRunsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch).Request, response, OperationFinalStateVia.Location, apiVersionOverrideValue: "2016-03-30"); + var operation = new ContainerServiceFleetArmOperation(_containerServiceFleetUpdateRunUpdateRunsClientDiagnostics, Pipeline, _containerServiceFleetUpdateRunUpdateRunsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -267,7 +268,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, string ifMatch = null, C /// /// /// Default Api Version - /// 2023-10-15 + /// 2024-05-02-preview /// /// /// Resource @@ -290,7 +291,7 @@ public virtual async Task> try { var response = await _containerServiceFleetUpdateRunUpdateRunsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, ifMatch, ifNoneMatch, cancellationToken).ConfigureAwait(false); - var operation = new ContainerServiceFleetArmOperation(new ContainerServiceFleetUpdateRunOperationSource(Client), _containerServiceFleetUpdateRunUpdateRunsClientDiagnostics, Pipeline, _containerServiceFleetUpdateRunUpdateRunsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.AzureAsyncOperation, apiVersionOverrideValue: "2016-03-30"); + var operation = new ContainerServiceFleetArmOperation(new ContainerServiceFleetUpdateRunOperationSource(Client), _containerServiceFleetUpdateRunUpdateRunsClientDiagnostics, Pipeline, _containerServiceFleetUpdateRunUpdateRunsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -315,7 +316,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-10-15 + /// 2024-05-02-preview /// /// /// Resource @@ -338,7 +339,101 @@ public virtual ArmOperation Update(WaitU try { var response = _containerServiceFleetUpdateRunUpdateRunsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, ifMatch, ifNoneMatch, cancellationToken); - var operation = new ContainerServiceFleetArmOperation(new ContainerServiceFleetUpdateRunOperationSource(Client), _containerServiceFleetUpdateRunUpdateRunsClientDiagnostics, Pipeline, _containerServiceFleetUpdateRunUpdateRunsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.AzureAsyncOperation, apiVersionOverrideValue: "2016-03-30"); + var operation = new ContainerServiceFleetArmOperation(new ContainerServiceFleetUpdateRunOperationSource(Client), _containerServiceFleetUpdateRunUpdateRunsClientDiagnostics, Pipeline, _containerServiceFleetUpdateRunUpdateRunsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Skips one or a combination of member/group/stage/afterStageWait(s) of an update run. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateRuns/{updateRunName}/skip + /// + /// + /// Operation Id + /// UpdateRuns_Skip + /// + /// + /// Default Api Version + /// 2024-05-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The content of the action request. + /// The request should only proceed if an entity matches this string. + /// The cancellation token to use. + /// is null. + public virtual async Task> SkipAsync(WaitUntil waitUntil, ContainerServiceFleetSkipProperties body, string ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(body, nameof(body)); + + using var scope = _containerServiceFleetUpdateRunUpdateRunsClientDiagnostics.CreateScope("ContainerServiceFleetUpdateRunResource.Skip"); + scope.Start(); + try + { + var response = await _containerServiceFleetUpdateRunUpdateRunsRestClient.SkipAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body, ifMatch, cancellationToken).ConfigureAwait(false); + var operation = new ContainerServiceFleetArmOperation(new ContainerServiceFleetUpdateRunOperationSource(Client), _containerServiceFleetUpdateRunUpdateRunsClientDiagnostics, Pipeline, _containerServiceFleetUpdateRunUpdateRunsRestClient.CreateSkipRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body, ifMatch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Skips one or a combination of member/group/stage/afterStageWait(s) of an update run. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateRuns/{updateRunName}/skip + /// + /// + /// Operation Id + /// UpdateRuns_Skip + /// + /// + /// Default Api Version + /// 2024-05-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The content of the action request. + /// The request should only proceed if an entity matches this string. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Skip(WaitUntil waitUntil, ContainerServiceFleetSkipProperties body, string ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(body, nameof(body)); + + using var scope = _containerServiceFleetUpdateRunUpdateRunsClientDiagnostics.CreateScope("ContainerServiceFleetUpdateRunResource.Skip"); + scope.Start(); + try + { + var response = _containerServiceFleetUpdateRunUpdateRunsRestClient.Skip(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body, ifMatch, cancellationToken); + var operation = new ContainerServiceFleetArmOperation(new ContainerServiceFleetUpdateRunOperationSource(Client), _containerServiceFleetUpdateRunUpdateRunsClientDiagnostics, Pipeline, _containerServiceFleetUpdateRunUpdateRunsRestClient.CreateSkipRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body, ifMatch).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -363,7 +458,7 @@ public virtual ArmOperation Update(WaitU /// /// /// Default Api Version - /// 2023-10-15 + /// 2024-05-02-preview /// /// /// Resource @@ -406,7 +501,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-10-15 + /// 2024-05-02-preview /// /// /// Resource @@ -449,7 +544,7 @@ public virtual ArmOperation Start(WaitUn /// /// /// Default Api Version - /// 2023-10-15 + /// 2024-05-02-preview /// /// /// Resource @@ -492,7 +587,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-10-15 + /// 2024-05-02-preview /// /// /// Resource diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Extensions/ContainerServiceFleetExtensions.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Extensions/ContainerServiceFleetExtensions.cs index d9a0ffd01eef..24943cf4b275 100644 --- a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Extensions/ContainerServiceFleetExtensions.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Extensions/ContainerServiceFleetExtensions.cs @@ -51,6 +51,25 @@ public static ContainerServiceFleetResource GetContainerServiceFleetResource(thi return GetMockableContainerServiceFleetArmClient(client).GetContainerServiceFleetResource(id); } + /// + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static AutoUpgradeProfileResource GetAutoUpgradeProfileResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableContainerServiceFleetArmClient(client).GetAutoUpgradeProfileResource(id); + } + /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// You can use to create a from its components. @@ -138,7 +157,7 @@ public static ContainerServiceFleetCollection GetContainerServiceFleets(this Res /// /// /// Default Api Version - /// 2023-10-15 + /// 2024-05-02-preview /// /// /// Resource @@ -176,7 +195,7 @@ public static async Task> GetContainerSe /// /// /// Default Api Version - /// 2023-10-15 + /// 2024-05-02-preview /// /// /// Resource @@ -214,7 +233,7 @@ public static Response GetContainerServiceFleet(t /// /// /// Default Api Version - /// 2023-10-15 + /// 2024-05-02-preview /// /// /// Resource @@ -250,7 +269,7 @@ public static AsyncPageable GetContainerServiceFl /// /// /// Default Api Version - /// 2023-10-15 + /// 2024-05-02-preview /// /// /// Resource diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Extensions/MockableContainerServiceFleetArmClient.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Extensions/MockableContainerServiceFleetArmClient.cs index 1086484e53e7..5c5c50847abc 100644 --- a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Extensions/MockableContainerServiceFleetArmClient.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Extensions/MockableContainerServiceFleetArmClient.cs @@ -46,6 +46,18 @@ public virtual ContainerServiceFleetResource GetContainerServiceFleetResource(Re return new ContainerServiceFleetResource(Client, id); } + /// + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual AutoUpgradeProfileResource GetAutoUpgradeProfileResource(ResourceIdentifier id) + { + AutoUpgradeProfileResource.ValidateResourceId(id); + return new AutoUpgradeProfileResource(Client, id); + } + /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// You can use to create a from its components. diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Extensions/MockableContainerServiceFleetResourceGroupResource.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Extensions/MockableContainerServiceFleetResourceGroupResource.cs index b6ed73a891cb..d9814eb3b8ce 100644 --- a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Extensions/MockableContainerServiceFleetResourceGroupResource.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Extensions/MockableContainerServiceFleetResourceGroupResource.cs @@ -53,7 +53,7 @@ public virtual ContainerServiceFleetCollection GetContainerServiceFleets() /// /// /// Default Api Version - /// 2023-10-15 + /// 2024-05-02-preview /// /// /// Resource @@ -84,7 +84,7 @@ public virtual async Task> GetContainerS /// /// /// Default Api Version - /// 2023-10-15 + /// 2024-05-02-preview /// /// /// Resource diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Extensions/MockableContainerServiceFleetSubscriptionResource.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Extensions/MockableContainerServiceFleetSubscriptionResource.cs index 0f67a4240bde..07c4f8c9ad37 100644 --- a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Extensions/MockableContainerServiceFleetSubscriptionResource.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Extensions/MockableContainerServiceFleetSubscriptionResource.cs @@ -52,7 +52,7 @@ private string GetApiVersionOrNull(ResourceType resourceType) /// /// /// Default Api Version - /// 2023-10-15 + /// 2024-05-02-preview /// /// /// Resource @@ -82,7 +82,7 @@ public virtual AsyncPageable GetContainerServiceF /// /// /// Default Api Version - /// 2023-10-15 + /// 2024-05-02-preview /// /// /// Resource diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/FleetUpdateStrategyCollection.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/FleetUpdateStrategyCollection.cs index 2a83c649eb5c..2f843c53b7a6 100644 --- a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/FleetUpdateStrategyCollection.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/FleetUpdateStrategyCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-10-15 + /// 2024-05-02-preview /// /// /// Resource @@ -90,7 +90,7 @@ public virtual async Task> CreateOrUpd try { var response = await _fleetUpdateStrategyRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, updateStrategyName, data, ifMatch, ifNoneMatch, cancellationToken).ConfigureAwait(false); - var operation = new ContainerServiceFleetArmOperation(new FleetUpdateStrategyOperationSource(Client), _fleetUpdateStrategyClientDiagnostics, Pipeline, _fleetUpdateStrategyRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, updateStrategyName, data, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.AzureAsyncOperation, apiVersionOverrideValue: "2016-03-30"); + var operation = new ContainerServiceFleetArmOperation(new FleetUpdateStrategyOperationSource(Client), _fleetUpdateStrategyClientDiagnostics, Pipeline, _fleetUpdateStrategyRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, updateStrategyName, data, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -115,7 +115,7 @@ public virtual async Task> CreateOrUpd /// /// /// Default Api Version - /// 2023-10-15 + /// 2024-05-02-preview /// /// /// Resource @@ -141,7 +141,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUnti try { var response = _fleetUpdateStrategyRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, updateStrategyName, data, ifMatch, ifNoneMatch, cancellationToken); - var operation = new ContainerServiceFleetArmOperation(new FleetUpdateStrategyOperationSource(Client), _fleetUpdateStrategyClientDiagnostics, Pipeline, _fleetUpdateStrategyRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, updateStrategyName, data, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.AzureAsyncOperation, apiVersionOverrideValue: "2016-03-30"); + var operation = new ContainerServiceFleetArmOperation(new FleetUpdateStrategyOperationSource(Client), _fleetUpdateStrategyClientDiagnostics, Pipeline, _fleetUpdateStrategyRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, updateStrategyName, data, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUnti /// /// /// Default Api Version - /// 2023-10-15 + /// 2024-05-02-preview /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAsync(string /// /// /// Default Api Version - /// 2023-10-15 + /// 2024-05-02-preview /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string updateStrategyNa /// /// /// Default Api Version - /// 2023-10-15 + /// 2024-05-02-preview /// /// /// Resource @@ -286,7 +286,7 @@ public virtual AsyncPageable GetAllAsync(Cancellati /// /// /// Default Api Version - /// 2023-10-15 + /// 2024-05-02-preview /// /// /// Resource @@ -316,7 +316,7 @@ public virtual Pageable GetAll(CancellationToken ca /// /// /// Default Api Version - /// 2023-10-15 + /// 2024-05-02-preview /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string updateStrategyName, /// /// /// Default Api Version - /// 2023-10-15 + /// 2024-05-02-preview /// /// /// Resource @@ -402,7 +402,7 @@ public virtual Response Exists(string updateStrategyName, CancellationToke /// /// /// Default Api Version - /// 2023-10-15 + /// 2024-05-02-preview /// /// /// Resource @@ -447,7 +447,7 @@ public virtual async Task> GetIfEx /// /// /// Default Api Version - /// 2023-10-15 + /// 2024-05-02-preview /// /// /// Resource diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/FleetUpdateStrategyData.Serialization.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/FleetUpdateStrategyData.Serialization.cs index ad7b55b2cb73..e5fbd6aa5fbf 100644 --- a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/FleetUpdateStrategyData.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/FleetUpdateStrategyData.Serialization.cs @@ -20,6 +20,15 @@ public partial class FleetUpdateStrategyData : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,32 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(FleetUpdateStrategyData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("eTag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) @@ -66,22 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade writer.WriteObjectValue(Strategy, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } FleetUpdateStrategyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/FleetUpdateStrategyResource.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/FleetUpdateStrategyResource.cs index 129ce7354cd5..21c4315ecf1d 100644 --- a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/FleetUpdateStrategyResource.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/FleetUpdateStrategyResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-10-15 + /// 2024-05-02-preview /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Cancel /// /// /// Default Api Version - /// 2023-10-15 + /// 2024-05-02-preview /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken cance /// /// /// Default Api Version - /// 2023-10-15 + /// 2024-05-02-preview /// /// /// Resource @@ -199,7 +199,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, string try { var response = await _fleetUpdateStrategyRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, cancellationToken).ConfigureAwait(false); - var operation = new ContainerServiceFleetArmOperation(_fleetUpdateStrategyClientDiagnostics, Pipeline, _fleetUpdateStrategyRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch).Request, response, OperationFinalStateVia.AzureAsyncOperation, apiVersionOverrideValue: "2016-03-30"); + var operation = new ContainerServiceFleetArmOperation(_fleetUpdateStrategyClientDiagnostics, Pipeline, _fleetUpdateStrategyRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -224,7 +224,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, string /// /// /// Default Api Version - /// 2023-10-15 + /// 2024-05-02-preview /// /// /// Resource @@ -242,7 +242,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, string ifMatch = null, C try { var response = _fleetUpdateStrategyRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, cancellationToken); - var operation = new ContainerServiceFleetArmOperation(_fleetUpdateStrategyClientDiagnostics, Pipeline, _fleetUpdateStrategyRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch).Request, response, OperationFinalStateVia.AzureAsyncOperation, apiVersionOverrideValue: "2016-03-30"); + var operation = new ContainerServiceFleetArmOperation(_fleetUpdateStrategyClientDiagnostics, Pipeline, _fleetUpdateStrategyRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -267,7 +267,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, string ifMatch = null, C /// /// /// Default Api Version - /// 2023-10-15 + /// 2024-05-02-preview /// /// /// Resource @@ -290,7 +290,7 @@ public virtual async Task> UpdateAsync try { var response = await _fleetUpdateStrategyRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, ifMatch, ifNoneMatch, cancellationToken).ConfigureAwait(false); - var operation = new ContainerServiceFleetArmOperation(new FleetUpdateStrategyOperationSource(Client), _fleetUpdateStrategyClientDiagnostics, Pipeline, _fleetUpdateStrategyRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.AzureAsyncOperation, apiVersionOverrideValue: "2016-03-30"); + var operation = new ContainerServiceFleetArmOperation(new FleetUpdateStrategyOperationSource(Client), _fleetUpdateStrategyClientDiagnostics, Pipeline, _fleetUpdateStrategyRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -315,7 +315,7 @@ public virtual async Task> UpdateAsync /// /// /// Default Api Version - /// 2023-10-15 + /// 2024-05-02-preview /// /// /// Resource @@ -338,7 +338,7 @@ public virtual ArmOperation Update(WaitUntil waitUn try { var response = _fleetUpdateStrategyRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, ifMatch, ifNoneMatch, cancellationToken); - var operation = new ContainerServiceFleetArmOperation(new FleetUpdateStrategyOperationSource(Client), _fleetUpdateStrategyClientDiagnostics, Pipeline, _fleetUpdateStrategyRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.AzureAsyncOperation, apiVersionOverrideValue: "2016-03-30"); + var operation = new ContainerServiceFleetArmOperation(new FleetUpdateStrategyOperationSource(Client), _fleetUpdateStrategyClientDiagnostics, Pipeline, _fleetUpdateStrategyRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/LongRunningOperation/AutoUpgradeProfileOperationSource.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/LongRunningOperation/AutoUpgradeProfileOperationSource.cs new file mode 100644 index 000000000000..dd07739754de --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/LongRunningOperation/AutoUpgradeProfileOperationSource.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.ContainerServiceFleet +{ + internal class AutoUpgradeProfileOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal AutoUpgradeProfileOperationSource(ArmClient client) + { + _client = client; + } + + AutoUpgradeProfileResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = AutoUpgradeProfileData.DeserializeAutoUpgradeProfileData(document.RootElement); + return new AutoUpgradeProfileResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = AutoUpgradeProfileData.DeserializeAutoUpgradeProfileData(document.RootElement); + return new AutoUpgradeProfileResource(_client, data); + } + } +} diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/AutoUpgradeNodeImageSelection.Serialization.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/AutoUpgradeNodeImageSelection.Serialization.cs new file mode 100644 index 000000000000..827bbaf48905 --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/AutoUpgradeNodeImageSelection.Serialization.cs @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ContainerServiceFleet.Models +{ + internal partial class AutoUpgradeNodeImageSelection : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AutoUpgradeNodeImageSelection)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("type"u8); + writer.WriteStringValue(SelectionType.ToString()); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AutoUpgradeNodeImageSelection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AutoUpgradeNodeImageSelection)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAutoUpgradeNodeImageSelection(document.RootElement, options); + } + + internal static AutoUpgradeNodeImageSelection DeserializeAutoUpgradeNodeImageSelection(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + AutoUpgradeNodeImageSelectionType type = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type"u8)) + { + type = new AutoUpgradeNodeImageSelectionType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AutoUpgradeNodeImageSelection(type, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AutoUpgradeNodeImageSelection)} does not support writing '{options.Format}' format."); + } + } + + AutoUpgradeNodeImageSelection IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeAutoUpgradeNodeImageSelection(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AutoUpgradeNodeImageSelection)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/AutoUpgradeNodeImageSelection.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/AutoUpgradeNodeImageSelection.cs new file mode 100644 index 000000000000..e6f06b116162 --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/AutoUpgradeNodeImageSelection.cs @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ContainerServiceFleet.Models +{ + /// The node image upgrade to be applied to the target clusters in auto upgrade. + internal partial class AutoUpgradeNodeImageSelection + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The node image upgrade type. + public AutoUpgradeNodeImageSelection(AutoUpgradeNodeImageSelectionType selectionType) + { + SelectionType = selectionType; + } + + /// Initializes a new instance of . + /// The node image upgrade type. + /// Keeps track of any properties unknown to the library. + internal AutoUpgradeNodeImageSelection(AutoUpgradeNodeImageSelectionType selectionType, IDictionary serializedAdditionalRawData) + { + SelectionType = selectionType; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AutoUpgradeNodeImageSelection() + { + } + + /// The node image upgrade type. + public AutoUpgradeNodeImageSelectionType SelectionType { get; set; } + } +} diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/AutoUpgradeNodeImageSelectionType.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/AutoUpgradeNodeImageSelectionType.cs new file mode 100644 index 000000000000..8e0faa9dbe54 --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/AutoUpgradeNodeImageSelectionType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ContainerServiceFleet.Models +{ + /// The node image upgrade type. + public readonly partial struct AutoUpgradeNodeImageSelectionType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AutoUpgradeNodeImageSelectionType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string LatestValue = "Latest"; + private const string ConsistentValue = "Consistent"; + + /// Use the latest image version when upgrading nodes. Clusters may use different image versions (e.g., 'AKSUbuntu-1804gen2containerd-2021.10.12' and 'AKSUbuntu-1804gen2containerd-2021.10.19') because, for example, the latest available version is different in different regions. + public static AutoUpgradeNodeImageSelectionType Latest { get; } = new AutoUpgradeNodeImageSelectionType(LatestValue); + /// The image versions to upgrade nodes to are selected as described below: for each node pool in managed clusters affected by the update run, the system selects the latest image version such that it is available across all other node pools (in all other clusters) of the same image type. As a result, all node pools of the same image type will be upgraded to the same image version. For example, if the latest image version for image type 'AKSUbuntu-1804gen2containerd' is 'AKSUbuntu-1804gen2containerd-2021.10.12' for a node pool in cluster A in region X, and is 'AKSUbuntu-1804gen2containerd-2021.10.17' for a node pool in cluster B in region Y, the system will upgrade both node pools to image version 'AKSUbuntu-1804gen2containerd-2021.10.12'. + public static AutoUpgradeNodeImageSelectionType Consistent { get; } = new AutoUpgradeNodeImageSelectionType(ConsistentValue); + /// Determines if two values are the same. + public static bool operator ==(AutoUpgradeNodeImageSelectionType left, AutoUpgradeNodeImageSelectionType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AutoUpgradeNodeImageSelectionType left, AutoUpgradeNodeImageSelectionType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator AutoUpgradeNodeImageSelectionType(string value) => new AutoUpgradeNodeImageSelectionType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AutoUpgradeNodeImageSelectionType other && Equals(other); + /// + public bool Equals(AutoUpgradeNodeImageSelectionType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/AutoUpgradeProfileListResult.Serialization.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/AutoUpgradeProfileListResult.Serialization.cs new file mode 100644 index 000000000000..c0b693653dea --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/AutoUpgradeProfileListResult.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ContainerServiceFleet.Models +{ + internal partial class AutoUpgradeProfileListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AutoUpgradeProfileListResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AutoUpgradeProfileListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AutoUpgradeProfileListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAutoUpgradeProfileListResult(document.RootElement, options); + } + + internal static AutoUpgradeProfileListResult DeserializeAutoUpgradeProfileListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AutoUpgradeProfileData.DeserializeAutoUpgradeProfileData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AutoUpgradeProfileListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AutoUpgradeProfileListResult)} does not support writing '{options.Format}' format."); + } + } + + AutoUpgradeProfileListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeAutoUpgradeProfileListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AutoUpgradeProfileListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/AutoUpgradeProfileListResult.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/AutoUpgradeProfileListResult.cs new file mode 100644 index 000000000000..fafd94282b79 --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/AutoUpgradeProfileListResult.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.ContainerServiceFleet.Models +{ + /// The response of a AutoUpgradeProfile list operation. + internal partial class AutoUpgradeProfileListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The AutoUpgradeProfile items on this page. + /// is null. + internal AutoUpgradeProfileListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The AutoUpgradeProfile items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal AutoUpgradeProfileListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AutoUpgradeProfileListResult() + { + } + + /// The AutoUpgradeProfile items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/AutoUpgradeProfileProvisioningState.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/AutoUpgradeProfileProvisioningState.cs new file mode 100644 index 000000000000..2cb2c37c36cc --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/AutoUpgradeProfileProvisioningState.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ContainerServiceFleet.Models +{ + /// The provisioning state of the AutoUpgradeProfile resource. + public readonly partial struct AutoUpgradeProfileProvisioningState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AutoUpgradeProfileProvisioningState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SucceededValue = "Succeeded"; + private const string FailedValue = "Failed"; + private const string CanceledValue = "Canceled"; + + /// Resource has been created. + public static AutoUpgradeProfileProvisioningState Succeeded { get; } = new AutoUpgradeProfileProvisioningState(SucceededValue); + /// Resource creation failed. + public static AutoUpgradeProfileProvisioningState Failed { get; } = new AutoUpgradeProfileProvisioningState(FailedValue); + /// Resource creation was canceled. + public static AutoUpgradeProfileProvisioningState Canceled { get; } = new AutoUpgradeProfileProvisioningState(CanceledValue); + /// Determines if two values are the same. + public static bool operator ==(AutoUpgradeProfileProvisioningState left, AutoUpgradeProfileProvisioningState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AutoUpgradeProfileProvisioningState left, AutoUpgradeProfileProvisioningState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator AutoUpgradeProfileProvisioningState(string value) => new AutoUpgradeProfileProvisioningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AutoUpgradeProfileProvisioningState other && Equals(other); + /// + public bool Equals(AutoUpgradeProfileProvisioningState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetAPIServerAccessProfile.Serialization.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetAPIServerAccessProfile.Serialization.cs new file mode 100644 index 000000000000..bc3afd1de275 --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetAPIServerAccessProfile.Serialization.cs @@ -0,0 +1,163 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ContainerServiceFleet.Models +{ + public partial class ContainerServiceFleetAPIServerAccessProfile : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ContainerServiceFleetAPIServerAccessProfile)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(EnablePrivateCluster)) + { + writer.WritePropertyName("enablePrivateCluster"u8); + writer.WriteBooleanValue(EnablePrivateCluster.Value); + } + if (Optional.IsDefined(EnableVnetIntegration)) + { + writer.WritePropertyName("enableVnetIntegration"u8); + writer.WriteBooleanValue(EnableVnetIntegration.Value); + } + if (Optional.IsDefined(SubnetId)) + { + writer.WritePropertyName("subnetId"u8); + writer.WriteStringValue(SubnetId); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ContainerServiceFleetAPIServerAccessProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ContainerServiceFleetAPIServerAccessProfile)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeContainerServiceFleetAPIServerAccessProfile(document.RootElement, options); + } + + internal static ContainerServiceFleetAPIServerAccessProfile DeserializeContainerServiceFleetAPIServerAccessProfile(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + bool? enablePrivateCluster = default; + bool? enableVnetIntegration = default; + ResourceIdentifier subnetId = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("enablePrivateCluster"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + enablePrivateCluster = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("enableVnetIntegration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + enableVnetIntegration = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("subnetId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + subnetId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ContainerServiceFleetAPIServerAccessProfile(enablePrivateCluster, enableVnetIntegration, subnetId, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ContainerServiceFleetAPIServerAccessProfile)} does not support writing '{options.Format}' format."); + } + } + + ContainerServiceFleetAPIServerAccessProfile IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeContainerServiceFleetAPIServerAccessProfile(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ContainerServiceFleetAPIServerAccessProfile)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetAPIServerAccessProfile.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetAPIServerAccessProfile.cs new file mode 100644 index 000000000000..fdee28fe4cb0 --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetAPIServerAccessProfile.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.ContainerServiceFleet.Models +{ + /// Access profile for the Fleet hub API server. + public partial class ContainerServiceFleetAPIServerAccessProfile + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ContainerServiceFleetAPIServerAccessProfile() + { + } + + /// Initializes a new instance of . + /// Whether to create the Fleet hub as a private cluster or not. + /// Whether to enable apiserver vnet integration for the Fleet hub or not. + /// The subnet to be used when apiserver vnet integration is enabled. It is required when creating a new Fleet with BYO vnet. + /// Keeps track of any properties unknown to the library. + internal ContainerServiceFleetAPIServerAccessProfile(bool? enablePrivateCluster, bool? enableVnetIntegration, ResourceIdentifier subnetId, IDictionary serializedAdditionalRawData) + { + EnablePrivateCluster = enablePrivateCluster; + EnableVnetIntegration = enableVnetIntegration; + SubnetId = subnetId; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Whether to create the Fleet hub as a private cluster or not. + public bool? EnablePrivateCluster { get; set; } + /// Whether to enable apiserver vnet integration for the Fleet hub or not. + public bool? EnableVnetIntegration { get; set; } + /// The subnet to be used when apiserver vnet integration is enabled. It is required when creating a new Fleet with BYO vnet. + public ResourceIdentifier SubnetId { get; set; } + } +} diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetAgentProfile.Serialization.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetAgentProfile.Serialization.cs new file mode 100644 index 000000000000..24b5a242bf5f --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetAgentProfile.Serialization.cs @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ContainerServiceFleet.Models +{ + public partial class ContainerServiceFleetAgentProfile : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ContainerServiceFleetAgentProfile)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(SubnetId)) + { + writer.WritePropertyName("subnetId"u8); + writer.WriteStringValue(SubnetId); + } + if (Optional.IsDefined(VmSize)) + { + writer.WritePropertyName("vmSize"u8); + writer.WriteStringValue(VmSize); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ContainerServiceFleetAgentProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ContainerServiceFleetAgentProfile)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeContainerServiceFleetAgentProfile(document.RootElement, options); + } + + internal static ContainerServiceFleetAgentProfile DeserializeContainerServiceFleetAgentProfile(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier subnetId = default; + string vmSize = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("subnetId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + subnetId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("vmSize"u8)) + { + vmSize = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ContainerServiceFleetAgentProfile(subnetId, vmSize, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ContainerServiceFleetAgentProfile)} does not support writing '{options.Format}' format."); + } + } + + ContainerServiceFleetAgentProfile IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeContainerServiceFleetAgentProfile(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ContainerServiceFleetAgentProfile)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetAgentProfile.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetAgentProfile.cs new file mode 100644 index 000000000000..3337c87f860e --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetAgentProfile.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.ContainerServiceFleet.Models +{ + /// Agent profile for the Fleet hub. + public partial class ContainerServiceFleetAgentProfile + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ContainerServiceFleetAgentProfile() + { + } + + /// Initializes a new instance of . + /// The ID of the subnet which the Fleet hub node will join on startup. If this is not specified, a vnet and subnet will be generated and used. + /// The virtual machine size of the Fleet hub. + /// Keeps track of any properties unknown to the library. + internal ContainerServiceFleetAgentProfile(ResourceIdentifier subnetId, string vmSize, IDictionary serializedAdditionalRawData) + { + SubnetId = subnetId; + VmSize = vmSize; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The ID of the subnet which the Fleet hub node will join on startup. If this is not specified, a vnet and subnet will be generated and used. + public ResourceIdentifier SubnetId { get; set; } + /// The virtual machine size of the Fleet hub. + public string VmSize { get; set; } + } +} diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetListResult.Serialization.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetListResult.Serialization.cs index c8c97ba966cd..9bcffd0759d2 100644 --- a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetListResult.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ContainerServiceFleetListResult : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(ContainerServiceFleetListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } ContainerServiceFleetListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetManagedClusterUpdate.Serialization.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetManagedClusterUpdate.Serialization.cs index caf2bafd564d..266dd4f354d8 100644 --- a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetManagedClusterUpdate.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetManagedClusterUpdate.Serialization.cs @@ -18,6 +18,15 @@ public partial class ContainerServiceFleetManagedClusterUpdate : IUtf8JsonSerial void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(ContainerServiceFleetManagedClusterUpdate)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("upgrade"u8); writer.WriteObjectValue(Upgrade, options); if (Optional.IsDefined(NodeImageSelection)) @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } ContainerServiceFleetManagedClusterUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetManagedClusterUpdate.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetManagedClusterUpdate.cs index b335953fbd57..0f7aa7c2b264 100644 --- a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetManagedClusterUpdate.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetManagedClusterUpdate.cs @@ -74,15 +74,6 @@ internal ContainerServiceFleetManagedClusterUpdate() /// The upgrade to apply to the ManagedClusters. public ContainerServiceFleetManagedClusterUpgradeSpec Upgrade { get; set; } /// The node image upgrade to be applied to the target nodes in update run. - internal NodeImageSelection NodeImageSelection { get; set; } - /// The node image upgrade type. - public NodeImageSelectionType? SelectionType - { - get => NodeImageSelection is null ? default(NodeImageSelectionType?) : NodeImageSelection.SelectionType; - set - { - NodeImageSelection = value.HasValue ? new NodeImageSelection(value.Value) : null; - } - } + public NodeImageSelection NodeImageSelection { get; set; } } } diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetManagedClusterUpgradeSpec.Serialization.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetManagedClusterUpgradeSpec.Serialization.cs index b34bfdc05ff3..08407b13d777 100644 --- a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetManagedClusterUpgradeSpec.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetManagedClusterUpgradeSpec.Serialization.cs @@ -18,6 +18,15 @@ public partial class ContainerServiceFleetManagedClusterUpgradeSpec : IUtf8JsonS void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWr throw new FormatException($"The model {nameof(ContainerServiceFleetManagedClusterUpgradeSpec)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("type"u8); writer.WriteStringValue(UpgradeType.ToString()); if (Optional.IsDefined(KubernetesVersion)) @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWr #endif } } - writer.WriteEndObject(); } ContainerServiceFleetManagedClusterUpgradeSpec IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetManagedClusterUpgradeSpec.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetManagedClusterUpgradeSpec.cs index 6e1f4fb7b2d9..033bdaefe58a 100644 --- a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetManagedClusterUpgradeSpec.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetManagedClusterUpgradeSpec.cs @@ -46,22 +46,14 @@ public partial class ContainerServiceFleetManagedClusterUpgradeSpec private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// - /// The upgrade type. - /// Full requires the KubernetesVersion property to be set. - /// NodeImageOnly requires the KubernetesVersion property not to be set. - /// + /// ManagedClusterUpgradeType is the type of upgrade to be applied. public ContainerServiceFleetManagedClusterUpgradeSpec(ContainerServiceFleetManagedClusterUpgradeType upgradeType) { UpgradeType = upgradeType; } /// Initializes a new instance of . - /// - /// The upgrade type. - /// Full requires the KubernetesVersion property to be set. - /// NodeImageOnly requires the KubernetesVersion property not to be set. - /// + /// ManagedClusterUpgradeType is the type of upgrade to be applied. /// The Kubernetes version to upgrade the member clusters to. /// Keeps track of any properties unknown to the library. internal ContainerServiceFleetManagedClusterUpgradeSpec(ContainerServiceFleetManagedClusterUpgradeType upgradeType, string kubernetesVersion, IDictionary serializedAdditionalRawData) @@ -76,11 +68,7 @@ internal ContainerServiceFleetManagedClusterUpgradeSpec() { } - /// - /// The upgrade type. - /// Full requires the KubernetesVersion property to be set. - /// NodeImageOnly requires the KubernetesVersion property not to be set. - /// + /// ManagedClusterUpgradeType is the type of upgrade to be applied. public ContainerServiceFleetManagedClusterUpgradeType UpgradeType { get; set; } /// The Kubernetes version to upgrade the member clusters to. public string KubernetesVersion { get; set; } diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetManagedClusterUpgradeType.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetManagedClusterUpgradeType.cs index 51bb65dcbbf6..dd53bee46272 100644 --- a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetManagedClusterUpgradeType.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetManagedClusterUpgradeType.cs @@ -24,11 +24,14 @@ public ContainerServiceFleetManagedClusterUpgradeType(string value) private const string FullValue = "Full"; private const string NodeImageOnlyValue = "NodeImageOnly"; + private const string ControlPlaneOnlyValue = "ControlPlaneOnly"; - /// Full upgrades the control plane and all agent pools of the target ManagedClusters. + /// Full upgrades the control plane and all agent pools of the target ManagedClusters. Requires the ManagedClusterUpgradeSpec.KubernetesVersion property to be set. public static ContainerServiceFleetManagedClusterUpgradeType Full { get; } = new ContainerServiceFleetManagedClusterUpgradeType(FullValue); - /// NodeImageOnly upgrades only the node images of the target ManagedClusters. + /// NodeImageOnly upgrades only the node images of the target ManagedClusters. Requires the ManagedClusterUpgradeSpec.KubernetesVersion property to NOT be set. public static ContainerServiceFleetManagedClusterUpgradeType NodeImageOnly { get; } = new ContainerServiceFleetManagedClusterUpgradeType(NodeImageOnlyValue); + /// ControlPlaneOnly upgrades only targets the KubernetesVersion of the ManagedClusters and will not be applied to the AgentPool. Requires the ManagedClusterUpgradeSpec.KubernetesVersion property to be set. + public static ContainerServiceFleetManagedClusterUpgradeType ControlPlaneOnly { get; } = new ContainerServiceFleetManagedClusterUpgradeType(ControlPlaneOnlyValue); /// Determines if two values are the same. public static bool operator ==(ContainerServiceFleetManagedClusterUpgradeType left, ContainerServiceFleetManagedClusterUpgradeType right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetMemberListResult.Serialization.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetMemberListResult.Serialization.cs index 55d4123715f6..4aef6f8e46a4 100644 --- a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetMemberListResult.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetMemberListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ContainerServiceFleetMemberListResult : IUtf8JsonSerializ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(ContainerServiceFleetMemberListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } ContainerServiceFleetMemberListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetMemberPatch.Serialization.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetMemberPatch.Serialization.cs index 28f285e20448..06730a669e7a 100644 --- a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetMemberPatch.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetMemberPatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class ContainerServiceFleetMemberPatch : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(ContainerServiceFleetMemberPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Group)) @@ -49,7 +57,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } ContainerServiceFleetMemberPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetPatch.Serialization.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetPatch.Serialization.cs index 83cddb842352..78afa33fb60a 100644 --- a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetPatch.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetPatch.Serialization.cs @@ -19,6 +19,15 @@ public partial class ContainerServiceFleetPatch : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(ContainerServiceFleetPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } ContainerServiceFleetPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetSkipProperties.Serialization.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetSkipProperties.Serialization.cs new file mode 100644 index 000000000000..6b67621e2f95 --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetSkipProperties.Serialization.cs @@ -0,0 +1,136 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ContainerServiceFleet.Models +{ + public partial class ContainerServiceFleetSkipProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ContainerServiceFleetSkipProperties)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("targets"u8); + writer.WriteStartArray(); + foreach (var item in Targets) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ContainerServiceFleetSkipProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ContainerServiceFleetSkipProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeContainerServiceFleetSkipProperties(document.RootElement, options); + } + + internal static ContainerServiceFleetSkipProperties DeserializeContainerServiceFleetSkipProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList targets = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("targets"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ContainerServiceFleetSkipTarget.DeserializeContainerServiceFleetSkipTarget(item, options)); + } + targets = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ContainerServiceFleetSkipProperties(targets, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ContainerServiceFleetSkipProperties)} does not support writing '{options.Format}' format."); + } + } + + ContainerServiceFleetSkipProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeContainerServiceFleetSkipProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ContainerServiceFleetSkipProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetSkipProperties.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetSkipProperties.cs new file mode 100644 index 000000000000..1e5a2f99a4ab --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetSkipProperties.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.ContainerServiceFleet.Models +{ + /// The properties of a skip operation containing multiple skip requests. + public partial class ContainerServiceFleetSkipProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The targets to skip. + /// is null. + public ContainerServiceFleetSkipProperties(IEnumerable targets) + { + Argument.AssertNotNull(targets, nameof(targets)); + + Targets = targets.ToList(); + } + + /// Initializes a new instance of . + /// The targets to skip. + /// Keeps track of any properties unknown to the library. + internal ContainerServiceFleetSkipProperties(IList targets, IDictionary serializedAdditionalRawData) + { + Targets = targets; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ContainerServiceFleetSkipProperties() + { + } + + /// The targets to skip. + public IList Targets { get; } + } +} diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetSkipTarget.Serialization.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetSkipTarget.Serialization.cs new file mode 100644 index 000000000000..16828ee4f8de --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetSkipTarget.Serialization.cs @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ContainerServiceFleet.Models +{ + public partial class ContainerServiceFleetSkipTarget : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ContainerServiceFleetSkipTarget)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("type"u8); + writer.WriteStringValue(TargetType.ToString()); + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ContainerServiceFleetSkipTarget IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ContainerServiceFleetSkipTarget)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeContainerServiceFleetSkipTarget(document.RootElement, options); + } + + internal static ContainerServiceFleetSkipTarget DeserializeContainerServiceFleetSkipTarget(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ContainerServiceFleetTargetType type = default; + string name = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type"u8)) + { + type = new ContainerServiceFleetTargetType(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ContainerServiceFleetSkipTarget(type, name, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ContainerServiceFleetSkipTarget)} does not support writing '{options.Format}' format."); + } + } + + ContainerServiceFleetSkipTarget IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeContainerServiceFleetSkipTarget(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ContainerServiceFleetSkipTarget)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetSkipTarget.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetSkipTarget.cs new file mode 100644 index 000000000000..00cec6af3b69 --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetSkipTarget.cs @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ContainerServiceFleet.Models +{ + /// The definition of a single skip request. + public partial class ContainerServiceFleetSkipTarget + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The skip target type. + /// + /// The skip target's name. + /// To skip a member/group/stage, use the member/group/stage's name; + /// Tp skip an after stage wait, use the parent stage's name. + /// + /// is null. + public ContainerServiceFleetSkipTarget(ContainerServiceFleetTargetType targetType, string name) + { + Argument.AssertNotNull(name, nameof(name)); + + TargetType = targetType; + Name = name; + } + + /// Initializes a new instance of . + /// The skip target type. + /// + /// The skip target's name. + /// To skip a member/group/stage, use the member/group/stage's name; + /// Tp skip an after stage wait, use the parent stage's name. + /// + /// Keeps track of any properties unknown to the library. + internal ContainerServiceFleetSkipTarget(ContainerServiceFleetTargetType targetType, string name, IDictionary serializedAdditionalRawData) + { + TargetType = targetType; + Name = name; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ContainerServiceFleetSkipTarget() + { + } + + /// The skip target type. + public ContainerServiceFleetTargetType TargetType { get; } + /// + /// The skip target's name. + /// To skip a member/group/stage, use the member/group/stage's name; + /// Tp skip an after stage wait, use the parent stage's name. + /// + public string Name { get; } + } +} diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetTargetType.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetTargetType.cs new file mode 100644 index 000000000000..a7fcc2672034 --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetTargetType.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ContainerServiceFleet.Models +{ + /// The target type of a skip request. + public readonly partial struct ContainerServiceFleetTargetType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ContainerServiceFleetTargetType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string MemberValue = "Member"; + private const string GroupValue = "Group"; + private const string StageValue = "Stage"; + private const string AfterStageWaitValue = "AfterStageWait"; + + /// Skip the update of a member. + public static ContainerServiceFleetTargetType Member { get; } = new ContainerServiceFleetTargetType(MemberValue); + /// Skip the update of a group. + public static ContainerServiceFleetTargetType Group { get; } = new ContainerServiceFleetTargetType(GroupValue); + /// Skip the update of an entire stage including the after stage wait. + public static ContainerServiceFleetTargetType Stage { get; } = new ContainerServiceFleetTargetType(StageValue); + /// Skip the update of the after stage wait of a certain stage. + public static ContainerServiceFleetTargetType AfterStageWait { get; } = new ContainerServiceFleetTargetType(AfterStageWaitValue); + /// Determines if two values are the same. + public static bool operator ==(ContainerServiceFleetTargetType left, ContainerServiceFleetTargetType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ContainerServiceFleetTargetType left, ContainerServiceFleetTargetType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ContainerServiceFleetTargetType(string value) => new ContainerServiceFleetTargetType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ContainerServiceFleetTargetType other && Equals(other); + /// + public bool Equals(ContainerServiceFleetTargetType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetUpdateGroup.Serialization.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetUpdateGroup.Serialization.cs index b0f32e00aa3b..3f951726d248 100644 --- a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetUpdateGroup.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetUpdateGroup.Serialization.cs @@ -18,6 +18,15 @@ public partial class ContainerServiceFleetUpdateGroup : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(ContainerServiceFleetUpdateGroup)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } ContainerServiceFleetUpdateGroup IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetUpdateGroupStatus.Serialization.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetUpdateGroupStatus.Serialization.cs index 345a9395736b..6e3eefc568a8 100644 --- a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetUpdateGroupStatus.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetUpdateGroupStatus.Serialization.cs @@ -18,6 +18,15 @@ public partial class ContainerServiceFleetUpdateGroupStatus : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(ContainerServiceFleetUpdateGroupStatus)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Status)) { writer.WritePropertyName("status"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } ContainerServiceFleetUpdateGroupStatus IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetUpdateRunListResult.Serialization.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetUpdateRunListResult.Serialization.cs index a79b3331e7b8..2ac9fd29daec 100644 --- a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetUpdateRunListResult.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetUpdateRunListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ContainerServiceFleetUpdateRunListResult : IUtf8JsonSeria void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter w throw new FormatException($"The model {nameof(ContainerServiceFleetUpdateRunListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter w #endif } } - writer.WriteEndObject(); } ContainerServiceFleetUpdateRunListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetUpdateRunStatus.Serialization.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetUpdateRunStatus.Serialization.cs index ca1917b9b581..d981d3cafd37 100644 --- a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetUpdateRunStatus.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetUpdateRunStatus.Serialization.cs @@ -18,6 +18,15 @@ public partial class ContainerServiceFleetUpdateRunStatus : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(ContainerServiceFleetUpdateRunStatus)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Status)) { writer.WritePropertyName("status"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } ContainerServiceFleetUpdateRunStatus IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetUpdateRunStrategy.Serialization.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetUpdateRunStrategy.Serialization.cs index e6a386f02cc9..929fc7778cb3 100644 --- a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetUpdateRunStrategy.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetUpdateRunStrategy.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ContainerServiceFleetUpdateRunStrategy : IUtf8JsonSeriali void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(ContainerServiceFleetUpdateRunStrategy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("stages"u8); writer.WriteStartArray(); foreach (var item in Stages) @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } ContainerServiceFleetUpdateRunStrategy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetUpdateStage.Serialization.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetUpdateStage.Serialization.cs index ca6f587c8517..1b556d2729cc 100644 --- a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetUpdateStage.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetUpdateStage.Serialization.cs @@ -18,6 +18,15 @@ public partial class ContainerServiceFleetUpdateStage : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(ContainerServiceFleetUpdateStage)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); if (Optional.IsCollectionDefined(Groups)) @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } ContainerServiceFleetUpdateStage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetUpdateStageStatus.Serialization.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetUpdateStageStatus.Serialization.cs index 0cca75d2f4be..11d35146e8a8 100644 --- a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetUpdateStageStatus.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetUpdateStageStatus.Serialization.cs @@ -18,6 +18,15 @@ public partial class ContainerServiceFleetUpdateStageStatus : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(ContainerServiceFleetUpdateStageStatus)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Status)) { writer.WritePropertyName("status"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } ContainerServiceFleetUpdateStageStatus IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetUpdateStatus.Serialization.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetUpdateStatus.Serialization.cs index 03b6266fd5b3..728ec62087bf 100644 --- a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetUpdateStatus.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetUpdateStatus.Serialization.cs @@ -18,6 +18,15 @@ public partial class ContainerServiceFleetUpdateStatus : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(ContainerServiceFleetUpdateStatus)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(StartOn)) { writer.WritePropertyName("startTime"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } ContainerServiceFleetUpdateStatus IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetUpgradeChannel.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetUpgradeChannel.cs new file mode 100644 index 000000000000..52de992761d9 --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetUpgradeChannel.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ContainerServiceFleet.Models +{ + /// Configuration of how auto upgrade will be run. + public readonly partial struct ContainerServiceFleetUpgradeChannel : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ContainerServiceFleetUpgradeChannel(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string StableValue = "Stable"; + private const string RapidValue = "Rapid"; + private const string NodeImageValue = "NodeImage"; + + /// + /// Upgrades the clusters kubernetes version to the latest supported patch release on minor version N-1, where N is the latest supported minor version. + /// For example, if a cluster runs version 1.17.7 and versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, the cluster upgrades to 1.18.6. + /// + public static ContainerServiceFleetUpgradeChannel Stable { get; } = new ContainerServiceFleetUpgradeChannel(StableValue); + /// Upgrades the clusters kubernetes version to the latest supported patch release on the latest supported minor version. + public static ContainerServiceFleetUpgradeChannel Rapid { get; } = new ContainerServiceFleetUpgradeChannel(RapidValue); + /// Upgrade node image version of the clusters. + public static ContainerServiceFleetUpgradeChannel NodeImage { get; } = new ContainerServiceFleetUpgradeChannel(NodeImageValue); + /// Determines if two values are the same. + public static bool operator ==(ContainerServiceFleetUpgradeChannel left, ContainerServiceFleetUpgradeChannel right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ContainerServiceFleetUpgradeChannel left, ContainerServiceFleetUpgradeChannel right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ContainerServiceFleetUpgradeChannel(string value) => new ContainerServiceFleetUpgradeChannel(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ContainerServiceFleetUpgradeChannel other && Equals(other); + /// + public bool Equals(ContainerServiceFleetUpgradeChannel other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetWaitStatus.Serialization.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetWaitStatus.Serialization.cs index 55171e38584e..d490da3e6d07 100644 --- a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetWaitStatus.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetWaitStatus.Serialization.cs @@ -18,6 +18,15 @@ public partial class ContainerServiceFleetWaitStatus : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(ContainerServiceFleetWaitStatus)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Status)) { writer.WritePropertyName("status"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } ContainerServiceFleetWaitStatus IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/FleetCredentialResult.Serialization.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/FleetCredentialResult.Serialization.cs index f0f68e7d5f0b..5a72c9a3ef77 100644 --- a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/FleetCredentialResult.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/FleetCredentialResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class FleetCredentialResult : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(FleetCredentialResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } FleetCredentialResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/FleetCredentialResults.Serialization.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/FleetCredentialResults.Serialization.cs index 4e3001405fa4..8691532672db 100644 --- a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/FleetCredentialResults.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/FleetCredentialResults.Serialization.cs @@ -18,6 +18,15 @@ public partial class FleetCredentialResults : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(FleetCredentialResults)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Kubeconfigs)) { writer.WritePropertyName("kubeconfigs"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } FleetCredentialResults IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/FleetHubProfile.Serialization.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/FleetHubProfile.Serialization.cs new file mode 100644 index 000000000000..e680663dab47 --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/FleetHubProfile.Serialization.cs @@ -0,0 +1,199 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ContainerServiceFleet.Models +{ + public partial class FleetHubProfile : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FleetHubProfile)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(DnsPrefix)) + { + writer.WritePropertyName("dnsPrefix"u8); + writer.WriteStringValue(DnsPrefix); + } + if (Optional.IsDefined(ApiServerAccessProfile)) + { + writer.WritePropertyName("apiServerAccessProfile"u8); + writer.WriteObjectValue(ApiServerAccessProfile, options); + } + if (Optional.IsDefined(AgentProfile)) + { + writer.WritePropertyName("agentProfile"u8); + writer.WriteObjectValue(AgentProfile, options); + } + if (options.Format != "W" && Optional.IsDefined(Fqdn)) + { + writer.WritePropertyName("fqdn"u8); + writer.WriteStringValue(Fqdn); + } + if (options.Format != "W" && Optional.IsDefined(KubernetesVersion)) + { + writer.WritePropertyName("kubernetesVersion"u8); + writer.WriteStringValue(KubernetesVersion); + } + if (options.Format != "W" && Optional.IsDefined(PortalFqdn)) + { + writer.WritePropertyName("portalFqdn"u8); + writer.WriteStringValue(PortalFqdn); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + FleetHubProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FleetHubProfile)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFleetHubProfile(document.RootElement, options); + } + + internal static FleetHubProfile DeserializeFleetHubProfile(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string dnsPrefix = default; + ContainerServiceFleetAPIServerAccessProfile apiServerAccessProfile = default; + ContainerServiceFleetAgentProfile agentProfile = default; + string fqdn = default; + string kubernetesVersion = default; + string portalFqdn = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("dnsPrefix"u8)) + { + dnsPrefix = property.Value.GetString(); + continue; + } + if (property.NameEquals("apiServerAccessProfile"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + apiServerAccessProfile = ContainerServiceFleetAPIServerAccessProfile.DeserializeContainerServiceFleetAPIServerAccessProfile(property.Value, options); + continue; + } + if (property.NameEquals("agentProfile"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + agentProfile = ContainerServiceFleetAgentProfile.DeserializeContainerServiceFleetAgentProfile(property.Value, options); + continue; + } + if (property.NameEquals("fqdn"u8)) + { + fqdn = property.Value.GetString(); + continue; + } + if (property.NameEquals("kubernetesVersion"u8)) + { + kubernetesVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("portalFqdn"u8)) + { + portalFqdn = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new FleetHubProfile( + dnsPrefix, + apiServerAccessProfile, + agentProfile, + fqdn, + kubernetesVersion, + portalFqdn, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(FleetHubProfile)} does not support writing '{options.Format}' format."); + } + } + + FleetHubProfile IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeFleetHubProfile(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FleetHubProfile)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/FleetHubProfile.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/FleetHubProfile.cs new file mode 100644 index 000000000000..09a8a2486f12 --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/FleetHubProfile.cs @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ContainerServiceFleet.Models +{ + /// The FleetHubProfile configures the fleet hub. + public partial class FleetHubProfile + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public FleetHubProfile() + { + } + + /// Initializes a new instance of . + /// DNS prefix used to create the FQDN for the Fleet hub. + /// The access profile for the Fleet hub API server. + /// The agent profile for the Fleet hub. + /// The FQDN of the Fleet hub. + /// The Kubernetes version of the Fleet hub. + /// The Azure Portal FQDN of the Fleet hub. + /// Keeps track of any properties unknown to the library. + internal FleetHubProfile(string dnsPrefix, ContainerServiceFleetAPIServerAccessProfile apiServerAccessProfile, ContainerServiceFleetAgentProfile agentProfile, string fqdn, string kubernetesVersion, string portalFqdn, IDictionary serializedAdditionalRawData) + { + DnsPrefix = dnsPrefix; + ApiServerAccessProfile = apiServerAccessProfile; + AgentProfile = agentProfile; + Fqdn = fqdn; + KubernetesVersion = kubernetesVersion; + PortalFqdn = portalFqdn; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// DNS prefix used to create the FQDN for the Fleet hub. + public string DnsPrefix { get; set; } + /// The access profile for the Fleet hub API server. + public ContainerServiceFleetAPIServerAccessProfile ApiServerAccessProfile { get; set; } + /// The agent profile for the Fleet hub. + public ContainerServiceFleetAgentProfile AgentProfile { get; set; } + /// The FQDN of the Fleet hub. + public string Fqdn { get; } + /// The Kubernetes version of the Fleet hub. + public string KubernetesVersion { get; } + /// The Azure Portal FQDN of the Fleet hub. + public string PortalFqdn { get; } + } +} diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/FleetUpdateStrategyListResult.Serialization.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/FleetUpdateStrategyListResult.Serialization.cs index 1eb28ce3a328..5354afb26a62 100644 --- a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/FleetUpdateStrategyListResult.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/FleetUpdateStrategyListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class FleetUpdateStrategyListResult : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(FleetUpdateStrategyListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } FleetUpdateStrategyListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/MemberUpdateStatus.Serialization.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/MemberUpdateStatus.Serialization.cs index ddf3d2265926..28b31994f473 100644 --- a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/MemberUpdateStatus.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/MemberUpdateStatus.Serialization.cs @@ -18,6 +18,15 @@ public partial class MemberUpdateStatus : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(MemberUpdateStatus)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Status)) { writer.WritePropertyName("status"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } MemberUpdateStatus IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/NodeImageSelection.Serialization.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/NodeImageSelection.Serialization.cs index 1492f4719f2d..5c1d343d2c0a 100644 --- a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/NodeImageSelection.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/NodeImageSelection.Serialization.cs @@ -13,11 +13,20 @@ namespace Azure.ResourceManager.ContainerServiceFleet.Models { - internal partial class NodeImageSelection : IUtf8JsonSerializable, IJsonModel + public partial class NodeImageSelection : IUtf8JsonSerializable, IJsonModel { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,9 +34,18 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(NodeImageSelection)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("type"u8); writer.WriteStringValue(SelectionType.ToString()); + if (Optional.IsCollectionDefined(CustomNodeImageVersions)) + { + writer.WritePropertyName("customNodeImageVersions"u8); + writer.WriteStartArray(); + foreach (var item in CustomNodeImageVersions) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -43,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } NodeImageSelection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -67,6 +84,7 @@ internal static NodeImageSelection DeserializeNodeImageSelection(JsonElement ele return null; } NodeImageSelectionType type = default; + IList customNodeImageVersions = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -76,13 +94,27 @@ internal static NodeImageSelection DeserializeNodeImageSelection(JsonElement ele type = new NodeImageSelectionType(property.Value.GetString()); continue; } + if (property.NameEquals("customNodeImageVersions"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(NodeImageVersion.DeserializeNodeImageVersion(item, options)); + } + customNodeImageVersions = array; + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new NodeImageSelection(type, serializedAdditionalRawData); + return new NodeImageSelection(type, customNodeImageVersions ?? new ChangeTrackingList(), serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/NodeImageSelection.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/NodeImageSelection.cs index 1138a95b1d3c..9ae40e07863e 100644 --- a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/NodeImageSelection.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/NodeImageSelection.cs @@ -11,7 +11,7 @@ namespace Azure.ResourceManager.ContainerServiceFleet.Models { /// The node image upgrade to be applied to the target nodes in update run. - internal partial class NodeImageSelection + public partial class NodeImageSelection { /// /// Keeps track of any properties unknown to the library. @@ -50,14 +50,17 @@ internal partial class NodeImageSelection public NodeImageSelection(NodeImageSelectionType selectionType) { SelectionType = selectionType; + CustomNodeImageVersions = new ChangeTrackingList(); } /// Initializes a new instance of . /// The node image upgrade type. + /// Custom node image versions to upgrade the nodes to. This field is required if node image selection type is Custom. Otherwise, it must be empty. For each node image family (e.g., 'AKSUbuntu-1804gen2containerd'), this field can contain at most one version (e.g., only one of 'AKSUbuntu-1804gen2containerd-2023.01.12' or 'AKSUbuntu-1804gen2containerd-2023.02.12', not both). If the nodes belong to a family without a matching image version in this field, they are not upgraded. /// Keeps track of any properties unknown to the library. - internal NodeImageSelection(NodeImageSelectionType selectionType, IDictionary serializedAdditionalRawData) + internal NodeImageSelection(NodeImageSelectionType selectionType, IList customNodeImageVersions, IDictionary serializedAdditionalRawData) { SelectionType = selectionType; + CustomNodeImageVersions = customNodeImageVersions; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -68,5 +71,7 @@ internal NodeImageSelection() /// The node image upgrade type. public NodeImageSelectionType SelectionType { get; set; } + /// Custom node image versions to upgrade the nodes to. This field is required if node image selection type is Custom. Otherwise, it must be empty. For each node image family (e.g., 'AKSUbuntu-1804gen2containerd'), this field can contain at most one version (e.g., only one of 'AKSUbuntu-1804gen2containerd-2023.01.12' or 'AKSUbuntu-1804gen2containerd-2023.02.12', not both). If the nodes belong to a family without a matching image version in this field, they are not upgraded. + public IList CustomNodeImageVersions { get; } } } diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/NodeImageSelectionStatus.Serialization.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/NodeImageSelectionStatus.Serialization.cs index 7bf66af2c84e..d43a9c300e9d 100644 --- a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/NodeImageSelectionStatus.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/NodeImageSelectionStatus.Serialization.cs @@ -18,6 +18,15 @@ internal partial class NodeImageSelectionStatus : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(NodeImageSelectionStatus)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(SelectedNodeImageVersions)) { writer.WritePropertyName("selectedNodeImageVersions"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } NodeImageSelectionStatus IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/NodeImageSelectionType.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/NodeImageSelectionType.cs index 2f2606ef50b6..ea1381fe7ee2 100644 --- a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/NodeImageSelectionType.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/NodeImageSelectionType.cs @@ -24,11 +24,14 @@ public NodeImageSelectionType(string value) private const string LatestValue = "Latest"; private const string ConsistentValue = "Consistent"; + private const string CustomValue = "Custom"; /// Use the latest image version when upgrading nodes. Clusters may use different image versions (e.g., 'AKSUbuntu-1804gen2containerd-2021.10.12' and 'AKSUbuntu-1804gen2containerd-2021.10.19') because, for example, the latest available version is different in different regions. public static NodeImageSelectionType Latest { get; } = new NodeImageSelectionType(LatestValue); /// The image versions to upgrade nodes to are selected as described below: for each node pool in managed clusters affected by the update run, the system selects the latest image version such that it is available across all other node pools (in all other clusters) of the same image type. As a result, all node pools of the same image type will be upgraded to the same image version. For example, if the latest image version for image type 'AKSUbuntu-1804gen2containerd' is 'AKSUbuntu-1804gen2containerd-2021.10.12' for a node pool in cluster A in region X, and is 'AKSUbuntu-1804gen2containerd-2021.10.17' for a node pool in cluster B in region Y, the system will upgrade both node pools to image version 'AKSUbuntu-1804gen2containerd-2021.10.12'. public static NodeImageSelectionType Consistent { get; } = new NodeImageSelectionType(ConsistentValue); + /// Upgrade the nodes to the custom image versions. When set, update run will use node image versions provided in customNodeImageVersions to upgrade the nodes. If set, customNodeImageVersions must not be empty. + public static NodeImageSelectionType Custom { get; } = new NodeImageSelectionType(CustomValue); /// Determines if two values are the same. public static bool operator ==(NodeImageSelectionType left, NodeImageSelectionType right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/NodeImageVersion.Serialization.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/NodeImageVersion.Serialization.cs index 5e88fd13512f..d7a202202552 100644 --- a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/NodeImageVersion.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/NodeImageVersion.Serialization.cs @@ -18,6 +18,15 @@ public partial class NodeImageVersion : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(NodeImageVersion)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Version)) { writer.WritePropertyName("version"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } NodeImageVersion IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/NodeImageVersion.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/NodeImageVersion.cs index 36ab15959a68..fb3d930628c2 100644 --- a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/NodeImageVersion.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/NodeImageVersion.cs @@ -46,7 +46,7 @@ public partial class NodeImageVersion private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal NodeImageVersion() + public NodeImageVersion() { } diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/RestOperations/AutoUpgradeProfilesRestOperations.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/RestOperations/AutoUpgradeProfilesRestOperations.cs new file mode 100644 index 000000000000..969033b5ed7c --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/RestOperations/AutoUpgradeProfilesRestOperations.cs @@ -0,0 +1,531 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.ContainerServiceFleet.Models; + +namespace Azure.ResourceManager.ContainerServiceFleet +{ + internal partial class AutoUpgradeProfilesRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of AutoUpgradeProfilesRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public AutoUpgradeProfilesRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2024-05-02-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListByFleetRequestUri(string subscriptionId, string resourceGroupName, string fleetName) + { + 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.ContainerService/fleets/", false); + uri.AppendPath(fleetName, true); + uri.AppendPath("/autoUpgradeProfiles", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByFleetRequest(string subscriptionId, string resourceGroupName, string fleetName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + 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.ContainerService/fleets/", false); + uri.AppendPath(fleetName, true); + uri.AppendPath("/autoUpgradeProfiles", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List AutoUpgradeProfile resources by Fleet. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Fleet resource. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByFleetAsync(string subscriptionId, string resourceGroupName, string fleetName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + + using var message = CreateListByFleetRequest(subscriptionId, resourceGroupName, fleetName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AutoUpgradeProfileListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = AutoUpgradeProfileListResult.DeserializeAutoUpgradeProfileListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List AutoUpgradeProfile resources by Fleet. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Fleet resource. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByFleet(string subscriptionId, string resourceGroupName, string fleetName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + + using var message = CreateListByFleetRequest(subscriptionId, resourceGroupName, fleetName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AutoUpgradeProfileListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = AutoUpgradeProfileListResult.DeserializeAutoUpgradeProfileListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string fleetName, string autoUpgradeProfileName) + { + 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.ContainerService/fleets/", false); + uri.AppendPath(fleetName, true); + uri.AppendPath("/autoUpgradeProfiles/", false); + uri.AppendPath(autoUpgradeProfileName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string fleetName, string autoUpgradeProfileName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + 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.ContainerService/fleets/", false); + uri.AppendPath(fleetName, true); + uri.AppendPath("/autoUpgradeProfiles/", false); + uri.AppendPath(autoUpgradeProfileName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a AutoUpgradeProfile. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Fleet resource. + /// The name of the AutoUpgradeProfile resource. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string fleetName, string autoUpgradeProfileName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + Argument.AssertNotNullOrEmpty(autoUpgradeProfileName, nameof(autoUpgradeProfileName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, fleetName, autoUpgradeProfileName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AutoUpgradeProfileData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = AutoUpgradeProfileData.DeserializeAutoUpgradeProfileData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((AutoUpgradeProfileData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a AutoUpgradeProfile. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Fleet resource. + /// The name of the AutoUpgradeProfile resource. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string fleetName, string autoUpgradeProfileName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + Argument.AssertNotNullOrEmpty(autoUpgradeProfileName, nameof(autoUpgradeProfileName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, fleetName, autoUpgradeProfileName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AutoUpgradeProfileData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = AutoUpgradeProfileData.DeserializeAutoUpgradeProfileData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((AutoUpgradeProfileData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string fleetName, string autoUpgradeProfileName, AutoUpgradeProfileData data, string ifMatch, string ifNoneMatch) + { + 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.ContainerService/fleets/", false); + uri.AppendPath(fleetName, true); + uri.AppendPath("/autoUpgradeProfiles/", false); + uri.AppendPath(autoUpgradeProfileName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string fleetName, string autoUpgradeProfileName, AutoUpgradeProfileData data, string ifMatch, string ifNoneMatch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + 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.ContainerService/fleets/", false); + uri.AppendPath(fleetName, true); + uri.AppendPath("/autoUpgradeProfiles/", false); + uri.AppendPath(autoUpgradeProfileName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + if (ifMatch != null) + { + request.Headers.Add("If-Match", ifMatch); + } + if (ifNoneMatch != null) + { + request.Headers.Add("If-None-Match", ifNoneMatch); + } + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create a AutoUpgradeProfile. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Fleet resource. + /// The name of the AutoUpgradeProfile resource. + /// Resource create parameters. + /// The request should only proceed if an entity matches this string. + /// The request should only proceed if no entity matches this string. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string fleetName, string autoUpgradeProfileName, AutoUpgradeProfileData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + Argument.AssertNotNullOrEmpty(autoUpgradeProfileName, nameof(autoUpgradeProfileName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, fleetName, autoUpgradeProfileName, data, ifMatch, ifNoneMatch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create a AutoUpgradeProfile. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Fleet resource. + /// The name of the AutoUpgradeProfile resource. + /// Resource create parameters. + /// The request should only proceed if an entity matches this string. + /// The request should only proceed if no entity matches this string. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string fleetName, string autoUpgradeProfileName, AutoUpgradeProfileData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + Argument.AssertNotNullOrEmpty(autoUpgradeProfileName, nameof(autoUpgradeProfileName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, fleetName, autoUpgradeProfileName, data, ifMatch, ifNoneMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string fleetName, string autoUpgradeProfileName, string ifMatch) + { + 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.ContainerService/fleets/", false); + uri.AppendPath(fleetName, true); + uri.AppendPath("/autoUpgradeProfiles/", false); + uri.AppendPath(autoUpgradeProfileName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string fleetName, string autoUpgradeProfileName, string ifMatch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + 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.ContainerService/fleets/", false); + uri.AppendPath(fleetName, true); + uri.AppendPath("/autoUpgradeProfiles/", false); + uri.AppendPath(autoUpgradeProfileName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + if (ifMatch != null) + { + request.Headers.Add("If-Match", ifMatch); + } + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete a AutoUpgradeProfile. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Fleet resource. + /// The name of the AutoUpgradeProfile resource. + /// The request should only proceed if an entity matches this string. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string fleetName, string autoUpgradeProfileName, string ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + Argument.AssertNotNullOrEmpty(autoUpgradeProfileName, nameof(autoUpgradeProfileName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, fleetName, autoUpgradeProfileName, ifMatch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete a AutoUpgradeProfile. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Fleet resource. + /// The name of the AutoUpgradeProfile resource. + /// The request should only proceed if an entity matches this string. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string fleetName, string autoUpgradeProfileName, string ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + Argument.AssertNotNullOrEmpty(autoUpgradeProfileName, nameof(autoUpgradeProfileName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, fleetName, autoUpgradeProfileName, ifMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByFleetNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string fleetName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByFleetNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string fleetName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List AutoUpgradeProfile resources by Fleet. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Fleet resource. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByFleetNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string fleetName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + + using var message = CreateListByFleetNextPageRequest(nextLink, subscriptionId, resourceGroupName, fleetName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AutoUpgradeProfileListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = AutoUpgradeProfileListResult.DeserializeAutoUpgradeProfileListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List AutoUpgradeProfile resources by Fleet. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Fleet resource. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByFleetNextPage(string nextLink, string subscriptionId, string resourceGroupName, string fleetName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + + using var message = CreateListByFleetNextPageRequest(nextLink, subscriptionId, resourceGroupName, fleetName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AutoUpgradeProfileListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = AutoUpgradeProfileListResult.DeserializeAutoUpgradeProfileListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/RestOperations/FleetMembersRestOperations.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/RestOperations/FleetMembersRestOperations.cs index 87fbf6a8bf2b..00c7a9bb3f78 100644 --- a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/RestOperations/FleetMembersRestOperations.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/RestOperations/FleetMembersRestOperations.cs @@ -32,7 +32,7 @@ public FleetMembersRestOperations(HttpPipeline pipeline, string applicationId, U { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-10-15"; + _apiVersion = apiVersion ?? "2024-05-02-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/RestOperations/FleetUpdateStrategiesRestOperations.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/RestOperations/FleetUpdateStrategiesRestOperations.cs index 12e25f51db79..83ae88ea9200 100644 --- a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/RestOperations/FleetUpdateStrategiesRestOperations.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/RestOperations/FleetUpdateStrategiesRestOperations.cs @@ -32,7 +32,7 @@ public FleetUpdateStrategiesRestOperations(HttpPipeline pipeline, string applica { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-10-15"; + _apiVersion = apiVersion ?? "2024-05-02-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/RestOperations/FleetsRestOperations.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/RestOperations/FleetsRestOperations.cs index d39cbc5edd77..3fd2e3eb2646 100644 --- a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/RestOperations/FleetsRestOperations.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/RestOperations/FleetsRestOperations.cs @@ -32,7 +32,7 @@ public FleetsRestOperations(HttpPipeline pipeline, string applicationId, Uri end { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-10-15"; + _apiVersion = apiVersion ?? "2024-05-02-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/RestOperations/UpdateRunsRestOperations.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/RestOperations/UpdateRunsRestOperations.cs index 1b7c8e52c902..de5aaf814cc7 100644 --- a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/RestOperations/UpdateRunsRestOperations.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/RestOperations/UpdateRunsRestOperations.cs @@ -32,7 +32,7 @@ public UpdateRunsRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-10-15"; + _apiVersion = apiVersion ?? "2024-05-02-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -446,6 +446,114 @@ public Response Delete(string subscriptionId, string resourceGroupName, string f } } + internal RequestUriBuilder CreateSkipRequestUri(string subscriptionId, string resourceGroupName, string fleetName, string updateRunName, ContainerServiceFleetSkipProperties body, string ifMatch) + { + 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.ContainerService/fleets/", false); + uri.AppendPath(fleetName, true); + uri.AppendPath("/updateRuns/", false); + uri.AppendPath(updateRunName, true); + uri.AppendPath("/skip", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateSkipRequest(string subscriptionId, string resourceGroupName, string fleetName, string updateRunName, ContainerServiceFleetSkipProperties body, string ifMatch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + 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.ContainerService/fleets/", false); + uri.AppendPath(fleetName, true); + uri.AppendPath("/updateRuns/", false); + uri.AppendPath(updateRunName, true); + uri.AppendPath("/skip", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + if (ifMatch != null) + { + request.Headers.Add("If-Match", ifMatch); + } + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(body, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Skips one or a combination of member/group/stage/afterStageWait(s) of an update run. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Fleet resource. + /// The name of the UpdateRun resource. + /// The content of the action request. + /// The request should only proceed if an entity matches this string. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task SkipAsync(string subscriptionId, string resourceGroupName, string fleetName, string updateRunName, ContainerServiceFleetSkipProperties body, string ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + Argument.AssertNotNullOrEmpty(updateRunName, nameof(updateRunName)); + Argument.AssertNotNull(body, nameof(body)); + + using var message = CreateSkipRequest(subscriptionId, resourceGroupName, fleetName, updateRunName, body, ifMatch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Skips one or a combination of member/group/stage/afterStageWait(s) of an update run. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Fleet resource. + /// The name of the UpdateRun resource. + /// The content of the action request. + /// The request should only proceed if an entity matches this string. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Skip(string subscriptionId, string resourceGroupName, string fleetName, string updateRunName, ContainerServiceFleetSkipProperties body, string ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + Argument.AssertNotNullOrEmpty(updateRunName, nameof(updateRunName)); + Argument.AssertNotNull(body, nameof(body)); + + using var message = CreateSkipRequest(subscriptionId, resourceGroupName, fleetName, updateRunName, body, ifMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + internal RequestUriBuilder CreateStartRequestUri(string subscriptionId, string resourceGroupName, string fleetName, string updateRunName, string ifMatch) { var uri = new RawRequestUriBuilder(); diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/autorest.md b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/autorest.md index c60c7c87c5b3..284c85f7778c 100644 --- a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/autorest.md +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/autorest.md @@ -7,8 +7,7 @@ azure-arm: true csharp: true library-name: ContainerServiceFleet namespace: Azure.ResourceManager.ContainerServiceFleet -require: https://github.com/Azure/azure-rest-api-specs/blob/9837baba3ca259b4f2a3f736593311f445c35c63/specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/readme.md -#tag: package-2023-10 +require: https://github.com/Azure/azure-rest-api-specs/blob/7ec14d22272e95ba23e2dbaa969531448c4d7af6/specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/readme.md output-folder: $(this-folder)/Generated clear-output-folder: true sample-gen: @@ -18,6 +17,7 @@ skip-csproj: true modelerfour: flatten-payloads: false use-model-reader-writer: true +use-write-core: true #mgmt-debug: # show-serialized-names: true @@ -28,6 +28,10 @@ rename-mapping: FleetMember: ContainerServiceFleetMember FleetMemberListResult: ContainerServiceFleetMemberListResult MemberUpdateStatus.clusterResourceId: -|arm-id + SkipProperties: ContainerServiceFleetSkipProperties + SkipTarget: ContainerServiceFleetSkipTarget + TargetType: ContainerServiceFleetTargetType + UpgradeChannel: ContainerServiceFleetUpgradeChannel prepend-rp-prefix: - AgentProfile @@ -79,18 +83,6 @@ acronym-mapping: Etag: ETag|etag ETag: ETag|eTag -operations-to-lro-api-version-override: - Fleets_CreateOrUpdate: "2016-03-30" - Fleets_Update: "2016-03-30" - Fleets_Delete: "2016-03-30" - FleetMembers_Create: "2016-03-30" - FleetMembers_Update: "2016-03-30" - FleetMembers_Delete: "2016-03-30" - UpdateRuns_CreateOrUpdate: "2016-03-30" - UpdateRuns_Delete: "2016-03-30" - FleetUpdateStrategies_CreateOrUpdate: "2016-03-30" - FleetUpdateStrategies_Delete: "2016-03-30" - models-to-treat-empty-string-as-null: - SubnetResourceId ``` diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/tests/Scenario/FleetCRUD.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/tests/Scenario/FleetCRUD.cs index bd0b6f5415c2..f63590493341 100644 --- a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/tests/Scenario/FleetCRUD.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/tests/Scenario/FleetCRUD.cs @@ -104,7 +104,7 @@ public async Task FleetCRUDTest() string updateRunName = "run1"; ContainerServiceFleetUpdateRunData updateRunData = new ContainerServiceFleetUpdateRunData(); updateRunData.ManagedClusterUpdate = new ContainerServiceFleetManagedClusterUpdate( - new ContainerServiceFleetManagedClusterUpgradeSpec(ContainerServiceFleetManagedClusterUpgradeType.Full, "1.26.1", null), new NodeImageSelection(NodeImageSelectionType.Latest), null); + new ContainerServiceFleetManagedClusterUpgradeSpec(ContainerServiceFleetManagedClusterUpgradeType.Full, "1.29.8", null), new NodeImageSelection(NodeImageSelectionType.Latest), null); ArmOperation createUpdateRunLRO = await updateRunCollection.CreateOrUpdateAsync(WaitUntil.Completed, updateRunName, updateRunData); ContainerServiceFleetUpdateRunResource updateRunResource = createUpdateRunLRO.Value; @@ -123,6 +123,45 @@ public async Task FleetCRUDTest() ArmOperation stopUpdateRunLRO = await updateRunResource.StopAsync(WaitUntil.Completed); Console.WriteLine($"Succeeded on id: {stopUpdateRunLRO.Value.Data.Id}"); + // Create AutoUpgradeProfile + AutoUpgradeProfileCollection autoUpgradeProfileCollection = fleetResource.GetAutoUpgradeProfiles(); + string autoUpgradeProfileName = "autoupgradeprofile1"; + AutoUpgradeProfileData createAutoUpgradeProfileData = new AutoUpgradeProfileData() + { + Channel = ContainerServiceFleetUpgradeChannel.Stable, + }; + ArmOperation createAutoUpgradeProfileLRO = await autoUpgradeProfileCollection.CreateOrUpdateAsync(WaitUntil.Completed, autoUpgradeProfileName, createAutoUpgradeProfileData); + AutoUpgradeProfileResource createAutoUpgradeProfileResult = createAutoUpgradeProfileLRO.Value; + Debug.Assert(createAutoUpgradeProfileResult.HasData, "CreateOrUpdateAsync AutoUpgradeProfile data was not valid"); + + createAutoUpgradeProfileData = createAutoUpgradeProfileResult.Data; + Console.WriteLine($"Succeeded on id: {createAutoUpgradeProfileData.Id}"); + Console.WriteLine($"Created AutoUpgradeProfile was: {createAutoUpgradeProfileData.Id}"); + + // Get AutoUpgradeProfile + AutoUpgradeProfileResource getAutoUpgradeProfileResult = await autoUpgradeProfileCollection.GetAsync(autoUpgradeProfileName); + Debug.Assert(getAutoUpgradeProfileResult.HasData, "GetAsync AutoUpgradeProfile data was not valid"); + AutoUpgradeProfileData getAutoUpgradeProfileData = getAutoUpgradeProfileResult.Data; + Console.WriteLine($"Succeeded on id: {getAutoUpgradeProfileData.Id}"); + Console.WriteLine($"Get AutoUpgradeProfile was: {getAutoUpgradeProfileData.Id}"); + Debug.Assert(getAutoUpgradeProfileData.Name == createAutoUpgradeProfileData.Name, "GetAutoUpgradeProfile did not retrieve the correct data."); + Debug.Assert(getAutoUpgradeProfileData.Id == createAutoUpgradeProfileData.Id, "GetAutoUpgradeProfile did not retrieve the correct data."); + + // Update AutoUpgradeProfile + AutoUpgradeProfileData updateAutoUpgradeProfileData = new AutoUpgradeProfileData() + { + Channel = ContainerServiceFleetUpgradeChannel.Rapid, + }; + ArmOperation updateAutoUpgradeProfileLRO = await autoUpgradeProfileCollection.CreateOrUpdateAsync(WaitUntil.Completed, autoUpgradeProfileName, updateAutoUpgradeProfileData); + AutoUpgradeProfileResource updateAutoUpgradeProfileResult = updateAutoUpgradeProfileLRO.Value; + Debug.Assert(updateAutoUpgradeProfileResult.HasData, "CreateOrUpdateAsync AutoUpgradeProfile data was not valid"); + Debug.Assert(updateAutoUpgradeProfileResult.Data.Channel == ContainerServiceFleetUpgradeChannel.Rapid, "CreateOrUpdateAsync AutoUpgradeProfile channel was not successfully updated."); + + // Delete AutoUpgradeProfile + await updateAutoUpgradeProfileResult.DeleteAsync(WaitUntil.Completed); + bool doesAutoUpgradeProfileExist = await autoUpgradeProfileCollection.ExistsAsync(autoUpgradeProfileName); + Debug.Assert(doesAutoUpgradeProfileExist == false, "AutoUpgradeProfile was not deleted."); + // Delete UpdateRun await updateRunResource.DeleteAsync(WaitUntil.Completed); bool doesUpdateRunExist = await updateRunCollection.ExistsAsync(updateRunName); diff --git a/sdk/formrecognizer/tests.yml b/sdk/formrecognizer/tests.yml index 178ce8561bdf..4143a5e7c59d 100644 --- a/sdk/formrecognizer/tests.yml +++ b/sdk/formrecognizer/tests.yml @@ -7,20 +7,14 @@ parameters: trigger: none extends: - template: ../../eng/pipelines/templates/stages/archetype-sdk-tests.yml + template: /eng/pipelines/templates/stages/archetype-sdk-tests.yml parameters: ServiceDirectory: formrecognizer TimeoutInMinutes: 180 CloudConfig: Public: - ServiceConnection: azure-sdk-tests - SubscriptionConfigurationFilePaths: - - eng/common/TestResources/sub-config/AzurePublicMsft.json Location: '${{ parameters.Location }}' - Canary: - ServiceConnection: azure-sdk-tests - SubscriptionConfigurationFilePaths: - - eng/common/TestResources/sub-config/AzurePublicMsft.json - Location: 'centraluseuap' - Clouds: 'Public' + # Canary regions are currently not supported in TME so disabling for now + # Canary: + # Location: 'centraluseuap' SupportedClouds: 'Public, Canary' diff --git a/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/CHANGELOG.md b/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/CHANGELOG.md index 76e66fa38f1f..62e2cadb19f4 100644 --- a/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/CHANGELOG.md +++ b/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/CHANGELOG.md @@ -1,14 +1,9 @@ # Release History -## 1.0.0-beta.4 (Unreleased) - -### Features Added +## 1.0.0-beta.4 (2024-10-31) ### Breaking Changes - -### Bugs Fixed - -### Other Changes +- Removed FipsApprovedMode Property from CloudHsmClusterProperties. ## 1.0.0-beta.3 (2024-09-09) diff --git a/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/api/Azure.ResourceManager.HardwareSecurityModules.netstandard2.0.cs b/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/api/Azure.ResourceManager.HardwareSecurityModules.netstandard2.0.cs index c9073c1eba3e..2157d7efffc5 100644 --- a/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/api/Azure.ResourceManager.HardwareSecurityModules.netstandard2.0.cs +++ b/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/api/Azure.ResourceManager.HardwareSecurityModules.netstandard2.0.cs @@ -236,7 +236,7 @@ public static partial class ArmHardwareSecurityModulesModelFactory public static Azure.ResourceManager.HardwareSecurityModules.Models.CloudHsmClusterPrivateEndpointConnectionProperties CloudHsmClusterPrivateEndpointConnectionProperties(Azure.Core.ResourceIdentifier privateEndpointId = null, Azure.ResourceManager.HardwareSecurityModules.Models.CloudHsmClusterPrivateLinkServiceConnectionState connectionState = null, Azure.ResourceManager.HardwareSecurityModules.Models.CloudHsmClusterPrivateEndpointConnectionProvisioningState? provisioningState = default(Azure.ResourceManager.HardwareSecurityModules.Models.CloudHsmClusterPrivateEndpointConnectionProvisioningState?), System.Collections.Generic.IEnumerable groupIds = null) { throw null; } public static Azure.ResourceManager.HardwareSecurityModules.Models.CloudHsmClusterPrivateLinkData CloudHsmClusterPrivateLinkData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.HardwareSecurityModules.Models.CloudHsmClusterPrivateLinkResourceProperties properties = null) { throw null; } public static Azure.ResourceManager.HardwareSecurityModules.Models.CloudHsmClusterPrivateLinkResourceProperties CloudHsmClusterPrivateLinkResourceProperties(string groupId = null, System.Collections.Generic.IEnumerable requiredMembers = null, System.Collections.Generic.IEnumerable requiredZoneNames = null) { throw null; } - public static Azure.ResourceManager.HardwareSecurityModules.Models.CloudHsmClusterProperties CloudHsmClusterProperties(Azure.ResourceManager.HardwareSecurityModules.Models.SecurityDomainActivationState? activationState = default(Azure.ResourceManager.HardwareSecurityModules.Models.SecurityDomainActivationState?), Azure.ResourceManager.HardwareSecurityModules.Models.AutoGeneratedDomainNameLabelScope? autoGeneratedDomainNameLabelScope = default(Azure.ResourceManager.HardwareSecurityModules.Models.AutoGeneratedDomainNameLabelScope?), bool? fipsApprovedMode = default(bool?), System.Collections.Generic.IEnumerable hsms = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null, Azure.ResourceManager.HardwareSecurityModules.Models.CloudHsmClusterProvisioningState? provisioningState = default(Azure.ResourceManager.HardwareSecurityModules.Models.CloudHsmClusterProvisioningState?), Azure.ResourceManager.HardwareSecurityModules.Models.CloudHsmClusterPublicNetworkAccess? publicNetworkAccess = default(Azure.ResourceManager.HardwareSecurityModules.Models.CloudHsmClusterPublicNetworkAccess?), string statusMessage = null) { throw null; } + public static Azure.ResourceManager.HardwareSecurityModules.Models.CloudHsmClusterProperties CloudHsmClusterProperties(Azure.ResourceManager.HardwareSecurityModules.Models.SecurityDomainActivationState? activationState = default(Azure.ResourceManager.HardwareSecurityModules.Models.SecurityDomainActivationState?), Azure.ResourceManager.HardwareSecurityModules.Models.AutoGeneratedDomainNameLabelScope? autoGeneratedDomainNameLabelScope = default(Azure.ResourceManager.HardwareSecurityModules.Models.AutoGeneratedDomainNameLabelScope?), System.Collections.Generic.IEnumerable hsms = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null, Azure.ResourceManager.HardwareSecurityModules.Models.CloudHsmClusterProvisioningState? provisioningState = default(Azure.ResourceManager.HardwareSecurityModules.Models.CloudHsmClusterProvisioningState?), Azure.ResourceManager.HardwareSecurityModules.Models.CloudHsmClusterPublicNetworkAccess? publicNetworkAccess = default(Azure.ResourceManager.HardwareSecurityModules.Models.CloudHsmClusterPublicNetworkAccess?), string statusMessage = null) { throw null; } public static Azure.ResourceManager.HardwareSecurityModules.Models.CloudHsmClusterRestoreContent CloudHsmClusterRestoreContent(System.Uri azureStorageBlobContainerUri = null, string token = null, string backupId = null) { throw null; } public static Azure.ResourceManager.HardwareSecurityModules.Models.CloudHsmClusterRestoreResult CloudHsmClusterRestoreResult(Azure.ResourceManager.HardwareSecurityModules.Models.BackupRestoreBaseResultProperties properties = null) { throw null; } public static Azure.ResourceManager.HardwareSecurityModules.Models.CloudHsmProperties CloudHsmProperties(string fqdn = null, string state = null, string stateMessage = null) { throw null; } @@ -458,7 +458,6 @@ public partial class CloudHsmClusterProperties : System.ClientModel.Primitives.I public CloudHsmClusterProperties() { } public Azure.ResourceManager.HardwareSecurityModules.Models.SecurityDomainActivationState? ActivationState { get { throw null; } } public Azure.ResourceManager.HardwareSecurityModules.Models.AutoGeneratedDomainNameLabelScope? AutoGeneratedDomainNameLabelScope { get { throw null; } set { } } - public bool? FipsApprovedMode { get { throw null; } set { } } public System.Collections.Generic.IReadOnlyList Hsms { get { throw null; } } public System.Collections.Generic.IReadOnlyList PrivateEndpointConnections { get { throw null; } } public Azure.ResourceManager.HardwareSecurityModules.Models.CloudHsmClusterProvisioningState? ProvisioningState { get { throw null; } } diff --git a/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/assets.json b/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/assets.json index f04ad599adf4..e51290324e66 100644 --- a/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/assets.json +++ b/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules", - "Tag": "net/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules_eaf396b8d8" + "Tag": "net/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules_3f9f1a18e1" } diff --git a/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/samples/Generated/Samples/Sample_CloudHsmClusterCollection.cs b/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/samples/Generated/Samples/Sample_CloudHsmClusterCollection.cs index f1d454a0ca58..91d72ea673c4 100644 --- a/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/samples/Generated/Samples/Sample_CloudHsmClusterCollection.cs +++ b/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/samples/Generated/Samples/Sample_CloudHsmClusterCollection.cs @@ -46,7 +46,6 @@ public async Task CreateOrUpdate_CloudHsmClusterCreateOrUpdateMaximumSetGen() { Properties = new CloudHsmClusterProperties() { - FipsApprovedMode = false, PublicNetworkAccess = CloudHsmClusterPublicNetworkAccess.Disabled, }, Identity = new ManagedServiceIdentity("UserAssigned") diff --git a/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/src/Generated/ArmHardwareSecurityModulesModelFactory.cs b/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/src/Generated/ArmHardwareSecurityModulesModelFactory.cs index d752ff709976..2023751a3ffc 100644 --- a/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/src/Generated/ArmHardwareSecurityModulesModelFactory.cs +++ b/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/src/Generated/ArmHardwareSecurityModulesModelFactory.cs @@ -47,14 +47,13 @@ public static CloudHsmClusterData CloudHsmClusterData(ResourceIdentifier id = nu /// Initializes a new instance of . /// State of security domain activation. /// The Cloud HSM Cluster's auto-generated Domain Name Label Scope. - /// False: Non-FIPS Mode with single-factor authentication. True: FIPS Approved Mode with single-factor authentication. /// An array of Cloud HSM Cluster's HSMs. /// List of private endpoint connection resources. /// The Cloud HSM Cluster's provisioningState. /// The Cloud HSM Cluster public network access. /// Cloud HSM Cluster status message. /// A new instance for mocking. - public static CloudHsmClusterProperties CloudHsmClusterProperties(SecurityDomainActivationState? activationState = null, AutoGeneratedDomainNameLabelScope? autoGeneratedDomainNameLabelScope = null, bool? fipsApprovedMode = null, IEnumerable hsms = null, IEnumerable privateEndpointConnections = null, CloudHsmClusterProvisioningState? provisioningState = null, CloudHsmClusterPublicNetworkAccess? publicNetworkAccess = null, string statusMessage = null) + public static CloudHsmClusterProperties CloudHsmClusterProperties(SecurityDomainActivationState? activationState = null, AutoGeneratedDomainNameLabelScope? autoGeneratedDomainNameLabelScope = null, IEnumerable hsms = null, IEnumerable privateEndpointConnections = null, CloudHsmClusterProvisioningState? provisioningState = null, CloudHsmClusterPublicNetworkAccess? publicNetworkAccess = null, string statusMessage = null) { hsms ??= new List(); privateEndpointConnections ??= new List(); @@ -62,7 +61,6 @@ public static CloudHsmClusterProperties CloudHsmClusterProperties(SecurityDomain return new CloudHsmClusterProperties( activationState, autoGeneratedDomainNameLabelScope, - fipsApprovedMode, hsms?.ToList(), privateEndpointConnections?.ToList(), provisioningState, diff --git a/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/src/Generated/Models/CloudHsmClusterProperties.Serialization.cs b/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/src/Generated/Models/CloudHsmClusterProperties.Serialization.cs index 55140822b831..4bc2432a9dd6 100644 --- a/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/src/Generated/Models/CloudHsmClusterProperties.Serialization.cs +++ b/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/src/Generated/Models/CloudHsmClusterProperties.Serialization.cs @@ -46,11 +46,6 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("autoGeneratedDomainNameLabelScope"u8); writer.WriteStringValue(AutoGeneratedDomainNameLabelScope.Value.ToString()); } - if (Optional.IsDefined(FipsApprovedMode)) - { - writer.WritePropertyName("fipsApprovedMode"u8); - writer.WriteBooleanValue(FipsApprovedMode.Value); - } if (options.Format != "W" && Optional.IsCollectionDefined(Hsms)) { writer.WritePropertyName("hsms"u8); @@ -125,7 +120,6 @@ internal static CloudHsmClusterProperties DeserializeCloudHsmClusterProperties(J } SecurityDomainActivationState? activationState = default; AutoGeneratedDomainNameLabelScope? autoGeneratedDomainNameLabelScope = default; - bool? fipsApprovedMode = default; IReadOnlyList hsms = default; IReadOnlyList privateEndpointConnections = default; CloudHsmClusterProvisioningState? provisioningState = default; @@ -153,15 +147,6 @@ internal static CloudHsmClusterProperties DeserializeCloudHsmClusterProperties(J autoGeneratedDomainNameLabelScope = new AutoGeneratedDomainNameLabelScope(property.Value.GetString()); continue; } - if (property.NameEquals("fipsApprovedMode"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - fipsApprovedMode = property.Value.GetBoolean(); - continue; - } if (property.NameEquals("hsms"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -222,7 +207,6 @@ internal static CloudHsmClusterProperties DeserializeCloudHsmClusterProperties(J return new CloudHsmClusterProperties( activationState, autoGeneratedDomainNameLabelScope, - fipsApprovedMode, hsms ?? new ChangeTrackingList(), privateEndpointConnections ?? new ChangeTrackingList(), provisioningState, @@ -272,22 +256,6 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(FipsApprovedMode), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" fipsApprovedMode: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(FipsApprovedMode)) - { - builder.Append(" fipsApprovedMode: "); - var boolValue = FipsApprovedMode.Value == true ? "true" : "false"; - builder.AppendLine($"{boolValue}"); - } - } - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Hsms), out propertyOverride); if (hasPropertyOverride) { diff --git a/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/src/Generated/Models/CloudHsmClusterProperties.cs b/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/src/Generated/Models/CloudHsmClusterProperties.cs index 24024957d84e..d1b79ab295a9 100644 --- a/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/src/Generated/Models/CloudHsmClusterProperties.cs +++ b/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/src/Generated/Models/CloudHsmClusterProperties.cs @@ -55,18 +55,16 @@ public CloudHsmClusterProperties() /// Initializes a new instance of . /// State of security domain activation. /// The Cloud HSM Cluster's auto-generated Domain Name Label Scope. - /// False: Non-FIPS Mode with single-factor authentication. True: FIPS Approved Mode with single-factor authentication. /// An array of Cloud HSM Cluster's HSMs. /// List of private endpoint connection resources. /// The Cloud HSM Cluster's provisioningState. /// The Cloud HSM Cluster public network access. /// Cloud HSM Cluster status message. /// Keeps track of any properties unknown to the library. - internal CloudHsmClusterProperties(SecurityDomainActivationState? activationState, AutoGeneratedDomainNameLabelScope? autoGeneratedDomainNameLabelScope, bool? fipsApprovedMode, IReadOnlyList hsms, IReadOnlyList privateEndpointConnections, CloudHsmClusterProvisioningState? provisioningState, CloudHsmClusterPublicNetworkAccess? publicNetworkAccess, string statusMessage, IDictionary serializedAdditionalRawData) + internal CloudHsmClusterProperties(SecurityDomainActivationState? activationState, AutoGeneratedDomainNameLabelScope? autoGeneratedDomainNameLabelScope, IReadOnlyList hsms, IReadOnlyList privateEndpointConnections, CloudHsmClusterProvisioningState? provisioningState, CloudHsmClusterPublicNetworkAccess? publicNetworkAccess, string statusMessage, IDictionary serializedAdditionalRawData) { ActivationState = activationState; AutoGeneratedDomainNameLabelScope = autoGeneratedDomainNameLabelScope; - FipsApprovedMode = fipsApprovedMode; Hsms = hsms; PrivateEndpointConnections = privateEndpointConnections; ProvisioningState = provisioningState; @@ -81,9 +79,6 @@ internal CloudHsmClusterProperties(SecurityDomainActivationState? activationStat /// The Cloud HSM Cluster's auto-generated Domain Name Label Scope. [WirePath("autoGeneratedDomainNameLabelScope")] public AutoGeneratedDomainNameLabelScope? AutoGeneratedDomainNameLabelScope { get; set; } - /// False: Non-FIPS Mode with single-factor authentication. True: FIPS Approved Mode with single-factor authentication. - [WirePath("fipsApprovedMode")] - public bool? FipsApprovedMode { get; set; } /// An array of Cloud HSM Cluster's HSMs. [WirePath("hsms")] public IReadOnlyList Hsms { get; } diff --git a/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/src/autorest.md b/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/src/autorest.md index 269a64cf05bc..a72f9286daff 100644 --- a/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/src/autorest.md +++ b/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/src/autorest.md @@ -7,7 +7,7 @@ azure-arm: true csharp: true library-name: HardwareSecurityModules namespace: Azure.ResourceManager.HardwareSecurityModules -require: https://github.com/emmeliaAra/azure-rest-api-specs/blob/db39221e04397a78418fcab59f68dfa1745c07c5/specification/hardwaresecuritymodules/resource-manager/readme.md +require: https://github.com/emmeliaAra/azure-rest-api-specs/blob/898ccbc6e7b837269b426dd54728ce020dc53ee1/specification/hardwaresecuritymodules/resource-manager/readme.md #tag: package-2024-06-preview output-folder: $(this-folder)/Generated clear-output-folder: true diff --git a/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/tests/Scenario/CloudHsmClustersPrivateEndpointConnectionTests.cs b/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/tests/Scenario/CloudHsmClustersPrivateEndpointConnectionTests.cs index bf149b3d552f..3369ea6481b8 100644 --- a/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/tests/Scenario/CloudHsmClustersPrivateEndpointConnectionTests.cs +++ b/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/tests/Scenario/CloudHsmClustersPrivateEndpointConnectionTests.cs @@ -115,10 +115,6 @@ protected async Task CreateCloudHsmClusterResourceAsync string resourceName = Recording.GenerateAssetName("CloudhsmSDKTest"); CloudHsmClusterData cloudHsmClusterBody = new CloudHsmClusterData(Location) { - Properties = new CloudHsmClusterProperties() - { - FipsApprovedMode = false - }, Sku = new CloudHsmClusterSku(CloudHsmClusterSkuFamily.B, CloudHsmClusterSkuName.StandardB1), Tags = { diff --git a/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/tests/Scenario/CloudHsmClustersTests.cs b/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/tests/Scenario/CloudHsmClustersTests.cs index 14f5c23d6174..f69fd05d0fdf 100644 --- a/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/tests/Scenario/CloudHsmClustersTests.cs +++ b/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/tests/Scenario/CloudHsmClustersTests.cs @@ -27,26 +27,24 @@ protected async Task SetUp() await BaseSetUpForTests(); } + [TestCase] [RecordedTest] public async Task CreateOrUpdateCloudHsmClusterTest() { string resourceName = Recording.GenerateAssetName("sdkT"); - //var userAssignedIdentity = await CreateUserAssignedIdentityAsync(); + var userAssignedIdentity = await CreateUserAssignedIdentityAsync(); var azureStorageBlobContainerUri = new Uri("https://myaccount.blob.core.windows.net/mycontainer"); CloudHsmClusterData cloudHsmClusterBody = new CloudHsmClusterData(Location) { - Properties = new CloudHsmClusterProperties() - { - FipsApprovedMode = false - }, - Sku = new CloudHsmClusterSku(CloudHsmClusterSkuFamily.B, CloudHsmClusterSkuName.StandardB1), Tags = { ["Dept"] = "SDK Testing", - ["Env"] = "df" - } + ["Env"] = "df", + ["UseMockHfc"] = "true", + ["MockHfcDelayInMs"] = "1" + }, //Identity = new ManagedServiceIdentity(ManagedServiceIdentityType.UserAssigned) }; @@ -64,7 +62,6 @@ public async Task CreateOrUpdateCloudHsmClusterTest() Location.Name, CloudHsmClusterSkuFamily.B.ToString(), CloudHsmClusterSkuName.StandardB1.ToString(), - cloudHsmClusterBody.Properties.FipsApprovedMode, new Dictionary(cloudHsmClusterBody.Tags)); //ManagedServiceIdentityType.UserAssigned); @@ -79,7 +76,6 @@ public async Task CreateOrUpdateCloudHsmClusterTest() Location.Name, CloudHsmClusterSkuFamily.B.ToString(), CloudHsmClusterSkuName.StandardB1.ToString(), - cloudHsmClusterBody.Properties.FipsApprovedMode, new Dictionary(cloudHsmClusterBody.Tags)); //ManagedServiceIdentityType.UserAssigned); @@ -104,10 +100,9 @@ private void ValidateCloudHsmResource( string expectedResourceLocation, string expectedSkuFamily, string expectedSkuName, - bool? expectedFipsState, - Dictionary expectedTags, + Dictionary expectedTags //ManagedServiceIdentityType expectedIdentityType, - int managedIdentityExpextedCount = 1 + //int managedIdentityExpextedCount = 1 ) { string resourceIdFormat = "/subscriptions/{0}/resourceGroups/{1}/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/{2}"; @@ -122,8 +117,6 @@ private void ValidateCloudHsmResource( Assert.AreEqual(expectedSkuName, cloudHsmClusterData.Sku.Name.ToString()); Assert.NotNull(cloudHsmClusterData.Tags); Assert.True(expectedTags.Count == cloudHsmClusterData.Tags.Count && !expectedTags.Except(cloudHsmClusterData.Tags).Any()); - //Assert.NotNull(cloudHsmClusterData.SecurityDomain); - Assert.AreEqual(expectedFipsState, cloudHsmClusterData.Properties.FipsApprovedMode); //Assert.AreEqual(expectedIdentityType, cloudHsmClusterData.Identity.ManagedServiceIdentityType); //Assert.AreEqual(managedIdentityExpextedCount, cloudHsmClusterData.Identity.UserAssignedIdentities.Count); } diff --git a/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/tests/SessionRecords/CloudHsmClustersPrivateEndpointConnectionTests/CreateOrUpdateAsyncPrivateEndpointConnection.json b/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/tests/SessionRecords/CloudHsmClustersPrivateEndpointConnectionTests/CreateOrUpdateAsyncPrivateEndpointConnection.json new file mode 100644 index 000000000000..e6a58e737a25 --- /dev/null +++ b/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/tests/SessionRecords/CloudHsmClustersPrivateEndpointConnectionTests/CreateOrUpdateAsyncPrivateEndpointConnection.json @@ -0,0 +1,2788 @@ +{ + "Entries": [ + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867?api-version=2021-01-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-f99edc65c3fbbf437352db8d4a38bb96-f0511c704262ce4d-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "3bf05392432d60fdc5feabbd99605087", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "448", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:12:42 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "c6b2b18d-3d00-4220-948c-d145b42f5262", + "x-ms-ratelimit-remaining-subscription-reads": "11999", + "x-ms-request-id": "c6b2b18d-3d00-4220-948c-d145b42f5262", + "x-ms-routing-request-id": "UKSOUTH:20230707T101243Z:c6b2b18d-3d00-4220-948c-d145b42f5262" + }, + "ResponseBody": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867", + "authorizationSource": "RoleBased", + "managedByTenants": [ + { + "tenantId": "2f4a9838-26b7-47ee-be60-ccc1fdec5953" + } + ], + "subscriptionId": "75e96d09-a291-40e1-a5e6-cda78233d867", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "displayName": "susolank Projects", + "state": "Enabled", + "subscriptionPolicies": { + "locationPlacementId": "Internal_2014-09-01", + "quotaId": "Internal_2014-09-01", + "spendingLimit": "Off" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867?api-version=2021-01-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-e0bcac040b3b34d1c51085e65bdb7abd-7db0e03d19575c1e-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "1217c0f266a367a006860e46a0bb4ed5", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "448", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:12:43 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "f18d64c1-1eb7-4d29-8f42-975b6246cc58", + "x-ms-ratelimit-remaining-subscription-reads": "11998", + "x-ms-request-id": "f18d64c1-1eb7-4d29-8f42-975b6246cc58", + "x-ms-routing-request-id": "UKSOUTH:20230707T101243Z:f18d64c1-1eb7-4d29-8f42-975b6246cc58" + }, + "ResponseBody": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867", + "authorizationSource": "RoleBased", + "managedByTenants": [ + { + "tenantId": "2f4a9838-26b7-47ee-be60-ccc1fdec5953" + } + ], + "subscriptionId": "75e96d09-a291-40e1-a5e6-cda78233d867", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "displayName": "susolank Projects", + "state": "Enabled", + "subscriptionPolicies": { + "locationPlacementId": "Internal_2014-09-01", + "quotaId": "Internal_2014-09-01", + "spendingLimit": "Off" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourcegroups/sdkTestsRg1159?api-version=**", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "21", + "Content-Type": "application/json", + "traceparent": "00-d4b77b911f18bf2c4df1f01270c30cb1-418efb7e11af0b3b-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "971bc655d7c133d6fc2d7fb92c9d539a", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "location": "ukwest" + }, + "StatusCode": 201, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "225", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:12:43 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "01828e56-53c3-463f-ac8e-4c3693381c43", + "x-ms-ratelimit-remaining-subscription-writes": "1199", + "x-ms-request-id": "01828e56-53c3-463f-ac8e-4c3693381c43", + "x-ms-routing-request-id": "UKSOUTH:20230707T101244Z:01828e56-53c3-463f-ac8e-4c3693381c43" + }, + "ResponseBody": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg1159", + "name": "sdkTestsRg1159", + "type": "Microsoft.Resources/resourceGroups", + "location": "ukwest", + "properties": { + "provisioningState": "Succeeded" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg1159/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest6597?api-version=2022-08-31-preview", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "152", + "Content-Type": "application/json", + "traceparent": "00-d41fc70770b3c140c9c0f821435a27ad-62394e791fefc58d-00", + "User-Agent": "azsdk-net-ResourceManager.HardwareSecurityModules/1.0.0-alpha.20230707.1 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "2fcbe95cb22c3488a735b7bf09b0d60a", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "location": "ukwest", + "properties": { + "securityDomain": { + "fipsState": 2 + } + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "865", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:12:49 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "2fbeed85-9770-4709-891a-9fa2dd6bb770", + "x-ms-ratelimit-remaining-subscription-writes": "1198", + "x-ms-request-id": "2fbeed85-9770-4709-891a-9fa2dd6bb770", + "x-ms-routing-request-id": "UKSOUTH:20230707T101249Z:2fbeed85-9770-4709-891a-9fa2dd6bb770" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest6597", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg1159/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest6597", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:12:44.969Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:12:44.969Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg1159/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest6597?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-d41fc70770b3c140c9c0f821435a27ad-54270d8753bab552-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "ecf2b46225e7689a0e8c30a17c3c23cf", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "865", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:12:49 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "aa16bebe-cf0d-4642-b2a3-e370b3bdb0c9", + "x-ms-ratelimit-remaining-subscription-reads": "11997", + "x-ms-request-id": "aa16bebe-cf0d-4642-b2a3-e370b3bdb0c9", + "x-ms-routing-request-id": "UKSOUTH:20230707T101250Z:aa16bebe-cf0d-4642-b2a3-e370b3bdb0c9" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest6597", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg1159/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest6597", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:12:44.969Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:12:44.969Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg1159/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest6597?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-d41fc70770b3c140c9c0f821435a27ad-992690e5239083d3-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "b95922e24d6573d6a8ed88f491da5abe", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "865", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:12:52 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "f1b31bb0-4e89-49d5-bbf5-54c3332b98ad", + "x-ms-ratelimit-remaining-subscription-reads": "11996", + "x-ms-request-id": "f1b31bb0-4e89-49d5-bbf5-54c3332b98ad", + "x-ms-routing-request-id": "UKSOUTH:20230707T101252Z:f1b31bb0-4e89-49d5-bbf5-54c3332b98ad" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest6597", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg1159/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest6597", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:12:44.969Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:12:44.969Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg1159/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest6597?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-d41fc70770b3c140c9c0f821435a27ad-a3d938c3957b641b-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "555d0c7aeabe1e22ffcce1a4b89f626a", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "865", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:12:53 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "740c4068-241f-41ca-8670-948be87871a8", + "x-ms-ratelimit-remaining-subscription-reads": "11995", + "x-ms-request-id": "740c4068-241f-41ca-8670-948be87871a8", + "x-ms-routing-request-id": "UKSOUTH:20230707T101253Z:740c4068-241f-41ca-8670-948be87871a8" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest6597", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg1159/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest6597", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:12:44.969Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:12:44.969Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg1159/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest6597?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-d41fc70770b3c140c9c0f821435a27ad-e4a148938fbf26f1-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "b7cb5214018f1445dd7e43fa9da6d733", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "865", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:12:54 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "8683bea0-4e3b-4f5f-bd0f-d0a845877f64", + "x-ms-ratelimit-remaining-subscription-reads": "11994", + "x-ms-request-id": "8683bea0-4e3b-4f5f-bd0f-d0a845877f64", + "x-ms-routing-request-id": "UKSOUTH:20230707T101255Z:8683bea0-4e3b-4f5f-bd0f-d0a845877f64" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest6597", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg1159/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest6597", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:12:44.969Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:12:44.969Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg1159/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest6597?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-d41fc70770b3c140c9c0f821435a27ad-a841e191094c4d5e-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "6f267132cedff810ff3bb9996c32ba08", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "865", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:12:57 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "316a8bf7-a142-4405-9b33-40ab67ec98b2", + "x-ms-ratelimit-remaining-subscription-reads": "11993", + "x-ms-request-id": "316a8bf7-a142-4405-9b33-40ab67ec98b2", + "x-ms-routing-request-id": "UKSOUTH:20230707T101257Z:316a8bf7-a142-4405-9b33-40ab67ec98b2" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest6597", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg1159/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest6597", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:12:44.969Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:12:44.969Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg1159/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest6597?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-d41fc70770b3c140c9c0f821435a27ad-88026d51c4e21ce4-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "3fdf1d8aa20e782fc648783fa6288159", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "865", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:13:01 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "ccf274f5-745e-4c2a-a035-9bada2676abd", + "x-ms-ratelimit-remaining-subscription-reads": "11992", + "x-ms-request-id": "ccf274f5-745e-4c2a-a035-9bada2676abd", + "x-ms-routing-request-id": "UKSOUTH:20230707T101302Z:ccf274f5-745e-4c2a-a035-9bada2676abd" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest6597", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg1159/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest6597", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:12:44.969Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:12:44.969Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg1159/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest6597?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-d41fc70770b3c140c9c0f821435a27ad-01c5feda12f98c80-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "4772adf4f278468b41d2b85347aba8ab", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "865", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:13:10 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "d28aad14-5212-4111-9474-8144a1a36787", + "x-ms-ratelimit-remaining-subscription-reads": "11991", + "x-ms-request-id": "d28aad14-5212-4111-9474-8144a1a36787", + "x-ms-routing-request-id": "UKSOUTH:20230707T101311Z:d28aad14-5212-4111-9474-8144a1a36787" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest6597", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg1159/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest6597", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:12:44.969Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:12:44.969Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg1159/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest6597?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-d41fc70770b3c140c9c0f821435a27ad-1c34e37f19a29533-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "7f6f3bc498c68f2441aea99755d152d6", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "865", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:13:27 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "618eab22-0ac0-4ebc-9bda-0485b9e63a16", + "x-ms-ratelimit-remaining-subscription-reads": "11990", + "x-ms-request-id": "618eab22-0ac0-4ebc-9bda-0485b9e63a16", + "x-ms-routing-request-id": "UKSOUTH:20230707T101327Z:618eab22-0ac0-4ebc-9bda-0485b9e63a16" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest6597", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg1159/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest6597", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:12:44.969Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:12:44.969Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg1159/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest6597?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-d41fc70770b3c140c9c0f821435a27ad-78ab52c2dc07dddb-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "bea560b972c0978f9199fe3ceadb311b", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "865", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:14:00 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "1004e465-9aeb-47dd-9782-cecdf2403527", + "x-ms-ratelimit-remaining-subscription-reads": "11989", + "x-ms-request-id": "1004e465-9aeb-47dd-9782-cecdf2403527", + "x-ms-routing-request-id": "UKSOUTH:20230707T101400Z:1004e465-9aeb-47dd-9782-cecdf2403527" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest6597", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg1159/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest6597", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:12:44.969Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:12:44.969Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg1159/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest6597?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-d41fc70770b3c140c9c0f821435a27ad-3df328424d350e94-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "6b7acd9f01b95c9288e205ca49f4f06f", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "865", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:14:32 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "4e7a3185-5cca-4784-9943-bca390b4142f", + "x-ms-ratelimit-remaining-subscription-reads": "11988", + "x-ms-request-id": "4e7a3185-5cca-4784-9943-bca390b4142f", + "x-ms-routing-request-id": "UKSOUTH:20230707T101433Z:4e7a3185-5cca-4784-9943-bca390b4142f" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest6597", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg1159/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest6597", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:12:44.969Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:12:44.969Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg1159/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest6597?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-d41fc70770b3c140c9c0f821435a27ad-acf502655203144b-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "e79ae180ea0651eaabd7ed2d9ae8a465", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "865", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:15:05 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "0ed33e5d-b1a9-4588-b3b9-a51ec42e0f53", + "x-ms-ratelimit-remaining-subscription-reads": "11987", + "x-ms-request-id": "0ed33e5d-b1a9-4588-b3b9-a51ec42e0f53", + "x-ms-routing-request-id": "UKSOUTH:20230707T101505Z:0ed33e5d-b1a9-4588-b3b9-a51ec42e0f53" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest6597", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg1159/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest6597", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:12:44.969Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:12:44.969Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg1159/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest6597?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-d41fc70770b3c140c9c0f821435a27ad-14bbe057a185dd46-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "88f78d7de756b81dcd4835dd6dc54d9d", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "865", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:15:37 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "0bb748c1-a3e4-416b-ba81-08bad38ab1de", + "x-ms-ratelimit-remaining-subscription-reads": "11986", + "x-ms-request-id": "0bb748c1-a3e4-416b-ba81-08bad38ab1de", + "x-ms-routing-request-id": "UKSOUTH:20230707T101537Z:0bb748c1-a3e4-416b-ba81-08bad38ab1de" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest6597", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg1159/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest6597", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:12:44.969Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:12:44.969Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg1159/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest6597?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-d41fc70770b3c140c9c0f821435a27ad-96c40d1dcbfb9368-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "08bb8ea94941b514e228c0e11365c2a0", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "865", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:16:09 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "7b69a7cf-9aa1-461c-b400-1a83a418a1e7", + "x-ms-ratelimit-remaining-subscription-reads": "11985", + "x-ms-request-id": "7b69a7cf-9aa1-461c-b400-1a83a418a1e7", + "x-ms-routing-request-id": "UKSOUTH:20230707T101609Z:7b69a7cf-9aa1-461c-b400-1a83a418a1e7" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest6597", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg1159/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest6597", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:12:44.969Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:12:44.969Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg1159/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest6597?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-d41fc70770b3c140c9c0f821435a27ad-d59f5e0b51085959-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "bb4d9f3e67fd9919c4e119bdb50de4e6", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1170", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:16:41 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "90d7d537-9818-44c2-9d2a-22cb5494a10a", + "x-ms-ratelimit-remaining-subscription-reads": "11984", + "x-ms-request-id": "90d7d537-9818-44c2-9d2a-22cb5494a10a", + "x-ms-routing-request-id": "UKSOUTH:20230707T101642Z:90d7d537-9818-44c2-9d2a-22cb5494a10a" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest6597", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg1159/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest6597", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [ + { + "fqdn": "hsm1.cloudhsmsdktest6597-fsfyaucrfvash7fn.cloudhsm.azure.net", + "state": "InitialProvisioning" + }, + { + "fqdn": "hsm2.cloudhsmsdktest6597-fsfyaucrfvash7fn.cloudhsm.azure.net", + "state": "InitialProvisioning" + }, + { + "fqdn": "hsm3.cloudhsmsdktest6597-fsfyaucrfvash7fn.cloudhsm.azure.net", + "state": "InitialProvisioning" + } + ], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:12:44.969Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:12:44.969Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg1159/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest6597?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-d41fc70770b3c140c9c0f821435a27ad-a9493a689f9518ff-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "0c8450899c2d33247942a62d273ca468", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1170", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:17:14 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "06e29243-08e4-4701-b026-7302ef2167eb", + "x-ms-ratelimit-remaining-subscription-reads": "11983", + "x-ms-request-id": "06e29243-08e4-4701-b026-7302ef2167eb", + "x-ms-routing-request-id": "UKSOUTH:20230707T101714Z:06e29243-08e4-4701-b026-7302ef2167eb" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest6597", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg1159/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest6597", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [ + { + "fqdn": "hsm1.cloudhsmsdktest6597-fsfyaucrfvash7fn.cloudhsm.azure.net", + "state": "InitialProvisioning" + }, + { + "fqdn": "hsm2.cloudhsmsdktest6597-fsfyaucrfvash7fn.cloudhsm.azure.net", + "state": "InitialProvisioning" + }, + { + "fqdn": "hsm3.cloudhsmsdktest6597-fsfyaucrfvash7fn.cloudhsm.azure.net", + "state": "InitialProvisioning" + } + ], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:12:44.969Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:12:44.969Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg1159/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest6597?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-d41fc70770b3c140c9c0f821435a27ad-9ceaf8a882c8dc57-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "cd9f9586927741a0742243602f5600d5", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1159", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:17:46 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "7c67f4f3-0006-4417-8744-7718f247562c", + "x-ms-ratelimit-remaining-subscription-reads": "11982", + "x-ms-request-id": "7c67f4f3-0006-4417-8744-7718f247562c", + "x-ms-routing-request-id": "UKSOUTH:20230707T101746Z:7c67f4f3-0006-4417-8744-7718f247562c" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest6597", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg1159/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest6597", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [ + { + "fqdn": "hsm1.cloudhsmsdktest6597-fsfyaucrfvash7fn.cloudhsm.azure.net", + "state": "Starting" + }, + { + "fqdn": "hsm2.cloudhsmsdktest6597-fsfyaucrfvash7fn.cloudhsm.azure.net", + "state": "InitialProvisioning" + }, + { + "fqdn": "hsm3.cloudhsmsdktest6597-fsfyaucrfvash7fn.cloudhsm.azure.net", + "state": "InitialProvisioning" + } + ], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:12:44.969Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:12:44.969Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg1159/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest6597?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-d41fc70770b3c140c9c0f821435a27ad-427e9282fcf9eca3-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "c357da44b6e1a1727b1a42bac1eb7188", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1137", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:18:19 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "a2cd2e6d-ddfd-4779-bd5f-18671173fb7b", + "x-ms-ratelimit-remaining-subscription-reads": "11981", + "x-ms-request-id": "a2cd2e6d-ddfd-4779-bd5f-18671173fb7b", + "x-ms-routing-request-id": "UKSOUTH:20230707T101819Z:a2cd2e6d-ddfd-4779-bd5f-18671173fb7b" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest6597", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg1159/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest6597", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [ + { + "fqdn": "hsm1.cloudhsmsdktest6597-fsfyaucrfvash7fn.cloudhsm.azure.net", + "state": "Starting" + }, + { + "fqdn": "hsm2.cloudhsmsdktest6597-fsfyaucrfvash7fn.cloudhsm.azure.net", + "state": "Starting" + }, + { + "fqdn": "hsm3.cloudhsmsdktest6597-fsfyaucrfvash7fn.cloudhsm.azure.net", + "state": "Starting" + } + ], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:12:44.969Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:12:44.969Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg1159/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest6597?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-d41fc70770b3c140c9c0f821435a27ad-f3fea2b4a8388aac-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "1f37b13d176df76eb042970a58c40322", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1137", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:18:51 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "b4878e0e-bd1b-4d68-9b42-631af8e4b2ff", + "x-ms-ratelimit-remaining-subscription-reads": "11980", + "x-ms-request-id": "b4878e0e-bd1b-4d68-9b42-631af8e4b2ff", + "x-ms-routing-request-id": "UKSOUTH:20230707T101851Z:b4878e0e-bd1b-4d68-9b42-631af8e4b2ff" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest6597", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg1159/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest6597", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [ + { + "fqdn": "hsm1.cloudhsmsdktest6597-fsfyaucrfvash7fn.cloudhsm.azure.net", + "state": "Starting" + }, + { + "fqdn": "hsm2.cloudhsmsdktest6597-fsfyaucrfvash7fn.cloudhsm.azure.net", + "state": "Starting" + }, + { + "fqdn": "hsm3.cloudhsmsdktest6597-fsfyaucrfvash7fn.cloudhsm.azure.net", + "state": "Starting" + } + ], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:12:44.969Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:12:44.969Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg1159/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest6597?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-d41fc70770b3c140c9c0f821435a27ad-cba39a7c668e78f7-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "4de9d042e1e4cf8722fd515d4fe57f88", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1137", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:19:23 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "3fff20ac-d429-4529-9188-90d6fe5a2252", + "x-ms-ratelimit-remaining-subscription-reads": "11979", + "x-ms-request-id": "3fff20ac-d429-4529-9188-90d6fe5a2252", + "x-ms-routing-request-id": "UKSOUTH:20230707T101924Z:3fff20ac-d429-4529-9188-90d6fe5a2252" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest6597", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg1159/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest6597", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [ + { + "fqdn": "hsm1.cloudhsmsdktest6597-fsfyaucrfvash7fn.cloudhsm.azure.net", + "state": "Starting" + }, + { + "fqdn": "hsm2.cloudhsmsdktest6597-fsfyaucrfvash7fn.cloudhsm.azure.net", + "state": "Starting" + }, + { + "fqdn": "hsm3.cloudhsmsdktest6597-fsfyaucrfvash7fn.cloudhsm.azure.net", + "state": "Starting" + } + ], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:12:44.969Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:12:44.969Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg1159/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest6597?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-d41fc70770b3c140c9c0f821435a27ad-76cd0ef7ac743b3c-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "7e22bbb0e01e2c676b5f139e1e6849b7", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1137", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:19:55 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "b07f591c-6f7d-48d1-8714-89262f3c443b", + "x-ms-ratelimit-remaining-subscription-reads": "11978", + "x-ms-request-id": "b07f591c-6f7d-48d1-8714-89262f3c443b", + "x-ms-routing-request-id": "UKSOUTH:20230707T101956Z:b07f591c-6f7d-48d1-8714-89262f3c443b" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest6597", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg1159/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest6597", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [ + { + "fqdn": "hsm1.cloudhsmsdktest6597-fsfyaucrfvash7fn.cloudhsm.azure.net", + "state": "Starting" + }, + { + "fqdn": "hsm2.cloudhsmsdktest6597-fsfyaucrfvash7fn.cloudhsm.azure.net", + "state": "Starting" + }, + { + "fqdn": "hsm3.cloudhsmsdktest6597-fsfyaucrfvash7fn.cloudhsm.azure.net", + "state": "Starting" + } + ], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:12:44.969Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:12:44.969Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg1159/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest6597?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-d41fc70770b3c140c9c0f821435a27ad-db4af2ed9481762c-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "f0781f1624015ca32a67fd70c511a8cb", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1137", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:20:27 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "83717717-f7c9-49d7-982c-4132a7b6e3ef", + "x-ms-ratelimit-remaining-subscription-reads": "11977", + "x-ms-request-id": "83717717-f7c9-49d7-982c-4132a7b6e3ef", + "x-ms-routing-request-id": "UKSOUTH:20230707T102028Z:83717717-f7c9-49d7-982c-4132a7b6e3ef" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest6597", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg1159/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest6597", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [ + { + "fqdn": "hsm1.cloudhsmsdktest6597-fsfyaucrfvash7fn.cloudhsm.azure.net", + "state": "Starting" + }, + { + "fqdn": "hsm2.cloudhsmsdktest6597-fsfyaucrfvash7fn.cloudhsm.azure.net", + "state": "Starting" + }, + { + "fqdn": "hsm3.cloudhsmsdktest6597-fsfyaucrfvash7fn.cloudhsm.azure.net", + "state": "Starting" + } + ], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:12:44.969Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:12:44.969Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg1159/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest6597?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-d41fc70770b3c140c9c0f821435a27ad-53b4cf9e145e798b-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "9d590ec385a1610469bde185cde8b0b9", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1137", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:21:00 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "321e4edd-e77e-4653-b3f4-52c4f6f9b8d4", + "x-ms-ratelimit-remaining-subscription-reads": "11976", + "x-ms-request-id": "321e4edd-e77e-4653-b3f4-52c4f6f9b8d4", + "x-ms-routing-request-id": "UKSOUTH:20230707T102101Z:321e4edd-e77e-4653-b3f4-52c4f6f9b8d4" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest6597", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg1159/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest6597", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [ + { + "fqdn": "hsm1.cloudhsmsdktest6597-fsfyaucrfvash7fn.cloudhsm.azure.net", + "state": "Starting" + }, + { + "fqdn": "hsm2.cloudhsmsdktest6597-fsfyaucrfvash7fn.cloudhsm.azure.net", + "state": "Starting" + }, + { + "fqdn": "hsm3.cloudhsmsdktest6597-fsfyaucrfvash7fn.cloudhsm.azure.net", + "state": "Starting" + } + ], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:12:44.969Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:12:44.969Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg1159/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest6597?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-d41fc70770b3c140c9c0f821435a27ad-af96093b5922fd04-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "30469ab48e6c8b8717c654b6e2f6665a", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1137", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:21:34 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "a429d164-1d63-48b4-b452-54755a374128", + "x-ms-ratelimit-remaining-subscription-reads": "11975", + "x-ms-request-id": "a429d164-1d63-48b4-b452-54755a374128", + "x-ms-routing-request-id": "UKSOUTH:20230707T102135Z:a429d164-1d63-48b4-b452-54755a374128" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest6597", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg1159/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest6597", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [ + { + "fqdn": "hsm1.cloudhsmsdktest6597-fsfyaucrfvash7fn.cloudhsm.azure.net", + "state": "Starting" + }, + { + "fqdn": "hsm2.cloudhsmsdktest6597-fsfyaucrfvash7fn.cloudhsm.azure.net", + "state": "Starting" + }, + { + "fqdn": "hsm3.cloudhsmsdktest6597-fsfyaucrfvash7fn.cloudhsm.azure.net", + "state": "Starting" + } + ], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:12:44.969Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:12:44.969Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg1159/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest6597?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-d41fc70770b3c140c9c0f821435a27ad-fddef00772769c25-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "10da47b7ac0e91161b178744431e8e41", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1137", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:22:07 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "95009723-8ea0-401d-b5a1-93ce0a77fc4e", + "x-ms-ratelimit-remaining-subscription-reads": "11974", + "x-ms-request-id": "95009723-8ea0-401d-b5a1-93ce0a77fc4e", + "x-ms-routing-request-id": "UKSOUTH:20230707T102207Z:95009723-8ea0-401d-b5a1-93ce0a77fc4e" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest6597", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg1159/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest6597", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [ + { + "fqdn": "hsm1.cloudhsmsdktest6597-fsfyaucrfvash7fn.cloudhsm.azure.net", + "state": "Starting" + }, + { + "fqdn": "hsm2.cloudhsmsdktest6597-fsfyaucrfvash7fn.cloudhsm.azure.net", + "state": "Starting" + }, + { + "fqdn": "hsm3.cloudhsmsdktest6597-fsfyaucrfvash7fn.cloudhsm.azure.net", + "state": "Starting" + } + ], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:12:44.969Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:12:44.969Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg1159/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest6597?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-d41fc70770b3c140c9c0f821435a27ad-666e127db4881d3c-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "2bbc43b778ca345e87cd85da304d7e72", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1134", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:22:39 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "aaf7484a-d678-4090-8348-c8b9bbcd92da", + "x-ms-ratelimit-remaining-subscription-reads": "11973", + "x-ms-request-id": "aaf7484a-d678-4090-8348-c8b9bbcd92da", + "x-ms-routing-request-id": "UKSOUTH:20230707T102240Z:aaf7484a-d678-4090-8348-c8b9bbcd92da" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest6597", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg1159/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest6597", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [ + { + "fqdn": "hsm1.cloudhsmsdktest6597-fsfyaucrfvash7fn.cloudhsm.azure.net", + "state": "Started" + }, + { + "fqdn": "hsm2.cloudhsmsdktest6597-fsfyaucrfvash7fn.cloudhsm.azure.net", + "state": "Started" + }, + { + "fqdn": "hsm3.cloudhsmsdktest6597-fsfyaucrfvash7fn.cloudhsm.azure.net", + "state": "Started" + } + ], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:12:44.969Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:12:44.969Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg1159/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest6597?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-d41fc70770b3c140c9c0f821435a27ad-d33ec3606fa7eef7-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "85ce8656a00e07aa83b51455074248f9", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1131", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:23:12 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "f0a1a68a-8aeb-4904-8b29-e4b6747ed0b8", + "x-ms-ratelimit-remaining-subscription-reads": "11972", + "x-ms-request-id": "f0a1a68a-8aeb-4904-8b29-e4b6747ed0b8", + "x-ms-routing-request-id": "UKSOUTH:20230707T102312Z:f0a1a68a-8aeb-4904-8b29-e4b6747ed0b8" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest6597", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg1159/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest6597", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Succeeded", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [ + { + "fqdn": "hsm1.cloudhsmsdktest6597-fsfyaucrfvash7fn.cloudhsm.azure.net", + "state": "Started" + }, + { + "fqdn": "hsm2.cloudhsmsdktest6597-fsfyaucrfvash7fn.cloudhsm.azure.net", + "state": "Started" + }, + { + "fqdn": "hsm3.cloudhsmsdktest6597-fsfyaucrfvash7fn.cloudhsm.azure.net", + "state": "Started" + } + ], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:12:44.969Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:12:44.969Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg1159/providers/Microsoft.Network/virtualNetworks/pe-vnet-6016?api-version=2021-02-01", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "260", + "Content-Type": "application/json", + "traceparent": "00-9332e5d8d7832f3cd523c80c8b26fb03-9bb194aeb4663136-00", + "User-Agent": "azsdk-net-ResourceManager.Network/1.1.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "903a3a9fe93e88a541273c60cd9814ee", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "location": "ukwest", + "properties": { + "addressSpace": { + "addressPrefixes": [ + "10.0.0.0/16" + ] + }, + "dhcpOptions": { + "dnsServers": [ + "10.1.1.1", + "10.1.2.4" + ] + }, + "subnets": [ + { + "name": "default", + "properties": { + "addressPrefix": "10.0.1.0/24", + "privateEndpointNetworkPolicies": "Disabled" + } + } + ] + } + }, + "StatusCode": 201, + "ResponseHeaders": { + "azure-asyncnotification": "Enabled", + "azure-asyncoperation": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/providers/Microsoft.Network/locations/ukwest/operations/eccea9c6-3b06-4cb2-83bb-ed2b6e405e1f?api-version=2021-02-01", + "Cache-Control": "no-cache", + "Content-Length": "1337", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:23:13 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Retry-After": "3", + "Server": [ + "Microsoft-HTTPAPI/2.0", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-arm-service-request-id": "9e9b5f12-dd03-4f31-837f-356f87e612fc", + "x-ms-client-request-id": "903a3a9fe93e88a541273c60cd9814ee", + "x-ms-correlation-request-id": "641d9e97-fa8a-4358-9cda-e5df143b2f94", + "x-ms-ratelimit-remaining-subscription-writes": "1197", + "x-ms-request-id": "eccea9c6-3b06-4cb2-83bb-ed2b6e405e1f", + "x-ms-routing-request-id": "UKSOUTH:20230707T102314Z:641d9e97-fa8a-4358-9cda-e5df143b2f94" + }, + "ResponseBody": { + "name": "pe-vnet-6016", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg1159/providers/Microsoft.Network/virtualNetworks/pe-vnet-6016", + "etag": "W/\u002272ad13f8-878f-48f7-bcac-f358ac51d415\u0022", + "type": "Microsoft.Network/virtualNetworks", + "location": "ukwest", + "properties": { + "provisioningState": "Updating", + "resourceGuid": "e5b65820-f2a1-4f97-a9b3-1d25294ce29d", + "addressSpace": { + "addressPrefixes": [ + "10.0.0.0/16" + ] + }, + "dhcpOptions": { + "dnsServers": [ + "10.1.1.1", + "10.1.2.4" + ] + }, + "subnets": [ + { + "name": "default", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg1159/providers/Microsoft.Network/virtualNetworks/pe-vnet-6016/subnets/default", + "etag": "W/\u002272ad13f8-878f-48f7-bcac-f358ac51d415\u0022", + "properties": { + "provisioningState": "Updating", + "addressPrefix": "10.0.1.0/24", + "delegations": [], + "privateEndpointNetworkPolicies": "Disabled", + "privateLinkServiceNetworkPolicies": "Enabled" + }, + "type": "Microsoft.Network/virtualNetworks/subnets" + } + ], + "virtualNetworkPeerings": [], + "enableDdosProtection": false + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/providers/Microsoft.Network/locations/ukwest/operations/eccea9c6-3b06-4cb2-83bb-ed2b6e405e1f?api-version=2021-02-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-9332e5d8d7832f3cd523c80c8b26fb03-59cde417c618a5f9-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "38df4d1ef61b9c8f681769e0475546bd", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "30", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:23:14 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Retry-After": "10", + "Server": [ + "Microsoft-HTTPAPI/2.0", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-arm-service-request-id": "2a4fb756-9c32-45aa-9d9f-6bf2da7955f9", + "x-ms-client-request-id": "38df4d1ef61b9c8f681769e0475546bd", + "x-ms-correlation-request-id": "70ecd761-d30c-422d-821f-9efcefc305d9", + "x-ms-ratelimit-remaining-subscription-reads": "11971", + "x-ms-request-id": "c7ad4073-d0bc-4d6d-920a-5635908b4a2e", + "x-ms-routing-request-id": "UKSOUTH:20230707T102314Z:70ecd761-d30c-422d-821f-9efcefc305d9" + }, + "ResponseBody": { + "status": "InProgress" + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/providers/Microsoft.Network/locations/ukwest/operations/eccea9c6-3b06-4cb2-83bb-ed2b6e405e1f?api-version=2021-02-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-9332e5d8d7832f3cd523c80c8b26fb03-feb1b90a85ab8fa5-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "aa8c53f2df3006e985927cdbdf7843bc", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "29", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:23:24 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": [ + "Microsoft-HTTPAPI/2.0", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-arm-service-request-id": "8329ed88-4b64-4608-a3cb-4af014f3e171", + "x-ms-client-request-id": "aa8c53f2df3006e985927cdbdf7843bc", + "x-ms-correlation-request-id": "1f420e80-b272-4f0d-9a25-b5cff5260cfd", + "x-ms-ratelimit-remaining-subscription-reads": "11970", + "x-ms-request-id": "afe4bb15-b7a6-4fe3-a981-cbbcffb4c217", + "x-ms-routing-request-id": "UKSOUTH:20230707T102324Z:1f420e80-b272-4f0d-9a25-b5cff5260cfd" + }, + "ResponseBody": { + "status": "Succeeded" + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg1159/providers/Microsoft.Network/virtualNetworks/pe-vnet-6016?api-version=2021-02-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-9332e5d8d7832f3cd523c80c8b26fb03-f41055f189137d48-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "80429a9bdbb8c6d3bf6bcbff2fd461bf", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1339", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:23:24 GMT", + "ETag": "W/\u0022503de1ed-df24-455b-8ce8-0ae5218c2241\u0022", + "Expires": "-1", + "Pragma": "no-cache", + "Server": [ + "Microsoft-HTTPAPI/2.0", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-arm-service-request-id": "dc127652-75bf-4c54-84e6-b21b9637a03b", + "x-ms-client-request-id": "80429a9bdbb8c6d3bf6bcbff2fd461bf", + "x-ms-correlation-request-id": "e22c5396-df78-47be-be3c-77a978ef0a19", + "x-ms-ratelimit-remaining-subscription-reads": "11969", + "x-ms-request-id": "77e016d5-a65e-4f7f-8261-ef72525d0576", + "x-ms-routing-request-id": "UKSOUTH:20230707T102325Z:e22c5396-df78-47be-be3c-77a978ef0a19" + }, + "ResponseBody": { + "name": "pe-vnet-6016", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg1159/providers/Microsoft.Network/virtualNetworks/pe-vnet-6016", + "etag": "W/\u0022503de1ed-df24-455b-8ce8-0ae5218c2241\u0022", + "type": "Microsoft.Network/virtualNetworks", + "location": "ukwest", + "properties": { + "provisioningState": "Succeeded", + "resourceGuid": "e5b65820-f2a1-4f97-a9b3-1d25294ce29d", + "addressSpace": { + "addressPrefixes": [ + "10.0.0.0/16" + ] + }, + "dhcpOptions": { + "dnsServers": [ + "10.1.1.1", + "10.1.2.4" + ] + }, + "subnets": [ + { + "name": "default", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg1159/providers/Microsoft.Network/virtualNetworks/pe-vnet-6016/subnets/default", + "etag": "W/\u0022503de1ed-df24-455b-8ce8-0ae5218c2241\u0022", + "properties": { + "provisioningState": "Succeeded", + "addressPrefix": "10.0.1.0/24", + "delegations": [], + "privateEndpointNetworkPolicies": "Disabled", + "privateLinkServiceNetworkPolicies": "Enabled" + }, + "type": "Microsoft.Network/virtualNetworks/subnets" + } + ], + "virtualNetworkPeerings": [], + "enableDdosProtection": false + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg1159/providers/Microsoft.Network/privateEndpoints/pe-6365?api-version=2021-02-01", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "543", + "Content-Type": "application/json", + "traceparent": "00-6b3308bed427a0c983193ea64f2509d1-e37cf2cc3fee0875-00", + "User-Agent": "azsdk-net-ResourceManager.Network/1.1.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "f13a4c1ce0f83f7164d9b3887ab4bdef", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "location": "ukwest", + "properties": { + "subnet": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg1159/providers/Microsoft.Network/virtualNetworks/pe-vnet-6016/subnets/default", + "properties": {} + }, + "manualPrivateLinkServiceConnections": [ + { + "name": "pec-7420", + "properties": { + "privateLinkServiceId": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg1159/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest6597", + "groupIds": [ + "cloudhsm" + ], + "requestMessage": "SDK testing" + } + } + ] + } + }, + "StatusCode": 201, + "ResponseHeaders": { + "azure-asyncnotification": "Enabled", + "azure-asyncoperation": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/providers/Microsoft.Network/locations/ukwest/operations/9b04fa21-106d-4ef3-a1b0-b5db4a98cc54?api-version=2021-02-01", + "Cache-Control": "no-cache", + "Content-Length": "1961", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:23:25 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Retry-After": "10", + "Server": [ + "Microsoft-HTTPAPI/2.0", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-arm-service-request-id": "5ac17e31-3c0c-4594-80f7-4f4ea086637f", + "x-ms-client-request-id": "f13a4c1ce0f83f7164d9b3887ab4bdef", + "x-ms-correlation-request-id": "cb55c946-f859-4ed0-a123-32a428fce8f4", + "x-ms-ratelimit-remaining-subscription-writes": "1196", + "x-ms-request-id": "9b04fa21-106d-4ef3-a1b0-b5db4a98cc54", + "x-ms-routing-request-id": "UKSOUTH:20230707T102326Z:cb55c946-f859-4ed0-a123-32a428fce8f4" + }, + "ResponseBody": { + "name": "pe-6365", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg1159/providers/Microsoft.Network/privateEndpoints/pe-6365", + "etag": "W/\u00229d083b52-aec3-4289-988c-7a5990e4fd83\u0022", + "type": "Microsoft.Network/privateEndpoints", + "location": "ukwest", + "properties": { + "provisioningState": "Updating", + "resourceGuid": "d4e6b572-81b4-461a-9b32-f87bbd6f675e", + "privateLinkServiceConnections": [], + "manualPrivateLinkServiceConnections": [ + { + "name": "pec-7420", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg1159/providers/Microsoft.Network/privateEndpoints/pe-6365/manualPrivateLinkServiceConnections/pec-7420", + "etag": "W/\u00229d083b52-aec3-4289-988c-7a5990e4fd83\u0022", + "properties": { + "provisioningState": "Succeeded", + "privateLinkServiceId": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg1159/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest6597", + "groupIds": [ + "cloudhsm" + ], + "requestMessage": "SDK testing", + "privateLinkServiceConnectionState": { + "status": "Pending", + "description": "SDK testing", + "actionsRequired": "None" + } + }, + "type": "Microsoft.Network/privateEndpoints/manualPrivateLinkServiceConnections" + } + ], + "subnet": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg1159/providers/Microsoft.Network/virtualNetworks/pe-vnet-6016/subnets/default" + }, + "networkInterfaces": [ + { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg1159/providers/Microsoft.Network/networkInterfaces/pe-6365.nic.3baa3afb-2a02-46eb-bee5-ee0ed8d50763" + } + ], + "customDnsConfigs": [] + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/providers/Microsoft.Network/locations/ukwest/operations/9b04fa21-106d-4ef3-a1b0-b5db4a98cc54?api-version=2021-02-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-6b3308bed427a0c983193ea64f2509d1-c6e363de6692bb11-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "92bebc31513dbac329021bde284a4b0b", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "30", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:23:26 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Retry-After": "10", + "Server": [ + "Microsoft-HTTPAPI/2.0", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-arm-service-request-id": "46bf0ce9-8b32-4db7-b4a2-d142ce183551", + "x-ms-client-request-id": "92bebc31513dbac329021bde284a4b0b", + "x-ms-correlation-request-id": "49a22dcd-520a-40bd-8720-9edcf0351c9f", + "x-ms-ratelimit-remaining-subscription-reads": "11968", + "x-ms-request-id": "4bbb6791-43b8-448a-acf9-e36d60dd2814", + "x-ms-routing-request-id": "UKSOUTH:20230707T102326Z:49a22dcd-520a-40bd-8720-9edcf0351c9f" + }, + "ResponseBody": { + "status": "InProgress" + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/providers/Microsoft.Network/locations/ukwest/operations/9b04fa21-106d-4ef3-a1b0-b5db4a98cc54?api-version=2021-02-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-6b3308bed427a0c983193ea64f2509d1-0dd68623fb4ad36c-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "822bdbadb49056ab47237132f6ac2b7a", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "30", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:23:36 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Retry-After": "20", + "Server": [ + "Microsoft-HTTPAPI/2.0", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-arm-service-request-id": "7695c2ea-874f-41ce-889b-0f206c51435a", + "x-ms-client-request-id": "822bdbadb49056ab47237132f6ac2b7a", + "x-ms-correlation-request-id": "6cfd80c7-26a3-43d0-b6de-a55bd6744f37", + "x-ms-ratelimit-remaining-subscription-reads": "11967", + "x-ms-request-id": "ee844a83-1279-4790-bba9-fca0857131be", + "x-ms-routing-request-id": "UKSOUTH:20230707T102336Z:6cfd80c7-26a3-43d0-b6de-a55bd6744f37" + }, + "ResponseBody": { + "status": "InProgress" + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/providers/Microsoft.Network/locations/ukwest/operations/9b04fa21-106d-4ef3-a1b0-b5db4a98cc54?api-version=2021-02-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-6b3308bed427a0c983193ea64f2509d1-a76fc07f6b5291cf-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "bd5702022af681b2e9898210aa26ee35", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "29", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:23:56 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": [ + "Microsoft-HTTPAPI/2.0", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-arm-service-request-id": "776a869a-cd5b-46c4-b9cb-7a4b833ec11d", + "x-ms-client-request-id": "bd5702022af681b2e9898210aa26ee35", + "x-ms-correlation-request-id": "0d17f646-eab9-40c6-b01e-b5575448f771", + "x-ms-ratelimit-remaining-subscription-reads": "11966", + "x-ms-request-id": "866c9f4b-73bc-453d-996b-4065e7a8b5f6", + "x-ms-routing-request-id": "UKSOUTH:20230707T102357Z:0d17f646-eab9-40c6-b01e-b5575448f771" + }, + "ResponseBody": { + "status": "Succeeded" + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg1159/providers/Microsoft.Network/privateEndpoints/pe-6365?api-version=2021-02-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-6b3308bed427a0c983193ea64f2509d1-f287c81745e9a415-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "3817df7a54be7c2010684b1ae090c47d", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "2444", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:23:56 GMT", + "ETag": "W/\u0022999b4fe9-5d2b-4755-b3c1-540194d7eeef\u0022", + "Expires": "-1", + "Pragma": "no-cache", + "Server": [ + "Microsoft-HTTPAPI/2.0", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-arm-service-request-id": "c21e8d37-51ef-4231-a3b7-f418e8ed2fe5", + "x-ms-client-request-id": "3817df7a54be7c2010684b1ae090c47d", + "x-ms-correlation-request-id": "e753a29c-6f1c-4123-99a6-078063c574c1", + "x-ms-ratelimit-remaining-subscription-reads": "11965", + "x-ms-request-id": "77b34a46-5853-45f4-a936-3bedefcca580", + "x-ms-routing-request-id": "UKSOUTH:20230707T102357Z:e753a29c-6f1c-4123-99a6-078063c574c1" + }, + "ResponseBody": { + "name": "pe-6365", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg1159/providers/Microsoft.Network/privateEndpoints/pe-6365", + "etag": "W/\u0022999b4fe9-5d2b-4755-b3c1-540194d7eeef\u0022", + "type": "Microsoft.Network/privateEndpoints", + "location": "ukwest", + "properties": { + "provisioningState": "Succeeded", + "resourceGuid": "d4e6b572-81b4-461a-9b32-f87bbd6f675e", + "privateLinkServiceConnections": [], + "manualPrivateLinkServiceConnections": [ + { + "name": "pec-7420", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg1159/providers/Microsoft.Network/privateEndpoints/pe-6365/manualPrivateLinkServiceConnections/pec-7420", + "etag": "W/\u0022999b4fe9-5d2b-4755-b3c1-540194d7eeef\u0022", + "properties": { + "provisioningState": "Succeeded", + "privateLinkServiceId": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg1159/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest6597", + "groupIds": [ + "cloudhsm" + ], + "requestMessage": "SDK testing", + "privateLinkServiceConnectionState": { + "status": "Pending", + "description": "SDK testing", + "actionsRequired": "None" + } + }, + "type": "Microsoft.Network/privateEndpoints/manualPrivateLinkServiceConnections" + } + ], + "subnet": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg1159/providers/Microsoft.Network/virtualNetworks/pe-vnet-6016/subnets/default" + }, + "networkInterfaces": [ + { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg1159/providers/Microsoft.Network/networkInterfaces/pe-6365.nic.3baa3afb-2a02-46eb-bee5-ee0ed8d50763" + } + ], + "customDnsConfigs": [ + { + "fqdn": "hsm1.cloudhsmsdktest6597-fsfyaucrfvash7fn.cloudhsm.azure.net", + "ipAddresses": [ + "10.0.1.4" + ] + }, + { + "fqdn": "hsm2.cloudhsmsdktest6597-fsfyaucrfvash7fn.cloudhsm.azure.net", + "ipAddresses": [ + "10.0.1.5" + ] + }, + { + "fqdn": "hsm3.cloudhsmsdktest6597-fsfyaucrfvash7fn.cloudhsm.azure.net", + "ipAddresses": [ + "10.0.1.6" + ] + } + ] + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg1159/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest6597/privateEndpointConnections?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-68e00e09b72dca87635fdf42e4416f2a-7d584a4fa9fa42a2-00", + "User-Agent": "azsdk-net-ResourceManager.HardwareSecurityModules/1.0.0-alpha.20230707.1 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "25dba1d78ef3821529a99806319bab21", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "679", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:23:57 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "b23ddc43-f56f-438a-9a3c-1f1855ed9ed0", + "x-ms-ratelimit-remaining-subscription-reads": "11964", + "x-ms-request-id": "b23ddc43-f56f-438a-9a3c-1f1855ed9ed0", + "x-ms-routing-request-id": "UKSOUTH:20230707T102358Z:b23ddc43-f56f-438a-9a3c-1f1855ed9ed0" + }, + "ResponseBody": { + "value": [ + { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg1159/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest6597/privateEndpointConnections/pec-7420", + "name": "pec-7420", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters/privateEndpointConnections", + "etag": null, + "properties": { + "provisioningState": "SUCCEEDED", + "groupIds": [ + "cloudhsm" + ], + "privateEndpoint": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg1159/providers/Microsoft.Network/privateEndpoints/pe-6365" + }, + "privateLinkServiceConnectionState": { + "status": "Pending", + "description": "SDK testing", + "actionsRequired": "None" + } + } + } + ] + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg1159/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest6597/privateEndpointConnections/pec-7420?api-version=2022-08-31-preview", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "115", + "Content-Type": "application/json", + "traceparent": "00-14efc220bd6fc10300c15aef28d15c25-5c7a865302412373-00", + "User-Agent": "azsdk-net-ResourceManager.HardwareSecurityModules/1.0.0-alpha.20230707.1 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "17b83c34f294aebbe1daac8edf98a158", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "properties": { + "privateLinkServiceConnectionState": { + "status": "Approved", + "description": "Approve by sdk test case" + } + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg1159/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest6597/privateEndpointConnections/pec-7420?api-version=2022-08-31-preview\u0026chsm-operation=eyJjb2RlIjoicHJpdmF0ZUVuZHBvaW50Q29ubmVjdGlvbnMvYXBwcm92ZSIsInN0IjoiMjAyMy0wNy0wN1QxMDoyMzo1OC44NTY1MjExWiIsImV0YWciOiJiMzA1ODJiZmFlOTQ0NmE0YjAwYjVkNzUwN2I5MWY4YyJ9", + "Cache-Control": "no-cache", + "Content-Length": "710", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:23:57 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "66f79412-b526-4a56-b0e5-4a8c1787ae0b", + "x-ms-ratelimit-remaining-subscription-writes": "1195", + "x-ms-request-id": "66f79412-b526-4a56-b0e5-4a8c1787ae0b", + "x-ms-routing-request-id": "UKSOUTH:20230707T102358Z:66f79412-b526-4a56-b0e5-4a8c1787ae0b" + }, + "ResponseBody": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg1159/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest6597/privateEndpointConnections/pec-7420", + "name": "pec-7420", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters/privateEndpointConnections", + "etag": "b30582bfae9446a4b00b5d7507b91f8c", + "properties": { + "provisioningState": "Updating", + "groupIds": [ + "cloudhsm" + ], + "privateEndpoint": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg1159/providers/Microsoft.Network/privateEndpoints/pe-6365" + }, + "privateLinkServiceConnectionState": { + "status": "Approved", + "description": "Approve by sdk test case", + "actionsRequired": "None" + } + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg1159/providers/Microsoft.Network/privateEndpoints/pe-6365?api-version=2021-02-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-0c46b8de18ab4c0c8bc9fa8da0a5a132-8351550fa556d2d0-00", + "User-Agent": "azsdk-net-ResourceManager.Network/1.1.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "093805c4c84aeb42ca940f15bb194a75", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "2458", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:23:58 GMT", + "ETag": "W/\u002244b1956f-8240-465b-8e40-eb6031d35eb7\u0022", + "Expires": "-1", + "Pragma": "no-cache", + "Server": [ + "Microsoft-HTTPAPI/2.0", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-arm-service-request-id": "031e5009-d6ce-4378-b7aa-53865a0433e2", + "x-ms-client-request-id": "093805c4c84aeb42ca940f15bb194a75", + "x-ms-correlation-request-id": "89b59fb5-60b4-4c28-af56-d30fb1b59097", + "x-ms-ratelimit-remaining-subscription-reads": "11963", + "x-ms-request-id": "3867f886-b1f9-422c-bb10-fcfebefa6752", + "x-ms-routing-request-id": "UKSOUTH:20230707T102359Z:89b59fb5-60b4-4c28-af56-d30fb1b59097" + }, + "ResponseBody": { + "name": "pe-6365", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg1159/providers/Microsoft.Network/privateEndpoints/pe-6365", + "etag": "W/\u002244b1956f-8240-465b-8e40-eb6031d35eb7\u0022", + "type": "Microsoft.Network/privateEndpoints", + "location": "ukwest", + "properties": { + "provisioningState": "Succeeded", + "resourceGuid": "d4e6b572-81b4-461a-9b32-f87bbd6f675e", + "privateLinkServiceConnections": [], + "manualPrivateLinkServiceConnections": [ + { + "name": "pec-7420", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg1159/providers/Microsoft.Network/privateEndpoints/pe-6365/manualPrivateLinkServiceConnections/pec-7420", + "etag": "W/\u002244b1956f-8240-465b-8e40-eb6031d35eb7\u0022", + "properties": { + "provisioningState": "Succeeded", + "privateLinkServiceId": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg1159/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest6597", + "groupIds": [ + "cloudhsm" + ], + "requestMessage": "SDK testing", + "privateLinkServiceConnectionState": { + "status": "Approved", + "description": "Approve by sdk test case", + "actionsRequired": "None" + } + }, + "type": "Microsoft.Network/privateEndpoints/manualPrivateLinkServiceConnections" + } + ], + "subnet": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg1159/providers/Microsoft.Network/virtualNetworks/pe-vnet-6016/subnets/default" + }, + "networkInterfaces": [ + { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg1159/providers/Microsoft.Network/networkInterfaces/pe-6365.nic.3baa3afb-2a02-46eb-bee5-ee0ed8d50763" + } + ], + "customDnsConfigs": [ + { + "fqdn": "hsm1.cloudhsmsdktest6597-fsfyaucrfvash7fn.cloudhsm.azure.net", + "ipAddresses": [ + "10.0.1.4" + ] + }, + { + "fqdn": "hsm2.cloudhsmsdktest6597-fsfyaucrfvash7fn.cloudhsm.azure.net", + "ipAddresses": [ + "10.0.1.5" + ] + }, + { + "fqdn": "hsm3.cloudhsmsdktest6597-fsfyaucrfvash7fn.cloudhsm.azure.net", + "ipAddresses": [ + "10.0.1.6" + ] + } + ] + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg1159/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest6597/privateEndpointConnections/pec-7420?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-2650d4ad2a928020e6c4ea409d3b3f3e-f65fce006ad27783-00", + "User-Agent": "azsdk-net-ResourceManager.HardwareSecurityModules/1.0.0-alpha.20230707.1 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "a4e529bcadd8e4e8e62d4418e286a290", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "710", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:23:58 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "42ddd22b-d1f8-480a-87f8-15ac87b04481", + "x-ms-ratelimit-remaining-subscription-reads": "11962", + "x-ms-request-id": "42ddd22b-d1f8-480a-87f8-15ac87b04481", + "x-ms-routing-request-id": "UKSOUTH:20230707T102359Z:42ddd22b-d1f8-480a-87f8-15ac87b04481" + }, + "ResponseBody": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg1159/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest6597/privateEndpointConnections/pec-7420", + "name": "pec-7420", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters/privateEndpointConnections", + "etag": "b30582bfae9446a4b00b5d7507b91f8c", + "properties": { + "provisioningState": "Updating", + "groupIds": [ + "cloudhsm" + ], + "privateEndpoint": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg1159/providers/Microsoft.Network/privateEndpoints/pe-6365" + }, + "privateLinkServiceConnectionState": { + "status": "Approved", + "description": "Approve by sdk test case", + "actionsRequired": "None" + } + } + } + } + ], + "Variables": { + "AZURE_AUTHORITY_HOST": "https://login.microsoftonline.com", + "RandomSeed": "150728944", + "RESOURCE_MANAGER_URL": null, + "SUBSCRIPTION_ID": "75e96d09-a291-40e1-a5e6-cda78233d867" + } +} diff --git a/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/tests/SessionRecords/CloudHsmClustersPrivateEndpointConnectionTests/CreateOrUpdateAsyncPrivateEndpointConnectionAsync.json b/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/tests/SessionRecords/CloudHsmClustersPrivateEndpointConnectionTests/CreateOrUpdateAsyncPrivateEndpointConnectionAsync.json new file mode 100644 index 000000000000..cce4929672e0 --- /dev/null +++ b/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/tests/SessionRecords/CloudHsmClustersPrivateEndpointConnectionTests/CreateOrUpdateAsyncPrivateEndpointConnectionAsync.json @@ -0,0 +1,2883 @@ +{ + "Entries": [ + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867?api-version=2021-01-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-921454366acb93dc041adeb10d2b1fbb-a7f93cb9d46ddf14-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "ddcd99f6f35ea28351757fd78ad51b01", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "448", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:47:38 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "5fe3c812-bcbf-4ce7-a5b6-4ecd38203d80", + "x-ms-ratelimit-remaining-subscription-reads": "11881", + "x-ms-request-id": "5fe3c812-bcbf-4ce7-a5b6-4ecd38203d80", + "x-ms-routing-request-id": "UKSOUTH:20230707T104738Z:5fe3c812-bcbf-4ce7-a5b6-4ecd38203d80" + }, + "ResponseBody": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867", + "authorizationSource": "RoleBased", + "managedByTenants": [ + { + "tenantId": "2f4a9838-26b7-47ee-be60-ccc1fdec5953" + } + ], + "subscriptionId": "75e96d09-a291-40e1-a5e6-cda78233d867", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "displayName": "susolank Projects", + "state": "Enabled", + "subscriptionPolicies": { + "locationPlacementId": "Internal_2014-09-01", + "quotaId": "Internal_2014-09-01", + "spendingLimit": "Off" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867?api-version=2021-01-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-b87058d5292ce0398046e7ad6983cc2e-43300450a9a8a308-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "cd95c9923a873af5ea5ed6aea28eddd3", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "448", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:47:38 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "ef5f1d29-2918-407c-8e55-0c8c98a7fa20", + "x-ms-ratelimit-remaining-subscription-reads": "11880", + "x-ms-request-id": "ef5f1d29-2918-407c-8e55-0c8c98a7fa20", + "x-ms-routing-request-id": "UKSOUTH:20230707T104738Z:ef5f1d29-2918-407c-8e55-0c8c98a7fa20" + }, + "ResponseBody": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867", + "authorizationSource": "RoleBased", + "managedByTenants": [ + { + "tenantId": "2f4a9838-26b7-47ee-be60-ccc1fdec5953" + } + ], + "subscriptionId": "75e96d09-a291-40e1-a5e6-cda78233d867", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "displayName": "susolank Projects", + "state": "Enabled", + "subscriptionPolicies": { + "locationPlacementId": "Internal_2014-09-01", + "quotaId": "Internal_2014-09-01", + "spendingLimit": "Off" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourcegroups/sdkTestsRg6092?api-version=**", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "21", + "Content-Type": "application/json", + "traceparent": "00-5f9e7b89b6a1faf192e3abf43f27edcd-c1a63a818cc469ab-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "85b8d6bf57ac00084966311f0c5d41ba", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "location": "ukwest" + }, + "StatusCode": 201, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "225", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:47:39 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "6ea7f311-58c6-4729-a923-00905b02a53a", + "x-ms-ratelimit-remaining-subscription-writes": "1186", + "x-ms-request-id": "6ea7f311-58c6-4729-a923-00905b02a53a", + "x-ms-routing-request-id": "UKSOUTH:20230707T104739Z:6ea7f311-58c6-4729-a923-00905b02a53a" + }, + "ResponseBody": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg6092", + "name": "sdkTestsRg6092", + "type": "Microsoft.Resources/resourceGroups", + "location": "ukwest", + "properties": { + "provisioningState": "Succeeded" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg6092/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest131?api-version=2022-08-31-preview", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "152", + "Content-Type": "application/json", + "traceparent": "00-4510290775640f79df6d784fce80ffaf-b903d0270367f4c7-00", + "User-Agent": "azsdk-net-ResourceManager.HardwareSecurityModules/1.0.0-alpha.20230707.1 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "f06a0916a3bbf393001dd400c398ab95", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "location": "ukwest", + "properties": { + "securityDomain": { + "fipsState": 2 + } + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "863", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:47:44 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "6755a969-a651-46ed-8159-986ee6b7eac9", + "x-ms-ratelimit-remaining-subscription-writes": "1185", + "x-ms-request-id": "6755a969-a651-46ed-8159-986ee6b7eac9", + "x-ms-routing-request-id": "UKSOUTH:20230707T104744Z:6755a969-a651-46ed-8159-986ee6b7eac9" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest131", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg6092/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest131", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:47:39.629Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:47:39.629Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg6092/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest131?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-4510290775640f79df6d784fce80ffaf-6868230fee148224-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "cac7a9edcfd6151af2b957ea2b48a399", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "863", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:47:44 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "f282526d-76b5-456a-a99e-421a3af2b707", + "x-ms-ratelimit-remaining-subscription-reads": "11879", + "x-ms-request-id": "f282526d-76b5-456a-a99e-421a3af2b707", + "x-ms-routing-request-id": "UKSOUTH:20230707T104744Z:f282526d-76b5-456a-a99e-421a3af2b707" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest131", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg6092/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest131", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:47:39.629Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:47:39.629Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg6092/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest131?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-4510290775640f79df6d784fce80ffaf-a05235bd4c44df05-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "429277733857a3fe7b9db2e8df7815ff", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "863", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:47:45 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "df5cc1c4-b849-4a40-95a7-4c26255ae556", + "x-ms-ratelimit-remaining-subscription-reads": "11878", + "x-ms-request-id": "df5cc1c4-b849-4a40-95a7-4c26255ae556", + "x-ms-routing-request-id": "UKSOUTH:20230707T104745Z:df5cc1c4-b849-4a40-95a7-4c26255ae556" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest131", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg6092/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest131", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:47:39.629Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:47:39.629Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg6092/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest131?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-4510290775640f79df6d784fce80ffaf-fc263c9b2a48b6f5-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "1913e088e1d1fbbfe34e892d1aa3a1f5", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "863", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:47:46 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "58e54d25-f874-4335-94b4-8550fbbe10b6", + "x-ms-ratelimit-remaining-subscription-reads": "11877", + "x-ms-request-id": "58e54d25-f874-4335-94b4-8550fbbe10b6", + "x-ms-routing-request-id": "UKSOUTH:20230707T104746Z:58e54d25-f874-4335-94b4-8550fbbe10b6" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest131", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg6092/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest131", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:47:39.629Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:47:39.629Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg6092/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest131?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-4510290775640f79df6d784fce80ffaf-d56f529bfb04bbc2-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "66a62a2f536eb49caa234f391c323579", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "863", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:47:47 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "c9c0d5ad-d0e6-463d-b45f-ee2c0a0e87dc", + "x-ms-ratelimit-remaining-subscription-reads": "11876", + "x-ms-request-id": "c9c0d5ad-d0e6-463d-b45f-ee2c0a0e87dc", + "x-ms-routing-request-id": "UKSOUTH:20230707T104748Z:c9c0d5ad-d0e6-463d-b45f-ee2c0a0e87dc" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest131", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg6092/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest131", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:47:39.629Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:47:39.629Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg6092/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest131?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-4510290775640f79df6d784fce80ffaf-a51530cdd0cfc788-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "4b6258a3893592c8b7975e09afd088d7", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "863", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:47:50 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "7b7d50ed-baa5-47b6-9164-b437c6d1fb38", + "x-ms-ratelimit-remaining-subscription-reads": "11875", + "x-ms-request-id": "7b7d50ed-baa5-47b6-9164-b437c6d1fb38", + "x-ms-routing-request-id": "UKSOUTH:20230707T104750Z:7b7d50ed-baa5-47b6-9164-b437c6d1fb38" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest131", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg6092/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest131", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:47:39.629Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:47:39.629Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg6092/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest131?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-4510290775640f79df6d784fce80ffaf-c23a023db7fcca09-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "b5b8bcfcaed23590445e6ead9285deb1", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "863", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:47:54 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "7670ed53-555c-476a-abd1-289561f18a89", + "x-ms-ratelimit-remaining-subscription-reads": "11874", + "x-ms-request-id": "7670ed53-555c-476a-abd1-289561f18a89", + "x-ms-routing-request-id": "UKSOUTH:20230707T104754Z:7670ed53-555c-476a-abd1-289561f18a89" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest131", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg6092/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest131", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:47:39.629Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:47:39.629Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg6092/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest131?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-4510290775640f79df6d784fce80ffaf-a40a9d048a309402-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "c2890f185541a6bf6114aed6f49204da", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "863", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:48:02 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "0bd5a586-f754-496e-8397-d72161f5134c", + "x-ms-ratelimit-remaining-subscription-reads": "11873", + "x-ms-request-id": "0bd5a586-f754-496e-8397-d72161f5134c", + "x-ms-routing-request-id": "UKSOUTH:20230707T104802Z:0bd5a586-f754-496e-8397-d72161f5134c" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest131", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg6092/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest131", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:47:39.629Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:47:39.629Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg6092/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest131?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-4510290775640f79df6d784fce80ffaf-b7d658474078a052-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "5f3d779a807af5a7c72c07d61a1a0032", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "863", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:48:18 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "8ad1f76c-b116-4cc4-8fe6-4aca03be5e52", + "x-ms-ratelimit-remaining-subscription-reads": "11872", + "x-ms-request-id": "8ad1f76c-b116-4cc4-8fe6-4aca03be5e52", + "x-ms-routing-request-id": "UKSOUTH:20230707T104818Z:8ad1f76c-b116-4cc4-8fe6-4aca03be5e52" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest131", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg6092/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest131", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:47:39.629Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:47:39.629Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg6092/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest131?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-4510290775640f79df6d784fce80ffaf-e0a714d43dd94192-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "9ff1acb8c646a696fd1153beffba40b1", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "863", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:48:51 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "40b2b1dd-b478-4e6a-8cb8-79e270c23087", + "x-ms-ratelimit-remaining-subscription-reads": "11871", + "x-ms-request-id": "40b2b1dd-b478-4e6a-8cb8-79e270c23087", + "x-ms-routing-request-id": "UKSOUTH:20230707T104851Z:40b2b1dd-b478-4e6a-8cb8-79e270c23087" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest131", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg6092/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest131", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:47:39.629Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:47:39.629Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg6092/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest131?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-4510290775640f79df6d784fce80ffaf-9bbd26bc8fc88cef-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "1a1394597e4897366894fb144ee98b46", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "863", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:49:22 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "3291810c-9f75-4aa9-92f7-c3e0e14b99b6", + "x-ms-ratelimit-remaining-subscription-reads": "11870", + "x-ms-request-id": "3291810c-9f75-4aa9-92f7-c3e0e14b99b6", + "x-ms-routing-request-id": "UKSOUTH:20230707T104923Z:3291810c-9f75-4aa9-92f7-c3e0e14b99b6" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest131", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg6092/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest131", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:47:39.629Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:47:39.629Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg6092/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest131?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-4510290775640f79df6d784fce80ffaf-b67ed92b190732f1-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "481d7c1365a1d493e09662682ce9f50d", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "863", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:49:54 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "f6d453cf-de77-4c77-8933-e6bc583a2113", + "x-ms-ratelimit-remaining-subscription-reads": "11869", + "x-ms-request-id": "f6d453cf-de77-4c77-8933-e6bc583a2113", + "x-ms-routing-request-id": "UKSOUTH:20230707T104955Z:f6d453cf-de77-4c77-8933-e6bc583a2113" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest131", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg6092/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest131", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:47:39.629Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:47:39.629Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg6092/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest131?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-4510290775640f79df6d784fce80ffaf-f781004f111b98d0-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "867c55ece5073ae9765937b2ca825714", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "863", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:50:27 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "8cafb2b0-b9be-4439-8d2d-2887eaf6dc5b", + "x-ms-ratelimit-remaining-subscription-reads": "11868", + "x-ms-request-id": "8cafb2b0-b9be-4439-8d2d-2887eaf6dc5b", + "x-ms-routing-request-id": "UKSOUTH:20230707T105027Z:8cafb2b0-b9be-4439-8d2d-2887eaf6dc5b" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest131", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg6092/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest131", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:47:39.629Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:47:39.629Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg6092/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest131?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-4510290775640f79df6d784fce80ffaf-07a125281a53a3b3-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "82aa0d86f89cf410013f39b11cce6b7e", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "863", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:50:59 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "fbd6c16f-ae8b-4e60-9fc0-d399956993a9", + "x-ms-ratelimit-remaining-subscription-reads": "11867", + "x-ms-request-id": "fbd6c16f-ae8b-4e60-9fc0-d399956993a9", + "x-ms-routing-request-id": "UKSOUTH:20230707T105100Z:fbd6c16f-ae8b-4e60-9fc0-d399956993a9" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest131", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg6092/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest131", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:47:39.629Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:47:39.629Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg6092/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest131?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-4510290775640f79df6d784fce80ffaf-79b3f811e41f8e5d-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "f927ee9e056c2e3f93e3d1472de0095e", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "863", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:51:32 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "3604c91f-149d-4fed-9928-27c6b8b3904a", + "x-ms-ratelimit-remaining-subscription-reads": "11866", + "x-ms-request-id": "3604c91f-149d-4fed-9928-27c6b8b3904a", + "x-ms-routing-request-id": "UKSOUTH:20230707T105132Z:3604c91f-149d-4fed-9928-27c6b8b3904a" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest131", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg6092/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest131", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:47:39.629Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:47:39.629Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg6092/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest131?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-4510290775640f79df6d784fce80ffaf-0968de829ad99f4b-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "1fe24e3f733ff470448884c8ab371da8", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "863", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:52:04 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "2ea0c8df-6e7a-48ca-9126-3d04f7ca1267", + "x-ms-ratelimit-remaining-subscription-reads": "11865", + "x-ms-request-id": "2ea0c8df-6e7a-48ca-9126-3d04f7ca1267", + "x-ms-routing-request-id": "UKSOUTH:20230707T105204Z:2ea0c8df-6e7a-48ca-9126-3d04f7ca1267" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest131", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg6092/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest131", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:47:39.629Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:47:39.629Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg6092/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest131?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-4510290775640f79df6d784fce80ffaf-a28e4f67578cfb9d-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "dc13b8ee5d5a80a8cd7cefb826c8c720", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "863", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:52:36 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "8a2fd579-f750-4b8d-8ae9-217e8d4813a6", + "x-ms-ratelimit-remaining-subscription-reads": "11864", + "x-ms-request-id": "8a2fd579-f750-4b8d-8ae9-217e8d4813a6", + "x-ms-routing-request-id": "UKSOUTH:20230707T105237Z:8a2fd579-f750-4b8d-8ae9-217e8d4813a6" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest131", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg6092/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest131", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:47:39.629Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:47:39.629Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg6092/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest131?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-4510290775640f79df6d784fce80ffaf-6b668c002f4a3753-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "cd72db364beb2b3f7d33b4e38077825b", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "863", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:53:08 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "90475cfd-46b8-4ccb-9cdc-5e22a8c2f63b", + "x-ms-ratelimit-remaining-subscription-reads": "11863", + "x-ms-request-id": "90475cfd-46b8-4ccb-9cdc-5e22a8c2f63b", + "x-ms-routing-request-id": "UKSOUTH:20230707T105309Z:90475cfd-46b8-4ccb-9cdc-5e22a8c2f63b" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest131", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg6092/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest131", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:47:39.629Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:47:39.629Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg6092/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest131?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-4510290775640f79df6d784fce80ffaf-e42073f9c560e38c-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "745929c52dcde104a66151c283b8ce7c", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1165", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:53:40 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "064772c7-24bb-40ed-abe7-b3a46c3d61c1", + "x-ms-ratelimit-remaining-subscription-reads": "11862", + "x-ms-request-id": "064772c7-24bb-40ed-abe7-b3a46c3d61c1", + "x-ms-routing-request-id": "UKSOUTH:20230707T105341Z:064772c7-24bb-40ed-abe7-b3a46c3d61c1" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest131", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg6092/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest131", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [ + { + "fqdn": "hsm1.cloudhsmsdktest131-d9hcechcfnewbfdt.cloudhsm.azure.net", + "state": "InitialProvisioning" + }, + { + "fqdn": "hsm2.cloudhsmsdktest131-d9hcechcfnewbfdt.cloudhsm.azure.net", + "state": "InitialProvisioning" + }, + { + "fqdn": "hsm3.cloudhsmsdktest131-d9hcechcfnewbfdt.cloudhsm.azure.net", + "state": "InitialProvisioning" + } + ], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:47:39.629Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:47:39.629Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg6092/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest131?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-4510290775640f79df6d784fce80ffaf-f37a7f98eab6ec76-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "d09264c050c5a3bc79e75e27a9c40056", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1165", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:54:13 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "71350bb2-b970-4f20-98bd-1675af8cdd3d", + "x-ms-ratelimit-remaining-subscription-reads": "11861", + "x-ms-request-id": "71350bb2-b970-4f20-98bd-1675af8cdd3d", + "x-ms-routing-request-id": "UKSOUTH:20230707T105413Z:71350bb2-b970-4f20-98bd-1675af8cdd3d" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest131", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg6092/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest131", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [ + { + "fqdn": "hsm1.cloudhsmsdktest131-d9hcechcfnewbfdt.cloudhsm.azure.net", + "state": "InitialProvisioning" + }, + { + "fqdn": "hsm2.cloudhsmsdktest131-d9hcechcfnewbfdt.cloudhsm.azure.net", + "state": "InitialProvisioning" + }, + { + "fqdn": "hsm3.cloudhsmsdktest131-d9hcechcfnewbfdt.cloudhsm.azure.net", + "state": "InitialProvisioning" + } + ], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:47:39.629Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:47:39.629Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg6092/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest131?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-4510290775640f79df6d784fce80ffaf-ee2308851eb42f72-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "fcf293f9526e0852d690278af97ca8c5", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1154", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:54:45 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "790d4ae8-1d45-4adc-85db-311c06d9e7ce", + "x-ms-ratelimit-remaining-subscription-reads": "11860", + "x-ms-request-id": "790d4ae8-1d45-4adc-85db-311c06d9e7ce", + "x-ms-routing-request-id": "UKSOUTH:20230707T105446Z:790d4ae8-1d45-4adc-85db-311c06d9e7ce" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest131", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg6092/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest131", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [ + { + "fqdn": "hsm1.cloudhsmsdktest131-d9hcechcfnewbfdt.cloudhsm.azure.net", + "state": "Starting" + }, + { + "fqdn": "hsm2.cloudhsmsdktest131-d9hcechcfnewbfdt.cloudhsm.azure.net", + "state": "InitialProvisioning" + }, + { + "fqdn": "hsm3.cloudhsmsdktest131-d9hcechcfnewbfdt.cloudhsm.azure.net", + "state": "InitialProvisioning" + } + ], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:47:39.629Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:47:39.629Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg6092/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest131?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-4510290775640f79df6d784fce80ffaf-ea790a2853a67074-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "1c233864b1e475956db6fbe5cedd38e2", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1132", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:55:18 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "a55dfd83-f09e-4b08-8b5b-feae59a3b6e3", + "x-ms-ratelimit-remaining-subscription-reads": "11859", + "x-ms-request-id": "a55dfd83-f09e-4b08-8b5b-feae59a3b6e3", + "x-ms-routing-request-id": "UKSOUTH:20230707T105518Z:a55dfd83-f09e-4b08-8b5b-feae59a3b6e3" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest131", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg6092/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest131", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [ + { + "fqdn": "hsm1.cloudhsmsdktest131-d9hcechcfnewbfdt.cloudhsm.azure.net", + "state": "Starting" + }, + { + "fqdn": "hsm2.cloudhsmsdktest131-d9hcechcfnewbfdt.cloudhsm.azure.net", + "state": "Starting" + }, + { + "fqdn": "hsm3.cloudhsmsdktest131-d9hcechcfnewbfdt.cloudhsm.azure.net", + "state": "Starting" + } + ], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:47:39.629Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:47:39.629Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg6092/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest131?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-4510290775640f79df6d784fce80ffaf-5e1b441541d5e74d-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "efc9fb61d1c56d0d1189fa342931a9fc", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1132", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:55:50 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "b17aa1cf-7c2b-4b25-9e16-d646c21c5057", + "x-ms-ratelimit-remaining-subscription-reads": "11858", + "x-ms-request-id": "b17aa1cf-7c2b-4b25-9e16-d646c21c5057", + "x-ms-routing-request-id": "UKSOUTH:20230707T105551Z:b17aa1cf-7c2b-4b25-9e16-d646c21c5057" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest131", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg6092/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest131", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [ + { + "fqdn": "hsm1.cloudhsmsdktest131-d9hcechcfnewbfdt.cloudhsm.azure.net", + "state": "Starting" + }, + { + "fqdn": "hsm2.cloudhsmsdktest131-d9hcechcfnewbfdt.cloudhsm.azure.net", + "state": "Starting" + }, + { + "fqdn": "hsm3.cloudhsmsdktest131-d9hcechcfnewbfdt.cloudhsm.azure.net", + "state": "Starting" + } + ], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:47:39.629Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:47:39.629Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg6092/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest131?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-4510290775640f79df6d784fce80ffaf-b6be9cb40c6911ca-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "71c2993fe3a04871fd7c8fb8576d3af9", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1132", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:56:23 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "6e48065e-3ad9-4942-bdf3-ba76452e554f", + "x-ms-ratelimit-remaining-subscription-reads": "11857", + "x-ms-request-id": "6e48065e-3ad9-4942-bdf3-ba76452e554f", + "x-ms-routing-request-id": "UKSOUTH:20230707T105623Z:6e48065e-3ad9-4942-bdf3-ba76452e554f" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest131", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg6092/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest131", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [ + { + "fqdn": "hsm1.cloudhsmsdktest131-d9hcechcfnewbfdt.cloudhsm.azure.net", + "state": "Starting" + }, + { + "fqdn": "hsm2.cloudhsmsdktest131-d9hcechcfnewbfdt.cloudhsm.azure.net", + "state": "Starting" + }, + { + "fqdn": "hsm3.cloudhsmsdktest131-d9hcechcfnewbfdt.cloudhsm.azure.net", + "state": "Starting" + } + ], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:47:39.629Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:47:39.629Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg6092/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest131?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-4510290775640f79df6d784fce80ffaf-a2ce56b656b71939-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "fe294458b8b393ff2ab50b5bb7614c3b", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1132", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:56:55 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "bf6c6508-4b51-40e5-a700-9e1edd22f11f", + "x-ms-ratelimit-remaining-subscription-reads": "11856", + "x-ms-request-id": "bf6c6508-4b51-40e5-a700-9e1edd22f11f", + "x-ms-routing-request-id": "UKSOUTH:20230707T105655Z:bf6c6508-4b51-40e5-a700-9e1edd22f11f" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest131", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg6092/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest131", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [ + { + "fqdn": "hsm1.cloudhsmsdktest131-d9hcechcfnewbfdt.cloudhsm.azure.net", + "state": "Starting" + }, + { + "fqdn": "hsm2.cloudhsmsdktest131-d9hcechcfnewbfdt.cloudhsm.azure.net", + "state": "Starting" + }, + { + "fqdn": "hsm3.cloudhsmsdktest131-d9hcechcfnewbfdt.cloudhsm.azure.net", + "state": "Starting" + } + ], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:47:39.629Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:47:39.629Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg6092/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest131?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-4510290775640f79df6d784fce80ffaf-66b85e45135e9f5e-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "35a5fe0dc61a7d418980f149415516a3", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1132", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:57:27 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "d19f169f-e5ed-4112-bdf8-eb78426891f5", + "x-ms-ratelimit-remaining-subscription-reads": "11855", + "x-ms-request-id": "d19f169f-e5ed-4112-bdf8-eb78426891f5", + "x-ms-routing-request-id": "UKSOUTH:20230707T105728Z:d19f169f-e5ed-4112-bdf8-eb78426891f5" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest131", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg6092/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest131", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [ + { + "fqdn": "hsm1.cloudhsmsdktest131-d9hcechcfnewbfdt.cloudhsm.azure.net", + "state": "Starting" + }, + { + "fqdn": "hsm2.cloudhsmsdktest131-d9hcechcfnewbfdt.cloudhsm.azure.net", + "state": "Starting" + }, + { + "fqdn": "hsm3.cloudhsmsdktest131-d9hcechcfnewbfdt.cloudhsm.azure.net", + "state": "Starting" + } + ], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:47:39.629Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:47:39.629Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg6092/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest131?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-4510290775640f79df6d784fce80ffaf-19d3eb0112bbea9b-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "e4dc014eab088749992e46ebd716909c", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1132", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:57:59 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "c9eec83a-76af-4d89-91e1-b5cf3f0a0722", + "x-ms-ratelimit-remaining-subscription-reads": "11854", + "x-ms-request-id": "c9eec83a-76af-4d89-91e1-b5cf3f0a0722", + "x-ms-routing-request-id": "UKSOUTH:20230707T105800Z:c9eec83a-76af-4d89-91e1-b5cf3f0a0722" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest131", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg6092/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest131", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [ + { + "fqdn": "hsm1.cloudhsmsdktest131-d9hcechcfnewbfdt.cloudhsm.azure.net", + "state": "Starting" + }, + { + "fqdn": "hsm2.cloudhsmsdktest131-d9hcechcfnewbfdt.cloudhsm.azure.net", + "state": "Starting" + }, + { + "fqdn": "hsm3.cloudhsmsdktest131-d9hcechcfnewbfdt.cloudhsm.azure.net", + "state": "Starting" + } + ], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:47:39.629Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:47:39.629Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg6092/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest131?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-4510290775640f79df6d784fce80ffaf-e16524bb6e810d9d-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "58ab543005c791de02ab7532c6b651d5", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1129", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:58:31 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "a3557aba-3649-4071-a9f2-7da6becb8629", + "x-ms-ratelimit-remaining-subscription-reads": "11853", + "x-ms-request-id": "a3557aba-3649-4071-a9f2-7da6becb8629", + "x-ms-routing-request-id": "UKSOUTH:20230707T105832Z:a3557aba-3649-4071-a9f2-7da6becb8629" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest131", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg6092/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest131", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [ + { + "fqdn": "hsm1.cloudhsmsdktest131-d9hcechcfnewbfdt.cloudhsm.azure.net", + "state": "Started" + }, + { + "fqdn": "hsm2.cloudhsmsdktest131-d9hcechcfnewbfdt.cloudhsm.azure.net", + "state": "Started" + }, + { + "fqdn": "hsm3.cloudhsmsdktest131-d9hcechcfnewbfdt.cloudhsm.azure.net", + "state": "Started" + } + ], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:47:39.629Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:47:39.629Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg6092/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest131?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-4510290775640f79df6d784fce80ffaf-5fa652fcaf0b5130-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "b60d679e67846232b51e9bec8056a673", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1126", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:59:04 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "a73e40f6-7d6e-4fc7-837f-a2ba1dcf9714", + "x-ms-ratelimit-remaining-subscription-reads": "11852", + "x-ms-request-id": "a73e40f6-7d6e-4fc7-837f-a2ba1dcf9714", + "x-ms-routing-request-id": "UKSOUTH:20230707T105904Z:a73e40f6-7d6e-4fc7-837f-a2ba1dcf9714" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest131", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg6092/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest131", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Succeeded", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [ + { + "fqdn": "hsm1.cloudhsmsdktest131-d9hcechcfnewbfdt.cloudhsm.azure.net", + "state": "Started" + }, + { + "fqdn": "hsm2.cloudhsmsdktest131-d9hcechcfnewbfdt.cloudhsm.azure.net", + "state": "Started" + }, + { + "fqdn": "hsm3.cloudhsmsdktest131-d9hcechcfnewbfdt.cloudhsm.azure.net", + "state": "Started" + } + ], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:47:39.629Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:47:39.629Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg6092/providers/Microsoft.Network/virtualNetworks/pe-vnet-2432?api-version=2021-02-01", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "260", + "Content-Type": "application/json", + "traceparent": "00-52abecdac383d12ad4a3786b6a854a5d-62c4a4dcecb7ef6c-00", + "User-Agent": "azsdk-net-ResourceManager.Network/1.1.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "dcbda9ec2249e24a5d3516c0e3dc714c", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "location": "ukwest", + "properties": { + "addressSpace": { + "addressPrefixes": [ + "10.0.0.0/16" + ] + }, + "dhcpOptions": { + "dnsServers": [ + "10.1.1.1", + "10.1.2.4" + ] + }, + "subnets": [ + { + "name": "default", + "properties": { + "addressPrefix": "10.0.1.0/24", + "privateEndpointNetworkPolicies": "Disabled" + } + } + ] + } + }, + "StatusCode": 201, + "ResponseHeaders": { + "azure-asyncnotification": "Enabled", + "azure-asyncoperation": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/providers/Microsoft.Network/locations/ukwest/operations/355b9a7a-2827-447d-a52d-21d608d11f77?api-version=2021-02-01", + "Cache-Control": "no-cache", + "Content-Length": "1337", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:59:05 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Retry-After": "3", + "Server": [ + "Microsoft-HTTPAPI/2.0", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-arm-service-request-id": "722c9f3f-e7e4-480d-8970-8744815c56e9", + "x-ms-client-request-id": "dcbda9ec2249e24a5d3516c0e3dc714c", + "x-ms-correlation-request-id": "1e0a7398-09e0-4be5-8777-3c9be12c750f", + "x-ms-ratelimit-remaining-subscription-writes": "1184", + "x-ms-request-id": "355b9a7a-2827-447d-a52d-21d608d11f77", + "x-ms-routing-request-id": "UKSOUTH:20230707T105905Z:1e0a7398-09e0-4be5-8777-3c9be12c750f" + }, + "ResponseBody": { + "name": "pe-vnet-2432", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg6092/providers/Microsoft.Network/virtualNetworks/pe-vnet-2432", + "etag": "W/\u00221c5ec8dc-6097-46c6-ab9d-7340f89fc0aa\u0022", + "type": "Microsoft.Network/virtualNetworks", + "location": "ukwest", + "properties": { + "provisioningState": "Updating", + "resourceGuid": "6ce3774c-07f8-4dae-b694-421f083b445e", + "addressSpace": { + "addressPrefixes": [ + "10.0.0.0/16" + ] + }, + "dhcpOptions": { + "dnsServers": [ + "10.1.1.1", + "10.1.2.4" + ] + }, + "subnets": [ + { + "name": "default", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg6092/providers/Microsoft.Network/virtualNetworks/pe-vnet-2432/subnets/default", + "etag": "W/\u00221c5ec8dc-6097-46c6-ab9d-7340f89fc0aa\u0022", + "properties": { + "provisioningState": "Updating", + "addressPrefix": "10.0.1.0/24", + "delegations": [], + "privateEndpointNetworkPolicies": "Disabled", + "privateLinkServiceNetworkPolicies": "Enabled" + }, + "type": "Microsoft.Network/virtualNetworks/subnets" + } + ], + "virtualNetworkPeerings": [], + "enableDdosProtection": false + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/providers/Microsoft.Network/locations/ukwest/operations/355b9a7a-2827-447d-a52d-21d608d11f77?api-version=2021-02-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-52abecdac383d12ad4a3786b6a854a5d-4f787b99ff93ec7c-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "2b659d718be093c33a85d52c9f5db70f", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "30", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:59:05 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Retry-After": "10", + "Server": [ + "Microsoft-HTTPAPI/2.0", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-arm-service-request-id": "eef03e2d-51d0-4c21-8e1b-0f0803f3a633", + "x-ms-client-request-id": "2b659d718be093c33a85d52c9f5db70f", + "x-ms-correlation-request-id": "6b1ab448-9bb8-4b0d-b1a6-fb0de9748212", + "x-ms-ratelimit-remaining-subscription-reads": "11851", + "x-ms-request-id": "34159c0a-15fb-4aba-953f-76e59917098a", + "x-ms-routing-request-id": "UKSOUTH:20230707T105905Z:6b1ab448-9bb8-4b0d-b1a6-fb0de9748212" + }, + "ResponseBody": { + "status": "InProgress" + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/providers/Microsoft.Network/locations/ukwest/operations/355b9a7a-2827-447d-a52d-21d608d11f77?api-version=2021-02-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-52abecdac383d12ad4a3786b6a854a5d-822815a142e81bcf-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "6a35090e3c15ca4f601a33de30383557", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "29", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:59:15 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": [ + "Microsoft-HTTPAPI/2.0", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-arm-service-request-id": "e39e49be-2d0a-4eaa-ac0a-3049ba22a52b", + "x-ms-client-request-id": "6a35090e3c15ca4f601a33de30383557", + "x-ms-correlation-request-id": "3e9457c5-343e-4b02-a48f-cf2e5c5b8d18", + "x-ms-ratelimit-remaining-subscription-reads": "11850", + "x-ms-request-id": "5dbcea54-78cd-4a73-85ed-95c6836149ca", + "x-ms-routing-request-id": "UKSOUTH:20230707T105916Z:3e9457c5-343e-4b02-a48f-cf2e5c5b8d18" + }, + "ResponseBody": { + "status": "Succeeded" + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg6092/providers/Microsoft.Network/virtualNetworks/pe-vnet-2432?api-version=2021-02-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-52abecdac383d12ad4a3786b6a854a5d-98f050c6412b3145-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "464fd3334577e46b4446dd434c1c034b", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1339", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:59:16 GMT", + "ETag": "W/\u00225867abd2-c45e-426a-a1eb-edce5f1dbacf\u0022", + "Expires": "-1", + "Pragma": "no-cache", + "Server": [ + "Microsoft-HTTPAPI/2.0", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-arm-service-request-id": "e8e14ef4-b5a2-4d5a-8900-fca60a03176c", + "x-ms-client-request-id": "464fd3334577e46b4446dd434c1c034b", + "x-ms-correlation-request-id": "04446c49-226b-412e-b3ba-215e33999dfb", + "x-ms-ratelimit-remaining-subscription-reads": "11849", + "x-ms-request-id": "94b082e6-1691-4745-af0d-1ddfc247e6a3", + "x-ms-routing-request-id": "UKSOUTH:20230707T105917Z:04446c49-226b-412e-b3ba-215e33999dfb" + }, + "ResponseBody": { + "name": "pe-vnet-2432", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg6092/providers/Microsoft.Network/virtualNetworks/pe-vnet-2432", + "etag": "W/\u00225867abd2-c45e-426a-a1eb-edce5f1dbacf\u0022", + "type": "Microsoft.Network/virtualNetworks", + "location": "ukwest", + "properties": { + "provisioningState": "Succeeded", + "resourceGuid": "6ce3774c-07f8-4dae-b694-421f083b445e", + "addressSpace": { + "addressPrefixes": [ + "10.0.0.0/16" + ] + }, + "dhcpOptions": { + "dnsServers": [ + "10.1.1.1", + "10.1.2.4" + ] + }, + "subnets": [ + { + "name": "default", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg6092/providers/Microsoft.Network/virtualNetworks/pe-vnet-2432/subnets/default", + "etag": "W/\u00225867abd2-c45e-426a-a1eb-edce5f1dbacf\u0022", + "properties": { + "provisioningState": "Succeeded", + "addressPrefix": "10.0.1.0/24", + "delegations": [], + "privateEndpointNetworkPolicies": "Disabled", + "privateLinkServiceNetworkPolicies": "Enabled" + }, + "type": "Microsoft.Network/virtualNetworks/subnets" + } + ], + "virtualNetworkPeerings": [], + "enableDdosProtection": false + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg6092/providers/Microsoft.Network/privateEndpoints/pe-8758?api-version=2021-02-01", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "542", + "Content-Type": "application/json", + "traceparent": "00-2eb261371c6216fa1f99191bd7e00960-afb7c1198dc4992f-00", + "User-Agent": "azsdk-net-ResourceManager.Network/1.1.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "a302e3b398cf342c4d9acac658e56201", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "location": "ukwest", + "properties": { + "subnet": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg6092/providers/Microsoft.Network/virtualNetworks/pe-vnet-2432/subnets/default", + "properties": {} + }, + "manualPrivateLinkServiceConnections": [ + { + "name": "pec-6791", + "properties": { + "privateLinkServiceId": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg6092/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest131", + "groupIds": [ + "cloudhsm" + ], + "requestMessage": "SDK testing" + } + } + ] + } + }, + "StatusCode": 201, + "ResponseHeaders": { + "azure-asyncnotification": "Enabled", + "azure-asyncoperation": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/providers/Microsoft.Network/locations/ukwest/operations/34236779-87d9-472e-80aa-18cf05fbe0b3?api-version=2021-02-01", + "Cache-Control": "no-cache", + "Content-Length": "1960", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:59:17 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Retry-After": "10", + "Server": [ + "Microsoft-HTTPAPI/2.0", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-arm-service-request-id": "1d1600f8-7af5-46a8-9fe2-fe29bb4e6995", + "x-ms-client-request-id": "a302e3b398cf342c4d9acac658e56201", + "x-ms-correlation-request-id": "4f470a9c-0f8c-4b87-a2de-4af202ee1c97", + "x-ms-ratelimit-remaining-subscription-writes": "1183", + "x-ms-request-id": "34236779-87d9-472e-80aa-18cf05fbe0b3", + "x-ms-routing-request-id": "UKSOUTH:20230707T105917Z:4f470a9c-0f8c-4b87-a2de-4af202ee1c97" + }, + "ResponseBody": { + "name": "pe-8758", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg6092/providers/Microsoft.Network/privateEndpoints/pe-8758", + "etag": "W/\u00229e73358b-228f-4c2d-9a4b-9062ee8ad60e\u0022", + "type": "Microsoft.Network/privateEndpoints", + "location": "ukwest", + "properties": { + "provisioningState": "Updating", + "resourceGuid": "927e14d4-9198-481c-924c-00d995902ab8", + "privateLinkServiceConnections": [], + "manualPrivateLinkServiceConnections": [ + { + "name": "pec-6791", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg6092/providers/Microsoft.Network/privateEndpoints/pe-8758/manualPrivateLinkServiceConnections/pec-6791", + "etag": "W/\u00229e73358b-228f-4c2d-9a4b-9062ee8ad60e\u0022", + "properties": { + "provisioningState": "Succeeded", + "privateLinkServiceId": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg6092/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest131", + "groupIds": [ + "cloudhsm" + ], + "requestMessage": "SDK testing", + "privateLinkServiceConnectionState": { + "status": "Pending", + "description": "SDK testing", + "actionsRequired": "None" + } + }, + "type": "Microsoft.Network/privateEndpoints/manualPrivateLinkServiceConnections" + } + ], + "subnet": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg6092/providers/Microsoft.Network/virtualNetworks/pe-vnet-2432/subnets/default" + }, + "networkInterfaces": [ + { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg6092/providers/Microsoft.Network/networkInterfaces/pe-8758.nic.5822f672-10ed-4b56-a218-1431292d598c" + } + ], + "customDnsConfigs": [] + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/providers/Microsoft.Network/locations/ukwest/operations/34236779-87d9-472e-80aa-18cf05fbe0b3?api-version=2021-02-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-2eb261371c6216fa1f99191bd7e00960-c7a8d92d67b0675a-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "4d2be71692369b87a71af8dd7ba58c5f", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "30", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:59:18 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Retry-After": "10", + "Server": [ + "Microsoft-HTTPAPI/2.0", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-arm-service-request-id": "8731f9b1-1552-4a18-8497-7b29baa96e64", + "x-ms-client-request-id": "4d2be71692369b87a71af8dd7ba58c5f", + "x-ms-correlation-request-id": "9f2b1167-5504-4314-a80d-c72d0041e1ae", + "x-ms-ratelimit-remaining-subscription-reads": "11848", + "x-ms-request-id": "73e04d2b-7e32-4314-b407-3874ba7c69d5", + "x-ms-routing-request-id": "UKSOUTH:20230707T105918Z:9f2b1167-5504-4314-a80d-c72d0041e1ae" + }, + "ResponseBody": { + "status": "InProgress" + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/providers/Microsoft.Network/locations/ukwest/operations/34236779-87d9-472e-80aa-18cf05fbe0b3?api-version=2021-02-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-2eb261371c6216fa1f99191bd7e00960-34cb55d73620bb12-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "cef3dce43823423c4b39057e735dd541", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "30", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:59:28 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Retry-After": "20", + "Server": [ + "Microsoft-HTTPAPI/2.0", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-arm-service-request-id": "92ff6a91-6347-4845-8d8d-80464cc2ea29", + "x-ms-client-request-id": "cef3dce43823423c4b39057e735dd541", + "x-ms-correlation-request-id": "0ced9749-c390-4b3d-b20b-2aa74e377259", + "x-ms-ratelimit-remaining-subscription-reads": "11847", + "x-ms-request-id": "9691e3d3-1b05-47d6-91fa-de113723b3a0", + "x-ms-routing-request-id": "UKSOUTH:20230707T105929Z:0ced9749-c390-4b3d-b20b-2aa74e377259" + }, + "ResponseBody": { + "status": "InProgress" + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/providers/Microsoft.Network/locations/ukwest/operations/34236779-87d9-472e-80aa-18cf05fbe0b3?api-version=2021-02-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-2eb261371c6216fa1f99191bd7e00960-69daa69683b75d57-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "70af861c14b9bdcbf65d24f478b94df7", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "29", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:59:48 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": [ + "Microsoft-HTTPAPI/2.0", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-arm-service-request-id": "e0827ff2-32bd-4854-bd86-0425845352a3", + "x-ms-client-request-id": "70af861c14b9bdcbf65d24f478b94df7", + "x-ms-correlation-request-id": "b1e0b61b-f13c-4327-a009-4d3c3b9bb4a5", + "x-ms-ratelimit-remaining-subscription-reads": "11846", + "x-ms-request-id": "76b55772-173b-40df-a24f-bc19d402f852", + "x-ms-routing-request-id": "UKSOUTH:20230707T105949Z:b1e0b61b-f13c-4327-a009-4d3c3b9bb4a5" + }, + "ResponseBody": { + "status": "Succeeded" + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg6092/providers/Microsoft.Network/privateEndpoints/pe-8758?api-version=2021-02-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-2eb261371c6216fa1f99191bd7e00960-30d8a4449a2a6e03-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "82eac5c4af18de20aae901fc8c092849", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "2440", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:59:49 GMT", + "ETag": "W/\u002276e1f0ea-24d8-48c6-b13b-3f1b8993f7ad\u0022", + "Expires": "-1", + "Pragma": "no-cache", + "Server": [ + "Microsoft-HTTPAPI/2.0", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-arm-service-request-id": "46d728df-6dd3-4033-b889-7e66b664f81a", + "x-ms-client-request-id": "82eac5c4af18de20aae901fc8c092849", + "x-ms-correlation-request-id": "fae8d8d5-37fc-4555-a480-c96cb8effccf", + "x-ms-ratelimit-remaining-subscription-reads": "11845", + "x-ms-request-id": "999e5ea1-988d-4757-aca6-45b78ba7b808", + "x-ms-routing-request-id": "UKSOUTH:20230707T105950Z:fae8d8d5-37fc-4555-a480-c96cb8effccf" + }, + "ResponseBody": { + "name": "pe-8758", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg6092/providers/Microsoft.Network/privateEndpoints/pe-8758", + "etag": "W/\u002276e1f0ea-24d8-48c6-b13b-3f1b8993f7ad\u0022", + "type": "Microsoft.Network/privateEndpoints", + "location": "ukwest", + "properties": { + "provisioningState": "Succeeded", + "resourceGuid": "927e14d4-9198-481c-924c-00d995902ab8", + "privateLinkServiceConnections": [], + "manualPrivateLinkServiceConnections": [ + { + "name": "pec-6791", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg6092/providers/Microsoft.Network/privateEndpoints/pe-8758/manualPrivateLinkServiceConnections/pec-6791", + "etag": "W/\u002276e1f0ea-24d8-48c6-b13b-3f1b8993f7ad\u0022", + "properties": { + "provisioningState": "Succeeded", + "privateLinkServiceId": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg6092/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest131", + "groupIds": [ + "cloudhsm" + ], + "requestMessage": "SDK testing", + "privateLinkServiceConnectionState": { + "status": "Pending", + "description": "SDK testing", + "actionsRequired": "None" + } + }, + "type": "Microsoft.Network/privateEndpoints/manualPrivateLinkServiceConnections" + } + ], + "subnet": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg6092/providers/Microsoft.Network/virtualNetworks/pe-vnet-2432/subnets/default" + }, + "networkInterfaces": [ + { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg6092/providers/Microsoft.Network/networkInterfaces/pe-8758.nic.5822f672-10ed-4b56-a218-1431292d598c" + } + ], + "customDnsConfigs": [ + { + "fqdn": "hsm1.cloudhsmsdktest131-d9hcechcfnewbfdt.cloudhsm.azure.net", + "ipAddresses": [ + "10.0.1.4" + ] + }, + { + "fqdn": "hsm2.cloudhsmsdktest131-d9hcechcfnewbfdt.cloudhsm.azure.net", + "ipAddresses": [ + "10.0.1.5" + ] + }, + { + "fqdn": "hsm3.cloudhsmsdktest131-d9hcechcfnewbfdt.cloudhsm.azure.net", + "ipAddresses": [ + "10.0.1.6" + ] + } + ] + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg6092/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest131/privateEndpointConnections?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "User-Agent": "azsdk-net-ResourceManager.HardwareSecurityModules/1.0.0-alpha.20230707.1 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "f4c0b6441bf6cfa61136d8c51448c992", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "678", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:59:49 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "4f286f2f-7378-458a-9e5e-b061337bd23f", + "x-ms-ratelimit-remaining-subscription-reads": "11844", + "x-ms-request-id": "4f286f2f-7378-458a-9e5e-b061337bd23f", + "x-ms-routing-request-id": "UKSOUTH:20230707T105950Z:4f286f2f-7378-458a-9e5e-b061337bd23f" + }, + "ResponseBody": { + "value": [ + { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg6092/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest131/privateEndpointConnections/pec-6791", + "name": "pec-6791", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters/privateEndpointConnections", + "etag": null, + "properties": { + "provisioningState": "SUCCEEDED", + "groupIds": [ + "cloudhsm" + ], + "privateEndpoint": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg6092/providers/Microsoft.Network/privateEndpoints/pe-8758" + }, + "privateLinkServiceConnectionState": { + "status": "Pending", + "description": "SDK testing", + "actionsRequired": "None" + } + } + } + ] + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg6092/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest131/privateEndpointConnections/pec-6791?api-version=2022-08-31-preview", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "115", + "Content-Type": "application/json", + "traceparent": "00-77d5a890e5fc18e266bd128bfbd7d963-c08c0f22e7d36141-00", + "User-Agent": "azsdk-net-ResourceManager.HardwareSecurityModules/1.0.0-alpha.20230707.1 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "adb90eeb52736c2966d0c5cf12ce30ec", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "properties": { + "privateLinkServiceConnectionState": { + "status": "Approved", + "description": "Approve by sdk test case" + } + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg6092/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest131/privateEndpointConnections/pec-6791?api-version=2022-08-31-preview\u0026chsm-operation=eyJjb2RlIjoicHJpdmF0ZUVuZHBvaW50Q29ubmVjdGlvbnMvYXBwcm92ZSIsInN0IjoiMjAyMy0wNy0wN1QxMDo1OTo1MS4xNDg1MzQ4WiIsImV0YWciOiJjYWY4YmIyODA5ZDY0NmZmOTA1ODg2NmMzYzZjNDUzMiJ9", + "Cache-Control": "no-cache", + "Content-Length": "709", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:59:50 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "8e73138a-8ac7-4632-8b5a-68a60dc5b282", + "x-ms-ratelimit-remaining-subscription-writes": "1182", + "x-ms-request-id": "8e73138a-8ac7-4632-8b5a-68a60dc5b282", + "x-ms-routing-request-id": "UKSOUTH:20230707T105951Z:8e73138a-8ac7-4632-8b5a-68a60dc5b282" + }, + "ResponseBody": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg6092/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest131/privateEndpointConnections/pec-6791", + "name": "pec-6791", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters/privateEndpointConnections", + "etag": "caf8bb2809d646ff9058866c3c6c4532", + "properties": { + "provisioningState": "Updating", + "groupIds": [ + "cloudhsm" + ], + "privateEndpoint": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg6092/providers/Microsoft.Network/privateEndpoints/pe-8758" + }, + "privateLinkServiceConnectionState": { + "status": "Approved", + "description": "Approve by sdk test case", + "actionsRequired": "None" + } + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg6092/providers/Microsoft.Network/privateEndpoints/pe-8758?api-version=2021-02-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-7b8b07ca8f9e8ed16d9983d17499c529-f150cf99876a6071-00", + "User-Agent": "azsdk-net-ResourceManager.Network/1.1.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "c1b0da3559f8a9001e1a71e1d65aca62", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "2454", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:59:50 GMT", + "ETag": "W/\u0022a1bb4e22-bedc-44b7-a825-e2af4f710caa\u0022", + "Expires": "-1", + "Pragma": "no-cache", + "Server": [ + "Microsoft-HTTPAPI/2.0", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-arm-service-request-id": "69409c5a-a788-4971-b611-17a5ed6329d8", + "x-ms-client-request-id": "c1b0da3559f8a9001e1a71e1d65aca62", + "x-ms-correlation-request-id": "3687dc3b-6a1a-4435-80a6-3974edcfe3c0", + "x-ms-ratelimit-remaining-subscription-reads": "11843", + "x-ms-request-id": "1248e47e-51ba-4f87-9389-54f786f093a8", + "x-ms-routing-request-id": "UKSOUTH:20230707T105951Z:3687dc3b-6a1a-4435-80a6-3974edcfe3c0" + }, + "ResponseBody": { + "name": "pe-8758", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg6092/providers/Microsoft.Network/privateEndpoints/pe-8758", + "etag": "W/\u0022a1bb4e22-bedc-44b7-a825-e2af4f710caa\u0022", + "type": "Microsoft.Network/privateEndpoints", + "location": "ukwest", + "properties": { + "provisioningState": "Succeeded", + "resourceGuid": "927e14d4-9198-481c-924c-00d995902ab8", + "privateLinkServiceConnections": [], + "manualPrivateLinkServiceConnections": [ + { + "name": "pec-6791", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg6092/providers/Microsoft.Network/privateEndpoints/pe-8758/manualPrivateLinkServiceConnections/pec-6791", + "etag": "W/\u0022a1bb4e22-bedc-44b7-a825-e2af4f710caa\u0022", + "properties": { + "provisioningState": "Succeeded", + "privateLinkServiceId": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg6092/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest131", + "groupIds": [ + "cloudhsm" + ], + "requestMessage": "SDK testing", + "privateLinkServiceConnectionState": { + "status": "Approved", + "description": "Approve by sdk test case", + "actionsRequired": "None" + } + }, + "type": "Microsoft.Network/privateEndpoints/manualPrivateLinkServiceConnections" + } + ], + "subnet": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg6092/providers/Microsoft.Network/virtualNetworks/pe-vnet-2432/subnets/default" + }, + "networkInterfaces": [ + { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg6092/providers/Microsoft.Network/networkInterfaces/pe-8758.nic.5822f672-10ed-4b56-a218-1431292d598c" + } + ], + "customDnsConfigs": [ + { + "fqdn": "hsm1.cloudhsmsdktest131-d9hcechcfnewbfdt.cloudhsm.azure.net", + "ipAddresses": [ + "10.0.1.4" + ] + }, + { + "fqdn": "hsm2.cloudhsmsdktest131-d9hcechcfnewbfdt.cloudhsm.azure.net", + "ipAddresses": [ + "10.0.1.5" + ] + }, + { + "fqdn": "hsm3.cloudhsmsdktest131-d9hcechcfnewbfdt.cloudhsm.azure.net", + "ipAddresses": [ + "10.0.1.6" + ] + } + ] + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg6092/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest131/privateEndpointConnections/pec-6791?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-001216fbe1c9d45bb530694dc980fd18-03500b227dc99f73-00", + "User-Agent": "azsdk-net-ResourceManager.HardwareSecurityModules/1.0.0-alpha.20230707.1 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "7e106f1f7a50f1d68c538d2656d6bc42", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "709", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:59:50 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "8b5a335b-77c7-49ff-95e2-497a94089b2a", + "x-ms-ratelimit-remaining-subscription-reads": "11842", + "x-ms-request-id": "8b5a335b-77c7-49ff-95e2-497a94089b2a", + "x-ms-routing-request-id": "UKSOUTH:20230707T105951Z:8b5a335b-77c7-49ff-95e2-497a94089b2a" + }, + "ResponseBody": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg6092/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest131/privateEndpointConnections/pec-6791", + "name": "pec-6791", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters/privateEndpointConnections", + "etag": "caf8bb2809d646ff9058866c3c6c4532", + "properties": { + "provisioningState": "Updating", + "groupIds": [ + "cloudhsm" + ], + "privateEndpoint": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg6092/providers/Microsoft.Network/privateEndpoints/pe-8758" + }, + "privateLinkServiceConnectionState": { + "status": "Approved", + "description": "Approve by sdk test case", + "actionsRequired": "None" + } + } + } + } + ], + "Variables": { + "AZURE_AUTHORITY_HOST": "https://login.microsoftonline.com", + "RandomSeed": "977911172", + "RESOURCE_MANAGER_URL": null, + "SUBSCRIPTION_ID": "75e96d09-a291-40e1-a5e6-cda78233d867" + } +} diff --git a/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/tests/SessionRecords/CloudHsmClustersPrivateEndpointConnectionTests/DeletePrivateEndpointConnection.json b/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/tests/SessionRecords/CloudHsmClustersPrivateEndpointConnectionTests/DeletePrivateEndpointConnection.json new file mode 100644 index 000000000000..f8a4a4e98813 --- /dev/null +++ b/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/tests/SessionRecords/CloudHsmClustersPrivateEndpointConnectionTests/DeletePrivateEndpointConnection.json @@ -0,0 +1,2877 @@ +{ + "Entries": [ + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867?api-version=2021-01-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-b87398181d48a1189453afe3f52460ed-ab6e359dfc08ba4b-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "fd3c5b6ceea0d940304c246ede35b50c", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "448", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:24:02 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "a8b43926-41c3-43a0-88a6-0d727054d14f", + "x-ms-ratelimit-remaining-subscription-reads": "11961", + "x-ms-request-id": "a8b43926-41c3-43a0-88a6-0d727054d14f", + "x-ms-routing-request-id": "UKSOUTH:20230707T102402Z:a8b43926-41c3-43a0-88a6-0d727054d14f" + }, + "ResponseBody": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867", + "authorizationSource": "RoleBased", + "managedByTenants": [ + { + "tenantId": "2f4a9838-26b7-47ee-be60-ccc1fdec5953" + } + ], + "subscriptionId": "75e96d09-a291-40e1-a5e6-cda78233d867", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "displayName": "susolank Projects", + "state": "Enabled", + "subscriptionPolicies": { + "locationPlacementId": "Internal_2014-09-01", + "quotaId": "Internal_2014-09-01", + "spendingLimit": "Off" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867?api-version=2021-01-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-9e7ea7abffcef491938996ac56c73632-4aa028669206441a-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "7e7d158f8ae8b1683fb037d266ce237f", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "448", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:24:02 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "27d61c86-5bbe-453d-ae3e-9987ac704de8", + "x-ms-ratelimit-remaining-subscription-reads": "11960", + "x-ms-request-id": "27d61c86-5bbe-453d-ae3e-9987ac704de8", + "x-ms-routing-request-id": "UKSOUTH:20230707T102402Z:27d61c86-5bbe-453d-ae3e-9987ac704de8" + }, + "ResponseBody": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867", + "authorizationSource": "RoleBased", + "managedByTenants": [ + { + "tenantId": "2f4a9838-26b7-47ee-be60-ccc1fdec5953" + } + ], + "subscriptionId": "75e96d09-a291-40e1-a5e6-cda78233d867", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "displayName": "susolank Projects", + "state": "Enabled", + "subscriptionPolicies": { + "locationPlacementId": "Internal_2014-09-01", + "quotaId": "Internal_2014-09-01", + "spendingLimit": "Off" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourcegroups/sdkTestsRg5591?api-version=**", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "21", + "Content-Type": "application/json", + "traceparent": "00-ec32e88a2e0553b0c663cf774ed8a4b2-5af77a2703053480-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "1d8a323517865869830763de5f7941a1", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "location": "ukwest" + }, + "StatusCode": 201, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "225", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:24:03 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "39f95c73-b78c-4332-b5d5-7121b99f1e90", + "x-ms-ratelimit-remaining-subscription-writes": "1194", + "x-ms-request-id": "39f95c73-b78c-4332-b5d5-7121b99f1e90", + "x-ms-routing-request-id": "UKSOUTH:20230707T102403Z:39f95c73-b78c-4332-b5d5-7121b99f1e90" + }, + "ResponseBody": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5591", + "name": "sdkTestsRg5591", + "type": "Microsoft.Resources/resourceGroups", + "location": "ukwest", + "properties": { + "provisioningState": "Succeeded" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5591/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest3167?api-version=2022-08-31-preview", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "152", + "Content-Type": "application/json", + "traceparent": "00-de4784d8526bf975d2dee94da159e668-58331ac219bdd299-00", + "User-Agent": "azsdk-net-ResourceManager.HardwareSecurityModules/1.0.0-alpha.20230707.1 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "b85b77a1f3e1be8befb76e736129a5ec", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "location": "ukwest", + "properties": { + "securityDomain": { + "fipsState": 2 + } + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "865", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:24:08 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "1740e0ae-d59d-4ab9-a08f-d39c45d61f05", + "x-ms-ratelimit-remaining-subscription-writes": "1193", + "x-ms-request-id": "1740e0ae-d59d-4ab9-a08f-d39c45d61f05", + "x-ms-routing-request-id": "UKSOUTH:20230707T102408Z:1740e0ae-d59d-4ab9-a08f-d39c45d61f05" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest3167", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5591/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest3167", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:24:03.578Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:24:03.578Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5591/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest3167?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-de4784d8526bf975d2dee94da159e668-e78a7bff96c700d6-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "0882702f7d27975091c828b1ea10a63a", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "865", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:24:08 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "985d2ccd-2ca5-4e00-b89b-57b26a8b7a7c", + "x-ms-ratelimit-remaining-subscription-reads": "11959", + "x-ms-request-id": "985d2ccd-2ca5-4e00-b89b-57b26a8b7a7c", + "x-ms-routing-request-id": "UKSOUTH:20230707T102408Z:985d2ccd-2ca5-4e00-b89b-57b26a8b7a7c" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest3167", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5591/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest3167", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:24:03.578Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:24:03.578Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5591/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest3167?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-de4784d8526bf975d2dee94da159e668-224e3b1481badc71-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "3ed172394876a3556235535eeeb8ddb8", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "865", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:24:09 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "e5db9c0a-97af-47b1-a516-fc0b66f7aa93", + "x-ms-ratelimit-remaining-subscription-reads": "11958", + "x-ms-request-id": "e5db9c0a-97af-47b1-a516-fc0b66f7aa93", + "x-ms-routing-request-id": "UKSOUTH:20230707T102409Z:e5db9c0a-97af-47b1-a516-fc0b66f7aa93" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest3167", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5591/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest3167", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:24:03.578Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:24:03.578Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5591/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest3167?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-de4784d8526bf975d2dee94da159e668-752788d46f5e822a-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "f0433dc19da62bc4b2935d40d5633b55", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "865", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:24:10 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "c455f9cf-57b5-49c6-aba1-641094e3f6a3", + "x-ms-ratelimit-remaining-subscription-reads": "11957", + "x-ms-request-id": "c455f9cf-57b5-49c6-aba1-641094e3f6a3", + "x-ms-routing-request-id": "UKSOUTH:20230707T102411Z:c455f9cf-57b5-49c6-aba1-641094e3f6a3" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest3167", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5591/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest3167", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:24:03.578Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:24:03.578Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5591/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest3167?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-de4784d8526bf975d2dee94da159e668-cf56b3970950afa1-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "6d99caddb765e6ba1bdfa5f22af2a9d9", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "865", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:24:12 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "cda23eb8-ab24-49bf-9eda-975136c8082a", + "x-ms-ratelimit-remaining-subscription-reads": "11956", + "x-ms-request-id": "cda23eb8-ab24-49bf-9eda-975136c8082a", + "x-ms-routing-request-id": "UKSOUTH:20230707T102412Z:cda23eb8-ab24-49bf-9eda-975136c8082a" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest3167", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5591/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest3167", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:24:03.578Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:24:03.578Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5591/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest3167?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-de4784d8526bf975d2dee94da159e668-a487f2154bfd6c41-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "acf06feab5cc9c93aea58be3ea14cdff", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "865", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:24:14 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "03a0af80-8cfe-4525-b329-523ef569ece2", + "x-ms-ratelimit-remaining-subscription-reads": "11955", + "x-ms-request-id": "03a0af80-8cfe-4525-b329-523ef569ece2", + "x-ms-routing-request-id": "UKSOUTH:20230707T102415Z:03a0af80-8cfe-4525-b329-523ef569ece2" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest3167", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5591/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest3167", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:24:03.578Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:24:03.578Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5591/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest3167?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-de4784d8526bf975d2dee94da159e668-b639f5e242320e30-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "2381fdf9701e0952835cd5c7f7d201c0", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "865", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:24:20 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "cecc432a-afdb-481d-b684-3284d1177336", + "x-ms-ratelimit-remaining-subscription-reads": "11954", + "x-ms-request-id": "cecc432a-afdb-481d-b684-3284d1177336", + "x-ms-routing-request-id": "UKSOUTH:20230707T102420Z:cecc432a-afdb-481d-b684-3284d1177336" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest3167", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5591/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest3167", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:24:03.578Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:24:03.578Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5591/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest3167?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-de4784d8526bf975d2dee94da159e668-34d483b943391af3-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "665683e98e73278936fdbebf2cd6fc07", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "865", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:24:28 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "f6aaa76e-edaa-40c8-a198-32e30b0bc674", + "x-ms-ratelimit-remaining-subscription-reads": "11953", + "x-ms-request-id": "f6aaa76e-edaa-40c8-a198-32e30b0bc674", + "x-ms-routing-request-id": "UKSOUTH:20230707T102428Z:f6aaa76e-edaa-40c8-a198-32e30b0bc674" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest3167", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5591/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest3167", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:24:03.578Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:24:03.578Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5591/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest3167?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-de4784d8526bf975d2dee94da159e668-09e5d1a3b149d072-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "2cf8a61185707abb1ce6296fdfcca4db", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "865", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:24:44 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "29d35eab-0677-4059-a810-3f08c731ff22", + "x-ms-ratelimit-remaining-subscription-reads": "11952", + "x-ms-request-id": "29d35eab-0677-4059-a810-3f08c731ff22", + "x-ms-routing-request-id": "UKSOUTH:20230707T102445Z:29d35eab-0677-4059-a810-3f08c731ff22" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest3167", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5591/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest3167", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:24:03.578Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:24:03.578Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5591/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest3167?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-de4784d8526bf975d2dee94da159e668-68a5d7d1e36ea8a9-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "67f9cba466be6a8c7459ed20b193ddac", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "865", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:25:17 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "0124c189-e6b6-49d7-99a1-d518f7a7ddb1", + "x-ms-ratelimit-remaining-subscription-reads": "11951", + "x-ms-request-id": "0124c189-e6b6-49d7-99a1-d518f7a7ddb1", + "x-ms-routing-request-id": "UKSOUTH:20230707T102517Z:0124c189-e6b6-49d7-99a1-d518f7a7ddb1" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest3167", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5591/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest3167", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:24:03.578Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:24:03.578Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5591/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest3167?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-de4784d8526bf975d2dee94da159e668-76fbf9c66a1f1946-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "51b5ce60d4d9644fc8dc498c6519476a", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "865", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:25:48 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "eaa7dada-aec8-4962-825d-63d54ed9a78f", + "x-ms-ratelimit-remaining-subscription-reads": "11950", + "x-ms-request-id": "eaa7dada-aec8-4962-825d-63d54ed9a78f", + "x-ms-routing-request-id": "UKSOUTH:20230707T102549Z:eaa7dada-aec8-4962-825d-63d54ed9a78f" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest3167", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5591/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest3167", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:24:03.578Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:24:03.578Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5591/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest3167?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-de4784d8526bf975d2dee94da159e668-7143a5594535a88e-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "601be35994dcab481a8eb817979ac889", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "865", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:26:21 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "25e2be40-1c45-4dbc-85a5-e109ebc1af2f", + "x-ms-ratelimit-remaining-subscription-reads": "11949", + "x-ms-request-id": "25e2be40-1c45-4dbc-85a5-e109ebc1af2f", + "x-ms-routing-request-id": "UKSOUTH:20230707T102621Z:25e2be40-1c45-4dbc-85a5-e109ebc1af2f" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest3167", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5591/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest3167", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:24:03.578Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:24:03.578Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5591/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest3167?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-de4784d8526bf975d2dee94da159e668-107bf5978289b266-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "110e7d085316cf027b959fe21dff055a", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "865", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:26:53 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "fc99b396-6a4d-4c8d-8024-6e6099abd3a9", + "x-ms-ratelimit-remaining-subscription-reads": "11948", + "x-ms-request-id": "fc99b396-6a4d-4c8d-8024-6e6099abd3a9", + "x-ms-routing-request-id": "UKSOUTH:20230707T102654Z:fc99b396-6a4d-4c8d-8024-6e6099abd3a9" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest3167", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5591/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest3167", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:24:03.578Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:24:03.578Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5591/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest3167?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-de4784d8526bf975d2dee94da159e668-327a7c1207b1d802-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "cec783117c77ccd0850a364b1c38cc2d", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "865", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:27:25 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "57353f3d-2560-4ac2-a6cc-679a0c7e229e", + "x-ms-ratelimit-remaining-subscription-reads": "11947", + "x-ms-request-id": "57353f3d-2560-4ac2-a6cc-679a0c7e229e", + "x-ms-routing-request-id": "UKSOUTH:20230707T102726Z:57353f3d-2560-4ac2-a6cc-679a0c7e229e" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest3167", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5591/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest3167", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:24:03.578Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:24:03.578Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5591/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest3167?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-de4784d8526bf975d2dee94da159e668-e513b4031dcdb8a1-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "e884c013360b0653e04be546f5668e1b", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "865", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:27:58 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "b3c4446b-f437-4450-9c71-df56033911df", + "x-ms-ratelimit-remaining-subscription-reads": "11946", + "x-ms-request-id": "b3c4446b-f437-4450-9c71-df56033911df", + "x-ms-routing-request-id": "UKSOUTH:20230707T102758Z:b3c4446b-f437-4450-9c71-df56033911df" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest3167", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5591/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest3167", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:24:03.578Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:24:03.578Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5591/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest3167?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-de4784d8526bf975d2dee94da159e668-ddd2c6a28a6796ba-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "14055e89fad38c12ac428b0c1cb6b342", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "865", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:28:29 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "36de4496-dbca-467a-bfb6-c17d31f2439f", + "x-ms-ratelimit-remaining-subscription-reads": "11945", + "x-ms-request-id": "36de4496-dbca-467a-bfb6-c17d31f2439f", + "x-ms-routing-request-id": "UKSOUTH:20230707T102830Z:36de4496-dbca-467a-bfb6-c17d31f2439f" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest3167", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5591/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest3167", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:24:03.578Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:24:03.578Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5591/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest3167?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-de4784d8526bf975d2dee94da159e668-4d1c5d97f40dd4de-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "5dce72c91c7bdb4e30c1ed2b9789d71e", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "865", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:29:02 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "031feebd-3b7d-4422-b40c-1b53f7388613", + "x-ms-ratelimit-remaining-subscription-reads": "11944", + "x-ms-request-id": "031feebd-3b7d-4422-b40c-1b53f7388613", + "x-ms-routing-request-id": "UKSOUTH:20230707T102903Z:031feebd-3b7d-4422-b40c-1b53f7388613" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest3167", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5591/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest3167", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:24:03.578Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:24:03.578Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5591/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest3167?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-de4784d8526bf975d2dee94da159e668-957e1006356bd4b8-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "bdc21b7cb8321959adf73bc8aa47e92a", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1170", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:29:34 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "c519497b-64ef-4a63-81b5-1bbba38415f2", + "x-ms-ratelimit-remaining-subscription-reads": "11943", + "x-ms-request-id": "c519497b-64ef-4a63-81b5-1bbba38415f2", + "x-ms-routing-request-id": "UKSOUTH:20230707T102935Z:c519497b-64ef-4a63-81b5-1bbba38415f2" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest3167", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5591/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest3167", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [ + { + "fqdn": "hsm1.cloudhsmsdktest3167-gnfebxajgvhbbfd7.cloudhsm.azure.net", + "state": "InitialProvisioning" + }, + { + "fqdn": "hsm2.cloudhsmsdktest3167-gnfebxajgvhbbfd7.cloudhsm.azure.net", + "state": "InitialProvisioning" + }, + { + "fqdn": "hsm3.cloudhsmsdktest3167-gnfebxajgvhbbfd7.cloudhsm.azure.net", + "state": "InitialProvisioning" + } + ], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:24:03.578Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:24:03.578Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5591/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest3167?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-de4784d8526bf975d2dee94da159e668-76c3443373b102d0-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "827da29730986ca00f2ae3120ce6f523", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1170", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:30:07 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "3b48a29c-04d1-4d1f-9d68-493d533dc7bc", + "x-ms-ratelimit-remaining-subscription-reads": "11942", + "x-ms-request-id": "3b48a29c-04d1-4d1f-9d68-493d533dc7bc", + "x-ms-routing-request-id": "UKSOUTH:20230707T103008Z:3b48a29c-04d1-4d1f-9d68-493d533dc7bc" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest3167", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5591/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest3167", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [ + { + "fqdn": "hsm1.cloudhsmsdktest3167-gnfebxajgvhbbfd7.cloudhsm.azure.net", + "state": "InitialProvisioning" + }, + { + "fqdn": "hsm2.cloudhsmsdktest3167-gnfebxajgvhbbfd7.cloudhsm.azure.net", + "state": "InitialProvisioning" + }, + { + "fqdn": "hsm3.cloudhsmsdktest3167-gnfebxajgvhbbfd7.cloudhsm.azure.net", + "state": "InitialProvisioning" + } + ], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:24:03.578Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:24:03.578Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5591/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest3167?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-de4784d8526bf975d2dee94da159e668-3994f4a452bb736e-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "008f6c6bf6f4111018b5af83e18530e9", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1159", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:30:39 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "25fa0031-011c-4c81-982f-8ffad1c72025", + "x-ms-ratelimit-remaining-subscription-reads": "11941", + "x-ms-request-id": "25fa0031-011c-4c81-982f-8ffad1c72025", + "x-ms-routing-request-id": "UKSOUTH:20230707T103040Z:25fa0031-011c-4c81-982f-8ffad1c72025" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest3167", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5591/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest3167", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [ + { + "fqdn": "hsm1.cloudhsmsdktest3167-gnfebxajgvhbbfd7.cloudhsm.azure.net", + "state": "Starting" + }, + { + "fqdn": "hsm2.cloudhsmsdktest3167-gnfebxajgvhbbfd7.cloudhsm.azure.net", + "state": "InitialProvisioning" + }, + { + "fqdn": "hsm3.cloudhsmsdktest3167-gnfebxajgvhbbfd7.cloudhsm.azure.net", + "state": "InitialProvisioning" + } + ], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:24:03.578Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:24:03.578Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5591/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest3167?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-de4784d8526bf975d2dee94da159e668-0c1ddaa7e1f2d4a5-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "f494c3d7540c4b867b56ad08d4470cc7", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1137", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:31:12 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "60179abd-02af-4c5a-ba9a-f947712c4b42", + "x-ms-ratelimit-remaining-subscription-reads": "11940", + "x-ms-request-id": "60179abd-02af-4c5a-ba9a-f947712c4b42", + "x-ms-routing-request-id": "UKSOUTH:20230707T103112Z:60179abd-02af-4c5a-ba9a-f947712c4b42" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest3167", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5591/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest3167", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [ + { + "fqdn": "hsm1.cloudhsmsdktest3167-gnfebxajgvhbbfd7.cloudhsm.azure.net", + "state": "Starting" + }, + { + "fqdn": "hsm2.cloudhsmsdktest3167-gnfebxajgvhbbfd7.cloudhsm.azure.net", + "state": "Starting" + }, + { + "fqdn": "hsm3.cloudhsmsdktest3167-gnfebxajgvhbbfd7.cloudhsm.azure.net", + "state": "Starting" + } + ], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:24:03.578Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:24:03.578Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5591/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest3167?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-de4784d8526bf975d2dee94da159e668-44b066327bd6ec28-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "3d5d1802e9b7a136926c6ae3811c8a89", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1137", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:31:44 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "11ae329e-e881-47e3-a460-ed2013fa711e", + "x-ms-ratelimit-remaining-subscription-reads": "11939", + "x-ms-request-id": "11ae329e-e881-47e3-a460-ed2013fa711e", + "x-ms-routing-request-id": "UKSOUTH:20230707T103144Z:11ae329e-e881-47e3-a460-ed2013fa711e" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest3167", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5591/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest3167", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [ + { + "fqdn": "hsm1.cloudhsmsdktest3167-gnfebxajgvhbbfd7.cloudhsm.azure.net", + "state": "Starting" + }, + { + "fqdn": "hsm2.cloudhsmsdktest3167-gnfebxajgvhbbfd7.cloudhsm.azure.net", + "state": "Starting" + }, + { + "fqdn": "hsm3.cloudhsmsdktest3167-gnfebxajgvhbbfd7.cloudhsm.azure.net", + "state": "Starting" + } + ], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:24:03.578Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:24:03.578Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5591/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest3167?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-de4784d8526bf975d2dee94da159e668-fc916a190a1bf6de-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "493afaf900521717e644849d48073cd0", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1137", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:32:17 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "30ced9f7-af6b-4049-a4e0-f9342837cf37", + "x-ms-ratelimit-remaining-subscription-reads": "11938", + "x-ms-request-id": "30ced9f7-af6b-4049-a4e0-f9342837cf37", + "x-ms-routing-request-id": "UKSOUTH:20230707T103217Z:30ced9f7-af6b-4049-a4e0-f9342837cf37" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest3167", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5591/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest3167", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [ + { + "fqdn": "hsm1.cloudhsmsdktest3167-gnfebxajgvhbbfd7.cloudhsm.azure.net", + "state": "Starting" + }, + { + "fqdn": "hsm2.cloudhsmsdktest3167-gnfebxajgvhbbfd7.cloudhsm.azure.net", + "state": "Starting" + }, + { + "fqdn": "hsm3.cloudhsmsdktest3167-gnfebxajgvhbbfd7.cloudhsm.azure.net", + "state": "Starting" + } + ], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:24:03.578Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:24:03.578Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5591/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest3167?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-de4784d8526bf975d2dee94da159e668-2f74385a43b2066e-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "c980e7a8f328ee318df2619fe9a3c95e", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1137", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:32:49 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "2c0a811a-b847-49ea-8628-77397fa1564e", + "x-ms-ratelimit-remaining-subscription-reads": "11937", + "x-ms-request-id": "2c0a811a-b847-49ea-8628-77397fa1564e", + "x-ms-routing-request-id": "UKSOUTH:20230707T103249Z:2c0a811a-b847-49ea-8628-77397fa1564e" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest3167", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5591/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest3167", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [ + { + "fqdn": "hsm1.cloudhsmsdktest3167-gnfebxajgvhbbfd7.cloudhsm.azure.net", + "state": "Starting" + }, + { + "fqdn": "hsm2.cloudhsmsdktest3167-gnfebxajgvhbbfd7.cloudhsm.azure.net", + "state": "Starting" + }, + { + "fqdn": "hsm3.cloudhsmsdktest3167-gnfebxajgvhbbfd7.cloudhsm.azure.net", + "state": "Starting" + } + ], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:24:03.578Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:24:03.578Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5591/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest3167?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-de4784d8526bf975d2dee94da159e668-5f496cffd3ca4056-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "d90e23cbc30d0275014657736498598a", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1137", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:33:20 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "918fc353-1f5f-4db9-aaf8-ae13b67dfa4f", + "x-ms-ratelimit-remaining-subscription-reads": "11936", + "x-ms-request-id": "918fc353-1f5f-4db9-aaf8-ae13b67dfa4f", + "x-ms-routing-request-id": "UKSOUTH:20230707T103321Z:918fc353-1f5f-4db9-aaf8-ae13b67dfa4f" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest3167", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5591/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest3167", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [ + { + "fqdn": "hsm1.cloudhsmsdktest3167-gnfebxajgvhbbfd7.cloudhsm.azure.net", + "state": "Starting" + }, + { + "fqdn": "hsm2.cloudhsmsdktest3167-gnfebxajgvhbbfd7.cloudhsm.azure.net", + "state": "Starting" + }, + { + "fqdn": "hsm3.cloudhsmsdktest3167-gnfebxajgvhbbfd7.cloudhsm.azure.net", + "state": "Starting" + } + ], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:24:03.578Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:24:03.578Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5591/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest3167?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-de4784d8526bf975d2dee94da159e668-22d438940d5bd0ef-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "9a3b992fc19c0661c94bbc5f9e772d42", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1137", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:33:53 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "99cbf802-15ed-437c-bbae-b861a72ebf9d", + "x-ms-ratelimit-remaining-subscription-reads": "11935", + "x-ms-request-id": "99cbf802-15ed-437c-bbae-b861a72ebf9d", + "x-ms-routing-request-id": "UKSOUTH:20230707T103354Z:99cbf802-15ed-437c-bbae-b861a72ebf9d" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest3167", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5591/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest3167", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [ + { + "fqdn": "hsm1.cloudhsmsdktest3167-gnfebxajgvhbbfd7.cloudhsm.azure.net", + "state": "Starting" + }, + { + "fqdn": "hsm2.cloudhsmsdktest3167-gnfebxajgvhbbfd7.cloudhsm.azure.net", + "state": "Starting" + }, + { + "fqdn": "hsm3.cloudhsmsdktest3167-gnfebxajgvhbbfd7.cloudhsm.azure.net", + "state": "Starting" + } + ], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:24:03.578Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:24:03.578Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5591/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest3167?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-de4784d8526bf975d2dee94da159e668-f80a787444cc439f-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "24d1257a63f9e4c3717ec7e19bbd8af4", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1134", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:34:25 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "b97f9bde-4bf4-4a03-a361-5c06bd038c7b", + "x-ms-ratelimit-remaining-subscription-reads": "11934", + "x-ms-request-id": "b97f9bde-4bf4-4a03-a361-5c06bd038c7b", + "x-ms-routing-request-id": "UKSOUTH:20230707T103426Z:b97f9bde-4bf4-4a03-a361-5c06bd038c7b" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest3167", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5591/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest3167", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [ + { + "fqdn": "hsm1.cloudhsmsdktest3167-gnfebxajgvhbbfd7.cloudhsm.azure.net", + "state": "Started" + }, + { + "fqdn": "hsm2.cloudhsmsdktest3167-gnfebxajgvhbbfd7.cloudhsm.azure.net", + "state": "Started" + }, + { + "fqdn": "hsm3.cloudhsmsdktest3167-gnfebxajgvhbbfd7.cloudhsm.azure.net", + "state": "Started" + } + ], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:24:03.578Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:24:03.578Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5591/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest3167?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-de4784d8526bf975d2dee94da159e668-4bece3ba64a108ec-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "5070d7992e680ac2c1070fc10716638a", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1131", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:34:58 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "7eaddb0b-f3de-4d4c-bf58-52a65facce9e", + "x-ms-ratelimit-remaining-subscription-reads": "11933", + "x-ms-request-id": "7eaddb0b-f3de-4d4c-bf58-52a65facce9e", + "x-ms-routing-request-id": "UKSOUTH:20230707T103458Z:7eaddb0b-f3de-4d4c-bf58-52a65facce9e" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest3167", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5591/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest3167", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Succeeded", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [ + { + "fqdn": "hsm1.cloudhsmsdktest3167-gnfebxajgvhbbfd7.cloudhsm.azure.net", + "state": "Started" + }, + { + "fqdn": "hsm2.cloudhsmsdktest3167-gnfebxajgvhbbfd7.cloudhsm.azure.net", + "state": "Started" + }, + { + "fqdn": "hsm3.cloudhsmsdktest3167-gnfebxajgvhbbfd7.cloudhsm.azure.net", + "state": "Started" + } + ], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:24:03.578Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:24:03.578Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5591/providers/Microsoft.Network/virtualNetworks/pe-vnet-9746?api-version=2021-02-01", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "260", + "Content-Type": "application/json", + "traceparent": "00-fdcaeb2dce04972e18804d43006f6386-7b8597f9362fe0b5-00", + "User-Agent": "azsdk-net-ResourceManager.Network/1.1.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "9134c63ed5cb29561ef9806b0bc1c7c5", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "location": "ukwest", + "properties": { + "addressSpace": { + "addressPrefixes": [ + "10.0.0.0/16" + ] + }, + "dhcpOptions": { + "dnsServers": [ + "10.1.1.1", + "10.1.2.4" + ] + }, + "subnets": [ + { + "name": "default", + "properties": { + "addressPrefix": "10.0.1.0/24", + "privateEndpointNetworkPolicies": "Disabled" + } + } + ] + } + }, + "StatusCode": 201, + "ResponseHeaders": { + "azure-asyncnotification": "Enabled", + "azure-asyncoperation": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/providers/Microsoft.Network/locations/ukwest/operations/2741559e-3a15-46d7-b0f2-0ad27cae8c25?api-version=2021-02-01", + "Cache-Control": "no-cache", + "Content-Length": "1337", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:34:59 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Retry-After": "3", + "Server": [ + "Microsoft-HTTPAPI/2.0", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-arm-service-request-id": "87dcb193-4077-48d2-ac8c-6c3eeee63561", + "x-ms-client-request-id": "9134c63ed5cb29561ef9806b0bc1c7c5", + "x-ms-correlation-request-id": "3cccb856-cdd6-4215-9978-fb85675601ad", + "x-ms-ratelimit-remaining-subscription-writes": "1192", + "x-ms-request-id": "2741559e-3a15-46d7-b0f2-0ad27cae8c25", + "x-ms-routing-request-id": "UKSOUTH:20230707T103459Z:3cccb856-cdd6-4215-9978-fb85675601ad" + }, + "ResponseBody": { + "name": "pe-vnet-9746", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5591/providers/Microsoft.Network/virtualNetworks/pe-vnet-9746", + "etag": "W/\u0022a4cf3c42-288c-41ba-bf13-3a75e31eabc4\u0022", + "type": "Microsoft.Network/virtualNetworks", + "location": "ukwest", + "properties": { + "provisioningState": "Updating", + "resourceGuid": "8bc74dbf-abc4-4d94-afc3-f54041891489", + "addressSpace": { + "addressPrefixes": [ + "10.0.0.0/16" + ] + }, + "dhcpOptions": { + "dnsServers": [ + "10.1.1.1", + "10.1.2.4" + ] + }, + "subnets": [ + { + "name": "default", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5591/providers/Microsoft.Network/virtualNetworks/pe-vnet-9746/subnets/default", + "etag": "W/\u0022a4cf3c42-288c-41ba-bf13-3a75e31eabc4\u0022", + "properties": { + "provisioningState": "Updating", + "addressPrefix": "10.0.1.0/24", + "delegations": [], + "privateEndpointNetworkPolicies": "Disabled", + "privateLinkServiceNetworkPolicies": "Enabled" + }, + "type": "Microsoft.Network/virtualNetworks/subnets" + } + ], + "virtualNetworkPeerings": [], + "enableDdosProtection": false + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/providers/Microsoft.Network/locations/ukwest/operations/2741559e-3a15-46d7-b0f2-0ad27cae8c25?api-version=2021-02-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-fdcaeb2dce04972e18804d43006f6386-9bd0d4c2e24c1240-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "2d4bc48645657aa41205a410419c03ff", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "30", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:34:59 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Retry-After": "10", + "Server": [ + "Microsoft-HTTPAPI/2.0", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-arm-service-request-id": "8d3adce3-b426-4837-ac8b-4cd319d106a2", + "x-ms-client-request-id": "2d4bc48645657aa41205a410419c03ff", + "x-ms-correlation-request-id": "9b63df70-f934-4caa-8481-29611ca004ec", + "x-ms-ratelimit-remaining-subscription-reads": "11932", + "x-ms-request-id": "c4f38ecd-0758-4451-90d6-1be3bf8f3066", + "x-ms-routing-request-id": "UKSOUTH:20230707T103500Z:9b63df70-f934-4caa-8481-29611ca004ec" + }, + "ResponseBody": { + "status": "InProgress" + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/providers/Microsoft.Network/locations/ukwest/operations/2741559e-3a15-46d7-b0f2-0ad27cae8c25?api-version=2021-02-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-fdcaeb2dce04972e18804d43006f6386-a17c78a15618d23d-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "839b503f3b3bdaadffd1a078d279ce02", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "29", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:35:10 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": [ + "Microsoft-HTTPAPI/2.0", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-arm-service-request-id": "f3f20e6d-d9fc-4dd7-8485-b3517afece6b", + "x-ms-client-request-id": "839b503f3b3bdaadffd1a078d279ce02", + "x-ms-correlation-request-id": "92798188-21e9-4c92-aaf9-c933e4c98209", + "x-ms-ratelimit-remaining-subscription-reads": "11931", + "x-ms-request-id": "60a936c0-f35f-4b7f-8a16-8623218e6193", + "x-ms-routing-request-id": "UKSOUTH:20230707T103510Z:92798188-21e9-4c92-aaf9-c933e4c98209" + }, + "ResponseBody": { + "status": "Succeeded" + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5591/providers/Microsoft.Network/virtualNetworks/pe-vnet-9746?api-version=2021-02-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-fdcaeb2dce04972e18804d43006f6386-e7580ce07e03a274-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "47e4b7bb997582606262c745bfb62054", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1339", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:35:10 GMT", + "ETag": "W/\u00224a8fd533-cd29-4011-b4d7-44e7362314a8\u0022", + "Expires": "-1", + "Pragma": "no-cache", + "Server": [ + "Microsoft-HTTPAPI/2.0", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-arm-service-request-id": "a0e2bf3b-8e4d-4dbe-b50e-87a3a7d60fcd", + "x-ms-client-request-id": "47e4b7bb997582606262c745bfb62054", + "x-ms-correlation-request-id": "850681e1-a14e-4ed9-812d-d72ec08d357a", + "x-ms-ratelimit-remaining-subscription-reads": "11930", + "x-ms-request-id": "f21cc2c6-0cac-4465-ae56-7b35e05376ff", + "x-ms-routing-request-id": "UKSOUTH:20230707T103510Z:850681e1-a14e-4ed9-812d-d72ec08d357a" + }, + "ResponseBody": { + "name": "pe-vnet-9746", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5591/providers/Microsoft.Network/virtualNetworks/pe-vnet-9746", + "etag": "W/\u00224a8fd533-cd29-4011-b4d7-44e7362314a8\u0022", + "type": "Microsoft.Network/virtualNetworks", + "location": "ukwest", + "properties": { + "provisioningState": "Succeeded", + "resourceGuid": "8bc74dbf-abc4-4d94-afc3-f54041891489", + "addressSpace": { + "addressPrefixes": [ + "10.0.0.0/16" + ] + }, + "dhcpOptions": { + "dnsServers": [ + "10.1.1.1", + "10.1.2.4" + ] + }, + "subnets": [ + { + "name": "default", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5591/providers/Microsoft.Network/virtualNetworks/pe-vnet-9746/subnets/default", + "etag": "W/\u00224a8fd533-cd29-4011-b4d7-44e7362314a8\u0022", + "properties": { + "provisioningState": "Succeeded", + "addressPrefix": "10.0.1.0/24", + "delegations": [], + "privateEndpointNetworkPolicies": "Disabled", + "privateLinkServiceNetworkPolicies": "Enabled" + }, + "type": "Microsoft.Network/virtualNetworks/subnets" + } + ], + "virtualNetworkPeerings": [], + "enableDdosProtection": false + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5591/providers/Microsoft.Network/privateEndpoints/pe-2056?api-version=2021-02-01", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "542", + "Content-Type": "application/json", + "traceparent": "00-659e3ad96ba82dcb82d24575465f14fe-30f6cb1c3d8a934a-00", + "User-Agent": "azsdk-net-ResourceManager.Network/1.1.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "0a9d034fba7f4a8c17712e93a52ca798", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "location": "ukwest", + "properties": { + "subnet": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5591/providers/Microsoft.Network/virtualNetworks/pe-vnet-9746/subnets/default", + "properties": {} + }, + "manualPrivateLinkServiceConnections": [ + { + "name": "pec-896", + "properties": { + "privateLinkServiceId": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5591/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest3167", + "groupIds": [ + "cloudhsm" + ], + "requestMessage": "SDK testing" + } + } + ] + } + }, + "StatusCode": 201, + "ResponseHeaders": { + "azure-asyncnotification": "Enabled", + "azure-asyncoperation": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/providers/Microsoft.Network/locations/ukwest/operations/1c85d105-5313-4086-b4e9-753d17f4e9e0?api-version=2021-02-01", + "Cache-Control": "no-cache", + "Content-Length": "1959", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:35:11 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Retry-After": "10", + "Server": [ + "Microsoft-HTTPAPI/2.0", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-arm-service-request-id": "f043b8fa-43af-4eca-b342-0965d7e16998", + "x-ms-client-request-id": "0a9d034fba7f4a8c17712e93a52ca798", + "x-ms-correlation-request-id": "2d758599-7b73-422e-93df-9e1fff3c8e7b", + "x-ms-ratelimit-remaining-subscription-writes": "1191", + "x-ms-request-id": "1c85d105-5313-4086-b4e9-753d17f4e9e0", + "x-ms-routing-request-id": "UKSOUTH:20230707T103512Z:2d758599-7b73-422e-93df-9e1fff3c8e7b" + }, + "ResponseBody": { + "name": "pe-2056", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5591/providers/Microsoft.Network/privateEndpoints/pe-2056", + "etag": "W/\u00227d16a58a-503a-41f4-91b5-13e313e83466\u0022", + "type": "Microsoft.Network/privateEndpoints", + "location": "ukwest", + "properties": { + "provisioningState": "Updating", + "resourceGuid": "7ad8f37d-2c75-4dac-8bb7-52df0abda5c0", + "privateLinkServiceConnections": [], + "manualPrivateLinkServiceConnections": [ + { + "name": "pec-896", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5591/providers/Microsoft.Network/privateEndpoints/pe-2056/manualPrivateLinkServiceConnections/pec-896", + "etag": "W/\u00227d16a58a-503a-41f4-91b5-13e313e83466\u0022", + "properties": { + "provisioningState": "Succeeded", + "privateLinkServiceId": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5591/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest3167", + "groupIds": [ + "cloudhsm" + ], + "requestMessage": "SDK testing", + "privateLinkServiceConnectionState": { + "status": "Pending", + "description": "SDK testing", + "actionsRequired": "None" + } + }, + "type": "Microsoft.Network/privateEndpoints/manualPrivateLinkServiceConnections" + } + ], + "subnet": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5591/providers/Microsoft.Network/virtualNetworks/pe-vnet-9746/subnets/default" + }, + "networkInterfaces": [ + { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5591/providers/Microsoft.Network/networkInterfaces/pe-2056.nic.0d8d8f38-ba4b-45a6-b127-280a9e98d5d2" + } + ], + "customDnsConfigs": [] + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/providers/Microsoft.Network/locations/ukwest/operations/1c85d105-5313-4086-b4e9-753d17f4e9e0?api-version=2021-02-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-659e3ad96ba82dcb82d24575465f14fe-832711d7c1b51d26-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "cf284bb0c3dc01832a9930046bcddc35", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "30", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:35:12 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Retry-After": "10", + "Server": [ + "Microsoft-HTTPAPI/2.0", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-arm-service-request-id": "b4b45003-a9f9-48cc-8d56-510d8d4c240e", + "x-ms-client-request-id": "cf284bb0c3dc01832a9930046bcddc35", + "x-ms-correlation-request-id": "d6e7d0aa-c205-49bc-b132-0e89c6e38cf3", + "x-ms-ratelimit-remaining-subscription-reads": "11929", + "x-ms-request-id": "b072686e-5fd1-49c3-8586-d91467b2ca6f", + "x-ms-routing-request-id": "UKSOUTH:20230707T103512Z:d6e7d0aa-c205-49bc-b132-0e89c6e38cf3" + }, + "ResponseBody": { + "status": "InProgress" + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/providers/Microsoft.Network/locations/ukwest/operations/1c85d105-5313-4086-b4e9-753d17f4e9e0?api-version=2021-02-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-659e3ad96ba82dcb82d24575465f14fe-a5dbe3943163c238-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "1e0e2eba9661939c79f71b6699b3d6af", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "30", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:35:22 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Retry-After": "20", + "Server": [ + "Microsoft-HTTPAPI/2.0", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-arm-service-request-id": "b920eee6-28ea-4b42-aedb-e02d59707ab9", + "x-ms-client-request-id": "1e0e2eba9661939c79f71b6699b3d6af", + "x-ms-correlation-request-id": "f880108c-3e24-4aec-bd28-6919bacd905e", + "x-ms-ratelimit-remaining-subscription-reads": "11928", + "x-ms-request-id": "e8f8ff33-d22c-4cb5-a02e-5640fe2d904f", + "x-ms-routing-request-id": "UKSOUTH:20230707T103522Z:f880108c-3e24-4aec-bd28-6919bacd905e" + }, + "ResponseBody": { + "status": "InProgress" + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/providers/Microsoft.Network/locations/ukwest/operations/1c85d105-5313-4086-b4e9-753d17f4e9e0?api-version=2021-02-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-659e3ad96ba82dcb82d24575465f14fe-fc72f2f0c606adf3-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "59e2e655d80374bc1d545f1e8c843a21", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "29", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:35:42 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": [ + "Microsoft-HTTPAPI/2.0", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-arm-service-request-id": "30a98213-ab70-4f50-9e04-98de4843683f", + "x-ms-client-request-id": "59e2e655d80374bc1d545f1e8c843a21", + "x-ms-correlation-request-id": "f9073b8f-868b-4c2e-82ea-5a145123d94c", + "x-ms-ratelimit-remaining-subscription-reads": "11927", + "x-ms-request-id": "bc9d66d1-9cb5-456a-aa2a-4c3fc2d41a3b", + "x-ms-routing-request-id": "UKSOUTH:20230707T103543Z:f9073b8f-868b-4c2e-82ea-5a145123d94c" + }, + "ResponseBody": { + "status": "Succeeded" + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5591/providers/Microsoft.Network/privateEndpoints/pe-2056?api-version=2021-02-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-659e3ad96ba82dcb82d24575465f14fe-2d4f1627f7815474-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "451eeb3cfd591ae6ae9555e4a71d6776", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "2442", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:35:42 GMT", + "ETag": "W/\u00222e0f72b0-d1c6-4dcd-aabc-ee4f5ada4d8e\u0022", + "Expires": "-1", + "Pragma": "no-cache", + "Server": [ + "Microsoft-HTTPAPI/2.0", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-arm-service-request-id": "f1f93f2d-0f30-4381-b364-7986d2e652bd", + "x-ms-client-request-id": "451eeb3cfd591ae6ae9555e4a71d6776", + "x-ms-correlation-request-id": "59cfe31e-d610-45e6-8987-16932eaab198", + "x-ms-ratelimit-remaining-subscription-reads": "11926", + "x-ms-request-id": "c77cd26c-b11f-45ba-9120-28ee5207fc40", + "x-ms-routing-request-id": "UKSOUTH:20230707T103543Z:59cfe31e-d610-45e6-8987-16932eaab198" + }, + "ResponseBody": { + "name": "pe-2056", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5591/providers/Microsoft.Network/privateEndpoints/pe-2056", + "etag": "W/\u00222e0f72b0-d1c6-4dcd-aabc-ee4f5ada4d8e\u0022", + "type": "Microsoft.Network/privateEndpoints", + "location": "ukwest", + "properties": { + "provisioningState": "Succeeded", + "resourceGuid": "7ad8f37d-2c75-4dac-8bb7-52df0abda5c0", + "privateLinkServiceConnections": [], + "manualPrivateLinkServiceConnections": [ + { + "name": "pec-896", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5591/providers/Microsoft.Network/privateEndpoints/pe-2056/manualPrivateLinkServiceConnections/pec-896", + "etag": "W/\u00222e0f72b0-d1c6-4dcd-aabc-ee4f5ada4d8e\u0022", + "properties": { + "provisioningState": "Succeeded", + "privateLinkServiceId": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5591/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest3167", + "groupIds": [ + "cloudhsm" + ], + "requestMessage": "SDK testing", + "privateLinkServiceConnectionState": { + "status": "Pending", + "description": "SDK testing", + "actionsRequired": "None" + } + }, + "type": "Microsoft.Network/privateEndpoints/manualPrivateLinkServiceConnections" + } + ], + "subnet": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5591/providers/Microsoft.Network/virtualNetworks/pe-vnet-9746/subnets/default" + }, + "networkInterfaces": [ + { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5591/providers/Microsoft.Network/networkInterfaces/pe-2056.nic.0d8d8f38-ba4b-45a6-b127-280a9e98d5d2" + } + ], + "customDnsConfigs": [ + { + "fqdn": "hsm1.cloudhsmsdktest3167-gnfebxajgvhbbfd7.cloudhsm.azure.net", + "ipAddresses": [ + "10.0.1.4" + ] + }, + { + "fqdn": "hsm2.cloudhsmsdktest3167-gnfebxajgvhbbfd7.cloudhsm.azure.net", + "ipAddresses": [ + "10.0.1.5" + ] + }, + { + "fqdn": "hsm3.cloudhsmsdktest3167-gnfebxajgvhbbfd7.cloudhsm.azure.net", + "ipAddresses": [ + "10.0.1.6" + ] + } + ] + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5591/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest3167/privateEndpointConnections?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-a5ee6e574069b85c96305cbfd21f576a-57d1014c38d56e02-00", + "User-Agent": "azsdk-net-ResourceManager.HardwareSecurityModules/1.0.0-alpha.20230707.1 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "85ae80c382ebe2327299000d367e06f5", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "677", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:35:42 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "5424355d-df47-47ae-b9d7-0b10a1148fc0", + "x-ms-ratelimit-remaining-subscription-reads": "11925", + "x-ms-request-id": "5424355d-df47-47ae-b9d7-0b10a1148fc0", + "x-ms-routing-request-id": "UKSOUTH:20230707T103543Z:5424355d-df47-47ae-b9d7-0b10a1148fc0" + }, + "ResponseBody": { + "value": [ + { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5591/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest3167/privateEndpointConnections/pec-896", + "name": "pec-896", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters/privateEndpointConnections", + "etag": null, + "properties": { + "provisioningState": "SUCCEEDED", + "groupIds": [ + "cloudhsm" + ], + "privateEndpoint": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5591/providers/Microsoft.Network/privateEndpoints/pe-2056" + }, + "privateLinkServiceConnectionState": { + "status": "Pending", + "description": "SDK testing", + "actionsRequired": "None" + } + } + } + ] + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5591/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest3167/privateEndpointConnections/pec-896?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-d595bcedc1878bb172056871825069b5-5fb021ae32d7c413-00", + "User-Agent": "azsdk-net-ResourceManager.HardwareSecurityModules/1.0.0-alpha.20230707.1 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "ae29f9bd91955856ffc7aa6e83d7cc00", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "665", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:35:43 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "85d42a07-8b6b-4b1b-b1f1-4ce584ecc2d1", + "x-ms-ratelimit-remaining-subscription-reads": "11924", + "x-ms-request-id": "85d42a07-8b6b-4b1b-b1f1-4ce584ecc2d1", + "x-ms-routing-request-id": "UKSOUTH:20230707T103543Z:85d42a07-8b6b-4b1b-b1f1-4ce584ecc2d1" + }, + "ResponseBody": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5591/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest3167/privateEndpointConnections/pec-896", + "name": "pec-896", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters/privateEndpointConnections", + "etag": null, + "properties": { + "provisioningState": "SUCCEEDED", + "groupIds": [ + "cloudhsm" + ], + "privateEndpoint": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5591/providers/Microsoft.Network/privateEndpoints/pe-2056" + }, + "privateLinkServiceConnectionState": { + "status": "Pending", + "description": "SDK testing", + "actionsRequired": "None" + } + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5591/providers/Microsoft.Network/privateEndpoints/pe-2056?api-version=2021-02-01", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-095e1a72520752335f1ca8c89ab4a9dc-eb16f79040bc0d0a-00", + "User-Agent": "azsdk-net-ResourceManager.Network/1.1.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "0c5ae8ecb4d6b936b93cd2bffcd9e330", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "azure-asyncnotification": "Enabled", + "azure-asyncoperation": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/providers/Microsoft.Network/locations/ukwest/operations/3eace0b0-5cc0-4d68-a751-2d0899cdba01?api-version=2021-02-01", + "Cache-Control": "no-cache", + "Content-Length": "0", + "Date": "Fri, 07 Jul 2023 10:35:43 GMT", + "Expires": "-1", + "Location": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/providers/Microsoft.Network/locations/ukwest/operationResults/3eace0b0-5cc0-4d68-a751-2d0899cdba01?api-version=2021-02-01", + "Pragma": "no-cache", + "Retry-After": "10", + "Server": [ + "Microsoft-HTTPAPI/2.0", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-arm-service-request-id": "88a82b4a-0b36-4b9d-86ee-12eb65ec1493", + "x-ms-client-request-id": "0c5ae8ecb4d6b936b93cd2bffcd9e330", + "x-ms-correlation-request-id": "83e0495d-7214-4b33-a3bb-c8e78b8bdbf1", + "x-ms-ratelimit-remaining-subscription-deletes": "14999", + "x-ms-request-id": "3eace0b0-5cc0-4d68-a751-2d0899cdba01", + "x-ms-routing-request-id": "UKSOUTH:20230707T103544Z:83e0495d-7214-4b33-a3bb-c8e78b8bdbf1" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/providers/Microsoft.Network/locations/ukwest/operations/3eace0b0-5cc0-4d68-a751-2d0899cdba01?api-version=2021-02-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-095e1a72520752335f1ca8c89ab4a9dc-08edcf21dea81959-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "4e21ffcdfa24081ec26ff559be975b26", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "30", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:35:43 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Retry-After": "10", + "Server": [ + "Microsoft-HTTPAPI/2.0", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-arm-service-request-id": "9b7d49d0-e34c-4675-8090-3910a64dc46c", + "x-ms-client-request-id": "4e21ffcdfa24081ec26ff559be975b26", + "x-ms-correlation-request-id": "64bb2da2-063e-47eb-89bf-06b9226281c5", + "x-ms-ratelimit-remaining-subscription-reads": "11923", + "x-ms-request-id": "88af65b1-b659-48f3-8689-72cc40ea4afe", + "x-ms-routing-request-id": "UKSOUTH:20230707T103544Z:64bb2da2-063e-47eb-89bf-06b9226281c5" + }, + "ResponseBody": { + "status": "InProgress" + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/providers/Microsoft.Network/locations/ukwest/operations/3eace0b0-5cc0-4d68-a751-2d0899cdba01?api-version=2021-02-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-095e1a72520752335f1ca8c89ab4a9dc-ef8b3388129eeb0c-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "22df7ae41eaf320d0728e2802e13e1f5", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "29", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:35:53 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": [ + "Microsoft-HTTPAPI/2.0", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-arm-service-request-id": "1264b4cc-e2c2-41d6-b067-6c5fb5aba828", + "x-ms-client-request-id": "22df7ae41eaf320d0728e2802e13e1f5", + "x-ms-correlation-request-id": "854fa465-b98c-45ae-a964-9773c6cfa408", + "x-ms-ratelimit-remaining-subscription-reads": "11922", + "x-ms-request-id": "d06c5c32-76a4-4151-85a8-c705db16356a", + "x-ms-routing-request-id": "UKSOUTH:20230707T103554Z:854fa465-b98c-45ae-a964-9773c6cfa408" + }, + "ResponseBody": { + "status": "Succeeded" + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5591/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest3167/privateEndpointConnections?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-582cbbce0597e5afd1fd8cabb5474b78-b6f5e74066a521b8-00", + "User-Agent": "azsdk-net-ResourceManager.HardwareSecurityModules/1.0.0-alpha.20230707.1 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "fdf136dc95b7940c411eeb84c4877392", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "12", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:35:54 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "f22cb45a-6a51-48a2-87c2-9d76cbf414f1", + "x-ms-ratelimit-remaining-subscription-reads": "11921", + "x-ms-request-id": "f22cb45a-6a51-48a2-87c2-9d76cbf414f1", + "x-ms-routing-request-id": "UKSOUTH:20230707T103555Z:f22cb45a-6a51-48a2-87c2-9d76cbf414f1" + }, + "ResponseBody": { + "value": [] + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5591/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest3167/privateEndpointConnections/pec-896?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-465377d415172b13c54025008819d3f3-b54f0ca3fbffe6c3-00", + "User-Agent": "azsdk-net-ResourceManager.HardwareSecurityModules/1.0.0-alpha.20230707.1 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "5d3e60f93ce3afecf2ee46fb179edaaf", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 404, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "124", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:35:54 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "556114c3-445c-483b-8739-b5a76f8824d6", + "x-ms-ratelimit-remaining-subscription-reads": "11920", + "x-ms-request-id": "556114c3-445c-483b-8739-b5a76f8824d6", + "x-ms-routing-request-id": "UKSOUTH:20230707T103555Z:556114c3-445c-483b-8739-b5a76f8824d6" + }, + "ResponseBody": { + "code": "PrivateEndpointWithGivenConnectionNameNotFound", + "message": "PrivateEndpoint with Connection Name pec-896 not found" + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5591/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest3167/privateEndpointConnections/pec-896?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-260b5fd88a8a8be4a0097404b51e8266-6ad941c39af16285-00", + "User-Agent": "azsdk-net-ResourceManager.HardwareSecurityModules/1.0.0-alpha.20230707.1 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "887cff8d5ea54f6e6e4be19032886e7f", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 404, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "124", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:35:54 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "ff7bceb9-61e3-48ed-90ac-474c7b6f09f2", + "x-ms-ratelimit-remaining-subscription-reads": "11919", + "x-ms-request-id": "ff7bceb9-61e3-48ed-90ac-474c7b6f09f2", + "x-ms-routing-request-id": "UKSOUTH:20230707T103555Z:ff7bceb9-61e3-48ed-90ac-474c7b6f09f2" + }, + "ResponseBody": { + "code": "PrivateEndpointWithGivenConnectionNameNotFound", + "message": "PrivateEndpoint with Connection Name pec-896 not found" + } + } + ], + "Variables": { + "AZURE_AUTHORITY_HOST": "https://login.microsoftonline.com", + "RandomSeed": "535884673", + "RESOURCE_MANAGER_URL": null, + "SUBSCRIPTION_ID": "75e96d09-a291-40e1-a5e6-cda78233d867" + } +} diff --git a/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/tests/SessionRecords/CloudHsmClustersPrivateEndpointConnectionTests/DeletePrivateEndpointConnectionAsync.json b/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/tests/SessionRecords/CloudHsmClustersPrivateEndpointConnectionTests/DeletePrivateEndpointConnectionAsync.json new file mode 100644 index 000000000000..cdc96ed634c8 --- /dev/null +++ b/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/tests/SessionRecords/CloudHsmClustersPrivateEndpointConnectionTests/DeletePrivateEndpointConnectionAsync.json @@ -0,0 +1,2814 @@ +{ + "Entries": [ + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867?api-version=2021-01-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-32f75854b09779c2ceecf3489e397975-630e3cc961db64df-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "d0e5476b23286197858db9c7d1ab54de", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "448", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:59:55 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "f69cf453-42a7-4188-a967-da46838762b8", + "x-ms-ratelimit-remaining-subscription-reads": "11841", + "x-ms-request-id": "f69cf453-42a7-4188-a967-da46838762b8", + "x-ms-routing-request-id": "UKSOUTH:20230707T105956Z:f69cf453-42a7-4188-a967-da46838762b8" + }, + "ResponseBody": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867", + "authorizationSource": "RoleBased", + "managedByTenants": [ + { + "tenantId": "2f4a9838-26b7-47ee-be60-ccc1fdec5953" + } + ], + "subscriptionId": "75e96d09-a291-40e1-a5e6-cda78233d867", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "displayName": "susolank Projects", + "state": "Enabled", + "subscriptionPolicies": { + "locationPlacementId": "Internal_2014-09-01", + "quotaId": "Internal_2014-09-01", + "spendingLimit": "Off" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867?api-version=2021-01-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-52df8799eb0cf2fa8d0898861c7ae6aa-a11e0f89e7b726bd-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "8f1306b7ab9927c8ea6bdd59142f7a1b", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "448", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:59:55 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "f0fb5bc8-0f91-4c42-b1bc-5230e60fe4ed", + "x-ms-ratelimit-remaining-subscription-reads": "11840", + "x-ms-request-id": "f0fb5bc8-0f91-4c42-b1bc-5230e60fe4ed", + "x-ms-routing-request-id": "UKSOUTH:20230707T105956Z:f0fb5bc8-0f91-4c42-b1bc-5230e60fe4ed" + }, + "ResponseBody": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867", + "authorizationSource": "RoleBased", + "managedByTenants": [ + { + "tenantId": "2f4a9838-26b7-47ee-be60-ccc1fdec5953" + } + ], + "subscriptionId": "75e96d09-a291-40e1-a5e6-cda78233d867", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "displayName": "susolank Projects", + "state": "Enabled", + "subscriptionPolicies": { + "locationPlacementId": "Internal_2014-09-01", + "quotaId": "Internal_2014-09-01", + "spendingLimit": "Off" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourcegroups/sdkTestsRg2870?api-version=**", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "21", + "Content-Type": "application/json", + "traceparent": "00-92cfb93c19c36542095b463f19ade83f-69ea41255cf9fde6-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "22398d49482258a2800bced4351baa56", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "location": "ukwest" + }, + "StatusCode": 201, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "225", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:59:56 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "e3e4f43b-a34d-45a4-b865-2928e1d200b2", + "x-ms-ratelimit-remaining-subscription-writes": "1181", + "x-ms-request-id": "e3e4f43b-a34d-45a4-b865-2928e1d200b2", + "x-ms-routing-request-id": "UKSOUTH:20230707T105957Z:e3e4f43b-a34d-45a4-b865-2928e1d200b2" + }, + "ResponseBody": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg2870", + "name": "sdkTestsRg2870", + "type": "Microsoft.Resources/resourceGroups", + "location": "ukwest", + "properties": { + "provisioningState": "Succeeded" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg2870/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest1192?api-version=2022-08-31-preview", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "152", + "Content-Type": "application/json", + "traceparent": "00-cdc98bc3c7539fde2f5ff55561cf253a-430a762809b26c04-00", + "User-Agent": "azsdk-net-ResourceManager.HardwareSecurityModules/1.0.0-alpha.20230707.1 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "925fe7c07fbfe6bdbc463d4c55129e35", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "location": "ukwest", + "properties": { + "securityDomain": { + "fipsState": 2 + } + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "865", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 11:00:01 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "c4d7c96b-3295-4544-bb29-a747bd68f3cd", + "x-ms-ratelimit-remaining-subscription-writes": "1180", + "x-ms-request-id": "c4d7c96b-3295-4544-bb29-a747bd68f3cd", + "x-ms-routing-request-id": "UKSOUTH:20230707T110002Z:c4d7c96b-3295-4544-bb29-a747bd68f3cd" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest1192", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg2870/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest1192", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:59:57.927Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:59:57.927Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg2870/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest1192?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-cdc98bc3c7539fde2f5ff55561cf253a-f1741c4b021604d6-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "34ba83acb631b9ce643c8b5c1a33b5bc", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "865", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 11:00:02 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "d634d03a-2a3a-4082-bd14-340a8c490110", + "x-ms-ratelimit-remaining-subscription-reads": "11839", + "x-ms-request-id": "d634d03a-2a3a-4082-bd14-340a8c490110", + "x-ms-routing-request-id": "UKSOUTH:20230707T110003Z:d634d03a-2a3a-4082-bd14-340a8c490110" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest1192", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg2870/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest1192", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:59:57.927Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:59:57.927Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg2870/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest1192?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-cdc98bc3c7539fde2f5ff55561cf253a-13175fb13b09c4eb-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "8d94ff36ac3b02177629791e856a326c", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "865", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 11:00:03 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "8be6228b-b664-4eff-86aa-f954de534f6a", + "x-ms-ratelimit-remaining-subscription-reads": "11838", + "x-ms-request-id": "8be6228b-b664-4eff-86aa-f954de534f6a", + "x-ms-routing-request-id": "UKSOUTH:20230707T110004Z:8be6228b-b664-4eff-86aa-f954de534f6a" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest1192", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg2870/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest1192", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:59:57.927Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:59:57.927Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg2870/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest1192?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-cdc98bc3c7539fde2f5ff55561cf253a-947597ce21abfebd-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "d2a03b146a58d0044f61575832141be5", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "865", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 11:00:05 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "346e7cbe-4651-4ac7-9858-6b28923ff9e7", + "x-ms-ratelimit-remaining-subscription-reads": "11837", + "x-ms-request-id": "346e7cbe-4651-4ac7-9858-6b28923ff9e7", + "x-ms-routing-request-id": "UKSOUTH:20230707T110005Z:346e7cbe-4651-4ac7-9858-6b28923ff9e7" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest1192", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg2870/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest1192", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:59:57.927Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:59:57.927Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg2870/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest1192?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-cdc98bc3c7539fde2f5ff55561cf253a-26e0f1fe2f793e81-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "b51d3deba4bb00c66cb8bd083caf33fa", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "865", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 11:00:06 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "e70db8ec-862b-4e8e-bcf2-ad14bba5326b", + "x-ms-ratelimit-remaining-subscription-reads": "11836", + "x-ms-request-id": "e70db8ec-862b-4e8e-bcf2-ad14bba5326b", + "x-ms-routing-request-id": "UKSOUTH:20230707T110007Z:e70db8ec-862b-4e8e-bcf2-ad14bba5326b" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest1192", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg2870/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest1192", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:59:57.927Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:59:57.927Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg2870/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest1192?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-cdc98bc3c7539fde2f5ff55561cf253a-94d798595d30cc2d-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "df471e0ae293cb63fac33dda54becf61", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "865", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 11:00:09 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "e59df7b6-3d34-4a5a-b872-f6fa7eb6433a", + "x-ms-ratelimit-remaining-subscription-reads": "11835", + "x-ms-request-id": "e59df7b6-3d34-4a5a-b872-f6fa7eb6433a", + "x-ms-routing-request-id": "UKSOUTH:20230707T110009Z:e59df7b6-3d34-4a5a-b872-f6fa7eb6433a" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest1192", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg2870/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest1192", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:59:57.927Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:59:57.927Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg2870/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest1192?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-cdc98bc3c7539fde2f5ff55561cf253a-9b0d6b58bbff9a53-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "4833940d7d4d6fb174a066a0acfc93a0", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "865", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 11:00:13 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "504e75c6-22d6-46e3-a5de-9b5f4846f6c9", + "x-ms-ratelimit-remaining-subscription-reads": "11834", + "x-ms-request-id": "504e75c6-22d6-46e3-a5de-9b5f4846f6c9", + "x-ms-routing-request-id": "UKSOUTH:20230707T110013Z:504e75c6-22d6-46e3-a5de-9b5f4846f6c9" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest1192", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg2870/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest1192", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:59:57.927Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:59:57.927Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg2870/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest1192?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-cdc98bc3c7539fde2f5ff55561cf253a-eb1a38938e057575-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "144e5d2d3ccc0851d951baf867ecabad", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "865", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 11:00:21 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "3c056c9b-d34a-4dd1-b0a8-2e21f9e14265", + "x-ms-ratelimit-remaining-subscription-reads": "11833", + "x-ms-request-id": "3c056c9b-d34a-4dd1-b0a8-2e21f9e14265", + "x-ms-routing-request-id": "UKSOUTH:20230707T110021Z:3c056c9b-d34a-4dd1-b0a8-2e21f9e14265" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest1192", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg2870/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest1192", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:59:57.927Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:59:57.927Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg2870/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest1192?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-cdc98bc3c7539fde2f5ff55561cf253a-0ed779aa37c110b4-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "a8fa5ce8eb7c8dad6dd86af37cc31ffe", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "865", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 11:00:37 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "386f9885-7ac6-44e4-b4bd-c2a9ef2deb18", + "x-ms-ratelimit-remaining-subscription-reads": "11832", + "x-ms-request-id": "386f9885-7ac6-44e4-b4bd-c2a9ef2deb18", + "x-ms-routing-request-id": "UKSOUTH:20230707T110038Z:386f9885-7ac6-44e4-b4bd-c2a9ef2deb18" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest1192", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg2870/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest1192", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:59:57.927Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:59:57.927Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg2870/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest1192?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-cdc98bc3c7539fde2f5ff55561cf253a-c5c353f03d28c486-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "f7ac9d2fbb70d095432a6efbc3b80887", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "865", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 11:01:09 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "329c430f-ba29-4222-b45b-7d89699103b3", + "x-ms-ratelimit-remaining-subscription-reads": "11831", + "x-ms-request-id": "329c430f-ba29-4222-b45b-7d89699103b3", + "x-ms-routing-request-id": "UKSOUTH:20230707T110110Z:329c430f-ba29-4222-b45b-7d89699103b3" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest1192", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg2870/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest1192", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:59:57.927Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:59:57.927Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg2870/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest1192?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-cdc98bc3c7539fde2f5ff55561cf253a-8faa5386590e49a1-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "50b7b8f4eb014123afc1a6f3d15e8c16", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "865", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 11:01:42 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "e4c3941b-4021-4b2f-b741-6c17a2f2f086", + "x-ms-ratelimit-remaining-subscription-reads": "11830", + "x-ms-request-id": "e4c3941b-4021-4b2f-b741-6c17a2f2f086", + "x-ms-routing-request-id": "UKSOUTH:20230707T110142Z:e4c3941b-4021-4b2f-b741-6c17a2f2f086" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest1192", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg2870/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest1192", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:59:57.927Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:59:57.927Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg2870/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest1192?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-cdc98bc3c7539fde2f5ff55561cf253a-b233a366770e8cbf-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "c9c8bb32b4402d3dc62964517db1cab5", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "865", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 11:02:14 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "23169301-6bdf-4300-a591-87d55473f2b5", + "x-ms-ratelimit-remaining-subscription-reads": "11829", + "x-ms-request-id": "23169301-6bdf-4300-a591-87d55473f2b5", + "x-ms-routing-request-id": "UKSOUTH:20230707T110215Z:23169301-6bdf-4300-a591-87d55473f2b5" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest1192", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg2870/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest1192", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:59:57.927Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:59:57.927Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg2870/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest1192?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-cdc98bc3c7539fde2f5ff55561cf253a-c54c9b0b332d15dd-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "c4fee2d0ce0b43fc796a47af15a1ffe4", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "865", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 11:02:47 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "697b4a51-1266-4738-971f-77e7a38545d6", + "x-ms-ratelimit-remaining-subscription-reads": "11828", + "x-ms-request-id": "697b4a51-1266-4738-971f-77e7a38545d6", + "x-ms-routing-request-id": "UKSOUTH:20230707T110247Z:697b4a51-1266-4738-971f-77e7a38545d6" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest1192", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg2870/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest1192", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:59:57.927Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:59:57.927Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg2870/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest1192?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-cdc98bc3c7539fde2f5ff55561cf253a-cd3a36b03bea3839-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "07c9589e3eef40477b8a89d886d1c4fe", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "865", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 11:03:19 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "48a4a09f-523e-47b3-8bb9-8173f5674c1d", + "x-ms-ratelimit-remaining-subscription-reads": "11827", + "x-ms-request-id": "48a4a09f-523e-47b3-8bb9-8173f5674c1d", + "x-ms-routing-request-id": "UKSOUTH:20230707T110319Z:48a4a09f-523e-47b3-8bb9-8173f5674c1d" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest1192", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg2870/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest1192", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:59:57.927Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:59:57.927Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg2870/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest1192?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-cdc98bc3c7539fde2f5ff55561cf253a-b83dbb9a9a136f82-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "ef23f1f7c860630abe854fd56c8e1825", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "865", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 11:03:51 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "1bfa7aec-3139-439e-852b-35bb48bba01b", + "x-ms-ratelimit-remaining-subscription-reads": "11826", + "x-ms-request-id": "1bfa7aec-3139-439e-852b-35bb48bba01b", + "x-ms-routing-request-id": "UKSOUTH:20230707T110351Z:1bfa7aec-3139-439e-852b-35bb48bba01b" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest1192", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg2870/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest1192", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:59:57.927Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:59:57.927Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg2870/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest1192?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-cdc98bc3c7539fde2f5ff55561cf253a-ef9b5dc1b5a668a0-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "25b3802ac2e791c59bbe48814524bca7", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "865", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 11:04:23 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "5f4224a4-5af6-4d19-9c9d-b6d215f3f593", + "x-ms-ratelimit-remaining-subscription-reads": "11825", + "x-ms-request-id": "5f4224a4-5af6-4d19-9c9d-b6d215f3f593", + "x-ms-routing-request-id": "UKSOUTH:20230707T110424Z:5f4224a4-5af6-4d19-9c9d-b6d215f3f593" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest1192", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg2870/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest1192", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:59:57.927Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:59:57.927Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg2870/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest1192?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-cdc98bc3c7539fde2f5ff55561cf253a-a100b55704f7da3f-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "23b749a50f7dd5844d66486aef71d3ed", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1170", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 11:04:55 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "7fb8787c-8571-443d-a199-9702190f1012", + "x-ms-ratelimit-remaining-subscription-reads": "11824", + "x-ms-request-id": "7fb8787c-8571-443d-a199-9702190f1012", + "x-ms-routing-request-id": "UKSOUTH:20230707T110456Z:7fb8787c-8571-443d-a199-9702190f1012" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest1192", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg2870/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest1192", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [ + { + "fqdn": "hsm1.cloudhsmsdktest1192-ctfjhhhnewe6ffev.cloudhsm.azure.net", + "state": "InitialProvisioning" + }, + { + "fqdn": "hsm2.cloudhsmsdktest1192-ctfjhhhnewe6ffev.cloudhsm.azure.net", + "state": "InitialProvisioning" + }, + { + "fqdn": "hsm3.cloudhsmsdktest1192-ctfjhhhnewe6ffev.cloudhsm.azure.net", + "state": "InitialProvisioning" + } + ], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:59:57.927Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:59:57.927Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg2870/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest1192?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-cdc98bc3c7539fde2f5ff55561cf253a-0753d2482bc94eda-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "06ad64719f1e34162c9154a27f881d9a", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1170", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 11:05:27 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "ba869991-0bdb-41cd-8407-e15c53af1335", + "x-ms-ratelimit-remaining-subscription-reads": "11823", + "x-ms-request-id": "ba869991-0bdb-41cd-8407-e15c53af1335", + "x-ms-routing-request-id": "UKSOUTH:20230707T110528Z:ba869991-0bdb-41cd-8407-e15c53af1335" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest1192", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg2870/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest1192", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [ + { + "fqdn": "hsm1.cloudhsmsdktest1192-ctfjhhhnewe6ffev.cloudhsm.azure.net", + "state": "InitialProvisioning" + }, + { + "fqdn": "hsm2.cloudhsmsdktest1192-ctfjhhhnewe6ffev.cloudhsm.azure.net", + "state": "InitialProvisioning" + }, + { + "fqdn": "hsm3.cloudhsmsdktest1192-ctfjhhhnewe6ffev.cloudhsm.azure.net", + "state": "InitialProvisioning" + } + ], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:59:57.927Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:59:57.927Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg2870/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest1192?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-cdc98bc3c7539fde2f5ff55561cf253a-32e480a1444d508c-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "232fa7c8f4d61aa7fcddd781795aa229", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1159", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 11:06:00 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "dc84fc49-93ea-4d46-859d-efb318d93577", + "x-ms-ratelimit-remaining-subscription-reads": "11822", + "x-ms-request-id": "dc84fc49-93ea-4d46-859d-efb318d93577", + "x-ms-routing-request-id": "UKSOUTH:20230707T110600Z:dc84fc49-93ea-4d46-859d-efb318d93577" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest1192", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg2870/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest1192", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [ + { + "fqdn": "hsm1.cloudhsmsdktest1192-ctfjhhhnewe6ffev.cloudhsm.azure.net", + "state": "Starting" + }, + { + "fqdn": "hsm2.cloudhsmsdktest1192-ctfjhhhnewe6ffev.cloudhsm.azure.net", + "state": "InitialProvisioning" + }, + { + "fqdn": "hsm3.cloudhsmsdktest1192-ctfjhhhnewe6ffev.cloudhsm.azure.net", + "state": "InitialProvisioning" + } + ], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:59:57.927Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:59:57.927Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg2870/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest1192?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-cdc98bc3c7539fde2f5ff55561cf253a-169a0675f129e1b3-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "e10f5beab67705893283f7ecbbe256c4", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1137", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 11:06:32 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "8fa30015-45bf-4302-a559-f91ca553c441", + "x-ms-ratelimit-remaining-subscription-reads": "11821", + "x-ms-request-id": "8fa30015-45bf-4302-a559-f91ca553c441", + "x-ms-routing-request-id": "UKSOUTH:20230707T110633Z:8fa30015-45bf-4302-a559-f91ca553c441" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest1192", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg2870/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest1192", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [ + { + "fqdn": "hsm1.cloudhsmsdktest1192-ctfjhhhnewe6ffev.cloudhsm.azure.net", + "state": "Starting" + }, + { + "fqdn": "hsm2.cloudhsmsdktest1192-ctfjhhhnewe6ffev.cloudhsm.azure.net", + "state": "Starting" + }, + { + "fqdn": "hsm3.cloudhsmsdktest1192-ctfjhhhnewe6ffev.cloudhsm.azure.net", + "state": "Starting" + } + ], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:59:57.927Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:59:57.927Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg2870/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest1192?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-cdc98bc3c7539fde2f5ff55561cf253a-0a0602c4e8563646-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "47a2ae48b0417d17bc920a40c895bad1", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1137", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 11:07:05 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "9e03866a-13a7-495c-9a30-5e2a385a6bf7", + "x-ms-ratelimit-remaining-subscription-reads": "11820", + "x-ms-request-id": "9e03866a-13a7-495c-9a30-5e2a385a6bf7", + "x-ms-routing-request-id": "UKSOUTH:20230707T110705Z:9e03866a-13a7-495c-9a30-5e2a385a6bf7" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest1192", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg2870/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest1192", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [ + { + "fqdn": "hsm1.cloudhsmsdktest1192-ctfjhhhnewe6ffev.cloudhsm.azure.net", + "state": "Starting" + }, + { + "fqdn": "hsm2.cloudhsmsdktest1192-ctfjhhhnewe6ffev.cloudhsm.azure.net", + "state": "Starting" + }, + { + "fqdn": "hsm3.cloudhsmsdktest1192-ctfjhhhnewe6ffev.cloudhsm.azure.net", + "state": "Starting" + } + ], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:59:57.927Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:59:57.927Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg2870/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest1192?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-cdc98bc3c7539fde2f5ff55561cf253a-293135ccecf1a7ac-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "24b72bee3c7811231d2af053fcbb5f1a", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1137", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 11:07:37 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "546e4378-e2e6-4bb0-980b-00cff255ae13", + "x-ms-ratelimit-remaining-subscription-reads": "11819", + "x-ms-request-id": "546e4378-e2e6-4bb0-980b-00cff255ae13", + "x-ms-routing-request-id": "UKSOUTH:20230707T110737Z:546e4378-e2e6-4bb0-980b-00cff255ae13" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest1192", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg2870/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest1192", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [ + { + "fqdn": "hsm1.cloudhsmsdktest1192-ctfjhhhnewe6ffev.cloudhsm.azure.net", + "state": "Starting" + }, + { + "fqdn": "hsm2.cloudhsmsdktest1192-ctfjhhhnewe6ffev.cloudhsm.azure.net", + "state": "Starting" + }, + { + "fqdn": "hsm3.cloudhsmsdktest1192-ctfjhhhnewe6ffev.cloudhsm.azure.net", + "state": "Starting" + } + ], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:59:57.927Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:59:57.927Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg2870/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest1192?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-cdc98bc3c7539fde2f5ff55561cf253a-0fb0cc36ff20d790-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "cb3812875bb839e7439224e4ab493d9d", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1137", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 11:08:09 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "8eedbdfd-8b56-40dc-8d02-d53d31320e37", + "x-ms-ratelimit-remaining-subscription-reads": "11818", + "x-ms-request-id": "8eedbdfd-8b56-40dc-8d02-d53d31320e37", + "x-ms-routing-request-id": "UKSOUTH:20230707T110810Z:8eedbdfd-8b56-40dc-8d02-d53d31320e37" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest1192", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg2870/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest1192", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [ + { + "fqdn": "hsm1.cloudhsmsdktest1192-ctfjhhhnewe6ffev.cloudhsm.azure.net", + "state": "Starting" + }, + { + "fqdn": "hsm2.cloudhsmsdktest1192-ctfjhhhnewe6ffev.cloudhsm.azure.net", + "state": "Starting" + }, + { + "fqdn": "hsm3.cloudhsmsdktest1192-ctfjhhhnewe6ffev.cloudhsm.azure.net", + "state": "Starting" + } + ], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:59:57.927Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:59:57.927Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg2870/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest1192?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-cdc98bc3c7539fde2f5ff55561cf253a-2fd061e5b99ee613-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "90fd26c8312a0c4b8b902917bfc48001", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1137", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 11:08:42 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "cc18cc67-6b70-46c0-9b71-8481f2a0adce", + "x-ms-ratelimit-remaining-subscription-reads": "11817", + "x-ms-request-id": "cc18cc67-6b70-46c0-9b71-8481f2a0adce", + "x-ms-routing-request-id": "UKSOUTH:20230707T110842Z:cc18cc67-6b70-46c0-9b71-8481f2a0adce" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest1192", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg2870/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest1192", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [ + { + "fqdn": "hsm1.cloudhsmsdktest1192-ctfjhhhnewe6ffev.cloudhsm.azure.net", + "state": "Starting" + }, + { + "fqdn": "hsm2.cloudhsmsdktest1192-ctfjhhhnewe6ffev.cloudhsm.azure.net", + "state": "Starting" + }, + { + "fqdn": "hsm3.cloudhsmsdktest1192-ctfjhhhnewe6ffev.cloudhsm.azure.net", + "state": "Starting" + } + ], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:59:57.927Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:59:57.927Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg2870/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest1192?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-cdc98bc3c7539fde2f5ff55561cf253a-9c9d1e9b7636e8fc-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "b5b8f033ef5c9318437ee0e6183e66d4", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1137", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 11:09:14 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "4743bfa6-aed5-431c-8365-d7ba731def96", + "x-ms-ratelimit-remaining-subscription-reads": "11816", + "x-ms-request-id": "4743bfa6-aed5-431c-8365-d7ba731def96", + "x-ms-routing-request-id": "UKSOUTH:20230707T110915Z:4743bfa6-aed5-431c-8365-d7ba731def96" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest1192", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg2870/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest1192", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [ + { + "fqdn": "hsm1.cloudhsmsdktest1192-ctfjhhhnewe6ffev.cloudhsm.azure.net", + "state": "Starting" + }, + { + "fqdn": "hsm2.cloudhsmsdktest1192-ctfjhhhnewe6ffev.cloudhsm.azure.net", + "state": "Starting" + }, + { + "fqdn": "hsm3.cloudhsmsdktest1192-ctfjhhhnewe6ffev.cloudhsm.azure.net", + "state": "Starting" + } + ], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:59:57.927Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:59:57.927Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg2870/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest1192?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-cdc98bc3c7539fde2f5ff55561cf253a-d15688e861d666fd-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "d68a53eccebd55efc62c3f2831cf797f", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1134", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 11:09:47 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "cf5d18e1-c1b4-4d6c-ab97-3d51e6eb562e", + "x-ms-ratelimit-remaining-subscription-reads": "11815", + "x-ms-request-id": "cf5d18e1-c1b4-4d6c-ab97-3d51e6eb562e", + "x-ms-routing-request-id": "UKSOUTH:20230707T110947Z:cf5d18e1-c1b4-4d6c-ab97-3d51e6eb562e" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest1192", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg2870/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest1192", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [ + { + "fqdn": "hsm1.cloudhsmsdktest1192-ctfjhhhnewe6ffev.cloudhsm.azure.net", + "state": "Started" + }, + { + "fqdn": "hsm2.cloudhsmsdktest1192-ctfjhhhnewe6ffev.cloudhsm.azure.net", + "state": "Started" + }, + { + "fqdn": "hsm3.cloudhsmsdktest1192-ctfjhhhnewe6ffev.cloudhsm.azure.net", + "state": "Started" + } + ], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:59:57.927Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:59:57.927Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg2870/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest1192?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-cdc98bc3c7539fde2f5ff55561cf253a-66f605a5c3fa56d0-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "bbb022128790d8400d6a4cab5165f34c", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1131", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 11:10:19 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "e26f029c-0976-403b-b88e-179eeea7b344", + "x-ms-ratelimit-remaining-subscription-reads": "11814", + "x-ms-request-id": "e26f029c-0976-403b-b88e-179eeea7b344", + "x-ms-routing-request-id": "UKSOUTH:20230707T111019Z:e26f029c-0976-403b-b88e-179eeea7b344" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest1192", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg2870/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest1192", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Succeeded", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [ + { + "fqdn": "hsm1.cloudhsmsdktest1192-ctfjhhhnewe6ffev.cloudhsm.azure.net", + "state": "Started" + }, + { + "fqdn": "hsm2.cloudhsmsdktest1192-ctfjhhhnewe6ffev.cloudhsm.azure.net", + "state": "Started" + }, + { + "fqdn": "hsm3.cloudhsmsdktest1192-ctfjhhhnewe6ffev.cloudhsm.azure.net", + "state": "Started" + } + ], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:59:57.927Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:59:57.927Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg2870/providers/Microsoft.Network/virtualNetworks/pe-vnet-2997?api-version=2021-02-01", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "260", + "Content-Type": "application/json", + "traceparent": "00-2c24683561480770c4eda30f6cbeb982-66211f1a57b18686-00", + "User-Agent": "azsdk-net-ResourceManager.Network/1.1.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "44a9396c0064ef6230aff061740460d3", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "location": "ukwest", + "properties": { + "addressSpace": { + "addressPrefixes": [ + "10.0.0.0/16" + ] + }, + "dhcpOptions": { + "dnsServers": [ + "10.1.1.1", + "10.1.2.4" + ] + }, + "subnets": [ + { + "name": "default", + "properties": { + "addressPrefix": "10.0.1.0/24", + "privateEndpointNetworkPolicies": "Disabled" + } + } + ] + } + }, + "StatusCode": 201, + "ResponseHeaders": { + "azure-asyncnotification": "Enabled", + "azure-asyncoperation": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/providers/Microsoft.Network/locations/ukwest/operations/8dd30395-f978-479b-935c-5480e29badca?api-version=2021-02-01", + "Cache-Control": "no-cache", + "Content-Length": "1337", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 11:10:20 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Retry-After": "3", + "Server": [ + "Microsoft-HTTPAPI/2.0", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-arm-service-request-id": "9e80edd0-0263-43d8-9fd2-31d050fff409", + "x-ms-client-request-id": "44a9396c0064ef6230aff061740460d3", + "x-ms-correlation-request-id": "b5abe0c7-9996-467b-a31e-9bdab87cebdb", + "x-ms-ratelimit-remaining-subscription-writes": "1179", + "x-ms-request-id": "8dd30395-f978-479b-935c-5480e29badca", + "x-ms-routing-request-id": "UKSOUTH:20230707T111020Z:b5abe0c7-9996-467b-a31e-9bdab87cebdb" + }, + "ResponseBody": { + "name": "pe-vnet-2997", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg2870/providers/Microsoft.Network/virtualNetworks/pe-vnet-2997", + "etag": "W/\u0022fc73b95f-b58e-4f77-b799-0a461b7eb5c9\u0022", + "type": "Microsoft.Network/virtualNetworks", + "location": "ukwest", + "properties": { + "provisioningState": "Updating", + "resourceGuid": "f77165f7-8cbb-4046-8a87-f43b28592f57", + "addressSpace": { + "addressPrefixes": [ + "10.0.0.0/16" + ] + }, + "dhcpOptions": { + "dnsServers": [ + "10.1.1.1", + "10.1.2.4" + ] + }, + "subnets": [ + { + "name": "default", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg2870/providers/Microsoft.Network/virtualNetworks/pe-vnet-2997/subnets/default", + "etag": "W/\u0022fc73b95f-b58e-4f77-b799-0a461b7eb5c9\u0022", + "properties": { + "provisioningState": "Updating", + "addressPrefix": "10.0.1.0/24", + "delegations": [], + "privateEndpointNetworkPolicies": "Disabled", + "privateLinkServiceNetworkPolicies": "Enabled" + }, + "type": "Microsoft.Network/virtualNetworks/subnets" + } + ], + "virtualNetworkPeerings": [], + "enableDdosProtection": false + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/providers/Microsoft.Network/locations/ukwest/operations/8dd30395-f978-479b-935c-5480e29badca?api-version=2021-02-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-2c24683561480770c4eda30f6cbeb982-eb7d3caeb549f85e-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "460da3dcde69bb4c2e9810281c09d7a7", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "30", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 11:10:20 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Retry-After": "10", + "Server": [ + "Microsoft-HTTPAPI/2.0", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-arm-service-request-id": "e77eee3c-1b77-44e1-9c88-759691c767e5", + "x-ms-client-request-id": "460da3dcde69bb4c2e9810281c09d7a7", + "x-ms-correlation-request-id": "377871f3-d725-4b35-8018-41999224053d", + "x-ms-ratelimit-remaining-subscription-reads": "11813", + "x-ms-request-id": "84684906-3ccb-4af6-964e-0047e2380598", + "x-ms-routing-request-id": "UKSOUTH:20230707T111021Z:377871f3-d725-4b35-8018-41999224053d" + }, + "ResponseBody": { + "status": "InProgress" + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/providers/Microsoft.Network/locations/ukwest/operations/8dd30395-f978-479b-935c-5480e29badca?api-version=2021-02-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-2c24683561480770c4eda30f6cbeb982-4960d0a8d77d76f7-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "befe92f0127f59c687e0f1e2bc5e8ef7", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "29", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 11:10:30 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": [ + "Microsoft-HTTPAPI/2.0", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-arm-service-request-id": "f76a0b6b-e666-4e5d-b562-d2ebe7cd05a3", + "x-ms-client-request-id": "befe92f0127f59c687e0f1e2bc5e8ef7", + "x-ms-correlation-request-id": "892031c4-894b-4d92-a9d0-ca3609f7d8e1", + "x-ms-ratelimit-remaining-subscription-reads": "11812", + "x-ms-request-id": "27ea3f95-d6f1-4650-9213-bde0b221ace7", + "x-ms-routing-request-id": "UKSOUTH:20230707T111031Z:892031c4-894b-4d92-a9d0-ca3609f7d8e1" + }, + "ResponseBody": { + "status": "Succeeded" + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg2870/providers/Microsoft.Network/virtualNetworks/pe-vnet-2997?api-version=2021-02-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-2c24683561480770c4eda30f6cbeb982-3507e6a02c006cc3-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "d185f3bc1af7176a41ee15cc0289ac49", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1339", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 11:10:30 GMT", + "ETag": "W/\u0022f050f41e-a2bb-4e4c-8de4-69ff3b44606a\u0022", + "Expires": "-1", + "Pragma": "no-cache", + "Server": [ + "Microsoft-HTTPAPI/2.0", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-arm-service-request-id": "01c29065-0db3-48c4-a941-3487531f4bad", + "x-ms-client-request-id": "d185f3bc1af7176a41ee15cc0289ac49", + "x-ms-correlation-request-id": "aee95b43-5990-457e-b530-b49905a94811", + "x-ms-ratelimit-remaining-subscription-reads": "11811", + "x-ms-request-id": "e4063deb-9e66-42a0-81b2-d5be357ce30c", + "x-ms-routing-request-id": "UKSOUTH:20230707T111031Z:aee95b43-5990-457e-b530-b49905a94811" + }, + "ResponseBody": { + "name": "pe-vnet-2997", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg2870/providers/Microsoft.Network/virtualNetworks/pe-vnet-2997", + "etag": "W/\u0022f050f41e-a2bb-4e4c-8de4-69ff3b44606a\u0022", + "type": "Microsoft.Network/virtualNetworks", + "location": "ukwest", + "properties": { + "provisioningState": "Succeeded", + "resourceGuid": "f77165f7-8cbb-4046-8a87-f43b28592f57", + "addressSpace": { + "addressPrefixes": [ + "10.0.0.0/16" + ] + }, + "dhcpOptions": { + "dnsServers": [ + "10.1.1.1", + "10.1.2.4" + ] + }, + "subnets": [ + { + "name": "default", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg2870/providers/Microsoft.Network/virtualNetworks/pe-vnet-2997/subnets/default", + "etag": "W/\u0022f050f41e-a2bb-4e4c-8de4-69ff3b44606a\u0022", + "properties": { + "provisioningState": "Succeeded", + "addressPrefix": "10.0.1.0/24", + "delegations": [], + "privateEndpointNetworkPolicies": "Disabled", + "privateLinkServiceNetworkPolicies": "Enabled" + }, + "type": "Microsoft.Network/virtualNetworks/subnets" + } + ], + "virtualNetworkPeerings": [], + "enableDdosProtection": false + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg2870/providers/Microsoft.Network/privateEndpoints/pe-4829?api-version=2021-02-01", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "543", + "Content-Type": "application/json", + "traceparent": "00-ae2e60176ad90351f6c8e209791d78c9-31a79ed5ff966a5d-00", + "User-Agent": "azsdk-net-ResourceManager.Network/1.1.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "ce149daa343aca7ddcb3bf88ec69ffcf", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "location": "ukwest", + "properties": { + "subnet": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg2870/providers/Microsoft.Network/virtualNetworks/pe-vnet-2997/subnets/default", + "properties": {} + }, + "manualPrivateLinkServiceConnections": [ + { + "name": "pec-4876", + "properties": { + "privateLinkServiceId": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg2870/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest1192", + "groupIds": [ + "cloudhsm" + ], + "requestMessage": "SDK testing" + } + } + ] + } + }, + "StatusCode": 201, + "ResponseHeaders": { + "azure-asyncnotification": "Enabled", + "azure-asyncoperation": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/providers/Microsoft.Network/locations/ukwest/operations/eb9a2bcc-c7fc-4206-8ca9-38be4ab9efd8?api-version=2021-02-01", + "Cache-Control": "no-cache", + "Content-Length": "1961", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 11:10:31 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Retry-After": "10", + "Server": [ + "Microsoft-HTTPAPI/2.0", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-arm-service-request-id": "45935e88-4159-4a9a-95b7-160dd192807c", + "x-ms-client-request-id": "ce149daa343aca7ddcb3bf88ec69ffcf", + "x-ms-correlation-request-id": "019f5110-292b-45e6-800e-7970eb466beb", + "x-ms-ratelimit-remaining-subscription-writes": "1178", + "x-ms-request-id": "eb9a2bcc-c7fc-4206-8ca9-38be4ab9efd8", + "x-ms-routing-request-id": "UKSOUTH:20230707T111032Z:019f5110-292b-45e6-800e-7970eb466beb" + }, + "ResponseBody": { + "name": "pe-4829", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg2870/providers/Microsoft.Network/privateEndpoints/pe-4829", + "etag": "W/\u00225c1590b7-43e7-40ef-bac9-123ac0f4c64d\u0022", + "type": "Microsoft.Network/privateEndpoints", + "location": "ukwest", + "properties": { + "provisioningState": "Updating", + "resourceGuid": "f9b556b5-0f73-41ee-b29a-b659fc476777", + "privateLinkServiceConnections": [], + "manualPrivateLinkServiceConnections": [ + { + "name": "pec-4876", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg2870/providers/Microsoft.Network/privateEndpoints/pe-4829/manualPrivateLinkServiceConnections/pec-4876", + "etag": "W/\u00225c1590b7-43e7-40ef-bac9-123ac0f4c64d\u0022", + "properties": { + "provisioningState": "Succeeded", + "privateLinkServiceId": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg2870/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest1192", + "groupIds": [ + "cloudhsm" + ], + "requestMessage": "SDK testing", + "privateLinkServiceConnectionState": { + "status": "Pending", + "description": "SDK testing", + "actionsRequired": "None" + } + }, + "type": "Microsoft.Network/privateEndpoints/manualPrivateLinkServiceConnections" + } + ], + "subnet": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg2870/providers/Microsoft.Network/virtualNetworks/pe-vnet-2997/subnets/default" + }, + "networkInterfaces": [ + { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg2870/providers/Microsoft.Network/networkInterfaces/pe-4829.nic.d946c3bb-c803-4ddc-acb1-7dee2c304af2" + } + ], + "customDnsConfigs": [] + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/providers/Microsoft.Network/locations/ukwest/operations/eb9a2bcc-c7fc-4206-8ca9-38be4ab9efd8?api-version=2021-02-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-ae2e60176ad90351f6c8e209791d78c9-6a8f63217558f491-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "1e37a833c04988bd75baf4445ae12bd8", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "30", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 11:10:31 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Retry-After": "10", + "Server": [ + "Microsoft-HTTPAPI/2.0", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-arm-service-request-id": "715c674d-421b-47b5-bd9b-5275c50690a9", + "x-ms-client-request-id": "1e37a833c04988bd75baf4445ae12bd8", + "x-ms-correlation-request-id": "927c5a1a-4f12-4acd-aa23-760c14527269", + "x-ms-ratelimit-remaining-subscription-reads": "11810", + "x-ms-request-id": "b21f6fd9-10c3-4ff1-abc3-586b70d90d80", + "x-ms-routing-request-id": "UKSOUTH:20230707T111032Z:927c5a1a-4f12-4acd-aa23-760c14527269" + }, + "ResponseBody": { + "status": "InProgress" + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/providers/Microsoft.Network/locations/ukwest/operations/eb9a2bcc-c7fc-4206-8ca9-38be4ab9efd8?api-version=2021-02-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-ae2e60176ad90351f6c8e209791d78c9-eae063c291497c54-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "e9c245ef831da4c5ed3ea653b7eccde2", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "30", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 11:10:41 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Retry-After": "20", + "Server": [ + "Microsoft-HTTPAPI/2.0", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-arm-service-request-id": "e9444bb1-982b-47c3-b76a-85a1547313e5", + "x-ms-client-request-id": "e9c245ef831da4c5ed3ea653b7eccde2", + "x-ms-correlation-request-id": "c2c63bd2-fd4e-4973-bf00-bdd4ed5bcb7b", + "x-ms-ratelimit-remaining-subscription-reads": "11809", + "x-ms-request-id": "b3603c18-e3b5-4aeb-bdb0-1770f4ac6fd8", + "x-ms-routing-request-id": "UKSOUTH:20230707T111042Z:c2c63bd2-fd4e-4973-bf00-bdd4ed5bcb7b" + }, + "ResponseBody": { + "status": "InProgress" + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/providers/Microsoft.Network/locations/ukwest/operations/eb9a2bcc-c7fc-4206-8ca9-38be4ab9efd8?api-version=2021-02-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-ae2e60176ad90351f6c8e209791d78c9-9e3668ffdd74028d-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "4454c15be03149865be3b4c9126a7b46", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "29", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 11:11:02 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": [ + "Microsoft-HTTPAPI/2.0", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-arm-service-request-id": "e23339d9-6f93-45bb-905f-3aae6a1197ad", + "x-ms-client-request-id": "4454c15be03149865be3b4c9126a7b46", + "x-ms-correlation-request-id": "1afb9e7b-c1a6-4827-9a40-c8c87e86e346", + "x-ms-ratelimit-remaining-subscription-reads": "11808", + "x-ms-request-id": "de9aabb0-f890-4ef1-a6c0-c463582959e7", + "x-ms-routing-request-id": "UKSOUTH:20230707T111102Z:1afb9e7b-c1a6-4827-9a40-c8c87e86e346" + }, + "ResponseBody": { + "status": "Succeeded" + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg2870/providers/Microsoft.Network/privateEndpoints/pe-4829?api-version=2021-02-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-ae2e60176ad90351f6c8e209791d78c9-0189d9e74609d796-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "b7a1a4bb6e38b0e1e293310b1a69d188", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "2444", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 11:11:03 GMT", + "ETag": "W/\u0022d47e4365-3004-4f0a-9339-963756618b4a\u0022", + "Expires": "-1", + "Pragma": "no-cache", + "Server": [ + "Microsoft-HTTPAPI/2.0", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-arm-service-request-id": "de370bc6-0e0b-445e-ae75-a9c66ab96c8e", + "x-ms-client-request-id": "b7a1a4bb6e38b0e1e293310b1a69d188", + "x-ms-correlation-request-id": "26417baa-16f6-4930-940a-bb06acec9320", + "x-ms-ratelimit-remaining-subscription-reads": "11807", + "x-ms-request-id": "2e7d9b11-94ee-4beb-88a1-dd1d6be6123c", + "x-ms-routing-request-id": "UKSOUTH:20230707T111103Z:26417baa-16f6-4930-940a-bb06acec9320" + }, + "ResponseBody": { + "name": "pe-4829", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg2870/providers/Microsoft.Network/privateEndpoints/pe-4829", + "etag": "W/\u0022d47e4365-3004-4f0a-9339-963756618b4a\u0022", + "type": "Microsoft.Network/privateEndpoints", + "location": "ukwest", + "properties": { + "provisioningState": "Succeeded", + "resourceGuid": "f9b556b5-0f73-41ee-b29a-b659fc476777", + "privateLinkServiceConnections": [], + "manualPrivateLinkServiceConnections": [ + { + "name": "pec-4876", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg2870/providers/Microsoft.Network/privateEndpoints/pe-4829/manualPrivateLinkServiceConnections/pec-4876", + "etag": "W/\u0022d47e4365-3004-4f0a-9339-963756618b4a\u0022", + "properties": { + "provisioningState": "Succeeded", + "privateLinkServiceId": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg2870/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest1192", + "groupIds": [ + "cloudhsm" + ], + "requestMessage": "SDK testing", + "privateLinkServiceConnectionState": { + "status": "Pending", + "description": "SDK testing", + "actionsRequired": "None" + } + }, + "type": "Microsoft.Network/privateEndpoints/manualPrivateLinkServiceConnections" + } + ], + "subnet": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg2870/providers/Microsoft.Network/virtualNetworks/pe-vnet-2997/subnets/default" + }, + "networkInterfaces": [ + { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg2870/providers/Microsoft.Network/networkInterfaces/pe-4829.nic.d946c3bb-c803-4ddc-acb1-7dee2c304af2" + } + ], + "customDnsConfigs": [ + { + "fqdn": "hsm1.cloudhsmsdktest1192-ctfjhhhnewe6ffev.cloudhsm.azure.net", + "ipAddresses": [ + "10.0.1.4" + ] + }, + { + "fqdn": "hsm2.cloudhsmsdktest1192-ctfjhhhnewe6ffev.cloudhsm.azure.net", + "ipAddresses": [ + "10.0.1.5" + ] + }, + { + "fqdn": "hsm3.cloudhsmsdktest1192-ctfjhhhnewe6ffev.cloudhsm.azure.net", + "ipAddresses": [ + "10.0.1.6" + ] + } + ] + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg2870/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest1192/privateEndpointConnections?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "User-Agent": "azsdk-net-ResourceManager.HardwareSecurityModules/1.0.0-alpha.20230707.1 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "99e911ede68c0ea6be788d39cffc9182", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "679", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 11:11:03 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "f14ecc6f-e3c8-459a-afcc-274a4b464db2", + "x-ms-ratelimit-remaining-subscription-reads": "11806", + "x-ms-request-id": "f14ecc6f-e3c8-459a-afcc-274a4b464db2", + "x-ms-routing-request-id": "UKSOUTH:20230707T111103Z:f14ecc6f-e3c8-459a-afcc-274a4b464db2" + }, + "ResponseBody": { + "value": [ + { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg2870/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest1192/privateEndpointConnections/pec-4876", + "name": "pec-4876", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters/privateEndpointConnections", + "etag": null, + "properties": { + "provisioningState": "SUCCEEDED", + "groupIds": [ + "cloudhsm" + ], + "privateEndpoint": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg2870/providers/Microsoft.Network/privateEndpoints/pe-4829" + }, + "privateLinkServiceConnectionState": { + "status": "Pending", + "description": "SDK testing", + "actionsRequired": "None" + } + } + } + ] + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg2870/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest1192/privateEndpointConnections/pec-4876?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-86b2654f8be47fa6fb1eb6cae0cca399-c3f31410e5323d7a-00", + "User-Agent": "azsdk-net-ResourceManager.HardwareSecurityModules/1.0.0-alpha.20230707.1 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "12985fc2154beda9e0a4619eaf7a2ff2", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "667", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 11:11:03 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "2f372975-9c8b-4674-a0b4-a8e5167cefa1", + "x-ms-ratelimit-remaining-subscription-reads": "11805", + "x-ms-request-id": "2f372975-9c8b-4674-a0b4-a8e5167cefa1", + "x-ms-routing-request-id": "UKSOUTH:20230707T111103Z:2f372975-9c8b-4674-a0b4-a8e5167cefa1" + }, + "ResponseBody": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg2870/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest1192/privateEndpointConnections/pec-4876", + "name": "pec-4876", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters/privateEndpointConnections", + "etag": null, + "properties": { + "provisioningState": "SUCCEEDED", + "groupIds": [ + "cloudhsm" + ], + "privateEndpoint": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg2870/providers/Microsoft.Network/privateEndpoints/pe-4829" + }, + "privateLinkServiceConnectionState": { + "status": "Pending", + "description": "SDK testing", + "actionsRequired": "None" + } + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg2870/providers/Microsoft.Network/privateEndpoints/pe-4829?api-version=2021-02-01", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-5888fda345e284faef11a171e8311946-07598d2ef364d922-00", + "User-Agent": "azsdk-net-ResourceManager.Network/1.1.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "00db2b11e281d4bafe92f8c0e0a7e1e5", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "azure-asyncnotification": "Enabled", + "azure-asyncoperation": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/providers/Microsoft.Network/locations/ukwest/operations/0d35bc56-5913-49b4-a0b8-8cdd622fd2f5?api-version=2021-02-01", + "Cache-Control": "no-cache", + "Content-Length": "0", + "Date": "Fri, 07 Jul 2023 11:11:03 GMT", + "Expires": "-1", + "Location": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/providers/Microsoft.Network/locations/ukwest/operationResults/0d35bc56-5913-49b4-a0b8-8cdd622fd2f5?api-version=2021-02-01", + "Pragma": "no-cache", + "Retry-After": "10", + "Server": [ + "Microsoft-HTTPAPI/2.0", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-arm-service-request-id": "a43c4e30-b61b-4f1c-a534-2d47689de37d", + "x-ms-client-request-id": "00db2b11e281d4bafe92f8c0e0a7e1e5", + "x-ms-correlation-request-id": "c029634b-f551-48b2-ba26-f4a484ec7f06", + "x-ms-ratelimit-remaining-subscription-deletes": "14998", + "x-ms-request-id": "0d35bc56-5913-49b4-a0b8-8cdd622fd2f5", + "x-ms-routing-request-id": "UKSOUTH:20230707T111103Z:c029634b-f551-48b2-ba26-f4a484ec7f06" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/providers/Microsoft.Network/locations/ukwest/operations/0d35bc56-5913-49b4-a0b8-8cdd622fd2f5?api-version=2021-02-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-5888fda345e284faef11a171e8311946-1958a27bc4b8c425-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "a3289b499121e001a5c314b81ce90c39", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "30", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 11:11:03 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Retry-After": "10", + "Server": [ + "Microsoft-HTTPAPI/2.0", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-arm-service-request-id": "4e9f5840-80bf-42dd-a9d7-a8be01f639ea", + "x-ms-client-request-id": "a3289b499121e001a5c314b81ce90c39", + "x-ms-correlation-request-id": "8953e126-d54a-40e4-b8cd-db14a64de2e9", + "x-ms-ratelimit-remaining-subscription-reads": "11804", + "x-ms-request-id": "687d786c-c20c-43ad-83fb-c50fe73f7b5d", + "x-ms-routing-request-id": "UKSOUTH:20230707T111104Z:8953e126-d54a-40e4-b8cd-db14a64de2e9" + }, + "ResponseBody": { + "status": "InProgress" + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/providers/Microsoft.Network/locations/ukwest/operations/0d35bc56-5913-49b4-a0b8-8cdd622fd2f5?api-version=2021-02-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-5888fda345e284faef11a171e8311946-2040a633f3588be7-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "019c7bc274315220ed02988529d14ff5", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "29", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 11:11:14 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": [ + "Microsoft-HTTPAPI/2.0", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-arm-service-request-id": "9f53a06b-f21b-47ea-81e5-c8fc93667536", + "x-ms-client-request-id": "019c7bc274315220ed02988529d14ff5", + "x-ms-correlation-request-id": "e09cdeff-303a-43f3-8fbc-90a3a4e25463", + "x-ms-ratelimit-remaining-subscription-reads": "11803", + "x-ms-request-id": "271c4126-4c7e-4a4c-b86d-0def781e4b0f", + "x-ms-routing-request-id": "UKSOUTH:20230707T111114Z:e09cdeff-303a-43f3-8fbc-90a3a4e25463" + }, + "ResponseBody": { + "status": "Succeeded" + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg2870/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest1192/privateEndpointConnections?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "User-Agent": "azsdk-net-ResourceManager.HardwareSecurityModules/1.0.0-alpha.20230707.1 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "4476b4333d7e70c4ac68150eaa84bc7e", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "12", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 11:11:14 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "ed5caa22-37b4-4640-ad39-ac0cfca28081", + "x-ms-ratelimit-remaining-subscription-reads": "11802", + "x-ms-request-id": "ed5caa22-37b4-4640-ad39-ac0cfca28081", + "x-ms-routing-request-id": "UKSOUTH:20230707T111114Z:ed5caa22-37b4-4640-ad39-ac0cfca28081" + }, + "ResponseBody": { + "value": [] + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg2870/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest1192/privateEndpointConnections/pec-4876?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-e0dfc50a182010a490692c37a558bfab-533a0db3549486e4-00", + "User-Agent": "azsdk-net-ResourceManager.HardwareSecurityModules/1.0.0-alpha.20230707.1 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "092580ef5e6bd4127ad5b51ff87bb7d3", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 404, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "125", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 11:11:14 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "296a5f72-e37a-482c-9eb9-6ee41ce217fc", + "x-ms-ratelimit-remaining-subscription-reads": "11801", + "x-ms-request-id": "296a5f72-e37a-482c-9eb9-6ee41ce217fc", + "x-ms-routing-request-id": "UKSOUTH:20230707T111114Z:296a5f72-e37a-482c-9eb9-6ee41ce217fc" + }, + "ResponseBody": { + "code": "PrivateEndpointWithGivenConnectionNameNotFound", + "message": "PrivateEndpoint with Connection Name pec-4876 not found" + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg2870/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest1192/privateEndpointConnections/pec-4876?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-2c3cc6406bbdbb2054405d7eefc0231d-cba1b92da72c5e8c-00", + "User-Agent": "azsdk-net-ResourceManager.HardwareSecurityModules/1.0.0-alpha.20230707.1 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "67851e73c87285bab72b54c85e12a869", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 404, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "125", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 11:11:14 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "dc3ccd9c-d896-401a-862f-49d0dacd4b96", + "x-ms-ratelimit-remaining-subscription-reads": "11800", + "x-ms-request-id": "dc3ccd9c-d896-401a-862f-49d0dacd4b96", + "x-ms-routing-request-id": "UKSOUTH:20230707T111114Z:dc3ccd9c-d896-401a-862f-49d0dacd4b96" + }, + "ResponseBody": { + "code": "PrivateEndpointWithGivenConnectionNameNotFound", + "message": "PrivateEndpoint with Connection Name pec-4876 not found" + } + } + ], + "Variables": { + "AZURE_AUTHORITY_HOST": "https://login.microsoftonline.com", + "RandomSeed": "2004676772", + "RESOURCE_MANAGER_URL": null, + "SUBSCRIPTION_ID": "75e96d09-a291-40e1-a5e6-cda78233d867" + } +} diff --git a/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/tests/SessionRecords/CloudHsmClustersPrivateEndpointConnectionTests/GetAllPrivateEndpointConnections.json b/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/tests/SessionRecords/CloudHsmClustersPrivateEndpointConnectionTests/GetAllPrivateEndpointConnections.json new file mode 100644 index 000000000000..f688519adeb9 --- /dev/null +++ b/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/tests/SessionRecords/CloudHsmClustersPrivateEndpointConnectionTests/GetAllPrivateEndpointConnections.json @@ -0,0 +1,2632 @@ +{ + "Entries": [ + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867?api-version=2021-01-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-57936330df92d153cb49acbbf7ff7103-9c5b3a3a4d4a050b-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "43d4c39f7093d4c39b972f963a95dff6", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "448", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:35:57 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "81216a8e-3bfc-4b23-98f4-19eaf436ea31", + "x-ms-ratelimit-remaining-subscription-reads": "11918", + "x-ms-request-id": "81216a8e-3bfc-4b23-98f4-19eaf436ea31", + "x-ms-routing-request-id": "UKSOUTH:20230707T103558Z:81216a8e-3bfc-4b23-98f4-19eaf436ea31" + }, + "ResponseBody": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867", + "authorizationSource": "RoleBased", + "managedByTenants": [ + { + "tenantId": "2f4a9838-26b7-47ee-be60-ccc1fdec5953" + } + ], + "subscriptionId": "75e96d09-a291-40e1-a5e6-cda78233d867", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "displayName": "susolank Projects", + "state": "Enabled", + "subscriptionPolicies": { + "locationPlacementId": "Internal_2014-09-01", + "quotaId": "Internal_2014-09-01", + "spendingLimit": "Off" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867?api-version=2021-01-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-db5591bef19b3cfaee7765037606c54d-dbfe75fab9730a7a-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "0c7c825edc2ec8667084a24022f98b17", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "448", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:35:57 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "d88d559a-7207-4c28-9342-b5b7e0efae46", + "x-ms-ratelimit-remaining-subscription-reads": "11917", + "x-ms-request-id": "d88d559a-7207-4c28-9342-b5b7e0efae46", + "x-ms-routing-request-id": "UKSOUTH:20230707T103558Z:d88d559a-7207-4c28-9342-b5b7e0efae46" + }, + "ResponseBody": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867", + "authorizationSource": "RoleBased", + "managedByTenants": [ + { + "tenantId": "2f4a9838-26b7-47ee-be60-ccc1fdec5953" + } + ], + "subscriptionId": "75e96d09-a291-40e1-a5e6-cda78233d867", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "displayName": "susolank Projects", + "state": "Enabled", + "subscriptionPolicies": { + "locationPlacementId": "Internal_2014-09-01", + "quotaId": "Internal_2014-09-01", + "spendingLimit": "Off" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourcegroups/sdkTestsRg956?api-version=**", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "21", + "Content-Type": "application/json", + "traceparent": "00-ad2a691275a79d3ed81aabef24c77e1b-01796aea3bd613cd-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "7808f48b976ac8c45b7321ab569f1168", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "location": "ukwest" + }, + "StatusCode": 201, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "223", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:35:57 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "f8abbc3e-0be4-4fb7-aad0-3ddd8e70a113", + "x-ms-ratelimit-remaining-subscription-writes": "1190", + "x-ms-request-id": "f8abbc3e-0be4-4fb7-aad0-3ddd8e70a113", + "x-ms-routing-request-id": "UKSOUTH:20230707T103558Z:f8abbc3e-0be4-4fb7-aad0-3ddd8e70a113" + }, + "ResponseBody": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg956", + "name": "sdkTestsRg956", + "type": "Microsoft.Resources/resourceGroups", + "location": "ukwest", + "properties": { + "provisioningState": "Succeeded" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg956/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest2459?api-version=2022-08-31-preview", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "152", + "Content-Type": "application/json", + "traceparent": "00-96ebdb72edfdaa409bfdbfd26f994d70-9254cfb47f153982-00", + "User-Agent": "azsdk-net-ResourceManager.HardwareSecurityModules/1.0.0-alpha.20230707.1 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "f15221f45cc3d20c0ecd82b1a20c1812", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "location": "ukwest", + "properties": { + "securityDomain": { + "fipsState": 2 + } + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "864", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:36:03 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "d9c8a9ac-e4a3-4c37-a1b2-8148174cb75d", + "x-ms-ratelimit-remaining-subscription-writes": "1189", + "x-ms-request-id": "d9c8a9ac-e4a3-4c37-a1b2-8148174cb75d", + "x-ms-routing-request-id": "UKSOUTH:20230707T103604Z:d9c8a9ac-e4a3-4c37-a1b2-8148174cb75d" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest2459", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg956/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest2459", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:35:59.173Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:35:59.173Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg956/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest2459?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-96ebdb72edfdaa409bfdbfd26f994d70-1749d7b692be5fc4-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "f6964d0c9a31ab316c9788f645a9d114", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "864", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:36:03 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "2b39159c-fbd1-4ddb-abe0-89abd8cc067d", + "x-ms-ratelimit-remaining-subscription-reads": "11916", + "x-ms-request-id": "2b39159c-fbd1-4ddb-abe0-89abd8cc067d", + "x-ms-routing-request-id": "UKSOUTH:20230707T103604Z:2b39159c-fbd1-4ddb-abe0-89abd8cc067d" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest2459", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg956/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest2459", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:35:59.173Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:35:59.173Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg956/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest2459?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-96ebdb72edfdaa409bfdbfd26f994d70-21e70276f7493647-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "70f04392979109b8680e1f5917efb829", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "864", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:36:04 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "c3cb9db9-7ac9-43e5-9b45-11fbc2cdd07b", + "x-ms-ratelimit-remaining-subscription-reads": "11915", + "x-ms-request-id": "c3cb9db9-7ac9-43e5-9b45-11fbc2cdd07b", + "x-ms-routing-request-id": "UKSOUTH:20230707T103605Z:c3cb9db9-7ac9-43e5-9b45-11fbc2cdd07b" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest2459", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg956/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest2459", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:35:59.173Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:35:59.173Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg956/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest2459?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-96ebdb72edfdaa409bfdbfd26f994d70-6ecff7e49d214a2b-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "54a4ab3c227514e16f2b115c62c1fd28", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "864", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:36:06 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "a2d8ed3b-ffe3-4103-afaa-d311c4a2fd6a", + "x-ms-ratelimit-remaining-subscription-reads": "11914", + "x-ms-request-id": "a2d8ed3b-ffe3-4103-afaa-d311c4a2fd6a", + "x-ms-routing-request-id": "UKSOUTH:20230707T103606Z:a2d8ed3b-ffe3-4103-afaa-d311c4a2fd6a" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest2459", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg956/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest2459", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:35:59.173Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:35:59.173Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg956/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest2459?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-96ebdb72edfdaa409bfdbfd26f994d70-7fbd3b7077d2b0b1-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "d68a309820f47546958d8d227bd7947d", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "864", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:36:07 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "bef8b36d-8c06-4070-a843-777af2ab7c87", + "x-ms-ratelimit-remaining-subscription-reads": "11913", + "x-ms-request-id": "bef8b36d-8c06-4070-a843-777af2ab7c87", + "x-ms-routing-request-id": "UKSOUTH:20230707T103608Z:bef8b36d-8c06-4070-a843-777af2ab7c87" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest2459", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg956/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest2459", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:35:59.173Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:35:59.173Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg956/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest2459?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-96ebdb72edfdaa409bfdbfd26f994d70-103f6d96ebe6d247-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "9ab95edf7c04709e62dc0165865ca6a7", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "864", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:36:09 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "5a95e455-ef1d-4a34-89d0-2015832b4007", + "x-ms-ratelimit-remaining-subscription-reads": "11912", + "x-ms-request-id": "5a95e455-ef1d-4a34-89d0-2015832b4007", + "x-ms-routing-request-id": "UKSOUTH:20230707T103610Z:5a95e455-ef1d-4a34-89d0-2015832b4007" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest2459", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg956/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest2459", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:35:59.173Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:35:59.173Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg956/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest2459?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-96ebdb72edfdaa409bfdbfd26f994d70-29dd48eebf85eece-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "e6c1f610e2641c34652fbfe794be9997", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "864", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:36:13 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "3df54f4f-9388-4be2-ac90-0cf66f80fd4f", + "x-ms-ratelimit-remaining-subscription-reads": "11911", + "x-ms-request-id": "3df54f4f-9388-4be2-ac90-0cf66f80fd4f", + "x-ms-routing-request-id": "UKSOUTH:20230707T103614Z:3df54f4f-9388-4be2-ac90-0cf66f80fd4f" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest2459", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg956/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest2459", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:35:59.173Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:35:59.173Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg956/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest2459?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-96ebdb72edfdaa409bfdbfd26f994d70-c20c25061e84d98f-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "047c939763071b23911973181ee0ee38", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "864", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:36:21 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "7815a2ca-693b-4c8d-9894-80825cd9f47b", + "x-ms-ratelimit-remaining-subscription-reads": "11910", + "x-ms-request-id": "7815a2ca-693b-4c8d-9894-80825cd9f47b", + "x-ms-routing-request-id": "UKSOUTH:20230707T103622Z:7815a2ca-693b-4c8d-9894-80825cd9f47b" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest2459", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg956/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest2459", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:35:59.173Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:35:59.173Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg956/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest2459?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-96ebdb72edfdaa409bfdbfd26f994d70-3ef067e273d44eea-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "8412e5e7ad16fd19299d35d5bdb6dca4", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "864", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:36:39 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "78ee5408-0ac3-4759-9949-0294555233f5", + "x-ms-ratelimit-remaining-subscription-reads": "11909", + "x-ms-request-id": "78ee5408-0ac3-4759-9949-0294555233f5", + "x-ms-routing-request-id": "UKSOUTH:20230707T103639Z:78ee5408-0ac3-4759-9949-0294555233f5" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest2459", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg956/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest2459", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:35:59.173Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:35:59.173Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg956/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest2459?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-96ebdb72edfdaa409bfdbfd26f994d70-268393ffa50b9be6-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "f3ce6a42a2dfada0d2a6544a6e1bfd84", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "864", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:37:10 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "2166657c-6aa7-4717-ae07-44a710c48c67", + "x-ms-ratelimit-remaining-subscription-reads": "11908", + "x-ms-request-id": "2166657c-6aa7-4717-ae07-44a710c48c67", + "x-ms-routing-request-id": "UKSOUTH:20230707T103711Z:2166657c-6aa7-4717-ae07-44a710c48c67" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest2459", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg956/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest2459", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:35:59.173Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:35:59.173Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg956/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest2459?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-96ebdb72edfdaa409bfdbfd26f994d70-570746e6318dc40a-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "ae00864114abe9817a7fda6a2d4e5edb", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "864", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:37:43 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "ab5412d0-4b2c-4562-b51d-b20f1f8be76b", + "x-ms-ratelimit-remaining-subscription-reads": "11907", + "x-ms-request-id": "ab5412d0-4b2c-4562-b51d-b20f1f8be76b", + "x-ms-routing-request-id": "UKSOUTH:20230707T103743Z:ab5412d0-4b2c-4562-b51d-b20f1f8be76b" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest2459", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg956/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest2459", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:35:59.173Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:35:59.173Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg956/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest2459?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-96ebdb72edfdaa409bfdbfd26f994d70-2ccc6c505c1b032e-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "b4d6ce3dfb1144584564b27059ce8e0d", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "864", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:38:15 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "b57dc369-cae1-437c-89b2-8855344c8205", + "x-ms-ratelimit-remaining-subscription-reads": "11906", + "x-ms-request-id": "b57dc369-cae1-437c-89b2-8855344c8205", + "x-ms-routing-request-id": "UKSOUTH:20230707T103816Z:b57dc369-cae1-437c-89b2-8855344c8205" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest2459", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg956/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest2459", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:35:59.173Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:35:59.173Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg956/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest2459?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-96ebdb72edfdaa409bfdbfd26f994d70-0783e1a971e8f80d-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "3694b09f2db62df9e9e57860c8368084", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "864", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:38:48 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "c9cfcf78-8633-4277-bdb0-14ed6d3c749c", + "x-ms-ratelimit-remaining-subscription-reads": "11905", + "x-ms-request-id": "c9cfcf78-8633-4277-bdb0-14ed6d3c749c", + "x-ms-routing-request-id": "UKSOUTH:20230707T103848Z:c9cfcf78-8633-4277-bdb0-14ed6d3c749c" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest2459", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg956/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest2459", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:35:59.173Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:35:59.173Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg956/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest2459?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-96ebdb72edfdaa409bfdbfd26f994d70-d76f275c7655dd63-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "9f0c7947494545732dbc6847621190ac", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "864", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:39:20 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "e007badc-4536-4cd8-838d-973048075c22", + "x-ms-ratelimit-remaining-subscription-reads": "11904", + "x-ms-request-id": "e007badc-4536-4cd8-838d-973048075c22", + "x-ms-routing-request-id": "UKSOUTH:20230707T103920Z:e007badc-4536-4cd8-838d-973048075c22" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest2459", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg956/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest2459", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:35:59.173Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:35:59.173Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg956/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest2459?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-96ebdb72edfdaa409bfdbfd26f994d70-b79b8d0314b01664-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "7ccaccf027ba1025d5a8cb2c82f87c0f", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "864", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:39:52 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "d86e4374-1356-4dc4-abcc-6ee459f8b5e4", + "x-ms-ratelimit-remaining-subscription-reads": "11903", + "x-ms-request-id": "d86e4374-1356-4dc4-abcc-6ee459f8b5e4", + "x-ms-routing-request-id": "UKSOUTH:20230707T103953Z:d86e4374-1356-4dc4-abcc-6ee459f8b5e4" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest2459", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg956/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest2459", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:35:59.173Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:35:59.173Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg956/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest2459?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-96ebdb72edfdaa409bfdbfd26f994d70-0f5e3857cf8740ac-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "df282ee3efc156c83d4e08f9c4b1cbd7", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "864", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:40:25 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "a6372166-75d2-4a09-82d5-274766fcce86", + "x-ms-ratelimit-remaining-subscription-reads": "11902", + "x-ms-request-id": "a6372166-75d2-4a09-82d5-274766fcce86", + "x-ms-routing-request-id": "UKSOUTH:20230707T104025Z:a6372166-75d2-4a09-82d5-274766fcce86" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest2459", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg956/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest2459", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:35:59.173Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:35:59.173Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg956/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest2459?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-96ebdb72edfdaa409bfdbfd26f994d70-3dac6867ce5667b5-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "fc6fcc54036b20c954fcca9d7d47c335", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1136", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:40:57 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "9a5c78b4-b21d-4dbe-8240-108d884a5368", + "x-ms-ratelimit-remaining-subscription-reads": "11901", + "x-ms-request-id": "9a5c78b4-b21d-4dbe-8240-108d884a5368", + "x-ms-routing-request-id": "UKSOUTH:20230707T104057Z:9a5c78b4-b21d-4dbe-8240-108d884a5368" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest2459", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg956/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest2459", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [ + { + "fqdn": "hsm1.cloudhsmsdktest2459-hherg4ena9gzakb0.cloudhsm.azure.net", + "state": "Starting" + }, + { + "fqdn": "hsm2.cloudhsmsdktest2459-hherg4ena9gzakb0.cloudhsm.azure.net", + "state": "Starting" + }, + { + "fqdn": "hsm3.cloudhsmsdktest2459-hherg4ena9gzakb0.cloudhsm.azure.net", + "state": "Starting" + } + ], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:35:59.173Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:35:59.173Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg956/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest2459?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-96ebdb72edfdaa409bfdbfd26f994d70-d556cee1d3f0f069-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "34635940b0e801ea04743f6b1e2b4b24", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1169", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:41:29 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "3d133b6c-ea3c-49a3-a3cb-50bbd79e5a28", + "x-ms-ratelimit-remaining-subscription-reads": "11900", + "x-ms-request-id": "3d133b6c-ea3c-49a3-a3cb-50bbd79e5a28", + "x-ms-routing-request-id": "UKSOUTH:20230707T104130Z:3d133b6c-ea3c-49a3-a3cb-50bbd79e5a28" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest2459", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg956/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest2459", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [ + { + "fqdn": "hsm1.cloudhsmsdktest2459-hherg4ena9gzakb0.cloudhsm.azure.net", + "state": "InitialProvisioning" + }, + { + "fqdn": "hsm2.cloudhsmsdktest2459-hherg4ena9gzakb0.cloudhsm.azure.net", + "state": "InitialProvisioning" + }, + { + "fqdn": "hsm3.cloudhsmsdktest2459-hherg4ena9gzakb0.cloudhsm.azure.net", + "state": "InitialProvisioning" + } + ], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:35:59.173Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:35:59.173Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg956/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest2459?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-96ebdb72edfdaa409bfdbfd26f994d70-6154f4a0b71903ea-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "b5d7f3dc8089dfa364078bc4242ad8f6", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1169", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:42:02 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "f963d7a7-f1f5-491f-97d8-173021f8a394", + "x-ms-ratelimit-remaining-subscription-reads": "11899", + "x-ms-request-id": "f963d7a7-f1f5-491f-97d8-173021f8a394", + "x-ms-routing-request-id": "UKSOUTH:20230707T104202Z:f963d7a7-f1f5-491f-97d8-173021f8a394" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest2459", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg956/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest2459", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [ + { + "fqdn": "hsm1.cloudhsmsdktest2459-hherg4ena9gzakb0.cloudhsm.azure.net", + "state": "InitialProvisioning" + }, + { + "fqdn": "hsm2.cloudhsmsdktest2459-hherg4ena9gzakb0.cloudhsm.azure.net", + "state": "InitialProvisioning" + }, + { + "fqdn": "hsm3.cloudhsmsdktest2459-hherg4ena9gzakb0.cloudhsm.azure.net", + "state": "InitialProvisioning" + } + ], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:35:59.173Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:35:59.173Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg956/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest2459?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-96ebdb72edfdaa409bfdbfd26f994d70-8432411621f5f10f-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "6bb9d38b964ea4efe26df7f7c45e0128", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1158", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:42:34 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "108c7dd0-be52-4bc7-b739-1469ab4e9f0d", + "x-ms-ratelimit-remaining-subscription-reads": "11898", + "x-ms-request-id": "108c7dd0-be52-4bc7-b739-1469ab4e9f0d", + "x-ms-routing-request-id": "UKSOUTH:20230707T104234Z:108c7dd0-be52-4bc7-b739-1469ab4e9f0d" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest2459", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg956/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest2459", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [ + { + "fqdn": "hsm1.cloudhsmsdktest2459-hherg4ena9gzakb0.cloudhsm.azure.net", + "state": "Starting" + }, + { + "fqdn": "hsm2.cloudhsmsdktest2459-hherg4ena9gzakb0.cloudhsm.azure.net", + "state": "InitialProvisioning" + }, + { + "fqdn": "hsm3.cloudhsmsdktest2459-hherg4ena9gzakb0.cloudhsm.azure.net", + "state": "InitialProvisioning" + } + ], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:35:59.173Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:35:59.173Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg956/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest2459?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-96ebdb72edfdaa409bfdbfd26f994d70-ad70fbb2423b6a97-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "89c0a6b00d6fbfabb583d0e02525dcd9", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1136", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:43:06 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "70dca78f-8cae-437a-ae8e-8bf9d2803933", + "x-ms-ratelimit-remaining-subscription-reads": "11897", + "x-ms-request-id": "70dca78f-8cae-437a-ae8e-8bf9d2803933", + "x-ms-routing-request-id": "UKSOUTH:20230707T104307Z:70dca78f-8cae-437a-ae8e-8bf9d2803933" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest2459", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg956/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest2459", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [ + { + "fqdn": "hsm1.cloudhsmsdktest2459-hherg4ena9gzakb0.cloudhsm.azure.net", + "state": "Starting" + }, + { + "fqdn": "hsm2.cloudhsmsdktest2459-hherg4ena9gzakb0.cloudhsm.azure.net", + "state": "Starting" + }, + { + "fqdn": "hsm3.cloudhsmsdktest2459-hherg4ena9gzakb0.cloudhsm.azure.net", + "state": "Starting" + } + ], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:35:59.173Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:35:59.173Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg956/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest2459?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-96ebdb72edfdaa409bfdbfd26f994d70-aa024e3232a318d4-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "4be0489be07146d60433d31c88ac1a05", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1136", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:43:39 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "d8ea88e1-2a6e-4371-a25e-0c9a6a87aeef", + "x-ms-ratelimit-remaining-subscription-reads": "11896", + "x-ms-request-id": "d8ea88e1-2a6e-4371-a25e-0c9a6a87aeef", + "x-ms-routing-request-id": "UKSOUTH:20230707T104339Z:d8ea88e1-2a6e-4371-a25e-0c9a6a87aeef" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest2459", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg956/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest2459", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [ + { + "fqdn": "hsm1.cloudhsmsdktest2459-hherg4ena9gzakb0.cloudhsm.azure.net", + "state": "Starting" + }, + { + "fqdn": "hsm2.cloudhsmsdktest2459-hherg4ena9gzakb0.cloudhsm.azure.net", + "state": "Starting" + }, + { + "fqdn": "hsm3.cloudhsmsdktest2459-hherg4ena9gzakb0.cloudhsm.azure.net", + "state": "Starting" + } + ], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:35:59.173Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:35:59.173Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg956/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest2459?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-96ebdb72edfdaa409bfdbfd26f994d70-c333b71927b51084-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "7e1462064f697d8728f9b5cac60e7fbc", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1136", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:44:11 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "5bede5d8-8f56-4689-96e1-269345ee8a20", + "x-ms-ratelimit-remaining-subscription-reads": "11895", + "x-ms-request-id": "5bede5d8-8f56-4689-96e1-269345ee8a20", + "x-ms-routing-request-id": "UKSOUTH:20230707T104411Z:5bede5d8-8f56-4689-96e1-269345ee8a20" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest2459", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg956/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest2459", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [ + { + "fqdn": "hsm1.cloudhsmsdktest2459-hherg4ena9gzakb0.cloudhsm.azure.net", + "state": "Starting" + }, + { + "fqdn": "hsm2.cloudhsmsdktest2459-hherg4ena9gzakb0.cloudhsm.azure.net", + "state": "Starting" + }, + { + "fqdn": "hsm3.cloudhsmsdktest2459-hherg4ena9gzakb0.cloudhsm.azure.net", + "state": "Starting" + } + ], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:35:59.173Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:35:59.173Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg956/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest2459?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-96ebdb72edfdaa409bfdbfd26f994d70-18105d82010c8b9e-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "7c5c1d90b67dd0b7cf7a853b3a8f3709", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1136", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:44:43 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "c06d198e-2792-492f-87ba-5ec798de25bf", + "x-ms-ratelimit-remaining-subscription-reads": "11894", + "x-ms-request-id": "c06d198e-2792-492f-87ba-5ec798de25bf", + "x-ms-routing-request-id": "UKSOUTH:20230707T104443Z:c06d198e-2792-492f-87ba-5ec798de25bf" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest2459", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg956/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest2459", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [ + { + "fqdn": "hsm1.cloudhsmsdktest2459-hherg4ena9gzakb0.cloudhsm.azure.net", + "state": "Starting" + }, + { + "fqdn": "hsm2.cloudhsmsdktest2459-hherg4ena9gzakb0.cloudhsm.azure.net", + "state": "Starting" + }, + { + "fqdn": "hsm3.cloudhsmsdktest2459-hherg4ena9gzakb0.cloudhsm.azure.net", + "state": "Starting" + } + ], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:35:59.173Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:35:59.173Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg956/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest2459?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-96ebdb72edfdaa409bfdbfd26f994d70-cdbf2861434b1779-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "c2daca685d114c70c16322782a0b80f6", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1136", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:45:15 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "50b1c74d-1769-4574-a0f2-8de93d8066a0", + "x-ms-ratelimit-remaining-subscription-reads": "11893", + "x-ms-request-id": "50b1c74d-1769-4574-a0f2-8de93d8066a0", + "x-ms-routing-request-id": "UKSOUTH:20230707T104516Z:50b1c74d-1769-4574-a0f2-8de93d8066a0" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest2459", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg956/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest2459", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [ + { + "fqdn": "hsm1.cloudhsmsdktest2459-hherg4ena9gzakb0.cloudhsm.azure.net", + "state": "Starting" + }, + { + "fqdn": "hsm2.cloudhsmsdktest2459-hherg4ena9gzakb0.cloudhsm.azure.net", + "state": "Starting" + }, + { + "fqdn": "hsm3.cloudhsmsdktest2459-hherg4ena9gzakb0.cloudhsm.azure.net", + "state": "Starting" + } + ], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:35:59.173Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:35:59.173Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg956/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest2459?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-96ebdb72edfdaa409bfdbfd26f994d70-860befa8affb9140-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "6a8b17b49e505088ab43aeeec94b4298", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1136", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:45:48 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "af72ec26-8f55-4a1b-8e58-158cfd596845", + "x-ms-ratelimit-remaining-subscription-reads": "11892", + "x-ms-request-id": "af72ec26-8f55-4a1b-8e58-158cfd596845", + "x-ms-routing-request-id": "UKSOUTH:20230707T104548Z:af72ec26-8f55-4a1b-8e58-158cfd596845" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest2459", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg956/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest2459", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [ + { + "fqdn": "hsm1.cloudhsmsdktest2459-hherg4ena9gzakb0.cloudhsm.azure.net", + "state": "Starting" + }, + { + "fqdn": "hsm2.cloudhsmsdktest2459-hherg4ena9gzakb0.cloudhsm.azure.net", + "state": "Starting" + }, + { + "fqdn": "hsm3.cloudhsmsdktest2459-hherg4ena9gzakb0.cloudhsm.azure.net", + "state": "Starting" + } + ], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:35:59.173Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:35:59.173Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg956/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest2459?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-96ebdb72edfdaa409bfdbfd26f994d70-2475a046e7fe6b4b-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "fb61acc2bc3332abad10ba1a933fa5c4", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1133", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:46:20 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "1eefab3c-2cb9-424d-b7f7-848e60f53224", + "x-ms-ratelimit-remaining-subscription-reads": "11891", + "x-ms-request-id": "1eefab3c-2cb9-424d-b7f7-848e60f53224", + "x-ms-routing-request-id": "UKSOUTH:20230707T104620Z:1eefab3c-2cb9-424d-b7f7-848e60f53224" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest2459", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg956/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest2459", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [ + { + "fqdn": "hsm1.cloudhsmsdktest2459-hherg4ena9gzakb0.cloudhsm.azure.net", + "state": "Started" + }, + { + "fqdn": "hsm2.cloudhsmsdktest2459-hherg4ena9gzakb0.cloudhsm.azure.net", + "state": "Started" + }, + { + "fqdn": "hsm3.cloudhsmsdktest2459-hherg4ena9gzakb0.cloudhsm.azure.net", + "state": "Started" + } + ], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:35:59.173Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:35:59.173Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg956/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest2459?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-96ebdb72edfdaa409bfdbfd26f994d70-79d4410f454dbb9c-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "23878efacd03c9b8428a17cdae828276", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1130", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:46:52 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "63faddb1-bf92-4afa-bc29-8918d61d5630", + "x-ms-ratelimit-remaining-subscription-reads": "11890", + "x-ms-request-id": "63faddb1-bf92-4afa-bc29-8918d61d5630", + "x-ms-routing-request-id": "UKSOUTH:20230707T104653Z:63faddb1-bf92-4afa-bc29-8918d61d5630" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest2459", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg956/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest2459", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Succeeded", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [ + { + "fqdn": "hsm1.cloudhsmsdktest2459-hherg4ena9gzakb0.cloudhsm.azure.net", + "state": "Started" + }, + { + "fqdn": "hsm2.cloudhsmsdktest2459-hherg4ena9gzakb0.cloudhsm.azure.net", + "state": "Started" + }, + { + "fqdn": "hsm3.cloudhsmsdktest2459-hherg4ena9gzakb0.cloudhsm.azure.net", + "state": "Started" + } + ], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T10:35:59.173Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T10:35:59.173Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg956/providers/Microsoft.Network/virtualNetworks/pe-vnet-4896?api-version=2021-02-01", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "260", + "Content-Type": "application/json", + "traceparent": "00-8b0079233588cb3f52815b3c62e7f817-6cdbcc78c833f220-00", + "User-Agent": "azsdk-net-ResourceManager.Network/1.1.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "c284a97d6cf7bd5940e46ebc6c9deaf3", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "location": "ukwest", + "properties": { + "addressSpace": { + "addressPrefixes": [ + "10.0.0.0/16" + ] + }, + "dhcpOptions": { + "dnsServers": [ + "10.1.1.1", + "10.1.2.4" + ] + }, + "subnets": [ + { + "name": "default", + "properties": { + "addressPrefix": "10.0.1.0/24", + "privateEndpointNetworkPolicies": "Disabled" + } + } + ] + } + }, + "StatusCode": 201, + "ResponseHeaders": { + "azure-asyncnotification": "Enabled", + "azure-asyncoperation": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/providers/Microsoft.Network/locations/ukwest/operations/cde6e6b9-acd7-41d4-bf2c-d2899b2da411?api-version=2021-02-01", + "Cache-Control": "no-cache", + "Content-Length": "1335", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:46:53 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Retry-After": "3", + "Server": [ + "Microsoft-HTTPAPI/2.0", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-arm-service-request-id": "49f3c6aa-69e3-4f82-96d3-0062f7ee0a16", + "x-ms-client-request-id": "c284a97d6cf7bd5940e46ebc6c9deaf3", + "x-ms-correlation-request-id": "01ee225d-c105-40ce-ab3b-f1a410c35da5", + "x-ms-ratelimit-remaining-subscription-writes": "1188", + "x-ms-request-id": "cde6e6b9-acd7-41d4-bf2c-d2899b2da411", + "x-ms-routing-request-id": "UKSOUTH:20230707T104653Z:01ee225d-c105-40ce-ab3b-f1a410c35da5" + }, + "ResponseBody": { + "name": "pe-vnet-4896", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg956/providers/Microsoft.Network/virtualNetworks/pe-vnet-4896", + "etag": "W/\u0022deffd1e9-5f19-4c76-a209-9cbb2c0f3f0c\u0022", + "type": "Microsoft.Network/virtualNetworks", + "location": "ukwest", + "properties": { + "provisioningState": "Updating", + "resourceGuid": "70602cbe-1339-4324-87d5-04e800aa36c3", + "addressSpace": { + "addressPrefixes": [ + "10.0.0.0/16" + ] + }, + "dhcpOptions": { + "dnsServers": [ + "10.1.1.1", + "10.1.2.4" + ] + }, + "subnets": [ + { + "name": "default", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg956/providers/Microsoft.Network/virtualNetworks/pe-vnet-4896/subnets/default", + "etag": "W/\u0022deffd1e9-5f19-4c76-a209-9cbb2c0f3f0c\u0022", + "properties": { + "provisioningState": "Updating", + "addressPrefix": "10.0.1.0/24", + "delegations": [], + "privateEndpointNetworkPolicies": "Disabled", + "privateLinkServiceNetworkPolicies": "Enabled" + }, + "type": "Microsoft.Network/virtualNetworks/subnets" + } + ], + "virtualNetworkPeerings": [], + "enableDdosProtection": false + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/providers/Microsoft.Network/locations/ukwest/operations/cde6e6b9-acd7-41d4-bf2c-d2899b2da411?api-version=2021-02-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-8b0079233588cb3f52815b3c62e7f817-58ee98cbbed6c695-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "1a288909cc76b78faa0f78e5d3cdab2f", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "30", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:46:53 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Retry-After": "10", + "Server": [ + "Microsoft-HTTPAPI/2.0", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-arm-service-request-id": "3c942fa7-9ccd-4524-9723-1df4e4e8a17a", + "x-ms-client-request-id": "1a288909cc76b78faa0f78e5d3cdab2f", + "x-ms-correlation-request-id": "8b6cf492-cf14-4893-994a-2bf6f19dad1a", + "x-ms-ratelimit-remaining-subscription-reads": "11889", + "x-ms-request-id": "1810fe69-b921-4502-b135-e09bbbbb6fcb", + "x-ms-routing-request-id": "UKSOUTH:20230707T104653Z:8b6cf492-cf14-4893-994a-2bf6f19dad1a" + }, + "ResponseBody": { + "status": "InProgress" + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/providers/Microsoft.Network/locations/ukwest/operations/cde6e6b9-acd7-41d4-bf2c-d2899b2da411?api-version=2021-02-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-8b0079233588cb3f52815b3c62e7f817-099662a10ae3e21f-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "b3478ec4f40089c111ca18528ed592b2", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "29", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:47:03 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": [ + "Microsoft-HTTPAPI/2.0", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-arm-service-request-id": "9cf349a8-96a2-47af-a34e-647c8c9a7b7f", + "x-ms-client-request-id": "b3478ec4f40089c111ca18528ed592b2", + "x-ms-correlation-request-id": "4766d41d-296d-4493-b129-cdc37117ac8d", + "x-ms-ratelimit-remaining-subscription-reads": "11888", + "x-ms-request-id": "4a553893-8877-4c5e-a7a9-75ee2a0e58f8", + "x-ms-routing-request-id": "UKSOUTH:20230707T104704Z:4766d41d-296d-4493-b129-cdc37117ac8d" + }, + "ResponseBody": { + "status": "Succeeded" + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg956/providers/Microsoft.Network/virtualNetworks/pe-vnet-4896?api-version=2021-02-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-8b0079233588cb3f52815b3c62e7f817-c97d6b98c4150619-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "e2b374a0cf756e7d3368eae57bb2e6dc", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1337", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:47:03 GMT", + "ETag": "W/\u002236c0fdfb-50ac-4c49-ae04-90ef8816fa78\u0022", + "Expires": "-1", + "Pragma": "no-cache", + "Server": [ + "Microsoft-HTTPAPI/2.0", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-arm-service-request-id": "7bdfcd0c-d2da-4409-b5dd-3e5883849ce0", + "x-ms-client-request-id": "e2b374a0cf756e7d3368eae57bb2e6dc", + "x-ms-correlation-request-id": "801faf1a-4c7d-4164-81bb-516034ddce22", + "x-ms-ratelimit-remaining-subscription-reads": "11887", + "x-ms-request-id": "c5cda1a3-8add-4336-859e-fb5ec76848f0", + "x-ms-routing-request-id": "UKSOUTH:20230707T104704Z:801faf1a-4c7d-4164-81bb-516034ddce22" + }, + "ResponseBody": { + "name": "pe-vnet-4896", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg956/providers/Microsoft.Network/virtualNetworks/pe-vnet-4896", + "etag": "W/\u002236c0fdfb-50ac-4c49-ae04-90ef8816fa78\u0022", + "type": "Microsoft.Network/virtualNetworks", + "location": "ukwest", + "properties": { + "provisioningState": "Succeeded", + "resourceGuid": "70602cbe-1339-4324-87d5-04e800aa36c3", + "addressSpace": { + "addressPrefixes": [ + "10.0.0.0/16" + ] + }, + "dhcpOptions": { + "dnsServers": [ + "10.1.1.1", + "10.1.2.4" + ] + }, + "subnets": [ + { + "name": "default", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg956/providers/Microsoft.Network/virtualNetworks/pe-vnet-4896/subnets/default", + "etag": "W/\u002236c0fdfb-50ac-4c49-ae04-90ef8816fa78\u0022", + "properties": { + "provisioningState": "Succeeded", + "addressPrefix": "10.0.1.0/24", + "delegations": [], + "privateEndpointNetworkPolicies": "Disabled", + "privateLinkServiceNetworkPolicies": "Enabled" + }, + "type": "Microsoft.Network/virtualNetworks/subnets" + } + ], + "virtualNetworkPeerings": [], + "enableDdosProtection": false + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg956/providers/Microsoft.Network/privateEndpoints/pe-8997?api-version=2021-02-01", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "538", + "Content-Type": "application/json", + "traceparent": "00-8031d51fbf5593655308a4b7397cd921-19e41824baf6af1b-00", + "User-Agent": "azsdk-net-ResourceManager.Network/1.1.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "9cbfadf9904614f8c89e09abb33c28d4", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "location": "ukwest", + "properties": { + "subnet": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg956/providers/Microsoft.Network/virtualNetworks/pe-vnet-4896/subnets/default", + "properties": {} + }, + "manualPrivateLinkServiceConnections": [ + { + "name": "pec-1", + "properties": { + "privateLinkServiceId": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg956/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest2459", + "groupIds": [ + "cloudhsm" + ], + "requestMessage": "SDK testing" + } + } + ] + } + }, + "StatusCode": 201, + "ResponseHeaders": { + "azure-asyncnotification": "Enabled", + "azure-asyncoperation": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/providers/Microsoft.Network/locations/ukwest/operations/30e8b896-a035-4fa1-ba7f-e8d9452ec098?api-version=2021-02-01", + "Cache-Control": "no-cache", + "Content-Length": "1950", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:47:04 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Retry-After": "10", + "Server": [ + "Microsoft-HTTPAPI/2.0", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-arm-service-request-id": "a7359523-22d0-40c5-a814-a71667a61a3e", + "x-ms-client-request-id": "9cbfadf9904614f8c89e09abb33c28d4", + "x-ms-correlation-request-id": "f049dab3-2656-4223-95ee-a2d2528ab6e0", + "x-ms-ratelimit-remaining-subscription-writes": "1187", + "x-ms-request-id": "30e8b896-a035-4fa1-ba7f-e8d9452ec098", + "x-ms-routing-request-id": "UKSOUTH:20230707T104704Z:f049dab3-2656-4223-95ee-a2d2528ab6e0" + }, + "ResponseBody": { + "name": "pe-8997", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg956/providers/Microsoft.Network/privateEndpoints/pe-8997", + "etag": "W/\u0022e7a1e24a-bcf3-4567-b175-a76b19356744\u0022", + "type": "Microsoft.Network/privateEndpoints", + "location": "ukwest", + "properties": { + "provisioningState": "Updating", + "resourceGuid": "e0019cea-53bb-4550-9914-a8fa13c25aad", + "privateLinkServiceConnections": [], + "manualPrivateLinkServiceConnections": [ + { + "name": "pec-1", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg956/providers/Microsoft.Network/privateEndpoints/pe-8997/manualPrivateLinkServiceConnections/pec-1", + "etag": "W/\u0022e7a1e24a-bcf3-4567-b175-a76b19356744\u0022", + "properties": { + "provisioningState": "Succeeded", + "privateLinkServiceId": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg956/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest2459", + "groupIds": [ + "cloudhsm" + ], + "requestMessage": "SDK testing", + "privateLinkServiceConnectionState": { + "status": "Pending", + "description": "SDK testing", + "actionsRequired": "None" + } + }, + "type": "Microsoft.Network/privateEndpoints/manualPrivateLinkServiceConnections" + } + ], + "subnet": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg956/providers/Microsoft.Network/virtualNetworks/pe-vnet-4896/subnets/default" + }, + "networkInterfaces": [ + { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg956/providers/Microsoft.Network/networkInterfaces/pe-8997.nic.eb6fdb8b-1202-4bac-875d-b0663f28a244" + } + ], + "customDnsConfigs": [] + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/providers/Microsoft.Network/locations/ukwest/operations/30e8b896-a035-4fa1-ba7f-e8d9452ec098?api-version=2021-02-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-8031d51fbf5593655308a4b7397cd921-e223bd4e55c42847-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "e1593be4f6160f6b7c9e1ad7c6d2baf6", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "30", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:47:04 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Retry-After": "10", + "Server": [ + "Microsoft-HTTPAPI/2.0", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-arm-service-request-id": "e2bc687a-15bf-4c4d-9e99-206423e61855", + "x-ms-client-request-id": "e1593be4f6160f6b7c9e1ad7c6d2baf6", + "x-ms-correlation-request-id": "1d02bfeb-4a3a-4007-be25-58e2b05899da", + "x-ms-ratelimit-remaining-subscription-reads": "11886", + "x-ms-request-id": "348322d4-f345-4898-83d6-a006272b79dc", + "x-ms-routing-request-id": "UKSOUTH:20230707T104705Z:1d02bfeb-4a3a-4007-be25-58e2b05899da" + }, + "ResponseBody": { + "status": "InProgress" + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/providers/Microsoft.Network/locations/ukwest/operations/30e8b896-a035-4fa1-ba7f-e8d9452ec098?api-version=2021-02-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-8031d51fbf5593655308a4b7397cd921-24ab59b9868cfc29-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "b4671540876c31c2f3ca8b6d10600bec", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "30", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:47:14 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Retry-After": "20", + "Server": [ + "Microsoft-HTTPAPI/2.0", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-arm-service-request-id": "191d9b8e-0b2d-4ea8-b992-d8459ff21e2d", + "x-ms-client-request-id": "b4671540876c31c2f3ca8b6d10600bec", + "x-ms-correlation-request-id": "b159c71e-9f91-41a2-bdbc-13550a2885b5", + "x-ms-ratelimit-remaining-subscription-reads": "11885", + "x-ms-request-id": "1906b328-697f-4bf3-beae-aca3b6bd350f", + "x-ms-routing-request-id": "UKSOUTH:20230707T104715Z:b159c71e-9f91-41a2-bdbc-13550a2885b5" + }, + "ResponseBody": { + "status": "InProgress" + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/providers/Microsoft.Network/locations/ukwest/operations/30e8b896-a035-4fa1-ba7f-e8d9452ec098?api-version=2021-02-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-8031d51fbf5593655308a4b7397cd921-b7c2fee65cdc430c-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "77c6a98f47e387be5a36e27bade22e3e", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "29", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:47:35 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": [ + "Microsoft-HTTPAPI/2.0", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-arm-service-request-id": "fca59250-21d4-446e-8682-cc2ec4a10020", + "x-ms-client-request-id": "77c6a98f47e387be5a36e27bade22e3e", + "x-ms-correlation-request-id": "0a14879f-a813-4219-8899-975d3200e31f", + "x-ms-ratelimit-remaining-subscription-reads": "11884", + "x-ms-request-id": "625ea29a-2e1f-4ce6-b931-43d4c72fcc07", + "x-ms-routing-request-id": "UKSOUTH:20230707T104735Z:0a14879f-a813-4219-8899-975d3200e31f" + }, + "ResponseBody": { + "status": "Succeeded" + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg956/providers/Microsoft.Network/privateEndpoints/pe-8997?api-version=2021-02-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-8031d51fbf5593655308a4b7397cd921-d00e58c6f16e539e-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "f457891e5a745df37928ed4c6afefe1b", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "2433", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:47:35 GMT", + "ETag": "W/\u0022f2696a07-3e64-4877-8b31-9858b54e7bea\u0022", + "Expires": "-1", + "Pragma": "no-cache", + "Server": [ + "Microsoft-HTTPAPI/2.0", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-arm-service-request-id": "faf8753a-5562-4905-8d92-c321a5b3396c", + "x-ms-client-request-id": "f457891e5a745df37928ed4c6afefe1b", + "x-ms-correlation-request-id": "2b1ddfc7-272f-428f-b031-bef93194d732", + "x-ms-ratelimit-remaining-subscription-reads": "11883", + "x-ms-request-id": "35f064d8-9f94-4652-8cb2-e26327ed2189", + "x-ms-routing-request-id": "UKSOUTH:20230707T104735Z:2b1ddfc7-272f-428f-b031-bef93194d732" + }, + "ResponseBody": { + "name": "pe-8997", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg956/providers/Microsoft.Network/privateEndpoints/pe-8997", + "etag": "W/\u0022f2696a07-3e64-4877-8b31-9858b54e7bea\u0022", + "type": "Microsoft.Network/privateEndpoints", + "location": "ukwest", + "properties": { + "provisioningState": "Succeeded", + "resourceGuid": "e0019cea-53bb-4550-9914-a8fa13c25aad", + "privateLinkServiceConnections": [], + "manualPrivateLinkServiceConnections": [ + { + "name": "pec-1", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg956/providers/Microsoft.Network/privateEndpoints/pe-8997/manualPrivateLinkServiceConnections/pec-1", + "etag": "W/\u0022f2696a07-3e64-4877-8b31-9858b54e7bea\u0022", + "properties": { + "provisioningState": "Succeeded", + "privateLinkServiceId": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg956/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest2459", + "groupIds": [ + "cloudhsm" + ], + "requestMessage": "SDK testing", + "privateLinkServiceConnectionState": { + "status": "Pending", + "description": "SDK testing", + "actionsRequired": "None" + } + }, + "type": "Microsoft.Network/privateEndpoints/manualPrivateLinkServiceConnections" + } + ], + "subnet": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg956/providers/Microsoft.Network/virtualNetworks/pe-vnet-4896/subnets/default" + }, + "networkInterfaces": [ + { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg956/providers/Microsoft.Network/networkInterfaces/pe-8997.nic.eb6fdb8b-1202-4bac-875d-b0663f28a244" + } + ], + "customDnsConfigs": [ + { + "fqdn": "hsm1.cloudhsmsdktest2459-hherg4ena9gzakb0.cloudhsm.azure.net", + "ipAddresses": [ + "10.0.1.4" + ] + }, + { + "fqdn": "hsm2.cloudhsmsdktest2459-hherg4ena9gzakb0.cloudhsm.azure.net", + "ipAddresses": [ + "10.0.1.5" + ] + }, + { + "fqdn": "hsm3.cloudhsmsdktest2459-hherg4ena9gzakb0.cloudhsm.azure.net", + "ipAddresses": [ + "10.0.1.6" + ] + } + ] + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg956/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest2459/privateEndpointConnections?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-a86dfdcc831e4eda58b54f31253b5c15-ae8a40b7c5461afd-00", + "User-Agent": "azsdk-net-ResourceManager.HardwareSecurityModules/1.0.0-alpha.20230707.1 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "1c472e93420cf81257e05935a5468310", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "671", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 10:47:36 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "61c596ba-e74b-4bbd-bc8d-1b611d3e5868", + "x-ms-ratelimit-remaining-subscription-reads": "11882", + "x-ms-request-id": "61c596ba-e74b-4bbd-bc8d-1b611d3e5868", + "x-ms-routing-request-id": "UKSOUTH:20230707T104736Z:61c596ba-e74b-4bbd-bc8d-1b611d3e5868" + }, + "ResponseBody": { + "value": [ + { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg956/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest2459/privateEndpointConnections/pec-1", + "name": "pec-1", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters/privateEndpointConnections", + "etag": null, + "properties": { + "provisioningState": "SUCCEEDED", + "groupIds": [ + "cloudhsm" + ], + "privateEndpoint": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg956/providers/Microsoft.Network/privateEndpoints/pe-8997" + }, + "privateLinkServiceConnectionState": { + "status": "Pending", + "description": "SDK testing", + "actionsRequired": "None" + } + } + } + ] + } + } + ], + "Variables": { + "AZURE_AUTHORITY_HOST": "https://login.microsoftonline.com", + "RandomSeed": "1717004246", + "RESOURCE_MANAGER_URL": null, + "SUBSCRIPTION_ID": "75e96d09-a291-40e1-a5e6-cda78233d867" + } +} diff --git a/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/tests/SessionRecords/CloudHsmClustersPrivateEndpointConnectionTests/GetAllPrivateEndpointConnectionsAsync.json b/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/tests/SessionRecords/CloudHsmClustersPrivateEndpointConnectionTests/GetAllPrivateEndpointConnectionsAsync.json new file mode 100644 index 000000000000..60b8a72935f1 --- /dev/null +++ b/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/tests/SessionRecords/CloudHsmClustersPrivateEndpointConnectionTests/GetAllPrivateEndpointConnectionsAsync.json @@ -0,0 +1,2705 @@ +{ + "Entries": [ + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867?api-version=2021-01-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-9420ab0b3c87f1de053991e1b40316fd-ee35e584a259416d-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "14c6327c8e14ebca0bbfbecdc5fa8416", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "448", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 11:11:18 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "9f7bad59-3fb4-484b-8147-1b94e434e839", + "x-ms-ratelimit-remaining-subscription-reads": "11799", + "x-ms-request-id": "9f7bad59-3fb4-484b-8147-1b94e434e839", + "x-ms-routing-request-id": "UKSOUTH:20230707T111118Z:9f7bad59-3fb4-484b-8147-1b94e434e839" + }, + "ResponseBody": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867", + "authorizationSource": "RoleBased", + "managedByTenants": [ + { + "tenantId": "2f4a9838-26b7-47ee-be60-ccc1fdec5953" + } + ], + "subscriptionId": "75e96d09-a291-40e1-a5e6-cda78233d867", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "displayName": "susolank Projects", + "state": "Enabled", + "subscriptionPolicies": { + "locationPlacementId": "Internal_2014-09-01", + "quotaId": "Internal_2014-09-01", + "spendingLimit": "Off" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867?api-version=2021-01-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-2e4f85b874aa81964e822ad8875b644d-d6047372557fb572-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "9cea4d0ad70a91e79dc0452fd821d110", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "448", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 11:11:18 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "59da09dd-d97d-4264-bc44-811a02c52cf6", + "x-ms-ratelimit-remaining-subscription-reads": "11798", + "x-ms-request-id": "59da09dd-d97d-4264-bc44-811a02c52cf6", + "x-ms-routing-request-id": "UKSOUTH:20230707T111118Z:59da09dd-d97d-4264-bc44-811a02c52cf6" + }, + "ResponseBody": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867", + "authorizationSource": "RoleBased", + "managedByTenants": [ + { + "tenantId": "2f4a9838-26b7-47ee-be60-ccc1fdec5953" + } + ], + "subscriptionId": "75e96d09-a291-40e1-a5e6-cda78233d867", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "displayName": "susolank Projects", + "state": "Enabled", + "subscriptionPolicies": { + "locationPlacementId": "Internal_2014-09-01", + "quotaId": "Internal_2014-09-01", + "spendingLimit": "Off" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourcegroups/sdkTestsRg4069?api-version=**", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "21", + "Content-Type": "application/json", + "traceparent": "00-427fb4be8e7084d918508b803581f98c-6a86938f9378dd01-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "e5e21826313ef797b961d717cd38040f", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "location": "ukwest" + }, + "StatusCode": 201, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "225", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 11:11:18 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "d6abe84b-eaf6-4ce6-8321-ac27170d53c7", + "x-ms-ratelimit-remaining-subscription-writes": "1177", + "x-ms-request-id": "d6abe84b-eaf6-4ce6-8321-ac27170d53c7", + "x-ms-routing-request-id": "UKSOUTH:20230707T111118Z:d6abe84b-eaf6-4ce6-8321-ac27170d53c7" + }, + "ResponseBody": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg4069", + "name": "sdkTestsRg4069", + "type": "Microsoft.Resources/resourceGroups", + "location": "ukwest", + "properties": { + "provisioningState": "Succeeded" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg4069/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest4854?api-version=2022-08-31-preview", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "152", + "Content-Type": "application/json", + "traceparent": "00-15e35928d6925b5b8ea13f4ee0fb2779-2a7f17f8a46086f5-00", + "User-Agent": "azsdk-net-ResourceManager.HardwareSecurityModules/1.0.0-alpha.20230707.1 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "7e73d8b94ba4773553499b12e9eead5d", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "location": "ukwest", + "properties": { + "securityDomain": { + "fipsState": 2 + } + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "865", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 11:11:23 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "da5d4c6d-580c-4079-af25-0c0660dac28f", + "x-ms-ratelimit-remaining-subscription-writes": "1176", + "x-ms-request-id": "da5d4c6d-580c-4079-af25-0c0660dac28f", + "x-ms-routing-request-id": "UKSOUTH:20230707T111124Z:da5d4c6d-580c-4079-af25-0c0660dac28f" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest4854", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg4069/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest4854", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T11:11:19.395Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T11:11:19.395Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg4069/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest4854?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-15e35928d6925b5b8ea13f4ee0fb2779-e35d6200d472d6cb-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "37170c12a7fc9673afc6dd4e5ba778e9", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "865", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 11:11:24 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "22b16b3a-6c0a-4271-b2b2-ff9383ff3c65", + "x-ms-ratelimit-remaining-subscription-reads": "11797", + "x-ms-request-id": "22b16b3a-6c0a-4271-b2b2-ff9383ff3c65", + "x-ms-routing-request-id": "UKSOUTH:20230707T111124Z:22b16b3a-6c0a-4271-b2b2-ff9383ff3c65" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest4854", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg4069/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest4854", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T11:11:19.395Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T11:11:19.395Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg4069/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest4854?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-15e35928d6925b5b8ea13f4ee0fb2779-469f90c1cf99d677-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "21987069956d9d4885ce2d2e3cbba7cb", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "865", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 11:11:25 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "b11b0e95-463c-4140-996b-87f803269beb", + "x-ms-ratelimit-remaining-subscription-reads": "11796", + "x-ms-request-id": "b11b0e95-463c-4140-996b-87f803269beb", + "x-ms-routing-request-id": "UKSOUTH:20230707T111125Z:b11b0e95-463c-4140-996b-87f803269beb" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest4854", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg4069/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest4854", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T11:11:19.395Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T11:11:19.395Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg4069/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest4854?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-15e35928d6925b5b8ea13f4ee0fb2779-129cd609850f4fa5-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "ddff7b0876d7f8606f0b81063f0449a9", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "865", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 11:11:26 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "9b521d9a-d0c1-4c2b-9286-2b2dbd1c4b39", + "x-ms-ratelimit-remaining-subscription-reads": "11795", + "x-ms-request-id": "9b521d9a-d0c1-4c2b-9286-2b2dbd1c4b39", + "x-ms-routing-request-id": "UKSOUTH:20230707T111126Z:9b521d9a-d0c1-4c2b-9286-2b2dbd1c4b39" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest4854", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg4069/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest4854", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T11:11:19.395Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T11:11:19.395Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg4069/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest4854?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-15e35928d6925b5b8ea13f4ee0fb2779-9fe05c78e9ce1258-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "5f1026fe1fef7db1c379b12e79445af3", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "865", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 11:11:27 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "897585c6-8221-42c9-9020-a1e39cb22aea", + "x-ms-ratelimit-remaining-subscription-reads": "11794", + "x-ms-request-id": "897585c6-8221-42c9-9020-a1e39cb22aea", + "x-ms-routing-request-id": "UKSOUTH:20230707T111128Z:897585c6-8221-42c9-9020-a1e39cb22aea" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest4854", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg4069/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest4854", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T11:11:19.395Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T11:11:19.395Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg4069/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest4854?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-15e35928d6925b5b8ea13f4ee0fb2779-5e00ab87b5d6593e-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "e045111e9aa7f2110fa0b26213425e81", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "865", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 11:11:29 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "6b2dae89-fd84-44db-a377-7ddb55530de3", + "x-ms-ratelimit-remaining-subscription-reads": "11793", + "x-ms-request-id": "6b2dae89-fd84-44db-a377-7ddb55530de3", + "x-ms-routing-request-id": "UKSOUTH:20230707T111130Z:6b2dae89-fd84-44db-a377-7ddb55530de3" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest4854", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg4069/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest4854", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T11:11:19.395Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T11:11:19.395Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg4069/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest4854?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-15e35928d6925b5b8ea13f4ee0fb2779-6c5c225870faa90d-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "1630848447abe9dbc982195dc5327e2a", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "865", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 11:11:34 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "ac4fa365-0727-4636-913c-8c0a6c78db90", + "x-ms-ratelimit-remaining-subscription-reads": "11792", + "x-ms-request-id": "ac4fa365-0727-4636-913c-8c0a6c78db90", + "x-ms-routing-request-id": "UKSOUTH:20230707T111134Z:ac4fa365-0727-4636-913c-8c0a6c78db90" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest4854", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg4069/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest4854", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T11:11:19.395Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T11:11:19.395Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg4069/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest4854?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-15e35928d6925b5b8ea13f4ee0fb2779-a5dede485821dc87-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "2de78db068bf6302141d504f6d4f6a81", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "865", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 11:11:42 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "64ba2a8a-8c78-47e9-a420-afef2f8762f5", + "x-ms-ratelimit-remaining-subscription-reads": "11791", + "x-ms-request-id": "64ba2a8a-8c78-47e9-a420-afef2f8762f5", + "x-ms-routing-request-id": "UKSOUTH:20230707T111142Z:64ba2a8a-8c78-47e9-a420-afef2f8762f5" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest4854", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg4069/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest4854", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T11:11:19.395Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T11:11:19.395Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg4069/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest4854?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-15e35928d6925b5b8ea13f4ee0fb2779-0a2dafef38be9aab-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "f5aa301b4414d748365c172481b32ddc", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "865", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 11:11:58 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "7647ea57-1510-4937-98b4-93b401abc483", + "x-ms-ratelimit-remaining-subscription-reads": "11790", + "x-ms-request-id": "7647ea57-1510-4937-98b4-93b401abc483", + "x-ms-routing-request-id": "UKSOUTH:20230707T111159Z:7647ea57-1510-4937-98b4-93b401abc483" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest4854", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg4069/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest4854", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T11:11:19.395Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T11:11:19.395Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg4069/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest4854?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-15e35928d6925b5b8ea13f4ee0fb2779-f63b1220740404cc-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "85b28722305b1bc281cd018ef78c7b7a", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "865", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 11:12:31 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "d4b09b96-a315-4398-a292-70305b7922b8", + "x-ms-ratelimit-remaining-subscription-reads": "11789", + "x-ms-request-id": "d4b09b96-a315-4398-a292-70305b7922b8", + "x-ms-routing-request-id": "UKSOUTH:20230707T111231Z:d4b09b96-a315-4398-a292-70305b7922b8" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest4854", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg4069/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest4854", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T11:11:19.395Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T11:11:19.395Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg4069/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest4854?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-15e35928d6925b5b8ea13f4ee0fb2779-ef1db7d17ec56756-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "9542981888886c164510f76250dee160", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "865", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 11:13:02 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "c79e8ebd-0209-4f92-ab0c-dccb514cb79c", + "x-ms-ratelimit-remaining-subscription-reads": "11788", + "x-ms-request-id": "c79e8ebd-0209-4f92-ab0c-dccb514cb79c", + "x-ms-routing-request-id": "UKSOUTH:20230707T111303Z:c79e8ebd-0209-4f92-ab0c-dccb514cb79c" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest4854", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg4069/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest4854", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T11:11:19.395Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T11:11:19.395Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg4069/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest4854?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-15e35928d6925b5b8ea13f4ee0fb2779-695ea3d1c6976d30-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "e52c73efe49ceb266e8e744742bae0a9", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "865", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 11:13:35 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "63e45830-7570-409a-a990-53c9b5de1336", + "x-ms-ratelimit-remaining-subscription-reads": "11787", + "x-ms-request-id": "63e45830-7570-409a-a990-53c9b5de1336", + "x-ms-routing-request-id": "UKSOUTH:20230707T111335Z:63e45830-7570-409a-a990-53c9b5de1336" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest4854", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg4069/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest4854", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T11:11:19.395Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T11:11:19.395Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg4069/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest4854?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-15e35928d6925b5b8ea13f4ee0fb2779-6646345779e4c93f-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "e90c9de0987199547145404a385fcaa3", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "865", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 11:14:07 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "941f9470-b0fd-4c2d-9e16-4d21be23caf9", + "x-ms-ratelimit-remaining-subscription-reads": "11786", + "x-ms-request-id": "941f9470-b0fd-4c2d-9e16-4d21be23caf9", + "x-ms-routing-request-id": "UKSOUTH:20230707T111408Z:941f9470-b0fd-4c2d-9e16-4d21be23caf9" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest4854", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg4069/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest4854", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T11:11:19.395Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T11:11:19.395Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg4069/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest4854?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-15e35928d6925b5b8ea13f4ee0fb2779-09e1bfb14c1cca51-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "839ea1eb965f34dd725727f914cf2a8b", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "865", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 11:14:40 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "7fe0277d-8606-4880-9878-58715751150d", + "x-ms-ratelimit-remaining-subscription-reads": "11785", + "x-ms-request-id": "7fe0277d-8606-4880-9878-58715751150d", + "x-ms-routing-request-id": "UKSOUTH:20230707T111440Z:7fe0277d-8606-4880-9878-58715751150d" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest4854", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg4069/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest4854", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T11:11:19.395Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T11:11:19.395Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg4069/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest4854?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-15e35928d6925b5b8ea13f4ee0fb2779-7db8e044ca1c2b10-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "b3824e30f8d157ee1f937456a4dbb20e", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "865", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 11:15:12 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "7d7ba598-8a33-4662-917d-1f9b2475edff", + "x-ms-ratelimit-remaining-subscription-reads": "11796", + "x-ms-request-id": "7d7ba598-8a33-4662-917d-1f9b2475edff", + "x-ms-routing-request-id": "UKSOUTH:20230707T111512Z:7d7ba598-8a33-4662-917d-1f9b2475edff" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest4854", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg4069/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest4854", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T11:11:19.395Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T11:11:19.395Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg4069/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest4854?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-15e35928d6925b5b8ea13f4ee0fb2779-8cf12be83569d78b-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "a05bd1c35c1b4a4ac0d8771a715a85a2", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "865", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 11:15:46 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "36150886-089b-4fb1-8537-df1cfa0e63c9", + "x-ms-ratelimit-remaining-subscription-reads": "11795", + "x-ms-request-id": "36150886-089b-4fb1-8537-df1cfa0e63c9", + "x-ms-routing-request-id": "UKSOUTH:20230707T111546Z:36150886-089b-4fb1-8537-df1cfa0e63c9" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest4854", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg4069/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest4854", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T11:11:19.395Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T11:11:19.395Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg4069/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest4854?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-15e35928d6925b5b8ea13f4ee0fb2779-1bdbc49eb553d472-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "ea1ab41b17ddf2d1b24763cc22868f96", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1170", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 11:16:18 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "23eeaa76-b044-428d-bc29-2186a4c13149", + "x-ms-ratelimit-remaining-subscription-reads": "11794", + "x-ms-request-id": "23eeaa76-b044-428d-bc29-2186a4c13149", + "x-ms-routing-request-id": "UKSOUTH:20230707T111618Z:23eeaa76-b044-428d-bc29-2186a4c13149" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest4854", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg4069/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest4854", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [ + { + "fqdn": "hsm1.cloudhsmsdktest4854-dkewabgqhsgya9cb.cloudhsm.azure.net", + "state": "InitialProvisioning" + }, + { + "fqdn": "hsm2.cloudhsmsdktest4854-dkewabgqhsgya9cb.cloudhsm.azure.net", + "state": "InitialProvisioning" + }, + { + "fqdn": "hsm3.cloudhsmsdktest4854-dkewabgqhsgya9cb.cloudhsm.azure.net", + "state": "InitialProvisioning" + } + ], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T11:11:19.395Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T11:11:19.395Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg4069/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest4854?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-15e35928d6925b5b8ea13f4ee0fb2779-55b8c5d595e28fd6-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "433618a48973d3700438f2f981d4e5c4", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1170", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 11:16:50 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "e602c33b-bcb0-4d84-946d-f6cf74034c7a", + "x-ms-ratelimit-remaining-subscription-reads": "11793", + "x-ms-request-id": "e602c33b-bcb0-4d84-946d-f6cf74034c7a", + "x-ms-routing-request-id": "UKSOUTH:20230707T111651Z:e602c33b-bcb0-4d84-946d-f6cf74034c7a" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest4854", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg4069/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest4854", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [ + { + "fqdn": "hsm1.cloudhsmsdktest4854-dkewabgqhsgya9cb.cloudhsm.azure.net", + "state": "InitialProvisioning" + }, + { + "fqdn": "hsm2.cloudhsmsdktest4854-dkewabgqhsgya9cb.cloudhsm.azure.net", + "state": "InitialProvisioning" + }, + { + "fqdn": "hsm3.cloudhsmsdktest4854-dkewabgqhsgya9cb.cloudhsm.azure.net", + "state": "InitialProvisioning" + } + ], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T11:11:19.395Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T11:11:19.395Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg4069/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest4854?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-15e35928d6925b5b8ea13f4ee0fb2779-9c681f58ffb86259-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "ef3ad20ec7c0ab31ff68edd4f87d2739", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1159", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 11:17:23 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "2bc2dc7b-1f84-4998-886f-3e658e2713f7", + "x-ms-ratelimit-remaining-subscription-reads": "11792", + "x-ms-request-id": "2bc2dc7b-1f84-4998-886f-3e658e2713f7", + "x-ms-routing-request-id": "UKSOUTH:20230707T111723Z:2bc2dc7b-1f84-4998-886f-3e658e2713f7" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest4854", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg4069/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest4854", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [ + { + "fqdn": "hsm1.cloudhsmsdktest4854-dkewabgqhsgya9cb.cloudhsm.azure.net", + "state": "Starting" + }, + { + "fqdn": "hsm2.cloudhsmsdktest4854-dkewabgqhsgya9cb.cloudhsm.azure.net", + "state": "InitialProvisioning" + }, + { + "fqdn": "hsm3.cloudhsmsdktest4854-dkewabgqhsgya9cb.cloudhsm.azure.net", + "state": "InitialProvisioning" + } + ], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T11:11:19.395Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T11:11:19.395Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg4069/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest4854?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-15e35928d6925b5b8ea13f4ee0fb2779-4cd80d3bd9f95a02-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "5875e0484224922e4447e6a525d770de", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1137", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 11:17:55 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "676ca367-804d-4c8a-940d-2420d51a22e3", + "x-ms-ratelimit-remaining-subscription-reads": "11791", + "x-ms-request-id": "676ca367-804d-4c8a-940d-2420d51a22e3", + "x-ms-routing-request-id": "UKSOUTH:20230707T111755Z:676ca367-804d-4c8a-940d-2420d51a22e3" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest4854", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg4069/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest4854", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [ + { + "fqdn": "hsm1.cloudhsmsdktest4854-dkewabgqhsgya9cb.cloudhsm.azure.net", + "state": "Starting" + }, + { + "fqdn": "hsm2.cloudhsmsdktest4854-dkewabgqhsgya9cb.cloudhsm.azure.net", + "state": "Starting" + }, + { + "fqdn": "hsm3.cloudhsmsdktest4854-dkewabgqhsgya9cb.cloudhsm.azure.net", + "state": "Starting" + } + ], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T11:11:19.395Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T11:11:19.395Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg4069/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest4854?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-15e35928d6925b5b8ea13f4ee0fb2779-8e477e12a520eb93-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "50bd9f619f4bdcd5e78a430a9b9cda86", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1137", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 11:18:26 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "72d27641-28dc-4e86-82ac-97cfc595f571", + "x-ms-ratelimit-remaining-subscription-reads": "11790", + "x-ms-request-id": "72d27641-28dc-4e86-82ac-97cfc595f571", + "x-ms-routing-request-id": "UKSOUTH:20230707T111827Z:72d27641-28dc-4e86-82ac-97cfc595f571" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest4854", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg4069/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest4854", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [ + { + "fqdn": "hsm1.cloudhsmsdktest4854-dkewabgqhsgya9cb.cloudhsm.azure.net", + "state": "Starting" + }, + { + "fqdn": "hsm2.cloudhsmsdktest4854-dkewabgqhsgya9cb.cloudhsm.azure.net", + "state": "Starting" + }, + { + "fqdn": "hsm3.cloudhsmsdktest4854-dkewabgqhsgya9cb.cloudhsm.azure.net", + "state": "Starting" + } + ], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T11:11:19.395Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T11:11:19.395Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg4069/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest4854?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-15e35928d6925b5b8ea13f4ee0fb2779-d7c1e099d0545b41-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "a1b1b8108d5fcca0a3a8ab79e18c8628", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1137", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 11:18:59 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "84eb73ff-da48-41e2-bf36-fbb195f9a6cc", + "x-ms-ratelimit-remaining-subscription-reads": "11789", + "x-ms-request-id": "84eb73ff-da48-41e2-bf36-fbb195f9a6cc", + "x-ms-routing-request-id": "UKSOUTH:20230707T111900Z:84eb73ff-da48-41e2-bf36-fbb195f9a6cc" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest4854", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg4069/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest4854", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [ + { + "fqdn": "hsm1.cloudhsmsdktest4854-dkewabgqhsgya9cb.cloudhsm.azure.net", + "state": "Starting" + }, + { + "fqdn": "hsm2.cloudhsmsdktest4854-dkewabgqhsgya9cb.cloudhsm.azure.net", + "state": "Starting" + }, + { + "fqdn": "hsm3.cloudhsmsdktest4854-dkewabgqhsgya9cb.cloudhsm.azure.net", + "state": "Starting" + } + ], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T11:11:19.395Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T11:11:19.395Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg4069/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest4854?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-15e35928d6925b5b8ea13f4ee0fb2779-b148170c7e601b92-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "59720ff7d7bfa8ed0a987199fe23f6a8", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1137", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 11:19:31 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "1b463c4c-c206-4dfa-a7ba-30525ce2f5ca", + "x-ms-ratelimit-remaining-subscription-reads": "11788", + "x-ms-request-id": "1b463c4c-c206-4dfa-a7ba-30525ce2f5ca", + "x-ms-routing-request-id": "UKSOUTH:20230707T111932Z:1b463c4c-c206-4dfa-a7ba-30525ce2f5ca" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest4854", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg4069/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest4854", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [ + { + "fqdn": "hsm1.cloudhsmsdktest4854-dkewabgqhsgya9cb.cloudhsm.azure.net", + "state": "Starting" + }, + { + "fqdn": "hsm2.cloudhsmsdktest4854-dkewabgqhsgya9cb.cloudhsm.azure.net", + "state": "Starting" + }, + { + "fqdn": "hsm3.cloudhsmsdktest4854-dkewabgqhsgya9cb.cloudhsm.azure.net", + "state": "Starting" + } + ], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T11:11:19.395Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T11:11:19.395Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg4069/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest4854?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-15e35928d6925b5b8ea13f4ee0fb2779-8b4cb57202d8cf6e-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "6c95606ccf26d47ffef1aca3f45cfb5b", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1137", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 11:20:04 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "ed64be26-156a-4960-ab44-260b264a7564", + "x-ms-ratelimit-remaining-subscription-reads": "11797", + "x-ms-request-id": "ed64be26-156a-4960-ab44-260b264a7564", + "x-ms-routing-request-id": "UKSOUTH:20230707T112004Z:ed64be26-156a-4960-ab44-260b264a7564" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest4854", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg4069/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest4854", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [ + { + "fqdn": "hsm1.cloudhsmsdktest4854-dkewabgqhsgya9cb.cloudhsm.azure.net", + "state": "Starting" + }, + { + "fqdn": "hsm2.cloudhsmsdktest4854-dkewabgqhsgya9cb.cloudhsm.azure.net", + "state": "Starting" + }, + { + "fqdn": "hsm3.cloudhsmsdktest4854-dkewabgqhsgya9cb.cloudhsm.azure.net", + "state": "Starting" + } + ], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T11:11:19.395Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T11:11:19.395Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg4069/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest4854?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-15e35928d6925b5b8ea13f4ee0fb2779-abead3f141bd4efd-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "8b121b04802938c6cb0896c61b07cd7f", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1137", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 11:20:36 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "aa1432e2-752d-4a38-9e0c-698d54dc28a8", + "x-ms-ratelimit-remaining-subscription-reads": "11796", + "x-ms-request-id": "aa1432e2-752d-4a38-9e0c-698d54dc28a8", + "x-ms-routing-request-id": "UKSOUTH:20230707T112036Z:aa1432e2-752d-4a38-9e0c-698d54dc28a8" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest4854", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg4069/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest4854", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [ + { + "fqdn": "hsm1.cloudhsmsdktest4854-dkewabgqhsgya9cb.cloudhsm.azure.net", + "state": "Starting" + }, + { + "fqdn": "hsm2.cloudhsmsdktest4854-dkewabgqhsgya9cb.cloudhsm.azure.net", + "state": "Starting" + }, + { + "fqdn": "hsm3.cloudhsmsdktest4854-dkewabgqhsgya9cb.cloudhsm.azure.net", + "state": "Starting" + } + ], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T11:11:19.395Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T11:11:19.395Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg4069/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest4854?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-15e35928d6925b5b8ea13f4ee0fb2779-1f2430ea01183a1b-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "810c03b11af72801909e5ace2b4ab4ad", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1137", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 11:21:09 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "9bc3b236-6c52-4045-b6aa-15b7cdf0e973", + "x-ms-ratelimit-remaining-subscription-reads": "11795", + "x-ms-request-id": "9bc3b236-6c52-4045-b6aa-15b7cdf0e973", + "x-ms-routing-request-id": "UKSOUTH:20230707T112109Z:9bc3b236-6c52-4045-b6aa-15b7cdf0e973" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest4854", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg4069/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest4854", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [ + { + "fqdn": "hsm1.cloudhsmsdktest4854-dkewabgqhsgya9cb.cloudhsm.azure.net", + "state": "Starting" + }, + { + "fqdn": "hsm2.cloudhsmsdktest4854-dkewabgqhsgya9cb.cloudhsm.azure.net", + "state": "Starting" + }, + { + "fqdn": "hsm3.cloudhsmsdktest4854-dkewabgqhsgya9cb.cloudhsm.azure.net", + "state": "Starting" + } + ], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T11:11:19.395Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T11:11:19.395Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg4069/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest4854?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-15e35928d6925b5b8ea13f4ee0fb2779-4aeb1d7933b76929-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "e394169d6b11eb7e995ca11e38b8b9f7", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1137", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 11:21:41 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "79eac2ed-f9d9-4eff-8863-d52112d50f42", + "x-ms-ratelimit-remaining-subscription-reads": "11794", + "x-ms-request-id": "79eac2ed-f9d9-4eff-8863-d52112d50f42", + "x-ms-routing-request-id": "UKSOUTH:20230707T112141Z:79eac2ed-f9d9-4eff-8863-d52112d50f42" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest4854", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg4069/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest4854", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [ + { + "fqdn": "hsm1.cloudhsmsdktest4854-dkewabgqhsgya9cb.cloudhsm.azure.net", + "state": "Starting" + }, + { + "fqdn": "hsm2.cloudhsmsdktest4854-dkewabgqhsgya9cb.cloudhsm.azure.net", + "state": "Starting" + }, + { + "fqdn": "hsm3.cloudhsmsdktest4854-dkewabgqhsgya9cb.cloudhsm.azure.net", + "state": "Starting" + } + ], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T11:11:19.395Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T11:11:19.395Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg4069/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest4854?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-15e35928d6925b5b8ea13f4ee0fb2779-d34ac0567c6f12d8-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "f1f12d24794fea6419eafa8b25f80d80", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1134", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 11:22:12 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "00075b63-c6c1-41eb-a4ab-ba21e22beccd", + "x-ms-ratelimit-remaining-subscription-reads": "11793", + "x-ms-request-id": "00075b63-c6c1-41eb-a4ab-ba21e22beccd", + "x-ms-routing-request-id": "UKSOUTH:20230707T112213Z:00075b63-c6c1-41eb-a4ab-ba21e22beccd" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest4854", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg4069/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest4854", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [ + { + "fqdn": "hsm1.cloudhsmsdktest4854-dkewabgqhsgya9cb.cloudhsm.azure.net", + "state": "Started" + }, + { + "fqdn": "hsm2.cloudhsmsdktest4854-dkewabgqhsgya9cb.cloudhsm.azure.net", + "state": "Started" + }, + { + "fqdn": "hsm3.cloudhsmsdktest4854-dkewabgqhsgya9cb.cloudhsm.azure.net", + "state": "Started" + } + ], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T11:11:19.395Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T11:11:19.395Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg4069/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest4854?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-15e35928d6925b5b8ea13f4ee0fb2779-9c0a61087371358a-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "0428e954ea72466e8420e79a78e3efd8", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1131", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 11:22:45 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "617b4ccf-c96d-4996-8397-a2f6a52911d7", + "x-ms-ratelimit-remaining-subscription-reads": "11792", + "x-ms-request-id": "617b4ccf-c96d-4996-8397-a2f6a52911d7", + "x-ms-routing-request-id": "UKSOUTH:20230707T112245Z:617b4ccf-c96d-4996-8397-a2f6a52911d7" + }, + "ResponseBody": { + "name": "CloudhsmSDKTest4854", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg4069/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest4854", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Succeeded", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "securityDomain": { + "fipsState": 2, + "activationStatus": null + }, + "hsms": [ + { + "fqdn": "hsm1.cloudhsmsdktest4854-dkewabgqhsgya9cb.cloudhsm.azure.net", + "state": "Started" + }, + { + "fqdn": "hsm2.cloudhsmsdktest4854-dkewabgqhsgya9cb.cloudhsm.azure.net", + "state": "Started" + }, + { + "fqdn": "hsm3.cloudhsmsdktest4854-dkewabgqhsgya9cb.cloudhsm.azure.net", + "state": "Started" + } + ], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-07T11:11:19.395Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-07T11:11:19.395Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg4069/providers/Microsoft.Network/virtualNetworks/pe-vnet-195?api-version=2021-02-01", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "260", + "Content-Type": "application/json", + "traceparent": "00-703f11b55924d842a5965da1e9575006-76035347f2562ab9-00", + "User-Agent": "azsdk-net-ResourceManager.Network/1.1.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "5dc359fdb224c9aa2670f3c6a14f20c9", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "location": "ukwest", + "properties": { + "addressSpace": { + "addressPrefixes": [ + "10.0.0.0/16" + ] + }, + "dhcpOptions": { + "dnsServers": [ + "10.1.1.1", + "10.1.2.4" + ] + }, + "subnets": [ + { + "name": "default", + "properties": { + "addressPrefix": "10.0.1.0/24", + "privateEndpointNetworkPolicies": "Disabled" + } + } + ] + } + }, + "StatusCode": 201, + "ResponseHeaders": { + "azure-asyncnotification": "Enabled", + "azure-asyncoperation": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/providers/Microsoft.Network/locations/ukwest/operations/bf128899-42ab-48e9-983b-662f257d77b3?api-version=2021-02-01", + "Cache-Control": "no-cache", + "Content-Length": "1334", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 11:22:46 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Retry-After": "3", + "Server": [ + "Microsoft-HTTPAPI/2.0", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-arm-service-request-id": "9321d47f-1e57-4908-a8ed-cfbd9f2fdf47", + "x-ms-client-request-id": "5dc359fdb224c9aa2670f3c6a14f20c9", + "x-ms-correlation-request-id": "b7518f7b-0ad1-441a-8b88-0e75f18b6b93", + "x-ms-ratelimit-remaining-subscription-writes": "1177", + "x-ms-request-id": "bf128899-42ab-48e9-983b-662f257d77b3", + "x-ms-routing-request-id": "UKSOUTH:20230707T112246Z:b7518f7b-0ad1-441a-8b88-0e75f18b6b93" + }, + "ResponseBody": { + "name": "pe-vnet-195", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg4069/providers/Microsoft.Network/virtualNetworks/pe-vnet-195", + "etag": "W/\u002202c9d1dd-5ee3-4047-875b-88b4e3502d1d\u0022", + "type": "Microsoft.Network/virtualNetworks", + "location": "ukwest", + "properties": { + "provisioningState": "Updating", + "resourceGuid": "0bedce13-d75b-4451-8fa9-62532a881734", + "addressSpace": { + "addressPrefixes": [ + "10.0.0.0/16" + ] + }, + "dhcpOptions": { + "dnsServers": [ + "10.1.1.1", + "10.1.2.4" + ] + }, + "subnets": [ + { + "name": "default", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg4069/providers/Microsoft.Network/virtualNetworks/pe-vnet-195/subnets/default", + "etag": "W/\u002202c9d1dd-5ee3-4047-875b-88b4e3502d1d\u0022", + "properties": { + "provisioningState": "Updating", + "addressPrefix": "10.0.1.0/24", + "delegations": [], + "privateEndpointNetworkPolicies": "Disabled", + "privateLinkServiceNetworkPolicies": "Enabled" + }, + "type": "Microsoft.Network/virtualNetworks/subnets" + } + ], + "virtualNetworkPeerings": [], + "enableDdosProtection": false + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/providers/Microsoft.Network/locations/ukwest/operations/bf128899-42ab-48e9-983b-662f257d77b3?api-version=2021-02-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-703f11b55924d842a5965da1e9575006-e8184076191fdb9b-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "270f4ec28b915204c82047d6915a464a", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "30", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 11:22:46 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Retry-After": "10", + "Server": [ + "Microsoft-HTTPAPI/2.0", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-arm-service-request-id": "b3251b78-e9c7-4eb9-b8ab-804ed947d487", + "x-ms-client-request-id": "270f4ec28b915204c82047d6915a464a", + "x-ms-correlation-request-id": "35444434-2eaa-465a-b92a-6a588cedc063", + "x-ms-ratelimit-remaining-subscription-reads": "11791", + "x-ms-request-id": "4e8488c5-f366-4f9d-8887-3c0c8fd7335d", + "x-ms-routing-request-id": "UKSOUTH:20230707T112247Z:35444434-2eaa-465a-b92a-6a588cedc063" + }, + "ResponseBody": { + "status": "InProgress" + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/providers/Microsoft.Network/locations/ukwest/operations/bf128899-42ab-48e9-983b-662f257d77b3?api-version=2021-02-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-703f11b55924d842a5965da1e9575006-60629a5e3bd2a8be-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "479f1958de303e70ae562e92e838922b", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "29", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 11:22:56 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": [ + "Microsoft-HTTPAPI/2.0", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-arm-service-request-id": "18954dc1-2cfb-4805-8f26-348cc721bdd5", + "x-ms-client-request-id": "479f1958de303e70ae562e92e838922b", + "x-ms-correlation-request-id": "c6f54954-3e82-42e2-936e-efc896b2ac58", + "x-ms-ratelimit-remaining-subscription-reads": "11790", + "x-ms-request-id": "16b93fd4-1910-4fea-bf14-79c8316fd767", + "x-ms-routing-request-id": "UKSOUTH:20230707T112257Z:c6f54954-3e82-42e2-936e-efc896b2ac58" + }, + "ResponseBody": { + "status": "Succeeded" + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg4069/providers/Microsoft.Network/virtualNetworks/pe-vnet-195?api-version=2021-02-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-703f11b55924d842a5965da1e9575006-d238f69e1b778b2c-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "53034d4df93fc4388c61bc1977d4dbd4", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1336", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 11:22:56 GMT", + "ETag": "W/\u0022024c4a0a-d8b4-499b-bdaf-26fc1e1d1d24\u0022", + "Expires": "-1", + "Pragma": "no-cache", + "Server": [ + "Microsoft-HTTPAPI/2.0", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-arm-service-request-id": "4434f409-0662-42c0-b77e-67702ed1d5e1", + "x-ms-client-request-id": "53034d4df93fc4388c61bc1977d4dbd4", + "x-ms-correlation-request-id": "d1999b9b-b2f7-491f-8d0f-89b6ead09577", + "x-ms-ratelimit-remaining-subscription-reads": "11789", + "x-ms-request-id": "68ba12e5-d96e-4efa-ae45-fe76804bb147", + "x-ms-routing-request-id": "UKSOUTH:20230707T112257Z:d1999b9b-b2f7-491f-8d0f-89b6ead09577" + }, + "ResponseBody": { + "name": "pe-vnet-195", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg4069/providers/Microsoft.Network/virtualNetworks/pe-vnet-195", + "etag": "W/\u0022024c4a0a-d8b4-499b-bdaf-26fc1e1d1d24\u0022", + "type": "Microsoft.Network/virtualNetworks", + "location": "ukwest", + "properties": { + "provisioningState": "Succeeded", + "resourceGuid": "0bedce13-d75b-4451-8fa9-62532a881734", + "addressSpace": { + "addressPrefixes": [ + "10.0.0.0/16" + ] + }, + "dhcpOptions": { + "dnsServers": [ + "10.1.1.1", + "10.1.2.4" + ] + }, + "subnets": [ + { + "name": "default", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg4069/providers/Microsoft.Network/virtualNetworks/pe-vnet-195/subnets/default", + "etag": "W/\u0022024c4a0a-d8b4-499b-bdaf-26fc1e1d1d24\u0022", + "properties": { + "provisioningState": "Succeeded", + "addressPrefix": "10.0.1.0/24", + "delegations": [], + "privateEndpointNetworkPolicies": "Disabled", + "privateLinkServiceNetworkPolicies": "Enabled" + }, + "type": "Microsoft.Network/virtualNetworks/subnets" + } + ], + "virtualNetworkPeerings": [], + "enableDdosProtection": false + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg4069/providers/Microsoft.Network/privateEndpoints/pe-3999?api-version=2021-02-01", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "542", + "Content-Type": "application/json", + "traceparent": "00-23b6376be0169826105e62a009bd2c0e-bd54ea6156814e7b-00", + "User-Agent": "azsdk-net-ResourceManager.Network/1.1.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "1c197f4bdb5be375ddd1783a5c716990", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "location": "ukwest", + "properties": { + "subnet": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg4069/providers/Microsoft.Network/virtualNetworks/pe-vnet-195/subnets/default", + "properties": {} + }, + "manualPrivateLinkServiceConnections": [ + { + "name": "pec-1003", + "properties": { + "privateLinkServiceId": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg4069/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest4854", + "groupIds": [ + "cloudhsm" + ], + "requestMessage": "SDK testing" + } + } + ] + } + }, + "StatusCode": 201, + "ResponseHeaders": { + "azure-asyncnotification": "Enabled", + "azure-asyncoperation": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/providers/Microsoft.Network/locations/ukwest/operations/22185dc4-8299-4203-ab60-9877a4b23e32?api-version=2021-02-01", + "Cache-Control": "no-cache", + "Content-Length": "1960", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 11:22:57 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Retry-After": "10", + "Server": [ + "Microsoft-HTTPAPI/2.0", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-arm-service-request-id": "3aeb0304-dc47-4d0c-ba41-59e64018d9a1", + "x-ms-client-request-id": "1c197f4bdb5be375ddd1783a5c716990", + "x-ms-correlation-request-id": "75eadfd4-04b8-43b3-872b-b6d0a8dbb762", + "x-ms-ratelimit-remaining-subscription-writes": "1176", + "x-ms-request-id": "22185dc4-8299-4203-ab60-9877a4b23e32", + "x-ms-routing-request-id": "UKSOUTH:20230707T112258Z:75eadfd4-04b8-43b3-872b-b6d0a8dbb762" + }, + "ResponseBody": { + "name": "pe-3999", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg4069/providers/Microsoft.Network/privateEndpoints/pe-3999", + "etag": "W/\u002266536ef1-f09a-4f20-a395-54b7d9d4fbb0\u0022", + "type": "Microsoft.Network/privateEndpoints", + "location": "ukwest", + "properties": { + "provisioningState": "Updating", + "resourceGuid": "81f1fbff-3a10-4936-bb79-46646586c0c1", + "privateLinkServiceConnections": [], + "manualPrivateLinkServiceConnections": [ + { + "name": "pec-1003", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg4069/providers/Microsoft.Network/privateEndpoints/pe-3999/manualPrivateLinkServiceConnections/pec-1003", + "etag": "W/\u002266536ef1-f09a-4f20-a395-54b7d9d4fbb0\u0022", + "properties": { + "provisioningState": "Succeeded", + "privateLinkServiceId": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg4069/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest4854", + "groupIds": [ + "cloudhsm" + ], + "requestMessage": "SDK testing", + "privateLinkServiceConnectionState": { + "status": "Pending", + "description": "SDK testing", + "actionsRequired": "None" + } + }, + "type": "Microsoft.Network/privateEndpoints/manualPrivateLinkServiceConnections" + } + ], + "subnet": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg4069/providers/Microsoft.Network/virtualNetworks/pe-vnet-195/subnets/default" + }, + "networkInterfaces": [ + { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg4069/providers/Microsoft.Network/networkInterfaces/pe-3999.nic.ea802c30-7f12-4b04-a57b-bda36ddb0588" + } + ], + "customDnsConfigs": [] + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/providers/Microsoft.Network/locations/ukwest/operations/22185dc4-8299-4203-ab60-9877a4b23e32?api-version=2021-02-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-23b6376be0169826105e62a009bd2c0e-d71abb8d103993e8-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "6946597b761e72d0d71f756e80fe681a", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "30", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 11:22:57 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Retry-After": "10", + "Server": [ + "Microsoft-HTTPAPI/2.0", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-arm-service-request-id": "74af932d-e871-4daf-b744-13f258e76934", + "x-ms-client-request-id": "6946597b761e72d0d71f756e80fe681a", + "x-ms-correlation-request-id": "14b94ceb-92a1-44eb-925d-2b52923a02cd", + "x-ms-ratelimit-remaining-subscription-reads": "11788", + "x-ms-request-id": "101343fe-f675-46cc-bd46-f50d010fac34", + "x-ms-routing-request-id": "UKSOUTH:20230707T112258Z:14b94ceb-92a1-44eb-925d-2b52923a02cd" + }, + "ResponseBody": { + "status": "InProgress" + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/providers/Microsoft.Network/locations/ukwest/operations/22185dc4-8299-4203-ab60-9877a4b23e32?api-version=2021-02-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-23b6376be0169826105e62a009bd2c0e-41f87680b2f178bb-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "5c8b2bf7974c597d74bb3b801fa6c186", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "30", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 11:23:07 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Retry-After": "20", + "Server": [ + "Microsoft-HTTPAPI/2.0", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-arm-service-request-id": "f32c144b-9d88-44c7-89b1-8fd760368845", + "x-ms-client-request-id": "5c8b2bf7974c597d74bb3b801fa6c186", + "x-ms-correlation-request-id": "ba1e4fa2-9373-40e8-9689-962ec4bee8bb", + "x-ms-ratelimit-remaining-subscription-reads": "11787", + "x-ms-request-id": "e4d26759-07df-4eb2-83c8-3f6a7cf5985f", + "x-ms-routing-request-id": "UKSOUTH:20230707T112308Z:ba1e4fa2-9373-40e8-9689-962ec4bee8bb" + }, + "ResponseBody": { + "status": "InProgress" + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/providers/Microsoft.Network/locations/ukwest/operations/22185dc4-8299-4203-ab60-9877a4b23e32?api-version=2021-02-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-23b6376be0169826105e62a009bd2c0e-98d5e97792897a07-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "02bf9f0b002b17714b156c377c9cdee3", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "29", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 11:23:28 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": [ + "Microsoft-HTTPAPI/2.0", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-arm-service-request-id": "f2ca9269-4d03-47f1-a895-d9f4ae332476", + "x-ms-client-request-id": "02bf9f0b002b17714b156c377c9cdee3", + "x-ms-correlation-request-id": "b55babc6-c409-46d5-9a7b-93debe936966", + "x-ms-ratelimit-remaining-subscription-reads": "11786", + "x-ms-request-id": "f834d825-b003-4299-8b1f-2c2b439ec594", + "x-ms-routing-request-id": "UKSOUTH:20230707T112328Z:b55babc6-c409-46d5-9a7b-93debe936966" + }, + "ResponseBody": { + "status": "Succeeded" + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg4069/providers/Microsoft.Network/privateEndpoints/pe-3999?api-version=2021-02-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-23b6376be0169826105e62a009bd2c0e-b248282c6c49c17c-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "f6d7a0736acbe38ddcedf4633a4f5231", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "2443", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 11:23:29 GMT", + "ETag": "W/\u0022276aa232-a602-4b5f-9b25-0a697379387c\u0022", + "Expires": "-1", + "Pragma": "no-cache", + "Server": [ + "Microsoft-HTTPAPI/2.0", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-arm-service-request-id": "6ea732a1-52c4-4acd-874f-588439e4b255", + "x-ms-client-request-id": "f6d7a0736acbe38ddcedf4633a4f5231", + "x-ms-correlation-request-id": "eeac82f5-62ab-4b00-b736-7d6b39c20558", + "x-ms-ratelimit-remaining-subscription-reads": "11785", + "x-ms-request-id": "b69b5528-6339-4a0d-b2fa-137d5290a847", + "x-ms-routing-request-id": "UKSOUTH:20230707T112329Z:eeac82f5-62ab-4b00-b736-7d6b39c20558" + }, + "ResponseBody": { + "name": "pe-3999", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg4069/providers/Microsoft.Network/privateEndpoints/pe-3999", + "etag": "W/\u0022276aa232-a602-4b5f-9b25-0a697379387c\u0022", + "type": "Microsoft.Network/privateEndpoints", + "location": "ukwest", + "properties": { + "provisioningState": "Succeeded", + "resourceGuid": "81f1fbff-3a10-4936-bb79-46646586c0c1", + "privateLinkServiceConnections": [], + "manualPrivateLinkServiceConnections": [ + { + "name": "pec-1003", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg4069/providers/Microsoft.Network/privateEndpoints/pe-3999/manualPrivateLinkServiceConnections/pec-1003", + "etag": "W/\u0022276aa232-a602-4b5f-9b25-0a697379387c\u0022", + "properties": { + "provisioningState": "Succeeded", + "privateLinkServiceId": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg4069/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest4854", + "groupIds": [ + "cloudhsm" + ], + "requestMessage": "SDK testing", + "privateLinkServiceConnectionState": { + "status": "Pending", + "description": "SDK testing", + "actionsRequired": "None" + } + }, + "type": "Microsoft.Network/privateEndpoints/manualPrivateLinkServiceConnections" + } + ], + "subnet": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg4069/providers/Microsoft.Network/virtualNetworks/pe-vnet-195/subnets/default" + }, + "networkInterfaces": [ + { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg4069/providers/Microsoft.Network/networkInterfaces/pe-3999.nic.ea802c30-7f12-4b04-a57b-bda36ddb0588" + } + ], + "customDnsConfigs": [ + { + "fqdn": "hsm1.cloudhsmsdktest4854-dkewabgqhsgya9cb.cloudhsm.azure.net", + "ipAddresses": [ + "10.0.1.4" + ] + }, + { + "fqdn": "hsm2.cloudhsmsdktest4854-dkewabgqhsgya9cb.cloudhsm.azure.net", + "ipAddresses": [ + "10.0.1.5" + ] + }, + { + "fqdn": "hsm3.cloudhsmsdktest4854-dkewabgqhsgya9cb.cloudhsm.azure.net", + "ipAddresses": [ + "10.0.1.6" + ] + } + ] + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg4069/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest4854/privateEndpointConnections?api-version=2022-08-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "User-Agent": "azsdk-net-ResourceManager.HardwareSecurityModules/1.0.0-alpha.20230707.1 (.NET 6.0.18; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "e163ee5e653ef7efb97310362b46dcd8", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "679", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 07 Jul 2023 11:23:29 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "a139b460-31a9-4d84-87d1-08ff38f58dc7", + "x-ms-ratelimit-remaining-subscription-reads": "11784", + "x-ms-request-id": "a139b460-31a9-4d84-87d1-08ff38f58dc7", + "x-ms-routing-request-id": "UKSOUTH:20230707T112329Z:a139b460-31a9-4d84-87d1-08ff38f58dc7" + }, + "ResponseBody": { + "value": [ + { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg4069/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/CloudhsmSDKTest4854/privateEndpointConnections/pec-1003", + "name": "pec-1003", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters/privateEndpointConnections", + "etag": null, + "properties": { + "provisioningState": "SUCCEEDED", + "groupIds": [ + "cloudhsm" + ], + "privateEndpoint": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg4069/providers/Microsoft.Network/privateEndpoints/pe-3999" + }, + "privateLinkServiceConnectionState": { + "status": "Pending", + "description": "SDK testing", + "actionsRequired": "None" + } + } + } + ] + } + } + ], + "Variables": { + "AZURE_AUTHORITY_HOST": "https://login.microsoftonline.com", + "RandomSeed": "1410282409", + "RESOURCE_MANAGER_URL": null, + "SUBSCRIPTION_ID": "75e96d09-a291-40e1-a5e6-cda78233d867" + } +} diff --git a/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/tests/SessionRecords/CloudHsmClustersTests/CreateOrUpdateCloudHsmClusterTest().json b/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/tests/SessionRecords/CloudHsmClustersTests/CreateOrUpdateCloudHsmClusterTest().json new file mode 100644 index 000000000000..3e7f061d0b45 --- /dev/null +++ b/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/tests/SessionRecords/CloudHsmClustersTests/CreateOrUpdateCloudHsmClusterTest().json @@ -0,0 +1,894 @@ +{ + "Entries": [ + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867?api-version=2022-12-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-234879c3be93901fcefbb1244678418f-166f3c77f55b6af8-00", + "User-Agent": "azsdk-net-ResourceManager/1.13.0 (.NET 6.0.35; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "397", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 18 Oct 2024 13:58:45 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Cache": "CONFIG_NOCACHE", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "48409721-11f8-4576-934b-2815f0bd433c", + "x-ms-ratelimit-remaining-subscription-global-reads": "16499", + "x-ms-ratelimit-remaining-subscription-reads": "1099", + "x-ms-request-id": "48409721-11f8-4576-934b-2815f0bd433c", + "x-ms-routing-request-id": "NORTHEUROPE:20241018T135846Z:48409721-11f8-4576-934b-2815f0bd433c", + "X-MSEdge-Ref": "Ref A: CF810603542748E6B587C1547C058C78 Ref B: AMS231020615025 Ref C: 2024-10-18T13:58:46Z" + }, + "ResponseBody": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867", + "authorizationSource": "RoleBased", + "managedByTenants": [], + "subscriptionId": "75e96d09-a291-40e1-a5e6-cda78233d867", + "tenantId": "00000000-0000-0000-0000-000000000000", + "displayName": "susolank Projects", + "state": "Enabled", + "subscriptionPolicies": { + "locationPlacementId": "Internal_2014-09-01", + "quotaId": "Internal_2014-09-01", + "spendingLimit": "Off" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867?api-version=2022-12-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-4e272069c143e2e7a7491511f188024d-8b274f371f5327e4-00", + "User-Agent": "azsdk-net-ResourceManager/1.13.0 (.NET 6.0.35; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "397", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 18 Oct 2024 13:58:51 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Cache": "CONFIG_NOCACHE", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "3f615955-2c57-4a32-90cf-781369e6c0e5", + "x-ms-ratelimit-remaining-subscription-global-reads": "16499", + "x-ms-ratelimit-remaining-subscription-reads": "1099", + "x-ms-request-id": "3f615955-2c57-4a32-90cf-781369e6c0e5", + "x-ms-routing-request-id": "NORTHEUROPE:20241018T135851Z:3f615955-2c57-4a32-90cf-781369e6c0e5", + "X-MSEdge-Ref": "Ref A: D40CBD931C4C494A96CDBAE5CD778DF0 Ref B: AMS231020615025 Ref C: 2024-10-18T13:58:51Z" + }, + "ResponseBody": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867", + "authorizationSource": "RoleBased", + "managedByTenants": [], + "subscriptionId": "75e96d09-a291-40e1-a5e6-cda78233d867", + "tenantId": "00000000-0000-0000-0000-000000000000", + "displayName": "susolank Projects", + "state": "Enabled", + "subscriptionPolicies": { + "locationPlacementId": "Internal_2014-09-01", + "quotaId": "Internal_2014-09-01", + "spendingLimit": "Off" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourcegroups/chsmSdkTest4572?api-version=2022-09-01", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "21", + "Content-Type": "application/json", + "traceparent": "00-f818183f2f26d8813d8bff16d67ff22d-7f02ce4534626ad7-00", + "User-Agent": "azsdk-net-ResourceManager/1.13.0 (.NET 6.0.35; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "location": "eastus" + }, + "StatusCode": 201, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "227", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 18 Oct 2024 13:58:53 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Cache": "CONFIG_NOCACHE", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "42280c11-f2a8-4040-9672-4cccb309a3d0", + "x-ms-ratelimit-remaining-subscription-global-writes": "11999", + "x-ms-ratelimit-remaining-subscription-writes": "799", + "x-ms-request-id": "42280c11-f2a8-4040-9672-4cccb309a3d0", + "x-ms-routing-request-id": "NORTHEUROPE:20241018T135853Z:42280c11-f2a8-4040-9672-4cccb309a3d0", + "X-MSEdge-Ref": "Ref A: 505D501CDCBD49699E6E10301A180A6E Ref B: AMS231020615025 Ref C: 2024-10-18T13:58:52Z" + }, + "ResponseBody": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/chsmSdkTest4572", + "name": "chsmSdkTest4572", + "type": "Microsoft.Resources/resourceGroups", + "location": "eastus", + "properties": { + "provisioningState": "Succeeded" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/providers/Microsoft.ManagedIdentity?api-version=2022-09-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-05195ccdbbf0360c07489b765ea0e764-a8e61f9f360ddfb1-00", + "User-Agent": "azsdk-net-ResourceManager/1.13.0 (.NET 6.0.35; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "4445", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 18 Oct 2024 13:58:53 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Cache": "CONFIG_NOCACHE", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "06caa112-2fd6-4e48-bb5e-fb6167111373", + "x-ms-ratelimit-remaining-subscription-global-reads": "16499", + "x-ms-ratelimit-remaining-subscription-reads": "1099", + "x-ms-request-id": "06caa112-2fd6-4e48-bb5e-fb6167111373", + "x-ms-routing-request-id": "NORTHEUROPE:20241018T135854Z:06caa112-2fd6-4e48-bb5e-fb6167111373", + "X-MSEdge-Ref": "Ref A: BA784DDB20D242CD8FDBD3E162ECA74C Ref B: AMS231020615025 Ref C: 2024-10-18T13:58:54Z" + }, + "ResponseBody": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/providers/Microsoft.ManagedIdentity", + "namespace": "Microsoft.ManagedIdentity", + "resourceTypes": [ + { + "resourceType": "Identities", + "locations": [ + "Global", + "Asia", + "Australia", + "Brazil", + "Canada", + "Europe", + "France", + "Germany", + "India", + "Japan", + "Korea", + "Norway", + "South Africa", + "Sweden", + "Switzerland", + "UAE", + "UK", + "United States", + "Singapore", + "South Africa North", + "South Africa West", + "UAE North", + "Australia Central", + "Australia East", + "Australia Southeast", + "Canada Central", + "Canada East", + "Brazil South", + "Central India", + "West India", + "Jio India West", + "South India", + "Japan West", + "Japan East", + "East Asia", + "Southeast Asia", + "Israel Central", + "Italy North", + "Korea Central", + "Korea South", + "North Europe", + "Poland Central", + "Qatar Central", + "West Europe", + "UK West", + "UK South", + "Sweden Central", + "Switzerland West", + "Switzerland North", + "Germany West Central", + "Central US", + "North Central US", + "East US", + "East US 2", + "South Central US", + "West US", + "West US 2", + "West US 3", + "West Central US", + "France Central", + "Norway East", + "Mexico Central", + "Spain Central", + "New Zealand", + "Italy", + "Israel", + "Poland", + "Qatar", + "United States EUAP", + "East US 2 EUAP", + "Central US EUAP" + ], + "apiVersions": [ + "2023-07-31-PREVIEW", + "2023-01-31", + "2022-01-31-PREVIEW", + "2021-09-30-PREVIEW", + "2018-11-30", + "2015-08-31-PREVIEW" + ], + "defaultApiVersion": "2023-01-31", + "capabilities": "SupportsExtension" + }, + { + "resourceType": "userAssignedIdentities", + "locations": [ + "South Africa North", + "South Africa West", + "UAE North", + "Australia Central", + "Australia East", + "Australia Southeast", + "Canada Central", + "Canada East", + "Brazil South", + "Central India", + "West India", + "Jio India West", + "South India", + "Japan West", + "Japan East", + "East Asia", + "Israel Central", + "Italy North", + "Southeast Asia", + "Korea Central", + "Korea South", + "North Europe", + "Poland Central", + "Qatar Central", + "West Europe", + "UK West", + "UK South", + "Sweden Central", + "Switzerland West", + "Switzerland North", + "Germany West Central", + "Central US", + "North Central US", + "East US", + "East US 2", + "South Central US", + "West US", + "West US 2", + "West US 3", + "West Central US", + "France Central", + "Norway East", + "Mexico Central", + "Spain Central", + "New Zealand", + "Italy", + "Israel", + "Poland", + "Qatar", + "East US 2 EUAP", + "Central US EUAP" + ], + "apiVersions": [ + "2023-07-31-PREVIEW", + "2023-01-31", + "2022-01-31-PREVIEW", + "2021-09-30-PREVIEW", + "2018-11-30", + "2015-08-31-PREVIEW" + ], + "defaultApiVersion": "2023-01-31", + "capabilities": "SupportsTags, SupportsLocation" + }, + { + "resourceType": "operations", + "locations": [ + "South Africa North", + "South Africa West", + "UAE North", + "Australia Central", + "Australia East", + "Australia Southeast", + "Canada Central", + "Canada East", + "Brazil South", + "Central India", + "West India", + "Jio India West", + "South India", + "Japan West", + "Japan East", + "East Asia", + "Israel Central", + "Italy North", + "Southeast Asia", + "Korea Central", + "Korea South", + "North Europe", + "Poland Central", + "Qatar Central", + "West Europe", + "UK West", + "UK South", + "Sweden Central", + "Switzerland West", + "Switzerland North", + "Germany West Central", + "Central US", + "North Central US", + "East US", + "East US 2", + "South Central US", + "West US", + "West US 2", + "West US 3", + "West Central US", + "France Central", + "Norway East", + "Mexico Central", + "Spain Central", + "New Zealand", + "Italy", + "Israel", + "Poland", + "Qatar", + "East US 2 EUAP", + "Central US EUAP" + ], + "apiVersions": [ + "2023-07-31-PREVIEW", + "2023-01-31", + "2022-01-31-PREVIEW", + "2021-09-30-PREVIEW", + "2018-11-30", + "2015-08-31-PREVIEW" + ], + "defaultApiVersion": "2023-01-31", + "capabilities": "None" + }, + { + "resourceType": "userAssignedIdentities/federatedIdentityCredentials", + "locations": [ + "South Africa North", + "South Africa West", + "UAE North", + "Australia Central", + "Australia East", + "Australia Southeast", + "Canada Central", + "Canada East", + "Brazil South", + "Central India", + "West India", + "Jio India West", + "South India", + "Japan West", + "Japan East", + "East Asia", + "Israel Central", + "Italy North", + "Southeast Asia", + "Korea Central", + "Korea South", + "North Europe", + "Poland Central", + "Qatar Central", + "West Europe", + "UK West", + "UK South", + "Sweden Central", + "Switzerland West", + "Switzerland North", + "Germany West Central", + "Central US", + "North Central US", + "East US", + "East US 2", + "South Central US", + "West US", + "West US 2", + "West US 3", + "West Central US", + "France Central", + "Norway East", + "Mexico Central", + "Spain Central", + "New Zealand", + "Italy", + "Israel", + "Poland", + "Qatar", + "East US 2 EUAP", + "Central US EUAP" + ], + "apiVersions": [ + "2023-07-31-PREVIEW", + "2023-01-31", + "2022-01-31-PREVIEW" + ], + "defaultApiVersion": "2023-01-31", + "capabilities": "None" + } + ], + "registrationState": "Registered", + "registrationPolicy": "RegistrationRequired" + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/chsmSdkTest4572/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testRi-9957?api-version=2023-07-31-PREVIEW", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "21", + "Content-Type": "application/json", + "traceparent": "00-05195ccdbbf0360c07489b765ea0e764-7e21f4a177e59330-00", + "User-Agent": "azsdk-net-ResourceManager/1.13.0 (.NET 6.0.35; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "location": "ukwest" + }, + "StatusCode": 201, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "439", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 18 Oct 2024 13:58:56 GMT", + "Expires": "-1", + "Location": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourcegroups/chsmSdkTest4572/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testRi-9957", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Cache": "CONFIG_NOCACHE", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "4df74151-9779-4731-8c11-55606e745ac8", + "x-ms-ratelimit-remaining-subscription-global-writes": "11999", + "x-ms-ratelimit-remaining-subscription-writes": "799", + "x-ms-request-id": "4df74151-9779-4731-8c11-55606e745ac8", + "x-ms-routing-request-id": "NORTHEUROPE:20241018T135857Z:4df74151-9779-4731-8c11-55606e745ac8", + "X-MSEdge-Ref": "Ref A: F74631C2C8784052BE874F61B751A1C3 Ref B: AMS231020615025 Ref C: 2024-10-18T13:58:54Z" + }, + "ResponseBody": { + "location": "ukwest", + "tags": {}, + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourcegroups/chsmSdkTest4572/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testRi-9957", + "name": "testRi-9957", + "type": "Microsoft.ManagedIdentity/userAssignedIdentities", + "properties": { + "tenantId": "00000000-0000-0000-0000-000000000000", + "principalId": "00000000-0000-0000-0000-000000000000", + "clientId": "00000000-0000-0000-0000-000000000000" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourcegroups/chsmSdkTest4572/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testRi-9957?api-version=2023-07-31-PREVIEW", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-05195ccdbbf0360c07489b765ea0e764-0a48244be41044ab-00", + "User-Agent": "azsdk-net-ResourceManager/1.13.0 (.NET 6.0.35; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "439", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 18 Oct 2024 13:58:56 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Cache": "CONFIG_NOCACHE", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "3abc6b79-f79d-4a1b-8db6-4af7ebca081c", + "x-ms-ratelimit-remaining-subscription-global-reads": "16499", + "x-ms-ratelimit-remaining-subscription-reads": "1099", + "x-ms-request-id": "3abc6b79-f79d-4a1b-8db6-4af7ebca081c", + "x-ms-routing-request-id": "NORTHEUROPE:20241018T135857Z:3abc6b79-f79d-4a1b-8db6-4af7ebca081c", + "X-MSEdge-Ref": "Ref A: B45F41612AE44BC18D96C1EAB75D0ED6 Ref B: AMS231020615025 Ref C: 2024-10-18T13:58:57Z" + }, + "ResponseBody": { + "location": "ukwest", + "tags": {}, + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourcegroups/chsmSdkTest4572/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testRi-9957", + "name": "testRi-9957", + "type": "Microsoft.ManagedIdentity/userAssignedIdentities", + "properties": { + "tenantId": "00000000-0000-0000-0000-000000000000", + "principalId": "00000000-0000-0000-0000-000000000000", + "clientId": "00000000-0000-0000-0000-000000000000" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/chsmSdkTest4572/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/sdkT8586?api-version=2024-06-30-preview", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "147", + "Content-Type": "application/json", + "traceparent": "00-abe787321f3dd98e181c60a4f2673b06-6a8d05b05864a24b-00", + "User-Agent": "azsdk-net-ResourceManager.HardwareSecurityModules/1.0.0-alpha.20241018.1 (.NET 6.0.35; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "tags": { + "Dept": "SDK Testing", + "Env": "df", + "UseMockHfc": "true", + "MockHfcDelayInMs": "1" + }, + "location": "ukwest", + "sku": { + "family": "B", + "name": "Standard_B1" + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "839", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 18 Oct 2024 13:59:00 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Cache": "CONFIG_NOCACHE", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "e5907b73-1ba3-40f0-87af-ab070f18d452", + "x-ms-ratelimit-remaining-subscription-global-writes": "11999", + "x-ms-ratelimit-remaining-subscription-writes": "799", + "x-ms-request-id": "5d4f1158-eaec-47ba-aee3-65f8c95c1030", + "x-ms-routing-request-id": "NORTHEUROPE:20241018T135901Z:e5907b73-1ba3-40f0-87af-ab070f18d452", + "X-MSEdge-Ref": "Ref A: 1418B45751054A75B59C22CE7836F772 Ref B: AMS231020615025 Ref C: 2024-10-18T13:58:57Z" + }, + "ResponseBody": { + "name": "sdkT8586", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/chsmSdkTest4572/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/sdkT8586", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "statusMessage": null, + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "fipsApprovedMode": false, + "activationState": "NotDefined", + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df", + "UseMockHfc": "true", + "MockHfcDelayInMs": "1" + }, + "systemData": { + "createdBy": "Sanitized", + "createdByType": "User", + "createdAt": "2024-10-18T13:58:59.424Z", + "lastModifiedBy": "Sanitized", + "lastModifiedByType": "User", + "lastModifiedAt": "2024-10-18T13:58:59.424Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/chsmSdkTest4572/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/sdkT8586?api-version=2024-06-30-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-abe787321f3dd98e181c60a4f2673b06-fc50e44fb3f93511-00", + "User-Agent": "azsdk-net-ResourceManager/1.13.0 (.NET 6.0.35; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "839", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 18 Oct 2024 13:59:00 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Cache": "CONFIG_NOCACHE", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "8ac28d0e-ed0f-4474-81e8-1561551a6053", + "x-ms-ratelimit-remaining-subscription-global-reads": "16499", + "x-ms-ratelimit-remaining-subscription-reads": "1099", + "x-ms-request-id": "bc87210d-cee2-403d-9986-7ef3b47abd09", + "x-ms-routing-request-id": "NORTHEUROPE:20241018T135901Z:8ac28d0e-ed0f-4474-81e8-1561551a6053", + "X-MSEdge-Ref": "Ref A: 8A33ECEA2B2C4B1EA41CB6956CFFD010 Ref B: AMS231020615025 Ref C: 2024-10-18T13:59:01Z" + }, + "ResponseBody": { + "name": "sdkT8586", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/chsmSdkTest4572/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/sdkT8586", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "statusMessage": null, + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "fipsApprovedMode": false, + "activationState": "NotDefined", + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df", + "UseMockHfc": "true", + "MockHfcDelayInMs": "1" + }, + "systemData": { + "createdBy": "Sanitized", + "createdByType": "User", + "createdAt": "2024-10-18T13:58:59.424Z", + "lastModifiedBy": "Sanitized", + "lastModifiedByType": "User", + "lastModifiedAt": "2024-10-18T13:58:59.424Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/chsmSdkTest4572/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/sdkT8586?api-version=2024-06-30-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-abe787321f3dd98e181c60a4f2673b06-b355f53e37d5b69c-00", + "User-Agent": "azsdk-net-ResourceManager/1.13.0 (.NET 6.0.35; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "872", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 18 Oct 2024 13:59:02 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Cache": "CONFIG_NOCACHE", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "a4832518-969b-4cd3-bf5c-b2f20a36b127", + "x-ms-ratelimit-remaining-subscription-global-reads": "16499", + "x-ms-ratelimit-remaining-subscription-reads": "1099", + "x-ms-request-id": "68a1b530-0348-4d84-a875-12bf931e3499", + "x-ms-routing-request-id": "NORTHEUROPE:20241018T135902Z:a4832518-969b-4cd3-bf5c-b2f20a36b127", + "X-MSEdge-Ref": "Ref A: D4044E050BAC4229B9C2B6C5A1B34562 Ref B: AMS231020615025 Ref C: 2024-10-18T13:59:02Z" + }, + "ResponseBody": { + "name": "sdkT8586", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/chsmSdkTest4572/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/sdkT8586", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Succeeded", + "statusMessage": "HSM cluster provisioning successful.", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "fipsApprovedMode": false, + "activationState": "NotActivated", + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df", + "UseMockHfc": "true", + "MockHfcDelayInMs": "1" + }, + "systemData": { + "createdBy": "Sanitized", + "createdByType": "User", + "createdAt": "2024-10-18T13:58:59.424Z", + "lastModifiedBy": "Sanitized", + "lastModifiedByType": "User", + "lastModifiedAt": "2024-10-18T13:58:59.424Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/chsmSdkTest4572/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/sdkT8586?api-version=2024-06-30-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-596f06c2f193c5607fd450cef2d674da-590e670e3eef8ce4-00", + "User-Agent": "azsdk-net-ResourceManager.HardwareSecurityModules/1.0.0-alpha.20241018.1 (.NET 6.0.35; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "872", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 18 Oct 2024 13:59:02 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Cache": "CONFIG_NOCACHE", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "2eb62d06-5fcd-4e97-a6f1-99607928472f", + "x-ms-ratelimit-remaining-subscription-global-reads": "16499", + "x-ms-ratelimit-remaining-subscription-reads": "1099", + "x-ms-request-id": "35976fc5-fe7d-4794-ae38-3d1bcad64f99", + "x-ms-routing-request-id": "NORTHEUROPE:20241018T135903Z:2eb62d06-5fcd-4e97-a6f1-99607928472f", + "X-MSEdge-Ref": "Ref A: C842AABAD6B2481DACB12BD71E386B28 Ref B: AMS231020615025 Ref C: 2024-10-18T13:59:03Z" + }, + "ResponseBody": { + "name": "sdkT8586", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/chsmSdkTest4572/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/sdkT8586", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Succeeded", + "statusMessage": "HSM cluster provisioning successful.", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "fipsApprovedMode": false, + "activationState": "NotActivated", + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df", + "UseMockHfc": "true", + "MockHfcDelayInMs": "1" + }, + "systemData": { + "createdBy": "Sanitized", + "createdByType": "User", + "createdAt": "2024-10-18T13:58:59.424Z", + "lastModifiedBy": "Sanitized", + "lastModifiedByType": "User", + "lastModifiedAt": "2024-10-18T13:58:59.424Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/chsmSdkTest4572/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters?api-version=2024-06-30-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-4ad627da628c0643762b0addefe52490-cca04c99dc444cb4-00", + "User-Agent": "azsdk-net-ResourceManager.HardwareSecurityModules/1.0.0-alpha.20241018.1 (.NET 6.0.35; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "884", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 18 Oct 2024 13:59:02 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Cache": "CONFIG_NOCACHE", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "c704cb1b-9a3d-46ec-bc86-5a56d01f5631", + "x-ms-ratelimit-remaining-subscription-global-reads": "16499", + "x-ms-ratelimit-remaining-subscription-reads": "1099", + "x-ms-request-id": "511c8def-7edb-4c0d-9d27-ac9c868648e5", + "x-ms-routing-request-id": "NORTHEUROPE:20241018T135903Z:c704cb1b-9a3d-46ec-bc86-5a56d01f5631", + "X-MSEdge-Ref": "Ref A: C05A52F488864EFBBB9675B11BC31310 Ref B: AMS231020615025 Ref C: 2024-10-18T13:59:03Z" + }, + "ResponseBody": { + "value": [ + { + "name": "sdkT8586", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/chsmSdkTest4572/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/sdkT8586", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Succeeded", + "statusMessage": "HSM cluster provisioning successful.", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "fipsApprovedMode": false, + "activationState": "NotActivated", + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df", + "UseMockHfc": "true", + "MockHfcDelayInMs": "1" + }, + "systemData": { + "createdBy": "Sanitized", + "createdByType": "User", + "createdAt": "2024-10-18T13:58:59.424Z", + "lastModifiedBy": "Sanitized", + "lastModifiedByType": "User", + "lastModifiedAt": "2024-10-18T13:58:59.424Z" + } + } + ] + } + } + ], + "Variables": { + "RandomSeed": "992909360", + "RESOURCE_MANAGER_URL": null, + "SUBSCRIPTION_ID": "75e96d09-a291-40e1-a5e6-cda78233d867" + } +} diff --git a/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/tests/SessionRecords/CloudHsmClustersTests/CreateOrUpdateCloudHsmClusterTest()Async.json b/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/tests/SessionRecords/CloudHsmClustersTests/CreateOrUpdateCloudHsmClusterTest()Async.json new file mode 100644 index 000000000000..77f443727fa9 --- /dev/null +++ b/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/tests/SessionRecords/CloudHsmClustersTests/CreateOrUpdateCloudHsmClusterTest()Async.json @@ -0,0 +1,893 @@ +{ + "Entries": [ + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867?api-version=2022-12-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-72bac9f278e7a26b3cdbf5e33504f48d-5fb1316e3a30c9d6-00", + "User-Agent": "azsdk-net-ResourceManager/1.13.0 (.NET 6.0.35; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "397", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 18 Oct 2024 13:59:16 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Cache": "CONFIG_NOCACHE", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "928253ae-59f9-4145-8d12-f4bad50a5f4b", + "x-ms-ratelimit-remaining-subscription-global-reads": "16499", + "x-ms-ratelimit-remaining-subscription-reads": "1099", + "x-ms-request-id": "928253ae-59f9-4145-8d12-f4bad50a5f4b", + "x-ms-routing-request-id": "NORTHEUROPE:20241018T135917Z:928253ae-59f9-4145-8d12-f4bad50a5f4b", + "X-MSEdge-Ref": "Ref A: D7E3633A09FD4B91A3695B615E592D67 Ref B: AMS231020615025 Ref C: 2024-10-18T13:59:17Z" + }, + "ResponseBody": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867", + "authorizationSource": "RoleBased", + "managedByTenants": [], + "subscriptionId": "75e96d09-a291-40e1-a5e6-cda78233d867", + "tenantId": "00000000-0000-0000-0000-000000000000", + "displayName": "susolank Projects", + "state": "Enabled", + "subscriptionPolicies": { + "locationPlacementId": "Internal_2014-09-01", + "quotaId": "Internal_2014-09-01", + "spendingLimit": "Off" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867?api-version=2022-12-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-f126930d86ea0a3fdbee83e038328df2-2fb43607fda7abeb-00", + "User-Agent": "azsdk-net-ResourceManager/1.13.0 (.NET 6.0.35; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "397", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 18 Oct 2024 13:59:22 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Cache": "CONFIG_NOCACHE", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "8fad10cc-0cf0-4138-a783-97a49f801284", + "x-ms-ratelimit-remaining-subscription-global-reads": "16499", + "x-ms-ratelimit-remaining-subscription-reads": "1099", + "x-ms-request-id": "8fad10cc-0cf0-4138-a783-97a49f801284", + "x-ms-routing-request-id": "NORTHEUROPE:20241018T135923Z:8fad10cc-0cf0-4138-a783-97a49f801284", + "X-MSEdge-Ref": "Ref A: 9042A753FAAA4BE3BCDD5D471B18790A Ref B: AMS231020615025 Ref C: 2024-10-18T13:59:23Z" + }, + "ResponseBody": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867", + "authorizationSource": "RoleBased", + "managedByTenants": [], + "subscriptionId": "75e96d09-a291-40e1-a5e6-cda78233d867", + "tenantId": "00000000-0000-0000-0000-000000000000", + "displayName": "susolank Projects", + "state": "Enabled", + "subscriptionPolicies": { + "locationPlacementId": "Internal_2014-09-01", + "quotaId": "Internal_2014-09-01", + "spendingLimit": "Off" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourcegroups/chsmSdkTest2216?api-version=2022-09-01", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "21", + "Content-Type": "application/json", + "traceparent": "00-90308ec765c893dde0a1d5038ed6e76c-82e5e296b7e16677-00", + "User-Agent": "azsdk-net-ResourceManager/1.13.0 (.NET 6.0.35; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "location": "eastus" + }, + "StatusCode": 201, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "227", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 18 Oct 2024 13:59:24 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Cache": "CONFIG_NOCACHE", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "6a2bc947-dff9-45de-94ef-027ed8d2a241", + "x-ms-ratelimit-remaining-subscription-global-writes": "11999", + "x-ms-ratelimit-remaining-subscription-writes": "799", + "x-ms-request-id": "6a2bc947-dff9-45de-94ef-027ed8d2a241", + "x-ms-routing-request-id": "NORTHEUROPE:20241018T135925Z:6a2bc947-dff9-45de-94ef-027ed8d2a241", + "X-MSEdge-Ref": "Ref A: ACAC2F44427342E9998C5FF27B047FC7 Ref B: AMS231020615025 Ref C: 2024-10-18T13:59:23Z" + }, + "ResponseBody": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/chsmSdkTest2216", + "name": "chsmSdkTest2216", + "type": "Microsoft.Resources/resourceGroups", + "location": "eastus", + "properties": { + "provisioningState": "Succeeded" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/providers/Microsoft.ManagedIdentity?api-version=2022-09-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-460cc8b4eeec8deeb6d06091f3629c83-26699cd31a9a1a65-00", + "User-Agent": "azsdk-net-ResourceManager/1.13.0 (.NET 6.0.35; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "4445", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 18 Oct 2024 13:59:24 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Cache": "CONFIG_NOCACHE", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "ecf0b528-ca87-4d5a-aa32-ca6a51574123", + "x-ms-ratelimit-remaining-subscription-global-reads": "16499", + "x-ms-ratelimit-remaining-subscription-reads": "1099", + "x-ms-request-id": "ecf0b528-ca87-4d5a-aa32-ca6a51574123", + "x-ms-routing-request-id": "NORTHEUROPE:20241018T135925Z:ecf0b528-ca87-4d5a-aa32-ca6a51574123", + "X-MSEdge-Ref": "Ref A: A7FF767C36F64C3E8CE4C28562EB98FF Ref B: AMS231020615025 Ref C: 2024-10-18T13:59:25Z" + }, + "ResponseBody": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/providers/Microsoft.ManagedIdentity", + "namespace": "Microsoft.ManagedIdentity", + "resourceTypes": [ + { + "resourceType": "Identities", + "locations": [ + "Global", + "Asia", + "Australia", + "Brazil", + "Canada", + "Europe", + "France", + "Germany", + "India", + "Japan", + "Korea", + "Norway", + "South Africa", + "Sweden", + "Switzerland", + "UAE", + "UK", + "United States", + "Singapore", + "South Africa North", + "South Africa West", + "UAE North", + "Australia Central", + "Australia East", + "Australia Southeast", + "Canada Central", + "Canada East", + "Brazil South", + "Central India", + "West India", + "Jio India West", + "South India", + "Japan West", + "Japan East", + "East Asia", + "Southeast Asia", + "Israel Central", + "Italy North", + "Korea Central", + "Korea South", + "North Europe", + "Poland Central", + "Qatar Central", + "West Europe", + "UK West", + "UK South", + "Sweden Central", + "Switzerland West", + "Switzerland North", + "Germany West Central", + "Central US", + "North Central US", + "East US", + "East US 2", + "South Central US", + "West US", + "West US 2", + "West US 3", + "West Central US", + "France Central", + "Norway East", + "Mexico Central", + "Spain Central", + "New Zealand", + "Italy", + "Israel", + "Poland", + "Qatar", + "United States EUAP", + "East US 2 EUAP", + "Central US EUAP" + ], + "apiVersions": [ + "2023-07-31-PREVIEW", + "2023-01-31", + "2022-01-31-PREVIEW", + "2021-09-30-PREVIEW", + "2018-11-30", + "2015-08-31-PREVIEW" + ], + "defaultApiVersion": "2023-01-31", + "capabilities": "SupportsExtension" + }, + { + "resourceType": "userAssignedIdentities", + "locations": [ + "South Africa North", + "South Africa West", + "UAE North", + "Australia Central", + "Australia East", + "Australia Southeast", + "Canada Central", + "Canada East", + "Brazil South", + "Central India", + "West India", + "Jio India West", + "South India", + "Japan West", + "Japan East", + "East Asia", + "Israel Central", + "Italy North", + "Southeast Asia", + "Korea Central", + "Korea South", + "North Europe", + "Poland Central", + "Qatar Central", + "West Europe", + "UK West", + "UK South", + "Sweden Central", + "Switzerland West", + "Switzerland North", + "Germany West Central", + "Central US", + "North Central US", + "East US", + "East US 2", + "South Central US", + "West US", + "West US 2", + "West US 3", + "West Central US", + "France Central", + "Norway East", + "Mexico Central", + "Spain Central", + "New Zealand", + "Italy", + "Israel", + "Poland", + "Qatar", + "East US 2 EUAP", + "Central US EUAP" + ], + "apiVersions": [ + "2023-07-31-PREVIEW", + "2023-01-31", + "2022-01-31-PREVIEW", + "2021-09-30-PREVIEW", + "2018-11-30", + "2015-08-31-PREVIEW" + ], + "defaultApiVersion": "2023-01-31", + "capabilities": "SupportsTags, SupportsLocation" + }, + { + "resourceType": "operations", + "locations": [ + "South Africa North", + "South Africa West", + "UAE North", + "Australia Central", + "Australia East", + "Australia Southeast", + "Canada Central", + "Canada East", + "Brazil South", + "Central India", + "West India", + "Jio India West", + "South India", + "Japan West", + "Japan East", + "East Asia", + "Israel Central", + "Italy North", + "Southeast Asia", + "Korea Central", + "Korea South", + "North Europe", + "Poland Central", + "Qatar Central", + "West Europe", + "UK West", + "UK South", + "Sweden Central", + "Switzerland West", + "Switzerland North", + "Germany West Central", + "Central US", + "North Central US", + "East US", + "East US 2", + "South Central US", + "West US", + "West US 2", + "West US 3", + "West Central US", + "France Central", + "Norway East", + "Mexico Central", + "Spain Central", + "New Zealand", + "Italy", + "Israel", + "Poland", + "Qatar", + "East US 2 EUAP", + "Central US EUAP" + ], + "apiVersions": [ + "2023-07-31-PREVIEW", + "2023-01-31", + "2022-01-31-PREVIEW", + "2021-09-30-PREVIEW", + "2018-11-30", + "2015-08-31-PREVIEW" + ], + "defaultApiVersion": "2023-01-31", + "capabilities": "None" + }, + { + "resourceType": "userAssignedIdentities/federatedIdentityCredentials", + "locations": [ + "South Africa North", + "South Africa West", + "UAE North", + "Australia Central", + "Australia East", + "Australia Southeast", + "Canada Central", + "Canada East", + "Brazil South", + "Central India", + "West India", + "Jio India West", + "South India", + "Japan West", + "Japan East", + "East Asia", + "Israel Central", + "Italy North", + "Southeast Asia", + "Korea Central", + "Korea South", + "North Europe", + "Poland Central", + "Qatar Central", + "West Europe", + "UK West", + "UK South", + "Sweden Central", + "Switzerland West", + "Switzerland North", + "Germany West Central", + "Central US", + "North Central US", + "East US", + "East US 2", + "South Central US", + "West US", + "West US 2", + "West US 3", + "West Central US", + "France Central", + "Norway East", + "Mexico Central", + "Spain Central", + "New Zealand", + "Italy", + "Israel", + "Poland", + "Qatar", + "East US 2 EUAP", + "Central US EUAP" + ], + "apiVersions": [ + "2023-07-31-PREVIEW", + "2023-01-31", + "2022-01-31-PREVIEW" + ], + "defaultApiVersion": "2023-01-31", + "capabilities": "None" + } + ], + "registrationState": "Registered", + "registrationPolicy": "RegistrationRequired" + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/chsmSdkTest2216/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testRi-40?api-version=2023-07-31-PREVIEW", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "21", + "Content-Type": "application/json", + "traceparent": "00-460cc8b4eeec8deeb6d06091f3629c83-f1296188940f3c99-00", + "User-Agent": "azsdk-net-ResourceManager/1.13.0 (.NET 6.0.35; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "location": "ukwest" + }, + "StatusCode": 201, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "435", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 18 Oct 2024 13:59:27 GMT", + "Expires": "-1", + "Location": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourcegroups/chsmSdkTest2216/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testRi-40", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Cache": "CONFIG_NOCACHE", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "a1579fbf-74d7-42ab-b196-efedf8fffb96", + "x-ms-ratelimit-remaining-subscription-global-writes": "11999", + "x-ms-ratelimit-remaining-subscription-writes": "799", + "x-ms-request-id": "a1579fbf-74d7-42ab-b196-efedf8fffb96", + "x-ms-routing-request-id": "NORTHEUROPE:20241018T135928Z:a1579fbf-74d7-42ab-b196-efedf8fffb96", + "X-MSEdge-Ref": "Ref A: 3EA891E2C82142949EA467B02CC3863F Ref B: AMS231020615025 Ref C: 2024-10-18T13:59:25Z" + }, + "ResponseBody": { + "location": "ukwest", + "tags": {}, + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourcegroups/chsmSdkTest2216/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testRi-40", + "name": "testRi-40", + "type": "Microsoft.ManagedIdentity/userAssignedIdentities", + "properties": { + "tenantId": "00000000-0000-0000-0000-000000000000", + "principalId": "00000000-0000-0000-0000-000000000000", + "clientId": "00000000-0000-0000-0000-000000000000" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourcegroups/chsmSdkTest2216/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testRi-40?api-version=2023-07-31-PREVIEW", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-460cc8b4eeec8deeb6d06091f3629c83-6fa3dccb4942babe-00", + "User-Agent": "azsdk-net-ResourceManager/1.13.0 (.NET 6.0.35; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "435", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 18 Oct 2024 13:59:27 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Cache": "CONFIG_NOCACHE", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "6dc83fc4-d405-4919-9dfb-4ed0ac0b796d", + "x-ms-ratelimit-remaining-subscription-global-reads": "16499", + "x-ms-ratelimit-remaining-subscription-reads": "1099", + "x-ms-request-id": "6dc83fc4-d405-4919-9dfb-4ed0ac0b796d", + "x-ms-routing-request-id": "NORTHEUROPE:20241018T135928Z:6dc83fc4-d405-4919-9dfb-4ed0ac0b796d", + "X-MSEdge-Ref": "Ref A: 5D2C576FFC284930A3D5DFD91A1FE2BB Ref B: AMS231020615025 Ref C: 2024-10-18T13:59:28Z" + }, + "ResponseBody": { + "location": "ukwest", + "tags": {}, + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourcegroups/chsmSdkTest2216/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testRi-40", + "name": "testRi-40", + "type": "Microsoft.ManagedIdentity/userAssignedIdentities", + "properties": { + "tenantId": "00000000-0000-0000-0000-000000000000", + "principalId": "00000000-0000-0000-0000-000000000000", + "clientId": "00000000-0000-0000-0000-000000000000" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/chsmSdkTest2216/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/sdkT8351?api-version=2024-06-30-preview", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "147", + "Content-Type": "application/json", + "traceparent": "00-4cb88495adf3d02e97b928107e3268cf-7d5183810f18eb71-00", + "User-Agent": "azsdk-net-ResourceManager.HardwareSecurityModules/1.0.0-alpha.20241018.1 (.NET 6.0.35; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "tags": { + "Dept": "SDK Testing", + "Env": "df", + "UseMockHfc": "true", + "MockHfcDelayInMs": "1" + }, + "location": "ukwest", + "sku": { + "family": "B", + "name": "Standard_B1" + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "839", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 18 Oct 2024 13:59:31 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Cache": "CONFIG_NOCACHE", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "f476a169-f605-45aa-91e2-5b3ef2e59530", + "x-ms-ratelimit-remaining-subscription-global-writes": "11999", + "x-ms-ratelimit-remaining-subscription-writes": "799", + "x-ms-request-id": "46c927b9-98bf-40cb-90e4-baff37c26011", + "x-ms-routing-request-id": "NORTHEUROPE:20241018T135931Z:f476a169-f605-45aa-91e2-5b3ef2e59530", + "X-MSEdge-Ref": "Ref A: 4D0DA36344424815B22FADC27A99B62D Ref B: AMS231020615025 Ref C: 2024-10-18T13:59:28Z" + }, + "ResponseBody": { + "name": "sdkT8351", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/chsmSdkTest2216/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/sdkT8351", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "statusMessage": null, + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "fipsApprovedMode": false, + "activationState": "NotDefined", + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df", + "UseMockHfc": "true", + "MockHfcDelayInMs": "1" + }, + "systemData": { + "createdBy": "Sanitized", + "createdByType": "User", + "createdAt": "2024-10-18T13:59:29.662Z", + "lastModifiedBy": "Sanitized", + "lastModifiedByType": "User", + "lastModifiedAt": "2024-10-18T13:59:29.662Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/chsmSdkTest2216/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/sdkT8351?api-version=2024-06-30-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-4cb88495adf3d02e97b928107e3268cf-4cc5714703a86ad8-00", + "User-Agent": "azsdk-net-ResourceManager/1.13.0 (.NET 6.0.35; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "839", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 18 Oct 2024 13:59:31 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Cache": "CONFIG_NOCACHE", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "dbb71950-d3e8-4953-a4ff-0c008c3dce86", + "x-ms-ratelimit-remaining-subscription-global-reads": "16499", + "x-ms-ratelimit-remaining-subscription-reads": "1099", + "x-ms-request-id": "f0b48e92-b1c3-41cb-9629-0cc2c3a84f34", + "x-ms-routing-request-id": "NORTHEUROPE:20241018T135932Z:dbb71950-d3e8-4953-a4ff-0c008c3dce86", + "X-MSEdge-Ref": "Ref A: 9623F8DD15FA4114AAC62B97979AF996 Ref B: AMS231020615025 Ref C: 2024-10-18T13:59:32Z" + }, + "ResponseBody": { + "name": "sdkT8351", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/chsmSdkTest2216/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/sdkT8351", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "statusMessage": null, + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "fipsApprovedMode": false, + "activationState": "NotDefined", + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df", + "UseMockHfc": "true", + "MockHfcDelayInMs": "1" + }, + "systemData": { + "createdBy": "Sanitized", + "createdByType": "User", + "createdAt": "2024-10-18T13:59:29.662Z", + "lastModifiedBy": "Sanitized", + "lastModifiedByType": "User", + "lastModifiedAt": "2024-10-18T13:59:29.662Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/chsmSdkTest2216/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/sdkT8351?api-version=2024-06-30-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-4cb88495adf3d02e97b928107e3268cf-3ce8c6d19d60602d-00", + "User-Agent": "azsdk-net-ResourceManager/1.13.0 (.NET 6.0.35; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "872", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 18 Oct 2024 13:59:32 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Cache": "CONFIG_NOCACHE", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "2b60f144-5e8e-4c32-a844-6d58ffc57e0a", + "x-ms-ratelimit-remaining-subscription-global-reads": "16499", + "x-ms-ratelimit-remaining-subscription-reads": "1099", + "x-ms-request-id": "9e3dc915-044f-42ce-9b01-da035d523e80", + "x-ms-routing-request-id": "NORTHEUROPE:20241018T135933Z:2b60f144-5e8e-4c32-a844-6d58ffc57e0a", + "X-MSEdge-Ref": "Ref A: 29642C04B1FD40BB9AB76C1072D45FAE Ref B: AMS231020615025 Ref C: 2024-10-18T13:59:33Z" + }, + "ResponseBody": { + "name": "sdkT8351", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/chsmSdkTest2216/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/sdkT8351", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Succeeded", + "statusMessage": "HSM cluster provisioning successful.", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "fipsApprovedMode": false, + "activationState": "NotActivated", + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df", + "UseMockHfc": "true", + "MockHfcDelayInMs": "1" + }, + "systemData": { + "createdBy": "Sanitized", + "createdByType": "User", + "createdAt": "2024-10-18T13:59:29.662Z", + "lastModifiedBy": "Sanitized", + "lastModifiedByType": "User", + "lastModifiedAt": "2024-10-18T13:59:29.662Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/chsmSdkTest2216/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/sdkT8351?api-version=2024-06-30-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-0e35629bfa479670c6d684a616c5aaf1-48023d8ea0497c03-00", + "User-Agent": "azsdk-net-ResourceManager.HardwareSecurityModules/1.0.0-alpha.20241018.1 (.NET 6.0.35; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "872", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 18 Oct 2024 13:59:33 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Cache": "CONFIG_NOCACHE", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "f2964a5c-78e2-4431-a192-5694bf36f841", + "x-ms-ratelimit-remaining-subscription-global-reads": "16499", + "x-ms-ratelimit-remaining-subscription-reads": "1099", + "x-ms-request-id": "6a93251c-f63e-4df0-8d68-6f5ca75d761b", + "x-ms-routing-request-id": "NORTHEUROPE:20241018T135933Z:f2964a5c-78e2-4431-a192-5694bf36f841", + "X-MSEdge-Ref": "Ref A: F2AD0AAC08844140AA18CC53DA1CAA6B Ref B: AMS231020615025 Ref C: 2024-10-18T13:59:33Z" + }, + "ResponseBody": { + "name": "sdkT8351", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/chsmSdkTest2216/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/sdkT8351", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Succeeded", + "statusMessage": "HSM cluster provisioning successful.", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "fipsApprovedMode": false, + "activationState": "NotActivated", + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df", + "UseMockHfc": "true", + "MockHfcDelayInMs": "1" + }, + "systemData": { + "createdBy": "Sanitized", + "createdByType": "User", + "createdAt": "2024-10-18T13:59:29.662Z", + "lastModifiedBy": "Sanitized", + "lastModifiedByType": "User", + "lastModifiedAt": "2024-10-18T13:59:29.662Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/chsmSdkTest2216/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters?api-version=2024-06-30-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "User-Agent": "azsdk-net-ResourceManager.HardwareSecurityModules/1.0.0-alpha.20241018.1 (.NET 6.0.35; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "884", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 18 Oct 2024 13:59:33 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Cache": "CONFIG_NOCACHE", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "ef7571f5-4607-4ab1-bfce-728e657888a2", + "x-ms-ratelimit-remaining-subscription-global-reads": "16499", + "x-ms-ratelimit-remaining-subscription-reads": "1099", + "x-ms-request-id": "c008b71b-7370-4ba1-b0b2-ced11c4c0018", + "x-ms-routing-request-id": "NORTHEUROPE:20241018T135934Z:ef7571f5-4607-4ab1-bfce-728e657888a2", + "X-MSEdge-Ref": "Ref A: FE00CB007C7B4DBAA537B2EED091ED71 Ref B: AMS231020615025 Ref C: 2024-10-18T13:59:34Z" + }, + "ResponseBody": { + "value": [ + { + "name": "sdkT8351", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/chsmSdkTest2216/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/sdkT8351", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Succeeded", + "statusMessage": "HSM cluster provisioning successful.", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "fipsApprovedMode": false, + "activationState": "NotActivated", + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df", + "UseMockHfc": "true", + "MockHfcDelayInMs": "1" + }, + "systemData": { + "createdBy": "Sanitized", + "createdByType": "User", + "createdAt": "2024-10-18T13:59:29.662Z", + "lastModifiedBy": "Sanitized", + "lastModifiedByType": "User", + "lastModifiedAt": "2024-10-18T13:59:29.662Z" + } + } + ] + } + } + ], + "Variables": { + "RandomSeed": "1278685139", + "RESOURCE_MANAGER_URL": null, + "SUBSCRIPTION_ID": "75e96d09-a291-40e1-a5e6-cda78233d867" + } +} diff --git a/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/tests/SessionRecords/CloudHsmClustersTests/CreateOrUpdateCloudHsmClusterTest.json b/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/tests/SessionRecords/CloudHsmClustersTests/CreateOrUpdateCloudHsmClusterTest.json new file mode 100644 index 000000000000..596018ac415e --- /dev/null +++ b/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/tests/SessionRecords/CloudHsmClustersTests/CreateOrUpdateCloudHsmClusterTest.json @@ -0,0 +1,541 @@ +{ + "Entries": [ + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867?api-version=2022-12-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-f1fe5345e864c045d1369ffd1d689169-647691fb7d3368b4-00", + "User-Agent": "azsdk-net-ResourceManager/1.13.0 (.NET 6.0.35; Microsoft Windows 10.0.22631)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "397", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 17 Oct 2024 12:34:21 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Cache": "CONFIG_NOCACHE", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "6fda2d2d-6939-4d10-8427-718b74359508", + "x-ms-ratelimit-remaining-subscription-global-reads": "16499", + "x-ms-ratelimit-remaining-subscription-reads": "1099", + "x-ms-request-id": "6fda2d2d-6939-4d10-8427-718b74359508", + "x-ms-routing-request-id": "NORTHEUROPE:20241017T123422Z:6fda2d2d-6939-4d10-8427-718b74359508", + "X-MSEdge-Ref": "Ref A: 4E5348BB18DB4F2982C9B1F40CD49B2A Ref B: DB3EDGE2809 Ref C: 2024-10-17T12:34:22Z" + }, + "ResponseBody": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867", + "authorizationSource": "RoleBased", + "managedByTenants": [], + "subscriptionId": "75e96d09-a291-40e1-a5e6-cda78233d867", + "tenantId": "00000000-0000-0000-0000-000000000000", + "displayName": "susolank Projects", + "state": "Enabled", + "subscriptionPolicies": { + "locationPlacementId": "Internal_2014-09-01", + "quotaId": "Internal_2014-09-01", + "spendingLimit": "Off" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867?api-version=2022-12-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-1eac09524fb87a2fb7434f2b0ec8773f-f8265dc65ca44604-00", + "User-Agent": "azsdk-net-ResourceManager/1.13.0 (.NET 6.0.35; Microsoft Windows 10.0.22631)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "397", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 17 Oct 2024 12:34:23 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Cache": "CONFIG_NOCACHE", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "d8c8673f-b68d-4dc3-b351-2e134567d6cb", + "x-ms-ratelimit-remaining-subscription-global-reads": "16499", + "x-ms-ratelimit-remaining-subscription-reads": "1099", + "x-ms-request-id": "d8c8673f-b68d-4dc3-b351-2e134567d6cb", + "x-ms-routing-request-id": "NORTHEUROPE:20241017T123424Z:d8c8673f-b68d-4dc3-b351-2e134567d6cb", + "X-MSEdge-Ref": "Ref A: 182825C68DC742AFBF39BC6528DA9AC3 Ref B: DB3EDGE2809 Ref C: 2024-10-17T12:34:24Z" + }, + "ResponseBody": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867", + "authorizationSource": "RoleBased", + "managedByTenants": [], + "subscriptionId": "75e96d09-a291-40e1-a5e6-cda78233d867", + "tenantId": "00000000-0000-0000-0000-000000000000", + "displayName": "susolank Projects", + "state": "Enabled", + "subscriptionPolicies": { + "locationPlacementId": "Internal_2014-09-01", + "quotaId": "Internal_2014-09-01", + "spendingLimit": "Off" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourcegroups/chsmSdkTest2271?api-version=2022-09-01", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "21", + "Content-Type": "application/json", + "traceparent": "00-a20e02f46d17ec0a3a75922def39c43d-d83328ab015061d1-00", + "User-Agent": "azsdk-net-ResourceManager/1.13.0 (.NET 6.0.35; Microsoft Windows 10.0.22631)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "location": "eastus" + }, + "StatusCode": 201, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "227", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 17 Oct 2024 12:34:25 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Cache": "CONFIG_NOCACHE", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "545fe4b3-f4db-4e7d-bd6c-3cd72ef60fe9", + "x-ms-ratelimit-remaining-subscription-global-writes": "11999", + "x-ms-ratelimit-remaining-subscription-writes": "799", + "x-ms-request-id": "545fe4b3-f4db-4e7d-bd6c-3cd72ef60fe9", + "x-ms-routing-request-id": "NORTHEUROPE:20241017T123426Z:545fe4b3-f4db-4e7d-bd6c-3cd72ef60fe9", + "X-MSEdge-Ref": "Ref A: 2069BC7B5E2148BA8D32C74BD1579FF3 Ref B: DB3EDGE2809 Ref C: 2024-10-17T12:34:24Z" + }, + "ResponseBody": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/chsmSdkTest2271", + "name": "chsmSdkTest2271", + "type": "Microsoft.Resources/resourceGroups", + "location": "eastus", + "properties": { + "provisioningState": "Succeeded" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/chsmSdkTest2271/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/sdkT4017?api-version=2024-06-30-preview", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "126", + "Content-Type": "application/json", + "traceparent": "00-6f5cc29eead1615950766e28512dd7b6-80b3602ee3ecad80-00", + "User-Agent": "azsdk-net-ResourceManager.HardwareSecurityModules/1.0.0-alpha.20241017.1 (.NET 6.0.35; Microsoft Windows 10.0.22631)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "tags": { + "Env": "df", + "UseMockHfc": "true", + "MockHfcDelayInMs": "1" + }, + "location": "ukwest", + "sku": { + "family": "B", + "name": "Standard_B1" + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "818", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 17 Oct 2024 12:34:29 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Cache": "CONFIG_NOCACHE", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "7a3e2cbc-0b44-4b00-be66-c30b8613cfde", + "x-ms-ratelimit-remaining-subscription-global-writes": "11999", + "x-ms-ratelimit-remaining-subscription-writes": "799", + "x-ms-request-id": "5bda2c7e-d0f2-45bf-af2e-39ebe069578e", + "x-ms-routing-request-id": "NORTHEUROPE:20241017T123430Z:7a3e2cbc-0b44-4b00-be66-c30b8613cfde", + "X-MSEdge-Ref": "Ref A: E556D3240FEE42DB958B0ED0CC405721 Ref B: DB3EDGE2809 Ref C: 2024-10-17T12:34:26Z" + }, + "ResponseBody": { + "name": "sdkT4017", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/chsmSdkTest2271/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/sdkT4017", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "statusMessage": null, + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "fipsApprovedMode": false, + "activationState": "NotDefined", + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Env": "df", + "UseMockHfc": "true", + "MockHfcDelayInMs": "1" + }, + "systemData": { + "createdBy": "Sanitized", + "createdByType": "User", + "createdAt": "2024-10-17T12:34:27.899Z", + "lastModifiedBy": "Sanitized", + "lastModifiedByType": "User", + "lastModifiedAt": "2024-10-17T12:34:27.899Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/chsmSdkTest2271/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/sdkT4017?api-version=2024-06-30-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-6f5cc29eead1615950766e28512dd7b6-1d4927e8042110b9-00", + "User-Agent": "azsdk-net-ResourceManager/1.13.0 (.NET 6.0.35; Microsoft Windows 10.0.22631)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "818", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 17 Oct 2024 12:34:29 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Cache": "CONFIG_NOCACHE", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "92c53732-671d-4016-b5fc-462f4c3fa385", + "x-ms-ratelimit-remaining-subscription-global-reads": "16499", + "x-ms-ratelimit-remaining-subscription-reads": "1099", + "x-ms-request-id": "fb7aa35c-d11d-4115-bb5e-ccd8be8d8b1a", + "x-ms-routing-request-id": "NORTHEUROPE:20241017T123430Z:92c53732-671d-4016-b5fc-462f4c3fa385", + "X-MSEdge-Ref": "Ref A: DBB85B28C93941EB86165573AD91A33B Ref B: DB3EDGE2809 Ref C: 2024-10-17T12:34:30Z" + }, + "ResponseBody": { + "name": "sdkT4017", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/chsmSdkTest2271/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/sdkT4017", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "statusMessage": null, + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "fipsApprovedMode": false, + "activationState": "NotDefined", + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Env": "df", + "UseMockHfc": "true", + "MockHfcDelayInMs": "1" + }, + "systemData": { + "createdBy": "Sanitized", + "createdByType": "User", + "createdAt": "2024-10-17T12:34:27.899Z", + "lastModifiedBy": "Sanitized", + "lastModifiedByType": "User", + "lastModifiedAt": "2024-10-17T12:34:27.899Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/chsmSdkTest2271/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/sdkT4017?api-version=2024-06-30-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-6f5cc29eead1615950766e28512dd7b6-4834bf3b3b0d992a-00", + "User-Agent": "azsdk-net-ResourceManager/1.13.0 (.NET 6.0.35; Microsoft Windows 10.0.22631)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "818", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 17 Oct 2024 12:34:31 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Cache": "CONFIG_NOCACHE", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "eb052980-3eba-4f72-8265-47dd8c3e1c4e", + "x-ms-ratelimit-remaining-subscription-global-reads": "16499", + "x-ms-ratelimit-remaining-subscription-reads": "1099", + "x-ms-request-id": "bf98b58b-e476-4f23-ab22-b73e6403aaa3", + "x-ms-routing-request-id": "NORTHEUROPE:20241017T123432Z:eb052980-3eba-4f72-8265-47dd8c3e1c4e", + "X-MSEdge-Ref": "Ref A: C755514FD9E149D58969EB9BCAA34EA1 Ref B: DB3EDGE2809 Ref C: 2024-10-17T12:34:31Z" + }, + "ResponseBody": { + "name": "sdkT4017", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/chsmSdkTest2271/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/sdkT4017", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "statusMessage": null, + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "fipsApprovedMode": false, + "activationState": "NotDefined", + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Env": "df", + "UseMockHfc": "true", + "MockHfcDelayInMs": "1" + }, + "systemData": { + "createdBy": "Sanitized", + "createdByType": "User", + "createdAt": "2024-10-17T12:34:27.899Z", + "lastModifiedBy": "Sanitized", + "lastModifiedByType": "User", + "lastModifiedAt": "2024-10-17T12:34:27.899Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/chsmSdkTest2271/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/sdkT4017?api-version=2024-06-30-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-6f5cc29eead1615950766e28512dd7b6-618ca317cfccee21-00", + "User-Agent": "azsdk-net-ResourceManager/1.13.0 (.NET 6.0.35; Microsoft Windows 10.0.22631)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "851", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 17 Oct 2024 12:34:33 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Cache": "CONFIG_NOCACHE", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "a4c302c3-ab61-445f-9343-bb37c1d9c76f", + "x-ms-ratelimit-remaining-subscription-global-reads": "16499", + "x-ms-ratelimit-remaining-subscription-reads": "1099", + "x-ms-request-id": "32939495-2e29-4328-8a40-a75c982a2366", + "x-ms-routing-request-id": "NORTHEUROPE:20241017T123433Z:a4c302c3-ab61-445f-9343-bb37c1d9c76f", + "X-MSEdge-Ref": "Ref A: 44DB6188834F4DF68058373CF0DE7203 Ref B: DB3EDGE2809 Ref C: 2024-10-17T12:34:33Z" + }, + "ResponseBody": { + "name": "sdkT4017", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/chsmSdkTest2271/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/sdkT4017", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Succeeded", + "statusMessage": "HSM cluster provisioning successful.", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "fipsApprovedMode": false, + "activationState": "NotActivated", + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Env": "df", + "UseMockHfc": "true", + "MockHfcDelayInMs": "1" + }, + "systemData": { + "createdBy": "Sanitized", + "createdByType": "User", + "createdAt": "2024-10-17T12:34:27.899Z", + "lastModifiedBy": "Sanitized", + "lastModifiedByType": "User", + "lastModifiedAt": "2024-10-17T12:34:27.899Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/chsmSdkTest2271/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/sdkT4017?api-version=2024-06-30-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-234ec6c99a9aaf4cd4ba88f40d24a40b-ed8ef5300b05ffc6-00", + "User-Agent": "azsdk-net-ResourceManager.HardwareSecurityModules/1.0.0-alpha.20241017.1 (.NET 6.0.35; Microsoft Windows 10.0.22631)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "851", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 17 Oct 2024 12:34:33 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Cache": "CONFIG_NOCACHE", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "ac27150f-e87f-4ac0-b8db-db93bbe601f6", + "x-ms-ratelimit-remaining-subscription-global-reads": "16499", + "x-ms-ratelimit-remaining-subscription-reads": "1099", + "x-ms-request-id": "363c3f59-f2d4-4e73-95af-df3082bc83fc", + "x-ms-routing-request-id": "NORTHEUROPE:20241017T123434Z:ac27150f-e87f-4ac0-b8db-db93bbe601f6", + "X-MSEdge-Ref": "Ref A: 8ECD7641DC1E4E6A902EF540725D5D3E Ref B: DB3EDGE2809 Ref C: 2024-10-17T12:34:34Z" + }, + "ResponseBody": { + "name": "sdkT4017", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/chsmSdkTest2271/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/sdkT4017", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Succeeded", + "statusMessage": "HSM cluster provisioning successful.", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "fipsApprovedMode": false, + "activationState": "NotActivated", + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Env": "df", + "UseMockHfc": "true", + "MockHfcDelayInMs": "1" + }, + "systemData": { + "createdBy": "Sanitized", + "createdByType": "User", + "createdAt": "2024-10-17T12:34:27.899Z", + "lastModifiedBy": "Sanitized", + "lastModifiedByType": "User", + "lastModifiedAt": "2024-10-17T12:34:27.899Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/chsmSdkTest2271/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters?api-version=2024-06-30-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-124bdc7fcced81507e6fdd9c38733afb-d90b72ee4b54641b-00", + "User-Agent": "azsdk-net-ResourceManager.HardwareSecurityModules/1.0.0-alpha.20241017.1 (.NET 6.0.35; Microsoft Windows 10.0.22631)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "863", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 17 Oct 2024 12:34:33 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Cache": "CONFIG_NOCACHE", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "2d358f0e-ca83-43af-a660-98935644c4f6", + "x-ms-ratelimit-remaining-subscription-global-reads": "16499", + "x-ms-ratelimit-remaining-subscription-reads": "1099", + "x-ms-request-id": "1266a7b1-d757-4cd4-b18f-760a31084e25", + "x-ms-routing-request-id": "NORTHEUROPE:20241017T123434Z:2d358f0e-ca83-43af-a660-98935644c4f6", + "X-MSEdge-Ref": "Ref A: 00C5FB603BE248CCA8CFDB0FB2CFD940 Ref B: DB3EDGE2809 Ref C: 2024-10-17T12:34:34Z" + }, + "ResponseBody": { + "value": [ + { + "name": "sdkT4017", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/chsmSdkTest2271/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/sdkT4017", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Succeeded", + "statusMessage": "HSM cluster provisioning successful.", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "fipsApprovedMode": false, + "activationState": "NotActivated", + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Env": "df", + "UseMockHfc": "true", + "MockHfcDelayInMs": "1" + }, + "systemData": { + "createdBy": "Sanitized", + "createdByType": "User", + "createdAt": "2024-10-17T12:34:27.899Z", + "lastModifiedBy": "Sanitized", + "lastModifiedByType": "User", + "lastModifiedAt": "2024-10-17T12:34:27.899Z" + } + } + ] + } + } + ], + "Variables": { + "RandomSeed": "1481512075", + "RESOURCE_MANAGER_URL": null, + "SUBSCRIPTION_ID": "75e96d09-a291-40e1-a5e6-cda78233d867" + } +} diff --git a/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/tests/SessionRecords/CloudHsmClustersTests/CreateOrUpdateCloudHsmClusterTestAsync.json b/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/tests/SessionRecords/CloudHsmClustersTests/CreateOrUpdateCloudHsmClusterTestAsync.json new file mode 100644 index 000000000000..ebee378884c5 --- /dev/null +++ b/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/tests/SessionRecords/CloudHsmClustersTests/CreateOrUpdateCloudHsmClusterTestAsync.json @@ -0,0 +1,540 @@ +{ + "Entries": [ + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867?api-version=2022-12-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-6c55b4cf8a056226bb2680728e972a7b-5c14c1bf209676f0-00", + "User-Agent": "azsdk-net-ResourceManager/1.13.0 (.NET 6.0.35; Microsoft Windows 10.0.22631)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "397", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 17 Oct 2024 12:34:43 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Cache": "CONFIG_NOCACHE", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "6fa49ae9-5e2a-4533-8778-66ddcb88f751", + "x-ms-ratelimit-remaining-subscription-global-reads": "16499", + "x-ms-ratelimit-remaining-subscription-reads": "1099", + "x-ms-request-id": "6fa49ae9-5e2a-4533-8778-66ddcb88f751", + "x-ms-routing-request-id": "NORTHEUROPE:20241017T123444Z:6fa49ae9-5e2a-4533-8778-66ddcb88f751", + "X-MSEdge-Ref": "Ref A: 43CD2C24B1BA4A4AA2123A04A2B3BB6A Ref B: DB3EDGE2809 Ref C: 2024-10-17T12:34:44Z" + }, + "ResponseBody": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867", + "authorizationSource": "RoleBased", + "managedByTenants": [], + "subscriptionId": "75e96d09-a291-40e1-a5e6-cda78233d867", + "tenantId": "00000000-0000-0000-0000-000000000000", + "displayName": "susolank Projects", + "state": "Enabled", + "subscriptionPolicies": { + "locationPlacementId": "Internal_2014-09-01", + "quotaId": "Internal_2014-09-01", + "spendingLimit": "Off" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867?api-version=2022-12-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-2170248ff2ffaeca2f31d3097e28b9cb-1509af9642daa44d-00", + "User-Agent": "azsdk-net-ResourceManager/1.13.0 (.NET 6.0.35; Microsoft Windows 10.0.22631)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "397", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 17 Oct 2024 12:34:45 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Cache": "CONFIG_NOCACHE", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "78087167-1211-4015-89df-5452aa5e4e06", + "x-ms-ratelimit-remaining-subscription-global-reads": "16499", + "x-ms-ratelimit-remaining-subscription-reads": "1099", + "x-ms-request-id": "78087167-1211-4015-89df-5452aa5e4e06", + "x-ms-routing-request-id": "NORTHEUROPE:20241017T123446Z:78087167-1211-4015-89df-5452aa5e4e06", + "X-MSEdge-Ref": "Ref A: 86D9DDC5856C4CDBA1DEE03F98CDC94F Ref B: DB3EDGE2809 Ref C: 2024-10-17T12:34:46Z" + }, + "ResponseBody": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867", + "authorizationSource": "RoleBased", + "managedByTenants": [], + "subscriptionId": "75e96d09-a291-40e1-a5e6-cda78233d867", + "tenantId": "00000000-0000-0000-0000-000000000000", + "displayName": "susolank Projects", + "state": "Enabled", + "subscriptionPolicies": { + "locationPlacementId": "Internal_2014-09-01", + "quotaId": "Internal_2014-09-01", + "spendingLimit": "Off" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourcegroups/chsmSdkTest7347?api-version=2022-09-01", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "21", + "Content-Type": "application/json", + "traceparent": "00-dcf1028683776ebf27ab6953a0a01709-b84001121801fd9d-00", + "User-Agent": "azsdk-net-ResourceManager/1.13.0 (.NET 6.0.35; Microsoft Windows 10.0.22631)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "location": "eastus" + }, + "StatusCode": 201, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "227", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 17 Oct 2024 12:34:47 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Cache": "CONFIG_NOCACHE", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "a475ff21-3983-4f1e-83f9-d43101259baf", + "x-ms-ratelimit-remaining-subscription-global-writes": "11999", + "x-ms-ratelimit-remaining-subscription-writes": "799", + "x-ms-request-id": "a475ff21-3983-4f1e-83f9-d43101259baf", + "x-ms-routing-request-id": "NORTHEUROPE:20241017T123448Z:a475ff21-3983-4f1e-83f9-d43101259baf", + "X-MSEdge-Ref": "Ref A: D9DF73F4847A4B0FAE5ED9225447E59A Ref B: DB3EDGE2809 Ref C: 2024-10-17T12:34:46Z" + }, + "ResponseBody": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/chsmSdkTest7347", + "name": "chsmSdkTest7347", + "type": "Microsoft.Resources/resourceGroups", + "location": "eastus", + "properties": { + "provisioningState": "Succeeded" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/chsmSdkTest7347/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/sdkT6446?api-version=2024-06-30-preview", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "126", + "Content-Type": "application/json", + "traceparent": "00-75b5f19198bd00d70fbf0d3f80d23835-aefff984447f8b60-00", + "User-Agent": "azsdk-net-ResourceManager.HardwareSecurityModules/1.0.0-alpha.20241017.1 (.NET 6.0.35; Microsoft Windows 10.0.22631)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "tags": { + "Env": "df", + "UseMockHfc": "true", + "MockHfcDelayInMs": "1" + }, + "location": "ukwest", + "sku": { + "family": "B", + "name": "Standard_B1" + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "818", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 17 Oct 2024 12:34:51 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Cache": "CONFIG_NOCACHE", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "faeed60a-1e95-48c3-be3f-d68a6fcca5f8", + "x-ms-ratelimit-remaining-subscription-global-writes": "11999", + "x-ms-ratelimit-remaining-subscription-writes": "799", + "x-ms-request-id": "b7638f00-a158-4bd3-a896-44c5b4b32e37", + "x-ms-routing-request-id": "NORTHEUROPE:20241017T123452Z:faeed60a-1e95-48c3-be3f-d68a6fcca5f8", + "X-MSEdge-Ref": "Ref A: 664751FF321842F68E2AED5ED8D2E2DB Ref B: DB3EDGE2809 Ref C: 2024-10-17T12:34:48Z" + }, + "ResponseBody": { + "name": "sdkT6446", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/chsmSdkTest7347/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/sdkT6446", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "statusMessage": null, + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "fipsApprovedMode": false, + "activationState": "NotDefined", + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Env": "df", + "UseMockHfc": "true", + "MockHfcDelayInMs": "1" + }, + "systemData": { + "createdBy": "Sanitized", + "createdByType": "User", + "createdAt": "2024-10-17T12:34:49.756Z", + "lastModifiedBy": "Sanitized", + "lastModifiedByType": "User", + "lastModifiedAt": "2024-10-17T12:34:49.756Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/chsmSdkTest7347/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/sdkT6446?api-version=2024-06-30-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-75b5f19198bd00d70fbf0d3f80d23835-66ee1bb2b1696855-00", + "User-Agent": "azsdk-net-ResourceManager/1.13.0 (.NET 6.0.35; Microsoft Windows 10.0.22631)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "818", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 17 Oct 2024 12:34:51 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Cache": "CONFIG_NOCACHE", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "5755027e-d124-4692-aa8c-dfbae339886e", + "x-ms-ratelimit-remaining-subscription-global-reads": "16499", + "x-ms-ratelimit-remaining-subscription-reads": "1099", + "x-ms-request-id": "badc274b-b9a9-46c8-b954-22c2f8fe95d9", + "x-ms-routing-request-id": "NORTHEUROPE:20241017T123452Z:5755027e-d124-4692-aa8c-dfbae339886e", + "X-MSEdge-Ref": "Ref A: 160D419CCD2E42E6983A54A6E48671A3 Ref B: DB3EDGE2809 Ref C: 2024-10-17T12:34:52Z" + }, + "ResponseBody": { + "name": "sdkT6446", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/chsmSdkTest7347/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/sdkT6446", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "statusMessage": null, + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "fipsApprovedMode": false, + "activationState": "NotDefined", + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Env": "df", + "UseMockHfc": "true", + "MockHfcDelayInMs": "1" + }, + "systemData": { + "createdBy": "Sanitized", + "createdByType": "User", + "createdAt": "2024-10-17T12:34:49.756Z", + "lastModifiedBy": "Sanitized", + "lastModifiedByType": "User", + "lastModifiedAt": "2024-10-17T12:34:49.756Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/chsmSdkTest7347/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/sdkT6446?api-version=2024-06-30-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-75b5f19198bd00d70fbf0d3f80d23835-9ef88d0f9f8191c6-00", + "User-Agent": "azsdk-net-ResourceManager/1.13.0 (.NET 6.0.35; Microsoft Windows 10.0.22631)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "903", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 17 Oct 2024 12:34:52 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Cache": "CONFIG_NOCACHE", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "5aef7f52-b0aa-47b2-bb16-6715d934e6da", + "x-ms-ratelimit-remaining-subscription-global-reads": "16499", + "x-ms-ratelimit-remaining-subscription-reads": "1099", + "x-ms-request-id": "ccf8f68f-2903-42f4-8ded-546972e447c4", + "x-ms-routing-request-id": "NORTHEUROPE:20241017T123453Z:5aef7f52-b0aa-47b2-bb16-6715d934e6da", + "X-MSEdge-Ref": "Ref A: 127391E43F48452580B0171D725E56C1 Ref B: DB3EDGE2809 Ref C: 2024-10-17T12:34:53Z" + }, + "ResponseBody": { + "name": "sdkT6446", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/chsmSdkTest7347/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/sdkT6446", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Provisioning", + "statusMessage": "Initial HSM cluster provisioning completed. Post-provisioning process is in progress.", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "fipsApprovedMode": false, + "activationState": "NotActivated", + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Env": "df", + "UseMockHfc": "true", + "MockHfcDelayInMs": "1" + }, + "systemData": { + "createdBy": "Sanitized", + "createdByType": "User", + "createdAt": "2024-10-17T12:34:49.756Z", + "lastModifiedBy": "Sanitized", + "lastModifiedByType": "User", + "lastModifiedAt": "2024-10-17T12:34:49.756Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/chsmSdkTest7347/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/sdkT6446?api-version=2024-06-30-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-75b5f19198bd00d70fbf0d3f80d23835-b4a9052a736c8b88-00", + "User-Agent": "azsdk-net-ResourceManager/1.13.0 (.NET 6.0.35; Microsoft Windows 10.0.22631)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "851", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 17 Oct 2024 12:34:53 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Cache": "CONFIG_NOCACHE", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "008792ce-f8b4-4b08-be95-b4be015237c8", + "x-ms-ratelimit-remaining-subscription-global-reads": "16499", + "x-ms-ratelimit-remaining-subscription-reads": "1099", + "x-ms-request-id": "079629f3-be8f-471d-8a99-3fd69ede5c16", + "x-ms-routing-request-id": "NORTHEUROPE:20241017T123454Z:008792ce-f8b4-4b08-be95-b4be015237c8", + "X-MSEdge-Ref": "Ref A: 36787BE1456248319399CD7C4CB1A2FA Ref B: DB3EDGE2809 Ref C: 2024-10-17T12:34:54Z" + }, + "ResponseBody": { + "name": "sdkT6446", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/chsmSdkTest7347/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/sdkT6446", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Succeeded", + "statusMessage": "HSM cluster provisioning successful.", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "fipsApprovedMode": false, + "activationState": "NotActivated", + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Env": "df", + "UseMockHfc": "true", + "MockHfcDelayInMs": "1" + }, + "systemData": { + "createdBy": "Sanitized", + "createdByType": "User", + "createdAt": "2024-10-17T12:34:49.756Z", + "lastModifiedBy": "Sanitized", + "lastModifiedByType": "User", + "lastModifiedAt": "2024-10-17T12:34:49.756Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/chsmSdkTest7347/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/sdkT6446?api-version=2024-06-30-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-bab536a3af8c7f339e845d50e402761e-935aed80a82b0b6a-00", + "User-Agent": "azsdk-net-ResourceManager.HardwareSecurityModules/1.0.0-alpha.20241017.1 (.NET 6.0.35; Microsoft Windows 10.0.22631)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "851", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 17 Oct 2024 12:34:54 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Cache": "CONFIG_NOCACHE", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "e18d6737-a04c-4d2a-9d22-f2e9ee1984a4", + "x-ms-ratelimit-remaining-subscription-global-reads": "16498", + "x-ms-ratelimit-remaining-subscription-reads": "1098", + "x-ms-request-id": "c0411ffa-ed3d-4f8c-bf5b-e8b32d25d460", + "x-ms-routing-request-id": "NORTHEUROPE:20241017T123454Z:e18d6737-a04c-4d2a-9d22-f2e9ee1984a4", + "X-MSEdge-Ref": "Ref A: 452725ED65524CC98873779A274D9C1F Ref B: DB3EDGE2809 Ref C: 2024-10-17T12:34:54Z" + }, + "ResponseBody": { + "name": "sdkT6446", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/chsmSdkTest7347/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/sdkT6446", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Succeeded", + "statusMessage": "HSM cluster provisioning successful.", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "fipsApprovedMode": false, + "activationState": "NotActivated", + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Env": "df", + "UseMockHfc": "true", + "MockHfcDelayInMs": "1" + }, + "systemData": { + "createdBy": "Sanitized", + "createdByType": "User", + "createdAt": "2024-10-17T12:34:49.756Z", + "lastModifiedBy": "Sanitized", + "lastModifiedByType": "User", + "lastModifiedAt": "2024-10-17T12:34:49.756Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/chsmSdkTest7347/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters?api-version=2024-06-30-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "User-Agent": "azsdk-net-ResourceManager.HardwareSecurityModules/1.0.0-alpha.20241017.1 (.NET 6.0.35; Microsoft Windows 10.0.22631)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "863", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 17 Oct 2024 12:34:54 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Cache": "CONFIG_NOCACHE", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "04b8c4d5-82ea-439c-b6ba-8615e627fd71", + "x-ms-ratelimit-remaining-subscription-global-reads": "16499", + "x-ms-ratelimit-remaining-subscription-reads": "1099", + "x-ms-request-id": "ec9bdc4b-e188-4faa-b752-5073a3ba11c2", + "x-ms-routing-request-id": "NORTHEUROPE:20241017T123455Z:04b8c4d5-82ea-439c-b6ba-8615e627fd71", + "X-MSEdge-Ref": "Ref A: 805F79D02C0049A7B47487F7652C9684 Ref B: DB3EDGE2809 Ref C: 2024-10-17T12:34:54Z" + }, + "ResponseBody": { + "value": [ + { + "name": "sdkT6446", + "type": "Microsoft.HardwareSecurityModules/cloudHsmClusters", + "location": "ukwest", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/chsmSdkTest7347/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/sdkT6446", + "sku": { + "family": "B", + "name": "Standard_B1" + }, + "properties": { + "provisioningState": "Succeeded", + "statusMessage": "HSM cluster provisioning successful.", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "fipsApprovedMode": false, + "activationState": "NotActivated", + "hsms": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled" + }, + "tags": { + "Env": "df", + "UseMockHfc": "true", + "MockHfcDelayInMs": "1" + }, + "systemData": { + "createdBy": "Sanitized", + "createdByType": "User", + "createdAt": "2024-10-17T12:34:49.756Z", + "lastModifiedBy": "Sanitized", + "lastModifiedByType": "User", + "lastModifiedAt": "2024-10-17T12:34:49.756Z" + } + } + ] + } + } + ], + "Variables": { + "RandomSeed": "533990658", + "RESOURCE_MANAGER_URL": null, + "SUBSCRIPTION_ID": "75e96d09-a291-40e1-a5e6-cda78233d867" + } +} diff --git a/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/tests/SessionRecords/DedicatedHsmTests/CreateOrUpdateDedicatedHsmTest.json b/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/tests/SessionRecords/DedicatedHsmTests/CreateOrUpdateDedicatedHsmTest.json new file mode 100644 index 000000000000..0e759037c57f --- /dev/null +++ b/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/tests/SessionRecords/DedicatedHsmTests/CreateOrUpdateDedicatedHsmTest.json @@ -0,0 +1,1687 @@ +{ + "Entries": [ + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867?api-version=**", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-2f2181b3d03059a99df48263cdff993e-e781a4269621e5a9-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.20; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "61e5d330f85aabf3cf88cf712335a92d", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "448", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 13 Jul 2023 12:34:05 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "102a1baa-8c71-4552-9226-e5ac1e80fd58", + "x-ms-ratelimit-remaining-subscription-reads": "11950", + "x-ms-request-id": "102a1baa-8c71-4552-9226-e5ac1e80fd58", + "x-ms-routing-request-id": "NORTHEUROPE:20230713T123406Z:102a1baa-8c71-4552-9226-e5ac1e80fd58" + }, + "ResponseBody": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867", + "authorizationSource": "RoleBased", + "managedByTenants": [ + { + "tenantId": "2f4a9838-26b7-47ee-be60-ccc1fdec5953" + } + ], + "subscriptionId": "75e96d09-a291-40e1-a5e6-cda78233d867", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "displayName": "susolank Projects", + "state": "Enabled", + "subscriptionPolicies": { + "locationPlacementId": "Internal_2014-09-01", + "quotaId": "Internal_2014-09-01", + "spendingLimit": "Off" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867?api-version=**", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-3fd3c72712d7dae7f500d1e49f355891-381890d8fd36925c-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.20; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "f058e0eb9c2cca81b126e8b1f8719aea", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "448", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 13 Jul 2023 12:34:05 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "c7b8832d-56dc-4f0b-bd05-28621bc9d5d2", + "x-ms-ratelimit-remaining-subscription-reads": "11949", + "x-ms-request-id": "c7b8832d-56dc-4f0b-bd05-28621bc9d5d2", + "x-ms-routing-request-id": "NORTHEUROPE:20230713T123406Z:c7b8832d-56dc-4f0b-bd05-28621bc9d5d2" + }, + "ResponseBody": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867", + "authorizationSource": "RoleBased", + "managedByTenants": [ + { + "tenantId": "2f4a9838-26b7-47ee-be60-ccc1fdec5953" + } + ], + "subscriptionId": "75e96d09-a291-40e1-a5e6-cda78233d867", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "displayName": "susolank Projects", + "state": "Enabled", + "subscriptionPolicies": { + "locationPlacementId": "Internal_2014-09-01", + "quotaId": "Internal_2014-09-01", + "spendingLimit": "Off" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourcegroups/sdkTestsRg5805?api-version=**", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "21", + "Content-Type": "application/json", + "traceparent": "00-602caa42368ee5a5228a47c24ff7671b-20d4bb1cceb882cd-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.20; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "d7f4e2552b0f111c38f9f315f9a2fa19", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "location": "eastus" + }, + "StatusCode": 201, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Connection": "close", + "Content-Length": "225", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 13 Jul 2023 12:34:06 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "4f26b3e1-5aa9-4a2b-aa2e-7562c46f3061", + "x-ms-ratelimit-remaining-subscription-writes": "1197", + "x-ms-request-id": "4f26b3e1-5aa9-4a2b-aa2e-7562c46f3061", + "x-ms-routing-request-id": "NORTHEUROPE:20230713T123407Z:4f26b3e1-5aa9-4a2b-aa2e-7562c46f3061" + }, + "ResponseBody": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5805", + "name": "sdkTestsRg5805", + "type": "Microsoft.Resources/resourceGroups", + "location": "eastus", + "properties": { + "provisioningState": "Succeeded" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5805/providers/Microsoft.Network/virtualNetworks/dhsm-vnet?api-version=2023-02-01", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "282", + "Content-Type": "application/json", + "traceparent": "00-a85901ad1475d218817708b2319320cb-c1f9b6318c4118de-00", + "User-Agent": "azsdk-net-ResourceManager.Network/1.1.0 (.NET 6.0.20; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "027842a594771a51b0330f42b25deee4", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "location": "eastus", + "properties": { + "addressSpace": { + "addressPrefixes": [ + "10.0.0.0/16" + ] + }, + "subnets": [ + { + "name": "default", + "properties": { + "addressPrefix": "10.0.0.0/24", + "delegations": [ + { + "name": "myDelegation", + "properties": { + "serviceName": "Microsoft.HardwareSecurityModules/dedicatedHSMs" + } + } + ] + } + } + ] + } + }, + "StatusCode": 201, + "ResponseHeaders": { + "Azure-AsyncNotification": "Enabled", + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/providers/Microsoft.Network/locations/eastus/operations/d4ebb2e1-e998-44e9-af63-0bf4dbb23480?api-version=2023-02-01", + "Cache-Control": "no-cache", + "Content-Length": "2063", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 13 Jul 2023 12:34:09 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Retry-After": "3", + "Server": [ + "Microsoft-HTTPAPI/2.0", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-arm-service-request-id": "36f999d5-25c3-475a-b51e-8bf04b89ab1b", + "x-ms-client-request-id": "027842a594771a51b0330f42b25deee4", + "x-ms-correlation-request-id": "cf0aef3e-4f1d-4707-a1de-ea448f01d005", + "x-ms-ratelimit-remaining-subscription-writes": "1199", + "x-ms-request-id": "d4ebb2e1-e998-44e9-af63-0bf4dbb23480", + "x-ms-routing-request-id": "NORTHEUROPE:20230713T123409Z:cf0aef3e-4f1d-4707-a1de-ea448f01d005" + }, + "ResponseBody": { + "name": "dhsm-vnet", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5805/providers/Microsoft.Network/virtualNetworks/dhsm-vnet", + "etag": "W/\u00227f36c327-4b5e-4fa1-bbae-27bf6ba37c2e\u0022", + "type": "Microsoft.Network/virtualNetworks", + "location": "eastus", + "properties": { + "provisioningState": "Updating", + "resourceGuid": "e2ef351b-eb50-498a-b574-93958c554ff0", + "addressSpace": { + "addressPrefixes": [ + "10.0.0.0/16" + ] + }, + "subnets": [ + { + "name": "default", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5805/providers/Microsoft.Network/virtualNetworks/dhsm-vnet/subnets/default", + "etag": "W/\u00227f36c327-4b5e-4fa1-bbae-27bf6ba37c2e\u0022", + "properties": { + "provisioningState": "Updating", + "addressPrefix": "10.0.0.0/24", + "delegations": [ + { + "name": "myDelegation", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5805/providers/Microsoft.Network/virtualNetworks/dhsm-vnet/subnets/default/delegations/myDelegation", + "etag": "W/\u00227f36c327-4b5e-4fa1-bbae-27bf6ba37c2e\u0022", + "properties": { + "provisioningState": "Succeeded", + "serviceName": "Microsoft.HardwareSecurityModules/dedicatedHSMs", + "actions": [ + "Microsoft.Network/networkinterfaces/*", + "Microsoft.Network/virtualNetworks/subnets/join/action" + ] + }, + "type": "Microsoft.Network/virtualNetworks/subnets/delegations" + } + ], + "purpose": "HostedWorkloads", + "privateEndpointNetworkPolicies": "Disabled", + "privateLinkServiceNetworkPolicies": "Enabled" + }, + "type": "Microsoft.Network/virtualNetworks/subnets" + } + ], + "virtualNetworkPeerings": [], + "enableDdosProtection": false + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/providers/Microsoft.Network/locations/eastus/operations/d4ebb2e1-e998-44e9-af63-0bf4dbb23480?api-version=2023-02-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-a85901ad1475d218817708b2319320cb-a090b6551196f8e3-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.20; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "57cb729892724edea2bc5ff70dcf869c", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "30", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 13 Jul 2023 12:34:09 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Retry-After": "10", + "Server": [ + "Microsoft-HTTPAPI/2.0", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-arm-service-request-id": "8b49186a-4255-4989-a818-10b46fec91ea", + "x-ms-client-request-id": "57cb729892724edea2bc5ff70dcf869c", + "x-ms-correlation-request-id": "78e6a49a-e831-4803-80dd-a7250c6765c1", + "x-ms-ratelimit-remaining-subscription-reads": "11999", + "x-ms-request-id": "17dffd69-9fd2-4abd-b321-2889bc6cb4de", + "x-ms-routing-request-id": "NORTHEUROPE:20230713T123410Z:78e6a49a-e831-4803-80dd-a7250c6765c1" + }, + "ResponseBody": { + "status": "InProgress" + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/providers/Microsoft.Network/locations/eastus/operations/d4ebb2e1-e998-44e9-af63-0bf4dbb23480?api-version=2023-02-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-a85901ad1475d218817708b2319320cb-b4c6661e1570d57e-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.20; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "d41c300463a7ca308c3c2283f1c265f9", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "29", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 13 Jul 2023 12:34:19 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": [ + "Microsoft-HTTPAPI/2.0", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-arm-service-request-id": "0f6edda6-123d-43c9-9129-99b54c459585", + "x-ms-client-request-id": "d41c300463a7ca308c3c2283f1c265f9", + "x-ms-correlation-request-id": "5e3ad5c1-f4ca-47fb-902d-14b3f6dab6a9", + "x-ms-ratelimit-remaining-subscription-reads": "11998", + "x-ms-request-id": "9ff6d318-879e-48ed-b085-862bacdf2555", + "x-ms-routing-request-id": "NORTHEUROPE:20230713T123420Z:5e3ad5c1-f4ca-47fb-902d-14b3f6dab6a9" + }, + "ResponseBody": { + "status": "Succeeded" + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5805/providers/Microsoft.Network/virtualNetworks/dhsm-vnet?api-version=2023-02-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-a85901ad1475d218817708b2319320cb-7ccaeb277f92c399-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.20; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "40aa22af96914a72ef0412997bbd2e10", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "2065", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 13 Jul 2023 12:34:19 GMT", + "ETag": "W/\u0022a35d71fd-5f1c-42ec-8c0b-8aa787911d28\u0022", + "Expires": "-1", + "Pragma": "no-cache", + "Server": [ + "Microsoft-HTTPAPI/2.0", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-arm-service-request-id": "cd7e534f-c707-4344-b057-44994dc1667c", + "x-ms-client-request-id": "40aa22af96914a72ef0412997bbd2e10", + "x-ms-correlation-request-id": "93b9d842-124b-459d-80be-dadf33a11774", + "x-ms-ratelimit-remaining-subscription-reads": "11997", + "x-ms-request-id": "c3aca12f-1139-4b9a-a786-c492338f16bf", + "x-ms-routing-request-id": "NORTHEUROPE:20230713T123420Z:93b9d842-124b-459d-80be-dadf33a11774" + }, + "ResponseBody": { + "name": "dhsm-vnet", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5805/providers/Microsoft.Network/virtualNetworks/dhsm-vnet", + "etag": "W/\u0022a35d71fd-5f1c-42ec-8c0b-8aa787911d28\u0022", + "type": "Microsoft.Network/virtualNetworks", + "location": "eastus", + "properties": { + "provisioningState": "Succeeded", + "resourceGuid": "e2ef351b-eb50-498a-b574-93958c554ff0", + "addressSpace": { + "addressPrefixes": [ + "10.0.0.0/16" + ] + }, + "subnets": [ + { + "name": "default", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5805/providers/Microsoft.Network/virtualNetworks/dhsm-vnet/subnets/default", + "etag": "W/\u0022a35d71fd-5f1c-42ec-8c0b-8aa787911d28\u0022", + "properties": { + "provisioningState": "Succeeded", + "addressPrefix": "10.0.0.0/24", + "delegations": [ + { + "name": "myDelegation", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5805/providers/Microsoft.Network/virtualNetworks/dhsm-vnet/subnets/default/delegations/myDelegation", + "etag": "W/\u0022a35d71fd-5f1c-42ec-8c0b-8aa787911d28\u0022", + "properties": { + "provisioningState": "Succeeded", + "serviceName": "Microsoft.HardwareSecurityModules/dedicatedHSMs", + "actions": [ + "Microsoft.Network/networkinterfaces/*", + "Microsoft.Network/virtualNetworks/subnets/join/action" + ] + }, + "type": "Microsoft.Network/virtualNetworks/subnets/delegations" + } + ], + "purpose": "HostedWorkloads", + "privateEndpointNetworkPolicies": "Disabled", + "privateLinkServiceNetworkPolicies": "Enabled" + }, + "type": "Microsoft.Network/virtualNetworks/subnets" + } + ], + "virtualNetworkPeerings": [], + "enableDdosProtection": false + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5805/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/DedicatedHsmTest2978?api-version=2021-11-30", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "665", + "Content-Type": "application/json", + "traceparent": "00-6ac90ab6e56596e2cccc29d2154f0ec4-c956b3c5ef812810-00", + "User-Agent": "azsdk-net-ResourceManager.HardwareSecurityModules/1.0.0-alpha.20230713.1 (.NET 6.0.20; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "8489066daf9a34454101cb356f5a5cdf", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "sku": { + "name": "payShield10K_LMK1_CPS60" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "location": "eastus", + "properties": { + "networkProfile": { + "subnet": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5805/providers/Microsoft.Network/virtualNetworks/dhsm-vnet/subnets/default" + }, + "networkInterfaces": [ + { + "privateIpAddress": "10.0.0.4" + }, + { + "privateIpAddress": "10.0.0.5" + } + ] + }, + "managementNetworkProfile": { + "subnet": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5805/providers/Microsoft.Network/virtualNetworks/dhsm-vnet/subnets/default" + }, + "networkInterfaces": [ + { + "privateIpAddress": "10.0.0.6" + } + ] + }, + "stampId": "stamp1" + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1315", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 13 Jul 2023 12:34:21 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-AspNet-Version": "4.0.30319", + "X-Content-Type-Options": "nosniff", + "x-ms-client-request-id": "8489066daf9a34454101cb356f5a5cdf", + "x-ms-correlation-request-id": "492ff24e-fa29-4778-bebe-dba8b6f9c5fc", + "x-ms-keyvault-service-version": "1.5.851.0", + "x-ms-ratelimit-remaining-subscription-writes": "1198", + "x-ms-request-id": "31040847-415f-4480-afe2-1b807ea7a369", + "x-ms-routing-request-id": "NORTHEUROPE:20230713T123422Z:492ff24e-fa29-4778-bebe-dba8b6f9c5fc" + }, + "ResponseBody": { + "sku": { + "name": "payShield10K_LMK1_CPS60" + }, + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5805/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/DedicatedHsmTest2978", + "name": "DedicatedHsmTest2978", + "type": "Microsoft.HardwareSecurityModules/dedicatedHSMs", + "location": "eastus", + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-13T12:34:21.269Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-13T12:34:21.269Z" + }, + "properties": { + "networkProfile": { + "subnet": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5805/providers/Microsoft.Network/virtualNetworks/dhsm-vnet/subnets/default" + }, + "networkInterfaces": [ + { + "privateIpAddress": "10.0.0.4" + }, + { + "privateIpAddress": "10.0.0.5" + } + ] + }, + "managementNetworkProfile": { + "subnet": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5805/providers/Microsoft.Network/virtualNetworks/dhsm-vnet/subnets/default" + }, + "networkInterfaces": [ + { + "privateIpAddress": "10.0.0.6" + } + ] + }, + "provisioningState": "CheckingQuota", + "statusMessage": "Resource creation in progress. Validating subscription device quota...", + "stampId": "stamp1" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5805/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/DedicatedHsmTest2978?api-version=2021-11-30", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-6ac90ab6e56596e2cccc29d2154f0ec4-03f021abdf709d10-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.20; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "eb16120de039005edc75fe90cb3cdb95", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1315", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 13 Jul 2023 12:34:21 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-AspNet-Version": "4.0.30319", + "X-Content-Type-Options": "nosniff", + "x-ms-client-request-id": "eb16120de039005edc75fe90cb3cdb95", + "x-ms-correlation-request-id": "12f3fc40-d908-436f-b162-74fe75e5a511", + "x-ms-keyvault-service-version": "1.5.851.0", + "x-ms-ratelimit-remaining-subscription-reads": "11996", + "x-ms-request-id": "5c0ffec1-94b0-4a1c-906a-87a378c998c2", + "x-ms-routing-request-id": "NORTHEUROPE:20230713T123422Z:12f3fc40-d908-436f-b162-74fe75e5a511" + }, + "ResponseBody": { + "sku": { + "name": "payShield10K_LMK1_CPS60" + }, + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5805/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/DedicatedHsmTest2978", + "name": "DedicatedHsmTest2978", + "type": "Microsoft.HardwareSecurityModules/dedicatedHSMs", + "location": "eastus", + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-13T12:34:21.269Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-13T12:34:21.269Z" + }, + "properties": { + "networkProfile": { + "subnet": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5805/providers/Microsoft.Network/virtualNetworks/dhsm-vnet/subnets/default" + }, + "networkInterfaces": [ + { + "privateIpAddress": "10.0.0.4" + }, + { + "privateIpAddress": "10.0.0.5" + } + ] + }, + "managementNetworkProfile": { + "subnet": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5805/providers/Microsoft.Network/virtualNetworks/dhsm-vnet/subnets/default" + }, + "networkInterfaces": [ + { + "privateIpAddress": "10.0.0.6" + } + ] + }, + "provisioningState": "CheckingQuota", + "statusMessage": "Resource creation in progress. Validating subscription device quota...", + "stampId": "stamp1" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5805/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/DedicatedHsmTest2978?api-version=2021-11-30", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-6ac90ab6e56596e2cccc29d2154f0ec4-c2a4097e1b8d3610-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.20; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "154132a7437627ebfc1bc5c8caa2e2aa", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1315", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 13 Jul 2023 12:34:23 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-AspNet-Version": "4.0.30319", + "X-Content-Type-Options": "nosniff", + "x-ms-client-request-id": "154132a7437627ebfc1bc5c8caa2e2aa", + "x-ms-correlation-request-id": "24fe3649-e700-4ee0-8e29-8544d05fc21a", + "x-ms-keyvault-service-version": "1.5.851.0", + "x-ms-ratelimit-remaining-subscription-reads": "11995", + "x-ms-request-id": "c82d6e33-1073-4169-bb9c-e5e4eb3a7907", + "x-ms-routing-request-id": "NORTHEUROPE:20230713T123423Z:24fe3649-e700-4ee0-8e29-8544d05fc21a" + }, + "ResponseBody": { + "sku": { + "name": "payShield10K_LMK1_CPS60" + }, + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5805/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/DedicatedHsmTest2978", + "name": "DedicatedHsmTest2978", + "type": "Microsoft.HardwareSecurityModules/dedicatedHSMs", + "location": "eastus", + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-13T12:34:21.269Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-13T12:34:21.269Z" + }, + "properties": { + "networkProfile": { + "subnet": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5805/providers/Microsoft.Network/virtualNetworks/dhsm-vnet/subnets/default" + }, + "networkInterfaces": [ + { + "privateIpAddress": "10.0.0.4" + }, + { + "privateIpAddress": "10.0.0.5" + } + ] + }, + "managementNetworkProfile": { + "subnet": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5805/providers/Microsoft.Network/virtualNetworks/dhsm-vnet/subnets/default" + }, + "networkInterfaces": [ + { + "privateIpAddress": "10.0.0.6" + } + ] + }, + "provisioningState": "CheckingQuota", + "statusMessage": "Resource creation in progress. Validating subscription device quota...", + "stampId": "stamp1" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5805/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/DedicatedHsmTest2978?api-version=2021-11-30", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-6ac90ab6e56596e2cccc29d2154f0ec4-96be5521e39a639b-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.20; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "5c27fcb2714477a607460eaf4779a282", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1302", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 13 Jul 2023 12:34:24 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-AspNet-Version": "4.0.30319", + "X-Content-Type-Options": "nosniff", + "x-ms-client-request-id": "5c27fcb2714477a607460eaf4779a282", + "x-ms-correlation-request-id": "c8fa2cf4-e050-44ce-8f83-738ec2efdaac", + "x-ms-keyvault-service-version": "1.5.851.0", + "x-ms-ratelimit-remaining-subscription-reads": "11994", + "x-ms-request-id": "4ed5c67a-cc95-4159-9539-24ade76f77f4", + "x-ms-routing-request-id": "NORTHEUROPE:20230713T123425Z:c8fa2cf4-e050-44ce-8f83-738ec2efdaac" + }, + "ResponseBody": { + "sku": { + "name": "payShield10K_LMK1_CPS60" + }, + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5805/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/DedicatedHsmTest2978", + "name": "DedicatedHsmTest2978", + "type": "Microsoft.HardwareSecurityModules/dedicatedHSMs", + "location": "eastus", + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-13T12:34:21.269Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-13T12:34:21.269Z" + }, + "properties": { + "networkProfile": { + "subnet": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5805/providers/Microsoft.Network/virtualNetworks/dhsm-vnet/subnets/default" + }, + "networkInterfaces": [ + { + "privateIpAddress": "10.0.0.4" + }, + { + "privateIpAddress": "10.0.0.5" + } + ] + }, + "managementNetworkProfile": { + "subnet": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5805/providers/Microsoft.Network/virtualNetworks/dhsm-vnet/subnets/default" + }, + "networkInterfaces": [ + { + "privateIpAddress": "10.0.0.6" + } + ] + }, + "provisioningState": "Allocating", + "statusMessage": "Resource creation in progress. Creating network interface...", + "stampId": "stamp1" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5805/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/DedicatedHsmTest2978?api-version=2021-11-30", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-6ac90ab6e56596e2cccc29d2154f0ec4-225d6d483785331a-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.20; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "1ffb4ff63955ca5827eeee1e1a953639", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1477", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 13 Jul 2023 12:34:25 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-AspNet-Version": "4.0.30319", + "X-Content-Type-Options": "nosniff", + "x-ms-client-request-id": "1ffb4ff63955ca5827eeee1e1a953639", + "x-ms-correlation-request-id": "3a434008-ff8c-421f-8942-69cfa5dae7d5", + "x-ms-keyvault-service-version": "1.5.851.0", + "x-ms-ratelimit-remaining-subscription-reads": "11993", + "x-ms-request-id": "c7520c21-9afb-44d1-aadc-8c6e5dd723f5", + "x-ms-routing-request-id": "NORTHEUROPE:20230713T123426Z:3a434008-ff8c-421f-8942-69cfa5dae7d5" + }, + "ResponseBody": { + "sku": { + "name": "payShield10K_LMK1_CPS60" + }, + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5805/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/DedicatedHsmTest2978", + "name": "DedicatedHsmTest2978", + "type": "Microsoft.HardwareSecurityModules/dedicatedHSMs", + "location": "eastus", + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-13T12:34:21.269Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-13T12:34:21.269Z" + }, + "properties": { + "networkProfile": { + "subnet": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5805/providers/Microsoft.Network/virtualNetworks/dhsm-vnet/subnets/default" + }, + "networkInterfaces": [ + { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5805/providers/Microsoft.Network/networkInterfaces/DedicatedHsmTest2978_HSMHost1Nic", + "privateIpAddress": "10.0.0.4" + }, + { + "privateIpAddress": "10.0.0.5" + } + ] + }, + "managementNetworkProfile": { + "subnet": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5805/providers/Microsoft.Network/virtualNetworks/dhsm-vnet/subnets/default" + }, + "networkInterfaces": [ + { + "privateIpAddress": "10.0.0.6" + } + ] + }, + "provisioningState": "Allocating", + "statusMessage": "Resource creation in progress. Creating host 2 network interface...", + "stampId": "stamp1" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5805/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/DedicatedHsmTest2978?api-version=2021-11-30", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-6ac90ab6e56596e2cccc29d2154f0ec4-755a69930cc85f19-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.20; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "cfde54927e1536518bca0d2f343be082", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1656", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 13 Jul 2023 12:34:27 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-AspNet-Version": "4.0.30319", + "X-Content-Type-Options": "nosniff", + "x-ms-client-request-id": "cfde54927e1536518bca0d2f343be082", + "x-ms-correlation-request-id": "e34e2f7d-67aa-432c-82ca-a150a9d0ead2", + "x-ms-keyvault-service-version": "1.5.851.0", + "x-ms-ratelimit-remaining-subscription-reads": "11992", + "x-ms-request-id": "4f0a2890-93d4-492d-93dc-964c4b9f3f65", + "x-ms-routing-request-id": "NORTHEUROPE:20230713T123428Z:e34e2f7d-67aa-432c-82ca-a150a9d0ead2" + }, + "ResponseBody": { + "sku": { + "name": "payShield10K_LMK1_CPS60" + }, + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5805/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/DedicatedHsmTest2978", + "name": "DedicatedHsmTest2978", + "type": "Microsoft.HardwareSecurityModules/dedicatedHSMs", + "location": "eastus", + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-13T12:34:21.269Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-13T12:34:21.269Z" + }, + "properties": { + "networkProfile": { + "subnet": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5805/providers/Microsoft.Network/virtualNetworks/dhsm-vnet/subnets/default" + }, + "networkInterfaces": [ + { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5805/providers/Microsoft.Network/networkInterfaces/DedicatedHsmTest2978_HSMHost1Nic", + "privateIpAddress": "10.0.0.4" + }, + { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5805/providers/Microsoft.Network/networkInterfaces/DedicatedHsmTest2978_HSMHost2Nic", + "privateIpAddress": "10.0.0.5" + } + ] + }, + "managementNetworkProfile": { + "subnet": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5805/providers/Microsoft.Network/virtualNetworks/dhsm-vnet/subnets/default" + }, + "networkInterfaces": [ + { + "privateIpAddress": "10.0.0.6" + } + ] + }, + "provisioningState": "Connecting", + "statusMessage": "Resource creation in progress. Connecting the device to the virtual network...", + "stampId": "stamp1" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5805/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/DedicatedHsmTest2978?api-version=2021-11-30", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-6ac90ab6e56596e2cccc29d2154f0ec4-35481f802f7d22a1-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.20; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "7ad24378c3a67854a35d355582875c72", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1823", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 13 Jul 2023 12:34:32 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-AspNet-Version": "4.0.30319", + "X-Content-Type-Options": "nosniff", + "x-ms-client-request-id": "7ad24378c3a67854a35d355582875c72", + "x-ms-correlation-request-id": "173c21e0-67c6-4c19-80f2-e6a7b831766b", + "x-ms-keyvault-service-version": "1.5.851.0", + "x-ms-ratelimit-remaining-subscription-reads": "11991", + "x-ms-request-id": "e0930df8-eb6c-42d4-908f-6b3feba3fee4", + "x-ms-routing-request-id": "NORTHEUROPE:20230713T123432Z:173c21e0-67c6-4c19-80f2-e6a7b831766b" + }, + "ResponseBody": { + "sku": { + "name": "payShield10K_LMK1_CPS60" + }, + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5805/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/DedicatedHsmTest2978", + "name": "DedicatedHsmTest2978", + "type": "Microsoft.HardwareSecurityModules/dedicatedHSMs", + "location": "eastus", + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-13T12:34:21.269Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-13T12:34:21.269Z" + }, + "properties": { + "networkProfile": { + "subnet": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5805/providers/Microsoft.Network/virtualNetworks/dhsm-vnet/subnets/default" + }, + "networkInterfaces": [ + { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5805/providers/Microsoft.Network/networkInterfaces/DedicatedHsmTest2978_HSMHost1Nic", + "privateIpAddress": "10.0.0.4" + }, + { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5805/providers/Microsoft.Network/networkInterfaces/DedicatedHsmTest2978_HSMHost2Nic", + "privateIpAddress": "10.0.0.5" + } + ] + }, + "managementNetworkProfile": { + "subnet": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5805/providers/Microsoft.Network/virtualNetworks/dhsm-vnet/subnets/default" + }, + "networkInterfaces": [ + { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5805/providers/Microsoft.Network/networkInterfaces/DedicatedHsmTest2978_HSMMgmtNic", + "privateIpAddress": "10.0.0.6" + } + ] + }, + "provisioningState": "Connecting", + "statusMessage": "Resource creation in progress. Connecting the device to the virtual network...", + "stampId": "stamp1" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5805/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/DedicatedHsmTest2978?api-version=2021-11-30", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-6ac90ab6e56596e2cccc29d2154f0ec4-671a7c6f1512e04b-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.20; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "f31cd510d39b786dfec5938b2b2995eb", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1814", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 13 Jul 2023 12:34:40 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-AspNet-Version": "4.0.30319", + "X-Content-Type-Options": "nosniff", + "x-ms-client-request-id": "f31cd510d39b786dfec5938b2b2995eb", + "x-ms-correlation-request-id": "2d7a76e9-84ea-4701-afe1-edf28a370710", + "x-ms-keyvault-service-version": "1.5.851.0", + "x-ms-ratelimit-remaining-subscription-reads": "11990", + "x-ms-request-id": "bb0ef953-8d5f-474d-bed8-ec4046b63e26", + "x-ms-routing-request-id": "NORTHEUROPE:20230713T123441Z:2d7a76e9-84ea-4701-afe1-edf28a370710" + }, + "ResponseBody": { + "sku": { + "name": "payShield10K_LMK1_CPS60" + }, + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5805/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/DedicatedHsmTest2978", + "name": "DedicatedHsmTest2978", + "type": "Microsoft.HardwareSecurityModules/dedicatedHSMs", + "location": "eastus", + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-13T12:34:21.269Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-13T12:34:21.269Z" + }, + "properties": { + "networkProfile": { + "subnet": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5805/providers/Microsoft.Network/virtualNetworks/dhsm-vnet/subnets/default" + }, + "networkInterfaces": [ + { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5805/providers/Microsoft.Network/networkInterfaces/DedicatedHsmTest2978_HSMHost1Nic", + "privateIpAddress": "10.0.0.4" + }, + { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5805/providers/Microsoft.Network/networkInterfaces/DedicatedHsmTest2978_HSMHost2Nic", + "privateIpAddress": "10.0.0.5" + } + ] + }, + "managementNetworkProfile": { + "subnet": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5805/providers/Microsoft.Network/virtualNetworks/dhsm-vnet/subnets/default" + }, + "networkInterfaces": [ + { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5805/providers/Microsoft.Network/networkInterfaces/DedicatedHsmTest2978_HSMMgmtNic", + "privateIpAddress": "10.0.0.6" + } + ] + }, + "provisioningState": "Allocating", + "statusMessage": "Resource creation in progress. Updating Network Manager containers...", + "stampId": "stamp1" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5805/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/DedicatedHsmTest2978?api-version=2021-11-30", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-6ac90ab6e56596e2cccc29d2154f0ec4-d1d8e731a3781fe1-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.20; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "d7a66c0ebbc3cf92ff652bb749fbb304", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1803", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 13 Jul 2023 12:34:56 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-AspNet-Version": "4.0.30319", + "X-Content-Type-Options": "nosniff", + "x-ms-client-request-id": "d7a66c0ebbc3cf92ff652bb749fbb304", + "x-ms-correlation-request-id": "9a42a892-2dba-4b1a-9b06-c3b275a23b07", + "x-ms-keyvault-service-version": "1.5.851.0", + "x-ms-ratelimit-remaining-subscription-reads": "11989", + "x-ms-request-id": "c8a508ab-3686-4870-bdc1-85b98ca31d17", + "x-ms-routing-request-id": "NORTHEUROPE:20230713T123457Z:9a42a892-2dba-4b1a-9b06-c3b275a23b07" + }, + "ResponseBody": { + "sku": { + "name": "payShield10K_LMK1_CPS60" + }, + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5805/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/DedicatedHsmTest2978", + "name": "DedicatedHsmTest2978", + "type": "Microsoft.HardwareSecurityModules/dedicatedHSMs", + "location": "eastus", + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-13T12:34:21.269Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-13T12:34:21.269Z" + }, + "properties": { + "networkProfile": { + "subnet": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5805/providers/Microsoft.Network/virtualNetworks/dhsm-vnet/subnets/default" + }, + "networkInterfaces": [ + { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5805/providers/Microsoft.Network/networkInterfaces/DedicatedHsmTest2978_HSMHost1Nic", + "privateIpAddress": "10.0.0.4" + }, + { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5805/providers/Microsoft.Network/networkInterfaces/DedicatedHsmTest2978_HSMHost2Nic", + "privateIpAddress": "10.0.0.5" + } + ] + }, + "managementNetworkProfile": { + "subnet": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5805/providers/Microsoft.Network/virtualNetworks/dhsm-vnet/subnets/default" + }, + "networkInterfaces": [ + { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5805/providers/Microsoft.Network/networkInterfaces/DedicatedHsmTest2978_HSMMgmtNic", + "privateIpAddress": "10.0.0.6" + } + ] + }, + "provisioningState": "Provisioning", + "statusMessage": "Resource creation in progress. Configuring the device...", + "stampId": "stamp1" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5805/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/DedicatedHsmTest2978?api-version=2021-11-30", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-6ac90ab6e56596e2cccc29d2154f0ec4-5d4feee8def3d1b2-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.20; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "5f1e9b6ded1fa4e7d65a7ce130c94c79", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1803", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 13 Jul 2023 12:35:29 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-AspNet-Version": "4.0.30319", + "X-Content-Type-Options": "nosniff", + "x-ms-client-request-id": "5f1e9b6ded1fa4e7d65a7ce130c94c79", + "x-ms-correlation-request-id": "43cb98df-bc69-465e-ab4d-cb185b7eb442", + "x-ms-keyvault-service-version": "1.5.851.0", + "x-ms-ratelimit-remaining-subscription-reads": "11988", + "x-ms-request-id": "4d11ca33-3bdf-47d6-b17c-3cbb7f191aea", + "x-ms-routing-request-id": "NORTHEUROPE:20230713T123529Z:43cb98df-bc69-465e-ab4d-cb185b7eb442" + }, + "ResponseBody": { + "sku": { + "name": "payShield10K_LMK1_CPS60" + }, + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5805/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/DedicatedHsmTest2978", + "name": "DedicatedHsmTest2978", + "type": "Microsoft.HardwareSecurityModules/dedicatedHSMs", + "location": "eastus", + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-13T12:34:21.269Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-13T12:34:21.269Z" + }, + "properties": { + "networkProfile": { + "subnet": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5805/providers/Microsoft.Network/virtualNetworks/dhsm-vnet/subnets/default" + }, + "networkInterfaces": [ + { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5805/providers/Microsoft.Network/networkInterfaces/DedicatedHsmTest2978_HSMHost1Nic", + "privateIpAddress": "10.0.0.4" + }, + { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5805/providers/Microsoft.Network/networkInterfaces/DedicatedHsmTest2978_HSMHost2Nic", + "privateIpAddress": "10.0.0.5" + } + ] + }, + "managementNetworkProfile": { + "subnet": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5805/providers/Microsoft.Network/virtualNetworks/dhsm-vnet/subnets/default" + }, + "networkInterfaces": [ + { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5805/providers/Microsoft.Network/networkInterfaces/DedicatedHsmTest2978_HSMMgmtNic", + "privateIpAddress": "10.0.0.6" + } + ] + }, + "provisioningState": "Provisioning", + "statusMessage": "Resource creation in progress. Configuring the device...", + "stampId": "stamp1" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5805/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/DedicatedHsmTest2978?api-version=2021-11-30", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-6ac90ab6e56596e2cccc29d2154f0ec4-8c9d5a1b8e401688-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.20; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "164749c885e155ae424df335a7b52e02", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1803", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 13 Jul 2023 12:36:01 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-AspNet-Version": "4.0.30319", + "X-Content-Type-Options": "nosniff", + "x-ms-client-request-id": "164749c885e155ae424df335a7b52e02", + "x-ms-correlation-request-id": "372beb0e-d5e3-443c-b2e6-fd9ed8483e3b", + "x-ms-keyvault-service-version": "1.5.851.0", + "x-ms-ratelimit-remaining-subscription-reads": "11987", + "x-ms-request-id": "7854d055-1b1d-4cf6-a7e3-61df9449d42b", + "x-ms-routing-request-id": "NORTHEUROPE:20230713T123601Z:372beb0e-d5e3-443c-b2e6-fd9ed8483e3b" + }, + "ResponseBody": { + "sku": { + "name": "payShield10K_LMK1_CPS60" + }, + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5805/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/DedicatedHsmTest2978", + "name": "DedicatedHsmTest2978", + "type": "Microsoft.HardwareSecurityModules/dedicatedHSMs", + "location": "eastus", + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-13T12:34:21.269Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-13T12:34:21.269Z" + }, + "properties": { + "networkProfile": { + "subnet": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5805/providers/Microsoft.Network/virtualNetworks/dhsm-vnet/subnets/default" + }, + "networkInterfaces": [ + { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5805/providers/Microsoft.Network/networkInterfaces/DedicatedHsmTest2978_HSMHost1Nic", + "privateIpAddress": "10.0.0.4" + }, + { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5805/providers/Microsoft.Network/networkInterfaces/DedicatedHsmTest2978_HSMHost2Nic", + "privateIpAddress": "10.0.0.5" + } + ] + }, + "managementNetworkProfile": { + "subnet": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5805/providers/Microsoft.Network/virtualNetworks/dhsm-vnet/subnets/default" + }, + "networkInterfaces": [ + { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5805/providers/Microsoft.Network/networkInterfaces/DedicatedHsmTest2978_HSMMgmtNic", + "privateIpAddress": "10.0.0.6" + } + ] + }, + "provisioningState": "Provisioning", + "statusMessage": "Resource creation in progress. Configuring the device...", + "stampId": "stamp1" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5805/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/DedicatedHsmTest2978?api-version=2021-11-30", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-6ac90ab6e56596e2cccc29d2154f0ec4-fd83d9e6385debe6-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.20; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "901d8f11350a21cc840100693eb19f36", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1803", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 13 Jul 2023 12:36:33 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-AspNet-Version": "4.0.30319", + "X-Content-Type-Options": "nosniff", + "x-ms-client-request-id": "901d8f11350a21cc840100693eb19f36", + "x-ms-correlation-request-id": "bd2bca8e-5870-488d-a740-e3aa499f6712", + "x-ms-keyvault-service-version": "1.5.851.0", + "x-ms-ratelimit-remaining-subscription-reads": "11986", + "x-ms-request-id": "d4ba7fa7-0754-4325-b9b8-0a13568cf5d7", + "x-ms-routing-request-id": "NORTHEUROPE:20230713T123634Z:bd2bca8e-5870-488d-a740-e3aa499f6712" + }, + "ResponseBody": { + "sku": { + "name": "payShield10K_LMK1_CPS60" + }, + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5805/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/DedicatedHsmTest2978", + "name": "DedicatedHsmTest2978", + "type": "Microsoft.HardwareSecurityModules/dedicatedHSMs", + "location": "eastus", + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-13T12:34:21.269Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-13T12:34:21.269Z" + }, + "properties": { + "networkProfile": { + "subnet": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5805/providers/Microsoft.Network/virtualNetworks/dhsm-vnet/subnets/default" + }, + "networkInterfaces": [ + { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5805/providers/Microsoft.Network/networkInterfaces/DedicatedHsmTest2978_HSMHost1Nic", + "privateIpAddress": "10.0.0.4" + }, + { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5805/providers/Microsoft.Network/networkInterfaces/DedicatedHsmTest2978_HSMHost2Nic", + "privateIpAddress": "10.0.0.5" + } + ] + }, + "managementNetworkProfile": { + "subnet": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5805/providers/Microsoft.Network/virtualNetworks/dhsm-vnet/subnets/default" + }, + "networkInterfaces": [ + { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5805/providers/Microsoft.Network/networkInterfaces/DedicatedHsmTest2978_HSMMgmtNic", + "privateIpAddress": "10.0.0.6" + } + ] + }, + "provisioningState": "Provisioning", + "statusMessage": "Resource creation in progress. Configuring the device...", + "stampId": "stamp1" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5805/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/DedicatedHsmTest2978?api-version=2021-11-30", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-6ac90ab6e56596e2cccc29d2154f0ec4-965439fce91466de-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.20; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "ffefb2199db4e822edc91cd2f9b2fd20", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1814", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 13 Jul 2023 12:37:06 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-AspNet-Version": "4.0.30319", + "X-Content-Type-Options": "nosniff", + "x-ms-client-request-id": "ffefb2199db4e822edc91cd2f9b2fd20", + "x-ms-correlation-request-id": "bc1718e7-b83d-4ec3-a24c-0829b76a3b98", + "x-ms-keyvault-service-version": "1.5.851.0", + "x-ms-ratelimit-remaining-subscription-reads": "11985", + "x-ms-request-id": "fb1cc018-523a-47ca-8e20-d4da8f740ab4", + "x-ms-routing-request-id": "NORTHEUROPE:20230713T123706Z:bc1718e7-b83d-4ec3-a24c-0829b76a3b98" + }, + "ResponseBody": { + "sku": { + "name": "payShield10K_LMK1_CPS60" + }, + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5805/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/DedicatedHsmTest2978", + "name": "DedicatedHsmTest2978", + "type": "Microsoft.HardwareSecurityModules/dedicatedHSMs", + "location": "eastus", + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-13T12:34:21.269Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-13T12:34:21.269Z" + }, + "properties": { + "networkProfile": { + "subnet": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5805/providers/Microsoft.Network/virtualNetworks/dhsm-vnet/subnets/default" + }, + "networkInterfaces": [ + { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5805/providers/Microsoft.Network/networkInterfaces/DedicatedHsmTest2978_HSMHost1Nic", + "privateIpAddress": "10.0.0.4" + }, + { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5805/providers/Microsoft.Network/networkInterfaces/DedicatedHsmTest2978_HSMHost2Nic", + "privateIpAddress": "10.0.0.5" + } + ] + }, + "managementNetworkProfile": { + "subnet": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5805/providers/Microsoft.Network/virtualNetworks/dhsm-vnet/subnets/default" + }, + "networkInterfaces": [ + { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5805/providers/Microsoft.Network/networkInterfaces/DedicatedHsmTest2978_HSMMgmtNic", + "privateIpAddress": "10.0.0.6" + } + ] + }, + "provisioningState": "Succeeded", + "statusMessage": "The Dedicated HSM device is provisioned successfully and ready to use.", + "stampId": "stamp1" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5805/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/DedicatedHsmTest2978?api-version=2021-11-30", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-03e690accba75f04119b1a42f9d12a5f-4d3b0e1aa03790a4-00", + "User-Agent": "azsdk-net-ResourceManager.HardwareSecurityModules/1.0.0-alpha.20230713.1 (.NET 6.0.20; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "a0cf7a2bbcab926e7d2591e084441691", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1814", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 13 Jul 2023 12:37:06 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-AspNet-Version": "4.0.30319", + "X-Content-Type-Options": "nosniff", + "x-ms-client-request-id": "a0cf7a2bbcab926e7d2591e084441691", + "x-ms-correlation-request-id": "5a3b8ce3-ff25-47df-ba40-0873ec548241", + "x-ms-keyvault-service-version": "1.5.851.0", + "x-ms-ratelimit-remaining-subscription-reads": "11984", + "x-ms-request-id": "cf2de116-4167-4130-bf50-1e631d119407", + "x-ms-routing-request-id": "NORTHEUROPE:20230713T123706Z:5a3b8ce3-ff25-47df-ba40-0873ec548241" + }, + "ResponseBody": { + "sku": { + "name": "payShield10K_LMK1_CPS60" + }, + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5805/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/DedicatedHsmTest2978", + "name": "DedicatedHsmTest2978", + "type": "Microsoft.HardwareSecurityModules/dedicatedHSMs", + "location": "eastus", + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-13T12:34:21.269Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-13T12:34:21.269Z" + }, + "properties": { + "networkProfile": { + "subnet": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5805/providers/Microsoft.Network/virtualNetworks/dhsm-vnet/subnets/default" + }, + "networkInterfaces": [ + { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5805/providers/Microsoft.Network/networkInterfaces/DedicatedHsmTest2978_HSMHost1Nic", + "privateIpAddress": "10.0.0.4" + }, + { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5805/providers/Microsoft.Network/networkInterfaces/DedicatedHsmTest2978_HSMHost2Nic", + "privateIpAddress": "10.0.0.5" + } + ] + }, + "managementNetworkProfile": { + "subnet": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5805/providers/Microsoft.Network/virtualNetworks/dhsm-vnet/subnets/default" + }, + "networkInterfaces": [ + { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5805/providers/Microsoft.Network/networkInterfaces/DedicatedHsmTest2978_HSMMgmtNic", + "privateIpAddress": "10.0.0.6" + } + ] + }, + "provisioningState": "Succeeded", + "statusMessage": "The Dedicated HSM device is provisioned successfully and ready to use.", + "stampId": "stamp1" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5805/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs?api-version=2021-11-30", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-30d0a0900ad1f9e95e0b26ba56cb0e68-4d797f0a21daa3f6-00", + "User-Agent": "azsdk-net-ResourceManager.HardwareSecurityModules/1.0.0-alpha.20230713.1 (.NET 6.0.20; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "f51bbdad2fc5744d6d34a24118f928d2", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1826", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 13 Jul 2023 12:37:06 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-AspNet-Version": "4.0.30319", + "X-Content-Type-Options": "nosniff", + "x-ms-client-request-id": "f51bbdad2fc5744d6d34a24118f928d2", + "x-ms-correlation-request-id": "0b18b999-2865-431b-a035-78fe781ae778", + "x-ms-keyvault-service-version": "1.5.851.0", + "x-ms-ratelimit-remaining-subscription-reads": "11983", + "x-ms-request-id": "95fdd05f-7261-460c-837c-234acfca868e", + "x-ms-routing-request-id": "NORTHEUROPE:20230713T123706Z:0b18b999-2865-431b-a035-78fe781ae778" + }, + "ResponseBody": { + "value": [ + { + "sku": { + "name": "payShield10K_LMK1_CPS60" + }, + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5805/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/DedicatedHsmTest2978", + "name": "DedicatedHsmTest2978", + "type": "Microsoft.HardwareSecurityModules/dedicatedHSMs", + "location": "eastus", + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-13T12:34:21.269Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-13T12:34:21.269Z" + }, + "properties": { + "networkProfile": { + "subnet": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5805/providers/Microsoft.Network/virtualNetworks/dhsm-vnet/subnets/default" + }, + "networkInterfaces": [ + { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5805/providers/Microsoft.Network/networkInterfaces/DedicatedHsmTest2978_HSMHost1Nic", + "privateIpAddress": "10.0.0.4" + }, + { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5805/providers/Microsoft.Network/networkInterfaces/DedicatedHsmTest2978_HSMHost2Nic", + "privateIpAddress": "10.0.0.5" + } + ] + }, + "managementNetworkProfile": { + "subnet": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5805/providers/Microsoft.Network/virtualNetworks/dhsm-vnet/subnets/default" + }, + "networkInterfaces": [ + { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg5805/providers/Microsoft.Network/networkInterfaces/DedicatedHsmTest2978_HSMMgmtNic", + "privateIpAddress": "10.0.0.6" + } + ] + }, + "provisioningState": "Succeeded", + "statusMessage": "The Dedicated HSM device is provisioned successfully and ready to use.", + "stampId": "stamp1" + } + } + ] + } + } + ], + "Variables": { + "AZURE_AUTHORITY_HOST": "https://login.microsoftonline.com", + "RandomSeed": "1016654426", + "RESOURCE_MANAGER_URL": null, + "SUBSCRIPTION_ID": "75e96d09-a291-40e1-a5e6-cda78233d867" + } +} diff --git a/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/tests/SessionRecords/DedicatedHsmTests/CreateOrUpdateDedicatedHsmTestAsync.json b/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/tests/SessionRecords/DedicatedHsmTests/CreateOrUpdateDedicatedHsmTestAsync.json new file mode 100644 index 000000000000..459038805685 --- /dev/null +++ b/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/tests/SessionRecords/DedicatedHsmTests/CreateOrUpdateDedicatedHsmTestAsync.json @@ -0,0 +1,1836 @@ +{ + "Entries": [ + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867?api-version=**", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-00e796898cbbdcbebc7176aad1ffb8bc-7db09eaa4fb6a7f9-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.20; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "2135d61cc4b9e6c003efadc4fb26d3d8", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "448", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 13 Jul 2023 12:37:09 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "8a7253e6-cb69-47d7-a046-d5e8bc33b9d4", + "x-ms-ratelimit-remaining-subscription-reads": "11982", + "x-ms-request-id": "8a7253e6-cb69-47d7-a046-d5e8bc33b9d4", + "x-ms-routing-request-id": "NORTHEUROPE:20230713T123709Z:8a7253e6-cb69-47d7-a046-d5e8bc33b9d4" + }, + "ResponseBody": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867", + "authorizationSource": "RoleBased", + "managedByTenants": [ + { + "tenantId": "2f4a9838-26b7-47ee-be60-ccc1fdec5953" + } + ], + "subscriptionId": "75e96d09-a291-40e1-a5e6-cda78233d867", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "displayName": "susolank Projects", + "state": "Enabled", + "subscriptionPolicies": { + "locationPlacementId": "Internal_2014-09-01", + "quotaId": "Internal_2014-09-01", + "spendingLimit": "Off" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867?api-version=**", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-d4587daa18278eea6c196882cc67577c-1cef603e09bd3c37-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.20; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "fe0e411597beaa1abf86c0550cf4ad0c", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "448", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 13 Jul 2023 12:37:09 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "75121a75-aea9-45fe-959d-2fa7f7683a64", + "x-ms-ratelimit-remaining-subscription-reads": "11981", + "x-ms-request-id": "75121a75-aea9-45fe-959d-2fa7f7683a64", + "x-ms-routing-request-id": "NORTHEUROPE:20230713T123709Z:75121a75-aea9-45fe-959d-2fa7f7683a64" + }, + "ResponseBody": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867", + "authorizationSource": "RoleBased", + "managedByTenants": [ + { + "tenantId": "2f4a9838-26b7-47ee-be60-ccc1fdec5953" + } + ], + "subscriptionId": "75e96d09-a291-40e1-a5e6-cda78233d867", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "displayName": "susolank Projects", + "state": "Enabled", + "subscriptionPolicies": { + "locationPlacementId": "Internal_2014-09-01", + "quotaId": "Internal_2014-09-01", + "spendingLimit": "Off" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourcegroups/sdkTestsRg7821?api-version=**", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "21", + "Content-Type": "application/json", + "traceparent": "00-9cc11068678c20f00e1ca5d41807955b-70a9dd8a0ff5957d-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.20; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "c1f791ab4ef0e34fe5fb4dba64d41705", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "location": "eastus" + }, + "StatusCode": 201, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "225", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 13 Jul 2023 12:37:10 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "d754924f-2ae6-451b-b0d5-7ac4e97ed696", + "x-ms-ratelimit-remaining-subscription-writes": "1197", + "x-ms-request-id": "d754924f-2ae6-451b-b0d5-7ac4e97ed696", + "x-ms-routing-request-id": "NORTHEUROPE:20230713T123710Z:d754924f-2ae6-451b-b0d5-7ac4e97ed696" + }, + "ResponseBody": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg7821", + "name": "sdkTestsRg7821", + "type": "Microsoft.Resources/resourceGroups", + "location": "eastus", + "properties": { + "provisioningState": "Succeeded" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg7821/providers/Microsoft.Network/virtualNetworks/dhsm-vnet?api-version=2023-02-01", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "282", + "Content-Type": "application/json", + "traceparent": "00-4d7267dfb6d6d94f6491b4341be279a3-6332ac759e0fac8b-00", + "User-Agent": "azsdk-net-ResourceManager.Network/1.1.0 (.NET 6.0.20; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "7c4c92b785b38bbb6232046ada0f41a0", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "location": "eastus", + "properties": { + "addressSpace": { + "addressPrefixes": [ + "10.0.0.0/16" + ] + }, + "subnets": [ + { + "name": "default", + "properties": { + "addressPrefix": "10.0.0.0/24", + "delegations": [ + { + "name": "myDelegation", + "properties": { + "serviceName": "Microsoft.HardwareSecurityModules/dedicatedHSMs" + } + } + ] + } + } + ] + } + }, + "StatusCode": 201, + "ResponseHeaders": { + "Azure-AsyncNotification": "Enabled", + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/providers/Microsoft.Network/locations/eastus/operations/92d851e8-d259-4e82-bad9-b27b5d35da7d?api-version=2023-02-01", + "Cache-Control": "no-cache", + "Content-Length": "2063", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 13 Jul 2023 12:37:12 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Retry-After": "3", + "Server": [ + "Microsoft-HTTPAPI/2.0", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-arm-service-request-id": "9404bd60-5ec4-4ebc-85af-9cd5dc4f259f", + "x-ms-client-request-id": "7c4c92b785b38bbb6232046ada0f41a0", + "x-ms-correlation-request-id": "baff92de-07f0-41b5-a77a-c25b01d64199", + "x-ms-ratelimit-remaining-subscription-writes": "1196", + "x-ms-request-id": "92d851e8-d259-4e82-bad9-b27b5d35da7d", + "x-ms-routing-request-id": "NORTHEUROPE:20230713T123712Z:baff92de-07f0-41b5-a77a-c25b01d64199" + }, + "ResponseBody": { + "name": "dhsm-vnet", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg7821/providers/Microsoft.Network/virtualNetworks/dhsm-vnet", + "etag": "W/\u002288403e70-399c-4650-a03a-bcc86a7effe2\u0022", + "type": "Microsoft.Network/virtualNetworks", + "location": "eastus", + "properties": { + "provisioningState": "Updating", + "resourceGuid": "98227892-c003-4e10-a1bd-c05b6d25fec0", + "addressSpace": { + "addressPrefixes": [ + "10.0.0.0/16" + ] + }, + "subnets": [ + { + "name": "default", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg7821/providers/Microsoft.Network/virtualNetworks/dhsm-vnet/subnets/default", + "etag": "W/\u002288403e70-399c-4650-a03a-bcc86a7effe2\u0022", + "properties": { + "provisioningState": "Updating", + "addressPrefix": "10.0.0.0/24", + "delegations": [ + { + "name": "myDelegation", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg7821/providers/Microsoft.Network/virtualNetworks/dhsm-vnet/subnets/default/delegations/myDelegation", + "etag": "W/\u002288403e70-399c-4650-a03a-bcc86a7effe2\u0022", + "properties": { + "provisioningState": "Succeeded", + "serviceName": "Microsoft.HardwareSecurityModules/dedicatedHSMs", + "actions": [ + "Microsoft.Network/networkinterfaces/*", + "Microsoft.Network/virtualNetworks/subnets/join/action" + ] + }, + "type": "Microsoft.Network/virtualNetworks/subnets/delegations" + } + ], + "purpose": "HostedWorkloads", + "privateEndpointNetworkPolicies": "Disabled", + "privateLinkServiceNetworkPolicies": "Enabled" + }, + "type": "Microsoft.Network/virtualNetworks/subnets" + } + ], + "virtualNetworkPeerings": [], + "enableDdosProtection": false + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/providers/Microsoft.Network/locations/eastus/operations/92d851e8-d259-4e82-bad9-b27b5d35da7d?api-version=2023-02-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-4d7267dfb6d6d94f6491b4341be279a3-c0f6299039cf2f34-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.20; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "1a3c5c5006c00cf83c368e1b4a790aeb", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "30", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 13 Jul 2023 12:37:12 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Retry-After": "10", + "Server": [ + "Microsoft-HTTPAPI/2.0", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-arm-service-request-id": "6a4a8b00-f7df-4b03-99aa-5ccf7c12fa0c", + "x-ms-client-request-id": "1a3c5c5006c00cf83c368e1b4a790aeb", + "x-ms-correlation-request-id": "939940b6-78c2-423d-919a-174d5b58c38f", + "x-ms-ratelimit-remaining-subscription-reads": "11980", + "x-ms-request-id": "dd865869-31e2-4931-a51a-1191b88765a0", + "x-ms-routing-request-id": "NORTHEUROPE:20230713T123712Z:939940b6-78c2-423d-919a-174d5b58c38f" + }, + "ResponseBody": { + "status": "InProgress" + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/providers/Microsoft.Network/locations/eastus/operations/92d851e8-d259-4e82-bad9-b27b5d35da7d?api-version=2023-02-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-4d7267dfb6d6d94f6491b4341be279a3-43f596f634c2e4b2-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.20; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "85221a0b298391989f8c61dae9ee9c07", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "29", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 13 Jul 2023 12:37:22 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": [ + "Microsoft-HTTPAPI/2.0", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-arm-service-request-id": "07e28a16-1b1a-4d4b-9326-bdde95d99b63", + "x-ms-client-request-id": "85221a0b298391989f8c61dae9ee9c07", + "x-ms-correlation-request-id": "e9fed07c-9cc0-402b-9124-9b4c7bb7e3bb", + "x-ms-ratelimit-remaining-subscription-reads": "11979", + "x-ms-request-id": "e00b0d12-e0d3-447e-81c6-15ba6b30626d", + "x-ms-routing-request-id": "NORTHEUROPE:20230713T123722Z:e9fed07c-9cc0-402b-9124-9b4c7bb7e3bb" + }, + "ResponseBody": { + "status": "Succeeded" + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg7821/providers/Microsoft.Network/virtualNetworks/dhsm-vnet?api-version=2023-02-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-4d7267dfb6d6d94f6491b4341be279a3-54dfc0657adbf0e6-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.20; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "7e1a5b8026d33be057889fe097d874a1", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "2065", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 13 Jul 2023 12:37:22 GMT", + "ETag": "W/\u0022b5ed0398-4cad-4a1d-a99e-1c2ef1ab9503\u0022", + "Expires": "-1", + "Pragma": "no-cache", + "Server": [ + "Microsoft-HTTPAPI/2.0", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-arm-service-request-id": "fc48e2a9-c252-4392-8465-ffde15b78470", + "x-ms-client-request-id": "7e1a5b8026d33be057889fe097d874a1", + "x-ms-correlation-request-id": "347ebdf5-f341-4d00-a2a7-5ee74a0955d1", + "x-ms-ratelimit-remaining-subscription-reads": "11978", + "x-ms-request-id": "c23d4b64-7eb3-49cc-9a6e-05588caabbb5", + "x-ms-routing-request-id": "NORTHEUROPE:20230713T123722Z:347ebdf5-f341-4d00-a2a7-5ee74a0955d1" + }, + "ResponseBody": { + "name": "dhsm-vnet", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg7821/providers/Microsoft.Network/virtualNetworks/dhsm-vnet", + "etag": "W/\u0022b5ed0398-4cad-4a1d-a99e-1c2ef1ab9503\u0022", + "type": "Microsoft.Network/virtualNetworks", + "location": "eastus", + "properties": { + "provisioningState": "Succeeded", + "resourceGuid": "98227892-c003-4e10-a1bd-c05b6d25fec0", + "addressSpace": { + "addressPrefixes": [ + "10.0.0.0/16" + ] + }, + "subnets": [ + { + "name": "default", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg7821/providers/Microsoft.Network/virtualNetworks/dhsm-vnet/subnets/default", + "etag": "W/\u0022b5ed0398-4cad-4a1d-a99e-1c2ef1ab9503\u0022", + "properties": { + "provisioningState": "Succeeded", + "addressPrefix": "10.0.0.0/24", + "delegations": [ + { + "name": "myDelegation", + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg7821/providers/Microsoft.Network/virtualNetworks/dhsm-vnet/subnets/default/delegations/myDelegation", + "etag": "W/\u0022b5ed0398-4cad-4a1d-a99e-1c2ef1ab9503\u0022", + "properties": { + "provisioningState": "Succeeded", + "serviceName": "Microsoft.HardwareSecurityModules/dedicatedHSMs", + "actions": [ + "Microsoft.Network/networkinterfaces/*", + "Microsoft.Network/virtualNetworks/subnets/join/action" + ] + }, + "type": "Microsoft.Network/virtualNetworks/subnets/delegations" + } + ], + "purpose": "HostedWorkloads", + "privateEndpointNetworkPolicies": "Disabled", + "privateLinkServiceNetworkPolicies": "Enabled" + }, + "type": "Microsoft.Network/virtualNetworks/subnets" + } + ], + "virtualNetworkPeerings": [], + "enableDdosProtection": false + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg7821/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/DedicatedHsmTest7496?api-version=2021-11-30", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "665", + "Content-Type": "application/json", + "traceparent": "00-3251a4a2db96cc7df1230d73992ed593-ad83c73b723387cf-00", + "User-Agent": "azsdk-net-ResourceManager.HardwareSecurityModules/1.0.0-alpha.20230713.1 (.NET 6.0.20; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "d4c2b0ce2c372725c3aa7b34a41d224d", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "sku": { + "name": "payShield10K_LMK1_CPS60" + }, + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "location": "eastus", + "properties": { + "networkProfile": { + "subnet": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg7821/providers/Microsoft.Network/virtualNetworks/dhsm-vnet/subnets/default" + }, + "networkInterfaces": [ + { + "privateIpAddress": "10.0.0.4" + }, + { + "privateIpAddress": "10.0.0.5" + } + ] + }, + "managementNetworkProfile": { + "subnet": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg7821/providers/Microsoft.Network/virtualNetworks/dhsm-vnet/subnets/default" + }, + "networkInterfaces": [ + { + "privateIpAddress": "10.0.0.6" + } + ] + }, + "stampId": "stamp1" + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1315", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 13 Jul 2023 12:37:23 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-AspNet-Version": "4.0.30319", + "X-Content-Type-Options": "nosniff", + "x-ms-client-request-id": "d4c2b0ce2c372725c3aa7b34a41d224d", + "x-ms-correlation-request-id": "f5fabcf2-b803-48a9-9c5d-2d7a75da27b2", + "x-ms-keyvault-service-version": "1.5.851.0", + "x-ms-ratelimit-remaining-subscription-writes": "1195", + "x-ms-request-id": "5b7fb816-990a-4740-a2dc-d1c1c19221c5", + "x-ms-routing-request-id": "NORTHEUROPE:20230713T123724Z:f5fabcf2-b803-48a9-9c5d-2d7a75da27b2" + }, + "ResponseBody": { + "sku": { + "name": "payShield10K_LMK1_CPS60" + }, + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg7821/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/DedicatedHsmTest7496", + "name": "DedicatedHsmTest7496", + "type": "Microsoft.HardwareSecurityModules/dedicatedHSMs", + "location": "eastus", + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-13T12:37:23.312Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-13T12:37:23.312Z" + }, + "properties": { + "networkProfile": { + "subnet": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg7821/providers/Microsoft.Network/virtualNetworks/dhsm-vnet/subnets/default" + }, + "networkInterfaces": [ + { + "privateIpAddress": "10.0.0.4" + }, + { + "privateIpAddress": "10.0.0.5" + } + ] + }, + "managementNetworkProfile": { + "subnet": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg7821/providers/Microsoft.Network/virtualNetworks/dhsm-vnet/subnets/default" + }, + "networkInterfaces": [ + { + "privateIpAddress": "10.0.0.6" + } + ] + }, + "provisioningState": "CheckingQuota", + "statusMessage": "Resource creation in progress. Validating subscription device quota...", + "stampId": "stamp1" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg7821/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/DedicatedHsmTest7496?api-version=2021-11-30", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-3251a4a2db96cc7df1230d73992ed593-804105a2016693a0-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.20; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "390bbf17c72b54cf36f2ba28abac9639", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1315", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 13 Jul 2023 12:37:23 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-AspNet-Version": "4.0.30319", + "X-Content-Type-Options": "nosniff", + "x-ms-client-request-id": "390bbf17c72b54cf36f2ba28abac9639", + "x-ms-correlation-request-id": "2f18246c-d9b9-445b-bfaf-bfe78028dc5b", + "x-ms-keyvault-service-version": "1.5.851.0", + "x-ms-ratelimit-remaining-subscription-reads": "11977", + "x-ms-request-id": "14ea9359-95a3-4fe6-a23e-0426b8f19a4c", + "x-ms-routing-request-id": "NORTHEUROPE:20230713T123724Z:2f18246c-d9b9-445b-bfaf-bfe78028dc5b" + }, + "ResponseBody": { + "sku": { + "name": "payShield10K_LMK1_CPS60" + }, + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg7821/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/DedicatedHsmTest7496", + "name": "DedicatedHsmTest7496", + "type": "Microsoft.HardwareSecurityModules/dedicatedHSMs", + "location": "eastus", + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-13T12:37:23.312Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-13T12:37:23.312Z" + }, + "properties": { + "networkProfile": { + "subnet": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg7821/providers/Microsoft.Network/virtualNetworks/dhsm-vnet/subnets/default" + }, + "networkInterfaces": [ + { + "privateIpAddress": "10.0.0.4" + }, + { + "privateIpAddress": "10.0.0.5" + } + ] + }, + "managementNetworkProfile": { + "subnet": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg7821/providers/Microsoft.Network/virtualNetworks/dhsm-vnet/subnets/default" + }, + "networkInterfaces": [ + { + "privateIpAddress": "10.0.0.6" + } + ] + }, + "provisioningState": "CheckingQuota", + "statusMessage": "Resource creation in progress. Validating subscription device quota...", + "stampId": "stamp1" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg7821/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/DedicatedHsmTest7496?api-version=2021-11-30", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-3251a4a2db96cc7df1230d73992ed593-54268afd5f4a19c4-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.20; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "10465165853d424297dd9b50fe2a9d0b", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1315", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 13 Jul 2023 12:37:25 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-AspNet-Version": "4.0.30319", + "X-Content-Type-Options": "nosniff", + "x-ms-client-request-id": "10465165853d424297dd9b50fe2a9d0b", + "x-ms-correlation-request-id": "fbee0dd7-a309-4e3d-8bdf-ba972cf0a739", + "x-ms-keyvault-service-version": "1.5.851.0", + "x-ms-ratelimit-remaining-subscription-reads": "11976", + "x-ms-request-id": "5a102468-7e6f-449b-bef1-845213e63490", + "x-ms-routing-request-id": "NORTHEUROPE:20230713T123725Z:fbee0dd7-a309-4e3d-8bdf-ba972cf0a739" + }, + "ResponseBody": { + "sku": { + "name": "payShield10K_LMK1_CPS60" + }, + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg7821/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/DedicatedHsmTest7496", + "name": "DedicatedHsmTest7496", + "type": "Microsoft.HardwareSecurityModules/dedicatedHSMs", + "location": "eastus", + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-13T12:37:23.312Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-13T12:37:23.312Z" + }, + "properties": { + "networkProfile": { + "subnet": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg7821/providers/Microsoft.Network/virtualNetworks/dhsm-vnet/subnets/default" + }, + "networkInterfaces": [ + { + "privateIpAddress": "10.0.0.4" + }, + { + "privateIpAddress": "10.0.0.5" + } + ] + }, + "managementNetworkProfile": { + "subnet": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg7821/providers/Microsoft.Network/virtualNetworks/dhsm-vnet/subnets/default" + }, + "networkInterfaces": [ + { + "privateIpAddress": "10.0.0.6" + } + ] + }, + "provisioningState": "CheckingQuota", + "statusMessage": "Resource creation in progress. Validating subscription device quota...", + "stampId": "stamp1" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg7821/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/DedicatedHsmTest7496?api-version=2021-11-30", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-3251a4a2db96cc7df1230d73992ed593-38d10c243e5ab486-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.20; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "e51cb4b0e911d322b645b96cd1f0398d", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1315", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 13 Jul 2023 12:37:26 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-AspNet-Version": "4.0.30319", + "X-Content-Type-Options": "nosniff", + "x-ms-client-request-id": "e51cb4b0e911d322b645b96cd1f0398d", + "x-ms-correlation-request-id": "f14be223-15f8-430f-ae03-f3b5805f2b60", + "x-ms-keyvault-service-version": "1.5.851.0", + "x-ms-ratelimit-remaining-subscription-reads": "11975", + "x-ms-request-id": "e4b03380-9842-429b-ba05-1df04ec7fa27", + "x-ms-routing-request-id": "NORTHEUROPE:20230713T123726Z:f14be223-15f8-430f-ae03-f3b5805f2b60" + }, + "ResponseBody": { + "sku": { + "name": "payShield10K_LMK1_CPS60" + }, + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg7821/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/DedicatedHsmTest7496", + "name": "DedicatedHsmTest7496", + "type": "Microsoft.HardwareSecurityModules/dedicatedHSMs", + "location": "eastus", + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-13T12:37:23.312Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-13T12:37:23.312Z" + }, + "properties": { + "networkProfile": { + "subnet": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg7821/providers/Microsoft.Network/virtualNetworks/dhsm-vnet/subnets/default" + }, + "networkInterfaces": [ + { + "privateIpAddress": "10.0.0.4" + }, + { + "privateIpAddress": "10.0.0.5" + } + ] + }, + "managementNetworkProfile": { + "subnet": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg7821/providers/Microsoft.Network/virtualNetworks/dhsm-vnet/subnets/default" + }, + "networkInterfaces": [ + { + "privateIpAddress": "10.0.0.6" + } + ] + }, + "provisioningState": "CheckingQuota", + "statusMessage": "Resource creation in progress. Validating subscription device quota...", + "stampId": "stamp1" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg7821/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/DedicatedHsmTest7496?api-version=2021-11-30", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-3251a4a2db96cc7df1230d73992ed593-d5242a4f8b379f68-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.20; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "3795f351e97292887dc8a14e2b7f550b", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1315", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 13 Jul 2023 12:37:27 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-AspNet-Version": "4.0.30319", + "X-Content-Type-Options": "nosniff", + "x-ms-client-request-id": "3795f351e97292887dc8a14e2b7f550b", + "x-ms-correlation-request-id": "0d1a16c0-82cd-40e4-8bc3-db54d721ee8d", + "x-ms-keyvault-service-version": "1.5.851.0", + "x-ms-ratelimit-remaining-subscription-reads": "11974", + "x-ms-request-id": "9cc6569f-8806-48d5-8001-c20336a16e23", + "x-ms-routing-request-id": "NORTHEUROPE:20230713T123727Z:0d1a16c0-82cd-40e4-8bc3-db54d721ee8d" + }, + "ResponseBody": { + "sku": { + "name": "payShield10K_LMK1_CPS60" + }, + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg7821/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/DedicatedHsmTest7496", + "name": "DedicatedHsmTest7496", + "type": "Microsoft.HardwareSecurityModules/dedicatedHSMs", + "location": "eastus", + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-13T12:37:23.312Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-13T12:37:23.312Z" + }, + "properties": { + "networkProfile": { + "subnet": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg7821/providers/Microsoft.Network/virtualNetworks/dhsm-vnet/subnets/default" + }, + "networkInterfaces": [ + { + "privateIpAddress": "10.0.0.4" + }, + { + "privateIpAddress": "10.0.0.5" + } + ] + }, + "managementNetworkProfile": { + "subnet": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg7821/providers/Microsoft.Network/virtualNetworks/dhsm-vnet/subnets/default" + }, + "networkInterfaces": [ + { + "privateIpAddress": "10.0.0.6" + } + ] + }, + "provisioningState": "CheckingQuota", + "statusMessage": "Resource creation in progress. Validating subscription device quota...", + "stampId": "stamp1" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg7821/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/DedicatedHsmTest7496?api-version=2021-11-30", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-3251a4a2db96cc7df1230d73992ed593-324e268c520f2221-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.20; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "f678af55b1907b282f725af8cbd671a7", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1315", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 13 Jul 2023 12:37:30 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-AspNet-Version": "4.0.30319", + "X-Content-Type-Options": "nosniff", + "x-ms-client-request-id": "f678af55b1907b282f725af8cbd671a7", + "x-ms-correlation-request-id": "2c404f05-94af-4ff6-8142-de12aa9fbd46", + "x-ms-keyvault-service-version": "1.5.851.0", + "x-ms-ratelimit-remaining-subscription-reads": "11973", + "x-ms-request-id": "140eb804-5f0f-4992-9016-cd68a961c93f", + "x-ms-routing-request-id": "NORTHEUROPE:20230713T123731Z:2c404f05-94af-4ff6-8142-de12aa9fbd46" + }, + "ResponseBody": { + "sku": { + "name": "payShield10K_LMK1_CPS60" + }, + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg7821/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/DedicatedHsmTest7496", + "name": "DedicatedHsmTest7496", + "type": "Microsoft.HardwareSecurityModules/dedicatedHSMs", + "location": "eastus", + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-13T12:37:23.312Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-13T12:37:23.312Z" + }, + "properties": { + "networkProfile": { + "subnet": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg7821/providers/Microsoft.Network/virtualNetworks/dhsm-vnet/subnets/default" + }, + "networkInterfaces": [ + { + "privateIpAddress": "10.0.0.4" + }, + { + "privateIpAddress": "10.0.0.5" + } + ] + }, + "managementNetworkProfile": { + "subnet": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg7821/providers/Microsoft.Network/virtualNetworks/dhsm-vnet/subnets/default" + }, + "networkInterfaces": [ + { + "privateIpAddress": "10.0.0.6" + } + ] + }, + "provisioningState": "CheckingQuota", + "statusMessage": "Resource creation in progress. Validating subscription device quota...", + "stampId": "stamp1" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg7821/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/DedicatedHsmTest7496?api-version=2021-11-30", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-3251a4a2db96cc7df1230d73992ed593-137ed0e91fd1f142-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.20; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "0aff0ea46594c6982b89674848d3a737", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1315", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 13 Jul 2023 12:37:34 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-AspNet-Version": "4.0.30319", + "X-Content-Type-Options": "nosniff", + "x-ms-client-request-id": "0aff0ea46594c6982b89674848d3a737", + "x-ms-correlation-request-id": "90c2a9a9-2010-4bcc-87d5-1c0f0622bd4b", + "x-ms-keyvault-service-version": "1.5.851.0", + "x-ms-ratelimit-remaining-subscription-reads": "11972", + "x-ms-request-id": "b7f9072c-9d70-42b6-ab8f-c32ab9a1bcac", + "x-ms-routing-request-id": "NORTHEUROPE:20230713T123735Z:90c2a9a9-2010-4bcc-87d5-1c0f0622bd4b" + }, + "ResponseBody": { + "sku": { + "name": "payShield10K_LMK1_CPS60" + }, + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg7821/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/DedicatedHsmTest7496", + "name": "DedicatedHsmTest7496", + "type": "Microsoft.HardwareSecurityModules/dedicatedHSMs", + "location": "eastus", + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-13T12:37:23.312Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-13T12:37:23.312Z" + }, + "properties": { + "networkProfile": { + "subnet": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg7821/providers/Microsoft.Network/virtualNetworks/dhsm-vnet/subnets/default" + }, + "networkInterfaces": [ + { + "privateIpAddress": "10.0.0.4" + }, + { + "privateIpAddress": "10.0.0.5" + } + ] + }, + "managementNetworkProfile": { + "subnet": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg7821/providers/Microsoft.Network/virtualNetworks/dhsm-vnet/subnets/default" + }, + "networkInterfaces": [ + { + "privateIpAddress": "10.0.0.6" + } + ] + }, + "provisioningState": "CheckingQuota", + "statusMessage": "Resource creation in progress. Validating subscription device quota...", + "stampId": "stamp1" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg7821/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/DedicatedHsmTest7496?api-version=2021-11-30", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-3251a4a2db96cc7df1230d73992ed593-ccc5b4990b4a2271-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.20; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "2116adf04278a0fdcb1908ff8f90c6a7", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1315", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 13 Jul 2023 12:37:43 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-AspNet-Version": "4.0.30319", + "X-Content-Type-Options": "nosniff", + "x-ms-client-request-id": "2116adf04278a0fdcb1908ff8f90c6a7", + "x-ms-correlation-request-id": "1b6a48bc-a4c5-41b6-8134-e1c339ca1c23", + "x-ms-keyvault-service-version": "1.5.851.0", + "x-ms-ratelimit-remaining-subscription-reads": "11971", + "x-ms-request-id": "c3a37910-5e18-4aa5-adfb-c225e3470901", + "x-ms-routing-request-id": "NORTHEUROPE:20230713T123743Z:1b6a48bc-a4c5-41b6-8134-e1c339ca1c23" + }, + "ResponseBody": { + "sku": { + "name": "payShield10K_LMK1_CPS60" + }, + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg7821/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/DedicatedHsmTest7496", + "name": "DedicatedHsmTest7496", + "type": "Microsoft.HardwareSecurityModules/dedicatedHSMs", + "location": "eastus", + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-13T12:37:23.312Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-13T12:37:23.312Z" + }, + "properties": { + "networkProfile": { + "subnet": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg7821/providers/Microsoft.Network/virtualNetworks/dhsm-vnet/subnets/default" + }, + "networkInterfaces": [ + { + "privateIpAddress": "10.0.0.4" + }, + { + "privateIpAddress": "10.0.0.5" + } + ] + }, + "managementNetworkProfile": { + "subnet": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg7821/providers/Microsoft.Network/virtualNetworks/dhsm-vnet/subnets/default" + }, + "networkInterfaces": [ + { + "privateIpAddress": "10.0.0.6" + } + ] + }, + "provisioningState": "CheckingQuota", + "statusMessage": "Resource creation in progress. Validating subscription device quota...", + "stampId": "stamp1" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg7821/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/DedicatedHsmTest7496?api-version=2021-11-30", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-3251a4a2db96cc7df1230d73992ed593-4210543c9c5aac95-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.20; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "1da9f9574a7fef7617b1ca0649df335b", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1315", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 13 Jul 2023 12:37:59 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-AspNet-Version": "4.0.30319", + "X-Content-Type-Options": "nosniff", + "x-ms-client-request-id": "1da9f9574a7fef7617b1ca0649df335b", + "x-ms-correlation-request-id": "bb71590f-8e1b-4bfe-a961-ab7bc9ee199e", + "x-ms-keyvault-service-version": "1.5.851.0", + "x-ms-ratelimit-remaining-subscription-reads": "11970", + "x-ms-request-id": "c73c4f79-fab9-4b7f-914c-f0fcba1f1e6c", + "x-ms-routing-request-id": "NORTHEUROPE:20230713T123759Z:bb71590f-8e1b-4bfe-a961-ab7bc9ee199e" + }, + "ResponseBody": { + "sku": { + "name": "payShield10K_LMK1_CPS60" + }, + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg7821/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/DedicatedHsmTest7496", + "name": "DedicatedHsmTest7496", + "type": "Microsoft.HardwareSecurityModules/dedicatedHSMs", + "location": "eastus", + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-13T12:37:23.312Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-13T12:37:23.312Z" + }, + "properties": { + "networkProfile": { + "subnet": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg7821/providers/Microsoft.Network/virtualNetworks/dhsm-vnet/subnets/default" + }, + "networkInterfaces": [ + { + "privateIpAddress": "10.0.0.4" + }, + { + "privateIpAddress": "10.0.0.5" + } + ] + }, + "managementNetworkProfile": { + "subnet": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg7821/providers/Microsoft.Network/virtualNetworks/dhsm-vnet/subnets/default" + }, + "networkInterfaces": [ + { + "privateIpAddress": "10.0.0.6" + } + ] + }, + "provisioningState": "CheckingQuota", + "statusMessage": "Resource creation in progress. Validating subscription device quota...", + "stampId": "stamp1" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg7821/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/DedicatedHsmTest7496?api-version=2021-11-30", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-3251a4a2db96cc7df1230d73992ed593-4002c988428a758e-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.20; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "1e0722cb50bf612f105f3f7b5d99379a", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1315", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 13 Jul 2023 12:38:31 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-AspNet-Version": "4.0.30319", + "X-Content-Type-Options": "nosniff", + "x-ms-client-request-id": "1e0722cb50bf612f105f3f7b5d99379a", + "x-ms-correlation-request-id": "8b7e3dbc-6111-406e-a229-0cfef0d86d05", + "x-ms-keyvault-service-version": "1.5.851.0", + "x-ms-ratelimit-remaining-subscription-reads": "11969", + "x-ms-request-id": "f754ab35-aa29-4c7a-b8e4-4c6b58c4db5e", + "x-ms-routing-request-id": "NORTHEUROPE:20230713T123832Z:8b7e3dbc-6111-406e-a229-0cfef0d86d05" + }, + "ResponseBody": { + "sku": { + "name": "payShield10K_LMK1_CPS60" + }, + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg7821/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/DedicatedHsmTest7496", + "name": "DedicatedHsmTest7496", + "type": "Microsoft.HardwareSecurityModules/dedicatedHSMs", + "location": "eastus", + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-13T12:37:23.312Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-13T12:37:23.312Z" + }, + "properties": { + "networkProfile": { + "subnet": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg7821/providers/Microsoft.Network/virtualNetworks/dhsm-vnet/subnets/default" + }, + "networkInterfaces": [ + { + "privateIpAddress": "10.0.0.4" + }, + { + "privateIpAddress": "10.0.0.5" + } + ] + }, + "managementNetworkProfile": { + "subnet": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg7821/providers/Microsoft.Network/virtualNetworks/dhsm-vnet/subnets/default" + }, + "networkInterfaces": [ + { + "privateIpAddress": "10.0.0.6" + } + ] + }, + "provisioningState": "CheckingQuota", + "statusMessage": "Resource creation in progress. Validating subscription device quota...", + "stampId": "stamp1" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg7821/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/DedicatedHsmTest7496?api-version=2021-11-30", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-3251a4a2db96cc7df1230d73992ed593-17156dcc56bcdd23-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.20; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "4ef1c0c3892aa5b737270ac678f756ec", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1803", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 13 Jul 2023 12:39:04 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-AspNet-Version": "4.0.30319", + "X-Content-Type-Options": "nosniff", + "x-ms-client-request-id": "4ef1c0c3892aa5b737270ac678f756ec", + "x-ms-correlation-request-id": "0e6ce11c-7037-41fd-8dff-2b85b56a72cb", + "x-ms-keyvault-service-version": "1.5.851.0", + "x-ms-ratelimit-remaining-subscription-reads": "11968", + "x-ms-request-id": "11fd568b-0f12-4c8b-9e6a-a4394a8f4fbf", + "x-ms-routing-request-id": "NORTHEUROPE:20230713T123904Z:0e6ce11c-7037-41fd-8dff-2b85b56a72cb" + }, + "ResponseBody": { + "sku": { + "name": "payShield10K_LMK1_CPS60" + }, + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg7821/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/DedicatedHsmTest7496", + "name": "DedicatedHsmTest7496", + "type": "Microsoft.HardwareSecurityModules/dedicatedHSMs", + "location": "eastus", + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-13T12:37:23.312Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-13T12:37:23.312Z" + }, + "properties": { + "networkProfile": { + "subnet": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg7821/providers/Microsoft.Network/virtualNetworks/dhsm-vnet/subnets/default" + }, + "networkInterfaces": [ + { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg7821/providers/Microsoft.Network/networkInterfaces/DedicatedHsmTest7496_HSMHost1Nic", + "privateIpAddress": "10.0.0.4" + }, + { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg7821/providers/Microsoft.Network/networkInterfaces/DedicatedHsmTest7496_HSMHost2Nic", + "privateIpAddress": "10.0.0.5" + } + ] + }, + "managementNetworkProfile": { + "subnet": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg7821/providers/Microsoft.Network/virtualNetworks/dhsm-vnet/subnets/default" + }, + "networkInterfaces": [ + { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg7821/providers/Microsoft.Network/networkInterfaces/DedicatedHsmTest7496_HSMMgmtNic", + "privateIpAddress": "10.0.0.6" + } + ] + }, + "provisioningState": "Provisioning", + "statusMessage": "Resource creation in progress. Configuring the device...", + "stampId": "stamp1" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg7821/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/DedicatedHsmTest7496?api-version=2021-11-30", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-3251a4a2db96cc7df1230d73992ed593-938aa6a55c34c6d8-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.20; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "6c33ace6a88906e8ca480c200bfb927d", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1803", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 13 Jul 2023 12:39:36 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-AspNet-Version": "4.0.30319", + "X-Content-Type-Options": "nosniff", + "x-ms-client-request-id": "6c33ace6a88906e8ca480c200bfb927d", + "x-ms-correlation-request-id": "54c81e27-dcd9-48e0-981e-344e174038f0", + "x-ms-keyvault-service-version": "1.5.851.0", + "x-ms-ratelimit-remaining-subscription-reads": "11967", + "x-ms-request-id": "73c30dfd-da77-4dd1-a064-1a7a9e8a198c", + "x-ms-routing-request-id": "NORTHEUROPE:20230713T123936Z:54c81e27-dcd9-48e0-981e-344e174038f0" + }, + "ResponseBody": { + "sku": { + "name": "payShield10K_LMK1_CPS60" + }, + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg7821/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/DedicatedHsmTest7496", + "name": "DedicatedHsmTest7496", + "type": "Microsoft.HardwareSecurityModules/dedicatedHSMs", + "location": "eastus", + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-13T12:37:23.312Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-13T12:37:23.312Z" + }, + "properties": { + "networkProfile": { + "subnet": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg7821/providers/Microsoft.Network/virtualNetworks/dhsm-vnet/subnets/default" + }, + "networkInterfaces": [ + { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg7821/providers/Microsoft.Network/networkInterfaces/DedicatedHsmTest7496_HSMHost1Nic", + "privateIpAddress": "10.0.0.4" + }, + { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg7821/providers/Microsoft.Network/networkInterfaces/DedicatedHsmTest7496_HSMHost2Nic", + "privateIpAddress": "10.0.0.5" + } + ] + }, + "managementNetworkProfile": { + "subnet": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg7821/providers/Microsoft.Network/virtualNetworks/dhsm-vnet/subnets/default" + }, + "networkInterfaces": [ + { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg7821/providers/Microsoft.Network/networkInterfaces/DedicatedHsmTest7496_HSMMgmtNic", + "privateIpAddress": "10.0.0.6" + } + ] + }, + "provisioningState": "Provisioning", + "statusMessage": "Resource creation in progress. Configuring the device...", + "stampId": "stamp1" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg7821/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/DedicatedHsmTest7496?api-version=2021-11-30", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-3251a4a2db96cc7df1230d73992ed593-f0069cd7d97c1847-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.20; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "8842307ae4ed42316b62e7984668e919", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1803", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 13 Jul 2023 12:40:08 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-AspNet-Version": "4.0.30319", + "X-Content-Type-Options": "nosniff", + "x-ms-client-request-id": "8842307ae4ed42316b62e7984668e919", + "x-ms-correlation-request-id": "c6d096c7-a892-491b-b304-71ad77e7bb72", + "x-ms-keyvault-service-version": "1.5.851.0", + "x-ms-ratelimit-remaining-subscription-reads": "11966", + "x-ms-request-id": "47a62663-e828-416f-9647-6061eb168f70", + "x-ms-routing-request-id": "NORTHEUROPE:20230713T124008Z:c6d096c7-a892-491b-b304-71ad77e7bb72" + }, + "ResponseBody": { + "sku": { + "name": "payShield10K_LMK1_CPS60" + }, + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg7821/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/DedicatedHsmTest7496", + "name": "DedicatedHsmTest7496", + "type": "Microsoft.HardwareSecurityModules/dedicatedHSMs", + "location": "eastus", + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-13T12:37:23.312Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-13T12:37:23.312Z" + }, + "properties": { + "networkProfile": { + "subnet": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg7821/providers/Microsoft.Network/virtualNetworks/dhsm-vnet/subnets/default" + }, + "networkInterfaces": [ + { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg7821/providers/Microsoft.Network/networkInterfaces/DedicatedHsmTest7496_HSMHost1Nic", + "privateIpAddress": "10.0.0.4" + }, + { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg7821/providers/Microsoft.Network/networkInterfaces/DedicatedHsmTest7496_HSMHost2Nic", + "privateIpAddress": "10.0.0.5" + } + ] + }, + "managementNetworkProfile": { + "subnet": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg7821/providers/Microsoft.Network/virtualNetworks/dhsm-vnet/subnets/default" + }, + "networkInterfaces": [ + { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg7821/providers/Microsoft.Network/networkInterfaces/DedicatedHsmTest7496_HSMMgmtNic", + "privateIpAddress": "10.0.0.6" + } + ] + }, + "provisioningState": "Provisioning", + "statusMessage": "Resource creation in progress. Configuring the device...", + "stampId": "stamp1" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg7821/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/DedicatedHsmTest7496?api-version=2021-11-30", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-3251a4a2db96cc7df1230d73992ed593-4dbec6abcf72bbdb-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.20; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "b1945208ca651b11d8eb84e17c96993b", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1803", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 13 Jul 2023 12:40:40 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-AspNet-Version": "4.0.30319", + "X-Content-Type-Options": "nosniff", + "x-ms-client-request-id": "b1945208ca651b11d8eb84e17c96993b", + "x-ms-correlation-request-id": "5be065ca-858c-452e-975a-399014db0fdf", + "x-ms-keyvault-service-version": "1.5.851.0", + "x-ms-ratelimit-remaining-subscription-reads": "11965", + "x-ms-request-id": "9ddfd24c-ff71-41bc-9e11-746b3f0a3d2e", + "x-ms-routing-request-id": "NORTHEUROPE:20230713T124041Z:5be065ca-858c-452e-975a-399014db0fdf" + }, + "ResponseBody": { + "sku": { + "name": "payShield10K_LMK1_CPS60" + }, + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg7821/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/DedicatedHsmTest7496", + "name": "DedicatedHsmTest7496", + "type": "Microsoft.HardwareSecurityModules/dedicatedHSMs", + "location": "eastus", + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-13T12:37:23.312Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-13T12:37:23.312Z" + }, + "properties": { + "networkProfile": { + "subnet": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg7821/providers/Microsoft.Network/virtualNetworks/dhsm-vnet/subnets/default" + }, + "networkInterfaces": [ + { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg7821/providers/Microsoft.Network/networkInterfaces/DedicatedHsmTest7496_HSMHost1Nic", + "privateIpAddress": "10.0.0.4" + }, + { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg7821/providers/Microsoft.Network/networkInterfaces/DedicatedHsmTest7496_HSMHost2Nic", + "privateIpAddress": "10.0.0.5" + } + ] + }, + "managementNetworkProfile": { + "subnet": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg7821/providers/Microsoft.Network/virtualNetworks/dhsm-vnet/subnets/default" + }, + "networkInterfaces": [ + { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg7821/providers/Microsoft.Network/networkInterfaces/DedicatedHsmTest7496_HSMMgmtNic", + "privateIpAddress": "10.0.0.6" + } + ] + }, + "provisioningState": "Provisioning", + "statusMessage": "Resource creation in progress. Configuring the device...", + "stampId": "stamp1" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg7821/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/DedicatedHsmTest7496?api-version=2021-11-30", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-3251a4a2db96cc7df1230d73992ed593-f4f0f7db7b8ec1fd-00", + "User-Agent": "azsdk-net-ResourceManager/1.6.0 (.NET 6.0.20; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "484c8c94cdb401fe7af10126c14fc061", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1814", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 13 Jul 2023 12:41:12 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-AspNet-Version": "4.0.30319", + "X-Content-Type-Options": "nosniff", + "x-ms-client-request-id": "484c8c94cdb401fe7af10126c14fc061", + "x-ms-correlation-request-id": "e4eb4421-bacf-46e3-aeab-5c21d0774f65", + "x-ms-keyvault-service-version": "1.5.851.0", + "x-ms-ratelimit-remaining-subscription-reads": "11964", + "x-ms-request-id": "1c9c4865-cbc7-4ff0-8f73-b788cded9e84", + "x-ms-routing-request-id": "NORTHEUROPE:20230713T124113Z:e4eb4421-bacf-46e3-aeab-5c21d0774f65" + }, + "ResponseBody": { + "sku": { + "name": "payShield10K_LMK1_CPS60" + }, + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg7821/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/DedicatedHsmTest7496", + "name": "DedicatedHsmTest7496", + "type": "Microsoft.HardwareSecurityModules/dedicatedHSMs", + "location": "eastus", + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-13T12:37:23.312Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-13T12:37:23.312Z" + }, + "properties": { + "networkProfile": { + "subnet": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg7821/providers/Microsoft.Network/virtualNetworks/dhsm-vnet/subnets/default" + }, + "networkInterfaces": [ + { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg7821/providers/Microsoft.Network/networkInterfaces/DedicatedHsmTest7496_HSMHost1Nic", + "privateIpAddress": "10.0.0.4" + }, + { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg7821/providers/Microsoft.Network/networkInterfaces/DedicatedHsmTest7496_HSMHost2Nic", + "privateIpAddress": "10.0.0.5" + } + ] + }, + "managementNetworkProfile": { + "subnet": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg7821/providers/Microsoft.Network/virtualNetworks/dhsm-vnet/subnets/default" + }, + "networkInterfaces": [ + { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg7821/providers/Microsoft.Network/networkInterfaces/DedicatedHsmTest7496_HSMMgmtNic", + "privateIpAddress": "10.0.0.6" + } + ] + }, + "provisioningState": "Succeeded", + "statusMessage": "The Dedicated HSM device is provisioned successfully and ready to use.", + "stampId": "stamp1" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg7821/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/DedicatedHsmTest7496?api-version=2021-11-30", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-56fb7a36749b93e3d128b2b5b8622b4a-2e9065e690cd91e7-00", + "User-Agent": "azsdk-net-ResourceManager.HardwareSecurityModules/1.0.0-alpha.20230713.1 (.NET 6.0.20; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "b818f35ee166af181e27b002604fc5d4", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1814", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 13 Jul 2023 12:41:12 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-AspNet-Version": "4.0.30319", + "X-Content-Type-Options": "nosniff", + "x-ms-client-request-id": "b818f35ee166af181e27b002604fc5d4", + "x-ms-correlation-request-id": "9f205187-10f3-408c-897f-44c296d2aebe", + "x-ms-keyvault-service-version": "1.5.851.0", + "x-ms-ratelimit-remaining-subscription-reads": "11963", + "x-ms-request-id": "3471ba64-4962-4394-84f3-436c559bbb60", + "x-ms-routing-request-id": "NORTHEUROPE:20230713T124113Z:9f205187-10f3-408c-897f-44c296d2aebe" + }, + "ResponseBody": { + "sku": { + "name": "payShield10K_LMK1_CPS60" + }, + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg7821/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/DedicatedHsmTest7496", + "name": "DedicatedHsmTest7496", + "type": "Microsoft.HardwareSecurityModules/dedicatedHSMs", + "location": "eastus", + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-13T12:37:23.312Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-13T12:37:23.312Z" + }, + "properties": { + "networkProfile": { + "subnet": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg7821/providers/Microsoft.Network/virtualNetworks/dhsm-vnet/subnets/default" + }, + "networkInterfaces": [ + { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg7821/providers/Microsoft.Network/networkInterfaces/DedicatedHsmTest7496_HSMHost1Nic", + "privateIpAddress": "10.0.0.4" + }, + { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg7821/providers/Microsoft.Network/networkInterfaces/DedicatedHsmTest7496_HSMHost2Nic", + "privateIpAddress": "10.0.0.5" + } + ] + }, + "managementNetworkProfile": { + "subnet": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg7821/providers/Microsoft.Network/virtualNetworks/dhsm-vnet/subnets/default" + }, + "networkInterfaces": [ + { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg7821/providers/Microsoft.Network/networkInterfaces/DedicatedHsmTest7496_HSMMgmtNic", + "privateIpAddress": "10.0.0.6" + } + ] + }, + "provisioningState": "Succeeded", + "statusMessage": "The Dedicated HSM device is provisioned successfully and ready to use.", + "stampId": "stamp1" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg7821/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs?api-version=2021-11-30", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "User-Agent": "azsdk-net-ResourceManager.HardwareSecurityModules/1.0.0-alpha.20230713.1 (.NET 6.0.20; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "ba03abc8a11b3a6554933673c8ea5a88", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1826", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 13 Jul 2023 12:41:12 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-AspNet-Version": "4.0.30319", + "X-Content-Type-Options": "nosniff", + "x-ms-client-request-id": "ba03abc8a11b3a6554933673c8ea5a88", + "x-ms-correlation-request-id": "22405758-c01c-4ea1-93c4-04c3f3ad01bb", + "x-ms-keyvault-service-version": "1.5.851.0", + "x-ms-ratelimit-remaining-subscription-reads": "11962", + "x-ms-request-id": "dd66b604-3af7-40f5-9563-7a80fceb48d1", + "x-ms-routing-request-id": "NORTHEUROPE:20230713T124113Z:22405758-c01c-4ea1-93c4-04c3f3ad01bb" + }, + "ResponseBody": { + "value": [ + { + "sku": { + "name": "payShield10K_LMK1_CPS60" + }, + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg7821/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/DedicatedHsmTest7496", + "name": "DedicatedHsmTest7496", + "type": "Microsoft.HardwareSecurityModules/dedicatedHSMs", + "location": "eastus", + "tags": { + "Dept": "SDK Testing", + "Env": "df" + }, + "systemData": { + "createdBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "createdByType": "Application", + "createdAt": "2023-07-13T12:37:23.312Z", + "lastModifiedBy": "8c04e2a7-4a4a-43bf-bc08-53b4847b53f1", + "lastModifiedByType": "Application", + "lastModifiedAt": "2023-07-13T12:37:23.312Z" + }, + "properties": { + "networkProfile": { + "subnet": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg7821/providers/Microsoft.Network/virtualNetworks/dhsm-vnet/subnets/default" + }, + "networkInterfaces": [ + { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg7821/providers/Microsoft.Network/networkInterfaces/DedicatedHsmTest7496_HSMHost1Nic", + "privateIpAddress": "10.0.0.4" + }, + { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg7821/providers/Microsoft.Network/networkInterfaces/DedicatedHsmTest7496_HSMHost2Nic", + "privateIpAddress": "10.0.0.5" + } + ] + }, + "managementNetworkProfile": { + "subnet": { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg7821/providers/Microsoft.Network/virtualNetworks/dhsm-vnet/subnets/default" + }, + "networkInterfaces": [ + { + "id": "/subscriptions/75e96d09-a291-40e1-a5e6-cda78233d867/resourceGroups/sdkTestsRg7821/providers/Microsoft.Network/networkInterfaces/DedicatedHsmTest7496_HSMMgmtNic", + "privateIpAddress": "10.0.0.6" + } + ] + }, + "provisioningState": "Succeeded", + "statusMessage": "The Dedicated HSM device is provisioned successfully and ready to use.", + "stampId": "stamp1" + } + } + ] + } + } + ], + "Variables": { + "AZURE_AUTHORITY_HOST": "https://login.microsoftonline.com", + "RandomSeed": "481411601", + "RESOURCE_MANAGER_URL": null, + "SUBSCRIPTION_ID": "75e96d09-a291-40e1-a5e6-cda78233d867" + } +} diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/CHANGELOG.md b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/CHANGELOG.md index 92c85dc2d34d..fd50f75c0eca 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/CHANGELOG.md +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/CHANGELOG.md @@ -4,6 +4,8 @@ ### Features Added +- Exposed `JsonModelWriteCore` for model serialization procedure. + ### Breaking Changes ### Bugs Fixed diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/api/Azure.ResourceManager.HDInsight.Containers.netstandard2.0.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/api/Azure.ResourceManager.HDInsight.Containers.netstandard2.0.cs index 5f1e584eb1ae..8779ab7649aa 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/api/Azure.ResourceManager.HDInsight.Containers.netstandard2.0.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/api/Azure.ResourceManager.HDInsight.Containers.netstandard2.0.cs @@ -21,6 +21,7 @@ public partial class HDInsightClusterData : Azure.ResourceManager.Models.Tracked { public HDInsightClusterData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.HDInsight.Containers.Models.HDInsightClusterProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.HDInsightClusterData 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.HDInsight.Containers.HDInsightClusterData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -48,6 +49,7 @@ public partial class HDInsightClusterPoolData : Azure.ResourceManager.Models.Tra { public HDInsightClusterPoolData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.HDInsight.Containers.Models.HDInsightClusterPoolProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.HDInsightClusterPoolData 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.HDInsight.Containers.HDInsightClusterPoolData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -190,6 +192,7 @@ internal AksClusterProfile() { } public Azure.ResourceManager.HDInsight.Containers.Models.HDInsightIdentityProfile AksClusterAgentPoolIdentityProfile { get { throw null; } } public Azure.Core.ResourceIdentifier AksClusterResourceId { get { throw null; } } public string AksVersion { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.AksClusterProfile 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.HDInsight.Containers.Models.AksClusterProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -242,6 +245,7 @@ public partial class AuthorizationProfile : System.ClientModel.Primitives.IJsonM public AuthorizationProfile() { } public System.Collections.Generic.IList GroupIds { get { throw null; } } public System.Collections.Generic.IList UserIds { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.AuthorizationProfile 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.HDInsight.Containers.Models.AuthorizationProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -255,6 +259,7 @@ public AutoscaleSchedule(string startOn, string endOn, int count, System.Collect public System.Collections.Generic.IList Days { get { throw null; } } public string EndOn { get { throw null; } set { } } public string StartOn { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.AutoscaleSchedule 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.HDInsight.Containers.Models.AutoscaleSchedule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -289,6 +294,7 @@ public partial class ClusterAccessProfile : System.ClientModel.Primitives.IJsonM public ClusterAccessProfile(bool enableInternalIngress) { } public bool EnableInternalIngress { get { throw null; } set { } } public Azure.Core.ResourceIdentifier PrivateLinkServiceId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterAccessProfile 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.HDInsight.Containers.Models.ClusterAccessProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -300,6 +306,7 @@ public partial class ClusterAksPatchUpgradeHistoryProperties : Azure.ResourceMan public ClusterAksPatchUpgradeHistoryProperties(string utcTime, Azure.ResourceManager.HDInsight.Containers.Models.ClusterUpgradeHistoryUpgradeResultType upgradeResult) : base (default(string), default(Azure.ResourceManager.HDInsight.Containers.Models.ClusterUpgradeHistoryUpgradeResultType)) { } public string NewVersion { get { throw null; } set { } } public string OriginalVersion { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterAksPatchUpgradeHistoryProperties 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.HDInsight.Containers.Models.ClusterAksPatchUpgradeHistoryProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -309,6 +316,7 @@ public partial class ClusterAksPatchUpgradeHistoryProperties : Azure.ResourceMan public partial class ClusterAKSPatchVersionUpgradeProperties : Azure.ResourceManager.HDInsight.Containers.Models.ClusterUpgradeProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ClusterAKSPatchVersionUpgradeProperties() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterAKSPatchVersionUpgradeProperties 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.HDInsight.Containers.Models.ClusterAKSPatchVersionUpgradeProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -323,6 +331,7 @@ public ClusterAutoscaleProfile(bool isEnabled) { } public bool IsEnabled { get { throw null; } set { } } public Azure.ResourceManager.HDInsight.Containers.Models.LoadBasedConfig LoadBasedConfig { get { throw null; } set { } } public Azure.ResourceManager.HDInsight.Containers.Models.ScheduleBasedConfig ScheduleBasedConfig { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterAutoscaleProfile 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.HDInsight.Containers.Models.ClusterAutoscaleProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -361,6 +370,7 @@ public ClusterAvailableInPlaceUpgradeProperties() { } public string TargetBuildNumber { get { throw null; } set { } } public string TargetClusterVersion { get { throw null; } set { } } public string TargetOssVersion { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterAvailableInPlaceUpgradeProperties 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.HDInsight.Containers.Models.ClusterAvailableInPlaceUpgradeProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -371,6 +381,7 @@ public partial class ClusterAvailableUpgrade : Azure.ResourceManager.Models.Reso { public ClusterAvailableUpgrade() { } public Azure.ResourceManager.HDInsight.Containers.Models.ClusterAvailableUpgradeProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterAvailableUpgrade 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.HDInsight.Containers.Models.ClusterAvailableUpgrade System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -383,6 +394,7 @@ public ClusterAvailableUpgradeAksPatchUpgradeProperties() { } public string CurrentVersion { get { throw null; } set { } } public Azure.ResourceManager.HDInsight.Containers.Models.CurrentClusterAksVersionStatus? CurrentVersionStatus { get { throw null; } set { } } public string LatestVersion { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterAvailableUpgradeAksPatchUpgradeProperties 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.HDInsight.Containers.Models.ClusterAvailableUpgradeAksPatchUpgradeProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -392,6 +404,7 @@ public ClusterAvailableUpgradeAksPatchUpgradeProperties() { } public partial class ClusterAvailableUpgradeHotfixUpgradeProperties : Azure.ResourceManager.HDInsight.Containers.Models.ClusterAvailableInPlaceUpgradeProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ClusterAvailableUpgradeHotfixUpgradeProperties() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterAvailableUpgradeHotfixUpgradeProperties 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.HDInsight.Containers.Models.ClusterAvailableUpgradeHotfixUpgradeProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -401,6 +414,7 @@ public ClusterAvailableUpgradeHotfixUpgradeProperties() { } public partial class ClusterAvailableUpgradePatchVersionUpgradeProperties : Azure.ResourceManager.HDInsight.Containers.Models.ClusterAvailableInPlaceUpgradeProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ClusterAvailableUpgradePatchVersionUpgradeProperties() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterAvailableUpgradePatchVersionUpgradeProperties 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.HDInsight.Containers.Models.ClusterAvailableUpgradePatchVersionUpgradeProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -410,6 +424,7 @@ public ClusterAvailableUpgradePatchVersionUpgradeProperties() { } public abstract partial class ClusterAvailableUpgradeProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { protected ClusterAvailableUpgradeProperties() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterAvailableUpgradeProperties 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.HDInsight.Containers.Models.ClusterAvailableUpgradeProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -421,6 +436,7 @@ public partial class ClusterComponentItem : System.ClientModel.Primitives.IJsonM internal ClusterComponentItem() { } public string Name { get { throw null; } } public string Version { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterComponentItem 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.HDInsight.Containers.Models.ClusterComponentItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -433,6 +449,7 @@ public ClusterComputeNodeProfile(string nodeProfileType, string vmSize, int coun public int Count { get { throw null; } set { } } public string NodeProfileType { get { throw null; } set { } } public string VmSize { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterComputeNodeProfile 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.HDInsight.Containers.Models.ClusterComputeNodeProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -444,6 +461,7 @@ public partial class ClusterComputeProfile : System.ClientModel.Primitives.IJson public ClusterComputeProfile(System.Collections.Generic.IEnumerable nodes) { } public System.Collections.Generic.IList AvailabilityZones { get { throw null; } } public System.Collections.Generic.IList Nodes { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterComputeProfile 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.HDInsight.Containers.Models.ClusterComputeProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -458,6 +476,7 @@ public ClusterConfigFile(string fileName) { } public string FileName { get { throw null; } set { } } public string Path { get { throw null; } set { } } public System.Collections.Generic.IDictionary Values { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterConfigFile 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.HDInsight.Containers.Models.ClusterConfigFile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -469,6 +488,7 @@ public partial class ClusterConnectivityProfile : System.ClientModel.Primitives. internal ClusterConnectivityProfile() { } public System.Collections.Generic.IReadOnlyList Ssh { get { throw null; } } public Azure.ResourceManager.HDInsight.Containers.Models.WebConnectivityEndpoint Web { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterConnectivityProfile 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.HDInsight.Containers.Models.ClusterConnectivityProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -478,6 +498,7 @@ internal ClusterConnectivityProfile() { } public partial class ClusterHotfixUpgradeHistoryProperties : Azure.ResourceManager.HDInsight.Containers.Models.ClusterInPlaceUpgradeHistoryProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ClusterHotfixUpgradeHistoryProperties(string utcTime, Azure.ResourceManager.HDInsight.Containers.Models.ClusterUpgradeHistoryUpgradeResultType upgradeResult) : base (default(string), default(Azure.ResourceManager.HDInsight.Containers.Models.ClusterUpgradeHistoryUpgradeResultType)) { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterHotfixUpgradeHistoryProperties 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.HDInsight.Containers.Models.ClusterHotfixUpgradeHistoryProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -487,6 +508,7 @@ public partial class ClusterHotfixUpgradeHistoryProperties : Azure.ResourceManag public partial class ClusterHotfixUpgradeProperties : Azure.ResourceManager.HDInsight.Containers.Models.ClusterInPlaceUpgradeProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ClusterHotfixUpgradeProperties() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterHotfixUpgradeProperties 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.HDInsight.Containers.Models.ClusterHotfixUpgradeProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -496,6 +518,7 @@ public ClusterHotfixUpgradeProperties() { } public partial class ClusterHotfixUpgradeRollbackHistoryProperties : Azure.ResourceManager.HDInsight.Containers.Models.ClusterInPlaceUpgradeHistoryProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ClusterHotfixUpgradeRollbackHistoryProperties(string utcTime, Azure.ResourceManager.HDInsight.Containers.Models.ClusterUpgradeHistoryUpgradeResultType upgradeResult) : base (default(string), default(Azure.ResourceManager.HDInsight.Containers.Models.ClusterUpgradeHistoryUpgradeResultType)) { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterHotfixUpgradeRollbackHistoryProperties 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.HDInsight.Containers.Models.ClusterHotfixUpgradeRollbackHistoryProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -513,6 +536,7 @@ public partial class ClusterInPlaceUpgradeHistoryProperties : Azure.ResourceMana public string TargetBuildNumber { get { throw null; } set { } } public string TargetClusterVersion { get { throw null; } set { } } public string TargetOssVersion { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterInPlaceUpgradeHistoryProperties 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.HDInsight.Containers.Models.ClusterInPlaceUpgradeHistoryProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -526,6 +550,7 @@ public ClusterInPlaceUpgradeProperties() { } public string TargetBuildNumber { get { throw null; } set { } } public string TargetClusterVersion { get { throw null; } set { } } public string TargetOssVersion { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterInPlaceUpgradeProperties 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.HDInsight.Containers.Models.ClusterInPlaceUpgradeProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -537,6 +562,7 @@ public partial class ClusterInstanceViewProperties : System.ClientModel.Primitiv internal ClusterInstanceViewProperties() { } public System.Collections.Generic.IReadOnlyList ServiceStatuses { get { throw null; } } public Azure.ResourceManager.HDInsight.Containers.Models.ClusterInstanceViewStatus Status { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterInstanceViewProperties 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.HDInsight.Containers.Models.ClusterInstanceViewProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -548,6 +574,7 @@ public partial class ClusterInstanceViewResult : System.ClientModel.Primitives.I internal ClusterInstanceViewResult() { } public string Name { get { throw null; } } public Azure.ResourceManager.HDInsight.Containers.Models.ClusterInstanceViewProperties Properties { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterInstanceViewResult 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.HDInsight.Containers.Models.ClusterInstanceViewResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -560,6 +587,7 @@ internal ClusterInstanceViewStatus() { } public string Message { get { throw null; } } public string Ready { get { throw null; } } public string Reason { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterInstanceViewStatus 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.HDInsight.Containers.Models.ClusterInstanceViewStatus System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -570,6 +598,7 @@ public partial class ClusterJob : Azure.ResourceManager.Models.ResourceData, Sys { public ClusterJob(Azure.ResourceManager.HDInsight.Containers.Models.ClusterJobProperties properties) { } public Azure.ResourceManager.HDInsight.Containers.Models.ClusterJobProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterJob 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.HDInsight.Containers.Models.ClusterJob System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -579,6 +608,7 @@ public ClusterJob(Azure.ResourceManager.HDInsight.Containers.Models.ClusterJobPr public abstract partial class ClusterJobProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { protected ClusterJobProperties() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterJobProperties 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.HDInsight.Containers.Models.ClusterJobProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -589,6 +619,7 @@ public partial class ClusterLibrary : Azure.ResourceManager.Models.ResourceData, { public ClusterLibrary(Azure.ResourceManager.HDInsight.Containers.Models.ClusterLibraryProperties properties) { } public Azure.ResourceManager.HDInsight.Containers.Models.ClusterLibraryProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterLibrary 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.HDInsight.Containers.Models.ClusterLibrary System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -617,6 +648,7 @@ public partial class ClusterLibraryManagementOperationContent : Azure.ResourceMa { public ClusterLibraryManagementOperationContent(Azure.ResourceManager.HDInsight.Containers.Models.ClusterLibraryManagementOperationProperties properties) { } public Azure.ResourceManager.HDInsight.Containers.Models.ClusterLibraryManagementOperationProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterLibraryManagementOperationContent 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.HDInsight.Containers.Models.ClusterLibraryManagementOperationContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -628,6 +660,7 @@ public partial class ClusterLibraryManagementOperationProperties : System.Client public ClusterLibraryManagementOperationProperties(Azure.ResourceManager.HDInsight.Containers.Models.LibraryManagementAction action, System.Collections.Generic.IEnumerable libraries) { } public Azure.ResourceManager.HDInsight.Containers.Models.LibraryManagementAction Action { get { throw null; } set { } } public System.Collections.Generic.IList Libraries { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterLibraryManagementOperationProperties 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.HDInsight.Containers.Models.ClusterLibraryManagementOperationProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -641,6 +674,7 @@ protected ClusterLibraryProperties() { } public string Remarks { get { throw null; } set { } } public Azure.ResourceManager.HDInsight.Containers.Models.Status? Status { get { throw null; } } public System.DateTimeOffset? Timestamp { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterLibraryProperties 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.HDInsight.Containers.Models.ClusterLibraryProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -652,6 +686,7 @@ public partial class ClusterLogAnalyticsApplicationLogs : System.ClientModel.Pri public ClusterLogAnalyticsApplicationLogs() { } public bool? IsStdErrorEnabled { get { throw null; } set { } } public bool? IsStdOutEnabled { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterLogAnalyticsApplicationLogs 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.HDInsight.Containers.Models.ClusterLogAnalyticsApplicationLogs System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -664,6 +699,7 @@ public ClusterLogAnalyticsProfile(bool isEnabled) { } public Azure.ResourceManager.HDInsight.Containers.Models.ClusterLogAnalyticsApplicationLogs ApplicationLogs { get { throw null; } set { } } public bool IsEnabled { get { throw null; } set { } } public bool? IsMetricsEnabled { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterLogAnalyticsProfile 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.HDInsight.Containers.Models.ClusterLogAnalyticsProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -676,6 +712,7 @@ public ClusterMavenLibraryProperties(string groupId, string name) { } public string GroupId { get { throw null; } set { } } public string Name { get { throw null; } set { } } public string Version { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterMavenLibraryProperties 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.HDInsight.Containers.Models.ClusterMavenLibraryProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -685,6 +722,7 @@ public ClusterMavenLibraryProperties(string groupId, string name) { } public partial class ClusterPatchVersionUpgradeHistoryProperties : Azure.ResourceManager.HDInsight.Containers.Models.ClusterInPlaceUpgradeHistoryProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ClusterPatchVersionUpgradeHistoryProperties(string utcTime, Azure.ResourceManager.HDInsight.Containers.Models.ClusterUpgradeHistoryUpgradeResultType upgradeResult) : base (default(string), default(Azure.ResourceManager.HDInsight.Containers.Models.ClusterUpgradeHistoryUpgradeResultType)) { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterPatchVersionUpgradeHistoryProperties 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.HDInsight.Containers.Models.ClusterPatchVersionUpgradeHistoryProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -694,6 +732,7 @@ public partial class ClusterPatchVersionUpgradeHistoryProperties : Azure.Resourc public partial class ClusterPatchVersionUpgradeProperties : Azure.ResourceManager.HDInsight.Containers.Models.ClusterInPlaceUpgradeProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ClusterPatchVersionUpgradeProperties() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterPatchVersionUpgradeProperties 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.HDInsight.Containers.Models.ClusterPatchVersionUpgradeProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -703,6 +742,7 @@ public ClusterPatchVersionUpgradeProperties() { } public partial class ClusterPatchVersionUpgradeRollbackHistoryProperties : Azure.ResourceManager.HDInsight.Containers.Models.ClusterInPlaceUpgradeHistoryProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ClusterPatchVersionUpgradeRollbackHistoryProperties(string utcTime, Azure.ResourceManager.HDInsight.Containers.Models.ClusterUpgradeHistoryUpgradeResultType upgradeResult) : base (default(string), default(Azure.ResourceManager.HDInsight.Containers.Models.ClusterUpgradeHistoryUpgradeResultType)) { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterPatchVersionUpgradeRollbackHistoryProperties 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.HDInsight.Containers.Models.ClusterPatchVersionUpgradeRollbackHistoryProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -716,6 +756,7 @@ public partial class ClusterPoolAksPatchUpgradeHistoryProperties : Azure.Resourc public string OriginalVersion { get { throw null; } set { } } public bool? UpgradeAllClusterNodes { get { throw null; } set { } } public bool? UpgradeClusterPool { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterPoolAksPatchUpgradeHistoryProperties 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.HDInsight.Containers.Models.ClusterPoolAksPatchUpgradeHistoryProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -728,6 +769,7 @@ public ClusterPoolAKSPatchVersionUpgradeProperties() { } public string TargetAksVersion { get { throw null; } set { } } public bool? UpgradeAllClusterNodes { get { throw null; } set { } } public bool? UpgradeClusterPool { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterPoolAKSPatchVersionUpgradeProperties 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.HDInsight.Containers.Models.ClusterPoolAKSPatchVersionUpgradeProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -738,6 +780,7 @@ public partial class ClusterPoolAvailableUpgrade : Azure.ResourceManager.Models. { public ClusterPoolAvailableUpgrade() { } public Azure.ResourceManager.HDInsight.Containers.Models.ClusterPoolAvailableUpgradeProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterPoolAvailableUpgrade 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.HDInsight.Containers.Models.ClusterPoolAvailableUpgrade System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -750,6 +793,7 @@ public ClusterPoolAvailableUpgradeAksPatchUpgradeProperties() { } public string CurrentVersion { get { throw null; } set { } } public Azure.ResourceManager.HDInsight.Containers.Models.CurrentClusterPoolAksVersionStatus? CurrentVersionStatus { get { throw null; } set { } } public string LatestVersion { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterPoolAvailableUpgradeAksPatchUpgradeProperties 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.HDInsight.Containers.Models.ClusterPoolAvailableUpgradeAksPatchUpgradeProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -760,6 +804,7 @@ public partial class ClusterPoolAvailableUpgradeNodeOSUpgradeProperties : Azure. { public ClusterPoolAvailableUpgradeNodeOSUpgradeProperties() { } public string LatestVersion { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterPoolAvailableUpgradeNodeOSUpgradeProperties 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.HDInsight.Containers.Models.ClusterPoolAvailableUpgradeNodeOSUpgradeProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -769,6 +814,7 @@ public ClusterPoolAvailableUpgradeNodeOSUpgradeProperties() { } public abstract partial class ClusterPoolAvailableUpgradeProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { protected ClusterPoolAvailableUpgradeProperties() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterPoolAvailableUpgradeProperties 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.HDInsight.Containers.Models.ClusterPoolAvailableUpgradeProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -781,6 +827,7 @@ public ClusterPoolComputeProfile(string vmSize) { } public System.Collections.Generic.IList AvailabilityZones { get { throw null; } } public int? Count { get { throw null; } } public string VmSize { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterPoolComputeProfile 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.HDInsight.Containers.Models.ClusterPoolComputeProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -792,6 +839,7 @@ public partial class ClusterPoolLogAnalyticsProfile : System.ClientModel.Primiti public ClusterPoolLogAnalyticsProfile(bool isEnabled) { } public bool IsEnabled { get { throw null; } set { } } public Azure.Core.ResourceIdentifier WorkspaceId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterPoolLogAnalyticsProfile 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.HDInsight.Containers.Models.ClusterPoolLogAnalyticsProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -805,6 +853,7 @@ public ClusterPoolNetworkProfile(Azure.Core.ResourceIdentifier subnetId) { } public bool? IsPrivateApiServerEnabled { get { throw null; } set { } } public Azure.ResourceManager.HDInsight.Containers.Models.OutboundType? OutboundType { get { throw null; } set { } } public Azure.Core.ResourceIdentifier SubnetId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterPoolNetworkProfile 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.HDInsight.Containers.Models.ClusterPoolNetworkProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -814,6 +863,7 @@ public ClusterPoolNetworkProfile(Azure.Core.ResourceIdentifier subnetId) { } public partial class ClusterPoolNodeOSImageUpdateProperties : Azure.ResourceManager.HDInsight.Containers.Models.ClusterPoolUpgradeProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ClusterPoolNodeOSImageUpdateProperties() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterPoolNodeOSImageUpdateProperties 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.HDInsight.Containers.Models.ClusterPoolNodeOSImageUpdateProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -824,6 +874,7 @@ public partial class ClusterPoolNodeOSUpgradeHistoryProperties : Azure.ResourceM { public ClusterPoolNodeOSUpgradeHistoryProperties(string utcTime, Azure.ResourceManager.HDInsight.Containers.Models.ClusterPoolUpgradeHistoryUpgradeResultType upgradeResult) : base (default(string), default(Azure.ResourceManager.HDInsight.Containers.Models.ClusterPoolUpgradeHistoryUpgradeResultType)) { } public string NewNodeOS { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterPoolNodeOSUpgradeHistoryProperties 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.HDInsight.Containers.Models.ClusterPoolNodeOSUpgradeHistoryProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -834,6 +885,7 @@ public partial class ClusterPoolUpgrade : System.ClientModel.Primitives.IJsonMod { public ClusterPoolUpgrade(Azure.ResourceManager.HDInsight.Containers.Models.ClusterPoolUpgradeProperties properties) { } public Azure.ResourceManager.HDInsight.Containers.Models.ClusterPoolUpgradeProperties Properties { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterPoolUpgrade 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.HDInsight.Containers.Models.ClusterPoolUpgrade System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -844,6 +896,7 @@ public partial class ClusterPoolUpgradeHistory : Azure.ResourceManager.Models.Re { public ClusterPoolUpgradeHistory(Azure.ResourceManager.HDInsight.Containers.Models.ClusterPoolUpgradeHistoryProperties properties) { } public Azure.ResourceManager.HDInsight.Containers.Models.ClusterPoolUpgradeHistoryProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterPoolUpgradeHistory 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.HDInsight.Containers.Models.ClusterPoolUpgradeHistory System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -855,6 +908,7 @@ public abstract partial class ClusterPoolUpgradeHistoryProperties : System.Clien protected ClusterPoolUpgradeHistoryProperties(string utcTime, Azure.ResourceManager.HDInsight.Containers.Models.ClusterPoolUpgradeHistoryUpgradeResultType upgradeResult) { } public Azure.ResourceManager.HDInsight.Containers.Models.ClusterPoolUpgradeHistoryUpgradeResultType UpgradeResult { get { throw null; } set { } } public string UtcTime { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterPoolUpgradeHistoryProperties 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.HDInsight.Containers.Models.ClusterPoolUpgradeHistoryProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -882,6 +936,7 @@ protected ClusterPoolUpgradeHistoryProperties(string utcTime, Azure.ResourceMana public abstract partial class ClusterPoolUpgradeProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { protected ClusterPoolUpgradeProperties() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterPoolUpgradeProperties 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.HDInsight.Containers.Models.ClusterPoolUpgradeProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -892,6 +947,7 @@ public partial class ClusterPoolVersion : Azure.ResourceManager.Models.ResourceD { public ClusterPoolVersion() { } public Azure.ResourceManager.HDInsight.Containers.Models.ClusterPoolVersionProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterPoolVersion 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.HDInsight.Containers.Models.ClusterPoolVersion System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -904,6 +960,7 @@ public ClusterPoolVersionProperties() { } public string AksVersion { get { throw null; } set { } } public string ClusterPoolVersion { get { throw null; } set { } } public bool? IsPreview { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterPoolVersionProperties 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.HDInsight.Containers.Models.ClusterPoolVersionProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -936,6 +993,7 @@ public ClusterProfile(string clusterVersion, string ossVersion, Azure.ResourceMa public Azure.ResourceManager.HDInsight.Containers.Models.ClusterSshProfile SshProfile { get { throw null; } set { } } public System.Collections.Generic.IDictionary StubProfile { get { throw null; } } public Azure.ResourceManager.HDInsight.Containers.Models.TrinoProfile TrinoProfile { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterProfile 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.HDInsight.Containers.Models.ClusterProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -947,6 +1005,7 @@ public partial class ClusterPyPILibraryProperties : Azure.ResourceManager.HDInsi public ClusterPyPILibraryProperties(string name) { } public string Name { get { throw null; } set { } } public string Version { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterPyPILibraryProperties 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.HDInsight.Containers.Models.ClusterPyPILibraryProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -957,6 +1016,7 @@ public partial class ClusterResizeContent : Azure.ResourceManager.Models.Tracked { public ClusterResizeContent(Azure.Core.AzureLocation location) { } public int? ClusterResizeTargetWorkerNodeCount { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterResizeContent 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.HDInsight.Containers.Models.ClusterResizeContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -970,6 +1030,7 @@ public ClusterSecretReference(string referenceName, Azure.ResourceManager.HDInsi public Azure.ResourceManager.HDInsight.Containers.Models.KeyVaultObjectType KeyVaultObjectType { get { throw null; } set { } } public string ReferenceName { get { throw null; } set { } } public string Version { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterSecretReference 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.HDInsight.Containers.Models.ClusterSecretReference System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -981,6 +1042,7 @@ public partial class ClusterSecretsProfile : System.ClientModel.Primitives.IJson public ClusterSecretsProfile(Azure.Core.ResourceIdentifier keyVaultResourceId) { } public Azure.Core.ResourceIdentifier KeyVaultResourceId { get { throw null; } set { } } public System.Collections.Generic.IList Secrets { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterSecretsProfile 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.HDInsight.Containers.Models.ClusterSecretsProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -992,6 +1054,7 @@ public partial class ClusterServiceConfig : System.ClientModel.Primitives.IJsonM public ClusterServiceConfig(string component, System.Collections.Generic.IEnumerable files) { } public string Component { get { throw null; } set { } } public System.Collections.Generic.IList Files { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterServiceConfig 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.HDInsight.Containers.Models.ClusterServiceConfig System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1009,6 +1072,7 @@ internal ClusterServiceConfigProperties() { } public string Path { get { throw null; } } public string ServiceConfigListResultPropertiesType { get { throw null; } } public string ServiceName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterServiceConfigProperties 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.HDInsight.Containers.Models.ClusterServiceConfigProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1019,6 +1083,7 @@ public partial class ClusterServiceConfigResult : System.ClientModel.Primitives. { internal ClusterServiceConfigResult() { } public Azure.ResourceManager.HDInsight.Containers.Models.ClusterServiceConfigProperties Properties { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterServiceConfigResult 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.HDInsight.Containers.Models.ClusterServiceConfigResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1030,6 +1095,7 @@ public partial class ClusterServiceConfigsProfile : System.ClientModel.Primitive public ClusterServiceConfigsProfile(string serviceName, System.Collections.Generic.IEnumerable configs) { } public System.Collections.Generic.IList Configs { get { throw null; } } public string ServiceName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterServiceConfigsProfile 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.HDInsight.Containers.Models.ClusterServiceConfigsProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1041,6 +1107,7 @@ public partial class ClusterServiceConfigValueEntity : System.ClientModel.Primit internal ClusterServiceConfigValueEntity() { } public string Description { get { throw null; } } public string Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterServiceConfigValueEntity 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.HDInsight.Containers.Models.ClusterServiceConfigValueEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1053,6 +1120,7 @@ public ClusterSshProfile(int count) { } public int Count { get { throw null; } set { } } public string PodPrefix { get { throw null; } } public string VmSize { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterSshProfile 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.HDInsight.Containers.Models.ClusterSshProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1063,6 +1131,7 @@ public partial class ClusterUpgrade : 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.HDInsight.Containers.Models.ClusterUpgrade System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1073,6 +1142,7 @@ public partial class ClusterUpgradeHistory : Azure.ResourceManager.Models.Resour { public ClusterUpgradeHistory(Azure.ResourceManager.HDInsight.Containers.Models.ClusterUpgradeHistoryProperties properties) { } public Azure.ResourceManager.HDInsight.Containers.Models.ClusterUpgradeHistoryProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterUpgradeHistory 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.HDInsight.Containers.Models.ClusterUpgradeHistory System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1084,6 +1154,7 @@ public abstract partial class ClusterUpgradeHistoryProperties : System.ClientMod protected ClusterUpgradeHistoryProperties(string utcTime, Azure.ResourceManager.HDInsight.Containers.Models.ClusterUpgradeHistoryUpgradeResultType upgradeResult) { } public Azure.ResourceManager.HDInsight.Containers.Models.ClusterUpgradeHistoryUpgradeResultType UpgradeResult { get { throw null; } set { } } public string UtcTime { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterUpgradeHistoryProperties 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.HDInsight.Containers.Models.ClusterUpgradeHistoryProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1131,6 +1202,7 @@ protected ClusterUpgradeHistoryProperties(string utcTime, Azure.ResourceManager. public abstract partial class ClusterUpgradeProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { protected ClusterUpgradeProperties() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterUpgradeProperties 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.HDInsight.Containers.Models.ClusterUpgradeProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1141,6 +1213,7 @@ public partial class ClusterUpgradeRollback : System.ClientModel.Primitives.IJso { public ClusterUpgradeRollback(Azure.ResourceManager.HDInsight.Containers.Models.ClusterUpgradeRollbackProperties properties) { } public string ClusterUpgradeHistory { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterUpgradeRollback 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.HDInsight.Containers.Models.ClusterUpgradeRollback System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1151,6 +1224,7 @@ public partial class ClusterUpgradeRollbackProperties : System.ClientModel.Primi { public ClusterUpgradeRollbackProperties(string upgradeHistory) { } public string UpgradeHistory { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterUpgradeRollbackProperties 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.HDInsight.Containers.Models.ClusterUpgradeRollbackProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1186,6 +1260,7 @@ public ClusterVersionProperties() { } public System.Collections.Generic.IReadOnlyList Components { get { throw null; } } public bool? IsPreview { get { throw null; } set { } } public string OssVersion { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterVersionProperties 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.HDInsight.Containers.Models.ClusterVersionProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1197,6 +1272,7 @@ public partial class ComputeResourceRequirement : System.ClientModel.Primitives. public ComputeResourceRequirement(float cpu, long memory) { } public float Cpu { get { throw null; } set { } } public long Memory { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ComputeResourceRequirement 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.HDInsight.Containers.Models.ComputeResourceRequirement System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1302,6 +1378,7 @@ public partial class DiskStorageProfile : System.ClientModel.Primitives.IJsonMod public DiskStorageProfile(int dataDiskSize, Azure.ResourceManager.HDInsight.Containers.Models.DataDiskType dataDiskType) { } public int DataDiskSize { get { throw null; } set { } } public Azure.ResourceManager.HDInsight.Containers.Models.DataDiskType DataDiskType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.DiskStorageProfile 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.HDInsight.Containers.Models.DiskStorageProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1315,6 +1392,7 @@ public FlinkHiveCatalogOption(string metastoreDBConnectionUriString) { } public string MetastoreDBConnectionPasswordSecret { get { throw null; } set { } } public string MetastoreDBConnectionUriString { get { throw null; } set { } } public string MetastoreDBConnectionUserName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.FlinkHiveCatalogOption 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.HDInsight.Containers.Models.FlinkHiveCatalogOption System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1357,6 +1435,7 @@ public FlinkJobProfile(string jobJarDirectory, string jarName, Azure.ResourceMan public string JobJarDirectory { get { throw null; } set { } } public string SavePointName { get { throw null; } set { } } public Azure.ResourceManager.HDInsight.Containers.Models.UpgradeMode UpgradeMode { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.FlinkJobProfile 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.HDInsight.Containers.Models.FlinkJobProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1380,6 +1459,7 @@ public FlinkJobProperties() { } public string RunId { get { throw null; } set { } } public string SavePointName { get { throw null; } set { } } public string Status { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.FlinkJobProperties 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.HDInsight.Containers.Models.FlinkJobProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1397,6 +1477,7 @@ public FlinkProfile(Azure.ResourceManager.HDInsight.Containers.Models.FlinkStora public int? NumReplicas { get { throw null; } set { } } public Azure.ResourceManager.HDInsight.Containers.Models.FlinkStorageProfile Storage { get { throw null; } set { } } public Azure.ResourceManager.HDInsight.Containers.Models.ComputeResourceRequirement TaskManager { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.FlinkProfile 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.HDInsight.Containers.Models.FlinkProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1408,6 +1489,7 @@ public partial class FlinkStorageProfile : System.ClientModel.Primitives.IJsonMo public FlinkStorageProfile(string storageUriString) { } public string Storagekey { get { throw null; } set { } } public string StorageUriString { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.FlinkStorageProfile 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.HDInsight.Containers.Models.FlinkStorageProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1419,6 +1501,7 @@ public partial class HDInsightClusterPatch : System.ClientModel.Primitives.IJson public HDInsightClusterPatch() { } public Azure.ResourceManager.HDInsight.Containers.Models.UpdatableClusterProfile ClusterProfile { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.HDInsightClusterPatch 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.HDInsight.Containers.Models.HDInsightClusterPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1429,6 +1512,7 @@ public partial class HDInsightClusterPoolPatch : System.ClientModel.Primitives.I { public HDInsightClusterPoolPatch() { } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.HDInsightClusterPoolPatch 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.HDInsight.Containers.Models.HDInsightClusterPoolPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1448,6 +1532,7 @@ public HDInsightClusterPoolProperties(Azure.ResourceManager.HDInsight.Containers public Azure.ResourceManager.HDInsight.Containers.Models.ClusterPoolNetworkProfile NetworkProfile { get { throw null; } set { } } public Azure.ResourceManager.HDInsight.Containers.Models.HDInsightProvisioningStatus? ProvisioningState { get { throw null; } } public string Status { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.HDInsightClusterPoolProperties 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.HDInsight.Containers.Models.HDInsightClusterPoolProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1463,6 +1548,7 @@ public HDInsightClusterProperties(string clusterType, Azure.ResourceManager.HDIn public string DeploymentId { get { throw null; } } public Azure.ResourceManager.HDInsight.Containers.Models.HDInsightProvisioningStatus? ProvisioningState { get { throw null; } } public string Status { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.HDInsightClusterProperties 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.HDInsight.Containers.Models.HDInsightClusterProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1473,6 +1559,7 @@ public partial class HDInsightClusterVersion : Azure.ResourceManager.Models.Reso { public HDInsightClusterVersion() { } public Azure.ResourceManager.HDInsight.Containers.Models.ClusterVersionProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.HDInsightClusterVersion 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.HDInsight.Containers.Models.HDInsightClusterVersion System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1504,6 +1591,7 @@ public partial class HDInsightComparisonRule : System.ClientModel.Primitives.IJs public HDInsightComparisonRule(Azure.ResourceManager.HDInsight.Containers.Models.HDInsightComparisonOperator @operator, float threshold) { } public Azure.ResourceManager.HDInsight.Containers.Models.HDInsightComparisonOperator Operator { get { throw null; } set { } } public float Threshold { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.HDInsightComparisonRule 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.HDInsight.Containers.Models.HDInsightComparisonRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1534,6 +1622,7 @@ public HDInsightIdentityProfile(Azure.Core.ResourceIdentifier msiResourceId, str public string MsiClientId { get { throw null; } set { } } public string MsiObjectId { get { throw null; } set { } } public Azure.Core.ResourceIdentifier MsiResourceId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.HDInsightIdentityProfile 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.HDInsight.Containers.Models.HDInsightIdentityProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1547,6 +1636,7 @@ public HDInsightManagedIdentitySpec(Azure.ResourceManager.HDInsight.Containers.M public Azure.ResourceManager.HDInsight.Containers.Models.HDInsightManagedIdentityType IdentityType { get { throw null; } set { } } public string ObjectId { get { throw null; } set { } } public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.HDInsightManagedIdentitySpec 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.HDInsight.Containers.Models.HDInsightManagedIdentitySpec System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1577,6 +1667,7 @@ public partial class HDInsightNameAvailabilityContent : System.ClientModel.Primi public HDInsightNameAvailabilityContent() { } public string Name { get { throw null; } set { } } public string ResourceType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.HDInsightNameAvailabilityContent 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.HDInsight.Containers.Models.HDInsightNameAvailabilityContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1589,6 +1680,7 @@ internal HDInsightNameAvailabilityResult() { } public bool? IsNameAvailable { get { throw null; } } public string Message { get { throw null; } } public string Reason { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.HDInsightNameAvailabilityResult 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.HDInsight.Containers.Models.HDInsightNameAvailabilityResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1621,6 +1713,7 @@ internal HDInsightServiceStatus() { } public string Kind { get { throw null; } } public string Message { get { throw null; } } public string Ready { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.HDInsightServiceStatus 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.HDInsight.Containers.Models.HDInsightServiceStatus System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1636,6 +1729,7 @@ public HiveCatalogOption(string catalogName, string metastoreDBConnectionUriStri public string MetastoreDBConnectionUriString { get { throw null; } set { } } public string MetastoreDBConnectionUserName { get { throw null; } set { } } public string MetastoreWarehouseDir { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.HiveCatalogOption 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.HDInsight.Containers.Models.HiveCatalogOption System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1647,6 +1741,7 @@ public partial class KafkaConnectivityEndpoints : System.ClientModel.Primitives. internal KafkaConnectivityEndpoints() { } public string BootstrapServerEndpoint { get { throw null; } } public System.Collections.Generic.IReadOnlyList BrokerEndpoints { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.KafkaConnectivityEndpoints 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.HDInsight.Containers.Models.KafkaConnectivityEndpoints System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1661,6 +1756,7 @@ public KafkaProfile(Azure.ResourceManager.HDInsight.Containers.Models.DiskStorag public bool? IsKRaftEnabled { get { throw null; } set { } } public bool? IsPublicEndpointsEnabled { get { throw null; } set { } } public string RemoteStorageUriString { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.KafkaProfile 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.HDInsight.Containers.Models.KafkaProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1712,6 +1808,7 @@ public LoadBasedConfig(int minNodes, int maxNodes, System.Collections.Generic.IE public int MinNodes { get { throw null; } set { } } public int? PollIntervalInSeconds { get { throw null; } set { } } public System.Collections.Generic.IList ScalingRules { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.LoadBasedConfig 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.HDInsight.Containers.Models.LoadBasedConfig System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1759,6 +1856,7 @@ public partial class RangerAdminSpec : System.ClientModel.Primitives.IJsonModel< public RangerAdminSpec(System.Collections.Generic.IEnumerable admins, Azure.ResourceManager.HDInsight.Containers.Models.RangerAdminSpecDatabase database) { } public System.Collections.Generic.IList Admins { get { throw null; } } public Azure.ResourceManager.HDInsight.Containers.Models.RangerAdminSpecDatabase Database { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.RangerAdminSpec 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.HDInsight.Containers.Models.RangerAdminSpec System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1772,6 +1870,7 @@ public RangerAdminSpecDatabase(string host, string name) { } public string Name { get { throw null; } set { } } public string PasswordSecretRef { get { throw null; } set { } } public string Username { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.RangerAdminSpecDatabase 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.HDInsight.Containers.Models.RangerAdminSpecDatabase System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1784,6 +1883,7 @@ public RangerProfile(Azure.ResourceManager.HDInsight.Containers.Models.RangerAdm public Azure.ResourceManager.HDInsight.Containers.Models.RangerAdminSpec RangerAdmin { get { throw null; } set { } } public string RangerAuditStorageAccount { get { throw null; } set { } } public Azure.ResourceManager.HDInsight.Containers.Models.RangerUsersyncSpec RangerUsersync { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.RangerProfile 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.HDInsight.Containers.Models.RangerProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1816,6 +1916,7 @@ public RangerUsersyncSpec() { } public Azure.ResourceManager.HDInsight.Containers.Models.RangerUsersyncMode? Mode { get { throw null; } set { } } public string UserMappingLocation { get { throw null; } set { } } public System.Collections.Generic.IList Users { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.RangerUsersyncSpec 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.HDInsight.Containers.Models.RangerUsersyncSpec System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1847,6 +1948,7 @@ public ScalingRule(Azure.ResourceManager.HDInsight.Containers.Models.ScaleAction public Azure.ResourceManager.HDInsight.Containers.Models.HDInsightComparisonRule ComparisonRule { get { throw null; } set { } } public int EvaluationCount { get { throw null; } set { } } public string ScalingMetric { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ScalingRule 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.HDInsight.Containers.Models.ScalingRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1859,6 +1961,7 @@ public ScheduleBasedConfig(string timeZone, int defaultCount, System.Collections public int DefaultCount { get { throw null; } set { } } public System.Collections.Generic.IList Schedules { get { throw null; } } public string TimeZone { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ScheduleBasedConfig 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.HDInsight.Containers.Models.ScheduleBasedConfig System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1875,6 +1978,7 @@ public ScriptActionProfile(string scriptActionProfileType, string name, string u public bool? ShouldPersist { get { throw null; } set { } } public int? TimeoutInMinutes { get { throw null; } set { } } public string UriString { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ScriptActionProfile 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.HDInsight.Containers.Models.ScriptActionProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1891,6 +1995,7 @@ public SparkMetastoreSpec(string dbServerHost, string dbName) { } public string DBUserName { get { throw null; } set { } } public string KeyVaultId { get { throw null; } set { } } public string ThriftUriString { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.SparkMetastoreSpec 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.HDInsight.Containers.Models.SparkMetastoreSpec System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1903,6 +2008,7 @@ public SparkProfile() { } public string DefaultStorageUriString { get { throw null; } set { } } public Azure.ResourceManager.HDInsight.Containers.Models.SparkMetastoreSpec MetastoreSpec { get { throw null; } set { } } public System.Collections.Generic.IList Plugins { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.SparkProfile 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.HDInsight.Containers.Models.SparkProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1913,6 +2019,7 @@ public partial class SparkUserPlugin : System.ClientModel.Primitives.IJsonModel< { public SparkUserPlugin(string path) { } public string Path { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.SparkUserPlugin 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.HDInsight.Containers.Models.SparkUserPlugin System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1924,6 +2031,7 @@ public partial class SshConnectivityEndpoint : System.ClientModel.Primitives.IJs internal SshConnectivityEndpoint() { } public string Endpoint { get { throw null; } } public string PrivateSshEndpoint { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.SshConnectivityEndpoint 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.HDInsight.Containers.Models.SshConnectivityEndpoint System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1956,6 +2064,7 @@ public partial class TrinoCoordinator : System.ClientModel.Primitives.IJsonModel public TrinoCoordinator() { } public Azure.ResourceManager.HDInsight.Containers.Models.TrinoDebugConfig Debug { get { throw null; } set { } } public bool? IsHighAvailabilityEnabled { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.TrinoCoordinator 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.HDInsight.Containers.Models.TrinoCoordinator System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1968,6 +2077,7 @@ public TrinoDebugConfig() { } public bool? IsEnabled { get { throw null; } set { } } public bool? IsSuspendEnabled { get { throw null; } set { } } public int? Port { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.TrinoDebugConfig 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.HDInsight.Containers.Models.TrinoDebugConfig System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1982,6 +2092,7 @@ public TrinoProfile() { } public System.Collections.Generic.IList Plugins { get { throw null; } } public Azure.ResourceManager.HDInsight.Containers.Models.TrinoTelemetryConfig UserTelemetrySpecStorage { get { throw null; } set { } } public Azure.ResourceManager.HDInsight.Containers.Models.TrinoDebugConfig WorkerDebug { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.TrinoProfile 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.HDInsight.Containers.Models.TrinoProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1995,6 +2106,7 @@ public TrinoTelemetryConfig() { } public string HivecatalogSchema { get { throw null; } set { } } public int? PartitionRetentionInDays { get { throw null; } set { } } public string Path { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.TrinoTelemetryConfig 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.HDInsight.Containers.Models.TrinoTelemetryConfig System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2007,6 +2119,7 @@ public TrinoUserPlugin() { } public bool? IsEnabled { get { throw null; } set { } } public string Name { get { throw null; } set { } } public string Path { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.TrinoUserPlugin 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.HDInsight.Containers.Models.TrinoUserPlugin System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2027,6 +2140,7 @@ public UpdatableClusterProfile() { } public System.Collections.Generic.IList ServiceConfigsProfiles { get { throw null; } } public Azure.ResourceManager.HDInsight.Containers.Models.ClusterSshProfile SshProfile { get { throw null; } set { } } public Azure.ResourceManager.HDInsight.Containers.Models.TrinoProfile TrinoProfile { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.UpdatableClusterProfile 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.HDInsight.Containers.Models.UpdatableClusterProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2057,6 +2171,7 @@ public partial class WebConnectivityEndpoint : System.ClientModel.Primitives.IJs internal WebConnectivityEndpoint() { } public string Fqdn { get { throw null; } } public string PrivateFqdn { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.WebConnectivityEndpoint 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.HDInsight.Containers.Models.WebConnectivityEndpoint System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/assets.json b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/assets.json index 1eef31ec5107..cbd64dfbbf6f 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/assets.json +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers", - "Tag": "net/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers_4dec5d8b91" + "Tag": "net/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers_d09765e4aa" } diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/HDInsightClusterData.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/HDInsightClusterData.Serialization.cs index 8cf9f7306b97..c9cd5b17fdef 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/HDInsightClusterData.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/HDInsightClusterData.Serialization.cs @@ -22,6 +22,15 @@ public partial class HDInsightClusterData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -29,61 +38,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(HDInsightClusterData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); writer.WriteObjectValue(Properties, options); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } HDInsightClusterData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/HDInsightClusterPoolData.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/HDInsightClusterPoolData.Serialization.cs index 3566947cb723..2335f028483a 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/HDInsightClusterPoolData.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/HDInsightClusterPoolData.Serialization.cs @@ -22,6 +22,15 @@ public partial class HDInsightClusterPoolData : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -29,61 +38,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(HDInsightClusterPoolData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); writer.WriteObjectValue(Properties, options); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } HDInsightClusterPoolData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/AksClusterProfile.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/AksClusterProfile.Serialization.cs index 250722a43c44..3f7348ecd15a 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/AksClusterProfile.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/AksClusterProfile.Serialization.cs @@ -19,6 +19,15 @@ public partial class AksClusterProfile : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(AksClusterProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(AksClusterResourceId)) { writer.WritePropertyName("aksClusterResourceId"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } AksClusterProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/AuthorizationProfile.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/AuthorizationProfile.Serialization.cs index d6304629738e..a3228e6c180b 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/AuthorizationProfile.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/AuthorizationProfile.Serialization.cs @@ -20,6 +20,15 @@ public partial class AuthorizationProfile : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(AuthorizationProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(UserIds)) { writer.WritePropertyName("userIds"u8); @@ -63,7 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } AuthorizationProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/AutoscaleSchedule.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/AutoscaleSchedule.Serialization.cs index 38b6cd589b62..f6b090b6fc96 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/AutoscaleSchedule.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/AutoscaleSchedule.Serialization.cs @@ -20,6 +20,15 @@ public partial class AutoscaleSchedule : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(AutoscaleSchedule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("startTime"u8); writer.WriteStringValue(StartOn); writer.WritePropertyName("endTime"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } AutoscaleSchedule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/CatalogOptions.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/CatalogOptions.Serialization.cs index 9eefb2e57772..c394f3098c64 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/CatalogOptions.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/CatalogOptions.Serialization.cs @@ -20,6 +20,15 @@ internal partial class CatalogOptions : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(CatalogOptions)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Hive)) { writer.WritePropertyName("hive"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp #endif } } - writer.WriteEndObject(); } CatalogOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterAKSPatchVersionUpgradeProperties.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterAKSPatchVersionUpgradeProperties.Serialization.cs index 47a3fd9dfa88..afb8096d59f8 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterAKSPatchVersionUpgradeProperties.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterAKSPatchVersionUpgradeProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class ClusterAKSPatchVersionUpgradeProperties : IUtf8JsonSerializ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,25 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter wr throw new FormatException($"The model {nameof(ClusterAKSPatchVersionUpgradeProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("upgradeType"u8); - writer.WriteStringValue(UpgradeType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } ClusterAKSPatchVersionUpgradeProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterAccessProfile.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterAccessProfile.Serialization.cs index aef764def6d0..fd996d26e232 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterAccessProfile.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterAccessProfile.Serialization.cs @@ -19,6 +19,15 @@ public partial class ClusterAccessProfile : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(ClusterAccessProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("enableInternalIngress"u8); writer.WriteBooleanValue(EnableInternalIngress); if (options.Format != "W" && Optional.IsDefined(PrivateLinkServiceId)) @@ -49,7 +57,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } ClusterAccessProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterAksPatchUpgradeHistoryProperties.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterAksPatchUpgradeHistoryProperties.Serialization.cs index f85485f1c896..1c1875ffe837 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterAksPatchUpgradeHistoryProperties.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterAksPatchUpgradeHistoryProperties.Serialization.cs @@ -19,6 +19,15 @@ public partial class ClusterAksPatchUpgradeHistoryProperties : IUtf8JsonSerializ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter wr throw new FormatException($"The model {nameof(ClusterAksPatchUpgradeHistoryProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(OriginalVersion)) { writer.WritePropertyName("originalVersion"u8); @@ -37,28 +46,6 @@ void IJsonModel.Write(Utf8JsonWriter wr writer.WritePropertyName("newVersion"u8); writer.WriteStringValue(NewVersion); } - writer.WritePropertyName("upgradeType"u8); - writer.WriteStringValue(UpgradeType.ToString()); - writer.WritePropertyName("utcTime"u8); - writer.WriteStringValue(UtcTime); - writer.WritePropertyName("upgradeResult"u8); - writer.WriteStringValue(UpgradeResult.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ClusterAksPatchUpgradeHistoryProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterAutoscaleProfile.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterAutoscaleProfile.Serialization.cs index ba5dfadf8300..e0bceeaa462c 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterAutoscaleProfile.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterAutoscaleProfile.Serialization.cs @@ -19,6 +19,15 @@ public partial class ClusterAutoscaleProfile : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(ClusterAutoscaleProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("enabled"u8); writer.WriteBooleanValue(IsEnabled); if (Optional.IsDefined(GracefulDecommissionTimeout)) @@ -64,7 +72,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } ClusterAutoscaleProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterAvailableInPlaceUpgradeProperties.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterAvailableInPlaceUpgradeProperties.Serialization.cs index 7fed91f669f7..4609ead112e4 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterAvailableInPlaceUpgradeProperties.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterAvailableInPlaceUpgradeProperties.Serialization.cs @@ -19,6 +19,15 @@ public partial class ClusterAvailableInPlaceUpgradeProperties : IUtf8JsonSeriali void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter w throw new FormatException($"The model {nameof(ClusterAvailableInPlaceUpgradeProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Description)) { writer.WritePropertyName("description"u8); @@ -82,24 +91,6 @@ void IJsonModel.Write(Utf8JsonWriter w writer.WritePropertyName("createdTime"u8); writer.WriteStringValue(CreatedOn.Value, "O"); } - writer.WritePropertyName("upgradeType"u8); - writer.WriteStringValue(UpgradeType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ClusterAvailableInPlaceUpgradeProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterAvailableUpgrade.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterAvailableUpgrade.Serialization.cs index 08adba3dbd97..9dfca87a154d 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterAvailableUpgrade.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterAvailableUpgrade.Serialization.cs @@ -20,6 +20,15 @@ public partial class ClusterAvailableUpgrade : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,48 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(ClusterAvailableUpgrade)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); writer.WriteObjectValue(Properties, options); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ClusterAvailableUpgrade IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterAvailableUpgradeAksPatchUpgradeProperties.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterAvailableUpgradeAksPatchUpgradeProperties.Serialization.cs index fe81c0712a01..fe2578c3e670 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterAvailableUpgradeAksPatchUpgradeProperties.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterAvailableUpgradeAksPatchUpgradeProperties.Serialization.cs @@ -19,6 +19,15 @@ public partial class ClusterAvailableUpgradeAksPatchUpgradeProperties : IUtf8Jso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,7 @@ void IJsonModel.Write(Utf8Json throw new FormatException($"The model {nameof(ClusterAvailableUpgradeAksPatchUpgradeProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(CurrentVersion)) { writer.WritePropertyName("currentVersion"u8); @@ -42,24 +51,6 @@ void IJsonModel.Write(Utf8Json writer.WritePropertyName("latestVersion"u8); writer.WriteStringValue(LatestVersion); } - writer.WritePropertyName("upgradeType"u8); - writer.WriteStringValue(UpgradeType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ClusterAvailableUpgradeAksPatchUpgradeProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterAvailableUpgradeHotfixUpgradeProperties.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterAvailableUpgradeHotfixUpgradeProperties.Serialization.cs index 87bace21a7d3..6e1819ad18db 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterAvailableUpgradeHotfixUpgradeProperties.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterAvailableUpgradeHotfixUpgradeProperties.Serialization.cs @@ -19,6 +19,15 @@ public partial class ClusterAvailableUpgradeHotfixUpgradeProperties : IUtf8JsonS void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,80 +35,7 @@ void IJsonModel.Write(Utf8JsonWr throw new FormatException($"The model {nameof(ClusterAvailableUpgradeHotfixUpgradeProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(SourceOssVersion)) - { - writer.WritePropertyName("sourceOssVersion"u8); - writer.WriteStringValue(SourceOssVersion); - } - if (Optional.IsDefined(SourceClusterVersion)) - { - writer.WritePropertyName("sourceClusterVersion"u8); - writer.WriteStringValue(SourceClusterVersion); - } - if (Optional.IsDefined(SourceBuildNumber)) - { - writer.WritePropertyName("sourceBuildNumber"u8); - writer.WriteStringValue(SourceBuildNumber); - } - if (Optional.IsDefined(TargetOssVersion)) - { - writer.WritePropertyName("targetOssVersion"u8); - writer.WriteStringValue(TargetOssVersion); - } - if (Optional.IsDefined(TargetClusterVersion)) - { - writer.WritePropertyName("targetClusterVersion"u8); - writer.WriteStringValue(TargetClusterVersion); - } - if (Optional.IsDefined(TargetBuildNumber)) - { - writer.WritePropertyName("targetBuildNumber"u8); - writer.WriteStringValue(TargetBuildNumber); - } - if (Optional.IsDefined(ComponentName)) - { - writer.WritePropertyName("componentName"u8); - writer.WriteStringValue(ComponentName); - } - if (Optional.IsDefined(Severity)) - { - writer.WritePropertyName("severity"u8); - writer.WriteStringValue(Severity.Value.ToString()); - } - if (Optional.IsDefined(ExtendedProperties)) - { - writer.WritePropertyName("extendedProperties"u8); - writer.WriteStringValue(ExtendedProperties); - } - if (Optional.IsDefined(CreatedOn)) - { - writer.WritePropertyName("createdTime"u8); - writer.WriteStringValue(CreatedOn.Value, "O"); - } - writer.WritePropertyName("upgradeType"u8); - writer.WriteStringValue(UpgradeType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } ClusterAvailableUpgradeHotfixUpgradeProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterAvailableUpgradeList.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterAvailableUpgradeList.Serialization.cs index 467d85a6116a..b88ea6ce3986 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterAvailableUpgradeList.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterAvailableUpgradeList.Serialization.cs @@ -20,6 +20,15 @@ internal partial class ClusterAvailableUpgradeList : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(ClusterAvailableUpgradeList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } ClusterAvailableUpgradeList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterAvailableUpgradePatchVersionUpgradeProperties.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterAvailableUpgradePatchVersionUpgradeProperties.Serialization.cs index ffeb10e1af25..a71a528a5a79 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterAvailableUpgradePatchVersionUpgradeProperties.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterAvailableUpgradePatchVersionUpgradeProperties.Serialization.cs @@ -19,6 +19,15 @@ public partial class ClusterAvailableUpgradePatchVersionUpgradeProperties : IUtf void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,80 +35,7 @@ void IJsonModel.Write(Utf8 throw new FormatException($"The model {nameof(ClusterAvailableUpgradePatchVersionUpgradeProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(SourceOssVersion)) - { - writer.WritePropertyName("sourceOssVersion"u8); - writer.WriteStringValue(SourceOssVersion); - } - if (Optional.IsDefined(SourceClusterVersion)) - { - writer.WritePropertyName("sourceClusterVersion"u8); - writer.WriteStringValue(SourceClusterVersion); - } - if (Optional.IsDefined(SourceBuildNumber)) - { - writer.WritePropertyName("sourceBuildNumber"u8); - writer.WriteStringValue(SourceBuildNumber); - } - if (Optional.IsDefined(TargetOssVersion)) - { - writer.WritePropertyName("targetOssVersion"u8); - writer.WriteStringValue(TargetOssVersion); - } - if (Optional.IsDefined(TargetClusterVersion)) - { - writer.WritePropertyName("targetClusterVersion"u8); - writer.WriteStringValue(TargetClusterVersion); - } - if (Optional.IsDefined(TargetBuildNumber)) - { - writer.WritePropertyName("targetBuildNumber"u8); - writer.WriteStringValue(TargetBuildNumber); - } - if (Optional.IsDefined(ComponentName)) - { - writer.WritePropertyName("componentName"u8); - writer.WriteStringValue(ComponentName); - } - if (Optional.IsDefined(Severity)) - { - writer.WritePropertyName("severity"u8); - writer.WriteStringValue(Severity.Value.ToString()); - } - if (Optional.IsDefined(ExtendedProperties)) - { - writer.WritePropertyName("extendedProperties"u8); - writer.WriteStringValue(ExtendedProperties); - } - if (Optional.IsDefined(CreatedOn)) - { - writer.WritePropertyName("createdTime"u8); - writer.WriteStringValue(CreatedOn.Value, "O"); - } - writer.WritePropertyName("upgradeType"u8); - writer.WriteStringValue(UpgradeType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } ClusterAvailableUpgradePatchVersionUpgradeProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterAvailableUpgradeProperties.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterAvailableUpgradeProperties.Serialization.cs index 0887f18aec48..4e2302bb01e3 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterAvailableUpgradeProperties.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterAvailableUpgradeProperties.Serialization.cs @@ -20,6 +20,15 @@ public partial class ClusterAvailableUpgradeProperties : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(ClusterAvailableUpgradeProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("upgradeType"u8); writer.WriteStringValue(UpgradeType.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -45,7 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } ClusterAvailableUpgradeProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterComponentItem.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterComponentItem.Serialization.cs index 701b4b16653e..992b7d548d2e 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterComponentItem.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterComponentItem.Serialization.cs @@ -19,6 +19,15 @@ public partial class ClusterComponentItem : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(ClusterComponentItem)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } ClusterComponentItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterComputeNodeProfile.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterComputeNodeProfile.Serialization.cs index d21449676928..e3c283a63aea 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterComputeNodeProfile.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterComputeNodeProfile.Serialization.cs @@ -19,6 +19,15 @@ public partial class ClusterComputeNodeProfile : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(ClusterComputeNodeProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("type"u8); writer.WriteStringValue(NodeProfileType); writer.WritePropertyName("vmSize"u8); @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } ClusterComputeNodeProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterComputeProfile.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterComputeProfile.Serialization.cs index 3728f3d7bef4..d98971a39870 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterComputeProfile.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterComputeProfile.Serialization.cs @@ -20,6 +20,15 @@ public partial class ClusterComputeProfile : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(ClusterComputeProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("nodes"u8); writer.WriteStartArray(); foreach (var item in Nodes) @@ -60,7 +68,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } ClusterComputeProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterConfigFile.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterConfigFile.Serialization.cs index 5bf2d364d27d..94947e9c32b5 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterConfigFile.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterConfigFile.Serialization.cs @@ -20,6 +20,15 @@ public partial class ClusterConfigFile : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(ClusterConfigFile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("fileName"u8); writer.WriteStringValue(FileName); if (Optional.IsDefined(Content)) @@ -71,7 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } ClusterConfigFile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterConnectivityProfile.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterConnectivityProfile.Serialization.cs index 4b4aa3fb823a..e565d9acda03 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterConnectivityProfile.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterConnectivityProfile.Serialization.cs @@ -20,6 +20,15 @@ public partial class ClusterConnectivityProfile : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(ClusterConnectivityProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W") { writer.WritePropertyName("web"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } ClusterConnectivityProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterHotfixUpgradeHistoryProperties.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterHotfixUpgradeHistoryProperties.Serialization.cs index ab030fd5a026..44930ec7fb4d 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterHotfixUpgradeHistoryProperties.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterHotfixUpgradeHistoryProperties.Serialization.cs @@ -19,6 +19,15 @@ public partial class ClusterHotfixUpgradeHistoryProperties : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,69 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(ClusterHotfixUpgradeHistoryProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(SourceClusterVersion)) - { - writer.WritePropertyName("sourceClusterVersion"u8); - writer.WriteStringValue(SourceClusterVersion); - } - if (Optional.IsDefined(SourceOssVersion)) - { - writer.WritePropertyName("sourceOssVersion"u8); - writer.WriteStringValue(SourceOssVersion); - } - if (Optional.IsDefined(SourceBuildNumber)) - { - writer.WritePropertyName("sourceBuildNumber"u8); - writer.WriteStringValue(SourceBuildNumber); - } - if (Optional.IsDefined(TargetClusterVersion)) - { - writer.WritePropertyName("targetClusterVersion"u8); - writer.WriteStringValue(TargetClusterVersion); - } - if (Optional.IsDefined(TargetOssVersion)) - { - writer.WritePropertyName("targetOssVersion"u8); - writer.WriteStringValue(TargetOssVersion); - } - if (Optional.IsDefined(TargetBuildNumber)) - { - writer.WritePropertyName("targetBuildNumber"u8); - writer.WriteStringValue(TargetBuildNumber); - } - if (Optional.IsDefined(ComponentName)) - { - writer.WritePropertyName("componentName"u8); - writer.WriteStringValue(ComponentName); - } - if (Optional.IsDefined(Severity)) - { - writer.WritePropertyName("severity"u8); - writer.WriteStringValue(Severity.Value.ToString()); - } - writer.WritePropertyName("upgradeType"u8); - writer.WriteStringValue(UpgradeType.ToString()); - writer.WritePropertyName("utcTime"u8); - writer.WriteStringValue(UtcTime); - writer.WritePropertyName("upgradeResult"u8); - writer.WriteStringValue(UpgradeResult.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } ClusterHotfixUpgradeHistoryProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterHotfixUpgradeProperties.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterHotfixUpgradeProperties.Serialization.cs index c5e6ef3be3ef..fab4273fb668 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterHotfixUpgradeProperties.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterHotfixUpgradeProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class ClusterHotfixUpgradeProperties : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,45 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(ClusterHotfixUpgradeProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(TargetOssVersion)) - { - writer.WritePropertyName("targetOssVersion"u8); - writer.WriteStringValue(TargetOssVersion); - } - if (Optional.IsDefined(TargetClusterVersion)) - { - writer.WritePropertyName("targetClusterVersion"u8); - writer.WriteStringValue(TargetClusterVersion); - } - if (Optional.IsDefined(TargetBuildNumber)) - { - writer.WritePropertyName("targetBuildNumber"u8); - writer.WriteStringValue(TargetBuildNumber); - } - if (Optional.IsDefined(ComponentName)) - { - writer.WritePropertyName("componentName"u8); - writer.WriteStringValue(ComponentName); - } - writer.WritePropertyName("upgradeType"u8); - writer.WriteStringValue(UpgradeType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } ClusterHotfixUpgradeProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterHotfixUpgradeRollbackHistoryProperties.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterHotfixUpgradeRollbackHistoryProperties.Serialization.cs index 678693414220..a13de0871a9e 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterHotfixUpgradeRollbackHistoryProperties.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterHotfixUpgradeRollbackHistoryProperties.Serialization.cs @@ -19,6 +19,15 @@ public partial class ClusterHotfixUpgradeRollbackHistoryProperties : IUtf8JsonSe void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,69 +35,7 @@ void IJsonModel.Write(Utf8JsonWri throw new FormatException($"The model {nameof(ClusterHotfixUpgradeRollbackHistoryProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(SourceClusterVersion)) - { - writer.WritePropertyName("sourceClusterVersion"u8); - writer.WriteStringValue(SourceClusterVersion); - } - if (Optional.IsDefined(SourceOssVersion)) - { - writer.WritePropertyName("sourceOssVersion"u8); - writer.WriteStringValue(SourceOssVersion); - } - if (Optional.IsDefined(SourceBuildNumber)) - { - writer.WritePropertyName("sourceBuildNumber"u8); - writer.WriteStringValue(SourceBuildNumber); - } - if (Optional.IsDefined(TargetClusterVersion)) - { - writer.WritePropertyName("targetClusterVersion"u8); - writer.WriteStringValue(TargetClusterVersion); - } - if (Optional.IsDefined(TargetOssVersion)) - { - writer.WritePropertyName("targetOssVersion"u8); - writer.WriteStringValue(TargetOssVersion); - } - if (Optional.IsDefined(TargetBuildNumber)) - { - writer.WritePropertyName("targetBuildNumber"u8); - writer.WriteStringValue(TargetBuildNumber); - } - if (Optional.IsDefined(ComponentName)) - { - writer.WritePropertyName("componentName"u8); - writer.WriteStringValue(ComponentName); - } - if (Optional.IsDefined(Severity)) - { - writer.WritePropertyName("severity"u8); - writer.WriteStringValue(Severity.Value.ToString()); - } - writer.WritePropertyName("upgradeType"u8); - writer.WriteStringValue(UpgradeType.ToString()); - writer.WritePropertyName("utcTime"u8); - writer.WriteStringValue(UtcTime); - writer.WritePropertyName("upgradeResult"u8); - writer.WriteStringValue(UpgradeResult.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } ClusterHotfixUpgradeRollbackHistoryProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterInPlaceUpgradeHistoryProperties.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterInPlaceUpgradeHistoryProperties.Serialization.cs index 151004378bb1..82fa56a9cf91 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterInPlaceUpgradeHistoryProperties.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterInPlaceUpgradeHistoryProperties.Serialization.cs @@ -19,6 +19,15 @@ public partial class ClusterInPlaceUpgradeHistoryProperties : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(ClusterInPlaceUpgradeHistoryProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(SourceClusterVersion)) { writer.WritePropertyName("sourceClusterVersion"u8); @@ -67,28 +76,6 @@ void IJsonModel.Write(Utf8JsonWriter wri writer.WritePropertyName("severity"u8); writer.WriteStringValue(Severity.Value.ToString()); } - writer.WritePropertyName("upgradeType"u8); - writer.WriteStringValue(UpgradeType.ToString()); - writer.WritePropertyName("utcTime"u8); - writer.WriteStringValue(UtcTime); - writer.WritePropertyName("upgradeResult"u8); - writer.WriteStringValue(UpgradeResult.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ClusterInPlaceUpgradeHistoryProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterInPlaceUpgradeProperties.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterInPlaceUpgradeProperties.Serialization.cs index d28513e510c6..23b63add4904 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterInPlaceUpgradeProperties.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterInPlaceUpgradeProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class ClusterInPlaceUpgradeProperties : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(ClusterInPlaceUpgradeProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(TargetOssVersion)) { writer.WritePropertyName("targetOssVersion"u8); @@ -46,24 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo writer.WritePropertyName("componentName"u8); writer.WriteStringValue(ComponentName); } - writer.WritePropertyName("upgradeType"u8); - writer.WriteStringValue(UpgradeType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ClusterInPlaceUpgradeProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterInstanceViewListResult.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterInstanceViewListResult.Serialization.cs index 800bf4e7ca6c..f043b4292ccb 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterInstanceViewListResult.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterInstanceViewListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class ClusterInstanceViewListResult : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(ClusterInstanceViewListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } ClusterInstanceViewListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterInstanceViewProperties.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterInstanceViewProperties.Serialization.cs index 45dd694610ab..e1b1413b576f 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterInstanceViewProperties.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterInstanceViewProperties.Serialization.cs @@ -20,6 +20,15 @@ public partial class ClusterInstanceViewProperties : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(ClusterInstanceViewProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("status"u8); writer.WriteObjectValue(Status, options); writer.WritePropertyName("serviceStatuses"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } ClusterInstanceViewProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterInstanceViewResult.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterInstanceViewResult.Serialization.cs index 159bb341d862..ae1ecbe097ba 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterInstanceViewResult.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterInstanceViewResult.Serialization.cs @@ -19,6 +19,15 @@ public partial class ClusterInstanceViewResult : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(ClusterInstanceViewResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); writer.WritePropertyName("properties"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } ClusterInstanceViewResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterInstanceViewStatus.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterInstanceViewStatus.Serialization.cs index 07963af8d938..c741d28726a8 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterInstanceViewStatus.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterInstanceViewStatus.Serialization.cs @@ -19,6 +19,15 @@ public partial class ClusterInstanceViewStatus : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(ClusterInstanceViewStatus)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("ready"u8); writer.WriteStringValue(Ready); if (Optional.IsDefined(Reason)) @@ -54,7 +62,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } ClusterInstanceViewStatus IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterJob.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterJob.Serialization.cs index f3099eba9f42..7b8559f1b49f 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterJob.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterJob.Serialization.cs @@ -20,6 +20,15 @@ public partial class ClusterJob : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,45 +36,9 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOption throw new FormatException($"The model {nameof(ClusterJob)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteObjectValue(Properties, options); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ClusterJob IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterJobListResult.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterJobListResult.Serialization.cs index a6a5a8f9f3f1..9db080df82cb 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterJobListResult.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterJobListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class ClusterJobListResult : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(ClusterJobListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } ClusterJobListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterJobProperties.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterJobProperties.Serialization.cs index 2eb3f913f811..d3700beb5319 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterJobProperties.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterJobProperties.Serialization.cs @@ -20,6 +20,15 @@ public partial class ClusterJobProperties : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(ClusterJobProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("jobType"u8); writer.WriteStringValue(JobType.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -45,7 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } ClusterJobProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterLibrary.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterLibrary.Serialization.cs index 493f6e3f018e..6ef9e3f44990 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterLibrary.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterLibrary.Serialization.cs @@ -20,6 +20,15 @@ public partial class ClusterLibrary : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,45 +36,9 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(ClusterLibrary)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteObjectValue(Properties, options); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ClusterLibrary IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterLibraryList.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterLibraryList.Serialization.cs index 20a3228886db..de8b7d0d7d45 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterLibraryList.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterLibraryList.Serialization.cs @@ -20,6 +20,15 @@ internal partial class ClusterLibraryList : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ClusterLibraryList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } ClusterLibraryList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterLibraryManagementOperationContent.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterLibraryManagementOperationContent.Serialization.cs index 547d63c56124..05679e9a39fe 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterLibraryManagementOperationContent.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterLibraryManagementOperationContent.Serialization.cs @@ -20,6 +20,15 @@ public partial class ClusterLibraryManagementOperationContent : IUtf8JsonSeriali void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,45 +36,9 @@ void IJsonModel.Write(Utf8JsonWriter w throw new FormatException($"The model {nameof(ClusterLibraryManagementOperationContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteObjectValue(Properties, options); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ClusterLibraryManagementOperationContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterLibraryManagementOperationProperties.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterLibraryManagementOperationProperties.Serialization.cs index bf0cf42e700b..d8f545403b5e 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterLibraryManagementOperationProperties.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterLibraryManagementOperationProperties.Serialization.cs @@ -20,6 +20,15 @@ public partial class ClusterLibraryManagementOperationProperties : IUtf8JsonSeri void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWrite throw new FormatException($"The model {nameof(ClusterLibraryManagementOperationProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("action"u8); writer.WriteStringValue(Action.ToString()); writer.WritePropertyName("libraries"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWrite #endif } } - writer.WriteEndObject(); } ClusterLibraryManagementOperationProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterLibraryProperties.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterLibraryProperties.Serialization.cs index ac48d4fed8ad..bdffe4cbaced 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterLibraryProperties.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterLibraryProperties.Serialization.cs @@ -20,6 +20,15 @@ public partial class ClusterLibraryProperties : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(ClusterLibraryProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("type"u8); writer.WriteStringValue(LibraryType.ToString()); if (Optional.IsDefined(Remarks)) @@ -65,7 +73,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } ClusterLibraryProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterLogAnalyticsApplicationLogs.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterLogAnalyticsApplicationLogs.Serialization.cs index 81b2c56aa304..5051173f17df 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterLogAnalyticsApplicationLogs.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterLogAnalyticsApplicationLogs.Serialization.cs @@ -19,6 +19,15 @@ public partial class ClusterLogAnalyticsApplicationLogs : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(ClusterLogAnalyticsApplicationLogs)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IsStdOutEnabled)) { writer.WritePropertyName("stdOutEnabled"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } ClusterLogAnalyticsApplicationLogs IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterLogAnalyticsProfile.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterLogAnalyticsProfile.Serialization.cs index ca09d5fd07d2..c496f2df1cdf 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterLogAnalyticsProfile.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterLogAnalyticsProfile.Serialization.cs @@ -19,6 +19,15 @@ public partial class ClusterLogAnalyticsProfile : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(ClusterLogAnalyticsProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("enabled"u8); writer.WriteBooleanValue(IsEnabled); if (Optional.IsDefined(ApplicationLogs)) @@ -54,7 +62,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } ClusterLogAnalyticsProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterMavenLibraryProperties.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterMavenLibraryProperties.Serialization.cs index 3c8a2625d5a7..336b465b213a 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterMavenLibraryProperties.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterMavenLibraryProperties.Serialization.cs @@ -19,6 +19,15 @@ public partial class ClusterMavenLibraryProperties : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(ClusterMavenLibraryProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("groupId"u8); writer.WriteStringValue(GroupId); writer.WritePropertyName("name"u8); @@ -36,44 +45,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode writer.WritePropertyName("version"u8); writer.WriteStringValue(Version); } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LibraryType.ToString()); - if (Optional.IsDefined(Remarks)) - { - writer.WritePropertyName("remarks"u8); - writer.WriteStringValue(Remarks); - } - if (options.Format != "W" && Optional.IsDefined(Timestamp)) - { - writer.WritePropertyName("timestamp"u8); - writer.WriteStringValue(Timestamp.Value, "O"); - } - if (options.Format != "W" && Optional.IsDefined(Status)) - { - writer.WritePropertyName("status"u8); - writer.WriteStringValue(Status.Value.ToString()); - } - if (options.Format != "W" && Optional.IsDefined(Message)) - { - writer.WritePropertyName("message"u8); - writer.WriteStringValue(Message); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ClusterMavenLibraryProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPatchProperties.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPatchProperties.Serialization.cs index 8ab963e0fecc..0d3538857383 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPatchProperties.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPatchProperties.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ClusterPatchProperties : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(ClusterPatchProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ClusterProfile)) { writer.WritePropertyName("clusterProfile"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } ClusterPatchProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPatchVersionUpgradeHistoryProperties.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPatchVersionUpgradeHistoryProperties.Serialization.cs index b054b5e19f3a..42de5d075ec9 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPatchVersionUpgradeHistoryProperties.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPatchVersionUpgradeHistoryProperties.Serialization.cs @@ -19,6 +19,15 @@ public partial class ClusterPatchVersionUpgradeHistoryProperties : IUtf8JsonSeri void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,69 +35,7 @@ void IJsonModel.Write(Utf8JsonWrite throw new FormatException($"The model {nameof(ClusterPatchVersionUpgradeHistoryProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(SourceClusterVersion)) - { - writer.WritePropertyName("sourceClusterVersion"u8); - writer.WriteStringValue(SourceClusterVersion); - } - if (Optional.IsDefined(SourceOssVersion)) - { - writer.WritePropertyName("sourceOssVersion"u8); - writer.WriteStringValue(SourceOssVersion); - } - if (Optional.IsDefined(SourceBuildNumber)) - { - writer.WritePropertyName("sourceBuildNumber"u8); - writer.WriteStringValue(SourceBuildNumber); - } - if (Optional.IsDefined(TargetClusterVersion)) - { - writer.WritePropertyName("targetClusterVersion"u8); - writer.WriteStringValue(TargetClusterVersion); - } - if (Optional.IsDefined(TargetOssVersion)) - { - writer.WritePropertyName("targetOssVersion"u8); - writer.WriteStringValue(TargetOssVersion); - } - if (Optional.IsDefined(TargetBuildNumber)) - { - writer.WritePropertyName("targetBuildNumber"u8); - writer.WriteStringValue(TargetBuildNumber); - } - if (Optional.IsDefined(ComponentName)) - { - writer.WritePropertyName("componentName"u8); - writer.WriteStringValue(ComponentName); - } - if (Optional.IsDefined(Severity)) - { - writer.WritePropertyName("severity"u8); - writer.WriteStringValue(Severity.Value.ToString()); - } - writer.WritePropertyName("upgradeType"u8); - writer.WriteStringValue(UpgradeType.ToString()); - writer.WritePropertyName("utcTime"u8); - writer.WriteStringValue(UtcTime); - writer.WritePropertyName("upgradeResult"u8); - writer.WriteStringValue(UpgradeResult.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } ClusterPatchVersionUpgradeHistoryProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPatchVersionUpgradeProperties.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPatchVersionUpgradeProperties.Serialization.cs index 79e100b88734..fb5e2607c240 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPatchVersionUpgradeProperties.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPatchVersionUpgradeProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class ClusterPatchVersionUpgradeProperties : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,45 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(ClusterPatchVersionUpgradeProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(TargetOssVersion)) - { - writer.WritePropertyName("targetOssVersion"u8); - writer.WriteStringValue(TargetOssVersion); - } - if (Optional.IsDefined(TargetClusterVersion)) - { - writer.WritePropertyName("targetClusterVersion"u8); - writer.WriteStringValue(TargetClusterVersion); - } - if (Optional.IsDefined(TargetBuildNumber)) - { - writer.WritePropertyName("targetBuildNumber"u8); - writer.WriteStringValue(TargetBuildNumber); - } - if (Optional.IsDefined(ComponentName)) - { - writer.WritePropertyName("componentName"u8); - writer.WriteStringValue(ComponentName); - } - writer.WritePropertyName("upgradeType"u8); - writer.WriteStringValue(UpgradeType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } ClusterPatchVersionUpgradeProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPatchVersionUpgradeRollbackHistoryProperties.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPatchVersionUpgradeRollbackHistoryProperties.Serialization.cs index 52b4d6632c92..2b8570f6f7b4 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPatchVersionUpgradeRollbackHistoryProperties.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPatchVersionUpgradeRollbackHistoryProperties.Serialization.cs @@ -19,6 +19,15 @@ public partial class ClusterPatchVersionUpgradeRollbackHistoryProperties : IUtf8 void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,69 +35,7 @@ void IJsonModel.Write(Utf8J throw new FormatException($"The model {nameof(ClusterPatchVersionUpgradeRollbackHistoryProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(SourceClusterVersion)) - { - writer.WritePropertyName("sourceClusterVersion"u8); - writer.WriteStringValue(SourceClusterVersion); - } - if (Optional.IsDefined(SourceOssVersion)) - { - writer.WritePropertyName("sourceOssVersion"u8); - writer.WriteStringValue(SourceOssVersion); - } - if (Optional.IsDefined(SourceBuildNumber)) - { - writer.WritePropertyName("sourceBuildNumber"u8); - writer.WriteStringValue(SourceBuildNumber); - } - if (Optional.IsDefined(TargetClusterVersion)) - { - writer.WritePropertyName("targetClusterVersion"u8); - writer.WriteStringValue(TargetClusterVersion); - } - if (Optional.IsDefined(TargetOssVersion)) - { - writer.WritePropertyName("targetOssVersion"u8); - writer.WriteStringValue(TargetOssVersion); - } - if (Optional.IsDefined(TargetBuildNumber)) - { - writer.WritePropertyName("targetBuildNumber"u8); - writer.WriteStringValue(TargetBuildNumber); - } - if (Optional.IsDefined(ComponentName)) - { - writer.WritePropertyName("componentName"u8); - writer.WriteStringValue(ComponentName); - } - if (Optional.IsDefined(Severity)) - { - writer.WritePropertyName("severity"u8); - writer.WriteStringValue(Severity.Value.ToString()); - } - writer.WritePropertyName("upgradeType"u8); - writer.WriteStringValue(UpgradeType.ToString()); - writer.WritePropertyName("utcTime"u8); - writer.WriteStringValue(UtcTime); - writer.WritePropertyName("upgradeResult"u8); - writer.WriteStringValue(UpgradeResult.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } ClusterPatchVersionUpgradeRollbackHistoryProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolAKSPatchVersionUpgradeProperties.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolAKSPatchVersionUpgradeProperties.Serialization.cs index 65703bbe9883..02d4c239959f 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolAKSPatchVersionUpgradeProperties.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolAKSPatchVersionUpgradeProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class ClusterPoolAKSPatchVersionUpgradeProperties : IUtf8JsonSeri void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWrite throw new FormatException($"The model {nameof(ClusterPoolAKSPatchVersionUpgradeProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(UpgradeClusterPool)) { writer.WritePropertyName("upgradeClusterPool"u8); @@ -41,24 +50,6 @@ void IJsonModel.Write(Utf8JsonWrite writer.WritePropertyName("targetAksVersion"u8); writer.WriteStringValue(TargetAksVersion); } - writer.WritePropertyName("upgradeType"u8); - writer.WriteStringValue(UpgradeType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ClusterPoolAKSPatchVersionUpgradeProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolAksPatchUpgradeHistoryProperties.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolAksPatchUpgradeHistoryProperties.Serialization.cs index 1ddb7752128b..711199202596 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolAksPatchUpgradeHistoryProperties.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolAksPatchUpgradeHistoryProperties.Serialization.cs @@ -19,6 +19,15 @@ public partial class ClusterPoolAksPatchUpgradeHistoryProperties : IUtf8JsonSeri void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,7 @@ void IJsonModel.Write(Utf8JsonWrite throw new FormatException($"The model {nameof(ClusterPoolAksPatchUpgradeHistoryProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(UpgradeClusterPool)) { writer.WritePropertyName("upgradeClusterPool"u8); @@ -47,28 +56,6 @@ void IJsonModel.Write(Utf8JsonWrite writer.WritePropertyName("newVersion"u8); writer.WriteStringValue(NewVersion); } - writer.WritePropertyName("upgradeType"u8); - writer.WriteStringValue(UpgradeType.ToString()); - writer.WritePropertyName("utcTime"u8); - writer.WriteStringValue(UtcTime); - writer.WritePropertyName("upgradeResult"u8); - writer.WriteStringValue(UpgradeResult.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ClusterPoolAksPatchUpgradeHistoryProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolAvailableUpgrade.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolAvailableUpgrade.Serialization.cs index 724317bf1dc3..f72ff2ea1854 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolAvailableUpgrade.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolAvailableUpgrade.Serialization.cs @@ -20,6 +20,15 @@ public partial class ClusterPoolAvailableUpgrade : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,48 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(ClusterPoolAvailableUpgrade)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); writer.WriteObjectValue(Properties, options); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ClusterPoolAvailableUpgrade IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolAvailableUpgradeAksPatchUpgradeProperties.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolAvailableUpgradeAksPatchUpgradeProperties.Serialization.cs index 8dfbe164a46f..4882cdf8b8d4 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolAvailableUpgradeAksPatchUpgradeProperties.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolAvailableUpgradeAksPatchUpgradeProperties.Serialization.cs @@ -19,6 +19,15 @@ public partial class ClusterPoolAvailableUpgradeAksPatchUpgradeProperties : IUtf void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,7 @@ void IJsonModel.Write(Utf8 throw new FormatException($"The model {nameof(ClusterPoolAvailableUpgradeAksPatchUpgradeProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(CurrentVersion)) { writer.WritePropertyName("currentVersion"u8); @@ -42,24 +51,6 @@ void IJsonModel.Write(Utf8 writer.WritePropertyName("latestVersion"u8); writer.WriteStringValue(LatestVersion); } - writer.WritePropertyName("upgradeType"u8); - writer.WriteStringValue(UpgradeType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ClusterPoolAvailableUpgradeAksPatchUpgradeProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolAvailableUpgradeList.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolAvailableUpgradeList.Serialization.cs index 392385de84ff..360d44c90a2b 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolAvailableUpgradeList.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolAvailableUpgradeList.Serialization.cs @@ -20,6 +20,15 @@ internal partial class ClusterPoolAvailableUpgradeList : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(ClusterPoolAvailableUpgradeList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } ClusterPoolAvailableUpgradeList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolAvailableUpgradeNodeOSUpgradeProperties.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolAvailableUpgradeNodeOSUpgradeProperties.Serialization.cs index e7ac81317250..f3434c1812d9 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolAvailableUpgradeNodeOSUpgradeProperties.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolAvailableUpgradeNodeOSUpgradeProperties.Serialization.cs @@ -19,6 +19,15 @@ public partial class ClusterPoolAvailableUpgradeNodeOSUpgradeProperties : IUtf8J void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,30 +35,12 @@ void IJsonModel.Write(Utf8Js throw new FormatException($"The model {nameof(ClusterPoolAvailableUpgradeNodeOSUpgradeProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(LatestVersion)) { writer.WritePropertyName("latestVersion"u8); writer.WriteStringValue(LatestVersion); } - writer.WritePropertyName("upgradeType"u8); - writer.WriteStringValue(UpgradeType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ClusterPoolAvailableUpgradeNodeOSUpgradeProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolAvailableUpgradeProperties.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolAvailableUpgradeProperties.Serialization.cs index e50aeffd7b6c..c82fcc6745bb 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolAvailableUpgradeProperties.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolAvailableUpgradeProperties.Serialization.cs @@ -20,6 +20,15 @@ public partial class ClusterPoolAvailableUpgradeProperties : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(ClusterPoolAvailableUpgradeProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("upgradeType"u8); writer.WriteStringValue(UpgradeType.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -45,7 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } ClusterPoolAvailableUpgradeProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolComputeProfile.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolComputeProfile.Serialization.cs index 99014c90d518..41176b6e9493 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolComputeProfile.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolComputeProfile.Serialization.cs @@ -20,6 +20,15 @@ public partial class ClusterPoolComputeProfile : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(ClusterPoolComputeProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("vmSize"u8); writer.WriteStringValue(VmSize); if (options.Format != "W" && Optional.IsDefined(Count)) @@ -60,7 +68,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } ClusterPoolComputeProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolLogAnalyticsProfile.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolLogAnalyticsProfile.Serialization.cs index 1df781cfa24c..4cb68d28e058 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolLogAnalyticsProfile.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolLogAnalyticsProfile.Serialization.cs @@ -19,6 +19,15 @@ public partial class ClusterPoolLogAnalyticsProfile : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(ClusterPoolLogAnalyticsProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("enabled"u8); writer.WriteBooleanValue(IsEnabled); if (Optional.IsDefined(WorkspaceId)) @@ -49,7 +57,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } ClusterPoolLogAnalyticsProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolNetworkProfile.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolNetworkProfile.Serialization.cs index 3d36abefdca9..df619ad1ff63 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolNetworkProfile.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolNetworkProfile.Serialization.cs @@ -20,6 +20,15 @@ public partial class ClusterPoolNetworkProfile : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(ClusterPoolNetworkProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("subnetId"u8); writer.WriteStringValue(SubnetId); if (Optional.IsDefined(OutboundType)) @@ -65,7 +73,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } ClusterPoolNetworkProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolNodeOSImageUpdateProperties.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolNodeOSImageUpdateProperties.Serialization.cs index 2eb520155eac..98e3beb22b26 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolNodeOSImageUpdateProperties.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolNodeOSImageUpdateProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class ClusterPoolNodeOSImageUpdateProperties : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,25 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(ClusterPoolNodeOSImageUpdateProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("upgradeType"u8); - writer.WriteStringValue(UpgradeType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } ClusterPoolNodeOSImageUpdateProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolNodeOSUpgradeHistoryProperties.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolNodeOSUpgradeHistoryProperties.Serialization.cs index a5f37827e4b0..7b638949d399 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolNodeOSUpgradeHistoryProperties.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolNodeOSUpgradeHistoryProperties.Serialization.cs @@ -19,6 +19,15 @@ public partial class ClusterPoolNodeOSUpgradeHistoryProperties : IUtf8JsonSerial void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,34 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(ClusterPoolNodeOSUpgradeHistoryProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(NewNodeOS)) { writer.WritePropertyName("newNodeOs"u8); writer.WriteStringValue(NewNodeOS); } - writer.WritePropertyName("upgradeType"u8); - writer.WriteStringValue(UpgradeType.ToString()); - writer.WritePropertyName("utcTime"u8); - writer.WriteStringValue(UtcTime); - writer.WritePropertyName("upgradeResult"u8); - writer.WriteStringValue(UpgradeResult.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ClusterPoolNodeOSUpgradeHistoryProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolProfile.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolProfile.Serialization.cs index 944b69be5ceb..5f164dfba927 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolProfile.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolProfile.Serialization.cs @@ -19,6 +19,15 @@ internal partial class ClusterPoolProfile : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ClusterPoolProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("clusterPoolVersion"u8); writer.WriteStringValue(ClusterPoolVersion); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -44,7 +52,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } ClusterPoolProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolUpgrade.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolUpgrade.Serialization.cs index 156f171ea886..d9969bf2b208 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolUpgrade.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolUpgrade.Serialization.cs @@ -18,6 +18,15 @@ public partial class ClusterPoolUpgrade : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ClusterPoolUpgrade)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("properties"u8); writer.WriteObjectValue(Properties, options); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } ClusterPoolUpgrade IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolUpgradeHistory.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolUpgradeHistory.Serialization.cs index dc596c52ea8c..20308d4088ad 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolUpgradeHistory.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolUpgradeHistory.Serialization.cs @@ -20,6 +20,15 @@ public partial class ClusterPoolUpgradeHistory : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,45 +36,9 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(ClusterPoolUpgradeHistory)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteObjectValue(Properties, options); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ClusterPoolUpgradeHistory IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolUpgradeHistoryListResult.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolUpgradeHistoryListResult.Serialization.cs index 9b807dc2b8ff..ed1635e8e4a2 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolUpgradeHistoryListResult.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolUpgradeHistoryListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class ClusterPoolUpgradeHistoryListResult : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(ClusterPoolUpgradeHistoryListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } ClusterPoolUpgradeHistoryListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolUpgradeHistoryProperties.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolUpgradeHistoryProperties.Serialization.cs index 1756996b70e3..518e826b4811 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolUpgradeHistoryProperties.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolUpgradeHistoryProperties.Serialization.cs @@ -20,6 +20,15 @@ public partial class ClusterPoolUpgradeHistoryProperties : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(ClusterPoolUpgradeHistoryProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("upgradeType"u8); writer.WriteStringValue(UpgradeType.ToString()); writer.WritePropertyName("utcTime"u8); @@ -49,7 +57,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } ClusterPoolUpgradeHistoryProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolUpgradeProperties.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolUpgradeProperties.Serialization.cs index e3549f84240e..4437c31853b0 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolUpgradeProperties.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolUpgradeProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class ClusterPoolUpgradeProperties : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(ClusterPoolUpgradeProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("upgradeType"u8); writer.WriteStringValue(UpgradeType.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } ClusterPoolUpgradeProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolVersion.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolVersion.Serialization.cs index c440202bd5ec..4179c7f22cfe 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolVersion.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolVersion.Serialization.cs @@ -20,6 +20,15 @@ public partial class ClusterPoolVersion : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,48 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ClusterPoolVersion)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); writer.WriteObjectValue(Properties, options); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ClusterPoolVersion IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolVersionListResult.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolVersionListResult.Serialization.cs index d66f791a6151..1981fb151301 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolVersionListResult.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolVersionListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class ClusterPoolVersionListResult : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(ClusterPoolVersionListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } ClusterPoolVersionListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolVersionProperties.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolVersionProperties.Serialization.cs index 53b004dcda05..a98ccc9cf012 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolVersionProperties.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolVersionProperties.Serialization.cs @@ -19,6 +19,15 @@ public partial class ClusterPoolVersionProperties : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(ClusterPoolVersionProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ClusterPoolVersion)) { writer.WritePropertyName("clusterPoolVersion"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } ClusterPoolVersionProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterProfile.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterProfile.Serialization.cs index bc24f0a1d629..56636a1453ed 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterProfile.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterProfile.Serialization.cs @@ -20,6 +20,15 @@ public partial class ClusterProfile : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(ClusterProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("clusterVersion"u8); writer.WriteStringValue(ClusterVersion); writer.WritePropertyName("ossVersion"u8); @@ -200,7 +208,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp #endif } } - writer.WriteEndObject(); } ClusterProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPrometheusProfile.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPrometheusProfile.Serialization.cs index 7773cff9ef00..0e59945248e0 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPrometheusProfile.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPrometheusProfile.Serialization.cs @@ -19,6 +19,15 @@ internal partial class ClusterPrometheusProfile : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(ClusterPrometheusProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("enabled"u8); writer.WriteBooleanValue(IsEnabled); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -44,7 +52,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } ClusterPrometheusProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPyPILibraryProperties.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPyPILibraryProperties.Serialization.cs index 9e7764739928..467048e4646c 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPyPILibraryProperties.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPyPILibraryProperties.Serialization.cs @@ -19,6 +19,15 @@ public partial class ClusterPyPILibraryProperties : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(ClusterPyPILibraryProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); if (Optional.IsDefined(Version)) @@ -34,44 +43,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model writer.WritePropertyName("version"u8); writer.WriteStringValue(Version); } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LibraryType.ToString()); - if (Optional.IsDefined(Remarks)) - { - writer.WritePropertyName("remarks"u8); - writer.WriteStringValue(Remarks); - } - if (options.Format != "W" && Optional.IsDefined(Timestamp)) - { - writer.WritePropertyName("timestamp"u8); - writer.WriteStringValue(Timestamp.Value, "O"); - } - if (options.Format != "W" && Optional.IsDefined(Status)) - { - writer.WritePropertyName("status"u8); - writer.WriteStringValue(Status.Value.ToString()); - } - if (options.Format != "W" && Optional.IsDefined(Message)) - { - writer.WritePropertyName("message"u8); - writer.WriteStringValue(Message); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ClusterPyPILibraryProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterRangerPluginProfile.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterRangerPluginProfile.Serialization.cs index 088c0117d273..13fe7775d068 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterRangerPluginProfile.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterRangerPluginProfile.Serialization.cs @@ -19,6 +19,15 @@ internal partial class ClusterRangerPluginProfile : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(ClusterRangerPluginProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("enabled"u8); writer.WriteBooleanValue(IsRangerForClusterEnabled); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -44,7 +52,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } ClusterRangerPluginProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterResizeContent.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterResizeContent.Serialization.cs index 98fd5a9b2755..bc66b5208b27 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterResizeContent.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterResizeContent.Serialization.cs @@ -21,6 +21,15 @@ public partial class ClusterResizeContent : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,61 +37,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(ClusterResizeContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); writer.WriteObjectValue(Properties, options); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ClusterResizeContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterResizeProperties.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterResizeProperties.Serialization.cs index 7382742578da..6adb1557e746 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterResizeProperties.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterResizeProperties.Serialization.cs @@ -19,6 +19,15 @@ internal partial class ClusterResizeProperties : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(ClusterResizeProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("targetWorkerNodeCount"u8); writer.WriteNumberValue(TargetWorkerNodeCount); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -44,7 +52,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } ClusterResizeProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterSecretReference.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterSecretReference.Serialization.cs index dbd30941d2d2..1743dc51fcc0 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterSecretReference.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterSecretReference.Serialization.cs @@ -19,6 +19,15 @@ public partial class ClusterSecretReference : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(ClusterSecretReference)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("referenceName"u8); writer.WriteStringValue(ReferenceName); writer.WritePropertyName("type"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } ClusterSecretReference IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterSecretsProfile.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterSecretsProfile.Serialization.cs index 0b78465b0f9c..13623bec3d21 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterSecretsProfile.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterSecretsProfile.Serialization.cs @@ -20,6 +20,15 @@ public partial class ClusterSecretsProfile : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(ClusterSecretsProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("keyVaultResourceId"u8); writer.WriteStringValue(KeyVaultResourceId); if (Optional.IsCollectionDefined(Secrets)) @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } ClusterSecretsProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterServiceConfig.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterServiceConfig.Serialization.cs index 38eac108fe05..6488e0e85391 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterServiceConfig.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterServiceConfig.Serialization.cs @@ -20,6 +20,15 @@ public partial class ClusterServiceConfig : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(ClusterServiceConfig)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("component"u8); writer.WriteStringValue(Component); writer.WritePropertyName("files"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } ClusterServiceConfig IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterServiceConfigListResult.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterServiceConfigListResult.Serialization.cs index 976158ba6b5e..c2ebaf5ad01d 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterServiceConfigListResult.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterServiceConfigListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class ClusterServiceConfigListResult : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(ClusterServiceConfigListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } ClusterServiceConfigListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterServiceConfigProperties.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterServiceConfigProperties.Serialization.cs index ec8352d8d5ed..7ee9923fe734 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterServiceConfigProperties.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterServiceConfigProperties.Serialization.cs @@ -20,6 +20,15 @@ public partial class ClusterServiceConfigProperties : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(ClusterServiceConfigProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("serviceName"u8); writer.WriteStringValue(ServiceName); writer.WritePropertyName("fileName"u8); @@ -86,7 +94,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } ClusterServiceConfigProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterServiceConfigResult.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterServiceConfigResult.Serialization.cs index 4ed29fe759d0..b6b41e165b73 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterServiceConfigResult.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterServiceConfigResult.Serialization.cs @@ -19,6 +19,15 @@ public partial class ClusterServiceConfigResult : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(ClusterServiceConfigResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } ClusterServiceConfigResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterServiceConfigValueEntity.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterServiceConfigValueEntity.Serialization.cs index 3a8799e43a74..68d04eb0442b 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterServiceConfigValueEntity.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterServiceConfigValueEntity.Serialization.cs @@ -19,6 +19,15 @@ public partial class ClusterServiceConfigValueEntity : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(ClusterServiceConfigValueEntity)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStringValue(Value); if (Optional.IsDefined(Description)) @@ -49,7 +57,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } ClusterServiceConfigValueEntity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterServiceConfigsProfile.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterServiceConfigsProfile.Serialization.cs index 6b617ffc4a41..f967cd9fe662 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterServiceConfigsProfile.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterServiceConfigsProfile.Serialization.cs @@ -20,6 +20,15 @@ public partial class ClusterServiceConfigsProfile : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(ClusterServiceConfigsProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("serviceName"u8); writer.WriteStringValue(ServiceName); writer.WritePropertyName("configs"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } ClusterServiceConfigsProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterSshProfile.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterSshProfile.Serialization.cs index 64461d1ad66c..170b0694b504 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterSshProfile.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterSshProfile.Serialization.cs @@ -19,6 +19,15 @@ public partial class ClusterSshProfile : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(ClusterSshProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("count"u8); writer.WriteNumberValue(Count); if (options.Format != "W" && Optional.IsDefined(PodPrefix)) @@ -54,7 +62,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } ClusterSshProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterUpgrade.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterUpgrade.Serialization.cs index 12c9e7fc3b37..6ec8699f98dd 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterUpgrade.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterUpgrade.Serialization.cs @@ -18,6 +18,15 @@ public partial class ClusterUpgrade : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(ClusterUpgrade)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("properties"u8); writer.WriteObjectValue(Properties, options); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp #endif } } - writer.WriteEndObject(); } ClusterUpgrade IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterUpgradeHistory.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterUpgradeHistory.Serialization.cs index 3ff92aaddf0a..af2353970f76 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterUpgradeHistory.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterUpgradeHistory.Serialization.cs @@ -20,6 +20,15 @@ public partial class ClusterUpgradeHistory : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,45 +36,9 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(ClusterUpgradeHistory)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteObjectValue(Properties, options); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ClusterUpgradeHistory IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterUpgradeHistoryListResult.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterUpgradeHistoryListResult.Serialization.cs index 152e16f43884..98ec3ad2404a 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterUpgradeHistoryListResult.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterUpgradeHistoryListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class ClusterUpgradeHistoryListResult : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(ClusterUpgradeHistoryListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } ClusterUpgradeHistoryListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterUpgradeHistoryProperties.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterUpgradeHistoryProperties.Serialization.cs index 51d3579b3ab3..797caa34efc6 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterUpgradeHistoryProperties.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterUpgradeHistoryProperties.Serialization.cs @@ -20,6 +20,15 @@ public partial class ClusterUpgradeHistoryProperties : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(ClusterUpgradeHistoryProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("upgradeType"u8); writer.WriteStringValue(UpgradeType.ToString()); writer.WritePropertyName("utcTime"u8); @@ -49,7 +57,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } ClusterUpgradeHistoryProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterUpgradeProperties.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterUpgradeProperties.Serialization.cs index 462272ff5247..b4582dba7f31 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterUpgradeProperties.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterUpgradeProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class ClusterUpgradeProperties : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(ClusterUpgradeProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("upgradeType"u8); writer.WriteStringValue(UpgradeType.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } ClusterUpgradeProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterUpgradeRollback.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterUpgradeRollback.Serialization.cs index 39d7d4ce9617..909aeb35d9f5 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterUpgradeRollback.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterUpgradeRollback.Serialization.cs @@ -18,6 +18,15 @@ public partial class ClusterUpgradeRollback : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(ClusterUpgradeRollback)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("properties"u8); writer.WriteObjectValue(Properties, options); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } ClusterUpgradeRollback IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterUpgradeRollbackProperties.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterUpgradeRollbackProperties.Serialization.cs index a59c1d9f826f..2979cfd814c5 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterUpgradeRollbackProperties.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterUpgradeRollbackProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class ClusterUpgradeRollbackProperties : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(ClusterUpgradeRollbackProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("upgradeHistory"u8); writer.WriteStringValue(UpgradeHistory); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } ClusterUpgradeRollbackProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterVersionProperties.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterVersionProperties.Serialization.cs index ba23438a4180..cbb516deebd4 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterVersionProperties.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterVersionProperties.Serialization.cs @@ -20,6 +20,15 @@ public partial class ClusterVersionProperties : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(ClusterVersionProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ClusterType)) { writer.WritePropertyName("clusterType"u8); @@ -78,7 +86,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } ClusterVersionProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ComputeResourceRequirement.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ComputeResourceRequirement.Serialization.cs index b864e904af53..eaed913070b2 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ComputeResourceRequirement.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ComputeResourceRequirement.Serialization.cs @@ -19,6 +19,15 @@ public partial class ComputeResourceRequirement : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(ComputeResourceRequirement)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("cpu"u8); writer.WriteNumberValue(Cpu); writer.WritePropertyName("memory"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } ComputeResourceRequirement IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/DiskStorageProfile.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/DiskStorageProfile.Serialization.cs index e117ea1e1c96..cf835ba748db 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/DiskStorageProfile.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/DiskStorageProfile.Serialization.cs @@ -19,6 +19,15 @@ public partial class DiskStorageProfile : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(DiskStorageProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("dataDiskSize"u8); writer.WriteNumberValue(DataDiskSize); writer.WritePropertyName("dataDiskType"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } DiskStorageProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/FlinkCatalogOptions.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/FlinkCatalogOptions.Serialization.cs index 2c1d2743cea6..105b44bb4065 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/FlinkCatalogOptions.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/FlinkCatalogOptions.Serialization.cs @@ -19,6 +19,15 @@ internal partial class FlinkCatalogOptions : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(FlinkCatalogOptions)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Hive)) { writer.WritePropertyName("hive"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } FlinkCatalogOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/FlinkHiveCatalogOption.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/FlinkHiveCatalogOption.Serialization.cs index 32f12caab51d..799e641ba8dd 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/FlinkHiveCatalogOption.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/FlinkHiveCatalogOption.Serialization.cs @@ -19,6 +19,15 @@ public partial class FlinkHiveCatalogOption : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(FlinkHiveCatalogOption)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(MetastoreDBConnectionAuthenticationMode)) { writer.WritePropertyName("metastoreDbConnectionAuthenticationMode"u8); @@ -59,7 +67,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } FlinkHiveCatalogOption IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/FlinkJobProfile.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/FlinkJobProfile.Serialization.cs index 7a72f27c456b..8b53fbc4e39f 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/FlinkJobProfile.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/FlinkJobProfile.Serialization.cs @@ -19,6 +19,15 @@ public partial class FlinkJobProfile : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(FlinkJobProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("jobJarDirectory"u8); writer.WriteStringValue(JobJarDirectory); writer.WritePropertyName("jarName"u8); @@ -63,7 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO #endif } } - writer.WriteEndObject(); } FlinkJobProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/FlinkJobProperties.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/FlinkJobProperties.Serialization.cs index 08b212b5f2d7..4cc930f33acb 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/FlinkJobProperties.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/FlinkJobProperties.Serialization.cs @@ -20,6 +20,15 @@ public partial class FlinkJobProperties : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(FlinkJobProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(RunId)) { writer.WritePropertyName("runId"u8); @@ -104,24 +113,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("lastSavePoint"u8); writer.WriteStringValue(LastSavePoint); } - writer.WritePropertyName("jobType"u8); - writer.WriteStringValue(JobType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } FlinkJobProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/FlinkProfile.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/FlinkProfile.Serialization.cs index d71c4087a9ea..41f26d8bce2c 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/FlinkProfile.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/FlinkProfile.Serialization.cs @@ -19,6 +19,15 @@ public partial class FlinkProfile : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(FlinkProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("storage"u8); writer.WriteObjectValue(Storage, options); if (Optional.IsDefined(NumReplicas)) @@ -73,7 +81,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti #endif } } - writer.WriteEndObject(); } FlinkProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/FlinkStorageProfile.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/FlinkStorageProfile.Serialization.cs index c069f44ec714..c8584157fd79 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/FlinkStorageProfile.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/FlinkStorageProfile.Serialization.cs @@ -19,6 +19,15 @@ public partial class FlinkStorageProfile : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(FlinkStorageProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("storageUri"u8); writer.WriteStringValue(StorageUriString); if (Optional.IsDefined(Storagekey)) @@ -49,7 +57,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } FlinkStorageProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightClusterListResult.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightClusterListResult.Serialization.cs index 77c47eaf5c4a..de8a85704ee7 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightClusterListResult.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightClusterListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class HDInsightClusterListResult : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(HDInsightClusterListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } HDInsightClusterListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightClusterPatch.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightClusterPatch.Serialization.cs index c624925c28a1..207cd97655f3 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightClusterPatch.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightClusterPatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class HDInsightClusterPatch : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(HDInsightClusterPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } HDInsightClusterPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightClusterPoolListData.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightClusterPoolListData.Serialization.cs index fd350f3cb66b..645ccedcaaf6 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightClusterPoolListData.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightClusterPoolListData.Serialization.cs @@ -20,6 +20,15 @@ internal partial class HDInsightClusterPoolListData : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(HDInsightClusterPoolListData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } HDInsightClusterPoolListData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightClusterPoolPatch.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightClusterPoolPatch.Serialization.cs index 77d3ee33e20f..ced02922504f 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightClusterPoolPatch.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightClusterPoolPatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class HDInsightClusterPoolPatch : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(HDInsightClusterPoolPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } HDInsightClusterPoolPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightClusterPoolProperties.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightClusterPoolProperties.Serialization.cs index 44c89fcda304..879f691c6c92 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightClusterPoolProperties.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightClusterPoolProperties.Serialization.cs @@ -19,6 +19,15 @@ public partial class HDInsightClusterPoolProperties : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(HDInsightClusterPoolProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) { writer.WritePropertyName("provisioningState"u8); @@ -89,7 +97,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } HDInsightClusterPoolProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightClusterProperties.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightClusterProperties.Serialization.cs index 0b386f0de2ac..2576435cb1a0 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightClusterProperties.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightClusterProperties.Serialization.cs @@ -19,6 +19,15 @@ public partial class HDInsightClusterProperties : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(HDInsightClusterProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) { writer.WritePropertyName("provisioningState"u8); @@ -63,7 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } HDInsightClusterProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightClusterVersion.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightClusterVersion.Serialization.cs index 95cd2f84cb8f..a350cbec880a 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightClusterVersion.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightClusterVersion.Serialization.cs @@ -20,6 +20,15 @@ public partial class HDInsightClusterVersion : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,48 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(HDInsightClusterVersion)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); writer.WriteObjectValue(Properties, options); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } HDInsightClusterVersion IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightClusterVersionListResult.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightClusterVersionListResult.Serialization.cs index b6303bc298a4..7beaa0810f4d 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightClusterVersionListResult.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightClusterVersionListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class HDInsightClusterVersionListResult : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(HDInsightClusterVersionListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } HDInsightClusterVersionListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightComparisonRule.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightComparisonRule.Serialization.cs index 45934594553b..41705be56c48 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightComparisonRule.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightComparisonRule.Serialization.cs @@ -19,6 +19,15 @@ public partial class HDInsightComparisonRule : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(HDInsightComparisonRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("operator"u8); writer.WriteStringValue(Operator.ToString()); writer.WritePropertyName("threshold"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } HDInsightComparisonRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightIdentityProfile.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightIdentityProfile.Serialization.cs index 7dcdf05ae345..dc82d93f7072 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightIdentityProfile.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightIdentityProfile.Serialization.cs @@ -19,6 +19,15 @@ public partial class HDInsightIdentityProfile : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(HDInsightIdentityProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("msiResourceId"u8); writer.WriteStringValue(MsiResourceId); writer.WritePropertyName("msiClientId"u8); @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } HDInsightIdentityProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightManagedIdentitySpec.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightManagedIdentitySpec.Serialization.cs index 5332eb5a47ee..ff362975a9fb 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightManagedIdentitySpec.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightManagedIdentitySpec.Serialization.cs @@ -19,6 +19,15 @@ public partial class HDInsightManagedIdentitySpec : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(HDInsightManagedIdentitySpec)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("type"u8); writer.WriteStringValue(IdentityType.ToString()); writer.WritePropertyName("resourceId"u8); @@ -50,7 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } HDInsightManagedIdentitySpec IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightNameAvailabilityContent.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightNameAvailabilityContent.Serialization.cs index 5d3bda8c6762..263e8891b16c 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightNameAvailabilityContent.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightNameAvailabilityContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class HDInsightNameAvailabilityContent : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(HDInsightNameAvailabilityContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } HDInsightNameAvailabilityContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightNameAvailabilityResult.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightNameAvailabilityResult.Serialization.cs index 9766f2c3ba1f..9e83ed8718ba 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightNameAvailabilityResult.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightNameAvailabilityResult.Serialization.cs @@ -19,6 +19,15 @@ public partial class HDInsightNameAvailabilityResult : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(HDInsightNameAvailabilityResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IsNameAvailable)) { writer.WritePropertyName("nameAvailable"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } HDInsightNameAvailabilityResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightServiceStatus.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightServiceStatus.Serialization.cs index 7729072038cc..fb84cc0892c0 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightServiceStatus.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightServiceStatus.Serialization.cs @@ -19,6 +19,15 @@ public partial class HDInsightServiceStatus : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(HDInsightServiceStatus)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("kind"u8); writer.WriteStringValue(Kind); writer.WritePropertyName("ready"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } HDInsightServiceStatus IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HiveCatalogOption.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HiveCatalogOption.Serialization.cs index a130c1eb2467..3dfaad452cf1 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HiveCatalogOption.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HiveCatalogOption.Serialization.cs @@ -19,6 +19,15 @@ public partial class HiveCatalogOption : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(HiveCatalogOption)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("catalogName"u8); writer.WriteStringValue(CatalogName); if (Optional.IsDefined(MetastoreDBConnectionAuthenticationMode)) @@ -63,7 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } HiveCatalogOption IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/KafkaConnectivityEndpoints.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/KafkaConnectivityEndpoints.Serialization.cs index e274332c3e1b..a453e0ca1dc4 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/KafkaConnectivityEndpoints.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/KafkaConnectivityEndpoints.Serialization.cs @@ -20,6 +20,15 @@ public partial class KafkaConnectivityEndpoints : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(KafkaConnectivityEndpoints)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(BootstrapServerEndpoint)) { writer.WritePropertyName("bootstrapServerEndpoint"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } KafkaConnectivityEndpoints IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/KafkaProfile.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/KafkaProfile.Serialization.cs index fc0d5132c549..2bd430100847 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/KafkaProfile.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/KafkaProfile.Serialization.cs @@ -19,6 +19,15 @@ public partial class KafkaProfile : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(KafkaProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IsKRaftEnabled)) { writer.WritePropertyName("enableKRaft"u8); @@ -64,7 +72,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti #endif } } - writer.WriteEndObject(); } KafkaProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/LoadBasedConfig.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/LoadBasedConfig.Serialization.cs index e13ba46baebd..2159ffe9ca34 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/LoadBasedConfig.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/LoadBasedConfig.Serialization.cs @@ -20,6 +20,15 @@ public partial class LoadBasedConfig : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(LoadBasedConfig)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("minNodes"u8); writer.WriteNumberValue(MinNodes); writer.WritePropertyName("maxNodes"u8); @@ -64,7 +72,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO #endif } } - writer.WriteEndObject(); } LoadBasedConfig IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ManagedIdentityProfile.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ManagedIdentityProfile.Serialization.cs index 639bab0eb00f..0a1e2e9de05c 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ManagedIdentityProfile.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ManagedIdentityProfile.Serialization.cs @@ -20,6 +20,15 @@ internal partial class ManagedIdentityProfile : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(ManagedIdentityProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("identityList"u8); writer.WriteStartArray(); foreach (var item in IdentityList) @@ -50,7 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } ManagedIdentityProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/RangerAdminSpec.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/RangerAdminSpec.Serialization.cs index de9ebfd15e6e..3fe0917fb899 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/RangerAdminSpec.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/RangerAdminSpec.Serialization.cs @@ -20,6 +20,15 @@ public partial class RangerAdminSpec : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(RangerAdminSpec)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("admins"u8); writer.WriteStartArray(); foreach (var item in Admins) @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO #endif } } - writer.WriteEndObject(); } RangerAdminSpec IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/RangerAdminSpecDatabase.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/RangerAdminSpecDatabase.Serialization.cs index 50f385d7c93f..72ce277143e0 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/RangerAdminSpecDatabase.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/RangerAdminSpecDatabase.Serialization.cs @@ -19,6 +19,15 @@ public partial class RangerAdminSpecDatabase : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(RangerAdminSpecDatabase)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("host"u8); writer.WriteStringValue(Host); writer.WritePropertyName("name"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } RangerAdminSpecDatabase IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/RangerAuditSpec.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/RangerAuditSpec.Serialization.cs index c21859b1a063..f1bc5536bfc5 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/RangerAuditSpec.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/RangerAuditSpec.Serialization.cs @@ -19,6 +19,15 @@ internal partial class RangerAuditSpec : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(RangerAuditSpec)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(StorageAccount)) { writer.WritePropertyName("storageAccount"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO #endif } } - writer.WriteEndObject(); } RangerAuditSpec IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/RangerProfile.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/RangerProfile.Serialization.cs index aadfd9ae099f..e0ab2c6e39a0 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/RangerProfile.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/RangerProfile.Serialization.cs @@ -19,6 +19,15 @@ public partial class RangerProfile : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt throw new FormatException($"The model {nameof(RangerProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("rangerAdmin"u8); writer.WriteObjectValue(RangerAdmin, options); if (Optional.IsDefined(RangerAudit)) @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt #endif } } - writer.WriteEndObject(); } RangerProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/RangerUsersyncSpec.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/RangerUsersyncSpec.Serialization.cs index 847fd129d056..a30fdea69a97 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/RangerUsersyncSpec.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/RangerUsersyncSpec.Serialization.cs @@ -20,6 +20,15 @@ public partial class RangerUsersyncSpec : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(RangerUsersyncSpec)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IsEnabled)) { writer.WritePropertyName("enabled"u8); @@ -78,7 +86,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } RangerUsersyncSpec IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ScalingRule.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ScalingRule.Serialization.cs index e90447b2fd95..e448a5314ee8 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ScalingRule.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ScalingRule.Serialization.cs @@ -19,6 +19,15 @@ public partial class ScalingRule : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio throw new FormatException($"The model {nameof(ScalingRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("actionType"u8); writer.WriteStringValue(ActionType.ToString()); writer.WritePropertyName("evaluationCount"u8); @@ -50,7 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio #endif } } - writer.WriteEndObject(); } ScalingRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ScheduleBasedConfig.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ScheduleBasedConfig.Serialization.cs index 6e5fc7b7d84e..43a2dec51845 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ScheduleBasedConfig.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ScheduleBasedConfig.Serialization.cs @@ -20,6 +20,15 @@ public partial class ScheduleBasedConfig : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ScheduleBasedConfig)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("timeZone"u8); writer.WriteStringValue(TimeZone); writer.WritePropertyName("defaultCount"u8); @@ -54,7 +62,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } ScheduleBasedConfig IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ScriptActionProfile.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ScriptActionProfile.Serialization.cs index 8e4c9dd4d767..75ffe357dd17 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ScriptActionProfile.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ScriptActionProfile.Serialization.cs @@ -20,6 +20,15 @@ public partial class ScriptActionProfile : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ScriptActionProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("type"u8); writer.WriteStringValue(ScriptActionProfileType); writer.WritePropertyName("name"u8); @@ -71,7 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } ScriptActionProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/SparkMetastoreSpec.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/SparkMetastoreSpec.Serialization.cs index a56784735eb6..062a2d096fc2 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/SparkMetastoreSpec.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/SparkMetastoreSpec.Serialization.cs @@ -19,6 +19,15 @@ public partial class SparkMetastoreSpec : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(SparkMetastoreSpec)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("dbServerHost"u8); writer.WriteStringValue(DBServerHost); writer.WritePropertyName("dbName"u8); @@ -71,7 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } SparkMetastoreSpec IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/SparkProfile.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/SparkProfile.Serialization.cs index 49454069c0aa..6c4a0958188d 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/SparkProfile.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/SparkProfile.Serialization.cs @@ -19,6 +19,15 @@ public partial class SparkProfile : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(SparkProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(DefaultStorageUriString)) { writer.WritePropertyName("defaultStorageUrl"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti #endif } } - writer.WriteEndObject(); } SparkProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/SparkUserPlugin.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/SparkUserPlugin.Serialization.cs index 469ea5db4e76..e06aafd092ba 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/SparkUserPlugin.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/SparkUserPlugin.Serialization.cs @@ -19,6 +19,15 @@ public partial class SparkUserPlugin : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(SparkUserPlugin)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("path"u8); writer.WriteStringValue(Path); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -44,7 +52,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO #endif } } - writer.WriteEndObject(); } SparkUserPlugin IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/SparkUserPluginListResult.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/SparkUserPluginListResult.Serialization.cs index 4fcd13d79d75..97f7fef20dd7 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/SparkUserPluginListResult.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/SparkUserPluginListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class SparkUserPluginListResult : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(SparkUserPluginListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Plugins)) { writer.WritePropertyName("plugins"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } SparkUserPluginListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/SshConnectivityEndpoint.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/SshConnectivityEndpoint.Serialization.cs index 4fe0a600db44..329a7fe3d44f 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/SshConnectivityEndpoint.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/SshConnectivityEndpoint.Serialization.cs @@ -19,6 +19,15 @@ public partial class SshConnectivityEndpoint : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(SshConnectivityEndpoint)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("endpoint"u8); writer.WriteStringValue(Endpoint); if (Optional.IsDefined(PrivateSshEndpoint)) @@ -49,7 +57,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } SshConnectivityEndpoint IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/TrinoCoordinator.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/TrinoCoordinator.Serialization.cs index 3c69d2be23ec..1edb8a5fa29b 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/TrinoCoordinator.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/TrinoCoordinator.Serialization.cs @@ -19,6 +19,15 @@ public partial class TrinoCoordinator : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(TrinoCoordinator)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Debug)) { writer.WritePropertyName("debug"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } TrinoCoordinator IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/TrinoDebugConfig.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/TrinoDebugConfig.Serialization.cs index 8865f9a1319e..7a14cafe5601 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/TrinoDebugConfig.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/TrinoDebugConfig.Serialization.cs @@ -19,6 +19,15 @@ public partial class TrinoDebugConfig : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(TrinoDebugConfig)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IsEnabled)) { writer.WritePropertyName("enable"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } TrinoDebugConfig IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/TrinoProfile.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/TrinoProfile.Serialization.cs index 7adf2a64063d..287b67165837 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/TrinoProfile.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/TrinoProfile.Serialization.cs @@ -19,6 +19,15 @@ public partial class TrinoProfile : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(TrinoProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(CatalogOptions)) { writer.WritePropertyName("catalogOptions"u8); @@ -67,7 +75,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti #endif } } - writer.WriteEndObject(); } TrinoProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/TrinoTelemetryConfig.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/TrinoTelemetryConfig.Serialization.cs index a140fefcf741..922ba0b99bd9 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/TrinoTelemetryConfig.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/TrinoTelemetryConfig.Serialization.cs @@ -19,6 +19,15 @@ public partial class TrinoTelemetryConfig : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(TrinoTelemetryConfig)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(HivecatalogName)) { writer.WritePropertyName("hivecatalogName"u8); @@ -62,7 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } TrinoTelemetryConfig IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/TrinoUserPlugin.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/TrinoUserPlugin.Serialization.cs index 945625021db9..030566e86c51 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/TrinoUserPlugin.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/TrinoUserPlugin.Serialization.cs @@ -19,6 +19,15 @@ public partial class TrinoUserPlugin : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(TrinoUserPlugin)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IsEnabled)) { writer.WritePropertyName("enabled"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO #endif } } - writer.WriteEndObject(); } TrinoUserPlugin IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/TrinoUserPluginListResult.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/TrinoUserPluginListResult.Serialization.cs index 5eb427b3347f..4de5987092dd 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/TrinoUserPluginListResult.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/TrinoUserPluginListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class TrinoUserPluginListResult : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(TrinoUserPluginListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Plugins)) { writer.WritePropertyName("plugins"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } TrinoUserPluginListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/TrinoUserTelemetry.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/TrinoUserTelemetry.Serialization.cs index fe949fc730d9..f5d8ab6d065d 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/TrinoUserTelemetry.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/TrinoUserTelemetry.Serialization.cs @@ -19,6 +19,15 @@ internal partial class TrinoUserTelemetry : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(TrinoUserTelemetry)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Storage)) { writer.WritePropertyName("storage"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } TrinoUserTelemetry IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/TrinoWorker.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/TrinoWorker.Serialization.cs index 91701f1950c6..a6f11f9fa2c9 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/TrinoWorker.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/TrinoWorker.Serialization.cs @@ -19,6 +19,15 @@ internal partial class TrinoWorker : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio throw new FormatException($"The model {nameof(TrinoWorker)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Debug)) { writer.WritePropertyName("debug"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio #endif } } - writer.WriteEndObject(); } TrinoWorker IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/UnknownClusterAvailableUpgradeProperties.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/UnknownClusterAvailableUpgradeProperties.Serialization.cs index 2504ea7653fd..904df560c53d 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/UnknownClusterAvailableUpgradeProperties.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/UnknownClusterAvailableUpgradeProperties.Serialization.cs @@ -19,6 +19,15 @@ internal partial class UnknownClusterAvailableUpgradeProperties : IUtf8JsonSeria void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,25 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(ClusterAvailableUpgradeProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("upgradeType"u8); - writer.WriteStringValue(UpgradeType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } ClusterAvailableUpgradeProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/UnknownClusterJobProperties.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/UnknownClusterJobProperties.Serialization.cs index 590194cabf92..0b2fb06925fc 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/UnknownClusterJobProperties.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/UnknownClusterJobProperties.Serialization.cs @@ -19,6 +19,15 @@ internal partial class UnknownClusterJobProperties : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,25 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(ClusterJobProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("jobType"u8); - writer.WriteStringValue(JobType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } ClusterJobProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/UnknownClusterLibraryProperties.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/UnknownClusterLibraryProperties.Serialization.cs index ae2e00741c88..e90ef82ad997 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/UnknownClusterLibraryProperties.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/UnknownClusterLibraryProperties.Serialization.cs @@ -19,6 +19,15 @@ internal partial class UnknownClusterLibraryProperties : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,45 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(ClusterLibraryProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LibraryType.ToString()); - if (Optional.IsDefined(Remarks)) - { - writer.WritePropertyName("remarks"u8); - writer.WriteStringValue(Remarks); - } - if (options.Format != "W" && Optional.IsDefined(Timestamp)) - { - writer.WritePropertyName("timestamp"u8); - writer.WriteStringValue(Timestamp.Value, "O"); - } - if (options.Format != "W" && Optional.IsDefined(Status)) - { - writer.WritePropertyName("status"u8); - writer.WriteStringValue(Status.Value.ToString()); - } - if (options.Format != "W" && Optional.IsDefined(Message)) - { - writer.WritePropertyName("message"u8); - writer.WriteStringValue(Message); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } ClusterLibraryProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/UnknownClusterPoolAvailableUpgradeProperties.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/UnknownClusterPoolAvailableUpgradeProperties.Serialization.cs index fb48c208ab21..44efaeeef937 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/UnknownClusterPoolAvailableUpgradeProperties.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/UnknownClusterPoolAvailableUpgradeProperties.Serialization.cs @@ -19,6 +19,15 @@ internal partial class UnknownClusterPoolAvailableUpgradeProperties : IUtf8JsonS void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,25 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(ClusterPoolAvailableUpgradeProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("upgradeType"u8); - writer.WriteStringValue(UpgradeType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } ClusterPoolAvailableUpgradeProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/UnknownClusterPoolUpgradeHistoryProperties.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/UnknownClusterPoolUpgradeHistoryProperties.Serialization.cs index 4d5b27e64788..0cadba865a52 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/UnknownClusterPoolUpgradeHistoryProperties.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/UnknownClusterPoolUpgradeHistoryProperties.Serialization.cs @@ -19,6 +19,15 @@ internal partial class UnknownClusterPoolUpgradeHistoryProperties : IUtf8JsonSer void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,29 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(ClusterPoolUpgradeHistoryProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("upgradeType"u8); - writer.WriteStringValue(UpgradeType.ToString()); - writer.WritePropertyName("utcTime"u8); - writer.WriteStringValue(UtcTime); - writer.WritePropertyName("upgradeResult"u8); - writer.WriteStringValue(UpgradeResult.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } ClusterPoolUpgradeHistoryProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/UnknownClusterPoolUpgradeProperties.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/UnknownClusterPoolUpgradeProperties.Serialization.cs index 1e9dbc89f335..8fc3a8459198 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/UnknownClusterPoolUpgradeProperties.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/UnknownClusterPoolUpgradeProperties.Serialization.cs @@ -18,6 +18,15 @@ internal partial class UnknownClusterPoolUpgradeProperties : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,25 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(ClusterPoolUpgradeProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("upgradeType"u8); - writer.WriteStringValue(UpgradeType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } ClusterPoolUpgradeProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/UnknownClusterUpgradeHistoryProperties.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/UnknownClusterUpgradeHistoryProperties.Serialization.cs index efb1aaf385a6..03166b1ba51d 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/UnknownClusterUpgradeHistoryProperties.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/UnknownClusterUpgradeHistoryProperties.Serialization.cs @@ -19,6 +19,15 @@ internal partial class UnknownClusterUpgradeHistoryProperties : IUtf8JsonSeriali void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,29 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(ClusterUpgradeHistoryProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("upgradeType"u8); - writer.WriteStringValue(UpgradeType.ToString()); - writer.WritePropertyName("utcTime"u8); - writer.WriteStringValue(UtcTime); - writer.WritePropertyName("upgradeResult"u8); - writer.WriteStringValue(UpgradeResult.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } ClusterUpgradeHistoryProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/UnknownClusterUpgradeProperties.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/UnknownClusterUpgradeProperties.Serialization.cs index 98ba6cfbc095..02242fdfc39f 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/UnknownClusterUpgradeProperties.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/UnknownClusterUpgradeProperties.Serialization.cs @@ -18,6 +18,15 @@ internal partial class UnknownClusterUpgradeProperties : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,25 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(ClusterUpgradeProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("upgradeType"u8); - writer.WriteStringValue(UpgradeType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } ClusterUpgradeProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/UpdatableClusterProfile.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/UpdatableClusterProfile.Serialization.cs index 4be7064db356..95632a7968b7 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/UpdatableClusterProfile.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/UpdatableClusterProfile.Serialization.cs @@ -18,6 +18,15 @@ public partial class UpdatableClusterProfile : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(UpdatableClusterProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(ServiceConfigsProfiles)) { writer.WritePropertyName("serviceConfigsProfiles"u8); @@ -106,7 +114,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } UpdatableClusterProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/WebConnectivityEndpoint.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/WebConnectivityEndpoint.Serialization.cs index 6d01596737d1..ebcac26e067b 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/WebConnectivityEndpoint.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/WebConnectivityEndpoint.Serialization.cs @@ -19,6 +19,15 @@ public partial class WebConnectivityEndpoint : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(WebConnectivityEndpoint)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("fqdn"u8); writer.WriteStringValue(Fqdn); if (Optional.IsDefined(PrivateFqdn)) @@ -49,7 +57,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } WebConnectivityEndpoint IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/autorest.md b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/autorest.md index 83c34f687eab..9b2105dd0252 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/autorest.md +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/autorest.md @@ -18,6 +18,7 @@ skip-csproj: true modelerfour: flatten-payloads: false use-model-reader-writer: true +use-write-core: true enable-bicep-serialization: true #mgmt-debug: diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/CHANGELOG.md b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/CHANGELOG.md index 58894757dd79..f23ed1292d03 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/CHANGELOG.md +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/CHANGELOG.md @@ -4,6 +4,8 @@ ### Features Added +- Exposed `JsonModelWriteCore` for model serialization procedure. + ### Breaking Changes ### Bugs Fixed diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/api/Azure.ResourceManager.HealthcareApis.netstandard2.0.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/api/Azure.ResourceManager.HealthcareApis.netstandard2.0.cs index 07715dfaa01c..adabd8726553 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/api/Azure.ResourceManager.HealthcareApis.netstandard2.0.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/api/Azure.ResourceManager.HealthcareApis.netstandard2.0.cs @@ -32,6 +32,7 @@ public DicomServiceData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.HealthcareApis.Models.HealthcareApisPublicNetworkAccess? PublicNetworkAccess { get { throw null; } set { } } public System.Uri ServiceUri { get { throw null; } } public Azure.ResourceManager.HealthcareApis.Models.HealthcareApisServiceStorageConfiguration StorageConfiguration { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HealthcareApis.DicomServiceData 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.HealthcareApis.DicomServiceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -100,6 +101,7 @@ public FhirServiceData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.HealthcareApis.Models.HealthcareApisProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.HealthcareApis.Models.HealthcareApisPublicNetworkAccess? PublicNetworkAccess { get { throw null; } set { } } public Azure.ResourceManager.HealthcareApis.Models.FhirServiceResourceVersionPolicyConfiguration ResourceVersionPolicyConfiguration { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HealthcareApis.FhirServiceData 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.HealthcareApis.FhirServiceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -181,6 +183,7 @@ public HealthcareApisIotConnectorData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public Azure.ResourceManager.HealthcareApis.Models.HealthcareApisIotConnectorEventHubIngestionConfiguration IngestionEndpointConfiguration { get { throw null; } set { } } public Azure.ResourceManager.HealthcareApis.Models.HealthcareApisProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HealthcareApis.HealthcareApisIotConnectorData 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.HealthcareApis.HealthcareApisIotConnectorData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -241,6 +244,7 @@ public HealthcareApisIotFhirDestinationData(Azure.ResourceManager.HealthcareApis public Azure.Core.AzureLocation? Location { get { throw null; } set { } } public Azure.ResourceManager.HealthcareApis.Models.HealthcareApisProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.HealthcareApis.Models.HealthcareApisIotIdentityResolutionType ResourceIdentityResolutionType { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HealthcareApis.HealthcareApisIotFhirDestinationData 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.HealthcareApis.HealthcareApisIotFhirDestinationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -272,6 +276,7 @@ public HealthcareApisPrivateEndpointConnectionData() { } public Azure.ResourceManager.HealthcareApis.Models.HealthcareApisPrivateLinkServiceConnectionState ConnectionState { get { throw null; } set { } } public Azure.Core.ResourceIdentifier PrivateEndpointId { get { throw null; } } public Azure.ResourceManager.HealthcareApis.Models.HealthcareApisPrivateEndpointConnectionProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HealthcareApis.HealthcareApisPrivateEndpointConnectionData 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.HealthcareApis.HealthcareApisPrivateEndpointConnectionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -284,6 +289,7 @@ public HealthcareApisPrivateLinkResourceData() { } public string GroupId { get { throw null; } } public System.Collections.Generic.IReadOnlyList RequiredMembers { get { throw null; } } public System.Collections.Generic.IList RequiredZoneNames { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HealthcareApis.HealthcareApisPrivateLinkResourceData 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.HealthcareApis.HealthcareApisPrivateLinkResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -314,6 +320,7 @@ public HealthcareApisServiceData(Azure.Core.AzureLocation location, Azure.Resour public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public Azure.ResourceManager.HealthcareApis.Models.HealthcareApisKind Kind { get { throw null; } set { } } public Azure.ResourceManager.HealthcareApis.Models.HealthcareApisServiceProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HealthcareApis.HealthcareApisServiceData 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.HealthcareApis.HealthcareApisServiceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -439,6 +446,7 @@ public partial class HealthcareApisWorkspaceData : Azure.ResourceManager.Models. public HealthcareApisWorkspaceData(Azure.Core.AzureLocation location) { } public Azure.ETag? ETag { get { throw null; } set { } } public Azure.ResourceManager.HealthcareApis.Models.HealthcareApisWorkspaceProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HealthcareApis.HealthcareApisWorkspaceData 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.HealthcareApis.HealthcareApisWorkspaceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -617,6 +625,7 @@ public partial class DicomServiceAuthenticationConfiguration : System.ClientMode public DicomServiceAuthenticationConfiguration() { } public System.Collections.Generic.IReadOnlyList Audiences { get { throw null; } } public string Authority { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HealthcareApis.Models.DicomServiceAuthenticationConfiguration 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.HealthcareApis.Models.DicomServiceAuthenticationConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -631,6 +640,7 @@ public DicomServiceCorsConfiguration() { } public int? MaxAge { get { throw null; } set { } } public System.Collections.Generic.IList Methods { get { throw null; } } public System.Collections.Generic.IList Origins { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HealthcareApis.Models.DicomServiceCorsConfiguration 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.HealthcareApis.Models.DicomServiceCorsConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -641,6 +651,7 @@ public partial class DicomServicePatch : Azure.ResourceManager.HealthcareApis.Mo { public DicomServicePatch() { } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HealthcareApis.Models.DicomServicePatch 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.HealthcareApis.Models.DicomServicePatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -683,6 +694,7 @@ public partial class FhirServiceAcrConfiguration : System.ClientModel.Primitives public FhirServiceAcrConfiguration() { } public System.Collections.Generic.IList LoginServers { get { throw null; } } public System.Collections.Generic.IList OciArtifacts { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HealthcareApis.Models.FhirServiceAcrConfiguration 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.HealthcareApis.Models.FhirServiceAcrConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -696,6 +708,7 @@ public FhirServiceAuthenticationConfiguration() { } public string Authority { get { throw null; } set { } } public bool? IsSmartProxyEnabled { get { throw null; } set { } } public System.Collections.Generic.IList SmartIdentityProviders { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HealthcareApis.Models.FhirServiceAuthenticationConfiguration 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.HealthcareApis.Models.FhirServiceAuthenticationConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -710,6 +723,7 @@ public FhirServiceCorsConfiguration() { } public int? MaxAge { get { throw null; } set { } } public System.Collections.Generic.IList Methods { get { throw null; } } public System.Collections.Generic.IList Origins { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HealthcareApis.Models.FhirServiceCorsConfiguration 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.HealthcareApis.Models.FhirServiceCorsConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -741,6 +755,7 @@ public FhirServiceImportConfiguration() { } public string IntegrationDataStore { get { throw null; } set { } } public bool? IsEnabled { get { throw null; } set { } } public bool? IsInitialImportMode { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HealthcareApis.Models.FhirServiceImportConfiguration 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.HealthcareApis.Models.FhirServiceImportConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -769,6 +784,7 @@ public partial class FhirServicePatch : Azure.ResourceManager.HealthcareApis.Mod { public FhirServicePatch() { } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HealthcareApis.Models.FhirServicePatch 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.HealthcareApis.Models.FhirServicePatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -780,6 +796,7 @@ public partial class FhirServiceResourceVersionPolicyConfiguration : System.Clie public FhirServiceResourceVersionPolicyConfiguration() { } public Azure.ResourceManager.HealthcareApis.Models.FhirResourceVersionPolicy? Default { get { throw null; } set { } } public System.Collections.Generic.IDictionary ResourceTypeOverrides { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HealthcareApis.Models.FhirServiceResourceVersionPolicyConfiguration 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.HealthcareApis.Models.FhirServiceResourceVersionPolicyConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -792,6 +809,7 @@ public HealthcareApisIotConnectorEventHubIngestionConfiguration() { } public string ConsumerGroup { get { throw null; } set { } } public string EventHubName { get { throw null; } set { } } public string FullyQualifiedEventHubNamespace { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HealthcareApis.Models.HealthcareApisIotConnectorEventHubIngestionConfiguration 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.HealthcareApis.Models.HealthcareApisIotConnectorEventHubIngestionConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -802,6 +820,7 @@ public partial class HealthcareApisIotConnectorPatch : Azure.ResourceManager.Hea { public HealthcareApisIotConnectorPatch() { } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HealthcareApis.Models.HealthcareApisIotConnectorPatch 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.HealthcareApis.Models.HealthcareApisIotConnectorPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -830,6 +849,7 @@ public partial class HealthcareApisIotMappingProperties : System.ClientModel.Pri { public HealthcareApisIotMappingProperties() { } public System.BinaryData Content { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HealthcareApis.Models.HealthcareApisIotMappingProperties 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.HealthcareApis.Models.HealthcareApisIotMappingProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -847,6 +867,7 @@ public partial class HealthcareApisNameAvailabilityContent : System.ClientModel. public HealthcareApisNameAvailabilityContent(string name, Azure.Core.ResourceType resourceType) { } public string Name { get { throw null; } } public Azure.Core.ResourceType ResourceType { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HealthcareApis.Models.HealthcareApisNameAvailabilityContent 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.HealthcareApis.Models.HealthcareApisNameAvailabilityContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -859,6 +880,7 @@ internal HealthcareApisNameAvailabilityResult() { } public bool? IsNameAvailable { get { throw null; } } public string Message { get { throw null; } } public Azure.ResourceManager.HealthcareApis.Models.HealthcareApisNameUnavailableReason? Reason { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HealthcareApis.Models.HealthcareApisNameAvailabilityResult 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.HealthcareApis.Models.HealthcareApisNameAvailabilityResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -915,6 +937,7 @@ public HealthcareApisPrivateLinkServiceConnectionState() { } public string ActionsRequired { get { throw null; } set { } } public string Description { get { throw null; } set { } } public Azure.ResourceManager.HealthcareApis.Models.HealthcareApisPrivateEndpointServiceConnectionStatus? Status { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HealthcareApis.Models.HealthcareApisPrivateLinkServiceConnectionState 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.HealthcareApis.Models.HealthcareApisPrivateLinkServiceConnectionState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -972,6 +995,7 @@ public partial class HealthcareApisResourceTags : System.ClientModel.Primitives. { public HealthcareApisResourceTags() { } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HealthcareApis.Models.HealthcareApisResourceTags 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.HealthcareApis.Models.HealthcareApisResourceTags System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -982,6 +1006,7 @@ public partial class HealthcareApisServiceAccessPolicyEntry : System.ClientModel { public HealthcareApisServiceAccessPolicyEntry(string objectId) { } public string ObjectId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HealthcareApis.Models.HealthcareApisServiceAccessPolicyEntry 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.HealthcareApis.Models.HealthcareApisServiceAccessPolicyEntry System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -993,6 +1018,7 @@ public partial class HealthcareApisServiceAcrConfiguration : System.ClientModel. public HealthcareApisServiceAcrConfiguration() { } public System.Collections.Generic.IList LoginServers { get { throw null; } } public System.Collections.Generic.IList OciArtifacts { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HealthcareApis.Models.HealthcareApisServiceAcrConfiguration 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.HealthcareApis.Models.HealthcareApisServiceAcrConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1005,6 +1031,7 @@ public HealthcareApisServiceAuthenticationConfiguration() { } public string Audience { get { throw null; } set { } } public string Authority { get { throw null; } set { } } public bool? IsSmartProxyEnabled { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HealthcareApis.Models.HealthcareApisServiceAuthenticationConfiguration 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.HealthcareApis.Models.HealthcareApisServiceAuthenticationConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1019,6 +1046,7 @@ public HealthcareApisServiceCorsConfiguration() { } public int? MaxAge { get { throw null; } set { } } public System.Collections.Generic.IList Methods { get { throw null; } } public System.Collections.Generic.IList Origins { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HealthcareApis.Models.HealthcareApisServiceCorsConfiguration 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.HealthcareApis.Models.HealthcareApisServiceCorsConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1031,6 +1059,7 @@ public HealthcareApisServiceCosmosDbConfiguration() { } public System.Guid? CrossTenantCmkApplicationId { get { throw null; } set { } } public System.Uri KeyVaultKeyUri { get { throw null; } set { } } public int? OfferThroughput { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HealthcareApis.Models.HealthcareApisServiceCosmosDbConfiguration 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.HealthcareApis.Models.HealthcareApisServiceCosmosDbConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1043,6 +1072,7 @@ public HealthcareApisServiceImportConfiguration() { } public string IntegrationDataStore { get { throw null; } set { } } public bool? IsEnabled { get { throw null; } set { } } public bool? IsInitialImportMode { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HealthcareApis.Models.HealthcareApisServiceImportConfiguration 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.HealthcareApis.Models.HealthcareApisServiceImportConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1055,6 +1085,7 @@ public HealthcareApisServiceOciArtifactEntry() { } public string Digest { get { throw null; } set { } } public string ImageName { get { throw null; } set { } } public string LoginServer { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HealthcareApis.Models.HealthcareApisServiceOciArtifactEntry 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.HealthcareApis.Models.HealthcareApisServiceOciArtifactEntry System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1066,6 +1097,7 @@ public partial class HealthcareApisServicePatch : System.ClientModel.Primitives. public HealthcareApisServicePatch() { } public Azure.ResourceManager.HealthcareApis.Models.HealthcareApisPublicNetworkAccess? PublicNetworkAccess { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HealthcareApis.Models.HealthcareApisServicePatch 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.HealthcareApis.Models.HealthcareApisServicePatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1085,6 +1117,7 @@ public HealthcareApisServiceProperties() { } public System.Collections.Generic.IList PrivateEndpointConnections { get { throw null; } } public Azure.ResourceManager.HealthcareApis.Models.HealthcareApisProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.HealthcareApis.Models.HealthcareApisPublicNetworkAccess? PublicNetworkAccess { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HealthcareApis.Models.HealthcareApisServiceProperties 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.HealthcareApis.Models.HealthcareApisServiceProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1096,6 +1129,7 @@ public partial class HealthcareApisServiceStorageConfiguration : System.ClientMo public HealthcareApisServiceStorageConfiguration() { } public string FileSystemName { get { throw null; } set { } } public Azure.Core.ResourceIdentifier StorageResourceId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HealthcareApis.Models.HealthcareApisServiceStorageConfiguration 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.HealthcareApis.Models.HealthcareApisServiceStorageConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1105,6 +1139,7 @@ public HealthcareApisServiceStorageConfiguration() { } public partial class HealthcareApisWorkspacePatch : Azure.ResourceManager.HealthcareApis.Models.HealthcareApisResourceTags, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public HealthcareApisWorkspacePatch() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HealthcareApis.Models.HealthcareApisWorkspacePatch 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.HealthcareApis.Models.HealthcareApisWorkspacePatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1117,6 +1152,7 @@ public HealthcareApisWorkspaceProperties() { } public System.Collections.Generic.IReadOnlyList PrivateEndpointConnections { get { throw null; } } public Azure.ResourceManager.HealthcareApis.Models.HealthcareApisProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.HealthcareApis.Models.HealthcareApisPublicNetworkAccess? PublicNetworkAccess { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HealthcareApis.Models.HealthcareApisWorkspaceProperties 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.HealthcareApis.Models.HealthcareApisWorkspaceProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1146,6 +1182,7 @@ public SmartIdentityProviderApplication() { } public System.Collections.Generic.IList AllowedDataActions { get { throw null; } } public string Audience { get { throw null; } set { } } public string ClientId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HealthcareApis.Models.SmartIdentityProviderApplication 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.HealthcareApis.Models.SmartIdentityProviderApplication System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1157,6 +1194,7 @@ public partial class SmartIdentityProviderConfiguration : System.ClientModel.Pri public SmartIdentityProviderConfiguration() { } public System.Collections.Generic.IList Applications { get { throw null; } } public string Authority { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HealthcareApis.Models.SmartIdentityProviderConfiguration 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.HealthcareApis.Models.SmartIdentityProviderConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/assets.json b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/assets.json index 16c945448a0f..214780141c3d 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/assets.json +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/healthcareapis/Azure.ResourceManager.HealthcareApis", - "Tag": "net/healthcareapis/Azure.ResourceManager.HealthcareApis_2d5dfbaf20" + "Tag": "net/healthcareapis/Azure.ResourceManager.HealthcareApis_b41b73e6b7" } diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/DicomServiceData.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/DicomServiceData.Serialization.cs index 1a7e3f9961aa..45abffc211b9 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/DicomServiceData.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/DicomServiceData.Serialization.cs @@ -20,6 +20,15 @@ public partial class DicomServiceData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(DicomServiceData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); @@ -39,39 +48,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) @@ -130,22 +106,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter writer.WriteBooleanValue(IsDataPartitionsEnabled.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } DicomServiceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/FhirServiceData.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/FhirServiceData.Serialization.cs index 91fca8b417f8..ab43567e206a 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/FhirServiceData.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/FhirServiceData.Serialization.cs @@ -20,6 +20,15 @@ public partial class FhirServiceData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(FhirServiceData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Kind)) { writer.WritePropertyName("kind"u8); @@ -44,39 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) @@ -145,22 +121,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO writer.WriteObjectValue(Encryption, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } FhirServiceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/HealthcareApisIotConnectorData.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/HealthcareApisIotConnectorData.Serialization.cs index 757946012ef1..f283bbea30bb 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/HealthcareApisIotConnectorData.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/HealthcareApisIotConnectorData.Serialization.cs @@ -20,6 +20,15 @@ public partial class HealthcareApisIotConnectorData : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(HealthcareApisIotConnectorData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); @@ -39,39 +48,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) @@ -90,22 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod writer.WriteObjectValue(DeviceMapping, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } HealthcareApisIotConnectorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/HealthcareApisIotFhirDestinationData.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/HealthcareApisIotFhirDestinationData.Serialization.cs index c8ac456a77e9..363db104345d 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/HealthcareApisIotFhirDestinationData.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/HealthcareApisIotFhirDestinationData.Serialization.cs @@ -20,6 +20,15 @@ public partial class HealthcareApisIotFhirDestinationData : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(HealthcareApisIotFhirDestinationData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Location)) { writer.WritePropertyName("location"u8); @@ -38,26 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter write writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) @@ -72,22 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter write writer.WritePropertyName("fhirMapping"u8); writer.WriteObjectValue(FhirMapping, options); writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } HealthcareApisIotFhirDestinationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/HealthcareApisPrivateEndpointConnectionData.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/HealthcareApisPrivateEndpointConnectionData.Serialization.cs index d434e3d327af..a5dc03d9f4cc 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/HealthcareApisPrivateEndpointConnectionData.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/HealthcareApisPrivateEndpointConnectionData.Serialization.cs @@ -21,6 +21,15 @@ public partial class HealthcareApisPrivateEndpointConnectionData : IUtf8JsonSeri void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,27 +37,7 @@ void IJsonModel.Write(Utf8JsonWrite throw new FormatException($"The model {nameof(HealthcareApisPrivateEndpointConnectionData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(PrivateEndpoint)) @@ -67,22 +56,6 @@ void IJsonModel.Write(Utf8JsonWrite writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } HealthcareApisPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/HealthcareApisPrivateLinkResourceData.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/HealthcareApisPrivateLinkResourceData.Serialization.cs index 6849a466b40d..fd18b37a9b8d 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/HealthcareApisPrivateLinkResourceData.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/HealthcareApisPrivateLinkResourceData.Serialization.cs @@ -19,6 +19,15 @@ public partial class HealthcareApisPrivateLinkResourceData : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(HealthcareApisPrivateLinkResourceData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(GroupId)) @@ -75,22 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writ writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } HealthcareApisPrivateLinkResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/HealthcareApisServiceData.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/HealthcareApisServiceData.Serialization.cs index 748d36a1f4ee..a0f86122e485 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/HealthcareApisServiceData.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/HealthcareApisServiceData.Serialization.cs @@ -20,6 +20,15 @@ public partial class HealthcareApisServiceData : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(HealthcareApisServiceData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); @@ -45,55 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea writer.WritePropertyName("identity"u8); JsonSerializer.Serialize(writer, Identity); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } HealthcareApisServiceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/HealthcareApisWorkspaceData.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/HealthcareApisWorkspaceData.Serialization.cs index de9c086af10d..85a74ef8d7ff 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/HealthcareApisWorkspaceData.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/HealthcareApisWorkspaceData.Serialization.cs @@ -20,6 +20,15 @@ public partial class HealthcareApisWorkspaceData : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(HealthcareApisWorkspaceData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); @@ -38,55 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } HealthcareApisWorkspaceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/DicomServiceAuthenticationConfiguration.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/DicomServiceAuthenticationConfiguration.Serialization.cs index c82e9b121376..d219e47d3979 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/DicomServiceAuthenticationConfiguration.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/DicomServiceAuthenticationConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class DicomServiceAuthenticationConfiguration : IUtf8JsonSerializ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wr throw new FormatException($"The model {nameof(DicomServiceAuthenticationConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Authority)) { writer.WritePropertyName("authority"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter wr #endif } } - writer.WriteEndObject(); } DicomServiceAuthenticationConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/DicomServiceCollection.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/DicomServiceCollection.Serialization.cs index 8cb37c8dee51..d287b057c2cb 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/DicomServiceCollection.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/DicomServiceCollection.Serialization.cs @@ -18,6 +18,15 @@ internal partial class DicomServiceCollection : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(DicomServiceCollection)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } DicomServiceCollection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/DicomServiceCorsConfiguration.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/DicomServiceCorsConfiguration.Serialization.cs index 8246700d3f95..d7fec6d22cb6 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/DicomServiceCorsConfiguration.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/DicomServiceCorsConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class DicomServiceCorsConfiguration : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(DicomServiceCorsConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Origins)) { writer.WritePropertyName("origins"u8); @@ -81,7 +89,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } DicomServiceCorsConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/DicomServicePatch.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/DicomServicePatch.Serialization.cs index 376615c62060..7a8e6623f319 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/DicomServicePatch.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/DicomServicePatch.Serialization.cs @@ -19,6 +19,15 @@ public partial class DicomServicePatch : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,40 +35,13 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(DicomServicePatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; JsonSerializer.Serialize(writer, Identity, serializeOptions); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } DicomServicePatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/Encryption.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/Encryption.Serialization.cs index 5b70f7ac562a..671c57352e65 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/Encryption.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/Encryption.Serialization.cs @@ -18,6 +18,15 @@ internal partial class Encryption : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOption throw new FormatException($"The model {nameof(Encryption)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(CustomerManagedKeyEncryption)) { writer.WritePropertyName("customerManagedKeyEncryption"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOption #endif } } - writer.WriteEndObject(); } Encryption IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/EncryptionCustomerManagedKeyEncryption.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/EncryptionCustomerManagedKeyEncryption.Serialization.cs index 59fe70f222c3..1184cb755852 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/EncryptionCustomerManagedKeyEncryption.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/EncryptionCustomerManagedKeyEncryption.Serialization.cs @@ -18,6 +18,15 @@ internal partial class EncryptionCustomerManagedKeyEncryption : IUtf8JsonSeriali void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(EncryptionCustomerManagedKeyEncryption)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(KeyEncryptionKeyUri)) { writer.WritePropertyName("keyEncryptionKeyUrl"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } EncryptionCustomerManagedKeyEncryption IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/FhirServiceAcrConfiguration.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/FhirServiceAcrConfiguration.Serialization.cs index eba862bbc653..44280935c61a 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/FhirServiceAcrConfiguration.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/FhirServiceAcrConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class FhirServiceAcrConfiguration : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(FhirServiceAcrConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(LoginServers)) { writer.WritePropertyName("loginServers"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } FhirServiceAcrConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/FhirServiceAuthenticationConfiguration.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/FhirServiceAuthenticationConfiguration.Serialization.cs index a8c42041185d..22ddaca149c4 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/FhirServiceAuthenticationConfiguration.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/FhirServiceAuthenticationConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class FhirServiceAuthenticationConfiguration : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(FhirServiceAuthenticationConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Authority)) { writer.WritePropertyName("authority"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } FhirServiceAuthenticationConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/FhirServiceCollection.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/FhirServiceCollection.Serialization.cs index 4303610b9b12..a5b57c29bd20 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/FhirServiceCollection.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/FhirServiceCollection.Serialization.cs @@ -18,6 +18,15 @@ internal partial class FhirServiceCollection : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(FhirServiceCollection)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } FhirServiceCollection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/FhirServiceCorsConfiguration.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/FhirServiceCorsConfiguration.Serialization.cs index 9d007c71eb33..478be2dcd88e 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/FhirServiceCorsConfiguration.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/FhirServiceCorsConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class FhirServiceCorsConfiguration : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(FhirServiceCorsConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Origins)) { writer.WritePropertyName("origins"u8); @@ -81,7 +89,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } FhirServiceCorsConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/FhirServiceExportConfiguration.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/FhirServiceExportConfiguration.Serialization.cs index 2d2872f7d2f9..e3360cf4c638 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/FhirServiceExportConfiguration.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/FhirServiceExportConfiguration.Serialization.cs @@ -18,6 +18,15 @@ internal partial class FhirServiceExportConfiguration : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(FhirServiceExportConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(StorageAccountName)) { writer.WritePropertyName("storageAccountName"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } FhirServiceExportConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/FhirServiceImportConfiguration.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/FhirServiceImportConfiguration.Serialization.cs index d1e63e11d409..c5274fd1034c 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/FhirServiceImportConfiguration.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/FhirServiceImportConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class FhirServiceImportConfiguration : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(FhirServiceImportConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IntegrationDataStore)) { writer.WritePropertyName("integrationDataStore"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } FhirServiceImportConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/FhirServicePatch.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/FhirServicePatch.Serialization.cs index e2b26d91cc2d..09b579d9e5eb 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/FhirServicePatch.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/FhirServicePatch.Serialization.cs @@ -19,6 +19,15 @@ public partial class FhirServicePatch : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,40 +35,13 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(FhirServicePatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; JsonSerializer.Serialize(writer, Identity, serializeOptions); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } FhirServicePatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/FhirServiceResourceVersionPolicyConfiguration.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/FhirServiceResourceVersionPolicyConfiguration.Serialization.cs index 101ec7e5d16e..429012e4895d 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/FhirServiceResourceVersionPolicyConfiguration.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/FhirServiceResourceVersionPolicyConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class FhirServiceResourceVersionPolicyConfiguration : IUtf8JsonSe void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWri throw new FormatException($"The model {nameof(FhirServiceResourceVersionPolicyConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Default)) { writer.WritePropertyName("default"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWri #endif } } - writer.WriteEndObject(); } FhirServiceResourceVersionPolicyConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisIotConnectorEventHubIngestionConfiguration.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisIotConnectorEventHubIngestionConfiguration.Serialization.cs index 1350e2046d86..2fe77dc7ccfb 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisIotConnectorEventHubIngestionConfiguration.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisIotConnectorEventHubIngestionConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class HealthcareApisIotConnectorEventHubIngestionConfiguration : void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write( throw new FormatException($"The model {nameof(HealthcareApisIotConnectorEventHubIngestionConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(EventHubName)) { writer.WritePropertyName("eventHubName"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write( #endif } } - writer.WriteEndObject(); } HealthcareApisIotConnectorEventHubIngestionConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisIotConnectorPatch.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisIotConnectorPatch.Serialization.cs index 038bdcc60f2e..27e247f0eb8d 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisIotConnectorPatch.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisIotConnectorPatch.Serialization.cs @@ -19,6 +19,15 @@ public partial class HealthcareApisIotConnectorPatch : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,40 +35,13 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(HealthcareApisIotConnectorPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; JsonSerializer.Serialize(writer, Identity, serializeOptions); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } HealthcareApisIotConnectorPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisIotMappingProperties.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisIotMappingProperties.Serialization.cs index ca02ea2915f9..960ac9d5e862 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisIotMappingProperties.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisIotMappingProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class HealthcareApisIotMappingProperties : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(HealthcareApisIotMappingProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Content)) { writer.WritePropertyName("content"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } HealthcareApisIotMappingProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisNameAvailabilityContent.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisNameAvailabilityContent.Serialization.cs index 610517d8f031..46b00ddac6d3 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisNameAvailabilityContent.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisNameAvailabilityContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class HealthcareApisNameAvailabilityContent : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(HealthcareApisNameAvailabilityContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); writer.WritePropertyName("type"u8); @@ -45,7 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } HealthcareApisNameAvailabilityContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisNameAvailabilityResult.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisNameAvailabilityResult.Serialization.cs index 8f16380aaace..55b32b954fb6 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisNameAvailabilityResult.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisNameAvailabilityResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class HealthcareApisNameAvailabilityResult : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(HealthcareApisNameAvailabilityResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(IsNameAvailable)) { writer.WritePropertyName("nameAvailable"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } HealthcareApisNameAvailabilityResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisPrivateLinkServiceConnectionState.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisPrivateLinkServiceConnectionState.Serialization.cs index 4faee331bcb8..cb8f76efc222 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisPrivateLinkServiceConnectionState.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisPrivateLinkServiceConnectionState.Serialization.cs @@ -18,6 +18,15 @@ public partial class HealthcareApisPrivateLinkServiceConnectionState : IUtf8Json void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonW throw new FormatException($"The model {nameof(HealthcareApisPrivateLinkServiceConnectionState)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Status)) { writer.WritePropertyName("status"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonW #endif } } - writer.WriteEndObject(); } HealthcareApisPrivateLinkServiceConnectionState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisResourceTags.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisResourceTags.Serialization.cs index 9b077667e71a..2d01b9a360c8 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisResourceTags.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisResourceTags.Serialization.cs @@ -18,6 +18,15 @@ public partial class HealthcareApisResourceTags : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(HealthcareApisResourceTags)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } HealthcareApisResourceTags IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisServiceAccessPolicyEntry.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisServiceAccessPolicyEntry.Serialization.cs index ec1d1da4f653..b9e6761f28de 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisServiceAccessPolicyEntry.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisServiceAccessPolicyEntry.Serialization.cs @@ -18,6 +18,15 @@ public partial class HealthcareApisServiceAccessPolicyEntry : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(HealthcareApisServiceAccessPolicyEntry)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("objectId"u8); writer.WriteStringValue(ObjectId); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } HealthcareApisServiceAccessPolicyEntry IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisServiceAcrConfiguration.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisServiceAcrConfiguration.Serialization.cs index 5cbeb718acd3..aecbebf16997 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisServiceAcrConfiguration.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisServiceAcrConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class HealthcareApisServiceAcrConfiguration : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(HealthcareApisServiceAcrConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(LoginServers)) { writer.WritePropertyName("loginServers"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } HealthcareApisServiceAcrConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisServiceAuthenticationConfiguration.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisServiceAuthenticationConfiguration.Serialization.cs index f6f263aed8ed..4042a5d06c4c 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisServiceAuthenticationConfiguration.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisServiceAuthenticationConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class HealthcareApisServiceAuthenticationConfiguration : IUtf8Jso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8Json throw new FormatException($"The model {nameof(HealthcareApisServiceAuthenticationConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Authority)) { writer.WritePropertyName("authority"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8Json #endif } } - writer.WriteEndObject(); } HealthcareApisServiceAuthenticationConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisServiceCorsConfiguration.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisServiceCorsConfiguration.Serialization.cs index 4695cbfa684b..f999e402ff3c 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisServiceCorsConfiguration.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisServiceCorsConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class HealthcareApisServiceCorsConfiguration : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(HealthcareApisServiceCorsConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Origins)) { writer.WritePropertyName("origins"u8); @@ -81,7 +89,6 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } HealthcareApisServiceCorsConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisServiceCosmosDbConfiguration.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisServiceCosmosDbConfiguration.Serialization.cs index 35aec026436e..5ba719d752df 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisServiceCosmosDbConfiguration.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisServiceCosmosDbConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class HealthcareApisServiceCosmosDbConfiguration : IUtf8JsonSeria void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(HealthcareApisServiceCosmosDbConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(OfferThroughput)) { writer.WritePropertyName("offerThroughput"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } HealthcareApisServiceCosmosDbConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisServiceImportConfiguration.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisServiceImportConfiguration.Serialization.cs index 2e4402a48357..18733e17e525 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisServiceImportConfiguration.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisServiceImportConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class HealthcareApisServiceImportConfiguration : IUtf8JsonSeriali void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter w throw new FormatException($"The model {nameof(HealthcareApisServiceImportConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IntegrationDataStore)) { writer.WritePropertyName("integrationDataStore"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter w #endif } } - writer.WriteEndObject(); } HealthcareApisServiceImportConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisServiceOciArtifactEntry.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisServiceOciArtifactEntry.Serialization.cs index 6efd5139e0a5..185840b999a9 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisServiceOciArtifactEntry.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisServiceOciArtifactEntry.Serialization.cs @@ -18,6 +18,15 @@ public partial class HealthcareApisServiceOciArtifactEntry : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(HealthcareApisServiceOciArtifactEntry)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(LoginServer)) { writer.WritePropertyName("loginServer"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } HealthcareApisServiceOciArtifactEntry IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisServicePatch.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisServicePatch.Serialization.cs index 5a802ed5e30d..b7db1ffbbbd6 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisServicePatch.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisServicePatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class HealthcareApisServicePatch : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(HealthcareApisServicePatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -60,7 +68,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } HealthcareApisServicePatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisServiceProperties.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisServiceProperties.Serialization.cs index eb2bca152f11..8cbd32602f49 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisServiceProperties.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisServiceProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class HealthcareApisServiceProperties : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(HealthcareApisServiceProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) { writer.WritePropertyName("provisioningState"u8); @@ -101,7 +109,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } HealthcareApisServiceProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisServiceStorageConfiguration.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisServiceStorageConfiguration.Serialization.cs index 88ef851d691f..736addfb5116 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisServiceStorageConfiguration.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisServiceStorageConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class HealthcareApisServiceStorageConfiguration : IUtf8JsonSerial void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(HealthcareApisServiceStorageConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(StorageResourceId)) { writer.WritePropertyName("storageResourceId"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } HealthcareApisServiceStorageConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisWorkspacePatch.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisWorkspacePatch.Serialization.cs index 6552126a56c4..59753e35eae8 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisWorkspacePatch.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisWorkspacePatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class HealthcareApisWorkspacePatch : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,34 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(HealthcareApisWorkspacePatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } HealthcareApisWorkspacePatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisWorkspaceProperties.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisWorkspaceProperties.Serialization.cs index 913aa9b26fae..7b66d8511e2f 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisWorkspaceProperties.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisWorkspaceProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class HealthcareApisWorkspaceProperties : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(HealthcareApisWorkspaceProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) { writer.WritePropertyName("provisioningState"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } HealthcareApisWorkspaceProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/ImplementationGuidesConfiguration.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/ImplementationGuidesConfiguration.Serialization.cs index e8d65d65c384..4119f23faeab 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/ImplementationGuidesConfiguration.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/ImplementationGuidesConfiguration.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ImplementationGuidesConfiguration : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(ImplementationGuidesConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IsUsCoreMissingDataEnabled)) { writer.WritePropertyName("usCoreMissingData"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } ImplementationGuidesConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/IotConnectorCollection.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/IotConnectorCollection.Serialization.cs index 516e36ba5918..ecd4201d7e86 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/IotConnectorCollection.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/IotConnectorCollection.Serialization.cs @@ -18,6 +18,15 @@ internal partial class IotConnectorCollection : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(IotConnectorCollection)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } IotConnectorCollection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/IotFhirDestinationCollection.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/IotFhirDestinationCollection.Serialization.cs index 5b825c8eb2f8..aff37abd36e4 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/IotFhirDestinationCollection.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/IotFhirDestinationCollection.Serialization.cs @@ -18,6 +18,15 @@ internal partial class IotFhirDestinationCollection : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(IotFhirDestinationCollection)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } IotFhirDestinationCollection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/PrivateEndpointConnectionListResultDescription.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/PrivateEndpointConnectionListResultDescription.Serialization.cs index de029452926b..c0b861145651 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/PrivateEndpointConnectionListResultDescription.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/PrivateEndpointConnectionListResultDescription.Serialization.cs @@ -18,6 +18,15 @@ internal partial class PrivateEndpointConnectionListResultDescription : IUtf8Jso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWr throw new FormatException($"The model {nameof(PrivateEndpointConnectionListResultDescription)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWr #endif } } - writer.WriteEndObject(); } PrivateEndpointConnectionListResultDescription IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/PrivateLinkResourceListResultDescription.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/PrivateLinkResourceListResultDescription.Serialization.cs index fd7983417140..d54398d91c3e 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/PrivateLinkResourceListResultDescription.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/PrivateLinkResourceListResultDescription.Serialization.cs @@ -18,6 +18,15 @@ internal partial class PrivateLinkResourceListResultDescription : IUtf8JsonSeria void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter w throw new FormatException($"The model {nameof(PrivateLinkResourceListResultDescription)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter w #endif } } - writer.WriteEndObject(); } PrivateLinkResourceListResultDescription IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/ServiceExportConfigurationInfo.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/ServiceExportConfigurationInfo.Serialization.cs index 4300494b0647..732bebeedcfe 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/ServiceExportConfigurationInfo.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/ServiceExportConfigurationInfo.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ServiceExportConfigurationInfo : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(ServiceExportConfigurationInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(StorageAccountName)) { writer.WritePropertyName("storageAccountName"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } ServiceExportConfigurationInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/ServicesDescriptionListResult.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/ServicesDescriptionListResult.Serialization.cs index e5abe49a8331..204f5855c177 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/ServicesDescriptionListResult.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/ServicesDescriptionListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ServicesDescriptionListResult : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(ServicesDescriptionListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } ServicesDescriptionListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/SmartIdentityProviderApplication.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/SmartIdentityProviderApplication.Serialization.cs index 7e3493278652..907c2dd9d8af 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/SmartIdentityProviderApplication.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/SmartIdentityProviderApplication.Serialization.cs @@ -18,6 +18,15 @@ public partial class SmartIdentityProviderApplication : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(SmartIdentityProviderApplication)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ClientId)) { writer.WritePropertyName("clientId"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } SmartIdentityProviderApplication IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/SmartIdentityProviderConfiguration.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/SmartIdentityProviderConfiguration.Serialization.cs index 5f9d6e8112a4..8ed7aab1fc07 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/SmartIdentityProviderConfiguration.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/SmartIdentityProviderConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class SmartIdentityProviderConfiguration : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(SmartIdentityProviderConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Authority)) { writer.WritePropertyName("authority"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } SmartIdentityProviderConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/WorkspaceList.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/WorkspaceList.Serialization.cs index ce4b391c5cb0..5224ea02d420 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/WorkspaceList.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/WorkspaceList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class WorkspaceList : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt throw new FormatException($"The model {nameof(WorkspaceList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt #endif } } - writer.WriteEndObject(); } WorkspaceList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/autorest.md b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/autorest.md index 84f35388e33a..2086d66c34ce 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/autorest.md +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/autorest.md @@ -19,6 +19,7 @@ skip-csproj: true modelerfour: flatten-payloads: false use-model-reader-writer: true +use-write-core: true #mgmt-debug: # show-serialized-names: true diff --git a/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/api/Azure.ResourceManager.HealthDataAIServices.netstandard2.0.cs b/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/api/Azure.ResourceManager.HealthDataAIServices.netstandard2.0.cs index ef2206f0f5ad..e466e8811649 100644 --- a/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/api/Azure.ResourceManager.HealthDataAIServices.netstandard2.0.cs +++ b/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/api/Azure.ResourceManager.HealthDataAIServices.netstandard2.0.cs @@ -22,6 +22,7 @@ public partial class DeidServiceData : Azure.ResourceManager.Models.TrackedResou public DeidServiceData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public Azure.ResourceManager.HealthDataAIServices.Models.DeidServiceProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HealthDataAIServices.DeidServiceData 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.HealthDataAIServices.DeidServiceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -108,6 +109,7 @@ public partial class HealthDataAIServicesPrivateEndpointConnectionResourceData : { public HealthDataAIServicesPrivateEndpointConnectionResourceData() { } public Azure.ResourceManager.HealthDataAIServices.Models.PrivateEndpointConnectionProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HealthDataAIServices.HealthDataAIServicesPrivateEndpointConnectionResourceData 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.HealthDataAIServices.HealthDataAIServicesPrivateEndpointConnectionResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -155,6 +157,7 @@ public DeidServicePatch() { } public Azure.ResourceManager.HealthDataAIServices.Models.HealthDataAIServicesPublicNetworkAccess? DeidPropertiesUpdatePublicNetworkAccess { get { throw null; } set { } } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HealthDataAIServices.Models.DeidServicePatch 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.HealthDataAIServices.Models.DeidServicePatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -168,6 +171,7 @@ public DeidServiceProperties() { } public Azure.ResourceManager.HealthDataAIServices.Models.HealthDataAIServicesProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.HealthDataAIServices.Models.HealthDataAIServicesPublicNetworkAccess? PublicNetworkAccess { get { throw null; } set { } } public string ServiceUri { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HealthDataAIServices.Models.DeidServiceProperties 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.HealthDataAIServices.Models.DeidServiceProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -178,6 +182,7 @@ public partial class HealthDataAIServicesPrivateEndpointConnection : Azure.Resou { internal HealthDataAIServicesPrivateEndpointConnection() { } public Azure.ResourceManager.HealthDataAIServices.Models.PrivateEndpointConnectionProperties Properties { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HealthDataAIServices.Models.HealthDataAIServicesPrivateEndpointConnection 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.HealthDataAIServices.Models.HealthDataAIServicesPrivateEndpointConnection System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -227,6 +232,7 @@ public partial class HealthDataAIServicesPrivateLinkResourceData : Azure.Resourc { internal HealthDataAIServicesPrivateLinkResourceData() { } public Azure.ResourceManager.HealthDataAIServices.Models.HealthDataAIServicesPrivateLinkResourceProperties Properties { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HealthDataAIServices.Models.HealthDataAIServicesPrivateLinkResourceData 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.HealthDataAIServices.Models.HealthDataAIServicesPrivateLinkResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -239,6 +245,7 @@ internal HealthDataAIServicesPrivateLinkResourceProperties() { } public string GroupId { get { throw null; } } public System.Collections.Generic.IReadOnlyList RequiredMembers { get { throw null; } } public System.Collections.Generic.IReadOnlyList RequiredZoneNames { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HealthDataAIServices.Models.HealthDataAIServicesPrivateLinkResourceProperties 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.HealthDataAIServices.Models.HealthDataAIServicesPrivateLinkResourceProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -251,6 +258,7 @@ public HealthDataAIServicesPrivateLinkServiceConnectionState() { } public string ActionsRequired { get { throw null; } set { } } public string Description { get { throw null; } set { } } public Azure.ResourceManager.HealthDataAIServices.Models.HealthDataAIServicesPrivateEndpointServiceConnectionStatus? Status { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HealthDataAIServices.Models.HealthDataAIServicesPrivateLinkServiceConnectionState 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.HealthDataAIServices.Models.HealthDataAIServicesPrivateLinkServiceConnectionState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -292,6 +300,7 @@ public PrivateEndpointConnectionProperties(Azure.ResourceManager.HealthDataAISer public Azure.Core.ResourceIdentifier PrivateEndpointId { get { throw null; } } public Azure.ResourceManager.HealthDataAIServices.Models.HealthDataAIServicesPrivateLinkServiceConnectionState PrivateLinkServiceConnectionState { get { throw null; } set { } } public Azure.ResourceManager.HealthDataAIServices.Models.HealthDataAIServicesPrivateEndpointConnectionProvisioningState? ProvisioningState { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HealthDataAIServices.Models.PrivateEndpointConnectionProperties 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.HealthDataAIServices.Models.PrivateEndpointConnectionProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } diff --git a/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/assets.json b/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/assets.json index 62304798e4a6..6e31362b2d35 100644 --- a/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/assets.json +++ b/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices", - "Tag": "net/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices_6c7dfd610c" + "Tag": "net/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices_8a59071fed" } diff --git a/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/DeidServiceCollection.cs b/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/DeidServiceCollection.cs index 8596c7ab4041..31a1a2e877a4 100644 --- a/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/DeidServiceCollection.cs +++ b/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/DeidServiceCollection.cs @@ -61,7 +61,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id - /// DeidServices_Create + /// DeidService_Create /// /// /// Default Api Version @@ -110,7 +110,7 @@ public virtual async Task> CreateOrUpdateAsync /// /// /// Operation Id - /// DeidServices_Create + /// DeidService_Create /// /// /// Default Api Version @@ -159,7 +159,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUn /// /// /// Operation Id - /// DeidServices_Get + /// DeidService_Get /// /// /// Default Api Version @@ -204,7 +204,7 @@ public virtual async Task> GetAsync(string deidSer /// /// /// Operation Id - /// DeidServices_Get + /// DeidService_Get /// /// /// Default Api Version @@ -309,7 +309,7 @@ public virtual Pageable GetAll(CancellationToken cancellati /// /// /// Operation Id - /// DeidServices_Get + /// DeidService_Get /// /// /// Default Api Version @@ -352,7 +352,7 @@ public virtual async Task> ExistsAsync(string deidServiceName, Ca /// /// /// Operation Id - /// DeidServices_Get + /// DeidService_Get /// /// /// Default Api Version @@ -395,7 +395,7 @@ public virtual Response Exists(string deidServiceName, CancellationToken c /// /// /// Operation Id - /// DeidServices_Get + /// DeidService_Get /// /// /// Default Api Version @@ -440,7 +440,7 @@ public virtual async Task> GetIfExistsAsyn /// /// /// Operation Id - /// DeidServices_Get + /// DeidService_Get /// /// /// Default Api Version diff --git a/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/DeidServiceData.Serialization.cs b/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/DeidServiceData.Serialization.cs index bb49433618c6..c4b45de1ae0d 100644 --- a/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/DeidServiceData.Serialization.cs +++ b/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/DeidServiceData.Serialization.cs @@ -20,6 +20,15 @@ public partial class DeidServiceData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(DeidServiceData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); @@ -39,55 +48,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; JsonSerializer.Serialize(writer, Identity, serializeOptions); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } DeidServiceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/DeidServiceResource.cs b/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/DeidServiceResource.cs index 6bcc3da8b620..b8dd37e30c93 100644 --- a/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/DeidServiceResource.cs +++ b/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/DeidServiceResource.cs @@ -111,7 +111,7 @@ public virtual HealthDataAIServicesPrivateEndpointConnectionResourceCollection G /// /// /// Operation Id - /// PrivateEndpointConnections_Get + /// PrivateEndpointConnectionResource_Get /// /// /// Default Api Version @@ -142,7 +142,7 @@ public virtual async Task /// /// Operation Id - /// PrivateEndpointConnections_Get + /// PrivateEndpointConnectionResource_Get /// /// /// Default Api Version @@ -173,7 +173,7 @@ public virtual Response G /// /// /// Operation Id - /// DeidServices_Get + /// DeidService_Get /// /// /// Default Api Version @@ -213,7 +213,7 @@ public virtual async Task> GetAsync(CancellationTo /// /// /// Operation Id - /// DeidServices_Get + /// DeidService_Get /// /// /// Default Api Version @@ -253,7 +253,7 @@ public virtual Response Get(CancellationToken cancellationT /// /// /// Operation Id - /// DeidServices_Delete + /// DeidService_Delete /// /// /// Default Api Version @@ -295,7 +295,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Operation Id - /// DeidServices_Delete + /// DeidService_Delete /// /// /// Default Api Version @@ -337,7 +337,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Operation Id - /// DeidServices_Update + /// DeidService_Update /// /// /// Default Api Version @@ -383,7 +383,7 @@ public virtual async Task> UpdateAsync(WaitUnt /// /// /// Operation Id - /// DeidServices_Update + /// DeidService_Update /// /// /// Default Api Version @@ -481,7 +481,7 @@ public virtual Pageable GetPrivateL /// /// /// Operation Id - /// DeidServices_Get + /// DeidService_Get /// /// /// Default Api Version @@ -543,7 +543,7 @@ public virtual async Task> AddTagAsync(string key, /// /// /// Operation Id - /// DeidServices_Get + /// DeidService_Get /// /// /// Default Api Version @@ -605,7 +605,7 @@ public virtual Response AddTag(string key, string value, Ca /// /// /// Operation Id - /// DeidServices_Get + /// DeidService_Get /// /// /// Default Api Version @@ -662,7 +662,7 @@ public virtual async Task> SetTagsAsync(IDictionar /// /// /// Operation Id - /// DeidServices_Get + /// DeidService_Get /// /// /// Default Api Version @@ -719,7 +719,7 @@ public virtual Response SetTags(IDictionary /// /// /// Operation Id - /// DeidServices_Get + /// DeidService_Get /// /// /// Default Api Version @@ -779,7 +779,7 @@ public virtual async Task> RemoveTagAsync(string k /// /// /// Operation Id - /// DeidServices_Get + /// DeidService_Get /// /// /// Default Api Version diff --git a/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/Extensions/HealthDataAIServicesExtensions.cs b/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/Extensions/HealthDataAIServicesExtensions.cs index 480fd7942f77..45ed156d13f7 100644 --- a/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/Extensions/HealthDataAIServicesExtensions.cs +++ b/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/Extensions/HealthDataAIServicesExtensions.cs @@ -96,7 +96,7 @@ public static DeidServiceCollection GetDeidServices(this ResourceGroupResource r /// /// /// Operation Id - /// DeidServices_Get + /// DeidService_Get /// /// /// Default Api Version @@ -134,7 +134,7 @@ public static async Task> GetDeidServiceAsync(this /// /// /// Operation Id - /// DeidServices_Get + /// DeidService_Get /// /// /// Default Api Version diff --git a/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/Extensions/MockableHealthDataAIServicesResourceGroupResource.cs b/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/Extensions/MockableHealthDataAIServicesResourceGroupResource.cs index cc8cae3c53e8..46c6284491dc 100644 --- a/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/Extensions/MockableHealthDataAIServicesResourceGroupResource.cs +++ b/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/Extensions/MockableHealthDataAIServicesResourceGroupResource.cs @@ -49,7 +49,7 @@ public virtual DeidServiceCollection GetDeidServices() /// /// /// Operation Id - /// DeidServices_Get + /// DeidService_Get /// /// /// Default Api Version @@ -80,7 +80,7 @@ public virtual async Task> GetDeidServiceAsync(str /// /// /// Operation Id - /// DeidServices_Get + /// DeidService_Get /// /// /// Default Api Version diff --git a/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/HealthDataAIServicesPrivateEndpointConnectionResource.cs b/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/HealthDataAIServicesPrivateEndpointConnectionResource.cs index b2adb8857a8a..ff155ae48e36 100644 --- a/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/HealthDataAIServicesPrivateEndpointConnectionResource.cs +++ b/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/HealthDataAIServicesPrivateEndpointConnectionResource.cs @@ -97,7 +97,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id - /// PrivateEndpointConnections_Get + /// PrivateEndpointConnectionResource_Get /// /// /// Default Api Version @@ -137,7 +137,7 @@ public virtual async Task /// /// Operation Id - /// PrivateEndpointConnections_Get + /// PrivateEndpointConnectionResource_Get /// /// /// Default Api Version @@ -177,7 +177,7 @@ public virtual Response G /// /// /// Operation Id - /// PrivateEndpointConnections_Delete + /// PrivateEndpointConnectionResource_Delete /// /// /// Default Api Version @@ -219,7 +219,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Operation Id - /// PrivateEndpointConnections_Delete + /// PrivateEndpointConnectionResource_Delete /// /// /// Default Api Version @@ -261,7 +261,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Operation Id - /// PrivateEndpointConnections_Create + /// PrivateEndpointConnectionResource_Create /// /// /// Default Api Version @@ -307,7 +307,7 @@ public virtual async Task /// /// Operation Id - /// PrivateEndpointConnections_Create + /// PrivateEndpointConnectionResource_Create /// /// /// Default Api Version diff --git a/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/HealthDataAIServicesPrivateEndpointConnectionResourceCollection.cs b/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/HealthDataAIServicesPrivateEndpointConnectionResourceCollection.cs index f70ae5f28dd9..f8773ad01ed7 100644 --- a/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/HealthDataAIServicesPrivateEndpointConnectionResourceCollection.cs +++ b/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/HealthDataAIServicesPrivateEndpointConnectionResourceCollection.cs @@ -60,7 +60,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id - /// PrivateEndpointConnections_Create + /// PrivateEndpointConnectionResource_Create /// /// /// Default Api Version @@ -109,7 +109,7 @@ public virtual async Task /// /// Operation Id - /// PrivateEndpointConnections_Create + /// PrivateEndpointConnectionResource_Create /// /// /// Default Api Version @@ -158,7 +158,7 @@ public virtual ArmOperation /// /// Operation Id - /// PrivateEndpointConnections_Get + /// PrivateEndpointConnectionResource_Get /// /// /// Default Api Version @@ -203,7 +203,7 @@ public virtual async Task /// /// Operation Id - /// PrivateEndpointConnections_Get + /// PrivateEndpointConnectionResource_Get /// /// /// Default Api Version @@ -308,7 +308,7 @@ public virtual Pageable G /// /// /// Operation Id - /// PrivateEndpointConnections_Get + /// PrivateEndpointConnectionResource_Get /// /// /// Default Api Version @@ -351,7 +351,7 @@ public virtual async Task> ExistsAsync(string privateEndpointConn /// /// /// Operation Id - /// PrivateEndpointConnections_Get + /// PrivateEndpointConnectionResource_Get /// /// /// Default Api Version @@ -394,7 +394,7 @@ public virtual Response Exists(string privateEndpointConnectionName, Cance /// /// /// Operation Id - /// PrivateEndpointConnections_Get + /// PrivateEndpointConnectionResource_Get /// /// /// Default Api Version @@ -439,7 +439,7 @@ public virtual async Task /// /// Operation Id - /// PrivateEndpointConnections_Get + /// PrivateEndpointConnectionResource_Get /// /// /// Default Api Version diff --git a/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/HealthDataAIServicesPrivateEndpointConnectionResourceData.Serialization.cs b/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/HealthDataAIServicesPrivateEndpointConnectionResourceData.Serialization.cs index 3d047b5c69ba..90d1cd3dd2cd 100644 --- a/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/HealthDataAIServicesPrivateEndpointConnectionResourceData.Serialization.cs +++ b/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/HealthDataAIServicesPrivateEndpointConnectionResourceData.Serialization.cs @@ -20,6 +20,15 @@ public partial class HealthDataAIServicesPrivateEndpointConnectionResourceData : void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,48 +36,12 @@ void IJsonModel.Write throw new FormatException($"The model {nameof(HealthDataAIServicesPrivateEndpointConnectionResourceData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); writer.WriteObjectValue(Properties, options); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } HealthDataAIServicesPrivateEndpointConnectionResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/Models/DeidPropertiesUpdate.Serialization.cs b/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/Models/DeidPropertiesUpdate.Serialization.cs index f8f607941991..5ae709e0e03a 100644 --- a/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/Models/DeidPropertiesUpdate.Serialization.cs +++ b/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/Models/DeidPropertiesUpdate.Serialization.cs @@ -18,6 +18,15 @@ internal partial class DeidPropertiesUpdate : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(DeidPropertiesUpdate)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(PublicNetworkAccess)) { writer.WritePropertyName("publicNetworkAccess"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } DeidPropertiesUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/Models/DeidServiceListResult.Serialization.cs b/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/Models/DeidServiceListResult.Serialization.cs index e0f6f33af2b1..af05a218c022 100644 --- a/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/Models/DeidServiceListResult.Serialization.cs +++ b/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/Models/DeidServiceListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class DeidServiceListResult : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(DeidServiceListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } DeidServiceListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/Models/DeidServicePatch.Serialization.cs b/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/Models/DeidServicePatch.Serialization.cs index f21fb909cd7a..f483a647eb8f 100644 --- a/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/Models/DeidServicePatch.Serialization.cs +++ b/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/Models/DeidServicePatch.Serialization.cs @@ -19,6 +19,15 @@ public partial class DeidServicePatch : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(DeidServicePatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -63,7 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } DeidServicePatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/Models/DeidServiceProperties.Serialization.cs b/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/Models/DeidServiceProperties.Serialization.cs index 3d787bc55c04..adfe78149823 100644 --- a/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/Models/DeidServiceProperties.Serialization.cs +++ b/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/Models/DeidServiceProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class DeidServiceProperties : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(DeidServiceProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) { writer.WritePropertyName("provisioningState"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } DeidServiceProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/Models/HealthDataAIServicesPrivateEndpointConnection.Serialization.cs b/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/Models/HealthDataAIServicesPrivateEndpointConnection.Serialization.cs index 994138255784..d8f24e6aa4b3 100644 --- a/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/Models/HealthDataAIServicesPrivateEndpointConnection.Serialization.cs +++ b/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/Models/HealthDataAIServicesPrivateEndpointConnection.Serialization.cs @@ -19,6 +19,15 @@ public partial class HealthDataAIServicesPrivateEndpointConnection : IUtf8JsonSe void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,48 +35,12 @@ void IJsonModel.Write(Utf8JsonWri throw new FormatException($"The model {nameof(HealthDataAIServicesPrivateEndpointConnection)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); writer.WriteObjectValue(Properties, options); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } HealthDataAIServicesPrivateEndpointConnection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/Models/HealthDataAIServicesPrivateLinkResourceData.Serialization.cs b/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/Models/HealthDataAIServicesPrivateLinkResourceData.Serialization.cs index 3ddc89fd2aa8..f2d4cc1ac523 100644 --- a/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/Models/HealthDataAIServicesPrivateLinkResourceData.Serialization.cs +++ b/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/Models/HealthDataAIServicesPrivateLinkResourceData.Serialization.cs @@ -19,6 +19,15 @@ public partial class HealthDataAIServicesPrivateLinkResourceData : IUtf8JsonSeri void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,48 +35,12 @@ void IJsonModel.Write(Utf8JsonWrite throw new FormatException($"The model {nameof(HealthDataAIServicesPrivateLinkResourceData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); writer.WriteObjectValue(Properties, options); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } HealthDataAIServicesPrivateLinkResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/Models/HealthDataAIServicesPrivateLinkResourceListResult.Serialization.cs b/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/Models/HealthDataAIServicesPrivateLinkResourceListResult.Serialization.cs index 9d46162613eb..771110a84fb4 100644 --- a/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/Models/HealthDataAIServicesPrivateLinkResourceListResult.Serialization.cs +++ b/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/Models/HealthDataAIServicesPrivateLinkResourceListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class HealthDataAIServicesPrivateLinkResourceListResult : IUtf8 void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8Jso throw new FormatException($"The model {nameof(HealthDataAIServicesPrivateLinkResourceListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8Jso #endif } } - writer.WriteEndObject(); } HealthDataAIServicesPrivateLinkResourceListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/Models/HealthDataAIServicesPrivateLinkResourceProperties.Serialization.cs b/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/Models/HealthDataAIServicesPrivateLinkResourceProperties.Serialization.cs index 23f405425eb5..541063bd0617 100644 --- a/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/Models/HealthDataAIServicesPrivateLinkResourceProperties.Serialization.cs +++ b/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/Models/HealthDataAIServicesPrivateLinkResourceProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class HealthDataAIServicesPrivateLinkResourceProperties : IUtf8Js void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8Jso throw new FormatException($"The model {nameof(HealthDataAIServicesPrivateLinkResourceProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(GroupId)) { writer.WritePropertyName("groupId"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8Jso #endif } } - writer.WriteEndObject(); } HealthDataAIServicesPrivateLinkResourceProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/Models/HealthDataAIServicesPrivateLinkServiceConnectionState.Serialization.cs b/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/Models/HealthDataAIServicesPrivateLinkServiceConnectionState.Serialization.cs index 81a00ba01009..ff852da9e2bd 100644 --- a/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/Models/HealthDataAIServicesPrivateLinkServiceConnectionState.Serialization.cs +++ b/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/Models/HealthDataAIServicesPrivateLinkServiceConnectionState.Serialization.cs @@ -18,6 +18,15 @@ public partial class HealthDataAIServicesPrivateLinkServiceConnectionState : IUt void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf throw new FormatException($"The model {nameof(HealthDataAIServicesPrivateLinkServiceConnectionState)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Status)) { writer.WritePropertyName("status"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf #endif } } - writer.WriteEndObject(); } HealthDataAIServicesPrivateLinkServiceConnectionState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/Models/PrivateEndpointConnectionProperties.Serialization.cs b/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/Models/PrivateEndpointConnectionProperties.Serialization.cs index 66bd95504a87..01ef5ce237cb 100644 --- a/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/Models/PrivateEndpointConnectionProperties.Serialization.cs +++ b/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/Models/PrivateEndpointConnectionProperties.Serialization.cs @@ -19,6 +19,15 @@ public partial class PrivateEndpointConnectionProperties : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(PrivateEndpointConnectionProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(GroupIds)) { writer.WritePropertyName("groupIds"u8); @@ -64,7 +72,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } PrivateEndpointConnectionProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/Models/PrivateEndpointConnectionResourceListResult.Serialization.cs b/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/Models/PrivateEndpointConnectionResourceListResult.Serialization.cs index d6daebc226d1..5b5568bf73e6 100644 --- a/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/Models/PrivateEndpointConnectionResourceListResult.Serialization.cs +++ b/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/Models/PrivateEndpointConnectionResourceListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class PrivateEndpointConnectionResourceListResult : IUtf8JsonSe void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWrite throw new FormatException($"The model {nameof(PrivateEndpointConnectionResourceListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWrite #endif } } - writer.WriteEndObject(); } PrivateEndpointConnectionResourceListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/RestOperations/DeidServicesRestOperations.cs b/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/RestOperations/DeidServicesRestOperations.cs index 26b0a7e25065..d661f81db626 100644 --- a/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/RestOperations/DeidServicesRestOperations.cs +++ b/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/RestOperations/DeidServicesRestOperations.cs @@ -25,7 +25,7 @@ internal partial class DeidServicesRestOperations /// Initializes a new instance of DeidServicesRestOperations. /// The HTTP pipeline for sending and receiving REST requests and responses. /// The application id to use for user agent. - /// The to use. + /// Service host. /// The API version to use for this operation. /// or is null. public DeidServicesRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) diff --git a/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs b/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs index 7b18940e8fa8..35fc01f8f437 100644 --- a/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs +++ b/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs @@ -25,7 +25,7 @@ internal partial class PrivateEndpointConnectionsRestOperations /// Initializes a new instance of PrivateEndpointConnectionsRestOperations. /// The HTTP pipeline for sending and receiving REST requests and responses. /// The application id to use for user agent. - /// The to use. + /// Service host. /// The API version to use for this operation. /// or is null. public PrivateEndpointConnectionsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) diff --git a/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/RestOperations/PrivateLinksRestOperations.cs b/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/RestOperations/PrivateLinksRestOperations.cs index 2d38b2e95079..129417eaf2fc 100644 --- a/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/RestOperations/PrivateLinksRestOperations.cs +++ b/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/RestOperations/PrivateLinksRestOperations.cs @@ -25,7 +25,7 @@ internal partial class PrivateLinksRestOperations /// Initializes a new instance of PrivateLinksRestOperations. /// The HTTP pipeline for sending and receiving REST requests and responses. /// The application id to use for user agent. - /// The to use. + /// Service host. /// The API version to use for this operation. /// or is null. public PrivateLinksRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/CHANGELOG.md b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/CHANGELOG.md index 8ca98d6c11b0..83ff4bc887df 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/CHANGELOG.md +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/CHANGELOG.md @@ -1,23 +1,29 @@ # Release History -## 1.0.0-beta.11 (Unreleased) +## 1.1.0-beta.1 (Unreleased) ### Features Added -- Exposed `JsonModelWriteCore` for model serialization procedure. - ### Breaking Changes ### Bugs Fixed ### Other Changes +## 1.0.0 (2024-10-18) + +This is the first stable release of the Hybrid Compute library. + +### Features Added + +- Upgraded api-version tag from 'package-preview-2024-05' to 'package-2024-07'. Tag detail available at https://github.com/Azure/azure-rest-api-specs/blob/15b16d1b5c3cccdecdd1cfe936f6a8005680c557/specification/hybridcompute/resource-manager/readme.md. +- Exposed `JsonModelWriteCore` for model serialization procedure. + ## 1.0.0-beta.10 (2024-07-19) ### Features Added - Upgraded api-version tag from 'package-preview-2024-03' to 'package-preview-2024-05'. Tag detail available at https://github.com/Azure/azure-rest-api-specs/blob/b48d5d72073a296514d3d4db77887d8711526ccc/specification/hybridcompute/resource-manager/readme.md -- Added `ArmOperation.Rehydrate` and `ArmOperation.Rehydrate` static methods to rehydrate a long-running operation. - Added experimental Bicep serialization. ## 1.0.0-beta.9 (2024-06-07) diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/README.md b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/README.md index 1a63e86ccd16..bf4670cca4da 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/README.md +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/README.md @@ -17,7 +17,7 @@ This library follows the [new Azure SDK guidelines](https://azure.github.io/azur Install the Microsoft Azure Hybrid Compute management library for .NET with [NuGet](https://www.nuget.org/): ```dotnetcli -dotnet add package Azure.ResourceManager.HybridCompute --prerelease +dotnet add package Azure.ResourceManager.HybridCompute ``` ### Prerequisites diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/api/Azure.ResourceManager.HybridCompute.netstandard2.0.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/api/Azure.ResourceManager.HybridCompute.netstandard2.0.cs index f5bf61451110..a264619f6a21 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/api/Azure.ResourceManager.HybridCompute.netstandard2.0.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/api/Azure.ResourceManager.HybridCompute.netstandard2.0.cs @@ -6,14 +6,9 @@ public static partial class HybridComputeExtensions public static System.Threading.Tasks.Task> GetHybridComputeExtensionValueAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, string publisher, string extensionType, string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.HybridCompute.HybridComputeExtensionValueResource GetHybridComputeExtensionValueResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.HybridCompute.HybridComputeExtensionValueCollection GetHybridComputeExtensionValues(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, string publisher, string extensionType) { throw null; } - public static Azure.Response GetHybridComputeGateway(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string gatewayName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static System.Threading.Tasks.Task> GetHybridComputeGatewayAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string gatewayName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.ResourceManager.HybridCompute.HybridComputeGatewayResource GetHybridComputeGatewayResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.ResourceManager.HybridCompute.HybridComputeGatewayCollection GetHybridComputeGateways(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } - public static Azure.Pageable GetHybridComputeGateways(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.AsyncPageable GetHybridComputeGatewaysAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Response GetHybridComputeLicense(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string licenseName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> GetHybridComputeLicenseAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string licenseName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.HybridCompute.HybridComputeLicenseProfileResource GetHybridComputeLicenseProfileResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.HybridCompute.HybridComputeLicenseResource GetHybridComputeLicenseResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.HybridCompute.HybridComputeLicenseCollection GetHybridComputeLicenses(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } public static Azure.Pageable GetHybridComputeLicenses(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -33,12 +28,11 @@ public static partial class HybridComputeExtensions public static Azure.ResourceManager.HybridCompute.HybridComputePrivateLinkScopeCollection GetHybridComputePrivateLinkScopes(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } public static Azure.Pageable GetHybridComputePrivateLinkScopes(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.AsyncPageable GetHybridComputePrivateLinkScopesAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.ResourceManager.HybridCompute.MachineRunCommandResource GetMachineRunCommandResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.HybridCompute.NetworkSecurityPerimeterConfigurationResource GetNetworkSecurityPerimeterConfigurationResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.Response GetValidationDetailsPrivateLinkScope(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, string privateLinkScopeId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> GetValidationDetailsPrivateLinkScopeAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, string privateLinkScopeId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.Response UpdateTargetResourceSetting(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string baseProvider, string baseResourceType, string baseResourceName, string settingsResourceName, Azure.ResourceManager.HybridCompute.Models.HybridComputeTargetResourceSettings hybridComputeTargetResourceSettings, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static System.Threading.Tasks.Task> UpdateTargetResourceSettingAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string baseProvider, string baseResourceType, string baseResourceName, string settingsResourceName, Azure.ResourceManager.HybridCompute.Models.HybridComputeTargetResourceSettings hybridComputeTargetResourceSettings, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.ArmOperation ValidateLicenseLicense(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.WaitUntil waitUntil, Azure.ResourceManager.HybridCompute.HybridComputeLicenseData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> ValidateLicenseLicenseAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.WaitUntil waitUntil, Azure.ResourceManager.HybridCompute.HybridComputeLicenseData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public partial class HybridComputeExtensionValueCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { @@ -57,7 +51,7 @@ protected HybridComputeExtensionValueCollection() { } } public partial class HybridComputeExtensionValueData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public HybridComputeExtensionValueData() { } + internal HybridComputeExtensionValueData() { } public string ExtensionType { get { throw null; } } public string Publisher { get { throw null; } } public string Version { get { throw null; } } @@ -83,63 +77,6 @@ protected HybridComputeExtensionValueResource() { } 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 HybridComputeGatewayCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected HybridComputeGatewayCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string gatewayName, Azure.ResourceManager.HybridCompute.HybridComputeGatewayData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string gatewayName, Azure.ResourceManager.HybridCompute.HybridComputeGatewayData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Exists(string gatewayName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(string gatewayName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string gatewayName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(string gatewayName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.NullableResponse GetIfExists(string gatewayName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string gatewayName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } - System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } - System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } - } - public partial class HybridComputeGatewayData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public HybridComputeGatewayData(Azure.Core.AzureLocation location) { } - public System.Collections.Generic.IList AllowedFeatures { get { throw null; } } - public string GatewayEndpoint { get { throw null; } } - public string GatewayId { get { throw null; } } - public Azure.ResourceManager.HybridCompute.Models.HybridComputeGatewayType? GatewayType { get { throw null; } set { } } - public Azure.ResourceManager.HybridCompute.Models.HybridComputeProvisioningState? ProvisioningState { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.HybridCompute.HybridComputeGatewayData 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.HybridCompute.HybridComputeGatewayData 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 partial class HybridComputeGatewayResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public static readonly Azure.Core.ResourceType ResourceType; - protected HybridComputeGatewayResource() { } - public virtual Azure.ResourceManager.HybridCompute.HybridComputeGatewayData Data { get { throw null; } } - public virtual bool HasData { get { throw null; } } - public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string gatewayName) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - 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.HybridCompute.HybridComputeGatewayData 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.HybridCompute.HybridComputeGatewayData 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.Response Update(Azure.ResourceManager.HybridCompute.Models.HybridComputeGatewayPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.HybridCompute.Models.HybridComputeGatewayPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } public partial class HybridComputeLicenseCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected HybridComputeLicenseCollection() { } @@ -171,6 +108,59 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write 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 HybridComputeLicenseProfileData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public HybridComputeLicenseProfileData(Azure.Core.AzureLocation location) { } + public string AssignedLicense { get { throw null; } set { } } + public System.Guid? AssignedLicenseImmutableId { get { throw null; } } + public System.DateTimeOffset? BillingEndOn { get { throw null; } } + public System.DateTimeOffset? BillingStartOn { get { throw null; } } + public System.DateTimeOffset? DisenrollmentOn { get { throw null; } } + public System.DateTimeOffset? EnrollmentOn { get { throw null; } } + public Azure.ResponseError Error { get { throw null; } } + public Azure.ResourceManager.HybridCompute.Models.EsuEligibility? EsuEligibility { get { throw null; } } + public System.Collections.Generic.IReadOnlyList EsuKeys { get { throw null; } } + public Azure.ResourceManager.HybridCompute.Models.EsuKeyState? EsuKeyState { get { throw null; } } + public System.Collections.Generic.IList ProductFeatures { get { throw null; } } + public Azure.ResourceManager.HybridCompute.Models.LicenseProfileProductType? ProductType { get { throw null; } set { } } + public Azure.ResourceManager.HybridCompute.Models.HybridComputeProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.HybridCompute.Models.EsuServerType? ServerType { get { throw null; } } + public bool? SoftwareAssuranceCustomer { get { throw null; } set { } } + public Azure.ResourceManager.HybridCompute.Models.LicenseProfileSubscriptionStatus? SubscriptionStatus { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.HybridCompute.HybridComputeLicenseProfileData 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.HybridCompute.HybridComputeLicenseProfileData 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 partial class HybridComputeLicenseProfileResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected HybridComputeLicenseProfileResource() { } + public virtual Azure.ResourceManager.HybridCompute.HybridComputeLicenseProfileData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, Azure.ResourceManager.HybridCompute.HybridComputeLicenseProfileData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.HybridCompute.HybridComputeLicenseProfileData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string machineName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + 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.HybridCompute.HybridComputeLicenseProfileData 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.HybridCompute.HybridComputeLicenseProfileData 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.HybridCompute.Models.HybridComputeLicenseProfilePatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.HybridCompute.Models.HybridComputeLicenseProfilePatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } public partial class HybridComputeLicenseResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public static readonly Azure.Core.ResourceType ResourceType; @@ -199,6 +189,8 @@ protected HybridComputeLicenseResource() { } public partial class HybridComputeMachineCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected HybridComputeMachineCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string machineName, Azure.ResourceManager.HybridCompute.HybridComputeMachineData data, string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string machineName, Azure.ResourceManager.HybridCompute.HybridComputeMachineData data, string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Exists(string machineName, string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> ExistsAsync(string machineName, string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(string machineName, string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -323,12 +315,10 @@ protected HybridComputeMachineResource() { } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.HybridCompute.HybridComputeLicenseProfileResource GetHybridComputeLicenseProfile() { throw null; } public virtual Azure.Response GetHybridComputeMachineExtension(string extensionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetHybridComputeMachineExtensionAsync(string extensionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.HybridCompute.HybridComputeMachineExtensionCollection GetHybridComputeMachineExtensions() { throw null; } - public virtual Azure.Response GetMachineRunCommand(string runCommandName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetMachineRunCommandAsync(string runCommandName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.HybridCompute.MachineRunCommandCollection GetMachineRunCommands() { throw null; } public virtual Azure.Response GetNetworkProfile(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetNetworkProfileAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetValidationDetailsForMachinePrivateLinkScope(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -499,71 +489,6 @@ protected HybridComputePrivateLinkScopeResource() { } public virtual Azure.Response Update(Azure.ResourceManager.HybridCompute.Models.HybridComputePrivateLinkScopePatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.HybridCompute.Models.HybridComputePrivateLinkScopePatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } - public partial class MachineRunCommandCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected MachineRunCommandCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string runCommandName, Azure.ResourceManager.HybridCompute.MachineRunCommandData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string runCommandName, Azure.ResourceManager.HybridCompute.MachineRunCommandData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Exists(string runCommandName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(string runCommandName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string runCommandName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetAll(string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetAllAsync(string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(string runCommandName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.NullableResponse GetIfExists(string runCommandName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string runCommandName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } - System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } - System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } - } - public partial class MachineRunCommandData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public MachineRunCommandData(Azure.Core.AzureLocation location) { } - public bool? AsyncExecution { get { throw null; } set { } } - public Azure.ResourceManager.HybridCompute.Models.RunCommandManagedIdentity ErrorBlobManagedIdentity { get { throw null; } set { } } - public System.Uri ErrorBlobUri { get { throw null; } set { } } - public Azure.ResourceManager.HybridCompute.Models.MachineRunCommandInstanceView InstanceView { get { throw null; } } - public Azure.ResourceManager.HybridCompute.Models.RunCommandManagedIdentity OutputBlobManagedIdentity { get { throw null; } set { } } - public System.Uri OutputBlobUri { get { throw null; } set { } } - public System.Collections.Generic.IList Parameters { get { throw null; } } - public System.Collections.Generic.IList ProtectedParameters { get { throw null; } } - public string ProvisioningState { get { throw null; } } - public string RunAsPassword { get { throw null; } set { } } - public string RunAsUser { get { throw null; } set { } } - public Azure.ResourceManager.HybridCompute.Models.MachineRunCommandScriptSource Source { get { throw null; } set { } } - public int? TimeoutInSeconds { get { throw null; } set { } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.HybridCompute.MachineRunCommandData 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.HybridCompute.MachineRunCommandData 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 partial class MachineRunCommandResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public static readonly Azure.Core.ResourceType ResourceType; - protected MachineRunCommandResource() { } - public virtual Azure.ResourceManager.HybridCompute.MachineRunCommandData Data { get { throw null; } } - public virtual bool HasData { get { throw null; } } - public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string machineName, string runCommandName) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - 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.HybridCompute.MachineRunCommandData 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.HybridCompute.MachineRunCommandData 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.HybridCompute.MachineRunCommandData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.HybridCompute.MachineRunCommandData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } public partial class NetworkSecurityPerimeterConfigurationCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected NetworkSecurityPerimeterConfigurationCollection() { } @@ -603,6 +528,8 @@ protected NetworkSecurityPerimeterConfigurationResource() { } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string scopeName, string perimeterName) { throw null; } public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation ReconcileForPrivateLinkScope(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ReconcileForPrivateLinkScopeAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } Azure.ResourceManager.HybridCompute.NetworkSecurityPerimeterConfigurationData 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.HybridCompute.NetworkSecurityPerimeterConfigurationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -616,22 +543,18 @@ public partial class MockableHybridComputeArmClient : Azure.ResourceManager.ArmR { protected MockableHybridComputeArmClient() { } public virtual Azure.ResourceManager.HybridCompute.HybridComputeExtensionValueResource GetHybridComputeExtensionValueResource(Azure.Core.ResourceIdentifier id) { throw null; } - public virtual Azure.ResourceManager.HybridCompute.HybridComputeGatewayResource GetHybridComputeGatewayResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.HybridCompute.HybridComputeLicenseProfileResource GetHybridComputeLicenseProfileResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.HybridCompute.HybridComputeLicenseResource GetHybridComputeLicenseResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.HybridCompute.HybridComputeMachineExtensionResource GetHybridComputeMachineExtensionResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.HybridCompute.HybridComputeMachineResource GetHybridComputeMachineResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.HybridCompute.HybridComputePrivateEndpointConnectionResource GetHybridComputePrivateEndpointConnectionResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.HybridCompute.HybridComputePrivateLinkResource GetHybridComputePrivateLinkResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.HybridCompute.HybridComputePrivateLinkScopeResource GetHybridComputePrivateLinkScopeResource(Azure.Core.ResourceIdentifier id) { throw null; } - public virtual Azure.ResourceManager.HybridCompute.MachineRunCommandResource GetMachineRunCommandResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.HybridCompute.NetworkSecurityPerimeterConfigurationResource GetNetworkSecurityPerimeterConfigurationResource(Azure.Core.ResourceIdentifier id) { throw null; } } public partial class MockableHybridComputeResourceGroupResource : Azure.ResourceManager.ArmResource { protected MockableHybridComputeResourceGroupResource() { } - public virtual Azure.Response GetHybridComputeGateway(string gatewayName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetHybridComputeGatewayAsync(string gatewayName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.HybridCompute.HybridComputeGatewayCollection GetHybridComputeGateways() { throw null; } public virtual Azure.Response GetHybridComputeLicense(string licenseName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetHybridComputeLicenseAsync(string licenseName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.HybridCompute.HybridComputeLicenseCollection GetHybridComputeLicenses() { throw null; } @@ -641,8 +564,6 @@ protected MockableHybridComputeResourceGroupResource() { } public virtual Azure.Response GetHybridComputePrivateLinkScope(string scopeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetHybridComputePrivateLinkScopeAsync(string scopeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.HybridCompute.HybridComputePrivateLinkScopeCollection GetHybridComputePrivateLinkScopes() { throw null; } - public virtual Azure.Response UpdateTargetResourceSetting(string baseProvider, string baseResourceType, string baseResourceName, string settingsResourceName, Azure.ResourceManager.HybridCompute.Models.HybridComputeTargetResourceSettings hybridComputeTargetResourceSettings, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateTargetResourceSettingAsync(string baseProvider, string baseResourceType, string baseResourceName, string settingsResourceName, Azure.ResourceManager.HybridCompute.Models.HybridComputeTargetResourceSettings hybridComputeTargetResourceSettings, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public partial class MockableHybridComputeSubscriptionResource : Azure.ResourceManager.ArmResource { @@ -650,8 +571,6 @@ protected MockableHybridComputeSubscriptionResource() { } public virtual Azure.Response GetHybridComputeExtensionValue(Azure.Core.AzureLocation location, string publisher, string extensionType, string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetHybridComputeExtensionValueAsync(Azure.Core.AzureLocation location, string publisher, string extensionType, string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.HybridCompute.HybridComputeExtensionValueCollection GetHybridComputeExtensionValues(Azure.Core.AzureLocation location, string publisher, string extensionType) { throw null; } - public virtual Azure.Pageable GetHybridComputeGateways(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetHybridComputeGatewaysAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetHybridComputeLicenses(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetHybridComputeLicensesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetHybridComputeMachines(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -660,6 +579,8 @@ protected MockableHybridComputeSubscriptionResource() { } public virtual Azure.AsyncPageable GetHybridComputePrivateLinkScopesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetValidationDetailsPrivateLinkScope(Azure.Core.AzureLocation location, string privateLinkScopeId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetValidationDetailsPrivateLinkScopeAsync(Azure.Core.AzureLocation location, string privateLinkScopeId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation ValidateLicenseLicense(Azure.WaitUntil waitUntil, Azure.ResourceManager.HybridCompute.HybridComputeLicenseData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ValidateLicenseLicenseAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.HybridCompute.HybridComputeLicenseData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } } namespace Azure.ResourceManager.HybridCompute.Models @@ -746,15 +667,14 @@ public static partial class ArmHybridComputeModelFactory public static Azure.ResourceManager.HybridCompute.Models.AgentUpgrade AgentUpgrade(string desiredVersion = null, System.Guid? correlationId = default(System.Guid?), bool? isAutomaticUpgradeEnabled = default(bool?), string lastAttemptDesiredVersion = null, System.DateTimeOffset? lastAttemptedOn = default(System.DateTimeOffset?), Azure.ResourceManager.HybridCompute.Models.LastAttemptStatusEnum? lastAttemptStatus = default(Azure.ResourceManager.HybridCompute.Models.LastAttemptStatusEnum?), string lastAttemptMessage = null) { throw null; } public static Azure.ResourceManager.HybridCompute.Models.AvailablePatchCountByClassification AvailablePatchCountByClassification(int? security = default(int?), int? critical = default(int?), int? definition = default(int?), int? updateRollup = default(int?), int? featurePack = default(int?), int? servicePack = default(int?), int? tools = default(int?), int? updates = default(int?), int? other = default(int?)) { throw null; } public static Azure.ResourceManager.HybridCompute.Models.EsuKey EsuKey(string sku = null, int? licenseStatus = default(int?)) { throw null; } - public static Azure.ResourceManager.HybridCompute.Models.ExtensionsResourceStatus ExtensionsResourceStatus(string code = null, Azure.ResourceManager.HybridCompute.Models.ExtensionsStatusLevelType? level = default(Azure.ResourceManager.HybridCompute.Models.ExtensionsStatusLevelType?), string displayStatus = null, string message = null, System.DateTimeOffset? time = default(System.DateTimeOffset?)) { throw null; } public static Azure.ResourceManager.HybridCompute.Models.HybridComputeAccessRule HybridComputeAccessRule(string name = null, Azure.ResourceManager.HybridCompute.Models.HybridComputeAccessRuleDirection? direction = default(Azure.ResourceManager.HybridCompute.Models.HybridComputeAccessRuleDirection?), System.Collections.Generic.IEnumerable addressPrefixes = null) { throw null; } public static Azure.ResourceManager.HybridCompute.Models.HybridComputeConfigurationExtension HybridComputeConfigurationExtension(string publisher = null, string configurationExtensionType = null) { throw null; } public static Azure.ResourceManager.HybridCompute.Models.HybridComputeConnectionDetail HybridComputeConnectionDetail(Azure.Core.ResourceIdentifier id = null, string privateIPAddress = null, string linkIdentifier = null, string groupId = null, string memberName = null) { throw null; } public static Azure.ResourceManager.HybridCompute.HybridComputeExtensionValueData HybridComputeExtensionValueData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string version = null, string extensionType = null, string publisher = null) { throw null; } - public static Azure.ResourceManager.HybridCompute.HybridComputeGatewayData HybridComputeGatewayData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.HybridCompute.Models.HybridComputeProvisioningState? provisioningState = default(Azure.ResourceManager.HybridCompute.Models.HybridComputeProvisioningState?), string gatewayId = null, Azure.ResourceManager.HybridCompute.Models.HybridComputeGatewayType? gatewayType = default(Azure.ResourceManager.HybridCompute.Models.HybridComputeGatewayType?), string gatewayEndpoint = null, System.Collections.Generic.IEnumerable allowedFeatures = null) { throw null; } public static Azure.ResourceManager.HybridCompute.Models.HybridComputeIPAddress HybridComputeIPAddress(string address = null, string ipAddressVersion = null, string subnetAddressPrefix = null) { throw null; } public static Azure.ResourceManager.HybridCompute.HybridComputeLicenseData HybridComputeLicenseData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.HybridCompute.Models.HybridComputeProvisioningState? provisioningState = default(Azure.ResourceManager.HybridCompute.Models.HybridComputeProvisioningState?), System.Guid? tenantId = default(System.Guid?), Azure.ResourceManager.HybridCompute.Models.HybridComputeLicenseType? licenseType = default(Azure.ResourceManager.HybridCompute.Models.HybridComputeLicenseType?), Azure.ResourceManager.HybridCompute.Models.HybridComputeLicenseDetails licenseDetails = null) { throw null; } public static Azure.ResourceManager.HybridCompute.Models.HybridComputeLicenseDetails HybridComputeLicenseDetails(Azure.ResourceManager.HybridCompute.Models.HybridComputeLicenseState? state = default(Azure.ResourceManager.HybridCompute.Models.HybridComputeLicenseState?), Azure.ResourceManager.HybridCompute.Models.HybridComputeLicenseTarget? target = default(Azure.ResourceManager.HybridCompute.Models.HybridComputeLicenseTarget?), Azure.ResourceManager.HybridCompute.Models.HybridComputeLicenseEdition? edition = default(Azure.ResourceManager.HybridCompute.Models.HybridComputeLicenseEdition?), Azure.ResourceManager.HybridCompute.Models.LicenseCoreType? licenseCoreType = default(Azure.ResourceManager.HybridCompute.Models.LicenseCoreType?), int? processors = default(int?), int? assignedLicenses = default(int?), string immutableId = null, System.Collections.Generic.IEnumerable volumeLicenseDetails = null) { throw null; } + public static Azure.ResourceManager.HybridCompute.HybridComputeLicenseProfileData HybridComputeLicenseProfileData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.HybridCompute.Models.HybridComputeProvisioningState? provisioningState = default(Azure.ResourceManager.HybridCompute.Models.HybridComputeProvisioningState?), Azure.ResourceManager.HybridCompute.Models.LicenseProfileSubscriptionStatus? subscriptionStatus = default(Azure.ResourceManager.HybridCompute.Models.LicenseProfileSubscriptionStatus?), Azure.ResourceManager.HybridCompute.Models.LicenseProfileProductType? productType = default(Azure.ResourceManager.HybridCompute.Models.LicenseProfileProductType?), System.DateTimeOffset? enrollmentOn = default(System.DateTimeOffset?), System.DateTimeOffset? billingStartOn = default(System.DateTimeOffset?), System.DateTimeOffset? disenrollmentOn = default(System.DateTimeOffset?), System.DateTimeOffset? billingEndOn = default(System.DateTimeOffset?), Azure.ResponseError error = null, System.Collections.Generic.IEnumerable productFeatures = null, System.Guid? assignedLicenseImmutableId = default(System.Guid?), System.Collections.Generic.IEnumerable esuKeys = null, Azure.ResourceManager.HybridCompute.Models.EsuServerType? serverType = default(Azure.ResourceManager.HybridCompute.Models.EsuServerType?), Azure.ResourceManager.HybridCompute.Models.EsuEligibility? esuEligibility = default(Azure.ResourceManager.HybridCompute.Models.EsuEligibility?), Azure.ResourceManager.HybridCompute.Models.EsuKeyState? esuKeyState = default(Azure.ResourceManager.HybridCompute.Models.EsuKeyState?), string assignedLicense = null, bool? softwareAssuranceCustomer = default(bool?)) { throw null; } public static Azure.ResourceManager.HybridCompute.Models.HybridComputeLinuxConfiguration HybridComputeLinuxConfiguration(Azure.ResourceManager.HybridCompute.Models.AssessmentModeType? assessmentMode = default(Azure.ResourceManager.HybridCompute.Models.AssessmentModeType?), Azure.ResourceManager.HybridCompute.Models.PatchModeType? patchMode = default(Azure.ResourceManager.HybridCompute.Models.PatchModeType?), bool? isHotpatchingEnabled = default(bool?), Azure.ResourceManager.HybridCompute.Models.HybridComputePatchSettingsStatus status = null) { throw null; } public static Azure.ResourceManager.HybridCompute.HybridComputeMachineData HybridComputeMachineData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), System.Collections.Generic.IEnumerable resources = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.HybridCompute.Models.ArcKindEnum? kind = default(Azure.ResourceManager.HybridCompute.Models.ArcKindEnum?), Azure.ResourceManager.HybridCompute.Models.HybridComputeLocation locationData = null, Azure.ResourceManager.HybridCompute.Models.AgentConfiguration agentConfiguration = null, Azure.ResourceManager.HybridCompute.Models.HybridComputeServiceStatuses serviceStatuses = null, string cloudMetadataProvider = null, Azure.ResourceManager.HybridCompute.Models.AgentUpgrade agentUpgrade = null, Azure.ResourceManager.HybridCompute.Models.HybridComputeOSProfile osProfile = null, Azure.ResourceManager.HybridCompute.Models.LicenseProfileMachineInstanceView licenseProfile = null, string provisioningState = null, Azure.ResourceManager.HybridCompute.Models.HybridComputeStatusType? status = default(Azure.ResourceManager.HybridCompute.Models.HybridComputeStatusType?), System.DateTimeOffset? lastStatusChange = default(System.DateTimeOffset?), System.Collections.Generic.IEnumerable errorDetails = null, string agentVersion = null, System.Guid? vmId = default(System.Guid?), string displayName = null, string machineFqdn = null, string clientPublicKey = null, string osName = null, string osVersion = null, string osType = null, System.Guid? vmUuid = default(System.Guid?), System.Collections.Generic.IEnumerable extensions = null, string osSku = null, string osEdition = null, string domainName = null, string adFqdn = null, string dnsFqdn = null, Azure.Core.ResourceIdentifier privateLinkScopeResourceId = null, Azure.Core.ResourceIdentifier parentClusterResourceId = null, string msSqlDiscovered = null, System.Collections.Generic.IReadOnlyDictionary detectedProperties = null, System.Collections.Generic.IEnumerable networkInterfaces = null) { throw null; } public static Azure.ResourceManager.HybridCompute.HybridComputeMachineExtensionData HybridComputeMachineExtensionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.HybridCompute.Models.MachineExtensionProperties properties = null) { throw null; } @@ -772,7 +692,6 @@ public static partial class ArmHybridComputeModelFactory public static Azure.ResourceManager.HybridCompute.Models.HybridComputeProductFeature HybridComputeProductFeature(string name = null, Azure.ResourceManager.HybridCompute.Models.LicenseProfileSubscriptionStatus? subscriptionStatus = default(Azure.ResourceManager.HybridCompute.Models.LicenseProfileSubscriptionStatus?), System.DateTimeOffset? enrollmentOn = default(System.DateTimeOffset?), System.DateTimeOffset? billingStartOn = default(System.DateTimeOffset?), System.DateTimeOffset? disenrollmentOn = default(System.DateTimeOffset?), System.DateTimeOffset? billingEndOn = default(System.DateTimeOffset?), Azure.ResponseError error = null) { throw null; } public static Azure.ResourceManager.HybridCompute.Models.HybridComputeProvisioningIssue HybridComputeProvisioningIssue(string name = null, Azure.ResourceManager.HybridCompute.Models.HybridComputeProvisioningIssueType? issueType = default(Azure.ResourceManager.HybridCompute.Models.HybridComputeProvisioningIssueType?), Azure.ResourceManager.HybridCompute.Models.HybridComputeProvisioningIssueSeverity? severity = default(Azure.ResourceManager.HybridCompute.Models.HybridComputeProvisioningIssueSeverity?), string description = null, System.Collections.Generic.IEnumerable suggestedResourceIds = null, System.Collections.Generic.IEnumerable suggestedAccessRules = null) { throw null; } public static Azure.ResourceManager.HybridCompute.Models.HybridComputeResourceAssociation HybridComputeResourceAssociation(string name = null, Azure.ResourceManager.HybridCompute.Models.HybridComputeAccessMode? accessMode = default(Azure.ResourceManager.HybridCompute.Models.HybridComputeAccessMode?)) { throw null; } - public static Azure.ResourceManager.HybridCompute.Models.HybridComputeTargetResourceSettings HybridComputeTargetResourceSettings(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Guid? tenantId = default(System.Guid?), Azure.Core.ResourceIdentifier gatewayResourceId = null) { throw null; } public static Azure.ResourceManager.HybridCompute.Models.HybridComputeWindowsConfiguration HybridComputeWindowsConfiguration(Azure.ResourceManager.HybridCompute.Models.AssessmentModeType? assessmentMode = default(Azure.ResourceManager.HybridCompute.Models.AssessmentModeType?), Azure.ResourceManager.HybridCompute.Models.PatchModeType? patchMode = default(Azure.ResourceManager.HybridCompute.Models.PatchModeType?), bool? isHotpatchingEnabled = default(bool?), Azure.ResourceManager.HybridCompute.Models.HybridComputePatchSettingsStatus status = null) { throw null; } public static Azure.ResourceManager.HybridCompute.Models.LicenseProfileArmEsuPropertiesWithoutAssignedLicense LicenseProfileArmEsuPropertiesWithoutAssignedLicense(System.Guid? assignedLicenseImmutableId = default(System.Guid?), System.Collections.Generic.IEnumerable esuKeys = null, Azure.ResourceManager.HybridCompute.Models.EsuServerType? serverType = default(Azure.ResourceManager.HybridCompute.Models.EsuServerType?), Azure.ResourceManager.HybridCompute.Models.EsuEligibility? esuEligibility = default(Azure.ResourceManager.HybridCompute.Models.EsuEligibility?), Azure.ResourceManager.HybridCompute.Models.EsuKeyState? esuKeyState = default(Azure.ResourceManager.HybridCompute.Models.EsuKeyState?)) { throw null; } public static Azure.ResourceManager.HybridCompute.Models.LicenseProfileMachineInstanceView LicenseProfileMachineInstanceView(Azure.ResourceManager.HybridCompute.Models.HybridComputeLicenseStatus? licenseStatus = default(Azure.ResourceManager.HybridCompute.Models.HybridComputeLicenseStatus?), string licenseChannel = null, Azure.ResourceManager.HybridCompute.Models.LicenseProfileMachineInstanceViewEsuProperties esuProfile = null, Azure.ResourceManager.HybridCompute.Models.LicenseProfileSubscriptionStatus? subscriptionStatus = default(Azure.ResourceManager.HybridCompute.Models.LicenseProfileSubscriptionStatus?), Azure.ResourceManager.HybridCompute.Models.LicenseProfileProductType? productType = default(Azure.ResourceManager.HybridCompute.Models.LicenseProfileProductType?), System.DateTimeOffset? enrollmentOn = default(System.DateTimeOffset?), System.DateTimeOffset? billingStartOn = default(System.DateTimeOffset?), System.DateTimeOffset? disenrollmentOn = default(System.DateTimeOffset?), System.DateTimeOffset? billingEndOn = default(System.DateTimeOffset?), Azure.ResponseError error = null, System.Collections.Generic.IEnumerable productFeatures = null, bool? isSoftwareAssuranceCustomer = default(bool?)) { throw null; } @@ -782,10 +701,9 @@ public static partial class ArmHybridComputeModelFactory public static Azure.ResourceManager.HybridCompute.Models.MachineExtensionProperties MachineExtensionProperties(string forceUpdateTag = null, string publisher = null, string machineExtensionPropertiesType = null, string typeHandlerVersion = null, bool? enableAutomaticUpgrade = default(bool?), bool? autoUpgradeMinorVersion = default(bool?), System.Collections.Generic.IDictionary settings = null, System.Collections.Generic.IDictionary protectedSettings = null, string provisioningState = null, Azure.ResourceManager.HybridCompute.Models.MachineExtensionInstanceView instanceView = null) { throw null; } public static Azure.ResourceManager.HybridCompute.Models.MachineInstallPatchesContent MachineInstallPatchesContent(System.TimeSpan maximumDuration = default(System.TimeSpan), Azure.ResourceManager.HybridCompute.Models.VmGuestPatchRebootSetting rebootSetting = default(Azure.ResourceManager.HybridCompute.Models.VmGuestPatchRebootSetting), Azure.ResourceManager.HybridCompute.Models.HybridComputeWindowsParameters windowsParameters = null, Azure.ResourceManager.HybridCompute.Models.HybridComputeLinuxParameters linuxParameters = null) { throw null; } public static Azure.ResourceManager.HybridCompute.Models.MachineInstallPatchesResult MachineInstallPatchesResult(Azure.ResourceManager.HybridCompute.Models.MachineOperationStatus? status = default(Azure.ResourceManager.HybridCompute.Models.MachineOperationStatus?), string installationActivityId = null, Azure.ResourceManager.HybridCompute.Models.VmGuestPatchRebootStatus? rebootStatus = default(Azure.ResourceManager.HybridCompute.Models.VmGuestPatchRebootStatus?), bool? maintenanceWindowExceeded = default(bool?), int? excludedPatchCount = default(int?), int? notSelectedPatchCount = default(int?), int? pendingPatchCount = default(int?), int? installedPatchCount = default(int?), int? failedPatchCount = default(int?), System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? lastModifiedOn = default(System.DateTimeOffset?), Azure.ResourceManager.HybridCompute.Models.PatchOperationStartedBy? startedBy = default(Azure.ResourceManager.HybridCompute.Models.PatchOperationStartedBy?), Azure.ResourceManager.HybridCompute.Models.PatchServiceUsed? patchServiceUsed = default(Azure.ResourceManager.HybridCompute.Models.PatchServiceUsed?), Azure.ResourceManager.HybridCompute.Models.HybridComputeOSType? osType = default(Azure.ResourceManager.HybridCompute.Models.HybridComputeOSType?), Azure.ResponseError errorDetails = null) { throw null; } - public static Azure.ResourceManager.HybridCompute.MachineRunCommandData MachineRunCommandData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.HybridCompute.Models.MachineRunCommandScriptSource source = null, System.Collections.Generic.IEnumerable parameters = null, System.Collections.Generic.IEnumerable protectedParameters = null, bool? asyncExecution = default(bool?), string runAsUser = null, string runAsPassword = null, int? timeoutInSeconds = default(int?), System.Uri outputBlobUri = null, System.Uri errorBlobUri = null, Azure.ResourceManager.HybridCompute.Models.RunCommandManagedIdentity outputBlobManagedIdentity = null, Azure.ResourceManager.HybridCompute.Models.RunCommandManagedIdentity errorBlobManagedIdentity = null, string provisioningState = null, Azure.ResourceManager.HybridCompute.Models.MachineRunCommandInstanceView instanceView = null) { throw null; } - public static Azure.ResourceManager.HybridCompute.Models.MachineRunCommandInstanceView MachineRunCommandInstanceView(Azure.ResourceManager.HybridCompute.Models.HybridComputeExecutionState? executionState = default(Azure.ResourceManager.HybridCompute.Models.HybridComputeExecutionState?), string executionMessage = null, int? exitCode = default(int?), string output = null, string error = null, System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), System.Collections.Generic.IEnumerable statuses = null) { throw null; } public static Azure.ResourceManager.HybridCompute.Models.NetworkSecurityPerimeter NetworkSecurityPerimeter(string id = null, string perimeterGuid = null, Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?)) { throw null; } public static Azure.ResourceManager.HybridCompute.NetworkSecurityPerimeterConfigurationData NetworkSecurityPerimeterConfigurationData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string provisioningState = null, System.Collections.Generic.IEnumerable provisioningIssues = null, Azure.ResourceManager.HybridCompute.Models.NetworkSecurityPerimeter networkSecurityPerimeter = null, Azure.ResourceManager.HybridCompute.Models.HybridComputeResourceAssociation resourceAssociation = null, Azure.ResourceManager.HybridCompute.Models.NetworkSecurityPerimeterProfile profile = null) { throw null; } + public static Azure.ResourceManager.HybridCompute.Models.NetworkSecurityPerimeterConfigurationReconcileResult NetworkSecurityPerimeterConfigurationReconcileResult(Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?)) { throw null; } public static Azure.ResourceManager.HybridCompute.Models.NetworkSecurityPerimeterProfile NetworkSecurityPerimeterProfile(string name = null, int? accessRulesVersion = default(int?), System.Collections.Generic.IEnumerable accessRules = null, int? diagnosticSettingsVersion = default(int?), System.Collections.Generic.IEnumerable enabledLogCategories = null) { throw null; } public static Azure.ResourceManager.HybridCompute.Models.PrivateEndpointConnectionDataModel PrivateEndpointConnectionDataModel(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.HybridCompute.Models.HybridComputePrivateEndpointConnectionProperties properties = null) { throw null; } public static Azure.ResourceManager.HybridCompute.Models.PrivateLinkScopeValidationDetails PrivateLinkScopeValidationDetails(Azure.Core.ResourceIdentifier id = null, Azure.ResourceManager.HybridCompute.Models.HybridComputePublicNetworkAccessType? publicNetworkAccess = default(Azure.ResourceManager.HybridCompute.Models.HybridComputePublicNetworkAccessType?), System.Collections.Generic.IEnumerable connectionDetails = null) { throw null; } @@ -894,27 +812,6 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.HybridCompute.Models.EsuServerType left, Azure.ResourceManager.HybridCompute.Models.EsuServerType right) { throw null; } public override string ToString() { throw null; } } - public partial class ExtensionsResourceStatus : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal ExtensionsResourceStatus() { } - public string Code { get { throw null; } } - public string DisplayStatus { get { throw null; } } - public Azure.ResourceManager.HybridCompute.Models.ExtensionsStatusLevelType? Level { get { throw null; } } - public string Message { get { throw null; } } - public System.DateTimeOffset? Time { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.HybridCompute.Models.ExtensionsResourceStatus 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.HybridCompute.Models.ExtensionsResourceStatus 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 enum ExtensionsStatusLevelType - { - Info = 0, - Warning = 1, - Error = 2, - } public partial class ExtensionTargetProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ExtensionTargetProperties() { } @@ -1024,57 +921,6 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer 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; } } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct HybridComputeExecutionState : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public HybridComputeExecutionState(string value) { throw null; } - public static Azure.ResourceManager.HybridCompute.Models.HybridComputeExecutionState Canceled { get { throw null; } } - public static Azure.ResourceManager.HybridCompute.Models.HybridComputeExecutionState Failed { get { throw null; } } - public static Azure.ResourceManager.HybridCompute.Models.HybridComputeExecutionState Pending { get { throw null; } } - public static Azure.ResourceManager.HybridCompute.Models.HybridComputeExecutionState Running { get { throw null; } } - public static Azure.ResourceManager.HybridCompute.Models.HybridComputeExecutionState Succeeded { get { throw null; } } - public static Azure.ResourceManager.HybridCompute.Models.HybridComputeExecutionState TimedOut { get { throw null; } } - public static Azure.ResourceManager.HybridCompute.Models.HybridComputeExecutionState Unknown { get { throw null; } } - public bool Equals(Azure.ResourceManager.HybridCompute.Models.HybridComputeExecutionState other) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override bool Equals(object obj) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.HybridCompute.Models.HybridComputeExecutionState left, Azure.ResourceManager.HybridCompute.Models.HybridComputeExecutionState right) { throw null; } - public static implicit operator Azure.ResourceManager.HybridCompute.Models.HybridComputeExecutionState (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.HybridCompute.Models.HybridComputeExecutionState left, Azure.ResourceManager.HybridCompute.Models.HybridComputeExecutionState right) { throw null; } - public override string ToString() { throw null; } - } - public partial class HybridComputeGatewayPatch : Azure.ResourceManager.HybridCompute.Models.HybridComputeResourceUpdate, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public HybridComputeGatewayPatch() { } - public System.Collections.Generic.IList AllowedFeatures { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.HybridCompute.Models.HybridComputeGatewayPatch 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.HybridCompute.Models.HybridComputeGatewayPatch 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; } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct HybridComputeGatewayType : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public HybridComputeGatewayType(string value) { throw null; } - public static Azure.ResourceManager.HybridCompute.Models.HybridComputeGatewayType Public { get { throw null; } } - public bool Equals(Azure.ResourceManager.HybridCompute.Models.HybridComputeGatewayType other) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override bool Equals(object obj) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.HybridCompute.Models.HybridComputeGatewayType left, Azure.ResourceManager.HybridCompute.Models.HybridComputeGatewayType right) { throw null; } - public static implicit operator Azure.ResourceManager.HybridCompute.Models.HybridComputeGatewayType (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.HybridCompute.Models.HybridComputeGatewayType left, Azure.ResourceManager.HybridCompute.Models.HybridComputeGatewayType right) { throw null; } - public override string ToString() { throw null; } - } public partial class HybridComputeIPAddress : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal HybridComputeIPAddress() { } @@ -1124,6 +970,21 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.HybridCompute.Models.HybridComputeLicenseEdition left, Azure.ResourceManager.HybridCompute.Models.HybridComputeLicenseEdition right) { throw null; } public override string ToString() { throw null; } } + public partial class HybridComputeLicenseProfilePatch : Azure.ResourceManager.HybridCompute.Models.HybridComputeResourceUpdate, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public HybridComputeLicenseProfilePatch() { } + public string AssignedLicense { get { throw null; } set { } } + public System.Collections.Generic.IList ProductFeatures { get { throw null; } } + public Azure.ResourceManager.HybridCompute.Models.LicenseProfileProductType? ProductType { get { throw null; } set { } } + public bool? SoftwareAssuranceCustomer { get { throw null; } set { } } + public Azure.ResourceManager.HybridCompute.Models.LicenseProfileSubscriptionStatusUpdate? SubscriptionStatus { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.HybridCompute.Models.HybridComputeLicenseProfilePatch 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.HybridCompute.Models.HybridComputeLicenseProfilePatch 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; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct HybridComputeLicenseState : System.IEquatable { @@ -1424,6 +1285,18 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer 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 HybridComputeProductFeatureUpdate : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public HybridComputeProductFeatureUpdate() { } + public string Name { get { throw null; } set { } } + public Azure.ResourceManager.HybridCompute.Models.LicenseProfileSubscriptionStatusUpdate? SubscriptionStatus { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.HybridCompute.Models.HybridComputeProductFeatureUpdate 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.HybridCompute.Models.HybridComputeProductFeatureUpdate 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; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct HybridComputeProgramYear : System.IEquatable { @@ -1625,18 +1498,6 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.HybridCompute.Models.HybridComputeStatusType left, Azure.ResourceManager.HybridCompute.Models.HybridComputeStatusType right) { throw null; } public override string ToString() { throw null; } } - public partial class HybridComputeTargetResourceSettings : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public HybridComputeTargetResourceSettings() { } - public Azure.Core.ResourceIdentifier GatewayResourceId { get { throw null; } set { } } - public System.Guid? TenantId { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.HybridCompute.Models.HybridComputeTargetResourceSettings 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.HybridCompute.Models.HybridComputeTargetResourceSettings 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 partial class HybridComputeWindowsConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public HybridComputeWindowsConfiguration() { } @@ -1819,6 +1680,24 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.HybridCompute.Models.LicenseProfileSubscriptionStatus left, Azure.ResourceManager.HybridCompute.Models.LicenseProfileSubscriptionStatus right) { throw null; } public override string ToString() { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct LicenseProfileSubscriptionStatusUpdate : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public LicenseProfileSubscriptionStatusUpdate(string value) { throw null; } + public static Azure.ResourceManager.HybridCompute.Models.LicenseProfileSubscriptionStatusUpdate Disable { get { throw null; } } + public static Azure.ResourceManager.HybridCompute.Models.LicenseProfileSubscriptionStatusUpdate Enable { get { throw null; } } + public bool Equals(Azure.ResourceManager.HybridCompute.Models.LicenseProfileSubscriptionStatusUpdate other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.HybridCompute.Models.LicenseProfileSubscriptionStatusUpdate left, Azure.ResourceManager.HybridCompute.Models.LicenseProfileSubscriptionStatusUpdate right) { throw null; } + public static implicit operator Azure.ResourceManager.HybridCompute.Models.LicenseProfileSubscriptionStatusUpdate (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.HybridCompute.Models.LicenseProfileSubscriptionStatusUpdate left, Azure.ResourceManager.HybridCompute.Models.LicenseProfileSubscriptionStatusUpdate right) { throw null; } + public override string ToString() { throw null; } + } public partial class MachineAssessPatchesResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal MachineAssessPatchesResult() { } @@ -1959,38 +1838,6 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.HybridCompute.Models.MachineOperationStatus left, Azure.ResourceManager.HybridCompute.Models.MachineOperationStatus right) { throw null; } public override string ToString() { throw null; } } - public partial class MachineRunCommandInstanceView : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal MachineRunCommandInstanceView() { } - public System.DateTimeOffset? EndOn { get { throw null; } } - public string Error { get { throw null; } } - public string ExecutionMessage { get { throw null; } } - public Azure.ResourceManager.HybridCompute.Models.HybridComputeExecutionState? ExecutionState { get { throw null; } } - public int? ExitCode { get { throw null; } } - public string Output { get { throw null; } } - public System.DateTimeOffset? StartOn { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Statuses { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.HybridCompute.Models.MachineRunCommandInstanceView 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.HybridCompute.Models.MachineRunCommandInstanceView 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 partial class MachineRunCommandScriptSource : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public MachineRunCommandScriptSource() { } - public string CommandId { get { throw null; } set { } } - public string Script { get { throw null; } set { } } - public System.Uri ScriptUri { get { throw null; } set { } } - public Azure.ResourceManager.HybridCompute.Models.RunCommandManagedIdentity ScriptUriManagedIdentity { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.HybridCompute.Models.MachineRunCommandScriptSource 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.HybridCompute.Models.MachineRunCommandScriptSource 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 partial class NetworkSecurityPerimeter : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal NetworkSecurityPerimeter() { } @@ -2004,6 +1851,17 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer 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 NetworkSecurityPerimeterConfigurationReconcileResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal NetworkSecurityPerimeterConfigurationReconcileResult() { } + public Azure.Core.AzureLocation? Location { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.HybridCompute.Models.NetworkSecurityPerimeterConfigurationReconcileResult 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.HybridCompute.Models.NetworkSecurityPerimeterConfigurationReconcileResult 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 partial class NetworkSecurityPerimeterProfile : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal NetworkSecurityPerimeterProfile() { } @@ -2103,30 +1961,6 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer 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 RunCommandInputParameter : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public RunCommandInputParameter(string name, string value) { } - public string Name { get { throw null; } set { } } - public string Value { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.HybridCompute.Models.RunCommandInputParameter 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.HybridCompute.Models.RunCommandInputParameter 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 partial class RunCommandManagedIdentity : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public RunCommandManagedIdentity() { } - public System.Guid? ClientId { get { throw null; } set { } } - public System.Guid? ObjectId { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.HybridCompute.Models.RunCommandManagedIdentity 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.HybridCompute.Models.RunCommandManagedIdentity 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; } - } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct VmGuestPatchClassificationLinux : System.IEquatable { diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/assets.json b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/assets.json index 1bcd804a8b05..5cb272e590b5 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/assets.json +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/hybridcompute/Azure.ResourceManager.HybridCompute", - "Tag": "net/hybridcompute/Azure.ResourceManager.HybridCompute_2df9be5e7a" + "Tag": "net/hybridcompute/Azure.ResourceManager.HybridCompute_a837b681f8" } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputeExtensionValueCollection.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputeExtensionValueCollection.cs index 2908a212fe8e..f8e957faa251 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputeExtensionValueCollection.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputeExtensionValueCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_HybridComputeExtensionValueCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GETAnExtensionsMetadata() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/extension/ExtensionMetadata_Get.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/extension/ExtensionMetadata_Get.json // this example is just showing the usage of "ExtensionMetadata_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -56,7 +56,7 @@ public async Task Get_GETAnExtensionsMetadata() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GETAnExtensionsMetadata() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/extension/ExtensionMetadata_Get.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/extension/ExtensionMetadata_Get.json // this example is just showing the usage of "ExtensionMetadata_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -88,7 +88,7 @@ public async Task Exists_GETAnExtensionsMetadata() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GETAnExtensionsMetadata() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/extension/ExtensionMetadata_Get.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/extension/ExtensionMetadata_Get.json // this example is just showing the usage of "ExtensionMetadata_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -132,7 +132,7 @@ public async Task GetIfExists_GETAnExtensionsMetadata() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_GETAListOfExtensions() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/extension/ExtensionMetadata_List.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/extension/ExtensionMetadata_List.json // this example is just showing the usage of "ExtensionMetadata_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputeExtensionValueResource.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputeExtensionValueResource.cs index bef2169de97c..4445bb7ae091 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputeExtensionValueResource.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputeExtensionValueResource.cs @@ -19,7 +19,7 @@ public partial class Sample_HybridComputeExtensionValueResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GETAnExtensionsMetadata() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/extension/ExtensionMetadata_Get.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/extension/ExtensionMetadata_Get.json // this example is just showing the usage of "ExtensionMetadata_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputeGatewayCollection.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputeGatewayCollection.cs deleted file mode 100644 index e254f518b504..000000000000 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputeGatewayCollection.cs +++ /dev/null @@ -1,204 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Identity; -using Azure.ResourceManager.HybridCompute.Models; -using Azure.ResourceManager.Resources; - -namespace Azure.ResourceManager.HybridCompute.Samples -{ - public partial class Sample_HybridComputeGatewayCollection - { - // Create or Update a Gateway - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task CreateOrUpdate_CreateOrUpdateAGateway() - { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/gateway/Gateway_CreateOrUpdate.json - // this example is just showing the usage of "Gateways_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "ffd506c8-3415-42d3-9612-fdb423fb17df"; - string resourceGroupName = "myResourceGroup"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this HybridComputeGatewayResource - HybridComputeGatewayCollection collection = resourceGroupResource.GetHybridComputeGateways(); - - // invoke the operation - string gatewayName = "{gatewayName}"; - HybridComputeGatewayData data = new HybridComputeGatewayData(new AzureLocation("eastus2euap")) - { - GatewayType = HybridComputeGatewayType.Public, - AllowedFeatures = -{ -"*" -}, - }; - ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, gatewayName, data); - HybridComputeGatewayResource result = lro.Value; - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - HybridComputeGatewayData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - // Get Gateway - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Get_GetGateway() - { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/gateway/Gateway_Get.json - // this example is just showing the usage of "Gateways_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "ffd506c8-3415-42d3-9612-fdb423fb17df"; - string resourceGroupName = "myResourceGroup"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this HybridComputeGatewayResource - HybridComputeGatewayCollection collection = resourceGroupResource.GetHybridComputeGateways(); - - // invoke the operation - string gatewayName = "{gatewayName}"; - HybridComputeGatewayResource result = await collection.GetAsync(gatewayName); - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - HybridComputeGatewayData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - // Get Gateway - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Exists_GetGateway() - { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/gateway/Gateway_Get.json - // this example is just showing the usage of "Gateways_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "ffd506c8-3415-42d3-9612-fdb423fb17df"; - string resourceGroupName = "myResourceGroup"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this HybridComputeGatewayResource - HybridComputeGatewayCollection collection = resourceGroupResource.GetHybridComputeGateways(); - - // invoke the operation - string gatewayName = "{gatewayName}"; - bool result = await collection.ExistsAsync(gatewayName); - - Console.WriteLine($"Succeeded: {result}"); - } - - // Get Gateway - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetIfExists_GetGateway() - { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/gateway/Gateway_Get.json - // this example is just showing the usage of "Gateways_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "ffd506c8-3415-42d3-9612-fdb423fb17df"; - string resourceGroupName = "myResourceGroup"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this HybridComputeGatewayResource - HybridComputeGatewayCollection collection = resourceGroupResource.GetHybridComputeGateways(); - - // invoke the operation - string gatewayName = "{gatewayName}"; - NullableResponse response = await collection.GetIfExistsAsync(gatewayName); - HybridComputeGatewayResource result = response.HasValue ? response.Value : null; - - if (result == null) - { - Console.WriteLine($"Succeeded with null as result"); - } - else - { - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - HybridComputeGatewayData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - } - - // List Gateways by Resource Group - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetAll_ListGatewaysByResourceGroup() - { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/gateway/Gateway_ListByResourceGroup.json - // this example is just showing the usage of "Gateways_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "ffd506c8-3415-42d3-9612-fdb423fb17df"; - string resourceGroupName = "myResourceGroup"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this HybridComputeGatewayResource - HybridComputeGatewayCollection collection = resourceGroupResource.GetHybridComputeGateways(); - - // invoke the operation and iterate over the result - await foreach (HybridComputeGatewayResource item in collection.GetAllAsync()) - { - // the variable item is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - HybridComputeGatewayData resourceData = item.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - Console.WriteLine($"Succeeded"); - } - } -} diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputeGatewayResource.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputeGatewayResource.cs deleted file mode 100644 index ebb10583a0e1..000000000000 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputeGatewayResource.cs +++ /dev/null @@ -1,147 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Identity; -using Azure.ResourceManager.HybridCompute.Models; -using Azure.ResourceManager.Resources; - -namespace Azure.ResourceManager.HybridCompute.Samples -{ - public partial class Sample_HybridComputeGatewayResource - { - // Update a Gateway - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Update_UpdateAGateway() - { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/gateway/Gateway_Update.json - // this example is just showing the usage of "Gateways_Update" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this HybridComputeGatewayResource created on azure - // for more information of creating HybridComputeGatewayResource, please refer to the document of HybridComputeGatewayResource - string subscriptionId = "ffd506c8-3415-42d3-9612-fdb423fb17df"; - string resourceGroupName = "myResourceGroup"; - string gatewayName = "{gatewayName}"; - ResourceIdentifier hybridComputeGatewayResourceId = HybridComputeGatewayResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, gatewayName); - HybridComputeGatewayResource hybridComputeGateway = client.GetHybridComputeGatewayResource(hybridComputeGatewayResourceId); - - // invoke the operation - HybridComputeGatewayPatch patch = new HybridComputeGatewayPatch() - { - AllowedFeatures = -{ -"*" -}, - }; - HybridComputeGatewayResource result = await hybridComputeGateway.UpdateAsync(patch); - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - HybridComputeGatewayData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - // Get Gateway - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Get_GetGateway() - { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/gateway/Gateway_Get.json - // this example is just showing the usage of "Gateways_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this HybridComputeGatewayResource created on azure - // for more information of creating HybridComputeGatewayResource, please refer to the document of HybridComputeGatewayResource - string subscriptionId = "ffd506c8-3415-42d3-9612-fdb423fb17df"; - string resourceGroupName = "myResourceGroup"; - string gatewayName = "{gatewayName}"; - ResourceIdentifier hybridComputeGatewayResourceId = HybridComputeGatewayResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, gatewayName); - HybridComputeGatewayResource hybridComputeGateway = client.GetHybridComputeGatewayResource(hybridComputeGatewayResourceId); - - // invoke the operation - HybridComputeGatewayResource result = await hybridComputeGateway.GetAsync(); - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - HybridComputeGatewayData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - // Delete a Gateway - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Delete_DeleteAGateway() - { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/gateway/Gateway_Delete.json - // this example is just showing the usage of "Gateways_Delete" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this HybridComputeGatewayResource created on azure - // for more information of creating HybridComputeGatewayResource, please refer to the document of HybridComputeGatewayResource - string subscriptionId = "ffd506c8-3415-42d3-9612-fdb423fb17df"; - string resourceGroupName = "myResourceGroup"; - string gatewayName = "{gatewayName}"; - ResourceIdentifier hybridComputeGatewayResourceId = HybridComputeGatewayResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, gatewayName); - HybridComputeGatewayResource hybridComputeGateway = client.GetHybridComputeGatewayResource(hybridComputeGatewayResourceId); - - // invoke the operation - await hybridComputeGateway.DeleteAsync(WaitUntil.Completed); - - Console.WriteLine($"Succeeded"); - } - - // List Gateways by Subscription - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetHybridComputeGateways_ListGatewaysBySubscription() - { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/gateway/Gateway_ListBySubscription.json - // this example is just showing the usage of "Gateways_ListBySubscription" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this SubscriptionResource created on azure - // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource - string subscriptionId = "ffd506c8-3415-42d3-9612-fdb423fb17df"; - ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); - SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); - - // invoke the operation and iterate over the result - await foreach (HybridComputeGatewayResource item in subscriptionResource.GetHybridComputeGatewaysAsync()) - { - // the variable item is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - HybridComputeGatewayData resourceData = item.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - Console.WriteLine($"Succeeded"); - } - } -} diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputeLicenseCollection.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputeLicenseCollection.cs index d7eef633c8c7..8df0bc2e0400 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputeLicenseCollection.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputeLicenseCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_HybridComputeLicenseCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateALicense() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/license/License_CreateOrUpdate.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/license/License_CreateOrUpdate.json // this example is just showing the usage of "Licenses_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -68,7 +68,7 @@ public async Task CreateOrUpdate_CreateOrUpdateALicense() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetLicense() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/license/License_Get.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/license/License_Get.json // this example is just showing the usage of "Licenses_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -102,7 +102,7 @@ public async Task Get_GetLicense() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetLicense() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/license/License_Get.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/license/License_Get.json // this example is just showing the usage of "Licenses_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -132,7 +132,7 @@ public async Task Exists_GetLicense() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetLicense() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/license/License_Get.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/license/License_Get.json // this example is just showing the usage of "Licenses_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -174,7 +174,7 @@ public async Task GetIfExists_GetLicense() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_GETAllMachineExtensions() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/license/License_ListByResourceGroup.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/license/License_ListByResourceGroup.json // this example is just showing the usage of "Licenses_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputeLicenseProfileResource.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputeLicenseProfileResource.cs new file mode 100644 index 000000000000..56b22593ec0c --- /dev/null +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputeLicenseProfileResource.cs @@ -0,0 +1,170 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.HybridCompute.Models; + +namespace Azure.ResourceManager.HybridCompute.Samples +{ + public partial class Sample_HybridComputeLicenseProfileResource + { + // Create or Update a License Profile + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_CreateOrUpdateALicenseProfile() + { + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/licenseProfile/LicenseProfile_CreateOrUpdate.json + // this example is just showing the usage of "LicenseProfiles_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this HybridComputeLicenseProfileResource created on azure + // for more information of creating HybridComputeLicenseProfileResource, please refer to the document of HybridComputeLicenseProfileResource + string subscriptionId = "{subscriptionId}"; + string resourceGroupName = "myResourceGroup"; + string machineName = "myMachine"; + ResourceIdentifier hybridComputeLicenseProfileResourceId = HybridComputeLicenseProfileResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, machineName); + HybridComputeLicenseProfileResource hybridComputeLicenseProfile = client.GetHybridComputeLicenseProfileResource(hybridComputeLicenseProfileResourceId); + + // invoke the operation + HybridComputeLicenseProfileData data = new HybridComputeLicenseProfileData(new AzureLocation("eastus2euap")) + { + SubscriptionStatus = LicenseProfileSubscriptionStatus.Enabled, + ProductType = LicenseProfileProductType.WindowsServer, + ProductFeatures = +{ +new HybridComputeProductFeature() +{ +Name = "Hotpatch", +SubscriptionStatus = LicenseProfileSubscriptionStatus.Enabled, +} +}, + AssignedLicense = "{LicenseResourceId}", + SoftwareAssuranceCustomer = true, + }; + ArmOperation lro = await hybridComputeLicenseProfile.CreateOrUpdateAsync(WaitUntil.Completed, data); + HybridComputeLicenseProfileResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + HybridComputeLicenseProfileData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Update a License Profile + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_UpdateALicenseProfile() + { + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/licenseProfile/LicenseProfile_Update.json + // this example is just showing the usage of "LicenseProfiles_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this HybridComputeLicenseProfileResource created on azure + // for more information of creating HybridComputeLicenseProfileResource, please refer to the document of HybridComputeLicenseProfileResource + string subscriptionId = "{subscriptionId}"; + string resourceGroupName = "myResourceGroup"; + string machineName = "myMachine"; + ResourceIdentifier hybridComputeLicenseProfileResourceId = HybridComputeLicenseProfileResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, machineName); + HybridComputeLicenseProfileResource hybridComputeLicenseProfile = client.GetHybridComputeLicenseProfileResource(hybridComputeLicenseProfileResourceId); + + // invoke the operation + HybridComputeLicenseProfilePatch patch = new HybridComputeLicenseProfilePatch() + { + SubscriptionStatus = LicenseProfileSubscriptionStatusUpdate.Enable, + ProductType = LicenseProfileProductType.WindowsServer, + ProductFeatures = +{ +new HybridComputeProductFeatureUpdate() +{ +Name = "Hotpatch", +SubscriptionStatus = LicenseProfileSubscriptionStatusUpdate.Enable, +} +}, + AssignedLicense = "{LicenseResourceId}", + SoftwareAssuranceCustomer = true, + }; + ArmOperation lro = await hybridComputeLicenseProfile.UpdateAsync(WaitUntil.Completed, patch); + HybridComputeLicenseProfileResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + HybridComputeLicenseProfileData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Get License Profile + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetLicenseProfile() + { + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/licenseProfile/LicenseProfile_Get.json + // this example is just showing the usage of "LicenseProfiles_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this HybridComputeLicenseProfileResource created on azure + // for more information of creating HybridComputeLicenseProfileResource, please refer to the document of HybridComputeLicenseProfileResource + string subscriptionId = "{subscriptionId}"; + string resourceGroupName = "myResourceGroup"; + string machineName = "myMachine"; + ResourceIdentifier hybridComputeLicenseProfileResourceId = HybridComputeLicenseProfileResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, machineName); + HybridComputeLicenseProfileResource hybridComputeLicenseProfile = client.GetHybridComputeLicenseProfileResource(hybridComputeLicenseProfileResourceId); + + // invoke the operation + HybridComputeLicenseProfileResource result = await hybridComputeLicenseProfile.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + HybridComputeLicenseProfileData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Delete a License Profile + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_DeleteALicenseProfile() + { + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/licenseProfile/LicenseProfile_Delete.json + // this example is just showing the usage of "LicenseProfiles_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this HybridComputeLicenseProfileResource created on azure + // for more information of creating HybridComputeLicenseProfileResource, please refer to the document of HybridComputeLicenseProfileResource + string subscriptionId = "{subscriptionId}"; + string resourceGroupName = "myResourceGroup"; + string machineName = "myMachine"; + ResourceIdentifier hybridComputeLicenseProfileResourceId = HybridComputeLicenseProfileResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, machineName); + HybridComputeLicenseProfileResource hybridComputeLicenseProfile = client.GetHybridComputeLicenseProfileResource(hybridComputeLicenseProfileResourceId); + + // invoke the operation + await hybridComputeLicenseProfile.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine($"Succeeded"); + } + } +} diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputeLicenseResource.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputeLicenseResource.cs index 88669e9d0127..bf021ab01bbb 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputeLicenseResource.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputeLicenseResource.cs @@ -16,12 +16,54 @@ namespace Azure.ResourceManager.HybridCompute.Samples { public partial class Sample_HybridComputeLicenseResource { + // Validate a License + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task ValidateLicenseLicense_ValidateALicense() + { + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/license/License_ValidateLicense.json + // this example is just showing the usage of "Licenses_ValidateLicense" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "{subscriptionId}"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation + HybridComputeLicenseData data = new HybridComputeLicenseData(new AzureLocation("eastus2euap")) + { + LicenseType = HybridComputeLicenseType.Esu, + LicenseDetails = new HybridComputeLicenseDetails() + { + State = HybridComputeLicenseState.Activated, + Target = HybridComputeLicenseTarget.WindowsServer2012, + Edition = HybridComputeLicenseEdition.DataCenter, + LicenseCoreType = LicenseCoreType.PCore, + Processors = 6, + }, + }; + ArmOperation lro = await subscriptionResource.ValidateLicenseLicenseAsync(WaitUntil.Completed, data); + HybridComputeLicenseResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + HybridComputeLicenseData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + // Create or Update a License [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreateOrUpdateALicense() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/license/License_CreateOrUpdate.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/license/License_CreateOrUpdate.json // this example is just showing the usage of "Licenses_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -65,7 +107,7 @@ public async Task Update_CreateOrUpdateALicense() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetLicense() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/license/License_Get.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/license/License_Get.json // this example is just showing the usage of "Licenses_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -96,7 +138,7 @@ public async Task Get_GetLicense() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteALicense() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/license/License_Delete.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/license/License_Delete.json // this example is just showing the usage of "Licenses_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -123,7 +165,7 @@ public async Task Delete_DeleteALicense() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetHybridComputeLicenses_ListLicensesBySubscription() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/license/License_ListBySubscription.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/license/License_ListBySubscription.json // this example is just showing the usage of "Licenses_ListBySubscription" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputeMachineCollection.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputeMachineCollection.cs index 959fcb7422d5..eafa57729bbc 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputeMachineCollection.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputeMachineCollection.cs @@ -9,18 +9,71 @@ using System.Threading.Tasks; using Azure.Core; using Azure.Identity; +using Azure.ResourceManager.HybridCompute.Models; +using Azure.ResourceManager.Models; using Azure.ResourceManager.Resources; namespace Azure.ResourceManager.HybridCompute.Samples { public partial class Sample_HybridComputeMachineCollection { + // Create or Update a Machine + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_CreateOrUpdateAMachine() + { + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/machine/Machines_CreateOrUpdate.json + // this example is just showing the usage of "Machines_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "{subscriptionId}"; + string resourceGroupName = "myResourceGroup"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this HybridComputeMachineResource + HybridComputeMachineCollection collection = resourceGroupResource.GetHybridComputeMachines(); + + // invoke the operation + string machineName = "myMachine"; + HybridComputeMachineData data = new HybridComputeMachineData(new AzureLocation("eastus2euap")) + { + Identity = new ManagedServiceIdentity("SystemAssigned"), + LocationData = new HybridComputeLocation("Redmond"), + OSProfile = new HybridComputeOSProfile() + { + WindowsConfiguration = new HybridComputeWindowsConfiguration() + { + IsHotpatchingEnabled = true, + }, + }, + VmId = Guid.Parse("b7a098cc-b0b8-46e8-a205-62f301a62a8f"), + ClientPublicKey = "string", + PrivateLinkScopeResourceId = new ResourceIdentifier("/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.HybridCompute/privateLinkScopes/privateLinkScopeName"), + ParentClusterResourceId = new ResourceIdentifier("{AzureStackHCIResourceId}"), + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, machineName, data); + HybridComputeMachineResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + HybridComputeMachineData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + // Get Machine [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetMachine() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/machine/Machines_Get.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/machine/Machines_Get.json // this example is just showing the usage of "Machines_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -54,7 +107,7 @@ public async Task Get_GetMachine() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetMachine() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/machine/Machines_Get.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/machine/Machines_Get.json // this example is just showing the usage of "Machines_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -84,7 +137,7 @@ public async Task Exists_GetMachine() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetMachine() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/machine/Machines_Get.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/machine/Machines_Get.json // this example is just showing the usage of "Machines_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -126,7 +179,7 @@ public async Task GetIfExists_GetMachine() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetMachineWithLicenseProfileInstanceView() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/machine/Machines_Get_LicenseProfileInstanceView.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/machine/Machines_Get_LicenseProfileInstanceView.json // this example is just showing the usage of "Machines_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -161,7 +214,7 @@ public async Task Get_GetMachineWithLicenseProfileInstanceView() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetMachineWithLicenseProfileInstanceView() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/machine/Machines_Get_LicenseProfileInstanceView.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/machine/Machines_Get_LicenseProfileInstanceView.json // this example is just showing the usage of "Machines_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -192,7 +245,7 @@ public async Task Exists_GetMachineWithLicenseProfileInstanceView() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetMachineWithLicenseProfileInstanceView() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/machine/Machines_Get_LicenseProfileInstanceView.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/machine/Machines_Get_LicenseProfileInstanceView.json // this example is just showing the usage of "Machines_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -235,7 +288,7 @@ public async Task GetIfExists_GetMachineWithLicenseProfileInstanceView() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListMachinesByResourceGroup() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/machine/Machines_ListByResourceGroup.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/machine/Machines_ListByResourceGroup.json // this example is just showing the usage of "Machines_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputeMachineExtensionCollection.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputeMachineExtensionCollection.cs index 5ce6c15a5c07..41edd2d612b8 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputeMachineExtensionCollection.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputeMachineExtensionCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_HybridComputeMachineExtensionCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateAMachineExtension() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/extension/Extension_CreateOrUpdate.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/extension/Extension_CreateOrUpdate.json // this example is just showing the usage of "MachineExtensions_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -69,7 +69,7 @@ public async Task CreateOrUpdate_CreateOrUpdateAMachineExtension() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GETMachineExtension() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/extension/Extension_Get.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/extension/Extension_Get.json // this example is just showing the usage of "MachineExtensions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -104,7 +104,7 @@ public async Task Get_GETMachineExtension() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GETMachineExtension() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/extension/Extension_Get.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/extension/Extension_Get.json // this example is just showing the usage of "MachineExtensions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -135,7 +135,7 @@ public async Task Exists_GETMachineExtension() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GETMachineExtension() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/extension/Extension_Get.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/extension/Extension_Get.json // this example is just showing the usage of "MachineExtensions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -178,7 +178,7 @@ public async Task GetIfExists_GETMachineExtension() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_GETAllMachineExtensionsList() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/extension/Extension_List.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/extension/Extension_List.json // this example is just showing the usage of "MachineExtensions_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputeMachineExtensionResource.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputeMachineExtensionResource.cs index e4cffeaa76b5..aa32f1802e01 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputeMachineExtensionResource.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputeMachineExtensionResource.cs @@ -20,7 +20,7 @@ public partial class Sample_HybridComputeMachineExtensionResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreateOrUpdateAMachineExtension() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/extension/Extension_Update.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/extension/Extension_Update.json // this example is just showing the usage of "MachineExtensions_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -64,7 +64,7 @@ public async Task Update_CreateOrUpdateAMachineExtension() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteAMachineExtension() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/extension/Extension_Delete.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/extension/Extension_Delete.json // this example is just showing the usage of "MachineExtensions_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -92,7 +92,7 @@ public async Task Delete_DeleteAMachineExtension() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GETMachineExtension() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/extension/Extension_Get.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/extension/Extension_Get.json // this example is just showing the usage of "MachineExtensions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputeMachineResource.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputeMachineResource.cs index 98371ee0cc59..0bd98f2599e0 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputeMachineResource.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputeMachineResource.cs @@ -23,7 +23,7 @@ public partial class Sample_HybridComputeMachineResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdateAMachine() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/machine/Machines_Update.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/machine/Machines_Update.json // this example is just showing the usage of "Machines_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -75,7 +75,7 @@ public async Task Update_UpdateAMachine() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteAMachine() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/machine/Machines_Delete.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/machine/Machines_Delete.json // this example is just showing the usage of "Machines_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -102,7 +102,7 @@ public async Task Delete_DeleteAMachine() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetMachine() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/machine/Machines_Get.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/machine/Machines_Get.json // this example is just showing the usage of "Machines_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -133,7 +133,7 @@ public async Task Get_GetMachine() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetMachineWithLicenseProfileInstanceView() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/machine/Machines_Get_LicenseProfileInstanceView.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/machine/Machines_Get_LicenseProfileInstanceView.json // this example is just showing the usage of "Machines_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -165,7 +165,7 @@ public async Task Get_GetMachineWithLicenseProfileInstanceView() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task AssessPatches_AssessPatchStateOfAMachine() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/machine/Machine_AssessPatches.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/machine/Machine_AssessPatches.json // this example is just showing the usage of "Machines_AssessPatches" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -193,7 +193,7 @@ public async Task AssessPatches_AssessPatchStateOfAMachine() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task InstallPatches_InstallPatchStateOfAMachine() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/machine/Machine_InstallPatches.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/machine/Machine_InstallPatches.json // this example is just showing the usage of "Machines_InstallPatches" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -232,7 +232,7 @@ public async Task InstallPatches_InstallPatchStateOfAMachine() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetHybridComputeMachines_ListMachinesByResourceGroup() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/machine/Machines_ListBySubscription.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/machine/Machines_ListBySubscription.json // this example is just showing the usage of "Machines_ListBySubscription" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -264,7 +264,7 @@ public async Task GetHybridComputeMachines_ListMachinesByResourceGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task UpgradeExtensions_UpgradeMachineExtensions() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/extension/Extensions_Upgrade.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/extension/Extensions_Upgrade.json // this example is just showing the usage of "UpgradeExtensions" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -305,7 +305,7 @@ public async Task UpgradeExtensions_UpgradeMachineExtensions() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetNetworkProfile_GETNetworkProfile() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/NetworkProfile_Get.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/NetworkProfile_Get.json // this example is just showing the usage of "NetworkProfile_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -332,7 +332,7 @@ public async Task GetNetworkProfile_GETNetworkProfile() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetValidationDetailsForMachinePrivateLinkScope_PrivateLinkScopeGet() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/privateLinkScope/PrivateLinkScopes_GetValidationForMachine.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateLinkScope/PrivateLinkScopes_GetValidationForMachine.json // this example is just showing the usage of "PrivateLinkScopes_GetValidationDetailsForMachine" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputePrivateEndpointConnectionCollection.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputePrivateEndpointConnectionCollection.cs index 58f5c8ae798b..9503861fcaa0 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputePrivateEndpointConnectionCollection.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputePrivateEndpointConnectionCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_HybridComputePrivateEndpointConnectionCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetsPrivateEndpointConnection() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/privateEndpoint/PrivateEndpointConnection_Get.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateEndpoint/PrivateEndpointConnection_Get.json // this example is just showing the usage of "PrivateEndpointConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -55,7 +55,7 @@ public async Task Get_GetsPrivateEndpointConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetsPrivateEndpointConnection() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/privateEndpoint/PrivateEndpointConnection_Get.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateEndpoint/PrivateEndpointConnection_Get.json // this example is just showing the usage of "PrivateEndpointConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -86,7 +86,7 @@ public async Task Exists_GetsPrivateEndpointConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetsPrivateEndpointConnection() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/privateEndpoint/PrivateEndpointConnection_Get.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateEndpoint/PrivateEndpointConnection_Get.json // this example is just showing the usage of "PrivateEndpointConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -129,7 +129,7 @@ public async Task GetIfExists_GetsPrivateEndpointConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApproveOrRejectAPrivateEndpointConnectionWithAGivenName() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/privateEndpoint/PrivateEndpointConnection_Update.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateEndpoint/PrivateEndpointConnection_Update.json // this example is just showing the usage of "PrivateEndpointConnections_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -172,7 +172,7 @@ public async Task CreateOrUpdate_ApproveOrRejectAPrivateEndpointConnectionWithAG [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_GetsListOfPrivateEndpointConnectionsOnAPrivateLinkScope() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/privateEndpoint/PrivateEndpointConnection_List.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateEndpoint/PrivateEndpointConnection_List.json // this example is just showing the usage of "PrivateEndpointConnections_ListByPrivateLinkScope" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputePrivateEndpointConnectionResource.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputePrivateEndpointConnectionResource.cs index a7403d83761a..d5388a49cc8e 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputePrivateEndpointConnectionResource.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputePrivateEndpointConnectionResource.cs @@ -20,7 +20,7 @@ public partial class Sample_HybridComputePrivateEndpointConnectionResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetsPrivateEndpointConnection() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/privateEndpoint/PrivateEndpointConnection_Get.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateEndpoint/PrivateEndpointConnection_Get.json // this example is just showing the usage of "PrivateEndpointConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -52,7 +52,7 @@ public async Task Get_GetsPrivateEndpointConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApproveOrRejectAPrivateEndpointConnectionWithAGivenName() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/privateEndpoint/PrivateEndpointConnection_Update.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateEndpoint/PrivateEndpointConnection_Update.json // this example is just showing the usage of "PrivateEndpointConnections_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -92,7 +92,7 @@ public async Task Update_ApproveOrRejectAPrivateEndpointConnectionWithAGivenName [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeletesAPrivateEndpointConnectionWithAGivenName() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/privateEndpoint/PrivateEndpointConnection_Delete.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateEndpoint/PrivateEndpointConnection_Delete.json // this example is just showing the usage of "PrivateEndpointConnections_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputePrivateLinkResource.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputePrivateLinkResource.cs index 96f9b52370d6..a2b061a354a8 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputePrivateLinkResource.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputePrivateLinkResource.cs @@ -19,7 +19,7 @@ public partial class Sample_HybridComputePrivateLinkResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetsPrivateEndpointConnection() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/privateLinkScope/PrivateLinkScopePrivateLinkResource_Get.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateLinkScope/PrivateLinkScopePrivateLinkResource_Get.json // this example is just showing the usage of "PrivateLinkResources_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputePrivateLinkResourceCollection.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputePrivateLinkResourceCollection.cs index 60272471ecf9..42eafc732d2f 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputePrivateLinkResourceCollection.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputePrivateLinkResourceCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_HybridComputePrivateLinkResourceCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_GetsPrivateEndpointConnection() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/privateLinkScope/PrivateLinkScopePrivateLinkResource_ListGet.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateLinkScope/PrivateLinkScopePrivateLinkResource_ListGet.json // this example is just showing the usage of "PrivateLinkResources_ListByPrivateLinkScope" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -56,7 +56,7 @@ public async Task GetAll_GetsPrivateEndpointConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetsPrivateEndpointConnection() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/privateLinkScope/PrivateLinkScopePrivateLinkResource_Get.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateLinkScope/PrivateLinkScopePrivateLinkResource_Get.json // this example is just showing the usage of "PrivateLinkResources_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -91,7 +91,7 @@ public async Task Get_GetsPrivateEndpointConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetsPrivateEndpointConnection() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/privateLinkScope/PrivateLinkScopePrivateLinkResource_Get.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateLinkScope/PrivateLinkScopePrivateLinkResource_Get.json // this example is just showing the usage of "PrivateLinkResources_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -122,7 +122,7 @@ public async Task Exists_GetsPrivateEndpointConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetsPrivateEndpointConnection() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/privateLinkScope/PrivateLinkScopePrivateLinkResource_Get.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateLinkScope/PrivateLinkScopePrivateLinkResource_Get.json // this example is just showing the usage of "PrivateLinkResources_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputePrivateLinkScopeCollection.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputePrivateLinkScopeCollection.cs index 161dd96e3778..a38b565cb12e 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputePrivateLinkScopeCollection.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputePrivateLinkScopeCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_HybridComputePrivateLinkScopeCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_PrivateLinkScopeListByResourceGroup() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/privateLinkScope/PrivateLinkScopes_ListByResourceGroup.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateLinkScope/PrivateLinkScopes_ListByResourceGroup.json // this example is just showing the usage of "PrivateLinkScopes_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -56,7 +56,7 @@ public async Task GetAll_PrivateLinkScopeListByResourceGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_PrivateLinkScopeGet() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/privateLinkScope/PrivateLinkScopes_Get.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateLinkScope/PrivateLinkScopes_Get.json // this example is just showing the usage of "PrivateLinkScopes_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -90,7 +90,7 @@ public async Task Get_PrivateLinkScopeGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_PrivateLinkScopeGet() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/privateLinkScope/PrivateLinkScopes_Get.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateLinkScope/PrivateLinkScopes_Get.json // this example is just showing the usage of "PrivateLinkScopes_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -120,7 +120,7 @@ public async Task Exists_PrivateLinkScopeGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_PrivateLinkScopeGet() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/privateLinkScope/PrivateLinkScopes_Get.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateLinkScope/PrivateLinkScopes_Get.json // this example is just showing the usage of "PrivateLinkScopes_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -162,7 +162,7 @@ public async Task GetIfExists_PrivateLinkScopeGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_PrivateLinkScopeCreate() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/privateLinkScope/PrivateLinkScopes_Create.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateLinkScope/PrivateLinkScopes_Create.json // this example is just showing the usage of "PrivateLinkScopes_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -198,7 +198,7 @@ public async Task CreateOrUpdate_PrivateLinkScopeCreate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_PrivateLinkScopeUpdate() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/privateLinkScope/PrivateLinkScopes_Update.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateLinkScope/PrivateLinkScopes_Update.json // this example is just showing the usage of "PrivateLinkScopes_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputePrivateLinkScopeResource.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputePrivateLinkScopeResource.cs index 72268c0d432f..9158ce350ab0 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputePrivateLinkScopeResource.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputePrivateLinkScopeResource.cs @@ -21,7 +21,7 @@ public partial class Sample_HybridComputePrivateLinkScopeResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetHybridComputePrivateLinkScopes_PrivateLinkScopesListJson() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/privateLinkScope/PrivateLinkScopes_List.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateLinkScope/PrivateLinkScopes_List.json // this example is just showing the usage of "PrivateLinkScopes_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -53,7 +53,7 @@ public async Task GetHybridComputePrivateLinkScopes_PrivateLinkScopesListJson() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_PrivateLinkScopesDelete() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/privateLinkScope/PrivateLinkScopes_Delete.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateLinkScope/PrivateLinkScopes_Delete.json // this example is just showing the usage of "PrivateLinkScopes_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -80,7 +80,7 @@ public async Task Delete_PrivateLinkScopesDelete() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_PrivateLinkScopeGet() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/privateLinkScope/PrivateLinkScopes_Get.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateLinkScope/PrivateLinkScopes_Get.json // this example is just showing the usage of "PrivateLinkScopes_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -111,7 +111,7 @@ public async Task Get_PrivateLinkScopeGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_PrivateLinkScopeUpdateTagsOnly() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/privateLinkScope/PrivateLinkScopes_UpdateTagsOnly.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateLinkScope/PrivateLinkScopes_UpdateTagsOnly.json // this example is just showing the usage of "PrivateLinkScopes_UpdateTags" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -150,7 +150,7 @@ public async Task Update_PrivateLinkScopeUpdateTagsOnly() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetValidationDetailsPrivateLinkScope_PrivateLinkScopeGet() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/privateLinkScope/PrivateLinkScopes_GetValidation.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateLinkScope/PrivateLinkScopes_GetValidation.json // this example is just showing the usage of "PrivateLinkScopes_GetValidationDetails" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_MachineRunCommandCollection.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_MachineRunCommandCollection.cs deleted file mode 100644 index 6a33a25bedc1..000000000000 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_MachineRunCommandCollection.cs +++ /dev/null @@ -1,217 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Identity; -using Azure.ResourceManager.HybridCompute.Models; - -namespace Azure.ResourceManager.HybridCompute.Samples -{ - public partial class Sample_MachineRunCommandCollection - { - // Create or Update a Run Command - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task CreateOrUpdate_CreateOrUpdateARunCommand() - { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/runCommand/RunCommands_CreateOrUpdate.json - // this example is just showing the usage of "MachineRunCommands_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this HybridComputeMachineResource created on azure - // for more information of creating HybridComputeMachineResource, please refer to the document of HybridComputeMachineResource - string subscriptionId = "{subscriptionId}"; - string resourceGroupName = "myResourceGroup"; - string machineName = "myMachine"; - ResourceIdentifier hybridComputeMachineResourceId = HybridComputeMachineResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, machineName); - HybridComputeMachineResource hybridComputeMachine = client.GetHybridComputeMachineResource(hybridComputeMachineResourceId); - - // get the collection of this MachineRunCommandResource - MachineRunCommandCollection collection = hybridComputeMachine.GetMachineRunCommands(); - - // invoke the operation - string runCommandName = "myRunCommand"; - MachineRunCommandData data = new MachineRunCommandData(new AzureLocation("eastus2")) - { - Source = new MachineRunCommandScriptSource() - { - Script = "Write-Host Hello World!", - }, - Parameters = -{ -new RunCommandInputParameter("param1","value1"),new RunCommandInputParameter("param2","value2") -}, - AsyncExecution = false, - RunAsUser = "user1", - RunAsPassword = "", - TimeoutInSeconds = 3600, - OutputBlobUri = new Uri("https://mystorageaccount.blob.core.windows.net/myscriptoutputcontainer/MyScriptoutput.txt"), - ErrorBlobUri = new Uri("https://mystorageaccount.blob.core.windows.net/mycontainer/MyScriptError.txt"), - }; - ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, runCommandName, data); - MachineRunCommandResource result = lro.Value; - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - MachineRunCommandData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - // Get a Run Command - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Get_GetARunCommand() - { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/runCommand/RunCommands_Get.json - // this example is just showing the usage of "MachineRunCommands_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this HybridComputeMachineResource created on azure - // for more information of creating HybridComputeMachineResource, please refer to the document of HybridComputeMachineResource - string subscriptionId = "{subscriptionId}"; - string resourceGroupName = "myResourceGroup"; - string machineName = "myMachine"; - ResourceIdentifier hybridComputeMachineResourceId = HybridComputeMachineResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, machineName); - HybridComputeMachineResource hybridComputeMachine = client.GetHybridComputeMachineResource(hybridComputeMachineResourceId); - - // get the collection of this MachineRunCommandResource - MachineRunCommandCollection collection = hybridComputeMachine.GetMachineRunCommands(); - - // invoke the operation - string runCommandName = "myRunCommand"; - MachineRunCommandResource result = await collection.GetAsync(runCommandName); - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - MachineRunCommandData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - // Get a Run Command - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Exists_GetARunCommand() - { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/runCommand/RunCommands_Get.json - // this example is just showing the usage of "MachineRunCommands_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this HybridComputeMachineResource created on azure - // for more information of creating HybridComputeMachineResource, please refer to the document of HybridComputeMachineResource - string subscriptionId = "{subscriptionId}"; - string resourceGroupName = "myResourceGroup"; - string machineName = "myMachine"; - ResourceIdentifier hybridComputeMachineResourceId = HybridComputeMachineResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, machineName); - HybridComputeMachineResource hybridComputeMachine = client.GetHybridComputeMachineResource(hybridComputeMachineResourceId); - - // get the collection of this MachineRunCommandResource - MachineRunCommandCollection collection = hybridComputeMachine.GetMachineRunCommands(); - - // invoke the operation - string runCommandName = "myRunCommand"; - bool result = await collection.ExistsAsync(runCommandName); - - Console.WriteLine($"Succeeded: {result}"); - } - - // Get a Run Command - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetIfExists_GetARunCommand() - { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/runCommand/RunCommands_Get.json - // this example is just showing the usage of "MachineRunCommands_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this HybridComputeMachineResource created on azure - // for more information of creating HybridComputeMachineResource, please refer to the document of HybridComputeMachineResource - string subscriptionId = "{subscriptionId}"; - string resourceGroupName = "myResourceGroup"; - string machineName = "myMachine"; - ResourceIdentifier hybridComputeMachineResourceId = HybridComputeMachineResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, machineName); - HybridComputeMachineResource hybridComputeMachine = client.GetHybridComputeMachineResource(hybridComputeMachineResourceId); - - // get the collection of this MachineRunCommandResource - MachineRunCommandCollection collection = hybridComputeMachine.GetMachineRunCommands(); - - // invoke the operation - string runCommandName = "myRunCommand"; - NullableResponse response = await collection.GetIfExistsAsync(runCommandName); - MachineRunCommandResource result = response.HasValue ? response.Value : null; - - if (result == null) - { - Console.WriteLine($"Succeeded with null as result"); - } - else - { - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - MachineRunCommandData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - } - - // GET all Machine Run Commands - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetAll_GETAllMachineRunCommands() - { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/runCommand/RunCommands_List.json - // this example is just showing the usage of "MachineRunCommands_List" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this HybridComputeMachineResource created on azure - // for more information of creating HybridComputeMachineResource, please refer to the document of HybridComputeMachineResource - string subscriptionId = "{subscriptionId}"; - string resourceGroupName = "myResourceGroup"; - string machineName = "myMachine"; - ResourceIdentifier hybridComputeMachineResourceId = HybridComputeMachineResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, machineName); - HybridComputeMachineResource hybridComputeMachine = client.GetHybridComputeMachineResource(hybridComputeMachineResourceId); - - // get the collection of this MachineRunCommandResource - MachineRunCommandCollection collection = hybridComputeMachine.GetMachineRunCommands(); - - // invoke the operation and iterate over the result - await foreach (MachineRunCommandResource item in collection.GetAllAsync()) - { - // the variable item is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - MachineRunCommandData resourceData = item.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - Console.WriteLine($"Succeeded"); - } - } -} diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_MachineRunCommandResource.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_MachineRunCommandResource.cs deleted file mode 100644 index 54a5b34be746..000000000000 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_MachineRunCommandResource.cs +++ /dev/null @@ -1,128 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Identity; -using Azure.ResourceManager.HybridCompute.Models; - -namespace Azure.ResourceManager.HybridCompute.Samples -{ - public partial class Sample_MachineRunCommandResource - { - // Create or Update a Run Command - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Update_CreateOrUpdateARunCommand() - { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/runCommand/RunCommands_CreateOrUpdate.json - // this example is just showing the usage of "MachineRunCommands_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this MachineRunCommandResource created on azure - // for more information of creating MachineRunCommandResource, please refer to the document of MachineRunCommandResource - string subscriptionId = "{subscriptionId}"; - string resourceGroupName = "myResourceGroup"; - string machineName = "myMachine"; - string runCommandName = "myRunCommand"; - ResourceIdentifier machineRunCommandResourceId = MachineRunCommandResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, machineName, runCommandName); - MachineRunCommandResource machineRunCommand = client.GetMachineRunCommandResource(machineRunCommandResourceId); - - // invoke the operation - MachineRunCommandData data = new MachineRunCommandData(new AzureLocation("eastus2")) - { - Source = new MachineRunCommandScriptSource() - { - Script = "Write-Host Hello World!", - }, - Parameters = -{ -new RunCommandInputParameter("param1","value1"),new RunCommandInputParameter("param2","value2") -}, - AsyncExecution = false, - RunAsUser = "user1", - RunAsPassword = "", - TimeoutInSeconds = 3600, - OutputBlobUri = new Uri("https://mystorageaccount.blob.core.windows.net/myscriptoutputcontainer/MyScriptoutput.txt"), - ErrorBlobUri = new Uri("https://mystorageaccount.blob.core.windows.net/mycontainer/MyScriptError.txt"), - }; - ArmOperation lro = await machineRunCommand.UpdateAsync(WaitUntil.Completed, data); - MachineRunCommandResource result = lro.Value; - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - MachineRunCommandData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - // Delete a Machine Run Command - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Delete_DeleteAMachineRunCommand() - { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/runCommand/RunCommands_Delete.json - // this example is just showing the usage of "MachineRunCommands_Delete" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this MachineRunCommandResource created on azure - // for more information of creating MachineRunCommandResource, please refer to the document of MachineRunCommandResource - string subscriptionId = "{subscriptionId}"; - string resourceGroupName = "myResourceGroup"; - string machineName = "myMachine"; - string runCommandName = "myRunCommand"; - ResourceIdentifier machineRunCommandResourceId = MachineRunCommandResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, machineName, runCommandName); - MachineRunCommandResource machineRunCommand = client.GetMachineRunCommandResource(machineRunCommandResourceId); - - // invoke the operation - await machineRunCommand.DeleteAsync(WaitUntil.Completed); - - Console.WriteLine($"Succeeded"); - } - - // Get a Run Command - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Get_GetARunCommand() - { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/runCommand/RunCommands_Get.json - // this example is just showing the usage of "MachineRunCommands_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this MachineRunCommandResource created on azure - // for more information of creating MachineRunCommandResource, please refer to the document of MachineRunCommandResource - string subscriptionId = "{subscriptionId}"; - string resourceGroupName = "myResourceGroup"; - string machineName = "myMachine"; - string runCommandName = "myRunCommand"; - ResourceIdentifier machineRunCommandResourceId = MachineRunCommandResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, machineName, runCommandName); - MachineRunCommandResource machineRunCommand = client.GetMachineRunCommandResource(machineRunCommandResourceId); - - // invoke the operation - MachineRunCommandResource result = await machineRunCommand.GetAsync(); - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - MachineRunCommandData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - } -} diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_NetworkSecurityPerimeterConfigurationCollection.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_NetworkSecurityPerimeterConfigurationCollection.cs index aaf9fa758c93..e98a93811787 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_NetworkSecurityPerimeterConfigurationCollection.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_NetworkSecurityPerimeterConfigurationCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_NetworkSecurityPerimeterConfigurationCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetsTheNetworkSecurityPerimeterConfigurationOfThePrivateLinkScope() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/networkSecurityPerimeterConfiguration/NetworkSecurityPerimeterConfigurationGet.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/networkSecurityPerimeterConfiguration/NetworkSecurityPerimeterConfigurationGet.json // this example is just showing the usage of "NetworkSecurityPerimeterConfigurations_GetByPrivateLinkScope" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -54,7 +54,7 @@ public async Task Get_GetsTheNetworkSecurityPerimeterConfigurationOfThePrivateLi [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetsTheNetworkSecurityPerimeterConfigurationOfThePrivateLinkScope() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/networkSecurityPerimeterConfiguration/NetworkSecurityPerimeterConfigurationGet.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/networkSecurityPerimeterConfiguration/NetworkSecurityPerimeterConfigurationGet.json // this example is just showing the usage of "NetworkSecurityPerimeterConfigurations_GetByPrivateLinkScope" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -85,7 +85,7 @@ public async Task Exists_GetsTheNetworkSecurityPerimeterConfigurationOfThePrivat [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetsTheNetworkSecurityPerimeterConfigurationOfThePrivateLinkScope() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/networkSecurityPerimeterConfiguration/NetworkSecurityPerimeterConfigurationGet.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/networkSecurityPerimeterConfiguration/NetworkSecurityPerimeterConfigurationGet.json // this example is just showing the usage of "NetworkSecurityPerimeterConfigurations_GetByPrivateLinkScope" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -128,7 +128,7 @@ public async Task GetIfExists_GetsTheNetworkSecurityPerimeterConfigurationOfTheP [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_GetsTheListOfNetworkSecurityPerimeterConfigurationsOfThePrivateLinkScope() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/networkSecurityPerimeterConfiguration/NetworkSecurityPerimeterConfigurationList.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/networkSecurityPerimeterConfiguration/NetworkSecurityPerimeterConfigurationList.json // this example is just showing the usage of "NetworkSecurityPerimeterConfigurations_ListByPrivateLinkScope" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_NetworkSecurityPerimeterConfigurationResource.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_NetworkSecurityPerimeterConfigurationResource.cs index e33394f7fccc..64e73817261e 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_NetworkSecurityPerimeterConfigurationResource.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_NetworkSecurityPerimeterConfigurationResource.cs @@ -9,6 +9,7 @@ using System.Threading.Tasks; using Azure.Core; using Azure.Identity; +using Azure.ResourceManager.HybridCompute.Models; namespace Azure.ResourceManager.HybridCompute.Samples { @@ -19,7 +20,7 @@ public partial class Sample_NetworkSecurityPerimeterConfigurationResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetsTheNetworkSecurityPerimeterConfigurationOfThePrivateLinkScope() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/networkSecurityPerimeterConfiguration/NetworkSecurityPerimeterConfigurationGet.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/networkSecurityPerimeterConfiguration/NetworkSecurityPerimeterConfigurationGet.json // this example is just showing the usage of "NetworkSecurityPerimeterConfigurations_GetByPrivateLinkScope" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -45,5 +46,34 @@ public async Task Get_GetsTheNetworkSecurityPerimeterConfigurationOfThePrivateLi // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } + + // Reconciles the network security perimeter configuration of the private link scope. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task ReconcileForPrivateLinkScope_ReconcilesTheNetworkSecurityPerimeterConfigurationOfThePrivateLinkScope() + { + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/networkSecurityPerimeterConfiguration/NetworkSecurityPerimeterConfigurationReconcile.json + // this example is just showing the usage of "NetworkSecurityPerimeterConfigurations_ReconcileForPrivateLinkScope" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetworkSecurityPerimeterConfigurationResource created on azure + // for more information of creating NetworkSecurityPerimeterConfigurationResource, please refer to the document of NetworkSecurityPerimeterConfigurationResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "my-resource-group"; + string scopeName = "my-privatelinkscope"; + string perimeterName = "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee.myAssociation"; + ResourceIdentifier networkSecurityPerimeterConfigurationResourceId = NetworkSecurityPerimeterConfigurationResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, scopeName, perimeterName); + NetworkSecurityPerimeterConfigurationResource networkSecurityPerimeterConfiguration = client.GetNetworkSecurityPerimeterConfigurationResource(networkSecurityPerimeterConfigurationResourceId); + + // invoke the operation + ArmOperation lro = await networkSecurityPerimeterConfiguration.ReconcileForPrivateLinkScopeAsync(WaitUntil.Completed); + NetworkSecurityPerimeterConfigurationReconcileResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } } } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_ResourceGroupResourceExtensions.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_ResourceGroupResourceExtensions.cs deleted file mode 100644 index 447dfa679376..000000000000 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_ResourceGroupResourceExtensions.cs +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Identity; -using Azure.ResourceManager.HybridCompute.Models; -using Azure.ResourceManager.Resources; - -namespace Azure.ResourceManager.HybridCompute.Samples -{ - public partial class Sample_ResourceGroupResourceExtensions - { - // SettingsUpdate - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task UpdateTargetResourceSetting_SettingsUpdate() - { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/settings/SettingsUpdate.json - // this example is just showing the usage of "Settings_Update" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "00000000-1111-2222-3333-444444444444"; - string resourceGroupName = "hybridRG"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // invoke the operation - string baseProvider = "Microsoft.HybridCompute"; - string baseResourceType = "machines"; - string baseResourceName = "testMachine"; - string settingsResourceName = "default"; - HybridComputeTargetResourceSettings hybridComputeTargetResourceSettings = new HybridComputeTargetResourceSettings() - { - GatewayResourceId = new ResourceIdentifier("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/hybridRG/providers/Microsoft.HybridCompute/gateways/newGateway"), - }; - HybridComputeTargetResourceSettings result = await resourceGroupResource.UpdateTargetResourceSettingAsync(baseProvider, baseResourceType, baseResourceName, settingsResourceName, hybridComputeTargetResourceSettings); - - Console.WriteLine($"Succeeded: {result}"); - } - } -} diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Azure.ResourceManager.HybridCompute.csproj b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Azure.ResourceManager.HybridCompute.csproj index be1444282e50..5466203c4d71 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Azure.ResourceManager.HybridCompute.csproj +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Azure.ResourceManager.HybridCompute.csproj @@ -1,6 +1,8 @@ - 1.0.0-beta.11 + 1.1.0-beta.1 + + 1.0.0 Azure.ResourceManager.HybridCompute Microsoft Azure Resource Manager client SDK for Azure resource provider Microsoft.HybridCompute. azure;management;arm;resource manager;hybridcompute diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/ArmHybridComputeModelFactory.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/ArmHybridComputeModelFactory.cs index 474aa1f9274b..d7776820c59c 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/ArmHybridComputeModelFactory.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/ArmHybridComputeModelFactory.cs @@ -72,69 +72,6 @@ public static HybridComputeLicenseDetails HybridComputeLicenseDetails(HybridComp serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// Specifies the host OS name of the hybrid machine. - /// Specifies the windows configuration for update management. - /// Specifies the linux configuration for update management. - /// A new instance for mocking. - public static HybridComputeOSProfile HybridComputeOSProfile(string computerName = null, HybridComputeWindowsConfiguration windowsConfiguration = null, HybridComputeLinuxConfiguration linuxConfiguration = null) - { - return new HybridComputeOSProfile(computerName, windowsConfiguration, linuxConfiguration, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// Specifies the assessment mode. - /// Specifies the patch mode. - /// Captures the hotpatch capability enrollment intent of the customers, which enables customers to patch their Windows machines without requiring a reboot. - /// Status of the hotpatch capability enrollment or disenrollment. - /// A new instance for mocking. - public static HybridComputeWindowsConfiguration HybridComputeWindowsConfiguration(AssessmentModeType? assessmentMode = null, PatchModeType? patchMode = null, bool? isHotpatchingEnabled = null, HybridComputePatchSettingsStatus status = null) - { - return new HybridComputeWindowsConfiguration(assessmentMode, patchMode, isHotpatchingEnabled, status, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// Indicates the current status of the hotpatch being enabled or disabled. - /// The errors that were encountered during the hotpatch capability enrollment or disenrollment. - /// A new instance for mocking. - public static HybridComputePatchSettingsStatus HybridComputePatchSettingsStatus(HotpatchEnablementStatus? hotpatchEnablementStatus = null, ResponseError error = null) - { - return new HybridComputePatchSettingsStatus(hotpatchEnablementStatus, error, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// Specifies the assessment mode. - /// Specifies the patch mode. - /// Captures the hotpatch capability enrollment intent of the customers, which enables customers to patch their Windows machines without requiring a reboot. - /// Status of the hotpatch capability enrollment or disenrollment. - /// A new instance for mocking. - public static HybridComputeLinuxConfiguration HybridComputeLinuxConfiguration(AssessmentModeType? assessmentMode = null, PatchModeType? patchMode = null, bool? isHotpatchingEnabled = null, HybridComputePatchSettingsStatus status = null) - { - return new HybridComputeLinuxConfiguration(assessmentMode, patchMode, isHotpatchingEnabled, status, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// Specifies the version info w.r.t AgentUpgrade for the machine. - /// The correlation ID passed in from RSM per upgrade. - /// Specifies if RSM should try to upgrade this machine. - /// Specifies the version of the last attempt. - /// Timestamp of last upgrade attempt. - /// Specifies the status of Agent Upgrade. - /// Failure message of last upgrade attempt if any. - /// A new instance for mocking. - public static AgentUpgrade AgentUpgrade(string desiredVersion = null, Guid? correlationId = null, bool? isAutomaticUpgradeEnabled = null, string lastAttemptDesiredVersion = null, DateTimeOffset? lastAttemptedOn = null, LastAttemptStatusEnum? lastAttemptStatus = null, string lastAttemptMessage = null) - { - return new AgentUpgrade( - desiredVersion, - correlationId, - isAutomaticUpgradeEnabled, - lastAttemptDesiredVersion, - lastAttemptedOn, - lastAttemptStatus, - lastAttemptMessage, - serializedAdditionalRawData: null); - } - /// Initializes a new instance of . /// The id. /// The name. @@ -268,6 +205,69 @@ public static HybridComputeConfigurationExtension HybridComputeConfigurationExte return new HybridComputeConfigurationExtension(publisher, configurationExtensionType, serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// Specifies the version info w.r.t AgentUpgrade for the machine. + /// The correlation ID passed in from RSM per upgrade. + /// Specifies if RSM should try to upgrade this machine. + /// Specifies the version of the last attempt. + /// Timestamp of last upgrade attempt. + /// Specifies the status of Agent Upgrade. + /// Failure message of last upgrade attempt if any. + /// A new instance for mocking. + public static AgentUpgrade AgentUpgrade(string desiredVersion = null, Guid? correlationId = null, bool? isAutomaticUpgradeEnabled = null, string lastAttemptDesiredVersion = null, DateTimeOffset? lastAttemptedOn = null, LastAttemptStatusEnum? lastAttemptStatus = null, string lastAttemptMessage = null) + { + return new AgentUpgrade( + desiredVersion, + correlationId, + isAutomaticUpgradeEnabled, + lastAttemptDesiredVersion, + lastAttemptedOn, + lastAttemptStatus, + lastAttemptMessage, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Specifies the host OS name of the hybrid machine. + /// Specifies the windows configuration for update management. + /// Specifies the linux configuration for update management. + /// A new instance for mocking. + public static HybridComputeOSProfile HybridComputeOSProfile(string computerName = null, HybridComputeWindowsConfiguration windowsConfiguration = null, HybridComputeLinuxConfiguration linuxConfiguration = null) + { + return new HybridComputeOSProfile(computerName, windowsConfiguration, linuxConfiguration, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Specifies the assessment mode. + /// Specifies the patch mode. + /// Captures the hotpatch capability enrollment intent of the customers, which enables customers to patch their Windows machines without requiring a reboot. + /// Status of the hotpatch capability enrollment or disenrollment. + /// A new instance for mocking. + public static HybridComputeWindowsConfiguration HybridComputeWindowsConfiguration(AssessmentModeType? assessmentMode = null, PatchModeType? patchMode = null, bool? isHotpatchingEnabled = null, HybridComputePatchSettingsStatus status = null) + { + return new HybridComputeWindowsConfiguration(assessmentMode, patchMode, isHotpatchingEnabled, status, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Indicates the current status of the hotpatch being enabled or disabled. + /// The errors that were encountered during the hotpatch capability enrollment or disenrollment. + /// A new instance for mocking. + public static HybridComputePatchSettingsStatus HybridComputePatchSettingsStatus(HotpatchEnablementStatus? hotpatchEnablementStatus = null, ResponseError error = null) + { + return new HybridComputePatchSettingsStatus(hotpatchEnablementStatus, error, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Specifies the assessment mode. + /// Specifies the patch mode. + /// Captures the hotpatch capability enrollment intent of the customers, which enables customers to patch their Windows machines without requiring a reboot. + /// Status of the hotpatch capability enrollment or disenrollment. + /// A new instance for mocking. + public static HybridComputeLinuxConfiguration HybridComputeLinuxConfiguration(AssessmentModeType? assessmentMode = null, PatchModeType? patchMode = null, bool? isHotpatchingEnabled = null, HybridComputePatchSettingsStatus status = null) + { + return new HybridComputeLinuxConfiguration(assessmentMode, patchMode, isHotpatchingEnabled, status, serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// Indicates the license status of the OS. /// Indicates the license channel. @@ -473,6 +473,62 @@ public static MachineExtensionProperties MachineExtensionProperties(string force serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The provisioning state, which only appears in the response. + /// Indicates the subscription status of the product. + /// Indicates the product type of the license. + /// The timestamp in UTC when the user enrolls the feature. + /// The timestamp in UTC when the billing starts. + /// The timestamp in UTC when the user disenrolled the feature. + /// The timestamp in UTC when the billing ends. + /// The errors that were encountered during the feature enrollment or disenrollment. + /// The list of product features. + /// The guid id of the license. + /// The list of ESU keys. + /// The type of the Esu servers. + /// Indicates the eligibility state of Esu. + /// Indicates whether there is an ESU Key currently active for the machine. + /// The resource id of the license. + /// Specifies if this machine is licensed as part of a Software Assurance agreement. + /// A new instance for mocking. + public static HybridComputeLicenseProfileData HybridComputeLicenseProfileData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, HybridComputeProvisioningState? provisioningState = null, LicenseProfileSubscriptionStatus? subscriptionStatus = null, LicenseProfileProductType? productType = null, DateTimeOffset? enrollmentOn = null, DateTimeOffset? billingStartOn = null, DateTimeOffset? disenrollmentOn = null, DateTimeOffset? billingEndOn = null, ResponseError error = null, IEnumerable productFeatures = null, Guid? assignedLicenseImmutableId = null, IEnumerable esuKeys = null, EsuServerType? serverType = null, EsuEligibility? esuEligibility = null, EsuKeyState? esuKeyState = null, string assignedLicense = null, bool? softwareAssuranceCustomer = null) + { + tags ??= new Dictionary(); + productFeatures ??= new List(); + esuKeys ??= new List(); + + return new HybridComputeLicenseProfileData( + id, + name, + resourceType, + systemData, + tags, + location, + provisioningState, + subscriptionStatus, + productType, + enrollmentOn, + billingStartOn, + disenrollmentOn, + billingEndOn, + error, + productFeatures?.ToList(), + assignedLicenseImmutableId, + esuKeys?.ToList(), + serverType, + esuEligibility, + esuKeyState, + assignedLicense, + softwareAssuranceCustomer, + serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The overall success or failure status of the operation. It remains "InProgress" until the operation completes. At that point it will become "Unknown", "Failed", "Succeeded", or "CompletedWithWarnings.". /// The activity ID of the operation that produced this result. @@ -598,153 +654,6 @@ public static HybridComputeExtensionValueData HybridComputeExtensionValueData(Re serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The tags. - /// The location. - /// The source of the run command script. - /// The parameters used by the script. - /// The parameters used by the script. - /// Optional. If set to true, provisioning will complete as soon as script starts and will not wait for script to complete. - /// Specifies the user account on the machine when executing the run command. - /// Specifies the user account password on the machine when executing the run command. - /// The timeout in seconds to execute the run command. - /// Specifies the Azure storage blob where script output stream will be uploaded. Use a SAS URI with read, append, create, write access OR use managed identity to provide the VM access to the blob. Refer outputBlobManagedIdentity parameter. - /// Specifies the Azure storage blob where script error stream will be uploaded. Use a SAS URI with read, append, create, write access OR use managed identity to provide the VM access to the blob. Refer errorBlobManagedIdentity parameter. - /// User-assigned managed identity that has access to outputBlobUri storage blob. Use an empty object in case of system-assigned identity. Make sure managed identity has been given access to blob's container with 'Storage Blob Data Contributor' role assignment. In case of user-assigned identity, make sure you add it under VM's identity. For more info on managed identity and Run Command, refer https://aka.ms/ManagedIdentity and https://aka.ms/RunCommandManaged. - /// User-assigned managed identity that has access to errorBlobUri storage blob. Use an empty object in case of system-assigned identity. Make sure managed identity has been given access to blob's container with 'Storage Blob Data Contributor' role assignment. In case of user-assigned identity, make sure you add it under VM's identity. For more info on managed identity and Run Command, refer https://aka.ms/ManagedIdentity and https://aka.ms/RunCommandManaged. - /// The provisioning state, which only appears in the response. - /// The machine run command instance view. - /// A new instance for mocking. - public static MachineRunCommandData MachineRunCommandData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, MachineRunCommandScriptSource source = null, IEnumerable parameters = null, IEnumerable protectedParameters = null, bool? asyncExecution = null, string runAsUser = null, string runAsPassword = null, int? timeoutInSeconds = null, Uri outputBlobUri = null, Uri errorBlobUri = null, RunCommandManagedIdentity outputBlobManagedIdentity = null, RunCommandManagedIdentity errorBlobManagedIdentity = null, string provisioningState = null, MachineRunCommandInstanceView instanceView = null) - { - tags ??= new Dictionary(); - parameters ??= new List(); - protectedParameters ??= new List(); - - return new MachineRunCommandData( - id, - name, - resourceType, - systemData, - tags, - location, - source, - parameters?.ToList(), - protectedParameters?.ToList(), - asyncExecution, - runAsUser, - runAsPassword, - timeoutInSeconds, - outputBlobUri, - errorBlobUri, - outputBlobManagedIdentity, - errorBlobManagedIdentity, - provisioningState, - instanceView, - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// Script execution status. - /// Communicate script configuration errors or execution messages. - /// Exit code returned from script execution. - /// Script output stream. - /// Script error stream. - /// Script start time. - /// Script end time. - /// The status information. - /// A new instance for mocking. - public static MachineRunCommandInstanceView MachineRunCommandInstanceView(HybridComputeExecutionState? executionState = null, string executionMessage = null, int? exitCode = null, string output = null, string error = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null, IEnumerable statuses = null) - { - statuses ??= new List(); - - return new MachineRunCommandInstanceView( - executionState, - executionMessage, - exitCode, - output, - error, - startOn, - endOn, - statuses?.ToList(), - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The status code. - /// The level code. - /// The short localizable label for the status. - /// The detailed status message, including for alerts and error messages. - /// The time of the status. - /// A new instance for mocking. - public static ExtensionsResourceStatus ExtensionsResourceStatus(string code = null, ExtensionsStatusLevelType? level = null, string displayStatus = null, string message = null, DateTimeOffset? time = null) - { - return new ExtensionsResourceStatus( - code, - level, - displayStatus, - message, - time, - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The tags. - /// The location. - /// The provisioning state, which only appears in the response. - /// A unique, immutable, identifier for the Gateway. - /// The type of the Gateway resource. - /// The endpoint fqdn for the Gateway. - /// Specifies the list of features that are enabled for this Gateway. - /// A new instance for mocking. - public static HybridComputeGatewayData HybridComputeGatewayData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, HybridComputeProvisioningState? provisioningState = null, string gatewayId = null, HybridComputeGatewayType? gatewayType = null, string gatewayEndpoint = null, IEnumerable allowedFeatures = null) - { - tags ??= new Dictionary(); - allowedFeatures ??= new List(); - - return new HybridComputeGatewayData( - id, - name, - resourceType, - systemData, - tags, - location, - provisioningState, - gatewayId, - gatewayType, - gatewayEndpoint, - allowedFeatures?.ToList(), - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Azure resource tenant Id. - /// Associated Gateway Resource Id. - /// A new instance for mocking. - public static HybridComputeTargetResourceSettings HybridComputeTargetResourceSettings(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, Guid? tenantId = null, ResourceIdentifier gatewayResourceId = null) - { - return new HybridComputeTargetResourceSettings( - id, - name, - resourceType, - systemData, - tenantId, - gatewayResourceId, - serializedAdditionalRawData: null); - } - /// Initializes a new instance of . /// The id. /// The name. @@ -1004,5 +913,13 @@ public static NetworkSecurityPerimeterProfile NetworkSecurityPerimeterProfile(st enabledLogCategories?.ToList(), serializedAdditionalRawData: null); } + + /// Initializes a new instance of . + /// The URL of the resource used to check the status of the asynchronous operation. + /// A new instance for mocking. + public static NetworkSecurityPerimeterConfigurationReconcileResult NetworkSecurityPerimeterConfigurationReconcileResult(AzureLocation? location = null) + { + return new NetworkSecurityPerimeterConfigurationReconcileResult(location, serializedAdditionalRawData: null); + } } } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Extensions/HybridComputeExtensions.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Extensions/HybridComputeExtensions.cs index ee672734bf27..38fd0b7b7629 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Extensions/HybridComputeExtensions.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Extensions/HybridComputeExtensions.cs @@ -72,79 +72,60 @@ public static HybridComputeMachineResource GetHybridComputeMachineResource(this } /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The resource ID of the resource to get. /// is null. - /// Returns a object. - public static HybridComputeMachineExtensionResource GetHybridComputeMachineExtensionResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static HybridComputeLicenseProfileResource GetHybridComputeLicenseProfileResource(this ArmClient client, ResourceIdentifier id) { Argument.AssertNotNull(client, nameof(client)); - return GetMockableHybridComputeArmClient(client).GetHybridComputeMachineExtensionResource(id); + return GetMockableHybridComputeArmClient(client).GetHybridComputeLicenseProfileResource(id); } /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance the method will execute against. - /// The resource ID of the resource to get. - /// is null. - /// Returns a object. - public static HybridComputeExtensionValueResource GetHybridComputeExtensionValueResource(this ArmClient client, ResourceIdentifier id) - { - Argument.AssertNotNull(client, nameof(client)); - - return GetMockableHybridComputeArmClient(client).GetHybridComputeExtensionValueResource(id); - } - - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The resource ID of the resource to get. /// is null. - /// Returns a object. - public static MachineRunCommandResource GetMachineRunCommandResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static HybridComputeMachineExtensionResource GetHybridComputeMachineExtensionResource(this ArmClient client, ResourceIdentifier id) { Argument.AssertNotNull(client, nameof(client)); - return GetMockableHybridComputeArmClient(client).GetMachineRunCommandResource(id); + return GetMockableHybridComputeArmClient(client).GetHybridComputeMachineExtensionResource(id); } /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The resource ID of the resource to get. /// is null. - /// Returns a object. - public static HybridComputeGatewayResource GetHybridComputeGatewayResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static HybridComputeExtensionValueResource GetHybridComputeExtensionValueResource(this ArmClient client, ResourceIdentifier id) { Argument.AssertNotNull(client, nameof(client)); - return GetMockableHybridComputeArmClient(client).GetHybridComputeGatewayResource(id); + return GetMockableHybridComputeArmClient(client).GetHybridComputeExtensionValueResource(id); } /// @@ -253,7 +234,7 @@ public static HybridComputeLicenseCollection GetHybridComputeLicenses(this Resou /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -291,7 +272,7 @@ public static async Task> GetHybridComput /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -346,7 +327,7 @@ public static HybridComputeMachineCollection GetHybridComputeMachines(this Resou /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -385,7 +366,7 @@ public static async Task> GetHybridComput /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -411,99 +392,6 @@ public static Response GetHybridComputeMachine(thi return GetMockableHybridComputeResourceGroupResource(resourceGroupResource).GetHybridComputeMachine(machineName, expand, cancellationToken); } - /// - /// Gets a collection of HybridComputeGatewayResources in the ResourceGroupResource. - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance the method will execute against. - /// is null. - /// An object representing collection of HybridComputeGatewayResources and their operations over a HybridComputeGatewayResource. - public static HybridComputeGatewayCollection GetHybridComputeGateways(this ResourceGroupResource resourceGroupResource) - { - Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - - return GetMockableHybridComputeResourceGroupResource(resourceGroupResource).GetHybridComputeGateways(); - } - - /// - /// Retrieves information about the view of a gateway. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/gateways/{gatewayName} - /// - /// - /// Operation Id - /// Gateways_Get - /// - /// - /// Default Api Version - /// 2024-05-20-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance the method will execute against. - /// The name of the Gateway. - /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public static async Task> GetHybridComputeGatewayAsync(this ResourceGroupResource resourceGroupResource, string gatewayName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - - return await GetMockableHybridComputeResourceGroupResource(resourceGroupResource).GetHybridComputeGatewayAsync(gatewayName, cancellationToken).ConfigureAwait(false); - } - - /// - /// Retrieves information about the view of a gateway. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/gateways/{gatewayName} - /// - /// - /// Operation Id - /// Gateways_Get - /// - /// - /// Default Api Version - /// 2024-05-20-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance the method will execute against. - /// The name of the Gateway. - /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public static Response GetHybridComputeGateway(this ResourceGroupResource resourceGroupResource, string gatewayName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - - return GetMockableHybridComputeResourceGroupResource(resourceGroupResource).GetHybridComputeGateway(gatewayName, cancellationToken); - } - /// /// Gets a collection of HybridComputePrivateLinkScopeResources in the ResourceGroupResource. /// @@ -534,7 +422,7 @@ public static HybridComputePrivateLinkScopeCollection GetHybridComputePrivateLin /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -572,7 +460,7 @@ public static async Task> GetHyb /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -597,80 +485,6 @@ public static Response GetHybridComputePr return GetMockableHybridComputeResourceGroupResource(resourceGroupResource).GetHybridComputePrivateLinkScope(scopeName, cancellationToken); } - /// - /// Updates the base Settings of the target resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{baseProvider}/{baseResourceType}/{baseResourceName}/providers/Microsoft.HybridCompute/settings/{settingsResourceName} - /// - /// - /// Operation Id - /// Settings_Update - /// - /// - /// Default Api Version - /// 2024-05-20-preview - /// - /// - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance the method will execute against. - /// The name of the base Resource Provider. - /// The name of the base Resource Type. - /// The name of the base resource. - /// The name of the settings resource. - /// Settings details. - /// The cancellation token to use. - /// , , or is an empty string, and was expected to be non-empty. - /// , , , , or is null. - public static async Task> UpdateTargetResourceSettingAsync(this ResourceGroupResource resourceGroupResource, string baseProvider, string baseResourceType, string baseResourceName, string settingsResourceName, HybridComputeTargetResourceSettings hybridComputeTargetResourceSettings, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - - return await GetMockableHybridComputeResourceGroupResource(resourceGroupResource).UpdateTargetResourceSettingAsync(baseProvider, baseResourceType, baseResourceName, settingsResourceName, hybridComputeTargetResourceSettings, cancellationToken).ConfigureAwait(false); - } - - /// - /// Updates the base Settings of the target resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{baseProvider}/{baseResourceType}/{baseResourceName}/providers/Microsoft.HybridCompute/settings/{settingsResourceName} - /// - /// - /// Operation Id - /// Settings_Update - /// - /// - /// Default Api Version - /// 2024-05-20-preview - /// - /// - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance the method will execute against. - /// The name of the base Resource Provider. - /// The name of the base Resource Type. - /// The name of the base resource. - /// The name of the settings resource. - /// Settings details. - /// The cancellation token to use. - /// , , or is an empty string, and was expected to be non-empty. - /// , , , , or is null. - public static Response UpdateTargetResourceSetting(this ResourceGroupResource resourceGroupResource, string baseProvider, string baseResourceType, string baseResourceName, string settingsResourceName, HybridComputeTargetResourceSettings hybridComputeTargetResourceSettings, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - - return GetMockableHybridComputeResourceGroupResource(resourceGroupResource).UpdateTargetResourceSetting(baseProvider, baseResourceType, baseResourceName, settingsResourceName, hybridComputeTargetResourceSettings, cancellationToken); - } - /// /// Gets a collection of HybridComputeExtensionValueResources in the SubscriptionResource. /// @@ -705,7 +519,7 @@ public static HybridComputeExtensionValueCollection GetHybridComputeExtensionVal /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -746,7 +560,7 @@ public static async Task> GetHybri /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -775,19 +589,19 @@ public static Response GetHybridComputeExte } /// - /// The operation to get all licenses of a non-Azure machine + /// The operation to validate a license. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.HybridCompute/licenses + /// /subscriptions/{subscriptionId}/providers/Microsoft.HybridCompute/validateLicense /// /// /// Operation Id - /// Licenses_ListBySubscription + /// Licenses_ValidateLicense /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -796,34 +610,35 @@ public static Response GetHybridComputeExte /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Parameters supplied to the license validation operation. /// The cancellation token to use. - /// is null. - /// An async collection of that may take multiple service requests to iterate over. - public static AsyncPageable GetHybridComputeLicensesAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + /// or is null. + public static async Task> ValidateLicenseLicenseAsync(this SubscriptionResource subscriptionResource, WaitUntil waitUntil, HybridComputeLicenseData data, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return GetMockableHybridComputeSubscriptionResource(subscriptionResource).GetHybridComputeLicensesAsync(cancellationToken); + return await GetMockableHybridComputeSubscriptionResource(subscriptionResource).ValidateLicenseLicenseAsync(waitUntil, data, cancellationToken).ConfigureAwait(false); } /// - /// The operation to get all licenses of a non-Azure machine + /// The operation to validate a license. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.HybridCompute/licenses + /// /subscriptions/{subscriptionId}/providers/Microsoft.HybridCompute/validateLicense /// /// /// Operation Id - /// Licenses_ListBySubscription + /// Licenses_ValidateLicense /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -832,162 +647,163 @@ public static AsyncPageable GetHybridComputeLicens /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Parameters supplied to the license validation operation. /// The cancellation token to use. - /// is null. - /// A collection of that may take multiple service requests to iterate over. - public static Pageable GetHybridComputeLicenses(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + /// or is null. + public static ArmOperation ValidateLicenseLicense(this SubscriptionResource subscriptionResource, WaitUntil waitUntil, HybridComputeLicenseData data, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return GetMockableHybridComputeSubscriptionResource(subscriptionResource).GetHybridComputeLicenses(cancellationToken); + return GetMockableHybridComputeSubscriptionResource(subscriptionResource).ValidateLicenseLicense(waitUntil, data, cancellationToken); } /// - /// Lists all the hybrid machines in the specified subscription. Use the nextLink property in the response to get the next page of hybrid machines. + /// The operation to get all licenses of a non-Azure machine /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.HybridCompute/machines + /// /subscriptions/{subscriptionId}/providers/Microsoft.HybridCompute/licenses /// /// /// Operation Id - /// Machines_ListBySubscription + /// Licenses_ListBySubscription /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource - /// + /// /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The cancellation token to use. /// is null. - /// An async collection of that may take multiple service requests to iterate over. - public static AsyncPageable GetHybridComputeMachinesAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetHybridComputeLicensesAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return GetMockableHybridComputeSubscriptionResource(subscriptionResource).GetHybridComputeMachinesAsync(cancellationToken); + return GetMockableHybridComputeSubscriptionResource(subscriptionResource).GetHybridComputeLicensesAsync(cancellationToken); } /// - /// Lists all the hybrid machines in the specified subscription. Use the nextLink property in the response to get the next page of hybrid machines. + /// The operation to get all licenses of a non-Azure machine /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.HybridCompute/machines + /// /subscriptions/{subscriptionId}/providers/Microsoft.HybridCompute/licenses /// /// /// Operation Id - /// Machines_ListBySubscription + /// Licenses_ListBySubscription /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource - /// + /// /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The cancellation token to use. /// is null. - /// A collection of that may take multiple service requests to iterate over. - public static Pageable GetHybridComputeMachines(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetHybridComputeLicenses(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return GetMockableHybridComputeSubscriptionResource(subscriptionResource).GetHybridComputeMachines(cancellationToken); + return GetMockableHybridComputeSubscriptionResource(subscriptionResource).GetHybridComputeLicenses(cancellationToken); } /// - /// The operation to get all gateways of a non-Azure machine + /// Lists all the hybrid machines in the specified subscription. Use the nextLink property in the response to get the next page of hybrid machines. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.HybridCompute/gateways + /// /subscriptions/{subscriptionId}/providers/Microsoft.HybridCompute/machines /// /// /// Operation Id - /// Gateways_ListBySubscription + /// Machines_ListBySubscription /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource - /// + /// /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The cancellation token to use. /// is null. - /// An async collection of that may take multiple service requests to iterate over. - public static AsyncPageable GetHybridComputeGatewaysAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetHybridComputeMachinesAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return GetMockableHybridComputeSubscriptionResource(subscriptionResource).GetHybridComputeGatewaysAsync(cancellationToken); + return GetMockableHybridComputeSubscriptionResource(subscriptionResource).GetHybridComputeMachinesAsync(cancellationToken); } /// - /// The operation to get all gateways of a non-Azure machine + /// Lists all the hybrid machines in the specified subscription. Use the nextLink property in the response to get the next page of hybrid machines. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.HybridCompute/gateways + /// /subscriptions/{subscriptionId}/providers/Microsoft.HybridCompute/machines /// /// /// Operation Id - /// Gateways_ListBySubscription + /// Machines_ListBySubscription /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource - /// + /// /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The cancellation token to use. /// is null. - /// A collection of that may take multiple service requests to iterate over. - public static Pageable GetHybridComputeGateways(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetHybridComputeMachines(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return GetMockableHybridComputeSubscriptionResource(subscriptionResource).GetHybridComputeGateways(cancellationToken); + return GetMockableHybridComputeSubscriptionResource(subscriptionResource).GetHybridComputeMachines(cancellationToken); } /// @@ -1003,7 +819,7 @@ public static Pageable GetHybridComputeGateways(th /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -1039,7 +855,7 @@ public static AsyncPageable GetHybridComp /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -1075,7 +891,7 @@ public static Pageable GetHybridComputePr /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -1113,7 +929,7 @@ public static async Task> GetValidat /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Extensions/MockableHybridComputeArmClient.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Extensions/MockableHybridComputeArmClient.cs index 9c6cb94a5bdd..317c7b7485b9 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Extensions/MockableHybridComputeArmClient.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Extensions/MockableHybridComputeArmClient.cs @@ -58,6 +58,18 @@ public virtual HybridComputeMachineResource GetHybridComputeMachineResource(Reso return new HybridComputeMachineResource(Client, id); } + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual HybridComputeLicenseProfileResource GetHybridComputeLicenseProfileResource(ResourceIdentifier id) + { + HybridComputeLicenseProfileResource.ValidateResourceId(id); + return new HybridComputeLicenseProfileResource(Client, id); + } + /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// You can use to create a from its components. @@ -82,30 +94,6 @@ public virtual HybridComputeExtensionValueResource GetHybridComputeExtensionValu return new HybridComputeExtensionValueResource(Client, id); } - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// The resource ID of the resource to get. - /// Returns a object. - public virtual MachineRunCommandResource GetMachineRunCommandResource(ResourceIdentifier id) - { - MachineRunCommandResource.ValidateResourceId(id); - return new MachineRunCommandResource(Client, id); - } - - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// The resource ID of the resource to get. - /// Returns a object. - public virtual HybridComputeGatewayResource GetHybridComputeGatewayResource(ResourceIdentifier id) - { - HybridComputeGatewayResource.ValidateResourceId(id); - return new HybridComputeGatewayResource(Client, id); - } - /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// You can use to create a from its components. diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Extensions/MockableHybridComputeResourceGroupResource.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Extensions/MockableHybridComputeResourceGroupResource.cs index 187e7f2205d9..475986939d06 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Extensions/MockableHybridComputeResourceGroupResource.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Extensions/MockableHybridComputeResourceGroupResource.cs @@ -9,17 +9,12 @@ using System.Threading; using System.Threading.Tasks; using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager.HybridCompute.Models; namespace Azure.ResourceManager.HybridCompute.Mocking { /// A class to add extension methods to ResourceGroupResource. public partial class MockableHybridComputeResourceGroupResource : ArmResource { - private ClientDiagnostics _settingsClientDiagnostics; - private SettingsRestOperations _settingsRestClient; - /// Initializes a new instance of the class for mocking. protected MockableHybridComputeResourceGroupResource() { @@ -32,9 +27,6 @@ internal MockableHybridComputeResourceGroupResource(ArmClient client, ResourceId { } - private ClientDiagnostics SettingsClientDiagnostics => _settingsClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.HybridCompute", ProviderConstants.DefaultProviderNamespace, Diagnostics); - private SettingsRestOperations SettingsRestClient => _settingsRestClient ??= new SettingsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); - private string GetApiVersionOrNull(ResourceType resourceType) { TryGetApiVersion(resourceType, out string apiVersion); @@ -61,7 +53,7 @@ public virtual HybridComputeLicenseCollection GetHybridComputeLicenses() /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -92,7 +84,7 @@ public virtual async Task> GetHybridCompu /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -130,7 +122,7 @@ public virtual HybridComputeMachineCollection GetHybridComputeMachines() /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -162,7 +154,7 @@ public virtual async Task> GetHybridCompu /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -181,75 +173,6 @@ public virtual Response GetHybridComputeMachine(st return GetHybridComputeMachines().Get(machineName, expand, cancellationToken); } - /// Gets a collection of HybridComputeGatewayResources in the ResourceGroupResource. - /// An object representing collection of HybridComputeGatewayResources and their operations over a HybridComputeGatewayResource. - public virtual HybridComputeGatewayCollection GetHybridComputeGateways() - { - return GetCachedClient(client => new HybridComputeGatewayCollection(client, Id)); - } - - /// - /// Retrieves information about the view of a gateway. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/gateways/{gatewayName} - /// - /// - /// Operation Id - /// Gateways_Get - /// - /// - /// Default Api Version - /// 2024-05-20-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The name of the Gateway. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public virtual async Task> GetHybridComputeGatewayAsync(string gatewayName, CancellationToken cancellationToken = default) - { - return await GetHybridComputeGateways().GetAsync(gatewayName, cancellationToken).ConfigureAwait(false); - } - - /// - /// Retrieves information about the view of a gateway. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/gateways/{gatewayName} - /// - /// - /// Operation Id - /// Gateways_Get - /// - /// - /// Default Api Version - /// 2024-05-20-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The name of the Gateway. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public virtual Response GetHybridComputeGateway(string gatewayName, CancellationToken cancellationToken = default) - { - return GetHybridComputeGateways().Get(gatewayName, cancellationToken); - } - /// Gets a collection of HybridComputePrivateLinkScopeResources in the ResourceGroupResource. /// An object representing collection of HybridComputePrivateLinkScopeResources and their operations over a HybridComputePrivateLinkScopeResource. public virtual HybridComputePrivateLinkScopeCollection GetHybridComputePrivateLinkScopes() @@ -270,7 +193,7 @@ public virtual HybridComputePrivateLinkScopeCollection GetHybridComputePrivateLi /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -301,7 +224,7 @@ public virtual async Task> GetHy /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -318,99 +241,5 @@ public virtual Response GetHybridComputeP { return GetHybridComputePrivateLinkScopes().Get(scopeName, cancellationToken); } - - /// - /// Updates the base Settings of the target resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{baseProvider}/{baseResourceType}/{baseResourceName}/providers/Microsoft.HybridCompute/settings/{settingsResourceName} - /// - /// - /// Operation Id - /// Settings_Update - /// - /// - /// Default Api Version - /// 2024-05-20-preview - /// - /// - /// - /// The name of the base Resource Provider. - /// The name of the base Resource Type. - /// The name of the base resource. - /// The name of the settings resource. - /// Settings details. - /// The cancellation token to use. - /// , , or is an empty string, and was expected to be non-empty. - /// , , , or is null. - public virtual async Task> UpdateTargetResourceSettingAsync(string baseProvider, string baseResourceType, string baseResourceName, string settingsResourceName, HybridComputeTargetResourceSettings hybridComputeTargetResourceSettings, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(baseProvider, nameof(baseProvider)); - Argument.AssertNotNullOrEmpty(baseResourceType, nameof(baseResourceType)); - Argument.AssertNotNullOrEmpty(baseResourceName, nameof(baseResourceName)); - Argument.AssertNotNullOrEmpty(settingsResourceName, nameof(settingsResourceName)); - Argument.AssertNotNull(hybridComputeTargetResourceSettings, nameof(hybridComputeTargetResourceSettings)); - - using var scope = SettingsClientDiagnostics.CreateScope("MockableHybridComputeResourceGroupResource.UpdateTargetResourceSetting"); - scope.Start(); - try - { - var response = await SettingsRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, baseProvider, baseResourceType, baseResourceName, settingsResourceName, hybridComputeTargetResourceSettings, cancellationToken).ConfigureAwait(false); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Updates the base Settings of the target resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{baseProvider}/{baseResourceType}/{baseResourceName}/providers/Microsoft.HybridCompute/settings/{settingsResourceName} - /// - /// - /// Operation Id - /// Settings_Update - /// - /// - /// Default Api Version - /// 2024-05-20-preview - /// - /// - /// - /// The name of the base Resource Provider. - /// The name of the base Resource Type. - /// The name of the base resource. - /// The name of the settings resource. - /// Settings details. - /// The cancellation token to use. - /// , , or is an empty string, and was expected to be non-empty. - /// , , , or is null. - public virtual Response UpdateTargetResourceSetting(string baseProvider, string baseResourceType, string baseResourceName, string settingsResourceName, HybridComputeTargetResourceSettings hybridComputeTargetResourceSettings, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(baseProvider, nameof(baseProvider)); - Argument.AssertNotNullOrEmpty(baseResourceType, nameof(baseResourceType)); - Argument.AssertNotNullOrEmpty(baseResourceName, nameof(baseResourceName)); - Argument.AssertNotNullOrEmpty(settingsResourceName, nameof(settingsResourceName)); - Argument.AssertNotNull(hybridComputeTargetResourceSettings, nameof(hybridComputeTargetResourceSettings)); - - using var scope = SettingsClientDiagnostics.CreateScope("MockableHybridComputeResourceGroupResource.UpdateTargetResourceSetting"); - scope.Start(); - try - { - var response = SettingsRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, baseProvider, baseResourceType, baseResourceName, settingsResourceName, hybridComputeTargetResourceSettings, cancellationToken); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } } } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Extensions/MockableHybridComputeSubscriptionResource.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Extensions/MockableHybridComputeSubscriptionResource.cs index adeda6adbf35..59489434be50 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Extensions/MockableHybridComputeSubscriptionResource.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Extensions/MockableHybridComputeSubscriptionResource.cs @@ -22,8 +22,6 @@ public partial class MockableHybridComputeSubscriptionResource : ArmResource private LicensesRestOperations _hybridComputeLicenseLicensesRestClient; private ClientDiagnostics _hybridComputeMachineMachinesClientDiagnostics; private MachinesRestOperations _hybridComputeMachineMachinesRestClient; - private ClientDiagnostics _hybridComputeGatewayGatewaysClientDiagnostics; - private GatewaysRestOperations _hybridComputeGatewayGatewaysRestClient; private ClientDiagnostics _hybridComputePrivateLinkScopePrivateLinkScopesClientDiagnostics; private PrivateLinkScopesRestOperations _hybridComputePrivateLinkScopePrivateLinkScopesRestClient; @@ -43,8 +41,6 @@ internal MockableHybridComputeSubscriptionResource(ArmClient client, ResourceIde private LicensesRestOperations HybridComputeLicenseLicensesRestClient => _hybridComputeLicenseLicensesRestClient ??= new LicensesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(HybridComputeLicenseResource.ResourceType)); private ClientDiagnostics HybridComputeMachineMachinesClientDiagnostics => _hybridComputeMachineMachinesClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.HybridCompute", HybridComputeMachineResource.ResourceType.Namespace, Diagnostics); private MachinesRestOperations HybridComputeMachineMachinesRestClient => _hybridComputeMachineMachinesRestClient ??= new MachinesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(HybridComputeMachineResource.ResourceType)); - private ClientDiagnostics HybridComputeGatewayGatewaysClientDiagnostics => _hybridComputeGatewayGatewaysClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.HybridCompute", HybridComputeGatewayResource.ResourceType.Namespace, Diagnostics); - private GatewaysRestOperations HybridComputeGatewayGatewaysRestClient => _hybridComputeGatewayGatewaysRestClient ??= new GatewaysRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(HybridComputeGatewayResource.ResourceType)); private ClientDiagnostics HybridComputePrivateLinkScopePrivateLinkScopesClientDiagnostics => _hybridComputePrivateLinkScopePrivateLinkScopesClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.HybridCompute", HybridComputePrivateLinkScopeResource.ResourceType.Namespace, Diagnostics); private PrivateLinkScopesRestOperations HybridComputePrivateLinkScopePrivateLinkScopesRestClient => _hybridComputePrivateLinkScopePrivateLinkScopesRestClient ??= new PrivateLinkScopesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(HybridComputePrivateLinkScopeResource.ResourceType)); @@ -79,7 +75,7 @@ public virtual HybridComputeExtensionValueCollection GetHybridComputeExtensionVa /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -113,7 +109,7 @@ public virtual async Task> GetHybr /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -135,19 +131,19 @@ public virtual Response GetHybridComputeExt } /// - /// The operation to get all licenses of a non-Azure machine + /// The operation to validate a license. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.HybridCompute/licenses + /// /subscriptions/{subscriptionId}/providers/Microsoft.HybridCompute/validateLicense /// /// /// Operation Id - /// Licenses_ListBySubscription + /// Licenses_ValidateLicense /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -155,29 +151,45 @@ public virtual Response GetHybridComputeExt /// /// /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Parameters supplied to the license validation operation. /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetHybridComputeLicensesAsync(CancellationToken cancellationToken = default) + /// is null. + public virtual async Task> ValidateLicenseLicenseAsync(WaitUntil waitUntil, HybridComputeLicenseData data, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => HybridComputeLicenseLicensesRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => HybridComputeLicenseLicensesRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new HybridComputeLicenseResource(Client, HybridComputeLicenseData.DeserializeHybridComputeLicenseData(e)), HybridComputeLicenseLicensesClientDiagnostics, Pipeline, "MockableHybridComputeSubscriptionResource.GetHybridComputeLicenses", "value", "nextLink", cancellationToken); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = HybridComputeLicenseLicensesClientDiagnostics.CreateScope("MockableHybridComputeSubscriptionResource.ValidateLicenseLicense"); + scope.Start(); + try + { + var response = await HybridComputeLicenseLicensesRestClient.ValidateLicenseAsync(Id.SubscriptionId, data, cancellationToken).ConfigureAwait(false); + var operation = new HybridComputeArmOperation(new HybridComputeLicenseOperationSource(Client), HybridComputeLicenseLicensesClientDiagnostics, Pipeline, HybridComputeLicenseLicensesRestClient.CreateValidateLicenseRequest(Id.SubscriptionId, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } } /// - /// The operation to get all licenses of a non-Azure machine + /// The operation to validate a license. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.HybridCompute/licenses + /// /subscriptions/{subscriptionId}/providers/Microsoft.HybridCompute/validateLicense /// /// /// Operation Id - /// Licenses_ListBySubscription + /// Licenses_ValidateLicense /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -185,133 +197,149 @@ public virtual AsyncPageable GetHybridComputeLicen /// /// /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Parameters supplied to the license validation operation. /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetHybridComputeLicenses(CancellationToken cancellationToken = default) + /// is null. + public virtual ArmOperation ValidateLicenseLicense(WaitUntil waitUntil, HybridComputeLicenseData data, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => HybridComputeLicenseLicensesRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => HybridComputeLicenseLicensesRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new HybridComputeLicenseResource(Client, HybridComputeLicenseData.DeserializeHybridComputeLicenseData(e)), HybridComputeLicenseLicensesClientDiagnostics, Pipeline, "MockableHybridComputeSubscriptionResource.GetHybridComputeLicenses", "value", "nextLink", cancellationToken); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = HybridComputeLicenseLicensesClientDiagnostics.CreateScope("MockableHybridComputeSubscriptionResource.ValidateLicenseLicense"); + scope.Start(); + try + { + var response = HybridComputeLicenseLicensesRestClient.ValidateLicense(Id.SubscriptionId, data, cancellationToken); + var operation = new HybridComputeArmOperation(new HybridComputeLicenseOperationSource(Client), HybridComputeLicenseLicensesClientDiagnostics, Pipeline, HybridComputeLicenseLicensesRestClient.CreateValidateLicenseRequest(Id.SubscriptionId, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } } /// - /// Lists all the hybrid machines in the specified subscription. Use the nextLink property in the response to get the next page of hybrid machines. + /// The operation to get all licenses of a non-Azure machine /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.HybridCompute/machines + /// /subscriptions/{subscriptionId}/providers/Microsoft.HybridCompute/licenses /// /// /// Operation Id - /// Machines_ListBySubscription + /// Licenses_ListBySubscription /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource - /// + /// /// /// /// /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetHybridComputeMachinesAsync(CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetHybridComputeLicensesAsync(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => HybridComputeMachineMachinesRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => HybridComputeMachineMachinesRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new HybridComputeMachineResource(Client, HybridComputeMachineData.DeserializeHybridComputeMachineData(e)), HybridComputeMachineMachinesClientDiagnostics, Pipeline, "MockableHybridComputeSubscriptionResource.GetHybridComputeMachines", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => HybridComputeLicenseLicensesRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => HybridComputeLicenseLicensesRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new HybridComputeLicenseResource(Client, HybridComputeLicenseData.DeserializeHybridComputeLicenseData(e)), HybridComputeLicenseLicensesClientDiagnostics, Pipeline, "MockableHybridComputeSubscriptionResource.GetHybridComputeLicenses", "value", "nextLink", cancellationToken); } /// - /// Lists all the hybrid machines in the specified subscription. Use the nextLink property in the response to get the next page of hybrid machines. + /// The operation to get all licenses of a non-Azure machine /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.HybridCompute/machines + /// /subscriptions/{subscriptionId}/providers/Microsoft.HybridCompute/licenses /// /// /// Operation Id - /// Machines_ListBySubscription + /// Licenses_ListBySubscription /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource - /// + /// /// /// /// /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetHybridComputeMachines(CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetHybridComputeLicenses(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => HybridComputeMachineMachinesRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => HybridComputeMachineMachinesRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new HybridComputeMachineResource(Client, HybridComputeMachineData.DeserializeHybridComputeMachineData(e)), HybridComputeMachineMachinesClientDiagnostics, Pipeline, "MockableHybridComputeSubscriptionResource.GetHybridComputeMachines", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => HybridComputeLicenseLicensesRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => HybridComputeLicenseLicensesRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new HybridComputeLicenseResource(Client, HybridComputeLicenseData.DeserializeHybridComputeLicenseData(e)), HybridComputeLicenseLicensesClientDiagnostics, Pipeline, "MockableHybridComputeSubscriptionResource.GetHybridComputeLicenses", "value", "nextLink", cancellationToken); } /// - /// The operation to get all gateways of a non-Azure machine + /// Lists all the hybrid machines in the specified subscription. Use the nextLink property in the response to get the next page of hybrid machines. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.HybridCompute/gateways + /// /subscriptions/{subscriptionId}/providers/Microsoft.HybridCompute/machines /// /// /// Operation Id - /// Gateways_ListBySubscription + /// Machines_ListBySubscription /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource - /// + /// /// /// /// /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetHybridComputeGatewaysAsync(CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetHybridComputeMachinesAsync(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => HybridComputeGatewayGatewaysRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => HybridComputeGatewayGatewaysRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new HybridComputeGatewayResource(Client, HybridComputeGatewayData.DeserializeHybridComputeGatewayData(e)), HybridComputeGatewayGatewaysClientDiagnostics, Pipeline, "MockableHybridComputeSubscriptionResource.GetHybridComputeGateways", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => HybridComputeMachineMachinesRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => HybridComputeMachineMachinesRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new HybridComputeMachineResource(Client, HybridComputeMachineData.DeserializeHybridComputeMachineData(e)), HybridComputeMachineMachinesClientDiagnostics, Pipeline, "MockableHybridComputeSubscriptionResource.GetHybridComputeMachines", "value", "nextLink", cancellationToken); } /// - /// The operation to get all gateways of a non-Azure machine + /// Lists all the hybrid machines in the specified subscription. Use the nextLink property in the response to get the next page of hybrid machines. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.HybridCompute/gateways + /// /subscriptions/{subscriptionId}/providers/Microsoft.HybridCompute/machines /// /// /// Operation Id - /// Gateways_ListBySubscription + /// Machines_ListBySubscription /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource - /// + /// /// /// /// /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetHybridComputeGateways(CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetHybridComputeMachines(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => HybridComputeGatewayGatewaysRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => HybridComputeGatewayGatewaysRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new HybridComputeGatewayResource(Client, HybridComputeGatewayData.DeserializeHybridComputeGatewayData(e)), HybridComputeGatewayGatewaysClientDiagnostics, Pipeline, "MockableHybridComputeSubscriptionResource.GetHybridComputeGateways", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => HybridComputeMachineMachinesRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => HybridComputeMachineMachinesRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new HybridComputeMachineResource(Client, HybridComputeMachineData.DeserializeHybridComputeMachineData(e)), HybridComputeMachineMachinesClientDiagnostics, Pipeline, "MockableHybridComputeSubscriptionResource.GetHybridComputeMachines", "value", "nextLink", cancellationToken); } /// @@ -327,7 +355,7 @@ public virtual Pageable GetHybridComputeGateways(C /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -357,7 +385,7 @@ public virtual AsyncPageable GetHybridCom /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -387,7 +415,7 @@ public virtual Pageable GetHybridComputeP /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -431,7 +459,7 @@ public virtual async Task> GetValida /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeExtensionValueCollection.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeExtensionValueCollection.cs index 805cb45af6ba..538d5f7ffa10 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeExtensionValueCollection.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeExtensionValueCollection.cs @@ -76,7 +76,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -121,7 +121,7 @@ public virtual async Task> GetAsyn /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -166,7 +166,7 @@ public virtual Response Get(string version, /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -195,7 +195,7 @@ public virtual AsyncPageable GetAllAsync(Ca /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -224,7 +224,7 @@ public virtual Pageable GetAll(Cancellation /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -267,7 +267,7 @@ public virtual async Task> ExistsAsync(string version, Cancellati /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -310,7 +310,7 @@ public virtual Response Exists(string version, CancellationToken cancellat /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeExtensionValueData.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeExtensionValueData.cs index 5e9928bfe1b5..d5a7d035dd89 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeExtensionValueData.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeExtensionValueData.cs @@ -51,7 +51,7 @@ public partial class HybridComputeExtensionValueData : ResourceData private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - public HybridComputeExtensionValueData() + internal HybridComputeExtensionValueData() { } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeExtensionValueResource.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeExtensionValueResource.cs index 190328fd514c..15b320990465 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeExtensionValueResource.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeExtensionValueResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsyn /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeGatewayCollection.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeGatewayCollection.cs deleted file mode 100644 index 9a0133660896..000000000000 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeGatewayCollection.cs +++ /dev/null @@ -1,494 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Globalization; -using System.Threading; -using System.Threading.Tasks; -using Autorest.CSharp.Core; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager.Resources; - -namespace Azure.ResourceManager.HybridCompute -{ - /// - /// A class representing a collection of and their operations. - /// Each in the collection will belong to the same instance of . - /// To get a instance call the GetHybridComputeGateways method from an instance of . - /// - public partial class HybridComputeGatewayCollection : ArmCollection, IEnumerable, IAsyncEnumerable - { - private readonly ClientDiagnostics _hybridComputeGatewayGatewaysClientDiagnostics; - private readonly GatewaysRestOperations _hybridComputeGatewayGatewaysRestClient; - - /// Initializes a new instance of the class for mocking. - protected HybridComputeGatewayCollection() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The identifier of the parent resource that is the target of operations. - internal HybridComputeGatewayCollection(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _hybridComputeGatewayGatewaysClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.HybridCompute", HybridComputeGatewayResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(HybridComputeGatewayResource.ResourceType, out string hybridComputeGatewayGatewaysApiVersion); - _hybridComputeGatewayGatewaysRestClient = new GatewaysRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, hybridComputeGatewayGatewaysApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != ResourceGroupResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceGroupResource.ResourceType), nameof(id)); - } - - /// - /// The operation to create or update a gateway. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/gateways/{gatewayName} - /// - /// - /// Operation Id - /// Gateways_CreateOrUpdate - /// - /// - /// Default Api Version - /// 2024-05-20-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The name of the Gateway. - /// Parameters supplied to the Create gateway operation. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string gatewayName, HybridComputeGatewayData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(gatewayName, nameof(gatewayName)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _hybridComputeGatewayGatewaysClientDiagnostics.CreateScope("HybridComputeGatewayCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = await _hybridComputeGatewayGatewaysRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, gatewayName, data, cancellationToken).ConfigureAwait(false); - var operation = new HybridComputeArmOperation(new HybridComputeGatewayOperationSource(Client), _hybridComputeGatewayGatewaysClientDiagnostics, Pipeline, _hybridComputeGatewayGatewaysRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, gatewayName, data).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// The operation to create or update a gateway. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/gateways/{gatewayName} - /// - /// - /// Operation Id - /// Gateways_CreateOrUpdate - /// - /// - /// Default Api Version - /// 2024-05-20-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The name of the Gateway. - /// Parameters supplied to the Create gateway operation. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string gatewayName, HybridComputeGatewayData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(gatewayName, nameof(gatewayName)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _hybridComputeGatewayGatewaysClientDiagnostics.CreateScope("HybridComputeGatewayCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = _hybridComputeGatewayGatewaysRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, gatewayName, data, cancellationToken); - var operation = new HybridComputeArmOperation(new HybridComputeGatewayOperationSource(Client), _hybridComputeGatewayGatewaysClientDiagnostics, Pipeline, _hybridComputeGatewayGatewaysRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, gatewayName, data).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Retrieves information about the view of a gateway. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/gateways/{gatewayName} - /// - /// - /// Operation Id - /// Gateways_Get - /// - /// - /// Default Api Version - /// 2024-05-20-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The name of the Gateway. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetAsync(string gatewayName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(gatewayName, nameof(gatewayName)); - - using var scope = _hybridComputeGatewayGatewaysClientDiagnostics.CreateScope("HybridComputeGatewayCollection.Get"); - scope.Start(); - try - { - var response = await _hybridComputeGatewayGatewaysRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, gatewayName, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new HybridComputeGatewayResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Retrieves information about the view of a gateway. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/gateways/{gatewayName} - /// - /// - /// Operation Id - /// Gateways_Get - /// - /// - /// Default Api Version - /// 2024-05-20-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The name of the Gateway. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Get(string gatewayName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(gatewayName, nameof(gatewayName)); - - using var scope = _hybridComputeGatewayGatewaysClientDiagnostics.CreateScope("HybridComputeGatewayCollection.Get"); - scope.Start(); - try - { - var response = _hybridComputeGatewayGatewaysRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, gatewayName, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new HybridComputeGatewayResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// The operation to get all gateways of a non-Azure machine - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/gateways - /// - /// - /// Operation Id - /// Gateways_ListByResourceGroup - /// - /// - /// Default Api Version - /// 2024-05-20-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _hybridComputeGatewayGatewaysRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _hybridComputeGatewayGatewaysRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new HybridComputeGatewayResource(Client, HybridComputeGatewayData.DeserializeHybridComputeGatewayData(e)), _hybridComputeGatewayGatewaysClientDiagnostics, Pipeline, "HybridComputeGatewayCollection.GetAll", "value", "nextLink", cancellationToken); - } - - /// - /// The operation to get all gateways of a non-Azure machine - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/gateways - /// - /// - /// Operation Id - /// Gateways_ListByResourceGroup - /// - /// - /// Default Api Version - /// 2024-05-20-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _hybridComputeGatewayGatewaysRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _hybridComputeGatewayGatewaysRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new HybridComputeGatewayResource(Client, HybridComputeGatewayData.DeserializeHybridComputeGatewayData(e)), _hybridComputeGatewayGatewaysClientDiagnostics, Pipeline, "HybridComputeGatewayCollection.GetAll", "value", "nextLink", cancellationToken); - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/gateways/{gatewayName} - /// - /// - /// Operation Id - /// Gateways_Get - /// - /// - /// Default Api Version - /// 2024-05-20-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The name of the Gateway. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> ExistsAsync(string gatewayName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(gatewayName, nameof(gatewayName)); - - using var scope = _hybridComputeGatewayGatewaysClientDiagnostics.CreateScope("HybridComputeGatewayCollection.Exists"); - scope.Start(); - try - { - var response = await _hybridComputeGatewayGatewaysRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, gatewayName, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(response.Value != null, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/gateways/{gatewayName} - /// - /// - /// Operation Id - /// Gateways_Get - /// - /// - /// Default Api Version - /// 2024-05-20-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The name of the Gateway. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Exists(string gatewayName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(gatewayName, nameof(gatewayName)); - - using var scope = _hybridComputeGatewayGatewaysClientDiagnostics.CreateScope("HybridComputeGatewayCollection.Exists"); - scope.Start(); - try - { - var response = _hybridComputeGatewayGatewaysRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, gatewayName, cancellationToken: cancellationToken); - return Response.FromValue(response.Value != null, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Tries to get details for this resource from the service. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/gateways/{gatewayName} - /// - /// - /// Operation Id - /// Gateways_Get - /// - /// - /// Default Api Version - /// 2024-05-20-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The name of the Gateway. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetIfExistsAsync(string gatewayName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(gatewayName, nameof(gatewayName)); - - using var scope = _hybridComputeGatewayGatewaysClientDiagnostics.CreateScope("HybridComputeGatewayCollection.GetIfExists"); - scope.Start(); - try - { - var response = await _hybridComputeGatewayGatewaysRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, gatewayName, cancellationToken: cancellationToken).ConfigureAwait(false); - if (response.Value == null) - return new NoValueResponse(response.GetRawResponse()); - return Response.FromValue(new HybridComputeGatewayResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Tries to get details for this resource from the service. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/gateways/{gatewayName} - /// - /// - /// Operation Id - /// Gateways_Get - /// - /// - /// Default Api Version - /// 2024-05-20-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The name of the Gateway. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual NullableResponse GetIfExists(string gatewayName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(gatewayName, nameof(gatewayName)); - - using var scope = _hybridComputeGatewayGatewaysClientDiagnostics.CreateScope("HybridComputeGatewayCollection.GetIfExists"); - scope.Start(); - try - { - var response = _hybridComputeGatewayGatewaysRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, gatewayName, cancellationToken: cancellationToken); - if (response.Value == null) - return new NoValueResponse(response.GetRawResponse()); - return Response.FromValue(new HybridComputeGatewayResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetAll().GetEnumerator(); - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetAll().GetEnumerator(); - } - - IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) - { - return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); - } - } -} diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeGatewayData.Serialization.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeGatewayData.Serialization.cs deleted file mode 100644 index 11772b20cf5c..000000000000 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeGatewayData.Serialization.cs +++ /dev/null @@ -1,495 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Text.Json; -using Azure.Core; -using Azure.ResourceManager.HybridCompute.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.HybridCompute -{ - public partial class HybridComputeGatewayData : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(HybridComputeGatewayData)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("properties"u8); - writer.WriteStartObject(); - if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) - { - writer.WritePropertyName("provisioningState"u8); - writer.WriteStringValue(ProvisioningState.Value.ToString()); - } - if (options.Format != "W" && Optional.IsDefined(GatewayId)) - { - writer.WritePropertyName("gatewayId"u8); - writer.WriteStringValue(GatewayId); - } - if (Optional.IsDefined(GatewayType)) - { - writer.WritePropertyName("gatewayType"u8); - writer.WriteStringValue(GatewayType.Value.ToString()); - } - if (options.Format != "W" && Optional.IsDefined(GatewayEndpoint)) - { - writer.WritePropertyName("gatewayEndpoint"u8); - writer.WriteStringValue(GatewayEndpoint); - } - if (Optional.IsCollectionDefined(AllowedFeatures)) - { - writer.WritePropertyName("allowedFeatures"u8); - writer.WriteStartArray(); - foreach (var item in AllowedFeatures) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - writer.WriteEndObject(); - } - - HybridComputeGatewayData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(HybridComputeGatewayData)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeHybridComputeGatewayData(document.RootElement, options); - } - - internal static HybridComputeGatewayData DeserializeHybridComputeGatewayData(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IDictionary tags = default; - AzureLocation location = default; - ResourceIdentifier id = default; - string name = default; - ResourceType type = default; - SystemData systemData = default; - HybridComputeProvisioningState? provisioningState = default; - string gatewayId = default; - HybridComputeGatewayType? gatewayType = default; - string gatewayEndpoint = default; - IList allowedFeatures = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("tags"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - tags = dictionary; - continue; - } - if (property.NameEquals("location"u8)) - { - location = new AzureLocation(property.Value.GetString()); - continue; - } - if (property.NameEquals("id"u8)) - { - id = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = new ResourceType(property.Value.GetString()); - continue; - } - if (property.NameEquals("systemData"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("properties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("provisioningState"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - provisioningState = new HybridComputeProvisioningState(property0.Value.GetString()); - continue; - } - if (property0.NameEquals("gatewayId"u8)) - { - gatewayId = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("gatewayType"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - gatewayType = new HybridComputeGatewayType(property0.Value.GetString()); - continue; - } - if (property0.NameEquals("gatewayEndpoint"u8)) - { - gatewayEndpoint = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("allowedFeatures"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - allowedFeatures = array; - continue; - } - } - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new HybridComputeGatewayData( - id, - name, - type, - systemData, - tags ?? new ChangeTrackingDictionary(), - location, - provisioningState, - gatewayId, - gatewayType, - gatewayEndpoint, - allowedFeatures ?? new ChangeTrackingList(), - serializedAdditionalRawData); - } - - private BinaryData SerializeBicep(ModelReaderWriterOptions options) - { - StringBuilder builder = new StringBuilder(); - BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; - IDictionary propertyOverrides = null; - bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); - bool hasPropertyOverride = false; - string propertyOverride = null; - - builder.AppendLine("{"); - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" name: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(Name)) - { - builder.Append(" name: "); - if (Name.Contains(Environment.NewLine)) - { - builder.AppendLine("'''"); - builder.AppendLine($"{Name}'''"); - } - else - { - builder.AppendLine($"'{Name}'"); - } - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Location), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" location: "); - builder.AppendLine(propertyOverride); - } - else - { - builder.Append(" location: "); - builder.AppendLine($"'{Location.ToString()}'"); - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Tags), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" tags: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsCollectionDefined(Tags)) - { - if (Tags.Any()) - { - builder.Append(" tags: "); - builder.AppendLine("{"); - foreach (var item in Tags) - { - builder.Append($" '{item.Key}': "); - if (item.Value == null) - { - builder.Append("null"); - continue; - } - if (item.Value.Contains(Environment.NewLine)) - { - builder.AppendLine("'''"); - builder.AppendLine($"{item.Value}'''"); - } - else - { - builder.AppendLine($"'{item.Value}'"); - } - } - builder.AppendLine(" }"); - } - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" id: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(Id)) - { - builder.Append(" id: "); - builder.AppendLine($"'{Id.ToString()}'"); - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" systemData: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(SystemData)) - { - builder.Append(" systemData: "); - builder.AppendLine($"'{SystemData.ToString()}'"); - } - } - - builder.Append(" properties:"); - builder.AppendLine(" {"); - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ProvisioningState), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" provisioningState: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(ProvisioningState)) - { - builder.Append(" provisioningState: "); - builder.AppendLine($"'{ProvisioningState.Value.ToString()}'"); - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(GatewayId), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" gatewayId: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(GatewayId)) - { - builder.Append(" gatewayId: "); - if (GatewayId.Contains(Environment.NewLine)) - { - builder.AppendLine("'''"); - builder.AppendLine($"{GatewayId}'''"); - } - else - { - builder.AppendLine($"'{GatewayId}'"); - } - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(GatewayType), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" gatewayType: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(GatewayType)) - { - builder.Append(" gatewayType: "); - builder.AppendLine($"'{GatewayType.Value.ToString()}'"); - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(GatewayEndpoint), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" gatewayEndpoint: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(GatewayEndpoint)) - { - builder.Append(" gatewayEndpoint: "); - if (GatewayEndpoint.Contains(Environment.NewLine)) - { - builder.AppendLine("'''"); - builder.AppendLine($"{GatewayEndpoint}'''"); - } - else - { - builder.AppendLine($"'{GatewayEndpoint}'"); - } - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AllowedFeatures), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" allowedFeatures: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsCollectionDefined(AllowedFeatures)) - { - if (AllowedFeatures.Any()) - { - builder.Append(" allowedFeatures: "); - builder.AppendLine("["); - foreach (var item in AllowedFeatures) - { - if (item == null) - { - builder.Append("null"); - continue; - } - if (item.Contains(Environment.NewLine)) - { - builder.AppendLine(" '''"); - builder.AppendLine($"{item}'''"); - } - else - { - builder.AppendLine($" '{item}'"); - } - } - builder.AppendLine(" ]"); - } - } - } - - builder.AppendLine(" }"); - builder.AppendLine("}"); - return BinaryData.FromString(builder.ToString()); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - case "bicep": - return SerializeBicep(options); - default: - throw new FormatException($"The model {nameof(HybridComputeGatewayData)} does not support writing '{options.Format}' format."); - } - } - - HybridComputeGatewayData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeHybridComputeGatewayData(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(HybridComputeGatewayData)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeGatewayData.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeGatewayData.cs deleted file mode 100644 index f4d567d6c7ef..000000000000 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeGatewayData.cs +++ /dev/null @@ -1,105 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using Azure.Core; -using Azure.ResourceManager.HybridCompute.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.HybridCompute -{ - /// - /// A class representing the HybridComputeGateway data model. - /// Describes an Arc Gateway. - /// - public partial class HybridComputeGatewayData : TrackedResourceData - { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; - - /// Initializes a new instance of . - /// The location. - public HybridComputeGatewayData(AzureLocation location) : base(location) - { - AllowedFeatures = new ChangeTrackingList(); - } - - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The tags. - /// The location. - /// The provisioning state, which only appears in the response. - /// A unique, immutable, identifier for the Gateway. - /// The type of the Gateway resource. - /// The endpoint fqdn for the Gateway. - /// Specifies the list of features that are enabled for this Gateway. - /// Keeps track of any properties unknown to the library. - internal HybridComputeGatewayData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, HybridComputeProvisioningState? provisioningState, string gatewayId, HybridComputeGatewayType? gatewayType, string gatewayEndpoint, IList allowedFeatures, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) - { - ProvisioningState = provisioningState; - GatewayId = gatewayId; - GatewayType = gatewayType; - GatewayEndpoint = gatewayEndpoint; - AllowedFeatures = allowedFeatures; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal HybridComputeGatewayData() - { - } - - /// The provisioning state, which only appears in the response. - [WirePath("properties.provisioningState")] - public HybridComputeProvisioningState? ProvisioningState { get; } - /// A unique, immutable, identifier for the Gateway. - [WirePath("properties.gatewayId")] - public string GatewayId { get; } - /// The type of the Gateway resource. - [WirePath("properties.gatewayType")] - public HybridComputeGatewayType? GatewayType { get; set; } - /// The endpoint fqdn for the Gateway. - [WirePath("properties.gatewayEndpoint")] - public string GatewayEndpoint { get; } - /// Specifies the list of features that are enabled for this Gateway. - [WirePath("properties.allowedFeatures")] - public IList AllowedFeatures { get; } - } -} diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeGatewayResource.Serialization.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeGatewayResource.Serialization.cs deleted file mode 100644 index 449a75c8fb2e..000000000000 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeGatewayResource.Serialization.cs +++ /dev/null @@ -1,26 +0,0 @@ -// 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.HybridCompute -{ - public partial class HybridComputeGatewayResource : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - - HybridComputeGatewayData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); - - HybridComputeGatewayData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); - } -} diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeLicenseCollection.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeLicenseCollection.cs index 0fc032155a02..52411a343903 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeLicenseCollection.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeLicenseCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUp /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUnt /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(strin /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string licenseName, Ca /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(Cancellat /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationToken c /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string licenseName, Cancel /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string licenseName, CancellationToken cance /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task> GetIfE /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeLicenseProfileData.Serialization.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeLicenseProfileData.Serialization.cs new file mode 100644 index 000000000000..c0ffc6e4996d --- /dev/null +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeLicenseProfileData.Serialization.cs @@ -0,0 +1,896 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.HybridCompute.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.HybridCompute +{ + public partial class HybridComputeLicenseProfileData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(HybridComputeLicenseProfileData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + writer.WritePropertyName("productProfile"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(SubscriptionStatus)) + { + writer.WritePropertyName("subscriptionStatus"u8); + writer.WriteStringValue(SubscriptionStatus.Value.ToString()); + } + if (Optional.IsDefined(ProductType)) + { + writer.WritePropertyName("productType"u8); + writer.WriteStringValue(ProductType.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(EnrollmentOn)) + { + writer.WritePropertyName("enrollmentDate"u8); + writer.WriteStringValue(EnrollmentOn.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(BillingStartOn)) + { + writer.WritePropertyName("billingStartDate"u8); + writer.WriteStringValue(BillingStartOn.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(DisenrollmentOn)) + { + writer.WritePropertyName("disenrollmentDate"u8); + writer.WriteStringValue(DisenrollmentOn.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(BillingEndOn)) + { + writer.WritePropertyName("billingEndDate"u8); + writer.WriteStringValue(BillingEndOn.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(Error)) + { + writer.WritePropertyName("error"u8); + JsonSerializer.Serialize(writer, Error); + } + if (Optional.IsCollectionDefined(ProductFeatures)) + { + writer.WritePropertyName("productFeatures"u8); + writer.WriteStartArray(); + foreach (var item in ProductFeatures) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + writer.WritePropertyName("esuProfile"u8); + writer.WriteStartObject(); + if (options.Format != "W" && Optional.IsDefined(AssignedLicenseImmutableId)) + { + writer.WritePropertyName("assignedLicenseImmutableId"u8); + writer.WriteStringValue(AssignedLicenseImmutableId.Value); + } + if (options.Format != "W" && Optional.IsCollectionDefined(EsuKeys)) + { + writer.WritePropertyName("esuKeys"u8); + writer.WriteStartArray(); + foreach (var item in EsuKeys) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsDefined(ServerType)) + { + writer.WritePropertyName("serverType"u8); + writer.WriteStringValue(ServerType.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(EsuEligibility)) + { + writer.WritePropertyName("esuEligibility"u8); + writer.WriteStringValue(EsuEligibility.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(EsuKeyState)) + { + writer.WritePropertyName("esuKeyState"u8); + writer.WriteStringValue(EsuKeyState.Value.ToString()); + } + if (Optional.IsDefined(AssignedLicense)) + { + writer.WritePropertyName("assignedLicense"u8); + writer.WriteStringValue(AssignedLicense); + } + writer.WriteEndObject(); + writer.WritePropertyName("softwareAssurance"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(SoftwareAssuranceCustomer)) + { + writer.WritePropertyName("softwareAssuranceCustomer"u8); + writer.WriteBooleanValue(SoftwareAssuranceCustomer.Value); + } + writer.WriteEndObject(); + writer.WriteEndObject(); + } + + HybridComputeLicenseProfileData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(HybridComputeLicenseProfileData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeHybridComputeLicenseProfileData(document.RootElement, options); + } + + internal static HybridComputeLicenseProfileData DeserializeHybridComputeLicenseProfileData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IDictionary tags = default; + AzureLocation location = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + HybridComputeProvisioningState? provisioningState = default; + LicenseProfileSubscriptionStatus? subscriptionStatus = default; + LicenseProfileProductType? productType = default; + DateTimeOffset? enrollmentDate = default; + DateTimeOffset? billingStartDate = default; + DateTimeOffset? disenrollmentDate = default; + DateTimeOffset? billingEndDate = default; + ResponseError error = default; + IList productFeatures = default; + Guid? assignedLicenseImmutableId = default; + IReadOnlyList esuKeys = default; + EsuServerType? serverType = default; + EsuEligibility? esuEligibility = default; + EsuKeyState? esuKeyState = default; + string assignedLicense = default; + bool? softwareAssuranceCustomer = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("location"u8)) + { + location = new AzureLocation(property.Value.GetString()); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("provisioningState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new HybridComputeProvisioningState(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("productProfile"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + property0.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property1 in property0.Value.EnumerateObject()) + { + if (property1.NameEquals("subscriptionStatus"u8)) + { + if (property1.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + subscriptionStatus = new LicenseProfileSubscriptionStatus(property1.Value.GetString()); + continue; + } + if (property1.NameEquals("productType"u8)) + { + if (property1.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + productType = new LicenseProfileProductType(property1.Value.GetString()); + continue; + } + if (property1.NameEquals("enrollmentDate"u8)) + { + if (property1.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + enrollmentDate = property1.Value.GetDateTimeOffset("O"); + continue; + } + if (property1.NameEquals("billingStartDate"u8)) + { + if (property1.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + billingStartDate = property1.Value.GetDateTimeOffset("O"); + continue; + } + if (property1.NameEquals("disenrollmentDate"u8)) + { + if (property1.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + disenrollmentDate = property1.Value.GetDateTimeOffset("O"); + continue; + } + if (property1.NameEquals("billingEndDate"u8)) + { + if (property1.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + billingEndDate = property1.Value.GetDateTimeOffset("O"); + continue; + } + if (property1.NameEquals("error"u8)) + { + if (property1.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + error = JsonSerializer.Deserialize(property1.Value.GetRawText()); + continue; + } + if (property1.NameEquals("productFeatures"u8)) + { + if (property1.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property1.Value.EnumerateArray()) + { + array.Add(HybridComputeProductFeature.DeserializeHybridComputeProductFeature(item, options)); + } + productFeatures = array; + continue; + } + } + continue; + } + if (property0.NameEquals("esuProfile"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + property0.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property1 in property0.Value.EnumerateObject()) + { + if (property1.NameEquals("assignedLicenseImmutableId"u8)) + { + if (property1.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + assignedLicenseImmutableId = property1.Value.GetGuid(); + continue; + } + if (property1.NameEquals("esuKeys"u8)) + { + if (property1.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property1.Value.EnumerateArray()) + { + array.Add(EsuKey.DeserializeEsuKey(item, options)); + } + esuKeys = array; + continue; + } + if (property1.NameEquals("serverType"u8)) + { + if (property1.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + serverType = new EsuServerType(property1.Value.GetString()); + continue; + } + if (property1.NameEquals("esuEligibility"u8)) + { + if (property1.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + esuEligibility = new EsuEligibility(property1.Value.GetString()); + continue; + } + if (property1.NameEquals("esuKeyState"u8)) + { + if (property1.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + esuKeyState = new EsuKeyState(property1.Value.GetString()); + continue; + } + if (property1.NameEquals("assignedLicense"u8)) + { + assignedLicense = property1.Value.GetString(); + continue; + } + } + continue; + } + if (property0.NameEquals("softwareAssurance"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + property0.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property1 in property0.Value.EnumerateObject()) + { + if (property1.NameEquals("softwareAssuranceCustomer"u8)) + { + if (property1.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + softwareAssuranceCustomer = property1.Value.GetBoolean(); + continue; + } + } + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new HybridComputeLicenseProfileData( + id, + name, + type, + systemData, + tags ?? new ChangeTrackingDictionary(), + location, + provisioningState, + subscriptionStatus, + productType, + enrollmentDate, + billingStartDate, + disenrollmentDate, + billingEndDate, + error, + productFeatures ?? new ChangeTrackingList(), + assignedLicenseImmutableId, + esuKeys ?? new ChangeTrackingList(), + serverType, + esuEligibility, + esuKeyState, + assignedLicense, + softwareAssuranceCustomer, + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Location), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" location: "); + builder.AppendLine(propertyOverride); + } + else + { + builder.Append(" location: "); + builder.AppendLine($"'{Location.ToString()}'"); + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Tags), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" tags: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Tags)) + { + if (Tags.Any()) + { + builder.Append(" tags: "); + builder.AppendLine("{"); + foreach (var item in Tags) + { + builder.Append($" '{item.Key}': "); + if (item.Value == null) + { + builder.Append("null"); + continue; + } + if (item.Value.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{item.Value}'''"); + } + else + { + builder.AppendLine($"'{item.Value}'"); + } + } + builder.AppendLine(" }"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ProvisioningState), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" provisioningState: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ProvisioningState)) + { + builder.Append(" provisioningState: "); + builder.AppendLine($"'{ProvisioningState.Value.ToString()}'"); + } + } + + builder.Append(" productProfile:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SubscriptionStatus), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" subscriptionStatus: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SubscriptionStatus)) + { + builder.Append(" subscriptionStatus: "); + builder.AppendLine($"'{SubscriptionStatus.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ProductType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" productType: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ProductType)) + { + builder.Append(" productType: "); + builder.AppendLine($"'{ProductType.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(EnrollmentOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" enrollmentDate: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(EnrollmentOn)) + { + builder.Append(" enrollmentDate: "); + var formattedDateTimeString = TypeFormatters.ToString(EnrollmentOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(BillingStartOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" billingStartDate: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(BillingStartOn)) + { + builder.Append(" billingStartDate: "); + var formattedDateTimeString = TypeFormatters.ToString(BillingStartOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DisenrollmentOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" disenrollmentDate: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DisenrollmentOn)) + { + builder.Append(" disenrollmentDate: "); + var formattedDateTimeString = TypeFormatters.ToString(DisenrollmentOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(BillingEndOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" billingEndDate: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(BillingEndOn)) + { + builder.Append(" billingEndDate: "); + var formattedDateTimeString = TypeFormatters.ToString(BillingEndOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Error), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" error: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Error)) + { + builder.Append(" error: "); + BicepSerializationHelpers.AppendChildObject(builder, Error, options, 6, false, " error: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ProductFeatures), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" productFeatures: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(ProductFeatures)) + { + if (ProductFeatures.Any()) + { + builder.Append(" productFeatures: "); + builder.AppendLine("["); + foreach (var item in ProductFeatures) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 8, true, " productFeatures: "); + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine(" }"); + builder.Append(" esuProfile:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AssignedLicenseImmutableId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" assignedLicenseImmutableId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AssignedLicenseImmutableId)) + { + builder.Append(" assignedLicenseImmutableId: "); + builder.AppendLine($"'{AssignedLicenseImmutableId.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(EsuKeys), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" esuKeys: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(EsuKeys)) + { + if (EsuKeys.Any()) + { + builder.Append(" esuKeys: "); + builder.AppendLine("["); + foreach (var item in EsuKeys) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 8, true, " esuKeys: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ServerType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" serverType: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ServerType)) + { + builder.Append(" serverType: "); + builder.AppendLine($"'{ServerType.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(EsuEligibility), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" esuEligibility: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(EsuEligibility)) + { + builder.Append(" esuEligibility: "); + builder.AppendLine($"'{EsuEligibility.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(EsuKeyState), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" esuKeyState: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(EsuKeyState)) + { + builder.Append(" esuKeyState: "); + builder.AppendLine($"'{EsuKeyState.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AssignedLicense), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" assignedLicense: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AssignedLicense)) + { + builder.Append(" assignedLicense: "); + if (AssignedLicense.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{AssignedLicense}'''"); + } + else + { + builder.AppendLine($"'{AssignedLicense}'"); + } + } + } + + builder.AppendLine(" }"); + builder.Append(" softwareAssurance:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SoftwareAssuranceCustomer), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" softwareAssuranceCustomer: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SoftwareAssuranceCustomer)) + { + builder.Append(" softwareAssuranceCustomer: "); + var boolValue = SoftwareAssuranceCustomer.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + builder.AppendLine(" }"); + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(HybridComputeLicenseProfileData)} does not support writing '{options.Format}' format."); + } + } + + HybridComputeLicenseProfileData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeHybridComputeLicenseProfileData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(HybridComputeLicenseProfileData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeLicenseProfileData.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeLicenseProfileData.cs new file mode 100644 index 000000000000..bc9a62c2a8aa --- /dev/null +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeLicenseProfileData.cs @@ -0,0 +1,161 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.HybridCompute.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.HybridCompute +{ + /// + /// A class representing the HybridComputeLicenseProfile data model. + /// Describes a license profile in a hybrid machine. + /// + public partial class HybridComputeLicenseProfileData : TrackedResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The location. + public HybridComputeLicenseProfileData(AzureLocation location) : base(location) + { + ProductFeatures = new ChangeTrackingList(); + EsuKeys = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The provisioning state, which only appears in the response. + /// Indicates the subscription status of the product. + /// Indicates the product type of the license. + /// The timestamp in UTC when the user enrolls the feature. + /// The timestamp in UTC when the billing starts. + /// The timestamp in UTC when the user disenrolled the feature. + /// The timestamp in UTC when the billing ends. + /// The errors that were encountered during the feature enrollment or disenrollment. + /// The list of product features. + /// The guid id of the license. + /// The list of ESU keys. + /// The type of the Esu servers. + /// Indicates the eligibility state of Esu. + /// Indicates whether there is an ESU Key currently active for the machine. + /// The resource id of the license. + /// Specifies if this machine is licensed as part of a Software Assurance agreement. + /// Keeps track of any properties unknown to the library. + internal HybridComputeLicenseProfileData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, HybridComputeProvisioningState? provisioningState, LicenseProfileSubscriptionStatus? subscriptionStatus, LicenseProfileProductType? productType, DateTimeOffset? enrollmentOn, DateTimeOffset? billingStartOn, DateTimeOffset? disenrollmentOn, DateTimeOffset? billingEndOn, ResponseError error, IList productFeatures, Guid? assignedLicenseImmutableId, IReadOnlyList esuKeys, EsuServerType? serverType, EsuEligibility? esuEligibility, EsuKeyState? esuKeyState, string assignedLicense, bool? softwareAssuranceCustomer, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + { + ProvisioningState = provisioningState; + SubscriptionStatus = subscriptionStatus; + ProductType = productType; + EnrollmentOn = enrollmentOn; + BillingStartOn = billingStartOn; + DisenrollmentOn = disenrollmentOn; + BillingEndOn = billingEndOn; + Error = error; + ProductFeatures = productFeatures; + AssignedLicenseImmutableId = assignedLicenseImmutableId; + EsuKeys = esuKeys; + ServerType = serverType; + EsuEligibility = esuEligibility; + EsuKeyState = esuKeyState; + AssignedLicense = assignedLicense; + SoftwareAssuranceCustomer = softwareAssuranceCustomer; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal HybridComputeLicenseProfileData() + { + } + + /// The provisioning state, which only appears in the response. + [WirePath("properties.provisioningState")] + public HybridComputeProvisioningState? ProvisioningState { get; } + /// Indicates the subscription status of the product. + [WirePath("properties.subscriptionStatus")] + public LicenseProfileSubscriptionStatus? SubscriptionStatus { get; set; } + /// Indicates the product type of the license. + [WirePath("properties.productType")] + public LicenseProfileProductType? ProductType { get; set; } + /// The timestamp in UTC when the user enrolls the feature. + [WirePath("properties.enrollmentDate")] + public DateTimeOffset? EnrollmentOn { get; } + /// The timestamp in UTC when the billing starts. + [WirePath("properties.billingStartDate")] + public DateTimeOffset? BillingStartOn { get; } + /// The timestamp in UTC when the user disenrolled the feature. + [WirePath("properties.disenrollmentDate")] + public DateTimeOffset? DisenrollmentOn { get; } + /// The timestamp in UTC when the billing ends. + [WirePath("properties.billingEndDate")] + public DateTimeOffset? BillingEndOn { get; } + /// The errors that were encountered during the feature enrollment or disenrollment. + [WirePath("properties.error")] + public ResponseError Error { get; } + /// The list of product features. + [WirePath("properties.productFeatures")] + public IList ProductFeatures { get; } + /// The guid id of the license. + [WirePath("properties.assignedLicenseImmutableId")] + public Guid? AssignedLicenseImmutableId { get; } + /// The list of ESU keys. + [WirePath("properties.esuKeys")] + public IReadOnlyList EsuKeys { get; } + /// The type of the Esu servers. + [WirePath("properties.serverType")] + public EsuServerType? ServerType { get; } + /// Indicates the eligibility state of Esu. + [WirePath("properties.esuEligibility")] + public EsuEligibility? EsuEligibility { get; } + /// Indicates whether there is an ESU Key currently active for the machine. + [WirePath("properties.esuKeyState")] + public EsuKeyState? EsuKeyState { get; } + /// The resource id of the license. + [WirePath("properties.assignedLicense")] + public string AssignedLicense { get; set; } + /// Specifies if this machine is licensed as part of a Software Assurance agreement. + [WirePath("properties.softwareAssuranceCustomer")] + public bool? SoftwareAssuranceCustomer { get; set; } + } +} diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeLicenseProfileResource.Serialization.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeLicenseProfileResource.Serialization.cs new file mode 100644 index 000000000000..7e19e9b0ca89 --- /dev/null +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeLicenseProfileResource.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.HybridCompute +{ + public partial class HybridComputeLicenseProfileResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + HybridComputeLicenseProfileData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + HybridComputeLicenseProfileData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeLicenseProfileResource.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeLicenseProfileResource.cs new file mode 100644 index 000000000000..954cf8f5c364 --- /dev/null +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeLicenseProfileResource.cs @@ -0,0 +1,798 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.HybridCompute.Models; + +namespace Azure.ResourceManager.HybridCompute +{ + /// + /// A Class representing a HybridComputeLicenseProfile along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetHybridComputeLicenseProfileResource method. + /// Otherwise you can get one from its parent resource using the GetHybridComputeLicenseProfile method. + /// + public partial class HybridComputeLicenseProfileResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The machineName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string machineName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/licenseProfiles/default"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _hybridComputeLicenseProfileLicenseProfilesClientDiagnostics; + private readonly LicenseProfilesRestOperations _hybridComputeLicenseProfileLicenseProfilesRestClient; + private readonly HybridComputeLicenseProfileData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.HybridCompute/machines/licenseProfiles"; + + /// Initializes a new instance of the class for mocking. + protected HybridComputeLicenseProfileResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal HybridComputeLicenseProfileResource(ArmClient client, HybridComputeLicenseProfileData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal HybridComputeLicenseProfileResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _hybridComputeLicenseProfileLicenseProfilesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.HybridCompute", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string hybridComputeLicenseProfileLicenseProfilesApiVersion); + _hybridComputeLicenseProfileLicenseProfilesRestClient = new LicenseProfilesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, hybridComputeLicenseProfileLicenseProfilesApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual HybridComputeLicenseProfileData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Retrieves information about the view of a license profile. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/licenseProfiles/{licenseProfileName} + /// + /// + /// Operation Id + /// LicenseProfiles_Get + /// + /// + /// Default Api Version + /// 2024-07-10 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _hybridComputeLicenseProfileLicenseProfilesClientDiagnostics.CreateScope("HybridComputeLicenseProfileResource.Get"); + scope.Start(); + try + { + var response = await _hybridComputeLicenseProfileLicenseProfilesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new HybridComputeLicenseProfileResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Retrieves information about the view of a license profile. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/licenseProfiles/{licenseProfileName} + /// + /// + /// Operation Id + /// LicenseProfiles_Get + /// + /// + /// Default Api Version + /// 2024-07-10 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _hybridComputeLicenseProfileLicenseProfilesClientDiagnostics.CreateScope("HybridComputeLicenseProfileResource.Get"); + scope.Start(); + try + { + var response = _hybridComputeLicenseProfileLicenseProfilesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new HybridComputeLicenseProfileResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// The operation to delete a license profile. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/licenseProfiles/{licenseProfileName} + /// + /// + /// Operation Id + /// LicenseProfiles_Delete + /// + /// + /// Default Api Version + /// 2024-07-10 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _hybridComputeLicenseProfileLicenseProfilesClientDiagnostics.CreateScope("HybridComputeLicenseProfileResource.Delete"); + scope.Start(); + try + { + var response = await _hybridComputeLicenseProfileLicenseProfilesRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, cancellationToken).ConfigureAwait(false); + var operation = new HybridComputeArmOperation(_hybridComputeLicenseProfileLicenseProfilesClientDiagnostics, Pipeline, _hybridComputeLicenseProfileLicenseProfilesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// The operation to delete a license profile. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/licenseProfiles/{licenseProfileName} + /// + /// + /// Operation Id + /// LicenseProfiles_Delete + /// + /// + /// Default Api Version + /// 2024-07-10 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _hybridComputeLicenseProfileLicenseProfilesClientDiagnostics.CreateScope("HybridComputeLicenseProfileResource.Delete"); + scope.Start(); + try + { + var response = _hybridComputeLicenseProfileLicenseProfilesRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, cancellationToken); + var operation = new HybridComputeArmOperation(_hybridComputeLicenseProfileLicenseProfilesClientDiagnostics, Pipeline, _hybridComputeLicenseProfileLicenseProfilesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// The operation to update a license profile. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/licenseProfiles/{licenseProfileName} + /// + /// + /// Operation Id + /// LicenseProfiles_Update + /// + /// + /// Default Api Version + /// 2024-07-10 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Parameters supplied to the Update license profile operation. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, HybridComputeLicenseProfilePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _hybridComputeLicenseProfileLicenseProfilesClientDiagnostics.CreateScope("HybridComputeLicenseProfileResource.Update"); + scope.Start(); + try + { + var response = await _hybridComputeLicenseProfileLicenseProfilesRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, patch, cancellationToken).ConfigureAwait(false); + var operation = new HybridComputeArmOperation(new HybridComputeLicenseProfileOperationSource(Client), _hybridComputeLicenseProfileLicenseProfilesClientDiagnostics, Pipeline, _hybridComputeLicenseProfileLicenseProfilesRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, patch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// The operation to update a license profile. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/licenseProfiles/{licenseProfileName} + /// + /// + /// Operation Id + /// LicenseProfiles_Update + /// + /// + /// Default Api Version + /// 2024-07-10 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Parameters supplied to the Update license profile operation. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, HybridComputeLicenseProfilePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _hybridComputeLicenseProfileLicenseProfilesClientDiagnostics.CreateScope("HybridComputeLicenseProfileResource.Update"); + scope.Start(); + try + { + var response = _hybridComputeLicenseProfileLicenseProfilesRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, patch, cancellationToken); + var operation = new HybridComputeArmOperation(new HybridComputeLicenseProfileOperationSource(Client), _hybridComputeLicenseProfileLicenseProfilesClientDiagnostics, Pipeline, _hybridComputeLicenseProfileLicenseProfilesRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, patch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// The operation to create or update a license profile. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/licenseProfiles/{licenseProfileName} + /// + /// + /// Operation Id + /// LicenseProfiles_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-07-10 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Parameters supplied to the Create or Update license profile operation. + /// The cancellation token to use. + /// is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, HybridComputeLicenseProfileData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _hybridComputeLicenseProfileLicenseProfilesClientDiagnostics.CreateScope("HybridComputeLicenseProfileResource.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _hybridComputeLicenseProfileLicenseProfilesRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new HybridComputeArmOperation(new HybridComputeLicenseProfileOperationSource(Client), _hybridComputeLicenseProfileLicenseProfilesClientDiagnostics, Pipeline, _hybridComputeLicenseProfileLicenseProfilesRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// The operation to create or update a license profile. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/licenseProfiles/{licenseProfileName} + /// + /// + /// Operation Id + /// LicenseProfiles_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-07-10 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Parameters supplied to the Create or Update license profile operation. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, HybridComputeLicenseProfileData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _hybridComputeLicenseProfileLicenseProfilesClientDiagnostics.CreateScope("HybridComputeLicenseProfileResource.CreateOrUpdate"); + scope.Start(); + try + { + var response = _hybridComputeLicenseProfileLicenseProfilesRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, data, cancellationToken); + var operation = new HybridComputeArmOperation(new HybridComputeLicenseProfileOperationSource(Client), _hybridComputeLicenseProfileLicenseProfilesClientDiagnostics, Pipeline, _hybridComputeLicenseProfileLicenseProfilesRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/licenseProfiles/{licenseProfileName} + /// + /// + /// Operation Id + /// LicenseProfiles_Get + /// + /// + /// Default Api Version + /// 2024-07-10 + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _hybridComputeLicenseProfileLicenseProfilesClientDiagnostics.CreateScope("HybridComputeLicenseProfileResource.AddTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues[key] = value; + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _hybridComputeLicenseProfileLicenseProfilesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new HybridComputeLicenseProfileResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new HybridComputeLicenseProfilePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/licenseProfiles/{licenseProfileName} + /// + /// + /// Operation Id + /// LicenseProfiles_Get + /// + /// + /// Default Api Version + /// 2024-07-10 + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _hybridComputeLicenseProfileLicenseProfilesClientDiagnostics.CreateScope("HybridComputeLicenseProfileResource.AddTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues[key] = value; + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _hybridComputeLicenseProfileLicenseProfilesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, cancellationToken); + return Response.FromValue(new HybridComputeLicenseProfileResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new HybridComputeLicenseProfilePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/licenseProfiles/{licenseProfileName} + /// + /// + /// Operation Id + /// LicenseProfiles_Get + /// + /// + /// Default Api Version + /// 2024-07-10 + /// + /// + /// Resource + /// + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _hybridComputeLicenseProfileLicenseProfilesClientDiagnostics.CreateScope("HybridComputeLicenseProfileResource.SetTags"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + await GetTagResource().DeleteAsync(WaitUntil.Completed, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _hybridComputeLicenseProfileLicenseProfilesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new HybridComputeLicenseProfileResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new HybridComputeLicenseProfilePatch(); + patch.Tags.ReplaceWith(tags); + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/licenseProfiles/{licenseProfileName} + /// + /// + /// Operation Id + /// LicenseProfiles_Get + /// + /// + /// Default Api Version + /// 2024-07-10 + /// + /// + /// Resource + /// + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _hybridComputeLicenseProfileLicenseProfilesClientDiagnostics.CreateScope("HybridComputeLicenseProfileResource.SetTags"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + GetTagResource().Delete(WaitUntil.Completed, cancellationToken: cancellationToken); + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _hybridComputeLicenseProfileLicenseProfilesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, cancellationToken); + return Response.FromValue(new HybridComputeLicenseProfileResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new HybridComputeLicenseProfilePatch(); + patch.Tags.ReplaceWith(tags); + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/licenseProfiles/{licenseProfileName} + /// + /// + /// Operation Id + /// LicenseProfiles_Get + /// + /// + /// Default Api Version + /// 2024-07-10 + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _hybridComputeLicenseProfileLicenseProfilesClientDiagnostics.CreateScope("HybridComputeLicenseProfileResource.RemoveTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.Remove(key); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _hybridComputeLicenseProfileLicenseProfilesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new HybridComputeLicenseProfileResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new HybridComputeLicenseProfilePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/licenseProfiles/{licenseProfileName} + /// + /// + /// Operation Id + /// LicenseProfiles_Get + /// + /// + /// Default Api Version + /// 2024-07-10 + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _hybridComputeLicenseProfileLicenseProfilesClientDiagnostics.CreateScope("HybridComputeLicenseProfileResource.RemoveTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.Remove(key); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _hybridComputeLicenseProfileLicenseProfilesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, cancellationToken); + return Response.FromValue(new HybridComputeLicenseProfileResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new HybridComputeLicenseProfilePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeLicenseResource.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeLicenseResource.cs index d9b03e64d433..30dc2a905899 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeLicenseResource.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeLicenseResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Cance /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken canc /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -266,7 +266,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual async Task> UpdateAsyn /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -358,7 +358,7 @@ public virtual ArmOperation Update(WaitUntil waitU /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -415,7 +415,7 @@ public virtual async Task> AddTagAsync(st /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -472,7 +472,7 @@ public virtual Response AddTag(string key, string /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -528,7 +528,7 @@ public virtual async Task> SetTagsAsync(I /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -584,7 +584,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -639,7 +639,7 @@ public virtual async Task> RemoveTagAsync /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeMachineCollection.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeMachineCollection.cs index 4773f96550d2..6b43a8f2f6da 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeMachineCollection.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeMachineCollection.cs @@ -52,6 +52,110 @@ internal static void ValidateResourceId(ResourceIdentifier id) throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceGroupResource.ResourceType), nameof(id)); } + /// + /// The operation to create or update a hybrid machine. Please note some properties can be set only during machine creation. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName} + /// + /// + /// Operation Id + /// Machines_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-07-10 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the hybrid machine. + /// Parameters supplied to the Create hybrid machine operation. + /// Expands referenced resources. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string machineName, HybridComputeMachineData data, string expand = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(machineName, nameof(machineName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _hybridComputeMachineMachinesClientDiagnostics.CreateScope("HybridComputeMachineCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _hybridComputeMachineMachinesRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, machineName, data, expand, cancellationToken).ConfigureAwait(false); + var uri = _hybridComputeMachineMachinesRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, machineName, data, expand); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new HybridComputeArmOperation(Response.FromValue(new HybridComputeMachineResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// The operation to create or update a hybrid machine. Please note some properties can be set only during machine creation. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName} + /// + /// + /// Operation Id + /// Machines_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-07-10 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the hybrid machine. + /// Parameters supplied to the Create hybrid machine operation. + /// Expands referenced resources. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string machineName, HybridComputeMachineData data, string expand = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(machineName, nameof(machineName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _hybridComputeMachineMachinesClientDiagnostics.CreateScope("HybridComputeMachineCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _hybridComputeMachineMachinesRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, machineName, data, expand, cancellationToken); + var uri = _hybridComputeMachineMachinesRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, machineName, data, expand); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new HybridComputeArmOperation(Response.FromValue(new HybridComputeMachineResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + /// /// Retrieves information about the model view or the instance view of a hybrid machine. /// @@ -65,7 +169,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -111,7 +215,7 @@ public virtual async Task> GetAsync(strin /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -157,7 +261,7 @@ public virtual Response Get(string machineName, st /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -188,7 +292,7 @@ public virtual AsyncPageable GetAllAsync(string ex /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -219,7 +323,7 @@ public virtual Pageable GetAll(string expand = nul /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -263,7 +367,7 @@ public virtual async Task> ExistsAsync(string machineName, string /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -307,7 +411,7 @@ public virtual Response Exists(string machineName, string expand = null, C /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -353,7 +457,7 @@ public virtual async Task> GetIfE /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeMachineExtensionCollection.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeMachineExtensionCollection.cs index 738c7626c5e6..36fbec06c804 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeMachineExtensionCollection.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeMachineExtensionCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> C /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdat /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAs /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string extens /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync( /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -314,7 +314,7 @@ public virtual Pageable GetAll(string exp /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -357,7 +357,7 @@ public virtual async Task> ExistsAsync(string extensionName, Canc /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -400,7 +400,7 @@ public virtual Response Exists(string extensionName, CancellationToken can /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -445,7 +445,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeMachineExtensionResource.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeMachineExtensionResource.cs index 4eba82d0e25d..eb5d376240d3 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeMachineExtensionResource.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeMachineExtensionResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAs /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationT /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -255,7 +255,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel } /// - /// The operation to create or update the extension. + /// The operation to update the extension. /// /// /// Request Path @@ -267,7 +267,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -301,7 +301,7 @@ public virtual async Task> U } /// - /// The operation to create or update the extension. + /// The operation to update the extension. /// /// /// Request Path @@ -313,7 +313,7 @@ public virtual async Task> U /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -359,7 +359,7 @@ public virtual ArmOperation Update(WaitUn /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -421,7 +421,7 @@ public virtual async Task> AddTa /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -483,7 +483,7 @@ public virtual Response AddTag(string key /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -540,7 +540,7 @@ public virtual async Task> SetTa /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -597,7 +597,7 @@ public virtual Response SetTags(IDictiona /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -657,7 +657,7 @@ public virtual async Task> Remov /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeMachineResource.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeMachineResource.cs index 1ddc3b882e56..8550132f7f75 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeMachineResource.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeMachineResource.cs @@ -103,6 +103,13 @@ internal static void ValidateResourceId(ResourceIdentifier id) throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); } + /// Gets an object representing a HybridComputeLicenseProfileResource along with the instance operations that can be performed on it in the HybridComputeMachine. + /// Returns a object. + public virtual HybridComputeLicenseProfileResource GetHybridComputeLicenseProfile() + { + return new HybridComputeLicenseProfileResource(Client, Id.AppendChildResource("licenseProfiles", "default")); + } + /// Gets a collection of HybridComputeMachineExtensionResources in the HybridComputeMachine. /// An object representing collection of HybridComputeMachineExtensionResources and their operations over a HybridComputeMachineExtensionResource. public virtual HybridComputeMachineExtensionCollection GetHybridComputeMachineExtensions() @@ -123,7 +130,7 @@ public virtual HybridComputeMachineExtensionCollection GetHybridComputeMachineEx /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -154,7 +161,7 @@ public virtual async Task> GetHy /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -172,75 +179,6 @@ public virtual Response GetHybridComputeM return GetHybridComputeMachineExtensions().Get(extensionName, cancellationToken); } - /// Gets a collection of MachineRunCommandResources in the HybridComputeMachine. - /// An object representing collection of MachineRunCommandResources and their operations over a MachineRunCommandResource. - public virtual MachineRunCommandCollection GetMachineRunCommands() - { - return GetCachedClient(client => new MachineRunCommandCollection(client, Id)); - } - - /// - /// The operation to get a run command. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/runCommands/{runCommandName} - /// - /// - /// Operation Id - /// MachineRunCommands_Get - /// - /// - /// Default Api Version - /// 2024-05-20-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The name of the run command. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public virtual async Task> GetMachineRunCommandAsync(string runCommandName, CancellationToken cancellationToken = default) - { - return await GetMachineRunCommands().GetAsync(runCommandName, cancellationToken).ConfigureAwait(false); - } - - /// - /// The operation to get a run command. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/runCommands/{runCommandName} - /// - /// - /// Operation Id - /// MachineRunCommands_Get - /// - /// - /// Default Api Version - /// 2024-05-20-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The name of the run command. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public virtual Response GetMachineRunCommand(string runCommandName, CancellationToken cancellationToken = default) - { - return GetMachineRunCommands().Get(runCommandName, cancellationToken); - } - /// /// Retrieves information about the model view or the instance view of a hybrid machine. /// @@ -254,7 +192,7 @@ public virtual Response GetMachineRunCommand(string r /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -295,7 +233,7 @@ public virtual async Task> GetAsync(strin /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -336,7 +274,7 @@ public virtual Response Get(string expand = null, /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -380,7 +318,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -424,7 +362,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -466,7 +404,7 @@ public virtual async Task> UpdateAsync(Hy /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -508,7 +446,7 @@ public virtual Response Update(HybridComputeMachin /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -550,7 +488,7 @@ public virtual async Task> AssessPatche /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -592,7 +530,7 @@ public virtual ArmOperation AssessPatches(WaitUntil /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -638,7 +576,7 @@ public virtual async Task> InstallPatc /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -684,7 +622,7 @@ public virtual ArmOperation InstallPatches(WaitUnti /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// @@ -726,7 +664,7 @@ public virtual async Task UpgradeExtensionsAsync(WaitUntil waitUnt /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// @@ -768,7 +706,7 @@ public virtual ArmOperation UpgradeExtensions(WaitUntil waitUntil, MachineExtens /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// @@ -802,7 +740,7 @@ public virtual async Task> GetNetworkProfi /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// @@ -836,7 +774,7 @@ public virtual Response GetNetworkProfile(Cancellat /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -874,7 +812,7 @@ public virtual async Task> GetValida /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -912,7 +850,7 @@ public virtual Response GetValidationDetailsF /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -974,7 +912,7 @@ public virtual async Task> AddTagAsync(st /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -1036,7 +974,7 @@ public virtual Response AddTag(string key, string /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -1093,7 +1031,7 @@ public virtual async Task> SetTagsAsync(I /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -1150,7 +1088,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -1210,7 +1148,7 @@ public virtual async Task> RemoveTagAsync /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputePrivateEndpointConnectionCollection.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputePrivateEndpointConnectionCollection.cs index 370f7dcad831..13fce51dccf3 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputePrivateEndpointConnectionCollection.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputePrivateEndpointConnectionCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation Crea /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(stri /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable Get /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(C /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string privateEndpointConn /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string privateEndpointConnectionName, Cance /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputePrivateEndpointConnectionResource.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputePrivateEndpointConnectionResource.cs index e59ef91495dc..d5d755611014 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputePrivateEndpointConnectionResource.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputePrivateEndpointConnectionResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(Canc /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -265,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputePrivateLinkResource.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputePrivateLinkResource.cs index ec6968ee77a3..f4cd857abc78 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputePrivateLinkResource.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputePrivateLinkResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(C /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputePrivateLinkResourceCollection.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputePrivateLinkResourceCollection.cs index 5a99b77da1fb..de2459b0c546 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputePrivateLinkResourceCollection.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputePrivateLinkResourceCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsync(s /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string groupName, /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsync(Cance /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(CancellationTok /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string groupName, Cancella /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string groupName, CancellationToken cancell /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputePrivateLinkScopeCollection.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputePrivateLinkScopeCollection.cs index 52628ca177e9..f5732c02d91e 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputePrivateLinkScopeCollection.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputePrivateLinkScopeCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task> C /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -167,7 +167,7 @@ public virtual ArmOperation CreateOrUpdat /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -212,7 +212,7 @@ public virtual async Task> GetAs /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual Response Get(string scopeN /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -287,7 +287,7 @@ public virtual AsyncPageable GetAllAsync( /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -317,7 +317,7 @@ public virtual Pageable GetAll(Cancellati /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -360,7 +360,7 @@ public virtual async Task> ExistsAsync(string scopeName, Cancella /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -403,7 +403,7 @@ public virtual Response Exists(string scopeName, CancellationToken cancell /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -448,7 +448,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputePrivateLinkScopeResource.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputePrivateLinkScopeResource.cs index e6bfb3145c90..b83789afd32a 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputePrivateLinkScopeResource.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputePrivateLinkScopeResource.cs @@ -110,7 +110,7 @@ public virtual HybridComputePrivateLinkResourceCollection GetHybridComputePrivat /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetHybridC /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -179,7 +179,7 @@ public virtual HybridComputePrivateEndpointConnectionCollection GetHybridCompute /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -210,7 +210,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -248,7 +248,7 @@ public virtual NetworkSecurityPerimeterConfigurationCollection GetNetworkSecurit /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -279,7 +279,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -310,7 +310,7 @@ public virtual Response GetNetwor /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -350,7 +350,7 @@ public virtual async Task> GetAs /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -390,7 +390,7 @@ public virtual Response Get(CancellationT /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -432,7 +432,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -474,7 +474,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -516,7 +516,7 @@ public virtual async Task> Updat /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -558,7 +558,7 @@ public virtual Response Update(HybridComp /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -620,7 +620,7 @@ public virtual async Task> AddTa /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -682,7 +682,7 @@ public virtual Response AddTag(string key /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -739,7 +739,7 @@ public virtual async Task> SetTa /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -796,7 +796,7 @@ public virtual Response SetTags(IDictiona /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -856,7 +856,7 @@ public virtual async Task> Remov /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/LongRunningOperation/HybridComputeGatewayOperationSource.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/LongRunningOperation/HybridComputeGatewayOperationSource.cs deleted file mode 100644 index a8caa3bd0e2c..000000000000 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/LongRunningOperation/HybridComputeGatewayOperationSource.cs +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core; - -namespace Azure.ResourceManager.HybridCompute -{ - internal class HybridComputeGatewayOperationSource : IOperationSource - { - private readonly ArmClient _client; - - internal HybridComputeGatewayOperationSource(ArmClient client) - { - _client = client; - } - - HybridComputeGatewayResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) - { - using var document = JsonDocument.Parse(response.ContentStream); - var data = HybridComputeGatewayData.DeserializeHybridComputeGatewayData(document.RootElement); - return new HybridComputeGatewayResource(_client, data); - } - - async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) - { - using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); - var data = HybridComputeGatewayData.DeserializeHybridComputeGatewayData(document.RootElement); - return new HybridComputeGatewayResource(_client, data); - } - } -} diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/LongRunningOperation/HybridComputeLicenseProfileOperationSource.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/LongRunningOperation/HybridComputeLicenseProfileOperationSource.cs new file mode 100644 index 000000000000..7bf438bf13f0 --- /dev/null +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/LongRunningOperation/HybridComputeLicenseProfileOperationSource.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.HybridCompute +{ + internal class HybridComputeLicenseProfileOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal HybridComputeLicenseProfileOperationSource(ArmClient client) + { + _client = client; + } + + HybridComputeLicenseProfileResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = HybridComputeLicenseProfileData.DeserializeHybridComputeLicenseProfileData(document.RootElement); + return new HybridComputeLicenseProfileResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = HybridComputeLicenseProfileData.DeserializeHybridComputeLicenseProfileData(document.RootElement); + return new HybridComputeLicenseProfileResource(_client, data); + } + } +} diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/LongRunningOperation/MachineRunCommandOperationSource.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/LongRunningOperation/MachineRunCommandOperationSource.cs deleted file mode 100644 index 82b1b4e7c8b2..000000000000 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/LongRunningOperation/MachineRunCommandOperationSource.cs +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core; - -namespace Azure.ResourceManager.HybridCompute -{ - internal class MachineRunCommandOperationSource : IOperationSource - { - private readonly ArmClient _client; - - internal MachineRunCommandOperationSource(ArmClient client) - { - _client = client; - } - - MachineRunCommandResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) - { - using var document = JsonDocument.Parse(response.ContentStream); - var data = MachineRunCommandData.DeserializeMachineRunCommandData(document.RootElement); - return new MachineRunCommandResource(_client, data); - } - - async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) - { - using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); - var data = MachineRunCommandData.DeserializeMachineRunCommandData(document.RootElement); - return new MachineRunCommandResource(_client, data); - } - } -} diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/LongRunningOperation/NetworkSecurityPerimeterConfigurationReconcileResultOperationSource.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/LongRunningOperation/NetworkSecurityPerimeterConfigurationReconcileResultOperationSource.cs new file mode 100644 index 000000000000..e2a8e3da4348 --- /dev/null +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/LongRunningOperation/NetworkSecurityPerimeterConfigurationReconcileResultOperationSource.cs @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.ResourceManager.HybridCompute.Models; + +namespace Azure.ResourceManager.HybridCompute +{ + internal class NetworkSecurityPerimeterConfigurationReconcileResultOperationSource : IOperationSource + { + NetworkSecurityPerimeterConfigurationReconcileResult IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + return NetworkSecurityPerimeterConfigurationReconcileResult.DeserializeNetworkSecurityPerimeterConfigurationReconcileResult(document.RootElement); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + return NetworkSecurityPerimeterConfigurationReconcileResult.DeserializeNetworkSecurityPerimeterConfigurationReconcileResult(document.RootElement); + } + } +} diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/MachineRunCommandCollection.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/MachineRunCommandCollection.cs deleted file mode 100644 index ab8dee3bd73b..000000000000 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/MachineRunCommandCollection.cs +++ /dev/null @@ -1,495 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Globalization; -using System.Threading; -using System.Threading.Tasks; -using Autorest.CSharp.Core; -using Azure.Core; -using Azure.Core.Pipeline; - -namespace Azure.ResourceManager.HybridCompute -{ - /// - /// A class representing a collection of and their operations. - /// Each in the collection will belong to the same instance of . - /// To get a instance call the GetMachineRunCommands method from an instance of . - /// - public partial class MachineRunCommandCollection : ArmCollection, IEnumerable, IAsyncEnumerable - { - private readonly ClientDiagnostics _machineRunCommandClientDiagnostics; - private readonly MachineRunCommandsRestOperations _machineRunCommandRestClient; - - /// Initializes a new instance of the class for mocking. - protected MachineRunCommandCollection() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The identifier of the parent resource that is the target of operations. - internal MachineRunCommandCollection(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _machineRunCommandClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.HybridCompute", MachineRunCommandResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(MachineRunCommandResource.ResourceType, out string machineRunCommandApiVersion); - _machineRunCommandRestClient = new MachineRunCommandsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, machineRunCommandApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != HybridComputeMachineResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, HybridComputeMachineResource.ResourceType), nameof(id)); - } - - /// - /// The operation to create or update a run command. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/runCommands/{runCommandName} - /// - /// - /// Operation Id - /// MachineRunCommands_CreateOrUpdate - /// - /// - /// Default Api Version - /// 2024-05-20-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The name of the run command. - /// Parameters supplied to the Create Run Command. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string runCommandName, MachineRunCommandData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(runCommandName, nameof(runCommandName)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _machineRunCommandClientDiagnostics.CreateScope("MachineRunCommandCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = await _machineRunCommandRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, runCommandName, data, cancellationToken).ConfigureAwait(false); - var operation = new HybridComputeArmOperation(new MachineRunCommandOperationSource(Client), _machineRunCommandClientDiagnostics, Pipeline, _machineRunCommandRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, runCommandName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// The operation to create or update a run command. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/runCommands/{runCommandName} - /// - /// - /// Operation Id - /// MachineRunCommands_CreateOrUpdate - /// - /// - /// Default Api Version - /// 2024-05-20-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The name of the run command. - /// Parameters supplied to the Create Run Command. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string runCommandName, MachineRunCommandData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(runCommandName, nameof(runCommandName)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _machineRunCommandClientDiagnostics.CreateScope("MachineRunCommandCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = _machineRunCommandRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, runCommandName, data, cancellationToken); - var operation = new HybridComputeArmOperation(new MachineRunCommandOperationSource(Client), _machineRunCommandClientDiagnostics, Pipeline, _machineRunCommandRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, runCommandName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// The operation to get a run command. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/runCommands/{runCommandName} - /// - /// - /// Operation Id - /// MachineRunCommands_Get - /// - /// - /// Default Api Version - /// 2024-05-20-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The name of the run command. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetAsync(string runCommandName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(runCommandName, nameof(runCommandName)); - - using var scope = _machineRunCommandClientDiagnostics.CreateScope("MachineRunCommandCollection.Get"); - scope.Start(); - try - { - var response = await _machineRunCommandRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, runCommandName, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new MachineRunCommandResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// The operation to get a run command. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/runCommands/{runCommandName} - /// - /// - /// Operation Id - /// MachineRunCommands_Get - /// - /// - /// Default Api Version - /// 2024-05-20-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The name of the run command. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Get(string runCommandName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(runCommandName, nameof(runCommandName)); - - using var scope = _machineRunCommandClientDiagnostics.CreateScope("MachineRunCommandCollection.Get"); - scope.Start(); - try - { - var response = _machineRunCommandRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, runCommandName, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new MachineRunCommandResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// The operation to get all the run commands of a non-Azure machine. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/runCommands - /// - /// - /// Operation Id - /// MachineRunCommands_List - /// - /// - /// Default Api Version - /// 2024-05-20-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The expand expression to apply on the operation. - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAllAsync(string expand = null, CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _machineRunCommandRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, expand); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _machineRunCommandRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, expand); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new MachineRunCommandResource(Client, MachineRunCommandData.DeserializeMachineRunCommandData(e)), _machineRunCommandClientDiagnostics, Pipeline, "MachineRunCommandCollection.GetAll", "value", "nextLink", cancellationToken); - } - - /// - /// The operation to get all the run commands of a non-Azure machine. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/runCommands - /// - /// - /// Operation Id - /// MachineRunCommands_List - /// - /// - /// Default Api Version - /// 2024-05-20-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The expand expression to apply on the operation. - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(string expand = null, CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _machineRunCommandRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, expand); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _machineRunCommandRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, expand); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new MachineRunCommandResource(Client, MachineRunCommandData.DeserializeMachineRunCommandData(e)), _machineRunCommandClientDiagnostics, Pipeline, "MachineRunCommandCollection.GetAll", "value", "nextLink", cancellationToken); - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/runCommands/{runCommandName} - /// - /// - /// Operation Id - /// MachineRunCommands_Get - /// - /// - /// Default Api Version - /// 2024-05-20-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The name of the run command. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> ExistsAsync(string runCommandName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(runCommandName, nameof(runCommandName)); - - using var scope = _machineRunCommandClientDiagnostics.CreateScope("MachineRunCommandCollection.Exists"); - scope.Start(); - try - { - var response = await _machineRunCommandRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, runCommandName, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(response.Value != null, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/runCommands/{runCommandName} - /// - /// - /// Operation Id - /// MachineRunCommands_Get - /// - /// - /// Default Api Version - /// 2024-05-20-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The name of the run command. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Exists(string runCommandName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(runCommandName, nameof(runCommandName)); - - using var scope = _machineRunCommandClientDiagnostics.CreateScope("MachineRunCommandCollection.Exists"); - scope.Start(); - try - { - var response = _machineRunCommandRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, runCommandName, cancellationToken: cancellationToken); - return Response.FromValue(response.Value != null, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Tries to get details for this resource from the service. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/runCommands/{runCommandName} - /// - /// - /// Operation Id - /// MachineRunCommands_Get - /// - /// - /// Default Api Version - /// 2024-05-20-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The name of the run command. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetIfExistsAsync(string runCommandName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(runCommandName, nameof(runCommandName)); - - using var scope = _machineRunCommandClientDiagnostics.CreateScope("MachineRunCommandCollection.GetIfExists"); - scope.Start(); - try - { - var response = await _machineRunCommandRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, runCommandName, cancellationToken: cancellationToken).ConfigureAwait(false); - if (response.Value == null) - return new NoValueResponse(response.GetRawResponse()); - return Response.FromValue(new MachineRunCommandResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Tries to get details for this resource from the service. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/runCommands/{runCommandName} - /// - /// - /// Operation Id - /// MachineRunCommands_Get - /// - /// - /// Default Api Version - /// 2024-05-20-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The name of the run command. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual NullableResponse GetIfExists(string runCommandName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(runCommandName, nameof(runCommandName)); - - using var scope = _machineRunCommandClientDiagnostics.CreateScope("MachineRunCommandCollection.GetIfExists"); - scope.Start(); - try - { - var response = _machineRunCommandRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, runCommandName, cancellationToken: cancellationToken); - if (response.Value == null) - return new NoValueResponse(response.GetRawResponse()); - return Response.FromValue(new MachineRunCommandResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetAll().GetEnumerator(); - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetAll().GetEnumerator(); - } - - IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) - { - return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); - } - } -} diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/MachineRunCommandData.Serialization.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/MachineRunCommandData.Serialization.cs deleted file mode 100644 index cae0ef0e767e..000000000000 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/MachineRunCommandData.Serialization.cs +++ /dev/null @@ -1,753 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Text.Json; -using Azure.Core; -using Azure.ResourceManager.HybridCompute.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.HybridCompute -{ - public partial class MachineRunCommandData : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(MachineRunCommandData)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("properties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(Source)) - { - writer.WritePropertyName("source"u8); - writer.WriteObjectValue(Source, options); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartArray(); - foreach (var item in Parameters) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(ProtectedParameters)) - { - writer.WritePropertyName("protectedParameters"u8); - writer.WriteStartArray(); - foreach (var item in ProtectedParameters) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(AsyncExecution)) - { - writer.WritePropertyName("asyncExecution"u8); - writer.WriteBooleanValue(AsyncExecution.Value); - } - if (Optional.IsDefined(RunAsUser)) - { - writer.WritePropertyName("runAsUser"u8); - writer.WriteStringValue(RunAsUser); - } - if (Optional.IsDefined(RunAsPassword)) - { - writer.WritePropertyName("runAsPassword"u8); - writer.WriteStringValue(RunAsPassword); - } - if (Optional.IsDefined(TimeoutInSeconds)) - { - writer.WritePropertyName("timeoutInSeconds"u8); - writer.WriteNumberValue(TimeoutInSeconds.Value); - } - if (Optional.IsDefined(OutputBlobUri)) - { - writer.WritePropertyName("outputBlobUri"u8); - writer.WriteStringValue(OutputBlobUri.AbsoluteUri); - } - if (Optional.IsDefined(ErrorBlobUri)) - { - writer.WritePropertyName("errorBlobUri"u8); - writer.WriteStringValue(ErrorBlobUri.AbsoluteUri); - } - if (Optional.IsDefined(OutputBlobManagedIdentity)) - { - writer.WritePropertyName("outputBlobManagedIdentity"u8); - writer.WriteObjectValue(OutputBlobManagedIdentity, options); - } - if (Optional.IsDefined(ErrorBlobManagedIdentity)) - { - writer.WritePropertyName("errorBlobManagedIdentity"u8); - writer.WriteObjectValue(ErrorBlobManagedIdentity, options); - } - if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) - { - writer.WritePropertyName("provisioningState"u8); - writer.WriteStringValue(ProvisioningState); - } - if (options.Format != "W" && Optional.IsDefined(InstanceView)) - { - writer.WritePropertyName("instanceView"u8); - writer.WriteObjectValue(InstanceView, options); - } - writer.WriteEndObject(); - } - - MachineRunCommandData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(MachineRunCommandData)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeMachineRunCommandData(document.RootElement, options); - } - - internal static MachineRunCommandData DeserializeMachineRunCommandData(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IDictionary tags = default; - AzureLocation location = default; - ResourceIdentifier id = default; - string name = default; - ResourceType type = default; - SystemData systemData = default; - MachineRunCommandScriptSource source = default; - IList parameters = default; - IList protectedParameters = default; - bool? asyncExecution = default; - string runAsUser = default; - string runAsPassword = default; - int? timeoutInSeconds = default; - Uri outputBlobUri = default; - Uri errorBlobUri = default; - RunCommandManagedIdentity outputBlobManagedIdentity = default; - RunCommandManagedIdentity errorBlobManagedIdentity = default; - string provisioningState = default; - MachineRunCommandInstanceView instanceView = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("tags"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - tags = dictionary; - continue; - } - if (property.NameEquals("location"u8)) - { - location = new AzureLocation(property.Value.GetString()); - continue; - } - if (property.NameEquals("id"u8)) - { - id = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = new ResourceType(property.Value.GetString()); - continue; - } - if (property.NameEquals("systemData"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("properties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("source"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - source = MachineRunCommandScriptSource.DeserializeMachineRunCommandScriptSource(property0.Value, options); - continue; - } - if (property0.NameEquals("parameters"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - array.Add(RunCommandInputParameter.DeserializeRunCommandInputParameter(item, options)); - } - parameters = array; - continue; - } - if (property0.NameEquals("protectedParameters"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - array.Add(RunCommandInputParameter.DeserializeRunCommandInputParameter(item, options)); - } - protectedParameters = array; - continue; - } - if (property0.NameEquals("asyncExecution"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - asyncExecution = property0.Value.GetBoolean(); - continue; - } - if (property0.NameEquals("runAsUser"u8)) - { - runAsUser = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("runAsPassword"u8)) - { - runAsPassword = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("timeoutInSeconds"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - timeoutInSeconds = property0.Value.GetInt32(); - continue; - } - if (property0.NameEquals("outputBlobUri"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - outputBlobUri = new Uri(property0.Value.GetString()); - continue; - } - if (property0.NameEquals("errorBlobUri"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - errorBlobUri = new Uri(property0.Value.GetString()); - continue; - } - if (property0.NameEquals("outputBlobManagedIdentity"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - outputBlobManagedIdentity = RunCommandManagedIdentity.DeserializeRunCommandManagedIdentity(property0.Value, options); - continue; - } - if (property0.NameEquals("errorBlobManagedIdentity"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - errorBlobManagedIdentity = RunCommandManagedIdentity.DeserializeRunCommandManagedIdentity(property0.Value, options); - continue; - } - if (property0.NameEquals("provisioningState"u8)) - { - provisioningState = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("instanceView"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - instanceView = MachineRunCommandInstanceView.DeserializeMachineRunCommandInstanceView(property0.Value, options); - continue; - } - } - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new MachineRunCommandData( - id, - name, - type, - systemData, - tags ?? new ChangeTrackingDictionary(), - location, - source, - parameters ?? new ChangeTrackingList(), - protectedParameters ?? new ChangeTrackingList(), - asyncExecution, - runAsUser, - runAsPassword, - timeoutInSeconds, - outputBlobUri, - errorBlobUri, - outputBlobManagedIdentity, - errorBlobManagedIdentity, - provisioningState, - instanceView, - serializedAdditionalRawData); - } - - private BinaryData SerializeBicep(ModelReaderWriterOptions options) - { - StringBuilder builder = new StringBuilder(); - BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; - IDictionary propertyOverrides = null; - bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); - bool hasPropertyOverride = false; - string propertyOverride = null; - - builder.AppendLine("{"); - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" name: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(Name)) - { - builder.Append(" name: "); - if (Name.Contains(Environment.NewLine)) - { - builder.AppendLine("'''"); - builder.AppendLine($"{Name}'''"); - } - else - { - builder.AppendLine($"'{Name}'"); - } - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Location), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" location: "); - builder.AppendLine(propertyOverride); - } - else - { - builder.Append(" location: "); - builder.AppendLine($"'{Location.ToString()}'"); - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Tags), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" tags: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsCollectionDefined(Tags)) - { - if (Tags.Any()) - { - builder.Append(" tags: "); - builder.AppendLine("{"); - foreach (var item in Tags) - { - builder.Append($" '{item.Key}': "); - if (item.Value == null) - { - builder.Append("null"); - continue; - } - if (item.Value.Contains(Environment.NewLine)) - { - builder.AppendLine("'''"); - builder.AppendLine($"{item.Value}'''"); - } - else - { - builder.AppendLine($"'{item.Value}'"); - } - } - builder.AppendLine(" }"); - } - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" id: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(Id)) - { - builder.Append(" id: "); - builder.AppendLine($"'{Id.ToString()}'"); - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" systemData: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(SystemData)) - { - builder.Append(" systemData: "); - builder.AppendLine($"'{SystemData.ToString()}'"); - } - } - - builder.Append(" properties:"); - builder.AppendLine(" {"); - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Source), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" source: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(Source)) - { - builder.Append(" source: "); - BicepSerializationHelpers.AppendChildObject(builder, Source, options, 4, false, " source: "); - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Parameters), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" parameters: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsCollectionDefined(Parameters)) - { - if (Parameters.Any()) - { - builder.Append(" parameters: "); - builder.AppendLine("["); - foreach (var item in Parameters) - { - BicepSerializationHelpers.AppendChildObject(builder, item, options, 6, true, " parameters: "); - } - builder.AppendLine(" ]"); - } - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ProtectedParameters), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" protectedParameters: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsCollectionDefined(ProtectedParameters)) - { - if (ProtectedParameters.Any()) - { - builder.Append(" protectedParameters: "); - builder.AppendLine("["); - foreach (var item in ProtectedParameters) - { - BicepSerializationHelpers.AppendChildObject(builder, item, options, 6, true, " protectedParameters: "); - } - builder.AppendLine(" ]"); - } - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AsyncExecution), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" asyncExecution: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(AsyncExecution)) - { - builder.Append(" asyncExecution: "); - var boolValue = AsyncExecution.Value == true ? "true" : "false"; - builder.AppendLine($"{boolValue}"); - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(RunAsUser), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" runAsUser: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(RunAsUser)) - { - builder.Append(" runAsUser: "); - if (RunAsUser.Contains(Environment.NewLine)) - { - builder.AppendLine("'''"); - builder.AppendLine($"{RunAsUser}'''"); - } - else - { - builder.AppendLine($"'{RunAsUser}'"); - } - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(RunAsPassword), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" runAsPassword: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(RunAsPassword)) - { - builder.Append(" runAsPassword: "); - if (RunAsPassword.Contains(Environment.NewLine)) - { - builder.AppendLine("'''"); - builder.AppendLine($"{RunAsPassword}'''"); - } - else - { - builder.AppendLine($"'{RunAsPassword}'"); - } - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(TimeoutInSeconds), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" timeoutInSeconds: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(TimeoutInSeconds)) - { - builder.Append(" timeoutInSeconds: "); - builder.AppendLine($"{TimeoutInSeconds.Value}"); - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(OutputBlobUri), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" outputBlobUri: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(OutputBlobUri)) - { - builder.Append(" outputBlobUri: "); - builder.AppendLine($"'{OutputBlobUri.AbsoluteUri}'"); - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ErrorBlobUri), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" errorBlobUri: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(ErrorBlobUri)) - { - builder.Append(" errorBlobUri: "); - builder.AppendLine($"'{ErrorBlobUri.AbsoluteUri}'"); - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(OutputBlobManagedIdentity), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" outputBlobManagedIdentity: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(OutputBlobManagedIdentity)) - { - builder.Append(" outputBlobManagedIdentity: "); - BicepSerializationHelpers.AppendChildObject(builder, OutputBlobManagedIdentity, options, 4, false, " outputBlobManagedIdentity: "); - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ErrorBlobManagedIdentity), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" errorBlobManagedIdentity: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(ErrorBlobManagedIdentity)) - { - builder.Append(" errorBlobManagedIdentity: "); - BicepSerializationHelpers.AppendChildObject(builder, ErrorBlobManagedIdentity, options, 4, false, " errorBlobManagedIdentity: "); - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ProvisioningState), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" provisioningState: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(ProvisioningState)) - { - builder.Append(" provisioningState: "); - if (ProvisioningState.Contains(Environment.NewLine)) - { - builder.AppendLine("'''"); - builder.AppendLine($"{ProvisioningState}'''"); - } - else - { - builder.AppendLine($"'{ProvisioningState}'"); - } - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(InstanceView), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" instanceView: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(InstanceView)) - { - builder.Append(" instanceView: "); - BicepSerializationHelpers.AppendChildObject(builder, InstanceView, options, 4, false, " instanceView: "); - } - } - - builder.AppendLine(" }"); - builder.AppendLine("}"); - return BinaryData.FromString(builder.ToString()); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - case "bicep": - return SerializeBicep(options); - default: - throw new FormatException($"The model {nameof(MachineRunCommandData)} does not support writing '{options.Format}' format."); - } - } - - MachineRunCommandData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeMachineRunCommandData(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(MachineRunCommandData)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/MachineRunCommandData.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/MachineRunCommandData.cs deleted file mode 100644 index d6369c6d0fae..000000000000 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/MachineRunCommandData.cs +++ /dev/null @@ -1,146 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using Azure.Core; -using Azure.ResourceManager.HybridCompute.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.HybridCompute -{ - /// - /// A class representing the MachineRunCommand data model. - /// Describes a Run Command - /// - public partial class MachineRunCommandData : TrackedResourceData - { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; - - /// Initializes a new instance of . - /// The location. - public MachineRunCommandData(AzureLocation location) : base(location) - { - Parameters = new ChangeTrackingList(); - ProtectedParameters = new ChangeTrackingList(); - } - - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The tags. - /// The location. - /// The source of the run command script. - /// The parameters used by the script. - /// The parameters used by the script. - /// Optional. If set to true, provisioning will complete as soon as script starts and will not wait for script to complete. - /// Specifies the user account on the machine when executing the run command. - /// Specifies the user account password on the machine when executing the run command. - /// The timeout in seconds to execute the run command. - /// Specifies the Azure storage blob where script output stream will be uploaded. Use a SAS URI with read, append, create, write access OR use managed identity to provide the VM access to the blob. Refer outputBlobManagedIdentity parameter. - /// Specifies the Azure storage blob where script error stream will be uploaded. Use a SAS URI with read, append, create, write access OR use managed identity to provide the VM access to the blob. Refer errorBlobManagedIdentity parameter. - /// User-assigned managed identity that has access to outputBlobUri storage blob. Use an empty object in case of system-assigned identity. Make sure managed identity has been given access to blob's container with 'Storage Blob Data Contributor' role assignment. In case of user-assigned identity, make sure you add it under VM's identity. For more info on managed identity and Run Command, refer https://aka.ms/ManagedIdentity and https://aka.ms/RunCommandManaged. - /// User-assigned managed identity that has access to errorBlobUri storage blob. Use an empty object in case of system-assigned identity. Make sure managed identity has been given access to blob's container with 'Storage Blob Data Contributor' role assignment. In case of user-assigned identity, make sure you add it under VM's identity. For more info on managed identity and Run Command, refer https://aka.ms/ManagedIdentity and https://aka.ms/RunCommandManaged. - /// The provisioning state, which only appears in the response. - /// The machine run command instance view. - /// Keeps track of any properties unknown to the library. - internal MachineRunCommandData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, MachineRunCommandScriptSource source, IList parameters, IList protectedParameters, bool? asyncExecution, string runAsUser, string runAsPassword, int? timeoutInSeconds, Uri outputBlobUri, Uri errorBlobUri, RunCommandManagedIdentity outputBlobManagedIdentity, RunCommandManagedIdentity errorBlobManagedIdentity, string provisioningState, MachineRunCommandInstanceView instanceView, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) - { - Source = source; - Parameters = parameters; - ProtectedParameters = protectedParameters; - AsyncExecution = asyncExecution; - RunAsUser = runAsUser; - RunAsPassword = runAsPassword; - TimeoutInSeconds = timeoutInSeconds; - OutputBlobUri = outputBlobUri; - ErrorBlobUri = errorBlobUri; - OutputBlobManagedIdentity = outputBlobManagedIdentity; - ErrorBlobManagedIdentity = errorBlobManagedIdentity; - ProvisioningState = provisioningState; - InstanceView = instanceView; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal MachineRunCommandData() - { - } - - /// The source of the run command script. - [WirePath("properties.source")] - public MachineRunCommandScriptSource Source { get; set; } - /// The parameters used by the script. - [WirePath("properties.parameters")] - public IList Parameters { get; } - /// The parameters used by the script. - [WirePath("properties.protectedParameters")] - public IList ProtectedParameters { get; } - /// Optional. If set to true, provisioning will complete as soon as script starts and will not wait for script to complete. - [WirePath("properties.asyncExecution")] - public bool? AsyncExecution { get; set; } - /// Specifies the user account on the machine when executing the run command. - [WirePath("properties.runAsUser")] - public string RunAsUser { get; set; } - /// Specifies the user account password on the machine when executing the run command. - [WirePath("properties.runAsPassword")] - public string RunAsPassword { get; set; } - /// The timeout in seconds to execute the run command. - [WirePath("properties.timeoutInSeconds")] - public int? TimeoutInSeconds { get; set; } - /// Specifies the Azure storage blob where script output stream will be uploaded. Use a SAS URI with read, append, create, write access OR use managed identity to provide the VM access to the blob. Refer outputBlobManagedIdentity parameter. - [WirePath("properties.outputBlobUri")] - public Uri OutputBlobUri { get; set; } - /// Specifies the Azure storage blob where script error stream will be uploaded. Use a SAS URI with read, append, create, write access OR use managed identity to provide the VM access to the blob. Refer errorBlobManagedIdentity parameter. - [WirePath("properties.errorBlobUri")] - public Uri ErrorBlobUri { get; set; } - /// User-assigned managed identity that has access to outputBlobUri storage blob. Use an empty object in case of system-assigned identity. Make sure managed identity has been given access to blob's container with 'Storage Blob Data Contributor' role assignment. In case of user-assigned identity, make sure you add it under VM's identity. For more info on managed identity and Run Command, refer https://aka.ms/ManagedIdentity and https://aka.ms/RunCommandManaged. - [WirePath("properties.outputBlobManagedIdentity")] - public RunCommandManagedIdentity OutputBlobManagedIdentity { get; set; } - /// User-assigned managed identity that has access to errorBlobUri storage blob. Use an empty object in case of system-assigned identity. Make sure managed identity has been given access to blob's container with 'Storage Blob Data Contributor' role assignment. In case of user-assigned identity, make sure you add it under VM's identity. For more info on managed identity and Run Command, refer https://aka.ms/ManagedIdentity and https://aka.ms/RunCommandManaged. - [WirePath("properties.errorBlobManagedIdentity")] - public RunCommandManagedIdentity ErrorBlobManagedIdentity { get; set; } - /// The provisioning state, which only appears in the response. - [WirePath("properties.provisioningState")] - public string ProvisioningState { get; } - /// The machine run command instance view. - [WirePath("properties.instanceView")] - public MachineRunCommandInstanceView InstanceView { get; } - } -} diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/MachineRunCommandResource.Serialization.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/MachineRunCommandResource.Serialization.cs deleted file mode 100644 index 07be5d5c241a..000000000000 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/MachineRunCommandResource.Serialization.cs +++ /dev/null @@ -1,26 +0,0 @@ -// 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.HybridCompute -{ - public partial class MachineRunCommandResource : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - - MachineRunCommandData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); - - MachineRunCommandData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); - } -} diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/ExtensionsResourceStatus.Serialization.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/ExtensionsResourceStatus.Serialization.cs deleted file mode 100644 index 283792a02ff9..000000000000 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/ExtensionsResourceStatus.Serialization.cs +++ /dev/null @@ -1,305 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.HybridCompute.Models -{ - public partial class ExtensionsResourceStatus : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ExtensionsResourceStatus)} does not support writing '{format}' format."); - } - - if (Optional.IsDefined(Code)) - { - writer.WritePropertyName("code"u8); - writer.WriteStringValue(Code); - } - if (Optional.IsDefined(Level)) - { - writer.WritePropertyName("level"u8); - writer.WriteStringValue(Level.Value.ToSerialString()); - } - if (Optional.IsDefined(DisplayStatus)) - { - writer.WritePropertyName("displayStatus"u8); - writer.WriteStringValue(DisplayStatus); - } - if (Optional.IsDefined(Message)) - { - writer.WritePropertyName("message"u8); - writer.WriteStringValue(Message); - } - if (Optional.IsDefined(Time)) - { - writer.WritePropertyName("time"u8); - writer.WriteStringValue(Time.Value, "O"); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - } - - ExtensionsResourceStatus IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ExtensionsResourceStatus)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeExtensionsResourceStatus(document.RootElement, options); - } - - internal static ExtensionsResourceStatus DeserializeExtensionsResourceStatus(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string code = default; - ExtensionsStatusLevelType? level = default; - string displayStatus = default; - string message = default; - DateTimeOffset? time = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("code"u8)) - { - code = property.Value.GetString(); - continue; - } - if (property.NameEquals("level"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - level = property.Value.GetString().ToExtensionsStatusLevelType(); - continue; - } - if (property.NameEquals("displayStatus"u8)) - { - displayStatus = property.Value.GetString(); - continue; - } - if (property.NameEquals("message"u8)) - { - message = property.Value.GetString(); - continue; - } - if (property.NameEquals("time"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - time = property.Value.GetDateTimeOffset("O"); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new ExtensionsResourceStatus( - code, - level, - displayStatus, - message, - time, - serializedAdditionalRawData); - } - - private BinaryData SerializeBicep(ModelReaderWriterOptions options) - { - StringBuilder builder = new StringBuilder(); - BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; - IDictionary propertyOverrides = null; - bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); - bool hasPropertyOverride = false; - string propertyOverride = null; - - builder.AppendLine("{"); - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Code), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" code: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(Code)) - { - builder.Append(" code: "); - if (Code.Contains(Environment.NewLine)) - { - builder.AppendLine("'''"); - builder.AppendLine($"{Code}'''"); - } - else - { - builder.AppendLine($"'{Code}'"); - } - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Level), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" level: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(Level)) - { - builder.Append(" level: "); - builder.AppendLine($"'{Level.Value.ToSerialString()}'"); - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DisplayStatus), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" displayStatus: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(DisplayStatus)) - { - builder.Append(" displayStatus: "); - if (DisplayStatus.Contains(Environment.NewLine)) - { - builder.AppendLine("'''"); - builder.AppendLine($"{DisplayStatus}'''"); - } - else - { - builder.AppendLine($"'{DisplayStatus}'"); - } - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Message), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" message: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(Message)) - { - builder.Append(" message: "); - if (Message.Contains(Environment.NewLine)) - { - builder.AppendLine("'''"); - builder.AppendLine($"{Message}'''"); - } - else - { - builder.AppendLine($"'{Message}'"); - } - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Time), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" time: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(Time)) - { - builder.Append(" time: "); - var formattedDateTimeString = TypeFormatters.ToString(Time.Value, "o"); - builder.AppendLine($"'{formattedDateTimeString}'"); - } - } - - builder.AppendLine("}"); - return BinaryData.FromString(builder.ToString()); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - case "bicep": - return SerializeBicep(options); - default: - throw new FormatException($"The model {nameof(ExtensionsResourceStatus)} does not support writing '{options.Format}' format."); - } - } - - ExtensionsResourceStatus IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeExtensionsResourceStatus(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ExtensionsResourceStatus)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/ExtensionsStatusLevelType.Serialization.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/ExtensionsStatusLevelType.Serialization.cs deleted file mode 100644 index 8f03c2a919c9..000000000000 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/ExtensionsStatusLevelType.Serialization.cs +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.ResourceManager.HybridCompute.Models -{ - internal static partial class ExtensionsStatusLevelTypeExtensions - { - public static string ToSerialString(this ExtensionsStatusLevelType value) => value switch - { - ExtensionsStatusLevelType.Info => "Info", - ExtensionsStatusLevelType.Warning => "Warning", - ExtensionsStatusLevelType.Error => "Error", - _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown ExtensionsStatusLevelType value.") - }; - - public static ExtensionsStatusLevelType ToExtensionsStatusLevelType(this string value) - { - if (StringComparer.OrdinalIgnoreCase.Equals(value, "Info")) return ExtensionsStatusLevelType.Info; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "Warning")) return ExtensionsStatusLevelType.Warning; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "Error")) return ExtensionsStatusLevelType.Error; - throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown ExtensionsStatusLevelType value."); - } - } -} diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/ExtensionsStatusLevelType.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/ExtensionsStatusLevelType.cs deleted file mode 100644 index d686e042015a..000000000000 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/ExtensionsStatusLevelType.cs +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.HybridCompute.Models -{ - /// The level code. - public enum ExtensionsStatusLevelType - { - /// Info. - Info, - /// Warning. - Warning, - /// Error. - Error - } -} diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeExecutionState.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeExecutionState.cs deleted file mode 100644 index 578ddd1f2e84..000000000000 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeExecutionState.cs +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.HybridCompute.Models -{ - /// Script execution status. - public readonly partial struct HybridComputeExecutionState : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public HybridComputeExecutionState(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string UnknownValue = "Unknown"; - private const string PendingValue = "Pending"; - private const string RunningValue = "Running"; - private const string FailedValue = "Failed"; - private const string SucceededValue = "Succeeded"; - private const string TimedOutValue = "TimedOut"; - private const string CanceledValue = "Canceled"; - - /// Unknown. - public static HybridComputeExecutionState Unknown { get; } = new HybridComputeExecutionState(UnknownValue); - /// Pending. - public static HybridComputeExecutionState Pending { get; } = new HybridComputeExecutionState(PendingValue); - /// Running. - public static HybridComputeExecutionState Running { get; } = new HybridComputeExecutionState(RunningValue); - /// Failed. - public static HybridComputeExecutionState Failed { get; } = new HybridComputeExecutionState(FailedValue); - /// Succeeded. - public static HybridComputeExecutionState Succeeded { get; } = new HybridComputeExecutionState(SucceededValue); - /// TimedOut. - public static HybridComputeExecutionState TimedOut { get; } = new HybridComputeExecutionState(TimedOutValue); - /// Canceled. - public static HybridComputeExecutionState Canceled { get; } = new HybridComputeExecutionState(CanceledValue); - /// Determines if two values are the same. - public static bool operator ==(HybridComputeExecutionState left, HybridComputeExecutionState right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(HybridComputeExecutionState left, HybridComputeExecutionState right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator HybridComputeExecutionState(string value) => new HybridComputeExecutionState(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is HybridComputeExecutionState other && Equals(other); - /// - public bool Equals(HybridComputeExecutionState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeGatewayPatch.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeGatewayPatch.cs deleted file mode 100644 index 8912c0a329dd..000000000000 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeGatewayPatch.cs +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.HybridCompute.Models -{ - /// Describes a License Update. - public partial class HybridComputeGatewayPatch : HybridComputeResourceUpdate - { - /// Initializes a new instance of . - public HybridComputeGatewayPatch() - { - AllowedFeatures = new ChangeTrackingList(); - } - - /// Initializes a new instance of . - /// Resource tags. - /// Keeps track of any properties unknown to the library. - /// Specifies the list of features that are enabled for this Gateway. - internal HybridComputeGatewayPatch(IDictionary tags, IDictionary serializedAdditionalRawData, IList allowedFeatures) : base(tags, serializedAdditionalRawData) - { - AllowedFeatures = allowedFeatures; - } - - /// Specifies the list of features that are enabled for this Gateway. - [WirePath("properties.allowedFeatures")] - public IList AllowedFeatures { get; } - } -} diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeGatewayType.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeGatewayType.cs deleted file mode 100644 index 402538f8c3bd..000000000000 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeGatewayType.cs +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.HybridCompute.Models -{ - /// The type of the Gateway resource. - public readonly partial struct HybridComputeGatewayType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public HybridComputeGatewayType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string PublicValue = "Public"; - - /// Public. - public static HybridComputeGatewayType Public { get; } = new HybridComputeGatewayType(PublicValue); - /// Determines if two values are the same. - public static bool operator ==(HybridComputeGatewayType left, HybridComputeGatewayType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(HybridComputeGatewayType left, HybridComputeGatewayType right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator HybridComputeGatewayType(string value) => new HybridComputeGatewayType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is HybridComputeGatewayType other && Equals(other); - /// - public bool Equals(HybridComputeGatewayType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeLicenseProfilePatch.Serialization.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeLicenseProfilePatch.Serialization.cs new file mode 100644 index 000000000000..c7af9a54045e --- /dev/null +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeLicenseProfilePatch.Serialization.cs @@ -0,0 +1,267 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.HybridCompute.Models +{ + public partial class HybridComputeLicenseProfilePatch : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(HybridComputeLicenseProfilePatch)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + writer.WritePropertyName("productProfile"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(SubscriptionStatus)) + { + writer.WritePropertyName("subscriptionStatus"u8); + writer.WriteStringValue(SubscriptionStatus.Value.ToString()); + } + if (Optional.IsDefined(ProductType)) + { + writer.WritePropertyName("productType"u8); + writer.WriteStringValue(ProductType.Value.ToString()); + } + if (Optional.IsCollectionDefined(ProductFeatures)) + { + writer.WritePropertyName("productFeatures"u8); + writer.WriteStartArray(); + foreach (var item in ProductFeatures) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + writer.WritePropertyName("esuProfile"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(AssignedLicense)) + { + writer.WritePropertyName("assignedLicense"u8); + writer.WriteStringValue(AssignedLicense); + } + writer.WriteEndObject(); + writer.WritePropertyName("softwareAssurance"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(SoftwareAssuranceCustomer)) + { + writer.WritePropertyName("softwareAssuranceCustomer"u8); + writer.WriteBooleanValue(SoftwareAssuranceCustomer.Value); + } + writer.WriteEndObject(); + writer.WriteEndObject(); + } + + HybridComputeLicenseProfilePatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(HybridComputeLicenseProfilePatch)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeHybridComputeLicenseProfilePatch(document.RootElement, options); + } + + internal static HybridComputeLicenseProfilePatch DeserializeHybridComputeLicenseProfilePatch(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IDictionary tags = default; + LicenseProfileSubscriptionStatusUpdate? subscriptionStatus = default; + LicenseProfileProductType? productType = default; + IList productFeatures = default; + string assignedLicense = default; + bool? softwareAssuranceCustomer = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("productProfile"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + property0.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property1 in property0.Value.EnumerateObject()) + { + if (property1.NameEquals("subscriptionStatus"u8)) + { + if (property1.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + subscriptionStatus = new LicenseProfileSubscriptionStatusUpdate(property1.Value.GetString()); + continue; + } + if (property1.NameEquals("productType"u8)) + { + if (property1.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + productType = new LicenseProfileProductType(property1.Value.GetString()); + continue; + } + if (property1.NameEquals("productFeatures"u8)) + { + if (property1.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property1.Value.EnumerateArray()) + { + array.Add(HybridComputeProductFeatureUpdate.DeserializeHybridComputeProductFeatureUpdate(item, options)); + } + productFeatures = array; + continue; + } + } + continue; + } + if (property0.NameEquals("esuProfile"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + property0.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property1 in property0.Value.EnumerateObject()) + { + if (property1.NameEquals("assignedLicense"u8)) + { + assignedLicense = property1.Value.GetString(); + continue; + } + } + continue; + } + if (property0.NameEquals("softwareAssurance"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + property0.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property1 in property0.Value.EnumerateObject()) + { + if (property1.NameEquals("softwareAssuranceCustomer"u8)) + { + if (property1.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + softwareAssuranceCustomer = property1.Value.GetBoolean(); + continue; + } + } + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new HybridComputeLicenseProfilePatch( + tags ?? new ChangeTrackingDictionary(), + serializedAdditionalRawData, + subscriptionStatus, + productType, + productFeatures ?? new ChangeTrackingList(), + assignedLicense, + softwareAssuranceCustomer); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(HybridComputeLicenseProfilePatch)} does not support writing '{options.Format}' format."); + } + } + + HybridComputeLicenseProfilePatch IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeHybridComputeLicenseProfilePatch(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(HybridComputeLicenseProfilePatch)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeLicenseProfilePatch.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeLicenseProfilePatch.cs new file mode 100644 index 000000000000..44081707c2e7 --- /dev/null +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeLicenseProfilePatch.cs @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.HybridCompute.Models +{ + /// Describes a License Profile Update. + public partial class HybridComputeLicenseProfilePatch : HybridComputeResourceUpdate + { + /// Initializes a new instance of . + public HybridComputeLicenseProfilePatch() + { + ProductFeatures = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Resource tags. + /// Keeps track of any properties unknown to the library. + /// Indicates the subscription status of the product. + /// Indicates the product type of the license. + /// The list of product feature updates. + /// The resource id of the license. + /// Specifies if this machine is licensed as part of a Software Assurance agreement. + internal HybridComputeLicenseProfilePatch(IDictionary tags, IDictionary serializedAdditionalRawData, LicenseProfileSubscriptionStatusUpdate? subscriptionStatus, LicenseProfileProductType? productType, IList productFeatures, string assignedLicense, bool? softwareAssuranceCustomer) : base(tags, serializedAdditionalRawData) + { + SubscriptionStatus = subscriptionStatus; + ProductType = productType; + ProductFeatures = productFeatures; + AssignedLicense = assignedLicense; + SoftwareAssuranceCustomer = softwareAssuranceCustomer; + } + + /// Indicates the subscription status of the product. + [WirePath("properties.subscriptionStatus")] + public LicenseProfileSubscriptionStatusUpdate? SubscriptionStatus { get; set; } + /// Indicates the product type of the license. + [WirePath("properties.productType")] + public LicenseProfileProductType? ProductType { get; set; } + /// The list of product feature updates. + [WirePath("properties.productFeatures")] + public IList ProductFeatures { get; } + /// The resource id of the license. + [WirePath("properties.assignedLicense")] + public string AssignedLicense { get; set; } + /// Specifies if this machine is licensed as part of a Software Assurance agreement. + [WirePath("properties.softwareAssuranceCustomer")] + public bool? SoftwareAssuranceCustomer { get; set; } + } +} diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeProductFeatureUpdate.Serialization.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeProductFeatureUpdate.Serialization.cs new file mode 100644 index 000000000000..a43cd43682f1 --- /dev/null +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeProductFeatureUpdate.Serialization.cs @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.HybridCompute.Models +{ + public partial class HybridComputeProductFeatureUpdate : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(HybridComputeProductFeatureUpdate)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (Optional.IsDefined(SubscriptionStatus)) + { + writer.WritePropertyName("subscriptionStatus"u8); + writer.WriteStringValue(SubscriptionStatus.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + HybridComputeProductFeatureUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(HybridComputeProductFeatureUpdate)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeHybridComputeProductFeatureUpdate(document.RootElement, options); + } + + internal static HybridComputeProductFeatureUpdate DeserializeHybridComputeProductFeatureUpdate(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + LicenseProfileSubscriptionStatusUpdate? subscriptionStatus = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("subscriptionStatus"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + subscriptionStatus = new LicenseProfileSubscriptionStatusUpdate(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new HybridComputeProductFeatureUpdate(name, subscriptionStatus, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(HybridComputeProductFeatureUpdate)} does not support writing '{options.Format}' format."); + } + } + + HybridComputeProductFeatureUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeHybridComputeProductFeatureUpdate(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(HybridComputeProductFeatureUpdate)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeProductFeatureUpdate.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeProductFeatureUpdate.cs new file mode 100644 index 000000000000..6b22cef55726 --- /dev/null +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeProductFeatureUpdate.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.HybridCompute.Models +{ + /// Product Feature. + public partial class HybridComputeProductFeatureUpdate + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public HybridComputeProductFeatureUpdate() + { + } + + /// Initializes a new instance of . + /// Product feature name. + /// Indicates the new status of the product feature. + /// Keeps track of any properties unknown to the library. + internal HybridComputeProductFeatureUpdate(string name, LicenseProfileSubscriptionStatusUpdate? subscriptionStatus, IDictionary serializedAdditionalRawData) + { + Name = name; + SubscriptionStatus = subscriptionStatus; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Product feature name. + [WirePath("name")] + public string Name { get; set; } + /// Indicates the new status of the product feature. + [WirePath("subscriptionStatus")] + public LicenseProfileSubscriptionStatusUpdate? SubscriptionStatus { get; set; } + } +} diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeTargetResourceSettings.Serialization.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeTargetResourceSettings.Serialization.cs deleted file mode 100644 index c52457969df0..000000000000 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeTargetResourceSettings.Serialization.cs +++ /dev/null @@ -1,307 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text; -using System.Text.Json; -using Azure.Core; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.HybridCompute.Models -{ - public partial class HybridComputeTargetResourceSettings : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(HybridComputeTargetResourceSettings)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("properties"u8); - writer.WriteStartObject(); - if (options.Format != "W" && Optional.IsDefined(TenantId)) - { - writer.WritePropertyName("tenantId"u8); - writer.WriteStringValue(TenantId.Value); - } - writer.WritePropertyName("gatewayProperties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(GatewayResourceId)) - { - writer.WritePropertyName("gatewayResourceId"u8); - writer.WriteStringValue(GatewayResourceId); - } - writer.WriteEndObject(); - writer.WriteEndObject(); - } - - HybridComputeTargetResourceSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(HybridComputeTargetResourceSettings)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeHybridComputeTargetResourceSettings(document.RootElement, options); - } - - internal static HybridComputeTargetResourceSettings DeserializeHybridComputeTargetResourceSettings(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - ResourceIdentifier id = default; - string name = default; - ResourceType type = default; - SystemData systemData = default; - Guid? tenantId = default; - ResourceIdentifier gatewayResourceId = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("id"u8)) - { - id = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = new ResourceType(property.Value.GetString()); - continue; - } - if (property.NameEquals("systemData"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("properties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("tenantId"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - tenantId = property0.Value.GetGuid(); - continue; - } - if (property0.NameEquals("gatewayProperties"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - property0.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property1 in property0.Value.EnumerateObject()) - { - if (property1.NameEquals("gatewayResourceId"u8)) - { - if (property1.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - gatewayResourceId = new ResourceIdentifier(property1.Value.GetString()); - continue; - } - } - continue; - } - } - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new HybridComputeTargetResourceSettings( - id, - name, - type, - systemData, - tenantId, - gatewayResourceId, - serializedAdditionalRawData); - } - - private BinaryData SerializeBicep(ModelReaderWriterOptions options) - { - StringBuilder builder = new StringBuilder(); - BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; - IDictionary propertyOverrides = null; - bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); - bool hasPropertyOverride = false; - string propertyOverride = null; - - builder.AppendLine("{"); - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" name: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(Name)) - { - builder.Append(" name: "); - if (Name.Contains(Environment.NewLine)) - { - builder.AppendLine("'''"); - builder.AppendLine($"{Name}'''"); - } - else - { - builder.AppendLine($"'{Name}'"); - } - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" id: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(Id)) - { - builder.Append(" id: "); - builder.AppendLine($"'{Id.ToString()}'"); - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" systemData: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(SystemData)) - { - builder.Append(" systemData: "); - builder.AppendLine($"'{SystemData.ToString()}'"); - } - } - - builder.Append(" properties:"); - builder.AppendLine(" {"); - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(TenantId), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" tenantId: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(TenantId)) - { - builder.Append(" tenantId: "); - builder.AppendLine($"'{TenantId.Value.ToString()}'"); - } - } - - builder.Append(" gatewayProperties:"); - builder.AppendLine(" {"); - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(GatewayResourceId), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" gatewayResourceId: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(GatewayResourceId)) - { - builder.Append(" gatewayResourceId: "); - builder.AppendLine($"'{GatewayResourceId.ToString()}'"); - } - } - - builder.AppendLine(" }"); - builder.AppendLine(" }"); - builder.AppendLine("}"); - return BinaryData.FromString(builder.ToString()); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - case "bicep": - return SerializeBicep(options); - default: - throw new FormatException($"The model {nameof(HybridComputeTargetResourceSettings)} does not support writing '{options.Format}' format."); - } - } - - HybridComputeTargetResourceSettings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeHybridComputeTargetResourceSettings(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(HybridComputeTargetResourceSettings)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/LicenseProfileSubscriptionStatusUpdate.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/LicenseProfileSubscriptionStatusUpdate.cs new file mode 100644 index 000000000000..d464e071a741 --- /dev/null +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/LicenseProfileSubscriptionStatusUpdate.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.HybridCompute.Models +{ + /// Indicates the new subscription status of the OS or Product Features. + public readonly partial struct LicenseProfileSubscriptionStatusUpdate : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public LicenseProfileSubscriptionStatusUpdate(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string EnableValue = "Enable"; + private const string DisableValue = "Disable"; + + /// Enable. + public static LicenseProfileSubscriptionStatusUpdate Enable { get; } = new LicenseProfileSubscriptionStatusUpdate(EnableValue); + /// Disable. + public static LicenseProfileSubscriptionStatusUpdate Disable { get; } = new LicenseProfileSubscriptionStatusUpdate(DisableValue); + /// Determines if two values are the same. + public static bool operator ==(LicenseProfileSubscriptionStatusUpdate left, LicenseProfileSubscriptionStatusUpdate right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(LicenseProfileSubscriptionStatusUpdate left, LicenseProfileSubscriptionStatusUpdate right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator LicenseProfileSubscriptionStatusUpdate(string value) => new LicenseProfileSubscriptionStatusUpdate(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is LicenseProfileSubscriptionStatusUpdate other && Equals(other); + /// + public bool Equals(LicenseProfileSubscriptionStatusUpdate other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/GatewaysListResult.Serialization.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/LicenseProfilesListResult.Serialization.cs similarity index 73% rename from sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/GatewaysListResult.Serialization.cs rename to sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/LicenseProfilesListResult.Serialization.cs index 051354f319b0..0e96145301ef 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/GatewaysListResult.Serialization.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/LicenseProfilesListResult.Serialization.cs @@ -15,11 +15,11 @@ namespace Azure.ResourceManager.HybridCompute.Models { - internal partial class GatewaysListResult : IUtf8JsonSerializable, IJsonModel + internal partial class LicenseProfilesListResult : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -30,10 +30,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit /// The client options for reading and writing models. protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(GatewaysListResult)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(LicenseProfilesListResult)} does not support writing '{format}' format."); } writer.WritePropertyName("value"u8); @@ -65,19 +65,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - GatewaysListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + LicenseProfilesListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(GatewaysListResult)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(LicenseProfilesListResult)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeGatewaysListResult(document.RootElement, options); + return DeserializeLicenseProfilesListResult(document.RootElement, options); } - internal static GatewaysListResult DeserializeGatewaysListResult(JsonElement element, ModelReaderWriterOptions options = null) + internal static LicenseProfilesListResult DeserializeLicenseProfilesListResult(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -85,7 +85,7 @@ internal static GatewaysListResult DeserializeGatewaysListResult(JsonElement ele { return null; } - IReadOnlyList value = default; + IReadOnlyList value = default; string nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); @@ -93,10 +93,10 @@ internal static GatewaysListResult DeserializeGatewaysListResult(JsonElement ele { if (property.NameEquals("value"u8)) { - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(HybridComputeGatewayData.DeserializeHybridComputeGatewayData(item, options)); + array.Add(HybridComputeLicenseProfileData.DeserializeHybridComputeLicenseProfileData(item, options)); } value = array; continue; @@ -112,7 +112,7 @@ internal static GatewaysListResult DeserializeGatewaysListResult(JsonElement ele } } serializedAdditionalRawData = rawDataDictionary; - return new GatewaysListResult(value, nextLink, serializedAdditionalRawData); + return new LicenseProfilesListResult(value, nextLink, serializedAdditionalRawData); } private BinaryData SerializeBicep(ModelReaderWriterOptions options) @@ -176,9 +176,9 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) return BinaryData.FromString(builder.ToString()); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { @@ -187,26 +187,26 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions case "bicep": return SerializeBicep(options); default: - throw new FormatException($"The model {nameof(GatewaysListResult)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(LicenseProfilesListResult)} does not support writing '{options.Format}' format."); } } - GatewaysListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + LicenseProfilesListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data); - return DeserializeGatewaysListResult(document.RootElement, options); + return DeserializeLicenseProfilesListResult(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(GatewaysListResult)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(LicenseProfilesListResult)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/GatewaysListResult.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/LicenseProfilesListResult.cs similarity index 63% rename from sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/GatewaysListResult.cs rename to sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/LicenseProfilesListResult.cs index 3107e4575849..e2d54e78e54b 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/GatewaysListResult.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/LicenseProfilesListResult.cs @@ -11,8 +11,8 @@ namespace Azure.ResourceManager.HybridCompute.Models { - /// The List license operation response. - internal partial class GatewaysListResult + /// The List hybrid machine license profile operation response. + internal partial class LicenseProfilesListResult { /// /// Keeps track of any properties unknown to the library. @@ -46,35 +46,35 @@ internal partial class GatewaysListResult /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . - /// The list of Gateways. + /// Initializes a new instance of . + /// The list of license profiles. /// is null. - internal GatewaysListResult(IEnumerable value) + internal LicenseProfilesListResult(IEnumerable value) { Argument.AssertNotNull(value, nameof(value)); Value = value.ToList(); } - /// Initializes a new instance of . - /// The list of Gateways. - /// The URI to fetch the next page of Gateways. Call ListNext() with this URI to fetch the next page of Gateways. + /// Initializes a new instance of . + /// The list of license profiles. + /// The URI to fetch the next page of Machines. Call ListNext() with this URI to fetch the next page of license profile. /// Keeps track of any properties unknown to the library. - internal GatewaysListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal LicenseProfilesListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal GatewaysListResult() + /// Initializes a new instance of for deserialization. + internal LicenseProfilesListResult() { } - /// The list of Gateways. - public IReadOnlyList Value { get; } - /// The URI to fetch the next page of Gateways. Call ListNext() with this URI to fetch the next page of Gateways. + /// The list of license profiles. + public IReadOnlyList Value { get; } + /// The URI to fetch the next page of Machines. Call ListNext() with this URI to fetch the next page of license profile. public string NextLink { get; } } } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/MachineRunCommandInstanceView.Serialization.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/MachineRunCommandInstanceView.Serialization.cs deleted file mode 100644 index 7530d6c203cf..000000000000 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/MachineRunCommandInstanceView.Serialization.cs +++ /dev/null @@ -1,418 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.HybridCompute.Models -{ - public partial class MachineRunCommandInstanceView : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(MachineRunCommandInstanceView)} does not support writing '{format}' format."); - } - - if (Optional.IsDefined(ExecutionState)) - { - writer.WritePropertyName("executionState"u8); - writer.WriteStringValue(ExecutionState.Value.ToString()); - } - if (Optional.IsDefined(ExecutionMessage)) - { - writer.WritePropertyName("executionMessage"u8); - writer.WriteStringValue(ExecutionMessage); - } - if (Optional.IsDefined(ExitCode)) - { - writer.WritePropertyName("exitCode"u8); - writer.WriteNumberValue(ExitCode.Value); - } - if (Optional.IsDefined(Output)) - { - writer.WritePropertyName("output"u8); - writer.WriteStringValue(Output); - } - if (Optional.IsDefined(Error)) - { - writer.WritePropertyName("error"u8); - writer.WriteStringValue(Error); - } - if (Optional.IsDefined(StartOn)) - { - writer.WritePropertyName("startTime"u8); - writer.WriteStringValue(StartOn.Value, "O"); - } - if (Optional.IsDefined(EndOn)) - { - writer.WritePropertyName("endTime"u8); - writer.WriteStringValue(EndOn.Value, "O"); - } - if (Optional.IsCollectionDefined(Statuses)) - { - writer.WritePropertyName("statuses"u8); - writer.WriteStartArray(); - foreach (var item in Statuses) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - } - - MachineRunCommandInstanceView IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(MachineRunCommandInstanceView)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeMachineRunCommandInstanceView(document.RootElement, options); - } - - internal static MachineRunCommandInstanceView DeserializeMachineRunCommandInstanceView(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - HybridComputeExecutionState? executionState = default; - string executionMessage = default; - int? exitCode = default; - string output = default; - string error = default; - DateTimeOffset? startTime = default; - DateTimeOffset? endTime = default; - IReadOnlyList statuses = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("executionState"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - executionState = new HybridComputeExecutionState(property.Value.GetString()); - continue; - } - if (property.NameEquals("executionMessage"u8)) - { - executionMessage = property.Value.GetString(); - continue; - } - if (property.NameEquals("exitCode"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - exitCode = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("output"u8)) - { - output = property.Value.GetString(); - continue; - } - if (property.NameEquals("error"u8)) - { - error = property.Value.GetString(); - continue; - } - if (property.NameEquals("startTime"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - startTime = property.Value.GetDateTimeOffset("O"); - continue; - } - if (property.NameEquals("endTime"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - endTime = property.Value.GetDateTimeOffset("O"); - continue; - } - if (property.NameEquals("statuses"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(ExtensionsResourceStatus.DeserializeExtensionsResourceStatus(item, options)); - } - statuses = array; - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new MachineRunCommandInstanceView( - executionState, - executionMessage, - exitCode, - output, - error, - startTime, - endTime, - statuses ?? new ChangeTrackingList(), - serializedAdditionalRawData); - } - - private BinaryData SerializeBicep(ModelReaderWriterOptions options) - { - StringBuilder builder = new StringBuilder(); - BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; - IDictionary propertyOverrides = null; - bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); - bool hasPropertyOverride = false; - string propertyOverride = null; - - builder.AppendLine("{"); - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ExecutionState), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" executionState: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(ExecutionState)) - { - builder.Append(" executionState: "); - builder.AppendLine($"'{ExecutionState.Value.ToString()}'"); - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ExecutionMessage), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" executionMessage: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(ExecutionMessage)) - { - builder.Append(" executionMessage: "); - if (ExecutionMessage.Contains(Environment.NewLine)) - { - builder.AppendLine("'''"); - builder.AppendLine($"{ExecutionMessage}'''"); - } - else - { - builder.AppendLine($"'{ExecutionMessage}'"); - } - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ExitCode), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" exitCode: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(ExitCode)) - { - builder.Append(" exitCode: "); - builder.AppendLine($"{ExitCode.Value}"); - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Output), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" output: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(Output)) - { - builder.Append(" output: "); - if (Output.Contains(Environment.NewLine)) - { - builder.AppendLine("'''"); - builder.AppendLine($"{Output}'''"); - } - else - { - builder.AppendLine($"'{Output}'"); - } - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Error), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" error: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(Error)) - { - builder.Append(" error: "); - if (Error.Contains(Environment.NewLine)) - { - builder.AppendLine("'''"); - builder.AppendLine($"{Error}'''"); - } - else - { - builder.AppendLine($"'{Error}'"); - } - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(StartOn), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" startTime: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(StartOn)) - { - builder.Append(" startTime: "); - var formattedDateTimeString = TypeFormatters.ToString(StartOn.Value, "o"); - builder.AppendLine($"'{formattedDateTimeString}'"); - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(EndOn), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" endTime: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(EndOn)) - { - builder.Append(" endTime: "); - var formattedDateTimeString = TypeFormatters.ToString(EndOn.Value, "o"); - builder.AppendLine($"'{formattedDateTimeString}'"); - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Statuses), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" statuses: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsCollectionDefined(Statuses)) - { - if (Statuses.Any()) - { - builder.Append(" statuses: "); - builder.AppendLine("["); - foreach (var item in Statuses) - { - BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " statuses: "); - } - builder.AppendLine(" ]"); - } - } - } - - builder.AppendLine("}"); - return BinaryData.FromString(builder.ToString()); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - case "bicep": - return SerializeBicep(options); - default: - throw new FormatException($"The model {nameof(MachineRunCommandInstanceView)} does not support writing '{options.Format}' format."); - } - } - - MachineRunCommandInstanceView IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeMachineRunCommandInstanceView(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(MachineRunCommandInstanceView)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/MachineRunCommandInstanceView.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/MachineRunCommandInstanceView.cs deleted file mode 100644 index 7d4e909db720..000000000000 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/MachineRunCommandInstanceView.cs +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.HybridCompute.Models -{ - /// The instance view of a machine run command. - public partial class MachineRunCommandInstanceView - { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; - - /// Initializes a new instance of . - internal MachineRunCommandInstanceView() - { - Statuses = new ChangeTrackingList(); - } - - /// Initializes a new instance of . - /// Script execution status. - /// Communicate script configuration errors or execution messages. - /// Exit code returned from script execution. - /// Script output stream. - /// Script error stream. - /// Script start time. - /// Script end time. - /// The status information. - /// Keeps track of any properties unknown to the library. - internal MachineRunCommandInstanceView(HybridComputeExecutionState? executionState, string executionMessage, int? exitCode, string output, string error, DateTimeOffset? startOn, DateTimeOffset? endOn, IReadOnlyList statuses, IDictionary serializedAdditionalRawData) - { - ExecutionState = executionState; - ExecutionMessage = executionMessage; - ExitCode = exitCode; - Output = output; - Error = error; - StartOn = startOn; - EndOn = endOn; - Statuses = statuses; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Script execution status. - [WirePath("executionState")] - public HybridComputeExecutionState? ExecutionState { get; } - /// Communicate script configuration errors or execution messages. - [WirePath("executionMessage")] - public string ExecutionMessage { get; } - /// Exit code returned from script execution. - [WirePath("exitCode")] - public int? ExitCode { get; } - /// Script output stream. - [WirePath("output")] - public string Output { get; } - /// Script error stream. - [WirePath("error")] - public string Error { get; } - /// Script start time. - [WirePath("startTime")] - public DateTimeOffset? StartOn { get; } - /// Script end time. - [WirePath("endTime")] - public DateTimeOffset? EndOn { get; } - /// The status information. - [WirePath("statuses")] - public IReadOnlyList Statuses { get; } - } -} diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/MachineRunCommandScriptSource.Serialization.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/MachineRunCommandScriptSource.Serialization.cs deleted file mode 100644 index b384126ebc01..000000000000 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/MachineRunCommandScriptSource.Serialization.cs +++ /dev/null @@ -1,264 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.HybridCompute.Models -{ - public partial class MachineRunCommandScriptSource : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(MachineRunCommandScriptSource)} does not support writing '{format}' format."); - } - - if (Optional.IsDefined(Script)) - { - writer.WritePropertyName("script"u8); - writer.WriteStringValue(Script); - } - if (Optional.IsDefined(ScriptUri)) - { - writer.WritePropertyName("scriptUri"u8); - writer.WriteStringValue(ScriptUri.AbsoluteUri); - } - if (Optional.IsDefined(CommandId)) - { - writer.WritePropertyName("commandId"u8); - writer.WriteStringValue(CommandId); - } - if (Optional.IsDefined(ScriptUriManagedIdentity)) - { - writer.WritePropertyName("scriptUriManagedIdentity"u8); - writer.WriteObjectValue(ScriptUriManagedIdentity, options); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - } - - MachineRunCommandScriptSource IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(MachineRunCommandScriptSource)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeMachineRunCommandScriptSource(document.RootElement, options); - } - - internal static MachineRunCommandScriptSource DeserializeMachineRunCommandScriptSource(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string script = default; - Uri scriptUri = default; - string commandId = default; - RunCommandManagedIdentity scriptUriManagedIdentity = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("script"u8)) - { - script = property.Value.GetString(); - continue; - } - if (property.NameEquals("scriptUri"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - scriptUri = new Uri(property.Value.GetString()); - continue; - } - if (property.NameEquals("commandId"u8)) - { - commandId = property.Value.GetString(); - continue; - } - if (property.NameEquals("scriptUriManagedIdentity"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - scriptUriManagedIdentity = RunCommandManagedIdentity.DeserializeRunCommandManagedIdentity(property.Value, options); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new MachineRunCommandScriptSource(script, scriptUri, commandId, scriptUriManagedIdentity, serializedAdditionalRawData); - } - - private BinaryData SerializeBicep(ModelReaderWriterOptions options) - { - StringBuilder builder = new StringBuilder(); - BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; - IDictionary propertyOverrides = null; - bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); - bool hasPropertyOverride = false; - string propertyOverride = null; - - builder.AppendLine("{"); - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Script), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" script: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(Script)) - { - builder.Append(" script: "); - if (Script.Contains(Environment.NewLine)) - { - builder.AppendLine("'''"); - builder.AppendLine($"{Script}'''"); - } - else - { - builder.AppendLine($"'{Script}'"); - } - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ScriptUri), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" scriptUri: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(ScriptUri)) - { - builder.Append(" scriptUri: "); - builder.AppendLine($"'{ScriptUri.AbsoluteUri}'"); - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(CommandId), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" commandId: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(CommandId)) - { - builder.Append(" commandId: "); - if (CommandId.Contains(Environment.NewLine)) - { - builder.AppendLine("'''"); - builder.AppendLine($"{CommandId}'''"); - } - else - { - builder.AppendLine($"'{CommandId}'"); - } - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ScriptUriManagedIdentity), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" scriptUriManagedIdentity: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(ScriptUriManagedIdentity)) - { - builder.Append(" scriptUriManagedIdentity: "); - BicepSerializationHelpers.AppendChildObject(builder, ScriptUriManagedIdentity, options, 2, false, " scriptUriManagedIdentity: "); - } - } - - builder.AppendLine("}"); - return BinaryData.FromString(builder.ToString()); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - case "bicep": - return SerializeBicep(options); - default: - throw new FormatException($"The model {nameof(MachineRunCommandScriptSource)} does not support writing '{options.Format}' format."); - } - } - - MachineRunCommandScriptSource IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeMachineRunCommandScriptSource(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(MachineRunCommandScriptSource)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/MachineRunCommandScriptSource.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/MachineRunCommandScriptSource.cs deleted file mode 100644 index 2e5fc9bf1ee3..000000000000 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/MachineRunCommandScriptSource.cs +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.HybridCompute.Models -{ - /// Describes the script sources for run command. Use only one of script, scriptUri, commandId. - public partial class MachineRunCommandScriptSource - { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; - - /// Initializes a new instance of . - public MachineRunCommandScriptSource() - { - } - - /// Initializes a new instance of . - /// Specifies the script content to be executed on the machine. - /// Specifies the script download location. It can be either SAS URI of an Azure storage blob with read access or public URI. - /// Specifies the commandId of predefined built-in script. - /// User-assigned managed identity that has access to scriptUri in case of Azure storage blob. Use an empty object in case of system-assigned identity. Make sure the Azure storage blob exists, and managed identity has been given access to blob's container with 'Storage Blob Data Reader' role assignment. In case of user-assigned identity, make sure you add it under VM's identity. For more info on managed identity and Run Command, refer https://aka.ms/ManagedIdentity and https://aka.ms/RunCommandManaged. - /// Keeps track of any properties unknown to the library. - internal MachineRunCommandScriptSource(string script, Uri scriptUri, string commandId, RunCommandManagedIdentity scriptUriManagedIdentity, IDictionary serializedAdditionalRawData) - { - Script = script; - ScriptUri = scriptUri; - CommandId = commandId; - ScriptUriManagedIdentity = scriptUriManagedIdentity; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Specifies the script content to be executed on the machine. - [WirePath("script")] - public string Script { get; set; } - /// Specifies the script download location. It can be either SAS URI of an Azure storage blob with read access or public URI. - [WirePath("scriptUri")] - public Uri ScriptUri { get; set; } - /// Specifies the commandId of predefined built-in script. - [WirePath("commandId")] - public string CommandId { get; set; } - /// User-assigned managed identity that has access to scriptUri in case of Azure storage blob. Use an empty object in case of system-assigned identity. Make sure the Azure storage blob exists, and managed identity has been given access to blob's container with 'Storage Blob Data Reader' role assignment. In case of user-assigned identity, make sure you add it under VM's identity. For more info on managed identity and Run Command, refer https://aka.ms/ManagedIdentity and https://aka.ms/RunCommandManaged. - [WirePath("scriptUriManagedIdentity")] - public RunCommandManagedIdentity ScriptUriManagedIdentity { get; set; } - } -} diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/MachineRunCommandsListResult.Serialization.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/MachineRunCommandsListResult.Serialization.cs deleted file mode 100644 index bc9fb76f71b2..000000000000 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/MachineRunCommandsListResult.Serialization.cs +++ /dev/null @@ -1,219 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.HybridCompute.Models -{ - internal partial class MachineRunCommandsListResult : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(MachineRunCommandsListResult)} does not support writing '{format}' format."); - } - - if (Optional.IsCollectionDefined(Value)) - { - writer.WritePropertyName("value"u8); - writer.WriteStartArray(); - foreach (var item in Value) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(NextLink)) - { - writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - } - - MachineRunCommandsListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(MachineRunCommandsListResult)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeMachineRunCommandsListResult(document.RootElement, options); - } - - internal static MachineRunCommandsListResult DeserializeMachineRunCommandsListResult(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IReadOnlyList value = default; - string nextLink = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("value"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(MachineRunCommandData.DeserializeMachineRunCommandData(item, options)); - } - value = array; - continue; - } - if (property.NameEquals("nextLink"u8)) - { - nextLink = property.Value.GetString(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new MachineRunCommandsListResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); - } - - private BinaryData SerializeBicep(ModelReaderWriterOptions options) - { - StringBuilder builder = new StringBuilder(); - BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; - IDictionary propertyOverrides = null; - bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); - bool hasPropertyOverride = false; - string propertyOverride = null; - - builder.AppendLine("{"); - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" value: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsCollectionDefined(Value)) - { - if (Value.Any()) - { - builder.Append(" value: "); - builder.AppendLine("["); - foreach (var item in Value) - { - BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); - } - builder.AppendLine(" ]"); - } - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" nextLink: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(NextLink)) - { - builder.Append(" nextLink: "); - if (NextLink.Contains(Environment.NewLine)) - { - builder.AppendLine("'''"); - builder.AppendLine($"{NextLink}'''"); - } - else - { - builder.AppendLine($"'{NextLink}'"); - } - } - } - - builder.AppendLine("}"); - return BinaryData.FromString(builder.ToString()); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - case "bicep": - return SerializeBicep(options); - default: - throw new FormatException($"The model {nameof(MachineRunCommandsListResult)} does not support writing '{options.Format}' format."); - } - } - - MachineRunCommandsListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeMachineRunCommandsListResult(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(MachineRunCommandsListResult)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/RunCommandManagedIdentity.Serialization.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/NetworkSecurityPerimeterConfigurationReconcileResult.Serialization.cs similarity index 55% rename from sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/RunCommandManagedIdentity.Serialization.cs rename to sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/NetworkSecurityPerimeterConfigurationReconcileResult.Serialization.cs index 66e7e2557820..1cb9c88c452e 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/RunCommandManagedIdentity.Serialization.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/NetworkSecurityPerimeterConfigurationReconcileResult.Serialization.cs @@ -14,11 +14,11 @@ namespace Azure.ResourceManager.HybridCompute.Models { - public partial class RunCommandManagedIdentity : IUtf8JsonSerializable, IJsonModel + public partial class NetworkSecurityPerimeterConfigurationReconcileResult : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -29,21 +29,16 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea /// The client options for reading and writing models. protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(RunCommandManagedIdentity)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(NetworkSecurityPerimeterConfigurationReconcileResult)} does not support writing '{format}' format."); } - if (Optional.IsDefined(ClientId)) + if (Optional.IsDefined(Location)) { - writer.WritePropertyName("clientId"u8); - writer.WriteStringValue(ClientId.Value); - } - if (Optional.IsDefined(ObjectId)) - { - writer.WritePropertyName("objectId"u8); - writer.WriteStringValue(ObjectId.Value); + writer.WritePropertyName("location"u8); + writer.WriteStringValue(Location.Value); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -62,19 +57,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - RunCommandManagedIdentity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + NetworkSecurityPerimeterConfigurationReconcileResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(RunCommandManagedIdentity)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(NetworkSecurityPerimeterConfigurationReconcileResult)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeRunCommandManagedIdentity(document.RootElement, options); + return DeserializeNetworkSecurityPerimeterConfigurationReconcileResult(document.RootElement, options); } - internal static RunCommandManagedIdentity DeserializeRunCommandManagedIdentity(JsonElement element, ModelReaderWriterOptions options = null) + internal static NetworkSecurityPerimeterConfigurationReconcileResult DeserializeNetworkSecurityPerimeterConfigurationReconcileResult(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -82,28 +77,18 @@ internal static RunCommandManagedIdentity DeserializeRunCommandManagedIdentity(J { return null; } - Guid? clientId = default; - Guid? objectId = default; + AzureLocation? location = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("clientId"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - clientId = property.Value.GetGuid(); - continue; - } - if (property.NameEquals("objectId"u8)) + if (property.NameEquals("location"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - objectId = property.Value.GetGuid(); + location = new AzureLocation(property.Value.GetString()); continue; } if (options.Format != "W") @@ -112,7 +97,7 @@ internal static RunCommandManagedIdentity DeserializeRunCommandManagedIdentity(J } } serializedAdditionalRawData = rawDataDictionary; - return new RunCommandManagedIdentity(clientId, objectId, serializedAdditionalRawData); + return new NetworkSecurityPerimeterConfigurationReconcileResult(location, serializedAdditionalRawData); } private BinaryData SerializeBicep(ModelReaderWriterOptions options) @@ -126,33 +111,18 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) builder.AppendLine("{"); - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ClientId), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" clientId: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(ClientId)) - { - builder.Append(" clientId: "); - builder.AppendLine($"'{ClientId.Value.ToString()}'"); - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ObjectId), out propertyOverride); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Location), out propertyOverride); if (hasPropertyOverride) { - builder.Append(" objectId: "); + builder.Append(" location: "); builder.AppendLine(propertyOverride); } else { - if (Optional.IsDefined(ObjectId)) + if (Optional.IsDefined(Location)) { - builder.Append(" objectId: "); - builder.AppendLine($"'{ObjectId.Value.ToString()}'"); + builder.Append(" location: "); + builder.AppendLine($"'{Location.Value.ToString()}'"); } } @@ -160,9 +130,9 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) return BinaryData.FromString(builder.ToString()); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { @@ -171,26 +141,26 @@ BinaryData IPersistableModel.Write(ModelReaderWriterO case "bicep": return SerializeBicep(options); default: - throw new FormatException($"The model {nameof(RunCommandManagedIdentity)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(NetworkSecurityPerimeterConfigurationReconcileResult)} does not support writing '{options.Format}' format."); } } - RunCommandManagedIdentity IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + NetworkSecurityPerimeterConfigurationReconcileResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data); - return DeserializeRunCommandManagedIdentity(document.RootElement, options); + return DeserializeNetworkSecurityPerimeterConfigurationReconcileResult(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(RunCommandManagedIdentity)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(NetworkSecurityPerimeterConfigurationReconcileResult)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/NetworkSecurityPerimeterConfigurationReconcileResult.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/NetworkSecurityPerimeterConfigurationReconcileResult.cs new file mode 100644 index 000000000000..17e515409c44 --- /dev/null +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/NetworkSecurityPerimeterConfigurationReconcileResult.cs @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.HybridCompute.Models +{ + /// Result of network security perimeter configurations. + public partial class NetworkSecurityPerimeterConfigurationReconcileResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal NetworkSecurityPerimeterConfigurationReconcileResult() + { + } + + /// Initializes a new instance of . + /// The URL of the resource used to check the status of the asynchronous operation. + /// Keeps track of any properties unknown to the library. + internal NetworkSecurityPerimeterConfigurationReconcileResult(AzureLocation? location, IDictionary serializedAdditionalRawData) + { + Location = location; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The URL of the resource used to check the status of the asynchronous operation. + [WirePath("location")] + public AzureLocation? Location { get; } + } +} diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/RunCommandInputParameter.Serialization.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/RunCommandInputParameter.Serialization.cs deleted file mode 100644 index fc81240deaae..000000000000 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/RunCommandInputParameter.Serialization.cs +++ /dev/null @@ -1,198 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.HybridCompute.Models -{ - public partial class RunCommandInputParameter : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(RunCommandInputParameter)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - writer.WritePropertyName("value"u8); - writer.WriteStringValue(Value); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - } - - RunCommandInputParameter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(RunCommandInputParameter)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeRunCommandInputParameter(document.RootElement, options); - } - - internal static RunCommandInputParameter DeserializeRunCommandInputParameter(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string name = default; - string value = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("value"u8)) - { - value = property.Value.GetString(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new RunCommandInputParameter(name, value, serializedAdditionalRawData); - } - - private BinaryData SerializeBicep(ModelReaderWriterOptions options) - { - StringBuilder builder = new StringBuilder(); - BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; - IDictionary propertyOverrides = null; - bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); - bool hasPropertyOverride = false; - string propertyOverride = null; - - builder.AppendLine("{"); - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" name: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(Name)) - { - builder.Append(" name: "); - if (Name.Contains(Environment.NewLine)) - { - builder.AppendLine("'''"); - builder.AppendLine($"{Name}'''"); - } - else - { - builder.AppendLine($"'{Name}'"); - } - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" value: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(Value)) - { - builder.Append(" value: "); - if (Value.Contains(Environment.NewLine)) - { - builder.AppendLine("'''"); - builder.AppendLine($"{Value}'''"); - } - else - { - builder.AppendLine($"'{Value}'"); - } - } - } - - builder.AppendLine("}"); - return BinaryData.FromString(builder.ToString()); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - case "bicep": - return SerializeBicep(options); - default: - throw new FormatException($"The model {nameof(RunCommandInputParameter)} does not support writing '{options.Format}' format."); - } - } - - RunCommandInputParameter IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeRunCommandInputParameter(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(RunCommandInputParameter)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/RunCommandManagedIdentity.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/RunCommandManagedIdentity.cs deleted file mode 100644 index 4bb36250f9c6..000000000000 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/RunCommandManagedIdentity.cs +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.HybridCompute.Models -{ - /// Contains clientId or objectId (use only one, not both) of a user-assigned managed identity that has access to storage blob used in Run Command. Use an empty RunCommandManagedIdentity object in case of system-assigned identity. Make sure the Azure storage blob exists in case of scriptUri, and managed identity has been given access to blob's container with 'Storage Blob Data Reader' role assignment with scriptUri blob and 'Storage Blob Data Contributor' for Append blobs(outputBlobUri, errorBlobUri). In case of user assigned identity, make sure you add it under VM's identity. For more info on managed identity and Run Command, refer https://aka.ms/ManagedIdentity and https://aka.ms/RunCommandManaged. - public partial class RunCommandManagedIdentity - { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; - - /// Initializes a new instance of . - public RunCommandManagedIdentity() - { - } - - /// Initializes a new instance of . - /// Client Id (GUID value) of the user-assigned managed identity. ObjectId should not be used if this is provided. - /// Object Id (GUID value) of the user-assigned managed identity. ClientId should not be used if this is provided. - /// Keeps track of any properties unknown to the library. - internal RunCommandManagedIdentity(Guid? clientId, Guid? objectId, IDictionary serializedAdditionalRawData) - { - ClientId = clientId; - ObjectId = objectId; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Client Id (GUID value) of the user-assigned managed identity. ObjectId should not be used if this is provided. - [WirePath("clientId")] - public Guid? ClientId { get; set; } - /// Object Id (GUID value) of the user-assigned managed identity. ClientId should not be used if this is provided. - [WirePath("objectId")] - public Guid? ObjectId { get; set; } - } -} diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/NetworkSecurityPerimeterConfigurationCollection.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/NetworkSecurityPerimeterConfigurationCollection.cs index cf2f12cba90c..ec2d7cd47818 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/NetworkSecurityPerimeterConfigurationCollection.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/NetworkSecurityPerimeterConfigurationCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(strin /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetA /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(Ca /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string perimeterName, Canc /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string perimeterName, CancellationToken can /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/NetworkSecurityPerimeterConfigurationResource.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/NetworkSecurityPerimeterConfigurationResource.cs index a5531384c3ce..3d6644b168c7 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/NetworkSecurityPerimeterConfigurationResource.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/NetworkSecurityPerimeterConfigurationResource.cs @@ -11,6 +11,7 @@ using System.Threading.Tasks; using Azure.Core; using Azure.Core.Pipeline; +using Azure.ResourceManager.HybridCompute.Models; namespace Azure.ResourceManager.HybridCompute { @@ -101,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -141,7 +142,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-05-20-preview + /// 2024-07-10 /// /// /// Resource @@ -167,5 +168,89 @@ public virtual Response Get(Cance throw; } } + + /// + /// Forces the network security perimeter configuration to refresh for a private link scope. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}/networkSecurityPerimeterConfigurations/{perimeterName}/reconcile + /// + /// + /// Operation Id + /// NetworkSecurityPerimeterConfigurations_ReconcileForPrivateLinkScope + /// + /// + /// Default Api Version + /// 2024-07-10 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task> ReconcileForPrivateLinkScopeAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _networkSecurityPerimeterConfigurationClientDiagnostics.CreateScope("NetworkSecurityPerimeterConfigurationResource.ReconcileForPrivateLinkScope"); + scope.Start(); + try + { + var response = await _networkSecurityPerimeterConfigurationRestClient.ReconcileForPrivateLinkScopeAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new HybridComputeArmOperation(new NetworkSecurityPerimeterConfigurationReconcileResultOperationSource(), _networkSecurityPerimeterConfigurationClientDiagnostics, Pipeline, _networkSecurityPerimeterConfigurationRestClient.CreateReconcileForPrivateLinkScopeRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Forces the network security perimeter configuration to refresh for a private link scope. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}/networkSecurityPerimeterConfigurations/{perimeterName}/reconcile + /// + /// + /// Operation Id + /// NetworkSecurityPerimeterConfigurations_ReconcileForPrivateLinkScope + /// + /// + /// Default Api Version + /// 2024-07-10 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation ReconcileForPrivateLinkScope(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _networkSecurityPerimeterConfigurationClientDiagnostics.CreateScope("NetworkSecurityPerimeterConfigurationResource.ReconcileForPrivateLinkScope"); + scope.Start(); + try + { + var response = _networkSecurityPerimeterConfigurationRestClient.ReconcileForPrivateLinkScope(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new HybridComputeArmOperation(new NetworkSecurityPerimeterConfigurationReconcileResultOperationSource(), _networkSecurityPerimeterConfigurationClientDiagnostics, Pipeline, _networkSecurityPerimeterConfigurationRestClient.CreateReconcileForPrivateLinkScopeRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } } } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/RestOperations/ExtensionMetadataRestOperations.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/RestOperations/ExtensionMetadataRestOperations.cs index 535763209d97..76e027678e6f 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/RestOperations/ExtensionMetadataRestOperations.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/RestOperations/ExtensionMetadataRestOperations.cs @@ -32,7 +32,7 @@ public ExtensionMetadataRestOperations(HttpPipeline pipeline, string application { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-05-20-preview"; + _apiVersion = apiVersion ?? "2024-07-10"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/RestOperations/HybridComputeManagementRestOperations.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/RestOperations/HybridComputeManagementRestOperations.cs index 6bbbeb1f2898..9ed9e5f0dcd3 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/RestOperations/HybridComputeManagementRestOperations.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/RestOperations/HybridComputeManagementRestOperations.cs @@ -31,7 +31,7 @@ public HybridComputeManagementRestOperations(HttpPipeline pipeline, string appli { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-05-20-preview"; + _apiVersion = apiVersion ?? "2024-07-10"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/RestOperations/MachineRunCommandsRestOperations.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/RestOperations/LicenseProfilesRestOperations.cs similarity index 63% rename from sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/RestOperations/MachineRunCommandsRestOperations.cs rename to sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/RestOperations/LicenseProfilesRestOperations.cs index 6c4b4699cbaf..8c86ed242e38 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/RestOperations/MachineRunCommandsRestOperations.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/RestOperations/LicenseProfilesRestOperations.cs @@ -15,28 +15,28 @@ namespace Azure.ResourceManager.HybridCompute { - internal partial class MachineRunCommandsRestOperations + internal partial class LicenseProfilesRestOperations { private readonly TelemetryDetails _userAgent; private readonly HttpPipeline _pipeline; private readonly Uri _endpoint; private readonly string _apiVersion; - /// Initializes a new instance of MachineRunCommandsRestOperations. + /// Initializes a new instance of LicenseProfilesRestOperations. /// The HTTP pipeline for sending and receiving REST requests and responses. /// The application id to use for user agent. /// server parameter. /// Api Version. /// or is null. - public MachineRunCommandsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + public LicenseProfilesRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-05-20-preview"; + _apiVersion = apiVersion ?? "2024-07-10"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string machineName, string runCommandName, MachineRunCommandData data) + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string machineName, HybridComputeLicenseProfileData data) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -46,13 +46,13 @@ internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.HybridCompute/machines/", false); uri.AppendPath(machineName, true); - uri.AppendPath("/runCommands/", false); - uri.AppendPath(runCommandName, true); + uri.AppendPath("/licenseProfiles/", false); + uri.AppendPath("default", true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string machineName, string runCommandName, MachineRunCommandData data) + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string machineName, HybridComputeLicenseProfileData data) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -65,8 +65,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.HybridCompute/machines/", false); uri.AppendPath(machineName, true); - uri.AppendPath("/runCommands/", false); - uri.AppendPath(runCommandName, true); + uri.AppendPath("/licenseProfiles/", false); + uri.AppendPath("default", true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -78,24 +78,22 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r return message; } - /// The operation to create or update a run command. + /// The operation to create or update a license profile. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the hybrid machine. - /// The name of the run command. - /// Parameters supplied to the Create Run Command. + /// Parameters supplied to the Create or Update license profile operation. /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string machineName, string runCommandName, MachineRunCommandData data, CancellationToken cancellationToken = default) + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string machineName, HybridComputeLicenseProfileData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(machineName, nameof(machineName)); - Argument.AssertNotNullOrEmpty(runCommandName, nameof(runCommandName)); Argument.AssertNotNull(data, nameof(data)); - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, machineName, runCommandName, data); + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, machineName, data); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -107,24 +105,22 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re } } - /// The operation to create or update a run command. + /// The operation to create or update a license profile. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the hybrid machine. - /// The name of the run command. - /// Parameters supplied to the Create Run Command. + /// Parameters supplied to the Create or Update license profile operation. /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string machineName, string runCommandName, MachineRunCommandData data, CancellationToken cancellationToken = default) + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string machineName, HybridComputeLicenseProfileData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(machineName, nameof(machineName)); - Argument.AssertNotNullOrEmpty(runCommandName, nameof(runCommandName)); Argument.AssertNotNull(data, nameof(data)); - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, machineName, runCommandName, data); + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, machineName, data); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -136,7 +132,7 @@ public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, } } - internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string machineName, string runCommandName) + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string machineName, HybridComputeLicenseProfilePatch patch) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -146,17 +142,17 @@ internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.HybridCompute/machines/", false); uri.AppendPath(machineName, true); - uri.AppendPath("/runCommands/", false); - uri.AppendPath(runCommandName, true); + uri.AppendPath("/licenseProfiles/", false); + uri.AppendPath("default", true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string machineName, string runCommandName) + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string machineName, HybridComputeLicenseProfilePatch patch) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Delete; + request.Method = RequestMethod.Patch; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -165,72 +161,74 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.HybridCompute/machines/", false); uri.AppendPath(machineName, true); - uri.AppendPath("/runCommands/", false); - uri.AppendPath(runCommandName, true); + uri.AppendPath("/licenseProfiles/", false); + uri.AppendPath("default", true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + request.Content = content; _userAgent.Apply(message); return message; } - /// The operation to delete a run command. + /// The operation to update a license profile. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the hybrid machine. - /// The name of the run command. + /// Parameters supplied to the Update license profile operation. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string machineName, string runCommandName, CancellationToken cancellationToken = default) + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string machineName, HybridComputeLicenseProfilePatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(machineName, nameof(machineName)); - Argument.AssertNotNullOrEmpty(runCommandName, nameof(runCommandName)); + Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, machineName, runCommandName); + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, machineName, patch); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: case 202: - case 204: return message.Response; default: throw new RequestFailedException(message.Response); } } - /// The operation to delete a run command. + /// The operation to update a license profile. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the hybrid machine. - /// The name of the run command. + /// Parameters supplied to the Update license profile operation. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response Delete(string subscriptionId, string resourceGroupName, string machineName, string runCommandName, CancellationToken cancellationToken = default) + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string machineName, HybridComputeLicenseProfilePatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(machineName, nameof(machineName)); - Argument.AssertNotNullOrEmpty(runCommandName, nameof(runCommandName)); + Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, machineName, runCommandName); + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, machineName, patch); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: case 202: - case 204: return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string machineName, string runCommandName) + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string machineName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -240,13 +238,13 @@ internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string res uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.HybridCompute/machines/", false); uri.AppendPath(machineName, true); - uri.AppendPath("/runCommands/", false); - uri.AppendPath(runCommandName, true); + uri.AppendPath("/licenseProfiles/", false); + uri.AppendPath("default", true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string machineName, string runCommandName) + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string machineName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -259,8 +257,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.HybridCompute/machines/", false); uri.AppendPath(machineName, true); - uri.AppendPath("/runCommands/", false); - uri.AppendPath(runCommandName, true); + uri.AppendPath("/licenseProfiles/", false); + uri.AppendPath("default", true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -268,73 +266,69 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou return message; } - /// The operation to get a run command. + /// Retrieves information about the view of a license profile. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the hybrid machine. - /// The name of the run command. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string machineName, string runCommandName, CancellationToken cancellationToken = default) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string machineName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(machineName, nameof(machineName)); - Argument.AssertNotNullOrEmpty(runCommandName, nameof(runCommandName)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, machineName, runCommandName); + using var message = CreateGetRequest(subscriptionId, resourceGroupName, machineName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - MachineRunCommandData value = default; + HybridComputeLicenseProfileData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = MachineRunCommandData.DeserializeMachineRunCommandData(document.RootElement); + value = HybridComputeLicenseProfileData.DeserializeHybridComputeLicenseProfileData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((MachineRunCommandData)null, message.Response); + return Response.FromValue((HybridComputeLicenseProfileData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - /// The operation to get a run command. + /// Retrieves information about the view of a license profile. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the hybrid machine. - /// The name of the run command. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string machineName, string runCommandName, CancellationToken cancellationToken = default) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string machineName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(machineName, nameof(machineName)); - Argument.AssertNotNullOrEmpty(runCommandName, nameof(runCommandName)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, machineName, runCommandName); + using var message = CreateGetRequest(subscriptionId, resourceGroupName, machineName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - MachineRunCommandData value = default; + HybridComputeLicenseProfileData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = MachineRunCommandData.DeserializeMachineRunCommandData(document.RootElement); + value = HybridComputeLicenseProfileData.DeserializeHybridComputeLicenseProfileData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((MachineRunCommandData)null, message.Response); + return Response.FromValue((HybridComputeLicenseProfileData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string machineName, string expand) + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string machineName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -344,16 +338,100 @@ internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string re uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.HybridCompute/machines/", false); uri.AppendPath(machineName, true); - uri.AppendPath("/runCommands", false); - if (expand != null) + uri.AppendPath("/licenseProfiles/", false); + uri.AppendPath("default", true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string machineName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + 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.HybridCompute/machines/", false); + uri.AppendPath(machineName, true); + uri.AppendPath("/licenseProfiles/", false); + uri.AppendPath("default", true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// The operation to delete a license profile. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the hybrid machine. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string machineName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(machineName, nameof(machineName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, machineName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) { - uri.AppendQuery("$expand", expand, true); + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); } + } + + /// The operation to delete a license profile. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the hybrid machine. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string machineName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(machineName, nameof(machineName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, machineName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string machineName) + { + 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.HybridCompute/machines/", false); + uri.AppendPath(machineName, true); + uri.AppendPath("/licenseProfiles", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string machineName, string expand) + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string machineName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -366,11 +444,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.HybridCompute/machines/", false); uri.AppendPath(machineName, true); - uri.AppendPath("/runCommands", false); - if (expand != null) - { - uri.AppendQuery("$expand", expand, true); - } + uri.AppendPath("/licenseProfiles", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -378,29 +452,28 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro return message; } - /// The operation to get all the run commands of a non-Azure machine. + /// The operation to get all license profiles of a non-Azure machine. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The name of the hybrid machine. - /// The expand expression to apply on the operation. + /// The name of the machine. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListAsync(string subscriptionId, string resourceGroupName, string machineName, string expand = null, CancellationToken cancellationToken = default) + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string machineName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(machineName, nameof(machineName)); - using var message = CreateListRequest(subscriptionId, resourceGroupName, machineName, expand); + using var message = CreateListRequest(subscriptionId, resourceGroupName, machineName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - MachineRunCommandsListResult value = default; + LicenseProfilesListResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = MachineRunCommandsListResult.DeserializeMachineRunCommandsListResult(document.RootElement); + value = LicenseProfilesListResult.DeserializeLicenseProfilesListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -408,29 +481,28 @@ public async Task> ListAsync(string subsc } } - /// The operation to get all the run commands of a non-Azure machine. + /// The operation to get all license profiles of a non-Azure machine. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The name of the hybrid machine. - /// The expand expression to apply on the operation. + /// The name of the machine. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response List(string subscriptionId, string resourceGroupName, string machineName, string expand = null, CancellationToken cancellationToken = default) + public Response List(string subscriptionId, string resourceGroupName, string machineName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(machineName, nameof(machineName)); - using var message = CreateListRequest(subscriptionId, resourceGroupName, machineName, expand); + using var message = CreateListRequest(subscriptionId, resourceGroupName, machineName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - MachineRunCommandsListResult value = default; + LicenseProfilesListResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = MachineRunCommandsListResult.DeserializeMachineRunCommandsListResult(document.RootElement); + value = LicenseProfilesListResult.DeserializeLicenseProfilesListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -438,7 +510,7 @@ public Response List(string subscriptionId, string } } - internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string machineName, string expand) + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string machineName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -446,7 +518,7 @@ internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string return uri; } - internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string machineName, string expand) + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string machineName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -460,31 +532,30 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript return message; } - /// The operation to get all the run commands of a non-Azure machine. + /// The operation to get all license profiles of a non-Azure machine. /// The URL to the next page of results. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The name of the hybrid machine. - /// The expand expression to apply on the operation. + /// The name of the machine. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string machineName, string expand = null, CancellationToken cancellationToken = default) + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string machineName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(machineName, nameof(machineName)); - using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, machineName, expand); + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, machineName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - MachineRunCommandsListResult value = default; + LicenseProfilesListResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = MachineRunCommandsListResult.DeserializeMachineRunCommandsListResult(document.RootElement); + value = LicenseProfilesListResult.DeserializeLicenseProfilesListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -492,31 +563,30 @@ public async Task> ListNextPageAsync(stri } } - /// The operation to get all the run commands of a non-Azure machine. + /// The operation to get all license profiles of a non-Azure machine. /// The URL to the next page of results. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The name of the hybrid machine. - /// The expand expression to apply on the operation. + /// The name of the machine. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string machineName, string expand = null, CancellationToken cancellationToken = default) + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string machineName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(machineName, nameof(machineName)); - using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, machineName, expand); + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, machineName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - MachineRunCommandsListResult value = default; + LicenseProfilesListResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = MachineRunCommandsListResult.DeserializeMachineRunCommandsListResult(document.RootElement); + value = LicenseProfilesListResult.DeserializeLicenseProfilesListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/RestOperations/LicensesRestOperations.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/RestOperations/LicensesRestOperations.cs index 174bfb4dad68..517a1e17f9df 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/RestOperations/LicensesRestOperations.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/RestOperations/LicensesRestOperations.cs @@ -32,10 +32,86 @@ public LicensesRestOperations(HttpPipeline pipeline, string applicationId, Uri e { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-05-20-preview"; + _apiVersion = apiVersion ?? "2024-07-10"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } + internal RequestUriBuilder CreateValidateLicenseRequestUri(string subscriptionId, HybridComputeLicenseData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.HybridCompute/validateLicense", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateValidateLicenseRequest(string subscriptionId, HybridComputeLicenseData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.HybridCompute/validateLicense", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// The operation to validate a license. + /// The ID of the target subscription. + /// Parameters supplied to the license validation operation. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task ValidateLicenseAsync(string subscriptionId, HybridComputeLicenseData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateValidateLicenseRequest(subscriptionId, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// The operation to validate a license. + /// The ID of the target subscription. + /// Parameters supplied to the license validation operation. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response ValidateLicense(string subscriptionId, HybridComputeLicenseData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateValidateLicenseRequest(subscriptionId, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string licenseName, HybridComputeLicenseData data) { var uri = new RawRequestUriBuilder(); diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/RestOperations/MachineExtensionsRestOperations.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/RestOperations/MachineExtensionsRestOperations.cs index 859dc15f190b..a21c68e80b01 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/RestOperations/MachineExtensionsRestOperations.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/RestOperations/MachineExtensionsRestOperations.cs @@ -32,7 +32,7 @@ public MachineExtensionsRestOperations(HttpPipeline pipeline, string application { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-05-20-preview"; + _apiVersion = apiVersion ?? "2024-07-10"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -178,7 +178,7 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG return message; } - /// The operation to create or update the extension. + /// The operation to update the extension. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the machine where the extension should be created or updated. @@ -207,7 +207,7 @@ public async Task UpdateAsync(string subscriptionId, string resourceGr } } - /// The operation to create or update the extension. + /// The operation to update the extension. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the machine where the extension should be created or updated. diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/RestOperations/MachinesRestOperations.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/RestOperations/MachinesRestOperations.cs index 41bc2768795c..096dbaca21ca 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/RestOperations/MachinesRestOperations.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/RestOperations/MachinesRestOperations.cs @@ -32,10 +32,120 @@ public MachinesRestOperations(HttpPipeline pipeline, string applicationId, Uri e { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-05-20-preview"; + _apiVersion = apiVersion ?? "2024-07-10"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string machineName, HybridComputeMachineData data, string expand) + { + 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.HybridCompute/machines/", false); + uri.AppendPath(machineName, true); + uri.AppendQuery("api-version", _apiVersion, true); + if (expand != null) + { + uri.AppendQuery("$expand", expand, true); + } + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string machineName, HybridComputeMachineData data, string expand) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + 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.HybridCompute/machines/", false); + uri.AppendPath(machineName, true); + uri.AppendQuery("api-version", _apiVersion, true); + if (expand != null) + { + uri.AppendQuery("$expand", expand, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// The operation to create or update a hybrid machine. Please note some properties can be set only during machine creation. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the hybrid machine. + /// Parameters supplied to the Create hybrid machine operation. + /// Expands referenced resources. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string machineName, HybridComputeMachineData data, string expand = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(machineName, nameof(machineName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, machineName, data, expand); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + HybridComputeMachineData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = HybridComputeMachineData.DeserializeHybridComputeMachineData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// The operation to create or update a hybrid machine. Please note some properties can be set only during machine creation. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the hybrid machine. + /// Parameters supplied to the Create hybrid machine operation. + /// Expands referenced resources. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string machineName, HybridComputeMachineData data, string expand = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(machineName, nameof(machineName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, machineName, data, expand); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + HybridComputeMachineData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = HybridComputeMachineData.DeserializeHybridComputeMachineData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string machineName, HybridComputeMachinePatch patch) { var uri = new RawRequestUriBuilder(); diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/RestOperations/NetworkProfileRestOperations.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/RestOperations/NetworkProfileRestOperations.cs index 3ea8898f3dd0..3de41308a598 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/RestOperations/NetworkProfileRestOperations.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/RestOperations/NetworkProfileRestOperations.cs @@ -32,7 +32,7 @@ public NetworkProfileRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-05-20-preview"; + _apiVersion = apiVersion ?? "2024-07-10"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/RestOperations/NetworkSecurityPerimeterConfigurationsRestOperations.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/RestOperations/NetworkSecurityPerimeterConfigurationsRestOperations.cs index a7759fbf7d49..dbd45b9fb0aa 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/RestOperations/NetworkSecurityPerimeterConfigurationsRestOperations.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/RestOperations/NetworkSecurityPerimeterConfigurationsRestOperations.cs @@ -32,7 +32,7 @@ public NetworkSecurityPerimeterConfigurationsRestOperations(HttpPipeline pipelin { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-05-20-preview"; + _apiVersion = apiVersion ?? "2024-07-10"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -234,6 +234,100 @@ public Response ListByPrivateLi } } + internal RequestUriBuilder CreateReconcileForPrivateLinkScopeRequestUri(string subscriptionId, string resourceGroupName, string scopeName, string perimeterName) + { + 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.HybridCompute/privateLinkScopes/", false); + uri.AppendPath(scopeName, true); + uri.AppendPath("/networkSecurityPerimeterConfigurations/", false); + uri.AppendPath(perimeterName, true); + uri.AppendPath("/reconcile", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateReconcileForPrivateLinkScopeRequest(string subscriptionId, string resourceGroupName, string scopeName, string perimeterName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + 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.HybridCompute/privateLinkScopes/", false); + uri.AppendPath(scopeName, true); + uri.AppendPath("/networkSecurityPerimeterConfigurations/", false); + uri.AppendPath(perimeterName, true); + uri.AppendPath("/reconcile", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Forces the network security perimeter configuration to refresh for a private link scope. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Azure Arc PrivateLinkScope resource. + /// The name, in the format {perimeterGuid}.{associationName}, of the Network Security Perimeter resource. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task ReconcileForPrivateLinkScopeAsync(string subscriptionId, string resourceGroupName, string scopeName, string perimeterName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(scopeName, nameof(scopeName)); + Argument.AssertNotNullOrEmpty(perimeterName, nameof(perimeterName)); + + using var message = CreateReconcileForPrivateLinkScopeRequest(subscriptionId, resourceGroupName, scopeName, perimeterName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Forces the network security perimeter configuration to refresh for a private link scope. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Azure Arc PrivateLinkScope resource. + /// The name, in the format {perimeterGuid}.{associationName}, of the Network Security Perimeter resource. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ReconcileForPrivateLinkScope(string subscriptionId, string resourceGroupName, string scopeName, string perimeterName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(scopeName, nameof(scopeName)); + Argument.AssertNotNullOrEmpty(perimeterName, nameof(perimeterName)); + + using var message = CreateReconcileForPrivateLinkScopeRequest(subscriptionId, resourceGroupName, scopeName, perimeterName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + internal RequestUriBuilder CreateListByPrivateLinkScopeNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string scopeName) { var uri = new RawRequestUriBuilder(); diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs index 0fc03a5eb35f..1aea81b239d5 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs @@ -32,7 +32,7 @@ public PrivateEndpointConnectionsRestOperations(HttpPipeline pipeline, string ap { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-05-20-preview"; + _apiVersion = apiVersion ?? "2024-07-10"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs index 54c36e60cd94..0e66a472dbe0 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs @@ -32,7 +32,7 @@ public PrivateLinkResourcesRestOperations(HttpPipeline pipeline, string applicat { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-05-20-preview"; + _apiVersion = apiVersion ?? "2024-07-10"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/RestOperations/PrivateLinkScopesRestOperations.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/RestOperations/PrivateLinkScopesRestOperations.cs index 157e2039387b..1be5d5f18c88 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/RestOperations/PrivateLinkScopesRestOperations.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/RestOperations/PrivateLinkScopesRestOperations.cs @@ -32,7 +32,7 @@ public PrivateLinkScopesRestOperations(HttpPipeline pipeline, string application { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-05-20-preview"; + _apiVersion = apiVersion ?? "2024-07-10"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/RestOperations/SettingsRestOperations.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/RestOperations/SettingsRestOperations.cs deleted file mode 100644 index 705e6da3d691..000000000000 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/RestOperations/SettingsRestOperations.cs +++ /dev/null @@ -1,165 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager.HybridCompute.Models; - -namespace Azure.ResourceManager.HybridCompute -{ - internal partial class SettingsRestOperations - { - private readonly TelemetryDetails _userAgent; - private readonly HttpPipeline _pipeline; - private readonly Uri _endpoint; - private readonly string _apiVersion; - - /// Initializes a new instance of SettingsRestOperations. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// The application id to use for user agent. - /// server parameter. - /// Api Version. - /// or is null. - public SettingsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) - { - _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); - _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-05-20-preview"; - _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); - } - - internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string baseProvider, string baseResourceType, string baseResourceName, string settingsResourceName, HybridComputeTargetResourceSettings hybridComputeTargetResourceSettings) - { - 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/", false); - uri.AppendPath(baseProvider, true); - uri.AppendPath("/", false); - uri.AppendPath(baseResourceType, true); - uri.AppendPath("/", false); - uri.AppendPath(baseResourceName, true); - uri.AppendPath("/providers/Microsoft.HybridCompute/settings/", false); - uri.AppendPath(settingsResourceName, true); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string baseProvider, string baseResourceType, string baseResourceName, string settingsResourceName, HybridComputeTargetResourceSettings hybridComputeTargetResourceSettings) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Put; - 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/", false); - uri.AppendPath(baseProvider, true); - uri.AppendPath("/", false); - uri.AppendPath(baseResourceType, true); - uri.AppendPath("/", false); - uri.AppendPath(baseResourceName, true); - uri.AppendPath("/providers/Microsoft.HybridCompute/settings/", false); - uri.AppendPath(settingsResourceName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(hybridComputeTargetResourceSettings, ModelSerializationExtensions.WireOptions); - request.Content = content; - _userAgent.Apply(message); - return message; - } - - /// Updates the base Settings of the target resource. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the base Resource Provider. - /// The name of the base Resource Type. - /// The name of the base resource. - /// The name of the settings resource. - /// Settings details. - /// The cancellation token to use. - /// , , , , , or is null. - /// , , , , or is an empty string, and was expected to be non-empty. - public async Task> UpdateAsync(string subscriptionId, string resourceGroupName, string baseProvider, string baseResourceType, string baseResourceName, string settingsResourceName, HybridComputeTargetResourceSettings hybridComputeTargetResourceSettings, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(baseProvider, nameof(baseProvider)); - Argument.AssertNotNullOrEmpty(baseResourceType, nameof(baseResourceType)); - Argument.AssertNotNullOrEmpty(baseResourceName, nameof(baseResourceName)); - Argument.AssertNotNullOrEmpty(settingsResourceName, nameof(settingsResourceName)); - Argument.AssertNotNull(hybridComputeTargetResourceSettings, nameof(hybridComputeTargetResourceSettings)); - - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, baseProvider, baseResourceType, baseResourceName, settingsResourceName, hybridComputeTargetResourceSettings); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 201: - { - HybridComputeTargetResourceSettings value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = HybridComputeTargetResourceSettings.DeserializeHybridComputeTargetResourceSettings(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Updates the base Settings of the target resource. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the base Resource Provider. - /// The name of the base Resource Type. - /// The name of the base resource. - /// The name of the settings resource. - /// Settings details. - /// The cancellation token to use. - /// , , , , , or is null. - /// , , , , or is an empty string, and was expected to be non-empty. - public Response Update(string subscriptionId, string resourceGroupName, string baseProvider, string baseResourceType, string baseResourceName, string settingsResourceName, HybridComputeTargetResourceSettings hybridComputeTargetResourceSettings, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(baseProvider, nameof(baseProvider)); - Argument.AssertNotNullOrEmpty(baseResourceType, nameof(baseResourceType)); - Argument.AssertNotNullOrEmpty(baseResourceName, nameof(baseResourceName)); - Argument.AssertNotNullOrEmpty(settingsResourceName, nameof(settingsResourceName)); - Argument.AssertNotNull(hybridComputeTargetResourceSettings, nameof(hybridComputeTargetResourceSettings)); - - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, baseProvider, baseResourceType, baseResourceName, settingsResourceName, hybridComputeTargetResourceSettings); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 201: - { - HybridComputeTargetResourceSettings value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = HybridComputeTargetResourceSettings.DeserializeHybridComputeTargetResourceSettings(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - } -} diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/autorest.md b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/autorest.md index 263dc5ff9110..f84f9b8e2331 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/autorest.md +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/autorest.md @@ -8,8 +8,8 @@ azure-arm: true csharp: true library-name: HybridCompute namespace: Azure.ResourceManager.HybridCompute -require: https://github.com/Azure/azure-rest-api-specs/blob/b48d5d72073a296514d3d4db77887d8711526ccc/specification/hybridcompute/resource-manager/readme.md -#tag: package-preview-2024-05 +require: https://github.com/Azure/azure-rest-api-specs/blob/15b16d1b5c3cccdecdd1cfe936f6a8005680c557/specification/hybridcompute/resource-manager/readme.md +tag: package-2024-07 output-folder: $(this-folder)/Generated clear-output-folder: true sample-gen: @@ -31,7 +31,6 @@ prepend-rp-prefix: - CloudMetadata - ConfigurationExtension - ConnectionDetail - - ExecutionState - ExtensionValue - IpAddress - License @@ -65,9 +64,9 @@ prepend-rp-prefix: - ProvisioningIssue - ProvisioningIssueSeverity - ProvisioningIssueType - - Gateway - - GatewayUpdate - - GatewayType + - LicenseProfile + - LicenseProfileUpdate + - ProductFeatureUpdate list-exception: - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{baseProvider}/{baseResourceType}/{baseResourceName}/providers/Microsoft.HybridCompute/settings/{settingsResourceName} @@ -100,18 +99,12 @@ rename-mapping: PatchServiceUsed.YUM: Yum PatchServiceUsed.APT: Apt PrivateLinkScopeValidationDetails.id: -|arm-id - RunCommandManagedIdentity.clientId: -|uuid - RunCommandManagedIdentity.objectId: -|uuid StatusLevelTypes: HybridComputeStatusLevelType StatusTypes: HybridComputeStatusType OSProfileWindowsConfiguration.patchSettings.enableHotpatching: IsHotpatchingEnabled PatchSettingsStatus: HybridComputePatchSettingsStatus - Settings: HybridComputeTargetResourceSettings OSProfileLinuxConfiguration.patchSettings.enableHotpatching: IsHotpatchingEnabled -override-operation-name: - Settings_Update: UpdateTargetResourceSetting - format-by-name-rules: 'tenantId': 'uuid' 'ETag': 'etag' @@ -219,45 +212,45 @@ directive: } ] - # add 200 response to run-command delete - - from: HybridCompute.json - where: $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/runCommands/{runCommandName}"].delete.responses - transform: >- - return { - "200": { - "description": "OK" - }, - "202": { - "description": "Accepted", - "headers": { - "Location": { - "description": "The URL of the resource used to check the status of the asynchronous operation.", - "type": "string" - }, - "Retry-After": { - "description": "The recommended number of seconds to wait before calling the URI specified in Azure-AsyncOperation.", - "type": "integer", - "format": "int32" - }, - "Azure-AsyncOperation": { - "description": "The URI to poll for completion status.", - "type": "string" - } - } - }, - "204": { - "description": "No Content" - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "https://github.com/Azure/azure-rest-api-specs/blob/f6278b35fb38d62aadb7a4327a876544d5d7e1e4/specification/common-types/resource-management/v3/types.json#/definitions/ErrorResponse" - } - } - } + # add 200 response to run-command delete - comment out for stable release + # - from: HybridCompute.json + # where: $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/runCommands/{runCommandName}"].delete.responses + # transform: >- + # return { + # "200": { + # "description": "OK" + # }, + # "202": { + # "description": "Accepted", + # "headers": { + # "Location": { + # "description": "The URL of the resource used to check the status of the asynchronous operation.", + # "type": "string" + # }, + # "Retry-After": { + # "description": "The recommended number of seconds to wait before calling the URI specified in Azure-AsyncOperation.", + # "type": "integer", + # "format": "int32" + # }, + # "Azure-AsyncOperation": { + # "description": "The URI to poll for completion status.", + # "type": "string" + # } + # } + # }, + # "204": { + # "description": "No Content" + # }, + # "default": { + # "description": "Error response describing why the operation failed.", + # "schema": { + # "$ref": "https://github.com/Azure/azure-rest-api-specs/blob/f6278b35fb38d62aadb7a4327a876544d5d7e1e4/specification/common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + # } + # } + # } - # we don't want user to interact with them / we don't support some operations - - remove-operation: MachineRunCommands_Update #PATCH + # we don't want user to interact with them / we don't support some operations - comment out for stable release + # - remove-operation: MachineRunCommands_Update #PATCH # internal operations - remove-operation: AgentVersion_List - remove-operation: AgentVersion_Get diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/tests/HybridComputeManagementTestBase.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/tests/HybridComputeManagementTestBase.cs index b067debcef1e..1d2d53782a5f 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/tests/HybridComputeManagementTestBase.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/tests/HybridComputeManagementTestBase.cs @@ -26,11 +26,11 @@ public class HybridComputeManagementTestBase : ManagementRecordedTestBase installPatch() VmGuestPatchClassificationWindow.Critical,VmGuestPatchClassificationWindow.Security }, // The maximum published date for patches must be a DateTime value between last patch Tuesday and a week from today - MaxPatchPublishOn = DateTimeOffset.Parse("2024-05-30T02:36:43.0539904+00:00"), + MaxPatchPublishOn = DateTimeOffset.Parse("2024-10-15T02:36:43.0539904+00:00"), }, }; ArmOperation lro = await hybridComputeMachine.InstallPatchesAsync(WaitUntil.Completed, content); @@ -141,16 +141,16 @@ protected async Task createMachineExtension() HybridComputeMachineResource hybridComputeMachine = await collection.GetAsync(machineName); HybridComputeMachineExtensionCollection extensionCollection = hybridComputeMachine.GetHybridComputeMachineExtensions(); - HybridComputeMachineExtensionData data = new HybridComputeMachineExtensionData(new AzureLocation("centraluseuap")) + HybridComputeMachineExtensionData data = new HybridComputeMachineExtensionData(new AzureLocation("eastus")) { Properties = new MachineExtensionProperties() { - Publisher = "Microsoft.Compute", - MachineExtensionPropertiesType = "CustomScriptExtension", - TypeHandlerVersion = "1.10", + Publisher = "Microsoft.Azure.NetworkWatcher", + MachineExtensionPropertiesType = "NetworkWatcherAgentWindows", + TypeHandlerVersion = "1.4.2798.3", Settings = { - ["commandToExecute"] = new BinaryData("\"hostname\""), + ["commandToExecute"] = new BinaryData("\"dir\""), }, }, }; @@ -167,13 +167,13 @@ protected async Task updateMachineExtension() HybridComputeMachineExtensionPatch patch = new HybridComputeMachineExtensionPatch() { - Publisher = "Microsoft.Compute", - MachineExtensionUpdatePropertiesType = "CustomScriptExtension", - TypeHandlerVersion = "1.10", + Publisher = "Microsoft.Azure.NetworkWatcher", + MachineExtensionUpdatePropertiesType = "NetworkWatcherAgentWindows", + TypeHandlerVersion = "1.4.2798.3", EnableAutomaticUpgrade = true, Settings = { - ["commandToExecute"] = new BinaryData("\"hostname\""), + ["commandToExecute"] = new BinaryData("\"powershell.exe ls\""), }, }; ArmOperation lro = await hybridComputeMachineExtension.UpdateAsync(WaitUntil.Completed, patch); @@ -210,7 +210,7 @@ protected async Task createPrivateLinkScope() { HybridComputePrivateLinkScopeCollection scopeCollection = resourceGroupResource.GetHybridComputePrivateLinkScopes(); - HybridComputePrivateLinkScopeData data = new HybridComputePrivateLinkScopeData(new AzureLocation("centraluseuap")) + HybridComputePrivateLinkScopeData data = new HybridComputePrivateLinkScopeData(new AzureLocation("eastus")) { Properties = new HybridComputePrivateLinkScopeProperties() { @@ -336,96 +336,96 @@ protected async Task getPrivat return connectionCollection; } - protected async Task createRunCommand() - { - HybridComputeMachineResource hybridComputeMachine = await collection.GetAsync(machineName); - MachineRunCommandCollection runCommandCollection = hybridComputeMachine.GetMachineRunCommands(); - - MachineRunCommandData data = new MachineRunCommandData(new AzureLocation("centraluseuap")) - { - Source = new MachineRunCommandScriptSource() - { - Script = "Write-Host Hello World!", - }, - Parameters = - { - new RunCommandInputParameter("param1","value1"), new RunCommandInputParameter("param2","value2") - }, - // AsyncExecution = false, - // RunAsUser = "user1", - // RunAsPassword = "", - // TimeoutInSeconds = 3600, - // OutputBlobUri = new Uri("https://mystorageaccount.blob.core.windows.net/myscriptoutputcontainer/MyScriptoutput.txt"), - // ErrorBlobUri = new Uri("https://mystorageaccount.blob.core.windows.net/mycontainer/MyScriptError.txt"), - }; - ArmOperation lro = await runCommandCollection.CreateOrUpdateAsync(WaitUntil.Completed, runCommandName, data); - MachineRunCommandResource result = lro.Value; - - return result.Data; - } - - protected async Task updateRunCommand() - { - ResourceIdentifier machineRunCommandResourceId = MachineRunCommandResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, machineName, runCommandName); - MachineRunCommandResource machineRunCommand = ArmClient.GetMachineRunCommandResource(machineRunCommandResourceId); - - MachineRunCommandData data = new MachineRunCommandData(new AzureLocation("centraluseuap")) - { - Source = new MachineRunCommandScriptSource() - { - Script = "Write-Host Hello World!", - }, - Parameters = - { - new RunCommandInputParameter("param1","value1"), new RunCommandInputParameter("param2","value2") - }, - // AsyncExecution = false, - // RunAsUser = "user1", - // RunAsPassword = "", - // TimeoutInSeconds = 3600, - // OutputBlobUri = new Uri("https://mystorageaccount.blob.core.windows.net/myscriptoutputcontainer/MyScriptoutput.txt"), - // ErrorBlobUri = new Uri("https://mystorageaccount.blob.core.windows.net/mycontainer/MyScriptError.txt"), - Tags = - { - ["Tag1"] = "Value1", - ["Tag2"] = "Value2", - }, - }; - ArmOperation lro = await machineRunCommand.UpdateAsync(WaitUntil.Completed, data); - MachineRunCommandResource result = lro.Value; - - return result.Data; - } - - protected async Task getRunCommand() - { - HybridComputeMachineResource hybridComputeMachine = await collection.GetAsync(machineName); - MachineRunCommandCollection runCommandCollection = hybridComputeMachine.GetMachineRunCommands(); - - MachineRunCommandResource result = await runCommandCollection.GetAsync(runCommandName); - - return result.Data; - } - - protected async Task getRunCommandCollection() - { - HybridComputeMachineResource hybridComputeMachine = await collection.GetAsync(machineName); - MachineRunCommandCollection runCommandCollection = hybridComputeMachine.GetMachineRunCommands(); - - await foreach (MachineRunCommandResource item in runCommandCollection.GetAllAsync()) - { - MachineRunCommandData resourceData = item.Data; - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - return runCommandCollection; - } + // protected async Task createRunCommand() + // { + // HybridComputeMachineResource hybridComputeMachine = await collection.GetAsync(machineName); + // MachineRunCommandCollection runCommandCollection = hybridComputeMachine.GetMachineRunCommands(); + + // MachineRunCommandData data = new MachineRunCommandData(new AzureLocation("centraluseuap")) + // { + // Source = new MachineRunCommandScriptSource() + // { + // Script = "Write-Host Hello World!", + // }, + // Parameters = + // { + // new RunCommandInputParameter("param1","value1"), new RunCommandInputParameter("param2","value2") + // }, + // // AsyncExecution = false, + // // RunAsUser = "user1", + // // RunAsPassword = "", + // // TimeoutInSeconds = 3600, + // // OutputBlobUri = new Uri("https://mystorageaccount.blob.core.windows.net/myscriptoutputcontainer/MyScriptoutput.txt"), + // // ErrorBlobUri = new Uri("https://mystorageaccount.blob.core.windows.net/mycontainer/MyScriptError.txt"), + // }; + // ArmOperation lro = await runCommandCollection.CreateOrUpdateAsync(WaitUntil.Completed, runCommandName, data); + // MachineRunCommandResource result = lro.Value; + + // return result.Data; + // } + + // protected async Task updateRunCommand() + // { + // ResourceIdentifier machineRunCommandResourceId = MachineRunCommandResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, machineName, runCommandName); + // MachineRunCommandResource machineRunCommand = ArmClient.GetMachineRunCommandResource(machineRunCommandResourceId); + + // MachineRunCommandData data = new MachineRunCommandData(new AzureLocation("centraluseuap")) + // { + // Source = new MachineRunCommandScriptSource() + // { + // Script = "Write-Host Hello World!", + // }, + // Parameters = + // { + // new RunCommandInputParameter("param1","value1"), new RunCommandInputParameter("param2","value2") + // }, + // // AsyncExecution = false, + // // RunAsUser = "user1", + // // RunAsPassword = "", + // // TimeoutInSeconds = 3600, + // // OutputBlobUri = new Uri("https://mystorageaccount.blob.core.windows.net/myscriptoutputcontainer/MyScriptoutput.txt"), + // // ErrorBlobUri = new Uri("https://mystorageaccount.blob.core.windows.net/mycontainer/MyScriptError.txt"), + // Tags = + // { + // ["Tag1"] = "Value1", + // ["Tag2"] = "Value2", + // }, + // }; + // ArmOperation lro = await machineRunCommand.UpdateAsync(WaitUntil.Completed, data); + // MachineRunCommandResource result = lro.Value; + + // return result.Data; + // } + + // protected async Task getRunCommand() + // { + // HybridComputeMachineResource hybridComputeMachine = await collection.GetAsync(machineName); + // MachineRunCommandCollection runCommandCollection = hybridComputeMachine.GetMachineRunCommands(); + + // MachineRunCommandResource result = await runCommandCollection.GetAsync(runCommandName); + + // return result.Data; + // } + + // protected async Task getRunCommandCollection() + // { + // HybridComputeMachineResource hybridComputeMachine = await collection.GetAsync(machineName); + // MachineRunCommandCollection runCommandCollection = hybridComputeMachine.GetMachineRunCommands(); + + // await foreach (MachineRunCommandResource item in runCommandCollection.GetAllAsync()) + // { + // MachineRunCommandData resourceData = item.Data; + // Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + // } + + // return runCommandCollection; + // } protected async Task createEsuLicense() { HybridComputeLicenseCollection esuLicensecollection = resourceGroupResource.GetHybridComputeLicenses(); - HybridComputeLicenseData data = new HybridComputeLicenseData(new AzureLocation("centraluseuap")) + HybridComputeLicenseData data = new HybridComputeLicenseData(new AzureLocation("eastus")) { LicenseType = "ESU", LicenseDetails = new HybridComputeLicenseDetails() @@ -469,7 +469,7 @@ protected async Task updateEsuLicense() ResourceIdentifier hybridComputeLicenseResourceId = HybridComputeLicenseResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, esuLicenseName); HybridComputeLicenseResource hybridComputeLicense = ArmClient.GetHybridComputeLicenseResource(hybridComputeLicenseResourceId); - HybridComputeLicenseData data = new HybridComputeLicenseData(new AzureLocation("centraluseuap")) + HybridComputeLicenseData data = new HybridComputeLicenseData(new AzureLocation("eastus")) { LicenseType = "ESU", LicenseDetails = new HybridComputeLicenseDetails() @@ -514,6 +514,18 @@ protected async Task getNsp() return result.Data; } + protected async Task invokeNsp() + { + ResourceIdentifier networkSecurityPerimeterConfigurationResourceId = NetworkSecurityPerimeterConfigurationResource.CreateResourceIdentifier(subscriptionId, resourceGroupNameNSP, privateLinkScopeNameNSP, perimeterName); + NetworkSecurityPerimeterConfigurationResource networkSecurityPerimeterConfiguration = ArmClient.GetNetworkSecurityPerimeterConfigurationResource(networkSecurityPerimeterConfigurationResourceId); + + // invoke the operation + ArmOperation lro = await networkSecurityPerimeterConfiguration.ReconcileForPrivateLinkScopeAsync(WaitUntil.Completed); + NetworkSecurityPerimeterConfigurationReconcileResult result = lro.Value; + + Console.WriteLine($"Invoke NSP Succeeded"); + } + protected async Task deleteEsuLicense() { ResourceIdentifier hybridComputeLicenseResourceId = HybridComputeLicenseResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, esuLicenseName); @@ -524,16 +536,16 @@ protected async Task deleteEsuLicense() Console.WriteLine($"Delete ESU License Succeeded"); } - protected async Task deleteRunCommand() - { - HybridComputeMachineResource hybridComputeMachine = await collection.GetAsync(machineName); - MachineRunCommandCollection runCommandCollection = hybridComputeMachine.GetMachineRunCommands(); + // protected async Task deleteRunCommand() + // { + // HybridComputeMachineResource hybridComputeMachine = await collection.GetAsync(machineName); + // MachineRunCommandCollection runCommandCollection = hybridComputeMachine.GetMachineRunCommands(); - MachineRunCommandResource result = await runCommandCollection.GetAsync(runCommandName); + // MachineRunCommandResource result = await runCommandCollection.GetAsync(runCommandName); - await result.DeleteAsync(WaitUntil.Completed); - Console.WriteLine($"Delete Machine Run Command Succeeded"); - } + // await result.DeleteAsync(WaitUntil.Completed); + // Console.WriteLine($"Delete Machine Run Command Succeeded"); + // } protected async Task deletePrivateLinkScope() { diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/tests/Scenario/HybridComputeManagementMachineRunCommandsTest.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/tests/Scenario/HybridComputeManagementMachineRunCommandsTest.cs deleted file mode 100644 index 086238d23d49..000000000000 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/tests/Scenario/HybridComputeManagementMachineRunCommandsTest.cs +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System.Threading.Tasks; -using Azure.Core.TestFramework; -using Azure.ResourceManager.HybridCompute; -using NUnit.Framework; -using Azure.Core; -using Azure.ResourceManager.HybridCompute.Models; -using System.Diagnostics; - -namespace Azure.ResourceManager.HybridCompute.Tests.Scenario -{ - public class HybridComputeManagementMachineRunCommandsTest : HybridComputeManagementTestBase - { - public HybridComputeManagementMachineRunCommandsTest(bool isAsync) : base(isAsync) - { - } - - [SetUp] - public async Task ClearAndInitialize() - { - if (Mode == RecordedTestMode.Record || Mode == RecordedTestMode.Playback) - { - await InitializeClients(); - } - } - - [TestCase] - [RecordedTest] - public async Task CanCreateMachineRunCommand() - { - MachineRunCommandData resourceData = await createRunCommand(); - Assert.AreEqual(runCommandName, resourceData.Name); - } - - [TestCase] - [RecordedTest] - public async Task CanUpdateMachineRunCommand() - { - MachineRunCommandData resourceData = await updateRunCommand(); - Assert.AreEqual(runCommandName, resourceData.Name); - } - - [TestCase] - [RecordedTest] - public async Task CanGetMachineRunCommand() - { - MachineRunCommandData resourceData = await getRunCommand(); - Assert.AreEqual(runCommandName, resourceData.Name); - } - - [TestCase] - [RecordedTest] - public async Task CanGetMachineRunCommandCollection() - { - MachineRunCommandCollection resourceCollection = await getRunCommandCollection(); - string collectionId = "/subscriptions/" + subscriptionId + "/resourceGroups/" + resourceGroupName + "/providers/Microsoft.HybridCompute/machines/" + machineName; - Assert.AreEqual(collectionId, resourceCollection.Id.ToString()); - } - - [TestCase] - [RecordedTest] - public async Task CanDeleteMachineRunCommand(){ - await deleteRunCommand(); - } - } -} diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/tests/Scenario/HybridComputeManagementMachineTest.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/tests/Scenario/HybridComputeManagementMachineTest.cs index e78a794ec617..6033aee95d75 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/tests/Scenario/HybridComputeManagementMachineTest.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/tests/Scenario/HybridComputeManagementMachineTest.cs @@ -48,16 +48,6 @@ public async Task CanGetMachineCollection() Assert.AreEqual(collectionId, resourceCollection.Id.ToString()); } - [TestCase] - [RecordedTest] - public async Task CanUpdateMachine() - { - HybridComputeMachineData resourceData = await updateMachine(); - - Debug.WriteLine($"Succeeded on id: {resourceData.Id}"); - Assert.AreEqual(machineName, resourceData.Name.ToString()); - } - [TestCase] [RecordedTest] public async Task CanInstallPatch(){ @@ -74,6 +64,16 @@ public async Task CanAssessPatch(){ Assert.AreEqual("Succeeded", resourceData.Status.ToString()); } + [TestCase] + [RecordedTest] + public async Task CanUpdateMachine() + { + HybridComputeMachineData resourceData = await updateMachine(); + + Debug.WriteLine($"Succeeded on id: {resourceData.Id}"); + Assert.AreEqual(machineName, resourceData.Name.ToString()); + } + [TestCase] [RecordedTest] public async Task CanDeleteMachine(){ diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/tests/Scenario/HybridComputeManagementNspTest.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/tests/Scenario/HybridComputeManagementNspTest.cs index 2b9aa5d30cc4..b6316ce3a443 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/tests/Scenario/HybridComputeManagementNspTest.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/tests/Scenario/HybridComputeManagementNspTest.cs @@ -41,5 +41,12 @@ public async Task CanGetNspCollection() NetworkSecurityPerimeterConfigurationCollection resourceCollection = await getNspCollection(); Assert.IsNotNull(resourceCollection); } + + [TestCase] + [RecordedTest] + public async Task CanInvokeNsp() + { + await invokeNsp(); + } } } diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/samples/Generated/Samples/Sample_EndpointResource.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/samples/Generated/Samples/Sample_EndpointResource.cs index 5c118520db2b..1f8ccf5fb5b2 100644 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/samples/Generated/Samples/Sample_EndpointResource.cs +++ b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/samples/Generated/Samples/Sample_EndpointResource.cs @@ -156,7 +156,7 @@ public async Task GetCredentials_HybridConnectivityEndpointsPostListCredentials( EndpointResource endpointResource = client.GetEndpointResource(endpointResourceId); // invoke the operation - long? expiresin = 10800; + long? expiresin = 10800L; TargetResourceEndpointAccess result = await endpointResource.GetCredentialsAsync(expiresin: expiresin); Console.WriteLine($"Succeeded: {result}"); diff --git a/sdk/identity/Azure.Identity/CHANGELOG.md b/sdk/identity/Azure.Identity/CHANGELOG.md index bdaa2f8a9d49..3221bbb48f0b 100644 --- a/sdk/identity/Azure.Identity/CHANGELOG.md +++ b/sdk/identity/Azure.Identity/CHANGELOG.md @@ -1,18 +1,30 @@ # Release History -## 1.13.0-beta.3 (Unreleased) +## 1.13.1 (2024-10-24) -### Features Added +### Bugs Fixed +- Fixed a regression that prevented `ManagedIdentityCredential` from attempting to detect if Workload Identity is enabled in the current environment. [#46653](https://github.com/Azure/azure-sdk-for-net/issues/46653) +- Fixed a regression that prevented `DefaultAzureCredential` from progressing past `ManagedIdentityCredential` in some scenarios where the identity was not available. [#46709](https://github.com/Azure/azure-sdk-for-net/issues/46709) + +## 1.13.0 (2024-10-14) ### Breaking Changes +- Previously, if a clientID or ResourceID was specified for Cloud Shell managed identity, which is not supported, the clientID or resourceID would be silently ignored. Now, an exception will be thrown if a clientID or resourceID is specified for Cloud Shell managed identity. +- Previously, if a clientID or ResourceID was specified for Service Fabric managed identity, which is not supported, the clientID or resourceID would be silently ignored. Now, an exception will be thrown if a clientID or resourceID is specified for Service Fabric managed identity. + +### Features Added +- `ManagedIdentityCredential` now supports specifying a user-assigned managed identity by object ID. ### Bugs Fixed +- If `DefaultAzureCredential` attempts to authenticate with the `MangagedIdentityCredential` and it receives either a failed response that is not json, it will now fall through to the next credential in the chain. [#45184](https://github.com/Azure/azure-sdk-for-net/issues/45184) - Fixed the request sent in `AzurePipelinesCredential` so it doesn't result in a redirect response when an invalid system access token is provided. - Updated to version 4.65.0 of Microsoft.Identity.Client to address a bug preventing the use of alternate authority types such as dStS ([4927](https://github.com/AzureAD/microsoft-authentication-library-for-dotnet/issues/4927)) . ### Other Changes +- The logging level passed to MSAL now correlates to the log level configured on your configured `AzureEventSourceListener`. Previously, the log level was always set to `Microsoft.Identity.Client.LogLevel.Info`. +- `AzurePowerShellCredential` now utilizes the AsSecureString parameter to Get-AzAccessToken for version 2.17.0 and greater of the Az.Accounts module. - Improved error logging for `AzurePipelinesCredential`. ## 1.13.0-beta.2 (2024-09-17) diff --git a/sdk/identity/Azure.Identity/README.md b/sdk/identity/Azure.Identity/README.md index a802d58198f3..41b0114361a4 100644 --- a/sdk/identity/Azure.Identity/README.md +++ b/sdk/identity/Azure.Identity/README.md @@ -241,7 +241,7 @@ Not all credentials require this configuration. Credentials that authenticate th |Credential | Usage | Reference |-|-|- -|[`AzurePipelinesCredential`][ref_AzurePipelinesCredential]|Supports [Microsoft Entra Workload ID](https://learn.microsoft.com/azure/devops/pipelines/release/configure-workload-identity?view=azure-devops) on Azure Pipelines.| [example](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/identity/Azure.Identity/samples/OtherCredentialSamples.md#AzurePipelinesCredential_example) +|[`AzurePipelinesCredential`][ref_AzurePipelinesCredential]|Supports [Microsoft Entra Workload ID](https://learn.microsoft.com/azure/devops/pipelines/release/configure-workload-identity?view=azure-devops) on Azure Pipelines.| [example](https://aka.ms/azsdk/net/identity/azurepipelinescredential/usage) |[`ClientAssertionCredential`][ref_ClientAssertionCredential]|Authenticates a service principal using a signed client assertion. | |[`ClientCertificateCredential`][ref_ClientCertificateCredential]|Authenticates a service principal using a certificate. | [Service principal authentication](https://learn.microsoft.com/entra/identity-platform/app-objects-and-service-principals) |[`ClientSecretCredential`][ref_ClientSecretCredential]|Authenticates a service principal using a secret. | [Service principal authentication](https://learn.microsoft.com/entra/identity-platform/app-objects-and-service-principals) diff --git a/sdk/identity/Azure.Identity/api/Azure.Identity.netstandard2.0.cs b/sdk/identity/Azure.Identity/api/Azure.Identity.netstandard2.0.cs index 57b0740f6d9f..8592b1736eb4 100644 --- a/sdk/identity/Azure.Identity/api/Azure.Identity.netstandard2.0.cs +++ b/sdk/identity/Azure.Identity/api/Azure.Identity.netstandard2.0.cs @@ -46,6 +46,7 @@ public AuthorizationCodeCredentialOptions() { } public static partial class AzureAuthorityHosts { public static System.Uri AzureChina { get { throw null; } } + [System.ObsoleteAttribute("Microsoft Cloud Germany was closed on October 29th, 2021.")] public static System.Uri AzureGermany { get { throw null; } } public static System.Uri AzureGovernment { get { throw null; } } public static System.Uri AzurePublicCloud { get { throw null; } } diff --git a/sdk/identity/Azure.Identity/images/mermaidjs/DefaultAzureCredentialAuthFlow.svg b/sdk/identity/Azure.Identity/images/mermaidjs/DefaultAzureCredentialAuthFlow.svg deleted file mode 100644 index f60052a3a066..000000000000 --- a/sdk/identity/Azure.Identity/images/mermaidjs/DefaultAzureCredentialAuthFlow.svg +++ /dev/null @@ -1 +0,0 @@ -DefaultAzureCredential authentication flow;Flowchart showing the credential chain implemented by DefaultAzureCredential;
CREDENTIALS
Interactive browser
Environment
Workload Identity
Managed Identity
Visual Studio
Azure CLI
Azure PowerShell
Azure Developer CLI
CREDENTIAL TYPES
Interactive
Deployed service
Developer tool
\ No newline at end of file diff --git a/sdk/identity/Azure.Identity/samples/OtherCredentialSamples.md b/sdk/identity/Azure.Identity/samples/OtherCredentialSamples.md index 906366893714..a1bca342268b 100644 --- a/sdk/identity/Azure.Identity/samples/OtherCredentialSamples.md +++ b/sdk/identity/Azure.Identity/samples/OtherCredentialSamples.md @@ -5,7 +5,7 @@ To set up a federated identity credential (FIC) in Azure Pipelines, you can set up the Azure Resource Manager service connection as an [automatic recommended approach](https://learn.microsoft.com/azure/devops/pipelines/library/connect-to-azure?view=azure-devops#create-an-azure-resource-manager-service-connection-that-uses-workload-identity-federation). You can also create it manually either using a [user-assigned managed identity to accept the ADO-issued token as a FIC](https://learn.microsoft.com/azure/devops/pipelines/release/configure-workload-identity?view=azure-devops#set-a-workload-identity-service-connection-to-use-managed-identity-authentication) or using an [App Registration to accept the Azure DevOps-issued token as a FIC](https://learn.microsoft.com/azure/devops/pipelines/release/configure-workload-identity?view=azure-devops#set-a-workload-identity-service-connection-to-use-service-principal-authentication). -Make sure you use one of the [recommended Azure Pipelines tasks](https://learn.microsoft.com/azure/devops/pipelines/release/troubleshoot-workload-identity?view=azure-devops#review-pipeline-tasks) so that FIC is available in Azure Pipelines. +Make sure you use one of the [recommended Azure Pipelines tasks][az_pipelines_tasks] so that FIC is available in Azure Pipelines. To use `AzurePipelinesCredential`, configure the following values in the constructor: @@ -17,7 +17,7 @@ To use `AzurePipelinesCredential`, configure the following values in the constru ## Example of using an Azure Pipelines task -The following task YAML is an example of configuring the [AzureCLI@2](https://learn.microsoft.com/azure/devops/pipelines/tasks/reference/azure-cli-v2?view=azure-pipelines) task for using service connections federated identity with @azure/identity. See the list of [recommended Azure Pipelines tasks](https://learn.microsoft.com/azure/devops/pipelines/release/troubleshoot-workload-identity?view=azure-devops#review-pipeline-tasks). +The following task YAML is an example of configuring the [AzureCLI@2](https://learn.microsoft.com/azure/devops/pipelines/tasks/reference/azure-cli-v2?view=azure-pipelines) task for using service connections federated identity with the Azure Identity library. See the list of [recommended Azure Pipelines tasks][az_pipelines_tasks]. ```yml trigger: @@ -93,3 +93,6 @@ var credential = new OnBehalfOfCredential(tenantId, clientId, getManagedIdentity // Use the credential to authenticate with the Key Vault client. var client = new SecretClient(new Uri("https://keyvault-name.vault.azure.net/"), credential); ``` + + +[az_pipelines_tasks]: https://aka.ms/azdo-rm-workload-identity-tasks diff --git a/sdk/identity/Azure.Identity/src/Azure.Identity.csproj b/sdk/identity/Azure.Identity/src/Azure.Identity.csproj index dc5e1e5d6e07..a939fe69d08f 100644 --- a/sdk/identity/Azure.Identity/src/Azure.Identity.csproj +++ b/sdk/identity/Azure.Identity/src/Azure.Identity.csproj @@ -2,9 +2,9 @@ This is the implementation of the Azure SDK Client Library for Azure Identity Microsoft Azure.Identity Component - 1.13.0-beta.3 + 1.13.1 - 1.12.0 + 1.13.0 Microsoft Azure Identity;$(PackageCommonTags) $(RequiredTargetFrameworks) $(NoWarn);3021;AZC0011 @@ -19,9 +19,7 @@ - - + diff --git a/sdk/identity/Azure.Identity/src/AzureAuthorityHosts.cs b/sdk/identity/Azure.Identity/src/AzureAuthorityHosts.cs index d831421ddd78..6567cbf63c07 100644 --- a/sdk/identity/Azure.Identity/src/AzureAuthorityHosts.cs +++ b/sdk/identity/Azure.Identity/src/AzureAuthorityHosts.cs @@ -27,6 +27,7 @@ public static class AzureAuthorityHosts /// /// The host of the Microsoft Entra authority for tenants in the Azure German Cloud. /// + [Obsolete("Microsoft Cloud Germany was closed on October 29th, 2021.")] public static Uri AzureGermany { get; } = new Uri(AzureGermanyHostUrl); ///
diff --git a/sdk/identity/Azure.Identity/src/AzureIdentityEventSource.cs b/sdk/identity/Azure.Identity/src/AzureIdentityEventSource.cs index 180576c0f31c..1320b0695e67 100644 --- a/sdk/identity/Azure.Identity/src/AzureIdentityEventSource.cs +++ b/sdk/identity/Azure.Identity/src/AzureIdentityEventSource.cs @@ -41,6 +41,7 @@ internal sealed class AzureIdentityEventSource : AzureEventSource, IIdentityLogg internal const int UnableToParseAccountDetailsFromTokenEvent = 20; private const int UserAssignedManagedIdentityNotSupportedEvent = 21; private const int ServiceFabricManagedIdentityRuntimeConfigurationNotSupportedEvent = 22; + private const int ManagedIdentitySourceAttemptedEvent = 25; internal const string TenantIdDiscoveredAndNotUsedEventMessage = "A token was request for a different tenant than was configured on the credential, but the configured value was used since multi tenant authentication has been disabled. Configured TenantId: {0}, Requested TenantId {1}"; internal const string TenantIdDiscoveredAndUsedEventMessage = "A token was requested for a different tenant than was configured on the credential, and the requested tenant id was used to authenticate. Configured TenantId: {0}, Requested TenantId {1}"; internal const string AuthenticatedAccountDetailsMessage = "Client ID: {0}. Tenant ID: {1}. User Principal Name: {2} Object ID: {3}"; @@ -48,6 +49,7 @@ internal sealed class AzureIdentityEventSource : AzureEventSource, IIdentityLogg internal const string UnableToParseAccountDetailsFromTokenMessage = "Unable to parse account details from the Access Token"; internal const string UserAssignedManagedIdentityNotSupportedMessage = "User assigned managed identities are not supported in the {0} environment."; internal const string ServiceFabricManagedIdentityRuntimeConfigurationNotSupportedMessage = "Service Fabric user assigned managed identity ClientId or ResourceId is not configurable at runtime."; + internal const string ManagedIdentitySourceAttemptedMessage = "ManagedIdentitySource {0} was attempted. IsSelected={1}."; private AzureIdentityEventSource() : base(EventSourceName) { } @@ -401,5 +403,14 @@ public void ServiceFabricManagedIdentityRuntimeConfigurationNotSupported() WriteEvent(ServiceFabricManagedIdentityRuntimeConfigurationNotSupportedEvent); } } + + [Event(ManagedIdentitySourceAttemptedEvent, Level = EventLevel.Informational, Message = ManagedIdentitySourceAttemptedMessage)] + public void ManagedIdentitySourceAttempted(string source, bool isSelected) + { + if (IsEnabled(EventLevel.Informational, EventKeywords.All)) + { + WriteEvent(ManagedIdentitySourceAttemptedEvent, source, isSelected); + } + } } } diff --git a/sdk/identity/Azure.Identity/src/Credentials/AzurePipelinesCredential.cs b/sdk/identity/Azure.Identity/src/Credentials/AzurePipelinesCredential.cs index f70cce04f7c0..8a7db74db08a 100644 --- a/sdk/identity/Azure.Identity/src/Credentials/AzurePipelinesCredential.cs +++ b/sdk/identity/Azure.Identity/src/Credentials/AzurePipelinesCredential.cs @@ -12,7 +12,9 @@ namespace Azure.Identity { /// - /// Credential which authenticates using an Azure Pipelines service connection. + /// Credential which authenticates using an Azure Pipelines service connection. For usage instructions, see + /// Authenticating in Azure + /// Pipelines with service connections. /// public class AzurePipelinesCredential : TokenCredential { diff --git a/sdk/identity/Azure.Identity/src/ImdsManagedIdentityProbeSource.cs b/sdk/identity/Azure.Identity/src/ImdsManagedIdentityProbeSource.cs index 632a790d9d87..6c44cf7f9424 100644 --- a/sdk/identity/Azure.Identity/src/ImdsManagedIdentityProbeSource.cs +++ b/sdk/identity/Azure.Identity/src/ImdsManagedIdentityProbeSource.cs @@ -6,6 +6,7 @@ using System.Threading; using System.Threading.Tasks; using Azure.Core; +using Microsoft.Identity.Client; namespace Azure.Identity { @@ -22,6 +23,7 @@ internal class ImdsManagedIdentityProbeSource : ManagedIdentitySource internal const string TimeoutError = "ManagedIdentityCredential authentication unavailable. The request to the managed identity endpoint timed out."; internal const string GatewayError = "ManagedIdentityCredential authentication unavailable. The request failed due to a gateway error."; internal const string AggregateError = "ManagedIdentityCredential authentication unavailable. Multiple attempts failed to obtain a token from the managed identity endpoint."; + internal const string UnknownError = "ManagedIdentityCredential authentication unavailable. An unexpected error has occurred."; private readonly ManagedIdentityId _managedIdentityId; private readonly Uri _imdsEndpoint; @@ -97,6 +99,7 @@ protected override HttpMessage CreateHttpMessage(Request request) public async override ValueTask AuthenticateAsync(bool async, TokenRequestContext context, CancellationToken cancellationToken) { + bool continueIMDSRequestAfterProbe; try { return await base.AuthenticateAsync(async, context, cancellationToken).ConfigureAwait(false); @@ -127,12 +130,29 @@ public async override ValueTask AuthenticateAsync(bool async, Token catch (ProbeRequestResponseException) { // This was an expected response from the IMDS endpoint without the Metadata header set. - // Re-issue the request (CreateRequest will add the appropriate header). + // Fall-through to the code below to re-issue the request through MsalManagedIdentityClient. + continueIMDSRequestAfterProbe = true; + } + + if (continueIMDSRequestAfterProbe) + { + try + { #pragma warning disable AZC0110 // DO NOT use await keyword in possibly synchronous scope. - var authResult = await _client.AcquireTokenForManagedIdentityAsync(context, cancellationToken).ConfigureAwait(false); - return authResult.ToAccessToken(); + var authResult = await _client.AcquireTokenForManagedIdentityAsync(context, cancellationToken).ConfigureAwait(false); #pragma warning restore AZC0110 // DO NOT use await keyword in possibly synchronous scope. + return authResult.ToAccessToken(); + } + catch (MsalServiceException e) + { + if (e.Message.Contains("unavailable")) + { + throw new CredentialUnavailableException(IdentityUnavailableError, e); + } + throw new CredentialUnavailableException(UnknownError, e); + } } + throw new CredentialUnavailableException(UnknownError); } protected override async ValueTask HandleResponseAsync(bool async, TokenRequestContext context, HttpMessage message, CancellationToken cancellationToken) @@ -144,7 +164,7 @@ protected override async ValueTask HandleResponseAsync(bool async, // handle error status codes indicating managed identity is not available string baseMessage = response.Status switch { - 400 when IsProbeRequest(message) => throw new ProbeRequestResponseException(), + 400 when IsRetriableProbeRequest(message) => throw new ProbeRequestResponseException(), 400 => IdentityUnavailableError, 502 => GatewayError, 504 => GatewayError, @@ -169,10 +189,11 @@ protected override async ValueTask HandleResponseAsync(bool async, return token; } - public static bool IsProbeRequest(HttpMessage message) + public static bool IsRetriableProbeRequest(HttpMessage message) => message.Request.Uri.Host == s_imdsEndpoint.Host && message.Request.Uri.Path == s_imdsEndpoint.AbsolutePath && - !message.Request.Headers.TryGetValue(metadataHeaderName, out _); + !message.Request.Headers.TryGetValue(metadataHeaderName, out _) && + (message.Response.Content?.ToString().IndexOf("Identity not found", StringComparison.InvariantCulture) < 0); private class ImdsRequestFailedDetailsParser : RequestFailedDetailsParser { diff --git a/sdk/identity/Azure.Identity/src/ManagedIdentityClient.cs b/sdk/identity/Azure.Identity/src/ManagedIdentityClient.cs index 6c5a4974c277..a8e2e23d5f3c 100644 --- a/sdk/identity/Azure.Identity/src/ManagedIdentityClient.cs +++ b/sdk/identity/Azure.Identity/src/ManagedIdentityClient.cs @@ -20,8 +20,8 @@ internal class ManagedIdentityClient internal Lazy _identitySource; private MsalConfidentialClient _msalConfidentialClient; private MsalManagedIdentityClient _msalManagedIdentityClient; - private bool _enableLegacyMI; private bool _isChainedCredential; + private ManagedIdentityClientOptions _options; protected ManagedIdentityClient() { @@ -39,12 +39,12 @@ public ManagedIdentityClient(CredentialPipeline pipeline, ResourceIdentifier res public ManagedIdentityClient(ManagedIdentityClientOptions options) { + _options = options.Clone(); ManagedIdentityId = options.ManagedIdentityId; Pipeline = options.Pipeline; - _enableLegacyMI = options.EnableManagedIdentityLegacyBehavior; _isChainedCredential = options.Options?.IsChainedCredential ?? false; _msalManagedIdentityClient = new MsalManagedIdentityClient(options); - _identitySource = new Lazy(() => SelectManagedIdentitySource(options, _enableLegacyMI, _msalManagedIdentityClient)); + _identitySource = new Lazy(() => SelectManagedIdentitySource(options, _msalManagedIdentityClient)); _msalConfidentialClient = new MsalConfidentialClient( Pipeline, "MANAGED-IDENTITY-RESOURCE-TENENT", @@ -60,31 +60,33 @@ public ManagedIdentityClient(ManagedIdentityClientOptions options) public async ValueTask AuthenticateAsync(bool async, TokenRequestContext context, CancellationToken cancellationToken) { AuthenticationResult result; - if (_enableLegacyMI) + + var availableSource = ManagedIdentityApplication.GetManagedIdentitySource(); + + // If the source is DefaultToImds and the credential is chained, we should probe the IMDS endpoint first. + if (availableSource == MSAL.ManagedIdentitySource.DefaultToImds && _isChainedCredential) + { + return await AuthenticateCoreAsync(async, context, cancellationToken).ConfigureAwait(false); + } + + // ServiceFabric does not support specifying user-assigned managed identity by client ID or resource ID. The managed identity selected is based on the resource configuration. + if (availableSource == MSAL.ManagedIdentitySource.ServiceFabric && (ManagedIdentityId?._idType != ManagedIdentityIdType.SystemAssigned)) { - result = await _msalConfidentialClient.AcquireTokenForClientAsync(context.Scopes, context.TenantId, context.Claims, context.IsCaeEnabled, async, cancellationToken).ConfigureAwait(false); + throw new AuthenticationFailedException(Constants.MiSeviceFabricNoUserAssignedIdentityMessage); } - else + + // First try the TokenExchangeManagedIdentitySource, if it is not available, fall back to MSAL directly. + var tokenExchangeManagedIdentitySource = TokenExchangeManagedIdentitySource.TryCreate(_options); + if (default != tokenExchangeManagedIdentitySource) { - var availableSource = ManagedIdentityApplication.GetManagedIdentitySource(); - - // If the source is DefaultToImds and the credential is chained, we should probe the IMDS endpoint first. - if (availableSource == MSAL.ManagedIdentitySource.DefaultToImds && _isChainedCredential) - { - return await AuthenticateCoreAsync(async, context, cancellationToken).ConfigureAwait(false); - } - - // ServiceFabric does not support specifying user-assigned managed identity by client ID or resource ID. The managed identity selected is based on the resource configuration. - if (availableSource == MSAL.ManagedIdentitySource.ServiceFabric && (ManagedIdentityId?._idType != ManagedIdentityIdType.SystemAssigned)) - { - throw new AuthenticationFailedException(Constants.MiSeviceFabricNoUserAssignedIdentityMessage); - } - - // The default case is to use the MSAL implementation, which does no probing of the IMDS endpoint. - result = async ? - await _msalManagedIdentityClient.AcquireTokenForManagedIdentityAsync(context, cancellationToken).ConfigureAwait(false) : - _msalManagedIdentityClient.AcquireTokenForManagedIdentity(context, cancellationToken); + return await tokenExchangeManagedIdentitySource.AuthenticateAsync(async, context, cancellationToken).ConfigureAwait(false); } + + // The default case is to use the MSAL implementation, which does no probing of the IMDS endpoint. + result = async ? + await _msalManagedIdentityClient.AcquireTokenForManagedIdentityAsync(context, cancellationToken).ConfigureAwait(false) : + _msalManagedIdentityClient.AcquireTokenForManagedIdentity(context, cancellationToken); + return result.ToAccessToken(); } @@ -115,24 +117,10 @@ private async Task AppTokenProviderImpl(AppTokenProvider }; } - private static ManagedIdentitySource SelectManagedIdentitySource(ManagedIdentityClientOptions options, bool _enableLegacyMI = true, MsalManagedIdentityClient client = null) + private static ManagedIdentitySource SelectManagedIdentitySource(ManagedIdentityClientOptions options, MsalManagedIdentityClient client = null) { - if (_enableLegacyMI) - { - return - ServiceFabricManagedIdentitySource.TryCreate(options) ?? - AppServiceV2019ManagedIdentitySource.TryCreate(options) ?? - AppServiceV2017ManagedIdentitySource.TryCreate(options) ?? - CloudShellManagedIdentitySource.TryCreate(options) ?? - AzureArcManagedIdentitySource.TryCreate(options) ?? - TokenExchangeManagedIdentitySource.TryCreate(options) ?? - new ImdsManagedIdentitySource(options); - } - else - { - return TokenExchangeManagedIdentitySource.TryCreate(options) ?? - new ImdsManagedIdentityProbeSource(options, client); - } + return TokenExchangeManagedIdentitySource.TryCreate(options) ?? + new ImdsManagedIdentityProbeSource(options, client); } } } diff --git a/sdk/identity/Azure.Identity/src/ManagedIdentityClientOptions.cs b/sdk/identity/Azure.Identity/src/ManagedIdentityClientOptions.cs index c0a1aa79f7c2..97cbf1418e57 100644 --- a/sdk/identity/Azure.Identity/src/ManagedIdentityClientOptions.cs +++ b/sdk/identity/Azure.Identity/src/ManagedIdentityClientOptions.cs @@ -20,9 +20,36 @@ internal class ManagedIdentityClientOptions public bool ExcludeTokenExchangeManagedIdentitySource { get; set; } - // TODO: revert before GA - public bool EnableManagedIdentityLegacyBehavior { get; set; } = Environment.GetEnvironmentVariable("AZURE_IDENTITY_ENABLE_LEGACY_IMDS_BEHAVIOR") != null; - public bool IsForceRefreshEnabled { get; set; } + + public ManagedIdentityClientOptions Clone() + { + var cloned = new ManagedIdentityClientOptions + { + ManagedIdentityId = ManagedIdentityId, + PreserveTransport = PreserveTransport, + InitialImdsConnectionTimeout = InitialImdsConnectionTimeout, + Pipeline = Pipeline, + ExcludeTokenExchangeManagedIdentitySource = ExcludeTokenExchangeManagedIdentitySource, + IsForceRefreshEnabled = IsForceRefreshEnabled, + }; + + if (Options != null) + { + if (Options is DefaultAzureCredentialOptions dac) + { + cloned.Options = dac.Clone(); + } + else if (Options is ManagedIdentityCredentialOptions mic) + { + cloned.Options = mic.Clone(); + } + else + { + cloned.Options = Options.Clone(); + } + } + return cloned; + } } } diff --git a/sdk/identity/Azure.Identity/src/TokenExchangeManagedIdentitySource.cs b/sdk/identity/Azure.Identity/src/TokenExchangeManagedIdentitySource.cs index 9700f4dedf39..9dff32038f97 100644 --- a/sdk/identity/Azure.Identity/src/TokenExchangeManagedIdentitySource.cs +++ b/sdk/identity/Azure.Identity/src/TokenExchangeManagedIdentitySource.cs @@ -3,7 +3,6 @@ using System; using System.Buffers; -using System.Collections.Generic; using System.IO; using System.Text; using System.Threading; @@ -33,9 +32,11 @@ public static ManagedIdentitySource TryCreate(ManagedIdentityClientOptions optio if (options.ExcludeTokenExchangeManagedIdentitySource || string.IsNullOrEmpty(tokenFilePath) || string.IsNullOrEmpty(tenantId) || string.IsNullOrEmpty(clientId)) { + AzureIdentityEventSource.Singleton.ManagedIdentitySourceAttempted("TokenExchangeManagedIdentitySource", false); return default; } + AzureIdentityEventSource.Singleton.ManagedIdentitySourceAttempted("TokenExchangeManagedIdentitySource", true); return new TokenExchangeManagedIdentitySource(options.Pipeline, tenantId, clientId, tokenFilePath); } diff --git a/sdk/identity/Azure.Identity/tests/ImdsManagedIdentitySourceTests.cs b/sdk/identity/Azure.Identity/tests/ImdsManagedIdentitySourceTests.cs index 02b62ab3e2c0..8882324a81b4 100644 --- a/sdk/identity/Azure.Identity/tests/ImdsManagedIdentitySourceTests.cs +++ b/sdk/identity/Azure.Identity/tests/ImdsManagedIdentitySourceTests.cs @@ -142,7 +142,7 @@ public void DefaultAzureCredentialRetryBehaviorIsOverriddenWithOptions() var cred = new DefaultAzureCredential(credOptions); - Assert.ThrowsAsync(async () => await cred.GetTokenAsync(new(new[] { "test" }))); + Assert.ThrowsAsync(async () => await cred.GetTokenAsync(new(new[] { "test" }))); var expectedTimeouts = new TimeSpan?[] { TimeSpan.FromSeconds(1), null, null, null, null, null, null, null, null }; CollectionAssert.AreEqual(expectedTimeouts, networkTimeouts); diff --git a/sdk/identity/Azure.Identity/tests/ManagedIdentityCredentialTests.cs b/sdk/identity/Azure.Identity/tests/ManagedIdentityCredentialTests.cs index 5f600c5f3748..f7e816706315 100644 --- a/sdk/identity/Azure.Identity/tests/ManagedIdentityCredentialTests.cs +++ b/sdk/identity/Azure.Identity/tests/ManagedIdentityCredentialTests.cs @@ -34,28 +34,6 @@ public ManagedIdentityCredentialTests(bool isAsync) : base(isAsync) private const string ExpectedToken = "mock-msi-access-token"; - [NonParallelizable] - [Test] - public async Task VerifyTokenCaching() - { - using var environment = new TestEnvVar(new() { { "AZURE_IDENTITY_ENABLE_LEGACY_IMDS_BEHAVIOR", "true" } }); - int callCount = 0; - - var mockClient = new MockManagedIdentityClient(CredentialPipeline.GetInstance(null)) - { - TokenFactory = () => { callCount++; return new AccessToken(Guid.NewGuid().ToString(), DateTimeOffset.UtcNow.AddHours(24)); } - }; - - var cred = InstrumentClient(new ManagedIdentityCredential(mockClient)); - - for (int i = 0; i < 5; i++) - { - await cred.GetTokenAsync(new TokenRequestContext(MockScopes.Default)); - } - - Assert.AreEqual(1, callCount); - } - [Test] public async Task VerifyExpiringTokenRefresh() { @@ -412,7 +390,7 @@ public void VerifyImdsRequestFailureForDockerDesktopThrowsCUE(string error) { using var environment = new TestEnvVar(new() { { "MSI_ENDPOINT", null }, { "MSI_SECRET", null }, { "IDENTITY_ENDPOINT", null }, { "IDENTITY_HEADER", null }, { "AZURE_POD_IDENTITY_AUTHORITY_HOST", null } }); - var expectedMessage = $"connecting to 169.254.169.254:80: connecting to 169.254.169.254:80: dial tcp 169.254.169.254:80: connectex: A socket operation was attempted to an unreachable {error}."; + var expectedMessage = error; var response = CreateInvalidJsonResponse(403, expectedMessage); var mockTransport = new MockTransport(response); var options = new TokenCredentialOptions() { Transport = mockTransport, IsChainedCredential = true }; @@ -444,6 +422,62 @@ public void VerifyImdsRequestFailureWithInvalidJsonPopulatesExceptionMessage() Assert.That(ex.Message, Does.Contain(expectedMessage)); } + [NonParallelizable] + [Test] + [TestCase("""{"error":"invalid_request","error_description":"Identity not found"}""")] + [TestCase(null)] + public void VerifyImdsRequestFailureWithValidJsonIdentityNotFoundErrorThrowsCUE(string content) + { + using var environment = new TestEnvVar(new() { { "MSI_ENDPOINT", null }, { "MSI_SECRET", null }, { "IDENTITY_ENDPOINT", null }, { "IDENTITY_HEADER", null }, { "AZURE_POD_IDENTITY_AUTHORITY_HOST", null } }); + + var response = CreateResponse(400, content); + var mockTransport = new MockTransport(req => response); + var options = new TokenCredentialOptions() { Transport = mockTransport, IsChainedCredential = true }; + var pipeline = CredentialPipeline.GetInstance(options); + + ManagedIdentityCredential credential = InstrumentClient(new ManagedIdentityCredential("mock-client-id", pipeline, options)); + if (content != null) + { + var ex = Assert.ThrowsAsync(async () => await credential.GetTokenAsync(new TokenRequestContext(MockScopes.Default))); + Assert.That(ex.Message, Does.Contain(ImdsManagedIdentityProbeSource.IdentityUnavailableError)); + } + else + { + var ex = Assert.ThrowsAsync(async () => await credential.GetTokenAsync(new TokenRequestContext(MockScopes.Default))); + } + } + + [NonParallelizable] + [Test] + [TestCase(true)] + [TestCase(false)] + public void VerifyImdsProbeRequestSuccessWithIdentityNotFoundErrorThrowsCUE(bool isChained) + { + using var environment = new TestEnvVar(new() { { "MSI_ENDPOINT", null }, { "MSI_SECRET", null }, { "IDENTITY_ENDPOINT", null }, { "IDENTITY_HEADER", null }, { "AZURE_POD_IDENTITY_AUTHORITY_HOST", null } }); + + var mockTransport = new MockTransport(req => + { + if (!req.Headers.TryGetValue(ImdsManagedIdentityProbeSource.metadataHeaderName, out _)) + { + return CreateResponse(400, """{"error":"invalid_request","error_description":"Required metadata header not specified"}"""); + } + return CreateResponse(400, """{"error":"invalid_request","error_description":"Identity not found"}"""); + }); + var options = new TokenCredentialOptions() { Transport = mockTransport, IsChainedCredential = isChained }; + var pipeline = CredentialPipeline.GetInstance(options); + + ManagedIdentityCredential credential = InstrumentClient(new ManagedIdentityCredential("mock-client-id", pipeline, options)); + if (isChained) + { + var ex = Assert.ThrowsAsync(async () => await credential.GetTokenAsync(new TokenRequestContext(MockScopes.Alternate))); + Assert.That(ex.Message, Does.Contain(ImdsManagedIdentityProbeSource.IdentityUnavailableError)); + } + else + { + var ex = Assert.ThrowsAsync(async () => await credential.GetTokenAsync(new TokenRequestContext(MockScopes.Alternate))); + } + } + [NonParallelizable] [Test] [TestCase(502, ImdsManagedIdentitySource.GatewayError)] @@ -473,7 +507,10 @@ public async Task VerifyIMDSRequestWithPodIdentityEnvVarMockAsync(string clientI using var environment = new TestEnvVar(new() { { "MSI_ENDPOINT", null }, { "MSI_SECRET", null }, { "IDENTITY_ENDPOINT", null }, { "IDENTITY_HEADER", null }, { "AZURE_POD_IDENTITY_AUTHORITY_HOST", "https://mock.podid.endpoint/" } }); var response = CreateMockResponse(200, ExpectedToken); - var mockTransport = new MockTransport(response); + var mockTransport = new MockTransport(req => + { + return response; + }); var options = new TokenCredentialOptions() { Transport = mockTransport }; var pipeline = CredentialPipeline.GetInstance(options); @@ -1035,6 +1072,11 @@ public void VerifyArcIdentitySourceFilePathValidation_FilePathInvalid() [Test] public async Task VerifyTokenExchangeMsiRequestMockAsync() { + List messages = new(); + using AzureEventSourceListener listener = new AzureEventSourceListener( + (_, message) => messages.Add(message), + EventLevel.Informational); + var tenantId = "mock-tenant-id"; var clientId = "mock-client-id"; var authorityHostUrl = "https://mock.authority.com"; @@ -1081,6 +1123,7 @@ public async Task VerifyTokenExchangeMsiRequestMockAsync() AccessToken actualToken = await credential.GetTokenAsync(new TokenRequestContext(MockScopes.Default)); Assert.AreEqual(ExpectedToken, actualToken.Token); + Assert.That(messages, Does.Contain(string.Format(AzureIdentityEventSource.ManagedIdentitySourceAttemptedMessage, "TokenExchangeManagedIdentitySource", true))); } private static IEnumerable ResourceAndClientIds() @@ -1113,7 +1156,6 @@ public static IEnumerable AuthorityHostValues() // params // az thrown Exception message, expected message, expected exception yield return new object[] { AzureAuthorityHosts.AzureChina }; - yield return new object[] { AzureAuthorityHosts.AzureGermany }; yield return new object[] { AzureAuthorityHosts.AzureGovernment }; yield return new object[] { AzureAuthorityHosts.AzurePublicCloud }; } @@ -1145,5 +1187,15 @@ private static MockResponse CreateInvalidJsonResponse(int status, string message response.SetContent(message); return response; } + + private static MockResponse CreateResponse(int status, string message) + { + var response = new MockResponse(status); + if (message != null) + { + response.SetContent(message); + } + return response; + } } } diff --git a/sdk/identity/Azure.Identity/tests/TokenCredentialOptionsTests.cs b/sdk/identity/Azure.Identity/tests/TokenCredentialOptionsTests.cs index 31d5dfda9fec..49429ef7a989 100644 --- a/sdk/identity/Azure.Identity/tests/TokenCredentialOptionsTests.cs +++ b/sdk/identity/Azure.Identity/tests/TokenCredentialOptionsTests.cs @@ -57,7 +57,7 @@ public void EnvAuthorityHost() [Test] public void CustomAuthorityHost() { - string envHostValue = AzureAuthorityHosts.AzureGermany.ToString(); + string envHostValue = AzureAuthorityHosts.AzureGovernment.ToString(); using (new TestEnvVar("AZURE_AUTHORITY_HOST", envHostValue)) { diff --git a/sdk/identity/tests.yml b/sdk/identity/tests.yml index 628ef2381ce6..fab231bdd156 100644 --- a/sdk/identity/tests.yml +++ b/sdk/identity/tests.yml @@ -29,10 +29,8 @@ extends: CloudConfig: Public: SubscriptionConfigurations: - - $(sub-config-azure-cloud-test-resources) # Contains alternate tenant, AAD app and cert info for testing - $(sub-config-identity-test-resources) - ServiceConnection: azure-sdk-tests EnvVars: ARM_OIDC_TOKEN: $(ARM_OIDC_TOKEN) ARM_CLIENT_ID: $(ARM_CLIENT_ID) diff --git a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/api/Azure.ResourceManager.InformaticaDataManagement.netstandard2.0.cs b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/api/Azure.ResourceManager.InformaticaDataManagement.netstandard2.0.cs index b5e180d103ee..9ab59e4090e0 100644 --- a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/api/Azure.ResourceManager.InformaticaDataManagement.netstandard2.0.cs +++ b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/api/Azure.ResourceManager.InformaticaDataManagement.netstandard2.0.cs @@ -31,6 +31,7 @@ public partial class InformaticaOrganizationData : Azure.ResourceManager.Models. { public InformaticaOrganizationData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.InformaticaDataManagement.Models.InformaticaOrganizationProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.InformaticaDataManagement.InformaticaOrganizationData 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.InformaticaDataManagement.InformaticaOrganizationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -90,6 +91,7 @@ public partial class InformaticaServerlessRuntimeData : Azure.ResourceManager.Mo { public InformaticaServerlessRuntimeData() { } public Azure.ResourceManager.InformaticaDataManagement.Models.InformaticaServerlessRuntimeProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.InformaticaDataManagement.InformaticaServerlessRuntimeData 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.InformaticaDataManagement.InformaticaServerlessRuntimeData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -151,6 +153,7 @@ public partial class AdvancedCustomProperties : System.ClientModel.Primitives.IJ public AdvancedCustomProperties() { } public string Key { get { throw null; } set { } } public string Value { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.InformaticaDataManagement.Models.AdvancedCustomProperties 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.InformaticaDataManagement.Models.AdvancedCustomProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -180,6 +183,7 @@ public CdiConfigProperties(string engineName, string engineVersion, System.Colle public System.Collections.Generic.IList ApplicationConfigs { get { throw null; } } public string EngineName { get { throw null; } set { } } public string EngineVersion { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.InformaticaDataManagement.Models.CdiConfigProperties 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.InformaticaDataManagement.Models.CdiConfigProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -192,6 +196,7 @@ internal CheckDependenciesResult() { } public int Count { get { throw null; } } public string Id { get { throw null; } } public System.Collections.Generic.IReadOnlyList References { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.InformaticaDataManagement.Models.CheckDependenciesResult 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.InformaticaDataManagement.Models.CheckDependenciesResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -203,6 +208,7 @@ public partial class ComputeUnitsMetadata : System.ClientModel.Primitives.IJsonM internal ComputeUnitsMetadata() { } public string Name { get { throw null; } } public System.Collections.Generic.IReadOnlyList Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.InformaticaDataManagement.Models.ComputeUnitsMetadata 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.InformaticaDataManagement.Models.ComputeUnitsMetadata System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -218,6 +224,7 @@ public InformaticaApplicationConfigs(string applicationConfigsType, string name, public string Name { get { throw null; } set { } } public string Platform { get { throw null; } set { } } public string Value { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.InformaticaDataManagement.Models.InformaticaApplicationConfigs 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.InformaticaDataManagement.Models.InformaticaApplicationConfigs System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -247,6 +254,7 @@ public partial class InformaticaApplicationTypeMetadata : System.ClientModel.Pri internal InformaticaApplicationTypeMetadata() { } public string Name { get { throw null; } } public string Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.InformaticaDataManagement.Models.InformaticaApplicationTypeMetadata 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.InformaticaDataManagement.Models.InformaticaApplicationTypeMetadata System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -262,6 +270,7 @@ public InformaticaCompanyDetails() { } public string Domain { get { throw null; } set { } } public int? NumberOfEmployees { get { throw null; } set { } } public string OfficeAddress { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.InformaticaDataManagement.Models.InformaticaCompanyDetails 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.InformaticaDataManagement.Models.InformaticaCompanyDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -277,6 +286,7 @@ public InformaticaCompanyDetailsUpdate() { } public string Domain { get { throw null; } set { } } public int? NumberOfEmployees { get { throw null; } set { } } public string OfficeAddress { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.InformaticaDataManagement.Models.InformaticaCompanyDetailsUpdate 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.InformaticaDataManagement.Models.InformaticaCompanyDetailsUpdate System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -288,6 +298,7 @@ public partial class InformaticaMarketplaceDetails : System.ClientModel.Primitiv public InformaticaMarketplaceDetails(Azure.ResourceManager.InformaticaDataManagement.Models.InformaticaOfferDetails offerDetails) { } public string MarketplaceSubscriptionId { get { throw null; } set { } } public Azure.ResourceManager.InformaticaDataManagement.Models.InformaticaOfferDetails OfferDetails { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.InformaticaDataManagement.Models.InformaticaMarketplaceDetails 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.InformaticaDataManagement.Models.InformaticaMarketplaceDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -299,6 +310,7 @@ public partial class InformaticaMarketplaceDetailsUpdate : System.ClientModel.Pr public InformaticaMarketplaceDetailsUpdate() { } public string MarketplaceSubscriptionId { get { throw null; } set { } } public Azure.ResourceManager.InformaticaDataManagement.Models.InformaticaOfferDetailsUpdate OfferDetails { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.InformaticaDataManagement.Models.InformaticaMarketplaceDetailsUpdate 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.InformaticaDataManagement.Models.InformaticaMarketplaceDetailsUpdate System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -311,6 +323,7 @@ public InformaticaNetworkInterfaceConfiguration(Azure.Core.ResourceIdentifier vn public Azure.Core.ResourceIdentifier SubnetId { get { throw null; } set { } } public Azure.Core.ResourceIdentifier VnetId { get { throw null; } set { } } public string VnetResourceGuid { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.InformaticaDataManagement.Models.InformaticaNetworkInterfaceConfiguration 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.InformaticaDataManagement.Models.InformaticaNetworkInterfaceConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -323,6 +336,7 @@ public InformaticaNetworkInterfaceConfigurationUpdate() { } public Azure.Core.ResourceIdentifier SubnetId { get { throw null; } set { } } public Azure.Core.ResourceIdentifier VnetId { get { throw null; } set { } } public string VnetResourceGuid { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.InformaticaDataManagement.Models.InformaticaNetworkInterfaceConfigurationUpdate 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.InformaticaDataManagement.Models.InformaticaNetworkInterfaceConfigurationUpdate System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -338,6 +352,7 @@ public InformaticaOfferDetails(string publisherId, string offerId, string planId public string PublisherId { get { throw null; } set { } } public string TermId { get { throw null; } set { } } public string TermUnit { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.InformaticaDataManagement.Models.InformaticaOfferDetails 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.InformaticaDataManagement.Models.InformaticaOfferDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -353,6 +368,7 @@ public InformaticaOfferDetailsUpdate() { } public string PublisherId { get { throw null; } set { } } public string TermId { get { throw null; } set { } } public string TermUnit { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.InformaticaDataManagement.Models.InformaticaOfferDetailsUpdate 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.InformaticaDataManagement.Models.InformaticaOfferDetailsUpdate System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -364,6 +380,7 @@ public partial class InformaticaOrganizationPatch : System.ClientModel.Primitive public InformaticaOrganizationPatch() { } public Azure.ResourceManager.InformaticaDataManagement.Models.InformaticaOrganizationPropertiesUpdate Properties { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.InformaticaDataManagement.Models.InformaticaOrganizationPatch 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.InformaticaDataManagement.Models.InformaticaOrganizationPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -379,6 +396,7 @@ public InformaticaOrganizationProperties() { } public Azure.ResourceManager.InformaticaDataManagement.Models.InformaticaMarketplaceDetails MarketplaceDetails { get { throw null; } set { } } public Azure.ResourceManager.InformaticaDataManagement.Models.InformaticaProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.InformaticaDataManagement.Models.InformaticaUserDetails UserDetails { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.InformaticaDataManagement.Models.InformaticaOrganizationProperties 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.InformaticaDataManagement.Models.InformaticaOrganizationProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -393,6 +411,7 @@ public InformaticaOrganizationPropertiesUpdate() { } public Azure.ResourceManager.InformaticaDataManagement.Models.InformaticaOrganizationPatch InformaticaOrganizationProperties { get { throw null; } set { } } public Azure.ResourceManager.InformaticaDataManagement.Models.InformaticaMarketplaceDetailsUpdate MarketplaceDetails { get { throw null; } set { } } public Azure.ResourceManager.InformaticaDataManagement.Models.InformaticaUserDetailsUpdate UserDetails { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.InformaticaDataManagement.Models.InformaticaOrganizationPropertiesUpdate 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.InformaticaDataManagement.Models.InformaticaOrganizationPropertiesUpdate System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -423,6 +442,7 @@ public InformaticaProperties() { } public string OrganizationId { get { throw null; } set { } } public string OrganizationName { get { throw null; } set { } } public System.Uri SingleSignOnUri { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.InformaticaDataManagement.Models.InformaticaProperties 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.InformaticaDataManagement.Models.InformaticaProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -459,6 +479,7 @@ public partial class InformaticaRegionsMetadata : System.ClientModel.Primitives. internal InformaticaRegionsMetadata() { } public string Id { get { throw null; } } public string Name { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.InformaticaDataManagement.Models.InformaticaRegionsMetadata 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.InformaticaDataManagement.Models.InformaticaRegionsMetadata System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -480,6 +501,7 @@ internal InformaticaRuntimeResourceFetchMetadata() { } public string StatusMessage { get { throw null; } } public string UpdatedBy { get { throw null; } } public string UpdatedTime { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.InformaticaDataManagement.Models.InformaticaRuntimeResourceFetchMetadata 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.InformaticaDataManagement.Models.InformaticaRuntimeResourceFetchMetadata System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -520,6 +542,7 @@ internal InformaticaServerlessFetchConfigProperties() { } public string Tags { get { throw null; } } public System.Guid? TenantId { get { throw null; } } public string Vnet { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.InformaticaDataManagement.Models.InformaticaServerlessFetchConfigProperties 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.InformaticaDataManagement.Models.InformaticaServerlessFetchConfigProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -530,6 +553,7 @@ public partial class InformaticaServerlessRuntimePatch : System.ClientModel.Prim { public InformaticaServerlessRuntimePatch() { } public Azure.ResourceManager.InformaticaDataManagement.Models.ServerlessRuntimePropertiesUpdate Properties { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.InformaticaDataManagement.Models.InformaticaServerlessRuntimePatch 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.InformaticaDataManagement.Models.InformaticaServerlessRuntimePatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -552,6 +576,7 @@ public InformaticaServerlessRuntimeProperties(string serverlessAccountLocation) public System.Collections.Generic.IList ServerlessRuntimeTags { get { throw null; } } public string SupplementaryFileLocation { get { throw null; } set { } } public string UserContextToken { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.InformaticaDataManagement.Models.InformaticaServerlessRuntimeProperties 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.InformaticaDataManagement.Models.InformaticaServerlessRuntimeProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -562,6 +587,7 @@ public partial class InformaticaServerlessRuntimeResourceList : System.ClientMod { internal InformaticaServerlessRuntimeResourceList() { } public System.Collections.Generic.IReadOnlyList InformaticaRuntimeResources { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.InformaticaDataManagement.Models.InformaticaServerlessRuntimeResourceList 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.InformaticaDataManagement.Models.InformaticaServerlessRuntimeResourceList System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -576,6 +602,7 @@ public InformaticaUserDetails() { } public string LastName { get { throw null; } set { } } public string PhoneNumber { get { throw null; } set { } } public string Upn { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.InformaticaDataManagement.Models.InformaticaUserDetails 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.InformaticaDataManagement.Models.InformaticaUserDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -590,6 +617,7 @@ public InformaticaUserDetailsUpdate() { } public string LastName { get { throw null; } set { } } public string PhoneNumber { get { throw null; } set { } } public string Upn { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.InformaticaDataManagement.Models.InformaticaUserDetailsUpdate 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.InformaticaDataManagement.Models.InformaticaUserDetailsUpdate System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -604,6 +632,7 @@ internal ServerlessConfigProperties() { } public string ExecutionTimeout { get { throw null; } } public Azure.ResourceManager.InformaticaDataManagement.Models.InformaticaPlatformType? Platform { get { throw null; } } public System.Collections.Generic.IReadOnlyList Regions { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.InformaticaDataManagement.Models.ServerlessConfigProperties 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.InformaticaDataManagement.Models.ServerlessConfigProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -616,6 +645,7 @@ internal ServerlessMetadataResponse() { } public Azure.ResourceManager.InformaticaDataManagement.Models.InformaticaRuntimeType? RuntimeType { get { throw null; } } public Azure.ResourceManager.InformaticaDataManagement.Models.ServerlessConfigProperties ServerlessConfigProperties { get { throw null; } } public Azure.ResourceManager.InformaticaDataManagement.Models.ServerlessRuntimeConfigProperties ServerlessRuntimeConfigProperties { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.InformaticaDataManagement.Models.ServerlessMetadataResponse 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.InformaticaDataManagement.Models.ServerlessMetadataResponse System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -627,6 +657,7 @@ public partial class ServerlessRuntimeConfigProperties : System.ClientModel.Prim public ServerlessRuntimeConfigProperties() { } public System.Collections.Generic.IList CdiConfigProps { get { throw null; } } public System.Collections.Generic.IList CdieConfigProps { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.InformaticaDataManagement.Models.ServerlessRuntimeConfigProperties 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.InformaticaDataManagement.Models.ServerlessRuntimeConfigProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -638,6 +669,7 @@ public partial class ServerlessRuntimeConfigPropertiesUpdate : System.ClientMode public ServerlessRuntimeConfigPropertiesUpdate() { } public System.Collections.Generic.IList CdiConfigProps { get { throw null; } } public System.Collections.Generic.IList CdieConfigProps { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.InformaticaDataManagement.Models.ServerlessRuntimeConfigPropertiesUpdate 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.InformaticaDataManagement.Models.ServerlessRuntimeConfigPropertiesUpdate System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -653,6 +685,7 @@ internal ServerlessRuntimeDependency() { } public string Id { get { throw null; } } public string LastUpdatedTime { get { throw null; } } public string Path { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.InformaticaDataManagement.Models.ServerlessRuntimeDependency 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.InformaticaDataManagement.Models.ServerlessRuntimeDependency System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -674,6 +707,7 @@ public ServerlessRuntimePropertiesUpdate() { } public System.Collections.Generic.IList ServerlessRuntimeTags { get { throw null; } } public string SupplementaryFileLocation { get { throw null; } set { } } public string UserContextToken { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.InformaticaDataManagement.Models.ServerlessRuntimePropertiesUpdate 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.InformaticaDataManagement.Models.ServerlessRuntimePropertiesUpdate System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -685,6 +719,7 @@ public partial class ServerlessRuntimeTag : System.ClientModel.Primitives.IJsonM public ServerlessRuntimeTag() { } public string Name { get { throw null; } set { } } public string Value { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.InformaticaDataManagement.Models.ServerlessRuntimeTag 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.InformaticaDataManagement.Models.ServerlessRuntimeTag System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } diff --git a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/samples/Generated/Samples/Sample_InformaticaOrganizationCollection.cs b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/samples/Generated/Samples/Sample_InformaticaOrganizationCollection.cs index 603ed50029e1..f52712121081 100644 --- a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/samples/Generated/Samples/Sample_InformaticaOrganizationCollection.cs +++ b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/samples/Generated/Samples/Sample_InformaticaOrganizationCollection.cs @@ -22,7 +22,7 @@ public partial class Sample_InformaticaOrganizationCollection public async Task Get_OrganizationsGet() { // Generated from example definition: 2024-05-08/Organizations_Get_MaximumSet_Gen.json - // this example is just showing the usage of "Organizations_Get" operation, for the dependent resources, they will have to be created separately. + // this example is just showing the usage of "InformaticaOrganizationResource_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -56,7 +56,7 @@ public async Task Get_OrganizationsGet() public async Task Exists_OrganizationsGet() { // Generated from example definition: 2024-05-08/Organizations_Get_MaximumSet_Gen.json - // this example is just showing the usage of "Organizations_Get" operation, for the dependent resources, they will have to be created separately. + // this example is just showing the usage of "InformaticaOrganizationResource_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -86,7 +86,7 @@ public async Task Exists_OrganizationsGet() public async Task GetIfExists_OrganizationsGet() { // Generated from example definition: 2024-05-08/Organizations_Get_MaximumSet_Gen.json - // this example is just showing the usage of "Organizations_Get" operation, for the dependent resources, they will have to be created separately. + // this example is just showing the usage of "InformaticaOrganizationResource_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -128,7 +128,7 @@ public async Task GetIfExists_OrganizationsGet() public async Task Get_OrganizationsGetMin() { // Generated from example definition: 2024-05-08/Organizations_Get_MinimumSet_Gen.json - // this example is just showing the usage of "Organizations_Get" operation, for the dependent resources, they will have to be created separately. + // this example is just showing the usage of "InformaticaOrganizationResource_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -162,7 +162,7 @@ public async Task Get_OrganizationsGetMin() public async Task Exists_OrganizationsGetMin() { // Generated from example definition: 2024-05-08/Organizations_Get_MinimumSet_Gen.json - // this example is just showing the usage of "Organizations_Get" operation, for the dependent resources, they will have to be created separately. + // this example is just showing the usage of "InformaticaOrganizationResource_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -192,7 +192,7 @@ public async Task Exists_OrganizationsGetMin() public async Task GetIfExists_OrganizationsGetMin() { // Generated from example definition: 2024-05-08/Organizations_Get_MinimumSet_Gen.json - // this example is just showing the usage of "Organizations_Get" operation, for the dependent resources, they will have to be created separately. + // this example is just showing the usage of "InformaticaOrganizationResource_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -234,7 +234,7 @@ public async Task GetIfExists_OrganizationsGetMin() public async Task CreateOrUpdate_OrganizationsCreateOrUpdate() { // Generated from example definition: 2024-05-08/Organizations_CreateOrUpdate_MaximumSet_Gen.json - // this example is just showing the usage of "Organizations_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + // this example is just showing the usage of "InformaticaOrganizationResource_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -311,7 +311,7 @@ public async Task CreateOrUpdate_OrganizationsCreateOrUpdate() public async Task CreateOrUpdate_OrganizationsCreateOrUpdateMin() { // Generated from example definition: 2024-05-08/Organizations_CreateOrUpdate_MinimumSet_Gen.json - // this example is just showing the usage of "Organizations_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + // this example is just showing the usage of "InformaticaOrganizationResource_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); diff --git a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/samples/Generated/Samples/Sample_InformaticaOrganizationResource.cs b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/samples/Generated/Samples/Sample_InformaticaOrganizationResource.cs index b2b1abe794d2..f59466008296 100644 --- a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/samples/Generated/Samples/Sample_InformaticaOrganizationResource.cs +++ b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/samples/Generated/Samples/Sample_InformaticaOrganizationResource.cs @@ -21,7 +21,7 @@ public partial class Sample_InformaticaOrganizationResource public async Task Get_OrganizationsGet() { // Generated from example definition: 2024-05-08/Organizations_Get_MaximumSet_Gen.json - // this example is just showing the usage of "Organizations_Get" operation, for the dependent resources, they will have to be created separately. + // this example is just showing the usage of "InformaticaOrganizationResource_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -52,7 +52,7 @@ public async Task Get_OrganizationsGet() public async Task Get_OrganizationsGetMin() { // Generated from example definition: 2024-05-08/Organizations_Get_MinimumSet_Gen.json - // this example is just showing the usage of "Organizations_Get" operation, for the dependent resources, they will have to be created separately. + // this example is just showing the usage of "InformaticaOrganizationResource_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -83,7 +83,7 @@ public async Task Get_OrganizationsGetMin() public async Task Update_OrganizationsUpdate() { // Generated from example definition: 2024-05-08/Organizations_Update_MaximumSet_Gen.json - // this example is just showing the usage of "Organizations_Update" operation, for the dependent resources, they will have to be created separately. + // this example is just showing the usage of "InformaticaOrganizationResource_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -155,7 +155,7 @@ public async Task Update_OrganizationsUpdate() public async Task Update_OrganizationsUpdateMin() { // Generated from example definition: 2024-05-08/Organizations_Update_MinimumSet_Gen.json - // this example is just showing the usage of "Organizations_Update" operation, for the dependent resources, they will have to be created separately. + // this example is just showing the usage of "InformaticaOrganizationResource_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -187,7 +187,7 @@ public async Task Update_OrganizationsUpdateMin() public async Task Delete_OrganizationsDelete() { // Generated from example definition: 2024-05-08/Organizations_Delete_MaximumSet_Gen.json - // this example is just showing the usage of "Organizations_Delete" operation, for the dependent resources, they will have to be created separately. + // this example is just showing the usage of "InformaticaOrganizationResource_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -214,7 +214,7 @@ public async Task Delete_OrganizationsDelete() public async Task Delete_OrganizationsDeleteMin() { // Generated from example definition: 2024-05-08/Organizations_Delete_MinimumSet_Gen.json - // this example is just showing the usage of "Organizations_Delete" operation, for the dependent resources, they will have to be created separately. + // this example is just showing the usage of "InformaticaOrganizationResource_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); diff --git a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/samples/Generated/Samples/Sample_InformaticaServerlessRuntimeCollection.cs b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/samples/Generated/Samples/Sample_InformaticaServerlessRuntimeCollection.cs index 2c3faaf21ca4..938e267a3df6 100644 --- a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/samples/Generated/Samples/Sample_InformaticaServerlessRuntimeCollection.cs +++ b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/samples/Generated/Samples/Sample_InformaticaServerlessRuntimeCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_InformaticaServerlessRuntimeCollection public async Task Get_ServerlessRuntimesGet() { // Generated from example definition: 2024-05-08/ServerlessRuntimes_Get_MaximumSet_Gen.json - // this example is just showing the usage of "ServerlessRuntimes_Get" operation, for the dependent resources, they will have to be created separately. + // this example is just showing the usage of "InformaticaServerlessRuntimeResource_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -56,7 +56,7 @@ public async Task Get_ServerlessRuntimesGet() public async Task Exists_ServerlessRuntimesGet() { // Generated from example definition: 2024-05-08/ServerlessRuntimes_Get_MaximumSet_Gen.json - // this example is just showing the usage of "ServerlessRuntimes_Get" operation, for the dependent resources, they will have to be created separately. + // this example is just showing the usage of "InformaticaServerlessRuntimeResource_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -87,7 +87,7 @@ public async Task Exists_ServerlessRuntimesGet() public async Task GetIfExists_ServerlessRuntimesGet() { // Generated from example definition: 2024-05-08/ServerlessRuntimes_Get_MaximumSet_Gen.json - // this example is just showing the usage of "ServerlessRuntimes_Get" operation, for the dependent resources, they will have to be created separately. + // this example is just showing the usage of "InformaticaServerlessRuntimeResource_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -130,7 +130,7 @@ public async Task GetIfExists_ServerlessRuntimesGet() public async Task Get_ServerlessRuntimesGetMin() { // Generated from example definition: 2024-05-08/ServerlessRuntimes_Get_MinimumSet_Gen.json - // this example is just showing the usage of "ServerlessRuntimes_Get" operation, for the dependent resources, they will have to be created separately. + // this example is just showing the usage of "InformaticaServerlessRuntimeResource_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -165,7 +165,7 @@ public async Task Get_ServerlessRuntimesGetMin() public async Task Exists_ServerlessRuntimesGetMin() { // Generated from example definition: 2024-05-08/ServerlessRuntimes_Get_MinimumSet_Gen.json - // this example is just showing the usage of "ServerlessRuntimes_Get" operation, for the dependent resources, they will have to be created separately. + // this example is just showing the usage of "InformaticaServerlessRuntimeResource_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -196,7 +196,7 @@ public async Task Exists_ServerlessRuntimesGetMin() public async Task GetIfExists_ServerlessRuntimesGetMin() { // Generated from example definition: 2024-05-08/ServerlessRuntimes_Get_MinimumSet_Gen.json - // this example is just showing the usage of "ServerlessRuntimes_Get" operation, for the dependent resources, they will have to be created separately. + // this example is just showing the usage of "InformaticaServerlessRuntimeResource_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -239,7 +239,7 @@ public async Task GetIfExists_ServerlessRuntimesGetMin() public async Task CreateOrUpdate_ServerlessRuntimesCreateOrUpdate() { // Generated from example definition: 2024-05-08/ServerlessRuntimes_CreateOrUpdate_MaximumSet_Gen.json - // this example is just showing the usage of "ServerlessRuntimes_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + // this example is just showing the usage of "InformaticaServerlessRuntimeResource_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -325,7 +325,7 @@ public async Task CreateOrUpdate_ServerlessRuntimesCreateOrUpdate() public async Task CreateOrUpdate_ServerlessRuntimesCreateOrUpdateMin() { // Generated from example definition: 2024-05-08/ServerlessRuntimes_CreateOrUpdate_MinimumSet_Gen.json - // this example is just showing the usage of "ServerlessRuntimes_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + // this example is just showing the usage of "InformaticaServerlessRuntimeResource_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); diff --git a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/samples/Generated/Samples/Sample_InformaticaServerlessRuntimeResource.cs b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/samples/Generated/Samples/Sample_InformaticaServerlessRuntimeResource.cs index 0d8fa39ae811..c43c6cd863ec 100644 --- a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/samples/Generated/Samples/Sample_InformaticaServerlessRuntimeResource.cs +++ b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/samples/Generated/Samples/Sample_InformaticaServerlessRuntimeResource.cs @@ -21,7 +21,7 @@ public partial class Sample_InformaticaServerlessRuntimeResource public async Task Get_ServerlessRuntimesGet() { // Generated from example definition: 2024-05-08/ServerlessRuntimes_Get_MaximumSet_Gen.json - // this example is just showing the usage of "ServerlessRuntimes_Get" operation, for the dependent resources, they will have to be created separately. + // this example is just showing the usage of "InformaticaServerlessRuntimeResource_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -53,7 +53,7 @@ public async Task Get_ServerlessRuntimesGet() public async Task Get_ServerlessRuntimesGetMin() { // Generated from example definition: 2024-05-08/ServerlessRuntimes_Get_MinimumSet_Gen.json - // this example is just showing the usage of "ServerlessRuntimes_Get" operation, for the dependent resources, they will have to be created separately. + // this example is just showing the usage of "InformaticaServerlessRuntimeResource_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -85,7 +85,7 @@ public async Task Get_ServerlessRuntimesGetMin() public async Task Delete_ServerlessRuntimesDelete() { // Generated from example definition: 2024-05-08/ServerlessRuntimes_Delete_MaximumSet_Gen.json - // this example is just showing the usage of "ServerlessRuntimes_Delete" operation, for the dependent resources, they will have to be created separately. + // this example is just showing the usage of "InformaticaServerlessRuntimeResource_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -113,7 +113,7 @@ public async Task Delete_ServerlessRuntimesDelete() public async Task Update_ServerlessRuntimesUpdate() { // Generated from example definition: 2024-05-08/ServerlessRuntimes_Update_MaximumSet_Gen.json - // this example is just showing the usage of "ServerlessRuntimes_Update" operation, for the dependent resources, they will have to be created separately. + // this example is just showing the usage of "InformaticaServerlessRuntimeResource_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -198,7 +198,7 @@ public async Task Update_ServerlessRuntimesUpdate() public async Task Update_ServerlessRuntimesUpdateMin() { // Generated from example definition: 2024-05-08/ServerlessRuntimes_Update_MinimumSet_Gen.json - // this example is just showing the usage of "ServerlessRuntimes_Update" operation, for the dependent resources, they will have to be created separately. + // this example is just showing the usage of "InformaticaServerlessRuntimeResource_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); diff --git a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Extensions/InformaticaDataManagementExtensions.cs b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Extensions/InformaticaDataManagementExtensions.cs index 7ce3fb452812..a082fa5851f8 100644 --- a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Extensions/InformaticaDataManagementExtensions.cs +++ b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Extensions/InformaticaDataManagementExtensions.cs @@ -96,7 +96,7 @@ public static InformaticaOrganizationCollection GetInformaticaOrganizations(this /// /// /// Operation Id - /// Organizations_Get + /// InformaticaOrganizationResource_Get /// /// /// Default Api Version @@ -134,7 +134,7 @@ public static async Task> GetInformati /// /// /// Operation Id - /// Organizations_Get + /// InformaticaOrganizationResource_Get /// /// /// Default Api Version diff --git a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Extensions/MockableInformaticaDataManagementResourceGroupResource.cs b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Extensions/MockableInformaticaDataManagementResourceGroupResource.cs index ea5179f305fa..7a08f80fd8a1 100644 --- a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Extensions/MockableInformaticaDataManagementResourceGroupResource.cs +++ b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Extensions/MockableInformaticaDataManagementResourceGroupResource.cs @@ -49,7 +49,7 @@ public virtual InformaticaOrganizationCollection GetInformaticaOrganizations() /// /// /// Operation Id - /// Organizations_Get + /// InformaticaOrganizationResource_Get /// /// /// Default Api Version @@ -80,7 +80,7 @@ public virtual async Task> GetInformat /// /// /// Operation Id - /// Organizations_Get + /// InformaticaOrganizationResource_Get /// /// /// Default Api Version diff --git a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/InformaticaOrganizationCollection.cs b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/InformaticaOrganizationCollection.cs index a4959e21864c..e2a747909e67 100644 --- a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/InformaticaOrganizationCollection.cs +++ b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/InformaticaOrganizationCollection.cs @@ -61,7 +61,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id - /// Organizations_CreateOrUpdate + /// InformaticaOrganizationResource_CreateOrUpdate /// /// /// Default Api Version @@ -110,7 +110,7 @@ public virtual async Task> CreateO /// /// /// Operation Id - /// Organizations_CreateOrUpdate + /// InformaticaOrganizationResource_CreateOrUpdate /// /// /// Default Api Version @@ -159,7 +159,7 @@ public virtual ArmOperation CreateOrUpdate(Wait /// /// /// Operation Id - /// Organizations_Get + /// InformaticaOrganizationResource_Get /// /// /// Default Api Version @@ -204,7 +204,7 @@ public virtual async Task> GetAsync(st /// /// /// Operation Id - /// Organizations_Get + /// InformaticaOrganizationResource_Get /// /// /// Default Api Version @@ -309,7 +309,7 @@ public virtual Pageable GetAll(CancellationToke /// /// /// Operation Id - /// Organizations_Get + /// InformaticaOrganizationResource_Get /// /// /// Default Api Version @@ -352,7 +352,7 @@ public virtual async Task> ExistsAsync(string organizationName, C /// /// /// Operation Id - /// Organizations_Get + /// InformaticaOrganizationResource_Get /// /// /// Default Api Version @@ -395,7 +395,7 @@ public virtual Response Exists(string organizationName, CancellationToken /// /// /// Operation Id - /// Organizations_Get + /// InformaticaOrganizationResource_Get /// /// /// Default Api Version @@ -440,7 +440,7 @@ public virtual async Task> Get /// /// /// Operation Id - /// Organizations_Get + /// InformaticaOrganizationResource_Get /// /// /// Default Api Version diff --git a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/InformaticaOrganizationData.Serialization.cs b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/InformaticaOrganizationData.Serialization.cs index ffac8f6674f4..850877814eb9 100644 --- a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/InformaticaOrganizationData.Serialization.cs +++ b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/InformaticaOrganizationData.Serialization.cs @@ -20,6 +20,15 @@ public partial class InformaticaOrganizationData : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,61 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(InformaticaOrganizationData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); writer.WriteObjectValue(Properties, options); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } InformaticaOrganizationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/InformaticaOrganizationResource.cs b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/InformaticaOrganizationResource.cs index d2973d7d93c5..5e07faaac67a 100644 --- a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/InformaticaOrganizationResource.cs +++ b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/InformaticaOrganizationResource.cs @@ -106,7 +106,7 @@ public virtual InformaticaServerlessRuntimeCollection GetInformaticaServerlessRu /// /// /// Operation Id - /// ServerlessRuntimes_Get + /// InformaticaServerlessRuntimeResource_Get /// /// /// Default Api Version @@ -137,7 +137,7 @@ public virtual async Task> GetInf /// /// /// Operation Id - /// ServerlessRuntimes_Get + /// InformaticaServerlessRuntimeResource_Get /// /// /// Default Api Version @@ -168,7 +168,7 @@ public virtual Response GetInformaticaServ /// /// /// Operation Id - /// Organizations_Get + /// InformaticaOrganizationResource_Get /// /// /// Default Api Version @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(Ca /// /// /// Operation Id - /// Organizations_Get + /// InformaticaOrganizationResource_Get /// /// /// Default Api Version @@ -248,7 +248,7 @@ public virtual Response Get(CancellationToken c /// /// /// Operation Id - /// Organizations_Delete + /// InformaticaOrganizationResource_Delete /// /// /// Default Api Version @@ -290,7 +290,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Operation Id - /// Organizations_Delete + /// InformaticaOrganizationResource_Delete /// /// /// Default Api Version @@ -332,7 +332,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Operation Id - /// Organizations_Update + /// InformaticaOrganizationResource_Update /// /// /// Default Api Version @@ -374,7 +374,7 @@ public virtual async Task> UpdateAsync /// /// /// Operation Id - /// Organizations_Update + /// InformaticaOrganizationResource_Update /// /// /// Default Api Version @@ -568,7 +568,7 @@ public virtual Response GetAllServerle /// /// /// Operation Id - /// Organizations_Get + /// InformaticaOrganizationResource_Get /// /// /// Default Api Version @@ -630,7 +630,7 @@ public virtual async Task> AddTagAsync /// /// /// Operation Id - /// Organizations_Get + /// InformaticaOrganizationResource_Get /// /// /// Default Api Version @@ -692,7 +692,7 @@ public virtual Response AddTag(string key, stri /// /// /// Operation Id - /// Organizations_Get + /// InformaticaOrganizationResource_Get /// /// /// Default Api Version @@ -749,7 +749,7 @@ public virtual async Task> SetTagsAsyn /// /// /// Operation Id - /// Organizations_Get + /// InformaticaOrganizationResource_Get /// /// /// Default Api Version @@ -806,7 +806,7 @@ public virtual Response SetTags(IDictionary /// /// Operation Id - /// Organizations_Get + /// InformaticaOrganizationResource_Get /// /// /// Default Api Version @@ -866,7 +866,7 @@ public virtual async Task> RemoveTagAs /// /// /// Operation Id - /// Organizations_Get + /// InformaticaOrganizationResource_Get /// /// /// Default Api Version diff --git a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/InformaticaServerlessRuntimeCollection.cs b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/InformaticaServerlessRuntimeCollection.cs index b262d6a96b7e..a7da7bfd5377 100644 --- a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/InformaticaServerlessRuntimeCollection.cs +++ b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/InformaticaServerlessRuntimeCollection.cs @@ -60,7 +60,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id - /// ServerlessRuntimes_CreateOrUpdate + /// InformaticaServerlessRuntimeResource_CreateOrUpdate /// /// /// Default Api Version @@ -109,7 +109,7 @@ public virtual async Task> Cr /// /// /// Operation Id - /// ServerlessRuntimes_CreateOrUpdate + /// InformaticaServerlessRuntimeResource_CreateOrUpdate /// /// /// Default Api Version @@ -158,7 +158,7 @@ public virtual ArmOperation CreateOrUpdate /// /// /// Operation Id - /// ServerlessRuntimes_Get + /// InformaticaServerlessRuntimeResource_Get /// /// /// Default Api Version @@ -203,7 +203,7 @@ public virtual async Task> GetAsy /// /// /// Operation Id - /// ServerlessRuntimes_Get + /// InformaticaServerlessRuntimeResource_Get /// /// /// Default Api Version @@ -308,7 +308,7 @@ public virtual Pageable GetAll(Cancellatio /// /// /// Operation Id - /// ServerlessRuntimes_Get + /// InformaticaServerlessRuntimeResource_Get /// /// /// Default Api Version @@ -351,7 +351,7 @@ public virtual async Task> ExistsAsync(string serverlessRuntimeNa /// /// /// Operation Id - /// ServerlessRuntimes_Get + /// InformaticaServerlessRuntimeResource_Get /// /// /// Default Api Version @@ -394,7 +394,7 @@ public virtual Response Exists(string serverlessRuntimeName, CancellationT /// /// /// Operation Id - /// ServerlessRuntimes_Get + /// InformaticaServerlessRuntimeResource_Get /// /// /// Default Api Version @@ -439,7 +439,7 @@ public virtual async Task /// /// /// Operation Id - /// ServerlessRuntimes_Get + /// InformaticaServerlessRuntimeResource_Get /// /// /// Default Api Version diff --git a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/InformaticaServerlessRuntimeData.Serialization.cs b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/InformaticaServerlessRuntimeData.Serialization.cs index 3517cce46dd7..a3e7c66a9806 100644 --- a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/InformaticaServerlessRuntimeData.Serialization.cs +++ b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/InformaticaServerlessRuntimeData.Serialization.cs @@ -20,6 +20,15 @@ public partial class InformaticaServerlessRuntimeData : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,48 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(InformaticaServerlessRuntimeData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); writer.WriteObjectValue(Properties, options); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } InformaticaServerlessRuntimeData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/InformaticaServerlessRuntimeResource.cs b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/InformaticaServerlessRuntimeResource.cs index 3973ad8ab529..5e9be7e93a27 100644 --- a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/InformaticaServerlessRuntimeResource.cs +++ b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/InformaticaServerlessRuntimeResource.cs @@ -98,7 +98,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id - /// ServerlessRuntimes_Get + /// InformaticaServerlessRuntimeResource_Get /// /// /// Default Api Version @@ -138,7 +138,7 @@ public virtual async Task> GetAsy /// /// /// Operation Id - /// ServerlessRuntimes_Get + /// InformaticaServerlessRuntimeResource_Get /// /// /// Default Api Version @@ -178,7 +178,7 @@ public virtual Response Get(CancellationTo /// /// /// Operation Id - /// ServerlessRuntimes_Delete + /// InformaticaServerlessRuntimeResource_Delete /// /// /// Default Api Version @@ -220,7 +220,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Operation Id - /// ServerlessRuntimes_Delete + /// InformaticaServerlessRuntimeResource_Delete /// /// /// Default Api Version @@ -262,7 +262,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Operation Id - /// ServerlessRuntimes_Update + /// InformaticaServerlessRuntimeResource_Update /// /// /// Default Api Version @@ -304,7 +304,7 @@ public virtual async Task> Update /// /// /// Operation Id - /// ServerlessRuntimes_Update + /// InformaticaServerlessRuntimeResource_Update /// /// /// Default Api Version diff --git a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/AdvancedCustomProperties.Serialization.cs b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/AdvancedCustomProperties.Serialization.cs index 3a5174e7ca26..afe408887856 100644 --- a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/AdvancedCustomProperties.Serialization.cs +++ b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/AdvancedCustomProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class AdvancedCustomProperties : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(AdvancedCustomProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Key)) { writer.WritePropertyName("key"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } AdvancedCustomProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/CdiConfigProperties.Serialization.cs b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/CdiConfigProperties.Serialization.cs index 487d6da707d2..c13440b6b6ab 100644 --- a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/CdiConfigProperties.Serialization.cs +++ b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/CdiConfigProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class CdiConfigProperties : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(CdiConfigProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("engineName"u8); writer.WriteStringValue(EngineName); writer.WritePropertyName("engineVersion"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } CdiConfigProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/CheckDependenciesResult.Serialization.cs b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/CheckDependenciesResult.Serialization.cs index b871088b578b..3b70acf4f3be 100644 --- a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/CheckDependenciesResult.Serialization.cs +++ b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/CheckDependenciesResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class CheckDependenciesResult : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(CheckDependenciesResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("count"u8); writer.WriteNumberValue(Count); writer.WritePropertyName("id"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } CheckDependenciesResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/ComputeUnitsMetadata.Serialization.cs b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/ComputeUnitsMetadata.Serialization.cs index 37f9119a54df..9dbbfd7abf8f 100644 --- a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/ComputeUnitsMetadata.Serialization.cs +++ b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/ComputeUnitsMetadata.Serialization.cs @@ -18,6 +18,15 @@ public partial class ComputeUnitsMetadata : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(ComputeUnitsMetadata)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } ComputeUnitsMetadata IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/InformaticaApplicationConfigs.Serialization.cs b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/InformaticaApplicationConfigs.Serialization.cs index e18e13719723..8df04fafa720 100644 --- a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/InformaticaApplicationConfigs.Serialization.cs +++ b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/InformaticaApplicationConfigs.Serialization.cs @@ -18,6 +18,15 @@ public partial class InformaticaApplicationConfigs : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(InformaticaApplicationConfigs)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("type"u8); writer.WriteStringValue(ApplicationConfigsType); writer.WritePropertyName("name"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } InformaticaApplicationConfigs IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/InformaticaApplicationTypeMetadata.Serialization.cs b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/InformaticaApplicationTypeMetadata.Serialization.cs index b5e47bc707fd..1fa4d7e83c7f 100644 --- a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/InformaticaApplicationTypeMetadata.Serialization.cs +++ b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/InformaticaApplicationTypeMetadata.Serialization.cs @@ -18,6 +18,15 @@ public partial class InformaticaApplicationTypeMetadata : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(InformaticaApplicationTypeMetadata)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } InformaticaApplicationTypeMetadata IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/InformaticaCompanyDetails.Serialization.cs b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/InformaticaCompanyDetails.Serialization.cs index 742020b31c6c..eee4184521e4 100644 --- a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/InformaticaCompanyDetails.Serialization.cs +++ b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/InformaticaCompanyDetails.Serialization.cs @@ -18,6 +18,15 @@ public partial class InformaticaCompanyDetails : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(InformaticaCompanyDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(CompanyName)) { writer.WritePropertyName("companyName"u8); @@ -71,7 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } InformaticaCompanyDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/InformaticaCompanyDetailsUpdate.Serialization.cs b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/InformaticaCompanyDetailsUpdate.Serialization.cs index 50ad29e29764..bfc8c3645a4a 100644 --- a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/InformaticaCompanyDetailsUpdate.Serialization.cs +++ b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/InformaticaCompanyDetailsUpdate.Serialization.cs @@ -18,6 +18,15 @@ public partial class InformaticaCompanyDetailsUpdate : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(InformaticaCompanyDetailsUpdate)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(CompanyName)) { writer.WritePropertyName("companyName"u8); @@ -71,7 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } InformaticaCompanyDetailsUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/InformaticaMarketplaceDetails.Serialization.cs b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/InformaticaMarketplaceDetails.Serialization.cs index 809fa88934fc..aa8a130af3fa 100644 --- a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/InformaticaMarketplaceDetails.Serialization.cs +++ b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/InformaticaMarketplaceDetails.Serialization.cs @@ -18,6 +18,15 @@ public partial class InformaticaMarketplaceDetails : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(InformaticaMarketplaceDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(MarketplaceSubscriptionId)) { writer.WritePropertyName("marketplaceSubscriptionId"u8); @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } InformaticaMarketplaceDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/InformaticaMarketplaceDetailsUpdate.Serialization.cs b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/InformaticaMarketplaceDetailsUpdate.Serialization.cs index bb068658e084..9b4129e65c1a 100644 --- a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/InformaticaMarketplaceDetailsUpdate.Serialization.cs +++ b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/InformaticaMarketplaceDetailsUpdate.Serialization.cs @@ -18,6 +18,15 @@ public partial class InformaticaMarketplaceDetailsUpdate : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(InformaticaMarketplaceDetailsUpdate)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(MarketplaceSubscriptionId)) { writer.WritePropertyName("marketplaceSubscriptionId"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } InformaticaMarketplaceDetailsUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/InformaticaNetworkInterfaceConfiguration.Serialization.cs b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/InformaticaNetworkInterfaceConfiguration.Serialization.cs index 04a24131e136..21d10b190717 100644 --- a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/InformaticaNetworkInterfaceConfiguration.Serialization.cs +++ b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/InformaticaNetworkInterfaceConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class InformaticaNetworkInterfaceConfiguration : IUtf8JsonSeriali void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter w throw new FormatException($"The model {nameof(InformaticaNetworkInterfaceConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("vnetId"u8); writer.WriteStringValue(VnetId); writer.WritePropertyName("subnetId"u8); @@ -50,7 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter w #endif } } - writer.WriteEndObject(); } InformaticaNetworkInterfaceConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/InformaticaNetworkInterfaceConfigurationUpdate.Serialization.cs b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/InformaticaNetworkInterfaceConfigurationUpdate.Serialization.cs index 47fa28079a4d..db8e2864c1b7 100644 --- a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/InformaticaNetworkInterfaceConfigurationUpdate.Serialization.cs +++ b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/InformaticaNetworkInterfaceConfigurationUpdate.Serialization.cs @@ -18,6 +18,15 @@ public partial class InformaticaNetworkInterfaceConfigurationUpdate : IUtf8JsonS void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWr throw new FormatException($"The model {nameof(InformaticaNetworkInterfaceConfigurationUpdate)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(VnetId)) { writer.WritePropertyName("vnetId"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWr #endif } } - writer.WriteEndObject(); } InformaticaNetworkInterfaceConfigurationUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/InformaticaOfferDetails.Serialization.cs b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/InformaticaOfferDetails.Serialization.cs index f82f6a455fd6..0c29b43c4eaa 100644 --- a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/InformaticaOfferDetails.Serialization.cs +++ b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/InformaticaOfferDetails.Serialization.cs @@ -18,6 +18,15 @@ public partial class InformaticaOfferDetails : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(InformaticaOfferDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("publisherId"u8); writer.WriteStringValue(PublisherId); writer.WritePropertyName("offerId"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } InformaticaOfferDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/InformaticaOfferDetailsUpdate.Serialization.cs b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/InformaticaOfferDetailsUpdate.Serialization.cs index f7eb03d2c16f..ca741d3fafd1 100644 --- a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/InformaticaOfferDetailsUpdate.Serialization.cs +++ b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/InformaticaOfferDetailsUpdate.Serialization.cs @@ -18,6 +18,15 @@ public partial class InformaticaOfferDetailsUpdate : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(InformaticaOfferDetailsUpdate)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(PublisherId)) { writer.WritePropertyName("publisherId"u8); @@ -71,7 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } InformaticaOfferDetailsUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/InformaticaOrganizationPatch.Serialization.cs b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/InformaticaOrganizationPatch.Serialization.cs index 271a5c3aed7b..a7215f7c434d 100644 --- a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/InformaticaOrganizationPatch.Serialization.cs +++ b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/InformaticaOrganizationPatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class InformaticaOrganizationPatch : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(InformaticaOrganizationPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } InformaticaOrganizationPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/InformaticaOrganizationProperties.Serialization.cs b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/InformaticaOrganizationProperties.Serialization.cs index e74222c9a359..5f87b7bc34fa 100644 --- a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/InformaticaOrganizationProperties.Serialization.cs +++ b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/InformaticaOrganizationProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class InformaticaOrganizationProperties : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(InformaticaOrganizationProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) { writer.WritePropertyName("provisioningState"u8); @@ -71,7 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } InformaticaOrganizationProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/InformaticaOrganizationPropertiesUpdate.Serialization.cs b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/InformaticaOrganizationPropertiesUpdate.Serialization.cs index 83dfec5f65e4..28fd1249314a 100644 --- a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/InformaticaOrganizationPropertiesUpdate.Serialization.cs +++ b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/InformaticaOrganizationPropertiesUpdate.Serialization.cs @@ -18,6 +18,15 @@ public partial class InformaticaOrganizationPropertiesUpdate : IUtf8JsonSerializ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wr throw new FormatException($"The model {nameof(InformaticaOrganizationPropertiesUpdate)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(InformaticaOrganizationProperties)) { writer.WritePropertyName("informaticaOrganizationProperties"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter wr #endif } } - writer.WriteEndObject(); } InformaticaOrganizationPropertiesUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/InformaticaOrganizationResourceListResult.Serialization.cs b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/InformaticaOrganizationResourceListResult.Serialization.cs index 66536dc11df0..633fd4f7379d 100644 --- a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/InformaticaOrganizationResourceListResult.Serialization.cs +++ b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/InformaticaOrganizationResourceListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class InformaticaOrganizationResourceListResult : IUtf8JsonSeri void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(InformaticaOrganizationResourceListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } InformaticaOrganizationResourceListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/InformaticaProperties.Serialization.cs b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/InformaticaProperties.Serialization.cs index 20afd74da4ff..93fb6b44b24c 100644 --- a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/InformaticaProperties.Serialization.cs +++ b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/InformaticaProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class InformaticaProperties : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(InformaticaProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(OrganizationId)) { writer.WritePropertyName("organizationId"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } InformaticaProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/InformaticaRegionsMetadata.Serialization.cs b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/InformaticaRegionsMetadata.Serialization.cs index e37ab8b8f3d5..4d1f4943e810 100644 --- a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/InformaticaRegionsMetadata.Serialization.cs +++ b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/InformaticaRegionsMetadata.Serialization.cs @@ -18,6 +18,15 @@ public partial class InformaticaRegionsMetadata : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(InformaticaRegionsMetadata)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } InformaticaRegionsMetadata IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/InformaticaRuntimeResourceFetchMetadata.Serialization.cs b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/InformaticaRuntimeResourceFetchMetadata.Serialization.cs index a109fff59f2d..530cbe44ecb2 100644 --- a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/InformaticaRuntimeResourceFetchMetadata.Serialization.cs +++ b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/InformaticaRuntimeResourceFetchMetadata.Serialization.cs @@ -18,6 +18,15 @@ public partial class InformaticaRuntimeResourceFetchMetadata : IUtf8JsonSerializ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wr throw new FormatException($"The model {nameof(InformaticaRuntimeResourceFetchMetadata)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); writer.WritePropertyName("createdTime"u8); @@ -68,7 +76,6 @@ void IJsonModel.Write(Utf8JsonWriter wr #endif } } - writer.WriteEndObject(); } InformaticaRuntimeResourceFetchMetadata IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/InformaticaServerlessFetchConfigProperties.Serialization.cs b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/InformaticaServerlessFetchConfigProperties.Serialization.cs index d73d1b57a226..fc6b72f9666b 100644 --- a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/InformaticaServerlessFetchConfigProperties.Serialization.cs +++ b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/InformaticaServerlessFetchConfigProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class InformaticaServerlessFetchConfigProperties : IUtf8JsonSeria void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(InformaticaServerlessFetchConfigProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Subnet)) { writer.WritePropertyName("subnet"u8); @@ -111,7 +119,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } InformaticaServerlessFetchConfigProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/InformaticaServerlessRuntimePatch.Serialization.cs b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/InformaticaServerlessRuntimePatch.Serialization.cs index 871b2596fec2..0a8436086549 100644 --- a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/InformaticaServerlessRuntimePatch.Serialization.cs +++ b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/InformaticaServerlessRuntimePatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class InformaticaServerlessRuntimePatch : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(InformaticaServerlessRuntimePatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } InformaticaServerlessRuntimePatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/InformaticaServerlessRuntimeProperties.Serialization.cs b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/InformaticaServerlessRuntimeProperties.Serialization.cs index fc563e168ec2..ec37fabe638d 100644 --- a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/InformaticaServerlessRuntimeProperties.Serialization.cs +++ b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/InformaticaServerlessRuntimeProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class InformaticaServerlessRuntimeProperties : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(InformaticaServerlessRuntimeProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) { writer.WritePropertyName("provisioningState"u8); @@ -113,7 +121,6 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } InformaticaServerlessRuntimeProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/InformaticaServerlessRuntimeResourceList.Serialization.cs b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/InformaticaServerlessRuntimeResourceList.Serialization.cs index e6dc80e29191..cf688af5ae72 100644 --- a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/InformaticaServerlessRuntimeResourceList.Serialization.cs +++ b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/InformaticaServerlessRuntimeResourceList.Serialization.cs @@ -18,6 +18,15 @@ public partial class InformaticaServerlessRuntimeResourceList : IUtf8JsonSeriali void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter w throw new FormatException($"The model {nameof(InformaticaServerlessRuntimeResourceList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("informaticaRuntimeResources"u8); writer.WriteStartArray(); foreach (var item in InformaticaRuntimeResources) @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter w #endif } } - writer.WriteEndObject(); } InformaticaServerlessRuntimeResourceList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/InformaticaServerlessRuntimeResourceListResult.Serialization.cs b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/InformaticaServerlessRuntimeResourceListResult.Serialization.cs index d18b347016de..18be5be2229a 100644 --- a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/InformaticaServerlessRuntimeResourceListResult.Serialization.cs +++ b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/InformaticaServerlessRuntimeResourceListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class InformaticaServerlessRuntimeResourceListResult : IUtf8Jso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWr throw new FormatException($"The model {nameof(InformaticaServerlessRuntimeResourceListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWr #endif } } - writer.WriteEndObject(); } InformaticaServerlessRuntimeResourceListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/InformaticaUserDetails.Serialization.cs b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/InformaticaUserDetails.Serialization.cs index 38546066ebb8..a59e93144956 100644 --- a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/InformaticaUserDetails.Serialization.cs +++ b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/InformaticaUserDetails.Serialization.cs @@ -18,6 +18,15 @@ public partial class InformaticaUserDetails : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(InformaticaUserDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(FirstName)) { writer.WritePropertyName("firstName"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } InformaticaUserDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/InformaticaUserDetailsUpdate.Serialization.cs b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/InformaticaUserDetailsUpdate.Serialization.cs index 0d42a0a79d75..6ab231f78923 100644 --- a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/InformaticaUserDetailsUpdate.Serialization.cs +++ b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/InformaticaUserDetailsUpdate.Serialization.cs @@ -18,6 +18,15 @@ public partial class InformaticaUserDetailsUpdate : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(InformaticaUserDetailsUpdate)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(FirstName)) { writer.WritePropertyName("firstName"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } InformaticaUserDetailsUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/LinkOrganization.Serialization.cs b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/LinkOrganization.Serialization.cs index 800d2a79560e..6cdbded66b97 100644 --- a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/LinkOrganization.Serialization.cs +++ b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/LinkOrganization.Serialization.cs @@ -18,6 +18,15 @@ internal partial class LinkOrganization : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(LinkOrganization)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Token)) { writer.WritePropertyName("token"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } LinkOrganization IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/ServerlessConfigProperties.Serialization.cs b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/ServerlessConfigProperties.Serialization.cs index 18c7a110f6a6..967db84bc6b2 100644 --- a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/ServerlessConfigProperties.Serialization.cs +++ b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/ServerlessConfigProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class ServerlessConfigProperties : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(ServerlessConfigProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Platform)) { writer.WritePropertyName("platform"u8); @@ -81,7 +89,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } ServerlessConfigProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/ServerlessMetadataResponse.Serialization.cs b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/ServerlessMetadataResponse.Serialization.cs index 6b4b217f80f8..f75368cdf759 100644 --- a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/ServerlessMetadataResponse.Serialization.cs +++ b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/ServerlessMetadataResponse.Serialization.cs @@ -18,6 +18,15 @@ public partial class ServerlessMetadataResponse : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(ServerlessMetadataResponse)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(RuntimeType)) { writer.WritePropertyName("type"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } ServerlessMetadataResponse IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/ServerlessRuntimeConfigProperties.Serialization.cs b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/ServerlessRuntimeConfigProperties.Serialization.cs index 4f5eafb4801e..cad661a48c93 100644 --- a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/ServerlessRuntimeConfigProperties.Serialization.cs +++ b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/ServerlessRuntimeConfigProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class ServerlessRuntimeConfigProperties : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(ServerlessRuntimeConfigProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(CdiConfigProps)) { writer.WritePropertyName("cdiConfigProps"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } ServerlessRuntimeConfigProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/ServerlessRuntimeConfigPropertiesUpdate.Serialization.cs b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/ServerlessRuntimeConfigPropertiesUpdate.Serialization.cs index 9fb3a4132cef..d2c8f7f713f1 100644 --- a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/ServerlessRuntimeConfigPropertiesUpdate.Serialization.cs +++ b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/ServerlessRuntimeConfigPropertiesUpdate.Serialization.cs @@ -18,6 +18,15 @@ public partial class ServerlessRuntimeConfigPropertiesUpdate : IUtf8JsonSerializ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wr throw new FormatException($"The model {nameof(ServerlessRuntimeConfigPropertiesUpdate)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(CdiConfigProps)) { writer.WritePropertyName("cdiConfigProps"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter wr #endif } } - writer.WriteEndObject(); } ServerlessRuntimeConfigPropertiesUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/ServerlessRuntimeDependency.Serialization.cs b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/ServerlessRuntimeDependency.Serialization.cs index baea546a45ed..1f937e7a59cc 100644 --- a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/ServerlessRuntimeDependency.Serialization.cs +++ b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/ServerlessRuntimeDependency.Serialization.cs @@ -18,6 +18,15 @@ public partial class ServerlessRuntimeDependency : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(ServerlessRuntimeDependency)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("id"u8); writer.WriteStringValue(Id); writer.WritePropertyName("appContextId"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } ServerlessRuntimeDependency IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/ServerlessRuntimeNetworkProfile.Serialization.cs b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/ServerlessRuntimeNetworkProfile.Serialization.cs index d61cf86d4a23..710a884b4821 100644 --- a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/ServerlessRuntimeNetworkProfile.Serialization.cs +++ b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/ServerlessRuntimeNetworkProfile.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ServerlessRuntimeNetworkProfile : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(ServerlessRuntimeNetworkProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("networkInterfaceConfiguration"u8); writer.WriteObjectValue(NetworkInterfaceConfiguration, options); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } ServerlessRuntimeNetworkProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/ServerlessRuntimeNetworkProfileUpdate.Serialization.cs b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/ServerlessRuntimeNetworkProfileUpdate.Serialization.cs index d581226d1dec..3afea9ca1413 100644 --- a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/ServerlessRuntimeNetworkProfileUpdate.Serialization.cs +++ b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/ServerlessRuntimeNetworkProfileUpdate.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ServerlessRuntimeNetworkProfileUpdate : IUtf8JsonSerializ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(ServerlessRuntimeNetworkProfileUpdate)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("networkInterfaceConfiguration"u8); writer.WriteObjectValue(NetworkInterfaceConfiguration, options); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } ServerlessRuntimeNetworkProfileUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/ServerlessRuntimePropertiesUpdate.Serialization.cs b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/ServerlessRuntimePropertiesUpdate.Serialization.cs index 5bcde39f312a..dc6c5e042cbd 100644 --- a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/ServerlessRuntimePropertiesUpdate.Serialization.cs +++ b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/ServerlessRuntimePropertiesUpdate.Serialization.cs @@ -18,6 +18,15 @@ public partial class ServerlessRuntimePropertiesUpdate : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(ServerlessRuntimePropertiesUpdate)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Description)) { writer.WritePropertyName("description"u8); @@ -111,7 +119,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } ServerlessRuntimePropertiesUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/ServerlessRuntimeTag.Serialization.cs b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/ServerlessRuntimeTag.Serialization.cs index f45cbda6b5aa..25aff8297bae 100644 --- a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/ServerlessRuntimeTag.Serialization.cs +++ b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/ServerlessRuntimeTag.Serialization.cs @@ -18,6 +18,15 @@ public partial class ServerlessRuntimeTag : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(ServerlessRuntimeTag)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } ServerlessRuntimeTag IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/ServerlessRuntimeUserContextProperties.Serialization.cs b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/ServerlessRuntimeUserContextProperties.Serialization.cs index 36c574e5cb3b..3fe21689f896 100644 --- a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/ServerlessRuntimeUserContextProperties.Serialization.cs +++ b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/ServerlessRuntimeUserContextProperties.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ServerlessRuntimeUserContextProperties : IUtf8JsonSeriali void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(ServerlessRuntimeUserContextProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("userContextToken"u8); writer.WriteStringValue(UserContextToken); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } ServerlessRuntimeUserContextProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/ServerlessRuntimeUserContextPropertiesUpdate.Serialization.cs b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/ServerlessRuntimeUserContextPropertiesUpdate.Serialization.cs index d0f6c504fd8c..68c69d19c4a2 100644 --- a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/ServerlessRuntimeUserContextPropertiesUpdate.Serialization.cs +++ b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/ServerlessRuntimeUserContextPropertiesUpdate.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ServerlessRuntimeUserContextPropertiesUpdate : IUtf8JsonS void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWrit throw new FormatException($"The model {nameof(ServerlessRuntimeUserContextPropertiesUpdate)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(UserContextToken)) { writer.WritePropertyName("userContextToken"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWrit #endif } } - writer.WriteEndObject(); } ServerlessRuntimeUserContextPropertiesUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/RestOperations/OrganizationsRestOperations.cs b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/RestOperations/OrganizationsRestOperations.cs index de1364c5bbae..01105766ae08 100644 --- a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/RestOperations/OrganizationsRestOperations.cs +++ b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/RestOperations/OrganizationsRestOperations.cs @@ -25,7 +25,7 @@ internal partial class OrganizationsRestOperations /// Initializes a new instance of OrganizationsRestOperations. /// The HTTP pipeline for sending and receiving REST requests and responses. /// The application id to use for user agent. - /// The to use. + /// Service host. /// The API version to use for this operation. /// or is null. public OrganizationsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) diff --git a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/RestOperations/ServerlessRuntimesRestOperations.cs b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/RestOperations/ServerlessRuntimesRestOperations.cs index 1b5a162dd82a..22b6a2fbd1fc 100644 --- a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/RestOperations/ServerlessRuntimesRestOperations.cs +++ b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/RestOperations/ServerlessRuntimesRestOperations.cs @@ -25,7 +25,7 @@ internal partial class ServerlessRuntimesRestOperations /// Initializes a new instance of ServerlessRuntimesRestOperations. /// The HTTP pipeline for sending and receiving REST requests and responses. /// The application id to use for user agent. - /// The to use. + /// Service host. /// The API version to use for this operation. /// or is null. public ServerlessRuntimesRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) diff --git a/sdk/iot/Azure.ResourceManager.IotFirmwareDefense/samples/Generated/Samples/Sample_IotFirmwareCollection.cs b/sdk/iot/Azure.ResourceManager.IotFirmwareDefense/samples/Generated/Samples/Sample_IotFirmwareCollection.cs index 83464a2b3630..0c4ab263294c 100644 --- a/sdk/iot/Azure.ResourceManager.IotFirmwareDefense/samples/Generated/Samples/Sample_IotFirmwareCollection.cs +++ b/sdk/iot/Azure.ResourceManager.IotFirmwareDefense/samples/Generated/Samples/Sample_IotFirmwareCollection.cs @@ -122,7 +122,7 @@ public async Task CreateOrUpdate_FirmwaresCreateMaximumSetGen() Model = "f", Version = "s", Description = "uz", - FileSize = 17, + FileSize = 17L, Status = FirmwareAnalysisStatus.Pending, StatusMessages = { diff --git a/sdk/iot/Azure.ResourceManager.IotFirmwareDefense/samples/Generated/Samples/Sample_IotFirmwareResource.cs b/sdk/iot/Azure.ResourceManager.IotFirmwareDefense/samples/Generated/Samples/Sample_IotFirmwareResource.cs index 191557d2f3ce..41c77d78e747 100644 --- a/sdk/iot/Azure.ResourceManager.IotFirmwareDefense/samples/Generated/Samples/Sample_IotFirmwareResource.cs +++ b/sdk/iot/Azure.ResourceManager.IotFirmwareDefense/samples/Generated/Samples/Sample_IotFirmwareResource.cs @@ -293,7 +293,7 @@ public async Task Update_FirmwaresUpdateMaximumSetGen() Model = "f", Version = "s", Description = "uz", - FileSize = 17, + FileSize = 17L, Status = FirmwareAnalysisStatus.Pending, StatusMessages = { diff --git a/sdk/iothub/Azure.ResourceManager.IotHub/CHANGELOG.md b/sdk/iothub/Azure.ResourceManager.IotHub/CHANGELOG.md index ca5fa42e4758..5991e5dd1ed7 100644 --- a/sdk/iothub/Azure.ResourceManager.IotHub/CHANGELOG.md +++ b/sdk/iothub/Azure.ResourceManager.IotHub/CHANGELOG.md @@ -1,17 +1,22 @@ # Release History -## 1.2.0-beta.1 (Unreleased) +## 1.2.0-beta.2 (Unreleased) ### Features Added -- Enable the new model serialization by using the System.ClientModel, refer this [document](https://aka.ms/azsdk/net/mrw) for more details. - ### Breaking Changes ### Bugs Fixed ### Other Changes +## 1.2.0-beta.1 (2024-10-15) + +### Features Added + +- Enable the new model serialization by using the System.ClientModel, refer this [document](https://aka.ms/azsdk/net/mrw) for more details. +- Exposed `JsonModelWriteCore` for model serialization procedure. + ## 1.1.1 (2023-11-29) ### Features Added diff --git a/sdk/iothub/Azure.ResourceManager.IotHub/api/Azure.ResourceManager.IotHub.netstandard2.0.cs b/sdk/iothub/Azure.ResourceManager.IotHub/api/Azure.ResourceManager.IotHub.netstandard2.0.cs index ef897596618e..2e76d3b7c17c 100644 --- a/sdk/iothub/Azure.ResourceManager.IotHub/api/Azure.ResourceManager.IotHub.netstandard2.0.cs +++ b/sdk/iothub/Azure.ResourceManager.IotHub/api/Azure.ResourceManager.IotHub.netstandard2.0.cs @@ -22,6 +22,7 @@ public partial class EventHubConsumerGroupInfoData : Azure.ResourceManager.Model internal EventHubConsumerGroupInfoData() { } public Azure.ETag? ETag { get { throw null; } } public System.Collections.Generic.IReadOnlyDictionary Properties { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.IotHub.EventHubConsumerGroupInfoData 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.IotHub.EventHubConsumerGroupInfoData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -69,6 +70,7 @@ public partial class IotHubCertificateDescriptionData : Azure.ResourceManager.Mo public IotHubCertificateDescriptionData() { } public Azure.ETag? ETag { get { throw null; } } public Azure.ResourceManager.IotHub.Models.IotHubCertificateProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.IotHub.IotHubCertificateDescriptionData 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.IotHub.IotHubCertificateDescriptionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -122,6 +124,7 @@ public IotHubDescriptionData(Azure.Core.AzureLocation location, Azure.ResourceMa public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public Azure.ResourceManager.IotHub.Models.IotHubProperties Properties { get { throw null; } set { } } public Azure.ResourceManager.IotHub.Models.IotHubSkuInfo Sku { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.IotHub.IotHubDescriptionData 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.IotHub.IotHubDescriptionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -229,6 +232,7 @@ public partial class IotHubPrivateEndpointConnectionData : Azure.ResourceManager { public IotHubPrivateEndpointConnectionData(Azure.ResourceManager.IotHub.Models.IotHubPrivateEndpointConnectionProperties properties) { } public Azure.ResourceManager.IotHub.Models.IotHubPrivateEndpointConnectionProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.IotHub.IotHubPrivateEndpointConnectionData 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.IotHub.IotHubPrivateEndpointConnectionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -273,6 +277,7 @@ public partial class IotHubPrivateEndpointGroupInformationData : Azure.ResourceM { internal IotHubPrivateEndpointGroupInformationData() { } public Azure.ResourceManager.IotHub.Models.IotHubPrivateEndpointGroupInformationProperties Properties { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.IotHub.IotHubPrivateEndpointGroupInformationData 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.IotHub.IotHubPrivateEndpointGroupInformationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -367,6 +372,7 @@ public CloudToDeviceFeedbackQueueProperties() { } public System.TimeSpan? LockDurationAsIso8601 { get { throw null; } set { } } public int? MaxDeliveryCount { get { throw null; } set { } } public System.TimeSpan? TtlAsIso8601 { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.IotHub.Models.CloudToDeviceFeedbackQueueProperties 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.IotHub.Models.CloudToDeviceFeedbackQueueProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -379,6 +385,7 @@ public CloudToDeviceProperties() { } public System.TimeSpan? DefaultTtlAsIso8601 { get { throw null; } set { } } public Azure.ResourceManager.IotHub.Models.CloudToDeviceFeedbackQueueProperties Feedback { get { throw null; } set { } } public int? MaxDeliveryCount { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.IotHub.Models.CloudToDeviceProperties 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.IotHub.Models.CloudToDeviceProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -393,6 +400,7 @@ public EventHubCompatibleEndpointProperties() { } public int? PartitionCount { get { throw null; } set { } } public System.Collections.Generic.IReadOnlyList PartitionIds { get { throw null; } } public long? RetentionTimeInDays { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.IotHub.Models.EventHubCompatibleEndpointProperties 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.IotHub.Models.EventHubCompatibleEndpointProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -403,6 +411,7 @@ public partial class EventHubConsumerGroupInfoCreateOrUpdateContent : System.Cli { public EventHubConsumerGroupInfoCreateOrUpdateContent(string name) { } public string Name { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.IotHub.Models.EventHubConsumerGroupInfoCreateOrUpdateContent 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.IotHub.Models.EventHubConsumerGroupInfoCreateOrUpdateContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -419,6 +428,7 @@ public ExportDevicesContent(System.Uri exportBlobContainerUri, bool excludeKeys) public string ExportBlobName { get { throw null; } set { } } public bool? IncludeConfigurations { get { throw null; } set { } } public Azure.Core.ResourceIdentifier UserAssignedIdentity { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.IotHub.Models.ExportDevicesContent 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.IotHub.Models.ExportDevicesContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -468,6 +478,7 @@ internal IotHubCapacity() { } public long? Maximum { get { throw null; } } public long? Minimum { get { throw null; } } public Azure.ResourceManager.IotHub.Models.IotHubScaleType? ScaleType { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.IotHub.Models.IotHubCapacity 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.IotHub.Models.IotHubCapacity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -487,6 +498,7 @@ public IotHubCertificateProperties() { } public System.BinaryData Thumbprint { get { throw null; } } public string ThumbprintString { get { throw null; } } public System.DateTimeOffset? UpdatedOn { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.IotHub.Models.IotHubCertificateProperties 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.IotHub.Models.IotHubCertificateProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -507,6 +519,7 @@ internal IotHubCertificatePropertiesWithNonce() { } public string ThumbprintString { get { throw null; } } public System.DateTimeOffset? UpdatedOn { get { throw null; } } public string VerificationCode { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.IotHub.Models.IotHubCertificatePropertiesWithNonce 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.IotHub.Models.IotHubCertificatePropertiesWithNonce System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -517,6 +530,7 @@ public partial class IotHubCertificateVerificationContent : System.ClientModel.P { public IotHubCertificateVerificationContent() { } public System.BinaryData Certificate { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.IotHub.Models.IotHubCertificateVerificationContent 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.IotHub.Models.IotHubCertificateVerificationContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -528,6 +542,7 @@ public partial class IotHubCertificateWithNonceDescription : Azure.ResourceManag internal IotHubCertificateWithNonceDescription() { } public Azure.ETag? ETag { get { throw null; } } public Azure.ResourceManager.IotHub.Models.IotHubCertificatePropertiesWithNonce Properties { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.IotHub.Models.IotHubCertificateWithNonceDescription 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.IotHub.Models.IotHubCertificateWithNonceDescription System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -538,6 +553,7 @@ public partial class IotHubDescriptionPatch : System.ClientModel.Primitives.IJso { public IotHubDescriptionPatch() { } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.IotHub.Models.IotHubDescriptionPatch 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.IotHub.Models.IotHubDescriptionPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -553,6 +569,7 @@ internal IotHubEndpointHealthInfo() { } public System.DateTimeOffset? LastKnownErrorOn { get { throw null; } } public System.DateTimeOffset? LastSendAttemptOn { get { throw null; } } public System.DateTimeOffset? LastSuccessfulSendAttemptOn { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.IotHub.Models.IotHubEndpointHealthInfo 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.IotHub.Models.IotHubEndpointHealthInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -586,6 +603,7 @@ public IotHubEnrichmentProperties(string key, string value, System.Collections.G public System.Collections.Generic.IList EndpointNames { get { throw null; } } public string Key { get { throw null; } set { } } public string Value { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.IotHub.Models.IotHubEnrichmentProperties 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.IotHub.Models.IotHubEnrichmentProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -596,6 +614,7 @@ public partial class IotHubFailoverContent : System.ClientModel.Primitives.IJson { public IotHubFailoverContent(string failoverRegion) { } public string FailoverRegion { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.IotHub.Models.IotHubFailoverContent 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.IotHub.Models.IotHubFailoverContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -610,6 +629,7 @@ public IotHubFallbackRouteProperties(Azure.ResourceManager.IotHub.Models.IotHubR public bool IsEnabled { get { throw null; } set { } } public string Name { get { throw null; } set { } } public Azure.ResourceManager.IotHub.Models.IotHubRoutingSource Source { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.IotHub.Models.IotHubFallbackRouteProperties 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.IotHub.Models.IotHubFallbackRouteProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -627,6 +647,7 @@ public IotHubImportDevicesContent(System.Uri inputBlobContainerUri, System.Uri o public System.Uri OutputBlobContainerUri { get { throw null; } } public string OutputBlobName { get { throw null; } set { } } public Azure.Core.ResourceIdentifier UserAssignedIdentity { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.IotHub.Models.IotHubImportDevicesContent 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.IotHub.Models.IotHubImportDevicesContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -644,6 +665,7 @@ public IotHubIPFilterRule(string filterName, Azure.ResourceManager.IotHub.Models public Azure.ResourceManager.IotHub.Models.IotHubIPFilterActionType Action { get { throw null; } set { } } public string FilterName { get { throw null; } set { } } public string IPMask { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.IotHub.Models.IotHubIPFilterRule 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.IotHub.Models.IotHubIPFilterRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -661,6 +683,7 @@ internal IotHubJobInfo() { } public System.DateTimeOffset? StartOn { get { throw null; } } public Azure.ResourceManager.IotHub.Models.IotHubJobStatus? Status { get { throw null; } } public string StatusMessage { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.IotHub.Models.IotHubJobInfo 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.IotHub.Models.IotHubJobInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -707,6 +730,7 @@ public partial class IotHubLocationDescription : System.ClientModel.Primitives.I internal IotHubLocationDescription() { } public Azure.Core.AzureLocation? Location { get { throw null; } } public Azure.ResourceManager.IotHub.Models.IotHubReplicaRoleType? Role { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.IotHub.Models.IotHubLocationDescription 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.IotHub.Models.IotHubLocationDescription System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -717,6 +741,7 @@ public partial class IotHubMatchedRoute : System.ClientModel.Primitives.IJsonMod { internal IotHubMatchedRoute() { } public Azure.ResourceManager.IotHub.Models.RoutingRuleProperties Properties { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.IotHub.Models.IotHubMatchedRoute 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.IotHub.Models.IotHubMatchedRoute System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -727,6 +752,7 @@ public partial class IotHubNameAvailabilityContent : System.ClientModel.Primitiv { public IotHubNameAvailabilityContent(string name) { } public string Name { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.IotHub.Models.IotHubNameAvailabilityContent 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.IotHub.Models.IotHubNameAvailabilityContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -739,6 +765,7 @@ internal IotHubNameAvailabilityResponse() { } public bool? IsNameAvailable { get { throw null; } } public string Message { get { throw null; } } public Azure.ResourceManager.IotHub.Models.IotHubNameUnavailableReason? Reason { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.IotHub.Models.IotHubNameAvailabilityResponse 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.IotHub.Models.IotHubNameAvailabilityResponse System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -791,6 +818,7 @@ public IotHubNetworkRuleSetIPRule(string filterName, string ipMask) { } public Azure.ResourceManager.IotHub.Models.IotHubNetworkRuleIPAction? Action { get { throw null; } set { } } public string FilterName { get { throw null; } set { } } public string IPMask { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.IotHub.Models.IotHubNetworkRuleSetIPRule 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.IotHub.Models.IotHubNetworkRuleSetIPRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -803,6 +831,7 @@ public IotHubNetworkRuleSetProperties(bool applyToBuiltInEventHubEndpoint, Syste public bool ApplyToBuiltInEventHubEndpoint { get { throw null; } set { } } public Azure.ResourceManager.IotHub.Models.IotHubNetworkRuleSetDefaultAction? DefaultAction { get { throw null; } set { } } public System.Collections.Generic.IList IPRules { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.IotHub.Models.IotHubNetworkRuleSetProperties 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.IotHub.Models.IotHubNetworkRuleSetProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -814,6 +843,7 @@ public partial class IotHubPrivateEndpointConnectionProperties : System.ClientMo public IotHubPrivateEndpointConnectionProperties(Azure.ResourceManager.IotHub.Models.IotHubPrivateLinkServiceConnectionState connectionState) { } public Azure.ResourceManager.IotHub.Models.IotHubPrivateLinkServiceConnectionState ConnectionState { get { throw null; } set { } } public Azure.Core.ResourceIdentifier PrivateEndpointId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.IotHub.Models.IotHubPrivateEndpointConnectionProperties 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.IotHub.Models.IotHubPrivateEndpointConnectionProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -826,6 +856,7 @@ internal IotHubPrivateEndpointGroupInformationProperties() { } public string GroupId { get { throw null; } } public System.Collections.Generic.IReadOnlyList RequiredDnsZoneNames { get { throw null; } } public System.Collections.Generic.IReadOnlyList RequiredMembers { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.IotHub.Models.IotHubPrivateEndpointGroupInformationProperties 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.IotHub.Models.IotHubPrivateEndpointGroupInformationProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -838,6 +869,7 @@ public IotHubPrivateLinkServiceConnectionState(Azure.ResourceManager.IotHub.Mode public string ActionsRequired { get { throw null; } set { } } public string Description { get { throw null; } set { } } public Azure.ResourceManager.IotHub.Models.IotHubPrivateLinkServiceConnectionStatus Status { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.IotHub.Models.IotHubPrivateLinkServiceConnectionState 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.IotHub.Models.IotHubPrivateLinkServiceConnectionState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -891,6 +923,7 @@ public IotHubProperties() { } public Azure.ResourceManager.IotHub.Models.IotHubRoutingProperties Routing { get { throw null; } set { } } public string State { get { throw null; } } public System.Collections.Generic.IDictionary StorageEndpoints { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.IotHub.Models.IotHubProperties 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.IotHub.Models.IotHubProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -921,6 +954,7 @@ internal IotHubQuotaMetricInfo() { } public long? CurrentValue { get { throw null; } } public long? MaxValue { get { throw null; } } public string Name { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.IotHub.Models.IotHubQuotaMetricInfo 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.IotHub.Models.IotHubQuotaMetricInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -933,6 +967,7 @@ internal IotHubRegistryStatistics() { } public long? DisabledDeviceCount { get { throw null; } } public long? EnabledDeviceCount { get { throw null; } } public long? TotalDeviceCount { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.IotHub.Models.IotHubRegistryStatistics 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.IotHub.Models.IotHubRegistryStatistics System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -964,6 +999,7 @@ public IotHubRoutingProperties() { } public System.Collections.Generic.IList Enrichments { get { throw null; } } public Azure.ResourceManager.IotHub.Models.IotHubFallbackRouteProperties FallbackRoute { get { throw null; } set { } } public System.Collections.Generic.IList Routes { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.IotHub.Models.IotHubRoutingProperties 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.IotHub.Models.IotHubRoutingProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1045,6 +1081,7 @@ internal IotHubSkuDescription() { } public Azure.ResourceManager.IotHub.Models.IotHubCapacity Capacity { get { throw null; } } public Azure.Core.ResourceType? ResourceType { get { throw null; } } public Azure.ResourceManager.IotHub.Models.IotHubSkuInfo Sku { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.IotHub.Models.IotHubSkuDescription 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.IotHub.Models.IotHubSkuDescription System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1057,6 +1094,7 @@ public IotHubSkuInfo(Azure.ResourceManager.IotHub.Models.IotHubSku name) { } public long? Capacity { get { throw null; } set { } } public Azure.ResourceManager.IotHub.Models.IotHubSku Name { get { throw null; } set { } } public Azure.ResourceManager.IotHub.Models.IotHubSkuTier? Tier { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.IotHub.Models.IotHubSkuInfo 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.IotHub.Models.IotHubSkuInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1077,6 +1115,7 @@ public IotHubStorageEndpointProperties(string connectionString, string container public string ContainerName { get { throw null; } set { } } public System.TimeSpan? SasTtlAsIso8601 { get { throw null; } set { } } public Azure.Core.ResourceIdentifier UserAssignedIdentity { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.IotHub.Models.IotHubStorageEndpointProperties 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.IotHub.Models.IotHubStorageEndpointProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1089,6 +1128,7 @@ public IotHubTestAllRoutesContent() { } public Azure.ResourceManager.IotHub.Models.RoutingMessage Message { get { throw null; } set { } } public Azure.ResourceManager.IotHub.Models.IotHubRoutingSource? RoutingSource { get { throw null; } set { } } public Azure.ResourceManager.IotHub.Models.RoutingTwin Twin { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.IotHub.Models.IotHubTestAllRoutesContent 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.IotHub.Models.IotHubTestAllRoutesContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1099,6 +1139,7 @@ public partial class IotHubTestAllRoutesResult : System.ClientModel.Primitives.I { internal IotHubTestAllRoutesResult() { } public System.Collections.Generic.IReadOnlyList Routes { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.IotHub.Models.IotHubTestAllRoutesResult 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.IotHub.Models.IotHubTestAllRoutesResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1130,6 +1171,7 @@ public IotHubTestRouteContent(Azure.ResourceManager.IotHub.Models.RoutingRulePro public Azure.ResourceManager.IotHub.Models.RoutingMessage Message { get { throw null; } set { } } public Azure.ResourceManager.IotHub.Models.RoutingRuleProperties Route { get { throw null; } } public Azure.ResourceManager.IotHub.Models.RoutingTwin Twin { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.IotHub.Models.IotHubTestRouteContent 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.IotHub.Models.IotHubTestRouteContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1141,6 +1183,7 @@ public partial class IotHubTestRouteResult : System.ClientModel.Primitives.IJson internal IotHubTestRouteResult() { } public System.Collections.Generic.IReadOnlyList DetailsCompilationErrors { get { throw null; } } public Azure.ResourceManager.IotHub.Models.IotHubTestResultStatus? Result { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.IotHub.Models.IotHubTestRouteResult 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.IotHub.Models.IotHubTestRouteResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1152,6 +1195,7 @@ public partial class IotHubTypeName : 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.IotHub.Models.IotHubTypeName System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1167,6 +1211,7 @@ internal IotHubUserSubscriptionQuota() { } public Azure.ResourceManager.IotHub.Models.IotHubTypeName Name { get { throw null; } } public string Unit { get { throw null; } } public string UserSubscriptionQuotaType { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.IotHub.Models.IotHubUserSubscriptionQuota 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.IotHub.Models.IotHubUserSubscriptionQuota System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1179,6 +1224,7 @@ public MessagingEndpointProperties() { } public System.TimeSpan? LockDurationAsIso8601 { get { throw null; } set { } } public int? MaxDeliveryCount { get { throw null; } set { } } public System.TimeSpan? TtlAsIso8601 { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.IotHub.Models.MessagingEndpointProperties 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.IotHub.Models.MessagingEndpointProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1191,6 +1237,7 @@ internal RouteCompilationError() { } public Azure.ResourceManager.IotHub.Models.RouteErrorRange Location { get { throw null; } } public string Message { get { throw null; } } public Azure.ResourceManager.IotHub.Models.RouteErrorSeverity? Severity { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.IotHub.Models.RouteCompilationError 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.IotHub.Models.RouteCompilationError System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1202,6 +1249,7 @@ public partial class RouteErrorPosition : System.ClientModel.Primitives.IJsonMod internal RouteErrorPosition() { } public int? Column { get { throw null; } } public int? Line { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.IotHub.Models.RouteErrorPosition 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.IotHub.Models.RouteErrorPosition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1213,6 +1261,7 @@ public partial class RouteErrorRange : System.ClientModel.Primitives.IJsonModel< internal RouteErrorRange() { } public Azure.ResourceManager.IotHub.Models.RouteErrorPosition End { get { throw null; } } public Azure.ResourceManager.IotHub.Models.RouteErrorPosition Start { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.IotHub.Models.RouteErrorRange 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.IotHub.Models.RouteErrorRange System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1253,6 +1302,7 @@ public RoutingCosmosDBSqlApiProperties(string name, System.Uri endpointUri, stri public string SecondaryKey { get { throw null; } set { } } public string SubscriptionId { get { throw null; } set { } } public Azure.Core.ResourceIdentifier UserAssignedIdentity { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.IotHub.Models.RoutingCosmosDBSqlApiProperties 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.IotHub.Models.RoutingCosmosDBSqlApiProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1267,6 +1317,7 @@ public RoutingEndpoints() { } public System.Collections.Generic.IList ServiceBusQueues { get { throw null; } } public System.Collections.Generic.IList ServiceBusTopics { get { throw null; } } public System.Collections.Generic.IList StorageContainers { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.IotHub.Models.RoutingEndpoints 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.IotHub.Models.RoutingEndpoints System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1285,6 +1336,7 @@ public RoutingEventHubProperties(string name) { } public string ResourceGroup { get { throw null; } set { } } public string SubscriptionId { get { throw null; } set { } } public Azure.Core.ResourceIdentifier UserAssignedIdentity { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.IotHub.Models.RoutingEventHubProperties 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.IotHub.Models.RoutingEventHubProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1297,6 +1349,7 @@ public RoutingMessage() { } public System.Collections.Generic.IDictionary AppProperties { get { throw null; } } public string Body { get { throw null; } set { } } public System.Collections.Generic.IDictionary SystemProperties { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.IotHub.Models.RoutingMessage 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.IotHub.Models.RoutingMessage System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1311,6 +1364,7 @@ public RoutingRuleProperties(string name, Azure.ResourceManager.IotHub.Models.Io public bool IsEnabled { get { throw null; } set { } } public string Name { get { throw null; } set { } } public Azure.ResourceManager.IotHub.Models.IotHubRoutingSource Source { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.IotHub.Models.RoutingRuleProperties 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.IotHub.Models.RoutingRuleProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1329,6 +1383,7 @@ public RoutingServiceBusQueueEndpointProperties(string name) { } public string ResourceGroup { get { throw null; } set { } } public string SubscriptionId { get { throw null; } set { } } public Azure.Core.ResourceIdentifier UserAssignedIdentity { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.IotHub.Models.RoutingServiceBusQueueEndpointProperties 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.IotHub.Models.RoutingServiceBusQueueEndpointProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1347,6 +1402,7 @@ public RoutingServiceBusTopicEndpointProperties(string name) { } public string ResourceGroup { get { throw null; } set { } } public string SubscriptionId { get { throw null; } set { } } public Azure.Core.ResourceIdentifier UserAssignedIdentity { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.IotHub.Models.RoutingServiceBusTopicEndpointProperties 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.IotHub.Models.RoutingServiceBusTopicEndpointProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1369,6 +1425,7 @@ public RoutingStorageContainerProperties(string name, string containerName) { } public string ResourceGroup { get { throw null; } set { } } public string SubscriptionId { get { throw null; } set { } } public Azure.Core.ResourceIdentifier UserAssignedIdentity { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.IotHub.Models.RoutingStorageContainerProperties 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.IotHub.Models.RoutingStorageContainerProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1399,6 +1456,7 @@ public partial class RoutingTwin : 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.IotHub.Models.RoutingTwin System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1410,6 +1468,7 @@ public partial class RoutingTwinProperties : System.ClientModel.Primitives.IJson public RoutingTwinProperties() { } public System.BinaryData Desired { get { throw null; } set { } } public System.BinaryData Reported { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.IotHub.Models.RoutingTwinProperties 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.IotHub.Models.RoutingTwinProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1423,6 +1482,7 @@ public SharedAccessSignatureAuthorizationRule(string keyName, Azure.ResourceMana public string PrimaryKey { get { throw null; } set { } } public Azure.ResourceManager.IotHub.Models.IotHubSharedAccessRight Rights { get { throw null; } set { } } public string SecondaryKey { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.IotHub.Models.SharedAccessSignatureAuthorizationRule 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.IotHub.Models.SharedAccessSignatureAuthorizationRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } diff --git a/sdk/iothub/Azure.ResourceManager.IotHub/assets.json b/sdk/iothub/Azure.ResourceManager.IotHub/assets.json index 710e51fcefee..1050db6eb39f 100644 --- a/sdk/iothub/Azure.ResourceManager.IotHub/assets.json +++ b/sdk/iothub/Azure.ResourceManager.IotHub/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/iothub/Azure.ResourceManager.IotHub", - "Tag": "net/iothub/Azure.ResourceManager.IotHub_6b8d256cfa" + "Tag": "net/iothub/Azure.ResourceManager.IotHub_91b8297e14" } diff --git a/sdk/iothub/Azure.ResourceManager.IotHub/samples/Generated/Samples/Sample_IotHubDescriptionCollection.cs b/sdk/iothub/Azure.ResourceManager.IotHub/samples/Generated/Samples/Sample_IotHubDescriptionCollection.cs index 0b4724a8db1d..83a2603de3f9 100644 --- a/sdk/iothub/Azure.ResourceManager.IotHub/samples/Generated/Samples/Sample_IotHubDescriptionCollection.cs +++ b/sdk/iothub/Azure.ResourceManager.IotHub/samples/Generated/Samples/Sample_IotHubDescriptionCollection.cs @@ -150,7 +150,7 @@ public async Task CreateOrUpdate_IotHubResourceAddCosmosDbEndpoint() string resourceName = "testHub"; IotHubDescriptionData data = new IotHubDescriptionData(new AzureLocation("centraluseuap"), new IotHubSkuInfo(IotHubSku.S1) { - Capacity = 1, + Capacity = 1L, }) { ETag = new ETag("AAAAAAFD6M4="), @@ -177,7 +177,7 @@ public async Task CreateOrUpdate_IotHubResourceAddCosmosDbEndpoint() { ["events"] = new EventHubCompatibleEndpointProperties() { -RetentionTimeInDays = 1, +RetentionTimeInDays = 1L, PartitionCount = 2, }, }, @@ -295,7 +295,7 @@ public async Task CreateOrUpdate_IotHubResourceCreateOrUpdate() string resourceName = "testHub"; IotHubDescriptionData data = new IotHubDescriptionData(new AzureLocation("centraluseuap"), new IotHubSkuInfo(IotHubSku.S1) { - Capacity = 1, + Capacity = 1L, }) { ETag = new ETag("AAAAAAFD6M4="), @@ -322,7 +322,7 @@ public async Task CreateOrUpdate_IotHubResourceCreateOrUpdate() { ["events"] = new EventHubCompatibleEndpointProperties() { -RetentionTimeInDays = 1, +RetentionTimeInDays = 1L, PartitionCount = 2, }, }, diff --git a/sdk/iothub/Azure.ResourceManager.IotHub/src/Azure.ResourceManager.IotHub.csproj b/sdk/iothub/Azure.ResourceManager.IotHub/src/Azure.ResourceManager.IotHub.csproj index 11fb3ac5d77b..ad203efb18fd 100644 --- a/sdk/iothub/Azure.ResourceManager.IotHub/src/Azure.ResourceManager.IotHub.csproj +++ b/sdk/iothub/Azure.ResourceManager.IotHub/src/Azure.ResourceManager.IotHub.csproj @@ -1,6 +1,6 @@ - 1.2.0-beta.1 + 1.2.0-beta.2 1.1.1 Azure.ResourceManager.IotHub diff --git a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/EventHubConsumerGroupInfoData.Serialization.cs b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/EventHubConsumerGroupInfoData.Serialization.cs index 7042084e0962..cb3c91201ed6 100644 --- a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/EventHubConsumerGroupInfoData.Serialization.cs +++ b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/EventHubConsumerGroupInfoData.Serialization.cs @@ -19,6 +19,15 @@ public partial class EventHubConsumerGroupInfoData : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(EventHubConsumerGroupInfoData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(Properties)) { writer.WritePropertyName("properties"u8); @@ -62,42 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode writer.WriteNull("etag"); } } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } EventHubConsumerGroupInfoData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/IotHubCertificateDescriptionData.Serialization.cs b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/IotHubCertificateDescriptionData.Serialization.cs index e98f65090d2f..8174e4b471a3 100644 --- a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/IotHubCertificateDescriptionData.Serialization.cs +++ b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/IotHubCertificateDescriptionData.Serialization.cs @@ -20,6 +20,15 @@ public partial class IotHubCertificateDescriptionData : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(IotHubCertificateDescriptionData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); @@ -38,42 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } IotHubCertificateDescriptionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/IotHubDescriptionData.Serialization.cs b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/IotHubDescriptionData.Serialization.cs index 30ae93c0694a..299e89db6145 100644 --- a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/IotHubDescriptionData.Serialization.cs +++ b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/IotHubDescriptionData.Serialization.cs @@ -20,6 +20,15 @@ public partial class IotHubDescriptionData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(IotHubDescriptionData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); @@ -45,55 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW writer.WritePropertyName("identity"u8); JsonSerializer.Serialize(writer, Identity); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } IotHubDescriptionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/IotHubPrivateEndpointConnectionData.Serialization.cs b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/IotHubPrivateEndpointConnectionData.Serialization.cs index dc68bf1857de..ae4fe4b907e7 100644 --- a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/IotHubPrivateEndpointConnectionData.Serialization.cs +++ b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/IotHubPrivateEndpointConnectionData.Serialization.cs @@ -20,6 +20,15 @@ public partial class IotHubPrivateEndpointConnectionData : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,45 +36,9 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(IotHubPrivateEndpointConnectionData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteObjectValue(Properties, options); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } IotHubPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/IotHubPrivateEndpointGroupInformationData.Serialization.cs b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/IotHubPrivateEndpointGroupInformationData.Serialization.cs index 9fd91c5a29f3..509f5078ba68 100644 --- a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/IotHubPrivateEndpointGroupInformationData.Serialization.cs +++ b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/IotHubPrivateEndpointGroupInformationData.Serialization.cs @@ -20,6 +20,15 @@ public partial class IotHubPrivateEndpointGroupInformationData : IUtf8JsonSerial void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,45 +36,9 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(IotHubPrivateEndpointGroupInformationData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteObjectValue(Properties, options); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } IotHubPrivateEndpointGroupInformationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/CloudToDeviceFeedbackQueueProperties.Serialization.cs b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/CloudToDeviceFeedbackQueueProperties.Serialization.cs index 11b0babc5519..3da13bb6783b 100644 --- a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/CloudToDeviceFeedbackQueueProperties.Serialization.cs +++ b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/CloudToDeviceFeedbackQueueProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class CloudToDeviceFeedbackQueueProperties : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(CloudToDeviceFeedbackQueueProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(LockDurationAsIso8601)) { writer.WritePropertyName("lockDurationAsIso8601"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } CloudToDeviceFeedbackQueueProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/CloudToDeviceProperties.Serialization.cs b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/CloudToDeviceProperties.Serialization.cs index 3c4f8a91815c..81d25106a5db 100644 --- a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/CloudToDeviceProperties.Serialization.cs +++ b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/CloudToDeviceProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class CloudToDeviceProperties : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(CloudToDeviceProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(MaxDeliveryCount)) { writer.WritePropertyName("maxDeliveryCount"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } CloudToDeviceProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/EventHubCompatibleEndpointProperties.Serialization.cs b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/EventHubCompatibleEndpointProperties.Serialization.cs index 05c91d295e37..8a4d3ff209e8 100644 --- a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/EventHubCompatibleEndpointProperties.Serialization.cs +++ b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/EventHubCompatibleEndpointProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class EventHubCompatibleEndpointProperties : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(EventHubCompatibleEndpointProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(RetentionTimeInDays)) { writer.WritePropertyName("retentionTimeInDays"u8); @@ -71,7 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } EventHubCompatibleEndpointProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/EventHubConsumerGroupInfoCreateOrUpdateContent.Serialization.cs b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/EventHubConsumerGroupInfoCreateOrUpdateContent.Serialization.cs index 1af218c18933..23d3f2aace7b 100644 --- a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/EventHubConsumerGroupInfoCreateOrUpdateContent.Serialization.cs +++ b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/EventHubConsumerGroupInfoCreateOrUpdateContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class EventHubConsumerGroupInfoCreateOrUpdateContent : IUtf8JsonS void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWr throw new FormatException($"The model {nameof(EventHubConsumerGroupInfoCreateOrUpdateContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); writer.WritePropertyName("name"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWr #endif } } - writer.WriteEndObject(); } EventHubConsumerGroupInfoCreateOrUpdateContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/EventHubConsumerGroupsListResult.Serialization.cs b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/EventHubConsumerGroupsListResult.Serialization.cs index 376720b6542f..9e09d07e5418 100644 --- a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/EventHubConsumerGroupsListResult.Serialization.cs +++ b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/EventHubConsumerGroupsListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class EventHubConsumerGroupsListResult : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(EventHubConsumerGroupsListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } EventHubConsumerGroupsListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/ExportDevicesContent.Serialization.cs b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/ExportDevicesContent.Serialization.cs index 8a65dffa3f58..ce5525c3d5f0 100644 --- a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/ExportDevicesContent.Serialization.cs +++ b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/ExportDevicesContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class ExportDevicesContent : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(ExportDevicesContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("exportBlobContainerUri"u8); writer.WriteStringValue(ExportBlobContainerUri.AbsoluteUri); writer.WritePropertyName("excludeKeys"u8); @@ -70,7 +78,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } ExportDevicesContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubCapacity.Serialization.cs b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubCapacity.Serialization.cs index d7752f96a00b..1ae772e2a283 100644 --- a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubCapacity.Serialization.cs +++ b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubCapacity.Serialization.cs @@ -18,6 +18,15 @@ public partial class IotHubCapacity : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(IotHubCapacity)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Minimum)) { writer.WritePropertyName("minimum"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp #endif } } - writer.WriteEndObject(); } IotHubCapacity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubCertificateListDescription.Serialization.cs b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubCertificateListDescription.Serialization.cs index f3292e69c80b..3cf4f8e1a88e 100644 --- a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubCertificateListDescription.Serialization.cs +++ b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubCertificateListDescription.Serialization.cs @@ -18,6 +18,15 @@ internal partial class IotHubCertificateListDescription : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(IotHubCertificateListDescription)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } IotHubCertificateListDescription IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubCertificateProperties.Serialization.cs b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubCertificateProperties.Serialization.cs index 46eb2081131f..c93f046ee8ad 100644 --- a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubCertificateProperties.Serialization.cs +++ b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubCertificateProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class IotHubCertificateProperties : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(IotHubCertificateProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Subject)) { writer.WritePropertyName("subject"u8); @@ -83,7 +91,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } IotHubCertificateProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubCertificatePropertiesWithNonce.Serialization.cs b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubCertificatePropertiesWithNonce.Serialization.cs index 7c64c72450f8..774a1c4441a0 100644 --- a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubCertificatePropertiesWithNonce.Serialization.cs +++ b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubCertificatePropertiesWithNonce.Serialization.cs @@ -18,6 +18,15 @@ public partial class IotHubCertificatePropertiesWithNonce : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(IotHubCertificatePropertiesWithNonce)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Subject)) { writer.WritePropertyName("subject"u8); @@ -88,7 +96,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } IotHubCertificatePropertiesWithNonce IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubCertificateVerificationContent.Serialization.cs b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubCertificateVerificationContent.Serialization.cs index 5c8c7ad8c743..99bf7fa6af5e 100644 --- a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubCertificateVerificationContent.Serialization.cs +++ b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubCertificateVerificationContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class IotHubCertificateVerificationContent : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(IotHubCertificateVerificationContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Certificate)) { writer.WritePropertyName("certificate"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } IotHubCertificateVerificationContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubCertificateWithNonceDescription.Serialization.cs b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubCertificateWithNonceDescription.Serialization.cs index 7e270678ea26..22fb0b78526e 100644 --- a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubCertificateWithNonceDescription.Serialization.cs +++ b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubCertificateWithNonceDescription.Serialization.cs @@ -19,6 +19,15 @@ public partial class IotHubCertificateWithNonceDescription : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(IotHubCertificateWithNonceDescription)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); @@ -37,42 +46,6 @@ void IJsonModel.Write(Utf8JsonWriter writ writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } IotHubCertificateWithNonceDescription IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubDescriptionListResult.Serialization.cs b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubDescriptionListResult.Serialization.cs index 30d137c6b65d..e7b8362cbd91 100644 --- a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubDescriptionListResult.Serialization.cs +++ b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubDescriptionListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class IotHubDescriptionListResult : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(IotHubDescriptionListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } IotHubDescriptionListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubDescriptionPatch.Serialization.cs b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubDescriptionPatch.Serialization.cs index 2f2fe57e5ded..b359297eac74 100644 --- a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubDescriptionPatch.Serialization.cs +++ b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubDescriptionPatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class IotHubDescriptionPatch : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(IotHubDescriptionPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } IotHubDescriptionPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubEndpointHealthInfo.Serialization.cs b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubEndpointHealthInfo.Serialization.cs index aaf2f5bba35a..e996ea371dc1 100644 --- a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubEndpointHealthInfo.Serialization.cs +++ b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubEndpointHealthInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class IotHubEndpointHealthInfo : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(IotHubEndpointHealthInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(EndpointId)) { writer.WritePropertyName("endpointId"u8); @@ -71,7 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } IotHubEndpointHealthInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubEndpointHealthInfoListResult.Serialization.cs b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubEndpointHealthInfoListResult.Serialization.cs index f9bfbe0cc94e..3546f559ac21 100644 --- a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubEndpointHealthInfoListResult.Serialization.cs +++ b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubEndpointHealthInfoListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class IotHubEndpointHealthInfoListResult : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(IotHubEndpointHealthInfoListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } IotHubEndpointHealthInfoListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubEnrichmentProperties.Serialization.cs b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubEnrichmentProperties.Serialization.cs index 2e6c1389f5d0..9af380e9a2f1 100644 --- a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubEnrichmentProperties.Serialization.cs +++ b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubEnrichmentProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class IotHubEnrichmentProperties : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(IotHubEnrichmentProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("key"u8); writer.WriteStringValue(Key); writer.WritePropertyName("value"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } IotHubEnrichmentProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubFailoverContent.Serialization.cs b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubFailoverContent.Serialization.cs index 04f7481763f5..e9a3922f0ffe 100644 --- a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubFailoverContent.Serialization.cs +++ b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubFailoverContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class IotHubFailoverContent : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(IotHubFailoverContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("failoverRegion"u8); writer.WriteStringValue(FailoverRegion); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } IotHubFailoverContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubFallbackRouteProperties.Serialization.cs b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubFallbackRouteProperties.Serialization.cs index 01367c7d16c5..f81d0cb1cc5e 100644 --- a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubFallbackRouteProperties.Serialization.cs +++ b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubFallbackRouteProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class IotHubFallbackRouteProperties : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(IotHubFallbackRouteProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -62,7 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } IotHubFallbackRouteProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubIPFilterRule.Serialization.cs b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubIPFilterRule.Serialization.cs index b1e4f3547287..462e44e23d9b 100644 --- a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubIPFilterRule.Serialization.cs +++ b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubIPFilterRule.Serialization.cs @@ -18,6 +18,15 @@ public partial class IotHubIPFilterRule : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(IotHubIPFilterRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("filterName"u8); writer.WriteStringValue(FilterName); writer.WritePropertyName("action"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } IotHubIPFilterRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubImportDevicesContent.Serialization.cs b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubImportDevicesContent.Serialization.cs index da4b348e18c1..ef11f6de451b 100644 --- a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubImportDevicesContent.Serialization.cs +++ b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubImportDevicesContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class IotHubImportDevicesContent : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(IotHubImportDevicesContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("inputBlobContainerUri"u8); writer.WriteStringValue(InputBlobContainerUri.AbsoluteUri); writer.WritePropertyName("outputBlobContainerUri"u8); @@ -75,7 +83,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } IotHubImportDevicesContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubJobInfo.Serialization.cs b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubJobInfo.Serialization.cs index 8c2cf5be1acc..23147f834bf5 100644 --- a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubJobInfo.Serialization.cs +++ b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubJobInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class IotHubJobInfo : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt throw new FormatException($"The model {nameof(IotHubJobInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(JobId)) { writer.WritePropertyName("jobId"u8); @@ -81,7 +89,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt #endif } } - writer.WriteEndObject(); } IotHubJobInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubJobInfoListResult.Serialization.cs b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubJobInfoListResult.Serialization.cs index 946184b69c3d..3ebea9c6e2fd 100644 --- a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubJobInfoListResult.Serialization.cs +++ b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubJobInfoListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class IotHubJobInfoListResult : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(IotHubJobInfoListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } IotHubJobInfoListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubLocationDescription.Serialization.cs b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubLocationDescription.Serialization.cs index 412aa56c0181..57569b868c11 100644 --- a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubLocationDescription.Serialization.cs +++ b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubLocationDescription.Serialization.cs @@ -18,6 +18,15 @@ public partial class IotHubLocationDescription : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(IotHubLocationDescription)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Location)) { writer.WritePropertyName("location"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } IotHubLocationDescription IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubMatchedRoute.Serialization.cs b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubMatchedRoute.Serialization.cs index d4812e9fbc9a..88d2ec633ab9 100644 --- a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubMatchedRoute.Serialization.cs +++ b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubMatchedRoute.Serialization.cs @@ -18,6 +18,15 @@ public partial class IotHubMatchedRoute : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(IotHubMatchedRoute)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } IotHubMatchedRoute IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubNameAvailabilityContent.Serialization.cs b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubNameAvailabilityContent.Serialization.cs index 915df5514199..97404224fc6b 100644 --- a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubNameAvailabilityContent.Serialization.cs +++ b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubNameAvailabilityContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class IotHubNameAvailabilityContent : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(IotHubNameAvailabilityContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } IotHubNameAvailabilityContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubNameAvailabilityResponse.Serialization.cs b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubNameAvailabilityResponse.Serialization.cs index 5616152d0499..bc941028e455 100644 --- a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubNameAvailabilityResponse.Serialization.cs +++ b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubNameAvailabilityResponse.Serialization.cs @@ -18,6 +18,15 @@ public partial class IotHubNameAvailabilityResponse : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(IotHubNameAvailabilityResponse)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(IsNameAvailable)) { writer.WritePropertyName("nameAvailable"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } IotHubNameAvailabilityResponse IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubNetworkRuleSetIPRule.Serialization.cs b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubNetworkRuleSetIPRule.Serialization.cs index ad64c55323c1..f39fb59eb2a0 100644 --- a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubNetworkRuleSetIPRule.Serialization.cs +++ b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubNetworkRuleSetIPRule.Serialization.cs @@ -18,6 +18,15 @@ public partial class IotHubNetworkRuleSetIPRule : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(IotHubNetworkRuleSetIPRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("filterName"u8); writer.WriteStringValue(FilterName); if (Optional.IsDefined(Action)) @@ -50,7 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } IotHubNetworkRuleSetIPRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubNetworkRuleSetProperties.Serialization.cs b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubNetworkRuleSetProperties.Serialization.cs index 807958761c48..bc9586bae309 100644 --- a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubNetworkRuleSetProperties.Serialization.cs +++ b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubNetworkRuleSetProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class IotHubNetworkRuleSetProperties : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(IotHubNetworkRuleSetProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(DefaultAction)) { writer.WritePropertyName("defaultAction"u8); @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } IotHubNetworkRuleSetProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubPrivateEndpointConnectionProperties.Serialization.cs b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubPrivateEndpointConnectionProperties.Serialization.cs index a855a276953d..1dd014f44f09 100644 --- a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubPrivateEndpointConnectionProperties.Serialization.cs +++ b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubPrivateEndpointConnectionProperties.Serialization.cs @@ -19,6 +19,15 @@ public partial class IotHubPrivateEndpointConnectionProperties : IUtf8JsonSerial void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(IotHubPrivateEndpointConnectionProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(PrivateEndpoint)) { writer.WritePropertyName("privateEndpoint"u8); @@ -49,7 +57,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } IotHubPrivateEndpointConnectionProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubPrivateEndpointConnectionsList.Serialization.cs b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubPrivateEndpointConnectionsList.Serialization.cs index 13f2e78ff1e5..2b8be2bc2bf1 100644 --- a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubPrivateEndpointConnectionsList.Serialization.cs +++ b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubPrivateEndpointConnectionsList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class IotHubPrivateEndpointConnectionsList : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(IotHubPrivateEndpointConnectionsList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } IotHubPrivateEndpointConnectionsList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubPrivateEndpointGroupInformationProperties.Serialization.cs b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubPrivateEndpointGroupInformationProperties.Serialization.cs index 636f6d5a9baa..acc1b6efc444 100644 --- a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubPrivateEndpointGroupInformationProperties.Serialization.cs +++ b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubPrivateEndpointGroupInformationProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class IotHubPrivateEndpointGroupInformationProperties : IUtf8Json void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonW throw new FormatException($"The model {nameof(IotHubPrivateEndpointGroupInformationProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(GroupId)) { writer.WritePropertyName("groupId"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonW #endif } } - writer.WriteEndObject(); } IotHubPrivateEndpointGroupInformationProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubPrivateLinkResources.Serialization.cs b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubPrivateLinkResources.Serialization.cs index 06d7b043deed..26d2976394a1 100644 --- a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubPrivateLinkResources.Serialization.cs +++ b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubPrivateLinkResources.Serialization.cs @@ -18,6 +18,15 @@ internal partial class IotHubPrivateLinkResources : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(IotHubPrivateLinkResources)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } IotHubPrivateLinkResources IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubPrivateLinkServiceConnectionState.Serialization.cs b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubPrivateLinkServiceConnectionState.Serialization.cs index 1c77937e7f5d..537eb51a0d1d 100644 --- a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubPrivateLinkServiceConnectionState.Serialization.cs +++ b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubPrivateLinkServiceConnectionState.Serialization.cs @@ -18,6 +18,15 @@ public partial class IotHubPrivateLinkServiceConnectionState : IUtf8JsonSerializ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wr throw new FormatException($"The model {nameof(IotHubPrivateLinkServiceConnectionState)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("status"u8); writer.WriteStringValue(Status.ToString()); writer.WritePropertyName("description"u8); @@ -50,7 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter wr #endif } } - writer.WriteEndObject(); } IotHubPrivateLinkServiceConnectionState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubProperties.Serialization.cs b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubProperties.Serialization.cs index c614f8abb910..e5d186e12193 100644 --- a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubProperties.Serialization.cs +++ b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class IotHubProperties : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(IotHubProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(AuthorizationPolicies)) { writer.WritePropertyName("authorizationPolicies"u8); @@ -204,7 +212,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } IotHubProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubQuotaMetricInfo.Serialization.cs b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubQuotaMetricInfo.Serialization.cs index 74ed6c2c30da..2e6a0492b2eb 100644 --- a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubQuotaMetricInfo.Serialization.cs +++ b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubQuotaMetricInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class IotHubQuotaMetricInfo : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(IotHubQuotaMetricInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } IotHubQuotaMetricInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubQuotaMetricInfoListResult.Serialization.cs b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubQuotaMetricInfoListResult.Serialization.cs index 65308f3bbab8..eddc97e42ad2 100644 --- a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubQuotaMetricInfoListResult.Serialization.cs +++ b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubQuotaMetricInfoListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class IotHubQuotaMetricInfoListResult : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(IotHubQuotaMetricInfoListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } IotHubQuotaMetricInfoListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubRegistryStatistics.Serialization.cs b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubRegistryStatistics.Serialization.cs index 6578a4c1e042..b32f82cd46dc 100644 --- a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubRegistryStatistics.Serialization.cs +++ b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubRegistryStatistics.Serialization.cs @@ -18,6 +18,15 @@ public partial class IotHubRegistryStatistics : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(IotHubRegistryStatistics)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(TotalDeviceCount)) { writer.WritePropertyName("totalDeviceCount"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } IotHubRegistryStatistics IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubRoutingProperties.Serialization.cs b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubRoutingProperties.Serialization.cs index a4454a00db5e..1eafef3c599f 100644 --- a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubRoutingProperties.Serialization.cs +++ b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubRoutingProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class IotHubRoutingProperties : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(IotHubRoutingProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Endpoints)) { writer.WritePropertyName("endpoints"u8); @@ -71,7 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } IotHubRoutingProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubSkuDescription.Serialization.cs b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubSkuDescription.Serialization.cs index bfb38c1a5890..d3ee2aec961d 100644 --- a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubSkuDescription.Serialization.cs +++ b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubSkuDescription.Serialization.cs @@ -18,6 +18,15 @@ public partial class IotHubSkuDescription : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(IotHubSkuDescription)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ResourceType)) { writer.WritePropertyName("resourceType"u8); @@ -50,7 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } IotHubSkuDescription IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubSkuDescriptionListResult.Serialization.cs b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubSkuDescriptionListResult.Serialization.cs index 7750a16176d9..9149e3f4a545 100644 --- a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubSkuDescriptionListResult.Serialization.cs +++ b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubSkuDescriptionListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class IotHubSkuDescriptionListResult : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(IotHubSkuDescriptionListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } IotHubSkuDescriptionListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubSkuInfo.Serialization.cs b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubSkuInfo.Serialization.cs index cd16e4c218de..279a20b8269b 100644 --- a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubSkuInfo.Serialization.cs +++ b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubSkuInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class IotHubSkuInfo : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt throw new FormatException($"The model {nameof(IotHubSkuInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name.ToString()); if (options.Format != "W" && Optional.IsDefined(Tier)) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt #endif } } - writer.WriteEndObject(); } IotHubSkuInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubStorageEndpointProperties.Serialization.cs b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubStorageEndpointProperties.Serialization.cs index 803aff6f0a71..0aef085d575e 100644 --- a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubStorageEndpointProperties.Serialization.cs +++ b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubStorageEndpointProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class IotHubStorageEndpointProperties : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(IotHubStorageEndpointProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(SasTtlAsIso8601)) { writer.WritePropertyName("sasTtlAsIso8601"u8); @@ -60,7 +68,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } IotHubStorageEndpointProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubTestAllRoutesContent.Serialization.cs b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubTestAllRoutesContent.Serialization.cs index 3616c21632f2..c36db0f756f5 100644 --- a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubTestAllRoutesContent.Serialization.cs +++ b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubTestAllRoutesContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class IotHubTestAllRoutesContent : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(IotHubTestAllRoutesContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(RoutingSource)) { writer.WritePropertyName("routingSource"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } IotHubTestAllRoutesContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubTestAllRoutesResult.Serialization.cs b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubTestAllRoutesResult.Serialization.cs index f7d9041e3ae5..ebcf0f5be925 100644 --- a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubTestAllRoutesResult.Serialization.cs +++ b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubTestAllRoutesResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class IotHubTestAllRoutesResult : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(IotHubTestAllRoutesResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Routes)) { writer.WritePropertyName("routes"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } IotHubTestAllRoutesResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubTestRouteContent.Serialization.cs b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubTestRouteContent.Serialization.cs index e53861c510a4..b5d029c39ca7 100644 --- a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubTestRouteContent.Serialization.cs +++ b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubTestRouteContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class IotHubTestRouteContent : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(IotHubTestRouteContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Message)) { writer.WritePropertyName("message"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } IotHubTestRouteContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubTestRouteResult.Serialization.cs b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubTestRouteResult.Serialization.cs index 4e4992f0e007..fffe7f0e48d1 100644 --- a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubTestRouteResult.Serialization.cs +++ b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubTestRouteResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class IotHubTestRouteResult : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(IotHubTestRouteResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Result)) { writer.WritePropertyName("result"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } IotHubTestRouteResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubTestRouteResultDetails.Serialization.cs b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubTestRouteResultDetails.Serialization.cs index dbe12ed05010..67098c7b460f 100644 --- a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubTestRouteResultDetails.Serialization.cs +++ b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubTestRouteResultDetails.Serialization.cs @@ -18,6 +18,15 @@ internal partial class IotHubTestRouteResultDetails : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(IotHubTestRouteResultDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(CompilationErrors)) { writer.WritePropertyName("compilationErrors"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } IotHubTestRouteResultDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubTypeName.Serialization.cs b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubTypeName.Serialization.cs index 14d534365274..62a3696f7fe4 100644 --- a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubTypeName.Serialization.cs +++ b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubTypeName.Serialization.cs @@ -18,6 +18,15 @@ public partial class IotHubTypeName : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(IotHubTypeName)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Value)) { writer.WritePropertyName("value"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp #endif } } - writer.WriteEndObject(); } IotHubTypeName IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubUserSubscriptionQuota.Serialization.cs b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubUserSubscriptionQuota.Serialization.cs index 5d1e2dab8b00..b8cc0197aa9b 100644 --- a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubUserSubscriptionQuota.Serialization.cs +++ b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubUserSubscriptionQuota.Serialization.cs @@ -18,6 +18,15 @@ public partial class IotHubUserSubscriptionQuota : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(IotHubUserSubscriptionQuota)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IotHubTypeId)) { writer.WritePropertyName("id"u8); @@ -71,7 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } IotHubUserSubscriptionQuota IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubUserSubscriptionQuotaListResult.Serialization.cs b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubUserSubscriptionQuotaListResult.Serialization.cs index c44a272b7182..f1b1b31dc044 100644 --- a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubUserSubscriptionQuotaListResult.Serialization.cs +++ b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubUserSubscriptionQuotaListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class IotHubUserSubscriptionQuotaListResult : IUtf8JsonSerializ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(IotHubUserSubscriptionQuotaListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } IotHubUserSubscriptionQuotaListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/ManagedIdentity.Serialization.cs b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/ManagedIdentity.Serialization.cs index 2edb9ea4e0c7..c1186cc92ac4 100644 --- a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/ManagedIdentity.Serialization.cs +++ b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/ManagedIdentity.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ManagedIdentity : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(ManagedIdentity)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(UserAssignedIdentity)) { writer.WritePropertyName("userAssignedIdentity"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO #endif } } - writer.WriteEndObject(); } ManagedIdentity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/MessagingEndpointProperties.Serialization.cs b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/MessagingEndpointProperties.Serialization.cs index e18cb61554a0..588dba8dae36 100644 --- a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/MessagingEndpointProperties.Serialization.cs +++ b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/MessagingEndpointProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class MessagingEndpointProperties : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(MessagingEndpointProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(LockDurationAsIso8601)) { writer.WritePropertyName("lockDurationAsIso8601"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } MessagingEndpointProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/RouteCompilationError.Serialization.cs b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/RouteCompilationError.Serialization.cs index 0e5ec012b0a8..b882ca59c071 100644 --- a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/RouteCompilationError.Serialization.cs +++ b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/RouteCompilationError.Serialization.cs @@ -18,6 +18,15 @@ public partial class RouteCompilationError : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(RouteCompilationError)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Message)) { writer.WritePropertyName("message"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } RouteCompilationError IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/RouteErrorPosition.Serialization.cs b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/RouteErrorPosition.Serialization.cs index fe7c43ae4a6a..f06132be66d2 100644 --- a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/RouteErrorPosition.Serialization.cs +++ b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/RouteErrorPosition.Serialization.cs @@ -18,6 +18,15 @@ public partial class RouteErrorPosition : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(RouteErrorPosition)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Line)) { writer.WritePropertyName("line"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } RouteErrorPosition IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/RouteErrorRange.Serialization.cs b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/RouteErrorRange.Serialization.cs index 49f541148b80..350b7102d1f5 100644 --- a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/RouteErrorRange.Serialization.cs +++ b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/RouteErrorRange.Serialization.cs @@ -18,6 +18,15 @@ public partial class RouteErrorRange : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(RouteErrorRange)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Start)) { writer.WritePropertyName("start"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO #endif } } - writer.WriteEndObject(); } RouteErrorRange IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/RoutingCosmosDBSqlApiProperties.Serialization.cs b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/RoutingCosmosDBSqlApiProperties.Serialization.cs index 18d145921fe7..d020bcb57d12 100644 --- a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/RoutingCosmosDBSqlApiProperties.Serialization.cs +++ b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/RoutingCosmosDBSqlApiProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class RoutingCosmosDBSqlApiProperties : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(RoutingCosmosDBSqlApiProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); if (options.Format != "W" && Optional.IsDefined(Id)) @@ -94,7 +102,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } RoutingCosmosDBSqlApiProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/RoutingEndpoints.Serialization.cs b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/RoutingEndpoints.Serialization.cs index 76ab6248409a..c6659dc0b178 100644 --- a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/RoutingEndpoints.Serialization.cs +++ b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/RoutingEndpoints.Serialization.cs @@ -18,6 +18,15 @@ public partial class RoutingEndpoints : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(RoutingEndpoints)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(ServiceBusQueues)) { writer.WritePropertyName("serviceBusQueues"u8); @@ -91,7 +99,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } RoutingEndpoints IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/RoutingEventHubProperties.Serialization.cs b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/RoutingEventHubProperties.Serialization.cs index 2c828851df95..ddb3abfba7a0 100644 --- a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/RoutingEventHubProperties.Serialization.cs +++ b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/RoutingEventHubProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class RoutingEventHubProperties : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(RoutingEventHubProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -83,7 +91,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } RoutingEventHubProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/RoutingMessage.Serialization.cs b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/RoutingMessage.Serialization.cs index 3d8e39e1b92a..30af330b7046 100644 --- a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/RoutingMessage.Serialization.cs +++ b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/RoutingMessage.Serialization.cs @@ -18,6 +18,15 @@ public partial class RoutingMessage : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(RoutingMessage)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Body)) { writer.WritePropertyName("body"u8); @@ -68,7 +76,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp #endif } } - writer.WriteEndObject(); } RoutingMessage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/RoutingRuleProperties.Serialization.cs b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/RoutingRuleProperties.Serialization.cs index 05a66a15ded2..3c32885f40c1 100644 --- a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/RoutingRuleProperties.Serialization.cs +++ b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/RoutingRuleProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class RoutingRuleProperties : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(RoutingRuleProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); writer.WritePropertyName("source"u8); @@ -59,7 +67,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } RoutingRuleProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/RoutingServiceBusQueueEndpointProperties.Serialization.cs b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/RoutingServiceBusQueueEndpointProperties.Serialization.cs index b9278a71e0d8..9c0a70850cac 100644 --- a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/RoutingServiceBusQueueEndpointProperties.Serialization.cs +++ b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/RoutingServiceBusQueueEndpointProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class RoutingServiceBusQueueEndpointProperties : IUtf8JsonSeriali void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter w throw new FormatException($"The model {nameof(RoutingServiceBusQueueEndpointProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -83,7 +91,6 @@ void IJsonModel.Write(Utf8JsonWriter w #endif } } - writer.WriteEndObject(); } RoutingServiceBusQueueEndpointProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/RoutingServiceBusTopicEndpointProperties.Serialization.cs b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/RoutingServiceBusTopicEndpointProperties.Serialization.cs index a5e8ebfa9734..50fcc56b8681 100644 --- a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/RoutingServiceBusTopicEndpointProperties.Serialization.cs +++ b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/RoutingServiceBusTopicEndpointProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class RoutingServiceBusTopicEndpointProperties : IUtf8JsonSeriali void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter w throw new FormatException($"The model {nameof(RoutingServiceBusTopicEndpointProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -83,7 +91,6 @@ void IJsonModel.Write(Utf8JsonWriter w #endif } } - writer.WriteEndObject(); } RoutingServiceBusTopicEndpointProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/RoutingStorageContainerProperties.Serialization.cs b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/RoutingStorageContainerProperties.Serialization.cs index 313504931690..0eae9b5d1942 100644 --- a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/RoutingStorageContainerProperties.Serialization.cs +++ b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/RoutingStorageContainerProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class RoutingStorageContainerProperties : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(RoutingStorageContainerProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -100,7 +108,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } RoutingStorageContainerProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/RoutingTwin.Serialization.cs b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/RoutingTwin.Serialization.cs index 1cbd59befe5d..b1233d1c1dca 100644 --- a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/RoutingTwin.Serialization.cs +++ b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/RoutingTwin.Serialization.cs @@ -18,6 +18,15 @@ public partial class RoutingTwin : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio throw new FormatException($"The model {nameof(RoutingTwin)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio #endif } } - writer.WriteEndObject(); } RoutingTwin IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/RoutingTwinProperties.Serialization.cs b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/RoutingTwinProperties.Serialization.cs index 68fff98bfe9a..a1ba0a354016 100644 --- a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/RoutingTwinProperties.Serialization.cs +++ b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/RoutingTwinProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class RoutingTwinProperties : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(RoutingTwinProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Desired)) { writer.WritePropertyName("desired"u8); @@ -65,7 +73,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } RoutingTwinProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/SharedAccessSignatureAuthorizationRule.Serialization.cs b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/SharedAccessSignatureAuthorizationRule.Serialization.cs index 65e355cff4b8..561ccf28bb60 100644 --- a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/SharedAccessSignatureAuthorizationRule.Serialization.cs +++ b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/SharedAccessSignatureAuthorizationRule.Serialization.cs @@ -18,6 +18,15 @@ public partial class SharedAccessSignatureAuthorizationRule : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(SharedAccessSignatureAuthorizationRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("keyName"u8); writer.WriteStringValue(KeyName); if (Optional.IsDefined(PrimaryKey)) @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } SharedAccessSignatureAuthorizationRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/SharedAccessSignatureAuthorizationRuleListResult.Serialization.cs b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/SharedAccessSignatureAuthorizationRuleListResult.Serialization.cs index cf05935044f5..91bf0ce2a81f 100644 --- a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/SharedAccessSignatureAuthorizationRuleListResult.Serialization.cs +++ b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/SharedAccessSignatureAuthorizationRuleListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class SharedAccessSignatureAuthorizationRuleListResult : IUtf8J void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8Json throw new FormatException($"The model {nameof(SharedAccessSignatureAuthorizationRuleListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8Json #endif } } - writer.WriteEndObject(); } SharedAccessSignatureAuthorizationRuleListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/iothub/Azure.ResourceManager.IotHub/src/autorest.md b/sdk/iothub/Azure.ResourceManager.IotHub/src/autorest.md index 14791f056479..25c586f6d906 100644 --- a/sdk/iothub/Azure.ResourceManager.IotHub/src/autorest.md +++ b/sdk/iothub/Azure.ResourceManager.IotHub/src/autorest.md @@ -19,6 +19,7 @@ skip-csproj: true modelerfour: flatten-payloads: false use-model-reader-writer: true +use-write-core: true #mgmt-debug: # show-serialized-names: true diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/CHANGELOG.md b/sdk/keyvault/Azure.Security.KeyVault.Administration/CHANGELOG.md index 4b08ca6035e4..bb789fe8b0f5 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/CHANGELOG.md +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/CHANGELOG.md @@ -1,19 +1,20 @@ # Release History -## 4.5.0-beta.1 (Unreleased) +## 4.6.0-beta.1 (Unreleased) ### Features Added -- Added support for service API version `7.6-preview.1`. -- Added new methods `StartPreRestoreAsync`, `StartPreRestore`, `StartPreBackupAsync`, and `StartPreBackupAsync` to the `KeyVaultBackupClient`. - ### Breaking Changes ### Bugs Fixed ### Other Changes -- The default service version is now "V7_6_Preview_1". +## 4.5.0 (2024-10-14) + +### Features Added + +- Support for Continuous Access Evaluation (CAE). ## 4.4.0 (2024-02-14) @@ -88,8 +89,8 @@ The following changes are only breaking from the previous beta. They are not bre ### Breaking Changes - Verify the challenge resource matches the vault domain. - This should affect few customers who can set `KeyVaultAdministrationClientOptions.DisableChallengeResourceVerification` to `true` to disable. - See for more information. + This should affect few customers who can set `KeyVaultAdministrationClientOptions.DisableChallengeResourceVerification` to `true` to disable. + See https://aka.ms/azsdk/blog/vault-uri for more information. ## 4.1.0 (2022-03-24) diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/README.md b/sdk/keyvault/Azure.Security.KeyVault.Administration/README.md index dc452003b702..c05c0ad094bd 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/README.md +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/README.md @@ -141,16 +141,10 @@ A `KeyVaultAccessControlClient` provides both synchronous and asynchronous opera A `KeyVaultBackupClient` provides both synchronous and asynchronous operations for performing full key backups, full key restores, and selective key restores. -### PreBackupOperation -A `PreBackupOperation` represents a long-running operation that checks if it is possible to perform a full key backup. - ### BackupOperation A `BackupOperation` represents a long running operation for a full key backup. -### PreRestoreOperation -A `PreRestoreOperation` represents a long-running operation that checks if it is possible to perform a full key restore from a backup. - ### RestoreOperation A `RestoreOperation` represents a long running operation for both a full key and selective key restore. diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/api/Azure.Security.KeyVault.Administration.netstandard2.0.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/api/Azure.Security.KeyVault.Administration.netstandard2.0.cs index 0c1a09a9ad6f..32a5847b1b3e 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/api/Azure.Security.KeyVault.Administration.netstandard2.0.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/api/Azure.Security.KeyVault.Administration.netstandard2.0.cs @@ -43,7 +43,7 @@ public KeyVaultAccessControlClient(System.Uri vaultUri, Azure.Core.TokenCredenti } public partial class KeyVaultAdministrationClientOptions : Azure.Core.ClientOptions { - public KeyVaultAdministrationClientOptions(Azure.Security.KeyVault.Administration.KeyVaultAdministrationClientOptions.ServiceVersion version = Azure.Security.KeyVault.Administration.KeyVaultAdministrationClientOptions.ServiceVersion.V7_6_Preview_1) { } + public KeyVaultAdministrationClientOptions(Azure.Security.KeyVault.Administration.KeyVaultAdministrationClientOptions.ServiceVersion version = Azure.Security.KeyVault.Administration.KeyVaultAdministrationClientOptions.ServiceVersion.V7_5) { } public bool DisableChallengeResourceVerification { get { throw null; } set { } } public Azure.Security.KeyVault.Administration.KeyVaultAdministrationClientOptions.ServiceVersion Version { get { throw null; } } public enum ServiceVersion @@ -52,7 +52,6 @@ public enum ServiceVersion V7_3 = 2, V7_4 = 3, V7_5 = 4, - V7_6_Preview_1 = 5, } } public static partial class KeyVaultAdministrationModelFactory @@ -80,10 +79,6 @@ public KeyVaultBackupClient(System.Uri vaultUri, Azure.Core.TokenCredential cred public virtual System.Uri VaultUri { get { throw null; } } public virtual Azure.Security.KeyVault.Administration.KeyVaultBackupOperation StartBackup(System.Uri blobStorageUri, string sasToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task StartBackupAsync(System.Uri blobStorageUri, string sasToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Security.KeyVault.Administration.KeyVaultPreBackupOperation StartPreBackup(System.Uri blobStorageUri, string sasToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task StartPreBackupAsync(System.Uri blobStorageUri, string sasToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Security.KeyVault.Administration.KeyVaultPreRestoreOperation StartPreRestore(System.Uri folderUri, string sasToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task StartPreRestoreAsync(System.Uri folderUri, string sasToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Security.KeyVault.Administration.KeyVaultRestoreOperation StartRestore(System.Uri folderUri, string sasToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task StartRestoreAsync(System.Uri folderUri, string sasToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Security.KeyVault.Administration.KeyVaultSelectiveKeyRestoreOperation StartSelectiveKeyRestore(string keyName, System.Uri folderUri, string sasToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -170,38 +165,6 @@ public KeyVaultPermission() { } public System.Collections.Generic.IList NotActions { get { throw null; } } public System.Collections.Generic.IList NotDataActions { get { throw null; } } } - public partial class KeyVaultPreBackupOperation : Azure.Operation - { - protected KeyVaultPreBackupOperation() { } - public KeyVaultPreBackupOperation(Azure.Security.KeyVault.Administration.KeyVaultBackupClient client, string id) { } - public System.DateTimeOffset? EndTime { get { throw null; } } - public override bool HasCompleted { get { throw null; } } - public override bool HasValue { get { throw null; } } - public override string Id { get { throw null; } } - public System.DateTimeOffset? StartTime { get { throw null; } } - public override Azure.Security.KeyVault.Administration.KeyVaultBackupResult Value { get { throw null; } } - public override Azure.Response GetRawResponse() { throw null; } - public override Azure.Response UpdateStatus(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public override System.Threading.Tasks.ValueTask UpdateStatusAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public override System.Threading.Tasks.ValueTask> WaitForCompletionAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public override System.Threading.Tasks.ValueTask> WaitForCompletionAsync(System.TimeSpan pollingInterval, System.Threading.CancellationToken cancellationToken) { throw null; } - } - public partial class KeyVaultPreRestoreOperation : Azure.Operation - { - protected KeyVaultPreRestoreOperation() { } - public KeyVaultPreRestoreOperation(Azure.Security.KeyVault.Administration.KeyVaultBackupClient client, string id) { } - public System.DateTimeOffset? EndTime { get { throw null; } } - public override bool HasCompleted { get { throw null; } } - public override bool HasValue { get { throw null; } } - public override string Id { get { throw null; } } - public System.DateTimeOffset? StartTime { get { throw null; } } - public override Azure.Security.KeyVault.Administration.KeyVaultRestoreResult Value { get { throw null; } } - public override Azure.Response GetRawResponse() { throw null; } - public override Azure.Response UpdateStatus(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public override System.Threading.Tasks.ValueTask UpdateStatusAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public override System.Threading.Tasks.ValueTask> WaitForCompletionAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public override System.Threading.Tasks.ValueTask> WaitForCompletionAsync(System.TimeSpan pollingInterval, System.Threading.CancellationToken cancellationToken) { throw null; } - } public partial class KeyVaultRestoreOperation : Azure.Operation { protected KeyVaultRestoreOperation() { } @@ -374,13 +337,3 @@ public readonly partial struct KeyVaultSettingValue public override string ToString() { throw null; } } } -namespace Azure.Security.KeyVault.Administration.Models -{ - public partial class PreBackupOperationParameters - { - public PreBackupOperationParameters() { } - public string StorageResourceUri { get { throw null; } set { } } - public string Token { get { throw null; } set { } } - public bool? UseManagedIdentity { get { throw null; } set { } } - } -} diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/assets.json b/sdk/keyvault/Azure.Security.KeyVault.Administration/assets.json index 28336ec072ed..3072779aaa8a 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/assets.json +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/keyvault/Azure.Security.KeyVault.Administration", - "Tag": "net/keyvault/Azure.Security.KeyVault.Administration_2b51d5440c" + "Tag": "net/keyvault/Azure.Security.KeyVault.Administration_4951f6b8e1" } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Azure.Security.KeyVault.Administration.csproj b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Azure.Security.KeyVault.Administration.csproj index 47d5304b4505..01ff88db2bc5 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Azure.Security.KeyVault.Administration.csproj +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Azure.Security.KeyVault.Administration.csproj @@ -3,9 +3,9 @@ This is the Microsoft Azure Key Vault Administration client library Microsoft Azure.Security.KeyVault.Administration client library - 4.5.0-beta.1 + 4.6.0-beta.1 - 4.4.0 + 4.5.0 Microsoft Azure Key Vault Administration;$(PackageCommonTags) true $(RequiredTargetFrameworks) diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/AzureSecurityKeyVaultAdministrationPreFullBackupHeaders.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/AzureSecurityKeyVaultAdministrationPreFullBackupHeaders.cs deleted file mode 100644 index e98c641e0422..000000000000 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/AzureSecurityKeyVaultAdministrationPreFullBackupHeaders.cs +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using Azure.Core; - -namespace Azure.Security.KeyVault.Administration -{ - internal partial class AzureSecurityKeyVaultAdministrationPreFullBackupHeaders - { - private readonly Response _response; - public AzureSecurityKeyVaultAdministrationPreFullBackupHeaders(Response response) - { - _response = response; - } - /// The recommended number of seconds to wait before calling the URI specified in Azure-AsyncOperation. - public long? RetryAfter => _response.Headers.TryGetValue("Retry-After", out long? value) ? value : null; - /// The URI to poll for completion status. - public string AzureAsyncOperation => _response.Headers.TryGetValue("Azure-AsyncOperation", out string value) ? value : null; - } -} diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/AzureSecurityKeyVaultAdministrationPreFullRestoreOperationHeaders.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/AzureSecurityKeyVaultAdministrationPreFullRestoreOperationHeaders.cs deleted file mode 100644 index f70613009957..000000000000 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/AzureSecurityKeyVaultAdministrationPreFullRestoreOperationHeaders.cs +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using Azure.Core; - -namespace Azure.Security.KeyVault.Administration -{ - internal partial class AzureSecurityKeyVaultAdministrationPreFullRestoreOperationHeaders - { - private readonly Response _response; - public AzureSecurityKeyVaultAdministrationPreFullRestoreOperationHeaders(Response response) - { - _response = response; - } - /// The recommended number of seconds to wait before calling the URI specified in Azure-AsyncOperation. - public long? RetryAfter => _response.Headers.TryGetValue("Retry-After", out long? value) ? value : null; - /// The URI to poll for completion status. - public string AzureAsyncOperation => _response.Headers.TryGetValue("Azure-AsyncOperation", out string value) ? value : null; - } -} diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/BackupRestoreRestClient.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/BackupRestoreRestClient.cs index 794f0d418986..b30181ba2e98 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/BackupRestoreRestClient.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/BackupRestoreRestClient.cs @@ -28,7 +28,7 @@ internal partial class BackupRestoreRestClient /// The HTTP pipeline for sending and receiving REST requests and responses. /// Api Version. /// , or is null. - public BackupRestoreRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string apiVersion = "7.6-preview.1") + public BackupRestoreRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string apiVersion = "7.5") { ClientDiagnostics = clientDiagnostics ?? throw new ArgumentNullException(nameof(clientDiagnostics)); _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); @@ -104,75 +104,6 @@ public ResponseWithHeaders } } - internal HttpMessage CreatePreFullBackupRequest(string vaultBaseUrl, PreBackupOperationParameters preBackupOperationParameters) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.AppendRaw(vaultBaseUrl, false); - uri.AppendPath("/prebackup", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - if (preBackupOperationParameters != null) - { - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(preBackupOperationParameters); - request.Content = content; - } - return message; - } - - /// Pre-backup operation for checking whether the customer can perform a full backup operation. - /// The vault name, for example https://myvault.vault.azure.net. - /// Optional parameters to validate prior to performing a full backup operation. - /// The cancellation token to use. - /// is null. - public async Task> PreFullBackupAsync(string vaultBaseUrl, PreBackupOperationParameters preBackupOperationParameters = null, CancellationToken cancellationToken = default) - { - if (vaultBaseUrl == null) - { - throw new ArgumentNullException(nameof(vaultBaseUrl)); - } - - using var message = CreatePreFullBackupRequest(vaultBaseUrl, preBackupOperationParameters); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - var headers = new AzureSecurityKeyVaultAdministrationPreFullBackupHeaders(message.Response); - switch (message.Response.Status) - { - case 202: - return ResponseWithHeaders.FromValue(headers, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - /// Pre-backup operation for checking whether the customer can perform a full backup operation. - /// The vault name, for example https://myvault.vault.azure.net. - /// Optional parameters to validate prior to performing a full backup operation. - /// The cancellation token to use. - /// is null. - public ResponseWithHeaders PreFullBackup(string vaultBaseUrl, PreBackupOperationParameters preBackupOperationParameters = null, CancellationToken cancellationToken = default) - { - if (vaultBaseUrl == null) - { - throw new ArgumentNullException(nameof(vaultBaseUrl)); - } - - using var message = CreatePreFullBackupRequest(vaultBaseUrl, preBackupOperationParameters); - _pipeline.Send(message, cancellationToken); - var headers = new AzureSecurityKeyVaultAdministrationPreFullBackupHeaders(message.Response); - switch (message.Response.Status) - { - case 202: - return ResponseWithHeaders.FromValue(headers, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - internal HttpMessage CreateFullBackupStatusRequest(string vaultBaseUrl, string jobId) { var message = _pipeline.CreateMessage(); @@ -253,75 +184,6 @@ public Response FullBackupStatus(string vaultBaseUrl, } } - internal HttpMessage CreatePreFullRestoreOperationRequest(string vaultBaseUrl, PreRestoreOperationParameters preRestoreOperationParameters) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Put; - var uri = new RawRequestUriBuilder(); - uri.AppendRaw(vaultBaseUrl, false); - uri.AppendPath("/prerestore", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - if (preRestoreOperationParameters != null) - { - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(preRestoreOperationParameters); - request.Content = content; - } - return message; - } - - /// Pre-restore operation for checking whether the customer can perform a full restore operation. - /// The vault name, for example https://myvault.vault.azure.net. - /// Optional pre restore parameters to validate prior to performing a full restore operation. - /// The cancellation token to use. - /// is null. - public async Task> PreFullRestoreOperationAsync(string vaultBaseUrl, PreRestoreOperationParameters preRestoreOperationParameters = null, CancellationToken cancellationToken = default) - { - if (vaultBaseUrl == null) - { - throw new ArgumentNullException(nameof(vaultBaseUrl)); - } - - using var message = CreatePreFullRestoreOperationRequest(vaultBaseUrl, preRestoreOperationParameters); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - var headers = new AzureSecurityKeyVaultAdministrationPreFullRestoreOperationHeaders(message.Response); - switch (message.Response.Status) - { - case 202: - return ResponseWithHeaders.FromValue(headers, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - /// Pre-restore operation for checking whether the customer can perform a full restore operation. - /// The vault name, for example https://myvault.vault.azure.net. - /// Optional pre restore parameters to validate prior to performing a full restore operation. - /// The cancellation token to use. - /// is null. - public ResponseWithHeaders PreFullRestoreOperation(string vaultBaseUrl, PreRestoreOperationParameters preRestoreOperationParameters = null, CancellationToken cancellationToken = default) - { - if (vaultBaseUrl == null) - { - throw new ArgumentNullException(nameof(vaultBaseUrl)); - } - - using var message = CreatePreFullRestoreOperationRequest(vaultBaseUrl, preRestoreOperationParameters); - _pipeline.Send(message, cancellationToken); - var headers = new AzureSecurityKeyVaultAdministrationPreFullRestoreOperationHeaders(message.Response); - switch (message.Response.Status) - { - case 202: - return ResponseWithHeaders.FromValue(headers, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - internal HttpMessage CreateFullRestoreOperationRequest(string vaultBaseUrl, RestoreOperationParameters restoreBlobDetails) { var message = _pipeline.CreateMessage(); diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/PreBackupOperationParameters.Serialization.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/PreBackupOperationParameters.Serialization.cs deleted file mode 100644 index e1ce1dc31993..000000000000 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/PreBackupOperationParameters.Serialization.cs +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.Security.KeyVault.Administration.Models -{ - public partial class PreBackupOperationParameters : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(StorageResourceUri)) - { - writer.WritePropertyName("storageResourceUri"u8); - writer.WriteStringValue(StorageResourceUri); - } - if (Optional.IsDefined(Token)) - { - writer.WritePropertyName("token"u8); - writer.WriteStringValue(Token); - } - if (Optional.IsDefined(UseManagedIdentity)) - { - writer.WritePropertyName("useManagedIdentity"u8); - writer.WriteBooleanValue(UseManagedIdentity.Value); - } - writer.WriteEndObject(); - } - - /// Convert into a . - internal virtual RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } - } -} diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/PreBackupOperationParameters.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/PreBackupOperationParameters.cs deleted file mode 100644 index c12e9e3d3265..000000000000 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/PreBackupOperationParameters.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.Security.KeyVault.Administration.Models -{ - /// The PreBackupOperationParameters. - public partial class PreBackupOperationParameters - { - /// Initializes a new instance of . - public PreBackupOperationParameters() - { - } - - /// Initializes a new instance of . - /// Azure Blob storage container Uri. - /// The SAS token pointing to an Azure Blob storage container. - /// Indicates which authentication method should be used. If set to true, Managed HSM will use the configured user-assigned managed identity to authenticate with Azure Storage. Otherwise, a SAS token has to be specified. - internal PreBackupOperationParameters(string storageResourceUri, string token, bool? useManagedIdentity) - { - StorageResourceUri = storageResourceUri; - Token = token; - UseManagedIdentity = useManagedIdentity; - } - - /// Azure Blob storage container Uri. - public string StorageResourceUri { get; set; } - /// The SAS token pointing to an Azure Blob storage container. - public string Token { get; set; } - /// Indicates which authentication method should be used. If set to true, Managed HSM will use the configured user-assigned managed identity to authenticate with Azure Storage. Otherwise, a SAS token has to be specified. - public bool? UseManagedIdentity { get; set; } - } -} diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/PreRestoreOperationParameters.Serialization.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/PreRestoreOperationParameters.Serialization.cs deleted file mode 100644 index 45d6d2d44270..000000000000 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/PreRestoreOperationParameters.Serialization.cs +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.Security.KeyVault.Administration.Models -{ - internal partial class PreRestoreOperationParameters : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(SasTokenParameters)) - { - writer.WritePropertyName("sasTokenParameters"u8); - writer.WriteObjectValue(SasTokenParameters); - } - if (Optional.IsDefined(FolderToRestore)) - { - writer.WritePropertyName("folderToRestore"u8); - writer.WriteStringValue(FolderToRestore); - } - writer.WriteEndObject(); - } - - /// Convert into a . - internal virtual RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } - } -} diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/PreRestoreOperationParameters.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/PreRestoreOperationParameters.cs deleted file mode 100644 index f2985849bc63..000000000000 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/PreRestoreOperationParameters.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.Security.KeyVault.Administration.Models -{ - /// The PreRestoreOperationParameters. - internal partial class PreRestoreOperationParameters - { - /// Initializes a new instance of . - public PreRestoreOperationParameters() - { - } - - /// Initializes a new instance of . - /// - /// The Folder name of the blob where the previous successful full backup was stored. - internal PreRestoreOperationParameters(SASTokenParameter sasTokenParameters, string folderToRestore) - { - SasTokenParameters = sasTokenParameters; - FolderToRestore = folderToRestore; - } - - /// Gets or sets the sas token parameters. - public SASTokenParameter SasTokenParameters { get; set; } - /// The Folder name of the blob where the previous successful full backup was stored. - public string FolderToRestore { get; set; } - } -} diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/RoleAssignmentsRestClient.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/RoleAssignmentsRestClient.cs index 60475edd03da..8cdf96815723 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/RoleAssignmentsRestClient.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/RoleAssignmentsRestClient.cs @@ -28,7 +28,7 @@ internal partial class RoleAssignmentsRestClient /// The HTTP pipeline for sending and receiving REST requests and responses. /// Api Version. /// , or is null. - public RoleAssignmentsRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string apiVersion = "7.6-preview.1") + public RoleAssignmentsRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string apiVersion = "7.5") { ClientDiagnostics = clientDiagnostics ?? throw new ArgumentNullException(nameof(clientDiagnostics)); _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/RoleDefinitionsRestClient.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/RoleDefinitionsRestClient.cs index 9b47b644ea83..6221ad1e783c 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/RoleDefinitionsRestClient.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/RoleDefinitionsRestClient.cs @@ -28,7 +28,7 @@ internal partial class RoleDefinitionsRestClient /// The HTTP pipeline for sending and receiving REST requests and responses. /// Api Version. /// , or is null. - public RoleDefinitionsRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string apiVersion = "7.6-preview.1") + public RoleDefinitionsRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string apiVersion = "7.5") { ClientDiagnostics = clientDiagnostics ?? throw new ArgumentNullException(nameof(clientDiagnostics)); _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/SettingsRestClient.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/SettingsRestClient.cs index 924e65f68b0f..7a898bfb4b4b 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/SettingsRestClient.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/SettingsRestClient.cs @@ -28,7 +28,7 @@ internal partial class SettingsRestClient /// The HTTP pipeline for sending and receiving REST requests and responses. /// Api Version. /// , or is null. - public SettingsRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string apiVersion = "7.6-preview.1") + public SettingsRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string apiVersion = "7.5") { ClientDiagnostics = clientDiagnostics ?? throw new ArgumentNullException(nameof(clientDiagnostics)); _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultAdministrationClientOptions.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultAdministrationClientOptions.cs index 8e2144f9ac42..baf00abf0c86 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultAdministrationClientOptions.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultAdministrationClientOptions.cs @@ -18,7 +18,7 @@ public class KeyVaultAdministrationClientOptions : ClientOptions /// For more information, see /// Key Vault versions. /// - internal const ServiceVersion LatestVersion = ServiceVersion.V7_6_Preview_1; + internal const ServiceVersion LatestVersion = ServiceVersion.V7_5; /// /// The versions of Azure Key Vault supported by this client @@ -46,11 +46,6 @@ public enum ServiceVersion /// The Key Vault API version 7.5. /// V7_5 = 4, - - /// - /// The Key Vault API version 7.6-preview.1. - /// - V7_6_Preview_1 = 5, #pragma warning restore CA1707 // Identifiers should not contain underscores } @@ -88,7 +83,6 @@ internal string GetVersionString() ServiceVersion.V7_3 => "7.3", ServiceVersion.V7_4 => "7.4", ServiceVersion.V7_5 => "7.5", - ServiceVersion.V7_6_Preview_1 => "7.6-preview.1", _ => throw new ArgumentException(Version.ToString()), }; } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultBackupClient.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultBackupClient.cs index 9c3ea0d922c1..36a06b4f3bec 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultBackupClient.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultBackupClient.cs @@ -123,80 +123,6 @@ public virtual KeyVaultBackupOperation StartBackup(Uri blobStorageUri, string sa } } - /// - /// Initiates a pre-backup check on the Key Vault. This operation checks if it is possible to back up the entire collection of keys from a Key Vault. - /// - /// The for the blob storage resource. - /// Optional Shared Access Signature (SAS) token to authorize access to the blob. If null, Managed Identity will be used to authenticate instead. - /// A controlling the request lifetime. - /// or is null. - /// The server returned an error. See for details returned from the server. - /// A representing the result of the asynchronous operation. - public virtual async Task StartPreBackupAsync(Uri blobStorageUri, string sasToken = default, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(blobStorageUri, nameof(blobStorageUri)); - Argument.AssertNotNull(sasToken, nameof(sasToken)); - - using DiagnosticScope scope = _diagnostics.CreateScope($"{nameof(KeyVaultBackupClient)}.{nameof(StartPreBackupAsync)}"); - scope.Start(); - try - { - var response = await _restClient.PreFullBackupAsync( - VaultUri.AbsoluteUri, - new PreBackupOperationParameters( - blobStorageUri.AbsoluteUri, - sasToken, - useManagedIdentity: sasToken == null - ), - cancellationToken).ConfigureAwait(false); - - // Should this return a KeyVaultBackupOperation? - return new KeyVaultPreBackupOperation(this, response); - } - catch (Exception ex) - { - scope.Failed(ex); - throw; - } - } - - /// - /// Initiates a pre-backup check on the Key Vault. This operation checks if it is possible to back up the entire collection of keys from a Key Vault. - /// - /// The for the blob storage resource. - /// Optional Shared Access Signature (SAS) token to authorize access to the blob. If null, Managed Identity will be used to authenticate instead. - /// A controlling the request lifetime. - /// or is null. - /// The server returned an error. See for details returned from the server. - /// A representing the result of the operation. - public virtual KeyVaultPreBackupOperation StartPreBackup(Uri blobStorageUri, string sasToken = default, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(blobStorageUri, nameof(blobStorageUri)); - Argument.AssertNotNull(sasToken, nameof(sasToken)); - - using DiagnosticScope scope = _diagnostics.CreateScope($"{nameof(KeyVaultBackupClient)}.{nameof(StartPreBackup)}"); - scope.Start(); - try - { - var response = _restClient.PreFullBackup( - VaultUri.AbsoluteUri, - new PreBackupOperationParameters( - blobStorageUri.AbsoluteUri, - sasToken, - useManagedIdentity: sasToken == null - ), - cancellationToken); - - // Should this return a KeyVaultBackupOperation? - return new KeyVaultPreBackupOperation(this, response); - } - catch (Exception ex) - { - scope.Failed(ex); - throw; - } - } - /// /// Initiates a full key restore of the Key Vault. /// @@ -237,89 +163,6 @@ public virtual async Task StartRestoreAsync(Uri folder } } - /// - /// Initiate a pre-restore check on a Key Vault. This operation checks if it is possible to restore the entire collection of keys from a Key Vault. - /// - /// - /// The for the blob storage resource, including the path to the blob container where the backup resides. - /// This would be the exact value that is returned as the result of a . - /// An example Uri may look like the following: https://contoso.blob.core.windows.net/backup/mhsm-contoso-2020090117323313. - /// - /// Optional Shared Access Signature (SAS) token to authorize access to the blob. If null, Managed Identity will be used to authenticate instead. - /// A controlling the request lifetime. - /// or is null. - /// The server returned an error. See for details returned from the server. - /// A representing the result of the asynchronous operation. - public virtual async Task StartPreRestoreAsync(Uri folderUri, string sasToken = default, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(folderUri, nameof(folderUri)); - Argument.AssertNotNull(sasToken, nameof(sasToken)); - - using DiagnosticScope scope = _diagnostics.CreateScope($"{nameof(KeyVaultBackupClient)}.{nameof(StartRestore)}"); - scope.Start(); - try - { - // Get the folder name from the backupBlobUri returned from a previous BackupOperation - ParseFolderName(folderUri, out string containerUriString, out string folderName); - - var response = await _restClient.PreFullRestoreOperationAsync( - VaultUri.AbsoluteUri, - new PreRestoreOperationParameters( - new SASTokenParameter(containerUriString, sasToken), - folderUri.AbsoluteUri - ), - cancellationToken).ConfigureAwait(false); - - return new KeyVaultPreRestoreOperation(this, response); - } - catch (Exception ex) - { - scope.Failed(ex); - throw; - } - } - - /// - /// Initiate a pre-restore check on a Key Vault. This operation checks if it is possible to restore the entire collection of keys from a Key Vault. - /// - /// - /// The for the blob storage resource, including the path to the blob container where the backup resides. - /// This would be the exact value that is returned as the result of a . - /// An example Uri path may look like the following: https://contoso.blob.core.windows.net/backup/mhsm-contoso-2020090117323313. - /// - /// Optional Shared Access Signature (SAS) token to authorize access to the blob. If null, Managed Identity will be used to authenticate instead. - /// A controlling the request lifetime. - /// or is null. - /// The server returned an error. See for details returned from the server. - /// A to wait on this long-running operation. - public virtual KeyVaultPreRestoreOperation StartPreRestore(Uri folderUri, string sasToken = default, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(folderUri, nameof(folderUri)); - Argument.AssertNotNull(sasToken, nameof(sasToken)); - - using DiagnosticScope scope = _diagnostics.CreateScope($"{nameof(KeyVaultBackupClient)}.{nameof(StartRestore)}"); - scope.Start(); - try - { - // Get the folder name from the backupBlobUri returned from a previous BackupOperation - ParseFolderName(folderUri, out string containerUriString, out string folderName); - - var response = _restClient.PreFullRestoreOperation( - VaultUri.AbsoluteUri, - new PreRestoreOperationParameters( - new SASTokenParameter(containerUriString, sasToken), - folderUri.AbsoluteUri - ), - cancellationToken); - return new KeyVaultPreRestoreOperation(this, response); - } - catch (Exception ex) - { - scope.Failed(ex); - throw; - } - } - /// /// Initiates a full key restore of the Key Vault. /// diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultPreBackupOperation.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultPreBackupOperation.cs deleted file mode 100644 index 92ed12ee8f5a..000000000000 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultPreBackupOperation.cs +++ /dev/null @@ -1,179 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using Azure.Core; -using Azure.Security.KeyVault.Administration.Models; -using System.Threading.Tasks; -using System.Threading; -using Azure.Core.Pipeline; - -namespace Azure.Security.KeyVault.Administration -{ - /// - /// A long-running operation for or . - /// - public class KeyVaultPreBackupOperation : Operation - { - /// - /// The number of seconds recommended by the service to delay before checking on completion status. - /// - internal long? _retryAfterSeconds; - private readonly KeyVaultBackupClient _client; - private Response _response; - private FullBackupDetailsInternal _value; - private readonly string _id; - private RequestFailedException _requestFailedException; - - /// - /// Creates an instance of a KeyVaultPreBackupOperation from a previously started operation. , , - /// , or must be called - /// to re-populate the details of this operation. - /// - /// An instance of . - /// The from a previous . - /// or is null. - /// is empty. - public KeyVaultPreBackupOperation(KeyVaultBackupClient client, string id) - { - Argument.AssertNotNullOrEmpty(id, nameof(id)); - Argument.AssertNotNull(client, nameof(client)); - - _client = client; - _id = id; - } - - /// - /// Initializes a new instance of a KeyVaultPreBackupOperation. - /// - /// An instance of . - /// The returned from or . - /// The server operation does not contains an Id - internal KeyVaultPreBackupOperation(KeyVaultBackupClient client, ResponseWithHeaders response) - { - _client = client; - _response = response; - _retryAfterSeconds = response.Headers.RetryAfter; - _id = response.Headers.JobId() ?? throw new InvalidOperationException("The response does not contain an Id"); - } - - /// - /// Initializes a new instance of a KeyVaultPreBackupOperation for mocking purposes. - /// - /// The that will be returned from . - /// The that will be returned from . - /// An instance of . - /// , , or is null. - internal KeyVaultPreBackupOperation(FullBackupDetailsInternal value, Response response, KeyVaultBackupClient client) - { - Argument.AssertNotNull(value, nameof(value)); - Argument.AssertNotNull(response, nameof(response)); - Argument.AssertNotNull(client, nameof(client)); - - _response = response; - _value = value; - _id = value.JobId; - _client = client; - } - - /// Initializes a new instance of for mocking. - protected KeyVaultPreBackupOperation() { } - - /// - /// The start time of the backup operation. - /// - public DateTimeOffset? StartTime => _value?.StartTime; - - /// - /// The end time of the backup operation. - /// - public DateTimeOffset? EndTime => _value?.EndTime; - - /// - public override string Id => _id; - - /// - /// Gets the of the backup operation. - /// You should await before attempting to use a key in this pending state. - /// - public override KeyVaultBackupResult Value - { - get - { -#pragma warning disable CA1065 // Do not raise exceptions in unexpected locations - if (!HasCompleted) - { - throw new InvalidOperationException("The operation is not complete."); - } - if (_requestFailedException != null) - { - throw _requestFailedException; - } -#pragma warning restore CA1065 // Do not raise exceptions in unexpected locations - return new KeyVaultBackupResult(new Uri(_value.AzureStorageBlobContainerUri), _value.StartTime.Value, _value.EndTime.Value); - } - } - - /// - public override bool HasCompleted => _value?.EndTime.HasValue ?? false; - - /// - public override bool HasValue => _response != null && _value?.Error == null && HasCompleted; - - /// - public override Response GetRawResponse() => _response; - - /// - public override Response UpdateStatus(CancellationToken cancellationToken = default) => - UpdateStatusAsync(false, cancellationToken).EnsureCompleted(); - - /// - public override async ValueTask UpdateStatusAsync(CancellationToken cancellationToken = default) => - await UpdateStatusAsync(true, cancellationToken).ConfigureAwait(false); - - private async ValueTask UpdateStatusAsync(bool async, CancellationToken cancellationToken = default) - { - if (!HasCompleted) - { - try - { - Response response = async ? - await _client.GetBackupDetailsAsync(Id, cancellationToken).ConfigureAwait(false) - : _client.GetBackupDetails(Id, cancellationToken); - - _value = response.Value; - _response = response.GetRawResponse(); - } - catch (RequestFailedException ex) - { - _requestFailedException = ex; - throw; - } - catch (Exception ex) - { - _requestFailedException = new RequestFailedException("Unexpected failure", ex); - throw _requestFailedException; - } - - if (_value != null && _value.EndTime.HasValue && _value.Error != null) - { - _requestFailedException = _response != null ? - new RequestFailedException(_response) - : new RequestFailedException($"{_value.Error.Message}\nInnerError: {_value.Error.InnerError}\nCode: {_value.Error.Code}"); - throw _requestFailedException; - } - } - - return GetRawResponse(); - } - - /// - public override ValueTask> WaitForCompletionAsync(CancellationToken cancellationToken = default) => - _retryAfterSeconds.HasValue ? this.DefaultWaitForCompletionAsync(TimeSpan.FromSeconds(_retryAfterSeconds.Value), cancellationToken) : - this.DefaultWaitForCompletionAsync(cancellationToken); - - /// - public override ValueTask> WaitForCompletionAsync(TimeSpan pollingInterval, CancellationToken cancellationToken) => - this.DefaultWaitForCompletionAsync(pollingInterval, cancellationToken); - } -} diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultPreRestoreOperation.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultPreRestoreOperation.cs deleted file mode 100644 index f0e236b47af7..000000000000 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultPreRestoreOperation.cs +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Security.KeyVault.Administration.Models; - -namespace Azure.Security.KeyVault.Administration -{ - /// - /// A long-running operation for or . - /// - public class KeyVaultPreRestoreOperation : Operation - { - internal readonly RestoreOperationInternal _operationInternal; - - /// - /// Creates an instance of a KeyVaultPreRestoreOperation from a previously started operation. , , - /// , or must be called - /// to re-populate the details of this operation. - /// - /// An instance of . - /// The from a previous . - /// or is null. - /// is empty. - public KeyVaultPreRestoreOperation(KeyVaultBackupClient client, string id) - { - Argument.AssertNotNull(client, nameof(client)); - Argument.AssertNotNullOrEmpty(id, nameof(id)); - - _operationInternal = new RestoreOperationInternal(client, id); - } - - /// - /// Initializes a new instance of the class. - /// - /// An instance of . - /// The returned from or . - /// or is null. - internal KeyVaultPreRestoreOperation(KeyVaultBackupClient client, ResponseWithHeaders response) - { - Argument.AssertNotNull(client, nameof(client)); - Argument.AssertNotNull(response, nameof(response)); - - _operationInternal = new RestoreOperationInternal(client, response); - } - - /// - /// Initializes a new instance of a KeyVaultPreRestoreOperation for mocking purposes. - /// - /// The that will be used to populate various properties. - /// The that will be returned from . - /// An instance of . - /// or or is null. - internal KeyVaultPreRestoreOperation(RestoreDetailsInternal value, Response response, KeyVaultBackupClient client) - { - Argument.AssertNotNull(value, nameof(value)); - Argument.AssertNotNull(response, nameof(response)); - Argument.AssertNotNull(client, nameof(client)); - - _operationInternal = new RestoreOperationInternal(value, response, client); - } - - /// Initializes a new instance of for mocking. - protected KeyVaultPreRestoreOperation() {} - - /// - /// The start time of the restore operation. - /// - public DateTimeOffset? StartTime => _operationInternal.StartTime; - - /// - /// The end time of the restore operation. - /// - public DateTimeOffset? EndTime => _operationInternal.EndTime; - - /// - public override string Id => _operationInternal.Id; - /// - public override KeyVaultRestoreResult Value => _operationInternal.Value; - - /// - public override bool HasCompleted => _operationInternal.HasCompleted; - - /// - public override bool HasValue => _operationInternal.HasValue; - - /// - public override Response GetRawResponse() => _operationInternal.GetRawResponse(); - - /// - public override Response UpdateStatus(CancellationToken cancellationToken = default) => _operationInternal.UpdateStatus(cancellationToken); - - /// - public override async ValueTask UpdateStatusAsync(CancellationToken cancellationToken = default) => await _operationInternal.UpdateStatusAsync(cancellationToken).ConfigureAwait(false); - - /// - public override ValueTask> WaitForCompletionAsync(CancellationToken cancellationToken = default) => - _operationInternal.WaitForCompletionAsync(cancellationToken); - - /// - public override ValueTask> WaitForCompletionAsync(TimeSpan pollingInterval, CancellationToken cancellationToken) => - _operationInternal.WaitForCompletionAsync(pollingInterval, cancellationToken); - } -} diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/OperationHeadersExtensions.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/OperationHeadersExtensions.cs index dba73a3eb443..aa3687c4c5f4 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/OperationHeadersExtensions.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/OperationHeadersExtensions.cs @@ -16,24 +16,6 @@ public static string JobId(this AzureSecurityKeyVaultAdministrationFullBackupHea return GetJobIdFromAzureAsyncOperation(header.AzureAsyncOperation); } - /// - /// Extracts the operation JobId from the AzureAsyncOperation. - /// - /// The operation JobId. - public static string JobId(this AzureSecurityKeyVaultAdministrationPreFullBackupHeaders header) - { - return GetJobIdFromAzureAsyncOperation(header.AzureAsyncOperation); - } - - /// - /// Extracts the operation JobId from the AzureAsyncOperation. - /// - /// The operation JobId. - public static string JobId(this AzureSecurityKeyVaultAdministrationPreFullRestoreOperationHeaders header) - { - return GetJobIdFromAzureAsyncOperation(header.AzureAsyncOperation); - } - /// /// Extracts the operation JobId from the AzureAsyncOperation. /// diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/PreRestoreOperationParameters.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/PreRestoreOperationParameters.cs deleted file mode 100644 index aac8dd35968d..000000000000 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/PreRestoreOperationParameters.cs +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -namespace Azure.Security.KeyVault.Administration.Models -{ - // Transform the PreBackupOperationParameters model to an internal class. - internal partial class PreRestoreOperationParameters - { } -} diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/RestoreOperationInternal.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/RestoreOperationInternal.cs index bfb7d460b44b..dfff9a186646 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/RestoreOperationInternal.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/RestoreOperationInternal.cs @@ -65,11 +65,6 @@ internal RestoreOperationInternal(KeyVaultBackupClient client, ResponseWithHeade _id = selectiveRestoreHeaders.Headers.JobId() ?? throw new InvalidOperationException("The response does not contain an Id"); _retryAfterSeconds = selectiveRestoreHeaders.Headers.RetryAfter; } - else if (response is ResponseWithHeaders preRestoreHeaders) - { - _id = preRestoreHeaders.Headers.JobId() ?? throw new InvalidOperationException("The response does not contain an Id"); - _retryAfterSeconds = (int)preRestoreHeaders.Headers.RetryAfter; - } else { throw new ArgumentException("Invalid header type", nameof(response)); diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/autorest.md b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/autorest.md index 58678e5a0652..4135789b16a2 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/autorest.md +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/autorest.md @@ -9,9 +9,9 @@ Run `dotnet build /t:GenerateCode` in src directory to re-generate. ``` yaml title: Azure.Security.KeyVault.Administration input-file: -- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/8af9817c15d688c941cda106758045b5deb9a069/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.6-preview.1/rbac.json -- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/8af9817c15d688c941cda106758045b5deb9a069/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.6-preview.1/backuprestore.json -- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/8af9817c15d688c941cda106758045b5deb9a069/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.6-preview.1/settings.json +- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/7452e1cc7db72fbc6cd9539b390d8b8e5c2a1864/specification/keyvault/data-plane/Microsoft.KeyVault/stable/7.5/rbac.json +- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/7452e1cc7db72fbc6cd9539b390d8b8e5c2a1864/specification/keyvault/data-plane/Microsoft.KeyVault/stable/7.5/backuprestore.json +- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/7452e1cc7db72fbc6cd9539b390d8b8e5c2a1864/specification/keyvault/data-plane/Microsoft.KeyVault/stable/7.5/settings.json namespace: Azure.Security.KeyVault.Administration generation1-convenience-client: true include-csproj: disable diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/AdministrationTestBase.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/AdministrationTestBase.cs index 57860b6ff99b..9cd66922f472 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/AdministrationTestBase.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/AdministrationTestBase.cs @@ -16,7 +16,6 @@ namespace Azure.Security.KeyVault.Administration.Tests /// Base class for recorded Administration tests. ///
[ClientTestFixture( - KeyVaultAdministrationClientOptions.ServiceVersion.V7_6_Preview_1, KeyVaultAdministrationClientOptions.ServiceVersion.V7_5, KeyVaultAdministrationClientOptions.ServiceVersion.V7_4, KeyVaultAdministrationClientOptions.ServiceVersion.V7_3, diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/ContinuousAccessEvaluationTests.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/ContinuousAccessEvaluationTests.cs new file mode 100644 index 000000000000..e086160b485d --- /dev/null +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/ContinuousAccessEvaluationTests.cs @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core.TestFramework; +using Azure.Security.KeyVault.Tests; +using NUnit.Framework; + +namespace Azure.Security.KeyVault.Administration.Tests +{ + [NonParallelizable] + internal class ContinuousAccessEvaluationTests : ContinuousAccessEvaluationTestsBase + { + [SetUp] + public void Setup() + { + ChallengeBasedAuthenticationPolicy.ClearCache(); + } + + [Test] + [TestCase(@"Bearer realm="""", authorization_uri=""https://login.microsoftonline.com/common/oauth2/authorize"", error=""insufficient_claims"", claims=""eyJhY2Nlc3NfdG9rZW4iOnsibmJmIjp7ImVzc2VudGlhbCI6dHJ1ZSwidmFsdWUiOiIxNzI2MDc3NTk1In0sInhtc19jYWVlcnJvciI6eyJ2YWx1ZSI6IjEwMDEyIn19fQ==""", """{"access_token":{"nbf":{"essential":true,"value":"1726077595"},"xms_caeerror":{"value":"10012"}}}""")] + public async Task VerifyCaeClaims(string challenge, string expectedClaims) + { + int callCount = 0; + + MockResponse response = new MockResponse(200); + + MockTransport transport = GetMockTransportWithCaeChallenges(numberOfCaeChallenges: 1, final200response: response); + + var credential = new TokenCredentialStub((r, c) => + { + if (callCount == 0) + { + // The first challenge should not have any claims. + Assert.IsNull(r.Claims); + } + else if (callCount == 1) + { + Assert.AreEqual(expectedClaims, r.Claims); + } + else + { + Assert.Fail("unexpected token request"); + } + Interlocked.Increment(ref callCount); + Assert.AreEqual(true, r.IsCaeEnabled); + + return new(callCount.ToString(), DateTimeOffset.Now.AddHours(2)); + }, true); + + KeyVaultBackupClient client = new( + VaultUri, + credential, + new KeyVaultAdministrationClientOptions() + { + Transport = transport, + }); + + try + { + KeyVaultBackupOperation operation = await client.StartBackupAsync(VaultUri); + } + catch (RequestFailedException ex) + { + Assert.AreEqual(200, ex.Status); + return; + } + catch (Exception ex) + { + Assert.Fail($"Expected RequestFailedException, but got {ex.GetType()}"); + return; + } + } + + [Test] + public void ThrowsWithTwoConsecutiveCaeChallenges() + { + MockTransport keyVaultTransport = GetMockTransportWithCaeChallenges(numberOfCaeChallenges: 2); + + MockTransport credentialTransport = GetMockCredentialTransport(2); + + KeyVaultBackupClient client = new( + VaultUri, + new MockCredential(credentialTransport), + new KeyVaultAdministrationClientOptions() + { + Transport = keyVaultTransport, + }); + + try + { + var operation = client.StartBackup(VaultUri); + } + catch (RequestFailedException ex) + { + Assert.AreEqual(401, ex.Status); + return; + } + catch (Exception ex) + { + Assert.Fail($"Expected RequestFailedException, but got {ex.GetType()}"); + return; + } + Assert.Fail("Expected RequestFailedException, but no exception was thrown."); + } + } +} diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/FullBackupClientLiveTests.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/FullBackupClientLiveTests.cs index bc4e404c519c..17087ce4e551 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/FullBackupClientLiveTests.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/FullBackupClientLiveTests.cs @@ -50,36 +50,6 @@ public async Task BackupAndRestore() Assert.That(restoreOperation.HasValue, Is.True); } - [RecordedTest] - [Ignore("Service preview is not available yet.")] - public async Task PreBackupAndPreRestore() - { - var source = new CancellationTokenSource(Timeout); - - UriBuilder builder = new UriBuilder(TestEnvironment.StorageUri); - builder.Path = BlobContainerName; - - // Start the pre-backup operation. - KeyVaultPreBackupOperation preBackupOperation = await Client.StartPreBackupAsync(builder.Uri, "?" + SasToken, source.Token); - - KeyVaultBackupResult preBackupResult = await preBackupOperation.WaitForCompletionAsync(source.Token); - - await WaitForOperationAsync(); - - Assert.That(source.IsCancellationRequested, Is.False); - Assert.That(preBackupResult, Is.Not.Null); - Assert.That(preBackupOperation.HasValue, Is.True); - - // Start the pre-restore operation. - KeyVaultPreRestoreOperation preRestoreOperation = await Client.StartPreRestoreAsync(preBackupResult.FolderUri, "?" + SasToken, source.Token); - KeyVaultRestoreResult preRestoreResult = await preRestoreOperation.WaitForCompletionAsync(source.Token); - await WaitForOperationAsync(); - - Assert.That(source.IsCancellationRequested, Is.False); - Assert.That(preRestoreResult, Is.Not.Null); - Assert.That(preRestoreOperation.HasValue, Is.True); - } - [RecordedTest] [LiveOnly] [Ignore("https://github.com/Azure/azure-sdk-for-net/issues/35614")] diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/samples/Sample1_BackupHelloWorld.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/samples/Sample1_BackupHelloWorld.cs index b070f3048b93..139819a4b099 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/samples/Sample1_BackupHelloWorld.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/samples/Sample1_BackupHelloWorld.cs @@ -71,61 +71,6 @@ public async Task BackupAndRestoreSampleAsync() await WaitForOperationAsync(); } - [RecordedTest] - [AsyncOnly] - [Ignore("Service preview is not available yet")] - public async Task PreBackupAndPreRestoreSampleAsync() - { - var blobStorageUrl = TestEnvironment.StorageUri; - var blobContainerName = BlobContainerName; - var sasToken = "?" + SasToken; - - // Create a Uri with the storage container - UriBuilder builder = new UriBuilder(blobStorageUrl) - { - Path = blobContainerName, - }; - - // Check for backup readiness. - KeyVaultPreBackupOperation backupOperation = await Client.StartPreBackupAsync(builder.Uri, sasToken); - - // Wait for completion of the PreBackupOperation. - Response backupResult = await backupOperation.WaitForCompletionAsync(); - - // Check if the PreBackupOperation has completed successfully. - Uri folderUri = backupOperation.HasValue ? backupResult.Value.FolderUri : null; - - if (folderUri is null) - { - Console.WriteLine($"Backup operation failed. Status: {backupOperation.GetRawResponse().Status}, Reason: {backupOperation.GetRawResponse().ReasonPhrase}"); - } - - Assert.That(folderUri, Is.Not.Null); - Assert.That(backupOperation.HasValue, Is.True); - - await WaitForOperationAsync(); - - // Check for restore readiness using the backupBlobUri returned from a previous BackupOperation. - KeyVaultPreRestoreOperation preRestoreOperation = await Client.StartPreRestoreAsync(folderUri, sasToken); - - // Wait for completion of the PreRestoreOperation. - Response preRestoreResult = await preRestoreOperation.WaitForCompletionAsync(); - - // Check if the PreRestoreOperation has completed successfully. - if (preRestoreOperation.HasValue) - { - Console.WriteLine($"Pre-restore operation completed successfully. Status: {preRestoreOperation.GetRawResponse().Status}"); - } - else - { - Console.WriteLine($"Pre-restore operation failed. Status: {preRestoreOperation.GetRawResponse().Status}, Reason: {preRestoreOperation.GetRawResponse().ReasonPhrase}"); - } - - Assert.That(preRestoreOperation.HasValue, Is.True); - Assert.That(preRestoreResult.Value.StartTime, Is.Not.EqualTo(default)); - Assert.That(preRestoreResult.Value.EndTime, Is.Not.EqualTo(default)); - } - [RecordedTest] [SyncOnly] public async Task BackupAndRestoreSampleSync() diff --git a/sdk/keyvault/Azure.Security.KeyVault.Certificates/CHANGELOG.md b/sdk/keyvault/Azure.Security.KeyVault.Certificates/CHANGELOG.md index 917ca4d22e1d..475a6b0c637d 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Certificates/CHANGELOG.md +++ b/sdk/keyvault/Azure.Security.KeyVault.Certificates/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 4.7.0-beta.1 (Unreleased) +## 4.8.0-beta.1 (Unreleased) ### Features Added @@ -10,7 +10,11 @@ ### Other Changes -- The default service version is now "V7_6_Preview_1". +## 4.7.0 (2024-10-14) + +### Features Added + +- Support for Continuous Access Evaluation (CAE). ## 4.6.0 (2024-02-14) @@ -19,7 +23,7 @@ Changes from both the last release and the last beta include: ### Features Added - Added `CertificateProperties.X509ThumbprintString` to return the hexadecimal string representation of the SHA-1 hash of the certificate. - `CertificateProperties.X509Thumbprint` has been hidden but is still available. + `CertificateProperties.X509Thumbprint` has been hidden but is still available. ### Breaking Changes @@ -48,7 +52,7 @@ Changes from both the last release and the last beta include: ### Features Added - Added `CertificateProperties.X509ThumbprintString` to return the hexadecimal string representation of the SHA-1 hash of the certificate. - `CertificateProperties.X509Thumbprint` has been hidden but is still available. + `CertificateProperties.X509Thumbprint` has been hidden but is still available. ### Breaking Changes @@ -96,8 +100,8 @@ Changes from both the last release and the last beta include: ### Breaking Changes - Verify the challenge resource matches the vault domain. - This should affect few customers who can set `CertificateClientOptions.DisableChallengeResourceVerification` to `true` to disable. - See for more information. + This should affect few customers who can set `CertificateClientOptions.DisableChallengeResourceVerification` to `true` to disable. + See https://aka.ms/azsdk/blog/vault-uri for more information. ## 4.3.0 (2022-03-24) diff --git a/sdk/keyvault/Azure.Security.KeyVault.Certificates/api/Azure.Security.KeyVault.Certificates.netstandard2.0.cs b/sdk/keyvault/Azure.Security.KeyVault.Certificates/api/Azure.Security.KeyVault.Certificates.netstandard2.0.cs index f24667ced66e..8ba696e10ee1 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Certificates/api/Azure.Security.KeyVault.Certificates.netstandard2.0.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Certificates/api/Azure.Security.KeyVault.Certificates.netstandard2.0.cs @@ -73,7 +73,7 @@ public CertificateClient(System.Uri vaultUri, Azure.Core.TokenCredential credent } public partial class CertificateClientOptions : Azure.Core.ClientOptions { - public CertificateClientOptions(Azure.Security.KeyVault.Certificates.CertificateClientOptions.ServiceVersion version = Azure.Security.KeyVault.Certificates.CertificateClientOptions.ServiceVersion.V7_6_Preview_1) { } + public CertificateClientOptions(Azure.Security.KeyVault.Certificates.CertificateClientOptions.ServiceVersion version = Azure.Security.KeyVault.Certificates.CertificateClientOptions.ServiceVersion.V7_5) { } public bool DisableChallengeResourceVerification { get { throw null; } set { } } public Azure.Security.KeyVault.Certificates.CertificateClientOptions.ServiceVersion Version { get { throw null; } } public enum ServiceVersion @@ -84,7 +84,6 @@ public enum ServiceVersion V7_3 = 3, V7_4 = 4, V7_5 = 5, - V7_6_Preview_1 = 6, } } public partial class CertificateContact diff --git a/sdk/keyvault/Azure.Security.KeyVault.Certificates/assets.json b/sdk/keyvault/Azure.Security.KeyVault.Certificates/assets.json index ceae51646e6a..3d555e91ec26 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Certificates/assets.json +++ b/sdk/keyvault/Azure.Security.KeyVault.Certificates/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/keyvault/Azure.Security.KeyVault.Certificates", - "Tag": "net/keyvault/Azure.Security.KeyVault.Certificates_11a73707a2" + "Tag": "net/keyvault/Azure.Security.KeyVault.Certificates_320abaee9a" } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Certificates/src/Azure.Security.KeyVault.Certificates.csproj b/sdk/keyvault/Azure.Security.KeyVault.Certificates/src/Azure.Security.KeyVault.Certificates.csproj index f72af4af5a1c..b0dbc46a27a8 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Certificates/src/Azure.Security.KeyVault.Certificates.csproj +++ b/sdk/keyvault/Azure.Security.KeyVault.Certificates/src/Azure.Security.KeyVault.Certificates.csproj @@ -3,9 +3,9 @@ This is the Microsoft Azure Key Vault Certificates client library Microsoft Azure.Security.KeyVault.Certificates client library - 4.7.0-beta.1 + 4.8.0-beta.1 - 4.6.0 + 4.7.0 Microsoft Azure Key Vault Certificates;$(PackageCommonTags) $(RequiredTargetFrameworks) $(NoWarn);3021 diff --git a/sdk/keyvault/Azure.Security.KeyVault.Certificates/src/CertificateClientOptions.cs b/sdk/keyvault/Azure.Security.KeyVault.Certificates/src/CertificateClientOptions.cs index d90bf176b648..b63f82c4cf56 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Certificates/src/CertificateClientOptions.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Certificates/src/CertificateClientOptions.cs @@ -16,7 +16,7 @@ public class CertificateClientOptions : ClientOptions /// For more information, see /// Key Vault versions. ///
- internal const ServiceVersion LatestVersion = ServiceVersion.V7_6_Preview_1; + internal const ServiceVersion LatestVersion = ServiceVersion.V7_5; /// /// The versions of Azure Key Vault supported by this client @@ -54,11 +54,6 @@ public enum ServiceVersion /// The Key Vault API version 7.5. /// V7_5 = 5, - - /// - /// The Key Vault API version V7_6_Preview_1. - /// - V7_6_Preview_1 = 6, #pragma warning restore CA1707 // Identifiers should not contain underscores } @@ -99,7 +94,6 @@ internal string GetVersionString() ServiceVersion.V7_3 => "7.3", ServiceVersion.V7_4 => "7.4", ServiceVersion.V7_5 => "7.5", - ServiceVersion.V7_6_Preview_1 => "7.6-preview.1", _ => throw new ArgumentException(Version.ToString()), }; } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Certificates/tests/CertificatesTestBase.cs b/sdk/keyvault/Azure.Security.KeyVault.Certificates/tests/CertificatesTestBase.cs index 6620b70d41c5..b38b255f8363 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Certificates/tests/CertificatesTestBase.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Certificates/tests/CertificatesTestBase.cs @@ -13,7 +13,6 @@ namespace Azure.Security.KeyVault.Certificates.Tests { [ClientTestFixture( - CertificateClientOptions.ServiceVersion.V7_6_Preview_1, CertificateClientOptions.ServiceVersion.V7_5, CertificateClientOptions.ServiceVersion.V7_4, CertificateClientOptions.ServiceVersion.V7_3, diff --git a/sdk/keyvault/Azure.Security.KeyVault.Certificates/tests/ContinuousAccessEvaluationTests.cs b/sdk/keyvault/Azure.Security.KeyVault.Certificates/tests/ContinuousAccessEvaluationTests.cs new file mode 100644 index 000000000000..27fca350ee8d --- /dev/null +++ b/sdk/keyvault/Azure.Security.KeyVault.Certificates/tests/ContinuousAccessEvaluationTests.cs @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core.TestFramework; +using Azure.Security.KeyVault.Tests; +using NUnit.Framework; + +namespace Azure.Security.KeyVault.Certificates.Tests +{ + [NonParallelizable] + internal class ContinuousAccessEvaluationTests : ContinuousAccessEvaluationTestsBase + { + [SetUp] + public void Setup() + { + ChallengeBasedAuthenticationPolicy.ClearCache(); + } + + [Test] + [TestCase(@"Bearer realm="""", authorization_uri=""https://login.microsoftonline.com/common/oauth2/authorize"", error=""insufficient_claims"", claims=""eyJhY2Nlc3NfdG9rZW4iOnsibmJmIjp7ImVzc2VudGlhbCI6dHJ1ZSwidmFsdWUiOiIxNzI2MDc3NTk1In0sInhtc19jYWVlcnJvciI6eyJ2YWx1ZSI6IjEwMDEyIn19fQ==""", """{"access_token":{"nbf":{"essential":true,"value":"1726077595"},"xms_caeerror":{"value":"10012"}}}""")] + public async Task VerifyCaeClaims(string challenge, string expectedClaims) + { + int callCount = 0; + + MockResponse responseWithSecret = new MockResponse(200) + .WithContent(@"{ + ""id"": ""https://foo.vault.azure.net/certificates/1/foo"", + ""cer"": ""Zm9v"", + ""attributes"": { + }, + ""pending"": { + ""id"": ""foo"" + } + }"); + + MockTransport transport = GetMockTransportWithCaeChallenges(numberOfCaeChallenges: 1, final200response: responseWithSecret); + + var credential = new TokenCredentialStub((r, c) => + { + if (callCount == 0) + { + // The first challenge should not have any claims. + Assert.IsNull(r.Claims); + } + else if (callCount == 1) + { + Assert.AreEqual(expectedClaims, r.Claims); + } + else + { + Assert.Fail("unexpected token request"); + } + Interlocked.Increment(ref callCount); + Assert.AreEqual(true, r.IsCaeEnabled); + + return new(callCount.ToString(), DateTimeOffset.Now.AddHours(2)); + }, true); + + CertificateClient client = new( + VaultUri, + credential, + new CertificateClientOptions() + { + Transport = transport, + }); + + Response response = await client.GetCertificateAsync("certificate"); + Assert.AreEqual(200, response.GetRawResponse().Status); + } + + [Test] + public void ThrowsWithTwoConsecutiveCaeChallenges() + { + MockTransport keyVaultTransport = GetMockTransportWithCaeChallenges(numberOfCaeChallenges: 2); + + MockTransport credentialTransport = GetMockCredentialTransport(2); + + CertificateClient client = new( + VaultUri, + new MockCredential(credentialTransport), + new CertificateClientOptions() + { + Transport = keyVaultTransport, + }); + + try + { + client.GetCertificate("certificate"); + } + catch (RequestFailedException ex) + { + Assert.AreEqual(401, ex.Status); + return; + } + catch (Exception ex) + { + Assert.Fail($"Expected RequestFailedException, but got {ex.GetType()}"); + return; + } + Assert.Fail("Expected RequestFailedException, but no exception was thrown."); + } + } +} diff --git a/sdk/keyvault/Azure.Security.KeyVault.Keys/CHANGELOG.md b/sdk/keyvault/Azure.Security.KeyVault.Keys/CHANGELOG.md index 1734a9546135..6168e557c6d1 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Keys/CHANGELOG.md +++ b/sdk/keyvault/Azure.Security.KeyVault.Keys/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 4.7.0-beta.1 (Unreleased) +## 4.8.0-beta.1 (Unreleased) ### Features Added @@ -10,7 +10,11 @@ ### Other Changes -- The default service version is now "V7_6_Preview_1". +## 4.7.0 (2024-10-14) + +### Features Added + +- Support for Continuous Access Evaluation (CAE). ## 4.6.0 (2024-02-14) @@ -108,7 +112,7 @@ The following changes are only breaking from the previous beta. They are not bre - Verify the challenge resource matches the vault domain. This should affect few customers who can set `KeyClientOptions.DisableChallengeResourceVerification` or `CryptographyClientOptions.DisableChallengeResourceVerification` to `true` to disable. - See for more information. + See https://aka.ms/azsdk/blog/vault-uri for more information. ## 4.3.0 (2022-03-24) @@ -399,7 +403,7 @@ Changes from both the last release and the last beta include: Version 4.0.0-preview.1 is the first preview of our efforts to create a user-friendly client library for Azure Key Vault. For more information about preview releases of other Azure SDK libraries, please visit -. +https://aka.ms/azure-sdk-preview1-net. This library is not a direct replacement for `Microsoft.Azure.KeyVault`. Applications using that library would require code changes to use `Azure.Security.KeyVault.Keys`. @@ -424,7 +428,7 @@ only). [Azure Identity documentation](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/identity/Azure.Identity) for more information -### `Microsoft.Azure.KeyVault` features not implemented in this release +### `Microsoft.Azure.KeyVault` features not implemented in this release: - Certificate management APIs - Cryptographic operations, e.g. sign, un/wrap, verify, en- and diff --git a/sdk/keyvault/Azure.Security.KeyVault.Keys/api/Azure.Security.KeyVault.Keys.netstandard2.0.cs b/sdk/keyvault/Azure.Security.KeyVault.Keys/api/Azure.Security.KeyVault.Keys.netstandard2.0.cs index 77b3469313e9..c33c46631e8a 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Keys/api/Azure.Security.KeyVault.Keys.netstandard2.0.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Keys/api/Azure.Security.KeyVault.Keys.netstandard2.0.cs @@ -159,7 +159,7 @@ public KeyClient(System.Uri vaultUri, Azure.Core.TokenCredential credential, Azu } public partial class KeyClientOptions : Azure.Core.ClientOptions { - public KeyClientOptions(Azure.Security.KeyVault.Keys.KeyClientOptions.ServiceVersion version = Azure.Security.KeyVault.Keys.KeyClientOptions.ServiceVersion.V7_6_Preview_1) { } + public KeyClientOptions(Azure.Security.KeyVault.Keys.KeyClientOptions.ServiceVersion version = Azure.Security.KeyVault.Keys.KeyClientOptions.ServiceVersion.V7_5) { } public bool DisableChallengeResourceVerification { get { throw null; } set { } } public Azure.Security.KeyVault.Keys.KeyClientOptions.ServiceVersion Version { get { throw null; } } public enum ServiceVersion @@ -170,7 +170,6 @@ public enum ServiceVersion V7_3 = 3, V7_4 = 4, V7_5 = 5, - V7_6_Preview_1 = 6, } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] @@ -430,7 +429,7 @@ public CryptographyClient(System.Uri keyId, Azure.Core.TokenCredential credentia } public partial class CryptographyClientOptions : Azure.Core.ClientOptions { - public CryptographyClientOptions(Azure.Security.KeyVault.Keys.Cryptography.CryptographyClientOptions.ServiceVersion version = Azure.Security.KeyVault.Keys.Cryptography.CryptographyClientOptions.ServiceVersion.V7_6_Preview_1) { } + public CryptographyClientOptions(Azure.Security.KeyVault.Keys.Cryptography.CryptographyClientOptions.ServiceVersion version = Azure.Security.KeyVault.Keys.Cryptography.CryptographyClientOptions.ServiceVersion.V7_5) { } public bool DisableChallengeResourceVerification { get { throw null; } set { } } public Azure.Security.KeyVault.Keys.Cryptography.CryptographyClientOptions.ServiceVersion Version { get { throw null; } } public enum ServiceVersion @@ -441,7 +440,6 @@ public enum ServiceVersion V7_3 = 3, V7_4 = 4, V7_5 = 5, - V7_6_Preview_1 = 6, } } public partial class DecryptParameters diff --git a/sdk/keyvault/Azure.Security.KeyVault.Keys/assets.json b/sdk/keyvault/Azure.Security.KeyVault.Keys/assets.json index 23e1dd31e631..59c5d87f82ee 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Keys/assets.json +++ b/sdk/keyvault/Azure.Security.KeyVault.Keys/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/keyvault/Azure.Security.KeyVault.Keys", - "Tag": "net/keyvault/Azure.Security.KeyVault.Keys_5dc33e5113" + "Tag": "net/keyvault/Azure.Security.KeyVault.Keys_a8557a0a67" } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Keys/src/Azure.Security.KeyVault.Keys.csproj b/sdk/keyvault/Azure.Security.KeyVault.Keys/src/Azure.Security.KeyVault.Keys.csproj index 6fbfcee10509..d6b592077a20 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Keys/src/Azure.Security.KeyVault.Keys.csproj +++ b/sdk/keyvault/Azure.Security.KeyVault.Keys/src/Azure.Security.KeyVault.Keys.csproj @@ -3,9 +3,9 @@ This is the Microsoft Azure Key Vault Keys client library Microsoft Azure.Security.KeyVault.Keys client library - 4.7.0-beta.1 + 4.8.0-beta.1 - 4.6.0 + 4.7.0 Microsoft Azure Key Vault Keys;$(PackageCommonTags) $(RequiredTargetFrameworks) diff --git a/sdk/keyvault/Azure.Security.KeyVault.Keys/src/Cryptography/CryptographyClientOptions.cs b/sdk/keyvault/Azure.Security.KeyVault.Keys/src/Cryptography/CryptographyClientOptions.cs index e4e3d9f68105..ebc5f47514f5 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Keys/src/Cryptography/CryptographyClientOptions.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Keys/src/Cryptography/CryptographyClientOptions.cs @@ -16,7 +16,7 @@ public class CryptographyClientOptions : ClientOptions /// For more information, see /// Key Vault versions. ///
- internal const ServiceVersion LatestVersion = ServiceVersion.V7_6_Preview_1; + internal const ServiceVersion LatestVersion = ServiceVersion.V7_5; /// /// The versions of Azure Key Vault supported by this client @@ -54,11 +54,6 @@ public enum ServiceVersion /// The Key Vault API version 7.5. /// V7_5 = 5, - - /// - /// The Key Vault API version 7.6-preview.1. - /// - V7_6_Preview_1 = 6, #pragma warning restore CA1707 // Identifiers should not contain underscores } @@ -99,7 +94,6 @@ internal string GetVersionString() ServiceVersion.V7_3 => "7.3", ServiceVersion.V7_4 => "7.4", ServiceVersion.V7_5 => "7.5", - ServiceVersion.V7_6_Preview_1 => "7.6-preview.1", _ => throw new ArgumentException(Version.ToString()), }; } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Keys/src/KeyClientOptions.cs b/sdk/keyvault/Azure.Security.KeyVault.Keys/src/KeyClientOptions.cs index 53af4ace6a14..0a423f973438 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Keys/src/KeyClientOptions.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Keys/src/KeyClientOptions.cs @@ -16,7 +16,7 @@ public class KeyClientOptions : ClientOptions /// For more information, see /// Key Vault versions. ///
- internal const ServiceVersion LatestVersion = ServiceVersion.V7_6_Preview_1; + internal const ServiceVersion LatestVersion = ServiceVersion.V7_5; /// /// The versions of Azure Key Vault supported by this client @@ -54,11 +54,6 @@ public enum ServiceVersion /// The Key Vault API version 7.5. /// V7_5 = 5, - - /// - /// The Key Vault API version V7_6_Preview_1. - /// - V7_6_Preview_1 = 6, #pragma warning restore CA1707 // Identifiers should not contain underscores } @@ -99,7 +94,6 @@ internal string GetVersionString() ServiceVersion.V7_3 => "7.3", ServiceVersion.V7_4 => "7.4", ServiceVersion.V7_5 => "7.5", - ServiceVersion.V7_6_Preview_1 => "7.6-preview.1", _ => throw new ArgumentException(Version.ToString()), }; } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Keys/src/KeyRotationLifetimeAction.cs b/sdk/keyvault/Azure.Security.KeyVault.Keys/src/KeyRotationLifetimeAction.cs index 34499114c71d..8b6baff2d325 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Keys/src/KeyRotationLifetimeAction.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Keys/src/KeyRotationLifetimeAction.cs @@ -37,7 +37,6 @@ internal KeyRotationLifetimeAction() /// /// Gets the that will be executed. - /// The value is compared case-insensitively by the service. /// public KeyRotationPolicyAction Action { get; private set; } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Keys/tests/ContinuousAccessEvaluationTests.cs b/sdk/keyvault/Azure.Security.KeyVault.Keys/tests/ContinuousAccessEvaluationTests.cs new file mode 100644 index 000000000000..6f227b954781 --- /dev/null +++ b/sdk/keyvault/Azure.Security.KeyVault.Keys/tests/ContinuousAccessEvaluationTests.cs @@ -0,0 +1,120 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core.TestFramework; +using Azure.Security.KeyVault.Tests; +using NUnit.Framework; + +namespace Azure.Security.KeyVault.Keys.Tests +{ + [NonParallelizable] + internal class ContinuousAccessEvaluationTests : ContinuousAccessEvaluationTestsBase + { + [SetUp] + public void Setup() + { + ChallengeBasedAuthenticationPolicy.ClearCache(); + } + + [Test] + [TestCase(@"Bearer realm="""", authorization_uri=""https://login.microsoftonline.com/common/oauth2/authorize"", error=""insufficient_claims"", claims=""eyJhY2Nlc3NfdG9rZW4iOnsibmJmIjp7ImVzc2VudGlhbCI6dHJ1ZSwidmFsdWUiOiIxNzI2MDc3NTk1In0sInhtc19jYWVlcnJvciI6eyJ2YWx1ZSI6IjEwMDEyIn19fQ==""", """{"access_token":{"nbf":{"essential":true,"value":"1726077595"},"xms_caeerror":{"value":"10012"}}}""")] + public async Task VerifyCaeClaims(string challenge, string expectedClaims) + { + int callCount = 0; + + MockResponse responseWithKey = new MockResponse(200) + .WithContent(@"{ + ""key"": { + ""kid"": ""https://heathskeyvault.vault.azure.net/keys/625710934/ef3685592e1c4e839206aaa10f0f058e"", + ""kty"": ""RSA"", + ""key_ops"": [ + ""encrypt"", + ""decrypt"", + ""sign"", + ""verify"", + ""wrapKey"", + ""unwrapKey"" + ], + ""n"": ""foo"", + ""e"": ""AQAB"" + }, + ""attributes"": { + ""enabled"": true, + ""created"": 1613807137, + ""updated"": 1613807137, + ""recoveryLevel"": ""Recoverable\u002BPurgeable"", + ""recoverableDays"": 90 + } + }"); + + MockTransport transport = GetMockTransportWithCaeChallenges(numberOfCaeChallenges: 1, final200response: responseWithKey); + + var credential = new TokenCredentialStub((r, c) => + { + if (callCount == 0) + { + // The first challenge should not have any claims. + Assert.IsNull(r.Claims); + } + else if (callCount == 1) + { + Assert.AreEqual(expectedClaims, r.Claims); + } + else + { + Assert.Fail("unexpected token request"); + } + Interlocked.Increment(ref callCount); + Assert.AreEqual(true, r.IsCaeEnabled); + + return new(callCount.ToString(), DateTimeOffset.Now.AddHours(2)); + }, true); + + KeyClient client = new( + VaultUri, + credential, + new KeyClientOptions() + { + Transport = transport, + }); + + Response response = await client.GetKeyAsync("key"); + Assert.AreEqual(200, response.GetRawResponse().Status); + } + + [Test] + public void ThrowsWithTwoConsecutiveCaeChallenges() + { + MockTransport keyVaultTransport = GetMockTransportWithCaeChallenges(numberOfCaeChallenges: 2); + + MockTransport credentialTransport = GetMockCredentialTransport(2); + + KeyClient client = new( + VaultUri, + new MockCredential(credentialTransport), + new KeyClientOptions() + { + Transport = keyVaultTransport, + }); + + try + { + client.GetKey("key"); + } + catch (RequestFailedException ex) + { + Assert.AreEqual(401, ex.Status); + return; + } + catch (Exception ex) + { + Assert.Fail($"Expected RequestFailedException, but got {ex.GetType()}"); + return; + } + Assert.Fail("Expected RequestFailedException, but no exception was thrown."); + } + } +} diff --git a/sdk/keyvault/Azure.Security.KeyVault.Keys/tests/KeysTestBase.cs b/sdk/keyvault/Azure.Security.KeyVault.Keys/tests/KeysTestBase.cs index a2dd49ddea8c..5de9d50e622d 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Keys/tests/KeysTestBase.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Keys/tests/KeysTestBase.cs @@ -13,7 +13,6 @@ namespace Azure.Security.KeyVault.Keys.Tests { [ClientTestFixture( - KeyClientOptions.ServiceVersion.V7_6_Preview_1, KeyClientOptions.ServiceVersion.V7_5, KeyClientOptions.ServiceVersion.V7_4, KeyClientOptions.ServiceVersion.V7_3, diff --git a/sdk/keyvault/Azure.Security.KeyVault.Secrets/CHANGELOG.md b/sdk/keyvault/Azure.Security.KeyVault.Secrets/CHANGELOG.md index 6e2354363b26..bf92efa73b63 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Secrets/CHANGELOG.md +++ b/sdk/keyvault/Azure.Security.KeyVault.Secrets/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 4.7.0-beta.1 (Unreleased) +## 4.8.0-beta.1 (Unreleased) ### Features Added @@ -10,7 +10,11 @@ ### Other Changes -- The default service version is now "V7_6_Preview_1". +## 4.7.0 (2024-10-14) + +### Features Added + +- Support for Continuous Access Evaluation (CAE). ## 4.6.0 (2024-02-14) @@ -76,7 +80,7 @@ Changes from both the last release and the last beta include: - Verify the challenge resource matches the vault domain. This should affect few customers who can set `SecretClientOptions.DisableChallengeResourceVerification` to `true` to disable. - See for more information. + See https://aka.ms/azsdk/blog/vault-uri for more information. ## 4.3.0 (2022-03-24) @@ -220,14 +224,14 @@ Changes from both the last release and the last beta include: - `SecretClient.DeleteSecret` has been renamed to `SecretClient.StartDeleteSecret` and now returns a `DeleteSecretOperation` to track this long-running operation. - `SecretClient.RecoverDeletedSecret` has been renamed to `SecretClient.StartRecoverDeletedSecret` and now returns a `RecoverDeletedSecretOperation` to track this long-running operation. -### Major changes +### Major changes - Updated to work with the 1.0.0 release versions of Azure.Core and Azure.Identity. - `KeyModelFactory` added to create mocks of model types for testing. ## 4.0.0-preview.5 (2019-10-07) -### Breaking changes +### Breaking changes - `SecretBase` has been renamed to `SecretProperties`. - `Secret` and `DeletedSecret` no longer extend `SecretProperties`, but instead contain a `SecretProperties` property named `Properties`. @@ -236,10 +240,9 @@ Changes from both the last release and the last beta include: - All methods in `SecretClient` now include the word "Secret" consistent with `KeyClient` and `CertificateClient`. ## 4.0.0-preview.1 (2019-06-28) - Version 4.0.0-preview.1 is the first preview of our efforts to create a user-friendly client library for Azure Key Vault. For more information about preview releases of other Azure SDK libraries, please visit -. +https://aka.ms/azure-sdk-preview1-net. This library is not a direct replacement for `Microsoft.Azure.KeyVault`. Applications using that library would require code changes to use `Azure.Security.KeyVault.Secrets`. @@ -250,10 +253,9 @@ and demonstrate the new API. ### Major changes from `Microsoft.Azure.KeyVault` - - Packages scoped by functionality - - `Azure.Security.KeyVault.Secrets` contains a client for secret operations. - - `Azure.Security.KeyVault.Keys` contains a client for key operations. + - `Azure.Security.KeyVault.Secrets` contains a client for secret operations. + - `Azure.Security.KeyVault.Keys` contains a client for key operations. - Client instances are scoped to vaults (an instance interacts with one vault only). - Asynchronous and synchronous APIs in the `Azure.Security.KeyVault.Secrets` package. @@ -264,8 +266,7 @@ only). [Azure Identity documentation](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/identity/Azure.Identity) for more information -### `Microsoft.Azure.KeyVault` features not implemented in this release - +### `Microsoft.Azure.KeyVault` features not implemented in this release: - Certificate management APIs - National cloud support. This release supports public global cloud vaults, e.g. https://{vault-name}.vault.azure.net diff --git a/sdk/keyvault/Azure.Security.KeyVault.Secrets/api/Azure.Security.KeyVault.Secrets.netstandard2.0.cs b/sdk/keyvault/Azure.Security.KeyVault.Secrets/api/Azure.Security.KeyVault.Secrets.netstandard2.0.cs index fffa9c113764..c231ef8a47bd 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Secrets/api/Azure.Security.KeyVault.Secrets.netstandard2.0.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Secrets/api/Azure.Security.KeyVault.Secrets.netstandard2.0.cs @@ -95,7 +95,7 @@ public SecretClient(System.Uri vaultUri, Azure.Core.TokenCredential credential, } public partial class SecretClientOptions : Azure.Core.ClientOptions { - public SecretClientOptions(Azure.Security.KeyVault.Secrets.SecretClientOptions.ServiceVersion version = Azure.Security.KeyVault.Secrets.SecretClientOptions.ServiceVersion.V7_6_Preview_1) { } + public SecretClientOptions(Azure.Security.KeyVault.Secrets.SecretClientOptions.ServiceVersion version = Azure.Security.KeyVault.Secrets.SecretClientOptions.ServiceVersion.V7_5) { } public bool DisableChallengeResourceVerification { get { throw null; } set { } } public Azure.Security.KeyVault.Secrets.SecretClientOptions.ServiceVersion Version { get { throw null; } } public enum ServiceVersion @@ -106,7 +106,6 @@ public enum ServiceVersion V7_3 = 3, V7_4 = 4, V7_5 = 5, - V7_6_Preview_1 = 6, } } public static partial class SecretModelFactory diff --git a/sdk/keyvault/Azure.Security.KeyVault.Secrets/assets.json b/sdk/keyvault/Azure.Security.KeyVault.Secrets/assets.json index 2f5fc05d04bf..73d76b643745 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Secrets/assets.json +++ b/sdk/keyvault/Azure.Security.KeyVault.Secrets/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/keyvault/Azure.Security.KeyVault.Secrets", - "Tag": "net/keyvault/Azure.Security.KeyVault.Secrets_835634e403" + "Tag": "net/keyvault/Azure.Security.KeyVault.Secrets_18b0beab8a" } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Secrets/src/Azure.Security.KeyVault.Secrets.csproj b/sdk/keyvault/Azure.Security.KeyVault.Secrets/src/Azure.Security.KeyVault.Secrets.csproj index 7e2e83c78113..b5fe0d1b620a 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Secrets/src/Azure.Security.KeyVault.Secrets.csproj +++ b/sdk/keyvault/Azure.Security.KeyVault.Secrets/src/Azure.Security.KeyVault.Secrets.csproj @@ -3,9 +3,9 @@ This is the Microsoft Azure Key Vault Secrets client library Microsoft Azure.Security.KeyVault.Secrets client library - 4.7.0-beta.1 + 4.8.0-beta.1 - 4.6.0 + 4.7.0 Microsoft Azure Key Vault Secrets;$(PackageCommonTags) $(RequiredTargetFrameworks) diff --git a/sdk/keyvault/Azure.Security.KeyVault.Secrets/src/SecretClientOptions.cs b/sdk/keyvault/Azure.Security.KeyVault.Secrets/src/SecretClientOptions.cs index 66dc3d1b6072..86022586ccb4 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Secrets/src/SecretClientOptions.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Secrets/src/SecretClientOptions.cs @@ -16,7 +16,7 @@ public class SecretClientOptions : ClientOptions /// For more information, see /// Key Vault versions. ///
- internal const ServiceVersion LatestVersion = ServiceVersion.V7_6_Preview_1; + internal const ServiceVersion LatestVersion = ServiceVersion.V7_5; /// /// The versions of Azure Key Vault supported by this client library. @@ -53,11 +53,6 @@ public enum ServiceVersion /// The Key Vault API version 7.5. /// V7_5 = 5, - - /// - /// The Key Vault API version 7.6-preview.1. - /// - V7_6_Preview_1 = 6, #pragma warning restore CA1707 // Identifiers should not contain underscores } @@ -97,7 +92,6 @@ internal string GetVersionString() ServiceVersion.V7_3 => "7.3", ServiceVersion.V7_4 => "7.4", ServiceVersion.V7_5 => "7.5", - ServiceVersion.V7_6_Preview_1 => "7.6-preview.1", _ => throw new ArgumentException(Version.ToString()), }; } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Secrets/tests/ChallengeBasedAuthenticationPolicyTests.cs b/sdk/keyvault/Azure.Security.KeyVault.Secrets/tests/ChallengeBasedAuthenticationPolicyTests.cs index 50c53bc6aed8..7330a6ad028a 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Secrets/tests/ChallengeBasedAuthenticationPolicyTests.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Secrets/tests/ChallengeBasedAuthenticationPolicyTests.cs @@ -199,6 +199,18 @@ public async Task ReauthenticatesWhenTenantChanged() Assert.AreEqual("secret-value", response.Value.Value); } + [Test] + public void GetClaimsFromChallengeHeaders() + { + MockResponse response401WithClaims = new MockResponse(401) + .WithHeader("WWW-Authenticate", @"Bearer realm="""", authorization_uri=""https://login.microsoftonline.com/common/oauth2/authorize"", error=""insufficient_claims"", claims=""eyJhY2Nlc3NfdG9rZW4iOnsiYWNycyI6eyJlc3NlbnRpYWwiOnRydWUsInZhbHVlIjoiY3AxIn19fQ=="""); + Assert.AreEqual(ChallengeBasedAuthenticationPolicy.getDecodedClaimsParameter("insufficient_claims", response401WithClaims), @"{""access_token"":{""acrs"":{""essential"":true,""value"":""cp1""}}}"); + + MockResponse response401 = new MockResponse(401) + .WithHeader("WWW-Authenticate", @"Bearer authorization=""https://login.windows.net/de763a21-49f7-4b08-a8e1-52c8fbc103b4"", resource=""https://vault.azure.net"""); + Assert.IsNull(ChallengeBasedAuthenticationPolicy.getDecodedClaimsParameter(null, response401)); + } + private class MockTransportBuilder { private const string AuthorizationHeader = "Authorization"; diff --git a/sdk/keyvault/Azure.Security.KeyVault.Secrets/tests/ContinousAccessEvaluationTests.cs b/sdk/keyvault/Azure.Security.KeyVault.Secrets/tests/ContinousAccessEvaluationTests.cs new file mode 100644 index 000000000000..dad44a925d3e --- /dev/null +++ b/sdk/keyvault/Azure.Security.KeyVault.Secrets/tests/ContinousAccessEvaluationTests.cs @@ -0,0 +1,159 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core.TestFramework; +using Azure.Security.KeyVault.Tests; +using NUnit.Framework; + +namespace Azure.Security.KeyVault.Secrets.Tests +{ + [NonParallelizable] + internal class ContinousAccessEvaluationTests : ContinuousAccessEvaluationTestsBase + { + [SetUp] + public void Setup() + { + ChallengeBasedAuthenticationPolicy.ClearCache(); + } + + [Test] + [TestCase(@"Bearer realm="""", authorization_uri=""https://login.microsoftonline.com/common/oauth2/authorize"", error=""insufficient_claims"", claims=""eyJhY2Nlc3NfdG9rZW4iOnsibmJmIjp7ImVzc2VudGlhbCI6dHJ1ZSwidmFsdWUiOiIxNzI2MDc3NTk1In0sInhtc19jYWVlcnJvciI6eyJ2YWx1ZSI6IjEwMDEyIn19fQ==""", """{"access_token":{"nbf":{"essential":true,"value":"1726077595"},"xms_caeerror":{"value":"10012"}}}""")] + public async Task VerifyCaeClaims(string challenge, string expectedClaims) + { + int callCount = 0; + + MockResponse responseWithSecret = new MockResponse(200) + { + ContentStream = new KeyVaultSecret("test-secret", "secret-value").ToStream(), + }; + + MockTransport transport = GetMockTransportWithCaeChallenges(numberOfCaeChallenges: 1, final200response: responseWithSecret); + + var credential = new TokenCredentialStub((r, c) => + { + if (callCount == 0) + { + // The first challenge should not have any claims. + Assert.IsNull(r.Claims); + } + else if (callCount == 1) + { + Assert.AreEqual(expectedClaims, r.Claims); + } + else + { + Assert.Fail("unexpected token request"); + } + Interlocked.Increment(ref callCount); + Assert.AreEqual(true, r.IsCaeEnabled); + + return new(callCount.ToString(), DateTimeOffset.Now.AddHours(2)); + }, true); + + SecretClient client = new( + VaultUri, + credential, + new SecretClientOptions() + { + Transport = transport, + }); + + Response response = await client.GetSecretAsync("test-secret"); + Assert.AreEqual(200, response.GetRawResponse().Status); + Assert.AreEqual("secret-value", response.Value.Value); + } + + [Test] + public void ThrowsWithTwoConsecutiveCaeChallenges() + { + MockTransport keyVaultTransport = GetMockTransportWithCaeChallenges(numberOfCaeChallenges: 2); + + MockTransport credentialTransport = GetMockCredentialTransport(2); + + SecretClient client = new( + VaultUri, + new MockCredential(credentialTransport), + new SecretClientOptions() + { + Transport = keyVaultTransport, + }); + + try + { + client.GetSecret("test-secret"); + } + catch (RequestFailedException ex) + { + Assert.AreEqual(401, ex.Status); + return; + } + catch (Exception ex) + { + Assert.Fail($"Expected RequestFailedException, but got {ex.GetType()}"); + return; + } + Assert.Fail("Expected RequestFailedException, but no exception was thrown."); + } + + [Test] + public void ensureTokenFromClaimsChallengeGetsUsed() + { + MockTransport transport = new(new[] + { + defaultInitialChallenge, + + new MockResponse(200) + .WithJson(""" + { + "token_type": "Bearer", + "expires_in": 3599, + "resource": "https://vault.azure.net", + "access_token": "TOKEN_1" + } + """), + + new MockResponse(200) + { + ContentStream = new KeyVaultSecret("test-secret", "secret-value").ToStream(), + }, + + defaultCaeChallenge, + + new MockResponse(200) + .WithJson(""" + { + "token_type": "Bearer", + "expires_in": 3599, + "resource": "https://vault.azure.net", + "access_token": "TOKEN_2" + } + """), + + new MockResponse(200) + { + ContentStream = new KeyVaultSecret("test-secret2", "secret-value").ToStream(), + }, + }); + + SecretClient client = new( + VaultUri, + new MockCredential(transport), + new SecretClientOptions() + { + Transport = transport, + }); + + _ = client.GetSecret("test-secret"); + _ = client.GetSecret("test-secret2"); + + Assert.IsTrue(transport.Requests[2].Headers.TryGetValue("Authorization", out string authorizationValue)); + Assert.AreEqual("Bearer TOKEN_1", authorizationValue); + + Assert.IsTrue(transport.Requests[5].Headers.TryGetValue("Authorization", out string authorizationValue2)); + Assert.AreEqual("Bearer TOKEN_2", authorizationValue2); + } + } +} diff --git a/sdk/keyvault/Azure.Security.KeyVault.Secrets/tests/SecretsTestBase.cs b/sdk/keyvault/Azure.Security.KeyVault.Secrets/tests/SecretsTestBase.cs index 1b5f7577b81c..4b3f24fe846f 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Secrets/tests/SecretsTestBase.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Secrets/tests/SecretsTestBase.cs @@ -14,7 +14,6 @@ namespace Azure.Security.KeyVault.Secrets.Tests { [ClientTestFixture( - SecretClientOptions.ServiceVersion.V7_6_Preview_1, SecretClientOptions.ServiceVersion.V7_5, SecretClientOptions.ServiceVersion.V7_4, SecretClientOptions.ServiceVersion.V7_3, diff --git a/sdk/keyvault/Azure.Security.KeyVault.Shared/src/ChallengeBasedAuthenticationPolicy.cs b/sdk/keyvault/Azure.Security.KeyVault.Shared/src/ChallengeBasedAuthenticationPolicy.cs index ec82ee2c1d63..0c52c7ba688f 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Shared/src/ChallengeBasedAuthenticationPolicy.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Shared/src/ChallengeBasedAuthenticationPolicy.cs @@ -6,6 +6,7 @@ using System; using System.Collections.Concurrent; using System.Globalization; +using System.Net; using System.Threading.Tasks; namespace Azure.Security.KeyVault @@ -51,7 +52,7 @@ private async ValueTask AuthorizeRequestInternal(HttpMessage message, bool async if (_challenge != null) { // We fetched the challenge from the cache, but we have not initialized the Scopes in the base yet. - var context = new TokenRequestContext(_challenge.Scopes, parentRequestId: message.Request.ClientRequestId, tenantId: _challenge.TenantId); + var context = new TokenRequestContext(_challenge.Scopes, parentRequestId: message.Request.ClientRequestId, tenantId: _challenge.TenantId, isCaeEnabled: true); if (async) { await AuthenticateAndAuthorizeRequestAsync(message, context).ConfigureAwait(false); @@ -84,6 +85,29 @@ protected override ValueTask AuthorizeRequestOnChallengeAsync(HttpMessage protected override bool AuthorizeRequestOnChallenge(HttpMessage message) => AuthorizeRequestOnChallengeAsyncInternal(message, false).EnsureCompleted(); + /// + /// Gets the claims parameter from the challenge response. + /// If there are no claims, returns null. + /// + /// The error message from the service. + /// The response from the service which contains the headers. + /// A string with the decoded claims if present, otherwise null + internal static string getDecodedClaimsParameter(string error, Response response) + { + // According to docs https://learn.microsoft.com/en-us/entra/identity-platform/claims-challenge?tabs=dotnet#claims-challenge-header-format, + // the error message must be "insufficient_claims" when a claims challenge should be generated. + if (error == "insufficient_claims") + { + return AuthorizationChallengeParser.GetChallengeParameterFromResponse(response, "Bearer", "claims") switch + { + { Length: 0 } => null, + string enc => System.Text.Encoding.UTF8.GetString(Convert.FromBase64String(enc)) + }; + } + + return null; + } + private async ValueTask AuthorizeRequestOnChallengeAsyncInternal(HttpMessage message, bool async) { if (message.Request.Content == null && message.TryGetProperty(KeyVaultStashedContentKey, out var content)) @@ -91,8 +115,10 @@ private async ValueTask AuthorizeRequestOnChallengeAsyncInternal(HttpMessa message.Request.Content = content as RequestContent; } + string error = AuthorizationChallengeParser.GetChallengeParameterFromResponse(message.Response, "Bearer", "error"); string authority = GetRequestAuthority(message.Request); string scope = AuthorizationChallengeParser.GetChallengeParameterFromResponse(message.Response, "Bearer", "resource"); + if (scope != null) { scope += "/.default"; @@ -102,6 +128,15 @@ private async ValueTask AuthorizeRequestOnChallengeAsyncInternal(HttpMessa scope = AuthorizationChallengeParser.GetChallengeParameterFromResponse(message.Response, "Bearer", "scope"); } + // Handle CAE Challenges + string claims = getDecodedClaimsParameter(error, message.Response); + if (claims != null) + { + // Get the scope from the cache + s_challengeCache.TryGetValue(authority, out _challenge); + scope = _challenge.Scopes[0]; + } + if (scope is null) { if (s_challengeCache.TryGetValue(authority, out _challenge)) @@ -140,7 +175,7 @@ private async ValueTask AuthorizeRequestOnChallengeAsyncInternal(HttpMessa s_challengeCache[authority] = _challenge; } - var context = new TokenRequestContext(_challenge.Scopes, parentRequestId: message.Request.ClientRequestId, tenantId: _challenge.TenantId); + var context = new TokenRequestContext(_challenge.Scopes, parentRequestId: message.Request.ClientRequestId, tenantId: _challenge.TenantId, isCaeEnabled: true, claims: claims); if (async) { await AuthenticateAndAuthorizeRequestAsync(message, context).ConfigureAwait(false); @@ -153,6 +188,81 @@ private async ValueTask AuthorizeRequestOnChallengeAsyncInternal(HttpMessa return true; } + /// + public override ValueTask ProcessAsync(HttpMessage message, ReadOnlyMemory pipeline) + { + return ProcessAsyncInternal(message, pipeline, true); + } + + /// + public override void Process(HttpMessage message, ReadOnlyMemory pipeline) + { + ProcessAsyncInternal(message, pipeline, false).EnsureCompleted(); + } + + private async ValueTask ProcessAsyncInternal(HttpMessage message, ReadOnlyMemory pipeline, bool async) + { + if (message.Request.Uri.Scheme != Uri.UriSchemeHttps) + { + throw new InvalidOperationException("Bearer token authentication is not permitted for non TLS protected (https) endpoints."); + } + + if (async) + { + await AuthorizeRequestAsync(message).ConfigureAwait(false); + await ProcessNextAsync(message, pipeline).ConfigureAwait(false); + } + else + { + AuthorizeRequest(message); + ProcessNext(message, pipeline); + } + + // Check if we have received a challenge or we have not yet issued the first request. + if (message.Response.Status == (int)HttpStatusCode.Unauthorized && message.Response.Headers.Contains(HttpHeader.Names.WwwAuthenticate)) + { + // Attempt to get the TokenRequestContext based on the challenge. + // If we fail to get the context, the challenge was not present or invalid. + // If we succeed in getting the context, authenticate the request and pass it up the policy chain. + if (async) + { + if (await AuthorizeRequestOnChallengeAsync(message).ConfigureAwait(false)) + { + await ProcessNextAsync(message, pipeline).ConfigureAwait(false); + } + } + else + { + if (AuthorizeRequestOnChallenge(message)) + { + ProcessNext(message, pipeline); + } + } + + // Handle the scenario in which we get a CAE challenge back. + if (message.Response.Status == (int)HttpStatusCode.Unauthorized + && message.Response.Headers.Contains(HttpHeader.Names.WwwAuthenticate) + && AuthorizationChallengeParser.GetChallengeParameterFromResponse(message.Response, "Bearer", "claims") != null) + { + if (async) + { + if (await AuthorizeRequestOnChallengeAsync(message).ConfigureAwait(false)) + { + await ProcessNextAsync(message, pipeline).ConfigureAwait(false); + } + } + else + { + if (AuthorizeRequestOnChallenge(message)) + { + ProcessNext(message, pipeline); + } + } + } + // If we get a second CAE challenge, an unlikely scenario, we do not attempt to re-authenticate. + } + } + internal class ChallengeParameters { internal ChallengeParameters(Uri authorizationUri, string[] scopes) diff --git a/sdk/keyvault/Azure.Security.KeyVault.Shared/tests/Azure.Security.KeyVault.Shared.Tests.projitems b/sdk/keyvault/Azure.Security.KeyVault.Shared/tests/Azure.Security.KeyVault.Shared.Tests.projitems index 9f553875f304..55413c17628b 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Shared/tests/Azure.Security.KeyVault.Shared.Tests.projitems +++ b/sdk/keyvault/Azure.Security.KeyVault.Shared/tests/Azure.Security.KeyVault.Shared.Tests.projitems @@ -9,6 +9,7 @@ Azure.Security.KeyVault.Tests + diff --git a/sdk/keyvault/Azure.Security.KeyVault.Shared/tests/ContinuousAccessEvaluationTestsBase.cs b/sdk/keyvault/Azure.Security.KeyVault.Shared/tests/ContinuousAccessEvaluationTestsBase.cs new file mode 100644 index 000000000000..af2ee53ff913 --- /dev/null +++ b/sdk/keyvault/Azure.Security.KeyVault.Shared/tests/ContinuousAccessEvaluationTestsBase.cs @@ -0,0 +1,171 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Text; +using System.Threading.Tasks; +using System.Threading; +using Azure.Core.TestFramework; +using Azure.Core; +using System.IO; +using System.Text.Json; +using Azure.Core.Pipeline; + +namespace Azure.Security.KeyVault.Tests +{ + internal class ContinuousAccessEvaluationTestsBase + { + protected MockResponse defaultCaeChallenge = new MockResponse(401).WithHeader("WWW-Authenticate", @"Bearer realm="""", authorization_uri=""https://login.microsoftonline.com/common/oauth2/authorize"", error=""insufficient_claims"", claims=""eyJhY2Nlc3NfdG9rZW4iOnsibmJmIjp7ImVzc2VudGlhbCI6dHJ1ZSwidmFsdWUiOiIxNzI2MDc3NTk1In0sInhtc19jYWVlcnJvciI6eyJ2YWx1ZSI6IjEwMDEyIn19fQ=="""); + + protected MockResponse defaultInitialChallenge = new MockResponse(401).WithHeader("WWW-Authenticate", @"Bearer authorization=""https://login.windows.net/de763a21-49f7-4b08-a8e1-52c8fbc103b4"", resource=""https://vault.azure.net"""); + + private const string VaultHost = "test.vault.azure.net"; + protected Uri VaultUri => new Uri("https://" + VaultHost); + + protected MockTransport GetMockTransportWithCaeChallenges(int numberOfCaeChallenges = 1, MockResponse final200response = null ) + { + if (numberOfCaeChallenges < 1) + { + throw new ArgumentOutOfRangeException(nameof(numberOfCaeChallenges), "Number of CAE challenges must be greater than or equal to 1."); + } + + var responses = new List { defaultInitialChallenge }; + for (int i = 0; i < numberOfCaeChallenges; i++) + { + responses.Add(defaultCaeChallenge); + } + if (final200response != null) + { + responses.Add(final200response); + } + return new MockTransport(responses.ToArray()); + } + + protected MockTransport GetMockCredentialTransport(int numberOfTokenResponses = 1) + { + if (numberOfTokenResponses < 1) + { + throw new ArgumentOutOfRangeException(nameof(numberOfTokenResponses), "Number of token responses must be greater than or equal to 1."); + } + + var responses = new List(); + for (int i = 0; i < numberOfTokenResponses; i++) + { + responses.Add(new MockResponse(200) + .WithJson(""" + { + "token_type": "Bearer", + "expires_in": 3599, + "resource": "https://vault.azure.net", + "access_token": "foo" + } + """)); + } + return new MockTransport(responses.ToArray()); + } + + protected class TokenCredentialStub : TokenCredential + { + public TokenCredentialStub() { } + + public TokenCredentialStub(Func handler, bool isAsync) + { + setCallBack(handler, isAsync); + } + + private Func> _getTokenAsyncHandler; + private Func _getTokenHandler; + + public void setCallBack(Func handler, bool isAsync) + { + if (isAsync) + { +#pragma warning disable 1998 + _getTokenAsyncHandler = async (r, c) => handler(r, c); +#pragma warning restore 1998 + } + else + { + _getTokenHandler = handler; + } + } + + public override ValueTask GetTokenAsync(TokenRequestContext requestContext, CancellationToken cancellationToken) + => _getTokenAsyncHandler(requestContext, cancellationToken); + + public override AccessToken GetToken(TokenRequestContext requestContext, CancellationToken cancellationToken) + => _getTokenHandler(requestContext, cancellationToken); + } + + protected class MockCredential : TokenCredential + { + private readonly HttpPipeline _pipeline; + private readonly string _tenantId; + private readonly string _clientId; + private readonly string _clientSecret; + private const string TenantId = "72f988bf-86f1-41af-91ab-2d7cd011db47"; + + public MockCredential(MockTransport transport, string tenantId = TenantId, string clientId = "test_id", string clientSecret = "test_secret") + { + _pipeline = new HttpPipeline(transport); + _tenantId = tenantId ?? throw new ArgumentNullException(nameof(tenantId)); + _clientId = clientId ?? throw new ArgumentNullException(nameof(clientId)); + _clientSecret = clientSecret ?? throw new ArgumentNullException(nameof(clientSecret)); + } + + public override AccessToken GetToken(TokenRequestContext requestContext, CancellationToken cancellationToken) => GetTokenAsync(requestContext, cancellationToken).EnsureCompleted(); + + public override async ValueTask GetTokenAsync(TokenRequestContext requestContext, CancellationToken cancellationToken) + { + Request request = _pipeline.CreateRequest(); + request.Method = RequestMethod.Post; + request.Headers.Add(HttpHeader.Common.FormUrlEncodedContentType); + + request.Uri.Reset(new Uri($"https://login.windows.net/{_tenantId}/oauth2/v2.0/token")); + + string body = $"response_type=token&grant_type=client_credentials&client_id={Uri.EscapeDataString(_clientId)}&client_secret={Uri.EscapeDataString(_clientSecret)}&scope={Uri.EscapeDataString(string.Join(" ", requestContext.Scopes))}"; + ReadOnlyMemory content = Encoding.UTF8.GetBytes(body).AsMemory(); + request.Content = RequestContent.Create(content); + + Response response = await _pipeline.SendRequestAsync(request, cancellationToken); + if (response.Status == 200 || response.Status == 201) + { + return await DeserializeAsync(response.ContentStream, cancellationToken); + } + + throw new RequestFailedException(response.Status, response.ReasonPhrase); + } + + private static async Task DeserializeAsync(Stream content, CancellationToken cancellationToken) + { + using (JsonDocument json = await JsonDocument.ParseAsync(content, default, cancellationToken).ConfigureAwait(false)) + { + return Deserialize(json.RootElement); + } + } + + private static AccessToken Deserialize(JsonElement json) + { + string accessToken = null; + DateTimeOffset expiresOn = DateTimeOffset.MaxValue; + + foreach (JsonProperty prop in json.EnumerateObject()) + { + switch (prop.Name) + { + case "access_token": + accessToken = prop.Value.GetString(); + break; + + case "expires_in": + expiresOn = DateTimeOffset.UtcNow + TimeSpan.FromSeconds(prop.Value.GetInt64()); + break; + } + } + + return new AccessToken(accessToken, expiresOn); + } + } + } +} diff --git a/sdk/keyvault/test-resources.json b/sdk/keyvault/test-resources.json index f8d5d93e5711..6f70888a8451 100644 --- a/sdk/keyvault/test-resources.json +++ b/sdk/keyvault/test-resources.json @@ -283,44 +283,40 @@ } } ], - "outputs": { - "AZURE_KEYVAULT_URL": { - "type": "string", - "value": "[reference(variables('kvName')).vaultUri]" - }, - "AZURE_MANAGEDHSM_URL": { - "type": "string", - "condition": "[parameters('enableHsm')]", - "value": "[reference(variables('hsmName')).hsmUri]" - }, - "KEYVAULT_SKU": { - "type": "string", - "value": "[reference(parameters('baseName')).sku.name]" - }, - "CLIENT_OBJECTID": { - "type": "string", - "value": "[parameters('testApplicationOid')]" - }, - "BLOB_STORAGE_ACCOUNT_NAME": { - "type": "string", - "value": "[variables('primaryAccountName')]" - }, - "BLOB_PRIMARY_STORAGE_ACCOUNT_KEY": { - "type": "string", - "value": "[listKeys(variables('primaryAccountName'), variables('mgmtApiVersion')).keys[0].value]" - }, - "BLOB_CONTAINER_NAME": { - "type": "string", - "value": "[variables('blobContainerName')]" - }, - "AZURE_KEYVAULT_ATTESTATION_URL": { - "type": "string", - "condition": "[parameters('enableAttestation')]", - "value": "[format('https://{0}/', reference(variables('attestationSite')).defaultHostName)]" - }, - "KEYVAULT_TENANT_ID": { - "type": "string", - "value": "[parameters('tenantId')]" + "outputs": { + "AZURE_KEYVAULT_URL": { + "type": "string", + "value": "[reference(variables('kvName')).vaultUri]" + }, + "AZURE_MANAGEDHSM_URL": { + "type": "string", + "condition": "[parameters('enableHsm')]", + "value": "[reference(variables('hsmName')).hsmUri]" + }, + "KEYVAULT_SKU": { + "type": "string", + "value": "[reference(parameters('baseName')).sku.name]" + }, + "CLIENT_OBJECTID": { + "type": "string", + "value": "[parameters('testApplicationOid')]" + }, + "BLOB_STORAGE_ACCOUNT_NAME": { + "type": "string", + "value": "[variables('primaryAccountName')]" + }, + "BLOB_PRIMARY_STORAGE_ACCOUNT_KEY": { + "type": "string", + "value": "[listKeys(variables('primaryAccountName'), variables('mgmtApiVersion')).keys[0].value]" + }, + "BLOB_CONTAINER_NAME" : { + "type": "string", + "value": "[variables('blobContainerName')]" + }, + "AZURE_KEYVAULT_ATTESTATION_URL": { + "type": "string", + "condition": "[parameters('enableAttestation')]", + "value": "[format('https://{0}/', reference(variables('attestationSite')).defaultHostName)]" + } } - } } diff --git a/sdk/keyvault/tests.yml b/sdk/keyvault/tests.yml index ee8e84ccbfae..f8c7b9453187 100644 --- a/sdk/keyvault/tests.yml +++ b/sdk/keyvault/tests.yml @@ -10,28 +10,20 @@ extends: SupportedClouds: 'Public,UsGov,Canary' CloudConfig: Public: - ServiceConnection: azure-sdk-tests - SubscriptionConfigurationFilePaths: - - eng/common/TestResources/sub-config/AzurePublicMsft.json ${{ if not(contains(variables['Build.DefinitionName'], 'tests-weekly')) }}: MatrixFilters: - ArmTemplateParameters=^(?!.*enableHsm.*true) - Canary: - ServiceConnection: azure-sdk-tests - SubscriptionConfigurationFilePaths: - - eng/common/TestResources/sub-config/AzurePublicMsft.json - Location: 'centraluseuap' - # Managed HSM test resources are expensive and provisioning has not been reliable. - # Given test coverage of non-canary regions we probably don't need to test in canary. - MatrixFilters: - - ArmTemplateParameters=^(?!.*enableHsm.*true) - # Some resource providers required for attestation are not supported in canary. - MatrixReplace: - - 'ArmTemplateParameters=(.*)enableAttestation.*?\$true(.*)/$1enableAttestation \= $false$2' + # Canary regions are currently not supported in TME so disabling for now + # Canary: + # Location: 'centraluseuap' + # # Managed HSM test resources are expensive and provisioning has not been reliable. + # # Given test coverage of non-canary regions we probably don't need to test in canary. + # MatrixFilters: + # - ArmTemplateParameters=^(?!.*enableHsm.*true) + # # Some resource providers required for attestation are not supported in canary. + # MatrixReplace: + # - 'ArmTemplateParameters=(.*)enableAttestation.*?\$true(.*)/$1enableAttestation \= $false$2' UsGov: - ServiceConnection: usgov_azure-sdk-tests - SubscriptionConfigurationFilePaths: - - eng/common/TestResources/sub-config/AzureUsGovMsft.json MatrixFilters: - ArmTemplateParameters=^(?!.*enableHsm.*true) MatrixConfigs: diff --git a/sdk/kubernetesconfiguration/Azure.ResourceManager.KubernetesConfiguration/samples/Generated/Samples/Sample_KubernetesFluxConfigurationCollection.cs b/sdk/kubernetesconfiguration/Azure.ResourceManager.KubernetesConfiguration/samples/Generated/Samples/Sample_KubernetesFluxConfigurationCollection.cs index 7cd36eeedf3c..e677294283eb 100644 --- a/sdk/kubernetesconfiguration/Azure.ResourceManager.KubernetesConfiguration/samples/Generated/Samples/Sample_KubernetesFluxConfigurationCollection.cs +++ b/sdk/kubernetesconfiguration/Azure.ResourceManager.KubernetesConfiguration/samples/Generated/Samples/Sample_KubernetesFluxConfigurationCollection.cs @@ -168,8 +168,8 @@ public async Task CreateOrUpdate_CreateFluxConfiguration() GitRepository = new KubernetesGitRepository() { Uri = new Uri("https://github.com/Azure/arc-k8s-demo"), - TimeoutInSeconds = 600, - SyncIntervalInSeconds = 600, + TimeoutInSeconds = 600L, + SyncIntervalInSeconds = 600L, RepositoryRef = new KubernetesGitRepositoryRef() { Branch = "master", @@ -184,8 +184,8 @@ public async Task CreateOrUpdate_CreateFluxConfiguration() DependsOn = { }, -TimeoutInSeconds = 600, -SyncIntervalInSeconds = 600, +TimeoutInSeconds = 600L, +SyncIntervalInSeconds = 600L, }, ["srs-kustomization2"] = new Kustomization() { @@ -194,9 +194,9 @@ public async Task CreateOrUpdate_CreateFluxConfiguration() { "srs-kustomization1" }, -TimeoutInSeconds = 600, -SyncIntervalInSeconds = 600, -RetryIntervalInSeconds = 600, +TimeoutInSeconds = 600L, +SyncIntervalInSeconds = 600L, +RetryIntervalInSeconds = 600L, Prune = false, }, }, @@ -249,8 +249,8 @@ public async Task CreateOrUpdate_CreateFluxConfigurationWithBucketSourceKind() { Uri = new Uri("https://fluxminiotest.az.minio.io"), BucketName = "flux", - TimeoutInSeconds = 1000, - SyncIntervalInSeconds = 1000, + TimeoutInSeconds = 1000L, + SyncIntervalInSeconds = 1000L, AccessKey = "fluxminiotest", }, Kustomizations = @@ -261,8 +261,8 @@ public async Task CreateOrUpdate_CreateFluxConfigurationWithBucketSourceKind() DependsOn = { }, -TimeoutInSeconds = 600, -SyncIntervalInSeconds = 600, +TimeoutInSeconds = 600L, +SyncIntervalInSeconds = 600L, }, ["srs-kustomization2"] = new Kustomization() { @@ -271,9 +271,9 @@ public async Task CreateOrUpdate_CreateFluxConfigurationWithBucketSourceKind() { "srs-kustomization1" }, -TimeoutInSeconds = 600, -SyncIntervalInSeconds = 600, -RetryIntervalInSeconds = 600, +TimeoutInSeconds = 600L, +SyncIntervalInSeconds = 600L, +RetryIntervalInSeconds = 600L, Prune = false, }, }, diff --git a/sdk/kubernetesconfiguration/Azure.ResourceManager.KubernetesConfiguration/samples/Generated/Samples/Sample_KubernetesFluxConfigurationResource.cs b/sdk/kubernetesconfiguration/Azure.ResourceManager.KubernetesConfiguration/samples/Generated/Samples/Sample_KubernetesFluxConfigurationResource.cs index 765bf02db1c8..81b83aeaab2b 100644 --- a/sdk/kubernetesconfiguration/Azure.ResourceManager.KubernetesConfiguration/samples/Generated/Samples/Sample_KubernetesFluxConfigurationResource.cs +++ b/sdk/kubernetesconfiguration/Azure.ResourceManager.KubernetesConfiguration/samples/Generated/Samples/Sample_KubernetesFluxConfigurationResource.cs @@ -90,12 +90,12 @@ public async Task Update_PatchFluxConfiguration() DependsOn = { }, -SyncIntervalInSeconds = 300, +SyncIntervalInSeconds = 300L, }, ["srs-kustomization3"] = new KustomizationUpdateContent() { Path = "./test/another-path", -SyncIntervalInSeconds = 300, +SyncIntervalInSeconds = 300L, }, }, }; diff --git a/sdk/labservices/Azure.ResourceManager.LabServices/CHANGELOG.md b/sdk/labservices/Azure.ResourceManager.LabServices/CHANGELOG.md index 0afec08270f1..f487608db11a 100644 --- a/sdk/labservices/Azure.ResourceManager.LabServices/CHANGELOG.md +++ b/sdk/labservices/Azure.ResourceManager.LabServices/CHANGELOG.md @@ -5,6 +5,7 @@ ### Features Added - Enable the new model serialization by using the System.ClientModel, refer this [document](https://aka.ms/azsdk/net/mrw) for more details. +- Exposed `JsonModelWriteCore` for model serialization procedure. ### Breaking Changes diff --git a/sdk/labservices/Azure.ResourceManager.LabServices/api/Azure.ResourceManager.LabServices.netstandard2.0.cs b/sdk/labservices/Azure.ResourceManager.LabServices/api/Azure.ResourceManager.LabServices.netstandard2.0.cs index 89ed36d2fb1a..561c3820c116 100644 --- a/sdk/labservices/Azure.ResourceManager.LabServices/api/Azure.ResourceManager.LabServices.netstandard2.0.cs +++ b/sdk/labservices/Azure.ResourceManager.LabServices/api/Azure.ResourceManager.LabServices.netstandard2.0.cs @@ -31,6 +31,7 @@ public LabData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.LabServices.Models.LabState? State { get { throw null; } } public string Title { get { throw null; } set { } } public Azure.ResourceManager.LabServices.Models.LabVirtualMachineProfile VirtualMachineProfile { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.LabServices.LabData 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.LabServices.LabData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -66,6 +67,7 @@ public LabPlanData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.LabServices.Models.LabServicesProvisioningState? ProvisioningState { get { throw null; } } public Azure.Core.ResourceIdentifier SharedGalleryId { get { throw null; } set { } } public Azure.ResourceManager.LabServices.Models.LabPlanSupportInfo SupportInfo { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.LabServices.LabPlanData 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.LabServices.LabPlanData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -177,6 +179,7 @@ public LabServicesScheduleData() { } public System.DateTimeOffset? StartOn { get { throw null; } set { } } public System.DateTimeOffset? StopOn { get { throw null; } set { } } public string TimeZoneId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.LabServices.LabServicesScheduleData 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.LabServices.LabServicesScheduleData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -230,6 +233,7 @@ public LabUserData(string email) { } public Azure.ResourceManager.LabServices.Models.LabServicesProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.LabServices.Models.LabUserRegistrationState? RegistrationState { get { throw null; } } public System.TimeSpan? TotalUsage { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.LabServices.LabUserData 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.LabServices.LabUserData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -280,6 +284,7 @@ public LabVirtualMachineData() { } public Azure.ResourceManager.LabServices.Models.LabServicesProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.LabServices.Models.LabVirtualMachineState? State { get { throw null; } } public Azure.ResourceManager.LabServices.Models.LabVirtualMachineType? VmType { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.LabServices.LabVirtualMachineData 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.LabServices.LabVirtualMachineData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -322,6 +327,7 @@ public LabVirtualMachineImageData() { } public string Sku { get { throw null; } } public Azure.ResourceManager.LabServices.Models.LabServicesEnableState? TermsStatus { get { throw null; } } public string Version { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.LabServices.LabVirtualMachineImageData 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.LabServices.LabVirtualMachineImageData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -441,6 +447,7 @@ internal AvailableLabServicesSku() { } public System.Collections.Generic.IReadOnlyList Restrictions { get { throw null; } } public string Size { get { throw null; } } public Azure.ResourceManager.LabServices.Models.AvailableLabServicesSkuTier? Tier { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.LabServices.Models.AvailableLabServicesSku 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.LabServices.Models.AvailableLabServicesSku System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -452,6 +459,7 @@ public partial class AvailableLabServicesSkuCapability : System.ClientModel.Prim internal AvailableLabServicesSkuCapability() { } public string Name { get { throw null; } } public string Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.LabServices.Models.AvailableLabServicesSkuCapability 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.LabServices.Models.AvailableLabServicesSkuCapability System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -465,6 +473,7 @@ internal AvailableLabServicesSkuCapacity() { } public long? Maximum { get { throw null; } } public long? Minimum { get { throw null; } } public Azure.ResourceManager.LabServices.Models.LabServicesSkuCapacityScaleType? ScaleType { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.LabServices.Models.AvailableLabServicesSkuCapacity 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.LabServices.Models.AvailableLabServicesSkuCapacity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -477,6 +486,7 @@ internal AvailableLabServicesSkuCost() { } public string ExtendedUnit { get { throw null; } } public string MeterId { get { throw null; } } public float? Quantity { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.LabServices.Models.AvailableLabServicesSkuCost 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.LabServices.Models.AvailableLabServicesSkuCost System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -489,6 +499,7 @@ internal AvailableLabServicesSkuRestrictions() { } public Azure.ResourceManager.LabServices.Models.LabServicesSkuRestrictionType? LabServicesSkuRestrictionType { get { throw null; } } public Azure.ResourceManager.LabServices.Models.LabServicesSkuRestrictionReasonCode? ReasonCode { get { throw null; } } public System.Collections.Generic.IReadOnlyList Values { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.LabServices.Models.AvailableLabServicesSkuRestrictions 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.LabServices.Models.AvailableLabServicesSkuRestrictions System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -522,6 +533,7 @@ public LabAutoShutdownProfile() { } public Azure.ResourceManager.LabServices.Models.LabServicesEnableState? ShutdownOnDisconnect { get { throw null; } set { } } public Azure.ResourceManager.LabServices.Models.LabVirtualMachineShutdownOnIdleMode? ShutdownOnIdle { get { throw null; } set { } } public Azure.ResourceManager.LabServices.Models.LabServicesEnableState? ShutdownWhenNotConnected { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.LabServices.Models.LabAutoShutdownProfile 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.LabServices.Models.LabAutoShutdownProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -535,6 +547,7 @@ public LabConnectionProfile() { } public Azure.ResourceManager.LabServices.Models.LabVirtualMachineConnectionType? ClientSshAccess { get { throw null; } set { } } public Azure.ResourceManager.LabServices.Models.LabVirtualMachineConnectionType? WebRdpAccess { get { throw null; } set { } } public Azure.ResourceManager.LabServices.Models.LabVirtualMachineConnectionType? WebSshAccess { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.LabServices.Models.LabConnectionProfile 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.LabServices.Models.LabConnectionProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -547,6 +560,7 @@ public LabNetworkProfile() { } public Azure.Core.ResourceIdentifier LoadBalancerId { get { throw null; } set { } } public Azure.Core.ResourceIdentifier PublicIPId { get { throw null; } set { } } public Azure.Core.ResourceIdentifier SubnetId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.LabServices.Models.LabNetworkProfile 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.LabServices.Models.LabNetworkProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -564,6 +578,7 @@ public LabPatch() { } public Azure.ResourceManager.LabServices.Models.LabSecurityProfile SecurityProfile { get { throw null; } set { } } public string Title { get { throw null; } set { } } public Azure.ResourceManager.LabServices.Models.LabVirtualMachineProfile VirtualMachineProfile { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.LabServices.Models.LabPatch 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.LabServices.Models.LabPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -581,6 +596,7 @@ public LabPlanPatch() { } public System.Uri LinkedLmsInstance { get { throw null; } set { } } public Azure.Core.ResourceIdentifier SharedGalleryId { get { throw null; } set { } } public Azure.ResourceManager.LabServices.Models.LabPlanSupportInfo SupportInfo { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.LabServices.Models.LabPlanPatch 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.LabServices.Models.LabPlanPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -594,6 +610,7 @@ public LabPlanSupportInfo() { } public string Instructions { get { throw null; } set { } } public string Phone { get { throw null; } set { } } public System.Uri Uri { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.LabServices.Models.LabPlanSupportInfo 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.LabServices.Models.LabPlanSupportInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -608,6 +625,7 @@ public LabRosterProfile() { } public string LtiClientId { get { throw null; } set { } } public string LtiContextId { get { throw null; } set { } } public System.Uri LtiRosterEndpoint { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.LabServices.Models.LabRosterProfile 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.LabServices.Models.LabRosterProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -619,6 +637,7 @@ public partial class LabSecurityProfile : System.ClientModel.Primitives.IJsonMod public LabSecurityProfile() { } public Azure.ResourceManager.LabServices.Models.LabServicesEnableState? OpenAccess { get { throw null; } set { } } public string RegistrationCode { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.LabServices.Models.LabSecurityProfile 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.LabServices.Models.LabSecurityProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -644,6 +663,7 @@ public partial class LabServicesPatchBaseInfo : System.ClientModel.Primitives.IJ { public LabServicesPatchBaseInfo() { } public System.Collections.Generic.IList Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.LabServices.Models.LabServicesPatchBaseInfo 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.LabServices.Models.LabServicesPatchBaseInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -671,6 +691,7 @@ public LabServicesRecurrencePattern(Azure.ResourceManager.LabServices.Models.Lab public Azure.ResourceManager.LabServices.Models.LabServicesRecurrenceFrequency Frequency { get { throw null; } set { } } public int? Interval { get { throw null; } set { } } public System.Collections.Generic.IList WeekDays { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.LabServices.Models.LabServicesRecurrencePattern 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.LabServices.Models.LabServicesRecurrencePattern System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -685,6 +706,7 @@ public LabServicesSchedulePatch() { } public System.DateTimeOffset? StartOn { get { throw null; } set { } } public System.DateTimeOffset? StopOn { get { throw null; } set { } } public string TimeZoneId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.LabServices.Models.LabServicesSchedulePatch 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.LabServices.Models.LabServicesSchedulePatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -699,6 +721,7 @@ public LabServicesSku(string name) { } public string Name { get { throw null; } set { } } public string Size { get { throw null; } set { } } public Azure.ResourceManager.LabServices.Models.LabServicesSkuTier? Tier { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.LabServices.Models.LabServicesSku 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.LabServices.Models.LabServicesSku System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -774,6 +797,7 @@ internal LabServicesUsage() { } public long? Limit { get { throw null; } } public Azure.ResourceManager.LabServices.Models.LabServicesUsageName Name { get { throw null; } } public Azure.ResourceManager.LabServices.Models.LabServicesUsageUnit? Unit { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.LabServices.Models.LabServicesUsage 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.LabServices.Models.LabServicesUsage System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -786,6 +810,7 @@ internal LabServicesUsageName() { } public string LocalizedValue { get { throw null; } } public System.Collections.Generic.IReadOnlyList SkuInstances { get { throw null; } } public string Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.LabServices.Models.LabServicesUsageName 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.LabServices.Models.LabServicesUsageName System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -828,6 +853,7 @@ public partial class LabUserInviteRequestContent : System.ClientModel.Primitives { public LabUserInviteRequestContent() { } public System.BinaryData Text { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.LabServices.Models.LabUserInviteRequestContent 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.LabServices.Models.LabUserInviteRequestContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -838,6 +864,7 @@ public partial class LabUserPatch : 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.LabServices.Models.LabUserPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -859,6 +886,7 @@ internal LabVirtualMachineConnectionProfile() { } public System.Uri RdpInBrowserUri { get { throw null; } } public string SshAuthority { get { throw null; } } public System.Uri SshInBrowserUri { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.LabServices.Models.LabVirtualMachineConnectionProfile 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.LabServices.Models.LabVirtualMachineConnectionProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -881,6 +909,7 @@ public partial class LabVirtualMachineCredential : System.ClientModel.Primitives public LabVirtualMachineCredential(string username) { } public string Password { get { throw null; } set { } } public string Username { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.LabServices.Models.LabVirtualMachineCredential 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.LabServices.Models.LabVirtualMachineCredential System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -892,6 +921,7 @@ public partial class LabVirtualMachineImageContent : System.ClientModel.Primitiv public LabVirtualMachineImageContent() { } public Azure.Core.ResourceIdentifier LabVirtualMachineId { get { throw null; } set { } } public string Name { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.LabServices.Models.LabVirtualMachineImageContent 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.LabServices.Models.LabVirtualMachineImageContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -912,6 +942,7 @@ public partial class LabVirtualMachineImagePatch : System.ClientModel.Primitives { public LabVirtualMachineImagePatch() { } public Azure.ResourceManager.LabServices.Models.LabServicesEnableState? EnabledState { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.LabServices.Models.LabVirtualMachineImagePatch 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.LabServices.Models.LabVirtualMachineImagePatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -927,6 +958,7 @@ public LabVirtualMachineImageReference() { } public string Publisher { get { throw null; } set { } } public string Sku { get { throw null; } set { } } public string Version { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.LabServices.Models.LabVirtualMachineImageReference 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.LabServices.Models.LabVirtualMachineImageReference System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -945,6 +977,7 @@ public LabVirtualMachineProfile(Azure.ResourceManager.LabServices.Models.LabVirt public Azure.ResourceManager.LabServices.Models.LabServicesSku Sku { get { throw null; } set { } } public System.TimeSpan UsageQuota { get { throw null; } set { } } public Azure.ResourceManager.LabServices.Models.LabServicesEnableState? UseSharedPassword { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.LabServices.Models.LabVirtualMachineProfile 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.LabServices.Models.LabVirtualMachineProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -956,6 +989,7 @@ public partial class LabVirtualMachineResetPasswordContent : System.ClientModel. public LabVirtualMachineResetPasswordContent(string username, string password) { } public string Password { get { throw null; } } public string Username { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.LabServices.Models.LabVirtualMachineResetPasswordContent 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.LabServices.Models.LabVirtualMachineResetPasswordContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } diff --git a/sdk/labservices/Azure.ResourceManager.LabServices/assets.json b/sdk/labservices/Azure.ResourceManager.LabServices/assets.json index 203171a8128c..371261efb5bf 100644 --- a/sdk/labservices/Azure.ResourceManager.LabServices/assets.json +++ b/sdk/labservices/Azure.ResourceManager.LabServices/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/labservices/Azure.ResourceManager.LabServices", - "Tag": "net/labservices/Azure.ResourceManager.LabServices_39c00a2871" + "Tag": "net/labservices/Azure.ResourceManager.LabServices_4c0ca58df3" } diff --git a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/LabData.Serialization.cs b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/LabData.Serialization.cs index 118b18225382..af920c765404 100644 --- a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/LabData.Serialization.cs +++ b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/LabData.Serialization.cs @@ -20,6 +20,15 @@ public partial class LabData : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,40 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions o throw new FormatException($"The model {nameof(LabData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(AutoShutdownProfile)) @@ -119,22 +95,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions o writer.WriteStringValue(State.Value.ToSerialString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } LabData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/LabPlanData.Serialization.cs b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/LabPlanData.Serialization.cs index 808f92231013..7e9e31df8207 100644 --- a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/LabPlanData.Serialization.cs +++ b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/LabPlanData.Serialization.cs @@ -20,6 +20,15 @@ public partial class LabPlanData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,45 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio throw new FormatException($"The model {nameof(LabPlanData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); JsonSerializer.Serialize(writer, Identity); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(DefaultConnectionProfile)) @@ -114,22 +90,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio writer.WriteStringValue(ProvisioningState.Value.ToSerialString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } LabPlanData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/LabServicesScheduleData.Serialization.cs b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/LabServicesScheduleData.Serialization.cs index d0d690d82209..08bbf14bc85d 100644 --- a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/LabServicesScheduleData.Serialization.cs +++ b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/LabServicesScheduleData.Serialization.cs @@ -20,6 +20,15 @@ public partial class LabServicesScheduleData : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(LabServicesScheduleData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(StartOn)) @@ -88,22 +77,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade writer.WriteStringValue(ProvisioningState.Value.ToSerialString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } LabServicesScheduleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/LabUserData.Serialization.cs b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/LabUserData.Serialization.cs index e001826a74a8..1f4940514cc0 100644 --- a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/LabUserData.Serialization.cs +++ b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/LabUserData.Serialization.cs @@ -20,6 +20,15 @@ public partial class LabUserData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio throw new FormatException($"The model {nameof(LabUserData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(AdditionalUsageQuota)) @@ -88,22 +77,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio writer.WriteStringValue(TotalUsage.Value, "P"); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } LabUserData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/LabVirtualMachineData.Serialization.cs b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/LabVirtualMachineData.Serialization.cs index 964dc454fd8e..b24ca40a142b 100644 --- a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/LabVirtualMachineData.Serialization.cs +++ b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/LabVirtualMachineData.Serialization.cs @@ -20,6 +20,15 @@ public partial class LabVirtualMachineData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(LabVirtualMachineData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) @@ -76,22 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW writer.WriteStringValue(VmType.Value.ToSerialString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } LabVirtualMachineData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/LabVirtualMachineImageData.Serialization.cs b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/LabVirtualMachineImageData.Serialization.cs index 05de1d236f49..e0e675641f0e 100644 --- a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/LabVirtualMachineImageData.Serialization.cs +++ b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/LabVirtualMachineImageData.Serialization.cs @@ -20,6 +20,15 @@ public partial class LabVirtualMachineImageData : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(LabVirtualMachineImageData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(EnabledState)) @@ -136,22 +125,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe writer.WriteStringValue(OSState.Value.ToSerialString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } LabVirtualMachineImageData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/AvailableLabServicesSku.Serialization.cs b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/AvailableLabServicesSku.Serialization.cs index 2e5ccfef500f..e1a87d97750c 100644 --- a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/AvailableLabServicesSku.Serialization.cs +++ b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/AvailableLabServicesSku.Serialization.cs @@ -18,6 +18,15 @@ public partial class AvailableLabServicesSku : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(AvailableLabServicesSku)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ResourceType)) { writer.WritePropertyName("resourceType"u8); @@ -111,7 +119,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } AvailableLabServicesSku IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/AvailableLabServicesSkuCapability.Serialization.cs b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/AvailableLabServicesSkuCapability.Serialization.cs index 34a3f040857b..9cf506a68ec6 100644 --- a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/AvailableLabServicesSkuCapability.Serialization.cs +++ b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/AvailableLabServicesSkuCapability.Serialization.cs @@ -18,6 +18,15 @@ public partial class AvailableLabServicesSkuCapability : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(AvailableLabServicesSkuCapability)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } AvailableLabServicesSkuCapability IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/AvailableLabServicesSkuCapacity.Serialization.cs b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/AvailableLabServicesSkuCapacity.Serialization.cs index c4289ab2a0fc..f451d6987ae2 100644 --- a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/AvailableLabServicesSkuCapacity.Serialization.cs +++ b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/AvailableLabServicesSkuCapacity.Serialization.cs @@ -18,6 +18,15 @@ public partial class AvailableLabServicesSkuCapacity : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(AvailableLabServicesSkuCapacity)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Default)) { writer.WritePropertyName("default"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } AvailableLabServicesSkuCapacity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/AvailableLabServicesSkuCost.Serialization.cs b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/AvailableLabServicesSkuCost.Serialization.cs index ae42532861b2..3cdd161f9c03 100644 --- a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/AvailableLabServicesSkuCost.Serialization.cs +++ b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/AvailableLabServicesSkuCost.Serialization.cs @@ -18,6 +18,15 @@ public partial class AvailableLabServicesSkuCost : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(AvailableLabServicesSkuCost)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(MeterId)) { writer.WritePropertyName("meterId"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } AvailableLabServicesSkuCost IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/AvailableLabServicesSkuRestrictions.Serialization.cs b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/AvailableLabServicesSkuRestrictions.Serialization.cs index 522e195a4a3e..936962cff34a 100644 --- a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/AvailableLabServicesSkuRestrictions.Serialization.cs +++ b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/AvailableLabServicesSkuRestrictions.Serialization.cs @@ -18,6 +18,15 @@ public partial class AvailableLabServicesSkuRestrictions : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(AvailableLabServicesSkuRestrictions)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(LabServicesSkuRestrictionType)) { writer.WritePropertyName("type"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } AvailableLabServicesSkuRestrictions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabAutoShutdownProfile.Serialization.cs b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabAutoShutdownProfile.Serialization.cs index 635ed33368a9..1e4156ca924f 100644 --- a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabAutoShutdownProfile.Serialization.cs +++ b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabAutoShutdownProfile.Serialization.cs @@ -18,6 +18,15 @@ public partial class LabAutoShutdownProfile : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(LabAutoShutdownProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ShutdownOnDisconnect)) { writer.WritePropertyName("shutdownOnDisconnect"u8); @@ -71,7 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } LabAutoShutdownProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabConnectionProfile.Serialization.cs b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabConnectionProfile.Serialization.cs index 4b18634b566a..d4067684852a 100644 --- a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabConnectionProfile.Serialization.cs +++ b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabConnectionProfile.Serialization.cs @@ -18,6 +18,15 @@ public partial class LabConnectionProfile : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(LabConnectionProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(WebSshAccess)) { writer.WritePropertyName("webSshAccess"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } LabConnectionProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabNetworkProfile.Serialization.cs b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabNetworkProfile.Serialization.cs index 83dcc9474aeb..94fa86b985dc 100644 --- a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabNetworkProfile.Serialization.cs +++ b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabNetworkProfile.Serialization.cs @@ -18,6 +18,15 @@ public partial class LabNetworkProfile : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(LabNetworkProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(SubnetId)) { writer.WritePropertyName("subnetId"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } LabNetworkProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabPatch.Serialization.cs b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabPatch.Serialization.cs index 4e10c6500ed5..289d9876dec1 100644 --- a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabPatch.Serialization.cs +++ b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabPatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class LabPatch : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,17 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions throw new FormatException($"The model {nameof(LabPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartArray(); - foreach (var item in Tags) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(AutoShutdownProfile)) @@ -79,22 +78,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions writer.WriteStringValue(Description); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } LabPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabPlanNetworkProfile.Serialization.cs b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabPlanNetworkProfile.Serialization.cs index 4de5dc1f8f62..a623927514d1 100644 --- a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabPlanNetworkProfile.Serialization.cs +++ b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabPlanNetworkProfile.Serialization.cs @@ -18,6 +18,15 @@ internal partial class LabPlanNetworkProfile : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(LabPlanNetworkProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(SubnetId)) { writer.WritePropertyName("subnetId"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } LabPlanNetworkProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabPlanPatch.Serialization.cs b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabPlanPatch.Serialization.cs index c84001357a6c..35038faa498a 100644 --- a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabPlanPatch.Serialization.cs +++ b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabPlanPatch.Serialization.cs @@ -19,6 +19,15 @@ public partial class LabPlanPatch : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,22 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(LabPlanPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); JsonSerializer.Serialize(writer, Identity); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartArray(); - foreach (var item in Tags) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(DefaultConnectionProfile)) @@ -85,22 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti writer.WriteStringValue(LinkedLmsInstance.AbsoluteUri); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } LabPlanPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabPlanSupportInfo.Serialization.cs b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabPlanSupportInfo.Serialization.cs index f5982cb0eced..60af82f02b94 100644 --- a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabPlanSupportInfo.Serialization.cs +++ b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabPlanSupportInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class LabPlanSupportInfo : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(LabPlanSupportInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Uri)) { writer.WritePropertyName("url"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } LabPlanSupportInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabRosterProfile.Serialization.cs b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabRosterProfile.Serialization.cs index 5b4b7fc61c18..08629262a58b 100644 --- a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabRosterProfile.Serialization.cs +++ b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabRosterProfile.Serialization.cs @@ -18,6 +18,15 @@ public partial class LabRosterProfile : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(LabRosterProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ActiveDirectoryGroupId)) { writer.WritePropertyName("activeDirectoryGroupId"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } LabRosterProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabSecurityProfile.Serialization.cs b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabSecurityProfile.Serialization.cs index f2c98462912e..299dc4fcd589 100644 --- a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabSecurityProfile.Serialization.cs +++ b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabSecurityProfile.Serialization.cs @@ -18,6 +18,15 @@ public partial class LabSecurityProfile : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(LabSecurityProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(RegistrationCode)) { writer.WritePropertyName("registrationCode"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } LabSecurityProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabServicesPatchBaseInfo.Serialization.cs b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabServicesPatchBaseInfo.Serialization.cs index eb75b4fc7733..c6a0de380e63 100644 --- a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabServicesPatchBaseInfo.Serialization.cs +++ b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabServicesPatchBaseInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class LabServicesPatchBaseInfo : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(LabServicesPatchBaseInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } LabServicesPatchBaseInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabServicesRecurrencePattern.Serialization.cs b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabServicesRecurrencePattern.Serialization.cs index 2554c6cd2f77..5853cc3ae2e9 100644 --- a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabServicesRecurrencePattern.Serialization.cs +++ b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabServicesRecurrencePattern.Serialization.cs @@ -18,6 +18,15 @@ public partial class LabServicesRecurrencePattern : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(LabServicesRecurrencePattern)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("frequency"u8); writer.WriteStringValue(Frequency.ToSerialString()); if (Optional.IsCollectionDefined(WeekDays)) @@ -60,7 +68,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } LabServicesRecurrencePattern IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabServicesSchedulePatch.Serialization.cs b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabServicesSchedulePatch.Serialization.cs index 43805a555fa1..c18f316f08f2 100644 --- a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabServicesSchedulePatch.Serialization.cs +++ b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabServicesSchedulePatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class LabServicesSchedulePatch : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(LabServicesSchedulePatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(StartOn)) @@ -76,7 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } LabServicesSchedulePatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabServicesSku.Serialization.cs b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabServicesSku.Serialization.cs index 98ec54aa2d82..b23ac8f4706d 100644 --- a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabServicesSku.Serialization.cs +++ b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabServicesSku.Serialization.cs @@ -18,6 +18,15 @@ public partial class LabServicesSku : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(LabServicesSku)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); if (Optional.IsDefined(Tier)) @@ -63,7 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp #endif } } - writer.WriteEndObject(); } LabServicesSku IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabServicesUsage.Serialization.cs b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabServicesUsage.Serialization.cs index 1c46f86e0127..c72010320f45 100644 --- a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabServicesUsage.Serialization.cs +++ b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabServicesUsage.Serialization.cs @@ -18,6 +18,15 @@ public partial class LabServicesUsage : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(LabServicesUsage)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(CurrentValue)) { writer.WritePropertyName("currentValue"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } LabServicesUsage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabServicesUsageListResult.Serialization.cs b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabServicesUsageListResult.Serialization.cs index ec3c8db0f9c0..02da2c74c8d5 100644 --- a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabServicesUsageListResult.Serialization.cs +++ b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabServicesUsageListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class LabServicesUsageListResult : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(LabServicesUsageListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } LabServicesUsageListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabServicesUsageName.Serialization.cs b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabServicesUsageName.Serialization.cs index bb8790726a5a..4605f4888f17 100644 --- a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabServicesUsageName.Serialization.cs +++ b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabServicesUsageName.Serialization.cs @@ -18,6 +18,15 @@ public partial class LabServicesUsageName : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(LabServicesUsageName)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(LocalizedValue)) { writer.WritePropertyName("localizedValue"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } LabServicesUsageName IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabUserInviteRequestContent.Serialization.cs b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabUserInviteRequestContent.Serialization.cs index cbdb42b349e4..7721c041c152 100644 --- a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabUserInviteRequestContent.Serialization.cs +++ b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabUserInviteRequestContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class LabUserInviteRequestContent : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(LabUserInviteRequestContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Text)) { writer.WritePropertyName("text"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } LabUserInviteRequestContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabUserPatch.Serialization.cs b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabUserPatch.Serialization.cs index 4b1b6a211458..03f8998dee26 100644 --- a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabUserPatch.Serialization.cs +++ b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabUserPatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class LabUserPatch : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(LabUserPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(AdditionalUsageQuota)) @@ -49,7 +57,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti #endif } } - writer.WriteEndObject(); } LabUserPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabVirtualMachineAdditionalCapability.Serialization.cs b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabVirtualMachineAdditionalCapability.Serialization.cs index e7d8d778d8c6..89bc42eb5fc2 100644 --- a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabVirtualMachineAdditionalCapability.Serialization.cs +++ b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabVirtualMachineAdditionalCapability.Serialization.cs @@ -18,6 +18,15 @@ internal partial class LabVirtualMachineAdditionalCapability : IUtf8JsonSerializ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(LabVirtualMachineAdditionalCapability)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(InstallGpuDrivers)) { writer.WritePropertyName("installGpuDrivers"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } LabVirtualMachineAdditionalCapability IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabVirtualMachineConnectionProfile.Serialization.cs b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabVirtualMachineConnectionProfile.Serialization.cs index ad37c64f42f3..26c970f69f75 100644 --- a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabVirtualMachineConnectionProfile.Serialization.cs +++ b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabVirtualMachineConnectionProfile.Serialization.cs @@ -19,6 +19,15 @@ public partial class LabVirtualMachineConnectionProfile : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(LabVirtualMachineConnectionProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(PrivateIPAddress)) { writer.WritePropertyName("privateIpAddress"u8); @@ -77,7 +85,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } LabVirtualMachineConnectionProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabVirtualMachineCredential.Serialization.cs b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabVirtualMachineCredential.Serialization.cs index 3b9540108084..cdb254ff0fc8 100644 --- a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabVirtualMachineCredential.Serialization.cs +++ b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabVirtualMachineCredential.Serialization.cs @@ -18,6 +18,15 @@ public partial class LabVirtualMachineCredential : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(LabVirtualMachineCredential)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("username"u8); writer.WriteStringValue(Username); if (Optional.IsDefined(Password)) @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } LabVirtualMachineCredential IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabVirtualMachineImageContent.Serialization.cs b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabVirtualMachineImageContent.Serialization.cs index af06405c31ce..3c05cc32a945 100644 --- a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabVirtualMachineImageContent.Serialization.cs +++ b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabVirtualMachineImageContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class LabVirtualMachineImageContent : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(LabVirtualMachineImageContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } LabVirtualMachineImageContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabVirtualMachineImagePatch.Serialization.cs b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabVirtualMachineImagePatch.Serialization.cs index 15b681890a5d..be2474134cba 100644 --- a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabVirtualMachineImagePatch.Serialization.cs +++ b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabVirtualMachineImagePatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class LabVirtualMachineImagePatch : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(LabVirtualMachineImagePatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(EnabledState)) @@ -49,7 +57,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } LabVirtualMachineImagePatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabVirtualMachineImageReference.Serialization.cs b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabVirtualMachineImageReference.Serialization.cs index dd912e79b4ad..f5308bb24914 100644 --- a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabVirtualMachineImageReference.Serialization.cs +++ b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabVirtualMachineImageReference.Serialization.cs @@ -18,6 +18,15 @@ public partial class LabVirtualMachineImageReference : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(LabVirtualMachineImageReference)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -71,7 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } LabVirtualMachineImageReference IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabVirtualMachineProfile.Serialization.cs b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabVirtualMachineProfile.Serialization.cs index c843d959485f..f195a35a970e 100644 --- a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabVirtualMachineProfile.Serialization.cs +++ b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabVirtualMachineProfile.Serialization.cs @@ -18,6 +18,15 @@ public partial class LabVirtualMachineProfile : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(LabVirtualMachineProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("createOption"u8); writer.WriteStringValue(CreateOption.ToSerialString()); writer.WritePropertyName("imageReference"u8); @@ -71,7 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } LabVirtualMachineProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabVirtualMachineResetPasswordContent.Serialization.cs b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabVirtualMachineResetPasswordContent.Serialization.cs index 1d514e4e02a5..bd681f195168 100644 --- a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabVirtualMachineResetPasswordContent.Serialization.cs +++ b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabVirtualMachineResetPasswordContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class LabVirtualMachineResetPasswordContent : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(LabVirtualMachineResetPasswordContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("username"u8); writer.WriteStringValue(Username); writer.WritePropertyName("password"u8); @@ -45,7 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } LabVirtualMachineResetPasswordContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/PagedImages.Serialization.cs b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/PagedImages.Serialization.cs index 1fb9ea61e0cd..e2cfe4882e9b 100644 --- a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/PagedImages.Serialization.cs +++ b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/PagedImages.Serialization.cs @@ -18,6 +18,15 @@ internal partial class PagedImages : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio throw new FormatException($"The model {nameof(PagedImages)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio #endif } } - writer.WriteEndObject(); } PagedImages IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/PagedLabPlans.Serialization.cs b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/PagedLabPlans.Serialization.cs index 5032d2c9b734..dbd16332f14d 100644 --- a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/PagedLabPlans.Serialization.cs +++ b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/PagedLabPlans.Serialization.cs @@ -18,6 +18,15 @@ internal partial class PagedLabPlans : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt throw new FormatException($"The model {nameof(PagedLabPlans)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt #endif } } - writer.WriteEndObject(); } PagedLabPlans IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/PagedLabServicesSkus.Serialization.cs b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/PagedLabServicesSkus.Serialization.cs index e1fb0ea1ee61..edee802438be 100644 --- a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/PagedLabServicesSkus.Serialization.cs +++ b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/PagedLabServicesSkus.Serialization.cs @@ -18,6 +18,15 @@ internal partial class PagedLabServicesSkus : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(PagedLabServicesSkus)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } PagedLabServicesSkus IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/PagedLabs.Serialization.cs b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/PagedLabs.Serialization.cs index 33805c21c89b..e15de2254fe6 100644 --- a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/PagedLabs.Serialization.cs +++ b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/PagedLabs.Serialization.cs @@ -18,6 +18,15 @@ internal partial class PagedLabs : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions throw new FormatException($"The model {nameof(PagedLabs)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions #endif } } - writer.WriteEndObject(); } PagedLabs IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/PagedSchedules.Serialization.cs b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/PagedSchedules.Serialization.cs index a7c43022d04a..8d67020c7cca 100644 --- a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/PagedSchedules.Serialization.cs +++ b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/PagedSchedules.Serialization.cs @@ -18,6 +18,15 @@ internal partial class PagedSchedules : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(PagedSchedules)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp #endif } } - writer.WriteEndObject(); } PagedSchedules IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/PagedUsers.Serialization.cs b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/PagedUsers.Serialization.cs index 6838a9db097c..777997614aaa 100644 --- a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/PagedUsers.Serialization.cs +++ b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/PagedUsers.Serialization.cs @@ -18,6 +18,15 @@ internal partial class PagedUsers : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOption throw new FormatException($"The model {nameof(PagedUsers)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOption #endif } } - writer.WriteEndObject(); } PagedUsers IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/PagedVirtualMachines.Serialization.cs b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/PagedVirtualMachines.Serialization.cs index 399315d74213..d4bc3055e231 100644 --- a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/PagedVirtualMachines.Serialization.cs +++ b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/PagedVirtualMachines.Serialization.cs @@ -18,6 +18,15 @@ internal partial class PagedVirtualMachines : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(PagedVirtualMachines)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } PagedVirtualMachines IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/labservices/Azure.ResourceManager.LabServices/src/autorest.md b/sdk/labservices/Azure.ResourceManager.LabServices/src/autorest.md index 627d3407ed8b..f40b4209d47f 100644 --- a/sdk/labservices/Azure.ResourceManager.LabServices/src/autorest.md +++ b/sdk/labservices/Azure.ResourceManager.LabServices/src/autorest.md @@ -18,6 +18,7 @@ skip-csproj: true modelerfour: flatten-payloads: false use-model-reader-writer: true +use-write-core: true rename-mapping: AvailableLabServicesSku.locations: -|azure-location diff --git a/sdk/logic/Azure.ResourceManager.Logic/CHANGELOG.md b/sdk/logic/Azure.ResourceManager.Logic/CHANGELOG.md index fb5ebbba81cb..d47082b7a4c4 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/CHANGELOG.md +++ b/sdk/logic/Azure.ResourceManager.Logic/CHANGELOG.md @@ -1,17 +1,22 @@ # Release History -## 1.2.0-beta.1 (Unreleased) +## 1.2.0-beta.2 (Unreleased) ### Features Added -- Enable the new model serialization by using the System.ClientModel, refer this [document](https://aka.ms/azsdk/net/mrw) for more details. - ### Breaking Changes ### Bugs Fixed ### Other Changes +## 1.2.0-beta.1 (2024-10-15) + +### Features Added + +- Enable the new model serialization by using the System.ClientModel, refer this [document](https://aka.ms/azsdk/net/mrw) for more details. +- Exposed `JsonModelWriteCore` for model serialization procedure. + ## 1.1.0 (2023-11-29) ### Features Added diff --git a/sdk/logic/Azure.ResourceManager.Logic/api/Azure.ResourceManager.Logic.netstandard2.0.cs b/sdk/logic/Azure.ResourceManager.Logic/api/Azure.ResourceManager.Logic.netstandard2.0.cs index ebd79c78fd00..256dd791e172 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/api/Azure.ResourceManager.Logic.netstandard2.0.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/api/Azure.ResourceManager.Logic.netstandard2.0.cs @@ -29,6 +29,7 @@ public IntegrationAccountAgreementData(Azure.Core.AzureLocation location, Azure. public Azure.ResourceManager.Logic.Models.IntegrationAccountBusinessIdentity HostIdentity { get { throw null; } set { } } public string HostPartner { get { throw null; } set { } } public System.BinaryData Metadata { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.IntegrationAccountAgreementData 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.Logic.IntegrationAccountAgreementData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -83,6 +84,7 @@ public partial class IntegrationAccountAssemblyDefinitionData : Azure.ResourceMa { public IntegrationAccountAssemblyDefinitionData(Azure.Core.AzureLocation location, Azure.ResourceManager.Logic.Models.IntegrationAccountAssemblyProperties properties) { } public Azure.ResourceManager.Logic.Models.IntegrationAccountAssemblyProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.IntegrationAccountAssemblyDefinitionData 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.Logic.IntegrationAccountAssemblyDefinitionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -137,6 +139,7 @@ public partial class IntegrationAccountBatchConfigurationData : Azure.ResourceMa { public IntegrationAccountBatchConfigurationData(Azure.Core.AzureLocation location, Azure.ResourceManager.Logic.Models.IntegrationAccountBatchConfigurationProperties properties) { } public Azure.ResourceManager.Logic.Models.IntegrationAccountBatchConfigurationProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.IntegrationAccountBatchConfigurationData 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.Logic.IntegrationAccountBatchConfigurationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -193,6 +196,7 @@ public IntegrationAccountCertificateData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.Logic.Models.IntegrationAccountKeyVaultKeyReference Key { get { throw null; } set { } } public System.BinaryData Metadata { get { throw null; } set { } } public System.BinaryData PublicCertificate { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.IntegrationAccountCertificateData 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.Logic.IntegrationAccountCertificateData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -247,6 +251,7 @@ public IntegrationAccountData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.Logic.Models.LogicResourceReference IntegrationServiceEnvironment { get { throw null; } set { } } public Azure.ResourceManager.Logic.Models.IntegrationAccountSkuName? SkuName { get { throw null; } set { } } public Azure.ResourceManager.Logic.Models.LogicWorkflowState? State { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.IntegrationAccountData 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.Logic.IntegrationAccountData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -281,6 +286,7 @@ public IntegrationAccountMapData(Azure.Core.AzureLocation location, Azure.Resour public Azure.ResourceManager.Logic.Models.IntegrationAccountMapType MapType { get { throw null; } set { } } public System.BinaryData Metadata { get { throw null; } set { } } public string ParametersSchemaRef { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.IntegrationAccountMapData 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.Logic.IntegrationAccountMapData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -339,6 +345,7 @@ public IntegrationAccountPartnerData(Azure.Core.AzureLocation location, Azure.Re public System.DateTimeOffset? CreatedOn { get { throw null; } } public System.BinaryData Metadata { get { throw null; } set { } } public Azure.ResourceManager.Logic.Models.IntegrationAccountPartnerType PartnerType { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.IntegrationAccountPartnerData 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.Logic.IntegrationAccountPartnerData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -459,6 +466,7 @@ public IntegrationAccountSchemaData(Azure.Core.AzureLocation location, Azure.Res public System.BinaryData Metadata { get { throw null; } set { } } public Azure.ResourceManager.Logic.Models.IntegrationAccountSchemaType SchemaType { get { throw null; } set { } } public string TargetNamespace { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.IntegrationAccountSchemaData 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.Logic.IntegrationAccountSchemaData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -515,6 +523,7 @@ public IntegrationAccountSessionData(Azure.Core.AzureLocation location) { } public System.DateTimeOffset? ChangedOn { get { throw null; } } public System.BinaryData Content { get { throw null; } set { } } public System.DateTimeOffset? CreatedOn { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.IntegrationAccountSessionData 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.Logic.IntegrationAccountSessionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -569,6 +578,7 @@ public IntegrationServiceEnvironmentData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public Azure.ResourceManager.Logic.Models.IntegrationServiceEnvironmentProperties Properties { get { throw null; } set { } } public Azure.ResourceManager.Logic.Models.IntegrationServiceEnvironmentSku Sku { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.IntegrationServiceEnvironmentData 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.Logic.IntegrationServiceEnvironmentData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -609,6 +619,7 @@ public IntegrationServiceEnvironmentManagedApiData(Azure.Core.AzureLocation loca public Azure.ResourceManager.Logic.Models.LogicWorkflowProvisioningState? ProvisioningState { get { throw null; } } public System.Collections.Generic.IReadOnlyList RuntimeUris { get { throw null; } } public System.Uri ServiceUri { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.IntegrationServiceEnvironmentManagedApiData 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.Logic.IntegrationServiceEnvironmentManagedApiData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -752,6 +763,7 @@ public LogicWorkflowData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.Logic.Models.LogicSku Sku { get { throw null; } } public Azure.ResourceManager.Logic.Models.LogicWorkflowState? State { get { throw null; } set { } } public string Version { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.LogicWorkflowData 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.Logic.LogicWorkflowData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -762,6 +774,7 @@ public partial class LogicWorkflowRequestHistoryData : Azure.ResourceManager.Mod { public LogicWorkflowRequestHistoryData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.Logic.Models.LogicWorkflowRequestHistoryProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.LogicWorkflowRequestHistoryData 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.Logic.LogicWorkflowRequestHistoryData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -853,6 +866,7 @@ internal LogicWorkflowRunActionData() { } public Azure.ResourceManager.Logic.Models.LogicWorkflowStatus? Status { get { throw null; } } public System.BinaryData TrackedProperties { get { throw null; } } public System.Guid? TrackingId { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.LogicWorkflowRunActionData 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.Logic.LogicWorkflowRunActionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -892,6 +906,7 @@ public LogicWorkflowRunActionRepetitionDefinitionData(Azure.Core.AzureLocation l public Azure.ResourceManager.Logic.Models.LogicWorkflowStatus? Status { get { throw null; } set { } } public System.BinaryData TrackedProperties { get { throw null; } } public System.Guid? TrackingId { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.LogicWorkflowRunActionRepetitionDefinitionData 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.Logic.LogicWorkflowRunActionRepetitionDefinitionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1064,6 +1079,7 @@ internal LogicWorkflowRunData() { } public Azure.ResourceManager.Logic.Models.LogicWorkflowRunTrigger Trigger { get { throw null; } } public System.DateTimeOffset? WaitEndOn { get { throw null; } } public Azure.ResourceManager.Logic.Models.LogicResourceReference Workflow { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.LogicWorkflowRunData 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.Logic.LogicWorkflowRunData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1145,6 +1161,7 @@ internal LogicWorkflowTriggerData() { } public Azure.ResourceManager.Logic.Models.LogicWorkflowState? State { get { throw null; } } public Azure.ResourceManager.Logic.Models.LogicWorkflowStatus? Status { get { throw null; } } public Azure.ResourceManager.Logic.Models.LogicResourceReference Workflow { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.LogicWorkflowTriggerData 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.Logic.LogicWorkflowTriggerData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1181,6 +1198,7 @@ internal LogicWorkflowTriggerHistoryData() { } public System.DateTimeOffset? StartOn { get { throw null; } } public Azure.ResourceManager.Logic.Models.LogicWorkflowStatus? Status { get { throw null; } } public System.Guid? TrackingId { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.LogicWorkflowTriggerHistoryData 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.Logic.LogicWorkflowTriggerHistoryData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1262,6 +1280,7 @@ public LogicWorkflowVersionData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.Logic.Models.LogicSku Sku { get { throw null; } } public Azure.ResourceManager.Logic.Models.LogicWorkflowState? State { get { throw null; } set { } } public string Version { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.LogicWorkflowVersionData 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.Logic.LogicWorkflowVersionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1409,6 +1428,7 @@ public ArtifactContentProperties() { } public System.BinaryData Content { get { throw null; } set { } } public Azure.ResourceManager.Logic.Models.LogicContentLink ContentLink { get { throw null; } set { } } public Azure.Core.ContentType? ContentType { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.ArtifactContentProperties 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.Logic.Models.ArtifactContentProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1421,6 +1441,7 @@ public ArtifactProperties() { } public System.DateTimeOffset? ChangedOn { get { throw null; } set { } } public System.DateTimeOffset? CreatedOn { get { throw null; } set { } } public System.BinaryData Metadata { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.ArtifactProperties 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.Logic.Models.ArtifactProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1434,6 +1455,7 @@ public AS2AcknowledgementConnectionSettings(bool ignoreCertificateNameMismatch, public bool KeepHttpConnectionAlive { get { throw null; } set { } } public bool SupportHttpStatusCodeContinue { get { throw null; } set { } } public bool UnfoldHttpHeaders { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.AS2AcknowledgementConnectionSettings 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.Logic.Models.AS2AcknowledgementConnectionSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1445,6 +1467,7 @@ public partial class AS2AgreementContent : System.ClientModel.Primitives.IJsonMo public AS2AgreementContent(Azure.ResourceManager.Logic.Models.AS2OneWayAgreement receiveAgreement, Azure.ResourceManager.Logic.Models.AS2OneWayAgreement sendAgreement) { } public Azure.ResourceManager.Logic.Models.AS2OneWayAgreement ReceiveAgreement { get { throw null; } set { } } public Azure.ResourceManager.Logic.Models.AS2OneWayAgreement SendAgreement { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.AS2AgreementContent 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.Logic.Models.AS2AgreementContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1482,6 +1505,7 @@ public AS2EnvelopeSettings(Azure.Core.ContentType messageContentType, bool trans public Azure.Core.ContentType MessageContentType { get { throw null; } set { } } public bool SuspendMessageOnFileNameGenerationError { get { throw null; } set { } } public bool TransmitFileNameInMimeHeader { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.AS2EnvelopeSettings 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.Logic.Models.AS2EnvelopeSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1493,6 +1517,7 @@ public partial class AS2ErrorSettings : System.ClientModel.Primitives.IJsonModel public AS2ErrorSettings(bool suspendDuplicateMessage, bool resendIfMdnNotReceived) { } public bool ResendIfMdnNotReceived { get { throw null; } set { } } public bool SuspendDuplicateMessage { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.AS2ErrorSettings 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.Logic.Models.AS2ErrorSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1534,6 +1559,7 @@ public AS2MdnSettings(bool needMdn, bool signMdn, bool sendMdnAsynchronously, bo public bool SendMdnAsynchronously { get { throw null; } set { } } public bool SignMdn { get { throw null; } set { } } public bool SignOutboundMdnIfOptional { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.AS2MdnSettings 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.Logic.Models.AS2MdnSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1547,6 +1573,7 @@ public AS2MessageConnectionSettings(bool ignoreCertificateNameMismatch, bool sup public bool KeepHttpConnectionAlive { get { throw null; } set { } } public bool SupportHttpStatusCodeContinue { get { throw null; } set { } } public bool UnfoldHttpHeaders { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.AS2MessageConnectionSettings 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.Logic.Models.AS2MessageConnectionSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1559,6 +1586,7 @@ public AS2OneWayAgreement(Azure.ResourceManager.Logic.Models.IntegrationAccountB public Azure.ResourceManager.Logic.Models.AS2ProtocolSettings ProtocolSettings { get { throw null; } set { } } public Azure.ResourceManager.Logic.Models.IntegrationAccountBusinessIdentity ReceiverBusinessIdentity { get { throw null; } set { } } public Azure.ResourceManager.Logic.Models.IntegrationAccountBusinessIdentity SenderBusinessIdentity { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.AS2OneWayAgreement 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.Logic.Models.AS2OneWayAgreement System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1575,6 +1603,7 @@ public AS2ProtocolSettings(Azure.ResourceManager.Logic.Models.AS2MessageConnecti public Azure.ResourceManager.Logic.Models.AS2MessageConnectionSettings MessageConnectionSettings { get { throw null; } set { } } public Azure.ResourceManager.Logic.Models.AS2SecuritySettings SecuritySettings { get { throw null; } set { } } public Azure.ResourceManager.Logic.Models.AS2ValidationSettings ValidationSettings { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.AS2ProtocolSettings 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.Logic.Models.AS2ProtocolSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1594,6 +1623,7 @@ public AS2SecuritySettings(bool overrideGroupSigningCertificate, bool enableNrrF public bool OverrideGroupSigningCertificate { get { throw null; } set { } } public string Sha2AlgorithmFormat { get { throw null; } set { } } public string SigningCertificateName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.AS2SecuritySettings 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.Logic.Models.AS2SecuritySettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1635,6 +1665,7 @@ public AS2ValidationSettings(bool overrideMessageProperties, bool encryptMessage public bool OverrideMessageProperties { get { throw null; } set { } } public Azure.ResourceManager.Logic.Models.AS2SigningAlgorithm? SigningAlgorithm { get { throw null; } set { } } public bool SignMessage { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.AS2ValidationSettings 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.Logic.Models.AS2ValidationSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1655,6 +1686,7 @@ public EdifactAcknowledgementSettings(bool needTechnicalAcknowledgement, bool ba public bool NeedTechnicalAcknowledgement { get { throw null; } set { } } public bool RolloverAcknowledgementControlNumber { get { throw null; } set { } } public bool SendSynchronousAcknowledgement { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.EdifactAcknowledgementSettings 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.Logic.Models.EdifactAcknowledgementSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1666,6 +1698,7 @@ public partial class EdifactAgreementContent : System.ClientModel.Primitives.IJs public EdifactAgreementContent(Azure.ResourceManager.Logic.Models.EdifactOneWayAgreement receiveAgreement, Azure.ResourceManager.Logic.Models.EdifactOneWayAgreement sendAgreement) { } public Azure.ResourceManager.Logic.Models.EdifactOneWayAgreement ReceiveAgreement { get { throw null; } set { } } public Azure.ResourceManager.Logic.Models.EdifactOneWayAgreement SendAgreement { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.EdifactAgreementContent 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.Logic.Models.EdifactAgreementContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1724,6 +1757,7 @@ public EdifactDelimiterOverride(int dataElementSeparator, int componentSeparator public int SegmentTerminator { get { throw null; } set { } } public Azure.ResourceManager.Logic.Models.SegmentTerminatorSuffix SegmentTerminatorSuffix { get { throw null; } set { } } public string TargetNamespace { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.EdifactDelimiterOverride 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.Logic.Models.EdifactDelimiterOverride System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1748,6 +1782,7 @@ public EdifactEnvelopeOverride() { } public string SenderApplicationId { get { throw null; } set { } } public string SenderApplicationQualifier { get { throw null; } set { } } public string TargetNamespace { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.EdifactEnvelopeOverride 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.Logic.Models.EdifactEnvelopeOverride System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1798,6 +1833,7 @@ public EdifactEnvelopeSettings(bool applyDelimiterStringAdvice, bool createGroup public string TransactionSetControlNumberPrefix { get { throw null; } set { } } public string TransactionSetControlNumberSuffix { get { throw null; } set { } } public long TransactionSetControlNumberUpperBound { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.EdifactEnvelopeSettings 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.Logic.Models.EdifactEnvelopeSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1818,6 +1854,7 @@ public EdifactFramingSettings(int protocolVersion, int dataElementSeparator, int public int SegmentTerminator { get { throw null; } set { } } public Azure.ResourceManager.Logic.Models.SegmentTerminatorSuffix SegmentTerminatorSuffix { get { throw null; } set { } } public string ServiceCodeListDirectoryVersion { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.EdifactFramingSettings 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.Logic.Models.EdifactFramingSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1828,6 +1865,7 @@ public partial class EdifactMessageFilter : System.ClientModel.Primitives.IJsonM { public EdifactMessageFilter(Azure.ResourceManager.Logic.Models.MessageFilterType messageFilterType) { } public Azure.ResourceManager.Logic.Models.MessageFilterType MessageFilterType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.EdifactMessageFilter 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.Logic.Models.EdifactMessageFilter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1838,6 +1876,7 @@ public partial class EdifactMessageIdentifier : System.ClientModel.Primitives.IJ { public EdifactMessageIdentifier(string messageId) { } public string MessageId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.EdifactMessageIdentifier 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.Logic.Models.EdifactMessageIdentifier System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1850,6 +1889,7 @@ public EdifactOneWayAgreement(Azure.ResourceManager.Logic.Models.IntegrationAcco public Azure.ResourceManager.Logic.Models.EdifactProtocolSettings ProtocolSettings { get { throw null; } set { } } public Azure.ResourceManager.Logic.Models.IntegrationAccountBusinessIdentity ReceiverBusinessIdentity { get { throw null; } set { } } public Azure.ResourceManager.Logic.Models.IntegrationAccountBusinessIdentity SenderBusinessIdentity { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.EdifactOneWayAgreement 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.Logic.Models.EdifactOneWayAgreement System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1864,6 +1904,7 @@ public EdifactProcessingSettings(bool maskSecurityInfo, bool preserveInterchange public bool PreserveInterchange { get { throw null; } set { } } public bool SuspendInterchangeOnError { get { throw null; } set { } } public bool UseDotAsDecimalSeparator { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.EdifactProcessingSettings 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.Logic.Models.EdifactProcessingSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1884,6 +1925,7 @@ public EdifactProtocolSettings(Azure.ResourceManager.Logic.Models.EdifactValidat public System.Collections.Generic.IList SchemaReferences { get { throw null; } } public System.Collections.Generic.IList ValidationOverrides { get { throw null; } } public Azure.ResourceManager.Logic.Models.EdifactValidationSettings ValidationSettings { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.EdifactProtocolSettings 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.Logic.Models.EdifactProtocolSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1900,6 +1942,7 @@ public EdifactSchemaReference(string messageId, string messageVersion, string me public string SchemaName { get { throw null; } set { } } public string SenderApplicationId { get { throw null; } set { } } public string SenderApplicationQualifier { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.EdifactSchemaReference 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.Logic.Models.EdifactSchemaReference System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1916,6 +1959,7 @@ public EdifactValidationOverride(string messageId, bool enforceCharacterSet, boo public bool TrimLeadingAndTrailingSpacesAndZeroes { get { throw null; } set { } } public bool ValidateEdiTypes { get { throw null; } set { } } public bool ValidateXsdTypes { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.EdifactValidationOverride 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.Logic.Models.EdifactValidationOverride System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1935,6 +1979,7 @@ public EdifactValidationSettings(bool validateCharacterSet, bool checkDuplicateI public bool ValidateCharacterSet { get { throw null; } set { } } public bool ValidateEdiTypes { get { throw null; } set { } } public bool ValidateXsdTypes { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.EdifactValidationSettings 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.Logic.Models.EdifactValidationSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1948,6 +1993,7 @@ public FlowAccessControlConfiguration() { } public Azure.ResourceManager.Logic.Models.FlowAccessControlConfigurationPolicy Contents { get { throw null; } set { } } public Azure.ResourceManager.Logic.Models.FlowAccessControlConfigurationPolicy Triggers { get { throw null; } set { } } public Azure.ResourceManager.Logic.Models.FlowAccessControlConfigurationPolicy WorkflowManagement { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.FlowAccessControlConfiguration 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.Logic.Models.FlowAccessControlConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1959,6 +2005,7 @@ public partial class FlowAccessControlConfigurationPolicy : System.ClientModel.P public FlowAccessControlConfigurationPolicy() { } public System.Collections.Generic.IDictionary AccessPolicies { get { throw null; } } public System.Collections.Generic.IList AllowedCallerIPAddresses { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.FlowAccessControlConfigurationPolicy 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.Logic.Models.FlowAccessControlConfigurationPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1969,6 +2016,7 @@ public partial class FlowAccessControlIPAddressRange : System.ClientModel.Primit { public FlowAccessControlIPAddressRange() { } public string AddressRange { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.FlowAccessControlIPAddressRange 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.Logic.Models.FlowAccessControlIPAddressRange System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1979,6 +2027,7 @@ public partial class FlowEndpointIPAddress : System.ClientModel.Primitives.IJson { public FlowEndpointIPAddress() { } public string CidrAddress { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.FlowEndpointIPAddress 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.Logic.Models.FlowEndpointIPAddress System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1990,6 +2039,7 @@ public partial class FlowEndpoints : System.ClientModel.Primitives.IJsonModel AccessEndpointIPAddresses { get { throw null; } } public System.Collections.Generic.IList OutgoingIPAddresses { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.FlowEndpoints 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.Logic.Models.FlowEndpoints System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2001,6 +2051,7 @@ public partial class FlowEndpointsConfiguration : System.ClientModel.Primitives. public FlowEndpointsConfiguration() { } public Azure.ResourceManager.Logic.Models.FlowEndpoints Connector { get { throw null; } set { } } public Azure.ResourceManager.Logic.Models.FlowEndpoints Workflow { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.FlowEndpointsConfiguration 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.Logic.Models.FlowEndpointsConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2011,6 +2062,7 @@ public partial class GenerateUpgradedDefinitionContent : System.ClientModel.Prim { public GenerateUpgradedDefinitionContent() { } public string TargetSchemaVersion { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.GenerateUpgradedDefinitionContent 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.Logic.Models.GenerateUpgradedDefinitionContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2023,6 +2075,7 @@ public IntegrationAccountAgreementContent() { } public Azure.ResourceManager.Logic.Models.AS2AgreementContent AS2 { get { throw null; } set { } } public Azure.ResourceManager.Logic.Models.EdifactAgreementContent Edifact { get { throw null; } set { } } public Azure.ResourceManager.Logic.Models.X12AgreementContent X12 { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.IntegrationAccountAgreementContent 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.Logic.Models.IntegrationAccountAgreementContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2043,6 +2096,7 @@ public IntegrationAccountAssemblyProperties(string assemblyName) { } public string AssemblyName { get { throw null; } set { } } public string AssemblyPublicKeyToken { get { throw null; } set { } } public string AssemblyVersion { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.IntegrationAccountAssemblyProperties 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.Logic.Models.IntegrationAccountAssemblyProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2054,6 +2108,7 @@ public partial class IntegrationAccountBatchConfigurationProperties : Azure.Reso public IntegrationAccountBatchConfigurationProperties(string batchGroupName, Azure.ResourceManager.Logic.Models.IntegrationAccountBatchReleaseCriteria releaseCriteria) { } public string BatchGroupName { get { throw null; } set { } } public Azure.ResourceManager.Logic.Models.IntegrationAccountBatchReleaseCriteria ReleaseCriteria { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.IntegrationAccountBatchConfigurationProperties 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.Logic.Models.IntegrationAccountBatchConfigurationProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2066,6 +2121,7 @@ public IntegrationAccountBatchReleaseCriteria() { } public int? BatchSize { get { throw null; } set { } } public int? MessageCount { get { throw null; } set { } } public Azure.ResourceManager.Logic.Models.LogicWorkflowTriggerRecurrence Recurrence { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.IntegrationAccountBatchReleaseCriteria 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.Logic.Models.IntegrationAccountBatchReleaseCriteria System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2077,6 +2133,7 @@ public partial class IntegrationAccountBusinessIdentity : System.ClientModel.Pri public IntegrationAccountBusinessIdentity(string qualifier, string value) { } public string Qualifier { get { throw null; } set { } } public string Value { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.IntegrationAccountBusinessIdentity 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.Logic.Models.IntegrationAccountBusinessIdentity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2099,6 +2156,7 @@ internal IntegrationAccountKeyVaultKey() { } public bool? IsEnabled { get { throw null; } } public System.Uri KeyId { get { throw null; } } public System.DateTimeOffset? UpdatedOn { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.IntegrationAccountKeyVaultKey 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.Logic.Models.IntegrationAccountKeyVaultKey System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2113,6 +2171,7 @@ public IntegrationAccountKeyVaultKeyReference(string keyName) { } public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } set { } } public string ResourceName { get { throw null; } } public Azure.Core.ResourceType? ResourceType { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.IntegrationAccountKeyVaultKeyReference 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.Logic.Models.IntegrationAccountKeyVaultKeyReference System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2122,6 +2181,7 @@ public IntegrationAccountKeyVaultKeyReference(string keyName) { } public partial class IntegrationAccountKeyVaultNameReference : Azure.ResourceManager.Logic.Models.LogicResourceReference, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public IntegrationAccountKeyVaultNameReference() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.IntegrationAccountKeyVaultNameReference 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.Logic.Models.IntegrationAccountKeyVaultNameReference System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2133,6 +2193,7 @@ public partial class IntegrationAccountListKeyVaultKeyContent : System.ClientMod public IntegrationAccountListKeyVaultKeyContent(Azure.ResourceManager.Logic.Models.IntegrationAccountKeyVaultNameReference keyVault) { } public Azure.ResourceManager.Logic.Models.IntegrationAccountKeyVaultNameReference KeyVault { get { throw null; } } public string SkipToken { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.IntegrationAccountListKeyVaultKeyContent 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.Logic.Models.IntegrationAccountListKeyVaultKeyContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2164,6 +2225,7 @@ public partial class IntegrationAccountPartnerContent : System.ClientModel.Primi { public IntegrationAccountPartnerContent() { } public System.Collections.Generic.IList B2BBusinessIdentities { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.IntegrationAccountPartnerContent 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.Logic.Models.IntegrationAccountPartnerContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2252,6 +2314,7 @@ public IntegrationAccountTrackingEvent(Azure.ResourceManager.Logic.Models.Integr public System.DateTimeOffset EventOn { get { throw null; } } public System.BinaryData Record { get { throw null; } set { } } public Azure.ResourceManager.Logic.Models.IntegrationAccountTrackingRecordType RecordType { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.IntegrationAccountTrackingEvent 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.Logic.Models.IntegrationAccountTrackingEvent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2263,6 +2326,7 @@ public partial class IntegrationAccountTrackingEventErrorInfo : System.ClientMod public IntegrationAccountTrackingEventErrorInfo() { } public string Code { get { throw null; } set { } } public string Message { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.IntegrationAccountTrackingEventErrorInfo 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.Logic.Models.IntegrationAccountTrackingEventErrorInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2275,6 +2339,7 @@ public IntegrationAccountTrackingEventsContent(string sourceType, System.Collect public System.Collections.Generic.IList Events { get { throw null; } } public string SourceType { get { throw null; } } public Azure.ResourceManager.Logic.Models.IntegrationAccountTrackEventOperationOption? TrackEventsOptions { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.IntegrationAccountTrackingEventsContent 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.Logic.Models.IntegrationAccountTrackingEventsContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2319,6 +2384,7 @@ public IntegrationServiceEnvironmenEncryptionKeyReference() { } public string KeyName { get { throw null; } set { } } public Azure.ResourceManager.Logic.Models.LogicResourceReference KeyVault { get { throw null; } set { } } public string KeyVersion { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.IntegrationServiceEnvironmenEncryptionKeyReference 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.Logic.Models.IntegrationServiceEnvironmenEncryptionKeyReference System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2350,6 +2416,7 @@ internal IntegrationServiceEnvironmentNetworkDependency() { } public Azure.ResourceManager.Logic.Models.IntegrationServiceEnvironmentNetworkDependencyCategoryType? Category { get { throw null; } } public string DisplayName { get { throw null; } } public System.Collections.Generic.IReadOnlyList Endpoints { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.IntegrationServiceEnvironmentNetworkDependency 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.Logic.Models.IntegrationServiceEnvironmentNetworkDependency System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2389,6 +2456,7 @@ public partial class IntegrationServiceEnvironmentNetworkDependencyHealth : Syst internal IntegrationServiceEnvironmentNetworkDependencyHealth() { } public Azure.ResourceManager.Logic.Models.IntegrationServiceErrorInfo Error { get { throw null; } } public Azure.ResourceManager.Logic.Models.IntegrationServiceEnvironmentNetworkDependencyHealthState? State { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.IntegrationServiceEnvironmentNetworkDependencyHealth 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.Logic.Models.IntegrationServiceEnvironmentNetworkDependencyHealth System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2421,6 +2489,7 @@ internal IntegrationServiceEnvironmentNetworkEndpoint() { } public Azure.ResourceManager.Logic.Models.IntegrationServiceEnvironmentNetworkEndPointAccessibilityState? Accessibility { get { throw null; } } public string DomainName { get { throw null; } } public System.Collections.Generic.IReadOnlyList Ports { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.IntegrationServiceEnvironmentNetworkEndpoint 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.Logic.Models.IntegrationServiceEnvironmentNetworkEndpoint System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2456,6 +2525,7 @@ public IntegrationServiceEnvironmentProperties() { } public Azure.ResourceManager.Logic.Models.IntegrationServiceNetworkConfiguration NetworkConfiguration { get { throw null; } set { } } public Azure.ResourceManager.Logic.Models.LogicWorkflowProvisioningState? ProvisioningState { get { throw null; } set { } } public Azure.ResourceManager.Logic.Models.LogicWorkflowState? State { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.IntegrationServiceEnvironmentProperties 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.Logic.Models.IntegrationServiceEnvironmentProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2467,6 +2537,7 @@ public partial class IntegrationServiceEnvironmentSku : System.ClientModel.Primi public IntegrationServiceEnvironmentSku() { } public int? Capacity { get { throw null; } set { } } public Azure.ResourceManager.Logic.Models.IntegrationServiceEnvironmentSkuName? Name { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.IntegrationServiceEnvironmentSku 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.Logic.Models.IntegrationServiceEnvironmentSku System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2480,6 +2551,7 @@ internal IntegrationServiceEnvironmentSkuCapacity() { } public int? Maximum { get { throw null; } } public int? Minimum { get { throw null; } } public Azure.ResourceManager.Logic.Models.IntegrationServiceEnvironmentSkuScaleType? ScaleType { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.IntegrationServiceEnvironmentSkuCapacity 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.Logic.Models.IntegrationServiceEnvironmentSkuCapacity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2492,6 +2564,7 @@ internal IntegrationServiceEnvironmentSkuDefinition() { } public Azure.ResourceManager.Logic.Models.IntegrationServiceEnvironmentSkuCapacity Capacity { get { throw null; } } public Azure.Core.ResourceType? ResourceType { get { throw null; } } public Azure.ResourceManager.Logic.Models.IntegrationServiceEnvironmentSkuDefinitionSku Sku { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.IntegrationServiceEnvironmentSkuDefinition 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.Logic.Models.IntegrationServiceEnvironmentSkuDefinition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2503,6 +2576,7 @@ public partial class IntegrationServiceEnvironmentSkuDefinitionSku : System.Clie internal IntegrationServiceEnvironmentSkuDefinitionSku() { } public Azure.ResourceManager.Logic.Models.IntegrationServiceEnvironmentSkuName? Name { get { throw null; } } public string Tier { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.IntegrationServiceEnvironmentSkuDefinitionSku 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.Logic.Models.IntegrationServiceEnvironmentSkuDefinitionSku System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2553,6 +2627,7 @@ internal IntegrationServiceEnvironmentSubnetNetworkHealth() { } public Azure.ResourceManager.Logic.Models.IntegrationServiceEnvironmentNetworkEndPointAccessibilityState NetworkDependencyHealthState { get { throw null; } } public System.Collections.Generic.IReadOnlyList OutboundNetworkDependencies { get { throw null; } } public Azure.ResourceManager.Logic.Models.IntegrationServiceEnvironmentNetworkDependencyHealth OutboundNetworkHealth { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.IntegrationServiceEnvironmentSubnetNetworkHealth 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.Logic.Models.IntegrationServiceEnvironmentSubnetNetworkHealth System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2586,6 +2661,7 @@ internal IntegrationServiceErrorInfo() { } public System.Collections.Generic.IReadOnlyList Details { get { throw null; } } public System.BinaryData InnerError { get { throw null; } } public string Message { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.IntegrationServiceErrorInfo 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.Logic.Models.IntegrationServiceErrorInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2598,6 +2674,7 @@ public IntegrationServiceNetworkConfiguration() { } public Azure.ResourceManager.Logic.Models.IntegrationServiceEnvironmentAccessEndpointType? EndpointType { get { throw null; } set { } } public System.Collections.Generic.IList Subnets { get { throw null; } } public string VirtualNetworkAddressSpace { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.IntegrationServiceNetworkConfiguration 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.Logic.Models.IntegrationServiceNetworkConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2608,6 +2685,7 @@ public partial class ListOperationCallbackUri : System.ClientModel.Primitives.IJ { internal ListOperationCallbackUri() { } public System.Uri Uri { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.ListOperationCallbackUri 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.Logic.Models.ListOperationCallbackUri System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2619,6 +2697,7 @@ public partial class ListOperationCallbackUrlParameterInfo : System.ClientModel. public ListOperationCallbackUrlParameterInfo() { } public Azure.ResourceManager.Logic.Models.LogicKeyType? KeyType { get { throw null; } set { } } public System.DateTimeOffset? NotAfter { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.ListOperationCallbackUrlParameterInfo 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.Logic.Models.ListOperationCallbackUrlParameterInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2633,6 +2712,7 @@ internal LogicApiDeploymentParameterMetadata() { } public string DisplayName { get { throw null; } } public bool? IsRequired { get { throw null; } } public Azure.ResourceManager.Logic.Models.LogicApiDeploymentParameterVisibility? Visibility { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.LogicApiDeploymentParameterMetadata 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.Logic.Models.LogicApiDeploymentParameterMetadata System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2644,6 +2724,7 @@ public partial class LogicApiDeploymentParameterMetadataSet : System.ClientModel internal LogicApiDeploymentParameterMetadataSet() { } public Azure.ResourceManager.Logic.Models.LogicApiDeploymentParameterMetadata PackageContentLink { get { throw null; } } public Azure.ResourceManager.Logic.Models.LogicApiDeploymentParameterMetadata RedisCacheConnectionString { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.LogicApiDeploymentParameterMetadataSet 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.Logic.Models.LogicApiDeploymentParameterMetadataSet System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2675,6 +2756,7 @@ public LogicApiOperationAnnotation() { } public string Family { get { throw null; } set { } } public int? Revision { get { throw null; } set { } } public Azure.ResourceManager.Logic.Models.LogicApiOperationAnnotationStatus? Status { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.LogicApiOperationAnnotation 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.Logic.Models.LogicApiOperationAnnotation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2704,6 +2786,7 @@ public partial class LogicApiOperationInfo : Azure.ResourceManager.Models.Tracke { public LogicApiOperationInfo(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.Logic.Models.LogicApiOperationProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.LogicApiOperationInfo 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.Logic.Models.LogicApiOperationInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2725,6 +2808,7 @@ public LogicApiOperationProperties() { } public string Trigger { get { throw null; } set { } } public string TriggerHint { get { throw null; } set { } } public string Visibility { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.LogicApiOperationProperties 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.Logic.Models.LogicApiOperationProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2741,6 +2825,7 @@ public LogicApiReference() { } public System.Uri IconUri { get { throw null; } set { } } public Azure.ResourceManager.Logic.Models.LogicResourceReference IntegrationServiceEnvironment { get { throw null; } set { } } public System.BinaryData Swagger { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.LogicApiReference 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.Logic.Models.LogicApiReference System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2752,6 +2837,7 @@ public partial class LogicApiResourceDefinitions : System.ClientModel.Primitives internal LogicApiResourceDefinitions() { } public System.Uri ModifiedSwaggerUri { get { throw null; } } public System.Uri OriginalSwaggerUri { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.LogicApiResourceDefinitions 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.Logic.Models.LogicApiResourceDefinitions System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2767,6 +2853,7 @@ internal LogicApiResourceGeneralInformation() { } public string ReleaseTag { get { throw null; } } public System.Uri TermsOfUseUri { get { throw null; } } public Azure.ResourceManager.Logic.Models.LogicApiTier? Tier { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.LogicApiResourceGeneralInformation 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.Logic.Models.LogicApiResourceGeneralInformation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2786,6 +2873,7 @@ internal LogicApiResourceMetadata() { } public System.Collections.Generic.IReadOnlyDictionary Tags { get { throw null; } } public Azure.ResourceManager.Logic.Models.LogicWsdlImportMethod? WsdlImportMethod { get { throw null; } } public Azure.ResourceManager.Logic.Models.LogicWsdlService WsdlService { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.LogicApiResourceMetadata 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.Logic.Models.LogicApiResourceMetadata System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2797,6 +2885,7 @@ public partial class LogicApiResourcePolicies : System.ClientModel.Primitives.IJ internal LogicApiResourcePolicies() { } public System.BinaryData Content { get { throw null; } } public string ContentLink { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.LogicApiResourcePolicies 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.Logic.Models.LogicApiResourcePolicies System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2847,6 +2936,7 @@ public partial class LogicContentHash : System.ClientModel.Primitives.IJsonModel internal LogicContentHash() { } public string Algorithm { get { throw null; } } public string Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.LogicContentHash 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.Logic.Models.LogicContentHash System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2861,6 +2951,7 @@ public LogicContentLink() { } public string ContentVersion { get { throw null; } } public System.BinaryData Metadata { get { throw null; } } public System.Uri Uri { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.LogicContentLink 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.Logic.Models.LogicContentLink System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2871,6 +2962,7 @@ public partial class LogicErrorInfo : 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.Logic.Models.LogicErrorInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2882,6 +2974,7 @@ public partial class LogicErrorResponse : System.ClientModel.Primitives.IJsonMod public LogicErrorResponse() { } public string Code { get { throw null; } set { } } public string Message { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.LogicErrorResponse 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.Logic.Models.LogicErrorResponse System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2895,6 +2988,7 @@ internal LogicExpression() { } public System.Collections.Generic.IReadOnlyList Subexpressions { get { throw null; } } public string Text { get { throw null; } } public System.BinaryData Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.LogicExpression 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.Logic.Models.LogicExpression System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2906,6 +3000,7 @@ public partial class LogicExpressionErrorInfo : Azure.ResourceManager.Logic.Mode internal LogicExpressionErrorInfo() { } public System.Collections.Generic.IReadOnlyList Details { get { throw null; } } public string Message { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.LogicExpressionErrorInfo 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.Logic.Models.LogicExpressionErrorInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2916,6 +3011,7 @@ public partial class LogicExpressionRoot : Azure.ResourceManager.Logic.Models.Lo { internal LogicExpressionRoot() { } public string Path { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.LogicExpressionRoot 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.Logic.Models.LogicExpressionRoot System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2927,6 +3023,7 @@ public partial class LogicJsonSchema : System.ClientModel.Primitives.IJsonModel< internal LogicJsonSchema() { } public System.BinaryData Content { get { throw null; } } public string Title { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.LogicJsonSchema 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.Logic.Models.LogicJsonSchema System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2958,6 +3055,7 @@ public LogicResourceReference() { } public Azure.Core.ResourceIdentifier Id { get { throw null; } set { } } public string Name { get { throw null; } } public Azure.Core.ResourceType? ResourceType { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.LogicResourceReference 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.Logic.Models.LogicResourceReference System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2969,6 +3067,7 @@ public partial class LogicSku : 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.Logic.Models.LogicSku System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3011,6 +3110,7 @@ public partial class LogicWorkflowOutputParameterInfo : Azure.ResourceManager.Lo { public LogicWorkflowOutputParameterInfo() { } public System.BinaryData Error { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.LogicWorkflowOutputParameterInfo 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.Logic.Models.LogicWorkflowOutputParameterInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3024,6 +3124,7 @@ public LogicWorkflowParameterInfo() { } public System.BinaryData Metadata { get { throw null; } set { } } public Azure.ResourceManager.Logic.Models.LogicWorkflowParameterType? ParameterType { get { throw null; } set { } } public System.BinaryData Value { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.LogicWorkflowParameterInfo 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.Logic.Models.LogicWorkflowParameterInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3125,6 +3226,7 @@ public LogicWorkflowRecurrenceSchedule() { } public System.Collections.Generic.IList MonthDays { get { throw null; } } public System.Collections.Generic.IList MonthlyOccurrences { get { throw null; } } public System.Collections.Generic.IList WeekDays { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.LogicWorkflowRecurrenceSchedule 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.Logic.Models.LogicWorkflowRecurrenceSchedule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3136,6 +3238,7 @@ public partial class LogicWorkflowRecurrenceScheduleOccurrence : System.ClientMo public LogicWorkflowRecurrenceScheduleOccurrence() { } public Azure.ResourceManager.Logic.Models.LogicWorkflowDayOfWeek? Day { get { throw null; } set { } } public int? Occurrence { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.LogicWorkflowRecurrenceScheduleOccurrence 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.Logic.Models.LogicWorkflowRecurrenceScheduleOccurrence System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3145,6 +3248,7 @@ public LogicWorkflowRecurrenceScheduleOccurrence() { } public partial class LogicWorkflowReference : Azure.ResourceManager.Logic.Models.LogicResourceReference, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public LogicWorkflowReference() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.LogicWorkflowReference 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.Logic.Models.LogicWorkflowReference System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3155,6 +3259,7 @@ public partial class LogicWorkflowRegenerateActionContent : System.ClientModel.P { public LogicWorkflowRegenerateActionContent() { } public Azure.ResourceManager.Logic.Models.LogicKeyType? KeyType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.LogicWorkflowRegenerateActionContent 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.Logic.Models.LogicWorkflowRegenerateActionContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3166,6 +3271,7 @@ public partial class LogicWorkflowRepetitionIndex : System.ClientModel.Primitive public LogicWorkflowRepetitionIndex(int itemIndex) { } public int ItemIndex { get { throw null; } set { } } public string ScopeName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.LogicWorkflowRepetitionIndex 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.Logic.Models.LogicWorkflowRepetitionIndex System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3178,6 +3284,7 @@ public LogicWorkflowRequest() { } public System.BinaryData Headers { get { throw null; } set { } } public string Method { get { throw null; } set { } } public System.Uri Uri { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.LogicWorkflowRequest 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.Logic.Models.LogicWorkflowRequest System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3191,6 +3298,7 @@ public LogicWorkflowRequestHistoryProperties() { } public Azure.ResourceManager.Logic.Models.LogicWorkflowRequest Request { get { throw null; } set { } } public Azure.ResourceManager.Logic.Models.LogicWorkflowResponse Response { get { throw null; } set { } } public System.DateTimeOffset? StartOn { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.LogicWorkflowRequestHistoryProperties 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.Logic.Models.LogicWorkflowRequestHistoryProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3203,6 +3311,7 @@ public LogicWorkflowResponse() { } public Azure.ResourceManager.Logic.Models.LogicContentLink BodyLink { get { throw null; } set { } } public System.BinaryData Headers { get { throw null; } set { } } public int? StatusCode { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.LogicWorkflowResponse 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.Logic.Models.LogicWorkflowResponse System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3213,6 +3322,7 @@ public partial class LogicWorkflowRunActionCorrelation : Azure.ResourceManager.L { public LogicWorkflowRunActionCorrelation() { } public System.Guid? ActionTrackingId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.LogicWorkflowRunActionCorrelation 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.Logic.Models.LogicWorkflowRunActionCorrelation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3224,6 +3334,7 @@ public partial class LogicWorkflowRunCorrelation : System.ClientModel.Primitives public LogicWorkflowRunCorrelation() { } public System.Collections.Generic.IList ClientKeywords { get { throw null; } } public string ClientTrackingId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.LogicWorkflowRunCorrelation 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.Logic.Models.LogicWorkflowRunCorrelation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3247,6 +3358,7 @@ internal LogicWorkflowRunTrigger() { } public Azure.ResourceManager.Logic.Models.LogicWorkflowStatus? Status { get { throw null; } } public System.BinaryData TrackedProperties { get { throw null; } } public System.Guid? TrackingId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.LogicWorkflowRunTrigger 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.Logic.Models.LogicWorkflowRunTrigger System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3312,6 +3424,7 @@ internal LogicWorkflowTriggerCallbackQueryParameterInfo() { } public string Sig { get { throw null; } } public string Sp { get { throw null; } } public string Sv { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.LogicWorkflowTriggerCallbackQueryParameterInfo 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.Logic.Models.LogicWorkflowTriggerCallbackQueryParameterInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3327,6 +3440,7 @@ internal LogicWorkflowTriggerCallbackUri() { } public string RelativePath { get { throw null; } } public System.Collections.Generic.IReadOnlyList RelativePathParameters { get { throw null; } } public string Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.LogicWorkflowTriggerCallbackUri 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.Logic.Models.LogicWorkflowTriggerCallbackUri System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3376,6 +3490,7 @@ public LogicWorkflowTriggerRecurrence() { } public Azure.ResourceManager.Logic.Models.LogicWorkflowRecurrenceSchedule Schedule { get { throw null; } set { } } public System.DateTimeOffset? StartOn { get { throw null; } set { } } public string TimeZone { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.LogicWorkflowTriggerRecurrence 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.Logic.Models.LogicWorkflowTriggerRecurrence System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3387,6 +3502,7 @@ public partial class LogicWorkflowTriggerReference : Azure.ResourceManager.Logic public LogicWorkflowTriggerReference() { } public string FlowName { get { throw null; } set { } } public string TriggerName { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.LogicWorkflowTriggerReference 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.Logic.Models.LogicWorkflowTriggerReference System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3397,6 +3513,7 @@ public partial class LogicWorkflowTriggerStateActionContent : System.ClientModel { public LogicWorkflowTriggerStateActionContent(Azure.ResourceManager.Logic.Models.LogicWorkflowTriggerReference source) { } public Azure.ResourceManager.Logic.Models.LogicWorkflowTriggerReference Source { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.LogicWorkflowTriggerStateActionContent 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.Logic.Models.LogicWorkflowTriggerStateActionContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3412,6 +3529,7 @@ public LogicWorkRetryHistory() { } public Azure.ResourceManager.Logic.Models.LogicErrorResponse Error { get { throw null; } set { } } public string ServiceRequestId { get { throw null; } set { } } public System.DateTimeOffset? StartOn { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.LogicWorkRetryHistory 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.Logic.Models.LogicWorkRetryHistory System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3442,6 +3560,7 @@ public partial class LogicWsdlService : System.ClientModel.Primitives.IJsonModel internal LogicWsdlService() { } public System.Collections.Generic.IReadOnlyList EndpointQualifiedNames { get { throw null; } } public string QualifiedName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.LogicWsdlService 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.Logic.Models.LogicWsdlService System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3472,6 +3591,7 @@ public partial class OpenAuthenticationAccessPolicy : System.ClientModel.Primiti public OpenAuthenticationAccessPolicy() { } public System.Collections.Generic.IList Claims { get { throw null; } } public Azure.ResourceManager.Logic.Models.OpenAuthenticationProviderType? ProviderType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.OpenAuthenticationAccessPolicy 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.Logic.Models.OpenAuthenticationAccessPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3483,6 +3603,7 @@ public partial class OpenAuthenticationPolicyClaim : System.ClientModel.Primitiv public OpenAuthenticationPolicyClaim() { } public string Name { get { throw null; } set { } } public string Value { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.OpenAuthenticationPolicyClaim 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.Logic.Models.OpenAuthenticationPolicyClaim System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3523,6 +3644,7 @@ public SwaggerCustomDynamicList() { } public string ItemValuePath { get { throw null; } set { } } public string OperationId { get { throw null; } set { } } public System.Collections.Generic.IDictionary Parameters { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.SwaggerCustomDynamicList 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.Logic.Models.SwaggerCustomDynamicList System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3535,6 +3657,7 @@ public SwaggerCustomDynamicProperties() { } public string OperationId { get { throw null; } set { } } public System.Collections.Generic.IDictionary Parameters { get { throw null; } } public string ValuePath { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.SwaggerCustomDynamicProperties 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.Logic.Models.SwaggerCustomDynamicProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3547,6 +3670,7 @@ public SwaggerCustomDynamicSchema() { } public string OperationId { get { throw null; } set { } } public System.Collections.Generic.IDictionary Parameters { get { throw null; } } public string ValuePath { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.SwaggerCustomDynamicSchema 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.Logic.Models.SwaggerCustomDynamicSchema System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3559,6 +3683,7 @@ public SwaggerCustomDynamicTree() { } public Azure.ResourceManager.Logic.Models.SwaggerCustomDynamicTreeCommand Browse { get { throw null; } set { } } public Azure.ResourceManager.Logic.Models.SwaggerCustomDynamicTreeCommand Open { get { throw null; } set { } } public Azure.ResourceManager.Logic.Models.SwaggerCustomDynamicTreeSettings Settings { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.SwaggerCustomDynamicTree 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.Logic.Models.SwaggerCustomDynamicTree System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3576,6 +3701,7 @@ public SwaggerCustomDynamicTreeCommand() { } public string OperationId { get { throw null; } set { } } public System.Collections.Generic.IDictionary Parameters { get { throw null; } } public string SelectableFilter { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.SwaggerCustomDynamicTreeCommand 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.Logic.Models.SwaggerCustomDynamicTreeCommand System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3589,6 +3715,7 @@ public SwaggerCustomDynamicTreeParameterInfo() { } public string ParameterReference { get { throw null; } set { } } public string SelectedItemValuePath { get { throw null; } set { } } public System.BinaryData Value { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.SwaggerCustomDynamicTreeParameterInfo 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.Logic.Models.SwaggerCustomDynamicTreeParameterInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3600,6 +3727,7 @@ public partial class SwaggerCustomDynamicTreeSettings : System.ClientModel.Primi public SwaggerCustomDynamicTreeSettings() { } public bool? CanSelectLeafNodes { get { throw null; } set { } } public bool? CanSelectParentNodes { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.SwaggerCustomDynamicTreeSettings 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.Logic.Models.SwaggerCustomDynamicTreeSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3612,6 +3740,7 @@ public SwaggerExternalDocumentation() { } public string Description { get { throw null; } set { } } public System.Collections.Generic.IDictionary Extensions { get { throw null; } } public System.Uri Uri { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.SwaggerExternalDocumentation 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.Logic.Models.SwaggerExternalDocumentation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3641,6 +3770,7 @@ public SwaggerSchema() { } public Azure.ResourceManager.Logic.Models.SwaggerSchemaType? SchemaType { get { throw null; } set { } } public string Title { get { throw null; } set { } } public Azure.ResourceManager.Logic.Models.SwaggerXml Xml { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.SwaggerSchema 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.Logic.Models.SwaggerSchema System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3680,6 +3810,7 @@ public SwaggerXml() { } public string Name { get { throw null; } set { } } public string Namespace { get { throw null; } set { } } public string Prefix { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.SwaggerXml 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.Logic.Models.SwaggerXml System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3744,6 +3875,7 @@ public X12AcknowledgementSettings(bool needTechnicalAcknowledgement, bool batchT public bool NeedTechnicalAcknowledgement { get { throw null; } set { } } public bool RolloverAcknowledgementControlNumber { get { throw null; } set { } } public bool SendSynchronousAcknowledgement { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.X12AcknowledgementSettings 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.Logic.Models.X12AcknowledgementSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3755,6 +3887,7 @@ public partial class X12AgreementContent : System.ClientModel.Primitives.IJsonMo public X12AgreementContent(Azure.ResourceManager.Logic.Models.X12OneWayAgreement receiveAgreement, Azure.ResourceManager.Logic.Models.X12OneWayAgreement sendAgreement) { } public Azure.ResourceManager.Logic.Models.X12OneWayAgreement ReceiveAgreement { get { throw null; } set { } } public Azure.ResourceManager.Logic.Models.X12OneWayAgreement SendAgreement { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.X12AgreementContent 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.Logic.Models.X12AgreementContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3812,6 +3945,7 @@ public X12DelimiterOverrides(int dataElementSeparator, int componentSeparator, i public int SegmentTerminator { get { throw null; } set { } } public Azure.ResourceManager.Logic.Models.SegmentTerminatorSuffix SegmentTerminatorSuffix { get { throw null; } set { } } public string TargetNamespace { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.X12DelimiterOverrides 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.Logic.Models.X12DelimiterOverrides System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3831,6 +3965,7 @@ public X12EnvelopeOverride(string targetNamespace, string protocolVersion, strin public string SenderApplicationId { get { throw null; } set { } } public string TargetNamespace { get { throw null; } set { } } public Azure.ResourceManager.Logic.Models.X12TimeFormat TimeFormat { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.X12EnvelopeOverride 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.Logic.Models.X12EnvelopeOverride System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3864,6 +3999,7 @@ public X12EnvelopeSettings(int controlStandardsId, bool useControlStandardsIdAsR public int TransactionSetControlNumberUpperBound { get { throw null; } set { } } public Azure.ResourceManager.Logic.Models.UsageIndicator UsageIndicator { get { throw null; } set { } } public bool UseControlStandardsIdAsRepetitionCharacter { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.X12EnvelopeSettings 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.Logic.Models.X12EnvelopeSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3880,6 +4016,7 @@ public X12FramingSettings(int dataElementSeparator, int componentSeparator, bool public bool ReplaceSeparatorsInPayload { get { throw null; } set { } } public int SegmentTerminator { get { throw null; } set { } } public Azure.ResourceManager.Logic.Models.SegmentTerminatorSuffix SegmentTerminatorSuffix { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.X12FramingSettings 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.Logic.Models.X12FramingSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3890,6 +4027,7 @@ public partial class X12MessageFilter : System.ClientModel.Primitives.IJsonModel { public X12MessageFilter(Azure.ResourceManager.Logic.Models.MessageFilterType messageFilterType) { } public Azure.ResourceManager.Logic.Models.MessageFilterType MessageFilterType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.X12MessageFilter 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.Logic.Models.X12MessageFilter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3900,6 +4038,7 @@ public partial class X12MessageIdentifier : System.ClientModel.Primitives.IJsonM { public X12MessageIdentifier(string messageId) { } public string MessageId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.X12MessageIdentifier 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.Logic.Models.X12MessageIdentifier System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3912,6 +4051,7 @@ public X12OneWayAgreement(Azure.ResourceManager.Logic.Models.IntegrationAccountB public Azure.ResourceManager.Logic.Models.X12ProtocolSettings ProtocolSettings { get { throw null; } set { } } public Azure.ResourceManager.Logic.Models.IntegrationAccountBusinessIdentity ReceiverBusinessIdentity { get { throw null; } set { } } public Azure.ResourceManager.Logic.Models.IntegrationAccountBusinessIdentity SenderBusinessIdentity { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.X12OneWayAgreement 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.Logic.Models.X12OneWayAgreement System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3927,6 +4067,7 @@ public X12ProcessingSettings(bool maskSecurityInfo, bool convertImpliedDecimal, public bool PreserveInterchange { get { throw null; } set { } } public bool SuspendInterchangeOnError { get { throw null; } set { } } public bool UseDotAsDecimalSeparator { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.X12ProcessingSettings 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.Logic.Models.X12ProcessingSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3948,6 +4089,7 @@ public X12ProtocolSettings(Azure.ResourceManager.Logic.Models.X12ValidationSetti public System.Collections.Generic.IList ValidationOverrides { get { throw null; } } public Azure.ResourceManager.Logic.Models.X12ValidationSettings ValidationSettings { get { throw null; } set { } } public System.Collections.Generic.IList X12DelimiterOverrides { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.X12ProtocolSettings 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.Logic.Models.X12ProtocolSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3961,6 +4103,7 @@ public X12SchemaReference(string messageId, string schemaVersion, string schemaN public string SchemaName { get { throw null; } set { } } public string SchemaVersion { get { throw null; } set { } } public string SenderApplicationId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.X12SchemaReference 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.Logic.Models.X12SchemaReference System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3974,6 +4117,7 @@ public X12SecuritySettings(string authorizationQualifier, string securityQualifi public string AuthorizationValue { get { throw null; } set { } } public string PasswordValue { get { throw null; } set { } } public string SecurityQualifier { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.X12SecuritySettings 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.Logic.Models.X12SecuritySettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4011,6 +4155,7 @@ public X12ValidationOverride(string messageId, bool validateEdiTypes, bool valid public bool ValidateCharacterSet { get { throw null; } set { } } public bool ValidateEdiTypes { get { throw null; } set { } } public bool ValidateXsdTypes { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.X12ValidationOverride 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.Logic.Models.X12ValidationOverride System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4030,6 +4175,7 @@ public X12ValidationSettings(bool validateCharacterSet, bool checkDuplicateInter public bool ValidateCharacterSet { get { throw null; } set { } } public bool ValidateEdiTypes { get { throw null; } set { } } public bool ValidateXsdTypes { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Logic.Models.X12ValidationSettings 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.Logic.Models.X12ValidationSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } diff --git a/sdk/logic/Azure.ResourceManager.Logic/assets.json b/sdk/logic/Azure.ResourceManager.Logic/assets.json index 94518e2223a5..93ff82c19482 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/assets.json +++ b/sdk/logic/Azure.ResourceManager.Logic/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/logic/Azure.ResourceManager.Logic", - "Tag": "net/logic/Azure.ResourceManager.Logic_e7a25166de" + "Tag": "net/logic/Azure.ResourceManager.Logic_1257461335" } diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Azure.ResourceManager.Logic.csproj b/sdk/logic/Azure.ResourceManager.Logic/src/Azure.ResourceManager.Logic.csproj index d87ad0ba61ee..9658ce0bafe0 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Azure.ResourceManager.Logic.csproj +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Azure.ResourceManager.Logic.csproj @@ -1,6 +1,6 @@ - 1.2.0-beta.1 + 1.2.0-beta.2 1.1.0 Azure.ResourceManager.Logic diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/IntegrationAccountAgreementData.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/IntegrationAccountAgreementData.Serialization.cs index 67b0729d37d0..3513db74c354 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/IntegrationAccountAgreementData.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/IntegrationAccountAgreementData.Serialization.cs @@ -20,6 +20,15 @@ public partial class IntegrationAccountAgreementData : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,40 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(IntegrationAccountAgreementData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(CreatedOn)) @@ -98,22 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo writer.WritePropertyName("content"u8); writer.WriteObjectValue(Content, options); writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } IntegrationAccountAgreementData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/IntegrationAccountAssemblyDefinitionData.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/IntegrationAccountAssemblyDefinitionData.Serialization.cs index 301ee9ff34cc..058f5b825590 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/IntegrationAccountAssemblyDefinitionData.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/IntegrationAccountAssemblyDefinitionData.Serialization.cs @@ -20,6 +20,15 @@ public partial class IntegrationAccountAssemblyDefinitionData : IUtf8JsonSeriali void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,58 +36,9 @@ void IJsonModel.Write(Utf8JsonWriter w throw new FormatException($"The model {nameof(IntegrationAccountAssemblyDefinitionData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteObjectValue(Properties, options); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } IntegrationAccountAssemblyDefinitionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/IntegrationAccountBatchConfigurationData.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/IntegrationAccountBatchConfigurationData.Serialization.cs index bfb8f787f997..4c59abd3d63c 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/IntegrationAccountBatchConfigurationData.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/IntegrationAccountBatchConfigurationData.Serialization.cs @@ -20,6 +20,15 @@ public partial class IntegrationAccountBatchConfigurationData : IUtf8JsonSeriali void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,58 +36,9 @@ void IJsonModel.Write(Utf8JsonWriter w throw new FormatException($"The model {nameof(IntegrationAccountBatchConfigurationData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteObjectValue(Properties, options); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } IntegrationAccountBatchConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/IntegrationAccountCertificateData.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/IntegrationAccountCertificateData.Serialization.cs index 1645e94a4951..c5866d4f611e 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/IntegrationAccountCertificateData.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/IntegrationAccountCertificateData.Serialization.cs @@ -20,6 +20,15 @@ public partial class IntegrationAccountCertificateData : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,40 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(IntegrationAccountCertificateData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(CreatedOn)) @@ -103,22 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } IntegrationAccountCertificateData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/IntegrationAccountData.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/IntegrationAccountData.Serialization.cs index 14e164a20375..1d22ae7fd3b8 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/IntegrationAccountData.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/IntegrationAccountData.Serialization.cs @@ -20,6 +20,15 @@ public partial class IntegrationAccountData : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,45 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(IntegrationAccountData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Sku)) { writer.WritePropertyName("sku"u8); writer.WriteObjectValue(Sku, options); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(IntegrationServiceEnvironment)) @@ -79,22 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader writer.WriteStringValue(State.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } IntegrationAccountData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/IntegrationAccountMapData.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/IntegrationAccountMapData.Serialization.cs index 10124be4bef8..bbcc17616288 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/IntegrationAccountMapData.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/IntegrationAccountMapData.Serialization.cs @@ -20,6 +20,15 @@ public partial class IntegrationAccountMapData : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,40 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(IntegrationAccountMapData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); writer.WritePropertyName("mapType"u8); @@ -115,22 +91,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } IntegrationAccountMapData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/IntegrationAccountPartnerData.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/IntegrationAccountPartnerData.Serialization.cs index 8e4276ec3175..98d81e2193c5 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/IntegrationAccountPartnerData.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/IntegrationAccountPartnerData.Serialization.cs @@ -20,6 +20,15 @@ public partial class IntegrationAccountPartnerData : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,40 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(IntegrationAccountPartnerData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); writer.WritePropertyName("partnerType"u8); @@ -90,22 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode writer.WritePropertyName("content"u8); writer.WriteObjectValue(Content, options); writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } IntegrationAccountPartnerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/IntegrationAccountSchemaData.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/IntegrationAccountSchemaData.Serialization.cs index 40dcf5e0c4b3..c6c6891f5eff 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/IntegrationAccountSchemaData.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/IntegrationAccountSchemaData.Serialization.cs @@ -20,6 +20,15 @@ public partial class IntegrationAccountSchemaData : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,40 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(IntegrationAccountSchemaData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); writer.WritePropertyName("schemaType"u8); @@ -125,22 +101,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model writer.WriteObjectValue(ContentLink, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } IntegrationAccountSchemaData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/IntegrationAccountSessionData.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/IntegrationAccountSessionData.Serialization.cs index 8788c23b6eb6..aee4bc8c856d 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/IntegrationAccountSessionData.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/IntegrationAccountSessionData.Serialization.cs @@ -19,6 +19,15 @@ public partial class IntegrationAccountSessionData : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,40 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(IntegrationAccountSessionData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(CreatedOn)) @@ -85,22 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } IntegrationAccountSessionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/IntegrationServiceEnvironmentData.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/IntegrationServiceEnvironmentData.Serialization.cs index e6b7d0e99cd3..57f47ca19ae5 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/IntegrationServiceEnvironmentData.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/IntegrationServiceEnvironmentData.Serialization.cs @@ -20,6 +20,15 @@ public partial class IntegrationServiceEnvironmentData : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(IntegrationServiceEnvironmentData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); @@ -43,55 +52,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WritePropertyName("identity"u8); JsonSerializer.Serialize(writer, Identity); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } IntegrationServiceEnvironmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/IntegrationServiceEnvironmentManagedApiData.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/IntegrationServiceEnvironmentManagedApiData.Serialization.cs index 09e39e150996..62b76fe7e979 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/IntegrationServiceEnvironmentManagedApiData.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/IntegrationServiceEnvironmentManagedApiData.Serialization.cs @@ -20,6 +20,15 @@ public partial class IntegrationServiceEnvironmentManagedApiData : IUtf8JsonSeri void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,40 +36,7 @@ void IJsonModel.Write(Utf8JsonWrite throw new FormatException($"The model {nameof(IntegrationServiceEnvironmentManagedApiData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(NamePropertiesName)) @@ -167,22 +143,6 @@ void IJsonModel.Write(Utf8JsonWrite writer.WriteObjectValue(DeploymentParameters, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } IntegrationServiceEnvironmentManagedApiData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/LogicWorkflowData.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/LogicWorkflowData.Serialization.cs index 57dbb88f679b..5984361ab0e7 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/LogicWorkflowData.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/LogicWorkflowData.Serialization.cs @@ -20,6 +20,15 @@ public partial class LogicWorkflowData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,45 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(LogicWorkflowData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); JsonSerializer.Serialize(writer, Identity); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) @@ -147,22 +123,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite writer.WriteEndObject(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } LogicWorkflowData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/LogicWorkflowRequestHistoryData.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/LogicWorkflowRequestHistoryData.Serialization.cs index 240cb6ed9257..a6257b688f3c 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/LogicWorkflowRequestHistoryData.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/LogicWorkflowRequestHistoryData.Serialization.cs @@ -20,6 +20,15 @@ public partial class LogicWorkflowRequestHistoryData : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,61 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(LogicWorkflowRequestHistoryData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); writer.WriteObjectValue(Properties, options); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } LogicWorkflowRequestHistoryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/LogicWorkflowRunActionData.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/LogicWorkflowRunActionData.Serialization.cs index 1de459a1feba..5ad579cd60f2 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/LogicWorkflowRunActionData.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/LogicWorkflowRunActionData.Serialization.cs @@ -20,6 +20,15 @@ public partial class LogicWorkflowRunActionData : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(LogicWorkflowRunActionData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(StartOn)) @@ -125,22 +114,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } LogicWorkflowRunActionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/LogicWorkflowRunActionRepetitionDefinitionData.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/LogicWorkflowRunActionRepetitionDefinitionData.Serialization.cs index af6aff1955f5..452925c4a013 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/LogicWorkflowRunActionRepetitionDefinitionData.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/LogicWorkflowRunActionRepetitionDefinitionData.Serialization.cs @@ -20,6 +20,15 @@ public partial class LogicWorkflowRunActionRepetitionDefinitionData : IUtf8JsonS void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,40 +36,7 @@ void IJsonModel.Write(Utf8JsonWr throw new FormatException($"The model {nameof(LogicWorkflowRunActionRepetitionDefinitionData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(StartOn)) @@ -177,22 +153,6 @@ void IJsonModel.Write(Utf8JsonWr writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } LogicWorkflowRunActionRepetitionDefinitionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/LogicWorkflowRunData.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/LogicWorkflowRunData.Serialization.cs index 3b0d43d83dad..544d36559d2c 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/LogicWorkflowRunData.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/LogicWorkflowRunData.Serialization.cs @@ -20,6 +20,15 @@ public partial class LogicWorkflowRunData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(LogicWorkflowRunData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(WaitEndOn)) @@ -124,22 +113,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr writer.WriteObjectValue(Response, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } LogicWorkflowRunData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/LogicWorkflowTriggerData.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/LogicWorkflowTriggerData.Serialization.cs index 5cf255f4d465..e887230d2fc1 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/LogicWorkflowTriggerData.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/LogicWorkflowTriggerData.Serialization.cs @@ -20,6 +20,15 @@ public partial class LogicWorkflowTriggerData : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(LogicWorkflowTriggerData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) @@ -96,22 +85,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead writer.WriteObjectValue(Workflow, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } LogicWorkflowTriggerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/LogicWorkflowTriggerHistoryData.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/LogicWorkflowTriggerHistoryData.Serialization.cs index 8a6be6f632c1..dce5416f1c14 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/LogicWorkflowTriggerHistoryData.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/LogicWorkflowTriggerHistoryData.Serialization.cs @@ -20,6 +20,15 @@ public partial class LogicWorkflowTriggerHistoryData : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(LogicWorkflowTriggerHistoryData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(StartOn)) @@ -118,22 +107,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo writer.WriteObjectValue(Run, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } LogicWorkflowTriggerHistoryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/LogicWorkflowVersionData.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/LogicWorkflowVersionData.Serialization.cs index abbc421f143e..67bb2cc17e8c 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/LogicWorkflowVersionData.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/LogicWorkflowVersionData.Serialization.cs @@ -20,6 +20,15 @@ public partial class LogicWorkflowVersionData : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,40 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(LogicWorkflowVersionData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) @@ -137,22 +113,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead writer.WriteEndObject(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } LogicWorkflowVersionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/AS2AcknowledgementConnectionSettings.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/AS2AcknowledgementConnectionSettings.Serialization.cs index de1d5558cc1d..5a207082b57b 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/AS2AcknowledgementConnectionSettings.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/AS2AcknowledgementConnectionSettings.Serialization.cs @@ -18,6 +18,15 @@ public partial class AS2AcknowledgementConnectionSettings : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(AS2AcknowledgementConnectionSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("ignoreCertificateNameMismatch"u8); writer.WriteBooleanValue(IgnoreCertificateNameMismatch); writer.WritePropertyName("supportHttpStatusCodeContinue"u8); @@ -49,7 +57,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } AS2AcknowledgementConnectionSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/AS2AgreementContent.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/AS2AgreementContent.Serialization.cs index 3b9793b793a6..024cebf08669 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/AS2AgreementContent.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/AS2AgreementContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class AS2AgreementContent : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(AS2AgreementContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("receiveAgreement"u8); writer.WriteObjectValue(ReceiveAgreement, options); writer.WritePropertyName("sendAgreement"u8); @@ -45,7 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } AS2AgreementContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/AS2EnvelopeSettings.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/AS2EnvelopeSettings.Serialization.cs index 0f267ba1c643..04ee9a3341ed 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/AS2EnvelopeSettings.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/AS2EnvelopeSettings.Serialization.cs @@ -18,6 +18,15 @@ public partial class AS2EnvelopeSettings : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(AS2EnvelopeSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("messageContentType"u8); writer.WriteStringValue(MessageContentType.ToString()); writer.WritePropertyName("transmitFileNameInMimeHeader"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } AS2EnvelopeSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/AS2ErrorSettings.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/AS2ErrorSettings.Serialization.cs index 17f52f5141fe..20b5eb6f5605 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/AS2ErrorSettings.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/AS2ErrorSettings.Serialization.cs @@ -18,6 +18,15 @@ public partial class AS2ErrorSettings : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(AS2ErrorSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("suspendDuplicateMessage"u8); writer.WriteBooleanValue(SuspendDuplicateMessage); writer.WritePropertyName("resendIfMDNNotReceived"u8); @@ -45,7 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } AS2ErrorSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/AS2MdnSettings.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/AS2MdnSettings.Serialization.cs index 2a58674e4ea0..70ca3f0d3c31 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/AS2MdnSettings.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/AS2MdnSettings.Serialization.cs @@ -18,6 +18,15 @@ public partial class AS2MdnSettings : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(AS2MdnSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("needMDN"u8); writer.WriteBooleanValue(NeedMdn); writer.WritePropertyName("signMDN"u8); @@ -68,7 +76,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp #endif } } - writer.WriteEndObject(); } AS2MdnSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/AS2MessageConnectionSettings.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/AS2MessageConnectionSettings.Serialization.cs index 17bba41122ba..da78fa2eaae4 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/AS2MessageConnectionSettings.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/AS2MessageConnectionSettings.Serialization.cs @@ -18,6 +18,15 @@ public partial class AS2MessageConnectionSettings : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(AS2MessageConnectionSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("ignoreCertificateNameMismatch"u8); writer.WriteBooleanValue(IgnoreCertificateNameMismatch); writer.WritePropertyName("supportHttpStatusCodeContinue"u8); @@ -49,7 +57,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } AS2MessageConnectionSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/AS2OneWayAgreement.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/AS2OneWayAgreement.Serialization.cs index d8a5c290ba19..552b0a0e5b90 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/AS2OneWayAgreement.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/AS2OneWayAgreement.Serialization.cs @@ -18,6 +18,15 @@ public partial class AS2OneWayAgreement : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(AS2OneWayAgreement)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("senderBusinessIdentity"u8); writer.WriteObjectValue(SenderBusinessIdentity, options); writer.WritePropertyName("receiverBusinessIdentity"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } AS2OneWayAgreement IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/AS2ProtocolSettings.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/AS2ProtocolSettings.Serialization.cs index 84bb3cd4f265..feb472ae2e81 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/AS2ProtocolSettings.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/AS2ProtocolSettings.Serialization.cs @@ -18,6 +18,15 @@ public partial class AS2ProtocolSettings : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(AS2ProtocolSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("messageConnectionSettings"u8); writer.WriteObjectValue(MessageConnectionSettings, options); writer.WritePropertyName("acknowledgementConnectionSettings"u8); @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } AS2ProtocolSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/AS2SecuritySettings.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/AS2SecuritySettings.Serialization.cs index edd535da2c54..fdaf551e2a0c 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/AS2SecuritySettings.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/AS2SecuritySettings.Serialization.cs @@ -18,6 +18,15 @@ public partial class AS2SecuritySettings : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(AS2SecuritySettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("overrideGroupSigningCertificate"u8); writer.WriteBooleanValue(OverrideGroupSigningCertificate); if (Optional.IsDefined(SigningCertificateName)) @@ -70,7 +78,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } AS2SecuritySettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/AS2ValidationSettings.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/AS2ValidationSettings.Serialization.cs index 1db4dcf8f3ac..bea2b214b328 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/AS2ValidationSettings.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/AS2ValidationSettings.Serialization.cs @@ -18,6 +18,15 @@ public partial class AS2ValidationSettings : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(AS2ValidationSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("overrideMessageProperties"u8); writer.WriteBooleanValue(OverrideMessageProperties); writer.WritePropertyName("encryptMessage"u8); @@ -64,7 +72,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } AS2ValidationSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/ArtifactContentProperties.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/ArtifactContentProperties.Serialization.cs index 81d4d7837cac..425d9e423904 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/ArtifactContentProperties.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/ArtifactContentProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class ArtifactContentProperties : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(ArtifactContentProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Content)) { writer.WritePropertyName("content"u8); @@ -48,44 +57,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea writer.WritePropertyName("contentLink"u8); writer.WriteObjectValue(ContentLink, options); } - if (Optional.IsDefined(CreatedOn)) - { - writer.WritePropertyName("createdTime"u8); - writer.WriteStringValue(CreatedOn.Value, "O"); - } - if (Optional.IsDefined(ChangedOn)) - { - writer.WritePropertyName("changedTime"u8); - writer.WriteStringValue(ChangedOn.Value, "O"); - } - if (Optional.IsDefined(Metadata)) - { - writer.WritePropertyName("metadata"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(Metadata); -#else - using (JsonDocument document = JsonDocument.Parse(Metadata)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ArtifactContentProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/ArtifactProperties.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/ArtifactProperties.Serialization.cs index 6edc93002153..0ad67bf38977 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/ArtifactProperties.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/ArtifactProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class ArtifactProperties : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ArtifactProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(CreatedOn)) { writer.WritePropertyName("createdTime"u8); @@ -63,7 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } ArtifactProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/B2BPartnerContent.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/B2BPartnerContent.Serialization.cs index 4bf413685e26..6dde5be85096 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/B2BPartnerContent.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/B2BPartnerContent.Serialization.cs @@ -18,6 +18,15 @@ internal partial class B2BPartnerContent : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(B2BPartnerContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(BusinessIdentities)) { writer.WritePropertyName("businessIdentities"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } B2BPartnerContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/BatchConfigurationCollection.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/BatchConfigurationCollection.Serialization.cs index b40019cafa08..699722387a52 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/BatchConfigurationCollection.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/BatchConfigurationCollection.Serialization.cs @@ -18,6 +18,15 @@ internal partial class BatchConfigurationCollection : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(BatchConfigurationCollection)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } BatchConfigurationCollection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/Correlation.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/Correlation.Serialization.cs index 8d952f70f6c4..d8c9461026c6 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/Correlation.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/Correlation.Serialization.cs @@ -18,6 +18,15 @@ internal partial class Correlation : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio throw new FormatException($"The model {nameof(Correlation)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ClientTrackingId)) { writer.WritePropertyName("clientTrackingId"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio #endif } } - writer.WriteEndObject(); } Correlation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/EdifactAcknowledgementSettings.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/EdifactAcknowledgementSettings.Serialization.cs index c1684624ceb8..adc0720ba951 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/EdifactAcknowledgementSettings.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/EdifactAcknowledgementSettings.Serialization.cs @@ -18,6 +18,15 @@ public partial class EdifactAcknowledgementSettings : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(EdifactAcknowledgementSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("needTechnicalAcknowledgement"u8); writer.WriteBooleanValue(NeedTechnicalAcknowledgement); writer.WritePropertyName("batchTechnicalAcknowledgements"u8); @@ -69,7 +77,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } EdifactAcknowledgementSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/EdifactAgreementContent.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/EdifactAgreementContent.Serialization.cs index fa0605139e3d..042a1cf4f0e8 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/EdifactAgreementContent.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/EdifactAgreementContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class EdifactAgreementContent : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(EdifactAgreementContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("receiveAgreement"u8); writer.WriteObjectValue(ReceiveAgreement, options); writer.WritePropertyName("sendAgreement"u8); @@ -45,7 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } EdifactAgreementContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/EdifactDelimiterOverride.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/EdifactDelimiterOverride.Serialization.cs index d99f48cdf37a..f84a1f0d3d2a 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/EdifactDelimiterOverride.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/EdifactDelimiterOverride.Serialization.cs @@ -18,6 +18,15 @@ public partial class EdifactDelimiterOverride : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(EdifactDelimiterOverride)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(MessageId)) { writer.WritePropertyName("messageId"u8); @@ -80,7 +88,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } EdifactDelimiterOverride IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/EdifactEnvelopeOverride.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/EdifactEnvelopeOverride.Serialization.cs index 2f1669f60675..e3eb565b9dd1 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/EdifactEnvelopeOverride.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/EdifactEnvelopeOverride.Serialization.cs @@ -18,6 +18,15 @@ public partial class EdifactEnvelopeOverride : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(EdifactEnvelopeOverride)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(MessageId)) { writer.WritePropertyName("messageId"u8); @@ -116,7 +124,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } EdifactEnvelopeOverride IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/EdifactEnvelopeSettings.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/EdifactEnvelopeSettings.Serialization.cs index e27d77fe0bd0..700b350556e8 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/EdifactEnvelopeSettings.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/EdifactEnvelopeSettings.Serialization.cs @@ -18,6 +18,15 @@ public partial class EdifactEnvelopeSettings : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(EdifactEnvelopeSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(GroupAssociationAssignedCode)) { writer.WritePropertyName("groupAssociationAssignedCode"u8); @@ -204,7 +212,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } EdifactEnvelopeSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/EdifactFramingSettings.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/EdifactFramingSettings.Serialization.cs index dd0a794b7361..324bd5858194 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/EdifactFramingSettings.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/EdifactFramingSettings.Serialization.cs @@ -18,6 +18,15 @@ public partial class EdifactFramingSettings : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(EdifactFramingSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ServiceCodeListDirectoryVersion)) { writer.WritePropertyName("serviceCodeListDirectoryVersion"u8); @@ -69,7 +77,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } EdifactFramingSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/EdifactMessageFilter.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/EdifactMessageFilter.Serialization.cs index c257f72e2e7a..b8741a4f587a 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/EdifactMessageFilter.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/EdifactMessageFilter.Serialization.cs @@ -18,6 +18,15 @@ public partial class EdifactMessageFilter : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(EdifactMessageFilter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("messageFilterType"u8); writer.WriteStringValue(MessageFilterType.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } EdifactMessageFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/EdifactMessageIdentifier.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/EdifactMessageIdentifier.Serialization.cs index a218b9016951..5b73de128233 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/EdifactMessageIdentifier.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/EdifactMessageIdentifier.Serialization.cs @@ -18,6 +18,15 @@ public partial class EdifactMessageIdentifier : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(EdifactMessageIdentifier)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("messageId"u8); writer.WriteStringValue(MessageId); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } EdifactMessageIdentifier IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/EdifactOneWayAgreement.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/EdifactOneWayAgreement.Serialization.cs index 418d2708f89d..680a67b7de04 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/EdifactOneWayAgreement.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/EdifactOneWayAgreement.Serialization.cs @@ -18,6 +18,15 @@ public partial class EdifactOneWayAgreement : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(EdifactOneWayAgreement)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("senderBusinessIdentity"u8); writer.WriteObjectValue(SenderBusinessIdentity, options); writer.WritePropertyName("receiverBusinessIdentity"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } EdifactOneWayAgreement IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/EdifactProcessingSettings.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/EdifactProcessingSettings.Serialization.cs index d43a214310ac..ffc6fda7def4 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/EdifactProcessingSettings.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/EdifactProcessingSettings.Serialization.cs @@ -18,6 +18,15 @@ public partial class EdifactProcessingSettings : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(EdifactProcessingSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("maskSecurityInfo"u8); writer.WriteBooleanValue(MaskSecurityInfo); writer.WritePropertyName("preserveInterchange"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } EdifactProcessingSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/EdifactProtocolSettings.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/EdifactProtocolSettings.Serialization.cs index 420db7afe4dd..b179e835a8e0 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/EdifactProtocolSettings.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/EdifactProtocolSettings.Serialization.cs @@ -18,6 +18,15 @@ public partial class EdifactProtocolSettings : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(EdifactProtocolSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("validationSettings"u8); writer.WriteObjectValue(ValidationSettings, options); writer.WritePropertyName("framingSettings"u8); @@ -100,7 +108,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } EdifactProtocolSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/EdifactSchemaReference.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/EdifactSchemaReference.Serialization.cs index 9ff12f0f87b5..911571caa998 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/EdifactSchemaReference.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/EdifactSchemaReference.Serialization.cs @@ -18,6 +18,15 @@ public partial class EdifactSchemaReference : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(EdifactSchemaReference)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("messageId"u8); writer.WriteStringValue(MessageId); writer.WritePropertyName("messageVersion"u8); @@ -64,7 +72,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } EdifactSchemaReference IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/EdifactValidationOverride.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/EdifactValidationOverride.Serialization.cs index 624c808af0bf..e002765a3e31 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/EdifactValidationOverride.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/EdifactValidationOverride.Serialization.cs @@ -18,6 +18,15 @@ public partial class EdifactValidationOverride : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(EdifactValidationOverride)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("messageId"u8); writer.WriteStringValue(MessageId); writer.WritePropertyName("enforceCharacterSet"u8); @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } EdifactValidationOverride IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/EdifactValidationSettings.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/EdifactValidationSettings.Serialization.cs index 18995e536bb3..85ddeed8eddc 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/EdifactValidationSettings.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/EdifactValidationSettings.Serialization.cs @@ -18,6 +18,15 @@ public partial class EdifactValidationSettings : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(EdifactValidationSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("validateCharacterSet"u8); writer.WriteBooleanValue(ValidateCharacterSet); writer.WritePropertyName("checkDuplicateInterchangeControlNumber"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } EdifactValidationSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/ExpressionTraces.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/ExpressionTraces.Serialization.cs index acb9423332f5..6d444b418f02 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/ExpressionTraces.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/ExpressionTraces.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ExpressionTraces : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(ExpressionTraces)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Inputs)) { writer.WritePropertyName("inputs"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } ExpressionTraces IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/FlowAccessControlConfiguration.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/FlowAccessControlConfiguration.Serialization.cs index 450e9efc78f4..9f896c74f9db 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/FlowAccessControlConfiguration.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/FlowAccessControlConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class FlowAccessControlConfiguration : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(FlowAccessControlConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Triggers)) { writer.WritePropertyName("triggers"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } FlowAccessControlConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/FlowAccessControlConfigurationPolicy.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/FlowAccessControlConfigurationPolicy.Serialization.cs index 1eae340ea2d6..5d706859c322 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/FlowAccessControlConfigurationPolicy.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/FlowAccessControlConfigurationPolicy.Serialization.cs @@ -18,6 +18,15 @@ public partial class FlowAccessControlConfigurationPolicy : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(FlowAccessControlConfigurationPolicy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(AllowedCallerIPAddresses)) { writer.WritePropertyName("allowedCallerIpAddresses"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } FlowAccessControlConfigurationPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/FlowAccessControlIPAddressRange.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/FlowAccessControlIPAddressRange.Serialization.cs index 8bcc86b407c8..2465dd116291 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/FlowAccessControlIPAddressRange.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/FlowAccessControlIPAddressRange.Serialization.cs @@ -18,6 +18,15 @@ public partial class FlowAccessControlIPAddressRange : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(FlowAccessControlIPAddressRange)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(AddressRange)) { writer.WritePropertyName("addressRange"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } FlowAccessControlIPAddressRange IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/FlowEndpointIPAddress.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/FlowEndpointIPAddress.Serialization.cs index fe3e8d0fc11e..80b5f7111fc9 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/FlowEndpointIPAddress.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/FlowEndpointIPAddress.Serialization.cs @@ -18,6 +18,15 @@ public partial class FlowEndpointIPAddress : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(FlowEndpointIPAddress)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(CidrAddress)) { writer.WritePropertyName("address"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } FlowEndpointIPAddress IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/FlowEndpoints.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/FlowEndpoints.Serialization.cs index 8abaa912dfc2..27aa7cba0aff 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/FlowEndpoints.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/FlowEndpoints.Serialization.cs @@ -18,6 +18,15 @@ public partial class FlowEndpoints : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt throw new FormatException($"The model {nameof(FlowEndpoints)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(OutgoingIPAddresses)) { writer.WritePropertyName("outgoingIpAddresses"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt #endif } } - writer.WriteEndObject(); } FlowEndpoints IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/FlowEndpointsConfiguration.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/FlowEndpointsConfiguration.Serialization.cs index 1cc4765ea1af..e7396b627587 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/FlowEndpointsConfiguration.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/FlowEndpointsConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class FlowEndpointsConfiguration : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(FlowEndpointsConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Workflow)) { writer.WritePropertyName("workflow"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } FlowEndpointsConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/GenerateUpgradedDefinitionContent.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/GenerateUpgradedDefinitionContent.Serialization.cs index d141c8e7cd55..91e6c59e878a 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/GenerateUpgradedDefinitionContent.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/GenerateUpgradedDefinitionContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class GenerateUpgradedDefinitionContent : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(GenerateUpgradedDefinitionContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(TargetSchemaVersion)) { writer.WritePropertyName("targetSchemaVersion"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } GenerateUpgradedDefinitionContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationAccountAgreementContent.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationAccountAgreementContent.Serialization.cs index 317196a42fd7..04a38645aec6 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationAccountAgreementContent.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationAccountAgreementContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class IntegrationAccountAgreementContent : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(IntegrationAccountAgreementContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(AS2)) { writer.WritePropertyName("aS2"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } IntegrationAccountAgreementContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationAccountAgreementListResult.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationAccountAgreementListResult.Serialization.cs index 7e1e9adb2250..766bd7cd241e 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationAccountAgreementListResult.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationAccountAgreementListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class IntegrationAccountAgreementListResult : IUtf8JsonSerializ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(IntegrationAccountAgreementListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } IntegrationAccountAgreementListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationAccountAssemblyList.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationAccountAssemblyList.Serialization.cs index 59cd0e5804a8..7c9abc20a34c 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationAccountAssemblyList.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationAccountAssemblyList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class IntegrationAccountAssemblyList : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(IntegrationAccountAssemblyList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } IntegrationAccountAssemblyList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationAccountAssemblyProperties.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationAccountAssemblyProperties.Serialization.cs index 912dc3d8416e..876af1bcb217 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationAccountAssemblyProperties.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationAccountAssemblyProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class IntegrationAccountAssemblyProperties : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(IntegrationAccountAssemblyProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("assemblyName"u8); writer.WriteStringValue(AssemblyName); if (Optional.IsDefined(AssemblyVersion)) @@ -43,66 +52,6 @@ void IJsonModel.Write(Utf8JsonWriter write writer.WritePropertyName("assemblyPublicKeyToken"u8); writer.WriteStringValue(AssemblyPublicKeyToken); } - if (Optional.IsDefined(Content)) - { - writer.WritePropertyName("content"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(Content); -#else - using (JsonDocument document = JsonDocument.Parse(Content)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - if (Optional.IsDefined(ContentType)) - { - writer.WritePropertyName("contentType"u8); - writer.WriteStringValue(ContentType.Value.ToString()); - } - if (Optional.IsDefined(ContentLink)) - { - writer.WritePropertyName("contentLink"u8); - writer.WriteObjectValue(ContentLink, options); - } - if (Optional.IsDefined(CreatedOn)) - { - writer.WritePropertyName("createdTime"u8); - writer.WriteStringValue(CreatedOn.Value, "O"); - } - if (Optional.IsDefined(ChangedOn)) - { - writer.WritePropertyName("changedTime"u8); - writer.WriteStringValue(ChangedOn.Value, "O"); - } - if (Optional.IsDefined(Metadata)) - { - writer.WritePropertyName("metadata"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(Metadata); -#else - using (JsonDocument document = JsonDocument.Parse(Metadata)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } IntegrationAccountAssemblyProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationAccountBatchConfigurationProperties.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationAccountBatchConfigurationProperties.Serialization.cs index e085e70c16cc..ae8b5bc509b3 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationAccountBatchConfigurationProperties.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationAccountBatchConfigurationProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class IntegrationAccountBatchConfigurationProperties : IUtf8JsonS void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,49 +34,11 @@ void IJsonModel.Write(Utf8JsonWr throw new FormatException($"The model {nameof(IntegrationAccountBatchConfigurationProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("batchGroupName"u8); writer.WriteStringValue(BatchGroupName); writer.WritePropertyName("releaseCriteria"u8); writer.WriteObjectValue(ReleaseCriteria, options); - if (Optional.IsDefined(CreatedOn)) - { - writer.WritePropertyName("createdTime"u8); - writer.WriteStringValue(CreatedOn.Value, "O"); - } - if (Optional.IsDefined(ChangedOn)) - { - writer.WritePropertyName("changedTime"u8); - writer.WriteStringValue(ChangedOn.Value, "O"); - } - if (Optional.IsDefined(Metadata)) - { - writer.WritePropertyName("metadata"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(Metadata); -#else - using (JsonDocument document = JsonDocument.Parse(Metadata)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } IntegrationAccountBatchConfigurationProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationAccountBatchReleaseCriteria.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationAccountBatchReleaseCriteria.Serialization.cs index e377c07c7505..fb282839cfa1 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationAccountBatchReleaseCriteria.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationAccountBatchReleaseCriteria.Serialization.cs @@ -18,6 +18,15 @@ public partial class IntegrationAccountBatchReleaseCriteria : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(IntegrationAccountBatchReleaseCriteria)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(MessageCount)) { writer.WritePropertyName("messageCount"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } IntegrationAccountBatchReleaseCriteria IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationAccountBusinessIdentity.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationAccountBusinessIdentity.Serialization.cs index 6bec6e3456a5..e57ffe09a4cd 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationAccountBusinessIdentity.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationAccountBusinessIdentity.Serialization.cs @@ -18,6 +18,15 @@ public partial class IntegrationAccountBusinessIdentity : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(IntegrationAccountBusinessIdentity)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("qualifier"u8); writer.WriteStringValue(Qualifier); writer.WritePropertyName("value"u8); @@ -45,7 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } IntegrationAccountBusinessIdentity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationAccountCertificateListResult.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationAccountCertificateListResult.Serialization.cs index cf3ab75da167..216c1349dd52 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationAccountCertificateListResult.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationAccountCertificateListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class IntegrationAccountCertificateListResult : IUtf8JsonSerial void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wr throw new FormatException($"The model {nameof(IntegrationAccountCertificateListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter wr #endif } } - writer.WriteEndObject(); } IntegrationAccountCertificateListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationAccountKeyVaultKey.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationAccountKeyVaultKey.Serialization.cs index 7dba299462aa..39cc8a049649 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationAccountKeyVaultKey.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationAccountKeyVaultKey.Serialization.cs @@ -18,6 +18,15 @@ public partial class IntegrationAccountKeyVaultKey : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(IntegrationAccountKeyVaultKey)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(KeyId)) { writer.WritePropertyName("kid"u8); @@ -64,7 +72,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } IntegrationAccountKeyVaultKey IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationAccountKeyVaultKeyList.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationAccountKeyVaultKeyList.Serialization.cs index c96057a5fd32..50f12ab35650 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationAccountKeyVaultKeyList.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationAccountKeyVaultKeyList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class IntegrationAccountKeyVaultKeyList : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(IntegrationAccountKeyVaultKeyList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } IntegrationAccountKeyVaultKeyList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationAccountKeyVaultKeyReference.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationAccountKeyVaultKeyReference.Serialization.cs index 3618a7837de8..6f37c2feba29 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationAccountKeyVaultKeyReference.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationAccountKeyVaultKeyReference.Serialization.cs @@ -18,6 +18,15 @@ public partial class IntegrationAccountKeyVaultKeyReference : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(IntegrationAccountKeyVaultKeyReference)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("keyName"u8); writer.WriteStringValue(KeyName); if (Optional.IsDefined(KeyVersion)) @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } IntegrationAccountKeyVaultKeyReference IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationAccountKeyVaultNameReference.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationAccountKeyVaultNameReference.Serialization.cs index 6afb049c7619..3a5dadcf89a9 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationAccountKeyVaultNameReference.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationAccountKeyVaultNameReference.Serialization.cs @@ -18,6 +18,15 @@ public partial class IntegrationAccountKeyVaultNameReference : IUtf8JsonSerializ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,38 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter wr throw new FormatException($"The model {nameof(IntegrationAccountKeyVaultNameReference)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } IntegrationAccountKeyVaultNameReference IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationAccountListKeyVaultKeyContent.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationAccountListKeyVaultKeyContent.Serialization.cs index c7d871e744a5..47a9aeb48fc7 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationAccountListKeyVaultKeyContent.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationAccountListKeyVaultKeyContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class IntegrationAccountListKeyVaultKeyContent : IUtf8JsonSeriali void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter w throw new FormatException($"The model {nameof(IntegrationAccountListKeyVaultKeyContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("keyVault"u8); writer.WriteObjectValue(KeyVault, options); if (Optional.IsDefined(SkipToken)) @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter w #endif } } - writer.WriteEndObject(); } IntegrationAccountListKeyVaultKeyContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationAccountListResult.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationAccountListResult.Serialization.cs index 740c055f4fbc..33b611661b42 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationAccountListResult.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationAccountListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class IntegrationAccountListResult : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(IntegrationAccountListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } IntegrationAccountListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationAccountMapListResult.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationAccountMapListResult.Serialization.cs index 05e346f4e3b6..1f7695ff42e3 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationAccountMapListResult.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationAccountMapListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class IntegrationAccountMapListResult : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(IntegrationAccountMapListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } IntegrationAccountMapListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationAccountMapPropertiesParametersSchema.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationAccountMapPropertiesParametersSchema.Serialization.cs index 241f30e47590..a24b954c27a1 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationAccountMapPropertiesParametersSchema.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationAccountMapPropertiesParametersSchema.Serialization.cs @@ -18,6 +18,15 @@ internal partial class IntegrationAccountMapPropertiesParametersSchema : IUtf8Js void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonW throw new FormatException($"The model {nameof(IntegrationAccountMapPropertiesParametersSchema)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Ref)) { writer.WritePropertyName("ref"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonW #endif } } - writer.WriteEndObject(); } IntegrationAccountMapPropertiesParametersSchema IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationAccountPartnerContent.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationAccountPartnerContent.Serialization.cs index 3ebb4346c035..840a8440a0ae 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationAccountPartnerContent.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationAccountPartnerContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class IntegrationAccountPartnerContent : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(IntegrationAccountPartnerContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(B2B)) { writer.WritePropertyName("b2b"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } IntegrationAccountPartnerContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationAccountPartnerListResult.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationAccountPartnerListResult.Serialization.cs index 20b94dcb16ad..2cb523179422 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationAccountPartnerListResult.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationAccountPartnerListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class IntegrationAccountPartnerListResult : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(IntegrationAccountPartnerListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } IntegrationAccountPartnerListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationAccountSchemaListResult.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationAccountSchemaListResult.Serialization.cs index 8a531b5b6a59..aae6a3f4a99b 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationAccountSchemaListResult.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationAccountSchemaListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class IntegrationAccountSchemaListResult : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(IntegrationAccountSchemaListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } IntegrationAccountSchemaListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationAccountSessionListResult.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationAccountSessionListResult.Serialization.cs index 9da70bc5ee98..39a400ab4301 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationAccountSessionListResult.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationAccountSessionListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class IntegrationAccountSessionListResult : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(IntegrationAccountSessionListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } IntegrationAccountSessionListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationAccountSku.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationAccountSku.Serialization.cs index 42dae507c991..b79fda978842 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationAccountSku.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationAccountSku.Serialization.cs @@ -18,6 +18,15 @@ internal partial class IntegrationAccountSku : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(IntegrationAccountSku)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } IntegrationAccountSku IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationAccountTrackingEvent.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationAccountTrackingEvent.Serialization.cs index 7029bfcc12e4..7757a45ee363 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationAccountTrackingEvent.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationAccountTrackingEvent.Serialization.cs @@ -18,6 +18,15 @@ public partial class IntegrationAccountTrackingEvent : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(IntegrationAccountTrackingEvent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("eventLevel"u8); writer.WriteStringValue(EventLevel.ToSerialString()); writer.WritePropertyName("eventTime"u8); @@ -64,7 +72,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } IntegrationAccountTrackingEvent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationAccountTrackingEventErrorInfo.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationAccountTrackingEventErrorInfo.Serialization.cs index 03d3d9ba0714..8c455451a4bd 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationAccountTrackingEventErrorInfo.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationAccountTrackingEventErrorInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class IntegrationAccountTrackingEventErrorInfo : IUtf8JsonSeriali void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter w throw new FormatException($"The model {nameof(IntegrationAccountTrackingEventErrorInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Message)) { writer.WritePropertyName("message"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter w #endif } } - writer.WriteEndObject(); } IntegrationAccountTrackingEventErrorInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationAccountTrackingEventsContent.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationAccountTrackingEventsContent.Serialization.cs index 7c39c942f918..517bd8e2c1c2 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationAccountTrackingEventsContent.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationAccountTrackingEventsContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class IntegrationAccountTrackingEventsContent : IUtf8JsonSerializ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wr throw new FormatException($"The model {nameof(IntegrationAccountTrackingEventsContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("sourceType"u8); writer.WriteStringValue(SourceType); if (Optional.IsDefined(TrackEventsOptions)) @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter wr #endif } } - writer.WriteEndObject(); } IntegrationAccountTrackingEventsContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationServiceEnvironmenEncryptionConfiguration.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationServiceEnvironmenEncryptionConfiguration.Serialization.cs index 57ef3d6d2c60..09c83f25707f 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationServiceEnvironmenEncryptionConfiguration.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationServiceEnvironmenEncryptionConfiguration.Serialization.cs @@ -18,6 +18,15 @@ internal partial class IntegrationServiceEnvironmenEncryptionConfiguration : IUt void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8J throw new FormatException($"The model {nameof(IntegrationServiceEnvironmenEncryptionConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(EncryptionKeyReference)) { writer.WritePropertyName("encryptionKeyReference"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8J #endif } } - writer.WriteEndObject(); } IntegrationServiceEnvironmenEncryptionConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationServiceEnvironmenEncryptionKeyReference.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationServiceEnvironmenEncryptionKeyReference.Serialization.cs index d3fc10a82b56..1a12b0db9618 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationServiceEnvironmenEncryptionKeyReference.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationServiceEnvironmenEncryptionKeyReference.Serialization.cs @@ -18,6 +18,15 @@ public partial class IntegrationServiceEnvironmenEncryptionKeyReference : IUtf8J void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8Js throw new FormatException($"The model {nameof(IntegrationServiceEnvironmenEncryptionKeyReference)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(KeyVault)) { writer.WritePropertyName("keyVault"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8Js #endif } } - writer.WriteEndObject(); } IntegrationServiceEnvironmenEncryptionKeyReference IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationServiceEnvironmentAccessEndpoint.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationServiceEnvironmentAccessEndpoint.Serialization.cs index 32835b19d3a4..e2514de79a47 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationServiceEnvironmentAccessEndpoint.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationServiceEnvironmentAccessEndpoint.Serialization.cs @@ -18,6 +18,15 @@ internal partial class IntegrationServiceEnvironmentAccessEndpoint : IUtf8JsonSe void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWrite throw new FormatException($"The model {nameof(IntegrationServiceEnvironmentAccessEndpoint)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(EndpointType)) { writer.WritePropertyName("type"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWrite #endif } } - writer.WriteEndObject(); } IntegrationServiceEnvironmentAccessEndpoint IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationServiceEnvironmentListResult.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationServiceEnvironmentListResult.Serialization.cs index 6b21fd48c6f2..9cd0748d3d48 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationServiceEnvironmentListResult.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationServiceEnvironmentListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class IntegrationServiceEnvironmentListResult : IUtf8JsonSerial void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wr throw new FormatException($"The model {nameof(IntegrationServiceEnvironmentListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter wr #endif } } - writer.WriteEndObject(); } IntegrationServiceEnvironmentListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationServiceEnvironmentManagedApiDeploymentParameters.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationServiceEnvironmentManagedApiDeploymentParameters.Serialization.cs index 057dcdbf4de8..efb2c86047ea 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationServiceEnvironmentManagedApiDeploymentParameters.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationServiceEnvironmentManagedApiDeploymentParameters.Serialization.cs @@ -18,6 +18,15 @@ internal partial class IntegrationServiceEnvironmentManagedApiDeploymentParamete void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Wri throw new FormatException($"The model {nameof(IntegrationServiceEnvironmentManagedApiDeploymentParameters)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ContentLinkDefinition)) { writer.WritePropertyName("contentLinkDefinition"u8); @@ -46,7 +54,6 @@ void IJsonModel.Wri #endif } } - writer.WriteEndObject(); } IntegrationServiceEnvironmentManagedApiDeploymentParameters IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationServiceEnvironmentManagedApiListResult.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationServiceEnvironmentManagedApiListResult.Serialization.cs index d947d90201ba..0647325e25f9 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationServiceEnvironmentManagedApiListResult.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationServiceEnvironmentManagedApiListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class IntegrationServiceEnvironmentManagedApiListResult : IUtf8 void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8Jso throw new FormatException($"The model {nameof(IntegrationServiceEnvironmentManagedApiListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8Jso #endif } } - writer.WriteEndObject(); } IntegrationServiceEnvironmentManagedApiListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationServiceEnvironmentNetworkDependency.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationServiceEnvironmentNetworkDependency.Serialization.cs index 74ec0e9a2f83..a9a183bc38ab 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationServiceEnvironmentNetworkDependency.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationServiceEnvironmentNetworkDependency.Serialization.cs @@ -18,6 +18,15 @@ public partial class IntegrationServiceEnvironmentNetworkDependency : IUtf8JsonS void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWr throw new FormatException($"The model {nameof(IntegrationServiceEnvironmentNetworkDependency)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Category)) { writer.WritePropertyName("category"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWr #endif } } - writer.WriteEndObject(); } IntegrationServiceEnvironmentNetworkDependency IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationServiceEnvironmentNetworkDependencyHealth.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationServiceEnvironmentNetworkDependencyHealth.Serialization.cs index fac54cf7c4ca..b0e727e460c2 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationServiceEnvironmentNetworkDependencyHealth.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationServiceEnvironmentNetworkDependencyHealth.Serialization.cs @@ -18,6 +18,15 @@ public partial class IntegrationServiceEnvironmentNetworkDependencyHealth : IUtf void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8 throw new FormatException($"The model {nameof(IntegrationServiceEnvironmentNetworkDependencyHealth)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Error)) { writer.WritePropertyName("error"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8 #endif } } - writer.WriteEndObject(); } IntegrationServiceEnvironmentNetworkDependencyHealth IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationServiceEnvironmentNetworkEndpoint.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationServiceEnvironmentNetworkEndpoint.Serialization.cs index 1bf64cde402c..4b6cac814c1f 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationServiceEnvironmentNetworkEndpoint.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationServiceEnvironmentNetworkEndpoint.Serialization.cs @@ -18,6 +18,15 @@ public partial class IntegrationServiceEnvironmentNetworkEndpoint : IUtf8JsonSer void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWrit throw new FormatException($"The model {nameof(IntegrationServiceEnvironmentNetworkEndpoint)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Accessibility)) { writer.WritePropertyName("accessibility"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWrit #endif } } - writer.WriteEndObject(); } IntegrationServiceEnvironmentNetworkEndpoint IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationServiceEnvironmentProperties.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationServiceEnvironmentProperties.Serialization.cs index 3e5652e5b31f..ec564ec5f09c 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationServiceEnvironmentProperties.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationServiceEnvironmentProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class IntegrationServiceEnvironmentProperties : IUtf8JsonSerializ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wr throw new FormatException($"The model {nameof(IntegrationServiceEnvironmentProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ProvisioningState)) { writer.WritePropertyName("provisioningState"u8); @@ -71,7 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter wr #endif } } - writer.WriteEndObject(); } IntegrationServiceEnvironmentProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationServiceEnvironmentSku.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationServiceEnvironmentSku.Serialization.cs index b453df33d55f..34155e416156 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationServiceEnvironmentSku.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationServiceEnvironmentSku.Serialization.cs @@ -18,6 +18,15 @@ public partial class IntegrationServiceEnvironmentSku : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(IntegrationServiceEnvironmentSku)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } IntegrationServiceEnvironmentSku IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationServiceEnvironmentSkuCapacity.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationServiceEnvironmentSkuCapacity.Serialization.cs index a86988b532a6..b216c0652557 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationServiceEnvironmentSkuCapacity.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationServiceEnvironmentSkuCapacity.Serialization.cs @@ -18,6 +18,15 @@ public partial class IntegrationServiceEnvironmentSkuCapacity : IUtf8JsonSeriali void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter w throw new FormatException($"The model {nameof(IntegrationServiceEnvironmentSkuCapacity)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Minimum)) { writer.WritePropertyName("minimum"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter w #endif } } - writer.WriteEndObject(); } IntegrationServiceEnvironmentSkuCapacity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationServiceEnvironmentSkuDefinition.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationServiceEnvironmentSkuDefinition.Serialization.cs index ff6acc313913..136037ced3c9 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationServiceEnvironmentSkuDefinition.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationServiceEnvironmentSkuDefinition.Serialization.cs @@ -18,6 +18,15 @@ public partial class IntegrationServiceEnvironmentSkuDefinition : IUtf8JsonSeria void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(IntegrationServiceEnvironmentSkuDefinition)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ResourceType)) { writer.WritePropertyName("resourceType"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } IntegrationServiceEnvironmentSkuDefinition IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationServiceEnvironmentSkuDefinitionSku.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationServiceEnvironmentSkuDefinitionSku.Serialization.cs index 37f246515535..62a5f68ce57b 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationServiceEnvironmentSkuDefinitionSku.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationServiceEnvironmentSkuDefinitionSku.Serialization.cs @@ -18,6 +18,15 @@ public partial class IntegrationServiceEnvironmentSkuDefinitionSku : IUtf8JsonSe void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWri throw new FormatException($"The model {nameof(IntegrationServiceEnvironmentSkuDefinitionSku)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWri #endif } } - writer.WriteEndObject(); } IntegrationServiceEnvironmentSkuDefinitionSku IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationServiceEnvironmentSkuList.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationServiceEnvironmentSkuList.Serialization.cs index 9bc78fb37ce0..fb3bced15af6 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationServiceEnvironmentSkuList.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationServiceEnvironmentSkuList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class IntegrationServiceEnvironmentSkuList : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(IntegrationServiceEnvironmentSkuList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } IntegrationServiceEnvironmentSkuList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationServiceEnvironmentSubnetNetworkHealth.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationServiceEnvironmentSubnetNetworkHealth.Serialization.cs index 35118e112cfb..01183515b213 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationServiceEnvironmentSubnetNetworkHealth.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationServiceEnvironmentSubnetNetworkHealth.Serialization.cs @@ -18,6 +18,15 @@ public partial class IntegrationServiceEnvironmentSubnetNetworkHealth : IUtf8Jso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8Json throw new FormatException($"The model {nameof(IntegrationServiceEnvironmentSubnetNetworkHealth)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(OutboundNetworkDependencies)) { writer.WritePropertyName("outboundNetworkDependencies"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8Json #endif } } - writer.WriteEndObject(); } IntegrationServiceEnvironmentSubnetNetworkHealth IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationServiceErrorInfo.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationServiceErrorInfo.Serialization.cs index bc90c70f4b38..497b4850e7be 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationServiceErrorInfo.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationServiceErrorInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class IntegrationServiceErrorInfo : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(IntegrationServiceErrorInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("code"u8); writer.WriteStringValue(Code.ToString()); writer.WritePropertyName("message"u8); @@ -67,7 +75,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } IntegrationServiceErrorInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationServiceNetworkConfiguration.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationServiceNetworkConfiguration.Serialization.cs index 76123eac87f5..b633bc23de4c 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationServiceNetworkConfiguration.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/IntegrationServiceNetworkConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class IntegrationServiceNetworkConfiguration : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(IntegrationServiceNetworkConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(VirtualNetworkAddressSpace)) { writer.WritePropertyName("virtualNetworkAddressSpace"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } IntegrationServiceNetworkConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/ListOperationCallbackUri.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/ListOperationCallbackUri.Serialization.cs index b2554b538933..ca479a7586e9 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/ListOperationCallbackUri.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/ListOperationCallbackUri.Serialization.cs @@ -18,6 +18,15 @@ public partial class ListOperationCallbackUri : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(ListOperationCallbackUri)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Uri)) { writer.WritePropertyName("value"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } ListOperationCallbackUri IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/ListOperationCallbackUrlParameterInfo.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/ListOperationCallbackUrlParameterInfo.Serialization.cs index 733375a56ab2..a17f5fa6bff6 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/ListOperationCallbackUrlParameterInfo.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/ListOperationCallbackUrlParameterInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class ListOperationCallbackUrlParameterInfo : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(ListOperationCallbackUrlParameterInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(NotAfter)) { writer.WritePropertyName("notAfter"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } ListOperationCallbackUrlParameterInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicApiDeploymentParameterMetadata.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicApiDeploymentParameterMetadata.Serialization.cs index beb50aee8ffb..662677317d2e 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicApiDeploymentParameterMetadata.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicApiDeploymentParameterMetadata.Serialization.cs @@ -18,6 +18,15 @@ public partial class LogicApiDeploymentParameterMetadata : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(LogicApiDeploymentParameterMetadata)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ApiDeploymentParameterMetadataType)) { writer.WritePropertyName("type"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } LogicApiDeploymentParameterMetadata IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicApiDeploymentParameterMetadataSet.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicApiDeploymentParameterMetadataSet.Serialization.cs index c71fc43ac1a6..3f93a24adf9f 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicApiDeploymentParameterMetadataSet.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicApiDeploymentParameterMetadataSet.Serialization.cs @@ -18,6 +18,15 @@ public partial class LogicApiDeploymentParameterMetadataSet : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(LogicApiDeploymentParameterMetadataSet)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(PackageContentLink)) { writer.WritePropertyName("packageContentLink"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } LogicApiDeploymentParameterMetadataSet IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicApiOperationAnnotation.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicApiOperationAnnotation.Serialization.cs index dfc64ea6abe4..c39c9d12c9c0 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicApiOperationAnnotation.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicApiOperationAnnotation.Serialization.cs @@ -18,6 +18,15 @@ public partial class LogicApiOperationAnnotation : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(LogicApiOperationAnnotation)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Status)) { writer.WritePropertyName("status"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } LogicApiOperationAnnotation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicApiOperationInfo.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicApiOperationInfo.Serialization.cs index 0c6b3da7f98f..1208be2309cc 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicApiOperationInfo.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicApiOperationInfo.Serialization.cs @@ -19,6 +19,15 @@ public partial class LogicApiOperationInfo : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,61 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(LogicApiOperationInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); writer.WriteObjectValue(Properties, options); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } LogicApiOperationInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicApiOperationListResult.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicApiOperationListResult.Serialization.cs index f419a39b78a4..49593eb15c27 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicApiOperationListResult.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicApiOperationListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class LogicApiOperationListResult : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(LogicApiOperationListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } LogicApiOperationListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicApiOperationProperties.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicApiOperationProperties.Serialization.cs index 3dd825205279..b88109836cd5 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicApiOperationProperties.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicApiOperationProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class LogicApiOperationProperties : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(LogicApiOperationProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Summary)) { writer.WritePropertyName("summary"u8); @@ -107,7 +115,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } LogicApiOperationProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicApiReference.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicApiReference.Serialization.cs index 9cf177a30562..fa562a83689a 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicApiReference.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicApiReference.Serialization.cs @@ -18,6 +18,15 @@ public partial class LogicApiReference : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(LogicApiReference)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(DisplayName)) { writer.WritePropertyName("displayName"u8); @@ -68,37 +77,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite writer.WritePropertyName("integrationServiceEnvironment"u8); writer.WriteObjectValue(IntegrationServiceEnvironment, options); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } LogicApiReference IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicApiResourceBackendService.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicApiResourceBackendService.Serialization.cs index f3e2d8386435..4a6fa6298e18 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicApiResourceBackendService.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicApiResourceBackendService.Serialization.cs @@ -18,6 +18,15 @@ internal partial class LogicApiResourceBackendService : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(LogicApiResourceBackendService)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ServiceUri)) { writer.WritePropertyName("serviceUrl"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } LogicApiResourceBackendService IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicApiResourceDefinitions.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicApiResourceDefinitions.Serialization.cs index b14456107b5a..d62ccfe0a463 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicApiResourceDefinitions.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicApiResourceDefinitions.Serialization.cs @@ -18,6 +18,15 @@ public partial class LogicApiResourceDefinitions : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(LogicApiResourceDefinitions)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(OriginalSwaggerUri)) { writer.WritePropertyName("originalSwaggerUrl"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } LogicApiResourceDefinitions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicApiResourceGeneralInformation.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicApiResourceGeneralInformation.Serialization.cs index b71dca2c6fdf..7a0d1cf5c297 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicApiResourceGeneralInformation.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicApiResourceGeneralInformation.Serialization.cs @@ -18,6 +18,15 @@ public partial class LogicApiResourceGeneralInformation : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(LogicApiResourceGeneralInformation)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IconUri)) { writer.WritePropertyName("iconUrl"u8); @@ -71,7 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } LogicApiResourceGeneralInformation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicApiResourceMetadata.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicApiResourceMetadata.Serialization.cs index 8b23c298094e..c04bbed7f587 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicApiResourceMetadata.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicApiResourceMetadata.Serialization.cs @@ -18,6 +18,15 @@ public partial class LogicApiResourceMetadata : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(LogicApiResourceMetadata)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Source)) { writer.WritePropertyName("source"u8); @@ -97,7 +105,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } LogicApiResourceMetadata IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicApiResourcePolicies.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicApiResourcePolicies.Serialization.cs index 2e9ec618a69e..885830572f38 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicApiResourcePolicies.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicApiResourcePolicies.Serialization.cs @@ -18,6 +18,15 @@ public partial class LogicApiResourcePolicies : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(LogicApiResourcePolicies)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Content)) { writer.WritePropertyName("content"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } LogicApiResourcePolicies IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicContentHash.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicContentHash.Serialization.cs index c9ea6ca7f968..14f7ab072707 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicContentHash.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicContentHash.Serialization.cs @@ -18,6 +18,15 @@ public partial class LogicContentHash : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(LogicContentHash)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Algorithm)) { writer.WritePropertyName("algorithm"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } LogicContentHash IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicContentLink.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicContentLink.Serialization.cs index f01e3a87bf6a..ae06d0228041 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicContentLink.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicContentLink.Serialization.cs @@ -18,6 +18,15 @@ public partial class LogicContentLink : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(LogicContentLink)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Uri)) { writer.WritePropertyName("uri"u8); @@ -73,7 +81,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } LogicContentLink IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicErrorInfo.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicErrorInfo.Serialization.cs index 65d5d41e0047..e809b10a1623 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicErrorInfo.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicErrorInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class LogicErrorInfo : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(LogicErrorInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("code"u8); writer.WriteStringValue(Code); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp #endif } } - writer.WriteEndObject(); } LogicErrorInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicErrorResponse.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicErrorResponse.Serialization.cs index 857820c42b10..7d5dc916553d 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicErrorResponse.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicErrorResponse.Serialization.cs @@ -18,6 +18,15 @@ public partial class LogicErrorResponse : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(LogicErrorResponse)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("error"u8); writer.WriteStartObject(); if (Optional.IsDefined(Code)) @@ -54,7 +62,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } LogicErrorResponse IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicExpression.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicExpression.Serialization.cs index 2d6a8e52552a..88c55f340ace 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicExpression.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicExpression.Serialization.cs @@ -18,6 +18,15 @@ public partial class LogicExpression : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(LogicExpression)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Text)) { writer.WritePropertyName("text"u8); @@ -73,7 +81,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO #endif } } - writer.WriteEndObject(); } LogicExpression IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicExpressionErrorInfo.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicExpressionErrorInfo.Serialization.cs index b5ba66ab681a..ee4c9bec532a 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicExpressionErrorInfo.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicExpressionErrorInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class LogicExpressionErrorInfo : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(LogicExpressionErrorInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("message"u8); writer.WriteStringValue(Message); if (Optional.IsCollectionDefined(Details)) @@ -38,24 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead } writer.WriteEndArray(); } - writer.WritePropertyName("code"u8); - writer.WriteStringValue(Code); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } LogicExpressionErrorInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicExpressionRoot.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicExpressionRoot.Serialization.cs index b3c555f61851..6a6a06379e95 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicExpressionRoot.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicExpressionRoot.Serialization.cs @@ -18,6 +18,15 @@ public partial class LogicExpressionRoot : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,60 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(LogicExpressionRoot)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Path)) { writer.WritePropertyName("path"u8); writer.WriteStringValue(Path); } - if (Optional.IsDefined(Text)) - { - writer.WritePropertyName("text"u8); - writer.WriteStringValue(Text); - } - if (Optional.IsDefined(Value)) - { - writer.WritePropertyName("value"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(Value); -#else - using (JsonDocument document = JsonDocument.Parse(Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - if (Optional.IsCollectionDefined(Subexpressions)) - { - writer.WritePropertyName("subexpressions"u8); - writer.WriteStartArray(); - foreach (var item in Subexpressions) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Error)) - { - writer.WritePropertyName("error"u8); - writer.WriteObjectValue(Error, options); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } LogicExpressionRoot IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicJsonSchema.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicJsonSchema.Serialization.cs index 76b39aba7479..28e26405470a 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicJsonSchema.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicJsonSchema.Serialization.cs @@ -18,6 +18,15 @@ public partial class LogicJsonSchema : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(LogicJsonSchema)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Title)) { writer.WritePropertyName("title"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO #endif } } - writer.WriteEndObject(); } LogicJsonSchema IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicResourceReference.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicResourceReference.Serialization.cs index e3c8d8dc16ee..8727ff890466 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicResourceReference.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicResourceReference.Serialization.cs @@ -18,6 +18,15 @@ public partial class LogicResourceReference : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(LogicResourceReference)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } LogicResourceReference IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicSku.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicSku.Serialization.cs index f5338a32f50c..48852780698e 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicSku.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicSku.Serialization.cs @@ -18,6 +18,15 @@ public partial class LogicSku : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions throw new FormatException($"The model {nameof(LogicSku)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name.ToString()); if (Optional.IsDefined(Plan)) @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions #endif } } - writer.WriteEndObject(); } LogicSku IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkRetryHistory.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkRetryHistory.Serialization.cs index 1445cb8b461f..94e5b9615f68 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkRetryHistory.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkRetryHistory.Serialization.cs @@ -18,6 +18,15 @@ public partial class LogicWorkRetryHistory : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(LogicWorkRetryHistory)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(StartOn)) { writer.WritePropertyName("startTime"u8); @@ -71,7 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } LogicWorkRetryHistory IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkflowListResult.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkflowListResult.Serialization.cs index 4118711ad8a0..39d43e24c59b 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkflowListResult.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkflowListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class LogicWorkflowListResult : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(LogicWorkflowListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } LogicWorkflowListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkflowOutputParameterInfo.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkflowOutputParameterInfo.Serialization.cs index 0723191f2bb2..d10f266a5199 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkflowOutputParameterInfo.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkflowOutputParameterInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class LogicWorkflowOutputParameterInfo : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(LogicWorkflowOutputParameterInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(Error)) { writer.WritePropertyName("error"u8); @@ -38,56 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M } #endif } - if (Optional.IsDefined(ParameterType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ParameterType.Value.ToString()); - } - if (Optional.IsDefined(Value)) - { - writer.WritePropertyName("value"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(Value); -#else - using (JsonDocument document = JsonDocument.Parse(Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - if (Optional.IsDefined(Metadata)) - { - writer.WritePropertyName("metadata"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(Metadata); -#else - using (JsonDocument document = JsonDocument.Parse(Metadata)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } LogicWorkflowOutputParameterInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkflowParameterInfo.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkflowParameterInfo.Serialization.cs index eb02adab61a2..0c330d865f1b 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkflowParameterInfo.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkflowParameterInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class LogicWorkflowParameterInfo : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(LogicWorkflowParameterInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ParameterType)) { writer.WritePropertyName("type"u8); @@ -75,7 +83,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } LogicWorkflowParameterInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkflowRecurrenceSchedule.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkflowRecurrenceSchedule.Serialization.cs index 3cbc3dbc6c0a..844d37b10a5b 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkflowRecurrenceSchedule.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkflowRecurrenceSchedule.Serialization.cs @@ -18,6 +18,15 @@ public partial class LogicWorkflowRecurrenceSchedule : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(LogicWorkflowRecurrenceSchedule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Minutes)) { writer.WritePropertyName("minutes"u8); @@ -91,7 +99,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } LogicWorkflowRecurrenceSchedule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkflowRecurrenceScheduleOccurrence.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkflowRecurrenceScheduleOccurrence.Serialization.cs index 92cce3f560aa..609bba7af1de 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkflowRecurrenceScheduleOccurrence.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkflowRecurrenceScheduleOccurrence.Serialization.cs @@ -18,6 +18,15 @@ public partial class LogicWorkflowRecurrenceScheduleOccurrence : IUtf8JsonSerial void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(LogicWorkflowRecurrenceScheduleOccurrence)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Day)) { writer.WritePropertyName("day"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } LogicWorkflowRecurrenceScheduleOccurrence IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkflowReference.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkflowReference.Serialization.cs index 77a507785967..e49f645332d1 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkflowReference.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkflowReference.Serialization.cs @@ -18,6 +18,15 @@ public partial class LogicWorkflowReference : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,38 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(LogicWorkflowReference)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } LogicWorkflowReference IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkflowRegenerateActionContent.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkflowRegenerateActionContent.Serialization.cs index 3f816180ecb3..39ccd407c3bd 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkflowRegenerateActionContent.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkflowRegenerateActionContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class LogicWorkflowRegenerateActionContent : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(LogicWorkflowRegenerateActionContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(KeyType)) { writer.WritePropertyName("keyType"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } LogicWorkflowRegenerateActionContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkflowRepetitionIndex.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkflowRepetitionIndex.Serialization.cs index 38353d8bacd6..1fa146c6ab5c 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkflowRepetitionIndex.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkflowRepetitionIndex.Serialization.cs @@ -18,6 +18,15 @@ public partial class LogicWorkflowRepetitionIndex : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(LogicWorkflowRepetitionIndex)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ScopeName)) { writer.WritePropertyName("scopeName"u8); @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } LogicWorkflowRepetitionIndex IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkflowRequest.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkflowRequest.Serialization.cs index 88b2e0d9d039..0c41cf13a1fc 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkflowRequest.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkflowRequest.Serialization.cs @@ -18,6 +18,15 @@ public partial class LogicWorkflowRequest : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(LogicWorkflowRequest)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Headers)) { writer.WritePropertyName("headers"u8); @@ -63,7 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } LogicWorkflowRequest IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkflowRequestHistoryListResult.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkflowRequestHistoryListResult.Serialization.cs index 8e63821267e9..3f13829179d5 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkflowRequestHistoryListResult.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkflowRequestHistoryListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class LogicWorkflowRequestHistoryListResult : IUtf8JsonSerializ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(LogicWorkflowRequestHistoryListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } LogicWorkflowRequestHistoryListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkflowRequestHistoryProperties.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkflowRequestHistoryProperties.Serialization.cs index a034cd647f14..bc9137bdadbc 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkflowRequestHistoryProperties.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkflowRequestHistoryProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class LogicWorkflowRequestHistoryProperties : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(LogicWorkflowRequestHistoryProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(StartOn)) { writer.WritePropertyName("startTime"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } LogicWorkflowRequestHistoryProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkflowResponse.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkflowResponse.Serialization.cs index 86011df9d1eb..63dc672f26ae 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkflowResponse.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkflowResponse.Serialization.cs @@ -18,6 +18,15 @@ public partial class LogicWorkflowResponse : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(LogicWorkflowResponse)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Headers)) { writer.WritePropertyName("headers"u8); @@ -63,7 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } LogicWorkflowResponse IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkflowRunActionCorrelation.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkflowRunActionCorrelation.Serialization.cs index 1cb2b22c27ea..2e9c1ac10f65 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkflowRunActionCorrelation.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkflowRunActionCorrelation.Serialization.cs @@ -18,6 +18,15 @@ public partial class LogicWorkflowRunActionCorrelation : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,43 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(LogicWorkflowRunActionCorrelation)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(ActionTrackingId)) { writer.WritePropertyName("actionTrackingId"u8); writer.WriteStringValue(ActionTrackingId.Value); } - if (Optional.IsDefined(ClientTrackingId)) - { - writer.WritePropertyName("clientTrackingId"u8); - writer.WriteStringValue(ClientTrackingId); - } - if (Optional.IsCollectionDefined(ClientKeywords)) - { - writer.WritePropertyName("clientKeywords"u8); - writer.WriteStartArray(); - foreach (var item in ClientKeywords) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } LogicWorkflowRunActionCorrelation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkflowRunActionListResult.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkflowRunActionListResult.Serialization.cs index 6bbe9996f09a..e75de2b53754 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkflowRunActionListResult.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkflowRunActionListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class LogicWorkflowRunActionListResult : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(LogicWorkflowRunActionListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } LogicWorkflowRunActionListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkflowRunActionRepetitionDefinitionList.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkflowRunActionRepetitionDefinitionList.Serialization.cs index f5e423908085..4665dad7b5b9 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkflowRunActionRepetitionDefinitionList.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkflowRunActionRepetitionDefinitionList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class LogicWorkflowRunActionRepetitionDefinitionList : IUtf8Jso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWr throw new FormatException($"The model {nameof(LogicWorkflowRunActionRepetitionDefinitionList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWr #endif } } - writer.WriteEndObject(); } LogicWorkflowRunActionRepetitionDefinitionList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkflowRunCorrelation.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkflowRunCorrelation.Serialization.cs index b49e2f8b42ce..684f99f7e356 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkflowRunCorrelation.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkflowRunCorrelation.Serialization.cs @@ -18,6 +18,15 @@ public partial class LogicWorkflowRunCorrelation : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(LogicWorkflowRunCorrelation)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ClientTrackingId)) { writer.WritePropertyName("clientTrackingId"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } LogicWorkflowRunCorrelation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkflowRunListResult.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkflowRunListResult.Serialization.cs index 8e48faf8d4d3..37598ce7f00d 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkflowRunListResult.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkflowRunListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class LogicWorkflowRunListResult : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(LogicWorkflowRunListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } LogicWorkflowRunListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkflowRunTrigger.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkflowRunTrigger.Serialization.cs index a15fc03578df..841d6528454f 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkflowRunTrigger.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkflowRunTrigger.Serialization.cs @@ -18,6 +18,15 @@ public partial class LogicWorkflowRunTrigger : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(LogicWorkflowRunTrigger)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -139,7 +147,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } LogicWorkflowRunTrigger IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkflowTriggerCallbackQueryParameterInfo.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkflowTriggerCallbackQueryParameterInfo.Serialization.cs index 82886cbeebf3..07897fe25bd3 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkflowTriggerCallbackQueryParameterInfo.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkflowTriggerCallbackQueryParameterInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class LogicWorkflowTriggerCallbackQueryParameterInfo : IUtf8JsonS void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWr throw new FormatException($"The model {nameof(LogicWorkflowTriggerCallbackQueryParameterInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ApiVersion)) { writer.WritePropertyName("api-version"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWr #endif } } - writer.WriteEndObject(); } LogicWorkflowTriggerCallbackQueryParameterInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkflowTriggerCallbackUri.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkflowTriggerCallbackUri.Serialization.cs index 4ad93cc0792f..5cabd781a29e 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkflowTriggerCallbackUri.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkflowTriggerCallbackUri.Serialization.cs @@ -18,6 +18,15 @@ public partial class LogicWorkflowTriggerCallbackUri : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(LogicWorkflowTriggerCallbackUri)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Value)) { writer.WritePropertyName("value"u8); @@ -76,7 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } LogicWorkflowTriggerCallbackUri IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkflowTriggerHistoryListResult.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkflowTriggerHistoryListResult.Serialization.cs index c4a7c5895b8a..14e6e34ea1b1 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkflowTriggerHistoryListResult.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkflowTriggerHistoryListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class LogicWorkflowTriggerHistoryListResult : IUtf8JsonSerializ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(LogicWorkflowTriggerHistoryListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } LogicWorkflowTriggerHistoryListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkflowTriggerListResult.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkflowTriggerListResult.Serialization.cs index 64571c24da68..3c7062215b85 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkflowTriggerListResult.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkflowTriggerListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class LogicWorkflowTriggerListResult : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(LogicWorkflowTriggerListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } LogicWorkflowTriggerListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkflowTriggerRecurrence.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkflowTriggerRecurrence.Serialization.cs index 5b48aef3a503..5e4d2f8cc068 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkflowTriggerRecurrence.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkflowTriggerRecurrence.Serialization.cs @@ -18,6 +18,15 @@ public partial class LogicWorkflowTriggerRecurrence : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(LogicWorkflowTriggerRecurrence)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Frequency)) { writer.WritePropertyName("frequency"u8); @@ -71,7 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } LogicWorkflowTriggerRecurrence IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkflowTriggerReference.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkflowTriggerReference.Serialization.cs index 9c62dd241af7..8d747544f3b4 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkflowTriggerReference.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkflowTriggerReference.Serialization.cs @@ -18,6 +18,15 @@ public partial class LogicWorkflowTriggerReference : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(LogicWorkflowTriggerReference)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(FlowName)) { writer.WritePropertyName("flowName"u8); @@ -36,37 +45,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode writer.WritePropertyName("triggerName"u8); writer.WriteStringValue(TriggerName); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } LogicWorkflowTriggerReference IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkflowTriggerStateActionContent.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkflowTriggerStateActionContent.Serialization.cs index 08c94bb6604b..d499a9ff70d9 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkflowTriggerStateActionContent.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkflowTriggerStateActionContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class LogicWorkflowTriggerStateActionContent : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(LogicWorkflowTriggerStateActionContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("source"u8); writer.WriteObjectValue(Source, options); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } LogicWorkflowTriggerStateActionContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkflowVersionListResult.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkflowVersionListResult.Serialization.cs index 2a8d4af9e60c..5e7efec152a0 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkflowVersionListResult.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWorkflowVersionListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class LogicWorkflowVersionListResult : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(LogicWorkflowVersionListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } LogicWorkflowVersionListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWsdlService.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWsdlService.Serialization.cs index a0e2e82a25fe..632991592e07 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWsdlService.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/LogicWsdlService.Serialization.cs @@ -18,6 +18,15 @@ public partial class LogicWsdlService : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(LogicWsdlService)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(QualifiedName)) { writer.WritePropertyName("qualifiedName"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } LogicWsdlService IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/OpenAuthenticationAccessPolicies.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/OpenAuthenticationAccessPolicies.Serialization.cs index 86bd93fdaae9..105ad45c12b3 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/OpenAuthenticationAccessPolicies.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/OpenAuthenticationAccessPolicies.Serialization.cs @@ -18,6 +18,15 @@ internal partial class OpenAuthenticationAccessPolicies : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(OpenAuthenticationAccessPolicies)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(AccessPolicies)) { writer.WritePropertyName("policies"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } OpenAuthenticationAccessPolicies IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/OpenAuthenticationAccessPolicy.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/OpenAuthenticationAccessPolicy.Serialization.cs index aa3cc0fb5f13..6c4067c2774c 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/OpenAuthenticationAccessPolicy.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/OpenAuthenticationAccessPolicy.Serialization.cs @@ -18,6 +18,15 @@ public partial class OpenAuthenticationAccessPolicy : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(OpenAuthenticationAccessPolicy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ProviderType)) { writer.WritePropertyName("type"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } OpenAuthenticationAccessPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/OpenAuthenticationPolicyClaim.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/OpenAuthenticationPolicyClaim.Serialization.cs index ff3b5980a21d..95636977448a 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/OpenAuthenticationPolicyClaim.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/OpenAuthenticationPolicyClaim.Serialization.cs @@ -18,6 +18,15 @@ public partial class OpenAuthenticationPolicyClaim : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(OpenAuthenticationPolicyClaim)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } OpenAuthenticationPolicyClaim IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/SwaggerCustomDynamicList.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/SwaggerCustomDynamicList.Serialization.cs index f77a36afec75..a3494bcfe66c 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/SwaggerCustomDynamicList.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/SwaggerCustomDynamicList.Serialization.cs @@ -18,6 +18,15 @@ public partial class SwaggerCustomDynamicList : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(SwaggerCustomDynamicList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(OperationId)) { writer.WritePropertyName("operationId"u8); @@ -77,7 +85,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } SwaggerCustomDynamicList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/SwaggerCustomDynamicProperties.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/SwaggerCustomDynamicProperties.Serialization.cs index 4c92377164d4..2bdc0e710690 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/SwaggerCustomDynamicProperties.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/SwaggerCustomDynamicProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class SwaggerCustomDynamicProperties : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(SwaggerCustomDynamicProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(OperationId)) { writer.WritePropertyName("operationId"u8); @@ -62,7 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } SwaggerCustomDynamicProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/SwaggerCustomDynamicSchema.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/SwaggerCustomDynamicSchema.Serialization.cs index 3c061388d442..67775dba6fc1 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/SwaggerCustomDynamicSchema.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/SwaggerCustomDynamicSchema.Serialization.cs @@ -18,6 +18,15 @@ public partial class SwaggerCustomDynamicSchema : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(SwaggerCustomDynamicSchema)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(OperationId)) { writer.WritePropertyName("operationId"u8); @@ -74,7 +82,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } SwaggerCustomDynamicSchema IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/SwaggerCustomDynamicTree.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/SwaggerCustomDynamicTree.Serialization.cs index 0eaec913e33b..ad39f78bd001 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/SwaggerCustomDynamicTree.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/SwaggerCustomDynamicTree.Serialization.cs @@ -18,6 +18,15 @@ public partial class SwaggerCustomDynamicTree : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(SwaggerCustomDynamicTree)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Settings)) { writer.WritePropertyName("settings"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } SwaggerCustomDynamicTree IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/SwaggerCustomDynamicTreeCommand.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/SwaggerCustomDynamicTreeCommand.Serialization.cs index 7ed293617210..7d8b147eed9a 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/SwaggerCustomDynamicTreeCommand.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/SwaggerCustomDynamicTreeCommand.Serialization.cs @@ -18,6 +18,15 @@ public partial class SwaggerCustomDynamicTreeCommand : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(SwaggerCustomDynamicTreeCommand)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(OperationId)) { writer.WritePropertyName("operationId"u8); @@ -87,7 +95,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } SwaggerCustomDynamicTreeCommand IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/SwaggerCustomDynamicTreeParameterInfo.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/SwaggerCustomDynamicTreeParameterInfo.Serialization.cs index bd89973cdaa5..55486a86798b 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/SwaggerCustomDynamicTreeParameterInfo.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/SwaggerCustomDynamicTreeParameterInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class SwaggerCustomDynamicTreeParameterInfo : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(SwaggerCustomDynamicTreeParameterInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(SelectedItemValuePath)) { writer.WritePropertyName("selectedItemValuePath"u8); @@ -68,7 +76,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } SwaggerCustomDynamicTreeParameterInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/SwaggerCustomDynamicTreeSettings.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/SwaggerCustomDynamicTreeSettings.Serialization.cs index ec21e0093630..e1a83f45d267 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/SwaggerCustomDynamicTreeSettings.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/SwaggerCustomDynamicTreeSettings.Serialization.cs @@ -18,6 +18,15 @@ public partial class SwaggerCustomDynamicTreeSettings : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(SwaggerCustomDynamicTreeSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(CanSelectParentNodes)) { writer.WritePropertyName("CanSelectParentNodes"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } SwaggerCustomDynamicTreeSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/SwaggerExternalDocumentation.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/SwaggerExternalDocumentation.Serialization.cs index a581b9673a2b..c5f2ab67864e 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/SwaggerExternalDocumentation.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/SwaggerExternalDocumentation.Serialization.cs @@ -18,6 +18,15 @@ public partial class SwaggerExternalDocumentation : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(SwaggerExternalDocumentation)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Description)) { writer.WritePropertyName("description"u8); @@ -74,7 +82,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } SwaggerExternalDocumentation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/SwaggerSchema.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/SwaggerSchema.Serialization.cs index c3d3a6d9237e..ae8d3c816302 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/SwaggerSchema.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/SwaggerSchema.Serialization.cs @@ -18,6 +18,15 @@ public partial class SwaggerSchema : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt throw new FormatException($"The model {nameof(SwaggerSchema)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Reference)) { writer.WritePropertyName("ref"u8); @@ -171,7 +179,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt #endif } } - writer.WriteEndObject(); } SwaggerSchema IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/SwaggerXml.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/SwaggerXml.Serialization.cs index 1cf3f9aea144..9fae7e76de56 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/SwaggerXml.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/SwaggerXml.Serialization.cs @@ -18,6 +18,15 @@ public partial class SwaggerXml : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOption throw new FormatException($"The model {nameof(SwaggerXml)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -89,7 +97,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOption #endif } } - writer.WriteEndObject(); } SwaggerXml IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/X12AcknowledgementSettings.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/X12AcknowledgementSettings.Serialization.cs index 84f59bdcbfe7..9ef5397c2c1c 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/X12AcknowledgementSettings.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/X12AcknowledgementSettings.Serialization.cs @@ -18,6 +18,15 @@ public partial class X12AcknowledgementSettings : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(X12AcknowledgementSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("needTechnicalAcknowledgement"u8); writer.WriteBooleanValue(NeedTechnicalAcknowledgement); writer.WritePropertyName("batchTechnicalAcknowledgements"u8); @@ -83,7 +91,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } X12AcknowledgementSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/X12AgreementContent.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/X12AgreementContent.Serialization.cs index 68ab938e7687..e9d772dd9936 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/X12AgreementContent.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/X12AgreementContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class X12AgreementContent : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(X12AgreementContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("receiveAgreement"u8); writer.WriteObjectValue(ReceiveAgreement, options); writer.WritePropertyName("sendAgreement"u8); @@ -45,7 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } X12AgreementContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/X12DelimiterOverrides.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/X12DelimiterOverrides.Serialization.cs index efee10224c17..ec48aaf332cb 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/X12DelimiterOverrides.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/X12DelimiterOverrides.Serialization.cs @@ -18,6 +18,15 @@ public partial class X12DelimiterOverrides : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(X12DelimiterOverrides)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ProtocolVersion)) { writer.WritePropertyName("protocolVersion"u8); @@ -68,7 +76,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } X12DelimiterOverrides IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/X12EnvelopeOverride.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/X12EnvelopeOverride.Serialization.cs index b4bfe10bd5c8..835a1969d492 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/X12EnvelopeOverride.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/X12EnvelopeOverride.Serialization.cs @@ -18,6 +18,15 @@ public partial class X12EnvelopeOverride : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(X12EnvelopeOverride)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("targetNamespace"u8); writer.WriteStringValue(TargetNamespace); writer.WritePropertyName("protocolVersion"u8); @@ -64,7 +72,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } X12EnvelopeOverride IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/X12EnvelopeSettings.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/X12EnvelopeSettings.Serialization.cs index f6c255d28552..211547048cd1 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/X12EnvelopeSettings.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/X12EnvelopeSettings.Serialization.cs @@ -18,6 +18,15 @@ public partial class X12EnvelopeSettings : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(X12EnvelopeSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("controlStandardsId"u8); writer.WriteNumberValue(ControlStandardsId); writer.WritePropertyName("useControlStandardsIdAsRepetitionCharacter"u8); @@ -98,7 +106,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } X12EnvelopeSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/X12FramingSettings.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/X12FramingSettings.Serialization.cs index e7b8fcf92aae..0412288ddb09 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/X12FramingSettings.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/X12FramingSettings.Serialization.cs @@ -18,6 +18,15 @@ public partial class X12FramingSettings : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(X12FramingSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("dataElementSeparator"u8); writer.WriteNumberValue(DataElementSeparator); writer.WritePropertyName("componentSeparator"u8); @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } X12FramingSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/X12MessageFilter.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/X12MessageFilter.Serialization.cs index db85f9d1f2d3..d8a393cc3b25 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/X12MessageFilter.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/X12MessageFilter.Serialization.cs @@ -18,6 +18,15 @@ public partial class X12MessageFilter : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(X12MessageFilter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("messageFilterType"u8); writer.WriteStringValue(MessageFilterType.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } X12MessageFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/X12MessageIdentifier.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/X12MessageIdentifier.Serialization.cs index 76a8a7df40f5..715a60ae716e 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/X12MessageIdentifier.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/X12MessageIdentifier.Serialization.cs @@ -18,6 +18,15 @@ public partial class X12MessageIdentifier : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(X12MessageIdentifier)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("messageId"u8); writer.WriteStringValue(MessageId); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } X12MessageIdentifier IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/X12OneWayAgreement.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/X12OneWayAgreement.Serialization.cs index eb8da83310fc..889e45ff2994 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/X12OneWayAgreement.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/X12OneWayAgreement.Serialization.cs @@ -18,6 +18,15 @@ public partial class X12OneWayAgreement : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(X12OneWayAgreement)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("senderBusinessIdentity"u8); writer.WriteObjectValue(SenderBusinessIdentity, options); writer.WritePropertyName("receiverBusinessIdentity"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } X12OneWayAgreement IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/X12ProcessingSettings.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/X12ProcessingSettings.Serialization.cs index 455cb985ebd7..4703afb926d9 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/X12ProcessingSettings.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/X12ProcessingSettings.Serialization.cs @@ -18,6 +18,15 @@ public partial class X12ProcessingSettings : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(X12ProcessingSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("maskSecurityInfo"u8); writer.WriteBooleanValue(MaskSecurityInfo); writer.WritePropertyName("convertImpliedDecimal"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } X12ProcessingSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/X12ProtocolSettings.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/X12ProtocolSettings.Serialization.cs index 54d0038b6e65..2d314fbb0ad0 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/X12ProtocolSettings.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/X12ProtocolSettings.Serialization.cs @@ -18,6 +18,15 @@ public partial class X12ProtocolSettings : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(X12ProtocolSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("validationSettings"u8); writer.WriteObjectValue(ValidationSettings, options); writer.WritePropertyName("framingSettings"u8); @@ -102,7 +110,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } X12ProtocolSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/X12SchemaReference.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/X12SchemaReference.Serialization.cs index 801fb64481cf..0387f0e0763c 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/X12SchemaReference.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/X12SchemaReference.Serialization.cs @@ -18,6 +18,15 @@ public partial class X12SchemaReference : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(X12SchemaReference)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("messageId"u8); writer.WriteStringValue(MessageId); if (Optional.IsDefined(SenderApplicationId)) @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } X12SchemaReference IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/X12SecuritySettings.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/X12SecuritySettings.Serialization.cs index 6a9614e1dc9b..913dbe7c0240 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/X12SecuritySettings.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/X12SecuritySettings.Serialization.cs @@ -18,6 +18,15 @@ public partial class X12SecuritySettings : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(X12SecuritySettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("authorizationQualifier"u8); writer.WriteStringValue(AuthorizationQualifier); if (Optional.IsDefined(AuthorizationValue)) @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } X12SecuritySettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/X12ValidationOverride.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/X12ValidationOverride.Serialization.cs index 8220ef90553e..ac9c95ffb720 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/X12ValidationOverride.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/X12ValidationOverride.Serialization.cs @@ -18,6 +18,15 @@ public partial class X12ValidationOverride : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(X12ValidationOverride)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("messageId"u8); writer.WriteStringValue(MessageId); writer.WritePropertyName("validateEDITypes"u8); @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } X12ValidationOverride IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/X12ValidationSettings.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/X12ValidationSettings.Serialization.cs index c5d1a001acf6..5aabcae45e4f 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/X12ValidationSettings.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/Models/X12ValidationSettings.Serialization.cs @@ -18,6 +18,15 @@ public partial class X12ValidationSettings : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(X12ValidationSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("validateCharacterSet"u8); writer.WriteBooleanValue(ValidateCharacterSet); writer.WritePropertyName("checkDuplicateInterchangeControlNumber"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } X12ValidationSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/autorest.md b/sdk/logic/Azure.ResourceManager.Logic/src/autorest.md index aa615891b1a7..1edacb27c223 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/autorest.md +++ b/sdk/logic/Azure.ResourceManager.Logic/src/autorest.md @@ -18,6 +18,7 @@ skip-csproj: true modelerfour: flatten-payloads: false use-model-reader-writer: true +use-write-core: true list-exception: - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/operations/{operationId} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningBatchDeploymentCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningBatchDeploymentCollection.cs index 30e3ca78d4c4..609ea8012467 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningBatchDeploymentCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningBatchDeploymentCollection.cs @@ -206,7 +206,7 @@ public async Task CreateOrUpdate_CreateOrUpdateWorkspaceBatchDeployment() MaxRetries = 1, Timeout = XmlConvert.ToTimeSpan("PT5M"), }, - MiniBatchSize = 1, + MiniBatchSize = 1L, LoggingLevel = MachineLearningBatchLoggingLevel.Info, Model = new MachineLearningIdAssetReference(new ResourceIdentifier("string")), MaxConcurrencyPerInstance = 1, diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs index b02c76f34304..bce1897acbbc 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs @@ -103,13 +103,13 @@ public async Task UpdateMachineLearningQuotas_UpdateQuotas() { Id = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.MachineLearningServices/workspaces/demo_workspace1/quotas/Standard_DSv2_Family_Cluster_Dedicated_vCPUs", QuotaBasePropertiesType = "Microsoft.MachineLearningServices/workspaces/quotas", -Limit = 100, +Limit = 100L, Unit = MachineLearningQuotaUnit.Count, },new MachineLearningQuotaProperties() { Id = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.MachineLearningServices/workspaces/demo_workspace2/quotas/Standard_DSv2_Family_Cluster_Dedicated_vCPUs", QuotaBasePropertiesType = "Microsoft.MachineLearningServices/workspaces/quotas", -Limit = 200, +Limit = 200L, Unit = MachineLearningQuotaUnit.Count, } }, diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricAccessControlListCollection.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricAccessControlListCollection.cs index 6ad378213ef7..db894fc4c4c4 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricAccessControlListCollection.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricAccessControlListCollection.cs @@ -52,7 +52,7 @@ public async Task CreateOrUpdate_AccessControlListsCreateMaximumSetGen() new AccessControlListMatchConfiguration() { MatchConfigurationName = "example-match", -SequenceNumber = 123, +SequenceNumber = 123L, IPAddressType = NetworkFabricIPAddressType.IPv4, MatchConditions = { diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricAccessControlListResource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricAccessControlListResource.cs index 18197ddd405a..b1862a39848f 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricAccessControlListResource.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricAccessControlListResource.cs @@ -79,7 +79,7 @@ public async Task Update_AccessControlListsUpdateMaximumSetGen() new AccessControlListMatchConfiguration() { MatchConfigurationName = "example-match", -SequenceNumber = 123, +SequenceNumber = 123L, IPAddressType = NetworkFabricIPAddressType.IPv4, MatchConditions = { diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricCollection.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricCollection.cs index c5d669dc540a..c0f693ff6abe 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricCollection.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricCollection.cs @@ -41,7 +41,7 @@ public async Task CreateOrUpdate_NetworkFabricsCreateMaximumSetGen() // invoke the operation string networkFabricName = "example-fabric"; - NetworkFabricData data = new NetworkFabricData(new AzureLocation("eastuseuap"), "M4-A400-A100-C16-aa", new ResourceIdentifier("/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/example-fabricController"), 8, "10.18.0.0/19", 29249, new TerminalServerConfiguration() + NetworkFabricData data = new NetworkFabricData(new AzureLocation("eastuseuap"), "M4-A400-A100-C16-aa", new ResourceIdentifier("/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/example-fabricController"), 8, "10.18.0.0/19", 29249L, new TerminalServerConfiguration() { PrimaryIPv4Prefix = "10.0.0.12/30", PrimaryIPv6Prefix = "4FFE:FFFF:0:CD30::a8/127", @@ -91,7 +91,7 @@ public async Task CreateOrUpdate_NetworkFabricsCreateMaximumSetGen() SecondaryIPv6Prefix = "6FFE:FFFF:0:CD30::ac/127", Mtu = 1501, VlanId = 3001, - PeerAsn = 1235, + PeerAsn = 1235L, BfdConfiguration = new BfdConfiguration() { IntervalInMilliSeconds = 300, @@ -139,7 +139,7 @@ public async Task CreateOrUpdate_NetworkFabricsCreateMaximumSetGen() SecondaryIPv6Prefix = "2FFE:FFFF:0:CD30::ac/126", Mtu = 1500, VlanId = 3000, - PeerAsn = 61234, + PeerAsn = 61234L, BfdConfiguration = new BfdConfiguration() { IntervalInMilliSeconds = 300, diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricExternalNetworkCollection.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricExternalNetworkCollection.cs index fa3399822c6f..131dfc7d2857 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricExternalNetworkCollection.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricExternalNetworkCollection.cs @@ -90,7 +90,7 @@ public async Task CreateOrUpdate_ExternalNetworksCreateMaximumSetGen() { Mtu = 1500, VlanId = 1001, - PeerAsn = 65047, + PeerAsn = 65047L, BfdConfiguration = new BfdConfiguration() { IntervalInMilliSeconds = 300, diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricExternalNetworkResource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricExternalNetworkResource.cs index 077de1a1e813..ab5fea46dfc7 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricExternalNetworkResource.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricExternalNetworkResource.cs @@ -120,7 +120,7 @@ public async Task Update_ExternalNetworksUpdateMaximumSetGen() { Mtu = 1500, VlanId = 1001, - PeerAsn = 65047, + PeerAsn = 65047L, BfdConfiguration = new BfdConfiguration() { IntervalInMilliSeconds = 300, diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricIPCommunityCollection.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricIPCommunityCollection.cs index 284c9d1d603f..51cb56623bd7 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricIPCommunityCollection.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricIPCommunityCollection.cs @@ -46,7 +46,7 @@ public async Task CreateOrUpdate_IpCommunitiesCreateMaximumSetGen() Annotation = "annotation", IPCommunityRules = { -new IPCommunityRule(CommunityActionType.Permit,4155123341,new string[] +new IPCommunityRule(CommunityActionType.Permit,4155123341L,new string[] { "1:1" }) diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricIPCommunityResource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricIPCommunityResource.cs index 29c38c9d64f9..702415518a12 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricIPCommunityResource.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricIPCommunityResource.cs @@ -73,7 +73,7 @@ public async Task Update_IpCommunitiesUpdateMaximumSetGen() { IPCommunityRules = { -new IPCommunityRule(CommunityActionType.Permit,4155123341,new string[] +new IPCommunityRule(CommunityActionType.Permit,4155123341L,new string[] { "1:1" }) diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricIPExtendedCommunityCollection.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricIPExtendedCommunityCollection.cs index 26e6f5432842..67fe4b534315 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricIPExtendedCommunityCollection.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricIPExtendedCommunityCollection.cs @@ -43,7 +43,7 @@ public async Task CreateOrUpdate_IpExtendedCommunitiesCreateMaximumSetGen() string ipExtendedCommunityName = "example-ipExtendedCommunity"; NetworkFabricIPExtendedCommunityData data = new NetworkFabricIPExtendedCommunityData(new AzureLocation("eastus"), new IPExtendedCommunityRule[] { -new IPExtendedCommunityRule(CommunityActionType.Permit,4155123341,new string[] +new IPExtendedCommunityRule(CommunityActionType.Permit,4155123341L,new string[] { "1234:2345" }) diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricIPExtendedCommunityResource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricIPExtendedCommunityResource.cs index c201a2a7b245..b39b284014b5 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricIPExtendedCommunityResource.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricIPExtendedCommunityResource.cs @@ -73,7 +73,7 @@ public async Task Update_IpExtendedCommunitiesUpdateMaximumSetGen() { IPExtendedCommunityRules = { -new IPExtendedCommunityRule(CommunityActionType.Permit,4155123341,new string[] +new IPExtendedCommunityRule(CommunityActionType.Permit,4155123341L,new string[] { "1234:2345" }) diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricIPPrefixCollection.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricIPPrefixCollection.cs index 7d0b21469582..7408b45f5e96 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricIPPrefixCollection.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricIPPrefixCollection.cs @@ -46,7 +46,7 @@ public async Task CreateOrUpdate_IpPrefixesCreateMaximumSetGen() Annotation = "annotation", IPPrefixRules = { -new IPPrefixRule(CommunityActionType.Permit,4155123341,"10.10.10.10/30") +new IPPrefixRule(CommunityActionType.Permit,4155123341L,"10.10.10.10/30") { Condition = IPPrefixRuleCondition.GreaterThanOrEqualTo, SubnetMaskLength = "10", diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricIPPrefixResource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricIPPrefixResource.cs index d8466449677a..38f4e81ac64f 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricIPPrefixResource.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricIPPrefixResource.cs @@ -74,7 +74,7 @@ public async Task Update_IpPrefixesUpdateMaximumSetGen() Annotation = "annotation", IPPrefixRules = { -new IPPrefixRule(CommunityActionType.Permit,4155123341,"10.10.10.10/30") +new IPPrefixRule(CommunityActionType.Permit,4155123341L,"10.10.10.10/30") { Condition = IPPrefixRuleCondition.GreaterThanOrEqualTo, SubnetMaskLength = "10", diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricInternalNetworkCollection.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricInternalNetworkCollection.cs index 4bf75da77eeb..4b8a41338bf7 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricInternalNetworkCollection.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricInternalNetworkCollection.cs @@ -85,7 +85,7 @@ public async Task CreateOrUpdate_InternalNetworksCreateMaximumSetGen() DefaultRouteOriginate = NetworkFabricBooleanValue.True, AllowAS = 10, AllowASOverride = AllowASOverride.Enable, - PeerAsn = 61234, + PeerAsn = 61234L, IPv4ListenRangePrefixes = { "10.1.0.0/25" diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricInternalNetworkResource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricInternalNetworkResource.cs index 82a869e4e8ef..350f04a05b12 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricInternalNetworkResource.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricInternalNetworkResource.cs @@ -113,7 +113,7 @@ public async Task Update_InternalNetworksUpdateMaximumSetGen() DefaultRouteOriginate = NetworkFabricBooleanValue.True, AllowAS = 10, AllowASOverride = AllowASOverride.Enable, - PeerAsn = 61234, + PeerAsn = 61234L, IPv4ListenRangePrefixes = { "10.1.0.0/25" diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricResource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricResource.cs index 985eecef5334..1ace5854e347 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricResource.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricResource.cs @@ -76,7 +76,7 @@ public async Task Update_NetworkFabricsUpdateMaximumSetGen() ServerCountPerRack = 10, IPv4Prefix = "10.18.0.0/17", IPv6Prefix = "3FFE:FFFF:0:CD40::/60", - FabricAsn = 12345, + FabricAsn = 12345L, TerminalServerConfiguration = new NetworkFabricPatchablePropertiesTerminalServerConfiguration() { PrimaryIPv4Prefix = "10.0.0.12/30", @@ -131,7 +131,7 @@ public async Task Update_NetworkFabricsUpdateMaximumSetGen() SecondaryIPv6Prefix = "6FFE:FFFF:0:CD30::ac/127", Mtu = 1501, VlanId = 3001, - PeerAsn = 1235, + PeerAsn = 1235L, BfdConfiguration = new BfdConfiguration() { IntervalInMilliSeconds = 300, @@ -181,7 +181,7 @@ public async Task Update_NetworkFabricsUpdateMaximumSetGen() SecondaryIPv6Prefix = "2FFE:FFFF:0:CD30::ac/126", Mtu = 1500, VlanId = 3000, - PeerAsn = 61234, + PeerAsn = 61234L, BfdConfiguration = new BfdConfiguration() { IntervalInMilliSeconds = 300, diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricRoutePolicyCollection.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricRoutePolicyCollection.cs index e43cf44c6376..c0d0a11308b3 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricRoutePolicyCollection.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricRoutePolicyCollection.cs @@ -47,7 +47,7 @@ public async Task CreateOrUpdate_RoutePoliciesCreateMaximumSetGen() DefaultAction = CommunityActionType.Deny, Statements = { -new RoutePolicyStatementProperties(7,new StatementConditionProperties() +new RoutePolicyStatementProperties(7L,new StatementConditionProperties() { RoutePolicyConditionType = RoutePolicyConditionType.Or, IPPrefixId = new ResourceIdentifier("/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/ipPrefixes/example-ipPrefix"), @@ -61,7 +61,7 @@ public async Task CreateOrUpdate_RoutePoliciesCreateMaximumSetGen() }, },new StatementActionProperties(RoutePolicyActionType.Permit) { -LocalPreference = 20, +LocalPreference = 20L, IPCommunityProperties = new ActionIPCommunityProperties() { DeleteIPCommunityIds = diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricRoutePolicyResource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricRoutePolicyResource.cs index bf458a2c3f1b..0194c8923890 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricRoutePolicyResource.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricRoutePolicyResource.cs @@ -74,7 +74,7 @@ public async Task Update_RoutePoliciesUpdateMaximumSetGen() DefaultAction = CommunityActionType.Deny, Statements = { -new RoutePolicyStatementProperties(7,new StatementConditionProperties() +new RoutePolicyStatementProperties(7L,new StatementConditionProperties() { RoutePolicyConditionType = RoutePolicyConditionType.Or, IPPrefixId = new ResourceIdentifier("/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/ipPrefixes/example-ipPrefix"), @@ -88,7 +88,7 @@ public async Task Update_RoutePoliciesUpdateMaximumSetGen() }, },new StatementActionProperties(RoutePolicyActionType.Permit) { -LocalPreference = 20, +LocalPreference = 20L, IPCommunityProperties = new ActionIPCommunityProperties() { DeleteIPCommunityIds = diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkTapRuleCollection.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkTapRuleCollection.cs index f2aba6126ea9..ea4e0d405b80 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkTapRuleCollection.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkTapRuleCollection.cs @@ -51,7 +51,7 @@ public async Task CreateOrUpdate_NetworkTapRulesCreateMaximumSetGen() new NetworkTapRuleMatchConfiguration() { MatchConfigurationName = "config1", -SequenceNumber = 10, +SequenceNumber = 10L, IPAddressType = NetworkFabricIPAddressType.IPv4, MatchConditions = { diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkTapRuleResource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkTapRuleResource.cs index 016041a02098..e9ac289d6c52 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkTapRuleResource.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkTapRuleResource.cs @@ -79,7 +79,7 @@ public async Task Update_NetworkTapRulesUpdateMaximumSetGen() new NetworkTapRuleMatchConfiguration() { MatchConfigurationName = "config1", -SequenceNumber = 10, +SequenceNumber = 10L, IPAddressType = NetworkFabricIPAddressType.IPv4, MatchConditions = { diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkToNetworkInterconnectCollection.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkToNetworkInterconnectCollection.cs index 57d562551b33..8c57a53eed95 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkToNetworkInterconnectCollection.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkToNetworkInterconnectCollection.cs @@ -55,7 +55,7 @@ public async Task CreateOrUpdate_NetworkToNetworkInterconnectsCreateMaximumSetGe }, OptionBLayer3Configuration = new NetworkToNetworkInterconnectOptionBLayer3Configuration() { - PeerAsn = 61234, + PeerAsn = 61234L, VlanId = 1234, PrimaryIPv4Prefix = "10.0.0.12/30", PrimaryIPv6Prefix = "4FFE:FFFF:0:CD30::a8/127", diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkToNetworkInterconnectResource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkToNetworkInterconnectResource.cs index 0be24159dedf..f73090470b59 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkToNetworkInterconnectResource.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkToNetworkInterconnectResource.cs @@ -82,7 +82,7 @@ public async Task Update_NetworkToNetworkInterconnectsUpdateMaximumSetGen() }, OptionBLayer3Configuration = new OptionBLayer3Configuration() { - PeerAsn = 2345, + PeerAsn = 2345L, VlanId = 1235, PrimaryIPv4Prefix = "20.0.0.12/29", PrimaryIPv6Prefix = "4FFE:FFFF:0:CD30::a8/127", diff --git a/sdk/managedserviceidentity/Azure.ResourceManager.ManagedServiceIdentities/CHANGELOG.md b/sdk/managedserviceidentity/Azure.ResourceManager.ManagedServiceIdentities/CHANGELOG.md index a3a48a7fde7e..7a7c497ed3c7 100644 --- a/sdk/managedserviceidentity/Azure.ResourceManager.ManagedServiceIdentities/CHANGELOG.md +++ b/sdk/managedserviceidentity/Azure.ResourceManager.ManagedServiceIdentities/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 1.3.0-beta.1 (Unreleased) +## 1.3.0-beta.2 (Unreleased) ### Features Added @@ -10,6 +10,12 @@ ### Other Changes +## 1.3.0-beta.1 (2024-10-15) + +### Features Added + +- Exposed `JsonModelWriteCore` for model serialization procedure. + ## 1.2.3 (2024-05-07) ### Bugs Fixed diff --git a/sdk/managedserviceidentity/Azure.ResourceManager.ManagedServiceIdentities/api/Azure.ResourceManager.ManagedServiceIdentities.netstandard2.0.cs b/sdk/managedserviceidentity/Azure.ResourceManager.ManagedServiceIdentities/api/Azure.ResourceManager.ManagedServiceIdentities.netstandard2.0.cs index 85411d867a2d..f0833429ccec 100644 --- a/sdk/managedserviceidentity/Azure.ResourceManager.ManagedServiceIdentities/api/Azure.ResourceManager.ManagedServiceIdentities.netstandard2.0.cs +++ b/sdk/managedserviceidentity/Azure.ResourceManager.ManagedServiceIdentities/api/Azure.ResourceManager.ManagedServiceIdentities.netstandard2.0.cs @@ -25,6 +25,7 @@ public FederatedIdentityCredentialData() { } public string Issuer { get { throw null; } set { } } public System.Uri IssuerUri { get { throw null; } set { } } public string Subject { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ManagedServiceIdentities.FederatedIdentityCredentialData 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.ManagedServiceIdentities.FederatedIdentityCredentialData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -70,6 +71,7 @@ public SystemAssignedIdentityData(Azure.Core.AzureLocation location) { } public System.Uri ClientSecretUri { get { throw null; } } public System.Guid? PrincipalId { get { throw null; } } public System.Guid? TenantId { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ManagedServiceIdentities.SystemAssignedIdentityData 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.ManagedServiceIdentities.SystemAssignedIdentityData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -132,6 +134,7 @@ public UserAssignedIdentityData(Azure.Core.AzureLocation location) { } public System.Guid? ClientId { get { throw null; } } public System.Guid? PrincipalId { get { throw null; } } public System.Guid? TenantId { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ManagedServiceIdentities.UserAssignedIdentityData 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.ManagedServiceIdentities.UserAssignedIdentityData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -224,6 +227,7 @@ public UserAssignedIdentityPatch(Azure.Core.AzureLocation location) { } public System.Guid? ClientId { get { throw null; } } public System.Guid? PrincipalId { get { throw null; } } public System.Guid? TenantId { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ManagedServiceIdentities.Models.UserAssignedIdentityPatch 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.ManagedServiceIdentities.Models.UserAssignedIdentityPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } diff --git a/sdk/managedserviceidentity/Azure.ResourceManager.ManagedServiceIdentities/assets.json b/sdk/managedserviceidentity/Azure.ResourceManager.ManagedServiceIdentities/assets.json index 3226b0f62cd4..3983483159de 100644 --- a/sdk/managedserviceidentity/Azure.ResourceManager.ManagedServiceIdentities/assets.json +++ b/sdk/managedserviceidentity/Azure.ResourceManager.ManagedServiceIdentities/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/managedserviceidentity/Azure.ResourceManager.ManagedServiceIdentities", - "Tag": "net/managedserviceidentity/Azure.ResourceManager.ManagedServiceIdentities_48d32ef9d6" + "Tag": "net/managedserviceidentity/Azure.ResourceManager.ManagedServiceIdentities_44da3ced0a" } diff --git a/sdk/managedserviceidentity/Azure.ResourceManager.ManagedServiceIdentities/src/Azure.ResourceManager.ManagedServiceIdentities.csproj b/sdk/managedserviceidentity/Azure.ResourceManager.ManagedServiceIdentities/src/Azure.ResourceManager.ManagedServiceIdentities.csproj index 23132a3fe20d..c0ed9c42dc80 100644 --- a/sdk/managedserviceidentity/Azure.ResourceManager.ManagedServiceIdentities/src/Azure.ResourceManager.ManagedServiceIdentities.csproj +++ b/sdk/managedserviceidentity/Azure.ResourceManager.ManagedServiceIdentities/src/Azure.ResourceManager.ManagedServiceIdentities.csproj @@ -1,6 +1,6 @@ - 1.3.0-beta.1 + 1.3.0-beta.2 1.2.3 Azure.ResourceManager.ManagedServiceIdentities diff --git a/sdk/managedserviceidentity/Azure.ResourceManager.ManagedServiceIdentities/src/Generated/FederatedIdentityCredentialData.Serialization.cs b/sdk/managedserviceidentity/Azure.ResourceManager.ManagedServiceIdentities/src/Generated/FederatedIdentityCredentialData.Serialization.cs index 2da9f1ebcf72..4a3e4fb70578 100644 --- a/sdk/managedserviceidentity/Azure.ResourceManager.ManagedServiceIdentities/src/Generated/FederatedIdentityCredentialData.Serialization.cs +++ b/sdk/managedserviceidentity/Azure.ResourceManager.ManagedServiceIdentities/src/Generated/FederatedIdentityCredentialData.Serialization.cs @@ -21,6 +21,15 @@ public partial class FederatedIdentityCredentialData : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,27 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(FederatedIdentityCredentialData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(IssuerUri)) @@ -72,22 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } FederatedIdentityCredentialData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/managedserviceidentity/Azure.ResourceManager.ManagedServiceIdentities/src/Generated/Models/FederatedIdentityCredentialsListResult.Serialization.cs b/sdk/managedserviceidentity/Azure.ResourceManager.ManagedServiceIdentities/src/Generated/Models/FederatedIdentityCredentialsListResult.Serialization.cs index 2a3991c6c071..770eada17e8a 100644 --- a/sdk/managedserviceidentity/Azure.ResourceManager.ManagedServiceIdentities/src/Generated/Models/FederatedIdentityCredentialsListResult.Serialization.cs +++ b/sdk/managedserviceidentity/Azure.ResourceManager.ManagedServiceIdentities/src/Generated/Models/FederatedIdentityCredentialsListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class FederatedIdentityCredentialsListResult : IUtf8JsonSeriali void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(FederatedIdentityCredentialsListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } FederatedIdentityCredentialsListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/managedserviceidentity/Azure.ResourceManager.ManagedServiceIdentities/src/Generated/Models/UserAssignedIdentitiesListResult.Serialization.cs b/sdk/managedserviceidentity/Azure.ResourceManager.ManagedServiceIdentities/src/Generated/Models/UserAssignedIdentitiesListResult.Serialization.cs index 7485eedb954e..fd6dd331f280 100644 --- a/sdk/managedserviceidentity/Azure.ResourceManager.ManagedServiceIdentities/src/Generated/Models/UserAssignedIdentitiesListResult.Serialization.cs +++ b/sdk/managedserviceidentity/Azure.ResourceManager.ManagedServiceIdentities/src/Generated/Models/UserAssignedIdentitiesListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class UserAssignedIdentitiesListResult : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(UserAssignedIdentitiesListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } UserAssignedIdentitiesListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/managedserviceidentity/Azure.ResourceManager.ManagedServiceIdentities/src/Generated/Models/UserAssignedIdentityPatch.Serialization.cs b/sdk/managedserviceidentity/Azure.ResourceManager.ManagedServiceIdentities/src/Generated/Models/UserAssignedIdentityPatch.Serialization.cs index c595fb7b4627..f676dedde83d 100644 --- a/sdk/managedserviceidentity/Azure.ResourceManager.ManagedServiceIdentities/src/Generated/Models/UserAssignedIdentityPatch.Serialization.cs +++ b/sdk/managedserviceidentity/Azure.ResourceManager.ManagedServiceIdentities/src/Generated/Models/UserAssignedIdentityPatch.Serialization.cs @@ -21,6 +21,15 @@ public partial class UserAssignedIdentityPatch : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,40 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(UserAssignedIdentityPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(TenantId)) @@ -80,22 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea writer.WriteStringValue(ClientId.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } UserAssignedIdentityPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/managedserviceidentity/Azure.ResourceManager.ManagedServiceIdentities/src/Generated/SystemAssignedIdentityData.Serialization.cs b/sdk/managedserviceidentity/Azure.ResourceManager.ManagedServiceIdentities/src/Generated/SystemAssignedIdentityData.Serialization.cs index 27284769beab..6b40ea4e826f 100644 --- a/sdk/managedserviceidentity/Azure.ResourceManager.ManagedServiceIdentities/src/Generated/SystemAssignedIdentityData.Serialization.cs +++ b/sdk/managedserviceidentity/Azure.ResourceManager.ManagedServiceIdentities/src/Generated/SystemAssignedIdentityData.Serialization.cs @@ -21,6 +21,15 @@ public partial class SystemAssignedIdentityData : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,40 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(SystemAssignedIdentityData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(TenantId)) @@ -85,22 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe writer.WriteStringValue(ClientSecretUri.AbsoluteUri); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SystemAssignedIdentityData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/managedserviceidentity/Azure.ResourceManager.ManagedServiceIdentities/src/Generated/UserAssignedIdentityData.Serialization.cs b/sdk/managedserviceidentity/Azure.ResourceManager.ManagedServiceIdentities/src/Generated/UserAssignedIdentityData.Serialization.cs index 79ee80c6cfbe..ee5174d27708 100644 --- a/sdk/managedserviceidentity/Azure.ResourceManager.ManagedServiceIdentities/src/Generated/UserAssignedIdentityData.Serialization.cs +++ b/sdk/managedserviceidentity/Azure.ResourceManager.ManagedServiceIdentities/src/Generated/UserAssignedIdentityData.Serialization.cs @@ -21,6 +21,15 @@ public partial class UserAssignedIdentityData : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,40 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(UserAssignedIdentityData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(TenantId)) @@ -80,22 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead writer.WriteStringValue(ClientId.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } UserAssignedIdentityData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/managedserviceidentity/Azure.ResourceManager.ManagedServiceIdentities/src/autorest.md b/sdk/managedserviceidentity/Azure.ResourceManager.ManagedServiceIdentities/src/autorest.md index edb3fe5e90d3..8f5f867fc755 100644 --- a/sdk/managedserviceidentity/Azure.ResourceManager.ManagedServiceIdentities/src/autorest.md +++ b/sdk/managedserviceidentity/Azure.ResourceManager.ManagedServiceIdentities/src/autorest.md @@ -20,6 +20,7 @@ modelerfour: flatten-payloads: false use-model-reader-writer: true enable-bicep-serialization: true +use-write-core: true format-by-name-rules: 'tenantId': 'uuid' diff --git a/sdk/maps/Azure.Maps.Weather/src/Generated/Models/BasinId.cs b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/BasinId.cs index c535885022a7..cfc9682f016b 100644 --- a/sdk/maps/Azure.Maps.Weather/src/Generated/Models/BasinId.cs +++ b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/BasinId.cs @@ -48,7 +48,7 @@ public BasinId(string value) public static bool operator ==(BasinId left, BasinId right) => left.Equals(right); /// Determines if two values are not the same. public static bool operator !=(BasinId left, BasinId right) => !left.Equals(right); - /// Converts a string to a . + /// Converts a to a . public static implicit operator BasinId(string value) => new BasinId(value); /// diff --git a/sdk/maps/Azure.Maps.Weather/src/Generated/Models/DailyDuration.cs b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/DailyDuration.cs index 221df219ab48..1131198fdb85 100644 --- a/sdk/maps/Azure.Maps.Weather/src/Generated/Models/DailyDuration.cs +++ b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/DailyDuration.cs @@ -51,7 +51,7 @@ public DailyDuration(int value) public static bool operator ==(DailyDuration left, DailyDuration right) => left.Equals(right); /// Determines if two values are not the same. public static bool operator !=(DailyDuration left, DailyDuration right) => !left.Equals(right); - /// Converts a string to a . + /// Converts a to a . public static implicit operator DailyDuration(int value) => new DailyDuration(value); /// diff --git a/sdk/maps/Azure.Maps.Weather/src/Generated/Models/DayQuarter.cs b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/DayQuarter.cs index 1317a2aa34b0..0fa3073e427d 100644 --- a/sdk/maps/Azure.Maps.Weather/src/Generated/Models/DayQuarter.cs +++ b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/DayQuarter.cs @@ -42,7 +42,7 @@ public DayQuarter(int value) public static bool operator ==(DayQuarter left, DayQuarter right) => left.Equals(right); /// Determines if two values are not the same. public static bool operator !=(DayQuarter left, DayQuarter right) => !left.Equals(right); - /// Converts a string to a . + /// Converts a to a . public static implicit operator DayQuarter(int value) => new DayQuarter(value); /// diff --git a/sdk/maps/Azure.Maps.Weather/src/Generated/Models/DominantPollutant.cs b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/DominantPollutant.cs index 582d708ac665..a13146b92484 100644 --- a/sdk/maps/Azure.Maps.Weather/src/Generated/Models/DominantPollutant.cs +++ b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/DominantPollutant.cs @@ -45,7 +45,7 @@ public DominantPollutant(string value) public static bool operator ==(DominantPollutant left, DominantPollutant right) => left.Equals(right); /// Determines if two values are not the same. public static bool operator !=(DominantPollutant left, DominantPollutant right) => !left.Equals(right); - /// Converts a string to a . + /// Converts a to a . public static implicit operator DominantPollutant(string value) => new DominantPollutant(value); /// diff --git a/sdk/maps/Azure.Maps.Weather/src/Generated/Models/HazardIndex.cs b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/HazardIndex.cs index 4541ee747d86..ed95282d6374 100644 --- a/sdk/maps/Azure.Maps.Weather/src/Generated/Models/HazardIndex.cs +++ b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/HazardIndex.cs @@ -52,7 +52,7 @@ public HazardIndex(int value) public static bool operator ==(HazardIndex left, HazardIndex right) => left.Equals(right); /// Determines if two values are not the same. public static bool operator !=(HazardIndex left, HazardIndex right) => !left.Equals(right); - /// Converts a string to a . + /// Converts a to a . public static implicit operator HazardIndex(int value) => new HazardIndex(value); /// diff --git a/sdk/maps/Azure.Maps.Weather/src/Generated/Models/HourlyDuration.cs b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/HourlyDuration.cs index 76a4008c64ed..cc9fbcf19c72 100644 --- a/sdk/maps/Azure.Maps.Weather/src/Generated/Models/HourlyDuration.cs +++ b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/HourlyDuration.cs @@ -48,7 +48,7 @@ public HourlyDuration(int value) public static bool operator ==(HourlyDuration left, HourlyDuration right) => left.Equals(right); /// Determines if two values are not the same. public static bool operator !=(HourlyDuration left, HourlyDuration right) => !left.Equals(right); - /// Converts a string to a . + /// Converts a to a . public static implicit operator HourlyDuration(int value) => new HourlyDuration(value); /// diff --git a/sdk/maps/Azure.Maps.Weather/src/Generated/Models/IconCode.cs b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/IconCode.cs index 1ec85b7399a7..3068ce5588b7 100644 --- a/sdk/maps/Azure.Maps.Weather/src/Generated/Models/IconCode.cs +++ b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/IconCode.cs @@ -150,7 +150,7 @@ public IconCode(int value) public static bool operator ==(IconCode left, IconCode right) => left.Equals(right); /// Determines if two values are not the same. public static bool operator !=(IconCode left, IconCode right) => !left.Equals(right); - /// Converts a string to a . + /// Converts a to a . public static implicit operator IconCode(int value) => new IconCode(value); /// diff --git a/sdk/maps/Azure.Maps.Weather/src/Generated/Models/JsonFormat.cs b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/JsonFormat.cs index c1cd6e71854b..44ff3fa0b3d7 100644 --- a/sdk/maps/Azure.Maps.Weather/src/Generated/Models/JsonFormat.cs +++ b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/JsonFormat.cs @@ -30,7 +30,7 @@ public JsonFormat(string value) public static bool operator ==(JsonFormat left, JsonFormat right) => left.Equals(right); /// Determines if two values are not the same. public static bool operator !=(JsonFormat left, JsonFormat right) => !left.Equals(right); - /// Converts a string to a . + /// Converts a to a . public static implicit operator JsonFormat(string value) => new JsonFormat(value); /// diff --git a/sdk/maps/Azure.Maps.Weather/src/Generated/Models/LatestStatusKeyword.cs b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/LatestStatusKeyword.cs index c0068a22fe97..c41e5bee53a6 100644 --- a/sdk/maps/Azure.Maps.Weather/src/Generated/Models/LatestStatusKeyword.cs +++ b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/LatestStatusKeyword.cs @@ -51,7 +51,7 @@ public LatestStatusKeyword(string value) public static bool operator ==(LatestStatusKeyword left, LatestStatusKeyword right) => left.Equals(right); /// Determines if two values are not the same. public static bool operator !=(LatestStatusKeyword left, LatestStatusKeyword right) => !left.Equals(right); - /// Converts a string to a . + /// Converts a to a . public static implicit operator LatestStatusKeyword(string value) => new LatestStatusKeyword(value); /// diff --git a/sdk/maps/Azure.Maps.Weather/src/Generated/Models/PollutantType.cs b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/PollutantType.cs index 2d7efc532f32..8370e8fcd2c1 100644 --- a/sdk/maps/Azure.Maps.Weather/src/Generated/Models/PollutantType.cs +++ b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/PollutantType.cs @@ -45,7 +45,7 @@ public PollutantType(string value) public static bool operator ==(PollutantType left, PollutantType right) => left.Equals(right); /// Determines if two values are not the same. public static bool operator !=(PollutantType left, PollutantType right) => !left.Equals(right); - /// Converts a string to a . + /// Converts a to a . public static implicit operator PollutantType(string value) => new PollutantType(value); /// diff --git a/sdk/maps/Azure.Maps.Weather/src/Generated/Models/PrecipitationType.cs b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/PrecipitationType.cs index 7fab0f472363..26e4a2837e44 100644 --- a/sdk/maps/Azure.Maps.Weather/src/Generated/Models/PrecipitationType.cs +++ b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/PrecipitationType.cs @@ -39,7 +39,7 @@ public PrecipitationType(string value) public static bool operator ==(PrecipitationType left, PrecipitationType right) => left.Equals(right); /// Determines if two values are not the same. public static bool operator !=(PrecipitationType left, PrecipitationType right) => !left.Equals(right); - /// Converts a string to a . + /// Converts a to a . public static implicit operator PrecipitationType(string value) => new PrecipitationType(value); /// diff --git a/sdk/maps/Azure.Maps.Weather/src/Generated/Models/UnitType.cs b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/UnitType.cs index 3857c65b8528..86c4394a8c89 100644 --- a/sdk/maps/Azure.Maps.Weather/src/Generated/Models/UnitType.cs +++ b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/UnitType.cs @@ -102,7 +102,7 @@ public UnitType(int value) public static bool operator ==(UnitType left, UnitType right) => left.Equals(right); /// Determines if two values are not the same. public static bool operator !=(UnitType left, UnitType right) => !left.Equals(right); - /// Converts a string to a . + /// Converts a to a . public static implicit operator UnitType(int value) => new UnitType(value); /// diff --git a/sdk/maps/Azure.Maps.Weather/src/Generated/Models/WeatherDataUnit.cs b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/WeatherDataUnit.cs index 59d164b16031..0ca37af345cc 100644 --- a/sdk/maps/Azure.Maps.Weather/src/Generated/Models/WeatherDataUnit.cs +++ b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/WeatherDataUnit.cs @@ -33,7 +33,7 @@ public WeatherDataUnit(string value) public static bool operator ==(WeatherDataUnit left, WeatherDataUnit right) => left.Equals(right); /// Determines if two values are not the same. public static bool operator !=(WeatherDataUnit left, WeatherDataUnit right) => !left.Equals(right); - /// Converts a string to a . + /// Converts a to a . public static implicit operator WeatherDataUnit(string value) => new WeatherDataUnit(value); /// diff --git a/sdk/mediaservices/Azure.ResourceManager.Media/samples/Generated/Samples/Sample_MediaAssetFilterCollection.cs b/sdk/mediaservices/Azure.ResourceManager.Media/samples/Generated/Samples/Sample_MediaAssetFilterCollection.cs index 887e1422fd6b..5fc93902edb1 100644 --- a/sdk/mediaservices/Azure.ResourceManager.Media/samples/Generated/Samples/Sample_MediaAssetFilterCollection.cs +++ b/sdk/mediaservices/Azure.ResourceManager.Media/samples/Generated/Samples/Sample_MediaAssetFilterCollection.cs @@ -196,11 +196,11 @@ public async Task CreateOrUpdate_CreateAnAssetFilter() { PresentationTimeRange = new PresentationTimeRange() { - StartTimestamp = 0, - EndTimestamp = 170000000, - PresentationWindowDuration = 9223372036854775000, - LiveBackoffDuration = 0, - Timescale = 10000000, + StartTimestamp = 0L, + EndTimestamp = 170000000L, + PresentationWindowDuration = 9223372036854775000L, + LiveBackoffDuration = 0L, + Timescale = 10000000L, ForceEndTimestamp = false, }, FirstQualityBitrate = 128000, diff --git a/sdk/mediaservices/Azure.ResourceManager.Media/samples/Generated/Samples/Sample_MediaAssetFilterResource.cs b/sdk/mediaservices/Azure.ResourceManager.Media/samples/Generated/Samples/Sample_MediaAssetFilterResource.cs index 426594d7ccd8..078e72364364 100644 --- a/sdk/mediaservices/Azure.ResourceManager.Media/samples/Generated/Samples/Sample_MediaAssetFilterResource.cs +++ b/sdk/mediaservices/Azure.ResourceManager.Media/samples/Generated/Samples/Sample_MediaAssetFilterResource.cs @@ -105,11 +105,11 @@ public async Task Update_UpdateAnAssetFilter() { PresentationTimeRange = new PresentationTimeRange() { - StartTimestamp = 10, - EndTimestamp = 170000000, - PresentationWindowDuration = 9223372036854775000, - LiveBackoffDuration = 0, - Timescale = 10000000, + StartTimestamp = 10L, + EndTimestamp = 170000000L, + PresentationWindowDuration = 9223372036854775000L, + LiveBackoffDuration = 0L, + Timescale = 10000000L, ForceEndTimestamp = false, }, FirstQualityBitrate = 128000, diff --git a/sdk/mediaservices/Azure.ResourceManager.Media/samples/Generated/Samples/Sample_MediaServicesAccountFilterCollection.cs b/sdk/mediaservices/Azure.ResourceManager.Media/samples/Generated/Samples/Sample_MediaServicesAccountFilterCollection.cs index 70507eeeb227..5b682b2f2af6 100644 --- a/sdk/mediaservices/Azure.ResourceManager.Media/samples/Generated/Samples/Sample_MediaServicesAccountFilterCollection.cs +++ b/sdk/mediaservices/Azure.ResourceManager.Media/samples/Generated/Samples/Sample_MediaServicesAccountFilterCollection.cs @@ -191,11 +191,11 @@ public async Task CreateOrUpdate_CreateAnAccountFilter() { PresentationTimeRange = new PresentationTimeRange() { - StartTimestamp = 0, - EndTimestamp = 170000000, - PresentationWindowDuration = 9223372036854775000, - LiveBackoffDuration = 0, - Timescale = 10000000, + StartTimestamp = 0L, + EndTimestamp = 170000000L, + PresentationWindowDuration = 9223372036854775000L, + LiveBackoffDuration = 0L, + Timescale = 10000000L, ForceEndTimestamp = false, }, FirstQualityBitrate = 128000, diff --git a/sdk/mediaservices/Azure.ResourceManager.Media/samples/Generated/Samples/Sample_MediaServicesAccountFilterResource.cs b/sdk/mediaservices/Azure.ResourceManager.Media/samples/Generated/Samples/Sample_MediaServicesAccountFilterResource.cs index e13baead4a55..c456e1e59046 100644 --- a/sdk/mediaservices/Azure.ResourceManager.Media/samples/Generated/Samples/Sample_MediaServicesAccountFilterResource.cs +++ b/sdk/mediaservices/Azure.ResourceManager.Media/samples/Generated/Samples/Sample_MediaServicesAccountFilterResource.cs @@ -102,11 +102,11 @@ public async Task Update_UpdateAnAccountFilter() { PresentationTimeRange = new PresentationTimeRange() { - StartTimestamp = 10, - EndTimestamp = 170000000, - PresentationWindowDuration = 9223372036854775000, - LiveBackoffDuration = 0, - Timescale = 10000000, + StartTimestamp = 10L, + EndTimestamp = 170000000L, + PresentationWindowDuration = 9223372036854775000L, + LiveBackoffDuration = 0L, + Timescale = 10000000L, ForceEndTimestamp = false, }, FirstQualityBitrate = 128000, diff --git a/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/samples/Generated/Samples/Sample_MobileNetworkPacketCaptureCollection.cs b/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/samples/Generated/Samples/Sample_MobileNetworkPacketCaptureCollection.cs index 316a1cbb8007..eec47e8b4c22 100644 --- a/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/samples/Generated/Samples/Sample_MobileNetworkPacketCaptureCollection.cs +++ b/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/samples/Generated/Samples/Sample_MobileNetworkPacketCaptureCollection.cs @@ -46,8 +46,8 @@ public async Task CreateOrUpdate_CreatePacketCapture() { "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP","/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCoreDataPlanes/TestPacketCoreDP","/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCoreDataPlanes/TestPacketCoreDP/attachedDataNetworks/TestADN" }, - BytesToCapturePerPacket = 10000, - TotalBytesPerSession = 100000, + BytesToCapturePerPacket = 10000L, + TotalBytesPerSession = 100000L, TimeLimitInSeconds = 100, }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, packetCaptureName, data); diff --git a/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/samples/Generated/Samples/Sample_MobileNetworkPacketCaptureResource.cs b/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/samples/Generated/Samples/Sample_MobileNetworkPacketCaptureResource.cs index 62568593ecbe..7d6fff0d004b 100644 --- a/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/samples/Generated/Samples/Sample_MobileNetworkPacketCaptureResource.cs +++ b/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/samples/Generated/Samples/Sample_MobileNetworkPacketCaptureResource.cs @@ -44,8 +44,8 @@ public async Task Update_CreatePacketCapture() { "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP","/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCoreDataPlanes/TestPacketCoreDP","/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCoreDataPlanes/TestPacketCoreDP/attachedDataNetworks/TestADN" }, - BytesToCapturePerPacket = 10000, - TotalBytesPerSession = 100000, + BytesToCapturePerPacket = 10000L, + TotalBytesPerSession = 100000L, TimeLimitInSeconds = 100, }; ArmOperation lro = await mobileNetworkPacketCapture.UpdateAsync(WaitUntil.Completed, data); diff --git a/sdk/modelsrepository/tests.yml b/sdk/modelsrepository/tests.yml index 235a94db0279..6a3dba66508e 100644 --- a/sdk/modelsrepository/tests.yml +++ b/sdk/modelsrepository/tests.yml @@ -5,4 +5,3 @@ extends: parameters: ServiceDirectory: modelsrepository Location: westus2 - Clouds: Preview diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/api/Azure.ResourceManager.MongoCluster.netstandard2.0.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/api/Azure.ResourceManager.MongoCluster.netstandard2.0.cs index 7655abf73796..be41ef5b289c 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/api/Azure.ResourceManager.MongoCluster.netstandard2.0.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/api/Azure.ResourceManager.MongoCluster.netstandard2.0.cs @@ -21,6 +21,7 @@ public partial class MongoClusterData : Azure.ResourceManager.Models.TrackedReso { public MongoClusterData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.MongoCluster.Models.MongoClusterProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MongoCluster.MongoClusterData 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.MongoCluster.MongoClusterData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -61,6 +62,7 @@ public partial class MongoClusterFirewallRuleData : Azure.ResourceManager.Models { public MongoClusterFirewallRuleData() { } public Azure.ResourceManager.MongoCluster.Models.MongoClusterFirewallRuleProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MongoCluster.MongoClusterFirewallRuleData 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.MongoCluster.MongoClusterFirewallRuleData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -126,6 +128,7 @@ public partial class MongoClusterPrivateEndpointConnectionResourceData : Azure.R { public MongoClusterPrivateEndpointConnectionResourceData() { } public Azure.ResourceManager.MongoCluster.Models.MongoClusterPrivateEndpointConnectionProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MongoCluster.MongoClusterPrivateEndpointConnectionResourceData 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.MongoCluster.MongoClusterPrivateEndpointConnectionResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -241,6 +244,7 @@ public partial class MongoClusterAdministratorProperties : System.ClientModel.Pr public MongoClusterAdministratorProperties() { } public string Password { get { throw null; } set { } } public string UserName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MongoCluster.Models.MongoClusterAdministratorProperties 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.MongoCluster.Models.MongoClusterAdministratorProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -253,6 +257,7 @@ internal MongoClusterConnectionString() { } public string Description { get { throw null; } } public string Name { get { throw null; } } public string Uri { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MongoCluster.Models.MongoClusterConnectionString 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.MongoCluster.Models.MongoClusterConnectionString System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -263,6 +268,7 @@ public partial class MongoClusterConnectionStringsResult : System.ClientModel.Pr { internal MongoClusterConnectionStringsResult() { } public System.Collections.Generic.IReadOnlyList ConnectionStrings { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MongoCluster.Models.MongoClusterConnectionStringsResult 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.MongoCluster.Models.MongoClusterConnectionStringsResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -295,6 +301,7 @@ public MongoClusterFirewallRuleProperties(string startIPAddress, string endIPAdd public string EndIPAddress { get { throw null; } set { } } public Azure.ResourceManager.MongoCluster.Models.MongoClusterProvisioningState? ProvisioningState { get { throw null; } } public string StartIPAddress { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MongoCluster.Models.MongoClusterFirewallRuleProperties 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.MongoCluster.Models.MongoClusterFirewallRuleProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -306,6 +313,7 @@ public partial class MongoClusterNameAvailabilityContent : System.ClientModel.Pr public MongoClusterNameAvailabilityContent() { } public string Name { get { throw null; } set { } } public string ResourceType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MongoCluster.Models.MongoClusterNameAvailabilityContent 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.MongoCluster.Models.MongoClusterNameAvailabilityContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -318,6 +326,7 @@ internal MongoClusterNameAvailabilityResult() { } public bool? IsNameAvailable { get { throw null; } } public string Message { get { throw null; } } public Azure.ResourceManager.MongoCluster.Models.MongoClusterNameUnavailableReason? Reason { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MongoCluster.Models.MongoClusterNameAvailabilityResult 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.MongoCluster.Models.MongoClusterNameAvailabilityResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -347,6 +356,7 @@ public partial class MongoClusterPatch : System.ClientModel.Primitives.IJsonMode public MongoClusterPatch() { } public Azure.ResourceManager.MongoCluster.Models.MongoClusterUpdateProperties Properties { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MongoCluster.Models.MongoClusterPatch 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.MongoCluster.Models.MongoClusterPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -374,6 +384,7 @@ public partial class MongoClusterPrivateEndpointConnection : Azure.ResourceManag { internal MongoClusterPrivateEndpointConnection() { } public Azure.ResourceManager.MongoCluster.Models.MongoClusterPrivateEndpointConnectionProperties Properties { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MongoCluster.Models.MongoClusterPrivateEndpointConnection 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.MongoCluster.Models.MongoClusterPrivateEndpointConnection System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -387,6 +398,7 @@ public MongoClusterPrivateEndpointConnectionProperties(Azure.ResourceManager.Mon public Azure.Core.ResourceIdentifier PrivateEndpointId { get { throw null; } } public Azure.ResourceManager.MongoCluster.Models.MongoClusterPrivateLinkServiceConnectionState PrivateLinkServiceConnectionState { get { throw null; } set { } } public Azure.ResourceManager.MongoCluster.Models.MongoClusterPrivateEndpointConnectionProvisioningState? ProvisioningState { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MongoCluster.Models.MongoClusterPrivateEndpointConnectionProperties 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.MongoCluster.Models.MongoClusterPrivateEndpointConnectionProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -436,6 +448,7 @@ public partial class MongoClusterPrivateLinkResourceData : Azure.ResourceManager { internal MongoClusterPrivateLinkResourceData() { } public Azure.ResourceManager.MongoCluster.Models.MongoClusterPrivateLinkResourceProperties Properties { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MongoCluster.Models.MongoClusterPrivateLinkResourceData 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.MongoCluster.Models.MongoClusterPrivateLinkResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -448,6 +461,7 @@ internal MongoClusterPrivateLinkResourceProperties() { } public string GroupId { get { throw null; } } public System.Collections.Generic.IReadOnlyList RequiredMembers { get { throw null; } } public System.Collections.Generic.IReadOnlyList RequiredZoneNames { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MongoCluster.Models.MongoClusterPrivateLinkResourceProperties 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.MongoCluster.Models.MongoClusterPrivateLinkResourceProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -460,6 +474,7 @@ public MongoClusterPrivateLinkServiceConnectionState() { } public string ActionsRequired { get { throw null; } set { } } public string Description { get { throw null; } set { } } public Azure.ResourceManager.MongoCluster.Models.MongoClusterPrivateEndpointServiceConnectionStatus? Status { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MongoCluster.Models.MongoClusterPrivateLinkServiceConnectionState 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.MongoCluster.Models.MongoClusterPrivateLinkServiceConnectionState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -521,6 +536,7 @@ public MongoClusterProperties() { } public string ServerVersion { get { throw null; } set { } } public int? ShardingShardCount { get { throw null; } set { } } public long? StorageSizeGb { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MongoCluster.Models.MongoClusterProperties 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.MongoCluster.Models.MongoClusterProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -571,6 +587,7 @@ public partial class MongoClusterReplica : Azure.ResourceManager.Models.Resource { internal MongoClusterReplica() { } public Azure.ResourceManager.MongoCluster.Models.MongoClusterProperties Properties { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MongoCluster.Models.MongoClusterReplica 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.MongoCluster.Models.MongoClusterReplica System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -582,6 +599,7 @@ public partial class MongoClusterReplicaContent : System.ClientModel.Primitives. public MongoClusterReplicaContent(Azure.Core.ResourceIdentifier sourceResourceId, Azure.Core.AzureLocation sourceLocation) { } public Azure.Core.AzureLocation SourceLocation { get { throw null; } set { } } public Azure.Core.ResourceIdentifier SourceResourceId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MongoCluster.Models.MongoClusterReplicaContent 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.MongoCluster.Models.MongoClusterReplicaContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -594,6 +612,7 @@ internal MongoClusterReplicationProperties() { } public Azure.ResourceManager.MongoCluster.Models.MongoClusterReplicationState? ReplicationState { get { throw null; } } public Azure.ResourceManager.MongoCluster.Models.MongoClusterReplicationRole? Role { get { throw null; } } public Azure.Core.ResourceIdentifier SourceResourceId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MongoCluster.Models.MongoClusterReplicationProperties 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.MongoCluster.Models.MongoClusterReplicationProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -646,6 +665,7 @@ public partial class MongoClusterRestoreContent : System.ClientModel.Primitives. public MongoClusterRestoreContent() { } public System.DateTimeOffset? PointInTimeUTC { get { throw null; } set { } } public Azure.Core.ResourceIdentifier SourceResourceId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MongoCluster.Models.MongoClusterRestoreContent 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.MongoCluster.Models.MongoClusterRestoreContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -687,6 +707,7 @@ public MongoClusterUpdateProperties() { } public string ServerVersion { get { throw null; } set { } } public int? ShardingShardCount { get { throw null; } set { } } public long? StorageSizeGb { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MongoCluster.Models.MongoClusterUpdateProperties 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.MongoCluster.Models.MongoClusterUpdateProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -698,6 +719,7 @@ public partial class PromoteReplicaContent : System.ClientModel.Primitives.IJson public PromoteReplicaContent(Azure.ResourceManager.MongoCluster.Models.MongoClusterPromoteOption promoteOption) { } public Azure.ResourceManager.MongoCluster.Models.MongoClusterPromoteMode? Mode { get { throw null; } set { } } public Azure.ResourceManager.MongoCluster.Models.MongoClusterPromoteOption PromoteOption { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MongoCluster.Models.PromoteReplicaContent 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.MongoCluster.Models.PromoteReplicaContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_MongoClusterCollection.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_MongoClusterCollection.cs index 264ae8e86888..811c9136ec0a 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_MongoClusterCollection.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_MongoClusterCollection.cs @@ -22,7 +22,7 @@ public partial class Sample_MongoClusterCollection public async Task Get_GetsAMongoClusterResource() { // Generated from example definition: 2024-07-01/MongoClusters_Get.json - // this example is just showing the usage of "MongoClusters_Get" operation, for the dependent resources, they will have to be created separately. + // this example is just showing the usage of "MongoCluster_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -56,7 +56,7 @@ public async Task Get_GetsAMongoClusterResource() public async Task Exists_GetsAMongoClusterResource() { // Generated from example definition: 2024-07-01/MongoClusters_Get.json - // this example is just showing the usage of "MongoClusters_Get" operation, for the dependent resources, they will have to be created separately. + // this example is just showing the usage of "MongoCluster_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -86,7 +86,7 @@ public async Task Exists_GetsAMongoClusterResource() public async Task GetIfExists_GetsAMongoClusterResource() { // Generated from example definition: 2024-07-01/MongoClusters_Get.json - // this example is just showing the usage of "MongoClusters_Get" operation, for the dependent resources, they will have to be created separately. + // this example is just showing the usage of "MongoCluster_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -128,7 +128,7 @@ public async Task GetIfExists_GetsAMongoClusterResource() public async Task CreateOrUpdate_CreatesANewMongoClusterResource() { // Generated from example definition: 2024-07-01/MongoClusters_Create.json - // this example is just showing the usage of "MongoClusters_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + // this example is just showing the usage of "MongoCluster_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -158,7 +158,7 @@ public async Task CreateOrUpdate_CreatesANewMongoClusterResource() }, ServerVersion = "5.0", HighAvailabilityTargetMode = HighAvailabilityMode.SameZone, - StorageSizeGb = 128, + StorageSizeGb = 128L, ShardingShardCount = 1, ComputeTier = "M30", }, @@ -179,7 +179,7 @@ public async Task CreateOrUpdate_CreatesANewMongoClusterResource() public async Task CreateOrUpdate_CreatesAReplicaMongoClusterResourceFromASourceResource() { // Generated from example definition: 2024-07-01/MongoClusters_CreateGeoReplica.json - // this example is just showing the usage of "MongoClusters_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + // this example is just showing the usage of "MongoCluster_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -222,7 +222,7 @@ public async Task CreateOrUpdate_CreatesAReplicaMongoClusterResourceFromASourceR public async Task CreateOrUpdate_CreatesAMongoClusterResourceFromAPointInTimeRestore() { // Generated from example definition: 2024-07-01/MongoClusters_CreatePITR.json - // this example is just showing the usage of "MongoClusters_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + // this example is just showing the usage of "MongoCluster_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_MongoClusterFirewallRuleCollection.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_MongoClusterFirewallRuleCollection.cs index e76fbd764a50..6c778fbacb9b 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_MongoClusterFirewallRuleCollection.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_MongoClusterFirewallRuleCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_MongoClusterFirewallRuleCollection public async Task Get_GetsAFirewallRuleOnAMongoClusterResource() { // Generated from example definition: 2024-07-01/MongoClusters_FirewallRuleGet.json - // this example is just showing the usage of "FirewallRules_Get" operation, for the dependent resources, they will have to be created separately. + // this example is just showing the usage of "FirewallRule_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -56,7 +56,7 @@ public async Task Get_GetsAFirewallRuleOnAMongoClusterResource() public async Task Exists_GetsAFirewallRuleOnAMongoClusterResource() { // Generated from example definition: 2024-07-01/MongoClusters_FirewallRuleGet.json - // this example is just showing the usage of "FirewallRules_Get" operation, for the dependent resources, they will have to be created separately. + // this example is just showing the usage of "FirewallRule_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -87,7 +87,7 @@ public async Task Exists_GetsAFirewallRuleOnAMongoClusterResource() public async Task GetIfExists_GetsAFirewallRuleOnAMongoClusterResource() { // Generated from example definition: 2024-07-01/MongoClusters_FirewallRuleGet.json - // this example is just showing the usage of "FirewallRules_Get" operation, for the dependent resources, they will have to be created separately. + // this example is just showing the usage of "FirewallRule_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -130,7 +130,7 @@ public async Task GetIfExists_GetsAFirewallRuleOnAMongoClusterResource() public async Task CreateOrUpdate_CreatesAFirewallRuleOnAMongoClusterResource() { // Generated from example definition: 2024-07-01/MongoClusters_FirewallRuleCreate.json - // this example is just showing the usage of "FirewallRules_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + // this example is just showing the usage of "FirewallRule_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_MongoClusterFirewallRuleResource.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_MongoClusterFirewallRuleResource.cs index 0e716698e305..c7f005fb5bf9 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_MongoClusterFirewallRuleResource.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_MongoClusterFirewallRuleResource.cs @@ -21,7 +21,7 @@ public partial class Sample_MongoClusterFirewallRuleResource public async Task Get_GetsAFirewallRuleOnAMongoClusterResource() { // Generated from example definition: 2024-07-01/MongoClusters_FirewallRuleGet.json - // this example is just showing the usage of "FirewallRules_Get" operation, for the dependent resources, they will have to be created separately. + // this example is just showing the usage of "FirewallRule_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -53,7 +53,7 @@ public async Task Get_GetsAFirewallRuleOnAMongoClusterResource() public async Task Update_CreatesAFirewallRuleOnAMongoClusterResource() { // Generated from example definition: 2024-07-01/MongoClusters_FirewallRuleCreate.json - // this example is just showing the usage of "FirewallRules_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + // this example is just showing the usage of "FirewallRule_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -90,7 +90,7 @@ public async Task Update_CreatesAFirewallRuleOnAMongoClusterResource() public async Task Delete_DeletesAFirewallRuleOnAMongoClusterResource() { // Generated from example definition: 2024-07-01/MongoClusters_FirewallRuleDelete.json - // this example is just showing the usage of "FirewallRules_Delete" operation, for the dependent resources, they will have to be created separately. + // this example is just showing the usage of "FirewallRule_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_MongoClusterPrivateEndpointConnectionResource.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_MongoClusterPrivateEndpointConnectionResource.cs index cb60df02f130..0567e2ade1e2 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_MongoClusterPrivateEndpointConnectionResource.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_MongoClusterPrivateEndpointConnectionResource.cs @@ -21,7 +21,7 @@ public partial class Sample_MongoClusterPrivateEndpointConnectionResource public async Task Get_GetAPrivateEndpointConnectionOnAMongoClusterResource() { // Generated from example definition: 2024-07-01/MongoClusters_PrivateEndpointConnectionGet.json - // this example is just showing the usage of "PrivateEndpointConnections_Get" operation, for the dependent resources, they will have to be created separately. + // this example is just showing the usage of "PrivateEndpointConnectionResource_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -53,7 +53,7 @@ public async Task Get_GetAPrivateEndpointConnectionOnAMongoClusterResource() public async Task Update_ApprovesAPrivateEndpointConnectionOnAMongoClusterResource() { // Generated from example definition: 2024-07-01/MongoClusters_PrivateEndpointConnectionPut.json - // this example is just showing the usage of "PrivateEndpointConnections_Create" operation, for the dependent resources, they will have to be created separately. + // this example is just showing the usage of "PrivateEndpointConnectionResource_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -94,7 +94,7 @@ public async Task Update_ApprovesAPrivateEndpointConnectionOnAMongoClusterResour public async Task Delete_DeleteAPrivateEndpointConnectionOnAMongoClusterResource() { // Generated from example definition: 2024-07-01/MongoClusters_PrivateEndpointConnectionDelete.json - // this example is just showing the usage of "PrivateEndpointConnections_Delete" operation, for the dependent resources, they will have to be created separately. + // this example is just showing the usage of "PrivateEndpointConnectionResource_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_MongoClusterPrivateEndpointConnectionResourceCollection.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_MongoClusterPrivateEndpointConnectionResourceCollection.cs index f1c05efff021..f0c1dbd927f4 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_MongoClusterPrivateEndpointConnectionResourceCollection.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_MongoClusterPrivateEndpointConnectionResourceCollection.cs @@ -58,7 +58,7 @@ public async Task GetAll_ListsThePrivateEndpointConnectionResourcesOnAMongoClust public async Task Get_GetAPrivateEndpointConnectionOnAMongoClusterResource() { // Generated from example definition: 2024-07-01/MongoClusters_PrivateEndpointConnectionGet.json - // this example is just showing the usage of "PrivateEndpointConnections_Get" operation, for the dependent resources, they will have to be created separately. + // this example is just showing the usage of "PrivateEndpointConnectionResource_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -93,7 +93,7 @@ public async Task Get_GetAPrivateEndpointConnectionOnAMongoClusterResource() public async Task Exists_GetAPrivateEndpointConnectionOnAMongoClusterResource() { // Generated from example definition: 2024-07-01/MongoClusters_PrivateEndpointConnectionGet.json - // this example is just showing the usage of "PrivateEndpointConnections_Get" operation, for the dependent resources, they will have to be created separately. + // this example is just showing the usage of "PrivateEndpointConnectionResource_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -124,7 +124,7 @@ public async Task Exists_GetAPrivateEndpointConnectionOnAMongoClusterResource() public async Task GetIfExists_GetAPrivateEndpointConnectionOnAMongoClusterResource() { // Generated from example definition: 2024-07-01/MongoClusters_PrivateEndpointConnectionGet.json - // this example is just showing the usage of "PrivateEndpointConnections_Get" operation, for the dependent resources, they will have to be created separately. + // this example is just showing the usage of "PrivateEndpointConnectionResource_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -167,7 +167,7 @@ public async Task GetIfExists_GetAPrivateEndpointConnectionOnAMongoClusterResour public async Task CreateOrUpdate_ApprovesAPrivateEndpointConnectionOnAMongoClusterResource() { // Generated from example definition: 2024-07-01/MongoClusters_PrivateEndpointConnectionPut.json - // this example is just showing the usage of "PrivateEndpointConnections_Create" operation, for the dependent resources, they will have to be created separately. + // this example is just showing the usage of "PrivateEndpointConnectionResource_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_MongoClusterResource.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_MongoClusterResource.cs index 923f56a02941..6a7ea206767c 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_MongoClusterResource.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_MongoClusterResource.cs @@ -22,7 +22,7 @@ public partial class Sample_MongoClusterResource public async Task Get_GetsAMongoClusterResource() { // Generated from example definition: 2024-07-01/MongoClusters_Get.json - // this example is just showing the usage of "MongoClusters_Get" operation, for the dependent resources, they will have to be created separately. + // this example is just showing the usage of "MongoCluster_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -53,7 +53,7 @@ public async Task Get_GetsAMongoClusterResource() public async Task Update_UpdatesTheDiskSizeOnAMongoClusterResource() { // Generated from example definition: 2024-07-01/MongoClusters_PatchDiskSize.json - // this example is just showing the usage of "MongoClusters_Update" operation, for the dependent resources, they will have to be created separately. + // this example is just showing the usage of "MongoCluster_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -73,7 +73,7 @@ public async Task Update_UpdatesTheDiskSizeOnAMongoClusterResource() { Properties = new MongoClusterUpdateProperties() { - StorageSizeGb = 256, + StorageSizeGb = 256L, }, }; ArmOperation lro = await mongoCluster.UpdateAsync(WaitUntil.Completed, patch); @@ -92,7 +92,7 @@ public async Task Update_UpdatesTheDiskSizeOnAMongoClusterResource() public async Task Update_DisablesPublicNetworkAccessOnAMongoClusterResourceWithAPrivateEndpointConnection() { // Generated from example definition: 2024-07-01/MongoClusters_PatchPrivateNetworkAccess.json - // this example is just showing the usage of "MongoClusters_Update" operation, for the dependent resources, they will have to be created separately. + // this example is just showing the usage of "MongoCluster_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -131,7 +131,7 @@ public async Task Update_DisablesPublicNetworkAccessOnAMongoClusterResourceWithA public async Task Update_ResetsTheAdministratorLoginPassword() { // Generated from example definition: 2024-07-01/MongoClusters_ResetPassword.json - // this example is just showing the usage of "MongoClusters_Update" operation, for the dependent resources, they will have to be created separately. + // this example is just showing the usage of "MongoCluster_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -174,7 +174,7 @@ public async Task Update_ResetsTheAdministratorLoginPassword() public async Task Update_UpdatesAMongoClusterResource() { // Generated from example definition: 2024-07-01/MongoClusters_Update.json - // this example is just showing the usage of "MongoClusters_Update" operation, for the dependent resources, they will have to be created separately. + // this example is just showing the usage of "MongoCluster_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -201,7 +201,7 @@ public async Task Update_UpdatesAMongoClusterResource() ServerVersion = "5.0", PublicNetworkAccess = MongoClusterPublicNetworkAccess.Enabled, HighAvailabilityTargetMode = HighAvailabilityMode.SameZone, - StorageSizeGb = 256, + StorageSizeGb = 256L, ShardingShardCount = 4, ComputeTier = "M50", PreviewFeatures = @@ -225,7 +225,7 @@ public async Task Update_UpdatesAMongoClusterResource() public async Task Delete_DeletesAMongoClusterResource() { // Generated from example definition: 2024-07-01/MongoClusters_Delete.json - // this example is just showing the usage of "MongoClusters_Delete" operation, for the dependent resources, they will have to be created separately. + // this example is just showing the usage of "MongoCluster_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Extensions/MockableMongoClusterResourceGroupResource.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Extensions/MockableMongoClusterResourceGroupResource.cs index 819f407ba0ad..87e8ad903dcb 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Extensions/MockableMongoClusterResourceGroupResource.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Extensions/MockableMongoClusterResourceGroupResource.cs @@ -49,7 +49,7 @@ public virtual MongoClusterCollection GetMongoClusters() /// /// /// Operation Id - /// MongoClusters_Get + /// MongoCluster_Get /// /// /// Default Api Version @@ -80,7 +80,7 @@ public virtual async Task> GetMongoClusterAsync(s /// /// /// Operation Id - /// MongoClusters_Get + /// MongoCluster_Get /// /// /// Default Api Version diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Extensions/MongoClusterExtensions.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Extensions/MongoClusterExtensions.cs index b949261d5d56..ee4d0e4ffd35 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Extensions/MongoClusterExtensions.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Extensions/MongoClusterExtensions.cs @@ -116,7 +116,7 @@ public static MongoClusterCollection GetMongoClusters(this ResourceGroupResource /// /// /// Operation Id - /// MongoClusters_Get + /// MongoCluster_Get /// /// /// Default Api Version @@ -154,7 +154,7 @@ public static async Task> GetMongoClusterAsync(th /// /// /// Operation Id - /// MongoClusters_Get + /// MongoCluster_Get /// /// /// Default Api Version diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/BackupProperties.Serialization.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/BackupProperties.Serialization.cs index 5cad177f5f6e..a524a64fc358 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/BackupProperties.Serialization.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/BackupProperties.Serialization.cs @@ -18,6 +18,15 @@ internal partial class BackupProperties : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(BackupProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(EarliestRestoreTime)) { writer.WritePropertyName("earliestRestoreTime"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } BackupProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/ComputeProperties.Serialization.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/ComputeProperties.Serialization.cs index 6a8ee6187473..b6d5ca86c9fd 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/ComputeProperties.Serialization.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/ComputeProperties.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ComputeProperties : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(ComputeProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Tier)) { writer.WritePropertyName("tier"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } ComputeProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/FirewallRuleListResult.Serialization.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/FirewallRuleListResult.Serialization.cs index 39ed51d71adb..41f8da91d178 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/FirewallRuleListResult.Serialization.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/FirewallRuleListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class FirewallRuleListResult : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(FirewallRuleListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } FirewallRuleListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/HighAvailabilityProperties.Serialization.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/HighAvailabilityProperties.Serialization.cs index 823c21c9d442..e85d32d4ce18 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/HighAvailabilityProperties.Serialization.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/HighAvailabilityProperties.Serialization.cs @@ -18,6 +18,15 @@ internal partial class HighAvailabilityProperties : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(HighAvailabilityProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(TargetMode)) { writer.WritePropertyName("targetMode"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } HighAvailabilityProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterAdministratorProperties.Serialization.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterAdministratorProperties.Serialization.cs index 015b3f293a5c..892256fb8aa7 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterAdministratorProperties.Serialization.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterAdministratorProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class MongoClusterAdministratorProperties : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(MongoClusterAdministratorProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(UserName)) { writer.WritePropertyName("userName"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } MongoClusterAdministratorProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterConnectionString.Serialization.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterConnectionString.Serialization.cs index f9bbe3bb0fc0..e907a5057d53 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterConnectionString.Serialization.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterConnectionString.Serialization.cs @@ -18,6 +18,15 @@ public partial class MongoClusterConnectionString : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(MongoClusterConnectionString)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Uri)) { writer.WritePropertyName("connectionString"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } MongoClusterConnectionString IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterConnectionStringsResult.Serialization.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterConnectionStringsResult.Serialization.cs index eaa4f7188267..6f5054627eab 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterConnectionStringsResult.Serialization.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterConnectionStringsResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class MongoClusterConnectionStringsResult : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(MongoClusterConnectionStringsResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(ConnectionStrings)) { writer.WritePropertyName("connectionStrings"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } MongoClusterConnectionStringsResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterFirewallRuleProperties.Serialization.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterFirewallRuleProperties.Serialization.cs index 4b4a9eac1af1..b0088571fd02 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterFirewallRuleProperties.Serialization.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterFirewallRuleProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class MongoClusterFirewallRuleProperties : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(MongoClusterFirewallRuleProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) { writer.WritePropertyName("provisioningState"u8); @@ -50,7 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } MongoClusterFirewallRuleProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterListResult.Serialization.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterListResult.Serialization.cs index cf3ea8e0c777..bb902ce5d921 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterListResult.Serialization.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class MongoClusterListResult : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(MongoClusterListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } MongoClusterListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterNameAvailabilityContent.Serialization.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterNameAvailabilityContent.Serialization.cs index 2644176b0fee..1ffecee7c7de 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterNameAvailabilityContent.Serialization.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterNameAvailabilityContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class MongoClusterNameAvailabilityContent : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(MongoClusterNameAvailabilityContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } MongoClusterNameAvailabilityContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterNameAvailabilityResult.Serialization.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterNameAvailabilityResult.Serialization.cs index ed9cad52f9b3..22a108d595e1 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterNameAvailabilityResult.Serialization.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterNameAvailabilityResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class MongoClusterNameAvailabilityResult : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(MongoClusterNameAvailabilityResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IsNameAvailable)) { writer.WritePropertyName("nameAvailable"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } MongoClusterNameAvailabilityResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterPatch.Serialization.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterPatch.Serialization.cs index 927be2be32cd..893f438810b1 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterPatch.Serialization.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterPatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class MongoClusterPatch : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(MongoClusterPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } MongoClusterPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterPrivateEndpointConnection.Serialization.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterPrivateEndpointConnection.Serialization.cs index f7ab05b01489..28f6c2492bf2 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterPrivateEndpointConnection.Serialization.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterPrivateEndpointConnection.Serialization.cs @@ -19,6 +19,15 @@ public partial class MongoClusterPrivateEndpointConnection : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,48 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(MongoClusterPrivateEndpointConnection)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); writer.WriteObjectValue(Properties, options); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } MongoClusterPrivateEndpointConnection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterPrivateEndpointConnectionProperties.Serialization.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterPrivateEndpointConnectionProperties.Serialization.cs index 4b32315b2ded..3a53f3099848 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterPrivateEndpointConnectionProperties.Serialization.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterPrivateEndpointConnectionProperties.Serialization.cs @@ -19,6 +19,15 @@ public partial class MongoClusterPrivateEndpointConnectionProperties : IUtf8Json void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonW throw new FormatException($"The model {nameof(MongoClusterPrivateEndpointConnectionProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(GroupIds)) { writer.WritePropertyName("groupIds"u8); @@ -64,7 +72,6 @@ void IJsonModel.Write(Utf8JsonW #endif } } - writer.WriteEndObject(); } MongoClusterPrivateEndpointConnectionProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterPrivateLinkResourceData.Serialization.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterPrivateLinkResourceData.Serialization.cs index 671cf30064e3..5df82f3e581b 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterPrivateLinkResourceData.Serialization.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterPrivateLinkResourceData.Serialization.cs @@ -19,6 +19,15 @@ public partial class MongoClusterPrivateLinkResourceData : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,48 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(MongoClusterPrivateLinkResourceData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); writer.WriteObjectValue(Properties, options); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } MongoClusterPrivateLinkResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterPrivateLinkResourceListResult.Serialization.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterPrivateLinkResourceListResult.Serialization.cs index debe43ec3523..90b386faf441 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterPrivateLinkResourceListResult.Serialization.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterPrivateLinkResourceListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class MongoClusterPrivateLinkResourceListResult : IUtf8JsonSeri void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(MongoClusterPrivateLinkResourceListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } MongoClusterPrivateLinkResourceListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterPrivateLinkResourceProperties.Serialization.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterPrivateLinkResourceProperties.Serialization.cs index 6670ff76a7f4..8da9ee934890 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterPrivateLinkResourceProperties.Serialization.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterPrivateLinkResourceProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class MongoClusterPrivateLinkResourceProperties : IUtf8JsonSerial void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(MongoClusterPrivateLinkResourceProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(GroupId)) { writer.WritePropertyName("groupId"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } MongoClusterPrivateLinkResourceProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterPrivateLinkServiceConnectionState.Serialization.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterPrivateLinkServiceConnectionState.Serialization.cs index 7b4b3ac16911..b6d527be7ced 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterPrivateLinkServiceConnectionState.Serialization.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterPrivateLinkServiceConnectionState.Serialization.cs @@ -18,6 +18,15 @@ public partial class MongoClusterPrivateLinkServiceConnectionState : IUtf8JsonSe void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWri throw new FormatException($"The model {nameof(MongoClusterPrivateLinkServiceConnectionState)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Status)) { writer.WritePropertyName("status"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWri #endif } } - writer.WriteEndObject(); } MongoClusterPrivateLinkServiceConnectionState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterProperties.Serialization.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterProperties.Serialization.cs index 6880346345df..c1ab76b6b8b5 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterProperties.Serialization.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class MongoClusterProperties : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(MongoClusterProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(CreateMode)) { writer.WritePropertyName("createMode"u8); @@ -141,7 +149,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } MongoClusterProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterReplica.Serialization.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterReplica.Serialization.cs index 23db72c11d7d..4802a8c95cf6 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterReplica.Serialization.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterReplica.Serialization.cs @@ -19,6 +19,15 @@ public partial class MongoClusterReplica : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,48 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(MongoClusterReplica)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); writer.WriteObjectValue(Properties, options); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } MongoClusterReplica IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterReplicaContent.Serialization.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterReplicaContent.Serialization.cs index a95cb15d3fd0..004bd6d0cad7 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterReplicaContent.Serialization.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterReplicaContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class MongoClusterReplicaContent : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(MongoClusterReplicaContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("sourceResourceId"u8); writer.WriteStringValue(SourceResourceId); writer.WritePropertyName("sourceLocation"u8); @@ -45,7 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } MongoClusterReplicaContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterReplicationProperties.Serialization.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterReplicationProperties.Serialization.cs index d749aa1d8d5f..9b4ad2e23140 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterReplicationProperties.Serialization.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterReplicationProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class MongoClusterReplicationProperties : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(MongoClusterReplicationProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(SourceResourceId)) { writer.WritePropertyName("sourceResourceId"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } MongoClusterReplicationProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterRestoreContent.Serialization.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterRestoreContent.Serialization.cs index 3d028e243842..f9c859d43afc 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterRestoreContent.Serialization.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterRestoreContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class MongoClusterRestoreContent : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(MongoClusterRestoreContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(PointInTimeUTC)) { writer.WritePropertyName("pointInTimeUTC"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } MongoClusterRestoreContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterUpdateProperties.Serialization.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterUpdateProperties.Serialization.cs index 9cccac547917..f2db8c5c6527 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterUpdateProperties.Serialization.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterUpdateProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class MongoClusterUpdateProperties : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(MongoClusterUpdateProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Administrator)) { writer.WritePropertyName("administrator"u8); @@ -91,7 +99,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } MongoClusterUpdateProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/PrivateEndpointConnectionResourceListResult.Serialization.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/PrivateEndpointConnectionResourceListResult.Serialization.cs index 6d396a4e0299..9224ece6a0e3 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/PrivateEndpointConnectionResourceListResult.Serialization.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/PrivateEndpointConnectionResourceListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class PrivateEndpointConnectionResourceListResult : IUtf8JsonSe void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWrite throw new FormatException($"The model {nameof(PrivateEndpointConnectionResourceListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWrite #endif } } - writer.WriteEndObject(); } PrivateEndpointConnectionResourceListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/PromoteReplicaContent.Serialization.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/PromoteReplicaContent.Serialization.cs index c827c747bdc5..f98aa500b1d2 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/PromoteReplicaContent.Serialization.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/PromoteReplicaContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class PromoteReplicaContent : IUtf8JsonSerializable, IJsonModel

((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(PromoteReplicaContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("promoteOption"u8); writer.WriteStringValue(PromoteOption.ToString()); if (Optional.IsDefined(Mode)) @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } PromoteReplicaContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/ReplicaListResult.Serialization.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/ReplicaListResult.Serialization.cs index 810e3a5d6771..b0a923a304ba 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/ReplicaListResult.Serialization.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/ReplicaListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ReplicaListResult : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(ReplicaListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } ReplicaListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/ShardingProperties.Serialization.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/ShardingProperties.Serialization.cs index 54a278209f61..535eb8aacad3 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/ShardingProperties.Serialization.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/ShardingProperties.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ShardingProperties : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ShardingProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ShardCount)) { writer.WritePropertyName("shardCount"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } ShardingProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/StorageProperties.Serialization.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/StorageProperties.Serialization.cs index 78062fb8776a..6c8dd218b807 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/StorageProperties.Serialization.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/StorageProperties.Serialization.cs @@ -18,6 +18,15 @@ internal partial class StorageProperties : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(StorageProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(SizeGb)) { writer.WritePropertyName("sizeGb"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } StorageProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/MongoClusterCollection.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/MongoClusterCollection.cs index 7defedaf3f54..c8d9efdce71d 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/MongoClusterCollection.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/MongoClusterCollection.cs @@ -61,7 +61,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id - /// MongoClusters_CreateOrUpdate + /// MongoCluster_CreateOrUpdate /// /// /// Default Api Version @@ -110,7 +110,7 @@ public virtual async Task> CreateOrUpdateAsyn /// /// /// Operation Id - /// MongoClusters_CreateOrUpdate + /// MongoCluster_CreateOrUpdate /// /// /// Default Api Version @@ -159,7 +159,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitU /// /// /// Operation Id - /// MongoClusters_Get + /// MongoCluster_Get /// /// /// Default Api Version @@ -204,7 +204,7 @@ public virtual async Task> GetAsync(string mongoC /// /// /// Operation Id - /// MongoClusters_Get + /// MongoCluster_Get /// /// /// Default Api Version @@ -309,7 +309,7 @@ public virtual Pageable GetAll(CancellationToken cancellat /// /// /// Operation Id - /// MongoClusters_Get + /// MongoCluster_Get /// /// /// Default Api Version @@ -352,7 +352,7 @@ public virtual async Task> ExistsAsync(string mongoClusterName, C /// /// /// Operation Id - /// MongoClusters_Get + /// MongoCluster_Get /// /// /// Default Api Version @@ -395,7 +395,7 @@ public virtual Response Exists(string mongoClusterName, CancellationToken /// /// /// Operation Id - /// MongoClusters_Get + /// MongoCluster_Get /// /// /// Default Api Version @@ -440,7 +440,7 @@ public virtual async Task> GetIfExistsAsy /// /// /// Operation Id - /// MongoClusters_Get + /// MongoCluster_Get /// /// /// Default Api Version diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/MongoClusterData.Serialization.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/MongoClusterData.Serialization.cs index 63eba6944bf5..958689ba2f7e 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/MongoClusterData.Serialization.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/MongoClusterData.Serialization.cs @@ -20,6 +20,15 @@ public partial class MongoClusterData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,61 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(MongoClusterData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); writer.WriteObjectValue(Properties, options); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } MongoClusterData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/MongoClusterFirewallRuleCollection.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/MongoClusterFirewallRuleCollection.cs index 8a92f5b49294..941f285a6a0f 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/MongoClusterFirewallRuleCollection.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/MongoClusterFirewallRuleCollection.cs @@ -60,7 +60,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id - /// FirewallRules_CreateOrUpdate + /// FirewallRule_CreateOrUpdate /// /// /// Default Api Version @@ -109,7 +109,7 @@ public virtual async Task> Create /// /// /// Operation Id - /// FirewallRules_CreateOrUpdate + /// FirewallRule_CreateOrUpdate /// /// /// Default Api Version @@ -158,7 +158,7 @@ public virtual ArmOperation CreateOrUpdate(Wai /// /// /// Operation Id - /// FirewallRules_Get + /// FirewallRule_Get /// /// /// Default Api Version @@ -203,7 +203,7 @@ public virtual async Task> GetAsync(s /// /// /// Operation Id - /// FirewallRules_Get + /// FirewallRule_Get /// /// /// Default Api Version @@ -308,7 +308,7 @@ public virtual Pageable GetAll(CancellationTok /// /// /// Operation Id - /// FirewallRules_Get + /// FirewallRule_Get /// /// /// Default Api Version @@ -351,7 +351,7 @@ public virtual async Task> ExistsAsync(string firewallRuleName, C /// /// /// Operation Id - /// FirewallRules_Get + /// FirewallRule_Get /// /// /// Default Api Version @@ -394,7 +394,7 @@ public virtual Response Exists(string firewallRuleName, CancellationToken /// /// /// Operation Id - /// FirewallRules_Get + /// FirewallRule_Get /// /// /// Default Api Version @@ -439,7 +439,7 @@ public virtual async Task> Ge /// /// /// Operation Id - /// FirewallRules_Get + /// FirewallRule_Get /// /// /// Default Api Version diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/MongoClusterFirewallRuleData.Serialization.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/MongoClusterFirewallRuleData.Serialization.cs index d773ef25a78e..9f69912197b1 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/MongoClusterFirewallRuleData.Serialization.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/MongoClusterFirewallRuleData.Serialization.cs @@ -20,6 +20,15 @@ public partial class MongoClusterFirewallRuleData : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,48 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(MongoClusterFirewallRuleData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); writer.WriteObjectValue(Properties, options); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } MongoClusterFirewallRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/MongoClusterFirewallRuleResource.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/MongoClusterFirewallRuleResource.cs index fc9a3ad412d3..fd29a6f95f8d 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/MongoClusterFirewallRuleResource.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/MongoClusterFirewallRuleResource.cs @@ -97,7 +97,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id - /// FirewallRules_Get + /// FirewallRule_Get /// /// /// Default Api Version @@ -137,7 +137,7 @@ public virtual async Task> GetAsync(C /// /// /// Operation Id - /// FirewallRules_Get + /// FirewallRule_Get /// /// /// Default Api Version @@ -177,7 +177,7 @@ public virtual Response Get(CancellationToken /// /// /// Operation Id - /// FirewallRules_Delete + /// FirewallRule_Delete /// /// /// Default Api Version @@ -219,7 +219,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Operation Id - /// FirewallRules_Delete + /// FirewallRule_Delete /// /// /// Default Api Version @@ -261,7 +261,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Operation Id - /// FirewallRules_CreateOrUpdate + /// FirewallRule_CreateOrUpdate /// /// /// Default Api Version @@ -307,7 +307,7 @@ public virtual async Task> Update /// /// /// Operation Id - /// FirewallRules_CreateOrUpdate + /// FirewallRule_CreateOrUpdate /// /// /// Default Api Version diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/MongoClusterPrivateEndpointConnectionResource.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/MongoClusterPrivateEndpointConnectionResource.cs index c9910d25a0e3..07c1a1c07d42 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/MongoClusterPrivateEndpointConnectionResource.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/MongoClusterPrivateEndpointConnectionResource.cs @@ -97,7 +97,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id - /// PrivateEndpointConnections_Get + /// PrivateEndpointConnectionResource_Get /// /// /// Default Api Version @@ -137,7 +137,7 @@ public virtual async Task /// /// Operation Id - /// PrivateEndpointConnections_Get + /// PrivateEndpointConnectionResource_Get /// /// /// Default Api Version @@ -177,7 +177,7 @@ public virtual Response Get(Cance /// /// /// Operation Id - /// PrivateEndpointConnections_Delete + /// PrivateEndpointConnectionResource_Delete /// /// /// Default Api Version @@ -219,7 +219,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Operation Id - /// PrivateEndpointConnections_Delete + /// PrivateEndpointConnectionResource_Delete /// /// /// Default Api Version @@ -261,7 +261,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Operation Id - /// PrivateEndpointConnections_Create + /// PrivateEndpointConnectionResource_Create /// /// /// Default Api Version @@ -307,7 +307,7 @@ public virtual async Task /// /// Operation Id - /// PrivateEndpointConnections_Create + /// PrivateEndpointConnectionResource_Create /// /// /// Default Api Version diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/MongoClusterPrivateEndpointConnectionResourceCollection.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/MongoClusterPrivateEndpointConnectionResourceCollection.cs index 46ce268a15ce..8136ff74d1d0 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/MongoClusterPrivateEndpointConnectionResourceCollection.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/MongoClusterPrivateEndpointConnectionResourceCollection.cs @@ -60,7 +60,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id - /// PrivateEndpointConnections_Create + /// PrivateEndpointConnectionResource_Create /// /// /// Default Api Version @@ -109,7 +109,7 @@ public virtual async Task /// /// Operation Id - /// PrivateEndpointConnections_Create + /// PrivateEndpointConnectionResource_Create /// /// /// Default Api Version @@ -158,7 +158,7 @@ public virtual ArmOperation Creat /// /// /// Operation Id - /// PrivateEndpointConnections_Get + /// PrivateEndpointConnectionResource_Get /// /// /// Default Api Version @@ -203,7 +203,7 @@ public virtual async Task /// /// Operation Id - /// PrivateEndpointConnections_Get + /// PrivateEndpointConnectionResource_Get /// /// /// Default Api Version @@ -308,7 +308,7 @@ public virtual Pageable GetAll(Ca /// /// /// Operation Id - /// PrivateEndpointConnections_Get + /// PrivateEndpointConnectionResource_Get /// /// /// Default Api Version @@ -351,7 +351,7 @@ public virtual async Task> ExistsAsync(string privateEndpointConn /// /// /// Operation Id - /// PrivateEndpointConnections_Get + /// PrivateEndpointConnectionResource_Get /// /// /// Default Api Version @@ -394,7 +394,7 @@ public virtual Response Exists(string privateEndpointConnectionName, Cance /// /// /// Operation Id - /// PrivateEndpointConnections_Get + /// PrivateEndpointConnectionResource_Get /// /// /// Default Api Version @@ -439,7 +439,7 @@ public virtual async Task /// /// Operation Id - /// PrivateEndpointConnections_Get + /// PrivateEndpointConnectionResource_Get /// /// /// Default Api Version diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/MongoClusterPrivateEndpointConnectionResourceData.Serialization.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/MongoClusterPrivateEndpointConnectionResourceData.Serialization.cs index 61cb27935df8..70ad73fc83b9 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/MongoClusterPrivateEndpointConnectionResourceData.Serialization.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/MongoClusterPrivateEndpointConnectionResourceData.Serialization.cs @@ -20,6 +20,15 @@ public partial class MongoClusterPrivateEndpointConnectionResourceData : IUtf8Js void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,48 +36,12 @@ void IJsonModel.Write(Utf8Jso throw new FormatException($"The model {nameof(MongoClusterPrivateEndpointConnectionResourceData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); writer.WriteObjectValue(Properties, options); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } MongoClusterPrivateEndpointConnectionResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/MongoClusterResource.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/MongoClusterResource.cs index 40b54769888f..6804c462bb87 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/MongoClusterResource.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/MongoClusterResource.cs @@ -115,7 +115,7 @@ public virtual MongoClusterFirewallRuleCollection GetMongoClusterFirewallRules() /// /// /// Operation Id - /// FirewallRules_Get + /// FirewallRule_Get /// /// /// Default Api Version @@ -146,7 +146,7 @@ public virtual async Task> GetMongoCl /// /// /// Operation Id - /// FirewallRules_Get + /// FirewallRule_Get /// /// /// Default Api Version @@ -184,7 +184,7 @@ public virtual MongoClusterPrivateEndpointConnectionResourceCollection GetMongoC /// /// /// Operation Id - /// PrivateEndpointConnections_Get + /// PrivateEndpointConnectionResource_Get /// /// /// Default Api Version @@ -215,7 +215,7 @@ public virtual async Task /// /// Operation Id - /// PrivateEndpointConnections_Get + /// PrivateEndpointConnectionResource_Get /// /// /// Default Api Version @@ -246,7 +246,7 @@ public virtual Response GetMongoC /// /// /// Operation Id - /// MongoClusters_Get + /// MongoCluster_Get /// /// /// Default Api Version @@ -286,7 +286,7 @@ public virtual async Task> GetAsync(CancellationT /// /// /// Operation Id - /// MongoClusters_Get + /// MongoCluster_Get /// /// /// Default Api Version @@ -326,7 +326,7 @@ public virtual Response Get(CancellationToken cancellation /// /// /// Operation Id - /// MongoClusters_Delete + /// MongoCluster_Delete /// /// /// Default Api Version @@ -368,7 +368,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Operation Id - /// MongoClusters_Delete + /// MongoCluster_Delete /// /// /// Default Api Version @@ -410,7 +410,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Operation Id - /// MongoClusters_Update + /// MongoCluster_Update /// /// /// Default Api Version @@ -456,7 +456,7 @@ public virtual async Task> UpdateAsync(WaitUn /// /// /// Operation Id - /// MongoClusters_Update + /// MongoCluster_Update /// /// /// Default Api Version @@ -774,7 +774,7 @@ public virtual Pageable GetReplicasByParent(CancellationTok /// /// /// Operation Id - /// MongoClusters_Get + /// MongoCluster_Get /// /// /// Default Api Version @@ -836,7 +836,7 @@ public virtual async Task> AddTagAsync(string key /// /// /// Operation Id - /// MongoClusters_Get + /// MongoCluster_Get /// /// /// Default Api Version @@ -898,7 +898,7 @@ public virtual Response AddTag(string key, string value, C /// /// /// Operation Id - /// MongoClusters_Get + /// MongoCluster_Get /// /// /// Default Api Version @@ -955,7 +955,7 @@ public virtual async Task> SetTagsAsync(IDictiona /// /// /// Operation Id - /// MongoClusters_Get + /// MongoCluster_Get /// /// /// Default Api Version @@ -1012,7 +1012,7 @@ public virtual Response SetTags(IDictionary /// /// Operation Id - /// MongoClusters_Get + /// MongoCluster_Get /// /// /// Default Api Version @@ -1072,7 +1072,7 @@ public virtual async Task> RemoveTagAsync(string /// /// /// Operation Id - /// MongoClusters_Get + /// MongoCluster_Get /// /// /// Default Api Version diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/RestOperations/FirewallRulesRestOperations.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/RestOperations/FirewallRulesRestOperations.cs index f9ee18d73422..bf20b85c4206 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/RestOperations/FirewallRulesRestOperations.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/RestOperations/FirewallRulesRestOperations.cs @@ -25,7 +25,7 @@ internal partial class FirewallRulesRestOperations ///

Initializes a new instance of FirewallRulesRestOperations. /// The HTTP pipeline for sending and receiving REST requests and responses. /// The application id to use for user agent. - /// The to use. + /// Service host. /// The API version to use for this operation. /// or is null. public FirewallRulesRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/RestOperations/MongoClustersRestOperations.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/RestOperations/MongoClustersRestOperations.cs index 62ae2c1a7336..db09b8aa6411 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/RestOperations/MongoClustersRestOperations.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/RestOperations/MongoClustersRestOperations.cs @@ -25,7 +25,7 @@ internal partial class MongoClustersRestOperations /// Initializes a new instance of MongoClustersRestOperations. /// The HTTP pipeline for sending and receiving REST requests and responses. /// The application id to use for user agent. - /// The to use. + /// Service host. /// The API version to use for this operation. /// or is null. public MongoClustersRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs index 00b1a1ed77b9..f6170a8230f9 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs @@ -25,7 +25,7 @@ internal partial class PrivateEndpointConnectionsRestOperations /// Initializes a new instance of PrivateEndpointConnectionsRestOperations. /// The HTTP pipeline for sending and receiving REST requests and responses. /// The application id to use for user agent. - /// The to use. + /// Service host. /// The API version to use for this operation. /// or is null. public PrivateEndpointConnectionsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/RestOperations/PrivateLinksRestOperations.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/RestOperations/PrivateLinksRestOperations.cs index 991e2225f529..1f471b6e3234 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/RestOperations/PrivateLinksRestOperations.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/RestOperations/PrivateLinksRestOperations.cs @@ -25,7 +25,7 @@ internal partial class PrivateLinksRestOperations /// Initializes a new instance of PrivateLinksRestOperations. /// The HTTP pipeline for sending and receiving REST requests and responses. /// The application id to use for user agent. - /// The to use. + /// Service host. /// The API version to use for this operation. /// or is null. public PrivateLinksRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/RestOperations/ReplicasRestOperations.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/RestOperations/ReplicasRestOperations.cs index 1041feac7f87..79337d42e173 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/RestOperations/ReplicasRestOperations.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/RestOperations/ReplicasRestOperations.cs @@ -25,7 +25,7 @@ internal partial class ReplicasRestOperations /// Initializes a new instance of ReplicasRestOperations. /// The HTTP pipeline for sending and receiving REST requests and responses. /// The application id to use for user agent. - /// The to use. + /// Service host. /// The API version to use for this operation. /// or is null. public ReplicasRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/tsp-location.yaml b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/tsp-location.yaml index 987ea6420462..95a1e28c447e 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/tsp-location.yaml +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/tsp-location.yaml @@ -1,3 +1,3 @@ directory: specification\mongocluster\DocumentDB.MongoCluster.Management -commit: 019e40050a0477d1b973ae91e0be68c96bcf3cce +commit: 9ce76c4f113368361dac4de5d0a71eb058602756 repo: Azure/azure-rest-api-specs \ No newline at end of file diff --git a/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/CHANGELOG.md b/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/CHANGELOG.md index 00059aa11ba7..345edc891f42 100644 --- a/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/CHANGELOG.md +++ b/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 1.3.0-beta.2 (Unreleased) +## 1.3.0-beta.3 (Unreleased) ### Features Added @@ -8,6 +8,12 @@ ### Bugs Fixed +### Other Changes + +## 1.3.0-beta.2 (2024-10-11) + +### Bugs Fixed + * Fixed an issue where `APPLICATIONINSIGHTS_CONNECTION_STRING` was not read from `IConfiguration` when using the `UseAzureMonitor` overload with the `Action` parameter. If the connection string is not set @@ -21,6 +27,9 @@ * Fixed a bug in LiveMetrics that counted all manually created Dependencies as failures. ([#45103](https://github.com/Azure/azure-sdk-for-net/pull/45103)) +* Fixed a bug in LiveMetrics that caused incorrect counts for telemetry. + ([#46429](https://github.com/Azure/azure-sdk-for-net/pull/46429)) + ### Other Changes * Updated the code of vendored resource detector library `OpenTelemetry.Resources.Azure` from the OpenTelemetry .NET contrib repository. diff --git a/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/src/Azure.Monitor.OpenTelemetry.AspNetCore.csproj b/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/src/Azure.Monitor.OpenTelemetry.AspNetCore.csproj index 63fdcce8a34d..c2199ac068a6 100644 --- a/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/src/Azure.Monitor.OpenTelemetry.AspNetCore.csproj +++ b/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/src/Azure.Monitor.OpenTelemetry.AspNetCore.csproj @@ -1,8 +1,8 @@ - + An OpenTelemetry .NET distro that exports to Azure Monitor AzureMonitor OpenTelemetry ASP.NET Core Distro - 1.3.0-beta.2 + 1.3.0-beta.3 1.2.0 Azure Monitor OpenTelemetry Exporter Distro ApplicationInsights @@ -23,10 +23,10 @@ - + - + diff --git a/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/src/LiveMetrics/DataCollection/DocumentBuffer.cs b/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/src/LiveMetrics/DataCollection/DocumentBuffer.cs deleted file mode 100644 index 6b05d32251e6..000000000000 --- a/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/src/LiveMetrics/DataCollection/DocumentBuffer.cs +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System.Collections.Concurrent; -using Azure.Monitor.OpenTelemetry.AspNetCore.Models; - -namespace Azure.Monitor.OpenTelemetry.AspNetCore.LiveMetrics.DataCollection -{ - /// - /// Manages a thread-safe collection of DocumentIngress objects with a fixed capacity. - /// - internal class DocumentBuffer - { - private readonly ConcurrentQueue _documents = new(); - private readonly int _capacity = 20; - // ConcurrentQueue.Count is not used because it is not an O(1) operation. Instead, we use a separate counter. - // Atomic counter for the number of documents in the queue. - private int _count = 0; - - public void Add(DocumentIngress document) - { - // Ensure the queue does not exceed capacity. - if (Interlocked.CompareExchange(ref _count, 0, 0) < _capacity) - { - _documents.Enqueue(document); - Interlocked.Increment(ref _count); - } - else - { - AzureMonitorAspNetCoreEventSource.Log.DroppedDocument(documentType: document.DocumentType); - } - } - - public IEnumerable ReadAllAndClear() - { - // There is no need to decrement the count since we are clearing the queue. After this operation, the instance will not be used anymore. - // The method 'Add' is not called while this method is running; therefore, the count will remain unchanged. - while (_documents.TryDequeue(out DocumentIngress? item)) - { - yield return item; - } - } - } -} diff --git a/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/src/LiveMetrics/DataCollection/DoubleBuffer.cs b/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/src/LiveMetrics/DataCollection/DoubleBuffer.cs index 9b91dae14f40..e14202d6a57a 100644 --- a/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/src/LiveMetrics/DataCollection/DoubleBuffer.cs +++ b/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/src/LiveMetrics/DataCollection/DoubleBuffer.cs @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. +using System.Collections.Concurrent; using Azure.Monitor.OpenTelemetry.AspNetCore.Models; namespace Azure.Monitor.OpenTelemetry.AspNetCore.LiveMetrics.DataCollection @@ -14,17 +15,17 @@ namespace Azure.Monitor.OpenTelemetry.AspNetCore.LiveMetrics.DataCollection ///
internal class DoubleBuffer { - private DocumentBuffer _currentBuffer = new(); + private ConcurrentQueue _currentBuffer = new(); public void WriteDocument(DocumentIngress document) { - _currentBuffer.Add(document); + _currentBuffer.Enqueue(document); } - public DocumentBuffer FlipDocumentBuffers() + public ConcurrentQueue FlipDocumentBuffers() { // Atomically exchange the current buffer with a new empty buffer and return the old buffer - return Interlocked.Exchange(ref _currentBuffer, new DocumentBuffer()); + return Interlocked.Exchange(ref _currentBuffer, new ConcurrentQueue()); } } } diff --git a/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/src/LiveMetrics/Manager.Metrics.cs b/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/src/LiveMetrics/Manager.Metrics.cs index 628769a1cc32..c899948373f9 100644 --- a/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/src/LiveMetrics/Manager.Metrics.cs +++ b/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/src/LiveMetrics/Manager.Metrics.cs @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. +using System.Collections.Concurrent; using Azure.Monitor.OpenTelemetry.AspNetCore.LiveMetrics; using Azure.Monitor.OpenTelemetry.AspNetCore.LiveMetrics.DataCollection; using Azure.Monitor.OpenTelemetry.AspNetCore.LiveMetrics.Filtering; @@ -45,9 +46,10 @@ public MonitoringDataPoint GetDataPoint() string projectionError = string.Empty; Dictionary metricAccumulators = CreateMetricAccumulators(_collectionConfiguration); LiveMetricsBuffer liveMetricsBuffer = new(); - DocumentBuffer filledBuffer = _documentBuffer.FlipDocumentBuffers(); IEnumerable documentStreams = _collectionConfiguration.DocumentStreams; - foreach (var item in filledBuffer.ReadAllAndClear()) + + ConcurrentQueue filledBuffer = _documentBuffer.FlipDocumentBuffers(); + while (filledBuffer.TryDequeue(out DocumentIngress? item)) { bool matchesDocumentStreamFilter = false; diff --git a/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/CHANGELOG.md b/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/CHANGELOG.md index 3130afe2f57c..7d0c08c67eec 100644 --- a/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/CHANGELOG.md +++ b/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 1.4.0-beta.2 (Unreleased) +## 1.4.0-beta.3 (Unreleased) ### Features Added @@ -8,13 +8,17 @@ ### Bugs Fixed +### Other Changes + +## 1.4.0-beta.2 (2024-10-11) + +### Bugs Fixed + * RPC attributes are now correctly exported to Application Insights as custom properties. ([#45316](https://github.com/Azure/azure-sdk-for-net/pull/45316)) * Fixed an issue where unmapped attributes were dropped from telemetry. ([#45909](https://github.com/Azure/azure-sdk-for-net/pull/45909)) -### Other Changes - ## 1.4.0-beta.1 (2024-07-12) ### Bugs Fixed diff --git a/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/src/Azure.Monitor.OpenTelemetry.Exporter.csproj b/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/src/Azure.Monitor.OpenTelemetry.Exporter.csproj index 0c86ed01f3d3..7f62cbf1d6f5 100644 --- a/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/src/Azure.Monitor.OpenTelemetry.Exporter.csproj +++ b/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/src/Azure.Monitor.OpenTelemetry.Exporter.csproj @@ -2,7 +2,7 @@ An OpenTelemetry .NET exporter that exports to Azure Monitor AzureMonitor OpenTelemetry Exporter - 1.4.0-beta.2 + 1.4.0-beta.3 1.3.0 Azure Monitor OpenTelemetry Exporter ApplicationInsights diff --git a/sdk/monitor/Azure.Monitor.Query/CHANGELOG.md b/sdk/monitor/Azure.Monitor.Query/CHANGELOG.md index 463fdcc85801..206c4a044a12 100644 --- a/sdk/monitor/Azure.Monitor.Query/CHANGELOG.md +++ b/sdk/monitor/Azure.Monitor.Query/CHANGELOG.md @@ -7,6 +7,7 @@ ### Breaking Changes ### Bugs Fixed +- Fix bug in 'MetricsClient' QueryResourceAsync method where the 'QueryTimeRange' parameter was incorrectly set ### Other Changes diff --git a/sdk/monitor/Azure.Monitor.Query/assets.json b/sdk/monitor/Azure.Monitor.Query/assets.json index 49e865294c1b..5f9a259c23f0 100644 --- a/sdk/monitor/Azure.Monitor.Query/assets.json +++ b/sdk/monitor/Azure.Monitor.Query/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/monitor/Azure.Monitor.Query", - "Tag": "net/monitor/Azure.Monitor.Query_2eaa6ed059" + "Tag": "net/monitor/Azure.Monitor.Query_26f5d5d32f" } diff --git a/sdk/monitor/Azure.Monitor.Query/src/MetricsClient.cs b/sdk/monitor/Azure.Monitor.Query/src/MetricsClient.cs index f2ee8d61861e..21d346f9926d 100644 --- a/sdk/monitor/Azure.Monitor.Query/src/MetricsClient.cs +++ b/sdk/monitor/Azure.Monitor.Query/src/MetricsClient.cs @@ -150,8 +150,8 @@ private async Task> ExecuteBatchAsync(IEnu { if (options.TimeRange != null) { - startTime = options.TimeRange.Value.Start.ToString(); - endTime = options.TimeRange.Value.End.ToString(); + startTime = options.TimeRange.Value.Start.ToIsoString(); + endTime = options.TimeRange.Value.End.ToIsoString(); } aggregations = MetricsClientExtensions.CommaJoin(options.Aggregations); top = options.Size; diff --git a/sdk/monitor/Azure.Monitor.Query/src/MetricsClientExtensions.cs b/sdk/monitor/Azure.Monitor.Query/src/MetricsClientExtensions.cs index 8fccf3d2448b..036cde72ee82 100644 --- a/sdk/monitor/Azure.Monitor.Query/src/MetricsClientExtensions.cs +++ b/sdk/monitor/Azure.Monitor.Query/src/MetricsClientExtensions.cs @@ -3,6 +3,7 @@ using System; using System.Collections.Generic; +using System.Globalization; using System.Linq; using System.Text; using Azure.Monitor.Query.Models; @@ -51,5 +52,20 @@ internal static IList CommaSplit(string value) => new List() : // TODO: #10600 - Verify we don't need to worry about escaping new List(value.Split(',')); + + internal static string ToIsoString(this DateTimeOffset value) + { + if (value.Offset == TimeSpan.Zero) + { + // Some Azure service required 0-offset dates to be formatted without the + // -00:00 part + const string roundtripZFormat = "yyyy-MM-ddTHH:mm:ss.fffffffZ"; + return value.ToString(roundtripZFormat, CultureInfo.InvariantCulture); + } + + return value.ToString("O", CultureInfo.InvariantCulture); + } + + internal static string ToIsoString(this DateTimeOffset? value) => value?.ToIsoString(); } } diff --git a/sdk/monitor/Azure.Monitor.Query/src/MetricsQueryResourcesOptions.cs b/sdk/monitor/Azure.Monitor.Query/src/MetricsQueryResourcesOptions.cs index a55d310390c6..9c52dff5845f 100644 --- a/sdk/monitor/Azure.Monitor.Query/src/MetricsQueryResourcesOptions.cs +++ b/sdk/monitor/Azure.Monitor.Query/src/MetricsQueryResourcesOptions.cs @@ -14,9 +14,10 @@ namespace Azure.Monitor.Query public class MetricsQueryResourcesOptions { /// - /// Gets or sets the timespan over which the metric will be queried. + /// Gets or sets the timespan over which the metric will be queried. If only the starttime is set, the endtime default becomes the current time. When the endtime is specified, the starttime is necessary as well. Duration is disregarded. /// [CodeGenMember("TimeSpan")] + // TODO: https://github.com/Azure/azure-sdk-for-net/issues/46454 public QueryTimeRange? TimeRange { get; set; } /// diff --git a/sdk/monitor/Azure.Monitor.Query/src/QueryTimeRange.cs b/sdk/monitor/Azure.Monitor.Query/src/QueryTimeRange.cs index b343b02c697d..a5b2ee3cd7f0 100644 --- a/sdk/monitor/Azure.Monitor.Query/src/QueryTimeRange.cs +++ b/sdk/monitor/Azure.Monitor.Query/src/QueryTimeRange.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.Globalization; using System.Xml; using Azure.Core; @@ -105,21 +104,8 @@ public override string ToString() internal string ToIsoString() { - string ToString(DateTimeOffset value) - { - if (value.Offset == TimeSpan.Zero) - { - // Some Azure service required 0-offset dates to be formatted without the - // -00:00 part - const string roundtripZFormat = "yyyy-MM-ddTHH:mm:ss.fffffffZ"; - return value.ToString(roundtripZFormat, CultureInfo.InvariantCulture); - } - - return value.ToString("O", CultureInfo.InvariantCulture); - } - - var startTime = Start != null ? ToString(Start.Value) : null; - var endTime = End != null ? ToString(End.Value) : null; + var startTime = Start.ToIsoString(); + var endTime = End.ToIsoString(); var duration = XmlConvert.ToString(Duration); switch (startTime, endTime, duration) diff --git a/sdk/monitor/Azure.Monitor.Query/tests/LogsQueryClientLiveTests.cs b/sdk/monitor/Azure.Monitor.Query/tests/LogsQueryClientLiveTests.cs index 8d4ee53fae1c..924268e841e3 100644 --- a/sdk/monitor/Azure.Monitor.Query/tests/LogsQueryClientLiveTests.cs +++ b/sdk/monitor/Azure.Monitor.Query/tests/LogsQueryClientLiveTests.cs @@ -707,7 +707,7 @@ public async Task CanSetServiceTimeout() // or a partial failure 200 response if (exception.Status == 200) { - StringAssert.Contains("Query cancelled by the user's request", exception.Message); + StringAssert.Contains("PartialError", exception.Message); } else { diff --git a/sdk/monitor/Azure.Monitor.Query/tests/MetricsClientLiveTests.cs b/sdk/monitor/Azure.Monitor.Query/tests/MetricsClientLiveTests.cs new file mode 100644 index 000000000000..41d8d8023450 --- /dev/null +++ b/sdk/monitor/Azure.Monitor.Query/tests/MetricsClientLiveTests.cs @@ -0,0 +1,177 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.TestFramework; +using Azure.Monitor.Query.Models; +using NUnit.Framework; + +namespace Azure.Monitor.Query.Tests +{ + public class MetricsClientLiveTests : RecordedTestBase + { + private MetricsTestData _testData; + + public MetricsClientLiveTests(bool isAsync) : base(isAsync) + { + } + + private MetricsClient CreateMetricsClient() + { + return InstrumentClient(new MetricsClient( + new Uri(TestEnvironment.ConstructMetricsClientUri()), + TestEnvironment.Credential, + InstrumentClientOptions(new MetricsClientOptions() + { + Audience = TestEnvironment.GetMetricsClientAudience() + }) + )); + } + + [SetUp] + public void SetUp() + { + _testData = new MetricsTestData(TestEnvironment, Recording.UtcNow); + } + + [RecordedTest] + public async Task MetricsQueryResourcesAsync() + { + MetricsClient client = CreateMetricsClient(); + + var resourceId = TestEnvironment.StorageAccountId; + + Response metricsResultsResponse = await client.QueryResourcesAsync( + resourceIds: new List { new ResourceIdentifier(resourceId) }, + metricNames: new List { "Ingress" }, + metricNamespace: "Microsoft.Storage/storageAccounts").ConfigureAwait(false); + + Assert.AreEqual(200, metricsResultsResponse.GetRawResponse().Status); + MetricsQueryResourcesResult metricsQueryResults = metricsResultsResponse.Value; + Assert.AreEqual(1, metricsQueryResults.Values.Count); + Assert.AreEqual(TestEnvironment.StorageAccountId + "/providers/Microsoft.Insights/metrics/Ingress", metricsQueryResults.Values[0].Metrics[0].Id); + Assert.AreEqual("Microsoft.Storage/storageAccounts", metricsQueryResults.Values[0].Namespace); + for (int i = 0; i < metricsQueryResults.Values.Count; i++) + { + foreach (MetricResult value in metricsQueryResults.Values[i].Metrics) + { + for (int j = 0; j < value.TimeSeries.Count; j++) + { + Assert.GreaterOrEqual(value.TimeSeries[j].Values[i].Total, 0); + } + } + } + } + + [RecordedTest] + public async Task MetricsQueryResourcesWithStartEndTimeRangeAsync() + { + MetricsClient client = CreateMetricsClient(); + + var resourceId = TestEnvironment.StorageAccountId; + + var timeRange = new QueryTimeRange( + start: Recording.UtcNow.Subtract(TimeSpan.FromHours(4)), + end: Recording.UtcNow + ); + + Response metricsResultsResponse = await client.QueryResourcesAsync( + resourceIds: new List { new ResourceIdentifier(resourceId) }, + metricNames: new List { "Ingress" }, + metricNamespace: "Microsoft.Storage/storageAccounts", + options: new MetricsQueryResourcesOptions { TimeRange = timeRange} ).ConfigureAwait(false); + + Assert.AreEqual(200, metricsResultsResponse.GetRawResponse().Status); + MetricsQueryResourcesResult metricsQueryResults = metricsResultsResponse.Value; + Assert.AreEqual(1, metricsQueryResults.Values.Count); + Assert.AreEqual(TestEnvironment.StorageAccountId + "/providers/Microsoft.Insights/metrics/Ingress", metricsQueryResults.Values[0].Metrics[0].Id); + Assert.AreEqual("Microsoft.Storage/storageAccounts", metricsQueryResults.Values[0].Namespace); + } + + [RecordedTest] + public async Task MetricsQueryResourcesWithStartDurationTimeRangeAsync() + { + MetricsClient client = CreateMetricsClient(); + + var resourceId = TestEnvironment.StorageAccountId; + + var timeRange = new QueryTimeRange( + start: Recording.UtcNow.Subtract(TimeSpan.FromHours(4)), + duration: TimeSpan.FromHours(4) + ); + + Response metricsResultsResponse = await client.QueryResourcesAsync( + resourceIds: new List { new ResourceIdentifier(resourceId) }, + metricNames: new List { "Ingress" }, + metricNamespace: "Microsoft.Storage/storageAccounts", + options: new MetricsQueryResourcesOptions { TimeRange = timeRange }).ConfigureAwait(false); + + Assert.AreEqual(200, metricsResultsResponse.GetRawResponse().Status); + MetricsQueryResourcesResult metricsQueryResults = metricsResultsResponse.Value; + Assert.AreEqual(1, metricsQueryResults.Values.Count); + Assert.AreEqual(TestEnvironment.StorageAccountId + "/providers/Microsoft.Insights/metrics/Ingress", metricsQueryResults.Values[0].Metrics[0].Id); + Assert.AreEqual("Microsoft.Storage/storageAccounts", metricsQueryResults.Values[0].Namespace); + } + + [RecordedTest] + [SyncOnly] + public void MetricsQueryResourcesWithEndDurationTimeRange() + { + MetricsClient client = CreateMetricsClient(); + + var resourceId = TestEnvironment.StorageAccountId; + + var timeRange = new QueryTimeRange( + end: Recording.UtcNow, + duration: TimeSpan.FromHours(4) + ); + + Assert.Throws(() => + client.QueryResources( + resourceIds: new List { new ResourceIdentifier(resourceId) }, + metricNames: new List { "Ingress" }, + metricNamespace: "Microsoft.Storage/storageAccounts", + options: new MetricsQueryResourcesOptions { TimeRange = timeRange })); + } + + [RecordedTest] + public async Task MetricsQueryResourcesWithDurationTimeRangeAsync() + { + MetricsClient client = CreateMetricsClient(); + + var resourceId = TestEnvironment.StorageAccountId; + + var timeRange = new QueryTimeRange( + duration: TimeSpan.FromHours(4) + ); + + Response metricsResultsResponse = await client.QueryResourcesAsync( + resourceIds: new List { new ResourceIdentifier(resourceId) }, + metricNames: new List { "Ingress" }, + metricNamespace: "Microsoft.Storage/storageAccounts", + options: new MetricsQueryResourcesOptions { TimeRange = timeRange }).ConfigureAwait(false); + + Assert.AreEqual(200, metricsResultsResponse.GetRawResponse().Status); + MetricsQueryResourcesResult metricsQueryResults = metricsResultsResponse.Value; + Assert.AreEqual(1, metricsQueryResults.Values.Count); + Assert.AreEqual(TestEnvironment.StorageAccountId + "/providers/Microsoft.Insights/metrics/Ingress", metricsQueryResults.Values[0].Metrics[0].Id); + Assert.AreEqual("Microsoft.Storage/storageAccounts", metricsQueryResults.Values[0].Namespace); + } + + [Test] + [SyncOnly] + public void MetricsQueryResourcesInvalid() + { + MetricsClient client = CreateMetricsClient(); + + Assert.Throws(() => + client.QueryResources( + resourceIds: new List(), + metricNames: new List { "Ingress" }, + metricNamespace: "Microsoft.Storage/storageAccounts")); + } + } +} diff --git a/sdk/monitor/Azure.Monitor.Query/tests/MetricsQueryClientLiveTests.cs b/sdk/monitor/Azure.Monitor.Query/tests/MetricsQueryClientLiveTests.cs index 6583b0916c7c..e9b916b972fc 100644 --- a/sdk/monitor/Azure.Monitor.Query/tests/MetricsQueryClientLiveTests.cs +++ b/sdk/monitor/Azure.Monitor.Query/tests/MetricsQueryClientLiveTests.cs @@ -4,13 +4,10 @@ using System; using System.Collections.Generic; using System.Linq; -using System.Security.AccessControl; using System.Threading.Tasks; -using Azure.Core; using Azure.Core.TestFramework; using Azure.Monitor.Query.Models; using NUnit.Framework; -using NUnit.Framework.Internal.Commands; namespace Azure.Monitor.Query.Tests { @@ -34,18 +31,6 @@ private MetricsQueryClient CreateClient() )); } - private MetricsClient CreateMetricsClient() - { - return InstrumentClient(new MetricsClient( - new Uri(TestEnvironment.ConstructMetricsClientUri()), - TestEnvironment.Credential, - InstrumentClientOptions(new MetricsClientOptions() - { - Audience = TestEnvironment.GetMetricsClientAudience() - }) - )); - } - [SetUp] public void SetUp() { @@ -327,46 +312,5 @@ public async Task CanGetMetricByNameInvalid() Assert.Throws(() => { results.Value.GetMetricByName("Guinness"); }); } - - [RecordedTest] - public async Task MetricsQueryResourcesAsync() - { - MetricsClient client = CreateMetricsClient(); - - var resourceId = TestEnvironment.StorageAccountId; - - Response metricsResultsResponse = await client.QueryResourcesAsync( - resourceIds: new List { new ResourceIdentifier(resourceId) }, - metricNames: new List { "Ingress" }, - metricNamespace: "Microsoft.Storage/storageAccounts").ConfigureAwait(false); - - MetricsQueryResourcesResult metricsQueryResults = metricsResultsResponse.Value; - Assert.AreEqual(1, metricsQueryResults.Values.Count); - Assert.AreEqual(TestEnvironment.StorageAccountId + "/providers/Microsoft.Insights/metrics/Ingress", metricsQueryResults.Values[0].Metrics[0].Id); - Assert.AreEqual("Microsoft.Storage/storageAccounts", metricsQueryResults.Values[0].Namespace); - for (int i = 0; i < metricsQueryResults.Values.Count; i++) - { - foreach (MetricResult value in metricsQueryResults.Values[i].Metrics) - { - for (int j = 0; j < value.TimeSeries.Count; j++) - { - Assert.GreaterOrEqual(value.TimeSeries[j].Values[i].Total, 0); - } - } - } - } - - [Test] - [SyncOnly] - public void MetricsQueryResourcesInvalid() - { - MetricsClient client = CreateMetricsClient(); - - Assert.Throws(() => - client.QueryResources( - resourceIds: new List(), - metricNames: new List { "Ingress" }, - metricNamespace: "Microsoft.Storage/storageAccounts")); - } } } diff --git a/sdk/monitor/Azure.ResourceManager.Monitor/samples/Generated/Samples/Sample_ScheduledQueryRuleCollection.cs b/sdk/monitor/Azure.ResourceManager.Monitor/samples/Generated/Samples/Sample_ScheduledQueryRuleCollection.cs index c3c6b8ac705f..672c33f34241 100644 --- a/sdk/monitor/Azure.ResourceManager.Monitor/samples/Generated/Samples/Sample_ScheduledQueryRuleCollection.cs +++ b/sdk/monitor/Azure.ResourceManager.Monitor/samples/Generated/Samples/Sample_ScheduledQueryRuleCollection.cs @@ -217,8 +217,8 @@ public async Task CreateOrUpdate_CreateOrUpdateAScheduledQueryRuleForSingleResou Threshold = 70, FailingPeriods = new ConditionFailingPeriods() { -NumberOfEvaluationPeriods = 1, -MinFailingPeriodsToAlert = 1, +NumberOfEvaluationPeriods = 1L, +MinFailingPeriodsToAlert = 1L, }, } }, @@ -302,8 +302,8 @@ public async Task CreateOrUpdate_CreateOrUpdateAScheduledQueryRuleOnResourceGrou Threshold = 360, FailingPeriods = new ConditionFailingPeriods() { -NumberOfEvaluationPeriods = 1, -MinFailingPeriodsToAlert = 1, +NumberOfEvaluationPeriods = 1L, +MinFailingPeriodsToAlert = 1L, }, } }, @@ -396,8 +396,8 @@ public async Task CreateOrUpdate_CreateOrUpdateAScheduledQueryRuleOnSubscription Threshold = 70, FailingPeriods = new ConditionFailingPeriods() { -NumberOfEvaluationPeriods = 1, -MinFailingPeriodsToAlert = 1, +NumberOfEvaluationPeriods = 1L, +MinFailingPeriodsToAlert = 1L, }, } }, diff --git a/sdk/monitor/test-resources.bicep b/sdk/monitor/test-resources.bicep index e9c6f163fd1b..9811160cf00f 100644 --- a/sdk/monitor/test-resources.bicep +++ b/sdk/monitor/test-resources.bicep @@ -5,9 +5,6 @@ param location string = resourceGroup().location @description('The client OID to grant access to test resources.') param testApplicationOid string -@description('Random string to generate storage account name.') -param utc string = utcNow() - @description('The base resource name.') param baseName string = resourceGroup().name @@ -276,6 +273,24 @@ resource dataCollectionEndpoint2 'Microsoft.Insights/dataCollectionEndpoints@202 } } +//STORAGE ACCOUNT FOR METRICSCLIENT +@description('The base resource name.') +param storageAccountName string = uniqueString(baseName, 'storage') +@description('The base resource name.') +param storageAccountsku string = 'Standard_LRS' +resource storageAccount 'Microsoft.Storage/storageAccounts@2021-08-01' = { + name: storageAccountName + location: location + sku: { + name: storageAccountsku + } + kind: 'StorageV2' + tags: { + ObjectName: storageAccountName + } + properties: {} +} + // OUTPUT VALUES USED BY TEST ENVIRONMENT output LOGS_ENDPOINT string = 'https://api.loganalytics.io' @@ -284,3 +299,17 @@ output WORKSPACE_ID string = LogAnalyticsWorkspace1.properties.customerId output SECONDARY_CONNECTION_STRING string = ApplicationInsightsResource2.properties.ConnectionString output SECONDARY_WORKSPACE_ID string = LogAnalyticsWorkspace2.properties.customerId + +// VALUES NEEDED FOR AZURE.MONITOR.QUERY +output WORKSPACE_PRIMARY_RESOURCE_ID string = LogAnalyticsWorkspace1.id +output WORKSPACE_SECONDARY_RESOURCE_ID string = LogAnalyticsWorkspace2.id +output STORAGE_NAME string = storageAccount.name +output STORAGE_ID string = storageAccount.id +output METRICS_RESOURCE_ID string = LogAnalyticsWorkspace1.id +output METRICS_RESOURCE_NAMESPACE string = 'Microsoft.OperationalInsights/workspaces' + +// VALUES NEEDED FOR AZURE.MONITOR.INGESTION +output INGESTION_DATA_COLLECTION_RULE_ID string = dataCollectionRule1.id +output INGESTION_DATA_COLLECTION_RULE_IMMUTABLE_ID string = dataCollectionRule1.properties.immutableId +output MONITOR_INGESTION_DATA_COLLECTION_ENDPOINT string = dataCollectionEndpoint1.properties.logsIngestion.endpoint +output INGESTION_STREAM_NAME string = streamName diff --git a/sdk/mysql/Azure.ResourceManager.MySql/CHANGELOG.md b/sdk/mysql/Azure.ResourceManager.MySql/CHANGELOG.md index 08b062e0a276..7a680768f2c9 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/CHANGELOG.md +++ b/sdk/mysql/Azure.ResourceManager.MySql/CHANGELOG.md @@ -4,6 +4,8 @@ ### Features Added +- Exposed `JsonModelWriteCore` for model serialization procedure. + ### Breaking Changes ### Bugs Fixed diff --git a/sdk/mysql/Azure.ResourceManager.MySql/api/Azure.ResourceManager.MySql.netstandard2.0.cs b/sdk/mysql/Azure.ResourceManager.MySql/api/Azure.ResourceManager.MySql.netstandard2.0.cs index 0aa7c2d7e1f7..5cff7bc5e4d8 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/api/Azure.ResourceManager.MySql.netstandard2.0.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/api/Azure.ResourceManager.MySql.netstandard2.0.cs @@ -19,6 +19,7 @@ public partial class MySqlAdvisorData : Azure.ResourceManager.Models.ResourceDat { public MySqlAdvisorData() { } public System.BinaryData Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.MySqlAdvisorData 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.MySql.MySqlAdvisorData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -71,6 +72,7 @@ public MySqlConfigurationData() { } public string Description { get { throw null; } } public string Source { get { throw null; } set { } } public string Value { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.MySqlConfigurationData 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.MySql.MySqlConfigurationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -116,6 +118,7 @@ public partial class MySqlDatabaseData : Azure.ResourceManager.Models.ResourceDa public MySqlDatabaseData() { } public string Charset { get { throw null; } set { } } public string Collation { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.MySqlDatabaseData 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.MySql.MySqlDatabaseData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -190,6 +193,7 @@ public partial class MySqlFirewallRuleData : Azure.ResourceManager.Models.Resour public MySqlFirewallRuleData(System.Net.IPAddress startIPAddress, System.Net.IPAddress endIPAddress) { } public System.Net.IPAddress EndIPAddress { get { throw null; } set { } } public System.Net.IPAddress StartIPAddress { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.MySqlFirewallRuleData 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.MySql.MySqlFirewallRuleData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -238,6 +242,7 @@ public MySqlPrivateEndpointConnectionData() { } public Azure.ResourceManager.MySql.Models.MySqlPrivateLinkServiceConnectionStateProperty ConnectionState { get { throw null; } set { } } public Azure.Core.ResourceIdentifier PrivateEndpointId { get { throw null; } set { } } public string ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.MySqlPrivateEndpointConnectionData 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.MySql.MySqlPrivateEndpointConnectionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -297,6 +302,7 @@ public partial class MySqlPrivateLinkResourceData : Azure.ResourceManager.Models { public MySqlPrivateLinkResourceData() { } public Azure.ResourceManager.MySql.Models.MySqlPrivateLinkResourceProperties Properties { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.MySqlPrivateLinkResourceData 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.MySql.MySqlPrivateLinkResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -328,6 +334,7 @@ public MySqlQueryStatisticData() { } public long? QueryExecutionCount { get { throw null; } set { } } public string QueryId { get { throw null; } set { } } public System.DateTimeOffset? StartOn { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.MySqlQueryStatisticData 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.MySql.MySqlQueryStatisticData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -366,6 +373,7 @@ public partial class MySqlQueryTextData : Azure.ResourceManager.Models.ResourceD public MySqlQueryTextData() { } public string QueryId { get { throw null; } set { } } public string QueryText { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.MySqlQueryTextData 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.MySql.MySqlQueryTextData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -413,6 +421,7 @@ public MySqlRecommendationActionData() { } public string Reason { get { throw null; } set { } } public string RecommendationType { get { throw null; } set { } } public System.Guid? SessionId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.MySqlRecommendationActionData 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.MySql.MySqlRecommendationActionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -441,6 +450,7 @@ public MySqlServerAdministratorData() { } public string LoginAccountName { get { throw null; } set { } } public System.Guid? SecureId { get { throw null; } set { } } public System.Guid? TenantId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.MySqlServerAdministratorData 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.MySql.MySqlServerAdministratorData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -505,6 +515,7 @@ public MySqlServerData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.MySql.Models.MySqlStorageProfile StorageProfile { get { throw null; } set { } } public Azure.ResourceManager.MySql.Models.MySqlServerState? UserVisibleState { get { throw null; } set { } } public Azure.ResourceManager.MySql.Models.MySqlServerVersion? Version { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.MySqlServerData 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.MySql.MySqlServerData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -535,6 +546,7 @@ public MySqlServerKeyData() { } public string Kind { get { throw null; } } public Azure.ResourceManager.MySql.Models.MySqlServerKeyType? ServerKeyType { get { throw null; } set { } } public System.Uri Uri { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.MySqlServerKeyData 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.MySql.MySqlServerKeyData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -667,6 +679,7 @@ public MySqlServerSecurityAlertPolicyData() { } public Azure.ResourceManager.MySql.Models.MySqlServerSecurityAlertPolicyState? State { get { throw null; } set { } } public string StorageAccountAccessKey { get { throw null; } set { } } public string StorageEndpoint { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.MySqlServerSecurityAlertPolicyData 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.MySql.MySqlServerSecurityAlertPolicyData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -713,6 +726,7 @@ public MySqlVirtualNetworkRuleData() { } public bool? IgnoreMissingVnetServiceEndpoint { get { throw null; } set { } } public Azure.ResourceManager.MySql.Models.MySqlVirtualNetworkRuleState? State { get { throw null; } } public Azure.Core.ResourceIdentifier VirtualNetworkSubnetId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.MySqlVirtualNetworkRuleData 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.MySql.MySqlVirtualNetworkRuleData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -762,6 +776,7 @@ public MySqlWaitStatisticData() { } public System.DateTimeOffset? StartOn { get { throw null; } set { } } public double? TotalTimeInMinutes { get { throw null; } set { } } public long? UserId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.MySqlWaitStatisticData 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.MySql.MySqlWaitStatisticData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -809,6 +824,7 @@ public AdvancedThreatProtectionData() { } public System.DateTimeOffset? CreatedOn { get { throw null; } } public Azure.ResourceManager.MySql.FlexibleServers.Models.AdvancedThreatProtectionProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.MySql.FlexibleServers.Models.AdvancedThreatProtectionState? State { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.AdvancedThreatProtectionData 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.MySql.FlexibleServers.AdvancedThreatProtectionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -890,6 +906,7 @@ public MySqlFlexibleServerAadAdministratorData() { } public string Login { get { throw null; } set { } } public string Sid { get { throw null; } set { } } public System.Guid? TenantId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServerAadAdministratorData 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.MySql.FlexibleServers.MySqlFlexibleServerAadAdministratorData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -938,6 +955,7 @@ public MySqlFlexibleServerBackupData() { } public string BackupType { get { throw null; } set { } } public System.DateTimeOffset? CompletedOn { get { throw null; } set { } } public string Source { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServerBackupData 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.MySql.FlexibleServers.MySqlFlexibleServerBackupData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -986,6 +1004,7 @@ public MySqlFlexibleServerBackupV2Data() { } public System.DateTimeOffset? CompletedOn { get { throw null; } set { } } public Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupProvisioningState? ProvisioningState { get { throw null; } } public string Source { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServerBackupV2Data 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.MySql.FlexibleServers.MySqlFlexibleServerBackupV2Data System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1063,6 +1082,7 @@ public MySqlFlexibleServerConfigurationData() { } public Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerConfigReadOnlyState? IsReadOnly { get { throw null; } } public Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerConfigurationSource? Source { get { throw null; } set { } } public string Value { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServerConfigurationData 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.MySql.FlexibleServers.MySqlFlexibleServerConfigurationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1110,6 +1130,7 @@ public MySqlFlexibleServerData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerState? State { get { throw null; } } public Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerStorage Storage { get { throw null; } set { } } public Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerVersion? Version { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServerData 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.MySql.FlexibleServers.MySqlFlexibleServerData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1138,6 +1159,7 @@ public partial class MySqlFlexibleServerDatabaseData : Azure.ResourceManager.Mod public MySqlFlexibleServerDatabaseData() { } public string Charset { get { throw null; } set { } } public string Collation { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServerDatabaseData 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.MySql.FlexibleServers.MySqlFlexibleServerDatabaseData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1185,6 +1207,7 @@ public partial class MySqlFlexibleServerFirewallRuleData : Azure.ResourceManager public MySqlFlexibleServerFirewallRuleData(System.Net.IPAddress startIPAddress, System.Net.IPAddress endIPAddress) { } public System.Net.IPAddress EndIPAddress { get { throw null; } set { } } public System.Net.IPAddress StartIPAddress { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServerFirewallRuleData 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.MySql.FlexibleServers.MySqlFlexibleServerFirewallRuleData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1239,6 +1262,7 @@ public MySqlFlexibleServerMaintenanceData() { } public string MaintenanceTitle { get { throw null; } } public Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerMaintenanceType? MaintenanceType { get { throw null; } } public Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerMaintenanceProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServerMaintenanceData 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.MySql.FlexibleServers.MySqlFlexibleServerMaintenanceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1354,6 +1378,7 @@ public MySqlFlexibleServersCapabilityData() { } public System.Collections.Generic.IReadOnlyList SupportedFlexibleServerEditions { get { throw null; } } public System.Collections.Generic.IReadOnlyList SupportedGeoBackupRegions { get { throw null; } } public System.Collections.Generic.IReadOnlyList SupportedServerVersions { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServersCapabilityData 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.MySql.FlexibleServers.MySqlFlexibleServersCapabilityData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1448,6 +1473,7 @@ public partial class AdvancedThreatProtectionPatch : System.ClientModel.Primitiv { public AdvancedThreatProtectionPatch() { } public Azure.ResourceManager.MySql.FlexibleServers.Models.AdvancedThreatProtectionState? State { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.Models.AdvancedThreatProtectionPatch 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.MySql.FlexibleServers.Models.AdvancedThreatProtectionPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1536,6 +1562,7 @@ public HighAvailabilityValidationEstimation() { } public int? EstimatedDowntime { get { throw null; } } public string ExpectedStandbyAvailabilityZone { get { throw null; } set { } } public string ScheduledStandbyAvailabilityZone { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.Models.HighAvailabilityValidationEstimation 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.MySql.FlexibleServers.Models.HighAvailabilityValidationEstimation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1549,6 +1576,7 @@ public ImportSourceProperties() { } public string SasToken { get { throw null; } set { } } public Azure.ResourceManager.MySql.FlexibleServers.Models.ImportSourceStorageType? StorageType { get { throw null; } set { } } public System.Uri StorageUri { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.Models.ImportSourceProperties 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.MySql.FlexibleServers.Models.ImportSourceProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1610,6 +1638,7 @@ public partial class MySqlFlexibleServerBackupAndExportContent : Azure.ResourceM { public MySqlFlexibleServerBackupAndExportContent(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupSettings backupSettings, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupStoreDetails targetDetails) : base (default(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupSettings)) { } public Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupStoreDetails TargetDetails { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupAndExportContent 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.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupAndExportContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1636,6 +1665,7 @@ public MySqlFlexibleServerBackupAndExportResult() { } public double? PercentComplete { get { throw null; } set { } } public System.DateTimeOffset? StartOn { get { throw null; } set { } } public Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupAndExportOperationStatus? Status { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupAndExportResult 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.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupAndExportResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1646,6 +1676,7 @@ public partial class MySqlFlexibleServerBackupContentBase : System.ClientModel.P { public MySqlFlexibleServerBackupContentBase(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupSettings backupSettings) { } public Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupSettings BackupSettings { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupContentBase 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.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupContentBase System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1677,6 +1708,7 @@ public MySqlFlexibleServerBackupProperties() { } public int? BackupRetentionDays { get { throw null; } set { } } public System.DateTimeOffset? EarliestRestoreOn { get { throw null; } } public Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerEnableStatusEnum? GeoRedundantBackup { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupProperties 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.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1709,6 +1741,7 @@ public partial class MySqlFlexibleServerBackupSettings : System.ClientModel.Prim public MySqlFlexibleServerBackupSettings(string backupName) { } public Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupFormat? BackupFormat { get { throw null; } set { } } public string BackupName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupSettings 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.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1718,6 +1751,7 @@ public MySqlFlexibleServerBackupSettings(string backupName) { } public abstract partial class MySqlFlexibleServerBackupStoreDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { protected MySqlFlexibleServerBackupStoreDetails() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupStoreDetails 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.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupStoreDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1748,6 +1782,7 @@ internal MySqlFlexibleServerCapabilityProperties() { } public System.Collections.Generic.IReadOnlyList SupportedGeoBackupRegions { get { throw null; } } public System.Collections.Generic.IReadOnlyList SupportedHAMode { get { throw null; } } public string Zone { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerCapabilityProperties 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.MySql.FlexibleServers.Models.MySqlFlexibleServerCapabilityProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1814,6 +1849,7 @@ public MySqlFlexibleServerConfigurationForBatchUpdate() { } public string Name { get { throw null; } set { } } public string Source { get { throw null; } set { } } public string Value { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerConfigurationForBatchUpdate 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.MySql.FlexibleServers.Models.MySqlFlexibleServerConfigurationForBatchUpdate System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1825,6 +1861,7 @@ public partial class MySqlFlexibleServerConfigurationListForBatchUpdate : System public MySqlFlexibleServerConfigurationListForBatchUpdate() { } public Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerConfigurationResetAllToDefault? ResetAllToDefault { get { throw null; } set { } } public System.Collections.Generic.IList Values { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerConfigurationListForBatchUpdate 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.MySql.FlexibleServers.Models.MySqlFlexibleServerConfigurationListForBatchUpdate System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1853,6 +1890,7 @@ public partial class MySqlFlexibleServerConfigurations : System.ClientModel.Prim { internal MySqlFlexibleServerConfigurations() { } public System.Collections.Generic.IReadOnlyList Values { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerConfigurations 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.MySql.FlexibleServers.Models.MySqlFlexibleServerConfigurations System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1905,6 +1943,7 @@ public MySqlFlexibleServerDataEncryption() { } public Azure.Core.ResourceIdentifier GeoBackupUserAssignedIdentityId { get { throw null; } set { } } public System.Uri PrimaryKeyUri { get { throw null; } set { } } public Azure.Core.ResourceIdentifier PrimaryUserAssignedIdentityId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerDataEncryption 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.MySql.FlexibleServers.Models.MySqlFlexibleServerDataEncryption System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1921,6 +1960,7 @@ public partial class MySqlFlexibleServerDelegatedSubnetUsage : System.ClientMode internal MySqlFlexibleServerDelegatedSubnetUsage() { } public string SubnetName { get { throw null; } } public long? Usage { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerDelegatedSubnetUsage 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.MySql.FlexibleServers.Models.MySqlFlexibleServerDelegatedSubnetUsage System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1933,6 +1973,7 @@ internal MySqlFlexibleServerEditionCapability() { } public string Name { get { throw null; } } public System.Collections.Generic.IReadOnlyList SupportedServerVersions { get { throw null; } } public System.Collections.Generic.IReadOnlyList SupportedStorageEditions { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerEditionCapability 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.MySql.FlexibleServers.Models.MySqlFlexibleServerEditionCapability System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1961,6 +2002,7 @@ public partial class MySqlFlexibleServerFullBackupStoreDetails : Azure.ResourceM { public MySqlFlexibleServerFullBackupStoreDetails(System.Collections.Generic.IEnumerable sasUriList) { } public System.Collections.Generic.IList SasUriList { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerFullBackupStoreDetails 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.MySql.FlexibleServers.Models.MySqlFlexibleServerFullBackupStoreDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1971,6 +2013,7 @@ public partial class MySqlFlexibleServerGtidSetContent : System.ClientModel.Prim { public MySqlFlexibleServerGtidSetContent() { } public string GtidSet { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerGtidSetContent 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.MySql.FlexibleServers.Models.MySqlFlexibleServerGtidSetContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1983,6 +2026,7 @@ public MySqlFlexibleServerHighAvailability() { } public Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerHighAvailabilityMode? Mode { get { throw null; } set { } } public string StandbyAvailabilityZone { get { throw null; } set { } } public Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerHighAvailabilityState? State { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerHighAvailability 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.MySql.FlexibleServers.Models.MySqlFlexibleServerHighAvailability System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2037,6 +2081,7 @@ public MySqlFlexibleServerLogFile() { } public long? SizeInKB { get { throw null; } set { } } public string TypePropertiesType { get { throw null; } set { } } public System.Uri Uri { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerLogFile 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.MySql.FlexibleServers.Models.MySqlFlexibleServerLogFile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2047,6 +2092,7 @@ public partial class MySqlFlexibleServerMaintenancePatch : System.ClientModel.Pr { public MySqlFlexibleServerMaintenancePatch() { } public System.DateTimeOffset? MaintenanceStartOn { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerMaintenancePatch 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.MySql.FlexibleServers.Models.MySqlFlexibleServerMaintenancePatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2122,6 +2168,7 @@ public MySqlFlexibleServerMaintenanceWindow() { } public int? DayOfWeek { get { throw null; } set { } } public int? StartHour { get { throw null; } set { } } public int? StartMinute { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerMaintenanceWindow 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.MySql.FlexibleServers.Models.MySqlFlexibleServerMaintenanceWindow System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2133,6 +2180,7 @@ public partial class MySqlFlexibleServerNameAvailabilityContent : System.ClientM public MySqlFlexibleServerNameAvailabilityContent(string name) { } public string Name { get { throw null; } } public Azure.Core.ResourceType? ResourceType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerNameAvailabilityContent 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.MySql.FlexibleServers.Models.MySqlFlexibleServerNameAvailabilityContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2145,6 +2193,7 @@ internal MySqlFlexibleServerNameAvailabilityResult() { } public bool? IsNameAvailable { get { throw null; } } public string Message { get { throw null; } } public string Reason { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerNameAvailabilityResult 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.MySql.FlexibleServers.Models.MySqlFlexibleServerNameAvailabilityResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2157,6 +2206,7 @@ public MySqlFlexibleServerNetwork() { } public Azure.Core.ResourceIdentifier DelegatedSubnetResourceId { get { throw null; } set { } } public Azure.Core.ResourceIdentifier PrivateDnsZoneResourceId { get { throw null; } set { } } public Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerEnableStatusEnum? PublicNetworkAccess { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerNetwork 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.MySql.FlexibleServers.Models.MySqlFlexibleServerNetwork System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2178,6 +2228,7 @@ public MySqlFlexibleServerPatch() { } public Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerStorage Storage { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } public Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerVersion? Version { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerPatch 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.MySql.FlexibleServers.Models.MySqlFlexibleServerPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2188,6 +2239,7 @@ public partial class MySqlFlexibleServerPrivateDnsZoneSuffixResponse : System.Cl { internal MySqlFlexibleServerPrivateDnsZoneSuffixResponse() { } public string PrivateDnsZoneSuffix { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerPrivateDnsZoneSuffixResponse 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.MySql.FlexibleServers.Models.MySqlFlexibleServerPrivateDnsZoneSuffixResponse System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2218,6 +2270,7 @@ public partial class MySqlFlexibleServerRestartParameter : System.ClientModel.Pr public MySqlFlexibleServerRestartParameter() { } public int? MaxFailoverSeconds { get { throw null; } set { } } public Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerEnableStatusEnum? RestartWithFailover { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerRestartParameter 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.MySql.FlexibleServers.Models.MySqlFlexibleServerRestartParameter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2229,6 +2282,7 @@ public partial class MySqlFlexibleServerServerVersionCapability : System.ClientM internal MySqlFlexibleServerServerVersionCapability() { } public string Name { get { throw null; } } public System.Collections.Generic.IReadOnlyList SupportedSkus { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerServerVersionCapability 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.MySql.FlexibleServers.Models.MySqlFlexibleServerServerVersionCapability System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2240,6 +2294,7 @@ public partial class MySqlFlexibleServerSku : System.ClientModel.Primitives.IJso public MySqlFlexibleServerSku(string name, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerSkuTier tier) { } public string Name { get { throw null; } set { } } public Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerSkuTier Tier { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerSku 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.MySql.FlexibleServers.Models.MySqlFlexibleServerSku System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2253,6 +2308,7 @@ internal MySqlFlexibleServerSkuCapability() { } public long? SupportedIops { get { throw null; } } public long? SupportedMemoryPerVCoreInMB { get { throw null; } } public long? VCores { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerSkuCapability 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.MySql.FlexibleServers.Models.MySqlFlexibleServerSkuCapability System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2285,6 +2341,7 @@ public MySqlFlexibleServersPrivateEndpointConnection() { } public System.Collections.Generic.IReadOnlyList GroupIds { get { throw null; } } public Azure.Core.ResourceIdentifier PrivateEndpointId { get { throw null; } } public Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServersPrivateEndpointConnectionProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServersPrivateEndpointConnection 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.MySql.FlexibleServers.Models.MySqlFlexibleServersPrivateEndpointConnection System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2336,6 +2393,7 @@ public MySqlFlexibleServersPrivateLinkServiceConnectionState() { } public string ActionsRequired { get { throw null; } set { } } public string Description { get { throw null; } set { } } public Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServersPrivateEndpointServiceConnectionStatus? Status { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServersPrivateLinkServiceConnectionState 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.MySql.FlexibleServers.Models.MySqlFlexibleServersPrivateLinkServiceConnectionState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2374,6 +2432,7 @@ public MySqlFlexibleServerStorage() { } public Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerEnableStatusEnum? LogOnDisk { get { throw null; } set { } } public int? StorageSizeInGB { get { throw null; } set { } } public string StorageSku { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerStorage 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.MySql.FlexibleServers.Models.MySqlFlexibleServerStorage System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2390,6 +2449,7 @@ internal MySqlFlexibleServerStorageEditionCapability() { } public long? MinBackupRetentionDays { get { throw null; } } public long? MinStorageSize { get { throw null; } } public string Name { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerStorageEditionCapability 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.MySql.FlexibleServers.Models.MySqlFlexibleServerStorageEditionCapability System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2400,6 +2460,7 @@ public partial class MySqlFlexibleServerValidateBackupResult : System.ClientMode { internal MySqlFlexibleServerValidateBackupResult() { } public int? NumberOfContainers { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerValidateBackupResult 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.MySql.FlexibleServers.Models.MySqlFlexibleServerValidateBackupResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2428,6 +2489,7 @@ public partial class MySqlFlexibleServerVirtualNetworkSubnetUsageParameter : Sys { public MySqlFlexibleServerVirtualNetworkSubnetUsageParameter() { } public Azure.Core.ResourceIdentifier VirtualNetworkResourceId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerVirtualNetworkSubnetUsageParameter 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.MySql.FlexibleServers.Models.MySqlFlexibleServerVirtualNetworkSubnetUsageParameter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2440,6 +2502,7 @@ internal MySqlFlexibleServerVirtualNetworkSubnetUsageResult() { } public System.Collections.Generic.IReadOnlyList DelegatedSubnetsUsage { get { throw null; } } public Azure.Core.AzureLocation? Location { get { throw null; } } public string SubscriptionId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerVirtualNetworkSubnetUsageResult 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.MySql.FlexibleServers.Models.MySqlFlexibleServerVirtualNetworkSubnetUsageResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2450,6 +2513,7 @@ public partial class OperationStatusExtendedResult : Azure.ResourceManager.MySql { internal OperationStatusExtendedResult() { } public System.Collections.Generic.IReadOnlyDictionary Properties { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.Models.OperationStatusExtendedResult 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.MySql.FlexibleServers.Models.OperationStatusExtendedResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2468,6 +2532,7 @@ internal OperationStatusResult() { } public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } } public System.DateTimeOffset? StartOn { get { throw null; } } public string Status { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.Models.OperationStatusResult 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.MySql.FlexibleServers.Models.OperationStatusResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2482,6 +2547,7 @@ internal ServerEditionCapabilityV2() { } public string Name { get { throw null; } } public System.Collections.Generic.IReadOnlyList SupportedSkus { get { throw null; } } public System.Collections.Generic.IReadOnlyList SupportedStorageEditions { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.Models.ServerEditionCapabilityV2 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.MySql.FlexibleServers.Models.ServerEditionCapabilityV2 System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2492,6 +2558,7 @@ public partial class ServerVersionCapabilityV2 : System.ClientModel.Primitives.I { internal ServerVersionCapabilityV2() { } public string Name { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.Models.ServerVersionCapabilityV2 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.MySql.FlexibleServers.Models.ServerVersionCapabilityV2 System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2507,6 +2574,7 @@ internal SkuCapabilityV2() { } public long? SupportedMemoryPerVCoreMB { get { throw null; } } public System.Collections.Generic.IReadOnlyList SupportedZones { get { throw null; } } public long? VCores { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.Models.SkuCapabilityV2 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.MySql.FlexibleServers.Models.SkuCapabilityV2 System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2611,6 +2679,7 @@ public partial class MySqlConfigurations : System.ClientModel.Primitives.IJsonMo { public MySqlConfigurations() { } public System.Collections.Generic.IList Values { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.Models.MySqlConfigurations 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.MySql.Models.MySqlConfigurations System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2661,6 +2730,7 @@ public MySqlLogFile() { } public string LogFileType { get { throw null; } set { } } public long? SizeInKB { get { throw null; } set { } } public System.Uri Uri { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.Models.MySqlLogFile 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.MySql.Models.MySqlLogFile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2692,6 +2762,7 @@ public partial class MySqlNameAvailabilityContent : System.ClientModel.Primitive public MySqlNameAvailabilityContent(string name) { } public string Name { get { throw null; } } public Azure.Core.ResourceType? ResourceType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.Models.MySqlNameAvailabilityContent 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.MySql.Models.MySqlNameAvailabilityContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2704,6 +2775,7 @@ internal MySqlNameAvailabilityResult() { } public bool? IsNameAvailable { get { throw null; } } public string Message { get { throw null; } } public string Reason { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.Models.MySqlNameAvailabilityResult 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.MySql.Models.MySqlNameAvailabilityResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2721,6 +2793,7 @@ internal MySqlPerformanceTier() { } public int? MinLargeStorageInMB { get { throw null; } } public int? MinStorageInMB { get { throw null; } } public System.Collections.Generic.IReadOnlyList ServiceLevelObjectives { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.Models.MySqlPerformanceTier 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.MySql.Models.MySqlPerformanceTier System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2738,6 +2811,7 @@ internal MySqlPerformanceTierServiceLevelObjectives() { } public int? MinBackupRetentionDays { get { throw null; } } public int? MinStorageInMB { get { throw null; } } public int? VCores { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.Models.MySqlPerformanceTierServiceLevelObjectives 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.MySql.Models.MySqlPerformanceTierServiceLevelObjectives System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2748,6 +2822,7 @@ public partial class MySqlPrivateEndpointConnectionPatch : System.ClientModel.Pr { public MySqlPrivateEndpointConnectionPatch() { } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.Models.MySqlPrivateEndpointConnectionPatch 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.MySql.Models.MySqlPrivateEndpointConnectionPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2780,6 +2855,7 @@ public partial class MySqlPrivateLinkResourceProperties : System.ClientModel.Pri internal MySqlPrivateLinkResourceProperties() { } public string GroupId { get { throw null; } } public System.Collections.Generic.IReadOnlyList RequiredMembers { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.Models.MySqlPrivateLinkResourceProperties 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.MySql.Models.MySqlPrivateLinkResourceProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2792,6 +2868,7 @@ public MySqlPrivateLinkServiceConnectionStateProperty(string status, string desc public string ActionsRequired { get { throw null; } } public string Description { get { throw null; } set { } } public string Status { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.Models.MySqlPrivateLinkServiceConnectionStateProperty 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.MySql.Models.MySqlPrivateLinkServiceConnectionStateProperty System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2858,6 +2935,7 @@ public partial class MySqlQueryPerformanceInsightResetDataResult : System.Client internal MySqlQueryPerformanceInsightResetDataResult() { } public string Message { get { throw null; } } public Azure.ResourceManager.MySql.Models.MySqlQueryPerformanceInsightResetDataResultState? Status { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.Models.MySqlQueryPerformanceInsightResetDataResult 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.MySql.Models.MySqlQueryPerformanceInsightResetDataResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2891,6 +2969,7 @@ public MySqlRecoverableServerResourceData() { } public string ServiceLevelObjective { get { throw null; } } public int? VCores { get { throw null; } } public string Version { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.Models.MySqlRecoverableServerResourceData 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.MySql.Models.MySqlRecoverableServerResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2922,6 +3001,7 @@ public MySqlServerCreateOrUpdateContent(Azure.ResourceManager.MySql.Models.MySql public Azure.ResourceManager.MySql.Models.MySqlServerPropertiesForCreate Properties { get { throw null; } } public Azure.ResourceManager.MySql.Models.MySqlSku Sku { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.Models.MySqlServerCreateOrUpdateContent 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.MySql.Models.MySqlServerCreateOrUpdateContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2958,6 +3038,7 @@ public MySqlServerPatch() { } public Azure.ResourceManager.MySql.Models.MySqlStorageProfile StorageProfile { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } public Azure.ResourceManager.MySql.Models.MySqlServerVersion? Version { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.Models.MySqlServerPatch 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.MySql.Models.MySqlServerPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2969,6 +3050,7 @@ public partial class MySqlServerPrivateEndpointConnection : System.ClientModel.P internal MySqlServerPrivateEndpointConnection() { } public Azure.Core.ResourceIdentifier Id { get { throw null; } } public Azure.ResourceManager.MySql.Models.MySqlServerPrivateEndpointConnectionProperties Properties { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.Models.MySqlServerPrivateEndpointConnection 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.MySql.Models.MySqlServerPrivateEndpointConnection System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2981,6 +3063,7 @@ internal MySqlServerPrivateEndpointConnectionProperties() { } public Azure.Core.ResourceIdentifier PrivateEndpointId { get { throw null; } } public Azure.ResourceManager.MySql.Models.MySqlServerPrivateLinkServiceConnectionStateProperty PrivateLinkServiceConnectionState { get { throw null; } } public Azure.ResourceManager.MySql.Models.MySqlPrivateEndpointProvisioningState? ProvisioningState { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.Models.MySqlServerPrivateEndpointConnectionProperties 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.MySql.Models.MySqlServerPrivateEndpointConnectionProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2993,6 +3076,7 @@ internal MySqlServerPrivateLinkServiceConnectionStateProperty() { } public Azure.ResourceManager.MySql.Models.MySqlPrivateLinkServiceConnectionStateRequiredAction? ActionsRequired { get { throw null; } } public string Description { get { throw null; } } public Azure.ResourceManager.MySql.Models.MySqlPrivateLinkServiceConnectionStateStatus Status { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.Models.MySqlServerPrivateLinkServiceConnectionStateProperty 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.MySql.Models.MySqlServerPrivateLinkServiceConnectionStateProperty System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3008,6 +3092,7 @@ protected MySqlServerPropertiesForCreate() { } public Azure.ResourceManager.MySql.Models.MySqlSslEnforcementEnum? SslEnforcement { get { throw null; } set { } } public Azure.ResourceManager.MySql.Models.MySqlStorageProfile StorageProfile { get { throw null; } set { } } public Azure.ResourceManager.MySql.Models.MySqlServerVersion? Version { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.Models.MySqlServerPropertiesForCreate 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.MySql.Models.MySqlServerPropertiesForCreate System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3019,6 +3104,7 @@ public partial class MySqlServerPropertiesForDefaultCreate : Azure.ResourceManag public MySqlServerPropertiesForDefaultCreate(string administratorLogin, string administratorLoginPassword) { } public string AdministratorLogin { get { throw null; } } public string AdministratorLoginPassword { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.Models.MySqlServerPropertiesForDefaultCreate 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.MySql.Models.MySqlServerPropertiesForDefaultCreate System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3029,6 +3115,7 @@ public partial class MySqlServerPropertiesForGeoRestore : Azure.ResourceManager. { public MySqlServerPropertiesForGeoRestore(Azure.Core.ResourceIdentifier sourceServerId) { } public Azure.Core.ResourceIdentifier SourceServerId { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.Models.MySqlServerPropertiesForGeoRestore 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.MySql.Models.MySqlServerPropertiesForGeoRestore System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3039,6 +3126,7 @@ public partial class MySqlServerPropertiesForReplica : Azure.ResourceManager.MyS { public MySqlServerPropertiesForReplica(Azure.Core.ResourceIdentifier sourceServerId) { } public Azure.Core.ResourceIdentifier SourceServerId { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.Models.MySqlServerPropertiesForReplica 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.MySql.Models.MySqlServerPropertiesForReplica System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3050,6 +3138,7 @@ public partial class MySqlServerPropertiesForRestore : Azure.ResourceManager.MyS public MySqlServerPropertiesForRestore(Azure.Core.ResourceIdentifier sourceServerId, System.DateTimeOffset restorePointInTime) { } public System.DateTimeOffset RestorePointInTime { get { throw null; } } public Azure.Core.ResourceIdentifier SourceServerId { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.Models.MySqlServerPropertiesForRestore 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.MySql.Models.MySqlServerPropertiesForRestore System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3085,6 +3174,7 @@ public partial class MySqlServerUpgradeContent : System.ClientModel.Primitives.I { public MySqlServerUpgradeContent() { } public string TargetServerVersion { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.Models.MySqlServerUpgradeContent 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.MySql.Models.MySqlServerUpgradeContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3118,6 +3208,7 @@ public MySqlSku(string name) { } public string Name { get { throw null; } set { } } public string Size { get { throw null; } set { } } public Azure.ResourceManager.MySql.Models.MySqlSkuTier? Tier { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.Models.MySqlSku 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.MySql.Models.MySqlSku System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3173,6 +3264,7 @@ public MySqlStorageProfile() { } public Azure.ResourceManager.MySql.Models.MySqlGeoRedundantBackup? GeoRedundantBackup { get { throw null; } set { } } public Azure.ResourceManager.MySql.Models.MySqlStorageAutogrow? StorageAutogrow { get { throw null; } set { } } public int? StorageInMB { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.Models.MySqlStorageProfile 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.MySql.Models.MySqlStorageProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3188,6 +3280,7 @@ public MySqlTopQueryStatisticsInput(int numberOfTopQueries, string aggregationFu public System.DateTimeOffset ObservationEndOn { get { throw null; } } public System.DateTimeOffset ObservationStartOn { get { throw null; } } public string ObservedMetric { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.Models.MySqlTopQueryStatisticsInput 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.MySql.Models.MySqlTopQueryStatisticsInput System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3221,6 +3314,7 @@ public MySqlWaitStatisticsInput(System.DateTimeOffset observationStartOn, System public string AggregationWindow { get { throw null; } } public System.DateTimeOffset ObservationEndOn { get { throw null; } } public System.DateTimeOffset ObservationStartOn { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.Models.MySqlWaitStatisticsInput 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.MySql.Models.MySqlWaitStatisticsInput System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/assets.json b/sdk/mysql/Azure.ResourceManager.MySql/assets.json index 21a0119870f9..380121741484 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/assets.json +++ b/sdk/mysql/Azure.ResourceManager.MySql/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/mysql/Azure.ResourceManager.MySql", - "Tag": "net/mysql/Azure.ResourceManager.MySql_615c82216c" + "Tag": "net/mysql/Azure.ResourceManager.MySql_be60e3e226" } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlAdvisorListResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlAdvisorListResult.Serialization.cs index dc85645cdb81..a53ec66b23ab 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlAdvisorListResult.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlAdvisorListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class MySqlAdvisorListResult : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(MySqlAdvisorListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } MySqlAdvisorListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlConfigurations.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlConfigurations.Serialization.cs index 242cde2a2d05..ad4c9bb72a9a 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlConfigurations.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlConfigurations.Serialization.cs @@ -18,6 +18,15 @@ public partial class MySqlConfigurations : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(MySqlConfigurations)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Values)) { writer.WritePropertyName("value"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } MySqlConfigurations IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlDatabaseListResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlDatabaseListResult.Serialization.cs index c649866b5a35..ca0a51b0bced 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlDatabaseListResult.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlDatabaseListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class MySqlDatabaseListResult : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(MySqlDatabaseListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } MySqlDatabaseListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlFirewallRuleListResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlFirewallRuleListResult.Serialization.cs index 46be391d0ca6..cdc507e6c047 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlFirewallRuleListResult.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlFirewallRuleListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class MySqlFirewallRuleListResult : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(MySqlFirewallRuleListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } MySqlFirewallRuleListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlLogFile.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlLogFile.Serialization.cs index fe85f2bbed77..f3b536b86b09 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlLogFile.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlLogFile.Serialization.cs @@ -19,6 +19,15 @@ public partial class MySqlLogFile : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(MySqlLogFile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(SizeInKB)) @@ -75,22 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti writer.WriteStringValue(Uri.AbsoluteUri); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } MySqlLogFile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlLogFileListResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlLogFileListResult.Serialization.cs index 65f05bfde626..74441f6ea3bf 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlLogFileListResult.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlLogFileListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class MySqlLogFileListResult : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(MySqlLogFileListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } MySqlLogFileListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlNameAvailabilityContent.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlNameAvailabilityContent.Serialization.cs index 29ce95bc7b0c..0eb07dfadc4b 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlNameAvailabilityContent.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlNameAvailabilityContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class MySqlNameAvailabilityContent : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(MySqlNameAvailabilityContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); if (Optional.IsDefined(ResourceType)) @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } MySqlNameAvailabilityContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlNameAvailabilityResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlNameAvailabilityResult.Serialization.cs index 15235e2c9107..47c013a4d799 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlNameAvailabilityResult.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlNameAvailabilityResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class MySqlNameAvailabilityResult : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(MySqlNameAvailabilityResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Message)) { writer.WritePropertyName("message"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } MySqlNameAvailabilityResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPerformanceTier.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPerformanceTier.Serialization.cs index 22bf512cc4d2..e3aac1587bd0 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPerformanceTier.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPerformanceTier.Serialization.cs @@ -18,6 +18,15 @@ public partial class MySqlPerformanceTier : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(MySqlPerformanceTier)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -86,7 +94,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } MySqlPerformanceTier IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPerformanceTierListResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPerformanceTierListResult.Serialization.cs index 579e5ee3f7e7..f99778e79158 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPerformanceTierListResult.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPerformanceTierListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class MySqlPerformanceTierListResult : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(MySqlPerformanceTierListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } MySqlPerformanceTierListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPerformanceTierServiceLevelObjectives.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPerformanceTierServiceLevelObjectives.Serialization.cs index 21adf0028573..6641e114f8dd 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPerformanceTierServiceLevelObjectives.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPerformanceTierServiceLevelObjectives.Serialization.cs @@ -18,6 +18,15 @@ public partial class MySqlPerformanceTierServiceLevelObjectives : IUtf8JsonSeria void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(MySqlPerformanceTierServiceLevelObjectives)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -81,7 +89,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } MySqlPerformanceTierServiceLevelObjectives IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPrivateEndpointConnectionListResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPrivateEndpointConnectionListResult.Serialization.cs index d8734c7d43e9..5c946144ac26 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPrivateEndpointConnectionListResult.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPrivateEndpointConnectionListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class MySqlPrivateEndpointConnectionListResult : IUtf8JsonSeria void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter w throw new FormatException($"The model {nameof(MySqlPrivateEndpointConnectionListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter w #endif } } - writer.WriteEndObject(); } MySqlPrivateEndpointConnectionListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPrivateEndpointConnectionPatch.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPrivateEndpointConnectionPatch.Serialization.cs index 23e7c77962e1..375546beeb26 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPrivateEndpointConnectionPatch.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPrivateEndpointConnectionPatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class MySqlPrivateEndpointConnectionPatch : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(MySqlPrivateEndpointConnectionPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } MySqlPrivateEndpointConnectionPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPrivateLinkResourceListResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPrivateLinkResourceListResult.Serialization.cs index 8ccd8f7ec0b3..2b77acb75968 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPrivateLinkResourceListResult.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPrivateLinkResourceListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class MySqlPrivateLinkResourceListResult : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(MySqlPrivateLinkResourceListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } MySqlPrivateLinkResourceListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPrivateLinkResourceProperties.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPrivateLinkResourceProperties.Serialization.cs index 18498938a94f..2a4eabf05aca 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPrivateLinkResourceProperties.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPrivateLinkResourceProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class MySqlPrivateLinkResourceProperties : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(MySqlPrivateLinkResourceProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(GroupId)) { writer.WritePropertyName("groupId"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } MySqlPrivateLinkResourceProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPrivateLinkServiceConnectionStateProperty.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPrivateLinkServiceConnectionStateProperty.Serialization.cs index 42864256a585..7f63f5f66775 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPrivateLinkServiceConnectionStateProperty.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPrivateLinkServiceConnectionStateProperty.Serialization.cs @@ -18,6 +18,15 @@ public partial class MySqlPrivateLinkServiceConnectionStateProperty : IUtf8JsonS void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWr throw new FormatException($"The model {nameof(MySqlPrivateLinkServiceConnectionStateProperty)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("status"u8); writer.WriteStringValue(Status); writer.WritePropertyName("description"u8); @@ -50,7 +58,6 @@ void IJsonModel.Write(Utf8JsonWr #endif } } - writer.WriteEndObject(); } MySqlPrivateLinkServiceConnectionStateProperty IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlQueryPerformanceInsightResetDataResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlQueryPerformanceInsightResetDataResult.Serialization.cs index 08614b511d5e..73e402a5630a 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlQueryPerformanceInsightResetDataResult.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlQueryPerformanceInsightResetDataResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class MySqlQueryPerformanceInsightResetDataResult : IUtf8JsonSeri void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWrite throw new FormatException($"The model {nameof(MySqlQueryPerformanceInsightResetDataResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Status)) { writer.WritePropertyName("status"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWrite #endif } } - writer.WriteEndObject(); } MySqlQueryPerformanceInsightResetDataResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlQueryTextListResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlQueryTextListResult.Serialization.cs index 0936c808e9c5..98c7db518ca2 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlQueryTextListResult.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlQueryTextListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class MySqlQueryTextListResult : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(MySqlQueryTextListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } MySqlQueryTextListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlRecommendationActionListResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlRecommendationActionListResult.Serialization.cs index 211257194883..e9da015de77e 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlRecommendationActionListResult.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlRecommendationActionListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class MySqlRecommendationActionListResult : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(MySqlRecommendationActionListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } MySqlRecommendationActionListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlRecoverableServerResourceData.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlRecoverableServerResourceData.Serialization.cs index bd50f62effb4..4fcd6088b0d9 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlRecoverableServerResourceData.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlRecoverableServerResourceData.Serialization.cs @@ -19,6 +19,15 @@ public partial class MySqlRecoverableServerResourceData : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(MySqlRecoverableServerResourceData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(LastAvailableBackupOn)) @@ -80,22 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteStringValue(Version); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } MySqlRecoverableServerResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerAdministratorListResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerAdministratorListResult.Serialization.cs index 67cabddae840..102d1df1318c 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerAdministratorListResult.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerAdministratorListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class MySqlServerAdministratorListResult : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(MySqlServerAdministratorListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } MySqlServerAdministratorListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerCreateOrUpdateContent.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerCreateOrUpdateContent.Serialization.cs index 8ee32dba835d..3e6b0f927d55 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerCreateOrUpdateContent.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerCreateOrUpdateContent.Serialization.cs @@ -19,6 +19,15 @@ public partial class MySqlServerCreateOrUpdateContent : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(MySqlServerCreateOrUpdateContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); @@ -67,7 +75,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } MySqlServerCreateOrUpdateContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerKeyListResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerKeyListResult.Serialization.cs index e85314b9f1bd..cd3299fe3f3e 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerKeyListResult.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerKeyListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class MySqlServerKeyListResult : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(MySqlServerKeyListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } MySqlServerKeyListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerListResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerListResult.Serialization.cs index 38d4581414d8..0e5be17afc55 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerListResult.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class MySqlServerListResult : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(MySqlServerListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } MySqlServerListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPatch.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPatch.Serialization.cs index 116dffd483ed..2d7aefce8722 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPatch.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPatch.Serialization.cs @@ -19,6 +19,15 @@ public partial class MySqlServerPatch : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(MySqlServerPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); @@ -101,7 +109,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } MySqlServerPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPrivateEndpointConnection.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPrivateEndpointConnection.Serialization.cs index 224f4e950297..b7e6d02d2f73 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPrivateEndpointConnection.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPrivateEndpointConnection.Serialization.cs @@ -18,6 +18,15 @@ public partial class MySqlServerPrivateEndpointConnection : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(MySqlServerPrivateEndpointConnection)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } MySqlServerPrivateEndpointConnection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPrivateEndpointConnectionProperties.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPrivateEndpointConnectionProperties.Serialization.cs index d2eb4e08ef1d..11f0f6a547aa 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPrivateEndpointConnectionProperties.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPrivateEndpointConnectionProperties.Serialization.cs @@ -19,6 +19,15 @@ public partial class MySqlServerPrivateEndpointConnectionProperties : IUtf8JsonS void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWr throw new FormatException($"The model {nameof(MySqlServerPrivateEndpointConnectionProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(PrivateEndpoint)) { writer.WritePropertyName("privateEndpoint"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWr #endif } } - writer.WriteEndObject(); } MySqlServerPrivateEndpointConnectionProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPrivateLinkServiceConnectionStateProperty.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPrivateLinkServiceConnectionStateProperty.Serialization.cs index b0fb477a974d..b2a32663692c 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPrivateLinkServiceConnectionStateProperty.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPrivateLinkServiceConnectionStateProperty.Serialization.cs @@ -18,6 +18,15 @@ public partial class MySqlServerPrivateLinkServiceConnectionStateProperty : IUtf void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8 throw new FormatException($"The model {nameof(MySqlServerPrivateLinkServiceConnectionStateProperty)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("status"u8); writer.WriteStringValue(Status.ToString()); writer.WritePropertyName("description"u8); @@ -50,7 +58,6 @@ void IJsonModel.Write(Utf8 #endif } } - writer.WriteEndObject(); } MySqlServerPrivateLinkServiceConnectionStateProperty IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPropertiesForCreate.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPropertiesForCreate.Serialization.cs index d22e86e3ba3d..a9ea7ebb748f 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPropertiesForCreate.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPropertiesForCreate.Serialization.cs @@ -18,6 +18,15 @@ public partial class MySqlServerPropertiesForCreate : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(MySqlServerPropertiesForCreate)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Version)) { writer.WritePropertyName("version"u8); @@ -73,7 +81,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } MySqlServerPropertiesForCreate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPropertiesForDefaultCreate.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPropertiesForDefaultCreate.Serialization.cs index 9e30c7c93820..9a81e64d7cc2 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPropertiesForDefaultCreate.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPropertiesForDefaultCreate.Serialization.cs @@ -18,6 +18,15 @@ public partial class MySqlServerPropertiesForDefaultCreate : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,59 +34,11 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(MySqlServerPropertiesForDefaultCreate)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("administratorLogin"u8); writer.WriteStringValue(AdministratorLogin); writer.WritePropertyName("administratorLoginPassword"u8); writer.WriteStringValue(AdministratorLoginPassword); - if (Optional.IsDefined(Version)) - { - writer.WritePropertyName("version"u8); - writer.WriteStringValue(Version.Value.ToString()); - } - if (Optional.IsDefined(SslEnforcement)) - { - writer.WritePropertyName("sslEnforcement"u8); - writer.WriteStringValue(SslEnforcement.Value.ToSerialString()); - } - if (Optional.IsDefined(MinimalTlsVersion)) - { - writer.WritePropertyName("minimalTlsVersion"u8); - writer.WriteStringValue(MinimalTlsVersion.Value.ToString()); - } - if (Optional.IsDefined(InfrastructureEncryption)) - { - writer.WritePropertyName("infrastructureEncryption"u8); - writer.WriteStringValue(InfrastructureEncryption.Value.ToString()); - } - if (Optional.IsDefined(PublicNetworkAccess)) - { - writer.WritePropertyName("publicNetworkAccess"u8); - writer.WriteStringValue(PublicNetworkAccess.Value.ToString()); - } - if (Optional.IsDefined(StorageProfile)) - { - writer.WritePropertyName("storageProfile"u8); - writer.WriteObjectValue(StorageProfile, options); - } - writer.WritePropertyName("createMode"u8); - writer.WriteStringValue(CreateMode.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } MySqlServerPropertiesForDefaultCreate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPropertiesForGeoRestore.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPropertiesForGeoRestore.Serialization.cs index 1f401f1c9254..430ac10cf3ff 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPropertiesForGeoRestore.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPropertiesForGeoRestore.Serialization.cs @@ -18,6 +18,15 @@ public partial class MySqlServerPropertiesForGeoRestore : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,57 +34,9 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(MySqlServerPropertiesForGeoRestore)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("sourceServerId"u8); writer.WriteStringValue(SourceServerId); - if (Optional.IsDefined(Version)) - { - writer.WritePropertyName("version"u8); - writer.WriteStringValue(Version.Value.ToString()); - } - if (Optional.IsDefined(SslEnforcement)) - { - writer.WritePropertyName("sslEnforcement"u8); - writer.WriteStringValue(SslEnforcement.Value.ToSerialString()); - } - if (Optional.IsDefined(MinimalTlsVersion)) - { - writer.WritePropertyName("minimalTlsVersion"u8); - writer.WriteStringValue(MinimalTlsVersion.Value.ToString()); - } - if (Optional.IsDefined(InfrastructureEncryption)) - { - writer.WritePropertyName("infrastructureEncryption"u8); - writer.WriteStringValue(InfrastructureEncryption.Value.ToString()); - } - if (Optional.IsDefined(PublicNetworkAccess)) - { - writer.WritePropertyName("publicNetworkAccess"u8); - writer.WriteStringValue(PublicNetworkAccess.Value.ToString()); - } - if (Optional.IsDefined(StorageProfile)) - { - writer.WritePropertyName("storageProfile"u8); - writer.WriteObjectValue(StorageProfile, options); - } - writer.WritePropertyName("createMode"u8); - writer.WriteStringValue(CreateMode.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } MySqlServerPropertiesForGeoRestore IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPropertiesForReplica.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPropertiesForReplica.Serialization.cs index 12e9efd3e559..cee0d7299e0e 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPropertiesForReplica.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPropertiesForReplica.Serialization.cs @@ -18,6 +18,15 @@ public partial class MySqlServerPropertiesForReplica : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,57 +34,9 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(MySqlServerPropertiesForReplica)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("sourceServerId"u8); writer.WriteStringValue(SourceServerId); - if (Optional.IsDefined(Version)) - { - writer.WritePropertyName("version"u8); - writer.WriteStringValue(Version.Value.ToString()); - } - if (Optional.IsDefined(SslEnforcement)) - { - writer.WritePropertyName("sslEnforcement"u8); - writer.WriteStringValue(SslEnforcement.Value.ToSerialString()); - } - if (Optional.IsDefined(MinimalTlsVersion)) - { - writer.WritePropertyName("minimalTlsVersion"u8); - writer.WriteStringValue(MinimalTlsVersion.Value.ToString()); - } - if (Optional.IsDefined(InfrastructureEncryption)) - { - writer.WritePropertyName("infrastructureEncryption"u8); - writer.WriteStringValue(InfrastructureEncryption.Value.ToString()); - } - if (Optional.IsDefined(PublicNetworkAccess)) - { - writer.WritePropertyName("publicNetworkAccess"u8); - writer.WriteStringValue(PublicNetworkAccess.Value.ToString()); - } - if (Optional.IsDefined(StorageProfile)) - { - writer.WritePropertyName("storageProfile"u8); - writer.WriteObjectValue(StorageProfile, options); - } - writer.WritePropertyName("createMode"u8); - writer.WriteStringValue(CreateMode.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } MySqlServerPropertiesForReplica IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPropertiesForRestore.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPropertiesForRestore.Serialization.cs index d8cadf042206..55a72696209c 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPropertiesForRestore.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPropertiesForRestore.Serialization.cs @@ -18,6 +18,15 @@ public partial class MySqlServerPropertiesForRestore : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,59 +34,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(MySqlServerPropertiesForRestore)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("sourceServerId"u8); writer.WriteStringValue(SourceServerId); writer.WritePropertyName("restorePointInTime"u8); writer.WriteStringValue(RestorePointInTime, "O"); - if (Optional.IsDefined(Version)) - { - writer.WritePropertyName("version"u8); - writer.WriteStringValue(Version.Value.ToString()); - } - if (Optional.IsDefined(SslEnforcement)) - { - writer.WritePropertyName("sslEnforcement"u8); - writer.WriteStringValue(SslEnforcement.Value.ToSerialString()); - } - if (Optional.IsDefined(MinimalTlsVersion)) - { - writer.WritePropertyName("minimalTlsVersion"u8); - writer.WriteStringValue(MinimalTlsVersion.Value.ToString()); - } - if (Optional.IsDefined(InfrastructureEncryption)) - { - writer.WritePropertyName("infrastructureEncryption"u8); - writer.WriteStringValue(InfrastructureEncryption.Value.ToString()); - } - if (Optional.IsDefined(PublicNetworkAccess)) - { - writer.WritePropertyName("publicNetworkAccess"u8); - writer.WriteStringValue(PublicNetworkAccess.Value.ToString()); - } - if (Optional.IsDefined(StorageProfile)) - { - writer.WritePropertyName("storageProfile"u8); - writer.WriteObjectValue(StorageProfile, options); - } - writer.WritePropertyName("createMode"u8); - writer.WriteStringValue(CreateMode.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } MySqlServerPropertiesForRestore IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerSecurityAlertPolicyListResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerSecurityAlertPolicyListResult.Serialization.cs index 5cc88230daea..ecdf60469fa9 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerSecurityAlertPolicyListResult.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerSecurityAlertPolicyListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class MySqlServerSecurityAlertPolicyListResult : IUtf8JsonSeria void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter w throw new FormatException($"The model {nameof(MySqlServerSecurityAlertPolicyListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter w #endif } } - writer.WriteEndObject(); } MySqlServerSecurityAlertPolicyListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerUpgradeContent.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerUpgradeContent.Serialization.cs index 8b7c702033ef..02855ec32e7a 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerUpgradeContent.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerUpgradeContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class MySqlServerUpgradeContent : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(MySqlServerUpgradeContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(TargetServerVersion)) @@ -49,7 +57,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } MySqlServerUpgradeContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlSku.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlSku.Serialization.cs index 2dcab03b1fd0..c0e9d3044cce 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlSku.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlSku.Serialization.cs @@ -18,6 +18,15 @@ public partial class MySqlSku : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions throw new FormatException($"The model {nameof(MySqlSku)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); if (Optional.IsDefined(Tier)) @@ -63,7 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions #endif } } - writer.WriteEndObject(); } MySqlSku IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlStorageProfile.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlStorageProfile.Serialization.cs index b949e9ce49ff..51c33d06af2b 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlStorageProfile.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlStorageProfile.Serialization.cs @@ -18,6 +18,15 @@ public partial class MySqlStorageProfile : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(MySqlStorageProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(BackupRetentionDays)) { writer.WritePropertyName("backupRetentionDays"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } MySqlStorageProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlTopQueryStatisticsInput.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlTopQueryStatisticsInput.Serialization.cs index f3408411e0b8..9f7be9253de7 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlTopQueryStatisticsInput.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlTopQueryStatisticsInput.Serialization.cs @@ -18,6 +18,15 @@ public partial class MySqlTopQueryStatisticsInput : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(MySqlTopQueryStatisticsInput)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); writer.WritePropertyName("numberOfTopQueries"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } MySqlTopQueryStatisticsInput IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlTopQueryStatisticsListResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlTopQueryStatisticsListResult.Serialization.cs index 05d1c70d121a..347733aec7c0 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlTopQueryStatisticsListResult.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlTopQueryStatisticsListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class MySqlTopQueryStatisticsListResult : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(MySqlTopQueryStatisticsListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } MySqlTopQueryStatisticsListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlVirtualNetworkRuleListResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlVirtualNetworkRuleListResult.Serialization.cs index e2c1d00da639..3505d235499e 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlVirtualNetworkRuleListResult.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlVirtualNetworkRuleListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class MySqlVirtualNetworkRuleListResult : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(MySqlVirtualNetworkRuleListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } MySqlVirtualNetworkRuleListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlWaitStatisticsInput.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlWaitStatisticsInput.Serialization.cs index 283cf4923999..5982081d4d6b 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlWaitStatisticsInput.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlWaitStatisticsInput.Serialization.cs @@ -18,6 +18,15 @@ public partial class MySqlWaitStatisticsInput : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(MySqlWaitStatisticsInput)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); writer.WritePropertyName("observationStartTime"u8); @@ -50,7 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } MySqlWaitStatisticsInput IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlWaitStatisticsListResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlWaitStatisticsListResult.Serialization.cs index ffd4030f0e02..456772ee74eb 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlWaitStatisticsListResult.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlWaitStatisticsListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class MySqlWaitStatisticsListResult : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(MySqlWaitStatisticsListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } MySqlWaitStatisticsListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/UnknownServerPropertiesForCreate.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/UnknownServerPropertiesForCreate.Serialization.cs index 92aa33f53ed7..b34138f6c098 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/UnknownServerPropertiesForCreate.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/UnknownServerPropertiesForCreate.Serialization.cs @@ -18,6 +18,15 @@ internal partial class UnknownServerPropertiesForCreate : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,55 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(MySqlServerPropertiesForCreate)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(Version)) - { - writer.WritePropertyName("version"u8); - writer.WriteStringValue(Version.Value.ToString()); - } - if (Optional.IsDefined(SslEnforcement)) - { - writer.WritePropertyName("sslEnforcement"u8); - writer.WriteStringValue(SslEnforcement.Value.ToSerialString()); - } - if (Optional.IsDefined(MinimalTlsVersion)) - { - writer.WritePropertyName("minimalTlsVersion"u8); - writer.WriteStringValue(MinimalTlsVersion.Value.ToString()); - } - if (Optional.IsDefined(InfrastructureEncryption)) - { - writer.WritePropertyName("infrastructureEncryption"u8); - writer.WriteStringValue(InfrastructureEncryption.Value.ToString()); - } - if (Optional.IsDefined(PublicNetworkAccess)) - { - writer.WritePropertyName("publicNetworkAccess"u8); - writer.WriteStringValue(PublicNetworkAccess.Value.ToString()); - } - if (Optional.IsDefined(StorageProfile)) - { - writer.WritePropertyName("storageProfile"u8); - writer.WriteObjectValue(StorageProfile, options); - } - writer.WritePropertyName("createMode"u8); - writer.WriteStringValue(CreateMode.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } MySqlServerPropertiesForCreate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlAdvisorData.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlAdvisorData.Serialization.cs index 066d3953c587..659a40a1ed76 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlAdvisorData.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlAdvisorData.Serialization.cs @@ -19,6 +19,15 @@ public partial class MySqlAdvisorData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(MySqlAdvisorData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); @@ -39,42 +48,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter } #endif } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } MySqlAdvisorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlConfigurationData.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlConfigurationData.Serialization.cs index 732b89e4a3a7..96d951fb5f38 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlConfigurationData.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlConfigurationData.Serialization.cs @@ -19,6 +19,15 @@ public partial class MySqlConfigurationData : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(MySqlConfigurationData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Value)) @@ -80,22 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader writer.WriteStringValue(Source); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } MySqlConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlDatabaseData.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlDatabaseData.Serialization.cs index bdf1d08aaa0d..5aa5ae055776 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlDatabaseData.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlDatabaseData.Serialization.cs @@ -19,6 +19,15 @@ public partial class MySqlDatabaseData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(MySqlDatabaseData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Charset)) @@ -60,22 +49,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite writer.WriteStringValue(Collation); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } MySqlDatabaseData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlFirewallRuleData.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlFirewallRuleData.Serialization.cs index d8f55dc78a7d..355aed5b865e 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlFirewallRuleData.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlFirewallRuleData.Serialization.cs @@ -20,6 +20,15 @@ public partial class MySqlFirewallRuleData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(MySqlFirewallRuleData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); writer.WritePropertyName("startIpAddress"u8); @@ -55,22 +44,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW writer.WritePropertyName("endIpAddress"u8); writer.WriteStringValue(EndIPAddress.ToString()); writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } MySqlFirewallRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlPrivateEndpointConnectionData.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlPrivateEndpointConnectionData.Serialization.cs index 84f1704edb6b..12e740572982 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlPrivateEndpointConnectionData.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlPrivateEndpointConnectionData.Serialization.cs @@ -21,6 +21,15 @@ public partial class MySqlPrivateEndpointConnectionData : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,27 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(MySqlPrivateEndpointConnectionData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(PrivateEndpoint)) @@ -67,22 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteStringValue(ProvisioningState); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } MySqlPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlPrivateLinkResourceData.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlPrivateLinkResourceData.Serialization.cs index e33281f1657d..90aa7cc55261 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlPrivateLinkResourceData.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlPrivateLinkResourceData.Serialization.cs @@ -20,6 +20,15 @@ public partial class MySqlPrivateLinkResourceData : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,48 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(MySqlPrivateLinkResourceData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); writer.WriteObjectValue(Properties, options); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } MySqlPrivateLinkResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlQueryStatisticData.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlQueryStatisticData.Serialization.cs index 4e2dd1380908..999ddf8caf46 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlQueryStatisticData.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlQueryStatisticData.Serialization.cs @@ -19,6 +19,15 @@ public partial class MySqlQueryStatisticData : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(MySqlQueryStatisticData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(QueryId)) @@ -105,22 +94,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade writer.WriteStringValue(MetricValueUnit); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } MySqlQueryStatisticData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlQueryTextData.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlQueryTextData.Serialization.cs index 929db5ec036c..70501fd7914b 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlQueryTextData.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlQueryTextData.Serialization.cs @@ -19,6 +19,15 @@ public partial class MySqlQueryTextData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(MySqlQueryTextData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(QueryId)) @@ -60,22 +49,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStringValue(QueryText); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } MySqlQueryTextData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlRecommendationActionData.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlRecommendationActionData.Serialization.cs index 0c8a874a4a07..68ee3a96afff 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlRecommendationActionData.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlRecommendationActionData.Serialization.cs @@ -19,6 +19,15 @@ public partial class MySqlRecommendationActionData : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(MySqlRecommendationActionData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(AdvisorName)) @@ -96,22 +85,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode writer.WriteEndObject(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } MySqlRecommendationActionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlServerAdministratorData.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlServerAdministratorData.Serialization.cs index e3c13b3d697d..d3352c1481df 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlServerAdministratorData.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlServerAdministratorData.Serialization.cs @@ -20,6 +20,15 @@ public partial class MySqlServerAdministratorData : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(MySqlServerAdministratorData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(AdministratorType)) @@ -71,22 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model writer.WriteStringValue(TenantId.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } MySqlServerAdministratorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlServerData.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlServerData.Serialization.cs index fcb217cffa6e..6ec9e53b3d1b 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlServerData.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlServerData.Serialization.cs @@ -18,6 +18,15 @@ public partial class MySqlServerData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(MySqlServerData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); @@ -36,39 +45,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO writer.WritePropertyName("sku"u8); writer.WriteObjectValue(Sku, options); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(AdministratorLogin)) @@ -152,22 +128,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } MySqlServerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlServerKeyData.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlServerKeyData.Serialization.cs index 35e5b60cee2f..99b49219a218 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlServerKeyData.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlServerKeyData.Serialization.cs @@ -20,6 +20,15 @@ public partial class MySqlServerKeyData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,32 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(MySqlServerKeyData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(Kind)) { writer.WritePropertyName("kind"u8); writer.WriteStringValue(Kind); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(ServerKeyType)) @@ -71,22 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStringValue(CreatedOn.Value, "O"); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } MySqlServerKeyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlServerSecurityAlertPolicyData.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlServerSecurityAlertPolicyData.Serialization.cs index 2fe6bfb2499e..1a49cf859189 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlServerSecurityAlertPolicyData.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlServerSecurityAlertPolicyData.Serialization.cs @@ -20,6 +20,15 @@ public partial class MySqlServerSecurityAlertPolicyData : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(MySqlServerSecurityAlertPolicyData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(State)) @@ -96,22 +85,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteNumberValue(RetentionDays.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } MySqlServerSecurityAlertPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlVirtualNetworkRuleData.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlVirtualNetworkRuleData.Serialization.cs index 384aa017a026..32ed8b6912f9 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlVirtualNetworkRuleData.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlVirtualNetworkRuleData.Serialization.cs @@ -20,6 +20,15 @@ public partial class MySqlVirtualNetworkRuleData : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(MySqlVirtualNetworkRuleData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(VirtualNetworkSubnetId)) @@ -66,22 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR writer.WriteStringValue(State.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } MySqlVirtualNetworkRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlWaitStatisticData.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlWaitStatisticData.Serialization.cs index b504e4421430..858b15f578f8 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlWaitStatisticData.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlWaitStatisticData.Serialization.cs @@ -19,6 +19,15 @@ public partial class MySqlWaitStatisticData : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(MySqlWaitStatisticData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(StartOn)) @@ -95,22 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader writer.WriteNumberValue(TotalTimeInMinutes.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } MySqlWaitStatisticData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/AdvancedThreatProtectionData.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/AdvancedThreatProtectionData.Serialization.cs index b1f6bf9d1c96..085a6ea51ad8 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/AdvancedThreatProtectionData.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/AdvancedThreatProtectionData.Serialization.cs @@ -20,6 +20,15 @@ public partial class AdvancedThreatProtectionData : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(AdvancedThreatProtectionData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(CreatedOn)) @@ -66,22 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } AdvancedThreatProtectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/AdvancedThreatProtectionListResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/AdvancedThreatProtectionListResult.Serialization.cs index 35239c88c700..d65e982a964e 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/AdvancedThreatProtectionListResult.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/AdvancedThreatProtectionListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class AdvancedThreatProtectionListResult : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(AdvancedThreatProtectionListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } AdvancedThreatProtectionListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/AdvancedThreatProtectionPatch.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/AdvancedThreatProtectionPatch.Serialization.cs index 05fcd10ccbcb..33abc7ef4b75 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/AdvancedThreatProtectionPatch.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/AdvancedThreatProtectionPatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class AdvancedThreatProtectionPatch : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(AdvancedThreatProtectionPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(State)) @@ -49,7 +57,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } AdvancedThreatProtectionPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/CapabilitySetsList.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/CapabilitySetsList.Serialization.cs index 763b413fb464..3691d92a40bb 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/CapabilitySetsList.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/CapabilitySetsList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class CapabilitySetsList : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(CapabilitySetsList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } CapabilitySetsList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/HighAvailabilityValidationEstimation.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/HighAvailabilityValidationEstimation.Serialization.cs index e9d581ec0fa2..75ebbeec8a0e 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/HighAvailabilityValidationEstimation.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/HighAvailabilityValidationEstimation.Serialization.cs @@ -18,6 +18,15 @@ public partial class HighAvailabilityValidationEstimation : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(HighAvailabilityValidationEstimation)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(EstimatedDowntime)) { writer.WritePropertyName("estimatedDowntime"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } HighAvailabilityValidationEstimation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/ImportSourceProperties.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/ImportSourceProperties.Serialization.cs index b796db851df1..9abb6decab2f 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/ImportSourceProperties.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/ImportSourceProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class ImportSourceProperties : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(ImportSourceProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(StorageType)) { writer.WritePropertyName("storageType"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } ImportSourceProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MaintenanceListResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MaintenanceListResult.Serialization.cs index aa88d3ec00e9..931f14c02b8e 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MaintenanceListResult.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MaintenanceListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class MaintenanceListResult : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(MaintenanceListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } MaintenanceListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerAadAdministratorListResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerAadAdministratorListResult.Serialization.cs index 2b62ae1a8a5d..26d417daa57c 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerAadAdministratorListResult.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerAadAdministratorListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class MySqlFlexibleServerAadAdministratorListResult : IUtf8Json void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWri throw new FormatException($"The model {nameof(MySqlFlexibleServerAadAdministratorListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWri #endif } } - writer.WriteEndObject(); } MySqlFlexibleServerAadAdministratorListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerBackupAndExportContent.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerBackupAndExportContent.Serialization.cs index 94f29acc4916..4486c9e30f13 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerBackupAndExportContent.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerBackupAndExportContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class MySqlFlexibleServerBackupAndExportContent : IUtf8JsonSerial void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,27 +34,9 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(MySqlFlexibleServerBackupAndExportContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("targetDetails"u8); writer.WriteObjectValue(TargetDetails, options); - writer.WritePropertyName("backupSettings"u8); - writer.WriteObjectValue(BackupSettings, options); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } MySqlFlexibleServerBackupAndExportContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerBackupAndExportResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerBackupAndExportResult.Serialization.cs index b1526f4d0b21..32d25085b7de 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerBackupAndExportResult.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerBackupAndExportResult.Serialization.cs @@ -19,6 +19,15 @@ public partial class MySqlFlexibleServerBackupAndExportResult : IUtf8JsonSeriali void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter w throw new FormatException($"The model {nameof(MySqlFlexibleServerBackupAndExportResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Status)) { writer.WritePropertyName("status"u8); @@ -52,26 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter w writer.WritePropertyName("error"u8); JsonSerializer.Serialize(writer, Error); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(DatasourceSizeInBytes)) @@ -90,22 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter w writer.WriteStringValue(BackupMetadata); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } MySqlFlexibleServerBackupAndExportResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerBackupContentBase.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerBackupContentBase.Serialization.cs index 562bd1e19969..290576d48878 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerBackupContentBase.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerBackupContentBase.Serialization.cs @@ -18,6 +18,15 @@ public partial class MySqlFlexibleServerBackupContentBase : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(MySqlFlexibleServerBackupContentBase)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("backupSettings"u8); writer.WriteObjectValue(BackupSettings, options); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } MySqlFlexibleServerBackupContentBase IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerBackupListResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerBackupListResult.Serialization.cs index 003580ee2a51..9d0ccb58bc38 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerBackupListResult.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerBackupListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class MySqlFlexibleServerBackupListResult : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(MySqlFlexibleServerBackupListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } MySqlFlexibleServerBackupListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerBackupProperties.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerBackupProperties.Serialization.cs index 58e85c80aaae..9510549c1a91 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerBackupProperties.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerBackupProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class MySqlFlexibleServerBackupProperties : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(MySqlFlexibleServerBackupProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(BackupRetentionDays)) { writer.WritePropertyName("backupRetentionDays"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } MySqlFlexibleServerBackupProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerBackupSettings.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerBackupSettings.Serialization.cs index f28eb880cb4f..f38e9e1b533d 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerBackupSettings.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerBackupSettings.Serialization.cs @@ -18,6 +18,15 @@ public partial class MySqlFlexibleServerBackupSettings : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(MySqlFlexibleServerBackupSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("backupName"u8); writer.WriteStringValue(BackupName); if (Optional.IsDefined(BackupFormat)) @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } MySqlFlexibleServerBackupSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerBackupStoreDetails.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerBackupStoreDetails.Serialization.cs index efdc7a01258a..a8ed72ef5ebe 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerBackupStoreDetails.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerBackupStoreDetails.Serialization.cs @@ -18,6 +18,15 @@ public partial class MySqlFlexibleServerBackupStoreDetails : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(MySqlFlexibleServerBackupStoreDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("objectType"u8); writer.WriteStringValue(ObjectType); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } MySqlFlexibleServerBackupStoreDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerCapabilitiesListResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerCapabilitiesListResult.Serialization.cs index dc189cde9779..fe6d341b4d75 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerCapabilitiesListResult.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerCapabilitiesListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class MySqlFlexibleServerCapabilitiesListResult : IUtf8JsonSeri void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(MySqlFlexibleServerCapabilitiesListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } MySqlFlexibleServerCapabilitiesListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerCapabilityProperties.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerCapabilityProperties.Serialization.cs index 80a807d6f4d9..45122abd42fb 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerCapabilityProperties.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerCapabilityProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class MySqlFlexibleServerCapabilityProperties : IUtf8JsonSerializ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wr throw new FormatException($"The model {nameof(MySqlFlexibleServerCapabilityProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Zone)) { writer.WritePropertyName("zone"u8); @@ -76,7 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter wr #endif } } - writer.WriteEndObject(); } MySqlFlexibleServerCapabilityProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerConfigurationForBatchUpdate.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerConfigurationForBatchUpdate.Serialization.cs index a3d5899b6595..ce23c71ee316 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerConfigurationForBatchUpdate.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerConfigurationForBatchUpdate.Serialization.cs @@ -18,6 +18,15 @@ public partial class MySqlFlexibleServerConfigurationForBatchUpdate : IUtf8JsonS void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWr throw new FormatException($"The model {nameof(MySqlFlexibleServerConfigurationForBatchUpdate)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -59,7 +67,6 @@ void IJsonModel.Write(Utf8JsonWr #endif } } - writer.WriteEndObject(); } MySqlFlexibleServerConfigurationForBatchUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerConfigurationListForBatchUpdate.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerConfigurationListForBatchUpdate.Serialization.cs index 131f9f930615..5b2d44621dd6 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerConfigurationListForBatchUpdate.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerConfigurationListForBatchUpdate.Serialization.cs @@ -18,6 +18,15 @@ public partial class MySqlFlexibleServerConfigurationListForBatchUpdate : IUtf8J void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8Js throw new FormatException($"The model {nameof(MySqlFlexibleServerConfigurationListForBatchUpdate)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Values)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8Js #endif } } - writer.WriteEndObject(); } MySqlFlexibleServerConfigurationListForBatchUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerConfigurationListResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerConfigurationListResult.Serialization.cs index 78c082ebbda2..08b17eb1cc7b 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerConfigurationListResult.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerConfigurationListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class MySqlFlexibleServerConfigurationListResult : IUtf8JsonSer void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(MySqlFlexibleServerConfigurationListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Values)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } MySqlFlexibleServerConfigurationListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerConfigurations.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerConfigurations.Serialization.cs index 2b57d9e0b3a2..fd6e055a6761 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerConfigurations.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerConfigurations.Serialization.cs @@ -18,6 +18,15 @@ public partial class MySqlFlexibleServerConfigurations : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(MySqlFlexibleServerConfigurations)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Values)) { writer.WritePropertyName("values"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } MySqlFlexibleServerConfigurations IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerDataEncryption.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerDataEncryption.Serialization.cs index e0db82020556..c465ad3788e9 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerDataEncryption.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerDataEncryption.Serialization.cs @@ -18,6 +18,15 @@ public partial class MySqlFlexibleServerDataEncryption : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(MySqlFlexibleServerDataEncryption)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(PrimaryUserAssignedIdentityId)) { writer.WritePropertyName("primaryUserAssignedIdentityId"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } MySqlFlexibleServerDataEncryption IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerDatabaseListResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerDatabaseListResult.Serialization.cs index df412c80f3fd..8bec2540e1c0 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerDatabaseListResult.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerDatabaseListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class MySqlFlexibleServerDatabaseListResult : IUtf8JsonSerializ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(MySqlFlexibleServerDatabaseListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } MySqlFlexibleServerDatabaseListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerDelegatedSubnetUsage.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerDelegatedSubnetUsage.Serialization.cs index cac4531dab38..b8f7a270c8f8 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerDelegatedSubnetUsage.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerDelegatedSubnetUsage.Serialization.cs @@ -18,6 +18,15 @@ public partial class MySqlFlexibleServerDelegatedSubnetUsage : IUtf8JsonSerializ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wr throw new FormatException($"The model {nameof(MySqlFlexibleServerDelegatedSubnetUsage)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(SubnetName)) { writer.WritePropertyName("subnetName"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter wr #endif } } - writer.WriteEndObject(); } MySqlFlexibleServerDelegatedSubnetUsage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerEditionCapability.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerEditionCapability.Serialization.cs index 3d743cbd41c0..4a0c9901de3a 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerEditionCapability.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerEditionCapability.Serialization.cs @@ -18,6 +18,15 @@ public partial class MySqlFlexibleServerEditionCapability : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(MySqlFlexibleServerEditionCapability)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } MySqlFlexibleServerEditionCapability IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerFirewallRuleListResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerFirewallRuleListResult.Serialization.cs index 2d4bea19eeae..38ad0e20c948 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerFirewallRuleListResult.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerFirewallRuleListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class MySqlFlexibleServerFirewallRuleListResult : IUtf8JsonSeri void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(MySqlFlexibleServerFirewallRuleListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } MySqlFlexibleServerFirewallRuleListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerFullBackupStoreDetails.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerFullBackupStoreDetails.Serialization.cs index 96229e043fa2..702b9d464479 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerFullBackupStoreDetails.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerFullBackupStoreDetails.Serialization.cs @@ -18,6 +18,15 @@ public partial class MySqlFlexibleServerFullBackupStoreDetails : IUtf8JsonSerial void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(MySqlFlexibleServerFullBackupStoreDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("sasUriList"u8); writer.WriteStartArray(); foreach (var item in SasUriList) @@ -33,24 +42,6 @@ void IJsonModel.Write(Utf8JsonWriter writer.WriteStringValue(item); } writer.WriteEndArray(); - writer.WritePropertyName("objectType"u8); - writer.WriteStringValue(ObjectType); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } MySqlFlexibleServerFullBackupStoreDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerGtidSetContent.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerGtidSetContent.Serialization.cs index 9cb03663b435..b94379abb13f 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerGtidSetContent.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerGtidSetContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class MySqlFlexibleServerGtidSetContent : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(MySqlFlexibleServerGtidSetContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(GtidSet)) { writer.WritePropertyName("gtidSet"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } MySqlFlexibleServerGtidSetContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerHighAvailability.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerHighAvailability.Serialization.cs index aa891a4d07a2..463aba17988a 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerHighAvailability.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerHighAvailability.Serialization.cs @@ -18,6 +18,15 @@ public partial class MySqlFlexibleServerHighAvailability : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(MySqlFlexibleServerHighAvailability)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Mode)) { writer.WritePropertyName("mode"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } MySqlFlexibleServerHighAvailability IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerListResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerListResult.Serialization.cs index a3b9b5f8d4c5..a17ad46885e1 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerListResult.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class MySqlFlexibleServerListResult : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(MySqlFlexibleServerListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } MySqlFlexibleServerListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerLogFile.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerLogFile.Serialization.cs index d40653ea7655..45557620f9cf 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerLogFile.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerLogFile.Serialization.cs @@ -19,6 +19,15 @@ public partial class MySqlFlexibleServerLogFile : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(MySqlFlexibleServerLogFile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(SizeInKB)) @@ -75,22 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe writer.WriteStringValue(Uri.AbsoluteUri); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } MySqlFlexibleServerLogFile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerLogFileListResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerLogFileListResult.Serialization.cs index 0a08faf6ce60..66121c221204 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerLogFileListResult.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerLogFileListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class MySqlFlexibleServerLogFileListResult : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(MySqlFlexibleServerLogFileListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } MySqlFlexibleServerLogFileListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerMaintenancePatch.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerMaintenancePatch.Serialization.cs index 0aaad958edf4..b1b9e1d96999 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerMaintenancePatch.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerMaintenancePatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class MySqlFlexibleServerMaintenancePatch : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(MySqlFlexibleServerMaintenancePatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(MaintenanceStartOn)) @@ -49,7 +57,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } MySqlFlexibleServerMaintenancePatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerMaintenanceWindow.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerMaintenanceWindow.Serialization.cs index f9fc0ef00821..32263aa3d236 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerMaintenanceWindow.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerMaintenanceWindow.Serialization.cs @@ -18,6 +18,15 @@ public partial class MySqlFlexibleServerMaintenanceWindow : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(MySqlFlexibleServerMaintenanceWindow)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(CustomWindow)) { writer.WritePropertyName("customWindow"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } MySqlFlexibleServerMaintenanceWindow IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerNameAvailabilityContent.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerNameAvailabilityContent.Serialization.cs index 3fb2eb5d8794..1405013e09b6 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerNameAvailabilityContent.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerNameAvailabilityContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class MySqlFlexibleServerNameAvailabilityContent : IUtf8JsonSeria void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(MySqlFlexibleServerNameAvailabilityContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); if (Optional.IsDefined(ResourceType)) @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } MySqlFlexibleServerNameAvailabilityContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerNameAvailabilityResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerNameAvailabilityResult.Serialization.cs index cc366c3e01eb..1d6e10da4cb2 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerNameAvailabilityResult.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerNameAvailabilityResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class MySqlFlexibleServerNameAvailabilityResult : IUtf8JsonSerial void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(MySqlFlexibleServerNameAvailabilityResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Message)) { writer.WritePropertyName("message"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } MySqlFlexibleServerNameAvailabilityResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerNetwork.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerNetwork.Serialization.cs index eb95eba07af4..ff3c19f9b496 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerNetwork.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerNetwork.Serialization.cs @@ -18,6 +18,15 @@ public partial class MySqlFlexibleServerNetwork : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(MySqlFlexibleServerNetwork)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(PublicNetworkAccess)) { writer.WritePropertyName("publicNetworkAccess"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } MySqlFlexibleServerNetwork IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerPatch.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerPatch.Serialization.cs index 6026c85880fb..46f2324ad391 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerPatch.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerPatch.Serialization.cs @@ -19,6 +19,15 @@ public partial class MySqlFlexibleServerPatch : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(MySqlFlexibleServerPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); @@ -111,7 +119,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } MySqlFlexibleServerPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerPrivateDnsZoneSuffixResponse.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerPrivateDnsZoneSuffixResponse.Serialization.cs index 0284b1a000c1..7d09135a0b41 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerPrivateDnsZoneSuffixResponse.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerPrivateDnsZoneSuffixResponse.Serialization.cs @@ -18,6 +18,15 @@ public partial class MySqlFlexibleServerPrivateDnsZoneSuffixResponse : IUtf8Json void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonW throw new FormatException($"The model {nameof(MySqlFlexibleServerPrivateDnsZoneSuffixResponse)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(PrivateDnsZoneSuffix)) { writer.WritePropertyName("privateDnsZoneSuffix"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonW #endif } } - writer.WriteEndObject(); } MySqlFlexibleServerPrivateDnsZoneSuffixResponse IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerRestartParameter.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerRestartParameter.Serialization.cs index 8886e311a862..f3c7355954ed 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerRestartParameter.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerRestartParameter.Serialization.cs @@ -18,6 +18,15 @@ public partial class MySqlFlexibleServerRestartParameter : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(MySqlFlexibleServerRestartParameter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(RestartWithFailover)) { writer.WritePropertyName("restartWithFailover"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } MySqlFlexibleServerRestartParameter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerServerVersionCapability.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerServerVersionCapability.Serialization.cs index 338d57c9d43c..177ec5ed4881 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerServerVersionCapability.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerServerVersionCapability.Serialization.cs @@ -18,6 +18,15 @@ public partial class MySqlFlexibleServerServerVersionCapability : IUtf8JsonSeria void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(MySqlFlexibleServerServerVersionCapability)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } MySqlFlexibleServerServerVersionCapability IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerSku.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerSku.Serialization.cs index 0fb0c2941ab9..9e817e7269a3 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerSku.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerSku.Serialization.cs @@ -18,6 +18,15 @@ public partial class MySqlFlexibleServerSku : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(MySqlFlexibleServerSku)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); writer.WritePropertyName("tier"u8); @@ -45,7 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } MySqlFlexibleServerSku IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerSkuCapability.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerSkuCapability.Serialization.cs index 6b88fb2f838f..c401297b35b8 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerSkuCapability.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerSkuCapability.Serialization.cs @@ -18,6 +18,15 @@ public partial class MySqlFlexibleServerSkuCapability : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(MySqlFlexibleServerSkuCapability)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } MySqlFlexibleServerSkuCapability IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerStorage.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerStorage.Serialization.cs index e192ec4ed4f7..568c846d1efa 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerStorage.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerStorage.Serialization.cs @@ -18,6 +18,15 @@ public partial class MySqlFlexibleServerStorage : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(MySqlFlexibleServerStorage)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(StorageSizeInGB)) { writer.WritePropertyName("storageSizeGB"u8); @@ -71,7 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } MySqlFlexibleServerStorage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerStorageEditionCapability.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerStorageEditionCapability.Serialization.cs index e4cb481391c8..926f7be0ff52 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerStorageEditionCapability.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerStorageEditionCapability.Serialization.cs @@ -18,6 +18,15 @@ public partial class MySqlFlexibleServerStorageEditionCapability : IUtf8JsonSeri void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWrite throw new FormatException($"The model {nameof(MySqlFlexibleServerStorageEditionCapability)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -76,7 +84,6 @@ void IJsonModel.Write(Utf8JsonWrite #endif } } - writer.WriteEndObject(); } MySqlFlexibleServerStorageEditionCapability IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerValidateBackupResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerValidateBackupResult.Serialization.cs index 9fc7e5f6e91a..f8acda3f75f6 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerValidateBackupResult.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerValidateBackupResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class MySqlFlexibleServerValidateBackupResult : IUtf8JsonSerializ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wr throw new FormatException($"The model {nameof(MySqlFlexibleServerValidateBackupResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(NumberOfContainers)) @@ -49,7 +57,6 @@ void IJsonModel.Write(Utf8JsonWriter wr #endif } } - writer.WriteEndObject(); } MySqlFlexibleServerValidateBackupResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerVirtualNetworkSubnetUsageParameter.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerVirtualNetworkSubnetUsageParameter.Serialization.cs index a1d83525ae18..b928773de868 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerVirtualNetworkSubnetUsageParameter.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerVirtualNetworkSubnetUsageParameter.Serialization.cs @@ -18,6 +18,15 @@ public partial class MySqlFlexibleServerVirtualNetworkSubnetUsageParameter : IUt void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf throw new FormatException($"The model {nameof(MySqlFlexibleServerVirtualNetworkSubnetUsageParameter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(VirtualNetworkResourceId)) { writer.WritePropertyName("virtualNetworkResourceId"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf #endif } } - writer.WriteEndObject(); } MySqlFlexibleServerVirtualNetworkSubnetUsageParameter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerVirtualNetworkSubnetUsageResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerVirtualNetworkSubnetUsageResult.Serialization.cs index d3668d4f5dca..6ce777de2725 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerVirtualNetworkSubnetUsageResult.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerVirtualNetworkSubnetUsageResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class MySqlFlexibleServerVirtualNetworkSubnetUsageResult : IUtf8J void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8Js throw new FormatException($"The model {nameof(MySqlFlexibleServerVirtualNetworkSubnetUsageResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Location)) { writer.WritePropertyName("location"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8Js #endif } } - writer.WriteEndObject(); } MySqlFlexibleServerVirtualNetworkSubnetUsageResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServersPrivateEndpointConnection.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServersPrivateEndpointConnection.Serialization.cs index 0447f3d43fca..06faf1e82607 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServersPrivateEndpointConnection.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServersPrivateEndpointConnection.Serialization.cs @@ -20,6 +20,15 @@ public partial class MySqlFlexibleServersPrivateEndpointConnection : IUtf8JsonSe void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWri throw new FormatException($"The model {nameof(MySqlFlexibleServersPrivateEndpointConnection)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(GroupIds)) @@ -76,22 +65,6 @@ void IJsonModel.Write(Utf8JsonWri writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } MySqlFlexibleServersPrivateEndpointConnection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServersPrivateLinkServiceConnectionState.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServersPrivateLinkServiceConnectionState.Serialization.cs index b61e7cc3b87f..12148301ee9d 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServersPrivateLinkServiceConnectionState.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServersPrivateLinkServiceConnectionState.Serialization.cs @@ -18,6 +18,15 @@ public partial class MySqlFlexibleServersPrivateLinkServiceConnectionState : IUt void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf throw new FormatException($"The model {nameof(MySqlFlexibleServersPrivateLinkServiceConnectionState)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Status)) { writer.WritePropertyName("status"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf #endif } } - writer.WriteEndObject(); } MySqlFlexibleServersPrivateLinkServiceConnectionState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/OperationStatusExtendedResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/OperationStatusExtendedResult.Serialization.cs index 87cc84bdc684..0801317a169e 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/OperationStatusExtendedResult.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/OperationStatusExtendedResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class OperationStatusExtendedResult : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(OperationStatusExtendedResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(Properties)) { writer.WritePropertyName("properties"u8); @@ -49,69 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode } writer.WriteEndObject(); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(ResourceId)) - { - writer.WritePropertyName("resourceId"u8); - writer.WriteStringValue(ResourceId); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - writer.WritePropertyName("status"u8); - writer.WriteStringValue(Status); - if (Optional.IsDefined(PercentComplete)) - { - writer.WritePropertyName("percentComplete"u8); - writer.WriteNumberValue(PercentComplete.Value); - } - if (Optional.IsDefined(StartOn)) - { - writer.WritePropertyName("startTime"u8); - writer.WriteStringValue(StartOn.Value, "O"); - } - if (Optional.IsDefined(EndOn)) - { - writer.WritePropertyName("endTime"u8); - writer.WriteStringValue(EndOn.Value, "O"); - } - if (Optional.IsCollectionDefined(Operations)) - { - writer.WritePropertyName("operations"u8); - writer.WriteStartArray(); - foreach (var item in Operations) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Error)) - { - writer.WritePropertyName("error"u8); - JsonSerializer.Serialize(writer, Error); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } OperationStatusExtendedResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/OperationStatusResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/OperationStatusResult.Serialization.cs index cf05aa4655f1..897e0403682a 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/OperationStatusResult.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/OperationStatusResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class OperationStatusResult : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(OperationStatusResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -88,7 +96,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } OperationStatusResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/ServerBackupV2ListResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/ServerBackupV2ListResult.Serialization.cs index 17894b45ecda..c0d8c40827c9 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/ServerBackupV2ListResult.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/ServerBackupV2ListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ServerBackupV2ListResult : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(ServerBackupV2ListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } ServerBackupV2ListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/ServerEditionCapabilityV2.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/ServerEditionCapabilityV2.Serialization.cs index 56ef056a11bd..ecb424862991 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/ServerEditionCapabilityV2.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/ServerEditionCapabilityV2.Serialization.cs @@ -18,6 +18,15 @@ public partial class ServerEditionCapabilityV2 : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(ServerEditionCapabilityV2)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -76,7 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } ServerEditionCapabilityV2 IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/ServerVersionCapabilityV2.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/ServerVersionCapabilityV2.Serialization.cs index ba3941b3ed64..cf52d71456df 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/ServerVersionCapabilityV2.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/ServerVersionCapabilityV2.Serialization.cs @@ -18,6 +18,15 @@ public partial class ServerVersionCapabilityV2 : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(ServerVersionCapabilityV2)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } ServerVersionCapabilityV2 IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/SkuCapabilityV2.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/SkuCapabilityV2.Serialization.cs index d8207f92c10b..23eae0a485b1 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/SkuCapabilityV2.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/SkuCapabilityV2.Serialization.cs @@ -18,6 +18,15 @@ public partial class SkuCapabilityV2 : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(SkuCapabilityV2)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -81,7 +89,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO #endif } } - writer.WriteEndObject(); } SkuCapabilityV2 IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/UnknownBackupStoreDetails.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/UnknownBackupStoreDetails.Serialization.cs index ef52331f1176..8d52b48f41f7 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/UnknownBackupStoreDetails.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/UnknownBackupStoreDetails.Serialization.cs @@ -18,6 +18,15 @@ internal partial class UnknownBackupStoreDetails : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,25 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(MySqlFlexibleServerBackupStoreDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("objectType"u8); - writer.WriteStringValue(ObjectType); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } MySqlFlexibleServerBackupStoreDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerAadAdministratorData.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerAadAdministratorData.Serialization.cs index 6240cd736737..2087bd0b6f08 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerAadAdministratorData.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerAadAdministratorData.Serialization.cs @@ -20,6 +20,15 @@ public partial class MySqlFlexibleServerAadAdministratorData : IUtf8JsonSerializ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter wr throw new FormatException($"The model {nameof(MySqlFlexibleServerAadAdministratorData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(AdministratorType)) @@ -76,22 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter wr writer.WriteStringValue(IdentityResourceId); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } MySqlFlexibleServerAadAdministratorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerBackupData.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerBackupData.Serialization.cs index 292d46cd329e..584bdb1c93f6 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerBackupData.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerBackupData.Serialization.cs @@ -19,6 +19,15 @@ public partial class MySqlFlexibleServerBackupData : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(MySqlFlexibleServerBackupData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(BackupType)) @@ -65,22 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode writer.WriteStringValue(Source); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } MySqlFlexibleServerBackupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerBackupV2Data.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerBackupV2Data.Serialization.cs index fe910898cb83..ec5d1d716ede 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerBackupV2Data.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerBackupV2Data.Serialization.cs @@ -20,6 +20,15 @@ public partial class MySqlFlexibleServerBackupV2Data : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(MySqlFlexibleServerBackupV2Data)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(BackupNameV2)) @@ -76,22 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } MySqlFlexibleServerBackupV2Data IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerConfigurationData.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerConfigurationData.Serialization.cs index c9bb25a06cee..4d4a3e192461 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerConfigurationData.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerConfigurationData.Serialization.cs @@ -20,6 +20,15 @@ public partial class MySqlFlexibleServerConfigurationData : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(MySqlFlexibleServerConfigurationData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Value)) @@ -106,22 +95,6 @@ void IJsonModel.Write(Utf8JsonWriter write writer.WriteStringValue(IsDynamicConfig.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } MySqlFlexibleServerConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerData.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerData.Serialization.cs index 3724958e8ffb..3c32fd4f335a 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerData.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerData.Serialization.cs @@ -20,6 +20,15 @@ public partial class MySqlFlexibleServerData : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(MySqlFlexibleServerData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); @@ -38,39 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade writer.WritePropertyName("sku"u8); writer.WriteObjectValue(Sku, options); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(AdministratorLogin)) @@ -174,22 +150,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade writer.WriteObjectValue(ImportSourceProperties, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } MySqlFlexibleServerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerDatabaseData.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerDatabaseData.Serialization.cs index 392bae956e3b..b7a4db74c86c 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerDatabaseData.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerDatabaseData.Serialization.cs @@ -19,6 +19,15 @@ public partial class MySqlFlexibleServerDatabaseData : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(MySqlFlexibleServerDatabaseData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Charset)) @@ -60,22 +49,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo writer.WriteStringValue(Collation); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } MySqlFlexibleServerDatabaseData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerFirewallRuleData.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerFirewallRuleData.Serialization.cs index 3c5eff8d56d9..e072edca5fc2 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerFirewallRuleData.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerFirewallRuleData.Serialization.cs @@ -20,6 +20,15 @@ public partial class MySqlFlexibleServerFirewallRuleData : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(MySqlFlexibleServerFirewallRuleData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); writer.WritePropertyName("startIpAddress"u8); @@ -55,22 +44,6 @@ void IJsonModel.Write(Utf8JsonWriter writer writer.WritePropertyName("endIpAddress"u8); writer.WriteStringValue(EndIPAddress.ToString()); writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } MySqlFlexibleServerFirewallRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerMaintenanceData.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerMaintenanceData.Serialization.cs index 82f214ff6a6c..8a1af6708a9d 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerMaintenanceData.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerMaintenanceData.Serialization.cs @@ -20,6 +20,15 @@ public partial class MySqlFlexibleServerMaintenanceData : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(MySqlFlexibleServerMaintenanceData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(MaintenanceType)) @@ -106,22 +95,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } MySqlFlexibleServerMaintenanceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServersCapabilityData.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServersCapabilityData.Serialization.cs index 35b6b06905e9..a0ef20f68730 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServersCapabilityData.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServersCapabilityData.Serialization.cs @@ -20,6 +20,15 @@ public partial class MySqlFlexibleServersCapabilityData : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(MySqlFlexibleServersCapabilityData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(SupportedGeoBackupRegions)) @@ -81,22 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } MySqlFlexibleServersCapabilityData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/autorest.md b/sdk/mysql/Azure.ResourceManager.MySql/src/autorest.md index ca0d26e1e5af..5d7d26d41a88 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/autorest.md +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/autorest.md @@ -11,6 +11,7 @@ library-name: MySql #mgmt-debug: # show-serialized-names: true use-model-reader-writer: true +use-write-core: true batch: - tag: package-2020-01-01 diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/CHANGELOG.md b/sdk/netapp/Azure.ResourceManager.NetApp/CHANGELOG.md index 3e149029bb43..9389f3a99d98 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/CHANGELOG.md +++ b/sdk/netapp/Azure.ResourceManager.NetApp/CHANGELOG.md @@ -5,6 +5,11 @@ ### Features Added - Exposed `JsonModelWriteCore` for model serialization procedure. +- Upgraded api-version to 'package-netapp-2024-07-01'. +- Added support for external migration replication volumes with operations `PeerExternalClusterAsync`, `AuthorizeExternalReplicationAsync`, `PerformReplicationTransferAsync`, `FinalizeExternalReplicationAsync` +- Added `RemotePath` to `ReplicationObject` +- Added `AvailabilityZone` to `FilePathAvailabilityRequest` +- Added read-only property `EffectiveNetworkFeatures` to `Volume` `VolumeProperties` and `VolumeGroupVolumeProperties` ### Breaking Changes diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/api/Azure.ResourceManager.NetApp.netstandard2.0.cs b/sdk/netapp/Azure.ResourceManager.NetApp/api/Azure.ResourceManager.NetApp.netstandard2.0.cs index 88c7fb2a055c..6299b175344c 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/api/Azure.ResourceManager.NetApp.netstandard2.0.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/api/Azure.ResourceManager.NetApp.netstandard2.0.cs @@ -538,6 +538,7 @@ public NetAppVolumeData(Azure.Core.AzureLocation location, string creationToken, public long? DefaultGroupQuotaInKiBs { get { throw null; } set { } } public long? DefaultUserQuotaInKiBs { get { throw null; } set { } } public bool? DeleteBaseSnapshot { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.NetAppNetworkFeature? EffectiveNetworkFeatures { get { throw null; } } public Azure.ResourceManager.NetApp.Models.EnableNetAppSubvolume? EnableSubvolumes { get { throw null; } set { } } public Azure.ResourceManager.NetApp.Models.NetAppEncryptionKeySource? EncryptionKeySource { get { throw null; } set { } } public Azure.ETag? ETag { get { throw null; } } @@ -696,6 +697,8 @@ protected NetAppVolumeResource() { } public virtual bool HasData { get { throw null; } } public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation AuthorizeExternalReplication(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> AuthorizeExternalReplicationAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ArmOperation AuthorizeReplication(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetApp.Models.NetAppVolumeAuthorizeReplicationContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task AuthorizeReplicationAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetApp.Models.NetAppVolumeAuthorizeReplicationContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ArmOperation BreakFileLocks(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetApp.Models.NetAppVolumeBreakFileLocksContent content = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -707,6 +710,8 @@ protected NetAppVolumeResource() { } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, bool? forceDelete = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ArmOperation DeleteReplication(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteReplicationAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation FinalizeExternalReplication(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task FinalizeExternalReplicationAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ArmOperation FinalizeRelocation(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task FinalizeRelocationAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -744,6 +749,10 @@ protected NetAppVolumeResource() { } public virtual System.Threading.Tasks.Task> GetVolumeLatestRestoreStatusBackupAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ArmOperation MigrateBackupsBackupsUnderVolume(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetApp.Models.BackupsMigrationContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task MigrateBackupsBackupsUnderVolumeAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetApp.Models.BackupsMigrationContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation PeerExternalCluster(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetApp.Models.PeerClusterForVolumeMigrationContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> PeerExternalClusterAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetApp.Models.PeerClusterForVolumeMigrationContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation PerformReplicationTransfer(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task PerformReplicationTransferAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ArmOperation PoolChange(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetApp.Models.NetAppVolumePoolChangeContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task PoolChangeAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetApp.Models.NetAppVolumePoolChangeContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ArmOperation PopulateAvailabilityZone(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -993,6 +1002,7 @@ public static partial class ArmNetAppModelFactory public static Azure.ResourceManager.NetApp.Models.AvailabilityZoneMapping AvailabilityZoneMapping(string availabilityZone = null, bool? isAvailable = default(bool?)) { throw null; } public static Azure.ResourceManager.NetApp.CapacityPoolData CapacityPoolData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ETag? etag = default(Azure.ETag?), System.Guid? poolId = default(System.Guid?), long size = (long)0, Azure.ResourceManager.NetApp.Models.NetAppFileServiceLevel serviceLevel = default(Azure.ResourceManager.NetApp.Models.NetAppFileServiceLevel), string provisioningState = null, float? totalThroughputMibps = default(float?), float? utilizedThroughputMibps = default(float?), Azure.ResourceManager.NetApp.Models.CapacityPoolQosType? qosType = default(Azure.ResourceManager.NetApp.Models.CapacityPoolQosType?), bool? isCoolAccessEnabled = default(bool?), Azure.ResourceManager.NetApp.Models.CapacityPoolEncryptionType? encryptionType = default(Azure.ResourceManager.NetApp.Models.CapacityPoolEncryptionType?)) { throw null; } public static Azure.ResourceManager.NetApp.Models.CapacityPoolPatch CapacityPoolPatch(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), long? size = default(long?), Azure.ResourceManager.NetApp.Models.CapacityPoolQosType? qosType = default(Azure.ResourceManager.NetApp.Models.CapacityPoolQosType?), bool? isCoolAccessEnabled = default(bool?)) { throw null; } + public static Azure.ResourceManager.NetApp.Models.ClusterPeerCommandResult ClusterPeerCommandResult(string peerAcceptCommand = null) { throw null; } public static Azure.ResourceManager.NetApp.Models.GetGroupIdListForLdapUserResult GetGroupIdListForLdapUserResult(System.Collections.Generic.IEnumerable groupIdsForLdapUser = null) { throw null; } public static Azure.ResourceManager.NetApp.Models.NetAppAccountActiveDirectory NetAppAccountActiveDirectory(string activeDirectoryId = null, string username = null, string password = null, string domain = null, string dns = null, Azure.ResourceManager.NetApp.Models.NetAppAccountActiveDirectoryStatus? status = default(Azure.ResourceManager.NetApp.Models.NetAppAccountActiveDirectoryStatus?), string statusDetails = null, string smbServerName = null, string organizationalUnit = null, string site = null, System.Collections.Generic.IEnumerable backupOperators = null, System.Collections.Generic.IEnumerable administrators = null, System.Net.IPAddress kdcIP = null, string adName = null, string serverRootCACertificate = null, bool? isAesEncryptionEnabled = default(bool?), bool? isLdapSigningEnabled = default(bool?), System.Collections.Generic.IEnumerable securityOperators = null, bool? isLdapOverTlsEnabled = default(bool?), bool? allowLocalNfsUsersWithLdap = default(bool?), bool? encryptDCConnections = default(bool?), Azure.ResourceManager.NetApp.Models.NetAppLdapSearchScopeConfiguration ldapSearchScope = null, string preferredServersForLdapClient = null) { throw null; } public static Azure.ResourceManager.NetApp.NetAppAccountData NetAppAccountData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ETag? etag = default(Azure.ETag?), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, string provisioningState = null, System.Collections.Generic.IEnumerable activeDirectories = null, Azure.ResourceManager.NetApp.Models.NetAppAccountEncryption encryption = null, bool? disableShowmount = default(bool?)) { throw null; } @@ -1006,10 +1016,13 @@ public static partial class ArmNetAppModelFactory public static Azure.ResourceManager.NetApp.NetAppBackupVaultData NetAppBackupVaultData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), string provisioningState = null) { throw null; } public static Azure.ResourceManager.NetApp.Models.NetAppCheckAvailabilityResult NetAppCheckAvailabilityResult(bool? isAvailable = default(bool?), Azure.ResourceManager.NetApp.Models.NetAppNameUnavailableReason? reason = default(Azure.ResourceManager.NetApp.Models.NetAppNameUnavailableReason?), string message = null) { throw null; } public static Azure.ResourceManager.NetApp.Models.NetAppEncryptionIdentity NetAppEncryptionIdentity(string principalId = null, string userAssignedIdentity = null) { throw null; } + public static Azure.ResourceManager.NetApp.Models.NetAppFilePathAvailabilityContent NetAppFilePathAvailabilityContent(string name = null, Azure.Core.ResourceIdentifier subnetId = null, string availabilityZone = null) { throw null; } public static Azure.ResourceManager.NetApp.Models.NetAppKeyVaultProperties NetAppKeyVaultProperties(string keyVaultId = null, System.Uri keyVaultUri = null, string keyName = null, Azure.Core.ResourceIdentifier keyVaultArmResourceId = null, Azure.ResourceManager.NetApp.Models.NetAppKeyVaultStatus? status = default(Azure.ResourceManager.NetApp.Models.NetAppKeyVaultStatus?)) { throw null; } public static Azure.ResourceManager.NetApp.Models.NetAppKeyVaultProperties NetAppKeyVaultProperties(string keyVaultId = null, System.Uri keyVaultUri = null, string keyName = null, string keyVaultResourceId = null, Azure.ResourceManager.NetApp.Models.NetAppKeyVaultStatus? status = default(Azure.ResourceManager.NetApp.Models.NetAppKeyVaultStatus?)) { throw null; } public static Azure.ResourceManager.NetApp.Models.NetAppRegionInfo NetAppRegionInfo(Azure.ResourceManager.NetApp.Models.RegionStorageToNetworkProximity? storageToNetworkProximity = default(Azure.ResourceManager.NetApp.Models.RegionStorageToNetworkProximity?), System.Collections.Generic.IEnumerable availabilityZoneMappings = null) { throw null; } - public static Azure.ResourceManager.NetApp.Models.NetAppReplicationObject NetAppReplicationObject(string replicationId = null, Azure.ResourceManager.NetApp.Models.NetAppEndpointType? endpointType = default(Azure.ResourceManager.NetApp.Models.NetAppEndpointType?), Azure.ResourceManager.NetApp.Models.NetAppReplicationSchedule? replicationSchedule = default(Azure.ResourceManager.NetApp.Models.NetAppReplicationSchedule?), Azure.Core.ResourceIdentifier remoteVolumeResourceId = null, string remoteVolumeRegion = null) { throw null; } + public static Azure.ResourceManager.NetApp.Models.NetAppReplicationObject NetAppReplicationObject(string replicationId = null, Azure.ResourceManager.NetApp.Models.NetAppEndpointType? endpointType = default(Azure.ResourceManager.NetApp.Models.NetAppEndpointType?), Azure.ResourceManager.NetApp.Models.NetAppReplicationSchedule? replicationSchedule = default(Azure.ResourceManager.NetApp.Models.NetAppReplicationSchedule?), Azure.Core.ResourceIdentifier remoteVolumeResourceId = null, Azure.ResourceManager.NetApp.Models.RemotePath remotePath = null, string remoteVolumeRegion = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.NetApp.Models.NetAppReplicationObject NetAppReplicationObject(string replicationId, Azure.ResourceManager.NetApp.Models.NetAppEndpointType? endpointType, Azure.ResourceManager.NetApp.Models.NetAppReplicationSchedule? replicationSchedule, Azure.Core.ResourceIdentifier remoteVolumeResourceId, string remoteVolumeRegion) { throw null; } public static Azure.ResourceManager.NetApp.Models.NetAppRestoreStatus NetAppRestoreStatus(bool? isHealthy = default(bool?), Azure.ResourceManager.NetApp.Models.NetAppRelationshipStatus? relationshipStatus = default(Azure.ResourceManager.NetApp.Models.NetAppRelationshipStatus?), Azure.ResourceManager.NetApp.Models.NetAppMirrorState? mirrorState = default(Azure.ResourceManager.NetApp.Models.NetAppMirrorState?), string unhealthyReason = null, string errorMessage = null, long? totalTransferBytes = default(long?)) { throw null; } public static Azure.ResourceManager.NetApp.Models.NetAppSubscriptionQuotaItem NetAppSubscriptionQuotaItem(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, int? current = default(int?), int? @default = default(int?)) { throw null; } public static Azure.ResourceManager.NetApp.NetAppSubvolumeInfoData NetAppSubvolumeInfoData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string path = null, long? size = default(long?), string parentPath = null, string provisioningState = null) { throw null; } @@ -1021,6 +1034,8 @@ public static partial class ArmNetAppModelFactory [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.NetApp.Models.NetAppVolumeBackupStatus NetAppVolumeBackupStatus(bool? isHealthy = default(bool?), Azure.ResourceManager.NetApp.Models.NetAppRelationshipStatus? relationshipStatus = default(Azure.ResourceManager.NetApp.Models.NetAppRelationshipStatus?), Azure.ResourceManager.NetApp.Models.NetAppMirrorState? mirrorState = default(Azure.ResourceManager.NetApp.Models.NetAppMirrorState?), string unhealthyReason = null, string errorMessage = null, long? lastTransferSize = default(long?), string lastTransferType = null, long? totalTransferBytes = default(long?)) { throw null; } public static Azure.ResourceManager.NetApp.Models.NetAppVolumeBackupStatus NetAppVolumeBackupStatus(bool? isHealthy = default(bool?), Azure.ResourceManager.NetApp.Models.NetAppRelationshipStatus? relationshipStatus = default(Azure.ResourceManager.NetApp.Models.NetAppRelationshipStatus?), Azure.ResourceManager.NetApp.Models.NetAppMirrorState? mirrorState = default(Azure.ResourceManager.NetApp.Models.NetAppMirrorState?), string unhealthyReason = null, string errorMessage = null, long? lastTransferSize = default(long?), string lastTransferType = null, long? totalTransferBytes = default(long?), long? transferProgressBytes = default(long?)) { throw null; } + public static Azure.ResourceManager.NetApp.NetAppVolumeData NetAppVolumeData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ETag? etag = default(Azure.ETag?), System.Collections.Generic.IEnumerable zones = null, System.Guid? fileSystemId = default(System.Guid?), string creationToken = null, Azure.ResourceManager.NetApp.Models.NetAppFileServiceLevel? serviceLevel = default(Azure.ResourceManager.NetApp.Models.NetAppFileServiceLevel?), long usageThreshold = (long)0, System.Collections.Generic.IEnumerable exportRules = null, System.Collections.Generic.IEnumerable protocolTypes = null, string provisioningState = null, string snapshotId = null, bool? deleteBaseSnapshot = default(bool?), string backupId = null, string baremetalTenantId = null, Azure.Core.ResourceIdentifier subnetId = null, Azure.ResourceManager.NetApp.Models.NetAppNetworkFeature? networkFeatures = default(Azure.ResourceManager.NetApp.Models.NetAppNetworkFeature?), Azure.ResourceManager.NetApp.Models.NetAppNetworkFeature? effectiveNetworkFeatures = default(Azure.ResourceManager.NetApp.Models.NetAppNetworkFeature?), System.Guid? networkSiblingSetId = default(System.Guid?), Azure.ResourceManager.NetApp.Models.NetAppVolumeStorageToNetworkProximity? storageToNetworkProximity = default(Azure.ResourceManager.NetApp.Models.NetAppVolumeStorageToNetworkProximity?), System.Collections.Generic.IEnumerable mountTargets = null, string volumeType = null, Azure.ResourceManager.NetApp.Models.NetAppVolumeDataProtection dataProtection = null, bool? isRestoring = default(bool?), bool? isSnapshotDirectoryVisible = default(bool?), bool? isKerberosEnabled = default(bool?), Azure.ResourceManager.NetApp.Models.NetAppVolumeSecurityStyle? securityStyle = default(Azure.ResourceManager.NetApp.Models.NetAppVolumeSecurityStyle?), bool? isSmbEncryptionEnabled = default(bool?), Azure.ResourceManager.NetApp.Models.SmbAccessBasedEnumeration? smbAccessBasedEnumeration = default(Azure.ResourceManager.NetApp.Models.SmbAccessBasedEnumeration?), Azure.ResourceManager.NetApp.Models.SmbNonBrowsable? smbNonBrowsable = default(Azure.ResourceManager.NetApp.Models.SmbNonBrowsable?), bool? isSmbContinuouslyAvailable = default(bool?), float? throughputMibps = default(float?), float? actualThroughputMibps = default(float?), Azure.ResourceManager.NetApp.Models.NetAppEncryptionKeySource? encryptionKeySource = default(Azure.ResourceManager.NetApp.Models.NetAppEncryptionKeySource?), Azure.Core.ResourceIdentifier keyVaultPrivateEndpointResourceId = null, bool? isLdapEnabled = default(bool?), bool? isCoolAccessEnabled = default(bool?), int? coolnessPeriod = default(int?), Azure.ResourceManager.NetApp.Models.CoolAccessRetrievalPolicy? coolAccessRetrievalPolicy = default(Azure.ResourceManager.NetApp.Models.CoolAccessRetrievalPolicy?), string unixPermissions = null, int? cloneProgress = default(int?), Azure.ResourceManager.NetApp.Models.NetAppFileAccessLog? fileAccessLogs = default(Azure.ResourceManager.NetApp.Models.NetAppFileAccessLog?), Azure.ResourceManager.NetApp.Models.NetAppAvsDataStore? avsDataStore = default(Azure.ResourceManager.NetApp.Models.NetAppAvsDataStore?), System.Collections.Generic.IEnumerable dataStoreResourceId = null, bool? isDefaultQuotaEnabled = default(bool?), long? defaultUserQuotaInKiBs = default(long?), long? defaultGroupQuotaInKiBs = default(long?), long? maximumNumberOfFiles = default(long?), string volumeGroupName = null, Azure.Core.ResourceIdentifier capacityPoolResourceId = null, Azure.Core.ResourceIdentifier proximityPlacementGroupId = null, string t2Network = null, string volumeSpecName = null, bool? isEncrypted = default(bool?), System.Collections.Generic.IEnumerable placementRules = null, Azure.ResourceManager.NetApp.Models.EnableNetAppSubvolume? enableSubvolumes = default(Azure.ResourceManager.NetApp.Models.EnableNetAppSubvolume?), string provisionedAvailabilityZone = null, bool? isLargeVolume = default(bool?), Azure.Core.ResourceIdentifier originatingResourceId = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.NetApp.NetAppVolumeData NetAppVolumeData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ETag? etag = default(Azure.ETag?), System.Collections.Generic.IEnumerable zones = null, System.Guid? fileSystemId = default(System.Guid?), string creationToken = null, Azure.ResourceManager.NetApp.Models.NetAppFileServiceLevel? serviceLevel = default(Azure.ResourceManager.NetApp.Models.NetAppFileServiceLevel?), long usageThreshold = (long)0, System.Collections.Generic.IEnumerable exportRules = null, System.Collections.Generic.IEnumerable protocolTypes = null, string provisioningState = null, string snapshotId = null, bool? deleteBaseSnapshot = default(bool?), string backupId = null, string baremetalTenantId = null, Azure.Core.ResourceIdentifier subnetId = null, Azure.ResourceManager.NetApp.Models.NetAppNetworkFeature? networkFeatures = default(Azure.ResourceManager.NetApp.Models.NetAppNetworkFeature?), System.Guid? networkSiblingSetId = default(System.Guid?), Azure.ResourceManager.NetApp.Models.NetAppVolumeStorageToNetworkProximity? storageToNetworkProximity = default(Azure.ResourceManager.NetApp.Models.NetAppVolumeStorageToNetworkProximity?), System.Collections.Generic.IEnumerable mountTargets = null, string volumeType = null, Azure.ResourceManager.NetApp.Models.NetAppVolumeDataProtection dataProtection = null, bool? isRestoring = default(bool?), bool? isSnapshotDirectoryVisible = default(bool?), bool? isKerberosEnabled = default(bool?), Azure.ResourceManager.NetApp.Models.NetAppVolumeSecurityStyle? securityStyle = default(Azure.ResourceManager.NetApp.Models.NetAppVolumeSecurityStyle?), bool? isSmbEncryptionEnabled = default(bool?), Azure.ResourceManager.NetApp.Models.SmbAccessBasedEnumeration? smbAccessBasedEnumeration = default(Azure.ResourceManager.NetApp.Models.SmbAccessBasedEnumeration?), Azure.ResourceManager.NetApp.Models.SmbNonBrowsable? smbNonBrowsable = default(Azure.ResourceManager.NetApp.Models.SmbNonBrowsable?), bool? isSmbContinuouslyAvailable = default(bool?), float? throughputMibps = default(float?), float? actualThroughputMibps = default(float?), Azure.ResourceManager.NetApp.Models.NetAppEncryptionKeySource? encryptionKeySource = default(Azure.ResourceManager.NetApp.Models.NetAppEncryptionKeySource?), Azure.Core.ResourceIdentifier keyVaultPrivateEndpointResourceId = null, bool? isLdapEnabled = default(bool?), bool? isCoolAccessEnabled = default(bool?), int? coolnessPeriod = default(int?), Azure.ResourceManager.NetApp.Models.CoolAccessRetrievalPolicy? coolAccessRetrievalPolicy = default(Azure.ResourceManager.NetApp.Models.CoolAccessRetrievalPolicy?), string unixPermissions = null, int? cloneProgress = default(int?), Azure.ResourceManager.NetApp.Models.NetAppFileAccessLog? fileAccessLogs = default(Azure.ResourceManager.NetApp.Models.NetAppFileAccessLog?), Azure.ResourceManager.NetApp.Models.NetAppAvsDataStore? avsDataStore = default(Azure.ResourceManager.NetApp.Models.NetAppAvsDataStore?), System.Collections.Generic.IEnumerable dataStoreResourceId = null, bool? isDefaultQuotaEnabled = default(bool?), long? defaultUserQuotaInKiBs = default(long?), long? defaultGroupQuotaInKiBs = default(long?), long? maximumNumberOfFiles = default(long?), string volumeGroupName = null, Azure.Core.ResourceIdentifier capacityPoolResourceId = null, Azure.Core.ResourceIdentifier proximityPlacementGroupId = null, string t2Network = null, string volumeSpecName = null, bool? isEncrypted = default(bool?), System.Collections.Generic.IEnumerable placementRules = null, Azure.ResourceManager.NetApp.Models.EnableNetAppSubvolume? enableSubvolumes = default(Azure.ResourceManager.NetApp.Models.EnableNetAppSubvolume?), string provisionedAvailabilityZone = null, bool? isLargeVolume = default(bool?), Azure.Core.ResourceIdentifier originatingResourceId = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.NetApp.NetAppVolumeData NetAppVolumeData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ETag? etag = default(Azure.ETag?), System.Collections.Generic.IEnumerable zones = null, System.Guid? fileSystemId = default(System.Guid?), string creationToken = null, Azure.ResourceManager.NetApp.Models.NetAppFileServiceLevel? serviceLevel = default(Azure.ResourceManager.NetApp.Models.NetAppFileServiceLevel?), long usageThreshold = (long)0, System.Collections.Generic.IEnumerable exportRules = null, System.Collections.Generic.IEnumerable protocolTypes = null, string provisioningState = null, string snapshotId = null, bool? deleteBaseSnapshot = default(bool?), string backupId = null, string baremetalTenantId = null, Azure.Core.ResourceIdentifier subnetId = null, Azure.ResourceManager.NetApp.Models.NetAppNetworkFeature? networkFeatures = default(Azure.ResourceManager.NetApp.Models.NetAppNetworkFeature?), System.Guid? networkSiblingSetId = default(System.Guid?), Azure.ResourceManager.NetApp.Models.NetAppVolumeStorageToNetworkProximity? storageToNetworkProximity = default(Azure.ResourceManager.NetApp.Models.NetAppVolumeStorageToNetworkProximity?), System.Collections.Generic.IEnumerable mountTargets = null, string volumeType = null, Azure.ResourceManager.NetApp.Models.NetAppVolumeDataProtection dataProtection = null, bool? isRestoring = default(bool?), bool? isSnapshotDirectoryVisible = default(bool?), bool? isKerberosEnabled = default(bool?), Azure.ResourceManager.NetApp.Models.NetAppVolumeSecurityStyle? securityStyle = default(Azure.ResourceManager.NetApp.Models.NetAppVolumeSecurityStyle?), bool? isSmbEncryptionEnabled = default(bool?), Azure.ResourceManager.NetApp.Models.SmbAccessBasedEnumeration? smbAccessBasedEnumeration = default(Azure.ResourceManager.NetApp.Models.SmbAccessBasedEnumeration?), Azure.ResourceManager.NetApp.Models.SmbNonBrowsable? smbNonBrowsable = default(Azure.ResourceManager.NetApp.Models.SmbNonBrowsable?), bool? isSmbContinuouslyAvailable = default(bool?), float? throughputMibps = default(float?), float? actualThroughputMibps = default(float?), Azure.ResourceManager.NetApp.Models.NetAppEncryptionKeySource? encryptionKeySource = default(Azure.ResourceManager.NetApp.Models.NetAppEncryptionKeySource?), Azure.Core.ResourceIdentifier keyVaultPrivateEndpointResourceId = null, bool? isLdapEnabled = default(bool?), bool? isCoolAccessEnabled = default(bool?), int? coolnessPeriod = default(int?), string unixPermissions = null, int? cloneProgress = default(int?), Azure.ResourceManager.NetApp.Models.NetAppFileAccessLog? fileAccessLogs = default(Azure.ResourceManager.NetApp.Models.NetAppFileAccessLog?), Azure.ResourceManager.NetApp.Models.NetAppAvsDataStore? avsDataStore = default(Azure.ResourceManager.NetApp.Models.NetAppAvsDataStore?), System.Collections.Generic.IEnumerable dataStoreResourceId = null, bool? isDefaultQuotaEnabled = default(bool?), long? defaultUserQuotaInKiBs = default(long?), long? defaultGroupQuotaInKiBs = default(long?), long? maximumNumberOfFiles = default(long?), string volumeGroupName = null, Azure.Core.ResourceIdentifier capacityPoolResourceId = null, Azure.Core.ResourceIdentifier proximityPlacementGroupId = null, string t2Network = null, string volumeSpecName = null, bool? isEncrypted = default(bool?), System.Collections.Generic.IEnumerable placementRules = null, Azure.ResourceManager.NetApp.Models.EnableNetAppSubvolume? enableSubvolumes = default(Azure.ResourceManager.NetApp.Models.EnableNetAppSubvolume?), string provisionedAvailabilityZone = null, bool? isLargeVolume = default(bool?), Azure.Core.ResourceIdentifier originatingResourceId = null) { throw null; } @@ -1029,6 +1044,8 @@ public static partial class ArmNetAppModelFactory [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.NetApp.Models.NetAppVolumeGroupMetadata NetAppVolumeGroupMetadata(string groupDescription, Azure.ResourceManager.NetApp.Models.NetAppApplicationType? applicationType, string applicationIdentifier, System.Collections.Generic.IEnumerable globalPlacementRules, string deploymentSpecId, long? volumesCount) { throw null; } public static Azure.ResourceManager.NetApp.Models.NetAppVolumeGroupResult NetAppVolumeGroupResult(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), string provisioningState = null, Azure.ResourceManager.NetApp.Models.NetAppVolumeGroupMetadata groupMetaData = null) { throw null; } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeGroupVolume NetAppVolumeGroupVolume(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), System.Collections.Generic.IDictionary tags = null, System.Collections.Generic.IEnumerable zones = null, System.Guid? fileSystemId = default(System.Guid?), string creationToken = null, Azure.ResourceManager.NetApp.Models.NetAppFileServiceLevel? serviceLevel = default(Azure.ResourceManager.NetApp.Models.NetAppFileServiceLevel?), long usageThreshold = (long)0, System.Collections.Generic.IEnumerable exportRules = null, System.Collections.Generic.IEnumerable protocolTypes = null, string provisioningState = null, string snapshotId = null, bool? deleteBaseSnapshot = default(bool?), string backupId = null, string baremetalTenantId = null, Azure.Core.ResourceIdentifier subnetId = null, Azure.ResourceManager.NetApp.Models.NetAppNetworkFeature? networkFeatures = default(Azure.ResourceManager.NetApp.Models.NetAppNetworkFeature?), Azure.ResourceManager.NetApp.Models.NetAppNetworkFeature? effectiveNetworkFeatures = default(Azure.ResourceManager.NetApp.Models.NetAppNetworkFeature?), System.Guid? networkSiblingSetId = default(System.Guid?), Azure.ResourceManager.NetApp.Models.NetAppVolumeStorageToNetworkProximity? storageToNetworkProximity = default(Azure.ResourceManager.NetApp.Models.NetAppVolumeStorageToNetworkProximity?), System.Collections.Generic.IEnumerable mountTargets = null, string volumeType = null, Azure.ResourceManager.NetApp.Models.NetAppVolumeDataProtection dataProtection = null, bool? isRestoring = default(bool?), bool? isSnapshotDirectoryVisible = default(bool?), bool? isKerberosEnabled = default(bool?), Azure.ResourceManager.NetApp.Models.NetAppVolumeSecurityStyle? securityStyle = default(Azure.ResourceManager.NetApp.Models.NetAppVolumeSecurityStyle?), bool? isSmbEncryptionEnabled = default(bool?), Azure.ResourceManager.NetApp.Models.SmbAccessBasedEnumeration? smbAccessBasedEnumeration = default(Azure.ResourceManager.NetApp.Models.SmbAccessBasedEnumeration?), Azure.ResourceManager.NetApp.Models.SmbNonBrowsable? smbNonBrowsable = default(Azure.ResourceManager.NetApp.Models.SmbNonBrowsable?), bool? isSmbContinuouslyAvailable = default(bool?), float? throughputMibps = default(float?), float? actualThroughputMibps = default(float?), Azure.ResourceManager.NetApp.Models.NetAppEncryptionKeySource? encryptionKeySource = default(Azure.ResourceManager.NetApp.Models.NetAppEncryptionKeySource?), Azure.Core.ResourceIdentifier keyVaultPrivateEndpointResourceId = null, bool? isLdapEnabled = default(bool?), bool? isCoolAccessEnabled = default(bool?), int? coolnessPeriod = default(int?), Azure.ResourceManager.NetApp.Models.CoolAccessRetrievalPolicy? coolAccessRetrievalPolicy = default(Azure.ResourceManager.NetApp.Models.CoolAccessRetrievalPolicy?), string unixPermissions = null, int? cloneProgress = default(int?), Azure.ResourceManager.NetApp.Models.NetAppFileAccessLog? fileAccessLogs = default(Azure.ResourceManager.NetApp.Models.NetAppFileAccessLog?), Azure.ResourceManager.NetApp.Models.NetAppAvsDataStore? avsDataStore = default(Azure.ResourceManager.NetApp.Models.NetAppAvsDataStore?), System.Collections.Generic.IEnumerable dataStoreResourceId = null, bool? isDefaultQuotaEnabled = default(bool?), long? defaultUserQuotaInKiBs = default(long?), long? defaultGroupQuotaInKiBs = default(long?), long? maximumNumberOfFiles = default(long?), string volumeGroupName = null, Azure.Core.ResourceIdentifier capacityPoolResourceId = null, Azure.Core.ResourceIdentifier proximityPlacementGroupId = null, string t2Network = null, string volumeSpecName = null, bool? isEncrypted = default(bool?), System.Collections.Generic.IEnumerable placementRules = null, Azure.ResourceManager.NetApp.Models.EnableNetAppSubvolume? enableSubvolumes = default(Azure.ResourceManager.NetApp.Models.EnableNetAppSubvolume?), string provisionedAvailabilityZone = null, bool? isLargeVolume = default(bool?), Azure.Core.ResourceIdentifier originatingResourceId = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.NetApp.Models.NetAppVolumeGroupVolume NetAppVolumeGroupVolume(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), System.Collections.Generic.IDictionary tags = null, System.Collections.Generic.IEnumerable zones = null, System.Guid? fileSystemId = default(System.Guid?), string creationToken = null, Azure.ResourceManager.NetApp.Models.NetAppFileServiceLevel? serviceLevel = default(Azure.ResourceManager.NetApp.Models.NetAppFileServiceLevel?), long usageThreshold = (long)0, System.Collections.Generic.IEnumerable exportRules = null, System.Collections.Generic.IEnumerable protocolTypes = null, string provisioningState = null, string snapshotId = null, bool? deleteBaseSnapshot = default(bool?), string backupId = null, string baremetalTenantId = null, Azure.Core.ResourceIdentifier subnetId = null, Azure.ResourceManager.NetApp.Models.NetAppNetworkFeature? networkFeatures = default(Azure.ResourceManager.NetApp.Models.NetAppNetworkFeature?), System.Guid? networkSiblingSetId = default(System.Guid?), Azure.ResourceManager.NetApp.Models.NetAppVolumeStorageToNetworkProximity? storageToNetworkProximity = default(Azure.ResourceManager.NetApp.Models.NetAppVolumeStorageToNetworkProximity?), System.Collections.Generic.IEnumerable mountTargets = null, string volumeType = null, Azure.ResourceManager.NetApp.Models.NetAppVolumeDataProtection dataProtection = null, bool? isRestoring = default(bool?), bool? isSnapshotDirectoryVisible = default(bool?), bool? isKerberosEnabled = default(bool?), Azure.ResourceManager.NetApp.Models.NetAppVolumeSecurityStyle? securityStyle = default(Azure.ResourceManager.NetApp.Models.NetAppVolumeSecurityStyle?), bool? isSmbEncryptionEnabled = default(bool?), Azure.ResourceManager.NetApp.Models.SmbAccessBasedEnumeration? smbAccessBasedEnumeration = default(Azure.ResourceManager.NetApp.Models.SmbAccessBasedEnumeration?), Azure.ResourceManager.NetApp.Models.SmbNonBrowsable? smbNonBrowsable = default(Azure.ResourceManager.NetApp.Models.SmbNonBrowsable?), bool? isSmbContinuouslyAvailable = default(bool?), float? throughputMibps = default(float?), float? actualThroughputMibps = default(float?), Azure.ResourceManager.NetApp.Models.NetAppEncryptionKeySource? encryptionKeySource = default(Azure.ResourceManager.NetApp.Models.NetAppEncryptionKeySource?), Azure.Core.ResourceIdentifier keyVaultPrivateEndpointResourceId = null, bool? isLdapEnabled = default(bool?), bool? isCoolAccessEnabled = default(bool?), int? coolnessPeriod = default(int?), Azure.ResourceManager.NetApp.Models.CoolAccessRetrievalPolicy? coolAccessRetrievalPolicy = default(Azure.ResourceManager.NetApp.Models.CoolAccessRetrievalPolicy?), string unixPermissions = null, int? cloneProgress = default(int?), Azure.ResourceManager.NetApp.Models.NetAppFileAccessLog? fileAccessLogs = default(Azure.ResourceManager.NetApp.Models.NetAppFileAccessLog?), Azure.ResourceManager.NetApp.Models.NetAppAvsDataStore? avsDataStore = default(Azure.ResourceManager.NetApp.Models.NetAppAvsDataStore?), System.Collections.Generic.IEnumerable dataStoreResourceId = null, bool? isDefaultQuotaEnabled = default(bool?), long? defaultUserQuotaInKiBs = default(long?), long? defaultGroupQuotaInKiBs = default(long?), long? maximumNumberOfFiles = default(long?), string volumeGroupName = null, Azure.Core.ResourceIdentifier capacityPoolResourceId = null, Azure.Core.ResourceIdentifier proximityPlacementGroupId = null, string t2Network = null, string volumeSpecName = null, bool? isEncrypted = default(bool?), System.Collections.Generic.IEnumerable placementRules = null, Azure.ResourceManager.NetApp.Models.EnableNetAppSubvolume? enableSubvolumes = default(Azure.ResourceManager.NetApp.Models.EnableNetAppSubvolume?), string provisionedAvailabilityZone = null, bool? isLargeVolume = default(bool?), Azure.Core.ResourceIdentifier originatingResourceId = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.NetApp.Models.NetAppVolumeGroupVolume NetAppVolumeGroupVolume(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), System.Collections.Generic.IDictionary tags = null, System.Guid? fileSystemId = default(System.Guid?), string creationToken = null, Azure.ResourceManager.NetApp.Models.NetAppFileServiceLevel? serviceLevel = default(Azure.ResourceManager.NetApp.Models.NetAppFileServiceLevel?), long usageThreshold = (long)0, System.Collections.Generic.IEnumerable exportRules = null, System.Collections.Generic.IEnumerable protocolTypes = null, string provisioningState = null, string snapshotId = null, bool? deleteBaseSnapshot = default(bool?), string backupId = null, string baremetalTenantId = null, Azure.Core.ResourceIdentifier subnetId = null, Azure.ResourceManager.NetApp.Models.NetAppNetworkFeature? networkFeatures = default(Azure.ResourceManager.NetApp.Models.NetAppNetworkFeature?), System.Guid? networkSiblingSetId = default(System.Guid?), Azure.ResourceManager.NetApp.Models.NetAppVolumeStorageToNetworkProximity? storageToNetworkProximity = default(Azure.ResourceManager.NetApp.Models.NetAppVolumeStorageToNetworkProximity?), System.Collections.Generic.IEnumerable mountTargets = null, string volumeType = null, Azure.ResourceManager.NetApp.Models.NetAppVolumeDataProtection dataProtection = null, bool? isRestoring = default(bool?), bool? isSnapshotDirectoryVisible = default(bool?), bool? isKerberosEnabled = default(bool?), Azure.ResourceManager.NetApp.Models.NetAppVolumeSecurityStyle? securityStyle = default(Azure.ResourceManager.NetApp.Models.NetAppVolumeSecurityStyle?), bool? isSmbEncryptionEnabled = default(bool?), Azure.ResourceManager.NetApp.Models.SmbAccessBasedEnumeration? smbAccessBasedEnumeration = default(Azure.ResourceManager.NetApp.Models.SmbAccessBasedEnumeration?), Azure.ResourceManager.NetApp.Models.SmbNonBrowsable? smbNonBrowsable = default(Azure.ResourceManager.NetApp.Models.SmbNonBrowsable?), bool? isSmbContinuouslyAvailable = default(bool?), float? throughputMibps = default(float?), float? actualThroughputMibps = default(float?), Azure.ResourceManager.NetApp.Models.NetAppEncryptionKeySource? encryptionKeySource = default(Azure.ResourceManager.NetApp.Models.NetAppEncryptionKeySource?), Azure.Core.ResourceIdentifier keyVaultPrivateEndpointResourceId = null, bool? isLdapEnabled = default(bool?), bool? isCoolAccessEnabled = default(bool?), int? coolnessPeriod = default(int?), string unixPermissions = null, int? cloneProgress = default(int?), Azure.ResourceManager.NetApp.Models.NetAppFileAccessLog? fileAccessLogs = default(Azure.ResourceManager.NetApp.Models.NetAppFileAccessLog?), Azure.ResourceManager.NetApp.Models.NetAppAvsDataStore? avsDataStore = default(Azure.ResourceManager.NetApp.Models.NetAppAvsDataStore?), System.Collections.Generic.IEnumerable dataStoreResourceId = null, bool? isDefaultQuotaEnabled = default(bool?), long? defaultUserQuotaInKiBs = default(long?), long? defaultGroupQuotaInKiBs = default(long?), long? maximumNumberOfFiles = default(long?), string volumeGroupName = null, Azure.Core.ResourceIdentifier capacityPoolResourceId = null, Azure.Core.ResourceIdentifier proximityPlacementGroupId = null, string t2Network = null, string volumeSpecName = null, bool? isEncrypted = default(bool?), System.Collections.Generic.IEnumerable placementRules = null, Azure.ResourceManager.NetApp.Models.EnableNetAppSubvolume? enableSubvolumes = default(Azure.ResourceManager.NetApp.Models.EnableNetAppSubvolume?), string provisionedAvailabilityZone = null, bool? isLargeVolume = default(bool?), Azure.Core.ResourceIdentifier originatingResourceId = null) { throw null; } @@ -1049,6 +1066,7 @@ public static partial class ArmNetAppModelFactory public static Azure.ResourceManager.NetApp.RegionInfoResourceData RegionInfoResourceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.NetApp.Models.RegionStorageToNetworkProximity? storageToNetworkProximity = default(Azure.ResourceManager.NetApp.Models.RegionStorageToNetworkProximity?), System.Collections.Generic.IEnumerable availabilityZoneMappings = null) { throw null; } public static Azure.ResourceManager.NetApp.SnapshotPolicyData SnapshotPolicyData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ETag? etag = default(Azure.ETag?), Azure.ResourceManager.NetApp.Models.SnapshotPolicyHourlySchedule hourlySchedule = null, Azure.ResourceManager.NetApp.Models.SnapshotPolicyDailySchedule dailySchedule = null, Azure.ResourceManager.NetApp.Models.SnapshotPolicyWeeklySchedule weeklySchedule = null, Azure.ResourceManager.NetApp.Models.SnapshotPolicyMonthlySchedule monthlySchedule = null, bool? isEnabled = default(bool?), string provisioningState = null) { throw null; } public static Azure.ResourceManager.NetApp.Models.SnapshotPolicyPatch SnapshotPolicyPatch(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.NetApp.Models.SnapshotPolicyHourlySchedule hourlySchedule = null, Azure.ResourceManager.NetApp.Models.SnapshotPolicyDailySchedule dailySchedule = null, Azure.ResourceManager.NetApp.Models.SnapshotPolicyWeeklySchedule weeklySchedule = null, Azure.ResourceManager.NetApp.Models.SnapshotPolicyMonthlySchedule monthlySchedule = null, bool? isEnabled = default(bool?), string provisioningState = null) { throw null; } + public static Azure.ResourceManager.NetApp.Models.SvmPeerCommandResult SvmPeerCommandResult(string svmPeeringCommand = null) { throw null; } } public partial class AvailabilityZoneMapping : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { @@ -1122,6 +1140,17 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public static bool operator !=(Azure.ResourceManager.NetApp.Models.CapacityPoolQosType left, Azure.ResourceManager.NetApp.Models.CapacityPoolQosType right) { throw null; } public override string ToString() { throw null; } } + public partial class ClusterPeerCommandResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ClusterPeerCommandResult() { } + public string PeerAcceptCommand { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ClusterPeerCommandResult 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.NetApp.Models.ClusterPeerCommandResult 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; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct CoolAccessRetrievalPolicy : System.IEquatable { @@ -1458,6 +1487,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class NetAppFilePathAvailabilityContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public NetAppFilePathAvailabilityContent(string name, Azure.Core.ResourceIdentifier subnetId) { } + public string AvailabilityZone { get { throw null; } set { } } public string Name { get { throw null; } } public Azure.Core.ResourceIdentifier SubnetId { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -1727,6 +1757,7 @@ public partial class NetAppReplicationObject : System.ClientModel.Primitives.IJs { public NetAppReplicationObject(Azure.Core.ResourceIdentifier remoteVolumeResourceId) { } public Azure.ResourceManager.NetApp.Models.NetAppEndpointType? EndpointType { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.RemotePath RemotePath { get { throw null; } set { } } public string RemoteVolumeRegion { get { throw null; } set { } } public Azure.Core.ResourceIdentifier RemoteVolumeResourceId { get { throw null; } set { } } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] @@ -2035,6 +2066,7 @@ public NetAppVolumeGroupVolume(string creationToken, long usageThreshold, Azure. public long? DefaultGroupQuotaInKiBs { get { throw null; } set { } } public long? DefaultUserQuotaInKiBs { get { throw null; } set { } } public bool? DeleteBaseSnapshot { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.NetAppNetworkFeature? EffectiveNetworkFeatures { get { throw null; } } public Azure.ResourceManager.NetApp.Models.EnableNetAppSubvolume? EnableSubvolumes { get { throw null; } set { } } public Azure.ResourceManager.NetApp.Models.NetAppEncryptionKeySource? EncryptionKeySource { get { throw null; } set { } } public System.Collections.Generic.IList ExportRules { get { throw null; } } @@ -2361,6 +2393,17 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer 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 PeerClusterForVolumeMigrationContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public PeerClusterForVolumeMigrationContent(System.Collections.Generic.IEnumerable peerIPAddresses) { } + public System.Collections.Generic.IList PeerIPAddresses { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.PeerClusterForVolumeMigrationContent 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.NetApp.Models.PeerClusterForVolumeMigrationContent 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 partial class QueryNetworkSiblingSetContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public QueryNetworkSiblingSetContent(string networkSiblingSetId, Azure.Core.ResourceIdentifier subnetId) { } @@ -2408,6 +2451,19 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer 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 RemotePath : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public RemotePath(string externalHostName, string serverName, string volumeName) { } + public string ExternalHostName { get { throw null; } set { } } + public string ServerName { get { throw null; } set { } } + public string VolumeName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.RemotePath 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.NetApp.Models.RemotePath 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; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct SmbAccessBasedEnumeration : System.IEquatable { @@ -2517,6 +2573,17 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer 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 SvmPeerCommandResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal SvmPeerCommandResult() { } + public string SvmPeeringCommand { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.SvmPeerCommandResult 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.NetApp.Models.SvmPeerCommandResult 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 partial class UpdateNetworkSiblingSetContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public UpdateNetworkSiblingSetContent(string networkSiblingSetId, Azure.Core.ResourceIdentifier subnetId, string networkSiblingSetStateId, Azure.ResourceManager.NetApp.Models.NetAppNetworkFeature networkFeatures) { } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/assets.json b/sdk/netapp/Azure.ResourceManager.NetApp/assets.json index d4fa00f4aa84..d260b394143c 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/assets.json +++ b/sdk/netapp/Azure.ResourceManager.NetApp/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/netapp/Azure.ResourceManager.NetApp", - "Tag": "net/netapp/Azure.ResourceManager.NetApp_f309a8bb28" + "Tag": "net/netapp/Azure.ResourceManager.NetApp_bd00fdfca2" } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/samples/Generated/Samples/Sample_CapacityPoolCollection.cs b/sdk/netapp/Azure.ResourceManager.NetApp/samples/Generated/Samples/Sample_CapacityPoolCollection.cs index 26b9c101a900..65073f2e0cd0 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/samples/Generated/Samples/Sample_CapacityPoolCollection.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/samples/Generated/Samples/Sample_CapacityPoolCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_CapacityPoolCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_PoolsList() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Pools_List.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Pools_List.json // this example is just showing the usage of "Pools_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -57,7 +57,7 @@ public async Task GetAll_PoolsList() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_PoolsGet() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Pools_Get.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Pools_Get.json // this example is just showing the usage of "Pools_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -92,7 +92,7 @@ public async Task Get_PoolsGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_PoolsGet() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Pools_Get.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Pools_Get.json // this example is just showing the usage of "Pools_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -123,7 +123,7 @@ public async Task Exists_PoolsGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_PoolsGet() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Pools_Get.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Pools_Get.json // this example is just showing the usage of "Pools_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -166,7 +166,7 @@ public async Task GetIfExists_PoolsGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_PoolsCreateOrUpdate() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Pools_CreateOrUpdate.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Pools_CreateOrUpdate.json // this example is just showing the usage of "Pools_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -187,7 +187,7 @@ public async Task CreateOrUpdate_PoolsCreateOrUpdate() // invoke the operation string poolName = "pool1"; - CapacityPoolData data = new CapacityPoolData(new AzureLocation("eastus"), 4398046511104, NetAppFileServiceLevel.Premium) + CapacityPoolData data = new CapacityPoolData(new AzureLocation("eastus"), 4398046511104L, NetAppFileServiceLevel.Premium) { QosType = CapacityPoolQosType.Auto, }; diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/samples/Generated/Samples/Sample_CapacityPoolResource.cs b/sdk/netapp/Azure.ResourceManager.NetApp/samples/Generated/Samples/Sample_CapacityPoolResource.cs index 246af917a734..3bb936c136a8 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/samples/Generated/Samples/Sample_CapacityPoolResource.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/samples/Generated/Samples/Sample_CapacityPoolResource.cs @@ -20,7 +20,7 @@ public partial class Sample_CapacityPoolResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_PoolsGet() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Pools_Get.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Pools_Get.json // this example is just showing the usage of "Pools_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -52,7 +52,7 @@ public async Task Get_PoolsGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_PoolsUpdate() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Pools_Update.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Pools_Update.json // this example is just showing the usage of "Pools_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -86,7 +86,7 @@ public async Task Update_PoolsUpdate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_PoolsDelete() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Pools_Delete.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Pools_Delete.json // this example is just showing the usage of "Pools_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/samples/Generated/Samples/Sample_NetAppAccountCollection.cs b/sdk/netapp/Azure.ResourceManager.NetApp/samples/Generated/Samples/Sample_NetAppAccountCollection.cs index f2fa7251a5c3..2b16d581a9db 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/samples/Generated/Samples/Sample_NetAppAccountCollection.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/samples/Generated/Samples/Sample_NetAppAccountCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_NetAppAccountCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_AccountsList() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Accounts_List.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Accounts_List.json // this example is just showing the usage of "Accounts_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -57,7 +57,7 @@ public async Task GetAll_AccountsList() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_AccountsGet() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Accounts_Get.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Accounts_Get.json // this example is just showing the usage of "Accounts_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -91,7 +91,7 @@ public async Task Get_AccountsGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_AccountsGet() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Accounts_Get.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Accounts_Get.json // this example is just showing the usage of "Accounts_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -121,7 +121,7 @@ public async Task Exists_AccountsGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_AccountsGet() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Accounts_Get.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Accounts_Get.json // this example is just showing the usage of "Accounts_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -163,7 +163,7 @@ public async Task GetIfExists_AccountsGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_AccountsCreateOrUpdate() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Accounts_CreateOrUpdate.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Accounts_CreateOrUpdate.json // this example is just showing the usage of "Accounts_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -199,7 +199,7 @@ public async Task CreateOrUpdate_AccountsCreateOrUpdate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_AccountsCreateOrUpdateWithActiveDirectory() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Accounts_CreateOrUpdateAD.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Accounts_CreateOrUpdateAD.json // this example is just showing the usage of "Accounts_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/samples/Generated/Samples/Sample_NetAppAccountResource.cs b/sdk/netapp/Azure.ResourceManager.NetApp/samples/Generated/Samples/Sample_NetAppAccountResource.cs index b09c70da1e51..66f643dbd56e 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/samples/Generated/Samples/Sample_NetAppAccountResource.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/samples/Generated/Samples/Sample_NetAppAccountResource.cs @@ -21,7 +21,7 @@ public partial class Sample_NetAppAccountResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetNetAppAccounts_AccountsList() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Accounts_List.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Accounts_List.json // this example is just showing the usage of "Accounts_ListBySubscription" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -53,7 +53,7 @@ public async Task GetNetAppAccounts_AccountsList() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_AccountsGet() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Accounts_Get.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Accounts_Get.json // this example is just showing the usage of "Accounts_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -84,7 +84,7 @@ public async Task Get_AccountsGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_AccountsDelete() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Accounts_Delete.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Accounts_Delete.json // this example is just showing the usage of "Accounts_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -111,7 +111,7 @@ public async Task Delete_AccountsDelete() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_AccountsUpdate() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Accounts_Update.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Accounts_Update.json // this example is just showing the usage of "Accounts_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -150,7 +150,7 @@ public async Task Update_AccountsUpdate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task RenewCredentials_AccountsRenewCredentials() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Accounts_RenewCredentials.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Accounts_RenewCredentials.json // this example is just showing the usage of "Accounts_RenewCredentials" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -177,7 +177,7 @@ public async Task RenewCredentials_AccountsRenewCredentials() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetVolumeGroups_VolumeGroupsListOracle() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/VolumeGroups_List_Oracle.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/VolumeGroups_List_Oracle.json // this example is just showing the usage of "VolumeGroups_ListByNetAppAccount" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -207,7 +207,7 @@ public async Task GetVolumeGroups_VolumeGroupsListOracle() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetVolumeGroups_VolumeGroupsListSapHana() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/VolumeGroups_List_SapHana.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/VolumeGroups_List_SapHana.json // this example is just showing the usage of "VolumeGroups_ListByNetAppAccount" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -237,7 +237,7 @@ public async Task GetVolumeGroups_VolumeGroupsListSapHana() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task MigrateBackupsBackupsUnderAccount_BackupsUnderAccountMigrate() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/BackupsUnderAccount_Migrate.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/BackupsUnderAccount_Migrate.json // this example is just showing the usage of "BackupsUnderAccount_MigrateBackups" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/samples/Generated/Samples/Sample_NetAppBackupPolicyCollection.cs b/sdk/netapp/Azure.ResourceManager.NetApp/samples/Generated/Samples/Sample_NetAppBackupPolicyCollection.cs index 1a7c18ac4fb1..5b559b5a9db7 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/samples/Generated/Samples/Sample_NetAppBackupPolicyCollection.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/samples/Generated/Samples/Sample_NetAppBackupPolicyCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_NetAppBackupPolicyCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_BackupPoliciesList() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/BackupPolicies_List.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/BackupPolicies_List.json // this example is just showing the usage of "BackupPolicies_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -56,7 +56,7 @@ public async Task GetAll_BackupPoliciesList() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_BackupsGet() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/BackupPolicies_Get.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/BackupPolicies_Get.json // this example is just showing the usage of "BackupPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -91,7 +91,7 @@ public async Task Get_BackupsGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_BackupsGet() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/BackupPolicies_Get.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/BackupPolicies_Get.json // this example is just showing the usage of "BackupPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -122,7 +122,7 @@ public async Task Exists_BackupsGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_BackupsGet() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/BackupPolicies_Get.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/BackupPolicies_Get.json // this example is just showing the usage of "BackupPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -165,7 +165,7 @@ public async Task GetIfExists_BackupsGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_BackupPoliciesCreate() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/BackupPolicies_Create.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/BackupPolicies_Create.json // this example is just showing the usage of "BackupPolicies_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/samples/Generated/Samples/Sample_NetAppBackupPolicyResource.cs b/sdk/netapp/Azure.ResourceManager.NetApp/samples/Generated/Samples/Sample_NetAppBackupPolicyResource.cs index eab7e64a8fc1..c9013b7bed96 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/samples/Generated/Samples/Sample_NetAppBackupPolicyResource.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/samples/Generated/Samples/Sample_NetAppBackupPolicyResource.cs @@ -20,7 +20,7 @@ public partial class Sample_NetAppBackupPolicyResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_BackupsGet() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/BackupPolicies_Get.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/BackupPolicies_Get.json // this example is just showing the usage of "BackupPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -52,7 +52,7 @@ public async Task Get_BackupsGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_BackupPoliciesUpdate() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/BackupPolicies_Update.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/BackupPolicies_Update.json // this example is just showing the usage of "BackupPolicies_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -92,7 +92,7 @@ public async Task Update_BackupPoliciesUpdate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_BackupPoliciesDelete() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/BackupPolicies_Delete.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/BackupPolicies_Delete.json // this example is just showing the usage of "BackupPolicies_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/samples/Generated/Samples/Sample_NetAppBackupVaultBackupCollection.cs b/sdk/netapp/Azure.ResourceManager.NetApp/samples/Generated/Samples/Sample_NetAppBackupVaultBackupCollection.cs index 25ca4adcffe6..fa7307a5d546 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/samples/Generated/Samples/Sample_NetAppBackupVaultBackupCollection.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/samples/Generated/Samples/Sample_NetAppBackupVaultBackupCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_NetAppBackupVaultBackupCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_BackupsList() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/BackupsUnderBackupVault_List.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/BackupsUnderBackupVault_List.json // this example is just showing the usage of "Backups_ListByVault" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -57,7 +57,7 @@ public async Task GetAll_BackupsList() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_BackupsUnderBackupVaultGet() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/BackupsUnderBackupVault_Get.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/BackupsUnderBackupVault_Get.json // this example is just showing the usage of "Backups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -93,7 +93,7 @@ public async Task Get_BackupsUnderBackupVaultGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_BackupsUnderBackupVaultGet() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/BackupsUnderBackupVault_Get.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/BackupsUnderBackupVault_Get.json // this example is just showing the usage of "Backups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -125,7 +125,7 @@ public async Task Exists_BackupsUnderBackupVaultGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_BackupsUnderBackupVaultGet() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/BackupsUnderBackupVault_Get.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/BackupsUnderBackupVault_Get.json // this example is just showing the usage of "Backups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -169,7 +169,7 @@ public async Task GetIfExists_BackupsUnderBackupVaultGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_BackupsUnderBackupVaultCreate() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/BackupsUnderBackupVault_Create.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/BackupsUnderBackupVault_Create.json // this example is just showing the usage of "Backups_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/samples/Generated/Samples/Sample_NetAppBackupVaultBackupResource.cs b/sdk/netapp/Azure.ResourceManager.NetApp/samples/Generated/Samples/Sample_NetAppBackupVaultBackupResource.cs index f10dd0f32dc9..dac8bc722a45 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/samples/Generated/Samples/Sample_NetAppBackupVaultBackupResource.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/samples/Generated/Samples/Sample_NetAppBackupVaultBackupResource.cs @@ -20,7 +20,7 @@ public partial class Sample_NetAppBackupVaultBackupResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_BackupsUnderBackupVaultGet() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/BackupsUnderBackupVault_Get.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/BackupsUnderBackupVault_Get.json // this example is just showing the usage of "Backups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -53,7 +53,7 @@ public async Task Get_BackupsUnderBackupVaultGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_BackupsUnderBackupVaultUpdate() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/BackupsUnderBackupVault_Update.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/BackupsUnderBackupVault_Update.json // this example is just showing the usage of "Backups_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -88,7 +88,7 @@ public async Task Update_BackupsUnderBackupVaultUpdate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_BackupsUnderBackupVaultDelete() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/BackupsUnderBackupVault_Delete.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/BackupsUnderBackupVault_Delete.json // this example is just showing the usage of "Backups_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -117,7 +117,7 @@ public async Task Delete_BackupsUnderBackupVaultDelete() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task RestoreFilesBackupsUnderBackupVault_BackupsSingleFileRestore() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/BackupsUnderBackupVault_SingleFileRestore.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/BackupsUnderBackupVault_SingleFileRestore.json // this example is just showing the usage of "BackupsUnderBackupVault_RestoreFiles" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/samples/Generated/Samples/Sample_NetAppBackupVaultCollection.cs b/sdk/netapp/Azure.ResourceManager.NetApp/samples/Generated/Samples/Sample_NetAppBackupVaultCollection.cs index 94aafd2d8d37..160725f75b8c 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/samples/Generated/Samples/Sample_NetAppBackupVaultCollection.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/samples/Generated/Samples/Sample_NetAppBackupVaultCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_NetAppBackupVaultCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_BackupVaultsList() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/BackupVaults_List.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/BackupVaults_List.json // this example is just showing the usage of "BackupVaults_ListByNetAppAccount" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -56,7 +56,7 @@ public async Task GetAll_BackupVaultsList() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_BackupVaultsGet() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/BackupVaults_Get.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/BackupVaults_Get.json // this example is just showing the usage of "BackupVaults_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -91,7 +91,7 @@ public async Task Get_BackupVaultsGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_BackupVaultsGet() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/BackupVaults_Get.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/BackupVaults_Get.json // this example is just showing the usage of "BackupVaults_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -122,7 +122,7 @@ public async Task Exists_BackupVaultsGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_BackupVaultsGet() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/BackupVaults_Get.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/BackupVaults_Get.json // this example is just showing the usage of "BackupVaults_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -165,7 +165,7 @@ public async Task GetIfExists_BackupVaultsGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_BackupVaultCreateOrUpdate() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/BackupVaults_Create.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/BackupVaults_Create.json // this example is just showing the usage of "BackupVaults_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/samples/Generated/Samples/Sample_NetAppBackupVaultResource.cs b/sdk/netapp/Azure.ResourceManager.NetApp/samples/Generated/Samples/Sample_NetAppBackupVaultResource.cs index a3119620089a..d0fd640c659a 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/samples/Generated/Samples/Sample_NetAppBackupVaultResource.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/samples/Generated/Samples/Sample_NetAppBackupVaultResource.cs @@ -20,7 +20,7 @@ public partial class Sample_NetAppBackupVaultResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_BackupVaultsGet() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/BackupVaults_Get.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/BackupVaults_Get.json // this example is just showing the usage of "BackupVaults_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -52,7 +52,7 @@ public async Task Get_BackupVaultsGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_BackupVaultsUpdate() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/BackupVaults_Update.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/BackupVaults_Update.json // this example is just showing the usage of "BackupVaults_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -92,7 +92,7 @@ public async Task Update_BackupVaultsUpdate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_BackupVaultsDelete() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/BackupVaults_Delete.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/BackupVaults_Delete.json // this example is just showing the usage of "BackupVaults_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/samples/Generated/Samples/Sample_NetAppSubvolumeInfoCollection.cs b/sdk/netapp/Azure.ResourceManager.NetApp/samples/Generated/Samples/Sample_NetAppSubvolumeInfoCollection.cs index 7d9d090a0938..4ea59e8d6145 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/samples/Generated/Samples/Sample_NetAppSubvolumeInfoCollection.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/samples/Generated/Samples/Sample_NetAppSubvolumeInfoCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_NetAppSubvolumeInfoCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_SubvolumesList() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Subvolumes_List.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Subvolumes_List.json // this example is just showing the usage of "Subvolumes_ListByVolume" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -58,7 +58,7 @@ public async Task GetAll_SubvolumesList() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_SubvolumesGet() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Subvolumes_Get.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Subvolumes_Get.json // this example is just showing the usage of "Subvolumes_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -95,7 +95,7 @@ public async Task Get_SubvolumesGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_SubvolumesGet() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Subvolumes_Get.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Subvolumes_Get.json // this example is just showing the usage of "Subvolumes_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -128,7 +128,7 @@ public async Task Exists_SubvolumesGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_SubvolumesGet() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Subvolumes_Get.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Subvolumes_Get.json // this example is just showing the usage of "Subvolumes_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -173,7 +173,7 @@ public async Task GetIfExists_SubvolumesGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_SubvolumesCreate() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Subvolumes_Create.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Subvolumes_Create.json // this example is just showing the usage of "Subvolumes_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/samples/Generated/Samples/Sample_NetAppSubvolumeInfoResource.cs b/sdk/netapp/Azure.ResourceManager.NetApp/samples/Generated/Samples/Sample_NetAppSubvolumeInfoResource.cs index e4c5c8b63424..51b02377e13f 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/samples/Generated/Samples/Sample_NetAppSubvolumeInfoResource.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/samples/Generated/Samples/Sample_NetAppSubvolumeInfoResource.cs @@ -20,7 +20,7 @@ public partial class Sample_NetAppSubvolumeInfoResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_SubvolumesGet() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Subvolumes_Get.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Subvolumes_Get.json // this example is just showing the usage of "Subvolumes_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -54,7 +54,7 @@ public async Task Get_SubvolumesGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_SubvolumesUpdate() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Subvolumes_Update.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Subvolumes_Update.json // this example is just showing the usage of "Subvolumes_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -93,7 +93,7 @@ public async Task Update_SubvolumesUpdate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_SubvolumesDelete() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Subvolumes_Delete.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Subvolumes_Delete.json // this example is just showing the usage of "Subvolumes_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -123,7 +123,7 @@ public async Task Delete_SubvolumesDelete() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetMetadata_SubvolumesMetadata() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Subvolumes_Metadata.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Subvolumes_Metadata.json // this example is just showing the usage of "Subvolumes_GetMetadata" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/samples/Generated/Samples/Sample_NetAppVolumeCollection.cs b/sdk/netapp/Azure.ResourceManager.NetApp/samples/Generated/Samples/Sample_NetAppVolumeCollection.cs index fa9c4ab4e820..e36cab2fd793 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/samples/Generated/Samples/Sample_NetAppVolumeCollection.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/samples/Generated/Samples/Sample_NetAppVolumeCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_NetAppVolumeCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_VolumesList() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Volumes_List.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Volumes_List.json // this example is just showing the usage of "Volumes_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -58,7 +58,7 @@ public async Task GetAll_VolumesList() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_VolumesGet() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Volumes_Get.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Volumes_Get.json // this example is just showing the usage of "Volumes_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -94,7 +94,7 @@ public async Task Get_VolumesGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_VolumesGet() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Volumes_Get.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Volumes_Get.json // this example is just showing the usage of "Volumes_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -126,7 +126,7 @@ public async Task Exists_VolumesGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_VolumesGet() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Volumes_Get.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Volumes_Get.json // this example is just showing the usage of "Volumes_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -170,7 +170,7 @@ public async Task GetIfExists_VolumesGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_VolumesCreateOrUpdate() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Volumes_CreateOrUpdate.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Volumes_CreateOrUpdate.json // this example is just showing the usage of "Volumes_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -192,7 +192,7 @@ public async Task CreateOrUpdate_VolumesCreateOrUpdate() // invoke the operation string volumeName = "volume1"; - NetAppVolumeData data = new NetAppVolumeData(new AzureLocation("eastus"), "my-unique-file-path", 107374182400, new ResourceIdentifier("/subscriptions/9760acf5-4638-11e7-9bdb-020073ca7778/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3")) + NetAppVolumeData data = new NetAppVolumeData(new AzureLocation("eastus"), "my-unique-file-path", 107374182400L, new ResourceIdentifier("/subscriptions/9760acf5-4638-11e7-9bdb-020073ca7778/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3")) { ServiceLevel = NetAppFileServiceLevel.Premium, }; diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/samples/Generated/Samples/Sample_NetAppVolumeGroupCollection.cs b/sdk/netapp/Azure.ResourceManager.NetApp/samples/Generated/Samples/Sample_NetAppVolumeGroupCollection.cs index 9b0c7e1928c6..9dffe9fc485f 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/samples/Generated/Samples/Sample_NetAppVolumeGroupCollection.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/samples/Generated/Samples/Sample_NetAppVolumeGroupCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_NetAppVolumeGroupCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_VolumeGroupsGetOracle() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/VolumeGroups_Get_Oracle.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/VolumeGroups_Get_Oracle.json // this example is just showing the usage of "VolumeGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -55,7 +55,7 @@ public async Task Get_VolumeGroupsGetOracle() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_VolumeGroupsGetOracle() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/VolumeGroups_Get_Oracle.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/VolumeGroups_Get_Oracle.json // this example is just showing the usage of "VolumeGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -86,7 +86,7 @@ public async Task Exists_VolumeGroupsGetOracle() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_VolumeGroupsGetOracle() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/VolumeGroups_Get_Oracle.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/VolumeGroups_Get_Oracle.json // this example is just showing the usage of "VolumeGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -129,7 +129,7 @@ public async Task GetIfExists_VolumeGroupsGetOracle() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_VolumeGroupsGetSapHana() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/VolumeGroups_Get_SapHana.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/VolumeGroups_Get_SapHana.json // this example is just showing the usage of "VolumeGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -164,7 +164,7 @@ public async Task Get_VolumeGroupsGetSapHana() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_VolumeGroupsGetSapHana() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/VolumeGroups_Get_SapHana.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/VolumeGroups_Get_SapHana.json // this example is just showing the usage of "VolumeGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -195,7 +195,7 @@ public async Task Exists_VolumeGroupsGetSapHana() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_VolumeGroupsGetSapHana() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/VolumeGroups_Get_SapHana.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/VolumeGroups_Get_SapHana.json // this example is just showing the usage of "VolumeGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -238,7 +238,7 @@ public async Task GetIfExists_VolumeGroupsGetSapHana() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_VolumeGroupsCreateOracle() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/VolumeGroups_Create_Oracle.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/VolumeGroups_Create_Oracle.json // this example is just showing the usage of "VolumeGroups_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -270,7 +270,7 @@ public async Task CreateOrUpdate_VolumeGroupsCreateOracle() }, Volumes = { -new NetAppVolumeGroupVolume("test-ora-data1",107374182400,new ResourceIdentifier("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3")) +new NetAppVolumeGroupVolume("test-ora-data1",107374182400L,new ResourceIdentifier("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3")) { Name = "test-ora-data1", Zones = @@ -305,7 +305,7 @@ public async Task CreateOrUpdate_VolumeGroupsCreateOracle() ThroughputMibps = 10, CapacityPoolResourceId = new ResourceIdentifier("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1"), VolumeSpecName = "ora-data1", -},new NetAppVolumeGroupVolume("test-ora-data2",107374182400,new ResourceIdentifier("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3")) +},new NetAppVolumeGroupVolume("test-ora-data2",107374182400L,new ResourceIdentifier("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3")) { Name = "test-ora-data2", Zones = @@ -340,7 +340,7 @@ public async Task CreateOrUpdate_VolumeGroupsCreateOracle() ThroughputMibps = 10, CapacityPoolResourceId = new ResourceIdentifier("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1"), VolumeSpecName = "ora-data2", -},new NetAppVolumeGroupVolume("test-ora-data3",107374182400,new ResourceIdentifier("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3")) +},new NetAppVolumeGroupVolume("test-ora-data3",107374182400L,new ResourceIdentifier("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3")) { Name = "test-ora-data3", Zones = @@ -375,7 +375,7 @@ public async Task CreateOrUpdate_VolumeGroupsCreateOracle() ThroughputMibps = 10, CapacityPoolResourceId = new ResourceIdentifier("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1"), VolumeSpecName = "ora-data3", -},new NetAppVolumeGroupVolume("test-ora-data4",107374182400,new ResourceIdentifier("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3")) +},new NetAppVolumeGroupVolume("test-ora-data4",107374182400L,new ResourceIdentifier("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3")) { Name = "test-ora-data4", Zones = @@ -410,7 +410,7 @@ public async Task CreateOrUpdate_VolumeGroupsCreateOracle() ThroughputMibps = 10, CapacityPoolResourceId = new ResourceIdentifier("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1"), VolumeSpecName = "ora-data4", -},new NetAppVolumeGroupVolume("test-ora-data5",107374182400,new ResourceIdentifier("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3")) +},new NetAppVolumeGroupVolume("test-ora-data5",107374182400L,new ResourceIdentifier("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3")) { Name = "test-ora-data5", Zones = @@ -445,7 +445,7 @@ public async Task CreateOrUpdate_VolumeGroupsCreateOracle() ThroughputMibps = 10, CapacityPoolResourceId = new ResourceIdentifier("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1"), VolumeSpecName = "ora-data5", -},new NetAppVolumeGroupVolume("test-ora-data6",107374182400,new ResourceIdentifier("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3")) +},new NetAppVolumeGroupVolume("test-ora-data6",107374182400L,new ResourceIdentifier("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3")) { Name = "test-ora-data6", Zones = @@ -480,7 +480,7 @@ public async Task CreateOrUpdate_VolumeGroupsCreateOracle() ThroughputMibps = 10, CapacityPoolResourceId = new ResourceIdentifier("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1"), VolumeSpecName = "ora-data6", -},new NetAppVolumeGroupVolume("test-ora-data7",107374182400,new ResourceIdentifier("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3")) +},new NetAppVolumeGroupVolume("test-ora-data7",107374182400L,new ResourceIdentifier("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3")) { Name = "test-ora-data7", Zones = @@ -515,7 +515,7 @@ public async Task CreateOrUpdate_VolumeGroupsCreateOracle() ThroughputMibps = 10, CapacityPoolResourceId = new ResourceIdentifier("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1"), VolumeSpecName = "ora-data7", -},new NetAppVolumeGroupVolume("test-ora-data8",107374182400,new ResourceIdentifier("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3")) +},new NetAppVolumeGroupVolume("test-ora-data8",107374182400L,new ResourceIdentifier("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3")) { Name = "test-ora-data8", Zones = @@ -550,7 +550,7 @@ public async Task CreateOrUpdate_VolumeGroupsCreateOracle() ThroughputMibps = 10, CapacityPoolResourceId = new ResourceIdentifier("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1"), VolumeSpecName = "ora-data8", -},new NetAppVolumeGroupVolume("test-ora-log",107374182400,new ResourceIdentifier("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3")) +},new NetAppVolumeGroupVolume("test-ora-log",107374182400L,new ResourceIdentifier("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3")) { Name = "test-ora-log", Zones = @@ -585,7 +585,7 @@ public async Task CreateOrUpdate_VolumeGroupsCreateOracle() ThroughputMibps = 10, CapacityPoolResourceId = new ResourceIdentifier("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1"), VolumeSpecName = "ora-log", -},new NetAppVolumeGroupVolume("test-ora-log-mirror",107374182400,new ResourceIdentifier("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3")) +},new NetAppVolumeGroupVolume("test-ora-log-mirror",107374182400L,new ResourceIdentifier("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3")) { Name = "test-ora-log-mirror", Zones = @@ -620,7 +620,7 @@ public async Task CreateOrUpdate_VolumeGroupsCreateOracle() ThroughputMibps = 10, CapacityPoolResourceId = new ResourceIdentifier("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1"), VolumeSpecName = "ora-log-mirror", -},new NetAppVolumeGroupVolume("test-ora-binary",107374182400,new ResourceIdentifier("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3")) +},new NetAppVolumeGroupVolume("test-ora-binary",107374182400L,new ResourceIdentifier("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3")) { Name = "test-ora-binary", Zones = @@ -655,7 +655,7 @@ public async Task CreateOrUpdate_VolumeGroupsCreateOracle() ThroughputMibps = 10, CapacityPoolResourceId = new ResourceIdentifier("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1"), VolumeSpecName = "ora-binary", -},new NetAppVolumeGroupVolume("test-ora-backup",107374182400,new ResourceIdentifier("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3")) +},new NetAppVolumeGroupVolume("test-ora-backup",107374182400L,new ResourceIdentifier("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3")) { Name = "test-ora-backup", Zones = @@ -708,7 +708,7 @@ public async Task CreateOrUpdate_VolumeGroupsCreateOracle() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_VolumeGroupsCreateSapHana() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/VolumeGroups_Create_SapHana.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/VolumeGroups_Create_SapHana.json // this example is just showing the usage of "VolumeGroups_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -740,7 +740,7 @@ public async Task CreateOrUpdate_VolumeGroupsCreateSapHana() }, Volumes = { -new NetAppVolumeGroupVolume("test-data-mnt00001",107374182400,new ResourceIdentifier("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3")) +new NetAppVolumeGroupVolume("test-data-mnt00001",107374182400L,new ResourceIdentifier("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3")) { Name = "test-data-mnt00001", ServiceLevel = NetAppFileServiceLevel.Premium, @@ -772,7 +772,7 @@ public async Task CreateOrUpdate_VolumeGroupsCreateSapHana() CapacityPoolResourceId = new ResourceIdentifier("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1"), ProximityPlacementGroupId = new ResourceIdentifier("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/cys_sjain_fcp_rg/providers/Microsoft.Compute/proximityPlacementGroups/svlqa_sjain_multivolume_ppg"), VolumeSpecName = "data", -},new NetAppVolumeGroupVolume("test-log-mnt00001",107374182400,new ResourceIdentifier("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3")) +},new NetAppVolumeGroupVolume("test-log-mnt00001",107374182400L,new ResourceIdentifier("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3")) { Name = "test-log-mnt00001", ServiceLevel = NetAppFileServiceLevel.Premium, @@ -804,7 +804,7 @@ public async Task CreateOrUpdate_VolumeGroupsCreateSapHana() CapacityPoolResourceId = new ResourceIdentifier("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1"), ProximityPlacementGroupId = new ResourceIdentifier("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/cys_sjain_fcp_rg/providers/Microsoft.Compute/proximityPlacementGroups/svlqa_sjain_multivolume_ppg"), VolumeSpecName = "log", -},new NetAppVolumeGroupVolume("test-shared",107374182400,new ResourceIdentifier("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3")) +},new NetAppVolumeGroupVolume("test-shared",107374182400L,new ResourceIdentifier("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3")) { Name = "test-shared", ServiceLevel = NetAppFileServiceLevel.Premium, @@ -836,7 +836,7 @@ public async Task CreateOrUpdate_VolumeGroupsCreateSapHana() CapacityPoolResourceId = new ResourceIdentifier("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1"), ProximityPlacementGroupId = new ResourceIdentifier("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/cys_sjain_fcp_rg/providers/Microsoft.Compute/proximityPlacementGroups/svlqa_sjain_multivolume_ppg"), VolumeSpecName = "shared", -},new NetAppVolumeGroupVolume("test-data-backup",107374182400,new ResourceIdentifier("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3")) +},new NetAppVolumeGroupVolume("test-data-backup",107374182400L,new ResourceIdentifier("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3")) { Name = "test-data-backup", ServiceLevel = NetAppFileServiceLevel.Premium, @@ -868,7 +868,7 @@ public async Task CreateOrUpdate_VolumeGroupsCreateSapHana() CapacityPoolResourceId = new ResourceIdentifier("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1"), ProximityPlacementGroupId = new ResourceIdentifier("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/cys_sjain_fcp_rg/providers/Microsoft.Compute/proximityPlacementGroups/svlqa_sjain_multivolume_ppg"), VolumeSpecName = "data-backup", -},new NetAppVolumeGroupVolume("test-log-backup",107374182400,new ResourceIdentifier("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3")) +},new NetAppVolumeGroupVolume("test-log-backup",107374182400L,new ResourceIdentifier("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3")) { Name = "test-log-backup", ServiceLevel = NetAppFileServiceLevel.Premium, diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/samples/Generated/Samples/Sample_NetAppVolumeGroupResource.cs b/sdk/netapp/Azure.ResourceManager.NetApp/samples/Generated/Samples/Sample_NetAppVolumeGroupResource.cs index 8508cb632c32..073599c3702d 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/samples/Generated/Samples/Sample_NetAppVolumeGroupResource.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/samples/Generated/Samples/Sample_NetAppVolumeGroupResource.cs @@ -20,7 +20,7 @@ public partial class Sample_NetAppVolumeGroupResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_VolumeGroupsGetOracle() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/VolumeGroups_Get_Oracle.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/VolumeGroups_Get_Oracle.json // this example is just showing the usage of "VolumeGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -52,7 +52,7 @@ public async Task Get_VolumeGroupsGetOracle() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_VolumeGroupsGetSapHana() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/VolumeGroups_Get_SapHana.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/VolumeGroups_Get_SapHana.json // this example is just showing the usage of "VolumeGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -84,7 +84,7 @@ public async Task Get_VolumeGroupsGetSapHana() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_VolumeGroupsCreateOracle() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/VolumeGroups_Create_Oracle.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/VolumeGroups_Create_Oracle.json // this example is just showing the usage of "VolumeGroups_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -113,7 +113,7 @@ public async Task Update_VolumeGroupsCreateOracle() }, Volumes = { -new NetAppVolumeGroupVolume("test-ora-data1",107374182400,new ResourceIdentifier("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3")) +new NetAppVolumeGroupVolume("test-ora-data1",107374182400L,new ResourceIdentifier("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3")) { Name = "test-ora-data1", Zones = @@ -148,7 +148,7 @@ public async Task Update_VolumeGroupsCreateOracle() ThroughputMibps = 10, CapacityPoolResourceId = new ResourceIdentifier("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1"), VolumeSpecName = "ora-data1", -},new NetAppVolumeGroupVolume("test-ora-data2",107374182400,new ResourceIdentifier("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3")) +},new NetAppVolumeGroupVolume("test-ora-data2",107374182400L,new ResourceIdentifier("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3")) { Name = "test-ora-data2", Zones = @@ -183,7 +183,7 @@ public async Task Update_VolumeGroupsCreateOracle() ThroughputMibps = 10, CapacityPoolResourceId = new ResourceIdentifier("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1"), VolumeSpecName = "ora-data2", -},new NetAppVolumeGroupVolume("test-ora-data3",107374182400,new ResourceIdentifier("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3")) +},new NetAppVolumeGroupVolume("test-ora-data3",107374182400L,new ResourceIdentifier("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3")) { Name = "test-ora-data3", Zones = @@ -218,7 +218,7 @@ public async Task Update_VolumeGroupsCreateOracle() ThroughputMibps = 10, CapacityPoolResourceId = new ResourceIdentifier("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1"), VolumeSpecName = "ora-data3", -},new NetAppVolumeGroupVolume("test-ora-data4",107374182400,new ResourceIdentifier("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3")) +},new NetAppVolumeGroupVolume("test-ora-data4",107374182400L,new ResourceIdentifier("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3")) { Name = "test-ora-data4", Zones = @@ -253,7 +253,7 @@ public async Task Update_VolumeGroupsCreateOracle() ThroughputMibps = 10, CapacityPoolResourceId = new ResourceIdentifier("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1"), VolumeSpecName = "ora-data4", -},new NetAppVolumeGroupVolume("test-ora-data5",107374182400,new ResourceIdentifier("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3")) +},new NetAppVolumeGroupVolume("test-ora-data5",107374182400L,new ResourceIdentifier("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3")) { Name = "test-ora-data5", Zones = @@ -288,7 +288,7 @@ public async Task Update_VolumeGroupsCreateOracle() ThroughputMibps = 10, CapacityPoolResourceId = new ResourceIdentifier("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1"), VolumeSpecName = "ora-data5", -},new NetAppVolumeGroupVolume("test-ora-data6",107374182400,new ResourceIdentifier("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3")) +},new NetAppVolumeGroupVolume("test-ora-data6",107374182400L,new ResourceIdentifier("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3")) { Name = "test-ora-data6", Zones = @@ -323,7 +323,7 @@ public async Task Update_VolumeGroupsCreateOracle() ThroughputMibps = 10, CapacityPoolResourceId = new ResourceIdentifier("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1"), VolumeSpecName = "ora-data6", -},new NetAppVolumeGroupVolume("test-ora-data7",107374182400,new ResourceIdentifier("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3")) +},new NetAppVolumeGroupVolume("test-ora-data7",107374182400L,new ResourceIdentifier("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3")) { Name = "test-ora-data7", Zones = @@ -358,7 +358,7 @@ public async Task Update_VolumeGroupsCreateOracle() ThroughputMibps = 10, CapacityPoolResourceId = new ResourceIdentifier("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1"), VolumeSpecName = "ora-data7", -},new NetAppVolumeGroupVolume("test-ora-data8",107374182400,new ResourceIdentifier("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3")) +},new NetAppVolumeGroupVolume("test-ora-data8",107374182400L,new ResourceIdentifier("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3")) { Name = "test-ora-data8", Zones = @@ -393,7 +393,7 @@ public async Task Update_VolumeGroupsCreateOracle() ThroughputMibps = 10, CapacityPoolResourceId = new ResourceIdentifier("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1"), VolumeSpecName = "ora-data8", -},new NetAppVolumeGroupVolume("test-ora-log",107374182400,new ResourceIdentifier("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3")) +},new NetAppVolumeGroupVolume("test-ora-log",107374182400L,new ResourceIdentifier("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3")) { Name = "test-ora-log", Zones = @@ -428,7 +428,7 @@ public async Task Update_VolumeGroupsCreateOracle() ThroughputMibps = 10, CapacityPoolResourceId = new ResourceIdentifier("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1"), VolumeSpecName = "ora-log", -},new NetAppVolumeGroupVolume("test-ora-log-mirror",107374182400,new ResourceIdentifier("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3")) +},new NetAppVolumeGroupVolume("test-ora-log-mirror",107374182400L,new ResourceIdentifier("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3")) { Name = "test-ora-log-mirror", Zones = @@ -463,7 +463,7 @@ public async Task Update_VolumeGroupsCreateOracle() ThroughputMibps = 10, CapacityPoolResourceId = new ResourceIdentifier("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1"), VolumeSpecName = "ora-log-mirror", -},new NetAppVolumeGroupVolume("test-ora-binary",107374182400,new ResourceIdentifier("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3")) +},new NetAppVolumeGroupVolume("test-ora-binary",107374182400L,new ResourceIdentifier("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3")) { Name = "test-ora-binary", Zones = @@ -498,7 +498,7 @@ public async Task Update_VolumeGroupsCreateOracle() ThroughputMibps = 10, CapacityPoolResourceId = new ResourceIdentifier("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1"), VolumeSpecName = "ora-binary", -},new NetAppVolumeGroupVolume("test-ora-backup",107374182400,new ResourceIdentifier("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3")) +},new NetAppVolumeGroupVolume("test-ora-backup",107374182400L,new ResourceIdentifier("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3")) { Name = "test-ora-backup", Zones = @@ -551,7 +551,7 @@ public async Task Update_VolumeGroupsCreateOracle() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_VolumeGroupsCreateSapHana() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/VolumeGroups_Create_SapHana.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/VolumeGroups_Create_SapHana.json // this example is just showing the usage of "VolumeGroups_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -580,7 +580,7 @@ public async Task Update_VolumeGroupsCreateSapHana() }, Volumes = { -new NetAppVolumeGroupVolume("test-data-mnt00001",107374182400,new ResourceIdentifier("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3")) +new NetAppVolumeGroupVolume("test-data-mnt00001",107374182400L,new ResourceIdentifier("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3")) { Name = "test-data-mnt00001", ServiceLevel = NetAppFileServiceLevel.Premium, @@ -612,7 +612,7 @@ public async Task Update_VolumeGroupsCreateSapHana() CapacityPoolResourceId = new ResourceIdentifier("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1"), ProximityPlacementGroupId = new ResourceIdentifier("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/cys_sjain_fcp_rg/providers/Microsoft.Compute/proximityPlacementGroups/svlqa_sjain_multivolume_ppg"), VolumeSpecName = "data", -},new NetAppVolumeGroupVolume("test-log-mnt00001",107374182400,new ResourceIdentifier("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3")) +},new NetAppVolumeGroupVolume("test-log-mnt00001",107374182400L,new ResourceIdentifier("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3")) { Name = "test-log-mnt00001", ServiceLevel = NetAppFileServiceLevel.Premium, @@ -644,7 +644,7 @@ public async Task Update_VolumeGroupsCreateSapHana() CapacityPoolResourceId = new ResourceIdentifier("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1"), ProximityPlacementGroupId = new ResourceIdentifier("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/cys_sjain_fcp_rg/providers/Microsoft.Compute/proximityPlacementGroups/svlqa_sjain_multivolume_ppg"), VolumeSpecName = "log", -},new NetAppVolumeGroupVolume("test-shared",107374182400,new ResourceIdentifier("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3")) +},new NetAppVolumeGroupVolume("test-shared",107374182400L,new ResourceIdentifier("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3")) { Name = "test-shared", ServiceLevel = NetAppFileServiceLevel.Premium, @@ -676,7 +676,7 @@ public async Task Update_VolumeGroupsCreateSapHana() CapacityPoolResourceId = new ResourceIdentifier("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1"), ProximityPlacementGroupId = new ResourceIdentifier("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/cys_sjain_fcp_rg/providers/Microsoft.Compute/proximityPlacementGroups/svlqa_sjain_multivolume_ppg"), VolumeSpecName = "shared", -},new NetAppVolumeGroupVolume("test-data-backup",107374182400,new ResourceIdentifier("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3")) +},new NetAppVolumeGroupVolume("test-data-backup",107374182400L,new ResourceIdentifier("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3")) { Name = "test-data-backup", ServiceLevel = NetAppFileServiceLevel.Premium, @@ -708,7 +708,7 @@ public async Task Update_VolumeGroupsCreateSapHana() CapacityPoolResourceId = new ResourceIdentifier("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1"), ProximityPlacementGroupId = new ResourceIdentifier("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/cys_sjain_fcp_rg/providers/Microsoft.Compute/proximityPlacementGroups/svlqa_sjain_multivolume_ppg"), VolumeSpecName = "data-backup", -},new NetAppVolumeGroupVolume("test-log-backup",107374182400,new ResourceIdentifier("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3")) +},new NetAppVolumeGroupVolume("test-log-backup",107374182400L,new ResourceIdentifier("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3")) { Name = "test-log-backup", ServiceLevel = NetAppFileServiceLevel.Premium, @@ -758,7 +758,7 @@ public async Task Update_VolumeGroupsCreateSapHana() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_VolumeGroupsDelete() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/VolumeGroups_Delete.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/VolumeGroups_Delete.json // this example is just showing the usage of "VolumeGroups_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/samples/Generated/Samples/Sample_NetAppVolumeQuotaRuleCollection.cs b/sdk/netapp/Azure.ResourceManager.NetApp/samples/Generated/Samples/Sample_NetAppVolumeQuotaRuleCollection.cs index 6a79b8fcbf76..75114006fa7e 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/samples/Generated/Samples/Sample_NetAppVolumeQuotaRuleCollection.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/samples/Generated/Samples/Sample_NetAppVolumeQuotaRuleCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_NetAppVolumeQuotaRuleCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_VolumeQuotaRulesList() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/VolumeQuotaRules_List.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/VolumeQuotaRules_List.json // this example is just showing the usage of "VolumeQuotaRules_ListByVolume" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -59,7 +59,7 @@ public async Task GetAll_VolumeQuotaRulesList() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_VolumeQuotaRulesGet() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/VolumeQuotaRules_Get.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/VolumeQuotaRules_Get.json // this example is just showing the usage of "VolumeQuotaRules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -96,7 +96,7 @@ public async Task Get_VolumeQuotaRulesGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_VolumeQuotaRulesGet() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/VolumeQuotaRules_Get.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/VolumeQuotaRules_Get.json // this example is just showing the usage of "VolumeQuotaRules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -129,7 +129,7 @@ public async Task Exists_VolumeQuotaRulesGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_VolumeQuotaRulesGet() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/VolumeQuotaRules_Get.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/VolumeQuotaRules_Get.json // this example is just showing the usage of "VolumeQuotaRules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -174,7 +174,7 @@ public async Task GetIfExists_VolumeQuotaRulesGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_VolumeQuotaRulesCreate() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/VolumeQuotaRules_Create.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/VolumeQuotaRules_Create.json // this example is just showing the usage of "VolumeQuotaRules_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -199,7 +199,7 @@ public async Task CreateOrUpdate_VolumeQuotaRulesCreate() string volumeQuotaRuleName = "rule-0004"; NetAppVolumeQuotaRuleData data = new NetAppVolumeQuotaRuleData(new AzureLocation("westus")) { - QuotaSizeInKiBs = 100005, + QuotaSizeInKiBs = 100005L, QuotaType = NetAppVolumeQuotaType.IndividualUserQuota, QuotaTarget = "1821", }; diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/samples/Generated/Samples/Sample_NetAppVolumeQuotaRuleResource.cs b/sdk/netapp/Azure.ResourceManager.NetApp/samples/Generated/Samples/Sample_NetAppVolumeQuotaRuleResource.cs index 7c0298b99bc8..936eb2c4d5b9 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/samples/Generated/Samples/Sample_NetAppVolumeQuotaRuleResource.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/samples/Generated/Samples/Sample_NetAppVolumeQuotaRuleResource.cs @@ -20,7 +20,7 @@ public partial class Sample_NetAppVolumeQuotaRuleResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_VolumeQuotaRulesGet() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/VolumeQuotaRules_Get.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/VolumeQuotaRules_Get.json // this example is just showing the usage of "VolumeQuotaRules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -54,7 +54,7 @@ public async Task Get_VolumeQuotaRulesGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_VolumeQuotaRulesUpdate() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/VolumeQuotaRules_Update.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/VolumeQuotaRules_Update.json // this example is just showing the usage of "VolumeQuotaRules_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -76,7 +76,7 @@ public async Task Update_VolumeQuotaRulesUpdate() // invoke the operation NetAppVolumeQuotaRulePatch patch = new NetAppVolumeQuotaRulePatch() { - QuotaSizeInKiBs = 100009, + QuotaSizeInKiBs = 100009L, }; ArmOperation lro = await netAppVolumeQuotaRule.UpdateAsync(WaitUntil.Completed, patch); NetAppVolumeQuotaRuleResource result = lro.Value; @@ -93,7 +93,7 @@ public async Task Update_VolumeQuotaRulesUpdate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_VolumeQuotaRulesDelete() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/VolumeQuotaRules_Delete.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/VolumeQuotaRules_Delete.json // this example is just showing the usage of "VolumeQuotaRules_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/samples/Generated/Samples/Sample_NetAppVolumeResource.cs b/sdk/netapp/Azure.ResourceManager.NetApp/samples/Generated/Samples/Sample_NetAppVolumeResource.cs index 0ee298ec1713..5fdbce168fc5 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/samples/Generated/Samples/Sample_NetAppVolumeResource.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/samples/Generated/Samples/Sample_NetAppVolumeResource.cs @@ -21,7 +21,7 @@ public partial class Sample_NetAppVolumeResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_VolumesGet() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Volumes_Get.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Volumes_Get.json // this example is just showing the usage of "Volumes_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -54,7 +54,7 @@ public async Task Get_VolumesGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_VolumesUpdate() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Volumes_Update.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Volumes_Update.json // this example is just showing the usage of "Volumes_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -89,7 +89,7 @@ public async Task Update_VolumesUpdate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_VolumesDelete() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Volumes_Delete.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Volumes_Delete.json // this example is just showing the usage of "Volumes_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -118,7 +118,7 @@ public async Task Delete_VolumesDelete() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task PopulateAvailabilityZone_VolumesPopulateAvailabilityZones() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Volumes_PopulateAvailabilityZones.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Volumes_PopulateAvailabilityZones.json // this example is just showing the usage of "Volumes_PopulateAvailabilityZone" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -152,7 +152,7 @@ public async Task PopulateAvailabilityZone_VolumesPopulateAvailabilityZones() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Revert_VolumesRevert() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Volumes_Revert.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Volumes_Revert.json // this example is just showing the usage of "Volumes_Revert" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -185,7 +185,7 @@ public async Task Revert_VolumesRevert() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task ResetCifsPassword_VolumesResetCifsPassword() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Volumes_ResetCifsPassword.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Volumes_ResetCifsPassword.json // this example is just showing the usage of "Volumes_ResetCifsPassword" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -214,7 +214,7 @@ public async Task ResetCifsPassword_VolumesResetCifsPassword() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task BreakFileLocks_VolumesBreakFileLocks() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Volumes_BreakFileLocks.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Volumes_BreakFileLocks.json // this example is just showing the usage of "Volumes_BreakFileLocks" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -248,7 +248,7 @@ public async Task BreakFileLocks_VolumesBreakFileLocks() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetGetGroupIdListForLdapUser_GetGroupIdListForUser() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/GroupIdListForLDAPUser.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/GroupIdListForLDAPUser.json // this example is just showing the usage of "Volumes_ListGetGroupIdListForLdapUser" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -279,7 +279,7 @@ public async Task GetGetGroupIdListForLdapUser_GetGroupIdListForUser() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task BreakReplication_VolumesBreakReplication() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Volumes_BreakReplication.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Volumes_BreakReplication.json // this example is just showing the usage of "Volumes_BreakReplication" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -312,7 +312,7 @@ public async Task BreakReplication_VolumesBreakReplication() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task ReestablishReplication_VolumesReestablishReplication() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Volumes_ReestablishReplication.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Volumes_ReestablishReplication.json // this example is just showing the usage of "Volumes_ReestablishReplication" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -345,7 +345,7 @@ public async Task ReestablishReplication_VolumesReestablishReplication() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetReplicationStatus_VolumesReplicationStatus() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Volumes_ReplicationStatus.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Volumes_ReplicationStatus.json // this example is just showing the usage of "Volumes_ReplicationStatus" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -374,7 +374,7 @@ public async Task GetReplicationStatus_VolumesReplicationStatus() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetReplications_VolumesListReplications() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Volumes_ListReplications.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Volumes_ListReplications.json // this example is just showing the usage of "Volumes_ListReplications" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -406,7 +406,7 @@ public async Task GetReplications_VolumesListReplications() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task ResyncReplication_VolumesResyncReplication() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Volumes_ResyncReplication.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Volumes_ResyncReplication.json // this example is just showing the usage of "Volumes_ResyncReplication" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -435,7 +435,7 @@ public async Task ResyncReplication_VolumesResyncReplication() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task DeleteReplication_VolumesDeleteReplication() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Volumes_DeleteReplication.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Volumes_DeleteReplication.json // this example is just showing the usage of "Volumes_DeleteReplication" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -464,7 +464,7 @@ public async Task DeleteReplication_VolumesDeleteReplication() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task AuthorizeReplication_VolumesAuthorizeReplication() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Volumes_AuthorizeReplication.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Volumes_AuthorizeReplication.json // this example is just showing the usage of "Volumes_AuthorizeReplication" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -497,7 +497,7 @@ public async Task AuthorizeReplication_VolumesAuthorizeReplication() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task ReInitializeReplication_VolumesReInitializeReplication() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Volumes_ReInitializeReplication.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Volumes_ReInitializeReplication.json // this example is just showing the usage of "Volumes_ReInitializeReplication" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -521,12 +521,134 @@ public async Task ReInitializeReplication_VolumesReInitializeReplication() Console.WriteLine($"Succeeded"); } + // Volumes_PeerExternalCluster + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task PeerExternalCluster_VolumesPeerExternalCluster() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Volumes_PeerExternalCluster.json + // this example is just showing the usage of "Volumes_PeerExternalCluster" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetAppVolumeResource created on azure + // for more information of creating NetAppVolumeResource, please refer to the document of NetAppVolumeResource + string subscriptionId = "D633CC2E-722B-4AE1-B636-BBD9E4C60ED9"; + string resourceGroupName = "myRG"; + string accountName = "account1"; + string poolName = "pool1"; + string volumeName = "volume1"; + ResourceIdentifier netAppVolumeResourceId = NetAppVolumeResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName, poolName, volumeName); + NetAppVolumeResource netAppVolume = client.GetNetAppVolumeResource(netAppVolumeResourceId); + + // invoke the operation + PeerClusterForVolumeMigrationContent content = new PeerClusterForVolumeMigrationContent(new string[] + { +"0.0.0.1","0.0.0.2","0.0.0.3","0.0.0.4","0.0.0.5","0.0.0.6" + }); + ArmOperation lro = await netAppVolume.PeerExternalClusterAsync(WaitUntil.Completed, content); + ClusterPeerCommandResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + + // Volumes_AuthorizeExternalReplication + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task AuthorizeExternalReplication_VolumesAuthorizeExternalReplication() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Volumes_AuthorizeExternalReplication.json + // this example is just showing the usage of "Volumes_AuthorizeExternalReplication" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetAppVolumeResource created on azure + // for more information of creating NetAppVolumeResource, please refer to the document of NetAppVolumeResource + string subscriptionId = "D633CC2E-722B-4AE1-B636-BBD9E4C60ED9"; + string resourceGroupName = "myRG"; + string accountName = "account1"; + string poolName = "pool1"; + string volumeName = "volume1"; + ResourceIdentifier netAppVolumeResourceId = NetAppVolumeResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName, poolName, volumeName); + NetAppVolumeResource netAppVolume = client.GetNetAppVolumeResource(netAppVolumeResourceId); + + // invoke the operation + ArmOperation lro = await netAppVolume.AuthorizeExternalReplicationAsync(WaitUntil.Completed); + SvmPeerCommandResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + + // Volumes_FinalizeExternalReplication + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task FinalizeExternalReplication_VolumesFinalizeExternalReplication() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Volumes_FinalizeExternalReplication.json + // this example is just showing the usage of "Volumes_FinalizeExternalReplication" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetAppVolumeResource created on azure + // for more information of creating NetAppVolumeResource, please refer to the document of NetAppVolumeResource + string subscriptionId = "D633CC2E-722B-4AE1-B636-BBD9E4C60ED9"; + string resourceGroupName = "myRG"; + string accountName = "account1"; + string poolName = "pool1"; + string volumeName = "volume1"; + ResourceIdentifier netAppVolumeResourceId = NetAppVolumeResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName, poolName, volumeName); + NetAppVolumeResource netAppVolume = client.GetNetAppVolumeResource(netAppVolumeResourceId); + + // invoke the operation + await netAppVolume.FinalizeExternalReplicationAsync(WaitUntil.Completed); + + Console.WriteLine($"Succeeded"); + } + + // Volumes_PerformReplicationTransfer + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task PerformReplicationTransfer_VolumesPerformReplicationTransfer() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Volumes_PerformReplicationTransfer.json + // this example is just showing the usage of "Volumes_PerformReplicationTransfer" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetAppVolumeResource created on azure + // for more information of creating NetAppVolumeResource, please refer to the document of NetAppVolumeResource + string subscriptionId = "D633CC2E-722B-4AE1-B636-BBD9E4C60ED9"; + string resourceGroupName = "myRG"; + string accountName = "account1"; + string poolName = "pool1"; + string volumeName = "volume1"; + ResourceIdentifier netAppVolumeResourceId = NetAppVolumeResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName, poolName, volumeName); + NetAppVolumeResource netAppVolume = client.GetNetAppVolumeResource(netAppVolumeResourceId); + + // invoke the operation + await netAppVolume.PerformReplicationTransferAsync(WaitUntil.Completed); + + Console.WriteLine($"Succeeded"); + } + // Volumes_AuthorizeReplication [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task PoolChange_VolumesAuthorizeReplication() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Volumes_PoolChange.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Volumes_PoolChange.json // this example is just showing the usage of "Volumes_PoolChange" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -556,7 +678,7 @@ public async Task PoolChange_VolumesAuthorizeReplication() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Relocate_VolumesRelocate() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Volumes_Relocate.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Volumes_Relocate.json // this example is just showing the usage of "Volumes_Relocate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -586,7 +708,7 @@ public async Task Relocate_VolumesRelocate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task FinalizeRelocation_VolumesFinalizeRelocation() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Volumes_FinalizeRelocation.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Volumes_FinalizeRelocation.json // this example is just showing the usage of "Volumes_FinalizeRelocation" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -615,7 +737,7 @@ public async Task FinalizeRelocation_VolumesFinalizeRelocation() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task RevertRelocation_VolumesRevertRelocation() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Volumes_RevertRelocation.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Volumes_RevertRelocation.json // this example is just showing the usage of "Volumes_RevertRelocation" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -644,7 +766,7 @@ public async Task RevertRelocation_VolumesRevertRelocation() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetLatestStatusBackup_VolumesBackupStatus() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Volumes_LatestBackupStatus.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Volumes_LatestBackupStatus.json // this example is just showing the usage of "Backups_GetLatestStatus" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -673,7 +795,7 @@ public async Task GetLatestStatusBackup_VolumesBackupStatus() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetVolumeLatestRestoreStatusBackup_VolumesRestoreStatus() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Volumes_LatestRestoreStatus.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Volumes_LatestRestoreStatus.json // this example is just showing the usage of "Backups_GetVolumeLatestRestoreStatus" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -702,7 +824,7 @@ public async Task GetVolumeLatestRestoreStatusBackup_VolumesRestoreStatus() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task MigrateBackupsBackupsUnderVolume_BackupsUnderVolumeMigrate() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/BackupsUnderVolume_Migrate.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/BackupsUnderVolume_Migrate.json // this example is just showing the usage of "BackupsUnderVolume_MigrateBackups" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/samples/Generated/Samples/Sample_NetAppVolumeSnapshotCollection.cs b/sdk/netapp/Azure.ResourceManager.NetApp/samples/Generated/Samples/Sample_NetAppVolumeSnapshotCollection.cs index 13aa5c5c8fe7..4719de2a1631 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/samples/Generated/Samples/Sample_NetAppVolumeSnapshotCollection.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/samples/Generated/Samples/Sample_NetAppVolumeSnapshotCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_NetAppVolumeSnapshotCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_SnapshotsList() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Snapshots_List.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Snapshots_List.json // this example is just showing the usage of "Snapshots_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -58,7 +58,7 @@ public async Task GetAll_SnapshotsList() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_SnapshotsGet() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Snapshots_Get.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Snapshots_Get.json // this example is just showing the usage of "Snapshots_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -95,7 +95,7 @@ public async Task Get_SnapshotsGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_SnapshotsGet() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Snapshots_Get.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Snapshots_Get.json // this example is just showing the usage of "Snapshots_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -128,7 +128,7 @@ public async Task Exists_SnapshotsGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_SnapshotsGet() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Snapshots_Get.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Snapshots_Get.json // this example is just showing the usage of "Snapshots_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -173,7 +173,7 @@ public async Task GetIfExists_SnapshotsGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_SnapshotsCreate() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Snapshots_Create.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Snapshots_Create.json // this example is just showing the usage of "Snapshots_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/samples/Generated/Samples/Sample_NetAppVolumeSnapshotResource.cs b/sdk/netapp/Azure.ResourceManager.NetApp/samples/Generated/Samples/Sample_NetAppVolumeSnapshotResource.cs index f646fcec5f39..03d99c8aca07 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/samples/Generated/Samples/Sample_NetAppVolumeSnapshotResource.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/samples/Generated/Samples/Sample_NetAppVolumeSnapshotResource.cs @@ -20,7 +20,7 @@ public partial class Sample_NetAppVolumeSnapshotResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_SnapshotsGet() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Snapshots_Get.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Snapshots_Get.json // this example is just showing the usage of "Snapshots_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -54,7 +54,7 @@ public async Task Get_SnapshotsGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_SnapshotsCreate() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Snapshots_Create.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Snapshots_Create.json // this example is just showing the usage of "Snapshots_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -90,7 +90,7 @@ public async Task Update_SnapshotsCreate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_SnapshotsDelete() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Snapshots_Delete.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Snapshots_Delete.json // this example is just showing the usage of "Snapshots_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -120,7 +120,7 @@ public async Task Delete_SnapshotsDelete() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task RestoreFiles_SnapshotsSingleFileRestore() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Snapshots_SingleFileRestore.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Snapshots_SingleFileRestore.json // this example is just showing the usage of "Snapshots_RestoreFiles" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/samples/Generated/Samples/Sample_RegionInfoResource.cs b/sdk/netapp/Azure.ResourceManager.NetApp/samples/Generated/Samples/Sample_RegionInfoResource.cs index a2201070f7d9..65a521c44bae 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/samples/Generated/Samples/Sample_RegionInfoResource.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/samples/Generated/Samples/Sample_RegionInfoResource.cs @@ -19,7 +19,7 @@ public partial class Sample_RegionInfoResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_RegionInfosGet() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/RegionInfos_Get.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/RegionInfos_Get.json // this example is just showing the usage of "NetAppResourceRegionInfos_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/samples/Generated/Samples/Sample_RegionInfoResourceCollection.cs b/sdk/netapp/Azure.ResourceManager.NetApp/samples/Generated/Samples/Sample_RegionInfoResourceCollection.cs index 52aadecb5913..eedcbcc85219 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/samples/Generated/Samples/Sample_RegionInfoResourceCollection.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/samples/Generated/Samples/Sample_RegionInfoResourceCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_RegionInfoResourceCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_RegionInfosList() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/RegionInfos_List.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/RegionInfos_List.json // this example is just showing the usage of "NetAppResourceRegionInfos_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -56,7 +56,7 @@ public async Task GetAll_RegionInfosList() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_RegionInfosGet() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/RegionInfos_Get.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/RegionInfos_Get.json // this example is just showing the usage of "NetAppResourceRegionInfos_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -89,7 +89,7 @@ public async Task Get_RegionInfosGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_RegionInfosGet() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/RegionInfos_Get.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/RegionInfos_Get.json // this example is just showing the usage of "NetAppResourceRegionInfos_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -118,7 +118,7 @@ public async Task Exists_RegionInfosGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_RegionInfosGet() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/RegionInfos_Get.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/RegionInfos_Get.json // this example is just showing the usage of "NetAppResourceRegionInfos_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/samples/Generated/Samples/Sample_SnapshotPolicyCollection.cs b/sdk/netapp/Azure.ResourceManager.NetApp/samples/Generated/Samples/Sample_SnapshotPolicyCollection.cs index 8350584ca1cb..2292e26c6801 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/samples/Generated/Samples/Sample_SnapshotPolicyCollection.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/samples/Generated/Samples/Sample_SnapshotPolicyCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_SnapshotPolicyCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_SnapshotPoliciesList() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/SnapshotPolicies_List.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/SnapshotPolicies_List.json // this example is just showing the usage of "SnapshotPolicies_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -57,7 +57,7 @@ public async Task GetAll_SnapshotPoliciesList() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_SnapshotPoliciesGet() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/SnapshotPolicies_Get.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/SnapshotPolicies_Get.json // this example is just showing the usage of "SnapshotPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -92,7 +92,7 @@ public async Task Get_SnapshotPoliciesGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_SnapshotPoliciesGet() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/SnapshotPolicies_Get.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/SnapshotPolicies_Get.json // this example is just showing the usage of "SnapshotPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -123,7 +123,7 @@ public async Task Exists_SnapshotPoliciesGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_SnapshotPoliciesGet() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/SnapshotPolicies_Get.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/SnapshotPolicies_Get.json // this example is just showing the usage of "SnapshotPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -166,7 +166,7 @@ public async Task GetIfExists_SnapshotPoliciesGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_SnapshotPoliciesCreate() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/SnapshotPolicies_Create.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/SnapshotPolicies_Create.json // this example is just showing the usage of "SnapshotPolicies_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/samples/Generated/Samples/Sample_SnapshotPolicyResource.cs b/sdk/netapp/Azure.ResourceManager.NetApp/samples/Generated/Samples/Sample_SnapshotPolicyResource.cs index 7abae5b00dd8..e458e055c313 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/samples/Generated/Samples/Sample_SnapshotPolicyResource.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/samples/Generated/Samples/Sample_SnapshotPolicyResource.cs @@ -20,7 +20,7 @@ public partial class Sample_SnapshotPolicyResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_SnapshotPoliciesGet() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/SnapshotPolicies_Get.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/SnapshotPolicies_Get.json // this example is just showing the usage of "SnapshotPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -52,7 +52,7 @@ public async Task Get_SnapshotPoliciesGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_SnapshotPoliciesUpdate() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/SnapshotPolicies_Update.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/SnapshotPolicies_Update.json // this example is just showing the usage of "SnapshotPolicies_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -114,7 +114,7 @@ public async Task Update_SnapshotPoliciesUpdate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_SnapshotPoliciesDelete() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/SnapshotPolicies_Delete.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/SnapshotPolicies_Delete.json // this example is just showing the usage of "SnapshotPolicies_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -142,7 +142,7 @@ public async Task Delete_SnapshotPoliciesDelete() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetVolumes_SnapshotPoliciesListVolumes() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/SnapshotPolicies_ListVolumes.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/SnapshotPolicies_ListVolumes.json // this example is just showing the usage of "SnapshotPolicies_ListVolumes" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/netapp/Azure.ResourceManager.NetApp/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs index 150475c0b135..73bf5c52b108 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs @@ -21,7 +21,7 @@ public partial class Sample_SubscriptionResourceExtensions [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CheckNetAppNameAvailability_CheckNameAvailability() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/CheckNameAvailability.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/CheckNameAvailability.json // this example is just showing the usage of "NetAppResource_CheckNameAvailability" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -48,7 +48,7 @@ public async Task CheckNetAppNameAvailability_CheckNameAvailability() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CheckNetAppFilePathAvailability_CheckFilePathAvailability() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/CheckFilePathAvailability.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/CheckFilePathAvailability.json // this example is just showing the usage of "NetAppResource_CheckFilePathAvailability" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -75,7 +75,7 @@ public async Task CheckNetAppFilePathAvailability_CheckFilePathAvailability() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CheckNetAppQuotaAvailability_CheckQuotaAvailability() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/CheckQuotaAvailability.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/CheckQuotaAvailability.json // this example is just showing the usage of "NetAppResource_CheckQuotaAvailability" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -102,7 +102,7 @@ public async Task CheckNetAppQuotaAvailability_CheckQuotaAvailability() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task QueryRegionInfoNetAppResource_RegionInfoQuery() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/RegionInfo.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/RegionInfo.json // this example is just showing the usage of "NetAppResource_QueryRegionInfo" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -128,7 +128,7 @@ public async Task QueryRegionInfoNetAppResource_RegionInfoQuery() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task QueryNetworkSiblingSetNetAppResource_NetworkSiblingSetQuery() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/NetworkSiblingSet_Query.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/NetworkSiblingSet_Query.json // this example is just showing the usage of "NetAppResource_QueryNetworkSiblingSet" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -155,7 +155,7 @@ public async Task QueryNetworkSiblingSetNetAppResource_NetworkSiblingSetQuery() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task UpdateNetworkSiblingSetNetAppResource_NetworkFeaturesUpdate() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/NetworkSiblingSet_Update.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/NetworkSiblingSet_Update.json // this example is just showing the usage of "NetAppResource_UpdateNetworkSiblingSet" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -183,7 +183,7 @@ public async Task UpdateNetworkSiblingSetNetAppResource_NetworkFeaturesUpdate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetNetAppQuotaLimits_QuotaLimits() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/QuotaLimits_List.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/QuotaLimits_List.json // this example is just showing the usage of "NetAppResourceQuotaLimits_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -212,7 +212,7 @@ public async Task GetNetAppQuotaLimits_QuotaLimits() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetNetAppQuotaLimit_QuotaLimits() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/QuotaLimits_Get.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/QuotaLimits_Get.json // this example is just showing the usage of "NetAppResourceQuotaLimits_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Custom/ArmNetAppModelFactory.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Custom/ArmNetAppModelFactory.cs index 04718a0da1ca..578f706d6799 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Custom/ArmNetAppModelFactory.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Custom/ArmNetAppModelFactory.cs @@ -123,8 +123,150 @@ public static NetAppVolumeGroupVolume NetAppVolumeGroupVolume(ResourceIdentifier mountTargets ??= new List(); dataStoreResourceId ??= new List(); placementRules ??= new List(); - //Set null for zones and coolAccessRetrievalPolicy for backwards compat - return new NetAppVolumeGroupVolume(id, name, resourceType, tags, null, fileSystemId, creationToken, serviceLevel, usageThreshold, exportRules != null ? new VolumePropertiesExportPolicy(exportRules?.ToList(), serializedAdditionalRawData: null) : null, protocolTypes?.ToList(), provisioningState, snapshotId, deleteBaseSnapshot, backupId, baremetalTenantId, subnetId, networkFeatures, networkSiblingSetId, storageToNetworkProximity, mountTargets?.ToList(), volumeType, dataProtection, isRestoring, isSnapshotDirectoryVisible, isKerberosEnabled, securityStyle, isSmbEncryptionEnabled, smbAccessBasedEnumeration, smbNonBrowsable, isSmbContinuouslyAvailable, throughputMibps, actualThroughputMibps, encryptionKeySource, keyVaultPrivateEndpointResourceId, isLdapEnabled, isCoolAccessEnabled, coolnessPeriod, null, unixPermissions, cloneProgress, fileAccessLogs, avsDataStore, dataStoreResourceId?.ToList(), isDefaultQuotaEnabled, defaultUserQuotaInKiBs, defaultGroupQuotaInKiBs, maximumNumberOfFiles, volumeGroupName, capacityPoolResourceId, proximityPlacementGroupId, t2Network, volumeSpecName, isEncrypted, placementRules?.ToList(), enableSubvolumes, provisionedAvailabilityZone, isLargeVolume, originatingResourceId, serializedAdditionalRawData: null); + //Set null for zones, coolAccessRetrievalPolicy and effectiveNetworkFeatures for backwards compat + return new NetAppVolumeGroupVolume(id, name, resourceType, tags, null, fileSystemId, creationToken, serviceLevel, usageThreshold, exportRules != null ? new VolumePropertiesExportPolicy(exportRules?.ToList(), serializedAdditionalRawData: null) : null, protocolTypes?.ToList(), provisioningState, new ResourceIdentifier(snapshotId), deleteBaseSnapshot, new ResourceIdentifier(backupId), baremetalTenantId, subnetId, networkFeatures, null, networkSiblingSetId, storageToNetworkProximity, mountTargets?.ToList(), volumeType, dataProtection, isRestoring, isSnapshotDirectoryVisible, isKerberosEnabled, securityStyle, isSmbEncryptionEnabled, smbAccessBasedEnumeration, smbNonBrowsable, isSmbContinuouslyAvailable, throughputMibps, actualThroughputMibps, encryptionKeySource, keyVaultPrivateEndpointResourceId, isLdapEnabled, isCoolAccessEnabled, coolnessPeriod, null, unixPermissions, cloneProgress, fileAccessLogs, avsDataStore, dataStoreResourceId?.ToList(), isDefaultQuotaEnabled, defaultUserQuotaInKiBs, defaultGroupQuotaInKiBs, maximumNumberOfFiles, volumeGroupName, capacityPoolResourceId, proximityPlacementGroupId, t2Network, volumeSpecName, isEncrypted, placementRules?.ToList(), enableSubvolumes, provisionedAvailabilityZone, isLargeVolume, originatingResourceId, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Resource Id. + /// Resource name. + /// Resource type. + /// Resource tags. + /// Availability Zone. + /// Unique FileSystem Identifier. + /// A unique file path for the volume. Used when creating mount targets. + /// The service level of the file system. + /// Maximum storage quota allowed for a file system in bytes. This is a soft quota used for alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. For large volumes, valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to 2400GiB to 2400TiB. Values expressed in bytes as multiples of 1 GiB. + /// Set of export policy rules. + /// Set of protocol types, default NFSv3, CIFS for SMB protocol. + /// Azure lifecycle management. + /// Resource identifier used to identify the Snapshot. + /// If enabled (true) the snapshot the volume was created from will be automatically deleted after the volume create operation has finished. Defaults to false. + /// Resource identifier used to identify the Backup. + /// Unique Baremetal Tenant Identifier. + /// The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes. + /// Network features available to the volume, or current state of update. + /// Network Sibling Set ID for the the group of volumes sharing networking resources. + /// Provides storage to network proximity information for the volume. + /// List of mount targets. + /// What type of volume is this. For destination volumes in Cross Region Replication, set type to DataProtection. + /// DataProtection type volumes include an object containing details of the replication. + /// Restoring. + /// If enabled (true) the volume will contain a read-only snapshot directory which provides access to each of the volume's snapshots (defaults to true). + /// Describe if a volume is KerberosEnabled. To be use with swagger version 2020-05-01 or later. + /// The security style of volume, default unix, defaults to ntfs for dual protocol or CIFS protocol. + /// Enables encryption for in-flight smb3 data. Only applicable for SMB/DualProtocol volume. To be used with swagger version 2020-08-01 or later. + /// Enables access-based enumeration share property for SMB Shares. Only applicable for SMB/DualProtocol volume. + /// Enables non-browsable property for SMB Shares. Only applicable for SMB/DualProtocol volume. + /// Enables continuously available share property for smb volume. Only applicable for SMB volume. + /// Maximum throughput in MiB/s that can be achieved by this volume and this will be accepted as input only for manual qosType volume. + /// Actual throughput in MiB/s for auto qosType volumes calculated based on size and serviceLevel. + /// Source of key used to encrypt data in volume. Applicable if NetApp account has encryption.keySource = 'Microsoft.KeyVault'. Possible values (case-insensitive) are: 'Microsoft.NetApp, Microsoft.KeyVault'. + /// The resource ID of private endpoint for KeyVault. It must reside in the same VNET as the volume. Only applicable if encryptionKeySource = 'Microsoft.KeyVault'. + /// Specifies whether LDAP is enabled or not for a given NFS volume. + /// Specifies whether Cool Access(tiering) is enabled for the volume. + /// Specifies the number of days after which data that is not accessed by clients will be tiered. + /// + /// coolAccessRetrievalPolicy determines the data retrieval behavior from the cool tier to standard storage based on the read pattern for cool access enabled volumes. The possible values for this field are: + /// Default - Data will be pulled from cool tier to standard storage on random reads. This policy is the default. + /// OnRead - All client-driven data read is pulled from cool tier to standard storage on both sequential and random reads. + /// Never - No client-driven data is pulled from cool tier to standard storage. + /// + /// UNIX permissions for NFS volume accepted in octal 4 digit format. First digit selects the set user ID(4), set group ID (2) and sticky (1) attributes. Second digit selects permission for the owner of the file: read (4), write (2) and execute (1). Third selects permissions for other users in the same group. the fourth for other users not in the group. 0755 - gives read/write/execute permissions to owner and read/execute to group and other users. + /// When a volume is being restored from another volume's snapshot, will show the percentage completion of this cloning process. When this value is empty/null there is no cloning process currently happening on this volume. This value will update every 5 minutes during cloning. + /// Flag indicating whether file access logs are enabled for the volume, based on active diagnostic settings present on the volume. + /// Specifies whether the volume is enabled for Azure VMware Solution (AVS) datastore purpose. + /// Data store resource unique identifier. + /// Specifies if default quota is enabled for the volume. + /// Default user quota for volume in KiBs. If isDefaultQuotaEnabled is set, the minimum value of 4 KiBs applies . + /// Default group quota for volume in KiBs. If isDefaultQuotaEnabled is set, the minimum value of 4 KiBs applies. + /// Maximum number of files allowed. Needs a service request in order to be changed. Only allowed to be changed if volume quota is more than 4TiB. + /// Volume Group Name. + /// Pool Resource Id used in case of creating a volume through volume group. + /// Proximity placement group associated with the volume. + /// T2 network information. + /// Volume spec name is the application specific designation or identifier for the particular volume in a volume group for e.g. data, log. + /// Specifies if the volume is encrypted or not. Only available on volumes created or updated after 2022-01-01. + /// Application specific placement rules for the particular volume. + /// Flag indicating whether subvolume operations are enabled on the volume. + /// The availability zone where the volume is provisioned. This refers to the logical availability zone where the volume resides. + /// Specifies whether volume is a Large Volume or Regular Volume. + /// Id of the snapshot or backup that the volume is restored from. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static NetAppVolumeGroupVolume NetAppVolumeGroupVolume(ResourceIdentifier id = null, string name = null, ResourceType? resourceType = null, IDictionary tags = null, IEnumerable zones = null, Guid? fileSystemId = null, string creationToken = null, NetAppFileServiceLevel? serviceLevel = null, long usageThreshold = default, IEnumerable exportRules = null, IEnumerable protocolTypes = null, string provisioningState = null, string snapshotId = null, bool? deleteBaseSnapshot = null, string backupId = null, string baremetalTenantId = null, ResourceIdentifier subnetId = null, NetAppNetworkFeature? networkFeatures = null, Guid? networkSiblingSetId = null, NetAppVolumeStorageToNetworkProximity? storageToNetworkProximity = null, IEnumerable mountTargets = null, string volumeType = null, NetAppVolumeDataProtection dataProtection = null, bool? isRestoring = null, bool? isSnapshotDirectoryVisible = null, bool? isKerberosEnabled = null, NetAppVolumeSecurityStyle? securityStyle = null, bool? isSmbEncryptionEnabled = null, SmbAccessBasedEnumeration? smbAccessBasedEnumeration = null, SmbNonBrowsable? smbNonBrowsable = null, bool? isSmbContinuouslyAvailable = null, float? throughputMibps = null, float? actualThroughputMibps = null, NetAppEncryptionKeySource? encryptionKeySource = null, ResourceIdentifier keyVaultPrivateEndpointResourceId = null, bool? isLdapEnabled = null, bool? isCoolAccessEnabled = null, int? coolnessPeriod = null, CoolAccessRetrievalPolicy? coolAccessRetrievalPolicy = null, string unixPermissions = null, int? cloneProgress = null, NetAppFileAccessLog? fileAccessLogs = null, NetAppAvsDataStore? avsDataStore = null, IEnumerable dataStoreResourceId = null, bool? isDefaultQuotaEnabled = null, long? defaultUserQuotaInKiBs = null, long? defaultGroupQuotaInKiBs = null, long? maximumNumberOfFiles = null, string volumeGroupName = null, ResourceIdentifier capacityPoolResourceId = null, ResourceIdentifier proximityPlacementGroupId = null, string t2Network = null, string volumeSpecName = null, bool? isEncrypted = null, IEnumerable placementRules = null, EnableNetAppSubvolume? enableSubvolumes = null, string provisionedAvailabilityZone = null, bool? isLargeVolume = null, ResourceIdentifier originatingResourceId = null) + { + //For Backwards compatability sets effective networkfeatures to null + tags ??= new Dictionary(); + zones ??= new List(); + exportRules ??= new List(); + protocolTypes ??= new List(); + mountTargets ??= new List(); + dataStoreResourceId ??= new List(); + placementRules ??= new List(); + + return new NetAppVolumeGroupVolume( + id, + name, + resourceType, + tags, + zones?.ToList(), + fileSystemId, + creationToken, + serviceLevel, + usageThreshold, + exportRules != null ? new VolumePropertiesExportPolicy(exportRules?.ToList(), serializedAdditionalRawData: null) : null, + protocolTypes?.ToList(), + provisioningState, + new ResourceIdentifier(snapshotId), + deleteBaseSnapshot, + new ResourceIdentifier(backupId), + baremetalTenantId, + subnetId, + networkFeatures, + null, + networkSiblingSetId, + storageToNetworkProximity, + mountTargets?.ToList(), + volumeType, + dataProtection, + isRestoring, + isSnapshotDirectoryVisible, + isKerberosEnabled, + securityStyle, + isSmbEncryptionEnabled, + smbAccessBasedEnumeration, + smbNonBrowsable, + isSmbContinuouslyAvailable, + throughputMibps, + actualThroughputMibps, + encryptionKeySource, + keyVaultPrivateEndpointResourceId, + isLdapEnabled, + isCoolAccessEnabled, + coolnessPeriod, + coolAccessRetrievalPolicy, + unixPermissions, + cloneProgress, + fileAccessLogs, + avsDataStore, + dataStoreResourceId?.ToList(), + isDefaultQuotaEnabled, + defaultUserQuotaInKiBs, + defaultGroupQuotaInKiBs, + maximumNumberOfFiles, + volumeGroupName, + capacityPoolResourceId, + proximityPlacementGroupId, + t2Network, + volumeSpecName, + isEncrypted, + placementRules?.ToList(), + enableSubvolumes, + provisionedAvailabilityZone, + isLargeVolume, + originatingResourceId, + serializedAdditionalRawData: null); } /// Initializes a new instance of NetAppVolumeData. @@ -201,7 +343,88 @@ public static NetAppVolumeData NetAppVolumeData(ResourceIdentifier id = null, st dataStoreResourceId ??= new List(); placementRules ??= new List(); //Set null for zones and coolAccessRetrievalPolicy for backwards compat - return new NetAppVolumeData(id, name, resourceType, systemData, tags, location, etag, zones?.ToList(), fileSystemId, creationToken, serviceLevel, usageThreshold, exportRules != null ? new VolumePropertiesExportPolicy(exportRules?.ToList(), serializedAdditionalRawData: null) : null, protocolTypes?.ToList(), provisioningState, snapshotId, deleteBaseSnapshot, backupId, baremetalTenantId, subnetId, networkFeatures, networkSiblingSetId, storageToNetworkProximity, mountTargets?.ToList(), volumeType, dataProtection, isRestoring, isSnapshotDirectoryVisible, isKerberosEnabled, securityStyle, isSmbEncryptionEnabled, smbAccessBasedEnumeration, smbNonBrowsable, isSmbContinuouslyAvailable, throughputMibps, actualThroughputMibps, encryptionKeySource, keyVaultPrivateEndpointResourceId, isLdapEnabled, isCoolAccessEnabled, coolnessPeriod, null, unixPermissions, cloneProgress, fileAccessLogs, avsDataStore, dataStoreResourceId?.ToList(), isDefaultQuotaEnabled, defaultUserQuotaInKiBs, defaultGroupQuotaInKiBs, maximumNumberOfFiles, volumeGroupName, capacityPoolResourceId, proximityPlacementGroupId, t2Network, volumeSpecName, isEncrypted, placementRules?.ToList(), enableSubvolumes, provisionedAvailabilityZone, isLargeVolume, originatingResourceId, serializedAdditionalRawData: null); + return new NetAppVolumeData(id, name, resourceType, systemData, tags, location, etag, zones?.ToList(), fileSystemId, creationToken, serviceLevel, usageThreshold, exportRules != null ? new VolumePropertiesExportPolicy(exportRules?.ToList(), serializedAdditionalRawData: null) : null, protocolTypes?.ToList(), provisioningState, new ResourceIdentifier(snapshotId), deleteBaseSnapshot, new ResourceIdentifier(backupId), baremetalTenantId, subnetId, networkFeatures, null, networkSiblingSetId, storageToNetworkProximity, mountTargets?.ToList(), volumeType, dataProtection, isRestoring, isSnapshotDirectoryVisible, isKerberosEnabled, securityStyle, isSmbEncryptionEnabled, smbAccessBasedEnumeration, smbNonBrowsable, isSmbContinuouslyAvailable, throughputMibps, actualThroughputMibps, encryptionKeySource, keyVaultPrivateEndpointResourceId, isLdapEnabled, isCoolAccessEnabled, coolnessPeriod, null, unixPermissions, cloneProgress, fileAccessLogs, avsDataStore, dataStoreResourceId?.ToList(), isDefaultQuotaEnabled, defaultUserQuotaInKiBs, defaultGroupQuotaInKiBs, maximumNumberOfFiles, volumeGroupName, capacityPoolResourceId, proximityPlacementGroupId, t2Network, volumeSpecName, isEncrypted, placementRules?.ToList(), enableSubvolumes, provisionedAvailabilityZone, isLargeVolume, originatingResourceId, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// A unique read-only string that changes whenever the resource is updated. + /// Availability Zone. + /// Unique FileSystem Identifier. + /// A unique file path for the volume. Used when creating mount targets. + /// The service level of the file system. + /// Maximum storage quota allowed for a file system in bytes. This is a soft quota used for alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. For large volumes, valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to 2400GiB to 2400TiB. Values expressed in bytes as multiples of 1 GiB. + /// Set of export policy rules. + /// Set of protocol types, default NFSv3, CIFS for SMB protocol. + /// Azure lifecycle management. + /// Resource identifier used to identify the Snapshot. + /// If enabled (true) the snapshot the volume was created from will be automatically deleted after the volume create operation has finished. Defaults to false. + /// Resource identifier used to identify the Backup. + /// Unique Baremetal Tenant Identifier. + /// The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes. + /// Network features available to the volume, or current state of update. + /// Network Sibling Set ID for the the group of volumes sharing networking resources. + /// Provides storage to network proximity information for the volume. + /// List of mount targets. + /// What type of volume is this. For destination volumes in Cross Region Replication, set type to DataProtection. + /// DataProtection type volumes include an object containing details of the replication. + /// Restoring. + /// If enabled (true) the volume will contain a read-only snapshot directory which provides access to each of the volume's snapshots (defaults to true). + /// Describe if a volume is KerberosEnabled. To be use with swagger version 2020-05-01 or later. + /// The security style of volume, default unix, defaults to ntfs for dual protocol or CIFS protocol. + /// Enables encryption for in-flight smb3 data. Only applicable for SMB/DualProtocol volume. To be used with swagger version 2020-08-01 or later. + /// Enables access-based enumeration share property for SMB Shares. Only applicable for SMB/DualProtocol volume. + /// Enables non-browsable property for SMB Shares. Only applicable for SMB/DualProtocol volume. + /// Enables continuously available share property for smb volume. Only applicable for SMB volume. + /// Maximum throughput in MiB/s that can be achieved by this volume and this will be accepted as input only for manual qosType volume. + /// Actual throughput in MiB/s for auto qosType volumes calculated based on size and serviceLevel. + /// Source of key used to encrypt data in volume. Applicable if NetApp account has encryption.keySource = 'Microsoft.KeyVault'. Possible values (case-insensitive) are: 'Microsoft.NetApp, Microsoft.KeyVault'. + /// The resource ID of private endpoint for KeyVault. It must reside in the same VNET as the volume. Only applicable if encryptionKeySource = 'Microsoft.KeyVault'. + /// Specifies whether LDAP is enabled or not for a given NFS volume. + /// Specifies whether Cool Access(tiering) is enabled for the volume. + /// Specifies the number of days after which data that is not accessed by clients will be tiered. + /// + /// coolAccessRetrievalPolicy determines the data retrieval behavior from the cool tier to standard storage based on the read pattern for cool access enabled volumes. The possible values for this field are: + /// Default - Data will be pulled from cool tier to standard storage on random reads. This policy is the default. + /// OnRead - All client-driven data read is pulled from cool tier to standard storage on both sequential and random reads. + /// Never - No client-driven data is pulled from cool tier to standard storage. + /// + /// UNIX permissions for NFS volume accepted in octal 4 digit format. First digit selects the set user ID(4), set group ID (2) and sticky (1) attributes. Second digit selects permission for the owner of the file: read (4), write (2) and execute (1). Third selects permissions for other users in the same group. the fourth for other users not in the group. 0755 - gives read/write/execute permissions to owner and read/execute to group and other users. + /// When a volume is being restored from another volume's snapshot, will show the percentage completion of this cloning process. When this value is empty/null there is no cloning process currently happening on this volume. This value will update every 5 minutes during cloning. + /// Flag indicating whether file access logs are enabled for the volume, based on active diagnostic settings present on the volume. + /// Specifies whether the volume is enabled for Azure VMware Solution (AVS) datastore purpose. + /// Data store resource unique identifier. + /// Specifies if default quota is enabled for the volume. + /// Default user quota for volume in KiBs. If isDefaultQuotaEnabled is set, the minimum value of 4 KiBs applies . + /// Default group quota for volume in KiBs. If isDefaultQuotaEnabled is set, the minimum value of 4 KiBs applies. + /// Maximum number of files allowed. Needs a service request in order to be changed. Only allowed to be changed if volume quota is more than 4TiB. + /// Volume Group Name. + /// Pool Resource Id used in case of creating a volume through volume group. + /// Proximity placement group associated with the volume. + /// T2 network information. + /// Volume spec name is the application specific designation or identifier for the particular volume in a volume group for e.g. data, log. + /// Specifies if the volume is encrypted or not. Only available on volumes created or updated after 2022-01-01. + /// Application specific placement rules for the particular volume. + /// Flag indicating whether subvolume operations are enabled on the volume. + /// The availability zone where the volume is provisioned. This refers to the logical availability zone where the volume resides. + /// Specifies whether volume is a Large Volume or Regular Volume. + /// Id of the snapshot or backup that the volume is restored from. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static NetAppVolumeData NetAppVolumeData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ETag? etag = null, IEnumerable zones = null, Guid? fileSystemId = null, string creationToken = null, NetAppFileServiceLevel? serviceLevel = null, long usageThreshold = default, IEnumerable exportRules = null, IEnumerable protocolTypes = null, string provisioningState = null, string snapshotId = null, bool? deleteBaseSnapshot = null, string backupId = null, string baremetalTenantId = null, ResourceIdentifier subnetId = null, NetAppNetworkFeature? networkFeatures = null, Guid? networkSiblingSetId = null, NetAppVolumeStorageToNetworkProximity? storageToNetworkProximity = null, IEnumerable mountTargets = null, string volumeType = null, NetAppVolumeDataProtection dataProtection = null, bool? isRestoring = null, bool? isSnapshotDirectoryVisible = null, bool? isKerberosEnabled = null, NetAppVolumeSecurityStyle? securityStyle = null, bool? isSmbEncryptionEnabled = null, SmbAccessBasedEnumeration? smbAccessBasedEnumeration = null, SmbNonBrowsable? smbNonBrowsable = null, bool? isSmbContinuouslyAvailable = null, float? throughputMibps = null, float? actualThroughputMibps = null, NetAppEncryptionKeySource? encryptionKeySource = null, ResourceIdentifier keyVaultPrivateEndpointResourceId = null, bool? isLdapEnabled = null, bool? isCoolAccessEnabled = null, int? coolnessPeriod = null, CoolAccessRetrievalPolicy? coolAccessRetrievalPolicy = null, string unixPermissions = null, int? cloneProgress = null, NetAppFileAccessLog? fileAccessLogs = null, NetAppAvsDataStore? avsDataStore = null, IEnumerable dataStoreResourceId = null, bool? isDefaultQuotaEnabled = null, long? defaultUserQuotaInKiBs = null, long? defaultGroupQuotaInKiBs = null, long? maximumNumberOfFiles = null, string volumeGroupName = null, ResourceIdentifier capacityPoolResourceId = null, ResourceIdentifier proximityPlacementGroupId = null, string t2Network = null, string volumeSpecName = null, bool? isEncrypted = null, IEnumerable placementRules = null, EnableNetAppSubvolume? enableSubvolumes = null, string provisionedAvailabilityZone = null, bool? isLargeVolume = null, ResourceIdentifier originatingResourceId = null) + { + tags ??= new Dictionary(); + exportRules ??= new List(); + protocolTypes ??= new List(); + mountTargets ??= new List(); + dataStoreResourceId ??= new List(); + placementRules ??= new List(); + return new NetAppVolumeData(id, name, resourceType, systemData, tags, location, etag, zones?.ToList(), fileSystemId, creationToken, serviceLevel, usageThreshold, exportRules != null ? new VolumePropertiesExportPolicy(exportRules?.ToList(), serializedAdditionalRawData: null) : null, protocolTypes?.ToList(), provisioningState, new ResourceIdentifier(snapshotId), deleteBaseSnapshot, new ResourceIdentifier(backupId), baremetalTenantId, subnetId, networkFeatures, null, networkSiblingSetId, storageToNetworkProximity, mountTargets?.ToList(), volumeType, dataProtection, isRestoring, isSnapshotDirectoryVisible, isKerberosEnabled, securityStyle, isSmbEncryptionEnabled, smbAccessBasedEnumeration, smbNonBrowsable, isSmbContinuouslyAvailable, throughputMibps, actualThroughputMibps, encryptionKeySource, keyVaultPrivateEndpointResourceId, isLdapEnabled, isCoolAccessEnabled, coolnessPeriod, coolAccessRetrievalPolicy, unixPermissions, cloneProgress, fileAccessLogs, avsDataStore, dataStoreResourceId?.ToList(), isDefaultQuotaEnabled, defaultUserQuotaInKiBs, defaultGroupQuotaInKiBs, maximumNumberOfFiles, volumeGroupName, capacityPoolResourceId, proximityPlacementGroupId, t2Network, volumeSpecName, isEncrypted, placementRules?.ToList(), enableSubvolumes, provisionedAvailabilityZone, isLargeVolume, originatingResourceId, serializedAdditionalRawData: null); } /// Initializes a new instance of . diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ArmNetAppModelFactory.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ArmNetAppModelFactory.cs index ffa45caadf94..f6e857e769db 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ArmNetAppModelFactory.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ArmNetAppModelFactory.cs @@ -19,22 +19,56 @@ namespace Azure.ResourceManager.NetApp.Models public static partial class ArmNetAppModelFactory { /// Initializes a new instance of . - /// <code>true</code> indicates name is valid and available. <code>false</code> indicates the name is invalid, unavailable, or both. - /// <code>Invalid</code> indicates the name provided does not match Azure App Service naming requirements. <code>AlreadyExists</code> indicates that the name is already in use and is therefore unavailable. - /// If reason == invalid, provide the user with the reason why the given name is invalid, and provide the resource naming requirements so that the user can select a valid name. If reason == AlreadyExists, explain that resource name is already in use, and direct them to select a different name. + /// + /// <code>true</code> indicates name is valid and available. <code>false</code> indicates the name is invalid, unavailable, or both. + /// Serialized Name: CheckAvailabilityResponse.isAvailable + /// + /// + /// <code>Invalid</code> indicates the name provided does not match Azure App Service naming requirements. <code>AlreadyExists</code> indicates that the name is already in use and is therefore unavailable. + /// Serialized Name: CheckAvailabilityResponse.reason + /// + /// + /// If reason == invalid, provide the user with the reason why the given name is invalid, and provide the resource naming requirements so that the user can select a valid name. If reason == AlreadyExists, explain that resource name is already in use, and direct them to select a different name. + /// Serialized Name: CheckAvailabilityResponse.message + /// /// A new instance for mocking. public static NetAppCheckAvailabilityResult NetAppCheckAvailabilityResult(bool? isAvailable = null, NetAppNameUnavailableReason? reason = null, string message = null) { return new NetAppCheckAvailabilityResult(isAvailable, reason, message, serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// + /// File path to verify. + /// Serialized Name: FilePathAvailabilityRequest.name + /// + /// + /// The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes + /// Serialized Name: FilePathAvailabilityRequest.subnetId + /// + /// + /// The Azure Resource logical availability zone which is used within zone mapping lookup for the subscription and region. The lookup will retrieve the physical zone where volume is placed. + /// Serialized Name: FilePathAvailabilityRequest.availabilityZone + /// + /// A new instance for mocking. + public static NetAppFilePathAvailabilityContent NetAppFilePathAvailabilityContent(string name = null, ResourceIdentifier subnetId = null, string availabilityZone = null) + { + return new NetAppFilePathAvailabilityContent(name, subnetId, availabilityZone, serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. - /// The current quota value. - /// The default quota value. + /// + /// The current quota value. + /// Serialized Name: SubscriptionQuotaItem.properties.current + /// + /// + /// The default quota value. + /// Serialized Name: SubscriptionQuotaItem.properties.default + /// /// A new instance for mocking. public static NetAppSubscriptionQuotaItem NetAppSubscriptionQuotaItem(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, int? current = null, int? @default = null) { @@ -49,8 +83,14 @@ public static NetAppSubscriptionQuotaItem NetAppSubscriptionQuotaItem(ResourceId } /// Initializes a new instance of . - /// Provides storage to network proximity information in the region. - /// Provides logical availability zone mappings for the subscription for a region. + /// + /// Provides storage to network proximity information in the region. + /// Serialized Name: RegionInfo.storageToNetworkProximity + /// + /// + /// Provides logical availability zone mappings for the subscription for a region. + /// Serialized Name: RegionInfo.availabilityZoneMappings + /// /// A new instance for mocking. public static NetAppRegionInfo NetAppRegionInfo(RegionStorageToNetworkProximity? storageToNetworkProximity = null, IEnumerable availabilityZoneMappings = null) { @@ -64,8 +104,14 @@ public static NetAppRegionInfo NetAppRegionInfo(RegionStorageToNetworkProximity? /// The name. /// The resourceType. /// The systemData. - /// Provides storage to network proximity information in the region. - /// Provides logical availability zone mappings for the subscription for a region. + /// + /// Provides storage to network proximity information in the region. + /// Serialized Name: RegionInfoResource.properties.storageToNetworkProximity + /// + /// + /// Provides logical availability zone mappings for the subscription for a region. + /// Serialized Name: RegionInfoResource.properties.availabilityZoneMappings + /// /// A new instance for mocking. public static RegionInfoResourceData RegionInfoResourceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, RegionStorageToNetworkProximity? storageToNetworkProximity = null, IEnumerable availabilityZoneMappings = null) { @@ -82,12 +128,30 @@ public static RegionInfoResourceData RegionInfoResourceData(ResourceIdentifier i } /// Initializes a new instance of . - /// Network Sibling Set ID for a group of volumes sharing networking resources in a subnet. - /// The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes. Example /subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/{mySubnet}. - /// Network sibling set state Id identifying the current state of the sibling set. - /// Network features available to the volume, or current state of update. - /// Gets the status of the NetworkSiblingSet at the time the operation was called. - /// List of NIC information. + /// + /// Network Sibling Set ID for a group of volumes sharing networking resources in a subnet. + /// Serialized Name: NetworkSiblingSet.networkSiblingSetId + /// + /// + /// The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes. Example /subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/{mySubnet} + /// Serialized Name: NetworkSiblingSet.subnetId + /// + /// + /// Network sibling set state Id identifying the current state of the sibling set. + /// Serialized Name: NetworkSiblingSet.networkSiblingSetStateId + /// + /// + /// Network features available to the volume, or current state of update. + /// Serialized Name: NetworkSiblingSet.networkFeatures + /// + /// + /// Gets the status of the NetworkSiblingSet at the time the operation was called. + /// Serialized Name: NetworkSiblingSet.provisioningState + /// + /// + /// List of NIC information + /// Serialized Name: NetworkSiblingSet.nicInfoList + /// /// A new instance for mocking. public static NetworkSiblingSet NetworkSiblingSet(string networkSiblingSetId = null, ResourceIdentifier subnetId = null, string networkSiblingSetStateId = null, NetAppNetworkFeature? networkFeatures = null, NetworkSiblingSetProvisioningState? provisioningState = null, IEnumerable nicInfoList = null) { @@ -104,8 +168,14 @@ public static NetworkSiblingSet NetworkSiblingSet(string networkSiblingSetId = n } /// Initializes a new instance of . - /// ipAddress. - /// Volume resource Ids. + /// + /// ipAddress + /// Serialized Name: NicInfo.ipAddress + /// + /// + /// Volume resource Ids + /// Serialized Name: NicInfo.volumeResourceIds + /// /// A new instance for mocking. public static NicInfo NicInfo(string ipAddress = null, IEnumerable volumeResourceIds = null) { @@ -121,12 +191,30 @@ public static NicInfo NicInfo(string ipAddress = null, IEnumerable The systemData. /// The tags. /// The location. - /// A unique read-only string that changes whenever the resource is updated. - /// The identity used for the resource. - /// Azure lifecycle management. - /// Active Directories. - /// Encryption settings. - /// Shows the status of disableShowmount for all volumes under the subscription, null equals false. + /// + /// A unique read-only string that changes whenever the resource is updated. + /// Serialized Name: NetAppAccount.etag + /// + /// + /// The identity used for the resource. + /// Serialized Name: NetAppAccount.identity + /// + /// + /// Azure lifecycle management + /// Serialized Name: NetAppAccount.properties.provisioningState + /// + /// + /// Active Directories + /// Serialized Name: NetAppAccount.properties.activeDirectories + /// + /// + /// Encryption settings + /// Serialized Name: NetAppAccount.properties.encryption + /// + /// + /// Shows the status of disableShowmount for all volumes under the subscription, null equals false + /// Serialized Name: NetAppAccount.properties.disableShowmount + /// /// A new instance for mocking. public static NetAppAccountData NetAppAccountData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ETag? etag = null, ManagedServiceIdentity identity = null, string provisioningState = null, IEnumerable activeDirectories = null, NetAppAccountEncryption encryption = null, bool? disableShowmount = null) { @@ -150,29 +238,98 @@ public static NetAppAccountData NetAppAccountData(ResourceIdentifier id = null, } /// Initializes a new instance of . - /// Id of the Active Directory. - /// A domain user account with permission to create machine accounts. - /// Plain text password of Active Directory domain administrator, value is masked in the response. - /// Name of the Active Directory domain. - /// Comma separated list of DNS server IP addresses (IPv4 only) for the Active Directory domain. - /// Status of the Active Directory. - /// Any details in regards to the Status of the Active Directory. - /// NetBIOS name of the SMB server. This name will be registered as a computer account in the AD and used to mount volumes. - /// The Organizational Unit (OU) within the Windows Active Directory. - /// The Active Directory site the service will limit Domain Controller discovery to. - /// Users to be added to the Built-in Backup Operator active directory group. A list of unique usernames without domain specifier. - /// Users to be added to the Built-in Administrators active directory group. A list of unique usernames without domain specifier. - /// kdc server IP addresses for the active directory machine. This optional parameter is used only while creating kerberos volume. - /// Name of the active directory machine. This optional parameter is used only while creating kerberos volume. - /// When LDAP over SSL/TLS is enabled, the LDAP client is required to have base64 encoded Active Directory Certificate Service's self-signed root CA certificate, this optional parameter is used only for dual protocol with LDAP user-mapping volumes. - /// If enabled, AES encryption will be enabled for SMB communication. - /// Specifies whether or not the LDAP traffic needs to be signed. - /// Domain Users in the Active directory to be given SeSecurityPrivilege privilege (Needed for SMB Continuously available shares for SQL). A list of unique usernames without domain specifier. - /// Specifies whether or not the LDAP traffic needs to be secured via TLS. - /// If enabled, NFS client local users can also (in addition to LDAP users) access the NFS volumes. - /// If enabled, Traffic between the SMB server to Domain Controller (DC) will be encrypted. - /// LDAP Search scope options. - /// Comma separated list of IPv4 addresses of preferred servers for LDAP client. At most two comma separated IPv4 addresses can be passed. + /// + /// Id of the Active Directory + /// Serialized Name: ActiveDirectory.activeDirectoryId + /// + /// + /// A domain user account with permission to create machine accounts + /// Serialized Name: ActiveDirectory.username + /// + /// + /// Plain text password of Active Directory domain administrator, value is masked in the response + /// Serialized Name: ActiveDirectory.password + /// + /// + /// Name of the Active Directory domain + /// Serialized Name: ActiveDirectory.domain + /// + /// + /// Comma separated list of DNS server IP addresses (IPv4 only) for the Active Directory domain + /// Serialized Name: ActiveDirectory.dns + /// + /// + /// Status of the Active Directory + /// Serialized Name: ActiveDirectory.status + /// + /// + /// Any details in regards to the Status of the Active Directory + /// Serialized Name: ActiveDirectory.statusDetails + /// + /// + /// NetBIOS name of the SMB server. This name will be registered as a computer account in the AD and used to mount volumes + /// Serialized Name: ActiveDirectory.smbServerName + /// + /// + /// The Organizational Unit (OU) within the Windows Active Directory + /// Serialized Name: ActiveDirectory.organizationalUnit + /// + /// + /// The Active Directory site the service will limit Domain Controller discovery to + /// Serialized Name: ActiveDirectory.site + /// + /// + /// Users to be added to the Built-in Backup Operator active directory group. A list of unique usernames without domain specifier + /// Serialized Name: ActiveDirectory.backupOperators + /// + /// + /// Users to be added to the Built-in Administrators active directory group. A list of unique usernames without domain specifier + /// Serialized Name: ActiveDirectory.administrators + /// + /// + /// kdc server IP address for the active directory machine. This optional parameter is used only while creating kerberos volume. + /// Serialized Name: ActiveDirectory.kdcIP + /// + /// + /// Name of the active directory machine. This optional parameter is used only while creating kerberos volume + /// Serialized Name: ActiveDirectory.adName + /// + /// + /// When LDAP over SSL/TLS is enabled, the LDAP client is required to have base64 encoded Active Directory Certificate Service's self-signed root CA certificate, this optional parameter is used only for dual protocol with LDAP user-mapping volumes. + /// Serialized Name: ActiveDirectory.serverRootCACertificate + /// + /// + /// If enabled, AES encryption will be enabled for SMB communication. + /// Serialized Name: ActiveDirectory.aesEncryption + /// + /// + /// Specifies whether or not the LDAP traffic needs to be signed. + /// Serialized Name: ActiveDirectory.ldapSigning + /// + /// + /// Domain Users in the Active directory to be given SeSecurityPrivilege privilege (Needed for SMB Continuously available shares for SQL). A list of unique usernames without domain specifier + /// Serialized Name: ActiveDirectory.securityOperators + /// + /// + /// Specifies whether or not the LDAP traffic needs to be secured via TLS. + /// Serialized Name: ActiveDirectory.ldapOverTLS + /// + /// + /// If enabled, NFS client local users can also (in addition to LDAP users) access the NFS volumes. + /// Serialized Name: ActiveDirectory.allowLocalNfsUsersWithLdap + /// + /// + /// If enabled, Traffic between the SMB server to Domain Controller (DC) will be encrypted. + /// Serialized Name: ActiveDirectory.encryptDCConnections + /// + /// + /// LDAP Search scope options + /// Serialized Name: ActiveDirectory.ldapSearchScope + /// + /// + /// Comma separated list of IPv4 addresses of preferred servers for LDAP client. At most two comma separated IPv4 addresses can be passed. + /// Serialized Name: ActiveDirectory.preferredServersForLdapClient + /// /// A new instance for mocking. public static NetAppAccountActiveDirectory NetAppAccountActiveDirectory(string activeDirectoryId = null, string username = null, string password = null, string domain = null, string dns = null, NetAppAccountActiveDirectoryStatus? status = null, string statusDetails = null, string smbServerName = null, string organizationalUnit = null, string site = null, IEnumerable backupOperators = null, IEnumerable administrators = null, IPAddress kdcIP = null, string adName = null, string serverRootCACertificate = null, bool? isAesEncryptionEnabled = null, bool? isLdapSigningEnabled = null, IEnumerable securityOperators = null, bool? isLdapOverTlsEnabled = null, bool? allowLocalNfsUsersWithLdap = null, bool? encryptDCConnections = null, NetAppLdapSearchScopeConfiguration ldapSearchScope = null, string preferredServersForLdapClient = null) { @@ -208,11 +365,26 @@ public static NetAppAccountActiveDirectory NetAppAccountActiveDirectory(string a } /// Initializes a new instance of . - /// UUID v4 used to identify the Azure Key Vault configuration. - /// The Uri of KeyVault. - /// The name of KeyVault key. - /// The resource ID of KeyVault. - /// Status of the KeyVault connection. + /// + /// UUID v4 used to identify the Azure Key Vault configuration + /// Serialized Name: KeyVaultProperties.keyVaultId + /// + /// + /// The Uri of KeyVault. + /// Serialized Name: KeyVaultProperties.keyVaultUri + /// + /// + /// The name of KeyVault key. + /// Serialized Name: KeyVaultProperties.keyName + /// + /// + /// The resource ID of KeyVault. + /// Serialized Name: KeyVaultProperties.keyVaultResourceId + /// + /// + /// Status of the KeyVault connection. + /// Serialized Name: KeyVaultProperties.status + /// /// A new instance for mocking. public static NetAppKeyVaultProperties NetAppKeyVaultProperties(string keyVaultId = null, Uri keyVaultUri = null, string keyName = null, ResourceIdentifier keyVaultArmResourceId = null, NetAppKeyVaultStatus? status = null) { @@ -226,8 +398,14 @@ public static NetAppKeyVaultProperties NetAppKeyVaultProperties(string keyVaultI } /// Initializes a new instance of . - /// The principal ID (object ID) of the identity used to authenticate with key vault. Read-only. - /// The ARM resource identifier of the user assigned identity used to authenticate with key vault. Applicable if identity.type has 'UserAssigned'. It should match key of identity.userAssignedIdentities. + /// + /// The principal ID (object ID) of the identity used to authenticate with key vault. Read-only. + /// Serialized Name: EncryptionIdentity.principalId + /// + /// + /// The ARM resource identifier of the user assigned identity used to authenticate with key vault. Applicable if identity.type has 'UserAssigned'. It should match key of identity.userAssignedIdentities. + /// Serialized Name: EncryptionIdentity.userAssignedIdentity + /// /// A new instance for mocking. public static NetAppEncryptionIdentity NetAppEncryptionIdentity(string principalId = null, string userAssignedIdentity = null) { @@ -241,11 +419,26 @@ public static NetAppEncryptionIdentity NetAppEncryptionIdentity(string principal /// The systemData. /// The tags. /// The location. - /// The identity used for the resource. - /// Azure lifecycle management. - /// Active Directories. - /// Encryption settings. - /// Shows the status of disableShowmount for all volumes under the subscription, null equals false. + /// + /// The identity used for the resource. + /// Serialized Name: NetAppAccountPatch.identity + /// + /// + /// Azure lifecycle management + /// Serialized Name: NetAppAccountPatch.properties.provisioningState + /// + /// + /// Active Directories + /// Serialized Name: NetAppAccountPatch.properties.activeDirectories + /// + /// + /// Encryption settings + /// Serialized Name: NetAppAccountPatch.properties.encryption + /// + /// + /// Shows the status of disableShowmount for all volumes under the subscription, null equals false + /// Serialized Name: NetAppAccountPatch.properties.disableShowmount + /// /// A new instance for mocking. public static NetAppAccountPatch NetAppAccountPatch(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ManagedServiceIdentity identity = null, string provisioningState = null, IEnumerable activeDirectories = null, NetAppAccountEncryption encryption = null, bool? disableShowmount = null) { @@ -274,16 +467,46 @@ public static NetAppAccountPatch NetAppAccountPatch(ResourceIdentifier id = null /// The systemData. /// The tags. /// The location. - /// A unique read-only string that changes whenever the resource is updated. - /// UUID v4 used to identify the Pool. - /// Provisioned size of the pool (in bytes). Allowed values are in 1TiB chunks (value must be multiple of 1099511627776). - /// The service level of the file system. - /// Azure lifecycle management. - /// Total throughput of pool in MiB/s. - /// Utilized throughput of pool in MiB/s. - /// The qos type of the pool. - /// If enabled (true) the pool can contain cool Access enabled volumes. - /// Encryption type of the capacity pool, set encryption type for data at rest for this pool and all volumes in it. This value can only be set when creating new pool. + /// + /// A unique read-only string that changes whenever the resource is updated. + /// Serialized Name: CapacityPool.etag + /// + /// + /// UUID v4 used to identify the Pool + /// Serialized Name: CapacityPool.properties.poolId + /// + /// + /// Provisioned size of the pool (in bytes). Allowed values are in 1TiB chunks (value must be multiple of 1099511627776). + /// Serialized Name: CapacityPool.properties.size + /// + /// + /// The service level of the file system + /// Serialized Name: CapacityPool.properties.serviceLevel + /// + /// + /// Azure lifecycle management + /// Serialized Name: CapacityPool.properties.provisioningState + /// + /// + /// Total throughput of pool in MiB/s + /// Serialized Name: CapacityPool.properties.totalThroughputMibps + /// + /// + /// Utilized throughput of pool in MiB/s + /// Serialized Name: CapacityPool.properties.utilizedThroughputMibps + /// + /// + /// The qos type of the pool + /// Serialized Name: CapacityPool.properties.qosType + /// + /// + /// If enabled (true) the pool can contain cool Access enabled volumes. + /// Serialized Name: CapacityPool.properties.coolAccess + /// + /// + /// Encryption type of the capacity pool, set encryption type for data at rest for this pool and all volumes in it. This value can only be set when creating new pool. + /// Serialized Name: CapacityPool.properties.encryptionType + /// /// A new instance for mocking. public static CapacityPoolData CapacityPoolData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ETag? etag = null, Guid? poolId = null, long size = default, NetAppFileServiceLevel serviceLevel = default, string provisioningState = null, float? totalThroughputMibps = null, float? utilizedThroughputMibps = null, CapacityPoolQosType? qosType = null, bool? isCoolAccessEnabled = null, CapacityPoolEncryptionType? encryptionType = null) { @@ -316,9 +539,18 @@ public static CapacityPoolData CapacityPoolData(ResourceIdentifier id = null, st /// The systemData. /// The tags. /// The location. - /// Provisioned size of the pool (in bytes). Allowed values are in 1TiB chunks (value must be multiple of 1099511627776). - /// The qos type of the pool. - /// If enabled (true) the pool can contain cool Access enabled volumes. + /// + /// Provisioned size of the pool (in bytes). Allowed values are in 1TiB chunks (value must be multiple of 1099511627776). + /// Serialized Name: CapacityPoolPatch.properties.size + /// + /// + /// The qos type of the pool + /// Serialized Name: CapacityPoolPatch.properties.qosType + /// + /// + /// If enabled (true) the pool can contain cool Access enabled volumes. + /// Serialized Name: CapacityPoolPatch.properties.coolAccess + /// /// A new instance for mocking. public static CapacityPoolPatch CapacityPoolPatch(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, long? size = null, CapacityPoolQosType? qosType = null, bool? isCoolAccessEnabled = null) { @@ -344,69 +576,239 @@ public static CapacityPoolPatch CapacityPoolPatch(ResourceIdentifier id = null, /// The systemData. /// The tags. /// The location. - /// A unique read-only string that changes whenever the resource is updated. - /// Availability Zone. - /// Unique FileSystem Identifier. - /// A unique file path for the volume. Used when creating mount targets. - /// The service level of the file system. - /// Maximum storage quota allowed for a file system in bytes. This is a soft quota used for alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. For large volumes, valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to 2400GiB to 2400TiB. Values expressed in bytes as multiples of 1 GiB. - /// Set of export policy rules. - /// Set of protocol types, default NFSv3, CIFS for SMB protocol. - /// Azure lifecycle management. - /// Resource identifier used to identify the Snapshot. - /// If enabled (true) the snapshot the volume was created from will be automatically deleted after the volume create operation has finished. Defaults to false. - /// Resource identifier used to identify the Backup. - /// Unique Baremetal Tenant Identifier. - /// The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes. - /// Network features available to the volume, or current state of update. - /// Network Sibling Set ID for the the group of volumes sharing networking resources. - /// Provides storage to network proximity information for the volume. - /// List of mount targets. - /// What type of volume is this. For destination volumes in Cross Region Replication, set type to DataProtection. - /// DataProtection type volumes include an object containing details of the replication. - /// Restoring. - /// If enabled (true) the volume will contain a read-only snapshot directory which provides access to each of the volume's snapshots (defaults to true). - /// Describe if a volume is KerberosEnabled. To be use with swagger version 2020-05-01 or later. - /// The security style of volume, default unix, defaults to ntfs for dual protocol or CIFS protocol. - /// Enables encryption for in-flight smb3 data. Only applicable for SMB/DualProtocol volume. To be used with swagger version 2020-08-01 or later. - /// Enables access-based enumeration share property for SMB Shares. Only applicable for SMB/DualProtocol volume. - /// Enables non-browsable property for SMB Shares. Only applicable for SMB/DualProtocol volume. - /// Enables continuously available share property for smb volume. Only applicable for SMB volume. - /// Maximum throughput in MiB/s that can be achieved by this volume and this will be accepted as input only for manual qosType volume. - /// Actual throughput in MiB/s for auto qosType volumes calculated based on size and serviceLevel. - /// Source of key used to encrypt data in volume. Applicable if NetApp account has encryption.keySource = 'Microsoft.KeyVault'. Possible values (case-insensitive) are: 'Microsoft.NetApp, Microsoft.KeyVault'. - /// The resource ID of private endpoint for KeyVault. It must reside in the same VNET as the volume. Only applicable if encryptionKeySource = 'Microsoft.KeyVault'. - /// Specifies whether LDAP is enabled or not for a given NFS volume. - /// Specifies whether Cool Access(tiering) is enabled for the volume. - /// Specifies the number of days after which data that is not accessed by clients will be tiered. + /// + /// A unique read-only string that changes whenever the resource is updated. + /// Serialized Name: Volume.etag + /// + /// + /// Availability Zone + /// Serialized Name: Volume.zones + /// + /// + /// Unique FileSystem Identifier. + /// Serialized Name: Volume.properties.fileSystemId + /// + /// + /// A unique file path for the volume. Used when creating mount targets + /// Serialized Name: Volume.properties.creationToken + /// + /// + /// The service level of the file system + /// Serialized Name: Volume.properties.serviceLevel + /// + /// + /// Maximum storage quota allowed for a file system in bytes. This is a soft quota used for alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. For large volumes, valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to 2400GiB to 2400TiB. Values expressed in bytes as multiples of 1 GiB. + /// Serialized Name: Volume.properties.usageThreshold + /// + /// + /// Set of export policy rules + /// Serialized Name: Volume.properties.exportPolicy + /// + /// + /// Set of protocol types, default NFSv3, CIFS for SMB protocol + /// Serialized Name: Volume.properties.protocolTypes + /// + /// + /// Azure lifecycle management + /// Serialized Name: Volume.properties.provisioningState + /// + /// + /// Resource identifier used to identify the Snapshot. + /// Serialized Name: Volume.properties.snapshotId + /// + /// + /// If enabled (true) the snapshot the volume was created from will be automatically deleted after the volume create operation has finished. Defaults to false + /// Serialized Name: Volume.properties.deleteBaseSnapshot + /// + /// + /// Resource identifier used to identify the Backup. + /// Serialized Name: Volume.properties.backupId + /// + /// + /// Unique Baremetal Tenant Identifier. + /// Serialized Name: Volume.properties.baremetalTenantId + /// + /// + /// The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes + /// Serialized Name: Volume.properties.subnetId + /// + /// + /// The original value of the network features type available to the volume at the time it was created. + /// Serialized Name: Volume.properties.networkFeatures + /// + /// + /// The effective value of the network features type available to the volume, or current effective state of update. + /// Serialized Name: Volume.properties.effectiveNetworkFeatures + /// + /// + /// Network Sibling Set ID for the the group of volumes sharing networking resources. + /// Serialized Name: Volume.properties.networkSiblingSetId + /// + /// + /// Provides storage to network proximity information for the volume. + /// Serialized Name: Volume.properties.storageToNetworkProximity + /// + /// + /// List of mount targets + /// Serialized Name: Volume.properties.mountTargets + /// + /// + /// What type of volume is this. For destination volumes in Cross Region Replication, set type to DataProtection + /// Serialized Name: Volume.properties.volumeType + /// + /// + /// DataProtection type volumes include an object containing details of the replication + /// Serialized Name: Volume.properties.dataProtection + /// + /// + /// Restoring + /// Serialized Name: Volume.properties.isRestoring + /// + /// + /// If enabled (true) the volume will contain a read-only snapshot directory which provides access to each of the volume's snapshots (defaults to true). + /// Serialized Name: Volume.properties.snapshotDirectoryVisible + /// + /// + /// Describe if a volume is KerberosEnabled. To be use with swagger version 2020-05-01 or later + /// Serialized Name: Volume.properties.kerberosEnabled + /// + /// + /// The security style of volume, default unix, defaults to ntfs for dual protocol or CIFS protocol + /// Serialized Name: Volume.properties.securityStyle + /// + /// + /// Enables encryption for in-flight smb3 data. Only applicable for SMB/DualProtocol volume. To be used with swagger version 2020-08-01 or later + /// Serialized Name: Volume.properties.smbEncryption + /// + /// + /// Enables access-based enumeration share property for SMB Shares. Only applicable for SMB/DualProtocol volume + /// Serialized Name: Volume.properties.smbAccessBasedEnumeration + /// + /// + /// Enables non-browsable property for SMB Shares. Only applicable for SMB/DualProtocol volume + /// Serialized Name: Volume.properties.smbNonBrowsable + /// + /// + /// Enables continuously available share property for smb volume. Only applicable for SMB volume + /// Serialized Name: Volume.properties.smbContinuouslyAvailable + /// + /// + /// Maximum throughput in MiB/s that can be achieved by this volume and this will be accepted as input only for manual qosType volume + /// Serialized Name: Volume.properties.throughputMibps + /// + /// + /// Actual throughput in MiB/s for auto qosType volumes calculated based on size and serviceLevel + /// Serialized Name: Volume.properties.actualThroughputMibps + /// + /// + /// Source of key used to encrypt data in volume. Applicable if NetApp account has encryption.keySource = 'Microsoft.KeyVault'. Possible values (case-insensitive) are: 'Microsoft.NetApp, Microsoft.KeyVault' + /// Serialized Name: Volume.properties.encryptionKeySource + /// + /// + /// The resource ID of private endpoint for KeyVault. It must reside in the same VNET as the volume. Only applicable if encryptionKeySource = 'Microsoft.KeyVault'. + /// Serialized Name: Volume.properties.keyVaultPrivateEndpointResourceId + /// + /// + /// Specifies whether LDAP is enabled or not for a given NFS volume. + /// Serialized Name: Volume.properties.ldapEnabled + /// + /// + /// Specifies whether Cool Access(tiering) is enabled for the volume. + /// Serialized Name: Volume.properties.coolAccess + /// + /// + /// Specifies the number of days after which data that is not accessed by clients will be tiered. + /// Serialized Name: Volume.properties.coolnessPeriod + /// /// /// coolAccessRetrievalPolicy determines the data retrieval behavior from the cool tier to standard storage based on the read pattern for cool access enabled volumes. The possible values for this field are: /// Default - Data will be pulled from cool tier to standard storage on random reads. This policy is the default. /// OnRead - All client-driven data read is pulled from cool tier to standard storage on both sequential and random reads. /// Never - No client-driven data is pulled from cool tier to standard storage. + /// Serialized Name: Volume.properties.coolAccessRetrievalPolicy + /// + /// + /// UNIX permissions for NFS volume accepted in octal 4 digit format. First digit selects the set user ID(4), set group ID (2) and sticky (1) attributes. Second digit selects permission for the owner of the file: read (4), write (2) and execute (1). Third selects permissions for other users in the same group. the fourth for other users not in the group. 0755 - gives read/write/execute permissions to owner and read/execute to group and other users. + /// Serialized Name: Volume.properties.unixPermissions + /// + /// + /// When a volume is being restored from another volume's snapshot, will show the percentage completion of this cloning process. When this value is empty/null there is no cloning process currently happening on this volume. This value will update every 5 minutes during cloning. + /// Serialized Name: Volume.properties.cloneProgress + /// + /// + /// Flag indicating whether file access logs are enabled for the volume, based on active diagnostic settings present on the volume. + /// Serialized Name: Volume.properties.fileAccessLogs + /// + /// + /// Specifies whether the volume is enabled for Azure VMware Solution (AVS) datastore purpose + /// Serialized Name: Volume.properties.avsDataStore + /// + /// + /// Data store resource unique identifier + /// Serialized Name: Volume.properties.dataStoreResourceId + /// + /// + /// Specifies if default quota is enabled for the volume. + /// Serialized Name: Volume.properties.isDefaultQuotaEnabled + /// + /// + /// Default user quota for volume in KiBs. If isDefaultQuotaEnabled is set, the minimum value of 4 KiBs applies . + /// Serialized Name: Volume.properties.defaultUserQuotaInKiBs + /// + /// + /// Default group quota for volume in KiBs. If isDefaultQuotaEnabled is set, the minimum value of 4 KiBs applies. + /// Serialized Name: Volume.properties.defaultGroupQuotaInKiBs + /// + /// + /// Maximum number of files allowed. Needs a service request in order to be changed. Only allowed to be changed if volume quota is more than 4TiB. + /// Serialized Name: Volume.properties.maximumNumberOfFiles + /// + /// + /// Volume Group Name + /// Serialized Name: Volume.properties.volumeGroupName + /// + /// + /// Pool Resource Id used in case of creating a volume through volume group + /// Serialized Name: Volume.properties.capacityPoolResourceId + /// + /// + /// Proximity placement group associated with the volume + /// Serialized Name: Volume.properties.proximityPlacementGroup + /// + /// + /// T2 network information + /// Serialized Name: Volume.properties.t2Network + /// + /// + /// Volume spec name is the application specific designation or identifier for the particular volume in a volume group for e.g. data, log + /// Serialized Name: Volume.properties.volumeSpecName + /// + /// + /// Specifies if the volume is encrypted or not. Only available on volumes created or updated after 2022-01-01. + /// Serialized Name: Volume.properties.encrypted + /// + /// + /// Application specific placement rules for the particular volume + /// Serialized Name: Volume.properties.placementRules + /// + /// + /// Flag indicating whether subvolume operations are enabled on the volume + /// Serialized Name: Volume.properties.enableSubvolumes + /// + /// + /// The availability zone where the volume is provisioned. This refers to the logical availability zone where the volume resides. + /// Serialized Name: Volume.properties.provisionedAvailabilityZone + /// + /// + /// Specifies whether volume is a Large Volume or Regular Volume. + /// Serialized Name: Volume.properties.isLargeVolume + /// + /// + /// Id of the snapshot or backup that the volume is restored from. + /// Serialized Name: Volume.properties.originatingResourceId /// - /// UNIX permissions for NFS volume accepted in octal 4 digit format. First digit selects the set user ID(4), set group ID (2) and sticky (1) attributes. Second digit selects permission for the owner of the file: read (4), write (2) and execute (1). Third selects permissions for other users in the same group. the fourth for other users not in the group. 0755 - gives read/write/execute permissions to owner and read/execute to group and other users. - /// When a volume is being restored from another volume's snapshot, will show the percentage completion of this cloning process. When this value is empty/null there is no cloning process currently happening on this volume. This value will update every 5 minutes during cloning. - /// Flag indicating whether file access logs are enabled for the volume, based on active diagnostic settings present on the volume. - /// Specifies whether the volume is enabled for Azure VMware Solution (AVS) datastore purpose. - /// Data store resource unique identifier. - /// Specifies if default quota is enabled for the volume. - /// Default user quota for volume in KiBs. If isDefaultQuotaEnabled is set, the minimum value of 4 KiBs applies . - /// Default group quota for volume in KiBs. If isDefaultQuotaEnabled is set, the minimum value of 4 KiBs applies. - /// Maximum number of files allowed. Needs a service request in order to be changed. Only allowed to be changed if volume quota is more than 4TiB. - /// Volume Group Name. - /// Pool Resource Id used in case of creating a volume through volume group. - /// Proximity placement group associated with the volume. - /// T2 network information. - /// Volume spec name is the application specific designation or identifier for the particular volume in a volume group for e.g. data, log. - /// Specifies if the volume is encrypted or not. Only available on volumes created or updated after 2022-01-01. - /// Application specific placement rules for the particular volume. - /// Flag indicating whether subvolume operations are enabled on the volume. - /// The availability zone where the volume is provisioned. This refers to the logical availability zone where the volume resides. - /// Specifies whether volume is a Large Volume or Regular Volume. - /// Id of the snapshot or backup that the volume is restored from. /// A new instance for mocking. - public static NetAppVolumeData NetAppVolumeData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ETag? etag = null, IEnumerable zones = null, Guid? fileSystemId = null, string creationToken = null, NetAppFileServiceLevel? serviceLevel = null, long usageThreshold = default, IEnumerable exportRules = null, IEnumerable protocolTypes = null, string provisioningState = null, string snapshotId = null, bool? deleteBaseSnapshot = null, string backupId = null, string baremetalTenantId = null, ResourceIdentifier subnetId = null, NetAppNetworkFeature? networkFeatures = null, Guid? networkSiblingSetId = null, NetAppVolumeStorageToNetworkProximity? storageToNetworkProximity = null, IEnumerable mountTargets = null, string volumeType = null, NetAppVolumeDataProtection dataProtection = null, bool? isRestoring = null, bool? isSnapshotDirectoryVisible = null, bool? isKerberosEnabled = null, NetAppVolumeSecurityStyle? securityStyle = null, bool? isSmbEncryptionEnabled = null, SmbAccessBasedEnumeration? smbAccessBasedEnumeration = null, SmbNonBrowsable? smbNonBrowsable = null, bool? isSmbContinuouslyAvailable = null, float? throughputMibps = null, float? actualThroughputMibps = null, NetAppEncryptionKeySource? encryptionKeySource = null, ResourceIdentifier keyVaultPrivateEndpointResourceId = null, bool? isLdapEnabled = null, bool? isCoolAccessEnabled = null, int? coolnessPeriod = null, CoolAccessRetrievalPolicy? coolAccessRetrievalPolicy = null, string unixPermissions = null, int? cloneProgress = null, NetAppFileAccessLog? fileAccessLogs = null, NetAppAvsDataStore? avsDataStore = null, IEnumerable dataStoreResourceId = null, bool? isDefaultQuotaEnabled = null, long? defaultUserQuotaInKiBs = null, long? defaultGroupQuotaInKiBs = null, long? maximumNumberOfFiles = null, string volumeGroupName = null, ResourceIdentifier capacityPoolResourceId = null, ResourceIdentifier proximityPlacementGroupId = null, string t2Network = null, string volumeSpecName = null, bool? isEncrypted = null, IEnumerable placementRules = null, EnableNetAppSubvolume? enableSubvolumes = null, string provisionedAvailabilityZone = null, bool? isLargeVolume = null, ResourceIdentifier originatingResourceId = null) + public static NetAppVolumeData NetAppVolumeData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ETag? etag = null, IEnumerable zones = null, Guid? fileSystemId = null, string creationToken = null, NetAppFileServiceLevel? serviceLevel = null, long usageThreshold = default, IEnumerable exportRules = null, IEnumerable protocolTypes = null, string provisioningState = null, string snapshotId = null, bool? deleteBaseSnapshot = null, string backupId = null, string baremetalTenantId = null, ResourceIdentifier subnetId = null, NetAppNetworkFeature? networkFeatures = null, NetAppNetworkFeature? effectiveNetworkFeatures = null, Guid? networkSiblingSetId = null, NetAppVolumeStorageToNetworkProximity? storageToNetworkProximity = null, IEnumerable mountTargets = null, string volumeType = null, NetAppVolumeDataProtection dataProtection = null, bool? isRestoring = null, bool? isSnapshotDirectoryVisible = null, bool? isKerberosEnabled = null, NetAppVolumeSecurityStyle? securityStyle = null, bool? isSmbEncryptionEnabled = null, SmbAccessBasedEnumeration? smbAccessBasedEnumeration = null, SmbNonBrowsable? smbNonBrowsable = null, bool? isSmbContinuouslyAvailable = null, float? throughputMibps = null, float? actualThroughputMibps = null, NetAppEncryptionKeySource? encryptionKeySource = null, ResourceIdentifier keyVaultPrivateEndpointResourceId = null, bool? isLdapEnabled = null, bool? isCoolAccessEnabled = null, int? coolnessPeriod = null, CoolAccessRetrievalPolicy? coolAccessRetrievalPolicy = null, string unixPermissions = null, int? cloneProgress = null, NetAppFileAccessLog? fileAccessLogs = null, NetAppAvsDataStore? avsDataStore = null, IEnumerable dataStoreResourceId = null, bool? isDefaultQuotaEnabled = null, long? defaultUserQuotaInKiBs = null, long? defaultGroupQuotaInKiBs = null, long? maximumNumberOfFiles = null, string volumeGroupName = null, ResourceIdentifier capacityPoolResourceId = null, ResourceIdentifier proximityPlacementGroupId = null, string t2Network = null, string volumeSpecName = null, bool? isEncrypted = null, IEnumerable placementRules = null, EnableNetAppSubvolume? enableSubvolumes = null, string provisionedAvailabilityZone = null, bool? isLargeVolume = null, ResourceIdentifier originatingResourceId = null) { tags ??= new Dictionary(); zones ??= new List(); @@ -438,6 +840,7 @@ public static NetAppVolumeData NetAppVolumeData(ResourceIdentifier id = null, st baremetalTenantId, subnetId, networkFeatures, + effectiveNetworkFeatures, networkSiblingSetId, storageToNetworkProximity, mountTargets?.ToList(), @@ -483,10 +886,22 @@ public static NetAppVolumeData NetAppVolumeData(ResourceIdentifier id = null, st } /// Initializes a new instance of . - /// UUID v4 used to identify the MountTarget. - /// UUID v4 used to identify the MountTarget. - /// The mount target's IPv4 address. - /// The SMB server's Fully Qualified Domain Name, FQDN. + /// + /// UUID v4 used to identify the MountTarget + /// Serialized Name: MountTargetProperties.mountTargetId + /// + /// + /// UUID v4 used to identify the MountTarget + /// Serialized Name: MountTargetProperties.fileSystemId + /// + /// + /// The mount target's IPv4 address + /// Serialized Name: MountTargetProperties.ipAddress + /// + /// + /// The SMB server's Fully Qualified Domain Name, FQDN + /// Serialized Name: MountTargetProperties.smbServerFqdn + /// /// A new instance for mocking. public static NetAppVolumeMountTarget NetAppVolumeMountTarget(Guid? mountTargetId = null, Guid fileSystemId = default, IPAddress ipAddress = null, string smbServerFqdn = null) { @@ -494,26 +909,52 @@ public static NetAppVolumeMountTarget NetAppVolumeMountTarget(Guid? mountTargetI } /// Initializes a new instance of . - /// Id. - /// Indicates whether the local volume is the source or destination for the Volume Replication. - /// Schedule. - /// The resource ID of the remote volume. - /// The remote region for the other end of the Volume Replication. + /// + /// Id + /// Serialized Name: ReplicationObject.replicationId + /// + /// + /// Indicates whether the local volume is the source or destination for the Volume Replication + /// Serialized Name: ReplicationObject.endpointType + /// + /// + /// Schedule + /// Serialized Name: ReplicationObject.replicationSchedule + /// + /// + /// The resource ID of the remote volume. + /// Serialized Name: ReplicationObject.remoteVolumeResourceId + /// + /// + /// The full path to a volume that is to be migrated into ANF. Required for Migration volumes + /// Serialized Name: ReplicationObject.remotePath + /// + /// + /// The remote region for the other end of the Volume Replication. + /// Serialized Name: ReplicationObject.remoteVolumeRegion + /// /// A new instance for mocking. - public static NetAppReplicationObject NetAppReplicationObject(string replicationId = null, NetAppEndpointType? endpointType = null, NetAppReplicationSchedule? replicationSchedule = null, ResourceIdentifier remoteVolumeResourceId = null, string remoteVolumeRegion = null) + public static NetAppReplicationObject NetAppReplicationObject(string replicationId = null, NetAppEndpointType? endpointType = null, NetAppReplicationSchedule? replicationSchedule = null, ResourceIdentifier remoteVolumeResourceId = null, RemotePath remotePath = null, string remoteVolumeRegion = null) { return new NetAppReplicationObject( replicationId, endpointType, replicationSchedule, remoteVolumeResourceId, + remotePath, remoteVolumeRegion, serializedAdditionalRawData: null); } /// Initializes a new instance of . - /// Has relocation been requested for this volume. - /// Has relocation finished and is ready to be cleaned up. + /// + /// Has relocation been requested for this volume + /// Serialized Name: VolumeRelocationProperties.relocationRequested + /// + /// + /// Has relocation finished and is ready to be cleaned up + /// Serialized Name: VolumeRelocationProperties.readyToBeFinalized + /// /// A new instance for mocking. public static NetAppVolumeRelocationProperties NetAppVolumeRelocationProperties(bool? isRelocationRequested = null, bool? isReadyToBeFinalized = null) { @@ -527,27 +968,73 @@ public static NetAppVolumeRelocationProperties NetAppVolumeRelocationProperties( /// The systemData. /// The tags. /// The location. - /// The service level of the file system. - /// Maximum storage quota allowed for a file system in bytes. This is a soft quota used for alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. For large volumes, valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to 2400GiB to 2400TiB. Values expressed in bytes as multiples of 1 GiB. - /// Set of export policy rules. - /// Set of protocol types, default NFSv3, CIFS for SMB protocol. - /// Maximum throughput in MiB/s that can be achieved by this volume and this will be accepted as input only for manual qosType volume. - /// DataProtection type volumes include an object containing details of the replication. - /// Specifies if default quota is enabled for the volume. - /// Default user quota for volume in KiBs. If isDefaultQuotaEnabled is set, the minimum value of 4 KiBs applies . - /// Default group quota for volume in KiBs. If isDefaultQuotaEnabled is set, the minimum value of 4 KiBs applies. - /// UNIX permissions for NFS volume accepted in octal 4 digit format. First digit selects the set user ID(4), set group ID (2) and sticky (1) attributes. Second digit selects permission for the owner of the file: read (4), write (2) and execute (1). Third selects permissions for other users in the same group. the fourth for other users not in the group. 0755 - gives read/write/execute permissions to owner and read/execute to group and other users. - /// Specifies whether Cool Access(tiering) is enabled for the volume. - /// Specifies the number of days after which data that is not accessed by clients will be tiered. + /// + /// The service level of the file system + /// Serialized Name: VolumePatch.properties.serviceLevel + /// + /// + /// Maximum storage quota allowed for a file system in bytes. This is a soft quota used for alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. For large volumes, valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to 2400GiB to 2400TiB. Values expressed in bytes as multiples of 1 GiB. + /// Serialized Name: VolumePatch.properties.usageThreshold + /// + /// + /// Set of export policy rules + /// Serialized Name: VolumePatch.properties.exportPolicy + /// + /// + /// Set of protocol types, default NFSv3, CIFS for SMB protocol + /// Serialized Name: VolumePatch.properties.protocolTypes + /// + /// + /// Maximum throughput in MiB/s that can be achieved by this volume and this will be accepted as input only for manual qosType volume + /// Serialized Name: VolumePatch.properties.throughputMibps + /// + /// + /// DataProtection type volumes include an object containing details of the replication + /// Serialized Name: VolumePatch.properties.dataProtection + /// + /// + /// Specifies if default quota is enabled for the volume. + /// Serialized Name: VolumePatch.properties.isDefaultQuotaEnabled + /// + /// + /// Default user quota for volume in KiBs. If isDefaultQuotaEnabled is set, the minimum value of 4 KiBs applies . + /// Serialized Name: VolumePatch.properties.defaultUserQuotaInKiBs + /// + /// + /// Default group quota for volume in KiBs. If isDefaultQuotaEnabled is set, the minimum value of 4 KiBs applies. + /// Serialized Name: VolumePatch.properties.defaultGroupQuotaInKiBs + /// + /// + /// UNIX permissions for NFS volume accepted in octal 4 digit format. First digit selects the set user ID(4), set group ID (2) and sticky (1) attributes. Second digit selects permission for the owner of the file: read (4), write (2) and execute (1). Third selects permissions for other users in the same group. the fourth for other users not in the group. 0755 - gives read/write/execute permissions to owner and read/execute to group and other users. + /// Serialized Name: VolumePatch.properties.unixPermissions + /// + /// + /// Specifies whether Cool Access(tiering) is enabled for the volume. + /// Serialized Name: VolumePatch.properties.coolAccess + /// + /// + /// Specifies the number of days after which data that is not accessed by clients will be tiered. + /// Serialized Name: VolumePatch.properties.coolnessPeriod + /// /// /// coolAccessRetrievalPolicy determines the data retrieval behavior from the cool tier to standard storage based on the read pattern for cool access enabled volumes. The possible values for this field are: /// Default - Data will be pulled from cool tier to standard storage on random reads. This policy is the default. /// OnRead - All client-driven data read is pulled from cool tier to standard storage on both sequential and random reads. /// Never - No client-driven data is pulled from cool tier to standard storage. + /// Serialized Name: VolumePatch.properties.coolAccessRetrievalPolicy + /// + /// + /// If enabled (true) the volume will contain a read-only snapshot directory which provides access to each of the volume's snapshots. + /// Serialized Name: VolumePatch.properties.snapshotDirectoryVisible + /// + /// + /// Enables access-based enumeration share property for SMB Shares. Only applicable for SMB/DualProtocol volume + /// Serialized Name: VolumePatch.properties.smbAccessBasedEnumeration + /// + /// + /// Enables non-browsable property for SMB Shares. Only applicable for SMB/DualProtocol volume + /// Serialized Name: VolumePatch.properties.smbNonBrowsable /// - /// If enabled (true) the volume will contain a read-only snapshot directory which provides access to each of the volume's snapshots. - /// Enables access-based enumeration share property for SMB Shares. Only applicable for SMB/DualProtocol volume. - /// Enables non-browsable property for SMB Shares. Only applicable for SMB/DualProtocol volume. /// A new instance for mocking. public static NetAppVolumePatch NetAppVolumePatch(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, NetAppFileServiceLevel? serviceLevel = null, long? usageThreshold = null, IEnumerable exportRules = null, IEnumerable protocolTypes = null, float? throughputMibps = null, NetAppVolumePatchDataProtection dataProtection = null, bool? isDefaultQuotaEnabled = null, long? defaultUserQuotaInKiBs = null, long? defaultGroupQuotaInKiBs = null, string unixPermissions = null, bool? isCoolAccessEnabled = null, int? coolnessPeriod = null, CoolAccessRetrievalPolicy? coolAccessRetrievalPolicy = null, bool? isSnapshotDirectoryVisible = null, SmbAccessBasedEnumeration? smbAccessBasedEnumeration = null, SmbNonBrowsable? smbNonBrowsable = null) { @@ -582,7 +1069,10 @@ public static NetAppVolumePatch NetAppVolumePatch(ResourceIdentifier id = null, } /// Initializes a new instance of . - /// Group Id list. + /// + /// Group Id list + /// Serialized Name: GetGroupIdListForLdapUserResponse.groupIdsForLdapUser + /// /// A new instance for mocking. public static GetGroupIdListForLdapUserResult GetGroupIdListForLdapUserResult(IEnumerable groupIdsForLdapUser = null) { @@ -592,11 +1082,26 @@ public static GetGroupIdListForLdapUserResult GetGroupIdListForLdapUserResult(IE } /// Initializes a new instance of . - /// Replication health check. - /// Status of the mirror relationship. - /// The status of the replication. - /// The progress of the replication. - /// Displays error message if the replication is in an error state. + /// + /// Replication health check + /// Serialized Name: ReplicationStatus.healthy + /// + /// + /// Status of the mirror relationship + /// Serialized Name: ReplicationStatus.relationshipStatus + /// + /// + /// The status of the replication + /// Serialized Name: ReplicationStatus.mirrorState + /// + /// + /// The progress of the replication + /// Serialized Name: ReplicationStatus.totalProgress + /// + /// + /// Displays error message if the replication is in an error state + /// Serialized Name: ReplicationStatus.errorMessage + /// /// A new instance for mocking. public static NetAppVolumeReplicationStatus NetAppVolumeReplicationStatus(bool? isHealthy = null, NetAppRelationshipStatus? relationshipStatus = null, NetAppMirrorState? mirrorState = null, string totalProgress = null, string errorMessage = null) { @@ -610,11 +1115,26 @@ public static NetAppVolumeReplicationStatus NetAppVolumeReplicationStatus(bool? } /// Initializes a new instance of . - /// UUID v4 used to identify the replication. - /// Indicates whether the local volume is the source or destination for the Volume Replication. - /// Schedule. - /// The resource ID of the remote volume. - /// The remote region for the other end of the Volume Replication. + /// + /// UUID v4 used to identify the replication. + /// Serialized Name: Replication.replicationId + /// + /// + /// Indicates whether the local volume is the source or destination for the Volume Replication + /// Serialized Name: Replication.endpointType + /// + /// + /// Schedule + /// Serialized Name: Replication.replicationSchedule + /// + /// + /// The resource ID of the remote volume. + /// Serialized Name: Replication.remoteVolumeResourceId + /// + /// + /// The remote region for the other end of the Volume Replication. + /// Serialized Name: Replication.remoteVolumeRegion + /// /// A new instance for mocking. public static NetAppVolumeReplication NetAppVolumeReplication(string replicationId = null, NetAppEndpointType? endpointType = null, NetAppReplicationSchedule? replicationSchedule = null, ResourceIdentifier remoteVolumeResourceId = null, string remoteVolumeRegion = null) { @@ -627,15 +1147,49 @@ public static NetAppVolumeReplication NetAppVolumeReplication(string replication serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// + /// A command that needs to be run on the external ONTAP to accept cluster peering. Will only be present if <code>clusterPeeringStatus</code> is <code>pending</code> + /// Serialized Name: ClusterPeerCommandResponse.peerAcceptCommand + /// + /// A new instance for mocking. + public static ClusterPeerCommandResult ClusterPeerCommandResult(string peerAcceptCommand = null) + { + return new ClusterPeerCommandResult(peerAcceptCommand, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// + /// A command that needs to be run on the external ONTAP to accept svm peering. Will only be present if <code>svmPeeringStatus</code> is <code>pending</code> + /// Serialized Name: SvmPeerCommandResponse.svmPeeringCommand + /// + /// A new instance for mocking. + public static SvmPeerCommandResult SvmPeerCommandResult(string svmPeeringCommand = null) + { + return new SvmPeerCommandResult(svmPeeringCommand, serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. - /// Resource location. - /// UUID v4 used to identify the Snapshot. - /// The creation date of the snapshot. - /// Azure lifecycle management. + /// + /// Resource location + /// Serialized Name: Snapshot.location + /// + /// + /// UUID v4 used to identify the Snapshot + /// Serialized Name: Snapshot.properties.snapshotId + /// + /// + /// The creation date of the snapshot + /// Serialized Name: Snapshot.properties.created + /// + /// + /// Azure lifecycle management + /// Serialized Name: Snapshot.properties.provisioningState + /// /// A new instance for mocking. public static NetAppVolumeSnapshotData NetAppVolumeSnapshotData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, AzureLocation location = default, string snapshotId = null, DateTimeOffset? created = null, string provisioningState = null) { @@ -658,13 +1212,34 @@ public static NetAppVolumeSnapshotData NetAppVolumeSnapshotData(ResourceIdentifi /// The systemData. /// The tags. /// The location. - /// A unique read-only string that changes whenever the resource is updated. - /// Schedule for hourly snapshots. - /// Schedule for daily snapshots. - /// Schedule for weekly snapshots. - /// Schedule for monthly snapshots. - /// The property to decide policy is enabled or not. - /// Azure lifecycle management. + /// + /// A unique read-only string that changes whenever the resource is updated. + /// Serialized Name: SnapshotPolicy.etag + /// + /// + /// Schedule for hourly snapshots + /// Serialized Name: SnapshotPolicy.properties.hourlySchedule + /// + /// + /// Schedule for daily snapshots + /// Serialized Name: SnapshotPolicy.properties.dailySchedule + /// + /// + /// Schedule for weekly snapshots + /// Serialized Name: SnapshotPolicy.properties.weeklySchedule + /// + /// + /// Schedule for monthly snapshots + /// Serialized Name: SnapshotPolicy.properties.monthlySchedule + /// + /// + /// The property to decide policy is enabled or not + /// Serialized Name: SnapshotPolicy.properties.enabled + /// + /// + /// Azure lifecycle management + /// Serialized Name: SnapshotPolicy.properties.provisioningState + /// /// A new instance for mocking. public static SnapshotPolicyData SnapshotPolicyData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ETag? etag = null, SnapshotPolicyHourlySchedule hourlySchedule = null, SnapshotPolicyDailySchedule dailySchedule = null, SnapshotPolicyWeeklySchedule weeklySchedule = null, SnapshotPolicyMonthlySchedule monthlySchedule = null, bool? isEnabled = null, string provisioningState = null) { @@ -694,12 +1269,30 @@ public static SnapshotPolicyData SnapshotPolicyData(ResourceIdentifier id = null /// The systemData. /// The tags. /// The location. - /// Schedule for hourly snapshots. - /// Schedule for daily snapshots. - /// Schedule for weekly snapshots. - /// Schedule for monthly snapshots. - /// The property to decide policy is enabled or not. - /// Azure lifecycle management. + /// + /// Schedule for hourly snapshots + /// Serialized Name: SnapshotPolicyPatch.properties.hourlySchedule + /// + /// + /// Schedule for daily snapshots + /// Serialized Name: SnapshotPolicyPatch.properties.dailySchedule + /// + /// + /// Schedule for weekly snapshots + /// Serialized Name: SnapshotPolicyPatch.properties.weeklySchedule + /// + /// + /// Schedule for monthly snapshots + /// Serialized Name: SnapshotPolicyPatch.properties.monthlySchedule + /// + /// + /// The property to decide policy is enabled or not + /// Serialized Name: SnapshotPolicyPatch.properties.enabled + /// + /// + /// Azure lifecycle management + /// Serialized Name: SnapshotPolicyPatch.properties.provisioningState + /// /// A new instance for mocking. public static SnapshotPolicyPatch SnapshotPolicyPatch(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, SnapshotPolicyHourlySchedule hourlySchedule = null, SnapshotPolicyDailySchedule dailySchedule = null, SnapshotPolicyWeeklySchedule weeklySchedule = null, SnapshotPolicyMonthlySchedule monthlySchedule = null, bool? isEnabled = null, string provisioningState = null) { @@ -728,15 +1321,42 @@ public static SnapshotPolicyPatch SnapshotPolicyPatch(ResourceIdentifier id = nu /// The systemData. /// The tags. /// The location. - /// A unique read-only string that changes whenever the resource is updated. - /// Backup Policy Resource ID. - /// Azure lifecycle management. - /// Daily backups count to keep. - /// Weekly backups count to keep. - /// Monthly backups count to keep. - /// Volumes using current backup policy. - /// The property to decide policy is enabled or not. - /// A list of volumes assigned to this policy. + /// + /// A unique read-only string that changes whenever the resource is updated. + /// Serialized Name: BackupPolicy.etag + /// + /// + /// Backup Policy GUID ID + /// Serialized Name: BackupPolicy.properties.backupPolicyId + /// + /// + /// Azure lifecycle management + /// Serialized Name: BackupPolicy.properties.provisioningState + /// + /// + /// Daily backups count to keep + /// Serialized Name: BackupPolicy.properties.dailyBackupsToKeep + /// + /// + /// Weekly backups count to keep + /// Serialized Name: BackupPolicy.properties.weeklyBackupsToKeep + /// + /// + /// Monthly backups count to keep + /// Serialized Name: BackupPolicy.properties.monthlyBackupsToKeep + /// + /// + /// Volumes using current backup policy + /// Serialized Name: BackupPolicy.properties.volumesAssigned + /// + /// + /// The property to decide policy is enabled or not + /// Serialized Name: BackupPolicy.properties.enabled + /// + /// + /// A list of volumes assigned to this policy + /// Serialized Name: BackupPolicy.properties.volumeBackups + /// /// A new instance for mocking. public static NetAppBackupPolicyData NetAppBackupPolicyData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ETag? etag = null, ResourceIdentifier backupPolicyId = null, string provisioningState = null, int? dailyBackupsToKeep = null, int? weeklyBackupsToKeep = null, int? monthlyBackupsToKeep = null, int? volumesAssigned = null, bool? isEnabled = null, IEnumerable volumeBackups = null) { @@ -763,10 +1383,22 @@ public static NetAppBackupPolicyData NetAppBackupPolicyData(ResourceIdentifier i } /// Initializes a new instance of . - /// Volume name. - /// ResourceId used to identify the Volume. - /// Total count of backups for volume. - /// Policy enabled. + /// + /// Volume name + /// Serialized Name: VolumeBackups.volumeName + /// + /// + /// ResourceId used to identify the Volume + /// Serialized Name: VolumeBackups.volumeResourceId + /// + /// + /// Total count of backups for volume + /// Serialized Name: VolumeBackups.backupsCount + /// + /// + /// Policy enabled + /// Serialized Name: VolumeBackups.policyEnabled + /// /// A new instance for mocking. public static NetAppVolumeBackupDetail NetAppVolumeBackupDetail(string volumeName = null, ResourceIdentifier volumeResourceId = null, int? backupsCount = null, bool? isPolicyEnabled = null) { @@ -780,14 +1412,38 @@ public static NetAppVolumeBackupDetail NetAppVolumeBackupDetail(string volumeNam /// The systemData. /// The tags. /// The location. - /// Backup Policy Resource ID. - /// Azure lifecycle management. - /// Daily backups count to keep. - /// Weekly backups count to keep. - /// Monthly backups count to keep. - /// Volumes using current backup policy. - /// The property to decide policy is enabled or not. - /// A list of volumes assigned to this policy. + /// + /// Backup Policy GUID ID + /// Serialized Name: BackupPolicyPatch.properties.backupPolicyId + /// + /// + /// Azure lifecycle management + /// Serialized Name: BackupPolicyPatch.properties.provisioningState + /// + /// + /// Daily backups count to keep + /// Serialized Name: BackupPolicyPatch.properties.dailyBackupsToKeep + /// + /// + /// Weekly backups count to keep + /// Serialized Name: BackupPolicyPatch.properties.weeklyBackupsToKeep + /// + /// + /// Monthly backups count to keep + /// Serialized Name: BackupPolicyPatch.properties.monthlyBackupsToKeep + /// + /// + /// Volumes using current backup policy + /// Serialized Name: BackupPolicyPatch.properties.volumesAssigned + /// + /// + /// The property to decide policy is enabled or not + /// Serialized Name: BackupPolicyPatch.properties.enabled + /// + /// + /// A list of volumes assigned to this policy + /// Serialized Name: BackupPolicyPatch.properties.volumeBackups + /// /// A new instance for mocking. public static NetAppBackupPolicyPatch NetAppBackupPolicyPatch(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ResourceIdentifier backupPolicyId = null, string provisioningState = null, int? dailyBackupsToKeep = null, int? weeklyBackupsToKeep = null, int? monthlyBackupsToKeep = null, int? volumesAssigned = null, bool? isEnabled = null, IEnumerable volumeBackups = null) { @@ -819,10 +1475,22 @@ public static NetAppBackupPolicyPatch NetAppBackupPolicyPatch(ResourceIdentifier /// The systemData. /// The tags. /// The location. - /// Gets the status of the VolumeQuotaRule at the time the operation was called. - /// Size of quota. - /// Type of quota. - /// UserID/GroupID/SID based on the quota target type. UserID and groupID can be found by running ‘id’ or ‘getent’ command for the user or group and SID can be found by running <wmic useraccount where name='user-name' get sid>. + /// + /// Gets the status of the VolumeQuotaRule at the time the operation was called. + /// Serialized Name: VolumeQuotaRule.properties.provisioningState + /// + /// + /// Size of quota + /// Serialized Name: VolumeQuotaRule.properties.quotaSizeInKiBs + /// + /// + /// Type of quota + /// Serialized Name: VolumeQuotaRule.properties.quotaType + /// + /// + /// UserID/GroupID/SID based on the quota target type. UserID and groupID can be found by running ‘id’ or ‘getent’ command for the user or group and SID can be found by running <wmic useraccount where name='user-name' get sid> + /// Serialized Name: VolumeQuotaRule.properties.quotaTarget + /// /// A new instance for mocking. public static NetAppVolumeQuotaRuleData NetAppVolumeQuotaRuleData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, NetAppProvisioningState? provisioningState = null, long? quotaSizeInKiBs = null, NetAppVolumeQuotaType? quotaType = null, string quotaTarget = null) { @@ -843,11 +1511,26 @@ public static NetAppVolumeQuotaRuleData NetAppVolumeQuotaRuleData(ResourceIdenti } /// Initializes a new instance of . - /// Resource tags. - /// Gets the status of the VolumeQuotaRule at the time the operation was called. - /// Size of quota. - /// Type of quota. - /// UserID/GroupID/SID based on the quota target type. UserID and groupID can be found by running ‘id’ or ‘getent’ command for the user or group and SID can be found by running <wmic useraccount where name='user-name' get sid>. + /// + /// Resource tags + /// Serialized Name: VolumeQuotaRulePatch.tags + /// + /// + /// Gets the status of the VolumeQuotaRule at the time the operation was called. + /// Serialized Name: VolumeQuotaRulePatch.properties.provisioningState + /// + /// + /// Size of quota + /// Serialized Name: VolumeQuotaRulePatch.properties.quotaSizeInKiBs + /// + /// + /// Type of quota + /// Serialized Name: VolumeQuotaRulePatch.properties.quotaType + /// + /// + /// UserID/GroupID/SID based on the quota target type. UserID and groupID can be found by running ‘id’ or ‘getent’ command for the user or group and SID can be found by running <wmic useraccount where name='user-name' get sid> + /// Serialized Name: VolumeQuotaRulePatch.properties.quotaTarget + /// /// A new instance for mocking. public static NetAppVolumeQuotaRulePatch NetAppVolumeQuotaRulePatch(IDictionary tags = null, NetAppProvisioningState? provisioningState = null, long? quotaSizeInKiBs = null, NetAppVolumeQuotaType? quotaType = null, string quotaTarget = null) { @@ -867,9 +1550,18 @@ public static NetAppVolumeQuotaRulePatch NetAppVolumeQuotaRulePatch(IDictionary< /// The name. /// The resourceType. /// The systemData. - /// Resource location. - /// Azure lifecycle management. - /// Volume group details. + /// + /// Resource location + /// Serialized Name: VolumeGroup.location + /// + /// + /// Azure lifecycle management + /// Serialized Name: VolumeGroup.properties.provisioningState + /// + /// + /// Volume group details + /// Serialized Name: VolumeGroup.properties.groupMetaData + /// /// A new instance for mocking. public static NetAppVolumeGroupResult NetAppVolumeGroupResult(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, AzureLocation? location = null, string provisioningState = null, NetAppVolumeGroupMetadata groupMetaData = null) { @@ -885,11 +1577,26 @@ public static NetAppVolumeGroupResult NetAppVolumeGroupResult(ResourceIdentifier } /// Initializes a new instance of . - /// Group Description. - /// Application Type. - /// Application specific identifier. - /// Application specific placement rules for the volume group. - /// Number of volumes in volume group. + /// + /// Group Description + /// Serialized Name: VolumeGroupMetaData.groupDescription + /// + /// + /// Application Type + /// Serialized Name: VolumeGroupMetaData.applicationType + /// + /// + /// Application specific identifier + /// Serialized Name: VolumeGroupMetaData.applicationIdentifier + /// + /// + /// Application specific placement rules for the volume group + /// Serialized Name: VolumeGroupMetaData.globalPlacementRules + /// + /// + /// Number of volumes in volume group + /// Serialized Name: VolumeGroupMetaData.volumesCount + /// /// A new instance for mocking. public static NetAppVolumeGroupMetadata NetAppVolumeGroupMetadata(string groupDescription = null, NetAppApplicationType? applicationType = null, string applicationIdentifier = null, IEnumerable globalPlacementRules = null, long? volumesCount = null) { @@ -909,10 +1616,22 @@ public static NetAppVolumeGroupMetadata NetAppVolumeGroupMetadata(string groupDe /// The name. /// The resourceType. /// The systemData. - /// Resource location. - /// Azure lifecycle management. - /// Volume group details. - /// List of volumes from group. + /// + /// Resource location + /// Serialized Name: VolumeGroupDetails.location + /// + /// + /// Azure lifecycle management + /// Serialized Name: VolumeGroupDetails.properties.provisioningState + /// + /// + /// Volume group details + /// Serialized Name: VolumeGroupDetails.properties.groupMetaData + /// + /// + /// List of volumes from group + /// Serialized Name: VolumeGroupDetails.properties.volumes + /// /// A new instance for mocking. public static NetAppVolumeGroupData NetAppVolumeGroupData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, AzureLocation? location = null, string provisioningState = null, NetAppVolumeGroupMetadata groupMetaData = null, IEnumerable volumes = null) { @@ -931,72 +1650,251 @@ public static NetAppVolumeGroupData NetAppVolumeGroupData(ResourceIdentifier id } /// Initializes a new instance of . - /// Resource Id. - /// Resource name. - /// Resource type. - /// Resource tags. - /// Availability Zone. - /// Unique FileSystem Identifier. - /// A unique file path for the volume. Used when creating mount targets. - /// The service level of the file system. - /// Maximum storage quota allowed for a file system in bytes. This is a soft quota used for alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. For large volumes, valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to 2400GiB to 2400TiB. Values expressed in bytes as multiples of 1 GiB. - /// Set of export policy rules. - /// Set of protocol types, default NFSv3, CIFS for SMB protocol. - /// Azure lifecycle management. - /// Resource identifier used to identify the Snapshot. - /// If enabled (true) the snapshot the volume was created from will be automatically deleted after the volume create operation has finished. Defaults to false. - /// Resource identifier used to identify the Backup. - /// Unique Baremetal Tenant Identifier. - /// The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes. - /// Network features available to the volume, or current state of update. - /// Network Sibling Set ID for the the group of volumes sharing networking resources. - /// Provides storage to network proximity information for the volume. - /// List of mount targets. - /// What type of volume is this. For destination volumes in Cross Region Replication, set type to DataProtection. - /// DataProtection type volumes include an object containing details of the replication. - /// Restoring. - /// If enabled (true) the volume will contain a read-only snapshot directory which provides access to each of the volume's snapshots (defaults to true). - /// Describe if a volume is KerberosEnabled. To be use with swagger version 2020-05-01 or later. - /// The security style of volume, default unix, defaults to ntfs for dual protocol or CIFS protocol. - /// Enables encryption for in-flight smb3 data. Only applicable for SMB/DualProtocol volume. To be used with swagger version 2020-08-01 or later. - /// Enables access-based enumeration share property for SMB Shares. Only applicable for SMB/DualProtocol volume. - /// Enables non-browsable property for SMB Shares. Only applicable for SMB/DualProtocol volume. - /// Enables continuously available share property for smb volume. Only applicable for SMB volume. - /// Maximum throughput in MiB/s that can be achieved by this volume and this will be accepted as input only for manual qosType volume. - /// Actual throughput in MiB/s for auto qosType volumes calculated based on size and serviceLevel. - /// Source of key used to encrypt data in volume. Applicable if NetApp account has encryption.keySource = 'Microsoft.KeyVault'. Possible values (case-insensitive) are: 'Microsoft.NetApp, Microsoft.KeyVault'. - /// The resource ID of private endpoint for KeyVault. It must reside in the same VNET as the volume. Only applicable if encryptionKeySource = 'Microsoft.KeyVault'. - /// Specifies whether LDAP is enabled or not for a given NFS volume. - /// Specifies whether Cool Access(tiering) is enabled for the volume. - /// Specifies the number of days after which data that is not accessed by clients will be tiered. + /// + /// Resource Id + /// Serialized Name: VolumeGroupVolumeProperties.id + /// + /// + /// Resource name + /// Serialized Name: VolumeGroupVolumeProperties.name + /// + /// + /// Resource type + /// Serialized Name: VolumeGroupVolumeProperties.type + /// + /// + /// Resource tags + /// Serialized Name: VolumeGroupVolumeProperties.tags + /// + /// + /// Availability Zone + /// Serialized Name: VolumeGroupVolumeProperties.zones + /// + /// + /// Unique FileSystem Identifier. + /// Serialized Name: VolumeGroupVolumeProperties.properties.fileSystemId + /// + /// + /// A unique file path for the volume. Used when creating mount targets + /// Serialized Name: VolumeGroupVolumeProperties.properties.creationToken + /// + /// + /// The service level of the file system + /// Serialized Name: VolumeGroupVolumeProperties.properties.serviceLevel + /// + /// + /// Maximum storage quota allowed for a file system in bytes. This is a soft quota used for alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. For large volumes, valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to 2400GiB to 2400TiB. Values expressed in bytes as multiples of 1 GiB. + /// Serialized Name: VolumeGroupVolumeProperties.properties.usageThreshold + /// + /// + /// Set of export policy rules + /// Serialized Name: VolumeGroupVolumeProperties.properties.exportPolicy + /// + /// + /// Set of protocol types, default NFSv3, CIFS for SMB protocol + /// Serialized Name: VolumeGroupVolumeProperties.properties.protocolTypes + /// + /// + /// Azure lifecycle management + /// Serialized Name: VolumeGroupVolumeProperties.properties.provisioningState + /// + /// + /// Resource identifier used to identify the Snapshot. + /// Serialized Name: VolumeGroupVolumeProperties.properties.snapshotId + /// + /// + /// If enabled (true) the snapshot the volume was created from will be automatically deleted after the volume create operation has finished. Defaults to false + /// Serialized Name: VolumeGroupVolumeProperties.properties.deleteBaseSnapshot + /// + /// + /// Resource identifier used to identify the Backup. + /// Serialized Name: VolumeGroupVolumeProperties.properties.backupId + /// + /// + /// Unique Baremetal Tenant Identifier. + /// Serialized Name: VolumeGroupVolumeProperties.properties.baremetalTenantId + /// + /// + /// The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes + /// Serialized Name: VolumeGroupVolumeProperties.properties.subnetId + /// + /// + /// The original value of the network features type available to the volume at the time it was created. + /// Serialized Name: VolumeGroupVolumeProperties.properties.networkFeatures + /// + /// + /// The effective value of the network features type available to the volume, or current effective state of update. + /// Serialized Name: VolumeGroupVolumeProperties.properties.effectiveNetworkFeatures + /// + /// + /// Network Sibling Set ID for the the group of volumes sharing networking resources. + /// Serialized Name: VolumeGroupVolumeProperties.properties.networkSiblingSetId + /// + /// + /// Provides storage to network proximity information for the volume. + /// Serialized Name: VolumeGroupVolumeProperties.properties.storageToNetworkProximity + /// + /// + /// List of mount targets + /// Serialized Name: VolumeGroupVolumeProperties.properties.mountTargets + /// + /// + /// What type of volume is this. For destination volumes in Cross Region Replication, set type to DataProtection + /// Serialized Name: VolumeGroupVolumeProperties.properties.volumeType + /// + /// + /// DataProtection type volumes include an object containing details of the replication + /// Serialized Name: VolumeGroupVolumeProperties.properties.dataProtection + /// + /// + /// Restoring + /// Serialized Name: VolumeGroupVolumeProperties.properties.isRestoring + /// + /// + /// If enabled (true) the volume will contain a read-only snapshot directory which provides access to each of the volume's snapshots (defaults to true). + /// Serialized Name: VolumeGroupVolumeProperties.properties.snapshotDirectoryVisible + /// + /// + /// Describe if a volume is KerberosEnabled. To be use with swagger version 2020-05-01 or later + /// Serialized Name: VolumeGroupVolumeProperties.properties.kerberosEnabled + /// + /// + /// The security style of volume, default unix, defaults to ntfs for dual protocol or CIFS protocol + /// Serialized Name: VolumeGroupVolumeProperties.properties.securityStyle + /// + /// + /// Enables encryption for in-flight smb3 data. Only applicable for SMB/DualProtocol volume. To be used with swagger version 2020-08-01 or later + /// Serialized Name: VolumeGroupVolumeProperties.properties.smbEncryption + /// + /// + /// Enables access-based enumeration share property for SMB Shares. Only applicable for SMB/DualProtocol volume + /// Serialized Name: VolumeGroupVolumeProperties.properties.smbAccessBasedEnumeration + /// + /// + /// Enables non-browsable property for SMB Shares. Only applicable for SMB/DualProtocol volume + /// Serialized Name: VolumeGroupVolumeProperties.properties.smbNonBrowsable + /// + /// + /// Enables continuously available share property for smb volume. Only applicable for SMB volume + /// Serialized Name: VolumeGroupVolumeProperties.properties.smbContinuouslyAvailable + /// + /// + /// Maximum throughput in MiB/s that can be achieved by this volume and this will be accepted as input only for manual qosType volume + /// Serialized Name: VolumeGroupVolumeProperties.properties.throughputMibps + /// + /// + /// Actual throughput in MiB/s for auto qosType volumes calculated based on size and serviceLevel + /// Serialized Name: VolumeGroupVolumeProperties.properties.actualThroughputMibps + /// + /// + /// Source of key used to encrypt data in volume. Applicable if NetApp account has encryption.keySource = 'Microsoft.KeyVault'. Possible values (case-insensitive) are: 'Microsoft.NetApp, Microsoft.KeyVault' + /// Serialized Name: VolumeGroupVolumeProperties.properties.encryptionKeySource + /// + /// + /// The resource ID of private endpoint for KeyVault. It must reside in the same VNET as the volume. Only applicable if encryptionKeySource = 'Microsoft.KeyVault'. + /// Serialized Name: VolumeGroupVolumeProperties.properties.keyVaultPrivateEndpointResourceId + /// + /// + /// Specifies whether LDAP is enabled or not for a given NFS volume. + /// Serialized Name: VolumeGroupVolumeProperties.properties.ldapEnabled + /// + /// + /// Specifies whether Cool Access(tiering) is enabled for the volume. + /// Serialized Name: VolumeGroupVolumeProperties.properties.coolAccess + /// + /// + /// Specifies the number of days after which data that is not accessed by clients will be tiered. + /// Serialized Name: VolumeGroupVolumeProperties.properties.coolnessPeriod + /// /// /// coolAccessRetrievalPolicy determines the data retrieval behavior from the cool tier to standard storage based on the read pattern for cool access enabled volumes. The possible values for this field are: /// Default - Data will be pulled from cool tier to standard storage on random reads. This policy is the default. /// OnRead - All client-driven data read is pulled from cool tier to standard storage on both sequential and random reads. /// Never - No client-driven data is pulled from cool tier to standard storage. + /// Serialized Name: VolumeGroupVolumeProperties.properties.coolAccessRetrievalPolicy + /// + /// + /// UNIX permissions for NFS volume accepted in octal 4 digit format. First digit selects the set user ID(4), set group ID (2) and sticky (1) attributes. Second digit selects permission for the owner of the file: read (4), write (2) and execute (1). Third selects permissions for other users in the same group. the fourth for other users not in the group. 0755 - gives read/write/execute permissions to owner and read/execute to group and other users. + /// Serialized Name: VolumeGroupVolumeProperties.properties.unixPermissions + /// + /// + /// When a volume is being restored from another volume's snapshot, will show the percentage completion of this cloning process. When this value is empty/null there is no cloning process currently happening on this volume. This value will update every 5 minutes during cloning. + /// Serialized Name: VolumeGroupVolumeProperties.properties.cloneProgress + /// + /// + /// Flag indicating whether file access logs are enabled for the volume, based on active diagnostic settings present on the volume. + /// Serialized Name: VolumeGroupVolumeProperties.properties.fileAccessLogs + /// + /// + /// Specifies whether the volume is enabled for Azure VMware Solution (AVS) datastore purpose + /// Serialized Name: VolumeGroupVolumeProperties.properties.avsDataStore + /// + /// + /// Data store resource unique identifier + /// Serialized Name: VolumeGroupVolumeProperties.properties.dataStoreResourceId + /// + /// + /// Specifies if default quota is enabled for the volume. + /// Serialized Name: VolumeGroupVolumeProperties.properties.isDefaultQuotaEnabled + /// + /// + /// Default user quota for volume in KiBs. If isDefaultQuotaEnabled is set, the minimum value of 4 KiBs applies . + /// Serialized Name: VolumeGroupVolumeProperties.properties.defaultUserQuotaInKiBs + /// + /// + /// Default group quota for volume in KiBs. If isDefaultQuotaEnabled is set, the minimum value of 4 KiBs applies. + /// Serialized Name: VolumeGroupVolumeProperties.properties.defaultGroupQuotaInKiBs + /// + /// + /// Maximum number of files allowed. Needs a service request in order to be changed. Only allowed to be changed if volume quota is more than 4TiB. + /// Serialized Name: VolumeGroupVolumeProperties.properties.maximumNumberOfFiles + /// + /// + /// Volume Group Name + /// Serialized Name: VolumeGroupVolumeProperties.properties.volumeGroupName + /// + /// + /// Pool Resource Id used in case of creating a volume through volume group + /// Serialized Name: VolumeGroupVolumeProperties.properties.capacityPoolResourceId + /// + /// + /// Proximity placement group associated with the volume + /// Serialized Name: VolumeGroupVolumeProperties.properties.proximityPlacementGroup + /// + /// + /// T2 network information + /// Serialized Name: VolumeGroupVolumeProperties.properties.t2Network + /// + /// + /// Volume spec name is the application specific designation or identifier for the particular volume in a volume group for e.g. data, log + /// Serialized Name: VolumeGroupVolumeProperties.properties.volumeSpecName + /// + /// + /// Specifies if the volume is encrypted or not. Only available on volumes created or updated after 2022-01-01. + /// Serialized Name: VolumeGroupVolumeProperties.properties.encrypted + /// + /// + /// Application specific placement rules for the particular volume + /// Serialized Name: VolumeGroupVolumeProperties.properties.placementRules + /// + /// + /// Flag indicating whether subvolume operations are enabled on the volume + /// Serialized Name: VolumeGroupVolumeProperties.properties.enableSubvolumes + /// + /// + /// The availability zone where the volume is provisioned. This refers to the logical availability zone where the volume resides. + /// Serialized Name: VolumeGroupVolumeProperties.properties.provisionedAvailabilityZone + /// + /// + /// Specifies whether volume is a Large Volume or Regular Volume. + /// Serialized Name: VolumeGroupVolumeProperties.properties.isLargeVolume + /// + /// + /// Id of the snapshot or backup that the volume is restored from. + /// Serialized Name: VolumeGroupVolumeProperties.properties.originatingResourceId /// - /// UNIX permissions for NFS volume accepted in octal 4 digit format. First digit selects the set user ID(4), set group ID (2) and sticky (1) attributes. Second digit selects permission for the owner of the file: read (4), write (2) and execute (1). Third selects permissions for other users in the same group. the fourth for other users not in the group. 0755 - gives read/write/execute permissions to owner and read/execute to group and other users. - /// When a volume is being restored from another volume's snapshot, will show the percentage completion of this cloning process. When this value is empty/null there is no cloning process currently happening on this volume. This value will update every 5 minutes during cloning. - /// Flag indicating whether file access logs are enabled for the volume, based on active diagnostic settings present on the volume. - /// Specifies whether the volume is enabled for Azure VMware Solution (AVS) datastore purpose. - /// Data store resource unique identifier. - /// Specifies if default quota is enabled for the volume. - /// Default user quota for volume in KiBs. If isDefaultQuotaEnabled is set, the minimum value of 4 KiBs applies . - /// Default group quota for volume in KiBs. If isDefaultQuotaEnabled is set, the minimum value of 4 KiBs applies. - /// Maximum number of files allowed. Needs a service request in order to be changed. Only allowed to be changed if volume quota is more than 4TiB. - /// Volume Group Name. - /// Pool Resource Id used in case of creating a volume through volume group. - /// Proximity placement group associated with the volume. - /// T2 network information. - /// Volume spec name is the application specific designation or identifier for the particular volume in a volume group for e.g. data, log. - /// Specifies if the volume is encrypted or not. Only available on volumes created or updated after 2022-01-01. - /// Application specific placement rules for the particular volume. - /// Flag indicating whether subvolume operations are enabled on the volume. - /// The availability zone where the volume is provisioned. This refers to the logical availability zone where the volume resides. - /// Specifies whether volume is a Large Volume or Regular Volume. - /// Id of the snapshot or backup that the volume is restored from. /// A new instance for mocking. - public static NetAppVolumeGroupVolume NetAppVolumeGroupVolume(ResourceIdentifier id = null, string name = null, ResourceType? resourceType = null, IDictionary tags = null, IEnumerable zones = null, Guid? fileSystemId = null, string creationToken = null, NetAppFileServiceLevel? serviceLevel = null, long usageThreshold = default, IEnumerable exportRules = null, IEnumerable protocolTypes = null, string provisioningState = null, string snapshotId = null, bool? deleteBaseSnapshot = null, string backupId = null, string baremetalTenantId = null, ResourceIdentifier subnetId = null, NetAppNetworkFeature? networkFeatures = null, Guid? networkSiblingSetId = null, NetAppVolumeStorageToNetworkProximity? storageToNetworkProximity = null, IEnumerable mountTargets = null, string volumeType = null, NetAppVolumeDataProtection dataProtection = null, bool? isRestoring = null, bool? isSnapshotDirectoryVisible = null, bool? isKerberosEnabled = null, NetAppVolumeSecurityStyle? securityStyle = null, bool? isSmbEncryptionEnabled = null, SmbAccessBasedEnumeration? smbAccessBasedEnumeration = null, SmbNonBrowsable? smbNonBrowsable = null, bool? isSmbContinuouslyAvailable = null, float? throughputMibps = null, float? actualThroughputMibps = null, NetAppEncryptionKeySource? encryptionKeySource = null, ResourceIdentifier keyVaultPrivateEndpointResourceId = null, bool? isLdapEnabled = null, bool? isCoolAccessEnabled = null, int? coolnessPeriod = null, CoolAccessRetrievalPolicy? coolAccessRetrievalPolicy = null, string unixPermissions = null, int? cloneProgress = null, NetAppFileAccessLog? fileAccessLogs = null, NetAppAvsDataStore? avsDataStore = null, IEnumerable dataStoreResourceId = null, bool? isDefaultQuotaEnabled = null, long? defaultUserQuotaInKiBs = null, long? defaultGroupQuotaInKiBs = null, long? maximumNumberOfFiles = null, string volumeGroupName = null, ResourceIdentifier capacityPoolResourceId = null, ResourceIdentifier proximityPlacementGroupId = null, string t2Network = null, string volumeSpecName = null, bool? isEncrypted = null, IEnumerable placementRules = null, EnableNetAppSubvolume? enableSubvolumes = null, string provisionedAvailabilityZone = null, bool? isLargeVolume = null, ResourceIdentifier originatingResourceId = null) + public static NetAppVolumeGroupVolume NetAppVolumeGroupVolume(ResourceIdentifier id = null, string name = null, ResourceType? resourceType = null, IDictionary tags = null, IEnumerable zones = null, Guid? fileSystemId = null, string creationToken = null, NetAppFileServiceLevel? serviceLevel = null, long usageThreshold = default, IEnumerable exportRules = null, IEnumerable protocolTypes = null, string provisioningState = null, string snapshotId = null, bool? deleteBaseSnapshot = null, string backupId = null, string baremetalTenantId = null, ResourceIdentifier subnetId = null, NetAppNetworkFeature? networkFeatures = null, NetAppNetworkFeature? effectiveNetworkFeatures = null, Guid? networkSiblingSetId = null, NetAppVolumeStorageToNetworkProximity? storageToNetworkProximity = null, IEnumerable mountTargets = null, string volumeType = null, NetAppVolumeDataProtection dataProtection = null, bool? isRestoring = null, bool? isSnapshotDirectoryVisible = null, bool? isKerberosEnabled = null, NetAppVolumeSecurityStyle? securityStyle = null, bool? isSmbEncryptionEnabled = null, SmbAccessBasedEnumeration? smbAccessBasedEnumeration = null, SmbNonBrowsable? smbNonBrowsable = null, bool? isSmbContinuouslyAvailable = null, float? throughputMibps = null, float? actualThroughputMibps = null, NetAppEncryptionKeySource? encryptionKeySource = null, ResourceIdentifier keyVaultPrivateEndpointResourceId = null, bool? isLdapEnabled = null, bool? isCoolAccessEnabled = null, int? coolnessPeriod = null, CoolAccessRetrievalPolicy? coolAccessRetrievalPolicy = null, string unixPermissions = null, int? cloneProgress = null, NetAppFileAccessLog? fileAccessLogs = null, NetAppAvsDataStore? avsDataStore = null, IEnumerable dataStoreResourceId = null, bool? isDefaultQuotaEnabled = null, long? defaultUserQuotaInKiBs = null, long? defaultGroupQuotaInKiBs = null, long? maximumNumberOfFiles = null, string volumeGroupName = null, ResourceIdentifier capacityPoolResourceId = null, ResourceIdentifier proximityPlacementGroupId = null, string t2Network = null, string volumeSpecName = null, bool? isEncrypted = null, IEnumerable placementRules = null, EnableNetAppSubvolume? enableSubvolumes = null, string provisionedAvailabilityZone = null, bool? isLargeVolume = null, ResourceIdentifier originatingResourceId = null) { tags ??= new Dictionary(); zones ??= new List(); @@ -1025,6 +1923,7 @@ public static NetAppVolumeGroupVolume NetAppVolumeGroupVolume(ResourceIdentifier baremetalTenantId, subnetId, networkFeatures, + effectiveNetworkFeatures, networkSiblingSetId, storageToNetworkProximity, mountTargets?.ToList(), @@ -1074,10 +1973,22 @@ public static NetAppVolumeGroupVolume NetAppVolumeGroupVolume(ResourceIdentifier /// The name. /// The resourceType. /// The systemData. - /// Path to the subvolume. - /// Truncate subvolume to the provided size in bytes. - /// parent path to the subvolume. - /// Azure lifecycle management. + /// + /// Path to the subvolume + /// Serialized Name: SubvolumeInfo.properties.path + /// + /// + /// Truncate subvolume to the provided size in bytes + /// Serialized Name: SubvolumeInfo.properties.size + /// + /// + /// parent path to the subvolume + /// Serialized Name: SubvolumeInfo.properties.parentPath + /// + /// + /// Azure lifecycle management + /// Serialized Name: SubvolumeInfo.properties.provisioningState + /// /// A new instance for mocking. public static NetAppSubvolumeInfoData NetAppSubvolumeInfoData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string path = null, long? size = null, string parentPath = null, string provisioningState = null) { @@ -1098,16 +2009,46 @@ public static NetAppSubvolumeInfoData NetAppSubvolumeInfoData(ResourceIdentifier /// The name. /// The resourceType. /// The systemData. - /// Path to the subvolume. - /// Path to the parent subvolume. - /// Size of subvolume. - /// Bytes used. - /// Permissions of the subvolume. - /// Creation time and date. - /// Most recent access time and date. - /// Most recent modification time and date. - /// Most recent change time and date. - /// Azure lifecycle management. + /// + /// Path to the subvolume + /// Serialized Name: SubvolumeModel.properties.path + /// + /// + /// Path to the parent subvolume + /// Serialized Name: SubvolumeModel.properties.parentPath + /// + /// + /// Size of subvolume + /// Serialized Name: SubvolumeModel.properties.size + /// + /// + /// Bytes used + /// Serialized Name: SubvolumeModel.properties.bytesUsed + /// + /// + /// Permissions of the subvolume + /// Serialized Name: SubvolumeModel.properties.permissions + /// + /// + /// Creation time and date + /// Serialized Name: SubvolumeModel.properties.creationTimeStamp + /// + /// + /// Most recent access time and date + /// Serialized Name: SubvolumeModel.properties.accessedTimeStamp + /// + /// + /// Most recent modification time and date + /// Serialized Name: SubvolumeModel.properties.modifiedTimeStamp + /// + /// + /// Most recent change time and date + /// Serialized Name: SubvolumeModel.properties.changedTimeStamp + /// + /// + /// Azure lifecycle management + /// Serialized Name: SubvolumeModel.properties.provisioningState + /// /// A new instance for mocking. public static NetAppSubvolumeMetadata NetAppSubvolumeMetadata(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string path = null, string parentPath = null, long? size = null, long? bytesUsed = null, string permissions = null, DateTimeOffset? createdOn = null, DateTimeOffset? accessedOn = null, DateTimeOffset? modifiedOn = null, DateTimeOffset? changedOn = null, string provisioningState = null) { @@ -1130,15 +2071,42 @@ public static NetAppSubvolumeMetadata NetAppSubvolumeMetadata(ResourceIdentifier } /// Initializes a new instance of . - /// Backup health status. - /// Status of the backup mirror relationship. - /// The status of the backup. - /// Reason for the unhealthy backup relationship. - /// Displays error message if the backup is in an error state. - /// Displays the last transfer size. - /// Displays the last transfer type. - /// Displays the total bytes transferred. - /// Displays the total number of bytes transferred for the ongoing operation. + /// + /// Backup health status + /// Serialized Name: BackupStatus.healthy + /// + /// + /// Status of the backup mirror relationship + /// Serialized Name: BackupStatus.relationshipStatus + /// + /// + /// The status of the backup + /// Serialized Name: BackupStatus.mirrorState + /// + /// + /// Reason for the unhealthy backup relationship + /// Serialized Name: BackupStatus.unhealthyReason + /// + /// + /// Displays error message if the backup is in an error state + /// Serialized Name: BackupStatus.errorMessage + /// + /// + /// Displays the last transfer size + /// Serialized Name: BackupStatus.lastTransferSize + /// + /// + /// Displays the last transfer type + /// Serialized Name: BackupStatus.lastTransferType + /// + /// + /// Displays the total bytes transferred + /// Serialized Name: BackupStatus.totalTransferBytes + /// + /// + /// Displays the total number of bytes transferred for the ongoing operation + /// Serialized Name: BackupStatus.transferProgressBytes + /// /// A new instance for mocking. public static NetAppVolumeBackupStatus NetAppVolumeBackupStatus(bool? isHealthy = null, NetAppRelationshipStatus? relationshipStatus = null, NetAppMirrorState? mirrorState = null, string unhealthyReason = null, string errorMessage = null, long? lastTransferSize = null, string lastTransferType = null, long? totalTransferBytes = null, long? transferProgressBytes = null) { @@ -1156,12 +2124,30 @@ public static NetAppVolumeBackupStatus NetAppVolumeBackupStatus(bool? isHealthy } /// Initializes a new instance of . - /// Restore health status. - /// Status of the restore SnapMirror relationship. - /// The status of the restore. - /// Reason for the unhealthy restore relationship. - /// Displays error message if the restore is in an error state. - /// Displays the total bytes transferred. + /// + /// Restore health status + /// Serialized Name: RestoreStatus.healthy + /// + /// + /// Status of the restore SnapMirror relationship + /// Serialized Name: RestoreStatus.relationshipStatus + /// + /// + /// The status of the restore + /// Serialized Name: RestoreStatus.mirrorState + /// + /// + /// Reason for the unhealthy restore relationship + /// Serialized Name: RestoreStatus.unhealthyReason + /// + /// + /// Displays error message if the restore is in an error state + /// Serialized Name: RestoreStatus.errorMessage + /// + /// + /// Displays the total bytes transferred + /// Serialized Name: RestoreStatus.totalTransferBytes + /// /// A new instance for mocking. public static NetAppRestoreStatus NetAppRestoreStatus(bool? isHealthy = null, NetAppRelationshipStatus? relationshipStatus = null, NetAppMirrorState? mirrorState = null, string unhealthyReason = null, string errorMessage = null, long? totalTransferBytes = null) { @@ -1180,17 +2166,50 @@ public static NetAppRestoreStatus NetAppRestoreStatus(bool? isHealthy = null, Ne /// The name. /// The resourceType. /// The systemData. - /// UUID v4 used to identify the Backup. - /// The creation date of the backup. - /// Azure lifecycle management. - /// Size of backup in bytes. - /// Label for backup. - /// Type of backup Manual or Scheduled. - /// Failure reason. - /// ResourceId used to identify the Volume. - /// Manual backup an already existing snapshot. This will always be false for scheduled backups and true/false for manual backups. - /// The name of the snapshot. - /// ResourceId used to identify the backup policy. + /// + /// UUID v4 used to identify the Backup + /// Serialized Name: Backup.properties.backupId + /// + /// + /// The creation date of the backup + /// Serialized Name: Backup.properties.creationDate + /// + /// + /// Azure lifecycle management + /// Serialized Name: Backup.properties.provisioningState + /// + /// + /// Size of backup in bytes + /// Serialized Name: Backup.properties.size + /// + /// + /// Label for backup + /// Serialized Name: Backup.properties.label + /// + /// + /// Type of backup Manual or Scheduled + /// Serialized Name: Backup.properties.backupType + /// + /// + /// Failure reason + /// Serialized Name: Backup.properties.failureReason + /// + /// + /// ResourceId used to identify the Volume + /// Serialized Name: Backup.properties.volumeResourceId + /// + /// + /// Manual backup an already existing snapshot. This will always be false for scheduled backups and true/false for manual backups + /// Serialized Name: Backup.properties.useExistingSnapshot + /// + /// + /// The name of the snapshot + /// Serialized Name: Backup.properties.snapshotName + /// + /// + /// ResourceId used to identify the backup policy + /// Serialized Name: Backup.properties.backupPolicyResourceId + /// /// A new instance for mocking. public static NetAppBackupData NetAppBackupData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string backupId = null, DateTimeOffset? createdOn = null, string provisioningState = null, long? size = null, string label = null, NetAppBackupType? backupType = null, string failureReason = null, ResourceIdentifier volumeResourceId = null, bool? useExistingSnapshot = null, string snapshotName = null, ResourceIdentifier backupPolicyArmResourceId = null) { @@ -1220,7 +2239,10 @@ public static NetAppBackupData NetAppBackupData(ResourceIdentifier id = null, st /// The systemData. /// The tags. /// The location. - /// Azure lifecycle management. + /// + /// Azure lifecycle management + /// Serialized Name: BackupVault.properties.provisioningState + /// /// A new instance for mocking. public static NetAppBackupVaultData NetAppBackupVaultData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string provisioningState = null) { @@ -1238,9 +2260,18 @@ public static NetAppBackupVaultData NetAppBackupVaultData(ResourceIdentifier id } /// Initializes a new instance of . - /// List of files to be restored. - /// Destination folder where the files will be restored. The path name should start with a forward slash. If it is omitted from request then restore is done at the root folder of the destination volume by default. - /// Resource Id of the destination volume on which the files need to be restored. + /// + /// List of files to be restored + /// Serialized Name: BackupRestoreFiles.fileList + /// + /// + /// Destination folder where the files will be restored. The path name should start with a forward slash. If it is omitted from request then restore is done at the root folder of the destination volume by default + /// Serialized Name: BackupRestoreFiles.restoreFilePath + /// + /// + /// Resource Id of the destination volume on which the files need to be restored + /// Serialized Name: BackupRestoreFiles.destinationVolumeId + /// /// A new instance for mocking. public static NetAppVolumeBackupBackupRestoreFilesContent NetAppVolumeBackupBackupRestoreFilesContent(IEnumerable fileList = null, string restoreFilePath = null, ResourceIdentifier destinationVolumeId = null) { @@ -1249,6 +2280,19 @@ public static NetAppVolumeBackupBackupRestoreFilesContent NetAppVolumeBackupBack return new NetAppVolumeBackupBackupRestoreFilesContent(fileList?.ToList(), restoreFilePath, destinationVolumeId, serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// Id. + /// Indicates whether the local volume is the source or destination for the Volume Replication. + /// Schedule. + /// The resource ID of the remote volume. + /// The remote region for the other end of the Volume Replication. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static NetAppReplicationObject NetAppReplicationObject(string replicationId, NetAppEndpointType? endpointType, NetAppReplicationSchedule? replicationSchedule, ResourceIdentifier remoteVolumeResourceId, string remoteVolumeRegion) + { + return NetAppReplicationObject(replicationId: replicationId, endpointType: endpointType, replicationSchedule: replicationSchedule, remoteVolumeResourceId: remoteVolumeResourceId, remotePath: default, remoteVolumeRegion: remoteVolumeRegion); + } + /// Initializes a new instance of . /// Indicates whether the local volume is the source or destination for the Volume Replication. /// Schedule. diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/CapacityPoolCollection.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/CapacityPoolCollection.cs index 706c4cba232d..441906967761 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/CapacityPoolCollection.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/CapacityPoolCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUpdateAsyn /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitU /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(string poolNa /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string poolName, CancellationT /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken cancellat /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string poolName, Cancellat /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string poolName, CancellationToken cancella /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> GetIfExistsAsy /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/CapacityPoolData.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/CapacityPoolData.cs index dc9e839eff61..7f0ee882d81c 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/CapacityPoolData.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/CapacityPoolData.cs @@ -16,6 +16,7 @@ namespace Azure.ResourceManager.NetApp /// /// A class representing the CapacityPool data model. /// Capacity pool resource + /// Serialized Name: CapacityPool /// public partial class CapacityPoolData : TrackedResourceData { @@ -53,8 +54,14 @@ public partial class CapacityPoolData : TrackedResourceData /// Initializes a new instance of . /// The location. - /// Provisioned size of the pool (in bytes). Allowed values are in 1TiB chunks (value must be multiple of 1099511627776). - /// The service level of the file system. + /// + /// Provisioned size of the pool (in bytes). Allowed values are in 1TiB chunks (value must be multiple of 1099511627776). + /// Serialized Name: CapacityPool.properties.size + /// + /// + /// The service level of the file system + /// Serialized Name: CapacityPool.properties.serviceLevel + /// public CapacityPoolData(AzureLocation location, long size, NetAppFileServiceLevel serviceLevel) : base(location) { Size = size; @@ -68,16 +75,46 @@ public CapacityPoolData(AzureLocation location, long size, NetAppFileServiceLeve /// The systemData. /// The tags. /// The location. - /// A unique read-only string that changes whenever the resource is updated. - /// UUID v4 used to identify the Pool. - /// Provisioned size of the pool (in bytes). Allowed values are in 1TiB chunks (value must be multiple of 1099511627776). - /// The service level of the file system. - /// Azure lifecycle management. - /// Total throughput of pool in MiB/s. - /// Utilized throughput of pool in MiB/s. - /// The qos type of the pool. - /// If enabled (true) the pool can contain cool Access enabled volumes. - /// Encryption type of the capacity pool, set encryption type for data at rest for this pool and all volumes in it. This value can only be set when creating new pool. + /// + /// A unique read-only string that changes whenever the resource is updated. + /// Serialized Name: CapacityPool.etag + /// + /// + /// UUID v4 used to identify the Pool + /// Serialized Name: CapacityPool.properties.poolId + /// + /// + /// Provisioned size of the pool (in bytes). Allowed values are in 1TiB chunks (value must be multiple of 1099511627776). + /// Serialized Name: CapacityPool.properties.size + /// + /// + /// The service level of the file system + /// Serialized Name: CapacityPool.properties.serviceLevel + /// + /// + /// Azure lifecycle management + /// Serialized Name: CapacityPool.properties.provisioningState + /// + /// + /// Total throughput of pool in MiB/s + /// Serialized Name: CapacityPool.properties.totalThroughputMibps + /// + /// + /// Utilized throughput of pool in MiB/s + /// Serialized Name: CapacityPool.properties.utilizedThroughputMibps + /// + /// + /// The qos type of the pool + /// Serialized Name: CapacityPool.properties.qosType + /// + /// + /// If enabled (true) the pool can contain cool Access enabled volumes. + /// Serialized Name: CapacityPool.properties.coolAccess + /// + /// + /// Encryption type of the capacity pool, set encryption type for data at rest for this pool and all volumes in it. This value can only be set when creating new pool. + /// Serialized Name: CapacityPool.properties.encryptionType + /// /// Keeps track of any properties unknown to the library. internal CapacityPoolData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ETag? etag, Guid? poolId, long size, NetAppFileServiceLevel serviceLevel, string provisioningState, float? totalThroughputMibps, float? utilizedThroughputMibps, CapacityPoolQosType? qosType, bool? isCoolAccessEnabled, CapacityPoolEncryptionType? encryptionType, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { @@ -99,25 +136,55 @@ internal CapacityPoolData() { } - /// A unique read-only string that changes whenever the resource is updated. + /// + /// A unique read-only string that changes whenever the resource is updated. + /// Serialized Name: CapacityPool.etag + /// public ETag? ETag { get; } - /// UUID v4 used to identify the Pool. + /// + /// UUID v4 used to identify the Pool + /// Serialized Name: CapacityPool.properties.poolId + /// public Guid? PoolId { get; } - /// Provisioned size of the pool (in bytes). Allowed values are in 1TiB chunks (value must be multiple of 1099511627776). + /// + /// Provisioned size of the pool (in bytes). Allowed values are in 1TiB chunks (value must be multiple of 1099511627776). + /// Serialized Name: CapacityPool.properties.size + /// public long Size { get; set; } - /// The service level of the file system. + /// + /// The service level of the file system + /// Serialized Name: CapacityPool.properties.serviceLevel + /// public NetAppFileServiceLevel ServiceLevel { get; set; } - /// Azure lifecycle management. + /// + /// Azure lifecycle management + /// Serialized Name: CapacityPool.properties.provisioningState + /// public string ProvisioningState { get; } - /// Total throughput of pool in MiB/s. + /// + /// Total throughput of pool in MiB/s + /// Serialized Name: CapacityPool.properties.totalThroughputMibps + /// public float? TotalThroughputMibps { get; } - /// Utilized throughput of pool in MiB/s. + /// + /// Utilized throughput of pool in MiB/s + /// Serialized Name: CapacityPool.properties.utilizedThroughputMibps + /// public float? UtilizedThroughputMibps { get; } - /// The qos type of the pool. + /// + /// The qos type of the pool + /// Serialized Name: CapacityPool.properties.qosType + /// public CapacityPoolQosType? QosType { get; set; } - /// If enabled (true) the pool can contain cool Access enabled volumes. + /// + /// If enabled (true) the pool can contain cool Access enabled volumes. + /// Serialized Name: CapacityPool.properties.coolAccess + /// public bool? IsCoolAccessEnabled { get; set; } - /// Encryption type of the capacity pool, set encryption type for data at rest for this pool and all volumes in it. This value can only be set when creating new pool. + /// + /// Encryption type of the capacity pool, set encryption type for data at rest for this pool and all volumes in it. This value can only be set when creating new pool. + /// Serialized Name: CapacityPool.properties.encryptionType + /// public CapacityPoolEncryptionType? EncryptionType { get; set; } } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/CapacityPoolResource.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/CapacityPoolResource.cs index ad34223b1590..cb46e09c0a4e 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/CapacityPoolResource.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/CapacityPoolResource.cs @@ -110,7 +110,7 @@ public virtual NetAppVolumeCollection GetNetAppVolumes() /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetNetAppVolumeAsync(s /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -172,7 +172,7 @@ public virtual Response GetNetAppVolume(string volumeName, /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -212,7 +212,7 @@ public virtual async Task> GetAsync(CancellationT /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(CancellationToken cancellation /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -294,7 +294,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -336,7 +336,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -382,7 +382,7 @@ public virtual async Task> UpdateAsync(WaitUn /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -428,7 +428,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, Ca /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -490,7 +490,7 @@ public virtual async Task> AddTagAsync(string key /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -552,7 +552,7 @@ public virtual Response AddTag(string key, string value, C /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -609,7 +609,7 @@ public virtual async Task> SetTagsAsync(IDictiona /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -666,7 +666,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -726,7 +726,7 @@ public virtual async Task> RemoveTagAsync(string /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Extensions/MockableNetAppResourceGroupResource.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Extensions/MockableNetAppResourceGroupResource.cs index 64c57b900e1b..f1a7299232f9 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Extensions/MockableNetAppResourceGroupResource.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Extensions/MockableNetAppResourceGroupResource.cs @@ -53,7 +53,7 @@ public virtual NetAppAccountCollection GetNetAppAccounts() /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -84,7 +84,7 @@ public virtual async Task> GetNetAppAccountAsync /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Extensions/MockableNetAppSubscriptionResource.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Extensions/MockableNetAppSubscriptionResource.cs index 3c3c23725c2f..9b89e4643ba5 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Extensions/MockableNetAppSubscriptionResource.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Extensions/MockableNetAppSubscriptionResource.cs @@ -71,7 +71,7 @@ public virtual RegionInfoResourceCollection GetRegionInfoResources(AzureLocation /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -100,7 +100,7 @@ public virtual async Task> GetRegionInfoResourceAsy /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -129,7 +129,7 @@ public virtual Response GetRegionInfoResource(AzureLocation /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// @@ -168,7 +168,7 @@ public virtual async Task> CheckNetAppNa /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// ///
@@ -207,7 +207,7 @@ public virtual Response CheckNetAppNameAvailabili /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// ///
@@ -246,7 +246,7 @@ public virtual async Task> CheckNetAppFi ///
/// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// ///
@@ -285,7 +285,7 @@ public virtual Response CheckNetAppFilePathAvaila ///
/// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// ///
@@ -324,7 +324,7 @@ public virtual async Task> CheckNetAppQu ///
/// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// ///
///
@@ -363,7 +363,7 @@ public virtual Response CheckNetAppQuotaAvailabil ///
/// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// ///
///
@@ -398,7 +398,7 @@ public virtual async Task> QueryRegionInfoNetAppResou ///
/// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// ///
///
@@ -433,7 +433,7 @@ public virtual Response QueryRegionInfoNetAppResource(AzureLoc ///
/// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// ///
///
@@ -472,7 +472,7 @@ public virtual async Task> QueryNetworkSiblingSetNet /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// ///
@@ -511,7 +511,7 @@ public virtual Response QueryNetworkSiblingSetNetAppResource( ///
/// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// ///
///
@@ -554,7 +554,7 @@ public virtual async Task> UpdateNetworkSiblingS ///
/// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// ///
///
@@ -597,7 +597,7 @@ public virtual ArmOperation UpdateNetworkSiblingSetNetAppReso ///
/// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// ///
///
@@ -623,7 +623,7 @@ public virtual AsyncPageable GetNetAppQuotaLimitsAs ///
/// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// @@ -649,7 +649,7 @@ public virtual Pageable GetNetAppQuotaLimits(AzureL ///
/// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// @@ -689,7 +689,7 @@ public virtual async Task> GetNetAppQuotaL /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// @@ -729,7 +729,7 @@ public virtual Response GetNetAppQuotaLimit(AzureLo /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -759,7 +759,7 @@ public virtual AsyncPageable GetNetAppAccountsAsync(Cance /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Extensions/NetAppExtensions.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Extensions/NetAppExtensions.cs index 2ce1fdef2c9d..1d0329d7cac9 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Extensions/NetAppExtensions.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Extensions/NetAppExtensions.cs @@ -291,7 +291,7 @@ public static NetAppAccountCollection GetNetAppAccounts(this ResourceGroupResour /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -329,7 +329,7 @@ public static async Task> GetNetAppAccountAsync( /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -385,7 +385,7 @@ public static RegionInfoResourceCollection GetRegionInfoResources(this Subscript /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -422,7 +422,7 @@ public static async Task> GetRegionInfoResourceAsyn /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -459,7 +459,7 @@ public static Response GetRegionInfoResource(this Subscripti /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// @@ -492,7 +492,7 @@ public static async Task> CheckNetAppNam /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// @@ -525,7 +525,7 @@ public static Response CheckNetAppNameAvailabilit /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// @@ -558,7 +558,7 @@ public static async Task> CheckNetAppFil /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// @@ -591,7 +591,7 @@ public static Response CheckNetAppFilePathAvailab /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// @@ -624,7 +624,7 @@ public static async Task> CheckNetAppQuo /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// @@ -657,7 +657,7 @@ public static Response CheckNetAppQuotaAvailabili /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// @@ -689,7 +689,7 @@ public static async Task> QueryRegionInfoNetAppResour /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// @@ -721,7 +721,7 @@ public static Response QueryRegionInfoNetAppResource(this Subs /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// @@ -754,7 +754,7 @@ public static async Task> QueryNetworkSiblingSetNetA /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// @@ -787,7 +787,7 @@ public static Response QueryNetworkSiblingSetNetAppResource(t /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// @@ -821,7 +821,7 @@ public static async Task> UpdateNetworkSiblingSe /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// @@ -855,7 +855,7 @@ public static ArmOperation UpdateNetworkSiblingSetNetAppResou /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// @@ -888,7 +888,7 @@ public static AsyncPageable GetNetAppQuotaLimitsAsy /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// @@ -921,7 +921,7 @@ public static Pageable GetNetAppQuotaLimits(this Su /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// @@ -955,7 +955,7 @@ public static async Task> GetNetAppQuotaLi /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// @@ -989,7 +989,7 @@ public static Response GetNetAppQuotaLimit(this Sub /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -1025,7 +1025,7 @@ public static AsyncPageable GetNetAppAccountsAsync(this S /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/LongRunningOperation/ClusterPeerCommandResultOperationSource.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/LongRunningOperation/ClusterPeerCommandResultOperationSource.cs new file mode 100644 index 000000000000..6f75a1232abb --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/LongRunningOperation/ClusterPeerCommandResultOperationSource.cs @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.ResourceManager.NetApp.Models; + +namespace Azure.ResourceManager.NetApp +{ + internal class ClusterPeerCommandResultOperationSource : IOperationSource + { + ClusterPeerCommandResult IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + return ClusterPeerCommandResult.DeserializeClusterPeerCommandResult(document.RootElement); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + return ClusterPeerCommandResult.DeserializeClusterPeerCommandResult(document.RootElement); + } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/LongRunningOperation/SvmPeerCommandResultOperationSource.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/LongRunningOperation/SvmPeerCommandResultOperationSource.cs new file mode 100644 index 000000000000..45a299b18e42 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/LongRunningOperation/SvmPeerCommandResultOperationSource.cs @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.ResourceManager.NetApp.Models; + +namespace Azure.ResourceManager.NetApp +{ + internal class SvmPeerCommandResultOperationSource : IOperationSource + { + SvmPeerCommandResult IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + return SvmPeerCommandResult.DeserializeSvmPeerCommandResult(document.RootElement); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + return SvmPeerCommandResult.DeserializeSvmPeerCommandResult(document.RootElement); + } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/AvailabilityZoneMapping.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/AvailabilityZoneMapping.cs index ccbcda8030cb..630228dfd742 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/AvailabilityZoneMapping.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/AvailabilityZoneMapping.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.NetApp.Models { - /// The AvailabilityZoneMapping. + /// + /// The AvailabilityZoneMapping. + /// Serialized Name: RegionInfoAvailabilityZoneMappingsItem + /// public partial class AvailabilityZoneMapping { /// @@ -51,8 +54,14 @@ public AvailabilityZoneMapping() } /// Initializes a new instance of . - /// Logical availability zone. - /// Available availability zone. + /// + /// Logical availability zone. + /// Serialized Name: RegionInfoAvailabilityZoneMappingsItem.availabilityZone + /// + /// + /// Available availability zone + /// Serialized Name: RegionInfoAvailabilityZoneMappingsItem.isAvailable + /// /// Keeps track of any properties unknown to the library. internal AvailabilityZoneMapping(string availabilityZone, bool? isAvailable, IDictionary serializedAdditionalRawData) { @@ -61,9 +70,15 @@ internal AvailabilityZoneMapping(string availabilityZone, bool? isAvailable, IDi _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Logical availability zone. + /// + /// Logical availability zone. + /// Serialized Name: RegionInfoAvailabilityZoneMappingsItem.availabilityZone + /// public string AvailabilityZone { get; set; } - /// Available availability zone. + /// + /// Available availability zone + /// Serialized Name: RegionInfoAvailabilityZoneMappingsItem.isAvailable + /// public bool? IsAvailable { get; set; } } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/BackupPoliciesList.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/BackupPoliciesList.cs index 0825b5e86167..449da694415a 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/BackupPoliciesList.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/BackupPoliciesList.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.NetApp.Models { - /// List of Backup Policies. + /// + /// List of Backup Policies + /// Serialized Name: BackupPoliciesList + /// internal partial class BackupPoliciesList { /// @@ -52,7 +55,10 @@ internal BackupPoliciesList() } /// Initializes a new instance of . - /// A list of backup policies. + /// + /// A list of backup policies + /// Serialized Name: BackupPoliciesList.value + /// /// Keeps track of any properties unknown to the library. internal BackupPoliciesList(IReadOnlyList value, IDictionary serializedAdditionalRawData) { @@ -60,7 +66,10 @@ internal BackupPoliciesList(IReadOnlyList value, IDictio _serializedAdditionalRawData = serializedAdditionalRawData; } - /// A list of backup policies. + /// + /// A list of backup policies + /// Serialized Name: BackupPoliciesList.value + /// public IReadOnlyList Value { get; } } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/BackupVaultsList.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/BackupVaultsList.cs index c2dbf2f7c75e..ab4692357dc3 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/BackupVaultsList.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/BackupVaultsList.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.NetApp.Models { - /// List of Backup Vaults. + /// + /// List of Backup Vaults + /// Serialized Name: BackupVaultsList + /// internal partial class BackupVaultsList { /// @@ -52,8 +55,14 @@ internal BackupVaultsList() } /// Initializes a new instance of . - /// A list of Backup Vaults. - /// URL to get the next set of results. + /// + /// A list of Backup Vaults + /// Serialized Name: BackupVaultsList.value + /// + /// + /// URL to get the next set of results. + /// Serialized Name: BackupVaultsList.nextLink + /// /// Keeps track of any properties unknown to the library. internal BackupVaultsList(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) { @@ -62,9 +71,15 @@ internal BackupVaultsList(IReadOnlyList value, string nex _serializedAdditionalRawData = serializedAdditionalRawData; } - /// A list of Backup Vaults. + /// + /// A list of Backup Vaults + /// Serialized Name: BackupVaultsList.value + /// public IReadOnlyList Value { get; } - /// URL to get the next set of results. + /// + /// URL to get the next set of results. + /// Serialized Name: BackupVaultsList.nextLink + /// public string NextLink { get; } } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/BackupsList.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/BackupsList.cs index 616e6b59c724..380e9b0c8755 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/BackupsList.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/BackupsList.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.NetApp.Models { - /// List of Backups. + /// + /// List of Backups + /// Serialized Name: BackupsList + /// internal partial class BackupsList { /// @@ -52,8 +55,14 @@ internal BackupsList() } /// Initializes a new instance of . - /// A list of Backups. - /// URL to get the next set of results. + /// + /// A list of Backups + /// Serialized Name: BackupsList.value + /// + /// + /// URL to get the next set of results. + /// Serialized Name: BackupsList.nextLink + /// /// Keeps track of any properties unknown to the library. internal BackupsList(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) { @@ -62,9 +71,15 @@ internal BackupsList(IReadOnlyList value, string nextLink, IDi _serializedAdditionalRawData = serializedAdditionalRawData; } - /// A list of Backups. + /// + /// A list of Backups + /// Serialized Name: BackupsList.value + /// public IReadOnlyList Value { get; } - /// URL to get the next set of results. + /// + /// URL to get the next set of results. + /// Serialized Name: BackupsList.nextLink + /// public string NextLink { get; } } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/BackupsMigrationContent.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/BackupsMigrationContent.cs index 03e98b44ecd8..3de8777f71d4 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/BackupsMigrationContent.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/BackupsMigrationContent.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.NetApp.Models { - /// Migrate Backups Request. + /// + /// Migrate Backups Request + /// Serialized Name: BackupsMigrationRequest + /// public partial class BackupsMigrationContent { /// @@ -46,7 +49,10 @@ public partial class BackupsMigrationContent private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// The ResourceId of the Backup Vault. + /// + /// The ResourceId of the Backup Vault + /// Serialized Name: BackupsMigrationRequest.backupVaultId + /// /// is null. public BackupsMigrationContent(string backupVaultId) { @@ -56,7 +62,10 @@ public BackupsMigrationContent(string backupVaultId) } /// Initializes a new instance of . - /// The ResourceId of the Backup Vault. + /// + /// The ResourceId of the Backup Vault + /// Serialized Name: BackupsMigrationRequest.backupVaultId + /// /// Keeps track of any properties unknown to the library. internal BackupsMigrationContent(string backupVaultId, IDictionary serializedAdditionalRawData) { @@ -69,7 +78,10 @@ internal BackupsMigrationContent() { } - /// The ResourceId of the Backup Vault. + /// + /// The ResourceId of the Backup Vault + /// Serialized Name: BackupsMigrationRequest.backupVaultId + /// public string BackupVaultId { get; } } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/CapacityPoolEncryptionType.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/CapacityPoolEncryptionType.cs index b1b843a4398e..b18d90eba0b0 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/CapacityPoolEncryptionType.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/CapacityPoolEncryptionType.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.NetApp.Models { - /// Encryption type of the capacity pool, set encryption type for data at rest for this pool and all volumes in it. This value can only be set when creating new pool. + /// + /// Encryption type of the capacity pool, set encryption type for data at rest for this pool and all volumes in it. This value can only be set when creating new pool. + /// Serialized Name: EncryptionType + /// public readonly partial struct CapacityPoolEncryptionType : IEquatable { private readonly string _value; @@ -25,9 +28,15 @@ public CapacityPoolEncryptionType(string value) private const string SingleValue = "Single"; private const string DoubleValue = "Double"; - /// EncryptionType Single, volumes will use single encryption at rest. + /// + /// EncryptionType Single, volumes will use single encryption at rest + /// Serialized Name: EncryptionType.Single + /// public static CapacityPoolEncryptionType Single { get; } = new CapacityPoolEncryptionType(SingleValue); - /// EncryptionType Double, volumes will use double encryption at rest. + /// + /// EncryptionType Double, volumes will use double encryption at rest + /// Serialized Name: EncryptionType.Double + /// public static CapacityPoolEncryptionType Double { get; } = new CapacityPoolEncryptionType(DoubleValue); /// Determines if two values are the same. public static bool operator ==(CapacityPoolEncryptionType left, CapacityPoolEncryptionType right) => left.Equals(right); diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/CapacityPoolList.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/CapacityPoolList.cs index 64c1fb0af9d2..01c3c69f6c8a 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/CapacityPoolList.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/CapacityPoolList.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.NetApp.Models { - /// List of capacity pool resources. + /// + /// List of capacity pool resources + /// Serialized Name: CapacityPoolList + /// internal partial class CapacityPoolList { /// @@ -52,8 +55,14 @@ internal CapacityPoolList() } /// Initializes a new instance of . - /// List of Capacity pools. - /// URL to get the next set of results. + /// + /// List of Capacity pools + /// Serialized Name: CapacityPoolList.value + /// + /// + /// URL to get the next set of results. + /// Serialized Name: CapacityPoolList.nextLink + /// /// Keeps track of any properties unknown to the library. internal CapacityPoolList(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) { @@ -62,9 +71,15 @@ internal CapacityPoolList(IReadOnlyList value, string nextLink _serializedAdditionalRawData = serializedAdditionalRawData; } - /// List of Capacity pools. + /// + /// List of Capacity pools + /// Serialized Name: CapacityPoolList.value + /// public IReadOnlyList Value { get; } - /// URL to get the next set of results. + /// + /// URL to get the next set of results. + /// Serialized Name: CapacityPoolList.nextLink + /// public string NextLink { get; } } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/CapacityPoolPatch.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/CapacityPoolPatch.cs index 82a1c3f3361b..05dbf54a2e34 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/CapacityPoolPatch.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/CapacityPoolPatch.cs @@ -12,7 +12,10 @@ namespace Azure.ResourceManager.NetApp.Models { - /// Capacity pool patch resource. + /// + /// Capacity pool patch resource + /// Serialized Name: CapacityPoolPatch + /// public partial class CapacityPoolPatch : TrackedResourceData { /// @@ -60,9 +63,18 @@ public CapacityPoolPatch(AzureLocation location) : base(location) /// The systemData. /// The tags. /// The location. - /// Provisioned size of the pool (in bytes). Allowed values are in 1TiB chunks (value must be multiple of 1099511627776). - /// The qos type of the pool. - /// If enabled (true) the pool can contain cool Access enabled volumes. + /// + /// Provisioned size of the pool (in bytes). Allowed values are in 1TiB chunks (value must be multiple of 1099511627776). + /// Serialized Name: CapacityPoolPatch.properties.size + /// + /// + /// The qos type of the pool + /// Serialized Name: CapacityPoolPatch.properties.qosType + /// + /// + /// If enabled (true) the pool can contain cool Access enabled volumes. + /// Serialized Name: CapacityPoolPatch.properties.coolAccess + /// /// Keeps track of any properties unknown to the library. internal CapacityPoolPatch(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, long? size, CapacityPoolQosType? qosType, bool? isCoolAccessEnabled, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { @@ -77,11 +89,20 @@ internal CapacityPoolPatch() { } - /// Provisioned size of the pool (in bytes). Allowed values are in 1TiB chunks (value must be multiple of 1099511627776). + /// + /// Provisioned size of the pool (in bytes). Allowed values are in 1TiB chunks (value must be multiple of 1099511627776). + /// Serialized Name: CapacityPoolPatch.properties.size + /// public long? Size { get; set; } - /// The qos type of the pool. + /// + /// The qos type of the pool + /// Serialized Name: CapacityPoolPatch.properties.qosType + /// public CapacityPoolQosType? QosType { get; set; } - /// If enabled (true) the pool can contain cool Access enabled volumes. + /// + /// If enabled (true) the pool can contain cool Access enabled volumes. + /// Serialized Name: CapacityPoolPatch.properties.coolAccess + /// public bool? IsCoolAccessEnabled { get; set; } } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/CapacityPoolQosType.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/CapacityPoolQosType.cs index 71994c7bcda3..8cb512d75205 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/CapacityPoolQosType.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/CapacityPoolQosType.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.NetApp.Models { - /// The qos type of the pool. + /// + /// The qos type of the pool + /// Serialized Name: QosType + /// public readonly partial struct CapacityPoolQosType : IEquatable { private readonly string _value; @@ -25,9 +28,15 @@ public CapacityPoolQosType(string value) private const string AutoValue = "Auto"; private const string ManualValue = "Manual"; - /// qos type Auto. + /// + /// qos type Auto + /// Serialized Name: QosType.Auto + /// public static CapacityPoolQosType Auto { get; } = new CapacityPoolQosType(AutoValue); - /// qos type Manual. + /// + /// qos type Manual + /// Serialized Name: QosType.Manual + /// public static CapacityPoolQosType Manual { get; } = new CapacityPoolQosType(ManualValue); /// Determines if two values are the same. public static bool operator ==(CapacityPoolQosType left, CapacityPoolQosType right) => left.Equals(right); diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ClusterPeerCommandResult.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ClusterPeerCommandResult.Serialization.cs new file mode 100644 index 000000000000..09bf07a1cba4 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ClusterPeerCommandResult.Serialization.cs @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp.Models +{ + public partial class ClusterPeerCommandResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ClusterPeerCommandResult)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(PeerAcceptCommand)) + { + writer.WritePropertyName("peerAcceptCommand"u8); + writer.WriteStringValue(PeerAcceptCommand); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ClusterPeerCommandResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ClusterPeerCommandResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeClusterPeerCommandResult(document.RootElement, options); + } + + internal static ClusterPeerCommandResult DeserializeClusterPeerCommandResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string peerAcceptCommand = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("peerAcceptCommand"u8)) + { + peerAcceptCommand = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ClusterPeerCommandResult(peerAcceptCommand, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ClusterPeerCommandResult)} does not support writing '{options.Format}' format."); + } + } + + ClusterPeerCommandResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeClusterPeerCommandResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ClusterPeerCommandResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ClusterPeerCommandResult.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ClusterPeerCommandResult.cs new file mode 100644 index 000000000000..8034b2962ea9 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ClusterPeerCommandResult.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// + /// Information about cluster peering process + /// Serialized Name: ClusterPeerCommandResponse + /// + public partial class ClusterPeerCommandResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal ClusterPeerCommandResult() + { + } + + /// Initializes a new instance of . + /// + /// A command that needs to be run on the external ONTAP to accept cluster peering. Will only be present if <code>clusterPeeringStatus</code> is <code>pending</code> + /// Serialized Name: ClusterPeerCommandResponse.peerAcceptCommand + /// + /// Keeps track of any properties unknown to the library. + internal ClusterPeerCommandResult(string peerAcceptCommand, IDictionary serializedAdditionalRawData) + { + PeerAcceptCommand = peerAcceptCommand; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// + /// A command that needs to be run on the external ONTAP to accept cluster peering. Will only be present if <code>clusterPeeringStatus</code> is <code>pending</code> + /// Serialized Name: ClusterPeerCommandResponse.peerAcceptCommand + /// + public string PeerAcceptCommand { get; } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/CoolAccessRetrievalPolicy.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/CoolAccessRetrievalPolicy.cs index e4036665a502..5ef62151c7cb 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/CoolAccessRetrievalPolicy.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/CoolAccessRetrievalPolicy.cs @@ -15,6 +15,7 @@ namespace Azure.ResourceManager.NetApp.Models /// Default - Data will be pulled from cool tier to standard storage on random reads. This policy is the default. /// OnRead - All client-driven data read is pulled from cool tier to standard storage on both sequential and random reads. /// Never - No client-driven data is pulled from cool tier to standard storage. + /// Serialized Name: CoolAccessRetrievalPolicy /// public readonly partial struct CoolAccessRetrievalPolicy : IEquatable { @@ -31,11 +32,20 @@ public CoolAccessRetrievalPolicy(string value) private const string OnReadValue = "OnRead"; private const string NeverValue = "Never"; - /// Default. + /// + /// Default + /// Serialized Name: CoolAccessRetrievalPolicy.Default + /// public static CoolAccessRetrievalPolicy Default { get; } = new CoolAccessRetrievalPolicy(DefaultValue); - /// OnRead. + /// + /// OnRead + /// Serialized Name: CoolAccessRetrievalPolicy.OnRead + /// public static CoolAccessRetrievalPolicy OnRead { get; } = new CoolAccessRetrievalPolicy(OnReadValue); - /// Never. + /// + /// Never + /// Serialized Name: CoolAccessRetrievalPolicy.Never + /// public static CoolAccessRetrievalPolicy Never { get; } = new CoolAccessRetrievalPolicy(NeverValue); /// Determines if two values are the same. public static bool operator ==(CoolAccessRetrievalPolicy left, CoolAccessRetrievalPolicy right) => left.Equals(right); diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/EnableNetAppSubvolume.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/EnableNetAppSubvolume.cs index aa217adbb1bc..94edd4927e56 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/EnableNetAppSubvolume.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/EnableNetAppSubvolume.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.NetApp.Models { - /// Flag indicating whether subvolume operations are enabled on the volume. + /// + /// Flag indicating whether subvolume operations are enabled on the volume + /// Serialized Name: EnableSubvolumes + /// public readonly partial struct EnableNetAppSubvolume : IEquatable { private readonly string _value; @@ -25,9 +28,15 @@ public EnableNetAppSubvolume(string value) private const string EnabledValue = "Enabled"; private const string DisabledValue = "Disabled"; - /// subvolumes are enabled. + /// + /// subvolumes are enabled + /// Serialized Name: EnableSubvolumes.Enabled + /// public static EnableNetAppSubvolume Enabled { get; } = new EnableNetAppSubvolume(EnabledValue); - /// subvolumes are not enabled. + /// + /// subvolumes are not enabled + /// Serialized Name: EnableSubvolumes.Disabled + /// public static EnableNetAppSubvolume Disabled { get; } = new EnableNetAppSubvolume(DisabledValue); /// Determines if two values are the same. public static bool operator ==(EnableNetAppSubvolume left, EnableNetAppSubvolume right) => left.Equals(right); diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/GetGroupIdListForLdapUserContent.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/GetGroupIdListForLdapUserContent.cs index 92a91c974fff..a1dabf91a6dd 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/GetGroupIdListForLdapUserContent.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/GetGroupIdListForLdapUserContent.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.NetApp.Models { - /// Get group Id list for LDAP User request. + /// + /// Get group Id list for LDAP User request + /// Serialized Name: GetGroupIdListForLdapUserRequest + /// public partial class GetGroupIdListForLdapUserContent { /// @@ -46,7 +49,10 @@ public partial class GetGroupIdListForLdapUserContent private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// username is required to fetch the group to which user is part of. + /// + /// username is required to fetch the group to which user is part of + /// Serialized Name: GetGroupIdListForLdapUserRequest.username + /// /// is null. public GetGroupIdListForLdapUserContent(string username) { @@ -56,7 +62,10 @@ public GetGroupIdListForLdapUserContent(string username) } /// Initializes a new instance of . - /// username is required to fetch the group to which user is part of. + /// + /// username is required to fetch the group to which user is part of + /// Serialized Name: GetGroupIdListForLdapUserRequest.username + /// /// Keeps track of any properties unknown to the library. internal GetGroupIdListForLdapUserContent(string username, IDictionary serializedAdditionalRawData) { @@ -69,7 +78,10 @@ internal GetGroupIdListForLdapUserContent() { } - /// username is required to fetch the group to which user is part of. + /// + /// username is required to fetch the group to which user is part of + /// Serialized Name: GetGroupIdListForLdapUserRequest.username + /// public string Username { get; } } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/GetGroupIdListForLdapUserResult.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/GetGroupIdListForLdapUserResult.cs index 294a9686c801..917bc40fc54b 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/GetGroupIdListForLdapUserResult.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/GetGroupIdListForLdapUserResult.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.NetApp.Models { - /// Group Id list for Ldap user. + /// + /// Group Id list for Ldap user + /// Serialized Name: GetGroupIdListForLdapUserResponse + /// public partial class GetGroupIdListForLdapUserResult { /// @@ -52,7 +55,10 @@ internal GetGroupIdListForLdapUserResult() } /// Initializes a new instance of . - /// Group Id list. + /// + /// Group Id list + /// Serialized Name: GetGroupIdListForLdapUserResponse.groupIdsForLdapUser + /// /// Keeps track of any properties unknown to the library. internal GetGroupIdListForLdapUserResult(IReadOnlyList groupIdsForLdapUser, IDictionary serializedAdditionalRawData) { @@ -60,7 +66,10 @@ internal GetGroupIdListForLdapUserResult(IReadOnlyList groupIdsForLdapUs _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Group Id list. + /// + /// Group Id list + /// Serialized Name: GetGroupIdListForLdapUserResponse.groupIdsForLdapUser + /// public IReadOnlyList GroupIdsForLdapUser { get; } } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ListReplications.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ListReplications.cs index 6cfd78de7648..6a79a2659941 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ListReplications.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ListReplications.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.NetApp.Models { - /// List Replications. + /// + /// List Replications + /// Serialized Name: ListReplications + /// internal partial class ListReplications { /// @@ -52,7 +55,10 @@ internal ListReplications() } /// Initializes a new instance of . - /// A list of replications. + /// + /// A list of replications + /// Serialized Name: ListReplications.value + /// /// Keeps track of any properties unknown to the library. internal ListReplications(IReadOnlyList value, IDictionary serializedAdditionalRawData) { @@ -60,7 +66,10 @@ internal ListReplications(IReadOnlyList value, IDiction _serializedAdditionalRawData = serializedAdditionalRawData; } - /// A list of replications. + /// + /// A list of replications + /// Serialized Name: ListReplications.value + /// public IReadOnlyList Value { get; } } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppAccountActiveDirectory.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppAccountActiveDirectory.cs index 5d6bd083b745..5c54c4a8127d 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppAccountActiveDirectory.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppAccountActiveDirectory.cs @@ -11,7 +11,10 @@ namespace Azure.ResourceManager.NetApp.Models { - /// Active Directory. + /// + /// Active Directory + /// Serialized Name: ActiveDirectory + /// public partial class NetAppAccountActiveDirectory { /// @@ -55,29 +58,98 @@ public NetAppAccountActiveDirectory() } /// Initializes a new instance of . - /// Id of the Active Directory. - /// A domain user account with permission to create machine accounts. - /// Plain text password of Active Directory domain administrator, value is masked in the response. - /// Name of the Active Directory domain. - /// Comma separated list of DNS server IP addresses (IPv4 only) for the Active Directory domain. - /// Status of the Active Directory. - /// Any details in regards to the Status of the Active Directory. - /// NetBIOS name of the SMB server. This name will be registered as a computer account in the AD and used to mount volumes. - /// The Organizational Unit (OU) within the Windows Active Directory. - /// The Active Directory site the service will limit Domain Controller discovery to. - /// Users to be added to the Built-in Backup Operator active directory group. A list of unique usernames without domain specifier. - /// Users to be added to the Built-in Administrators active directory group. A list of unique usernames without domain specifier. - /// kdc server IP addresses for the active directory machine. This optional parameter is used only while creating kerberos volume. - /// Name of the active directory machine. This optional parameter is used only while creating kerberos volume. - /// When LDAP over SSL/TLS is enabled, the LDAP client is required to have base64 encoded Active Directory Certificate Service's self-signed root CA certificate, this optional parameter is used only for dual protocol with LDAP user-mapping volumes. - /// If enabled, AES encryption will be enabled for SMB communication. - /// Specifies whether or not the LDAP traffic needs to be signed. - /// Domain Users in the Active directory to be given SeSecurityPrivilege privilege (Needed for SMB Continuously available shares for SQL). A list of unique usernames without domain specifier. - /// Specifies whether or not the LDAP traffic needs to be secured via TLS. - /// If enabled, NFS client local users can also (in addition to LDAP users) access the NFS volumes. - /// If enabled, Traffic between the SMB server to Domain Controller (DC) will be encrypted. - /// LDAP Search scope options. - /// Comma separated list of IPv4 addresses of preferred servers for LDAP client. At most two comma separated IPv4 addresses can be passed. + /// + /// Id of the Active Directory + /// Serialized Name: ActiveDirectory.activeDirectoryId + /// + /// + /// A domain user account with permission to create machine accounts + /// Serialized Name: ActiveDirectory.username + /// + /// + /// Plain text password of Active Directory domain administrator, value is masked in the response + /// Serialized Name: ActiveDirectory.password + /// + /// + /// Name of the Active Directory domain + /// Serialized Name: ActiveDirectory.domain + /// + /// + /// Comma separated list of DNS server IP addresses (IPv4 only) for the Active Directory domain + /// Serialized Name: ActiveDirectory.dns + /// + /// + /// Status of the Active Directory + /// Serialized Name: ActiveDirectory.status + /// + /// + /// Any details in regards to the Status of the Active Directory + /// Serialized Name: ActiveDirectory.statusDetails + /// + /// + /// NetBIOS name of the SMB server. This name will be registered as a computer account in the AD and used to mount volumes + /// Serialized Name: ActiveDirectory.smbServerName + /// + /// + /// The Organizational Unit (OU) within the Windows Active Directory + /// Serialized Name: ActiveDirectory.organizationalUnit + /// + /// + /// The Active Directory site the service will limit Domain Controller discovery to + /// Serialized Name: ActiveDirectory.site + /// + /// + /// Users to be added to the Built-in Backup Operator active directory group. A list of unique usernames without domain specifier + /// Serialized Name: ActiveDirectory.backupOperators + /// + /// + /// Users to be added to the Built-in Administrators active directory group. A list of unique usernames without domain specifier + /// Serialized Name: ActiveDirectory.administrators + /// + /// + /// kdc server IP address for the active directory machine. This optional parameter is used only while creating kerberos volume. + /// Serialized Name: ActiveDirectory.kdcIP + /// + /// + /// Name of the active directory machine. This optional parameter is used only while creating kerberos volume + /// Serialized Name: ActiveDirectory.adName + /// + /// + /// When LDAP over SSL/TLS is enabled, the LDAP client is required to have base64 encoded Active Directory Certificate Service's self-signed root CA certificate, this optional parameter is used only for dual protocol with LDAP user-mapping volumes. + /// Serialized Name: ActiveDirectory.serverRootCACertificate + /// + /// + /// If enabled, AES encryption will be enabled for SMB communication. + /// Serialized Name: ActiveDirectory.aesEncryption + /// + /// + /// Specifies whether or not the LDAP traffic needs to be signed. + /// Serialized Name: ActiveDirectory.ldapSigning + /// + /// + /// Domain Users in the Active directory to be given SeSecurityPrivilege privilege (Needed for SMB Continuously available shares for SQL). A list of unique usernames without domain specifier + /// Serialized Name: ActiveDirectory.securityOperators + /// + /// + /// Specifies whether or not the LDAP traffic needs to be secured via TLS. + /// Serialized Name: ActiveDirectory.ldapOverTLS + /// + /// + /// If enabled, NFS client local users can also (in addition to LDAP users) access the NFS volumes. + /// Serialized Name: ActiveDirectory.allowLocalNfsUsersWithLdap + /// + /// + /// If enabled, Traffic between the SMB server to Domain Controller (DC) will be encrypted. + /// Serialized Name: ActiveDirectory.encryptDCConnections + /// + /// + /// LDAP Search scope options + /// Serialized Name: ActiveDirectory.ldapSearchScope + /// + /// + /// Comma separated list of IPv4 addresses of preferred servers for LDAP client. At most two comma separated IPv4 addresses can be passed. + /// Serialized Name: ActiveDirectory.preferredServersForLdapClient + /// /// Keeps track of any properties unknown to the library. internal NetAppAccountActiveDirectory(string activeDirectoryId, string username, string password, string domain, string dns, NetAppAccountActiveDirectoryStatus? status, string statusDetails, string smbServerName, string organizationalUnit, string site, IList backupOperators, IList administrators, IPAddress kdcIP, string adName, string serverRootCACertificate, bool? isAesEncryptionEnabled, bool? isLdapSigningEnabled, IList securityOperators, bool? isLdapOverTlsEnabled, bool? allowLocalNfsUsersWithLdap, bool? encryptDCConnections, NetAppLdapSearchScopeConfiguration ldapSearchScope, string preferredServersForLdapClient, IDictionary serializedAdditionalRawData) { @@ -107,51 +179,120 @@ internal NetAppAccountActiveDirectory(string activeDirectoryId, string username, _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Id of the Active Directory. + /// + /// Id of the Active Directory + /// Serialized Name: ActiveDirectory.activeDirectoryId + /// public string ActiveDirectoryId { get; set; } - /// A domain user account with permission to create machine accounts. + /// + /// A domain user account with permission to create machine accounts + /// Serialized Name: ActiveDirectory.username + /// public string Username { get; set; } - /// Plain text password of Active Directory domain administrator, value is masked in the response. + /// + /// Plain text password of Active Directory domain administrator, value is masked in the response + /// Serialized Name: ActiveDirectory.password + /// public string Password { get; set; } - /// Name of the Active Directory domain. + /// + /// Name of the Active Directory domain + /// Serialized Name: ActiveDirectory.domain + /// public string Domain { get; set; } - /// Comma separated list of DNS server IP addresses (IPv4 only) for the Active Directory domain. + /// + /// Comma separated list of DNS server IP addresses (IPv4 only) for the Active Directory domain + /// Serialized Name: ActiveDirectory.dns + /// public string Dns { get; set; } - /// Status of the Active Directory. + /// + /// Status of the Active Directory + /// Serialized Name: ActiveDirectory.status + /// public NetAppAccountActiveDirectoryStatus? Status { get; } - /// Any details in regards to the Status of the Active Directory. + /// + /// Any details in regards to the Status of the Active Directory + /// Serialized Name: ActiveDirectory.statusDetails + /// public string StatusDetails { get; } - /// NetBIOS name of the SMB server. This name will be registered as a computer account in the AD and used to mount volumes. + /// + /// NetBIOS name of the SMB server. This name will be registered as a computer account in the AD and used to mount volumes + /// Serialized Name: ActiveDirectory.smbServerName + /// public string SmbServerName { get; set; } - /// The Organizational Unit (OU) within the Windows Active Directory. + /// + /// The Organizational Unit (OU) within the Windows Active Directory + /// Serialized Name: ActiveDirectory.organizationalUnit + /// public string OrganizationalUnit { get; set; } - /// The Active Directory site the service will limit Domain Controller discovery to. + /// + /// The Active Directory site the service will limit Domain Controller discovery to + /// Serialized Name: ActiveDirectory.site + /// public string Site { get; set; } - /// Users to be added to the Built-in Backup Operator active directory group. A list of unique usernames without domain specifier. + /// + /// Users to be added to the Built-in Backup Operator active directory group. A list of unique usernames without domain specifier + /// Serialized Name: ActiveDirectory.backupOperators + /// public IList BackupOperators { get; } - /// Users to be added to the Built-in Administrators active directory group. A list of unique usernames without domain specifier. + /// + /// Users to be added to the Built-in Administrators active directory group. A list of unique usernames without domain specifier + /// Serialized Name: ActiveDirectory.administrators + /// public IList Administrators { get; } - /// kdc server IP addresses for the active directory machine. This optional parameter is used only while creating kerberos volume. + /// + /// kdc server IP address for the active directory machine. This optional parameter is used only while creating kerberos volume. + /// Serialized Name: ActiveDirectory.kdcIP + /// public IPAddress KdcIP { get; set; } - /// Name of the active directory machine. This optional parameter is used only while creating kerberos volume. + /// + /// Name of the active directory machine. This optional parameter is used only while creating kerberos volume + /// Serialized Name: ActiveDirectory.adName + /// public string AdName { get; set; } - /// When LDAP over SSL/TLS is enabled, the LDAP client is required to have base64 encoded Active Directory Certificate Service's self-signed root CA certificate, this optional parameter is used only for dual protocol with LDAP user-mapping volumes. + /// + /// When LDAP over SSL/TLS is enabled, the LDAP client is required to have base64 encoded Active Directory Certificate Service's self-signed root CA certificate, this optional parameter is used only for dual protocol with LDAP user-mapping volumes. + /// Serialized Name: ActiveDirectory.serverRootCACertificate + /// public string ServerRootCACertificate { get; set; } - /// If enabled, AES encryption will be enabled for SMB communication. + /// + /// If enabled, AES encryption will be enabled for SMB communication. + /// Serialized Name: ActiveDirectory.aesEncryption + /// public bool? IsAesEncryptionEnabled { get; set; } - /// Specifies whether or not the LDAP traffic needs to be signed. + /// + /// Specifies whether or not the LDAP traffic needs to be signed. + /// Serialized Name: ActiveDirectory.ldapSigning + /// public bool? IsLdapSigningEnabled { get; set; } - /// Domain Users in the Active directory to be given SeSecurityPrivilege privilege (Needed for SMB Continuously available shares for SQL). A list of unique usernames without domain specifier. + /// + /// Domain Users in the Active directory to be given SeSecurityPrivilege privilege (Needed for SMB Continuously available shares for SQL). A list of unique usernames without domain specifier + /// Serialized Name: ActiveDirectory.securityOperators + /// public IList SecurityOperators { get; } - /// Specifies whether or not the LDAP traffic needs to be secured via TLS. + /// + /// Specifies whether or not the LDAP traffic needs to be secured via TLS. + /// Serialized Name: ActiveDirectory.ldapOverTLS + /// public bool? IsLdapOverTlsEnabled { get; set; } - /// If enabled, NFS client local users can also (in addition to LDAP users) access the NFS volumes. + /// + /// If enabled, NFS client local users can also (in addition to LDAP users) access the NFS volumes. + /// Serialized Name: ActiveDirectory.allowLocalNfsUsersWithLdap + /// public bool? AllowLocalNfsUsersWithLdap { get; set; } - /// If enabled, Traffic between the SMB server to Domain Controller (DC) will be encrypted. + /// + /// If enabled, Traffic between the SMB server to Domain Controller (DC) will be encrypted. + /// Serialized Name: ActiveDirectory.encryptDCConnections + /// public bool? EncryptDCConnections { get; set; } - /// LDAP Search scope options. + /// + /// LDAP Search scope options + /// Serialized Name: ActiveDirectory.ldapSearchScope + /// public NetAppLdapSearchScopeConfiguration LdapSearchScope { get; set; } - /// Comma separated list of IPv4 addresses of preferred servers for LDAP client. At most two comma separated IPv4 addresses can be passed. + /// + /// Comma separated list of IPv4 addresses of preferred servers for LDAP client. At most two comma separated IPv4 addresses can be passed. + /// Serialized Name: ActiveDirectory.preferredServersForLdapClient + /// public string PreferredServersForLdapClient { get; set; } } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppAccountActiveDirectoryStatus.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppAccountActiveDirectoryStatus.cs index 8f37db242eb0..b8cc103a9bde 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppAccountActiveDirectoryStatus.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppAccountActiveDirectoryStatus.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.NetApp.Models { - /// Status of the Active Directory. + /// + /// Status of the Active Directory + /// Serialized Name: ActiveDirectoryStatus + /// public readonly partial struct NetAppAccountActiveDirectoryStatus : IEquatable { private readonly string _value; @@ -28,15 +31,30 @@ public NetAppAccountActiveDirectoryStatus(string value) private const string ErrorValue = "Error"; private const string UpdatingValue = "Updating"; - /// Active Directory created but not in use. + /// + /// Active Directory created but not in use + /// Serialized Name: ActiveDirectoryStatus.Created + /// public static NetAppAccountActiveDirectoryStatus Created { get; } = new NetAppAccountActiveDirectoryStatus(CreatedValue); - /// Active Directory in use by SMB Volume. + /// + /// Active Directory in use by SMB Volume + /// Serialized Name: ActiveDirectoryStatus.InUse + /// public static NetAppAccountActiveDirectoryStatus InUse { get; } = new NetAppAccountActiveDirectoryStatus(InUseValue); - /// Active Directory Deleted. + /// + /// Active Directory Deleted + /// Serialized Name: ActiveDirectoryStatus.Deleted + /// public static NetAppAccountActiveDirectoryStatus Deleted { get; } = new NetAppAccountActiveDirectoryStatus(DeletedValue); - /// Error with the Active Directory. + /// + /// Error with the Active Directory + /// Serialized Name: ActiveDirectoryStatus.Error + /// public static NetAppAccountActiveDirectoryStatus Error { get; } = new NetAppAccountActiveDirectoryStatus(ErrorValue); - /// Active Directory Updating. + /// + /// Active Directory Updating + /// Serialized Name: ActiveDirectoryStatus.Updating + /// public static NetAppAccountActiveDirectoryStatus Updating { get; } = new NetAppAccountActiveDirectoryStatus(UpdatingValue); /// Determines if two values are the same. public static bool operator ==(NetAppAccountActiveDirectoryStatus left, NetAppAccountActiveDirectoryStatus right) => left.Equals(right); diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppAccountEncryption.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppAccountEncryption.cs index b5a2ed87f6f5..a641ed0709aa 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppAccountEncryption.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppAccountEncryption.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.NetApp.Models { - /// Encryption settings. + /// + /// Encryption settings + /// Serialized Name: AccountEncryption + /// public partial class NetAppAccountEncryption { /// @@ -51,9 +54,18 @@ public NetAppAccountEncryption() } /// Initializes a new instance of . - /// The encryption keySource (provider). Possible values (case-insensitive): Microsoft.NetApp, Microsoft.KeyVault. - /// Properties provided by KeVault. Applicable if keySource is 'Microsoft.KeyVault'. - /// Identity used to authenticate to KeyVault. Applicable if keySource is 'Microsoft.KeyVault'. + /// + /// The encryption keySource (provider). Possible values (case-insensitive): Microsoft.NetApp, Microsoft.KeyVault + /// Serialized Name: AccountEncryption.keySource + /// + /// + /// Properties provided by KeVault. Applicable if keySource is 'Microsoft.KeyVault'. + /// Serialized Name: AccountEncryption.keyVaultProperties + /// + /// + /// Identity used to authenticate to KeyVault. Applicable if keySource is 'Microsoft.KeyVault'. + /// Serialized Name: AccountEncryption.identity + /// /// Keeps track of any properties unknown to the library. internal NetAppAccountEncryption(NetAppKeySource? keySource, NetAppKeyVaultProperties keyVaultProperties, NetAppEncryptionIdentity identity, IDictionary serializedAdditionalRawData) { @@ -63,11 +75,20 @@ internal NetAppAccountEncryption(NetAppKeySource? keySource, NetAppKeyVaultPrope _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The encryption keySource (provider). Possible values (case-insensitive): Microsoft.NetApp, Microsoft.KeyVault. + /// + /// The encryption keySource (provider). Possible values (case-insensitive): Microsoft.NetApp, Microsoft.KeyVault + /// Serialized Name: AccountEncryption.keySource + /// public NetAppKeySource? KeySource { get; set; } - /// Properties provided by KeVault. Applicable if keySource is 'Microsoft.KeyVault'. + /// + /// Properties provided by KeVault. Applicable if keySource is 'Microsoft.KeyVault'. + /// Serialized Name: AccountEncryption.keyVaultProperties + /// public NetAppKeyVaultProperties KeyVaultProperties { get; set; } - /// Identity used to authenticate to KeyVault. Applicable if keySource is 'Microsoft.KeyVault'. + /// + /// Identity used to authenticate to KeyVault. Applicable if keySource is 'Microsoft.KeyVault'. + /// Serialized Name: AccountEncryption.identity + /// public NetAppEncryptionIdentity Identity { get; set; } } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppAccountList.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppAccountList.cs index 681b09a1f71e..e6ffcb9fa966 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppAccountList.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppAccountList.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.NetApp.Models { - /// List of NetApp account resources. + /// + /// List of NetApp account resources + /// Serialized Name: NetAppAccountList + /// internal partial class NetAppAccountList { /// @@ -52,8 +55,14 @@ internal NetAppAccountList() } /// Initializes a new instance of . - /// Multiple NetApp accounts. - /// URL to get the next set of results. + /// + /// Multiple NetApp accounts + /// Serialized Name: NetAppAccountList.value + /// + /// + /// URL to get the next set of results. + /// Serialized Name: NetAppAccountList.nextLink + /// /// Keeps track of any properties unknown to the library. internal NetAppAccountList(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) { @@ -62,9 +71,15 @@ internal NetAppAccountList(IReadOnlyList value, string nextLi _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Multiple NetApp accounts. + /// + /// Multiple NetApp accounts + /// Serialized Name: NetAppAccountList.value + /// public IReadOnlyList Value { get; } - /// URL to get the next set of results. + /// + /// URL to get the next set of results. + /// Serialized Name: NetAppAccountList.nextLink + /// public string NextLink { get; } } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppAccountPatch.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppAccountPatch.cs index 12a4a64f658e..5c254146a083 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppAccountPatch.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppAccountPatch.cs @@ -12,7 +12,10 @@ namespace Azure.ResourceManager.NetApp.Models { - /// NetApp account patch resource. + /// + /// NetApp account patch resource + /// Serialized Name: NetAppAccountPatch + /// public partial class NetAppAccountPatch : TrackedResourceData { /// @@ -61,11 +64,26 @@ public NetAppAccountPatch(AzureLocation location) : base(location) /// The systemData. /// The tags. /// The location. - /// The identity used for the resource. - /// Azure lifecycle management. - /// Active Directories. - /// Encryption settings. - /// Shows the status of disableShowmount for all volumes under the subscription, null equals false. + /// + /// The identity used for the resource. + /// Serialized Name: NetAppAccountPatch.identity + /// + /// + /// Azure lifecycle management + /// Serialized Name: NetAppAccountPatch.properties.provisioningState + /// + /// + /// Active Directories + /// Serialized Name: NetAppAccountPatch.properties.activeDirectories + /// + /// + /// Encryption settings + /// Serialized Name: NetAppAccountPatch.properties.encryption + /// + /// + /// Shows the status of disableShowmount for all volumes under the subscription, null equals false + /// Serialized Name: NetAppAccountPatch.properties.disableShowmount + /// /// Keeps track of any properties unknown to the library. internal NetAppAccountPatch(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity identity, string provisioningState, IList activeDirectories, NetAppAccountEncryption encryption, bool? disableShowmount, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { @@ -82,15 +100,30 @@ internal NetAppAccountPatch() { } - /// The identity used for the resource. + /// + /// The identity used for the resource. + /// Serialized Name: NetAppAccountPatch.identity + /// public ManagedServiceIdentity Identity { get; set; } - /// Azure lifecycle management. + /// + /// Azure lifecycle management + /// Serialized Name: NetAppAccountPatch.properties.provisioningState + /// public string ProvisioningState { get; } - /// Active Directories. + /// + /// Active Directories + /// Serialized Name: NetAppAccountPatch.properties.activeDirectories + /// public IList ActiveDirectories { get; } - /// Encryption settings. + /// + /// Encryption settings + /// Serialized Name: NetAppAccountPatch.properties.encryption + /// public NetAppAccountEncryption Encryption { get; set; } - /// Shows the status of disableShowmount for all volumes under the subscription, null equals false. + /// + /// Shows the status of disableShowmount for all volumes under the subscription, null equals false + /// Serialized Name: NetAppAccountPatch.properties.disableShowmount + /// public bool? DisableShowmount { get; } } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppApplicationType.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppApplicationType.cs index b297dd5ebfd6..a8e885cc8428 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppApplicationType.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppApplicationType.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.NetApp.Models { - /// Application Type. + /// + /// Application Type + /// Serialized Name: ApplicationType + /// public readonly partial struct NetAppApplicationType : IEquatable { private readonly string _value; @@ -25,9 +28,15 @@ public NetAppApplicationType(string value) private const string SapHanaValue = "SAP-HANA"; private const string OracleValue = "ORACLE"; - /// SAP-HANA. + /// + /// SAP-HANA + /// Serialized Name: ApplicationType.SAP-HANA + /// public static NetAppApplicationType SapHana { get; } = new NetAppApplicationType(SapHanaValue); - /// ORACLE. + /// + /// ORACLE + /// Serialized Name: ApplicationType.ORACLE + /// public static NetAppApplicationType Oracle { get; } = new NetAppApplicationType(OracleValue); /// Determines if two values are the same. public static bool operator ==(NetAppApplicationType left, NetAppApplicationType right) => left.Equals(right); diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppAvsDataStore.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppAvsDataStore.cs index e54f4557bfaa..d743bf15679a 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppAvsDataStore.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppAvsDataStore.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.NetApp.Models { - /// Specifies whether the volume is enabled for Azure VMware Solution (AVS) datastore purpose. + /// + /// Specifies whether the volume is enabled for Azure VMware Solution (AVS) datastore purpose + /// Serialized Name: AvsDataStore + /// public readonly partial struct NetAppAvsDataStore : IEquatable { private readonly string _value; @@ -25,9 +28,15 @@ public NetAppAvsDataStore(string value) private const string EnabledValue = "Enabled"; private const string DisabledValue = "Disabled"; - /// avsDataStore is enabled. + /// + /// avsDataStore is enabled + /// Serialized Name: AvsDataStore.Enabled + /// public static NetAppAvsDataStore Enabled { get; } = new NetAppAvsDataStore(EnabledValue); - /// avsDataStore is disabled. + /// + /// avsDataStore is disabled + /// Serialized Name: AvsDataStore.Disabled + /// public static NetAppAvsDataStore Disabled { get; } = new NetAppAvsDataStore(DisabledValue); /// Determines if two values are the same. public static bool operator ==(NetAppAvsDataStore left, NetAppAvsDataStore right) => left.Equals(right); diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppBackupPolicyPatch.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppBackupPolicyPatch.cs index a1138b5df17e..2b48567fb37c 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppBackupPolicyPatch.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppBackupPolicyPatch.cs @@ -12,7 +12,10 @@ namespace Azure.ResourceManager.NetApp.Models { - /// Backup policy Details for create and update. + /// + /// Backup policy Details for create and update + /// Serialized Name: BackupPolicyPatch + /// public partial class NetAppBackupPolicyPatch : TrackedResourceData { /// @@ -61,14 +64,38 @@ public NetAppBackupPolicyPatch(AzureLocation location) : base(location) /// The systemData. /// The tags. /// The location. - /// Backup Policy Resource ID. - /// Azure lifecycle management. - /// Daily backups count to keep. - /// Weekly backups count to keep. - /// Monthly backups count to keep. - /// Volumes using current backup policy. - /// The property to decide policy is enabled or not. - /// A list of volumes assigned to this policy. + /// + /// Backup Policy GUID ID + /// Serialized Name: BackupPolicyPatch.properties.backupPolicyId + /// + /// + /// Azure lifecycle management + /// Serialized Name: BackupPolicyPatch.properties.provisioningState + /// + /// + /// Daily backups count to keep + /// Serialized Name: BackupPolicyPatch.properties.dailyBackupsToKeep + /// + /// + /// Weekly backups count to keep + /// Serialized Name: BackupPolicyPatch.properties.weeklyBackupsToKeep + /// + /// + /// Monthly backups count to keep + /// Serialized Name: BackupPolicyPatch.properties.monthlyBackupsToKeep + /// + /// + /// Volumes using current backup policy + /// Serialized Name: BackupPolicyPatch.properties.volumesAssigned + /// + /// + /// The property to decide policy is enabled or not + /// Serialized Name: BackupPolicyPatch.properties.enabled + /// + /// + /// A list of volumes assigned to this policy + /// Serialized Name: BackupPolicyPatch.properties.volumeBackups + /// /// Keeps track of any properties unknown to the library. internal NetAppBackupPolicyPatch(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ResourceIdentifier backupPolicyId, string provisioningState, int? dailyBackupsToKeep, int? weeklyBackupsToKeep, int? monthlyBackupsToKeep, int? volumesAssigned, bool? isEnabled, IReadOnlyList volumeBackups, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { @@ -88,21 +115,45 @@ internal NetAppBackupPolicyPatch() { } - /// Backup Policy Resource ID. + /// + /// Backup Policy GUID ID + /// Serialized Name: BackupPolicyPatch.properties.backupPolicyId + /// public ResourceIdentifier BackupPolicyId { get; } - /// Azure lifecycle management. + /// + /// Azure lifecycle management + /// Serialized Name: BackupPolicyPatch.properties.provisioningState + /// public string ProvisioningState { get; } - /// Daily backups count to keep. + /// + /// Daily backups count to keep + /// Serialized Name: BackupPolicyPatch.properties.dailyBackupsToKeep + /// public int? DailyBackupsToKeep { get; set; } - /// Weekly backups count to keep. + /// + /// Weekly backups count to keep + /// Serialized Name: BackupPolicyPatch.properties.weeklyBackupsToKeep + /// public int? WeeklyBackupsToKeep { get; set; } - /// Monthly backups count to keep. + /// + /// Monthly backups count to keep + /// Serialized Name: BackupPolicyPatch.properties.monthlyBackupsToKeep + /// public int? MonthlyBackupsToKeep { get; set; } - /// Volumes using current backup policy. + /// + /// Volumes using current backup policy + /// Serialized Name: BackupPolicyPatch.properties.volumesAssigned + /// public int? VolumesAssigned { get; } - /// The property to decide policy is enabled or not. + /// + /// The property to decide policy is enabled or not + /// Serialized Name: BackupPolicyPatch.properties.enabled + /// public bool? IsEnabled { get; set; } - /// A list of volumes assigned to this policy. + /// + /// A list of volumes assigned to this policy + /// Serialized Name: BackupPolicyPatch.properties.volumeBackups + /// public IReadOnlyList VolumeBackups { get; } } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppBackupType.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppBackupType.cs index 7869e20d2d3b..adbab7f55227 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppBackupType.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppBackupType.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.NetApp.Models { - /// Type of backup Manual or Scheduled. + /// + /// Type of backup Manual or Scheduled + /// Serialized Name: BackupType + /// public readonly partial struct NetAppBackupType : IEquatable { private readonly string _value; @@ -25,9 +28,15 @@ public NetAppBackupType(string value) private const string ManualValue = "Manual"; private const string ScheduledValue = "Scheduled"; - /// Manual backup. + /// + /// Manual backup + /// Serialized Name: BackupType.Manual + /// public static NetAppBackupType Manual { get; } = new NetAppBackupType(ManualValue); - /// Scheduled backup. + /// + /// Scheduled backup + /// Serialized Name: BackupType.Scheduled + /// public static NetAppBackupType Scheduled { get; } = new NetAppBackupType(ScheduledValue); /// Determines if two values are the same. public static bool operator ==(NetAppBackupType left, NetAppBackupType right) => left.Equals(right); diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppBackupVaultBackupPatch.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppBackupVaultBackupPatch.cs index 2f252d764d79..38315fed65c2 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppBackupVaultBackupPatch.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppBackupVaultBackupPatch.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.NetApp.Models { - /// Backup patch. + /// + /// Backup patch + /// Serialized Name: BackupPatch + /// public partial class NetAppBackupVaultBackupPatch { /// @@ -51,7 +54,10 @@ public NetAppBackupVaultBackupPatch() } /// Initializes a new instance of . - /// Label for backup. + /// + /// Label for backup + /// Serialized Name: BackupPatch.properties.label + /// /// Keeps track of any properties unknown to the library. internal NetAppBackupVaultBackupPatch(string label, IDictionary serializedAdditionalRawData) { @@ -59,7 +65,10 @@ internal NetAppBackupVaultBackupPatch(string label, IDictionary Label for backup. + /// + /// Label for backup + /// Serialized Name: BackupPatch.properties.label + /// public string Label { get; set; } } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppBackupVaultPatch.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppBackupVaultPatch.cs index 1816a5b66afe..421524470e3d 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppBackupVaultPatch.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppBackupVaultPatch.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.NetApp.Models { - /// Backup Vault information. + /// + /// Backup Vault information + /// Serialized Name: BackupVaultPatch + /// public partial class NetAppBackupVaultPatch { /// @@ -52,7 +55,10 @@ public NetAppBackupVaultPatch() } /// Initializes a new instance of . - /// Resource tags. + /// + /// Resource tags + /// Serialized Name: BackupVaultPatch.tags + /// /// Keeps track of any properties unknown to the library. internal NetAppBackupVaultPatch(IDictionary tags, IDictionary serializedAdditionalRawData) { @@ -60,7 +66,10 @@ internal NetAppBackupVaultPatch(IDictionary tags, IDictionary Resource tags. + /// + /// Resource tags + /// Serialized Name: BackupVaultPatch.tags + /// public IDictionary Tags { get; } } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppCheckAvailabilityResult.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppCheckAvailabilityResult.cs index 5f0f8e0bf81b..9e01d6256e6b 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppCheckAvailabilityResult.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppCheckAvailabilityResult.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.NetApp.Models { - /// Information regarding availability of a resource. + /// + /// Information regarding availability of a resource. + /// Serialized Name: CheckAvailabilityResponse + /// public partial class NetAppCheckAvailabilityResult { /// @@ -51,9 +54,18 @@ internal NetAppCheckAvailabilityResult() } /// Initializes a new instance of . - /// <code>true</code> indicates name is valid and available. <code>false</code> indicates the name is invalid, unavailable, or both. - /// <code>Invalid</code> indicates the name provided does not match Azure App Service naming requirements. <code>AlreadyExists</code> indicates that the name is already in use and is therefore unavailable. - /// If reason == invalid, provide the user with the reason why the given name is invalid, and provide the resource naming requirements so that the user can select a valid name. If reason == AlreadyExists, explain that resource name is already in use, and direct them to select a different name. + /// + /// <code>true</code> indicates name is valid and available. <code>false</code> indicates the name is invalid, unavailable, or both. + /// Serialized Name: CheckAvailabilityResponse.isAvailable + /// + /// + /// <code>Invalid</code> indicates the name provided does not match Azure App Service naming requirements. <code>AlreadyExists</code> indicates that the name is already in use and is therefore unavailable. + /// Serialized Name: CheckAvailabilityResponse.reason + /// + /// + /// If reason == invalid, provide the user with the reason why the given name is invalid, and provide the resource naming requirements so that the user can select a valid name. If reason == AlreadyExists, explain that resource name is already in use, and direct them to select a different name. + /// Serialized Name: CheckAvailabilityResponse.message + /// /// Keeps track of any properties unknown to the library. internal NetAppCheckAvailabilityResult(bool? isAvailable, NetAppNameUnavailableReason? reason, string message, IDictionary serializedAdditionalRawData) { @@ -63,11 +75,20 @@ internal NetAppCheckAvailabilityResult(bool? isAvailable, NetAppNameUnavailableR _serializedAdditionalRawData = serializedAdditionalRawData; } - /// <code>true</code> indicates name is valid and available. <code>false</code> indicates the name is invalid, unavailable, or both. + /// + /// <code>true</code> indicates name is valid and available. <code>false</code> indicates the name is invalid, unavailable, or both. + /// Serialized Name: CheckAvailabilityResponse.isAvailable + /// public bool? IsAvailable { get; } - /// <code>Invalid</code> indicates the name provided does not match Azure App Service naming requirements. <code>AlreadyExists</code> indicates that the name is already in use and is therefore unavailable. + /// + /// <code>Invalid</code> indicates the name provided does not match Azure App Service naming requirements. <code>AlreadyExists</code> indicates that the name is already in use and is therefore unavailable. + /// Serialized Name: CheckAvailabilityResponse.reason + /// public NetAppNameUnavailableReason? Reason { get; } - /// If reason == invalid, provide the user with the reason why the given name is invalid, and provide the resource naming requirements so that the user can select a valid name. If reason == AlreadyExists, explain that resource name is already in use, and direct them to select a different name. + /// + /// If reason == invalid, provide the user with the reason why the given name is invalid, and provide the resource naming requirements so that the user can select a valid name. If reason == AlreadyExists, explain that resource name is already in use, and direct them to select a different name. + /// Serialized Name: CheckAvailabilityResponse.message + /// public string Message { get; } } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppChownMode.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppChownMode.cs index b55f26f7902a..628f5a2ab763 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppChownMode.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppChownMode.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.NetApp.Models { - /// This parameter specifies who is authorized to change the ownership of a file. restricted - Only root user can change the ownership of the file. unrestricted - Non-root users can change ownership of files that they own. + /// + /// This parameter specifies who is authorized to change the ownership of a file. restricted - Only root user can change the ownership of the file. unrestricted - Non-root users can change ownership of files that they own. + /// Serialized Name: ChownMode + /// public readonly partial struct NetAppChownMode : IEquatable { private readonly string _value; @@ -25,9 +28,15 @@ public NetAppChownMode(string value) private const string RestrictedValue = "Restricted"; private const string UnrestrictedValue = "Unrestricted"; - /// Restricted. + /// + /// Restricted + /// Serialized Name: ChownMode.Restricted + /// public static NetAppChownMode Restricted { get; } = new NetAppChownMode(RestrictedValue); - /// Unrestricted. + /// + /// Unrestricted + /// Serialized Name: ChownMode.Unrestricted + /// public static NetAppChownMode Unrestricted { get; } = new NetAppChownMode(UnrestrictedValue); /// Determines if two values are the same. public static bool operator ==(NetAppChownMode left, NetAppChownMode right) => left.Equals(right); diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppEncryptionIdentity.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppEncryptionIdentity.cs index cca97322148a..9694a70b1a45 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppEncryptionIdentity.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppEncryptionIdentity.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.NetApp.Models { - /// Identity used to authenticate with key vault. + /// + /// Identity used to authenticate with key vault. + /// Serialized Name: EncryptionIdentity + /// public partial class NetAppEncryptionIdentity { /// @@ -51,8 +54,14 @@ public NetAppEncryptionIdentity() } /// Initializes a new instance of . - /// The principal ID (object ID) of the identity used to authenticate with key vault. Read-only. - /// The ARM resource identifier of the user assigned identity used to authenticate with key vault. Applicable if identity.type has 'UserAssigned'. It should match key of identity.userAssignedIdentities. + /// + /// The principal ID (object ID) of the identity used to authenticate with key vault. Read-only. + /// Serialized Name: EncryptionIdentity.principalId + /// + /// + /// The ARM resource identifier of the user assigned identity used to authenticate with key vault. Applicable if identity.type has 'UserAssigned'. It should match key of identity.userAssignedIdentities. + /// Serialized Name: EncryptionIdentity.userAssignedIdentity + /// /// Keeps track of any properties unknown to the library. internal NetAppEncryptionIdentity(string principalId, string userAssignedIdentity, IDictionary serializedAdditionalRawData) { @@ -61,9 +70,15 @@ internal NetAppEncryptionIdentity(string principalId, string userAssignedIdentit _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The principal ID (object ID) of the identity used to authenticate with key vault. Read-only. + /// + /// The principal ID (object ID) of the identity used to authenticate with key vault. Read-only. + /// Serialized Name: EncryptionIdentity.principalId + /// public string PrincipalId { get; } - /// The ARM resource identifier of the user assigned identity used to authenticate with key vault. Applicable if identity.type has 'UserAssigned'. It should match key of identity.userAssignedIdentities. + /// + /// The ARM resource identifier of the user assigned identity used to authenticate with key vault. Applicable if identity.type has 'UserAssigned'. It should match key of identity.userAssignedIdentities. + /// Serialized Name: EncryptionIdentity.userAssignedIdentity + /// public string UserAssignedIdentity { get; set; } } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppEncryptionKeySource.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppEncryptionKeySource.cs index d92194bc74b4..bfca5fcb314a 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppEncryptionKeySource.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppEncryptionKeySource.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.NetApp.Models { - /// Source of key used to encrypt data in volume. Applicable if NetApp account has encryption.keySource = 'Microsoft.KeyVault'. Possible values (case-insensitive) are: 'Microsoft.NetApp, Microsoft.KeyVault'. + /// + /// Source of key used to encrypt data in volume. Applicable if NetApp account has encryption.keySource = 'Microsoft.KeyVault'. Possible values (case-insensitive) are: 'Microsoft.NetApp, Microsoft.KeyVault' + /// Serialized Name: EncryptionKeySource + /// public readonly partial struct NetAppEncryptionKeySource : IEquatable { private readonly string _value; @@ -25,9 +28,15 @@ public NetAppEncryptionKeySource(string value) private const string MicrosoftNetAppValue = "Microsoft.NetApp"; private const string MicrosoftKeyVaultValue = "Microsoft.KeyVault"; - /// Microsoft-managed key encryption. + /// + /// Microsoft-managed key encryption + /// Serialized Name: EncryptionKeySource.Microsoft.NetApp + /// public static NetAppEncryptionKeySource MicrosoftNetApp { get; } = new NetAppEncryptionKeySource(MicrosoftNetAppValue); - /// Customer-managed key encryption. + /// + /// Customer-managed key encryption + /// Serialized Name: EncryptionKeySource.Microsoft.KeyVault + /// public static NetAppEncryptionKeySource MicrosoftKeyVault { get; } = new NetAppEncryptionKeySource(MicrosoftKeyVaultValue); /// Determines if two values are the same. public static bool operator ==(NetAppEncryptionKeySource left, NetAppEncryptionKeySource right) => left.Equals(right); diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppEndpointType.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppEndpointType.cs index b6288a94dd57..37ef9bea316b 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppEndpointType.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppEndpointType.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.NetApp.Models { - /// Indicates whether the local volume is the source or destination for the Volume Replication. + /// + /// Indicates whether the local volume is the source or destination for the Volume Replication + /// Serialized Name: EndpointType + /// public readonly partial struct NetAppEndpointType : IEquatable { private readonly string _value; @@ -25,9 +28,15 @@ public NetAppEndpointType(string value) private const string SourceValue = "src"; private const string DestinationValue = "dst"; - /// src. + /// + /// src + /// Serialized Name: EndpointType.src + /// public static NetAppEndpointType Source { get; } = new NetAppEndpointType(SourceValue); - /// dst. + /// + /// dst + /// Serialized Name: EndpointType.dst + /// public static NetAppEndpointType Destination { get; } = new NetAppEndpointType(DestinationValue); /// Determines if two values are the same. public static bool operator ==(NetAppEndpointType left, NetAppEndpointType right) => left.Equals(right); diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppFileAccessLog.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppFileAccessLog.cs index f30febad8cb1..3240afdc9364 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppFileAccessLog.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppFileAccessLog.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.NetApp.Models { - /// Flag indicating whether file access logs are enabled for the volume, based on active diagnostic settings present on the volume. + /// + /// Flag indicating whether file access logs are enabled for the volume, based on active diagnostic settings present on the volume. + /// Serialized Name: FileAccessLogs + /// public readonly partial struct NetAppFileAccessLog : IEquatable { private readonly string _value; @@ -25,9 +28,15 @@ public NetAppFileAccessLog(string value) private const string EnabledValue = "Enabled"; private const string DisabledValue = "Disabled"; - /// fileAccessLogs are enabled. + /// + /// fileAccessLogs are enabled + /// Serialized Name: FileAccessLogs.Enabled + /// public static NetAppFileAccessLog Enabled { get; } = new NetAppFileAccessLog(EnabledValue); - /// fileAccessLogs are not enabled. + /// + /// fileAccessLogs are not enabled + /// Serialized Name: FileAccessLogs.Disabled + /// public static NetAppFileAccessLog Disabled { get; } = new NetAppFileAccessLog(DisabledValue); /// Determines if two values are the same. public static bool operator ==(NetAppFileAccessLog left, NetAppFileAccessLog right) => left.Equals(right); diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppFilePathAvailabilityContent.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppFilePathAvailabilityContent.Serialization.cs index 93d14f2fcc92..53a19df9ea47 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppFilePathAvailabilityContent.Serialization.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppFilePathAvailabilityContent.Serialization.cs @@ -38,6 +38,18 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStringValue(Name); writer.WritePropertyName("subnetId"u8); writer.WriteStringValue(SubnetId); + if (Optional.IsDefined(AvailabilityZone)) + { + if (AvailabilityZone != null) + { + writer.WritePropertyName("availabilityZone"u8); + writer.WriteStringValue(AvailabilityZone); + } + else + { + writer.WriteNull("availabilityZone"); + } + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -77,6 +89,7 @@ internal static NetAppFilePathAvailabilityContent DeserializeNetAppFilePathAvail } string name = default; ResourceIdentifier subnetId = default; + string availabilityZone = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -91,13 +104,23 @@ internal static NetAppFilePathAvailabilityContent DeserializeNetAppFilePathAvail subnetId = new ResourceIdentifier(property.Value.GetString()); continue; } + if (property.NameEquals("availabilityZone"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + availabilityZone = null; + continue; + } + availabilityZone = property.Value.GetString(); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new NetAppFilePathAvailabilityContent(name, subnetId, serializedAdditionalRawData); + return new NetAppFilePathAvailabilityContent(name, subnetId, availabilityZone, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppFilePathAvailabilityContent.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppFilePathAvailabilityContent.cs index bcdc08ecbbb9..db6a5df6e941 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppFilePathAvailabilityContent.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppFilePathAvailabilityContent.cs @@ -11,7 +11,10 @@ namespace Azure.ResourceManager.NetApp.Models { - /// File path availability request content - availability is based on the name and the subnetId. + /// + /// File path availability request content - availability is based on the name and the subnetId. + /// Serialized Name: FilePathAvailabilityRequest + /// public partial class NetAppFilePathAvailabilityContent { /// @@ -47,8 +50,14 @@ public partial class NetAppFilePathAvailabilityContent private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// File path to verify. - /// The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes. + /// + /// File path to verify. + /// Serialized Name: FilePathAvailabilityRequest.name + /// + /// + /// The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes + /// Serialized Name: FilePathAvailabilityRequest.subnetId + /// /// or is null. public NetAppFilePathAvailabilityContent(string name, ResourceIdentifier subnetId) { @@ -60,13 +69,24 @@ public NetAppFilePathAvailabilityContent(string name, ResourceIdentifier subnetI } /// Initializes a new instance of . - /// File path to verify. - /// The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes. + /// + /// File path to verify. + /// Serialized Name: FilePathAvailabilityRequest.name + /// + /// + /// The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes + /// Serialized Name: FilePathAvailabilityRequest.subnetId + /// + /// + /// The Azure Resource logical availability zone which is used within zone mapping lookup for the subscription and region. The lookup will retrieve the physical zone where volume is placed. + /// Serialized Name: FilePathAvailabilityRequest.availabilityZone + /// /// Keeps track of any properties unknown to the library. - internal NetAppFilePathAvailabilityContent(string name, ResourceIdentifier subnetId, IDictionary serializedAdditionalRawData) + internal NetAppFilePathAvailabilityContent(string name, ResourceIdentifier subnetId, string availabilityZone, IDictionary serializedAdditionalRawData) { Name = name; SubnetId = subnetId; + AvailabilityZone = availabilityZone; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -75,9 +95,20 @@ internal NetAppFilePathAvailabilityContent() { } - /// File path to verify. + /// + /// File path to verify. + /// Serialized Name: FilePathAvailabilityRequest.name + /// public string Name { get; } - /// The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes. + /// + /// The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes + /// Serialized Name: FilePathAvailabilityRequest.subnetId + /// public ResourceIdentifier SubnetId { get; } + /// + /// The Azure Resource logical availability zone which is used within zone mapping lookup for the subscription and region. The lookup will retrieve the physical zone where volume is placed. + /// Serialized Name: FilePathAvailabilityRequest.availabilityZone + /// + public string AvailabilityZone { get; set; } } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppFileServiceLevel.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppFileServiceLevel.cs index 9634e34f5c90..7e37a3aae140 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppFileServiceLevel.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppFileServiceLevel.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.NetApp.Models { - /// The service level of the file system. + /// + /// The service level of the file system + /// Serialized Name: ServiceLevel + /// public readonly partial struct NetAppFileServiceLevel : IEquatable { private readonly string _value; @@ -27,13 +30,25 @@ public NetAppFileServiceLevel(string value) private const string UltraValue = "Ultra"; private const string StandardZrsValue = "StandardZRS"; - /// Standard service level. + /// + /// Standard service level + /// Serialized Name: ServiceLevel.Standard + /// public static NetAppFileServiceLevel Standard { get; } = new NetAppFileServiceLevel(StandardValue); - /// Premium service level. + /// + /// Premium service level + /// Serialized Name: ServiceLevel.Premium + /// public static NetAppFileServiceLevel Premium { get; } = new NetAppFileServiceLevel(PremiumValue); - /// Ultra service level. + /// + /// Ultra service level + /// Serialized Name: ServiceLevel.Ultra + /// public static NetAppFileServiceLevel Ultra { get; } = new NetAppFileServiceLevel(UltraValue); - /// Zone redundant storage service level. + /// + /// Zone redundant storage service level + /// Serialized Name: ServiceLevel.StandardZRS + /// public static NetAppFileServiceLevel StandardZrs { get; } = new NetAppFileServiceLevel(StandardZrsValue); /// Determines if two values are the same. public static bool operator ==(NetAppFileServiceLevel left, NetAppFileServiceLevel right) => left.Equals(right); diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppKeySource.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppKeySource.cs index 9682041ae757..1874eb31a186 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppKeySource.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppKeySource.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.NetApp.Models { - /// The encryption keySource (provider). Possible values (case-insensitive): Microsoft.NetApp, Microsoft.KeyVault. + /// + /// The encryption keySource (provider). Possible values (case-insensitive): Microsoft.NetApp, Microsoft.KeyVault + /// Serialized Name: KeySource + /// public readonly partial struct NetAppKeySource : IEquatable { private readonly string _value; @@ -25,9 +28,15 @@ public NetAppKeySource(string value) private const string MicrosoftNetAppValue = "Microsoft.NetApp"; private const string MicrosoftKeyVaultValue = "Microsoft.KeyVault"; - /// Microsoft-managed key encryption. + /// + /// Microsoft-managed key encryption + /// Serialized Name: KeySource.Microsoft.NetApp + /// public static NetAppKeySource MicrosoftNetApp { get; } = new NetAppKeySource(MicrosoftNetAppValue); - /// Customer-managed key encryption. + /// + /// Customer-managed key encryption + /// Serialized Name: KeySource.Microsoft.KeyVault + /// public static NetAppKeySource MicrosoftKeyVault { get; } = new NetAppKeySource(MicrosoftKeyVaultValue); /// Determines if two values are the same. public static bool operator ==(NetAppKeySource left, NetAppKeySource right) => left.Equals(right); diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppKeyVaultProperties.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppKeyVaultProperties.cs index 2c06281f5cc8..07a67504b7ce 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppKeyVaultProperties.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppKeyVaultProperties.cs @@ -11,7 +11,10 @@ namespace Azure.ResourceManager.NetApp.Models { - /// Properties of key vault. + /// + /// Properties of key vault. + /// Serialized Name: KeyVaultProperties + /// public partial class NetAppKeyVaultProperties { /// @@ -47,8 +50,14 @@ public partial class NetAppKeyVaultProperties private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// The Uri of KeyVault. - /// The name of KeyVault key. + /// + /// The Uri of KeyVault. + /// Serialized Name: KeyVaultProperties.keyVaultUri + /// + /// + /// The name of KeyVault key. + /// Serialized Name: KeyVaultProperties.keyName + /// /// or is null. public NetAppKeyVaultProperties(Uri keyVaultUri, string keyName) { @@ -60,11 +69,26 @@ public NetAppKeyVaultProperties(Uri keyVaultUri, string keyName) } /// Initializes a new instance of . - /// UUID v4 used to identify the Azure Key Vault configuration. - /// The Uri of KeyVault. - /// The name of KeyVault key. - /// The resource ID of KeyVault. - /// Status of the KeyVault connection. + /// + /// UUID v4 used to identify the Azure Key Vault configuration + /// Serialized Name: KeyVaultProperties.keyVaultId + /// + /// + /// The Uri of KeyVault. + /// Serialized Name: KeyVaultProperties.keyVaultUri + /// + /// + /// The name of KeyVault key. + /// Serialized Name: KeyVaultProperties.keyName + /// + /// + /// The resource ID of KeyVault. + /// Serialized Name: KeyVaultProperties.keyVaultResourceId + /// + /// + /// Status of the KeyVault connection. + /// Serialized Name: KeyVaultProperties.status + /// /// Keeps track of any properties unknown to the library. internal NetAppKeyVaultProperties(string keyVaultId, Uri keyVaultUri, string keyName, ResourceIdentifier keyVaultArmResourceId, NetAppKeyVaultStatus? status, IDictionary serializedAdditionalRawData) { @@ -81,15 +105,30 @@ internal NetAppKeyVaultProperties() { } - /// UUID v4 used to identify the Azure Key Vault configuration. + /// + /// UUID v4 used to identify the Azure Key Vault configuration + /// Serialized Name: KeyVaultProperties.keyVaultId + /// public string KeyVaultId { get; } - /// The Uri of KeyVault. + /// + /// The Uri of KeyVault. + /// Serialized Name: KeyVaultProperties.keyVaultUri + /// public Uri KeyVaultUri { get; set; } - /// The name of KeyVault key. + /// + /// The name of KeyVault key. + /// Serialized Name: KeyVaultProperties.keyName + /// public string KeyName { get; set; } - /// The resource ID of KeyVault. + /// + /// The resource ID of KeyVault. + /// Serialized Name: KeyVaultProperties.keyVaultResourceId + /// public ResourceIdentifier KeyVaultArmResourceId { get; set; } - /// Status of the KeyVault connection. + /// + /// Status of the KeyVault connection. + /// Serialized Name: KeyVaultProperties.status + /// public NetAppKeyVaultStatus? Status { get; } } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppKeyVaultStatus.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppKeyVaultStatus.cs index 829facaedafd..b59c9a16bed5 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppKeyVaultStatus.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppKeyVaultStatus.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.NetApp.Models { - /// Status of the KeyVault connection. + /// + /// Status of the KeyVault connection. + /// Serialized Name: KeyVaultStatus + /// public readonly partial struct NetAppKeyVaultStatus : IEquatable { private readonly string _value; @@ -28,15 +31,30 @@ public NetAppKeyVaultStatus(string value) private const string ErrorValue = "Error"; private const string UpdatingValue = "Updating"; - /// KeyVault connection created but not in use. + /// + /// KeyVault connection created but not in use + /// Serialized Name: KeyVaultStatus.Created + /// public static NetAppKeyVaultStatus Created { get; } = new NetAppKeyVaultStatus(CreatedValue); - /// KeyVault connection in use by SMB Volume. + /// + /// KeyVault connection in use by SMB Volume + /// Serialized Name: KeyVaultStatus.InUse + /// public static NetAppKeyVaultStatus InUse { get; } = new NetAppKeyVaultStatus(InUseValue); - /// KeyVault connection Deleted. + /// + /// KeyVault connection Deleted + /// Serialized Name: KeyVaultStatus.Deleted + /// public static NetAppKeyVaultStatus Deleted { get; } = new NetAppKeyVaultStatus(DeletedValue); - /// Error with the KeyVault connection. + /// + /// Error with the KeyVault connection + /// Serialized Name: KeyVaultStatus.Error + /// public static NetAppKeyVaultStatus Error { get; } = new NetAppKeyVaultStatus(ErrorValue); - /// KeyVault connection Updating. + /// + /// KeyVault connection Updating + /// Serialized Name: KeyVaultStatus.Updating + /// public static NetAppKeyVaultStatus Updating { get; } = new NetAppKeyVaultStatus(UpdatingValue); /// Determines if two values are the same. public static bool operator ==(NetAppKeyVaultStatus left, NetAppKeyVaultStatus right) => left.Equals(right); diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppLdapSearchScopeConfiguration.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppLdapSearchScopeConfiguration.cs index 9a84531d7c83..fb93d9d6019c 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppLdapSearchScopeConfiguration.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppLdapSearchScopeConfiguration.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.NetApp.Models { - /// LDAP search scope. + /// + /// LDAP search scope + /// Serialized Name: LdapSearchScopeOpt + /// public partial class NetAppLdapSearchScopeConfiguration { /// @@ -51,9 +54,18 @@ public NetAppLdapSearchScopeConfiguration() } /// Initializes a new instance of . - /// This specifies the user DN, which overrides the base DN for user lookups. - /// This specifies the group DN, which overrides the base DN for group lookups. - /// This specifies the custom LDAP search filter to be used when looking up group membership from LDAP server. + /// + /// This specifies the user DN, which overrides the base DN for user lookups. + /// Serialized Name: LdapSearchScopeOpt.userDN + /// + /// + /// This specifies the group DN, which overrides the base DN for group lookups. + /// Serialized Name: LdapSearchScopeOpt.groupDN + /// + /// + /// This specifies the custom LDAP search filter to be used when looking up group membership from LDAP server. + /// Serialized Name: LdapSearchScopeOpt.groupMembershipFilter + /// /// Keeps track of any properties unknown to the library. internal NetAppLdapSearchScopeConfiguration(string userDN, string groupDN, string groupMembershipFilter, IDictionary serializedAdditionalRawData) { @@ -63,11 +75,20 @@ internal NetAppLdapSearchScopeConfiguration(string userDN, string groupDN, strin _serializedAdditionalRawData = serializedAdditionalRawData; } - /// This specifies the user DN, which overrides the base DN for user lookups. + /// + /// This specifies the user DN, which overrides the base DN for user lookups. + /// Serialized Name: LdapSearchScopeOpt.userDN + /// public string UserDN { get; set; } - /// This specifies the group DN, which overrides the base DN for group lookups. + /// + /// This specifies the group DN, which overrides the base DN for group lookups. + /// Serialized Name: LdapSearchScopeOpt.groupDN + /// public string GroupDN { get; set; } - /// This specifies the custom LDAP search filter to be used when looking up group membership from LDAP server. + /// + /// This specifies the custom LDAP search filter to be used when looking up group membership from LDAP server. + /// Serialized Name: LdapSearchScopeOpt.groupMembershipFilter + /// public string GroupMembershipFilter { get; set; } } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppMirrorState.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppMirrorState.cs index d66c260ea1bb..49680bfcf2d1 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppMirrorState.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppMirrorState.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.NetApp.Models { - /// The status of the replication. + /// + /// The status of the replication + /// Serialized Name: MirrorState + /// public readonly partial struct NetAppMirrorState : IEquatable { private readonly string _value; @@ -26,11 +29,20 @@ public NetAppMirrorState(string value) private const string MirroredValue = "Mirrored"; private const string BrokenValue = "Broken"; - /// Uninitialized. + /// + /// Uninitialized + /// Serialized Name: MirrorState.Uninitialized + /// public static NetAppMirrorState Uninitialized { get; } = new NetAppMirrorState(UninitializedValue); - /// Mirrored. + /// + /// Mirrored + /// Serialized Name: MirrorState.Mirrored + /// public static NetAppMirrorState Mirrored { get; } = new NetAppMirrorState(MirroredValue); - /// Broken. + /// + /// Broken + /// Serialized Name: MirrorState.Broken + /// public static NetAppMirrorState Broken { get; } = new NetAppMirrorState(BrokenValue); /// Determines if two values are the same. public static bool operator ==(NetAppMirrorState left, NetAppMirrorState right) => left.Equals(right); diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppNameAvailabilityContent.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppNameAvailabilityContent.cs index 4ca775999808..06d37c0f73b8 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppNameAvailabilityContent.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppNameAvailabilityContent.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.NetApp.Models { - /// Resource name availability request content. + /// + /// Resource name availability request content. + /// Serialized Name: ResourceNameAvailabilityRequest + /// public partial class NetAppNameAvailabilityContent { /// @@ -46,9 +49,18 @@ public partial class NetAppNameAvailabilityContent private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// Resource name to verify. - /// Resource type used for verification. - /// Resource group name. + /// + /// Resource name to verify. + /// Serialized Name: ResourceNameAvailabilityRequest.name + /// + /// + /// Resource type used for verification. + /// Serialized Name: ResourceNameAvailabilityRequest.type + /// + /// + /// Resource group name. + /// Serialized Name: ResourceNameAvailabilityRequest.resourceGroup + /// /// or is null. public NetAppNameAvailabilityContent(string name, NetAppNameAvailabilityResourceType resourceType, string resourceGroup) { @@ -61,9 +73,18 @@ public NetAppNameAvailabilityContent(string name, NetAppNameAvailabilityResource } /// Initializes a new instance of . - /// Resource name to verify. - /// Resource type used for verification. - /// Resource group name. + /// + /// Resource name to verify. + /// Serialized Name: ResourceNameAvailabilityRequest.name + /// + /// + /// Resource type used for verification. + /// Serialized Name: ResourceNameAvailabilityRequest.type + /// + /// + /// Resource group name. + /// Serialized Name: ResourceNameAvailabilityRequest.resourceGroup + /// /// Keeps track of any properties unknown to the library. internal NetAppNameAvailabilityContent(string name, NetAppNameAvailabilityResourceType resourceType, string resourceGroup, IDictionary serializedAdditionalRawData) { @@ -78,11 +99,20 @@ internal NetAppNameAvailabilityContent() { } - /// Resource name to verify. + /// + /// Resource name to verify. + /// Serialized Name: ResourceNameAvailabilityRequest.name + /// public string Name { get; } - /// Resource type used for verification. + /// + /// Resource type used for verification. + /// Serialized Name: ResourceNameAvailabilityRequest.type + /// public NetAppNameAvailabilityResourceType ResourceType { get; } - /// Resource group name. + /// + /// Resource group name. + /// Serialized Name: ResourceNameAvailabilityRequest.resourceGroup + /// public string ResourceGroup { get; } } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppNameAvailabilityResourceType.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppNameAvailabilityResourceType.cs index 4cef6a197d3b..bf0be0318104 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppNameAvailabilityResourceType.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppNameAvailabilityResourceType.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.NetApp.Models { - /// Resource type used for verification. + /// + /// Resource type used for verification. + /// Serialized Name: CheckNameResourceTypes + /// public readonly partial struct NetAppNameAvailabilityResourceType : IEquatable { private readonly string _value; @@ -27,13 +30,25 @@ public NetAppNameAvailabilityResourceType(string value) private const string MicrosoftNetAppNetAppAccountsCapacityPoolsVolumesValue = "Microsoft.NetApp/netAppAccounts/capacityPools/volumes"; private const string MicrosoftNetAppNetAppAccountsCapacityPoolsVolumesSnapshotsValue = "Microsoft.NetApp/netAppAccounts/capacityPools/volumes/snapshots"; - /// Microsoft.NetApp/netAppAccounts. + /// + /// Microsoft.NetApp/netAppAccounts + /// Serialized Name: CheckNameResourceTypes.Microsoft.NetApp/netAppAccounts + /// public static NetAppNameAvailabilityResourceType MicrosoftNetAppNetAppAccounts { get; } = new NetAppNameAvailabilityResourceType(MicrosoftNetAppNetAppAccountsValue); - /// Microsoft.NetApp/netAppAccounts/capacityPools. + /// + /// Microsoft.NetApp/netAppAccounts/capacityPools + /// Serialized Name: CheckNameResourceTypes.Microsoft.NetApp/netAppAccounts/capacityPools + /// public static NetAppNameAvailabilityResourceType MicrosoftNetAppNetAppAccountsCapacityPools { get; } = new NetAppNameAvailabilityResourceType(MicrosoftNetAppNetAppAccountsCapacityPoolsValue); - /// Microsoft.NetApp/netAppAccounts/capacityPools/volumes. + /// + /// Microsoft.NetApp/netAppAccounts/capacityPools/volumes + /// Serialized Name: CheckNameResourceTypes.Microsoft.NetApp/netAppAccounts/capacityPools/volumes + /// public static NetAppNameAvailabilityResourceType MicrosoftNetAppNetAppAccountsCapacityPoolsVolumes { get; } = new NetAppNameAvailabilityResourceType(MicrosoftNetAppNetAppAccountsCapacityPoolsVolumesValue); - /// Microsoft.NetApp/netAppAccounts/capacityPools/volumes/snapshots. + /// + /// Microsoft.NetApp/netAppAccounts/capacityPools/volumes/snapshots + /// Serialized Name: CheckNameResourceTypes.Microsoft.NetApp/netAppAccounts/capacityPools/volumes/snapshots + /// public static NetAppNameAvailabilityResourceType MicrosoftNetAppNetAppAccountsCapacityPoolsVolumesSnapshots { get; } = new NetAppNameAvailabilityResourceType(MicrosoftNetAppNetAppAccountsCapacityPoolsVolumesSnapshotsValue); /// Determines if two values are the same. public static bool operator ==(NetAppNameAvailabilityResourceType left, NetAppNameAvailabilityResourceType right) => left.Equals(right); diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppNameUnavailableReason.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppNameUnavailableReason.cs index 23b71e28c927..a785aebe4424 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppNameUnavailableReason.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppNameUnavailableReason.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.NetApp.Models { - /// <code>Invalid</code> indicates the name provided does not match Azure App Service naming requirements. <code>AlreadyExists</code> indicates that the name is already in use and is therefore unavailable. + /// + /// <code>Invalid</code> indicates the name provided does not match Azure App Service naming requirements. <code>AlreadyExists</code> indicates that the name is already in use and is therefore unavailable. + /// Serialized Name: InAvailabilityReasonType + /// public readonly partial struct NetAppNameUnavailableReason : IEquatable { private readonly string _value; @@ -25,9 +28,15 @@ public NetAppNameUnavailableReason(string value) private const string InvalidValue = "Invalid"; private const string AlreadyExistsValue = "AlreadyExists"; - /// Invalid. + /// + /// Invalid + /// Serialized Name: InAvailabilityReasonType.Invalid + /// public static NetAppNameUnavailableReason Invalid { get; } = new NetAppNameUnavailableReason(InvalidValue); - /// AlreadyExists. + /// + /// AlreadyExists + /// Serialized Name: InAvailabilityReasonType.AlreadyExists + /// public static NetAppNameUnavailableReason AlreadyExists { get; } = new NetAppNameUnavailableReason(AlreadyExistsValue); /// Determines if two values are the same. public static bool operator ==(NetAppNameUnavailableReason left, NetAppNameUnavailableReason right) => left.Equals(right); diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppNetworkFeature.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppNetworkFeature.cs index bf5e443847f5..66607f07d6fd 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppNetworkFeature.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppNetworkFeature.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.NetApp.Models { - /// Network features available to the volume, or current state of update. + /// + /// Network features available to the volume, or current state of update. + /// Serialized Name: NetworkFeatures + /// public readonly partial struct NetAppNetworkFeature : IEquatable { private readonly string _value; @@ -27,13 +30,25 @@ public NetAppNetworkFeature(string value) private const string BasicStandardValue = "Basic_Standard"; private const string StandardBasicValue = "Standard_Basic"; - /// Basic network features. + /// + /// Basic network features. + /// Serialized Name: NetworkFeatures.Basic + /// public static NetAppNetworkFeature Basic { get; } = new NetAppNetworkFeature(BasicValue); - /// Standard network features. + /// + /// Standard network features. + /// Serialized Name: NetworkFeatures.Standard + /// public static NetAppNetworkFeature Standard { get; } = new NetAppNetworkFeature(StandardValue); - /// Updating from Basic to Standard network features. + /// + /// Updating from Basic to Standard network features. + /// Serialized Name: NetworkFeatures.Basic_Standard + /// public static NetAppNetworkFeature BasicStandard { get; } = new NetAppNetworkFeature(BasicStandardValue); - /// Updating from Standard to Basic network features. + /// + /// Updating from Standard to Basic network features. + /// Serialized Name: NetworkFeatures.Standard_Basic + /// public static NetAppNetworkFeature StandardBasic { get; } = new NetAppNetworkFeature(StandardBasicValue); /// Determines if two values are the same. public static bool operator ==(NetAppNetworkFeature left, NetAppNetworkFeature right) => left.Equals(right); diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppProvisioningState.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppProvisioningState.cs index 28746142fcdc..4fdc2a9382de 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppProvisioningState.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppProvisioningState.cs @@ -7,22 +7,46 @@ namespace Azure.ResourceManager.NetApp.Models { - /// Gets the status of the VolumeQuotaRule at the time the operation was called. + /// + /// Gets the status of the VolumeQuotaRule at the time the operation was called. + /// Serialized Name: ProvisioningState + /// public enum NetAppProvisioningState { - /// Accepted. + /// + /// Accepted + /// Serialized Name: ProvisioningState.Accepted + /// Accepted, - /// Creating. + /// + /// Creating + /// Serialized Name: ProvisioningState.Creating + /// Creating, - /// Patching. + /// + /// Patching + /// Serialized Name: ProvisioningState.Patching + /// Patching, - /// Deleting. + /// + /// Deleting + /// Serialized Name: ProvisioningState.Deleting + /// Deleting, - /// Moving. + /// + /// Moving + /// Serialized Name: ProvisioningState.Moving + /// Moving, - /// Failed. + /// + /// Failed + /// Serialized Name: ProvisioningState.Failed + /// Failed, - /// Succeeded. + /// + /// Succeeded + /// Serialized Name: ProvisioningState.Succeeded + /// Succeeded } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppQuotaAvailabilityContent.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppQuotaAvailabilityContent.cs index f5a651fc23cf..c6c9202d8561 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppQuotaAvailabilityContent.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppQuotaAvailabilityContent.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.NetApp.Models { - /// Quota availability request content. + /// + /// Quota availability request content. + /// Serialized Name: QuotaAvailabilityRequest + /// public partial class NetAppQuotaAvailabilityContent { /// @@ -46,9 +49,18 @@ public partial class NetAppQuotaAvailabilityContent private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// Name of the resource to verify. - /// Resource type used for verification. - /// Resource group name. + /// + /// Name of the resource to verify. + /// Serialized Name: QuotaAvailabilityRequest.name + /// + /// + /// Resource type used for verification. + /// Serialized Name: QuotaAvailabilityRequest.type + /// + /// + /// Resource group name. + /// Serialized Name: QuotaAvailabilityRequest.resourceGroup + /// /// or is null. public NetAppQuotaAvailabilityContent(string name, NetAppQuotaAvailabilityResourceType availabilityResourceType, string resourceGroup) { @@ -61,9 +73,18 @@ public NetAppQuotaAvailabilityContent(string name, NetAppQuotaAvailabilityResour } /// Initializes a new instance of . - /// Name of the resource to verify. - /// Resource type used for verification. - /// Resource group name. + /// + /// Name of the resource to verify. + /// Serialized Name: QuotaAvailabilityRequest.name + /// + /// + /// Resource type used for verification. + /// Serialized Name: QuotaAvailabilityRequest.type + /// + /// + /// Resource group name. + /// Serialized Name: QuotaAvailabilityRequest.resourceGroup + /// /// Keeps track of any properties unknown to the library. internal NetAppQuotaAvailabilityContent(string name, NetAppQuotaAvailabilityResourceType availabilityResourceType, string resourceGroup, IDictionary serializedAdditionalRawData) { @@ -78,11 +99,20 @@ internal NetAppQuotaAvailabilityContent() { } - /// Name of the resource to verify. + /// + /// Name of the resource to verify. + /// Serialized Name: QuotaAvailabilityRequest.name + /// public string Name { get; } - /// Resource type used for verification. + /// + /// Resource type used for verification. + /// Serialized Name: QuotaAvailabilityRequest.type + /// public NetAppQuotaAvailabilityResourceType AvailabilityResourceType { get; } - /// Resource group name. + /// + /// Resource group name. + /// Serialized Name: QuotaAvailabilityRequest.resourceGroup + /// public string ResourceGroup { get; } } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppQuotaAvailabilityResourceType.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppQuotaAvailabilityResourceType.cs index 378fb36967e0..70f20f507a41 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppQuotaAvailabilityResourceType.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppQuotaAvailabilityResourceType.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.NetApp.Models { - /// Resource type used for verification. + /// + /// Resource type used for verification. + /// Serialized Name: CheckQuotaNameResourceTypes + /// public readonly partial struct NetAppQuotaAvailabilityResourceType : IEquatable { private readonly string _value; @@ -27,13 +30,25 @@ public NetAppQuotaAvailabilityResourceType(string value) private const string MicrosoftNetAppNetAppAccountsCapacityPoolsVolumesValue = "Microsoft.NetApp/netAppAccounts/capacityPools/volumes"; private const string MicrosoftNetAppNetAppAccountsCapacityPoolsVolumesSnapshotsValue = "Microsoft.NetApp/netAppAccounts/capacityPools/volumes/snapshots"; - /// Microsoft.NetApp/netAppAccounts. + /// + /// Microsoft.NetApp/netAppAccounts + /// Serialized Name: CheckQuotaNameResourceTypes.Microsoft.NetApp/netAppAccounts + /// public static NetAppQuotaAvailabilityResourceType MicrosoftNetAppNetAppAccounts { get; } = new NetAppQuotaAvailabilityResourceType(MicrosoftNetAppNetAppAccountsValue); - /// Microsoft.NetApp/netAppAccounts/capacityPools. + /// + /// Microsoft.NetApp/netAppAccounts/capacityPools + /// Serialized Name: CheckQuotaNameResourceTypes.Microsoft.NetApp/netAppAccounts/capacityPools + /// public static NetAppQuotaAvailabilityResourceType MicrosoftNetAppNetAppAccountsCapacityPools { get; } = new NetAppQuotaAvailabilityResourceType(MicrosoftNetAppNetAppAccountsCapacityPoolsValue); - /// Microsoft.NetApp/netAppAccounts/capacityPools/volumes. + /// + /// Microsoft.NetApp/netAppAccounts/capacityPools/volumes + /// Serialized Name: CheckQuotaNameResourceTypes.Microsoft.NetApp/netAppAccounts/capacityPools/volumes + /// public static NetAppQuotaAvailabilityResourceType MicrosoftNetAppNetAppAccountsCapacityPoolsVolumes { get; } = new NetAppQuotaAvailabilityResourceType(MicrosoftNetAppNetAppAccountsCapacityPoolsVolumesValue); - /// Microsoft.NetApp/netAppAccounts/capacityPools/volumes/snapshots. + /// + /// Microsoft.NetApp/netAppAccounts/capacityPools/volumes/snapshots + /// Serialized Name: CheckQuotaNameResourceTypes.Microsoft.NetApp/netAppAccounts/capacityPools/volumes/snapshots + /// public static NetAppQuotaAvailabilityResourceType MicrosoftNetAppNetAppAccountsCapacityPoolsVolumesSnapshots { get; } = new NetAppQuotaAvailabilityResourceType(MicrosoftNetAppNetAppAccountsCapacityPoolsVolumesSnapshotsValue); /// Determines if two values are the same. public static bool operator ==(NetAppQuotaAvailabilityResourceType left, NetAppQuotaAvailabilityResourceType right) => left.Equals(right); diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppRegionInfo.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppRegionInfo.cs index 5aff7dafe5aa..d9212519711f 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppRegionInfo.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppRegionInfo.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.NetApp.Models { - /// Provides region specific information. + /// + /// Provides region specific information. + /// Serialized Name: RegionInfo + /// public partial class NetAppRegionInfo { /// @@ -52,8 +55,14 @@ internal NetAppRegionInfo() } /// Initializes a new instance of . - /// Provides storage to network proximity information in the region. - /// Provides logical availability zone mappings for the subscription for a region. + /// + /// Provides storage to network proximity information in the region. + /// Serialized Name: RegionInfo.storageToNetworkProximity + /// + /// + /// Provides logical availability zone mappings for the subscription for a region. + /// Serialized Name: RegionInfo.availabilityZoneMappings + /// /// Keeps track of any properties unknown to the library. internal NetAppRegionInfo(RegionStorageToNetworkProximity? storageToNetworkProximity, IReadOnlyList availabilityZoneMappings, IDictionary serializedAdditionalRawData) { @@ -62,9 +71,15 @@ internal NetAppRegionInfo(RegionStorageToNetworkProximity? storageToNetworkProxi _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Provides storage to network proximity information in the region. + /// + /// Provides storage to network proximity information in the region. + /// Serialized Name: RegionInfo.storageToNetworkProximity + /// public RegionStorageToNetworkProximity? StorageToNetworkProximity { get; } - /// Provides logical availability zone mappings for the subscription for a region. + /// + /// Provides logical availability zone mappings for the subscription for a region. + /// Serialized Name: RegionInfo.availabilityZoneMappings + /// public IReadOnlyList AvailabilityZoneMappings { get; } } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppRelationshipStatus.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppRelationshipStatus.cs index 7259559b7870..293630d4543b 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppRelationshipStatus.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppRelationshipStatus.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.NetApp.Models { - /// Status of the mirror relationship. + /// + /// Status of the mirror relationship + /// Serialized Name: RelationshipStatus + /// public readonly partial struct NetAppRelationshipStatus : IEquatable { private readonly string _value; @@ -27,13 +30,25 @@ public NetAppRelationshipStatus(string value) private const string FailedValue = "Failed"; private const string UnknownValue = "Unknown"; - /// Idle. + /// + /// Idle + /// Serialized Name: RelationshipStatus.Idle + /// public static NetAppRelationshipStatus Idle { get; } = new NetAppRelationshipStatus(IdleValue); - /// Transferring. + /// + /// Transferring + /// Serialized Name: RelationshipStatus.Transferring + /// public static NetAppRelationshipStatus Transferring { get; } = new NetAppRelationshipStatus(TransferringValue); - /// Failed. + /// + /// Failed + /// Serialized Name: RelationshipStatus.Failed + /// public static NetAppRelationshipStatus Failed { get; } = new NetAppRelationshipStatus(FailedValue); - /// Unknown. + /// + /// Unknown + /// Serialized Name: RelationshipStatus.Unknown + /// public static NetAppRelationshipStatus Unknown { get; } = new NetAppRelationshipStatus(UnknownValue); /// Determines if two values are the same. public static bool operator ==(NetAppRelationshipStatus left, NetAppRelationshipStatus right) => left.Equals(right); diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppReplicationObject.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppReplicationObject.Serialization.cs index 6b8164f8c019..dca7f5a13d75 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppReplicationObject.Serialization.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppReplicationObject.Serialization.cs @@ -51,6 +51,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WritePropertyName("remoteVolumeResourceId"u8); writer.WriteStringValue(RemoteVolumeResourceId); + if (Optional.IsDefined(RemotePath)) + { + writer.WritePropertyName("remotePath"u8); + writer.WriteObjectValue(RemotePath, options); + } if (Optional.IsDefined(RemoteVolumeRegion)) { writer.WritePropertyName("remoteVolumeRegion"u8); @@ -97,6 +102,7 @@ internal static NetAppReplicationObject DeserializeNetAppReplicationObject(JsonE NetAppEndpointType? endpointType = default; NetAppReplicationSchedule? replicationSchedule = default; ResourceIdentifier remoteVolumeResourceId = default; + RemotePath remotePath = default; string remoteVolumeRegion = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); @@ -130,6 +136,15 @@ internal static NetAppReplicationObject DeserializeNetAppReplicationObject(JsonE remoteVolumeResourceId = new ResourceIdentifier(property.Value.GetString()); continue; } + if (property.NameEquals("remotePath"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + remotePath = RemotePath.DeserializeRemotePath(property.Value, options); + continue; + } if (property.NameEquals("remoteVolumeRegion"u8)) { remoteVolumeRegion = property.Value.GetString(); @@ -146,6 +161,7 @@ internal static NetAppReplicationObject DeserializeNetAppReplicationObject(JsonE endpointType, replicationSchedule, remoteVolumeResourceId, + remotePath, remoteVolumeRegion, serializedAdditionalRawData); } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppReplicationObject.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppReplicationObject.cs index c0353d0ff990..7608dc974f52 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppReplicationObject.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppReplicationObject.cs @@ -11,7 +11,10 @@ namespace Azure.ResourceManager.NetApp.Models { - /// Replication properties. + /// + /// Replication properties + /// Serialized Name: ReplicationObject + /// public partial class NetAppReplicationObject { /// @@ -47,7 +50,10 @@ public partial class NetAppReplicationObject private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// The resource ID of the remote volume. + /// + /// The resource ID of the remote volume. + /// Serialized Name: ReplicationObject.remoteVolumeResourceId + /// /// is null. public NetAppReplicationObject(ResourceIdentifier remoteVolumeResourceId) { @@ -57,18 +63,38 @@ public NetAppReplicationObject(ResourceIdentifier remoteVolumeResourceId) } /// Initializes a new instance of . - /// Id. - /// Indicates whether the local volume is the source or destination for the Volume Replication. - /// Schedule. - /// The resource ID of the remote volume. - /// The remote region for the other end of the Volume Replication. + /// + /// Id + /// Serialized Name: ReplicationObject.replicationId + /// + /// + /// Indicates whether the local volume is the source or destination for the Volume Replication + /// Serialized Name: ReplicationObject.endpointType + /// + /// + /// Schedule + /// Serialized Name: ReplicationObject.replicationSchedule + /// + /// + /// The resource ID of the remote volume. + /// Serialized Name: ReplicationObject.remoteVolumeResourceId + /// + /// + /// The full path to a volume that is to be migrated into ANF. Required for Migration volumes + /// Serialized Name: ReplicationObject.remotePath + /// + /// + /// The remote region for the other end of the Volume Replication. + /// Serialized Name: ReplicationObject.remoteVolumeRegion + /// /// Keeps track of any properties unknown to the library. - internal NetAppReplicationObject(string replicationId, NetAppEndpointType? endpointType, NetAppReplicationSchedule? replicationSchedule, ResourceIdentifier remoteVolumeResourceId, string remoteVolumeRegion, IDictionary serializedAdditionalRawData) + internal NetAppReplicationObject(string replicationId, NetAppEndpointType? endpointType, NetAppReplicationSchedule? replicationSchedule, ResourceIdentifier remoteVolumeResourceId, RemotePath remotePath, string remoteVolumeRegion, IDictionary serializedAdditionalRawData) { ReplicationId = replicationId; EndpointType = endpointType; ReplicationSchedule = replicationSchedule; RemoteVolumeResourceId = remoteVolumeResourceId; + RemotePath = remotePath; RemoteVolumeRegion = remoteVolumeRegion; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -77,13 +103,30 @@ internal NetAppReplicationObject(string replicationId, NetAppEndpointType? endpo internal NetAppReplicationObject() { } - /// Indicates whether the local volume is the source or destination for the Volume Replication. + /// + /// Indicates whether the local volume is the source or destination for the Volume Replication + /// Serialized Name: ReplicationObject.endpointType + /// public NetAppEndpointType? EndpointType { get; set; } - /// Schedule. + /// + /// Schedule + /// Serialized Name: ReplicationObject.replicationSchedule + /// public NetAppReplicationSchedule? ReplicationSchedule { get; set; } - /// The resource ID of the remote volume. + /// + /// The resource ID of the remote volume. + /// Serialized Name: ReplicationObject.remoteVolumeResourceId + /// public ResourceIdentifier RemoteVolumeResourceId { get; set; } - /// The remote region for the other end of the Volume Replication. + /// + /// The full path to a volume that is to be migrated into ANF. Required for Migration volumes + /// Serialized Name: ReplicationObject.remotePath + /// + public RemotePath RemotePath { get; set; } + /// + /// The remote region for the other end of the Volume Replication. + /// Serialized Name: ReplicationObject.remoteVolumeRegion + /// public string RemoteVolumeRegion { get; set; } } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppReplicationSchedule.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppReplicationSchedule.cs index b0d49565e0ab..7c14d1595d06 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppReplicationSchedule.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppReplicationSchedule.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.NetApp.Models { - /// Schedule. + /// + /// Schedule + /// Serialized Name: ReplicationSchedule + /// public readonly partial struct NetAppReplicationSchedule : IEquatable { private readonly string _value; @@ -26,11 +29,20 @@ public NetAppReplicationSchedule(string value) private const string HourlyValue = "hourly"; private const string DailyValue = "daily"; - /// _10minutely. + /// + /// _10minutely + /// Serialized Name: ReplicationSchedule._10minutely + /// public static NetAppReplicationSchedule TenMinutely { get; } = new NetAppReplicationSchedule(TenMinutelyValue); - /// hourly. + /// + /// hourly + /// Serialized Name: ReplicationSchedule.hourly + /// public static NetAppReplicationSchedule Hourly { get; } = new NetAppReplicationSchedule(HourlyValue); - /// daily. + /// + /// daily + /// Serialized Name: ReplicationSchedule.daily + /// public static NetAppReplicationSchedule Daily { get; } = new NetAppReplicationSchedule(DailyValue); /// Determines if two values are the same. public static bool operator ==(NetAppReplicationSchedule left, NetAppReplicationSchedule right) => left.Equals(right); diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppRestoreStatus.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppRestoreStatus.cs index acfdc2e4516e..06ed11a0c551 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppRestoreStatus.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppRestoreStatus.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.NetApp.Models { - /// Restore status. + /// + /// Restore status + /// Serialized Name: RestoreStatus + /// public partial class NetAppRestoreStatus { /// @@ -51,12 +54,30 @@ internal NetAppRestoreStatus() } /// Initializes a new instance of . - /// Restore health status. - /// Status of the restore SnapMirror relationship. - /// The status of the restore. - /// Reason for the unhealthy restore relationship. - /// Displays error message if the restore is in an error state. - /// Displays the total bytes transferred. + /// + /// Restore health status + /// Serialized Name: RestoreStatus.healthy + /// + /// + /// Status of the restore SnapMirror relationship + /// Serialized Name: RestoreStatus.relationshipStatus + /// + /// + /// The status of the restore + /// Serialized Name: RestoreStatus.mirrorState + /// + /// + /// Reason for the unhealthy restore relationship + /// Serialized Name: RestoreStatus.unhealthyReason + /// + /// + /// Displays error message if the restore is in an error state + /// Serialized Name: RestoreStatus.errorMessage + /// + /// + /// Displays the total bytes transferred + /// Serialized Name: RestoreStatus.totalTransferBytes + /// /// Keeps track of any properties unknown to the library. internal NetAppRestoreStatus(bool? isHealthy, NetAppRelationshipStatus? relationshipStatus, NetAppMirrorState? mirrorState, string unhealthyReason, string errorMessage, long? totalTransferBytes, IDictionary serializedAdditionalRawData) { @@ -69,17 +90,35 @@ internal NetAppRestoreStatus(bool? isHealthy, NetAppRelationshipStatus? relation _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Restore health status. + /// + /// Restore health status + /// Serialized Name: RestoreStatus.healthy + /// public bool? IsHealthy { get; } - /// Status of the restore SnapMirror relationship. + /// + /// Status of the restore SnapMirror relationship + /// Serialized Name: RestoreStatus.relationshipStatus + /// public NetAppRelationshipStatus? RelationshipStatus { get; } - /// The status of the restore. + /// + /// The status of the restore + /// Serialized Name: RestoreStatus.mirrorState + /// public NetAppMirrorState? MirrorState { get; } - /// Reason for the unhealthy restore relationship. + /// + /// Reason for the unhealthy restore relationship + /// Serialized Name: RestoreStatus.unhealthyReason + /// public string UnhealthyReason { get; } - /// Displays error message if the restore is in an error state. + /// + /// Displays error message if the restore is in an error state + /// Serialized Name: RestoreStatus.errorMessage + /// public string ErrorMessage { get; } - /// Displays the total bytes transferred. + /// + /// Displays the total bytes transferred + /// Serialized Name: RestoreStatus.totalTransferBytes + /// public long? TotalTransferBytes { get; } } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppSubscriptionQuotaItem.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppSubscriptionQuotaItem.cs index c3684c6329cf..7ebd1a44f47e 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppSubscriptionQuotaItem.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppSubscriptionQuotaItem.cs @@ -12,7 +12,10 @@ namespace Azure.ResourceManager.NetApp.Models { - /// Information regarding Subscription Quota Item. + /// + /// Information regarding Subscription Quota Item. + /// Serialized Name: SubscriptionQuotaItem + /// public partial class NetAppSubscriptionQuotaItem : ResourceData { /// @@ -57,8 +60,14 @@ public NetAppSubscriptionQuotaItem() /// The name. /// The resourceType. /// The systemData. - /// The current quota value. - /// The default quota value. + /// + /// The current quota value. + /// Serialized Name: SubscriptionQuotaItem.properties.current + /// + /// + /// The default quota value. + /// Serialized Name: SubscriptionQuotaItem.properties.default + /// /// Keeps track of any properties unknown to the library. internal NetAppSubscriptionQuotaItem(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, int? current, int? @default, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { @@ -67,9 +76,15 @@ internal NetAppSubscriptionQuotaItem(ResourceIdentifier id, string name, Resourc _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The current quota value. + /// + /// The current quota value. + /// Serialized Name: SubscriptionQuotaItem.properties.current + /// public int? Current { get; } - /// The default quota value. + /// + /// The default quota value. + /// Serialized Name: SubscriptionQuotaItem.properties.default + /// public int? Default { get; } } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppSubvolumeInfoPatch.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppSubvolumeInfoPatch.cs index d70b4be54e06..1084f23a978c 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppSubvolumeInfoPatch.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppSubvolumeInfoPatch.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.NetApp.Models { - /// Subvolume Patch Request properties. + /// + /// Subvolume Patch Request properties + /// Serialized Name: SubvolumePatchRequest + /// public partial class NetAppSubvolumeInfoPatch { /// @@ -51,8 +54,14 @@ public NetAppSubvolumeInfoPatch() } /// Initializes a new instance of . - /// Truncate subvolume to the provided size in bytes. - /// path to the subvolume. + /// + /// Truncate subvolume to the provided size in bytes + /// Serialized Name: SubvolumePatchRequest.properties.size + /// + /// + /// path to the subvolume + /// Serialized Name: SubvolumePatchRequest.properties.path + /// /// Keeps track of any properties unknown to the library. internal NetAppSubvolumeInfoPatch(long? size, string path, IDictionary serializedAdditionalRawData) { @@ -61,9 +70,15 @@ internal NetAppSubvolumeInfoPatch(long? size, string path, IDictionary Truncate subvolume to the provided size in bytes. + /// + /// Truncate subvolume to the provided size in bytes + /// Serialized Name: SubvolumePatchRequest.properties.size + /// public long? Size { get; set; } - /// path to the subvolume. + /// + /// path to the subvolume + /// Serialized Name: SubvolumePatchRequest.properties.path + /// public string Path { get; set; } } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppSubvolumeMetadata.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppSubvolumeMetadata.cs index 723711ab44a8..5024a3e6a1ec 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppSubvolumeMetadata.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppSubvolumeMetadata.cs @@ -12,7 +12,10 @@ namespace Azure.ResourceManager.NetApp.Models { - /// Result of the post subvolume and action is to get metadata of the subvolume. + /// + /// Result of the post subvolume and action is to get metadata of the subvolume. + /// Serialized Name: SubvolumeModel + /// public partial class NetAppSubvolumeMetadata : ResourceData { /// @@ -57,16 +60,46 @@ internal NetAppSubvolumeMetadata() /// The name. /// The resourceType. /// The systemData. - /// Path to the subvolume. - /// Path to the parent subvolume. - /// Size of subvolume. - /// Bytes used. - /// Permissions of the subvolume. - /// Creation time and date. - /// Most recent access time and date. - /// Most recent modification time and date. - /// Most recent change time and date. - /// Azure lifecycle management. + /// + /// Path to the subvolume + /// Serialized Name: SubvolumeModel.properties.path + /// + /// + /// Path to the parent subvolume + /// Serialized Name: SubvolumeModel.properties.parentPath + /// + /// + /// Size of subvolume + /// Serialized Name: SubvolumeModel.properties.size + /// + /// + /// Bytes used + /// Serialized Name: SubvolumeModel.properties.bytesUsed + /// + /// + /// Permissions of the subvolume + /// Serialized Name: SubvolumeModel.properties.permissions + /// + /// + /// Creation time and date + /// Serialized Name: SubvolumeModel.properties.creationTimeStamp + /// + /// + /// Most recent access time and date + /// Serialized Name: SubvolumeModel.properties.accessedTimeStamp + /// + /// + /// Most recent modification time and date + /// Serialized Name: SubvolumeModel.properties.modifiedTimeStamp + /// + /// + /// Most recent change time and date + /// Serialized Name: SubvolumeModel.properties.changedTimeStamp + /// + /// + /// Azure lifecycle management + /// Serialized Name: SubvolumeModel.properties.provisioningState + /// /// Keeps track of any properties unknown to the library. internal NetAppSubvolumeMetadata(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string path, string parentPath, long? size, long? bytesUsed, string permissions, DateTimeOffset? createdOn, DateTimeOffset? accessedOn, DateTimeOffset? modifiedOn, DateTimeOffset? changedOn, string provisioningState, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { @@ -83,25 +116,55 @@ internal NetAppSubvolumeMetadata(ResourceIdentifier id, string name, ResourceTyp _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Path to the subvolume. + /// + /// Path to the subvolume + /// Serialized Name: SubvolumeModel.properties.path + /// public string Path { get; } - /// Path to the parent subvolume. + /// + /// Path to the parent subvolume + /// Serialized Name: SubvolumeModel.properties.parentPath + /// public string ParentPath { get; } - /// Size of subvolume. + /// + /// Size of subvolume + /// Serialized Name: SubvolumeModel.properties.size + /// public long? Size { get; } - /// Bytes used. + /// + /// Bytes used + /// Serialized Name: SubvolumeModel.properties.bytesUsed + /// public long? BytesUsed { get; } - /// Permissions of the subvolume. + /// + /// Permissions of the subvolume + /// Serialized Name: SubvolumeModel.properties.permissions + /// public string Permissions { get; } - /// Creation time and date. + /// + /// Creation time and date + /// Serialized Name: SubvolumeModel.properties.creationTimeStamp + /// public DateTimeOffset? CreatedOn { get; } - /// Most recent access time and date. + /// + /// Most recent access time and date + /// Serialized Name: SubvolumeModel.properties.accessedTimeStamp + /// public DateTimeOffset? AccessedOn { get; } - /// Most recent modification time and date. + /// + /// Most recent modification time and date + /// Serialized Name: SubvolumeModel.properties.modifiedTimeStamp + /// public DateTimeOffset? ModifiedOn { get; } - /// Most recent change time and date. + /// + /// Most recent change time and date + /// Serialized Name: SubvolumeModel.properties.changedTimeStamp + /// public DateTimeOffset? ChangedOn { get; } - /// Azure lifecycle management. + /// + /// Azure lifecycle management + /// Serialized Name: SubvolumeModel.properties.provisioningState + /// public string ProvisioningState { get; } } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeAuthorizeReplicationContent.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeAuthorizeReplicationContent.cs index 617a8f011fb0..2fa04250f493 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeAuthorizeReplicationContent.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeAuthorizeReplicationContent.cs @@ -11,7 +11,10 @@ namespace Azure.ResourceManager.NetApp.Models { - /// Authorize request. + /// + /// Authorize request + /// Serialized Name: AuthorizeRequest + /// public partial class NetAppVolumeAuthorizeReplicationContent { /// @@ -52,7 +55,10 @@ public NetAppVolumeAuthorizeReplicationContent() } /// Initializes a new instance of . - /// Resource id of the remote volume. + /// + /// Resource id of the remote volume + /// Serialized Name: AuthorizeRequest.remoteVolumeResourceId + /// /// Keeps track of any properties unknown to the library. internal NetAppVolumeAuthorizeReplicationContent(ResourceIdentifier remoteVolumeResourceId, IDictionary serializedAdditionalRawData) { @@ -60,7 +66,10 @@ internal NetAppVolumeAuthorizeReplicationContent(ResourceIdentifier remoteVolume _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Resource id of the remote volume. + /// + /// Resource id of the remote volume + /// Serialized Name: AuthorizeRequest.remoteVolumeResourceId + /// public ResourceIdentifier RemoteVolumeResourceId { get; set; } } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeBackupBackupRestoreFilesContent.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeBackupBackupRestoreFilesContent.cs index 508f343c084a..635b03588b2d 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeBackupBackupRestoreFilesContent.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeBackupBackupRestoreFilesContent.cs @@ -12,7 +12,10 @@ namespace Azure.ResourceManager.NetApp.Models { - /// Restore payload for Single File Backup Restore. + /// + /// Restore payload for Single File Backup Restore + /// Serialized Name: BackupRestoreFiles + /// public partial class NetAppVolumeBackupBackupRestoreFilesContent { /// @@ -48,8 +51,14 @@ public partial class NetAppVolumeBackupBackupRestoreFilesContent private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// List of files to be restored. - /// Resource Id of the destination volume on which the files need to be restored. + /// + /// List of files to be restored + /// Serialized Name: BackupRestoreFiles.fileList + /// + /// + /// Resource Id of the destination volume on which the files need to be restored + /// Serialized Name: BackupRestoreFiles.destinationVolumeId + /// /// or is null. public NetAppVolumeBackupBackupRestoreFilesContent(IEnumerable fileList, ResourceIdentifier destinationVolumeId) { @@ -61,9 +70,18 @@ public NetAppVolumeBackupBackupRestoreFilesContent(IEnumerable fileList, } /// Initializes a new instance of . - /// List of files to be restored. - /// Destination folder where the files will be restored. The path name should start with a forward slash. If it is omitted from request then restore is done at the root folder of the destination volume by default. - /// Resource Id of the destination volume on which the files need to be restored. + /// + /// List of files to be restored + /// Serialized Name: BackupRestoreFiles.fileList + /// + /// + /// Destination folder where the files will be restored. The path name should start with a forward slash. If it is omitted from request then restore is done at the root folder of the destination volume by default + /// Serialized Name: BackupRestoreFiles.restoreFilePath + /// + /// + /// Resource Id of the destination volume on which the files need to be restored + /// Serialized Name: BackupRestoreFiles.destinationVolumeId + /// /// Keeps track of any properties unknown to the library. internal NetAppVolumeBackupBackupRestoreFilesContent(IList fileList, string restoreFilePath, ResourceIdentifier destinationVolumeId, IDictionary serializedAdditionalRawData) { @@ -78,11 +96,20 @@ internal NetAppVolumeBackupBackupRestoreFilesContent() { } - /// List of files to be restored. + /// + /// List of files to be restored + /// Serialized Name: BackupRestoreFiles.fileList + /// public IList FileList { get; } - /// Destination folder where the files will be restored. The path name should start with a forward slash. If it is omitted from request then restore is done at the root folder of the destination volume by default. + /// + /// Destination folder where the files will be restored. The path name should start with a forward slash. If it is omitted from request then restore is done at the root folder of the destination volume by default + /// Serialized Name: BackupRestoreFiles.restoreFilePath + /// public string RestoreFilePath { get; set; } - /// Resource Id of the destination volume on which the files need to be restored. + /// + /// Resource Id of the destination volume on which the files need to be restored + /// Serialized Name: BackupRestoreFiles.destinationVolumeId + /// public ResourceIdentifier DestinationVolumeId { get; } } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeBackupConfiguration.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeBackupConfiguration.cs index f1880ee68c2a..9cb6908e0feb 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeBackupConfiguration.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeBackupConfiguration.cs @@ -11,7 +11,10 @@ namespace Azure.ResourceManager.NetApp.Models { - /// Volume Backup Properties. + /// + /// Volume Backup Properties + /// Serialized Name: VolumeBackupProperties + /// public partial class NetAppVolumeBackupConfiguration { /// @@ -47,9 +50,18 @@ public partial class NetAppVolumeBackupConfiguration private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// Backup Policy Resource ID. - /// Policy Enforced. - /// Backup Vault Resource ID. + /// + /// Backup Policy Resource ID + /// Serialized Name: VolumeBackupProperties.backupPolicyId + /// + /// + /// Policy Enforced + /// Serialized Name: VolumeBackupProperties.policyEnforced + /// + /// + /// Backup Vault Resource ID + /// Serialized Name: VolumeBackupProperties.backupVaultId + /// /// Keeps track of any properties unknown to the library. internal NetAppVolumeBackupConfiguration(ResourceIdentifier backupPolicyId, bool? isPolicyEnforced, ResourceIdentifier backupVaultId, IDictionary serializedAdditionalRawData) { @@ -59,11 +71,20 @@ internal NetAppVolumeBackupConfiguration(ResourceIdentifier backupPolicyId, bool _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Backup Policy Resource ID. + /// + /// Backup Policy Resource ID + /// Serialized Name: VolumeBackupProperties.backupPolicyId + /// public ResourceIdentifier BackupPolicyId { get; set; } - /// Policy Enforced. + /// + /// Policy Enforced + /// Serialized Name: VolumeBackupProperties.policyEnforced + /// public bool? IsPolicyEnforced { get; set; } - /// Backup Vault Resource ID. + /// + /// Backup Vault Resource ID + /// Serialized Name: VolumeBackupProperties.backupVaultId + /// public ResourceIdentifier BackupVaultId { get; set; } } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeBackupDetail.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeBackupDetail.cs index c5f82302155d..b1d9a1c95df4 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeBackupDetail.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeBackupDetail.cs @@ -11,7 +11,10 @@ namespace Azure.ResourceManager.NetApp.Models { - /// Volume details using the backup policy. + /// + /// Volume details using the backup policy + /// Serialized Name: VolumeBackups + /// public partial class NetAppVolumeBackupDetail { /// @@ -52,10 +55,22 @@ internal NetAppVolumeBackupDetail() } /// Initializes a new instance of . - /// Volume name. - /// ResourceId used to identify the Volume. - /// Total count of backups for volume. - /// Policy enabled. + /// + /// Volume name + /// Serialized Name: VolumeBackups.volumeName + /// + /// + /// ResourceId used to identify the Volume + /// Serialized Name: VolumeBackups.volumeResourceId + /// + /// + /// Total count of backups for volume + /// Serialized Name: VolumeBackups.backupsCount + /// + /// + /// Policy enabled + /// Serialized Name: VolumeBackups.policyEnabled + /// /// Keeps track of any properties unknown to the library. internal NetAppVolumeBackupDetail(string volumeName, ResourceIdentifier volumeResourceId, int? backupsCount, bool? isPolicyEnabled, IDictionary serializedAdditionalRawData) { @@ -66,13 +81,25 @@ internal NetAppVolumeBackupDetail(string volumeName, ResourceIdentifier volumeRe _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Volume name. + /// + /// Volume name + /// Serialized Name: VolumeBackups.volumeName + /// public string VolumeName { get; } - /// ResourceId used to identify the Volume. + /// + /// ResourceId used to identify the Volume + /// Serialized Name: VolumeBackups.volumeResourceId + /// public ResourceIdentifier VolumeResourceId { get; } - /// Total count of backups for volume. + /// + /// Total count of backups for volume + /// Serialized Name: VolumeBackups.backupsCount + /// public int? BackupsCount { get; } - /// Policy enabled. + /// + /// Policy enabled + /// Serialized Name: VolumeBackups.policyEnabled + /// public bool? IsPolicyEnabled { get; } } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeBackupStatus.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeBackupStatus.cs index 07029b5336b5..80f80c9ca0b4 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeBackupStatus.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeBackupStatus.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.NetApp.Models { - /// Backup status. + /// + /// Backup status + /// Serialized Name: BackupStatus + /// public partial class NetAppVolumeBackupStatus { /// @@ -51,15 +54,42 @@ internal NetAppVolumeBackupStatus() } /// Initializes a new instance of . - /// Backup health status. - /// Status of the backup mirror relationship. - /// The status of the backup. - /// Reason for the unhealthy backup relationship. - /// Displays error message if the backup is in an error state. - /// Displays the last transfer size. - /// Displays the last transfer type. - /// Displays the total bytes transferred. - /// Displays the total number of bytes transferred for the ongoing operation. + /// + /// Backup health status + /// Serialized Name: BackupStatus.healthy + /// + /// + /// Status of the backup mirror relationship + /// Serialized Name: BackupStatus.relationshipStatus + /// + /// + /// The status of the backup + /// Serialized Name: BackupStatus.mirrorState + /// + /// + /// Reason for the unhealthy backup relationship + /// Serialized Name: BackupStatus.unhealthyReason + /// + /// + /// Displays error message if the backup is in an error state + /// Serialized Name: BackupStatus.errorMessage + /// + /// + /// Displays the last transfer size + /// Serialized Name: BackupStatus.lastTransferSize + /// + /// + /// Displays the last transfer type + /// Serialized Name: BackupStatus.lastTransferType + /// + /// + /// Displays the total bytes transferred + /// Serialized Name: BackupStatus.totalTransferBytes + /// + /// + /// Displays the total number of bytes transferred for the ongoing operation + /// Serialized Name: BackupStatus.transferProgressBytes + /// /// Keeps track of any properties unknown to the library. internal NetAppVolumeBackupStatus(bool? isHealthy, NetAppRelationshipStatus? relationshipStatus, NetAppMirrorState? mirrorState, string unhealthyReason, string errorMessage, long? lastTransferSize, string lastTransferType, long? totalTransferBytes, long? transferProgressBytes, IDictionary serializedAdditionalRawData) { @@ -75,23 +105,50 @@ internal NetAppVolumeBackupStatus(bool? isHealthy, NetAppRelationshipStatus? rel _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Backup health status. + /// + /// Backup health status + /// Serialized Name: BackupStatus.healthy + /// public bool? IsHealthy { get; } - /// Status of the backup mirror relationship. + /// + /// Status of the backup mirror relationship + /// Serialized Name: BackupStatus.relationshipStatus + /// public NetAppRelationshipStatus? RelationshipStatus { get; } - /// The status of the backup. + /// + /// The status of the backup + /// Serialized Name: BackupStatus.mirrorState + /// public NetAppMirrorState? MirrorState { get; } - /// Reason for the unhealthy backup relationship. + /// + /// Reason for the unhealthy backup relationship + /// Serialized Name: BackupStatus.unhealthyReason + /// public string UnhealthyReason { get; } - /// Displays error message if the backup is in an error state. + /// + /// Displays error message if the backup is in an error state + /// Serialized Name: BackupStatus.errorMessage + /// public string ErrorMessage { get; } - /// Displays the last transfer size. + /// + /// Displays the last transfer size + /// Serialized Name: BackupStatus.lastTransferSize + /// public long? LastTransferSize { get; } - /// Displays the last transfer type. + /// + /// Displays the last transfer type + /// Serialized Name: BackupStatus.lastTransferType + /// public string LastTransferType { get; } - /// Displays the total bytes transferred. + /// + /// Displays the total bytes transferred + /// Serialized Name: BackupStatus.totalTransferBytes + /// public long? TotalTransferBytes { get; } - /// Displays the total number of bytes transferred for the ongoing operation. + /// + /// Displays the total number of bytes transferred for the ongoing operation + /// Serialized Name: BackupStatus.transferProgressBytes + /// public long? TransferProgressBytes { get; } } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeBreakFileLocksContent.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeBreakFileLocksContent.cs index 7641377bab21..c8217f40ca58 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeBreakFileLocksContent.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeBreakFileLocksContent.cs @@ -11,7 +11,10 @@ namespace Azure.ResourceManager.NetApp.Models { - /// Break file locks request. + /// + /// Break file locks request + /// Serialized Name: BreakFileLocksRequest + /// public partial class NetAppVolumeBreakFileLocksContent { /// @@ -52,8 +55,14 @@ public NetAppVolumeBreakFileLocksContent() } /// Initializes a new instance of . - /// To clear file locks on a volume for a particular client. - /// Break File locks could be a disruptive operation for application as locks on the volume will be broken, if want to process, set to true. + /// + /// To clear file locks on a volume for a particular client + /// Serialized Name: BreakFileLocksRequest.clientIp + /// + /// + /// Break File locks could be a disruptive operation for application as locks on the volume will be broken, if want to process, set to true. + /// Serialized Name: BreakFileLocksRequest.confirmRunningDisruptiveOperation + /// /// Keeps track of any properties unknown to the library. internal NetAppVolumeBreakFileLocksContent(IPAddress clientIP, bool? confirmRunningDisruptiveOperation, IDictionary serializedAdditionalRawData) { @@ -62,9 +71,15 @@ internal NetAppVolumeBreakFileLocksContent(IPAddress clientIP, bool? confirmRunn _serializedAdditionalRawData = serializedAdditionalRawData; } - /// To clear file locks on a volume for a particular client. + /// + /// To clear file locks on a volume for a particular client + /// Serialized Name: BreakFileLocksRequest.clientIp + /// public IPAddress ClientIP { get; set; } - /// Break File locks could be a disruptive operation for application as locks on the volume will be broken, if want to process, set to true. + /// + /// Break File locks could be a disruptive operation for application as locks on the volume will be broken, if want to process, set to true. + /// Serialized Name: BreakFileLocksRequest.confirmRunningDisruptiveOperation + /// public bool? ConfirmRunningDisruptiveOperation { get; set; } } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeBreakReplicationContent.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeBreakReplicationContent.cs index b983b26af163..106bfed614c9 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeBreakReplicationContent.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeBreakReplicationContent.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.NetApp.Models { - /// Break replication request. + /// + /// Break replication request + /// Serialized Name: BreakReplicationRequest + /// public partial class NetAppVolumeBreakReplicationContent { /// @@ -51,7 +54,10 @@ public NetAppVolumeBreakReplicationContent() } /// Initializes a new instance of . - /// If replication is in status transferring and you want to force break the replication, set to true. + /// + /// If replication is in status transferring and you want to force break the replication, set to true + /// Serialized Name: BreakReplicationRequest.forceBreakReplication + /// /// Keeps track of any properties unknown to the library. internal NetAppVolumeBreakReplicationContent(bool? forceBreakReplication, IDictionary serializedAdditionalRawData) { @@ -59,7 +65,10 @@ internal NetAppVolumeBreakReplicationContent(bool? forceBreakReplication, IDicti _serializedAdditionalRawData = serializedAdditionalRawData; } - /// If replication is in status transferring and you want to force break the replication, set to true. + /// + /// If replication is in status transferring and you want to force break the replication, set to true + /// Serialized Name: BreakReplicationRequest.forceBreakReplication + /// public bool? ForceBreakReplication { get; set; } } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeDataProtection.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeDataProtection.cs index a61e8bcc90d6..6b9f75f74799 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeDataProtection.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeDataProtection.cs @@ -11,7 +11,10 @@ namespace Azure.ResourceManager.NetApp.Models { - /// DataProtection type volumes include an object containing details of the replication. + /// + /// DataProtection type volumes include an object containing details of the replication + /// Serialized Name: VolumePropertiesDataProtection + /// public partial class NetAppVolumeDataProtection { /// @@ -52,10 +55,22 @@ public NetAppVolumeDataProtection() } /// Initializes a new instance of . - /// Backup Properties. - /// Replication properties. - /// Snapshot properties. - /// VolumeRelocation properties. + /// + /// Backup Properties + /// Serialized Name: VolumePropertiesDataProtection.backup + /// + /// + /// Replication properties + /// Serialized Name: VolumePropertiesDataProtection.replication + /// + /// + /// Snapshot properties. + /// Serialized Name: VolumePropertiesDataProtection.snapshot + /// + /// + /// VolumeRelocation properties + /// Serialized Name: VolumePropertiesDataProtection.volumeRelocation + /// /// Keeps track of any properties unknown to the library. internal NetAppVolumeDataProtection(NetAppVolumeBackupConfiguration backup, NetAppReplicationObject replication, VolumeSnapshotProperties snapshot, NetAppVolumeRelocationProperties volumeRelocation, IDictionary serializedAdditionalRawData) { @@ -66,13 +81,25 @@ internal NetAppVolumeDataProtection(NetAppVolumeBackupConfiguration backup, NetA _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Backup Properties. + /// + /// Backup Properties + /// Serialized Name: VolumePropertiesDataProtection.backup + /// public NetAppVolumeBackupConfiguration Backup { get; set; } - /// Replication properties. + /// + /// Replication properties + /// Serialized Name: VolumePropertiesDataProtection.replication + /// public NetAppReplicationObject Replication { get; set; } - /// Snapshot properties. + /// + /// Snapshot properties. + /// Serialized Name: VolumePropertiesDataProtection.snapshot + /// internal VolumeSnapshotProperties Snapshot { get; set; } - /// Snapshot Policy ResourceId. + /// + /// Snapshot Policy ResourceId + /// Serialized Name: VolumeSnapshotProperties.snapshotPolicyId + /// public ResourceIdentifier SnapshotPolicyId { get => Snapshot is null ? default : Snapshot.SnapshotPolicyId; @@ -84,7 +111,10 @@ public ResourceIdentifier SnapshotPolicyId } } - /// VolumeRelocation properties. + /// + /// VolumeRelocation properties + /// Serialized Name: VolumePropertiesDataProtection.volumeRelocation + /// public NetAppVolumeRelocationProperties VolumeRelocation { get; set; } } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeExportPolicyRule.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeExportPolicyRule.cs index ff4d0fc308bb..b967c9e55d74 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeExportPolicyRule.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeExportPolicyRule.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.NetApp.Models { - /// Volume Export Policy Rule. + /// + /// Volume Export Policy Rule + /// Serialized Name: ExportPolicyRule + /// public partial class NetAppVolumeExportPolicyRule { /// @@ -51,21 +54,66 @@ public NetAppVolumeExportPolicyRule() } /// Initializes a new instance of . - /// Order index. - /// Read only access. - /// Read and write access. - /// Kerberos5 Read only access. To be use with swagger version 2020-05-01 or later. - /// Kerberos5 Read and write access. To be use with swagger version 2020-05-01 or later. - /// Kerberos5i Read only access. To be use with swagger version 2020-05-01 or later. - /// Kerberos5i Read and write access. To be use with swagger version 2020-05-01 or later. - /// Kerberos5p Read only access. To be use with swagger version 2020-05-01 or later. - /// Kerberos5p Read and write access. To be use with swagger version 2020-05-01 or later. - /// Allows CIFS protocol. - /// Allows NFSv3 protocol. Enable only for NFSv3 type volumes. - /// Allows NFSv4.1 protocol. Enable only for NFSv4.1 type volumes. - /// Client ingress specification as comma separated string with IPv4 CIDRs, IPv4 host addresses and host names. - /// Has root access to volume. - /// This parameter specifies who is authorized to change the ownership of a file. restricted - Only root user can change the ownership of the file. unrestricted - Non-root users can change ownership of files that they own. + /// + /// Order index + /// Serialized Name: ExportPolicyRule.ruleIndex + /// + /// + /// Read only access + /// Serialized Name: ExportPolicyRule.unixReadOnly + /// + /// + /// Read and write access + /// Serialized Name: ExportPolicyRule.unixReadWrite + /// + /// + /// Kerberos5 Read only access. To be use with swagger version 2020-05-01 or later + /// Serialized Name: ExportPolicyRule.kerberos5ReadOnly + /// + /// + /// Kerberos5 Read and write access. To be use with swagger version 2020-05-01 or later + /// Serialized Name: ExportPolicyRule.kerberos5ReadWrite + /// + /// + /// Kerberos5i Read only access. To be use with swagger version 2020-05-01 or later + /// Serialized Name: ExportPolicyRule.kerberos5iReadOnly + /// + /// + /// Kerberos5i Read and write access. To be use with swagger version 2020-05-01 or later + /// Serialized Name: ExportPolicyRule.kerberos5iReadWrite + /// + /// + /// Kerberos5p Read only access. To be use with swagger version 2020-05-01 or later + /// Serialized Name: ExportPolicyRule.kerberos5pReadOnly + /// + /// + /// Kerberos5p Read and write access. To be use with swagger version 2020-05-01 or later + /// Serialized Name: ExportPolicyRule.kerberos5pReadWrite + /// + /// + /// Allows CIFS protocol + /// Serialized Name: ExportPolicyRule.cifs + /// + /// + /// Allows NFSv3 protocol. Enable only for NFSv3 type volumes + /// Serialized Name: ExportPolicyRule.nfsv3 + /// + /// + /// Allows NFSv4.1 protocol. Enable only for NFSv4.1 type volumes + /// Serialized Name: ExportPolicyRule.nfsv41 + /// + /// + /// Client ingress specification as comma separated string with IPv4 CIDRs, IPv4 host addresses and host names + /// Serialized Name: ExportPolicyRule.allowedClients + /// + /// + /// Has root access to volume + /// Serialized Name: ExportPolicyRule.hasRootAccess + /// + /// + /// This parameter specifies who is authorized to change the ownership of a file. restricted - Only root user can change the ownership of the file. unrestricted - Non-root users can change ownership of files that they own. + /// Serialized Name: ExportPolicyRule.chownMode + /// /// Keeps track of any properties unknown to the library. internal NetAppVolumeExportPolicyRule(int? ruleIndex, bool? isUnixReadOnly, bool? isUnixReadWrite, bool? isKerberos5ReadOnly, bool? isKerberos5ReadWrite, bool? isKerberos5iReadOnly, bool? isKerberos5iReadWrite, bool? isKerberos5pReadOnly, bool? isKerberos5pReadWrite, bool? allowCifsProtocol, bool? allowNfsV3Protocol, bool? allowNfsV41Protocol, string allowedClients, bool? hasRootAccess, NetAppChownMode? chownMode, IDictionary serializedAdditionalRawData) { @@ -87,35 +135,80 @@ internal NetAppVolumeExportPolicyRule(int? ruleIndex, bool? isUnixReadOnly, bool _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Order index. + /// + /// Order index + /// Serialized Name: ExportPolicyRule.ruleIndex + /// public int? RuleIndex { get; set; } - /// Read only access. + /// + /// Read only access + /// Serialized Name: ExportPolicyRule.unixReadOnly + /// public bool? IsUnixReadOnly { get; set; } - /// Read and write access. + /// + /// Read and write access + /// Serialized Name: ExportPolicyRule.unixReadWrite + /// public bool? IsUnixReadWrite { get; set; } - /// Kerberos5 Read only access. To be use with swagger version 2020-05-01 or later. + /// + /// Kerberos5 Read only access. To be use with swagger version 2020-05-01 or later + /// Serialized Name: ExportPolicyRule.kerberos5ReadOnly + /// public bool? IsKerberos5ReadOnly { get; set; } - /// Kerberos5 Read and write access. To be use with swagger version 2020-05-01 or later. + /// + /// Kerberos5 Read and write access. To be use with swagger version 2020-05-01 or later + /// Serialized Name: ExportPolicyRule.kerberos5ReadWrite + /// public bool? IsKerberos5ReadWrite { get; set; } - /// Kerberos5i Read only access. To be use with swagger version 2020-05-01 or later. + /// + /// Kerberos5i Read only access. To be use with swagger version 2020-05-01 or later + /// Serialized Name: ExportPolicyRule.kerberos5iReadOnly + /// public bool? IsKerberos5iReadOnly { get; set; } - /// Kerberos5i Read and write access. To be use with swagger version 2020-05-01 or later. + /// + /// Kerberos5i Read and write access. To be use with swagger version 2020-05-01 or later + /// Serialized Name: ExportPolicyRule.kerberos5iReadWrite + /// public bool? IsKerberos5iReadWrite { get; set; } - /// Kerberos5p Read only access. To be use with swagger version 2020-05-01 or later. + /// + /// Kerberos5p Read only access. To be use with swagger version 2020-05-01 or later + /// Serialized Name: ExportPolicyRule.kerberos5pReadOnly + /// public bool? IsKerberos5pReadOnly { get; set; } - /// Kerberos5p Read and write access. To be use with swagger version 2020-05-01 or later. + /// + /// Kerberos5p Read and write access. To be use with swagger version 2020-05-01 or later + /// Serialized Name: ExportPolicyRule.kerberos5pReadWrite + /// public bool? IsKerberos5pReadWrite { get; set; } - /// Allows CIFS protocol. + /// + /// Allows CIFS protocol + /// Serialized Name: ExportPolicyRule.cifs + /// public bool? AllowCifsProtocol { get; set; } - /// Allows NFSv3 protocol. Enable only for NFSv3 type volumes. + /// + /// Allows NFSv3 protocol. Enable only for NFSv3 type volumes + /// Serialized Name: ExportPolicyRule.nfsv3 + /// public bool? AllowNfsV3Protocol { get; set; } - /// Allows NFSv4.1 protocol. Enable only for NFSv4.1 type volumes. + /// + /// Allows NFSv4.1 protocol. Enable only for NFSv4.1 type volumes + /// Serialized Name: ExportPolicyRule.nfsv41 + /// public bool? AllowNfsV41Protocol { get; set; } - /// Client ingress specification as comma separated string with IPv4 CIDRs, IPv4 host addresses and host names. + /// + /// Client ingress specification as comma separated string with IPv4 CIDRs, IPv4 host addresses and host names + /// Serialized Name: ExportPolicyRule.allowedClients + /// public string AllowedClients { get; set; } - /// Has root access to volume. + /// + /// Has root access to volume + /// Serialized Name: ExportPolicyRule.hasRootAccess + /// public bool? HasRootAccess { get; set; } - /// This parameter specifies who is authorized to change the ownership of a file. restricted - Only root user can change the ownership of the file. unrestricted - Non-root users can change ownership of files that they own. + /// + /// This parameter specifies who is authorized to change the ownership of a file. restricted - Only root user can change the ownership of the file. unrestricted - Non-root users can change ownership of files that they own. + /// Serialized Name: ExportPolicyRule.chownMode + /// public NetAppChownMode? ChownMode { get; set; } } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeGroupMetadata.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeGroupMetadata.cs index c3b20d30e389..ed2ea2595c1b 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeGroupMetadata.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeGroupMetadata.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.NetApp.Models { - /// Volume group properties. + /// + /// Volume group properties + /// Serialized Name: VolumeGroupMetaData + /// public partial class NetAppVolumeGroupMetadata { /// @@ -52,11 +55,26 @@ public NetAppVolumeGroupMetadata() } /// Initializes a new instance of . - /// Group Description. - /// Application Type. - /// Application specific identifier. - /// Application specific placement rules for the volume group. - /// Number of volumes in volume group. + /// + /// Group Description + /// Serialized Name: VolumeGroupMetaData.groupDescription + /// + /// + /// Application Type + /// Serialized Name: VolumeGroupMetaData.applicationType + /// + /// + /// Application specific identifier + /// Serialized Name: VolumeGroupMetaData.applicationIdentifier + /// + /// + /// Application specific placement rules for the volume group + /// Serialized Name: VolumeGroupMetaData.globalPlacementRules + /// + /// + /// Number of volumes in volume group + /// Serialized Name: VolumeGroupMetaData.volumesCount + /// /// Keeps track of any properties unknown to the library. internal NetAppVolumeGroupMetadata(string groupDescription, NetAppApplicationType? applicationType, string applicationIdentifier, IList globalPlacementRules, long? volumesCount, IDictionary serializedAdditionalRawData) { @@ -68,15 +86,30 @@ internal NetAppVolumeGroupMetadata(string groupDescription, NetAppApplicationTyp _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Group Description. + /// + /// Group Description + /// Serialized Name: VolumeGroupMetaData.groupDescription + /// public string GroupDescription { get; set; } - /// Application Type. + /// + /// Application Type + /// Serialized Name: VolumeGroupMetaData.applicationType + /// public NetAppApplicationType? ApplicationType { get; set; } - /// Application specific identifier. + /// + /// Application specific identifier + /// Serialized Name: VolumeGroupMetaData.applicationIdentifier + /// public string ApplicationIdentifier { get; set; } - /// Application specific placement rules for the volume group. + /// + /// Application specific placement rules for the volume group + /// Serialized Name: VolumeGroupMetaData.globalPlacementRules + /// public IList GlobalPlacementRules { get; } - /// Number of volumes in volume group. + /// + /// Number of volumes in volume group + /// Serialized Name: VolumeGroupMetaData.volumesCount + /// public long? VolumesCount { get; } } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeGroupResult.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeGroupResult.cs index d06b810d110f..08268874d34d 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeGroupResult.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeGroupResult.cs @@ -12,7 +12,10 @@ namespace Azure.ResourceManager.NetApp.Models { - /// Volume group resource. + /// + /// Volume group resource + /// Serialized Name: VolumeGroup + /// public partial class NetAppVolumeGroupResult : ResourceData { /// @@ -57,9 +60,18 @@ internal NetAppVolumeGroupResult() /// The name. /// The resourceType. /// The systemData. - /// Resource location. - /// Azure lifecycle management. - /// Volume group details. + /// + /// Resource location + /// Serialized Name: VolumeGroup.location + /// + /// + /// Azure lifecycle management + /// Serialized Name: VolumeGroup.properties.provisioningState + /// + /// + /// Volume group details + /// Serialized Name: VolumeGroup.properties.groupMetaData + /// /// Keeps track of any properties unknown to the library. internal NetAppVolumeGroupResult(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, AzureLocation? location, string provisioningState, NetAppVolumeGroupMetadata groupMetaData, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { @@ -69,11 +81,20 @@ internal NetAppVolumeGroupResult(ResourceIdentifier id, string name, ResourceTyp _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Resource location. + /// + /// Resource location + /// Serialized Name: VolumeGroup.location + /// public AzureLocation? Location { get; } - /// Azure lifecycle management. + /// + /// Azure lifecycle management + /// Serialized Name: VolumeGroup.properties.provisioningState + /// public string ProvisioningState { get; } - /// Volume group details. + /// + /// Volume group details + /// Serialized Name: VolumeGroup.properties.groupMetaData + /// public NetAppVolumeGroupMetadata GroupMetaData { get; } } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeGroupVolume.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeGroupVolume.Serialization.cs index 3647434fb60e..47f5d7f0a111 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeGroupVolume.Serialization.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeGroupVolume.Serialization.cs @@ -147,6 +147,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("networkFeatures"u8); writer.WriteStringValue(NetworkFeatures.Value.ToString()); } + if (options.Format != "W" && Optional.IsDefined(EffectiveNetworkFeatures)) + { + writer.WritePropertyName("effectiveNetworkFeatures"u8); + writer.WriteStringValue(EffectiveNetworkFeatures.Value.ToString()); + } if (options.Format != "W" && Optional.IsDefined(NetworkSiblingSetId)) { writer.WritePropertyName("networkSiblingSetId"u8); @@ -470,6 +475,7 @@ internal static NetAppVolumeGroupVolume DeserializeNetAppVolumeGroupVolume(JsonE string baremetalTenantId = default; ResourceIdentifier subnetId = default; NetAppNetworkFeature? networkFeatures = default; + NetAppNetworkFeature? effectiveNetworkFeatures = default; Guid? networkSiblingSetId = default; NetAppVolumeStorageToNetworkProximity? storageToNetworkProximity = default; IReadOnlyList mountTargets = default; @@ -679,6 +685,15 @@ internal static NetAppVolumeGroupVolume DeserializeNetAppVolumeGroupVolume(JsonE networkFeatures = new NetAppNetworkFeature(property0.Value.GetString()); continue; } + if (property0.NameEquals("effectiveNetworkFeatures"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + effectiveNetworkFeatures = new NetAppNetworkFeature(property0.Value.GetString()); + continue; + } if (property0.NameEquals("networkSiblingSetId"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -1088,6 +1103,7 @@ internal static NetAppVolumeGroupVolume DeserializeNetAppVolumeGroupVolume(JsonE baremetalTenantId, subnetId, networkFeatures, + effectiveNetworkFeatures, networkSiblingSetId, storageToNetworkProximity, mountTargets ?? new ChangeTrackingList(), diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeGroupVolume.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeGroupVolume.cs index f0d96a5443ad..48d927a2711a 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeGroupVolume.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeGroupVolume.cs @@ -11,7 +11,10 @@ namespace Azure.ResourceManager.NetApp.Models { - /// Volume resource. + /// + /// Volume resource + /// Serialized Name: VolumeGroupVolumeProperties + /// public partial class NetAppVolumeGroupVolume { /// @@ -47,9 +50,18 @@ public partial class NetAppVolumeGroupVolume private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// A unique file path for the volume. Used when creating mount targets. - /// Maximum storage quota allowed for a file system in bytes. This is a soft quota used for alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. For large volumes, valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to 2400GiB to 2400TiB. Values expressed in bytes as multiples of 1 GiB. - /// The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes. + /// + /// A unique file path for the volume. Used when creating mount targets + /// Serialized Name: VolumeGroupVolumeProperties.properties.creationToken + /// + /// + /// Maximum storage quota allowed for a file system in bytes. This is a soft quota used for alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. For large volumes, valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to 2400GiB to 2400TiB. Values expressed in bytes as multiples of 1 GiB. + /// Serialized Name: VolumeGroupVolumeProperties.properties.usageThreshold + /// + /// + /// The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes + /// Serialized Name: VolumeGroupVolumeProperties.properties.subnetId + /// /// or is null. public NetAppVolumeGroupVolume(string creationToken, long usageThreshold, ResourceIdentifier subnetId) { @@ -68,72 +80,251 @@ public NetAppVolumeGroupVolume(string creationToken, long usageThreshold, Resour } /// Initializes a new instance of . - /// Resource Id. - /// Resource name. - /// Resource type. - /// Resource tags. - /// Availability Zone. - /// Unique FileSystem Identifier. - /// A unique file path for the volume. Used when creating mount targets. - /// The service level of the file system. - /// Maximum storage quota allowed for a file system in bytes. This is a soft quota used for alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. For large volumes, valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to 2400GiB to 2400TiB. Values expressed in bytes as multiples of 1 GiB. - /// Set of export policy rules. - /// Set of protocol types, default NFSv3, CIFS for SMB protocol. - /// Azure lifecycle management. - /// Resource identifier used to identify the Snapshot. - /// If enabled (true) the snapshot the volume was created from will be automatically deleted after the volume create operation has finished. Defaults to false. - /// Resource identifier used to identify the Backup. - /// Unique Baremetal Tenant Identifier. - /// The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes. - /// Network features available to the volume, or current state of update. - /// Network Sibling Set ID for the the group of volumes sharing networking resources. - /// Provides storage to network proximity information for the volume. - /// List of mount targets. - /// What type of volume is this. For destination volumes in Cross Region Replication, set type to DataProtection. - /// DataProtection type volumes include an object containing details of the replication. - /// Restoring. - /// If enabled (true) the volume will contain a read-only snapshot directory which provides access to each of the volume's snapshots (defaults to true). - /// Describe if a volume is KerberosEnabled. To be use with swagger version 2020-05-01 or later. - /// The security style of volume, default unix, defaults to ntfs for dual protocol or CIFS protocol. - /// Enables encryption for in-flight smb3 data. Only applicable for SMB/DualProtocol volume. To be used with swagger version 2020-08-01 or later. - /// Enables access-based enumeration share property for SMB Shares. Only applicable for SMB/DualProtocol volume. - /// Enables non-browsable property for SMB Shares. Only applicable for SMB/DualProtocol volume. - /// Enables continuously available share property for smb volume. Only applicable for SMB volume. - /// Maximum throughput in MiB/s that can be achieved by this volume and this will be accepted as input only for manual qosType volume. - /// Actual throughput in MiB/s for auto qosType volumes calculated based on size and serviceLevel. - /// Source of key used to encrypt data in volume. Applicable if NetApp account has encryption.keySource = 'Microsoft.KeyVault'. Possible values (case-insensitive) are: 'Microsoft.NetApp, Microsoft.KeyVault'. - /// The resource ID of private endpoint for KeyVault. It must reside in the same VNET as the volume. Only applicable if encryptionKeySource = 'Microsoft.KeyVault'. - /// Specifies whether LDAP is enabled or not for a given NFS volume. - /// Specifies whether Cool Access(tiering) is enabled for the volume. - /// Specifies the number of days after which data that is not accessed by clients will be tiered. + /// + /// Resource Id + /// Serialized Name: VolumeGroupVolumeProperties.id + /// + /// + /// Resource name + /// Serialized Name: VolumeGroupVolumeProperties.name + /// + /// + /// Resource type + /// Serialized Name: VolumeGroupVolumeProperties.type + /// + /// + /// Resource tags + /// Serialized Name: VolumeGroupVolumeProperties.tags + /// + /// + /// Availability Zone + /// Serialized Name: VolumeGroupVolumeProperties.zones + /// + /// + /// Unique FileSystem Identifier. + /// Serialized Name: VolumeGroupVolumeProperties.properties.fileSystemId + /// + /// + /// A unique file path for the volume. Used when creating mount targets + /// Serialized Name: VolumeGroupVolumeProperties.properties.creationToken + /// + /// + /// The service level of the file system + /// Serialized Name: VolumeGroupVolumeProperties.properties.serviceLevel + /// + /// + /// Maximum storage quota allowed for a file system in bytes. This is a soft quota used for alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. For large volumes, valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to 2400GiB to 2400TiB. Values expressed in bytes as multiples of 1 GiB. + /// Serialized Name: VolumeGroupVolumeProperties.properties.usageThreshold + /// + /// + /// Set of export policy rules + /// Serialized Name: VolumeGroupVolumeProperties.properties.exportPolicy + /// + /// + /// Set of protocol types, default NFSv3, CIFS for SMB protocol + /// Serialized Name: VolumeGroupVolumeProperties.properties.protocolTypes + /// + /// + /// Azure lifecycle management + /// Serialized Name: VolumeGroupVolumeProperties.properties.provisioningState + /// + /// + /// Resource identifier used to identify the Snapshot. + /// Serialized Name: VolumeGroupVolumeProperties.properties.snapshotId + /// + /// + /// If enabled (true) the snapshot the volume was created from will be automatically deleted after the volume create operation has finished. Defaults to false + /// Serialized Name: VolumeGroupVolumeProperties.properties.deleteBaseSnapshot + /// + /// + /// Resource identifier used to identify the Backup. + /// Serialized Name: VolumeGroupVolumeProperties.properties.backupId + /// + /// + /// Unique Baremetal Tenant Identifier. + /// Serialized Name: VolumeGroupVolumeProperties.properties.baremetalTenantId + /// + /// + /// The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes + /// Serialized Name: VolumeGroupVolumeProperties.properties.subnetId + /// + /// + /// The original value of the network features type available to the volume at the time it was created. + /// Serialized Name: VolumeGroupVolumeProperties.properties.networkFeatures + /// + /// + /// The effective value of the network features type available to the volume, or current effective state of update. + /// Serialized Name: VolumeGroupVolumeProperties.properties.effectiveNetworkFeatures + /// + /// + /// Network Sibling Set ID for the the group of volumes sharing networking resources. + /// Serialized Name: VolumeGroupVolumeProperties.properties.networkSiblingSetId + /// + /// + /// Provides storage to network proximity information for the volume. + /// Serialized Name: VolumeGroupVolumeProperties.properties.storageToNetworkProximity + /// + /// + /// List of mount targets + /// Serialized Name: VolumeGroupVolumeProperties.properties.mountTargets + /// + /// + /// What type of volume is this. For destination volumes in Cross Region Replication, set type to DataProtection + /// Serialized Name: VolumeGroupVolumeProperties.properties.volumeType + /// + /// + /// DataProtection type volumes include an object containing details of the replication + /// Serialized Name: VolumeGroupVolumeProperties.properties.dataProtection + /// + /// + /// Restoring + /// Serialized Name: VolumeGroupVolumeProperties.properties.isRestoring + /// + /// + /// If enabled (true) the volume will contain a read-only snapshot directory which provides access to each of the volume's snapshots (defaults to true). + /// Serialized Name: VolumeGroupVolumeProperties.properties.snapshotDirectoryVisible + /// + /// + /// Describe if a volume is KerberosEnabled. To be use with swagger version 2020-05-01 or later + /// Serialized Name: VolumeGroupVolumeProperties.properties.kerberosEnabled + /// + /// + /// The security style of volume, default unix, defaults to ntfs for dual protocol or CIFS protocol + /// Serialized Name: VolumeGroupVolumeProperties.properties.securityStyle + /// + /// + /// Enables encryption for in-flight smb3 data. Only applicable for SMB/DualProtocol volume. To be used with swagger version 2020-08-01 or later + /// Serialized Name: VolumeGroupVolumeProperties.properties.smbEncryption + /// + /// + /// Enables access-based enumeration share property for SMB Shares. Only applicable for SMB/DualProtocol volume + /// Serialized Name: VolumeGroupVolumeProperties.properties.smbAccessBasedEnumeration + /// + /// + /// Enables non-browsable property for SMB Shares. Only applicable for SMB/DualProtocol volume + /// Serialized Name: VolumeGroupVolumeProperties.properties.smbNonBrowsable + /// + /// + /// Enables continuously available share property for smb volume. Only applicable for SMB volume + /// Serialized Name: VolumeGroupVolumeProperties.properties.smbContinuouslyAvailable + /// + /// + /// Maximum throughput in MiB/s that can be achieved by this volume and this will be accepted as input only for manual qosType volume + /// Serialized Name: VolumeGroupVolumeProperties.properties.throughputMibps + /// + /// + /// Actual throughput in MiB/s for auto qosType volumes calculated based on size and serviceLevel + /// Serialized Name: VolumeGroupVolumeProperties.properties.actualThroughputMibps + /// + /// + /// Source of key used to encrypt data in volume. Applicable if NetApp account has encryption.keySource = 'Microsoft.KeyVault'. Possible values (case-insensitive) are: 'Microsoft.NetApp, Microsoft.KeyVault' + /// Serialized Name: VolumeGroupVolumeProperties.properties.encryptionKeySource + /// + /// + /// The resource ID of private endpoint for KeyVault. It must reside in the same VNET as the volume. Only applicable if encryptionKeySource = 'Microsoft.KeyVault'. + /// Serialized Name: VolumeGroupVolumeProperties.properties.keyVaultPrivateEndpointResourceId + /// + /// + /// Specifies whether LDAP is enabled or not for a given NFS volume. + /// Serialized Name: VolumeGroupVolumeProperties.properties.ldapEnabled + /// + /// + /// Specifies whether Cool Access(tiering) is enabled for the volume. + /// Serialized Name: VolumeGroupVolumeProperties.properties.coolAccess + /// + /// + /// Specifies the number of days after which data that is not accessed by clients will be tiered. + /// Serialized Name: VolumeGroupVolumeProperties.properties.coolnessPeriod + /// /// /// coolAccessRetrievalPolicy determines the data retrieval behavior from the cool tier to standard storage based on the read pattern for cool access enabled volumes. The possible values for this field are: /// Default - Data will be pulled from cool tier to standard storage on random reads. This policy is the default. /// OnRead - All client-driven data read is pulled from cool tier to standard storage on both sequential and random reads. /// Never - No client-driven data is pulled from cool tier to standard storage. + /// Serialized Name: VolumeGroupVolumeProperties.properties.coolAccessRetrievalPolicy + /// + /// + /// UNIX permissions for NFS volume accepted in octal 4 digit format. First digit selects the set user ID(4), set group ID (2) and sticky (1) attributes. Second digit selects permission for the owner of the file: read (4), write (2) and execute (1). Third selects permissions for other users in the same group. the fourth for other users not in the group. 0755 - gives read/write/execute permissions to owner and read/execute to group and other users. + /// Serialized Name: VolumeGroupVolumeProperties.properties.unixPermissions + /// + /// + /// When a volume is being restored from another volume's snapshot, will show the percentage completion of this cloning process. When this value is empty/null there is no cloning process currently happening on this volume. This value will update every 5 minutes during cloning. + /// Serialized Name: VolumeGroupVolumeProperties.properties.cloneProgress + /// + /// + /// Flag indicating whether file access logs are enabled for the volume, based on active diagnostic settings present on the volume. + /// Serialized Name: VolumeGroupVolumeProperties.properties.fileAccessLogs + /// + /// + /// Specifies whether the volume is enabled for Azure VMware Solution (AVS) datastore purpose + /// Serialized Name: VolumeGroupVolumeProperties.properties.avsDataStore + /// + /// + /// Data store resource unique identifier + /// Serialized Name: VolumeGroupVolumeProperties.properties.dataStoreResourceId + /// + /// + /// Specifies if default quota is enabled for the volume. + /// Serialized Name: VolumeGroupVolumeProperties.properties.isDefaultQuotaEnabled + /// + /// + /// Default user quota for volume in KiBs. If isDefaultQuotaEnabled is set, the minimum value of 4 KiBs applies . + /// Serialized Name: VolumeGroupVolumeProperties.properties.defaultUserQuotaInKiBs + /// + /// + /// Default group quota for volume in KiBs. If isDefaultQuotaEnabled is set, the minimum value of 4 KiBs applies. + /// Serialized Name: VolumeGroupVolumeProperties.properties.defaultGroupQuotaInKiBs + /// + /// + /// Maximum number of files allowed. Needs a service request in order to be changed. Only allowed to be changed if volume quota is more than 4TiB. + /// Serialized Name: VolumeGroupVolumeProperties.properties.maximumNumberOfFiles + /// + /// + /// Volume Group Name + /// Serialized Name: VolumeGroupVolumeProperties.properties.volumeGroupName + /// + /// + /// Pool Resource Id used in case of creating a volume through volume group + /// Serialized Name: VolumeGroupVolumeProperties.properties.capacityPoolResourceId + /// + /// + /// Proximity placement group associated with the volume + /// Serialized Name: VolumeGroupVolumeProperties.properties.proximityPlacementGroup + /// + /// + /// T2 network information + /// Serialized Name: VolumeGroupVolumeProperties.properties.t2Network + /// + /// + /// Volume spec name is the application specific designation or identifier for the particular volume in a volume group for e.g. data, log + /// Serialized Name: VolumeGroupVolumeProperties.properties.volumeSpecName + /// + /// + /// Specifies if the volume is encrypted or not. Only available on volumes created or updated after 2022-01-01. + /// Serialized Name: VolumeGroupVolumeProperties.properties.encrypted + /// + /// + /// Application specific placement rules for the particular volume + /// Serialized Name: VolumeGroupVolumeProperties.properties.placementRules + /// + /// + /// Flag indicating whether subvolume operations are enabled on the volume + /// Serialized Name: VolumeGroupVolumeProperties.properties.enableSubvolumes + /// + /// + /// The availability zone where the volume is provisioned. This refers to the logical availability zone where the volume resides. + /// Serialized Name: VolumeGroupVolumeProperties.properties.provisionedAvailabilityZone + /// + /// + /// Specifies whether volume is a Large Volume or Regular Volume. + /// Serialized Name: VolumeGroupVolumeProperties.properties.isLargeVolume + /// + /// + /// Id of the snapshot or backup that the volume is restored from. + /// Serialized Name: VolumeGroupVolumeProperties.properties.originatingResourceId /// - /// UNIX permissions for NFS volume accepted in octal 4 digit format. First digit selects the set user ID(4), set group ID (2) and sticky (1) attributes. Second digit selects permission for the owner of the file: read (4), write (2) and execute (1). Third selects permissions for other users in the same group. the fourth for other users not in the group. 0755 - gives read/write/execute permissions to owner and read/execute to group and other users. - /// When a volume is being restored from another volume's snapshot, will show the percentage completion of this cloning process. When this value is empty/null there is no cloning process currently happening on this volume. This value will update every 5 minutes during cloning. - /// Flag indicating whether file access logs are enabled for the volume, based on active diagnostic settings present on the volume. - /// Specifies whether the volume is enabled for Azure VMware Solution (AVS) datastore purpose. - /// Data store resource unique identifier. - /// Specifies if default quota is enabled for the volume. - /// Default user quota for volume in KiBs. If isDefaultQuotaEnabled is set, the minimum value of 4 KiBs applies . - /// Default group quota for volume in KiBs. If isDefaultQuotaEnabled is set, the minimum value of 4 KiBs applies. - /// Maximum number of files allowed. Needs a service request in order to be changed. Only allowed to be changed if volume quota is more than 4TiB. - /// Volume Group Name. - /// Pool Resource Id used in case of creating a volume through volume group. - /// Proximity placement group associated with the volume. - /// T2 network information. - /// Volume spec name is the application specific designation or identifier for the particular volume in a volume group for e.g. data, log. - /// Specifies if the volume is encrypted or not. Only available on volumes created or updated after 2022-01-01. - /// Application specific placement rules for the particular volume. - /// Flag indicating whether subvolume operations are enabled on the volume. - /// The availability zone where the volume is provisioned. This refers to the logical availability zone where the volume resides. - /// Specifies whether volume is a Large Volume or Regular Volume. - /// Id of the snapshot or backup that the volume is restored from. /// Keeps track of any properties unknown to the library. - internal NetAppVolumeGroupVolume(ResourceIdentifier id, string name, ResourceType? resourceType, IDictionary tags, IList zones, Guid? fileSystemId, string creationToken, NetAppFileServiceLevel? serviceLevel, long usageThreshold, VolumePropertiesExportPolicy exportPolicy, IList protocolTypes, string provisioningState, string snapshotId, bool? deleteBaseSnapshot, string backupId, string baremetalTenantId, ResourceIdentifier subnetId, NetAppNetworkFeature? networkFeatures, Guid? networkSiblingSetId, NetAppVolumeStorageToNetworkProximity? storageToNetworkProximity, IReadOnlyList mountTargets, string volumeType, NetAppVolumeDataProtection dataProtection, bool? isRestoring, bool? isSnapshotDirectoryVisible, bool? isKerberosEnabled, NetAppVolumeSecurityStyle? securityStyle, bool? isSmbEncryptionEnabled, SmbAccessBasedEnumeration? smbAccessBasedEnumeration, SmbNonBrowsable? smbNonBrowsable, bool? isSmbContinuouslyAvailable, float? throughputMibps, float? actualThroughputMibps, NetAppEncryptionKeySource? encryptionKeySource, ResourceIdentifier keyVaultPrivateEndpointResourceId, bool? isLdapEnabled, bool? isCoolAccessEnabled, int? coolnessPeriod, CoolAccessRetrievalPolicy? coolAccessRetrievalPolicy, string unixPermissions, int? cloneProgress, NetAppFileAccessLog? fileAccessLogs, NetAppAvsDataStore? avsDataStore, IReadOnlyList dataStoreResourceId, bool? isDefaultQuotaEnabled, long? defaultUserQuotaInKiBs, long? defaultGroupQuotaInKiBs, long? maximumNumberOfFiles, string volumeGroupName, ResourceIdentifier capacityPoolResourceId, ResourceIdentifier proximityPlacementGroupId, string t2Network, string volumeSpecName, bool? isEncrypted, IList placementRules, EnableNetAppSubvolume? enableSubvolumes, string provisionedAvailabilityZone, bool? isLargeVolume, ResourceIdentifier originatingResourceId, IDictionary serializedAdditionalRawData) + internal NetAppVolumeGroupVolume(ResourceIdentifier id, string name, ResourceType? resourceType, IDictionary tags, IList zones, Guid? fileSystemId, string creationToken, NetAppFileServiceLevel? serviceLevel, long usageThreshold, VolumePropertiesExportPolicy exportPolicy, IList protocolTypes, string provisioningState, string snapshotId, bool? deleteBaseSnapshot, string backupId, string baremetalTenantId, ResourceIdentifier subnetId, NetAppNetworkFeature? networkFeatures, NetAppNetworkFeature? effectiveNetworkFeatures, Guid? networkSiblingSetId, NetAppVolumeStorageToNetworkProximity? storageToNetworkProximity, IReadOnlyList mountTargets, string volumeType, NetAppVolumeDataProtection dataProtection, bool? isRestoring, bool? isSnapshotDirectoryVisible, bool? isKerberosEnabled, NetAppVolumeSecurityStyle? securityStyle, bool? isSmbEncryptionEnabled, SmbAccessBasedEnumeration? smbAccessBasedEnumeration, SmbNonBrowsable? smbNonBrowsable, bool? isSmbContinuouslyAvailable, float? throughputMibps, float? actualThroughputMibps, NetAppEncryptionKeySource? encryptionKeySource, ResourceIdentifier keyVaultPrivateEndpointResourceId, bool? isLdapEnabled, bool? isCoolAccessEnabled, int? coolnessPeriod, CoolAccessRetrievalPolicy? coolAccessRetrievalPolicy, string unixPermissions, int? cloneProgress, NetAppFileAccessLog? fileAccessLogs, NetAppAvsDataStore? avsDataStore, IReadOnlyList dataStoreResourceId, bool? isDefaultQuotaEnabled, long? defaultUserQuotaInKiBs, long? defaultGroupQuotaInKiBs, long? maximumNumberOfFiles, string volumeGroupName, ResourceIdentifier capacityPoolResourceId, ResourceIdentifier proximityPlacementGroupId, string t2Network, string volumeSpecName, bool? isEncrypted, IList placementRules, EnableNetAppSubvolume? enableSubvolumes, string provisionedAvailabilityZone, bool? isLargeVolume, ResourceIdentifier originatingResourceId, IDictionary serializedAdditionalRawData) { Id = id; Name = name; @@ -153,6 +344,7 @@ internal NetAppVolumeGroupVolume(ResourceIdentifier id, string name, ResourceTyp BaremetalTenantId = baremetalTenantId; SubnetId = subnetId; NetworkFeatures = networkFeatures; + EffectiveNetworkFeatures = effectiveNetworkFeatures; NetworkSiblingSetId = networkSiblingSetId; StorageToNetworkProximity = storageToNetworkProximity; MountTargets = mountTargets; @@ -202,27 +394,60 @@ internal NetAppVolumeGroupVolume() { } - /// Resource Id. + /// + /// Resource Id + /// Serialized Name: VolumeGroupVolumeProperties.id + /// public ResourceIdentifier Id { get; } - /// Resource name. + /// + /// Resource name + /// Serialized Name: VolumeGroupVolumeProperties.name + /// public string Name { get; set; } - /// Resource type. + /// + /// Resource type + /// Serialized Name: VolumeGroupVolumeProperties.type + /// public ResourceType? ResourceType { get; } - /// Resource tags. + /// + /// Resource tags + /// Serialized Name: VolumeGroupVolumeProperties.tags + /// public IDictionary Tags { get; } - /// Availability Zone. + /// + /// Availability Zone + /// Serialized Name: VolumeGroupVolumeProperties.zones + /// public IList Zones { get; } - /// Unique FileSystem Identifier. + /// + /// Unique FileSystem Identifier. + /// Serialized Name: VolumeGroupVolumeProperties.properties.fileSystemId + /// public Guid? FileSystemId { get; } - /// A unique file path for the volume. Used when creating mount targets. + /// + /// A unique file path for the volume. Used when creating mount targets + /// Serialized Name: VolumeGroupVolumeProperties.properties.creationToken + /// public string CreationToken { get; set; } - /// The service level of the file system. + /// + /// The service level of the file system + /// Serialized Name: VolumeGroupVolumeProperties.properties.serviceLevel + /// public NetAppFileServiceLevel? ServiceLevel { get; set; } - /// Maximum storage quota allowed for a file system in bytes. This is a soft quota used for alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. For large volumes, valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to 2400GiB to 2400TiB. Values expressed in bytes as multiples of 1 GiB. + /// + /// Maximum storage quota allowed for a file system in bytes. This is a soft quota used for alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. For large volumes, valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to 2400GiB to 2400TiB. Values expressed in bytes as multiples of 1 GiB. + /// Serialized Name: VolumeGroupVolumeProperties.properties.usageThreshold + /// public long UsageThreshold { get; set; } - /// Set of export policy rules. + /// + /// Set of export policy rules + /// Serialized Name: VolumeGroupVolumeProperties.properties.exportPolicy + /// internal VolumePropertiesExportPolicy ExportPolicy { get; set; } - /// Export policy rule. + /// + /// Export policy rule + /// Serialized Name: VolumePropertiesExportPolicy.rules + /// public IList ExportRules { get @@ -233,108 +458,258 @@ public IList ExportRules } } - /// Set of protocol types, default NFSv3, CIFS for SMB protocol. + /// + /// Set of protocol types, default NFSv3, CIFS for SMB protocol + /// Serialized Name: VolumeGroupVolumeProperties.properties.protocolTypes + /// public IList ProtocolTypes { get; } - /// Azure lifecycle management. + /// + /// Azure lifecycle management + /// Serialized Name: VolumeGroupVolumeProperties.properties.provisioningState + /// public string ProvisioningState { get; } - /// Resource identifier used to identify the Snapshot. + /// + /// Resource identifier used to identify the Snapshot. + /// Serialized Name: VolumeGroupVolumeProperties.properties.snapshotId + /// public string SnapshotId { get; set; } - /// If enabled (true) the snapshot the volume was created from will be automatically deleted after the volume create operation has finished. Defaults to false. + /// + /// If enabled (true) the snapshot the volume was created from will be automatically deleted after the volume create operation has finished. Defaults to false + /// Serialized Name: VolumeGroupVolumeProperties.properties.deleteBaseSnapshot + /// public bool? DeleteBaseSnapshot { get; set; } - /// Resource identifier used to identify the Backup. + /// + /// Resource identifier used to identify the Backup. + /// Serialized Name: VolumeGroupVolumeProperties.properties.backupId + /// public string BackupId { get; set; } - /// Unique Baremetal Tenant Identifier. + /// + /// Unique Baremetal Tenant Identifier. + /// Serialized Name: VolumeGroupVolumeProperties.properties.baremetalTenantId + /// public string BaremetalTenantId { get; } - /// The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes. + /// + /// The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes + /// Serialized Name: VolumeGroupVolumeProperties.properties.subnetId + /// public ResourceIdentifier SubnetId { get; set; } - /// Network features available to the volume, or current state of update. + /// + /// The original value of the network features type available to the volume at the time it was created. + /// Serialized Name: VolumeGroupVolumeProperties.properties.networkFeatures + /// public NetAppNetworkFeature? NetworkFeatures { get; set; } - /// Network Sibling Set ID for the the group of volumes sharing networking resources. + /// + /// The effective value of the network features type available to the volume, or current effective state of update. + /// Serialized Name: VolumeGroupVolumeProperties.properties.effectiveNetworkFeatures + /// + public NetAppNetworkFeature? EffectiveNetworkFeatures { get; } + /// + /// Network Sibling Set ID for the the group of volumes sharing networking resources. + /// Serialized Name: VolumeGroupVolumeProperties.properties.networkSiblingSetId + /// public Guid? NetworkSiblingSetId { get; } - /// Provides storage to network proximity information for the volume. + /// + /// Provides storage to network proximity information for the volume. + /// Serialized Name: VolumeGroupVolumeProperties.properties.storageToNetworkProximity + /// public NetAppVolumeStorageToNetworkProximity? StorageToNetworkProximity { get; } - /// List of mount targets. + /// + /// List of mount targets + /// Serialized Name: VolumeGroupVolumeProperties.properties.mountTargets + /// public IReadOnlyList MountTargets { get; } - /// What type of volume is this. For destination volumes in Cross Region Replication, set type to DataProtection. + /// + /// What type of volume is this. For destination volumes in Cross Region Replication, set type to DataProtection + /// Serialized Name: VolumeGroupVolumeProperties.properties.volumeType + /// public string VolumeType { get; set; } - /// DataProtection type volumes include an object containing details of the replication. + /// + /// DataProtection type volumes include an object containing details of the replication + /// Serialized Name: VolumeGroupVolumeProperties.properties.dataProtection + /// public NetAppVolumeDataProtection DataProtection { get; set; } - /// Restoring. + /// + /// Restoring + /// Serialized Name: VolumeGroupVolumeProperties.properties.isRestoring + /// public bool? IsRestoring { get; set; } - /// If enabled (true) the volume will contain a read-only snapshot directory which provides access to each of the volume's snapshots (defaults to true). + /// + /// If enabled (true) the volume will contain a read-only snapshot directory which provides access to each of the volume's snapshots (defaults to true). + /// Serialized Name: VolumeGroupVolumeProperties.properties.snapshotDirectoryVisible + /// public bool? IsSnapshotDirectoryVisible { get; set; } - /// Describe if a volume is KerberosEnabled. To be use with swagger version 2020-05-01 or later. + /// + /// Describe if a volume is KerberosEnabled. To be use with swagger version 2020-05-01 or later + /// Serialized Name: VolumeGroupVolumeProperties.properties.kerberosEnabled + /// public bool? IsKerberosEnabled { get; set; } - /// The security style of volume, default unix, defaults to ntfs for dual protocol or CIFS protocol. + /// + /// The security style of volume, default unix, defaults to ntfs for dual protocol or CIFS protocol + /// Serialized Name: VolumeGroupVolumeProperties.properties.securityStyle + /// public NetAppVolumeSecurityStyle? SecurityStyle { get; set; } - /// Enables encryption for in-flight smb3 data. Only applicable for SMB/DualProtocol volume. To be used with swagger version 2020-08-01 or later. + /// + /// Enables encryption for in-flight smb3 data. Only applicable for SMB/DualProtocol volume. To be used with swagger version 2020-08-01 or later + /// Serialized Name: VolumeGroupVolumeProperties.properties.smbEncryption + /// public bool? IsSmbEncryptionEnabled { get; set; } - /// Enables access-based enumeration share property for SMB Shares. Only applicable for SMB/DualProtocol volume. + /// + /// Enables access-based enumeration share property for SMB Shares. Only applicable for SMB/DualProtocol volume + /// Serialized Name: VolumeGroupVolumeProperties.properties.smbAccessBasedEnumeration + /// public SmbAccessBasedEnumeration? SmbAccessBasedEnumeration { get; set; } - /// Enables non-browsable property for SMB Shares. Only applicable for SMB/DualProtocol volume. + /// + /// Enables non-browsable property for SMB Shares. Only applicable for SMB/DualProtocol volume + /// Serialized Name: VolumeGroupVolumeProperties.properties.smbNonBrowsable + /// public SmbNonBrowsable? SmbNonBrowsable { get; set; } - /// Enables continuously available share property for smb volume. Only applicable for SMB volume. + /// + /// Enables continuously available share property for smb volume. Only applicable for SMB volume + /// Serialized Name: VolumeGroupVolumeProperties.properties.smbContinuouslyAvailable + /// public bool? IsSmbContinuouslyAvailable { get; set; } - /// Maximum throughput in MiB/s that can be achieved by this volume and this will be accepted as input only for manual qosType volume. + /// + /// Maximum throughput in MiB/s that can be achieved by this volume and this will be accepted as input only for manual qosType volume + /// Serialized Name: VolumeGroupVolumeProperties.properties.throughputMibps + /// public float? ThroughputMibps { get; set; } - /// Actual throughput in MiB/s for auto qosType volumes calculated based on size and serviceLevel. + /// + /// Actual throughput in MiB/s for auto qosType volumes calculated based on size and serviceLevel + /// Serialized Name: VolumeGroupVolumeProperties.properties.actualThroughputMibps + /// public float? ActualThroughputMibps { get; } - /// Source of key used to encrypt data in volume. Applicable if NetApp account has encryption.keySource = 'Microsoft.KeyVault'. Possible values (case-insensitive) are: 'Microsoft.NetApp, Microsoft.KeyVault'. + /// + /// Source of key used to encrypt data in volume. Applicable if NetApp account has encryption.keySource = 'Microsoft.KeyVault'. Possible values (case-insensitive) are: 'Microsoft.NetApp, Microsoft.KeyVault' + /// Serialized Name: VolumeGroupVolumeProperties.properties.encryptionKeySource + /// public NetAppEncryptionKeySource? EncryptionKeySource { get; set; } - /// The resource ID of private endpoint for KeyVault. It must reside in the same VNET as the volume. Only applicable if encryptionKeySource = 'Microsoft.KeyVault'. + /// + /// The resource ID of private endpoint for KeyVault. It must reside in the same VNET as the volume. Only applicable if encryptionKeySource = 'Microsoft.KeyVault'. + /// Serialized Name: VolumeGroupVolumeProperties.properties.keyVaultPrivateEndpointResourceId + /// public ResourceIdentifier KeyVaultPrivateEndpointResourceId { get; set; } - /// Specifies whether LDAP is enabled or not for a given NFS volume. + /// + /// Specifies whether LDAP is enabled or not for a given NFS volume. + /// Serialized Name: VolumeGroupVolumeProperties.properties.ldapEnabled + /// public bool? IsLdapEnabled { get; set; } - /// Specifies whether Cool Access(tiering) is enabled for the volume. + /// + /// Specifies whether Cool Access(tiering) is enabled for the volume. + /// Serialized Name: VolumeGroupVolumeProperties.properties.coolAccess + /// public bool? IsCoolAccessEnabled { get; set; } - /// Specifies the number of days after which data that is not accessed by clients will be tiered. + /// + /// Specifies the number of days after which data that is not accessed by clients will be tiered. + /// Serialized Name: VolumeGroupVolumeProperties.properties.coolnessPeriod + /// public int? CoolnessPeriod { get; set; } /// /// coolAccessRetrievalPolicy determines the data retrieval behavior from the cool tier to standard storage based on the read pattern for cool access enabled volumes. The possible values for this field are: /// Default - Data will be pulled from cool tier to standard storage on random reads. This policy is the default. /// OnRead - All client-driven data read is pulled from cool tier to standard storage on both sequential and random reads. /// Never - No client-driven data is pulled from cool tier to standard storage. + /// Serialized Name: VolumeGroupVolumeProperties.properties.coolAccessRetrievalPolicy /// public CoolAccessRetrievalPolicy? CoolAccessRetrievalPolicy { get; set; } - /// UNIX permissions for NFS volume accepted in octal 4 digit format. First digit selects the set user ID(4), set group ID (2) and sticky (1) attributes. Second digit selects permission for the owner of the file: read (4), write (2) and execute (1). Third selects permissions for other users in the same group. the fourth for other users not in the group. 0755 - gives read/write/execute permissions to owner and read/execute to group and other users. + /// + /// UNIX permissions for NFS volume accepted in octal 4 digit format. First digit selects the set user ID(4), set group ID (2) and sticky (1) attributes. Second digit selects permission for the owner of the file: read (4), write (2) and execute (1). Third selects permissions for other users in the same group. the fourth for other users not in the group. 0755 - gives read/write/execute permissions to owner and read/execute to group and other users. + /// Serialized Name: VolumeGroupVolumeProperties.properties.unixPermissions + /// public string UnixPermissions { get; set; } - /// When a volume is being restored from another volume's snapshot, will show the percentage completion of this cloning process. When this value is empty/null there is no cloning process currently happening on this volume. This value will update every 5 minutes during cloning. + /// + /// When a volume is being restored from another volume's snapshot, will show the percentage completion of this cloning process. When this value is empty/null there is no cloning process currently happening on this volume. This value will update every 5 minutes during cloning. + /// Serialized Name: VolumeGroupVolumeProperties.properties.cloneProgress + /// public int? CloneProgress { get; } - /// Flag indicating whether file access logs are enabled for the volume, based on active diagnostic settings present on the volume. + /// + /// Flag indicating whether file access logs are enabled for the volume, based on active diagnostic settings present on the volume. + /// Serialized Name: VolumeGroupVolumeProperties.properties.fileAccessLogs + /// public NetAppFileAccessLog? FileAccessLogs { get; } - /// Specifies whether the volume is enabled for Azure VMware Solution (AVS) datastore purpose. + /// + /// Specifies whether the volume is enabled for Azure VMware Solution (AVS) datastore purpose + /// Serialized Name: VolumeGroupVolumeProperties.properties.avsDataStore + /// public NetAppAvsDataStore? AvsDataStore { get; set; } - /// Data store resource unique identifier. + /// + /// Data store resource unique identifier + /// Serialized Name: VolumeGroupVolumeProperties.properties.dataStoreResourceId + /// public IReadOnlyList DataStoreResourceId { get; } - /// Specifies if default quota is enabled for the volume. + /// + /// Specifies if default quota is enabled for the volume. + /// Serialized Name: VolumeGroupVolumeProperties.properties.isDefaultQuotaEnabled + /// public bool? IsDefaultQuotaEnabled { get; set; } - /// Default user quota for volume in KiBs. If isDefaultQuotaEnabled is set, the minimum value of 4 KiBs applies . + /// + /// Default user quota for volume in KiBs. If isDefaultQuotaEnabled is set, the minimum value of 4 KiBs applies . + /// Serialized Name: VolumeGroupVolumeProperties.properties.defaultUserQuotaInKiBs + /// public long? DefaultUserQuotaInKiBs { get; set; } - /// Default group quota for volume in KiBs. If isDefaultQuotaEnabled is set, the minimum value of 4 KiBs applies. + /// + /// Default group quota for volume in KiBs. If isDefaultQuotaEnabled is set, the minimum value of 4 KiBs applies. + /// Serialized Name: VolumeGroupVolumeProperties.properties.defaultGroupQuotaInKiBs + /// public long? DefaultGroupQuotaInKiBs { get; set; } - /// Maximum number of files allowed. Needs a service request in order to be changed. Only allowed to be changed if volume quota is more than 4TiB. + /// + /// Maximum number of files allowed. Needs a service request in order to be changed. Only allowed to be changed if volume quota is more than 4TiB. + /// Serialized Name: VolumeGroupVolumeProperties.properties.maximumNumberOfFiles + /// public long? MaximumNumberOfFiles { get; } - /// Volume Group Name. + /// + /// Volume Group Name + /// Serialized Name: VolumeGroupVolumeProperties.properties.volumeGroupName + /// public string VolumeGroupName { get; } - /// Pool Resource Id used in case of creating a volume through volume group. + /// + /// Pool Resource Id used in case of creating a volume through volume group + /// Serialized Name: VolumeGroupVolumeProperties.properties.capacityPoolResourceId + /// public ResourceIdentifier CapacityPoolResourceId { get; set; } - /// Proximity placement group associated with the volume. + /// + /// Proximity placement group associated with the volume + /// Serialized Name: VolumeGroupVolumeProperties.properties.proximityPlacementGroup + /// public ResourceIdentifier ProximityPlacementGroupId { get; set; } - /// T2 network information. + /// + /// T2 network information + /// Serialized Name: VolumeGroupVolumeProperties.properties.t2Network + /// public string T2Network { get; } - /// Volume spec name is the application specific designation or identifier for the particular volume in a volume group for e.g. data, log. + /// + /// Volume spec name is the application specific designation or identifier for the particular volume in a volume group for e.g. data, log + /// Serialized Name: VolumeGroupVolumeProperties.properties.volumeSpecName + /// public string VolumeSpecName { get; set; } - /// Specifies if the volume is encrypted or not. Only available on volumes created or updated after 2022-01-01. + /// + /// Specifies if the volume is encrypted or not. Only available on volumes created or updated after 2022-01-01. + /// Serialized Name: VolumeGroupVolumeProperties.properties.encrypted + /// public bool? IsEncrypted { get; } - /// Application specific placement rules for the particular volume. + /// + /// Application specific placement rules for the particular volume + /// Serialized Name: VolumeGroupVolumeProperties.properties.placementRules + /// public IList PlacementRules { get; } - /// Flag indicating whether subvolume operations are enabled on the volume. + /// + /// Flag indicating whether subvolume operations are enabled on the volume + /// Serialized Name: VolumeGroupVolumeProperties.properties.enableSubvolumes + /// public EnableNetAppSubvolume? EnableSubvolumes { get; set; } - /// The availability zone where the volume is provisioned. This refers to the logical availability zone where the volume resides. + /// + /// The availability zone where the volume is provisioned. This refers to the logical availability zone where the volume resides. + /// Serialized Name: VolumeGroupVolumeProperties.properties.provisionedAvailabilityZone + /// public string ProvisionedAvailabilityZone { get; } - /// Specifies whether volume is a Large Volume or Regular Volume. + /// + /// Specifies whether volume is a Large Volume or Regular Volume. + /// Serialized Name: VolumeGroupVolumeProperties.properties.isLargeVolume + /// public bool? IsLargeVolume { get; set; } - /// Id of the snapshot or backup that the volume is restored from. + /// + /// Id of the snapshot or backup that the volume is restored from. + /// Serialized Name: VolumeGroupVolumeProperties.properties.originatingResourceId + /// public ResourceIdentifier OriginatingResourceId { get; } } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeMountTarget.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeMountTarget.cs index 373129941bc6..6490bd428739 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeMountTarget.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeMountTarget.cs @@ -11,7 +11,10 @@ namespace Azure.ResourceManager.NetApp.Models { - /// Mount target properties. + /// + /// Mount target properties + /// Serialized Name: MountTargetProperties + /// public partial class NetAppVolumeMountTarget { /// @@ -47,17 +50,32 @@ public partial class NetAppVolumeMountTarget private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// UUID v4 used to identify the MountTarget. + /// + /// UUID v4 used to identify the MountTarget + /// Serialized Name: MountTargetProperties.fileSystemId + /// internal NetAppVolumeMountTarget(Guid fileSystemId) { FileSystemId = fileSystemId; } /// Initializes a new instance of . - /// UUID v4 used to identify the MountTarget. - /// UUID v4 used to identify the MountTarget. - /// The mount target's IPv4 address. - /// The SMB server's Fully Qualified Domain Name, FQDN. + /// + /// UUID v4 used to identify the MountTarget + /// Serialized Name: MountTargetProperties.mountTargetId + /// + /// + /// UUID v4 used to identify the MountTarget + /// Serialized Name: MountTargetProperties.fileSystemId + /// + /// + /// The mount target's IPv4 address + /// Serialized Name: MountTargetProperties.ipAddress + /// + /// + /// The SMB server's Fully Qualified Domain Name, FQDN + /// Serialized Name: MountTargetProperties.smbServerFqdn + /// /// Keeps track of any properties unknown to the library. internal NetAppVolumeMountTarget(Guid? mountTargetId, Guid fileSystemId, IPAddress ipAddress, string smbServerFqdn, IDictionary serializedAdditionalRawData) { @@ -73,13 +91,25 @@ internal NetAppVolumeMountTarget() { } - /// UUID v4 used to identify the MountTarget. + /// + /// UUID v4 used to identify the MountTarget + /// Serialized Name: MountTargetProperties.mountTargetId + /// public Guid? MountTargetId { get; } - /// UUID v4 used to identify the MountTarget. + /// + /// UUID v4 used to identify the MountTarget + /// Serialized Name: MountTargetProperties.fileSystemId + /// public Guid FileSystemId { get; } - /// The mount target's IPv4 address. + /// + /// The mount target's IPv4 address + /// Serialized Name: MountTargetProperties.ipAddress + /// public IPAddress IPAddress { get; } - /// The SMB server's Fully Qualified Domain Name, FQDN. + /// + /// The SMB server's Fully Qualified Domain Name, FQDN + /// Serialized Name: MountTargetProperties.smbServerFqdn + /// public string SmbServerFqdn { get; } } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumePatch.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumePatch.cs index bfd91e3b1a6a..d6c3163fabf4 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumePatch.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumePatch.cs @@ -12,7 +12,10 @@ namespace Azure.ResourceManager.NetApp.Models { - /// Volume patch resource. + /// + /// Volume patch resource + /// Serialized Name: VolumePatch + /// public partial class NetAppVolumePatch : TrackedResourceData { /// @@ -61,27 +64,73 @@ public NetAppVolumePatch(AzureLocation location) : base(location) /// The systemData. /// The tags. /// The location. - /// The service level of the file system. - /// Maximum storage quota allowed for a file system in bytes. This is a soft quota used for alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. For large volumes, valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to 2400GiB to 2400TiB. Values expressed in bytes as multiples of 1 GiB. - /// Set of export policy rules. - /// Set of protocol types, default NFSv3, CIFS for SMB protocol. - /// Maximum throughput in MiB/s that can be achieved by this volume and this will be accepted as input only for manual qosType volume. - /// DataProtection type volumes include an object containing details of the replication. - /// Specifies if default quota is enabled for the volume. - /// Default user quota for volume in KiBs. If isDefaultQuotaEnabled is set, the minimum value of 4 KiBs applies . - /// Default group quota for volume in KiBs. If isDefaultQuotaEnabled is set, the minimum value of 4 KiBs applies. - /// UNIX permissions for NFS volume accepted in octal 4 digit format. First digit selects the set user ID(4), set group ID (2) and sticky (1) attributes. Second digit selects permission for the owner of the file: read (4), write (2) and execute (1). Third selects permissions for other users in the same group. the fourth for other users not in the group. 0755 - gives read/write/execute permissions to owner and read/execute to group and other users. - /// Specifies whether Cool Access(tiering) is enabled for the volume. - /// Specifies the number of days after which data that is not accessed by clients will be tiered. + /// + /// The service level of the file system + /// Serialized Name: VolumePatch.properties.serviceLevel + /// + /// + /// Maximum storage quota allowed for a file system in bytes. This is a soft quota used for alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. For large volumes, valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to 2400GiB to 2400TiB. Values expressed in bytes as multiples of 1 GiB. + /// Serialized Name: VolumePatch.properties.usageThreshold + /// + /// + /// Set of export policy rules + /// Serialized Name: VolumePatch.properties.exportPolicy + /// + /// + /// Set of protocol types, default NFSv3, CIFS for SMB protocol + /// Serialized Name: VolumePatch.properties.protocolTypes + /// + /// + /// Maximum throughput in MiB/s that can be achieved by this volume and this will be accepted as input only for manual qosType volume + /// Serialized Name: VolumePatch.properties.throughputMibps + /// + /// + /// DataProtection type volumes include an object containing details of the replication + /// Serialized Name: VolumePatch.properties.dataProtection + /// + /// + /// Specifies if default quota is enabled for the volume. + /// Serialized Name: VolumePatch.properties.isDefaultQuotaEnabled + /// + /// + /// Default user quota for volume in KiBs. If isDefaultQuotaEnabled is set, the minimum value of 4 KiBs applies . + /// Serialized Name: VolumePatch.properties.defaultUserQuotaInKiBs + /// + /// + /// Default group quota for volume in KiBs. If isDefaultQuotaEnabled is set, the minimum value of 4 KiBs applies. + /// Serialized Name: VolumePatch.properties.defaultGroupQuotaInKiBs + /// + /// + /// UNIX permissions for NFS volume accepted in octal 4 digit format. First digit selects the set user ID(4), set group ID (2) and sticky (1) attributes. Second digit selects permission for the owner of the file: read (4), write (2) and execute (1). Third selects permissions for other users in the same group. the fourth for other users not in the group. 0755 - gives read/write/execute permissions to owner and read/execute to group and other users. + /// Serialized Name: VolumePatch.properties.unixPermissions + /// + /// + /// Specifies whether Cool Access(tiering) is enabled for the volume. + /// Serialized Name: VolumePatch.properties.coolAccess + /// + /// + /// Specifies the number of days after which data that is not accessed by clients will be tiered. + /// Serialized Name: VolumePatch.properties.coolnessPeriod + /// /// /// coolAccessRetrievalPolicy determines the data retrieval behavior from the cool tier to standard storage based on the read pattern for cool access enabled volumes. The possible values for this field are: /// Default - Data will be pulled from cool tier to standard storage on random reads. This policy is the default. /// OnRead - All client-driven data read is pulled from cool tier to standard storage on both sequential and random reads. /// Never - No client-driven data is pulled from cool tier to standard storage. + /// Serialized Name: VolumePatch.properties.coolAccessRetrievalPolicy + /// + /// + /// If enabled (true) the volume will contain a read-only snapshot directory which provides access to each of the volume's snapshots. + /// Serialized Name: VolumePatch.properties.snapshotDirectoryVisible + /// + /// + /// Enables access-based enumeration share property for SMB Shares. Only applicable for SMB/DualProtocol volume + /// Serialized Name: VolumePatch.properties.smbAccessBasedEnumeration + /// + /// + /// Enables non-browsable property for SMB Shares. Only applicable for SMB/DualProtocol volume + /// Serialized Name: VolumePatch.properties.smbNonBrowsable /// - /// If enabled (true) the volume will contain a read-only snapshot directory which provides access to each of the volume's snapshots. - /// Enables access-based enumeration share property for SMB Shares. Only applicable for SMB/DualProtocol volume. - /// Enables non-browsable property for SMB Shares. Only applicable for SMB/DualProtocol volume. /// Keeps track of any properties unknown to the library. internal NetAppVolumePatch(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, NetAppFileServiceLevel? serviceLevel, long? usageThreshold, VolumePatchPropertiesExportPolicy exportPolicy, IList protocolTypes, float? throughputMibps, NetAppVolumePatchDataProtection dataProtection, bool? isDefaultQuotaEnabled, long? defaultUserQuotaInKiBs, long? defaultGroupQuotaInKiBs, string unixPermissions, bool? isCoolAccessEnabled, int? coolnessPeriod, CoolAccessRetrievalPolicy? coolAccessRetrievalPolicy, bool? isSnapshotDirectoryVisible, SmbAccessBasedEnumeration? smbAccessBasedEnumeration, SmbNonBrowsable? smbNonBrowsable, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { @@ -109,13 +158,25 @@ internal NetAppVolumePatch() { } - /// The service level of the file system. + /// + /// The service level of the file system + /// Serialized Name: VolumePatch.properties.serviceLevel + /// public NetAppFileServiceLevel? ServiceLevel { get; set; } - /// Maximum storage quota allowed for a file system in bytes. This is a soft quota used for alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. For large volumes, valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to 2400GiB to 2400TiB. Values expressed in bytes as multiples of 1 GiB. + /// + /// Maximum storage quota allowed for a file system in bytes. This is a soft quota used for alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. For large volumes, valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to 2400GiB to 2400TiB. Values expressed in bytes as multiples of 1 GiB. + /// Serialized Name: VolumePatch.properties.usageThreshold + /// public long? UsageThreshold { get; set; } - /// Set of export policy rules. + /// + /// Set of export policy rules + /// Serialized Name: VolumePatch.properties.exportPolicy + /// internal VolumePatchPropertiesExportPolicy ExportPolicy { get; set; } - /// Export policy rule. + /// + /// Export policy rule + /// Serialized Name: VolumePatchPropertiesExportPolicy.rules + /// public IList ExportRules { get @@ -126,36 +187,73 @@ public IList ExportRules } } - /// Set of protocol types, default NFSv3, CIFS for SMB protocol. + /// + /// Set of protocol types, default NFSv3, CIFS for SMB protocol + /// Serialized Name: VolumePatch.properties.protocolTypes + /// public IList ProtocolTypes { get; } - /// Maximum throughput in MiB/s that can be achieved by this volume and this will be accepted as input only for manual qosType volume. + /// + /// Maximum throughput in MiB/s that can be achieved by this volume and this will be accepted as input only for manual qosType volume + /// Serialized Name: VolumePatch.properties.throughputMibps + /// public float? ThroughputMibps { get; set; } - /// DataProtection type volumes include an object containing details of the replication. + /// + /// DataProtection type volumes include an object containing details of the replication + /// Serialized Name: VolumePatch.properties.dataProtection + /// public NetAppVolumePatchDataProtection DataProtection { get; set; } - /// Specifies if default quota is enabled for the volume. + /// + /// Specifies if default quota is enabled for the volume. + /// Serialized Name: VolumePatch.properties.isDefaultQuotaEnabled + /// public bool? IsDefaultQuotaEnabled { get; set; } - /// Default user quota for volume in KiBs. If isDefaultQuotaEnabled is set, the minimum value of 4 KiBs applies . + /// + /// Default user quota for volume in KiBs. If isDefaultQuotaEnabled is set, the minimum value of 4 KiBs applies . + /// Serialized Name: VolumePatch.properties.defaultUserQuotaInKiBs + /// public long? DefaultUserQuotaInKiBs { get; set; } - /// Default group quota for volume in KiBs. If isDefaultQuotaEnabled is set, the minimum value of 4 KiBs applies. + /// + /// Default group quota for volume in KiBs. If isDefaultQuotaEnabled is set, the minimum value of 4 KiBs applies. + /// Serialized Name: VolumePatch.properties.defaultGroupQuotaInKiBs + /// public long? DefaultGroupQuotaInKiBs { get; set; } - /// UNIX permissions for NFS volume accepted in octal 4 digit format. First digit selects the set user ID(4), set group ID (2) and sticky (1) attributes. Second digit selects permission for the owner of the file: read (4), write (2) and execute (1). Third selects permissions for other users in the same group. the fourth for other users not in the group. 0755 - gives read/write/execute permissions to owner and read/execute to group and other users. + /// + /// UNIX permissions for NFS volume accepted in octal 4 digit format. First digit selects the set user ID(4), set group ID (2) and sticky (1) attributes. Second digit selects permission for the owner of the file: read (4), write (2) and execute (1). Third selects permissions for other users in the same group. the fourth for other users not in the group. 0755 - gives read/write/execute permissions to owner and read/execute to group and other users. + /// Serialized Name: VolumePatch.properties.unixPermissions + /// public string UnixPermissions { get; set; } - /// Specifies whether Cool Access(tiering) is enabled for the volume. + /// + /// Specifies whether Cool Access(tiering) is enabled for the volume. + /// Serialized Name: VolumePatch.properties.coolAccess + /// public bool? IsCoolAccessEnabled { get; set; } - /// Specifies the number of days after which data that is not accessed by clients will be tiered. + /// + /// Specifies the number of days after which data that is not accessed by clients will be tiered. + /// Serialized Name: VolumePatch.properties.coolnessPeriod + /// public int? CoolnessPeriod { get; set; } /// /// coolAccessRetrievalPolicy determines the data retrieval behavior from the cool tier to standard storage based on the read pattern for cool access enabled volumes. The possible values for this field are: /// Default - Data will be pulled from cool tier to standard storage on random reads. This policy is the default. /// OnRead - All client-driven data read is pulled from cool tier to standard storage on both sequential and random reads. /// Never - No client-driven data is pulled from cool tier to standard storage. + /// Serialized Name: VolumePatch.properties.coolAccessRetrievalPolicy /// public CoolAccessRetrievalPolicy? CoolAccessRetrievalPolicy { get; set; } - /// If enabled (true) the volume will contain a read-only snapshot directory which provides access to each of the volume's snapshots. + /// + /// If enabled (true) the volume will contain a read-only snapshot directory which provides access to each of the volume's snapshots. + /// Serialized Name: VolumePatch.properties.snapshotDirectoryVisible + /// public bool? IsSnapshotDirectoryVisible { get; set; } - /// Enables access-based enumeration share property for SMB Shares. Only applicable for SMB/DualProtocol volume. + /// + /// Enables access-based enumeration share property for SMB Shares. Only applicable for SMB/DualProtocol volume + /// Serialized Name: VolumePatch.properties.smbAccessBasedEnumeration + /// public SmbAccessBasedEnumeration? SmbAccessBasedEnumeration { get; set; } - /// Enables non-browsable property for SMB Shares. Only applicable for SMB/DualProtocol volume. + /// + /// Enables non-browsable property for SMB Shares. Only applicable for SMB/DualProtocol volume + /// Serialized Name: VolumePatch.properties.smbNonBrowsable + /// public SmbNonBrowsable? SmbNonBrowsable { get; set; } } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumePatchDataProtection.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumePatchDataProtection.cs index 7e16cbc108a4..cb1cb10fced7 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumePatchDataProtection.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumePatchDataProtection.cs @@ -11,7 +11,10 @@ namespace Azure.ResourceManager.NetApp.Models { - /// DataProtection type volumes include an object containing details of the replication. + /// + /// DataProtection type volumes include an object containing details of the replication + /// Serialized Name: VolumePatchPropertiesDataProtection + /// public partial class NetAppVolumePatchDataProtection { /// @@ -52,8 +55,14 @@ public NetAppVolumePatchDataProtection() } /// Initializes a new instance of . - /// Backup Properties. - /// Snapshot properties. + /// + /// Backup Properties + /// Serialized Name: VolumePatchPropertiesDataProtection.backup + /// + /// + /// Snapshot properties. + /// Serialized Name: VolumePatchPropertiesDataProtection.snapshot + /// /// Keeps track of any properties unknown to the library. internal NetAppVolumePatchDataProtection(NetAppVolumeBackupConfiguration backup, VolumeSnapshotProperties snapshot, IDictionary serializedAdditionalRawData) { @@ -62,11 +71,20 @@ internal NetAppVolumePatchDataProtection(NetAppVolumeBackupConfiguration backup, _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Backup Properties. + /// + /// Backup Properties + /// Serialized Name: VolumePatchPropertiesDataProtection.backup + /// public NetAppVolumeBackupConfiguration Backup { get; set; } - /// Snapshot properties. + /// + /// Snapshot properties. + /// Serialized Name: VolumePatchPropertiesDataProtection.snapshot + /// internal VolumeSnapshotProperties Snapshot { get; set; } - /// Snapshot Policy ResourceId. + /// + /// Snapshot Policy ResourceId + /// Serialized Name: VolumeSnapshotProperties.snapshotPolicyId + /// public ResourceIdentifier SnapshotPolicyId { get => Snapshot is null ? default : Snapshot.SnapshotPolicyId; diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumePlacementRule.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumePlacementRule.cs index 7a8fa4c99b93..e3b2316130bf 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumePlacementRule.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumePlacementRule.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.NetApp.Models { - /// Application specific parameters for the placement of volumes in the volume group. + /// + /// Application specific parameters for the placement of volumes in the volume group + /// Serialized Name: PlacementKeyValuePairs + /// public partial class NetAppVolumePlacementRule { /// @@ -46,8 +49,14 @@ public partial class NetAppVolumePlacementRule private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// Key for an application specific parameter for the placement of volumes in the volume group. - /// Value for an application specific parameter for the placement of volumes in the volume group. + /// + /// Key for an application specific parameter for the placement of volumes in the volume group + /// Serialized Name: PlacementKeyValuePairs.key + /// + /// + /// Value for an application specific parameter for the placement of volumes in the volume group + /// Serialized Name: PlacementKeyValuePairs.value + /// /// or is null. public NetAppVolumePlacementRule(string key, string value) { @@ -59,8 +68,14 @@ public NetAppVolumePlacementRule(string key, string value) } /// Initializes a new instance of . - /// Key for an application specific parameter for the placement of volumes in the volume group. - /// Value for an application specific parameter for the placement of volumes in the volume group. + /// + /// Key for an application specific parameter for the placement of volumes in the volume group + /// Serialized Name: PlacementKeyValuePairs.key + /// + /// + /// Value for an application specific parameter for the placement of volumes in the volume group + /// Serialized Name: PlacementKeyValuePairs.value + /// /// Keeps track of any properties unknown to the library. internal NetAppVolumePlacementRule(string key, string value, IDictionary serializedAdditionalRawData) { @@ -74,9 +89,15 @@ internal NetAppVolumePlacementRule() { } - /// Key for an application specific parameter for the placement of volumes in the volume group. + /// + /// Key for an application specific parameter for the placement of volumes in the volume group + /// Serialized Name: PlacementKeyValuePairs.key + /// public string Key { get; set; } - /// Value for an application specific parameter for the placement of volumes in the volume group. + /// + /// Value for an application specific parameter for the placement of volumes in the volume group + /// Serialized Name: PlacementKeyValuePairs.value + /// public string Value { get; set; } } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumePoolChangeContent.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumePoolChangeContent.cs index 07ad52c68dd8..9d80e96f6ee4 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumePoolChangeContent.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumePoolChangeContent.cs @@ -11,7 +11,10 @@ namespace Azure.ResourceManager.NetApp.Models { - /// Pool change request. + /// + /// Pool change request + /// Serialized Name: PoolChangeRequest + /// public partial class NetAppVolumePoolChangeContent { /// @@ -47,7 +50,10 @@ public partial class NetAppVolumePoolChangeContent private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// Resource id of the pool to move volume to. + /// + /// Resource id of the pool to move volume to + /// Serialized Name: PoolChangeRequest.newPoolResourceId + /// /// is null. public NetAppVolumePoolChangeContent(ResourceIdentifier newPoolResourceId) { @@ -57,7 +63,10 @@ public NetAppVolumePoolChangeContent(ResourceIdentifier newPoolResourceId) } /// Initializes a new instance of . - /// Resource id of the pool to move volume to. + /// + /// Resource id of the pool to move volume to + /// Serialized Name: PoolChangeRequest.newPoolResourceId + /// /// Keeps track of any properties unknown to the library. internal NetAppVolumePoolChangeContent(ResourceIdentifier newPoolResourceId, IDictionary serializedAdditionalRawData) { @@ -70,7 +79,10 @@ internal NetAppVolumePoolChangeContent() { } - /// Resource id of the pool to move volume to. + /// + /// Resource id of the pool to move volume to + /// Serialized Name: PoolChangeRequest.newPoolResourceId + /// public ResourceIdentifier NewPoolResourceId { get; } } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeQuotaRulePatch.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeQuotaRulePatch.cs index fafd231dbd9b..3a6741a53f4d 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeQuotaRulePatch.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeQuotaRulePatch.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.NetApp.Models { - /// Patchable Quota Rule of a Volume. + /// + /// Patchable Quota Rule of a Volume + /// Serialized Name: VolumeQuotaRulePatch + /// public partial class NetAppVolumeQuotaRulePatch { /// @@ -52,11 +55,26 @@ public NetAppVolumeQuotaRulePatch() } /// Initializes a new instance of . - /// Resource tags. - /// Gets the status of the VolumeQuotaRule at the time the operation was called. - /// Size of quota. - /// Type of quota. - /// UserID/GroupID/SID based on the quota target type. UserID and groupID can be found by running ‘id’ or ‘getent’ command for the user or group and SID can be found by running <wmic useraccount where name='user-name' get sid>. + /// + /// Resource tags + /// Serialized Name: VolumeQuotaRulePatch.tags + /// + /// + /// Gets the status of the VolumeQuotaRule at the time the operation was called. + /// Serialized Name: VolumeQuotaRulePatch.properties.provisioningState + /// + /// + /// Size of quota + /// Serialized Name: VolumeQuotaRulePatch.properties.quotaSizeInKiBs + /// + /// + /// Type of quota + /// Serialized Name: VolumeQuotaRulePatch.properties.quotaType + /// + /// + /// UserID/GroupID/SID based on the quota target type. UserID and groupID can be found by running ‘id’ or ‘getent’ command for the user or group and SID can be found by running <wmic useraccount where name='user-name' get sid> + /// Serialized Name: VolumeQuotaRulePatch.properties.quotaTarget + /// /// Keeps track of any properties unknown to the library. internal NetAppVolumeQuotaRulePatch(IDictionary tags, NetAppProvisioningState? provisioningState, long? quotaSizeInKiBs, NetAppVolumeQuotaType? quotaType, string quotaTarget, IDictionary serializedAdditionalRawData) { @@ -68,15 +86,30 @@ internal NetAppVolumeQuotaRulePatch(IDictionary tags, NetAppProv _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Resource tags. + /// + /// Resource tags + /// Serialized Name: VolumeQuotaRulePatch.tags + /// public IDictionary Tags { get; } - /// Gets the status of the VolumeQuotaRule at the time the operation was called. + /// + /// Gets the status of the VolumeQuotaRule at the time the operation was called. + /// Serialized Name: VolumeQuotaRulePatch.properties.provisioningState + /// public NetAppProvisioningState? ProvisioningState { get; } - /// Size of quota. + /// + /// Size of quota + /// Serialized Name: VolumeQuotaRulePatch.properties.quotaSizeInKiBs + /// public long? QuotaSizeInKiBs { get; set; } - /// Type of quota. + /// + /// Type of quota + /// Serialized Name: VolumeQuotaRulePatch.properties.quotaType + /// public NetAppVolumeQuotaType? QuotaType { get; set; } - /// UserID/GroupID/SID based on the quota target type. UserID and groupID can be found by running ‘id’ or ‘getent’ command for the user or group and SID can be found by running <wmic useraccount where name='user-name' get sid>. + /// + /// UserID/GroupID/SID based on the quota target type. UserID and groupID can be found by running ‘id’ or ‘getent’ command for the user or group and SID can be found by running <wmic useraccount where name='user-name' get sid> + /// Serialized Name: VolumeQuotaRulePatch.properties.quotaTarget + /// public string QuotaTarget { get; set; } } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeQuotaType.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeQuotaType.cs index 431fe15447af..6db80ca7ee05 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeQuotaType.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeQuotaType.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.NetApp.Models { - /// Type of quota. + /// + /// Type of quota + /// Serialized Name: Type + /// public readonly partial struct NetAppVolumeQuotaType : IEquatable { private readonly string _value; @@ -27,13 +30,25 @@ public NetAppVolumeQuotaType(string value) private const string IndividualUserQuotaValue = "IndividualUserQuota"; private const string IndividualGroupQuotaValue = "IndividualGroupQuota"; - /// Default user quota. + /// + /// Default user quota + /// Serialized Name: Type.DefaultUserQuota + /// public static NetAppVolumeQuotaType DefaultUserQuota { get; } = new NetAppVolumeQuotaType(DefaultUserQuotaValue); - /// Default group quota. + /// + /// Default group quota + /// Serialized Name: Type.DefaultGroupQuota + /// public static NetAppVolumeQuotaType DefaultGroupQuota { get; } = new NetAppVolumeQuotaType(DefaultGroupQuotaValue); - /// Individual user quota. + /// + /// Individual user quota + /// Serialized Name: Type.IndividualUserQuota + /// public static NetAppVolumeQuotaType IndividualUserQuota { get; } = new NetAppVolumeQuotaType(IndividualUserQuotaValue); - /// Individual group quota. + /// + /// Individual group quota + /// Serialized Name: Type.IndividualGroupQuota + /// public static NetAppVolumeQuotaType IndividualGroupQuota { get; } = new NetAppVolumeQuotaType(IndividualGroupQuotaValue); /// Determines if two values are the same. public static bool operator ==(NetAppVolumeQuotaType left, NetAppVolumeQuotaType right) => left.Equals(right); diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeReestablishReplicationContent.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeReestablishReplicationContent.cs index e9e430126e23..7d2675d0c961 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeReestablishReplicationContent.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeReestablishReplicationContent.cs @@ -11,7 +11,10 @@ namespace Azure.ResourceManager.NetApp.Models { - /// Re-establish request object supplied in the body of the operation. + /// + /// Re-establish request object supplied in the body of the operation. + /// Serialized Name: ReestablishReplicationRequest + /// public partial class NetAppVolumeReestablishReplicationContent { /// @@ -52,7 +55,10 @@ public NetAppVolumeReestablishReplicationContent() } /// Initializes a new instance of . - /// Resource id of the source volume for the replication. + /// + /// Resource id of the source volume for the replication + /// Serialized Name: ReestablishReplicationRequest.sourceVolumeId + /// /// Keeps track of any properties unknown to the library. internal NetAppVolumeReestablishReplicationContent(ResourceIdentifier sourceVolumeId, IDictionary serializedAdditionalRawData) { @@ -60,7 +66,10 @@ internal NetAppVolumeReestablishReplicationContent(ResourceIdentifier sourceVolu _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Resource id of the source volume for the replication. + /// + /// Resource id of the source volume for the replication + /// Serialized Name: ReestablishReplicationRequest.sourceVolumeId + /// public ResourceIdentifier SourceVolumeId { get; set; } } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeRelocationProperties.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeRelocationProperties.cs index cba21b3116e6..862091357671 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeRelocationProperties.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeRelocationProperties.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.NetApp.Models { - /// Volume relocation properties. + /// + /// Volume relocation properties + /// Serialized Name: VolumeRelocationProperties + /// public partial class NetAppVolumeRelocationProperties { /// @@ -51,8 +54,14 @@ public NetAppVolumeRelocationProperties() } /// Initializes a new instance of . - /// Has relocation been requested for this volume. - /// Has relocation finished and is ready to be cleaned up. + /// + /// Has relocation been requested for this volume + /// Serialized Name: VolumeRelocationProperties.relocationRequested + /// + /// + /// Has relocation finished and is ready to be cleaned up + /// Serialized Name: VolumeRelocationProperties.readyToBeFinalized + /// /// Keeps track of any properties unknown to the library. internal NetAppVolumeRelocationProperties(bool? isRelocationRequested, bool? isReadyToBeFinalized, IDictionary serializedAdditionalRawData) { @@ -61,9 +70,15 @@ internal NetAppVolumeRelocationProperties(bool? isRelocationRequested, bool? isR _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Has relocation been requested for this volume. + /// + /// Has relocation been requested for this volume + /// Serialized Name: VolumeRelocationProperties.relocationRequested + /// public bool? IsRelocationRequested { get; set; } - /// Has relocation finished and is ready to be cleaned up. + /// + /// Has relocation finished and is ready to be cleaned up + /// Serialized Name: VolumeRelocationProperties.readyToBeFinalized + /// public bool? IsReadyToBeFinalized { get; } } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeReplication.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeReplication.cs index bd5b49140822..759d59343e45 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeReplication.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeReplication.cs @@ -11,7 +11,10 @@ namespace Azure.ResourceManager.NetApp.Models { - /// Replication properties. + /// + /// Replication properties + /// Serialized Name: Replication + /// public partial class NetAppVolumeReplication { /// @@ -47,7 +50,10 @@ public partial class NetAppVolumeReplication private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// The resource ID of the remote volume. + /// + /// The resource ID of the remote volume. + /// Serialized Name: Replication.remoteVolumeResourceId + /// /// is null. internal NetAppVolumeReplication(ResourceIdentifier remoteVolumeResourceId) { @@ -57,11 +63,26 @@ internal NetAppVolumeReplication(ResourceIdentifier remoteVolumeResourceId) } /// Initializes a new instance of . - /// UUID v4 used to identify the replication. - /// Indicates whether the local volume is the source or destination for the Volume Replication. - /// Schedule. - /// The resource ID of the remote volume. - /// The remote region for the other end of the Volume Replication. + /// + /// UUID v4 used to identify the replication. + /// Serialized Name: Replication.replicationId + /// + /// + /// Indicates whether the local volume is the source or destination for the Volume Replication + /// Serialized Name: Replication.endpointType + /// + /// + /// Schedule + /// Serialized Name: Replication.replicationSchedule + /// + /// + /// The resource ID of the remote volume. + /// Serialized Name: Replication.remoteVolumeResourceId + /// + /// + /// The remote region for the other end of the Volume Replication. + /// Serialized Name: Replication.remoteVolumeRegion + /// /// Keeps track of any properties unknown to the library. internal NetAppVolumeReplication(string replicationId, NetAppEndpointType? endpointType, NetAppReplicationSchedule? replicationSchedule, ResourceIdentifier remoteVolumeResourceId, string remoteVolumeRegion, IDictionary serializedAdditionalRawData) { @@ -78,15 +99,30 @@ internal NetAppVolumeReplication() { } - /// UUID v4 used to identify the replication. + /// + /// UUID v4 used to identify the replication. + /// Serialized Name: Replication.replicationId + /// public string ReplicationId { get; } - /// Indicates whether the local volume is the source or destination for the Volume Replication. + /// + /// Indicates whether the local volume is the source or destination for the Volume Replication + /// Serialized Name: Replication.endpointType + /// public NetAppEndpointType? EndpointType { get; } - /// Schedule. + /// + /// Schedule + /// Serialized Name: Replication.replicationSchedule + /// public NetAppReplicationSchedule? ReplicationSchedule { get; } - /// The resource ID of the remote volume. + /// + /// The resource ID of the remote volume. + /// Serialized Name: Replication.remoteVolumeResourceId + /// public ResourceIdentifier RemoteVolumeResourceId { get; } - /// The remote region for the other end of the Volume Replication. + /// + /// The remote region for the other end of the Volume Replication. + /// Serialized Name: Replication.remoteVolumeRegion + /// public string RemoteVolumeRegion { get; } } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeReplicationStatus.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeReplicationStatus.cs index 852259efa7fb..9aae3394261e 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeReplicationStatus.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeReplicationStatus.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.NetApp.Models { - /// Replication status. + /// + /// Replication status + /// Serialized Name: ReplicationStatus + /// public partial class NetAppVolumeReplicationStatus { /// @@ -51,11 +54,26 @@ internal NetAppVolumeReplicationStatus() } /// Initializes a new instance of . - /// Replication health check. - /// Status of the mirror relationship. - /// The status of the replication. - /// The progress of the replication. - /// Displays error message if the replication is in an error state. + /// + /// Replication health check + /// Serialized Name: ReplicationStatus.healthy + /// + /// + /// Status of the mirror relationship + /// Serialized Name: ReplicationStatus.relationshipStatus + /// + /// + /// The status of the replication + /// Serialized Name: ReplicationStatus.mirrorState + /// + /// + /// The progress of the replication + /// Serialized Name: ReplicationStatus.totalProgress + /// + /// + /// Displays error message if the replication is in an error state + /// Serialized Name: ReplicationStatus.errorMessage + /// /// Keeps track of any properties unknown to the library. internal NetAppVolumeReplicationStatus(bool? isHealthy, NetAppRelationshipStatus? relationshipStatus, NetAppMirrorState? mirrorState, string totalProgress, string errorMessage, IDictionary serializedAdditionalRawData) { @@ -67,15 +85,30 @@ internal NetAppVolumeReplicationStatus(bool? isHealthy, NetAppRelationshipStatus _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Replication health check. + /// + /// Replication health check + /// Serialized Name: ReplicationStatus.healthy + /// public bool? IsHealthy { get; } - /// Status of the mirror relationship. + /// + /// Status of the mirror relationship + /// Serialized Name: ReplicationStatus.relationshipStatus + /// public NetAppRelationshipStatus? RelationshipStatus { get; } - /// The status of the replication. + /// + /// The status of the replication + /// Serialized Name: ReplicationStatus.mirrorState + /// public NetAppMirrorState? MirrorState { get; } - /// The progress of the replication. + /// + /// The progress of the replication + /// Serialized Name: ReplicationStatus.totalProgress + /// public string TotalProgress { get; } - /// Displays error message if the replication is in an error state. + /// + /// Displays error message if the replication is in an error state + /// Serialized Name: ReplicationStatus.errorMessage + /// public string ErrorMessage { get; } } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeRevertContent.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeRevertContent.cs index 630f5acb4ed5..6196e2cb808f 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeRevertContent.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeRevertContent.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.NetApp.Models { - /// revert a volume to the snapshot. + /// + /// revert a volume to the snapshot + /// Serialized Name: VolumeRevert + /// public partial class NetAppVolumeRevertContent { /// @@ -51,7 +54,10 @@ public NetAppVolumeRevertContent() } /// Initializes a new instance of . - /// Resource id of the snapshot. + /// + /// Resource id of the snapshot + /// Serialized Name: VolumeRevert.snapshotId + /// /// Keeps track of any properties unknown to the library. internal NetAppVolumeRevertContent(string snapshotId, IDictionary serializedAdditionalRawData) { @@ -59,7 +65,10 @@ internal NetAppVolumeRevertContent(string snapshotId, IDictionary Resource id of the snapshot. + /// + /// Resource id of the snapshot + /// Serialized Name: VolumeRevert.snapshotId + /// public string SnapshotId { get; set; } } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeSecurityStyle.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeSecurityStyle.cs index fd27af64ccfb..25801d2ebbac 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeSecurityStyle.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeSecurityStyle.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.NetApp.Models { - /// The security style of volume, default unix, defaults to ntfs for dual protocol or CIFS protocol. + /// + /// The security style of volume, default unix, defaults to ntfs for dual protocol or CIFS protocol + /// Serialized Name: SecurityStyle + /// public readonly partial struct NetAppVolumeSecurityStyle : IEquatable { private readonly string _value; @@ -25,9 +28,15 @@ public NetAppVolumeSecurityStyle(string value) private const string NtfsValue = "ntfs"; private const string UnixValue = "unix"; - /// ntfs. + /// + /// ntfs + /// Serialized Name: SecurityStyle.ntfs + /// public static NetAppVolumeSecurityStyle Ntfs { get; } = new NetAppVolumeSecurityStyle(NtfsValue); - /// unix. + /// + /// unix + /// Serialized Name: SecurityStyle.unix + /// public static NetAppVolumeSecurityStyle Unix { get; } = new NetAppVolumeSecurityStyle(UnixValue); /// Determines if two values are the same. public static bool operator ==(NetAppVolumeSecurityStyle left, NetAppVolumeSecurityStyle right) => left.Equals(right); diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeSnapshotRestoreFilesContent.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeSnapshotRestoreFilesContent.cs index 4156ce0a5876..18432e4a38fd 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeSnapshotRestoreFilesContent.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeSnapshotRestoreFilesContent.cs @@ -11,7 +11,10 @@ namespace Azure.ResourceManager.NetApp.Models { - /// Restore payload for Single File Snapshot Restore. + /// + /// Restore payload for Single File Snapshot Restore + /// Serialized Name: SnapshotRestoreFiles + /// public partial class NetAppVolumeSnapshotRestoreFilesContent { /// @@ -47,7 +50,10 @@ public partial class NetAppVolumeSnapshotRestoreFilesContent private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// List of files to be restored. + /// + /// List of files to be restored + /// Serialized Name: SnapshotRestoreFiles.filePaths + /// /// is null. public NetAppVolumeSnapshotRestoreFilesContent(IEnumerable filePaths) { @@ -57,8 +63,14 @@ public NetAppVolumeSnapshotRestoreFilesContent(IEnumerable filePaths) } /// Initializes a new instance of . - /// List of files to be restored. - /// Destination folder where the files will be restored. + /// + /// List of files to be restored + /// Serialized Name: SnapshotRestoreFiles.filePaths + /// + /// + /// Destination folder where the files will be restored + /// Serialized Name: SnapshotRestoreFiles.destinationPath + /// /// Keeps track of any properties unknown to the library. internal NetAppVolumeSnapshotRestoreFilesContent(IList filePaths, string destinationPath, IDictionary serializedAdditionalRawData) { @@ -72,9 +84,15 @@ internal NetAppVolumeSnapshotRestoreFilesContent() { } - /// List of files to be restored. + /// + /// List of files to be restored + /// Serialized Name: SnapshotRestoreFiles.filePaths + /// public IList FilePaths { get; } - /// Destination folder where the files will be restored. + /// + /// Destination folder where the files will be restored + /// Serialized Name: SnapshotRestoreFiles.destinationPath + /// public string DestinationPath { get; set; } } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeStorageToNetworkProximity.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeStorageToNetworkProximity.cs index d57a82da5315..1666bc105fb5 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeStorageToNetworkProximity.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeStorageToNetworkProximity.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.NetApp.Models { - /// Provides storage to network proximity information for the volume. + /// + /// Provides storage to network proximity information for the volume. + /// Serialized Name: VolumeStorageToNetworkProximity + /// public readonly partial struct NetAppVolumeStorageToNetworkProximity : IEquatable { private readonly string _value; @@ -27,13 +30,25 @@ public NetAppVolumeStorageToNetworkProximity(string value) private const string T2Value = "T2"; private const string AcrossT2Value = "AcrossT2"; - /// Basic storage to network connectivity. + /// + /// Basic storage to network connectivity. + /// Serialized Name: VolumeStorageToNetworkProximity.Default + /// public static NetAppVolumeStorageToNetworkProximity Default { get; } = new NetAppVolumeStorageToNetworkProximity(DefaultValue); - /// Standard T1 storage to network connectivity. + /// + /// Standard T1 storage to network connectivity. + /// Serialized Name: VolumeStorageToNetworkProximity.T1 + /// public static NetAppVolumeStorageToNetworkProximity T1 { get; } = new NetAppVolumeStorageToNetworkProximity(T1Value); - /// Standard T2 storage to network connectivity. + /// + /// Standard T2 storage to network connectivity. + /// Serialized Name: VolumeStorageToNetworkProximity.T2 + /// public static NetAppVolumeStorageToNetworkProximity T2 { get; } = new NetAppVolumeStorageToNetworkProximity(T2Value); - /// Standard AcrossT2 storage to network connectivity. + /// + /// Standard AcrossT2 storage to network connectivity. + /// Serialized Name: VolumeStorageToNetworkProximity.AcrossT2 + /// public static NetAppVolumeStorageToNetworkProximity AcrossT2 { get; } = new NetAppVolumeStorageToNetworkProximity(AcrossT2Value); /// Determines if two values are the same. public static bool operator ==(NetAppVolumeStorageToNetworkProximity left, NetAppVolumeStorageToNetworkProximity right) => left.Equals(right); diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetworkSiblingSet.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetworkSiblingSet.cs index 6a9c3ba41cc4..8b68fe24a955 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetworkSiblingSet.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetworkSiblingSet.cs @@ -11,7 +11,10 @@ namespace Azure.ResourceManager.NetApp.Models { - /// Describes the contents of a network sibling set. + /// + /// Describes the contents of a network sibling set. + /// Serialized Name: NetworkSiblingSet + /// public partial class NetworkSiblingSet { /// @@ -53,12 +56,30 @@ internal NetworkSiblingSet() } /// Initializes a new instance of . - /// Network Sibling Set ID for a group of volumes sharing networking resources in a subnet. - /// The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes. Example /subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/{mySubnet}. - /// Network sibling set state Id identifying the current state of the sibling set. - /// Network features available to the volume, or current state of update. - /// Gets the status of the NetworkSiblingSet at the time the operation was called. - /// List of NIC information. + /// + /// Network Sibling Set ID for a group of volumes sharing networking resources in a subnet. + /// Serialized Name: NetworkSiblingSet.networkSiblingSetId + /// + /// + /// The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes. Example /subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/{mySubnet} + /// Serialized Name: NetworkSiblingSet.subnetId + /// + /// + /// Network sibling set state Id identifying the current state of the sibling set. + /// Serialized Name: NetworkSiblingSet.networkSiblingSetStateId + /// + /// + /// Network features available to the volume, or current state of update. + /// Serialized Name: NetworkSiblingSet.networkFeatures + /// + /// + /// Gets the status of the NetworkSiblingSet at the time the operation was called. + /// Serialized Name: NetworkSiblingSet.provisioningState + /// + /// + /// List of NIC information + /// Serialized Name: NetworkSiblingSet.nicInfoList + /// /// Keeps track of any properties unknown to the library. internal NetworkSiblingSet(string networkSiblingSetId, ResourceIdentifier subnetId, string networkSiblingSetStateId, NetAppNetworkFeature? networkFeatures, NetworkSiblingSetProvisioningState? provisioningState, IReadOnlyList nicInfoList, IDictionary serializedAdditionalRawData) { @@ -71,17 +92,35 @@ internal NetworkSiblingSet(string networkSiblingSetId, ResourceIdentifier subnet _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Network Sibling Set ID for a group of volumes sharing networking resources in a subnet. + /// + /// Network Sibling Set ID for a group of volumes sharing networking resources in a subnet. + /// Serialized Name: NetworkSiblingSet.networkSiblingSetId + /// public string NetworkSiblingSetId { get; } - /// The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes. Example /subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/{mySubnet}. + /// + /// The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes. Example /subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/{mySubnet} + /// Serialized Name: NetworkSiblingSet.subnetId + /// public ResourceIdentifier SubnetId { get; } - /// Network sibling set state Id identifying the current state of the sibling set. + /// + /// Network sibling set state Id identifying the current state of the sibling set. + /// Serialized Name: NetworkSiblingSet.networkSiblingSetStateId + /// public string NetworkSiblingSetStateId { get; } - /// Network features available to the volume, or current state of update. + /// + /// Network features available to the volume, or current state of update. + /// Serialized Name: NetworkSiblingSet.networkFeatures + /// public NetAppNetworkFeature? NetworkFeatures { get; } - /// Gets the status of the NetworkSiblingSet at the time the operation was called. + /// + /// Gets the status of the NetworkSiblingSet at the time the operation was called. + /// Serialized Name: NetworkSiblingSet.provisioningState + /// public NetworkSiblingSetProvisioningState? ProvisioningState { get; } - /// List of NIC information. + /// + /// List of NIC information + /// Serialized Name: NetworkSiblingSet.nicInfoList + /// public IReadOnlyList NicInfoList { get; } } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetworkSiblingSetProvisioningState.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetworkSiblingSetProvisioningState.cs index 0bdbfc607f39..fbac129da5cf 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetworkSiblingSetProvisioningState.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetworkSiblingSetProvisioningState.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.NetApp.Models { - /// Gets the status of the NetworkSiblingSet at the time the operation was called. + /// + /// Gets the status of the NetworkSiblingSet at the time the operation was called. + /// Serialized Name: NetworkSiblingSetProvisioningState + /// public readonly partial struct NetworkSiblingSetProvisioningState : IEquatable { private readonly string _value; @@ -27,13 +30,25 @@ public NetworkSiblingSetProvisioningState(string value) private const string CanceledValue = "Canceled"; private const string UpdatingValue = "Updating"; - /// Succeeded. + /// + /// Succeeded + /// Serialized Name: NetworkSiblingSetProvisioningState.Succeeded + /// public static NetworkSiblingSetProvisioningState Succeeded { get; } = new NetworkSiblingSetProvisioningState(SucceededValue); - /// Failed. + /// + /// Failed + /// Serialized Name: NetworkSiblingSetProvisioningState.Failed + /// public static NetworkSiblingSetProvisioningState Failed { get; } = new NetworkSiblingSetProvisioningState(FailedValue); - /// Canceled. + /// + /// Canceled + /// Serialized Name: NetworkSiblingSetProvisioningState.Canceled + /// public static NetworkSiblingSetProvisioningState Canceled { get; } = new NetworkSiblingSetProvisioningState(CanceledValue); - /// Updating. + /// + /// Updating + /// Serialized Name: NetworkSiblingSetProvisioningState.Updating + /// public static NetworkSiblingSetProvisioningState Updating { get; } = new NetworkSiblingSetProvisioningState(UpdatingValue); /// Determines if two values are the same. public static bool operator ==(NetworkSiblingSetProvisioningState left, NetworkSiblingSetProvisioningState right) => left.Equals(right); diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NicInfo.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NicInfo.cs index f134a4c5b41c..7823d2929f10 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NicInfo.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NicInfo.cs @@ -11,7 +11,10 @@ namespace Azure.ResourceManager.NetApp.Models { - /// NIC information and list of volumes for which the NIC has the primary mount ip address. + /// + /// NIC information and list of volumes for which the NIC has the primary mount ip address. + /// Serialized Name: NicInfo + /// public partial class NicInfo { /// @@ -53,8 +56,14 @@ internal NicInfo() } /// Initializes a new instance of . - /// ipAddress. - /// Volume resource Ids. + /// + /// ipAddress + /// Serialized Name: NicInfo.ipAddress + /// + /// + /// Volume resource Ids + /// Serialized Name: NicInfo.volumeResourceIds + /// /// Keeps track of any properties unknown to the library. internal NicInfo(string ipAddress, IReadOnlyList volumeResourceIds, IDictionary serializedAdditionalRawData) { @@ -63,9 +72,15 @@ internal NicInfo(string ipAddress, IReadOnlyList volumeResou _serializedAdditionalRawData = serializedAdditionalRawData; } - /// ipAddress. + /// + /// ipAddress + /// Serialized Name: NicInfo.ipAddress + /// public string IPAddress { get; } - /// Volume resource Ids. + /// + /// Volume resource Ids + /// Serialized Name: NicInfo.volumeResourceIds + /// public IReadOnlyList VolumeResourceIds { get; } } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/PeerClusterForVolumeMigrationContent.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/PeerClusterForVolumeMigrationContent.Serialization.cs new file mode 100644 index 000000000000..52c0b05104cf --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/PeerClusterForVolumeMigrationContent.Serialization.cs @@ -0,0 +1,136 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp.Models +{ + public partial class PeerClusterForVolumeMigrationContent : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PeerClusterForVolumeMigrationContent)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("peerIpAddresses"u8); + writer.WriteStartArray(); + foreach (var item in PeerIPAddresses) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + PeerClusterForVolumeMigrationContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PeerClusterForVolumeMigrationContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePeerClusterForVolumeMigrationContent(document.RootElement, options); + } + + internal static PeerClusterForVolumeMigrationContent DeserializePeerClusterForVolumeMigrationContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList peerIPAddresses = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("peerIpAddresses"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + peerIPAddresses = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PeerClusterForVolumeMigrationContent(peerIPAddresses, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(PeerClusterForVolumeMigrationContent)} does not support writing '{options.Format}' format."); + } + } + + PeerClusterForVolumeMigrationContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializePeerClusterForVolumeMigrationContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PeerClusterForVolumeMigrationContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/PeerClusterForVolumeMigrationContent.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/PeerClusterForVolumeMigrationContent.cs new file mode 100644 index 000000000000..b233f55aef3f --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/PeerClusterForVolumeMigrationContent.cs @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// + /// Source Cluster properties for a cluster peer request + /// Serialized Name: PeerClusterForVolumeMigrationRequest + /// + public partial class PeerClusterForVolumeMigrationContent + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// + /// A list of IC-LIF IPs that can be used to connect to the On-prem cluster + /// Serialized Name: PeerClusterForVolumeMigrationRequest.peerIpAddresses + /// + /// is null. + public PeerClusterForVolumeMigrationContent(IEnumerable peerIPAddresses) + { + Argument.AssertNotNull(peerIPAddresses, nameof(peerIPAddresses)); + + PeerIPAddresses = peerIPAddresses.ToList(); + } + + /// Initializes a new instance of . + /// + /// A list of IC-LIF IPs that can be used to connect to the On-prem cluster + /// Serialized Name: PeerClusterForVolumeMigrationRequest.peerIpAddresses + /// + /// Keeps track of any properties unknown to the library. + internal PeerClusterForVolumeMigrationContent(IList peerIPAddresses, IDictionary serializedAdditionalRawData) + { + PeerIPAddresses = peerIPAddresses; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal PeerClusterForVolumeMigrationContent() + { + } + + /// + /// A list of IC-LIF IPs that can be used to connect to the On-prem cluster + /// Serialized Name: PeerClusterForVolumeMigrationRequest.peerIpAddresses + /// + public IList PeerIPAddresses { get; } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/QueryNetworkSiblingSetContent.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/QueryNetworkSiblingSetContent.cs index 69512168ff81..00ef84aac782 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/QueryNetworkSiblingSetContent.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/QueryNetworkSiblingSetContent.cs @@ -11,7 +11,10 @@ namespace Azure.ResourceManager.NetApp.Models { - /// Network sibling set query. + /// + /// Network sibling set query. + /// Serialized Name: QueryNetworkSiblingSetRequest + /// public partial class QueryNetworkSiblingSetContent { /// @@ -47,8 +50,14 @@ public partial class QueryNetworkSiblingSetContent private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// Network Sibling Set ID for a group of volumes sharing networking resources in a subnet. - /// The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes. Example /subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/{mySubnet}. + /// + /// Network Sibling Set ID for a group of volumes sharing networking resources in a subnet. + /// Serialized Name: QueryNetworkSiblingSetRequest.networkSiblingSetId + /// + /// + /// The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes. Example /subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/{mySubnet} + /// Serialized Name: QueryNetworkSiblingSetRequest.subnetId + /// /// or is null. public QueryNetworkSiblingSetContent(string networkSiblingSetId, ResourceIdentifier subnetId) { @@ -60,8 +69,14 @@ public QueryNetworkSiblingSetContent(string networkSiblingSetId, ResourceIdentif } /// Initializes a new instance of . - /// Network Sibling Set ID for a group of volumes sharing networking resources in a subnet. - /// The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes. Example /subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/{mySubnet}. + /// + /// Network Sibling Set ID for a group of volumes sharing networking resources in a subnet. + /// Serialized Name: QueryNetworkSiblingSetRequest.networkSiblingSetId + /// + /// + /// The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes. Example /subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/{mySubnet} + /// Serialized Name: QueryNetworkSiblingSetRequest.subnetId + /// /// Keeps track of any properties unknown to the library. internal QueryNetworkSiblingSetContent(string networkSiblingSetId, ResourceIdentifier subnetId, IDictionary serializedAdditionalRawData) { @@ -75,9 +90,15 @@ internal QueryNetworkSiblingSetContent() { } - /// Network Sibling Set ID for a group of volumes sharing networking resources in a subnet. + /// + /// Network Sibling Set ID for a group of volumes sharing networking resources in a subnet. + /// Serialized Name: QueryNetworkSiblingSetRequest.networkSiblingSetId + /// public string NetworkSiblingSetId { get; } - /// The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes. Example /subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/{mySubnet}. + /// + /// The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes. Example /subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/{mySubnet} + /// Serialized Name: QueryNetworkSiblingSetRequest.subnetId + /// public ResourceIdentifier SubnetId { get; } } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/RegionInfosList.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/RegionInfosList.cs index 3969ced7df9f..4ea26ba24a4a 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/RegionInfosList.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/RegionInfosList.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.NetApp.Models { - /// List of regionInfo resources. + /// + /// List of regionInfo resources + /// Serialized Name: RegionInfosList + /// internal partial class RegionInfosList { /// @@ -52,8 +55,14 @@ internal RegionInfosList() } /// Initializes a new instance of . - /// A list of regionInfo resources. - /// URL to get the next set of results. + /// + /// A list of regionInfo resources + /// Serialized Name: RegionInfosList.value + /// + /// + /// URL to get the next set of results. + /// Serialized Name: RegionInfosList.nextLink + /// /// Keeps track of any properties unknown to the library. internal RegionInfosList(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) { @@ -62,9 +71,15 @@ internal RegionInfosList(IReadOnlyList value, string nex _serializedAdditionalRawData = serializedAdditionalRawData; } - /// A list of regionInfo resources. + /// + /// A list of regionInfo resources + /// Serialized Name: RegionInfosList.value + /// public IReadOnlyList Value { get; } - /// URL to get the next set of results. + /// + /// URL to get the next set of results. + /// Serialized Name: RegionInfosList.nextLink + /// public string NextLink { get; } } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/RegionStorageToNetworkProximity.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/RegionStorageToNetworkProximity.cs index 97a3d752be2a..f3ad506d5a3d 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/RegionStorageToNetworkProximity.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/RegionStorageToNetworkProximity.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.NetApp.Models { - /// Provides storage to network proximity information in the region. + /// + /// Provides storage to network proximity information in the region. + /// Serialized Name: RegionStorageToNetworkProximity + /// public readonly partial struct RegionStorageToNetworkProximity : IEquatable { private readonly string _value; @@ -31,21 +34,45 @@ public RegionStorageToNetworkProximity(string value) private const string T2AndAcrossT2Value = "T2AndAcrossT2"; private const string T1AndT2AndAcrossT2Value = "T1AndT2AndAcrossT2"; - /// Basic network connectivity. + /// + /// Basic network connectivity. + /// Serialized Name: RegionStorageToNetworkProximity.Default + /// public static RegionStorageToNetworkProximity Default { get; } = new RegionStorageToNetworkProximity(DefaultValue); - /// Standard T1 network connectivity. + /// + /// Standard T1 network connectivity. + /// Serialized Name: RegionStorageToNetworkProximity.T1 + /// public static RegionStorageToNetworkProximity T1 { get; } = new RegionStorageToNetworkProximity(T1Value); - /// Standard T2 network connectivity. + /// + /// Standard T2 network connectivity. + /// Serialized Name: RegionStorageToNetworkProximity.T2 + /// public static RegionStorageToNetworkProximity T2 { get; } = new RegionStorageToNetworkProximity(T2Value); - /// Standard AcrossT2 network connectivity. + /// + /// Standard AcrossT2 network connectivity. + /// Serialized Name: RegionStorageToNetworkProximity.AcrossT2 + /// public static RegionStorageToNetworkProximity AcrossT2 { get; } = new RegionStorageToNetworkProximity(AcrossT2Value); - /// Standard T1 and T2 network connectivity. + /// + /// Standard T1 and T2 network connectivity. + /// Serialized Name: RegionStorageToNetworkProximity.T1AndT2 + /// public static RegionStorageToNetworkProximity T1AndT2 { get; } = new RegionStorageToNetworkProximity(T1AndT2Value); - /// Standard T1 and AcrossT2 network connectivity. + /// + /// Standard T1 and AcrossT2 network connectivity. + /// Serialized Name: RegionStorageToNetworkProximity.T1AndAcrossT2 + /// public static RegionStorageToNetworkProximity T1AndAcrossT2 { get; } = new RegionStorageToNetworkProximity(T1AndAcrossT2Value); - /// Standard T2 and AcrossT2 network connectivity. + /// + /// Standard T2 and AcrossT2 network connectivity. + /// Serialized Name: RegionStorageToNetworkProximity.T2AndAcrossT2 + /// public static RegionStorageToNetworkProximity T2AndAcrossT2 { get; } = new RegionStorageToNetworkProximity(T2AndAcrossT2Value); - /// Standard T1, T2 and AcrossT2 network connectivity. + /// + /// Standard T1, T2 and AcrossT2 network connectivity. + /// Serialized Name: RegionStorageToNetworkProximity.T1AndT2AndAcrossT2 + /// public static RegionStorageToNetworkProximity T1AndT2AndAcrossT2 { get; } = new RegionStorageToNetworkProximity(T1AndT2AndAcrossT2Value); /// Determines if two values are the same. public static bool operator ==(RegionStorageToNetworkProximity left, RegionStorageToNetworkProximity right) => left.Equals(right); diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/RelocateVolumeContent.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/RelocateVolumeContent.cs index 37b16580a063..6e313c2b4dd6 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/RelocateVolumeContent.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/RelocateVolumeContent.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.NetApp.Models { - /// Relocate volume request. + /// + /// Relocate volume request + /// Serialized Name: RelocateVolumeRequest + /// public partial class RelocateVolumeContent { /// @@ -51,7 +54,10 @@ public RelocateVolumeContent() } /// Initializes a new instance of . - /// New creation token for the volume that controls the mount point name. + /// + /// New creation token for the volume that controls the mount point name + /// Serialized Name: RelocateVolumeRequest.creationToken + /// /// Keeps track of any properties unknown to the library. internal RelocateVolumeContent(string creationToken, IDictionary serializedAdditionalRawData) { @@ -59,7 +65,10 @@ internal RelocateVolumeContent(string creationToken, IDictionary New creation token for the volume that controls the mount point name. + /// + /// New creation token for the volume that controls the mount point name + /// Serialized Name: RelocateVolumeRequest.creationToken + /// public string CreationToken { get; set; } } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/RemotePath.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/RemotePath.Serialization.cs new file mode 100644 index 000000000000..c7e9f0f38b2a --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/RemotePath.Serialization.cs @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp.Models +{ + public partial class RemotePath : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RemotePath)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("externalHostName"u8); + writer.WriteStringValue(ExternalHostName); + writer.WritePropertyName("serverName"u8); + writer.WriteStringValue(ServerName); + writer.WritePropertyName("volumeName"u8); + writer.WriteStringValue(VolumeName); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + RemotePath IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RemotePath)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeRemotePath(document.RootElement, options); + } + + internal static RemotePath DeserializeRemotePath(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string externalHostName = default; + string serverName = default; + string volumeName = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("externalHostName"u8)) + { + externalHostName = property.Value.GetString(); + continue; + } + if (property.NameEquals("serverName"u8)) + { + serverName = property.Value.GetString(); + continue; + } + if (property.NameEquals("volumeName"u8)) + { + volumeName = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new RemotePath(externalHostName, serverName, volumeName, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(RemotePath)} does not support writing '{options.Format}' format."); + } + } + + RemotePath IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeRemotePath(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(RemotePath)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/RemotePath.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/RemotePath.cs new file mode 100644 index 000000000000..5b38e3bab667 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/RemotePath.cs @@ -0,0 +1,119 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// + /// The full path to a volume that is to be migrated into ANF. Required for Migration volumes + /// Serialized Name: RemotePath + /// + public partial class RemotePath + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// + /// The Path to a ONTAP Host + /// Serialized Name: RemotePath.externalHostName + /// + /// + /// The name of a server on the ONTAP Host + /// Serialized Name: RemotePath.serverName + /// + /// + /// The name of a volume on the server + /// Serialized Name: RemotePath.volumeName + /// + /// , or is null. + public RemotePath(string externalHostName, string serverName, string volumeName) + { + Argument.AssertNotNull(externalHostName, nameof(externalHostName)); + Argument.AssertNotNull(serverName, nameof(serverName)); + Argument.AssertNotNull(volumeName, nameof(volumeName)); + + ExternalHostName = externalHostName; + ServerName = serverName; + VolumeName = volumeName; + } + + /// Initializes a new instance of . + /// + /// The Path to a ONTAP Host + /// Serialized Name: RemotePath.externalHostName + /// + /// + /// The name of a server on the ONTAP Host + /// Serialized Name: RemotePath.serverName + /// + /// + /// The name of a volume on the server + /// Serialized Name: RemotePath.volumeName + /// + /// Keeps track of any properties unknown to the library. + internal RemotePath(string externalHostName, string serverName, string volumeName, IDictionary serializedAdditionalRawData) + { + ExternalHostName = externalHostName; + ServerName = serverName; + VolumeName = volumeName; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal RemotePath() + { + } + + /// + /// The Path to a ONTAP Host + /// Serialized Name: RemotePath.externalHostName + /// + public string ExternalHostName { get; set; } + /// + /// The name of a server on the ONTAP Host + /// Serialized Name: RemotePath.serverName + /// + public string ServerName { get; set; } + /// + /// The name of a volume on the server + /// Serialized Name: RemotePath.volumeName + /// + public string VolumeName { get; set; } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/SmbAccessBasedEnumeration.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/SmbAccessBasedEnumeration.cs index 2563fc271682..aeb135d87229 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/SmbAccessBasedEnumeration.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/SmbAccessBasedEnumeration.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.NetApp.Models { - /// Enables access-based enumeration share property for SMB Shares. Only applicable for SMB/DualProtocol volume. + /// + /// Enables access-based enumeration share property for SMB Shares. Only applicable for SMB/DualProtocol volume + /// Serialized Name: SmbAccessBasedEnumeration + /// public readonly partial struct SmbAccessBasedEnumeration : IEquatable { private readonly string _value; @@ -25,9 +28,15 @@ public SmbAccessBasedEnumeration(string value) private const string DisabledValue = "Disabled"; private const string EnabledValue = "Enabled"; - /// smbAccessBasedEnumeration share setting is disabled. + /// + /// smbAccessBasedEnumeration share setting is disabled + /// Serialized Name: SmbAccessBasedEnumeration.Disabled + /// public static SmbAccessBasedEnumeration Disabled { get; } = new SmbAccessBasedEnumeration(DisabledValue); - /// smbAccessBasedEnumeration share setting is enabled. + /// + /// smbAccessBasedEnumeration share setting is enabled + /// Serialized Name: SmbAccessBasedEnumeration.Enabled + /// public static SmbAccessBasedEnumeration Enabled { get; } = new SmbAccessBasedEnumeration(EnabledValue); /// Determines if two values are the same. public static bool operator ==(SmbAccessBasedEnumeration left, SmbAccessBasedEnumeration right) => left.Equals(right); diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/SmbNonBrowsable.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/SmbNonBrowsable.cs index 5e0a4c07f636..fd75d72df14e 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/SmbNonBrowsable.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/SmbNonBrowsable.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.NetApp.Models { - /// Enables non-browsable property for SMB Shares. Only applicable for SMB/DualProtocol volume. + /// + /// Enables non-browsable property for SMB Shares. Only applicable for SMB/DualProtocol volume + /// Serialized Name: SmbNonBrowsable + /// public readonly partial struct SmbNonBrowsable : IEquatable { private readonly string _value; @@ -25,9 +28,15 @@ public SmbNonBrowsable(string value) private const string DisabledValue = "Disabled"; private const string EnabledValue = "Enabled"; - /// smbNonBrowsable share setting is disabled. + /// + /// smbNonBrowsable share setting is disabled + /// Serialized Name: SmbNonBrowsable.Disabled + /// public static SmbNonBrowsable Disabled { get; } = new SmbNonBrowsable(DisabledValue); - /// smbNonBrowsable share setting is enabled. + /// + /// smbNonBrowsable share setting is enabled + /// Serialized Name: SmbNonBrowsable.Enabled + /// public static SmbNonBrowsable Enabled { get; } = new SmbNonBrowsable(EnabledValue); /// Determines if two values are the same. public static bool operator ==(SmbNonBrowsable left, SmbNonBrowsable right) => left.Equals(right); diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/SnapshotPoliciesList.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/SnapshotPoliciesList.cs index 4dfe195b90b1..b9b6a788a902 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/SnapshotPoliciesList.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/SnapshotPoliciesList.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.NetApp.Models { - /// List of Snapshot Policies. + /// + /// List of Snapshot Policies + /// Serialized Name: SnapshotPoliciesList + /// internal partial class SnapshotPoliciesList { /// @@ -52,7 +55,10 @@ internal SnapshotPoliciesList() } /// Initializes a new instance of . - /// A list of snapshot policies. + /// + /// A list of snapshot policies + /// Serialized Name: SnapshotPoliciesList.value + /// /// Keeps track of any properties unknown to the library. internal SnapshotPoliciesList(IReadOnlyList value, IDictionary serializedAdditionalRawData) { @@ -60,7 +66,10 @@ internal SnapshotPoliciesList(IReadOnlyList value, IDictiona _serializedAdditionalRawData = serializedAdditionalRawData; } - /// A list of snapshot policies. + /// + /// A list of snapshot policies + /// Serialized Name: SnapshotPoliciesList.value + /// public IReadOnlyList Value { get; } } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/SnapshotPolicyDailySchedule.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/SnapshotPolicyDailySchedule.cs index e8a39dd29bf0..691309bc70e8 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/SnapshotPolicyDailySchedule.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/SnapshotPolicyDailySchedule.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.NetApp.Models { - /// Daily Schedule properties. + /// + /// Daily Schedule properties + /// Serialized Name: DailySchedule + /// public partial class SnapshotPolicyDailySchedule { /// @@ -51,10 +54,22 @@ public SnapshotPolicyDailySchedule() } /// Initializes a new instance of . - /// Daily snapshot count to keep. - /// Indicates which hour in UTC timezone a snapshot should be taken. - /// Indicates which minute snapshot should be taken. - /// Resource size in bytes, current storage usage for the volume in bytes. + /// + /// Daily snapshot count to keep + /// Serialized Name: DailySchedule.snapshotsToKeep + /// + /// + /// Indicates which hour in UTC timezone a snapshot should be taken + /// Serialized Name: DailySchedule.hour + /// + /// + /// Indicates which minute snapshot should be taken + /// Serialized Name: DailySchedule.minute + /// + /// + /// Resource size in bytes, current storage usage for the volume in bytes + /// Serialized Name: DailySchedule.usedBytes + /// /// Keeps track of any properties unknown to the library. internal SnapshotPolicyDailySchedule(int? snapshotsToKeep, int? hour, int? minute, long? usedBytes, IDictionary serializedAdditionalRawData) { @@ -65,13 +80,25 @@ internal SnapshotPolicyDailySchedule(int? snapshotsToKeep, int? hour, int? minut _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Daily snapshot count to keep. + /// + /// Daily snapshot count to keep + /// Serialized Name: DailySchedule.snapshotsToKeep + /// public int? SnapshotsToKeep { get; set; } - /// Indicates which hour in UTC timezone a snapshot should be taken. + /// + /// Indicates which hour in UTC timezone a snapshot should be taken + /// Serialized Name: DailySchedule.hour + /// public int? Hour { get; set; } - /// Indicates which minute snapshot should be taken. + /// + /// Indicates which minute snapshot should be taken + /// Serialized Name: DailySchedule.minute + /// public int? Minute { get; set; } - /// Resource size in bytes, current storage usage for the volume in bytes. + /// + /// Resource size in bytes, current storage usage for the volume in bytes + /// Serialized Name: DailySchedule.usedBytes + /// public long? UsedBytes { get; set; } } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/SnapshotPolicyHourlySchedule.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/SnapshotPolicyHourlySchedule.cs index 04a11d98b729..1e16f65ad70a 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/SnapshotPolicyHourlySchedule.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/SnapshotPolicyHourlySchedule.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.NetApp.Models { - /// Hourly Schedule properties. + /// + /// Hourly Schedule properties + /// Serialized Name: HourlySchedule + /// public partial class SnapshotPolicyHourlySchedule { /// @@ -51,9 +54,18 @@ public SnapshotPolicyHourlySchedule() } /// Initializes a new instance of . - /// Hourly snapshot count to keep. - /// Indicates which minute snapshot should be taken. - /// Resource size in bytes, current storage usage for the volume in bytes. + /// + /// Hourly snapshot count to keep + /// Serialized Name: HourlySchedule.snapshotsToKeep + /// + /// + /// Indicates which minute snapshot should be taken + /// Serialized Name: HourlySchedule.minute + /// + /// + /// Resource size in bytes, current storage usage for the volume in bytes + /// Serialized Name: HourlySchedule.usedBytes + /// /// Keeps track of any properties unknown to the library. internal SnapshotPolicyHourlySchedule(int? snapshotsToKeep, int? minute, long? usedBytes, IDictionary serializedAdditionalRawData) { @@ -63,11 +75,20 @@ internal SnapshotPolicyHourlySchedule(int? snapshotsToKeep, int? minute, long? u _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Hourly snapshot count to keep. + /// + /// Hourly snapshot count to keep + /// Serialized Name: HourlySchedule.snapshotsToKeep + /// public int? SnapshotsToKeep { get; set; } - /// Indicates which minute snapshot should be taken. + /// + /// Indicates which minute snapshot should be taken + /// Serialized Name: HourlySchedule.minute + /// public int? Minute { get; set; } - /// Resource size in bytes, current storage usage for the volume in bytes. + /// + /// Resource size in bytes, current storage usage for the volume in bytes + /// Serialized Name: HourlySchedule.usedBytes + /// public long? UsedBytes { get; set; } } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/SnapshotPolicyMonthlySchedule.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/SnapshotPolicyMonthlySchedule.cs index 544524d8f380..779c53517d9f 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/SnapshotPolicyMonthlySchedule.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/SnapshotPolicyMonthlySchedule.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.NetApp.Models { - /// Monthly Schedule properties. + /// + /// Monthly Schedule properties + /// Serialized Name: MonthlySchedule + /// public partial class SnapshotPolicyMonthlySchedule { /// @@ -51,11 +54,26 @@ public SnapshotPolicyMonthlySchedule() } /// Initializes a new instance of . - /// Monthly snapshot count to keep. - /// Indicates which days of the month snapshot should be taken. A comma delimited string. - /// Indicates which hour in UTC timezone a snapshot should be taken. - /// Indicates which minute snapshot should be taken. - /// Resource size in bytes, current storage usage for the volume in bytes. + /// + /// Monthly snapshot count to keep + /// Serialized Name: MonthlySchedule.snapshotsToKeep + /// + /// + /// Indicates which days of the month snapshot should be taken. A comma delimited string. + /// Serialized Name: MonthlySchedule.daysOfMonth + /// + /// + /// Indicates which hour in UTC timezone a snapshot should be taken + /// Serialized Name: MonthlySchedule.hour + /// + /// + /// Indicates which minute snapshot should be taken + /// Serialized Name: MonthlySchedule.minute + /// + /// + /// Resource size in bytes, current storage usage for the volume in bytes + /// Serialized Name: MonthlySchedule.usedBytes + /// /// Keeps track of any properties unknown to the library. internal SnapshotPolicyMonthlySchedule(int? snapshotsToKeep, string daysOfMonth, int? hour, int? minute, long? usedBytes, IDictionary serializedAdditionalRawData) { @@ -67,15 +85,30 @@ internal SnapshotPolicyMonthlySchedule(int? snapshotsToKeep, string daysOfMonth, _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Monthly snapshot count to keep. + /// + /// Monthly snapshot count to keep + /// Serialized Name: MonthlySchedule.snapshotsToKeep + /// public int? SnapshotsToKeep { get; set; } - /// Indicates which days of the month snapshot should be taken. A comma delimited string. + /// + /// Indicates which days of the month snapshot should be taken. A comma delimited string. + /// Serialized Name: MonthlySchedule.daysOfMonth + /// public string DaysOfMonth { get; set; } - /// Indicates which hour in UTC timezone a snapshot should be taken. + /// + /// Indicates which hour in UTC timezone a snapshot should be taken + /// Serialized Name: MonthlySchedule.hour + /// public int? Hour { get; set; } - /// Indicates which minute snapshot should be taken. + /// + /// Indicates which minute snapshot should be taken + /// Serialized Name: MonthlySchedule.minute + /// public int? Minute { get; set; } - /// Resource size in bytes, current storage usage for the volume in bytes. + /// + /// Resource size in bytes, current storage usage for the volume in bytes + /// Serialized Name: MonthlySchedule.usedBytes + /// public long? UsedBytes { get; set; } } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/SnapshotPolicyPatch.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/SnapshotPolicyPatch.cs index b86f7f10b1ce..8d0c2ccfaa37 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/SnapshotPolicyPatch.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/SnapshotPolicyPatch.cs @@ -12,7 +12,10 @@ namespace Azure.ResourceManager.NetApp.Models { - /// Snapshot policy Details for create and update. + /// + /// Snapshot policy Details for create and update + /// Serialized Name: SnapshotPolicyPatch + /// public partial class SnapshotPolicyPatch : TrackedResourceData { /// @@ -60,12 +63,30 @@ public SnapshotPolicyPatch(AzureLocation location) : base(location) /// The systemData. /// The tags. /// The location. - /// Schedule for hourly snapshots. - /// Schedule for daily snapshots. - /// Schedule for weekly snapshots. - /// Schedule for monthly snapshots. - /// The property to decide policy is enabled or not. - /// Azure lifecycle management. + /// + /// Schedule for hourly snapshots + /// Serialized Name: SnapshotPolicyPatch.properties.hourlySchedule + /// + /// + /// Schedule for daily snapshots + /// Serialized Name: SnapshotPolicyPatch.properties.dailySchedule + /// + /// + /// Schedule for weekly snapshots + /// Serialized Name: SnapshotPolicyPatch.properties.weeklySchedule + /// + /// + /// Schedule for monthly snapshots + /// Serialized Name: SnapshotPolicyPatch.properties.monthlySchedule + /// + /// + /// The property to decide policy is enabled or not + /// Serialized Name: SnapshotPolicyPatch.properties.enabled + /// + /// + /// Azure lifecycle management + /// Serialized Name: SnapshotPolicyPatch.properties.provisioningState + /// /// Keeps track of any properties unknown to the library. internal SnapshotPolicyPatch(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, SnapshotPolicyHourlySchedule hourlySchedule, SnapshotPolicyDailySchedule dailySchedule, SnapshotPolicyWeeklySchedule weeklySchedule, SnapshotPolicyMonthlySchedule monthlySchedule, bool? isEnabled, string provisioningState, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { @@ -83,17 +104,35 @@ internal SnapshotPolicyPatch() { } - /// Schedule for hourly snapshots. + /// + /// Schedule for hourly snapshots + /// Serialized Name: SnapshotPolicyPatch.properties.hourlySchedule + /// public SnapshotPolicyHourlySchedule HourlySchedule { get; set; } - /// Schedule for daily snapshots. + /// + /// Schedule for daily snapshots + /// Serialized Name: SnapshotPolicyPatch.properties.dailySchedule + /// public SnapshotPolicyDailySchedule DailySchedule { get; set; } - /// Schedule for weekly snapshots. + /// + /// Schedule for weekly snapshots + /// Serialized Name: SnapshotPolicyPatch.properties.weeklySchedule + /// public SnapshotPolicyWeeklySchedule WeeklySchedule { get; set; } - /// Schedule for monthly snapshots. + /// + /// Schedule for monthly snapshots + /// Serialized Name: SnapshotPolicyPatch.properties.monthlySchedule + /// public SnapshotPolicyMonthlySchedule MonthlySchedule { get; set; } - /// The property to decide policy is enabled or not. + /// + /// The property to decide policy is enabled or not + /// Serialized Name: SnapshotPolicyPatch.properties.enabled + /// public bool? IsEnabled { get; set; } - /// Azure lifecycle management. + /// + /// Azure lifecycle management + /// Serialized Name: SnapshotPolicyPatch.properties.provisioningState + /// public string ProvisioningState { get; } } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/SnapshotPolicyVolumeList.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/SnapshotPolicyVolumeList.cs index 018bdb7ee6e2..3951f01a2556 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/SnapshotPolicyVolumeList.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/SnapshotPolicyVolumeList.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.NetApp.Models { - /// Volumes associated with snapshot policy. + /// + /// Volumes associated with snapshot policy + /// Serialized Name: SnapshotPolicyVolumeList + /// internal partial class SnapshotPolicyVolumeList { /// @@ -52,7 +55,10 @@ internal SnapshotPolicyVolumeList() } /// Initializes a new instance of . - /// List of volumes. + /// + /// List of volumes + /// Serialized Name: SnapshotPolicyVolumeList.value + /// /// Keeps track of any properties unknown to the library. internal SnapshotPolicyVolumeList(IReadOnlyList value, IDictionary serializedAdditionalRawData) { @@ -60,7 +66,10 @@ internal SnapshotPolicyVolumeList(IReadOnlyList value, IDictio _serializedAdditionalRawData = serializedAdditionalRawData; } - /// List of volumes. + /// + /// List of volumes + /// Serialized Name: SnapshotPolicyVolumeList.value + /// public IReadOnlyList Value { get; } } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/SnapshotPolicyWeeklySchedule.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/SnapshotPolicyWeeklySchedule.cs index 408ab0d64f89..61bb58c93896 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/SnapshotPolicyWeeklySchedule.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/SnapshotPolicyWeeklySchedule.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.NetApp.Models { - /// Weekly Schedule properties, make a snapshot every week at a specific day or days. + /// + /// Weekly Schedule properties, make a snapshot every week at a specific day or days + /// Serialized Name: WeeklySchedule + /// public partial class SnapshotPolicyWeeklySchedule { /// @@ -51,11 +54,26 @@ public SnapshotPolicyWeeklySchedule() } /// Initializes a new instance of . - /// Weekly snapshot count to keep. - /// Indicates which weekdays snapshot should be taken, accepts a comma separated list of week day names in english. - /// Indicates which hour in UTC timezone a snapshot should be taken. - /// Indicates which minute snapshot should be taken. - /// Resource size in bytes, current storage usage for the volume in bytes. + /// + /// Weekly snapshot count to keep + /// Serialized Name: WeeklySchedule.snapshotsToKeep + /// + /// + /// Indicates which weekdays snapshot should be taken, accepts a comma separated list of week day names in english + /// Serialized Name: WeeklySchedule.day + /// + /// + /// Indicates which hour in UTC timezone a snapshot should be taken + /// Serialized Name: WeeklySchedule.hour + /// + /// + /// Indicates which minute snapshot should be taken + /// Serialized Name: WeeklySchedule.minute + /// + /// + /// Resource size in bytes, current storage usage for the volume in bytes + /// Serialized Name: WeeklySchedule.usedBytes + /// /// Keeps track of any properties unknown to the library. internal SnapshotPolicyWeeklySchedule(int? snapshotsToKeep, string day, int? hour, int? minute, long? usedBytes, IDictionary serializedAdditionalRawData) { @@ -67,15 +85,30 @@ internal SnapshotPolicyWeeklySchedule(int? snapshotsToKeep, string day, int? hou _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Weekly snapshot count to keep. + /// + /// Weekly snapshot count to keep + /// Serialized Name: WeeklySchedule.snapshotsToKeep + /// public int? SnapshotsToKeep { get; set; } - /// Indicates which weekdays snapshot should be taken, accepts a comma separated list of week day names in english. + /// + /// Indicates which weekdays snapshot should be taken, accepts a comma separated list of week day names in english + /// Serialized Name: WeeklySchedule.day + /// public string Day { get; set; } - /// Indicates which hour in UTC timezone a snapshot should be taken. + /// + /// Indicates which hour in UTC timezone a snapshot should be taken + /// Serialized Name: WeeklySchedule.hour + /// public int? Hour { get; set; } - /// Indicates which minute snapshot should be taken. + /// + /// Indicates which minute snapshot should be taken + /// Serialized Name: WeeklySchedule.minute + /// public int? Minute { get; set; } - /// Resource size in bytes, current storage usage for the volume in bytes. + /// + /// Resource size in bytes, current storage usage for the volume in bytes + /// Serialized Name: WeeklySchedule.usedBytes + /// public long? UsedBytes { get; set; } } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/SnapshotsList.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/SnapshotsList.cs index f0bd6fbcb558..a783a7042dc0 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/SnapshotsList.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/SnapshotsList.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.NetApp.Models { - /// List of Snapshots. + /// + /// List of Snapshots + /// Serialized Name: SnapshotsList + /// internal partial class SnapshotsList { /// @@ -52,7 +55,10 @@ internal SnapshotsList() } /// Initializes a new instance of . - /// A list of Snapshots. + /// + /// A list of Snapshots + /// Serialized Name: SnapshotsList.value + /// /// Keeps track of any properties unknown to the library. internal SnapshotsList(IReadOnlyList value, IDictionary serializedAdditionalRawData) { @@ -60,7 +66,10 @@ internal SnapshotsList(IReadOnlyList value, IDictionar _serializedAdditionalRawData = serializedAdditionalRawData; } - /// A list of Snapshots. + /// + /// A list of Snapshots + /// Serialized Name: SnapshotsList.value + /// public IReadOnlyList Value { get; } } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/SubscriptionQuotaItemList.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/SubscriptionQuotaItemList.cs index 31e90fa6ea9b..4872c44056a8 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/SubscriptionQuotaItemList.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/SubscriptionQuotaItemList.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.NetApp.Models { - /// List of Subscription Quota Items. + /// + /// List of Subscription Quota Items + /// Serialized Name: SubscriptionQuotaItemList + /// internal partial class SubscriptionQuotaItemList { /// @@ -52,7 +55,10 @@ internal SubscriptionQuotaItemList() } /// Initializes a new instance of . - /// A list of SubscriptionQuotaItems. + /// + /// A list of SubscriptionQuotaItems + /// Serialized Name: SubscriptionQuotaItemList.value + /// /// Keeps track of any properties unknown to the library. internal SubscriptionQuotaItemList(IReadOnlyList value, IDictionary serializedAdditionalRawData) { @@ -60,7 +66,10 @@ internal SubscriptionQuotaItemList(IReadOnlyList va _serializedAdditionalRawData = serializedAdditionalRawData; } - /// A list of SubscriptionQuotaItems. + /// + /// A list of SubscriptionQuotaItems + /// Serialized Name: SubscriptionQuotaItemList.value + /// public IReadOnlyList Value { get; } } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/SubvolumesList.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/SubvolumesList.cs index 3eabb0cf57cb..f2fb95cbae7b 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/SubvolumesList.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/SubvolumesList.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.NetApp.Models { - /// List of Subvolumes. + /// + /// List of Subvolumes + /// Serialized Name: SubvolumesList + /// internal partial class SubvolumesList { /// @@ -52,8 +55,14 @@ internal SubvolumesList() } /// Initializes a new instance of . - /// A list of Subvolumes. - /// URL to get the next set of results. + /// + /// A list of Subvolumes + /// Serialized Name: SubvolumesList.value + /// + /// + /// URL to get the next set of results. + /// Serialized Name: SubvolumesList.nextLink + /// /// Keeps track of any properties unknown to the library. internal SubvolumesList(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) { @@ -62,9 +71,15 @@ internal SubvolumesList(IReadOnlyList value, string nex _serializedAdditionalRawData = serializedAdditionalRawData; } - /// A list of Subvolumes. + /// + /// A list of Subvolumes + /// Serialized Name: SubvolumesList.value + /// public IReadOnlyList Value { get; } - /// URL to get the next set of results. + /// + /// URL to get the next set of results. + /// Serialized Name: SubvolumesList.nextLink + /// public string NextLink { get; } } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/SvmPeerCommandResult.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/SvmPeerCommandResult.Serialization.cs new file mode 100644 index 000000000000..9137205b1c92 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/SvmPeerCommandResult.Serialization.cs @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp.Models +{ + public partial class SvmPeerCommandResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SvmPeerCommandResult)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(SvmPeeringCommand)) + { + writer.WritePropertyName("svmPeeringCommand"u8); + writer.WriteStringValue(SvmPeeringCommand); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SvmPeerCommandResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SvmPeerCommandResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSvmPeerCommandResult(document.RootElement, options); + } + + internal static SvmPeerCommandResult DeserializeSvmPeerCommandResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string svmPeeringCommand = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("svmPeeringCommand"u8)) + { + svmPeeringCommand = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SvmPeerCommandResult(svmPeeringCommand, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SvmPeerCommandResult)} does not support writing '{options.Format}' format."); + } + } + + SvmPeerCommandResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeSvmPeerCommandResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SvmPeerCommandResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/SvmPeerCommandResult.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/SvmPeerCommandResult.cs new file mode 100644 index 000000000000..cbc30fabe7e3 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/SvmPeerCommandResult.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// + /// Information about svm peering process + /// Serialized Name: SvmPeerCommandResponse + /// + public partial class SvmPeerCommandResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal SvmPeerCommandResult() + { + } + + /// Initializes a new instance of . + /// + /// A command that needs to be run on the external ONTAP to accept svm peering. Will only be present if <code>svmPeeringStatus</code> is <code>pending</code> + /// Serialized Name: SvmPeerCommandResponse.svmPeeringCommand + /// + /// Keeps track of any properties unknown to the library. + internal SvmPeerCommandResult(string svmPeeringCommand, IDictionary serializedAdditionalRawData) + { + SvmPeeringCommand = svmPeeringCommand; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// + /// A command that needs to be run on the external ONTAP to accept svm peering. Will only be present if <code>svmPeeringStatus</code> is <code>pending</code> + /// Serialized Name: SvmPeerCommandResponse.svmPeeringCommand + /// + public string SvmPeeringCommand { get; } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/UpdateNetworkSiblingSetContent.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/UpdateNetworkSiblingSetContent.cs index f57744de1d4c..28b02f553094 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/UpdateNetworkSiblingSetContent.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/UpdateNetworkSiblingSetContent.cs @@ -11,7 +11,10 @@ namespace Azure.ResourceManager.NetApp.Models { - /// Network sibling set update. + /// + /// Network sibling set update. + /// Serialized Name: UpdateNetworkSiblingSetRequest + /// public partial class UpdateNetworkSiblingSetContent { /// @@ -47,10 +50,22 @@ public partial class UpdateNetworkSiblingSetContent private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// Network Sibling Set ID for a group of volumes sharing networking resources in a subnet. - /// The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes. Example /subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/{mySubnet}. - /// Network sibling set state Id identifying the current state of the sibling set. - /// Network features available to the volume. + /// + /// Network Sibling Set ID for a group of volumes sharing networking resources in a subnet. + /// Serialized Name: UpdateNetworkSiblingSetRequest.networkSiblingSetId + /// + /// + /// The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes. Example /subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/{mySubnet} + /// Serialized Name: UpdateNetworkSiblingSetRequest.subnetId + /// + /// + /// Network sibling set state Id identifying the current state of the sibling set. + /// Serialized Name: UpdateNetworkSiblingSetRequest.networkSiblingSetStateId + /// + /// + /// Network features available to the volume. + /// Serialized Name: UpdateNetworkSiblingSetRequest.networkFeatures + /// /// , or is null. public UpdateNetworkSiblingSetContent(string networkSiblingSetId, ResourceIdentifier subnetId, string networkSiblingSetStateId, NetAppNetworkFeature networkFeatures) { @@ -65,10 +80,22 @@ public UpdateNetworkSiblingSetContent(string networkSiblingSetId, ResourceIdenti } /// Initializes a new instance of . - /// Network Sibling Set ID for a group of volumes sharing networking resources in a subnet. - /// The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes. Example /subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/{mySubnet}. - /// Network sibling set state Id identifying the current state of the sibling set. - /// Network features available to the volume. + /// + /// Network Sibling Set ID for a group of volumes sharing networking resources in a subnet. + /// Serialized Name: UpdateNetworkSiblingSetRequest.networkSiblingSetId + /// + /// + /// The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes. Example /subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/{mySubnet} + /// Serialized Name: UpdateNetworkSiblingSetRequest.subnetId + /// + /// + /// Network sibling set state Id identifying the current state of the sibling set. + /// Serialized Name: UpdateNetworkSiblingSetRequest.networkSiblingSetStateId + /// + /// + /// Network features available to the volume. + /// Serialized Name: UpdateNetworkSiblingSetRequest.networkFeatures + /// /// Keeps track of any properties unknown to the library. internal UpdateNetworkSiblingSetContent(string networkSiblingSetId, ResourceIdentifier subnetId, string networkSiblingSetStateId, NetAppNetworkFeature networkFeatures, IDictionary serializedAdditionalRawData) { @@ -84,13 +111,25 @@ internal UpdateNetworkSiblingSetContent() { } - /// Network Sibling Set ID for a group of volumes sharing networking resources in a subnet. + /// + /// Network Sibling Set ID for a group of volumes sharing networking resources in a subnet. + /// Serialized Name: UpdateNetworkSiblingSetRequest.networkSiblingSetId + /// public string NetworkSiblingSetId { get; } - /// The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes. Example /subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/{mySubnet}. + /// + /// The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes. Example /subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/{mySubnet} + /// Serialized Name: UpdateNetworkSiblingSetRequest.subnetId + /// public ResourceIdentifier SubnetId { get; } - /// Network sibling set state Id identifying the current state of the sibling set. + /// + /// Network sibling set state Id identifying the current state of the sibling set. + /// Serialized Name: UpdateNetworkSiblingSetRequest.networkSiblingSetStateId + /// public string NetworkSiblingSetStateId { get; } - /// Network features available to the volume. + /// + /// Network features available to the volume. + /// Serialized Name: UpdateNetworkSiblingSetRequest.networkFeatures + /// public NetAppNetworkFeature NetworkFeatures { get; } } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/VolumeGroupList.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/VolumeGroupList.cs index 031f8d1bfc9f..e06409708f34 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/VolumeGroupList.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/VolumeGroupList.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.NetApp.Models { - /// List of volume group resources. + /// + /// List of volume group resources + /// Serialized Name: VolumeGroupList + /// internal partial class VolumeGroupList { /// @@ -52,7 +55,10 @@ internal VolumeGroupList() } /// Initializes a new instance of . - /// List of volume Groups. + /// + /// List of volume Groups + /// Serialized Name: VolumeGroupList.value + /// /// Keeps track of any properties unknown to the library. internal VolumeGroupList(IReadOnlyList value, IDictionary serializedAdditionalRawData) { @@ -60,7 +66,10 @@ internal VolumeGroupList(IReadOnlyList value, IDictiona _serializedAdditionalRawData = serializedAdditionalRawData; } - /// List of volume Groups. + /// + /// List of volume Groups + /// Serialized Name: VolumeGroupList.value + /// public IReadOnlyList Value { get; } } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/VolumeList.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/VolumeList.cs index adcfb1676567..df5a1df5d97f 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/VolumeList.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/VolumeList.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.NetApp.Models { - /// List of volume resources. + /// + /// List of volume resources + /// Serialized Name: VolumeList + /// internal partial class VolumeList { /// @@ -52,8 +55,14 @@ internal VolumeList() } /// Initializes a new instance of . - /// List of volumes. - /// URL to get the next set of results. + /// + /// List of volumes + /// Serialized Name: VolumeList.value + /// + /// + /// URL to get the next set of results. + /// Serialized Name: VolumeList.nextLink + /// /// Keeps track of any properties unknown to the library. internal VolumeList(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) { @@ -62,9 +71,15 @@ internal VolumeList(IReadOnlyList value, string nextLink, IDic _serializedAdditionalRawData = serializedAdditionalRawData; } - /// List of volumes. + /// + /// List of volumes + /// Serialized Name: VolumeList.value + /// public IReadOnlyList Value { get; } - /// URL to get the next set of results. + /// + /// URL to get the next set of results. + /// Serialized Name: VolumeList.nextLink + /// public string NextLink { get; } } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/VolumePatchPropertiesExportPolicy.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/VolumePatchPropertiesExportPolicy.cs index 8a3e19c3de07..608eab2a5424 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/VolumePatchPropertiesExportPolicy.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/VolumePatchPropertiesExportPolicy.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.NetApp.Models { - /// Set of export policy rules. + /// + /// Set of export policy rules + /// Serialized Name: VolumePatchPropertiesExportPolicy + /// internal partial class VolumePatchPropertiesExportPolicy { /// @@ -52,7 +55,10 @@ public VolumePatchPropertiesExportPolicy() } /// Initializes a new instance of . - /// Export policy rule. + /// + /// Export policy rule + /// Serialized Name: VolumePatchPropertiesExportPolicy.rules + /// /// Keeps track of any properties unknown to the library. internal VolumePatchPropertiesExportPolicy(IList rules, IDictionary serializedAdditionalRawData) { @@ -60,7 +66,10 @@ internal VolumePatchPropertiesExportPolicy(IList r _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Export policy rule. + /// + /// Export policy rule + /// Serialized Name: VolumePatchPropertiesExportPolicy.rules + /// public IList Rules { get; } } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/VolumePropertiesExportPolicy.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/VolumePropertiesExportPolicy.cs index c47c8150a4fc..9128427861b8 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/VolumePropertiesExportPolicy.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/VolumePropertiesExportPolicy.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.NetApp.Models { - /// Set of export policy rules. + /// + /// Set of export policy rules + /// Serialized Name: VolumePropertiesExportPolicy + /// internal partial class VolumePropertiesExportPolicy { /// @@ -52,7 +55,10 @@ public VolumePropertiesExportPolicy() } /// Initializes a new instance of . - /// Export policy rule. + /// + /// Export policy rule + /// Serialized Name: VolumePropertiesExportPolicy.rules + /// /// Keeps track of any properties unknown to the library. internal VolumePropertiesExportPolicy(IList rules, IDictionary serializedAdditionalRawData) { @@ -60,7 +66,10 @@ internal VolumePropertiesExportPolicy(IList rules, _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Export policy rule. + /// + /// Export policy rule + /// Serialized Name: VolumePropertiesExportPolicy.rules + /// public IList Rules { get; } } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/VolumeQuotaRulesList.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/VolumeQuotaRulesList.cs index f6f8835cf9e9..436177aef32b 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/VolumeQuotaRulesList.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/VolumeQuotaRulesList.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.NetApp.Models { - /// List of Volume Quota Rules. + /// + /// List of Volume Quota Rules + /// Serialized Name: VolumeQuotaRulesList + /// internal partial class VolumeQuotaRulesList { /// @@ -52,7 +55,10 @@ internal VolumeQuotaRulesList() } /// Initializes a new instance of . - /// A list of Volume Quota Rules. + /// + /// A list of Volume Quota Rules + /// Serialized Name: VolumeQuotaRulesList.value + /// /// Keeps track of any properties unknown to the library. internal VolumeQuotaRulesList(IReadOnlyList value, IDictionary serializedAdditionalRawData) { @@ -60,7 +66,10 @@ internal VolumeQuotaRulesList(IReadOnlyList value, ID _serializedAdditionalRawData = serializedAdditionalRawData; } - /// A list of Volume Quota Rules. + /// + /// A list of Volume Quota Rules + /// Serialized Name: VolumeQuotaRulesList.value + /// public IReadOnlyList Value { get; } } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/VolumeSnapshotProperties.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/VolumeSnapshotProperties.cs index 8e0cf23331b8..9d0e0269d40a 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/VolumeSnapshotProperties.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/VolumeSnapshotProperties.cs @@ -11,7 +11,10 @@ namespace Azure.ResourceManager.NetApp.Models { - /// Volume Snapshot Properties. + /// + /// Volume Snapshot Properties + /// Serialized Name: VolumeSnapshotProperties + /// internal partial class VolumeSnapshotProperties { /// @@ -52,7 +55,10 @@ public VolumeSnapshotProperties() } /// Initializes a new instance of . - /// Snapshot Policy ResourceId. + /// + /// Snapshot Policy ResourceId + /// Serialized Name: VolumeSnapshotProperties.snapshotPolicyId + /// /// Keeps track of any properties unknown to the library. internal VolumeSnapshotProperties(ResourceIdentifier snapshotPolicyId, IDictionary serializedAdditionalRawData) { @@ -60,7 +66,10 @@ internal VolumeSnapshotProperties(ResourceIdentifier snapshotPolicyId, IDictiona _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Snapshot Policy ResourceId. + /// + /// Snapshot Policy ResourceId + /// Serialized Name: VolumeSnapshotProperties.snapshotPolicyId + /// public ResourceIdentifier SnapshotPolicyId { get; set; } } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppAccountCollection.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppAccountCollection.cs index 9b3dc5b7d87f..81251eed455b 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppAccountCollection.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppAccountCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdateAsy /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wait /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(string accou /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string accountName, Cancellat /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToke /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationToken cancella /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string accountName, Cancel /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string accountName, CancellationToken cance /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task> GetIfExistsAs /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppAccountData.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppAccountData.cs index 278028c24ed3..4937b56ecbf0 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppAccountData.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppAccountData.cs @@ -16,6 +16,7 @@ namespace Azure.ResourceManager.NetApp /// /// A class representing the NetAppAccount data model. /// NetApp account resource + /// Serialized Name: NetAppAccount /// public partial class NetAppAccountData : TrackedResourceData { @@ -65,12 +66,30 @@ public NetAppAccountData(AzureLocation location) : base(location) /// The systemData. /// The tags. /// The location. - /// A unique read-only string that changes whenever the resource is updated. - /// The identity used for the resource. - /// Azure lifecycle management. - /// Active Directories. - /// Encryption settings. - /// Shows the status of disableShowmount for all volumes under the subscription, null equals false. + /// + /// A unique read-only string that changes whenever the resource is updated. + /// Serialized Name: NetAppAccount.etag + /// + /// + /// The identity used for the resource. + /// Serialized Name: NetAppAccount.identity + /// + /// + /// Azure lifecycle management + /// Serialized Name: NetAppAccount.properties.provisioningState + /// + /// + /// Active Directories + /// Serialized Name: NetAppAccount.properties.activeDirectories + /// + /// + /// Encryption settings + /// Serialized Name: NetAppAccount.properties.encryption + /// + /// + /// Shows the status of disableShowmount for all volumes under the subscription, null equals false + /// Serialized Name: NetAppAccount.properties.disableShowmount + /// /// Keeps track of any properties unknown to the library. internal NetAppAccountData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ETag? etag, ManagedServiceIdentity identity, string provisioningState, IList activeDirectories, NetAppAccountEncryption encryption, bool? disableShowmount, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { @@ -88,17 +107,35 @@ internal NetAppAccountData() { } - /// A unique read-only string that changes whenever the resource is updated. + /// + /// A unique read-only string that changes whenever the resource is updated. + /// Serialized Name: NetAppAccount.etag + /// public ETag? ETag { get; } - /// The identity used for the resource. + /// + /// The identity used for the resource. + /// Serialized Name: NetAppAccount.identity + /// public ManagedServiceIdentity Identity { get; set; } - /// Azure lifecycle management. + /// + /// Azure lifecycle management + /// Serialized Name: NetAppAccount.properties.provisioningState + /// public string ProvisioningState { get; } - /// Active Directories. + /// + /// Active Directories + /// Serialized Name: NetAppAccount.properties.activeDirectories + /// public IList ActiveDirectories { get; } - /// Encryption settings. + /// + /// Encryption settings + /// Serialized Name: NetAppAccount.properties.encryption + /// public NetAppAccountEncryption Encryption { get; set; } - /// Shows the status of disableShowmount for all volumes under the subscription, null equals false. + /// + /// Shows the status of disableShowmount for all volumes under the subscription, null equals false + /// Serialized Name: NetAppAccount.properties.disableShowmount + /// public bool? DisableShowmount { get; } } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppAccountResource.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppAccountResource.cs index d026718ea23f..81471641b535 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppAccountResource.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppAccountResource.cs @@ -120,7 +120,7 @@ public virtual CapacityPoolCollection GetCapacityPools() /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -151,7 +151,7 @@ public virtual async Task> GetCapacityPoolAsync(s /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -189,7 +189,7 @@ public virtual SnapshotPolicyCollection GetSnapshotPolicies() /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -220,7 +220,7 @@ public virtual async Task> GetSnapshotPolicyAsy /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -258,7 +258,7 @@ public virtual NetAppBackupPolicyCollection GetNetAppBackupPolicies() /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -289,7 +289,7 @@ public virtual async Task> GetNetAppBackupP /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -327,7 +327,7 @@ public virtual NetAppVolumeGroupCollection GetNetAppVolumeGroups() /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -358,7 +358,7 @@ public virtual async Task> GetNetAppVolumeGr /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -396,7 +396,7 @@ public virtual NetAppBackupVaultCollection GetNetAppBackupVaults() /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -427,7 +427,7 @@ public virtual async Task> GetNetAppBackupVa /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -458,7 +458,7 @@ public virtual Response GetNetAppBackupVault(string b /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -498,7 +498,7 @@ public virtual async Task> GetAsync(Cancellation /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -538,7 +538,7 @@ public virtual Response Get(CancellationToken cancellatio /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -580,7 +580,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -622,7 +622,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -668,7 +668,7 @@ public virtual async Task> UpdateAsync(WaitU /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -714,7 +714,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, N /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -756,7 +756,7 @@ public virtual async Task RenewCredentialsAsync(WaitUntil waitUnti /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -798,7 +798,7 @@ public virtual ArmOperation RenewCredentials(WaitUntil waitUntil, CancellationTo /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -827,7 +827,7 @@ public virtual AsyncPageable GetVolumeGroupsAsync(Cance /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -856,7 +856,7 @@ public virtual Pageable GetVolumeGroups(CancellationTok /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// @@ -898,7 +898,7 @@ public virtual async Task MigrateBackupsBackupsUnderAccountAsync(W /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// @@ -940,7 +940,7 @@ public virtual ArmOperation MigrateBackupsBackupsUnderAccount(WaitUntil waitUnti /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -1002,7 +1002,7 @@ public virtual async Task> AddTagAsync(string ke /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -1064,7 +1064,7 @@ public virtual Response AddTag(string key, string value, /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -1121,7 +1121,7 @@ public virtual async Task> SetTagsAsync(IDiction /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -1178,7 +1178,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -1238,7 +1238,7 @@ public virtual async Task> RemoveTagAsync(string /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppBackupData.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppBackupData.cs index bc18d554a3e6..df3e5c57a115 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppBackupData.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppBackupData.cs @@ -16,6 +16,7 @@ namespace Azure.ResourceManager.NetApp /// /// A class representing the NetAppBackup data model. /// Backup under a Backup Vault + /// Serialized Name: Backup /// public partial class NetAppBackupData : ResourceData { @@ -52,7 +53,10 @@ public partial class NetAppBackupData : ResourceData private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// ResourceId used to identify the Volume. + /// + /// ResourceId used to identify the Volume + /// Serialized Name: Backup.properties.volumeResourceId + /// /// is null. public NetAppBackupData(ResourceIdentifier volumeResourceId) { @@ -66,17 +70,50 @@ public NetAppBackupData(ResourceIdentifier volumeResourceId) /// The name. /// The resourceType. /// The systemData. - /// UUID v4 used to identify the Backup. - /// The creation date of the backup. - /// Azure lifecycle management. - /// Size of backup in bytes. - /// Label for backup. - /// Type of backup Manual or Scheduled. - /// Failure reason. - /// ResourceId used to identify the Volume. - /// Manual backup an already existing snapshot. This will always be false for scheduled backups and true/false for manual backups. - /// The name of the snapshot. - /// ResourceId used to identify the backup policy. + /// + /// UUID v4 used to identify the Backup + /// Serialized Name: Backup.properties.backupId + /// + /// + /// The creation date of the backup + /// Serialized Name: Backup.properties.creationDate + /// + /// + /// Azure lifecycle management + /// Serialized Name: Backup.properties.provisioningState + /// + /// + /// Size of backup in bytes + /// Serialized Name: Backup.properties.size + /// + /// + /// Label for backup + /// Serialized Name: Backup.properties.label + /// + /// + /// Type of backup Manual or Scheduled + /// Serialized Name: Backup.properties.backupType + /// + /// + /// Failure reason + /// Serialized Name: Backup.properties.failureReason + /// + /// + /// ResourceId used to identify the Volume + /// Serialized Name: Backup.properties.volumeResourceId + /// + /// + /// Manual backup an already existing snapshot. This will always be false for scheduled backups and true/false for manual backups + /// Serialized Name: Backup.properties.useExistingSnapshot + /// + /// + /// The name of the snapshot + /// Serialized Name: Backup.properties.snapshotName + /// + /// + /// ResourceId used to identify the backup policy + /// Serialized Name: Backup.properties.backupPolicyResourceId + /// /// Keeps track of any properties unknown to the library. internal NetAppBackupData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string backupId, DateTimeOffset? createdOn, string provisioningState, long? size, string label, NetAppBackupType? backupType, string failureReason, ResourceIdentifier volumeResourceId, bool? useExistingSnapshot, string snapshotName, ResourceIdentifier backupPolicyArmResourceId, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { @@ -99,27 +136,60 @@ internal NetAppBackupData() { } - /// UUID v4 used to identify the Backup. + /// + /// UUID v4 used to identify the Backup + /// Serialized Name: Backup.properties.backupId + /// public string BackupId { get; } - /// The creation date of the backup. + /// + /// The creation date of the backup + /// Serialized Name: Backup.properties.creationDate + /// public DateTimeOffset? CreatedOn { get; } - /// Azure lifecycle management. + /// + /// Azure lifecycle management + /// Serialized Name: Backup.properties.provisioningState + /// public string ProvisioningState { get; } - /// Size of backup in bytes. + /// + /// Size of backup in bytes + /// Serialized Name: Backup.properties.size + /// public long? Size { get; } - /// Label for backup. + /// + /// Label for backup + /// Serialized Name: Backup.properties.label + /// public string Label { get; set; } - /// Type of backup Manual or Scheduled. + /// + /// Type of backup Manual or Scheduled + /// Serialized Name: Backup.properties.backupType + /// public NetAppBackupType? BackupType { get; } - /// Failure reason. + /// + /// Failure reason + /// Serialized Name: Backup.properties.failureReason + /// public string FailureReason { get; } - /// ResourceId used to identify the Volume. + /// + /// ResourceId used to identify the Volume + /// Serialized Name: Backup.properties.volumeResourceId + /// public ResourceIdentifier VolumeResourceId { get; set; } - /// Manual backup an already existing snapshot. This will always be false for scheduled backups and true/false for manual backups. + /// + /// Manual backup an already existing snapshot. This will always be false for scheduled backups and true/false for manual backups + /// Serialized Name: Backup.properties.useExistingSnapshot + /// public bool? UseExistingSnapshot { get; set; } - /// The name of the snapshot. + /// + /// The name of the snapshot + /// Serialized Name: Backup.properties.snapshotName + /// public string SnapshotName { get; set; } - /// ResourceId used to identify the backup policy. + /// + /// ResourceId used to identify the backup policy + /// Serialized Name: Backup.properties.backupPolicyResourceId + /// public ResourceIdentifier BackupPolicyArmResourceId { get; } } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppBackupPolicyCollection.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppBackupPolicyCollection.cs index 3fba86dd0e12..1d6c899ddd83 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppBackupPolicyCollection.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppBackupPolicyCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUpda /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(string /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string backupPolicyName, /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -281,7 +281,7 @@ public virtual AsyncPageable GetAllAsync(Cancellatio /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -310,7 +310,7 @@ public virtual Pageable GetAll(CancellationToken can /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -353,7 +353,7 @@ public virtual async Task> ExistsAsync(string backupPolicyName, C /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -396,7 +396,7 @@ public virtual Response Exists(string backupPolicyName, CancellationToken /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -441,7 +441,7 @@ public virtual async Task> GetIfExi /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppBackupPolicyData.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppBackupPolicyData.cs index 077e2a8fd410..6b1a201aa22f 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppBackupPolicyData.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppBackupPolicyData.cs @@ -16,6 +16,7 @@ namespace Azure.ResourceManager.NetApp /// /// A class representing the NetAppBackupPolicy data model. /// Backup policy information + /// Serialized Name: BackupPolicy /// public partial class NetAppBackupPolicyData : TrackedResourceData { @@ -65,15 +66,42 @@ public NetAppBackupPolicyData(AzureLocation location) : base(location) /// The systemData. /// The tags. /// The location. - /// A unique read-only string that changes whenever the resource is updated. - /// Backup Policy Resource ID. - /// Azure lifecycle management. - /// Daily backups count to keep. - /// Weekly backups count to keep. - /// Monthly backups count to keep. - /// Volumes using current backup policy. - /// The property to decide policy is enabled or not. - /// A list of volumes assigned to this policy. + /// + /// A unique read-only string that changes whenever the resource is updated. + /// Serialized Name: BackupPolicy.etag + /// + /// + /// Backup Policy GUID ID + /// Serialized Name: BackupPolicy.properties.backupPolicyId + /// + /// + /// Azure lifecycle management + /// Serialized Name: BackupPolicy.properties.provisioningState + /// + /// + /// Daily backups count to keep + /// Serialized Name: BackupPolicy.properties.dailyBackupsToKeep + /// + /// + /// Weekly backups count to keep + /// Serialized Name: BackupPolicy.properties.weeklyBackupsToKeep + /// + /// + /// Monthly backups count to keep + /// Serialized Name: BackupPolicy.properties.monthlyBackupsToKeep + /// + /// + /// Volumes using current backup policy + /// Serialized Name: BackupPolicy.properties.volumesAssigned + /// + /// + /// The property to decide policy is enabled or not + /// Serialized Name: BackupPolicy.properties.enabled + /// + /// + /// A list of volumes assigned to this policy + /// Serialized Name: BackupPolicy.properties.volumeBackups + /// /// Keeps track of any properties unknown to the library. internal NetAppBackupPolicyData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ETag? etag, ResourceIdentifier backupPolicyId, string provisioningState, int? dailyBackupsToKeep, int? weeklyBackupsToKeep, int? monthlyBackupsToKeep, int? volumesAssigned, bool? isEnabled, IReadOnlyList volumeBackups, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { @@ -94,23 +122,50 @@ internal NetAppBackupPolicyData() { } - /// A unique read-only string that changes whenever the resource is updated. + /// + /// A unique read-only string that changes whenever the resource is updated. + /// Serialized Name: BackupPolicy.etag + /// public ETag? ETag { get; } - /// Backup Policy Resource ID. + /// + /// Backup Policy GUID ID + /// Serialized Name: BackupPolicy.properties.backupPolicyId + /// public ResourceIdentifier BackupPolicyId { get; } - /// Azure lifecycle management. + /// + /// Azure lifecycle management + /// Serialized Name: BackupPolicy.properties.provisioningState + /// public string ProvisioningState { get; } - /// Daily backups count to keep. + /// + /// Daily backups count to keep + /// Serialized Name: BackupPolicy.properties.dailyBackupsToKeep + /// public int? DailyBackupsToKeep { get; set; } - /// Weekly backups count to keep. + /// + /// Weekly backups count to keep + /// Serialized Name: BackupPolicy.properties.weeklyBackupsToKeep + /// public int? WeeklyBackupsToKeep { get; set; } - /// Monthly backups count to keep. + /// + /// Monthly backups count to keep + /// Serialized Name: BackupPolicy.properties.monthlyBackupsToKeep + /// public int? MonthlyBackupsToKeep { get; set; } - /// Volumes using current backup policy. + /// + /// Volumes using current backup policy + /// Serialized Name: BackupPolicy.properties.volumesAssigned + /// public int? VolumesAssigned { get; } - /// The property to decide policy is enabled or not. + /// + /// The property to decide policy is enabled or not + /// Serialized Name: BackupPolicy.properties.enabled + /// public bool? IsEnabled { get; set; } - /// A list of volumes assigned to this policy. + /// + /// A list of volumes assigned to this policy + /// Serialized Name: BackupPolicy.properties.volumeBackups + /// public IReadOnlyList VolumeBackups { get; } } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppBackupPolicyResource.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppBackupPolicyResource.cs index 26a8d08854cb..c383f58a7d3a 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppBackupPolicyResource.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppBackupPolicyResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync(Cancell /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationToken cancel /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -267,7 +267,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual async Task> UpdateAsync( /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -359,7 +359,7 @@ public virtual ArmOperation Update(WaitUntil waitUnt /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -421,7 +421,7 @@ public virtual async Task> AddTagAsync(stri /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -483,7 +483,7 @@ public virtual Response AddTag(string key, string va /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -540,7 +540,7 @@ public virtual async Task> SetTagsAsync(IDi /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -597,7 +597,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -657,7 +657,7 @@ public virtual async Task> RemoveTagAsync(s /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppBackupVaultBackupCollection.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppBackupVaultBackupCollection.cs index d8d32aed7788..acea1e1640b2 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppBackupVaultBackupCollection.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppBackupVaultBackupCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateO /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(Wait /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(st /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string backupName, /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(string /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -314,7 +314,7 @@ public virtual Pageable GetAll(string filter = /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -357,7 +357,7 @@ public virtual async Task> ExistsAsync(string backupName, Cancell /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -400,7 +400,7 @@ public virtual Response Exists(string backupName, CancellationToken cancel /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -445,7 +445,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppBackupVaultBackupResource.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppBackupVaultBackupResource.cs index 0beebf0a07fd..d46b93f65489 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppBackupVaultBackupResource.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppBackupVaultBackupResource.cs @@ -107,7 +107,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -147,7 +147,7 @@ public virtual async Task> GetAsync(Ca /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -187,7 +187,7 @@ public virtual Response Get(CancellationToken c /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -229,7 +229,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -271,7 +271,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -317,7 +317,7 @@ public virtual async Task> UpdateA /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -363,7 +363,7 @@ public virtual ArmOperation Update(WaitUntil wa /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// @@ -405,7 +405,7 @@ public virtual async Task RestoreFilesBackupsUnderBackupVaultAsync /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppBackupVaultCollection.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppBackupVaultCollection.cs index ff7207e235c8..386c52b48383 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppBackupVaultCollection.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppBackupVaultCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUpdat /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(string b /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string backupVaultName, C /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(Cancellation /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken canc /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string backupVaultName, Ca /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string backupVaultName, CancellationToken c /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> GetIfExis /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppBackupVaultData.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppBackupVaultData.cs index fd76bbbfcf60..48fd6a108b83 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppBackupVaultData.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppBackupVaultData.cs @@ -15,6 +15,7 @@ namespace Azure.ResourceManager.NetApp /// /// A class representing the NetAppBackupVault data model. /// Backup Vault information + /// Serialized Name: BackupVault /// public partial class NetAppBackupVaultData : TrackedResourceData { @@ -63,7 +64,10 @@ public NetAppBackupVaultData(AzureLocation location) : base(location) /// The systemData. /// The tags. /// The location. - /// Azure lifecycle management. + /// + /// Azure lifecycle management + /// Serialized Name: BackupVault.properties.provisioningState + /// /// Keeps track of any properties unknown to the library. internal NetAppBackupVaultData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, string provisioningState, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { @@ -76,7 +80,10 @@ internal NetAppBackupVaultData() { } - /// Azure lifecycle management. + /// + /// Azure lifecycle management + /// Serialized Name: BackupVault.properties.provisioningState + /// public string ProvisioningState { get; } } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppBackupVaultResource.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppBackupVaultResource.cs index eb7ffbe408d0..2677e0bd1c9f 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppBackupVaultResource.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppBackupVaultResource.cs @@ -110,7 +110,7 @@ public virtual NetAppBackupVaultBackupCollection GetNetAppBackupVaultBackups() /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetNetAppBa /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -172,7 +172,7 @@ public virtual Response GetNetAppBackupVaultBac /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -212,7 +212,7 @@ public virtual async Task> GetAsync(Cancella /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(CancellationToken cancell /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -294,7 +294,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -336,7 +336,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -382,7 +382,7 @@ public virtual async Task> UpdateAsync(W /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -428,7 +428,7 @@ public virtual ArmOperation Update(WaitUntil waitUnti /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -490,7 +490,7 @@ public virtual async Task> AddTagAsync(strin /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -552,7 +552,7 @@ public virtual Response AddTag(string key, string val /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -609,7 +609,7 @@ public virtual async Task> SetTagsAsync(IDic /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -666,7 +666,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -726,7 +726,7 @@ public virtual async Task> RemoveTagAsync(st /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppSubvolumeInfoCollection.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppSubvolumeInfoCollection.cs index f7555e969379..e6aded71a0c3 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppSubvolumeInfoCollection.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppSubvolumeInfoCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUpd /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUnti /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(string /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string subvolumeName, C /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(Cancellati /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken ca /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string subvolumeName, Canc /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string subvolumeName, CancellationToken can /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> GetIfEx /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppSubvolumeInfoData.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppSubvolumeInfoData.cs index ef117a59f328..7a142252a479 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppSubvolumeInfoData.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppSubvolumeInfoData.cs @@ -15,6 +15,7 @@ namespace Azure.ResourceManager.NetApp /// /// A class representing the NetAppSubvolumeInfo data model. /// Subvolume Information properties + /// Serialized Name: SubvolumeInfo /// public partial class NetAppSubvolumeInfoData : ResourceData { @@ -60,10 +61,22 @@ public NetAppSubvolumeInfoData() /// The name. /// The resourceType. /// The systemData. - /// Path to the subvolume. - /// Truncate subvolume to the provided size in bytes. - /// parent path to the subvolume. - /// Azure lifecycle management. + /// + /// Path to the subvolume + /// Serialized Name: SubvolumeInfo.properties.path + /// + /// + /// Truncate subvolume to the provided size in bytes + /// Serialized Name: SubvolumeInfo.properties.size + /// + /// + /// parent path to the subvolume + /// Serialized Name: SubvolumeInfo.properties.parentPath + /// + /// + /// Azure lifecycle management + /// Serialized Name: SubvolumeInfo.properties.provisioningState + /// /// Keeps track of any properties unknown to the library. internal NetAppSubvolumeInfoData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string path, long? size, string parentPath, string provisioningState, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { @@ -74,13 +87,25 @@ internal NetAppSubvolumeInfoData(ResourceIdentifier id, string name, ResourceTyp _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Path to the subvolume. + /// + /// Path to the subvolume + /// Serialized Name: SubvolumeInfo.properties.path + /// public string Path { get; set; } - /// Truncate subvolume to the provided size in bytes. + /// + /// Truncate subvolume to the provided size in bytes + /// Serialized Name: SubvolumeInfo.properties.size + /// public long? Size { get; set; } - /// parent path to the subvolume. + /// + /// parent path to the subvolume + /// Serialized Name: SubvolumeInfo.properties.parentPath + /// public string ParentPath { get; set; } - /// Azure lifecycle management. + /// + /// Azure lifecycle management + /// Serialized Name: SubvolumeInfo.properties.provisioningState + /// public string ProvisioningState { get; } } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppSubvolumeInfoResource.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppSubvolumeInfoResource.cs index 70da959bad01..0fca4af780c0 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppSubvolumeInfoResource.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppSubvolumeInfoResource.cs @@ -104,7 +104,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -144,7 +144,7 @@ public virtual async Task> GetAsync(Cancel /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual Response Get(CancellationToken cance /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -226,7 +226,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -268,7 +268,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -314,7 +314,7 @@ public virtual async Task> UpdateAsync /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -360,7 +360,7 @@ public virtual ArmOperation Update(WaitUntil waitUn /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -402,7 +402,7 @@ public virtual async Task> GetMetadataAsyn /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeCollection.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeCollection.cs index aab1fb410b5f..29585d4bac37 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeCollection.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUpdateAsyn /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitU /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(string volume /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string volumeName, Cancellatio /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken cancellat /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string volumeName, Cancell /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string volumeName, CancellationToken cancel /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> GetIfExistsAsy /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeData.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeData.Serialization.cs index 2421979a8f48..98fc4c4a0871 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeData.Serialization.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeData.Serialization.cs @@ -129,6 +129,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("networkFeatures"u8); writer.WriteStringValue(NetworkFeatures.Value.ToString()); } + if (options.Format != "W" && Optional.IsDefined(EffectiveNetworkFeatures)) + { + writer.WritePropertyName("effectiveNetworkFeatures"u8); + writer.WriteStringValue(EffectiveNetworkFeatures.Value.ToString()); + } if (options.Format != "W" && Optional.IsDefined(NetworkSiblingSetId)) { writer.WritePropertyName("networkSiblingSetId"u8); @@ -440,6 +445,7 @@ internal static NetAppVolumeData DeserializeNetAppVolumeData(JsonElement element string baremetalTenantId = default; ResourceIdentifier subnetId = default; NetAppNetworkFeature? networkFeatures = default; + NetAppNetworkFeature? effectiveNetworkFeatures = default; Guid? networkSiblingSetId = default; NetAppVolumeStorageToNetworkProximity? storageToNetworkProximity = default; IReadOnlyList mountTargets = default; @@ -664,6 +670,15 @@ internal static NetAppVolumeData DeserializeNetAppVolumeData(JsonElement element networkFeatures = new NetAppNetworkFeature(property0.Value.GetString()); continue; } + if (property0.NameEquals("effectiveNetworkFeatures"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + effectiveNetworkFeatures = new NetAppNetworkFeature(property0.Value.GetString()); + continue; + } if (property0.NameEquals("networkSiblingSetId"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -1076,6 +1091,7 @@ internal static NetAppVolumeData DeserializeNetAppVolumeData(JsonElement element baremetalTenantId, subnetId, networkFeatures, + effectiveNetworkFeatures, networkSiblingSetId, storageToNetworkProximity, mountTargets ?? new ChangeTrackingList(), diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeData.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeData.cs index 0aebbd871db4..cff52491f3a3 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeData.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeData.cs @@ -16,6 +16,7 @@ namespace Azure.ResourceManager.NetApp /// /// A class representing the NetAppVolume data model. /// Volume resource + /// Serialized Name: Volume /// public partial class NetAppVolumeData : TrackedResourceData { @@ -53,9 +54,18 @@ public partial class NetAppVolumeData : TrackedResourceData /// Initializes a new instance of . /// The location. - /// A unique file path for the volume. Used when creating mount targets. - /// Maximum storage quota allowed for a file system in bytes. This is a soft quota used for alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. For large volumes, valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to 2400GiB to 2400TiB. Values expressed in bytes as multiples of 1 GiB. - /// The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes. + /// + /// A unique file path for the volume. Used when creating mount targets + /// Serialized Name: Volume.properties.creationToken + /// + /// + /// Maximum storage quota allowed for a file system in bytes. This is a soft quota used for alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. For large volumes, valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to 2400GiB to 2400TiB. Values expressed in bytes as multiples of 1 GiB. + /// Serialized Name: Volume.properties.usageThreshold + /// + /// + /// The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes + /// Serialized Name: Volume.properties.subnetId + /// /// or is null. public NetAppVolumeData(AzureLocation location, string creationToken, long usageThreshold, ResourceIdentifier subnetId) : base(location) { @@ -79,69 +89,239 @@ public NetAppVolumeData(AzureLocation location, string creationToken, long usage /// The systemData. /// The tags. /// The location. - /// A unique read-only string that changes whenever the resource is updated. - /// Availability Zone. - /// Unique FileSystem Identifier. - /// A unique file path for the volume. Used when creating mount targets. - /// The service level of the file system. - /// Maximum storage quota allowed for a file system in bytes. This is a soft quota used for alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. For large volumes, valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to 2400GiB to 2400TiB. Values expressed in bytes as multiples of 1 GiB. - /// Set of export policy rules. - /// Set of protocol types, default NFSv3, CIFS for SMB protocol. - /// Azure lifecycle management. - /// Resource identifier used to identify the Snapshot. - /// If enabled (true) the snapshot the volume was created from will be automatically deleted after the volume create operation has finished. Defaults to false. - /// Resource identifier used to identify the Backup. - /// Unique Baremetal Tenant Identifier. - /// The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes. - /// Network features available to the volume, or current state of update. - /// Network Sibling Set ID for the the group of volumes sharing networking resources. - /// Provides storage to network proximity information for the volume. - /// List of mount targets. - /// What type of volume is this. For destination volumes in Cross Region Replication, set type to DataProtection. - /// DataProtection type volumes include an object containing details of the replication. - /// Restoring. - /// If enabled (true) the volume will contain a read-only snapshot directory which provides access to each of the volume's snapshots (defaults to true). - /// Describe if a volume is KerberosEnabled. To be use with swagger version 2020-05-01 or later. - /// The security style of volume, default unix, defaults to ntfs for dual protocol or CIFS protocol. - /// Enables encryption for in-flight smb3 data. Only applicable for SMB/DualProtocol volume. To be used with swagger version 2020-08-01 or later. - /// Enables access-based enumeration share property for SMB Shares. Only applicable for SMB/DualProtocol volume. - /// Enables non-browsable property for SMB Shares. Only applicable for SMB/DualProtocol volume. - /// Enables continuously available share property for smb volume. Only applicable for SMB volume. - /// Maximum throughput in MiB/s that can be achieved by this volume and this will be accepted as input only for manual qosType volume. - /// Actual throughput in MiB/s for auto qosType volumes calculated based on size and serviceLevel. - /// Source of key used to encrypt data in volume. Applicable if NetApp account has encryption.keySource = 'Microsoft.KeyVault'. Possible values (case-insensitive) are: 'Microsoft.NetApp, Microsoft.KeyVault'. - /// The resource ID of private endpoint for KeyVault. It must reside in the same VNET as the volume. Only applicable if encryptionKeySource = 'Microsoft.KeyVault'. - /// Specifies whether LDAP is enabled or not for a given NFS volume. - /// Specifies whether Cool Access(tiering) is enabled for the volume. - /// Specifies the number of days after which data that is not accessed by clients will be tiered. + /// + /// A unique read-only string that changes whenever the resource is updated. + /// Serialized Name: Volume.etag + /// + /// + /// Availability Zone + /// Serialized Name: Volume.zones + /// + /// + /// Unique FileSystem Identifier. + /// Serialized Name: Volume.properties.fileSystemId + /// + /// + /// A unique file path for the volume. Used when creating mount targets + /// Serialized Name: Volume.properties.creationToken + /// + /// + /// The service level of the file system + /// Serialized Name: Volume.properties.serviceLevel + /// + /// + /// Maximum storage quota allowed for a file system in bytes. This is a soft quota used for alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. For large volumes, valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to 2400GiB to 2400TiB. Values expressed in bytes as multiples of 1 GiB. + /// Serialized Name: Volume.properties.usageThreshold + /// + /// + /// Set of export policy rules + /// Serialized Name: Volume.properties.exportPolicy + /// + /// + /// Set of protocol types, default NFSv3, CIFS for SMB protocol + /// Serialized Name: Volume.properties.protocolTypes + /// + /// + /// Azure lifecycle management + /// Serialized Name: Volume.properties.provisioningState + /// + /// + /// Resource identifier used to identify the Snapshot. + /// Serialized Name: Volume.properties.snapshotId + /// + /// + /// If enabled (true) the snapshot the volume was created from will be automatically deleted after the volume create operation has finished. Defaults to false + /// Serialized Name: Volume.properties.deleteBaseSnapshot + /// + /// + /// Resource identifier used to identify the Backup. + /// Serialized Name: Volume.properties.backupId + /// + /// + /// Unique Baremetal Tenant Identifier. + /// Serialized Name: Volume.properties.baremetalTenantId + /// + /// + /// The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes + /// Serialized Name: Volume.properties.subnetId + /// + /// + /// The original value of the network features type available to the volume at the time it was created. + /// Serialized Name: Volume.properties.networkFeatures + /// + /// + /// The effective value of the network features type available to the volume, or current effective state of update. + /// Serialized Name: Volume.properties.effectiveNetworkFeatures + /// + /// + /// Network Sibling Set ID for the the group of volumes sharing networking resources. + /// Serialized Name: Volume.properties.networkSiblingSetId + /// + /// + /// Provides storage to network proximity information for the volume. + /// Serialized Name: Volume.properties.storageToNetworkProximity + /// + /// + /// List of mount targets + /// Serialized Name: Volume.properties.mountTargets + /// + /// + /// What type of volume is this. For destination volumes in Cross Region Replication, set type to DataProtection + /// Serialized Name: Volume.properties.volumeType + /// + /// + /// DataProtection type volumes include an object containing details of the replication + /// Serialized Name: Volume.properties.dataProtection + /// + /// + /// Restoring + /// Serialized Name: Volume.properties.isRestoring + /// + /// + /// If enabled (true) the volume will contain a read-only snapshot directory which provides access to each of the volume's snapshots (defaults to true). + /// Serialized Name: Volume.properties.snapshotDirectoryVisible + /// + /// + /// Describe if a volume is KerberosEnabled. To be use with swagger version 2020-05-01 or later + /// Serialized Name: Volume.properties.kerberosEnabled + /// + /// + /// The security style of volume, default unix, defaults to ntfs for dual protocol or CIFS protocol + /// Serialized Name: Volume.properties.securityStyle + /// + /// + /// Enables encryption for in-flight smb3 data. Only applicable for SMB/DualProtocol volume. To be used with swagger version 2020-08-01 or later + /// Serialized Name: Volume.properties.smbEncryption + /// + /// + /// Enables access-based enumeration share property for SMB Shares. Only applicable for SMB/DualProtocol volume + /// Serialized Name: Volume.properties.smbAccessBasedEnumeration + /// + /// + /// Enables non-browsable property for SMB Shares. Only applicable for SMB/DualProtocol volume + /// Serialized Name: Volume.properties.smbNonBrowsable + /// + /// + /// Enables continuously available share property for smb volume. Only applicable for SMB volume + /// Serialized Name: Volume.properties.smbContinuouslyAvailable + /// + /// + /// Maximum throughput in MiB/s that can be achieved by this volume and this will be accepted as input only for manual qosType volume + /// Serialized Name: Volume.properties.throughputMibps + /// + /// + /// Actual throughput in MiB/s for auto qosType volumes calculated based on size and serviceLevel + /// Serialized Name: Volume.properties.actualThroughputMibps + /// + /// + /// Source of key used to encrypt data in volume. Applicable if NetApp account has encryption.keySource = 'Microsoft.KeyVault'. Possible values (case-insensitive) are: 'Microsoft.NetApp, Microsoft.KeyVault' + /// Serialized Name: Volume.properties.encryptionKeySource + /// + /// + /// The resource ID of private endpoint for KeyVault. It must reside in the same VNET as the volume. Only applicable if encryptionKeySource = 'Microsoft.KeyVault'. + /// Serialized Name: Volume.properties.keyVaultPrivateEndpointResourceId + /// + /// + /// Specifies whether LDAP is enabled or not for a given NFS volume. + /// Serialized Name: Volume.properties.ldapEnabled + /// + /// + /// Specifies whether Cool Access(tiering) is enabled for the volume. + /// Serialized Name: Volume.properties.coolAccess + /// + /// + /// Specifies the number of days after which data that is not accessed by clients will be tiered. + /// Serialized Name: Volume.properties.coolnessPeriod + /// /// /// coolAccessRetrievalPolicy determines the data retrieval behavior from the cool tier to standard storage based on the read pattern for cool access enabled volumes. The possible values for this field are: /// Default - Data will be pulled from cool tier to standard storage on random reads. This policy is the default. /// OnRead - All client-driven data read is pulled from cool tier to standard storage on both sequential and random reads. /// Never - No client-driven data is pulled from cool tier to standard storage. + /// Serialized Name: Volume.properties.coolAccessRetrievalPolicy + /// + /// + /// UNIX permissions for NFS volume accepted in octal 4 digit format. First digit selects the set user ID(4), set group ID (2) and sticky (1) attributes. Second digit selects permission for the owner of the file: read (4), write (2) and execute (1). Third selects permissions for other users in the same group. the fourth for other users not in the group. 0755 - gives read/write/execute permissions to owner and read/execute to group and other users. + /// Serialized Name: Volume.properties.unixPermissions + /// + /// + /// When a volume is being restored from another volume's snapshot, will show the percentage completion of this cloning process. When this value is empty/null there is no cloning process currently happening on this volume. This value will update every 5 minutes during cloning. + /// Serialized Name: Volume.properties.cloneProgress + /// + /// + /// Flag indicating whether file access logs are enabled for the volume, based on active diagnostic settings present on the volume. + /// Serialized Name: Volume.properties.fileAccessLogs + /// + /// + /// Specifies whether the volume is enabled for Azure VMware Solution (AVS) datastore purpose + /// Serialized Name: Volume.properties.avsDataStore + /// + /// + /// Data store resource unique identifier + /// Serialized Name: Volume.properties.dataStoreResourceId + /// + /// + /// Specifies if default quota is enabled for the volume. + /// Serialized Name: Volume.properties.isDefaultQuotaEnabled + /// + /// + /// Default user quota for volume in KiBs. If isDefaultQuotaEnabled is set, the minimum value of 4 KiBs applies . + /// Serialized Name: Volume.properties.defaultUserQuotaInKiBs + /// + /// + /// Default group quota for volume in KiBs. If isDefaultQuotaEnabled is set, the minimum value of 4 KiBs applies. + /// Serialized Name: Volume.properties.defaultGroupQuotaInKiBs + /// + /// + /// Maximum number of files allowed. Needs a service request in order to be changed. Only allowed to be changed if volume quota is more than 4TiB. + /// Serialized Name: Volume.properties.maximumNumberOfFiles + /// + /// + /// Volume Group Name + /// Serialized Name: Volume.properties.volumeGroupName + /// + /// + /// Pool Resource Id used in case of creating a volume through volume group + /// Serialized Name: Volume.properties.capacityPoolResourceId + /// + /// + /// Proximity placement group associated with the volume + /// Serialized Name: Volume.properties.proximityPlacementGroup + /// + /// + /// T2 network information + /// Serialized Name: Volume.properties.t2Network + /// + /// + /// Volume spec name is the application specific designation or identifier for the particular volume in a volume group for e.g. data, log + /// Serialized Name: Volume.properties.volumeSpecName + /// + /// + /// Specifies if the volume is encrypted or not. Only available on volumes created or updated after 2022-01-01. + /// Serialized Name: Volume.properties.encrypted + /// + /// + /// Application specific placement rules for the particular volume + /// Serialized Name: Volume.properties.placementRules + /// + /// + /// Flag indicating whether subvolume operations are enabled on the volume + /// Serialized Name: Volume.properties.enableSubvolumes + /// + /// + /// The availability zone where the volume is provisioned. This refers to the logical availability zone where the volume resides. + /// Serialized Name: Volume.properties.provisionedAvailabilityZone + /// + /// + /// Specifies whether volume is a Large Volume or Regular Volume. + /// Serialized Name: Volume.properties.isLargeVolume + /// + /// + /// Id of the snapshot or backup that the volume is restored from. + /// Serialized Name: Volume.properties.originatingResourceId /// - /// UNIX permissions for NFS volume accepted in octal 4 digit format. First digit selects the set user ID(4), set group ID (2) and sticky (1) attributes. Second digit selects permission for the owner of the file: read (4), write (2) and execute (1). Third selects permissions for other users in the same group. the fourth for other users not in the group. 0755 - gives read/write/execute permissions to owner and read/execute to group and other users. - /// When a volume is being restored from another volume's snapshot, will show the percentage completion of this cloning process. When this value is empty/null there is no cloning process currently happening on this volume. This value will update every 5 minutes during cloning. - /// Flag indicating whether file access logs are enabled for the volume, based on active diagnostic settings present on the volume. - /// Specifies whether the volume is enabled for Azure VMware Solution (AVS) datastore purpose. - /// Data store resource unique identifier. - /// Specifies if default quota is enabled for the volume. - /// Default user quota for volume in KiBs. If isDefaultQuotaEnabled is set, the minimum value of 4 KiBs applies . - /// Default group quota for volume in KiBs. If isDefaultQuotaEnabled is set, the minimum value of 4 KiBs applies. - /// Maximum number of files allowed. Needs a service request in order to be changed. Only allowed to be changed if volume quota is more than 4TiB. - /// Volume Group Name. - /// Pool Resource Id used in case of creating a volume through volume group. - /// Proximity placement group associated with the volume. - /// T2 network information. - /// Volume spec name is the application specific designation or identifier for the particular volume in a volume group for e.g. data, log. - /// Specifies if the volume is encrypted or not. Only available on volumes created or updated after 2022-01-01. - /// Application specific placement rules for the particular volume. - /// Flag indicating whether subvolume operations are enabled on the volume. - /// The availability zone where the volume is provisioned. This refers to the logical availability zone where the volume resides. - /// Specifies whether volume is a Large Volume or Regular Volume. - /// Id of the snapshot or backup that the volume is restored from. /// Keeps track of any properties unknown to the library. - internal NetAppVolumeData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ETag? etag, IList zones, Guid? fileSystemId, string creationToken, NetAppFileServiceLevel? serviceLevel, long usageThreshold, VolumePropertiesExportPolicy exportPolicy, IList protocolTypes, string provisioningState, string snapshotId, bool? deleteBaseSnapshot, string backupId, string baremetalTenantId, ResourceIdentifier subnetId, NetAppNetworkFeature? networkFeatures, Guid? networkSiblingSetId, NetAppVolumeStorageToNetworkProximity? storageToNetworkProximity, IReadOnlyList mountTargets, string volumeType, NetAppVolumeDataProtection dataProtection, bool? isRestoring, bool? isSnapshotDirectoryVisible, bool? isKerberosEnabled, NetAppVolumeSecurityStyle? securityStyle, bool? isSmbEncryptionEnabled, SmbAccessBasedEnumeration? smbAccessBasedEnumeration, SmbNonBrowsable? smbNonBrowsable, bool? isSmbContinuouslyAvailable, float? throughputMibps, float? actualThroughputMibps, NetAppEncryptionKeySource? encryptionKeySource, ResourceIdentifier keyVaultPrivateEndpointResourceId, bool? isLdapEnabled, bool? isCoolAccessEnabled, int? coolnessPeriod, CoolAccessRetrievalPolicy? coolAccessRetrievalPolicy, string unixPermissions, int? cloneProgress, NetAppFileAccessLog? fileAccessLogs, NetAppAvsDataStore? avsDataStore, IReadOnlyList dataStoreResourceId, bool? isDefaultQuotaEnabled, long? defaultUserQuotaInKiBs, long? defaultGroupQuotaInKiBs, long? maximumNumberOfFiles, string volumeGroupName, ResourceIdentifier capacityPoolResourceId, ResourceIdentifier proximityPlacementGroupId, string t2Network, string volumeSpecName, bool? isEncrypted, IList placementRules, EnableNetAppSubvolume? enableSubvolumes, string provisionedAvailabilityZone, bool? isLargeVolume, ResourceIdentifier originatingResourceId, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + internal NetAppVolumeData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ETag? etag, IList zones, Guid? fileSystemId, string creationToken, NetAppFileServiceLevel? serviceLevel, long usageThreshold, VolumePropertiesExportPolicy exportPolicy, IList protocolTypes, string provisioningState, string snapshotId, bool? deleteBaseSnapshot, string backupId, string baremetalTenantId, ResourceIdentifier subnetId, NetAppNetworkFeature? networkFeatures, NetAppNetworkFeature? effectiveNetworkFeatures, Guid? networkSiblingSetId, NetAppVolumeStorageToNetworkProximity? storageToNetworkProximity, IReadOnlyList mountTargets, string volumeType, NetAppVolumeDataProtection dataProtection, bool? isRestoring, bool? isSnapshotDirectoryVisible, bool? isKerberosEnabled, NetAppVolumeSecurityStyle? securityStyle, bool? isSmbEncryptionEnabled, SmbAccessBasedEnumeration? smbAccessBasedEnumeration, SmbNonBrowsable? smbNonBrowsable, bool? isSmbContinuouslyAvailable, float? throughputMibps, float? actualThroughputMibps, NetAppEncryptionKeySource? encryptionKeySource, ResourceIdentifier keyVaultPrivateEndpointResourceId, bool? isLdapEnabled, bool? isCoolAccessEnabled, int? coolnessPeriod, CoolAccessRetrievalPolicy? coolAccessRetrievalPolicy, string unixPermissions, int? cloneProgress, NetAppFileAccessLog? fileAccessLogs, NetAppAvsDataStore? avsDataStore, IReadOnlyList dataStoreResourceId, bool? isDefaultQuotaEnabled, long? defaultUserQuotaInKiBs, long? defaultGroupQuotaInKiBs, long? maximumNumberOfFiles, string volumeGroupName, ResourceIdentifier capacityPoolResourceId, ResourceIdentifier proximityPlacementGroupId, string t2Network, string volumeSpecName, bool? isEncrypted, IList placementRules, EnableNetAppSubvolume? enableSubvolumes, string provisionedAvailabilityZone, bool? isLargeVolume, ResourceIdentifier originatingResourceId, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { ETag = etag; Zones = zones; @@ -158,6 +338,7 @@ internal NetAppVolumeData(ResourceIdentifier id, string name, ResourceType resou BaremetalTenantId = baremetalTenantId; SubnetId = subnetId; NetworkFeatures = networkFeatures; + EffectiveNetworkFeatures = effectiveNetworkFeatures; NetworkSiblingSetId = networkSiblingSetId; StorageToNetworkProximity = storageToNetworkProximity; MountTargets = mountTargets; @@ -207,21 +388,45 @@ internal NetAppVolumeData() { } - /// A unique read-only string that changes whenever the resource is updated. + /// + /// A unique read-only string that changes whenever the resource is updated. + /// Serialized Name: Volume.etag + /// public ETag? ETag { get; } - /// Availability Zone. + /// + /// Availability Zone + /// Serialized Name: Volume.zones + /// public IList Zones { get; } - /// Unique FileSystem Identifier. + /// + /// Unique FileSystem Identifier. + /// Serialized Name: Volume.properties.fileSystemId + /// public Guid? FileSystemId { get; } - /// A unique file path for the volume. Used when creating mount targets. + /// + /// A unique file path for the volume. Used when creating mount targets + /// Serialized Name: Volume.properties.creationToken + /// public string CreationToken { get; set; } - /// The service level of the file system. + /// + /// The service level of the file system + /// Serialized Name: Volume.properties.serviceLevel + /// public NetAppFileServiceLevel? ServiceLevel { get; set; } - /// Maximum storage quota allowed for a file system in bytes. This is a soft quota used for alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. For large volumes, valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to 2400GiB to 2400TiB. Values expressed in bytes as multiples of 1 GiB. + /// + /// Maximum storage quota allowed for a file system in bytes. This is a soft quota used for alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. For large volumes, valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to 2400GiB to 2400TiB. Values expressed in bytes as multiples of 1 GiB. + /// Serialized Name: Volume.properties.usageThreshold + /// public long UsageThreshold { get; set; } - /// Set of export policy rules. + /// + /// Set of export policy rules + /// Serialized Name: Volume.properties.exportPolicy + /// internal VolumePropertiesExportPolicy ExportPolicy { get; set; } - /// Export policy rule. + /// + /// Export policy rule + /// Serialized Name: VolumePropertiesExportPolicy.rules + /// public IList ExportRules { get @@ -232,108 +437,258 @@ public IList ExportRules } } - /// Set of protocol types, default NFSv3, CIFS for SMB protocol. + /// + /// Set of protocol types, default NFSv3, CIFS for SMB protocol + /// Serialized Name: Volume.properties.protocolTypes + /// public IList ProtocolTypes { get; } - /// Azure lifecycle management. + /// + /// Azure lifecycle management + /// Serialized Name: Volume.properties.provisioningState + /// public string ProvisioningState { get; } - /// Resource identifier used to identify the Snapshot. + /// + /// Resource identifier used to identify the Snapshot. + /// Serialized Name: Volume.properties.snapshotId + /// public string SnapshotId { get; set; } - /// If enabled (true) the snapshot the volume was created from will be automatically deleted after the volume create operation has finished. Defaults to false. + /// + /// If enabled (true) the snapshot the volume was created from will be automatically deleted after the volume create operation has finished. Defaults to false + /// Serialized Name: Volume.properties.deleteBaseSnapshot + /// public bool? DeleteBaseSnapshot { get; set; } - /// Resource identifier used to identify the Backup. + /// + /// Resource identifier used to identify the Backup. + /// Serialized Name: Volume.properties.backupId + /// public string BackupId { get; set; } - /// Unique Baremetal Tenant Identifier. + /// + /// Unique Baremetal Tenant Identifier. + /// Serialized Name: Volume.properties.baremetalTenantId + /// public string BaremetalTenantId { get; } - /// The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes. + /// + /// The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes + /// Serialized Name: Volume.properties.subnetId + /// public ResourceIdentifier SubnetId { get; set; } - /// Network features available to the volume, or current state of update. + /// + /// The original value of the network features type available to the volume at the time it was created. + /// Serialized Name: Volume.properties.networkFeatures + /// public NetAppNetworkFeature? NetworkFeatures { get; set; } - /// Network Sibling Set ID for the the group of volumes sharing networking resources. + /// + /// The effective value of the network features type available to the volume, or current effective state of update. + /// Serialized Name: Volume.properties.effectiveNetworkFeatures + /// + public NetAppNetworkFeature? EffectiveNetworkFeatures { get; } + /// + /// Network Sibling Set ID for the the group of volumes sharing networking resources. + /// Serialized Name: Volume.properties.networkSiblingSetId + /// public Guid? NetworkSiblingSetId { get; } - /// Provides storage to network proximity information for the volume. + /// + /// Provides storage to network proximity information for the volume. + /// Serialized Name: Volume.properties.storageToNetworkProximity + /// public NetAppVolumeStorageToNetworkProximity? StorageToNetworkProximity { get; } - /// List of mount targets. + /// + /// List of mount targets + /// Serialized Name: Volume.properties.mountTargets + /// public IReadOnlyList MountTargets { get; } - /// What type of volume is this. For destination volumes in Cross Region Replication, set type to DataProtection. + /// + /// What type of volume is this. For destination volumes in Cross Region Replication, set type to DataProtection + /// Serialized Name: Volume.properties.volumeType + /// public string VolumeType { get; set; } - /// DataProtection type volumes include an object containing details of the replication. + /// + /// DataProtection type volumes include an object containing details of the replication + /// Serialized Name: Volume.properties.dataProtection + /// public NetAppVolumeDataProtection DataProtection { get; set; } - /// Restoring. + /// + /// Restoring + /// Serialized Name: Volume.properties.isRestoring + /// public bool? IsRestoring { get; set; } - /// If enabled (true) the volume will contain a read-only snapshot directory which provides access to each of the volume's snapshots (defaults to true). + /// + /// If enabled (true) the volume will contain a read-only snapshot directory which provides access to each of the volume's snapshots (defaults to true). + /// Serialized Name: Volume.properties.snapshotDirectoryVisible + /// public bool? IsSnapshotDirectoryVisible { get; set; } - /// Describe if a volume is KerberosEnabled. To be use with swagger version 2020-05-01 or later. + /// + /// Describe if a volume is KerberosEnabled. To be use with swagger version 2020-05-01 or later + /// Serialized Name: Volume.properties.kerberosEnabled + /// public bool? IsKerberosEnabled { get; set; } - /// The security style of volume, default unix, defaults to ntfs for dual protocol or CIFS protocol. + /// + /// The security style of volume, default unix, defaults to ntfs for dual protocol or CIFS protocol + /// Serialized Name: Volume.properties.securityStyle + /// public NetAppVolumeSecurityStyle? SecurityStyle { get; set; } - /// Enables encryption for in-flight smb3 data. Only applicable for SMB/DualProtocol volume. To be used with swagger version 2020-08-01 or later. + /// + /// Enables encryption for in-flight smb3 data. Only applicable for SMB/DualProtocol volume. To be used with swagger version 2020-08-01 or later + /// Serialized Name: Volume.properties.smbEncryption + /// public bool? IsSmbEncryptionEnabled { get; set; } - /// Enables access-based enumeration share property for SMB Shares. Only applicable for SMB/DualProtocol volume. + /// + /// Enables access-based enumeration share property for SMB Shares. Only applicable for SMB/DualProtocol volume + /// Serialized Name: Volume.properties.smbAccessBasedEnumeration + /// public SmbAccessBasedEnumeration? SmbAccessBasedEnumeration { get; set; } - /// Enables non-browsable property for SMB Shares. Only applicable for SMB/DualProtocol volume. + /// + /// Enables non-browsable property for SMB Shares. Only applicable for SMB/DualProtocol volume + /// Serialized Name: Volume.properties.smbNonBrowsable + /// public SmbNonBrowsable? SmbNonBrowsable { get; set; } - /// Enables continuously available share property for smb volume. Only applicable for SMB volume. + /// + /// Enables continuously available share property for smb volume. Only applicable for SMB volume + /// Serialized Name: Volume.properties.smbContinuouslyAvailable + /// public bool? IsSmbContinuouslyAvailable { get; set; } - /// Maximum throughput in MiB/s that can be achieved by this volume and this will be accepted as input only for manual qosType volume. + /// + /// Maximum throughput in MiB/s that can be achieved by this volume and this will be accepted as input only for manual qosType volume + /// Serialized Name: Volume.properties.throughputMibps + /// public float? ThroughputMibps { get; set; } - /// Actual throughput in MiB/s for auto qosType volumes calculated based on size and serviceLevel. + /// + /// Actual throughput in MiB/s for auto qosType volumes calculated based on size and serviceLevel + /// Serialized Name: Volume.properties.actualThroughputMibps + /// public float? ActualThroughputMibps { get; } - /// Source of key used to encrypt data in volume. Applicable if NetApp account has encryption.keySource = 'Microsoft.KeyVault'. Possible values (case-insensitive) are: 'Microsoft.NetApp, Microsoft.KeyVault'. + /// + /// Source of key used to encrypt data in volume. Applicable if NetApp account has encryption.keySource = 'Microsoft.KeyVault'. Possible values (case-insensitive) are: 'Microsoft.NetApp, Microsoft.KeyVault' + /// Serialized Name: Volume.properties.encryptionKeySource + /// public NetAppEncryptionKeySource? EncryptionKeySource { get; set; } - /// The resource ID of private endpoint for KeyVault. It must reside in the same VNET as the volume. Only applicable if encryptionKeySource = 'Microsoft.KeyVault'. + /// + /// The resource ID of private endpoint for KeyVault. It must reside in the same VNET as the volume. Only applicable if encryptionKeySource = 'Microsoft.KeyVault'. + /// Serialized Name: Volume.properties.keyVaultPrivateEndpointResourceId + /// public ResourceIdentifier KeyVaultPrivateEndpointResourceId { get; set; } - /// Specifies whether LDAP is enabled or not for a given NFS volume. + /// + /// Specifies whether LDAP is enabled or not for a given NFS volume. + /// Serialized Name: Volume.properties.ldapEnabled + /// public bool? IsLdapEnabled { get; set; } - /// Specifies whether Cool Access(tiering) is enabled for the volume. + /// + /// Specifies whether Cool Access(tiering) is enabled for the volume. + /// Serialized Name: Volume.properties.coolAccess + /// public bool? IsCoolAccessEnabled { get; set; } - /// Specifies the number of days after which data that is not accessed by clients will be tiered. + /// + /// Specifies the number of days after which data that is not accessed by clients will be tiered. + /// Serialized Name: Volume.properties.coolnessPeriod + /// public int? CoolnessPeriod { get; set; } /// /// coolAccessRetrievalPolicy determines the data retrieval behavior from the cool tier to standard storage based on the read pattern for cool access enabled volumes. The possible values for this field are: /// Default - Data will be pulled from cool tier to standard storage on random reads. This policy is the default. /// OnRead - All client-driven data read is pulled from cool tier to standard storage on both sequential and random reads. /// Never - No client-driven data is pulled from cool tier to standard storage. + /// Serialized Name: Volume.properties.coolAccessRetrievalPolicy /// public CoolAccessRetrievalPolicy? CoolAccessRetrievalPolicy { get; set; } - /// UNIX permissions for NFS volume accepted in octal 4 digit format. First digit selects the set user ID(4), set group ID (2) and sticky (1) attributes. Second digit selects permission for the owner of the file: read (4), write (2) and execute (1). Third selects permissions for other users in the same group. the fourth for other users not in the group. 0755 - gives read/write/execute permissions to owner and read/execute to group and other users. + /// + /// UNIX permissions for NFS volume accepted in octal 4 digit format. First digit selects the set user ID(4), set group ID (2) and sticky (1) attributes. Second digit selects permission for the owner of the file: read (4), write (2) and execute (1). Third selects permissions for other users in the same group. the fourth for other users not in the group. 0755 - gives read/write/execute permissions to owner and read/execute to group and other users. + /// Serialized Name: Volume.properties.unixPermissions + /// public string UnixPermissions { get; set; } - /// When a volume is being restored from another volume's snapshot, will show the percentage completion of this cloning process. When this value is empty/null there is no cloning process currently happening on this volume. This value will update every 5 minutes during cloning. + /// + /// When a volume is being restored from another volume's snapshot, will show the percentage completion of this cloning process. When this value is empty/null there is no cloning process currently happening on this volume. This value will update every 5 minutes during cloning. + /// Serialized Name: Volume.properties.cloneProgress + /// public int? CloneProgress { get; } - /// Flag indicating whether file access logs are enabled for the volume, based on active diagnostic settings present on the volume. + /// + /// Flag indicating whether file access logs are enabled for the volume, based on active diagnostic settings present on the volume. + /// Serialized Name: Volume.properties.fileAccessLogs + /// public NetAppFileAccessLog? FileAccessLogs { get; } - /// Specifies whether the volume is enabled for Azure VMware Solution (AVS) datastore purpose. + /// + /// Specifies whether the volume is enabled for Azure VMware Solution (AVS) datastore purpose + /// Serialized Name: Volume.properties.avsDataStore + /// public NetAppAvsDataStore? AvsDataStore { get; set; } - /// Data store resource unique identifier. + /// + /// Data store resource unique identifier + /// Serialized Name: Volume.properties.dataStoreResourceId + /// public IReadOnlyList DataStoreResourceId { get; } - /// Specifies if default quota is enabled for the volume. + /// + /// Specifies if default quota is enabled for the volume. + /// Serialized Name: Volume.properties.isDefaultQuotaEnabled + /// public bool? IsDefaultQuotaEnabled { get; set; } - /// Default user quota for volume in KiBs. If isDefaultQuotaEnabled is set, the minimum value of 4 KiBs applies . + /// + /// Default user quota for volume in KiBs. If isDefaultQuotaEnabled is set, the minimum value of 4 KiBs applies . + /// Serialized Name: Volume.properties.defaultUserQuotaInKiBs + /// public long? DefaultUserQuotaInKiBs { get; set; } - /// Default group quota for volume in KiBs. If isDefaultQuotaEnabled is set, the minimum value of 4 KiBs applies. + /// + /// Default group quota for volume in KiBs. If isDefaultQuotaEnabled is set, the minimum value of 4 KiBs applies. + /// Serialized Name: Volume.properties.defaultGroupQuotaInKiBs + /// public long? DefaultGroupQuotaInKiBs { get; set; } - /// Maximum number of files allowed. Needs a service request in order to be changed. Only allowed to be changed if volume quota is more than 4TiB. + /// + /// Maximum number of files allowed. Needs a service request in order to be changed. Only allowed to be changed if volume quota is more than 4TiB. + /// Serialized Name: Volume.properties.maximumNumberOfFiles + /// public long? MaximumNumberOfFiles { get; } - /// Volume Group Name. + /// + /// Volume Group Name + /// Serialized Name: Volume.properties.volumeGroupName + /// public string VolumeGroupName { get; } - /// Pool Resource Id used in case of creating a volume through volume group. + /// + /// Pool Resource Id used in case of creating a volume through volume group + /// Serialized Name: Volume.properties.capacityPoolResourceId + /// public ResourceIdentifier CapacityPoolResourceId { get; set; } - /// Proximity placement group associated with the volume. + /// + /// Proximity placement group associated with the volume + /// Serialized Name: Volume.properties.proximityPlacementGroup + /// public ResourceIdentifier ProximityPlacementGroupId { get; set; } - /// T2 network information. + /// + /// T2 network information + /// Serialized Name: Volume.properties.t2Network + /// public string T2Network { get; } - /// Volume spec name is the application specific designation or identifier for the particular volume in a volume group for e.g. data, log. + /// + /// Volume spec name is the application specific designation or identifier for the particular volume in a volume group for e.g. data, log + /// Serialized Name: Volume.properties.volumeSpecName + /// public string VolumeSpecName { get; set; } - /// Specifies if the volume is encrypted or not. Only available on volumes created or updated after 2022-01-01. + /// + /// Specifies if the volume is encrypted or not. Only available on volumes created or updated after 2022-01-01. + /// Serialized Name: Volume.properties.encrypted + /// public bool? IsEncrypted { get; } - /// Application specific placement rules for the particular volume. + /// + /// Application specific placement rules for the particular volume + /// Serialized Name: Volume.properties.placementRules + /// public IList PlacementRules { get; } - /// Flag indicating whether subvolume operations are enabled on the volume. + /// + /// Flag indicating whether subvolume operations are enabled on the volume + /// Serialized Name: Volume.properties.enableSubvolumes + /// public EnableNetAppSubvolume? EnableSubvolumes { get; set; } - /// The availability zone where the volume is provisioned. This refers to the logical availability zone where the volume resides. + /// + /// The availability zone where the volume is provisioned. This refers to the logical availability zone where the volume resides. + /// Serialized Name: Volume.properties.provisionedAvailabilityZone + /// public string ProvisionedAvailabilityZone { get; } - /// Specifies whether volume is a Large Volume or Regular Volume. + /// + /// Specifies whether volume is a Large Volume or Regular Volume. + /// Serialized Name: Volume.properties.isLargeVolume + /// public bool? IsLargeVolume { get; set; } - /// Id of the snapshot or backup that the volume is restored from. + /// + /// Id of the snapshot or backup that the volume is restored from. + /// Serialized Name: Volume.properties.originatingResourceId + /// public ResourceIdentifier OriginatingResourceId { get; } } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeGroupCollection.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeGroupCollection.cs index f0bd0d50cc0d..d49d0bb385b6 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeGroupCollection.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeGroupCollection.cs @@ -61,7 +61,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -110,7 +110,7 @@ public virtual async Task> CreateOrUpdat /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -159,7 +159,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -204,7 +204,7 @@ public virtual async Task> GetAsync(string v /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -249,7 +249,7 @@ public virtual Response Get(string volumeGroupName, C /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -292,7 +292,7 @@ public virtual async Task> ExistsAsync(string volumeGroupName, Ca /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -335,7 +335,7 @@ public virtual Response Exists(string volumeGroupName, CancellationToken c /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -380,7 +380,7 @@ public virtual async Task> GetIfExis /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeGroupData.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeGroupData.cs index 09fabf3c71d1..65975bb66eaa 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeGroupData.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeGroupData.cs @@ -16,6 +16,7 @@ namespace Azure.ResourceManager.NetApp /// /// A class representing the NetAppVolumeGroup data model. /// Volume group resource for create + /// Serialized Name: VolumeGroupDetails /// public partial class NetAppVolumeGroupData : ResourceData { @@ -62,10 +63,22 @@ public NetAppVolumeGroupData() /// The name. /// The resourceType. /// The systemData. - /// Resource location. - /// Azure lifecycle management. - /// Volume group details. - /// List of volumes from group. + /// + /// Resource location + /// Serialized Name: VolumeGroupDetails.location + /// + /// + /// Azure lifecycle management + /// Serialized Name: VolumeGroupDetails.properties.provisioningState + /// + /// + /// Volume group details + /// Serialized Name: VolumeGroupDetails.properties.groupMetaData + /// + /// + /// List of volumes from group + /// Serialized Name: VolumeGroupDetails.properties.volumes + /// /// Keeps track of any properties unknown to the library. internal NetAppVolumeGroupData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, AzureLocation? location, string provisioningState, NetAppVolumeGroupMetadata groupMetaData, IList volumes, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { @@ -76,13 +89,25 @@ internal NetAppVolumeGroupData(ResourceIdentifier id, string name, ResourceType _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Resource location. + /// + /// Resource location + /// Serialized Name: VolumeGroupDetails.location + /// public AzureLocation? Location { get; set; } - /// Azure lifecycle management. + /// + /// Azure lifecycle management + /// Serialized Name: VolumeGroupDetails.properties.provisioningState + /// public string ProvisioningState { get; } - /// Volume group details. + /// + /// Volume group details + /// Serialized Name: VolumeGroupDetails.properties.groupMetaData + /// public NetAppVolumeGroupMetadata GroupMetaData { get; set; } - /// List of volumes from group. + /// + /// List of volumes from group + /// Serialized Name: VolumeGroupDetails.properties.volumes + /// public IList Volumes { get; } } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeGroupResource.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeGroupResource.cs index 4555a1b2fe1c..7025beabd645 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeGroupResource.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeGroupResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Cancella /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken cancell /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -265,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task> UpdateAsync(W /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeQuotaRuleCollection.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeQuotaRuleCollection.cs index ccf41914a64d..f335d093ba7b 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeQuotaRuleCollection.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeQuotaRuleCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrU /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUn /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(stri /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string volumeQuotaRul /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -281,7 +281,7 @@ public virtual AsyncPageable GetAllAsync(Cancella /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -310,7 +310,7 @@ public virtual Pageable GetAll(CancellationToken /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -353,7 +353,7 @@ public virtual async Task> ExistsAsync(string volumeQuotaRuleName /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -396,7 +396,7 @@ public virtual Response Exists(string volumeQuotaRuleName, CancellationTok /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -441,7 +441,7 @@ public virtual async Task> GetIf /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeQuotaRuleData.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeQuotaRuleData.cs index ae3bdd441880..5d79e850e63c 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeQuotaRuleData.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeQuotaRuleData.cs @@ -16,6 +16,7 @@ namespace Azure.ResourceManager.NetApp /// /// A class representing the NetAppVolumeQuotaRule data model. /// Quota Rule of a Volume + /// Serialized Name: VolumeQuotaRule /// public partial class NetAppVolumeQuotaRuleData : TrackedResourceData { @@ -64,10 +65,22 @@ public NetAppVolumeQuotaRuleData(AzureLocation location) : base(location) /// The systemData. /// The tags. /// The location. - /// Gets the status of the VolumeQuotaRule at the time the operation was called. - /// Size of quota. - /// Type of quota. - /// UserID/GroupID/SID based on the quota target type. UserID and groupID can be found by running ‘id’ or ‘getent’ command for the user or group and SID can be found by running <wmic useraccount where name='user-name' get sid>. + /// + /// Gets the status of the VolumeQuotaRule at the time the operation was called. + /// Serialized Name: VolumeQuotaRule.properties.provisioningState + /// + /// + /// Size of quota + /// Serialized Name: VolumeQuotaRule.properties.quotaSizeInKiBs + /// + /// + /// Type of quota + /// Serialized Name: VolumeQuotaRule.properties.quotaType + /// + /// + /// UserID/GroupID/SID based on the quota target type. UserID and groupID can be found by running ‘id’ or ‘getent’ command for the user or group and SID can be found by running <wmic useraccount where name='user-name' get sid> + /// Serialized Name: VolumeQuotaRule.properties.quotaTarget + /// /// Keeps track of any properties unknown to the library. internal NetAppVolumeQuotaRuleData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, NetAppProvisioningState? provisioningState, long? quotaSizeInKiBs, NetAppVolumeQuotaType? quotaType, string quotaTarget, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { @@ -83,13 +96,25 @@ internal NetAppVolumeQuotaRuleData() { } - /// Gets the status of the VolumeQuotaRule at the time the operation was called. + /// + /// Gets the status of the VolumeQuotaRule at the time the operation was called. + /// Serialized Name: VolumeQuotaRule.properties.provisioningState + /// public NetAppProvisioningState? ProvisioningState { get; } - /// Size of quota. + /// + /// Size of quota + /// Serialized Name: VolumeQuotaRule.properties.quotaSizeInKiBs + /// public long? QuotaSizeInKiBs { get; set; } - /// Type of quota. + /// + /// Type of quota + /// Serialized Name: VolumeQuotaRule.properties.quotaType + /// public NetAppVolumeQuotaType? QuotaType { get; set; } - /// UserID/GroupID/SID based on the quota target type. UserID and groupID can be found by running ‘id’ or ‘getent’ command for the user or group and SID can be found by running <wmic useraccount where name='user-name' get sid>. + /// + /// UserID/GroupID/SID based on the quota target type. UserID and groupID can be found by running ‘id’ or ‘getent’ command for the user or group and SID can be found by running <wmic useraccount where name='user-name' get sid> + /// Serialized Name: VolumeQuotaRule.properties.quotaTarget + /// public string QuotaTarget { get; set; } } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeQuotaRuleResource.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeQuotaRuleResource.cs index e637c4287f8c..b933272f4105 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeQuotaRuleResource.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeQuotaRuleResource.cs @@ -105,7 +105,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -145,7 +145,7 @@ public virtual async Task> GetAsync(Canc /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -185,7 +185,7 @@ public virtual Response Get(CancellationToken can /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -269,7 +269,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -315,7 +315,7 @@ public virtual async Task> UpdateAsy /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -361,7 +361,7 @@ public virtual ArmOperation Update(WaitUntil wait /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -423,7 +423,7 @@ public virtual async Task> AddTagAsync(s /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -485,7 +485,7 @@ public virtual Response AddTag(string key, string /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -542,7 +542,7 @@ public virtual async Task> SetTagsAsync( /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -599,7 +599,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -659,7 +659,7 @@ public virtual async Task> RemoveTagAsyn /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeResource.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeResource.cs index 23a0af9650fe..e021163444d4 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeResource.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeResource.cs @@ -121,7 +121,7 @@ public virtual NetAppVolumeSnapshotCollection GetNetAppVolumeSnapshots() /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -152,7 +152,7 @@ public virtual async Task> GetNetAppVolum /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -190,7 +190,7 @@ public virtual NetAppVolumeQuotaRuleCollection GetNetAppVolumeQuotaRules() /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -221,7 +221,7 @@ public virtual async Task> GetNetAppVolu /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -259,7 +259,7 @@ public virtual NetAppSubvolumeInfoCollection GetNetAppSubvolumeInfos() /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -290,7 +290,7 @@ public virtual async Task> GetNetAppSubvol /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -321,7 +321,7 @@ public virtual Response GetNetAppSubvolumeInfo(stri /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -361,7 +361,7 @@ public virtual async Task> GetAsync(CancellationT /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -401,7 +401,7 @@ public virtual Response Get(CancellationToken cancellation /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, bool? f /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -487,7 +487,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, bool? forceDelete = null /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -533,7 +533,7 @@ public virtual async Task> UpdateAsync(WaitUn /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -579,7 +579,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, Ne /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -621,7 +621,7 @@ public virtual async Task> PopulateAvailabili /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -663,7 +663,7 @@ public virtual ArmOperation PopulateAvailabilityZone(WaitU /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -709,7 +709,7 @@ public virtual async Task RevertAsync(WaitUntil waitUntil, NetAppV /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -755,7 +755,7 @@ public virtual ArmOperation Revert(WaitUntil waitUntil, NetAppVolumeRevertConten /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -797,7 +797,7 @@ public virtual async Task ResetCifsPasswordAsync(WaitUntil waitUnt /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -839,7 +839,7 @@ public virtual ArmOperation ResetCifsPassword(WaitUntil waitUntil, CancellationT /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -882,7 +882,7 @@ public virtual async Task BreakFileLocksAsync(WaitUntil waitUntil, /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -925,7 +925,7 @@ public virtual ArmOperation BreakFileLocks(WaitUntil waitUntil, NetAppVolumeBrea /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -971,7 +971,7 @@ public virtual async Task> GetGetG /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -1017,7 +1017,7 @@ public virtual ArmOperation GetGetGroupIdListFo /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -1060,7 +1060,7 @@ public virtual async Task BreakReplicationAsync(WaitUntil waitUnti /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -1103,7 +1103,7 @@ public virtual ArmOperation BreakReplication(WaitUntil waitUntil, NetAppVolumeBr /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -1149,7 +1149,7 @@ public virtual async Task ReestablishReplicationAsync(WaitUntil wa /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -1195,7 +1195,7 @@ public virtual ArmOperation ReestablishReplication(WaitUntil waitUntil, NetAppVo /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -1233,7 +1233,7 @@ public virtual async Task> GetReplicatio /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -1271,7 +1271,7 @@ public virtual Response GetReplicationStatus(Canc /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -1300,7 +1300,7 @@ public virtual AsyncPageable GetReplicationsAsync(Cance /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -1329,7 +1329,7 @@ public virtual Pageable GetReplications(CancellationTok /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -1371,7 +1371,7 @@ public virtual async Task ResyncReplicationAsync(WaitUntil waitUnt /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -1413,7 +1413,7 @@ public virtual ArmOperation ResyncReplication(WaitUntil waitUntil, CancellationT /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -1455,7 +1455,7 @@ public virtual async Task DeleteReplicationAsync(WaitUntil waitUnt /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -1497,7 +1497,7 @@ public virtual ArmOperation DeleteReplication(WaitUntil waitUntil, CancellationT /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -1543,7 +1543,7 @@ public virtual async Task AuthorizeReplicationAsync(WaitUntil wait /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -1589,7 +1589,7 @@ public virtual ArmOperation AuthorizeReplication(WaitUntil waitUntil, NetAppVolu /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -1631,7 +1631,7 @@ public virtual async Task ReInitializeReplicationAsync(WaitUntil w /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -1660,6 +1660,350 @@ public virtual ArmOperation ReInitializeReplication(WaitUntil waitUntil, Cancell } } + /// + /// Starts peering the external cluster for this migration volume + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/peerExternalCluster + /// + /// + /// Operation Id + /// Volumes_PeerExternalCluster + /// + /// + /// Default Api Version + /// 2024-07-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Cluster peer request object supplied in the body of the operation. + /// The cancellation token to use. + /// is null. + public virtual async Task> PeerExternalClusterAsync(WaitUntil waitUntil, PeerClusterForVolumeMigrationContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _netAppVolumeVolumesClientDiagnostics.CreateScope("NetAppVolumeResource.PeerExternalCluster"); + scope.Start(); + try + { + var response = await _netAppVolumeVolumesRestClient.PeerExternalClusterAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new NetAppArmOperation(new ClusterPeerCommandResultOperationSource(), _netAppVolumeVolumesClientDiagnostics, Pipeline, _netAppVolumeVolumesRestClient.CreatePeerExternalClusterRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Starts peering the external cluster for this migration volume + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/peerExternalCluster + /// + /// + /// Operation Id + /// Volumes_PeerExternalCluster + /// + /// + /// Default Api Version + /// 2024-07-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Cluster peer request object supplied in the body of the operation. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation PeerExternalCluster(WaitUntil waitUntil, PeerClusterForVolumeMigrationContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _netAppVolumeVolumesClientDiagnostics.CreateScope("NetAppVolumeResource.PeerExternalCluster"); + scope.Start(); + try + { + var response = _netAppVolumeVolumesRestClient.PeerExternalCluster(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, content, cancellationToken); + var operation = new NetAppArmOperation(new ClusterPeerCommandResultOperationSource(), _netAppVolumeVolumesClientDiagnostics, Pipeline, _netAppVolumeVolumesRestClient.CreatePeerExternalClusterRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Starts SVM peering and returns a command to be run on the external ONTAP to accept it. Once the SVM have been peered a SnapMirror will be created + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/authorizeExternalReplication + /// + /// + /// Operation Id + /// Volumes_AuthorizeExternalReplication + /// + /// + /// Default Api Version + /// 2024-07-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task> AuthorizeExternalReplicationAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _netAppVolumeVolumesClientDiagnostics.CreateScope("NetAppVolumeResource.AuthorizeExternalReplication"); + scope.Start(); + try + { + var response = await _netAppVolumeVolumesRestClient.AuthorizeExternalReplicationAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new NetAppArmOperation(new SvmPeerCommandResultOperationSource(), _netAppVolumeVolumesClientDiagnostics, Pipeline, _netAppVolumeVolumesRestClient.CreateAuthorizeExternalReplicationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Starts SVM peering and returns a command to be run on the external ONTAP to accept it. Once the SVM have been peered a SnapMirror will be created + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/authorizeExternalReplication + /// + /// + /// Operation Id + /// Volumes_AuthorizeExternalReplication + /// + /// + /// Default Api Version + /// 2024-07-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation AuthorizeExternalReplication(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _netAppVolumeVolumesClientDiagnostics.CreateScope("NetAppVolumeResource.AuthorizeExternalReplication"); + scope.Start(); + try + { + var response = _netAppVolumeVolumesRestClient.AuthorizeExternalReplication(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new NetAppArmOperation(new SvmPeerCommandResultOperationSource(), _netAppVolumeVolumesClientDiagnostics, Pipeline, _netAppVolumeVolumesRestClient.CreateAuthorizeExternalReplicationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Finalizes the migration of an external volume by releasing the replication and breaking the external cluster peering if no other migration is active. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/finalizeExternalReplication + /// + /// + /// Operation Id + /// Volumes_FinalizeExternalReplication + /// + /// + /// Default Api Version + /// 2024-07-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task FinalizeExternalReplicationAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _netAppVolumeVolumesClientDiagnostics.CreateScope("NetAppVolumeResource.FinalizeExternalReplication"); + scope.Start(); + try + { + var response = await _netAppVolumeVolumesRestClient.FinalizeExternalReplicationAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new NetAppArmOperation(_netAppVolumeVolumesClientDiagnostics, Pipeline, _netAppVolumeVolumesRestClient.CreateFinalizeExternalReplicationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Finalizes the migration of an external volume by releasing the replication and breaking the external cluster peering if no other migration is active. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/finalizeExternalReplication + /// + /// + /// Operation Id + /// Volumes_FinalizeExternalReplication + /// + /// + /// Default Api Version + /// 2024-07-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation FinalizeExternalReplication(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _netAppVolumeVolumesClientDiagnostics.CreateScope("NetAppVolumeResource.FinalizeExternalReplication"); + scope.Start(); + try + { + var response = _netAppVolumeVolumesRestClient.FinalizeExternalReplication(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new NetAppArmOperation(_netAppVolumeVolumesClientDiagnostics, Pipeline, _netAppVolumeVolumesRestClient.CreateFinalizeExternalReplicationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Performs an adhoc replication transfer on a volume with volumeType Migration + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/performReplicationTransfer + /// + /// + /// Operation Id + /// Volumes_PerformReplicationTransfer + /// + /// + /// Default Api Version + /// 2024-07-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task PerformReplicationTransferAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _netAppVolumeVolumesClientDiagnostics.CreateScope("NetAppVolumeResource.PerformReplicationTransfer"); + scope.Start(); + try + { + var response = await _netAppVolumeVolumesRestClient.PerformReplicationTransferAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new NetAppArmOperation(_netAppVolumeVolumesClientDiagnostics, Pipeline, _netAppVolumeVolumesRestClient.CreatePerformReplicationTransferRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Performs an adhoc replication transfer on a volume with volumeType Migration + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/performReplicationTransfer + /// + /// + /// Operation Id + /// Volumes_PerformReplicationTransfer + /// + /// + /// Default Api Version + /// 2024-07-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation PerformReplicationTransfer(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _netAppVolumeVolumesClientDiagnostics.CreateScope("NetAppVolumeResource.PerformReplicationTransfer"); + scope.Start(); + try + { + var response = _netAppVolumeVolumesRestClient.PerformReplicationTransfer(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new NetAppArmOperation(_netAppVolumeVolumesClientDiagnostics, Pipeline, _netAppVolumeVolumesRestClient.CreatePerformReplicationTransferRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + /// /// Moves volume to another pool /// @@ -1673,7 +2017,7 @@ public virtual ArmOperation ReInitializeReplication(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -1719,7 +2063,7 @@ public virtual async Task PoolChangeAsync(WaitUntil waitUntil, Net /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -1765,7 +2109,7 @@ public virtual ArmOperation PoolChange(WaitUntil waitUntil, NetAppVolumePoolChan /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -1808,7 +2152,7 @@ public virtual async Task RelocateAsync(WaitUntil waitUntil, Reloc /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -1851,7 +2195,7 @@ public virtual ArmOperation Relocate(WaitUntil waitUntil, RelocateVolumeContent /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -1893,7 +2237,7 @@ public virtual async Task FinalizeRelocationAsync(WaitUntil waitUn /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -1935,7 +2279,7 @@ public virtual ArmOperation FinalizeRelocation(WaitUntil waitUntil, Cancellation /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -1977,7 +2321,7 @@ public virtual async Task RevertRelocationAsync(WaitUntil waitUnti /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -2019,7 +2363,7 @@ public virtual ArmOperation RevertRelocation(WaitUntil waitUntil, CancellationTo /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -2057,7 +2401,7 @@ public virtual async Task> GetLatestStatusBac /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -2095,7 +2439,7 @@ public virtual Response GetLatestStatusBackup(Cancella /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -2133,7 +2477,7 @@ public virtual async Task> GetVolumeLatestRestoreS /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -2171,7 +2515,7 @@ public virtual Response GetVolumeLatestRestoreStatusBackup( /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// @@ -2213,7 +2557,7 @@ public virtual async Task MigrateBackupsBackupsUnderVolumeAsync(Wa /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// @@ -2255,7 +2599,7 @@ public virtual ArmOperation MigrateBackupsBackupsUnderVolume(WaitUntil waitUntil /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -2317,7 +2661,7 @@ public virtual async Task> AddTagAsync(string key /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -2379,7 +2723,7 @@ public virtual Response AddTag(string key, string value, C /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -2436,7 +2780,7 @@ public virtual async Task> SetTagsAsync(IDictiona /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -2493,7 +2837,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -2553,7 +2897,7 @@ public virtual async Task> RemoveTagAsync(string /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeSnapshotCollection.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeSnapshotCollection.cs index 0e269c73aae7..e53b7a0fe276 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeSnapshotCollection.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeSnapshotCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUp /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUnt /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(strin /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string snapshotName, C /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -281,7 +281,7 @@ public virtual AsyncPageable GetAllAsync(Cancellat /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -310,7 +310,7 @@ public virtual Pageable GetAll(CancellationToken c /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -353,7 +353,7 @@ public virtual async Task> ExistsAsync(string snapshotName, Cance /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -396,7 +396,7 @@ public virtual Response Exists(string snapshotName, CancellationToken canc /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -441,7 +441,7 @@ public virtual async Task> GetIfE /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeSnapshotData.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeSnapshotData.cs index 0a10393e5064..0473eda7973c 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeSnapshotData.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeSnapshotData.cs @@ -15,6 +15,7 @@ namespace Azure.ResourceManager.NetApp /// /// A class representing the NetAppVolumeSnapshot data model. /// Snapshot of a Volume + /// Serialized Name: Snapshot /// public partial class NetAppVolumeSnapshotData : ResourceData { @@ -51,7 +52,10 @@ public partial class NetAppVolumeSnapshotData : ResourceData private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// Resource location. + /// + /// Resource location + /// Serialized Name: Snapshot.location + /// public NetAppVolumeSnapshotData(AzureLocation location) { Location = location; @@ -62,10 +66,22 @@ public NetAppVolumeSnapshotData(AzureLocation location) /// The name. /// The resourceType. /// The systemData. - /// Resource location. - /// UUID v4 used to identify the Snapshot. - /// The creation date of the snapshot. - /// Azure lifecycle management. + /// + /// Resource location + /// Serialized Name: Snapshot.location + /// + /// + /// UUID v4 used to identify the Snapshot + /// Serialized Name: Snapshot.properties.snapshotId + /// + /// + /// The creation date of the snapshot + /// Serialized Name: Snapshot.properties.created + /// + /// + /// Azure lifecycle management + /// Serialized Name: Snapshot.properties.provisioningState + /// /// Keeps track of any properties unknown to the library. internal NetAppVolumeSnapshotData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, AzureLocation location, string snapshotId, DateTimeOffset? created, string provisioningState, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { @@ -81,13 +97,25 @@ internal NetAppVolumeSnapshotData() { } - /// Resource location. + /// + /// Resource location + /// Serialized Name: Snapshot.location + /// public AzureLocation Location { get; set; } - /// UUID v4 used to identify the Snapshot. + /// + /// UUID v4 used to identify the Snapshot + /// Serialized Name: Snapshot.properties.snapshotId + /// public string SnapshotId { get; } - /// The creation date of the snapshot. + /// + /// The creation date of the snapshot + /// Serialized Name: Snapshot.properties.created + /// public DateTimeOffset? Created { get; } - /// Azure lifecycle management. + /// + /// Azure lifecycle management + /// Serialized Name: Snapshot.properties.provisioningState + /// public string ProvisioningState { get; } } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeSnapshotResource.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeSnapshotResource.cs index 6ec67ceee52f..ff64c3234a93 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeSnapshotResource.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeSnapshotResource.cs @@ -104,7 +104,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -144,7 +144,7 @@ public virtual async Task> GetAsync(Cance /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual Response Get(CancellationToken canc /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -226,7 +226,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -268,7 +268,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -314,7 +314,7 @@ public virtual async Task> UpdateAsyn /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -360,7 +360,7 @@ public virtual ArmOperation Update(WaitUntil waitU /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -406,7 +406,7 @@ public virtual async Task RestoreFilesAsync(WaitUntil waitUntil, N /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RegionInfoResource.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RegionInfoResource.cs index 7227c094c3a9..c2952f09e7f5 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RegionInfoResource.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RegionInfoResource.cs @@ -100,7 +100,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -140,7 +140,7 @@ public virtual async Task> GetAsync(CancellationTok /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RegionInfoResourceCollection.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RegionInfoResourceCollection.cs index 30b7736f1d88..9bcfe6ab9283 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RegionInfoResourceCollection.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RegionInfoResourceCollection.cs @@ -68,7 +68,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -108,7 +108,7 @@ public virtual async Task> GetAsync(CancellationTok /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -148,7 +148,7 @@ public virtual Response Get(CancellationToken cancellationTo /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -178,7 +178,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken c /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual Pageable GetAll(CancellationToken cancellatio /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -246,7 +246,7 @@ public virtual async Task> ExistsAsync(CancellationToken cancella /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -284,7 +284,7 @@ public virtual Response Exists(CancellationToken cancellationToken = defau /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -324,7 +324,7 @@ public virtual async Task> GetIfExistsAsync /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RegionInfoResourceData.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RegionInfoResourceData.cs index 4094a23f3bcb..77a2bbca4cf8 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RegionInfoResourceData.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RegionInfoResourceData.cs @@ -16,6 +16,7 @@ namespace Azure.ResourceManager.NetApp /// /// A class representing the RegionInfoResource data model. /// Information regarding regionInfo Item. + /// Serialized Name: RegionInfoResource /// public partial class RegionInfoResourceData : ResourceData { @@ -62,8 +63,14 @@ public RegionInfoResourceData() /// The name. /// The resourceType. /// The systemData. - /// Provides storage to network proximity information in the region. - /// Provides logical availability zone mappings for the subscription for a region. + /// + /// Provides storage to network proximity information in the region. + /// Serialized Name: RegionInfoResource.properties.storageToNetworkProximity + /// + /// + /// Provides logical availability zone mappings for the subscription for a region. + /// Serialized Name: RegionInfoResource.properties.availabilityZoneMappings + /// /// Keeps track of any properties unknown to the library. internal RegionInfoResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, RegionStorageToNetworkProximity? storageToNetworkProximity, IList availabilityZoneMappings, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { @@ -72,9 +79,15 @@ internal RegionInfoResourceData(ResourceIdentifier id, string name, ResourceType _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Provides storage to network proximity information in the region. + /// + /// Provides storage to network proximity information in the region. + /// Serialized Name: RegionInfoResource.properties.storageToNetworkProximity + /// public RegionStorageToNetworkProximity? StorageToNetworkProximity { get; set; } - /// Provides logical availability zone mappings for the subscription for a region. + /// + /// Provides logical availability zone mappings for the subscription for a region. + /// Serialized Name: RegionInfoResource.properties.availabilityZoneMappings + /// public IList AvailabilityZoneMappings { get; } } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/AccountsRestOperations.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/AccountsRestOperations.cs index d56ec41bf996..b097911ba6f1 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/AccountsRestOperations.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/AccountsRestOperations.cs @@ -32,7 +32,7 @@ public AccountsRestOperations(HttpPipeline pipeline, string applicationId, Uri e { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-03-01"; + _apiVersion = apiVersion ?? "2024-07-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/BackupPoliciesRestOperations.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/BackupPoliciesRestOperations.cs index 900579df9e35..d4a45fb6642e 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/BackupPoliciesRestOperations.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/BackupPoliciesRestOperations.cs @@ -32,7 +32,7 @@ public BackupPoliciesRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-03-01"; + _apiVersion = apiVersion ?? "2024-07-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/BackupVaultsRestOperations.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/BackupVaultsRestOperations.cs index 6e6d0779a95f..43f67b0efbc7 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/BackupVaultsRestOperations.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/BackupVaultsRestOperations.cs @@ -32,7 +32,7 @@ public BackupVaultsRestOperations(HttpPipeline pipeline, string applicationId, U { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-03-01"; + _apiVersion = apiVersion ?? "2024-07-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/BackupsRestOperations.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/BackupsRestOperations.cs index c484a6b79f2b..f84de13d68a7 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/BackupsRestOperations.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/BackupsRestOperations.cs @@ -32,7 +32,7 @@ public BackupsRestOperations(HttpPipeline pipeline, string applicationId, Uri en { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-03-01"; + _apiVersion = apiVersion ?? "2024-07-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/BackupsUnderAccountRestOperations.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/BackupsUnderAccountRestOperations.cs index c457197a42a2..ce2112447c49 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/BackupsUnderAccountRestOperations.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/BackupsUnderAccountRestOperations.cs @@ -31,7 +31,7 @@ public BackupsUnderAccountRestOperations(HttpPipeline pipeline, string applicati { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-03-01"; + _apiVersion = apiVersion ?? "2024-07-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/BackupsUnderBackupVaultRestOperations.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/BackupsUnderBackupVaultRestOperations.cs index 0d79ad9ed07a..bcc148e97ede 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/BackupsUnderBackupVaultRestOperations.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/BackupsUnderBackupVaultRestOperations.cs @@ -31,7 +31,7 @@ public BackupsUnderBackupVaultRestOperations(HttpPipeline pipeline, string appli { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-03-01"; + _apiVersion = apiVersion ?? "2024-07-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/BackupsUnderVolumeRestOperations.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/BackupsUnderVolumeRestOperations.cs index d3ef5f6ee028..5761771d9443 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/BackupsUnderVolumeRestOperations.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/BackupsUnderVolumeRestOperations.cs @@ -31,7 +31,7 @@ public BackupsUnderVolumeRestOperations(HttpPipeline pipeline, string applicatio { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-03-01"; + _apiVersion = apiVersion ?? "2024-07-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/NetAppResourceQuotaLimitsRestOperations.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/NetAppResourceQuotaLimitsRestOperations.cs index 69def98f473b..06073a28a625 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/NetAppResourceQuotaLimitsRestOperations.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/NetAppResourceQuotaLimitsRestOperations.cs @@ -32,7 +32,7 @@ public NetAppResourceQuotaLimitsRestOperations(HttpPipeline pipeline, string app { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-03-01"; + _apiVersion = apiVersion ?? "2024-07-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/NetAppResourceRegionInfosRestOperations.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/NetAppResourceRegionInfosRestOperations.cs index 9db704887992..4a0b664831cd 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/NetAppResourceRegionInfosRestOperations.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/NetAppResourceRegionInfosRestOperations.cs @@ -32,7 +32,7 @@ public NetAppResourceRegionInfosRestOperations(HttpPipeline pipeline, string app { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-03-01"; + _apiVersion = apiVersion ?? "2024-07-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/NetAppResourceRestOperations.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/NetAppResourceRestOperations.cs index f9a3d17abb7f..11e594a729b2 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/NetAppResourceRestOperations.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/NetAppResourceRestOperations.cs @@ -32,7 +32,7 @@ public NetAppResourceRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-03-01"; + _apiVersion = apiVersion ?? "2024-07-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/PoolsRestOperations.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/PoolsRestOperations.cs index 2b1dba8bc827..d9e83903e293 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/PoolsRestOperations.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/PoolsRestOperations.cs @@ -32,7 +32,7 @@ public PoolsRestOperations(HttpPipeline pipeline, string applicationId, Uri endp { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-03-01"; + _apiVersion = apiVersion ?? "2024-07-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/SnapshotPoliciesRestOperations.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/SnapshotPoliciesRestOperations.cs index 66ae164b0ae7..17943acfdce4 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/SnapshotPoliciesRestOperations.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/SnapshotPoliciesRestOperations.cs @@ -32,7 +32,7 @@ public SnapshotPoliciesRestOperations(HttpPipeline pipeline, string applicationI { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-03-01"; + _apiVersion = apiVersion ?? "2024-07-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/SnapshotsRestOperations.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/SnapshotsRestOperations.cs index e8c8439ab443..fee6fe0e7b7e 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/SnapshotsRestOperations.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/SnapshotsRestOperations.cs @@ -32,7 +32,7 @@ public SnapshotsRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-03-01"; + _apiVersion = apiVersion ?? "2024-07-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/SubvolumesRestOperations.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/SubvolumesRestOperations.cs index 00f3b60cd200..dc352cb0c1f4 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/SubvolumesRestOperations.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/SubvolumesRestOperations.cs @@ -32,7 +32,7 @@ public SubvolumesRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-03-01"; + _apiVersion = apiVersion ?? "2024-07-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/VolumeGroupsRestOperations.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/VolumeGroupsRestOperations.cs index fc45af76185d..f129f0cf2201 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/VolumeGroupsRestOperations.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/VolumeGroupsRestOperations.cs @@ -32,7 +32,7 @@ public VolumeGroupsRestOperations(HttpPipeline pipeline, string applicationId, U { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-03-01"; + _apiVersion = apiVersion ?? "2024-07-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/VolumeQuotaRulesRestOperations.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/VolumeQuotaRulesRestOperations.cs index 6ed14ebceaaf..f157551a92bd 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/VolumeQuotaRulesRestOperations.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/VolumeQuotaRulesRestOperations.cs @@ -32,7 +32,7 @@ public VolumeQuotaRulesRestOperations(HttpPipeline pipeline, string applicationI { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-03-01"; + _apiVersion = apiVersion ?? "2024-07-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/VolumesRestOperations.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/VolumesRestOperations.cs index 40520fa8093e..a6de9b2f9da1 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/VolumesRestOperations.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/VolumesRestOperations.cs @@ -32,7 +32,7 @@ public VolumesRestOperations(HttpPipeline pipeline, string applicationId, Uri en { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-03-01"; + _apiVersion = apiVersion ?? "2024-07-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -1966,6 +1966,418 @@ public Response ReInitializeReplication(string subscriptionId, string resourceGr } } + internal RequestUriBuilder CreatePeerExternalClusterRequestUri(string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName, PeerClusterForVolumeMigrationContent 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.NetApp/netAppAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/capacityPools/", false); + uri.AppendPath(poolName, true); + uri.AppendPath("/volumes/", false); + uri.AppendPath(volumeName, true); + uri.AppendPath("/peerExternalCluster", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreatePeerExternalClusterRequest(string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName, PeerClusterForVolumeMigrationContent content) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + 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.NetApp/netAppAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/capacityPools/", false); + uri.AppendPath(poolName, true); + uri.AppendPath("/volumes/", false); + uri.AppendPath(volumeName, true); + uri.AppendPath("/peerExternalCluster", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; + _userAgent.Apply(message); + return message; + } + + /// Starts peering the external cluster for this migration volume. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the NetApp account. + /// The name of the capacity pool. + /// The name of the volume. + /// Cluster peer request object supplied in the body of the operation. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task PeerExternalClusterAsync(string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName, PeerClusterForVolumeMigrationContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(poolName, nameof(poolName)); + Argument.AssertNotNullOrEmpty(volumeName, nameof(volumeName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreatePeerExternalClusterRequest(subscriptionId, resourceGroupName, accountName, poolName, volumeName, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Starts peering the external cluster for this migration volume. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the NetApp account. + /// The name of the capacity pool. + /// The name of the volume. + /// Cluster peer request object supplied in the body of the operation. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response PeerExternalCluster(string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName, PeerClusterForVolumeMigrationContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(poolName, nameof(poolName)); + Argument.AssertNotNullOrEmpty(volumeName, nameof(volumeName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreatePeerExternalClusterRequest(subscriptionId, resourceGroupName, accountName, poolName, volumeName, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateAuthorizeExternalReplicationRequestUri(string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName) + { + 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.NetApp/netAppAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/capacityPools/", false); + uri.AppendPath(poolName, true); + uri.AppendPath("/volumes/", false); + uri.AppendPath(volumeName, true); + uri.AppendPath("/authorizeExternalReplication", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateAuthorizeExternalReplicationRequest(string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + 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.NetApp/netAppAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/capacityPools/", false); + uri.AppendPath(poolName, true); + uri.AppendPath("/volumes/", false); + uri.AppendPath(volumeName, true); + uri.AppendPath("/authorizeExternalReplication", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Starts SVM peering and returns a command to be run on the external ONTAP to accept it. Once the SVM have been peered a SnapMirror will be created. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the NetApp account. + /// The name of the capacity pool. + /// The name of the volume. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task AuthorizeExternalReplicationAsync(string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(poolName, nameof(poolName)); + Argument.AssertNotNullOrEmpty(volumeName, nameof(volumeName)); + + using var message = CreateAuthorizeExternalReplicationRequest(subscriptionId, resourceGroupName, accountName, poolName, volumeName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Starts SVM peering and returns a command to be run on the external ONTAP to accept it. Once the SVM have been peered a SnapMirror will be created. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the NetApp account. + /// The name of the capacity pool. + /// The name of the volume. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response AuthorizeExternalReplication(string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(poolName, nameof(poolName)); + Argument.AssertNotNullOrEmpty(volumeName, nameof(volumeName)); + + using var message = CreateAuthorizeExternalReplicationRequest(subscriptionId, resourceGroupName, accountName, poolName, volumeName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateFinalizeExternalReplicationRequestUri(string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName) + { + 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.NetApp/netAppAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/capacityPools/", false); + uri.AppendPath(poolName, true); + uri.AppendPath("/volumes/", false); + uri.AppendPath(volumeName, true); + uri.AppendPath("/finalizeExternalReplication", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateFinalizeExternalReplicationRequest(string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + 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.NetApp/netAppAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/capacityPools/", false); + uri.AppendPath(poolName, true); + uri.AppendPath("/volumes/", false); + uri.AppendPath(volumeName, true); + uri.AppendPath("/finalizeExternalReplication", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Finalizes the migration of an external volume by releasing the replication and breaking the external cluster peering if no other migration is active. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the NetApp account. + /// The name of the capacity pool. + /// The name of the volume. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task FinalizeExternalReplicationAsync(string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(poolName, nameof(poolName)); + Argument.AssertNotNullOrEmpty(volumeName, nameof(volumeName)); + + using var message = CreateFinalizeExternalReplicationRequest(subscriptionId, resourceGroupName, accountName, poolName, volumeName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Finalizes the migration of an external volume by releasing the replication and breaking the external cluster peering if no other migration is active. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the NetApp account. + /// The name of the capacity pool. + /// The name of the volume. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response FinalizeExternalReplication(string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(poolName, nameof(poolName)); + Argument.AssertNotNullOrEmpty(volumeName, nameof(volumeName)); + + using var message = CreateFinalizeExternalReplicationRequest(subscriptionId, resourceGroupName, accountName, poolName, volumeName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreatePerformReplicationTransferRequestUri(string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName) + { + 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.NetApp/netAppAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/capacityPools/", false); + uri.AppendPath(poolName, true); + uri.AppendPath("/volumes/", false); + uri.AppendPath(volumeName, true); + uri.AppendPath("/performReplicationTransfer", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreatePerformReplicationTransferRequest(string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + 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.NetApp/netAppAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/capacityPools/", false); + uri.AppendPath(poolName, true); + uri.AppendPath("/volumes/", false); + uri.AppendPath(volumeName, true); + uri.AppendPath("/performReplicationTransfer", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Performs an adhoc replication transfer on a volume with volumeType Migration. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the NetApp account. + /// The name of the capacity pool. + /// The name of the volume. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task PerformReplicationTransferAsync(string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(poolName, nameof(poolName)); + Argument.AssertNotNullOrEmpty(volumeName, nameof(volumeName)); + + using var message = CreatePerformReplicationTransferRequest(subscriptionId, resourceGroupName, accountName, poolName, volumeName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Performs an adhoc replication transfer on a volume with volumeType Migration. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the NetApp account. + /// The name of the capacity pool. + /// The name of the volume. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response PerformReplicationTransfer(string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(poolName, nameof(poolName)); + Argument.AssertNotNullOrEmpty(volumeName, nameof(volumeName)); + + using var message = CreatePerformReplicationTransferRequest(subscriptionId, resourceGroupName, accountName, poolName, volumeName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + internal RequestUriBuilder CreatePoolChangeRequestUri(string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName, NetAppVolumePoolChangeContent content) { var uri = new RawRequestUriBuilder(); diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/SnapshotPolicyCollection.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/SnapshotPolicyCollection.cs index 90e06b7de9f9..fe7752081f45 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/SnapshotPolicyCollection.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/SnapshotPolicyCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> CreateOrUpdateAs /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wai /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAsync(string snap /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string snapshotPolicyName, C /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -285,7 +285,7 @@ public virtual AsyncPageable GetAllAsync(CancellationTok /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -314,7 +314,7 @@ public virtual Pageable GetAll(CancellationToken cancell /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -357,7 +357,7 @@ public virtual async Task> ExistsAsync(string snapshotPolicyName, /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -400,7 +400,7 @@ public virtual Response Exists(string snapshotPolicyName, CancellationToke /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -445,7 +445,7 @@ public virtual async Task> GetIfExistsA /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/SnapshotPolicyData.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/SnapshotPolicyData.cs index c700f270419b..69ac6239b486 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/SnapshotPolicyData.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/SnapshotPolicyData.cs @@ -16,6 +16,7 @@ namespace Azure.ResourceManager.NetApp /// /// A class representing the SnapshotPolicy data model. /// Snapshot policy information + /// Serialized Name: SnapshotPolicy /// public partial class SnapshotPolicyData : TrackedResourceData { @@ -64,13 +65,34 @@ public SnapshotPolicyData(AzureLocation location) : base(location) /// The systemData. /// The tags. /// The location. - /// A unique read-only string that changes whenever the resource is updated. - /// Schedule for hourly snapshots. - /// Schedule for daily snapshots. - /// Schedule for weekly snapshots. - /// Schedule for monthly snapshots. - /// The property to decide policy is enabled or not. - /// Azure lifecycle management. + /// + /// A unique read-only string that changes whenever the resource is updated. + /// Serialized Name: SnapshotPolicy.etag + /// + /// + /// Schedule for hourly snapshots + /// Serialized Name: SnapshotPolicy.properties.hourlySchedule + /// + /// + /// Schedule for daily snapshots + /// Serialized Name: SnapshotPolicy.properties.dailySchedule + /// + /// + /// Schedule for weekly snapshots + /// Serialized Name: SnapshotPolicy.properties.weeklySchedule + /// + /// + /// Schedule for monthly snapshots + /// Serialized Name: SnapshotPolicy.properties.monthlySchedule + /// + /// + /// The property to decide policy is enabled or not + /// Serialized Name: SnapshotPolicy.properties.enabled + /// + /// + /// Azure lifecycle management + /// Serialized Name: SnapshotPolicy.properties.provisioningState + /// /// Keeps track of any properties unknown to the library. internal SnapshotPolicyData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ETag? etag, SnapshotPolicyHourlySchedule hourlySchedule, SnapshotPolicyDailySchedule dailySchedule, SnapshotPolicyWeeklySchedule weeklySchedule, SnapshotPolicyMonthlySchedule monthlySchedule, bool? isEnabled, string provisioningState, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { @@ -89,19 +111,40 @@ internal SnapshotPolicyData() { } - /// A unique read-only string that changes whenever the resource is updated. + /// + /// A unique read-only string that changes whenever the resource is updated. + /// Serialized Name: SnapshotPolicy.etag + /// public ETag? ETag { get; } - /// Schedule for hourly snapshots. + /// + /// Schedule for hourly snapshots + /// Serialized Name: SnapshotPolicy.properties.hourlySchedule + /// public SnapshotPolicyHourlySchedule HourlySchedule { get; set; } - /// Schedule for daily snapshots. + /// + /// Schedule for daily snapshots + /// Serialized Name: SnapshotPolicy.properties.dailySchedule + /// public SnapshotPolicyDailySchedule DailySchedule { get; set; } - /// Schedule for weekly snapshots. + /// + /// Schedule for weekly snapshots + /// Serialized Name: SnapshotPolicy.properties.weeklySchedule + /// public SnapshotPolicyWeeklySchedule WeeklySchedule { get; set; } - /// Schedule for monthly snapshots. + /// + /// Schedule for monthly snapshots + /// Serialized Name: SnapshotPolicy.properties.monthlySchedule + /// public SnapshotPolicyMonthlySchedule MonthlySchedule { get; set; } - /// The property to decide policy is enabled or not. + /// + /// The property to decide policy is enabled or not + /// Serialized Name: SnapshotPolicy.properties.enabled + /// public bool? IsEnabled { get; set; } - /// Azure lifecycle management. + /// + /// Azure lifecycle management + /// Serialized Name: SnapshotPolicy.properties.provisioningState + /// public string ProvisioningState { get; } } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/SnapshotPolicyResource.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/SnapshotPolicyResource.cs index 56915cd74db1..f671dbdfdc36 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/SnapshotPolicyResource.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/SnapshotPolicyResource.cs @@ -104,7 +104,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -144,7 +144,7 @@ public virtual async Task> GetAsync(Cancellatio /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual Response Get(CancellationToken cancellati /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -226,7 +226,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -268,7 +268,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -314,7 +314,7 @@ public virtual async Task> UpdateAsync(Wait /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -360,7 +360,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -389,7 +389,7 @@ public virtual AsyncPageable GetVolumesAsync(CancellationT /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -418,7 +418,7 @@ public virtual Pageable GetVolumes(CancellationToken cance /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -480,7 +480,7 @@ public virtual async Task> AddTagAsync(string k /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -542,7 +542,7 @@ public virtual Response AddTag(string key, string value, /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -599,7 +599,7 @@ public virtual async Task> SetTagsAsync(IDictio /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -656,7 +656,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource @@ -716,7 +716,7 @@ public virtual async Task> RemoveTagAsync(strin /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-07-01 /// /// /// Resource diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/autorest.md b/sdk/netapp/Azure.ResourceManager.NetApp/src/autorest.md index d612c1c4df8b..2e5b9f20d93c 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/autorest.md +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/autorest.md @@ -8,8 +8,8 @@ azure-arm: true csharp: true library-name: NetApp namespace: Azure.ResourceManager.NetApp -require: https://github.com/Azure/azure-rest-api-specs/blob/aa23ddc02b2b1c5a34c56a49d83b77c0a1aaa614/specification/netapp/resource-manager/readme.md -tag: package-2024-03 +require: https://github.com/Azure/azure-rest-api-specs/blob/f37b54b187bac95237c62478a10b94e9cff236f3/specification/netapp/resource-manager/readme.md +tag: package-2024-07 output-folder: $(this-folder)/Generated clear-output-folder: true sample-gen: @@ -21,8 +21,8 @@ modelerfour: use-model-reader-writer: true use-write-core: true -#mgmt-debug: -# show-serialized-names: true +mgmt-debug: + show-serialized-names: true format-by-name-rules: 'tenantId': 'uuid' @@ -242,7 +242,12 @@ rename-mapping: Backup.properties.volumeResourceId: -|arm-id Backup.properties.backupPolicyResourceId: BackupPolicyArmResourceId KeyVaultProperties.keyVaultResourceId: keyVaultArmResourceId - + ClusterPeerCommandResponse: ClusterPeerCommandResult + SvmPeerCommandResponse: SvmPeerCommandResult + Volume.properties.snapshotId: -|string + VolumeRevert.snapshotId: -|string + Volume.properties.backupId: -|string + BackupsMigrationRequest.backupVaultId: -|string models-to-treat-empty-string-as-null: - VolumeSnapshotProperties diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/tests/Helpers/NetAppTestBase.cs b/sdk/netapp/Azure.ResourceManager.NetApp/tests/Helpers/NetAppTestBase.cs index 6914ddeaa7b6..a58c0b4610c9 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/tests/Helpers/NetAppTestBase.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/tests/Helpers/NetAppTestBase.cs @@ -279,7 +279,7 @@ public async Task CreateCapacityPool(string location, NetA return capactiyPoolResource1; } - public async Task CreateVolume(string location, NetAppFileServiceLevel serviceLevel, long? usageThreshold, string volumeName, ResourceIdentifier subnetId = null, List protocolTypes = null, NetAppVolumeExportPolicyRule exportPolicyRule = null, NetAppVolumeCollection volumeCollection = null, NetAppVolumeDataProtection dataProtection = null, string snapshotId = "", string backupId = "") + public async Task CreateVolume(string location, NetAppFileServiceLevel serviceLevel, long? usageThreshold, string volumeName, ResourceIdentifier subnetId = null, List protocolTypes = null, NetAppVolumeExportPolicyRule exportPolicyRule = null, NetAppVolumeCollection volumeCollection = null, NetAppVolumeDataProtection dataProtection = null, string snapshotId = "", string backupId = "", string volumeType = "") { location = string.IsNullOrEmpty(location) ? DefaultLocationString : location; if (volumeCollection == null) @@ -313,6 +313,10 @@ public async Task CreateVolume(string location, NetAppFile volumeData.ProtocolTypes.Add(protocolType); } } + if (!string.IsNullOrWhiteSpace(volumeType)) + { + volumeData.VolumeType = volumeType; + } volumeData.Tags.InitializeFrom(DefaultTags); NetAppVolumeResource volumeResource = (await volumeCollection.CreateOrUpdateAsync(WaitUntil.Completed, volumeName, volumeData)).Value; return volumeResource; diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/tests/ResourceTests/VolumeTests.cs b/sdk/netapp/Azure.ResourceManager.NetApp/tests/ResourceTests/VolumeTests.cs index 0808ca0189b6..3817db01e9ac 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/tests/ResourceTests/VolumeTests.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/tests/ResourceTests/VolumeTests.cs @@ -558,6 +558,50 @@ public async Task CreateDPVolume() Assert.AreEqual(404, exception.Status); } + [RecordedTest] + public async Task CreateExternalMigrationVolumeNoPeering() + { + //Tests the negative case, we should get errors here + + //create volume + string volumeName = Recording.GenerateAssetName("volumeName-"); + await CreateVirtualNetwork(); + //Update the remote volume with dataProtection for Migration (external replication) + NetAppReplicationObject replication = new() + { + EndpointType = NetAppEndpointType.Destination, + RemotePath = new RemotePath() { ExternalHostName = "hostname1", ServerName = "server1", VolumeName = "volume1" } + }; + NetAppVolumeDataProtection dataProtectionProperties = new NetAppVolumeDataProtection() { Replication = replication }; + NetAppVolumeResource volumeResource1 = await CreateVolume(DefaultLocation, NetAppFileServiceLevel.Premium, _defaultUsageThreshold, volumeName: volumeName, volumeType: "Migration", dataProtection: dataProtectionProperties); + VerifyVolumeProperties(volumeResource1, true); + volumeResource1.Should().BeEquivalentTo((await volumeResource1.GetAsync()).Value); + //validate if created successfully + NetAppVolumeResource volumeResource2 = await _volumeCollection.GetAsync(volumeResource1.Data.Name.Split('/').Last()); + VerifyVolumeProperties(volumeResource2, true); + + PeerClusterForVolumeMigrationContent peerClusterRequest = new PeerClusterForVolumeMigrationContent(new string[] + { + "0.0.0.1","0.0.0.2","0.0.0.3","0.0.0.4","0.0.0.5","0.0.0.6" + }); + + //ArmOperation lro = await volumeResource2.PeerExternalClusterAsync(WaitUntil.Completed, peerClusterRequest); + //ClusterPeerCommandResult result = lro.Value; + //Assert.NotNull(result); + + InvalidOperationException peerException = Assert.ThrowsAsync(async () => { await volumeResource2.PeerExternalClusterAsync(WaitUntil.Completed, peerClusterRequest); }); + //Assert.AreEqual(409, peerException.Status); + + InvalidOperationException authorizeException = Assert.ThrowsAsync(async () => { await volumeResource2.AuthorizeExternalReplicationAsync(WaitUntil.Completed); }); + //Assert.AreEqual(400, authorizeException.Status); + + RequestFailedException performException = Assert.ThrowsAsync(async () => { await volumeResource2.PerformReplicationTransferAsync(WaitUntil.Completed); }); + //Assert.AreEqual(400, performException.Status); + + RequestFailedException finalizeException = Assert.ThrowsAsync(async () => { await volumeResource2.FinalizeExternalReplicationAsync(WaitUntil.Completed); }); + //Assert.AreEqual(409, finalizeException.Status); + } + [RecordedTest] public async Task BreakFileLocksVolumeNoFiles() { diff --git a/sdk/network/Azure.ResourceManager.Network/CHANGELOG.md b/sdk/network/Azure.ResourceManager.Network/CHANGELOG.md index 097b1a50f88b..f1044c26805a 100644 --- a/sdk/network/Azure.ResourceManager.Network/CHANGELOG.md +++ b/sdk/network/Azure.ResourceManager.Network/CHANGELOG.md @@ -4,6 +4,8 @@ ### Features Added +- Exposed `JsonModelWriteCore` for model serialization procedure. + ### Breaking Changes ### Bugs Fixed diff --git a/sdk/network/Azure.ResourceManager.Network/api/Azure.ResourceManager.Network.netstandard2.0.cs b/sdk/network/Azure.ResourceManager.Network/api/Azure.ResourceManager.Network.netstandard2.0.cs index 31bf2e4714de..8cdf229d8f5e 100644 --- a/sdk/network/Azure.ResourceManager.Network/api/Azure.ResourceManager.Network.netstandard2.0.cs +++ b/sdk/network/Azure.ResourceManager.Network/api/Azure.ResourceManager.Network.netstandard2.0.cs @@ -25,6 +25,7 @@ public AdminRuleGroupData() { } public Azure.ETag? ETag { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.Guid? ResourceGuid { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.AdminRuleGroupData 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.Network.AdminRuleGroupData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -112,6 +113,7 @@ public ApplicationGatewayData() { } public System.Collections.Generic.IList TrustedRootCertificates { get { throw null; } } public System.Collections.Generic.IList UrlPathMaps { get { throw null; } } public Azure.ResourceManager.Network.Models.ApplicationGatewayWebApplicationFirewallConfiguration WebApplicationFirewallConfiguration { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.ApplicationGatewayData 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.Network.ApplicationGatewayData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -143,6 +145,7 @@ public ApplicationGatewayPrivateEndpointConnectionData() { } public string LinkIdentifier { get { throw null; } } public Azure.ResourceManager.Network.PrivateEndpointData PrivateEndpoint { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.ApplicationGatewayPrivateEndpointConnectionData 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.Network.ApplicationGatewayPrivateEndpointConnectionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -227,6 +230,7 @@ internal ApplicationGatewayWafDynamicManifestData() { } public System.Collections.Generic.IReadOnlyList AvailableRuleSets { get { throw null; } } public string RuleSetType { get { throw null; } } public string RuleSetVersion { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.ApplicationGatewayWafDynamicManifestData 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.Network.ApplicationGatewayWafDynamicManifestData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -271,6 +275,7 @@ public ApplicationSecurityGroupData() { } public Azure.ETag? ETag { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.Guid? ResourceGuid { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.ApplicationSecurityGroupData 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.Network.ApplicationSecurityGroupData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -338,6 +343,7 @@ public AzureFirewallData() { } public Azure.ResourceManager.Network.Models.AzureFirewallThreatIntelMode? ThreatIntelMode { get { throw null; } set { } } public Azure.Core.ResourceIdentifier VirtualHubId { get { throw null; } set { } } public System.Collections.Generic.IList Zones { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.AzureFirewallData 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.Network.AzureFirewallData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -397,6 +403,7 @@ public partial class AzureWebCategoryData : Azure.ResourceManager.Models.Resourc internal AzureWebCategoryData() { } public Azure.ETag? ETag { get { throw null; } } public string Group { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.AzureWebCategoryData 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.Network.AzureWebCategoryData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -451,6 +458,7 @@ public BackendAddressPoolData() { } public Azure.ResourceManager.Network.Models.BackendAddressSyncMode? SyncMode { get { throw null; } set { } } public System.Collections.Generic.IList TunnelInterfaces { get { throw null; } } public Azure.Core.ResourceIdentifier VirtualNetworkId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.BackendAddressPoolData 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.Network.BackendAddressPoolData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -499,6 +507,7 @@ public partial class BaseAdminRuleData : Azure.ResourceManager.Models.ResourceDa { public BaseAdminRuleData() { } public Azure.ETag? ETag { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.BaseAdminRuleData 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.Network.BaseAdminRuleData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -560,6 +569,7 @@ public BastionHostData() { } public Azure.ResourceManager.Network.Models.BastionHostSkuName? SkuName { get { throw null; } set { } } public Azure.Core.ResourceIdentifier VirtualNetworkId { get { throw null; } set { } } public System.Collections.Generic.IList Zones { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.BastionHostData 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.Network.BastionHostData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -625,6 +635,7 @@ public BgpConnectionData() { } public long? PeerAsn { get { throw null; } set { } } public string PeerIP { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.BgpConnectionData 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.Network.BgpConnectionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -687,6 +698,7 @@ public partial class CloudServiceSwapData : Azure.ResourceManager.Models.Resourc { public CloudServiceSwapData() { } public Azure.ResourceManager.Network.Models.SwapSlotType? CloudServiceSwapSlotType { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.CloudServiceSwapData 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.Network.CloudServiceSwapData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -746,6 +758,7 @@ internal ConnectionMonitorData() { } public System.Collections.Generic.IReadOnlyDictionary Tags { get { throw null; } } public System.Collections.Generic.IReadOnlyList TestConfigurations { get { throw null; } } public System.Collections.Generic.IReadOnlyList TestGroups { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.ConnectionMonitorData 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.Network.ConnectionMonitorData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -812,6 +825,7 @@ public ConnectivityConfigurationData() { } public Azure.ResourceManager.Network.Models.GlobalMeshSupportFlag? IsGlobal { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.Guid? ResourceGuid { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.ConnectivityConfigurationData 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.Network.ConnectivityConfigurationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -881,6 +895,7 @@ public CustomIPPrefixData() { } public System.Guid? ResourceGuid { get { throw null; } } public string SignedMessage { get { throw null; } set { } } public System.Collections.Generic.IList Zones { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.CustomIPPrefixData 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.Network.CustomIPPrefixData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -936,6 +951,7 @@ public DdosCustomPolicyData() { } [System.ObsoleteAttribute("This property is obsolete and will be removed in a future release", false)] public System.Collections.Generic.IReadOnlyList PublicIPAddresses { get { throw null; } } public System.Guid? ResourceGuid { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.DdosCustomPolicyData 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.Network.DdosCustomPolicyData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -992,6 +1008,7 @@ public DdosProtectionPlanData(Azure.Core.AzureLocation location) { } public System.Collections.Generic.IReadOnlyList PublicIPAddresses { get { throw null; } } public System.Guid? ResourceGuid { get { throw null; } } public System.Collections.Generic.IReadOnlyList VirtualNetworks { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.DdosProtectionPlanData 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.Network.DdosProtectionPlanData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1085,6 +1102,7 @@ public DscpConfigurationData() { } public System.Guid? ResourceGuid { get { throw null; } } public System.Collections.Generic.IList SourceIPRanges { get { throw null; } } public System.Collections.Generic.IList SourcePortRanges { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.DscpConfigurationData 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.Network.DscpConfigurationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1141,6 +1159,7 @@ public ExpressRouteCircuitAuthorizationData() { } public System.Uri ConnectionResourceUri { get { throw null; } } public Azure.ETag? ETag { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.ExpressRouteCircuitAuthorizationData 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.Network.ExpressRouteCircuitAuthorizationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1211,6 +1230,7 @@ public ExpressRouteCircuitConnectionData() { } public Azure.ResourceManager.Network.Models.IPv6CircuitConnectionConfig IPv6CircuitConnectionConfig { get { throw null; } set { } } public Azure.Core.ResourceIdentifier PeerExpressRouteCircuitPeeringId { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.ExpressRouteCircuitConnectionData 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.Network.ExpressRouteCircuitConnectionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1258,6 +1278,7 @@ public ExpressRouteCircuitData() { } public Azure.ResourceManager.Network.Models.ServiceProviderProvisioningState? ServiceProviderProvisioningState { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.ExpressRouteCircuitSku Sku { get { throw null; } set { } } public int? STag { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.ExpressRouteCircuitData 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.Network.ExpressRouteCircuitData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1305,6 +1326,7 @@ public ExpressRouteCircuitPeeringData() { } public Azure.ResourceManager.Network.Models.ExpressRoutePeeringState? State { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.ExpressRouteCircuitStats Stats { get { throw null; } set { } } public int? VlanId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.ExpressRouteCircuitPeeringData 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.Network.ExpressRouteCircuitPeeringData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1405,6 +1427,7 @@ public ExpressRouteConnectionData() { } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.Network.Models.RoutingConfiguration RoutingConfiguration { get { throw null; } set { } } public int? RoutingWeight { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.ExpressRouteConnectionData 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.Network.ExpressRouteConnectionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1461,6 +1484,7 @@ public ExpressRouteCrossConnectionData() { } public string ServiceProviderNotes { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.ServiceProviderProvisioningState? ServiceProviderProvisioningState { get { throw null; } set { } } public int? STag { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.ExpressRouteCrossConnectionData 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.Network.ExpressRouteCrossConnectionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1503,6 +1527,7 @@ public ExpressRouteCrossConnectionPeeringData() { } public string SharedKey { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.ExpressRoutePeeringState? State { get { throw null; } set { } } public int? VlanId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.ExpressRouteCrossConnectionPeeringData 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.Network.ExpressRouteCrossConnectionPeeringData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1589,6 +1614,7 @@ public ExpressRouteGatewayData() { } public System.Collections.Generic.IReadOnlyList ExpressRouteConnections { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public Azure.Core.ResourceIdentifier VirtualHubId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.ExpressRouteGatewayData 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.Network.ExpressRouteGatewayData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1651,6 +1677,7 @@ public ExpressRouteLinkData() { } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public string RackId { get { throw null; } } public string RouterName { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.ExpressRouteLinkData 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.Network.ExpressRouteLinkData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1697,6 +1724,7 @@ public ExpressRoutePortAuthorizationData() { } public System.Uri CircuitResourceUri { get { throw null; } } public Azure.ETag? ETag { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.ExpressRoutePortAuthorizationData 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.Network.ExpressRoutePortAuthorizationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1756,6 +1784,7 @@ public ExpressRoutePortData() { } public float? ProvisionedBandwidthInGbps { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.Guid? ResourceGuid { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.ExpressRoutePortData 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.Network.ExpressRoutePortData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1817,6 +1846,7 @@ public ExpressRoutePortsLocationData() { } public System.Collections.Generic.IList AvailableBandwidths { get { throw null; } } public string Contact { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.ExpressRoutePortsLocationData 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.Network.ExpressRoutePortsLocationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1883,6 +1913,7 @@ public ExpressRouteProviderPortData(Azure.Core.AzureLocation location) { } public int? RemainingBandwidthInMbps { get { throw null; } set { } } public string SecondaryAzurePort { get { throw null; } } public int? UsedBandwidthInMbps { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.ExpressRouteProviderPortData 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.Network.ExpressRouteProviderPortData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1945,6 +1976,7 @@ public FirewallPolicyData() { } public Azure.ResourceManager.Network.Models.AzureFirewallThreatIntelMode? ThreatIntelMode { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.FirewallPolicyThreatIntelWhitelist ThreatIntelWhitelist { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.FirewallPolicyCertificateAuthority TransportSecurityCertificateAuthority { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.FirewallPolicyData 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.Network.FirewallPolicyData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1963,6 +1995,7 @@ public FirewallPolicyDraftData() { } public Azure.ResourceManager.Network.Models.FirewallPolicySnat Snat { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.AzureFirewallThreatIntelMode? ThreatIntelMode { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.FirewallPolicyThreatIntelWhitelist ThreatIntelWhitelist { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.FirewallPolicyDraftData 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.Network.FirewallPolicyDraftData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2061,6 +2094,7 @@ public FirewallPolicyRuleCollectionGroupData() { } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.Collections.Generic.IList RuleCollections { get { throw null; } } public string Size { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.FirewallPolicyRuleCollectionGroupData 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.Network.FirewallPolicyRuleCollectionGroupData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2073,6 +2107,7 @@ public FirewallPolicyRuleCollectionGroupDraftData() { } public int? Priority { get { throw null; } set { } } public System.Collections.Generic.IList RuleCollections { get { throw null; } } public string Size { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.FirewallPolicyRuleCollectionGroupDraftData 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.Network.FirewallPolicyRuleCollectionGroupDraftData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2149,6 +2184,7 @@ public FlowLogData() { } public System.Guid? TargetResourceGuid { get { throw null; } } public Azure.Core.ResourceIdentifier TargetResourceId { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.TrafficAnalyticsConfigurationProperties TrafficAnalyticsConfiguration { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.FlowLogData 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.Network.FlowLogData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2212,6 +2248,7 @@ public FrontendIPConfigurationData() { } public Azure.Core.ResourceIdentifier PublicIPPrefixId { get { throw null; } set { } } public Azure.ResourceManager.Network.SubnetData Subnet { get { throw null; } set { } } public System.Collections.Generic.IList Zones { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.FrontendIPConfigurationData 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.Network.FrontendIPConfigurationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2259,6 +2296,7 @@ public HubIPConfigurationData() { } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.Network.PublicIPAddressData PublicIPAddress { get { throw null; } set { } } public Azure.ResourceManager.Network.SubnetData Subnet { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.HubIPConfigurationData 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.Network.HubIPConfigurationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2310,6 +2348,7 @@ public HubRouteTableData() { } public System.Collections.Generic.IReadOnlyList PropagatingConnections { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.Collections.Generic.IList Routes { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.HubRouteTableData 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.Network.HubRouteTableData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2362,6 +2401,7 @@ public HubVirtualNetworkConnectionData() { } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public Azure.Core.ResourceIdentifier RemoteVirtualNetworkId { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.RoutingConfiguration RoutingConfiguration { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.HubVirtualNetworkConnectionData 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.Network.HubVirtualNetworkConnectionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2420,6 +2460,7 @@ public InboundNatRuleData() { } public int? IdleTimeoutInMinutes { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.LoadBalancingTransportProtocol? Protocol { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.InboundNatRuleData 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.Network.InboundNatRuleData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2464,6 +2505,7 @@ public InboundSecurityRuleData() { } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.Collections.Generic.IList Rules { get { throw null; } } public Azure.ResourceManager.Network.Models.InboundSecurityRuleType? RuleType { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.InboundSecurityRuleData 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.Network.InboundSecurityRuleData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2516,6 +2558,7 @@ public IPAllocationData() { } public Azure.ResourceManager.Network.Models.NetworkIPVersion? PrefixType { get { throw null; } set { } } public Azure.Core.ResourceIdentifier SubnetId { get { throw null; } } public Azure.Core.ResourceIdentifier VirtualNetworkId { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.IPAllocationData 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.Network.IPAllocationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2572,6 +2615,7 @@ public IPGroupData() { } public System.Collections.Generic.IReadOnlyList Firewalls { get { throw null; } } public System.Collections.Generic.IList IPAddresses { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.IPGroupData 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.Network.IPGroupData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2635,6 +2679,7 @@ public LoadBalancerData() { } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.Guid? ResourceGuid { get { throw null; } } public Azure.ResourceManager.Network.Models.LoadBalancerSku Sku { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.LoadBalancerData 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.Network.LoadBalancerData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2720,6 +2765,7 @@ public LoadBalancingRuleData() { } public Azure.Core.ResourceIdentifier ProbeId { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.LoadBalancingTransportProtocol? Protocol { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.LoadBalancingRuleData 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.Network.LoadBalancingRuleData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2768,6 +2814,7 @@ public LocalNetworkGatewayData() { } public System.Collections.Generic.IList LocalNetworkAddressPrefixes { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.Guid? ResourceGuid { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.LocalNetworkGatewayData 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.Network.LocalNetworkGatewayData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2864,6 +2911,7 @@ public NatGatewayData() { } public Azure.ResourceManager.Network.Models.NatGatewaySkuName? SkuName { get { throw null; } set { } } public System.Collections.Generic.IReadOnlyList Subnets { get { throw null; } } public System.Collections.Generic.IList Zones { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.NatGatewayData 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.Network.NatGatewayData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3339,6 +3387,7 @@ public NetworkGroupData() { } public Azure.ResourceManager.Network.Models.NetworkGroupMemberType? MemberType { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.Guid? ResourceGuid { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.NetworkGroupData 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.Network.NetworkGroupData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3391,6 +3440,7 @@ public NetworkGroupStaticMemberData() { } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public string Region { get { throw null; } } public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.NetworkGroupStaticMemberData 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.Network.NetworkGroupStaticMemberData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3460,6 +3510,7 @@ public NetworkInterfaceData() { } public Azure.Core.ResourceIdentifier VirtualMachineId { get { throw null; } } public bool? VnetEncryptionSupported { get { throw null; } } public string WorkloadType { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.NetworkInterfaceData 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.Network.NetworkInterfaceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3500,6 +3551,7 @@ public NetworkInterfaceIPConfigurationData() { } public Azure.ResourceManager.Network.PublicIPAddressData PublicIPAddress { get { throw null; } set { } } public Azure.ResourceManager.Network.SubnetData Subnet { get { throw null; } set { } } public System.Collections.Generic.IList VirtualNetworkTaps { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.NetworkInterfaceIPConfigurationData 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.Network.NetworkInterfaceIPConfigurationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3581,6 +3633,7 @@ public NetworkInterfaceTapConfigurationData() { } public Azure.ETag? ETag { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.Network.VirtualNetworkTapData VirtualNetworkTap { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.NetworkInterfaceTapConfigurationData 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.Network.NetworkInterfaceTapConfigurationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3630,6 +3683,7 @@ public NetworkManagerConnectionData() { } public string Description { get { throw null; } set { } } public Azure.ETag? ETag { get { throw null; } } public Azure.Core.ResourceIdentifier NetworkManagerId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.NetworkManagerConnectionData 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.Network.NetworkManagerConnectionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3646,6 +3700,7 @@ public NetworkManagerData() { } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.Guid? ResourceGuid { get { throw null; } } public Azure.ResourceManager.Models.SystemData SystemData { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.NetworkManagerData 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.Network.NetworkManagerData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3727,6 +3782,7 @@ public NetworkManagerRoutingConfigurationData() { } public Azure.ETag? ETag { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.Guid? ResourceGuid { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.NetworkManagerRoutingConfigurationData 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.Network.NetworkManagerRoutingConfigurationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3781,6 +3837,7 @@ public NetworkManagerRoutingRuleData() { } public Azure.ResourceManager.Network.Models.RoutingRuleNextHop NextHop { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.Guid? ResourceGuid { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.NetworkManagerRoutingRuleData 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.Network.NetworkManagerRoutingRuleData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3832,6 +3889,7 @@ public NetworkManagerRoutingRulesData() { } public Azure.ETag? ETag { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.Guid? ResourceGuid { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.NetworkManagerRoutingRulesData 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.Network.NetworkManagerRoutingRulesData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3884,6 +3942,7 @@ public NetworkManagerSecurityUserConfigurationData() { } public Azure.ETag? ETag { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.Guid? ResourceGuid { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.NetworkManagerSecurityUserConfigurationData 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.Network.NetworkManagerSecurityUserConfigurationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3942,6 +4001,7 @@ public NetworkManagerSecurityUserRuleData() { } public System.Guid? ResourceGuid { get { throw null; } } public System.Collections.Generic.IList SourcePortRanges { get { throw null; } } public System.Collections.Generic.IList Sources { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.NetworkManagerSecurityUserRuleData 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.Network.NetworkManagerSecurityUserRuleData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3992,6 +4052,7 @@ public NetworkManagerSecurityUserRulesData() { } public Azure.ETag? ETag { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.Guid? ResourceGuid { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.NetworkManagerSecurityUserRulesData 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.Network.NetworkManagerSecurityUserRulesData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4046,6 +4107,7 @@ public NetworkPrivateEndpointConnectionData() { } public Azure.ResourceManager.Network.PrivateEndpointData PrivateEndpoint { get { throw null; } } public string PrivateEndpointLocation { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.NetworkPrivateEndpointConnectionData 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.Network.NetworkPrivateEndpointConnectionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4096,6 +4158,7 @@ public NetworkProfileData() { } public Azure.ETag? ETag { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.Guid? ResourceGuid { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.NetworkProfileData 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.Network.NetworkProfileData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4156,6 +4219,7 @@ public NetworkSecurityGroupData() { } public System.Guid? ResourceGuid { get { throw null; } } public System.Collections.Generic.IList SecurityRules { get { throw null; } } public System.Collections.Generic.IReadOnlyList Subnets { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.NetworkSecurityGroupData 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.Network.NetworkSecurityGroupData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4239,6 +4303,7 @@ public NetworkVirtualApplianceConnectionData() { } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.Network.Models.RoutingConfigurationNfv RoutingConfiguration { get { throw null; } set { } } public long? TunnelIdentifier { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.NetworkVirtualApplianceConnectionData 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.Network.NetworkVirtualApplianceConnectionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4288,6 +4353,7 @@ public NetworkVirtualApplianceData() { } public System.Collections.Generic.IReadOnlyList VirtualApplianceNics { get { throw null; } } public System.Collections.Generic.IReadOnlyList VirtualApplianceSites { get { throw null; } } public Azure.Core.ResourceIdentifier VirtualHubId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.NetworkVirtualApplianceData 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.Network.NetworkVirtualApplianceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4360,6 +4426,7 @@ public NetworkVirtualApplianceSkuData() { } public System.Collections.Generic.IReadOnlyList AvailableVersions { get { throw null; } } public Azure.ETag? ETag { get { throw null; } } public string Vendor { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.NetworkVirtualApplianceSkuData 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.Network.NetworkVirtualApplianceSkuData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4421,6 +4488,7 @@ public partial class NetworkWatcherData : Azure.ResourceManager.Network.Models.N public NetworkWatcherData() { } public Azure.ETag? ETag { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.NetworkWatcherData 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.Network.NetworkWatcherData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4511,6 +4579,7 @@ public OutboundRuleData() { } public int? IdleTimeoutInMinutes { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.LoadBalancerOutboundRuleProtocol? Protocol { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.OutboundRuleData 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.Network.OutboundRuleData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4561,6 +4630,7 @@ public P2SVpnGatewayData() { } public Azure.ResourceManager.Network.Models.VpnClientConnectionHealth VpnClientConnectionHealth { get { throw null; } } public int? VpnGatewayScaleUnit { get { throw null; } set { } } public Azure.Core.ResourceIdentifier VpnServerConfigurationId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.P2SVpnGatewayData 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.Network.P2SVpnGatewayData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4634,6 +4704,7 @@ internal PacketCaptureData() { } public Azure.ResourceManager.Network.Models.PacketCaptureTargetType? TargetType { get { throw null; } } public int? TimeLimitInSeconds { get { throw null; } } public long? TotalBytesPerSession { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.PacketCaptureData 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.Network.PacketCaptureData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4689,6 +4760,7 @@ public PeerExpressRouteCircuitConnectionData() { } public Azure.Core.ResourceIdentifier ExpressRouteCircuitPeeringId { get { throw null; } set { } } public Azure.Core.ResourceIdentifier PeerExpressRouteCircuitPeeringId { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.PeerExpressRouteCircuitConnectionData 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.Network.PeerExpressRouteCircuitConnectionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4717,6 +4789,7 @@ public PolicySignaturesOverridesForIdpsData() { } public string Name { get { throw null; } set { } } public Azure.Core.ResourceType? ResourceType { get { throw null; } set { } } public System.Collections.Generic.IDictionary Signatures { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.PolicySignaturesOverridesForIdpsData 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.Network.PolicySignaturesOverridesForIdpsData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4765,6 +4838,7 @@ public PrivateDnsZoneGroupData() { } public Azure.ETag? ETag { get { throw null; } } public System.Collections.Generic.IList PrivateDnsZoneConfigs { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.PrivateDnsZoneGroupData 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.Network.PrivateDnsZoneGroupData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4821,6 +4895,7 @@ public PrivateEndpointData() { } public System.Collections.Generic.IList PrivateLinkServiceConnections { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.Network.SubnetData Subnet { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.PrivateEndpointData 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.Network.PrivateEndpointData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4888,6 +4963,7 @@ public PrivateLinkServiceData() { } public System.Collections.Generic.IReadOnlyList PrivateEndpointConnections { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.Collections.Generic.IList VisibilitySubscriptions { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.PrivateLinkServiceData 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.Network.PrivateLinkServiceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4950,6 +5026,7 @@ public ProbeData() { } public Azure.ResourceManager.Network.Models.ProbeProtocol? Protocol { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public string RequestPath { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.ProbeData 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.Network.ProbeData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5011,6 +5088,7 @@ public PublicIPAddressData() { } public Azure.ResourceManager.Network.PublicIPAddressData ServicePublicIPAddress { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.PublicIPAddressSku Sku { get { throw null; } set { } } public System.Collections.Generic.IList Zones { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.PublicIPAddressData 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.Network.PublicIPAddressData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5078,6 +5156,7 @@ public PublicIPPrefixData() { } public System.Guid? ResourceGuid { get { throw null; } } public Azure.ResourceManager.Network.Models.PublicIPPrefixSku Sku { get { throw null; } set { } } public System.Collections.Generic.IList Zones { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.PublicIPPrefixData 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.Network.PublicIPPrefixData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5135,6 +5214,7 @@ public RouteData() { } public string NextHopIPAddress { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.RouteNextHopType? NextHopType { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.RouteData 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.Network.RouteData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5166,6 +5246,7 @@ public RouteFilterData() { } public System.Collections.Generic.IReadOnlyList Peerings { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.Collections.Generic.IList Rules { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.RouteFilterData 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.Network.RouteFilterData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5226,6 +5307,7 @@ public RouteFilterRuleData() { } public Azure.Core.AzureLocation? Location { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.Network.Models.RouteFilterRuleType? RouteFilterRuleType { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.RouteFilterRuleData 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.Network.RouteFilterRuleData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5276,6 +5358,7 @@ public RouteMapData() { } public Azure.ETag? ETag { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.Collections.Generic.IList Rules { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.RouteMapData 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.Network.RouteMapData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5346,6 +5429,7 @@ public RouteTableData() { } public System.Guid? ResourceGuid { get { throw null; } } public System.Collections.Generic.IList Routes { get { throw null; } } public System.Collections.Generic.IReadOnlyList Subnets { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.RouteTableData 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.Network.RouteTableData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5403,6 +5487,7 @@ public RoutingIntentData() { } public Azure.ETag? ETag { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.Collections.Generic.IList RoutingPolicies { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.RoutingIntentData 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.Network.RoutingIntentData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5453,6 +5538,7 @@ public ScopeConnectionData() { } public Azure.ETag? ETag { get { throw null; } } public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } set { } } public System.Guid? TenantId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.ScopeConnectionData 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.Network.ScopeConnectionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5503,6 +5589,7 @@ public SecurityAdminConfigurationData() { } public Azure.ETag? ETag { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.Guid? ResourceGuid { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.SecurityAdminConfigurationData 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.Network.SecurityAdminConfigurationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5556,6 +5643,7 @@ public SecurityPartnerProviderData() { } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.Network.Models.SecurityProviderName? SecurityProviderName { get { throw null; } set { } } public Azure.Core.ResourceIdentifier VirtualHubId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.SecurityPartnerProviderData 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.Network.SecurityPartnerProviderData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5624,6 +5712,7 @@ public SecurityRuleData() { } public System.Collections.Generic.IList SourceApplicationSecurityGroups { get { throw null; } } public string SourcePortRange { get { throw null; } set { } } public System.Collections.Generic.IList SourcePortRanges { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.SecurityRuleData 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.Network.SecurityRuleData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5677,6 +5766,7 @@ public ServiceEndpointPolicyData() { } public string ServiceAlias { get { throw null; } set { } } public System.Collections.Generic.IList ServiceEndpointPolicyDefinitions { get { throw null; } } public System.Collections.Generic.IReadOnlyList Subnets { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.ServiceEndpointPolicyData 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.Network.ServiceEndpointPolicyData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5708,6 +5798,7 @@ public ServiceEndpointPolicyDefinitionData() { } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public string Service { get { throw null; } set { } } public System.Collections.Generic.IList ServiceResources { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.ServiceEndpointPolicyDefinitionData 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.Network.ServiceEndpointPolicyDefinitionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5803,6 +5894,7 @@ public SubnetData() { } public System.Collections.Generic.IList ServiceEndpointPolicies { get { throw null; } } public System.Collections.Generic.IList ServiceEndpoints { get { throw null; } } public Azure.ResourceManager.Network.Models.SharingScope? SharingScope { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.SubnetData 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.Network.SubnetData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5896,6 +5988,7 @@ public VirtualApplianceSiteData() { } public Azure.ETag? ETag { get { throw null; } } public Azure.ResourceManager.Network.Models.BreakOutCategoryPolicies O365BreakOutCategories { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.VirtualApplianceSiteData 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.Network.VirtualApplianceSiteData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5965,6 +6058,7 @@ public VirtualHubData() { } public System.Collections.Generic.IList VirtualRouterIPs { get { throw null; } } public Azure.Core.ResourceIdentifier VirtualWanId { get { throw null; } set { } } public Azure.Core.ResourceIdentifier VpnGatewayId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.VirtualHubData 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.Network.VirtualHubData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6065,6 +6159,7 @@ public VirtualHubRouteTableV2Data() { } public Azure.ETag? ETag { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.Collections.Generic.IList Routes { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.VirtualHubRouteTableV2Data 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.Network.VirtualHubRouteTableV2Data System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6153,6 +6248,7 @@ public VirtualNetworkData() { } public System.Guid? ResourceGuid { get { throw null; } } public System.Collections.Generic.IList Subnets { get { throw null; } } public System.Collections.Generic.IList VirtualNetworkPeerings { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.VirtualNetworkData 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.Network.VirtualNetworkData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6224,6 +6320,7 @@ public VirtualNetworkGatewayConnectionData(Azure.ResourceManager.Network.Virtual public bool? UsePolicyBasedTrafficSelectors { get { throw null; } set { } } public Azure.ResourceManager.Network.VirtualNetworkGatewayData VirtualNetworkGateway1 { get { throw null; } set { } } public Azure.ResourceManager.Network.VirtualNetworkGatewayData VirtualNetworkGateway2 { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.VirtualNetworkGatewayConnectionData 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.Network.VirtualNetworkGatewayConnectionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6315,6 +6412,7 @@ public VirtualNetworkGatewayData() { } public Azure.ResourceManager.Network.Models.VpnClientConfiguration VpnClientConfiguration { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.VpnGatewayGeneration? VpnGatewayGeneration { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.VpnType? VpnType { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.VirtualNetworkGatewayData 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.Network.VirtualNetworkGatewayData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6348,6 +6446,7 @@ public VirtualNetworkGatewayNatRuleData() { } public Azure.ResourceManager.Network.Models.VpnNatRuleMode? Mode { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.Network.Models.VpnNatRuleType? VpnNatRuleType { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.VirtualNetworkGatewayNatRuleData 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.Network.VirtualNetworkGatewayNatRuleData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6498,6 +6597,7 @@ public VirtualNetworkPeeringData() { } public Azure.Core.ResourceIdentifier RemoteVirtualNetworkId { get { throw null; } set { } } public System.Guid? ResourceGuid { get { throw null; } } public bool? UseRemoteGateways { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.VirtualNetworkPeeringData 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.Network.VirtualNetworkPeeringData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6589,6 +6689,7 @@ public VirtualNetworkTapData() { } public System.Collections.Generic.IReadOnlyList NetworkInterfaceTapConfigurations { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.Guid? ResourceGuid { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.VirtualNetworkTapData 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.Network.VirtualNetworkTapData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6647,6 +6748,7 @@ public VirtualRouterData() { } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public long? VirtualRouterAsn { get { throw null; } set { } } public System.Collections.Generic.IList VirtualRouterIPs { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.VirtualRouterData 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.Network.VirtualRouterData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6677,6 +6779,7 @@ public VirtualRouterPeeringData() { } public long? PeerAsn { get { throw null; } set { } } public string PeerIP { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.VirtualRouterPeeringData 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.Network.VirtualRouterPeeringData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6759,6 +6862,7 @@ public VirtualWanData() { } public System.Collections.Generic.IReadOnlyList VirtualHubs { get { throw null; } } public string VirtualWanType { get { throw null; } set { } } public System.Collections.Generic.IReadOnlyList VpnSites { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.VirtualWanData 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.Network.VirtualWanData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6844,6 +6948,7 @@ public VpnConnectionData() { } public bool? UsePolicyBasedTrafficSelectors { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.VirtualNetworkGatewayConnectionProtocol? VpnConnectionProtocolType { get { throw null; } set { } } public System.Collections.Generic.IList VpnLinkConnections { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.VpnConnectionData 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.Network.VpnConnectionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6906,6 +7011,7 @@ public VpnGatewayData() { } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public Azure.Core.ResourceIdentifier VirtualHubId { get { throw null; } set { } } public int? VpnGatewayScaleUnit { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.VpnGatewayData 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.Network.VpnGatewayData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6941,6 +7047,7 @@ public VpnGatewayNatRuleData() { } public Azure.ResourceManager.Network.Models.VpnNatRuleMode? Mode { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.Network.Models.VpnNatRuleType? VpnNatRuleType { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.VpnGatewayNatRuleData 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.Network.VpnGatewayNatRuleData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7011,6 +7118,7 @@ public partial class VpnLinkConnectionSharedKeyData : Azure.ResourceManager.Netw { public VpnLinkConnectionSharedKeyData() { } public Azure.ResourceManager.Network.Models.VpnLinkConnectionSharedKeyProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.VpnLinkConnectionSharedKeyData 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.Network.VpnLinkConnectionSharedKeyData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7071,6 +7179,7 @@ public VpnServerConfigurationData() { } public System.Collections.Generic.IList VpnClientRevokedCertificates { get { throw null; } } public System.Collections.Generic.IList VpnClientRootCertificates { get { throw null; } } public System.Collections.Generic.IList VpnProtocols { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.VpnServerConfigurationData 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.Network.VpnServerConfigurationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7103,6 +7212,7 @@ public VpnServerConfigurationPolicyGroupData() { } public System.Collections.Generic.IList PolicyMembers { get { throw null; } } public int? Priority { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.VpnServerConfigurationPolicyGroupData 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.Network.VpnServerConfigurationPolicyGroupData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7187,6 +7297,7 @@ public VpnSiteData() { } public string SiteKey { get { throw null; } set { } } public Azure.Core.ResourceIdentifier VirtualWanId { get { throw null; } set { } } public System.Collections.Generic.IList VpnSiteLinks { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.VpnSiteData 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.Network.VpnSiteData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7246,6 +7357,7 @@ public VpnSiteLinkConnectionData() { } public System.Collections.Generic.IList VpnGatewayCustomBgpAddresses { get { throw null; } } public Azure.ResourceManager.Network.Models.VpnLinkConnectionMode? VpnLinkConnectionMode { get { throw null; } set { } } public Azure.Core.ResourceIdentifier VpnSiteLinkId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.VpnSiteLinkConnectionData 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.Network.VpnSiteLinkConnectionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7281,6 +7393,7 @@ public VpnSiteLinkData() { } public string IPAddress { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.VpnLinkProviderProperties LinkProperties { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.VpnSiteLinkData 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.Network.VpnSiteLinkData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7360,6 +7473,7 @@ public WebApplicationFirewallPolicyData() { } public Azure.ResourceManager.Network.Models.PolicySettings PolicySettings { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.Network.Models.WebApplicationFirewallPolicyResourceState? ResourceState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.WebApplicationFirewallPolicyData 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.Network.WebApplicationFirewallPolicyData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7829,6 +7943,7 @@ public AadAuthenticationParameters() { } public string AadAudience { get { throw null; } set { } } public string AadIssuer { get { throw null; } set { } } public string AadTenant { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AadAuthenticationParameters 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.Network.Models.AadAuthenticationParameters System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7845,6 +7960,7 @@ protected ActiveBaseSecurityAdminRule() { } public System.Collections.Generic.IReadOnlyList RuleCollectionAppliesToGroups { get { throw null; } } public string RuleCollectionDescription { get { throw null; } } public System.Collections.Generic.IReadOnlyList RuleGroups { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ActiveBaseSecurityAdminRule 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.Network.Models.ActiveBaseSecurityAdminRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7856,6 +7972,7 @@ public partial class ActiveConfigurationContent : System.ClientModel.Primitives. public ActiveConfigurationContent() { } public System.Collections.Generic.IList Regions { get { throw null; } } public string SkipToken { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ActiveConfigurationContent 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.Network.Models.ActiveConfigurationContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7867,6 +7984,7 @@ public partial class ActiveConnectivityConfiguration : Azure.ResourceManager.Net internal ActiveConnectivityConfiguration() { } public System.DateTimeOffset? CommittedOn { get { throw null; } } public Azure.Core.AzureLocation? Region { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ActiveConnectivityConfiguration 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.Network.Models.ActiveConnectivityConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7888,6 +8006,7 @@ internal ActiveDefaultSecurityAdminRule() { } public System.Guid? ResourceGuid { get { throw null; } } public System.Collections.Generic.IReadOnlyList SourcePortRanges { get { throw null; } } public System.Collections.Generic.IReadOnlyList Sources { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ActiveDefaultSecurityAdminRule 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.Network.Models.ActiveDefaultSecurityAdminRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7908,6 +8027,7 @@ internal ActiveSecurityAdminRule() { } public System.Guid? ResourceGuid { get { throw null; } } public System.Collections.Generic.IReadOnlyList SourcePortRanges { get { throw null; } } public System.Collections.Generic.IReadOnlyList Sources { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ActiveSecurityAdminRule 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.Network.Models.ActiveSecurityAdminRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7919,6 +8039,7 @@ public partial class AddressPrefixItem : System.ClientModel.Primitives.IJsonMode public AddressPrefixItem() { } public string AddressPrefix { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.AddressPrefixType? AddressPrefixType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AddressPrefixItem 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.Network.Models.AddressPrefixItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7949,6 +8070,7 @@ public ApplicationGatewayAuthenticationCertificate() { } public System.BinaryData Data { get { throw null; } set { } } public Azure.ETag? ETag { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayAuthenticationCertificate 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.Network.Models.ApplicationGatewayAuthenticationCertificate System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7960,6 +8082,7 @@ public partial class ApplicationGatewayAutoscaleConfiguration : System.ClientMod public ApplicationGatewayAutoscaleConfiguration(int minCapacity) { } public int? MaxCapacity { get { throw null; } set { } } public int MinCapacity { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayAutoscaleConfiguration 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.Network.Models.ApplicationGatewayAutoscaleConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7973,6 +8096,7 @@ public ApplicationGatewayAvailableSslOptionsInfo() { } public System.Collections.Generic.IList AvailableProtocols { get { throw null; } } public Azure.ResourceManager.Network.Models.ApplicationGatewaySslPolicyName? DefaultPolicy { get { throw null; } set { } } public System.Collections.Generic.IList PredefinedPolicies { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayAvailableSslOptionsInfo 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.Network.Models.ApplicationGatewayAvailableSslOptionsInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7984,6 +8108,7 @@ public partial class ApplicationGatewayBackendAddress : System.ClientModel.Primi public ApplicationGatewayBackendAddress() { } public string Fqdn { get { throw null; } set { } } public string IPAddress { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayBackendAddress 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.Network.Models.ApplicationGatewayBackendAddress System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7997,6 +8122,7 @@ public ApplicationGatewayBackendAddressPool() { } public System.Collections.Generic.IReadOnlyList BackendIPConfigurations { get { throw null; } } public Azure.ETag? ETag { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayBackendAddressPool 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.Network.Models.ApplicationGatewayBackendAddressPool System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8007,6 +8133,7 @@ public partial class ApplicationGatewayBackendHealth : System.ClientModel.Primit { internal ApplicationGatewayBackendHealth() { } public System.Collections.Generic.IReadOnlyList BackendAddressPools { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayBackendHealth 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.Network.Models.ApplicationGatewayBackendHealth System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8018,6 +8145,7 @@ public partial class ApplicationGatewayBackendHealthHttpSettings : System.Client internal ApplicationGatewayBackendHealthHttpSettings() { } public Azure.ResourceManager.Network.Models.ApplicationGatewayBackendHttpSettings BackendHttpSettings { get { throw null; } } public System.Collections.Generic.IReadOnlyList Servers { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayBackendHealthHttpSettings 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.Network.Models.ApplicationGatewayBackendHealthHttpSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8029,6 +8157,7 @@ public partial class ApplicationGatewayBackendHealthOnDemand : System.ClientMode internal ApplicationGatewayBackendHealthOnDemand() { } public Azure.ResourceManager.Network.Models.ApplicationGatewayBackendAddressPool BackendAddressPool { get { throw null; } } public Azure.ResourceManager.Network.Models.ApplicationGatewayBackendHealthHttpSettings BackendHealthHttpSettings { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayBackendHealthOnDemand 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.Network.Models.ApplicationGatewayBackendHealthOnDemand System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8040,6 +8169,7 @@ public partial class ApplicationGatewayBackendHealthPool : System.ClientModel.Pr internal ApplicationGatewayBackendHealthPool() { } public Azure.ResourceManager.Network.Models.ApplicationGatewayBackendAddressPool BackendAddressPool { get { throw null; } } public System.Collections.Generic.IReadOnlyList BackendHttpSettingsCollection { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayBackendHealthPool 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.Network.Models.ApplicationGatewayBackendHealthPool System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8053,6 +8183,7 @@ internal ApplicationGatewayBackendHealthServer() { } public Azure.ResourceManager.Network.Models.ApplicationGatewayBackendHealthServerHealth? Health { get { throw null; } } public string HealthProbeLog { get { throw null; } } public Azure.ResourceManager.Network.NetworkInterfaceIPConfigurationData IPConfiguration { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayBackendHealthServer 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.Network.Models.ApplicationGatewayBackendHealthServer System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8098,6 +8229,7 @@ public ApplicationGatewayBackendHttpSettings() { } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public int? RequestTimeoutInSeconds { get { throw null; } set { } } public System.Collections.Generic.IList TrustedRootCertificates { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayBackendHttpSettings 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.Network.Models.ApplicationGatewayBackendHttpSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8116,6 +8248,7 @@ public ApplicationGatewayBackendSettings() { } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public int? TimeoutInSeconds { get { throw null; } set { } } public System.Collections.Generic.IList TrustedRootCertificates { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayBackendSettings 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.Network.Models.ApplicationGatewayBackendSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8127,6 +8260,7 @@ public partial class ApplicationGatewayClientAuthConfiguration : System.ClientMo public ApplicationGatewayClientAuthConfiguration() { } public bool? VerifyClientCertIssuerDN { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.ApplicationGatewayClientRevocationOption? VerifyClientRevocation { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayClientAuthConfiguration 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.Network.Models.ApplicationGatewayClientAuthConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8156,6 +8290,7 @@ public partial class ApplicationGatewayConnectionDraining : System.ClientModel.P public ApplicationGatewayConnectionDraining(bool enabled, int drainTimeoutInSeconds) { } public int DrainTimeoutInSeconds { get { throw null; } set { } } public bool Enabled { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayConnectionDraining 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.Network.Models.ApplicationGatewayConnectionDraining System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8185,6 +8320,7 @@ public partial class ApplicationGatewayCustomError : System.ClientModel.Primitiv public ApplicationGatewayCustomError() { } public System.Uri CustomErrorPageUri { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.ApplicationGatewayCustomErrorStatusCode? StatusCode { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayCustomError 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.Network.Models.ApplicationGatewayCustomError System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8224,6 +8360,7 @@ public partial class ApplicationGatewayFirewallDisabledRuleGroup : System.Client public ApplicationGatewayFirewallDisabledRuleGroup(string ruleGroupName) { } public string RuleGroupName { get { throw null; } set { } } public System.Collections.Generic.IList Rules { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayFirewallDisabledRuleGroup 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.Network.Models.ApplicationGatewayFirewallDisabledRuleGroup System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8236,6 +8373,7 @@ public ApplicationGatewayFirewallExclusion(string matchVariable, string selector public string MatchVariable { get { throw null; } set { } } public string Selector { get { throw null; } set { } } public string SelectorMatchOperator { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayFirewallExclusion 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.Network.Models.ApplicationGatewayFirewallExclusion System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8250,6 +8388,7 @@ internal ApplicationGatewayFirewallManifestRuleSet() { } public string RuleSetVersion { get { throw null; } } public Azure.ResourceManager.Network.Models.ApplicationGatewayRuleSetStatusOption? Status { get { throw null; } } public System.Collections.Generic.IReadOnlyList Tiers { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayFirewallManifestRuleSet 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.Network.Models.ApplicationGatewayFirewallManifestRuleSet System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8301,6 +8440,7 @@ public ApplicationGatewayFirewallRule(int ruleId) { } public string RuleIdString { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.ApplicationGatewayWafRuleSensitivityType? Sensitivity { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.ApplicationGatewayWafRuleStateType? State { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayFirewallRule 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.Network.Models.ApplicationGatewayFirewallRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8313,6 +8453,7 @@ public ApplicationGatewayFirewallRuleGroup(string ruleGroupName, System.Collecti public string Description { get { throw null; } set { } } public string RuleGroupName { get { throw null; } set { } } public System.Collections.Generic.IList Rules { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayFirewallRuleGroup 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.Network.Models.ApplicationGatewayFirewallRuleGroup System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8327,6 +8468,7 @@ public ApplicationGatewayFirewallRuleSet() { } public string RuleSetType { get { throw null; } set { } } public string RuleSetVersion { get { throw null; } set { } } public System.Collections.Generic.IList Tiers { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayFirewallRuleSet 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.Network.Models.ApplicationGatewayFirewallRuleSet System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8362,6 +8504,7 @@ public ApplicationGatewayFrontendIPConfiguration() { } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public Azure.Core.ResourceIdentifier PublicIPAddressId { get { throw null; } set { } } public Azure.Core.ResourceIdentifier SubnetId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayFrontendIPConfiguration 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.Network.Models.ApplicationGatewayFrontendIPConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8374,6 +8517,7 @@ public ApplicationGatewayFrontendPort() { } public Azure.ETag? ETag { get { throw null; } } public int? Port { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayFrontendPort 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.Network.Models.ApplicationGatewayFrontendPort System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8385,6 +8529,7 @@ public partial class ApplicationGatewayGlobalConfiguration : System.ClientModel. public ApplicationGatewayGlobalConfiguration() { } public bool? EnableRequestBuffering { get { throw null; } set { } } public bool? EnableResponseBuffering { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayGlobalConfiguration 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.Network.Models.ApplicationGatewayGlobalConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8397,6 +8542,7 @@ public ApplicationGatewayHeaderConfiguration() { } public string HeaderName { get { throw null; } set { } } public string HeaderValue { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.HeaderValueMatcher HeaderValueMatcher { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayHeaderConfiguration 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.Network.Models.ApplicationGatewayHeaderConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8418,6 +8564,7 @@ public ApplicationGatewayHttpListener() { } public bool? RequireServerNameIndication { get { throw null; } set { } } public Azure.Core.ResourceIdentifier SslCertificateId { get { throw null; } set { } } public Azure.Core.ResourceIdentifier SslProfileId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayHttpListener 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.Network.Models.ApplicationGatewayHttpListener System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8430,6 +8577,7 @@ public ApplicationGatewayIPConfiguration() { } public Azure.ETag? ETag { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public Azure.Core.ResourceIdentifier SubnetId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayIPConfiguration 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.Network.Models.ApplicationGatewayIPConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8447,6 +8595,7 @@ public ApplicationGatewayListener() { } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public Azure.Core.ResourceIdentifier SslCertificateId { get { throw null; } set { } } public Azure.Core.ResourceIdentifier SslProfileId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayListener 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.Network.Models.ApplicationGatewayListener System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8479,6 +8628,7 @@ public ApplicationGatewayLoadDistributionPolicy() { } public Azure.ResourceManager.Network.Models.ApplicationGatewayLoadDistributionAlgorithm? LoadDistributionAlgorithm { get { throw null; } set { } } public System.Collections.Generic.IList LoadDistributionTargets { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayLoadDistributionPolicy 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.Network.Models.ApplicationGatewayLoadDistributionPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8491,6 +8641,7 @@ public ApplicationGatewayLoadDistributionTarget() { } public Azure.Core.ResourceIdentifier BackendAddressPoolId { get { throw null; } set { } } public Azure.ETag? ETag { get { throw null; } } public int? WeightPerServer { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayLoadDistributionTarget 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.Network.Models.ApplicationGatewayLoadDistributionTarget System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8508,6 +8659,7 @@ public ApplicationGatewayOnDemandProbe() { } public bool? PickHostNameFromBackendHttpSettings { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.ApplicationGatewayProtocol? Protocol { get { throw null; } set { } } public int? Timeout { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayOnDemandProbe 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.Network.Models.ApplicationGatewayOnDemandProbe System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8546,6 +8698,7 @@ public ApplicationGatewayPathRule() { } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public Azure.Core.ResourceIdentifier RedirectConfigurationId { get { throw null; } set { } } public Azure.Core.ResourceIdentifier RewriteRuleSetId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayPathRule 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.Network.Models.ApplicationGatewayPathRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8558,6 +8711,7 @@ public ApplicationGatewayPrivateLinkConfiguration() { } public Azure.ETag? ETag { get { throw null; } } public System.Collections.Generic.IList IPConfigurations { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayPrivateLinkConfiguration 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.Network.Models.ApplicationGatewayPrivateLinkConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8573,6 +8727,7 @@ public ApplicationGatewayPrivateLinkIPConfiguration() { } public Azure.ResourceManager.Network.Models.NetworkIPAllocationMethod? PrivateIPAllocationMethod { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public Azure.Core.ResourceIdentifier SubnetId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayPrivateLinkIPConfiguration 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.Network.Models.ApplicationGatewayPrivateLinkIPConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8586,6 +8741,7 @@ public ApplicationGatewayPrivateLinkResource() { } public string GroupId { get { throw null; } } public System.Collections.Generic.IReadOnlyList RequiredMembers { get { throw null; } } public System.Collections.Generic.IList RequiredZoneNames { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayPrivateLinkResource 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.Network.Models.ApplicationGatewayPrivateLinkResource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8608,6 +8764,7 @@ public ApplicationGatewayProbe() { } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public int? TimeoutInSeconds { get { throw null; } set { } } public int? UnhealthyThreshold { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayProbe 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.Network.Models.ApplicationGatewayProbe System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8619,6 +8776,7 @@ public partial class ApplicationGatewayProbeHealthResponseMatch : System.ClientM public ApplicationGatewayProbeHealthResponseMatch() { } public System.BinaryData Body { get { throw null; } set { } } public System.Collections.Generic.IList StatusCodes { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayProbeHealthResponseMatch 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.Network.Models.ApplicationGatewayProbeHealthResponseMatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8657,6 +8815,7 @@ public ApplicationGatewayRedirectConfiguration() { } public Azure.Core.ResourceIdentifier TargetListenerId { get { throw null; } set { } } public System.Uri TargetUri { get { throw null; } set { } } public System.Collections.Generic.IList UrlPathMaps { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayRedirectConfiguration 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.Network.Models.ApplicationGatewayRedirectConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8697,6 +8856,7 @@ public ApplicationGatewayRequestRoutingRule() { } public Azure.Core.ResourceIdentifier RewriteRuleSetId { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.ApplicationGatewayRequestRoutingRuleType? RuleType { get { throw null; } set { } } public Azure.Core.ResourceIdentifier UrlPathMapId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayRequestRoutingRule 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.Network.Models.ApplicationGatewayRequestRoutingRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8728,6 +8888,7 @@ public ApplicationGatewayRewriteRule() { } public System.Collections.Generic.IList Conditions { get { throw null; } } public string Name { get { throw null; } set { } } public int? RuleSequence { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayRewriteRule 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.Network.Models.ApplicationGatewayRewriteRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8740,6 +8901,7 @@ public ApplicationGatewayRewriteRuleActionSet() { } public System.Collections.Generic.IList RequestHeaderConfigurations { get { throw null; } } public System.Collections.Generic.IList ResponseHeaderConfigurations { get { throw null; } } public Azure.ResourceManager.Network.Models.ApplicationGatewayUrlConfiguration UrlConfiguration { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayRewriteRuleActionSet 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.Network.Models.ApplicationGatewayRewriteRuleActionSet System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8753,6 +8915,7 @@ public ApplicationGatewayRewriteRuleCondition() { } public bool? Negate { get { throw null; } set { } } public string Pattern { get { throw null; } set { } } public string Variable { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayRewriteRuleCondition 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.Network.Models.ApplicationGatewayRewriteRuleCondition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8765,6 +8928,7 @@ public ApplicationGatewayRewriteRuleSet() { } public Azure.ETag? ETag { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.Collections.Generic.IList RewriteRules { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayRewriteRuleSet 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.Network.Models.ApplicationGatewayRewriteRuleSet System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8781,6 +8945,7 @@ public ApplicationGatewayRoutingRule() { } public int? Priority { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.Network.Models.ApplicationGatewayRequestRoutingRuleType? RuleType { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayRoutingRule 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.Network.Models.ApplicationGatewayRoutingRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8814,6 +8979,7 @@ public ApplicationGatewaySku() { } public Azure.ResourceManager.Network.Models.ApplicationGatewaySkuFamily? Family { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.ApplicationGatewaySkuName? Name { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.ApplicationGatewayTier? Tier { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewaySku 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.Network.Models.ApplicationGatewaySku System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8871,6 +9037,7 @@ public ApplicationGatewaySslCertificate() { } public string Password { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.BinaryData PublicCertData { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewaySslCertificate 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.Network.Models.ApplicationGatewaySslCertificate System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8929,6 +9096,7 @@ public ApplicationGatewaySslPolicy() { } public Azure.ResourceManager.Network.Models.ApplicationGatewaySslProtocol? MinProtocolVersion { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.ApplicationGatewaySslPolicyName? PolicyName { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.ApplicationGatewaySslPolicyType? PolicyType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewaySslPolicy 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.Network.Models.ApplicationGatewaySslPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8980,6 +9148,7 @@ public partial class ApplicationGatewaySslPredefinedPolicy : Azure.ResourceManag public ApplicationGatewaySslPredefinedPolicy() { } public System.Collections.Generic.IList CipherSuites { get { throw null; } } public Azure.ResourceManager.Network.Models.ApplicationGatewaySslProtocol? MinProtocolVersion { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewaySslPredefinedPolicy 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.Network.Models.ApplicationGatewaySslPredefinedPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8997,6 +9166,7 @@ public ApplicationGatewaySslProfile() { } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] [System.ObsoleteAttribute("This property is obsolete and might be removed in a future version, please use `TagToIPAddresses` instead", false)] public bool? VerifyClientCertIssuerDN { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewaySslProfile 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.Network.Models.ApplicationGatewaySslProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -9072,6 +9242,7 @@ public ApplicationGatewayTrustedClientCertificate() { } public Azure.ETag? ETag { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.BinaryData ValidatedCertData { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayTrustedClientCertificate 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.Network.Models.ApplicationGatewayTrustedClientCertificate System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -9085,6 +9256,7 @@ public ApplicationGatewayTrustedRootCertificate() { } public Azure.ETag? ETag { get { throw null; } } public string KeyVaultSecretId { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayTrustedRootCertificate 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.Network.Models.ApplicationGatewayTrustedRootCertificate System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -9097,6 +9269,7 @@ public ApplicationGatewayUrlConfiguration() { } public string ModifiedPath { get { throw null; } set { } } public string ModifiedQueryString { get { throw null; } set { } } public bool? Reroute { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayUrlConfiguration 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.Network.Models.ApplicationGatewayUrlConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -9114,6 +9287,7 @@ public ApplicationGatewayUrlPathMap() { } public Azure.ETag? ETag { get { throw null; } } public System.Collections.Generic.IList PathRules { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayUrlPathMap 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.Network.Models.ApplicationGatewayUrlPathMap System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -9192,6 +9366,7 @@ public ApplicationGatewayWebApplicationFirewallConfiguration(bool enabled, Azure public bool? RequestBodyCheck { get { throw null; } set { } } public string RuleSetType { get { throw null; } set { } } public string RuleSetVersion { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayWebApplicationFirewallConfiguration 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.Network.Models.ApplicationGatewayWebApplicationFirewallConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -9211,6 +9386,7 @@ public ApplicationRule() { } public System.Collections.Generic.IList TargetUrls { get { throw null; } } public bool? TerminateTLS { get { throw null; } set { } } public System.Collections.Generic.IList WebCategories { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationRule 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.Network.Models.ApplicationRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -9636,6 +9812,7 @@ public partial class AutoApprovedPrivateLinkService : System.ClientModel.Primiti { internal AutoApprovedPrivateLinkService() { } public string PrivateLinkService { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AutoApprovedPrivateLinkService 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.Network.Models.AutoApprovedPrivateLinkService System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -9665,6 +9842,7 @@ public partial class AvailableDelegation : Azure.ResourceManager.Models.Resource internal AvailableDelegation() { } public System.Collections.Generic.IReadOnlyList Actions { get { throw null; } } public string ServiceName { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AvailableDelegation 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.Network.Models.AvailableDelegation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -9676,6 +9854,7 @@ public partial class AvailablePrivateEndpointType : Azure.ResourceManager.Models internal AvailablePrivateEndpointType() { } public string DisplayName { get { throw null; } } public string ResourceName { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AvailablePrivateEndpointType 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.Network.Models.AvailablePrivateEndpointType System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -9686,6 +9865,7 @@ public partial class AvailableProvidersList : System.ClientModel.Primitives.IJso { internal AvailableProvidersList() { } public System.Collections.Generic.IReadOnlyList Countries { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AvailableProvidersList 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.Network.Models.AvailableProvidersList System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -9697,6 +9877,7 @@ public partial class AvailableProvidersListCity : System.ClientModel.Primitives. internal AvailableProvidersListCity() { } public string CityName { get { throw null; } } public System.Collections.Generic.IReadOnlyList Providers { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AvailableProvidersListCity 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.Network.Models.AvailableProvidersListCity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -9710,6 +9891,7 @@ public AvailableProvidersListContent() { } public string City { get { throw null; } set { } } public string Country { get { throw null; } set { } } public string State { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AvailableProvidersListContent 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.Network.Models.AvailableProvidersListContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -9722,6 +9904,7 @@ internal AvailableProvidersListCountry() { } public string CountryName { get { throw null; } } public System.Collections.Generic.IReadOnlyList Providers { get { throw null; } } public System.Collections.Generic.IReadOnlyList States { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AvailableProvidersListCountry 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.Network.Models.AvailableProvidersListCountry System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -9734,6 +9917,7 @@ internal AvailableProvidersListState() { } public System.Collections.Generic.IReadOnlyList Cities { get { throw null; } } public System.Collections.Generic.IReadOnlyList Providers { get { throw null; } } public string StateName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AvailableProvidersListState 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.Network.Models.AvailableProvidersListState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -9744,6 +9928,7 @@ public partial class AvailableServiceAlias : Azure.ResourceManager.Models.Resour { internal AvailableServiceAlias() { } public string ResourceName { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AvailableServiceAlias 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.Network.Models.AvailableServiceAlias System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -9760,6 +9945,7 @@ public AzureFirewallApplicationRule() { } public System.Collections.Generic.IList SourceAddresses { get { throw null; } } public System.Collections.Generic.IList SourceIPGroups { get { throw null; } } public System.Collections.Generic.IList TargetFqdns { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AzureFirewallApplicationRule 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.Network.Models.AzureFirewallApplicationRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -9774,6 +9960,7 @@ public AzureFirewallApplicationRuleCollectionData() { } public int? Priority { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.Collections.Generic.IList Rules { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AzureFirewallApplicationRuleCollectionData 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.Network.Models.AzureFirewallApplicationRuleCollectionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -9785,6 +9972,7 @@ public partial class AzureFirewallApplicationRuleProtocol : System.ClientModel.P public AzureFirewallApplicationRuleProtocol() { } public int? Port { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.AzureFirewallApplicationRuleProtocolType? ProtocolType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AzureFirewallApplicationRuleProtocol 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.Network.Models.AzureFirewallApplicationRuleProtocol System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -9815,6 +10003,7 @@ public partial class AzureFirewallAutoscaleConfiguration : System.ClientModel.Pr public AzureFirewallAutoscaleConfiguration() { } public int? MaxCapacity { get { throw null; } set { } } public int? MinCapacity { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AzureFirewallAutoscaleConfiguration 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.Network.Models.AzureFirewallAutoscaleConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -9827,6 +10016,7 @@ public AzureFirewallFqdnTag() { } public Azure.ETag? ETag { get { throw null; } } public string FqdnTagName { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AzureFirewallFqdnTag 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.Network.Models.AzureFirewallFqdnTag System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -9841,6 +10031,7 @@ public AzureFirewallIPConfiguration() { } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public Azure.Core.ResourceIdentifier PublicIPAddressId { get { throw null; } set { } } public Azure.Core.ResourceIdentifier SubnetId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AzureFirewallIPConfiguration 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.Network.Models.AzureFirewallIPConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -9852,6 +10043,7 @@ public partial class AzureFirewallIPGroups : System.ClientModel.Primitives.IJson internal AzureFirewallIPGroups() { } public string ChangeNumber { get { throw null; } } public Azure.Core.ResourceIdentifier Id { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AzureFirewallIPGroups 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.Network.Models.AzureFirewallIPGroups System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -9889,6 +10081,7 @@ public AzureFirewallNatRule() { } public string TranslatedAddress { get { throw null; } set { } } public string TranslatedFqdn { get { throw null; } set { } } public string TranslatedPort { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AzureFirewallNatRule 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.Network.Models.AzureFirewallNatRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -9903,6 +10096,7 @@ public AzureFirewallNatRuleCollectionData() { } public int? Priority { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.Collections.Generic.IList Rules { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AzureFirewallNatRuleCollectionData 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.Network.Models.AzureFirewallNatRuleCollectionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -9921,6 +10115,7 @@ public AzureFirewallNetworkRule() { } public System.Collections.Generic.IList Protocols { get { throw null; } } public System.Collections.Generic.IList SourceAddresses { get { throw null; } } public System.Collections.Generic.IList SourceIPGroups { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AzureFirewallNetworkRule 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.Network.Models.AzureFirewallNetworkRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -9935,6 +10130,7 @@ public AzureFirewallNetworkRuleCollectionData() { } public int? Priority { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.Collections.Generic.IList Rules { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AzureFirewallNetworkRuleCollectionData 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.Network.Models.AzureFirewallNetworkRuleCollectionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -9965,6 +10161,7 @@ public partial class AzureFirewallPacketCaptureFlags : System.ClientModel.Primit { public AzureFirewallPacketCaptureFlags() { } public Azure.ResourceManager.Network.Models.AzureFirewallPacketCaptureFlagsType? FlagsType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AzureFirewallPacketCaptureFlags 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.Network.Models.AzureFirewallPacketCaptureFlags System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -9999,6 +10196,7 @@ public AzureFirewallPacketCaptureRule() { } public System.Collections.Generic.IList DestinationPorts { get { throw null; } } public System.Collections.Generic.IList Destinations { get { throw null; } } public System.Collections.Generic.IList Sources { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AzureFirewallPacketCaptureRule 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.Network.Models.AzureFirewallPacketCaptureRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10009,6 +10207,7 @@ public partial class AzureFirewallPublicIPAddress : System.ClientModel.Primitive { public AzureFirewallPublicIPAddress() { } public string Address { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AzureFirewallPublicIPAddress 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.Network.Models.AzureFirewallPublicIPAddress System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10038,6 +10237,7 @@ public partial class AzureFirewallSku : System.ClientModel.Primitives.IJsonModel public AzureFirewallSku() { } public Azure.ResourceManager.Network.Models.AzureFirewallSkuName? Name { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.AzureFirewallSkuTier? Tier { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AzureFirewallSku 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.Network.Models.AzureFirewallSku System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10106,6 +10306,7 @@ internal AzureReachabilityReport() { } public string AggregationLevel { get { throw null; } } public Azure.ResourceManager.Network.Models.AzureReachabilityReportLocation ProviderLocation { get { throw null; } } public System.Collections.Generic.IReadOnlyList ReachabilityReport { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AzureReachabilityReport 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.Network.Models.AzureReachabilityReport System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10120,6 +10321,7 @@ public AzureReachabilityReportContent(Azure.ResourceManager.Network.Models.Azure public Azure.ResourceManager.Network.Models.AzureReachabilityReportLocation ProviderLocation { get { throw null; } } public System.Collections.Generic.IList Providers { get { throw null; } } public System.DateTimeOffset StartOn { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AzureReachabilityReportContent 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.Network.Models.AzureReachabilityReportContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10132,6 +10334,7 @@ internal AzureReachabilityReportItem() { } public Azure.Core.AzureLocation? AzureLocation { get { throw null; } } public System.Collections.Generic.IReadOnlyList Latencies { get { throw null; } } public string Provider { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AzureReachabilityReportItem 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.Network.Models.AzureReachabilityReportItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10143,6 +10346,7 @@ public partial class AzureReachabilityReportLatencyInfo : System.ClientModel.Pri internal AzureReachabilityReportLatencyInfo() { } public int? Score { get { throw null; } } public System.DateTimeOffset? TimeStamp { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AzureReachabilityReportLatencyInfo 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.Network.Models.AzureReachabilityReportLatencyInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10155,6 +10359,7 @@ public AzureReachabilityReportLocation(string country) { } public string City { get { throw null; } set { } } public string Country { get { throw null; } set { } } public string State { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AzureReachabilityReportLocation 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.Network.Models.AzureReachabilityReportLocation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10165,6 +10370,7 @@ public partial class BackendAddressInboundNatRulePortMappings : System.ClientMod { internal BackendAddressInboundNatRulePortMappings() { } public System.Collections.Generic.IReadOnlyList InboundNatRulePortMappings { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.BackendAddressInboundNatRulePortMappings 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.Network.Models.BackendAddressInboundNatRulePortMappings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10197,6 +10403,7 @@ public BastionHostIPConfiguration() { } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public Azure.Core.ResourceIdentifier PublicIPAddressId { get { throw null; } set { } } public Azure.Core.ResourceIdentifier SubnetId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.BastionHostIPConfiguration 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.Network.Models.BastionHostIPConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10207,6 +10414,7 @@ public partial class BastionHostIPRule : System.ClientModel.Primitives.IJsonMode { public BastionHostIPRule() { } public string AddressPrefix { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.BastionHostIPRule 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.Network.Models.BastionHostIPRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10237,6 +10445,7 @@ public partial class BastionShareableLinkTokenListContent : System.ClientModel.P { public BastionShareableLinkTokenListContent() { } public System.Collections.Generic.IList Tokens { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.BastionShareableLinkTokenListContent 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.Network.Models.BastionShareableLinkTokenListContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10252,6 +10461,7 @@ public BgpCommunity() { } public bool? IsAuthorizedToUse { get { throw null; } set { } } public string ServiceGroup { get { throw null; } set { } } public string ServiceSupportedRegion { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.BgpCommunity 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.Network.Models.BgpCommunity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10290,6 +10500,7 @@ internal BgpPeerStatus() { } public string Neighbor { get { throw null; } } public long? RoutesReceived { get { throw null; } } public Azure.ResourceManager.Network.Models.BgpPeerState? State { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.BgpPeerStatus 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.Network.Models.BgpPeerStatus System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10300,6 +10511,7 @@ public partial class BgpPeerStatusListResult : System.ClientModel.Primitives.IJs { internal BgpPeerStatusListResult() { } public System.Collections.Generic.IReadOnlyList Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.BgpPeerStatusListResult 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.Network.Models.BgpPeerStatusListResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10311,6 +10523,7 @@ public partial class BgpServiceCommunity : Azure.ResourceManager.Network.Models. public BgpServiceCommunity() { } public System.Collections.Generic.IList BgpCommunities { get { throw null; } } public string ServiceName { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.BgpServiceCommunity 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.Network.Models.BgpServiceCommunity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10324,6 +10537,7 @@ public BgpSettings() { } public string BgpPeeringAddress { get { throw null; } set { } } public System.Collections.Generic.IList BgpPeeringAddresses { get { throw null; } } public int? PeerWeight { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.BgpSettings 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.Network.Models.BgpSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10336,6 +10550,7 @@ public BreakOutCategoryPolicies() { } public bool? Allow { get { throw null; } set { } } public bool? Default { get { throw null; } set { } } public bool? Optimize { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.BreakOutCategoryPolicies 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.Network.Models.BreakOutCategoryPolicies System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10346,6 +10561,7 @@ public partial class CheckPrivateLinkServiceVisibilityRequest : System.ClientMod { public CheckPrivateLinkServiceVisibilityRequest() { } public string PrivateLinkServiceAlias { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.CheckPrivateLinkServiceVisibilityRequest 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.Network.Models.CheckPrivateLinkServiceVisibilityRequest System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10434,6 +10650,7 @@ public ConnectionMonitorCreateOrUpdateContent() { } public System.Collections.Generic.IDictionary Tags { get { throw null; } } public System.Collections.Generic.IList TestConfigurations { get { throw null; } } public System.Collections.Generic.IList TestGroups { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ConnectionMonitorCreateOrUpdateContent 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.Network.Models.ConnectionMonitorCreateOrUpdateContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10446,6 +10663,7 @@ public ConnectionMonitorDestination() { } public string Address { get { throw null; } set { } } public int? Port { get { throw null; } set { } } public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ConnectionMonitorDestination 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.Network.Models.ConnectionMonitorDestination System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10464,6 +10682,7 @@ public ConnectionMonitorEndpoint(string name) { } public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.ConnectionMonitorEndpointScope Scope { get { throw null; } set { } } public System.Guid? SubscriptionId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ConnectionMonitorEndpoint 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.Network.Models.ConnectionMonitorEndpoint System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10475,6 +10694,7 @@ public partial class ConnectionMonitorEndpointFilter : System.ClientModel.Primit public ConnectionMonitorEndpointFilter() { } public Azure.ResourceManager.Network.Models.ConnectionMonitorEndpointFilterType? FilterType { get { throw null; } set { } } public System.Collections.Generic.IList Items { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ConnectionMonitorEndpointFilter 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.Network.Models.ConnectionMonitorEndpointFilter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10486,6 +10706,7 @@ public partial class ConnectionMonitorEndpointFilterItem : System.ClientModel.Pr public ConnectionMonitorEndpointFilterItem() { } public string Address { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.ConnectionMonitorEndpointFilterItemType? ItemType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ConnectionMonitorEndpointFilterItem 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.Network.Models.ConnectionMonitorEndpointFilterItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10531,6 +10752,7 @@ public partial class ConnectionMonitorEndpointScope : System.ClientModel.Primiti public ConnectionMonitorEndpointScope() { } public System.Collections.Generic.IList Exclude { get { throw null; } } public System.Collections.Generic.IList Include { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ConnectionMonitorEndpointScope 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.Network.Models.ConnectionMonitorEndpointScope System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10541,6 +10763,7 @@ public partial class ConnectionMonitorEndpointScopeItem : System.ClientModel.Pri { public ConnectionMonitorEndpointScopeItem() { } public string Address { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ConnectionMonitorEndpointScopeItem 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.Network.Models.ConnectionMonitorEndpointScopeItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10581,6 +10804,7 @@ public ConnectionMonitorHttpConfiguration() { } public bool? PreferHttps { get { throw null; } set { } } public System.Collections.Generic.IList RequestHeaders { get { throw null; } } public System.Collections.Generic.IList ValidStatusCodeRanges { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ConnectionMonitorHttpConfiguration 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.Network.Models.ConnectionMonitorHttpConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10592,6 +10816,7 @@ public partial class ConnectionMonitorOutput : System.ClientModel.Primitives.IJs public ConnectionMonitorOutput() { } public Azure.ResourceManager.Network.Models.OutputType? OutputType { get { throw null; } set { } } public Azure.Core.ResourceIdentifier WorkspaceResourceId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ConnectionMonitorOutput 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.Network.Models.ConnectionMonitorOutput System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10603,6 +10828,7 @@ public partial class ConnectionMonitorQueryResult : System.ClientModel.Primitive internal ConnectionMonitorQueryResult() { } public Azure.ResourceManager.Network.Models.ConnectionMonitorSourceStatus? SourceStatus { get { throw null; } } public System.Collections.Generic.IReadOnlyList States { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ConnectionMonitorQueryResult 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.Network.Models.ConnectionMonitorQueryResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10614,6 +10840,7 @@ public partial class ConnectionMonitorSource : System.ClientModel.Primitives.IJs public ConnectionMonitorSource(Azure.Core.ResourceIdentifier resourceId) { } public int? Port { get { throw null; } set { } } public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ConnectionMonitorSource 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.Network.Models.ConnectionMonitorSource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10644,6 +10871,7 @@ public partial class ConnectionMonitorSuccessThreshold : System.ClientModel.Prim public ConnectionMonitorSuccessThreshold() { } public int? ChecksFailedPercent { get { throw null; } set { } } public float? RoundTripTimeMs { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ConnectionMonitorSuccessThreshold 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.Network.Models.ConnectionMonitorSuccessThreshold System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10656,6 +10884,7 @@ public ConnectionMonitorTcpConfiguration() { } public Azure.ResourceManager.Network.Models.DestinationPortBehavior? DestinationPortBehavior { get { throw null; } set { } } public bool? DisableTraceRoute { get { throw null; } set { } } public int? Port { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ConnectionMonitorTcpConfiguration 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.Network.Models.ConnectionMonitorTcpConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10673,6 +10902,7 @@ public ConnectionMonitorTestConfiguration(string name, Azure.ResourceManager.Net public Azure.ResourceManager.Network.Models.ConnectionMonitorSuccessThreshold SuccessThreshold { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.ConnectionMonitorTcpConfiguration TcpConfiguration { get { throw null; } set { } } public int? TestFrequencySec { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ConnectionMonitorTestConfiguration 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.Network.Models.ConnectionMonitorTestConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10706,6 +10936,7 @@ public ConnectionMonitorTestGroup(string name, System.Collections.Generic.IEnume public string Name { get { throw null; } set { } } public System.Collections.Generic.IList Sources { get { throw null; } } public System.Collections.Generic.IList TestConfigurations { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ConnectionMonitorTestGroup 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.Network.Models.ConnectionMonitorTestGroup System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10734,6 +10965,7 @@ public partial class ConnectionResetSharedKey : System.ClientModel.Primitives.IJ { public ConnectionResetSharedKey(int keyLength) { } public int KeyLength { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ConnectionResetSharedKey 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.Network.Models.ConnectionResetSharedKey System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10744,6 +10976,7 @@ public partial class ConnectionSharedKey : Azure.ResourceManager.Network.Models. { public ConnectionSharedKey(string value) { } public string Value { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ConnectionSharedKey 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.Network.Models.ConnectionSharedKey System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10763,6 +10996,7 @@ internal ConnectionStateSnapshot() { } public long? ProbesFailed { get { throw null; } } public long? ProbesSent { get { throw null; } } public System.DateTimeOffset? StartOn { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ConnectionStateSnapshot 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.Network.Models.ConnectionStateSnapshot System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10777,6 +11011,7 @@ public ConnectivityContent(Azure.ResourceManager.Network.Models.ConnectivitySour public Azure.ResourceManager.Network.Models.NetworkIPVersion? PreferredIPVersion { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkWatcherProtocol? Protocol { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.ConnectivitySource Source { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ConnectivityContent 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.Network.Models.ConnectivityContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10789,6 +11024,7 @@ public ConnectivityDestination() { } public string Address { get { throw null; } set { } } public int? Port { get { throw null; } set { } } public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ConnectivityDestination 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.Network.Models.ConnectivityDestination System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10802,6 +11038,7 @@ public ConnectivityGroupItem(string networkGroupId, Azure.ResourceManager.Networ public Azure.ResourceManager.Network.Models.GlobalMeshSupportFlag? IsGlobal { get { throw null; } set { } } public string NetworkGroupId { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.HubGatewayUsageFlag? UseHubGateway { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ConnectivityGroupItem 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.Network.Models.ConnectivityGroupItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10820,6 +11057,7 @@ internal ConnectivityHopInfo() { } public System.Collections.Generic.IReadOnlyList PreviousHopIds { get { throw null; } } public System.Collections.Generic.IReadOnlyList PreviousLinks { get { throw null; } } public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ConnectivityHopInfo 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.Network.Models.ConnectivityHopInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10831,6 +11069,7 @@ public partial class ConnectivityHub : System.ClientModel.Primitives.IJsonModel< public ConnectivityHub() { } public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } set { } } public Azure.Core.ResourceType? ResourceType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ConnectivityHub 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.Network.Models.ConnectivityHub System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10847,6 +11086,7 @@ internal ConnectivityInformation() { } public Azure.ResourceManager.Network.Models.NetworkConnectionStatus? NetworkConnectionStatus { get { throw null; } } public int? ProbesFailed { get { throw null; } } public int? ProbesSent { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ConnectivityInformation 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.Network.Models.ConnectivityInformation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10860,6 +11100,7 @@ internal ConnectivityIssueInfo() { } public System.Collections.Generic.IReadOnlyList> Contexts { get { throw null; } } public Azure.ResourceManager.Network.Models.IssueOrigin? Origin { get { throw null; } } public Azure.ResourceManager.Network.Models.IssueSeverity? Severity { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ConnectivityIssueInfo 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.Network.Models.ConnectivityIssueInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10896,6 +11137,7 @@ public partial class ConnectivitySource : System.ClientModel.Primitives.IJsonMod public ConnectivitySource(Azure.Core.ResourceIdentifier resourceId) { } public int? Port { get { throw null; } set { } } public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ConnectivitySource 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.Network.Models.ConnectivitySource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10928,6 +11170,7 @@ public ContainerNetworkInterface() { } public Azure.ETag? ETag { get { throw null; } } public System.Collections.Generic.IReadOnlyList IPConfigurations { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ContainerNetworkInterface 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.Network.Models.ContainerNetworkInterface System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10941,6 +11184,7 @@ public ContainerNetworkInterfaceConfiguration() { } public Azure.ETag? ETag { get { throw null; } } public System.Collections.Generic.IList IPConfigurations { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ContainerNetworkInterfaceConfiguration 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.Network.Models.ContainerNetworkInterfaceConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10954,6 +11198,7 @@ internal ContainerNetworkInterfaceIPConfiguration() { } public Azure.ETag? ETag { get { throw null; } } public string Name { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ContainerNetworkInterfaceIPConfiguration 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.Network.Models.ContainerNetworkInterfaceIPConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10988,6 +11233,7 @@ internal CrossTenantScopes() { } public System.Collections.Generic.IReadOnlyList ManagementGroups { get { throw null; } } public System.Collections.Generic.IReadOnlyList Subscriptions { get { throw null; } } public System.Guid? TenantId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.CrossTenantScopes 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.Network.Models.CrossTenantScopes System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10999,6 +11245,7 @@ public partial class CustomDnsConfigProperties : System.ClientModel.Primitives.I public CustomDnsConfigProperties() { } public string Fqdn { get { throw null; } set { } } public System.Collections.Generic.IList IPAddresses { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.CustomDnsConfigProperties 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.Network.Models.CustomDnsConfigProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11081,6 +11328,7 @@ public DdosSettings() { } [System.ObsoleteAttribute("This property is obsolete and might be removed in a future version, please use `TagToIPAddresses` instead", false)] public Azure.ResourceManager.Network.Models.DdosSettingsProtectionCoverage? ProtectionCoverage { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.DdosSettingsProtectionMode? ProtectionMode { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.DdosSettings 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.Network.Models.DdosSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11168,6 +11416,7 @@ public DeviceProperties() { } public string DeviceModel { get { throw null; } set { } } public string DeviceVendor { get { throw null; } set { } } public int? LinkSpeedInMbps { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.DeviceProperties 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.Network.Models.DeviceProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11220,6 +11469,7 @@ public partial class DnsNameAvailabilityResult : System.ClientModel.Primitives.I { internal DnsNameAvailabilityResult() { } public bool? Available { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.DnsNameAvailabilityResult 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.Network.Models.DnsNameAvailabilityResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11232,6 +11482,7 @@ public DnsSettings() { } public bool? EnableProxy { get { throw null; } set { } } public bool? RequireProxyForNetworkRules { get { throw null; } set { } } public System.Collections.Generic.IList Servers { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.DnsSettings 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.Network.Models.DnsSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11247,6 +11498,7 @@ public DscpQosDefinition() { } public Azure.ResourceManager.Network.Models.ProtocolType? Protocol { get { throw null; } set { } } public System.Collections.Generic.IList SourceIPRanges { get { throw null; } } public System.Collections.Generic.IList SourcePortRanges { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.DscpQosDefinition 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.Network.Models.DscpQosDefinition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11261,6 +11513,7 @@ protected EffectiveBaseSecurityAdminRule() { } public System.Collections.Generic.IReadOnlyList RuleCollectionAppliesToGroups { get { throw null; } } public string RuleCollectionDescription { get { throw null; } } public System.Collections.Generic.IReadOnlyList RuleGroups { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.EffectiveBaseSecurityAdminRule 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.Network.Models.EffectiveBaseSecurityAdminRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11280,6 +11533,7 @@ internal EffectiveConnectivityConfiguration() { } public Azure.ResourceManager.Network.Models.GlobalMeshSupportFlag? IsGlobal { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.Guid? ResourceGuid { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.EffectiveConnectivityConfiguration 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.Network.Models.EffectiveConnectivityConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11301,6 +11555,7 @@ internal EffectiveDefaultSecurityAdminRule() { } public System.Guid? ResourceGuid { get { throw null; } } public System.Collections.Generic.IReadOnlyList SourcePortRanges { get { throw null; } } public System.Collections.Generic.IReadOnlyList Sources { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.EffectiveDefaultSecurityAdminRule 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.Network.Models.EffectiveDefaultSecurityAdminRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11317,6 +11572,7 @@ internal EffectiveNetworkSecurityGroup() { } [System.ObsoleteAttribute("This property is obsolete and might be removed in a future version, please use `TagToIPAddresses` instead", false)] public string TagMap { get { throw null; } } public System.Collections.Generic.IReadOnlyDictionary> TagToIPAddresses { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.EffectiveNetworkSecurityGroup 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.Network.Models.EffectiveNetworkSecurityGroup System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11329,6 +11585,7 @@ internal EffectiveNetworkSecurityGroupAssociation() { } public Azure.Core.ResourceIdentifier NetworkInterfaceId { get { throw null; } } public Azure.Core.ResourceIdentifier NetworkManagerId { get { throw null; } } public Azure.Core.ResourceIdentifier SubnetId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.EffectiveNetworkSecurityGroupAssociation 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.Network.Models.EffectiveNetworkSecurityGroupAssociation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11340,6 +11597,7 @@ public partial class EffectiveNetworkSecurityGroupListResult : System.ClientMode internal EffectiveNetworkSecurityGroupListResult() { } public string NextLink { get { throw null; } } public System.Collections.Generic.IReadOnlyList Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.EffectiveNetworkSecurityGroupListResult 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.Network.Models.EffectiveNetworkSecurityGroupListResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11364,6 +11622,7 @@ internal EffectiveNetworkSecurityRule() { } public System.Collections.Generic.IReadOnlyList SourceAddressPrefixes { get { throw null; } } public string SourcePortRange { get { throw null; } } public System.Collections.Generic.IReadOnlyList SourcePortRanges { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.EffectiveNetworkSecurityRule 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.Network.Models.EffectiveNetworkSecurityRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11380,6 +11639,7 @@ internal EffectiveRoute() { } public Azure.ResourceManager.Network.Models.RouteNextHopType? NextHopType { get { throw null; } } public Azure.ResourceManager.Network.Models.EffectiveRouteSource? Source { get { throw null; } } public Azure.ResourceManager.Network.Models.EffectiveRouteState? State { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.EffectiveRoute 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.Network.Models.EffectiveRoute System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11391,6 +11651,7 @@ public partial class EffectiveRouteListResult : System.ClientModel.Primitives.IJ internal EffectiveRouteListResult() { } public string NextLink { get { throw null; } } public System.Collections.Generic.IReadOnlyList Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.EffectiveRouteListResult 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.Network.Models.EffectiveRouteListResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11403,6 +11664,7 @@ internal EffectiveRouteMapRoute() { } public string AsPath { get { throw null; } } public string BgpCommunities { get { throw null; } } public string Prefix { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.EffectiveRouteMapRoute 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.Network.Models.EffectiveRouteMapRoute System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11413,6 +11675,7 @@ public partial class EffectiveRouteMapRouteList : System.ClientModel.Primitives. { internal EffectiveRouteMapRouteList() { } public System.Collections.Generic.IReadOnlyList Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.EffectiveRouteMapRouteList 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.Network.Models.EffectiveRouteMapRouteList System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11424,6 +11687,7 @@ public partial class EffectiveRoutesContent : System.ClientModel.Primitives.IJso public EffectiveRoutesContent() { } public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } set { } } public string VirtualWanResourceType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.EffectiveRoutesContent 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.Network.Models.EffectiveRoutesContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11482,6 +11746,7 @@ internal EffectiveSecurityAdminRule() { } public System.Guid? ResourceGuid { get { throw null; } } public System.Collections.Generic.IReadOnlyList SourcePortRanges { get { throw null; } } public System.Collections.Generic.IReadOnlyList Sources { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.EffectiveSecurityAdminRule 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.Network.Models.EffectiveSecurityAdminRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11513,6 +11778,7 @@ internal EndpointServiceResult() { } public Azure.Core.ResourceIdentifier Id { get { throw null; } } public string Name { get { throw null; } } public Azure.Core.ResourceType? ResourceType { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.EndpointServiceResult 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.Network.Models.EndpointServiceResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11526,6 +11792,7 @@ internal EvaluatedNetworkSecurityGroup() { } public Azure.ResourceManager.Network.Models.MatchedRule MatchedRule { get { throw null; } } public Azure.Core.ResourceIdentifier NetworkSecurityGroupId { get { throw null; } } public System.Collections.Generic.IReadOnlyList RulesEvaluationResult { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.EvaluatedNetworkSecurityGroup 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.Network.Models.EvaluatedNetworkSecurityGroup System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11560,6 +11827,7 @@ public ExceptionEntry(Azure.ResourceManager.Network.Models.ExceptionEntryMatchVa public Azure.ResourceManager.Network.Models.ExceptionEntrySelectorMatchOperator? SelectorMatchOperator { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.ExceptionEntryValueMatchOperator ValueMatchOperator { get { throw null; } set { } } public System.Collections.Generic.IList Values { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ExceptionEntry 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.Network.Models.ExceptionEntry System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11630,6 +11898,7 @@ public partial class ExclusionManagedRule : System.ClientModel.Primitives.IJsonM { public ExclusionManagedRule(string ruleId) { } public string RuleId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ExclusionManagedRule 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.Network.Models.ExclusionManagedRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11641,6 +11910,7 @@ public partial class ExclusionManagedRuleGroup : System.ClientModel.Primitives.I public ExclusionManagedRuleGroup(string ruleGroupName) { } public string RuleGroupName { get { throw null; } set { } } public System.Collections.Generic.IList Rules { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ExclusionManagedRuleGroup 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.Network.Models.ExclusionManagedRuleGroup System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11653,6 +11923,7 @@ public ExclusionManagedRuleSet(string ruleSetType, string ruleSetVersion) { } public System.Collections.Generic.IList RuleGroups { get { throw null; } } public string RuleSetType { get { throw null; } set { } } public string RuleSetVersion { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ExclusionManagedRuleSet 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.Network.Models.ExclusionManagedRuleSet System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11666,6 +11937,7 @@ internal ExpressRouteCircuitArpTable() { } public string Interface { get { throw null; } } public string IPAddress { get { throw null; } } public string MacAddress { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ExpressRouteCircuitArpTable 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.Network.Models.ExpressRouteCircuitArpTable System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11701,6 +11973,7 @@ public ExpressRouteCircuitPeeringConfig() { } public int? CustomerASN { get { throw null; } set { } } public int? LegacyMode { get { throw null; } set { } } public string RoutingRegistryName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ExpressRouteCircuitPeeringConfig 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.Network.Models.ExpressRouteCircuitPeeringConfig System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11733,6 +12006,7 @@ internal ExpressRouteCircuitRoutesTable() { } public string NextHop { get { throw null; } } public string Path { get { throw null; } } public int? Weight { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ExpressRouteCircuitRoutesTable 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.Network.Models.ExpressRouteCircuitRoutesTable System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11747,6 +12021,7 @@ internal ExpressRouteCircuitRoutesTableSummary() { } public string StatePfxRcd { get { throw null; } } public string UpDown { get { throw null; } } public int? V { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ExpressRouteCircuitRoutesTableSummary 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.Network.Models.ExpressRouteCircuitRoutesTableSummary System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11758,6 +12033,7 @@ public partial class ExpressRouteCircuitsArpTableListResult : System.ClientModel internal ExpressRouteCircuitsArpTableListResult() { } public string NextLink { get { throw null; } } public System.Collections.Generic.IReadOnlyList Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ExpressRouteCircuitsArpTableListResult 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.Network.Models.ExpressRouteCircuitsArpTableListResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11770,6 +12046,7 @@ public ExpressRouteCircuitServiceProviderProperties() { } public int? BandwidthInMbps { get { throw null; } set { } } public string PeeringLocation { get { throw null; } set { } } public string ServiceProviderName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ExpressRouteCircuitServiceProviderProperties 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.Network.Models.ExpressRouteCircuitServiceProviderProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11782,6 +12059,7 @@ public ExpressRouteCircuitSku() { } public Azure.ResourceManager.Network.Models.ExpressRouteCircuitSkuFamily? Family { get { throw null; } set { } } public string Name { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.ExpressRouteCircuitSkuTier? Tier { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ExpressRouteCircuitSku 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.Network.Models.ExpressRouteCircuitSku System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11831,6 +12109,7 @@ public partial class ExpressRouteCircuitsRoutesTableListResult : System.ClientMo internal ExpressRouteCircuitsRoutesTableListResult() { } public string NextLink { get { throw null; } } public System.Collections.Generic.IReadOnlyList Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ExpressRouteCircuitsRoutesTableListResult 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.Network.Models.ExpressRouteCircuitsRoutesTableListResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11842,6 +12121,7 @@ public partial class ExpressRouteCircuitsRoutesTableSummaryListResult : System.C internal ExpressRouteCircuitsRoutesTableSummaryListResult() { } public string NextLink { get { throw null; } } public System.Collections.Generic.IReadOnlyList Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ExpressRouteCircuitsRoutesTableSummaryListResult 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.Network.Models.ExpressRouteCircuitsRoutesTableSummaryListResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11855,6 +12135,7 @@ public ExpressRouteCircuitStats() { } public long? PrimarybytesOut { get { throw null; } set { } } public long? SecondarybytesIn { get { throw null; } set { } } public long? SecondarybytesOut { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ExpressRouteCircuitStats 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.Network.Models.ExpressRouteCircuitStats System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11868,6 +12149,7 @@ internal ExpressRouteCrossConnectionRoutesTableSummary() { } public string Neighbor { get { throw null; } } public string StateOrPrefixesReceived { get { throw null; } } public string UpDown { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ExpressRouteCrossConnectionRoutesTableSummary 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.Network.Models.ExpressRouteCrossConnectionRoutesTableSummary System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11879,6 +12161,7 @@ public partial class ExpressRouteCrossConnectionsRoutesTableSummaryListResult : internal ExpressRouteCrossConnectionsRoutesTableSummaryListResult() { } public string NextLink { get { throw null; } } public System.Collections.Generic.IReadOnlyList Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ExpressRouteCrossConnectionsRoutesTableSummaryListResult 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.Network.Models.ExpressRouteCrossConnectionsRoutesTableSummaryListResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11908,6 +12191,7 @@ public partial class ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds : public ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds() { } public int? Max { get { throw null; } set { } } public int? Min { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds 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.Network.Models.ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11995,6 +12279,7 @@ public ExpressRouteLinkMacSecConfig() { } public Azure.ResourceManager.Network.Models.ExpressRouteLinkMacSecCipher? Cipher { get { throw null; } set { } } public string CknSecretIdentifier { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.ExpressRouteLinkMacSecSciState? SciState { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ExpressRouteLinkMacSecConfig 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.Network.Models.ExpressRouteLinkMacSecConfig System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12115,6 +12400,7 @@ public partial class ExpressRoutePortsLocationBandwidths : System.ClientModel.Pr public ExpressRoutePortsLocationBandwidths() { } public string OfferName { get { throw null; } } public int? ValueInGbps { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ExpressRoutePortsLocationBandwidths 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.Network.Models.ExpressRoutePortsLocationBandwidths System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12127,6 +12413,7 @@ public ExpressRouteServiceProvider() { } public System.Collections.Generic.IList BandwidthsOffered { get { throw null; } } public System.Collections.Generic.IList PeeringLocations { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ExpressRouteServiceProvider 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.Network.Models.ExpressRouteServiceProvider System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12138,6 +12425,7 @@ public partial class ExpressRouteServiceProviderBandwidthsOffered : System.Clien public ExpressRouteServiceProviderBandwidthsOffered() { } public string OfferName { get { throw null; } set { } } public int? ValueInMbps { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ExpressRouteServiceProviderBandwidthsOffered 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.Network.Models.ExpressRouteServiceProviderBandwidthsOffered System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12171,6 +12459,7 @@ public FirewallPacketCaptureRequestContent() { } public int? NumberOfPacketsToCapture { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.AzureFirewallNetworkRuleProtocol? Protocol { get { throw null; } set { } } public System.Uri SasUri { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.FirewallPacketCaptureRequestContent 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.Network.Models.FirewallPacketCaptureRequestContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12182,6 +12471,7 @@ public partial class FirewallPolicyCertificateAuthority : System.ClientModel.Pri public FirewallPolicyCertificateAuthority() { } public string KeyVaultSecretId { get { throw null; } set { } } public string Name { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.FirewallPolicyCertificateAuthority 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.Network.Models.FirewallPolicyCertificateAuthority System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12197,6 +12487,7 @@ public FirewallPolicyExplicitProxy() { } public int? HttpsPort { get { throw null; } set { } } public string PacFile { get { throw null; } set { } } public int? PacFilePort { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.FirewallPolicyExplicitProxy 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.Network.Models.FirewallPolicyExplicitProxy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12226,6 +12517,7 @@ public partial class FirewallPolicyFilterRuleCollectionInfo : Azure.ResourceMana public FirewallPolicyFilterRuleCollectionInfo() { } public Azure.ResourceManager.Network.Models.FirewallPolicyFilterRuleCollectionActionType? ActionType { get { throw null; } set { } } public System.Collections.Generic.IList Rules { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.FirewallPolicyFilterRuleCollectionInfo 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.Network.Models.FirewallPolicyFilterRuleCollectionInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12237,6 +12529,7 @@ public partial class FirewallPolicyHttpHeaderToInsert : System.ClientModel.Primi public FirewallPolicyHttpHeaderToInsert() { } public string HeaderName { get { throw null; } set { } } public string HeaderValue { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.FirewallPolicyHttpHeaderToInsert 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.Network.Models.FirewallPolicyHttpHeaderToInsert System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12287,6 +12580,7 @@ public FirewallPolicyInsights() { } public bool? IsEnabled { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.FirewallPolicyLogAnalyticsResources LogAnalyticsResources { get { throw null; } set { } } public int? RetentionDays { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.FirewallPolicyInsights 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.Network.Models.FirewallPolicyInsights System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12299,6 +12593,7 @@ public FirewallPolicyIntrusionDetection() { } public Azure.ResourceManager.Network.Models.FirewallPolicyIntrusionDetectionConfiguration Configuration { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.FirewallPolicyIntrusionDetectionStateType? Mode { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.FirewallPolicyIntrusionDetectionProfileType? Profile { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.FirewallPolicyIntrusionDetection 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.Network.Models.FirewallPolicyIntrusionDetection System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12316,6 +12611,7 @@ public FirewallPolicyIntrusionDetectionBypassTrafficSpecifications() { } public Azure.ResourceManager.Network.Models.FirewallPolicyIntrusionDetectionProtocol? Protocol { get { throw null; } set { } } public System.Collections.Generic.IList SourceAddresses { get { throw null; } } public System.Collections.Generic.IList SourceIPGroups { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.FirewallPolicyIntrusionDetectionBypassTrafficSpecifications 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.Network.Models.FirewallPolicyIntrusionDetectionBypassTrafficSpecifications System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12328,6 +12624,7 @@ public FirewallPolicyIntrusionDetectionConfiguration() { } public System.Collections.Generic.IList BypassTrafficSettings { get { throw null; } } public System.Collections.Generic.IList PrivateRanges { get { throw null; } } public System.Collections.Generic.IList SignatureOverrides { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.FirewallPolicyIntrusionDetectionConfiguration 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.Network.Models.FirewallPolicyIntrusionDetectionConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12379,6 +12676,7 @@ public partial class FirewallPolicyIntrusionDetectionSignatureSpecification : Sy public FirewallPolicyIntrusionDetectionSignatureSpecification() { } public string Id { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.FirewallPolicyIntrusionDetectionStateType? Mode { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.FirewallPolicyIntrusionDetectionSignatureSpecification 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.Network.Models.FirewallPolicyIntrusionDetectionSignatureSpecification System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12409,6 +12707,7 @@ public partial class FirewallPolicyLogAnalyticsResources : System.ClientModel.Pr public FirewallPolicyLogAnalyticsResources() { } public Azure.Core.ResourceIdentifier DefaultWorkspaceIdId { get { throw null; } set { } } public System.Collections.Generic.IList Workspaces { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.FirewallPolicyLogAnalyticsResources 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.Network.Models.FirewallPolicyLogAnalyticsResources System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12420,6 +12719,7 @@ public partial class FirewallPolicyLogAnalyticsWorkspace : System.ClientModel.Pr public FirewallPolicyLogAnalyticsWorkspace() { } public string Region { get { throw null; } set { } } public Azure.Core.ResourceIdentifier WorkspaceIdId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.FirewallPolicyLogAnalyticsWorkspace 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.Network.Models.FirewallPolicyLogAnalyticsWorkspace System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12448,6 +12748,7 @@ public partial class FirewallPolicyNatRuleCollectionInfo : Azure.ResourceManager public FirewallPolicyNatRuleCollectionInfo() { } public Azure.ResourceManager.Network.Models.FirewallPolicyNatRuleCollectionActionType? ActionType { get { throw null; } set { } } public System.Collections.Generic.IList Rules { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.FirewallPolicyNatRuleCollectionInfo 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.Network.Models.FirewallPolicyNatRuleCollectionInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12459,6 +12760,7 @@ public abstract partial class FirewallPolicyRule : System.ClientModel.Primitives protected FirewallPolicyRule() { } public string Description { get { throw null; } set { } } public string Name { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.FirewallPolicyRule 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.Network.Models.FirewallPolicyRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12470,6 +12772,7 @@ public partial class FirewallPolicyRuleApplicationProtocol : System.ClientModel. public FirewallPolicyRuleApplicationProtocol() { } public int? Port { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.FirewallPolicyRuleApplicationProtocolType? ProtocolType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.FirewallPolicyRuleApplicationProtocol 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.Network.Models.FirewallPolicyRuleApplicationProtocol System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12499,6 +12802,7 @@ public abstract partial class FirewallPolicyRuleCollectionInfo : System.ClientMo protected FirewallPolicyRuleCollectionInfo() { } public string Name { get { throw null; } set { } } public int? Priority { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.FirewallPolicyRuleCollectionInfo 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.Network.Models.FirewallPolicyRuleCollectionInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12549,6 +12853,7 @@ public partial class FirewallPolicySnat : System.ClientModel.Primitives.IJsonMod public FirewallPolicySnat() { } public Azure.ResourceManager.Network.Models.AutoLearnPrivateRangesMode? AutoLearnPrivateRanges { get { throw null; } set { } } public System.Collections.Generic.IList PrivateRanges { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.FirewallPolicySnat 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.Network.Models.FirewallPolicySnat System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12560,6 +12865,7 @@ public partial class FirewallPolicyThreatIntelWhitelist : System.ClientModel.Pri public FirewallPolicyThreatIntelWhitelist() { } public System.Collections.Generic.IList Fqdns { get { throw null; } } public System.Collections.Generic.IList IPAddresses { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.FirewallPolicyThreatIntelWhitelist 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.Network.Models.FirewallPolicyThreatIntelWhitelist System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12594,6 +12900,7 @@ public FlowLogInformation(Azure.Core.ResourceIdentifier targetResourceId, Azure. public Azure.Core.ResourceIdentifier StorageId { get { throw null; } set { } } public Azure.Core.ResourceIdentifier TargetResourceId { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.TrafficAnalyticsConfigurationProperties TrafficAnalyticsConfiguration { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.FlowLogInformation 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.Network.Models.FlowLogInformation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12605,6 +12912,7 @@ public partial class FlowLogProperties : System.ClientModel.Primitives.IJsonMode public FlowLogProperties() { } public Azure.ResourceManager.Network.Models.FlowLogFormatType? FormatType { get { throw null; } set { } } public int? Version { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.FlowLogProperties 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.Network.Models.FlowLogProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12615,6 +12923,7 @@ public partial class FlowLogStatusContent : System.ClientModel.Primitives.IJsonM { public FlowLogStatusContent(Azure.Core.ResourceIdentifier targetResourceId) { } public Azure.Core.ResourceIdentifier TargetResourceId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.FlowLogStatusContent 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.Network.Models.FlowLogStatusContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12626,6 +12935,7 @@ public partial class GatewayCustomBgpIPAddressIPConfiguration : System.ClientMod public GatewayCustomBgpIPAddressIPConfiguration(string ipConfigurationId, string customBgpIPAddress) { } public string CustomBgpIPAddress { get { throw null; } set { } } public string IPConfigurationId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.GatewayCustomBgpIPAddressIPConfiguration 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.Network.Models.GatewayCustomBgpIPAddressIPConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12639,6 +12949,7 @@ public GatewayLoadBalancerTunnelInterface() { } public Azure.ResourceManager.Network.Models.GatewayLoadBalancerTunnelInterfaceType? InterfaceType { get { throw null; } set { } } public int? Port { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.GatewayLoadBalancerTunnelProtocol? Protocol { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.GatewayLoadBalancerTunnelInterface 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.Network.Models.GatewayLoadBalancerTunnelInterface System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12693,6 +13004,7 @@ internal GatewayRoute() { } public string Origin { get { throw null; } } public string SourcePeer { get { throw null; } } public int? Weight { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.GatewayRoute 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.Network.Models.GatewayRoute System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12703,6 +13015,7 @@ public partial class GatewayRouteListResult : System.ClientModel.Primitives.IJso { internal GatewayRouteListResult() { } public System.Collections.Generic.IReadOnlyList Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.GatewayRouteListResult 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.Network.Models.GatewayRouteListResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12713,6 +13026,7 @@ public partial class GenerateExpressRoutePortsLoaContent : System.ClientModel.Pr { public GenerateExpressRoutePortsLoaContent(string customerName) { } public string CustomerName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.GenerateExpressRoutePortsLoaContent 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.Network.Models.GenerateExpressRoutePortsLoaContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12723,6 +13037,7 @@ public partial class GenerateExpressRoutePortsLoaResult : System.ClientModel.Pri { internal GenerateExpressRoutePortsLoaResult() { } public string EncodedContent { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.GenerateExpressRoutePortsLoaResult 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.Network.Models.GenerateExpressRoutePortsLoaResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12734,6 +13049,7 @@ public partial class GetVpnSitesConfigurationContent : System.ClientModel.Primit public GetVpnSitesConfigurationContent(System.Uri outputBlobSasUri) { } public System.Uri OutputBlobSasUri { get { throw null; } } public System.Collections.Generic.IList VpnSites { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.GetVpnSitesConfigurationContent 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.Network.Models.GetVpnSitesConfigurationContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12762,6 +13078,7 @@ public partial class GroupByUserSession : System.ClientModel.Primitives.IJsonMod { public GroupByUserSession(System.Collections.Generic.IEnumerable groupByVariables) { } public System.Collections.Generic.IList GroupByVariables { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.GroupByUserSession 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.Network.Models.GroupByUserSession System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12772,6 +13089,7 @@ public partial class GroupByVariable : System.ClientModel.Primitives.IJsonModel< { public GroupByVariable(Azure.ResourceManager.Network.Models.ApplicationGatewayFirewallUserSessionVariable variableName) { } public Azure.ResourceManager.Network.Models.ApplicationGatewayFirewallUserSessionVariable VariableName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.GroupByVariable 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.Network.Models.GroupByVariable System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12802,6 +13120,7 @@ public HeaderValueMatcher() { } public bool? IgnoreCase { get { throw null; } set { } } public bool? Negate { get { throw null; } set { } } public string Pattern { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.HeaderValueMatcher 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.Network.Models.HeaderValueMatcher System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12819,6 +13138,7 @@ internal HopLink() { } public long? RoundTripTimeAvg { get { throw null; } } public long? RoundTripTimeMax { get { throw null; } } public long? RoundTripTimeMin { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.HopLink 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.Network.Models.HopLink System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12868,6 +13188,7 @@ public partial class HubIPAddresses : 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.Network.Models.HubIPAddresses System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12879,6 +13200,7 @@ public partial class HubPublicIPAddresses : System.ClientModel.Primitives.IJsonM public HubPublicIPAddresses() { } public System.Collections.Generic.IList Addresses { get { throw null; } } public int? Count { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.HubPublicIPAddresses 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.Network.Models.HubPublicIPAddresses System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12893,6 +13215,7 @@ public HubRoute(string name, string destinationType, System.Collections.Generic. public string Name { get { throw null; } set { } } public string NextHop { get { throw null; } set { } } public string NextHopType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.HubRoute 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.Network.Models.HubRoute System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12926,6 +13249,7 @@ public IdpsQueryContent() { } public int? ResultsPerPage { get { throw null; } set { } } public string Search { get { throw null; } set { } } public int? Skip { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.IdpsQueryContent 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.Network.Models.IdpsQueryContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12937,6 +13261,7 @@ public partial class IdpsQueryFilterItems : System.ClientModel.Primitives.IJsonM public IdpsQueryFilterItems() { } public string Field { get { throw null; } set { } } public System.Collections.Generic.IList Values { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.IdpsQueryFilterItems 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.Network.Models.IdpsQueryFilterItems System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12948,6 +13273,7 @@ public partial class IdpsQueryOrderBy : System.ClientModel.Primitives.IJsonModel public IdpsQueryOrderBy() { } public string Field { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.FirewallPolicyIdpsQuerySortOrder? Order { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.IdpsQueryOrderBy 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.Network.Models.IdpsQueryOrderBy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12959,6 +13285,7 @@ public partial class IdpsSignatureListResult : System.ClientModel.Primitives.IJs internal IdpsSignatureListResult() { } public long? MatchingRecordsCount { get { throw null; } } public System.Collections.Generic.IReadOnlyList Signatures { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.IdpsSignatureListResult 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.Network.Models.IdpsSignatureListResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12979,6 +13306,7 @@ internal IdpsSignatureResult() { } public Azure.ResourceManager.Network.Models.FirewallPolicyIdpsSignatureSeverity? Severity { get { throw null; } } public int? SignatureId { get { throw null; } } public System.Collections.Generic.IReadOnlyList SourcePorts { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.IdpsSignatureResult 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.Network.Models.IdpsSignatureResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -13037,6 +13365,7 @@ internal InboundNatRulePortMapping() { } public int? FrontendPort { get { throw null; } } public string InboundNatRuleName { get { throw null; } } public Azure.ResourceManager.Network.Models.LoadBalancingTransportProtocol? Protocol { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.InboundNatRulePortMapping 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.Network.Models.InboundNatRulePortMapping System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -13067,6 +13396,7 @@ public InboundSecurityRules() { } public string Name { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.InboundSecurityRulesProtocol? Protocol { get { throw null; } set { } } public string SourceAddressPrefix { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.InboundSecurityRules 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.Network.Models.InboundSecurityRules System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -13115,6 +13445,7 @@ internal IPAddressAvailabilityResult() { } public bool? Available { get { throw null; } } public System.Collections.Generic.IReadOnlyList AvailableIPAddresses { get { throw null; } } public bool? IsPlatformReserved { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.IPAddressAvailabilityResult 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.Network.Models.IPAddressAvailabilityResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -13215,6 +13546,7 @@ public IPsecPolicy(int saLifeTimeSeconds, int saDataSizeKilobytes, Azure.Resourc public Azure.ResourceManager.Network.Models.PfsGroup PfsGroup { get { throw null; } set { } } public int SaDataSizeKilobytes { get { throw null; } set { } } public int SaLifeTimeSeconds { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.IPsecPolicy 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.Network.Models.IPsecPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -13226,6 +13558,7 @@ public partial class IPTag : 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.Network.Models.IPTag System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -13237,6 +13570,7 @@ public partial class IPv6CircuitConnectionConfig : System.ClientModel.Primitives public IPv6CircuitConnectionConfig() { } public string AddressPrefix { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.CircuitConnectionStatus? CircuitConnectionStatus { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.IPv6CircuitConnectionConfig 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.Network.Models.IPv6CircuitConnectionConfig System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -13251,6 +13585,7 @@ public IPv6ExpressRouteCircuitPeeringConfig() { } public Azure.Core.ResourceIdentifier RouteFilterId { get { throw null; } set { } } public string SecondaryPeerAddressPrefix { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.ExpressRouteCircuitPeeringState? State { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.IPv6ExpressRouteCircuitPeeringConfig 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.Network.Models.IPv6ExpressRouteCircuitPeeringConfig System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -13298,6 +13633,7 @@ public partial class LearnedIPPrefixesListResult : System.ClientModel.Primitives { internal LearnedIPPrefixesListResult() { } public System.Collections.Generic.IReadOnlyList IPPrefixes { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.LearnedIPPrefixesListResult 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.Network.Models.LearnedIPPrefixesListResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -13315,6 +13651,7 @@ public LoadBalancerBackendAddress() { } public Azure.Core.ResourceIdentifier NetworkInterfaceIPConfigurationId { get { throw null; } } public Azure.Core.ResourceIdentifier SubnetId { get { throw null; } set { } } public Azure.Core.ResourceIdentifier VirtualNetworkId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.LoadBalancerBackendAddress 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.Network.Models.LoadBalancerBackendAddress System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -13356,6 +13693,7 @@ public LoadBalancerInboundNatPool() { } public int? IdleTimeoutInMinutes { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.LoadBalancingTransportProtocol? Protocol { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.LoadBalancerInboundNatPool 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.Network.Models.LoadBalancerInboundNatPool System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -13386,6 +13724,7 @@ public partial class LoadBalancerSku : System.ClientModel.Primitives.IJsonModel< public LoadBalancerSku() { } public Azure.ResourceManager.Network.Models.LoadBalancerSkuName? Name { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.LoadBalancerSkuTier? Tier { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.LoadBalancerSku 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.Network.Models.LoadBalancerSku System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -13433,6 +13772,7 @@ public partial class LoadBalancerVipSwapContent : System.ClientModel.Primitives. { public LoadBalancerVipSwapContent() { } public System.Collections.Generic.IList FrontendIPConfigurations { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.LoadBalancerVipSwapContent 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.Network.Models.LoadBalancerVipSwapContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -13444,6 +13784,7 @@ public partial class LoadBalancerVipSwapRequestFrontendIPConfiguration : System. public LoadBalancerVipSwapRequestFrontendIPConfiguration() { } public string Id { get { throw null; } set { } } public Azure.Core.ResourceIdentifier PublicIPAddressId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.LoadBalancerVipSwapRequestFrontendIPConfiguration 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.Network.Models.LoadBalancerVipSwapRequestFrontendIPConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -13511,6 +13852,7 @@ public partial class ManagedRuleGroupOverride : System.ClientModel.Primitives.IJ public ManagedRuleGroupOverride(string ruleGroupName) { } public string RuleGroupName { get { throw null; } set { } } public System.Collections.Generic.IList Rules { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ManagedRuleGroupOverride 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.Network.Models.ManagedRuleGroupOverride System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -13524,6 +13866,7 @@ public ManagedRuleOverride(string ruleId) { } public string RuleId { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.ManagedRuleSensitivityType? Sensitivity { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.ManagedRuleEnabledState? State { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ManagedRuleOverride 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.Network.Models.ManagedRuleOverride System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -13536,6 +13879,7 @@ public ManagedRulesDefinition(System.Collections.Generic.IEnumerable Exceptions { get { throw null; } } public System.Collections.Generic.IList Exclusions { get { throw null; } } public System.Collections.Generic.IList ManagedRuleSets { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ManagedRulesDefinition 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.Network.Models.ManagedRulesDefinition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -13568,6 +13912,7 @@ public ManagedRuleSet(string ruleSetType, string ruleSetVersion) { } public System.Collections.Generic.IList RuleGroupOverrides { get { throw null; } } public string RuleSetType { get { throw null; } set { } } public string RuleSetVersion { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ManagedRuleSet 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.Network.Models.ManagedRuleSet System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -13582,6 +13927,7 @@ public MatchCondition(System.Collections.Generic.IEnumerable Transforms { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.MatchCondition 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.Network.Models.MatchCondition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -13593,6 +13939,7 @@ public partial class MatchedRule : 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.Network.Models.MatchedRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -13604,6 +13951,7 @@ public partial class MatchVariable : 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.Network.Models.MatchVariable System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -13614,6 +13962,7 @@ public partial class MigrateLoadBalancerToIPBasedContent : System.ClientModel.Pr { public MigrateLoadBalancerToIPBasedContent() { } public System.Collections.Generic.IList Pools { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.MigrateLoadBalancerToIPBasedContent 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.Network.Models.MigrateLoadBalancerToIPBasedContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -13624,6 +13973,7 @@ public partial class MigrateLoadBalancerToIPBasedResult : System.ClientModel.Pri { internal MigrateLoadBalancerToIPBasedResult() { } public System.Collections.Generic.IReadOnlyList MigratedPools { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.MigrateLoadBalancerToIPBasedResult 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.Network.Models.MigrateLoadBalancerToIPBasedResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -13658,6 +14008,7 @@ public NatRule() { } public string TranslatedAddress { get { throw null; } set { } } public string TranslatedFqdn { get { throw null; } set { } } public string TranslatedPort { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NatRule 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.Network.Models.NatRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -13670,6 +14021,7 @@ internal NatRulePortMapping() { } public int? BackendPort { get { throw null; } } public int? FrontendPort { get { throw null; } } public string InboundNatRuleName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NatRulePortMapping 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.Network.Models.NatRulePortMapping System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -13708,6 +14060,7 @@ public NetworkAdminRule() { } public System.Guid? ResourceGuid { get { throw null; } } public System.Collections.Generic.IList SourcePortRanges { get { throw null; } } public System.Collections.Generic.IList Sources { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkAdminRule 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.Network.Models.NetworkAdminRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -13758,6 +14111,7 @@ public NetworkConfigurationDiagnosticContent(Azure.Core.ResourceIdentifier targe public System.Collections.Generic.IList Profiles { get { throw null; } } public Azure.Core.ResourceIdentifier TargetResourceId { get { throw null; } } public Azure.ResourceManager.Network.Models.VerbosityLevel? VerbosityLevel { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkConfigurationDiagnosticContent 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.Network.Models.NetworkConfigurationDiagnosticContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -13772,6 +14126,7 @@ public NetworkConfigurationDiagnosticProfile(Azure.ResourceManager.Network.Model public Azure.ResourceManager.Network.Models.NetworkTrafficDirection Direction { get { throw null; } set { } } public string Protocol { get { throw null; } set { } } public string Source { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkConfigurationDiagnosticProfile 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.Network.Models.NetworkConfigurationDiagnosticProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -13782,6 +14137,7 @@ public partial class NetworkConfigurationDiagnosticResponse : System.ClientModel { internal NetworkConfigurationDiagnosticResponse() { } public System.Collections.Generic.IReadOnlyList Results { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkConfigurationDiagnosticResponse 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.Network.Models.NetworkConfigurationDiagnosticResponse System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -13793,6 +14149,7 @@ public partial class NetworkConfigurationDiagnosticResult : System.ClientModel.P internal NetworkConfigurationDiagnosticResult() { } public Azure.ResourceManager.Network.Models.NetworkSecurityGroupResult NetworkSecurityGroupResult { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkConfigurationDiagnosticProfile Profile { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkConfigurationDiagnosticResult 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.Network.Models.NetworkConfigurationDiagnosticResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -13807,6 +14164,7 @@ internal NetworkConfigurationGroup() { } public Azure.ResourceManager.Network.Models.NetworkGroupMemberType? MemberType { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.Guid? ResourceGuid { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkConfigurationGroup 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.Network.Models.NetworkConfigurationGroup System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -13867,6 +14225,7 @@ public NetworkDefaultAdminRule() { } public System.Guid? ResourceGuid { get { throw null; } } public System.Collections.Generic.IReadOnlyList SourcePortRanges { get { throw null; } } public System.Collections.Generic.IReadOnlyList Sources { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkDefaultAdminRule 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.Network.Models.NetworkDefaultAdminRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -13897,6 +14256,7 @@ public NetworkHttpConfiguration() { } public System.Collections.Generic.IList Headers { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkWatcherHttpMethod? Method { get { throw null; } set { } } public System.Collections.Generic.IList ValidStatusCodes { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkHttpConfiguration 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.Network.Models.NetworkHttpConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -13925,6 +14285,7 @@ public partial class NetworkIntentPolicy : Azure.ResourceManager.Network.Models. { public NetworkIntentPolicy() { } public Azure.ETag? ETag { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkIntentPolicy 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.Network.Models.NetworkIntentPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -13955,6 +14316,7 @@ public partial class NetworkIntentPolicyConfiguration : System.ClientModel.Primi public NetworkIntentPolicyConfiguration() { } public string NetworkIntentPolicyName { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkIntentPolicy SourceNetworkIntentPolicy { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkIntentPolicyConfiguration 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.Network.Models.NetworkIntentPolicyConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -13966,6 +14328,7 @@ public partial class NetworkInterfaceAssociation : System.ClientModel.Primitives internal NetworkInterfaceAssociation() { } public Azure.Core.ResourceIdentifier Id { get { throw null; } } public System.Collections.Generic.IReadOnlyList SecurityRules { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkInterfaceAssociation 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.Network.Models.NetworkInterfaceAssociation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14021,6 +14384,7 @@ public NetworkInterfaceDnsSettings() { } public string InternalDnsNameLabel { get { throw null; } set { } } public string InternalDomainNameSuffix { get { throw null; } } public string InternalFqdn { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkInterfaceDnsSettings 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.Network.Models.NetworkInterfaceDnsSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14033,6 +14397,7 @@ internal NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties() { } public System.Collections.Generic.IReadOnlyList Fqdns { get { throw null; } } public string GroupId { get { throw null; } } public string RequiredMemberName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties 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.Network.Models.NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14123,6 +14488,7 @@ public NetworkIPConfiguration() { } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.Network.PublicIPAddressData PublicIPAddress { get { throw null; } set { } } public Azure.ResourceManager.Network.SubnetData Subnet { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkIPConfiguration 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.Network.Models.NetworkIPConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14136,6 +14502,7 @@ public NetworkIPConfigurationBgpPeeringAddress() { } public System.Collections.Generic.IReadOnlyList DefaultBgpIPAddresses { get { throw null; } } public string IPConfigurationId { get { throw null; } set { } } public System.Collections.Generic.IReadOnlyList TunnelIPAddresses { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkIPConfigurationBgpPeeringAddress 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.Network.Models.NetworkIPConfigurationBgpPeeringAddress System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14148,6 +14515,7 @@ public NetworkIPConfigurationProfile() { } public Azure.ETag? ETag { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.Network.SubnetData Subnet { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkIPConfigurationProfile 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.Network.Models.NetworkIPConfigurationProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14176,6 +14544,7 @@ public partial class NetworkManagementQueryContent : System.ClientModel.Primitiv { public NetworkManagementQueryContent() { } public string SkipToken { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkManagementQueryContent 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.Network.Models.NetworkManagementQueryContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14189,6 +14558,7 @@ public NetworkManagerCommit(System.Collections.Generic.IEnumerable targe public Azure.ResourceManager.Network.Models.NetworkConfigurationDeploymentType CommitType { get { throw null; } set { } } public System.Collections.Generic.IList ConfigurationIds { get { throw null; } } public System.Collections.Generic.IList TargetLocations { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkManagerCommit 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.Network.Models.NetworkManagerCommit System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14224,6 +14594,7 @@ internal NetworkManagerDeploymentStatus() { } public Azure.ResourceManager.Network.Models.NetworkConfigurationDeploymentType? DeploymentType { get { throw null; } } public string ErrorMessage { get { throw null; } } public string Region { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkManagerDeploymentStatus 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.Network.Models.NetworkManagerDeploymentStatus System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14236,6 +14607,7 @@ public NetworkManagerDeploymentStatusContent() { } public System.Collections.Generic.IList DeploymentTypes { get { throw null; } } public System.Collections.Generic.IList Regions { get { throw null; } } public string SkipToken { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkManagerDeploymentStatusContent 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.Network.Models.NetworkManagerDeploymentStatusContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14246,6 +14618,7 @@ public partial class NetworkManagerPatch : System.ClientModel.Primitives.IJsonMo { public NetworkManagerPatch() { } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkManagerPatch 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.Network.Models.NetworkManagerPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14258,6 +14631,7 @@ public NetworkManagerPropertiesNetworkManagerScopes() { } public System.Collections.Generic.IReadOnlyList CrossTenantScopes { get { throw null; } } public System.Collections.Generic.IList ManagementGroups { get { throw null; } } public System.Collections.Generic.IList Subscriptions { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkManagerPropertiesNetworkManagerScopes 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.Network.Models.NetworkManagerPropertiesNetworkManagerScopes System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14268,6 +14642,7 @@ public partial class NetworkManagerRoutingGroupItem : System.ClientModel.Primiti { public NetworkManagerRoutingGroupItem(string networkGroupId) { } public string NetworkGroupId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkManagerRoutingGroupItem 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.Network.Models.NetworkManagerRoutingGroupItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14278,6 +14653,7 @@ public partial class NetworkManagerSecurityGroupItem : System.ClientModel.Primit { public NetworkManagerSecurityGroupItem(Azure.Core.ResourceIdentifier networkGroupId) { } public Azure.Core.ResourceIdentifier NetworkGroupId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkManagerSecurityGroupItem 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.Network.Models.NetworkManagerSecurityGroupItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14293,6 +14669,7 @@ public NetworkPrivateLinkServiceConnection() { } public Azure.Core.ResourceIdentifier PrivateLinkServiceId { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public string RequestMessage { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkPrivateLinkServiceConnection 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.Network.Models.NetworkPrivateLinkServiceConnection System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14305,6 +14682,7 @@ public NetworkPrivateLinkServiceConnectionState() { } public string ActionsRequired { get { throw null; } set { } } public string Description { get { throw null; } set { } } public string Status { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkPrivateLinkServiceConnectionState 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.Network.Models.NetworkPrivateLinkServiceConnectionState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14337,6 +14715,7 @@ public NetworkResourceData() { } public Azure.Core.ResourceIdentifier Id { get { throw null; } set { } } public string Name { get { throw null; } set { } } public Azure.Core.ResourceType? ResourceType { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkResourceData 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.Network.Models.NetworkResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14353,6 +14732,7 @@ public NetworkRule() { } public System.Collections.Generic.IList IPProtocols { get { throw null; } } public System.Collections.Generic.IList SourceAddresses { get { throw null; } } public System.Collections.Generic.IList SourceIPGroups { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkRule 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.Network.Models.NetworkRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14364,6 +14744,7 @@ public partial class NetworkSecurityGroupResult : System.ClientModel.Primitives. internal NetworkSecurityGroupResult() { } public System.Collections.Generic.IReadOnlyList EvaluatedNetworkSecurityGroups { get { throw null; } } public Azure.ResourceManager.Network.Models.SecurityRuleAccess? SecurityRuleAccessResult { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkSecurityGroupResult 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.Network.Models.NetworkSecurityGroupResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14379,6 +14760,7 @@ internal NetworkSecurityRulesEvaluationResult() { } public bool? ProtocolMatched { get { throw null; } } public bool? SourceMatched { get { throw null; } } public bool? SourcePortMatched { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkSecurityRulesEvaluationResult 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.Network.Models.NetworkSecurityRulesEvaluationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14389,6 +14771,7 @@ public partial class NetworkSubResource : System.ClientModel.Primitives.IJsonMod { public NetworkSubResource() { } public Azure.Core.ResourceIdentifier Id { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkSubResource 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.Network.Models.NetworkSubResource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14399,6 +14782,7 @@ public partial class NetworkTagsObject : System.ClientModel.Primitives.IJsonMode { public NetworkTagsObject() { } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkTagsObject 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.Network.Models.NetworkTagsObject System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14412,6 +14796,7 @@ internal NetworkTopology() { } public string Id { get { throw null; } } public System.DateTimeOffset? LastModified { get { throw null; } } public System.Collections.Generic.IReadOnlyList Resources { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkTopology 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.Network.Models.NetworkTopology System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14426,6 +14811,7 @@ public NetworkTrackedResourceData() { } public string Name { get { throw null; } } public Azure.Core.ResourceType? ResourceType { get { throw null; } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkTrackedResourceData 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.Network.Models.NetworkTrackedResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14458,6 +14844,7 @@ internal NetworkUsage() { } public long Limit { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkUsageName Name { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkUsageUnit Unit { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkUsage 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.Network.Models.NetworkUsage System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14469,6 +14856,7 @@ public partial class NetworkUsageName : System.ClientModel.Primitives.IJsonModel internal NetworkUsageName() { } public string LocalizedValue { get { throw null; } } public string Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkUsageName 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.Network.Models.NetworkUsageName System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14496,6 +14884,7 @@ public partial class NetworkVirtualApplianceInstanceIds : System.ClientModel.Pri { public NetworkVirtualApplianceInstanceIds() { } public System.Collections.Generic.IList InstanceIds { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkVirtualApplianceInstanceIds 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.Network.Models.NetworkVirtualApplianceInstanceIds System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14507,6 +14896,7 @@ public partial class NetworkVirtualApplianceSkuInstances : System.ClientModel.Pr public NetworkVirtualApplianceSkuInstances() { } public int? InstanceCount { get { throw null; } } public string ScaleUnit { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkVirtualApplianceSkuInstances 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.Network.Models.NetworkVirtualApplianceSkuInstances System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14518,6 +14908,7 @@ public partial class NetworkWatcherHttpHeader : System.ClientModel.Primitives.IJ public NetworkWatcherHttpHeader() { } public string Name { get { throw null; } set { } } public string Value { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkWatcherHttpHeader 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.Network.Models.NetworkWatcherHttpHeader System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14567,6 +14958,7 @@ public NetworkWritableResourceData() { } public Azure.Core.ResourceIdentifier Id { get { throw null; } set { } } public string Name { get { throw null; } set { } } public Azure.Core.ResourceType? ResourceType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkWritableResourceData 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.Network.Models.NetworkWritableResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14580,6 +14972,7 @@ public NextHopContent(Azure.Core.ResourceIdentifier targetResourceId, string sou public string SourceIPAddress { get { throw null; } } public Azure.Core.ResourceIdentifier TargetNicResourceId { get { throw null; } set { } } public Azure.Core.ResourceIdentifier TargetResourceId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NextHopContent 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.Network.Models.NextHopContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14592,6 +14985,7 @@ internal NextHopResult() { } public string NextHopIPAddress { get { throw null; } } public Azure.ResourceManager.Network.Models.NextHopType? NextHopType { get { throw null; } } public Azure.Core.ResourceIdentifier RouteTableId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NextHopResult 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.Network.Models.NextHopResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14663,6 +15057,7 @@ public O365BreakOutCategoryPolicies() { } public bool? Allow { get { throw null; } set { } } public bool? Default { get { throw null; } set { } } public bool? Optimize { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.O365BreakOutCategoryPolicies 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.Network.Models.O365BreakOutCategoryPolicies System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14713,6 +15108,7 @@ public OwaspCrsExclusionEntry(Azure.ResourceManager.Network.Models.OwaspCrsExclu public Azure.ResourceManager.Network.Models.OwaspCrsExclusionEntryMatchVariable MatchVariable { get { throw null; } set { } } public string Selector { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.OwaspCrsExclusionEntrySelectorMatchOperator SelectorMatchOperator { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.OwaspCrsExclusionEntry 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.Network.Models.OwaspCrsExclusionEntry System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14775,6 +15171,7 @@ public P2SConnectionConfiguration() { } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.Network.Models.RoutingConfiguration RoutingConfiguration { get { throw null; } set { } } public System.Collections.Generic.IList VpnClientAddressPrefixes { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.P2SConnectionConfiguration 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.Network.Models.P2SConnectionConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14785,6 +15182,7 @@ public partial class P2SVpnConnectionHealth : System.ClientModel.Primitives.IJso { internal P2SVpnConnectionHealth() { } public System.Uri SasUri { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.P2SVpnConnectionHealth 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.Network.Models.P2SVpnConnectionHealth System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14796,6 +15194,7 @@ public partial class P2SVpnConnectionHealthContent : System.ClientModel.Primitiv public P2SVpnConnectionHealthContent() { } public System.Uri OutputBlobSasUri { get { throw null; } set { } } public System.Collections.Generic.IList VpnUserNamesFilter { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.P2SVpnConnectionHealthContent 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.Network.Models.P2SVpnConnectionHealthContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14806,6 +15205,7 @@ public partial class P2SVpnConnectionRequest : System.ClientModel.Primitives.IJs { public P2SVpnConnectionRequest() { } public System.Collections.Generic.IList VpnConnectionIds { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.P2SVpnConnectionRequest 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.Network.Models.P2SVpnConnectionRequest System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14816,6 +15216,7 @@ public partial class P2SVpnProfileContent : System.ClientModel.Primitives.IJsonM { public P2SVpnProfileContent() { } public Azure.ResourceManager.Network.Models.NetworkAuthenticationMethod? AuthenticationMethod { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.P2SVpnProfileContent 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.Network.Models.P2SVpnProfileContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14835,6 +15236,7 @@ public PacketCaptureCreateOrUpdateContent(string target, Azure.ResourceManager.N public Azure.ResourceManager.Network.Models.PacketCaptureTargetType? TargetType { get { throw null; } set { } } public int? TimeLimitInSeconds { get { throw null; } set { } } public long? TotalBytesPerSession { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.PacketCaptureCreateOrUpdateContent 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.Network.Models.PacketCaptureCreateOrUpdateContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14849,6 +15251,7 @@ public PacketCaptureFilter() { } public Azure.ResourceManager.Network.Models.PcProtocol? Protocol { get { throw null; } set { } } public string RemoteIPAddress { get { throw null; } set { } } public string RemotePort { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.PacketCaptureFilter 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.Network.Models.PacketCaptureFilter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14860,6 +15263,7 @@ public partial class PacketCaptureMachineScope : System.ClientModel.Primitives.I public PacketCaptureMachineScope() { } public System.Collections.Generic.IList Exclude { get { throw null; } } public System.Collections.Generic.IList Include { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.PacketCaptureMachineScope 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.Network.Models.PacketCaptureMachineScope System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14875,6 +15279,7 @@ internal PacketCaptureQueryStatusResult() { } public System.Collections.Generic.IReadOnlyList PacketCaptureError { get { throw null; } } public Azure.ResourceManager.Network.Models.PcStatus? PacketCaptureStatus { get { throw null; } } public string StopReason { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.PacketCaptureQueryStatusResult 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.Network.Models.PacketCaptureQueryStatusResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14887,6 +15292,7 @@ public PacketCaptureSettings() { } public int? FileCount { get { throw null; } set { } } public long? FileSizeInBytes { get { throw null; } set { } } public int? SessionTimeLimitInSeconds { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.PacketCaptureSettings 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.Network.Models.PacketCaptureSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14900,6 +15306,7 @@ public PacketCaptureStorageLocation() { } public string LocalPath { get { throw null; } set { } } public Azure.Core.ResourceIdentifier StorageId { get { throw null; } set { } } public string StoragePath { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.PacketCaptureStorageLocation 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.Network.Models.PacketCaptureStorageLocation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14917,6 +15324,7 @@ public PartnerManagedResourceProperties() { } public Azure.Core.ResourceIdentifier Id { get { throw null; } } public Azure.Core.ResourceIdentifier InternalLoadBalancerId { get { throw null; } } public Azure.Core.ResourceIdentifier StandardLoadBalancerId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.PartnerManagedResourceProperties 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.Network.Models.PartnerManagedResourceProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14994,6 +15402,7 @@ internal PeerRoute() { } public string Origin { get { throw null; } } public string SourcePeer { get { throw null; } } public int? Weight { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.PeerRoute 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.Network.Models.PeerRoute System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -15047,6 +15456,7 @@ public PolicySettings() { } public bool? RequestBodyEnforcement { get { throw null; } set { } } public int? RequestBodyInspectLimitInKB { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.WebApplicationFirewallEnabledState? State { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.PolicySettings 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.Network.Models.PolicySettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -15058,6 +15468,7 @@ public partial class PolicySettingsLogScrubbing : System.ClientModel.Primitives. public PolicySettingsLogScrubbing() { } public System.Collections.Generic.IList ScrubbingRules { get { throw null; } } public Azure.ResourceManager.Network.Models.WebApplicationFirewallScrubbingState? State { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.PolicySettingsLogScrubbing 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.Network.Models.PolicySettingsLogScrubbing System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -15088,6 +15499,7 @@ public partial class PrepareNetworkPoliciesContent : System.ClientModel.Primitiv public PrepareNetworkPoliciesContent() { } public System.Collections.Generic.IList NetworkIntentPolicyConfigurations { get { throw null; } } public string ServiceName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.PrepareNetworkPoliciesContent 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.Network.Models.PrepareNetworkPoliciesContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -15100,6 +15512,7 @@ public PrivateDnsZoneConfig() { } public string Name { get { throw null; } set { } } public string PrivateDnsZoneId { get { throw null; } set { } } public System.Collections.Generic.IReadOnlyList RecordSets { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.PrivateDnsZoneConfig 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.Network.Models.PrivateDnsZoneConfig System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -15115,6 +15528,7 @@ public PrivateEndpointIPConfiguration() { } public string Name { get { throw null; } set { } } public string PrivateEndpointIPConfigurationType { get { throw null; } } public System.Net.IPAddress PrivateIPAddress { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.PrivateEndpointIPConfiguration 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.Network.Models.PrivateEndpointIPConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -15149,6 +15563,7 @@ public PrivateLinkServiceIPConfiguration() { } public Azure.ResourceManager.Network.Models.NetworkIPAllocationMethod? PrivateIPAllocationMethod { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.Network.SubnetData Subnet { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.PrivateLinkServiceIPConfiguration 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.Network.Models.PrivateLinkServiceIPConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -15159,6 +15574,7 @@ public partial class PrivateLinkServiceVisibility : System.ClientModel.Primitive { internal PrivateLinkServiceVisibility() { } public bool? Visible { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.PrivateLinkServiceVisibility 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.Network.Models.PrivateLinkServiceVisibility System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -15225,6 +15641,7 @@ public partial class PropagatedRouteTable : System.ClientModel.Primitives.IJsonM public PropagatedRouteTable() { } public System.Collections.Generic.IList Ids { get { throw null; } } public System.Collections.Generic.IList Labels { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.PropagatedRouteTable 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.Network.Models.PropagatedRouteTable System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -15285,6 +15702,7 @@ public PublicIPAddressDnsSettings() { } public Azure.ResourceManager.Network.Models.PublicIPAddressDnsSettingsDomainNameLabelScope? DomainNameLabelScope { get { throw null; } set { } } public string Fqdn { get { throw null; } set { } } public string ReverseFqdn { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.PublicIPAddressDnsSettings 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.Network.Models.PublicIPAddressDnsSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -15324,6 +15742,7 @@ public partial class PublicIPAddressSku : System.ClientModel.Primitives.IJsonMod public PublicIPAddressSku() { } public Azure.ResourceManager.Network.Models.PublicIPAddressSkuName? Name { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.PublicIPAddressSkuTier? Tier { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.PublicIPAddressSku 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.Network.Models.PublicIPAddressSku System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -15373,6 +15792,7 @@ internal PublicIPDdosProtectionStatusResult() { } public Azure.ResourceManager.Network.Models.WorkloadProtectedFlag? IsWorkloadProtected { get { throw null; } } public System.Net.IPAddress PublicIPAddress { get { throw null; } } public Azure.Core.ResourceIdentifier PublicIPAddressId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.PublicIPDdosProtectionStatusResult 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.Network.Models.PublicIPDdosProtectionStatusResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -15384,6 +15804,7 @@ public partial class PublicIPPrefixSku : System.ClientModel.Primitives.IJsonMode public PublicIPPrefixSku() { } public Azure.ResourceManager.Network.Models.PublicIPPrefixSkuName? Name { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.PublicIPPrefixSkuTier? Tier { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.PublicIPPrefixSku 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.Network.Models.PublicIPPrefixSku System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -15430,6 +15851,7 @@ public partial class QosIPRange : 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.Network.Models.QosIPRange System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -15441,6 +15863,7 @@ public partial class QosPortRange : 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.Network.Models.QosPortRange System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -15452,6 +15875,7 @@ public partial class QueryInboundNatRulePortMappingContent : System.ClientModel. public QueryInboundNatRulePortMappingContent() { } public string IPAddress { get { throw null; } set { } } public Azure.Core.ResourceIdentifier IPConfigurationId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.QueryInboundNatRulePortMappingContent 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.Network.Models.QueryInboundNatRulePortMappingContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -15462,6 +15886,7 @@ public partial class QueryTroubleshootingContent : System.ClientModel.Primitives { public QueryTroubleshootingContent(Azure.Core.ResourceIdentifier targetResourceId) { } public Azure.Core.ResourceIdentifier TargetResourceId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.QueryTroubleshootingContent 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.Network.Models.QueryTroubleshootingContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -15474,6 +15899,7 @@ public RadiusServer(string radiusServerAddress) { } public string RadiusServerAddress { get { throw null; } set { } } public long? RadiusServerScore { get { throw null; } set { } } public string RadiusServerSecret { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.RadiusServer 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.Network.Models.RadiusServer System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -15489,6 +15915,7 @@ internal RecordSet() { } public string RecordSetName { get { throw null; } } public string RecordType { get { throw null; } } public int? Ttl { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.RecordSet 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.Network.Models.RecordSet System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -15502,6 +15929,7 @@ public ResourceNavigationLink() { } public Azure.Core.ResourceIdentifier Link { get { throw null; } set { } } public Azure.Core.ResourceType? LinkedResourceType { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ResourceNavigationLink 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.Network.Models.ResourceNavigationLink System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -15513,6 +15941,7 @@ public partial class RetentionPolicyParameters : System.ClientModel.Primitives.I public RetentionPolicyParameters() { } public int? Days { get { throw null; } set { } } public bool? Enabled { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.RetentionPolicyParameters 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.Network.Models.RetentionPolicyParameters System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -15526,6 +15955,7 @@ public RouteCriterion() { } public System.Collections.Generic.IList Community { get { throw null; } } public Azure.ResourceManager.Network.Models.RouteMapMatchCondition? MatchCondition { get { throw null; } set { } } public System.Collections.Generic.IList RoutePrefix { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.RouteCriterion 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.Network.Models.RouteCriterion System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -15554,6 +15984,7 @@ public partial class RouteMapAction : System.ClientModel.Primitives.IJsonModel Parameters { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.RouteMapAction 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.Network.Models.RouteMapAction System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -15566,6 +15997,7 @@ public RouteMapActionParameter() { } public System.Collections.Generic.IList AsPath { get { throw null; } } public System.Collections.Generic.IList Community { get { throw null; } } public System.Collections.Generic.IList RoutePrefix { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.RouteMapActionParameter 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.Network.Models.RouteMapActionParameter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -15640,6 +16072,7 @@ public RouteMapRule() { } public System.Collections.Generic.IList MatchCriteria { get { throw null; } } public string Name { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.RouteMapNextStepBehavior? NextStepIfMatched { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.RouteMapRule 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.Network.Models.RouteMapRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -15678,6 +16111,7 @@ public RoutingConfiguration() { } [System.ObsoleteAttribute("This property is obsolete and might be removed in a future version, please use `TagToIPAddresses` instead", false)] public System.Collections.Generic.IList StaticRoutes { get { throw null; } } public Azure.ResourceManager.Network.Models.VnetRoute VnetRoutes { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.RoutingConfiguration 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.Network.Models.RoutingConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -15715,6 +16149,7 @@ public RoutingPolicy(string name, System.Collections.Generic.IEnumerable public System.Collections.Generic.IList Destinations { get { throw null; } } public string Name { get { throw null; } set { } } public string NextHop { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.RoutingPolicy 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.Network.Models.RoutingPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -15744,6 +16179,7 @@ public partial class RoutingRuleNextHop : System.ClientModel.Primitives.IJsonMod public RoutingRuleNextHop(Azure.ResourceManager.Network.Models.RoutingRuleNextHopType nextHopType) { } public string NextHopAddress { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.RoutingRuleNextHopType NextHopType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.RoutingRuleNextHop 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.Network.Models.RoutingRuleNextHop System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -15776,6 +16212,7 @@ public partial class RoutingRuleRouteDestination : System.ClientModel.Primitives public RoutingRuleRouteDestination(Azure.ResourceManager.Network.Models.RoutingRuleDestinationType destinationType, string destinationAddress) { } public string DestinationAddress { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.RoutingRuleDestinationType DestinationType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.RoutingRuleRouteDestination 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.Network.Models.RoutingRuleRouteDestination System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -15966,6 +16403,7 @@ public partial class SecurityGroupNetworkInterface : System.ClientModel.Primitiv internal SecurityGroupNetworkInterface() { } public string Id { get { throw null; } } public Azure.ResourceManager.Network.Models.SecurityRuleAssociations SecurityRuleAssociations { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.SecurityGroupNetworkInterface 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.Network.Models.SecurityGroupNetworkInterface System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -15976,6 +16414,7 @@ public partial class SecurityGroupViewContent : System.ClientModel.Primitives.IJ { public SecurityGroupViewContent(Azure.Core.ResourceIdentifier targetResourceId) { } public Azure.Core.ResourceIdentifier TargetResourceId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.SecurityGroupViewContent 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.Network.Models.SecurityGroupViewContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -15986,6 +16425,7 @@ public partial class SecurityGroupViewResult : System.ClientModel.Primitives.IJs { internal SecurityGroupViewResult() { } public System.Collections.Generic.IReadOnlyList NetworkInterfaces { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.SecurityGroupViewResult 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.Network.Models.SecurityGroupViewResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16056,6 +16496,7 @@ internal SecurityRuleAssociations() { } public System.Collections.Generic.IReadOnlyList EffectiveSecurityRules { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkInterfaceAssociation NetworkInterfaceAssociation { get { throw null; } } public Azure.ResourceManager.Network.Models.SubnetAssociation SubnetAssociation { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.SecurityRuleAssociations 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.Network.Models.SecurityRuleAssociations System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16106,6 +16547,7 @@ public partial class SecurityUserGroupItem : System.ClientModel.Primitives.IJson { public SecurityUserGroupItem(string networkGroupId) { } public string NetworkGroupId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.SecurityUserGroupItem 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.Network.Models.SecurityUserGroupItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16121,6 +16563,7 @@ public ServiceAssociationLink() { } public Azure.Core.ResourceType? LinkedResourceType { get { throw null; } set { } } public System.Collections.Generic.IList Locations { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ServiceAssociationLink 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.Network.Models.ServiceAssociationLink System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16134,6 +16577,7 @@ public ServiceDelegation() { } public Azure.ETag? ETag { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public string ServiceName { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ServiceDelegation 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.Network.Models.ServiceDelegation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16147,6 +16591,7 @@ public ServiceEndpointProperties() { } public Azure.Core.ResourceIdentifier NetworkIdentifierId { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public string Service { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ServiceEndpointProperties 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.Network.Models.ServiceEndpointProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16180,6 +16625,7 @@ internal ServiceTagInformation() { } public string Name { get { throw null; } } public Azure.ResourceManager.Network.Models.ServiceTagInformationPropertiesFormat Properties { get { throw null; } } public string ServiceTagChangeNumber { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ServiceTagInformation 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.Network.Models.ServiceTagInformation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16194,6 +16640,7 @@ internal ServiceTagInformationPropertiesFormat() { } public string Region { get { throw null; } } public string State { get { throw null; } } public string SystemService { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ServiceTagInformationPropertiesFormat 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.Network.Models.ServiceTagInformationPropertiesFormat System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16207,6 +16654,7 @@ internal ServiceTagsListResult() { } public string Cloud { get { throw null; } } public string NextLink { get { throw null; } } public System.Collections.Generic.IReadOnlyList Values { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ServiceTagsListResult 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.Network.Models.ServiceTagsListResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16235,6 +16683,7 @@ public partial class SignatureOverridesFilterValuesQueryContent : System.ClientM { public SignatureOverridesFilterValuesQueryContent() { } public string FilterName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.SignatureOverridesFilterValuesQueryContent 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.Network.Models.SignatureOverridesFilterValuesQueryContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16245,6 +16694,7 @@ public partial class SignatureOverridesFilterValuesResult : System.ClientModel.P { internal SignatureOverridesFilterValuesResult() { } public System.Collections.Generic.IReadOnlyList FilterValues { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.SignatureOverridesFilterValuesResult 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.Network.Models.SignatureOverridesFilterValuesResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16257,6 +16707,7 @@ public StaticRoute() { } public System.Collections.Generic.IList AddressPrefixes { get { throw null; } } public string Name { get { throw null; } set { } } public string NextHopIPAddress { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.StaticRoute 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.Network.Models.StaticRoute System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16268,6 +16719,7 @@ public partial class StaticRoutesConfig : System.ClientModel.Primitives.IJsonMod public StaticRoutesConfig() { } public bool? PropagateStaticRoutes { get { throw null; } } public Azure.ResourceManager.Network.Models.VnetLocalRouteOverrideCriterion? VnetLocalRouteOverrideCriteria { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.StaticRoutesConfig 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.Network.Models.StaticRoutesConfig System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16279,6 +16731,7 @@ public partial class SubnetAssociation : System.ClientModel.Primitives.IJsonMode internal SubnetAssociation() { } public Azure.Core.ResourceIdentifier Id { get { throw null; } } public System.Collections.Generic.IReadOnlyList SecurityRules { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.SubnetAssociation 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.Network.Models.SubnetAssociation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16331,6 +16784,7 @@ internal TopologyAssociation() { } public Azure.ResourceManager.Network.Models.AssociationType? AssociationType { get { throw null; } } public string Name { get { throw null; } } public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.TopologyAssociation 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.Network.Models.TopologyAssociation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16343,6 +16797,7 @@ public TopologyContent() { } public string TargetResourceGroupName { get { throw null; } set { } } public Azure.Core.ResourceIdentifier TargetSubnetId { get { throw null; } set { } } public Azure.Core.ResourceIdentifier TargetVirtualNetworkId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.TopologyContent 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.Network.Models.TopologyContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16356,6 +16811,7 @@ internal TopologyResourceInfo() { } public string Id { get { throw null; } } public Azure.Core.AzureLocation? Location { get { throw null; } } public string Name { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.TopologyResourceInfo 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.Network.Models.TopologyResourceInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16370,6 +16826,7 @@ public TrafficAnalyticsConfigurationProperties() { } public string WorkspaceId { get { throw null; } set { } } public string WorkspaceRegion { get { throw null; } set { } } public Azure.Core.ResourceIdentifier WorkspaceResourceId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.TrafficAnalyticsConfigurationProperties 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.Network.Models.TrafficAnalyticsConfigurationProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16381,6 +16838,7 @@ public partial class TrafficSelectorPolicy : System.ClientModel.Primitives.IJson public TrafficSelectorPolicy(System.Collections.Generic.IEnumerable localAddressRanges, System.Collections.Generic.IEnumerable remoteAddressRanges) { } public System.Collections.Generic.IList LocalAddressRanges { get { throw null; } } public System.Collections.Generic.IList RemoteAddressRanges { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.TrafficSelectorPolicy 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.Network.Models.TrafficSelectorPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16393,6 +16851,7 @@ public TroubleshootingContent(Azure.Core.ResourceIdentifier targetResourceId, Az public Azure.Core.ResourceIdentifier StorageId { get { throw null; } } public System.Uri StorageUri { get { throw null; } } public Azure.Core.ResourceIdentifier TargetResourceId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.TroubleshootingContent 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.Network.Models.TroubleshootingContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16407,6 +16866,7 @@ internal TroubleshootingDetails() { } public string ReasonType { get { throw null; } } public System.Collections.Generic.IReadOnlyList RecommendedActions { get { throw null; } } public string Summary { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.TroubleshootingDetails 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.Network.Models.TroubleshootingDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16420,6 +16880,7 @@ internal TroubleshootingRecommendedActions() { } public string ActionText { get { throw null; } } public System.Uri ActionUri { get { throw null; } } public string ActionUriText { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.TroubleshootingRecommendedActions 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.Network.Models.TroubleshootingRecommendedActions System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16433,6 +16894,7 @@ internal TroubleshootingResult() { } public System.DateTimeOffset? EndOn { get { throw null; } } public System.Collections.Generic.IReadOnlyList Results { get { throw null; } } public System.DateTimeOffset? StartOn { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.TroubleshootingResult 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.Network.Models.TroubleshootingResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16447,6 +16909,7 @@ internal TunnelConnectionHealth() { } public long? IngressBytesTransferred { get { throw null; } } public string LastConnectionEstablishedOn { get { throw null; } } public string Tunnel { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.TunnelConnectionHealth 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.Network.Models.TunnelConnectionHealth System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16457,6 +16920,7 @@ public partial class UnprepareNetworkPoliciesContent : System.ClientModel.Primit { public UnprepareNetworkPoliciesContent() { } public string ServiceName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.UnprepareNetworkPoliciesContent 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.Network.Models.UnprepareNetworkPoliciesContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16493,6 +16957,7 @@ public VerificationIPFlowContent(Azure.Core.ResourceIdentifier targetResourceId, public string RemotePort { get { throw null; } } public Azure.Core.ResourceIdentifier TargetNicResourceId { get { throw null; } set { } } public Azure.Core.ResourceIdentifier TargetResourceId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VerificationIPFlowContent 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.Network.Models.VerificationIPFlowContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16504,6 +16969,7 @@ public partial class VerificationIPFlowResult : System.ClientModel.Primitives.IJ internal VerificationIPFlowResult() { } public Azure.ResourceManager.Network.Models.NetworkAccess? Access { get { throw null; } } public string RuleName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VerificationIPFlowResult 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.Network.Models.VerificationIPFlowResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16515,6 +16981,7 @@ public partial class VirtualApplianceAdditionalNicProperties : System.ClientMode public VirtualApplianceAdditionalNicProperties() { } public bool? HasPublicIP { get { throw null; } set { } } public string Name { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VirtualApplianceAdditionalNicProperties 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.Network.Models.VirtualApplianceAdditionalNicProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16526,6 +16993,7 @@ public partial class VirtualApplianceDelegationProperties : System.ClientModel.P public VirtualApplianceDelegationProperties() { } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public string ServiceName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VirtualApplianceDelegationProperties 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.Network.Models.VirtualApplianceDelegationProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16537,6 +17005,7 @@ public partial class VirtualApplianceIPConfiguration : System.ClientModel.Primit public VirtualApplianceIPConfiguration() { } public bool? IsPrimary { get { throw null; } set { } } public string Name { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VirtualApplianceIPConfiguration 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.Network.Models.VirtualApplianceIPConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16548,6 +17017,7 @@ public partial class VirtualApplianceNetworkInterfaceConfiguration : System.Clie public VirtualApplianceNetworkInterfaceConfiguration() { } public Azure.ResourceManager.Network.Models.NicTypeInRequest? NicType { get { throw null; } set { } } public System.Collections.Generic.IList VirtualApplianceNetworkInterfaceIPConfigurations { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VirtualApplianceNetworkInterfaceConfiguration 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.Network.Models.VirtualApplianceNetworkInterfaceConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16562,6 +17032,7 @@ internal VirtualApplianceNicProperties() { } public Azure.ResourceManager.Network.Models.NicTypeInResponse? NicType { get { throw null; } } public string PrivateIPAddress { get { throw null; } } public string PublicIPAddress { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VirtualApplianceNicProperties 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.Network.Models.VirtualApplianceNicProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16574,6 +17045,7 @@ public VirtualApplianceSkuProperties() { } public string BundledScaleUnit { get { throw null; } set { } } public string MarketPlaceVersion { get { throw null; } set { } } public string Vendor { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VirtualApplianceSkuProperties 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.Network.Models.VirtualApplianceSkuProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16588,6 +17060,7 @@ internal VirtualHubEffectiveRoute() { } public System.Collections.Generic.IReadOnlyList NextHops { get { throw null; } } public string NextHopType { get { throw null; } } public string RouteOrigin { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VirtualHubEffectiveRoute 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.Network.Models.VirtualHubEffectiveRoute System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16598,6 +17071,7 @@ public partial class VirtualHubEffectiveRouteList : System.ClientModel.Primitive { internal VirtualHubEffectiveRouteList() { } public System.Collections.Generic.IReadOnlyList Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VirtualHubEffectiveRouteList 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.Network.Models.VirtualHubEffectiveRouteList System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16609,6 +17083,7 @@ public partial class VirtualHubInboundRoutesContent : System.ClientModel.Primiti public VirtualHubInboundRoutesContent() { } public string ConnectionType { get { throw null; } set { } } public System.Uri ResourceUri { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VirtualHubInboundRoutesContent 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.Network.Models.VirtualHubInboundRoutesContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16620,6 +17095,7 @@ public partial class VirtualHubOutboundRoutesContent : System.ClientModel.Primit public VirtualHubOutboundRoutesContent() { } public string ConnectionType { get { throw null; } set { } } public System.Uri ResourceUri { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VirtualHubOutboundRoutesContent 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.Network.Models.VirtualHubOutboundRoutesContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16631,6 +17107,7 @@ public partial class VirtualHubRoute : System.ClientModel.Primitives.IJsonModel< public VirtualHubRoute() { } public System.Collections.Generic.IList AddressPrefixes { get { throw null; } } public string NextHopIPAddress { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VirtualHubRoute 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.Network.Models.VirtualHubRoute System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16644,6 +17121,7 @@ public VirtualHubRouteV2() { } public string DestinationType { get { throw null; } set { } } public System.Collections.Generic.IList NextHops { get { throw null; } } public string NextHopType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VirtualHubRouteV2 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.Network.Models.VirtualHubRouteV2 System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16655,6 +17133,7 @@ public partial class VirtualNetworkBgpCommunities : System.ClientModel.Primitive public VirtualNetworkBgpCommunities(string virtualNetworkCommunity) { } public string RegionalCommunity { get { throw null; } } public string VirtualNetworkCommunity { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VirtualNetworkBgpCommunities 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.Network.Models.VirtualNetworkBgpCommunities System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16666,6 +17145,7 @@ public partial class VirtualNetworkEncryption : System.ClientModel.Primitives.IJ public VirtualNetworkEncryption(bool isEnabled) { } public Azure.ResourceManager.Network.Models.VirtualNetworkEncryptionEnforcement? Enforcement { get { throw null; } set { } } public bool IsEnabled { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VirtualNetworkEncryption 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.Network.Models.VirtualNetworkEncryption System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16695,6 +17175,7 @@ public partial class VirtualNetworkGatewayAutoScaleBounds : System.ClientModel.P public VirtualNetworkGatewayAutoScaleBounds() { } public int? Max { get { throw null; } set { } } public int? Min { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VirtualNetworkGatewayAutoScaleBounds 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.Network.Models.VirtualNetworkGatewayAutoScaleBounds System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16728,6 +17209,7 @@ public VirtualNetworkGatewayConnectionListEntity(Azure.ResourceManager.Resources public bool? UsePolicyBasedTrafficSelectors { get { throw null; } set { } } public Azure.Core.ResourceIdentifier VirtualNetworkGateway1Id { get { throw null; } set { } } public Azure.Core.ResourceIdentifier VirtualNetworkGateway2Id { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VirtualNetworkGatewayConnectionListEntity 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.Network.Models.VirtualNetworkGatewayConnectionListEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16820,6 +17302,7 @@ public VirtualNetworkGatewayIPConfiguration() { } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public Azure.Core.ResourceIdentifier PublicIPAddressId { get { throw null; } set { } } public Azure.Core.ResourceIdentifier SubnetId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VirtualNetworkGatewayIPConfiguration 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.Network.Models.VirtualNetworkGatewayIPConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16835,6 +17318,7 @@ public VirtualNetworkGatewayPolicyGroup() { } public int? Priority { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.Collections.Generic.IReadOnlyList VngClientConnectionConfigurations { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VirtualNetworkGatewayPolicyGroup 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.Network.Models.VirtualNetworkGatewayPolicyGroup System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16847,6 +17331,7 @@ public VirtualNetworkGatewayPolicyGroupMember() { } public Azure.ResourceManager.Network.Models.VpnPolicyMemberAttributeType? AttributeType { get { throw null; } set { } } public string AttributeValue { get { throw null; } set { } } public string Name { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VirtualNetworkGatewayPolicyGroupMember 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.Network.Models.VirtualNetworkGatewayPolicyGroupMember System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16859,6 +17344,7 @@ public VirtualNetworkGatewaySku() { } public int? Capacity { get { throw null; } } public Azure.ResourceManager.Network.Models.VirtualNetworkGatewaySkuName? Name { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.VirtualNetworkGatewaySkuTier? Tier { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VirtualNetworkGatewaySku 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.Network.Models.VirtualNetworkGatewaySku System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17037,6 +17523,7 @@ internal VirtualNetworkUsage() { } public double? Limit { get { throw null; } } public Azure.ResourceManager.Network.Models.VirtualNetworkUsageName Name { get { throw null; } } public string Unit { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VirtualNetworkUsage 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.Network.Models.VirtualNetworkUsage System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17048,6 +17535,7 @@ public partial class VirtualNetworkUsageName : System.ClientModel.Primitives.IJs internal VirtualNetworkUsageName() { } public string LocalizedValue { get { throw null; } } public string Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VirtualNetworkUsageName 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.Network.Models.VirtualNetworkUsageName System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17060,6 +17548,7 @@ internal VirtualWanSecurityProvider() { } public string Name { get { throw null; } } public Azure.ResourceManager.Network.Models.VirtualWanSecurityProviderType? ProviderType { get { throw null; } } public System.Uri Uri { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VirtualWanSecurityProvider 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.Network.Models.VirtualWanSecurityProvider System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17070,6 +17559,7 @@ public partial class VirtualWanSecurityProviders : System.ClientModel.Primitives { internal VirtualWanSecurityProviders() { } public System.Collections.Generic.IReadOnlyList SupportedProviders { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VirtualWanSecurityProviders 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.Network.Models.VirtualWanSecurityProviders System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17099,6 +17589,7 @@ public partial class VirtualWanVpnProfileContent : System.ClientModel.Primitives public VirtualWanVpnProfileContent() { } public Azure.ResourceManager.Network.Models.NetworkAuthenticationMethod? AuthenticationMethod { get { throw null; } set { } } public Azure.Core.ResourceIdentifier VpnServerConfigurationResourceId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VirtualWanVpnProfileContent 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.Network.Models.VirtualWanVpnProfileContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17129,6 +17620,7 @@ public VnetRoute() { } public System.Collections.Generic.IReadOnlyList BgpConnections { get { throw null; } } public System.Collections.Generic.IList StaticRoutes { get { throw null; } } public Azure.ResourceManager.Network.Models.StaticRoutesConfig StaticRoutesConfig { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VnetRoute 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.Network.Models.VnetRoute System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17142,6 +17634,7 @@ public VngClientConnectionConfiguration() { } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.Collections.Generic.IList VirtualNetworkGatewayPolicyGroups { get { throw null; } } public System.Collections.Generic.IList VpnClientAddressPrefixes { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VngClientConnectionConfiguration 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.Network.Models.VngClientConnectionConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17186,6 +17679,7 @@ public VpnClientConfiguration() { } public System.Collections.Generic.IList VpnClientProtocols { get { throw null; } } public System.Collections.Generic.IList VpnClientRevokedCertificates { get { throw null; } } public System.Collections.Generic.IList VpnClientRootCertificates { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnClientConfiguration 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.Network.Models.VpnClientConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17199,6 +17693,7 @@ internal VpnClientConnectionHealth() { } public long? TotalEgressBytesTransferred { get { throw null; } } public long? TotalIngressBytesTransferred { get { throw null; } } public int? VpnClientConnectionsCount { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnClientConnectionHealth 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.Network.Models.VpnClientConnectionHealth System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17220,6 +17715,7 @@ internal VpnClientConnectionHealthDetail() { } public string VpnConnectionId { get { throw null; } } public System.DateTimeOffset? VpnConnectionOn { get { throw null; } } public string VpnUserName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnClientConnectionHealthDetail 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.Network.Models.VpnClientConnectionHealthDetail System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17230,6 +17726,7 @@ public partial class VpnClientConnectionHealthDetailListResult : System.ClientMo { internal VpnClientConnectionHealthDetailListResult() { } public System.Collections.Generic.IReadOnlyList Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnClientConnectionHealthDetailListResult 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.Network.Models.VpnClientConnectionHealthDetailListResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17243,6 +17740,7 @@ public VpnClientContent() { } public System.Collections.Generic.IList ClientRootCertificates { get { throw null; } } public Azure.ResourceManager.Network.Models.ProcessorArchitecture? ProcessorArchitecture { get { throw null; } set { } } public string RadiusServerAuthCertificate { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnClientContent 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.Network.Models.VpnClientContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17260,6 +17758,7 @@ public VpnClientIPsecParameters(int saLifeTimeSeconds, int saDataSizeKilobytes, public Azure.ResourceManager.Network.Models.PfsGroup PfsGroup { get { throw null; } set { } } public int SaDataSizeKilobytes { get { throw null; } set { } } public int SaLifeTimeSeconds { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnClientIPsecParameters 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.Network.Models.VpnClientIPsecParameters System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17297,6 +17796,7 @@ public VpnClientRevokedCertificate() { } public Azure.ETag? ETag { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public string Thumbprint { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnClientRevokedCertificate 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.Network.Models.VpnClientRevokedCertificate System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17309,6 +17809,7 @@ public VpnClientRootCertificate(System.BinaryData publicCertData) { } public Azure.ETag? ETag { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.BinaryData PublicCertData { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnClientRootCertificate 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.Network.Models.VpnClientRootCertificate System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17320,6 +17821,7 @@ public partial class VpnConnectionPacketCaptureStartContent : System.ClientModel public VpnConnectionPacketCaptureStartContent() { } public string FilterData { get { throw null; } set { } } public System.Collections.Generic.IList LinkConnectionNames { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnConnectionPacketCaptureStartContent 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.Network.Models.VpnConnectionPacketCaptureStartContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17331,6 +17833,7 @@ public partial class VpnConnectionPacketCaptureStopContent : System.ClientModel. public VpnConnectionPacketCaptureStopContent() { } public System.Collections.Generic.IList LinkConnectionNames { get { throw null; } } public System.Uri SasUri { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnConnectionPacketCaptureStopContent 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.Network.Models.VpnConnectionPacketCaptureStopContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17363,6 +17866,7 @@ public VpnDeviceScriptContent() { } public string DeviceFamily { get { throw null; } set { } } public string FirmwareVersion { get { throw null; } set { } } public string Vendor { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnDeviceScriptContent 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.Network.Models.VpnDeviceScriptContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17394,6 +17898,7 @@ internal VpnGatewayIPConfiguration() { } public Azure.Core.ResourceIdentifier Id { get { throw null; } } public string PrivateIPAddress { get { throw null; } } public string PublicIPAddress { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnGatewayIPConfiguration 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.Network.Models.VpnGatewayIPConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17404,6 +17909,7 @@ public partial class VpnGatewayPacketCaptureStartContent : System.ClientModel.Pr { public VpnGatewayPacketCaptureStartContent() { } public string FilterData { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnGatewayPacketCaptureStartContent 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.Network.Models.VpnGatewayPacketCaptureStartContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17414,6 +17920,7 @@ public partial class VpnGatewayPacketCaptureStopContent : System.ClientModel.Pri { public VpnGatewayPacketCaptureStopContent() { } public System.Uri SasUri { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnGatewayPacketCaptureStopContent 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.Network.Models.VpnGatewayPacketCaptureStopContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17443,6 +17950,7 @@ public partial class VpnLinkBgpSettings : System.ClientModel.Primitives.IJsonMod public VpnLinkBgpSettings() { } public long? Asn { get { throw null; } set { } } public string BgpPeeringAddress { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnLinkBgpSettings 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.Network.Models.VpnLinkBgpSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17474,6 +17982,7 @@ public VpnLinkConnectionSharedKeyProperties() { } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public string SharedKey { get { throw null; } set { } } public int? SharedKeyLength { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnLinkConnectionSharedKeyProperties 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.Network.Models.VpnLinkConnectionSharedKeyProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17485,6 +17994,7 @@ public partial class VpnLinkProviderProperties : System.ClientModel.Primitives.I public VpnLinkProviderProperties() { } public string LinkProviderName { get { throw null; } set { } } public int? LinkSpeedInMbps { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnLinkProviderProperties 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.Network.Models.VpnLinkProviderProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17496,6 +18006,7 @@ public partial class VpnNatRuleMapping : System.ClientModel.Primitives.IJsonMode public VpnNatRuleMapping() { } public string AddressSpace { get { throw null; } set { } } public string PortRange { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnNatRuleMapping 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.Network.Models.VpnNatRuleMapping System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17542,6 +18053,7 @@ public partial class VpnPacketCaptureStartContent : System.ClientModel.Primitive { public VpnPacketCaptureStartContent() { } public string FilterData { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnPacketCaptureStartContent 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.Network.Models.VpnPacketCaptureStartContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17558,6 +18070,7 @@ public partial class VpnPacketCaptureStopContent : System.ClientModel.Primitives { public VpnPacketCaptureStopContent() { } public System.Uri SasUri { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnPacketCaptureStopContent 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.Network.Models.VpnPacketCaptureStopContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17593,6 +18106,7 @@ public partial class VpnProfileResponse : System.ClientModel.Primitives.IJsonMod { internal VpnProfileResponse() { } public System.Uri ProfileUri { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnProfileResponse 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.Network.Models.VpnProfileResponse System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17604,6 +18118,7 @@ public partial class VpnServerConfigRadiusClientRootCertificate : System.ClientM public VpnServerConfigRadiusClientRootCertificate() { } public string Name { get { throw null; } set { } } public string Thumbprint { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnServerConfigRadiusClientRootCertificate 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.Network.Models.VpnServerConfigRadiusClientRootCertificate System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17615,6 +18130,7 @@ public partial class VpnServerConfigRadiusServerRootCertificate : System.ClientM public VpnServerConfigRadiusServerRootCertificate() { } public string Name { get { throw null; } set { } } public System.BinaryData PublicCertData { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnServerConfigRadiusServerRootCertificate 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.Network.Models.VpnServerConfigRadiusServerRootCertificate System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17627,6 +18143,7 @@ public VpnServerConfigurationPolicyGroupMember() { } public Azure.ResourceManager.Network.Models.VpnPolicyMemberAttributeType? AttributeType { get { throw null; } set { } } public string AttributeValue { get { throw null; } set { } } public string Name { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnServerConfigurationPolicyGroupMember 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.Network.Models.VpnServerConfigurationPolicyGroupMember System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17637,6 +18154,7 @@ public partial class VpnServerConfigurationsResponse : System.ClientModel.Primit { internal VpnServerConfigurationsResponse() { } public System.Collections.Generic.IReadOnlyList VpnServerConfigurationResourceIds { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnServerConfigurationsResponse 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.Network.Models.VpnServerConfigurationsResponse System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17648,6 +18166,7 @@ public partial class VpnServerConfigVpnClientRevokedCertificate : System.ClientM public VpnServerConfigVpnClientRevokedCertificate() { } public string Name { get { throw null; } set { } } public string Thumbprint { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnServerConfigVpnClientRevokedCertificate 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.Network.Models.VpnServerConfigVpnClientRevokedCertificate System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17659,6 +18178,7 @@ public partial class VpnServerConfigVpnClientRootCertificate : System.ClientMode public VpnServerConfigVpnClientRootCertificate() { } public string Name { get { throw null; } set { } } public System.BinaryData PublicCertData { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnServerConfigVpnClientRootCertificate 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.Network.Models.VpnServerConfigVpnClientRootCertificate System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17716,6 +18236,7 @@ public WebApplicationFirewallCustomRule(int priority, Azure.ResourceManager.Netw public int? RateLimitThreshold { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.WebApplicationFirewallRuleType RuleType { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.WebApplicationFirewallState? State { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.WebApplicationFirewallCustomRule 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.Network.Models.WebApplicationFirewallCustomRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17858,6 +18379,7 @@ public WebApplicationFirewallScrubbingRules(Azure.ResourceManager.Network.Models public string Selector { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.ScrubbingRuleEntryMatchOperator SelectorMatchOperator { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.ScrubbingRuleEntryState? State { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.WebApplicationFirewallScrubbingRules 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.Network.Models.WebApplicationFirewallScrubbingRules System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } diff --git a/sdk/network/Azure.ResourceManager.Network/assets.json b/sdk/network/Azure.ResourceManager.Network/assets.json index 26ea2fc288c1..9938a3d7125b 100644 --- a/sdk/network/Azure.ResourceManager.Network/assets.json +++ b/sdk/network/Azure.ResourceManager.Network/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/network/Azure.ResourceManager.Network", - "Tag": "net/network/Azure.ResourceManager.Network_ea24d59667" + "Tag": "net/network/Azure.ResourceManager.Network_8dc108eec8" } diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_BgpConnectionCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_BgpConnectionCollection.cs index 24f836b4259a..59e637a4837a 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_BgpConnectionCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_BgpConnectionCollection.cs @@ -151,7 +151,7 @@ public async Task CreateOrUpdate_VirtualHubRouteTableV2Put() string connectionName = "conn1"; BgpConnectionData data = new BgpConnectionData() { - PeerAsn = 20000, + PeerAsn = 20000L, PeerIP = "192.168.1.5", HubVirtualNetworkConnectionId = new ResourceIdentifier("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/hub1/hubVirtualNetworkConnections/hubVnetConn1"), }; diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_BgpConnectionResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_BgpConnectionResource.cs index 02b38f505170..bab4cc419935 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_BgpConnectionResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_BgpConnectionResource.cs @@ -73,7 +73,7 @@ public async Task Update_VirtualHubRouteTableV2Put() // invoke the operation BgpConnectionData data = new BgpConnectionData() { - PeerAsn = 20000, + PeerAsn = 20000L, PeerIP = "192.168.1.5", HubVirtualNetworkConnectionId = new ResourceIdentifier("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/hub1/hubVirtualNetworkConnections/hubVnetConn1"), }; diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRouteCircuitPeeringCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRouteCircuitPeeringCollection.cs index 76b4f0dcc930..e69e1db6e474 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRouteCircuitPeeringCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRouteCircuitPeeringCollection.cs @@ -151,7 +151,7 @@ public async Task CreateOrUpdate_CreateExpressRouteCircuitPeerings() string peeringName = "AzurePrivatePeering"; ExpressRouteCircuitPeeringData data = new ExpressRouteCircuitPeeringData() { - PeerASN = 200, + PeerASN = 200L, PrimaryPeerAddressPrefix = "192.168.16.252/30", SecondaryPeerAddressPrefix = "192.168.18.252/30", VlanId = 200, diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRouteCircuitPeeringResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRouteCircuitPeeringResource.cs index 0c93f4154d8d..c107218758d9 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRouteCircuitPeeringResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRouteCircuitPeeringResource.cs @@ -100,7 +100,7 @@ public async Task Update_CreateExpressRouteCircuitPeerings() // invoke the operation ExpressRouteCircuitPeeringData data = new ExpressRouteCircuitPeeringData() { - PeerASN = 200, + PeerASN = 200L, PrimaryPeerAddressPrefix = "192.168.16.252/30", SecondaryPeerAddressPrefix = "192.168.18.252/30", VlanId = 200, diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRouteCrossConnectionPeeringCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRouteCrossConnectionPeeringCollection.cs index faab00524f24..78267f51f5d2 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRouteCrossConnectionPeeringCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRouteCrossConnectionPeeringCollection.cs @@ -189,7 +189,7 @@ public async Task CreateOrUpdate_ExpressRouteCrossConnectionBgpPeeringCreate() string peeringName = "AzurePrivatePeering"; ExpressRouteCrossConnectionPeeringData data = new ExpressRouteCrossConnectionPeeringData() { - PeerASN = 200, + PeerASN = 200L, PrimaryPeerAddressPrefix = "192.168.16.252/30", SecondaryPeerAddressPrefix = "192.168.18.252/30", VlanId = 200, diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRouteCrossConnectionPeeringResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRouteCrossConnectionPeeringResource.cs index 1c0961002b69..d3037b1ca75d 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRouteCrossConnectionPeeringResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRouteCrossConnectionPeeringResource.cs @@ -190,7 +190,7 @@ public async Task Update_ExpressRouteCrossConnectionBgpPeeringCreate() // invoke the operation ExpressRouteCrossConnectionPeeringData data = new ExpressRouteCrossConnectionPeeringData() { - PeerASN = 200, + PeerASN = 200L, PrimaryPeerAddressPrefix = "192.168.16.252/30", SecondaryPeerAddressPrefix = "192.168.18.252/30", VlanId = 200, diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkVirtualApplianceCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkVirtualApplianceCollection.cs index ee7ceb08d804..13ee3057b3a5 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkVirtualApplianceCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkVirtualApplianceCollection.cs @@ -173,7 +173,7 @@ public async Task CreateOrUpdate_CreateNetworkVirtualAppliance() { "https://csrncvhdstorage1.blob.core.windows.net/csrncvhdstoragecont/csrcloudinitconfig" }, - VirtualApplianceAsn = 10000, + VirtualApplianceAsn = 10000L, NetworkInterfaceConfigurations = { new VirtualApplianceNetworkInterfaceConfiguration() diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkVirtualApplianceConnectionCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkVirtualApplianceConnectionCollection.cs index f9aff5ecb5a6..9925712e17c4 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkVirtualApplianceConnectionCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkVirtualApplianceConnectionCollection.cs @@ -45,8 +45,8 @@ public async Task CreateOrUpdate_NetworkVirtualApplianceConnectionPut() NetworkVirtualApplianceConnectionData data = new NetworkVirtualApplianceConnectionData() { NamePropertiesName = "connection1", - Asn = 64512, - TunnelIdentifier = 0, + Asn = 64512L, + TunnelIdentifier = 0L, BgpPeerAddress = { "169.254.16.13","169.254.16.14" diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkVirtualApplianceConnectionResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkVirtualApplianceConnectionResource.cs index db318f30491d..fcbc8f6cd215 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkVirtualApplianceConnectionResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkVirtualApplianceConnectionResource.cs @@ -42,8 +42,8 @@ public async Task Update_NetworkVirtualApplianceConnectionPut() NetworkVirtualApplianceConnectionData data = new NetworkVirtualApplianceConnectionData() { NamePropertiesName = "connection1", - Asn = 64512, - TunnelIdentifier = 0, + Asn = 64512L, + TunnelIdentifier = 0L, BgpPeerAddress = { "169.254.16.13","169.254.16.14" diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_PacketCaptureCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_PacketCaptureCollection.cs index ecaad128fd9f..67a4295cdea1 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_PacketCaptureCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_PacketCaptureCollection.cs @@ -48,8 +48,8 @@ public async Task CreateOrUpdate_CreatePacketCapture() FilePath = "D:\\capture\\pc1.cap", }) { - BytesToCapturePerPacket = 10000, - TotalBytesPerSession = 100000, + BytesToCapturePerPacket = 10000L, + TotalBytesPerSession = 100000L, TimeLimitInSeconds = 100, Filters = { diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_PacketCaptureResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_PacketCaptureResource.cs index b028fb88c226..9c6e31c9c3a9 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_PacketCaptureResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_PacketCaptureResource.cs @@ -45,8 +45,8 @@ public async Task Update_CreatePacketCapture() FilePath = "D:\\capture\\pc1.cap", }) { - BytesToCapturePerPacket = 10000, - TotalBytesPerSession = 100000, + BytesToCapturePerPacket = 10000L, + TotalBytesPerSession = 100000L, TimeLimitInSeconds = 100, Filters = { diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualNetworkGatewayCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualNetworkGatewayCollection.cs index 6dd296209ea6..26a1baa7458b 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualNetworkGatewayCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualNetworkGatewayCollection.cs @@ -79,14 +79,14 @@ public async Task CreateOrUpdate_UpdateVirtualNetworkGateway() { new RadiusServer("10.2.0.0") { -RadiusServerScore = 20, +RadiusServerScore = 20L, RadiusServerSecret = "radiusServerSecret", } }, }, BgpSettings = new BgpSettings() { - Asn = 65515, + Asn = 65515L, BgpPeeringAddress = "10.0.1.30", PeerWeight = 0, }, diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualNetworkGatewayConnectionCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualNetworkGatewayConnectionCollection.cs index f7582b8c6194..fcea91224cd8 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualNetworkGatewayConnectionCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualNetworkGatewayConnectionCollection.cs @@ -66,7 +66,7 @@ public async Task CreateOrUpdate_CreateVirtualNetworkGatewayConnectionS2S() }, BgpSettings = new BgpSettings() { - Asn = 65514, + Asn = 65514L, BgpPeeringAddress = "10.0.1.30", PeerWeight = 0, }, diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualRouterPeeringCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualRouterPeeringCollection.cs index dfa5f6798454..d2191fa1f4a7 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualRouterPeeringCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualRouterPeeringCollection.cs @@ -151,7 +151,7 @@ public async Task CreateOrUpdate_CreateVirtualRouterPeering() string peeringName = "peering1"; VirtualRouterPeeringData data = new VirtualRouterPeeringData() { - PeerAsn = 20000, + PeerAsn = 20000L, PeerIP = "192.168.1.5", }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, peeringName, data); diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualRouterPeeringResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualRouterPeeringResource.cs index b7381d372424..a7feb4a258fe 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualRouterPeeringResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualRouterPeeringResource.cs @@ -99,7 +99,7 @@ public async Task Update_CreateVirtualRouterPeering() // invoke the operation VirtualRouterPeeringData data = new VirtualRouterPeeringData() { - PeerAsn = 20000, + PeerAsn = 20000L, PeerIP = "192.168.1.5", }; ArmOperation lro = await virtualRouterPeering.UpdateAsync(WaitUntil.Completed, data); diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VpnGatewayCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VpnGatewayCollection.cs index f62d831a55bb..cfd54d39e2ab 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VpnGatewayCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VpnGatewayCollection.cs @@ -179,7 +179,7 @@ public async Task CreateOrUpdate_VpnGatewayPut() }, BgpSettings = new BgpSettings() { - Asn = 65515, + Asn = 65515L, PeerWeight = 0, BgpPeeringAddresses = { diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VpnServerConfigurationCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VpnServerConfigurationCollection.cs index 63139d50313d..28c7569d4a8d 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VpnServerConfigurationCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VpnServerConfigurationCollection.cs @@ -193,7 +193,7 @@ public async Task CreateOrUpdate_VpnServerConfigurationCreate() { new RadiusServer("10.0.0.0") { -RadiusServerScore = 25, +RadiusServerScore = 25L, RadiusServerSecret = "radiusServerSecret", } }, diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VpnSiteCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VpnSiteCollection.cs index 9368fe6f7349..8c364f08a82d 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VpnSiteCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VpnSiteCollection.cs @@ -168,7 +168,7 @@ public async Task CreateOrUpdate_VpnSiteCreate() Fqdn = "link1.vpnsite1.contoso.com", BgpProperties = new VpnLinkBgpSettings() { -Asn = 1234, +Asn = 1234L, BgpPeeringAddress = "192.168.0.0", }, Name = "vpnSiteLink1", diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/AdminRuleGroupData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/AdminRuleGroupData.Serialization.cs index f08e6a9b86c9..4f32df577ba2 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/AdminRuleGroupData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/AdminRuleGroupData.Serialization.cs @@ -20,6 +20,15 @@ public partial class AdminRuleGroupData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,32 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(AdminRuleGroupData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Description)) @@ -81,22 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStringValue(ResourceGuid.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } AdminRuleGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationGatewayData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationGatewayData.Serialization.cs index 4103f5c5ff81..ca17266d5a8b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationGatewayData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationGatewayData.Serialization.cs @@ -21,6 +21,15 @@ public partial class ApplicationGatewayData : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,7 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(ApplicationGatewayData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); @@ -49,37 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader writer.WritePropertyName("identity"u8); JsonSerializer.Serialize(writer, Identity); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Sku)) @@ -378,22 +356,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader writer.WriteStringValue(DefaultPredefinedSslPolicy.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ApplicationGatewayData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationGatewayPrivateEndpointConnectionData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationGatewayPrivateEndpointConnectionData.Serialization.cs index 0c394c85f934..4fe43f032ea4 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationGatewayPrivateEndpointConnectionData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationGatewayPrivateEndpointConnectionData.Serialization.cs @@ -19,6 +19,15 @@ public partial class ApplicationGatewayPrivateEndpointConnectionData : IUtf8Json void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonW throw new FormatException($"The model {nameof(ApplicationGatewayPrivateEndpointConnectionData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(PrivateEndpoint)) @@ -70,22 +64,6 @@ void IJsonModel.Write(Utf8JsonW writer.WriteStringValue(LinkIdentifier); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ApplicationGatewayPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationGatewayWafDynamicManifestData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationGatewayWafDynamicManifestData.Serialization.cs index 26ce94873505..1933a54cf567 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationGatewayWafDynamicManifestData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationGatewayWafDynamicManifestData.Serialization.cs @@ -20,6 +20,15 @@ public partial class ApplicationGatewayWafDynamicManifestData : IUtf8JsonSeriali void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter w throw new FormatException($"The model {nameof(ApplicationGatewayWafDynamicManifestData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsCollectionDefined(AvailableRuleSets)) @@ -74,22 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter w } writer.WriteEndObject(); writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ApplicationGatewayWafDynamicManifestData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationSecurityGroupData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationSecurityGroupData.Serialization.cs index 541ce2f6f264..bac21aa2b174 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationSecurityGroupData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationSecurityGroupData.Serialization.cs @@ -19,6 +19,15 @@ public partial class ApplicationSecurityGroupData : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,43 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(ApplicationSecurityGroupData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ResourceGuid)) @@ -76,22 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ApplicationSecurityGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/AzureFirewallData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/AzureFirewallData.Serialization.cs index c39200d4fddb..93df41237c30 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/AzureFirewallData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/AzureFirewallData.Serialization.cs @@ -20,6 +20,15 @@ public partial class AzureFirewallData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(AzureFirewallData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(Zones)) { writer.WritePropertyName("zones"u8); @@ -43,37 +52,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsCollectionDefined(ApplicationRuleCollections)) @@ -178,22 +156,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite writer.WriteObjectValue(AutoscaleConfiguration, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } AzureFirewallData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/AzureWebCategoryData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/AzureWebCategoryData.Serialization.cs index 52f3f9da51aa..c2c57996ef83 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/AzureWebCategoryData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/AzureWebCategoryData.Serialization.cs @@ -19,6 +19,15 @@ public partial class AzureWebCategoryData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,32 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(AzureWebCategoryData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Group)) @@ -60,22 +49,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr writer.WriteStringValue(Group); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } AzureWebCategoryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/BackendAddressPoolData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/BackendAddressPoolData.Serialization.cs index e82cb4ba9839..dcc2eb7c2691 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/BackendAddressPoolData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/BackendAddressPoolData.Serialization.cs @@ -20,6 +20,15 @@ public partial class BackendAddressPoolData : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(BackendAddressPoolData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Location)) @@ -141,22 +135,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader writer.WriteStringValue(SyncMode.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } BackendAddressPoolData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/BaseAdminRuleData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/BaseAdminRuleData.Serialization.cs index e300b58953a9..77794351bc59 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/BaseAdminRuleData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/BaseAdminRuleData.Serialization.cs @@ -18,6 +18,15 @@ public partial class BaseAdminRuleData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(BaseAdminRuleData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("kind"u8); writer.WriteStringValue(Kind.ToString()); if (options.Format != "W" && Optional.IsDefined(ETag)) @@ -33,42 +42,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } BaseAdminRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/BastionHostData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/BastionHostData.Serialization.cs index c30d1541ff49..a073c9f3051f 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/BastionHostData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/BastionHostData.Serialization.cs @@ -20,6 +20,15 @@ public partial class BastionHostData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(BastionHostData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(Zones)) { writer.WritePropertyName("zones"u8); @@ -48,37 +57,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO writer.WritePropertyName("sku"u8); writer.WriteObjectValue(Sku, options); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsCollectionDefined(IPConfigurations)) @@ -152,22 +130,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO writer.WriteBooleanValue(EnableSessionRecording.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } BastionHostData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/BgpConnectionData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/BgpConnectionData.Serialization.cs index e1e718b0ec6a..149d7e557b6c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/BgpConnectionData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/BgpConnectionData.Serialization.cs @@ -20,6 +20,15 @@ public partial class BgpConnectionData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(BgpConnectionData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(PeerAsn)) @@ -76,22 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite writer.WriteStringValue(ConnectionState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } BgpConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/CloudServiceSwapData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/CloudServiceSwapData.Serialization.cs index 7afaf87f5d4d..0a96edaed7c3 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/CloudServiceSwapData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/CloudServiceSwapData.Serialization.cs @@ -20,6 +20,15 @@ public partial class CloudServiceSwapData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,48 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(CloudServiceSwapData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); writer.WriteObjectValue(Properties, options); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } CloudServiceSwapData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ConnectionMonitorData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ConnectionMonitorData.Serialization.cs index 5e2ef58e0930..fd5d7f4a215e 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ConnectionMonitorData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ConnectionMonitorData.Serialization.cs @@ -20,6 +20,15 @@ public partial class ConnectionMonitorData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(ConnectionMonitorData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); @@ -49,26 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW } writer.WriteEndObject(); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Source)) @@ -157,22 +146,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW writer.WriteStringValue(ConnectionMonitorType.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ConnectionMonitorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ConnectivityConfigurationData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ConnectivityConfigurationData.Serialization.cs index c56dd65ab263..3cb4449e5c6d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ConnectivityConfigurationData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ConnectivityConfigurationData.Serialization.cs @@ -20,6 +20,15 @@ public partial class ConnectivityConfigurationData : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,32 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(ConnectivityConfigurationData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Description)) @@ -106,22 +95,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode writer.WriteStringValue(ResourceGuid.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ConnectivityConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/CustomIPPrefixData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/CustomIPPrefixData.Serialization.cs index d5781f939ac2..22512a2aaa49 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/CustomIPPrefixData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/CustomIPPrefixData.Serialization.cs @@ -20,6 +20,15 @@ public partial class CustomIPPrefixData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(CustomIPPrefixData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(ExtendedLocation)) { writer.WritePropertyName("extendedLocation"u8); @@ -48,37 +57,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Asn)) @@ -167,22 +145,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } CustomIPPrefixData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/DdosCustomPolicyData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/DdosCustomPolicyData.Serialization.cs index 6507bf457c81..5cc8005c6515 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/DdosCustomPolicyData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/DdosCustomPolicyData.Serialization.cs @@ -19,6 +19,15 @@ public partial class DdosCustomPolicyData : IUtf8JsonSerializable, IJsonModel
((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,43 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(DdosCustomPolicyData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ResourceGuid)) @@ -76,22 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } DdosCustomPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/DdosProtectionPlanData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/DdosProtectionPlanData.Serialization.cs index 8cabb0b3133e..8e951cbcafda 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/DdosProtectionPlanData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/DdosProtectionPlanData.Serialization.cs @@ -21,6 +21,15 @@ public partial class DdosProtectionPlanData : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,45 +37,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(DdosProtectionPlanData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ResourceGuid)) @@ -100,22 +76,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } DdosProtectionPlanData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/DscpConfigurationData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/DscpConfigurationData.Serialization.cs index 07eb94dd351a..f106ddd64542 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/DscpConfigurationData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/DscpConfigurationData.Serialization.cs @@ -19,6 +19,15 @@ public partial class DscpConfigurationData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,43 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(DscpConfigurationData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsCollectionDefined(Markings)) @@ -156,22 +134,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } DscpConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitAuthorizationData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitAuthorizationData.Serialization.cs index ba1c5847268c..a00051194b88 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitAuthorizationData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitAuthorizationData.Serialization.cs @@ -19,6 +19,15 @@ public partial class ExpressRouteCircuitAuthorizationData : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(ExpressRouteCircuitAuthorizationData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(AuthorizationKey)) @@ -70,22 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter write writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ExpressRouteCircuitAuthorizationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitConnectionData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitConnectionData.Serialization.cs index a12212397283..d22792ab18dd 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitConnectionData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitConnectionData.Serialization.cs @@ -20,6 +20,15 @@ public partial class ExpressRouteCircuitConnectionData : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(ExpressRouteCircuitConnectionData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(ExpressRouteCircuitPeering)) @@ -86,22 +80,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ExpressRouteCircuitConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitData.Serialization.cs index 96a44c2c2853..a99c303c41cb 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitData.Serialization.cs @@ -20,6 +20,15 @@ public partial class ExpressRouteCircuitData : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(ExpressRouteCircuitData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Sku)) { writer.WritePropertyName("sku"u8); @@ -38,37 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(AllowClassicOperations)) @@ -167,22 +145,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade writer.WriteBooleanValue(EnableDirectPortRateLimit.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ExpressRouteCircuitData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitPeeringData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitPeeringData.Serialization.cs index 90b12bb17a47..c9e785c355d9 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitPeeringData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitPeeringData.Serialization.cs @@ -20,6 +20,15 @@ public partial class ExpressRouteCircuitPeeringData : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(ExpressRouteCircuitPeeringData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(PeeringType)) @@ -161,22 +155,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ExpressRouteCircuitPeeringData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteConnectionData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteConnectionData.Serialization.cs index 44c97cf677a3..a311bee5f313 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteConnectionData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteConnectionData.Serialization.cs @@ -20,6 +20,15 @@ public partial class ExpressRouteConnectionData : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,22 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(ExpressRouteConnectionData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) @@ -86,22 +80,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe writer.WriteObjectValue(RoutingConfiguration, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ExpressRouteConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCrossConnectionData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCrossConnectionData.Serialization.cs index 29e17eebb7bd..29b1ac81195d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCrossConnectionData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCrossConnectionData.Serialization.cs @@ -20,6 +20,15 @@ public partial class ExpressRouteCrossConnectionData : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,43 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(ExpressRouteCrossConnectionData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(PrimaryAzurePort)) @@ -122,22 +100,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ExpressRouteCrossConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCrossConnectionPeeringData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCrossConnectionPeeringData.Serialization.cs index 70bf3e894f85..d9e56c5aad95 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCrossConnectionPeeringData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCrossConnectionPeeringData.Serialization.cs @@ -19,6 +19,15 @@ public partial class ExpressRouteCrossConnectionPeeringData : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(ExpressRouteCrossConnectionPeeringData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(PeeringType)) @@ -125,22 +119,6 @@ void IJsonModel.Write(Utf8JsonWriter wri writer.WriteObjectValue(IPv6PeeringConfig, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ExpressRouteCrossConnectionPeeringData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteGatewayData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteGatewayData.Serialization.cs index d5a1c0907b9b..72a1de748874 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteGatewayData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteGatewayData.Serialization.cs @@ -20,6 +20,15 @@ public partial class ExpressRouteGatewayData : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,43 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(ExpressRouteGatewayData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(AutoScaleConfiguration)) @@ -97,22 +75,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade writer.WriteBooleanValue(AllowNonVirtualWanTraffic.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ExpressRouteGatewayData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteLinkData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteLinkData.Serialization.cs index 92e53aae3935..4ff2bb13c1f4 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteLinkData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteLinkData.Serialization.cs @@ -19,6 +19,15 @@ public partial class ExpressRouteLinkData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(ExpressRouteLinkData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(RouterName)) @@ -95,22 +89,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr writer.WriteObjectValue(MacSecConfig, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ExpressRouteLinkData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRoutePortAuthorizationData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRoutePortAuthorizationData.Serialization.cs index dd634e6507fb..06f2753f6458 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRoutePortAuthorizationData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRoutePortAuthorizationData.Serialization.cs @@ -19,6 +19,15 @@ public partial class ExpressRoutePortAuthorizationData : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(ExpressRoutePortAuthorizationData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(AuthorizationKey)) @@ -70,22 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ExpressRoutePortAuthorizationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRoutePortData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRoutePortData.Serialization.cs index 3b84d75a202e..dc3d784f949a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRoutePortData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRoutePortData.Serialization.cs @@ -21,6 +21,15 @@ public partial class ExpressRoutePortData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,7 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(ExpressRoutePortData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); @@ -39,37 +48,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr writer.WritePropertyName("identity"u8); JsonSerializer.Serialize(writer, Identity); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(PeeringLocation)) @@ -143,22 +121,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr writer.WriteStringValue(BillingType.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ExpressRoutePortData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRoutePortsLocationData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRoutePortsLocationData.Serialization.cs index 373b5fda963d..4611fc3c2f91 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRoutePortsLocationData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRoutePortsLocationData.Serialization.cs @@ -19,6 +19,15 @@ public partial class ExpressRoutePortsLocationData : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,38 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(ExpressRoutePortsLocationData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Address)) @@ -86,22 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ExpressRoutePortsLocationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteProviderPortData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteProviderPortData.Serialization.cs index 581a3593b2b8..1b4fa90de47c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteProviderPortData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteProviderPortData.Serialization.cs @@ -19,6 +19,15 @@ public partial class ExpressRouteProviderPortData : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,45 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(ExpressRouteProviderPortData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(PortPairDescriptor)) @@ -108,22 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model writer.WriteNumberValue(RemainingBandwidthInMbps.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ExpressRouteProviderPortData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyData.Serialization.cs index 365f1ac02160..4ce4ddcc7bab 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyData.Serialization.cs @@ -21,6 +21,15 @@ public partial class FirewallPolicyData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,7 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(FirewallPolicyData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); @@ -39,37 +48,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("identity"u8); JsonSerializer.Serialize(writer, Identity); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Size)) @@ -168,22 +146,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit writer.WriteObjectValue(Sku, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } FirewallPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyDraftData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyDraftData.Serialization.cs index b2bb80956c6f..14f64f1b562d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyDraftData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyDraftData.Serialization.cs @@ -20,6 +20,15 @@ public partial class FirewallPolicyDraftData : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,38 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(FirewallPolicyDraftData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(BasePolicy)) @@ -107,22 +85,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade writer.WriteObjectValue(IntrusionDetection, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } FirewallPolicyDraftData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyRuleCollectionGroupData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyRuleCollectionGroupData.Serialization.cs index 58c8aa72a076..e169c1743480 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyRuleCollectionGroupData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyRuleCollectionGroupData.Serialization.cs @@ -19,6 +19,15 @@ public partial class FirewallPolicyRuleCollectionGroupData : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(FirewallPolicyRuleCollectionGroupData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Size)) @@ -75,22 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writ writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } FirewallPolicyRuleCollectionGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyRuleCollectionGroupDraftData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyRuleCollectionGroupDraftData.Serialization.cs index c2b682bcc9a3..d3202a8140f9 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyRuleCollectionGroupDraftData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyRuleCollectionGroupDraftData.Serialization.cs @@ -19,6 +19,15 @@ public partial class FirewallPolicyRuleCollectionGroupDraftData : IUtf8JsonSeria void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,22 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(FirewallPolicyRuleCollectionGroupDraftData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Size)) @@ -65,22 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } FirewallPolicyRuleCollectionGroupDraftData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/FlowLogData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/FlowLogData.Serialization.cs index 0a66c379e315..317aad79532a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/FlowLogData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/FlowLogData.Serialization.cs @@ -20,6 +20,15 @@ public partial class FlowLogData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio throw new FormatException($"The model {nameof(FlowLogData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); @@ -38,37 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio writer.WritePropertyName("identity"u8); JsonSerializer.Serialize(writer, Identity); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(TargetResourceId)) @@ -117,22 +95,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } FlowLogData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/FrontendIPConfigurationData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/FrontendIPConfigurationData.Serialization.cs index 01e3eff8a56e..635b3049b922 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/FrontendIPConfigurationData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/FrontendIPConfigurationData.Serialization.cs @@ -20,6 +20,15 @@ public partial class FrontendIPConfigurationData : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(FrontendIPConfigurationData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); @@ -43,21 +52,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR } writer.WriteEndArray(); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(InboundNatRules)) @@ -141,22 +135,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } FrontendIPConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/HubIPConfigurationData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/HubIPConfigurationData.Serialization.cs index a23b45c1238b..d9ac1ed6a98c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/HubIPConfigurationData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/HubIPConfigurationData.Serialization.cs @@ -19,6 +19,15 @@ public partial class HubIPConfigurationData : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(HubIPConfigurationData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(PrivateIPAddress)) @@ -75,22 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } HubIPConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/HubRouteTableData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/HubRouteTableData.Serialization.cs index 8dc69f5ce08f..78f7821ada4b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/HubRouteTableData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/HubRouteTableData.Serialization.cs @@ -19,6 +19,15 @@ public partial class HubRouteTableData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(HubRouteTableData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsCollectionDefined(Routes)) @@ -95,22 +89,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } HubRouteTableData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/HubVirtualNetworkConnectionData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/HubVirtualNetworkConnectionData.Serialization.cs index 636420186410..19f347425af3 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/HubVirtualNetworkConnectionData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/HubVirtualNetworkConnectionData.Serialization.cs @@ -20,6 +20,15 @@ public partial class HubVirtualNetworkConnectionData : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(HubVirtualNetworkConnectionData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(RemoteVirtualNetwork)) @@ -81,22 +75,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } HubVirtualNetworkConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/IPAllocationData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/IPAllocationData.Serialization.cs index 777cac067c40..12ad7cd2bee7 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/IPAllocationData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/IPAllocationData.Serialization.cs @@ -20,6 +20,15 @@ public partial class IPAllocationData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,43 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(IPAllocationData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Subnet)) @@ -120,22 +98,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter writer.WriteEndObject(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } IPAllocationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/IPGroupData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/IPGroupData.Serialization.cs index c67e0d578408..d2c5a377210f 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/IPGroupData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/IPGroupData.Serialization.cs @@ -20,6 +20,15 @@ public partial class IPGroupData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,43 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio throw new FormatException($"The model {nameof(IPGroupData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) @@ -102,22 +80,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } IPGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/InboundNatRuleData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/InboundNatRuleData.Serialization.cs index fc4bf95f27b6..69f448f14b9e 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/InboundNatRuleData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/InboundNatRuleData.Serialization.cs @@ -20,6 +20,15 @@ public partial class InboundNatRuleData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(InboundNatRuleData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(FrontendIPConfiguration)) @@ -111,22 +105,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } InboundNatRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/InboundSecurityRuleData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/InboundSecurityRuleData.Serialization.cs index cabaf010d0d5..308d1c8ff275 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/InboundSecurityRuleData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/InboundSecurityRuleData.Serialization.cs @@ -19,6 +19,15 @@ public partial class InboundSecurityRuleData : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(InboundSecurityRuleData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(RuleType)) @@ -70,22 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } InboundSecurityRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/LoadBalancerData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/LoadBalancerData.Serialization.cs index 34a92b4a4b95..4dc58f9b3d5c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/LoadBalancerData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/LoadBalancerData.Serialization.cs @@ -20,6 +20,15 @@ public partial class LoadBalancerData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(LoadBalancerData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(ExtendedLocation)) { writer.WritePropertyName("extendedLocation"u8); @@ -43,37 +52,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsCollectionDefined(FrontendIPConfigurations)) @@ -157,22 +135,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } LoadBalancerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/LoadBalancingRuleData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/LoadBalancingRuleData.Serialization.cs index 93bd54556456..b601822565af 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/LoadBalancingRuleData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/LoadBalancingRuleData.Serialization.cs @@ -20,6 +20,15 @@ public partial class LoadBalancingRuleData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(LoadBalancingRuleData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(FrontendIPConfiguration)) @@ -121,22 +115,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } LoadBalancingRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/LocalNetworkGatewayData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/LocalNetworkGatewayData.Serialization.cs index 78aa0c8e2025..1b22a15a0257 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/LocalNetworkGatewayData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/LocalNetworkGatewayData.Serialization.cs @@ -19,6 +19,15 @@ public partial class LocalNetworkGatewayData : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,43 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(LocalNetworkGatewayData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(LocalNetworkAddressSpace)) @@ -96,22 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } LocalNetworkGatewayData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AadAuthenticationParameters.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AadAuthenticationParameters.Serialization.cs index 0ac04f18ae83..dd7aaf3bfbd3 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AadAuthenticationParameters.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AadAuthenticationParameters.Serialization.cs @@ -18,6 +18,15 @@ public partial class AadAuthenticationParameters : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(AadAuthenticationParameters)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(AadTenant)) { writer.WritePropertyName("aadTenant"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } AadAuthenticationParameters IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ActiveBaseSecurityAdminRule.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ActiveBaseSecurityAdminRule.Serialization.cs index 9be2695f42d3..c2af9e87db70 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ActiveBaseSecurityAdminRule.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ActiveBaseSecurityAdminRule.Serialization.cs @@ -18,6 +18,15 @@ public partial class ActiveBaseSecurityAdminRule : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(ActiveBaseSecurityAdminRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -88,7 +96,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } ActiveBaseSecurityAdminRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ActiveConfigurationContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ActiveConfigurationContent.Serialization.cs index 0b427274ff08..b91761a2c67c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ActiveConfigurationContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ActiveConfigurationContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class ActiveConfigurationContent : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(ActiveConfigurationContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Regions)) { writer.WritePropertyName("regions"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } ActiveConfigurationContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ActiveConnectivityConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ActiveConnectivityConfiguration.Serialization.cs index c0584037a953..be2879f5bfdc 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ActiveConnectivityConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ActiveConnectivityConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class ActiveConnectivityConfiguration : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(ActiveConnectivityConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(CommittedOn)) { writer.WritePropertyName("commitTime"u8); @@ -36,90 +45,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo writer.WritePropertyName("region"u8); writer.WriteStringValue(Region.Value); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsCollectionDefined(ConfigurationGroups)) - { - writer.WritePropertyName("configurationGroups"u8); - writer.WriteStartArray(); - foreach (var item in ConfigurationGroups) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - writer.WritePropertyName("properties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(ConnectivityTopology)) - { - writer.WritePropertyName("connectivityTopology"u8); - writer.WriteStringValue(ConnectivityTopology.Value.ToString()); - } - if (Optional.IsCollectionDefined(Hubs)) - { - writer.WritePropertyName("hubs"u8); - writer.WriteStartArray(); - foreach (var item in Hubs) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(IsGlobal)) - { - writer.WritePropertyName("isGlobal"u8); - writer.WriteStringValue(IsGlobal.Value.ToString()); - } - if (Optional.IsCollectionDefined(AppliesToGroups)) - { - writer.WritePropertyName("appliesToGroups"u8); - writer.WriteStartArray(); - foreach (var item in AppliesToGroups) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) - { - writer.WritePropertyName("provisioningState"u8); - writer.WriteStringValue(ProvisioningState.Value.ToString()); - } - if (Optional.IsDefined(DeleteExistingPeering)) - { - writer.WritePropertyName("deleteExistingPeering"u8); - writer.WriteStringValue(DeleteExistingPeering.Value.ToString()); - } - if (options.Format != "W" && Optional.IsDefined(ResourceGuid)) - { - writer.WritePropertyName("resourceGuid"u8); - writer.WriteStringValue(ResourceGuid.Value); - } - writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ActiveConnectivityConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ActiveConnectivityConfigurationsListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ActiveConnectivityConfigurationsListResult.Serialization.cs index 44c977d7245c..f800dfb395b1 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ActiveConnectivityConfigurationsListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ActiveConnectivityConfigurationsListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ActiveConnectivityConfigurationsListResult : IUtf8JsonSer void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(ActiveConnectivityConfigurationsListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } ActiveConnectivityConfigurationsListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ActiveDefaultSecurityAdminRule.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ActiveDefaultSecurityAdminRule.Serialization.cs index 24d9908a83d1..b8cc558a7a5f 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ActiveDefaultSecurityAdminRule.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ActiveDefaultSecurityAdminRule.Serialization.cs @@ -18,6 +18,15 @@ public partial class ActiveDefaultSecurityAdminRule : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,54 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(ActiveDefaultSecurityAdminRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(CommitOn)) - { - writer.WritePropertyName("commitTime"u8); - writer.WriteStringValue(CommitOn.Value, "O"); - } - if (Optional.IsDefined(Region)) - { - writer.WritePropertyName("region"u8); - writer.WriteStringValue(Region); - } - if (Optional.IsDefined(ConfigurationDescription)) - { - writer.WritePropertyName("configurationDescription"u8); - writer.WriteStringValue(ConfigurationDescription); - } - if (Optional.IsDefined(RuleCollectionDescription)) - { - writer.WritePropertyName("ruleCollectionDescription"u8); - writer.WriteStringValue(RuleCollectionDescription); - } - if (Optional.IsCollectionDefined(RuleCollectionAppliesToGroups)) - { - writer.WritePropertyName("ruleCollectionAppliesToGroups"u8); - writer.WriteStartArray(); - foreach (var item in RuleCollectionAppliesToGroups) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(RuleGroups)) - { - writer.WritePropertyName("ruleGroups"u8); - writer.WriteStartArray(); - foreach (var item in RuleGroups) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Description)) @@ -156,22 +118,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod writer.WriteStringValue(ResourceGuid.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ActiveDefaultSecurityAdminRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ActiveSecurityAdminRule.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ActiveSecurityAdminRule.Serialization.cs index d823773bdf55..2405aae6974d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ActiveSecurityAdminRule.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ActiveSecurityAdminRule.Serialization.cs @@ -18,6 +18,15 @@ public partial class ActiveSecurityAdminRule : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,54 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(ActiveSecurityAdminRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(CommitOn)) - { - writer.WritePropertyName("commitTime"u8); - writer.WriteStringValue(CommitOn.Value, "O"); - } - if (Optional.IsDefined(Region)) - { - writer.WritePropertyName("region"u8); - writer.WriteStringValue(Region); - } - if (Optional.IsDefined(ConfigurationDescription)) - { - writer.WritePropertyName("configurationDescription"u8); - writer.WriteStringValue(ConfigurationDescription); - } - if (Optional.IsDefined(RuleCollectionDescription)) - { - writer.WritePropertyName("ruleCollectionDescription"u8); - writer.WriteStringValue(RuleCollectionDescription); - } - if (Optional.IsCollectionDefined(RuleCollectionAppliesToGroups)) - { - writer.WritePropertyName("ruleCollectionAppliesToGroups"u8); - writer.WriteStartArray(); - foreach (var item in RuleCollectionAppliesToGroups) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(RuleGroups)) - { - writer.WritePropertyName("ruleGroups"u8); - writer.WriteStartArray(); - foreach (var item in RuleGroups) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Description)) @@ -151,22 +113,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade writer.WriteStringValue(ResourceGuid.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ActiveSecurityAdminRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ActiveSecurityAdminRulesListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ActiveSecurityAdminRulesListResult.Serialization.cs index 87d965e86a02..1ac8bf684c36 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ActiveSecurityAdminRulesListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ActiveSecurityAdminRulesListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ActiveSecurityAdminRulesListResult : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(ActiveSecurityAdminRulesListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } ActiveSecurityAdminRulesListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AddressPrefixItem.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AddressPrefixItem.Serialization.cs index ec9fd52cbd57..332a5b391a4d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AddressPrefixItem.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AddressPrefixItem.Serialization.cs @@ -18,6 +18,15 @@ public partial class AddressPrefixItem : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(AddressPrefixItem)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(AddressPrefix)) { writer.WritePropertyName("addressPrefix"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } AddressPrefixItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AddressSpace.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AddressSpace.Serialization.cs index 436403a470e7..8271292be0f9 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AddressSpace.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AddressSpace.Serialization.cs @@ -18,6 +18,15 @@ internal partial class AddressSpace : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(AddressSpace)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(AddressPrefixes)) { writer.WritePropertyName("addressPrefixes"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti #endif } } - writer.WriteEndObject(); } AddressSpace IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AdminRuleGroupListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AdminRuleGroupListResult.Serialization.cs index e3689fb6f496..b8e5212221ee 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AdminRuleGroupListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AdminRuleGroupListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class AdminRuleGroupListResult : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(AdminRuleGroupListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } AdminRuleGroupListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AdminRuleListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AdminRuleListResult.Serialization.cs index e79a8cf83a91..9c5cce4b61ac 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AdminRuleListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AdminRuleListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class AdminRuleListResult : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(AdminRuleListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } AdminRuleListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayAuthenticationCertificate.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayAuthenticationCertificate.Serialization.cs index 446d7625b14c..1545c5367134 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayAuthenticationCertificate.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayAuthenticationCertificate.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewayAuthenticationCertificate : IUtf8JsonSeri void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,27 +34,12 @@ void IJsonModel.Write(Utf8JsonWrite throw new FormatException($"The model {nameof(ApplicationGatewayAuthenticationCertificate)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Data)) @@ -66,22 +60,6 @@ void IJsonModel.Write(Utf8JsonWrite writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ApplicationGatewayAuthenticationCertificate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayAutoscaleConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayAutoscaleConfiguration.Serialization.cs index bbf97fc0e972..3d4dbb4cc2d2 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayAutoscaleConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayAutoscaleConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewayAutoscaleConfiguration : IUtf8JsonSeriali void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter w throw new FormatException($"The model {nameof(ApplicationGatewayAutoscaleConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("minCapacity"u8); writer.WriteNumberValue(MinCapacity); if (Optional.IsDefined(MaxCapacity)) @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter w #endif } } - writer.WriteEndObject(); } ApplicationGatewayAutoscaleConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayAvailableSslOptionsInfo.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayAvailableSslOptionsInfo.Serialization.cs index 78096e37b89c..a85abb7906ce 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayAvailableSslOptionsInfo.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayAvailableSslOptionsInfo.Serialization.cs @@ -17,6 +17,15 @@ public partial class ApplicationGatewayAvailableSslOptionsInfo : IUtf8JsonSerial void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -24,38 +33,7 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(ApplicationGatewayAvailableSslOptionsInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsCollectionDefined(PredefinedPolicies)) @@ -94,22 +72,6 @@ void IJsonModel.Write(Utf8JsonWriter writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ApplicationGatewayAvailableSslOptionsInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayAvailableSslPredefinedPolicies.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayAvailableSslPredefinedPolicies.Serialization.cs index f5a7cba763e9..cb0ff47044b8 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayAvailableSslPredefinedPolicies.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayAvailableSslPredefinedPolicies.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ApplicationGatewayAvailableSslPredefinedPolicies : IUtf8J void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8Json throw new FormatException($"The model {nameof(ApplicationGatewayAvailableSslPredefinedPolicies)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8Json #endif } } - writer.WriteEndObject(); } ApplicationGatewayAvailableSslPredefinedPolicies IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayAvailableWafRuleSetsResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayAvailableWafRuleSetsResult.Serialization.cs index b659a7028e0f..a1282617f9d3 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayAvailableWafRuleSetsResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayAvailableWafRuleSetsResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ApplicationGatewayAvailableWafRuleSetsResult : IUtf8JsonS void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWrit throw new FormatException($"The model {nameof(ApplicationGatewayAvailableWafRuleSetsResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWrit #endif } } - writer.WriteEndObject(); } ApplicationGatewayAvailableWafRuleSetsResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendAddress.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendAddress.Serialization.cs index bc521affc443..1f8f5d82ca7d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendAddress.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendAddress.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewayBackendAddress : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(ApplicationGatewayBackendAddress)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Fqdn)) { writer.WritePropertyName("fqdn"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } ApplicationGatewayBackendAddress IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendAddressPool.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendAddressPool.Serialization.cs index 42e234e3c691..04684e98c852 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendAddressPool.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendAddressPool.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewayBackendAddressPool : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,27 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(ApplicationGatewayBackendAddressPool)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(BackendIPConfigurations)) @@ -74,22 +68,6 @@ void IJsonModel.Write(Utf8JsonWriter write writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ApplicationGatewayBackendAddressPool IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendHealth.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendHealth.Serialization.cs index c0c2e7b23741..03ac568ac5ac 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendHealth.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendHealth.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewayBackendHealth : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(ApplicationGatewayBackendHealth)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(BackendAddressPools)) { writer.WritePropertyName("backendAddressPools"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } ApplicationGatewayBackendHealth IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendHealthHttpSettings.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendHealthHttpSettings.Serialization.cs index 4c7b008d30ab..74d62bf20aa3 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendHealthHttpSettings.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendHealthHttpSettings.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewayBackendHealthHttpSettings : IUtf8JsonSeri void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWrite throw new FormatException($"The model {nameof(ApplicationGatewayBackendHealthHttpSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(BackendHttpSettings)) { writer.WritePropertyName("backendHttpSettings"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWrite #endif } } - writer.WriteEndObject(); } ApplicationGatewayBackendHealthHttpSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendHealthOnDemand.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendHealthOnDemand.Serialization.cs index 3f0d1484e30c..18da99fc449c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendHealthOnDemand.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendHealthOnDemand.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewayBackendHealthOnDemand : IUtf8JsonSerializ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wr throw new FormatException($"The model {nameof(ApplicationGatewayBackendHealthOnDemand)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(BackendAddressPool)) { writer.WritePropertyName("backendAddressPool"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter wr #endif } } - writer.WriteEndObject(); } ApplicationGatewayBackendHealthOnDemand IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendHealthPool.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendHealthPool.Serialization.cs index 3243c4839089..1344ba190d9f 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendHealthPool.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendHealthPool.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewayBackendHealthPool : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(ApplicationGatewayBackendHealthPool)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(BackendAddressPool)) { writer.WritePropertyName("backendAddressPool"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } ApplicationGatewayBackendHealthPool IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendHealthServer.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendHealthServer.Serialization.cs index 695999f8c04d..44f26a292784 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendHealthServer.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendHealthServer.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewayBackendHealthServer : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(ApplicationGatewayBackendHealthServer)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Address)) { writer.WritePropertyName("address"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } ApplicationGatewayBackendHealthServer IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendHttpSettings.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendHttpSettings.Serialization.cs index ad851e8ea3c7..a17718a69555 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendHttpSettings.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendHttpSettings.Serialization.cs @@ -19,6 +19,15 @@ public partial class ApplicationGatewayBackendHttpSettings : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(ApplicationGatewayBackendHttpSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Port)) @@ -130,22 +124,6 @@ void IJsonModel.Write(Utf8JsonWriter writ writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ApplicationGatewayBackendHttpSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendSettings.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendSettings.Serialization.cs index b5eb4623cf14..d632d34e633c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendSettings.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendSettings.Serialization.cs @@ -19,6 +19,15 @@ public partial class ApplicationGatewayBackendSettings : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(ApplicationGatewayBackendSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Port)) @@ -95,22 +89,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ApplicationGatewayBackendSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayClientAuthConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayClientAuthConfiguration.Serialization.cs index 686d8c819ba5..e35a19a0f78a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayClientAuthConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayClientAuthConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewayClientAuthConfiguration : IUtf8JsonSerial void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(ApplicationGatewayClientAuthConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(VerifyClientCertIssuerDN)) { writer.WritePropertyName("verifyClientCertIssuerDN"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } ApplicationGatewayClientAuthConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayConnectionDraining.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayConnectionDraining.Serialization.cs index c84800ceb57f..0c358adba200 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayConnectionDraining.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayConnectionDraining.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewayConnectionDraining : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(ApplicationGatewayConnectionDraining)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("enabled"u8); writer.WriteBooleanValue(Enabled); writer.WritePropertyName("drainTimeoutInSec"u8); @@ -45,7 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } ApplicationGatewayConnectionDraining IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayCustomError.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayCustomError.Serialization.cs index 30e289339bb2..839ac436f702 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayCustomError.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayCustomError.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewayCustomError : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(ApplicationGatewayCustomError)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(StatusCode)) { writer.WritePropertyName("statusCode"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } ApplicationGatewayCustomError IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayFirewallDisabledRuleGroup.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayFirewallDisabledRuleGroup.Serialization.cs index 95b19b202f8c..7e0be1a64297 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayFirewallDisabledRuleGroup.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayFirewallDisabledRuleGroup.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewayFirewallDisabledRuleGroup : IUtf8JsonSeri void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWrite throw new FormatException($"The model {nameof(ApplicationGatewayFirewallDisabledRuleGroup)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("ruleGroupName"u8); writer.WriteStringValue(RuleGroupName); if (Optional.IsCollectionDefined(Rules)) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWrite #endif } } - writer.WriteEndObject(); } ApplicationGatewayFirewallDisabledRuleGroup IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayFirewallExclusion.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayFirewallExclusion.Serialization.cs index 02cb1dd6d760..e3e4ce3a5e54 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayFirewallExclusion.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayFirewallExclusion.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewayFirewallExclusion : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(ApplicationGatewayFirewallExclusion)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("matchVariable"u8); writer.WriteStringValue(MatchVariable); writer.WritePropertyName("selectorMatchOperator"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } ApplicationGatewayFirewallExclusion IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayFirewallManifestRuleSet.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayFirewallManifestRuleSet.Serialization.cs index fdd3b707b783..478ff51ad605 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayFirewallManifestRuleSet.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayFirewallManifestRuleSet.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewayFirewallManifestRuleSet : IUtf8JsonSerial void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(ApplicationGatewayFirewallManifestRuleSet)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("ruleSetType"u8); writer.WriteStringValue(RuleSetType); writer.WritePropertyName("ruleSetVersion"u8); @@ -67,7 +75,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } ApplicationGatewayFirewallManifestRuleSet IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayFirewallRule.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayFirewallRule.Serialization.cs index 254b01327f76..4e144c5bb138 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayFirewallRule.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayFirewallRule.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewayFirewallRule : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(ApplicationGatewayFirewallRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("ruleId"u8); writer.WriteNumberValue(RuleId); if (Optional.IsDefined(RuleIdString)) @@ -68,7 +76,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } ApplicationGatewayFirewallRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayFirewallRuleGroup.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayFirewallRuleGroup.Serialization.cs index ac71387d11e1..36379a31148c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayFirewallRuleGroup.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayFirewallRuleGroup.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewayFirewallRuleGroup : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(ApplicationGatewayFirewallRuleGroup)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("ruleGroupName"u8); writer.WriteStringValue(RuleGroupName); if (Optional.IsDefined(Description)) @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } ApplicationGatewayFirewallRuleGroup IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayFirewallRuleSet.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayFirewallRuleSet.Serialization.cs index ba3cfb31be85..37dc754698da 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayFirewallRuleSet.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayFirewallRuleSet.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewayFirewallRuleSet : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,38 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(ApplicationGatewayFirewallRuleSet)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) @@ -95,22 +73,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ApplicationGatewayFirewallRuleSet IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayFrontendIPConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayFrontendIPConfiguration.Serialization.cs index 3b6b8e82c911..de8a44f064d7 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayFrontendIPConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayFrontendIPConfiguration.Serialization.cs @@ -19,6 +19,15 @@ public partial class ApplicationGatewayFrontendIPConfiguration : IUtf8JsonSerial void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(ApplicationGatewayFrontendIPConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(PrivateIPAddress)) @@ -80,22 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ApplicationGatewayFrontendIPConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayFrontendPort.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayFrontendPort.Serialization.cs index ee1c51f750a3..4132336ffea8 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayFrontendPort.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayFrontendPort.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewayFrontendPort : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,27 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(ApplicationGatewayFrontendPort)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Port)) @@ -59,22 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ApplicationGatewayFrontendPort IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayGlobalConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayGlobalConfiguration.Serialization.cs index 0f8e8e354913..e62f4fcb54e1 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayGlobalConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayGlobalConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewayGlobalConfiguration : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(ApplicationGatewayGlobalConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(EnableRequestBuffering)) { writer.WritePropertyName("enableRequestBuffering"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } ApplicationGatewayGlobalConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayHeaderConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayHeaderConfiguration.Serialization.cs index 904608110f8b..3f882c1a4ef9 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayHeaderConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayHeaderConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewayHeaderConfiguration : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(ApplicationGatewayHeaderConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(HeaderName)) { writer.WritePropertyName("headerName"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } ApplicationGatewayHeaderConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayHttpListener.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayHttpListener.Serialization.cs index 5f79ad05ab57..ae434784f9a8 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayHttpListener.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayHttpListener.Serialization.cs @@ -19,6 +19,15 @@ public partial class ApplicationGatewayHttpListener : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(ApplicationGatewayHttpListener)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(FrontendIPConfiguration)) @@ -115,22 +109,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ApplicationGatewayHttpListener IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayIPConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayIPConfiguration.Serialization.cs index 0feeb2356147..3376d847d89d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayIPConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayIPConfiguration.Serialization.cs @@ -19,6 +19,15 @@ public partial class ApplicationGatewayIPConfiguration : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(ApplicationGatewayIPConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Subnet)) @@ -60,22 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ApplicationGatewayIPConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayListResult.Serialization.cs index 60a081daa528..9a488754e1ae 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ApplicationGatewayListResult : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(ApplicationGatewayListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } ApplicationGatewayListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayListener.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayListener.Serialization.cs index 40d499551628..7c742bc8a418 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayListener.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayListener.Serialization.cs @@ -19,6 +19,15 @@ public partial class ApplicationGatewayListener : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(ApplicationGatewayListener)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(FrontendIPConfiguration)) @@ -90,22 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ApplicationGatewayListener IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayLoadDistributionPolicy.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayLoadDistributionPolicy.Serialization.cs index 3804f8c928bd..e084281fa72a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayLoadDistributionPolicy.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayLoadDistributionPolicy.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewayLoadDistributionPolicy : IUtf8JsonSeriali void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,27 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter w throw new FormatException($"The model {nameof(ApplicationGatewayLoadDistributionPolicy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsCollectionDefined(LoadDistributionTargets)) @@ -69,22 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter w writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ApplicationGatewayLoadDistributionPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayLoadDistributionTarget.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayLoadDistributionTarget.Serialization.cs index f5add539fc3e..e594a69af6d9 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayLoadDistributionTarget.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayLoadDistributionTarget.Serialization.cs @@ -19,6 +19,15 @@ public partial class ApplicationGatewayLoadDistributionTarget : IUtf8JsonSeriali void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter w throw new FormatException($"The model {nameof(ApplicationGatewayLoadDistributionTarget)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(WeightPerServer)) @@ -60,22 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter w JsonSerializer.Serialize(writer, BackendAddressPool); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ApplicationGatewayLoadDistributionTarget IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayOnDemandProbe.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayOnDemandProbe.Serialization.cs index 690f92f686bf..3a5a934b2a10 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayOnDemandProbe.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayOnDemandProbe.Serialization.cs @@ -19,6 +19,15 @@ public partial class ApplicationGatewayOnDemandProbe : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(ApplicationGatewayOnDemandProbe)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Protocol)) { writer.WritePropertyName("protocol"u8); @@ -82,7 +90,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } ApplicationGatewayOnDemandProbe IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayPathRule.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayPathRule.Serialization.cs index 2657115eae7c..f6c58f2fb8db 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayPathRule.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayPathRule.Serialization.cs @@ -19,6 +19,15 @@ public partial class ApplicationGatewayPathRule : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(ApplicationGatewayPathRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsCollectionDefined(Paths)) @@ -95,22 +89,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe JsonSerializer.Serialize(writer, FirewallPolicy); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ApplicationGatewayPathRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayPrivateEndpointConnectionListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayPrivateEndpointConnectionListResult.Serialization.cs index 6f508c8b4dcd..4ee79f41ab4d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayPrivateEndpointConnectionListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayPrivateEndpointConnectionListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ApplicationGatewayPrivateEndpointConnectionListResult : I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf throw new FormatException($"The model {nameof(ApplicationGatewayPrivateEndpointConnectionListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf #endif } } - writer.WriteEndObject(); } ApplicationGatewayPrivateEndpointConnectionListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayPrivateLinkConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayPrivateLinkConfiguration.Serialization.cs index 7fa5c74806c7..07dbdc8ca8de 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayPrivateLinkConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayPrivateLinkConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewayPrivateLinkConfiguration : IUtf8JsonSeria void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,27 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(ApplicationGatewayPrivateLinkConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsCollectionDefined(IPConfigurations)) @@ -64,22 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ApplicationGatewayPrivateLinkConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayPrivateLinkIPConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayPrivateLinkIPConfiguration.Serialization.cs index b92bc44bbadb..2b1c0eaa97ef 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayPrivateLinkIPConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayPrivateLinkIPConfiguration.Serialization.cs @@ -19,6 +19,15 @@ public partial class ApplicationGatewayPrivateLinkIPConfiguration : IUtf8JsonSer void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWrit throw new FormatException($"The model {nameof(ApplicationGatewayPrivateLinkIPConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(PrivateIPAddress)) @@ -75,22 +69,6 @@ void IJsonModel.Write(Utf8JsonWrit writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ApplicationGatewayPrivateLinkIPConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayPrivateLinkResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayPrivateLinkResource.Serialization.cs index e751e56046f0..9ffae25b937f 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayPrivateLinkResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayPrivateLinkResource.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewayPrivateLinkResource : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,27 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(ApplicationGatewayPrivateLinkResource)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(GroupId)) @@ -74,22 +68,6 @@ void IJsonModel.Write(Utf8JsonWriter writ writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ApplicationGatewayPrivateLinkResource IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayPrivateLinkResourceListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayPrivateLinkResourceListResult.Serialization.cs index 34c164fc847c..f9e5e9dfd01c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayPrivateLinkResourceListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayPrivateLinkResourceListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ApplicationGatewayPrivateLinkResourceListResult : IUtf8Js void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonW throw new FormatException($"The model {nameof(ApplicationGatewayPrivateLinkResourceListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonW #endif } } - writer.WriteEndObject(); } ApplicationGatewayPrivateLinkResourceListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayProbe.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayProbe.Serialization.cs index 2a2b4f96d700..03c91d7da983 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayProbe.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayProbe.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewayProbe : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,27 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(ApplicationGatewayProbe)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Protocol)) @@ -109,22 +103,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade writer.WriteNumberValue(Port.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ApplicationGatewayProbe IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayProbeHealthResponseMatch.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayProbeHealthResponseMatch.Serialization.cs index 966b090ab3cf..469217850b6c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayProbeHealthResponseMatch.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayProbeHealthResponseMatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewayProbeHealthResponseMatch : IUtf8JsonSeria void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(ApplicationGatewayProbeHealthResponseMatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Body)) { writer.WritePropertyName("body"u8); @@ -63,7 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } ApplicationGatewayProbeHealthResponseMatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayRedirectConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayRedirectConfiguration.Serialization.cs index e2bd7feaa615..77db83591d18 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayRedirectConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayRedirectConfiguration.Serialization.cs @@ -19,6 +19,15 @@ public partial class ApplicationGatewayRedirectConfiguration : IUtf8JsonSerializ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter wr throw new FormatException($"The model {nameof(ApplicationGatewayRedirectConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(RedirectType)) @@ -105,22 +99,6 @@ void IJsonModel.Write(Utf8JsonWriter wr writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ApplicationGatewayRedirectConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayRequestRoutingRule.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayRequestRoutingRule.Serialization.cs index e4963d10e31d..bfa7f92c5084 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayRequestRoutingRule.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayRequestRoutingRule.Serialization.cs @@ -19,6 +19,15 @@ public partial class ApplicationGatewayRequestRoutingRule : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(ApplicationGatewayRequestRoutingRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(RuleType)) @@ -100,22 +94,6 @@ void IJsonModel.Write(Utf8JsonWriter write writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ApplicationGatewayRequestRoutingRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayRewriteRule.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayRewriteRule.Serialization.cs index 91c2b46c23fc..eab45940e693 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayRewriteRule.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayRewriteRule.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewayRewriteRule : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(ApplicationGatewayRewriteRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } ApplicationGatewayRewriteRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayRewriteRuleActionSet.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayRewriteRuleActionSet.Serialization.cs index e36e46a9c073..71affe2ba508 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayRewriteRuleActionSet.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayRewriteRuleActionSet.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewayRewriteRuleActionSet : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(ApplicationGatewayRewriteRuleActionSet)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(RequestHeaderConfigurations)) { writer.WritePropertyName("requestHeaderConfigurations"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } ApplicationGatewayRewriteRuleActionSet IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayRewriteRuleCondition.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayRewriteRuleCondition.Serialization.cs index c7c606dbcbbb..b24d9e391912 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayRewriteRuleCondition.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayRewriteRuleCondition.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewayRewriteRuleCondition : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(ApplicationGatewayRewriteRuleCondition)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Variable)) { writer.WritePropertyName("variable"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } ApplicationGatewayRewriteRuleCondition IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayRewriteRuleSet.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayRewriteRuleSet.Serialization.cs index 5a238488b13d..a637ea6def1c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayRewriteRuleSet.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayRewriteRuleSet.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewayRewriteRuleSet : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,27 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(ApplicationGatewayRewriteRuleSet)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsCollectionDefined(RewriteRules)) @@ -64,22 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ApplicationGatewayRewriteRuleSet IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayRoutingRule.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayRoutingRule.Serialization.cs index 5565ec725df0..f6a2540025c1 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayRoutingRule.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayRoutingRule.Serialization.cs @@ -19,6 +19,15 @@ public partial class ApplicationGatewayRoutingRule : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(ApplicationGatewayRoutingRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(RuleType)) @@ -80,22 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ApplicationGatewayRoutingRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewaySku.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewaySku.Serialization.cs index 14afbd6f1b6a..353717ffc5b8 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewaySku.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewaySku.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewaySku : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(ApplicationGatewaySku)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } ApplicationGatewaySku IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewaySslCertificate.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewaySslCertificate.Serialization.cs index 334179ef34d7..8d040a068064 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewaySslCertificate.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewaySslCertificate.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewaySslCertificate : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,27 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(ApplicationGatewaySslCertificate)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Data)) @@ -88,22 +82,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ApplicationGatewaySslCertificate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewaySslPolicy.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewaySslPolicy.Serialization.cs index 0325e8510d0a..a0c48347301a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewaySslPolicy.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewaySslPolicy.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewaySslPolicy : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(ApplicationGatewaySslPolicy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(DisabledSslProtocols)) { writer.WritePropertyName("disabledSslProtocols"u8); @@ -76,7 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } ApplicationGatewaySslPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewaySslPredefinedPolicy.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewaySslPredefinedPolicy.Serialization.cs index 79b28a8e0f75..f890279c34f5 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewaySslPredefinedPolicy.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewaySslPredefinedPolicy.Serialization.cs @@ -17,6 +17,15 @@ public partial class ApplicationGatewaySslPredefinedPolicy : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -24,22 +33,7 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(ApplicationGatewaySslPredefinedPolicy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsCollectionDefined(CipherSuites)) @@ -58,22 +52,6 @@ void IJsonModel.Write(Utf8JsonWriter writ writer.WriteStringValue(MinProtocolVersion.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ApplicationGatewaySslPredefinedPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewaySslProfile.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewaySslProfile.Serialization.cs index d5eb35f4b894..dc9fec98149c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewaySslProfile.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewaySslProfile.Serialization.cs @@ -19,6 +19,15 @@ public partial class ApplicationGatewaySslProfile : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(ApplicationGatewaySslProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsCollectionDefined(TrustedClientCertificates)) @@ -75,22 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ApplicationGatewaySslProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayTrustedClientCertificate.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayTrustedClientCertificate.Serialization.cs index 5efb9daa0450..d91374add36c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayTrustedClientCertificate.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayTrustedClientCertificate.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewayTrustedClientCertificate : IUtf8JsonSeria void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,27 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(ApplicationGatewayTrustedClientCertificate)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Data)) @@ -83,22 +77,6 @@ void IJsonModel.Write(Utf8JsonWriter writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ApplicationGatewayTrustedClientCertificate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayTrustedRootCertificate.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayTrustedRootCertificate.Serialization.cs index 5ac617c0d05b..2784bfedb3fd 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayTrustedRootCertificate.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayTrustedRootCertificate.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewayTrustedRootCertificate : IUtf8JsonSeriali void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,27 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter w throw new FormatException($"The model {nameof(ApplicationGatewayTrustedRootCertificate)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Data)) @@ -71,22 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter w writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ApplicationGatewayTrustedRootCertificate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayUrlConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayUrlConfiguration.Serialization.cs index b00d69cae7d7..f71f38109675 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayUrlConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayUrlConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewayUrlConfiguration : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(ApplicationGatewayUrlConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ModifiedPath)) { writer.WritePropertyName("modifiedPath"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } ApplicationGatewayUrlConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayUrlPathMap.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayUrlPathMap.Serialization.cs index a9453aa53f94..0bb26f115712 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayUrlPathMap.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayUrlPathMap.Serialization.cs @@ -19,6 +19,15 @@ public partial class ApplicationGatewayUrlPathMap : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(ApplicationGatewayUrlPathMap)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(DefaultBackendAddressPool)) @@ -90,22 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ApplicationGatewayUrlPathMap IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayWafDynamicManifestListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayWafDynamicManifestListResult.Serialization.cs index 92ad75848caf..91d953a6ce5a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayWafDynamicManifestListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayWafDynamicManifestListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ApplicationGatewayWafDynamicManifestListResult : IUtf8Jso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWr throw new FormatException($"The model {nameof(ApplicationGatewayWafDynamicManifestListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWr #endif } } - writer.WriteEndObject(); } ApplicationGatewayWafDynamicManifestListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayWebApplicationFirewallConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayWebApplicationFirewallConfiguration.Serialization.cs index 0d5d4be33b69..b6bcf0322048 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayWebApplicationFirewallConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayWebApplicationFirewallConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewayWebApplicationFirewallConfiguration : IUt void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf throw new FormatException($"The model {nameof(ApplicationGatewayWebApplicationFirewallConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("enabled"u8); writer.WriteBooleanValue(Enabled); writer.WritePropertyName("firewallMode"u8); @@ -89,7 +97,6 @@ void IJsonModel.Write(Utf #endif } } - writer.WriteEndObject(); } ApplicationGatewayWebApplicationFirewallConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationRule.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationRule.Serialization.cs index cb022203b2d6..1e55ce78055d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationRule.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationRule.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationRule : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(ApplicationRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(SourceAddresses)) { writer.WritePropertyName("sourceAddresses"u8); @@ -121,34 +130,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO } writer.WriteEndArray(); } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - writer.WritePropertyName("ruleType"u8); - writer.WriteStringValue(RuleType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ApplicationRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationSecurityGroupListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationSecurityGroupListResult.Serialization.cs index 4f0370645611..8aaec6a226c2 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationSecurityGroupListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationSecurityGroupListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ApplicationSecurityGroupListResult : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(ApplicationSecurityGroupListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } ApplicationSecurityGroupListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AuthorizationListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AuthorizationListResult.Serialization.cs index b79567c1f388..2c1bd2ee8cec 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AuthorizationListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AuthorizationListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class AuthorizationListResult : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(AuthorizationListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } AuthorizationListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AutoApprovedPrivateLinkService.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AutoApprovedPrivateLinkService.Serialization.cs index 9bf10760b3c7..81941ba0c4f8 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AutoApprovedPrivateLinkService.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AutoApprovedPrivateLinkService.Serialization.cs @@ -18,6 +18,15 @@ public partial class AutoApprovedPrivateLinkService : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(AutoApprovedPrivateLinkService)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(PrivateLinkService)) { writer.WritePropertyName("privateLinkService"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } AutoApprovedPrivateLinkService IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AutoApprovedPrivateLinkServicesResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AutoApprovedPrivateLinkServicesResult.Serialization.cs index 651f935b43ff..e8fcd940d342 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AutoApprovedPrivateLinkServicesResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AutoApprovedPrivateLinkServicesResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class AutoApprovedPrivateLinkServicesResult : IUtf8JsonSerializ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(AutoApprovedPrivateLinkServicesResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } AutoApprovedPrivateLinkServicesResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableDelegation.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableDelegation.Serialization.cs index f752fbf5a8ad..d62107e5c2be 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableDelegation.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableDelegation.Serialization.cs @@ -19,6 +19,15 @@ public partial class AvailableDelegation : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(AvailableDelegation)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(ServiceName)) { writer.WritePropertyName("serviceName"u8); @@ -42,42 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri } writer.WriteEndArray(); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } AvailableDelegation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableDelegationsResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableDelegationsResult.Serialization.cs index ec2d2b395ca5..44e503d2cc6c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableDelegationsResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableDelegationsResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class AvailableDelegationsResult : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(AvailableDelegationsResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } AvailableDelegationsResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailablePrivateEndpointType.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailablePrivateEndpointType.Serialization.cs index 5264fddc919e..116a9404c539 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailablePrivateEndpointType.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailablePrivateEndpointType.Serialization.cs @@ -19,6 +19,15 @@ public partial class AvailablePrivateEndpointType : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(AvailablePrivateEndpointType)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(ResourceName)) { writer.WritePropertyName("resourceName"u8); @@ -37,42 +46,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model writer.WritePropertyName("displayName"u8); writer.WriteStringValue(DisplayName); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } AvailablePrivateEndpointType IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailablePrivateEndpointTypesResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailablePrivateEndpointTypesResult.Serialization.cs index c6a34dae65af..e7dc03f0e4c7 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailablePrivateEndpointTypesResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailablePrivateEndpointTypesResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class AvailablePrivateEndpointTypesResult : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(AvailablePrivateEndpointTypesResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } AvailablePrivateEndpointTypesResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableProvidersList.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableProvidersList.Serialization.cs index 413572114949..e39894acbc87 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableProvidersList.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableProvidersList.Serialization.cs @@ -18,6 +18,15 @@ public partial class AvailableProvidersList : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(AvailableProvidersList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("countries"u8); writer.WriteStartArray(); foreach (var item in Countries) @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } AvailableProvidersList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableProvidersListCity.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableProvidersListCity.Serialization.cs index 5148cb20f82e..ad6883fcf80b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableProvidersListCity.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableProvidersListCity.Serialization.cs @@ -18,6 +18,15 @@ public partial class AvailableProvidersListCity : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(AvailableProvidersListCity)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(CityName)) { writer.WritePropertyName("cityName"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } AvailableProvidersListCity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableProvidersListContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableProvidersListContent.Serialization.cs index d3401a71ebc1..19a992b51b9b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableProvidersListContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableProvidersListContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class AvailableProvidersListContent : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(AvailableProvidersListContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(AzureLocations)) { writer.WritePropertyName("azureLocations"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } AvailableProvidersListContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableProvidersListCountry.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableProvidersListCountry.Serialization.cs index cda42fcb8a37..ee78d7875fca 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableProvidersListCountry.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableProvidersListCountry.Serialization.cs @@ -18,6 +18,15 @@ public partial class AvailableProvidersListCountry : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(AvailableProvidersListCountry)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(CountryName)) { writer.WritePropertyName("countryName"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } AvailableProvidersListCountry IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableProvidersListState.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableProvidersListState.Serialization.cs index ed55e2f1ebe2..9b0ffd1881e8 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableProvidersListState.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableProvidersListState.Serialization.cs @@ -18,6 +18,15 @@ public partial class AvailableProvidersListState : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(AvailableProvidersListState)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(StateName)) { writer.WritePropertyName("stateName"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } AvailableProvidersListState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableServiceAlias.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableServiceAlias.Serialization.cs index 405be3129bea..46ceacff788c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableServiceAlias.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableServiceAlias.Serialization.cs @@ -19,6 +19,15 @@ public partial class AvailableServiceAlias : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,48 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(AvailableServiceAlias)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(ResourceName)) { writer.WritePropertyName("resourceName"u8); writer.WriteStringValue(ResourceName); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } AvailableServiceAlias IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableServiceAliasesResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableServiceAliasesResult.Serialization.cs index 5ac9538e4f50..4bc3446ca45c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableServiceAliasesResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableServiceAliasesResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class AvailableServiceAliasesResult : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(AvailableServiceAliasesResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } AvailableServiceAliasesResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallApplicationRule.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallApplicationRule.Serialization.cs index 90bd4355f098..90ea3478afee 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallApplicationRule.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallApplicationRule.Serialization.cs @@ -18,6 +18,15 @@ public partial class AzureFirewallApplicationRule : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(AzureFirewallApplicationRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -101,7 +109,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } AzureFirewallApplicationRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallApplicationRuleCollectionData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallApplicationRuleCollectionData.Serialization.cs index 5b5ef5984ec4..200938f222a2 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallApplicationRuleCollectionData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallApplicationRuleCollectionData.Serialization.cs @@ -18,6 +18,15 @@ public partial class AzureFirewallApplicationRuleCollectionData : IUtf8JsonSeria void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,27 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(AzureFirewallApplicationRuleCollectionData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Priority)) @@ -74,22 +68,6 @@ void IJsonModel.Write(Utf8JsonWriter writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } AzureFirewallApplicationRuleCollectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallApplicationRuleProtocol.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallApplicationRuleProtocol.Serialization.cs index 0789ac8059fd..4f449913c6d4 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallApplicationRuleProtocol.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallApplicationRuleProtocol.Serialization.cs @@ -18,6 +18,15 @@ public partial class AzureFirewallApplicationRuleProtocol : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(AzureFirewallApplicationRuleProtocol)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ProtocolType)) { writer.WritePropertyName("protocolType"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } AzureFirewallApplicationRuleProtocol IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallAutoscaleConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallAutoscaleConfiguration.Serialization.cs index 9172f4bb14ce..724be4d93fbc 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallAutoscaleConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallAutoscaleConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class AzureFirewallAutoscaleConfiguration : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(AzureFirewallAutoscaleConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(MinCapacity)) { if (MinCapacity != null) @@ -65,7 +73,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } AzureFirewallAutoscaleConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallFqdnTag.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallFqdnTag.Serialization.cs index c8c21386fda8..ccff6dfa0aaf 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallFqdnTag.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallFqdnTag.Serialization.cs @@ -18,6 +18,15 @@ public partial class AzureFirewallFqdnTag : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,43 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(AzureFirewallFqdnTag)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) @@ -75,22 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr writer.WriteStringValue(FqdnTagName); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } AzureFirewallFqdnTag IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallFqdnTagListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallFqdnTagListResult.Serialization.cs index 44e5789fbb65..19542225269b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallFqdnTagListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallFqdnTagListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class AzureFirewallFqdnTagListResult : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(AzureFirewallFqdnTagListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } AzureFirewallFqdnTagListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallIPConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallIPConfiguration.Serialization.cs index 7126782317a4..dce5e762a1b7 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallIPConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallIPConfiguration.Serialization.cs @@ -19,6 +19,15 @@ public partial class AzureFirewallIPConfiguration : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(AzureFirewallIPConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(PrivateIPAddress)) @@ -70,22 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } AzureFirewallIPConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallIPGroups.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallIPGroups.Serialization.cs index 0359a07b4e0b..38cde19ba9c1 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallIPGroups.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallIPGroups.Serialization.cs @@ -18,6 +18,15 @@ public partial class AzureFirewallIPGroups : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(AzureFirewallIPGroups)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } AzureFirewallIPGroups IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallListResult.Serialization.cs index 021f57254d82..9e291c4b5bcd 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class AzureFirewallListResult : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(AzureFirewallListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } AzureFirewallListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallNatRCAction.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallNatRCAction.Serialization.cs index 17fd17858733..757f32f0bce3 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallNatRCAction.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallNatRCAction.Serialization.cs @@ -18,6 +18,15 @@ internal partial class AzureFirewallNatRCAction : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(AzureFirewallNatRCAction)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ActionType)) { writer.WritePropertyName("type"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } AzureFirewallNatRCAction IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallNatRule.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallNatRule.Serialization.cs index 31e12bf48c92..3dddcd20e669 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallNatRule.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallNatRule.Serialization.cs @@ -18,6 +18,15 @@ public partial class AzureFirewallNatRule : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(AzureFirewallNatRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -116,7 +124,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } AzureFirewallNatRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallNatRuleCollectionData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallNatRuleCollectionData.Serialization.cs index ba85a80e6f84..78d7e6ceeffd 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallNatRuleCollectionData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallNatRuleCollectionData.Serialization.cs @@ -18,6 +18,15 @@ public partial class AzureFirewallNatRuleCollectionData : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,27 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(AzureFirewallNatRuleCollectionData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Priority)) @@ -74,22 +68,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } AzureFirewallNatRuleCollectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallNetworkRule.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallNetworkRule.Serialization.cs index dc7bcc860f3e..1ea894550f5c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallNetworkRule.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallNetworkRule.Serialization.cs @@ -18,6 +18,15 @@ public partial class AzureFirewallNetworkRule : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(AzureFirewallNetworkRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -121,7 +129,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } AzureFirewallNetworkRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallNetworkRuleCollectionData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallNetworkRuleCollectionData.Serialization.cs index 3eb67aa70a47..c5443ff4dcd8 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallNetworkRuleCollectionData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallNetworkRuleCollectionData.Serialization.cs @@ -18,6 +18,15 @@ public partial class AzureFirewallNetworkRuleCollectionData : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,27 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(AzureFirewallNetworkRuleCollectionData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Priority)) @@ -74,22 +68,6 @@ void IJsonModel.Write(Utf8JsonWriter wri writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } AzureFirewallNetworkRuleCollectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallPacketCaptureFlags.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallPacketCaptureFlags.Serialization.cs index 91816e446100..ee6423a3cc09 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallPacketCaptureFlags.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallPacketCaptureFlags.Serialization.cs @@ -18,6 +18,15 @@ public partial class AzureFirewallPacketCaptureFlags : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(AzureFirewallPacketCaptureFlags)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(FlagsType)) { writer.WritePropertyName("type"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } AzureFirewallPacketCaptureFlags IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallPacketCaptureRule.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallPacketCaptureRule.Serialization.cs index 76fd31e9d078..e746857b8f06 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallPacketCaptureRule.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallPacketCaptureRule.Serialization.cs @@ -18,6 +18,15 @@ public partial class AzureFirewallPacketCaptureRule : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(AzureFirewallPacketCaptureRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Sources)) { writer.WritePropertyName("sources"u8); @@ -71,7 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } AzureFirewallPacketCaptureRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallPublicIPAddress.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallPublicIPAddress.Serialization.cs index 65213e0b9626..8dd69f9511c9 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallPublicIPAddress.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallPublicIPAddress.Serialization.cs @@ -18,6 +18,15 @@ public partial class AzureFirewallPublicIPAddress : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(AzureFirewallPublicIPAddress)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Address)) { writer.WritePropertyName("address"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } AzureFirewallPublicIPAddress IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallRCAction.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallRCAction.Serialization.cs index 1645db1d90f7..df2336c93848 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallRCAction.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallRCAction.Serialization.cs @@ -18,6 +18,15 @@ internal partial class AzureFirewallRCAction : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(AzureFirewallRCAction)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ActionType)) { writer.WritePropertyName("type"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } AzureFirewallRCAction IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallSku.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallSku.Serialization.cs index 95a39cfe892e..41d3aed3f2d7 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallSku.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallSku.Serialization.cs @@ -18,6 +18,15 @@ public partial class AzureFirewallSku : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(AzureFirewallSku)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } AzureFirewallSku IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureReachabilityReport.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureReachabilityReport.Serialization.cs index 8128297fcc12..d63d0e0e7fab 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureReachabilityReport.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureReachabilityReport.Serialization.cs @@ -18,6 +18,15 @@ public partial class AzureReachabilityReport : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(AzureReachabilityReport)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("aggregationLevel"u8); writer.WriteStringValue(AggregationLevel); writer.WritePropertyName("providerLocation"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } AzureReachabilityReport IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureReachabilityReportContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureReachabilityReportContent.Serialization.cs index b53570a0b8d1..2f2c5914bcf9 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureReachabilityReportContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureReachabilityReportContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class AzureReachabilityReportContent : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(AzureReachabilityReportContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("providerLocation"u8); writer.WriteObjectValue(ProviderLocation, options); if (Optional.IsCollectionDefined(Providers)) @@ -67,7 +75,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } AzureReachabilityReportContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureReachabilityReportItem.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureReachabilityReportItem.Serialization.cs index 971a39086bc1..6f14bf11c091 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureReachabilityReportItem.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureReachabilityReportItem.Serialization.cs @@ -18,6 +18,15 @@ public partial class AzureReachabilityReportItem : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(AzureReachabilityReportItem)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Provider)) { writer.WritePropertyName("provider"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } AzureReachabilityReportItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureReachabilityReportLatencyInfo.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureReachabilityReportLatencyInfo.Serialization.cs index 13bca1ccf4c1..ef35b64d4a6d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureReachabilityReportLatencyInfo.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureReachabilityReportLatencyInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class AzureReachabilityReportLatencyInfo : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(AzureReachabilityReportLatencyInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(TimeStamp)) { writer.WritePropertyName("timeStamp"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } AzureReachabilityReportLatencyInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureReachabilityReportLocation.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureReachabilityReportLocation.Serialization.cs index f236be828c5f..c14fcde40054 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureReachabilityReportLocation.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureReachabilityReportLocation.Serialization.cs @@ -18,6 +18,15 @@ public partial class AzureReachabilityReportLocation : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(AzureReachabilityReportLocation)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("country"u8); writer.WriteStringValue(Country); if (Optional.IsDefined(State)) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } AzureReachabilityReportLocation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureWebCategoryListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureWebCategoryListResult.Serialization.cs index ee8592c2f153..fa27f4029207 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureWebCategoryListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureWebCategoryListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class AzureWebCategoryListResult : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(AzureWebCategoryListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } AzureWebCategoryListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BackendAddressInboundNatRulePortMappings.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BackendAddressInboundNatRulePortMappings.Serialization.cs index 7f788636b218..d4217a1c95f3 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BackendAddressInboundNatRulePortMappings.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BackendAddressInboundNatRulePortMappings.Serialization.cs @@ -18,6 +18,15 @@ public partial class BackendAddressInboundNatRulePortMappings : IUtf8JsonSeriali void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter w throw new FormatException($"The model {nameof(BackendAddressInboundNatRulePortMappings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(InboundNatRulePortMappings)) { writer.WritePropertyName("inboundNatRulePortMappings"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter w #endif } } - writer.WriteEndObject(); } BackendAddressInboundNatRulePortMappings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BastionHostIPConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BastionHostIPConfiguration.Serialization.cs index a3ef4231e77c..ce899b7ebe6f 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BastionHostIPConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BastionHostIPConfiguration.Serialization.cs @@ -19,6 +19,15 @@ public partial class BastionHostIPConfiguration : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(BastionHostIPConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Subnet)) @@ -70,22 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe writer.WriteStringValue(PrivateIPAllocationMethod.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } BastionHostIPConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BastionHostIPRule.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BastionHostIPRule.Serialization.cs index 3318984dd9be..5ed78b9d0bc9 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BastionHostIPRule.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BastionHostIPRule.Serialization.cs @@ -18,6 +18,15 @@ public partial class BastionHostIPRule : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(BastionHostIPRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(AddressPrefix)) { writer.WritePropertyName("addressPrefix"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } BastionHostIPRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BastionHostListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BastionHostListResult.Serialization.cs index 6ee9ef0905a3..53008e5703e5 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BastionHostListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BastionHostListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class BastionHostListResult : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(BastionHostListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } BastionHostListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BastionHostPropertiesFormatNetworkAcls.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BastionHostPropertiesFormatNetworkAcls.Serialization.cs index 2c7e07c01836..338fa1feefa7 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BastionHostPropertiesFormatNetworkAcls.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BastionHostPropertiesFormatNetworkAcls.Serialization.cs @@ -18,6 +18,15 @@ internal partial class BastionHostPropertiesFormatNetworkAcls : IUtf8JsonSeriali void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(BastionHostPropertiesFormatNetworkAcls)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(IPRules)) { writer.WritePropertyName("ipRules"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } BastionHostPropertiesFormatNetworkAcls IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BastionShareableLinkTokenListContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BastionShareableLinkTokenListContent.Serialization.cs index f6364431dcf9..5bfb326cf582 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BastionShareableLinkTokenListContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BastionShareableLinkTokenListContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class BastionShareableLinkTokenListContent : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(BastionShareableLinkTokenListContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Tokens)) { writer.WritePropertyName("tokens"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } BastionShareableLinkTokenListContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BgpCommunity.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BgpCommunity.Serialization.cs index a59af9052e04..90db535a1aa8 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BgpCommunity.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BgpCommunity.Serialization.cs @@ -18,6 +18,15 @@ public partial class BgpCommunity : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(BgpCommunity)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ServiceSupportedRegion)) { writer.WritePropertyName("serviceSupportedRegion"u8); @@ -76,7 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti #endif } } - writer.WriteEndObject(); } BgpCommunity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BgpPeerStatus.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BgpPeerStatus.Serialization.cs index 7b65d040baaf..a127ba7e4558 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BgpPeerStatus.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BgpPeerStatus.Serialization.cs @@ -18,6 +18,15 @@ public partial class BgpPeerStatus : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt throw new FormatException($"The model {nameof(BgpPeerStatus)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(LocalAddress)) { writer.WritePropertyName("localAddress"u8); @@ -81,7 +89,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt #endif } } - writer.WriteEndObject(); } BgpPeerStatus IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BgpPeerStatusListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BgpPeerStatusListResult.Serialization.cs index c48e26049044..817cbfd9f6ea 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BgpPeerStatusListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BgpPeerStatusListResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class BgpPeerStatusListResult : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(BgpPeerStatusListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } BgpPeerStatusListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BgpServiceCommunity.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BgpServiceCommunity.Serialization.cs index e2efe227bed2..131ded5e3cb6 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BgpServiceCommunity.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BgpServiceCommunity.Serialization.cs @@ -18,6 +18,15 @@ public partial class BgpServiceCommunity : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,38 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(BgpServiceCommunity)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(ServiceName)) @@ -75,22 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } BgpServiceCommunity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BgpServiceCommunityListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BgpServiceCommunityListResult.Serialization.cs index e9d47d6e7bc0..12438e145476 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BgpServiceCommunityListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BgpServiceCommunityListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class BgpServiceCommunityListResult : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(BgpServiceCommunityListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } BgpServiceCommunityListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BgpSettings.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BgpSettings.Serialization.cs index a168b8b52adf..d6b88ca34a4b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BgpSettings.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BgpSettings.Serialization.cs @@ -18,6 +18,15 @@ public partial class BgpSettings : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio throw new FormatException($"The model {nameof(BgpSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Asn)) { writer.WritePropertyName("asn"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio #endif } } - writer.WriteEndObject(); } BgpSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BreakOutCategoryPolicies.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BreakOutCategoryPolicies.Serialization.cs index 9b62b9b03db8..a019b6a416ef 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BreakOutCategoryPolicies.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BreakOutCategoryPolicies.Serialization.cs @@ -18,6 +18,15 @@ public partial class BreakOutCategoryPolicies : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(BreakOutCategoryPolicies)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Allow)) { writer.WritePropertyName("allow"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } BreakOutCategoryPolicies IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/CheckPrivateLinkServiceVisibilityRequest.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/CheckPrivateLinkServiceVisibilityRequest.Serialization.cs index 17788f192d8a..8775af468b1e 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/CheckPrivateLinkServiceVisibilityRequest.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/CheckPrivateLinkServiceVisibilityRequest.Serialization.cs @@ -18,6 +18,15 @@ public partial class CheckPrivateLinkServiceVisibilityRequest : IUtf8JsonSeriali void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter w throw new FormatException($"The model {nameof(CheckPrivateLinkServiceVisibilityRequest)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(PrivateLinkServiceAlias)) { writer.WritePropertyName("privateLinkServiceAlias"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter w #endif } } - writer.WriteEndObject(); } CheckPrivateLinkServiceVisibilityRequest IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/CloudServiceSwapListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/CloudServiceSwapListResult.Serialization.cs index a4cb1bc84ba1..35b7bc721bec 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/CloudServiceSwapListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/CloudServiceSwapListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class CloudServiceSwapListResult : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(CloudServiceSwapListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } CloudServiceSwapListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/CloudServiceSwapProperties.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/CloudServiceSwapProperties.Serialization.cs index 37571fcdc147..006f09d15aae 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/CloudServiceSwapProperties.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/CloudServiceSwapProperties.Serialization.cs @@ -18,6 +18,15 @@ internal partial class CloudServiceSwapProperties : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(CloudServiceSwapProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(SlotType)) { writer.WritePropertyName("slotType"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } CloudServiceSwapProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorCreateOrUpdateContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorCreateOrUpdateContent.Serialization.cs index 6b1bba80713b..0016f601500b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorCreateOrUpdateContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorCreateOrUpdateContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class ConnectionMonitorCreateOrUpdateContent : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(ConnectionMonitorCreateOrUpdateContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Location)) { writer.WritePropertyName("location"u8); @@ -125,7 +133,6 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } ConnectionMonitorCreateOrUpdateContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorDestination.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorDestination.Serialization.cs index bf15598b16d6..affdcba22f7f 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorDestination.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorDestination.Serialization.cs @@ -18,6 +18,15 @@ public partial class ConnectionMonitorDestination : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(ConnectionMonitorDestination)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ResourceId)) { writer.WritePropertyName("resourceId"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } ConnectionMonitorDestination IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorEndpoint.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorEndpoint.Serialization.cs index b8f867c40a39..9759aa6bf576 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorEndpoint.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorEndpoint.Serialization.cs @@ -18,6 +18,15 @@ public partial class ConnectionMonitorEndpoint : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(ConnectionMonitorEndpoint)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); if (Optional.IsDefined(EndpointType)) @@ -83,7 +91,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } ConnectionMonitorEndpoint IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorEndpointFilter.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorEndpointFilter.Serialization.cs index f9c7f1133ca2..a2f8ece01597 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorEndpointFilter.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorEndpointFilter.Serialization.cs @@ -18,6 +18,15 @@ public partial class ConnectionMonitorEndpointFilter : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(ConnectionMonitorEndpointFilter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(FilterType)) { writer.WritePropertyName("type"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } ConnectionMonitorEndpointFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorEndpointFilterItem.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorEndpointFilterItem.Serialization.cs index 9097998b26cb..2a2a6da5a14e 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorEndpointFilterItem.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorEndpointFilterItem.Serialization.cs @@ -18,6 +18,15 @@ public partial class ConnectionMonitorEndpointFilterItem : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(ConnectionMonitorEndpointFilterItem)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ItemType)) { writer.WritePropertyName("type"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } ConnectionMonitorEndpointFilterItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorEndpointLocationDetails.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorEndpointLocationDetails.Serialization.cs index 34d6b40332d6..576ba99cf36d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorEndpointLocationDetails.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorEndpointLocationDetails.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ConnectionMonitorEndpointLocationDetails : IUtf8JsonSeria void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter w throw new FormatException($"The model {nameof(ConnectionMonitorEndpointLocationDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Region)) { writer.WritePropertyName("region"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter w #endif } } - writer.WriteEndObject(); } ConnectionMonitorEndpointLocationDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorEndpointScope.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorEndpointScope.Serialization.cs index d9293b26e42f..26583f91249a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorEndpointScope.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorEndpointScope.Serialization.cs @@ -18,6 +18,15 @@ public partial class ConnectionMonitorEndpointScope : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(ConnectionMonitorEndpointScope)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Include)) { writer.WritePropertyName("include"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } ConnectionMonitorEndpointScope IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorEndpointScopeItem.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorEndpointScopeItem.Serialization.cs index 5beb098c400b..61106f14f228 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorEndpointScopeItem.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorEndpointScopeItem.Serialization.cs @@ -18,6 +18,15 @@ public partial class ConnectionMonitorEndpointScopeItem : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(ConnectionMonitorEndpointScopeItem)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Address)) { writer.WritePropertyName("address"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } ConnectionMonitorEndpointScopeItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorHttpConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorHttpConfiguration.Serialization.cs index 37715bdfa011..5b81a403bb52 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorHttpConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorHttpConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class ConnectionMonitorHttpConfiguration : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(ConnectionMonitorHttpConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Port)) { writer.WritePropertyName("port"u8); @@ -81,7 +89,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } ConnectionMonitorHttpConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorIcmpConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorIcmpConfiguration.Serialization.cs index f80b0a2971d6..b3d3c6c2981d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorIcmpConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorIcmpConfiguration.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ConnectionMonitorIcmpConfiguration : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(ConnectionMonitorIcmpConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(DisableTraceRoute)) { writer.WritePropertyName("disableTraceRoute"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } ConnectionMonitorIcmpConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorListResult.Serialization.cs index 0be8266ae5df..8b09ae4a0c92 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ConnectionMonitorListResult : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(ConnectionMonitorListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } ConnectionMonitorListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorOutput.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorOutput.Serialization.cs index 19d8a32d220f..28ad237830e7 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorOutput.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorOutput.Serialization.cs @@ -18,6 +18,15 @@ public partial class ConnectionMonitorOutput : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(ConnectionMonitorOutput)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(OutputType)) { writer.WritePropertyName("type"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } ConnectionMonitorOutput IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorQueryResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorQueryResult.Serialization.cs index 2ccf0f79dfac..3526c29a1d87 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorQueryResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorQueryResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class ConnectionMonitorQueryResult : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(ConnectionMonitorQueryResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(SourceStatus)) { writer.WritePropertyName("sourceStatus"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } ConnectionMonitorQueryResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorSource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorSource.Serialization.cs index c7bace8d77bf..30742ca5188e 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorSource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorSource.Serialization.cs @@ -18,6 +18,15 @@ public partial class ConnectionMonitorSource : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(ConnectionMonitorSource)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("resourceId"u8); writer.WriteStringValue(ResourceId); if (Optional.IsDefined(Port)) @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } ConnectionMonitorSource IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorSuccessThreshold.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorSuccessThreshold.Serialization.cs index 3d52a98984be..f97469b127b5 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorSuccessThreshold.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorSuccessThreshold.Serialization.cs @@ -18,6 +18,15 @@ public partial class ConnectionMonitorSuccessThreshold : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(ConnectionMonitorSuccessThreshold)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ChecksFailedPercent)) { writer.WritePropertyName("checksFailedPercent"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } ConnectionMonitorSuccessThreshold IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorTcpConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorTcpConfiguration.Serialization.cs index b9a4f543f353..62723e22fd30 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorTcpConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorTcpConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class ConnectionMonitorTcpConfiguration : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(ConnectionMonitorTcpConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Port)) { writer.WritePropertyName("port"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } ConnectionMonitorTcpConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorTestConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorTestConfiguration.Serialization.cs index 52a0ede162b3..d19a7cf52549 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorTestConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorTestConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class ConnectionMonitorTestConfiguration : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(ConnectionMonitorTestConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); if (Optional.IsDefined(TestFrequencySec)) @@ -75,7 +83,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } ConnectionMonitorTestConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorTestGroup.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorTestGroup.Serialization.cs index ec1620f8734a..c5edfdcfbd34 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorTestGroup.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorTestGroup.Serialization.cs @@ -18,6 +18,15 @@ public partial class ConnectionMonitorTestGroup : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(ConnectionMonitorTestGroup)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); if (Optional.IsDefined(Disable)) @@ -69,7 +77,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } ConnectionMonitorTestGroup IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorWorkspaceSettings.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorWorkspaceSettings.Serialization.cs index b497e510ad68..f596fa9ee035 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorWorkspaceSettings.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorWorkspaceSettings.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ConnectionMonitorWorkspaceSettings : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(ConnectionMonitorWorkspaceSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(WorkspaceResourceId)) { writer.WritePropertyName("workspaceResourceId"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } ConnectionMonitorWorkspaceSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionResetSharedKey.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionResetSharedKey.Serialization.cs index 598a375a88d4..6fd9485f4033 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionResetSharedKey.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionResetSharedKey.Serialization.cs @@ -18,6 +18,15 @@ public partial class ConnectionResetSharedKey : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(ConnectionResetSharedKey)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("keyLength"u8); writer.WriteNumberValue(KeyLength); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } ConnectionResetSharedKey IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionSharedKey.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionSharedKey.Serialization.cs index 8d2e6e280c7d..1648c047e09f 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionSharedKey.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionSharedKey.Serialization.cs @@ -18,6 +18,15 @@ public partial class ConnectionSharedKey : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,30 +34,9 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ConnectionSharedKey)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("value"u8); writer.WriteStringValue(Value); - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ConnectionSharedKey IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionSharedKeyResultList.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionSharedKeyResultList.Serialization.cs index ec28a3c97db9..dabab9b3c615 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionSharedKeyResultList.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionSharedKeyResultList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ConnectionSharedKeyResultList : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(ConnectionSharedKeyResultList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } ConnectionSharedKeyResultList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionStateSnapshot.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionStateSnapshot.Serialization.cs index 3df9dafa08e9..3b56c83c897b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionStateSnapshot.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionStateSnapshot.Serialization.cs @@ -18,6 +18,15 @@ public partial class ConnectionStateSnapshot : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(ConnectionStateSnapshot)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(NetworkConnectionState)) { writer.WritePropertyName("connectionState"u8); @@ -96,7 +104,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } ConnectionStateSnapshot IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivityConfigurationListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivityConfigurationListResult.Serialization.cs index 793cde0208f7..93f38531ac3e 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivityConfigurationListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivityConfigurationListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ConnectivityConfigurationListResult : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(ConnectivityConfigurationListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } ConnectivityConfigurationListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivityContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivityContent.Serialization.cs index 7fd0e92ffbc8..363e086eb3f2 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivityContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivityContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class ConnectivityContent : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ConnectivityContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("source"u8); writer.WriteObjectValue(Source, options); writer.WritePropertyName("destination"u8); @@ -60,7 +68,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } ConnectivityContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivityDestination.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivityDestination.Serialization.cs index cbbde7eb9371..721e5988201f 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivityDestination.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivityDestination.Serialization.cs @@ -18,6 +18,15 @@ public partial class ConnectivityDestination : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(ConnectivityDestination)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ResourceId)) { writer.WritePropertyName("resourceId"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } ConnectivityDestination IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivityGroupItem.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivityGroupItem.Serialization.cs index eeb67b012863..3d9f59caa966 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivityGroupItem.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivityGroupItem.Serialization.cs @@ -18,6 +18,15 @@ public partial class ConnectivityGroupItem : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(ConnectivityGroupItem)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("networkGroupId"u8); writer.WriteStringValue(NetworkGroupId); if (Optional.IsDefined(UseHubGateway)) @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } ConnectivityGroupItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivityHopInfo.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivityHopInfo.Serialization.cs index 034cf0663b0f..69cd440c2904 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivityHopInfo.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivityHopInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class ConnectivityHopInfo : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ConnectivityHopInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ConnectivityHopType)) { writer.WritePropertyName("type"u8); @@ -111,7 +119,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } ConnectivityHopInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivityHub.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivityHub.Serialization.cs index 1cd1c91837bb..a57e9662bcb7 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivityHub.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivityHub.Serialization.cs @@ -18,6 +18,15 @@ public partial class ConnectivityHub : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(ConnectivityHub)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ResourceId)) { writer.WritePropertyName("resourceId"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO #endif } } - writer.WriteEndObject(); } ConnectivityHub IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivityInformation.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivityInformation.Serialization.cs index 70f16967451e..32f4d7e7a262 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivityInformation.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivityInformation.Serialization.cs @@ -18,6 +18,15 @@ public partial class ConnectivityInformation : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(ConnectivityInformation)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Hops)) { writer.WritePropertyName("hops"u8); @@ -81,7 +89,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } ConnectivityInformation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivityIssueInfo.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivityIssueInfo.Serialization.cs index 3e60cbeedd00..d6f6d787aa01 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivityIssueInfo.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivityIssueInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class ConnectivityIssueInfo : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(ConnectivityIssueInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Origin)) { writer.WritePropertyName("origin"u8); @@ -77,7 +85,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } ConnectivityIssueInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivitySource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivitySource.Serialization.cs index 7d9643d24c4d..42c1bd60b5d9 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivitySource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivitySource.Serialization.cs @@ -18,6 +18,15 @@ public partial class ConnectivitySource : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ConnectivitySource)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("resourceId"u8); writer.WriteStringValue(ResourceId); if (Optional.IsDefined(Port)) @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } ConnectivitySource IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ContainerNetworkInterface.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ContainerNetworkInterface.Serialization.cs index 093a1dfbb073..dfc2e8321b09 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ContainerNetworkInterface.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ContainerNetworkInterface.Serialization.cs @@ -19,6 +19,15 @@ public partial class ContainerNetworkInterface : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(ContainerNetworkInterface)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ContainerNetworkInterfaceConfiguration)) @@ -75,22 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ContainerNetworkInterface IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ContainerNetworkInterfaceConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ContainerNetworkInterfaceConfiguration.Serialization.cs index ca3d34a61c45..d2526a9b8313 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ContainerNetworkInterfaceConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ContainerNetworkInterfaceConfiguration.Serialization.cs @@ -19,6 +19,15 @@ public partial class ContainerNetworkInterfaceConfiguration : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(ContainerNetworkInterfaceConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsCollectionDefined(IPConfigurations)) @@ -75,22 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter wri writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ContainerNetworkInterfaceConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ContainerNetworkInterfaceIPConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ContainerNetworkInterfaceIPConfiguration.Serialization.cs index ff1136909abf..7e4ffdc9121c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ContainerNetworkInterfaceIPConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ContainerNetworkInterfaceIPConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class ContainerNetworkInterfaceIPConfiguration : IUtf8JsonSeriali void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter w throw new FormatException($"The model {nameof(ContainerNetworkInterfaceIPConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -64,7 +72,6 @@ void IJsonModel.Write(Utf8JsonWriter w #endif } } - writer.WriteEndObject(); } ContainerNetworkInterfaceIPConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/CrossTenantScopes.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/CrossTenantScopes.Serialization.cs index f057f85b919f..cdc7e0f7f3f9 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/CrossTenantScopes.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/CrossTenantScopes.Serialization.cs @@ -18,6 +18,15 @@ public partial class CrossTenantScopes : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(CrossTenantScopes)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(TenantId)) { writer.WritePropertyName("tenantId"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } CrossTenantScopes IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/CustomDnsConfigProperties.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/CustomDnsConfigProperties.Serialization.cs index cfd687f78ed3..0956b7dc867d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/CustomDnsConfigProperties.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/CustomDnsConfigProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class CustomDnsConfigProperties : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(CustomDnsConfigProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Fqdn)) { writer.WritePropertyName("fqdn"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } CustomDnsConfigProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/CustomIPPrefixListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/CustomIPPrefixListResult.Serialization.cs index 16a4e076036e..d50c3a102e9d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/CustomIPPrefixListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/CustomIPPrefixListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class CustomIPPrefixListResult : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(CustomIPPrefixListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } CustomIPPrefixListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/DdosProtectionPlanListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/DdosProtectionPlanListResult.Serialization.cs index 0fa72e85601d..2c4587130600 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/DdosProtectionPlanListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/DdosProtectionPlanListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class DdosProtectionPlanListResult : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(DdosProtectionPlanListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } DdosProtectionPlanListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/DdosSettings.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/DdosSettings.Serialization.cs index d2320d85c13d..5545a5fc5b4b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/DdosSettings.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/DdosSettings.Serialization.cs @@ -19,6 +19,15 @@ public partial class DdosSettings : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(DdosSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ProtectionMode)) { writer.WritePropertyName("protectionMode"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti #endif } } - writer.WriteEndObject(); } DdosSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/DeviceProperties.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/DeviceProperties.Serialization.cs index 2387f82ae84a..1d08310df48d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/DeviceProperties.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/DeviceProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class DeviceProperties : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(DeviceProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(DeviceVendor)) { writer.WritePropertyName("deviceVendor"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } DeviceProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/DhcpOptions.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/DhcpOptions.Serialization.cs index 0d095a340912..eb758cbfd024 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/DhcpOptions.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/DhcpOptions.Serialization.cs @@ -18,6 +18,15 @@ internal partial class DhcpOptions : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio throw new FormatException($"The model {nameof(DhcpOptions)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(DnsServers)) { writer.WritePropertyName("dnsServers"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio #endif } } - writer.WriteEndObject(); } DhcpOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/DnsNameAvailabilityResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/DnsNameAvailabilityResult.Serialization.cs index 8211f0b8518e..c7d4ac3946b7 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/DnsNameAvailabilityResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/DnsNameAvailabilityResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class DnsNameAvailabilityResult : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(DnsNameAvailabilityResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Available)) { writer.WritePropertyName("available"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } DnsNameAvailabilityResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/DnsSettings.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/DnsSettings.Serialization.cs index 0ce739a8657b..7b40b78ccb7f 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/DnsSettings.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/DnsSettings.Serialization.cs @@ -18,6 +18,15 @@ public partial class DnsSettings : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio throw new FormatException($"The model {nameof(DnsSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Servers)) { writer.WritePropertyName("servers"u8); @@ -68,7 +76,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio #endif } } - writer.WriteEndObject(); } DnsSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/DscpConfigurationListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/DscpConfigurationListResult.Serialization.cs index 2dfe4b91b5dc..3c2e2558d56e 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/DscpConfigurationListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/DscpConfigurationListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class DscpConfigurationListResult : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(DscpConfigurationListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } DscpConfigurationListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/DscpQosDefinition.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/DscpQosDefinition.Serialization.cs index 4504f6f33cfc..6959c0601c84 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/DscpQosDefinition.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/DscpQosDefinition.Serialization.cs @@ -18,6 +18,15 @@ public partial class DscpQosDefinition : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(DscpQosDefinition)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Markings)) { writer.WritePropertyName("markings"u8); @@ -96,7 +104,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } DscpQosDefinition IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveBaseSecurityAdminRule.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveBaseSecurityAdminRule.Serialization.cs index 73ab812a815c..2c67bec300be 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveBaseSecurityAdminRule.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveBaseSecurityAdminRule.Serialization.cs @@ -18,6 +18,15 @@ public partial class EffectiveBaseSecurityAdminRule : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(EffectiveBaseSecurityAdminRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ResourceId)) { writer.WritePropertyName("id"u8); @@ -78,7 +86,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } EffectiveBaseSecurityAdminRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveConnectivityConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveConnectivityConfiguration.Serialization.cs index 32ea8e0a51ae..fb6e198cae24 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveConnectivityConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveConnectivityConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class EffectiveConnectivityConfiguration : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(EffectiveConnectivityConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -109,7 +117,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } EffectiveConnectivityConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveDefaultSecurityAdminRule.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveDefaultSecurityAdminRule.Serialization.cs index 1b5ade4a7501..282ce7c316b4 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveDefaultSecurityAdminRule.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveDefaultSecurityAdminRule.Serialization.cs @@ -18,6 +18,15 @@ public partial class EffectiveDefaultSecurityAdminRule : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,44 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(EffectiveDefaultSecurityAdminRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(ResourceId)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(ResourceId); - } - if (Optional.IsDefined(ConfigurationDescription)) - { - writer.WritePropertyName("configurationDescription"u8); - writer.WriteStringValue(ConfigurationDescription); - } - if (Optional.IsDefined(RuleCollectionDescription)) - { - writer.WritePropertyName("ruleCollectionDescription"u8); - writer.WriteStringValue(RuleCollectionDescription); - } - if (Optional.IsCollectionDefined(RuleCollectionAppliesToGroups)) - { - writer.WritePropertyName("ruleCollectionAppliesToGroups"u8); - writer.WriteStartArray(); - foreach (var item in RuleCollectionAppliesToGroups) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(RuleGroups)) - { - writer.WritePropertyName("ruleGroups"u8); - writer.WriteStartArray(); - foreach (var item in RuleGroups) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Description)) @@ -146,22 +118,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteStringValue(ResourceGuid.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } EffectiveDefaultSecurityAdminRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveNetworkSecurityGroup.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveNetworkSecurityGroup.Serialization.cs index 91cfe5c1c60c..55622521e1ec 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveNetworkSecurityGroup.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveNetworkSecurityGroup.Serialization.cs @@ -19,6 +19,15 @@ public partial class EffectiveNetworkSecurityGroup : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(EffectiveNetworkSecurityGroup)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(NetworkSecurityGroup)) { writer.WritePropertyName("networkSecurityGroup"u8); @@ -83,7 +91,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } EffectiveNetworkSecurityGroup IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveNetworkSecurityGroupAssociation.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveNetworkSecurityGroupAssociation.Serialization.cs index 1394b3e9fa19..75a14291f01d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveNetworkSecurityGroupAssociation.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveNetworkSecurityGroupAssociation.Serialization.cs @@ -19,6 +19,15 @@ public partial class EffectiveNetworkSecurityGroupAssociation : IUtf8JsonSeriali void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter w throw new FormatException($"The model {nameof(EffectiveNetworkSecurityGroupAssociation)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(NetworkManager)) { writer.WritePropertyName("networkManager"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter w #endif } } - writer.WriteEndObject(); } EffectiveNetworkSecurityGroupAssociation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveNetworkSecurityGroupListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveNetworkSecurityGroupListResult.Serialization.cs index c0208e2f69e6..df579ba0211e 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveNetworkSecurityGroupListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveNetworkSecurityGroupListResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class EffectiveNetworkSecurityGroupListResult : IUtf8JsonSerializ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wr throw new FormatException($"The model {nameof(EffectiveNetworkSecurityGroupListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter wr #endif } } - writer.WriteEndObject(); } EffectiveNetworkSecurityGroupListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveNetworkSecurityRule.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveNetworkSecurityRule.Serialization.cs index efcf00af3749..26395e6cf757 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveNetworkSecurityRule.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveNetworkSecurityRule.Serialization.cs @@ -18,6 +18,15 @@ public partial class EffectiveNetworkSecurityRule : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(EffectiveNetworkSecurityRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -146,7 +154,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } EffectiveNetworkSecurityRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveRoute.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveRoute.Serialization.cs index bf3756fa1c7d..b598870bd0f2 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveRoute.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveRoute.Serialization.cs @@ -18,6 +18,15 @@ public partial class EffectiveRoute : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(EffectiveRoute)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -86,7 +94,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp #endif } } - writer.WriteEndObject(); } EffectiveRoute IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveRouteListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveRouteListResult.Serialization.cs index 5f8cb12ffb29..391c1a94adc8 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveRouteListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveRouteListResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class EffectiveRouteListResult : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(EffectiveRouteListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } EffectiveRouteListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveRouteMapRoute.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveRouteMapRoute.Serialization.cs index 085529ccf75b..90e7a0a302f7 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveRouteMapRoute.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveRouteMapRoute.Serialization.cs @@ -18,6 +18,15 @@ public partial class EffectiveRouteMapRoute : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(EffectiveRouteMapRoute)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Prefix)) { writer.WritePropertyName("prefix"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } EffectiveRouteMapRoute IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveRouteMapRouteList.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveRouteMapRouteList.Serialization.cs index 3546c305dfd4..9ef5ae622f13 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveRouteMapRouteList.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveRouteMapRouteList.Serialization.cs @@ -18,6 +18,15 @@ public partial class EffectiveRouteMapRouteList : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(EffectiveRouteMapRouteList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } EffectiveRouteMapRouteList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveRoutesContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveRoutesContent.Serialization.cs index 421b51d13203..2431d6d063f5 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveRoutesContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveRoutesContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class EffectiveRoutesContent : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(EffectiveRoutesContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ResourceId)) { writer.WritePropertyName("resourceId"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } EffectiveRoutesContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveSecurityAdminRule.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveSecurityAdminRule.Serialization.cs index a3e135ddc501..9fe98894dab9 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveSecurityAdminRule.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveSecurityAdminRule.Serialization.cs @@ -18,6 +18,15 @@ public partial class EffectiveSecurityAdminRule : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,44 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(EffectiveSecurityAdminRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(ResourceId)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(ResourceId); - } - if (Optional.IsDefined(ConfigurationDescription)) - { - writer.WritePropertyName("configurationDescription"u8); - writer.WriteStringValue(ConfigurationDescription); - } - if (Optional.IsDefined(RuleCollectionDescription)) - { - writer.WritePropertyName("ruleCollectionDescription"u8); - writer.WriteStringValue(RuleCollectionDescription); - } - if (Optional.IsCollectionDefined(RuleCollectionAppliesToGroups)) - { - writer.WritePropertyName("ruleCollectionAppliesToGroups"u8); - writer.WriteStartArray(); - foreach (var item in RuleCollectionAppliesToGroups) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(RuleGroups)) - { - writer.WritePropertyName("ruleGroups"u8); - writer.WriteStartArray(); - foreach (var item in RuleGroups) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Description)) @@ -141,22 +113,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe writer.WriteStringValue(ResourceGuid.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } EffectiveSecurityAdminRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EndpointServiceResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EndpointServiceResult.Serialization.cs index 02cd5c44289f..56796549e4b2 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EndpointServiceResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EndpointServiceResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class EndpointServiceResult : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(EndpointServiceResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } EndpointServiceResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EndpointServicesListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EndpointServicesListResult.Serialization.cs index cc2a0893b933..118d15bffdf8 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EndpointServicesListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EndpointServicesListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class EndpointServicesListResult : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(EndpointServicesListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } EndpointServicesListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EvaluatedNetworkSecurityGroup.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EvaluatedNetworkSecurityGroup.Serialization.cs index cf2513a10bca..1e3e9aac4613 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EvaluatedNetworkSecurityGroup.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EvaluatedNetworkSecurityGroup.Serialization.cs @@ -18,6 +18,15 @@ public partial class EvaluatedNetworkSecurityGroup : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(EvaluatedNetworkSecurityGroup)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(NetworkSecurityGroupId)) { writer.WritePropertyName("networkSecurityGroupId"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } EvaluatedNetworkSecurityGroup IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExceptionEntry.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExceptionEntry.Serialization.cs index 38b30fe9c2d2..d9cc8c107c06 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExceptionEntry.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExceptionEntry.Serialization.cs @@ -18,6 +18,15 @@ public partial class ExceptionEntry : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(ExceptionEntry)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("matchVariable"u8); writer.WriteStringValue(MatchVariable.ToString()); if (Optional.IsCollectionDefined(Values)) @@ -75,7 +83,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp #endif } } - writer.WriteEndObject(); } ExceptionEntry IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExclusionManagedRule.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExclusionManagedRule.Serialization.cs index 8d5c4faaffe0..864c891694c3 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExclusionManagedRule.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExclusionManagedRule.Serialization.cs @@ -18,6 +18,15 @@ public partial class ExclusionManagedRule : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(ExclusionManagedRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("ruleId"u8); writer.WriteStringValue(RuleId); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } ExclusionManagedRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExclusionManagedRuleGroup.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExclusionManagedRuleGroup.Serialization.cs index 7fda4aa894af..3b35e873abdb 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExclusionManagedRuleGroup.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExclusionManagedRuleGroup.Serialization.cs @@ -18,6 +18,15 @@ public partial class ExclusionManagedRuleGroup : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(ExclusionManagedRuleGroup)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("ruleGroupName"u8); writer.WriteStringValue(RuleGroupName); if (Optional.IsCollectionDefined(Rules)) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } ExclusionManagedRuleGroup IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExclusionManagedRuleSet.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExclusionManagedRuleSet.Serialization.cs index b69f532c7c40..4c2447d4be63 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExclusionManagedRuleSet.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExclusionManagedRuleSet.Serialization.cs @@ -18,6 +18,15 @@ public partial class ExclusionManagedRuleSet : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(ExclusionManagedRuleSet)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("ruleSetType"u8); writer.WriteStringValue(RuleSetType); writer.WritePropertyName("ruleSetVersion"u8); @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } ExclusionManagedRuleSet IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitArpTable.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitArpTable.Serialization.cs index 055f9eaa6b88..5ce98b738de0 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitArpTable.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitArpTable.Serialization.cs @@ -18,6 +18,15 @@ public partial class ExpressRouteCircuitArpTable : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(ExpressRouteCircuitArpTable)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Age)) { writer.WritePropertyName("age"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } ExpressRouteCircuitArpTable IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitConnectionListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitConnectionListResult.Serialization.cs index 6d04fdf66c9b..8919bf152ada 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitConnectionListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitConnectionListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ExpressRouteCircuitConnectionListResult : IUtf8JsonSerial void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wr throw new FormatException($"The model {nameof(ExpressRouteCircuitConnectionListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter wr #endif } } - writer.WriteEndObject(); } ExpressRouteCircuitConnectionListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitListResult.Serialization.cs index 787a51976f32..abd7e68022e5 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ExpressRouteCircuitListResult : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(ExpressRouteCircuitListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } ExpressRouteCircuitListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitPeeringConfig.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitPeeringConfig.Serialization.cs index 9aaa7ea06997..d9dd20911d0f 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitPeeringConfig.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitPeeringConfig.Serialization.cs @@ -18,6 +18,15 @@ public partial class ExpressRouteCircuitPeeringConfig : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(ExpressRouteCircuitPeeringConfig)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(AdvertisedPublicPrefixes)) { writer.WritePropertyName("advertisedPublicPrefixes"u8); @@ -81,7 +89,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } ExpressRouteCircuitPeeringConfig IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitPeeringListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitPeeringListResult.Serialization.cs index 529da1266cd3..2239738c3db5 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitPeeringListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitPeeringListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ExpressRouteCircuitPeeringListResult : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(ExpressRouteCircuitPeeringListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } ExpressRouteCircuitPeeringListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitRoutesTable.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitRoutesTable.Serialization.cs index a3368634af72..c634019baca6 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitRoutesTable.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitRoutesTable.Serialization.cs @@ -18,6 +18,15 @@ public partial class ExpressRouteCircuitRoutesTable : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(ExpressRouteCircuitRoutesTable)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Network)) { writer.WritePropertyName("network"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } ExpressRouteCircuitRoutesTable IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitRoutesTableSummary.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitRoutesTableSummary.Serialization.cs index bfa89df2366f..3593bde14c2d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitRoutesTableSummary.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitRoutesTableSummary.Serialization.cs @@ -18,6 +18,15 @@ public partial class ExpressRouteCircuitRoutesTableSummary : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(ExpressRouteCircuitRoutesTableSummary)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Neighbor)) { writer.WritePropertyName("neighbor"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } ExpressRouteCircuitRoutesTableSummary IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitServiceProviderProperties.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitServiceProviderProperties.Serialization.cs index 2637c5918efc..886ef6705f65 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitServiceProviderProperties.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitServiceProviderProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class ExpressRouteCircuitServiceProviderProperties : IUtf8JsonSer void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWrit throw new FormatException($"The model {nameof(ExpressRouteCircuitServiceProviderProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ServiceProviderName)) { writer.WritePropertyName("serviceProviderName"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWrit #endif } } - writer.WriteEndObject(); } ExpressRouteCircuitServiceProviderProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitSku.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitSku.Serialization.cs index 52190f2d8236..e8aea0013f1a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitSku.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitSku.Serialization.cs @@ -18,6 +18,15 @@ public partial class ExpressRouteCircuitSku : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(ExpressRouteCircuitSku)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } ExpressRouteCircuitSku IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitStats.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitStats.Serialization.cs index c0a0e447a0c7..5b1dfda5ac9c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitStats.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitStats.Serialization.cs @@ -18,6 +18,15 @@ public partial class ExpressRouteCircuitStats : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(ExpressRouteCircuitStats)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(PrimarybytesIn)) { writer.WritePropertyName("primarybytesIn"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } ExpressRouteCircuitStats IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitsArpTableListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitsArpTableListResult.Serialization.cs index de276a9d8e55..eeb419587a8b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitsArpTableListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitsArpTableListResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class ExpressRouteCircuitsArpTableListResult : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(ExpressRouteCircuitsArpTableListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } ExpressRouteCircuitsArpTableListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitsRoutesTableListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitsRoutesTableListResult.Serialization.cs index dd8dabe38ed7..e8f9e932c39d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitsRoutesTableListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitsRoutesTableListResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class ExpressRouteCircuitsRoutesTableListResult : IUtf8JsonSerial void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(ExpressRouteCircuitsRoutesTableListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } ExpressRouteCircuitsRoutesTableListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitsRoutesTableSummaryListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitsRoutesTableSummaryListResult.Serialization.cs index 1a028b8fedfc..2364c8c7b7c4 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitsRoutesTableSummaryListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitsRoutesTableSummaryListResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class ExpressRouteCircuitsRoutesTableSummaryListResult : IUtf8Jso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8Json throw new FormatException($"The model {nameof(ExpressRouteCircuitsRoutesTableSummaryListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8Json #endif } } - writer.WriteEndObject(); } ExpressRouteCircuitsRoutesTableSummaryListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteConnectionList.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteConnectionList.Serialization.cs index 9e3aaeed92dd..b6af50df9ed5 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteConnectionList.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteConnectionList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ExpressRouteConnectionList : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(ExpressRouteConnectionList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } ExpressRouteConnectionList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCrossConnectionListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCrossConnectionListResult.Serialization.cs index 337f79e3323e..9907954735b3 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCrossConnectionListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCrossConnectionListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ExpressRouteCrossConnectionListResult : IUtf8JsonSerializ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(ExpressRouteCrossConnectionListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } ExpressRouteCrossConnectionListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCrossConnectionPeeringList.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCrossConnectionPeeringList.Serialization.cs index a0efe51c7b78..e03c3bddb84f 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCrossConnectionPeeringList.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCrossConnectionPeeringList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ExpressRouteCrossConnectionPeeringList : IUtf8JsonSeriali void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(ExpressRouteCrossConnectionPeeringList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } ExpressRouteCrossConnectionPeeringList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCrossConnectionRoutesTableSummary.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCrossConnectionRoutesTableSummary.Serialization.cs index 416a0d3f073f..829445eb3df6 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCrossConnectionRoutesTableSummary.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCrossConnectionRoutesTableSummary.Serialization.cs @@ -18,6 +18,15 @@ public partial class ExpressRouteCrossConnectionRoutesTableSummary : IUtf8JsonSe void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWri throw new FormatException($"The model {nameof(ExpressRouteCrossConnectionRoutesTableSummary)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Neighbor)) { writer.WritePropertyName("neighbor"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWri #endif } } - writer.WriteEndObject(); } ExpressRouteCrossConnectionRoutesTableSummary IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCrossConnectionsRoutesTableSummaryListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCrossConnectionsRoutesTableSummaryListResult.Serialization.cs index 8add7d07f446..7eb8082a854e 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCrossConnectionsRoutesTableSummaryListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCrossConnectionsRoutesTableSummaryListResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class ExpressRouteCrossConnectionsRoutesTableSummaryListResult : void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write( throw new FormatException($"The model {nameof(ExpressRouteCrossConnectionsRoutesTableSummaryListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write( #endif } } - writer.WriteEndObject(); } ExpressRouteCrossConnectionsRoutesTableSummaryListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteGatewayList.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteGatewayList.Serialization.cs index e6c65a48b443..4d6bdec0e4f9 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteGatewayList.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteGatewayList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ExpressRouteGatewayList : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(ExpressRouteGatewayList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } ExpressRouteGatewayList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteGatewayPropertiesAutoScaleConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteGatewayPropertiesAutoScaleConfiguration.Serialization.cs index a954fba562c6..5e8ab826b3c5 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteGatewayPropertiesAutoScaleConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteGatewayPropertiesAutoScaleConfiguration.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ExpressRouteGatewayPropertiesAutoScaleConfiguration : IUt void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8J throw new FormatException($"The model {nameof(ExpressRouteGatewayPropertiesAutoScaleConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Bounds)) { writer.WritePropertyName("bounds"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8J #endif } } - writer.WriteEndObject(); } ExpressRouteGatewayPropertiesAutoScaleConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds.Serialization.cs index 8ea60a5eb051..b767e5f9bac5 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds.Serialization.cs @@ -18,6 +18,15 @@ public partial class ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds : void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write throw new FormatException($"The model {nameof(ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Min)) { writer.WritePropertyName("min"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write #endif } } - writer.WriteEndObject(); } ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteLinkListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteLinkListResult.Serialization.cs index 1503e2151db7..b5d42a8e20f6 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteLinkListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteLinkListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ExpressRouteLinkListResult : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(ExpressRouteLinkListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } ExpressRouteLinkListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteLinkMacSecConfig.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteLinkMacSecConfig.Serialization.cs index 9fef089cf98c..85f5f85744d8 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteLinkMacSecConfig.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteLinkMacSecConfig.Serialization.cs @@ -18,6 +18,15 @@ public partial class ExpressRouteLinkMacSecConfig : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(ExpressRouteLinkMacSecConfig)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(CknSecretIdentifier)) { writer.WritePropertyName("cknSecretIdentifier"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } ExpressRouteLinkMacSecConfig IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRoutePortAuthorizationListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRoutePortAuthorizationListResult.Serialization.cs index 0c2c56147af7..cbead07c5b57 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRoutePortAuthorizationListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRoutePortAuthorizationListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ExpressRoutePortAuthorizationListResult : IUtf8JsonSerial void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wr throw new FormatException($"The model {nameof(ExpressRoutePortAuthorizationListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter wr #endif } } - writer.WriteEndObject(); } ExpressRoutePortAuthorizationListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRoutePortListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRoutePortListResult.Serialization.cs index 44bd54907432..e00e3365d74f 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRoutePortListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRoutePortListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ExpressRoutePortListResult : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(ExpressRoutePortListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } ExpressRoutePortListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRoutePortsLocationBandwidths.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRoutePortsLocationBandwidths.Serialization.cs index 9d8f67d45806..104cc93899f6 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRoutePortsLocationBandwidths.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRoutePortsLocationBandwidths.Serialization.cs @@ -18,6 +18,15 @@ public partial class ExpressRoutePortsLocationBandwidths : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(ExpressRoutePortsLocationBandwidths)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(OfferName)) { writer.WritePropertyName("offerName"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } ExpressRoutePortsLocationBandwidths IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRoutePortsLocationListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRoutePortsLocationListResult.Serialization.cs index b09c3ac2e41d..4cc1f881a989 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRoutePortsLocationListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRoutePortsLocationListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ExpressRoutePortsLocationListResult : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(ExpressRoutePortsLocationListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } ExpressRoutePortsLocationListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteProviderPortListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteProviderPortListResult.Serialization.cs index 033717edddce..cc2486285894 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteProviderPortListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteProviderPortListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ExpressRouteProviderPortListResult : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(ExpressRouteProviderPortListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } ExpressRouteProviderPortListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteServiceProvider.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteServiceProvider.Serialization.cs index 296bba8ee610..c288ecd16975 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteServiceProvider.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteServiceProvider.Serialization.cs @@ -18,6 +18,15 @@ public partial class ExpressRouteServiceProvider : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,38 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(ExpressRouteServiceProvider)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsCollectionDefined(PeeringLocations)) @@ -85,22 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ExpressRouteServiceProvider IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteServiceProviderBandwidthsOffered.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteServiceProviderBandwidthsOffered.Serialization.cs index 5300db8ddbd6..36b8b5e79c0f 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteServiceProviderBandwidthsOffered.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteServiceProviderBandwidthsOffered.Serialization.cs @@ -18,6 +18,15 @@ public partial class ExpressRouteServiceProviderBandwidthsOffered : IUtf8JsonSer void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWrit throw new FormatException($"The model {nameof(ExpressRouteServiceProviderBandwidthsOffered)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(OfferName)) { writer.WritePropertyName("offerName"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWrit #endif } } - writer.WriteEndObject(); } ExpressRouteServiceProviderBandwidthsOffered IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteServiceProviderListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteServiceProviderListResult.Serialization.cs index 54ce183492fd..7510a0de3bc4 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteServiceProviderListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteServiceProviderListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ExpressRouteServiceProviderListResult : IUtf8JsonSerializ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(ExpressRouteServiceProviderListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } ExpressRouteServiceProviderListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPacketCaptureRequestContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPacketCaptureRequestContent.Serialization.cs index 5b3780fb76a9..408565fce74f 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPacketCaptureRequestContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPacketCaptureRequestContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class FirewallPacketCaptureRequestContent : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(FirewallPacketCaptureRequestContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(DurationInSeconds)) { writer.WritePropertyName("durationInSeconds"u8); @@ -86,7 +94,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } FirewallPacketCaptureRequestContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyCertificateAuthority.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyCertificateAuthority.Serialization.cs index 8c7a07cbfc3f..1c9d19de524b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyCertificateAuthority.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyCertificateAuthority.Serialization.cs @@ -18,6 +18,15 @@ public partial class FirewallPolicyCertificateAuthority : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(FirewallPolicyCertificateAuthority)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(KeyVaultSecretId)) { writer.WritePropertyName("keyVaultSecretId"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } FirewallPolicyCertificateAuthority IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyExplicitProxy.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyExplicitProxy.Serialization.cs index ec2918212494..1c46884e49ea 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyExplicitProxy.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyExplicitProxy.Serialization.cs @@ -18,6 +18,15 @@ public partial class FirewallPolicyExplicitProxy : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(FirewallPolicyExplicitProxy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(EnableExplicitProxy)) { if (EnableExplicitProxy != null) @@ -85,7 +93,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } FirewallPolicyExplicitProxy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyFilterRuleCollectionAction.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyFilterRuleCollectionAction.Serialization.cs index f114d11cd608..3e6bb44c5479 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyFilterRuleCollectionAction.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyFilterRuleCollectionAction.Serialization.cs @@ -18,6 +18,15 @@ internal partial class FirewallPolicyFilterRuleCollectionAction : IUtf8JsonSeria void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter w throw new FormatException($"The model {nameof(FirewallPolicyFilterRuleCollectionAction)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ActionType)) { writer.WritePropertyName("type"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter w #endif } } - writer.WriteEndObject(); } FirewallPolicyFilterRuleCollectionAction IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyFilterRuleCollectionInfo.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyFilterRuleCollectionInfo.Serialization.cs index 99d573d2ed16..5e769c9de45b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyFilterRuleCollectionInfo.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyFilterRuleCollectionInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class FirewallPolicyFilterRuleCollectionInfo : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(FirewallPolicyFilterRuleCollectionInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Action)) { writer.WritePropertyName("action"u8); @@ -41,34 +50,6 @@ void IJsonModel.Write(Utf8JsonWriter wri } writer.WriteEndArray(); } - writer.WritePropertyName("ruleCollectionType"u8); - writer.WriteStringValue(RuleCollectionType.ToString()); - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (Optional.IsDefined(Priority)) - { - writer.WritePropertyName("priority"u8); - writer.WriteNumberValue(Priority.Value); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } FirewallPolicyFilterRuleCollectionInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyHttpHeaderToInsert.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyHttpHeaderToInsert.Serialization.cs index 44296ad03347..7dbc613b7a17 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyHttpHeaderToInsert.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyHttpHeaderToInsert.Serialization.cs @@ -18,6 +18,15 @@ public partial class FirewallPolicyHttpHeaderToInsert : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(FirewallPolicyHttpHeaderToInsert)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(HeaderName)) { writer.WritePropertyName("headerName"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } FirewallPolicyHttpHeaderToInsert IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyInsights.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyInsights.Serialization.cs index 1500ab309750..5fa43cd4a653 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyInsights.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyInsights.Serialization.cs @@ -18,6 +18,15 @@ public partial class FirewallPolicyInsights : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(FirewallPolicyInsights)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IsEnabled)) { writer.WritePropertyName("isEnabled"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } FirewallPolicyInsights IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyIntrusionDetection.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyIntrusionDetection.Serialization.cs index 3411e03d8358..d9d493216c71 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyIntrusionDetection.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyIntrusionDetection.Serialization.cs @@ -18,6 +18,15 @@ public partial class FirewallPolicyIntrusionDetection : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(FirewallPolicyIntrusionDetection)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Mode)) { writer.WritePropertyName("mode"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } FirewallPolicyIntrusionDetection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyIntrusionDetectionBypassTrafficSpecifications.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyIntrusionDetectionBypassTrafficSpecifications.Serialization.cs index 6b0d9c2a1d77..be4d16809d08 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyIntrusionDetectionBypassTrafficSpecifications.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyIntrusionDetectionBypassTrafficSpecifications.Serialization.cs @@ -18,6 +18,15 @@ public partial class FirewallPolicyIntrusionDetectionBypassTrafficSpecifications void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Wri throw new FormatException($"The model {nameof(FirewallPolicyIntrusionDetectionBypassTrafficSpecifications)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -106,7 +114,6 @@ void IJsonModel.Wri #endif } } - writer.WriteEndObject(); } FirewallPolicyIntrusionDetectionBypassTrafficSpecifications IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyIntrusionDetectionConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyIntrusionDetectionConfiguration.Serialization.cs index 5763f7fdec11..2e79535e1440 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyIntrusionDetectionConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyIntrusionDetectionConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class FirewallPolicyIntrusionDetectionConfiguration : IUtf8JsonSe void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWri throw new FormatException($"The model {nameof(FirewallPolicyIntrusionDetectionConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(SignatureOverrides)) { writer.WritePropertyName("signatureOverrides"u8); @@ -71,7 +79,6 @@ void IJsonModel.Write(Utf8JsonWri #endif } } - writer.WriteEndObject(); } FirewallPolicyIntrusionDetectionConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyIntrusionDetectionSignatureSpecification.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyIntrusionDetectionSignatureSpecification.Serialization.cs index 49ee6e578c6a..dd3d3c088137 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyIntrusionDetectionSignatureSpecification.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyIntrusionDetectionSignatureSpecification.Serialization.cs @@ -18,6 +18,15 @@ public partial class FirewallPolicyIntrusionDetectionSignatureSpecification : IU void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Ut throw new FormatException($"The model {nameof(FirewallPolicyIntrusionDetectionSignatureSpecification)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Ut #endif } } - writer.WriteEndObject(); } FirewallPolicyIntrusionDetectionSignatureSpecification IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyListResult.Serialization.cs index a52fcba545f1..caa115aa728c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class FirewallPolicyListResult : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(FirewallPolicyListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } FirewallPolicyListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyLogAnalyticsResources.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyLogAnalyticsResources.Serialization.cs index 160859f89a93..d093347fbbb8 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyLogAnalyticsResources.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyLogAnalyticsResources.Serialization.cs @@ -19,6 +19,15 @@ public partial class FirewallPolicyLogAnalyticsResources : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(FirewallPolicyLogAnalyticsResources)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Workspaces)) { writer.WritePropertyName("workspaces"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } FirewallPolicyLogAnalyticsResources IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyLogAnalyticsWorkspace.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyLogAnalyticsWorkspace.Serialization.cs index bb70b2f55104..d0a4b8ce93fc 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyLogAnalyticsWorkspace.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyLogAnalyticsWorkspace.Serialization.cs @@ -19,6 +19,15 @@ public partial class FirewallPolicyLogAnalyticsWorkspace : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(FirewallPolicyLogAnalyticsWorkspace)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Region)) { writer.WritePropertyName("region"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } FirewallPolicyLogAnalyticsWorkspace IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyNatRuleCollectionAction.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyNatRuleCollectionAction.Serialization.cs index dec7e9d7bdb2..d825255b2875 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyNatRuleCollectionAction.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyNatRuleCollectionAction.Serialization.cs @@ -18,6 +18,15 @@ internal partial class FirewallPolicyNatRuleCollectionAction : IUtf8JsonSerializ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(FirewallPolicyNatRuleCollectionAction)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ActionType)) { writer.WritePropertyName("type"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } FirewallPolicyNatRuleCollectionAction IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyNatRuleCollectionInfo.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyNatRuleCollectionInfo.Serialization.cs index 6789c26c9b2a..99dd099d74f0 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyNatRuleCollectionInfo.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyNatRuleCollectionInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class FirewallPolicyNatRuleCollectionInfo : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(FirewallPolicyNatRuleCollectionInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Action)) { writer.WritePropertyName("action"u8); @@ -41,34 +50,6 @@ void IJsonModel.Write(Utf8JsonWriter writer } writer.WriteEndArray(); } - writer.WritePropertyName("ruleCollectionType"u8); - writer.WriteStringValue(RuleCollectionType.ToString()); - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (Optional.IsDefined(Priority)) - { - writer.WritePropertyName("priority"u8); - writer.WriteNumberValue(Priority.Value); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } FirewallPolicyNatRuleCollectionInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyRule.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyRule.Serialization.cs index 3f2921bef93c..3aa03d56e3b9 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyRule.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyRule.Serialization.cs @@ -18,6 +18,15 @@ public partial class FirewallPolicyRule : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(FirewallPolicyRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } FirewallPolicyRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyRuleApplicationProtocol.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyRuleApplicationProtocol.Serialization.cs index 3aa8b021cc2c..045ac9eb6c46 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyRuleApplicationProtocol.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyRuleApplicationProtocol.Serialization.cs @@ -18,6 +18,15 @@ public partial class FirewallPolicyRuleApplicationProtocol : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(FirewallPolicyRuleApplicationProtocol)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ProtocolType)) { writer.WritePropertyName("protocolType"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } FirewallPolicyRuleApplicationProtocol IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyRuleCollectionGroupListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyRuleCollectionGroupListResult.Serialization.cs index 8041e7049328..3550e5ca3b8c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyRuleCollectionGroupListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyRuleCollectionGroupListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class FirewallPolicyRuleCollectionGroupListResult : IUtf8JsonSe void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWrite throw new FormatException($"The model {nameof(FirewallPolicyRuleCollectionGroupListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWrite #endif } } - writer.WriteEndObject(); } FirewallPolicyRuleCollectionGroupListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyRuleCollectionInfo.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyRuleCollectionInfo.Serialization.cs index f693cdf598bd..24c1b0937dbd 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyRuleCollectionInfo.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyRuleCollectionInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class FirewallPolicyRuleCollectionInfo : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(FirewallPolicyRuleCollectionInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("ruleCollectionType"u8); writer.WriteStringValue(RuleCollectionType.ToString()); if (Optional.IsDefined(Name)) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } FirewallPolicyRuleCollectionInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicySQL.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicySQL.Serialization.cs index f983c4f2bc8c..52a17352a6b2 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicySQL.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicySQL.Serialization.cs @@ -18,6 +18,15 @@ internal partial class FirewallPolicySQL : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(FirewallPolicySQL)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(AllowSqlRedirect)) { writer.WritePropertyName("allowSqlRedirect"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } FirewallPolicySQL IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicySku.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicySku.Serialization.cs index 6ff94c57ba6a..500741792964 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicySku.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicySku.Serialization.cs @@ -18,6 +18,15 @@ internal partial class FirewallPolicySku : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(FirewallPolicySku)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Tier)) { writer.WritePropertyName("tier"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } FirewallPolicySku IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicySnat.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicySnat.Serialization.cs index 6fa2d1aab222..e6d621f65a9e 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicySnat.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicySnat.Serialization.cs @@ -18,6 +18,15 @@ public partial class FirewallPolicySnat : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(FirewallPolicySnat)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(PrivateRanges)) { writer.WritePropertyName("privateRanges"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } FirewallPolicySnat IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyThreatIntelWhitelist.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyThreatIntelWhitelist.Serialization.cs index b04bed7009a6..60d4b9d628db 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyThreatIntelWhitelist.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyThreatIntelWhitelist.Serialization.cs @@ -18,6 +18,15 @@ public partial class FirewallPolicyThreatIntelWhitelist : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(FirewallPolicyThreatIntelWhitelist)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(IPAddresses)) { writer.WritePropertyName("ipAddresses"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } FirewallPolicyThreatIntelWhitelist IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyTransportSecurity.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyTransportSecurity.Serialization.cs index 665e5f7fb853..9e1906b82a33 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyTransportSecurity.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyTransportSecurity.Serialization.cs @@ -18,6 +18,15 @@ internal partial class FirewallPolicyTransportSecurity : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(FirewallPolicyTransportSecurity)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(CertificateAuthority)) { writer.WritePropertyName("certificateAuthority"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } FirewallPolicyTransportSecurity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FlowLogInformation.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FlowLogInformation.Serialization.cs index 89efaeb600f3..b043761b0e88 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FlowLogInformation.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FlowLogInformation.Serialization.cs @@ -19,6 +19,15 @@ public partial class FlowLogInformation : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(FlowLogInformation)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("targetResourceId"u8); writer.WriteStringValue(TargetResourceId); if (Optional.IsDefined(FlowAnalyticsConfiguration)) @@ -76,7 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } FlowLogInformation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FlowLogListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FlowLogListResult.Serialization.cs index d25f7cbb36df..d29dded1c7f0 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FlowLogListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FlowLogListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class FlowLogListResult : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(FlowLogListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } FlowLogListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FlowLogProperties.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FlowLogProperties.Serialization.cs index 07ad569842d0..9bd9195b0919 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FlowLogProperties.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FlowLogProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class FlowLogProperties : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(FlowLogProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(FormatType)) { writer.WritePropertyName("type"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } FlowLogProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FlowLogStatusContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FlowLogStatusContent.Serialization.cs index b94771e36e71..3830c093bf40 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FlowLogStatusContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FlowLogStatusContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class FlowLogStatusContent : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(FlowLogStatusContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("targetResourceId"u8); writer.WriteStringValue(TargetResourceId); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } FlowLogStatusContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GatewayCustomBgpIPAddressIPConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GatewayCustomBgpIPAddressIPConfiguration.Serialization.cs index f663aab63542..2d95323b1bd0 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GatewayCustomBgpIPAddressIPConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GatewayCustomBgpIPAddressIPConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class GatewayCustomBgpIPAddressIPConfiguration : IUtf8JsonSeriali void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter w throw new FormatException($"The model {nameof(GatewayCustomBgpIPAddressIPConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("ipConfigurationId"u8); writer.WriteStringValue(IPConfigurationId); writer.WritePropertyName("customBgpIpAddress"u8); @@ -45,7 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter w #endif } } - writer.WriteEndObject(); } GatewayCustomBgpIPAddressIPConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GatewayLoadBalancerTunnelInterface.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GatewayLoadBalancerTunnelInterface.Serialization.cs index 0cb0d4e1b0c2..652a23af2d5f 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GatewayLoadBalancerTunnelInterface.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GatewayLoadBalancerTunnelInterface.Serialization.cs @@ -18,6 +18,15 @@ public partial class GatewayLoadBalancerTunnelInterface : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(GatewayLoadBalancerTunnelInterface)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Port)) { writer.WritePropertyName("port"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } GatewayLoadBalancerTunnelInterface IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GatewayRoute.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GatewayRoute.Serialization.cs index 86627a8c6e75..17efc65cd6c0 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GatewayRoute.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GatewayRoute.Serialization.cs @@ -18,6 +18,15 @@ public partial class GatewayRoute : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(GatewayRoute)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(LocalAddress)) { writer.WritePropertyName("localAddress"u8); @@ -76,7 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti #endif } } - writer.WriteEndObject(); } GatewayRoute IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GatewayRouteListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GatewayRouteListResult.Serialization.cs index 4c4263728bdc..71aaf940a5bc 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GatewayRouteListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GatewayRouteListResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class GatewayRouteListResult : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(GatewayRouteListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } GatewayRouteListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GenerateExpressRoutePortsLoaContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GenerateExpressRoutePortsLoaContent.Serialization.cs index 8c35b5e1175c..69644ad1c8aa 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GenerateExpressRoutePortsLoaContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GenerateExpressRoutePortsLoaContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class GenerateExpressRoutePortsLoaContent : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(GenerateExpressRoutePortsLoaContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("customerName"u8); writer.WriteStringValue(CustomerName); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } GenerateExpressRoutePortsLoaContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GenerateExpressRoutePortsLoaResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GenerateExpressRoutePortsLoaResult.Serialization.cs index 50d85c5747e7..cd0c7c1b098a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GenerateExpressRoutePortsLoaResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GenerateExpressRoutePortsLoaResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class GenerateExpressRoutePortsLoaResult : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(GenerateExpressRoutePortsLoaResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(EncodedContent)) { writer.WritePropertyName("encodedContent"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } GenerateExpressRoutePortsLoaResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GetVpnSitesConfigurationContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GetVpnSitesConfigurationContent.Serialization.cs index d8591e8d8ba4..ca6c73a737f5 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GetVpnSitesConfigurationContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GetVpnSitesConfigurationContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class GetVpnSitesConfigurationContent : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(GetVpnSitesConfigurationContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(VpnSites)) { writer.WritePropertyName("vpnSites"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } GetVpnSitesConfigurationContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GroupByUserSession.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GroupByUserSession.Serialization.cs index 647051fcaca0..2f8ca32ec611 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GroupByUserSession.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GroupByUserSession.Serialization.cs @@ -18,6 +18,15 @@ public partial class GroupByUserSession : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(GroupByUserSession)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("groupByVariables"u8); writer.WriteStartArray(); foreach (var item in GroupByVariables) @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } GroupByUserSession IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GroupByVariable.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GroupByVariable.Serialization.cs index 62e0a1950799..c6cae1e69210 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GroupByVariable.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GroupByVariable.Serialization.cs @@ -18,6 +18,15 @@ public partial class GroupByVariable : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(GroupByVariable)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("variableName"u8); writer.WriteStringValue(VariableName.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO #endif } } - writer.WriteEndObject(); } GroupByVariable IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/HeaderValueMatcher.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/HeaderValueMatcher.Serialization.cs index 9e5e284bfbe5..7c3c022ff108 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/HeaderValueMatcher.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/HeaderValueMatcher.Serialization.cs @@ -18,6 +18,15 @@ public partial class HeaderValueMatcher : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(HeaderValueMatcher)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Pattern)) { writer.WritePropertyName("pattern"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } HeaderValueMatcher IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/HopLink.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/HopLink.Serialization.cs index c78476f4c0bd..757332958fb4 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/HopLink.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/HopLink.Serialization.cs @@ -18,6 +18,15 @@ public partial class HopLink : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions o throw new FormatException($"The model {nameof(HopLink)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(NextHopId)) { writer.WritePropertyName("nextHopId"u8); @@ -95,7 +103,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions o #endif } } - writer.WriteEndObject(); } HopLink IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/HubIPAddresses.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/HubIPAddresses.Serialization.cs index 387c101c650d..cd391622f518 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/HubIPAddresses.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/HubIPAddresses.Serialization.cs @@ -18,6 +18,15 @@ public partial class HubIPAddresses : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(HubIPAddresses)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(PublicIPs)) { writer.WritePropertyName("publicIPs"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp #endif } } - writer.WriteEndObject(); } HubIPAddresses IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/HubPublicIPAddresses.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/HubPublicIPAddresses.Serialization.cs index 3f320869bc93..acb388037dc6 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/HubPublicIPAddresses.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/HubPublicIPAddresses.Serialization.cs @@ -18,6 +18,15 @@ public partial class HubPublicIPAddresses : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(HubPublicIPAddresses)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Addresses)) { writer.WritePropertyName("addresses"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } HubPublicIPAddresses IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/HubRoute.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/HubRoute.Serialization.cs index 86a433071a5b..3c53814d4eb0 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/HubRoute.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/HubRoute.Serialization.cs @@ -18,6 +18,15 @@ public partial class HubRoute : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions throw new FormatException($"The model {nameof(HubRoute)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); writer.WritePropertyName("destinationType"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions #endif } } - writer.WriteEndObject(); } HubRoute IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IPAddressAvailabilityResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IPAddressAvailabilityResult.Serialization.cs index 37f97dfdd7e1..440a3477b1ce 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IPAddressAvailabilityResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IPAddressAvailabilityResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class IPAddressAvailabilityResult : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(IPAddressAvailabilityResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Available)) { writer.WritePropertyName("available"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } IPAddressAvailabilityResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IPGroupListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IPGroupListResult.Serialization.cs index e47e7a2fe001..28e56a3064d6 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IPGroupListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IPGroupListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class IPGroupListResult : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(IPGroupListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } IPGroupListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IPTag.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IPTag.Serialization.cs index 9738e75ff71c..519312aa226c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IPTag.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IPTag.Serialization.cs @@ -18,6 +18,15 @@ public partial class IPTag : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions opt throw new FormatException($"The model {nameof(IPTag)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IPTagType)) { writer.WritePropertyName("ipTagType"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions opt #endif } } - writer.WriteEndObject(); } IPTag IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IPsecPolicy.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IPsecPolicy.Serialization.cs index ce454c109ce4..7b55d297abe4 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IPsecPolicy.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IPsecPolicy.Serialization.cs @@ -18,6 +18,15 @@ public partial class IPsecPolicy : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio throw new FormatException($"The model {nameof(IPsecPolicy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("saLifeTimeSeconds"u8); writer.WriteNumberValue(SaLifeTimeSeconds); writer.WritePropertyName("saDataSizeKilobytes"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio #endif } } - writer.WriteEndObject(); } IPsecPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IPv6CircuitConnectionConfig.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IPv6CircuitConnectionConfig.Serialization.cs index 2c787d645b72..383703ce32bf 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IPv6CircuitConnectionConfig.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IPv6CircuitConnectionConfig.Serialization.cs @@ -18,6 +18,15 @@ public partial class IPv6CircuitConnectionConfig : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(IPv6CircuitConnectionConfig)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(AddressPrefix)) { writer.WritePropertyName("addressPrefix"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } IPv6CircuitConnectionConfig IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IPv6ExpressRouteCircuitPeeringConfig.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IPv6ExpressRouteCircuitPeeringConfig.Serialization.cs index dbd2f99fa649..82c7a813c8ca 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IPv6ExpressRouteCircuitPeeringConfig.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IPv6ExpressRouteCircuitPeeringConfig.Serialization.cs @@ -19,6 +19,15 @@ public partial class IPv6ExpressRouteCircuitPeeringConfig : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(IPv6ExpressRouteCircuitPeeringConfig)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(PrimaryPeerAddressPrefix)) { writer.WritePropertyName("primaryPeerAddressPrefix"u8); @@ -67,7 +75,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } IPv6ExpressRouteCircuitPeeringConfig IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IdpsQueryContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IdpsQueryContent.Serialization.cs index 9c89eb59a2a0..e9f7094de4f9 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IdpsQueryContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IdpsQueryContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class IdpsQueryContent : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(IdpsQueryContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Filters)) { writer.WritePropertyName("filters"u8); @@ -71,7 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } IdpsQueryContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IdpsQueryFilterItems.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IdpsQueryFilterItems.Serialization.cs index d701faf7b854..0dbc7088af44 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IdpsQueryFilterItems.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IdpsQueryFilterItems.Serialization.cs @@ -18,6 +18,15 @@ public partial class IdpsQueryFilterItems : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(IdpsQueryFilterItems)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Field)) { writer.WritePropertyName("field"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } IdpsQueryFilterItems IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IdpsQueryOrderBy.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IdpsQueryOrderBy.Serialization.cs index af8bd6ed30b8..d9e4b7d438db 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IdpsQueryOrderBy.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IdpsQueryOrderBy.Serialization.cs @@ -18,6 +18,15 @@ public partial class IdpsQueryOrderBy : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(IdpsQueryOrderBy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Field)) { writer.WritePropertyName("field"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } IdpsQueryOrderBy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IdpsSignatureListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IdpsSignatureListResult.Serialization.cs index 9ed5ded2808f..2d5c25dde42f 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IdpsSignatureListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IdpsSignatureListResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class IdpsSignatureListResult : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(IdpsSignatureListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(MatchingRecordsCount)) { writer.WritePropertyName("matchingRecordsCount"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } IdpsSignatureListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IdpsSignatureResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IdpsSignatureResult.Serialization.cs index ead369e177e1..939c3d378524 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IdpsSignatureResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IdpsSignatureResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class IdpsSignatureResult : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(IdpsSignatureResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(SignatureId)) { writer.WritePropertyName("signatureId"u8); @@ -106,7 +114,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } IdpsSignatureResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/InboundNatRuleListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/InboundNatRuleListResult.Serialization.cs index d4c731dea4c3..619c4f6e5022 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/InboundNatRuleListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/InboundNatRuleListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class InboundNatRuleListResult : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(InboundNatRuleListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } InboundNatRuleListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/InboundNatRulePortMapping.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/InboundNatRulePortMapping.Serialization.cs index 97f5c563d177..1dcd871c1e12 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/InboundNatRulePortMapping.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/InboundNatRulePortMapping.Serialization.cs @@ -18,6 +18,15 @@ public partial class InboundNatRulePortMapping : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(InboundNatRulePortMapping)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(InboundNatRuleName)) { writer.WritePropertyName("inboundNatRuleName"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } InboundNatRulePortMapping IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/InboundSecurityRules.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/InboundSecurityRules.Serialization.cs index cec4a2cd332b..60569d9f0671 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/InboundSecurityRules.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/InboundSecurityRules.Serialization.cs @@ -18,6 +18,15 @@ public partial class InboundSecurityRules : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(InboundSecurityRules)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -81,7 +89,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } InboundSecurityRules IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LearnedIPPrefixesListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LearnedIPPrefixesListResult.Serialization.cs index 14eb28380b90..99bd1ff4ea74 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LearnedIPPrefixesListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LearnedIPPrefixesListResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class LearnedIPPrefixesListResult : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(LearnedIPPrefixesListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(IPPrefixes)) { writer.WritePropertyName("ipPrefixes"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } LearnedIPPrefixesListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListHubRouteTablesResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListHubRouteTablesResult.Serialization.cs index ee5923222ef9..875ad0a4839b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListHubRouteTablesResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListHubRouteTablesResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ListHubRouteTablesResult : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(ListHubRouteTablesResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } ListHubRouteTablesResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListHubVirtualNetworkConnectionsResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListHubVirtualNetworkConnectionsResult.Serialization.cs index 196a9e4b4127..cdd2f436a054 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListHubVirtualNetworkConnectionsResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListHubVirtualNetworkConnectionsResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ListHubVirtualNetworkConnectionsResult : IUtf8JsonSeriali void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(ListHubVirtualNetworkConnectionsResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } ListHubVirtualNetworkConnectionsResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListP2SVpnGatewaysResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListP2SVpnGatewaysResult.Serialization.cs index c3f4db5042a8..7c1f20a6e757 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListP2SVpnGatewaysResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListP2SVpnGatewaysResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ListP2SVpnGatewaysResult : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(ListP2SVpnGatewaysResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } ListP2SVpnGatewaysResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListRouteMapsResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListRouteMapsResult.Serialization.cs index 2c498d1f3bfb..a3658adbdcbc 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListRouteMapsResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListRouteMapsResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ListRouteMapsResult : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ListRouteMapsResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } ListRouteMapsResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListRoutingIntentResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListRoutingIntentResult.Serialization.cs index e8d4e4ce95bf..1e5819d5d924 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListRoutingIntentResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListRoutingIntentResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ListRoutingIntentResult : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(ListRoutingIntentResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } ListRoutingIntentResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVirtualHubBgpConnectionResults.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVirtualHubBgpConnectionResults.Serialization.cs index 191ce7967d14..7e0999b19ddb 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVirtualHubBgpConnectionResults.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVirtualHubBgpConnectionResults.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ListVirtualHubBgpConnectionResults : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(ListVirtualHubBgpConnectionResults)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } ListVirtualHubBgpConnectionResults IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVirtualHubIPConfigurationResults.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVirtualHubIPConfigurationResults.Serialization.cs index 3c474c37f196..540ec3320b30 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVirtualHubIPConfigurationResults.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVirtualHubIPConfigurationResults.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ListVirtualHubIPConfigurationResults : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(ListVirtualHubIPConfigurationResults)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } ListVirtualHubIPConfigurationResults IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVirtualHubRouteTableV2SResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVirtualHubRouteTableV2SResult.Serialization.cs index 581fe1534faf..9b7dfc57b669 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVirtualHubRouteTableV2SResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVirtualHubRouteTableV2SResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ListVirtualHubRouteTableV2SResult : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(ListVirtualHubRouteTableV2SResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } ListVirtualHubRouteTableV2SResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVirtualHubsResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVirtualHubsResult.Serialization.cs index a3aa55e5ebe6..e0ec20400511 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVirtualHubsResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVirtualHubsResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ListVirtualHubsResult : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(ListVirtualHubsResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } ListVirtualHubsResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVirtualNetworkGatewayNatRulesResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVirtualNetworkGatewayNatRulesResult.Serialization.cs index 5ba6be85af75..f2c35df6d979 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVirtualNetworkGatewayNatRulesResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVirtualNetworkGatewayNatRulesResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ListVirtualNetworkGatewayNatRulesResult : IUtf8JsonSerial void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wr throw new FormatException($"The model {nameof(ListVirtualNetworkGatewayNatRulesResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter wr #endif } } - writer.WriteEndObject(); } ListVirtualNetworkGatewayNatRulesResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVirtualWANsResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVirtualWANsResult.Serialization.cs index 6384c40d3c5a..7ba34dfa3bc0 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVirtualWANsResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVirtualWANsResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ListVirtualWANsResult : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(ListVirtualWANsResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } ListVirtualWANsResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVpnConnectionsResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVpnConnectionsResult.Serialization.cs index 147239ce60ec..13a589d5b5d6 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVpnConnectionsResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVpnConnectionsResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ListVpnConnectionsResult : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(ListVpnConnectionsResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } ListVpnConnectionsResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVpnGatewayNatRulesResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVpnGatewayNatRulesResult.Serialization.cs index 10be2367368c..866a8c665c43 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVpnGatewayNatRulesResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVpnGatewayNatRulesResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ListVpnGatewayNatRulesResult : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(ListVpnGatewayNatRulesResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } ListVpnGatewayNatRulesResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVpnGatewaysResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVpnGatewaysResult.Serialization.cs index ba9bfd6aa2f1..9435286c5f8d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVpnGatewaysResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVpnGatewaysResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ListVpnGatewaysResult : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(ListVpnGatewaysResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } ListVpnGatewaysResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVpnServerConfigurationPolicyGroupsResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVpnServerConfigurationPolicyGroupsResult.Serialization.cs index 811a1c6079bc..ae7426f1cc29 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVpnServerConfigurationPolicyGroupsResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVpnServerConfigurationPolicyGroupsResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ListVpnServerConfigurationPolicyGroupsResult : IUtf8JsonS void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWrit throw new FormatException($"The model {nameof(ListVpnServerConfigurationPolicyGroupsResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWrit #endif } } - writer.WriteEndObject(); } ListVpnServerConfigurationPolicyGroupsResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVpnServerConfigurationsResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVpnServerConfigurationsResult.Serialization.cs index 7aea0dfed3b0..abbdfbc7c6a4 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVpnServerConfigurationsResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVpnServerConfigurationsResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ListVpnServerConfigurationsResult : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(ListVpnServerConfigurationsResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } ListVpnServerConfigurationsResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVpnSiteLinkConnectionsResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVpnSiteLinkConnectionsResult.Serialization.cs index 5bf8093e447f..d811e1e7c476 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVpnSiteLinkConnectionsResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVpnSiteLinkConnectionsResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ListVpnSiteLinkConnectionsResult : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(ListVpnSiteLinkConnectionsResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } ListVpnSiteLinkConnectionsResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVpnSiteLinksResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVpnSiteLinksResult.Serialization.cs index 8a2d0fc1bfe5..55167eb350c7 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVpnSiteLinksResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVpnSiteLinksResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ListVpnSiteLinksResult : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(ListVpnSiteLinksResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } ListVpnSiteLinksResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVpnSitesResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVpnSitesResult.Serialization.cs index 4e6fa3dbbe93..5a4bb91fddb4 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVpnSitesResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVpnSitesResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ListVpnSitesResult : IUtf8JsonSerializable, IJsonModel
  • ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ListVpnSitesResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } ListVpnSitesResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerBackendAddress.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerBackendAddress.Serialization.cs index 8eb195d442e2..7d3af360717a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerBackendAddress.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerBackendAddress.Serialization.cs @@ -19,6 +19,15 @@ public partial class LoadBalancerBackendAddress : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(LoadBalancerBackendAddress)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -90,7 +98,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } LoadBalancerBackendAddress IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerBackendAddressPoolListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerBackendAddressPoolListResult.Serialization.cs index b5603a02d9ba..7678145829a5 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerBackendAddressPoolListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerBackendAddressPoolListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class LoadBalancerBackendAddressPoolListResult : IUtf8JsonSeria void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter w throw new FormatException($"The model {nameof(LoadBalancerBackendAddressPoolListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter w #endif } } - writer.WriteEndObject(); } LoadBalancerBackendAddressPoolListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerFrontendIPConfigurationListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerFrontendIPConfigurationListResult.Serialization.cs index c34198d2f7e3..19d44ef920f8 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerFrontendIPConfigurationListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerFrontendIPConfigurationListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class LoadBalancerFrontendIPConfigurationListResult : IUtf8Json void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWri throw new FormatException($"The model {nameof(LoadBalancerFrontendIPConfigurationListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWri #endif } } - writer.WriteEndObject(); } LoadBalancerFrontendIPConfigurationListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerInboundNatPool.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerInboundNatPool.Serialization.cs index ec605c8464d4..0813d5f74faf 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerInboundNatPool.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerInboundNatPool.Serialization.cs @@ -19,6 +19,15 @@ public partial class LoadBalancerInboundNatPool : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(LoadBalancerInboundNatPool)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(FrontendIPConfiguration)) @@ -95,22 +89,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } LoadBalancerInboundNatPool IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerListResult.Serialization.cs index f3b291daaa8a..c34bf9633541 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class LoadBalancerListResult : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(LoadBalancerListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } LoadBalancerListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerLoadBalancingRuleListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerLoadBalancingRuleListResult.Serialization.cs index a90a220b0a84..fe5800c52cd4 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerLoadBalancingRuleListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerLoadBalancingRuleListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class LoadBalancerLoadBalancingRuleListResult : IUtf8JsonSerial void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wr throw new FormatException($"The model {nameof(LoadBalancerLoadBalancingRuleListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter wr #endif } } - writer.WriteEndObject(); } LoadBalancerLoadBalancingRuleListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerOutboundRuleListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerOutboundRuleListResult.Serialization.cs index b5e2c1e5e91d..eec8f816bd6c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerOutboundRuleListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerOutboundRuleListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class LoadBalancerOutboundRuleListResult : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(LoadBalancerOutboundRuleListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } LoadBalancerOutboundRuleListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerProbeListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerProbeListResult.Serialization.cs index 8c66fd1ea95e..efc39af4a2bd 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerProbeListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerProbeListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class LoadBalancerProbeListResult : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(LoadBalancerProbeListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } LoadBalancerProbeListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerSku.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerSku.Serialization.cs index f4a3a38f35b3..1c884a90e803 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerSku.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerSku.Serialization.cs @@ -18,6 +18,15 @@ public partial class LoadBalancerSku : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(LoadBalancerSku)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO #endif } } - writer.WriteEndObject(); } LoadBalancerSku IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerVipSwapContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerVipSwapContent.Serialization.cs index cf997f62a087..a438ccbc1b40 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerVipSwapContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerVipSwapContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class LoadBalancerVipSwapContent : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(LoadBalancerVipSwapContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(FrontendIPConfigurations)) { writer.WritePropertyName("frontendIPConfigurations"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } LoadBalancerVipSwapContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerVipSwapRequestFrontendIPConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerVipSwapRequestFrontendIPConfiguration.Serialization.cs index a56c4e11c347..aa0a426452bb 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerVipSwapRequestFrontendIPConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerVipSwapRequestFrontendIPConfiguration.Serialization.cs @@ -19,6 +19,15 @@ public partial class LoadBalancerVipSwapRequestFrontendIPConfiguration : IUtf8Js void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8Jso throw new FormatException($"The model {nameof(LoadBalancerVipSwapRequestFrontendIPConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8Jso #endif } } - writer.WriteEndObject(); } LoadBalancerVipSwapRequestFrontendIPConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LocalNetworkGatewayListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LocalNetworkGatewayListResult.Serialization.cs index d96edfeeb4da..c4d8dad33f2d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LocalNetworkGatewayListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LocalNetworkGatewayListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class LocalNetworkGatewayListResult : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(LocalNetworkGatewayListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } LocalNetworkGatewayListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ManagedRuleGroupOverride.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ManagedRuleGroupOverride.Serialization.cs index d8072303951b..11e318921170 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ManagedRuleGroupOverride.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ManagedRuleGroupOverride.Serialization.cs @@ -18,6 +18,15 @@ public partial class ManagedRuleGroupOverride : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(ManagedRuleGroupOverride)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("ruleGroupName"u8); writer.WriteStringValue(RuleGroupName); if (Optional.IsCollectionDefined(Rules)) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } ManagedRuleGroupOverride IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ManagedRuleOverride.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ManagedRuleOverride.Serialization.cs index 3f0c010fbef0..370be250ea29 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ManagedRuleOverride.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ManagedRuleOverride.Serialization.cs @@ -18,6 +18,15 @@ public partial class ManagedRuleOverride : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ManagedRuleOverride)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("ruleId"u8); writer.WriteStringValue(RuleId); if (Optional.IsDefined(State)) @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } ManagedRuleOverride IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ManagedRuleSet.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ManagedRuleSet.Serialization.cs index 74a532dbcb79..b9acdcfbe80c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ManagedRuleSet.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ManagedRuleSet.Serialization.cs @@ -18,6 +18,15 @@ public partial class ManagedRuleSet : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(ManagedRuleSet)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("ruleSetType"u8); writer.WriteStringValue(RuleSetType); writer.WritePropertyName("ruleSetVersion"u8); @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp #endif } } - writer.WriteEndObject(); } ManagedRuleSet IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ManagedRulesDefinition.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ManagedRulesDefinition.Serialization.cs index d29f1b32c922..3cbe32d1b701 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ManagedRulesDefinition.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ManagedRulesDefinition.Serialization.cs @@ -18,6 +18,15 @@ public partial class ManagedRulesDefinition : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(ManagedRulesDefinition)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Exceptions)) { writer.WritePropertyName("exceptions"u8); @@ -68,7 +76,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } ManagedRulesDefinition IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/MatchCondition.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/MatchCondition.Serialization.cs index db7fb8520690..8a44be1f27ac 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/MatchCondition.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/MatchCondition.Serialization.cs @@ -18,6 +18,15 @@ public partial class MatchCondition : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(MatchCondition)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("matchVariables"u8); writer.WriteStartArray(); foreach (var item in MatchVariables) @@ -72,7 +80,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp #endif } } - writer.WriteEndObject(); } MatchCondition IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/MatchVariable.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/MatchVariable.Serialization.cs index 863cbe623494..23cd278064c1 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/MatchVariable.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/MatchVariable.Serialization.cs @@ -18,6 +18,15 @@ public partial class MatchVariable : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt throw new FormatException($"The model {nameof(MatchVariable)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("variableName"u8); writer.WriteStringValue(VariableName.ToString()); if (Optional.IsDefined(Selector)) @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt #endif } } - writer.WriteEndObject(); } MatchVariable IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/MatchedRule.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/MatchedRule.Serialization.cs index db31056eaded..6866e2fb100d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/MatchedRule.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/MatchedRule.Serialization.cs @@ -18,6 +18,15 @@ public partial class MatchedRule : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio throw new FormatException($"The model {nameof(MatchedRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(RuleName)) { writer.WritePropertyName("ruleName"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio #endif } } - writer.WriteEndObject(); } MatchedRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/MigrateLoadBalancerToIPBasedContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/MigrateLoadBalancerToIPBasedContent.Serialization.cs index fb6468d7f56d..9cd706630f64 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/MigrateLoadBalancerToIPBasedContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/MigrateLoadBalancerToIPBasedContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class MigrateLoadBalancerToIPBasedContent : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(MigrateLoadBalancerToIPBasedContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Pools)) { writer.WritePropertyName("pools"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } MigrateLoadBalancerToIPBasedContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/MigrateLoadBalancerToIPBasedResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/MigrateLoadBalancerToIPBasedResult.Serialization.cs index 2319cb404c93..6a3ecd4ddbfa 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/MigrateLoadBalancerToIPBasedResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/MigrateLoadBalancerToIPBasedResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class MigrateLoadBalancerToIPBasedResult : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(MigrateLoadBalancerToIPBasedResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(MigratedPools)) { writer.WritePropertyName("migratedPools"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } MigrateLoadBalancerToIPBasedResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NatGatewayListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NatGatewayListResult.Serialization.cs index 78292c361c6d..acf47602fcf6 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NatGatewayListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NatGatewayListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class NatGatewayListResult : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(NatGatewayListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } NatGatewayListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NatGatewaySku.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NatGatewaySku.Serialization.cs index b06895946dc2..a580b07f1f8f 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NatGatewaySku.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NatGatewaySku.Serialization.cs @@ -18,6 +18,15 @@ internal partial class NatGatewaySku : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt throw new FormatException($"The model {nameof(NatGatewaySku)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt #endif } } - writer.WriteEndObject(); } NatGatewaySku IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NatRule.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NatRule.Serialization.cs index 9af0ab188dd9..470ae247fb12 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NatRule.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NatRule.Serialization.cs @@ -18,6 +18,15 @@ public partial class NatRule : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions o throw new FormatException($"The model {nameof(NatRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(IPProtocols)) { writer.WritePropertyName("ipProtocols"u8); @@ -91,34 +100,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions o writer.WritePropertyName("translatedFqdn"u8); writer.WriteStringValue(TranslatedFqdn); } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - writer.WritePropertyName("ruleType"u8); - writer.WriteStringValue(RuleType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NatRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NatRulePortMapping.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NatRulePortMapping.Serialization.cs index b67a11b4584a..005daae88e2f 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NatRulePortMapping.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NatRulePortMapping.Serialization.cs @@ -18,6 +18,15 @@ public partial class NatRulePortMapping : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(NatRulePortMapping)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(InboundNatRuleName)) { writer.WritePropertyName("inboundNatRuleName"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } NatRulePortMapping IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkAdminRule.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkAdminRule.Serialization.cs index 3202082963d1..80a263b9ca4f 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkAdminRule.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkAdminRule.Serialization.cs @@ -19,6 +19,15 @@ public partial class NetworkAdminRule : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,34 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(NetworkAdminRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (options.Format != "W" && Optional.IsDefined(ETag)) - { - writer.WritePropertyName("etag"u8); - writer.WriteStringValue(ETag.Value.ToString()); - } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Description)) @@ -132,22 +114,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter writer.WriteStringValue(ResourceGuid.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NetworkAdminRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkConfigurationDiagnosticContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkConfigurationDiagnosticContent.Serialization.cs index 185f68028d52..bed4fe63c799 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkConfigurationDiagnosticContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkConfigurationDiagnosticContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkConfigurationDiagnosticContent : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(NetworkConfigurationDiagnosticContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("targetResourceId"u8); writer.WriteStringValue(TargetResourceId); if (Optional.IsDefined(VerbosityLevel)) @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } NetworkConfigurationDiagnosticContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkConfigurationDiagnosticProfile.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkConfigurationDiagnosticProfile.Serialization.cs index 98464896b2fc..3025cd66b41b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkConfigurationDiagnosticProfile.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkConfigurationDiagnosticProfile.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkConfigurationDiagnosticProfile : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(NetworkConfigurationDiagnosticProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("direction"u8); writer.WriteStringValue(Direction.ToString()); writer.WritePropertyName("protocol"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } NetworkConfigurationDiagnosticProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkConfigurationDiagnosticResponse.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkConfigurationDiagnosticResponse.Serialization.cs index aa336a14da11..a8617c4b6a3d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkConfigurationDiagnosticResponse.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkConfigurationDiagnosticResponse.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkConfigurationDiagnosticResponse : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(NetworkConfigurationDiagnosticResponse)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Results)) { writer.WritePropertyName("results"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } NetworkConfigurationDiagnosticResponse IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkConfigurationDiagnosticResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkConfigurationDiagnosticResult.Serialization.cs index f860c0989be6..eeb0609b6d17 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkConfigurationDiagnosticResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkConfigurationDiagnosticResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkConfigurationDiagnosticResult : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(NetworkConfigurationDiagnosticResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Profile)) { writer.WritePropertyName("profile"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } NetworkConfigurationDiagnosticResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkConfigurationGroup.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkConfigurationGroup.Serialization.cs index c30249651d13..bbe1b5af52d2 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkConfigurationGroup.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkConfigurationGroup.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkConfigurationGroup : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(NetworkConfigurationGroup)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -69,7 +77,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } NetworkConfigurationGroup IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkDefaultAdminRule.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkDefaultAdminRule.Serialization.cs index c5602821090a..7de3b24bd087 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkDefaultAdminRule.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkDefaultAdminRule.Serialization.cs @@ -19,6 +19,15 @@ public partial class NetworkDefaultAdminRule : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,34 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(NetworkDefaultAdminRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (options.Format != "W" && Optional.IsDefined(ETag)) - { - writer.WritePropertyName("etag"u8); - writer.WriteStringValue(ETag.Value.ToString()); - } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Description)) @@ -137,22 +119,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade writer.WriteStringValue(ResourceGuid.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NetworkDefaultAdminRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkGroupListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkGroupListResult.Serialization.cs index 374cf7e77e46..ff689a81fae1 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkGroupListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkGroupListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class NetworkGroupListResult : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(NetworkGroupListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } NetworkGroupListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkGroupStaticMemberListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkGroupStaticMemberListResult.Serialization.cs index 7863d8b71a4a..9ec04f83a50a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkGroupStaticMemberListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkGroupStaticMemberListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class NetworkGroupStaticMemberListResult : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(NetworkGroupStaticMemberListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } NetworkGroupStaticMemberListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkHttpConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkHttpConfiguration.Serialization.cs index e21ec3b4a81a..ed8b76390f30 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkHttpConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkHttpConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkHttpConfiguration : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(NetworkHttpConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Method)) { writer.WritePropertyName("method"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } NetworkHttpConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkIPAllocationListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkIPAllocationListResult.Serialization.cs index 386a5f810236..f5ccc07c4173 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkIPAllocationListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkIPAllocationListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class NetworkIPAllocationListResult : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(NetworkIPAllocationListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } NetworkIPAllocationListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkIPConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkIPConfiguration.Serialization.cs index 24b0d1039014..6046bfd167b6 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkIPConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkIPConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkIPConfiguration : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,27 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(NetworkIPConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(PrivateIPAddress)) @@ -74,22 +68,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NetworkIPConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkIPConfigurationBgpPeeringAddress.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkIPConfigurationBgpPeeringAddress.Serialization.cs index 9f622a069b8c..bfa212172cd0 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkIPConfigurationBgpPeeringAddress.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkIPConfigurationBgpPeeringAddress.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkIPConfigurationBgpPeeringAddress : IUtf8JsonSerializ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wr throw new FormatException($"The model {nameof(NetworkIPConfigurationBgpPeeringAddress)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IPConfigurationId)) { writer.WritePropertyName("ipconfigurationId"u8); @@ -76,7 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter wr #endif } } - writer.WriteEndObject(); } NetworkIPConfigurationBgpPeeringAddress IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkIPConfigurationProfile.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkIPConfigurationProfile.Serialization.cs index 923119b58cf8..c057f423511b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkIPConfigurationProfile.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkIPConfigurationProfile.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkIPConfigurationProfile : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,27 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(NetworkIPConfigurationProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Subnet)) @@ -59,22 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NetworkIPConfigurationProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkIntentPolicy.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkIntentPolicy.Serialization.cs index 8ecc78534baf..4da742751fa5 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkIntentPolicy.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkIntentPolicy.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkIntentPolicy : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,59 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(NetworkIntentPolicy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NetworkIntentPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkIntentPolicyConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkIntentPolicyConfiguration.Serialization.cs index af1d1ee33518..4686dcddd2b4 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkIntentPolicyConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkIntentPolicyConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkIntentPolicyConfiguration : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(NetworkIntentPolicyConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(NetworkIntentPolicyName)) { writer.WritePropertyName("networkIntentPolicyName"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } NetworkIntentPolicyConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkInterfaceAssociation.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkInterfaceAssociation.Serialization.cs index 0ae3d6e355da..e6e5414c263c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkInterfaceAssociation.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkInterfaceAssociation.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkInterfaceAssociation : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(NetworkInterfaceAssociation)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } NetworkInterfaceAssociation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkInterfaceDnsSettings.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkInterfaceDnsSettings.Serialization.cs index e141f95c1fd4..32283b7b5398 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkInterfaceDnsSettings.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkInterfaceDnsSettings.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkInterfaceDnsSettings : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(NetworkInterfaceDnsSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(DnsServers)) { writer.WritePropertyName("dnsServers"u8); @@ -76,7 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } NetworkInterfaceDnsSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkInterfaceIPConfigurationListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkInterfaceIPConfigurationListResult.Serialization.cs index c56bc55aa558..53c663a16d40 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkInterfaceIPConfigurationListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkInterfaceIPConfigurationListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class NetworkInterfaceIPConfigurationListResult : IUtf8JsonSeri void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(NetworkInterfaceIPConfigurationListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } NetworkInterfaceIPConfigurationListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties.Serialization.cs index 79277c2f7b1f..b02652d427ee 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkInterfaceIPConfigurationPrivateLinkConnectionPropert void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel. throw new FormatException($"The model {nameof(NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(GroupId)) { writer.WritePropertyName("groupId"u8); @@ -61,7 +69,6 @@ void IJsonModel. #endif } } - writer.WriteEndObject(); } NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkInterfaceListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkInterfaceListResult.Serialization.cs index cae3fd4cc7c4..33ef3c65cb7d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkInterfaceListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkInterfaceListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class NetworkInterfaceListResult : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(NetworkInterfaceListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } NetworkInterfaceListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkInterfaceLoadBalancerListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkInterfaceLoadBalancerListResult.Serialization.cs index 20be24025f9f..c5df8ca85a3c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkInterfaceLoadBalancerListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkInterfaceLoadBalancerListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class NetworkInterfaceLoadBalancerListResult : IUtf8JsonSeriali void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(NetworkInterfaceLoadBalancerListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } NetworkInterfaceLoadBalancerListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkInterfaceTapConfigurationListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkInterfaceTapConfigurationListResult.Serialization.cs index d5075f8bfce0..c5b8422d92ef 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkInterfaceTapConfigurationListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkInterfaceTapConfigurationListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class NetworkInterfaceTapConfigurationListResult : IUtf8JsonSer void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(NetworkInterfaceTapConfigurationListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } NetworkInterfaceTapConfigurationListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagementQueryContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagementQueryContent.Serialization.cs index 14bc4e9387cc..0dd5ff5b5640 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagementQueryContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagementQueryContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkManagementQueryContent : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(NetworkManagementQueryContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(SkipToken)) { writer.WritePropertyName("skipToken"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } NetworkManagementQueryContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerCommit.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerCommit.Serialization.cs index 963010da22ba..57e9282dff97 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerCommit.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerCommit.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkManagerCommit : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(NetworkManagerCommit)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(CommitId)) { writer.WritePropertyName("commitId"u8); @@ -65,7 +73,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } NetworkManagerCommit IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerConnectionListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerConnectionListResult.Serialization.cs index 06e96e740385..de7a36bb6b2e 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerConnectionListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerConnectionListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class NetworkManagerConnectionListResult : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(NetworkManagerConnectionListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } NetworkManagerConnectionListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerDeploymentStatus.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerDeploymentStatus.Serialization.cs index e72b02b62633..03a58bd98a46 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerDeploymentStatus.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerDeploymentStatus.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkManagerDeploymentStatus : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(NetworkManagerDeploymentStatus)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(CommitOn)) { writer.WritePropertyName("commitTime"u8); @@ -76,7 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } NetworkManagerDeploymentStatus IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerDeploymentStatusContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerDeploymentStatusContent.Serialization.cs index b1d9b00ce44a..4f8113ba5357 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerDeploymentStatusContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerDeploymentStatusContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkManagerDeploymentStatusContent : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(NetworkManagerDeploymentStatusContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Regions)) { writer.WritePropertyName("regions"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } NetworkManagerDeploymentStatusContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerDeploymentStatusListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerDeploymentStatusListResult.Serialization.cs index 4222c1b2cd18..f373c7c2c8bf 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerDeploymentStatusListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerDeploymentStatusListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class NetworkManagerDeploymentStatusListResult : IUtf8JsonSeria void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter w throw new FormatException($"The model {nameof(NetworkManagerDeploymentStatusListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter w #endif } } - writer.WriteEndObject(); } NetworkManagerDeploymentStatusListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerEffectiveConnectivityConfigurationListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerEffectiveConnectivityConfigurationListResult.Serialization.cs index 0d08390400cb..dccdf390bf32 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerEffectiveConnectivityConfigurationListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerEffectiveConnectivityConfigurationListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class NetworkManagerEffectiveConnectivityConfigurationListResul void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Writ throw new FormatException($"The model {nameof(NetworkManagerEffectiveConnectivityConfigurationListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Writ #endif } } - writer.WriteEndObject(); } NetworkManagerEffectiveConnectivityConfigurationListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerEffectiveSecurityAdminRulesListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerEffectiveSecurityAdminRulesListResult.Serialization.cs index 6902e655084e..af3a1ccf0d8f 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerEffectiveSecurityAdminRulesListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerEffectiveSecurityAdminRulesListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class NetworkManagerEffectiveSecurityAdminRulesListResult : IUt void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8J throw new FormatException($"The model {nameof(NetworkManagerEffectiveSecurityAdminRulesListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8J #endif } } - writer.WriteEndObject(); } NetworkManagerEffectiveSecurityAdminRulesListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerListResult.Serialization.cs index e66c5e0b91a7..e592c4d0ba69 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class NetworkManagerListResult : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(NetworkManagerListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } NetworkManagerListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerPatch.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerPatch.Serialization.cs index 0205837ea298..5c46c52bf562 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerPatch.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerPatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkManagerPatch : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(NetworkManagerPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } NetworkManagerPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerPropertiesNetworkManagerScopes.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerPropertiesNetworkManagerScopes.Serialization.cs index a3d823dff694..f7b6f246755b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerPropertiesNetworkManagerScopes.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerPropertiesNetworkManagerScopes.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkManagerPropertiesNetworkManagerScopes : IUtf8JsonSer void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWrit throw new FormatException($"The model {nameof(NetworkManagerPropertiesNetworkManagerScopes)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(ManagementGroups)) { writer.WritePropertyName("managementGroups"u8); @@ -71,7 +79,6 @@ void IJsonModel.Write(Utf8JsonWrit #endif } } - writer.WriteEndObject(); } NetworkManagerPropertiesNetworkManagerScopes IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerRoutingConfigurationListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerRoutingConfigurationListResult.Serialization.cs index 451b4b034ae3..e9d3b4510b21 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerRoutingConfigurationListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerRoutingConfigurationListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class NetworkManagerRoutingConfigurationListResult : IUtf8JsonS void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWrit throw new FormatException($"The model {nameof(NetworkManagerRoutingConfigurationListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWrit #endif } } - writer.WriteEndObject(); } NetworkManagerRoutingConfigurationListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerRoutingGroupItem.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerRoutingGroupItem.Serialization.cs index 0b904eff6b44..bad79e723ddb 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerRoutingGroupItem.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerRoutingGroupItem.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkManagerRoutingGroupItem : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(NetworkManagerRoutingGroupItem)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("networkGroupId"u8); writer.WriteStringValue(NetworkGroupId); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } NetworkManagerRoutingGroupItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerSecurityGroupItem.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerSecurityGroupItem.Serialization.cs index a64575d93e8a..ad182e7bcecf 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerSecurityGroupItem.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerSecurityGroupItem.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkManagerSecurityGroupItem : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(NetworkManagerSecurityGroupItem)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("networkGroupId"u8); writer.WriteStringValue(NetworkGroupId); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } NetworkManagerSecurityGroupItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkPrivateEndpointConnectionListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkPrivateEndpointConnectionListResult.Serialization.cs index 1e88b2fca11f..db4b4abde626 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkPrivateEndpointConnectionListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkPrivateEndpointConnectionListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class NetworkPrivateEndpointConnectionListResult : IUtf8JsonSer void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(NetworkPrivateEndpointConnectionListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } NetworkPrivateEndpointConnectionListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkPrivateLinkServiceConnection.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkPrivateLinkServiceConnection.Serialization.cs index 41ee9e83958e..59f2baf8b82a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkPrivateLinkServiceConnection.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkPrivateLinkServiceConnection.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkPrivateLinkServiceConnection : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,27 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(NetworkPrivateLinkServiceConnection)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) @@ -79,22 +73,6 @@ void IJsonModel.Write(Utf8JsonWriter writer writer.WriteObjectValue(ConnectionState, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NetworkPrivateLinkServiceConnection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkPrivateLinkServiceConnectionState.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkPrivateLinkServiceConnectionState.Serialization.cs index ed427c9c8782..d2bc9726a708 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkPrivateLinkServiceConnectionState.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkPrivateLinkServiceConnectionState.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkPrivateLinkServiceConnectionState : IUtf8JsonSeriali void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter w throw new FormatException($"The model {nameof(NetworkPrivateLinkServiceConnectionState)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Status)) { writer.WritePropertyName("status"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter w #endif } } - writer.WriteEndObject(); } NetworkPrivateLinkServiceConnectionState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkProfileListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkProfileListResult.Serialization.cs index 997d3fc18a94..fa662fc5d99c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkProfileListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkProfileListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class NetworkProfileListResult : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(NetworkProfileListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } NetworkProfileListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkResourceData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkResourceData.Serialization.cs index 9c078d368f64..6ed617048cc2 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkResourceData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkResourceData.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkResourceData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(NetworkResourceData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } NetworkResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkRule.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkRule.Serialization.cs index cc4ad6c17ca3..174548ebd48d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkRule.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkRule.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkRule : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio throw new FormatException($"The model {nameof(NetworkRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(IPProtocols)) { writer.WritePropertyName("ipProtocols"u8); @@ -96,34 +105,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio } writer.WriteEndArray(); } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - writer.WritePropertyName("ruleType"u8); - writer.WriteStringValue(RuleType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NetworkRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkSecurityGroupListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkSecurityGroupListResult.Serialization.cs index 1aa0c0ecc079..3d7bc7ca24c5 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkSecurityGroupListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkSecurityGroupListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class NetworkSecurityGroupListResult : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(NetworkSecurityGroupListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } NetworkSecurityGroupListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkSecurityGroupResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkSecurityGroupResult.Serialization.cs index e3fcc3b8dff2..b14c011ef163 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkSecurityGroupResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkSecurityGroupResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkSecurityGroupResult : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(NetworkSecurityGroupResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(SecurityRuleAccessResult)) { writer.WritePropertyName("securityRuleAccessResult"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } NetworkSecurityGroupResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkSecurityRulesEvaluationResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkSecurityRulesEvaluationResult.Serialization.cs index 2cc63d0bd63b..f66d4a45fa38 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkSecurityRulesEvaluationResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkSecurityRulesEvaluationResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkSecurityRulesEvaluationResult : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(NetworkSecurityRulesEvaluationResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -71,7 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } NetworkSecurityRulesEvaluationResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkSku.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkSku.Serialization.cs index 2638ba036887..7f5f93516509 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkSku.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkSku.Serialization.cs @@ -18,6 +18,15 @@ internal partial class NetworkSku : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOption throw new FormatException($"The model {nameof(NetworkSku)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOption #endif } } - writer.WriteEndObject(); } NetworkSku IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkSubResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkSubResource.Serialization.cs index 974c7fe84ce1..4e82db3c5144 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkSubResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkSubResource.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkSubResource : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(NetworkSubResource)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } NetworkSubResource IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkTagsObject.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkTagsObject.Serialization.cs index 42299e55022b..61660ba82c0e 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkTagsObject.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkTagsObject.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkTagsObject : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(NetworkTagsObject)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } NetworkTagsObject IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkTopology.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkTopology.Serialization.cs index 3fd783337b09..9a4124006356 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkTopology.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkTopology.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkTopology : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(NetworkTopology)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO #endif } } - writer.WriteEndObject(); } NetworkTopology IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkTrackedResourceData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkTrackedResourceData.Serialization.cs index e2b61bd4a830..f4f9b59284e3 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkTrackedResourceData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkTrackedResourceData.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkTrackedResourceData : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(NetworkTrackedResourceData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -72,7 +80,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } NetworkTrackedResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkUsage.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkUsage.Serialization.cs index b5acdcdbe041..826f10357c07 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkUsage.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkUsage.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkUsage : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(NetworkUsage)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -54,7 +62,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti #endif } } - writer.WriteEndObject(); } NetworkUsage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkUsageName.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkUsageName.Serialization.cs index 70cd5ed34b22..8e70a60dc8b0 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkUsageName.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkUsageName.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkUsageName : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(NetworkUsageName)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Value)) { writer.WritePropertyName("value"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } NetworkUsageName IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkUsagesListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkUsagesListResult.Serialization.cs index 93fa68ed8d88..c3f0cd910c59 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkUsagesListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkUsagesListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class NetworkUsagesListResult : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(NetworkUsagesListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } NetworkUsagesListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkVirtualApplianceConnectionList.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkVirtualApplianceConnectionList.Serialization.cs index cf8f41064fe4..dfe8e9ab35c3 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkVirtualApplianceConnectionList.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkVirtualApplianceConnectionList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class NetworkVirtualApplianceConnectionList : IUtf8JsonSerializ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(NetworkVirtualApplianceConnectionList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } NetworkVirtualApplianceConnectionList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkVirtualApplianceInstanceIds.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkVirtualApplianceInstanceIds.Serialization.cs index 4dafc1ee25b0..511e3830923d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkVirtualApplianceInstanceIds.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkVirtualApplianceInstanceIds.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkVirtualApplianceInstanceIds : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(NetworkVirtualApplianceInstanceIds)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(InstanceIds)) { writer.WritePropertyName("instanceIds"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } NetworkVirtualApplianceInstanceIds IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkVirtualApplianceListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkVirtualApplianceListResult.Serialization.cs index e7cd18474d70..bd88e162d6ca 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkVirtualApplianceListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkVirtualApplianceListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class NetworkVirtualApplianceListResult : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(NetworkVirtualApplianceListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } NetworkVirtualApplianceListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkVirtualAppliancePropertiesFormatNetworkProfile.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkVirtualAppliancePropertiesFormatNetworkProfile.Serialization.cs index 73051418e7ef..6ea1c1edcee3 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkVirtualAppliancePropertiesFormatNetworkProfile.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkVirtualAppliancePropertiesFormatNetworkProfile.Serialization.cs @@ -18,6 +18,15 @@ internal partial class NetworkVirtualAppliancePropertiesFormatNetworkProfile : I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf throw new FormatException($"The model {nameof(NetworkVirtualAppliancePropertiesFormatNetworkProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(NetworkInterfaceConfigurations)) { writer.WritePropertyName("networkInterfaceConfigurations"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf #endif } } - writer.WriteEndObject(); } NetworkVirtualAppliancePropertiesFormatNetworkProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkVirtualApplianceSiteListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkVirtualApplianceSiteListResult.Serialization.cs index 85d87df774ff..280f469d54a4 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkVirtualApplianceSiteListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkVirtualApplianceSiteListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class NetworkVirtualApplianceSiteListResult : IUtf8JsonSerializ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(NetworkVirtualApplianceSiteListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } NetworkVirtualApplianceSiteListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkVirtualApplianceSkuInstances.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkVirtualApplianceSkuInstances.Serialization.cs index 17466a369eeb..e5e3bafc1417 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkVirtualApplianceSkuInstances.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkVirtualApplianceSkuInstances.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkVirtualApplianceSkuInstances : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(NetworkVirtualApplianceSkuInstances)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ScaleUnit)) { writer.WritePropertyName("scaleUnit"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } NetworkVirtualApplianceSkuInstances IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkVirtualApplianceSkuListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkVirtualApplianceSkuListResult.Serialization.cs index 425206c25ec0..870d7bf706b0 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkVirtualApplianceSkuListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkVirtualApplianceSkuListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class NetworkVirtualApplianceSkuListResult : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(NetworkVirtualApplianceSkuListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } NetworkVirtualApplianceSkuListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkWatcherHttpHeader.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkWatcherHttpHeader.Serialization.cs index 9c8de964d327..823ed1eb4b94 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkWatcherHttpHeader.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkWatcherHttpHeader.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkWatcherHttpHeader : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(NetworkWatcherHttpHeader)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } NetworkWatcherHttpHeader IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkWatcherListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkWatcherListResult.Serialization.cs index aabb3cce0b4a..83783e49f89b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkWatcherListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkWatcherListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class NetworkWatcherListResult : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(NetworkWatcherListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } NetworkWatcherListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkWritableResourceData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkWritableResourceData.Serialization.cs index 6170a3217109..c128d7845590 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkWritableResourceData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkWritableResourceData.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkWritableResourceData : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(NetworkWritableResourceData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } NetworkWritableResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NextHopContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NextHopContent.Serialization.cs index ec544bb37e82..e632a31d7ed9 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NextHopContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NextHopContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class NextHopContent : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(NextHopContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("targetResourceId"u8); writer.WriteStringValue(TargetResourceId); writer.WritePropertyName("sourceIPAddress"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp #endif } } - writer.WriteEndObject(); } NextHopContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NextHopResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NextHopResult.Serialization.cs index bc5d4a6cda28..cafc459f7fa8 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NextHopResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NextHopResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class NextHopResult : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt throw new FormatException($"The model {nameof(NextHopResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(NextHopType)) { writer.WritePropertyName("nextHopType"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt #endif } } - writer.WriteEndObject(); } NextHopResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/O365BreakOutCategoryPolicies.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/O365BreakOutCategoryPolicies.Serialization.cs index 3a47c7ec6d47..cc595a47c39f 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/O365BreakOutCategoryPolicies.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/O365BreakOutCategoryPolicies.Serialization.cs @@ -18,6 +18,15 @@ public partial class O365BreakOutCategoryPolicies : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(O365BreakOutCategoryPolicies)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Allow)) { writer.WritePropertyName("allow"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } O365BreakOutCategoryPolicies IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/O365PolicyProperties.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/O365PolicyProperties.Serialization.cs index d17e3c86d7f1..eb469bb619bb 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/O365PolicyProperties.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/O365PolicyProperties.Serialization.cs @@ -18,6 +18,15 @@ internal partial class O365PolicyProperties : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(O365PolicyProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(BreakOutCategories)) { writer.WritePropertyName("breakOutCategories"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } O365PolicyProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/Office365PolicyProperties.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/Office365PolicyProperties.Serialization.cs index b98d9de9138f..eeb7bc28d3e8 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/Office365PolicyProperties.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/Office365PolicyProperties.Serialization.cs @@ -18,6 +18,15 @@ internal partial class Office365PolicyProperties : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(Office365PolicyProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(BreakOutCategories)) { writer.WritePropertyName("breakOutCategories"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } Office365PolicyProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/OwaspCrsExclusionEntry.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/OwaspCrsExclusionEntry.Serialization.cs index 5595820cda40..0e78a5f397fd 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/OwaspCrsExclusionEntry.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/OwaspCrsExclusionEntry.Serialization.cs @@ -18,6 +18,15 @@ public partial class OwaspCrsExclusionEntry : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(OwaspCrsExclusionEntry)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("matchVariable"u8); writer.WriteStringValue(MatchVariable.ToString()); writer.WritePropertyName("selectorMatchOperator"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } OwaspCrsExclusionEntry IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/P2SConnectionConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/P2SConnectionConfiguration.Serialization.cs index a7592badd07d..29143f138432 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/P2SConnectionConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/P2SConnectionConfiguration.Serialization.cs @@ -19,6 +19,15 @@ public partial class P2SConnectionConfiguration : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(P2SConnectionConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(VpnClientAddressPool)) @@ -90,22 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } P2SConnectionConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/P2SVpnConnectionHealth.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/P2SVpnConnectionHealth.Serialization.cs index 96809c4f504f..4d5172757d1e 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/P2SVpnConnectionHealth.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/P2SVpnConnectionHealth.Serialization.cs @@ -18,6 +18,15 @@ public partial class P2SVpnConnectionHealth : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(P2SVpnConnectionHealth)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(SasUri)) { writer.WritePropertyName("sasUrl"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } P2SVpnConnectionHealth IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/P2SVpnConnectionHealthContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/P2SVpnConnectionHealthContent.Serialization.cs index a2f1f22253f9..94da9af32b04 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/P2SVpnConnectionHealthContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/P2SVpnConnectionHealthContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class P2SVpnConnectionHealthContent : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(P2SVpnConnectionHealthContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(VpnUserNamesFilter)) { writer.WritePropertyName("vpnUserNamesFilter"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } P2SVpnConnectionHealthContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/P2SVpnConnectionRequest.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/P2SVpnConnectionRequest.Serialization.cs index c1cdbac7f3b2..d9289afe0433 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/P2SVpnConnectionRequest.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/P2SVpnConnectionRequest.Serialization.cs @@ -18,6 +18,15 @@ public partial class P2SVpnConnectionRequest : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(P2SVpnConnectionRequest)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(VpnConnectionIds)) { writer.WritePropertyName("vpnConnectionIds"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } P2SVpnConnectionRequest IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/P2SVpnProfileContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/P2SVpnProfileContent.Serialization.cs index 192e9ac6765e..1ea0bf5a55ac 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/P2SVpnProfileContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/P2SVpnProfileContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class P2SVpnProfileContent : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(P2SVpnProfileContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(AuthenticationMethod)) { writer.WritePropertyName("authenticationMethod"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } P2SVpnProfileContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PacketCaptureCreateOrUpdateContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PacketCaptureCreateOrUpdateContent.Serialization.cs index 00e3211ce36c..cef11363649f 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PacketCaptureCreateOrUpdateContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PacketCaptureCreateOrUpdateContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class PacketCaptureCreateOrUpdateContent : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(PacketCaptureCreateOrUpdateContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); writer.WritePropertyName("target"u8); @@ -93,7 +101,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } PacketCaptureCreateOrUpdateContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PacketCaptureFilter.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PacketCaptureFilter.Serialization.cs index f5934f2477f9..0bc8cc05828d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PacketCaptureFilter.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PacketCaptureFilter.Serialization.cs @@ -18,6 +18,15 @@ public partial class PacketCaptureFilter : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(PacketCaptureFilter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Protocol)) { writer.WritePropertyName("protocol"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } PacketCaptureFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PacketCaptureListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PacketCaptureListResult.Serialization.cs index d4f19dfb173e..537d77d8ed90 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PacketCaptureListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PacketCaptureListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class PacketCaptureListResult : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(PacketCaptureListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } PacketCaptureListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PacketCaptureMachineScope.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PacketCaptureMachineScope.Serialization.cs index 474f564d1ca1..98c09e2849af 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PacketCaptureMachineScope.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PacketCaptureMachineScope.Serialization.cs @@ -18,6 +18,15 @@ public partial class PacketCaptureMachineScope : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(PacketCaptureMachineScope)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Include)) { writer.WritePropertyName("include"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } PacketCaptureMachineScope IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PacketCaptureQueryStatusResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PacketCaptureQueryStatusResult.Serialization.cs index 62a5a8c02371..3319463cd963 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PacketCaptureQueryStatusResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PacketCaptureQueryStatusResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class PacketCaptureQueryStatusResult : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(PacketCaptureQueryStatusResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -76,7 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } PacketCaptureQueryStatusResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PacketCaptureSettings.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PacketCaptureSettings.Serialization.cs index ba5e5b086311..eb771ad0a429 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PacketCaptureSettings.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PacketCaptureSettings.Serialization.cs @@ -18,6 +18,15 @@ public partial class PacketCaptureSettings : IUtf8JsonSerializable, IJsonModel

    ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(PacketCaptureSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(FileCount)) { writer.WritePropertyName("fileCount"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } PacketCaptureSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PacketCaptureStorageLocation.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PacketCaptureStorageLocation.Serialization.cs index f670f490f118..f5ead504968e 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PacketCaptureStorageLocation.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PacketCaptureStorageLocation.Serialization.cs @@ -18,6 +18,15 @@ public partial class PacketCaptureStorageLocation : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(PacketCaptureStorageLocation)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(StorageId)) { writer.WritePropertyName("storageId"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } PacketCaptureStorageLocation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PartnerManagedResourceProperties.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PartnerManagedResourceProperties.Serialization.cs index 2316782f5735..63556e7cc480 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PartnerManagedResourceProperties.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PartnerManagedResourceProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class PartnerManagedResourceProperties : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(PartnerManagedResourceProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } PartnerManagedResourceProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PeerExpressRouteCircuitConnectionListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PeerExpressRouteCircuitConnectionListResult.Serialization.cs index e651f8e3cbab..110a0646b94c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PeerExpressRouteCircuitConnectionListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PeerExpressRouteCircuitConnectionListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class PeerExpressRouteCircuitConnectionListResult : IUtf8JsonSe void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWrite throw new FormatException($"The model {nameof(PeerExpressRouteCircuitConnectionListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWrite #endif } } - writer.WriteEndObject(); } PeerExpressRouteCircuitConnectionListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PeerRoute.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PeerRoute.Serialization.cs index b93e9abdcd87..1ca83d0e564a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PeerRoute.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PeerRoute.Serialization.cs @@ -18,6 +18,15 @@ public partial class PeerRoute : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions throw new FormatException($"The model {nameof(PeerRoute)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(LocalAddress)) { writer.WritePropertyName("localAddress"u8); @@ -76,7 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions #endif } } - writer.WriteEndObject(); } PeerRoute IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PolicySettings.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PolicySettings.Serialization.cs index 3a56650f0d46..1725e3b4a30e 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PolicySettings.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PolicySettings.Serialization.cs @@ -18,6 +18,15 @@ public partial class PolicySettings : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(PolicySettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(State)) { writer.WritePropertyName("state"u8); @@ -101,7 +109,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp #endif } } - writer.WriteEndObject(); } PolicySettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PolicySettingsLogScrubbing.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PolicySettingsLogScrubbing.Serialization.cs index 6fcde1d5cf2e..971c5a3d0398 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PolicySettingsLogScrubbing.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PolicySettingsLogScrubbing.Serialization.cs @@ -18,6 +18,15 @@ public partial class PolicySettingsLogScrubbing : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(PolicySettingsLogScrubbing)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(State)) { writer.WritePropertyName("state"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } PolicySettingsLogScrubbing IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PolicySignaturesOverridesForIdpsListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PolicySignaturesOverridesForIdpsListResult.Serialization.cs index efd1b79673a0..f110f8a27d5e 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PolicySignaturesOverridesForIdpsListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PolicySignaturesOverridesForIdpsListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class PolicySignaturesOverridesForIdpsListResult : IUtf8JsonSer void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(PolicySignaturesOverridesForIdpsListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } PolicySignaturesOverridesForIdpsListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PolicySignaturesOverridesForIdpsProperties.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PolicySignaturesOverridesForIdpsProperties.Serialization.cs index f12a6f0852e5..e5dab62d7728 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PolicySignaturesOverridesForIdpsProperties.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PolicySignaturesOverridesForIdpsProperties.Serialization.cs @@ -18,6 +18,15 @@ internal partial class PolicySignaturesOverridesForIdpsProperties : IUtf8JsonSer void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(PolicySignaturesOverridesForIdpsProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Signatures)) { writer.WritePropertyName("signatures"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } PolicySignaturesOverridesForIdpsProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrepareNetworkPoliciesContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrepareNetworkPoliciesContent.Serialization.cs index 6e6da305806c..ead9a145f506 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrepareNetworkPoliciesContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrepareNetworkPoliciesContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class PrepareNetworkPoliciesContent : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(PrepareNetworkPoliciesContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ServiceName)) { writer.WritePropertyName("serviceName"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } PrepareNetworkPoliciesContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateDnsZoneConfig.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateDnsZoneConfig.Serialization.cs index a13554da7a9f..2e52f3ee9694 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateDnsZoneConfig.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateDnsZoneConfig.Serialization.cs @@ -18,6 +18,15 @@ public partial class PrivateDnsZoneConfig : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(PrivateDnsZoneConfig)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -64,7 +72,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } PrivateDnsZoneConfig IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateDnsZoneGroupListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateDnsZoneGroupListResult.Serialization.cs index 5cc65159b9f3..e7883d44dd2c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateDnsZoneGroupListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateDnsZoneGroupListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class PrivateDnsZoneGroupListResult : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(PrivateDnsZoneGroupListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } PrivateDnsZoneGroupListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateEndpointIPConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateEndpointIPConfiguration.Serialization.cs index 82762b833bf8..77e41992d9bd 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateEndpointIPConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateEndpointIPConfiguration.Serialization.cs @@ -19,6 +19,15 @@ public partial class PrivateEndpointIPConfiguration : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(PrivateEndpointIPConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -75,7 +83,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } PrivateEndpointIPConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateEndpointListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateEndpointListResult.Serialization.cs index 6f79635adb32..d6923062b41e 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateEndpointListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateEndpointListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class PrivateEndpointListResult : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(PrivateEndpointListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } PrivateEndpointListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateLinkServiceIPConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateLinkServiceIPConfiguration.Serialization.cs index 7903796ad51e..ada8ad480263 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateLinkServiceIPConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateLinkServiceIPConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class PrivateLinkServiceIPConfiguration : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,27 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(PrivateLinkServiceIPConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(PrivateIPAddress)) @@ -79,22 +73,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteStringValue(PrivateIPAddressVersion.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } PrivateLinkServiceIPConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateLinkServiceListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateLinkServiceListResult.Serialization.cs index bc3246baf880..c6d468e12c53 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateLinkServiceListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateLinkServiceListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class PrivateLinkServiceListResult : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(PrivateLinkServiceListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } PrivateLinkServiceListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateLinkServicePropertiesAutoApproval.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateLinkServicePropertiesAutoApproval.Serialization.cs index 87f859dd7bd2..5cd9787d447e 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateLinkServicePropertiesAutoApproval.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateLinkServicePropertiesAutoApproval.Serialization.cs @@ -18,6 +18,15 @@ internal partial class PrivateLinkServicePropertiesAutoApproval : IUtf8JsonSeria void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,33 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter w throw new FormatException($"The model {nameof(PrivateLinkServicePropertiesAutoApproval)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Subscriptions)) - { - writer.WritePropertyName("subscriptions"u8); - writer.WriteStartArray(); - foreach (var item in Subscriptions) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } PrivateLinkServicePropertiesAutoApproval IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateLinkServicePropertiesVisibility.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateLinkServicePropertiesVisibility.Serialization.cs index 0908ca4bcab8..cec3fcd723fe 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateLinkServicePropertiesVisibility.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateLinkServicePropertiesVisibility.Serialization.cs @@ -18,6 +18,15 @@ internal partial class PrivateLinkServicePropertiesVisibility : IUtf8JsonSeriali void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,33 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(PrivateLinkServicePropertiesVisibility)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Subscriptions)) - { - writer.WritePropertyName("subscriptions"u8); - writer.WriteStartArray(); - foreach (var item in Subscriptions) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } PrivateLinkServicePropertiesVisibility IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateLinkServiceVisibility.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateLinkServiceVisibility.Serialization.cs index 78bd0485e1cc..41e02e0fb9c2 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateLinkServiceVisibility.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateLinkServiceVisibility.Serialization.cs @@ -18,6 +18,15 @@ public partial class PrivateLinkServiceVisibility : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(PrivateLinkServiceVisibility)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Visible)) { writer.WritePropertyName("visible"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } PrivateLinkServiceVisibility IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PropagatedRouteTable.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PropagatedRouteTable.Serialization.cs index 82763f82cba0..f1848fd047fa 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PropagatedRouteTable.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PropagatedRouteTable.Serialization.cs @@ -19,6 +19,15 @@ public partial class PropagatedRouteTable : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(PropagatedRouteTable)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Labels)) { writer.WritePropertyName("labels"u8); @@ -62,7 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } PropagatedRouteTable IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ProtocolConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ProtocolConfiguration.Serialization.cs index 8e19d4ec0940..9029fa27873f 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ProtocolConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ProtocolConfiguration.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ProtocolConfiguration : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(ProtocolConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(HttpProtocolConfiguration)) { writer.WritePropertyName("HTTPConfiguration"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } ProtocolConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PublicIPAddressDnsSettings.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PublicIPAddressDnsSettings.Serialization.cs index 9d49ae70e116..8cd78fde0b96 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PublicIPAddressDnsSettings.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PublicIPAddressDnsSettings.Serialization.cs @@ -18,6 +18,15 @@ public partial class PublicIPAddressDnsSettings : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(PublicIPAddressDnsSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(DomainNameLabel)) { writer.WritePropertyName("domainNameLabel"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } PublicIPAddressDnsSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PublicIPAddressListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PublicIPAddressListResult.Serialization.cs index 322fce4fce13..158e21bc764f 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PublicIPAddressListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PublicIPAddressListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class PublicIPAddressListResult : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(PublicIPAddressListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } PublicIPAddressListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PublicIPAddressSku.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PublicIPAddressSku.Serialization.cs index da8eb810afb0..2faed24bdec2 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PublicIPAddressSku.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PublicIPAddressSku.Serialization.cs @@ -18,6 +18,15 @@ public partial class PublicIPAddressSku : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(PublicIPAddressSku)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } PublicIPAddressSku IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PublicIPDdosProtectionStatusResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PublicIPDdosProtectionStatusResult.Serialization.cs index b2e142f50a1f..275b820821e9 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PublicIPDdosProtectionStatusResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PublicIPDdosProtectionStatusResult.Serialization.cs @@ -19,6 +19,15 @@ public partial class PublicIPDdosProtectionStatusResult : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(PublicIPDdosProtectionStatusResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(PublicIPAddressId)) { writer.WritePropertyName("publicIpAddressId"u8); @@ -62,7 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } PublicIPDdosProtectionStatusResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PublicIPPrefixListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PublicIPPrefixListResult.Serialization.cs index b16b5c0e6786..153577de28c4 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PublicIPPrefixListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PublicIPPrefixListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class PublicIPPrefixListResult : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(PublicIPPrefixListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } PublicIPPrefixListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PublicIPPrefixSku.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PublicIPPrefixSku.Serialization.cs index 385ae0493545..6d8676d42379 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PublicIPPrefixSku.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PublicIPPrefixSku.Serialization.cs @@ -18,6 +18,15 @@ public partial class PublicIPPrefixSku : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(PublicIPPrefixSku)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } PublicIPPrefixSku IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/QosIPRange.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/QosIPRange.Serialization.cs index 9544fb1679f8..73289000118e 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/QosIPRange.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/QosIPRange.Serialization.cs @@ -18,6 +18,15 @@ public partial class QosIPRange : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOption throw new FormatException($"The model {nameof(QosIPRange)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(StartIP)) { writer.WritePropertyName("startIP"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOption #endif } } - writer.WriteEndObject(); } QosIPRange IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/QosPortRange.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/QosPortRange.Serialization.cs index 89b132e77a09..61f61028bfdb 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/QosPortRange.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/QosPortRange.Serialization.cs @@ -18,6 +18,15 @@ public partial class QosPortRange : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(QosPortRange)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Start)) { writer.WritePropertyName("start"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti #endif } } - writer.WriteEndObject(); } QosPortRange IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/QueryInboundNatRulePortMappingContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/QueryInboundNatRulePortMappingContent.Serialization.cs index 32dfa830381b..4e7aa7e04837 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/QueryInboundNatRulePortMappingContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/QueryInboundNatRulePortMappingContent.Serialization.cs @@ -19,6 +19,15 @@ public partial class QueryInboundNatRulePortMappingContent : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(QueryInboundNatRulePortMappingContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IPConfiguration)) { writer.WritePropertyName("ipConfiguration"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } QueryInboundNatRulePortMappingContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/QueryTroubleshootingContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/QueryTroubleshootingContent.Serialization.cs index 3f429620bb83..e4f84a55b144 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/QueryTroubleshootingContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/QueryTroubleshootingContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class QueryTroubleshootingContent : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(QueryTroubleshootingContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("targetResourceId"u8); writer.WriteStringValue(TargetResourceId); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } QueryTroubleshootingContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RadiusServer.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RadiusServer.Serialization.cs index c3cf1179cd65..e324fbcfab13 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RadiusServer.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RadiusServer.Serialization.cs @@ -18,6 +18,15 @@ public partial class RadiusServer : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(RadiusServer)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("radiusServerAddress"u8); writer.WriteStringValue(RadiusServerAddress); if (Optional.IsDefined(RadiusServerScore)) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti #endif } } - writer.WriteEndObject(); } RadiusServer IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RecordSet.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RecordSet.Serialization.cs index a6d631635098..2f9600fbc57b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RecordSet.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RecordSet.Serialization.cs @@ -18,6 +18,15 @@ public partial class RecordSet : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions throw new FormatException($"The model {nameof(RecordSet)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(RecordType)) { writer.WritePropertyName("recordType"u8); @@ -76,7 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions #endif } } - writer.WriteEndObject(); } RecordSet IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ResourceNavigationLink.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ResourceNavigationLink.Serialization.cs index 1066a097a7c1..6f27e682fe31 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ResourceNavigationLink.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ResourceNavigationLink.Serialization.cs @@ -18,6 +18,15 @@ public partial class ResourceNavigationLink : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,27 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(ResourceNavigationLink)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(LinkedResourceType)) @@ -64,22 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ResourceNavigationLink IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ResourceNavigationLinksListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ResourceNavigationLinksListResult.Serialization.cs index fb7b5d146f22..fdc05f08db2f 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ResourceNavigationLinksListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ResourceNavigationLinksListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ResourceNavigationLinksListResult : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(ResourceNavigationLinksListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } ResourceNavigationLinksListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ResourceSet.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ResourceSet.Serialization.cs index 74de9b62fed8..a457175e2378 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ResourceSet.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ResourceSet.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ResourceSet : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio throw new FormatException($"The model {nameof(ResourceSet)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Subscriptions)) { writer.WritePropertyName("subscriptions"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio #endif } } - writer.WriteEndObject(); } ResourceSet IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RetentionPolicyParameters.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RetentionPolicyParameters.Serialization.cs index a4013904a90f..5cc73098668b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RetentionPolicyParameters.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RetentionPolicyParameters.Serialization.cs @@ -18,6 +18,15 @@ public partial class RetentionPolicyParameters : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(RetentionPolicyParameters)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Days)) { writer.WritePropertyName("days"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } RetentionPolicyParameters IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RouteCriterion.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RouteCriterion.Serialization.cs index 1342ae82b288..f996d6738355 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RouteCriterion.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RouteCriterion.Serialization.cs @@ -18,6 +18,15 @@ public partial class RouteCriterion : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(RouteCriterion)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(RoutePrefix)) { writer.WritePropertyName("routePrefix"u8); @@ -76,7 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp #endif } } - writer.WriteEndObject(); } RouteCriterion IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RouteFilterListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RouteFilterListResult.Serialization.cs index 953346f58065..640b69fdd474 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RouteFilterListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RouteFilterListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class RouteFilterListResult : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(RouteFilterListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } RouteFilterListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RouteFilterRuleListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RouteFilterRuleListResult.Serialization.cs index 9c861a4d7502..72a3779b1468 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RouteFilterRuleListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RouteFilterRuleListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class RouteFilterRuleListResult : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(RouteFilterRuleListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } RouteFilterRuleListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RouteListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RouteListResult.Serialization.cs index 6fb1a3b69bb2..a19d00143efe 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RouteListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RouteListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class RouteListResult : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(RouteListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO #endif } } - writer.WriteEndObject(); } RouteListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RouteMapAction.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RouteMapAction.Serialization.cs index 77184271b702..5146993cf0b8 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RouteMapAction.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RouteMapAction.Serialization.cs @@ -18,6 +18,15 @@ public partial class RouteMapAction : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(RouteMapAction)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ActionType)) { writer.WritePropertyName("type"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp #endif } } - writer.WriteEndObject(); } RouteMapAction IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RouteMapActionParameter.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RouteMapActionParameter.Serialization.cs index 1fb90c41a249..3b63b49070e4 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RouteMapActionParameter.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RouteMapActionParameter.Serialization.cs @@ -18,6 +18,15 @@ public partial class RouteMapActionParameter : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(RouteMapActionParameter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(RoutePrefix)) { writer.WritePropertyName("routePrefix"u8); @@ -71,7 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } RouteMapActionParameter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RouteMapRule.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RouteMapRule.Serialization.cs index f54d9b5ca6c5..e3143979dc58 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RouteMapRule.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RouteMapRule.Serialization.cs @@ -18,6 +18,15 @@ public partial class RouteMapRule : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(RouteMapRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -71,7 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti #endif } } - writer.WriteEndObject(); } RouteMapRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RouteTableListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RouteTableListResult.Serialization.cs index f19f95142809..120f40d27f7f 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RouteTableListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RouteTableListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class RouteTableListResult : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(RouteTableListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } RouteTableListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RoutingConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RoutingConfiguration.Serialization.cs index 8987419277e1..807369f26f15 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RoutingConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RoutingConfiguration.Serialization.cs @@ -19,6 +19,15 @@ public partial class RoutingConfiguration : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(RoutingConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(AssociatedRouteTable)) { writer.WritePropertyName("associatedRouteTable"u8); @@ -67,7 +75,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } RoutingConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RoutingPolicy.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RoutingPolicy.Serialization.cs index 5a68a9eccda5..5fdd223226c5 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RoutingPolicy.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RoutingPolicy.Serialization.cs @@ -18,6 +18,15 @@ public partial class RoutingPolicy : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt throw new FormatException($"The model {nameof(RoutingPolicy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); writer.WritePropertyName("destinations"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt #endif } } - writer.WriteEndObject(); } RoutingPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RoutingRuleCollectionListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RoutingRuleCollectionListResult.Serialization.cs index 1af2e83a086b..ed1875e3efa2 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RoutingRuleCollectionListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RoutingRuleCollectionListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class RoutingRuleCollectionListResult : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(RoutingRuleCollectionListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } RoutingRuleCollectionListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RoutingRuleListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RoutingRuleListResult.Serialization.cs index ac645d46d73e..41612f39f5ab 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RoutingRuleListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RoutingRuleListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class RoutingRuleListResult : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(RoutingRuleListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } RoutingRuleListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RoutingRuleNextHop.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RoutingRuleNextHop.Serialization.cs index ed558b9f2972..36a7648c6e2e 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RoutingRuleNextHop.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RoutingRuleNextHop.Serialization.cs @@ -18,6 +18,15 @@ public partial class RoutingRuleNextHop : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(RoutingRuleNextHop)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("nextHopType"u8); writer.WriteStringValue(NextHopType.ToString()); if (Optional.IsDefined(NextHopAddress)) @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } RoutingRuleNextHop IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RoutingRuleRouteDestination.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RoutingRuleRouteDestination.Serialization.cs index 826ba94f4104..0def0c864985 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RoutingRuleRouteDestination.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RoutingRuleRouteDestination.Serialization.cs @@ -18,6 +18,15 @@ public partial class RoutingRuleRouteDestination : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(RoutingRuleRouteDestination)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("type"u8); writer.WriteStringValue(DestinationType.ToString()); writer.WritePropertyName("destinationAddress"u8); @@ -45,7 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } RoutingRuleRouteDestination IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ScopeConnectionListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ScopeConnectionListResult.Serialization.cs index 9bc83b9b4e13..f77124f3c619 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ScopeConnectionListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ScopeConnectionListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ScopeConnectionListResult : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(ScopeConnectionListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } ScopeConnectionListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityAdminConfigurationListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityAdminConfigurationListResult.Serialization.cs index 1795868d65cd..42250aec8bde 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityAdminConfigurationListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityAdminConfigurationListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class SecurityAdminConfigurationListResult : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(SecurityAdminConfigurationListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } SecurityAdminConfigurationListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityGroupNetworkInterface.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityGroupNetworkInterface.Serialization.cs index 6692354531e2..96800ca2905e 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityGroupNetworkInterface.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityGroupNetworkInterface.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityGroupNetworkInterface : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(SecurityGroupNetworkInterface)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } SecurityGroupNetworkInterface IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityGroupViewContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityGroupViewContent.Serialization.cs index 36278a008b6d..7b61bb6d50c2 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityGroupViewContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityGroupViewContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityGroupViewContent : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(SecurityGroupViewContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("targetResourceId"u8); writer.WriteStringValue(TargetResourceId); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } SecurityGroupViewContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityGroupViewResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityGroupViewResult.Serialization.cs index 9e70d6bf7cc5..a8bef3134761 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityGroupViewResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityGroupViewResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityGroupViewResult : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(SecurityGroupViewResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(NetworkInterfaces)) { writer.WritePropertyName("networkInterfaces"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } SecurityGroupViewResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityPartnerProviderListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityPartnerProviderListResult.Serialization.cs index d73a0d7b6791..730918f6409a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityPartnerProviderListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityPartnerProviderListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class SecurityPartnerProviderListResult : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(SecurityPartnerProviderListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } SecurityPartnerProviderListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityRuleAssociations.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityRuleAssociations.Serialization.cs index dd4a36c35b6f..e009f16b09eb 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityRuleAssociations.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityRuleAssociations.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityRuleAssociations : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(SecurityRuleAssociations)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(NetworkInterfaceAssociation)) { writer.WritePropertyName("networkInterfaceAssociation"u8); @@ -71,7 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } SecurityRuleAssociations IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityRuleListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityRuleListResult.Serialization.cs index 41b9b1cafdff..461f908fb0f3 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityRuleListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityRuleListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class SecurityRuleListResult : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(SecurityRuleListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } SecurityRuleListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityUserConfigurationListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityUserConfigurationListResult.Serialization.cs index 2dd4e3bd6a5a..90dafbd51687 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityUserConfigurationListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityUserConfigurationListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class SecurityUserConfigurationListResult : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(SecurityUserConfigurationListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } SecurityUserConfigurationListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityUserGroupItem.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityUserGroupItem.Serialization.cs index 800ccc6cfc2e..b1857d85d492 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityUserGroupItem.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityUserGroupItem.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityUserGroupItem : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(SecurityUserGroupItem)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("networkGroupId"u8); writer.WriteStringValue(NetworkGroupId); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } SecurityUserGroupItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityUserRuleCollectionListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityUserRuleCollectionListResult.Serialization.cs index 224cd68044a0..5a27a3b29a08 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityUserRuleCollectionListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityUserRuleCollectionListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class SecurityUserRuleCollectionListResult : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(SecurityUserRuleCollectionListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } SecurityUserRuleCollectionListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityUserRuleListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityUserRuleListResult.Serialization.cs index 0a0007f71a83..101fa7868ac5 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityUserRuleListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityUserRuleListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class SecurityUserRuleListResult : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(SecurityUserRuleListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } SecurityUserRuleListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceAssociationLink.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceAssociationLink.Serialization.cs index d68f706378cc..f26c4cad9fb0 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceAssociationLink.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceAssociationLink.Serialization.cs @@ -18,6 +18,15 @@ public partial class ServiceAssociationLink : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,27 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(ServiceAssociationLink)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(LinkedResourceType)) @@ -79,22 +73,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ServiceAssociationLink IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceAssociationLinksListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceAssociationLinksListResult.Serialization.cs index 2152c0e892f2..ae55a00628c6 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceAssociationLinksListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceAssociationLinksListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ServiceAssociationLinksListResult : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(ServiceAssociationLinksListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } ServiceAssociationLinksListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceDelegation.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceDelegation.Serialization.cs index 74be7445181c..cec52c8ababd 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceDelegation.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceDelegation.Serialization.cs @@ -18,6 +18,15 @@ public partial class ServiceDelegation : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,27 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(ServiceDelegation)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(ServiceName)) @@ -69,22 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ServiceDelegation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceEndpointPolicyDefinitionListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceEndpointPolicyDefinitionListResult.Serialization.cs index 4aa4430a4493..5ff772f6f7c2 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceEndpointPolicyDefinitionListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceEndpointPolicyDefinitionListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ServiceEndpointPolicyDefinitionListResult : IUtf8JsonSeri void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(ServiceEndpointPolicyDefinitionListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } ServiceEndpointPolicyDefinitionListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceEndpointPolicyListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceEndpointPolicyListResult.Serialization.cs index 0dcd381bfde1..83f0eb8c334d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceEndpointPolicyListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceEndpointPolicyListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ServiceEndpointPolicyListResult : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(ServiceEndpointPolicyListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } ServiceEndpointPolicyListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceEndpointProperties.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceEndpointProperties.Serialization.cs index bbeba62f0b5e..e96cd9b7f3ae 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceEndpointProperties.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceEndpointProperties.Serialization.cs @@ -19,6 +19,15 @@ public partial class ServiceEndpointProperties : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(ServiceEndpointProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Service)) { writer.WritePropertyName("service"u8); @@ -67,7 +75,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } ServiceEndpointProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceTagInformation.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceTagInformation.Serialization.cs index 566e282f14bd..b31f4fc20bee 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceTagInformation.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceTagInformation.Serialization.cs @@ -18,6 +18,15 @@ public partial class ServiceTagInformation : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(ServiceTagInformation)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } ServiceTagInformation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceTagInformationListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceTagInformationListResult.Serialization.cs index 1a1aa4d7e638..38b4c3be4a90 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceTagInformationListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceTagInformationListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ServiceTagInformationListResult : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(ServiceTagInformationListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } ServiceTagInformationListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceTagInformationPropertiesFormat.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceTagInformationPropertiesFormat.Serialization.cs index 88c4cd978ab1..2f485568c3ef 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceTagInformationPropertiesFormat.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceTagInformationPropertiesFormat.Serialization.cs @@ -18,6 +18,15 @@ public partial class ServiceTagInformationPropertiesFormat : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(ServiceTagInformationPropertiesFormat)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ChangeNumber)) { writer.WritePropertyName("changeNumber"u8); @@ -71,7 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } ServiceTagInformationPropertiesFormat IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceTagsListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceTagsListResult.Serialization.cs index 6b09f4f70f46..a2b8ddeaee54 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceTagsListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceTagsListResult.Serialization.cs @@ -19,6 +19,15 @@ public partial class ServiceTagsListResult : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(ServiceTagsListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ChangeNumber)) { writer.WritePropertyName("changeNumber"u8); @@ -52,42 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW writer.WritePropertyName("nextLink"u8); writer.WriteStringValue(NextLink); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ServiceTagsListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SignatureOverridesFilterValuesQueryContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SignatureOverridesFilterValuesQueryContent.Serialization.cs index efd2cbef8252..604ef18907bf 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SignatureOverridesFilterValuesQueryContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SignatureOverridesFilterValuesQueryContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class SignatureOverridesFilterValuesQueryContent : IUtf8JsonSeria void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(SignatureOverridesFilterValuesQueryContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(FilterName)) { writer.WritePropertyName("filterName"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } SignatureOverridesFilterValuesQueryContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SignatureOverridesFilterValuesResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SignatureOverridesFilterValuesResult.Serialization.cs index d1a4764d9194..eb029541c792 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SignatureOverridesFilterValuesResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SignatureOverridesFilterValuesResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class SignatureOverridesFilterValuesResult : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(SignatureOverridesFilterValuesResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(FilterValues)) { writer.WritePropertyName("filterValues"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } SignatureOverridesFilterValuesResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/StaticRoute.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/StaticRoute.Serialization.cs index edcbb5fe205a..6ffffbe01251 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/StaticRoute.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/StaticRoute.Serialization.cs @@ -18,6 +18,15 @@ public partial class StaticRoute : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio throw new FormatException($"The model {nameof(StaticRoute)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio #endif } } - writer.WriteEndObject(); } StaticRoute IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/StaticRoutesConfig.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/StaticRoutesConfig.Serialization.cs index 1060764aa582..c8973480bd84 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/StaticRoutesConfig.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/StaticRoutesConfig.Serialization.cs @@ -18,6 +18,15 @@ public partial class StaticRoutesConfig : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(StaticRoutesConfig)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(PropagateStaticRoutes)) { writer.WritePropertyName("propagateStaticRoutes"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } StaticRoutesConfig IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SubnetAssociation.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SubnetAssociation.Serialization.cs index c56bb70f5f51..ad220614fc6f 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SubnetAssociation.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SubnetAssociation.Serialization.cs @@ -18,6 +18,15 @@ public partial class SubnetAssociation : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(SubnetAssociation)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } SubnetAssociation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SubnetListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SubnetListResult.Serialization.cs index 55ab5a43d4e0..3b47ec562413 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SubnetListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SubnetListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class SubnetListResult : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(SubnetListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } SubnetListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TopologyAssociation.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TopologyAssociation.Serialization.cs index b1291e0049d5..72ffa2616ec8 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TopologyAssociation.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TopologyAssociation.Serialization.cs @@ -18,6 +18,15 @@ public partial class TopologyAssociation : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(TopologyAssociation)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } TopologyAssociation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TopologyContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TopologyContent.Serialization.cs index c55e3967ab16..c31e5942771f 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TopologyContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TopologyContent.Serialization.cs @@ -19,6 +19,15 @@ public partial class TopologyContent : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(TopologyContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(TargetResourceGroupName)) { writer.WritePropertyName("targetResourceGroupName"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO #endif } } - writer.WriteEndObject(); } TopologyContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TopologyResourceInfo.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TopologyResourceInfo.Serialization.cs index 547b23cf4d5e..02eb0de4e9a2 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TopologyResourceInfo.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TopologyResourceInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class TopologyResourceInfo : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(TopologyResourceInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } TopologyResourceInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TrafficAnalyticsConfigurationProperties.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TrafficAnalyticsConfigurationProperties.Serialization.cs index 8209dd9309ef..33278b2439f9 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TrafficAnalyticsConfigurationProperties.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TrafficAnalyticsConfigurationProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class TrafficAnalyticsConfigurationProperties : IUtf8JsonSerializ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wr throw new FormatException($"The model {nameof(TrafficAnalyticsConfigurationProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Enabled)) { writer.WritePropertyName("enabled"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter wr #endif } } - writer.WriteEndObject(); } TrafficAnalyticsConfigurationProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TrafficAnalyticsProperties.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TrafficAnalyticsProperties.Serialization.cs index 02816d9fea0d..33b0253f552d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TrafficAnalyticsProperties.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TrafficAnalyticsProperties.Serialization.cs @@ -18,6 +18,15 @@ internal partial class TrafficAnalyticsProperties : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(TrafficAnalyticsProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(TrafficAnalyticsConfiguration)) { writer.WritePropertyName("networkWatcherFlowAnalyticsConfiguration"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } TrafficAnalyticsProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TrafficSelectorPolicy.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TrafficSelectorPolicy.Serialization.cs index 76df7e1f77f3..23496ede25b8 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TrafficSelectorPolicy.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TrafficSelectorPolicy.Serialization.cs @@ -18,6 +18,15 @@ public partial class TrafficSelectorPolicy : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(TrafficSelectorPolicy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("localAddressRanges"u8); writer.WriteStartArray(); foreach (var item in LocalAddressRanges) @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } TrafficSelectorPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TroubleshootingContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TroubleshootingContent.Serialization.cs index 097641ee659d..0226bb72dcab 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TroubleshootingContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TroubleshootingContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class TroubleshootingContent : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(TroubleshootingContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("targetResourceId"u8); writer.WriteStringValue(TargetResourceId); writer.WritePropertyName("properties"u8); @@ -50,7 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } TroubleshootingContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TroubleshootingDetails.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TroubleshootingDetails.Serialization.cs index 5e9ed618245e..78e9fc6ceaf9 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TroubleshootingDetails.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TroubleshootingDetails.Serialization.cs @@ -18,6 +18,15 @@ public partial class TroubleshootingDetails : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(TroubleshootingDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -71,7 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } TroubleshootingDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TroubleshootingRecommendedActions.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TroubleshootingRecommendedActions.Serialization.cs index ab53da8f4ec8..9bd6b6aacb17 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TroubleshootingRecommendedActions.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TroubleshootingRecommendedActions.Serialization.cs @@ -18,6 +18,15 @@ public partial class TroubleshootingRecommendedActions : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(TroubleshootingRecommendedActions)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ActionId)) { writer.WritePropertyName("actionId"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } TroubleshootingRecommendedActions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TroubleshootingResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TroubleshootingResult.Serialization.cs index 01149a1f3bac..f7e75b69e5b2 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TroubleshootingResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TroubleshootingResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class TroubleshootingResult : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(TroubleshootingResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(StartOn)) { writer.WritePropertyName("startTime"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } TroubleshootingResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TunnelConnectionHealth.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TunnelConnectionHealth.Serialization.cs index bec1d4f98513..f1768cf883bb 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TunnelConnectionHealth.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TunnelConnectionHealth.Serialization.cs @@ -18,6 +18,15 @@ public partial class TunnelConnectionHealth : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(TunnelConnectionHealth)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Tunnel)) { writer.WritePropertyName("tunnel"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } TunnelConnectionHealth IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/UnknownActiveBaseSecurityAdminRule.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/UnknownActiveBaseSecurityAdminRule.Serialization.cs index 0e118eb6b615..9fbcb5701939 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/UnknownActiveBaseSecurityAdminRule.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/UnknownActiveBaseSecurityAdminRule.Serialization.cs @@ -18,6 +18,15 @@ internal partial class UnknownActiveBaseSecurityAdminRule : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,70 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(ActiveBaseSecurityAdminRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(CommitOn)) - { - writer.WritePropertyName("commitTime"u8); - writer.WriteStringValue(CommitOn.Value, "O"); - } - if (Optional.IsDefined(Region)) - { - writer.WritePropertyName("region"u8); - writer.WriteStringValue(Region); - } - if (Optional.IsDefined(ConfigurationDescription)) - { - writer.WritePropertyName("configurationDescription"u8); - writer.WriteStringValue(ConfigurationDescription); - } - if (Optional.IsDefined(RuleCollectionDescription)) - { - writer.WritePropertyName("ruleCollectionDescription"u8); - writer.WriteStringValue(RuleCollectionDescription); - } - if (Optional.IsCollectionDefined(RuleCollectionAppliesToGroups)) - { - writer.WritePropertyName("ruleCollectionAppliesToGroups"u8); - writer.WriteStartArray(); - foreach (var item in RuleCollectionAppliesToGroups) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(RuleGroups)) - { - writer.WritePropertyName("ruleGroups"u8); - writer.WriteStartArray(); - foreach (var item in RuleGroups) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } ActiveBaseSecurityAdminRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/UnknownBaseAdminRule.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/UnknownBaseAdminRule.Serialization.cs index 98bfd396974b..362e27cbdca2 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/UnknownBaseAdminRule.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/UnknownBaseAdminRule.Serialization.cs @@ -19,6 +19,15 @@ internal partial class UnknownBaseAdminRule : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,50 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(BaseAdminRuleData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (options.Format != "W" && Optional.IsDefined(ETag)) - { - writer.WritePropertyName("etag"u8); - writer.WriteStringValue(ETag.Value.ToString()); - } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } BaseAdminRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/UnknownEffectiveBaseSecurityAdminRule.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/UnknownEffectiveBaseSecurityAdminRule.Serialization.cs index 7da422a99275..3aa5f50b3808 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/UnknownEffectiveBaseSecurityAdminRule.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/UnknownEffectiveBaseSecurityAdminRule.Serialization.cs @@ -18,6 +18,15 @@ internal partial class UnknownEffectiveBaseSecurityAdminRule : IUtf8JsonSerializ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,60 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(EffectiveBaseSecurityAdminRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(ResourceId)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(ResourceId); - } - if (Optional.IsDefined(ConfigurationDescription)) - { - writer.WritePropertyName("configurationDescription"u8); - writer.WriteStringValue(ConfigurationDescription); - } - if (Optional.IsDefined(RuleCollectionDescription)) - { - writer.WritePropertyName("ruleCollectionDescription"u8); - writer.WriteStringValue(RuleCollectionDescription); - } - if (Optional.IsCollectionDefined(RuleCollectionAppliesToGroups)) - { - writer.WritePropertyName("ruleCollectionAppliesToGroups"u8); - writer.WriteStartArray(); - foreach (var item in RuleCollectionAppliesToGroups) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(RuleGroups)) - { - writer.WritePropertyName("ruleGroups"u8); - writer.WriteStartArray(); - foreach (var item in RuleGroups) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } EffectiveBaseSecurityAdminRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/UnknownFirewallPolicyRule.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/UnknownFirewallPolicyRule.Serialization.cs index abdf97349d3b..1d05c1929643 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/UnknownFirewallPolicyRule.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/UnknownFirewallPolicyRule.Serialization.cs @@ -18,6 +18,15 @@ internal partial class UnknownFirewallPolicyRule : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,35 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(FirewallPolicyRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - writer.WritePropertyName("ruleType"u8); - writer.WriteStringValue(RuleType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } FirewallPolicyRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/UnknownFirewallPolicyRuleCollection.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/UnknownFirewallPolicyRuleCollection.Serialization.cs index ac35c9488242..318f14e176bf 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/UnknownFirewallPolicyRuleCollection.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/UnknownFirewallPolicyRuleCollection.Serialization.cs @@ -18,6 +18,15 @@ internal partial class UnknownFirewallPolicyRuleCollection : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,35 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(FirewallPolicyRuleCollectionInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("ruleCollectionType"u8); - writer.WriteStringValue(RuleCollectionType.ToString()); - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (Optional.IsDefined(Priority)) - { - writer.WritePropertyName("priority"u8); - writer.WriteNumberValue(Priority.Value); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } FirewallPolicyRuleCollectionInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/UnprepareNetworkPoliciesContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/UnprepareNetworkPoliciesContent.Serialization.cs index 552a910a6fc7..45a95eb3b9de 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/UnprepareNetworkPoliciesContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/UnprepareNetworkPoliciesContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class UnprepareNetworkPoliciesContent : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(UnprepareNetworkPoliciesContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ServiceName)) { writer.WritePropertyName("serviceName"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } UnprepareNetworkPoliciesContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VerificationIPFlowContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VerificationIPFlowContent.Serialization.cs index 313d6f047b2f..58615ac89292 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VerificationIPFlowContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VerificationIPFlowContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class VerificationIPFlowContent : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(VerificationIPFlowContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("targetResourceId"u8); writer.WriteStringValue(TargetResourceId); writer.WritePropertyName("direction"u8); @@ -60,7 +68,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } VerificationIPFlowContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VerificationIPFlowResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VerificationIPFlowResult.Serialization.cs index 26e6458393fa..605a5cf084a1 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VerificationIPFlowResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VerificationIPFlowResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class VerificationIPFlowResult : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(VerificationIPFlowResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Access)) { writer.WritePropertyName("access"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } VerificationIPFlowResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualApplianceAdditionalNicProperties.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualApplianceAdditionalNicProperties.Serialization.cs index 7fc6925a860c..6c62f710e040 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualApplianceAdditionalNicProperties.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualApplianceAdditionalNicProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualApplianceAdditionalNicProperties : IUtf8JsonSerializ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wr throw new FormatException($"The model {nameof(VirtualApplianceAdditionalNicProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter wr #endif } } - writer.WriteEndObject(); } VirtualApplianceAdditionalNicProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualApplianceDelegationProperties.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualApplianceDelegationProperties.Serialization.cs index b8c24691183f..ad9e96b7bb4a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualApplianceDelegationProperties.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualApplianceDelegationProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualApplianceDelegationProperties : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(VirtualApplianceDelegationProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ServiceName)) { writer.WritePropertyName("serviceName"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } VirtualApplianceDelegationProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualApplianceIPConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualApplianceIPConfiguration.Serialization.cs index 6af79f4f477a..b34915ca7b5d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualApplianceIPConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualApplianceIPConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualApplianceIPConfiguration : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(VirtualApplianceIPConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } VirtualApplianceIPConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualApplianceIPConfigurationProperties.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualApplianceIPConfigurationProperties.Serialization.cs index ac327d6aa82b..cb1c95abaddd 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualApplianceIPConfigurationProperties.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualApplianceIPConfigurationProperties.Serialization.cs @@ -18,6 +18,15 @@ internal partial class VirtualApplianceIPConfigurationProperties : IUtf8JsonSeri void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(VirtualApplianceIPConfigurationProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IsPrimary)) { writer.WritePropertyName("primary"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } VirtualApplianceIPConfigurationProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualApplianceNetworkInterfaceConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualApplianceNetworkInterfaceConfiguration.Serialization.cs index 7258ea04b232..ee9b351cad51 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualApplianceNetworkInterfaceConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualApplianceNetworkInterfaceConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualApplianceNetworkInterfaceConfiguration : IUtf8JsonSe void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWri throw new FormatException($"The model {nameof(VirtualApplianceNetworkInterfaceConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(NicType)) { writer.WritePropertyName("type"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWri #endif } } - writer.WriteEndObject(); } VirtualApplianceNetworkInterfaceConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualApplianceNetworkInterfaceConfigurationProperties.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualApplianceNetworkInterfaceConfigurationProperties.Serialization.cs index 3f1212f818f2..4595659dbd04 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualApplianceNetworkInterfaceConfigurationProperties.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualApplianceNetworkInterfaceConfigurationProperties.Serialization.cs @@ -18,6 +18,15 @@ internal partial class VirtualApplianceNetworkInterfaceConfigurationProperties : void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(U throw new FormatException($"The model {nameof(VirtualApplianceNetworkInterfaceConfigurationProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(IPConfigurations)) { writer.WritePropertyName("ipConfigurations"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(U #endif } } - writer.WriteEndObject(); } VirtualApplianceNetworkInterfaceConfigurationProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualApplianceNicProperties.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualApplianceNicProperties.Serialization.cs index 90e8a48147aa..a012ed224756 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualApplianceNicProperties.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualApplianceNicProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualApplianceNicProperties : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(VirtualApplianceNicProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(NicType)) { writer.WritePropertyName("nicType"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } VirtualApplianceNicProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualApplianceSkuProperties.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualApplianceSkuProperties.Serialization.cs index fb6a307ae94f..f1332eaf5b7d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualApplianceSkuProperties.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualApplianceSkuProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualApplianceSkuProperties : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(VirtualApplianceSkuProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Vendor)) { writer.WritePropertyName("vendor"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } VirtualApplianceSkuProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualHubEffectiveRoute.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualHubEffectiveRoute.Serialization.cs index 0f709d33733c..221f6b0a9566 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualHubEffectiveRoute.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualHubEffectiveRoute.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualHubEffectiveRoute : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(VirtualHubEffectiveRoute)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(AddressPrefixes)) { writer.WritePropertyName("addressPrefixes"u8); @@ -76,7 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } VirtualHubEffectiveRoute IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualHubEffectiveRouteList.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualHubEffectiveRouteList.Serialization.cs index d33f773e6c33..ac218341cadc 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualHubEffectiveRouteList.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualHubEffectiveRouteList.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualHubEffectiveRouteList : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(VirtualHubEffectiveRouteList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } VirtualHubEffectiveRouteList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualHubInboundRoutesContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualHubInboundRoutesContent.Serialization.cs index 5d9992b822d2..8990debf8a87 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualHubInboundRoutesContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualHubInboundRoutesContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualHubInboundRoutesContent : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(VirtualHubInboundRoutesContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ResourceUri)) { writer.WritePropertyName("resourceUri"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } VirtualHubInboundRoutesContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualHubOutboundRoutesContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualHubOutboundRoutesContent.Serialization.cs index 7501fb75c338..7915e17f6e73 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualHubOutboundRoutesContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualHubOutboundRoutesContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualHubOutboundRoutesContent : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(VirtualHubOutboundRoutesContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ResourceUri)) { writer.WritePropertyName("resourceUri"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } VirtualHubOutboundRoutesContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualHubRoute.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualHubRoute.Serialization.cs index 404da2655b77..8ea7c7b04ed7 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualHubRoute.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualHubRoute.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualHubRoute : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(VirtualHubRoute)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(AddressPrefixes)) { writer.WritePropertyName("addressPrefixes"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO #endif } } - writer.WriteEndObject(); } VirtualHubRoute IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualHubRouteTable.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualHubRouteTable.Serialization.cs index b4268f70b766..5f55c447c5e4 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualHubRouteTable.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualHubRouteTable.Serialization.cs @@ -18,6 +18,15 @@ internal partial class VirtualHubRouteTable : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(VirtualHubRouteTable)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Routes)) { writer.WritePropertyName("routes"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } VirtualHubRouteTable IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualHubRouteV2.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualHubRouteV2.Serialization.cs index d53380544a7c..8f89b7b07eff 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualHubRouteV2.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualHubRouteV2.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualHubRouteV2 : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(VirtualHubRouteV2)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(DestinationType)) { writer.WritePropertyName("destinationType"u8); @@ -71,7 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } VirtualHubRouteV2 IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkBgpCommunities.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkBgpCommunities.Serialization.cs index 839d0fd234de..249e3ab293c9 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkBgpCommunities.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkBgpCommunities.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualNetworkBgpCommunities : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(VirtualNetworkBgpCommunities)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("virtualNetworkCommunity"u8); writer.WriteStringValue(VirtualNetworkCommunity); if (options.Format != "W" && Optional.IsDefined(RegionalCommunity)) @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } VirtualNetworkBgpCommunities IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkEncryption.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkEncryption.Serialization.cs index 8a0e6635d9df..796d31e9722b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkEncryption.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkEncryption.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualNetworkEncryption : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(VirtualNetworkEncryption)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("enabled"u8); writer.WriteBooleanValue(IsEnabled); if (Optional.IsDefined(Enforcement)) @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } VirtualNetworkEncryption IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayAutoScaleBounds.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayAutoScaleBounds.Serialization.cs index 8cc4a2da9f5b..6b0b1c313bfd 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayAutoScaleBounds.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayAutoScaleBounds.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualNetworkGatewayAutoScaleBounds : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(VirtualNetworkGatewayAutoScaleBounds)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Min)) { writer.WritePropertyName("min"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } VirtualNetworkGatewayAutoScaleBounds IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayAutoScaleConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayAutoScaleConfiguration.Serialization.cs index afcd9bdcc3ac..53c4d0214f6a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayAutoScaleConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayAutoScaleConfiguration.Serialization.cs @@ -18,6 +18,15 @@ internal partial class VirtualNetworkGatewayAutoScaleConfiguration : IUtf8JsonSe void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWrite throw new FormatException($"The model {nameof(VirtualNetworkGatewayAutoScaleConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Bounds)) { writer.WritePropertyName("bounds"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWrite #endif } } - writer.WriteEndObject(); } VirtualNetworkGatewayAutoScaleConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayConnectionListEntity.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayConnectionListEntity.Serialization.cs index fec4b87a16c9..93b2df576e04 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayConnectionListEntity.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayConnectionListEntity.Serialization.cs @@ -19,6 +19,15 @@ public partial class VirtualNetworkGatewayConnectionListEntity : IUtf8JsonSerial void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,43 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(VirtualNetworkGatewayConnectionListEntity)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(AuthorizationKey)) @@ -195,22 +173,6 @@ void IJsonModel.Write(Utf8JsonWriter writer.WriteBooleanValue(EnablePrivateLinkFastPath.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } VirtualNetworkGatewayConnectionListEntity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayConnectionListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayConnectionListResult.Serialization.cs index 30fb2de89c7b..3613c761f37f 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayConnectionListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayConnectionListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class VirtualNetworkGatewayConnectionListResult : IUtf8JsonSeri void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(VirtualNetworkGatewayConnectionListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } VirtualNetworkGatewayConnectionListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayIPConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayIPConfiguration.Serialization.cs index 9f901bafac74..b05bf917461e 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayIPConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayIPConfiguration.Serialization.cs @@ -19,6 +19,15 @@ public partial class VirtualNetworkGatewayIPConfiguration : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(VirtualNetworkGatewayIPConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(PrivateIPAllocationMethod)) @@ -75,22 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter write writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } VirtualNetworkGatewayIPConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayListConnectionsResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayListConnectionsResult.Serialization.cs index 8e09a5e91b47..3f5b3b5b87f9 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayListConnectionsResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayListConnectionsResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class VirtualNetworkGatewayListConnectionsResult : IUtf8JsonSer void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(VirtualNetworkGatewayListConnectionsResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } VirtualNetworkGatewayListConnectionsResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayListResult.Serialization.cs index f7cbf0c2e383..342a6a6cfb02 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class VirtualNetworkGatewayListResult : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(VirtualNetworkGatewayListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } VirtualNetworkGatewayListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayPolicyGroup.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayPolicyGroup.Serialization.cs index 57ce1de820f9..feb36d098dbc 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayPolicyGroup.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayPolicyGroup.Serialization.cs @@ -19,6 +19,15 @@ public partial class VirtualNetworkGatewayPolicyGroup : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(VirtualNetworkGatewayPolicyGroup)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(IsDefault)) @@ -85,22 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } VirtualNetworkGatewayPolicyGroup IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayPolicyGroupMember.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayPolicyGroupMember.Serialization.cs index 982abaf65145..0f1587f3de36 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayPolicyGroupMember.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayPolicyGroupMember.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualNetworkGatewayPolicyGroupMember : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(VirtualNetworkGatewayPolicyGroupMember)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } VirtualNetworkGatewayPolicyGroupMember IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewaySku.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewaySku.Serialization.cs index 727d7abd561b..9780cd737f78 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewaySku.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewaySku.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualNetworkGatewaySku : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(VirtualNetworkGatewaySku)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } VirtualNetworkGatewaySku IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkListResult.Serialization.cs index b7a846bcd10a..ad3650ba02d6 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class VirtualNetworkListResult : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(VirtualNetworkListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } VirtualNetworkListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkListUsageResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkListUsageResult.Serialization.cs index c57908715ab8..7c3695809f31 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkListUsageResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkListUsageResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class VirtualNetworkListUsageResult : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(VirtualNetworkListUsageResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } VirtualNetworkListUsageResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkPeeringListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkPeeringListResult.Serialization.cs index 35ff1589227d..2daa22a44d18 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkPeeringListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkPeeringListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class VirtualNetworkPeeringListResult : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(VirtualNetworkPeeringListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } VirtualNetworkPeeringListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkTapListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkTapListResult.Serialization.cs index 5e411207be2a..88725ec38b0e 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkTapListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkTapListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class VirtualNetworkTapListResult : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(VirtualNetworkTapListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } VirtualNetworkTapListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkUsage.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkUsage.Serialization.cs index b6a49adf3784..00d81904e5d3 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkUsage.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkUsage.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualNetworkUsage : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(VirtualNetworkUsage)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(CurrentValue)) { writer.WritePropertyName("currentValue"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } VirtualNetworkUsage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkUsageName.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkUsageName.Serialization.cs index 58ffbf0693aa..10efea14c8b7 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkUsageName.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkUsageName.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualNetworkUsageName : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(VirtualNetworkUsageName)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(LocalizedValue)) { writer.WritePropertyName("localizedValue"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } VirtualNetworkUsageName IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualRouterAutoScaleConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualRouterAutoScaleConfiguration.Serialization.cs index b2643234a8a5..16249527c496 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualRouterAutoScaleConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualRouterAutoScaleConfiguration.Serialization.cs @@ -18,6 +18,15 @@ internal partial class VirtualRouterAutoScaleConfiguration : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(VirtualRouterAutoScaleConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(MinCapacity)) { writer.WritePropertyName("minCapacity"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } VirtualRouterAutoScaleConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualRouterListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualRouterListResult.Serialization.cs index 2d0c2df5be59..3e9903f8b8d4 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualRouterListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualRouterListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class VirtualRouterListResult : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(VirtualRouterListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } VirtualRouterListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualRouterPeeringListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualRouterPeeringListResult.Serialization.cs index 80d216211462..e0ce8200d0c9 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualRouterPeeringListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualRouterPeeringListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class VirtualRouterPeeringListResult : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(VirtualRouterPeeringListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } VirtualRouterPeeringListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualWanSecurityProvider.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualWanSecurityProvider.Serialization.cs index 577746116bb7..c8d89db78ef3 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualWanSecurityProvider.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualWanSecurityProvider.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualWanSecurityProvider : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(VirtualWanSecurityProvider)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } VirtualWanSecurityProvider IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualWanSecurityProviders.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualWanSecurityProviders.Serialization.cs index 9549064de00b..9c98c303edd0 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualWanSecurityProviders.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualWanSecurityProviders.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualWanSecurityProviders : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(VirtualWanSecurityProviders)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(SupportedProviders)) { writer.WritePropertyName("supportedProviders"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } VirtualWanSecurityProviders IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualWanVpnProfileContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualWanVpnProfileContent.Serialization.cs index 8ab600f9368e..7091660553a3 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualWanVpnProfileContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualWanVpnProfileContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualWanVpnProfileContent : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(VirtualWanVpnProfileContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(VpnServerConfigurationResourceId)) { writer.WritePropertyName("vpnServerConfigurationResourceId"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } VirtualWanVpnProfileContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VnetRoute.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VnetRoute.Serialization.cs index 0f83363d60ec..59eace767eed 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VnetRoute.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VnetRoute.Serialization.cs @@ -19,6 +19,15 @@ public partial class VnetRoute : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions throw new FormatException($"The model {nameof(VnetRoute)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(StaticRoutesConfig)) { writer.WritePropertyName("staticRoutesConfig"u8); @@ -67,7 +75,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions #endif } } - writer.WriteEndObject(); } VnetRoute IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VngClientConnectionConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VngClientConnectionConfiguration.Serialization.cs index 71c5c4de0e16..be944b5fba59 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VngClientConnectionConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VngClientConnectionConfiguration.Serialization.cs @@ -19,6 +19,15 @@ public partial class VngClientConnectionConfiguration : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(VngClientConnectionConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(VpnClientAddressPool)) @@ -70,22 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } VngClientConnectionConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnClientConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnClientConfiguration.Serialization.cs index 9a9a98222eb1..bb97feb678d4 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnClientConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnClientConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class VpnClientConfiguration : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(VpnClientConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(VpnClientAddressPool)) { writer.WritePropertyName("vpnClientAddressPool"u8); @@ -141,7 +149,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } VpnClientConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnClientConnectionHealth.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnClientConnectionHealth.Serialization.cs index 0ed4b6d86122..dc442032a711 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnClientConnectionHealth.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnClientConnectionHealth.Serialization.cs @@ -18,6 +18,15 @@ public partial class VpnClientConnectionHealth : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(VpnClientConnectionHealth)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(TotalIngressBytesTransferred)) { writer.WritePropertyName("totalIngressBytesTransferred"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } VpnClientConnectionHealth IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnClientConnectionHealthDetail.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnClientConnectionHealthDetail.Serialization.cs index ccbdb34fbeeb..d90caf653a08 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnClientConnectionHealthDetail.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnClientConnectionHealthDetail.Serialization.cs @@ -18,6 +18,15 @@ public partial class VpnClientConnectionHealthDetail : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(VpnClientConnectionHealthDetail)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(VpnConnectionId)) { writer.WritePropertyName("vpnConnectionId"u8); @@ -101,7 +109,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } VpnClientConnectionHealthDetail IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnClientConnectionHealthDetailListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnClientConnectionHealthDetailListResult.Serialization.cs index 97f4f56ab015..ca1e29e1a8ae 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnClientConnectionHealthDetailListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnClientConnectionHealthDetailListResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class VpnClientConnectionHealthDetailListResult : IUtf8JsonSerial void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(VpnClientConnectionHealthDetailListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } VpnClientConnectionHealthDetailListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnClientContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnClientContent.Serialization.cs index a1aa932a4a06..6f915efaffa3 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnClientContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnClientContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class VpnClientContent : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(VpnClientContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ProcessorArchitecture)) { writer.WritePropertyName("processorArchitecture"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } VpnClientContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnClientIPsecParameters.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnClientIPsecParameters.Serialization.cs index cc43f4fa7f2f..4b5474ab59dc 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnClientIPsecParameters.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnClientIPsecParameters.Serialization.cs @@ -18,6 +18,15 @@ public partial class VpnClientIPsecParameters : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(VpnClientIPsecParameters)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("saLifeTimeSeconds"u8); writer.WriteNumberValue(SaLifeTimeSeconds); writer.WritePropertyName("saDataSizeKilobytes"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } VpnClientIPsecParameters IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnClientRevokedCertificate.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnClientRevokedCertificate.Serialization.cs index 588da1125de6..1a241d071094 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnClientRevokedCertificate.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnClientRevokedCertificate.Serialization.cs @@ -18,6 +18,15 @@ public partial class VpnClientRevokedCertificate : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,27 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(VpnClientRevokedCertificate)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Thumbprint)) @@ -59,22 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } VpnClientRevokedCertificate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnClientRootCertificate.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnClientRootCertificate.Serialization.cs index 272cd5a67151..ce0863cfbf12 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnClientRootCertificate.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnClientRootCertificate.Serialization.cs @@ -18,6 +18,15 @@ public partial class VpnClientRootCertificate : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,27 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(VpnClientRootCertificate)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); writer.WritePropertyName("publicCertData"u8); @@ -63,22 +57,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } VpnClientRootCertificate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnConnectionPacketCaptureStartContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnConnectionPacketCaptureStartContent.Serialization.cs index defe661d30e9..94db0137a087 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnConnectionPacketCaptureStartContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnConnectionPacketCaptureStartContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class VpnConnectionPacketCaptureStartContent : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(VpnConnectionPacketCaptureStartContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(FilterData)) { writer.WritePropertyName("filterData"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } VpnConnectionPacketCaptureStartContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnConnectionPacketCaptureStopContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnConnectionPacketCaptureStopContent.Serialization.cs index b4243cbba37b..e10def993b4b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnConnectionPacketCaptureStopContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnConnectionPacketCaptureStopContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class VpnConnectionPacketCaptureStopContent : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(VpnConnectionPacketCaptureStopContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(SasUri)) { writer.WritePropertyName("sasUrl"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } VpnConnectionPacketCaptureStopContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnDeviceScriptContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnDeviceScriptContent.Serialization.cs index 4540b0ea00c3..d0d7450f4ff0 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnDeviceScriptContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnDeviceScriptContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class VpnDeviceScriptContent : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(VpnDeviceScriptContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Vendor)) { writer.WritePropertyName("vendor"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } VpnDeviceScriptContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnGatewayIPConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnGatewayIPConfiguration.Serialization.cs index 10ff97091593..e7bfb822089b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnGatewayIPConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnGatewayIPConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class VpnGatewayIPConfiguration : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(VpnGatewayIPConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } VpnGatewayIPConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnGatewayPacketCaptureStartContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnGatewayPacketCaptureStartContent.Serialization.cs index 6f353372b2e7..5a739be5cfe0 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnGatewayPacketCaptureStartContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnGatewayPacketCaptureStartContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class VpnGatewayPacketCaptureStartContent : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(VpnGatewayPacketCaptureStartContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(FilterData)) { writer.WritePropertyName("filterData"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } VpnGatewayPacketCaptureStartContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnGatewayPacketCaptureStopContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnGatewayPacketCaptureStopContent.Serialization.cs index 86dc49beff73..be33de1bf551 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnGatewayPacketCaptureStopContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnGatewayPacketCaptureStopContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class VpnGatewayPacketCaptureStopContent : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(VpnGatewayPacketCaptureStopContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(SasUri)) { writer.WritePropertyName("sasUrl"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } VpnGatewayPacketCaptureStopContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnLinkBgpSettings.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnLinkBgpSettings.Serialization.cs index 3c1344515160..fefe44cf4d1a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnLinkBgpSettings.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnLinkBgpSettings.Serialization.cs @@ -18,6 +18,15 @@ public partial class VpnLinkBgpSettings : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(VpnLinkBgpSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Asn)) { writer.WritePropertyName("asn"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } VpnLinkBgpSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnLinkConnectionSharedKeyProperties.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnLinkConnectionSharedKeyProperties.Serialization.cs index 4ee787cd1af7..b57b802945e6 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnLinkConnectionSharedKeyProperties.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnLinkConnectionSharedKeyProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class VpnLinkConnectionSharedKeyProperties : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(VpnLinkConnectionSharedKeyProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(SharedKey)) { writer.WritePropertyName("sharedKey"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } VpnLinkConnectionSharedKeyProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnLinkProviderProperties.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnLinkProviderProperties.Serialization.cs index 67685add2576..54ce710e4999 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnLinkProviderProperties.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnLinkProviderProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class VpnLinkProviderProperties : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(VpnLinkProviderProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(LinkProviderName)) { writer.WritePropertyName("linkProviderName"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } VpnLinkProviderProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnNatRuleMapping.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnNatRuleMapping.Serialization.cs index 4c40c9787391..bf6b7339f2a1 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnNatRuleMapping.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnNatRuleMapping.Serialization.cs @@ -18,6 +18,15 @@ public partial class VpnNatRuleMapping : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(VpnNatRuleMapping)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(AddressSpace)) { writer.WritePropertyName("addressSpace"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } VpnNatRuleMapping IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnPacketCaptureStartContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnPacketCaptureStartContent.Serialization.cs index 398b755ea5a2..537907179e6f 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnPacketCaptureStartContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnPacketCaptureStartContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class VpnPacketCaptureStartContent : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(VpnPacketCaptureStartContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(FilterData)) { writer.WritePropertyName("filterData"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } VpnPacketCaptureStartContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnPacketCaptureStopContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnPacketCaptureStopContent.Serialization.cs index 0789865c8f1a..586b73e23b97 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnPacketCaptureStopContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnPacketCaptureStopContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class VpnPacketCaptureStopContent : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(VpnPacketCaptureStopContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(SasUri)) { writer.WritePropertyName("sasUrl"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } VpnPacketCaptureStopContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnProfileResponse.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnProfileResponse.Serialization.cs index 2b6330b38b8e..29d1a0766484 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnProfileResponse.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnProfileResponse.Serialization.cs @@ -18,6 +18,15 @@ public partial class VpnProfileResponse : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(VpnProfileResponse)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ProfileUri)) { writer.WritePropertyName("profileUrl"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } VpnProfileResponse IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnServerConfigRadiusClientRootCertificate.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnServerConfigRadiusClientRootCertificate.Serialization.cs index ac85868e4d2e..85b294438433 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnServerConfigRadiusClientRootCertificate.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnServerConfigRadiusClientRootCertificate.Serialization.cs @@ -18,6 +18,15 @@ public partial class VpnServerConfigRadiusClientRootCertificate : IUtf8JsonSeria void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(VpnServerConfigRadiusClientRootCertificate)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } VpnServerConfigRadiusClientRootCertificate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnServerConfigRadiusServerRootCertificate.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnServerConfigRadiusServerRootCertificate.Serialization.cs index 769572fb0a79..378150805122 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnServerConfigRadiusServerRootCertificate.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnServerConfigRadiusServerRootCertificate.Serialization.cs @@ -18,6 +18,15 @@ public partial class VpnServerConfigRadiusServerRootCertificate : IUtf8JsonSeria void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(VpnServerConfigRadiusServerRootCertificate)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } VpnServerConfigRadiusServerRootCertificate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnServerConfigVpnClientRevokedCertificate.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnServerConfigVpnClientRevokedCertificate.Serialization.cs index 33336b7ae3b9..74f812852fd0 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnServerConfigVpnClientRevokedCertificate.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnServerConfigVpnClientRevokedCertificate.Serialization.cs @@ -18,6 +18,15 @@ public partial class VpnServerConfigVpnClientRevokedCertificate : IUtf8JsonSeria void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(VpnServerConfigVpnClientRevokedCertificate)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } VpnServerConfigVpnClientRevokedCertificate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnServerConfigVpnClientRootCertificate.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnServerConfigVpnClientRootCertificate.Serialization.cs index bb6c20cdb275..9fcd9adad49c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnServerConfigVpnClientRootCertificate.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnServerConfigVpnClientRootCertificate.Serialization.cs @@ -18,6 +18,15 @@ public partial class VpnServerConfigVpnClientRootCertificate : IUtf8JsonSerializ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wr throw new FormatException($"The model {nameof(VpnServerConfigVpnClientRootCertificate)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter wr #endif } } - writer.WriteEndObject(); } VpnServerConfigVpnClientRootCertificate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnServerConfigurationPolicyGroupMember.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnServerConfigurationPolicyGroupMember.Serialization.cs index 085dcda75349..5af1da4d9dbc 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnServerConfigurationPolicyGroupMember.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnServerConfigurationPolicyGroupMember.Serialization.cs @@ -18,6 +18,15 @@ public partial class VpnServerConfigurationPolicyGroupMember : IUtf8JsonSerializ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wr throw new FormatException($"The model {nameof(VpnServerConfigurationPolicyGroupMember)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter wr #endif } } - writer.WriteEndObject(); } VpnServerConfigurationPolicyGroupMember IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnServerConfigurationsResponse.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnServerConfigurationsResponse.Serialization.cs index dc131120a078..ab314b43ab2d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnServerConfigurationsResponse.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnServerConfigurationsResponse.Serialization.cs @@ -18,6 +18,15 @@ public partial class VpnServerConfigurationsResponse : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(VpnServerConfigurationsResponse)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(VpnServerConfigurationResourceIds)) { writer.WritePropertyName("vpnServerConfigurationResourceIds"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } VpnServerConfigurationsResponse IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/WebApplicationFirewallCustomRule.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/WebApplicationFirewallCustomRule.Serialization.cs index af6f6116e3b4..edd414d6482b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/WebApplicationFirewallCustomRule.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/WebApplicationFirewallCustomRule.Serialization.cs @@ -18,6 +18,15 @@ public partial class WebApplicationFirewallCustomRule : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(WebApplicationFirewallCustomRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -89,7 +97,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } WebApplicationFirewallCustomRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/WebApplicationFirewallPolicyListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/WebApplicationFirewallPolicyListResult.Serialization.cs index 7a3a5c3747a7..bd3bcd111e3a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/WebApplicationFirewallPolicyListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/WebApplicationFirewallPolicyListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class WebApplicationFirewallPolicyListResult : IUtf8JsonSeriali void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(WebApplicationFirewallPolicyListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } WebApplicationFirewallPolicyListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/WebApplicationFirewallScrubbingRules.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/WebApplicationFirewallScrubbingRules.Serialization.cs index 4a5aebc10722..7c7e919e2e34 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/WebApplicationFirewallScrubbingRules.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/WebApplicationFirewallScrubbingRules.Serialization.cs @@ -18,6 +18,15 @@ public partial class WebApplicationFirewallScrubbingRules : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(WebApplicationFirewallScrubbingRules)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("matchVariable"u8); writer.WriteStringValue(MatchVariable.ToString()); writer.WritePropertyName("selectorMatchOperator"u8); @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } WebApplicationFirewallScrubbingRules IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NatGatewayData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NatGatewayData.Serialization.cs index 1822c312aff3..86f5a8a0bf08 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NatGatewayData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NatGatewayData.Serialization.cs @@ -20,6 +20,15 @@ public partial class NatGatewayData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(NatGatewayData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Sku)) { writer.WritePropertyName("sku"u8); @@ -48,37 +57,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(IdleTimeoutInMinutes)) @@ -127,22 +105,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NatGatewayData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkGroupData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkGroupData.Serialization.cs index a5240cf7496e..275692eba775 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkGroupData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkGroupData.Serialization.cs @@ -20,6 +20,15 @@ public partial class NetworkGroupData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,32 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(NetworkGroupData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Description)) @@ -76,22 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter writer.WriteStringValue(ResourceGuid.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NetworkGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkGroupStaticMemberData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkGroupStaticMemberData.Serialization.cs index d84e94be5d36..eb73e4aa44c1 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkGroupStaticMemberData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkGroupStaticMemberData.Serialization.cs @@ -20,6 +20,15 @@ public partial class NetworkGroupStaticMemberData : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,32 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(NetworkGroupStaticMemberData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(ResourceId)) @@ -71,22 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NetworkGroupStaticMemberData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkInterfaceData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkInterfaceData.Serialization.cs index 189223c5f28d..022e89974521 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkInterfaceData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkInterfaceData.Serialization.cs @@ -20,6 +20,15 @@ public partial class NetworkInterfaceData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(NetworkInterfaceData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(ExtendedLocation)) { writer.WritePropertyName("extendedLocation"u8); @@ -38,37 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(VirtualMachine)) @@ -197,22 +175,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr writer.WriteStringValue(AuxiliarySku.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NetworkInterfaceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkInterfaceIPConfigurationData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkInterfaceIPConfigurationData.Serialization.cs index e05a66113b68..4e9eed91f894 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkInterfaceIPConfigurationData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkInterfaceIPConfigurationData.Serialization.cs @@ -20,6 +20,15 @@ public partial class NetworkInterfaceIPConfigurationData : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(NetworkInterfaceIPConfigurationData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(GatewayLoadBalancer)) @@ -158,22 +152,6 @@ void IJsonModel.Write(Utf8JsonWriter writer writer.WriteObjectValue(PrivateLinkConnectionProperties, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NetworkInterfaceIPConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkInterfaceTapConfigurationData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkInterfaceTapConfigurationData.Serialization.cs index 65c470f19b83..902e5f6f0e9c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkInterfaceTapConfigurationData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkInterfaceTapConfigurationData.Serialization.cs @@ -19,6 +19,15 @@ public partial class NetworkInterfaceTapConfigurationData : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(NetworkInterfaceTapConfigurationData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(VirtualNetworkTap)) @@ -60,22 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter write writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NetworkInterfaceTapConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerConnectionData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerConnectionData.Serialization.cs index 8fcaefcee3a0..359a68a8a0b5 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerConnectionData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerConnectionData.Serialization.cs @@ -20,6 +20,15 @@ public partial class NetworkManagerConnectionData : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,32 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(NetworkManagerConnectionData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(NetworkManagerId)) @@ -71,22 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model writer.WriteStringValue(Description); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NetworkManagerConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerData.Serialization.cs index 21ae35e0d087..9cfd60b9e6e3 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerData.Serialization.cs @@ -20,6 +20,15 @@ public partial class NetworkManagerData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(NetworkManagerData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); @@ -38,37 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("systemData"u8); JsonSerializer.Serialize(writer, SystemData); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Description)) @@ -102,22 +80,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStringValue(ResourceGuid.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NetworkManagerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerRoutingConfigurationData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerRoutingConfigurationData.Serialization.cs index 9a7ce01cef74..f3432813efac 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerRoutingConfigurationData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerRoutingConfigurationData.Serialization.cs @@ -20,6 +20,15 @@ public partial class NetworkManagerRoutingConfigurationData : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,32 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(NetworkManagerRoutingConfigurationData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Description)) @@ -71,22 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter wri writer.WriteStringValue(ResourceGuid.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NetworkManagerRoutingConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerRoutingRuleData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerRoutingRuleData.Serialization.cs index cd780d3ab994..c4ffda3577ca 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerRoutingRuleData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerRoutingRuleData.Serialization.cs @@ -20,6 +20,15 @@ public partial class NetworkManagerRoutingRuleData : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,32 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(NetworkManagerRoutingRuleData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Description)) @@ -81,22 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode writer.WriteObjectValue(NextHop, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NetworkManagerRoutingRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerRoutingRulesData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerRoutingRulesData.Serialization.cs index f109da057377..b7b7e77ddbea 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerRoutingRulesData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerRoutingRulesData.Serialization.cs @@ -20,6 +20,15 @@ public partial class NetworkManagerRoutingRulesData : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,32 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(NetworkManagerRoutingRulesData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Description)) @@ -86,22 +75,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod writer.WriteStringValue(DisableBgpRoutePropagation.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NetworkManagerRoutingRulesData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerSecurityUserConfigurationData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerSecurityUserConfigurationData.Serialization.cs index 633e5c04e5a2..8307c322493f 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerSecurityUserConfigurationData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerSecurityUserConfigurationData.Serialization.cs @@ -20,6 +20,15 @@ public partial class NetworkManagerSecurityUserConfigurationData : IUtf8JsonSeri void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,32 +36,12 @@ void IJsonModel.Write(Utf8JsonWrite throw new FormatException($"The model {nameof(NetworkManagerSecurityUserConfigurationData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Description)) @@ -71,22 +60,6 @@ void IJsonModel.Write(Utf8JsonWrite writer.WriteStringValue(ResourceGuid.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NetworkManagerSecurityUserConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerSecurityUserRuleData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerSecurityUserRuleData.Serialization.cs index ea7bdf8e2ef3..802bd5c0c562 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerSecurityUserRuleData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerSecurityUserRuleData.Serialization.cs @@ -20,6 +20,15 @@ public partial class NetworkManagerSecurityUserRuleData : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,32 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(NetworkManagerSecurityUserRuleData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Description)) @@ -121,22 +110,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteStringValue(ResourceGuid.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NetworkManagerSecurityUserRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerSecurityUserRulesData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerSecurityUserRulesData.Serialization.cs index 8fbddc2a3b08..c0bfb69ff8ca 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerSecurityUserRulesData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerSecurityUserRulesData.Serialization.cs @@ -20,6 +20,15 @@ public partial class NetworkManagerSecurityUserRulesData : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,32 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(NetworkManagerSecurityUserRulesData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Description)) @@ -81,22 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer writer.WriteStringValue(ResourceGuid.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NetworkManagerSecurityUserRulesData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkPrivateEndpointConnectionData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkPrivateEndpointConnectionData.Serialization.cs index a1272cdabf46..f4fa5d95f6d7 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkPrivateEndpointConnectionData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkPrivateEndpointConnectionData.Serialization.cs @@ -19,6 +19,15 @@ public partial class NetworkPrivateEndpointConnectionData : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(NetworkPrivateEndpointConnectionData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(PrivateEndpoint)) @@ -75,22 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter write writer.WriteStringValue(PrivateEndpointLocation); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NetworkPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkProfileData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkProfileData.Serialization.cs index dea5cc26035c..6d236f857d8e 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkProfileData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkProfileData.Serialization.cs @@ -19,6 +19,15 @@ public partial class NetworkProfileData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,43 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(NetworkProfileData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(ContainerNetworkInterfaces)) @@ -96,22 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NetworkProfileData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityGroupData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityGroupData.Serialization.cs index ec5dba448218..e5028cc90970 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityGroupData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityGroupData.Serialization.cs @@ -19,6 +19,15 @@ public partial class NetworkSecurityGroupData : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,43 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(NetworkSecurityGroupData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(FlushConnection)) @@ -131,22 +109,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NetworkSecurityGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVirtualApplianceConnectionData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVirtualApplianceConnectionData.Serialization.cs index 392c5a6a44d6..4c09f847f55e 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVirtualApplianceConnectionData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVirtualApplianceConnectionData.Serialization.cs @@ -19,6 +19,15 @@ public partial class NetworkVirtualApplianceConnectionData : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,22 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(NetworkVirtualApplianceConnectionData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(NamePropertiesName)) @@ -85,22 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writ writer.WriteObjectValue(ConnectionRoutingConfiguration, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NetworkVirtualApplianceConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVirtualApplianceData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVirtualApplianceData.Serialization.cs index 46470caba1fc..79a35b77d5a4 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVirtualApplianceData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVirtualApplianceData.Serialization.cs @@ -21,6 +21,15 @@ public partial class NetworkVirtualApplianceData : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,7 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(NetworkVirtualApplianceData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); @@ -39,37 +48,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(NvaSku)) @@ -208,22 +186,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR writer.WriteObjectValue(PartnerManagedResource, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NetworkVirtualApplianceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVirtualApplianceSkuData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVirtualApplianceSkuData.Serialization.cs index 690a6401e6cf..963f6826e12c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVirtualApplianceSkuData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVirtualApplianceSkuData.Serialization.cs @@ -19,6 +19,15 @@ public partial class NetworkVirtualApplianceSkuData : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,43 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(NetworkVirtualApplianceSkuData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Vendor)) @@ -91,22 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NetworkVirtualApplianceSkuData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkWatcherData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkWatcherData.Serialization.cs index d50bd09a7ecb..ef9d73734db9 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkWatcherData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkWatcherData.Serialization.cs @@ -19,6 +19,15 @@ public partial class NetworkWatcherData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,43 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(NetworkWatcherData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) @@ -71,22 +49,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NetworkWatcherData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/OutboundRuleData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/OutboundRuleData.Serialization.cs index 38e20ace9c67..790395c585c5 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/OutboundRuleData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/OutboundRuleData.Serialization.cs @@ -20,6 +20,15 @@ public partial class OutboundRuleData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(OutboundRuleData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(AllocatedOutboundPorts)) @@ -91,22 +85,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter writer.WriteNumberValue(IdleTimeoutInMinutes.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } OutboundRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/P2SVpnGatewayData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/P2SVpnGatewayData.Serialization.cs index ca3a4f95cef3..d50600ce5c3c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/P2SVpnGatewayData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/P2SVpnGatewayData.Serialization.cs @@ -20,6 +20,15 @@ public partial class P2SVpnGatewayData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,43 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(P2SVpnGatewayData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(VirtualHub)) @@ -117,22 +95,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite writer.WriteBooleanValue(IsRoutingPreferenceInternet.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } P2SVpnGatewayData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/PacketCaptureData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/PacketCaptureData.Serialization.cs index d39d0ec4df30..b5512cdda5fa 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/PacketCaptureData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/PacketCaptureData.Serialization.cs @@ -20,6 +20,15 @@ public partial class PacketCaptureData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,32 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(PacketCaptureData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Target)) @@ -116,22 +105,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } PacketCaptureData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/PeerExpressRouteCircuitConnectionData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/PeerExpressRouteCircuitConnectionData.Serialization.cs index 270b2a17da84..0abce04fea39 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/PeerExpressRouteCircuitConnectionData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/PeerExpressRouteCircuitConnectionData.Serialization.cs @@ -20,6 +20,15 @@ public partial class PeerExpressRouteCircuitConnectionData : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(PeerExpressRouteCircuitConnectionData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(ExpressRouteCircuitPeering)) @@ -86,22 +80,6 @@ void IJsonModel.Write(Utf8JsonWriter writ writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } PeerExpressRouteCircuitConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/PolicySignaturesOverridesForIdpsData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/PolicySignaturesOverridesForIdpsData.Serialization.cs index fa630c54ee84..47b719b8fb7f 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/PolicySignaturesOverridesForIdpsData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/PolicySignaturesOverridesForIdpsData.Serialization.cs @@ -19,6 +19,15 @@ public partial class PolicySignaturesOverridesForIdpsData : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(PolicySignaturesOverridesForIdpsData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -62,7 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } PolicySignaturesOverridesForIdpsData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/PrivateDnsZoneGroupData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/PrivateDnsZoneGroupData.Serialization.cs index cbaa1595e9f5..2286d8a0cf1c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/PrivateDnsZoneGroupData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/PrivateDnsZoneGroupData.Serialization.cs @@ -19,6 +19,15 @@ public partial class PrivateDnsZoneGroupData : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(PrivateDnsZoneGroupData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) @@ -65,22 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } PrivateDnsZoneGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/PrivateEndpointData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/PrivateEndpointData.Serialization.cs index 948bb2d4c0bc..3423eb731c47 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/PrivateEndpointData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/PrivateEndpointData.Serialization.cs @@ -20,6 +20,15 @@ public partial class PrivateEndpointData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(PrivateEndpointData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(ExtendedLocation)) { writer.WritePropertyName("extendedLocation"u8); @@ -38,37 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Subnet)) @@ -147,22 +125,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri writer.WriteStringValue(CustomNetworkInterfaceName); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } PrivateEndpointData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/PrivateLinkServiceData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/PrivateLinkServiceData.Serialization.cs index a65c808f072f..e0a8e8e9b891 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/PrivateLinkServiceData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/PrivateLinkServiceData.Serialization.cs @@ -20,6 +20,15 @@ public partial class PrivateLinkServiceData : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(PrivateLinkServiceData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(ExtendedLocation)) { writer.WritePropertyName("extendedLocation"u8); @@ -38,37 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsCollectionDefined(LoadBalancerFrontendIPConfigurations)) @@ -152,22 +130,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader writer.WriteBooleanValue(EnableProxyProtocol.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } PrivateLinkServiceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ProbeData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ProbeData.Serialization.cs index d10dd922e656..1dc3b7d0f547 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ProbeData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ProbeData.Serialization.cs @@ -20,6 +20,15 @@ public partial class ProbeData : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions throw new FormatException($"The model {nameof(ProbeData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(LoadBalancingRules)) @@ -101,22 +95,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ProbeData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/PublicIPAddressData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/PublicIPAddressData.Serialization.cs index eed5aac4394b..9d871f5d044d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/PublicIPAddressData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/PublicIPAddressData.Serialization.cs @@ -20,6 +20,15 @@ public partial class PublicIPAddressData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(PublicIPAddressData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(ExtendedLocation)) { writer.WritePropertyName("extendedLocation"u8); @@ -53,37 +62,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri } writer.WriteEndArray(); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(PublicIPAllocationMethod)) @@ -172,22 +150,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri writer.WriteStringValue(DeleteOption.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } PublicIPAddressData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/PublicIPPrefixData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/PublicIPPrefixData.Serialization.cs index a04ba6e935d7..9dfaf2feafaa 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/PublicIPPrefixData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/PublicIPPrefixData.Serialization.cs @@ -20,6 +20,15 @@ public partial class PublicIPPrefixData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(PublicIPPrefixData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(ExtendedLocation)) { writer.WritePropertyName("extendedLocation"u8); @@ -53,37 +62,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(PublicIPAddressVersion)) @@ -147,22 +125,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit writer.WriteObjectValue(NatGateway, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } PublicIPPrefixData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteData.Serialization.cs index c124592ec08a..b0d185511623 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteData.Serialization.cs @@ -19,6 +19,15 @@ public partial class RouteData : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions throw new FormatException($"The model {nameof(RouteData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(AddressPrefix)) @@ -75,22 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions writer.WriteBooleanValue(HasBgpOverride.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } RouteData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteFilterData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteFilterData.Serialization.cs index 3fdd50986de7..17dd2d2adc60 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteFilterData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteFilterData.Serialization.cs @@ -19,6 +19,15 @@ public partial class RouteFilterData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,43 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(RouteFilterData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsCollectionDefined(Rules)) @@ -101,22 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } RouteFilterData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteFilterRuleData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteFilterRuleData.Serialization.cs index e1515d7af917..98fbe42c6414 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteFilterRuleData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteFilterRuleData.Serialization.cs @@ -19,6 +19,15 @@ public partial class RouteFilterRuleData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(RouteFilterRuleData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Location)) { writer.WritePropertyName("location"u8); @@ -37,21 +46,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Access)) @@ -80,22 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } RouteFilterRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteMapData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteMapData.Serialization.cs index 5c9b9fa34400..85423e265fb7 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteMapData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteMapData.Serialization.cs @@ -20,6 +20,15 @@ public partial class RouteMapData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,32 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(RouteMapData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsCollectionDefined(AssociatedInboundConnections)) @@ -91,22 +80,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } RouteMapData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteTableData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteTableData.Serialization.cs index 23afb1c117f4..8388ffeca41a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteTableData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteTableData.Serialization.cs @@ -19,6 +19,15 @@ public partial class RouteTableData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,43 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(RouteTableData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsCollectionDefined(Routes)) @@ -101,22 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp writer.WriteStringValue(ResourceGuid.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } RouteTableData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RoutingIntentData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RoutingIntentData.Serialization.cs index 2a55808640a0..a851e51f9f20 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RoutingIntentData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RoutingIntentData.Serialization.cs @@ -19,6 +19,15 @@ public partial class RoutingIntentData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(RoutingIntentData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsCollectionDefined(RoutingPolicies)) @@ -65,22 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } RoutingIntentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ScopeConnectionData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ScopeConnectionData.Serialization.cs index 7de7bd526a07..687c351197b8 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ScopeConnectionData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ScopeConnectionData.Serialization.cs @@ -20,6 +20,15 @@ public partial class ScopeConnectionData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,32 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ScopeConnectionData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(TenantId)) @@ -76,22 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri writer.WriteStringValue(Description); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ScopeConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/SecurityAdminConfigurationData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/SecurityAdminConfigurationData.Serialization.cs index 76ce0f234376..1d20e54f00b9 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/SecurityAdminConfigurationData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/SecurityAdminConfigurationData.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityAdminConfigurationData : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,32 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(SecurityAdminConfigurationData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Description)) @@ -81,22 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod writer.WriteStringValue(ResourceGuid.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityAdminConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/SecurityPartnerProviderData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/SecurityPartnerProviderData.Serialization.cs index 5c538e7d0eab..a8c6165f507a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/SecurityPartnerProviderData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/SecurityPartnerProviderData.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityPartnerProviderData : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,43 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(SecurityPartnerProviderData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) @@ -87,22 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR JsonSerializer.Serialize(writer, VirtualHub); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityPartnerProviderData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/SecurityRuleData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/SecurityRuleData.Serialization.cs index 3d61d6aca818..c04f40aaad71 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/SecurityRuleData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/SecurityRuleData.Serialization.cs @@ -19,6 +19,15 @@ public partial class SecurityRuleData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(SecurityRuleData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Description)) @@ -160,22 +154,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ServiceEndpointPolicyData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ServiceEndpointPolicyData.Serialization.cs index 8b45e72ae775..92117191a21d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ServiceEndpointPolicyData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ServiceEndpointPolicyData.Serialization.cs @@ -19,6 +19,15 @@ public partial class ServiceEndpointPolicyData : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(ServiceEndpointPolicyData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); @@ -37,37 +46,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea writer.WritePropertyName("kind"u8); writer.WriteStringValue(Kind); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsCollectionDefined(ServiceEndpointPolicyDefinitions)) @@ -116,22 +94,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ServiceEndpointPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ServiceEndpointPolicyDefinitionData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ServiceEndpointPolicyDefinitionData.Serialization.cs index d3c15e86a98f..3d82907aaae0 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ServiceEndpointPolicyDefinitionData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ServiceEndpointPolicyDefinitionData.Serialization.cs @@ -19,6 +19,15 @@ public partial class ServiceEndpointPolicyDefinitionData : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(ServiceEndpointPolicyDefinitionData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Description)) @@ -80,22 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ServiceEndpointPolicyDefinitionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/SubnetData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/SubnetData.Serialization.cs index 5d01f44aca66..a3bd19f92bb0 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/SubnetData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/SubnetData.Serialization.cs @@ -20,6 +20,15 @@ public partial class SubnetData : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOption throw new FormatException($"The model {nameof(SubnetData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(AddressPrefix)) @@ -211,22 +205,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOption writer.WriteBooleanValue(DefaultOutboundAccess.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SubnetData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualApplianceSiteData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualApplianceSiteData.Serialization.cs index ebb91f32c74a..cb6e3746e982 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualApplianceSiteData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualApplianceSiteData.Serialization.cs @@ -19,6 +19,15 @@ public partial class VirtualApplianceSiteData : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(VirtualApplianceSiteData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(AddressPrefix)) @@ -65,22 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } VirtualApplianceSiteData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualHubData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualHubData.Serialization.cs index 5b2e40fa99c4..96f5624d99f4 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualHubData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualHubData.Serialization.cs @@ -20,6 +20,15 @@ public partial class VirtualHubData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(VirtualHubData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); @@ -38,37 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp writer.WritePropertyName("kind"u8); writer.WriteStringValue(Kind); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(VirtualWan)) @@ -207,22 +185,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp writer.WriteObjectValue(VirtualRouterAutoScaleConfiguration, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } VirtualHubData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualHubRouteTableV2Data.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualHubRouteTableV2Data.Serialization.cs index 3bf22572872c..14d7e2284832 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualHubRouteTableV2Data.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualHubRouteTableV2Data.Serialization.cs @@ -19,6 +19,15 @@ public partial class VirtualHubRouteTableV2Data : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(VirtualHubRouteTableV2Data)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsCollectionDefined(Routes)) @@ -75,22 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } VirtualHubRouteTableV2Data IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkData.Serialization.cs index 25c57d273ebf..ec775c2bb30d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkData.Serialization.cs @@ -20,6 +20,15 @@ public partial class VirtualNetworkData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(VirtualNetworkData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(ExtendedLocation)) { writer.WritePropertyName("extendedLocation"u8); @@ -38,37 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(AddressSpace)) @@ -167,22 +145,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStringValue(PrivateEndpointVnetPolicy.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } VirtualNetworkData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkGatewayConnectionData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkGatewayConnectionData.Serialization.cs index abbd2e41b93a..7e16dc396d09 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkGatewayConnectionData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkGatewayConnectionData.Serialization.cs @@ -20,6 +20,15 @@ public partial class VirtualNetworkGatewayConnectionData : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,43 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(VirtualNetworkGatewayConnectionData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(AuthorizationKey)) @@ -226,22 +204,6 @@ void IJsonModel.Write(Utf8JsonWriter writer writer.WriteBooleanValue(EnablePrivateLinkFastPath.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } VirtualNetworkGatewayConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkGatewayData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkGatewayData.Serialization.cs index d28f9228d438..fa3106eab724 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkGatewayData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkGatewayData.Serialization.cs @@ -21,6 +21,15 @@ public partial class VirtualNetworkGatewayData : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,7 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(VirtualNetworkGatewayData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(ExtendedLocation)) { writer.WritePropertyName("extendedLocation"u8); @@ -44,37 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea writer.WritePropertyName("identity"u8); JsonSerializer.Serialize(writer, Identity); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(AutoScaleConfiguration)) @@ -223,22 +201,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea writer.WriteStringValue(ResiliencyModel.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } VirtualNetworkGatewayData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkGatewayNatRuleData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkGatewayNatRuleData.Serialization.cs index 6804e928a51f..94aecf2eb4ca 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkGatewayNatRuleData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkGatewayNatRuleData.Serialization.cs @@ -19,6 +19,15 @@ public partial class VirtualNetworkGatewayNatRuleData : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(VirtualNetworkGatewayNatRuleData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) @@ -90,22 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M writer.WriteStringValue(IPConfigurationId); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } VirtualNetworkGatewayNatRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkPeeringData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkPeeringData.Serialization.cs index 35a5f4decffc..1b739441c3a3 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkPeeringData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkPeeringData.Serialization.cs @@ -20,6 +20,15 @@ public partial class VirtualNetworkPeeringData : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(VirtualNetworkPeeringData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(AllowVirtualNetworkAccess)) @@ -161,22 +155,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } VirtualNetworkPeeringData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkTapData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkTapData.Serialization.cs index 103f3db2f4ed..11e3a1fcf16a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkTapData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkTapData.Serialization.cs @@ -19,6 +19,15 @@ public partial class VirtualNetworkTapData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,43 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(VirtualNetworkTapData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(NetworkInterfaceTapConfigurations)) @@ -101,22 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW writer.WriteNumberValue(DestinationPort.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } VirtualNetworkTapData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualRouterData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualRouterData.Serialization.cs index 9dd4a2fb7d65..4654ff2fcd16 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualRouterData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualRouterData.Serialization.cs @@ -20,6 +20,15 @@ public partial class VirtualRouterData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,43 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(VirtualRouterData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(VirtualRouterAsn)) @@ -107,22 +85,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } VirtualRouterData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualRouterPeeringData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualRouterPeeringData.Serialization.cs index 8d7ccdcec9bb..050338a3a4a6 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualRouterPeeringData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualRouterPeeringData.Serialization.cs @@ -19,6 +19,15 @@ public partial class VirtualRouterPeeringData : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(VirtualRouterPeeringData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(PeerAsn)) @@ -65,22 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } VirtualRouterPeeringData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualWanData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualWanData.Serialization.cs index 216becb6e76c..fffb7954aa0e 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualWanData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualWanData.Serialization.cs @@ -20,6 +20,15 @@ public partial class VirtualWanData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,43 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(VirtualWanData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(DisableVpnEncryption)) @@ -117,22 +95,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp writer.WriteStringValue(VirtualWanType); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } VirtualWanData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnConnectionData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnConnectionData.Serialization.cs index 275aaeda388c..136cee08c455 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnConnectionData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnConnectionData.Serialization.cs @@ -20,6 +20,15 @@ public partial class VpnConnectionData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(VpnConnectionData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(RemoteVpnSite)) @@ -161,22 +155,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite writer.WriteObjectValue(RoutingConfiguration, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } VpnConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnGatewayData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnGatewayData.Serialization.cs index a5e68f854c0a..86a9efacf292 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnGatewayData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnGatewayData.Serialization.cs @@ -20,6 +20,15 @@ public partial class VpnGatewayData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,43 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(VpnGatewayData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(VirtualHub)) @@ -127,22 +105,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } VpnGatewayData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnGatewayNatRuleData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnGatewayNatRuleData.Serialization.cs index 7a9365c19093..6a46260d2554 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnGatewayNatRuleData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnGatewayNatRuleData.Serialization.cs @@ -20,6 +20,15 @@ public partial class VpnGatewayNatRuleData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(VpnGatewayNatRuleData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) @@ -111,22 +105,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } VpnGatewayNatRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnLinkConnectionSharedKeyData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnLinkConnectionSharedKeyData.Serialization.cs index 696e3319f879..ea8f1f294e72 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnLinkConnectionSharedKeyData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnLinkConnectionSharedKeyData.Serialization.cs @@ -19,6 +19,15 @@ public partial class VpnLinkConnectionSharedKeyData : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,43 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(VpnLinkConnectionSharedKeyData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); writer.WriteObjectValue(Properties, options); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } VpnLinkConnectionSharedKeyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnServerConfigurationData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnServerConfigurationData.Serialization.cs index cef872aeb4e0..956a40671d65 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnServerConfigurationData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnServerConfigurationData.Serialization.cs @@ -19,6 +19,15 @@ public partial class VpnServerConfigurationData : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,43 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(VpnServerConfigurationData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsCollectionDefined(VpnProtocols)) @@ -186,22 +164,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } VpnServerConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnServerConfigurationPolicyGroupData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnServerConfigurationPolicyGroupData.Serialization.cs index 641a7021d238..518dd79c25dc 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnServerConfigurationPolicyGroupData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnServerConfigurationPolicyGroupData.Serialization.cs @@ -20,6 +20,15 @@ public partial class VpnServerConfigurationPolicyGroupData : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(VpnServerConfigurationPolicyGroupData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(IsDefault)) @@ -86,22 +80,6 @@ void IJsonModel.Write(Utf8JsonWriter writ writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } VpnServerConfigurationPolicyGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnSiteData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnSiteData.Serialization.cs index e93714118a39..bcb585a4aed7 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnSiteData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnSiteData.Serialization.cs @@ -20,6 +20,15 @@ public partial class VpnSiteData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,43 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio throw new FormatException($"The model {nameof(VpnSiteData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(VirtualWan)) @@ -122,22 +100,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio writer.WriteObjectValue(O365Policy, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } VpnSiteData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnSiteLinkConnectionData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnSiteLinkConnectionData.Serialization.cs index dd0433d71f72..d312e65a8a71 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnSiteLinkConnectionData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnSiteLinkConnectionData.Serialization.cs @@ -20,6 +20,15 @@ public partial class VpnSiteLinkConnectionData : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(VpnSiteLinkConnectionData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(VpnSiteLink)) @@ -166,22 +160,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea writer.WriteNumberValue(DpdTimeoutSeconds.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } VpnSiteLinkConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnSiteLinkData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnSiteLinkData.Serialization.cs index 069116646d80..90809fd47c05 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnSiteLinkData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnSiteLinkData.Serialization.cs @@ -19,6 +19,15 @@ public partial class VpnSiteLinkData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(VpnSiteLinkData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(LinkProperties)) @@ -75,22 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } VpnSiteLinkData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/WebApplicationFirewallPolicyData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/WebApplicationFirewallPolicyData.Serialization.cs index c0969dda516b..0d2a62a052aa 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/WebApplicationFirewallPolicyData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/WebApplicationFirewallPolicyData.Serialization.cs @@ -20,6 +20,15 @@ public partial class WebApplicationFirewallPolicyData : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,43 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(WebApplicationFirewallPolicyData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(PolicySettings)) @@ -137,22 +115,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } WebApplicationFirewallPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/autorest.md b/sdk/network/Azure.ResourceManager.Network/src/autorest.md index a5064459d5ce..5c675bc9a304 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/autorest.md +++ b/sdk/network/Azure.ResourceManager.Network/src/autorest.md @@ -28,6 +28,7 @@ skip-csproj: true modelerfour: flatten-payloads: false use-model-reader-writer: true +use-write-core: true model-namespace: true public-clients: false head-as-boolean: false diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/CHANGELOG.md b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/CHANGELOG.md index 3653304633b1..ce3f1a661413 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/CHANGELOG.md +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/CHANGELOG.md @@ -5,6 +5,7 @@ ### Features Added - Enable the new model serialization by using the System.ClientModel, refer this [document](https://aka.ms/azsdk/net/mrw) for more details. +- Exposed `JsonModelWriteCore` for model serialization procedure. ### Breaking Changes diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/api/Azure.ResourceManager.NetworkCloud.netstandard2.0.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/api/Azure.ResourceManager.NetworkCloud.netstandard2.0.cs index 529bbcc6f57c..8dfb4ac2f73f 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/api/Azure.ResourceManager.NetworkCloud.netstandard2.0.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/api/Azure.ResourceManager.NetworkCloud.netstandard2.0.cs @@ -35,6 +35,7 @@ public NetworkCloudAgentPoolData(Azure.Core.AzureLocation location, long count, public System.Collections.Generic.IList Taints { get { throw null; } } public string UpgradeMaxSurge { get { throw null; } set { } } public string VmSkuName { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NetworkCloud.NetworkCloudAgentPoolData 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.NetworkCloud.NetworkCloudAgentPoolData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -113,6 +114,7 @@ public NetworkCloudBareMetalMachineData(Azure.Core.AzureLocation location, Azure public string SerialNumber { get { throw null; } set { } } public string ServiceTag { get { throw null; } } public System.Collections.Generic.IReadOnlyList VirtualMachinesAssociatedIds { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NetworkCloud.NetworkCloudBareMetalMachineData 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.NetworkCloud.NetworkCloudBareMetalMachineData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -151,6 +153,7 @@ public NetworkCloudBareMetalMachineKeySetData(Azure.Core.AzureLocation location, public Azure.ResourceManager.NetworkCloud.Models.BareMetalMachineKeySetProvisioningState? ProvisioningState { get { throw null; } } public System.Collections.Generic.IList UserList { get { throw null; } } public System.Collections.Generic.IReadOnlyList UserListStatus { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NetworkCloud.NetworkCloudBareMetalMachineKeySetData 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.NetworkCloud.NetworkCloudBareMetalMachineKeySetData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -255,6 +258,7 @@ public NetworkCloudBmcKeySetData(Azure.Core.AzureLocation location, Azure.Resour public Azure.ResourceManager.NetworkCloud.Models.BmcKeySetProvisioningState? ProvisioningState { get { throw null; } } public System.Collections.Generic.IList UserList { get { throw null; } } public System.Collections.Generic.IReadOnlyList UserListStatus { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NetworkCloud.NetworkCloudBmcKeySetData 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.NetworkCloud.NetworkCloudBmcKeySetData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -318,6 +322,7 @@ public NetworkCloudCloudServicesNetworkData(Azure.Core.AzureLocation location, A public string InterfaceName { get { throw null; } } public Azure.ResourceManager.NetworkCloud.Models.CloudServicesNetworkProvisioningState? ProvisioningState { get { throw null; } } public System.Collections.Generic.IReadOnlyList VirtualMachinesAssociatedIds { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NetworkCloud.NetworkCloudCloudServicesNetworkData 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.NetworkCloud.NetworkCloudCloudServicesNetworkData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -393,6 +398,7 @@ public NetworkCloudClusterData(Azure.Core.AzureLocation location, Azure.Resource public Azure.ResourceManager.NetworkCloud.Models.ClusterProvisioningState? ProvisioningState { get { throw null; } } public System.DateTimeOffset? SupportExpireOn { get { throw null; } } public System.Collections.Generic.IReadOnlyList WorkloadResourceIds { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NetworkCloud.NetworkCloudClusterData 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.NetworkCloud.NetworkCloudClusterData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -429,6 +435,7 @@ public NetworkCloudClusterManagerData(Azure.Core.AzureLocation location, Azure.C public Azure.ResourceManager.NetworkCloud.Models.ExtendedLocation ManagerExtendedLocation { get { throw null; } } public Azure.ResourceManager.NetworkCloud.Models.ClusterManagerProvisioningState? ProvisioningState { get { throw null; } } public string VmSize { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NetworkCloud.NetworkCloudClusterManagerData 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.NetworkCloud.NetworkCloudClusterManagerData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -487,6 +494,7 @@ public NetworkCloudClusterMetricsConfigurationData(Azure.Core.AzureLocation loca public System.Collections.Generic.IList EnabledMetrics { get { throw null; } } public Azure.ResourceManager.NetworkCloud.Models.ExtendedLocation ExtendedLocation { get { throw null; } set { } } public Azure.ResourceManager.NetworkCloud.Models.ClusterMetricsConfigurationProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NetworkCloud.NetworkCloudClusterMetricsConfigurationData 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.NetworkCloud.NetworkCloudClusterMetricsConfigurationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -678,6 +686,7 @@ public NetworkCloudKubernetesClusterData(Azure.Core.AzureLocation location, Azur public Azure.ResourceManager.NetworkCloud.Models.KubernetesClusterNetworkConfiguration NetworkConfiguration { get { throw null; } set { } } public System.Collections.Generic.IReadOnlyList Nodes { get { throw null; } } public Azure.ResourceManager.NetworkCloud.Models.KubernetesClusterProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NetworkCloud.NetworkCloudKubernetesClusterData 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.NetworkCloud.NetworkCloudKubernetesClusterData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -745,6 +754,7 @@ public NetworkCloudL2NetworkData(Azure.Core.AzureLocation location, Azure.Resour public Azure.Core.ResourceIdentifier L2IsolationDomainId { get { throw null; } set { } } public Azure.ResourceManager.NetworkCloud.Models.L2NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.Collections.Generic.IReadOnlyList VirtualMachinesAssociatedIds { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NetworkCloud.NetworkCloudL2NetworkData 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.NetworkCloud.NetworkCloudL2NetworkData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -812,6 +822,7 @@ public NetworkCloudL3NetworkData(Azure.Core.AzureLocation location, Azure.Resour public Azure.ResourceManager.NetworkCloud.Models.L3NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.Collections.Generic.IReadOnlyList VirtualMachinesAssociatedIds { get { throw null; } } public long Vlan { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NetworkCloud.NetworkCloudL3NetworkData 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.NetworkCloud.NetworkCloudL3NetworkData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -870,6 +881,7 @@ public NetworkCloudRackData(Azure.Core.AzureLocation location, Azure.ResourceMan public string RackLocation { get { throw null; } set { } } public string RackSerialNumber { get { throw null; } set { } } public Azure.Core.ResourceIdentifier RackSkuId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NetworkCloud.NetworkCloudRackData 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.NetworkCloud.NetworkCloudRackData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -925,6 +937,7 @@ public NetworkCloudRackSkuData() { } public Azure.ResourceManager.NetworkCloud.Models.RackSkuType? RackType { get { throw null; } } public System.Collections.Generic.IReadOnlyList StorageAppliances { get { throw null; } } public System.Collections.Generic.IReadOnlyList SupportedRackSkuIds { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NetworkCloud.NetworkCloudRackSkuData 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.NetworkCloud.NetworkCloudRackSkuData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -979,6 +992,7 @@ public NetworkCloudStorageApplianceData(Azure.Core.AzureLocation location, Azure public Azure.ResourceManager.NetworkCloud.Models.RemoteVendorManagementStatus? RemoteVendorManagementStatus { get { throw null; } } public string SerialNumber { get { throw null; } set { } } public string StorageApplianceSkuId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NetworkCloud.NetworkCloudStorageApplianceData 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.NetworkCloud.NetworkCloudStorageApplianceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1044,6 +1058,7 @@ public NetworkCloudTrunkedNetworkData(Azure.Core.AzureLocation location, Azure.R public Azure.ResourceManager.NetworkCloud.Models.TrunkedNetworkProvisioningState? ProvisioningState { get { throw null; } } public System.Collections.Generic.IReadOnlyList VirtualMachinesAssociatedIds { get { throw null; } } public System.Collections.Generic.IList Vlans { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NetworkCloud.NetworkCloudTrunkedNetworkData 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.NetworkCloud.NetworkCloudTrunkedNetworkData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1121,6 +1136,7 @@ public NetworkCloudVirtualMachineConsoleData(Azure.Core.AzureLocation location, public Azure.Core.ResourceIdentifier PrivateLinkServiceId { get { throw null; } } public Azure.ResourceManager.NetworkCloud.Models.ConsoleProvisioningState? ProvisioningState { get { throw null; } } public System.Guid? VirtualMachineAccessId { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NetworkCloud.NetworkCloudVirtualMachineConsoleData 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.NetworkCloud.NetworkCloudVirtualMachineConsoleData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1180,6 +1196,7 @@ public NetworkCloudVirtualMachineData(Azure.Core.AzureLocation location, Azure.R public string VmImage { get { throw null; } set { } } public Azure.ResourceManager.NetworkCloud.Models.ImageRepositoryCredentials VmImageRepositoryCredentials { get { throw null; } set { } } public System.Collections.Generic.IReadOnlyList Volumes { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NetworkCloud.NetworkCloudVirtualMachineData 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.NetworkCloud.NetworkCloudVirtualMachineData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1249,6 +1266,7 @@ public NetworkCloudVolumeData(Azure.Core.AzureLocation location, Azure.ResourceM public Azure.ResourceManager.NetworkCloud.Models.VolumeProvisioningState? ProvisioningState { get { throw null; } } public string SerialNumber { get { throw null; } } public long SizeInMiB { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NetworkCloud.NetworkCloudVolumeData 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.NetworkCloud.NetworkCloudVolumeData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1384,6 +1402,7 @@ public partial class AdministrativeCredentials : System.ClientModel.Primitives.I public AdministrativeCredentials(string username) { } public string Password { get { throw null; } set { } } public string Username { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NetworkCloud.Models.AdministrativeCredentials 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.NetworkCloud.Models.AdministrativeCredentials System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1395,6 +1414,7 @@ public partial class AdministratorConfiguration : System.ClientModel.Primitives. public AdministratorConfiguration() { } public string AdminUsername { get { throw null; } set { } } public System.Collections.Generic.IList SshPublicKeys { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NetworkCloud.Models.AdministratorConfiguration 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.NetworkCloud.Models.AdministratorConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1509,6 +1529,7 @@ public AttachedNetworkConfiguration() { } public System.Collections.Generic.IList L2Networks { get { throw null; } } public System.Collections.Generic.IList L3Networks { get { throw null; } } public System.Collections.Generic.IList TrunkedNetworks { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NetworkCloud.Models.AttachedNetworkConfiguration 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.NetworkCloud.Models.AttachedNetworkConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1538,6 +1559,7 @@ public partial class AvailableUpgrade : System.ClientModel.Primitives.IJsonModel internal AvailableUpgrade() { } public Azure.ResourceManager.NetworkCloud.Models.AvailabilityLifecycle? AvailabilityLifecycle { get { throw null; } } public string Version { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NetworkCloud.Models.AvailableUpgrade 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.NetworkCloud.Models.AvailableUpgrade System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1549,6 +1571,7 @@ public partial class BareMetalMachineCommandSpecification : System.ClientModel.P public BareMetalMachineCommandSpecification(string command) { } public System.Collections.Generic.IList Arguments { get { throw null; } } public string Command { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NetworkCloud.Models.BareMetalMachineCommandSpecification 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.NetworkCloud.Models.BareMetalMachineCommandSpecification System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1566,6 +1589,7 @@ public BareMetalMachineConfiguration(Azure.ResourceManager.NetworkCloud.Models.A public string MachineName { get { throw null; } set { } } public long RackSlot { get { throw null; } set { } } public string SerialNumber { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NetworkCloud.Models.BareMetalMachineConfiguration 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.NetworkCloud.Models.BareMetalMachineConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1576,6 +1600,7 @@ public partial class BareMetalMachineCordonContent : System.ClientModel.Primitiv { public BareMetalMachineCordonContent() { } public Azure.ResourceManager.NetworkCloud.Models.BareMetalMachineEvacuate? Evacuate { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NetworkCloud.Models.BareMetalMachineCordonContent 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.NetworkCloud.Models.BareMetalMachineCordonContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1739,6 +1764,7 @@ public partial class BareMetalMachinePowerOffContent : System.ClientModel.Primit { public BareMetalMachinePowerOffContent() { } public Azure.ResourceManager.NetworkCloud.Models.BareMetalMachineSkipShutdown? SkipShutdown { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NetworkCloud.Models.BareMetalMachinePowerOffContent 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.NetworkCloud.Models.BareMetalMachinePowerOffContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1810,6 +1836,7 @@ public BareMetalMachineReplaceContent() { } public string BootMacAddress { get { throw null; } set { } } public string MachineName { get { throw null; } set { } } public string SerialNumber { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NetworkCloud.Models.BareMetalMachineReplaceContent 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.NetworkCloud.Models.BareMetalMachineReplaceContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1822,6 +1849,7 @@ public BareMetalMachineRunCommandContent(long limitTimeSeconds, string script) { public System.Collections.Generic.IList Arguments { get { throw null; } } public long LimitTimeSeconds { get { throw null; } } public string Script { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NetworkCloud.Models.BareMetalMachineRunCommandContent 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.NetworkCloud.Models.BareMetalMachineRunCommandContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1833,6 +1861,7 @@ public partial class BareMetalMachineRunDataExtractsContent : System.ClientModel public BareMetalMachineRunDataExtractsContent(System.Collections.Generic.IEnumerable commands, long limitTimeSeconds) { } public System.Collections.Generic.IList Commands { get { throw null; } } public long LimitTimeSeconds { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NetworkCloud.Models.BareMetalMachineRunDataExtractsContent 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.NetworkCloud.Models.BareMetalMachineRunDataExtractsContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1844,6 +1873,7 @@ public partial class BareMetalMachineRunReadCommandsContent : System.ClientModel public BareMetalMachineRunReadCommandsContent(System.Collections.Generic.IEnumerable commands, long limitTimeSeconds) { } public System.Collections.Generic.IList Commands { get { throw null; } } public long LimitTimeSeconds { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NetworkCloud.Models.BareMetalMachineRunReadCommandsContent 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.NetworkCloud.Models.BareMetalMachineRunReadCommandsContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1893,6 +1923,7 @@ public BgpAdvertisement(System.Collections.Generic.IEnumerable ipAddress public System.Collections.Generic.IList Communities { get { throw null; } } public System.Collections.Generic.IList IPAddressPools { get { throw null; } } public System.Collections.Generic.IList Peers { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NetworkCloud.Models.BgpAdvertisement 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.NetworkCloud.Models.BgpAdvertisement System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1924,6 +1955,7 @@ public BgpServiceLoadBalancerConfiguration() { } public System.Collections.Generic.IList BgpPeers { get { throw null; } } public Azure.ResourceManager.NetworkCloud.Models.FabricPeeringEnabled? FabricPeeringEnabled { get { throw null; } set { } } public System.Collections.Generic.IList IPAddressPools { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NetworkCloud.Models.BgpServiceLoadBalancerConfiguration 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.NetworkCloud.Models.BgpServiceLoadBalancerConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2073,6 +2105,7 @@ internal ClusterAvailableUpgradeVersion() { } public System.DateTimeOffset? SupportExpireOn { get { throw null; } } public string TargetClusterVersion { get { throw null; } } public Azure.ResourceManager.NetworkCloud.Models.WorkloadImpact? WorkloadImpact { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NetworkCloud.Models.ClusterAvailableUpgradeVersion 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.NetworkCloud.Models.ClusterAvailableUpgradeVersion System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2084,6 +2117,7 @@ public partial class ClusterAvailableVersion : System.ClientModel.Primitives.IJs internal ClusterAvailableVersion() { } public string SupportExpiryDate { get { throw null; } } public string TargetClusterVersion { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NetworkCloud.Models.ClusterAvailableVersion 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.NetworkCloud.Models.ClusterAvailableVersion System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2101,6 +2135,7 @@ internal ClusterCapacity() { } public long? TotalCoreCount { get { throw null; } } public long? TotalHostStorageGB { get { throw null; } } public long? TotalMemoryGB { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NetworkCloud.Models.ClusterCapacity 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.NetworkCloud.Models.ClusterCapacity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2130,6 +2165,7 @@ public partial class ClusterDeployContent : System.ClientModel.Primitives.IJsonM { public ClusterDeployContent() { } public System.Collections.Generic.IList SkipValidationsForMachines { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NetworkCloud.Models.ClusterDeployContent 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.NetworkCloud.Models.ClusterDeployContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2306,6 +2342,7 @@ public partial class ClusterUpdateVersionContent : System.ClientModel.Primitives { public ClusterUpdateVersionContent(string targetClusterVersion) { } public string TargetClusterVersion { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NetworkCloud.Models.ClusterUpdateVersionContent 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.NetworkCloud.Models.ClusterUpdateVersionContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2394,6 +2431,7 @@ public ControlPlaneNodeConfiguration(long count, string vmSkuName) { } public System.Collections.Generic.IList AvailabilityZones { get { throw null; } } public long Count { get { throw null; } set { } } public string VmSkuName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NetworkCloud.Models.ControlPlaneNodeConfiguration 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.NetworkCloud.Models.ControlPlaneNodeConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2458,6 +2496,7 @@ public partial class EgressEndpoint : System.ClientModel.Primitives.IJsonModel endpoints) { } public string Category { get { throw null; } set { } } public System.Collections.Generic.IList Endpoints { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NetworkCloud.Models.EgressEndpoint 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.NetworkCloud.Models.EgressEndpoint System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2469,6 +2508,7 @@ public partial class EndpointDependency : System.ClientModel.Primitives.IJsonMod public EndpointDependency(string domainName) { } public string DomainName { get { throw null; } set { } } public long? Port { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NetworkCloud.Models.EndpointDependency 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.NetworkCloud.Models.EndpointDependency System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2480,6 +2520,7 @@ public partial class ExtendedLocation : System.ClientModel.Primitives.IJsonModel public ExtendedLocation(string name, string extendedLocationType) { } public string ExtendedLocationType { get { throw null; } set { } } public string Name { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NetworkCloud.Models.ExtendedLocation 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.NetworkCloud.Models.ExtendedLocation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2530,6 +2571,7 @@ internal FeatureStatus() { } public string DetailedStatusMessage { get { throw null; } } public string Name { get { throw null; } } public string Version { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NetworkCloud.Models.FeatureStatus 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.NetworkCloud.Models.FeatureStatus System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2542,6 +2584,7 @@ internal HardwareInventory() { } public string AdditionalHostInformation { get { throw null; } } public System.Collections.Generic.IReadOnlyList Interfaces { get { throw null; } } public System.Collections.Generic.IReadOnlyList Nics { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NetworkCloud.Models.HardwareInventory 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.NetworkCloud.Models.HardwareInventory System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2555,6 +2598,7 @@ internal HardwareInventoryNetworkInterface() { } public string MacAddress { get { throw null; } } public string Name { get { throw null; } } public string NetworkInterfaceId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NetworkCloud.Models.HardwareInventoryNetworkInterface 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.NetworkCloud.Models.HardwareInventoryNetworkInterface System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2566,6 +2610,7 @@ public partial class HardwareValidationStatus : System.ClientModel.Primitives.IJ internal HardwareValidationStatus() { } public System.DateTimeOffset? LastValidationOn { get { throw null; } } public Azure.ResourceManager.NetworkCloud.Models.BareMetalMachineHardwareValidationResult? Result { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NetworkCloud.Models.HardwareValidationStatus 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.NetworkCloud.Models.HardwareValidationStatus System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2633,6 +2678,7 @@ public ImageRepositoryCredentials(string registryUriString, string username) { } public string Password { get { throw null; } set { } } public string RegistryUriString { get { throw null; } set { } } public string Username { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NetworkCloud.Models.ImageRepositoryCredentials 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.NetworkCloud.Models.ImageRepositoryCredentials System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2653,6 +2699,7 @@ public InitialAgentPoolConfiguration(long count, Azure.ResourceManager.NetworkCl public System.Collections.Generic.IList Taints { get { throw null; } } public string UpgradeMaxSurge { get { throw null; } set { } } public string VmSkuName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NetworkCloud.Models.InitialAgentPoolConfiguration 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.NetworkCloud.Models.InitialAgentPoolConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2666,6 +2713,7 @@ public IPAddressPool(System.Collections.Generic.IEnumerable addresses, s public Azure.ResourceManager.NetworkCloud.Models.BfdEnabled? AutoAssign { get { throw null; } set { } } public string Name { get { throw null; } set { } } public Azure.ResourceManager.NetworkCloud.Models.BfdEnabled? OnlyUseHostIPs { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NetworkCloud.Models.IPAddressPool 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.NetworkCloud.Models.IPAddressPool System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2697,6 +2745,7 @@ public KeySetUser(string azureUserName, Azure.ResourceManager.NetworkCloud.Model public string AzureUserName { get { throw null; } set { } } public string Description { get { throw null; } set { } } public string KeyData { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NetworkCloud.Models.KeySetUser 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.NetworkCloud.Models.KeySetUser System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2709,6 +2758,7 @@ internal KeySetUserStatus() { } public string AzureUserName { get { throw null; } } public Azure.ResourceManager.NetworkCloud.Models.BareMetalMachineKeySetUserSetupStatus? Status { get { throw null; } } public string StatusMessage { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NetworkCloud.Models.KeySetUserStatus 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.NetworkCloud.Models.KeySetUserStatus System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2744,6 +2794,7 @@ public KubernetesClusterNetworkConfiguration(Azure.Core.ResourceIdentifier cloud public System.Net.IPAddress DnsServiceIP { get { throw null; } set { } } public System.Collections.Generic.IList PodCidrs { get { throw null; } } public System.Collections.Generic.IList ServiceCidrs { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NetworkCloud.Models.KubernetesClusterNetworkConfiguration 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.NetworkCloud.Models.KubernetesClusterNetworkConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2771,6 +2822,7 @@ internal KubernetesClusterNode() { } public Azure.ResourceManager.NetworkCloud.Models.KubernetesNodeRole? Role { get { throw null; } } public System.Collections.Generic.IReadOnlyList Taints { get { throw null; } } public string VmSkuName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NetworkCloud.Models.KubernetesClusterNode 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.NetworkCloud.Models.KubernetesClusterNode System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2829,6 +2881,7 @@ public partial class KubernetesClusterRestartNodeContent : System.ClientModel.Pr { public KubernetesClusterRestartNodeContent(string nodeName) { } public string NodeName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NetworkCloud.Models.KubernetesClusterRestartNodeContent 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.NetworkCloud.Models.KubernetesClusterRestartNodeContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2840,6 +2893,7 @@ public partial class KubernetesLabel : System.ClientModel.Primitives.IJsonModel< public KubernetesLabel(string key, string value) { } public string Key { get { throw null; } set { } } public string Value { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NetworkCloud.Models.KubernetesLabel 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.NetworkCloud.Models.KubernetesLabel System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2909,6 +2963,7 @@ public partial class L2NetworkAttachmentConfiguration : System.ClientModel.Primi public L2NetworkAttachmentConfiguration(Azure.Core.ResourceIdentifier networkId) { } public Azure.Core.ResourceIdentifier NetworkId { get { throw null; } set { } } public Azure.ResourceManager.NetworkCloud.Models.KubernetesPluginType? PluginType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NetworkCloud.Models.L2NetworkAttachmentConfiguration 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.NetworkCloud.Models.L2NetworkAttachmentConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2961,6 +3016,7 @@ public L3NetworkAttachmentConfiguration(Azure.Core.ResourceIdentifier networkId) public Azure.ResourceManager.NetworkCloud.Models.L3NetworkConfigurationIpamEnabled? IpamEnabled { get { throw null; } set { } } public Azure.Core.ResourceIdentifier NetworkId { get { throw null; } set { } } public Azure.ResourceManager.NetworkCloud.Models.KubernetesPluginType? PluginType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NetworkCloud.Models.L3NetworkAttachmentConfiguration 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.NetworkCloud.Models.L3NetworkAttachmentConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3032,6 +3088,7 @@ internal LldpNeighbor() { } public string PortName { get { throw null; } } public string SystemDescription { get { throw null; } } public string SystemName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NetworkCloud.Models.LldpNeighbor 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.NetworkCloud.Models.LldpNeighbor System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3044,6 +3101,7 @@ internal MachineDisk() { } public long? CapacityGB { get { throw null; } } public Azure.ResourceManager.NetworkCloud.Models.MachineSkuDiskConnectionType? Connection { get { throw null; } } public Azure.ResourceManager.NetworkCloud.Models.DiskType? DiskType { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NetworkCloud.Models.MachineDisk 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.NetworkCloud.Models.MachineDisk System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3085,6 +3143,7 @@ internal MachineSkuSlot() { } public long? RackSlot { get { throw null; } } public long? TotalThreads { get { throw null; } } public string Vendor { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NetworkCloud.Models.MachineSkuSlot 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.NetworkCloud.Models.MachineSkuSlot System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3096,6 +3155,7 @@ public partial class ManagedResourceGroupConfiguration : System.ClientModel.Prim public ManagedResourceGroupConfiguration() { } public Azure.Core.AzureLocation? Location { get { throw null; } set { } } public string Name { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NetworkCloud.Models.ManagedResourceGroupConfiguration 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.NetworkCloud.Models.ManagedResourceGroupConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3112,6 +3172,7 @@ public NetworkAttachment(string attachedNetworkId, Azure.ResourceManager.Network public string IPv6Address { get { throw null; } set { } } public string MacAddress { get { throw null; } } public string NetworkAttachmentName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NetworkCloud.Models.NetworkAttachment 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.NetworkCloud.Models.NetworkAttachment System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3123,6 +3184,7 @@ public partial class NetworkCloudAgentConfiguration : System.ClientModel.Primiti public NetworkCloudAgentConfiguration(long hugepagesCount) { } public long HugepagesCount { get { throw null; } set { } } public Azure.ResourceManager.NetworkCloud.Models.HugepagesSize? HugepagesSize { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NetworkCloud.Models.NetworkCloudAgentConfiguration 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.NetworkCloud.Models.NetworkCloudAgentConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3154,6 +3216,7 @@ public NetworkCloudAgentPoolPatch() { } public long? Count { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } public string UpgradeMaxSurge { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NetworkCloud.Models.NetworkCloudAgentPoolPatch 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.NetworkCloud.Models.NetworkCloudAgentPoolPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3167,6 +3230,7 @@ public NetworkCloudBareMetalMachineKeySetPatch() { } public System.Collections.Generic.IList JumpHostsAllowed { get { throw null; } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } public System.Collections.Generic.IList UserList { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NetworkCloud.Models.NetworkCloudBareMetalMachineKeySetPatch 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.NetworkCloud.Models.NetworkCloudBareMetalMachineKeySetPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3178,6 +3242,7 @@ public partial class NetworkCloudBareMetalMachinePatch : System.ClientModel.Prim public NetworkCloudBareMetalMachinePatch() { } public string MachineDetails { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NetworkCloud.Models.NetworkCloudBareMetalMachinePatch 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.NetworkCloud.Models.NetworkCloudBareMetalMachinePatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3190,6 +3255,7 @@ public NetworkCloudBmcKeySetPatch() { } public System.DateTimeOffset? ExpireOn { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } public System.Collections.Generic.IList UserList { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NetworkCloud.Models.NetworkCloudBmcKeySetPatch 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.NetworkCloud.Models.NetworkCloudBmcKeySetPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3202,6 +3268,7 @@ public NetworkCloudCloudServicesNetworkPatch() { } public System.Collections.Generic.IList AdditionalEgressEndpoints { get { throw null; } } public Azure.ResourceManager.NetworkCloud.Models.CloudServicesNetworkEnableDefaultEgressEndpoint? EnableDefaultEgressEndpoints { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NetworkCloud.Models.NetworkCloudCloudServicesNetworkPatch 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.NetworkCloud.Models.NetworkCloudCloudServicesNetworkPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3212,6 +3279,7 @@ public partial class NetworkCloudClusterManagerPatch : System.ClientModel.Primit { public NetworkCloudClusterManagerPatch() { } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NetworkCloud.Models.NetworkCloudClusterManagerPatch 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.NetworkCloud.Models.NetworkCloudClusterManagerPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3224,6 +3292,7 @@ public NetworkCloudClusterMetricsConfigurationPatch() { } public long? CollectionInterval { get { throw null; } set { } } public System.Collections.Generic.IList EnabledMetrics { get { throw null; } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NetworkCloud.Models.NetworkCloudClusterMetricsConfigurationPatch 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.NetworkCloud.Models.NetworkCloudClusterMetricsConfigurationPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3239,6 +3308,7 @@ public NetworkCloudClusterPatch() { } public Azure.ResourceManager.NetworkCloud.Models.ValidationThreshold ComputeDeploymentThreshold { get { throw null; } set { } } public System.Collections.Generic.IList ComputeRackDefinitions { get { throw null; } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NetworkCloud.Models.NetworkCloudClusterPatch 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.NetworkCloud.Models.NetworkCloudClusterPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3251,6 +3321,7 @@ public NetworkCloudKubernetesClusterPatch() { } public long? ControlPlaneNodeCount { get { throw null; } set { } } public string KubernetesVersion { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NetworkCloud.Models.NetworkCloudKubernetesClusterPatch 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.NetworkCloud.Models.NetworkCloudKubernetesClusterPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3261,6 +3332,7 @@ public partial class NetworkCloudL2NetworkPatch : System.ClientModel.Primitives. { public NetworkCloudL2NetworkPatch() { } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NetworkCloud.Models.NetworkCloudL2NetworkPatch 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.NetworkCloud.Models.NetworkCloudL2NetworkPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3271,6 +3343,7 @@ public partial class NetworkCloudL3NetworkPatch : System.ClientModel.Primitives. { public NetworkCloudL3NetworkPatch() { } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NetworkCloud.Models.NetworkCloudL3NetworkPatch 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.NetworkCloud.Models.NetworkCloudL3NetworkPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3287,6 +3360,7 @@ internal NetworkCloudNetworkInterface() { } public long? PortCount { get { throw null; } } public long? PortSpeed { get { throw null; } } public string Vendor { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NetworkCloud.Models.NetworkCloudNetworkInterface 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.NetworkCloud.Models.NetworkCloudNetworkInterface System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3299,6 +3373,7 @@ internal NetworkCloudNic() { } public Azure.ResourceManager.NetworkCloud.Models.LldpNeighbor LldpNeighbor { get { throw null; } } public string MacAddress { get { throw null; } } public string Name { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NetworkCloud.Models.NetworkCloudNic 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.NetworkCloud.Models.NetworkCloudNic System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3317,6 +3392,7 @@ internal NetworkCloudOperationStatusResult() { } public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } } public System.DateTimeOffset? StartOn { get { throw null; } } public string Status { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NetworkCloud.Models.NetworkCloudOperationStatusResult 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.NetworkCloud.Models.NetworkCloudOperationStatusResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3329,6 +3405,7 @@ public NetworkCloudOSDisk(long diskSizeInGB) { } public Azure.ResourceManager.NetworkCloud.Models.OSDiskCreateOption? CreateOption { get { throw null; } set { } } public Azure.ResourceManager.NetworkCloud.Models.OSDiskDeleteOption? DeleteOption { get { throw null; } set { } } public long DiskSizeInGB { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NetworkCloud.Models.NetworkCloudOSDisk 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.NetworkCloud.Models.NetworkCloudOSDisk System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3345,6 +3422,7 @@ public NetworkCloudRackDefinition(Azure.Core.ResourceIdentifier networkRackId, s public string RackSerialNumber { get { throw null; } set { } } public Azure.Core.ResourceIdentifier RackSkuId { get { throw null; } set { } } public System.Collections.Generic.IList StorageApplianceConfigurationData { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NetworkCloud.Models.NetworkCloudRackDefinition 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.NetworkCloud.Models.NetworkCloudRackDefinition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3357,6 +3435,7 @@ public NetworkCloudRackPatch() { } public string RackLocation { get { throw null; } set { } } public string RackSerialNumber { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NetworkCloud.Models.NetworkCloudRackPatch 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.NetworkCloud.Models.NetworkCloudRackPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3367,6 +3446,7 @@ public partial class NetworkCloudSshPublicKey : System.ClientModel.Primitives.IJ { public NetworkCloudSshPublicKey(string keyData) { } public string KeyData { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NetworkCloud.Models.NetworkCloudSshPublicKey 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.NetworkCloud.Models.NetworkCloudSshPublicKey System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3378,6 +3458,7 @@ public partial class NetworkCloudStorageAppliancePatch : System.ClientModel.Prim public NetworkCloudStorageAppliancePatch() { } public string SerialNumber { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NetworkCloud.Models.NetworkCloudStorageAppliancePatch 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.NetworkCloud.Models.NetworkCloudStorageAppliancePatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3389,6 +3470,7 @@ public partial class NetworkCloudStorageProfile : System.ClientModel.Primitives. public NetworkCloudStorageProfile(Azure.ResourceManager.NetworkCloud.Models.NetworkCloudOSDisk osDisk) { } public Azure.ResourceManager.NetworkCloud.Models.NetworkCloudOSDisk OSDisk { get { throw null; } set { } } public System.Collections.Generic.IList VolumeAttachments { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NetworkCloud.Models.NetworkCloudStorageProfile 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.NetworkCloud.Models.NetworkCloudStorageProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3399,6 +3481,7 @@ public partial class NetworkCloudTrunkedNetworkPatch : System.ClientModel.Primit { public NetworkCloudTrunkedNetworkPatch() { } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NetworkCloud.Models.NetworkCloudTrunkedNetworkPatch 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.NetworkCloud.Models.NetworkCloudTrunkedNetworkPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3412,6 +3495,7 @@ public NetworkCloudVirtualMachineConsolePatch() { } public System.DateTimeOffset? ExpireOn { get { throw null; } set { } } public string KeyData { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NetworkCloud.Models.NetworkCloudVirtualMachineConsolePatch 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.NetworkCloud.Models.NetworkCloudVirtualMachineConsolePatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3423,6 +3507,7 @@ public partial class NetworkCloudVirtualMachinePatch : System.ClientModel.Primit public NetworkCloudVirtualMachinePatch() { } public System.Collections.Generic.IDictionary Tags { get { throw null; } } public Azure.ResourceManager.NetworkCloud.Models.ImageRepositoryCredentials VmImageRepositoryCredentials { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NetworkCloud.Models.NetworkCloudVirtualMachinePatch 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.NetworkCloud.Models.NetworkCloudVirtualMachinePatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3433,6 +3518,7 @@ public partial class NetworkCloudVolumePatch : System.ClientModel.Primitives.IJs { public NetworkCloudVolumePatch() { } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NetworkCloud.Models.NetworkCloudVolumePatch 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.NetworkCloud.Models.NetworkCloudVolumePatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3599,6 +3685,7 @@ public ServiceLoadBalancerBgpPeer(string name, string peerAddress, long peerAsn) public string PeerAddress { get { throw null; } set { } } public long PeerAsn { get { throw null; } set { } } public long? PeerPort { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NetworkCloud.Models.ServiceLoadBalancerBgpPeer 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.NetworkCloud.Models.ServiceLoadBalancerBgpPeer System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3612,6 +3699,7 @@ public ServicePrincipalInformation(string applicationId, string principalId, str public string Password { get { throw null; } set { } } public string PrincipalId { get { throw null; } set { } } public string TenantId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NetworkCloud.Models.ServicePrincipalInformation 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.NetworkCloud.Models.ServicePrincipalInformation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3643,6 +3731,7 @@ public StorageApplianceConfiguration(Azure.ResourceManager.NetworkCloud.Models.A public long RackSlot { get { throw null; } set { } } public string SerialNumber { get { throw null; } set { } } public string StorageApplianceName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NetworkCloud.Models.StorageApplianceConfiguration 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.NetworkCloud.Models.StorageApplianceConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3672,6 +3761,7 @@ public partial class StorageApplianceEnableRemoteVendorManagementContent : Syste { public StorageApplianceEnableRemoteVendorManagementContent() { } public System.Collections.Generic.IList SupportEndpoints { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NetworkCloud.Models.StorageApplianceEnableRemoteVendorManagementContent 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.NetworkCloud.Models.StorageApplianceEnableRemoteVendorManagementContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3705,6 +3795,7 @@ internal StorageApplianceSkuSlot() { } public long? CapacityGB { get { throw null; } } public string Model { get { throw null; } } public long? RackSlot { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NetworkCloud.Models.StorageApplianceSkuSlot 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.NetworkCloud.Models.StorageApplianceSkuSlot System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3716,6 +3807,7 @@ public partial class TrunkedNetworkAttachmentConfiguration : System.ClientModel. public TrunkedNetworkAttachmentConfiguration(Azure.Core.ResourceIdentifier networkId) { } public Azure.Core.ResourceIdentifier NetworkId { get { throw null; } set { } } public Azure.ResourceManager.NetworkCloud.Models.KubernetesPluginType? PluginType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NetworkCloud.Models.TrunkedNetworkAttachmentConfiguration 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.NetworkCloud.Models.TrunkedNetworkAttachmentConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3768,6 +3860,7 @@ public ValidationThreshold(Azure.ResourceManager.NetworkCloud.Models.ValidationT public Azure.ResourceManager.NetworkCloud.Models.ValidationThresholdGrouping Grouping { get { throw null; } set { } } public Azure.ResourceManager.NetworkCloud.Models.ValidationThresholdType ThresholdType { get { throw null; } set { } } public long Value { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NetworkCloud.Models.ValidationThreshold 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.NetworkCloud.Models.ValidationThreshold System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3914,6 +4007,7 @@ public VirtualMachinePlacementHint(Azure.ResourceManager.NetworkCloud.Models.Vir public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } set { } } public Azure.ResourceManager.NetworkCloud.Models.VirtualMachineSchedulingExecution SchedulingExecution { get { throw null; } set { } } public Azure.ResourceManager.NetworkCloud.Models.VirtualMachinePlacementHintPodAffinityScope Scope { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NetworkCloud.Models.VirtualMachinePlacementHint 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.NetworkCloud.Models.VirtualMachinePlacementHint System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3960,6 +4054,7 @@ public partial class VirtualMachinePowerOffContent : System.ClientModel.Primitiv { public VirtualMachinePowerOffContent() { } public Azure.ResourceManager.NetworkCloud.Models.SkipShutdown? SkipShutdown { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NetworkCloud.Models.VirtualMachinePowerOffContent 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.NetworkCloud.Models.VirtualMachinePowerOffContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/assets.json b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/assets.json index 86dba40a8ed8..e700abb41164 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/assets.json +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/networkcloud/Azure.ResourceManager.NetworkCloud", - "Tag": "net/networkcloud/Azure.ResourceManager.NetworkCloud_3e1c6bc439" + "Tag": "net/networkcloud/Azure.ResourceManager.NetworkCloud_0a7b4cd7f0" } diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudAgentPoolCollection.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudAgentPoolCollection.cs index 6b2d8d989b61..f2c147e6179c 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudAgentPoolCollection.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudAgentPoolCollection.cs @@ -187,7 +187,7 @@ public async Task CreateOrUpdate_CreateOrUpdateKubernetesClusterAgentPool() // invoke the operation string agentPoolName = "agentPoolName"; - NetworkCloudAgentPoolData data = new NetworkCloudAgentPoolData(new AzureLocation("location"), 3, NetworkCloudAgentPoolMode.System, "NC_M16_v1") + NetworkCloudAgentPoolData data = new NetworkCloudAgentPoolData(new AzureLocation("location"), 3L, NetworkCloudAgentPoolMode.System, "NC_M16_v1") { ExtendedLocation = new ExtendedLocation("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", "CustomLocation"), AdministratorConfiguration = new AdministratorConfiguration() @@ -198,7 +198,7 @@ public async Task CreateOrUpdate_CreateOrUpdateKubernetesClusterAgentPool() new NetworkCloudSshPublicKey("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm") }, }, - AgentOptions = new NetworkCloudAgentConfiguration(96) + AgentOptions = new NetworkCloudAgentConfiguration(96L) { HugepagesSize = HugepagesSize.OneG, }, diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudAgentPoolResource.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudAgentPoolResource.cs index 5ea4d0929938..08634ce26267 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudAgentPoolResource.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudAgentPoolResource.cs @@ -105,7 +105,7 @@ public async Task Update_PatchKubernetesClusterAgentPool() ["key1"] = "myvalue1", ["key2"] = "myvalue2", }, - Count = 3, + Count = 3L, UpgradeMaxSurge = "1", }; ArmOperation lro = await networkCloudAgentPool.UpdateAsync(WaitUntil.Completed, patch); diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudBareMetalMachineResource.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudBareMetalMachineResource.cs index 787a2c33bd22..2fe990ef878f 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudBareMetalMachineResource.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudBareMetalMachineResource.cs @@ -301,7 +301,7 @@ public async Task RunCommand_RunCommandOnBareMetalMachine() NetworkCloudBareMetalMachineResource networkCloudBareMetalMachine = client.GetNetworkCloudBareMetalMachineResource(networkCloudBareMetalMachineResourceId); // invoke the operation - BareMetalMachineRunCommandContent content = new BareMetalMachineRunCommandContent(60, "cHdkCg==") + BareMetalMachineRunCommandContent content = new BareMetalMachineRunCommandContent(60L, "cHdkCg==") { Arguments = { @@ -345,7 +345,7 @@ public async Task RunDataExtracts_RunDataExtractionOnBareMetalMachine() "SysInfo","TTYLog" }, } - }, 60); + }, 60L); ArmOperation lro = await networkCloudBareMetalMachine.RunDataExtractsAsync(WaitUntil.Completed, content); NetworkCloudOperationStatusResult result = lro.Value; @@ -389,7 +389,7 @@ public async Task RunReadCommands_RunAndRetrieveOutputFromReadOnlyCommandsOnBare "192.168.0.99","-c","3" }, } - }, 60); + }, 60L); ArmOperation lro = await networkCloudBareMetalMachine.RunReadCommandsAsync(WaitUntil.Completed, content); NetworkCloudOperationStatusResult result = lro.Value; diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudCloudServicesNetworkCollection.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudCloudServicesNetworkCollection.cs index 1e40c45cde15..2e3f57564a04 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudCloudServicesNetworkCollection.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudCloudServicesNetworkCollection.cs @@ -191,7 +191,7 @@ public async Task CreateOrUpdate_CreateOrUpdateCloudServicesNetwork() { new EndpointDependency("https://storageaccountex.blob.core.windows.net") { -Port = 443, +Port = 443L, } }) }, diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudCloudServicesNetworkResource.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudCloudServicesNetworkResource.cs index 4d95201c7228..db158b34fe36 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudCloudServicesNetworkResource.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudCloudServicesNetworkResource.cs @@ -141,7 +141,7 @@ public async Task Update_PatchCloudServicesNetwork() { new EndpointDependency("https://storageaccountex.blob.core.windows.net") { -Port = 443, +Port = 443L, } }) }, diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudClusterCollection.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudClusterCollection.cs index 0d6b1f1a8412..fb7a3366851c 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudClusterCollection.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudClusterCollection.cs @@ -190,14 +190,14 @@ public async Task CreateOrUpdate_CreateOrUpdateCluster() new BareMetalMachineConfiguration(new AdministrativeCredentials("username") { Password = "{password}", -},"AA:BB:CC:DD:EE:FF","00:BB:CC:DD:EE:FF",1,"BM1219XXX") +},"AA:BB:CC:DD:EE:FF","00:BB:CC:DD:EE:FF",1L,"BM1219XXX") { MachineDetails = "extraDetails", MachineName = "bmmName1", },new BareMetalMachineConfiguration(new AdministrativeCredentials("username") { Password = "{password}", -},"AA:BB:CC:DD:EE:00","00:BB:CC:DD:EE:00",2,"BM1219YYY") +},"AA:BB:CC:DD:EE:00","00:BB:CC:DD:EE:00",2L,"BM1219YYY") { MachineDetails = "extraDetails", MachineName = "bmmName2", @@ -209,7 +209,7 @@ public async Task CreateOrUpdate_CreateOrUpdateCluster() new StorageApplianceConfiguration(new AdministrativeCredentials("username") { Password = "{password}", -},1,"BM1219XXX") +},1L,"BM1219XXX") { StorageApplianceName = "vmName", } @@ -222,7 +222,7 @@ public async Task CreateOrUpdate_CreateOrUpdateCluster() { Password = "{password}", }, - ComputeDeploymentThreshold = new ValidationThreshold(ValidationThresholdGrouping.PerCluster, ValidationThresholdType.PercentSuccess, 90), + ComputeDeploymentThreshold = new ValidationThreshold(ValidationThresholdGrouping.PerCluster, ValidationThresholdType.PercentSuccess, 90L), ComputeRackDefinitions = { new NetworkCloudRackDefinition(new ResourceIdentifier("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkRacks/networkRackName"),"AA1234",new ResourceIdentifier("/subscriptions/123e4567-e89b-12d3-a456-426655440000/providers/Microsoft.NetworkCloud/rackSkus/rackSkuName")) @@ -232,14 +232,14 @@ public async Task CreateOrUpdate_CreateOrUpdateCluster() new BareMetalMachineConfiguration(new AdministrativeCredentials("username") { Password = "{password}", -},"AA:BB:CC:DD:EE:FF","00:BB:CC:DD:EE:FF",1,"BM1219XXX") +},"AA:BB:CC:DD:EE:FF","00:BB:CC:DD:EE:FF",1L,"BM1219XXX") { MachineDetails = "extraDetails", MachineName = "bmmName1", },new BareMetalMachineConfiguration(new AdministrativeCredentials("username") { Password = "{password}", -},"AA:BB:CC:DD:EE:00","00:BB:CC:DD:EE:00",2,"BM1219YYY") +},"AA:BB:CC:DD:EE:00","00:BB:CC:DD:EE:00",2L,"BM1219YYY") { MachineDetails = "extraDetails", MachineName = "bmmName2", @@ -251,7 +251,7 @@ public async Task CreateOrUpdate_CreateOrUpdateCluster() new StorageApplianceConfiguration(new AdministrativeCredentials("username") { Password = "{password}", -},1,"BM1219XXX") +},1L,"BM1219XXX") { StorageApplianceName = "vmName", } diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudClusterMetricsConfigurationCollection.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudClusterMetricsConfigurationCollection.cs index 34f4a58b456d..3c1c93486450 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudClusterMetricsConfigurationCollection.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudClusterMetricsConfigurationCollection.cs @@ -187,7 +187,7 @@ public async Task CreateOrUpdate_CreateOrUpdateMetricsConfigurationOfCluster() // invoke the operation string metricsConfigurationName = "default"; - NetworkCloudClusterMetricsConfigurationData data = new NetworkCloudClusterMetricsConfigurationData(new AzureLocation("location"), new ExtendedLocation("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", "CustomLocation"), 15) + NetworkCloudClusterMetricsConfigurationData data = new NetworkCloudClusterMetricsConfigurationData(new AzureLocation("location"), new ExtendedLocation("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", "CustomLocation"), 15L) { EnabledMetrics = { diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudClusterMetricsConfigurationResource.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudClusterMetricsConfigurationResource.cs index 28cc72392894..4adf2da46ee3 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudClusterMetricsConfigurationResource.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudClusterMetricsConfigurationResource.cs @@ -105,7 +105,7 @@ public async Task Update_PatchMetricsConfigurationOfCluster() ["key1"] = "myvalue1", ["key2"] = "myvalue2", }, - CollectionInterval = 15, + CollectionInterval = 15L, EnabledMetrics = { "metric1","metric2" diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudClusterResource.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudClusterResource.cs index 633154573b70..8a32ef45818f 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudClusterResource.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudClusterResource.cs @@ -142,14 +142,14 @@ public async Task Update_PatchClusterAggregatorOrSingleRackDefinition() new BareMetalMachineConfiguration(new AdministrativeCredentials("username") { Password = "{password}", -},"AA:BB:CC:DD:EE:FF","00:BB:CC:DD:EE:FF",1,"BM1219XXX") +},"AA:BB:CC:DD:EE:FF","00:BB:CC:DD:EE:FF",1L,"BM1219XXX") { MachineDetails = "extraDetails", MachineName = "bmmName1", },new BareMetalMachineConfiguration(new AdministrativeCredentials("username") { Password = "{password}", -},"AA:BB:CC:DD:EE:00","00:BB:CC:DD:EE:00",2,"BM1219YYY") +},"AA:BB:CC:DD:EE:00","00:BB:CC:DD:EE:00",2L,"BM1219YYY") { MachineDetails = "extraDetails", MachineName = "bmmName2", @@ -161,13 +161,13 @@ public async Task Update_PatchClusterAggregatorOrSingleRackDefinition() new StorageApplianceConfiguration(new AdministrativeCredentials("username") { Password = "{password}", -},1,"BM1219XXX") +},1L,"BM1219XXX") { StorageApplianceName = "vmName", } }, }, - ComputeDeploymentThreshold = new ValidationThreshold(ValidationThresholdGrouping.PerCluster, ValidationThresholdType.PercentSuccess, 90), + ComputeDeploymentThreshold = new ValidationThreshold(ValidationThresholdGrouping.PerCluster, ValidationThresholdType.PercentSuccess, 90L), }; ArmOperation lro = await networkCloudCluster.UpdateAsync(WaitUntil.Completed, patch); NetworkCloudClusterResource result = lro.Value; diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudKubernetesClusterCollection.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudKubernetesClusterCollection.cs index b974843a605a..4e686e6fea3f 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudKubernetesClusterCollection.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudKubernetesClusterCollection.cs @@ -184,7 +184,7 @@ public async Task CreateOrUpdate_CreateOrUpdateKubernetesCluster() // invoke the operation string kubernetesClusterName = "kubernetesClusterName"; - NetworkCloudKubernetesClusterData data = new NetworkCloudKubernetesClusterData(new AzureLocation("location"), new ExtendedLocation("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", "CustomLocation"), new ControlPlaneNodeConfiguration(3, "NC_G4_v1") + NetworkCloudKubernetesClusterData data = new NetworkCloudKubernetesClusterData(new AzureLocation("location"), new ExtendedLocation("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", "CustomLocation"), new ControlPlaneNodeConfiguration(3L, "NC_G4_v1") { AdministratorConfiguration = new AdministratorConfiguration() { @@ -200,7 +200,7 @@ public async Task CreateOrUpdate_CreateOrUpdateKubernetesCluster() }, }, new InitialAgentPoolConfiguration[] { -new InitialAgentPoolConfiguration(3,NetworkCloudAgentPoolMode.System,"SystemPool-1","NC_M16_v1") +new InitialAgentPoolConfiguration(3L,NetworkCloudAgentPoolMode.System,"SystemPool-1","NC_M16_v1") { AdministratorConfiguration = new AdministratorConfiguration() { @@ -210,7 +210,7 @@ public async Task CreateOrUpdate_CreateOrUpdateKubernetesCluster() new NetworkCloudSshPublicKey("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm") }, }, -AgentOptions = new NetworkCloudAgentConfiguration(96) +AgentOptions = new NetworkCloudAgentConfiguration(96L) { HugepagesSize = HugepagesSize.OneG, }, @@ -302,14 +302,14 @@ public async Task CreateOrUpdate_CreateOrUpdateKubernetesCluster() }, BgpPeers = { -new ServiceLoadBalancerBgpPeer("peer1","203.0.113.254",64497) +new ServiceLoadBalancerBgpPeer("peer1","203.0.113.254",64497L) { BfdEnabled = BfdEnabled.False, BgpMultiHop = BgpMultiHop.False, HoldTime = "P300s", KeepAliveTime = "P300s", -MyAsn = 64512, -PeerPort = 179, +MyAsn = 64512L, +PeerPort = 179L, } }, FabricPeeringEnabled = FabricPeeringEnabled.True, diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudKubernetesClusterResource.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudKubernetesClusterResource.cs index 1d1306d8ed83..687bad97837f 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudKubernetesClusterResource.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudKubernetesClusterResource.cs @@ -135,7 +135,7 @@ public async Task Update_PatchKubernetesCluster() ["key1"] = "myvalue1", ["key2"] = "myvalue2", }, - ControlPlaneNodeCount = 3, + ControlPlaneNodeCount = 3L, KubernetesVersion = "1.24.12", }; ArmOperation lro = await networkCloudKubernetesCluster.UpdateAsync(WaitUntil.Completed, patch); diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudL3NetworkCollection.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudL3NetworkCollection.cs index b69134292237..169e55e0590b 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudL3NetworkCollection.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudL3NetworkCollection.cs @@ -183,7 +183,7 @@ public async Task CreateOrUpdate_CreateOrUpdateL3Network() // invoke the operation string l3NetworkName = "l3NetworkName"; - NetworkCloudL3NetworkData data = new NetworkCloudL3NetworkData(new AzureLocation("location"), new ExtendedLocation("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", "CustomLocation"), new ResourceIdentifier("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/l3IsolationDomainName"), 12) + NetworkCloudL3NetworkData data = new NetworkCloudL3NetworkData(new AzureLocation("location"), new ExtendedLocation("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", "CustomLocation"), new ResourceIdentifier("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/l3IsolationDomainName"), 12L) { InterfaceName = "eth0", IPAllocationType = IPAllocationType.DualStack, diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudTrunkedNetworkCollection.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudTrunkedNetworkCollection.cs index d47ab6a4dc7f..747872702754 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudTrunkedNetworkCollection.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudTrunkedNetworkCollection.cs @@ -188,7 +188,7 @@ public async Task CreateOrUpdate_CreateOrUpdateTrunkedNetwork() new ResourceIdentifier("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/l2IsolationDomainName"),new ResourceIdentifier("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/l3IsolationDomainName") }, new long[] { -12,14 +12L,14L }) { InterfaceName = "eth0", diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudVirtualMachineCollection.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudVirtualMachineCollection.cs index a792b5dd5117..4810c4733c25 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudVirtualMachineCollection.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudVirtualMachineCollection.cs @@ -183,7 +183,7 @@ public async Task CreateOrUpdate_CreateOrUpdateVirtualMachine() // invoke the operation string virtualMachineName = "virtualMachineName"; - NetworkCloudVirtualMachineData data = new NetworkCloudVirtualMachineData(new AzureLocation("location"), new ExtendedLocation("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", "CustomLocation"), "username", new NetworkAttachment("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/cloudServicesNetworks/cloudServicesNetworkName", VirtualMachineIPAllocationMethod.Dynamic), 2, 8, new NetworkCloudStorageProfile(new NetworkCloudOSDisk(120) + NetworkCloudVirtualMachineData data = new NetworkCloudVirtualMachineData(new AzureLocation("location"), new ExtendedLocation("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", "CustomLocation"), "username", new NetworkAttachment("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/cloudServicesNetworks/cloudServicesNetworkName", VirtualMachineIPAllocationMethod.Dynamic), 2L, 8L, new NetworkCloudStorageProfile(new NetworkCloudOSDisk(120L) { CreateOption = OSDiskCreateOption.Ephemeral, DeleteOption = OSDiskDeleteOption.Delete, diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudVolumeCollection.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudVolumeCollection.cs index a2922eeb8855..d6df6aeb4c8c 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudVolumeCollection.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudVolumeCollection.cs @@ -183,7 +183,7 @@ public async Task CreateOrUpdate_CreateOrUpdateVolume() // invoke the operation string volumeName = "volumeName"; - NetworkCloudVolumeData data = new NetworkCloudVolumeData(new AzureLocation("location"), new ExtendedLocation("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", "CustomLocation"), 10000) + NetworkCloudVolumeData data = new NetworkCloudVolumeData(new AzureLocation("location"), new ExtendedLocation("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", "CustomLocation"), 10000L) { Tags = { diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/AdministrativeCredentials.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/AdministrativeCredentials.Serialization.cs index 3ab88be7777e..4c97d856f2e2 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/AdministrativeCredentials.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/AdministrativeCredentials.Serialization.cs @@ -18,6 +18,15 @@ public partial class AdministrativeCredentials : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(AdministrativeCredentials)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Password)) { writer.WritePropertyName("password"u8); @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } AdministrativeCredentials IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/AdministratorConfiguration.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/AdministratorConfiguration.Serialization.cs index 6db60f8aa9a9..20dbb2a3cfd6 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/AdministratorConfiguration.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/AdministratorConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class AdministratorConfiguration : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(AdministratorConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(AdminUsername)) { writer.WritePropertyName("adminUsername"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } AdministratorConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/AgentPoolList.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/AgentPoolList.Serialization.cs index 9206a87f97fe..7f3ce3f75248 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/AgentPoolList.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/AgentPoolList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class AgentPoolList : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt throw new FormatException($"The model {nameof(AgentPoolList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt #endif } } - writer.WriteEndObject(); } AgentPoolList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/AgentPoolUpgradeSettings.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/AgentPoolUpgradeSettings.Serialization.cs index 85966932b25e..457acd4b8ee8 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/AgentPoolUpgradeSettings.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/AgentPoolUpgradeSettings.Serialization.cs @@ -18,6 +18,15 @@ internal partial class AgentPoolUpgradeSettings : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(AgentPoolUpgradeSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(MaxSurge)) { writer.WritePropertyName("maxSurge"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } AgentPoolUpgradeSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/AttachedNetworkConfiguration.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/AttachedNetworkConfiguration.Serialization.cs index 94f9796cc63d..ac24903e112f 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/AttachedNetworkConfiguration.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/AttachedNetworkConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class AttachedNetworkConfiguration : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(AttachedNetworkConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(L2Networks)) { writer.WritePropertyName("l2Networks"u8); @@ -71,7 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } AttachedNetworkConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/AvailableUpgrade.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/AvailableUpgrade.Serialization.cs index d277391e93a1..07c302a45cd4 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/AvailableUpgrade.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/AvailableUpgrade.Serialization.cs @@ -18,6 +18,15 @@ public partial class AvailableUpgrade : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(AvailableUpgrade)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(AvailabilityLifecycle)) { writer.WritePropertyName("availabilityLifecycle"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } AvailableUpgrade IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/BareMetalMachineCommandSpecification.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/BareMetalMachineCommandSpecification.Serialization.cs index 90630aa38281..56832e300a23 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/BareMetalMachineCommandSpecification.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/BareMetalMachineCommandSpecification.Serialization.cs @@ -18,6 +18,15 @@ public partial class BareMetalMachineCommandSpecification : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(BareMetalMachineCommandSpecification)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Arguments)) { writer.WritePropertyName("arguments"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } BareMetalMachineCommandSpecification IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/BareMetalMachineConfiguration.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/BareMetalMachineConfiguration.Serialization.cs index bfd9a4a7f946..f2cb18aedb56 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/BareMetalMachineConfiguration.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/BareMetalMachineConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class BareMetalMachineConfiguration : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(BareMetalMachineConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(BmcConnectionString)) { writer.WritePropertyName("bmcConnectionString"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } BareMetalMachineConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/BareMetalMachineCordonContent.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/BareMetalMachineCordonContent.Serialization.cs index 1e2c37057f2a..033c11ab8ff1 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/BareMetalMachineCordonContent.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/BareMetalMachineCordonContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class BareMetalMachineCordonContent : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(BareMetalMachineCordonContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Evacuate)) { writer.WritePropertyName("evacuate"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } BareMetalMachineCordonContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/BareMetalMachineKeySetList.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/BareMetalMachineKeySetList.Serialization.cs index 9c50c77175a7..e5fdd75ae74e 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/BareMetalMachineKeySetList.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/BareMetalMachineKeySetList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class BareMetalMachineKeySetList : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(BareMetalMachineKeySetList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } BareMetalMachineKeySetList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/BareMetalMachineList.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/BareMetalMachineList.Serialization.cs index 1f7b45c4c56d..3215cf68d24e 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/BareMetalMachineList.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/BareMetalMachineList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class BareMetalMachineList : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(BareMetalMachineList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } BareMetalMachineList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/BareMetalMachinePowerOffContent.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/BareMetalMachinePowerOffContent.Serialization.cs index a50c15d90434..7fcedce434b4 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/BareMetalMachinePowerOffContent.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/BareMetalMachinePowerOffContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class BareMetalMachinePowerOffContent : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(BareMetalMachinePowerOffContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(SkipShutdown)) { writer.WritePropertyName("skipShutdown"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } BareMetalMachinePowerOffContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/BareMetalMachineReplaceContent.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/BareMetalMachineReplaceContent.Serialization.cs index e243dcfc2295..1f6a384072e1 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/BareMetalMachineReplaceContent.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/BareMetalMachineReplaceContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class BareMetalMachineReplaceContent : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(BareMetalMachineReplaceContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(BmcCredentials)) { writer.WritePropertyName("bmcCredentials"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } BareMetalMachineReplaceContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/BareMetalMachineRunCommandContent.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/BareMetalMachineRunCommandContent.Serialization.cs index 91dd009aacb3..fb362c702c51 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/BareMetalMachineRunCommandContent.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/BareMetalMachineRunCommandContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class BareMetalMachineRunCommandContent : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(BareMetalMachineRunCommandContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Arguments)) { writer.WritePropertyName("arguments"u8); @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } BareMetalMachineRunCommandContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/BareMetalMachineRunDataExtractsContent.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/BareMetalMachineRunDataExtractsContent.Serialization.cs index 43bbe5a88c6a..a1f6df0f5e1a 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/BareMetalMachineRunDataExtractsContent.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/BareMetalMachineRunDataExtractsContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class BareMetalMachineRunDataExtractsContent : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(BareMetalMachineRunDataExtractsContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("commands"u8); writer.WriteStartArray(); foreach (var item in Commands) @@ -50,7 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } BareMetalMachineRunDataExtractsContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/BareMetalMachineRunReadCommandsContent.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/BareMetalMachineRunReadCommandsContent.Serialization.cs index c5a37aeabcb6..199ed7f0d397 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/BareMetalMachineRunReadCommandsContent.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/BareMetalMachineRunReadCommandsContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class BareMetalMachineRunReadCommandsContent : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(BareMetalMachineRunReadCommandsContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("commands"u8); writer.WriteStartArray(); foreach (var item in Commands) @@ -50,7 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } BareMetalMachineRunReadCommandsContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/BgpAdvertisement.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/BgpAdvertisement.Serialization.cs index c12f631cd61b..77769150084a 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/BgpAdvertisement.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/BgpAdvertisement.Serialization.cs @@ -18,6 +18,15 @@ public partial class BgpAdvertisement : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(BgpAdvertisement)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(AdvertiseToFabric)) { writer.WritePropertyName("advertiseToFabric"u8); @@ -73,7 +81,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } BgpAdvertisement IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/BgpServiceLoadBalancerConfiguration.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/BgpServiceLoadBalancerConfiguration.Serialization.cs index f96c76075fd3..6cf039c676c8 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/BgpServiceLoadBalancerConfiguration.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/BgpServiceLoadBalancerConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class BgpServiceLoadBalancerConfiguration : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(BgpServiceLoadBalancerConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(BgpAdvertisements)) { writer.WritePropertyName("bgpAdvertisements"u8); @@ -76,7 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } BgpServiceLoadBalancerConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/BmcKeySetList.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/BmcKeySetList.Serialization.cs index ba65a10b2abb..9a8770e3b66b 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/BmcKeySetList.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/BmcKeySetList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class BmcKeySetList : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt throw new FormatException($"The model {nameof(BmcKeySetList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt #endif } } - writer.WriteEndObject(); } BmcKeySetList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/CloudServicesNetworkList.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/CloudServicesNetworkList.Serialization.cs index 7ba100202f22..d579c650ec64 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/CloudServicesNetworkList.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/CloudServicesNetworkList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class CloudServicesNetworkList : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(CloudServicesNetworkList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } CloudServicesNetworkList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ClusterAvailableUpgradeVersion.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ClusterAvailableUpgradeVersion.Serialization.cs index 6a8047378a2f..7eb2bc5caf8c 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ClusterAvailableUpgradeVersion.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ClusterAvailableUpgradeVersion.Serialization.cs @@ -18,6 +18,15 @@ public partial class ClusterAvailableUpgradeVersion : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(ClusterAvailableUpgradeVersion)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ControlImpact)) { writer.WritePropertyName("controlImpact"u8); @@ -71,7 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } ClusterAvailableUpgradeVersion IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ClusterAvailableVersion.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ClusterAvailableVersion.Serialization.cs index c260309758dd..e58f49b29b9e 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ClusterAvailableVersion.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ClusterAvailableVersion.Serialization.cs @@ -18,6 +18,15 @@ public partial class ClusterAvailableVersion : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(ClusterAvailableVersion)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(SupportExpiryDate)) { writer.WritePropertyName("supportExpiryDate"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } ClusterAvailableVersion IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ClusterCapacity.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ClusterCapacity.Serialization.cs index 9b80c6b20f47..d199a4210a7f 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ClusterCapacity.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ClusterCapacity.Serialization.cs @@ -18,6 +18,15 @@ public partial class ClusterCapacity : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(ClusterCapacity)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(AvailableApplianceStorageGB)) { writer.WritePropertyName("availableApplianceStorageGB"u8); @@ -81,7 +89,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO #endif } } - writer.WriteEndObject(); } ClusterCapacity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ClusterDeployContent.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ClusterDeployContent.Serialization.cs index 2ab5a9ecfb5e..a2cd4bb30f41 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ClusterDeployContent.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ClusterDeployContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class ClusterDeployContent : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(ClusterDeployContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(SkipValidationsForMachines)) { writer.WritePropertyName("skipValidationsForMachines"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } ClusterDeployContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ClusterList.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ClusterList.Serialization.cs index 67b53ccece24..aa1c718c4f59 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ClusterList.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ClusterList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ClusterList : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio throw new FormatException($"The model {nameof(ClusterList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio #endif } } - writer.WriteEndObject(); } ClusterList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ClusterManagerList.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ClusterManagerList.Serialization.cs index 7e90e43ef331..807137547ccf 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ClusterManagerList.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ClusterManagerList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ClusterManagerList : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ClusterManagerList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } ClusterManagerList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ClusterMetricsConfigurationList.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ClusterMetricsConfigurationList.Serialization.cs index 2bc161af83dd..a3035f78c659 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ClusterMetricsConfigurationList.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ClusterMetricsConfigurationList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ClusterMetricsConfigurationList : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(ClusterMetricsConfigurationList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } ClusterMetricsConfigurationList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ClusterUpdateVersionContent.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ClusterUpdateVersionContent.Serialization.cs index bad2cf8e8536..41f536e74f70 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ClusterUpdateVersionContent.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ClusterUpdateVersionContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class ClusterUpdateVersionContent : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(ClusterUpdateVersionContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("targetClusterVersion"u8); writer.WriteStringValue(TargetClusterVersion); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } ClusterUpdateVersionContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ConsoleList.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ConsoleList.Serialization.cs index 887f4c232afd..2eb8e99a27e6 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ConsoleList.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ConsoleList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ConsoleList : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio throw new FormatException($"The model {nameof(ConsoleList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio #endif } } - writer.WriteEndObject(); } ConsoleList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ControlPlaneNodeConfiguration.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ControlPlaneNodeConfiguration.Serialization.cs index aef570b92282..39d1e42715e0 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ControlPlaneNodeConfiguration.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ControlPlaneNodeConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class ControlPlaneNodeConfiguration : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(ControlPlaneNodeConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(AdministratorConfiguration)) { writer.WritePropertyName("administratorConfiguration"u8); @@ -60,7 +68,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } ControlPlaneNodeConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ControlPlaneNodePatchConfiguration.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ControlPlaneNodePatchConfiguration.Serialization.cs index 7d7aebabd860..99f70b794d4c 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ControlPlaneNodePatchConfiguration.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ControlPlaneNodePatchConfiguration.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ControlPlaneNodePatchConfiguration : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(ControlPlaneNodePatchConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Count)) { writer.WritePropertyName("count"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } ControlPlaneNodePatchConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/EgressEndpoint.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/EgressEndpoint.Serialization.cs index f296aff5d35f..612593916f80 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/EgressEndpoint.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/EgressEndpoint.Serialization.cs @@ -18,6 +18,15 @@ public partial class EgressEndpoint : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(EgressEndpoint)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("category"u8); writer.WriteStringValue(Category); writer.WritePropertyName("endpoints"u8); @@ -50,7 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp #endif } } - writer.WriteEndObject(); } EgressEndpoint IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/EndpointDependency.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/EndpointDependency.Serialization.cs index b1d81655b5f1..8e0605d0b55e 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/EndpointDependency.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/EndpointDependency.Serialization.cs @@ -18,6 +18,15 @@ public partial class EndpointDependency : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(EndpointDependency)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("domainName"u8); writer.WriteStringValue(DomainName); if (Optional.IsDefined(Port)) @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } EndpointDependency IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ExtendedLocation.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ExtendedLocation.Serialization.cs index 9826b11287ab..83a1d2e4791f 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ExtendedLocation.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ExtendedLocation.Serialization.cs @@ -18,6 +18,15 @@ public partial class ExtendedLocation : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(ExtendedLocation)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); writer.WritePropertyName("type"u8); @@ -45,7 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } ExtendedLocation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/FeatureStatus.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/FeatureStatus.Serialization.cs index 003a0be0ce79..3553eb7deb17 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/FeatureStatus.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/FeatureStatus.Serialization.cs @@ -18,6 +18,15 @@ public partial class FeatureStatus : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt throw new FormatException($"The model {nameof(FeatureStatus)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(DetailedStatus)) { writer.WritePropertyName("detailedStatus"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt #endif } } - writer.WriteEndObject(); } FeatureStatus IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/HardwareInventory.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/HardwareInventory.Serialization.cs index d56def870eb3..e810ad813169 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/HardwareInventory.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/HardwareInventory.Serialization.cs @@ -18,6 +18,15 @@ public partial class HardwareInventory : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(HardwareInventory)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(AdditionalHostInformation)) { writer.WritePropertyName("additionalHostInformation"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } HardwareInventory IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/HardwareInventoryNetworkInterface.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/HardwareInventoryNetworkInterface.Serialization.cs index 648f16b8d6fe..9adb2b725bfc 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/HardwareInventoryNetworkInterface.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/HardwareInventoryNetworkInterface.Serialization.cs @@ -18,6 +18,15 @@ public partial class HardwareInventoryNetworkInterface : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(HardwareInventoryNetworkInterface)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(LinkStatus)) { writer.WritePropertyName("linkStatus"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } HardwareInventoryNetworkInterface IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/HardwareValidationStatus.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/HardwareValidationStatus.Serialization.cs index b54d50ac5b6e..fd48c0436d21 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/HardwareValidationStatus.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/HardwareValidationStatus.Serialization.cs @@ -18,6 +18,15 @@ public partial class HardwareValidationStatus : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(HardwareValidationStatus)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(LastValidationOn)) { writer.WritePropertyName("lastValidationTime"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } HardwareValidationStatus IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/IPAddressPool.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/IPAddressPool.Serialization.cs index 489e0807ad6b..f02ce10063da 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/IPAddressPool.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/IPAddressPool.Serialization.cs @@ -18,6 +18,15 @@ public partial class IPAddressPool : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt throw new FormatException($"The model {nameof(IPAddressPool)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("addresses"u8); writer.WriteStartArray(); foreach (var item in Addresses) @@ -60,7 +68,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt #endif } } - writer.WriteEndObject(); } IPAddressPool IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ImageRepositoryCredentials.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ImageRepositoryCredentials.Serialization.cs index a62a6ac35a98..27522908669d 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ImageRepositoryCredentials.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ImageRepositoryCredentials.Serialization.cs @@ -18,6 +18,15 @@ public partial class ImageRepositoryCredentials : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(ImageRepositoryCredentials)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Password)) { writer.WritePropertyName("password"u8); @@ -50,7 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } ImageRepositoryCredentials IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/InitialAgentPoolConfiguration.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/InitialAgentPoolConfiguration.Serialization.cs index 615b56bc5f84..dbba8073e9dd 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/InitialAgentPoolConfiguration.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/InitialAgentPoolConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class InitialAgentPoolConfiguration : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(InitialAgentPoolConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(AdministratorConfiguration)) { writer.WritePropertyName("administratorConfiguration"u8); @@ -99,7 +107,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } InitialAgentPoolConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/KeySetUser.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/KeySetUser.Serialization.cs index 559277e1f4da..a2e07e3667b6 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/KeySetUser.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/KeySetUser.Serialization.cs @@ -18,6 +18,15 @@ public partial class KeySetUser : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOption throw new FormatException($"The model {nameof(KeySetUser)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("azureUserName"u8); writer.WriteStringValue(AzureUserName); if (Optional.IsDefined(Description)) @@ -50,7 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOption #endif } } - writer.WriteEndObject(); } KeySetUser IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/KeySetUserStatus.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/KeySetUserStatus.Serialization.cs index 5d520d6ad6ca..2a3cf026af60 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/KeySetUserStatus.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/KeySetUserStatus.Serialization.cs @@ -18,6 +18,15 @@ public partial class KeySetUserStatus : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(KeySetUserStatus)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(AzureUserName)) { writer.WritePropertyName("azureUserName"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } KeySetUserStatus IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/KubernetesClusterList.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/KubernetesClusterList.Serialization.cs index f5666459a489..9f376a2706a3 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/KubernetesClusterList.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/KubernetesClusterList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class KubernetesClusterList : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(KubernetesClusterList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } KubernetesClusterList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/KubernetesClusterNetworkConfiguration.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/KubernetesClusterNetworkConfiguration.Serialization.cs index c735371a3166..5311e6fa18fd 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/KubernetesClusterNetworkConfiguration.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/KubernetesClusterNetworkConfiguration.Serialization.cs @@ -19,6 +19,15 @@ public partial class KubernetesClusterNetworkConfiguration : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(KubernetesClusterNetworkConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(AttachedNetworkConfiguration)) { writer.WritePropertyName("attachedNetworkConfiguration"u8); @@ -81,7 +89,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } KubernetesClusterNetworkConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/KubernetesClusterNode.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/KubernetesClusterNode.Serialization.cs index 343fa36dd3d1..73dd50e7e3cf 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/KubernetesClusterNode.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/KubernetesClusterNode.Serialization.cs @@ -18,6 +18,15 @@ public partial class KubernetesClusterNode : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(KubernetesClusterNode)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(AgentPoolId)) { writer.WritePropertyName("agentPoolId"u8); @@ -146,7 +154,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } KubernetesClusterNode IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/KubernetesClusterRestartNodeContent.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/KubernetesClusterRestartNodeContent.Serialization.cs index 6a6b390d10f7..d81e8307bafc 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/KubernetesClusterRestartNodeContent.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/KubernetesClusterRestartNodeContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class KubernetesClusterRestartNodeContent : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(KubernetesClusterRestartNodeContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("nodeName"u8); writer.WriteStringValue(NodeName); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } KubernetesClusterRestartNodeContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/KubernetesLabel.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/KubernetesLabel.Serialization.cs index e16639be5b25..4dde87f9f80e 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/KubernetesLabel.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/KubernetesLabel.Serialization.cs @@ -18,6 +18,15 @@ public partial class KubernetesLabel : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(KubernetesLabel)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("key"u8); writer.WriteStringValue(Key); writer.WritePropertyName("value"u8); @@ -45,7 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO #endif } } - writer.WriteEndObject(); } KubernetesLabel IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/L2NetworkAttachmentConfiguration.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/L2NetworkAttachmentConfiguration.Serialization.cs index 6d14fa7f052d..5f3c468abdaf 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/L2NetworkAttachmentConfiguration.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/L2NetworkAttachmentConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class L2NetworkAttachmentConfiguration : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(L2NetworkAttachmentConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("networkId"u8); writer.WriteStringValue(NetworkId); if (Optional.IsDefined(PluginType)) @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } L2NetworkAttachmentConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/L2NetworkList.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/L2NetworkList.Serialization.cs index 361b7a0339e8..5d2cafee53f3 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/L2NetworkList.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/L2NetworkList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class L2NetworkList : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt throw new FormatException($"The model {nameof(L2NetworkList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt #endif } } - writer.WriteEndObject(); } L2NetworkList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/L3NetworkAttachmentConfiguration.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/L3NetworkAttachmentConfiguration.Serialization.cs index 7d85a9fed708..3f5afd3c0568 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/L3NetworkAttachmentConfiguration.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/L3NetworkAttachmentConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class L3NetworkAttachmentConfiguration : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(L3NetworkAttachmentConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IpamEnabled)) { writer.WritePropertyName("ipamEnabled"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } L3NetworkAttachmentConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/L3NetworkList.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/L3NetworkList.Serialization.cs index 643251924751..0ee50ff3c724 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/L3NetworkList.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/L3NetworkList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class L3NetworkList : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt throw new FormatException($"The model {nameof(L3NetworkList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt #endif } } - writer.WriteEndObject(); } L3NetworkList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/LldpNeighbor.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/LldpNeighbor.Serialization.cs index cb2bc99c3b2e..28b0fb4efef4 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/LldpNeighbor.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/LldpNeighbor.Serialization.cs @@ -18,6 +18,15 @@ public partial class LldpNeighbor : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(LldpNeighbor)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(PortDescription)) { writer.WritePropertyName("portDescription"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti #endif } } - writer.WriteEndObject(); } LldpNeighbor IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/MachineDisk.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/MachineDisk.Serialization.cs index df80bd8ac706..caf3bfbb3325 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/MachineDisk.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/MachineDisk.Serialization.cs @@ -18,6 +18,15 @@ public partial class MachineDisk : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio throw new FormatException($"The model {nameof(MachineDisk)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(CapacityGB)) { writer.WritePropertyName("capacityGB"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio #endif } } - writer.WriteEndObject(); } MachineDisk IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/MachineSkuSlot.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/MachineSkuSlot.Serialization.cs index 6b30b2d6f90c..b477d211d0fc 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/MachineSkuSlot.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/MachineSkuSlot.Serialization.cs @@ -18,6 +18,15 @@ public partial class MachineSkuSlot : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(MachineSkuSlot)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(RackSlot)) { writer.WritePropertyName("rackSlot"u8); @@ -114,7 +122,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp #endif } } - writer.WriteEndObject(); } MachineSkuSlot IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ManagedResourceGroupConfiguration.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ManagedResourceGroupConfiguration.Serialization.cs index 608a08e7161e..1c7e47b1eacf 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ManagedResourceGroupConfiguration.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ManagedResourceGroupConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class ManagedResourceGroupConfiguration : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(ManagedResourceGroupConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Location)) { writer.WritePropertyName("location"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } ManagedResourceGroupConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkAttachment.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkAttachment.Serialization.cs index 5e559075c7fe..3f3d1523dc44 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkAttachment.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkAttachment.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkAttachment : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(NetworkAttachment)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("attachedNetworkId"u8); writer.WriteStringValue(AttachedNetworkId); if (Optional.IsDefined(DefaultGateway)) @@ -70,7 +78,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } NetworkAttachment IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudAadConfiguration.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudAadConfiguration.Serialization.cs index 593e8e268bf5..ab5b8c72b1af 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudAadConfiguration.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudAadConfiguration.Serialization.cs @@ -18,6 +18,15 @@ internal partial class NetworkCloudAadConfiguration : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(NetworkCloudAadConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("adminGroupObjectIds"u8); writer.WriteStartArray(); foreach (var item in AdminGroupObjectIds) @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } NetworkCloudAadConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudAgentConfiguration.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudAgentConfiguration.Serialization.cs index e4a3ffe03610..9e6e6d1a23e8 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudAgentConfiguration.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudAgentConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkCloudAgentConfiguration : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(NetworkCloudAgentConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("hugepagesCount"u8); writer.WriteNumberValue(HugepagesCount); if (Optional.IsDefined(HugepagesSize)) @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } NetworkCloudAgentConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudAgentPoolPatch.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudAgentPoolPatch.Serialization.cs index 83faf0579e08..791fb521cccf 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudAgentPoolPatch.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudAgentPoolPatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkCloudAgentPoolPatch : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(NetworkCloudAgentPoolPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -65,7 +73,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } NetworkCloudAgentPoolPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudBareMetalMachineKeySetPatch.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudBareMetalMachineKeySetPatch.Serialization.cs index b43874039e11..e33f77859ba8 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudBareMetalMachineKeySetPatch.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudBareMetalMachineKeySetPatch.Serialization.cs @@ -19,6 +19,15 @@ public partial class NetworkCloudBareMetalMachineKeySetPatch : IUtf8JsonSerializ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter wr throw new FormatException($"The model {nameof(NetworkCloudBareMetalMachineKeySetPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -86,7 +94,6 @@ void IJsonModel.Write(Utf8JsonWriter wr #endif } } - writer.WriteEndObject(); } NetworkCloudBareMetalMachineKeySetPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudBareMetalMachinePatch.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudBareMetalMachinePatch.Serialization.cs index 441b3744284b..ea4de1a9f2d7 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudBareMetalMachinePatch.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudBareMetalMachinePatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkCloudBareMetalMachinePatch : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(NetworkCloudBareMetalMachinePatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -60,7 +68,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } NetworkCloudBareMetalMachinePatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudBmcKeySetPatch.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudBmcKeySetPatch.Serialization.cs index 4bb4696e66d0..de03c6f18790 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudBmcKeySetPatch.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudBmcKeySetPatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkCloudBmcKeySetPatch : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(NetworkCloudBmcKeySetPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -70,7 +78,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } NetworkCloudBmcKeySetPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudCloudServicesNetworkPatch.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudCloudServicesNetworkPatch.Serialization.cs index d5b86c7be875..1531c703d7e5 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudCloudServicesNetworkPatch.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudCloudServicesNetworkPatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkCloudCloudServicesNetworkPatch : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(NetworkCloudCloudServicesNetworkPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -70,7 +78,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } NetworkCloudCloudServicesNetworkPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudClusterManagerPatch.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudClusterManagerPatch.Serialization.cs index e57f789a31b1..0c57595a0815 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudClusterManagerPatch.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudClusterManagerPatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkCloudClusterManagerPatch : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(NetworkCloudClusterManagerPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } NetworkCloudClusterManagerPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudClusterMetricsConfigurationPatch.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudClusterMetricsConfigurationPatch.Serialization.cs index 7d4c2cf650c4..dedf46dba957 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudClusterMetricsConfigurationPatch.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudClusterMetricsConfigurationPatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkCloudClusterMetricsConfigurationPatch : IUtf8JsonSer void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWrit throw new FormatException($"The model {nameof(NetworkCloudClusterMetricsConfigurationPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -70,7 +78,6 @@ void IJsonModel.Write(Utf8JsonWrit #endif } } - writer.WriteEndObject(); } NetworkCloudClusterMetricsConfigurationPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudClusterPatch.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudClusterPatch.Serialization.cs index 4d42542720c9..c5f32e0907e5 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudClusterPatch.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudClusterPatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkCloudClusterPatch : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(NetworkCloudClusterPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -85,7 +93,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } NetworkCloudClusterPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudKubernetesClusterPatch.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudKubernetesClusterPatch.Serialization.cs index 05bfe187b601..28728ce1d60c 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudKubernetesClusterPatch.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudKubernetesClusterPatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkCloudKubernetesClusterPatch : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(NetworkCloudKubernetesClusterPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -65,7 +73,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } NetworkCloudKubernetesClusterPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudL2NetworkPatch.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudL2NetworkPatch.Serialization.cs index de21f1025b26..36e6ffc8606c 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudL2NetworkPatch.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudL2NetworkPatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkCloudL2NetworkPatch : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(NetworkCloudL2NetworkPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } NetworkCloudL2NetworkPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudL3NetworkPatch.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudL3NetworkPatch.Serialization.cs index 8e652a3a85c2..a855d9e8b714 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudL3NetworkPatch.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudL3NetworkPatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkCloudL3NetworkPatch : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(NetworkCloudL3NetworkPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } NetworkCloudL3NetworkPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudNetworkInterface.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudNetworkInterface.Serialization.cs index 7f7942c61fa4..55e52383774b 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudNetworkInterface.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudNetworkInterface.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkCloudNetworkInterface : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(NetworkCloudNetworkInterface)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Address)) { writer.WritePropertyName("address"u8); @@ -76,7 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } NetworkCloudNetworkInterface IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudNic.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudNic.Serialization.cs index e08faee3377e..ac0674894a9a 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudNic.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudNic.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkCloudNic : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(NetworkCloudNic)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(LldpNeighbor)) { writer.WritePropertyName("lldpNeighbor"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO #endif } } - writer.WriteEndObject(); } NetworkCloudNic IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudOSDisk.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudOSDisk.Serialization.cs index 38fbaa852eeb..8587aef3793c 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudOSDisk.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudOSDisk.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkCloudOSDisk : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(NetworkCloudOSDisk)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(CreateOption)) { writer.WritePropertyName("createOption"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } NetworkCloudOSDisk IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudOperationStatusResult.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudOperationStatusResult.Serialization.cs index b13cdba13c87..b5466583d8f6 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudOperationStatusResult.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudOperationStatusResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkCloudOperationStatusResult : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(NetworkCloudOperationStatusResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -88,7 +96,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } NetworkCloudOperationStatusResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudRackDefinition.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudRackDefinition.Serialization.cs index 0acb725c3b05..577d67ad9797 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudRackDefinition.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudRackDefinition.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkCloudRackDefinition : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(NetworkCloudRackDefinition)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(AvailabilityZone)) { writer.WritePropertyName("availabilityZone"u8); @@ -77,7 +85,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } NetworkCloudRackDefinition IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudRackPatch.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudRackPatch.Serialization.cs index 585b28e7b98a..1ffec87abfe4 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudRackPatch.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudRackPatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkCloudRackPatch : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(NetworkCloudRackPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -65,7 +73,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } NetworkCloudRackPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudSshPublicKey.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudSshPublicKey.Serialization.cs index b29e456659e5..ebe4188f4635 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudSshPublicKey.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudSshPublicKey.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkCloudSshPublicKey : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(NetworkCloudSshPublicKey)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("keyData"u8); writer.WriteStringValue(KeyData); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } NetworkCloudSshPublicKey IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudStorageAppliancePatch.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudStorageAppliancePatch.Serialization.cs index 7bf8347b84c1..31b2995f2c87 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudStorageAppliancePatch.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudStorageAppliancePatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkCloudStorageAppliancePatch : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(NetworkCloudStorageAppliancePatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -60,7 +68,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } NetworkCloudStorageAppliancePatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudStorageProfile.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudStorageProfile.Serialization.cs index ee6264f2b653..a63cca16304e 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudStorageProfile.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudStorageProfile.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkCloudStorageProfile : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(NetworkCloudStorageProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("osDisk"u8); writer.WriteObjectValue(OSDisk, options); if (Optional.IsCollectionDefined(VolumeAttachments)) @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } NetworkCloudStorageProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudTrunkedNetworkPatch.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudTrunkedNetworkPatch.Serialization.cs index bf4a60f9de93..e8d54b6a99fb 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudTrunkedNetworkPatch.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudTrunkedNetworkPatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkCloudTrunkedNetworkPatch : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(NetworkCloudTrunkedNetworkPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } NetworkCloudTrunkedNetworkPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudVirtualMachineConsolePatch.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudVirtualMachineConsolePatch.Serialization.cs index b63d231095ac..3a9d884ad9b9 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudVirtualMachineConsolePatch.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudVirtualMachineConsolePatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkCloudVirtualMachineConsolePatch : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(NetworkCloudVirtualMachineConsolePatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -70,7 +78,6 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } NetworkCloudVirtualMachineConsolePatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudVirtualMachinePatch.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudVirtualMachinePatch.Serialization.cs index 340b7856427f..1db07ff5c207 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudVirtualMachinePatch.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudVirtualMachinePatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkCloudVirtualMachinePatch : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(NetworkCloudVirtualMachinePatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -60,7 +68,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } NetworkCloudVirtualMachinePatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudVolumePatch.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudVolumePatch.Serialization.cs index 37bc66c367e4..be8f926cb864 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudVolumePatch.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudVolumePatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkCloudVolumePatch : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(NetworkCloudVolumePatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } NetworkCloudVolumePatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/RackList.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/RackList.Serialization.cs index ed4ed00297af..1b140fd4b6ae 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/RackList.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/RackList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class RackList : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions throw new FormatException($"The model {nameof(RackList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions #endif } } - writer.WriteEndObject(); } RackList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/RackSkuList.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/RackSkuList.Serialization.cs index 11ffff72cb1e..21bb382d1c05 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/RackSkuList.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/RackSkuList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class RackSkuList : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio throw new FormatException($"The model {nameof(RackSkuList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio #endif } } - writer.WriteEndObject(); } RackSkuList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ServiceLoadBalancerBgpPeer.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ServiceLoadBalancerBgpPeer.Serialization.cs index 4a141ac3a9cb..483b3e81bfe3 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ServiceLoadBalancerBgpPeer.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ServiceLoadBalancerBgpPeer.Serialization.cs @@ -18,6 +18,15 @@ public partial class ServiceLoadBalancerBgpPeer : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(ServiceLoadBalancerBgpPeer)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(BfdEnabled)) { writer.WritePropertyName("bfdEnabled"u8); @@ -82,7 +90,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } ServiceLoadBalancerBgpPeer IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ServicePrincipalInformation.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ServicePrincipalInformation.Serialization.cs index a536d309404d..35cad3b20cc5 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ServicePrincipalInformation.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ServicePrincipalInformation.Serialization.cs @@ -18,6 +18,15 @@ public partial class ServicePrincipalInformation : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(ServicePrincipalInformation)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("applicationId"u8); writer.WriteStringValue(ApplicationId); if (Optional.IsDefined(Password)) @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } ServicePrincipalInformation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/StorageApplianceConfiguration.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/StorageApplianceConfiguration.Serialization.cs index 6efb2caf5321..2314403db64f 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/StorageApplianceConfiguration.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/StorageApplianceConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class StorageApplianceConfiguration : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(StorageApplianceConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("adminCredentials"u8); writer.WriteObjectValue(AdminCredentials, options); writer.WritePropertyName("rackSlot"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } StorageApplianceConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/StorageApplianceEnableRemoteVendorManagementContent.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/StorageApplianceEnableRemoteVendorManagementContent.Serialization.cs index d0aa5e9fcb33..de89929d8646 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/StorageApplianceEnableRemoteVendorManagementContent.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/StorageApplianceEnableRemoteVendorManagementContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class StorageApplianceEnableRemoteVendorManagementContent : IUtf8 void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8J throw new FormatException($"The model {nameof(StorageApplianceEnableRemoteVendorManagementContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(SupportEndpoints)) { writer.WritePropertyName("supportEndpoints"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8J #endif } } - writer.WriteEndObject(); } StorageApplianceEnableRemoteVendorManagementContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/StorageApplianceList.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/StorageApplianceList.Serialization.cs index c463ef907eb5..bffc0984fbe3 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/StorageApplianceList.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/StorageApplianceList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class StorageApplianceList : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(StorageApplianceList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } StorageApplianceList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/StorageApplianceSkuSlot.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/StorageApplianceSkuSlot.Serialization.cs index 89d7e6bf6f9c..2ba2742dd993 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/StorageApplianceSkuSlot.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/StorageApplianceSkuSlot.Serialization.cs @@ -18,6 +18,15 @@ public partial class StorageApplianceSkuSlot : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(StorageApplianceSkuSlot)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(RackSlot)) { writer.WritePropertyName("rackSlot"u8); @@ -59,7 +67,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } StorageApplianceSkuSlot IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/TrunkedNetworkAttachmentConfiguration.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/TrunkedNetworkAttachmentConfiguration.Serialization.cs index 39c64f523118..46dadcfca87b 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/TrunkedNetworkAttachmentConfiguration.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/TrunkedNetworkAttachmentConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class TrunkedNetworkAttachmentConfiguration : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(TrunkedNetworkAttachmentConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("networkId"u8); writer.WriteStringValue(NetworkId); if (Optional.IsDefined(PluginType)) @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } TrunkedNetworkAttachmentConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/TrunkedNetworkList.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/TrunkedNetworkList.Serialization.cs index 8af1f124bdc5..ae61c91b92bb 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/TrunkedNetworkList.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/TrunkedNetworkList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class TrunkedNetworkList : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(TrunkedNetworkList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } TrunkedNetworkList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ValidationThreshold.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ValidationThreshold.Serialization.cs index e3a81095adb4..07a300aafd76 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ValidationThreshold.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ValidationThreshold.Serialization.cs @@ -18,6 +18,15 @@ public partial class ValidationThreshold : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ValidationThreshold)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("grouping"u8); writer.WriteStringValue(Grouping.ToString()); writer.WritePropertyName("type"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } ValidationThreshold IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/VirtualMachineList.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/VirtualMachineList.Serialization.cs index 311a45e5e1ad..cb359d87d6f7 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/VirtualMachineList.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/VirtualMachineList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class VirtualMachineList : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(VirtualMachineList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } VirtualMachineList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/VirtualMachinePlacementHint.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/VirtualMachinePlacementHint.Serialization.cs index 0f966ac88175..7dc9ce8cf3e0 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/VirtualMachinePlacementHint.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/VirtualMachinePlacementHint.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualMachinePlacementHint : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(VirtualMachinePlacementHint)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("hintType"u8); writer.WriteStringValue(HintType.ToString()); writer.WritePropertyName("resourceId"u8); @@ -49,7 +57,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } VirtualMachinePlacementHint IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/VirtualMachinePowerOffContent.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/VirtualMachinePowerOffContent.Serialization.cs index 8db8276cb677..946aa66f52cf 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/VirtualMachinePowerOffContent.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/VirtualMachinePowerOffContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualMachinePowerOffContent : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(VirtualMachinePowerOffContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(SkipShutdown)) { writer.WritePropertyName("skipShutdown"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } VirtualMachinePowerOffContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/VolumeList.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/VolumeList.Serialization.cs index 83fe919cdc80..1915a762692c 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/VolumeList.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/VolumeList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class VolumeList : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOption throw new FormatException($"The model {nameof(VolumeList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOption #endif } } - writer.WriteEndObject(); } VolumeList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudAgentPoolData.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudAgentPoolData.Serialization.cs index 56459ddb998a..b84b900d61ce 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudAgentPoolData.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudAgentPoolData.Serialization.cs @@ -20,6 +20,15 @@ public partial class NetworkCloudAgentPoolData : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,45 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(NetworkCloudAgentPoolData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(ExtendedLocation)) { writer.WritePropertyName("extendedLocation"u8); writer.WriteObjectValue(ExtendedLocation, options); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(AdministratorConfiguration)) @@ -145,22 +121,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea writer.WritePropertyName("vmSkuName"u8); writer.WriteStringValue(VmSkuName); writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NetworkCloudAgentPoolData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudBareMetalMachineData.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudBareMetalMachineData.Serialization.cs index f22273fe52c1..024f5efe09db 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudBareMetalMachineData.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudBareMetalMachineData.Serialization.cs @@ -21,6 +21,15 @@ public partial class NetworkCloudBareMetalMachineData : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,42 +37,9 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(NetworkCloudBareMetalMachineData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("extendedLocation"u8); writer.WriteObjectValue(ExtendedLocation, options); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(AssociatedResourceIds)) @@ -197,22 +173,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NetworkCloudBareMetalMachineData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudBareMetalMachineKeySetData.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudBareMetalMachineKeySetData.Serialization.cs index 250da77c6680..4729b4c504aa 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudBareMetalMachineKeySetData.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudBareMetalMachineKeySetData.Serialization.cs @@ -21,6 +21,15 @@ public partial class NetworkCloudBareMetalMachineKeySetData : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,42 +37,9 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(NetworkCloudBareMetalMachineKeySetData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("extendedLocation"u8); writer.WriteObjectValue(ExtendedLocation, options); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); writer.WritePropertyName("azureGroupId"u8); @@ -127,22 +103,6 @@ void IJsonModel.Write(Utf8JsonWriter wri writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NetworkCloudBareMetalMachineKeySetData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudBmcKeySetData.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudBmcKeySetData.Serialization.cs index 056a3b77c6c8..b180da710da9 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudBmcKeySetData.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudBmcKeySetData.Serialization.cs @@ -20,6 +20,15 @@ public partial class NetworkCloudBmcKeySetData : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,42 +36,9 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(NetworkCloudBmcKeySetData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("extendedLocation"u8); writer.WriteObjectValue(ExtendedLocation, options); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); writer.WritePropertyName("azureGroupId"u8); @@ -109,22 +85,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NetworkCloudBmcKeySetData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudCloudServicesNetworkData.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudCloudServicesNetworkData.Serialization.cs index 591d6c3d0945..8dc0565bff78 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudCloudServicesNetworkData.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudCloudServicesNetworkData.Serialization.cs @@ -20,6 +20,15 @@ public partial class NetworkCloudCloudServicesNetworkData : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,42 +36,9 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(NetworkCloudCloudServicesNetworkData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("extendedLocation"u8); writer.WriteObjectValue(ExtendedLocation, options); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsCollectionDefined(AdditionalEgressEndpoints)) @@ -161,22 +137,6 @@ void IJsonModel.Write(Utf8JsonWriter write writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NetworkCloudCloudServicesNetworkData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudClusterData.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudClusterData.Serialization.cs index f5fdd0fe778f..b2dcfbc3be64 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudClusterData.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudClusterData.Serialization.cs @@ -20,6 +20,15 @@ public partial class NetworkCloudClusterData : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,42 +36,9 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(NetworkCloudClusterData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("extendedLocation"u8); writer.WriteObjectValue(ExtendedLocation, options); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); writer.WritePropertyName("aggregatorOrSingleRackDefinition"u8); @@ -189,22 +165,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NetworkCloudClusterData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudClusterManagerData.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudClusterManagerData.Serialization.cs index 06e36581d250..ecfcd28db6c1 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudClusterManagerData.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudClusterManagerData.Serialization.cs @@ -20,6 +20,15 @@ public partial class NetworkCloudClusterManagerData : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,40 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(NetworkCloudClusterManagerData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(AnalyticsWorkspaceId)) @@ -121,22 +97,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod writer.WriteStringValue(VmSize); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NetworkCloudClusterManagerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudClusterMetricsConfigurationData.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudClusterMetricsConfigurationData.Serialization.cs index 58742100a4bb..d8f5562b38c6 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudClusterMetricsConfigurationData.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudClusterMetricsConfigurationData.Serialization.cs @@ -20,6 +20,15 @@ public partial class NetworkCloudClusterMetricsConfigurationData : IUtf8JsonSeri void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,42 +36,9 @@ void IJsonModel.Write(Utf8JsonWrite throw new FormatException($"The model {nameof(NetworkCloudClusterMetricsConfigurationData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("extendedLocation"u8); writer.WriteObjectValue(ExtendedLocation, options); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); writer.WritePropertyName("collectionInterval"u8); @@ -103,22 +79,6 @@ void IJsonModel.Write(Utf8JsonWrite writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NetworkCloudClusterMetricsConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudKubernetesClusterData.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudKubernetesClusterData.Serialization.cs index 814c02b824c9..3a3af907d40b 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudKubernetesClusterData.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudKubernetesClusterData.Serialization.cs @@ -20,6 +20,15 @@ public partial class NetworkCloudKubernetesClusterData : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,42 +36,9 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(NetworkCloudKubernetesClusterData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("extendedLocation"u8); writer.WriteObjectValue(ExtendedLocation, options); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(AadConfiguration)) @@ -169,22 +145,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NetworkCloudKubernetesClusterData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudL2NetworkData.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudL2NetworkData.Serialization.cs index 15ec7ce01940..f706e5f37eb1 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudL2NetworkData.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudL2NetworkData.Serialization.cs @@ -20,6 +20,15 @@ public partial class NetworkCloudL2NetworkData : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,42 +36,9 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(NetworkCloudL2NetworkData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("extendedLocation"u8); writer.WriteObjectValue(ExtendedLocation, options); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(AssociatedResourceIds)) @@ -143,22 +119,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NetworkCloudL2NetworkData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudL3NetworkData.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudL3NetworkData.Serialization.cs index bd4057161c70..b40c3aeddd2d 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudL3NetworkData.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudL3NetworkData.Serialization.cs @@ -20,6 +20,15 @@ public partial class NetworkCloudL3NetworkData : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,42 +36,9 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(NetworkCloudL3NetworkData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("extendedLocation"u8); writer.WriteObjectValue(ExtendedLocation, options); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(AssociatedResourceIds)) @@ -165,22 +141,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea writer.WritePropertyName("vlan"u8); writer.WriteNumberValue(Vlan); writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NetworkCloudL3NetworkData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudRackData.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudRackData.Serialization.cs index 6848200e3dff..e71ad92d1782 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudRackData.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudRackData.Serialization.cs @@ -20,6 +20,15 @@ public partial class NetworkCloudRackData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,42 +36,9 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(NetworkCloudRackData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("extendedLocation"u8); writer.WriteObjectValue(ExtendedLocation, options); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); writer.WritePropertyName("availabilityZone"u8); @@ -94,22 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr writer.WritePropertyName("rackSkuId"u8); writer.WriteStringValue(RackSkuId); writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NetworkCloudRackData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudRackSkuData.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudRackSkuData.Serialization.cs index dd820de1335a..8ee031c26f3f 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudRackSkuData.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudRackSkuData.Serialization.cs @@ -20,6 +20,15 @@ public partial class NetworkCloudRackSkuData : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(NetworkCloudRackSkuData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(ComputeMachines)) @@ -111,22 +100,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NetworkCloudRackSkuData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudStorageApplianceData.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudStorageApplianceData.Serialization.cs index 71d59133b843..4c1445010b8b 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudStorageApplianceData.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudStorageApplianceData.Serialization.cs @@ -21,6 +21,15 @@ public partial class NetworkCloudStorageApplianceData : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,42 +37,9 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(NetworkCloudStorageApplianceData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("extendedLocation"u8); writer.WriteObjectValue(ExtendedLocation, options); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); writer.WritePropertyName("administratorCredentials"u8); @@ -122,22 +98,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M writer.WritePropertyName("storageApplianceSkuId"u8); writer.WriteStringValue(StorageApplianceSkuId); writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NetworkCloudStorageApplianceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudTrunkedNetworkData.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudTrunkedNetworkData.Serialization.cs index 9dd763eed45a..f0f888f4a951 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudTrunkedNetworkData.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudTrunkedNetworkData.Serialization.cs @@ -20,6 +20,15 @@ public partial class NetworkCloudTrunkedNetworkData : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,42 +36,9 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(NetworkCloudTrunkedNetworkData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("extendedLocation"u8); writer.WriteObjectValue(ExtendedLocation, options); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(AssociatedResourceIds)) @@ -155,22 +131,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod } writer.WriteEndArray(); writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NetworkCloudTrunkedNetworkData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudVirtualMachineConsoleData.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudVirtualMachineConsoleData.Serialization.cs index 6a717407beda..055512674a72 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudVirtualMachineConsoleData.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudVirtualMachineConsoleData.Serialization.cs @@ -20,6 +20,15 @@ public partial class NetworkCloudVirtualMachineConsoleData : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,42 +36,9 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(NetworkCloudVirtualMachineConsoleData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("extendedLocation"u8); writer.WriteObjectValue(ExtendedLocation, options); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(DetailedStatus)) @@ -100,22 +76,6 @@ void IJsonModel.Write(Utf8JsonWriter writ writer.WriteStringValue(VirtualMachineAccessId.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NetworkCloudVirtualMachineConsoleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudVirtualMachineData.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudVirtualMachineData.Serialization.cs index 832eb1f927cf..75d50251cf16 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudVirtualMachineData.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudVirtualMachineData.Serialization.cs @@ -20,6 +20,15 @@ public partial class NetworkCloudVirtualMachineData : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,42 +36,9 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(NetworkCloudVirtualMachineData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("extendedLocation"u8); writer.WriteObjectValue(ExtendedLocation, options); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); writer.WritePropertyName("adminUsername"u8); @@ -193,22 +169,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NetworkCloudVirtualMachineData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudVolumeData.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudVolumeData.Serialization.cs index 9cd2c1668d15..294f93b7f72c 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudVolumeData.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudVolumeData.Serialization.cs @@ -20,6 +20,15 @@ public partial class NetworkCloudVolumeData : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,42 +36,9 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(NetworkCloudVolumeData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("extendedLocation"u8); writer.WriteObjectValue(ExtendedLocation, options); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(AttachedTo)) @@ -98,22 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader writer.WritePropertyName("sizeMiB"u8); writer.WriteNumberValue(SizeInMiB); writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NetworkCloudVolumeData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/autorest.md b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/autorest.md index 16356e8ea51f..018973dbbb22 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/autorest.md +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/autorest.md @@ -18,6 +18,7 @@ skip-csproj: true modelerfour: flatten-payloads: false use-model-reader-writer: true +use-write-core: true # mgmt-debug: # show-serialized-names: true diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/CHANGELOG.md b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/CHANGELOG.md index 603fca9b04c8..5755bc951111 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/CHANGELOG.md +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/CHANGELOG.md @@ -4,6 +4,8 @@ ### Features Added +- Exposed `JsonModelWriteCore` for model serialization procedure. + ### Breaking Changes ### Bugs Fixed diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/api/Azure.ResourceManager.NewRelicObservability.netstandard2.0.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/api/Azure.ResourceManager.NewRelicObservability.netstandard2.0.cs index 74eec33803e7..1dfa2e387a23 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/api/Azure.ResourceManager.NewRelicObservability.netstandard2.0.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/api/Azure.ResourceManager.NewRelicObservability.netstandard2.0.cs @@ -21,6 +21,7 @@ public partial class NewRelicMonitoredSubscriptionData : Azure.ResourceManager.M { public NewRelicMonitoredSubscriptionData() { } public Azure.ResourceManager.NewRelicObservability.Models.NewRelicMonitoredSubscriptionProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NewRelicObservability.NewRelicMonitoredSubscriptionData 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.NewRelicObservability.NewRelicMonitoredSubscriptionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -133,6 +134,7 @@ public NewRelicMonitorResourceData(Azure.Core.AzureLocation location) { } public string SaaSAzureSubscriptionStatus { get { throw null; } set { } } public string SubscriptionState { get { throw null; } set { } } public Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityUserInfo UserInfo { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NewRelicObservability.NewRelicMonitorResourceData 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.NewRelicObservability.NewRelicMonitorResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -179,6 +181,7 @@ public NewRelicObservabilityTagRuleData() { } public Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityLogRules LogRules { get { throw null; } set { } } public Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityMetricRules MetricRules { get { throw null; } set { } } public Azure.ResourceManager.NewRelicObservability.Models.NewRelicProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NewRelicObservability.NewRelicObservabilityTagRuleData 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.NewRelicObservability.NewRelicObservabilityTagRuleData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -271,6 +274,7 @@ internal MarketplaceSaaSInfo() { } public string MarketplaceStatus { get { throw null; } } public string MarketplaceSubscriptionId { get { throw null; } } public string MarketplaceSubscriptionName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NewRelicObservability.Models.MarketplaceSaaSInfo 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.NewRelicObservability.Models.MarketplaceSaaSInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -322,6 +326,7 @@ public NewRelicAccountProperties() { } public string OrganizationId { get { throw null; } set { } } public Azure.ResourceManager.NewRelicObservability.Models.NewRelicSingleSignOnProperties SingleSignOnProperties { get { throw null; } set { } } public string UserId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NewRelicObservability.Models.NewRelicAccountProperties 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.NewRelicObservability.Models.NewRelicAccountProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -335,6 +340,7 @@ public NewRelicAccountResourceData() { } public string AccountName { get { throw null; } set { } } public string OrganizationId { get { throw null; } set { } } public Azure.Core.AzureLocation? Region { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NewRelicObservability.Models.NewRelicAccountResourceData 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.NewRelicObservability.Models.NewRelicAccountResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -346,6 +352,7 @@ public partial class NewRelicAppServicesGetContent : System.ClientModel.Primitiv public NewRelicAppServicesGetContent(string userEmail) { } public System.Collections.Generic.IList AzureResourceIds { get { throw null; } } public string UserEmail { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NewRelicObservability.Models.NewRelicAppServicesGetContent 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.NewRelicObservability.Models.NewRelicAppServicesGetContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -357,6 +364,7 @@ public partial class NewRelicBillingInfoResult : System.ClientModel.Primitives.I internal NewRelicBillingInfoResult() { } public Azure.ResourceManager.NewRelicObservability.Models.MarketplaceSaaSInfo MarketplaceSaasInfo { get { throw null; } } public Azure.ResourceManager.NewRelicObservability.Models.PartnerBillingEntity PartnerBillingEntity { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NewRelicObservability.Models.NewRelicBillingInfoResult 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.NewRelicObservability.Models.NewRelicBillingInfoResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -367,6 +375,7 @@ public partial class NewRelicConnectedPartnerResourceInfo : System.ClientModel.P { internal NewRelicConnectedPartnerResourceInfo() { } public Azure.ResourceManager.NewRelicObservability.Models.NewRelicConnectedPartnerResourceProperties Properties { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NewRelicObservability.Models.NewRelicConnectedPartnerResourceInfo 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.NewRelicObservability.Models.NewRelicConnectedPartnerResourceInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -380,6 +389,7 @@ internal NewRelicConnectedPartnerResourceProperties() { } public string AccountName { get { throw null; } } public string AzureResourceId { get { throw null; } } public Azure.Core.AzureLocation? Location { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NewRelicObservability.Models.NewRelicConnectedPartnerResourceProperties 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.NewRelicObservability.Models.NewRelicConnectedPartnerResourceProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -391,6 +401,7 @@ public partial class NewRelicHostsGetContent : System.ClientModel.Primitives.IJs public NewRelicHostsGetContent(string userEmail) { } public string UserEmail { get { throw null; } } public System.Collections.Generic.IList VmIds { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NewRelicObservability.Models.NewRelicHostsGetContent 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.NewRelicObservability.Models.NewRelicHostsGetContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -419,6 +430,7 @@ public partial class NewRelicMetricsContent : System.ClientModel.Primitives.IJso { public NewRelicMetricsContent(string userEmail) { } public string UserEmail { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NewRelicObservability.Models.NewRelicMetricsContent 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.NewRelicObservability.Models.NewRelicMetricsContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -430,6 +442,7 @@ public partial class NewRelicMetricsStatusContent : System.ClientModel.Primitive public NewRelicMetricsStatusContent(string userEmail) { } public System.Collections.Generic.IList AzureResourceIds { get { throw null; } } public string UserEmail { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NewRelicObservability.Models.NewRelicMetricsStatusContent 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.NewRelicObservability.Models.NewRelicMetricsStatusContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -440,6 +453,7 @@ public partial class NewRelicMetricsStatusResult : System.ClientModel.Primitives { internal NewRelicMetricsStatusResult() { } public System.Collections.Generic.IReadOnlyList AzureResourceIds { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NewRelicObservability.Models.NewRelicMetricsStatusResult 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.NewRelicObservability.Models.NewRelicMetricsStatusResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -453,6 +467,7 @@ public NewRelicMonitoredSubscriptionInfo() { } public Azure.ResourceManager.NewRelicObservability.Models.NewRelicMonitoringStatus? Status { get { throw null; } set { } } public string SubscriptionId { get { throw null; } set { } } public Azure.ResourceManager.NewRelicObservability.Models.NewRelicMonitoringTagRules TagRules { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NewRelicObservability.Models.NewRelicMonitoredSubscriptionInfo 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.NewRelicObservability.Models.NewRelicMonitoredSubscriptionInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -465,6 +480,7 @@ public NewRelicMonitoredSubscriptionProperties() { } public System.Collections.Generic.IList MonitoredSubscriptionList { get { throw null; } } public Azure.ResourceManager.NewRelicObservability.Models.MonitoredSubscriptionPatchOperation? PatchOperation { get { throw null; } set { } } public Azure.ResourceManager.NewRelicObservability.Models.NewRelicProvisioningState? ProvisioningState { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NewRelicObservability.Models.NewRelicMonitoredSubscriptionProperties 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.NewRelicObservability.Models.NewRelicMonitoredSubscriptionProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -497,6 +513,7 @@ public NewRelicMonitoringTagRules() { } public Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityLogRules LogRules { get { throw null; } set { } } public Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityMetricRules MetricRules { get { throw null; } set { } } public Azure.ResourceManager.NewRelicObservability.Models.NewRelicProvisioningState? ProvisioningState { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NewRelicObservability.Models.NewRelicMonitoringTagRules 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.NewRelicObservability.Models.NewRelicMonitoringTagRules System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -513,6 +530,7 @@ public NewRelicMonitorResourcePatch() { } public Azure.ResourceManager.NewRelicObservability.Models.NewRelicPlanDetails PlanData { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } public Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityUserInfo UserInfo { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NewRelicObservability.Models.NewRelicMonitorResourcePatch 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.NewRelicObservability.Models.NewRelicMonitorResourcePatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -543,6 +561,7 @@ public NewRelicObservabilityAccountInfo() { } public string AccountId { get { throw null; } set { } } public string IngestionKey { get { throw null; } set { } } public Azure.Core.AzureLocation? Region { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityAccountInfo 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.NewRelicObservability.Models.NewRelicObservabilityAccountInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -555,6 +574,7 @@ internal NewRelicObservabilityAppServiceInfo() { } public string AgentStatus { get { throw null; } } public string AgentVersion { get { throw null; } } public Azure.Core.ResourceIdentifier AzureResourceId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityAppServiceInfo 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.NewRelicObservability.Models.NewRelicObservabilityAppServiceInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -604,6 +624,7 @@ public NewRelicObservabilityFilteringTag() { } public Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityTagAction? Action { get { throw null; } set { } } public string Name { get { throw null; } set { } } public string Value { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityFilteringTag 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.NewRelicObservability.Models.NewRelicObservabilityFilteringTag System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -617,6 +638,7 @@ public NewRelicObservabilityLogRules() { } public Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilitySendAadLogsStatus? SendAadLogs { get { throw null; } set { } } public Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilitySendActivityLogsStatus? SendActivityLogs { get { throw null; } set { } } public Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilitySendSubscriptionLogsStatus? SendSubscriptionLogs { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityLogRules 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.NewRelicObservability.Models.NewRelicObservabilityLogRules System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -647,6 +669,7 @@ public NewRelicObservabilityMetricRules() { } public System.Collections.Generic.IList FilteringTags { get { throw null; } } public Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilitySendMetricsStatus? SendMetrics { get { throw null; } set { } } public string UserEmail { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityMetricRules 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.NewRelicObservability.Models.NewRelicObservabilityMetricRules System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -820,6 +843,7 @@ public partial class NewRelicObservabilityTagRulePatch : System.ClientModel.Prim public NewRelicObservabilityTagRulePatch() { } public Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityLogRules LogRules { get { throw null; } set { } } public Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityMetricRules MetricRules { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityTagRulePatch 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.NewRelicObservability.Models.NewRelicObservabilityTagRulePatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -852,6 +876,7 @@ public NewRelicObservabilityUserInfo() { } public string FirstName { get { throw null; } set { } } public string LastName { get { throw null; } set { } } public string PhoneNumber { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityUserInfo 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.NewRelicObservability.Models.NewRelicObservabilityUserInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -862,6 +887,7 @@ public partial class NewRelicObservabilityVmExtensionPayload : System.ClientMode { internal NewRelicObservabilityVmExtensionPayload() { } public string IngestionKey { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityVmExtensionPayload 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.NewRelicObservability.Models.NewRelicObservabilityVmExtensionPayload System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -874,6 +900,7 @@ internal NewRelicObservabilityVmInfo() { } public string AgentStatus { get { throw null; } } public string AgentVersion { get { throw null; } } public Azure.Core.ResourceIdentifier VmId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityVmInfo 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.NewRelicObservability.Models.NewRelicObservabilityVmInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -886,6 +913,7 @@ public NewRelicOrganizationResourceData() { } public Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityBillingSource? BillingSource { get { throw null; } set { } } public string OrganizationId { get { throw null; } set { } } public string OrganizationName { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NewRelicObservability.Models.NewRelicOrganizationResourceData 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.NewRelicObservability.Models.NewRelicOrganizationResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -898,6 +926,7 @@ public NewRelicPlanData() { } public Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityAccountCreationSource? AccountCreationSource { get { throw null; } set { } } public Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityOrgCreationSource? OrgCreationSource { get { throw null; } set { } } public Azure.ResourceManager.NewRelicObservability.Models.NewRelicPlanDetails PlanData { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NewRelicObservability.Models.NewRelicPlanData 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.NewRelicObservability.Models.NewRelicPlanData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -912,6 +941,7 @@ public NewRelicPlanDetails() { } public string NewRelicPlanBillingCycle { get { throw null; } set { } } public string PlanDetails { get { throw null; } set { } } public Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityUsageType? UsageType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NewRelicObservability.Models.NewRelicPlanDetails 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.NewRelicObservability.Models.NewRelicPlanDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -951,6 +981,7 @@ internal NewRelicResourceMonitorResult() { } public string ReasonForMetricsStatus { get { throw null; } } public Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilitySendingLogsStatus? SendingLogs { get { throw null; } } public Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilitySendingMetricsStatus? SendingMetrics { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NewRelicObservability.Models.NewRelicResourceMonitorResult 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.NewRelicObservability.Models.NewRelicResourceMonitorResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -964,6 +995,7 @@ public NewRelicSingleSignOnProperties() { } public Azure.ResourceManager.NewRelicObservability.Models.NewRelicProvisioningState? ProvisioningState { get { throw null; } set { } } public Azure.ResourceManager.NewRelicObservability.Models.NewRelicSingleSignOnState? SingleSignOnState { get { throw null; } set { } } public System.Uri SingleSignOnUri { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NewRelicObservability.Models.NewRelicSingleSignOnProperties 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.NewRelicObservability.Models.NewRelicSingleSignOnProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -997,6 +1029,7 @@ public NewRelicSwitchBillingContent(string userEmail) { } public string OrganizationId { get { throw null; } set { } } public Azure.ResourceManager.NewRelicObservability.Models.NewRelicPlanDetails PlanData { get { throw null; } set { } } public string UserEmail { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NewRelicObservability.Models.NewRelicSwitchBillingContent 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.NewRelicObservability.Models.NewRelicSwitchBillingContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1008,6 +1041,7 @@ public partial class PartnerBillingEntity : System.ClientModel.Primitives.IJsonM internal PartnerBillingEntity() { } public string OrganizationId { get { throw null; } } public string OrganizationName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NewRelicObservability.Models.PartnerBillingEntity 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.NewRelicObservability.Models.PartnerBillingEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/assets.json b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/assets.json index f4c258698a04..4fc190915252 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/assets.json +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/newrelicobservability/Azure.ResourceManager.NewRelicObservability", - "Tag": "net/newrelicobservability/Azure.ResourceManager.NewRelicObservability_b80257837c" + "Tag": "net/newrelicobservability/Azure.ResourceManager.NewRelicObservability_8df08f6629" } diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/ConnectedPartnerResourcesListResponse.Serialization.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/ConnectedPartnerResourcesListResponse.Serialization.cs index 9067904aad90..1c4ca4592fd4 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/ConnectedPartnerResourcesListResponse.Serialization.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/ConnectedPartnerResourcesListResponse.Serialization.cs @@ -20,6 +20,15 @@ internal partial class ConnectedPartnerResourcesListResponse : IUtf8JsonSerializ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(ConnectedPartnerResourcesListResponse)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } ConnectedPartnerResourcesListResponse IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/LinkedResourceListResponse.Serialization.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/LinkedResourceListResponse.Serialization.cs index ac87944e955d..1e4232e301bf 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/LinkedResourceListResponse.Serialization.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/LinkedResourceListResponse.Serialization.cs @@ -21,6 +21,15 @@ internal partial class LinkedResourceListResponse : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,7 +37,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(LinkedResourceListResponse)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -59,7 +67,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } LinkedResourceListResponse IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/MarketplaceSaaSInfo.Serialization.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/MarketplaceSaaSInfo.Serialization.cs index cfe2b460f78b..b8405474c635 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/MarketplaceSaaSInfo.Serialization.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/MarketplaceSaaSInfo.Serialization.cs @@ -19,6 +19,15 @@ public partial class MarketplaceSaaSInfo : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(MarketplaceSaaSInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(MarketplaceSubscriptionId)) { writer.WritePropertyName("marketplaceSubscriptionId"u8); @@ -67,7 +75,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } MarketplaceSaaSInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/MonitoredSubscriptionPropertiesList.Serialization.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/MonitoredSubscriptionPropertiesList.Serialization.cs index f9d530a877c3..97036cc08923 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/MonitoredSubscriptionPropertiesList.Serialization.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/MonitoredSubscriptionPropertiesList.Serialization.cs @@ -20,6 +20,15 @@ internal partial class MonitoredSubscriptionPropertiesList : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(MonitoredSubscriptionPropertiesList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } MonitoredSubscriptionPropertiesList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicAccountProperties.Serialization.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicAccountProperties.Serialization.cs index 1773c90cb595..cbb3876d8ad3 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicAccountProperties.Serialization.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicAccountProperties.Serialization.cs @@ -19,6 +19,15 @@ public partial class NewRelicAccountProperties : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(NewRelicAccountProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(UserId)) { writer.WritePropertyName("userId"u8); @@ -62,7 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } NewRelicAccountProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicAccountResourceData.Serialization.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicAccountResourceData.Serialization.cs index 32ccb38cbc39..615b074fda31 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicAccountResourceData.Serialization.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicAccountResourceData.Serialization.cs @@ -20,6 +20,15 @@ public partial class NewRelicAccountResourceData : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(NewRelicAccountResourceData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(OrganizationId)) @@ -71,22 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR writer.WriteStringValue(Region.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NewRelicAccountResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicAccountsListResult.Serialization.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicAccountsListResult.Serialization.cs index 69603112eb79..d42d02e4cdfd 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicAccountsListResult.Serialization.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicAccountsListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class NewRelicAccountsListResult : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(NewRelicAccountsListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } NewRelicAccountsListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicAppServicesGetContent.Serialization.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicAppServicesGetContent.Serialization.cs index a28f6a3c3c89..507761057802 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicAppServicesGetContent.Serialization.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicAppServicesGetContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class NewRelicAppServicesGetContent : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(NewRelicAppServicesGetContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(AzureResourceIds)) { writer.WritePropertyName("azureResourceIds"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } NewRelicAppServicesGetContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicAppServicesListResult.Serialization.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicAppServicesListResult.Serialization.cs index cfcf96e5a60d..8fcbb4ba1d35 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicAppServicesListResult.Serialization.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicAppServicesListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class NewRelicAppServicesListResult : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(NewRelicAppServicesListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } NewRelicAppServicesListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicBillingInfoResult.Serialization.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicBillingInfoResult.Serialization.cs index f4ca254b065f..50783e55db70 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicBillingInfoResult.Serialization.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicBillingInfoResult.Serialization.cs @@ -19,6 +19,15 @@ public partial class NewRelicBillingInfoResult : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(NewRelicBillingInfoResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(MarketplaceSaasInfo)) { writer.WritePropertyName("marketplaceSaasInfo"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } NewRelicBillingInfoResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicConnectedPartnerResourceInfo.Serialization.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicConnectedPartnerResourceInfo.Serialization.cs index 7ac37a387f34..fb8e2e60b715 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicConnectedPartnerResourceInfo.Serialization.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicConnectedPartnerResourceInfo.Serialization.cs @@ -19,6 +19,15 @@ public partial class NewRelicConnectedPartnerResourceInfo : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(NewRelicConnectedPartnerResourceInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } NewRelicConnectedPartnerResourceInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicConnectedPartnerResourceProperties.Serialization.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicConnectedPartnerResourceProperties.Serialization.cs index a3127e7b1194..e35b636e7867 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicConnectedPartnerResourceProperties.Serialization.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicConnectedPartnerResourceProperties.Serialization.cs @@ -19,6 +19,15 @@ public partial class NewRelicConnectedPartnerResourceProperties : IUtf8JsonSeria void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(NewRelicConnectedPartnerResourceProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(AccountName)) { writer.WritePropertyName("accountName"u8); @@ -62,7 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } NewRelicConnectedPartnerResourceProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicHostsGetContent.Serialization.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicHostsGetContent.Serialization.cs index 204b9bd522b0..d56f6ecf1728 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicHostsGetContent.Serialization.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicHostsGetContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class NewRelicHostsGetContent : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(NewRelicHostsGetContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(VmIds)) { writer.WritePropertyName("vmIds"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } NewRelicHostsGetContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMetricsContent.Serialization.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMetricsContent.Serialization.cs index 0d574946615f..01e9c99e9a58 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMetricsContent.Serialization.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMetricsContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class NewRelicMetricsContent : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(NewRelicMetricsContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("userEmail"u8); writer.WriteStringValue(UserEmail); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } NewRelicMetricsContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMetricsStatusContent.Serialization.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMetricsStatusContent.Serialization.cs index 721c777db019..37466c229629 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMetricsStatusContent.Serialization.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMetricsStatusContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class NewRelicMetricsStatusContent : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(NewRelicMetricsStatusContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(AzureResourceIds)) { writer.WritePropertyName("azureResourceIds"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } NewRelicMetricsStatusContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMetricsStatusResult.Serialization.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMetricsStatusResult.Serialization.cs index 615e3c2d28d3..394c7a090bdf 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMetricsStatusResult.Serialization.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMetricsStatusResult.Serialization.cs @@ -20,6 +20,15 @@ public partial class NewRelicMetricsStatusResult : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(NewRelicMetricsStatusResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(AzureResourceIds)) { writer.WritePropertyName("azureResourceIds"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } NewRelicMetricsStatusResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMonitorResourceListResult.Serialization.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMonitorResourceListResult.Serialization.cs index 53fa3cc013d5..de51e679a03f 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMonitorResourceListResult.Serialization.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMonitorResourceListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class NewRelicMonitorResourceListResult : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(NewRelicMonitorResourceListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } NewRelicMonitorResourceListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMonitorResourcePatch.Serialization.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMonitorResourcePatch.Serialization.cs index 5c30709f2497..f7c96f0f4848 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMonitorResourcePatch.Serialization.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMonitorResourcePatch.Serialization.cs @@ -19,6 +19,15 @@ public partial class NewRelicMonitorResourcePatch : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(NewRelicMonitorResourcePatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); @@ -86,7 +94,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } NewRelicMonitorResourcePatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMonitoredResourceListResult.Serialization.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMonitoredResourceListResult.Serialization.cs index 3bcaec474307..2d03a22b223b 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMonitoredResourceListResult.Serialization.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMonitoredResourceListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class NewRelicMonitoredResourceListResult : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(NewRelicMonitoredResourceListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } NewRelicMonitoredResourceListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMonitoredSubscriptionInfo.Serialization.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMonitoredSubscriptionInfo.Serialization.cs index e4291c246761..40bd3976a1d4 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMonitoredSubscriptionInfo.Serialization.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMonitoredSubscriptionInfo.Serialization.cs @@ -19,6 +19,15 @@ public partial class NewRelicMonitoredSubscriptionInfo : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(NewRelicMonitoredSubscriptionInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(SubscriptionId)) { writer.WritePropertyName("subscriptionId"u8); @@ -62,7 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } NewRelicMonitoredSubscriptionInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMonitoredSubscriptionProperties.Serialization.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMonitoredSubscriptionProperties.Serialization.cs index 323cd8693ba8..a211cfd92ed9 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMonitoredSubscriptionProperties.Serialization.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMonitoredSubscriptionProperties.Serialization.cs @@ -20,6 +20,15 @@ public partial class NewRelicMonitoredSubscriptionProperties : IUtf8JsonSerializ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter wr throw new FormatException($"The model {nameof(NewRelicMonitoredSubscriptionProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(PatchOperation)) { writer.WritePropertyName("patchOperation"u8); @@ -63,7 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter wr #endif } } - writer.WriteEndObject(); } NewRelicMonitoredSubscriptionProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMonitoringTagRules.Serialization.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMonitoringTagRules.Serialization.cs index 92bbc6dc74e3..e9def09113cb 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMonitoringTagRules.Serialization.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMonitoringTagRules.Serialization.cs @@ -19,6 +19,15 @@ public partial class NewRelicMonitoringTagRules : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(NewRelicMonitoringTagRules)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) { writer.WritePropertyName("provisioningState"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } NewRelicMonitoringTagRules IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityAccountInfo.Serialization.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityAccountInfo.Serialization.cs index dcf13516d076..1329ac31311c 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityAccountInfo.Serialization.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityAccountInfo.Serialization.cs @@ -19,6 +19,15 @@ public partial class NewRelicObservabilityAccountInfo : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(NewRelicObservabilityAccountInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(AccountId)) { writer.WritePropertyName("accountId"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } NewRelicObservabilityAccountInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityAppServiceInfo.Serialization.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityAppServiceInfo.Serialization.cs index 3f8cb260f944..b4257a179b0f 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityAppServiceInfo.Serialization.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityAppServiceInfo.Serialization.cs @@ -19,6 +19,15 @@ public partial class NewRelicObservabilityAppServiceInfo : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(NewRelicObservabilityAppServiceInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(AzureResourceId)) { writer.WritePropertyName("azureResourceId"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } NewRelicObservabilityAppServiceInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityFilteringTag.Serialization.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityFilteringTag.Serialization.cs index 5f7c58584166..fc66d3db22bd 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityFilteringTag.Serialization.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityFilteringTag.Serialization.cs @@ -19,6 +19,15 @@ public partial class NewRelicObservabilityFilteringTag : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(NewRelicObservabilityFilteringTag)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } NewRelicObservabilityFilteringTag IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityLogRules.Serialization.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityLogRules.Serialization.cs index 14c74b2aad4d..e55802e5cc9e 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityLogRules.Serialization.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityLogRules.Serialization.cs @@ -20,6 +20,15 @@ public partial class NewRelicObservabilityLogRules : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(NewRelicObservabilityLogRules)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(SendAadLogs)) { writer.WritePropertyName("sendAadLogs"u8); @@ -68,7 +76,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } NewRelicObservabilityLogRules IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityMetricRules.Serialization.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityMetricRules.Serialization.cs index 570534a8b5de..bdeb389eb898 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityMetricRules.Serialization.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityMetricRules.Serialization.cs @@ -20,6 +20,15 @@ public partial class NewRelicObservabilityMetricRules : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(NewRelicObservabilityMetricRules)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(SendMetrics)) { writer.WritePropertyName("sendMetrics"u8); @@ -63,7 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } NewRelicObservabilityMetricRules IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityOrganizationInfo.Serialization.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityOrganizationInfo.Serialization.cs index 6b3b46a1f2e5..7c13c153eb6c 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityOrganizationInfo.Serialization.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityOrganizationInfo.Serialization.cs @@ -19,6 +19,15 @@ internal partial class NewRelicObservabilityOrganizationInfo : IUtf8JsonSerializ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(NewRelicObservabilityOrganizationInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(OrganizationId)) { writer.WritePropertyName("organizationId"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } NewRelicObservabilityOrganizationInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityTagRuleListResult.Serialization.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityTagRuleListResult.Serialization.cs index 20c899aab0ec..e8a00ad78426 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityTagRuleListResult.Serialization.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityTagRuleListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class NewRelicObservabilityTagRuleListResult : IUtf8JsonSeriali void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(NewRelicObservabilityTagRuleListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } NewRelicObservabilityTagRuleListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityTagRulePatch.Serialization.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityTagRulePatch.Serialization.cs index a4bc310fe90a..62bcbf78d744 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityTagRulePatch.Serialization.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityTagRulePatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class NewRelicObservabilityTagRulePatch : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(NewRelicObservabilityTagRulePatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(LogRules)) @@ -54,7 +62,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } NewRelicObservabilityTagRulePatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityUserInfo.Serialization.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityUserInfo.Serialization.cs index 778ec9369063..a5f057f89382 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityUserInfo.Serialization.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityUserInfo.Serialization.cs @@ -19,6 +19,15 @@ public partial class NewRelicObservabilityUserInfo : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(NewRelicObservabilityUserInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(FirstName)) { writer.WritePropertyName("firstName"u8); @@ -67,7 +75,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } NewRelicObservabilityUserInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityVmExtensionPayload.Serialization.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityVmExtensionPayload.Serialization.cs index dd62511fab62..df7bab022fce 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityVmExtensionPayload.Serialization.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityVmExtensionPayload.Serialization.cs @@ -19,6 +19,15 @@ public partial class NewRelicObservabilityVmExtensionPayload : IUtf8JsonSerializ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter wr throw new FormatException($"The model {nameof(NewRelicObservabilityVmExtensionPayload)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IngestionKey)) { writer.WritePropertyName("ingestionKey"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter wr #endif } } - writer.WriteEndObject(); } NewRelicObservabilityVmExtensionPayload IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityVmHostsListResponse.Serialization.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityVmHostsListResponse.Serialization.cs index f5a0ad32eee8..be9f9676e58e 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityVmHostsListResponse.Serialization.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityVmHostsListResponse.Serialization.cs @@ -20,6 +20,15 @@ internal partial class NewRelicObservabilityVmHostsListResponse : IUtf8JsonSeria void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter w throw new FormatException($"The model {nameof(NewRelicObservabilityVmHostsListResponse)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter w #endif } } - writer.WriteEndObject(); } NewRelicObservabilityVmHostsListResponse IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityVmInfo.Serialization.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityVmInfo.Serialization.cs index 20abb24fd54d..7557a26cc7c0 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityVmInfo.Serialization.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityVmInfo.Serialization.cs @@ -19,6 +19,15 @@ public partial class NewRelicObservabilityVmInfo : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(NewRelicObservabilityVmInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(VmId)) { writer.WritePropertyName("vmId"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } NewRelicObservabilityVmInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicOrganizationResourceData.Serialization.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicOrganizationResourceData.Serialization.cs index ff3c3f95519e..e64c4b83f8ca 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicOrganizationResourceData.Serialization.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicOrganizationResourceData.Serialization.cs @@ -20,6 +20,15 @@ public partial class NewRelicOrganizationResourceData : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(NewRelicOrganizationResourceData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(OrganizationId)) @@ -66,22 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M writer.WriteStringValue(BillingSource.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NewRelicOrganizationResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicOrganizationsListResult.Serialization.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicOrganizationsListResult.Serialization.cs index 8312b302ff3a..4760ced189c8 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicOrganizationsListResult.Serialization.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicOrganizationsListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class NewRelicOrganizationsListResult : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(NewRelicOrganizationsListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } NewRelicOrganizationsListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicPlanData.Serialization.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicPlanData.Serialization.cs index 99ebe67f19bb..2791991e5978 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicPlanData.Serialization.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicPlanData.Serialization.cs @@ -20,6 +20,15 @@ public partial class NewRelicPlanData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(NewRelicPlanData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(PlanData)) @@ -66,22 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter writer.WriteStringValue(AccountCreationSource.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NewRelicPlanData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicPlanDataListResult.Serialization.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicPlanDataListResult.Serialization.cs index 1c4883899efb..35fb65be8fbc 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicPlanDataListResult.Serialization.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicPlanDataListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class NewRelicPlanDataListResult : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(NewRelicPlanDataListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } NewRelicPlanDataListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicPlanDetails.Serialization.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicPlanDetails.Serialization.cs index 4f3afbe1ef77..229601f3a749 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicPlanDetails.Serialization.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicPlanDetails.Serialization.cs @@ -19,6 +19,15 @@ public partial class NewRelicPlanDetails : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(NewRelicPlanDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(UsageType)) { writer.WritePropertyName("usageType"u8); @@ -62,7 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } NewRelicPlanDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicResourceMonitorResult.Serialization.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicResourceMonitorResult.Serialization.cs index 60d1c5559ac2..863bd502a592 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicResourceMonitorResult.Serialization.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicResourceMonitorResult.Serialization.cs @@ -19,6 +19,15 @@ public partial class NewRelicResourceMonitorResult : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(NewRelicResourceMonitorResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -67,7 +75,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } NewRelicResourceMonitorResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicSingleSignOnProperties.Serialization.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicSingleSignOnProperties.Serialization.cs index 241fe8960df0..dd24d99a6ecd 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicSingleSignOnProperties.Serialization.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicSingleSignOnProperties.Serialization.cs @@ -19,6 +19,15 @@ public partial class NewRelicSingleSignOnProperties : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(NewRelicSingleSignOnProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(SingleSignOnState)) { writer.WritePropertyName("singleSignOnState"u8); @@ -62,7 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } NewRelicSingleSignOnProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicSwitchBillingContent.Serialization.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicSwitchBillingContent.Serialization.cs index f0d1b8f6d64d..d1b025c2d74e 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicSwitchBillingContent.Serialization.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicSwitchBillingContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class NewRelicSwitchBillingContent : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(NewRelicSwitchBillingContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(AzureResourceId)) { writer.WritePropertyName("azureResourceId"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } NewRelicSwitchBillingContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/PartnerBillingEntity.Serialization.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/PartnerBillingEntity.Serialization.cs index 5f59b8fca81b..e5329a7a25e3 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/PartnerBillingEntity.Serialization.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/PartnerBillingEntity.Serialization.cs @@ -19,6 +19,15 @@ public partial class PartnerBillingEntity : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(PartnerBillingEntity)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(OrganizationId)) { writer.WritePropertyName("organizationId"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } PartnerBillingEntity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/NewRelicMonitorResourceData.Serialization.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/NewRelicMonitorResourceData.Serialization.cs index f1d5ae782134..f5b73ce89d04 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/NewRelicMonitorResourceData.Serialization.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/NewRelicMonitorResourceData.Serialization.cs @@ -22,6 +22,15 @@ public partial class NewRelicMonitorResourceData : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -29,45 +38,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(NewRelicMonitorResourceData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); JsonSerializer.Serialize(writer, Identity); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) @@ -136,22 +112,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR writer.WriteStringValue(SaaSAzureSubscriptionStatus); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NewRelicMonitorResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/NewRelicMonitoredSubscriptionData.Serialization.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/NewRelicMonitoredSubscriptionData.Serialization.cs index f2ffedd8d89d..9e8f7bf4af79 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/NewRelicMonitoredSubscriptionData.Serialization.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/NewRelicMonitoredSubscriptionData.Serialization.cs @@ -21,6 +21,15 @@ public partial class NewRelicMonitoredSubscriptionData : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,48 +37,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(NewRelicMonitoredSubscriptionData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); writer.WriteObjectValue(Properties, options); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NewRelicMonitoredSubscriptionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/NewRelicObservabilityTagRuleData.Serialization.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/NewRelicObservabilityTagRuleData.Serialization.cs index 5ec472840ea0..a9fdbe3a2f18 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/NewRelicObservabilityTagRuleData.Serialization.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/NewRelicObservabilityTagRuleData.Serialization.cs @@ -21,6 +21,15 @@ public partial class NewRelicObservabilityTagRuleData : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,27 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(NewRelicObservabilityTagRuleData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) @@ -67,22 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M writer.WriteObjectValue(MetricRules, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NewRelicObservabilityTagRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/autorest.md b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/autorest.md index bc370ae4c384..8898e6c0784b 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/autorest.md +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/autorest.md @@ -18,6 +18,7 @@ skip-csproj: true modelerfour: flatten-payloads: false use-model-reader-writer: true +use-write-core: true enable-bicep-serialization: true #mgmt-debug: diff --git a/sdk/nginx/Azure.ResourceManager.Nginx/CHANGELOG.md b/sdk/nginx/Azure.ResourceManager.Nginx/CHANGELOG.md index fd8171f2ceeb..1d8a896e0130 100644 --- a/sdk/nginx/Azure.ResourceManager.Nginx/CHANGELOG.md +++ b/sdk/nginx/Azure.ResourceManager.Nginx/CHANGELOG.md @@ -1,17 +1,16 @@ # Release History -## 1.1.0-beta.2 (Unreleased) +## 1.1.0 (2024-10-23) ### Features Added -- Exposed `JsonModelWriteCore` for model serialization procedure. - -### Breaking Changes - -### Bugs Fixed +- Upgraded api-version tag from 'package-2024-01-01-preview' to 'package-2024-06-01-preview'. Tag detail available at https://github.com/Azure/azure-rest-api-specs/blob/eea7584434f9225cad0327d83d5c6d84257a4d7d/specification/nginx/resource-manager/readme.md + - Added NGINX App Protect Web Application Firewall (WAF) support. ### Other Changes +- Exposed `JsonModelWriteCore` for model serialization procedure. + ## 1.1.0-beta.1 (2024-05-17) ### Features Added diff --git a/sdk/nginx/Azure.ResourceManager.Nginx/src/Azure.ResourceManager.Nginx.csproj b/sdk/nginx/Azure.ResourceManager.Nginx/src/Azure.ResourceManager.Nginx.csproj index 344a32829b9e..92cd9de1f402 100644 --- a/sdk/nginx/Azure.ResourceManager.Nginx/src/Azure.ResourceManager.Nginx.csproj +++ b/sdk/nginx/Azure.ResourceManager.Nginx/src/Azure.ResourceManager.Nginx.csproj @@ -1,6 +1,6 @@ - + - 1.1.0-beta.2 + 1.1.0 Azure.ResourceManager.Nginx diff --git a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/CHANGELOG.md b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/CHANGELOG.md index e94f46bb48dd..a06cc33191a3 100644 --- a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/CHANGELOG.md +++ b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/CHANGELOG.md @@ -1,15 +1,23 @@ # Release History -## 1.3.0-beta.1 (Unreleased) +## 1.3.0-beta.2 (Unreleased) ### Features Added ### Breaking Changes ### Bugs Fixed -- Fix [BUG] Wrong request during the LRO of OperationaIInsights - Cluster - PUT #40606 + ### Other Changes +## 1.3.0-beta.1 (2024-10-15) + +### Features Added + +- Exposed `JsonModelWriteCore` for model serialization procedure. + +### Bugs Fixed +- Fix [BUG] Wrong request during the LRO of OperationaIInsights - Cluster - PUT #40606 ## 1.2.2 (2024-05-07) ### Features Added diff --git a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/api/Azure.ResourceManager.OperationalInsights.netstandard2.0.cs b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/api/Azure.ResourceManager.OperationalInsights.netstandard2.0.cs index 7f5704e9ef56..259b0c65ef1e 100644 --- a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/api/Azure.ResourceManager.OperationalInsights.netstandard2.0.cs +++ b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/api/Azure.ResourceManager.OperationalInsights.netstandard2.0.cs @@ -30,6 +30,7 @@ public LogAnalyticsQueryData() { } public System.BinaryData Properties { get { throw null; } set { } } public Azure.ResourceManager.OperationalInsights.Models.LogAnalyticsQueryRelatedMetadata Related { get { throw null; } set { } } public System.Collections.Generic.IDictionary> Tags { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.OperationalInsights.LogAnalyticsQueryData 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.OperationalInsights.LogAnalyticsQueryData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -60,6 +61,7 @@ public LogAnalyticsQueryPackData(Azure.Core.AzureLocation location) { } public System.DateTimeOffset? ModifiedOn { get { throw null; } } public string ProvisioningState { get { throw null; } } public System.Guid? QueryPackId { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.OperationalInsights.LogAnalyticsQueryPackData 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.OperationalInsights.LogAnalyticsQueryPackData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -147,6 +149,7 @@ public OperationalInsightsClusterData(Azure.Core.AzureLocation location) { } public System.DateTimeOffset? LastModifiedOn { get { throw null; } } public Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsClusterEntityStatus? ProvisioningState { get { throw null; } } public Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsClusterSku Sku { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.OperationalInsights.OperationalInsightsClusterData 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.OperationalInsights.OperationalInsightsClusterData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -206,6 +209,7 @@ public OperationalInsightsDataExportData() { } public System.DateTimeOffset? LastModifiedOn { get { throw null; } set { } } public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } set { } } public System.Collections.Generic.IList TableNames { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.OperationalInsights.OperationalInsightsDataExportData 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.OperationalInsights.OperationalInsightsDataExportData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -252,6 +256,7 @@ public OperationalInsightsDataSourceData(System.BinaryData properties, Azure.Res public Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsDataSourceKind Kind { get { throw null; } set { } } public System.BinaryData Properties { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.OperationalInsights.OperationalInsightsDataSourceData 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.OperationalInsights.OperationalInsightsDataSourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -342,6 +347,7 @@ public OperationalInsightsLinkedServiceData() { } public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } public Azure.Core.ResourceIdentifier WriteAccessResourceId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.OperationalInsights.OperationalInsightsLinkedServiceData 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.OperationalInsights.OperationalInsightsLinkedServiceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -395,6 +401,7 @@ public partial class OperationalInsightsLinkedStorageAccountsData : Azure.Resour public OperationalInsightsLinkedStorageAccountsData() { } public Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsDataSourceType? DataSourceType { get { throw null; } } public System.Collections.Generic.IList StorageAccountIds { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.OperationalInsights.OperationalInsightsLinkedStorageAccountsData 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.OperationalInsights.OperationalInsightsLinkedStorageAccountsData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -448,6 +455,7 @@ public OperationalInsightsSavedSearchData(string category, string displayName, s public string Query { get { throw null; } set { } } public System.Collections.Generic.IList Tags { get { throw null; } } public long? Version { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.OperationalInsights.OperationalInsightsSavedSearchData 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.OperationalInsights.OperationalInsightsSavedSearchData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -511,6 +519,7 @@ public OperationalInsightsTableData() { } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] [System.ObsoleteAttribute("This property is obsolete and will be removed in a future release, please use `IsTotalRetentionInDaysAsDefault` instead", false)] public Azure.ResourceManager.OperationalInsights.Models.TotalRetentionInDaysAsDefaultState? TotalRetentionInDaysAsDefault { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.OperationalInsights.OperationalInsightsTableData 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.OperationalInsights.OperationalInsightsTableData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -575,6 +584,7 @@ public OperationalInsightsWorkspaceData(Azure.Core.AzureLocation location) { } public int? RetentionInDays { get { throw null; } set { } } public Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsWorkspaceSku Sku { get { throw null; } set { } } public Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsWorkspaceCapping WorkspaceCapping { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.OperationalInsights.OperationalInsightsWorkspaceData 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.OperationalInsights.OperationalInsightsWorkspaceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -677,6 +687,7 @@ public StorageInsightData() { } public Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsStorageAccount StorageAccount { get { throw null; } set { } } public System.Collections.Generic.IList Tables { get { throw null; } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.OperationalInsights.StorageInsightData 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.OperationalInsights.StorageInsightData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -798,6 +809,7 @@ public partial class LogAnalyticsQueryPackPatch : System.ClientModel.Primitives. { public LogAnalyticsQueryPackPatch() { } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.OperationalInsights.Models.LogAnalyticsQueryPackPatch 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.OperationalInsights.Models.LogAnalyticsQueryPackPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -810,6 +822,7 @@ public LogAnalyticsQueryRelatedMetadata() { } public System.Collections.Generic.IList Categories { get { throw null; } } public System.Collections.Generic.IList ResourceTypes { get { throw null; } } public System.Collections.Generic.IList Solutions { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.OperationalInsights.Models.LogAnalyticsQueryRelatedMetadata 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.OperationalInsights.Models.LogAnalyticsQueryRelatedMetadata System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -821,6 +834,7 @@ public partial class LogAnalyticsQuerySearchProperties : System.ClientModel.Prim public LogAnalyticsQuerySearchProperties() { } public Azure.ResourceManager.OperationalInsights.Models.LogAnalyticsQuerySearchRelatedMetadata Related { get { throw null; } set { } } public System.Collections.Generic.IDictionary> Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.OperationalInsights.Models.LogAnalyticsQuerySearchProperties 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.OperationalInsights.Models.LogAnalyticsQuerySearchProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -833,6 +847,7 @@ public LogAnalyticsQuerySearchRelatedMetadata() { } public System.Collections.Generic.IList Categories { get { throw null; } } public System.Collections.Generic.IList ResourceTypes { get { throw null; } } public System.Collections.Generic.IList Solutions { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.OperationalInsights.Models.LogAnalyticsQuerySearchRelatedMetadata 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.OperationalInsights.Models.LogAnalyticsQuerySearchRelatedMetadata System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -849,6 +864,7 @@ internal OperationalInsightsAvailableServiceTier() { } public long? MaximumRetention { get { throw null; } } public long? MinimumRetention { get { throw null; } } public Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsSkuName? ServiceTier { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsAvailableServiceTier 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.OperationalInsights.Models.OperationalInsightsAvailableServiceTier System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -878,6 +894,7 @@ public partial class OperationalInsightsCapacityReservationProperties : System.C public OperationalInsightsCapacityReservationProperties() { } public System.DateTimeOffset? LastSkuUpdatedOn { get { throw null; } } public long? MinCapacity { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsCapacityReservationProperties 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.OperationalInsights.Models.OperationalInsightsCapacityReservationProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -891,6 +908,7 @@ public OperationalInsightsClusterAssociatedWorkspace() { } public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } } public System.Guid? WorkspaceId { get { throw null; } } public string WorkspaceName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsClusterAssociatedWorkspace 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.OperationalInsights.Models.OperationalInsightsClusterAssociatedWorkspace System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -935,6 +953,7 @@ public OperationalInsightsClusterPatch() { } public Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsKeyVaultProperties KeyVaultProperties { get { throw null; } set { } } public Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsClusterSku Sku { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsClusterPatch 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.OperationalInsights.Models.OperationalInsightsClusterPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -979,6 +998,7 @@ public OperationalInsightsColumn() { } public bool? IsDefaultDisplay { get { throw null; } } public bool? IsHidden { get { throw null; } } public string Name { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsColumn 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.OperationalInsights.Models.OperationalInsightsColumn System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1132,6 +1152,7 @@ internal OperationalInsightsIntelligencePack() { } public string DisplayName { get { throw null; } } public bool? IsEnabled { get { throw null; } } public string Name { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsIntelligencePack 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.OperationalInsights.Models.OperationalInsightsIntelligencePack System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1145,6 +1166,7 @@ public OperationalInsightsKeyVaultProperties() { } public int? KeyRsaSize { get { throw null; } set { } } public System.Uri KeyVaultUri { get { throw null; } set { } } public string KeyVersion { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsKeyVaultProperties 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.OperationalInsights.Models.OperationalInsightsKeyVaultProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1182,6 +1204,7 @@ internal OperationalInsightsManagementGroup() { } public int? ServerCount { get { throw null; } } public string Sku { get { throw null; } } public string Version { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsManagementGroup 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.OperationalInsights.Models.OperationalInsightsManagementGroup System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1193,6 +1216,7 @@ public partial class OperationalInsightsMetricName : System.ClientModel.Primitiv internal OperationalInsightsMetricName() { } public string LocalizedValue { get { throw null; } } public string Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsMetricName 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.OperationalInsights.Models.OperationalInsightsMetricName System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1204,6 +1228,7 @@ public partial class OperationalInsightsPrivateLinkScopedResourceInfo : System.C internal OperationalInsightsPrivateLinkScopedResourceInfo() { } public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } } public string ScopeId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsPrivateLinkScopedResourceInfo 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.OperationalInsights.Models.OperationalInsightsPrivateLinkScopedResourceInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1242,6 +1267,7 @@ public OperationalInsightsSchema() { } public System.Collections.Generic.IReadOnlyList StandardColumns { get { throw null; } } public Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsTableSubType? TableSubType { get { throw null; } } public Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsTableType? TableType { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsSchema 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.OperationalInsights.Models.OperationalInsightsSchema System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1258,6 +1284,7 @@ internal OperationalInsightsSearchSchemaValue() { } public System.Collections.Generic.IReadOnlyList OwnerType { get { throw null; } } public string SearchSchemaValueType { get { throw null; } } public bool Stored { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsSearchSchemaValue 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.OperationalInsights.Models.OperationalInsightsSearchSchemaValue System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1292,6 +1319,7 @@ public partial class OperationalInsightsStorageAccount : System.ClientModel.Prim public OperationalInsightsStorageAccount(Azure.Core.ResourceIdentifier id, string key) { } public Azure.Core.ResourceIdentifier Id { get { throw null; } set { } } public string Key { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsStorageAccount 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.OperationalInsights.Models.OperationalInsightsStorageAccount System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1361,6 +1389,7 @@ public OperationalInsightsTableRestoredLogs() { } public System.DateTimeOffset? EndRestoreOn { get { throw null; } set { } } public string SourceTable { get { throw null; } set { } } public System.DateTimeOffset? StartRestoreOn { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsTableRestoredLogs 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.OperationalInsights.Models.OperationalInsightsTableRestoredLogs System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1373,6 +1402,7 @@ internal OperationalInsightsTableResultStatistics() { } public int? IngestedRecords { get { throw null; } } public float? Progress { get { throw null; } } public float? ScannedGB { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsTableResultStatistics 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.OperationalInsights.Models.OperationalInsightsTableResultStatistics System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1389,6 +1419,7 @@ public OperationalInsightsTableSearchResults() { } public string Query { get { throw null; } set { } } public string SourceTable { get { throw null; } } public System.DateTimeOffset? StartSearchOn { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsTableSearchResults 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.OperationalInsights.Models.OperationalInsightsTableSearchResults System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1439,6 +1470,7 @@ public partial class OperationalInsightsTag : System.ClientModel.Primitives.IJso public OperationalInsightsTag(string name, string value) { } public string Name { get { throw null; } set { } } public string Value { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsTag 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.OperationalInsights.Models.OperationalInsightsTag System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1454,6 +1486,7 @@ internal OperationalInsightsUsageMetric() { } public System.DateTimeOffset? NextResetOn { get { throw null; } } public string QuotaPeriod { get { throw null; } } public string Unit { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsUsageMetric 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.OperationalInsights.Models.OperationalInsightsUsageMetric System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1477,6 +1510,7 @@ public OperationalInsightsWorkspaceCapping() { } public double? DailyQuotaInGB { get { throw null; } set { } } public Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsDataIngestionStatus? DataIngestionStatus { get { throw null; } } public string QuotaNextResetTime { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsWorkspaceCapping 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.OperationalInsights.Models.OperationalInsightsWorkspaceCapping System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1515,6 +1549,7 @@ public OperationalInsightsWorkspaceFeatures() { } public bool? IsDataExportEnabled { get { throw null; } set { } } public bool? IsLocalAuthDisabled { get { throw null; } set { } } public bool? IsLogAccessUsingOnlyResourcePermissionsEnabled { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsWorkspaceFeatures 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.OperationalInsights.Models.OperationalInsightsWorkspaceFeatures System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1540,6 +1575,7 @@ public OperationalInsightsWorkspacePatch() { } public Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsWorkspaceSku Sku { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } public Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsWorkspaceCapping WorkspaceCapping { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsWorkspacePatch 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.OperationalInsights.Models.OperationalInsightsWorkspacePatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1551,6 +1587,7 @@ public partial class OperationalInsightsWorkspacePurgeContent : System.ClientMod public OperationalInsightsWorkspacePurgeContent(string table, System.Collections.Generic.IEnumerable filters) { } public System.Collections.Generic.IList Filters { get { throw null; } } public string Table { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsWorkspacePurgeContent 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.OperationalInsights.Models.OperationalInsightsWorkspacePurgeContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1564,6 +1601,7 @@ public OperationalInsightsWorkspacePurgeFilter() { } public string Key { get { throw null; } set { } } public string Operator { get { throw null; } set { } } public System.BinaryData Value { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsWorkspacePurgeFilter 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.OperationalInsights.Models.OperationalInsightsWorkspacePurgeFilter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1577,6 +1615,7 @@ internal OperationalInsightsWorkspacePurgeResult() { } [System.ObsoleteAttribute("This property has been replaced by ResourceUriString", false)] public System.Guid OperationId { get { throw null; } } public string OperationStringId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsWorkspacePurgeResult 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.OperationalInsights.Models.OperationalInsightsWorkspacePurgeResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1605,6 +1644,7 @@ public partial class OperationalInsightsWorkspacePurgeStatusResult : System.Clie { internal OperationalInsightsWorkspacePurgeStatusResult() { } public Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsWorkspacePurgeState Status { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsWorkspacePurgeStatusResult 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.OperationalInsights.Models.OperationalInsightsWorkspacePurgeStatusResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1616,6 +1656,7 @@ public partial class OperationalInsightsWorkspaceSharedKeys : System.ClientModel internal OperationalInsightsWorkspaceSharedKeys() { } public string PrimarySharedKey { get { throw null; } } public string SecondarySharedKey { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsWorkspaceSharedKeys 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.OperationalInsights.Models.OperationalInsightsWorkspaceSharedKeys System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1628,6 +1669,7 @@ public OperationalInsightsWorkspaceSku(Azure.ResourceManager.OperationalInsights public Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsWorkspaceCapacityReservationLevel? CapacityReservationLevel { get { throw null; } set { } } public System.DateTimeOffset? LastSkuUpdatedOn { get { throw null; } } public Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsWorkspaceSkuName Name { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsWorkspaceSku 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.OperationalInsights.Models.OperationalInsightsWorkspaceSku System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1699,6 +1741,7 @@ public partial class StorageInsightStatus : System.ClientModel.Primitives.IJsonM internal StorageInsightStatus() { } public string Description { get { throw null; } } public Azure.ResourceManager.OperationalInsights.Models.StorageInsightState State { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.OperationalInsights.Models.StorageInsightStatus 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.OperationalInsights.Models.StorageInsightStatus System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } diff --git a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/assets.json b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/assets.json index 2701cf119981..c377a555db2b 100644 --- a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/assets.json +++ b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/operationalinsights/Azure.ResourceManager.OperationalInsights", - "Tag": "net/operationalinsights/Azure.ResourceManager.OperationalInsights_676a0cceed" + "Tag": "net/operationalinsights/Azure.ResourceManager.OperationalInsights_d5fdec293c" } diff --git a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/samples/Generated/Samples/Sample_LogAnalyticsQueryPackResource.cs b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/samples/Generated/Samples/Sample_LogAnalyticsQueryPackResource.cs index 779ecb824c2a..c0759bcda93a 100644 --- a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/samples/Generated/Samples/Sample_LogAnalyticsQueryPackResource.cs +++ b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/samples/Generated/Samples/Sample_LogAnalyticsQueryPackResource.cs @@ -252,7 +252,7 @@ public async Task SearchQueries_QuerySearch() }, }, }; - long? top = 3; + long? top = 3L; bool? includeBody = true; await foreach (LogAnalyticsQueryResource item in logAnalyticsQueryPack.SearchQueriesAsync(querySearchProperties, top: top, includeBody: includeBody)) { diff --git a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/samples/Generated/Samples/Sample_OperationalInsightsSavedSearchCollection.cs b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/samples/Generated/Samples/Sample_OperationalInsightsSavedSearchCollection.cs index 9b607ea03f8c..7d0c9fb39afc 100644 --- a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/samples/Generated/Samples/Sample_OperationalInsightsSavedSearchCollection.cs +++ b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/samples/Generated/Samples/Sample_OperationalInsightsSavedSearchCollection.cs @@ -45,7 +45,7 @@ public async Task CreateOrUpdate_SavedSearchCreateOrUpdate() { FunctionAlias = "heartbeat_func", FunctionParameters = "a:int=1", - Version = 2, + Version = 2L, Tags = { new OperationalInsightsTag("Group","Computer") diff --git a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/samples/Generated/Samples/Sample_OperationalInsightsSavedSearchResource.cs b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/samples/Generated/Samples/Sample_OperationalInsightsSavedSearchResource.cs index a6285cfd0034..edfb49853f93 100644 --- a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/samples/Generated/Samples/Sample_OperationalInsightsSavedSearchResource.cs +++ b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/samples/Generated/Samples/Sample_OperationalInsightsSavedSearchResource.cs @@ -70,7 +70,7 @@ public async Task Update_SavedSearchCreateOrUpdate() { FunctionAlias = "heartbeat_func", FunctionParameters = "a:int=1", - Version = 2, + Version = 2L, Tags = { new OperationalInsightsTag("Group","Computer") diff --git a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Azure.ResourceManager.OperationalInsights.csproj b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Azure.ResourceManager.OperationalInsights.csproj index bded733b28e2..3b149152a9f3 100644 --- a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Azure.ResourceManager.OperationalInsights.csproj +++ b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Azure.ResourceManager.OperationalInsights.csproj @@ -1,6 +1,6 @@ - 1.3.0-beta.1 + 1.3.0-beta.2 1.2.2 Azure.ResourceManager.OperationalInsights diff --git a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/LogAnalyticsQueryData.Serialization.cs b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/LogAnalyticsQueryData.Serialization.cs index ec2973bc3bdf..da2856a20473 100644 --- a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/LogAnalyticsQueryData.Serialization.cs +++ b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/LogAnalyticsQueryData.Serialization.cs @@ -22,6 +22,15 @@ public partial class LogAnalyticsQueryData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -29,27 +38,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(LogAnalyticsQueryData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ApplicationId)) @@ -126,22 +115,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } LogAnalyticsQueryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/LogAnalyticsQueryPackData.Serialization.cs b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/LogAnalyticsQueryPackData.Serialization.cs index 4a96e5121efa..337bc3123f5c 100644 --- a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/LogAnalyticsQueryPackData.Serialization.cs +++ b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/LogAnalyticsQueryPackData.Serialization.cs @@ -21,6 +21,15 @@ public partial class LogAnalyticsQueryPackData : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,40 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(LogAnalyticsQueryPackData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(QueryPackId)) @@ -85,22 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea writer.WriteStringValue(ProvisioningState); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } LogAnalyticsQueryPackData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/ClusterListResult.Serialization.cs b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/ClusterListResult.Serialization.cs index a556653cf720..c04cf127dcd5 100644 --- a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/ClusterListResult.Serialization.cs +++ b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/ClusterListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class ClusterListResult : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(ClusterListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } ClusterListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/DataExportListResult.Serialization.cs b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/DataExportListResult.Serialization.cs index 9e92b4fc8381..21026705af98 100644 --- a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/DataExportListResult.Serialization.cs +++ b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/DataExportListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class DataExportListResult : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(DataExportListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } DataExportListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/DataSourceListResult.Serialization.cs b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/DataSourceListResult.Serialization.cs index 3a2deb8abc28..cff7a2614c75 100644 --- a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/DataSourceListResult.Serialization.cs +++ b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/DataSourceListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class DataSourceListResult : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(DataSourceListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } DataSourceListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/LinkedServiceListResult.Serialization.cs b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/LinkedServiceListResult.Serialization.cs index 968d695db2c9..7b0bc8f7fdee 100644 --- a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/LinkedServiceListResult.Serialization.cs +++ b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/LinkedServiceListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class LinkedServiceListResult : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(LinkedServiceListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } LinkedServiceListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/LinkedStorageAccountsListResult.Serialization.cs b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/LinkedStorageAccountsListResult.Serialization.cs index e7122293b2b1..b221acc0cc62 100644 --- a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/LinkedStorageAccountsListResult.Serialization.cs +++ b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/LinkedStorageAccountsListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class LinkedStorageAccountsListResult : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(LinkedStorageAccountsListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } LinkedStorageAccountsListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/LogAnalyticsQueryPackListResult.Serialization.cs b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/LogAnalyticsQueryPackListResult.Serialization.cs index 32229686af4e..5a6d711d3811 100644 --- a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/LogAnalyticsQueryPackListResult.Serialization.cs +++ b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/LogAnalyticsQueryPackListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class LogAnalyticsQueryPackListResult : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(LogAnalyticsQueryPackListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } LogAnalyticsQueryPackListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/LogAnalyticsQueryPackPatch.Serialization.cs b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/LogAnalyticsQueryPackPatch.Serialization.cs index 9cdd630941ee..9660d54b10b5 100644 --- a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/LogAnalyticsQueryPackPatch.Serialization.cs +++ b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/LogAnalyticsQueryPackPatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class LogAnalyticsQueryPackPatch : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(LogAnalyticsQueryPackPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } LogAnalyticsQueryPackPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/LogAnalyticsQueryPackQueryListResult.Serialization.cs b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/LogAnalyticsQueryPackQueryListResult.Serialization.cs index b85ee57ac1a7..9be8249795c9 100644 --- a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/LogAnalyticsQueryPackQueryListResult.Serialization.cs +++ b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/LogAnalyticsQueryPackQueryListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class LogAnalyticsQueryPackQueryListResult : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(LogAnalyticsQueryPackQueryListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } LogAnalyticsQueryPackQueryListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/LogAnalyticsQueryRelatedMetadata.Serialization.cs b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/LogAnalyticsQueryRelatedMetadata.Serialization.cs index 670deca0cb30..00dceb80d5df 100644 --- a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/LogAnalyticsQueryRelatedMetadata.Serialization.cs +++ b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/LogAnalyticsQueryRelatedMetadata.Serialization.cs @@ -20,6 +20,15 @@ public partial class LogAnalyticsQueryRelatedMetadata : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(LogAnalyticsQueryRelatedMetadata)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Categories)) { writer.WritePropertyName("categories"u8); @@ -73,7 +81,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } LogAnalyticsQueryRelatedMetadata IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/LogAnalyticsQuerySearchProperties.Serialization.cs b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/LogAnalyticsQuerySearchProperties.Serialization.cs index 921c9258d49c..5fb74d0ce08b 100644 --- a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/LogAnalyticsQuerySearchProperties.Serialization.cs +++ b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/LogAnalyticsQuerySearchProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class LogAnalyticsQuerySearchProperties : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(LogAnalyticsQuerySearchProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Related)) { writer.WritePropertyName("related"u8); @@ -67,7 +75,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } LogAnalyticsQuerySearchProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/LogAnalyticsQuerySearchRelatedMetadata.Serialization.cs b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/LogAnalyticsQuerySearchRelatedMetadata.Serialization.cs index ac2074fc0664..1d019276f675 100644 --- a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/LogAnalyticsQuerySearchRelatedMetadata.Serialization.cs +++ b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/LogAnalyticsQuerySearchRelatedMetadata.Serialization.cs @@ -18,6 +18,15 @@ public partial class LogAnalyticsQuerySearchRelatedMetadata : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(LogAnalyticsQuerySearchRelatedMetadata)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Categories)) { writer.WritePropertyName("categories"u8); @@ -71,7 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } LogAnalyticsQuerySearchRelatedMetadata IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsAvailableServiceTier.Serialization.cs b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsAvailableServiceTier.Serialization.cs index cf0cf00c681f..cfa5f4b03955 100644 --- a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsAvailableServiceTier.Serialization.cs +++ b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsAvailableServiceTier.Serialization.cs @@ -19,6 +19,15 @@ public partial class OperationalInsightsAvailableServiceTier : IUtf8JsonSerializ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter wr throw new FormatException($"The model {nameof(OperationalInsightsAvailableServiceTier)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ServiceTier)) { writer.WritePropertyName("serviceTier"u8); @@ -77,7 +85,6 @@ void IJsonModel.Write(Utf8JsonWriter wr #endif } } - writer.WriteEndObject(); } OperationalInsightsAvailableServiceTier IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsCapacityReservationProperties.Serialization.cs b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsCapacityReservationProperties.Serialization.cs index 68642dca7467..501ff33496c6 100644 --- a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsCapacityReservationProperties.Serialization.cs +++ b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsCapacityReservationProperties.Serialization.cs @@ -19,6 +19,15 @@ public partial class OperationalInsightsCapacityReservationProperties : IUtf8Jso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8Json throw new FormatException($"The model {nameof(OperationalInsightsCapacityReservationProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(LastSkuUpdatedOn)) { writer.WritePropertyName("lastSkuUpdate"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8Json #endif } } - writer.WriteEndObject(); } OperationalInsightsCapacityReservationProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsClusterAssociatedWorkspace.Serialization.cs b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsClusterAssociatedWorkspace.Serialization.cs index d7eb336b999d..8275aa4d9f17 100644 --- a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsClusterAssociatedWorkspace.Serialization.cs +++ b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsClusterAssociatedWorkspace.Serialization.cs @@ -19,6 +19,15 @@ public partial class OperationalInsightsClusterAssociatedWorkspace : IUtf8JsonSe void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWri throw new FormatException($"The model {nameof(OperationalInsightsClusterAssociatedWorkspace)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(WorkspaceId)) { writer.WritePropertyName("workspaceId"u8); @@ -62,7 +70,6 @@ void IJsonModel.Write(Utf8JsonWri #endif } } - writer.WriteEndObject(); } OperationalInsightsClusterAssociatedWorkspace IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsClusterPatch.Serialization.cs b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsClusterPatch.Serialization.cs index 0d395c3e3c51..c2e5a127d88d 100644 --- a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsClusterPatch.Serialization.cs +++ b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsClusterPatch.Serialization.cs @@ -19,6 +19,15 @@ public partial class OperationalInsightsClusterPatch : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(OperationalInsightsClusterPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); @@ -76,7 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } OperationalInsightsClusterPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsColumn.Serialization.cs b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsColumn.Serialization.cs index f180b8643d8b..9be3b1df3dde 100644 --- a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsColumn.Serialization.cs +++ b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsColumn.Serialization.cs @@ -19,6 +19,15 @@ public partial class OperationalInsightsColumn : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(OperationalInsightsColumn)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -77,7 +85,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } OperationalInsightsColumn IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsIntelligencePack.Serialization.cs b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsIntelligencePack.Serialization.cs index 93dcc867a75c..101cf51f925b 100644 --- a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsIntelligencePack.Serialization.cs +++ b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsIntelligencePack.Serialization.cs @@ -19,6 +19,15 @@ public partial class OperationalInsightsIntelligencePack : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(OperationalInsightsIntelligencePack)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } OperationalInsightsIntelligencePack IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsKeyVaultProperties.Serialization.cs b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsKeyVaultProperties.Serialization.cs index 87b6629b45fb..c310307f4db2 100644 --- a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsKeyVaultProperties.Serialization.cs +++ b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsKeyVaultProperties.Serialization.cs @@ -19,6 +19,15 @@ public partial class OperationalInsightsKeyVaultProperties : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(OperationalInsightsKeyVaultProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(KeyVaultUri)) { writer.WritePropertyName("keyVaultUri"u8); @@ -62,7 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } OperationalInsightsKeyVaultProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsManagementGroup.Serialization.cs b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsManagementGroup.Serialization.cs index cb540a16347b..a186bba4158c 100644 --- a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsManagementGroup.Serialization.cs +++ b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsManagementGroup.Serialization.cs @@ -19,6 +19,15 @@ public partial class OperationalInsightsManagementGroup : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(OperationalInsightsManagementGroup)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(ServerCount)) @@ -85,7 +93,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } OperationalInsightsManagementGroup IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsMetricName.Serialization.cs b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsMetricName.Serialization.cs index d7c8da7a4cea..1b45ceec3aad 100644 --- a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsMetricName.Serialization.cs +++ b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsMetricName.Serialization.cs @@ -19,6 +19,15 @@ public partial class OperationalInsightsMetricName : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(OperationalInsightsMetricName)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Value)) { writer.WritePropertyName("value"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } OperationalInsightsMetricName IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsPrivateLinkScopedResourceInfo.Serialization.cs b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsPrivateLinkScopedResourceInfo.Serialization.cs index e882aa595f70..06da2cc6f93f 100644 --- a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsPrivateLinkScopedResourceInfo.Serialization.cs +++ b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsPrivateLinkScopedResourceInfo.Serialization.cs @@ -19,6 +19,15 @@ public partial class OperationalInsightsPrivateLinkScopedResourceInfo : IUtf8Jso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8Json throw new FormatException($"The model {nameof(OperationalInsightsPrivateLinkScopedResourceInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ResourceId)) { writer.WritePropertyName("resourceId"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8Json #endif } } - writer.WriteEndObject(); } OperationalInsightsPrivateLinkScopedResourceInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsSchema.Serialization.cs b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsSchema.Serialization.cs index 49586bd862f9..8ed889aac4e1 100644 --- a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsSchema.Serialization.cs +++ b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsSchema.Serialization.cs @@ -20,6 +20,15 @@ public partial class OperationalInsightsSchema : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(OperationalInsightsSchema)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -123,7 +131,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } OperationalInsightsSchema IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsSearchCoreSummary.Serialization.cs b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsSearchCoreSummary.Serialization.cs index 8b549ef649db..b6da0ea96e20 100644 --- a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsSearchCoreSummary.Serialization.cs +++ b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsSearchCoreSummary.Serialization.cs @@ -19,6 +19,15 @@ internal partial class OperationalInsightsSearchCoreSummary : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(OperationalInsightsSearchCoreSummary)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Status)) { writer.WritePropertyName("status"u8); @@ -49,7 +57,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } OperationalInsightsSearchCoreSummary IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsSearchSchemaValue.Serialization.cs b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsSearchSchemaValue.Serialization.cs index a9c043a46fce..5c1a9155076d 100644 --- a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsSearchSchemaValue.Serialization.cs +++ b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsSearchSchemaValue.Serialization.cs @@ -20,6 +20,15 @@ public partial class OperationalInsightsSearchSchemaValue : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(OperationalInsightsSearchSchemaValue)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -74,7 +82,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } OperationalInsightsSearchSchemaValue IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsStorageAccount.Serialization.cs b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsStorageAccount.Serialization.cs index 7c49e44d2238..854ebe7eee88 100644 --- a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsStorageAccount.Serialization.cs +++ b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsStorageAccount.Serialization.cs @@ -19,6 +19,15 @@ public partial class OperationalInsightsStorageAccount : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(OperationalInsightsStorageAccount)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("id"u8); writer.WriteStringValue(Id); writer.WritePropertyName("key"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } OperationalInsightsStorageAccount IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsTableRestoredLogs.Serialization.cs b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsTableRestoredLogs.Serialization.cs index 55e4709d3c46..05bd474c7e79 100644 --- a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsTableRestoredLogs.Serialization.cs +++ b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsTableRestoredLogs.Serialization.cs @@ -19,6 +19,15 @@ public partial class OperationalInsightsTableRestoredLogs : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(OperationalInsightsTableRestoredLogs)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(StartRestoreOn)) { writer.WritePropertyName("startRestoreTime"u8); @@ -62,7 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } OperationalInsightsTableRestoredLogs IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsTableResultStatistics.Serialization.cs b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsTableResultStatistics.Serialization.cs index f9c9df1763b5..5748c8a6269b 100644 --- a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsTableResultStatistics.Serialization.cs +++ b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsTableResultStatistics.Serialization.cs @@ -19,6 +19,15 @@ public partial class OperationalInsightsTableResultStatistics : IUtf8JsonSeriali void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter w throw new FormatException($"The model {nameof(OperationalInsightsTableResultStatistics)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Progress)) { writer.WritePropertyName("progress"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter w #endif } } - writer.WriteEndObject(); } OperationalInsightsTableResultStatistics IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsTableSearchResults.Serialization.cs b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsTableSearchResults.Serialization.cs index 5ecc91950059..87df380fb1da 100644 --- a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsTableSearchResults.Serialization.cs +++ b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsTableSearchResults.Serialization.cs @@ -19,6 +19,15 @@ public partial class OperationalInsightsTableSearchResults : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(OperationalInsightsTableSearchResults)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Query)) { writer.WritePropertyName("query"u8); @@ -77,7 +85,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } OperationalInsightsTableSearchResults IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsTag.Serialization.cs b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsTag.Serialization.cs index 30ed5a8be89b..66a7deae5c01 100644 --- a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsTag.Serialization.cs +++ b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsTag.Serialization.cs @@ -19,6 +19,15 @@ public partial class OperationalInsightsTag : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(OperationalInsightsTag)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); writer.WritePropertyName("value"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } OperationalInsightsTag IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsUsageMetric.Serialization.cs b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsUsageMetric.Serialization.cs index 5dcf2a2af6c7..d525ce67dd26 100644 --- a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsUsageMetric.Serialization.cs +++ b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsUsageMetric.Serialization.cs @@ -19,6 +19,15 @@ public partial class OperationalInsightsUsageMetric : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(OperationalInsightsUsageMetric)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -72,7 +80,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } OperationalInsightsUsageMetric IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsWorkspaceCapping.Serialization.cs b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsWorkspaceCapping.Serialization.cs index 5d7233f6101a..e7ffdc02cbdb 100644 --- a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsWorkspaceCapping.Serialization.cs +++ b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsWorkspaceCapping.Serialization.cs @@ -19,6 +19,15 @@ public partial class OperationalInsightsWorkspaceCapping : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(OperationalInsightsWorkspaceCapping)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(DailyQuotaInGB)) { writer.WritePropertyName("dailyQuotaGb"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } OperationalInsightsWorkspaceCapping IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsWorkspaceFeatures.Serialization.cs b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsWorkspaceFeatures.Serialization.cs index 7a3a3168dc0e..20efea5906b8 100644 --- a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsWorkspaceFeatures.Serialization.cs +++ b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsWorkspaceFeatures.Serialization.cs @@ -19,6 +19,15 @@ public partial class OperationalInsightsWorkspaceFeatures : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(OperationalInsightsWorkspaceFeatures)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IsDataExportEnabled)) { if (IsDataExportEnabled != null) @@ -99,7 +107,6 @@ void IJsonModel.Write(Utf8JsonWriter write } #endif } - writer.WriteEndObject(); } OperationalInsightsWorkspaceFeatures IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsWorkspacePatch.Serialization.cs b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsWorkspacePatch.Serialization.cs index e5d1f393f003..edb14126b164 100644 --- a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsWorkspacePatch.Serialization.cs +++ b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsWorkspacePatch.Serialization.cs @@ -21,6 +21,15 @@ public partial class OperationalInsightsWorkspacePatch : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,7 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(OperationalInsightsWorkspacePatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); @@ -50,26 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) @@ -150,22 +139,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteStringValue(DefaultDataCollectionRuleResourceId); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } OperationalInsightsWorkspacePatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsWorkspacePurgeContent.Serialization.cs b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsWorkspacePurgeContent.Serialization.cs index c0f33831e7dc..3a0f55c9b239 100644 --- a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsWorkspacePurgeContent.Serialization.cs +++ b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsWorkspacePurgeContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class OperationalInsightsWorkspacePurgeContent : IUtf8JsonSeriali void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter w throw new FormatException($"The model {nameof(OperationalInsightsWorkspacePurgeContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("table"u8); writer.WriteStringValue(Table); writer.WritePropertyName("filters"u8); @@ -50,7 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter w #endif } } - writer.WriteEndObject(); } OperationalInsightsWorkspacePurgeContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsWorkspacePurgeFilter.Serialization.cs b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsWorkspacePurgeFilter.Serialization.cs index 2a16858f45dd..ed1160813764 100644 --- a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsWorkspacePurgeFilter.Serialization.cs +++ b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsWorkspacePurgeFilter.Serialization.cs @@ -18,6 +18,15 @@ public partial class OperationalInsightsWorkspacePurgeFilter : IUtf8JsonSerializ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wr throw new FormatException($"The model {nameof(OperationalInsightsWorkspacePurgeFilter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Column)) { writer.WritePropertyName("column"u8); @@ -68,7 +76,6 @@ void IJsonModel.Write(Utf8JsonWriter wr #endif } } - writer.WriteEndObject(); } OperationalInsightsWorkspacePurgeFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsWorkspacePurgeResult.Serialization.cs b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsWorkspacePurgeResult.Serialization.cs index ef26b8ee3241..3cbd34ae3d44 100644 --- a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsWorkspacePurgeResult.Serialization.cs +++ b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsWorkspacePurgeResult.Serialization.cs @@ -19,6 +19,15 @@ public partial class OperationalInsightsWorkspacePurgeResult : IUtf8JsonSerializ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter wr throw new FormatException($"The model {nameof(OperationalInsightsWorkspacePurgeResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("operationId"u8); writer.WriteStringValue(OperationStringId); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -44,7 +52,6 @@ void IJsonModel.Write(Utf8JsonWriter wr #endif } } - writer.WriteEndObject(); } OperationalInsightsWorkspacePurgeResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsWorkspacePurgeStatusResult.Serialization.cs b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsWorkspacePurgeStatusResult.Serialization.cs index 9094f58b176f..25759ebc3703 100644 --- a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsWorkspacePurgeStatusResult.Serialization.cs +++ b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsWorkspacePurgeStatusResult.Serialization.cs @@ -19,6 +19,15 @@ public partial class OperationalInsightsWorkspacePurgeStatusResult : IUtf8JsonSe void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWri throw new FormatException($"The model {nameof(OperationalInsightsWorkspacePurgeStatusResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("status"u8); writer.WriteStringValue(Status.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -44,7 +52,6 @@ void IJsonModel.Write(Utf8JsonWri #endif } } - writer.WriteEndObject(); } OperationalInsightsWorkspacePurgeStatusResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsWorkspaceSharedKeys.Serialization.cs b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsWorkspaceSharedKeys.Serialization.cs index e0febe14b8be..e0d30e05c091 100644 --- a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsWorkspaceSharedKeys.Serialization.cs +++ b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsWorkspaceSharedKeys.Serialization.cs @@ -19,6 +19,15 @@ public partial class OperationalInsightsWorkspaceSharedKeys : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(OperationalInsightsWorkspaceSharedKeys)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(PrimarySharedKey)) { writer.WritePropertyName("primarySharedKey"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } OperationalInsightsWorkspaceSharedKeys IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsWorkspaceSku.Serialization.cs b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsWorkspaceSku.Serialization.cs index f37f843ee9fe..3e9e300e1e1d 100644 --- a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsWorkspaceSku.Serialization.cs +++ b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/OperationalInsightsWorkspaceSku.Serialization.cs @@ -19,6 +19,15 @@ public partial class OperationalInsightsWorkspaceSku : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(OperationalInsightsWorkspaceSku)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name.ToString()); if (Optional.IsDefined(CapacityReservationLevel)) @@ -54,7 +62,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } OperationalInsightsWorkspaceSku IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/SavedSearchesListResult.Serialization.cs b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/SavedSearchesListResult.Serialization.cs index b575d88a65c6..772664910207 100644 --- a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/SavedSearchesListResult.Serialization.cs +++ b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/SavedSearchesListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class SavedSearchesListResult : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(SavedSearchesListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } SavedSearchesListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/SearchGetSchemaResponse.Serialization.cs b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/SearchGetSchemaResponse.Serialization.cs index 283496991a2e..503849939ee1 100644 --- a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/SearchGetSchemaResponse.Serialization.cs +++ b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/SearchGetSchemaResponse.Serialization.cs @@ -20,6 +20,15 @@ internal partial class SearchGetSchemaResponse : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(SearchGetSchemaResponse)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Metadata)) { writer.WritePropertyName("metadata"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } SearchGetSchemaResponse IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/SearchMetadata.Serialization.cs b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/SearchMetadata.Serialization.cs index eebcfa328cd8..ed41507c9278 100644 --- a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/SearchMetadata.Serialization.cs +++ b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/SearchMetadata.Serialization.cs @@ -20,6 +20,15 @@ internal partial class SearchMetadata : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(SearchMetadata)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(SearchId)) { writer.WritePropertyName("requestId"u8); @@ -138,7 +146,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp #endif } } - writer.WriteEndObject(); } SearchMetadata IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/SearchMetadataSchema.Serialization.cs b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/SearchMetadataSchema.Serialization.cs index 7573da4d931b..fee4fc4612a9 100644 --- a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/SearchMetadataSchema.Serialization.cs +++ b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/SearchMetadataSchema.Serialization.cs @@ -19,6 +19,15 @@ internal partial class SearchMetadataSchema : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(SearchMetadataSchema)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } SearchMetadataSchema IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/SearchSort.Serialization.cs b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/SearchSort.Serialization.cs index f654a929dd7c..899246360b32 100644 --- a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/SearchSort.Serialization.cs +++ b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/SearchSort.Serialization.cs @@ -19,6 +19,15 @@ internal partial class SearchSort : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOption throw new FormatException($"The model {nameof(SearchSort)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOption #endif } } - writer.WriteEndObject(); } SearchSort IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/StorageInsightListResult.Serialization.cs b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/StorageInsightListResult.Serialization.cs index 7929e6f5c9ce..29771b2e977f 100644 --- a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/StorageInsightListResult.Serialization.cs +++ b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/StorageInsightListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class StorageInsightListResult : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(StorageInsightListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } StorageInsightListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/StorageInsightStatus.Serialization.cs b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/StorageInsightStatus.Serialization.cs index e9b51c7ebcfa..0977f245aeb9 100644 --- a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/StorageInsightStatus.Serialization.cs +++ b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/StorageInsightStatus.Serialization.cs @@ -19,6 +19,15 @@ public partial class StorageInsightStatus : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(StorageInsightStatus)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("state"u8); writer.WriteStringValue(State.ToString()); if (Optional.IsDefined(Description)) @@ -49,7 +57,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } StorageInsightStatus IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/TablesListResult.Serialization.cs b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/TablesListResult.Serialization.cs index d839a5952931..9ce0c1eaeb2d 100644 --- a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/TablesListResult.Serialization.cs +++ b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/TablesListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class TablesListResult : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(TablesListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } TablesListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/WorkspaceListManagementGroupsResult.Serialization.cs b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/WorkspaceListManagementGroupsResult.Serialization.cs index 649d27646c2f..307860a87ca9 100644 --- a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/WorkspaceListManagementGroupsResult.Serialization.cs +++ b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/WorkspaceListManagementGroupsResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class WorkspaceListManagementGroupsResult : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(WorkspaceListManagementGroupsResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } WorkspaceListManagementGroupsResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/WorkspaceListResult.Serialization.cs b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/WorkspaceListResult.Serialization.cs index 847ad96d1147..39c67f5d3a75 100644 --- a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/WorkspaceListResult.Serialization.cs +++ b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/WorkspaceListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class WorkspaceListResult : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(WorkspaceListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } WorkspaceListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/WorkspaceListUsagesResult.Serialization.cs b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/WorkspaceListUsagesResult.Serialization.cs index 192c2877b112..ef76c92c8677 100644 --- a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/WorkspaceListUsagesResult.Serialization.cs +++ b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/WorkspaceListUsagesResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class WorkspaceListUsagesResult : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(WorkspaceListUsagesResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } WorkspaceListUsagesResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/OperationalInsightsClusterData.Serialization.cs b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/OperationalInsightsClusterData.Serialization.cs index c64b720e340b..03a8642289ab 100644 --- a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/OperationalInsightsClusterData.Serialization.cs +++ b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/OperationalInsightsClusterData.Serialization.cs @@ -22,6 +22,15 @@ public partial class OperationalInsightsClusterData : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -29,7 +38,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(OperationalInsightsClusterData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); @@ -40,39 +49,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod writer.WritePropertyName("sku"u8); writer.WriteObjectValue(Sku, options); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ClusterId)) @@ -131,22 +107,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod writer.WriteObjectValue(CapacityReservationProperties, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } OperationalInsightsClusterData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/OperationalInsightsDataExportData.Serialization.cs b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/OperationalInsightsDataExportData.Serialization.cs index 7bd7c116b2b1..fcabd01aa7a0 100644 --- a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/OperationalInsightsDataExportData.Serialization.cs +++ b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/OperationalInsightsDataExportData.Serialization.cs @@ -22,6 +22,15 @@ public partial class OperationalInsightsDataExportData : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -29,27 +38,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(OperationalInsightsDataExportData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(DataExportId)) @@ -104,22 +93,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteEndObject(); writer.WriteEndObject(); writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } OperationalInsightsDataExportData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/OperationalInsightsDataSourceData.Serialization.cs b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/OperationalInsightsDataSourceData.Serialization.cs index 40e2853c4446..455c058b3d1a 100644 --- a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/OperationalInsightsDataSourceData.Serialization.cs +++ b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/OperationalInsightsDataSourceData.Serialization.cs @@ -22,6 +22,15 @@ public partial class OperationalInsightsDataSourceData : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -29,7 +38,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(OperationalInsightsDataSourceData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); #if NET6_0_OR_GREATER writer.WriteRawValue(Properties); @@ -57,42 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, } writer.WriteEndObject(); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } OperationalInsightsDataSourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/OperationalInsightsLinkedServiceData.Serialization.cs b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/OperationalInsightsLinkedServiceData.Serialization.cs index 684b8b7121ee..c0c7112874c3 100644 --- a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/OperationalInsightsLinkedServiceData.Serialization.cs +++ b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/OperationalInsightsLinkedServiceData.Serialization.cs @@ -22,6 +22,15 @@ public partial class OperationalInsightsLinkedServiceData : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -29,7 +38,7 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(OperationalInsightsLinkedServiceData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -41,26 +50,6 @@ void IJsonModel.Write(Utf8JsonWriter write } writer.WriteEndObject(); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(ResourceId)) @@ -79,22 +68,6 @@ void IJsonModel.Write(Utf8JsonWriter write writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } OperationalInsightsLinkedServiceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/OperationalInsightsLinkedStorageAccountsData.Serialization.cs b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/OperationalInsightsLinkedStorageAccountsData.Serialization.cs index e03cac5328c1..edb7454f8e23 100644 --- a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/OperationalInsightsLinkedStorageAccountsData.Serialization.cs +++ b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/OperationalInsightsLinkedStorageAccountsData.Serialization.cs @@ -22,6 +22,15 @@ public partial class OperationalInsightsLinkedStorageAccountsData : IUtf8JsonSer void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -29,27 +38,7 @@ void IJsonModel.Write(Utf8JsonWrit throw new FormatException($"The model {nameof(OperationalInsightsLinkedStorageAccountsData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(DataSourceType)) @@ -73,22 +62,6 @@ void IJsonModel.Write(Utf8JsonWrit writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } OperationalInsightsLinkedStorageAccountsData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/OperationalInsightsSavedSearchData.Serialization.cs b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/OperationalInsightsSavedSearchData.Serialization.cs index 2c745b2b750f..25938ad2b9a5 100644 --- a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/OperationalInsightsSavedSearchData.Serialization.cs +++ b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/OperationalInsightsSavedSearchData.Serialization.cs @@ -22,6 +22,15 @@ public partial class OperationalInsightsSavedSearchData : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -29,32 +38,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(OperationalInsightsSavedSearchData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); writer.WritePropertyName("category"u8); @@ -89,22 +78,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } OperationalInsightsSavedSearchData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/OperationalInsightsTableData.Serialization.cs b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/OperationalInsightsTableData.Serialization.cs index 3d6a6cb45d8f..cf70e535bc3f 100644 --- a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/OperationalInsightsTableData.Serialization.cs +++ b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/OperationalInsightsTableData.Serialization.cs @@ -21,6 +21,15 @@ public partial class OperationalInsightsTableData : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,27 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(OperationalInsightsTableData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(RetentionInDays)) @@ -112,22 +101,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model writer.WriteBooleanValue(IsTotalRetentionInDaysAsDefault.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } OperationalInsightsTableData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/OperationalInsightsWorkspaceData.Serialization.cs b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/OperationalInsightsWorkspaceData.Serialization.cs index 0ae79ced5c85..aa7242d9ce88 100644 --- a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/OperationalInsightsWorkspaceData.Serialization.cs +++ b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/OperationalInsightsWorkspaceData.Serialization.cs @@ -22,6 +22,15 @@ public partial class OperationalInsightsWorkspaceData : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -29,7 +38,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(OperationalInsightsWorkspaceData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); @@ -40,39 +49,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) @@ -153,22 +129,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M writer.WriteStringValue(DefaultDataCollectionRuleResourceId); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } OperationalInsightsWorkspaceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/StorageInsightData.Serialization.cs b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/StorageInsightData.Serialization.cs index 0c2d733647eb..45c0b0adfa79 100644 --- a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/StorageInsightData.Serialization.cs +++ b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/StorageInsightData.Serialization.cs @@ -22,6 +22,15 @@ public partial class StorageInsightData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -29,7 +38,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(StorageInsightData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(ETag)) { writer.WritePropertyName("eTag"u8); @@ -46,26 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndObject(); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsCollectionDefined(Containers)) @@ -99,22 +88,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit writer.WriteObjectValue(Status, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } StorageInsightData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/autorest.md b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/autorest.md index f7887119e69a..954ce4441ba5 100644 --- a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/autorest.md +++ b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/autorest.md @@ -17,6 +17,7 @@ skip-csproj: true modelerfour: flatten-payloads: false use-model-reader-writer: true +use-write-core: true enable-bicep-serialization: true # mgmt-debug: # show-serialized-names: true diff --git a/sdk/orbital/Azure.ResourceManager.Orbital/CHANGELOG.md b/sdk/orbital/Azure.ResourceManager.Orbital/CHANGELOG.md index 322fb4e241ff..a6b85c11032c 100644 --- a/sdk/orbital/Azure.ResourceManager.Orbital/CHANGELOG.md +++ b/sdk/orbital/Azure.ResourceManager.Orbital/CHANGELOG.md @@ -5,6 +5,7 @@ ### Features Added - Enable the new model serialization by using the System.ClientModel, refer this [document](https://aka.ms/azsdk/net/mrw) for more details. +- Exposed `JsonModelWriteCore` for model serialization procedure. ### Breaking Changes diff --git a/sdk/orbital/Azure.ResourceManager.Orbital/api/Azure.ResourceManager.Orbital.netstandard2.0.cs b/sdk/orbital/Azure.ResourceManager.Orbital/api/Azure.ResourceManager.Orbital.netstandard2.0.cs index ec401c6e9f6b..1d9bfa651220 100644 --- a/sdk/orbital/Azure.ResourceManager.Orbital/api/Azure.ResourceManager.Orbital.netstandard2.0.cs +++ b/sdk/orbital/Azure.ResourceManager.Orbital/api/Azure.ResourceManager.Orbital.netstandard2.0.cs @@ -22,6 +22,7 @@ internal AvailableGroundStationData() { } public float? LongitudeDegrees { get { throw null; } } public string ProviderName { get { throw null; } } public Azure.ResourceManager.Orbital.Models.GroundStationReleaseMode? ReleaseMode { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Orbital.AvailableGroundStationData 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.Orbital.AvailableGroundStationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -81,6 +82,7 @@ public OrbitalContactData() { } public Azure.ResourceManager.Orbital.Models.OrbitalContactStatus? Status { get { throw null; } } public System.DateTimeOffset? TxEndOn { get { throw null; } } public System.DateTimeOffset? TxStartOn { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Orbital.OrbitalContactData 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.Orbital.OrbitalContactData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -115,6 +117,7 @@ public OrbitalContactProfileData(Azure.Core.AzureLocation location) { } public System.TimeSpan? MinimumViableContactDuration { get { throw null; } set { } } public Azure.Core.ResourceIdentifier NetworkSubnetId { get { throw null; } set { } } public Azure.ResourceManager.Orbital.Models.OrbitalProvisioningState? ProvisioningState { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Orbital.OrbitalContactProfileData 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.Orbital.OrbitalContactProfileData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -212,6 +215,7 @@ public OrbitalSpacecraftData(Azure.Core.AzureLocation location) { } public string TitleLine { get { throw null; } set { } } public string TleLine1 { get { throw null; } set { } } public string TleLine2 { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Orbital.OrbitalSpacecraftData 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.Orbital.OrbitalSpacecraftData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -300,6 +304,7 @@ public partial class AuthorizedGroundStation : System.ClientModel.Primitives.IJs internal AuthorizedGroundStation() { } public System.DateTimeOffset? ExpireOn { get { throw null; } } public string GroundStationName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Orbital.Models.AuthorizedGroundStation 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.Orbital.Models.AuthorizedGroundStation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -362,6 +367,7 @@ internal OrbitalAvailableContact() { } public float? StartElevationDegrees { get { throw null; } } public System.DateTimeOffset? TxEndOn { get { throw null; } } public System.DateTimeOffset? TxStartOn { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Orbital.Models.OrbitalAvailableContact 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.Orbital.Models.OrbitalAvailableContact System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -375,6 +381,7 @@ public OrbitalAvailableContactsContent(Azure.ResourceManager.Resources.Models.Wr public System.DateTimeOffset EndOn { get { throw null; } } public string GroundStationName { get { throw null; } } public System.DateTimeOffset StartOn { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Orbital.Models.OrbitalAvailableContactsContent 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.Orbital.Models.OrbitalAvailableContactsContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -385,6 +392,7 @@ public partial class OrbitalAvailableContactsResult : System.ClientModel.Primiti { internal OrbitalAvailableContactsResult() { } public System.Collections.Generic.IReadOnlyList Values { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Orbital.Models.OrbitalAvailableContactsResult 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.Orbital.Models.OrbitalAvailableContactsResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -396,6 +404,7 @@ public partial class OrbitalContactAntennaConfiguration : System.ClientModel.Pri internal OrbitalContactAntennaConfiguration() { } public System.Net.IPAddress DestinationIP { get { throw null; } } public System.Collections.Generic.IReadOnlyList SourceIPs { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Orbital.Models.OrbitalContactAntennaConfiguration 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.Orbital.Models.OrbitalContactAntennaConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -409,6 +418,7 @@ public OrbitalContactEndpoint(System.Net.IPAddress ipAddress, string endPointNam public System.Net.IPAddress IPAddress { get { throw null; } set { } } public string Port { get { throw null; } set { } } public Azure.ResourceManager.Orbital.Models.OrbitalContactProtocol Protocol { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Orbital.Models.OrbitalContactEndpoint 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.Orbital.Models.OrbitalContactEndpoint System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -424,6 +434,7 @@ public OrbitalContactProfileLink(string name, Azure.ResourceManager.Orbital.Mode public float? GainOverTemperature { get { throw null; } set { } } public string Name { get { throw null; } set { } } public Azure.ResourceManager.Orbital.Models.OrbitalLinkPolarization Polarization { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Orbital.Models.OrbitalContactProfileLink 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.Orbital.Models.OrbitalContactProfileLink System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -441,6 +452,7 @@ public OrbitalContactProfileLinkChannel(string name, float centerFrequencyMHz, f public Azure.ResourceManager.Orbital.Models.OrbitalContactEndpoint EndPoint { get { throw null; } set { } } public string ModulationConfiguration { get { throw null; } set { } } public string Name { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Orbital.Models.OrbitalContactProfileLinkChannel 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.Orbital.Models.OrbitalContactProfileLinkChannel System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -555,6 +567,7 @@ public OrbitalSpacecraftLink(string name, float centerFrequencyMHz, float bandwi public Azure.ResourceManager.Orbital.Models.OrbitalLinkDirection Direction { get { throw null; } set { } } public string Name { get { throw null; } set { } } public Azure.ResourceManager.Orbital.Models.OrbitalLinkPolarization Polarization { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Orbital.Models.OrbitalSpacecraftLink 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.Orbital.Models.OrbitalSpacecraftLink System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -565,6 +578,7 @@ public partial class OrbitalSpacecraftTags : System.ClientModel.Primitives.IJson { public OrbitalSpacecraftTags() { } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Orbital.Models.OrbitalSpacecraftTags 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.Orbital.Models.OrbitalSpacecraftTags System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } diff --git a/sdk/orbital/Azure.ResourceManager.Orbital/assets.json b/sdk/orbital/Azure.ResourceManager.Orbital/assets.json index b4f38d6f9ad5..101aa661bc8c 100644 --- a/sdk/orbital/Azure.ResourceManager.Orbital/assets.json +++ b/sdk/orbital/Azure.ResourceManager.Orbital/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/orbital/Azure.ResourceManager.Orbital", - "Tag": "net/orbital/Azure.ResourceManager.Orbital_65625e297f" + "Tag": "net/orbital/Azure.ResourceManager.Orbital_1baab1b098" } diff --git a/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/AvailableGroundStationData.Serialization.cs b/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/AvailableGroundStationData.Serialization.cs index 9b03f213b49e..45b787896ee2 100644 --- a/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/AvailableGroundStationData.Serialization.cs +++ b/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/AvailableGroundStationData.Serialization.cs @@ -20,6 +20,15 @@ public partial class AvailableGroundStationData : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,32 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(AvailableGroundStationData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Location)) { writer.WritePropertyName("location"u8); writer.WriteStringValue(Location.Value); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(City)) @@ -86,22 +75,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe writer.WriteStringValue(ReleaseMode.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } AvailableGroundStationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/AuthorizedGroundStation.Serialization.cs b/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/AuthorizedGroundStation.Serialization.cs index d0c8c53aab66..d0e7308a8f7d 100644 --- a/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/AuthorizedGroundStation.Serialization.cs +++ b/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/AuthorizedGroundStation.Serialization.cs @@ -18,6 +18,15 @@ public partial class AuthorizedGroundStation : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(AuthorizedGroundStation)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(GroundStationName)) { writer.WritePropertyName("groundStation"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } AuthorizedGroundStation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/AvailableGroundStationListResult.Serialization.cs b/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/AvailableGroundStationListResult.Serialization.cs index e04ae42be0e7..5ad62c1d65d5 100644 --- a/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/AvailableGroundStationListResult.Serialization.cs +++ b/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/AvailableGroundStationListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class AvailableGroundStationListResult : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(AvailableGroundStationListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } AvailableGroundStationListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/ContactProfileListResult.Serialization.cs b/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/ContactProfileListResult.Serialization.cs index 57138ba381ce..5d4448b55492 100644 --- a/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/ContactProfileListResult.Serialization.cs +++ b/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/ContactProfileListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ContactProfileListResult : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(ContactProfileListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } ContactProfileListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/ContactProfilesPropertiesNetworkConfiguration.Serialization.cs b/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/ContactProfilesPropertiesNetworkConfiguration.Serialization.cs index 24c03e24b0ea..9805c745b921 100644 --- a/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/ContactProfilesPropertiesNetworkConfiguration.Serialization.cs +++ b/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/ContactProfilesPropertiesNetworkConfiguration.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ContactProfilesPropertiesNetworkConfiguration : IUtf8Json void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWri throw new FormatException($"The model {nameof(ContactProfilesPropertiesNetworkConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("subnetId"u8); writer.WriteStringValue(NetworkSubnetId); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWri #endif } } - writer.WriteEndObject(); } ContactProfilesPropertiesNetworkConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/OrbitalAvailableContact.Serialization.cs b/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/OrbitalAvailableContact.Serialization.cs index d68cbb6cc1ec..6d58cf0e807b 100644 --- a/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/OrbitalAvailableContact.Serialization.cs +++ b/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/OrbitalAvailableContact.Serialization.cs @@ -19,6 +19,15 @@ public partial class OrbitalAvailableContact : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(OrbitalAvailableContact)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Spacecraft)) { writer.WritePropertyName("spacecraft"u8); @@ -100,7 +108,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } OrbitalAvailableContact IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/OrbitalAvailableContactsContent.Serialization.cs b/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/OrbitalAvailableContactsContent.Serialization.cs index 3dcaaf48ffef..f69f10e0ab2b 100644 --- a/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/OrbitalAvailableContactsContent.Serialization.cs +++ b/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/OrbitalAvailableContactsContent.Serialization.cs @@ -19,6 +19,15 @@ public partial class OrbitalAvailableContactsContent : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(OrbitalAvailableContactsContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("contactProfile"u8); JsonSerializer.Serialize(writer, ContactProfile); writer.WritePropertyName("groundStationName"u8); @@ -50,7 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } OrbitalAvailableContactsContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/OrbitalAvailableContactsResult.Serialization.cs b/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/OrbitalAvailableContactsResult.Serialization.cs index d8c8792b9de6..0d25553b6723 100644 --- a/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/OrbitalAvailableContactsResult.Serialization.cs +++ b/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/OrbitalAvailableContactsResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class OrbitalAvailableContactsResult : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(OrbitalAvailableContactsResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Values)) { writer.WritePropertyName("value"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } OrbitalAvailableContactsResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/OrbitalContactAntennaConfiguration.Serialization.cs b/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/OrbitalContactAntennaConfiguration.Serialization.cs index 86a2631d5ac7..915a2f6ae065 100644 --- a/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/OrbitalContactAntennaConfiguration.Serialization.cs +++ b/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/OrbitalContactAntennaConfiguration.Serialization.cs @@ -19,6 +19,15 @@ public partial class OrbitalContactAntennaConfiguration : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(OrbitalContactAntennaConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(DestinationIP)) { writer.WritePropertyName("destinationIp"u8); @@ -62,7 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } OrbitalContactAntennaConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/OrbitalContactEndpoint.Serialization.cs b/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/OrbitalContactEndpoint.Serialization.cs index 17d9910dc169..9b9e3d028d29 100644 --- a/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/OrbitalContactEndpoint.Serialization.cs +++ b/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/OrbitalContactEndpoint.Serialization.cs @@ -19,6 +19,15 @@ public partial class OrbitalContactEndpoint : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(OrbitalContactEndpoint)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("ipAddress"u8); writer.WriteStringValue(IPAddress.ToString()); writer.WritePropertyName("endPointName"u8); @@ -50,7 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } OrbitalContactEndpoint IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/OrbitalContactListResult.Serialization.cs b/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/OrbitalContactListResult.Serialization.cs index 15016ffcff58..20e2694f4940 100644 --- a/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/OrbitalContactListResult.Serialization.cs +++ b/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/OrbitalContactListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class OrbitalContactListResult : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(OrbitalContactListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } OrbitalContactListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/OrbitalContactProfileLink.Serialization.cs b/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/OrbitalContactProfileLink.Serialization.cs index 075d386f4962..edb93f07a385 100644 --- a/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/OrbitalContactProfileLink.Serialization.cs +++ b/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/OrbitalContactProfileLink.Serialization.cs @@ -18,6 +18,15 @@ public partial class OrbitalContactProfileLink : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(OrbitalContactProfileLink)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); writer.WritePropertyName("polarization"u8); @@ -64,7 +72,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } OrbitalContactProfileLink IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/OrbitalContactProfileLinkChannel.Serialization.cs b/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/OrbitalContactProfileLinkChannel.Serialization.cs index bb9a1fe65e27..ea96f7f1c63e 100644 --- a/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/OrbitalContactProfileLinkChannel.Serialization.cs +++ b/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/OrbitalContactProfileLinkChannel.Serialization.cs @@ -18,6 +18,15 @@ public partial class OrbitalContactProfileLinkChannel : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(OrbitalContactProfileLinkChannel)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); writer.WritePropertyName("centerFrequencyMHz"u8); @@ -69,7 +77,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } OrbitalContactProfileLinkChannel IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/OrbitalSpacecraftLink.Serialization.cs b/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/OrbitalSpacecraftLink.Serialization.cs index 2dbae932f4e6..91289c014637 100644 --- a/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/OrbitalSpacecraftLink.Serialization.cs +++ b/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/OrbitalSpacecraftLink.Serialization.cs @@ -18,6 +18,15 @@ public partial class OrbitalSpacecraftLink : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(OrbitalSpacecraftLink)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); writer.WritePropertyName("centerFrequencyMHz"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } OrbitalSpacecraftLink IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/OrbitalSpacecraftListResult.Serialization.cs b/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/OrbitalSpacecraftListResult.Serialization.cs index 6103e41073b1..77b0001d24bc 100644 --- a/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/OrbitalSpacecraftListResult.Serialization.cs +++ b/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/OrbitalSpacecraftListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class OrbitalSpacecraftListResult : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(OrbitalSpacecraftListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } OrbitalSpacecraftListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/OrbitalSpacecraftTags.Serialization.cs b/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/OrbitalSpacecraftTags.Serialization.cs index 7c1680db7b96..25918fbcb125 100644 --- a/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/OrbitalSpacecraftTags.Serialization.cs +++ b/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/OrbitalSpacecraftTags.Serialization.cs @@ -18,6 +18,15 @@ public partial class OrbitalSpacecraftTags : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(OrbitalSpacecraftTags)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } OrbitalSpacecraftTags IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/OrbitalContactData.Serialization.cs b/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/OrbitalContactData.Serialization.cs index 61ae210b5231..3b4300b07891 100644 --- a/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/OrbitalContactData.Serialization.cs +++ b/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/OrbitalContactData.Serialization.cs @@ -21,6 +21,15 @@ public partial class OrbitalContactData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,32 +37,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(OrbitalContactData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(ProvisioningState)) @@ -142,22 +131,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit JsonSerializer.Serialize(writer, ContactProfile); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } OrbitalContactData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/OrbitalContactProfileData.Serialization.cs b/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/OrbitalContactProfileData.Serialization.cs index e0ca441e4fa7..358161c11fab 100644 --- a/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/OrbitalContactProfileData.Serialization.cs +++ b/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/OrbitalContactProfileData.Serialization.cs @@ -20,6 +20,15 @@ public partial class OrbitalContactProfileData : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,45 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(OrbitalContactProfileData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(ProvisioningState)) @@ -109,22 +85,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } OrbitalContactProfileData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/OrbitalSpacecraftData.Serialization.cs b/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/OrbitalSpacecraftData.Serialization.cs index 9900ad2c83f4..2337899740b5 100644 --- a/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/OrbitalSpacecraftData.Serialization.cs +++ b/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/OrbitalSpacecraftData.Serialization.cs @@ -20,6 +20,15 @@ public partial class OrbitalSpacecraftData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,45 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(OrbitalSpacecraftData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(ProvisioningState)) @@ -104,22 +80,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } OrbitalSpacecraftData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/orbital/Azure.ResourceManager.Orbital/src/autorest.md b/sdk/orbital/Azure.ResourceManager.Orbital/src/autorest.md index 621c0fb30e55..be8286d2e3d4 100644 --- a/sdk/orbital/Azure.ResourceManager.Orbital/src/autorest.md +++ b/sdk/orbital/Azure.ResourceManager.Orbital/src/autorest.md @@ -18,6 +18,7 @@ skip-csproj: true modelerfour: flatten-payloads: false use-model-reader-writer: true +use-write-core: true rename-mapping: EndPoint.ipAddress: -|ip-address diff --git a/sdk/peering/Azure.ResourceManager.Peering/CHANGELOG.md b/sdk/peering/Azure.ResourceManager.Peering/CHANGELOG.md index 51b39cea70b8..bc6fc4c8bdb0 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/CHANGELOG.md +++ b/sdk/peering/Azure.ResourceManager.Peering/CHANGELOG.md @@ -5,6 +5,7 @@ ### Features Added - Enable the new model serialization by using the System.ClientModel, refer this [document](https://aka.ms/azsdk/net/mrw) for more details. +- Exposed `JsonModelWriteCore` for model serialization procedure. ### Breaking Changes diff --git a/sdk/peering/Azure.ResourceManager.Peering/api/Azure.ResourceManager.Peering.netstandard2.0.cs b/sdk/peering/Azure.ResourceManager.Peering/api/Azure.ResourceManager.Peering.netstandard2.0.cs index de7d432b95db..45139c96b253 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/api/Azure.ResourceManager.Peering.netstandard2.0.cs +++ b/sdk/peering/Azure.ResourceManager.Peering/api/Azure.ResourceManager.Peering.netstandard2.0.cs @@ -27,6 +27,7 @@ public ConnectionMonitorTestData() { } public Azure.ResourceManager.Peering.Models.PeeringProvisioningState? ProvisioningState { get { throw null; } } public string SourceAgent { get { throw null; } set { } } public int? TestFrequencyInSec { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Peering.ConnectionMonitorTestData 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.Peering.ConnectionMonitorTestData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -77,6 +78,7 @@ public PeerAsnData() { } public System.Collections.Generic.IList PeerContactDetail { get { throw null; } } public string PeerName { get { throw null; } set { } } public Azure.ResourceManager.Peering.Models.PeerAsnValidationState? ValidationState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Peering.PeerAsnData 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.Peering.PeerAsnData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -128,6 +130,7 @@ public PeeringData(Azure.Core.AzureLocation location, Azure.ResourceManager.Peer public string PeeringLocation { get { throw null; } set { } } public Azure.ResourceManager.Peering.Models.PeeringProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.Peering.Models.PeeringSku Sku { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Peering.PeeringData 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.Peering.PeeringData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -198,6 +201,7 @@ public PeeringRegisteredAsnData() { } public int? Asn { get { throw null; } set { } } public string PeeringServicePrefixKey { get { throw null; } } public Azure.ResourceManager.Peering.Models.PeeringProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Peering.PeeringRegisteredAsnData 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.Peering.PeeringRegisteredAsnData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -248,6 +252,7 @@ public PeeringRegisteredPrefixData() { } public string Prefix { get { throw null; } set { } } public Azure.ResourceManager.Peering.Models.PeeringPrefixValidationState? PrefixValidationState { get { throw null; } } public Azure.ResourceManager.Peering.Models.PeeringProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Peering.PeeringRegisteredPrefixData 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.Peering.PeeringRegisteredPrefixData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -337,6 +342,7 @@ public PeeringServiceData(Azure.Core.AzureLocation location) { } public string ProviderPrimaryPeeringLocation { get { throw null; } set { } } public Azure.ResourceManager.Peering.Models.PeeringProvisioningState? ProvisioningState { get { throw null; } } public string SkuName { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Peering.PeeringServiceData 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.Peering.PeeringServiceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -370,6 +376,7 @@ public PeeringServicePrefixData() { } public string Prefix { get { throw null; } set { } } public Azure.ResourceManager.Peering.Models.PeeringPrefixValidationState? PrefixValidationState { get { throw null; } } public Azure.ResourceManager.Peering.Models.PeeringProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Peering.PeeringServicePrefixData 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.Peering.PeeringServicePrefixData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -515,6 +522,7 @@ public CdnPeeringPrefix() { } public string BgpCommunity { get { throw null; } } public bool? IsPrimaryRegion { get { throw null; } } public string Prefix { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Peering.Models.CdnPeeringPrefix 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.Peering.Models.CdnPeeringPrefix System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -526,6 +534,7 @@ public partial class CheckPeeringServiceProviderAvailabilityContent : System.Cli public CheckPeeringServiceProviderAvailabilityContent() { } public string PeeringServiceLocation { get { throw null; } set { } } public string PeeringServiceProvider { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Peering.Models.CheckPeeringServiceProviderAvailabilityContent 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.Peering.Models.CheckPeeringServiceProviderAvailabilityContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -539,6 +548,7 @@ public DirectPeeringFacility() { } public Azure.ResourceManager.Peering.Models.DirectPeeringType? DirectPeeringType { get { throw null; } set { } } public int? PeeringDBFacilityId { get { throw null; } set { } } public string PeeringDBFacilityLink { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Peering.Models.DirectPeeringFacility 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.Peering.Models.DirectPeeringFacility System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -550,6 +560,7 @@ public partial class DirectPeeringLocationProperties : System.ClientModel.Primit public DirectPeeringLocationProperties() { } public System.Collections.Generic.IList BandwidthOffers { get { throw null; } } public System.Collections.Generic.IList PeeringFacilities { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Peering.Models.DirectPeeringLocationProperties 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.Peering.Models.DirectPeeringLocationProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -563,6 +574,7 @@ public DirectPeeringProperties() { } public Azure.ResourceManager.Peering.Models.DirectPeeringType? DirectPeeringType { get { throw null; } set { } } public Azure.Core.ResourceIdentifier PeerAsnId { get { throw null; } set { } } public bool? UseForPeeringService { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Peering.Models.DirectPeeringProperties 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.Peering.Models.DirectPeeringProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -604,6 +616,7 @@ public ExchangePeeringFacility() { } public System.Net.IPAddress MicrosoftIPv6Address { get { throw null; } set { } } public int? PeeringDBFacilityId { get { throw null; } set { } } public string PeeringDBFacilityLink { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Peering.Models.ExchangePeeringFacility 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.Peering.Models.ExchangePeeringFacility System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -615,6 +628,7 @@ public partial class ExchangePeeringProperties : System.ClientModel.Primitives.I public ExchangePeeringProperties() { } public System.Collections.Generic.IList Connections { get { throw null; } } public Azure.Core.ResourceIdentifier PeerAsnId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Peering.Models.ExchangePeeringProperties 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.Peering.Models.ExchangePeeringProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -663,6 +677,7 @@ public partial class LookingGlassOutput : System.ClientModel.Primitives.IJsonMod internal LookingGlassOutput() { } public Azure.ResourceManager.Peering.Models.LookingGlassCommand? Command { get { throw null; } } public string Output { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Peering.Models.LookingGlassOutput 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.Peering.Models.LookingGlassOutput System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -693,6 +708,7 @@ public PeerAsnContactDetail() { } public string Email { get { throw null; } set { } } public string Phone { get { throw null; } set { } } public Azure.ResourceManager.Peering.Models.PeeringRole? Role { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Peering.Models.PeerAsnContactDetail 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.Peering.Models.PeerAsnContactDetail System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -724,6 +740,7 @@ public partial class PeeringBandwidthOffer : System.ClientModel.Primitives.IJson public PeeringBandwidthOffer() { } public string OfferName { get { throw null; } set { } } public int? ValueInMbps { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Peering.Models.PeeringBandwidthOffer 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.Peering.Models.PeeringBandwidthOffer System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -744,6 +761,7 @@ public PeeringBgpSession() { } public string SessionPrefixV6 { get { throw null; } set { } } public Azure.ResourceManager.Peering.Models.PeeringSessionStateV4? SessionStateV4 { get { throw null; } } public Azure.ResourceManager.Peering.Models.PeeringSessionStateV6? SessionStateV6 { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Peering.Models.PeeringBgpSession 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.Peering.Models.PeeringBgpSession System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -789,6 +807,7 @@ public PeeringDirectConnection() { } public int? ProvisionedBandwidthInMbps { get { throw null; } } public Azure.ResourceManager.Peering.Models.PeeringSessionAddressProvider? SessionAddressProvider { get { throw null; } set { } } public bool? UseForPeeringService { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Peering.Models.PeeringDirectConnection 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.Peering.Models.PeeringDirectConnection System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -803,6 +822,7 @@ public PeeringExchangeConnection() { } public Azure.ResourceManager.Peering.Models.PeeringConnectionState? ConnectionState { get { throw null; } } public string ErrorMessage { get { throw null; } } public int? PeeringDBFacilityId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Peering.Models.PeeringExchangeConnection 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.Peering.Models.PeeringExchangeConnection System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -873,6 +893,7 @@ public PeeringLocation() { } public System.Collections.Generic.IList ExchangePeeringFacilities { get { throw null; } } public Azure.ResourceManager.Peering.Models.PeeringKind? Kind { get { throw null; } set { } } public string PeeringLocationValue { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Peering.Models.PeeringLocation 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.Peering.Models.PeeringLocation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -927,6 +948,7 @@ public PeeringLogAnalyticsWorkspaceProperties() { } public System.Collections.Generic.IReadOnlyList ConnectedAgents { get { throw null; } } public string Key { get { throw null; } } public string WorkspaceId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Peering.Models.PeeringLogAnalyticsWorkspaceProperties 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.Peering.Models.PeeringLogAnalyticsWorkspaceProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -936,6 +958,7 @@ public PeeringLogAnalyticsWorkspaceProperties() { } public partial class PeeringPatch : Azure.ResourceManager.Peering.Models.PeeringResourceTagsPatch, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public PeeringPatch() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Peering.Models.PeeringPatch 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.Peering.Models.PeeringPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -995,6 +1018,7 @@ internal PeeringReceivedRoute() { } public string ReceivedTimestamp { get { throw null; } } public string RpkiValidationState { get { throw null; } } public string TrustAnchor { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Peering.Models.PeeringReceivedRoute 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.Peering.Models.PeeringReceivedRoute System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1005,6 +1029,7 @@ public partial class PeeringResourceTagsPatch : System.ClientModel.Primitives.IJ { public PeeringResourceTagsPatch() { } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Peering.Models.PeeringResourceTagsPatch 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.Peering.Models.PeeringResourceTagsPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1036,6 +1061,7 @@ public PeeringResourceTagsPatch() { } public partial class PeeringServiceCountry : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public PeeringServiceCountry() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Peering.Models.PeeringServiceCountry 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.Peering.Models.PeeringServiceCountry System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1048,6 +1074,7 @@ public PeeringServiceLocation() { } public Azure.Core.AzureLocation? AzureRegion { get { throw null; } set { } } public string Country { get { throw null; } set { } } public string State { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Peering.Models.PeeringServiceLocation 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.Peering.Models.PeeringServiceLocation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1057,6 +1084,7 @@ public PeeringServiceLocation() { } public partial class PeeringServicePatch : Azure.ResourceManager.Peering.Models.PeeringResourceTagsPatch, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public PeeringServicePatch() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Peering.Models.PeeringServicePatch 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.Peering.Models.PeeringServicePatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1071,6 +1099,7 @@ internal PeeringServicePrefixEvent() { } public string EventSummary { get { throw null; } } public System.DateTimeOffset? EventTimestamp { get { throw null; } } public string EventType { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Peering.Models.PeeringServicePrefixEvent 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.Peering.Models.PeeringServicePrefixEvent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1082,6 +1111,7 @@ public partial class PeeringServiceProvider : Azure.ResourceManager.Models.Resou public PeeringServiceProvider() { } public System.Collections.Generic.IList PeeringLocations { get { throw null; } } public string ServiceProviderName { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Peering.Models.PeeringServiceProvider 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.Peering.Models.PeeringServiceProvider System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1204,6 +1234,7 @@ public PeeringSku() { } public string Name { get { throw null; } set { } } public Azure.ResourceManager.Peering.Models.PeeringSize? Size { get { throw null; } } public Azure.ResourceManager.Peering.Models.PeeringTier? Tier { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Peering.Models.PeeringSku 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.Peering.Models.PeeringSku System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1234,6 +1265,7 @@ internal RoutingPreferenceUnbilledPrefix() { } public Azure.Core.AzureLocation? AzureRegion { get { throw null; } } public int? PeerAsn { get { throw null; } } public string Prefix { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Peering.Models.RoutingPreferenceUnbilledPrefix 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.Peering.Models.RoutingPreferenceUnbilledPrefix System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } diff --git a/sdk/peering/Azure.ResourceManager.Peering/assets.json b/sdk/peering/Azure.ResourceManager.Peering/assets.json index a4ca1eed04ec..f19a04607212 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/assets.json +++ b/sdk/peering/Azure.ResourceManager.Peering/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/peering/Azure.ResourceManager.Peering", - "Tag": "net/peering/Azure.ResourceManager.Peering_ef7e682118" + "Tag": "net/peering/Azure.ResourceManager.Peering_cbfbb9a497" } diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/ConnectionMonitorTestData.Serialization.cs b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/ConnectionMonitorTestData.Serialization.cs index d991b4421b67..9fffb70b7517 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/ConnectionMonitorTestData.Serialization.cs +++ b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/ConnectionMonitorTestData.Serialization.cs @@ -20,6 +20,15 @@ public partial class ConnectionMonitorTestData : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(ConnectionMonitorTestData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(SourceAgent)) @@ -91,22 +80,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ConnectionMonitorTestData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/CdnPeeringPrefix.Serialization.cs b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/CdnPeeringPrefix.Serialization.cs index 5e6ab884e1c3..b3441301813e 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/CdnPeeringPrefix.Serialization.cs +++ b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/CdnPeeringPrefix.Serialization.cs @@ -19,6 +19,15 @@ public partial class CdnPeeringPrefix : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(CdnPeeringPrefix)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Prefix)) @@ -75,22 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter writer.WriteStringValue(BgpCommunity); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } CdnPeeringPrefix IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/CdnPeeringPrefixListResult.Serialization.cs b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/CdnPeeringPrefixListResult.Serialization.cs index b0fd91ee70a7..67f9c965a87f 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/CdnPeeringPrefixListResult.Serialization.cs +++ b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/CdnPeeringPrefixListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class CdnPeeringPrefixListResult : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(CdnPeeringPrefixListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } CdnPeeringPrefixListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/CheckPeeringServiceProviderAvailabilityContent.Serialization.cs b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/CheckPeeringServiceProviderAvailabilityContent.Serialization.cs index 6cf2297eee8a..03ed7eef125f 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/CheckPeeringServiceProviderAvailabilityContent.Serialization.cs +++ b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/CheckPeeringServiceProviderAvailabilityContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class CheckPeeringServiceProviderAvailabilityContent : IUtf8JsonS void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWr throw new FormatException($"The model {nameof(CheckPeeringServiceProviderAvailabilityContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(PeeringServiceLocation)) { writer.WritePropertyName("peeringServiceLocation"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWr #endif } } - writer.WriteEndObject(); } CheckPeeringServiceProviderAvailabilityContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/ConnectionMonitorTestListResult.Serialization.cs b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/ConnectionMonitorTestListResult.Serialization.cs index a49e7c46b3d4..a5f5930d4de9 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/ConnectionMonitorTestListResult.Serialization.cs +++ b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/ConnectionMonitorTestListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ConnectionMonitorTestListResult : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(ConnectionMonitorTestListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } ConnectionMonitorTestListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/DirectPeeringFacility.Serialization.cs b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/DirectPeeringFacility.Serialization.cs index 37be38096eb0..60534ebb938d 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/DirectPeeringFacility.Serialization.cs +++ b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/DirectPeeringFacility.Serialization.cs @@ -18,6 +18,15 @@ public partial class DirectPeeringFacility : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(DirectPeeringFacility)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Address)) { writer.WritePropertyName("address"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } DirectPeeringFacility IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/DirectPeeringLocationProperties.Serialization.cs b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/DirectPeeringLocationProperties.Serialization.cs index bd4df80d9d66..1d952ba237fa 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/DirectPeeringLocationProperties.Serialization.cs +++ b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/DirectPeeringLocationProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class DirectPeeringLocationProperties : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(DirectPeeringLocationProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(PeeringFacilities)) { writer.WritePropertyName("peeringFacilities"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } DirectPeeringLocationProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/DirectPeeringProperties.Serialization.cs b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/DirectPeeringProperties.Serialization.cs index 809512ce689d..e2274e513be4 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/DirectPeeringProperties.Serialization.cs +++ b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/DirectPeeringProperties.Serialization.cs @@ -19,6 +19,15 @@ public partial class DirectPeeringProperties : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(DirectPeeringProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Connections)) { writer.WritePropertyName("connections"u8); @@ -67,7 +75,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } DirectPeeringProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/ExchangePeeringFacility.Serialization.cs b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/ExchangePeeringFacility.Serialization.cs index 98c8d0eb31b7..b34c4cfdf69a 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/ExchangePeeringFacility.Serialization.cs +++ b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/ExchangePeeringFacility.Serialization.cs @@ -19,6 +19,15 @@ public partial class ExchangePeeringFacility : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(ExchangePeeringFacility)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ExchangeName)) { writer.WritePropertyName("exchangeName"u8); @@ -82,7 +90,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } ExchangePeeringFacility IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/ExchangePeeringProperties.Serialization.cs b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/ExchangePeeringProperties.Serialization.cs index 351c5375f6e3..1895aee152fa 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/ExchangePeeringProperties.Serialization.cs +++ b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/ExchangePeeringProperties.Serialization.cs @@ -19,6 +19,15 @@ public partial class ExchangePeeringProperties : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(ExchangePeeringProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Connections)) { writer.WritePropertyName("connections"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } ExchangePeeringProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/LookingGlassOutput.Serialization.cs b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/LookingGlassOutput.Serialization.cs index a4121400ebc2..764881500c4c 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/LookingGlassOutput.Serialization.cs +++ b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/LookingGlassOutput.Serialization.cs @@ -18,6 +18,15 @@ public partial class LookingGlassOutput : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(LookingGlassOutput)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Command)) { writer.WritePropertyName("command"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } LookingGlassOutput IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeerAsnContactDetail.Serialization.cs b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeerAsnContactDetail.Serialization.cs index 82c545d35b58..14c45544080d 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeerAsnContactDetail.Serialization.cs +++ b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeerAsnContactDetail.Serialization.cs @@ -18,6 +18,15 @@ public partial class PeerAsnContactDetail : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(PeerAsnContactDetail)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Role)) { writer.WritePropertyName("role"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } PeerAsnContactDetail IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeerAsnListResult.Serialization.cs b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeerAsnListResult.Serialization.cs index ce53dda67649..4f89335edb59 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeerAsnListResult.Serialization.cs +++ b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeerAsnListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class PeerAsnListResult : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(PeerAsnListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } PeerAsnListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringBandwidthOffer.Serialization.cs b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringBandwidthOffer.Serialization.cs index 098d85b2f40a..73b4b5f44dd5 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringBandwidthOffer.Serialization.cs +++ b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringBandwidthOffer.Serialization.cs @@ -18,6 +18,15 @@ public partial class PeeringBandwidthOffer : IUtf8JsonSerializable, IJsonModel

    ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(PeeringBandwidthOffer)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(OfferName)) { writer.WritePropertyName("offerName"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } PeeringBandwidthOffer IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringBgpSession.Serialization.cs b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringBgpSession.Serialization.cs index 329fa133ab2e..901b3619a1e6 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringBgpSession.Serialization.cs +++ b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringBgpSession.Serialization.cs @@ -19,6 +19,15 @@ public partial class PeeringBgpSession : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(PeeringBgpSession)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(SessionPrefixV4)) { writer.WritePropertyName("sessionPrefixV4"u8); @@ -97,7 +105,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } PeeringBgpSession IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringDirectConnection.Serialization.cs b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringDirectConnection.Serialization.cs index f2f733565d6e..ac508b7661c2 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringDirectConnection.Serialization.cs +++ b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringDirectConnection.Serialization.cs @@ -18,6 +18,15 @@ public partial class PeeringDirectConnection : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(PeeringDirectConnection)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(BandwidthInMbps)) { writer.WritePropertyName("bandwidthInMbps"u8); @@ -91,7 +99,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } PeeringDirectConnection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringExchangeConnection.Serialization.cs b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringExchangeConnection.Serialization.cs index dca05e3c47cf..549af6e15199 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringExchangeConnection.Serialization.cs +++ b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringExchangeConnection.Serialization.cs @@ -18,6 +18,15 @@ public partial class PeeringExchangeConnection : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(PeeringExchangeConnection)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(PeeringDBFacilityId)) { writer.WritePropertyName("peeringDBFacilityId"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } PeeringExchangeConnection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringListResult.Serialization.cs b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringListResult.Serialization.cs index a63a3a5b127a..329e3e5f3dfc 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringListResult.Serialization.cs +++ b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class PeeringListResult : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(PeeringListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } PeeringListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringLocation.Serialization.cs b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringLocation.Serialization.cs index 8073b0c507b5..3b60b4c2e1b0 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringLocation.Serialization.cs +++ b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringLocation.Serialization.cs @@ -19,6 +19,15 @@ public partial class PeeringLocation : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,32 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(PeeringLocation)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Kind)) { writer.WritePropertyName("kind"u8); writer.WriteStringValue(Kind.Value.ToString()); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Direct)) @@ -80,22 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO writer.WriteStringValue(AzureRegion.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } PeeringLocation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringLocationListResult.Serialization.cs b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringLocationListResult.Serialization.cs index bfce35076cc6..f2fe552aff52 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringLocationListResult.Serialization.cs +++ b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringLocationListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class PeeringLocationListResult : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(PeeringLocationListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } PeeringLocationListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringLocationPropertiesExchange.Serialization.cs b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringLocationPropertiesExchange.Serialization.cs index b201347057a5..f6c690c7af3e 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringLocationPropertiesExchange.Serialization.cs +++ b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringLocationPropertiesExchange.Serialization.cs @@ -18,6 +18,15 @@ internal partial class PeeringLocationPropertiesExchange : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(PeeringLocationPropertiesExchange)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(PeeringFacilities)) { writer.WritePropertyName("peeringFacilities"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } PeeringLocationPropertiesExchange IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringLogAnalyticsWorkspaceProperties.Serialization.cs b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringLogAnalyticsWorkspaceProperties.Serialization.cs index 975352acc24f..6bfc0ad187b2 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringLogAnalyticsWorkspaceProperties.Serialization.cs +++ b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringLogAnalyticsWorkspaceProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class PeeringLogAnalyticsWorkspaceProperties : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(PeeringLogAnalyticsWorkspaceProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(WorkspaceId)) { writer.WritePropertyName("workspaceID"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } PeeringLogAnalyticsWorkspaceProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringPatch.Serialization.cs b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringPatch.Serialization.cs index 869becf92a89..f88a0c017c60 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringPatch.Serialization.cs +++ b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringPatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class PeeringPatch : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,34 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(PeeringPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } PeeringPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringReceivedRoute.Serialization.cs b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringReceivedRoute.Serialization.cs index fd04296f1cf5..13b3e2a84e6e 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringReceivedRoute.Serialization.cs +++ b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringReceivedRoute.Serialization.cs @@ -18,6 +18,15 @@ public partial class PeeringReceivedRoute : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(PeeringReceivedRoute)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Prefix)) { writer.WritePropertyName("prefix"u8); @@ -76,7 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } PeeringReceivedRoute IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringReceivedRouteListResult.Serialization.cs b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringReceivedRouteListResult.Serialization.cs index 2e49574643e1..5b192b73fe99 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringReceivedRouteListResult.Serialization.cs +++ b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringReceivedRouteListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class PeeringReceivedRouteListResult : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(PeeringReceivedRouteListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } PeeringReceivedRouteListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringRegisteredAsnListResult.Serialization.cs b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringRegisteredAsnListResult.Serialization.cs index 485d5d401fb1..a4996ba14f23 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringRegisteredAsnListResult.Serialization.cs +++ b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringRegisteredAsnListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class PeeringRegisteredAsnListResult : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(PeeringRegisteredAsnListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } PeeringRegisteredAsnListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringRegisteredPrefixListResult.Serialization.cs b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringRegisteredPrefixListResult.Serialization.cs index 9e5385c381ab..df8023e76514 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringRegisteredPrefixListResult.Serialization.cs +++ b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringRegisteredPrefixListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class PeeringRegisteredPrefixListResult : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(PeeringRegisteredPrefixListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } PeeringRegisteredPrefixListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringResourceTagsPatch.Serialization.cs b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringResourceTagsPatch.Serialization.cs index d5af5953ae08..ceb895fc829f 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringResourceTagsPatch.Serialization.cs +++ b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringResourceTagsPatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class PeeringResourceTagsPatch : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(PeeringResourceTagsPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } PeeringResourceTagsPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringServiceCountry.Serialization.cs b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringServiceCountry.Serialization.cs index c4722ff1f061..39fbdb7ecda6 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringServiceCountry.Serialization.cs +++ b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringServiceCountry.Serialization.cs @@ -19,6 +19,15 @@ public partial class PeeringServiceCountry : IUtf8JsonSerializable, IJsonModel

    ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,43 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(PeeringServiceCountry)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } PeeringServiceCountry IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringServiceCountryListResult.Serialization.cs b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringServiceCountryListResult.Serialization.cs index f9e1a8360963..5adcd574e655 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringServiceCountryListResult.Serialization.cs +++ b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringServiceCountryListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class PeeringServiceCountryListResult : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(PeeringServiceCountryListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } PeeringServiceCountryListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringServiceListResult.Serialization.cs b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringServiceListResult.Serialization.cs index 3d374d51dbc7..0b7d5256d39a 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringServiceListResult.Serialization.cs +++ b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringServiceListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class PeeringServiceListResult : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(PeeringServiceListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } PeeringServiceListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringServiceLocation.Serialization.cs b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringServiceLocation.Serialization.cs index 3906d050e39f..9ae6ee3b512c 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringServiceLocation.Serialization.cs +++ b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringServiceLocation.Serialization.cs @@ -19,6 +19,15 @@ public partial class PeeringServiceLocation : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(PeeringServiceLocation)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Country)) @@ -65,22 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader writer.WriteStringValue(AzureRegion.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } PeeringServiceLocation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringServiceLocationListResult.Serialization.cs b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringServiceLocationListResult.Serialization.cs index 181607eae390..ee829ebd9b11 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringServiceLocationListResult.Serialization.cs +++ b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringServiceLocationListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class PeeringServiceLocationListResult : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(PeeringServiceLocationListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } PeeringServiceLocationListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringServicePatch.Serialization.cs b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringServicePatch.Serialization.cs index bdc20d46e3c9..f675a123c269 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringServicePatch.Serialization.cs +++ b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringServicePatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class PeeringServicePatch : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,34 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(PeeringServicePatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } PeeringServicePatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringServicePrefixEvent.Serialization.cs b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringServicePrefixEvent.Serialization.cs index 5dbb39a8778a..785ddf0b4a96 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringServicePrefixEvent.Serialization.cs +++ b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringServicePrefixEvent.Serialization.cs @@ -18,6 +18,15 @@ public partial class PeeringServicePrefixEvent : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(PeeringServicePrefixEvent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(EventTimestamp)) { writer.WritePropertyName("eventTimestamp"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } PeeringServicePrefixEvent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringServicePrefixListResult.Serialization.cs b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringServicePrefixListResult.Serialization.cs index 04ce04aaeeea..d86756d6f40e 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringServicePrefixListResult.Serialization.cs +++ b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringServicePrefixListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class PeeringServicePrefixListResult : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(PeeringServicePrefixListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } PeeringServicePrefixListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringServiceProvider.Serialization.cs b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringServiceProvider.Serialization.cs index 0d9c96f7ad63..555112936499 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringServiceProvider.Serialization.cs +++ b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringServiceProvider.Serialization.cs @@ -19,6 +19,15 @@ public partial class PeeringServiceProvider : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(PeeringServiceProvider)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(ServiceProviderName)) @@ -65,22 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } PeeringServiceProvider IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringServiceProviderListResult.Serialization.cs b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringServiceProviderListResult.Serialization.cs index 7cf7a91cc609..751e0a930479 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringServiceProviderListResult.Serialization.cs +++ b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringServiceProviderListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class PeeringServiceProviderListResult : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(PeeringServiceProviderListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } PeeringServiceProviderListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringServiceSku.Serialization.cs b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringServiceSku.Serialization.cs index a64510028bac..0bb7316701de 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringServiceSku.Serialization.cs +++ b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringServiceSku.Serialization.cs @@ -18,6 +18,15 @@ internal partial class PeeringServiceSku : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(PeeringServiceSku)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } PeeringServiceSku IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringSku.Serialization.cs b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringSku.Serialization.cs index 945b6359c0a6..6d5e8dcd91be 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringSku.Serialization.cs +++ b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringSku.Serialization.cs @@ -18,6 +18,15 @@ public partial class PeeringSku : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOption throw new FormatException($"The model {nameof(PeeringSku)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOption #endif } } - writer.WriteEndObject(); } PeeringSku IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/RoutingPreferenceUnbilledPrefix.Serialization.cs b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/RoutingPreferenceUnbilledPrefix.Serialization.cs index ac6c01312449..d610d26aa1ec 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/RoutingPreferenceUnbilledPrefix.Serialization.cs +++ b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/RoutingPreferenceUnbilledPrefix.Serialization.cs @@ -18,6 +18,15 @@ public partial class RoutingPreferenceUnbilledPrefix : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(RoutingPreferenceUnbilledPrefix)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Prefix)) { writer.WritePropertyName("prefix"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } RoutingPreferenceUnbilledPrefix IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/RpUnbilledPrefixListResult.Serialization.cs b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/RpUnbilledPrefixListResult.Serialization.cs index d7af16c072ec..64b645d2ed8b 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/RpUnbilledPrefixListResult.Serialization.cs +++ b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/RpUnbilledPrefixListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class RpUnbilledPrefixListResult : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(RpUnbilledPrefixListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } RpUnbilledPrefixListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/PeerAsnData.Serialization.cs b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/PeerAsnData.Serialization.cs index 9d2ffa56a604..5932112e009e 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/PeerAsnData.Serialization.cs +++ b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/PeerAsnData.Serialization.cs @@ -20,6 +20,15 @@ public partial class PeerAsnData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio throw new FormatException($"The model {nameof(PeerAsnData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(PeerAsn)) @@ -81,22 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio writer.WriteStringValue(ErrorMessage); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } PeerAsnData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/PeeringData.Serialization.cs b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/PeeringData.Serialization.cs index 2927b9b3512a..3af34962d2b1 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/PeeringData.Serialization.cs +++ b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/PeeringData.Serialization.cs @@ -20,6 +20,15 @@ public partial class PeeringData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,44 +36,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio throw new FormatException($"The model {nameof(PeeringData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("sku"u8); writer.WriteObjectValue(Sku, options); writer.WritePropertyName("kind"u8); writer.WriteStringValue(Kind.ToString()); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Direct)) @@ -88,22 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } PeeringData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/PeeringRegisteredAsnData.Serialization.cs b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/PeeringRegisteredAsnData.Serialization.cs index 5724e5a42508..488acd3ee768 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/PeeringRegisteredAsnData.Serialization.cs +++ b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/PeeringRegisteredAsnData.Serialization.cs @@ -20,6 +20,15 @@ public partial class PeeringRegisteredAsnData : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(PeeringRegisteredAsnData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Asn)) @@ -66,22 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } PeeringRegisteredAsnData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/PeeringRegisteredPrefixData.Serialization.cs b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/PeeringRegisteredPrefixData.Serialization.cs index aca086f03479..34cc4f48ab64 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/PeeringRegisteredPrefixData.Serialization.cs +++ b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/PeeringRegisteredPrefixData.Serialization.cs @@ -20,6 +20,15 @@ public partial class PeeringRegisteredPrefixData : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(PeeringRegisteredPrefixData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Prefix)) @@ -76,22 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } PeeringRegisteredPrefixData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/PeeringServiceData.Serialization.cs b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/PeeringServiceData.Serialization.cs index 0ecdca3f25ac..887184d15c26 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/PeeringServiceData.Serialization.cs +++ b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/PeeringServiceData.Serialization.cs @@ -20,6 +20,15 @@ public partial class PeeringServiceData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,45 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(PeeringServiceData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Sku)) { writer.WritePropertyName("sku"u8); writer.WriteObjectValue(Sku, options); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(PeeringServiceLocation)) @@ -99,22 +75,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit writer.WriteObjectValue(LogAnalyticsWorkspaceProperties, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } PeeringServiceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/PeeringServicePrefixData.Serialization.cs b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/PeeringServicePrefixData.Serialization.cs index f3d3a9ec18c1..ca870281725f 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/PeeringServicePrefixData.Serialization.cs +++ b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/PeeringServicePrefixData.Serialization.cs @@ -20,6 +20,15 @@ public partial class PeeringServicePrefixData : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(PeeringServicePrefixData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Prefix)) @@ -91,22 +80,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } PeeringServicePrefixData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/autorest.md b/sdk/peering/Azure.ResourceManager.Peering/src/autorest.md index d340783baa26..1aee807aff21 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/src/autorest.md +++ b/sdk/peering/Azure.ResourceManager.Peering/src/autorest.md @@ -18,6 +18,7 @@ skip-csproj: true modelerfour: flatten-payloads: false use-model-reader-writer: true +use-write-core: true #mgmt-debug: # show-serialized-names: true diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.NUnit/Azure.Developer.MicrosoftPlaywrightTesting.NUnit.sln b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.NUnit/Azure.Developer.MicrosoftPlaywrightTesting.NUnit.sln new file mode 100644 index 000000000000..840be72bea43 --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.NUnit/Azure.Developer.MicrosoftPlaywrightTesting.NUnit.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.Developer.MicrosoftPlaywrightTesting.NUnit", "src\Azure.Developer.MicrosoftPlaywrightTesting.NUnit.csproj", "{CF3C8F52-D3FD-4338-9432-58FF4BF4475E}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.Developer.MicrosoftPlaywrightTesting.NUnit.Tests", "tests\Azure.Developer.MicrosoftPlaywrightTesting.NUnit.Tests.csproj", "{081210F2-A9F8-4137-97F4-5D5EF238B553}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {CF3C8F52-D3FD-4338-9432-58FF4BF4475E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CF3C8F52-D3FD-4338-9432-58FF4BF4475E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CF3C8F52-D3FD-4338-9432-58FF4BF4475E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CF3C8F52-D3FD-4338-9432-58FF4BF4475E}.Release|Any CPU.Build.0 = Release|Any CPU + {081210F2-A9F8-4137-97F4-5D5EF238B553}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {081210F2-A9F8-4137-97F4-5D5EF238B553}.Debug|Any CPU.Build.0 = Debug|Any CPU + {081210F2-A9F8-4137-97F4-5D5EF238B553}.Release|Any CPU.ActiveCfg = Release|Any CPU + {081210F2-A9F8-4137-97F4-5D5EF238B553}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.NUnit/CHANGELOG.md b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.NUnit/CHANGELOG.md new file mode 100644 index 000000000000..467aaa752dce --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.NUnit/CHANGELOG.md @@ -0,0 +1,18 @@ +# Release History + +## 1.0.0-beta.2 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + +## 1.0.0-beta.1 (2024-10-23) + +### Features Added + +- Added authentication using Microsoft Entra ID for the service. +- Added reporting capabilities for the service. You can now publish the reports and artifacts generated by Playwright OSS to the service. diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.NUnit/Directory.Build.props b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.NUnit/Directory.Build.props new file mode 100644 index 000000000000..63bd836ad44b --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.NUnit/Directory.Build.props @@ -0,0 +1,6 @@ + + + + diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.NUnit/README.md b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.NUnit/README.md new file mode 100644 index 000000000000..64c546b51d1d --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.NUnit/README.md @@ -0,0 +1,119 @@ +# Microsoft Azure Playwright Testing NUnit client library for .NET + +Microsoft Playwright Testing is a fully managed service that uses the cloud to enable you to run Playwright tests with much higher parallelization across different operating system-browser combinations simultaneously. This means faster test runs with broader scenario coverage, which helps speed up delivery of features without sacrificing quality. The service also enables you to publish test results and related artifacts to the service and view them in the service portal enabling faster and easier troubleshooting. With Microsoft Playwright Testing service, you can release features faster and more confidently. + +Ready to get started? Jump into our [quickstart guide]! + +## Useful links +- [Quickstart: Run end-to-end tests at scale](https://aka.ms/mpt/quickstart) +- [View Microsoft Playwright Testing service demo](https://youtu.be/GenC1jAeTZE) +- [Documentation](https://aka.ms/mpt/docs) +- [Pricing](https://aka.ms/mpt/pricing) +- [Share feedback](https://aka.ms/mpt/feedback) + +## Getting started + +### Install the package + +Install the client library for .NET with [NuGet](https://www.nuget.org/): + +```dotnetcli +dotnet add package Azure.Developer.MicrosoftPlaywrightTesting.NUnit --prerelease +``` + +### Prerequisites + +- An [Azure subscription](https://azure.microsoft.com/free/dotnet/) +- Your Azure account must be assigned the [Owner](https://learn.microsoft.com/azure/role-based-access-control/built-in-roles#owner), [Contributor](https://learn.microsoft.com/azure/role-based-access-control/built-in-roles#contributor), or one of the [classic administrator roles](https://learn.microsoft.com/azure/role-based-access-control/rbac-and-directory-admin-roles#classic-subscription-administrator-roles). + +### Authenticate the client + +To learn more about options for Microsoft Entra Id authentication, refer to [Azure.Identity credentials](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/identity/Azure.Identity#credentials). You can also refer to [our samples] on how to configurate different Azure Identity credentials. + +#### Create a Workspace + +1. Sign in to the [Playwright portal](https://aka.ms/mpt/portal) with your Azure account. + +2. Create the Workspace + + ![Create new workspace](https://github.com/microsoft/playwright-testing-service/assets/12104064/d571e86b-9d43-48ac-a2b7-63afb9bb86a8) + + |Field |Description | + |---------|---------| + |**Workspace Name** | A unique name to identify your workspace.
    The name can't contain special characters or whitespace. | + |**Azure Subscription** | Select an Azure subscription where you want to create the workspace. | + |**Region** | This is where test run data will be stored for your workspace. | + + > [!NOTE] + > If you don't see this screen, select an existing workspace and go to the next section. + ``` + +### Set up Microsoft Playwright Testing + +Create a file `PlaywrightServiceSetup.cs` in the root directory with the below content + +```C# Snippet:Sample2_SetDefaultAuthenticationMechanism +using Azure.Developer.MicrosoftPlaywrightTesting.NUnit; + +namespace PlaywrightTests; // Remember to change this as per your project namespace + +[SetUpFixture] +public class PlaywrightServiceSetup : PlaywrightServiceNUnit {}; +``` + +> [!NOTE] +> Make sure your project uses `Microsoft.Playwright.NUnit` version 1.37 or above. + +### Obtain region endpoint + +1. In the [Playwright portal](https://aka.ms/mpt/portal), copy the command under **Add region endpoint in your set up**. + + ![Set workspace endpoint](https://github.com/microsoft/playwright-testing-service/assets/12104064/d81ca629-2b23-4d34-8b70-67b6f7061a83) + + The endpoint URL corresponds to the workspace region. You might see a different endpoint URL in the Playwright portal, depending on the region you selected when creating the workspace. + +### Set up environment + +Ensure that the `PLAYWRIGHT_SERVICE_URL` that you obtained in previous step is available in your environment. + +### Run the tests + +Run Playwright tests against browsers managed by the service using the configuration you created above. + +```dotnetcli +dotnet test --logger "microsoft-playwright-testing" +``` + +## Key concepts + +Key concepts of the Microsoft Playwright Testing NUnit SDK for .NET can be found [here](https://aka.ms/mpt/what-is-mpt) + +## Examples + +Code samples for using this SDK can be found in the following locations +- [.NET Microsoft Playwright Testing NUnit Library Code Samples](https://aka.ms/mpt/sample) + +## Troubleshooting + +- File an issue via [GitHub Issues](https://github.com/Azure/azure-sdk-for-net/issues). +- Check [previous questions](https://stackoverflow.com/questions/tagged/azure+.net) or ask new ones on Stack Overflow using Azure and .NET tags. + +## Next steps + +- Run tests in a [CI/CD pipeline.](https://aka.ms/mpt/configure-pipeline) + +- Learn how to [manage access](https://aka.ms/mpt/manage-access) to the created workspace. + +- Experiment with different number of workers to [determine the optimal configuration of your test suite](https://aka.ms/mpt/parallelism). + +## Contributing +This project welcomes contributions and suggestions. Most contributions require +you to agree to a Contributor License Agreement (CLA) declaring that you have +the right to, and actually do, grant us the rights to use your contribution. For +details, visit [cla.microsoft.com][cla]. + +This project has adopted the [Microsoft Open Source Code of Conduct][coc]. +For more information see the [Code of Conduct FAQ][coc_faq] or contact +[opencode@microsoft.com][coc_contact] with any additional questions or comments. + +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-net/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.NUnit/README.png) \ No newline at end of file diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.NUnit/api/Azure.Developer.MicrosoftPlaywrightTesting.NUnit.netstandard2.0.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.NUnit/api/Azure.Developer.MicrosoftPlaywrightTesting.NUnit.netstandard2.0.cs new file mode 100644 index 000000000000..52f0189d991e --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.NUnit/api/Azure.Developer.MicrosoftPlaywrightTesting.NUnit.netstandard2.0.cs @@ -0,0 +1,13 @@ +namespace Azure.Developer.MicrosoftPlaywrightTesting.NUnit +{ + [NUnit.Framework.SetUpFixtureAttribute] + public partial class PlaywrightServiceNUnit : Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.PlaywrightService + { + public PlaywrightServiceNUnit(Azure.Core.TokenCredential? credential = null) : base (default(Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.PlaywrightServiceOptions), default(Azure.Core.TokenCredential)) { } + public static Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.PlaywrightServiceOptions playwrightServiceOptions { get { throw null; } } + [NUnit.Framework.OneTimeSetUpAttribute] + public System.Threading.Tasks.Task SetupAsync() { throw null; } + [NUnit.Framework.OneTimeTearDownAttribute] + public void Teardown() { } + } +} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.NUnit/samples/README.md b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.NUnit/samples/README.md new file mode 100644 index 000000000000..218796676686 --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.NUnit/samples/README.md @@ -0,0 +1,15 @@ +--- +page_type: sample +languages: +- csharp +products: +- azure +- playwright-testing +name: Azure.Developer.MicrosoftPlaywrightTesting.NUnit samples for .NET +description: Samples for the Azure.Developer.MicrosoftPlaywrightTesting.NUnit client library +--- + +# Azure.Developer.MicrosoftPlaywrightTesting.NUnit samples for .NET + +- [Customising service parameters] +- [Set default authentication mechanism] \ No newline at end of file diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.NUnit/samples/Sample1_CustomisingServiceParameters.md b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.NUnit/samples/Sample1_CustomisingServiceParameters.md new file mode 100644 index 000000000000..f6f772ea3150 --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.NUnit/samples/Sample1_CustomisingServiceParameters.md @@ -0,0 +1,113 @@ +## Learn about different available service parameters and how to use them + +Follow the steps listed in this [README] to integrate your existing Playwright test suite with the Microsoft Playwright Testing service. + +This guide explains the different options available to you in the Azure.Developer.MicrosoftPlaywrightTesting.NUnit package and how to use them. + +### Using .runsettings file + +1. Create a `.runsettings` file in the root directory: + +```xml + + + + + + + + + + + + + + + + + + +``` + + > [!NOTE] + > You can also modify the runid by setting the environment variable `PLAYWRIGHT_SERVICE_RUN_ID`. + +2. Run tests using the above `.runsettings` file: + +```dotnetcli +dotnet test --settings .runsettings +``` + +#### Known issue: Minimal support for Azure Identity library credentials + +This issue only impacts the reporting feature. Currently, the service provides minimal support for the following [Azure Credential types.](https://learn.microsoft.com/dotnet/api/overview/azure/identity-readme?view=azure-dotnet#credential-classes) + +Along with this, we also support passing a Managed Identity ClientId to be used along with `DefaultAzureCredential` and `ManagedIdentityCredential`. + +If you only want to use cloud-hosted browsers along with your tests, you can disable the reporting feature by removing the logger from the runsettings file and then modify the `PlaywrightServiceSetup.cs` file as per the following. + +```C# Snippet:Sample1_CustomisingServiceParameters +using Azure.Core; +using Azure.Developer.MicrosoftPlaywrightTesting.NUnit; +using Azure.Identity; + +namespace PlaywrightTests; + +[SetUpFixture] +public class PlaywrightServiceSetup : PlaywrightServiceNUnit +{ + public static readonly TokenCredential managedIdentityCredential = new ManagedIdentityCredential(); + + public PlaywrightServiceSetup() : base(managedIdentityCredential) {} +} +``` + +## Options + +1. **`Os`**: + - **Description**: This setting allows you to choose the operating system where the browsers running Playwright tests will be hosted. + - **Available Options**: + - `System.Runtime.InteropServices.OSPlatform.Windows` for Windows OS. + - `System.Runtime.InteropServices.OSPlatform.LINUX` for Linux OS. + - **Default Value**: `System.Runtime.InteropServices.OSPlatform.LINUX` + +2. **`RunId`**: + - **Description**: This setting allows you to set a unique ID for every test run to distinguish them in the service portal. + +3. **`ExposeNetwork`**: + - **Description**: This settings exposes network available on the connecting client to the browser being connected to. + +4. **`ServiceAuthType`** + - **Description**: This setting allows you to specify the default authentication mechanism to be used for sending requests to the service. + - **Available Options**: + - `ServiceAuthType.EntraId` for Microsoft Entra ID authentication. + - `ServiceAuthType.AccessToken` for MPT Access Token authentication. + - **Default Value**: `ServiceAuthType.EntraId` + +5. **`UseCloudHostedBrowsers`** + - **Description**: This setting allows you to select whether to use cloud-hosted browsers to run your Playwright tests. Reporting features remain available even if you disable this setting. + - **Default Value**: `true` + +6. **`AzureTokenCredentialType`**: + - **Description**: This setting allows you to select the authentication method you want to use with Entra. + - **Available Options**: + - `AzureTokenCredentialType.EnvironmentCredential` + - `AzureTokenCredentialType.WorkloadIdentityCredential` + - `AzureTokenCredentialType.ManagedIdentityCredential` + - `AzureTokenCredentialType.SharedTokenCacheCredential` + - `AzureTokenCredentialType.VisualStudioCredential` + - `AzureTokenCredentialType.VisualStudioCodeCredential` + - `AzureTokenCredentialType.AzureCliCredential` + - `AzureTokenCredentialType.AzurePowerShellCredential` + - `AzureTokenCredentialType.AzureDeveloperCliCredential` + - `AzureTokenCredentialType.InteractiveBrowserCredential` + - `AzureTokenCredentialType.DefaultAzureCredential` + - **Default Value**: `AzureTokenCredentialType.DefaultAzureCredential` + +7. **`ManagedIdentityClientId`** + - **Description**: This setting allows you to specify the managed identity client id to be used for Microsoft Entra Id authentication. + +8. **`EnableGitHubSummary`**: + - **Description**: This setting allows you to configure the Microsoft Playwright Testing service reporter. You can choose whether to include the test run summary in the GitHub summary when running in GitHub Actions. + - **Default Value**: `true` + diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.NUnit/samples/Sample2_SetDefaultAuthenticationMechanism.md b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.NUnit/samples/Sample2_SetDefaultAuthenticationMechanism.md new file mode 100644 index 000000000000..4c9c94f52a49 --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.NUnit/samples/Sample2_SetDefaultAuthenticationMechanism.md @@ -0,0 +1,57 @@ +# How to authenticate to Microsoft Playwright Testing service using service access token. + +Follow the steps listed in this [README] to integrate your existing Playwright test suite with the Microsoft Playwright Testing service. + +This guide will walk you through the steps to integrate your Playwright project where you are launching browsers from within the tests with the service. + +### Setup Microsoft Playwright Testing + +1. Create a file `PlaywrightServiceSetup.cs` in the root directory with the following + +```C# Snippet:Sample2_SetDefaultAuthenticationMechanism +using Azure.Developer.MicrosoftPlaywrightTesting.NUnit; + +namespace PlaywrightTests; // Remember to change this as per your project namespace + +[SetUpFixture] +public class PlaywrightServiceSetup : PlaywrightServiceNUnit {}; +``` + +2. Create a .runsettings file to modify default authentication mechanism. + +```xml + + + + + + + +``` + +> [!NOTE] +> Make sure your project uses Microsoft.Playwright.NUnit version 1.37 or above. + +### Obtain region endpoint + +1. In the [Playwright portal](https://aka.ms/mpt/portal), copy the command under **Add region endpoint in your set up**. + + ![Set workspace endpoint](https://github.com/microsoft/playwright-testing-service/assets/12104064/d81ca629-2b23-4d34-8b70-67b6f7061a83) + + The endpoint URL corresponds to the workspace region. You might see a different endpoint URL in the Playwright portal, depending on the region you selected when creating the workspace. + +### Set up environment + +Ensure that the `PLAYWRIGHT_SERVICE_URL` that you obtained in previous step is available in your environment. + +### Authenticate the client + +To learn more about options for Microsoft Entra Id authentication, refer to [Azure.Identity credentials](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/identity/Azure.Identity#credentials). You can also refer to [our samples] on how to configurate different Azure Identity credentials. + +### Run the tests + +Run Playwright tests against browsers managed by the service using the configuration you created above. + +```dotnetcli +dotnet test --settings .runsettings +``` \ No newline at end of file diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.NUnit/src/Azure.Developer.MicrosoftPlaywrightTesting.NUnit.csproj b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.NUnit/src/Azure.Developer.MicrosoftPlaywrightTesting.NUnit.csproj new file mode 100644 index 000000000000..f31c53fc64d1 --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.NUnit/src/Azure.Developer.MicrosoftPlaywrightTesting.NUnit.csproj @@ -0,0 +1,17 @@ + + + Azure, Cloud, Playwright, Playwright Service, Reporting, Playwright Testing + + Package to integrate your Playwright test suite with Microsoft Playwright Testing + service + + 1.0.0-beta.2 + true + $(RequiredTargetFrameworks) + enable + + + + + + \ No newline at end of file diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.NUnit/src/PlaywrightServiceNUnit.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.NUnit/src/PlaywrightServiceNUnit.cs new file mode 100644 index 000000000000..c943468e3cdf --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.NUnit/src/PlaywrightServiceNUnit.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Core; +using NUnit.Framework; +using System.Threading.Tasks; +using System.Runtime.InteropServices; +using System.Threading; +using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger; + +namespace Azure.Developer.MicrosoftPlaywrightTesting.NUnit; + +///

    +/// NUnit setup fixture to initialize Playwright Service. +/// +[SetUpFixture] +public class PlaywrightServiceNUnit : PlaywrightService +{ + /// + /// Initializes a new instance of the class. + /// + /// The azure token credential to use for authentication. + public PlaywrightServiceNUnit(TokenCredential? credential = null) + : base(playwrightServiceOptions, credential: credential) + { + } + + /// + /// Creates a new instance of based on the runsettings file. + /// + public static PlaywrightServiceOptions playwrightServiceOptions { get; } = new( + os: GetOsPlatform(TestContext.Parameters.Get(RunSettingKey.Os)), + runId: TestContext.Parameters.Get(RunSettingKey.RunId), + exposeNetwork: TestContext.Parameters.Get(RunSettingKey.ExposeNetwork), + serviceAuth: TestContext.Parameters.Get(RunSettingKey.ServiceAuthType), + useCloudHostedBrowsers: TestContext.Parameters.Get(RunSettingKey.UseCloudHostedBrowsers), + azureTokenCredentialType: TestContext.Parameters.Get(RunSettingKey.AzureTokenCredentialType), + managedIdentityClientId: TestContext.Parameters.Get(RunSettingKey.ManagedIdentityClientId) + ); + + /// + /// Setup the resources utilized by Playwright service. + /// + /// + [OneTimeSetUp] + public async Task SetupAsync() + { + await InitializeAsync().ConfigureAwait(false); + } + + /// + /// Tear down resources utilized by Playwright service. + /// + [OneTimeTearDown] + public void Teardown() + { + Cleanup(); + } + + private static OSPlatform? GetOsPlatform(string? os) + { + if (string.IsNullOrEmpty(os)) + { + return null; + } + else if (os!.Equals("Windows", System.StringComparison.OrdinalIgnoreCase)) + { + return OSPlatform.Windows; + } + else if (os.Equals("Linux", System.StringComparison.OrdinalIgnoreCase)) + { + return OSPlatform.Linux; + } + return null; + } +} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.NUnit/tests/Azure.Developer.MicrosoftPlaywrightTesting.NUnit.Tests.csproj b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.NUnit/tests/Azure.Developer.MicrosoftPlaywrightTesting.NUnit.Tests.csproj new file mode 100644 index 000000000000..876d71881eb3 --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.NUnit/tests/Azure.Developer.MicrosoftPlaywrightTesting.NUnit.Tests.csproj @@ -0,0 +1,23 @@ + + + + enable + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.NUnit/tests/samples/README.md b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.NUnit/tests/samples/README.md new file mode 100644 index 000000000000..ecd5c103e8fe --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.NUnit/tests/samples/README.md @@ -0,0 +1,3 @@ +Source files in this directory are written as tests from which samples are extracted. +They are not intended to be viewed directly and help ensure our samples compile and work correctly. +See our [list of samples](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.NUnit/samples) for more explanation about how to use this client library. \ No newline at end of file diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.NUnit/tests/samples/Sample1_CustomisingServiceParameters.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.NUnit/tests/samples/Sample1_CustomisingServiceParameters.cs new file mode 100644 index 000000000000..17d6d47fccc6 --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.NUnit/tests/samples/Sample1_CustomisingServiceParameters.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#region Snippet:Sample1_CustomisingServiceParameters +using Azure.Core; +using Azure.Developer.MicrosoftPlaywrightTesting.NUnit; +using Azure.Identity; + +namespace PlaywrightTests; + +[SetUpFixture] +#if SNIPPET +public class PlaywrightServiceSetup : PlaywrightServiceNUnit +#else +public class Sample1ServiceSetup : PlaywrightServiceNUnit +#endif +{ + public static readonly TokenCredential managedIdentityCredential = new ManagedIdentityCredential(); + +#if SNIPPET + public PlaywrightServiceSetup() : base(managedIdentityCredential) {} +#else + public Sample1ServiceSetup() : base(managedIdentityCredential) {} +#endif +} +#endregion \ No newline at end of file diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.NUnit/tests/samples/Sample2_SetDefaultAuthenticationMechanism.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.NUnit/tests/samples/Sample2_SetDefaultAuthenticationMechanism.cs new file mode 100644 index 000000000000..1c422e8157a9 --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.NUnit/tests/samples/Sample2_SetDefaultAuthenticationMechanism.cs @@ -0,0 +1,15 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#region Snippet:Sample2_SetDefaultAuthenticationMechanism +using Azure.Developer.MicrosoftPlaywrightTesting.NUnit; + +namespace PlaywrightTests; // Remember to change this as per your project namespace + +[SetUpFixture] +#if SNIPPET +public class PlaywrightServiceSetup : PlaywrightServiceNUnit {}; +#else +public class Sample2ServiceSetup : PlaywrightServiceNUnit { }; +#endif +#endregion \ No newline at end of file diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.sln b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.sln new file mode 100644 index 000000000000..127dd846d079 --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.sln @@ -0,0 +1,31 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.Developer.MicrosoftPlaywrightTesting.TestLogger", "src\Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.csproj", "{2C1F9880-AD7D-433E-A73E-43F503772CD8}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Tests", "tests\Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Tests.csproj", "{6C78D318-9B96-43B4-97A7-7B3C8088983C}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {2C1F9880-AD7D-433E-A73E-43F503772CD8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2C1F9880-AD7D-433E-A73E-43F503772CD8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2C1F9880-AD7D-433E-A73E-43F503772CD8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2C1F9880-AD7D-433E-A73E-43F503772CD8}.Release|Any CPU.Build.0 = Release|Any CPU + {6C78D318-9B96-43B4-97A7-7B3C8088983C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6C78D318-9B96-43B4-97A7-7B3C8088983C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6C78D318-9B96-43B4-97A7-7B3C8088983C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6C78D318-9B96-43B4-97A7-7B3C8088983C}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {C3BE422E-8FFF-4EF8-BA89-186F153965D8} + EndGlobalSection +EndGlobal diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/CHANGELOG.md b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/CHANGELOG.md new file mode 100644 index 000000000000..467aaa752dce --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/CHANGELOG.md @@ -0,0 +1,18 @@ +# Release History + +## 1.0.0-beta.2 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + +## 1.0.0-beta.1 (2024-10-23) + +### Features Added + +- Added authentication using Microsoft Entra ID for the service. +- Added reporting capabilities for the service. You can now publish the reports and artifacts generated by Playwright OSS to the service. diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/Directory.Build.props b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/Directory.Build.props new file mode 100644 index 000000000000..63bd836ad44b --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/Directory.Build.props @@ -0,0 +1,6 @@ + + + + diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/README.md b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/README.md new file mode 100644 index 000000000000..34bbeced75f6 --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/README.md @@ -0,0 +1,66 @@ +# Microsoft Azure Playwright Testing client library for .NET + +Microsoft Playwright Testing is a fully managed service that uses the cloud to enable you to run Playwright tests with much higher parallelization across different operating system-browser combinations simultaneously. This means faster test runs with broader scenario coverage, which helps speed up delivery of features without sacrificing quality. The service also enables you to publish test results and related artifacts to the service and view them in the service portal enabling faster and easier troubleshooting. With Microsoft Playwright Testing service, you can release features faster and more confidently. + +## Getting started + +### Install the package + +Install the client library for .NET with [NuGet](https://www.nuget.org/): + +```dotnetcli +dotnet add package Azure.Developer.MicrosoftPlaywrightTesting.TestLogger --prerelease +``` + +### Authenticate the client + +To learn more about options for Microsoft Entra Id authentication, refer to [Azure.Identity credentials](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/identity/Azure.Identity#credentials). You can also refer to [our samples] on how to configurate different Azure Identity credentials. + +### Prerequisites + +- An [Azure subscription](https://azure.microsoft.com/free/dotnet/) +- Your Azure account must be assigned the [Owner](https://learn.microsoft.com/azure/role-based-access-control/built-in-roles#owner), [Contributor](https://learn.microsoft.com/azure/role-based-access-control/built-in-roles#contributor), or one of the [classic administrator roles](https://learn.microsoft.com/azure/role-based-access-control/rbac-and-directory-admin-roles#classic-subscription-administrator-roles). + +## Useful links +- [Quickstart: Run end-to-end tests at scale](https://aka.ms/mpt/quickstart) +- [Quickstart: Set up continuous end-to-end testing across different browsers and operating systems](https://aka.ms/mpt/ci) +- [Explore features and benefits](https://aka.ms/mpt/about) +- [View Microsoft Playwright Testing service demo](https://youtu.be/GenC1jAeTZE) +- [Documentation](https://aka.ms/mpt/docs) +- [Pricing](https://aka.ms/mpt/pricing) +- [Share feedback](https://aka.ms/mpt/feedback) + +## Key concepts + +Key concepts of the Microsoft Playwright Testing NUnit SDK for .NET can be found [here](https://aka.ms/mpt/what-is-mpt) + +## Examples + +Code samples for using this SDK can be found in the following locations +- [.NET Microsoft Playwright Testing NUnit Library Code Samples](https://aka.ms/mpt/sample) + +## Troubleshooting + +- File an issue via [GitHub Issues](https://github.com/Azure/azure-sdk-for-net/issues). +- Check [previous questions](https://stackoverflow.com/questions/tagged/azure+.net) or ask new ones on Stack Overflow using Azure and .NET tags. + +## Next steps + +- Run tests in a [CI/CD pipeline.](https://aka.ms/mpt/configure-pipeline) + +- Learn how to [manage access](https://aka.ms/mpt/manage-access) to the created workspace. + +- Experiment with different number of workers to [determine the optimal configuration of your test suite](https://aka.ms/mpt/parallelism). + +## Contributing + +This project welcomes contributions and suggestions. Most contributions require +you to agree to a Contributor License Agreement (CLA) declaring that you have +the right to, and actually do, grant us the rights to use your contribution. For +details, visit [cla.microsoft.com][cla]. + +This project has adopted the [Microsoft Open Source Code of Conduct][coc]. +For more information see the [Code of Conduct FAQ][coc_faq] or contact +[opencode@microsoft.com][coc_contact] with any additional questions or comments. + +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-net/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/README.png) \ No newline at end of file diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/api/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.netstandard2.0.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/api/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.netstandard2.0.cs new file mode 100644 index 000000000000..b961eccd0a9b --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/api/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.netstandard2.0.cs @@ -0,0 +1,64 @@ +namespace Azure.Developer.MicrosoftPlaywrightTesting.TestLogger +{ + public partial class ConnectOptions where T : class, new() + { + public ConnectOptions() { } + public T? Options { get { throw null; } set { } } + public string? WsEndpoint { get { throw null; } set { } } + } + public partial class PlaywrightService + { + public PlaywrightService(Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.PlaywrightServiceOptions playwrightServiceOptions, Azure.Core.TokenCredential? credential = null) { } + public PlaywrightService(System.Runtime.InteropServices.OSPlatform? os = default(System.Runtime.InteropServices.OSPlatform?), string? runId = null, string? exposeNetwork = null, string? serviceAuth = null, bool? useCloudHostedBrowsers = default(bool?), Azure.Core.TokenCredential? credential = null) { } + public System.Threading.Timer? RotationTimer { get { throw null; } set { } } + public string ServiceAuth { get { throw null; } set { } } + public static string? ServiceEndpoint { get { throw null; } } + public bool UseCloudHostedBrowsers { get { throw null; } set { } } + public void Cleanup() { } + public System.Threading.Tasks.Task> GetConnectOptionsAsync(System.Runtime.InteropServices.OSPlatform? os = default(System.Runtime.InteropServices.OSPlatform?), string? runId = null, string? exposeNetwork = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) where T : class, new() { throw null; } + public System.Threading.Tasks.Task InitializeAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class PlaywrightServiceOptions + { + public PlaywrightServiceOptions(System.Runtime.InteropServices.OSPlatform? os = default(System.Runtime.InteropServices.OSPlatform?), string? runId = null, string? exposeNetwork = null, string? serviceAuth = null, string? useCloudHostedBrowsers = null, string? azureTokenCredentialType = null, string? managedIdentityClientId = null) { } + } + public partial class RunSettingKey + { + public static readonly string AzureTokenCredentialType; + public static readonly string EnableGitHubSummary; + public static readonly string EnableResultPublish; + public static readonly string ExposeNetwork; + public static readonly string ManagedIdentityClientId; + public static readonly string Os; + public static readonly string RunId; + public static readonly string ServiceAuthType; + public static readonly string UseCloudHostedBrowsers; + public RunSettingKey() { } + } + public partial class ServiceAuthType + { + public static readonly string AccessToken; + public static readonly string EntraId; + public ServiceAuthType() { } + } + public partial class ServiceEnvironmentVariable + { + public static readonly string PlaywrightServiceAccessToken; + public static readonly string PlaywrightServiceExposeNetwork; + public static readonly string PlaywrightServiceOs; + public static readonly string PlaywrightServiceRunId; + public static readonly string PlaywrightServiceUri; + public ServiceEnvironmentVariable() { } + } +} +namespace Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Client +{ + public partial class TestReportingClientOptions : Azure.Core.ClientOptions + { + public TestReportingClientOptions(Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Client.TestReportingClientOptions.ServiceVersion version = Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Client.TestReportingClientOptions.ServiceVersion.V2024_09_01_Preview) { } + public enum ServiceVersion + { + V2024_09_01_Preview = 1, + } + } +} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/AssemblyInfo.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/AssemblyInfo.cs new file mode 100644 index 000000000000..a50e22574711 --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/AssemblyInfo.cs @@ -0,0 +1,7 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.Runtime.CompilerServices; + +[assembly: InternalsVisibleTo("Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100d15ddcb29688295338af4b7686603fe614abd555e09efba8fb88ee09e1f7b1ccaeed2e8f823fa9eef3fdd60217fc012ea67d2479751a0b8c087a4185541b851bd8b16f8d91b840e51b1cb0ba6fe647997e57429265e85ef62d565db50a69ae1647d54d7bd855e4db3d8a91510e5bcbd0edfbbecaa20a7bd9ae74593daa7b11b4")] +[assembly: InternalsVisibleTo("DynamicProxyGenAssembly2, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c547cac37abd99c8db225ef2f6c8a3602f3b3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9266654753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d15605093924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7d3113e92484cf7045cc7")] diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.csproj b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.csproj new file mode 100644 index 000000000000..c038bdbe6b46 --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.csproj @@ -0,0 +1,21 @@ + + + Azure, Cloud, Playwright, Playwright Service, Reporting, Playwright Testing + + Package to integrate your Playwright test suite with Microsoft Playwright Testing + service + + 1.0.0-beta.2 + true + $(RequiredTargetFrameworks) + enable + true + + + + + + + + + \ No newline at end of file diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Client/Internal/Argument.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Client/Internal/Argument.cs new file mode 100644 index 000000000000..825022ea323c --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Client/Internal/Argument.cs @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; + +namespace Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Client +{ + internal static class Argument + { + public static void AssertNotNull(T value, string name) + { + if (value is null) + { + throw new ArgumentNullException(name); + } + } + + public static void AssertNotNull(T? value, string name) + where T : struct + { + if (!value.HasValue) + { + throw new ArgumentNullException(name); + } + } + + public static void AssertNotNullOrEmpty(IEnumerable value, string name) + { + if (value is null) + { + throw new ArgumentNullException(name); + } + if (value is ICollection collectionOfT && collectionOfT.Count == 0) + { + throw new ArgumentException("Value cannot be an empty collection.", name); + } + if (value is ICollection collection && collection.Count == 0) + { + throw new ArgumentException("Value cannot be an empty collection.", name); + } + using IEnumerator e = value.GetEnumerator(); + if (!e.MoveNext()) + { + throw new ArgumentException("Value cannot be an empty collection.", name); + } + } + + public static void AssertNotNullOrEmpty(string value, string name) + { + if (value is null) + { + throw new ArgumentNullException(name); + } + if (value.Length == 0) + { + throw new ArgumentException("Value cannot be an empty string.", name); + } + } + + public static void AssertNotNullOrWhiteSpace(string value, string name) + { + if (value is null) + { + throw new ArgumentNullException(name); + } + if (string.IsNullOrWhiteSpace(value)) + { + throw new ArgumentException("Value cannot be empty or contain only white-space characters.", name); + } + } + + public static void AssertNotDefault(ref T value, string name) + where T : struct, IEquatable + { + if (value.Equals(default)) + { + throw new ArgumentException("Value cannot be empty.", name); + } + } + + public static void AssertInRange(T value, T minimum, T maximum, string name) + where T : notnull, IComparable + { + if (minimum.CompareTo(value) > 0) + { + throw new ArgumentOutOfRangeException(name, "Value is less than the minimum allowed."); + } + if (maximum.CompareTo(value) < 0) + { + throw new ArgumentOutOfRangeException(name, "Value is greater than the maximum allowed."); + } + } + + public static void AssertEnumDefined(Type enumType, object value, string name) + { + if (!Enum.IsDefined(enumType, value)) + { + throw new ArgumentException($"Value not defined for {enumType.FullName}.", name); + } + } + + public static T CheckNotNull(T value, string name) + where T : class + { + AssertNotNull(value, name); + return value; + } + + public static string CheckNotNullOrEmpty(string value, string name) + { + AssertNotNullOrEmpty(value, name); + return value; + } + + public static void AssertNull(T value, string name, string message = null) + { + if (value != null) + { + throw new ArgumentException(message ?? "Value must be null.", name); + } + } + } +} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Client/TestReportingClient.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Client/TestReportingClient.cs new file mode 100644 index 000000000000..12944db1f0f6 --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Client/TestReportingClient.cs @@ -0,0 +1,473 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Client +{ + // Data plane generated client. + /// The TestReporting service client. + internal partial class TestReportingClient + { + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// The ClientDiagnostics is used to provide tracing support for the client library. + internal ClientDiagnostics ClientDiagnostics { get; } + + /// The HTTP pipeline for sending and receiving REST requests and responses. + public virtual HttpPipeline Pipeline => _pipeline; + + /// Initializes a new instance of TestReportingClient for mocking. + protected TestReportingClient() + { + } + + /// Initializes a new instance of TestReportingClient. + /// server parameter. + /// is null. + public TestReportingClient(Uri endpoint) : this(endpoint, new TestReportingClientOptions()) + { + } + + /// Initializes a new instance of TestReportingClient. + /// server parameter. + /// The options for configuring the client. + /// is null. + public TestReportingClient(Uri endpoint, TestReportingClientOptions options) + { + Argument.AssertNotNull(endpoint, nameof(endpoint)); + options ??= new TestReportingClientOptions(); + + ClientDiagnostics = new ClientDiagnostics(options, true); + _pipeline = HttpPipelineBuilder.Build(options, Array.Empty(), Array.Empty(), new ResponseClassifier()); + _endpoint = endpoint; + _apiVersion = options.Version; + } + + /// + /// [Protocol Method] + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The to use. + /// The content to send as the body of the request. + /// access token. + /// Correlation-id used for tracing and debugging. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + public virtual async Task UploadBatchTestResultsAsync(string workspaceId, RequestContent content, string authorization = null, string xCorrelationId = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(workspaceId, nameof(workspaceId)); + + using var scope = ClientDiagnostics.CreateScope("TestReportingClient.UploadBatchTestResults"); + scope.Start(); + try + { + using HttpMessage message = CreateUploadBatchTestResultsRequest(workspaceId, content, authorization, xCorrelationId, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The to use. + /// The content to send as the body of the request. + /// access token. + /// Correlation-id used for tracing and debugging. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + public virtual Response UploadBatchTestResults(string workspaceId, RequestContent content, string authorization = null, string xCorrelationId = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(workspaceId, nameof(workspaceId)); + + using var scope = ClientDiagnostics.CreateScope("TestReportingClient.UploadBatchTestResults"); + scope.Start(); + try + { + using HttpMessage message = CreateUploadBatchTestResultsRequest(workspaceId, content, authorization, xCorrelationId, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The to use. + /// The to use. + /// The content to send as the body of the request. + /// access token. + /// Correlation-id used for tracing and debugging. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + public virtual async Task PatchTestRunInfoAsync(string workspaceId, string testRunId, RequestContent content, string authorization = null, string xCorrelationId = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(workspaceId, nameof(workspaceId)); + Argument.AssertNotNullOrEmpty(testRunId, nameof(testRunId)); + + using var scope = ClientDiagnostics.CreateScope("TestReportingClient.PatchTestRunInfo"); + scope.Start(); + try + { + using HttpMessage message = CreatePatchTestRunInfoRequest(workspaceId, testRunId, content, authorization, xCorrelationId, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The to use. + /// The to use. + /// The content to send as the body of the request. + /// access token. + /// Correlation-id used for tracing and debugging. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + public virtual Response PatchTestRunInfo(string workspaceId, string testRunId, RequestContent content, string authorization = null, string xCorrelationId = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(workspaceId, nameof(workspaceId)); + Argument.AssertNotNullOrEmpty(testRunId, nameof(testRunId)); + + using var scope = ClientDiagnostics.CreateScope("TestReportingClient.PatchTestRunInfo"); + scope.Start(); + try + { + using HttpMessage message = CreatePatchTestRunInfoRequest(workspaceId, testRunId, content, authorization, xCorrelationId, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The to use. + /// The to use. + /// access token. + /// Correlation-id used for tracing and debugging. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + public virtual async Task GetTestRunResultsUriAsync(string workspaceId, string testRunId, string authorization, string xCorrelationId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(workspaceId, nameof(workspaceId)); + Argument.AssertNotNullOrEmpty(testRunId, nameof(testRunId)); + + using var scope = ClientDiagnostics.CreateScope("TestReportingClient.GetTestRunResultsUri"); + scope.Start(); + try + { + using HttpMessage message = CreateGetTestRunResultsUriRequest(workspaceId, testRunId, authorization, xCorrelationId, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The to use. + /// The to use. + /// access token. + /// Correlation-id used for tracing and debugging. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + public virtual Response GetTestRunResultsUri(string workspaceId, string testRunId, string authorization, string xCorrelationId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(workspaceId, nameof(workspaceId)); + Argument.AssertNotNullOrEmpty(testRunId, nameof(testRunId)); + + using var scope = ClientDiagnostics.CreateScope("TestReportingClient.GetTestRunResultsUri"); + scope.Start(); + try + { + using HttpMessage message = CreateGetTestRunResultsUriRequest(workspaceId, testRunId, authorization, xCorrelationId, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The to use. + /// The to use. + /// The content to send as the body of the request. + /// Body Parameter content-type. Allowed values: "application/*+json" | "application/json" | "application/json-patch+json" | "text/json". + /// access token. + /// Correlation-id used for tracing and debugging. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + public virtual async Task PostTestRunShardInfoAsync(string workspaceId, string testRunId, RequestContent content, ContentType contentType, string authorization = null, string xCorrelationId = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(workspaceId, nameof(workspaceId)); + Argument.AssertNotNullOrEmpty(testRunId, nameof(testRunId)); + + using var scope = ClientDiagnostics.CreateScope("TestReportingClient.PostTestRunShardInfo"); + scope.Start(); + try + { + using HttpMessage message = CreatePostTestRunShardInfoRequest(workspaceId, testRunId, content, contentType, authorization, xCorrelationId, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The to use. + /// The to use. + /// The content to send as the body of the request. + /// Body Parameter content-type. Allowed values: "application/*+json" | "application/json" | "application/json-patch+json" | "text/json". + /// access token. + /// Correlation-id used for tracing and debugging. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + public virtual Response PostTestRunShardInfo(string workspaceId, string testRunId, RequestContent content, ContentType contentType, string authorization = null, string xCorrelationId = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(workspaceId, nameof(workspaceId)); + Argument.AssertNotNullOrEmpty(testRunId, nameof(testRunId)); + + using var scope = ClientDiagnostics.CreateScope("TestReportingClient.PostTestRunShardInfo"); + scope.Start(); + try + { + using HttpMessage message = CreatePostTestRunShardInfoRequest(workspaceId, testRunId, content, contentType, authorization, xCorrelationId, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + internal HttpMessage CreateUploadBatchTestResultsRequest(string workspaceId, RequestContent content, string authorization, string xCorrelationId, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/workspaces/", false); + uri.AppendPath(workspaceId, true); + uri.AppendPath("/test-results/upload-batch", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + if (authorization != null) + { + request.Headers.Add("Authorization", authorization); + } + if (xCorrelationId != null) + { + request.Headers.Add("x-correlation-id", xCorrelationId); + } + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + + internal HttpMessage CreatePatchTestRunInfoRequest(string workspaceId, string testRunId, RequestContent content, string authorization, string xCorrelationId, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/workspaces/", false); + uri.AppendPath(workspaceId, true); + uri.AppendPath("/test-runs/", false); + uri.AppendPath(testRunId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + if (authorization != null) + { + request.Headers.Add("Authorization", authorization); + } + if (xCorrelationId != null) + { + request.Headers.Add("x-correlation-id", xCorrelationId); + } + request.Headers.Add("Content-Type", "application/merge-patch+json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateGetTestRunResultsUriRequest(string workspaceId, string testRunId, string authorization, string xCorrelationId, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/workspaces/", false); + uri.AppendPath(workspaceId, true); + uri.AppendPath("/test-runs/", false); + uri.AppendPath(testRunId, true); + uri.AppendPath(":createartifactsuploadbaseuri", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + if (authorization != null) + { + request.Headers.Add("Authorization", authorization); + } + if (xCorrelationId != null) + { + request.Headers.Add("x-correlation-id", xCorrelationId); + } + return message; + } + + internal HttpMessage CreatePostTestRunShardInfoRequest(string workspaceId, string testRunId, RequestContent content, ContentType contentType, string authorization, string xCorrelationId, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/workspaces/", false); + uri.AppendPath(workspaceId, true); + uri.AppendPath("/test-runs/", false); + uri.AppendPath(testRunId, true); + uri.AppendPath(":updateshardexecutionstatus", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + if (authorization != null) + { + request.Headers.Add("Authorization", authorization); + } + if (xCorrelationId != null) + { + request.Headers.Add("x-correlation-id", xCorrelationId); + } + request.Headers.Add("Content-Type", contentType.ToString()); + request.Content = content; + return message; + } + + private static ResponseClassifier _responseClassifier200; + private static ResponseClassifier ResponseClassifier200 => _responseClassifier200 ??= new StatusCodeClassifier(stackalloc ushort[] { 200 }); + } +} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Client/TestReportingClientOptions.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Client/TestReportingClientOptions.cs new file mode 100644 index 000000000000..8416fd53cc7b --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Client/TestReportingClientOptions.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Client +{ + /// Client options for TestReportingClient. + public partial class TestReportingClientOptions : ClientOptions + { + private const ServiceVersion LatestVersion = ServiceVersion.V2024_09_01_Preview; + + /// The version of the service to use. + public enum ServiceVersion + { + /// Service version "2024-09-01-preview". + V2024_09_01_Preview = 1, + } + + internal string Version { get; } + + /// Initializes new instance of TestReportingClientOptions. + public TestReportingClientOptions(ServiceVersion version = LatestVersion) + { + Version = version switch + { + ServiceVersion.V2024_09_01_Preview => "2024-09-01-preview", + _ => throw new NotSupportedException() + }; + } + } +} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/ConnectOptions.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/ConnectOptions.cs new file mode 100644 index 000000000000..7b0b6e1fc17a --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/ConnectOptions.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.Collections.Generic; + +namespace Azure.Developer.MicrosoftPlaywrightTesting.TestLogger; + +/// +/// Represents the connect options for a generic type. +/// +/// The type parameter. +public class ConnectOptions where T : class, new() +{ + /// + /// A browser websocket endpoint to connect to. + /// + public string? WsEndpoint { get; set; } + /// + /// Connect options for the service. + /// + public T? Options { get; set; } +} + +internal class BrowserConnectOptions +{ + public string? ExposeNetwork { get; set; } + public IEnumerable>? Headers { get; set; } + public float? SlowMo { get; set; } + public float? Timeout { get; set; } +} + +internal static class BrowserConnectOptionsConverter +{ + public static T Convert(object source) where T : class, new() + { + var target = new T(); + System.Type sourceType = source.GetType(); + System.Type targetType = typeof(T); + + foreach (System.Reflection.PropertyInfo? sourceProperty in sourceType.GetProperties()) + { + System.Reflection.PropertyInfo targetProperty = targetType.GetProperty(sourceProperty.Name); + if (targetProperty != null && targetProperty.CanWrite) + { + targetProperty.SetValue(target, sourceProperty.GetValue(source)); + } + } + + return target; + } +} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Constants.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Constants.cs new file mode 100644 index 000000000000..6b2559845d2f --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Constants.cs @@ -0,0 +1,406 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Utility; +using System.Collections.Generic; +using System.Text.RegularExpressions; + +namespace Azure.Developer.MicrosoftPlaywrightTesting.TestLogger; + +/// +/// Contains environment variable names used by the Playwright service. +/// +public class ServiceEnvironmentVariable +{ + /// + /// The environment variable for the Playwright service access token. + /// + public static readonly string PlaywrightServiceAccessToken = "PLAYWRIGHT_SERVICE_ACCESS_TOKEN"; + + /// + /// The environment variable for the Playwright service URL. + /// + public static readonly string PlaywrightServiceUri = "PLAYWRIGHT_SERVICE_URL"; + + /// + /// The environment variable for exposing the Playwright service network. + /// + public static readonly string PlaywrightServiceExposeNetwork = "PLAYWRIGHT_SERVICE_EXPOSE_NETWORK"; + + /// + /// The environment variable for the Playwright service operating system. + /// + public static readonly string PlaywrightServiceOs = "PLAYWRIGHT_SERVICE_OS"; + + /// + /// The environment variable for the Playwright service run ID. + /// + public static readonly string PlaywrightServiceRunId = "PLAYWRIGHT_SERVICE_RUN_ID"; +}; + +/// +/// Contains constants for supported operating systems on Microsoft Playwright Testing. +/// +internal class ServiceOs +{ + /// + /// Linux operating system. + /// + public static readonly string Linux = "linux"; + + /// + /// Windows operating system. + /// + public static readonly string Windows = "windows"; +}; + +/// +/// Contains constants for authentication methods. +/// +public class ServiceAuthType +{ + /// + /// Entra ID authentication method. + /// + public static readonly string EntraId = "EntraId"; + + /// + /// Access token authentication method. + /// + public static readonly string AccessToken = "AccessToken"; +}; + +/// +/// Contains constants for Azure token credential types. +/// +internal class AzureTokenCredentialType +{ + /// + /// Environment Credential. + /// + public static readonly string EnvironmentCredential = "EnvironmentCredential"; + + /// + /// Workload Identity Credential. + /// + public static readonly string WorkloadIdentityCredential = "WorkloadIdentityCredential"; + + /// + /// Managed Identity Credential. + /// + public static readonly string ManagedIdentityCredential = "ManagedIdentityCredential"; + + /// + /// Shared Token Cache Credential. + /// + public static readonly string SharedTokenCacheCredential = "SharedTokenCacheCredential"; + + /// + /// Visual Studio Credential. + /// + public static readonly string VisualStudioCredential = "VisualStudioCredential"; + + /// + /// Visual Studio Code Credential. + /// + public static readonly string VisualStudioCodeCredential = "VisualStudioCodeCredential"; + + /// + /// Azure CLI Credential. + /// + public static readonly string AzureCliCredential = "AzureCliCredential"; + + /// + /// Azure PowerShell Credential. + /// + public static readonly string AzurePowerShellCredential = "AzurePowerShellCredential"; + + /// + /// Azure Developer CLI Credential. + /// + public static readonly string AzureDeveloperCliCredential = "AzureDeveloperCliCredential"; + + /// + /// Interactive Browser Credential. + /// + public static readonly string InteractiveBrowserCredential = "InteractiveBrowserCredential"; + + /// + /// Default Azure Credential. + /// + public static readonly string DefaultAzureCredential = "DefaultAzureCredential"; +} + +/// +/// Contains constants for run setting keys. +/// +public class RunSettingKey +{ + /// + /// The operating system setting key. + /// + public static readonly string Os = "Os"; + + /// + /// The run ID setting key. + /// + public static readonly string RunId = "RunId"; + + /// + /// The expose network setting key. + /// + public static readonly string ExposeNetwork = "ExposeNetwork"; + + /// + /// The default authentication setting key. + /// + public static readonly string ServiceAuthType = "ServiceAuthType"; + + /// + /// The use cloud-hosted browsers setting key. + /// + public static readonly string UseCloudHostedBrowsers = "UseCloudHostedBrowsers"; + + /// + /// The Azure token credential type setting key. + /// + public static readonly string AzureTokenCredentialType = "AzureTokenCredentialType"; + + /// + /// The managed identity client ID setting key. + /// + public static readonly string ManagedIdentityClientId = "ManagedIdentityClientId"; + + /// + /// Enable GitHub summary setting key. + /// + public static readonly string EnableGitHubSummary = "EnableGitHubSummary"; + + /// + /// Enable Result publish. + /// + public static readonly string EnableResultPublish = "EnableResultPublish"; +} + +internal class Constants +{ + // Default constants + internal static readonly string s_default_os = ServiceOs.Linux; + internal static readonly string s_default_expose_network = ""; + internal static readonly string s_pLAYWRIGHT_SERVICE_DEBUG = "Logging__LogLevel__MicrosoftPlaywrightTesting"; + + // Entra id access token constants + internal static readonly int s_entra_access_token_lifetime_left_threshold_in_minutes_for_rotation = 15; + internal static readonly string[] s_entra_access_token_scopes = new string[] { "https://management.core.windows.net/.default" }; + internal static readonly int s_entra_access_token_rotation_interval_period_in_minutes = 4; + + // Service constants + internal static readonly string s_api_version = "2023-10-01-preview"; + + // Error messages + internal static readonly string s_no_service_endpoint_error_message = "Please set PLAYWRIGHT_SERVICE_URL in your environment variables."; + internal static readonly string s_service_endpoint_removed_since_scalable_execution_disabled_error_message = "GetConnectOptionsAsync() method cannot be used when disableScalableExecution is set to true in the setup file."; + internal static readonly string s_no_auth_error = "Could not authenticate with the service. Please refer to https://aka.ms/mpt/authentication for more information."; + internal static readonly string s_invalid_mpt_pat_error = "The Access Token provided in the environment variable is invalid."; + internal static readonly string s_expired_mpt_pat_error = "The Access Token you are using is expired. Create a new token."; + internal static readonly string s_invalid_os_error = "Invalid operating system, supported values are 'linux' and 'windows'."; + internal static readonly string s_workspace_mismatch_error = "The provided access token does not match the specified workspace URL. Please verify that both values are correct."; + internal static readonly string s_invalid_service_endpoint_error_message = "The service endpoint provided is invalid. Please verify the endpoint URL and try again."; + + internal static readonly string s_playwright_service_disable_scalable_execution_environment_variable = "PLAYWRIGHT_SERVICE_DISABLE_SCALABLE_EXECUTION"; + internal static readonly string s_playwright_service_reporting_url_environment_variable = "PLAYWRIGHT_SERVICE_REPORTING_URL"; + internal static readonly string s_playwright_service_workspace_id_environment_variable = "PLAYWRIGHT_SERVICE_WORKSPACE_ID"; +} + +internal class OSConstants +{ + internal static readonly string s_lINUX = "LINUX"; + internal static readonly string s_wINDOWS = "WINDOWS"; + internal static readonly string s_mACOS = "MACOS"; +} + +internal class ReporterConstants +{ + internal static readonly string s_executionIdPropertyIdentifier = "ExecutionId"; + internal static readonly string s_parentExecutionIdPropertyIdentifier = "ParentExecId"; + internal static readonly string s_testTypePropertyIdentifier = "TestType"; + internal static readonly string s_sASUriSeparator = "?"; + internal static readonly string s_portalBaseUrl = "https://playwright.microsoft.com/workspaces/"; + internal static readonly string s_reportingRoute = "/runs/"; + internal static readonly string s_reportingAPIVersion_2024_04_30_preview = "2024-04-30-preview"; + internal static readonly string s_reportingAPIVersion_2024_05_20_preview = "2024-05-20-preview"; + internal static readonly string s_pLAYWRIGHT_SERVICE_REPORTING_URL = "PLAYWRIGHT_SERVICE_REPORTING_URL"; + internal static readonly string s_pLAYWRIGHT_SERVICE_WORKSPACE_ID = "PLAYWRIGHT_SERVICE_WORKSPACE_ID"; + internal static readonly string s_aPPLICATION_JSON = "application/json"; + internal static readonly string s_cONFLICT_409_ERROR_MESSAGE = "Test run with id {runId} already exists. Provide a unique run id."; + internal static readonly string s_cONFLICT_409_ERROR_MESSAGE_KEY = "DuplicateRunId"; + + internal static readonly string s_fORBIDDEN_403_ERROR_MESSAGE = "Reporting is not enabled for your workspace {workspaceId}. Enable the Reporting feature under Feature management settings using the Playwright portal: https://playwright.microsoft.com/workspaces/{workspaceId}/settings/general"; + internal static readonly string s_fORBIDDEN_403_ERROR_MESSAGE_KEY = "ReportingNotEnabled"; + internal static readonly string s_uNKNOWN_ERROR_MESSAGE = "Unknown error occured."; +} + +internal class CIConstants +{ + internal static readonly string s_gITHUB_ACTIONS = "GITHUB"; + internal static readonly string s_aZURE_DEVOPS = "ADO"; + internal static readonly string s_dEFAULT = "DEFAULT"; +} + +internal class TestCaseResultStatus +{ + internal static readonly string s_pASSED = "PASSED"; + internal static readonly string s_fAILED = "FAILED"; + internal static readonly string s_sKIPPED = "SKIPPED"; + internal static readonly string s_iNCONCLUSIVE = "INCONCLUSIVE"; +} + +internal class TestResultError +{ + internal string? Key { get; set; } = string.Empty; + internal string? Message { get; set; } = string.Empty; + internal Regex Pattern { get; set; } = new Regex(string.Empty); + internal TestErrorType Type { get; set; } +} + +internal enum TestErrorType +{ + Scalable +} + +internal class ServiceClientConstants +{ + internal static readonly int s_mAX_RETRIES = 3; + internal static readonly int s_mAX_RETRY_DELAY_IN_SECONDS = 2000; +} + +internal static class TestResultErrorConstants +{ + public static List ErrorConstants = new() + { + new TestResultError + { + Key = "401", + Message = "The authentication token provided is invalid. Please check the token and try again.", + Pattern = new Regex(@"(?=.*Microsoft\.Playwright\.PlaywrightException)(?=.*401 Unauthorized)", RegexOptions.IgnoreCase), + Type = TestErrorType.Scalable + }, + new TestResultError + { + Key = "NoPermissionOnWorkspace_Scalable", + Message = @"You do not have the required permissions to run tests. This could be because: + + a. You do not have the required roles on the workspace. Only Owner and Contributor roles can run tests. Contact the service administrator. + b. The workspace you are trying to run the tests on is in a different Azure tenant than what you are signed into. Check the tenant id from Azure portal and login using the command 'az login --tenant '.", + Pattern = new Regex(@"(?=.*Microsoft\.Playwright\.PlaywrightException)(?=.*403 Forbidden)(?=[\s\S]*CheckAccess API call with non successful response)", RegexOptions.IgnoreCase), + Type = TestErrorType.Scalable + }, + new TestResultError + { + Key = "InvalidWorkspace_Scalable", + Message = "The specified workspace does not exist. Please verify your workspace settings.", + Pattern = new Regex(@"(?=.*Microsoft\.Playwright\.PlaywrightException)(?=.*403 Forbidden)(?=[\s\S]*InvalidAccountOrSubscriptionState)", RegexOptions.IgnoreCase), + Type = TestErrorType.Scalable + }, + new TestResultError + { + Key = "InvalidAccessToken", + Message = "The provided access token does not match the specified workspace URL. Please verify that both values are correct.", + Pattern = new Regex(@"(?=.*Microsoft\.Playwright\.PlaywrightException)(?=.*403 Forbidden)(?=[\s\S]*InvalidAccessToken)", RegexOptions.IgnoreCase), + Type = TestErrorType.Scalable + }, + new TestResultError + { + Key = "AccessTokenOrUserOrWorkspaceNotFound_Scalable", + Message = "The data for the user, workspace or access token was not found. Please check the request or create new token and try again.", + Pattern = new Regex(@"(?=.*Microsoft\.Playwright\.PlaywrightException)(?=.*404 Not Found)(?=[\s\S]*NotFound)", RegexOptions.IgnoreCase), + Type = TestErrorType.Scalable + }, + new TestResultError + { + Key = "AccessKeyBasedAuthNotSupported_Scalable", + Message = "Authentication through service access token is disabled for this workspace. Please use Entra ID to authenticate.", + Pattern = new Regex(@"(?=.*Microsoft\.Playwright\.PlaywrightException)(?=.*403 Forbidden)(?=[\s\S]*AccessKeyBasedAuthNotSupported)", RegexOptions.IgnoreCase), + Type = TestErrorType.Scalable + }, + new TestResultError + { + Key = "ServiceUnavailable_Scalable", + Message = "The service is currently unavailable. Please check the service status and try again.", + Pattern = new Regex(@"(?=.*Microsoft\.Playwright\.PlaywrightException)(?=.*503 Service Unavailable)", RegexOptions.IgnoreCase), + Type = TestErrorType.Scalable + }, + new TestResultError + { + Key = "GatewayTimeout_Scalable", + Message = "The request to the service timed out. Please try again later.", + Pattern = new Regex(@"(?=.*Microsoft\.Playwright\.PlaywrightException)(?=.*504 Gateway Timeout)", RegexOptions.IgnoreCase), + Type = TestErrorType.Scalable + }, + new TestResultError + { + Key = "QuotaLimitError_Scalable", + Message = "It is possible that the maximum number of concurrent sessions allowed for your workspace has been exceeded.", + Pattern = new Regex(@"(Timeout .* exceeded)(?=[\s\S]*ws connecting)", RegexOptions.IgnoreCase), + Type = TestErrorType.Scalable + }, + new TestResultError + { + Key = "BrowserConnectionError_Scalable", + Message = "The service is currently unavailable. Please try again after some time.", + Pattern = new Regex(@"Target page, context or browser has been closed", RegexOptions.IgnoreCase), + Type = TestErrorType.Scalable + } + }; +} + +internal static class ApiErrorConstants +{ + private static Dictionary PatchTestRun { get; set; } = new Dictionary() { + { 400, "The request made to the server is invalid. Please check the request parameters and try again." }, + { 401, "The authentication token provided is invalid. Please check the token and try again." }, + { 500, "An unexpected error occurred on our server. Our team is working to resolve the issue. Please try again later, or contact support if the problem continues." }, + { 429, "You have exceeded the rate limit for the API. Please wait and try again later." }, + { 504, "The request to the service timed out. Please try again later." }, + { 503, "The service is currently unavailable. Please check the service status and try again." } + }; + + private static Dictionary UploadBatchTestResults { get; set; } = new Dictionary() + { + { 400, "The request made to the server is invalid. Please check the request parameters and try again." }, + { 401, "The authentication token provided is invalid. Please check the token and try again." }, + { 403, "You do not have the required permissions to run tests. Please contact your workspace administrator." }, + { 500, "An unexpected error occurred on our server. Our team is working to resolve the issue. Please try again later, or contact support if the problem continues." }, + { 429, "You have exceeded the rate limit for the API. Please wait and try again later." }, + { 504, "The request to the service timed out. Please try again later." }, + { 503, "The service is currently unavailable. Please check the service status and try again." } + }; + private static Dictionary PostTestRunShardInfo { get; set; } = new Dictionary() + { + { 400, "The request made to the server is invalid. Please check the request parameters and try again." }, + { 401, "The authentication token provided is invalid. Please check the token and try again." }, + { 403, "You do not have the required permissions to run tests. Please contact your workspace administrator." }, + { 500, "An unexpected error occurred on our server. Our team is working to resolve the issue. Please try again later, or contact support if the problem continues." }, + { 429, "You have exceeded the rate limit for the API. Please wait and try again later." }, + { 504, "The request to the service timed out. Please try again later." }, + { 503, "The service is currently unavailable. Please check the service status and try again." } + }; + private static Dictionary GetTestRunResultsUri { get; set; } = new Dictionary() + { + { 400, "The request made to the server is invalid. Please check the request parameters and try again." }, + { 401, "The authentication token provided is invalid. Please check the token and try again." }, + { 403, "You do not have the required permissions to run tests. Please contact your workspace administrator." }, + { 500, "An unexpected error occurred on our server. Our team is working to resolve the issue. Please try again later, or contact support if the problem continues." }, + { 429, "You have exceeded the rate limit for the API. Please wait and try again later." }, + { 504, "The request to the service timed out. Please try again later." }, + { 503, "The service is currently unavailable. Please check the service status and try again." } + }; + + internal static readonly Dictionary> s_errorOperationPair = new() + { + { "PatchTestRun", PatchTestRun }, + { "UploadBatchTestResults", UploadBatchTestResults }, + { "PostTestRunShardInfo", PostTestRunShardInfo }, + { "GetTestRunResultsUri", GetTestRunResultsUri } + }; +} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/EntraLifecycle.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/EntraLifecycle.cs new file mode 100644 index 000000000000..a4f33add343b --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/EntraLifecycle.cs @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Microsoft.IdentityModel.JsonWebTokens; + +namespace Azure.Developer.MicrosoftPlaywrightTesting.TestLogger; + +internal class EntraLifecycle +{ + internal string? _entraIdAccessToken; + internal long? _entraIdAccessTokenExpiry; + private readonly TokenCredential _tokenCredential; + private readonly JsonWebTokenHandler _jsonWebTokenHandler; + + public EntraLifecycle(TokenCredential? tokenCredential = null, JsonWebTokenHandler? jsonWebTokenHandler = null) + { + _tokenCredential = tokenCredential ?? new DefaultAzureCredential(); + _jsonWebTokenHandler = jsonWebTokenHandler ?? new JsonWebTokenHandler(); + SetEntraIdAccessTokenFromEnvironment(); + } + + internal async Task FetchEntraIdAccessTokenAsync(CancellationToken cancellationToken = default) + { + try + { + var tokenRequestContext = new TokenRequestContext(Constants.s_entra_access_token_scopes); + AccessToken accessToken = await _tokenCredential.GetTokenAsync(tokenRequestContext, cancellationToken).ConfigureAwait(false); + _entraIdAccessToken = accessToken.Token; + _entraIdAccessTokenExpiry = accessToken.ExpiresOn.ToUnixTimeSeconds(); + Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceAccessToken, _entraIdAccessToken); + return; + } + catch (Exception ex) + { + Console.Error.WriteLine(ex); + throw new Exception(Constants.s_no_auth_error); + } + } + + internal bool DoesEntraIdAccessTokenRequireRotation() + { + if (string.IsNullOrEmpty(_entraIdAccessToken)) + { + return true; + } + var lifetimeLeft = _entraIdAccessTokenExpiry - DateTimeOffset.UtcNow.ToUnixTimeSeconds(); + return lifetimeLeft < Constants.s_entra_access_token_lifetime_left_threshold_in_minutes_for_rotation * 60; + } + + private void SetEntraIdAccessTokenFromEnvironment() + { + try + { + var token = Environment.GetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceAccessToken); + JsonWebToken jsonWebToken = _jsonWebTokenHandler.ReadJsonWebToken(token); + jsonWebToken.TryGetClaim( + "aid", + out System.Security.Claims.Claim? aidClaim + ); + jsonWebToken.TryGetClaim( + "accountId", + out System.Security.Claims.Claim? accountIdClaim + ); + if (aidClaim != null || accountIdClaim != null) + return; // MPT Token + var expiry = (long)(jsonWebToken.ValidTo - new DateTime(1970, 1, 1)).TotalSeconds; + _entraIdAccessToken = token; + _entraIdAccessTokenExpiry = expiry; + } + catch (Exception) + { + } + } +} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Implementation/CloudRunErrorParser.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Implementation/CloudRunErrorParser.cs new file mode 100644 index 000000000000..2410754187a5 --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Implementation/CloudRunErrorParser.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.Collections.Generic; +using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Interface; + +namespace Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Implementation +{ + internal class CloudRunErrorParser : ICloudRunErrorParser + { + internal List InformationalMessages { get; private set; } = new(); + private List ProcessedErrorMessageKeys { get; set; } = new(); + private readonly ILogger _logger; + private readonly IConsoleWriter _consoleWriter; + public CloudRunErrorParser(ILogger? logger = null, IConsoleWriter? consoleWriter = null) + { + _logger = logger ?? new Logger(); + _consoleWriter = consoleWriter ?? new ConsoleWriter(); + } + + public bool TryPushMessageAndKey(string? message, string? key) + { + if (string.IsNullOrEmpty(key) || string.IsNullOrEmpty(message)) + { + return false; + } + if (ProcessedErrorMessageKeys.Contains(key!)) + { + return false; + } + _logger.Info($"Adding message with key: {key}"); + + ProcessedErrorMessageKeys.Add(key!); + InformationalMessages.Add(message!); + return true; + } + + public void PushMessage(string message) + { + InformationalMessages.Add(message); + } + + public void DisplayMessages() + { + if (InformationalMessages.Count > 0) + _consoleWriter.WriteLine(); + int index = 1; + foreach (string message in InformationalMessages) + { + _consoleWriter.WriteLine($"{index++}) {message}"); + } + } + + public void PrintErrorToConsole(string message) + { + _consoleWriter.WriteError(message); + } + + public void HandleScalableRunErrorMessage(string? message) + { + if (string.IsNullOrEmpty(message)) + { + return; + } + foreach (TestResultError testResultErrorObj in TestResultErrorConstants.ErrorConstants) + { + if (testResultErrorObj.Pattern.IsMatch(message)) + { + TryPushMessageAndKey(testResultErrorObj.Message, testResultErrorObj.Key); + } + } + } + } +} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Implementation/ConsoleWriter.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Implementation/ConsoleWriter.cs new file mode 100644 index 000000000000..c0092b80de03 --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Implementation/ConsoleWriter.cs @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Interface; + +namespace Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Implementation +{ + internal class ConsoleWriter : IConsoleWriter + { + public void WriteLine(string? message = null) + { + Console.WriteLine(message); + } + + public void WriteError(string? message = null) + { + Console.Error.WriteLine(message); + } + } +} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Implementation/Logger.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Implementation/Logger.cs new file mode 100644 index 000000000000..3251ea8584d7 --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Implementation/Logger.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Interface; + +namespace Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Implementation; + +internal enum LogLevel +{ + Debug, + Info, + Warning, + Error +} + +internal class Logger : ILogger +{ + internal static string SdkLogLevel => Environment.GetEnvironmentVariable(Constants.s_pLAYWRIGHT_SERVICE_DEBUG); + +#pragma warning disable CA1822 // Mark members as static + private void Log(LogLevel level, string message) +#pragma warning restore CA1822 // Mark members as static + { + if (Enum.TryParse(SdkLogLevel, out LogLevel configuredLevel) && level >= configuredLevel) + { + System.IO.TextWriter writer = level == LogLevel.Error || level == LogLevel.Warning ? Console.Error : Console.Out; + writer.WriteLine($"{DateTime.Now} [{level}]: {message}"); + } + } + + public void Debug(string message) + { + Log(LogLevel.Debug, message); + } + + public void Error(string message) + { + Log(LogLevel.Error, message); + } + + public void Info(string message) + { + Log(LogLevel.Info, message); + } + + public void Warning(string message) + { + Log(LogLevel.Warning, message); + } +}; diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Implementation/ServiceClient.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Implementation/ServiceClient.cs new file mode 100644 index 000000000000..1d4f423da5f4 --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Implementation/ServiceClient.cs @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +using System; +using Azure.Core.Serialization; +using Azure.Core; +using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Client; +using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Interface; +using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Model; +using System.Text.Json; +using Azure.Core.Diagnostics; +using System.Diagnostics.Tracing; +using System.Net; + +namespace Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Implementation +{ + internal class ServiceClient : IServiceClient + { + private readonly TestReportingClient _testReportingClient; + private readonly CloudRunMetadata _cloudRunMetadata; + private readonly ICloudRunErrorParser _cloudRunErrorParser; + private readonly ILogger _logger; + private static string AccessToken { get => $"Bearer {Environment.GetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceAccessToken)}"; set { } } + private static string CorrelationId { get => Guid.NewGuid().ToString(); set { } } + private static readonly JsonSerializerOptions _jsonSerializerOptions = new() { DefaultIgnoreCondition = System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull }; + + public ServiceClient(CloudRunMetadata cloudRunMetadata, ICloudRunErrorParser cloudRunErrorParser, TestReportingClient? testReportingClient = null, ILogger? logger = null) + { + _cloudRunMetadata = cloudRunMetadata; + _cloudRunErrorParser = cloudRunErrorParser; + _logger = logger ?? new Logger(); + AzureEventSourceListener listener = new(delegate (EventWrittenEventArgs eventData, string text) + { + _logger.Info($"[{eventData.Level}] {eventData.EventSource.Name}: {text}"); + }, EventLevel.Informational); + var clientOptions = new TestReportingClientOptions(); + clientOptions.Diagnostics.IsLoggingEnabled = true; + clientOptions.Diagnostics.IsTelemetryEnabled = true; + clientOptions.Retry.MaxRetries = ServiceClientConstants.s_mAX_RETRIES; + clientOptions.Retry.MaxDelay = TimeSpan.FromSeconds(ServiceClientConstants.s_mAX_RETRY_DELAY_IN_SECONDS); + _testReportingClient = testReportingClient ?? new TestReportingClient(_cloudRunMetadata.BaseUri, clientOptions); + } + + public TestRunDto? PatchTestRunInfo(TestRunDto run) + { + int statusCode; + try + { + Response? apiResponse = _testReportingClient.PatchTestRunInfo(_cloudRunMetadata.WorkspaceId!, _cloudRunMetadata.RunId!, RequestContent.Create(JsonSerializer.Serialize(run)), AccessToken, CorrelationId); + if (apiResponse.Status == (int)HttpStatusCode.OK) + { + return apiResponse.Content!.ToObject(new JsonObjectSerializer()); + } + statusCode = apiResponse.Status; + } + catch (RequestFailedException ex) + { + if (ex.Status == (int)HttpStatusCode.Conflict) + { + var errorMessage = ReporterConstants.s_cONFLICT_409_ERROR_MESSAGE.Replace("{runId}", _cloudRunMetadata.RunId!); + _cloudRunErrorParser.PrintErrorToConsole(errorMessage); + _cloudRunErrorParser.TryPushMessageAndKey(errorMessage, ReporterConstants.s_cONFLICT_409_ERROR_MESSAGE_KEY); + throw new Exception(errorMessage); + } + else if (ex.Status == (int)HttpStatusCode.Forbidden) + { + var errorMessage = ReporterConstants.s_fORBIDDEN_403_ERROR_MESSAGE.Replace("{workspaceId}", _cloudRunMetadata.WorkspaceId!); + _cloudRunErrorParser.PrintErrorToConsole(errorMessage); + _cloudRunErrorParser.TryPushMessageAndKey(errorMessage, ReporterConstants.s_fORBIDDEN_403_ERROR_MESSAGE_KEY); + throw new Exception(errorMessage); + } + statusCode = ex.Status; + } + HandleAPIFailure(statusCode, "PatchTestRun"); + return null; + } + + public TestRunShardDto? PostTestRunShardInfo(TestRunShardDto runShard) + { + int statusCode; + try + { + Response apiResponse = _testReportingClient.PostTestRunShardInfo(_cloudRunMetadata.WorkspaceId!, _cloudRunMetadata.RunId!, RequestContent.Create(runShard), ReporterConstants.s_aPPLICATION_JSON, AccessToken, CorrelationId); + if (apiResponse.Status == (int)HttpStatusCode.OK) + { + return apiResponse.Content!.ToObject(new JsonObjectSerializer()); + } + statusCode = apiResponse.Status; + } + catch (RequestFailedException ex) + { + statusCode = ex.Status; + } + HandleAPIFailure(statusCode, "PostTestRunShardInfo"); + return null; + } + + public void UploadBatchTestResults(UploadTestResultsRequest uploadTestResultsRequest) + { + int statusCode; + try + { + Response apiResponse = _testReportingClient.UploadBatchTestResults(_cloudRunMetadata.WorkspaceId!, RequestContent.Create(JsonSerializer.Serialize(uploadTestResultsRequest)), AccessToken, CorrelationId, null); + if (apiResponse.Status == (int)HttpStatusCode.OK) + { + return; + } + statusCode = apiResponse.Status; + } + catch (RequestFailedException ex) + { + statusCode = ex.Status; + } + HandleAPIFailure(statusCode, "UploadBatchTestResults"); + } + + public TestResultsUri? GetTestRunResultsUri() + { + int statusCode; + try + { + Response response = _testReportingClient.GetTestRunResultsUri(_cloudRunMetadata.WorkspaceId!, _cloudRunMetadata.RunId!, AccessToken, CorrelationId, null); + if (response.Status == (int)HttpStatusCode.OK) + { + return response.Content!.ToObject(new JsonObjectSerializer()); + } + statusCode = response.Status; + } + catch (RequestFailedException ex) + { + statusCode = ex.Status; + } + HandleAPIFailure(statusCode, "GetTestRunResultsUri"); + return null; + } + + internal void HandleAPIFailure(int? statusCode, string operationName) + { + try + { + if (statusCode == null) + return; + ApiErrorConstants.s_errorOperationPair.TryGetValue(operationName, out System.Collections.Generic.Dictionary? errorObject); + if (errorObject == null) + return; + errorObject.TryGetValue((int)statusCode, out string? errorMessage); + errorMessage ??= ReporterConstants.s_uNKNOWN_ERROR_MESSAGE; + _cloudRunErrorParser.TryPushMessageAndKey(errorMessage, statusCode.ToString()); + } + catch (Exception ex) + { + _logger.Error(ex.Message); + } + } + } +} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Interface/ICloudRunErrorParser.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Interface/ICloudRunErrorParser.cs new file mode 100644 index 000000000000..7dbbecf68c14 --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Interface/ICloudRunErrorParser.cs @@ -0,0 +1,14 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +namespace Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Interface +{ + internal interface ICloudRunErrorParser + { + void HandleScalableRunErrorMessage(string? message); + bool TryPushMessageAndKey(string? message, string? key); + void PushMessage(string message); + void DisplayMessages(); + void PrintErrorToConsole(string message); + } +} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Interface/IConsoleWriter.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Interface/IConsoleWriter.cs new file mode 100644 index 000000000000..41939a5d6429 --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Interface/IConsoleWriter.cs @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +namespace Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Interface +{ + internal interface IConsoleWriter + { + void WriteLine(string? message = null); + void WriteError(string? message = null); + } +} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Interface/IDataProcessor.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Interface/IDataProcessor.cs new file mode 100644 index 000000000000..280a6fe08f84 --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Interface/IDataProcessor.cs @@ -0,0 +1,15 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Model; +using Microsoft.VisualStudio.TestPlatform.ObjectModel; + +namespace Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Interface +{ + internal interface IDataProcessor + { + TestRunDto GetTestRun(); + TestRunShardDto GetTestRunShard(); + TestResults GetTestCaseResultData(TestResult? testResultSource); + } +} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Interface/ILogger.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Interface/ILogger.cs new file mode 100644 index 000000000000..c1912bcfaa50 --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Interface/ILogger.cs @@ -0,0 +1,13 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +namespace Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Interface +{ + internal interface ILogger + { + void Info(string message); + void Debug(string message); + void Warning(string message); + void Error(string message); + } +} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Interface/IServiceClient.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Interface/IServiceClient.cs new file mode 100644 index 000000000000..07edddb64230 --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Interface/IServiceClient.cs @@ -0,0 +1,15 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Model; + +namespace Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Interface +{ + internal interface IServiceClient + { + TestRunDto? PatchTestRunInfo(TestRunDto run); + TestRunShardDto? PostTestRunShardInfo(TestRunShardDto runShard); + void UploadBatchTestResults(UploadTestResultsRequest uploadTestResultsRequest); + TestResultsUri? GetTestRunResultsUri(); + } +} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Interface/ITestProcessor.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Interface/ITestProcessor.cs new file mode 100644 index 000000000000..205332294b2e --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Interface/ITestProcessor.cs @@ -0,0 +1,15 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Microsoft.VisualStudio.TestPlatform.ObjectModel.Client; +using Microsoft.VisualStudio.TestPlatform.ObjectModel.Logging; + +namespace Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Interface +{ + internal interface ITestProcessor + { + void TestCaseResultHandler(object? sender, TestResultEventArgs e); + void TestRunStartHandler(object? sender, TestRunStartEventArgs e); + void TestRunCompleteHandler(object? sender, TestRunCompleteEventArgs e); + } +} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Model/CIInfo.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Model/CIInfo.cs new file mode 100644 index 000000000000..e44bdae81baf --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Model/CIInfo.cs @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +namespace Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Model; + +internal class CIInfo +{ + internal string? Provider { get; set; } + internal string? Repo { get; set; } + internal string? Branch { get; set; } + internal string? Author { get; set; } + internal string? CommitId { get; set; } + internal string? RevisionUrl { get; set; } + internal string? RunId { get; set; } + internal int? RunAttempt { get; set; } + internal string? JobId { get; set; } +} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Model/CloudRunMetadata.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Model/CloudRunMetadata.cs new file mode 100644 index 000000000000..124eed6ab0ce --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Model/CloudRunMetadata.cs @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; + +namespace Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Model +{ + internal class CloudRunMetadata + { + internal string? WorkspaceId { get; set; } + internal string? RunId { get; set; } + internal Uri? BaseUri { get; set; } + internal string? PortalUrl + { + get { return ReporterConstants.s_portalBaseUrl + Uri.EscapeDataString(WorkspaceId) + ReporterConstants.s_reportingRoute + Uri.EscapeDataString(RunId); } + } + internal bool EnableResultPublish { get; set; } = true; + internal bool EnableGithubSummary { get; set; } = true; + internal DateTime TestRunStartTime { get; set; } + internal TokenDetails? AccessTokenDetails { get; set; } + } +} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Model/MPTResult.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Model/MPTResult.cs new file mode 100644 index 000000000000..50006b0d55dc --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Model/MPTResult.cs @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.Collections.Generic; +using System.Text.Json.Serialization; + +namespace Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Model; + +internal class RawTestStep +{ + internal string? Title { get; set; } + internal string? Category { get; set; } + internal string? StartTime { get; set; } + internal int Duration { get; set; } + internal string? Error { get; set; } + internal List Steps { get; set; } = new List(); + internal Location? Location { get; set; } + internal string? Snippet { get; set; } + internal int Count { get; set; } +} + +internal class Location +{ + internal int LineNumber { get; set; } +} + +internal class MPTError +{ + public string? message { get; set; } +} +internal class RawTestResult +{ + [JsonPropertyName("steps")] + public List Steps { get; set; } = new List(); + [JsonPropertyName("errors")] + public string errors { get; set; } = "[]"; + [JsonPropertyName("stdErr")] + public string stdErr { get; set; } = "[]"; + [JsonPropertyName("stdOut")] + public string stdOut { get; set; } = "[]"; +} + +internal class TokenDetails +{ + internal string? aid { get; set; } + internal string? oid { get; set; } + internal string? id { get; set; } + internal string? userName { get; set; } +} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Model/TestReporting.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Model/TestReporting.cs new file mode 100644 index 000000000000..4692883feaa0 --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Model/TestReporting.cs @@ -0,0 +1,299 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.Collections.Generic; +using System.Text.Json.Serialization; + +namespace Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Model; + +internal enum AccessLevel +{ + Read = 0, + Write = 1, + ReadWrite = 2, + ReadAddCreateWrite = 3, +} + +internal partial class CIConfig +{ + [JsonPropertyName("ciProviderName")] public string? CiProviderName { get; set; } = ""; + + [JsonPropertyName("branch")] public string? Branch { get; set; } + + [JsonPropertyName("author")] public string? Author { get; set; } + + [JsonPropertyName("commitId")] public string? CommitId { get; set; } + + [JsonPropertyName("revisionUrl")] public string? RevisionUrl { get; set; } +} + +internal partial class ClientConfig +{ + [JsonPropertyName("retries")] + public int Retries { get; set; } + + [JsonPropertyName("repeatEach")] + public int RepeatEach { get; set; } + + [JsonPropertyName("workers")] + public int Workers { get; set; } + + [JsonPropertyName("pwVersion")] public string PwVersion { get; set; } = ""; + + [JsonPropertyName("testFramework")] + public TestFramework? TestFramework { get; set; } + + [JsonPropertyName("shards")] + public Shard? Shards { get; set; } + + [JsonPropertyName("timeout")] + public int Timeout { get; set; } + + [JsonPropertyName("testType")] public string TestType { get; set; } = ""; + + [JsonPropertyName("testSdkLanguage")] public string TestSdkLanguage { get; set; } = ""; + + [JsonPropertyName("reporterPackageVersion")] public string ReporterPackageVersion { get; set; } = ""; +} + +internal partial class PreviousRetrySummary +{ + [JsonPropertyName("testExecutionId")] public string TestExecutionId { get; set; } = ""; + + [JsonPropertyName("retry")] + public int Retry { get; set; } + + [JsonPropertyName("status")] public string Status { get; set; } = ""; + + [JsonPropertyName("duration")] public long Duration { get; set; } + + [JsonPropertyName("startTime")] public string StartTime { get; set; } = ""; + + [JsonPropertyName("attachmentsMetadata")] public string AttachmentsMetadata { get; set; } = ""; + + [JsonPropertyName("artifactsPath")] + public ICollection ArtifactsPath { get; set; } = new List(); +} + +internal partial class Shard +{ + [JsonPropertyName("total")] + public int Total { get; set; } + + [JsonPropertyName("current")] + public int? Current { get; set; } +} + +internal partial class TestFramework +{ + [JsonPropertyName("name")] public string Name { get; set; } = ""; + + [JsonPropertyName("version")] public string Version { get; set; } = ""; + + [JsonPropertyName("runnerName")] public string RunnerName { get; set; } = ""; +} + +internal partial class TestResults +{ + [JsonPropertyName("testExecutionId")] public string TestExecutionId { get; set; } = ""; + + [JsonPropertyName("testId")] public string TestId { get; set; } = ""; + + [JsonPropertyName("testCombinationId")] public string TestCombinationId { get; set; } = ""; + + [JsonPropertyName("runId")] public string RunId { get; set; } = ""; + + [JsonPropertyName("shardId")] public string ShardId { get; set; } = ""; + + [JsonPropertyName("accountId")] public string AccountId { get; set; } = ""; + + [JsonPropertyName("suiteId")] public string SuiteId { get; set; } = ""; + + [JsonPropertyName("testTitle")] public string TestTitle { get; set; } = ""; + + [JsonPropertyName("suiteTitle")] public string SuiteTitle { get; set; } = ""; + + [JsonPropertyName("fileName")] public string FileName { get; set; } = ""; + + [JsonPropertyName("lineNumber")] + public int LineNumber { get; set; } + + [JsonPropertyName("retry")] + public int Retry { get; set; } + + [JsonPropertyName("status")] public string Status { get; set; } = ""; + + [JsonPropertyName("webTestConfig")] + public WebTestConfig? WebTestConfig { get; set; } + + [JsonPropertyName("ciConfig")] + public CIConfig? CiConfig { get; set; } + + [JsonPropertyName("resultsSummary")] + public TestResultsSummary? ResultsSummary { get; set; } + + [JsonPropertyName("previousRetries")] + public ICollection PreviousRetries { get; set; } = new List(); + + [JsonPropertyName("tags")] + public ICollection Tags { get; set; } = new List(); + + [JsonPropertyName("annotations")] + public ICollection Annotations { get; set; } = new List(); + + [JsonPropertyName("artifactsPath")] + public ICollection ArtifactsPath { get; set; } = new List(); +} + +internal partial class TestResultsSummary +{ + [JsonPropertyName("status")] public string Status { get; set; } = ""; + + [JsonPropertyName("duration")] public long Duration { get; set; } + + [JsonPropertyName("startTime")] public string StartTime { get; set; } = ""; + + [JsonPropertyName("attachmentsMetadata")] public string AttachmentsMetadata { get; set; } = ""; +} + +internal partial class TestResultsUri +{ + [JsonPropertyName("uri")] public string Uri { get; set; } = ""; + + [JsonPropertyName("createdAt")] public string CreatedAt { get; set; } = ""; + + [JsonPropertyName("expiresAt")] public string ExpiresAt { get; set; } = ""; + + [JsonPropertyName("accessLevel")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public AccessLevel? AccessLevel { get; set; } +} + +internal partial class TestRunDto +{ + [JsonPropertyName("testRunId")] + public string TestRunId { get; set; } = ""; + + [JsonPropertyName("displayName")] + public string DisplayName { get; set; } = ""; + + [JsonPropertyName("startTime")] + public string StartTime { get; set; } = ""; + + [JsonPropertyName("creatorId")] + public string CreatorId { get; set; } = ""; + + [JsonPropertyName("creatorName")] + public string CreatorName { get; set; } = ""; + + [JsonPropertyName("summary")] + public TestRunSummary? Summary { get; set; } + + [JsonPropertyName("resultsSummary")] + public TestRunResultsSummary? ResultsSummary { get; set; } + + [JsonPropertyName("ciConfig")] + public CIConfig? CiConfig { get; set; } + + [JsonPropertyName("testRunConfig")] + public ClientConfig? TestRunConfig { get; set; } + + [JsonPropertyName("testResultsUri")] + public TestResultsUri? TestResultsUri { get; set; } + + [JsonPropertyName("cloudRunEnabled")] public bool? CloudRunEnabled { get; set; } + + [JsonPropertyName("cloudReportingEnabled")] public bool? CloudReportingEnabled { get; set; } +} + +internal partial class TestRunResultsSummary +{ + [JsonPropertyName("numTotalTests")] + public long NumTotalTests { get; set; } + + [JsonPropertyName("numPassedTests")] + public long NumPassedTests { get; set; } + + [JsonPropertyName("numFailedTests")] + public long NumFailedTests { get; set; } + + [JsonPropertyName("numSkippedTests")] + public long NumSkippedTests { get; set; } + + [JsonPropertyName("numFlakyTests")] + public long NumFlakyTests { get; set; } + + [JsonPropertyName("status")] + public string Status { get; set; } = ""; +} + +internal partial class TestRunShardDto +{ + [JsonPropertyName("shardId")] public string ShardId { get; set; } = ""; + [JsonPropertyName("uploadCompleted")] public bool UploadCompleted { get; set; } = false; + + [JsonPropertyName("summary")] + public TestRunShardSummary? Summary { get; set; } + + [JsonPropertyName("workers")] public int? Workers { get; set; } +} + +internal partial class TestRunShardSummary +{ + [JsonPropertyName("status")] public string Status { get; set; } = ""; + [JsonPropertyName("startTime")] public string StartTime { get; set; } = ""; + + [JsonPropertyName("endTime")] public string EndTime { get; set; } = ""; + + [JsonPropertyName("errorMessages")] + public ICollection ErrorMessages { get; set; } = new List(); + + [JsonPropertyName("uploadMetadata")] + public UploadMetadata? UploadMetadata { get; set; } + + [JsonPropertyName("totalTime")] public long TotalTime { get; set; } +} + +internal partial class TestRunSummary +{ + [JsonPropertyName("status")] public string Status { get; set; } = ""; + + [JsonPropertyName("billableTime")] public long BillableTime { get; set; } + + [JsonPropertyName("numBrowserSessions")] public long NumBrowserSessions { get; set; } + + [JsonPropertyName("jobs")] + public ICollection Jobs { get; set; } = new List(); + + [JsonPropertyName("projects")] + public ICollection Projects { get; set; } = new List(); + + [JsonPropertyName("tags")] + public ICollection Tags { get; set; } = new List(); +} + +internal partial class UploadMetadata +{ + [JsonPropertyName("numTestResults")] public long NumTestResults { get; set; } + + [JsonPropertyName("numTotalAttachments")] public long NumTotalAttachments { get; set; } + + [JsonPropertyName("sizeTotalAttachments")] public long SizeTotalAttachments { get; set; } +} + +internal partial class UploadTestResultsRequest +{ + [JsonPropertyName("value")] + public ICollection Value { get; set; } = new List(); +} + +internal partial class WebTestConfig +{ + [JsonPropertyName("jobName")] public string JobName { get; set; } = ""; + + [JsonPropertyName("projectName")] public string ProjectName { get; set; } = ""; + + [JsonPropertyName("browserType")] public string BrowserName { get; set; } = ""; + + [JsonPropertyName("os")] public string Os { get; set; } = ""; +} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/PlaywrightReporter.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/PlaywrightReporter.cs new file mode 100644 index 000000000000..bfb6d6fdccb3 --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/PlaywrightReporter.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Model; +using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Utility; +using Microsoft.VisualStudio.TestPlatform.ObjectModel; +using Microsoft.VisualStudio.TestPlatform.ObjectModel.Client; +using Microsoft.VisualStudio.TestPlatform.ObjectModel.Logging; +using Microsoft.VisualStudio.TestPlatform.ObjectModel.Utilities; +using System; +using System.Collections.Generic; +using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Interface; +using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Implementation; +using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Processor; + +namespace Azure.Developer.MicrosoftPlaywrightTesting.TestLogger; + +[FriendlyName("microsoft-playwright-testing")] +[ExtensionUri("logger://MicrosoftPlaywrightTesting/Logger/v1")] +internal class PlaywrightReporter : ITestLoggerWithParameters +{ + private Dictionary? _parametersDictionary; + private PlaywrightService? _playwrightService; + private readonly ILogger _logger; + private TestProcessor? _testProcessor; + + public PlaywrightReporter() : this(null) { } // no-op + public PlaywrightReporter(ILogger? logger) + { + _logger = logger ?? new Logger(); + } + + public void Initialize(TestLoggerEvents events, Dictionary parameters) + { + ValidateArg.NotNull(events, nameof(events)); + _parametersDictionary = parameters; + Initialize(events, _parametersDictionary[DefaultLoggerParameterNames.TestRunDirectory]!); + } + public void Initialize(TestLoggerEvents events, string testResultsDirPath) + { + ValidateArg.NotNull(events, nameof(events)); + ValidateArg.NotNullOrEmpty(testResultsDirPath, nameof(testResultsDirPath)); + + // Register for the events. + events.TestResult += TestResultHandler; // each test run end + events.TestRunComplete += TestRunCompleteHandler; // test suite end + events.TestRunStart += TestRunStartHandler; // test suite start + } + + #region Event Handlers + internal void TestRunStartHandler(object? sender, TestRunStartEventArgs e) + { + InitializePlaywrightReporter(e.TestRunCriteria.TestRunSettings!); + _testProcessor?.TestRunStartHandler(sender, e); + } + + internal void TestResultHandler(object? sender, TestResultEventArgs e) + { + _testProcessor?.TestCaseResultHandler(sender, e); + } + + internal void TestRunCompleteHandler(object? sender, TestRunCompleteEventArgs e) + { + _testProcessor?.TestRunCompleteHandler(sender, e); + _playwrightService?.Cleanup(); + } + #endregion + + private void InitializePlaywrightReporter(string xmlSettings) + { + Dictionary runParameters = XmlRunSettingsUtilities.GetTestRunParameters(xmlSettings); + runParameters.TryGetValue(RunSettingKey.RunId, out var runId); + // If run id is not provided and not set via env, try fetching it from CI info. + CIInfo cIInfo = CiInfoProvider.GetCIInfo(); + if (string.IsNullOrEmpty(Environment.GetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceRunId))) + { + if (string.IsNullOrEmpty(runId?.ToString())) + Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceRunId, ReporterUtils.GetRunId(cIInfo)); + else + Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceRunId, runId!.ToString()); + } + else + { + PlaywrightService.GetDefaultRunId(); // will not set run id if already present in the environment variable + } + + runParameters.TryGetValue(RunSettingKey.ServiceAuthType, out var serviceAuth); + runParameters.TryGetValue(RunSettingKey.AzureTokenCredentialType, out var azureTokenCredential); + runParameters.TryGetValue(RunSettingKey.ManagedIdentityClientId, out var managedIdentityClientId); + runParameters.TryGetValue(RunSettingKey.EnableGitHubSummary, out var enableGithubSummary); + runParameters.TryGetValue(RunSettingKey.EnableResultPublish, out var enableResultPublish); + string? enableGithubSummaryString = enableGithubSummary?.ToString(); + string? enableResultPublishString = enableResultPublish?.ToString(); + + bool _enableGitHubSummary = string.IsNullOrEmpty(enableGithubSummaryString) || bool.Parse(enableGithubSummaryString!); + bool _enableResultPublish = string.IsNullOrEmpty(enableResultPublishString) || bool.Parse(enableResultPublishString!); + + PlaywrightServiceOptions? playwrightServiceSettings = null; + try + { + playwrightServiceSettings = new(runId: runId?.ToString(), serviceAuth: serviceAuth?.ToString(), azureTokenCredentialType: azureTokenCredential?.ToString(), managedIdentityClientId: managedIdentityClientId?.ToString()); + } + catch (Exception ex) + { + Console.Error.WriteLine("Failed to initialize PlaywrightServiceSettings: " + ex); + Environment.Exit(1); + } + + // setup entra rotation handlers + _playwrightService = new PlaywrightService(null, playwrightServiceSettings!.RunId, null, playwrightServiceSettings.ServiceAuth, null, playwrightServiceSettings.AzureTokenCredential); +#pragma warning disable AZC0102 // Do not use GetAwaiter().GetResult(). Use the TaskExtensions.EnsureCompleted() extension method instead. + _playwrightService.InitializeAsync().GetAwaiter().GetResult(); +#pragma warning restore AZC0102 // Do not use GetAwaiter().GetResult(). Use the TaskExtensions.EnsureCompleted() extension method instead. + + var cloudRunId = Environment.GetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceRunId); + string baseUrl = Environment.GetEnvironmentVariable(ReporterConstants.s_pLAYWRIGHT_SERVICE_REPORTING_URL); + string accessToken = Environment.GetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceAccessToken); + if (string.IsNullOrEmpty(baseUrl)) + { + Console.Error.WriteLine(Constants.s_no_service_endpoint_error_message); + Environment.Exit(1); + } + if (string.IsNullOrEmpty(accessToken)) + { + Console.Error.WriteLine(Constants.s_no_auth_error); + Environment.Exit(1); + } + + var baseUri = new Uri(baseUrl); + var reporterUtils = new ReporterUtils(); + TokenDetails tokenDetails = reporterUtils.ParseWorkspaceIdFromAccessToken(jsonWebTokenHandler: null, accessToken: accessToken); + var workspaceId = tokenDetails.aid; + + var cloudRunMetadata = new CloudRunMetadata + { + RunId = cloudRunId, + WorkspaceId = workspaceId, + BaseUri = baseUri, + EnableResultPublish = _enableResultPublish, + EnableGithubSummary = _enableGitHubSummary, + TestRunStartTime = DateTime.UtcNow, + AccessTokenDetails = tokenDetails, + }; + + _testProcessor = new TestProcessor(cloudRunMetadata, cIInfo); + _logger.Info("Playwright Service Reporter Initialized"); + } +} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/PlaywrightService.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/PlaywrightService.cs new file mode 100644 index 000000000000..fe71869b3cb8 --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/PlaywrightService.cs @@ -0,0 +1,272 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Core; +using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Model; +using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Utility; +using Microsoft.IdentityModel.JsonWebTokens; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Runtime.InteropServices; +using System.Text.RegularExpressions; +using System.Threading; +using System.Threading.Tasks; + +namespace Azure.Developer.MicrosoftPlaywrightTesting.TestLogger; + +/// +/// Sets up and manages the Playwright service. +/// +public class PlaywrightService +{ + /// + /// Gets or sets the default authentication mechanism. + /// + public string ServiceAuth { get; set; } = ServiceAuthType.EntraId; + /// + /// Gets or sets a flag indicating whether to use cloud-hosted browsers. + /// + public bool UseCloudHostedBrowsers { get; set; } = true; + /// + /// Gets or sets the rotation timer for the Playwright service. + /// + public Timer? RotationTimer { get; set; } + /// + /// Gets the service endpoint for the Playwright service. + /// + public static string? ServiceEndpoint => Environment.GetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceUri); + + private readonly EntraLifecycle? _entraLifecycle; + private readonly JsonWebTokenHandler? _jsonWebTokenHandler; + + /// + /// Initializes a new instance of the class. + /// + /// + /// + public PlaywrightService(PlaywrightServiceOptions playwrightServiceOptions, TokenCredential? credential = null) : this( + os: playwrightServiceOptions.Os, + runId: playwrightServiceOptions.RunId, + exposeNetwork: playwrightServiceOptions.ExposeNetwork, + serviceAuth: playwrightServiceOptions.ServiceAuth, + useCloudHostedBrowsers: playwrightServiceOptions.UseCloudHostedBrowsers, + credential: credential ?? playwrightServiceOptions.AzureTokenCredential + ) + { + // No-op + } + + /// + /// Initializes a new instance of the class. + /// + /// The operating system. + /// The run ID. + /// The network exposure. + /// The service authentication mechanism. + /// Whether to use cloud-hosted browsers. + /// The token credential. + public PlaywrightService(OSPlatform? os = null, string? runId = null, string? exposeNetwork = null, string? serviceAuth = null, bool? useCloudHostedBrowsers = null, TokenCredential? credential = null) + { + if (string.IsNullOrEmpty(ServiceEndpoint)) + return; + _entraLifecycle = new EntraLifecycle(tokenCredential: credential); + _jsonWebTokenHandler = new JsonWebTokenHandler(); + InitializePlaywrightServiceEnvironmentVariables(getServiceCompatibleOs(os), runId, exposeNetwork, serviceAuth, useCloudHostedBrowsers); + } + + internal PlaywrightService(OSPlatform? os = null, string? runId = null, string? exposeNetwork = null, string? serviceAuth = null, bool? useCloudHostedBrowsers = null, EntraLifecycle? entraLifecycle = null, JsonWebTokenHandler? jsonWebTokenHandler = null, TokenCredential? credential = null) + { + if (string.IsNullOrEmpty(ServiceEndpoint)) + return; + _entraLifecycle = entraLifecycle ?? new EntraLifecycle(credential); + _jsonWebTokenHandler = jsonWebTokenHandler ?? new JsonWebTokenHandler(); + InitializePlaywrightServiceEnvironmentVariables(getServiceCompatibleOs(os), runId, exposeNetwork, serviceAuth, useCloudHostedBrowsers); + } + + /// + /// Gets the connect options for connecting to Playwright Service's cloud hosted browsers. + /// + /// The type of the connect options. + /// The operating system. + /// The run ID. + /// The network exposure. + /// Cancellation token. + /// The connect options. + public async Task> GetConnectOptionsAsync(OSPlatform? os = null, string? runId = null, string? exposeNetwork = null, CancellationToken cancellationToken = default) where T : class, new() + { + if (Environment.GetEnvironmentVariable(Constants.s_playwright_service_disable_scalable_execution_environment_variable) == "true") + throw new Exception(Constants.s_service_endpoint_removed_since_scalable_execution_disabled_error_message); + if (string.IsNullOrEmpty(ServiceEndpoint)) + throw new Exception(Constants.s_no_service_endpoint_error_message); + string _serviceOs = Uri.EscapeDataString(getServiceCompatibleOs(os) ?? Environment.GetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceOs) ?? Constants.s_default_os); + string _runId = Uri.EscapeDataString(runId ?? Environment.GetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceRunId) ?? GetDefaultRunId()); + string _exposeNetwork = exposeNetwork ?? Environment.GetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceExposeNetwork) ?? Constants.s_default_expose_network; + + string wsEndpoint = $"{ServiceEndpoint}?os={_serviceOs}&runId={_runId}&api-version={Constants.s_api_version}"; + + // fetch Entra id access token if required + // 1. Entra id access token has been fetched once via global functions + // 2. Not close to expiry + if (!string.IsNullOrEmpty(_entraLifecycle!._entraIdAccessToken) && _entraLifecycle!.DoesEntraIdAccessTokenRequireRotation()) + { + await _entraLifecycle.FetchEntraIdAccessTokenAsync(cancellationToken).ConfigureAwait(false); + } + if (string.IsNullOrEmpty(GetAuthToken())) + { + throw new Exception(Constants.s_no_auth_error); + } + + var browserConnectOptions = new BrowserConnectOptions + { + Timeout = 3 * 60 * 1000, + ExposeNetwork = _exposeNetwork, + Headers = new Dictionary + { + ["Authorization"] = $"Bearer {GetAuthToken()}" + } + }; + return new ConnectOptions + { + WsEndpoint = wsEndpoint, + Options = BrowserConnectOptionsConverter.Convert(browserConnectOptions) + }; + } + + /// + /// Initialises the resources used to setup entra id authentication. + /// + public async Task InitializeAsync(CancellationToken cancellationToken = default) + { + if (string.IsNullOrEmpty(ServiceEndpoint)) + return; + if (!UseCloudHostedBrowsers) + { + // Since playwright-dotnet checks PLAYWRIGHT_SERVICE_ACCESS_TOKEN and PLAYWRIGHT_SERVICE_URL to be set, remove PLAYWRIGHT_SERVICE_URL so that tests are run locally. + // If customers use GetConnectOptionsAsync, after setting disableScalableExecution, an error will be thrown. + Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceUri, null); + } + // If default auth mechanism is Access token and token is available in the environment variable, no need to setup rotation handler + if (ServiceAuth == ServiceAuthType.AccessToken) + { + ValidateMptPAT(); + return; + } + await _entraLifecycle!.FetchEntraIdAccessTokenAsync(cancellationToken).ConfigureAwait(false); + RotationTimer = new Timer(RotationHandlerAsync, null, TimeSpan.FromMinutes(Constants.s_entra_access_token_rotation_interval_period_in_minutes), TimeSpan.FromMinutes(Constants.s_entra_access_token_rotation_interval_period_in_minutes)); + } + + /// + /// Cleans up the resources used to setup entra id authentication. + /// + public void Cleanup() + { + RotationTimer?.Dispose(); + } + + internal async void RotationHandlerAsync(object? _) + { + if (_entraLifecycle!.DoesEntraIdAccessTokenRequireRotation()) + { + await _entraLifecycle.FetchEntraIdAccessTokenAsync().ConfigureAwait(false); + } + } + + private void InitializePlaywrightServiceEnvironmentVariables(string? os = null, string? runId = null, string? exposeNetwork = null, string? serviceAuth = null, bool? useCloudHostedBrowsers = null) + { + if (!string.IsNullOrEmpty(serviceAuth)) + { + ServiceAuth = serviceAuth!; + } + if (useCloudHostedBrowsers != null) + { + UseCloudHostedBrowsers = (bool)useCloudHostedBrowsers; + if (!UseCloudHostedBrowsers) + Environment.SetEnvironmentVariable(Constants.s_playwright_service_disable_scalable_execution_environment_variable, "true"); + } + if (!string.IsNullOrEmpty(os)) + { + Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceOs, os); + } + else + { + Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceOs, Constants.s_default_os); + } + if (!string.IsNullOrEmpty(runId)) + { + Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceRunId, runId); + } + else + { + GetDefaultRunId(); + } + if (!string.IsNullOrEmpty(exposeNetwork)) + { + Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceExposeNetwork, exposeNetwork); + } + else + { + Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceExposeNetwork, Constants.s_default_expose_network); + } + SetReportingUrlAndWorkspaceId(); + } + + internal static string GetDefaultRunId() + { + var runIdFromEnvironmentVariable = Environment.GetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceRunId); + if (!string.IsNullOrEmpty(runIdFromEnvironmentVariable)) + return runIdFromEnvironmentVariable!; + CIInfo ciInfo = CiInfoProvider.GetCIInfo(); + var runId = ReporterUtils.GetRunId(ciInfo); + Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceRunId, runId); + return runId; + } + + internal static void SetReportingUrlAndWorkspaceId() + { + Match match = Regex.Match(ServiceEndpoint, @"wss://(?[\w-]+)\.api\.(?playwright(?:-test|-int)?\.io|playwright\.microsoft\.com)/accounts/(?[\w-]+)/"); + if (!match.Success) + return; + var region = match.Groups["region"].Value; + var domain = match.Groups["domain"].Value; + var workspaceId = match.Groups["workspaceId"].Value; + if (string.IsNullOrEmpty(Environment.GetEnvironmentVariable(Constants.s_playwright_service_reporting_url_environment_variable))) + Environment.SetEnvironmentVariable(Constants.s_playwright_service_reporting_url_environment_variable, $"https://{region}.reporting.api.{domain}"); + if (string.IsNullOrEmpty(Environment.GetEnvironmentVariable(Constants.s_playwright_service_workspace_id_environment_variable))) + Environment.SetEnvironmentVariable(Constants.s_playwright_service_workspace_id_environment_variable, $"{workspaceId}"); + } + + private static string? GetAuthToken() + { + return Environment.GetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceAccessToken); + } + + private void ValidateMptPAT() + { + string authToken = GetAuthToken()!; + if (string.IsNullOrEmpty(authToken)) + throw new Exception(Constants.s_no_auth_error); + JsonWebToken jsonWebToken = _jsonWebTokenHandler!.ReadJsonWebToken(authToken) ?? throw new Exception(Constants.s_invalid_mpt_pat_error); + var tokenaWorkspaceId = jsonWebToken.Claims.FirstOrDefault(c => c.Type == "aid")?.Value; + Match match = Regex.Match(ServiceEndpoint, @"wss://(?[\w-]+)\.api\.(?playwright(?:-test|-int)?\.io|playwright\.microsoft\.com)/accounts/(?[\w-]+)/"); + if (!match.Success) + throw new Exception(Constants.s_invalid_service_endpoint_error_message); + var serviceEndpointWorkspaceId = match.Groups["workspaceId"].Value; + if (tokenaWorkspaceId != serviceEndpointWorkspaceId) + throw new Exception(Constants.s_workspace_mismatch_error); + var expiry = (long)(jsonWebToken.ValidTo - new DateTime(1970, 1, 1)).TotalSeconds; + if (expiry <= DateTimeOffset.UtcNow.ToUnixTimeSeconds()) + throw new Exception(Constants.s_expired_mpt_pat_error); + } + + private string? getServiceCompatibleOs(OSPlatform? oSPlatform) + { + if (oSPlatform == null) + return null; + if (oSPlatform.Equals(OSPlatform.Linux)) + return ServiceOs.Linux; + if (oSPlatform.Equals(OSPlatform.Windows)) + return ServiceOs.Windows; + throw new ArgumentException(Constants.s_invalid_os_error); + } +} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/PlaywrightServiceOptions.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/PlaywrightServiceOptions.cs new file mode 100644 index 000000000000..5eb7a1ecf63b --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/PlaywrightServiceOptions.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Runtime.InteropServices; +using Azure.Core; +using Azure.Identity; + +namespace Azure.Developer.MicrosoftPlaywrightTesting.TestLogger; + +/// +/// Options for the Playwright service. +/// +public class PlaywrightServiceOptions +{ + internal OSPlatform? Os { get; set; } + internal string? RunId { get; set; } + internal string? ExposeNetwork { get; set; } + internal string ServiceAuth { get; set; } + internal bool UseCloudHostedBrowsers { get; set; } + internal TokenCredential AzureTokenCredential { get; set; } + + /// + /// Initializes a new instance of the class. + /// + /// The operating system. + /// The run ID. + /// The network exposure. + /// The default authentication mechanism. + /// Whether to use cloud-hosted browsers. + /// The Azure token credential type. + /// The managed identity client ID. + public PlaywrightServiceOptions(OSPlatform? os = null, string? runId = null, string? exposeNetwork = null, string? serviceAuth = null, string? useCloudHostedBrowsers = null, string? azureTokenCredentialType = null, string? managedIdentityClientId = null) + { + Os = os; + RunId = runId; + ExposeNetwork = exposeNetwork; + ServiceAuth = serviceAuth ?? ServiceAuthType.EntraId; + UseCloudHostedBrowsers = string.IsNullOrEmpty(useCloudHostedBrowsers) || bool.Parse(useCloudHostedBrowsers!); + AzureTokenCredential = GetTokenCredential(azureTokenCredentialType, managedIdentityClientId); + Validate(); + } + + private void Validate() + { + if (Os != null && Os != OSPlatform.Linux && Os != OSPlatform.Windows) + { + throw new System.Exception($"Invalid value for {nameof(Os)}: {Os}. Supported values are {ServiceOs.Linux} and {ServiceOs.Windows}"); + } + if (!string.IsNullOrEmpty(ServiceAuth) && ServiceAuth != ServiceAuthType.EntraId && ServiceAuth != ServiceAuthType.AccessToken) + { + throw new System.Exception($"Invalid value for {nameof(ServiceAuth)}: {ServiceAuth}. Supported values are {ServiceAuthType.EntraId} and {ServiceAuthType.AccessToken}"); + } + } + + private static TokenCredential GetTokenCredential(string? azureTokenCredentialType, string? managedIdentityClientId) + { + if (string.IsNullOrEmpty(azureTokenCredentialType) && string.IsNullOrEmpty(managedIdentityClientId)) + return new DefaultAzureCredential(); + if (azureTokenCredentialType == AzureTokenCredentialType.ManagedIdentityCredential) + { + return new ManagedIdentityCredential(managedIdentityClientId); + } + else if (azureTokenCredentialType == AzureTokenCredentialType.WorkloadIdentityCredential) + { + return new WorkloadIdentityCredential(); + } + else if (azureTokenCredentialType == AzureTokenCredentialType.EnvironmentCredential) + { + return new EnvironmentCredential(); + } + else if (azureTokenCredentialType == AzureTokenCredentialType.AzureCliCredential) + { + return new AzureCliCredential(); + } + else if (azureTokenCredentialType == AzureTokenCredentialType.AzurePowerShellCredential) + { + return new AzurePowerShellCredential(); + } + else if (azureTokenCredentialType == AzureTokenCredentialType.AzureDeveloperCliCredential) + { + return new AzureDeveloperCliCredential(); + } + else if (azureTokenCredentialType == AzureTokenCredentialType.SharedTokenCacheCredential) + { + return new SharedTokenCacheCredential(); + } + else if (azureTokenCredentialType == AzureTokenCredentialType.VisualStudioCredential) + { + return new VisualStudioCredential(); + } + else if (azureTokenCredentialType == AzureTokenCredentialType.VisualStudioCodeCredential) + { + return new VisualStudioCodeCredential(); + } + else if (azureTokenCredentialType == AzureTokenCredentialType.InteractiveBrowserCredential) + { + return new InteractiveBrowserCredential(); + } + else + { + return new DefaultAzureCredential(new DefaultAzureCredentialOptions + { + ManagedIdentityClientId = managedIdentityClientId + }); + } + } +} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Processor/DataProcessor.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Processor/DataProcessor.cs new file mode 100644 index 000000000000..c5a4665c09a2 --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Processor/DataProcessor.cs @@ -0,0 +1,185 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.Collections.Generic; +using System; +using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Interface; +using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Model; +using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Utility; +using Microsoft.VisualStudio.TestPlatform.ObjectModel; +using System.Linq; +using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Implementation; +using System.Text.Json; + +namespace Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Processor +{ + internal class DataProcessor : IDataProcessor + { + private readonly ILogger _logger; + private readonly CIInfo _cIInfo; + private readonly CloudRunMetadata _cloudRunMetadata; + public DataProcessor(CloudRunMetadata cloudRunMetadata, CIInfo cIInfo, ILogger? logger = null) + { + _cloudRunMetadata = cloudRunMetadata; + _cIInfo = cIInfo; + _logger = logger ?? new Logger(); + } + + public TestRunDto GetTestRun() + { + var startTime = _cloudRunMetadata.TestRunStartTime.ToString("yyyy-MM-ddTHH:mm:ssZ"); + var gitBasedRunName = ReporterUtils.GetRunName(CiInfoProvider.GetCIInfo())?.Trim(); + string runName = string.IsNullOrEmpty(gitBasedRunName) ? _cloudRunMetadata.RunId! : gitBasedRunName!; + var run = new TestRunDto + { + TestRunId = _cloudRunMetadata.RunId!, + DisplayName = runName, + StartTime = startTime, + CreatorId = _cloudRunMetadata.AccessTokenDetails!.oid ?? "", + CreatorName = _cloudRunMetadata.AccessTokenDetails!.userName?.Trim() ?? "", + CloudReportingEnabled = true, + CloudRunEnabled = false, + CiConfig = new CIConfig + { + Branch = _cIInfo.Branch, + Author = _cIInfo.Author, + CommitId = _cIInfo.CommitId, + RevisionUrl = _cIInfo.RevisionUrl, + CiProviderName = _cIInfo.Provider ?? CIConstants.s_dEFAULT + }, + TestRunConfig = new ClientConfig // TODO fetch some of these dynamically + { + Workers = 1, + PwVersion = "1.40", + Timeout = 60000, + TestType = "WebTest", + TestSdkLanguage = "CSHARP", + TestFramework = new TestFramework() { Name = "PLAYWRIGHT", RunnerName = "NUNIT", Version = "3.1" }, // TODO fetch runner name MSTest/Nunit + ReporterPackageVersion = "1.0.0-beta.1", + Shards = new Shard() { Total = 1 } + } + }; + return run; + } + + public TestRunShardDto GetTestRunShard() + { + var startTime = _cloudRunMetadata.TestRunStartTime.ToString("yyyy-MM-ddTHH:mm:ssZ"); + var shard = new TestRunShardDto + { + UploadCompleted = false, + ShardId = "1", + Summary = new TestRunShardSummary + { + Status = "RUNNING", + StartTime = startTime, + }, + Workers = 1 + }; + return shard; + } + public TestResults GetTestCaseResultData(TestResult? testResultSource) + { + if (testResultSource == null) + return new TestResults(); + + TestResults testCaseResultData = new() + { + ArtifactsPath = new List(), + AccountId = _cloudRunMetadata.WorkspaceId!, + RunId = _cloudRunMetadata.RunId!, + TestExecutionId = GetExecutionId(testResultSource).ToString() + }; + testCaseResultData.TestCombinationId = testCaseResultData.TestExecutionId; // TODO check + testCaseResultData.TestId = testResultSource.TestCase.Id.ToString(); + testCaseResultData.TestTitle = testResultSource.TestCase.DisplayName; + var className = FetchTestClassName(testResultSource.TestCase.FullyQualifiedName); + testCaseResultData.SuiteTitle = className; + testCaseResultData.SuiteId = className; + testCaseResultData.FileName = FetchFileName(testResultSource.TestCase.Source); + testCaseResultData.LineNumber = testResultSource.TestCase.LineNumber; + testCaseResultData.Retry = 0; // TODO Retry and PreviousRetries + testCaseResultData.WebTestConfig = new WebTestConfig + { + JobName = _cIInfo.JobId ?? "", + //ProjectName = "playwright-dotnet", // TODO no project concept NA?? + //BrowserName = "chromium", // TODO check if possible to get from test + Os = ReporterUtils.GetCurrentOS(), + }; + //testCaseResultData.Annotations = ["windows"]; // TODO MSTest/Nunit annotation ?? + //testCaseResultData.Tags = ["windows"]; // TODO NA ?? + + TimeSpan duration = testResultSource.Duration; + testCaseResultData.ResultsSummary = new TestResultsSummary + { + Duration = (long)duration.TotalMilliseconds, // TODO fallback get from End-Start + StartTime = testResultSource.StartTime.ToString("yyyy-MM-ddTHH:mm:ssZ"), + Status = TestCaseResultStatus.s_iNCONCLUSIVE + }; + TestOutcome outcome = testResultSource.Outcome; + switch (outcome) + { + case TestOutcome.Passed: + testCaseResultData.ResultsSummary.Status = TestCaseResultStatus.s_pASSED; + testCaseResultData.Status = TestCaseResultStatus.s_pASSED; + break; + case TestOutcome.Failed: + testCaseResultData.ResultsSummary.Status = TestCaseResultStatus.s_fAILED; + testCaseResultData.Status = TestCaseResultStatus.s_fAILED; + break; + case TestOutcome.Skipped: + testCaseResultData.ResultsSummary.Status = TestCaseResultStatus.s_sKIPPED; + testCaseResultData.Status = TestCaseResultStatus.s_sKIPPED; + break; + default: + testCaseResultData.ResultsSummary.Status = TestCaseResultStatus.s_iNCONCLUSIVE; + testCaseResultData.Status = TestCaseResultStatus.s_iNCONCLUSIVE; + break; + } + return testCaseResultData; + } + + public static RawTestResult GetRawResultObject(TestResult? testResultSource) + { + if (testResultSource == null) + return new RawTestResult(); + List errors = new();//[testResultSource.ErrorMessage]; + if (testResultSource.ErrorMessage != null) + errors.Add(new MPTError() { message = testResultSource.ErrorMessage }); + var rawTestResult = new RawTestResult + { + errors = JsonSerializer.Serialize(errors), + stdErr = testResultSource?.ErrorStackTrace ?? string.Empty + }; + return rawTestResult; + } + + #region Data Processor Utility Methods + + private static Guid GetExecutionId(TestResult testResult) + { + TestProperty? executionIdProperty = testResult.Properties.FirstOrDefault( + property => property.Id.Equals(ReporterConstants.s_executionIdPropertyIdentifier)); + + Guid executionId = Guid.Empty; + if (executionIdProperty != null) + executionId = testResult.GetPropertyValue(executionIdProperty, Guid.Empty); + + return executionId.Equals(Guid.Empty) ? Guid.NewGuid() : executionId; + } + + private static string FetchTestClassName(string fullyQualifiedName) + { + string[] parts = fullyQualifiedName.Split('.'); + return string.Join(".", parts.Take(parts.Length - 1)); + } + + private static string FetchFileName(string fullFilePath) + { + char[] delimiters = { '\\', '/' }; + string[] parts = fullFilePath.Split(delimiters); + return parts.Last(); + } + #endregion + } +} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Processor/TestProcessor.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Processor/TestProcessor.cs new file mode 100644 index 000000000000..d90affe987a6 --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Processor/TestProcessor.cs @@ -0,0 +1,354 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Concurrent; +using System.Collections.Generic; +using System.IO; +using System.Text; +using System.Text.Json; +using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Implementation; +using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Interface; +using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Model; +using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Utility; +using Azure.Storage.Blobs; +using Microsoft.VisualStudio.TestPlatform.ObjectModel; +using Microsoft.VisualStudio.TestPlatform.ObjectModel.Client; +using Microsoft.VisualStudio.TestPlatform.ObjectModel.Logging; + +namespace Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Processor +{ + internal class TestProcessor : ITestProcessor + { + // Dependency Injection + private readonly IDataProcessor _dataProcessor; + private readonly ILogger _logger; + private readonly ICloudRunErrorParser _cloudRunErrorParser; + private readonly IServiceClient _serviceClient; + private readonly IConsoleWriter _consoleWriter; + private readonly CIInfo _cIInfo; + private readonly CloudRunMetadata _cloudRunMetadata; + + // Test Metadata + internal int TotalTestCount { get; set; } = 0; + internal int PassedTestCount { get; set; } = 0; + internal int FailedTestCount { get; set; } = 0; + internal int SkippedTestCount { get; set; } = 0; + internal int TotalArtifactCount { get; set; } = 0; + internal int TotalArtifactSizeInBytes { get; set; } = 0; + internal List TestResults { get; set; } = new List(); + internal ConcurrentDictionary RawTestResultsMap { get; set; } = new(); + internal bool FatalTestExecution { get; set; } = false; + internal TestRunShardDto? _testRunShard; + internal TestResultsUri? _testResultsSasUri; + + public TestProcessor(CloudRunMetadata cloudRunMetadata, CIInfo cIInfo, ILogger? logger = null, IDataProcessor? dataProcessor = null, ICloudRunErrorParser? cloudRunErrorParser = null, IServiceClient? serviceClient = null, IConsoleWriter? consoleWriter = null) + { + _cloudRunMetadata = cloudRunMetadata; + _cIInfo = cIInfo; + _logger = logger ?? new Logger(); + _dataProcessor = dataProcessor ?? new DataProcessor(_cloudRunMetadata, _cIInfo, _logger); + _cloudRunErrorParser = cloudRunErrorParser ?? new CloudRunErrorParser(_logger); + _serviceClient = serviceClient ?? new ServiceClient(_cloudRunMetadata, _cloudRunErrorParser); + _consoleWriter = consoleWriter ?? new ConsoleWriter(); + } + + public void TestRunStartHandler(object? sender, TestRunStartEventArgs e) + { + try + { + _logger.Info("Initialising test run"); + if (!_cloudRunMetadata.EnableResultPublish || FatalTestExecution) + { + return; + } + TestRunDto run = _dataProcessor.GetTestRun(); + TestRunShardDto shard = _dataProcessor.GetTestRunShard(); + TestRunDto? testRun = _serviceClient.PatchTestRunInfo(run); + if (testRun == null) + { + _logger.Error("Failed to patch test run info"); + FatalTestExecution = true; + return; + } + _logger.Info("Successfully patched test run - init"); + TestRunShardDto? testShard = _serviceClient.PostTestRunShardInfo(shard); + if (testShard == null) + { + _logger.Error("Failed to patch test run shard info"); + FatalTestExecution = true; + return; + } + _testRunShard = testShard; + _logger.Info("Successfully patched test run shard - init"); + _consoleWriter.WriteLine($"\nInitializing reporting for this test run. You can view the results at: {_cloudRunMetadata.PortalUrl!}"); + } + catch (Exception ex) + { + _logger.Error($"Failed to initialise test run: {ex}"); + FatalTestExecution = true; + } + } + public void TestCaseResultHandler(object? sender, TestResultEventArgs e) + { + try + { + TestResult testResultSource = e.Result; + TestResults? testResult = _dataProcessor.GetTestCaseResultData(testResultSource); + RawTestResult rawResult = DataProcessor.GetRawResultObject(testResultSource); + + // TODO - Send error to blob + _cloudRunErrorParser.HandleScalableRunErrorMessage(testResultSource.ErrorMessage); + _cloudRunErrorParser.HandleScalableRunErrorMessage(testResultSource.ErrorStackTrace); + if (!_cloudRunMetadata.EnableResultPublish || FatalTestExecution) + { + return; + } + + // TODO move rawResult upload here same as JS + RawTestResultsMap.TryAdd(testResult.TestExecutionId, rawResult); + + // Upload Attachments + UploadAttachment(e, testResult.TestExecutionId); + + // Update Test Count + if (testResult != null) + { + TotalTestCount++; + if (testResult.Status == TestCaseResultStatus.s_fAILED) + { + FailedTestCount++; + } + else if (testResult.Status == TestCaseResultStatus.s_pASSED) + { + PassedTestCount++; + } + else if (testResult.Status == TestCaseResultStatus.s_sKIPPED) + { + SkippedTestCount++; + } + TestResults.Add(testResult); + } + } + catch (Exception ex) + { + // test case processing failures should not stop the test run + _logger.Error($"Failed to process test case result: {ex}"); + } + } + public void TestRunCompleteHandler(object? sender, TestRunCompleteEventArgs e) + { + _logger.Info("Test run complete handler - start"); + if (_cloudRunMetadata.EnableResultPublish && !FatalTestExecution) + { + try + { + var body = new UploadTestResultsRequest() { Value = TestResults }; + _serviceClient.UploadBatchTestResults(body); + _logger.Info("Successfully uploaded test results"); + } + catch (Exception ex) + { + _logger.Error($"Failed to upload test results: {ex}"); + } + try + { + TestResultsUri? sasUri = CheckAndRenewSasUri(); + if (!string.IsNullOrEmpty(sasUri?.Uri)) + { + foreach (TestResults testResult in TestResults) + { + if (RawTestResultsMap.TryGetValue(testResult.TestExecutionId!, out RawTestResult? rawResult) && rawResult != null) + { + // Renew the SAS URI if needed + sasUri = CheckAndRenewSasUri(); + if (sasUri == null) + { + _logger.Warning("SAS URI is empty"); + continue; // allow recovery from temporary reporter API failures. In the future, we might consider shortciruiting the upload process. + } + + // Upload rawResult to blob storage using sasUri + var rawTestResultJson = JsonSerializer.Serialize(rawResult); + var filePath = $"{testResult.TestExecutionId}/rawTestResult.json"; + UploadBuffer(sasUri!.Uri!, rawTestResultJson, filePath); + } + else + { + _logger.Info("Couldn't find rawResult for Id: " + testResult.TestExecutionId); + } + } + _logger.Info("Successfully uploaded raw test results"); + } + else + { + _logger.Error("SAS URI is empty"); + } + } + catch (Exception ex) + { + _logger.Error($"Failed to upload artifacts: {ex}"); + } + } + EndTestRun(e); + } + + #region Test Processor Helper Methods + + private void UploadAttachment(TestResultEventArgs e, string testExecutionId) + { + _testResultsSasUri = CheckAndRenewSasUri(); + if (e.Result.Attachments != null) + { + foreach (var attachmentSet in e.Result.Attachments) + { + foreach (var attachmentData in attachmentSet.Attachments) + { + var filePath = attachmentData.Uri.LocalPath; + _logger.Info($"Uploading attachment: {filePath}"); + if (!File.Exists( filePath )) + { + _logger.Error($"Attachment file not found: {filePath}"); + continue; + } + try + { + // get file size + var fileSize = new FileInfo(filePath).Length; + var cloudFileName = ReporterUtils.GetCloudFileName(filePath, testExecutionId); + if (cloudFileName != null) { + UploadBlobFile(_testResultsSasUri!.Uri!, cloudFileName, filePath); + TotalArtifactCount++; + TotalArtifactSizeInBytes = TotalArtifactSizeInBytes + (int)fileSize; + } + else + { + _logger.Error($"Attachment file Upload Failed: {filePath}"); + } + } + catch (Exception ex) + { + var error = $"Cannot Upload '{filePath}' file: {ex.Message}"; + + _logger.Error(error); + } + } + } + } + } + + private TestResultsUri? CheckAndRenewSasUri() + { + var reporterUtils = new ReporterUtils(); + if (_testResultsSasUri == null || !reporterUtils.IsTimeGreaterThanCurrentPlus10Minutes(_testResultsSasUri.Uri)) + { + _testResultsSasUri = _serviceClient.GetTestRunResultsUri(); + _logger.Info($"Fetched SAS URI with validity: {_testResultsSasUri?.ExpiresAt} and access: {_testResultsSasUri?.AccessLevel}."); + } + return _testResultsSasUri; + } + + private void EndTestRun(TestRunCompleteEventArgs e) + { + if (_cloudRunMetadata.EnableResultPublish && !FatalTestExecution) + { + try + { + _testRunShard = GetTestRunEndShard(e); + _serviceClient.PostTestRunShardInfo(_testRunShard); + _logger.Info("Successfully ended test run shard"); + } + catch (Exception ex) + { + _logger.Error($"Failed to end test run shard: {ex}"); + } + _consoleWriter.WriteLine($"\nTest Report: {_cloudRunMetadata.PortalUrl!}"); + if (_cloudRunMetadata.EnableGithubSummary) + { + GenerateMarkdownSummary(); + } + } + _cloudRunErrorParser.DisplayMessages(); + } + private static string GetCloudFilePath(string uri, string fileRelativePath) + { + string[] parts = uri.Split(new string[] { ReporterConstants.s_sASUriSeparator }, StringSplitOptions.None); + string containerUri = parts[0]; + string sasToken = parts.Length > 1 ? parts[1] : string.Empty; + + return $"{containerUri}/{fileRelativePath}?{sasToken}"; + } + private void UploadBuffer(string uri, string buffer, string fileRelativePath) + { + string cloudFilePath = GetCloudFilePath(uri, fileRelativePath); + BlobClient blobClient = new(new Uri(cloudFilePath)); + byte[] bufferBytes = Encoding.UTF8.GetBytes(buffer); + blobClient.Upload(new BinaryData(bufferBytes), overwrite: true); + _logger.Info($"Uploaded buffer to {fileRelativePath}"); + } + + private void UploadBlobFile(string uri, string fileRelativePath, string filePath) + { + string cloudFilePath = GetCloudFilePath(uri, fileRelativePath); + BlobClient blobClient = new(new Uri(cloudFilePath)); + // Upload filePath to Blob + blobClient.Upload(filePath, overwrite: true); + _logger.Info($"Uploaded file {filePath} to {fileRelativePath}"); + } + + private TestRunShardDto GetTestRunEndShard(TestRunCompleteEventArgs e) + { + DateTime testRunEndedOn = DateTime.UtcNow; + long durationInMs = 0; + + var result = FailedTestCount > 0 ? TestCaseResultStatus.s_fAILED : TestCaseResultStatus.s_pASSED; + + if (e.ElapsedTimeInRunningTests != null) + { + testRunEndedOn = _cloudRunMetadata.TestRunStartTime.Add(e.ElapsedTimeInRunningTests); + durationInMs = (long)e.ElapsedTimeInRunningTests.TotalMilliseconds; + } + TestRunShardDto? testRunShard = _testRunShard; + // Update Shard End + if (testRunShard!.Summary == null) + testRunShard.Summary = new TestRunShardSummary(); + testRunShard.Summary.Status = "CLIENT_COMPLETE"; + testRunShard.Summary.StartTime = _cloudRunMetadata.TestRunStartTime.ToString("yyyy-MM-ddTHH:mm:ssZ"); + testRunShard.Summary.EndTime = testRunEndedOn.ToString("yyyy-MM-ddTHH:mm:ssZ"); + testRunShard.Summary.TotalTime = durationInMs; + testRunShard.Summary.UploadMetadata = new UploadMetadata() { NumTestResults = TotalTestCount, NumTotalAttachments = TotalArtifactCount, SizeTotalAttachments = TotalArtifactSizeInBytes }; + testRunShard.UploadCompleted = true; + return testRunShard; + } + private void GenerateMarkdownSummary() + { + if (_cIInfo.Provider == CIConstants.s_gITHUB_ACTIONS) + { + string markdownContent = @$" +#### Results: + +![pass](https://img.shields.io/badge/status-passed-brightgreen) **Passed:** {PassedTestCount} + +![fail](https://img.shields.io/badge/status-failed-red) **Failed:** {FailedTestCount} + +![flaky](https://img.shields.io/badge/status-flaky-yellow) **Flaky:** {"0"} + +![skipped](https://img.shields.io/badge/status-skipped-lightgrey) **Skipped:** {SkippedTestCount} + +#### For more details, visit the [service dashboard]({Uri.EscapeUriString(_cloudRunMetadata.PortalUrl!)}). +"; + + string filePath = Environment.GetEnvironmentVariable("GITHUB_STEP_SUMMARY"); + try + { + File.WriteAllText(filePath, markdownContent); + } + catch (Exception ex) + { + _logger.Error($"Error writing Markdown summary: {ex}"); + } + } + } + #endregion + } +} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Utility/CiInfoProvider.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Utility/CiInfoProvider.cs new file mode 100644 index 000000000000..fa229851e41d --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Utility/CiInfoProvider.cs @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Model; +using System; + +namespace Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Utility; + +internal class CiInfoProvider +{ + private static bool IsGitHubActions() + { + return Environment.GetEnvironmentVariable("GITHUB_ACTIONS") == "true"; + } + + private static bool IsAzureDevOps() + { + return Environment.GetEnvironmentVariable("AZURE_HTTP_USER_AGENT") != null && + Environment.GetEnvironmentVariable("TF_BUILD") != null; + } + + internal static string GetCIProvider() + { + if (IsGitHubActions()) + return CIConstants.s_gITHUB_ACTIONS; + else if (IsAzureDevOps()) + return CIConstants.s_aZURE_DEVOPS; + else + return CIConstants.s_dEFAULT; + } + + internal static CIInfo GetCIInfo() + { + string ciProvider = GetCIProvider(); + if (ciProvider == CIConstants.s_gITHUB_ACTIONS) + { + // Logic to get GitHub Actions CIInfo + return new CIInfo + { + Provider = CIConstants.s_gITHUB_ACTIONS, + Repo = Environment.GetEnvironmentVariable("GITHUB_REPOSITORY_ID"), + Branch = GetGHBranchName(), + Author = Environment.GetEnvironmentVariable("GITHUB_ACTOR"), + CommitId = Environment.GetEnvironmentVariable("GITHUB_SHA"), + RevisionUrl = Environment.GetEnvironmentVariable("GITHUB_SERVER_URL") != null + ? $"{Environment.GetEnvironmentVariable("GITHUB_SERVER_URL")}/{Environment.GetEnvironmentVariable("GITHUB_REPOSITORY")}/commit/{Environment.GetEnvironmentVariable("GITHUB_SHA")}" + : null, + RunId = Environment.GetEnvironmentVariable("GITHUB_RUN_ID"), + RunAttempt = Environment.GetEnvironmentVariable("GITHUB_RUN_ATTEMPT") != null + ? int.Parse(Environment.GetEnvironmentVariable("GITHUB_RUN_ATTEMPT")!) + : null, + JobId = Environment.GetEnvironmentVariable("GITHUB_JOB") + }; + } + else if (ciProvider == CIConstants.s_aZURE_DEVOPS) + { + // Logic to get Azure DevOps CIInfo + return new CIInfo + { + Provider = CIConstants.s_aZURE_DEVOPS, + Repo = Environment.GetEnvironmentVariable("BUILD_REPOSITORY_ID"), + Branch = Environment.GetEnvironmentVariable("BUILD_SOURCEBRANCH"), + Author = Environment.GetEnvironmentVariable("BUILD_REQUESTEDFOR"), + CommitId = Environment.GetEnvironmentVariable("BUILD_SOURCEVERSION"), + RevisionUrl = Environment.GetEnvironmentVariable("SYSTEM_TEAMFOUNDATIONCOLLECTIONURI") != null + ? $"{Environment.GetEnvironmentVariable("SYSTEM_TEAMFOUNDATIONCOLLECTIONURI")}{Environment.GetEnvironmentVariable("SYSTEM_TEAMPROJECT")}/_git/{Environment.GetEnvironmentVariable("BUILD_REPOSITORY_NAME")}/commit/{Environment.GetEnvironmentVariable("BUILD_SOURCEVERSION")}" + : null, + RunId = GetADORunId(), + RunAttempt = Environment.GetEnvironmentVariable("RELEASE_ATTEMPTNUMBER") != null + ? int.Parse(Environment.GetEnvironmentVariable("RELEASE_ATTEMPTNUMBER")!) + : int.Parse(Environment.GetEnvironmentVariable("SYSTEM_JOBATTEMPT")!), + JobId = Environment.GetEnvironmentVariable("RELEASE_DEPLOYMENTID") ?? Environment.GetEnvironmentVariable("SYSTEM_JOBID") + }; + } + else + { + // Handle unsupported CI provider + return new CIInfo + { + Provider = CIConstants.s_dEFAULT, + Repo = Environment.GetEnvironmentVariable("REPO"), + Branch = Environment.GetEnvironmentVariable("BRANCH"), + Author = Environment.GetEnvironmentVariable("AUTHOR"), + CommitId = Environment.GetEnvironmentVariable("COMMIT_ID"), + RevisionUrl = Environment.GetEnvironmentVariable("REVISION_URL"), + RunId = Environment.GetEnvironmentVariable("RUN_ID"), + RunAttempt = Environment.GetEnvironmentVariable("RUN_ATTEMPT") != null + ? int.Parse(Environment.GetEnvironmentVariable("RUN_ATTEMPT")!) + : null, + JobId = Environment.GetEnvironmentVariable("JOB_ID") + }; + } + } + + private static string GetADORunId() + { + if (Environment.GetEnvironmentVariable("RELEASE_DEFINITIONID") != null && Environment.GetEnvironmentVariable("RELEASE_DEPLOYMENTID") != null) + return $"{Environment.GetEnvironmentVariable("RELEASE_DEFINITIONID")}-{Environment.GetEnvironmentVariable("RELEASE_DEPLOYMENTID")}"; + else + return $"{Environment.GetEnvironmentVariable("SYSTEM_DEFINITIONID")}-{Environment.GetEnvironmentVariable("SYSTEM_JOBID")}"; + } + + private static string GetGHBranchName() + { + if (Environment.GetEnvironmentVariable("GITHUB_EVENT_NAME") == "pull_request" || + Environment.GetEnvironmentVariable("GITHUB_EVENT_NAME") == "pull_request_target") + return Environment.GetEnvironmentVariable("GITHUB_HEAD_REF")!; + else + return Environment.GetEnvironmentVariable("GITHUB_REF_NAME")!; + } +} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Utility/ReporterUtils.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Utility/ReporterUtils.cs new file mode 100644 index 000000000000..d17aa019b488 --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Utility/ReporterUtils.cs @@ -0,0 +1,212 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Diagnostics; +using System.IO; +using System.Linq; +using System.Security.Cryptography; +using System.Threading.Tasks; +using Azure.Core.Pipeline; +using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Implementation; +using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Interface; +using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Model; +using Microsoft.IdentityModel.JsonWebTokens; + +namespace Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Utility +{ + internal class ReporterUtils + { + private readonly ILogger _logger; + public ReporterUtils(ILogger? logger = null) + { + _logger = logger ?? new Logger(); + } + internal static string GetRunId(CIInfo cIInfo) + { + if (cIInfo.Provider == CIConstants.s_dEFAULT) + { + return Guid.NewGuid().ToString(); + } + var concatString = $"{cIInfo.Provider}-{cIInfo.Repo}-{cIInfo.RunId}-{cIInfo.RunAttempt}"; + return CalculateSha1Hash(concatString); + } + + internal static string CalculateSha1Hash(string input) + { + using (var sha1 = SHA1.Create()) + { + var hash = sha1.ComputeHash(System.Text.Encoding.UTF8.GetBytes(input)); + return BitConverter.ToString(hash).Replace("-", string.Empty).ToLower(); + } + } + + internal static string GetRunName(CIInfo ciInfo) + { + string GIT_VERSION_COMMAND = "git --version"; + string GIT_REV_PARSE = "git rev-parse --is-inside-work-tree"; + string GIT_COMMIT_MESSAGE_COMMAND = "git log -1 --pretty=format:\"%s\""; + + if (ciInfo.Provider == CIConstants.s_gITHUB_ACTIONS && + Environment.GetEnvironmentVariable("GITHUB_EVENT_NAME") == "pull_request") + { + var prNumber = Environment.GetEnvironmentVariable("GITHUB_REF_NAME")?.Split('/')[0]; + var repo = Environment.GetEnvironmentVariable("GITHUB_REPOSITORY"); + var prLink = $"{repo}/pull/{prNumber}"; + return $"PR# {prNumber} on Repo: {repo} ({prLink})"; + } + + try + { + string gitVersion = RunCommandAsync(GIT_VERSION_COMMAND).EnsureCompleted(); + if (string.IsNullOrEmpty(gitVersion)) + { + throw new Exception("Git is not installed on the machine"); + } + + string isInsideWorkTree = RunCommandAsync(GIT_REV_PARSE).EnsureCompleted(); + if (isInsideWorkTree.Trim() != "true") + { + throw new Exception("Not inside a git repository"); + } + + string gitCommitMessage = RunCommandAsync(GIT_COMMIT_MESSAGE_COMMAND).EnsureCompleted(); + return gitCommitMessage; + } + catch (Exception) + { + return string.Empty; + } + } + + internal static async Task RunCommandAsync(string command, bool async = false) + { + var processInfo = new ProcessStartInfo("cmd", $"/c {command}") + { + RedirectStandardOutput = true, + UseShellExecute = false, + CreateNoWindow = true + }; + + using (var process = new Process { StartInfo = processInfo }) + { + process.Start(); + string result; + if (async) + { + result = await process.StandardOutput.ReadToEndAsync().ConfigureAwait(false); + } + else + { + result = process.StandardOutput.ReadToEnd(); + } + process.WaitForExit(); + return result; + } + } + + internal static string GetCurrentOS() + { + PlatformID platform = Environment.OSVersion.Platform; + if (platform == PlatformID.Unix) + return OSConstants.s_lINUX; + else if (platform == PlatformID.MacOSX) + return OSConstants.s_mACOS; + else + return OSConstants.s_wINDOWS; + } + internal static string? GetCloudFileName(string filePath, string testExecutionId) + { + var fileName = Path.GetFileName(filePath); + if (fileName == null) + { + return null; + } + return $"{testExecutionId}/{fileName}"; // TODO check if we need to add {Guid.NewGuid()} for file with same name + } + + internal TokenDetails ParseWorkspaceIdFromAccessToken(JsonWebTokenHandler? jsonWebTokenHandler, string? accessToken) + { + if (jsonWebTokenHandler == null) + { + jsonWebTokenHandler = new JsonWebTokenHandler(); + } + TokenDetails tokenDetails = new(); + if (string.IsNullOrEmpty(accessToken)) + { + throw new ArgumentNullException(nameof(accessToken), "AccessToken is null or empty"); + } + try + { + JsonWebToken inputToken = (JsonWebToken)jsonWebTokenHandler.ReadToken(accessToken); + var aid = inputToken.Claims.FirstOrDefault(c => c.Type == "aid")?.Value ?? string.Empty; + + if (!string.IsNullOrEmpty(aid)) // Custom Token + { + _logger.Info("Custom Token parsing"); + tokenDetails.aid = aid; + tokenDetails.oid = inputToken.Claims.FirstOrDefault(c => c.Type == "oid")?.Value ?? string.Empty; + tokenDetails.id = inputToken.Claims.FirstOrDefault(c => c.Type == "id")?.Value ?? string.Empty; + tokenDetails.userName = inputToken.Claims.FirstOrDefault(c => c.Type == "name")?.Value ?? string.Empty; + } + else // Entra Token + { + _logger.Info("Entra Token parsing"); + tokenDetails.aid = Environment.GetEnvironmentVariable(ReporterConstants.s_pLAYWRIGHT_SERVICE_WORKSPACE_ID) ?? string.Empty; + tokenDetails.oid = inputToken.Claims.FirstOrDefault(c => c.Type == "oid")?.Value ?? string.Empty; + tokenDetails.id = string.Empty; + tokenDetails.userName = inputToken.Claims.FirstOrDefault(c => c.Type == "name")?.Value ?? string.Empty; + // TODO add back suport for old claims https://devdiv.visualstudio.com/OnlineServices/_git/PlaywrightService?path=/src/Common/Authorization/JwtSecurityTokenValidator.cs&version=GBmain&line=200&lineEnd=200&lineStartColumn=30&lineEndColumn=52&lineStyle=plain&_a=contents + } + + return tokenDetails; + } + catch (Exception) + { + throw; + } + } + + internal bool IsTimeGreaterThanCurrentPlus10Minutes(string sasUri) + { + try + { + // Parse the SAS URI + Uri url = new Uri(sasUri); + string query = url.Query; + var queryParams = System.Web.HttpUtility.ParseQueryString(query); + string expiryTime = queryParams["se"]; // 'se' is the query parameter for the expiry time + + if (!string.IsNullOrEmpty(expiryTime)) + { + // Convert expiry time to a timestamp + DateTime expiryDateTime = DateTime.Parse(expiryTime, null, System.Globalization.DateTimeStyles.RoundtripKind); + long timestampFromIsoString = ((DateTimeOffset)expiryDateTime).ToUnixTimeMilliseconds(); + + // Get current time + 10 minutes in milliseconds + long currentTimestampPlus10Minutes = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds() + (10 * 60 * 1000); + + bool isSasValidityGreaterThanCurrentTimePlus10Minutes = timestampFromIsoString > currentTimestampPlus10Minutes; + + if (!isSasValidityGreaterThanCurrentTimePlus10Minutes) + { + // Log if SAS is close to expiry + _logger.Info( + $"Sas rotation required because close to expiry, SasUriValidTillTime: {timestampFromIsoString}, CurrentTime: {currentTimestampPlus10Minutes}" + ); + } + + return isSasValidityGreaterThanCurrentTimePlus10Minutes; + } + + _logger.Info("Sas rotation required because expiry param not found."); + return false; + } + catch (Exception ex) + { + _logger.Info($"Sas rotation required because of {ex.Message}."); + return false; + } + } + } +} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/tests/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Tests.csproj b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/tests/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Tests.csproj new file mode 100644 index 000000000000..60229ecd863c --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/tests/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Tests.csproj @@ -0,0 +1,23 @@ + + + + enable + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/tests/EntraLifecycleTests.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/tests/EntraLifecycleTests.cs new file mode 100644 index 000000000000..87e964b4b0e5 --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/tests/EntraLifecycleTests.cs @@ -0,0 +1,204 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Microsoft.IdentityModel.JsonWebTokens; +using Microsoft.IdentityModel.Tokens; +using Moq; + +namespace Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Tests; + +[TestFixture] +public class EntraLifecycleTests +{ + private static string GetToken(Dictionary claims, DateTime? expires = null) + { + var tokenHandler = new JsonWebTokenHandler(); + var token = tokenHandler.CreateToken(new SecurityTokenDescriptor + { + Claims = claims, + Expires = expires ?? DateTime.UtcNow.AddMinutes(10), + }); + return token!; + } + + [TearDown] + public void TearDown() + { + Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceAccessToken, null); + } + + [Test] + public void Constructor_WhenAccessTokenEnvironmentIsNotSet_DoesNotInitializeEntraToken() + { + EntraLifecycle entraLifecycle = new(); + Assert.That(entraLifecycle._entraIdAccessToken, Is.Null); + } + + [Test] + public void Constructor_WhenAccessTokenEnvironmentIsSetButTokenIsNotValid_DoesNotInitializeEntraToken() + { + Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceAccessToken, "valid_token"); + EntraLifecycle entraLifecycle = new(); + Assert.That(entraLifecycle._entraIdAccessToken, Is.Null); + } + + [Test] + public void Constructor_WhenAccessTokenEnvironmentIsSetAndTokenIsMPTCustomToken_DoesNotInitializeEntraToken() + { + var token = GetToken(new Dictionary + { + {"aid", "account-id-guid"}, + }); + Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceAccessToken, token); + EntraLifecycle entraLifecycle = new(); + Assert.That(entraLifecycle._entraIdAccessToken, Is.Null); + } + + [Test] + public void Constructor_WhenAccessTokenEnvironmentIsSetAndTokenIsMPTCustomTokenWithAccountIdClaim_DoesNotInitializeEntraToken() + { + var token = GetToken(new Dictionary + { + {"accountId", "account-id-guid"}, + }); + Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceAccessToken, token); + EntraLifecycle entraLifecycle = new(); + Assert.That(entraLifecycle._entraIdAccessToken, Is.Null); + } + + [Test] + public void Constructor_WhenJWTValidationThrowsException_DoesNotInitializeEntraToken() + { + var token = GetToken(new Dictionary()); + Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceAccessToken, token); + var jsonWebTokenHandlerMock = new Mock(); + jsonWebTokenHandlerMock + .Setup(x => x.ReadJsonWebToken(token)) + .Throws(new Exception()); + EntraLifecycle entraLifecycle = new(jsonWebTokenHandler: jsonWebTokenHandlerMock.Object); + Assert.That(entraLifecycle._entraIdAccessToken, Is.Null); + } + + [Test] + public void Constructor_WhenAccessTokenEnvironmentIsSetAndValid_InitializeEntraToken() + { + DateTime expiry = DateTime.UtcNow.AddMinutes(10); + var token = GetToken(new Dictionary(), expiry); + Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceAccessToken, token); + EntraLifecycle entraLifecycle = new(); + Assert.Multiple(() => + { + Assert.That(entraLifecycle._entraIdAccessToken, Is.EqualTo(token)); + Assert.That(entraLifecycle._entraIdAccessTokenExpiry, Is.EqualTo((long)(expiry - new DateTime(1970, 1, 1)).TotalSeconds)); + }); + } + + [Test] + public async Task FetchEntraIdAccessTokenAsync_WhenTokenIsFetched_SetsEnvironmentVariable() + { + var defaultAzureCredentialMock = new Mock(); + var token = "valid_token"; + defaultAzureCredentialMock + .Setup(x => x.GetTokenAsync(It.IsAny(), It.IsAny())) + .ReturnsAsync(new AccessToken(token, DateTimeOffset.UtcNow.AddMinutes(10))); + EntraLifecycle entraLifecycle = new(defaultAzureCredentialMock.Object); + await entraLifecycle.FetchEntraIdAccessTokenAsync(); + Assert.That(Environment.GetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceAccessToken), Is.EqualTo(token)); + + Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceAccessToken, null); + } + + [Test] + public async Task FetchEntraIdAccessTokenAsync_WhenTokenIsFetched_SetsTokenAndExpiry() + { + var defaultAzureCredentialMock = new Mock(); + var token = "valid_token"; + DateTimeOffset expiry = DateTimeOffset.UtcNow.AddMinutes(10); + defaultAzureCredentialMock + .Setup(x => x.GetTokenAsync(It.IsAny(), It.IsAny())) + .ReturnsAsync(new AccessToken(token, expiry)); + EntraLifecycle entraLifecycle = new(defaultAzureCredentialMock.Object); + await entraLifecycle.FetchEntraIdAccessTokenAsync(); + Assert.That(entraLifecycle._entraIdAccessToken, Is.EqualTo(token)); + Assert.That(entraLifecycle._entraIdAccessTokenExpiry, Is.EqualTo((int)expiry.ToUnixTimeSeconds())); + + Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceAccessToken, null); + } + + [Test] + public async Task FetchEntraIdAccessTokenAsync_WhenTokenIsFetched_ReturnVoid() + { + var defaultAzureCredentialMock = new Mock(); + var token = "valid_token"; + DateTimeOffset expiry = DateTimeOffset.UtcNow.AddMinutes(10); + defaultAzureCredentialMock + .Setup(x => x.GetTokenAsync(It.IsAny(), It.IsAny())) + .ReturnsAsync(new AccessToken(token, expiry)); + EntraLifecycle entraLifecycle = new(defaultAzureCredentialMock.Object); + await entraLifecycle.FetchEntraIdAccessTokenAsync(); + + Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceAccessToken, null); + } + + [Test] + public void FetchEntraIdAccessTokenAsync_WhenThrowsError() + { + var defaultAzureCredentialMock = new Mock(); + defaultAzureCredentialMock + .Setup(x => x.GetTokenAsync(It.IsAny(), It.IsAny())) + .ThrowsAsync(new Exception("sample exception")); + EntraLifecycle entraLifecycle = new(defaultAzureCredentialMock.Object); + Exception? ex = Assert.ThrowsAsync(async () => + await entraLifecycle.FetchEntraIdAccessTokenAsync()); + + Assert.That(ex!.Message, Is.EqualTo(Constants.s_no_auth_error)); + } + + [Test] + public void DoesEntraIdAccessTokenRequireRotation_WhenEntraIdAccessTokenIsEmpty_ReturnsTrue() + { + EntraLifecycle entraLifecycle = new() + { + _entraIdAccessToken = "" + }; + Assert.That(entraLifecycle.DoesEntraIdAccessTokenRequireRotation(), Is.True); + } + + [Test] + public void DoesEntraIdAccessTokenRequireRotation_WhenEntraIdAccessTokenIsNull_ReturnsTrue() + { + EntraLifecycle entraLifecycle = new() + { + _entraIdAccessToken = null + }; + Assert.That(entraLifecycle.DoesEntraIdAccessTokenRequireRotation(), Is.True); + } + + [Test] + public void DoesEntraIdAccessTokenRequireRotation_WhenTokenIsNotAboutToExpire_ReturnsFalse() + { + EntraLifecycle entraLifecycle = new() + { + _entraIdAccessToken = "valid_token", + _entraIdAccessTokenExpiry = DateTimeOffset.UtcNow.ToUnixTimeSeconds() + 1000 // more than threshold of 10 mins + }; + Assert.That(entraLifecycle.DoesEntraIdAccessTokenRequireRotation(), Is.False); + } + + [Test] + public void DoesEntraIdAccessTokenRequireRotation_WhenTokenIsAboutToExpire_ReturnsTrue() + { + EntraLifecycle entraLifecycle = new() + { + _entraIdAccessToken = "valid_token", + _entraIdAccessTokenExpiry = DateTimeOffset.UtcNow.ToUnixTimeSeconds() + 400 // less than threshold of 10 mins + }; + Assert.That(entraLifecycle.DoesEntraIdAccessTokenRequireRotation(), Is.True); + } +} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/tests/Implementation/CloudRunErrorParserTests.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/tests/Implementation/CloudRunErrorParserTests.cs new file mode 100644 index 000000000000..f9235f972283 --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/tests/Implementation/CloudRunErrorParserTests.cs @@ -0,0 +1,236 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.Text.RegularExpressions; +using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Implementation; +using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Interface; +using Microsoft.Extensions.FileSystemGlobbing.Internal; +using Moq; + +namespace Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Tests.Implementation +{ + [TestFixture] + [Parallelizable(ParallelScope.Self)] + public class CloudRunErrorParserTests + { + private Mock? _loggerMock; + private Mock? _consoleWriterMock; + private CloudRunErrorParser? _errorParser; + + [SetUp] + public void Setup() + { + _loggerMock = new Mock(); + _consoleWriterMock = new Mock(); + _errorParser = new CloudRunErrorParser(_loggerMock.Object, _consoleWriterMock.Object); + } + + [Test] + public void TryPushMessageAndKey_WithValidMessageAndKey_ReturnsTrue() + { + string message = "Test message"; + string key = "Test key"; + + bool result = _errorParser!.TryPushMessageAndKey(message, key); + + Assert.IsTrue(result); + } + + [Test] + public void TryPushMessageAndKey_WithNullOrEmptyMessage_ReturnsFalse() + { + string? message = null; + string key = "Test key"; + + bool result = _errorParser!.TryPushMessageAndKey(message, key); + + Assert.IsFalse(result); + } + + [Test] + public void TryPushMessageAndKey_WithNullOrEmptyKey_ReturnsFalse() + { + string message = "Test message"; + string? key = null; + + bool result = _errorParser!.TryPushMessageAndKey(message, key); + + Assert.IsFalse(result); + } + + [Test] + public void TryPushMessageAndKey_WithExistingKey_ReturnsFalse() + { + string message = "Test message"; + string key = "Existing key"; + _errorParser!.TryPushMessageAndKey(message, key); + + bool result = _errorParser.TryPushMessageAndKey(message, key); + + Assert.IsFalse(result); + } + + [Test] + public void PushMessage_AddsMessageToList() + { + string message = "Test message"; + + _errorParser!.PushMessage(message); + + CollectionAssert.Contains(_errorParser!.InformationalMessages, message); + } + + [Test] + public void DisplayMessages_WithMessages_WritesMessagesToConsole() + { + _errorParser!.PushMessage("Message 1"); + _errorParser.PushMessage("Message 2"); + + _errorParser.DisplayMessages(); + + _consoleWriterMock!.Verify(cw => cw.WriteLine(null), Times.Once); + _consoleWriterMock.Verify(cw => cw.WriteLine("1) Message 1"), Times.Once); + _consoleWriterMock.Verify(cw => cw.WriteLine("2) Message 2"), Times.Once); + } + + [Test] + public void DisplayMessages_WithoutMessages_DoesNotWriteToConsole() + { + _errorParser!.DisplayMessages(); + + _consoleWriterMock!.Verify(cw => cw.WriteLine(null), Times.Never); + _consoleWriterMock.Verify(cw => cw.WriteLine(It.IsAny()), Times.Never); + } + + [Test] + public void PrintErrorToConsole_WritesErrorMessageToConsole() + { + string errorMessage = "Test error message"; + + _errorParser!.PrintErrorToConsole(errorMessage); + + _consoleWriterMock!.Verify(cw => cw.WriteError(errorMessage), Times.Once); + } + + [Test] + public void HandleScalableRunErrorMessage_WithNullMessage_DoesNotPushMessage() + { + _errorParser!.HandleScalableRunErrorMessage(null); + + Assert.IsEmpty(_errorParser.InformationalMessages); + } + + [Test] + public void HandleScalableRunErrorMessage_WithoutMatchingPattern_DoesNotPushMessage() + { + string message = "Unknown error"; + + _errorParser!.HandleScalableRunErrorMessage(message); + + Assert.IsEmpty(_errorParser.InformationalMessages); + } + + [Test] + public void HandleScalableRunErrorMessage401_WithMatchingPattern_PushesMessage() + { + string errorMessage = " Microsoft.Playwright.PlaywrightException : WebSocket error: wss://eastus.api.playwright.microsoft.com/accounts/eastus_123/browsers 401 Unauthorized"; + + _errorParser!.HandleScalableRunErrorMessage(errorMessage); + var message = "The authentication token provided is invalid. Please check the token and try again."; + Assert.Contains(message, _errorParser.InformationalMessages); + } + + [Test] + public void HandleScalableRunErrorMessageNoPermissionOnWorkspaceScalable_WithMatchingPattern_PushesMessage() + { + string errorMessage = " Microsoft.Playwright.PlaywrightException : WebSocket error: wss://eastus.api.playwright.microsoft.com/accounts/eastus_123/browsers 403 Forbidden\r\nCheckAccess API call with non successful response."; + + _errorParser!.HandleScalableRunErrorMessage(errorMessage); + var message = @"You do not have the required permissions to run tests. This could be because: + + a. You do not have the required roles on the workspace. Only Owner and Contributor roles can run tests. Contact the service administrator. + b. The workspace you are trying to run the tests on is in a different Azure tenant than what you are signed into. Check the tenant id from Azure portal and login using the command 'az login --tenant '."; + Assert.Contains(message, _errorParser.InformationalMessages); + } + + [Test] + public void HandleScalableRunErrorMessageInvalidWorkspaceScalable_WithMatchingPattern_PushesMessage() + { + string errorMessage = " Microsoft.Playwright.PlaywrightException : WebSocket error: wss://eastus.api.playwright.microsoft.com/accounts/eastus_123/browsers 403 Forbidden\r\nInvalidAccountOrSubscriptionState"; + + _errorParser!.HandleScalableRunErrorMessage(errorMessage); + var message = "The specified workspace does not exist. Please verify your workspace settings."; + Assert.Contains(message, _errorParser.InformationalMessages); + } + + [Test] + public void HandleScalableRunErrorMessageInvalidAccessToken_WithMatchingPattern_PushesMessage() + { + string errorMessage = " Microsoft.Playwright.PlaywrightException : WebSocket error: wss://eastus.api.playwright.microsoft.com/accounts/eastus_123/browsers 403 Forbidden\r\nInvalidAccessToken"; + + _errorParser!.HandleScalableRunErrorMessage(errorMessage); + var message = "The provided access token does not match the specified workspace URL. Please verify that both values are correct."; + Assert.Contains(message, _errorParser.InformationalMessages); + } + + [Test] + public void HandleScalableRunErrorMessageAccessTokenOrUserOrWorkspaceNotFoundScalable_WithMatchingPattern_PushesMessage() + { + string errorMessage = " Microsoft.Playwright.PlaywrightException : WebSocket error: wss://eastus.api.playwright.microsoft.com/accounts/eastus_123/browsers 404 Not Found\r\nNotFound"; + + _errorParser!.HandleScalableRunErrorMessage(errorMessage); + var message = "The data for the user, workspace or access token was not found. Please check the request or create new token and try again."; + Assert.Contains(message, _errorParser.InformationalMessages); + } + + [Test] + public void HandleScalableRunErrorMessageAccessKeyBasedAuthNotSupportedScalable_WithMatchingPattern_PushesMessage() + { + string errorMessage = " Microsoft.Playwright.PlaywrightException : WebSocket error: wss://eastus.api.playwright.microsoft.com/accounts/eastus_123/browsers 403 Forbidden\r\nAccessKeyBasedAuthNotSupported"; + + _errorParser!.HandleScalableRunErrorMessage(errorMessage); + var message = "Authentication through service access token is disabled for this workspace. Please use Entra ID to authenticate."; + Assert.Contains(message, _errorParser.InformationalMessages); + } + + [Test] + public void HandleScalableRunErrorMessageServiceUnavailableScalable_WithMatchingPattern_PushesMessage() + { + string errorMessage = " Microsoft.Playwright.PlaywrightException : WebSocket error: wss://eastus.api.playwright.microsoft.com/accounts/eastus_1120dd21-4e05-4b3d-8b54-e329307ff214/browsers 503 Service Unavailable"; + + _errorParser!.HandleScalableRunErrorMessage(errorMessage); + var message = "The service is currently unavailable. Please check the service status and try again."; + Assert.Contains(message, _errorParser.InformationalMessages); + } + + [Test] + public void HandleScalableRunErrorMessageGatewayTimeoutScalable_WithMatchingPattern_PushesMessage() + { + string errorMessage = " Microsoft.Playwright.PlaywrightException : WebSocket error: wss://eastus.api.playwright.microsoft.com/accounts/eastus_1120dd21-4e05-4b3d-8b54-e329307ff214/browsers 504 Gateway Timeout"; + + _errorParser!.HandleScalableRunErrorMessage(errorMessage); + var message = "The request to the service timed out. Please try again later."; + Assert.Contains(message, _errorParser.InformationalMessages); + } + + [Test] + public void HandleScalableRunErrorMessageQuotaLimitErrorScalable_WithMatchingPattern_PushesMessage() + { + string errorMessage = "Timeout 60000s exceeded,\r\nws connecting wss://eastus.api.playwright.microsoft.com/accounts/eastus_1120dd21-4e05-4b3d-8b54-e329307ff214/browsers"; + + _errorParser!.HandleScalableRunErrorMessage(errorMessage); + var message = "It is possible that the maximum number of concurrent sessions allowed for your workspace has been exceeded."; + Assert.Contains(message, _errorParser.InformationalMessages); + } + + [Test] + public void HandleScalableRunErrorMessageBrowserConnectionErrorScalable_WithMatchingPattern_PushesMessage() + { + string errorMessage = "Target page, context or browser has been closed"; + + _errorParser!.HandleScalableRunErrorMessage(errorMessage); + var message = "The service is currently unavailable. Please try again after some time."; + Assert.Contains(message, _errorParser.InformationalMessages); + } + } +} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/tests/Implementation/ServiceClientTests.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/tests/Implementation/ServiceClientTests.cs new file mode 100644 index 000000000000..30f34150a1f5 --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/tests/Implementation/ServiceClientTests.cs @@ -0,0 +1,371 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Text.Json; +using Azure.Core; +using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Client; +using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Implementation; +using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Interface; +using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Model; +using Moq; + +namespace Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Tests.Implementation +{ + [TestFixture] + [Parallelizable(ParallelScope.Self)] + public class ServiceClientTests + { + private ServiceClient? _serviceClient; + private Mock? _mockTestReportingClient; + private Mock? _mockCloudRunErrorParser; + private Mock? _mockLogger; + private CloudRunMetadata? _cloudRunMetadata; + + [SetUp] + public void Setup() + { + _mockTestReportingClient = new Mock(); + _mockCloudRunErrorParser = new Mock(); + _mockLogger = new Mock(); + _cloudRunMetadata = new CloudRunMetadata + { + BaseUri = new Uri("https://example.com"), + WorkspaceId = "workspaceId", + RunId = "runId" + }; + + _serviceClient = new ServiceClient(_cloudRunMetadata, _mockCloudRunErrorParser.Object, _mockTestReportingClient.Object, _mockLogger.Object); + } + + [Test] + public void PatchTestRunInfo_ReturnsTestRunDto() + { + var run = new TestRunDto(); + var responseMock = new Mock(); + var responseContent = new BinaryData(JsonSerializer.Serialize(run)); + + responseMock.SetupGet(r => r.Status).Returns(200); + responseMock.SetupGet(r => r.Content).Returns(responseContent!); + + _mockTestReportingClient!.Setup(x => x.PatchTestRunInfo( + _cloudRunMetadata!.WorkspaceId!, + _cloudRunMetadata.RunId!, + It.IsAny(), + It.IsAny(), + It.IsAny(), + It.IsAny())) + .Returns(responseMock.Object); + + TestRunDto? result = _serviceClient!.PatchTestRunInfo(run); + + Assert.IsNotNull(result); + } + + [Test] + public void PatchTestRunInfo_On409Conflict_Throws() + { + var run = new TestRunDto(); + var responseMock = new Mock(); + var responseContent = new BinaryData(JsonSerializer.Serialize(run)); + + responseMock.SetupGet(r => r.Status).Returns(409); + responseMock.SetupGet(r => r.Content).Returns(responseContent!); + + _mockTestReportingClient!.Setup(x => x.PatchTestRunInfo( + _cloudRunMetadata!.WorkspaceId!, + _cloudRunMetadata.RunId!, + It.IsAny(), + It.IsAny(), + It.IsAny(), + It.IsAny())) + .Throws(new RequestFailedException(responseMock.Object)); + + Assert.Throws(() => _serviceClient!.PatchTestRunInfo(run)); + + _mockCloudRunErrorParser!.Verify(x => x.PrintErrorToConsole(It.IsAny()), Times.Once); + _mockCloudRunErrorParser.Verify(x => x.TryPushMessageAndKey(It.IsAny(), ReporterConstants.s_cONFLICT_409_ERROR_MESSAGE_KEY), Times.Once); + } + + [Test] + public void PatchTestRunInfo_On403Forbidden_Throws() + { + var run = new TestRunDto(); + var responseMock = new Mock(); + var responseContent = new BinaryData(JsonSerializer.Serialize(run)); + + responseMock.SetupGet(r => r.Status).Returns(403); + responseMock.SetupGet(r => r.Content).Returns(responseContent!); + + _mockTestReportingClient!.Setup(x => x.PatchTestRunInfo( + _cloudRunMetadata!.WorkspaceId!, + _cloudRunMetadata.RunId!, + It.IsAny(), + It.IsAny(), + It.IsAny(), + It.IsAny())) + .Throws(new RequestFailedException(responseMock.Object)); + + Assert.Throws(() => _serviceClient!.PatchTestRunInfo(run)); + + _mockCloudRunErrorParser!.Verify(x => x.PrintErrorToConsole(It.IsAny()), Times.Once); + _mockCloudRunErrorParser.Verify(x => x.TryPushMessageAndKey(It.IsAny(), ReporterConstants.s_fORBIDDEN_403_ERROR_MESSAGE_KEY), Times.Once); + } + + [Test] + public void PatchTestRunInfo_OnAPIError_ReturnsNull() + { + var run = new TestRunDto(); + var responseMock = new Mock(); + var responseContent = new BinaryData(JsonSerializer.Serialize(run)); + + responseMock.SetupGet(r => r.Status).Returns(401); + responseMock.SetupGet(r => r.Content).Returns(responseContent!); + + _mockTestReportingClient!.Setup(x => x.PatchTestRunInfo( + _cloudRunMetadata!.WorkspaceId!, + _cloudRunMetadata.RunId!, + It.IsAny(), + It.IsAny(), + It.IsAny(), + It.IsAny())) + .Throws(new RequestFailedException(responseMock.Object)); + + TestRunDto? result = _serviceClient!.PatchTestRunInfo(run); + + Assert.IsNull(result); + _mockCloudRunErrorParser!.Verify(x => x.TryPushMessageAndKey(It.IsAny(), "401"), Times.Once); + } + + [Test] + public void PatchTestRunInfo_OnSuccessButNot200_ReturnsNull() + { + var run = new TestRunDto(); + var responseMock = new Mock(); + var responseContent = new BinaryData(JsonSerializer.Serialize(run)); + + responseMock.SetupGet(r => r.Status).Returns(201); + responseMock.SetupGet(r => r.Content).Returns(responseContent!); + + _mockTestReportingClient!.Setup(x => x.PatchTestRunInfo( + _cloudRunMetadata!.WorkspaceId!, + _cloudRunMetadata.RunId!, + It.IsAny(), + It.IsAny(), + It.IsAny(), + It.IsAny())) + .Returns(responseMock.Object); + + TestRunDto? result = _serviceClient!.PatchTestRunInfo(run); + + Assert.IsNull(result); + _mockCloudRunErrorParser!.Verify(x => x.TryPushMessageAndKey(It.IsAny(), "201"), Times.Once); + } + + [Test] + public void PostTestRunShardInfo_ReturnsTestRunShardDto() + { + var shard = new TestRunShardDto(); + var responseMock = new Mock(); + var responseContent = new BinaryData(JsonSerializer.Serialize(shard)); + + responseMock.SetupGet(r => r.Status).Returns(200); + responseMock.SetupGet(r => r.Content).Returns(responseContent!); + + _mockTestReportingClient!.Setup(x => x.PostTestRunShardInfo( + _cloudRunMetadata!.WorkspaceId!, + _cloudRunMetadata.RunId!, + It.IsAny(), + It.IsAny(), + It.IsAny(), + It.IsAny(), + It.IsAny())) + .Returns(responseMock.Object); + + TestRunShardDto? result = _serviceClient!.PostTestRunShardInfo(shard); + + Assert.IsNotNull(result); + } + + [Test] + public void PostTestRunShardInfo_OnAPIError_ReturnsNull() + { + var shard = new TestRunShardDto(); + var responseMock = new Mock(); + var responseContent = new BinaryData(JsonSerializer.Serialize(shard)); + + responseMock.SetupGet(r => r.Status).Returns(401); + responseMock.SetupGet(r => r.Content).Returns(responseContent!); + + _mockTestReportingClient!.Setup(x => x.PostTestRunShardInfo( + _cloudRunMetadata!.WorkspaceId!, + _cloudRunMetadata.RunId!, + It.IsAny(), + It.IsAny(), + It.IsAny(), + It.IsAny(), + It.IsAny())) + .Throws(new RequestFailedException(responseMock.Object)); + + TestRunShardDto? result = _serviceClient!.PostTestRunShardInfo(shard); + + Assert.IsNull(result); + _mockCloudRunErrorParser!.Verify(x => x.TryPushMessageAndKey(It.IsAny(), "401"), Times.Once); + } + + [Test] + public void PostTestRunShardInfo_OnSuccessButNot200_ReturnsNull() + { + var shard = new TestRunShardDto(); + var responseMock = new Mock(); + var responseContent = new BinaryData(JsonSerializer.Serialize(shard)); + + responseMock.SetupGet(r => r.Status).Returns(201); + responseMock.SetupGet(r => r.Content).Returns(responseContent!); + + _mockTestReportingClient!.Setup(x => x.PostTestRunShardInfo( + _cloudRunMetadata!.WorkspaceId!, + _cloudRunMetadata.RunId!, + It.IsAny(), + It.IsAny(), + It.IsAny(), + It.IsAny(), + It.IsAny())) + .Returns(responseMock.Object); + + TestRunShardDto? result = _serviceClient!.PostTestRunShardInfo(shard); + + Assert.IsNull(result); + _mockCloudRunErrorParser!.Verify(x => x.TryPushMessageAndKey(It.IsAny(), "201"), Times.Once); + } + + [Test] + public void GetTestRunResultsUri_ReturnsTestResultsUri() + { + var testResultsUri = new TestResultsUri(); + var responseMock = new Mock(); + var responseContent = new BinaryData(JsonSerializer.Serialize(testResultsUri)); + + responseMock.SetupGet(r => r.Status).Returns(200); + responseMock.SetupGet(r => r.Content).Returns(responseContent!); + + _mockTestReportingClient!.Setup(x => x.GetTestRunResultsUri( + _cloudRunMetadata!.WorkspaceId!, + _cloudRunMetadata.RunId!, + It.IsAny(), + It.IsAny(), + It.IsAny())) + .Returns(responseMock.Object); + + TestResultsUri? result = _serviceClient!.GetTestRunResultsUri(); + + Assert.IsNotNull(result); + } + + [Test] + public void GetTestRunResultsUri_OnAPIError_ReturnsNull() + { + var testResultsUri = new TestResultsUri(); + var responseMock = new Mock(); + var responseContent = new BinaryData(JsonSerializer.Serialize(testResultsUri)); + + responseMock.SetupGet(r => r.Status).Returns(401); + responseMock.SetupGet(r => r.Content).Returns(responseContent!); + + _mockTestReportingClient!.Setup(x => x.GetTestRunResultsUri( + _cloudRunMetadata!.WorkspaceId!, + _cloudRunMetadata.RunId!, + It.IsAny(), + It.IsAny(), + It.IsAny())) + .Throws(new RequestFailedException(responseMock.Object)); + + TestResultsUri? result = _serviceClient!.GetTestRunResultsUri(); + + Assert.IsNull(result); + _mockCloudRunErrorParser!.Verify(x => x.TryPushMessageAndKey(It.IsAny(), "401"), Times.Once); + } + + [Test] + public void GetTestRunResultsUri_OnSuccessButNot200_ReturnsNull() + { + var testResultsUri = new TestResultsUri(); + var responseMock = new Mock(); + var responseContent = new BinaryData(JsonSerializer.Serialize(testResultsUri)); + + responseMock.SetupGet(r => r.Status).Returns(201); + responseMock.SetupGet(r => r.Content).Returns(responseContent!); + + _mockTestReportingClient!.Setup(x => x.GetTestRunResultsUri( + _cloudRunMetadata!.WorkspaceId!, + _cloudRunMetadata.RunId!, + It.IsAny(), + It.IsAny(), + It.IsAny())) + .Returns(responseMock.Object); + + TestResultsUri? result = _serviceClient!.GetTestRunResultsUri(); + + Assert.IsNull(result); + _mockCloudRunErrorParser!.Verify(x => x.TryPushMessageAndKey(It.IsAny(), "201"), Times.Once); + } + + [Test] + public void UploadBatchTestResults_Returns() + { + var responseMock = new Mock(); + + responseMock.SetupGet(r => r.Status).Returns(200); + + _mockTestReportingClient!.Setup(x => x.UploadBatchTestResults( + _cloudRunMetadata!.WorkspaceId!, + It.IsAny(), + It.IsAny(), + It.IsAny(), + It.IsAny())) + .Returns(responseMock.Object); + + _serviceClient!.UploadBatchTestResults(new UploadTestResultsRequest()); + } + + [Test] + public void UploadBatchTestResults_OnAPIError_Returns() + { + var responseMock = new Mock(); + + responseMock.SetupGet(r => r.Status).Returns(401); + + _mockTestReportingClient!.Setup(x => x.UploadBatchTestResults( + _cloudRunMetadata!.WorkspaceId!, + It.IsAny(), + It.IsAny(), + It.IsAny(), + It.IsAny())) + .Throws(new RequestFailedException(responseMock.Object)); + + _serviceClient!.UploadBatchTestResults(new UploadTestResultsRequest()); + + _mockCloudRunErrorParser!.Verify(x => x.TryPushMessageAndKey(It.IsAny(), "401"), Times.Once); + } + + [Test] + public void UploadBatchTestResults_OnSuccessButNot200_Returns() + { + var responseMock = new Mock(); + + responseMock.SetupGet(r => r.Status).Returns(201); + + _mockTestReportingClient!.Setup(x => x.UploadBatchTestResults( + _cloudRunMetadata!.WorkspaceId!, + It.IsAny(), + It.IsAny(), + It.IsAny(), + It.IsAny())) + .Returns(responseMock.Object); + + _serviceClient!.UploadBatchTestResults(new UploadTestResultsRequest()); + + _mockCloudRunErrorParser!.Verify(x => x.TryPushMessageAndKey(It.IsAny(), "201"), Times.Once); + } + } +} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/tests/Model/CloudRunMetadataTests.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/tests/Model/CloudRunMetadataTests.cs new file mode 100644 index 000000000000..dfd7b5481853 --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/tests/Model/CloudRunMetadataTests.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Model; + +namespace Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Tests.Model +{ + [TestFixture] + [Parallelizable(ParallelScope.Self)] + public class CloudRunMetadataTests + { + [Test] + public void TestPortalUrl() + { + var metadata = new CloudRunMetadata + { + WorkspaceId = "eastus_2e8c076a-b67c-4984-b861-8d22d7b525c6", + RunId = "#run456^1" + }; + + string portalUrl = metadata.PortalUrl!; + + string expectedPortalUrl = "https://playwright.microsoft.com/workspaces/eastus_2e8c076a-b67c-4984-b861-8d22d7b525c6/runs/%23run456%5E1"; + Assert.AreEqual(expectedPortalUrl, portalUrl); + } + + [Test] + public void TestEnableResultPublish() + { + var metadata = new CloudRunMetadata(); + + bool enableResultPublish = metadata.EnableResultPublish; + + Assert.IsTrue(enableResultPublish); + } + + [Test] + public void TestEnableGithubSummary() + { + var metadata = new CloudRunMetadata(); + + bool enableGithubSummary = metadata.EnableGithubSummary; + + Assert.IsTrue(enableGithubSummary); + } + } +} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/tests/Model/MPTResultTests.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/tests/Model/MPTResultTests.cs new file mode 100644 index 000000000000..30cb8f3297fe --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/tests/Model/MPTResultTests.cs @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Model; + +namespace Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Tests.Model +{ + [TestFixture] + [Parallelizable(ParallelScope.Self)] + public class MPTResultTests + { + [Test] + public void RawTestResult_Errors_Initialized() + { + var rawTestResult = new RawTestResult(); + Assert.AreEqual("[]", rawTestResult.errors); + Assert.AreEqual("[]", rawTestResult.stdOut); + Assert.AreEqual("[]", rawTestResult.stdErr); + } + } +} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/tests/PlaywrightServiceClientTests.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/tests/PlaywrightServiceClientTests.cs new file mode 100644 index 000000000000..a1896981a53c --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/tests/PlaywrightServiceClientTests.cs @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Linq; +using System.Net.Http; +using System.Threading.Tasks; +using Azure.Core.TestFramework; + +namespace Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Tests; + +public class PlaywrightServiceClientTests : RecordedTestBase +{ + private PlaywrightService? _playwrightService; + private static string Access_Token => Environment.GetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceAccessToken)!; + + public PlaywrightServiceClientTests(bool isAsync) : base(isAsync, RecordedTestMode.Live) { } + + [SetUp] + public async Task Setup() + { + var workspaceId = TestUtils.GetWorkspaceIdFromDashboardEndpoint(TestEnvironment.DashboardEndpoint); + var region = TestEnvironment.Region; + var serviceApiEndpoint = TestUtils.GetPlaywrightServiceAPIEndpoint(workspaceId, region); + Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceUri, serviceApiEndpoint); + _playwrightService = new PlaywrightService(new PlaywrightServiceOptions(), credential: TestEnvironment.Credential); + await _playwrightService.InitializeAsync(); + } + + [TearDown] + public void Teardown() + { + _playwrightService?.Cleanup(); + } + + [Test] + [Category("Live")] + public async Task TestPlaywrightServiceConnection() + { + var workspaceId = TestUtils.GetWorkspaceIdFromDashboardEndpoint(TestEnvironment.DashboardEndpoint); + var region = TestEnvironment.Region; + var serviceApiEndpoint = TestUtils.GetPlaywrightServiceAPIEndpoint(workspaceId, region); + var client = new HttpClient(new HttpClientHandler + { + AllowAutoRedirect = false + }); + var request = new HttpRequestMessage(HttpMethod.Get, serviceApiEndpoint); + request.Headers.Add("Authorization", $"Bearer {Access_Token}"); + request.RequestUri = new Uri($"{request.RequestUri}?cap={{}}"); + HttpResponseMessage response = await client.SendAsync(request); + response.Headers.TryGetValues("Location", out System.Collections.Generic.IEnumerable? location); + Assert.AreEqual(302, (int)response.StatusCode); + Assert.IsTrue(location!.Any(url => url.Contains("browser.playwright.microsoft.com"))); + } +} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/tests/PlaywrightServiceOptionsTest.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/tests/PlaywrightServiceOptionsTest.cs new file mode 100644 index 000000000000..be5afa3adc51 --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/tests/PlaywrightServiceOptionsTest.cs @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Identity; +using System; +using System.Runtime.InteropServices; + +namespace Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Tests; + +[TestFixture] +[Parallelizable(ParallelScope.Self)] +public class PlaywrightServiceOptionsTest +{ + [Test] + public void Constructor_ShouldInitializeProperties() + { + var os = OSPlatform.Linux; + var runId = "test-run-id"; + var exposeNetwork = "true"; + var serviceAuth = ServiceAuthType.EntraId; + var useCloudHostedBrowsers = "true"; + var azureTokenCredentialType = AzureTokenCredentialType.ManagedIdentityCredential; + var managedIdentityClientId = "test-client-id"; + + var settings = new PlaywrightServiceOptions( + os, runId, exposeNetwork, serviceAuth, useCloudHostedBrowsers, azureTokenCredentialType, managedIdentityClientId); + + Assert.Multiple(() => + { + Assert.That(settings.Os, Is.EqualTo(os)); + Assert.That(settings.RunId, Is.EqualTo(runId)); + Assert.That(settings.ExposeNetwork, Is.EqualTo(exposeNetwork)); + Assert.That(settings.ServiceAuth, Is.EqualTo(serviceAuth)); + Assert.That(settings.UseCloudHostedBrowsers, Is.True); + Assert.That(settings.AzureTokenCredential, Is.InstanceOf()); + }); + } + + [Test] + public void Constructor_ShouldUseDefaultValues() + { + var settings = new PlaywrightServiceOptions(); + Assert.Multiple(() => + { + Assert.That(settings.Os, Is.Null); + Assert.That(settings.RunId, Is.Null); + Assert.That(settings.ExposeNetwork, Is.Null); + Assert.That(settings.ServiceAuth, Is.EqualTo(ServiceAuthType.EntraId)); + Assert.That(settings.UseCloudHostedBrowsers, Is.True); + Assert.That(settings.AzureTokenCredential, Is.InstanceOf()); + }); + } + + [Test] + public void Validate_ShouldThrowExceptionForInvalidOs() + { + Exception? ex = Assert.Throws(() => new PlaywrightServiceOptions(os: OSPlatform.Create("invalid"))); + Assert.That(ex!.Message, Does.Contain("Invalid value for Os")); + } + + [Test] + public void Validate_ShouldThrowExceptionForInvalidDefaultAuth() + { + var invalidAuth = "InvalidAuth"; + Exception? ex = Assert.Throws(() => new PlaywrightServiceOptions(serviceAuth: invalidAuth)); + Assert.That(ex!.Message, Does.Contain("Invalid value for ServiceAuth")); + } + + [TestCase("ManagedIdentityCredential", typeof(ManagedIdentityCredential))] + [TestCase("WorkloadIdentityCredential", typeof(WorkloadIdentityCredential))] + [TestCase("EnvironmentCredential", typeof(EnvironmentCredential))] + [TestCase("AzureCliCredential", typeof(AzureCliCredential))] + [TestCase("AzurePowerShellCredential", typeof(AzurePowerShellCredential))] + [TestCase("AzureDeveloperCliCredential", typeof(AzureDeveloperCliCredential))] + [TestCase("InteractiveBrowserCredential", typeof(InteractiveBrowserCredential))] + [TestCase("SharedTokenCacheCredential", typeof(SharedTokenCacheCredential))] + [TestCase("VisualStudioCredential", typeof(VisualStudioCredential))] + [TestCase("VisualStudioCodeCredential", typeof(VisualStudioCodeCredential))] + [TestCase("DefaultAzureCredential", typeof(DefaultAzureCredential))] + [TestCase("", typeof(DefaultAzureCredential))] + [TestCase(null, typeof(DefaultAzureCredential))] + public void GetTokenCredential_ShouldReturnCorrectCredential(string? credentialType, Type expectedType) + { + var settings = new PlaywrightServiceOptions(azureTokenCredentialType: credentialType); + Assert.That(settings.AzureTokenCredential, Is.InstanceOf(expectedType)); + } +} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/tests/PlaywrightServiceTestEnvironment.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/tests/PlaywrightServiceTestEnvironment.cs new file mode 100644 index 000000000000..dbd0ca3ff17b --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/tests/PlaywrightServiceTestEnvironment.cs @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Core.TestFramework; + +namespace Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Tests; + +public class PlaywrightServiceTestEnvironment : TestEnvironment +{ + public string Region => GetRecordedVariable("PLAYWRIGHTTESTING_LOCATION"); + public string DashboardEndpoint => GetRecordedVariable("DASHBOARD_ENDPOINT"); +}; diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/tests/PlaywrightServiceTests.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/tests/PlaywrightServiceTests.cs new file mode 100644 index 000000000000..2f35beeeca46 --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/tests/PlaywrightServiceTests.cs @@ -0,0 +1,668 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Runtime.InteropServices; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Microsoft.IdentityModel.JsonWebTokens; +using Microsoft.IdentityModel.Tokens; +using Moq; + +namespace Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Tests; + +[TestFixture] +public class PlaywrightServiceTests +{ + private static string GetToken(Dictionary claims, DateTime? expires = null) + { + var tokenHandler = new JsonWebTokenHandler(); + var token = tokenHandler.CreateToken(new SecurityTokenDescriptor + { + Claims = claims, + Expires = expires ?? DateTime.UtcNow.AddMinutes(10), + }); + return token!; + } + + [SetUp] + public void Setup() + { + Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceUri, "https://playwright.microsoft.com"); + } + [TearDown] + public void TearDown() + { + Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceUri, null); + Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceAccessToken, null); + Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceOs, null); + Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceRunId, null); + Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceExposeNetwork, null); + Environment.SetEnvironmentVariable(Constants.s_playwright_service_disable_scalable_execution_environment_variable, null); + Environment.SetEnvironmentVariable(Constants.s_playwright_service_reporting_url_environment_variable, null); + Environment.SetEnvironmentVariable(Constants.s_playwright_service_workspace_id_environment_variable, null); + } + + [Test] + public void Constructor_NoConstructorParams_SetsEntraAuthMechanismAsDefault() + { + PlaywrightService service = new(entraLifecycle: null); + Assert.That(service.ServiceAuth, Is.EqualTo(ServiceAuthType.EntraId)); + } + + [Test] + public void Constructor_NoServiceParams_SetsDefaultValues() + { + var playwrightService = new PlaywrightService(entraLifecycle: null); + Assert.Multiple(() => + { + Assert.That(Environment.GetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceOs), Is.EqualTo(Constants.s_default_os)); + Assert.That(Environment.GetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceExposeNetwork), Is.EqualTo(Constants.s_default_expose_network)); + Assert.That(Environment.GetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceRunId), Is.Not.Null); + Assert.That(playwrightService.ServiceAuth, Is.EqualTo(ServiceAuthType.EntraId)); + Assert.That(playwrightService.UseCloudHostedBrowsers, Is.True); + }); + } + + [Test] + public void Constructor_PassServiceOS_SetsServiceOS() + { + _ = new PlaywrightService(os: OSPlatform.Windows, entraLifecycle: null); + Assert.That(Environment.GetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceOs), Is.EqualTo(ServiceOs.Windows)); + } + + [Test] + public void Constructor_PassExposeNetwork_SetsExposeNetwork() + { + _ = new PlaywrightService(exposeNetwork: "new-expose", entraLifecycle: null); + Assert.That(Environment.GetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceExposeNetwork), Is.EqualTo("new-expose")); + } + + [Test] + public void Constructor_PassRunId_SetsRunId() + { + _ = new PlaywrightService(runId: "new-run-id", entraLifecycle: null); + Assert.That(Environment.GetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceRunId), Is.EqualTo("new-run-id")); + } + + [Test] + public void Constructor_PassDefaultAuthMechanism_SetsDefaultAuthMechanism() + { + var playwrightService = new PlaywrightService(entraLifecycle: null, serviceAuth: ServiceAuthType.AccessToken); + Assert.That(playwrightService.ServiceAuth, Is.EqualTo(ServiceAuthType.AccessToken)); + } + + [Test] + public void Constructor_PassUseCloudHostedBrowsersAsFalse_SetsDisableScalableExecutionAndEnvVariable() + { + var playwrightService = new PlaywrightService(entraLifecycle: null, useCloudHostedBrowsers: false); + Assert.Multiple(() => + { + Assert.That(playwrightService.UseCloudHostedBrowsers, Is.False); + Assert.That(Environment.GetEnvironmentVariable(Constants.s_playwright_service_disable_scalable_execution_environment_variable), Is.EqualTo("true")); + }); + } + + [Test] + public void Constructor_PassUseCloudHostedBrowsersAsTrue_SetsDisableScalableExecutionButNotEnvVariable() + { + var playwrightService = new PlaywrightService(entraLifecycle: null, useCloudHostedBrowsers: true); + Assert.Multiple(() => + { + Assert.That(playwrightService.UseCloudHostedBrowsers, Is.True); + Assert.That(Environment.GetEnvironmentVariable(Constants.s_playwright_service_disable_scalable_execution_environment_variable), Is.Null); + }); + } + + [Test] + public void Initialize_WhenServiceEnpointIsNotSet_NoOP() + { + Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceUri, null); + var defaultAzureCredentialMock = new Mock(); + var jsonWebTokenHandlerMock = new Mock(); + var entraLifecycleMock = new Mock(defaultAzureCredentialMock.Object, jsonWebTokenHandlerMock.Object); + PlaywrightService service = new(entraLifecycle: entraLifecycleMock.Object); + service.InitializeAsync().Wait(); + defaultAzureCredentialMock.Verify(x => x.GetTokenAsync(It.IsAny(), It.IsAny()), Times.Never); + } + + [Test] + public void Initialize_WhenDefaultAuthIsEntraIdAccessTokenAndAccessTokenEnvironmentVariableIsSet_FetchesEntraIdAccessToken() + { + var defaultAzureCredentialMock = new Mock(); + var jsonWebTokenHandlerMock = new Mock(); + var token = "valid_token"; + defaultAzureCredentialMock + .Setup(x => x.GetTokenAsync(It.IsAny(), It.IsAny())) + .ReturnsAsync(new AccessToken(token, DateTimeOffset.UtcNow.AddMinutes(10))); + var entraLifecycleMock = new Mock(defaultAzureCredentialMock.Object, jsonWebTokenHandlerMock.Object); + Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceAccessToken, "access_token"); + PlaywrightService service = new(entraLifecycle: entraLifecycleMock.Object); + service.InitializeAsync().Wait(); + defaultAzureCredentialMock.Verify(x => x.GetTokenAsync(It.IsAny(), It.IsAny()), Times.Once); + + service.RotationTimer!.Dispose(); + + Assert.That(Environment.GetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceUri), Is.Not.Null); + } + + [Test] + public void Initialize_WhenDefaultAuthIsEntraIdAccessTokenAndAccessTokenEnvironmentVariableIsSetAndCredentialsArePassed_FetchesEntraIdAccessTokenUsedPassedCredentials() + { + var tokenCredential = new Mock(); + var jsonWebTokenHandlerMock = new Mock(); + var token = "valid_token"; + tokenCredential + .Setup(x => x.GetTokenAsync(It.IsAny(), It.IsAny())) + .ReturnsAsync(new AccessToken(token, DateTimeOffset.UtcNow.AddMinutes(10))); + Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceAccessToken, "access_token"); + PlaywrightService service = new(new PlaywrightServiceOptions(), credential: tokenCredential.Object); + service.InitializeAsync().Wait(); + tokenCredential.Verify(x => x.GetTokenAsync(It.IsAny(), It.IsAny()), Times.Once); + + service.RotationTimer!.Dispose(); + + Assert.That(Environment.GetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceUri), Is.Not.Null); + } + + [Test] + public void Initialize_WhenDefaultAuthIsEntraIdAccessTokenAndAccessTokenEnvironmentVariableIsSetButScalableExecutionIsDisabled_DeletesServiceUrlEnvVariable() + { + var defaultAzureCredentialMock = new Mock(); + var jsonWebTokenHandlerMock = new Mock(); + var token = "valid_token"; + defaultAzureCredentialMock + .Setup(x => x.GetTokenAsync(It.IsAny(), It.IsAny())) + .ReturnsAsync(new AccessToken(token, DateTimeOffset.UtcNow.AddMinutes(10))); + var entraLifecycleMock = new Mock(defaultAzureCredentialMock.Object, jsonWebTokenHandlerMock.Object); + Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceAccessToken, "access_token"); + PlaywrightService service = new(entraLifecycle: entraLifecycleMock.Object, useCloudHostedBrowsers: false); + + Assert.That(Environment.GetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceUri), Is.Not.Null); + + service.InitializeAsync().Wait(); + defaultAzureCredentialMock.Verify(x => x.GetTokenAsync(It.IsAny(), It.IsAny()), Times.Once); + + service.RotationTimer!.Dispose(); + + Assert.That(Environment.GetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceUri), Is.Null); + } + + [Test] + public void Initialize_WhenDefaultAuthIsEntraIdAccessTokenAndAccessTokenEnvironmentVariableIsNotSet_FetchesEntraIdAccessToken() + { + var defaultAzureCredentialMock = new Mock(); + var jsonWebTokenHandlerMock = new Mock(); + var token = "valid_token"; + defaultAzureCredentialMock + .Setup(x => x.GetTokenAsync(It.IsAny(), It.IsAny())) + .ReturnsAsync(new AccessToken(token, DateTimeOffset.UtcNow.AddMinutes(10))); + var entraLifecycleMock = new Mock(defaultAzureCredentialMock.Object, jsonWebTokenHandlerMock.Object); + PlaywrightService service = new(entraLifecycle: entraLifecycleMock.Object); + service.InitializeAsync().Wait(); + defaultAzureCredentialMock.Verify(x => x.GetTokenAsync(It.IsAny(), It.IsAny()), Times.Once); + + service.RotationTimer!.Dispose(); + } + + [Test] + public void Initialize_WhenFetchesEntraIdAccessToken_SetsUpRotationHandler() + { + var defaultAzureCredentialMock = new Mock(); + var jsonWebTokenHandlerMock = new Mock(); + var token = "valid_token"; + defaultAzureCredentialMock + .Setup(x => x.GetTokenAsync(It.IsAny(), It.IsAny())) + .ReturnsAsync(new AccessToken(token, DateTimeOffset.UtcNow.AddMinutes(10))); + var entraLifecycleMock = new Mock(defaultAzureCredentialMock.Object, jsonWebTokenHandlerMock.Object); + PlaywrightService service = new(entraLifecycle: entraLifecycleMock.Object); + service.InitializeAsync().Wait(); + defaultAzureCredentialMock.Verify(x => x.GetTokenAsync(It.IsAny(), It.IsAny()), Times.Once); + Assert.That(service.RotationTimer, Is.Not.Null); + + service.RotationTimer!.Dispose(); + } + + [Test] + public void Initialize_WhenFailsToFetchEntraIdAccessToken_ThrowsException() + { + var defaultAzureCredentialMock = new Mock(); + var jsonWebTokenHandlerMock = new Mock(); + defaultAzureCredentialMock + .Setup(x => x.GetTokenAsync(It.IsAny(), It.IsAny())) + .ThrowsAsync(new Exception()); + var entraLifecycleMock = new Mock(defaultAzureCredentialMock.Object, jsonWebTokenHandlerMock.Object); + PlaywrightService service = new(entraLifecycle: entraLifecycleMock.Object); + Exception? ex = Assert.ThrowsAsync(async () => await service.InitializeAsync()); + Assert.That(ex!.Message, Is.EqualTo(Constants.s_no_auth_error)); + } + + [Test] + public void Initialize_WhenEntraIdAccessTokenFailsAndMptPatIsSet_ThrowsException() + { + var token = GetToken(new Dictionary + { + {"aid", "account-id-guid"}, + }); + Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceAccessToken, token); + var defaultAzureCredentialMock = new Mock(); + defaultAzureCredentialMock + .Setup(x => x.GetTokenAsync(It.IsAny(), It.IsAny())) + .ThrowsAsync(new Exception()); + var entraLifecycleMock = new Mock(defaultAzureCredentialMock.Object, new JsonWebTokenHandler()); + PlaywrightService service = new(entraLifecycle: entraLifecycleMock.Object, jsonWebTokenHandler: new JsonWebTokenHandler()); + Exception? ex = Assert.ThrowsAsync(async () => await service.InitializeAsync()); + Assert.That(ex!.Message, Is.EqualTo(Constants.s_no_auth_error)); + } + + [Test] + public void Initialize_WhenEntraIdAccessTokenFailsAndMptPatIsNotSet_ThrowsException() + { + var token = GetToken(new Dictionary + { + {"aid", "account-id-guid"}, + }); + var defaultAzureCredentialMock = new Mock(); + defaultAzureCredentialMock + .Setup(x => x.GetTokenAsync(It.IsAny(), It.IsAny())) + .ThrowsAsync(new Exception()); + var entraLifecycleMock = new Mock(defaultAzureCredentialMock.Object, new JsonWebTokenHandler()); + PlaywrightService service = new(entraLifecycle: entraLifecycleMock.Object, jsonWebTokenHandler: new JsonWebTokenHandler()); + Exception? ex = Assert.ThrowsAsync(async () => await service.InitializeAsync()); + Assert.That(ex!.Message, Is.EqualTo(Constants.s_no_auth_error)); + } + + [Test] + public void Initialize_WhenEntraIdAccessTokenFailsAndMptPatIsNotValid_ThrowsError() + { + var token = "sample token"; + Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceAccessToken, token); + var defaultAzureCredentialMock = new Mock(); + defaultAzureCredentialMock + .Setup(x => x.GetTokenAsync(It.IsAny(), It.IsAny())) + .ThrowsAsync(new Exception()); + var entraLifecycleMock = new Mock(defaultAzureCredentialMock.Object, new JsonWebTokenHandler()); + PlaywrightService service = new(entraLifecycle: entraLifecycleMock.Object, jsonWebTokenHandler: new JsonWebTokenHandler()); + Assert.That(() => service.InitializeAsync().Wait(), Throws.Exception); + } + + [Test] + public void Initialize_WhenEntraIdAccessTokenFailsAndMptPatTokenParsingReturnsNull_ThrowsError() + { + var token = "sample token"; + Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceAccessToken, token); + var jsonWebTokenHandlerMock = new Mock(); +#pragma warning disable CS8625 // Cannot convert null literal to non-nullable reference type. + jsonWebTokenHandlerMock + .Setup(x => x.ReadJsonWebToken(It.IsAny())) + .Returns(value: null); +#pragma warning restore CS8625 // Cannot convert null literal to non-nullable reference type. + var defaultAzureCredentialMock = new Mock(); + defaultAzureCredentialMock + .Setup(x => x.GetTokenAsync(It.IsAny(), It.IsAny())) + .ThrowsAsync(new Exception()); + var entraLifecycleMock = new Mock(defaultAzureCredentialMock.Object, new JsonWebTokenHandler()); + PlaywrightService service = new(entraLifecycle: entraLifecycleMock.Object, jsonWebTokenHandler: jsonWebTokenHandlerMock.Object); + Assert.That(() => service.InitializeAsync().Wait(), Throws.Exception); + } + + [Test] + public void Initialize_WhenEntraIdAccessTokenFailsAndMptPatIsExpired_ThrowsError() + { + var token = GetToken(new Dictionary + { + {"aid", "account-id-guid"}, + }, DateTime.UtcNow.AddMinutes(-1)); + Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceAccessToken, token); + var defaultAzureCredentialMock = new Mock(); + defaultAzureCredentialMock + .Setup(x => x.GetTokenAsync(It.IsAny(), It.IsAny())) + .ThrowsAsync(new Exception()); + var entraLifecycleMock = new Mock(defaultAzureCredentialMock.Object, new JsonWebTokenHandler()); + PlaywrightService service = new(entraLifecycle: entraLifecycleMock.Object, jsonWebTokenHandler: new JsonWebTokenHandler()); + + Assert.That(() => service.InitializeAsync().Wait(), Throws.Exception); + } + + [Test] + public void Initialize_WhenDefaultAuthIsMptPATAndPATIsSet_DoesNotSetUpRotationHandler() + { + var token = GetToken(new Dictionary + { + {"aid", "eastus_bd830e63-6120-40cb-8cd7-f0739502d888"}, + }); + Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceAccessToken, token); + var testRubric = new Dictionary + { + { "url", "wss://eastus.api.playwright.microsoft.com/accounts/eastus_bd830e63-6120-40cb-8cd7-f0739502d888/browsers" }, + { "workspaceId", "eastus_bd830e63-6120-40cb-8cd7-f0739502d888" }, + { "region", "eastus" }, + { "domain", "playwright.microsoft.com" } + }; + Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceUri, $"{testRubric["url"]}"); + var defaultAzureCredentialMock = new Mock(); + var entraLifecycleMock = new Mock(defaultAzureCredentialMock.Object, new JsonWebTokenHandler()); + PlaywrightService service = new(entraLifecycle: entraLifecycleMock.Object, jsonWebTokenHandler: new JsonWebTokenHandler(), serviceAuth: ServiceAuthType.AccessToken); + service.InitializeAsync().Wait(); + Assert.That(service.RotationTimer, Is.Null); + } + + [Test] + public void RotationHandler_WhenEntraIdAccessTokenRequiresRotation_FetchesEntraIdAccessToken() + { + var defaultAzureCredentialMock = new Mock(); + var jsonWebTokenHandlerMock = new Mock(); + var token = "valid_token"; + defaultAzureCredentialMock + .Setup(x => x.GetTokenAsync(It.IsAny(), It.IsAny())) + .ReturnsAsync(new AccessToken(token, DateTimeOffset.UtcNow.AddMinutes(5))); + var entraLifecycleMock = new Mock(defaultAzureCredentialMock.Object, jsonWebTokenHandlerMock.Object); + PlaywrightService service = new(entraLifecycle: entraLifecycleMock.Object); + + service.RotationHandlerAsync(null); + defaultAzureCredentialMock.Verify(x => x.GetTokenAsync(It.IsAny(), It.IsAny()), Times.Once); + } + + [Test] + public void RotationHandler_WhenEntraIdAccessTokenDoesNotRequireRotation_NoOp() + { + var defaultAzureCredentialMock = new Mock(); + var jsonWebTokenHandlerMock = new Mock(); + var entraLifecycleMock = new Mock(defaultAzureCredentialMock.Object, jsonWebTokenHandlerMock.Object); + entraLifecycleMock.Object._entraIdAccessToken = "valid_token"; + entraLifecycleMock.Object._entraIdAccessTokenExpiry = (int)DateTimeOffset.UtcNow.AddMinutes(22).ToUnixTimeSeconds(); + PlaywrightService service = new(entraLifecycle: entraLifecycleMock.Object); + + service.RotationHandlerAsync(null); + defaultAzureCredentialMock.Verify(x => x.GetTokenAsync(It.IsAny(), It.IsAny()), Times.Never); + } + + [Test] + public void GetConnectOptionsAsync_WhenServiceEndpointIsNotSet_ThrowsException() + { + Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceUri, null); + PlaywrightService service = new(entraLifecycle: null); + Exception? ex = Assert.ThrowsAsync(() => service.GetConnectOptionsAsync()); + Assert.That(ex!.Message, Is.EqualTo(Constants.s_no_service_endpoint_error_message)); + } + + [Test] + public void GetConnectOptionsAsync_WhenUseCloudHostedBrowsersEnvironmentIsFalse_ThrowsException() + { + PlaywrightService service = new(entraLifecycle: null, useCloudHostedBrowsers: false); + Exception? ex = Assert.ThrowsAsync(() => service.GetConnectOptionsAsync()); + Assert.Multiple(() => + { + Assert.That(service.UseCloudHostedBrowsers, Is.False); + Assert.That(ex!.Message, Is.EqualTo(Constants.s_service_endpoint_removed_since_scalable_execution_disabled_error_message)); + }); + } + + [Test] + public async Task GetConnectOptionsAsync_WhenServiceEndpointIsSet_ReturnsConnectOptions() + { + var defaultAzureCredentialMock = new Mock(); + var jsonWebTokenHandlerMock = new Mock(); + Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceAccessToken, "valid_token"); + var entraLifecycleMock = new Mock(defaultAzureCredentialMock.Object, jsonWebTokenHandlerMock.Object); + entraLifecycleMock.Object._entraIdAccessToken = "valid_token"; + entraLifecycleMock.Object._entraIdAccessTokenExpiry = (int)DateTimeOffset.UtcNow.AddMinutes(22).ToUnixTimeSeconds(); + var runId = "run-id"; + + PlaywrightService service = new(entraLifecycle: entraLifecycleMock.Object); + ConnectOptions connectOptions = await service.GetConnectOptionsAsync(runId: runId); + var authorizationHeader = connectOptions.Options!.Headers!.Where(x => x.Key == "Authorization").FirstOrDefault().Value!; + Assert.Multiple(() => + { + Assert.That(connectOptions.WsEndpoint, Is.EqualTo($"https://playwright.microsoft.com?os={Constants.s_default_os}&runId={runId}&api-version={Constants.s_api_version}")); + Assert.That(connectOptions.Options!.Timeout, Is.EqualTo(3 * 60 * 1000)); + Assert.That(connectOptions.Options!.ExposeNetwork, Is.EqualTo(Constants.s_default_expose_network)); + Assert.That(authorizationHeader, Is.EqualTo("Bearer valid_token")); + }); + } + + [Test] + public async Task GetConnectOptionsAsync_WhenTokenRequiresRotation_RotatesEntraToken() + { + var defaultAzureCredentialMock = new Mock(); + defaultAzureCredentialMock + .Setup(x => x.GetTokenAsync(It.IsAny(), It.IsAny())) + .ReturnsAsync(new AccessToken("valid_token", DateTimeOffset.UtcNow.AddMinutes(5))); + var jsonWebTokenHandlerMock = new Mock(); + var entraLifecycleMock = new Mock(defaultAzureCredentialMock.Object, jsonWebTokenHandlerMock.Object); + entraLifecycleMock.Object._entraIdAccessToken = "valid_token"; + entraLifecycleMock.Object._entraIdAccessTokenExpiry = (int)DateTimeOffset.UtcNow.AddMinutes(-1).ToUnixTimeSeconds(); + + PlaywrightService service = new(entraLifecycle: entraLifecycleMock.Object); + _ = await service.GetConnectOptionsAsync(); + defaultAzureCredentialMock.Verify(x => x.GetTokenAsync(It.IsAny(), It.IsAny()), Times.Once); + } + + [Test] + public async Task GetConnectOptionsAsync_WhenTokenDoesNotRequireRotation_DoesNotRotateEntraToken() + { + var defaultAzureCredentialMock = new Mock(); + Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceAccessToken, "valid_token"); + defaultAzureCredentialMock + .Setup(x => x.GetTokenAsync(It.IsAny(), It.IsAny())) + .ReturnsAsync(new AccessToken("valid_token", DateTimeOffset.UtcNow.AddMinutes(5))); + var jsonWebTokenHandlerMock = new Mock(); + var entraLifecycleMock = new Mock(defaultAzureCredentialMock.Object, jsonWebTokenHandlerMock.Object); + entraLifecycleMock.Object._entraIdAccessToken = "valid_token"; + entraLifecycleMock.Object._entraIdAccessTokenExpiry = (int)DateTimeOffset.UtcNow.AddMinutes(22).ToUnixTimeSeconds(); + + PlaywrightService service = new(entraLifecycle: entraLifecycleMock.Object); + _ = await service.GetConnectOptionsAsync(); + defaultAzureCredentialMock.Verify(x => x.GetTokenAsync(It.IsAny(), It.IsAny()), Times.Never); + } + + [Test] + public async Task GetConnectOptionsAsync_WhenDefaultParametersAreProvided_SetsServiceParameters() + { + var defaultAzureCredentialMock = new Mock(); + var jsonWebTokenHandlerMock = new Mock(); + Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceAccessToken, "valid_token"); + var entraLifecycleMock = new Mock(defaultAzureCredentialMock.Object, jsonWebTokenHandlerMock.Object); + entraLifecycleMock.Object + ._entraIdAccessToken = "valid_token"; + entraLifecycleMock.Object + ._entraIdAccessTokenExpiry = (int)DateTimeOffset.UtcNow.AddMinutes(22).ToUnixTimeSeconds(); + var runId = "run-id"; + + var service = new PlaywrightService(entraLifecycle: entraLifecycleMock.Object); + ConnectOptions connectOptions = await service.GetConnectOptionsAsync(runId: runId, os: OSPlatform.Windows, exposeNetwork: "localhost"); + + Assert.Multiple(() => + { + Assert.That(connectOptions.WsEndpoint, Is.EqualTo($"https://playwright.microsoft.com?os={ServiceOs.Windows}&runId={runId}&api-version={Constants.s_api_version}")); + Assert.That(connectOptions.Options!.ExposeNetwork, Is.EqualTo("localhost")); + }); + } + + [Test] + public async Task GetConnectOptionsAsync_WhenDefaultParametersAreNotProvided_SetsDefaultServiceParameters() + { + var defaultAzureCredentialMock = new Mock(); + var jsonWebTokenHandlerMock = new Mock(); + Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceAccessToken, "valid_token"); + var entraLifecycleMock = new Mock(defaultAzureCredentialMock.Object, jsonWebTokenHandlerMock.Object); + entraLifecycleMock.Object + ._entraIdAccessToken = "valid_token"; + entraLifecycleMock.Object + ._entraIdAccessTokenExpiry = (int)DateTimeOffset.UtcNow.AddMinutes(22).ToUnixTimeSeconds(); + var runId = "run-id"; + + var service = new PlaywrightService(entraLifecycle: entraLifecycleMock.Object); + ConnectOptions connectOptions = await service.GetConnectOptionsAsync(runId: runId); + + Assert.Multiple(() => + { + Assert.That(connectOptions.WsEndpoint, Is.EqualTo($"https://playwright.microsoft.com?os={Constants.s_default_os}&runId={runId}&api-version={Constants.s_api_version}")); + Assert.That(connectOptions.Options!.ExposeNetwork, Is.EqualTo(Constants.s_default_expose_network)); + }); + } + + [Test] + public async Task GetConnectOptionsAsync_WhenServiceParametersAreSetViaEnvironment_SetsServiceParameters() + { + var defaultAzureCredentialMock = new Mock(); + var jsonWebTokenHandlerMock = new Mock(); + Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceAccessToken, "valid_token"); + var entraLifecycleMock = new Mock(defaultAzureCredentialMock.Object, jsonWebTokenHandlerMock.Object); + entraLifecycleMock.Object + ._entraIdAccessToken = "valid_token"; + entraLifecycleMock.Object + ._entraIdAccessTokenExpiry = (int)DateTimeOffset.UtcNow.AddMinutes(22).ToUnixTimeSeconds(); + var runId = "run-id"; + var service = new PlaywrightService(entraLifecycle: entraLifecycleMock.Object); + + Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceOs, ServiceOs.Windows); + Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceExposeNetwork, "localhost"); + Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceRunId, runId); + + ConnectOptions connectOptions = await service.GetConnectOptionsAsync(); + Assert.Multiple(() => + { + Assert.That(connectOptions.WsEndpoint, Is.EqualTo($"https://playwright.microsoft.com?os={ServiceOs.Windows}&runId={runId}&api-version={Constants.s_api_version}")); + Assert.That(connectOptions.Options!.ExposeNetwork, Is.EqualTo("localhost")); + }); + } + + [Test] + public void GetConnectOptionsAsync_WhenNoAuthTokenIsSet_ThrowsException() + { + var defaultAzureCredentialMock = new Mock(); + var jsonWebTokenHandlerMock = new Mock(); + var entraLifecycleMock = new Mock(defaultAzureCredentialMock.Object, jsonWebTokenHandlerMock.Object); + var service = new PlaywrightService(entraLifecycle: entraLifecycleMock.Object); + + Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceAccessToken, null); + + Exception? ex = Assert.ThrowsAsync(() => service.GetConnectOptionsAsync()); + Assert.That(ex!.Message, Is.EqualTo(Constants.s_no_auth_error)); + } + + [Test] + public void GetDefaultRunId_RunIdSetViaEnvironmentVariable_ReturnsRunId() + { + var runId = "run-id"; + Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceRunId, runId); + Assert.Multiple(() => + { + Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceRunId, null); + Assert.That(PlaywrightService.GetDefaultRunId(), Is.Not.Null); + }); + } + + [Test] + public void GetDefaultRunId_RunIdNotSetViaEnvironmentVariable_ReturnsRandomRunId() + { + Assert.Multiple(() => + { + Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceRunId, null); + Assert.That(PlaywrightService.GetDefaultRunId(), Is.Not.Null); + }); + } + + [Test] + public void SetReportingUrlAndWorkspaceId_WhenServiceEndpointIsSet_SetsReportingUrlAndWorkspaceId() + { + var testRubricCombinations = new List>() + { + new() + { + { "url", "wss://eastus.api.playwright.microsoft.com/accounts/eastus_bd830e63-6120-40cb-8cd7-f0739502d888/browsers" }, + { "workspaceId", "eastus_bd830e63-6120-40cb-8cd7-f0739502d888" }, + { "region", "eastus" }, + { "domain", "playwright.microsoft.com" } + }, + new() + { + { "url", "wss://eastus.api.playwright.microsoft.com/accounts/77a38aac-4577-43a9-ac72-5720e5459c5a/browsers" }, + { "workspaceId", "77a38aac-4577-43a9-ac72-5720e5459c5a" }, + { "region", "eastus" }, + { "domain", "playwright.microsoft.com" } + }, + new() + { + { "url", "wss://westus3.api.playwright.microsoft.com/accounts/ad3cf59a-43e1-4dbe-af22-49bfe72b4178/browsers" }, + { "workspaceId", "ad3cf59a-43e1-4dbe-af22-49bfe72b4178" }, + { "region", "westus3" }, + { "domain", "playwright.microsoft.com" } + }, + new() + { + { "url", "wss://westus3.api.playwright-int.io/accounts/3c9ae1d4-e856-4ce0-8b56-1f4488676dff/browsers" }, + { "workspaceId", "3c9ae1d4-e856-4ce0-8b56-1f4488676dff" }, + { "region", "westus3" }, + { "domain", "playwright-int.io" } + }, + new() + { + { "url", "wss://eastasia.api.playwright-test.io/accounts/29abee44-a5f4-477e-9ff1-6c6786d09c7c/browsers" }, + { "workspaceId", "29abee44-a5f4-477e-9ff1-6c6786d09c7c" }, + { "region", "eastasia" }, + { "domain", "playwright-test.io" } + } + }; + + foreach (Dictionary testRubric in testRubricCombinations) + { + Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceUri, $"{testRubric["url"]}"); + var service = new PlaywrightService(entraLifecycle: null); + Assert.Multiple(() => + { + Assert.That(Environment.GetEnvironmentVariable(Constants.s_playwright_service_reporting_url_environment_variable), Is.EqualTo($"https://{testRubric["region"]}.reporting.api.{testRubric["domain"]}")); + Assert.That(Environment.GetEnvironmentVariable(Constants.s_playwright_service_workspace_id_environment_variable), Is.EqualTo(testRubric["workspaceId"])); + }); + Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceUri, null); + Environment.SetEnvironmentVariable(Constants.s_playwright_service_reporting_url_environment_variable, null); + Environment.SetEnvironmentVariable(Constants.s_playwright_service_workspace_id_environment_variable, null); + } + } + + [Test] + public void SetReportingUrlAndWorkspaceId_WhenReportingServiceEndpointIsSet_OnlySetsWorkspaceId() + { + var testRubric = new Dictionary + { + { "url", "wss://eastus.api.playwright.microsoft.com/accounts/eastus_bd830e63-6120-40cb-8cd7-f0739502d888/browsers" }, + { "workspaceId", "eastus_bd830e63-6120-40cb-8cd7-f0739502d888" }, + { "region", "eastus" }, + { "domain", "playwright.microsoft.com" } + }; + Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceUri, $"{testRubric["url"]}"); + Environment.SetEnvironmentVariable(Constants.s_playwright_service_reporting_url_environment_variable, "https://playwright.microsoft.com"); + var service = new PlaywrightService(entraLifecycle: null); + Assert.Multiple(() => + { + Assert.That(Environment.GetEnvironmentVariable(Constants.s_playwright_service_reporting_url_environment_variable), Is.EqualTo("https://playwright.microsoft.com")); + Assert.That(Environment.GetEnvironmentVariable(Constants.s_playwright_service_workspace_id_environment_variable), Is.EqualTo(testRubric["workspaceId"])); + }); + } + + [Test] + public void SetReportingUrlAndWorkspaceId_WhenReportingServiceEndpointAndWorkspaceIdIsSet_NoOp() + { + var testRubric = new Dictionary + { + { "url", "wss://eastus.api.playwright.microsoft.com/accounts/eastus_bd830e63-6120-40cb-8cd7-f0739502d888/browsers" }, + { "workspaceId", "eastus_bd830e63-6120-40cb-8cd7-f0739502d888" }, + { "region", "eastus" }, + { "domain", "playwright.microsoft.com" } + }; + Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceUri, $"{testRubric["url"]}"); + Environment.SetEnvironmentVariable(Constants.s_playwright_service_reporting_url_environment_variable, "https://playwright.microsoft.com"); + Environment.SetEnvironmentVariable(Constants.s_playwright_service_workspace_id_environment_variable, "sample-id"); + var service = new PlaywrightService(entraLifecycle: null); + Assert.Multiple(() => + { + Assert.That(Environment.GetEnvironmentVariable(Constants.s_playwright_service_reporting_url_environment_variable), Is.EqualTo("https://playwright.microsoft.com")); + Assert.That(Environment.GetEnvironmentVariable(Constants.s_playwright_service_workspace_id_environment_variable), Is.EqualTo("sample-id")); + }); + } +} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/tests/Processor/DataProcessorTests.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/tests/Processor/DataProcessorTests.cs new file mode 100644 index 000000000000..42b423e35767 --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/tests/Processor/DataProcessorTests.cs @@ -0,0 +1,179 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Model; +using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Processor; +using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Utility; +using Microsoft.VisualStudio.TestPlatform.ObjectModel; + +namespace Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Tests.Processor +{ + [TestFixture] + [Parallelizable(ParallelScope.Self)] + public class DataProcessorTests + { + [Test] + public void GetTestRun_ReturnsTestRunDto() + { + var cloudRunMetadata = new CloudRunMetadata + { + WorkspaceId = "workspaceId", + RunId = "runId", + AccessTokenDetails = new() + { + oid = "oid", + userName = " userName " + } + }; + var cIInfo = new CIInfo + { + Branch = "branch_name", + Author = "author", + CommitId = "commitId", + RevisionUrl = "revisionUrl", + Provider = CIConstants.s_gITHUB_ACTIONS + }; + var dataProcessor = new DataProcessor(cloudRunMetadata, cIInfo); + + TestRunDto result = dataProcessor.GetTestRun(); + + Assert.IsNotNull(result); + Assert.IsInstanceOf(result); + + Assert.AreEqual(cloudRunMetadata.RunId, result.TestRunId); + Assert.IsNotNull(result.DisplayName); + Assert.IsNotNull(result.StartTime); + Assert.AreEqual(cloudRunMetadata.AccessTokenDetails.oid, result.CreatorId); + Assert.AreEqual("userName", result.CreatorName); + Assert.IsTrue(result.CloudReportingEnabled); + Assert.IsFalse(result.CloudRunEnabled); + Assert.IsNotNull(result.CiConfig); + Assert.AreEqual(cIInfo.Branch, result.CiConfig!.Branch); + Assert.AreEqual(cIInfo.Author, result.CiConfig!.Author); + Assert.AreEqual(cIInfo.CommitId, result.CiConfig!.CommitId); + Assert.AreEqual(cIInfo.RevisionUrl, result.CiConfig!.RevisionUrl); + Assert.AreEqual(cIInfo.Provider, result.CiConfig!.CiProviderName); + Assert.IsNotNull(result.TestRunConfig); + Assert.AreEqual(1, result.TestRunConfig!.Workers); + Assert.AreEqual("1.40", result.TestRunConfig!.PwVersion); + Assert.AreEqual(60000, result.TestRunConfig!.Timeout); + Assert.AreEqual("WebTest", result.TestRunConfig!.TestType); + Assert.AreEqual("CSHARP", result.TestRunConfig!.TestSdkLanguage); + Assert.IsNotNull(result.TestRunConfig!.TestFramework); + Assert.AreEqual("PLAYWRIGHT", result.TestRunConfig!.TestFramework!.Name); + Assert.AreEqual("NUNIT", result.TestRunConfig!.TestFramework!.RunnerName); + Assert.AreEqual("3.1", result.TestRunConfig!.TestFramework!.Version); + Assert.AreEqual("1.0.0-beta.1", result.TestRunConfig!.ReporterPackageVersion); + Assert.IsNotNull(result.TestRunConfig!.Shards); + Assert.AreEqual(1, result.TestRunConfig!.Shards!.Total); + } + + [Test] + public void GetTestRunShard_ReturnsTestRunShardDto() + { + var cloudRunMetadata = new CloudRunMetadata(); + var cIInfo = new CIInfo(); + var dataProcessor = new DataProcessor(cloudRunMetadata, cIInfo); + + TestRunShardDto result = dataProcessor.GetTestRunShard(); + + Assert.IsNotNull(result); + Assert.IsInstanceOf(result); + Assert.IsFalse(result.UploadCompleted); + Assert.AreEqual("1", result.ShardId); + Assert.IsNotNull(result.Summary); + Assert.AreEqual("RUNNING", result.Summary!.Status); + Assert.IsNotNull(result.Summary!.StartTime); + Assert.AreEqual(1, result.Workers); + } + + [Test] + public void GetTestCaseResultData_WithNullTestResult_ReturnsEmptyTestResults() + { + var cloudRunMetadata = new CloudRunMetadata(); + var cIInfo = new CIInfo(); + var dataProcessor = new DataProcessor(cloudRunMetadata, cIInfo); + TestResult? testResult = null; + + TestResults result = dataProcessor.GetTestCaseResultData(testResult); + + Assert.IsNotNull(result); + } + + [Test] + public void GetTestCaseResultData_WithNonNullTestResult_ReturnsTestResults() + { + var cloudRunMetadata = new CloudRunMetadata + { + WorkspaceId = "workspaceId", + RunId = "runId", + AccessTokenDetails = new() + { + oid = "oid", + userName = " userName " + } + }; + var cIInfo = new CIInfo + { + Branch = "branch_name", + Author = "author", + CommitId = "commitId", + RevisionUrl = "revisionUrl", + Provider = CIConstants.s_gITHUB_ACTIONS, + JobId = "jobId" + }; + var dataProcessor = new DataProcessor(cloudRunMetadata, cIInfo); + var testResult = new TestResult(new TestCase("Test.Reporting", new System.Uri("file:///test.cs"), "TestNamespace.TestClass")); + + TestResults result = dataProcessor.GetTestCaseResultData(testResult); + + Assert.IsNotNull(result); + Assert.IsEmpty(result.ArtifactsPath); + Assert.AreEqual(cloudRunMetadata.WorkspaceId, result.AccountId); + Assert.AreEqual(cloudRunMetadata.RunId, result.RunId); + Assert.IsNotNull(result.TestExecutionId); + Assert.IsNotNull(result.TestCombinationId); + Assert.IsNotNull(result.TestId); + Assert.AreEqual(testResult.TestCase.DisplayName, result.TestTitle); + Assert.AreEqual("Test", result.SuiteTitle); + Assert.AreEqual("Test", result.SuiteId); + Assert.AreEqual("TestNamespace.TestClass", result.FileName); + Assert.AreEqual(testResult.TestCase.LineNumber, result.LineNumber); + Assert.AreEqual(0, result.Retry); + Assert.IsNotNull(result.WebTestConfig); + Assert.AreEqual(cIInfo.JobId, result.WebTestConfig!.JobName); + Assert.AreEqual(ReporterUtils.GetCurrentOS(), result.WebTestConfig.Os); + Assert.IsNotNull(result.ResultsSummary); + Assert.AreEqual((long)testResult.Duration.TotalMilliseconds, result.ResultsSummary!.Duration); + Assert.AreEqual(testResult.StartTime.ToString("yyyy-MM-ddTHH:mm:ssZ"), result.ResultsSummary.StartTime); + Assert.AreEqual(TestCaseResultStatus.s_iNCONCLUSIVE, result.ResultsSummary.Status); + Assert.AreEqual(TestCaseResultStatus.s_iNCONCLUSIVE, result.Status); + } + + [Test] + public void GetRawResultObject_WithNullTestResult_ReturnsRawTestResultWithEmptyErrorsAndStdErr() + { + RawTestResult result = DataProcessor.GetRawResultObject(null); + + Assert.IsNotNull(result); + Assert.AreEqual("[]", result.errors); + Assert.AreEqual("[]", result.stdErr); + } + + [Test] + public void GetRawResultObject_WithNonNullTestResult_ReturnsRawTestResultWithErrorsAndStdErr() + { + var testResult = new TestResult(new TestCase("Test", new System.Uri("file:///test.cs"), "TestNamespace.TestClass")) + { + ErrorMessage = "An error occurred", + ErrorStackTrace = "Error stack trace" + }; + + RawTestResult result = DataProcessor.GetRawResultObject(testResult); + + Assert.IsNotNull(result); + Assert.AreEqual("[{\"message\":\"An error occurred\"}]", result.errors); + Assert.AreEqual("Error stack trace", result.stdErr); + } + } +} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/tests/Processor/TestProcessorTests.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/tests/Processor/TestProcessorTests.cs new file mode 100644 index 000000000000..652f73195b3e --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/tests/Processor/TestProcessorTests.cs @@ -0,0 +1,584 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Interface; +using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Model; +using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Processor; +using Microsoft.VisualStudio.TestPlatform.ObjectModel; +using Microsoft.VisualStudio.TestPlatform.ObjectModel.Client; +using Microsoft.VisualStudio.TestPlatform.ObjectModel.Logging; +using Moq; + +namespace Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Tests.Processor +{ + [TestFixture] + [Parallelizable(ParallelScope.Self)] + public class TestProcessorTests + { + private CIInfo _cIInfo = new(); + private CloudRunMetadata _cloudRunMetadata = new(); + + [SetUp] + public void Setup() + { + _cloudRunMetadata = new CloudRunMetadata + { + WorkspaceId = "workspaceId", + RunId = "runId", + AccessTokenDetails = new() + { + oid = "oid", + userName = " userName " + }, + EnableGithubSummary = false + }; + _cIInfo = new CIInfo + { + Branch = "branch_name", + Author = "author", + CommitId = "commitId", + RevisionUrl = "revisionUrl", + Provider = CIConstants.s_gITHUB_ACTIONS + }; + } + + [Test] + public void TestRunStartHandler_CreatesTestRunAndShardInfo() + { + var loggerMock = new Mock(); + var dataProcessorMock = new Mock(); + var cloudRunErrorParserMock = new Mock(); + var serviceClientMock = new Mock(); + var consoleWriterMock = new Mock(); + var testProcessor = new TestProcessor(_cloudRunMetadata, _cIInfo, loggerMock.Object, dataProcessorMock.Object, cloudRunErrorParserMock.Object, serviceClientMock.Object, consoleWriterMock.Object); + var sender = new object(); + + var testRunShardDto = new TestRunShardDto(); + + serviceClientMock.Setup(sc => sc.PatchTestRunInfo(It.IsAny())).Returns(new TestRunDto()); + serviceClientMock.Setup(sc => sc.PostTestRunShardInfo(It.IsAny())).Returns(testRunShardDto); + + var sources = new List { "source1", "source2" }; + var testRunCriteria = new TestRunCriteria(sources, 1); + var e = new TestRunStartEventArgs(testRunCriteria); + testProcessor.TestRunStartHandler(sender, e); + + dataProcessorMock.Verify(dp => dp.GetTestRun(), Times.Once); + dataProcessorMock.Verify(dp => dp.GetTestRunShard(), Times.Once); + serviceClientMock.Verify(sc => sc.PatchTestRunInfo(It.IsAny()), Times.Once); + serviceClientMock.Verify(sc => sc.PostTestRunShardInfo(It.IsAny()), Times.Once); + Assert.AreEqual(testRunShardDto, testProcessor._testRunShard); + Assert.IsFalse(testProcessor.FatalTestExecution); + } + + [Test] + public void TestRunStartHandler_PatchTestRunReturnsNull_MarksTestExecutionAsFatal() + { + var loggerMock = new Mock(); + var dataProcessorMock = new Mock(); + var cloudRunErrorParserMock = new Mock(); + var serviceClientMock = new Mock(); + var consoleWriterMock = new Mock(); + var testProcessor = new TestProcessor(_cloudRunMetadata, _cIInfo, loggerMock.Object, dataProcessorMock.Object, cloudRunErrorParserMock.Object, serviceClientMock.Object, consoleWriterMock.Object); + var sender = new object(); + + serviceClientMock.Setup(sc => sc.PatchTestRunInfo(It.IsAny())).Returns((TestRunDto?)null); + + var sources = new List { "source1", "source2" }; + var testRunCriteria = new TestRunCriteria(sources, 1); + var e = new TestRunStartEventArgs(testRunCriteria); + testProcessor.TestRunStartHandler(sender, e); + + dataProcessorMock.Verify(dp => dp.GetTestRun(), Times.Once); + dataProcessorMock.Verify(dp => dp.GetTestRunShard(), Times.Once); + serviceClientMock.Verify(sc => sc.PatchTestRunInfo(It.IsAny()), Times.Once); + serviceClientMock.Verify(sc => sc.PostTestRunShardInfo(It.IsAny()), Times.Never); + Assert.IsNull(testProcessor._testRunShard); + Assert.IsTrue(testProcessor.FatalTestExecution); + } + + [Test] + public void TestRunStartHandler_PatchTestRunThrowsError_MarksTestExecutionAsFatal() + { + var loggerMock = new Mock(); + var dataProcessorMock = new Mock(); + var cloudRunErrorParserMock = new Mock(); + var serviceClientMock = new Mock(); + var consoleWriterMock = new Mock(); + var testProcessor = new TestProcessor(_cloudRunMetadata, _cIInfo, loggerMock.Object, dataProcessorMock.Object, cloudRunErrorParserMock.Object, serviceClientMock.Object, consoleWriterMock.Object); + var sender = new object(); + + serviceClientMock.Setup(sc => sc.PatchTestRunInfo(It.IsAny())).Throws(new System.Exception()); + + var sources = new List { "source1", "source2" }; + var testRunCriteria = new TestRunCriteria(sources, 1); + var e = new TestRunStartEventArgs(testRunCriteria); + testProcessor.TestRunStartHandler(sender, e); + + dataProcessorMock.Verify(dp => dp.GetTestRun(), Times.Once); + dataProcessorMock.Verify(dp => dp.GetTestRunShard(), Times.Once); + serviceClientMock.Verify(sc => sc.PatchTestRunInfo(It.IsAny()), Times.Once); + serviceClientMock.Verify(sc => sc.PostTestRunShardInfo(It.IsAny()), Times.Never); + Assert.IsNull(testProcessor._testRunShard); + Assert.IsTrue(testProcessor.FatalTestExecution); + } + + [Test] + public void TestRunStartHandler_PostTestRunShardReturnsNull_MarksTestExecutionAsFatal() + { + var loggerMock = new Mock(); + var dataProcessorMock = new Mock(); + var cloudRunErrorParserMock = new Mock(); + var serviceClientMock = new Mock(); + var consoleWriterMock = new Mock(); + var testProcessor = new TestProcessor(_cloudRunMetadata, _cIInfo, loggerMock.Object, dataProcessorMock.Object, cloudRunErrorParserMock.Object, serviceClientMock.Object, consoleWriterMock.Object); + var sender = new object(); + + serviceClientMock.Setup(sc => sc.PatchTestRunInfo(It.IsAny())).Returns(new TestRunDto()); + serviceClientMock.Setup(sc => sc.PostTestRunShardInfo(It.IsAny())).Returns((TestRunShardDto?)null); + + var sources = new List { "source1", "source2" }; + var testRunCriteria = new TestRunCriteria(sources, 1); + var e = new TestRunStartEventArgs(testRunCriteria); + testProcessor.TestRunStartHandler(sender, e); + + dataProcessorMock.Verify(dp => dp.GetTestRun(), Times.Once); + dataProcessorMock.Verify(dp => dp.GetTestRunShard(), Times.Once); + serviceClientMock.Verify(sc => sc.PatchTestRunInfo(It.IsAny()), Times.Once); + serviceClientMock.Verify(sc => sc.PostTestRunShardInfo(It.IsAny()), Times.Once); + Assert.IsNull(testProcessor._testRunShard); + Assert.IsTrue(testProcessor.FatalTestExecution); + } + + [Test] + public void TestRunStartHandler_PostTestRunShardThrowsError_MarksTestExecutionAsFatal() + { + var loggerMock = new Mock(); + var dataProcessorMock = new Mock(); + var cloudRunErrorParserMock = new Mock(); + var serviceClientMock = new Mock(); + var consoleWriterMock = new Mock(); + var testProcessor = new TestProcessor(_cloudRunMetadata, _cIInfo, loggerMock.Object, dataProcessorMock.Object, cloudRunErrorParserMock.Object, serviceClientMock.Object, consoleWriterMock.Object); + var sender = new object(); + + serviceClientMock.Setup(sc => sc.PatchTestRunInfo(It.IsAny())).Returns(new TestRunDto()); + serviceClientMock.Setup(sc => sc.PostTestRunShardInfo(It.IsAny())).Throws(new System.Exception()); + + var sources = new List { "source1", "source2" }; + var testRunCriteria = new TestRunCriteria(sources, 1); + var e = new TestRunStartEventArgs(testRunCriteria); + testProcessor.TestRunStartHandler(sender, e); + + dataProcessorMock.Verify(dp => dp.GetTestRun(), Times.Once); + dataProcessorMock.Verify(dp => dp.GetTestRunShard(), Times.Once); + serviceClientMock.Verify(sc => sc.PatchTestRunInfo(It.IsAny()), Times.Once); + serviceClientMock.Verify(sc => sc.PostTestRunShardInfo(It.IsAny()), Times.Once); + Assert.IsNull(testProcessor._testRunShard); + Assert.IsTrue(testProcessor.FatalTestExecution); + } + + [Test] + public void TestRunStartHandler_EnableResultPublishIsFalse_ShouldBeNoOp() + { + var loggerMock = new Mock(); + var dataProcessorMock = new Mock(); + var cloudRunErrorParserMock = new Mock(); + var serviceClientMock = new Mock(); + var consoleWriterMock = new Mock(); + _cloudRunMetadata.EnableResultPublish = false; + var testProcessor = new TestProcessor(_cloudRunMetadata, _cIInfo, loggerMock.Object, dataProcessorMock.Object, cloudRunErrorParserMock.Object, serviceClientMock.Object, consoleWriterMock.Object); + var sender = new object(); + + var sources = new List { "source1", "source2" }; + var testRunCriteria = new TestRunCriteria(sources, 1); + var e = new TestRunStartEventArgs(testRunCriteria); + testProcessor.TestRunStartHandler(sender, e); + + dataProcessorMock.Verify(dp => dp.GetTestRun(), Times.Never); + dataProcessorMock.Verify(dp => dp.GetTestRunShard(), Times.Never); + serviceClientMock.Verify(sc => sc.PatchTestRunInfo(It.IsAny()), Times.Never); + serviceClientMock.Verify(sc => sc.PostTestRunShardInfo(It.IsAny()), Times.Never); + Assert.IsNull(testProcessor._testRunShard); + Assert.IsFalse(testProcessor.FatalTestExecution); + } + + [Test] + public void TestCaseResultHandler_TestPassed_AddsTestResultToTestResultsList() + { + var loggerMock = new Mock(); + var dataProcessorMock = new Mock(); + var cloudRunErrorParserMock = new Mock(); + var serviceClientMock = new Mock(); + var consoleWriterMock = new Mock(); + var testProcessor = new TestProcessor(_cloudRunMetadata, _cIInfo, loggerMock.Object, dataProcessorMock.Object, cloudRunErrorParserMock.Object, serviceClientMock.Object, consoleWriterMock.Object); + var sender = new object(); + + var testResults = new TestResults + { + Status = TestCaseResultStatus.s_pASSED + }; + + dataProcessorMock.Setup(dp => dp.GetTestCaseResultData(It.IsAny())).Returns(testResults); + + var testResult = new TestResult(new TestCase("Test", new System.Uri("file://test.cs"), "test-source")); + + testProcessor.TestCaseResultHandler(sender, new TestResultEventArgs(testResult)); + + Assert.AreEqual(1, testProcessor.TestResults.Count); + Assert.AreEqual(testResults, testProcessor.TestResults[0]); + Assert.IsTrue(testProcessor.RawTestResultsMap.Keys.Count == 1); + Assert.IsTrue(testProcessor.PassedTestCount == 1); + Assert.IsTrue(testProcessor.FailedTestCount == 0); + Assert.IsTrue(testProcessor.SkippedTestCount == 0); + cloudRunErrorParserMock.Verify(c => c.HandleScalableRunErrorMessage(It.IsAny()), Times.Exactly(2)); + } + + [Test] + public void TestCaseResultHandler_TestFailed_AddsTestResultToTestResultsList() + { + var loggerMock = new Mock(); + var dataProcessorMock = new Mock(); + var cloudRunErrorParserMock = new Mock(); + var serviceClientMock = new Mock(); + var consoleWriterMock = new Mock(); + var testProcessor = new TestProcessor(_cloudRunMetadata, _cIInfo, loggerMock.Object, dataProcessorMock.Object, cloudRunErrorParserMock.Object, serviceClientMock.Object, consoleWriterMock.Object); + var sender = new object(); + + var testResults = new TestResults + { + Status = TestCaseResultStatus.s_fAILED + }; + + dataProcessorMock.Setup(dp => dp.GetTestCaseResultData(It.IsAny())).Returns(testResults); + + var testResult = new TestResult(new TestCase("Test", new System.Uri("file://test.cs"), "test-source")); + + testProcessor.TestCaseResultHandler(sender, new TestResultEventArgs(testResult)); + + Assert.AreEqual(1, testProcessor.TestResults.Count); + Assert.AreEqual(testResults, testProcessor.TestResults[0]); + Assert.IsTrue(testProcessor.RawTestResultsMap.Keys.Count == 1); + Assert.IsTrue(testProcessor.PassedTestCount == 0); + Assert.IsTrue(testProcessor.FailedTestCount == 1); + Assert.IsTrue(testProcessor.SkippedTestCount == 0); + cloudRunErrorParserMock.Verify(c => c.HandleScalableRunErrorMessage(It.IsAny()), Times.Exactly(2)); + } + + [Test] + public void TestCaseResultHandler_TestSkipped_AddsTestResultToTestResultsList() + { + var loggerMock = new Mock(); + var dataProcessorMock = new Mock(); + var cloudRunErrorParserMock = new Mock(); + var serviceClientMock = new Mock(); + var consoleWriterMock = new Mock(); + var testProcessor = new TestProcessor(_cloudRunMetadata, _cIInfo, loggerMock.Object, dataProcessorMock.Object, cloudRunErrorParserMock.Object, serviceClientMock.Object, consoleWriterMock.Object); + var sender = new object(); + + var testResults = new TestResults + { + Status = TestCaseResultStatus.s_sKIPPED + }; + + dataProcessorMock.Setup(dp => dp.GetTestCaseResultData(It.IsAny())).Returns(testResults); + + var testResult = new TestResult(new TestCase("Test", new System.Uri("file://test.cs"), "test-source")); + + testProcessor.TestCaseResultHandler(sender, new TestResultEventArgs(testResult)); + + Assert.AreEqual(1, testProcessor.TestResults.Count); + Assert.AreEqual(testResults, testProcessor.TestResults[0]); + Assert.IsTrue(testProcessor.RawTestResultsMap.Keys.Count == 1); + Assert.IsTrue(testProcessor.PassedTestCount == 0); + Assert.IsTrue(testProcessor.FailedTestCount == 0); + Assert.IsTrue(testProcessor.SkippedTestCount == 1); + cloudRunErrorParserMock.Verify(c => c.HandleScalableRunErrorMessage(It.IsAny()), Times.Exactly(2)); + } + + [Test] + public void TestCaseResultHandler_ShouldPassErrorMessageAndStackTraceForScalableErrorParsing() + { + var loggerMock = new Mock(); + var dataProcessorMock = new Mock(); + var cloudRunErrorParserMock = new Mock(); + var serviceClientMock = new Mock(); + var consoleWriterMock = new Mock(); + var testProcessor = new TestProcessor(_cloudRunMetadata, _cIInfo, loggerMock.Object, dataProcessorMock.Object, cloudRunErrorParserMock.Object, serviceClientMock.Object, consoleWriterMock.Object); + var sender = new object(); + + var testResults = new TestResults + { + Status = TestCaseResultStatus.s_sKIPPED + }; + dataProcessorMock.Setup(dp => dp.GetTestCaseResultData(It.IsAny())).Returns(testResults); + + var testResult = new TestResult(new TestCase("Test", new System.Uri("file://test.cs"), "test-source")); + + testProcessor.TestCaseResultHandler(sender, new TestResultEventArgs(testResult) + { + Result = + { + ErrorMessage = "Error message", + ErrorStackTrace = "Error stack trace" + } + }); + + cloudRunErrorParserMock.Verify(c => c.HandleScalableRunErrorMessage(It.IsAny()), Times.Exactly(2)); + cloudRunErrorParserMock.Verify(c => c.HandleScalableRunErrorMessage("Error message"), Times.Once); + cloudRunErrorParserMock.Verify(c => c.HandleScalableRunErrorMessage("Error stack trace"), Times.Once); + } + + [Test] + public void TestCaseResultHandler_EnableResultPublishFalse_OnlyParseScalableErrorMessage() + { + var loggerMock = new Mock(); + var dataProcessorMock = new Mock(); + var cloudRunErrorParserMock = new Mock(); + var serviceClientMock = new Mock(); + var consoleWriterMock = new Mock(); + _cloudRunMetadata.EnableResultPublish = false; + var testProcessor = new TestProcessor(_cloudRunMetadata, _cIInfo, loggerMock.Object, dataProcessorMock.Object, cloudRunErrorParserMock.Object, serviceClientMock.Object, consoleWriterMock.Object); + var sender = new object(); + + var testResults = new TestResults + { + Status = TestCaseResultStatus.s_sKIPPED + }; + + dataProcessorMock.Setup(dp => dp.GetTestCaseResultData(It.IsAny())).Returns(testResults); + + var testResult = new TestResult(new TestCase("Test", new System.Uri("file://test.cs"), "test-source")); + + testProcessor.TestCaseResultHandler(sender, new TestResultEventArgs(testResult)); + + Assert.AreEqual(0, testProcessor.TestResults.Count); + Assert.IsTrue(testProcessor.RawTestResultsMap.Keys.Count == 0); + Assert.IsTrue(testProcessor.PassedTestCount == 0); + Assert.IsTrue(testProcessor.FailedTestCount == 0); + Assert.IsTrue(testProcessor.SkippedTestCount == 0); + cloudRunErrorParserMock.Verify(c => c.HandleScalableRunErrorMessage(It.IsAny()), Times.Exactly(2)); + } + + [Test] + public void TestCaseResultHandler_ExceptionThrown_ShouldBeNoOp() + { + var loggerMock = new Mock(); + var dataProcessorMock = new Mock(); + var cloudRunErrorParserMock = new Mock(); + var serviceClientMock = new Mock(); + var consoleWriterMock = new Mock(); + var testProcessor = new TestProcessor(_cloudRunMetadata, _cIInfo, loggerMock.Object, dataProcessorMock.Object, cloudRunErrorParserMock.Object, serviceClientMock.Object, consoleWriterMock.Object); + var sender = new object(); + + var testResults = new TestResults + { + Status = TestCaseResultStatus.s_sKIPPED + }; + + dataProcessorMock.Setup(dp => dp.GetTestCaseResultData(It.IsAny())).Throws(new System.Exception()); + + var testResult = new TestResult(new TestCase("Test", new System.Uri("file://test.cs"), "test-source")); + + testProcessor.TestCaseResultHandler(sender, new TestResultEventArgs(testResult)); + + Assert.AreEqual(0, testProcessor.TestResults.Count); + Assert.IsTrue(testProcessor.RawTestResultsMap.Keys.Count == 0); + Assert.IsTrue(testProcessor.PassedTestCount == 0); + Assert.IsTrue(testProcessor.FailedTestCount == 0); + Assert.IsTrue(testProcessor.SkippedTestCount == 0); + cloudRunErrorParserMock.Verify(c => c.HandleScalableRunErrorMessage(It.IsAny()), Times.Never); + } + + [Test] + public void TestRunCompleteHandler_UploadsTestResults() + { + var loggerMock = new Mock(); + var dataProcessorMock = new Mock(); + var cloudRunErrorParserMock = new Mock(); + var serviceClientMock = new Mock(); + var consoleWriterMock = new Mock(); + var testProcessor = new TestProcessor(_cloudRunMetadata, _cIInfo, loggerMock.Object, dataProcessorMock.Object, cloudRunErrorParserMock.Object, serviceClientMock.Object, consoleWriterMock.Object); + var sender = new object(); + var testResults = new List + { + new() { Status = TestCaseResultStatus.s_pASSED }, + new() { Status = TestCaseResultStatus.s_fAILED }, + new() { Status = TestCaseResultStatus.s_sKIPPED } + }; + testProcessor.TestResults = testResults; + testProcessor.TestRunCompleteHandler(sender, new TestRunCompleteEventArgs(null, false, false, null, null, TimeSpan.Zero)); + + serviceClientMock.Verify(c => c.UploadBatchTestResults(It.IsAny()), Times.Once); + } + + [Test] + public void TestRunCompleteHandler_UploadsTestResultsThrows_IgnoresException() + { + var loggerMock = new Mock(); + var dataProcessorMock = new Mock(); + var cloudRunErrorParserMock = new Mock(); + var serviceClientMock = new Mock(); + var consoleWriterMock = new Mock(); + var testProcessor = new TestProcessor(_cloudRunMetadata, _cIInfo, loggerMock.Object, dataProcessorMock.Object, cloudRunErrorParserMock.Object, serviceClientMock.Object, consoleWriterMock.Object); + var sender = new object(); + + serviceClientMock.Setup(c => c.UploadBatchTestResults(It.IsAny())).Throws(new System.Exception()); + + var testResults = new List + { + new() { Status = TestCaseResultStatus.s_pASSED }, + new() { Status = TestCaseResultStatus.s_fAILED }, + new() { Status = TestCaseResultStatus.s_sKIPPED } + }; + testProcessor.TestResults = testResults; + testProcessor.TestRunCompleteHandler(sender, new TestRunCompleteEventArgs(null, false, false, null, null, TimeSpan.Zero)); + + serviceClientMock.Verify(c => c.UploadBatchTestResults(It.IsAny()), Times.Once); + } + + [Test] + public void TestRunCompleteHandler_PatchesTestRunShardInfo() + { + var loggerMock = new Mock(); + var dataProcessorMock = new Mock(); + var cloudRunErrorParserMock = new Mock(); + var serviceClientMock = new Mock(); + var consoleWriterMock = new Mock(); + var testProcessor = new TestProcessor(_cloudRunMetadata, _cIInfo, loggerMock.Object, dataProcessorMock.Object, cloudRunErrorParserMock.Object, serviceClientMock.Object, consoleWriterMock.Object); + var sender = new object(); + testProcessor._testRunShard = new TestRunShardDto(); + testProcessor.TotalTestCount = 100; + + var testResults = new List { }; + testProcessor.TestResults = testResults; + testProcessor.TestRunCompleteHandler(sender, new TestRunCompleteEventArgs(null, false, false, null, null, TimeSpan.Zero)); + + serviceClientMock.Verify(c => c.UploadBatchTestResults(It.IsAny()), Times.Once); + serviceClientMock.Verify(c => c.PostTestRunShardInfo(It.IsAny()), Times.Once); + Assert.AreEqual("CLIENT_COMPLETE", testProcessor._testRunShard.Summary!.Status); + Assert.IsNotNull(testProcessor._testRunShard.Summary!.EndTime); + Assert.IsNotNull(testProcessor._testRunShard.Summary!.TotalTime); + Assert.AreEqual(100, testProcessor._testRunShard.Summary!.UploadMetadata!.NumTestResults); + Assert.AreEqual(0, testProcessor._testRunShard.Summary!.UploadMetadata!.NumTotalAttachments); + Assert.AreEqual(0, testProcessor._testRunShard.Summary!.UploadMetadata!.SizeTotalAttachments); + Assert.IsTrue(testProcessor._testRunShard.UploadCompleted); + } + + [Test] + public void TestRunCompleteHandler_PatchesTestRunShardInfoThrows_DisplaysInformationMessagesAndPortalUrl() + { + var loggerMock = new Mock(); + var dataProcessorMock = new Mock(); + var cloudRunErrorParserMock = new Mock(); + var serviceClientMock = new Mock(); + var consoleWriterMock = new Mock(); + var testProcessor = new TestProcessor(_cloudRunMetadata, _cIInfo, loggerMock.Object, dataProcessorMock.Object, cloudRunErrorParserMock.Object, serviceClientMock.Object, consoleWriterMock.Object); + var sender = new object(); + + serviceClientMock.Setup(c => c.PostTestRunShardInfo(It.IsAny())).Throws(new System.Exception()); + + testProcessor._testRunShard = new TestRunShardDto(); + + var testResults = new List { }; + testProcessor.TestResults = testResults; + testProcessor.TestRunCompleteHandler(sender, new TestRunCompleteEventArgs(null, false, false, null, null, TimeSpan.Zero)); + + serviceClientMock.Verify(c => c.UploadBatchTestResults(It.IsAny()), Times.Once); + serviceClientMock.Verify(c => c.PostTestRunShardInfo(It.IsAny()), Times.Once); + consoleWriterMock.Verify(c => c.WriteLine("\nTest Report: " + _cloudRunMetadata.PortalUrl), Times.Once); + cloudRunErrorParserMock.Verify(c => c.DisplayMessages(), Times.Exactly(1)); + } + + [Test] + public void TestRunCompleteHandler_DisplaysTestRunUrl() + { + var loggerMock = new Mock(); + var dataProcessorMock = new Mock(); + var cloudRunErrorParserMock = new Mock(); + var serviceClientMock = new Mock(); + var consoleWriterMock = new Mock(); + var testProcessor = new TestProcessor(_cloudRunMetadata, _cIInfo, loggerMock.Object, dataProcessorMock.Object, cloudRunErrorParserMock.Object, serviceClientMock.Object, consoleWriterMock.Object); + var sender = new object(); + testProcessor._testRunShard = new TestRunShardDto(); + + var testResults = new List { }; + testProcessor.TestResults = testResults; + testProcessor.TestRunCompleteHandler(sender, new TestRunCompleteEventArgs(null, false, false, null, null, TimeSpan.Zero)); + + serviceClientMock.Verify(c => c.UploadBatchTestResults(It.IsAny()), Times.Once); + serviceClientMock.Verify(c => c.PostTestRunShardInfo(It.IsAny()), Times.Once); + consoleWriterMock.Verify(c => c.WriteLine("\nTest Report: " + _cloudRunMetadata.PortalUrl), Times.Once); + } + + [Test] + public void TestRunCompleteHandler_DisplaysMessagesOnEnd() + { + var loggerMock = new Mock(); + var dataProcessorMock = new Mock(); + var cloudRunErrorParserMock = new Mock(); + var serviceClientMock = new Mock(); + var consoleWriterMock = new Mock(); + var testProcessor = new TestProcessor(_cloudRunMetadata, _cIInfo, loggerMock.Object, dataProcessorMock.Object, cloudRunErrorParserMock.Object, serviceClientMock.Object, consoleWriterMock.Object); + var sender = new object(); + testProcessor._testRunShard = new TestRunShardDto(); + + var testResults = new List { }; + testProcessor.TestResults = testResults; + testProcessor.TestRunCompleteHandler(sender, new TestRunCompleteEventArgs(null, false, false, null, null, TimeSpan.Zero)); + + serviceClientMock.Verify(c => c.UploadBatchTestResults(It.IsAny()), Times.Once); + serviceClientMock.Verify(c => c.PostTestRunShardInfo(It.IsAny()), Times.Once); + consoleWriterMock.Verify(c => c.WriteLine("\nTest Report: " + _cloudRunMetadata.PortalUrl), Times.Once); + cloudRunErrorParserMock.Verify(c => c.DisplayMessages(), Times.Exactly(1)); + } + + [Test] + public void TestRunCompleteHandler_FatalExecutionSetToTrue_DisplaysMessagesOnEnd() + { + var loggerMock = new Mock(); + var dataProcessorMock = new Mock(); + var cloudRunErrorParserMock = new Mock(); + var serviceClientMock = new Mock(); + var consoleWriterMock = new Mock(); + var testProcessor = new TestProcessor(_cloudRunMetadata, _cIInfo, loggerMock.Object, dataProcessorMock.Object, cloudRunErrorParserMock.Object, serviceClientMock.Object, consoleWriterMock.Object); + var sender = new object(); + + testProcessor.FatalTestExecution = true; + + var testResults = new List { }; + testProcessor.TestResults = testResults; + testProcessor.TestRunCompleteHandler(sender, new TestRunCompleteEventArgs(null, false, false, null, null, TimeSpan.Zero)); + + serviceClientMock.Verify(c => c.UploadBatchTestResults(It.IsAny()), Times.Never); + serviceClientMock.Verify(c => c.UploadBatchTestResults(It.IsAny()), Times.Never); + serviceClientMock.Verify(c => c.PostTestRunShardInfo(It.IsAny()), Times.Never); + cloudRunErrorParserMock.Verify(c => c.DisplayMessages(), Times.Exactly(1)); + } + + [Test] + public void TestRunCompleteHandler_EnableResultPublishSetToFalse_DisplaysMessagesOnEnd() + { + var loggerMock = new Mock(); + var dataProcessorMock = new Mock(); + var cloudRunErrorParserMock = new Mock(); + var serviceClientMock = new Mock(); + var consoleWriterMock = new Mock(); + var testProcessor = new TestProcessor(_cloudRunMetadata, _cIInfo, loggerMock.Object, dataProcessorMock.Object, cloudRunErrorParserMock.Object, serviceClientMock.Object, consoleWriterMock.Object); + var sender = new object(); + + _cloudRunMetadata.EnableResultPublish = false; + + var testResults = new List { }; + testProcessor.TestResults = testResults; + testProcessor.TestRunCompleteHandler(sender, new TestRunCompleteEventArgs(null, false, false, null, null, TimeSpan.Zero)); + + serviceClientMock.Verify(c => c.UploadBatchTestResults(It.IsAny()), Times.Never); + serviceClientMock.Verify(c => c.UploadBatchTestResults(It.IsAny()), Times.Never); + serviceClientMock.Verify(c => c.PostTestRunShardInfo(It.IsAny()), Times.Never); + cloudRunErrorParserMock.Verify(c => c.DisplayMessages(), Times.Exactly(1)); + } + } +} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/tests/TestUtils.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/tests/TestUtils.cs new file mode 100644 index 000000000000..52308c93a16c --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/tests/TestUtils.cs @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.Linq; + +namespace Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Tests; + +public class TestUtils +{ + public static string GetPlaywrightServiceAPIEndpoint(string workspaceId, string region) + { + return $"https://{region}.api.playwright.microsoft.com/accounts/{workspaceId}/browsers"; + } + + public static string GetWorkspaceIdFromDashboardEndpoint(string dashboardEndpoint) + { + var parts = dashboardEndpoint.Split('/'); + return parts.Last(); + } +} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/tests/Utility/CiInfoProviderTests.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/tests/Utility/CiInfoProviderTests.cs new file mode 100644 index 000000000000..d78407b51652 --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/tests/Utility/CiInfoProviderTests.cs @@ -0,0 +1,256 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Model; +using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Utility; + +namespace Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Tests.Utility +{ + [TestFixture] + public class CiInfoProviderTests + { + private Dictionary _originalEnvironmentVariables = new(); + + [OneTimeSetUp] + public void Init() + { + _originalEnvironmentVariables = Environment.GetEnvironmentVariables() + .Cast() + .ToDictionary(entry => (string)entry.Key, entry => (string)entry.Value!)!; + } + + [SetUp] + public void Setup() + { + foreach (KeyValuePair kvp in _originalEnvironmentVariables) + { + Environment.SetEnvironmentVariable(kvp.Key, kvp.Value); + } + + var keysToRemove = Environment.GetEnvironmentVariables() + .Cast() + .Select(entry => (string)entry.Key) + .Where(key => key.StartsWith("github", StringComparison.OrdinalIgnoreCase) || key.StartsWith("gh", StringComparison.OrdinalIgnoreCase) || key.StartsWith("ado", StringComparison.OrdinalIgnoreCase) || key.StartsWith("azure", StringComparison.OrdinalIgnoreCase) || key.StartsWith("tf", StringComparison.OrdinalIgnoreCase)) + .ToList(); + + foreach (var key in keysToRemove) + { + Environment.SetEnvironmentVariable(key, null); // Remove environment variable + } + } + + [Test] + public void GetCIProvider_GitHubActions_ReturnsGitHubActions() + { + Environment.SetEnvironmentVariable("GITHUB_ACTIONS", "true"); + + string ciProvider = CiInfoProvider.GetCIProvider(); + + Assert.AreEqual(CIConstants.s_gITHUB_ACTIONS, ciProvider); + } + + [Test] + public void GetCIProvider_AzureDevOps_ReturnsAzureDevOps() + { + Environment.SetEnvironmentVariable("AZURE_HTTP_USER_AGENT", "some_value"); + Environment.SetEnvironmentVariable("TF_BUILD", "some_value"); + + string ciProvider = CiInfoProvider.GetCIProvider(); + + Assert.AreEqual(CIConstants.s_aZURE_DEVOPS, ciProvider); + } + + [Test] + public void GetCIProvider_Default_ReturnsDefault() + { + Environment.SetEnvironmentVariable("GITHUB_ACTIONS", null); + Environment.SetEnvironmentVariable("AZURE_HTTP_USER_AGENT", null); + Environment.SetEnvironmentVariable("TF_BUILD", null); + + string ciProvider = CiInfoProvider.GetCIProvider(); + + Assert.AreEqual(CIConstants.s_dEFAULT, ciProvider); + } + [Test] + public void GetCIInfo_GitHubActions_ReturnsGitHubActionsCIInfo() + { + Environment.SetEnvironmentVariable("GITHUB_ACTIONS", "true"); + Environment.SetEnvironmentVariable("GITHUB_REPOSITORY_ID", "repo_id"); + Environment.SetEnvironmentVariable("GITHUB_ACTOR", "actor"); + Environment.SetEnvironmentVariable("GITHUB_SHA", "commit_sha"); + Environment.SetEnvironmentVariable("GITHUB_SERVER_URL", "server_url"); + Environment.SetEnvironmentVariable("GITHUB_REPOSITORY", "repository"); + Environment.SetEnvironmentVariable("GITHUB_RUN_ID", "run_id"); + Environment.SetEnvironmentVariable("GITHUB_RUN_ATTEMPT", "1"); + Environment.SetEnvironmentVariable("GITHUB_JOB", "job_id"); + Environment.SetEnvironmentVariable("GITHUB_REF_NAME", "refs/heads/branch_name"); + Environment.SetEnvironmentVariable("GITHUB_HEAD_REF", "refs/heads/head_branch_name"); + + CIInfo ciInfo = CiInfoProvider.GetCIInfo(); + + Assert.AreEqual(CIConstants.s_gITHUB_ACTIONS, ciInfo.Provider); + Assert.AreEqual("repo_id", ciInfo.Repo); + Assert.AreEqual("refs/heads/branch_name", ciInfo.Branch); + Assert.AreEqual("actor", ciInfo.Author); + Assert.AreEqual("commit_sha", ciInfo.CommitId); + Assert.AreEqual("server_url/repository/commit/commit_sha", ciInfo.RevisionUrl); + Assert.AreEqual("run_id", ciInfo.RunId); + Assert.AreEqual(1, ciInfo.RunAttempt); + Assert.AreEqual("job_id", ciInfo.JobId); + } + + [Test] + public void GetCIInfo_GitHubActions_ReturnsGitHubActionsCIInfo_WithRefPrefixWhenEventNameIsPullRequest() + { + Environment.SetEnvironmentVariable("GITHUB_ACTIONS", "true"); + Environment.SetEnvironmentVariable("GITHUB_REPOSITORY_ID", "repo_id"); + Environment.SetEnvironmentVariable("GITHUB_ACTOR", "actor"); + Environment.SetEnvironmentVariable("GITHUB_SHA", "commit_sha"); + Environment.SetEnvironmentVariable("GITHUB_SERVER_URL", "server_url"); + Environment.SetEnvironmentVariable("GITHUB_REPOSITORY", "repository"); + Environment.SetEnvironmentVariable("GITHUB_RUN_ID", "run_id"); + Environment.SetEnvironmentVariable("GITHUB_RUN_ATTEMPT", "1"); + Environment.SetEnvironmentVariable("GITHUB_JOB", "job_id"); + Environment.SetEnvironmentVariable("GITHUB_REF", "refs/heads/feature/branch_name"); + Environment.SetEnvironmentVariable("GITHUB_HEAD_REF", "refs/heads/head_branch_name"); + Environment.SetEnvironmentVariable("GITHUB_EVENT_NAME", "pull_request"); + + CIInfo ciInfo = CiInfoProvider.GetCIInfo(); + + Assert.AreEqual(CIConstants.s_gITHUB_ACTIONS, ciInfo.Provider); + Assert.AreEqual("repo_id", ciInfo.Repo); + Assert.AreEqual("refs/heads/head_branch_name", ciInfo.Branch); + Assert.AreEqual("actor", ciInfo.Author); + Assert.AreEqual("commit_sha", ciInfo.CommitId); + Assert.AreEqual("server_url/repository/commit/commit_sha", ciInfo.RevisionUrl); + Assert.AreEqual("run_id", ciInfo.RunId); + Assert.AreEqual(1, ciInfo.RunAttempt); + Assert.AreEqual("job_id", ciInfo.JobId); + } + + [Test] + public void GetCIInfo_GitHubActions_ReturnsGitHubActionsCIInfo_WithRefPrefixWhenEventNameIsPullRequestTarget() + { + Environment.SetEnvironmentVariable("GITHUB_ACTIONS", "true"); + Environment.SetEnvironmentVariable("GITHUB_REPOSITORY_ID", "repo_id"); + Environment.SetEnvironmentVariable("GITHUB_ACTOR", "actor"); + Environment.SetEnvironmentVariable("GITHUB_SHA", "commit_sha"); + Environment.SetEnvironmentVariable("GITHUB_SERVER_URL", "server_url"); + Environment.SetEnvironmentVariable("GITHUB_REPOSITORY", "repository"); + Environment.SetEnvironmentVariable("GITHUB_RUN_ID", "run_id"); + Environment.SetEnvironmentVariable("GITHUB_RUN_ATTEMPT", "1"); + Environment.SetEnvironmentVariable("GITHUB_JOB", "job_id"); + Environment.SetEnvironmentVariable("GITHUB_REF", "refs/heads/feature/branch_name"); + Environment.SetEnvironmentVariable("GITHUB_HEAD_REF", "refs/heads/head_branch_name"); + Environment.SetEnvironmentVariable("GITHUB_EVENT_NAME", "pull_request_target"); + + CIInfo ciInfo = CiInfoProvider.GetCIInfo(); + + Assert.AreEqual(CIConstants.s_gITHUB_ACTIONS, ciInfo.Provider); + Assert.AreEqual("repo_id", ciInfo.Repo); + Assert.AreEqual("refs/heads/head_branch_name", ciInfo.Branch); + Assert.AreEqual("actor", ciInfo.Author); + Assert.AreEqual("commit_sha", ciInfo.CommitId); + Assert.AreEqual("server_url/repository/commit/commit_sha", ciInfo.RevisionUrl); + Assert.AreEqual("run_id", ciInfo.RunId); + Assert.AreEqual(1, ciInfo.RunAttempt); + Assert.AreEqual("job_id", ciInfo.JobId); + } + + [Test] + public void GetCIInfo_AzureDevOps_ReturnsAzureDevOpsCIInfo() + { + Environment.SetEnvironmentVariable("AZURE_HTTP_USER_AGENT", "some_value"); + Environment.SetEnvironmentVariable("TF_BUILD", "some_value"); + Environment.SetEnvironmentVariable("BUILD_REPOSITORY_ID", "repo_id"); + Environment.SetEnvironmentVariable("BUILD_SOURCEBRANCH", "branch_name"); + Environment.SetEnvironmentVariable("BUILD_REQUESTEDFOR", "author"); + Environment.SetEnvironmentVariable("BUILD_SOURCEVERSION", "commit_sha"); + Environment.SetEnvironmentVariable("SYSTEM_TEAMFOUNDATIONCOLLECTIONURI", "collection_uri/"); + Environment.SetEnvironmentVariable("SYSTEM_TEAMPROJECT", "team_project"); + Environment.SetEnvironmentVariable("BUILD_REPOSITORY_NAME", "repository_name"); + Environment.SetEnvironmentVariable("RELEASE_ATTEMPTNUMBER", "1"); + Environment.SetEnvironmentVariable("SYSTEM_JOBATTEMPT", "2"); + Environment.SetEnvironmentVariable("RELEASE_DEPLOYMENTID", "deployment_id"); + Environment.SetEnvironmentVariable("SYSTEM_DEFINITIONID", "definition_id"); + Environment.SetEnvironmentVariable("SYSTEM_JOBID", "job_id"); + + CIInfo ciInfo = CiInfoProvider.GetCIInfo(); + + Assert.AreEqual(CIConstants.s_aZURE_DEVOPS, ciInfo.Provider); + Assert.AreEqual("repo_id", ciInfo.Repo); + Assert.AreEqual("branch_name", ciInfo.Branch); + Assert.AreEqual("author", ciInfo.Author); + Assert.AreEqual("commit_sha", ciInfo.CommitId); + Assert.AreEqual("collection_uri/team_project/_git/repository_name/commit/commit_sha", ciInfo.RevisionUrl); + Assert.AreEqual("definition_id-job_id", ciInfo.RunId); + Assert.AreEqual(1, ciInfo.RunAttempt); + Assert.AreEqual("deployment_id", ciInfo.JobId); + } + + [Test] + public void GetCIInfo_AzureDevOpsWithReleaseInfo_ReturnsAzureDevOpsCIInfo() + { + Environment.SetEnvironmentVariable("AZURE_HTTP_USER_AGENT", "some_value"); + Environment.SetEnvironmentVariable("TF_BUILD", "some_value"); + Environment.SetEnvironmentVariable("BUILD_REPOSITORY_ID", "repo_id"); + Environment.SetEnvironmentVariable("BUILD_SOURCEBRANCH", "branch_name"); + Environment.SetEnvironmentVariable("BUILD_REQUESTEDFOR", "author"); + Environment.SetEnvironmentVariable("BUILD_SOURCEVERSION", "commit_sha"); + Environment.SetEnvironmentVariable("SYSTEM_TEAMFOUNDATIONCOLLECTIONURI", "collection_uri/"); + Environment.SetEnvironmentVariable("SYSTEM_TEAMPROJECT", "team_project"); + Environment.SetEnvironmentVariable("BUILD_REPOSITORY_NAME", "repository_name"); + Environment.SetEnvironmentVariable("RELEASE_ATTEMPTNUMBER", "1"); + Environment.SetEnvironmentVariable("SYSTEM_JOBATTEMPT", "2"); + Environment.SetEnvironmentVariable("RELEASE_DEPLOYMENTID", "deployment_id"); + Environment.SetEnvironmentVariable("SYSTEM_DEFINITIONID", "definition_id"); + Environment.SetEnvironmentVariable("SYSTEM_JOBID", "job_id"); + Environment.SetEnvironmentVariable("RELEASE_DEFINITIONID", "release-def"); + Environment.SetEnvironmentVariable("RELEASE_DEPLOYMENTID", "release-dep"); + + CIInfo ciInfo = CiInfoProvider.GetCIInfo(); + + Assert.AreEqual(CIConstants.s_aZURE_DEVOPS, ciInfo.Provider); + Assert.AreEqual("repo_id", ciInfo.Repo); + Assert.AreEqual("branch_name", ciInfo.Branch); + Assert.AreEqual("author", ciInfo.Author); + Assert.AreEqual("commit_sha", ciInfo.CommitId); + Assert.AreEqual("collection_uri/team_project/_git/repository_name/commit/commit_sha", ciInfo.RevisionUrl); + Assert.AreEqual("release-def-release-dep", ciInfo.RunId); + Assert.AreEqual(1, ciInfo.RunAttempt); + Assert.AreEqual("release-dep", ciInfo.JobId); + } + + [Test] + public void GetCIInfo_Default_ReturnsDefaultCIInfo() + { + Environment.SetEnvironmentVariable("GITHUB_ACTIONS", null); + Environment.SetEnvironmentVariable("AZURE_HTTP_USER_AGENT", null); + Environment.SetEnvironmentVariable("TF_BUILD", null); + Environment.SetEnvironmentVariable("REPO", "repo"); + Environment.SetEnvironmentVariable("BRANCH", "branch"); + Environment.SetEnvironmentVariable("AUTHOR", "author"); + Environment.SetEnvironmentVariable("COMMIT_ID", "commit_sha"); + Environment.SetEnvironmentVariable("REVISION_URL", "revision_url"); + Environment.SetEnvironmentVariable("RUN_ID", "run_id"); + Environment.SetEnvironmentVariable("RUN_ATTEMPT", "1"); + Environment.SetEnvironmentVariable("JOB_ID", "job_id"); + + CIInfo ciInfo = CiInfoProvider.GetCIInfo(); + + Assert.AreEqual(CIConstants.s_dEFAULT, ciInfo.Provider); + Assert.AreEqual("repo", ciInfo.Repo); + Assert.AreEqual("branch", ciInfo.Branch); + Assert.AreEqual("author", ciInfo.Author); + Assert.AreEqual("commit_sha", ciInfo.CommitId); + Assert.AreEqual("revision_url", ciInfo.RevisionUrl); + Assert.AreEqual("run_id", ciInfo.RunId); + Assert.AreEqual(1, ciInfo.RunAttempt); + Assert.AreEqual("job_id", ciInfo.JobId); + } + } +} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/tests/Utility/ReporterUtilsTests.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/tests/Utility/ReporterUtilsTests.cs new file mode 100644 index 000000000000..db7afd1d55e9 --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/tests/Utility/ReporterUtilsTests.cs @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Model; +using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Utility; +using Microsoft.IdentityModel.JsonWebTokens; +using Microsoft.IdentityModel.Tokens; +using Moq; +namespace Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Tests.Utility; + +[TestFixture] +public class ReporterUtilsTests +{ + private static string GetToken(Dictionary claims, DateTime? expires = null) + { + var tokenHandler = new JsonWebTokenHandler(); + var token = tokenHandler.CreateToken(new SecurityTokenDescriptor + { + Claims = claims, + Expires = expires ?? DateTime.UtcNow.AddMinutes(10), + }); + return token!; + } + + [Test] + public void IsTimeGreaterThanCurrentPlus10Minutes_ValidFutureSasUri_ReturnsTrue() + { + var reporterUtils = new ReporterUtils(); + string sasUri = "https://example.com/sas?se=" + DateTime.UtcNow.AddMinutes(15).ToString("o"); // 15 minutes in the future + bool result = reporterUtils.IsTimeGreaterThanCurrentPlus10Minutes(sasUri); + Assert.IsTrue(result); + } + + [Test] + public void IsTimeGreaterThanCurrentPlus10Minutes_ExpiredSasUri_ReturnsFalse() + { + var reporterUtils = new ReporterUtils(); + string sasUri = "https://example.com/sas?se=" + DateTime.UtcNow.AddMinutes(-5).ToString("o"); // 5 minutes in the past + bool result = reporterUtils.IsTimeGreaterThanCurrentPlus10Minutes(sasUri); + Assert.IsFalse(result); + } + + [Test] + public void IsTimeGreaterThanCurrentPlus10Minutes_InvalidSasUri_ReturnsFalse() + { + var reporterUtils = new ReporterUtils(); + string sasUri = "not_a_valid_sas_uri"; // Invalid SAS URI + bool result = reporterUtils.IsTimeGreaterThanCurrentPlus10Minutes(sasUri); + Assert.IsFalse(result); + } + + [Test] + public void ParseWorkspaceIdFromAccessToken_CustomToken_ReturnsTokenDetails() + { + var reporterUtils = new ReporterUtils(); + var accessToken = GetToken(new Dictionary + { + { "aid", "custom_aid" }, + { "oid", "custom_oid" }, + { "id", "custom_id" }, + { "name", "custom_username" }, + }); + + TokenDetails result = reporterUtils.ParseWorkspaceIdFromAccessToken(null, accessToken); + + Assert.AreEqual("custom_aid", result.aid); + Assert.AreEqual("custom_oid", result.oid); + Assert.AreEqual("custom_id", result.id); + Assert.AreEqual("custom_username", result.userName); + } + + [Test] + public void ParseWorkspaceIdFromAccessToken_EntraToken_ReturnsTokenDetails() + { + var reporterUtils = new ReporterUtils(); + var jsonWebTokenHandler = new JsonWebTokenHandler(); + var accessToken = GetToken(new Dictionary + { + { "oid", "entra_oid" }, + { "name", "entra_username" }, + }); + + TokenDetails result = reporterUtils.ParseWorkspaceIdFromAccessToken(jsonWebTokenHandler, accessToken); + + Assert.AreEqual("entra_oid", result.oid); + Assert.AreEqual(string.Empty, result.id); + Assert.AreEqual("entra_username", result.userName); + } + + [Test] + public void ParseWorkspaceIdFromAccessToken_NullToken_ThrowsArgumentNullException() + { + var reporterUtils = new ReporterUtils(); + var jsonWebTokenHandler = new JsonWebTokenHandler(); + string? accessToken = null; + + Assert.Throws(() => reporterUtils.ParseWorkspaceIdFromAccessToken(jsonWebTokenHandler, accessToken)); + } + + [Test] + public void ParseWorkspaceIdFromAccessToken_EmptyToken_ThrowsArgumentNullException() + { + var reporterUtils = new ReporterUtils(); + var jsonWebTokenHandler = new JsonWebTokenHandler(); + string accessToken = string.Empty; + + Assert.Throws(() => reporterUtils.ParseWorkspaceIdFromAccessToken(jsonWebTokenHandler, accessToken)); + } + [Test] + public void GetRunId_DefaultProvider_ReturnsNewGuid() + { + var cIInfo = new CIInfo { Provider = CIConstants.s_dEFAULT }; + var result = ReporterUtils.GetRunId(cIInfo); + Assert.IsNotNull(result); + Assert.IsTrue(Guid.TryParse(result, out _)); + } + + [Test] + public void GetRunId_NonDefaultProvider_ReturnsSha1Hash() + { + var cIInfo = new CIInfo { Provider = "NonDefaultProvider", Repo = "Repo", RunId = "RunId", RunAttempt = 1 }; + var expectedRunIdBeforeHash = $"{cIInfo.Provider}-{cIInfo.Repo}-{cIInfo.RunId}-{cIInfo.RunAttempt}"; + var result = ReporterUtils.GetRunId(cIInfo); + Assert.IsNotNull(result); + Assert.AreEqual(40, result.Length); + Assert.AreEqual(ReporterUtils.CalculateSha1Hash(expectedRunIdBeforeHash), result); + } + + [Test] + public void GetRunName_GitHubActionsPullRequest_ReturnsExpectedValue() + { + var ciInfo = new CIInfo { Provider = CIConstants.s_gITHUB_ACTIONS }; + Environment.SetEnvironmentVariable("GITHUB_EVENT_NAME", "pull_request"); + Environment.SetEnvironmentVariable("GITHUB_REF_NAME", "543/refs/merge"); + Environment.SetEnvironmentVariable("GITHUB_REPOSITORY", "owner/repo"); + + var result = ReporterUtils.GetRunName(ciInfo); + + var expected = "PR# 543 on Repo: owner/repo (owner/repo/pull/543)"; + Assert.AreEqual(expected, result); + } +} diff --git a/sdk/playwrighttesting/ci.yml b/sdk/playwrighttesting/ci.yml new file mode 100644 index 000000000000..d195957221d1 --- /dev/null +++ b/sdk/playwrighttesting/ci.yml @@ -0,0 +1,41 @@ +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. + +trigger: + branches: + include: + - main + - hotfix/* + - release/* + paths: + include: + - sdk/playwrighttesting/ + exclude: + - sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/ + +pr: + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/playwrighttesting/ + exclude: + - sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/ + +extends: + template: /eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: playwrighttesting + BuildSnippets: false + ArtifactName: packages + Artifacts: + - name: Azure.Developer.MicrosoftPlaywrightTesting.NUnit + safeName: AzureDeveloperMicrosoftPlaywrightTestingNUnit + - name: Azure.Developer.MicrosoftPlaywrightTesting.TestLogger + safeName: AzureDeveloperMicrosoftPlaywrightTestingTestLogger + + + diff --git a/sdk/playwrighttesting/test-resources.json b/sdk/playwrighttesting/test-resources.json new file mode 100644 index 000000000000..a1d088553b8d --- /dev/null +++ b/sdk/playwrighttesting/test-resources.json @@ -0,0 +1,47 @@ +{ + "$schema": "http://schema.management.azure.com/schemas/2019-08-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "baseName": { + "type": "string", + "defaultValue": "[resourceGroup().name]", + "metadata": { + "description": "The base resource name." + } + }, + "tenantId": { + "type": "string", + "defaultValue": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "metadata": { + "description": "The tenant ID to which the application and resources belong." + } + }, + "testApplicationOid": { + "type": "string", + "metadata": { + "description": "The client OID to grant access to test resources." + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "The location of the resource. By default, this is the same as the resource group." + } + } + }, + "resources": [ + { + "apiVersion": "2024-02-01-preview", + "name": "[parameters('baseName')]", + "location": "[parameters('location')]", + "type": "Microsoft.AzurePlaywrightService/accounts" + } + ], + "outputs": { + "DASHBOARD_ENDPOINT": { + "type": "string", + "value": "[reference(resourceId('Microsoft.AzurePlaywrightService/accounts', parameters('baseName'))).dashboardUri]" + } + } +} \ No newline at end of file diff --git a/sdk/playwrighttesting/tests.yml b/sdk/playwrighttesting/tests.yml new file mode 100644 index 000000000000..2a730f27c3ea --- /dev/null +++ b/sdk/playwrighttesting/tests.yml @@ -0,0 +1,8 @@ +trigger: none + +extends: + template: ../../eng/pipelines/templates/stages/archetype-sdk-tests.yml + parameters: + ServiceDirectory: playwrighttesting + SupportedClouds: 'Public' + Location: 'westus3' \ No newline at end of file diff --git a/sdk/privatedns/Azure.ResourceManager.PrivateDns/CHANGELOG.md b/sdk/privatedns/Azure.ResourceManager.PrivateDns/CHANGELOG.md index 2519ccfed166..4ad01aa7f6f2 100644 --- a/sdk/privatedns/Azure.ResourceManager.PrivateDns/CHANGELOG.md +++ b/sdk/privatedns/Azure.ResourceManager.PrivateDns/CHANGELOG.md @@ -4,6 +4,8 @@ ### Features Added +- Exposed `JsonModelWriteCore` for model serialization procedure. + ### Breaking Changes ### Bugs Fixed diff --git a/sdk/privatedns/Azure.ResourceManager.PrivateDns/api/Azure.ResourceManager.PrivateDns.netstandard2.0.cs b/sdk/privatedns/Azure.ResourceManager.PrivateDns/api/Azure.ResourceManager.PrivateDns.netstandard2.0.cs index 251c076d80ce..102cab18e216 100644 --- a/sdk/privatedns/Azure.ResourceManager.PrivateDns/api/Azure.ResourceManager.PrivateDns.netstandard2.0.cs +++ b/sdk/privatedns/Azure.ResourceManager.PrivateDns/api/Azure.ResourceManager.PrivateDns.netstandard2.0.cs @@ -388,6 +388,7 @@ public PrivateDnsZoneData(Azure.Core.AzureLocation location) { } public long? NumberOfVirtualNetworkLinks { get { throw null; } } public long? NumberOfVirtualNetworkLinksWithRegistration { get { throw null; } } public Azure.ResourceManager.PrivateDns.Models.PrivateDnsProvisioningState? PrivateDnsProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.PrivateDns.PrivateDnsZoneData 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.PrivateDns.PrivateDnsZoneData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -469,6 +470,7 @@ public VirtualNetworkLinkData(Azure.Core.AzureLocation location) { } public bool? RegistrationEnabled { get { throw null; } set { } } public Azure.Core.ResourceIdentifier VirtualNetworkId { get { throw null; } set { } } public Azure.ResourceManager.PrivateDns.Models.VirtualNetworkLinkState? VirtualNetworkLinkState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.PrivateDns.VirtualNetworkLinkData 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.PrivateDns.VirtualNetworkLinkData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -544,6 +546,7 @@ public partial class PrivateDnsAaaaRecordInfo : System.ClientModel.Primitives.IJ { public PrivateDnsAaaaRecordInfo() { } public System.Net.IPAddress IPv6Address { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.PrivateDns.Models.PrivateDnsAaaaRecordInfo 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.PrivateDns.Models.PrivateDnsAaaaRecordInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -554,6 +557,7 @@ public partial class PrivateDnsARecordInfo : System.ClientModel.Primitives.IJson { public PrivateDnsARecordInfo() { } public System.Net.IPAddress IPv4Address { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.PrivateDns.Models.PrivateDnsARecordInfo 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.PrivateDns.Models.PrivateDnsARecordInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -565,6 +569,7 @@ public partial class PrivateDnsMXRecordInfo : System.ClientModel.Primitives.IJso public PrivateDnsMXRecordInfo() { } public string Exchange { get { throw null; } set { } } public int? Preference { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.PrivateDns.Models.PrivateDnsMXRecordInfo 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.PrivateDns.Models.PrivateDnsMXRecordInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -597,6 +602,7 @@ public partial class PrivateDnsPtrRecordInfo : System.ClientModel.Primitives.IJs { public PrivateDnsPtrRecordInfo() { } public string PtrDomainName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.PrivateDns.Models.PrivateDnsPtrRecordInfo 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.PrivateDns.Models.PrivateDnsPtrRecordInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -631,6 +637,7 @@ public PrivateDnsSoaRecordInfo() { } public long? RefreshTimeInSeconds { get { throw null; } set { } } public long? RetryTimeInSeconds { get { throw null; } set { } } public long? SerialNumber { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.PrivateDns.Models.PrivateDnsSoaRecordInfo 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.PrivateDns.Models.PrivateDnsSoaRecordInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -644,6 +651,7 @@ public PrivateDnsSrvRecordInfo() { } public int? Priority { get { throw null; } set { } } public string Target { get { throw null; } set { } } public int? Weight { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.PrivateDns.Models.PrivateDnsSrvRecordInfo 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.PrivateDns.Models.PrivateDnsSrvRecordInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -654,6 +662,7 @@ public partial class PrivateDnsTxtRecordInfo : System.ClientModel.Primitives.IJs { public PrivateDnsTxtRecordInfo() { } public System.Collections.Generic.IList Values { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.PrivateDns.Models.PrivateDnsTxtRecordInfo 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.PrivateDns.Models.PrivateDnsTxtRecordInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } diff --git a/sdk/privatedns/Azure.ResourceManager.PrivateDns/assets.json b/sdk/privatedns/Azure.ResourceManager.PrivateDns/assets.json index e18e119f03a6..6116559b391e 100644 --- a/sdk/privatedns/Azure.ResourceManager.PrivateDns/assets.json +++ b/sdk/privatedns/Azure.ResourceManager.PrivateDns/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/privatedns/Azure.ResourceManager.PrivateDns", - "Tag": "net/privatedns/Azure.ResourceManager.PrivateDns_07db91e484" + "Tag": "net/privatedns/Azure.ResourceManager.PrivateDns_cf27f609fe" } diff --git a/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/Extensions/MockablePrivateDnsArmClient.cs b/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/Extensions/MockablePrivateDnsArmClient.cs index fd7de58379f1..5c9ae25f4397 100644 --- a/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/Extensions/MockablePrivateDnsArmClient.cs +++ b/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/Extensions/MockablePrivateDnsArmClient.cs @@ -36,7 +36,7 @@ private string GetApiVersionOrNull(ResourceType resourceType) /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// You can use to create a from its components. /// /// The resource ID of the resource to get. /// Returns a object. @@ -60,7 +60,7 @@ public virtual VirtualNetworkLinkResource GetVirtualNetworkLinkResource(Resource /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// You can use to create a from its components. /// /// The resource ID of the resource to get. /// Returns a object. @@ -72,7 +72,7 @@ public virtual PrivateDnsARecordResource GetPrivateDnsARecordResource(ResourceId /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// You can use to create a from its components. /// /// The resource ID of the resource to get. /// Returns a object. @@ -84,7 +84,7 @@ public virtual PrivateDnsAaaaRecordResource GetPrivateDnsAaaaRecordResource(Reso /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// You can use to create a from its components. /// /// The resource ID of the resource to get. /// Returns a object. @@ -96,7 +96,7 @@ public virtual PrivateDnsCnameRecordResource GetPrivateDnsCnameRecordResource(Re /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// You can use to create a from its components. /// /// The resource ID of the resource to get. /// Returns a object. @@ -108,7 +108,7 @@ public virtual PrivateDnsMXRecordResource GetPrivateDnsMXRecordResource(Resource /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// You can use to create a from its components. /// /// The resource ID of the resource to get. /// Returns a object. @@ -120,7 +120,7 @@ public virtual PrivateDnsPtrRecordResource GetPrivateDnsPtrRecordResource(Resour /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// You can use to create a from its components. /// /// The resource ID of the resource to get. /// Returns a object. @@ -132,7 +132,7 @@ public virtual PrivateDnsSoaRecordResource GetPrivateDnsSoaRecordResource(Resour /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// You can use to create a from its components. /// /// The resource ID of the resource to get. /// Returns a object. @@ -144,7 +144,7 @@ public virtual PrivateDnsSrvRecordResource GetPrivateDnsSrvRecordResource(Resour /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// You can use to create a from its components. /// /// The resource ID of the resource to get. /// Returns a object. diff --git a/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/Extensions/PrivateDnsExtensions.cs b/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/Extensions/PrivateDnsExtensions.cs index 7ccf5d7c68dd..e41b73eac99f 100644 --- a/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/Extensions/PrivateDnsExtensions.cs +++ b/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/Extensions/PrivateDnsExtensions.cs @@ -34,7 +34,7 @@ private static MockablePrivateDnsSubscriptionResource GetMockablePrivateDnsSubsc /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// You can use to create a from its components. /// /// Mocking /// To mock this method, please mock instead. @@ -72,7 +72,7 @@ public static VirtualNetworkLinkResource GetVirtualNetworkLinkResource(this ArmC /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// You can use to create a from its components. /// /// Mocking /// To mock this method, please mock instead. @@ -91,7 +91,7 @@ public static PrivateDnsARecordResource GetPrivateDnsARecordResource(this ArmCli /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// You can use to create a from its components. /// /// Mocking /// To mock this method, please mock instead. @@ -110,7 +110,7 @@ public static PrivateDnsAaaaRecordResource GetPrivateDnsAaaaRecordResource(this /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// You can use to create a from its components. /// /// Mocking /// To mock this method, please mock instead. @@ -129,7 +129,7 @@ public static PrivateDnsCnameRecordResource GetPrivateDnsCnameRecordResource(thi /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// You can use to create a from its components. /// /// Mocking /// To mock this method, please mock instead. @@ -148,7 +148,7 @@ public static PrivateDnsMXRecordResource GetPrivateDnsMXRecordResource(this ArmC /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// You can use to create a from its components. /// /// Mocking /// To mock this method, please mock instead. @@ -167,7 +167,7 @@ public static PrivateDnsPtrRecordResource GetPrivateDnsPtrRecordResource(this Ar /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// You can use to create a from its components. /// /// Mocking /// To mock this method, please mock instead. @@ -186,7 +186,7 @@ public static PrivateDnsSoaRecordResource GetPrivateDnsSoaRecordResource(this Ar /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// You can use to create a from its components. /// /// Mocking /// To mock this method, please mock instead. @@ -205,7 +205,7 @@ public static PrivateDnsSrvRecordResource GetPrivateDnsSrvRecordResource(this Ar /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// You can use to create a from its components. /// /// Mocking /// To mock this method, please mock instead. diff --git a/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/Models/PrivateDnsARecordInfo.Serialization.cs b/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/Models/PrivateDnsARecordInfo.Serialization.cs index 7819d9ff25f6..0ee252aae055 100644 --- a/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/Models/PrivateDnsARecordInfo.Serialization.cs +++ b/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/Models/PrivateDnsARecordInfo.Serialization.cs @@ -20,6 +20,15 @@ public partial class PrivateDnsARecordInfo : IUtf8JsonSerializable, IJsonModel

    ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(PrivateDnsARecordInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IPv4Address)) { writer.WritePropertyName("ipv4Address"u8); @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } PrivateDnsARecordInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/Models/PrivateDnsAaaaRecordInfo.Serialization.cs b/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/Models/PrivateDnsAaaaRecordInfo.Serialization.cs index 220e9c12ee94..42408eb03521 100644 --- a/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/Models/PrivateDnsAaaaRecordInfo.Serialization.cs +++ b/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/Models/PrivateDnsAaaaRecordInfo.Serialization.cs @@ -20,6 +20,15 @@ public partial class PrivateDnsAaaaRecordInfo : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(PrivateDnsAaaaRecordInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IPv6Address)) { writer.WritePropertyName("ipv6Address"u8); @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } PrivateDnsAaaaRecordInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/Models/PrivateDnsCnameRecordInfo.Serialization.cs b/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/Models/PrivateDnsCnameRecordInfo.Serialization.cs index de8a0a153aa4..019d68e34700 100644 --- a/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/Models/PrivateDnsCnameRecordInfo.Serialization.cs +++ b/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/Models/PrivateDnsCnameRecordInfo.Serialization.cs @@ -19,6 +19,15 @@ internal partial class PrivateDnsCnameRecordInfo : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(PrivateDnsCnameRecordInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Cname)) { writer.WritePropertyName("cname"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } PrivateDnsCnameRecordInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/Models/PrivateDnsMXRecordInfo.Serialization.cs b/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/Models/PrivateDnsMXRecordInfo.Serialization.cs index 37cc341f4c0f..d8c64f2009a4 100644 --- a/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/Models/PrivateDnsMXRecordInfo.Serialization.cs +++ b/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/Models/PrivateDnsMXRecordInfo.Serialization.cs @@ -19,6 +19,15 @@ public partial class PrivateDnsMXRecordInfo : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(PrivateDnsMXRecordInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Preference)) { writer.WritePropertyName("preference"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } PrivateDnsMXRecordInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/Models/PrivateDnsPtrRecordInfo.Serialization.cs b/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/Models/PrivateDnsPtrRecordInfo.Serialization.cs index 7a25a41d3e64..e0ff88fdca3c 100644 --- a/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/Models/PrivateDnsPtrRecordInfo.Serialization.cs +++ b/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/Models/PrivateDnsPtrRecordInfo.Serialization.cs @@ -19,6 +19,15 @@ public partial class PrivateDnsPtrRecordInfo : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(PrivateDnsPtrRecordInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(PtrDomainName)) { writer.WritePropertyName("ptrdname"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } PrivateDnsPtrRecordInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/Models/PrivateDnsRecordListResult.Serialization.cs b/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/Models/PrivateDnsRecordListResult.Serialization.cs index b84e66471c24..4655c33530a4 100644 --- a/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/Models/PrivateDnsRecordListResult.Serialization.cs +++ b/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/Models/PrivateDnsRecordListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class PrivateDnsRecordListResult : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(PrivateDnsRecordListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } PrivateDnsRecordListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/Models/PrivateDnsSoaRecordInfo.Serialization.cs b/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/Models/PrivateDnsSoaRecordInfo.Serialization.cs index 342abb4275d7..260648b49651 100644 --- a/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/Models/PrivateDnsSoaRecordInfo.Serialization.cs +++ b/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/Models/PrivateDnsSoaRecordInfo.Serialization.cs @@ -19,6 +19,15 @@ public partial class PrivateDnsSoaRecordInfo : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(PrivateDnsSoaRecordInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Host)) { writer.WritePropertyName("host"u8); @@ -77,7 +85,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } PrivateDnsSoaRecordInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/Models/PrivateDnsSrvRecordInfo.Serialization.cs b/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/Models/PrivateDnsSrvRecordInfo.Serialization.cs index 3121ec46f32e..74d0a70fdfb8 100644 --- a/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/Models/PrivateDnsSrvRecordInfo.Serialization.cs +++ b/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/Models/PrivateDnsSrvRecordInfo.Serialization.cs @@ -19,6 +19,15 @@ public partial class PrivateDnsSrvRecordInfo : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(PrivateDnsSrvRecordInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Priority)) { writer.WritePropertyName("priority"u8); @@ -62,7 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } PrivateDnsSrvRecordInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/Models/PrivateDnsTxtRecordInfo.Serialization.cs b/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/Models/PrivateDnsTxtRecordInfo.Serialization.cs index d7ddc39816dc..9b1b0b5ba7c5 100644 --- a/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/Models/PrivateDnsTxtRecordInfo.Serialization.cs +++ b/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/Models/PrivateDnsTxtRecordInfo.Serialization.cs @@ -20,6 +20,15 @@ public partial class PrivateDnsTxtRecordInfo : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(PrivateDnsTxtRecordInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Values)) { writer.WritePropertyName("value"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } PrivateDnsTxtRecordInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/Models/PrivateZoneListResult.Serialization.cs b/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/Models/PrivateZoneListResult.Serialization.cs index d24bb406f940..b0c6fcc77d10 100644 --- a/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/Models/PrivateZoneListResult.Serialization.cs +++ b/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/Models/PrivateZoneListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class PrivateZoneListResult : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(PrivateZoneListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } PrivateZoneListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/Models/VirtualNetworkLinkListResult.Serialization.cs b/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/Models/VirtualNetworkLinkListResult.Serialization.cs index 3ee49705d687..5d2bee8b7012 100644 --- a/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/Models/VirtualNetworkLinkListResult.Serialization.cs +++ b/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/Models/VirtualNetworkLinkListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class VirtualNetworkLinkListResult : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(VirtualNetworkLinkListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } VirtualNetworkLinkListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/PrivateDnsZoneData.Serialization.cs b/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/PrivateDnsZoneData.Serialization.cs index 4e4b4afaccad..0b43055ed167 100644 --- a/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/PrivateDnsZoneData.Serialization.cs +++ b/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/PrivateDnsZoneData.Serialization.cs @@ -22,6 +22,15 @@ public partial class PrivateDnsZoneData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -29,45 +38,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(PrivateDnsZoneData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(MaxNumberOfRecords)) @@ -111,22 +87,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStringValue(InternalId); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } PrivateDnsZoneData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/VirtualNetworkLinkData.Serialization.cs b/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/VirtualNetworkLinkData.Serialization.cs index 3d411c2255d2..f9d612f9894f 100644 --- a/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/VirtualNetworkLinkData.Serialization.cs +++ b/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/VirtualNetworkLinkData.Serialization.cs @@ -23,6 +23,15 @@ public partial class VirtualNetworkLinkData : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -30,45 +39,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(VirtualNetworkLinkData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(VirtualNetwork)) @@ -97,22 +73,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader writer.WriteStringValue(PrivateDnsProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } VirtualNetworkLinkData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/autorest.md b/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/autorest.md index c7043f5f2cd2..6d2b59ee3af7 100644 --- a/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/autorest.md +++ b/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/autorest.md @@ -20,6 +20,7 @@ skip-csproj: true modelerfour: flatten-payloads: false use-model-reader-writer: true +use-write-core: true enable-bicep-serialization: true #mgmt-debug: diff --git a/sdk/provisioning/Azure.Provisioning.AppConfiguration/api/Azure.Provisioning.AppConfiguration.netstandard2.0.cs b/sdk/provisioning/Azure.Provisioning.AppConfiguration/api/Azure.Provisioning.AppConfiguration.netstandard2.0.cs index 56e63438a057..ab2952ac500e 100644 --- a/sdk/provisioning/Azure.Provisioning.AppConfiguration/api/Azure.Provisioning.AppConfiguration.netstandard2.0.cs +++ b/sdk/provisioning/Azure.Provisioning.AppConfiguration/api/Azure.Provisioning.AppConfiguration.netstandard2.0.cs @@ -30,9 +30,9 @@ public enum AppConfigurationCreateMode Recover = 0, Default = 1, } - public partial class AppConfigurationKeyValue : Azure.Provisioning.Primitives.Resource + public partial class AppConfigurationKeyValue : Azure.Provisioning.Primitives.ProvisionableResource { - public AppConfigurationKeyValue(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public AppConfigurationKeyValue(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue ContentType { get { throw null; } set { } } public Azure.Provisioning.BicepValue ETag { get { throw null; } } public Azure.Provisioning.BicepValue Id { get { throw null; } } @@ -45,7 +45,7 @@ public partial class AppConfigurationKeyValue : Azure.Provisioning.Primitives.Re public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } public Azure.Provisioning.BicepValue Value { get { throw null; } set { } } - public static Azure.Provisioning.AppConfiguration.AppConfigurationKeyValue FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.AppConfiguration.AppConfigurationKeyValue FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2022_05_01; @@ -53,15 +53,15 @@ public static partial class ResourceVersions public static readonly string V2024_05_01; } } - public partial class AppConfigurationKeyVaultProperties : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class AppConfigurationKeyVaultProperties : Azure.Provisioning.Primitives.ProvisionableConstruct { public AppConfigurationKeyVaultProperties() { } public Azure.Provisioning.BicepValue IdentityClientId { get { throw null; } set { } } public Azure.Provisioning.BicepValue KeyIdentifier { get { throw null; } set { } } } - public partial class AppConfigurationPrivateEndpointConnection : Azure.Provisioning.Primitives.Resource + public partial class AppConfigurationPrivateEndpointConnection : Azure.Provisioning.Primitives.ProvisionableResource { - public AppConfigurationPrivateEndpointConnection(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public AppConfigurationPrivateEndpointConnection(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue ConnectionState { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } @@ -69,7 +69,7 @@ public partial class AppConfigurationPrivateEndpointConnection : Azure.Provision public Azure.Provisioning.BicepValue PrivateEndpointId { get { throw null; } set { } } public Azure.Provisioning.BicepValue ProvisioningState { get { throw null; } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.AppConfiguration.AppConfigurationPrivateEndpointConnection FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.AppConfiguration.AppConfigurationPrivateEndpointConnection FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2019_10_01; @@ -79,7 +79,7 @@ public static partial class ResourceVersions public static readonly string V2024_05_01; } } - public partial class AppConfigurationPrivateEndpointConnectionReference : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class AppConfigurationPrivateEndpointConnectionReference : Azure.Provisioning.Primitives.ProvisionableConstruct { public AppConfigurationPrivateEndpointConnectionReference() { } public Azure.Provisioning.BicepValue ConnectionState { get { throw null; } } @@ -89,7 +89,7 @@ public AppConfigurationPrivateEndpointConnectionReference() { } public Azure.Provisioning.BicepValue ProvisioningState { get { throw null; } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } } - public partial class AppConfigurationPrivateLinkServiceConnectionState : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class AppConfigurationPrivateLinkServiceConnectionState : Azure.Provisioning.Primitives.ProvisionableConstruct { public AppConfigurationPrivateLinkServiceConnectionState() { } public Azure.Provisioning.BicepValue ActionsRequired { get { throw null; } } @@ -117,9 +117,9 @@ public enum AppConfigurationPublicNetworkAccess Enabled = 0, Disabled = 1, } - public partial class AppConfigurationReplica : Azure.Provisioning.Primitives.Resource + public partial class AppConfigurationReplica : Azure.Provisioning.Primitives.ProvisionableResource { - public AppConfigurationReplica(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public AppConfigurationReplica(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Endpoint { get { throw null; } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Location { get { throw null; } set { } } @@ -127,7 +127,7 @@ public partial class AppConfigurationReplica : Azure.Provisioning.Primitives.Res public Azure.Provisioning.AppConfiguration.AppConfigurationStore? Parent { get { throw null; } set { } } public Azure.Provisioning.BicepValue ProvisioningState { get { throw null; } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.AppConfiguration.AppConfigurationReplica FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.AppConfiguration.AppConfigurationReplica FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override Azure.Provisioning.Primitives.ResourceNameRequirements GetResourceNameRequirements() { throw null; } public static partial class ResourceVersions @@ -144,9 +144,9 @@ public enum AppConfigurationReplicaProvisioningState Failed = 3, Canceled = 4, } - public partial class AppConfigurationStore : Azure.Provisioning.Primitives.Resource + public partial class AppConfigurationStore : Azure.Provisioning.Primitives.ProvisionableResource { - public AppConfigurationStore(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public AppConfigurationStore(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue CreatedOn { get { throw null; } } public Azure.Provisioning.BicepValue CreateMode { get { throw null; } set { } } public Azure.Provisioning.BicepValue DisableLocalAuth { get { throw null; } set { } } @@ -164,9 +164,9 @@ public partial class AppConfigurationStore : Azure.Provisioning.Primitives.Resou public Azure.Provisioning.BicepValue SoftDeleteRetentionInDays { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } - public Azure.Provisioning.Authorization.RoleAssignment CreateRoleAssignment(Azure.Provisioning.AppConfiguration.AppConfigurationBuiltInRole role, Azure.Provisioning.BicepValue principalType, Azure.Provisioning.BicepValue principalId, string? identifierNameSuffix = null) { throw null; } + public Azure.Provisioning.Authorization.RoleAssignment CreateRoleAssignment(Azure.Provisioning.AppConfiguration.AppConfigurationBuiltInRole role, Azure.Provisioning.BicepValue principalType, Azure.Provisioning.BicepValue principalId, string? bicepIdentifierSuffix = null) { throw null; } public Azure.Provisioning.Authorization.RoleAssignment CreateRoleAssignment(Azure.Provisioning.AppConfiguration.AppConfigurationBuiltInRole role, Azure.Provisioning.Roles.UserAssignedIdentity identity) { throw null; } - public static Azure.Provisioning.AppConfiguration.AppConfigurationStore FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.AppConfiguration.AppConfigurationStore FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public Azure.Provisioning.BicepList GetKeys() { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override Azure.Provisioning.Primitives.ResourceNameRequirements GetResourceNameRequirements() { throw null; } @@ -179,7 +179,7 @@ public static partial class ResourceVersions public static readonly string V2024_05_01; } } - public partial class AppConfigurationStoreApiKey : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class AppConfigurationStoreApiKey : Azure.Provisioning.Primitives.ProvisionableConstruct { public AppConfigurationStoreApiKey() { } public Azure.Provisioning.BicepValue ConnectionString { get { throw null; } } @@ -189,6 +189,6 @@ public AppConfigurationStoreApiKey() { } public Azure.Provisioning.BicepValue Name { get { throw null; } } public Azure.Provisioning.BicepValue Value { get { throw null; } } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public static Azure.Provisioning.AppConfiguration.AppConfigurationStoreApiKey FromExpression(Azure.Provisioning.Expressions.Expression expression) { throw null; } + public static Azure.Provisioning.AppConfiguration.AppConfigurationStoreApiKey FromExpression(Azure.Provisioning.Expressions.BicepExpression expression) { throw null; } } } diff --git a/sdk/provisioning/Azure.Provisioning.AppConfiguration/src/Generated/AppConfigurationKeyValue.cs b/sdk/provisioning/Azure.Provisioning.AppConfiguration/src/Generated/AppConfigurationKeyValue.cs index 2fe7e5547b92..c51ec3487e77 100644 --- a/sdk/provisioning/Azure.Provisioning.AppConfiguration/src/Generated/AppConfigurationKeyValue.cs +++ b/sdk/provisioning/Azure.Provisioning.AppConfiguration/src/Generated/AppConfigurationKeyValue.cs @@ -17,7 +17,7 @@ namespace Azure.Provisioning.AppConfiguration; ///

    /// AppConfigurationKeyValue. /// -public partial class AppConfigurationKeyValue : Resource +public partial class AppConfigurationKeyValue : ProvisionableResource { /// /// Identifier of key and label combination. Key and label are joined by $ @@ -103,15 +103,15 @@ public partial class AppConfigurationKeyValue : Resource /// /// Creates a new AppConfigurationKeyValue. /// - /// + /// /// The the Bicep identifier name of the AppConfigurationKeyValue resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, /// numbers, and underscores. /// /// Version of the AppConfigurationKeyValue. - public AppConfigurationKeyValue(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.AppConfiguration/configurationStores/keyValues", resourceVersion ?? "2024-05-01") + public AppConfigurationKeyValue(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.AppConfiguration/configurationStores/keyValues", resourceVersion ?? "2024-05-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _contentType = BicepValue.DefineProperty(this, "ContentType", ["properties", "contentType"]); @@ -151,7 +151,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing AppConfigurationKeyValue. /// - /// + /// /// The the Bicep identifier name of the AppConfigurationKeyValue resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, @@ -159,6 +159,6 @@ public static class ResourceVersions /// /// Version of the AppConfigurationKeyValue. /// The existing AppConfigurationKeyValue resource. - public static AppConfigurationKeyValue FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static AppConfigurationKeyValue FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.AppConfiguration/src/Generated/AppConfigurationPrivateEndpointConnection.cs b/sdk/provisioning/Azure.Provisioning.AppConfiguration/src/Generated/AppConfigurationPrivateEndpointConnection.cs index 99145fd3efb0..22c4f66ec7e7 100644 --- a/sdk/provisioning/Azure.Provisioning.AppConfiguration/src/Generated/AppConfigurationPrivateEndpointConnection.cs +++ b/sdk/provisioning/Azure.Provisioning.AppConfiguration/src/Generated/AppConfigurationPrivateEndpointConnection.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.AppConfiguration; /// /// AppConfigurationPrivateEndpointConnection. /// -public partial class AppConfigurationPrivateEndpointConnection : Resource +public partial class AppConfigurationPrivateEndpointConnection : ProvisionableResource { /// /// Private endpoint connection name. @@ -63,7 +63,7 @@ public partial class AppConfigurationPrivateEndpointConnection : Resource /// /// Creates a new AppConfigurationPrivateEndpointConnection. /// - /// + /// /// The the Bicep identifier name of the /// AppConfigurationPrivateEndpointConnection resource. This can be used /// to refer to the resource in expressions, but is not the Azure name of @@ -71,8 +71,8 @@ public partial class AppConfigurationPrivateEndpointConnection : Resource /// underscores. /// /// Version of the AppConfigurationPrivateEndpointConnection. - public AppConfigurationPrivateEndpointConnection(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.AppConfiguration/configurationStores/privateEndpointConnections", resourceVersion ?? "2024-05-01") + public AppConfigurationPrivateEndpointConnection(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.AppConfiguration/configurationStores/privateEndpointConnections", resourceVersion ?? "2024-05-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _connectionState = BicepValue.DefineProperty(this, "ConnectionState", ["properties", "privateLinkServiceConnectionState"]); @@ -118,7 +118,7 @@ public static class ResourceVersions /// Creates a reference to an existing /// AppConfigurationPrivateEndpointConnection. /// - /// + /// /// The the Bicep identifier name of the /// AppConfigurationPrivateEndpointConnection resource. This can be used /// to refer to the resource in expressions, but is not the Azure name of @@ -127,6 +127,6 @@ public static class ResourceVersions /// /// Version of the AppConfigurationPrivateEndpointConnection. /// The existing AppConfigurationPrivateEndpointConnection resource. - public static AppConfigurationPrivateEndpointConnection FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static AppConfigurationPrivateEndpointConnection FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.AppConfiguration/src/Generated/AppConfigurationReplica.cs b/sdk/provisioning/Azure.Provisioning.AppConfiguration/src/Generated/AppConfigurationReplica.cs index 0f1952598b51..53c5c4c67832 100644 --- a/sdk/provisioning/Azure.Provisioning.AppConfiguration/src/Generated/AppConfigurationReplica.cs +++ b/sdk/provisioning/Azure.Provisioning.AppConfiguration/src/Generated/AppConfigurationReplica.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.AppConfiguration; /// /// AppConfigurationReplica. /// -public partial class AppConfigurationReplica : Resource +public partial class AppConfigurationReplica : ProvisionableResource { /// /// The name of the replica. @@ -63,15 +63,15 @@ public partial class AppConfigurationReplica : Resource /// /// Creates a new AppConfigurationReplica. /// - /// + /// /// The the Bicep identifier name of the AppConfigurationReplica resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, /// numbers, and underscores. /// /// Version of the AppConfigurationReplica. - public AppConfigurationReplica(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.AppConfiguration/configurationStores/replicas", resourceVersion ?? "2024-05-01") + public AppConfigurationReplica(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.AppConfiguration/configurationStores/replicas", resourceVersion ?? "2024-05-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _location = BicepValue.DefineProperty(this, "Location", ["location"]); @@ -101,7 +101,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing AppConfigurationReplica. /// - /// + /// /// The the Bicep identifier name of the AppConfigurationReplica resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, @@ -109,8 +109,8 @@ public static class ResourceVersions /// /// Version of the AppConfigurationReplica. /// The existing AppConfigurationReplica resource. - public static AppConfigurationReplica FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static AppConfigurationReplica FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; /// /// Get the requirements for naming this AppConfigurationReplica resource. diff --git a/sdk/provisioning/Azure.Provisioning.AppConfiguration/src/Generated/AppConfigurationStore.cs b/sdk/provisioning/Azure.Provisioning.AppConfiguration/src/Generated/AppConfigurationStore.cs index e5b86080ef72..7775710ab674 100644 --- a/sdk/provisioning/Azure.Provisioning.AppConfiguration/src/Generated/AppConfigurationStore.cs +++ b/sdk/provisioning/Azure.Provisioning.AppConfiguration/src/Generated/AppConfigurationStore.cs @@ -20,7 +20,7 @@ namespace Azure.Provisioning.AppConfiguration; /// /// AppConfigurationStore. /// -public partial class AppConfigurationStore : Resource +public partial class AppConfigurationStore : ProvisionableResource { /// /// The name of the configuration store. @@ -131,15 +131,15 @@ public partial class AppConfigurationStore : Resource /// /// Creates a new AppConfigurationStore. /// - /// + /// /// The the Bicep identifier name of the AppConfigurationStore resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, /// numbers, and underscores. /// /// Version of the AppConfigurationStore. - public AppConfigurationStore(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.AppConfiguration/configurationStores", resourceVersion ?? "2024-05-01") + public AppConfigurationStore(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.AppConfiguration/configurationStores", resourceVersion ?? "2024-05-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _location = BicepValue.DefineProperty(this, "Location", ["location"], isRequired: true); @@ -194,7 +194,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing AppConfigurationStore. /// - /// + /// /// The the Bicep identifier name of the AppConfigurationStore resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, @@ -202,8 +202,8 @@ public static class ResourceVersions /// /// Version of the AppConfigurationStore. /// The existing AppConfigurationStore resource. - public static AppConfigurationStore FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static AppConfigurationStore FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; /// /// Get the requirements for naming this AppConfigurationStore resource. @@ -220,7 +220,7 @@ public override ResourceNameRequirements GetResourceNameRequirements() => public BicepList GetKeys() => BicepList.FromExpression( AppConfigurationStoreApiKey.FromExpression, - new MemberExpression(new FunctionCallExpression(new MemberExpression(new IdentifierExpression(IdentifierName), "listKeys")), "keys")); + new MemberExpression(new FunctionCallExpression(new MemberExpression(new IdentifierExpression(BicepIdentifier), "listKeys")), "keys")); /// /// Creates a role assignment for a user-assigned identity that grants @@ -230,10 +230,10 @@ public BicepList GetKeys() => /// The . /// The . public RoleAssignment CreateRoleAssignment(AppConfigurationBuiltInRole role, UserAssignedIdentity identity) => - new($"{IdentifierName}_{identity.IdentifierName}_{AppConfigurationBuiltInRole.GetBuiltInRoleName(role)}") + new($"{BicepIdentifier}_{identity.BicepIdentifier}_{AppConfigurationBuiltInRole.GetBuiltInRoleName(role)}") { Name = BicepFunction.CreateGuid(Id, identity.PrincipalId, BicepFunction.GetSubscriptionResourceId("Microsoft.Authorization/roleDefinitions", role.ToString())), - Scope = new IdentifierExpression(IdentifierName), + Scope = new IdentifierExpression(BicepIdentifier), PrincipalType = RoleManagementPrincipalType.ServicePrincipal, RoleDefinitionId = BicepFunction.GetSubscriptionResourceId("Microsoft.Authorization/roleDefinitions", role.ToString()), PrincipalId = identity.PrincipalId @@ -246,13 +246,13 @@ public RoleAssignment CreateRoleAssignment(AppConfigurationBuiltInRole role, Use /// The role to grant. /// The type of the principal to assign to. /// The principal to assign to. - /// Optional role assignment identifier name suffix. + /// Optional role assignment identifier name suffix. /// The . - public RoleAssignment CreateRoleAssignment(AppConfigurationBuiltInRole role, BicepValue principalType, BicepValue principalId, string? identifierNameSuffix = default) => - new($"{IdentifierName}_{AppConfigurationBuiltInRole.GetBuiltInRoleName(role)}{(identifierNameSuffix is null ? "" : "_")}{identifierNameSuffix}") + public RoleAssignment CreateRoleAssignment(AppConfigurationBuiltInRole role, BicepValue principalType, BicepValue principalId, string? bicepIdentifierSuffix = default) => + new($"{BicepIdentifier}_{AppConfigurationBuiltInRole.GetBuiltInRoleName(role)}{(bicepIdentifierSuffix is null ? "" : "_")}{bicepIdentifierSuffix}") { Name = BicepFunction.CreateGuid(Id, principalId, BicepFunction.GetSubscriptionResourceId("Microsoft.Authorization/roleDefinitions", role.ToString())), - Scope = new IdentifierExpression(IdentifierName), + Scope = new IdentifierExpression(BicepIdentifier), PrincipalType = principalType, RoleDefinitionId = BicepFunction.GetSubscriptionResourceId("Microsoft.Authorization/roleDefinitions", role.ToString()), PrincipalId = principalId diff --git a/sdk/provisioning/Azure.Provisioning.AppConfiguration/src/Generated/Models/AppConfigurationKeyVaultProperties.cs b/sdk/provisioning/Azure.Provisioning.AppConfiguration/src/Generated/Models/AppConfigurationKeyVaultProperties.cs index edd0bd63c45a..6c2782cc6138 100644 --- a/sdk/provisioning/Azure.Provisioning.AppConfiguration/src/Generated/Models/AppConfigurationKeyVaultProperties.cs +++ b/sdk/provisioning/Azure.Provisioning.AppConfiguration/src/Generated/Models/AppConfigurationKeyVaultProperties.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.AppConfiguration; /// /// Settings concerning key vault encryption for a configuration store. /// -public partial class AppConfigurationKeyVaultProperties : ProvisioningConstruct +public partial class AppConfigurationKeyVaultProperties : ProvisionableConstruct { /// /// The URI of the key vault key used to encrypt data. diff --git a/sdk/provisioning/Azure.Provisioning.AppConfiguration/src/Generated/Models/AppConfigurationPrivateEndpointConnectionReference.cs b/sdk/provisioning/Azure.Provisioning.AppConfiguration/src/Generated/Models/AppConfigurationPrivateEndpointConnectionReference.cs index cf74c8672734..f88a6c36c219 100644 --- a/sdk/provisioning/Azure.Provisioning.AppConfiguration/src/Generated/Models/AppConfigurationPrivateEndpointConnectionReference.cs +++ b/sdk/provisioning/Azure.Provisioning.AppConfiguration/src/Generated/Models/AppConfigurationPrivateEndpointConnectionReference.cs @@ -13,7 +13,7 @@ namespace Azure.Provisioning.AppConfiguration; /// /// A reference to a related private endpoint connection. /// -public partial class AppConfigurationPrivateEndpointConnectionReference : ProvisioningConstruct +public partial class AppConfigurationPrivateEndpointConnectionReference : ProvisionableConstruct { /// /// The provisioning status of the private endpoint connection. diff --git a/sdk/provisioning/Azure.Provisioning.AppConfiguration/src/Generated/Models/AppConfigurationPrivateLinkServiceConnectionState.cs b/sdk/provisioning/Azure.Provisioning.AppConfiguration/src/Generated/Models/AppConfigurationPrivateLinkServiceConnectionState.cs index f1b358ef1464..a6aa3c4bffc4 100644 --- a/sdk/provisioning/Azure.Provisioning.AppConfiguration/src/Generated/Models/AppConfigurationPrivateLinkServiceConnectionState.cs +++ b/sdk/provisioning/Azure.Provisioning.AppConfiguration/src/Generated/Models/AppConfigurationPrivateLinkServiceConnectionState.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.AppConfiguration; /// /// The state of a private link service connection. /// -public partial class AppConfigurationPrivateLinkServiceConnectionState : ProvisioningConstruct +public partial class AppConfigurationPrivateLinkServiceConnectionState : ProvisionableConstruct { /// /// The private link service connection status. diff --git a/sdk/provisioning/Azure.Provisioning.AppConfiguration/src/Generated/Models/AppConfigurationStoreApiKey.cs b/sdk/provisioning/Azure.Provisioning.AppConfiguration/src/Generated/Models/AppConfigurationStoreApiKey.cs index 89f867aa5faf..2da1b73c819e 100644 --- a/sdk/provisioning/Azure.Provisioning.AppConfiguration/src/Generated/Models/AppConfigurationStoreApiKey.cs +++ b/sdk/provisioning/Azure.Provisioning.AppConfiguration/src/Generated/Models/AppConfigurationStoreApiKey.cs @@ -13,7 +13,7 @@ namespace Azure.Provisioning.AppConfiguration; /// /// An API key used for authenticating with a configuration store endpoint. /// -public partial class AppConfigurationStoreApiKey : ProvisioningConstruct +public partial class AppConfigurationStoreApiKey : ProvisionableConstruct { /// /// The key ID. @@ -75,7 +75,7 @@ public AppConfigurationStoreApiKey() /// /// A AppConfigurationStoreApiKey resource. [EditorBrowsable(EditorBrowsableState.Never)] - public static AppConfigurationStoreApiKey FromExpression(Expression expression) + public static AppConfigurationStoreApiKey FromExpression(BicepExpression expression) { AppConfigurationStoreApiKey resource = new(); resource.OverrideWithExpression(expression); diff --git a/sdk/provisioning/Azure.Provisioning.AppContainers/api/Azure.Provisioning.AppContainers.netstandard2.0.cs b/sdk/provisioning/Azure.Provisioning.AppContainers/api/Azure.Provisioning.AppContainers.netstandard2.0.cs index 852b189f04f3..856fdacbaea1 100644 --- a/sdk/provisioning/Azure.Provisioning.AppContainers/api/Azure.Provisioning.AppContainers.netstandard2.0.cs +++ b/sdk/provisioning/Azure.Provisioning.AppContainers/api/Azure.Provisioning.AppContainers.netstandard2.0.cs @@ -1,6 +1,6 @@ namespace Azure.Provisioning.AppContainers { - public partial class AppContainerResources : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class AppContainerResources : Azure.Provisioning.Primitives.ProvisionableConstruct { public AppContainerResources() { } public Azure.Provisioning.BicepValue Cpu { get { throw null; } set { } } @@ -28,9 +28,9 @@ public AppContainerResources() { } public static bool operator !=(Azure.Provisioning.AppContainers.AppContainersBuiltInRole left, Azure.Provisioning.AppContainers.AppContainersBuiltInRole right) { throw null; } public override string ToString() { throw null; } } - public partial class ContainerApp : Azure.Provisioning.Primitives.Resource + public partial class ContainerApp : Azure.Provisioning.Primitives.ProvisionableResource { - public ContainerApp(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public ContainerApp(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Configuration { get { throw null; } set { } } public Azure.Provisioning.BicepValue CustomDomainVerificationId { get { throw null; } } public Azure.Provisioning.BicepValue EnvironmentId { get { throw null; } set { } } @@ -51,7 +51,7 @@ public partial class ContainerApp : Azure.Provisioning.Primitives.Resource public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } public Azure.Provisioning.BicepValue Template { get { throw null; } set { } } public Azure.Provisioning.BicepValue WorkloadProfileName { get { throw null; } set { } } - public static Azure.Provisioning.AppContainers.ContainerApp FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.AppContainers.ContainerApp FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override Azure.Provisioning.Primitives.ResourceNameRequirements GetResourceNameRequirements() { throw null; } public static partial class ResourceVersions @@ -60,7 +60,6 @@ public static partial class ResourceVersions public static readonly string V2022_10_01; public static readonly string V2023_05_01; public static readonly string V2024_03_01; - public static readonly string V2024_08_02_preview; } } public enum ContainerAppAccessMode @@ -73,28 +72,28 @@ public enum ContainerAppActiveRevisionsMode Multiple = 0, Single = 1, } - public partial class ContainerAppAllowedPrincipals : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerAppAllowedPrincipals : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerAppAllowedPrincipals() { } public Azure.Provisioning.BicepList Groups { get { throw null; } set { } } public Azure.Provisioning.BicepList Identities { get { throw null; } set { } } } - public partial class ContainerAppAppleConfiguration : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerAppAppleConfiguration : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerAppAppleConfiguration() { } public Azure.Provisioning.BicepValue IsEnabled { get { throw null; } set { } } public Azure.Provisioning.BicepList LoginScopes { get { throw null; } set { } } public Azure.Provisioning.BicepValue Registration { get { throw null; } set { } } } - public partial class ContainerAppAppleRegistrationConfiguration : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerAppAppleRegistrationConfiguration : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerAppAppleRegistrationConfiguration() { } public Azure.Provisioning.BicepValue ClientId { get { throw null; } set { } } public Azure.Provisioning.BicepValue ClientSecretSettingName { get { throw null; } set { } } } - public partial class ContainerAppAuthConfig : Azure.Provisioning.Primitives.Resource + public partial class ContainerAppAuthConfig : Azure.Provisioning.Primitives.ProvisionableResource { - public ContainerAppAuthConfig(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public ContainerAppAuthConfig(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue EncryptionSettings { get { throw null; } set { } } public Azure.Provisioning.BicepValue GlobalValidation { get { throw null; } set { } } public Azure.Provisioning.BicepValue HttpSettings { get { throw null; } set { } } @@ -105,23 +104,22 @@ public partial class ContainerAppAuthConfig : Azure.Provisioning.Primitives.Reso public Azure.Provisioning.AppContainers.ContainerApp? Parent { get { throw null; } set { } } public Azure.Provisioning.BicepValue Platform { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.AppContainers.ContainerAppAuthConfig FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.AppContainers.ContainerAppAuthConfig FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2022_03_01; public static readonly string V2022_10_01; public static readonly string V2023_05_01; public static readonly string V2024_03_01; - public static readonly string V2024_08_02_preview; } } - public partial class ContainerAppAuthPlatform : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerAppAuthPlatform : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerAppAuthPlatform() { } public Azure.Provisioning.BicepValue IsEnabled { get { throw null; } set { } } public Azure.Provisioning.BicepValue RuntimeVersion { get { throw null; } set { } } } - public partial class ContainerAppAzureActiveDirectoryConfiguration : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerAppAzureActiveDirectoryConfiguration : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerAppAzureActiveDirectoryConfiguration() { } public Azure.Provisioning.BicepValue IsAutoProvisioned { get { throw null; } set { } } @@ -130,13 +128,13 @@ public ContainerAppAzureActiveDirectoryConfiguration() { } public Azure.Provisioning.BicepValue Registration { get { throw null; } set { } } public Azure.Provisioning.BicepValue Validation { get { throw null; } set { } } } - public partial class ContainerAppAzureActiveDirectoryLoginConfiguration : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerAppAzureActiveDirectoryLoginConfiguration : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerAppAzureActiveDirectoryLoginConfiguration() { } public Azure.Provisioning.BicepValue IsWwwAuthenticationDisabled { get { throw null; } set { } } public Azure.Provisioning.BicepList LoginParameters { get { throw null; } set { } } } - public partial class ContainerAppAzureActiveDirectoryRegistrationConfiguration : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerAppAzureActiveDirectoryRegistrationConfiguration : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerAppAzureActiveDirectoryRegistrationConfiguration() { } public Azure.Provisioning.BicepValue ClientId { get { throw null; } set { } } @@ -146,14 +144,14 @@ public ContainerAppAzureActiveDirectoryRegistrationConfiguration() { } public Azure.Provisioning.BicepValue ClientSecretSettingName { get { throw null; } set { } } public Azure.Provisioning.BicepValue OpenIdIssuer { get { throw null; } set { } } } - public partial class ContainerAppAzureActiveDirectoryValidationConfiguration : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerAppAzureActiveDirectoryValidationConfiguration : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerAppAzureActiveDirectoryValidationConfiguration() { } public Azure.Provisioning.BicepList AllowedAudiences { get { throw null; } set { } } public Azure.Provisioning.BicepValue DefaultAuthorizationPolicy { get { throw null; } set { } } public Azure.Provisioning.BicepValue JwtClaimChecks { get { throw null; } set { } } } - public partial class ContainerAppAzureFileProperties : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerAppAzureFileProperties : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerAppAzureFileProperties() { } public Azure.Provisioning.BicepValue AccessMode { get { throw null; } set { } } @@ -161,13 +159,13 @@ public ContainerAppAzureFileProperties() { } public Azure.Provisioning.BicepValue AccountName { get { throw null; } set { } } public Azure.Provisioning.BicepValue ShareName { get { throw null; } set { } } } - public partial class ContainerAppAzureStaticWebAppsConfiguration : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerAppAzureStaticWebAppsConfiguration : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerAppAzureStaticWebAppsConfiguration() { } public Azure.Provisioning.BicepValue IsEnabled { get { throw null; } set { } } public Azure.Provisioning.BicepValue RegistrationClientId { get { throw null; } set { } } } - public partial class ContainerAppCertificateProperties : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerAppCertificateProperties : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerAppCertificateProperties() { } public Azure.Provisioning.BicepValue ExpireOn { get { throw null; } } @@ -190,13 +188,13 @@ public enum ContainerAppCertificateProvisioningState DeleteFailed = 3, Pending = 4, } - public partial class ContainerAppClientRegistration : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerAppClientRegistration : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerAppClientRegistration() { } public Azure.Provisioning.BicepValue ClientId { get { throw null; } set { } } public Azure.Provisioning.BicepValue ClientSecretSettingName { get { throw null; } set { } } } - public partial class ContainerAppConfiguration : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerAppConfiguration : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerAppConfiguration() { } public Azure.Provisioning.BicepValue ActiveRevisionsMode { get { throw null; } set { } } @@ -207,9 +205,9 @@ public ContainerAppConfiguration() { } public Azure.Provisioning.BicepList Secrets { get { throw null; } set { } } public Azure.Provisioning.BicepValue ServiceType { get { throw null; } set { } } } - public partial class ContainerAppConnectedEnvironment : Azure.Provisioning.Primitives.Resource + public partial class ContainerAppConnectedEnvironment : Azure.Provisioning.Primitives.ProvisionableResource { - public ContainerAppConnectedEnvironment(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public ContainerAppConnectedEnvironment(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue CustomDomainConfiguration { get { throw null; } set { } } public Azure.Provisioning.BicepValue DaprAIConnectionString { get { throw null; } set { } } public Azure.Provisioning.BicepValue DefaultDomain { get { throw null; } } @@ -222,18 +220,17 @@ public partial class ContainerAppConnectedEnvironment : Azure.Provisioning.Primi public Azure.Provisioning.BicepValue StaticIP { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } - public static Azure.Provisioning.AppContainers.ContainerAppConnectedEnvironment FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.AppContainers.ContainerAppConnectedEnvironment FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2022_10_01; public static readonly string V2023_05_01; public static readonly string V2024_03_01; - public static readonly string V2024_08_02_preview; } } - public partial class ContainerAppConnectedEnvironmentCertificate : Azure.Provisioning.Primitives.Resource + public partial class ContainerAppConnectedEnvironmentCertificate : Azure.Provisioning.Primitives.ProvisionableResource { - public ContainerAppConnectedEnvironmentCertificate(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public ContainerAppConnectedEnvironmentCertificate(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Location { get { throw null; } set { } } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } @@ -241,18 +238,17 @@ public partial class ContainerAppConnectedEnvironmentCertificate : Azure.Provisi public Azure.Provisioning.BicepValue Properties { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } - public static Azure.Provisioning.AppContainers.ContainerAppConnectedEnvironmentCertificate FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.AppContainers.ContainerAppConnectedEnvironmentCertificate FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2022_10_01; public static readonly string V2023_05_01; public static readonly string V2024_03_01; - public static readonly string V2024_08_02_preview; } } - public partial class ContainerAppConnectedEnvironmentDaprComponent : Azure.Provisioning.Primitives.Resource + public partial class ContainerAppConnectedEnvironmentDaprComponent : Azure.Provisioning.Primitives.ProvisionableResource { - public ContainerAppConnectedEnvironmentDaprComponent(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public ContainerAppConnectedEnvironmentDaprComponent(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue ComponentType { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue IgnoreErrors { get { throw null; } set { } } @@ -265,13 +261,12 @@ public partial class ContainerAppConnectedEnvironmentDaprComponent : Azure.Provi public Azure.Provisioning.BicepValue SecretStoreComponent { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepValue Version { get { throw null; } set { } } - public static Azure.Provisioning.AppContainers.ContainerAppConnectedEnvironmentDaprComponent FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.AppContainers.ContainerAppConnectedEnvironmentDaprComponent FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2022_10_01; public static readonly string V2023_05_01; public static readonly string V2024_03_01; - public static readonly string V2024_08_02_preview; } } public enum ContainerAppConnectedEnvironmentProvisioningState @@ -285,24 +280,23 @@ public enum ContainerAppConnectedEnvironmentProvisioningState InfrastructureSetupComplete = 6, ScheduledForDelete = 7, } - public partial class ContainerAppConnectedEnvironmentStorage : Azure.Provisioning.Primitives.Resource + public partial class ContainerAppConnectedEnvironmentStorage : Azure.Provisioning.Primitives.ProvisionableResource { - public ContainerAppConnectedEnvironmentStorage(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public ContainerAppConnectedEnvironmentStorage(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue ConnectedEnvironmentStorageAzureFile { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } public Azure.Provisioning.AppContainers.ContainerAppConnectedEnvironment? Parent { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.AppContainers.ContainerAppConnectedEnvironmentStorage FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.AppContainers.ContainerAppConnectedEnvironmentStorage FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2022_10_01; public static readonly string V2023_05_01; public static readonly string V2024_03_01; - public static readonly string V2024_08_02_preview; } } - public partial class ContainerAppContainer : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerAppContainer : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerAppContainer() { } public Azure.Provisioning.BicepList Args { get { throw null; } set { } } @@ -314,7 +308,7 @@ public ContainerAppContainer() { } public Azure.Provisioning.BicepValue Resources { get { throw null; } set { } } public Azure.Provisioning.BicepList VolumeMounts { get { throw null; } set { } } } - public partial class ContainerAppCookieExpiration : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerAppCookieExpiration : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerAppCookieExpiration() { } public Azure.Provisioning.BicepValue Convention { get { throw null; } set { } } @@ -325,7 +319,7 @@ public enum ContainerAppCookieExpirationConvention FixedTime = 0, IdentityProviderDerived = 1, } - public partial class ContainerAppCorsPolicy : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerAppCorsPolicy : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerAppCorsPolicy() { } public Azure.Provisioning.BicepValue AllowCredentials { get { throw null; } set { } } @@ -335,7 +329,7 @@ public ContainerAppCorsPolicy() { } public Azure.Provisioning.BicepList ExposeHeaders { get { throw null; } set { } } public Azure.Provisioning.BicepValue MaxAge { get { throw null; } set { } } } - public partial class ContainerAppCredentials : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerAppCredentials : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerAppCredentials() { } public Azure.Provisioning.BicepValue ClientId { get { throw null; } set { } } @@ -344,7 +338,7 @@ public ContainerAppCredentials() { } public Azure.Provisioning.BicepValue SubscriptionId { get { throw null; } set { } } public Azure.Provisioning.BicepValue TenantId { get { throw null; } set { } } } - public partial class ContainerAppCustomDomain : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerAppCustomDomain : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerAppCustomDomain() { } public Azure.Provisioning.BicepValue BindingType { get { throw null; } set { } } @@ -356,7 +350,7 @@ public enum ContainerAppCustomDomainBindingType Disabled = 0, SniEnabled = 1, } - public partial class ContainerAppCustomDomainConfiguration : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerAppCustomDomainConfiguration : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerAppCustomDomainConfiguration() { } public Azure.Provisioning.BicepValue CertificatePassword { get { throw null; } set { } } @@ -367,21 +361,21 @@ public ContainerAppCustomDomainConfiguration() { } public Azure.Provisioning.BicepValue SubjectName { get { throw null; } } public Azure.Provisioning.BicepValue Thumbprint { get { throw null; } } } - public partial class ContainerAppCustomOpenIdConnectProviderConfiguration : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerAppCustomOpenIdConnectProviderConfiguration : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerAppCustomOpenIdConnectProviderConfiguration() { } public Azure.Provisioning.BicepValue IsEnabled { get { throw null; } set { } } public Azure.Provisioning.BicepValue Login { get { throw null; } set { } } public Azure.Provisioning.BicepValue Registration { get { throw null; } set { } } } - public partial class ContainerAppCustomScaleRule : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerAppCustomScaleRule : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerAppCustomScaleRule() { } public Azure.Provisioning.BicepList Auth { get { throw null; } set { } } public Azure.Provisioning.BicepValue CustomScaleRuleType { get { throw null; } set { } } public Azure.Provisioning.BicepDictionary Metadata { get { throw null; } set { } } } - public partial class ContainerAppDaprConfiguration : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerAppDaprConfiguration : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerAppDaprConfiguration() { } public Azure.Provisioning.BicepValue AppId { get { throw null; } set { } } @@ -404,14 +398,14 @@ public enum ContainerAppDaprLogLevel [System.Runtime.Serialization.DataMemberAttribute(Name="error")] Error = 3, } - public partial class ContainerAppDaprMetadata : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerAppDaprMetadata : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerAppDaprMetadata() { } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } public Azure.Provisioning.BicepValue SecretRef { get { throw null; } set { } } public Azure.Provisioning.BicepValue Value { get { throw null; } set { } } } - public partial class ContainerAppDefaultAuthorizationPolicy : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerAppDefaultAuthorizationPolicy : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerAppDefaultAuthorizationPolicy() { } public Azure.Provisioning.BicepList AllowedApplications { get { throw null; } set { } } @@ -430,14 +424,14 @@ public enum ContainerAppEnvironmentProvisioningState UpgradeRequested = 8, UpgradeFailed = 9, } - public partial class ContainerAppEnvironmentVariable : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerAppEnvironmentVariable : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerAppEnvironmentVariable() { } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } public Azure.Provisioning.BicepValue SecretRef { get { throw null; } set { } } public Azure.Provisioning.BicepValue Value { get { throw null; } set { } } } - public partial class ContainerAppExtendedLocation : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerAppExtendedLocation : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerAppExtendedLocation() { } public Azure.Provisioning.BicepValue ExtendedLocationType { get { throw null; } set { } } @@ -447,7 +441,7 @@ public enum ContainerAppExtendedLocationType { CustomLocation = 0, } - public partial class ContainerAppFacebookConfiguration : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerAppFacebookConfiguration : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerAppFacebookConfiguration() { } public Azure.Provisioning.BicepValue GraphApiVersion { get { throw null; } set { } } @@ -455,7 +449,7 @@ public ContainerAppFacebookConfiguration() { } public Azure.Provisioning.BicepList LoginScopes { get { throw null; } set { } } public Azure.Provisioning.BicepValue Registration { get { throw null; } set { } } } - public partial class ContainerAppForwardProxy : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerAppForwardProxy : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerAppForwardProxy() { } public Azure.Provisioning.BicepValue Convention { get { throw null; } set { } } @@ -468,7 +462,7 @@ public enum ContainerAppForwardProxyConvention Standard = 1, Custom = 2, } - public partial class ContainerAppGitHubActionConfiguration : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerAppGitHubActionConfiguration : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerAppGitHubActionConfiguration() { } public Azure.Provisioning.BicepValue AzureCredentials { get { throw null; } set { } } @@ -481,21 +475,21 @@ public ContainerAppGitHubActionConfiguration() { } public Azure.Provisioning.BicepValue RuntimeStack { get { throw null; } set { } } public Azure.Provisioning.BicepValue RuntimeVersion { get { throw null; } set { } } } - public partial class ContainerAppGitHubConfiguration : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerAppGitHubConfiguration : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerAppGitHubConfiguration() { } public Azure.Provisioning.BicepValue IsEnabled { get { throw null; } set { } } public Azure.Provisioning.BicepList LoginScopes { get { throw null; } set { } } public Azure.Provisioning.BicepValue Registration { get { throw null; } set { } } } - public partial class ContainerAppGlobalValidation : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerAppGlobalValidation : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerAppGlobalValidation() { } public Azure.Provisioning.BicepList ExcludedPaths { get { throw null; } set { } } public Azure.Provisioning.BicepValue RedirectToProvider { get { throw null; } set { } } public Azure.Provisioning.BicepValue UnauthenticatedClientAction { get { throw null; } set { } } } - public partial class ContainerAppGoogleConfiguration : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerAppGoogleConfiguration : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerAppGoogleConfiguration() { } public Azure.Provisioning.BicepValue IsEnabled { get { throw null; } set { } } @@ -503,13 +497,13 @@ public ContainerAppGoogleConfiguration() { } public Azure.Provisioning.BicepValue Registration { get { throw null; } set { } } public Azure.Provisioning.BicepList ValidationAllowedAudiences { get { throw null; } set { } } } - public partial class ContainerAppHttpHeaderInfo : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerAppHttpHeaderInfo : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerAppHttpHeaderInfo() { } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } public Azure.Provisioning.BicepValue Value { get { throw null; } set { } } } - public partial class ContainerAppHttpRequestInfo : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerAppHttpRequestInfo : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerAppHttpRequestInfo() { } public Azure.Provisioning.BicepValue Host { get { throw null; } set { } } @@ -518,7 +512,7 @@ public ContainerAppHttpRequestInfo() { } public Azure.Provisioning.BicepValue Port { get { throw null; } set { } } public Azure.Provisioning.BicepValue Scheme { get { throw null; } set { } } } - public partial class ContainerAppHttpScaleRule : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerAppHttpScaleRule : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerAppHttpScaleRule() { } public Azure.Provisioning.BicepList Auth { get { throw null; } set { } } @@ -531,14 +525,14 @@ public enum ContainerAppHttpScheme [System.Runtime.Serialization.DataMemberAttribute(Name="HTTPS")] Https = 1, } - public partial class ContainerAppHttpSettings : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerAppHttpSettings : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerAppHttpSettings() { } public Azure.Provisioning.BicepValue ForwardProxy { get { throw null; } set { } } public Azure.Provisioning.BicepValue RequireHttps { get { throw null; } set { } } public Azure.Provisioning.BicepValue RoutesApiPrefix { get { throw null; } set { } } } - public partial class ContainerAppIdentityProvidersConfiguration : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerAppIdentityProvidersConfiguration : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerAppIdentityProvidersConfiguration() { } public Azure.Provisioning.BicepValue Apple { get { throw null; } set { } } @@ -559,7 +553,7 @@ public enum ContainerAppIngressClientCertificateMode [System.Runtime.Serialization.DataMemberAttribute(Name="require")] Require = 2, } - public partial class ContainerAppIngressConfiguration : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerAppIngressConfiguration : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerAppIngressConfiguration() { } public Azure.Provisioning.BicepList AdditionalPortMappings { get { throw null; } set { } } @@ -587,7 +581,7 @@ public enum ContainerAppIngressTransportMethod [System.Runtime.Serialization.DataMemberAttribute(Name="tcp")] Tcp = 3, } - public partial class ContainerAppInitContainer : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerAppInitContainer : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerAppInitContainer() { } public Azure.Provisioning.BicepList Args { get { throw null; } set { } } @@ -603,7 +597,7 @@ public enum ContainerAppIPRuleAction Allow = 0, Deny = 1, } - public partial class ContainerAppIPSecurityRestrictionRule : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerAppIPSecurityRestrictionRule : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerAppIPSecurityRestrictionRule() { } public Azure.Provisioning.BicepValue Action { get { throw null; } set { } } @@ -611,9 +605,9 @@ public ContainerAppIPSecurityRestrictionRule() { } public Azure.Provisioning.BicepValue IPAddressRange { get { throw null; } set { } } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } } - public partial class ContainerAppJob : Azure.Provisioning.Primitives.Resource + public partial class ContainerAppJob : Azure.Provisioning.Primitives.ProvisionableResource { - public ContainerAppJob(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public ContainerAppJob(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Configuration { get { throw null; } set { } } public Azure.Provisioning.BicepValue EnvironmentId { get { throw null; } set { } } public Azure.Provisioning.BicepValue EventStreamEndpoint { get { throw null; } } @@ -627,15 +621,14 @@ public partial class ContainerAppJob : Azure.Provisioning.Primitives.Resource public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } public Azure.Provisioning.BicepValue Template { get { throw null; } set { } } public Azure.Provisioning.BicepValue WorkloadProfileName { get { throw null; } set { } } - public static Azure.Provisioning.AppContainers.ContainerAppJob FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.AppContainers.ContainerAppJob FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2023_05_01; public static readonly string V2024_03_01; - public static readonly string V2024_08_02_preview; } } - public partial class ContainerAppJobConfiguration : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerAppJobConfiguration : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerAppJobConfiguration() { } public Azure.Provisioning.BicepValue EventTriggerConfig { get { throw null; } set { } } @@ -655,7 +648,7 @@ public enum ContainerAppJobProvisioningState Canceled = 3, Deleting = 4, } - public partial class ContainerAppJobScale : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerAppJobScale : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerAppJobScale() { } public Azure.Provisioning.BicepValue MaxExecutions { get { throw null; } set { } } @@ -663,7 +656,7 @@ public ContainerAppJobScale() { } public Azure.Provisioning.BicepValue PollingIntervalInSeconds { get { throw null; } set { } } public Azure.Provisioning.BicepList Rules { get { throw null; } set { } } } - public partial class ContainerAppJobScaleRule : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerAppJobScaleRule : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerAppJobScaleRule() { } public Azure.Provisioning.BicepList Auth { get { throw null; } set { } } @@ -671,7 +664,7 @@ public ContainerAppJobScaleRule() { } public Azure.Provisioning.BicepValue Metadata { get { throw null; } set { } } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } } - public partial class ContainerAppJobTemplate : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerAppJobTemplate : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerAppJobTemplate() { } public Azure.Provisioning.BicepList Containers { get { throw null; } set { } } @@ -684,19 +677,19 @@ public enum ContainerAppJobTriggerType Event = 1, Manual = 2, } - public partial class ContainerAppJwtClaimChecks : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerAppJwtClaimChecks : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerAppJwtClaimChecks() { } public Azure.Provisioning.BicepList AllowedClientApplications { get { throw null; } set { } } public Azure.Provisioning.BicepList AllowedGroups { get { throw null; } set { } } } - public partial class ContainerAppLogAnalyticsConfiguration : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerAppLogAnalyticsConfiguration : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerAppLogAnalyticsConfiguration() { } public Azure.Provisioning.BicepValue CustomerId { get { throw null; } set { } } public Azure.Provisioning.BicepValue SharedKey { get { throw null; } set { } } } - public partial class ContainerAppLogin : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerAppLogin : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerAppLogin() { } public Azure.Provisioning.BicepList AllowedExternalRedirectUrls { get { throw null; } set { } } @@ -706,21 +699,21 @@ public ContainerAppLogin() { } public Azure.Provisioning.BicepValue RoutesLogoutEndpoint { get { throw null; } set { } } public Azure.Provisioning.BicepValue TokenStore { get { throw null; } set { } } } - public partial class ContainerAppLoginNonce : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerAppLoginNonce : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerAppLoginNonce() { } public Azure.Provisioning.BicepValue NonceExpirationInterval { get { throw null; } set { } } public Azure.Provisioning.BicepValue ValidateNonce { get { throw null; } set { } } } - public partial class ContainerAppLogsConfiguration : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerAppLogsConfiguration : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerAppLogsConfiguration() { } public Azure.Provisioning.BicepValue Destination { get { throw null; } set { } } public Azure.Provisioning.BicepValue LogAnalyticsConfiguration { get { throw null; } set { } } } - public partial class ContainerAppManagedCertificate : Azure.Provisioning.Primitives.Resource + public partial class ContainerAppManagedCertificate : Azure.Provisioning.Primitives.ProvisionableResource { - public ContainerAppManagedCertificate(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public ContainerAppManagedCertificate(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Location { get { throw null; } set { } } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } @@ -728,17 +721,16 @@ public partial class ContainerAppManagedCertificate : Azure.Provisioning.Primiti public Azure.Provisioning.BicepValue Properties { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } - public static Azure.Provisioning.AppContainers.ContainerAppManagedCertificate FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.AppContainers.ContainerAppManagedCertificate FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2023_05_01; public static readonly string V2024_03_01; - public static readonly string V2024_08_02_preview; } } - public partial class ContainerAppManagedEnvironment : Azure.Provisioning.Primitives.Resource + public partial class ContainerAppManagedEnvironment : Azure.Provisioning.Primitives.ProvisionableResource { - public ContainerAppManagedEnvironment(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public ContainerAppManagedEnvironment(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue AppLogsConfiguration { get { throw null; } set { } } public Azure.Provisioning.BicepValue CustomDomainConfiguration { get { throw null; } set { } } public Azure.Provisioning.BicepValue DaprAIConnectionString { get { throw null; } set { } } @@ -762,21 +754,20 @@ public partial class ContainerAppManagedEnvironment : Azure.Provisioning.Primiti public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } public Azure.Provisioning.BicepValue VnetConfiguration { get { throw null; } set { } } public Azure.Provisioning.BicepList WorkloadProfiles { get { throw null; } set { } } - public Azure.Provisioning.Authorization.RoleAssignment CreateRoleAssignment(Azure.Provisioning.AppContainers.AppContainersBuiltInRole role, Azure.Provisioning.BicepValue principalType, Azure.Provisioning.BicepValue principalId, string? identifierNameSuffix = null) { throw null; } + public Azure.Provisioning.Authorization.RoleAssignment CreateRoleAssignment(Azure.Provisioning.AppContainers.AppContainersBuiltInRole role, Azure.Provisioning.BicepValue principalType, Azure.Provisioning.BicepValue principalId, string? bicepIdentifierSuffix = null) { throw null; } public Azure.Provisioning.Authorization.RoleAssignment CreateRoleAssignment(Azure.Provisioning.AppContainers.AppContainersBuiltInRole role, Azure.Provisioning.Roles.UserAssignedIdentity identity) { throw null; } - public static Azure.Provisioning.AppContainers.ContainerAppManagedEnvironment FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.AppContainers.ContainerAppManagedEnvironment FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2022_03_01; public static readonly string V2022_10_01; public static readonly string V2023_05_01; public static readonly string V2024_03_01; - public static readonly string V2024_08_02_preview; } } - public partial class ContainerAppManagedEnvironmentCertificate : Azure.Provisioning.Primitives.Resource + public partial class ContainerAppManagedEnvironmentCertificate : Azure.Provisioning.Primitives.ProvisionableResource { - public ContainerAppManagedEnvironmentCertificate(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public ContainerAppManagedEnvironmentCertificate(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Location { get { throw null; } set { } } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } @@ -784,19 +775,18 @@ public partial class ContainerAppManagedEnvironmentCertificate : Azure.Provision public Azure.Provisioning.BicepValue Properties { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } - public static Azure.Provisioning.AppContainers.ContainerAppManagedEnvironmentCertificate FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.AppContainers.ContainerAppManagedEnvironmentCertificate FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2022_03_01; public static readonly string V2022_10_01; public static readonly string V2023_05_01; public static readonly string V2024_03_01; - public static readonly string V2024_08_02_preview; } } - public partial class ContainerAppManagedEnvironmentDaprComponent : Azure.Provisioning.Primitives.Resource + public partial class ContainerAppManagedEnvironmentDaprComponent : Azure.Provisioning.Primitives.ProvisionableResource { - public ContainerAppManagedEnvironmentDaprComponent(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public ContainerAppManagedEnvironmentDaprComponent(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue ComponentType { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue IgnoreErrors { get { throw null; } set { } } @@ -809,14 +799,13 @@ public partial class ContainerAppManagedEnvironmentDaprComponent : Azure.Provisi public Azure.Provisioning.BicepValue SecretStoreComponent { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepValue Version { get { throw null; } set { } } - public static Azure.Provisioning.AppContainers.ContainerAppManagedEnvironmentDaprComponent FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.AppContainers.ContainerAppManagedEnvironmentDaprComponent FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2022_03_01; public static readonly string V2022_10_01; public static readonly string V2023_05_01; public static readonly string V2024_03_01; - public static readonly string V2024_08_02_preview; } } public enum ContainerAppManagedEnvironmentOutBoundType @@ -824,25 +813,24 @@ public enum ContainerAppManagedEnvironmentOutBoundType LoadBalancer = 0, UserDefinedRouting = 1, } - public partial class ContainerAppManagedEnvironmentStorage : Azure.Provisioning.Primitives.Resource + public partial class ContainerAppManagedEnvironmentStorage : Azure.Provisioning.Primitives.ProvisionableResource { - public ContainerAppManagedEnvironmentStorage(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public ContainerAppManagedEnvironmentStorage(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue ManagedEnvironmentStorageAzureFile { get { throw null; } set { } } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } public Azure.Provisioning.AppContainers.ContainerAppManagedEnvironment? Parent { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.AppContainers.ContainerAppManagedEnvironmentStorage FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.AppContainers.ContainerAppManagedEnvironmentStorage FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2022_03_01; public static readonly string V2022_10_01; public static readonly string V2023_05_01; public static readonly string V2024_03_01; - public static readonly string V2024_08_02_preview; } } - public partial class ContainerAppOpenIdConnectClientCredential : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerAppOpenIdConnectClientCredential : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerAppOpenIdConnectClientCredential() { } public Azure.Provisioning.BicepValue ClientSecretSettingName { get { throw null; } set { } } @@ -852,7 +840,7 @@ public enum ContainerAppOpenIdConnectClientCredentialMethod { ClientSecretPost = 0, } - public partial class ContainerAppOpenIdConnectConfig : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerAppOpenIdConnectConfig : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerAppOpenIdConnectConfig() { } public Azure.Provisioning.BicepValue AuthorizationEndpoint { get { throw null; } set { } } @@ -861,20 +849,20 @@ public ContainerAppOpenIdConnectConfig() { } public Azure.Provisioning.BicepValue TokenEndpoint { get { throw null; } set { } } public Azure.Provisioning.BicepValue WellKnownOpenIdConfiguration { get { throw null; } set { } } } - public partial class ContainerAppOpenIdConnectLogin : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerAppOpenIdConnectLogin : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerAppOpenIdConnectLogin() { } public Azure.Provisioning.BicepValue NameClaimType { get { throw null; } set { } } public Azure.Provisioning.BicepList Scopes { get { throw null; } set { } } } - public partial class ContainerAppOpenIdConnectRegistration : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerAppOpenIdConnectRegistration : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerAppOpenIdConnectRegistration() { } public Azure.Provisioning.BicepValue ClientCredential { get { throw null; } set { } } public Azure.Provisioning.BicepValue ClientId { get { throw null; } set { } } public Azure.Provisioning.BicepValue OpenIdConnectConfiguration { get { throw null; } set { } } } - public partial class ContainerAppProbe : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerAppProbe : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerAppProbe() { } public Azure.Provisioning.BicepValue FailureThreshold { get { throw null; } set { } } @@ -908,20 +896,20 @@ public enum ContainerAppProvisioningState Canceled = 3, Deleting = 4, } - public partial class ContainerAppQueueScaleRule : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerAppQueueScaleRule : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerAppQueueScaleRule() { } public Azure.Provisioning.BicepList Auth { get { throw null; } set { } } public Azure.Provisioning.BicepValue QueueLength { get { throw null; } set { } } public Azure.Provisioning.BicepValue QueueName { get { throw null; } set { } } } - public partial class ContainerAppRegistration : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerAppRegistration : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerAppRegistration() { } public Azure.Provisioning.BicepValue AppId { get { throw null; } set { } } public Azure.Provisioning.BicepValue AppSecretSettingName { get { throw null; } set { } } } - public partial class ContainerAppRegistryCredentials : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerAppRegistryCredentials : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerAppRegistryCredentials() { } public Azure.Provisioning.BicepValue Identity { get { throw null; } set { } } @@ -929,14 +917,14 @@ public ContainerAppRegistryCredentials() { } public Azure.Provisioning.BicepValue Server { get { throw null; } set { } } public Azure.Provisioning.BicepValue Username { get { throw null; } set { } } } - public partial class ContainerAppRegistryInfo : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerAppRegistryInfo : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerAppRegistryInfo() { } public Azure.Provisioning.BicepValue RegistryPassword { get { throw null; } set { } } public Azure.Provisioning.BicepValue RegistryServer { get { throw null; } set { } } public Azure.Provisioning.BicepValue RegistryUserName { get { throw null; } set { } } } - public partial class ContainerAppRevisionTrafficWeight : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerAppRevisionTrafficWeight : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerAppRevisionTrafficWeight() { } public Azure.Provisioning.BicepValue IsLatestRevision { get { throw null; } set { } } @@ -944,14 +932,14 @@ public ContainerAppRevisionTrafficWeight() { } public Azure.Provisioning.BicepValue RevisionName { get { throw null; } set { } } public Azure.Provisioning.BicepValue Weight { get { throw null; } set { } } } - public partial class ContainerAppScale : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerAppScale : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerAppScale() { } public Azure.Provisioning.BicepValue MaxReplicas { get { throw null; } set { } } public Azure.Provisioning.BicepValue MinReplicas { get { throw null; } set { } } public Azure.Provisioning.BicepList Rules { get { throw null; } set { } } } - public partial class ContainerAppScaleRule : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerAppScaleRule : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerAppScaleRule() { } public Azure.Provisioning.BicepValue AzureQueue { get { throw null; } set { } } @@ -960,21 +948,21 @@ public ContainerAppScaleRule() { } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } public Azure.Provisioning.BicepValue Tcp { get { throw null; } set { } } } - public partial class ContainerAppScaleRuleAuth : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerAppScaleRuleAuth : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerAppScaleRuleAuth() { } public Azure.Provisioning.BicepValue SecretRef { get { throw null; } set { } } public Azure.Provisioning.BicepValue TriggerParameter { get { throw null; } set { } } } - public partial class ContainerAppServiceBind : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerAppServiceBind : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerAppServiceBind() { } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } public Azure.Provisioning.BicepValue ServiceId { get { throw null; } set { } } } - public partial class ContainerAppSourceControl : Azure.Provisioning.Primitives.Resource + public partial class ContainerAppSourceControl : Azure.Provisioning.Primitives.ProvisionableResource { - public ContainerAppSourceControl(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public ContainerAppSourceControl(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Branch { get { throw null; } set { } } public Azure.Provisioning.BicepValue GitHubActionConfiguration { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } @@ -983,14 +971,13 @@ public partial class ContainerAppSourceControl : Azure.Provisioning.Primitives.R public Azure.Provisioning.AppContainers.ContainerApp? Parent { get { throw null; } set { } } public Azure.Provisioning.BicepValue RepoUri { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.AppContainers.ContainerAppSourceControl FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.AppContainers.ContainerAppSourceControl FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2022_03_01; public static readonly string V2022_10_01; public static readonly string V2023_05_01; public static readonly string V2024_03_01; - public static readonly string V2024_08_02_preview; } } public enum ContainerAppSourceControlOperationState @@ -1006,19 +993,19 @@ public enum ContainerAppStorageType EmptyDir = 1, Secret = 2, } - public partial class ContainerAppTcpScaleRule : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerAppTcpScaleRule : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerAppTcpScaleRule() { } public Azure.Provisioning.BicepList Auth { get { throw null; } set { } } public Azure.Provisioning.BicepDictionary Metadata { get { throw null; } set { } } } - public partial class ContainerAppTcpSocketRequestInfo : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerAppTcpSocketRequestInfo : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerAppTcpSocketRequestInfo() { } public Azure.Provisioning.BicepValue Host { get { throw null; } set { } } public Azure.Provisioning.BicepValue Port { get { throw null; } set { } } } - public partial class ContainerAppTemplate : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerAppTemplate : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerAppTemplate() { } public Azure.Provisioning.BicepList Containers { get { throw null; } set { } } @@ -1029,20 +1016,20 @@ public ContainerAppTemplate() { } public Azure.Provisioning.BicepValue TerminationGracePeriodSeconds { get { throw null; } set { } } public Azure.Provisioning.BicepList Volumes { get { throw null; } set { } } } - public partial class ContainerAppTokenStore : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerAppTokenStore : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerAppTokenStore() { } public Azure.Provisioning.BicepValue AzureBlobStorageSasUrlSettingName { get { throw null; } set { } } public Azure.Provisioning.BicepValue IsEnabled { get { throw null; } set { } } public Azure.Provisioning.BicepValue TokenRefreshExtensionHours { get { throw null; } set { } } } - public partial class ContainerAppTwitterConfiguration : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerAppTwitterConfiguration : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerAppTwitterConfiguration() { } public Azure.Provisioning.BicepValue IsEnabled { get { throw null; } set { } } public Azure.Provisioning.BicepValue Registration { get { throw null; } set { } } } - public partial class ContainerAppTwitterRegistration : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerAppTwitterRegistration : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerAppTwitterRegistration() { } public Azure.Provisioning.BicepValue ConsumerKey { get { throw null; } set { } } @@ -1055,7 +1042,7 @@ public enum ContainerAppUnauthenticatedClientActionV2 Return401 = 2, Return403 = 3, } - public partial class ContainerAppVnetConfiguration : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerAppVnetConfiguration : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerAppVnetConfiguration() { } public Azure.Provisioning.BicepValue DockerBridgeCidr { get { throw null; } set { } } @@ -1064,7 +1051,7 @@ public ContainerAppVnetConfiguration() { } public Azure.Provisioning.BicepValue PlatformReservedCidr { get { throw null; } set { } } public Azure.Provisioning.BicepValue PlatformReservedDnsIP { get { throw null; } set { } } } - public partial class ContainerAppVolume : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerAppVolume : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerAppVolume() { } public Azure.Provisioning.BicepValue MountOptions { get { throw null; } set { } } @@ -1073,14 +1060,14 @@ public ContainerAppVolume() { } public Azure.Provisioning.BicepValue StorageName { get { throw null; } set { } } public Azure.Provisioning.BicepValue StorageType { get { throw null; } set { } } } - public partial class ContainerAppVolumeMount : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerAppVolumeMount : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerAppVolumeMount() { } public Azure.Provisioning.BicepValue MountPath { get { throw null; } set { } } public Azure.Provisioning.BicepValue SubPath { get { throw null; } set { } } public Azure.Provisioning.BicepValue VolumeName { get { throw null; } set { } } } - public partial class ContainerAppWorkloadProfile : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerAppWorkloadProfile : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerAppWorkloadProfile() { } public Azure.Provisioning.BicepValue MaximumNodeCount { get { throw null; } set { } } @@ -1088,7 +1075,7 @@ public ContainerAppWorkloadProfile() { } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } public Azure.Provisioning.BicepValue WorkloadProfileType { get { throw null; } set { } } } - public partial class ContainerAppWritableSecret : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerAppWritableSecret : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerAppWritableSecret() { } public Azure.Provisioning.BicepValue Identity { get { throw null; } set { } } @@ -1096,33 +1083,33 @@ public ContainerAppWritableSecret() { } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } public Azure.Provisioning.BicepValue Value { get { throw null; } set { } } } - public partial class EncryptionSettings : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class EncryptionSettings : Azure.Provisioning.Primitives.ProvisionableConstruct { public EncryptionSettings() { } public Azure.Provisioning.BicepValue ContainerAppAuthEncryptionSecretName { get { throw null; } set { } } public Azure.Provisioning.BicepValue ContainerAppAuthSigningSecretName { get { throw null; } set { } } } - public partial class EventTriggerConfiguration : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class EventTriggerConfiguration : Azure.Provisioning.Primitives.ProvisionableConstruct { public EventTriggerConfiguration() { } public Azure.Provisioning.BicepValue Parallelism { get { throw null; } set { } } public Azure.Provisioning.BicepValue ReplicaCompletionCount { get { throw null; } set { } } public Azure.Provisioning.BicepValue Scale { get { throw null; } set { } } } - public partial class IngressPortMapping : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class IngressPortMapping : Azure.Provisioning.Primitives.ProvisionableConstruct { public IngressPortMapping() { } public Azure.Provisioning.BicepValue ExposedPort { get { throw null; } set { } } public Azure.Provisioning.BicepValue External { get { throw null; } set { } } public Azure.Provisioning.BicepValue TargetPort { get { throw null; } set { } } } - public partial class JobConfigurationManualTriggerConfig : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class JobConfigurationManualTriggerConfig : Azure.Provisioning.Primitives.ProvisionableConstruct { public JobConfigurationManualTriggerConfig() { } public Azure.Provisioning.BicepValue Parallelism { get { throw null; } set { } } public Azure.Provisioning.BicepValue ReplicaCompletionCount { get { throw null; } set { } } } - public partial class JobConfigurationScheduleTriggerConfig : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class JobConfigurationScheduleTriggerConfig : Azure.Provisioning.Primitives.ProvisionableConstruct { public JobConfigurationScheduleTriggerConfig() { } public Azure.Provisioning.BicepValue CronExpression { get { throw null; } set { } } @@ -1137,7 +1124,7 @@ public enum ManagedCertificateDomainControlValidation Http = 1, TXT = 2, } - public partial class ManagedCertificateProperties : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ManagedCertificateProperties : Azure.Provisioning.Primitives.ProvisionableConstruct { public ManagedCertificateProperties() { } public Azure.Provisioning.BicepValue DomainControlValidation { get { throw null; } set { } } @@ -1146,7 +1133,7 @@ public ManagedCertificateProperties() { } public Azure.Provisioning.BicepValue SubjectName { get { throw null; } set { } } public Azure.Provisioning.BicepValue ValidationToken { get { throw null; } } } - public partial class SecretVolumeItem : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class SecretVolumeItem : Azure.Provisioning.Primitives.ProvisionableConstruct { public SecretVolumeItem() { } public Azure.Provisioning.BicepValue Path { get { throw null; } set { } } diff --git a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/ContainerApp.cs b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/ContainerApp.cs index d088abc6b7b9..6eced79ab94f 100644 --- a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/ContainerApp.cs +++ b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/ContainerApp.cs @@ -18,7 +18,7 @@ namespace Azure.Provisioning.AppContainers; /// /// ContainerApp. /// -public partial class ContainerApp : Resource +public partial class ContainerApp : ProvisionableResource { /// /// Name of the Container App. @@ -148,15 +148,15 @@ public partial class ContainerApp : Resource /// /// Creates a new ContainerApp. /// - /// + /// /// The the Bicep identifier name of the ContainerApp resource. This can /// be used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and /// underscores. /// /// Version of the ContainerApp. - public ContainerApp(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.App/containerApps", resourceVersion ?? "2024-03-01") + public ContainerApp(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.App/containerApps", resourceVersion ?? "2024-03-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _location = BicepValue.DefineProperty(this, "Location", ["location"], isRequired: true); @@ -185,11 +185,6 @@ public ContainerApp(string identifierName, string? resourceVersion = default) /// public static class ResourceVersions { - /// - /// 2024-08-02-preview. - /// - public static readonly string V2024_08_02_preview = "2024-08-02-preview"; - /// /// 2024-03-01. /// @@ -214,7 +209,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing ContainerApp. /// - /// + /// /// The the Bicep identifier name of the ContainerApp resource. This can /// be used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and @@ -222,8 +217,8 @@ public static class ResourceVersions /// /// Version of the ContainerApp. /// The existing ContainerApp resource. - public static ContainerApp FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static ContainerApp FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; /// /// Get the requirements for naming this ContainerApp resource. diff --git a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/ContainerAppAuthConfig.cs b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/ContainerAppAuthConfig.cs index b3e5ec0390b9..9e49893f2278 100644 --- a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/ContainerAppAuthConfig.cs +++ b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/ContainerAppAuthConfig.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.AppContainers; /// /// ContainerAppAuthConfig. /// -public partial class ContainerAppAuthConfig : Resource +public partial class ContainerAppAuthConfig : ProvisionableResource { /// /// Name of the Container App AuthConfig. @@ -88,15 +88,15 @@ public partial class ContainerAppAuthConfig : Resource /// /// Creates a new ContainerAppAuthConfig. /// - /// + /// /// The the Bicep identifier name of the ContainerAppAuthConfig resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, /// numbers, and underscores. /// /// Version of the ContainerAppAuthConfig. - public ContainerAppAuthConfig(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.App/containerApps/authConfigs", resourceVersion ?? "2024-03-01") + public ContainerAppAuthConfig(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.App/containerApps/authConfigs", resourceVersion ?? "2024-03-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _encryptionSettings = BicepValue.DefineProperty(this, "EncryptionSettings", ["properties", "encryptionSettings"]); @@ -115,11 +115,6 @@ public ContainerAppAuthConfig(string identifierName, string? resourceVersion = d /// public static class ResourceVersions { - /// - /// 2024-08-02-preview. - /// - public static readonly string V2024_08_02_preview = "2024-08-02-preview"; - /// /// 2024-03-01. /// @@ -144,7 +139,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing ContainerAppAuthConfig. /// - /// + /// /// The the Bicep identifier name of the ContainerAppAuthConfig resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, @@ -152,6 +147,6 @@ public static class ResourceVersions /// /// Version of the ContainerAppAuthConfig. /// The existing ContainerAppAuthConfig resource. - public static ContainerAppAuthConfig FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static ContainerAppAuthConfig FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/ContainerAppConnectedEnvironment.cs b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/ContainerAppConnectedEnvironment.cs index 9041a6950a9f..70590b98950d 100644 --- a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/ContainerAppConnectedEnvironment.cs +++ b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/ContainerAppConnectedEnvironment.cs @@ -17,7 +17,7 @@ namespace Azure.Provisioning.AppContainers; /// /// ContainerAppConnectedEnvironment. /// -public partial class ContainerAppConnectedEnvironment : Resource +public partial class ContainerAppConnectedEnvironment : ProvisionableResource { /// /// Name of the connectedEnvironment. @@ -95,15 +95,15 @@ public partial class ContainerAppConnectedEnvironment : Resource /// /// Creates a new ContainerAppConnectedEnvironment. /// - /// + /// /// The the Bicep identifier name of the ContainerAppConnectedEnvironment /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the ContainerAppConnectedEnvironment. - public ContainerAppConnectedEnvironment(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.App/connectedEnvironments", resourceVersion ?? "2024-03-01") + public ContainerAppConnectedEnvironment(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.App/connectedEnvironments", resourceVersion ?? "2024-03-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _location = BicepValue.DefineProperty(this, "Location", ["location"], isRequired: true); @@ -124,11 +124,6 @@ public ContainerAppConnectedEnvironment(string identifierName, string? resourceV /// public static class ResourceVersions { - /// - /// 2024-08-02-preview. - /// - public static readonly string V2024_08_02_preview = "2024-08-02-preview"; - /// /// 2024-03-01. /// @@ -148,7 +143,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing ContainerAppConnectedEnvironment. /// - /// + /// /// The the Bicep identifier name of the ContainerAppConnectedEnvironment /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -156,6 +151,6 @@ public static class ResourceVersions /// /// Version of the ContainerAppConnectedEnvironment. /// The existing ContainerAppConnectedEnvironment resource. - public static ContainerAppConnectedEnvironment FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static ContainerAppConnectedEnvironment FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/ContainerAppConnectedEnvironmentCertificate.cs b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/ContainerAppConnectedEnvironmentCertificate.cs index 86bf90009c2d..75d80c4c70e7 100644 --- a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/ContainerAppConnectedEnvironmentCertificate.cs +++ b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/ContainerAppConnectedEnvironmentCertificate.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.AppContainers; /// /// ContainerAppConnectedEnvironmentCertificate. /// -public partial class ContainerAppConnectedEnvironmentCertificate : Resource +public partial class ContainerAppConnectedEnvironmentCertificate : ProvisionableResource { /// /// Name of the Certificate. @@ -63,7 +63,7 @@ public partial class ContainerAppConnectedEnvironmentCertificate : Resource /// /// Creates a new ContainerAppConnectedEnvironmentCertificate. /// - /// + /// /// The the Bicep identifier name of the /// ContainerAppConnectedEnvironmentCertificate resource. This can be /// used to refer to the resource in expressions, but is not the Azure @@ -71,8 +71,8 @@ public partial class ContainerAppConnectedEnvironmentCertificate : Resource /// underscores. /// /// Version of the ContainerAppConnectedEnvironmentCertificate. - public ContainerAppConnectedEnvironmentCertificate(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.App/connectedEnvironments/certificates", resourceVersion ?? "2024-03-01") + public ContainerAppConnectedEnvironmentCertificate(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.App/connectedEnvironments/certificates", resourceVersion ?? "2024-03-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _location = BicepValue.DefineProperty(this, "Location", ["location"], isRequired: true); @@ -88,11 +88,6 @@ public ContainerAppConnectedEnvironmentCertificate(string identifierName, string /// public static class ResourceVersions { - /// - /// 2024-08-02-preview. - /// - public static readonly string V2024_08_02_preview = "2024-08-02-preview"; - /// /// 2024-03-01. /// @@ -113,7 +108,7 @@ public static class ResourceVersions /// Creates a reference to an existing /// ContainerAppConnectedEnvironmentCertificate. /// - /// + /// /// The the Bicep identifier name of the /// ContainerAppConnectedEnvironmentCertificate resource. This can be /// used to refer to the resource in expressions, but is not the Azure @@ -122,6 +117,6 @@ public static class ResourceVersions /// /// Version of the ContainerAppConnectedEnvironmentCertificate. /// The existing ContainerAppConnectedEnvironmentCertificate resource. - public static ContainerAppConnectedEnvironmentCertificate FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static ContainerAppConnectedEnvironmentCertificate FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/ContainerAppConnectedEnvironmentDaprComponent.cs b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/ContainerAppConnectedEnvironmentDaprComponent.cs index c2e9424a10c1..c632f1f10c6c 100644 --- a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/ContainerAppConnectedEnvironmentDaprComponent.cs +++ b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/ContainerAppConnectedEnvironmentDaprComponent.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.AppContainers; /// /// ContainerAppConnectedEnvironmentDaprComponent. /// -public partial class ContainerAppConnectedEnvironmentDaprComponent : Resource +public partial class ContainerAppConnectedEnvironmentDaprComponent : ProvisionableResource { /// /// Name of the Dapr Component. @@ -93,7 +93,7 @@ public partial class ContainerAppConnectedEnvironmentDaprComponent : Resource /// /// Creates a new ContainerAppConnectedEnvironmentDaprComponent. /// - /// + /// /// The the Bicep identifier name of the /// ContainerAppConnectedEnvironmentDaprComponent resource. This can be /// used to refer to the resource in expressions, but is not the Azure @@ -101,8 +101,8 @@ public partial class ContainerAppConnectedEnvironmentDaprComponent : Resource /// underscores. /// /// Version of the ContainerAppConnectedEnvironmentDaprComponent. - public ContainerAppConnectedEnvironmentDaprComponent(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.App/connectedEnvironments/daprComponents", resourceVersion ?? "2024-03-01") + public ContainerAppConnectedEnvironmentDaprComponent(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.App/connectedEnvironments/daprComponents", resourceVersion ?? "2024-03-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _componentType = BicepValue.DefineProperty(this, "ComponentType", ["properties", "componentType"]); @@ -124,11 +124,6 @@ public ContainerAppConnectedEnvironmentDaprComponent(string identifierName, stri /// public static class ResourceVersions { - /// - /// 2024-08-02-preview. - /// - public static readonly string V2024_08_02_preview = "2024-08-02-preview"; - /// /// 2024-03-01. /// @@ -149,7 +144,7 @@ public static class ResourceVersions /// Creates a reference to an existing /// ContainerAppConnectedEnvironmentDaprComponent. /// - /// + /// /// The the Bicep identifier name of the /// ContainerAppConnectedEnvironmentDaprComponent resource. This can be /// used to refer to the resource in expressions, but is not the Azure @@ -158,6 +153,6 @@ public static class ResourceVersions /// /// Version of the ContainerAppConnectedEnvironmentDaprComponent. /// The existing ContainerAppConnectedEnvironmentDaprComponent resource. - public static ContainerAppConnectedEnvironmentDaprComponent FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static ContainerAppConnectedEnvironmentDaprComponent FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/ContainerAppConnectedEnvironmentStorage.cs b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/ContainerAppConnectedEnvironmentStorage.cs index 2dc42da4d437..b80fe062f8e1 100644 --- a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/ContainerAppConnectedEnvironmentStorage.cs +++ b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/ContainerAppConnectedEnvironmentStorage.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.AppContainers; /// /// ContainerAppConnectedEnvironmentStorage. /// -public partial class ContainerAppConnectedEnvironmentStorage : Resource +public partial class ContainerAppConnectedEnvironmentStorage : ProvisionableResource { /// /// Name of the storage. @@ -50,15 +50,15 @@ public partial class ContainerAppConnectedEnvironmentStorage : Resource /// /// Creates a new ContainerAppConnectedEnvironmentStorage. /// - /// + /// /// The the Bicep identifier name of the /// ContainerAppConnectedEnvironmentStorage resource. This can be used to /// refer to the resource in expressions, but is not the Azure name of the /// resource. This value can contain letters, numbers, and underscores. /// /// Version of the ContainerAppConnectedEnvironmentStorage. - public ContainerAppConnectedEnvironmentStorage(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.App/connectedEnvironments/storages", resourceVersion ?? "2024-03-01") + public ContainerAppConnectedEnvironmentStorage(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.App/connectedEnvironments/storages", resourceVersion ?? "2024-03-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _connectedEnvironmentStorageAzureFile = BicepValue.DefineProperty(this, "ConnectedEnvironmentStorageAzureFile", ["properties", "azureFile"]); @@ -72,11 +72,6 @@ public ContainerAppConnectedEnvironmentStorage(string identifierName, string? re /// public static class ResourceVersions { - /// - /// 2024-08-02-preview. - /// - public static readonly string V2024_08_02_preview = "2024-08-02-preview"; - /// /// 2024-03-01. /// @@ -97,7 +92,7 @@ public static class ResourceVersions /// Creates a reference to an existing /// ContainerAppConnectedEnvironmentStorage. /// - /// + /// /// The the Bicep identifier name of the /// ContainerAppConnectedEnvironmentStorage resource. This can be used to /// refer to the resource in expressions, but is not the Azure name of the @@ -105,6 +100,6 @@ public static class ResourceVersions /// /// Version of the ContainerAppConnectedEnvironmentStorage. /// The existing ContainerAppConnectedEnvironmentStorage resource. - public static ContainerAppConnectedEnvironmentStorage FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static ContainerAppConnectedEnvironmentStorage FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/ContainerAppJob.cs b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/ContainerAppJob.cs index 36a4552f6bbb..cfa89067b4c3 100644 --- a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/ContainerAppJob.cs +++ b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/ContainerAppJob.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.AppContainers; /// /// ContainerAppJob. /// -public partial class ContainerAppJob : Resource +public partial class ContainerAppJob : ProvisionableResource { /// /// Job Name. @@ -100,15 +100,15 @@ public partial class ContainerAppJob : Resource /// /// Creates a new ContainerAppJob. /// - /// + /// /// The the Bicep identifier name of the ContainerAppJob resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, /// and underscores. /// /// Version of the ContainerAppJob. - public ContainerAppJob(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.App/jobs", resourceVersion ?? "2024-03-01") + public ContainerAppJob(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.App/jobs", resourceVersion ?? "2024-03-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _location = BicepValue.DefineProperty(this, "Location", ["location"], isRequired: true); @@ -130,11 +130,6 @@ public ContainerAppJob(string identifierName, string? resourceVersion = default) /// public static class ResourceVersions { - /// - /// 2024-08-02-preview. - /// - public static readonly string V2024_08_02_preview = "2024-08-02-preview"; - /// /// 2024-03-01. /// @@ -149,7 +144,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing ContainerAppJob. /// - /// + /// /// The the Bicep identifier name of the ContainerAppJob resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, @@ -157,6 +152,6 @@ public static class ResourceVersions /// /// Version of the ContainerAppJob. /// The existing ContainerAppJob resource. - public static ContainerAppJob FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static ContainerAppJob FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/ContainerAppManagedCertificate.cs b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/ContainerAppManagedCertificate.cs index 43ec61b27710..b4da04bc07dd 100644 --- a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/ContainerAppManagedCertificate.cs +++ b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/ContainerAppManagedCertificate.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.AppContainers; /// /// ContainerAppManagedCertificate. /// -public partial class ContainerAppManagedCertificate : Resource +public partial class ContainerAppManagedCertificate : ProvisionableResource { /// /// Name of the Managed Certificate. @@ -63,15 +63,15 @@ public partial class ContainerAppManagedCertificate : Resource /// /// Creates a new ContainerAppManagedCertificate. /// - /// + /// /// The the Bicep identifier name of the ContainerAppManagedCertificate /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the ContainerAppManagedCertificate. - public ContainerAppManagedCertificate(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.App/managedEnvironments/managedCertificates", resourceVersion ?? "2024-03-01") + public ContainerAppManagedCertificate(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.App/managedEnvironments/managedCertificates", resourceVersion ?? "2024-03-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _location = BicepValue.DefineProperty(this, "Location", ["location"], isRequired: true); @@ -87,11 +87,6 @@ public ContainerAppManagedCertificate(string identifierName, string? resourceVer /// public static class ResourceVersions { - /// - /// 2024-08-02-preview. - /// - public static readonly string V2024_08_02_preview = "2024-08-02-preview"; - /// /// 2024-03-01. /// @@ -106,7 +101,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing ContainerAppManagedCertificate. /// - /// + /// /// The the Bicep identifier name of the ContainerAppManagedCertificate /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -114,6 +109,6 @@ public static class ResourceVersions /// /// Version of the ContainerAppManagedCertificate. /// The existing ContainerAppManagedCertificate resource. - public static ContainerAppManagedCertificate FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static ContainerAppManagedCertificate FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/ContainerAppManagedEnvironment.cs b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/ContainerAppManagedEnvironment.cs index 0ae780b49834..627143efcf0a 100644 --- a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/ContainerAppManagedEnvironment.cs +++ b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/ContainerAppManagedEnvironment.cs @@ -20,7 +20,7 @@ namespace Azure.Provisioning.AppContainers; /// /// ContainerAppManagedEnvironment. /// -public partial class ContainerAppManagedEnvironment : Resource +public partial class ContainerAppManagedEnvironment : ProvisionableResource { /// /// Name of the Environment. @@ -170,15 +170,15 @@ public partial class ContainerAppManagedEnvironment : Resource /// /// Creates a new ContainerAppManagedEnvironment. /// - /// + /// /// The the Bicep identifier name of the ContainerAppManagedEnvironment /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the ContainerAppManagedEnvironment. - public ContainerAppManagedEnvironment(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.App/managedEnvironments", resourceVersion ?? "2024-03-01") + public ContainerAppManagedEnvironment(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.App/managedEnvironments", resourceVersion ?? "2024-03-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _location = BicepValue.DefineProperty(this, "Location", ["location"], isRequired: true); @@ -210,11 +210,6 @@ public ContainerAppManagedEnvironment(string identifierName, string? resourceVer /// public static class ResourceVersions { - /// - /// 2024-08-02-preview. - /// - public static readonly string V2024_08_02_preview = "2024-08-02-preview"; - /// /// 2024-03-01. /// @@ -239,7 +234,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing ContainerAppManagedEnvironment. /// - /// + /// /// The the Bicep identifier name of the ContainerAppManagedEnvironment /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -247,8 +242,8 @@ public static class ResourceVersions /// /// Version of the ContainerAppManagedEnvironment. /// The existing ContainerAppManagedEnvironment resource. - public static ContainerAppManagedEnvironment FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static ContainerAppManagedEnvironment FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; /// /// Creates a role assignment for a user-assigned identity that grants @@ -258,10 +253,10 @@ public static ContainerAppManagedEnvironment FromExisting(string identifierName, /// The . /// The . public RoleAssignment CreateRoleAssignment(AppContainersBuiltInRole role, UserAssignedIdentity identity) => - new($"{IdentifierName}_{identity.IdentifierName}_{AppContainersBuiltInRole.GetBuiltInRoleName(role)}") + new($"{BicepIdentifier}_{identity.BicepIdentifier}_{AppContainersBuiltInRole.GetBuiltInRoleName(role)}") { Name = BicepFunction.CreateGuid(Id, identity.PrincipalId, BicepFunction.GetSubscriptionResourceId("Microsoft.Authorization/roleDefinitions", role.ToString())), - Scope = new IdentifierExpression(IdentifierName), + Scope = new IdentifierExpression(BicepIdentifier), PrincipalType = RoleManagementPrincipalType.ServicePrincipal, RoleDefinitionId = BicepFunction.GetSubscriptionResourceId("Microsoft.Authorization/roleDefinitions", role.ToString()), PrincipalId = identity.PrincipalId @@ -274,13 +269,13 @@ public RoleAssignment CreateRoleAssignment(AppContainersBuiltInRole role, UserAs /// The role to grant. /// The type of the principal to assign to. /// The principal to assign to. - /// Optional role assignment identifier name suffix. + /// Optional role assignment identifier name suffix. /// The . - public RoleAssignment CreateRoleAssignment(AppContainersBuiltInRole role, BicepValue principalType, BicepValue principalId, string? identifierNameSuffix = default) => - new($"{IdentifierName}_{AppContainersBuiltInRole.GetBuiltInRoleName(role)}{(identifierNameSuffix is null ? "" : "_")}{identifierNameSuffix}") + public RoleAssignment CreateRoleAssignment(AppContainersBuiltInRole role, BicepValue principalType, BicepValue principalId, string? bicepIdentifierSuffix = default) => + new($"{BicepIdentifier}_{AppContainersBuiltInRole.GetBuiltInRoleName(role)}{(bicepIdentifierSuffix is null ? "" : "_")}{bicepIdentifierSuffix}") { Name = BicepFunction.CreateGuid(Id, principalId, BicepFunction.GetSubscriptionResourceId("Microsoft.Authorization/roleDefinitions", role.ToString())), - Scope = new IdentifierExpression(IdentifierName), + Scope = new IdentifierExpression(BicepIdentifier), PrincipalType = principalType, RoleDefinitionId = BicepFunction.GetSubscriptionResourceId("Microsoft.Authorization/roleDefinitions", role.ToString()), PrincipalId = principalId diff --git a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/ContainerAppManagedEnvironmentCertificate.cs b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/ContainerAppManagedEnvironmentCertificate.cs index 75f6a20688e4..9ca2fe792d0b 100644 --- a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/ContainerAppManagedEnvironmentCertificate.cs +++ b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/ContainerAppManagedEnvironmentCertificate.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.AppContainers; /// /// ContainerAppManagedEnvironmentCertificate. /// -public partial class ContainerAppManagedEnvironmentCertificate : Resource +public partial class ContainerAppManagedEnvironmentCertificate : ProvisionableResource { /// /// Name of the Certificate. @@ -63,7 +63,7 @@ public partial class ContainerAppManagedEnvironmentCertificate : Resource /// /// Creates a new ContainerAppManagedEnvironmentCertificate. /// - /// + /// /// The the Bicep identifier name of the /// ContainerAppManagedEnvironmentCertificate resource. This can be used /// to refer to the resource in expressions, but is not the Azure name of @@ -71,8 +71,8 @@ public partial class ContainerAppManagedEnvironmentCertificate : Resource /// underscores. /// /// Version of the ContainerAppManagedEnvironmentCertificate. - public ContainerAppManagedEnvironmentCertificate(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.App/managedEnvironments/certificates", resourceVersion ?? "2024-03-01") + public ContainerAppManagedEnvironmentCertificate(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.App/managedEnvironments/certificates", resourceVersion ?? "2024-03-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _location = BicepValue.DefineProperty(this, "Location", ["location"], isRequired: true); @@ -88,11 +88,6 @@ public ContainerAppManagedEnvironmentCertificate(string identifierName, string? /// public static class ResourceVersions { - /// - /// 2024-08-02-preview. - /// - public static readonly string V2024_08_02_preview = "2024-08-02-preview"; - /// /// 2024-03-01. /// @@ -118,7 +113,7 @@ public static class ResourceVersions /// Creates a reference to an existing /// ContainerAppManagedEnvironmentCertificate. /// - /// + /// /// The the Bicep identifier name of the /// ContainerAppManagedEnvironmentCertificate resource. This can be used /// to refer to the resource in expressions, but is not the Azure name of @@ -127,6 +122,6 @@ public static class ResourceVersions /// /// Version of the ContainerAppManagedEnvironmentCertificate. /// The existing ContainerAppManagedEnvironmentCertificate resource. - public static ContainerAppManagedEnvironmentCertificate FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static ContainerAppManagedEnvironmentCertificate FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/ContainerAppManagedEnvironmentDaprComponent.cs b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/ContainerAppManagedEnvironmentDaprComponent.cs index 37c13cab5108..36b200419a50 100644 --- a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/ContainerAppManagedEnvironmentDaprComponent.cs +++ b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/ContainerAppManagedEnvironmentDaprComponent.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.AppContainers; /// /// ContainerAppManagedEnvironmentDaprComponent. /// -public partial class ContainerAppManagedEnvironmentDaprComponent : Resource +public partial class ContainerAppManagedEnvironmentDaprComponent : ProvisionableResource { /// /// Name of the Dapr Component. @@ -93,7 +93,7 @@ public partial class ContainerAppManagedEnvironmentDaprComponent : Resource /// /// Creates a new ContainerAppManagedEnvironmentDaprComponent. /// - /// + /// /// The the Bicep identifier name of the /// ContainerAppManagedEnvironmentDaprComponent resource. This can be /// used to refer to the resource in expressions, but is not the Azure @@ -101,8 +101,8 @@ public partial class ContainerAppManagedEnvironmentDaprComponent : Resource /// underscores. /// /// Version of the ContainerAppManagedEnvironmentDaprComponent. - public ContainerAppManagedEnvironmentDaprComponent(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.App/managedEnvironments/daprComponents", resourceVersion ?? "2024-03-01") + public ContainerAppManagedEnvironmentDaprComponent(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.App/managedEnvironments/daprComponents", resourceVersion ?? "2024-03-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _componentType = BicepValue.DefineProperty(this, "ComponentType", ["properties", "componentType"]); @@ -123,11 +123,6 @@ public ContainerAppManagedEnvironmentDaprComponent(string identifierName, string /// public static class ResourceVersions { - /// - /// 2024-08-02-preview. - /// - public static readonly string V2024_08_02_preview = "2024-08-02-preview"; - /// /// 2024-03-01. /// @@ -153,7 +148,7 @@ public static class ResourceVersions /// Creates a reference to an existing /// ContainerAppManagedEnvironmentDaprComponent. /// - /// + /// /// The the Bicep identifier name of the /// ContainerAppManagedEnvironmentDaprComponent resource. This can be /// used to refer to the resource in expressions, but is not the Azure @@ -162,6 +157,6 @@ public static class ResourceVersions /// /// Version of the ContainerAppManagedEnvironmentDaprComponent. /// The existing ContainerAppManagedEnvironmentDaprComponent resource. - public static ContainerAppManagedEnvironmentDaprComponent FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static ContainerAppManagedEnvironmentDaprComponent FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/ContainerAppManagedEnvironmentStorage.cs b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/ContainerAppManagedEnvironmentStorage.cs index c1874fcfccfa..4dd3a6dc4302 100644 --- a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/ContainerAppManagedEnvironmentStorage.cs +++ b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/ContainerAppManagedEnvironmentStorage.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.AppContainers; /// /// ContainerAppManagedEnvironmentStorage. /// -public partial class ContainerAppManagedEnvironmentStorage : Resource +public partial class ContainerAppManagedEnvironmentStorage : ProvisionableResource { /// /// Name of the storage. @@ -50,15 +50,15 @@ public partial class ContainerAppManagedEnvironmentStorage : Resource /// /// Creates a new ContainerAppManagedEnvironmentStorage. /// - /// + /// /// The the Bicep identifier name of the /// ContainerAppManagedEnvironmentStorage resource. This can be used to /// refer to the resource in expressions, but is not the Azure name of the /// resource. This value can contain letters, numbers, and underscores. /// /// Version of the ContainerAppManagedEnvironmentStorage. - public ContainerAppManagedEnvironmentStorage(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.App/managedEnvironments/storages", resourceVersion ?? "2024-03-01") + public ContainerAppManagedEnvironmentStorage(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.App/managedEnvironments/storages", resourceVersion ?? "2024-03-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _managedEnvironmentStorageAzureFile = BicepValue.DefineProperty(this, "ManagedEnvironmentStorageAzureFile", ["properties", "azureFile"]); @@ -72,11 +72,6 @@ public ContainerAppManagedEnvironmentStorage(string identifierName, string? reso /// public static class ResourceVersions { - /// - /// 2024-08-02-preview. - /// - public static readonly string V2024_08_02_preview = "2024-08-02-preview"; - /// /// 2024-03-01. /// @@ -102,7 +97,7 @@ public static class ResourceVersions /// Creates a reference to an existing /// ContainerAppManagedEnvironmentStorage. /// - /// + /// /// The the Bicep identifier name of the /// ContainerAppManagedEnvironmentStorage resource. This can be used to /// refer to the resource in expressions, but is not the Azure name of the @@ -110,6 +105,6 @@ public static class ResourceVersions /// /// Version of the ContainerAppManagedEnvironmentStorage. /// The existing ContainerAppManagedEnvironmentStorage resource. - public static ContainerAppManagedEnvironmentStorage FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static ContainerAppManagedEnvironmentStorage FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/ContainerAppSourceControl.cs b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/ContainerAppSourceControl.cs index 72b41dc571ef..cd3c8e630b7c 100644 --- a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/ContainerAppSourceControl.cs +++ b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/ContainerAppSourceControl.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.AppContainers; /// /// ContainerAppSourceControl. /// -public partial class ContainerAppSourceControl : Resource +public partial class ContainerAppSourceControl : ProvisionableResource { /// /// Name of the Container App SourceControl. @@ -70,15 +70,15 @@ public partial class ContainerAppSourceControl : Resource /// /// Creates a new ContainerAppSourceControl. /// - /// + /// /// The the Bicep identifier name of the ContainerAppSourceControl /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the ContainerAppSourceControl. - public ContainerAppSourceControl(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.App/containerApps/sourcecontrols", resourceVersion ?? "2024-03-01") + public ContainerAppSourceControl(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.App/containerApps/sourcecontrols", resourceVersion ?? "2024-03-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _branch = BicepValue.DefineProperty(this, "Branch", ["properties", "branch"]); @@ -95,11 +95,6 @@ public ContainerAppSourceControl(string identifierName, string? resourceVersion /// public static class ResourceVersions { - /// - /// 2024-08-02-preview. - /// - public static readonly string V2024_08_02_preview = "2024-08-02-preview"; - /// /// 2024-03-01. /// @@ -124,7 +119,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing ContainerAppSourceControl. /// - /// + /// /// The the Bicep identifier name of the ContainerAppSourceControl /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -132,6 +127,6 @@ public static class ResourceVersions /// /// Version of the ContainerAppSourceControl. /// The existing ContainerAppSourceControl resource. - public static ContainerAppSourceControl FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static ContainerAppSourceControl FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/AppContainerResources.cs b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/AppContainerResources.cs index 17a31b934daa..8c4ee12b4a81 100644 --- a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/AppContainerResources.cs +++ b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/AppContainerResources.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.AppContainers; /// /// Container App container resource requirements. /// -public partial class AppContainerResources : ProvisioningConstruct +public partial class AppContainerResources : ProvisionableConstruct { /// /// Required CPU in cores, e.g. 0.5. diff --git a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppAllowedPrincipals.cs b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppAllowedPrincipals.cs index 7a3061a9be49..3bd28afb956e 100644 --- a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppAllowedPrincipals.cs +++ b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppAllowedPrincipals.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.AppContainers; /// /// The configuration settings of the Azure Active Directory allowed principals. /// -public partial class ContainerAppAllowedPrincipals : ProvisioningConstruct +public partial class ContainerAppAllowedPrincipals : ProvisionableConstruct { /// /// The list of the allowed groups. diff --git a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppAppleConfiguration.cs b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppAppleConfiguration.cs index 6f93eb1a7766..b5f74c9b5b73 100644 --- a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppAppleConfiguration.cs +++ b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppAppleConfiguration.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.AppContainers; /// /// The configuration settings of the Apple provider. /// -public partial class ContainerAppAppleConfiguration : ProvisioningConstruct +public partial class ContainerAppAppleConfiguration : ProvisionableConstruct { /// /// <code>false</code> if the Apple provider should not be diff --git a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppAppleRegistrationConfiguration.cs b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppAppleRegistrationConfiguration.cs index b20f34281984..ee34ca544e70 100644 --- a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppAppleRegistrationConfiguration.cs +++ b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppAppleRegistrationConfiguration.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.AppContainers; /// /// The configuration settings of the registration for the Apple provider. /// -public partial class ContainerAppAppleRegistrationConfiguration : ProvisioningConstruct +public partial class ContainerAppAppleRegistrationConfiguration : ProvisionableConstruct { /// /// The Client ID of the app used for login. diff --git a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppAuthPlatform.cs b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppAuthPlatform.cs index bb5b8c662353..89b4e0759e7a 100644 --- a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppAuthPlatform.cs +++ b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppAuthPlatform.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.AppContainers; /// The configuration settings of the platform of ContainerApp Service /// Authentication/Authorization. /// -public partial class ContainerAppAuthPlatform : ProvisioningConstruct +public partial class ContainerAppAuthPlatform : ProvisionableConstruct { /// /// <code>true</code> if the Authentication / Authorization diff --git a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppAzureActiveDirectoryConfiguration.cs b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppAzureActiveDirectoryConfiguration.cs index 057968d5f7bc..fe8947d01bc9 100644 --- a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppAzureActiveDirectoryConfiguration.cs +++ b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppAzureActiveDirectoryConfiguration.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.AppContainers; /// /// The configuration settings of the Azure Active directory provider. /// -public partial class ContainerAppAzureActiveDirectoryConfiguration : ProvisioningConstruct +public partial class ContainerAppAzureActiveDirectoryConfiguration : ProvisionableConstruct { /// /// <code>false</code> if the Azure Active Directory provider diff --git a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppAzureActiveDirectoryLoginConfiguration.cs b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppAzureActiveDirectoryLoginConfiguration.cs index 8f1314f237e0..245a1836ace1 100644 --- a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppAzureActiveDirectoryLoginConfiguration.cs +++ b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppAzureActiveDirectoryLoginConfiguration.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.AppContainers; /// /// The configuration settings of the Azure Active Directory login flow. /// -public partial class ContainerAppAzureActiveDirectoryLoginConfiguration : ProvisioningConstruct +public partial class ContainerAppAzureActiveDirectoryLoginConfiguration : ProvisionableConstruct { /// /// Login parameters to send to the OpenID Connect authorization endpoint diff --git a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppAzureActiveDirectoryRegistrationConfiguration.cs b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppAzureActiveDirectoryRegistrationConfiguration.cs index 4c3c1f75886b..2c4856487579 100644 --- a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppAzureActiveDirectoryRegistrationConfiguration.cs +++ b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppAzureActiveDirectoryRegistrationConfiguration.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.AppContainers; /// /// The configuration settings of the Azure Active Directory app registration. /// -public partial class ContainerAppAzureActiveDirectoryRegistrationConfiguration : ProvisioningConstruct +public partial class ContainerAppAzureActiveDirectoryRegistrationConfiguration : ProvisionableConstruct { /// /// The OpenID Connect Issuer URI that represents the entity which issues diff --git a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppAzureActiveDirectoryValidationConfiguration.cs b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppAzureActiveDirectoryValidationConfiguration.cs index 053e3c9810e6..7c6a7faaa546 100644 --- a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppAzureActiveDirectoryValidationConfiguration.cs +++ b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppAzureActiveDirectoryValidationConfiguration.cs @@ -13,7 +13,7 @@ namespace Azure.Provisioning.AppContainers; /// The configuration settings of the Azure Active Directory token validation /// flow. /// -public partial class ContainerAppAzureActiveDirectoryValidationConfiguration : ProvisioningConstruct +public partial class ContainerAppAzureActiveDirectoryValidationConfiguration : ProvisionableConstruct { /// /// The configuration settings of the checks that should be made while diff --git a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppAzureFileProperties.cs b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppAzureFileProperties.cs index 6e13082f7142..297f4ce44fe7 100644 --- a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppAzureFileProperties.cs +++ b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppAzureFileProperties.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.AppContainers; /// /// Azure File Properties. /// -public partial class ContainerAppAzureFileProperties : ProvisioningConstruct +public partial class ContainerAppAzureFileProperties : ProvisionableConstruct { /// /// Storage account name for azure file. diff --git a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppAzureStaticWebAppsConfiguration.cs b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppAzureStaticWebAppsConfiguration.cs index 6cd4d9d821fb..cf9458cbfed3 100644 --- a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppAzureStaticWebAppsConfiguration.cs +++ b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppAzureStaticWebAppsConfiguration.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.AppContainers; /// /// The configuration settings of the Azure Static Web Apps provider. /// -public partial class ContainerAppAzureStaticWebAppsConfiguration : ProvisioningConstruct +public partial class ContainerAppAzureStaticWebAppsConfiguration : ProvisionableConstruct { /// /// <code>false</code> if the Azure Static Web Apps provider diff --git a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppCertificateProperties.cs b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppCertificateProperties.cs index ee4a8e8277ea..dde760c4019e 100644 --- a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppCertificateProperties.cs +++ b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppCertificateProperties.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.AppContainers; /// /// Certificate resource specific properties. /// -public partial class ContainerAppCertificateProperties : ProvisioningConstruct +public partial class ContainerAppCertificateProperties : ProvisionableConstruct { /// /// Provisioning state of the certificate. diff --git a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppClientRegistration.cs b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppClientRegistration.cs index 0c201bc2f6bb..a41d14a24420 100644 --- a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppClientRegistration.cs +++ b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppClientRegistration.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.AppContainers; /// The configuration settings of the app registration for providers that have /// client ids and client secrets. /// -public partial class ContainerAppClientRegistration : ProvisioningConstruct +public partial class ContainerAppClientRegistration : ProvisionableConstruct { /// /// The Client ID of the app used for login. diff --git a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppConfiguration.cs b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppConfiguration.cs index f6eb9f6ab3e6..2ee51697abfb 100644 --- a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppConfiguration.cs +++ b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppConfiguration.cs @@ -14,7 +14,7 @@ namespace Azure.Provisioning.AppContainers; /// Non versioned Container App configuration properties that define the /// mutable settings of a Container app. /// -public partial class ContainerAppConfiguration : ProvisioningConstruct +public partial class ContainerAppConfiguration : ProvisionableConstruct { /// /// Collection of secrets used by a Container app. diff --git a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppContainer.cs b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppContainer.cs index e7b5f3705694..f7d748cbfed7 100644 --- a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppContainer.cs +++ b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppContainer.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.AppContainers; /// /// Container App container definition. /// -public partial class ContainerAppContainer : ProvisioningConstruct +public partial class ContainerAppContainer : ProvisionableConstruct { /// /// List of probes for the container. diff --git a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppCookieExpiration.cs b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppCookieExpiration.cs index 8fbbcc8b3295..fefc1c7ef8ab 100644 --- a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppCookieExpiration.cs +++ b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppCookieExpiration.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.AppContainers; /// /// The configuration settings of the session cookie's expiration. /// -public partial class ContainerAppCookieExpiration : ProvisioningConstruct +public partial class ContainerAppCookieExpiration : ProvisionableConstruct { /// /// The convention used when determining the session cookie's diff --git a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppCorsPolicy.cs b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppCorsPolicy.cs index b8779b34b51f..a5286b289972 100644 --- a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppCorsPolicy.cs +++ b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppCorsPolicy.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.AppContainers; /// /// Cross-Origin-Resource-Sharing policy. /// -public partial class ContainerAppCorsPolicy : ProvisioningConstruct +public partial class ContainerAppCorsPolicy : ProvisionableConstruct { /// /// Specifies the content for the access-control-allow-origins header. diff --git a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppCredentials.cs b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppCredentials.cs index 919f7c0d30c2..a6e5cb1bb22f 100644 --- a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppCredentials.cs +++ b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppCredentials.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.AppContainers; /// /// Container App credentials. /// -public partial class ContainerAppCredentials : ProvisioningConstruct +public partial class ContainerAppCredentials : ProvisionableConstruct { /// /// Client Id. diff --git a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppCustomDomain.cs b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppCustomDomain.cs index 8d979127f726..0f8efa8c45e5 100644 --- a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppCustomDomain.cs +++ b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppCustomDomain.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.AppContainers; /// /// Custom Domain of a Container App. /// -public partial class ContainerAppCustomDomain : ProvisioningConstruct +public partial class ContainerAppCustomDomain : ProvisionableConstruct { /// /// Hostname. diff --git a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppCustomDomainConfiguration.cs b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppCustomDomainConfiguration.cs index 98c8b398a771..895ac75fe5b2 100644 --- a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppCustomDomainConfiguration.cs +++ b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppCustomDomainConfiguration.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.AppContainers; /// /// Configuration properties for apps environment custom domain. /// -public partial class ContainerAppCustomDomainConfiguration : ProvisioningConstruct +public partial class ContainerAppCustomDomainConfiguration : ProvisionableConstruct { /// /// Id used to verify domain name ownership. diff --git a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppCustomOpenIdConnectProviderConfiguration.cs b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppCustomOpenIdConnectProviderConfiguration.cs index defd483a7c29..927daf1536a4 100644 --- a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppCustomOpenIdConnectProviderConfiguration.cs +++ b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppCustomOpenIdConnectProviderConfiguration.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.AppContainers; /// /// The configuration settings of the custom Open ID Connect provider. /// -public partial class ContainerAppCustomOpenIdConnectProviderConfiguration : ProvisioningConstruct +public partial class ContainerAppCustomOpenIdConnectProviderConfiguration : ProvisionableConstruct { /// /// <code>false</code> if the custom Open ID provider provider diff --git a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppCustomScaleRule.cs b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppCustomScaleRule.cs index b42f31a86ccb..ff66e6bb3f4e 100644 --- a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppCustomScaleRule.cs +++ b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppCustomScaleRule.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.AppContainers; /// /// Container App container Custom scaling rule. /// -public partial class ContainerAppCustomScaleRule : ProvisioningConstruct +public partial class ContainerAppCustomScaleRule : ProvisionableConstruct { /// /// Type of the custom scale rule eg: azure-servicebus, redis diff --git a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppDaprConfiguration.cs b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppDaprConfiguration.cs index 3c3bcea09178..fd17a3feafef 100644 --- a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppDaprConfiguration.cs +++ b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppDaprConfiguration.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.AppContainers; /// /// Container App Dapr configuration. /// -public partial class ContainerAppDaprConfiguration : ProvisioningConstruct +public partial class ContainerAppDaprConfiguration : ProvisionableConstruct { /// /// Boolean indicating if the Dapr side car is enabled. diff --git a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppDaprMetadata.cs b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppDaprMetadata.cs index fdc94f09f2f4..f9c08f6b7338 100644 --- a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppDaprMetadata.cs +++ b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppDaprMetadata.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.AppContainers; /// /// Dapr component metadata. /// -public partial class ContainerAppDaprMetadata : ProvisioningConstruct +public partial class ContainerAppDaprMetadata : ProvisionableConstruct { /// /// Metadata property name. diff --git a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppDefaultAuthorizationPolicy.cs b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppDefaultAuthorizationPolicy.cs index b20f5b71126e..dc6cb460eebe 100644 --- a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppDefaultAuthorizationPolicy.cs +++ b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppDefaultAuthorizationPolicy.cs @@ -13,7 +13,7 @@ namespace Azure.Provisioning.AppContainers; /// The configuration settings of the Azure Active Directory default /// authorization policy. /// -public partial class ContainerAppDefaultAuthorizationPolicy : ProvisioningConstruct +public partial class ContainerAppDefaultAuthorizationPolicy : ProvisionableConstruct { /// /// The configuration settings of the Azure Active Directory allowed diff --git a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppEnvironmentVariable.cs b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppEnvironmentVariable.cs index fdceaced6a20..7943041ddff0 100644 --- a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppEnvironmentVariable.cs +++ b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppEnvironmentVariable.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.AppContainers; /// /// Container App container environment variable. /// -public partial class ContainerAppEnvironmentVariable : ProvisioningConstruct +public partial class ContainerAppEnvironmentVariable : ProvisionableConstruct { /// /// Environment variable name. diff --git a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppExtendedLocation.cs b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppExtendedLocation.cs index 262d62f61aad..92c96a3d0313 100644 --- a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppExtendedLocation.cs +++ b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppExtendedLocation.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.AppContainers; /// /// The complex type of the extended location. /// -public partial class ContainerAppExtendedLocation : ProvisioningConstruct +public partial class ContainerAppExtendedLocation : ProvisionableConstruct { /// /// The name of the extended location. diff --git a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppFacebookConfiguration.cs b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppFacebookConfiguration.cs index 4069bd932e1c..64650173783c 100644 --- a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppFacebookConfiguration.cs +++ b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppFacebookConfiguration.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.AppContainers; /// /// The configuration settings of the Facebook provider. /// -public partial class ContainerAppFacebookConfiguration : ProvisioningConstruct +public partial class ContainerAppFacebookConfiguration : ProvisionableConstruct { /// /// <code>false</code> if the Facebook provider should not be diff --git a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppForwardProxy.cs b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppForwardProxy.cs index 054ac0c99bde..78b753af6b53 100644 --- a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppForwardProxy.cs +++ b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppForwardProxy.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.AppContainers; /// /// The configuration settings of a forward proxy used to make the requests. /// -public partial class ContainerAppForwardProxy : ProvisioningConstruct +public partial class ContainerAppForwardProxy : ProvisionableConstruct { /// /// The convention used to determine the url of the request made. diff --git a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppGitHubActionConfiguration.cs b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppGitHubActionConfiguration.cs index 672f6a548554..9c15c799489d 100644 --- a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppGitHubActionConfiguration.cs +++ b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppGitHubActionConfiguration.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.AppContainers; /// Configuration properties that define the mutable settings of a Container /// App SourceControl. /// -public partial class ContainerAppGitHubActionConfiguration : ProvisioningConstruct +public partial class ContainerAppGitHubActionConfiguration : ProvisionableConstruct { /// /// Registry configurations. diff --git a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppGitHubConfiguration.cs b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppGitHubConfiguration.cs index c14e2c8bde99..ab2590fcd7f7 100644 --- a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppGitHubConfiguration.cs +++ b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppGitHubConfiguration.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.AppContainers; /// /// The configuration settings of the GitHub provider. /// -public partial class ContainerAppGitHubConfiguration : ProvisioningConstruct +public partial class ContainerAppGitHubConfiguration : ProvisionableConstruct { /// /// <code>false</code> if the GitHub provider should not be diff --git a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppGlobalValidation.cs b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppGlobalValidation.cs index 03478b049902..c396492f8c06 100644 --- a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppGlobalValidation.cs +++ b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppGlobalValidation.cs @@ -13,7 +13,7 @@ namespace Azure.Provisioning.AppContainers; /// The configuration settings that determines the validation flow of users /// using ContainerApp Service Authentication/Authorization. /// -public partial class ContainerAppGlobalValidation : ProvisioningConstruct +public partial class ContainerAppGlobalValidation : ProvisionableConstruct { /// /// The action to take when an unauthenticated client attempts to access diff --git a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppGoogleConfiguration.cs b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppGoogleConfiguration.cs index 69c19bb0b669..fc04053026b6 100644 --- a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppGoogleConfiguration.cs +++ b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppGoogleConfiguration.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.AppContainers; /// /// The configuration settings of the Google provider. /// -public partial class ContainerAppGoogleConfiguration : ProvisioningConstruct +public partial class ContainerAppGoogleConfiguration : ProvisionableConstruct { /// /// <code>false</code> if the Google provider should not be diff --git a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppHttpHeaderInfo.cs b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppHttpHeaderInfo.cs index 705b4be47419..6385373fcef7 100644 --- a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppHttpHeaderInfo.cs +++ b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppHttpHeaderInfo.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.AppContainers; /// /// HTTPHeader describes a custom header to be used in HTTP probes. /// -public partial class ContainerAppHttpHeaderInfo : ProvisioningConstruct +public partial class ContainerAppHttpHeaderInfo : ProvisionableConstruct { /// /// The header field name. diff --git a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppHttpRequestInfo.cs b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppHttpRequestInfo.cs index 056b231508a3..b9c9c52948be 100644 --- a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppHttpRequestInfo.cs +++ b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppHttpRequestInfo.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.AppContainers; /// /// HTTPGet specifies the http request to perform. /// -public partial class ContainerAppHttpRequestInfo : ProvisioningConstruct +public partial class ContainerAppHttpRequestInfo : ProvisionableConstruct { /// /// Host name to connect to, defaults to the pod IP. You probably want to diff --git a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppHttpScaleRule.cs b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppHttpScaleRule.cs index 3b285f8061d2..8023c44ef3d8 100644 --- a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppHttpScaleRule.cs +++ b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppHttpScaleRule.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.AppContainers; /// /// Container App container Http scaling rule. /// -public partial class ContainerAppHttpScaleRule : ProvisioningConstruct +public partial class ContainerAppHttpScaleRule : ProvisionableConstruct { /// /// Metadata properties to describe http scale rule. diff --git a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppHttpSettings.cs b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppHttpSettings.cs index f74d89ae79d0..86381ec56d3b 100644 --- a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppHttpSettings.cs +++ b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppHttpSettings.cs @@ -13,7 +13,7 @@ namespace Azure.Provisioning.AppContainers; /// authorization requests made against ContainerApp Service /// Authentication/Authorization. /// -public partial class ContainerAppHttpSettings : ProvisioningConstruct +public partial class ContainerAppHttpSettings : ProvisionableConstruct { /// /// <code>false</code> if the authentication/authorization diff --git a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppIPSecurityRestrictionRule.cs b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppIPSecurityRestrictionRule.cs index 8d24b830d890..5550d7b2bb8e 100644 --- a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppIPSecurityRestrictionRule.cs +++ b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppIPSecurityRestrictionRule.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.AppContainers; /// /// Rule to restrict incoming IP address. /// -public partial class ContainerAppIPSecurityRestrictionRule : ProvisioningConstruct +public partial class ContainerAppIPSecurityRestrictionRule : ProvisionableConstruct { /// /// Name for the IP restriction rule. diff --git a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppIdentityProvidersConfiguration.cs b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppIdentityProvidersConfiguration.cs index c0f7e96bc73b..180395765bc4 100644 --- a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppIdentityProvidersConfiguration.cs +++ b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppIdentityProvidersConfiguration.cs @@ -13,7 +13,7 @@ namespace Azure.Provisioning.AppContainers; /// The configuration settings of each of the identity providers used to /// configure ContainerApp Service Authentication/Authorization. /// -public partial class ContainerAppIdentityProvidersConfiguration : ProvisioningConstruct +public partial class ContainerAppIdentityProvidersConfiguration : ProvisionableConstruct { /// /// The configuration settings of the Azure Active directory provider. diff --git a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppIngressConfiguration.cs b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppIngressConfiguration.cs index ff3f15878c54..6493d2e7cb84 100644 --- a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppIngressConfiguration.cs +++ b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppIngressConfiguration.cs @@ -13,7 +13,7 @@ namespace Azure.Provisioning.AppContainers; /// /// Container App Ingress configuration. /// -public partial class ContainerAppIngressConfiguration : ProvisioningConstruct +public partial class ContainerAppIngressConfiguration : ProvisionableConstruct { /// /// Hostname. diff --git a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppInitContainer.cs b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppInitContainer.cs index b20cdf0a7663..8f6c36a90cea 100644 --- a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppInitContainer.cs +++ b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppInitContainer.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.AppContainers; /// /// Container App init container definition. /// -public partial class ContainerAppInitContainer : ProvisioningConstruct +public partial class ContainerAppInitContainer : ProvisionableConstruct { /// /// Container image tag. diff --git a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppJobConfiguration.cs b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppJobConfiguration.cs index d29b0a544fe8..96d9bba9d8ee 100644 --- a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppJobConfiguration.cs +++ b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppJobConfiguration.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.AppContainers; /// /// Non versioned Container Apps Job configuration properties. /// -public partial class ContainerAppJobConfiguration : ProvisioningConstruct +public partial class ContainerAppJobConfiguration : ProvisionableConstruct { /// /// Collection of secrets used by a Container Apps Job. diff --git a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppJobScale.cs b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppJobScale.cs index c502e7e6462d..2200d477c2a9 100644 --- a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppJobScale.cs +++ b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppJobScale.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.AppContainers; /// /// Scaling configurations for event driven jobs. /// -public partial class ContainerAppJobScale : ProvisioningConstruct +public partial class ContainerAppJobScale : ProvisionableConstruct { /// /// Interval to check each event source in seconds. Defaults to 30s. diff --git a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppJobScaleRule.cs b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppJobScaleRule.cs index e4f881fc9056..f07b28e68d29 100644 --- a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppJobScaleRule.cs +++ b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppJobScaleRule.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.AppContainers; /// /// Scaling rule. /// -public partial class ContainerAppJobScaleRule : ProvisioningConstruct +public partial class ContainerAppJobScaleRule : ProvisionableConstruct { /// /// Scale Rule Name. diff --git a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppJobTemplate.cs b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppJobTemplate.cs index 6f1281457d72..1bf0a1f7ad07 100644 --- a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppJobTemplate.cs +++ b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppJobTemplate.cs @@ -14,7 +14,7 @@ namespace Azure.Provisioning.AppContainers; /// state of an immutable revision. Any changes to this section Will result in /// a new revision being created. /// -public partial class ContainerAppJobTemplate : ProvisioningConstruct +public partial class ContainerAppJobTemplate : ProvisionableConstruct { /// /// List of specialized containers that run before app containers. diff --git a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppJwtClaimChecks.cs b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppJwtClaimChecks.cs index a3d92073356a..c413f7f2c0cd 100644 --- a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppJwtClaimChecks.cs +++ b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppJwtClaimChecks.cs @@ -13,7 +13,7 @@ namespace Azure.Provisioning.AppContainers; /// The configuration settings of the checks that should be made while /// validating the JWT Claims. /// -public partial class ContainerAppJwtClaimChecks : ProvisioningConstruct +public partial class ContainerAppJwtClaimChecks : ProvisionableConstruct { /// /// The list of the allowed groups. diff --git a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppLogAnalyticsConfiguration.cs b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppLogAnalyticsConfiguration.cs index cf225e122d80..6750efc0a5f1 100644 --- a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppLogAnalyticsConfiguration.cs +++ b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppLogAnalyticsConfiguration.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.AppContainers; /// Log Analytics configuration, must only be provided when destination is /// configured as 'log-analytics'. /// -public partial class ContainerAppLogAnalyticsConfiguration : ProvisioningConstruct +public partial class ContainerAppLogAnalyticsConfiguration : ProvisionableConstruct { /// /// Log analytics customer id. diff --git a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppLogin.cs b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppLogin.cs index 1d0af18324cd..1ce505b99402 100644 --- a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppLogin.cs +++ b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppLogin.cs @@ -13,7 +13,7 @@ namespace Azure.Provisioning.AppContainers; /// The configuration settings of the login flow of users using ContainerApp /// Service Authentication/Authorization. /// -public partial class ContainerAppLogin : ProvisioningConstruct +public partial class ContainerAppLogin : ProvisionableConstruct { /// /// The endpoint at which a logout request should be made. diff --git a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppLoginNonce.cs b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppLoginNonce.cs index 84bcbe49dcb5..99ce34f38602 100644 --- a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppLoginNonce.cs +++ b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppLoginNonce.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.AppContainers; /// /// The configuration settings of the nonce used in the login flow. /// -public partial class ContainerAppLoginNonce : ProvisioningConstruct +public partial class ContainerAppLoginNonce : ProvisionableConstruct { /// /// <code>false</code> if the nonce should not be validated diff --git a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppLogsConfiguration.cs b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppLogsConfiguration.cs index 4db591b7d78b..ddcec5dadd11 100644 --- a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppLogsConfiguration.cs +++ b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppLogsConfiguration.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.AppContainers; /// /// Configuration of application logs. /// -public partial class ContainerAppLogsConfiguration : ProvisioningConstruct +public partial class ContainerAppLogsConfiguration : ProvisionableConstruct { /// /// Logs destination, can be 'log-analytics', diff --git a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppOpenIdConnectClientCredential.cs b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppOpenIdConnectClientCredential.cs index bba2705658ef..944cc1591b57 100644 --- a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppOpenIdConnectClientCredential.cs +++ b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppOpenIdConnectClientCredential.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.AppContainers; /// The authentication client credentials of the custom Open ID Connect /// provider. /// -public partial class ContainerAppOpenIdConnectClientCredential : ProvisioningConstruct +public partial class ContainerAppOpenIdConnectClientCredential : ProvisionableConstruct { /// /// The method that should be used to authenticate the user. diff --git a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppOpenIdConnectConfig.cs b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppOpenIdConnectConfig.cs index 32e2104b7652..f24e5fcba190 100644 --- a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppOpenIdConnectConfig.cs +++ b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppOpenIdConnectConfig.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.AppContainers; /// The configuration settings of the endpoints used for the custom Open ID /// Connect provider. /// -public partial class ContainerAppOpenIdConnectConfig : ProvisioningConstruct +public partial class ContainerAppOpenIdConnectConfig : ProvisionableConstruct { /// /// The endpoint to be used to make an authorization request. diff --git a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppOpenIdConnectLogin.cs b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppOpenIdConnectLogin.cs index 167564009d86..09c86486012d 100644 --- a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppOpenIdConnectLogin.cs +++ b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppOpenIdConnectLogin.cs @@ -13,7 +13,7 @@ namespace Azure.Provisioning.AppContainers; /// The configuration settings of the login flow of the custom Open ID Connect /// provider. /// -public partial class ContainerAppOpenIdConnectLogin : ProvisioningConstruct +public partial class ContainerAppOpenIdConnectLogin : ProvisionableConstruct { /// /// The name of the claim that contains the users name. diff --git a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppOpenIdConnectRegistration.cs b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppOpenIdConnectRegistration.cs index 578100598500..1654fabb92cc 100644 --- a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppOpenIdConnectRegistration.cs +++ b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppOpenIdConnectRegistration.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.AppContainers; /// The configuration settings of the app registration for the custom Open ID /// Connect provider. /// -public partial class ContainerAppOpenIdConnectRegistration : ProvisioningConstruct +public partial class ContainerAppOpenIdConnectRegistration : ProvisionableConstruct { /// /// The client id of the custom Open ID Connect provider. diff --git a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppProbe.cs b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppProbe.cs index cf00d0ca6233..a0b49e03074f 100644 --- a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppProbe.cs +++ b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppProbe.cs @@ -13,7 +13,7 @@ namespace Azure.Provisioning.AppContainers; /// Probe describes a health check to be performed against a container to /// determine whether it is alive or ready to receive traffic. /// -public partial class ContainerAppProbe : ProvisioningConstruct +public partial class ContainerAppProbe : ProvisionableConstruct { /// /// Minimum consecutive failures for the probe to be considered failed diff --git a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppQueueScaleRule.cs b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppQueueScaleRule.cs index 0c8999fbc65a..e20d7b2b7906 100644 --- a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppQueueScaleRule.cs +++ b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppQueueScaleRule.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.AppContainers; /// /// Container App container Azure Queue based scaling rule. /// -public partial class ContainerAppQueueScaleRule : ProvisioningConstruct +public partial class ContainerAppQueueScaleRule : ProvisionableConstruct { /// /// Queue name. diff --git a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppRegistration.cs b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppRegistration.cs index 2516752f76d7..4d191cf28502 100644 --- a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppRegistration.cs +++ b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppRegistration.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.AppContainers; /// The configuration settings of the app registration for providers that have /// app ids and app secrets. /// -public partial class ContainerAppRegistration : ProvisioningConstruct +public partial class ContainerAppRegistration : ProvisionableConstruct { /// /// The App ID of the app used for login. diff --git a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppRegistryCredentials.cs b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppRegistryCredentials.cs index 96703e6d2246..44b0c6bc02ae 100644 --- a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppRegistryCredentials.cs +++ b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppRegistryCredentials.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.AppContainers; /// /// Container App Private Registry. /// -public partial class ContainerAppRegistryCredentials : ProvisioningConstruct +public partial class ContainerAppRegistryCredentials : ProvisionableConstruct { /// /// Container Registry Server. diff --git a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppRegistryInfo.cs b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppRegistryInfo.cs index 8c6e32c95041..1d62a8de0980 100644 --- a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppRegistryInfo.cs +++ b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppRegistryInfo.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.AppContainers; /// /// Container App registry information. /// -public partial class ContainerAppRegistryInfo : ProvisioningConstruct +public partial class ContainerAppRegistryInfo : ProvisionableConstruct { /// /// registry server Url. diff --git a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppRevisionTrafficWeight.cs b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppRevisionTrafficWeight.cs index 78aae0f1e643..ec33070daad0 100644 --- a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppRevisionTrafficWeight.cs +++ b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppRevisionTrafficWeight.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.AppContainers; /// /// Traffic weight assigned to a revision. /// -public partial class ContainerAppRevisionTrafficWeight : ProvisioningConstruct +public partial class ContainerAppRevisionTrafficWeight : ProvisionableConstruct { /// /// Name of a revision. diff --git a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppScale.cs b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppScale.cs index b7cb11cba2ca..de8955e9653d 100644 --- a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppScale.cs +++ b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppScale.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.AppContainers; /// /// Container App scaling configurations. /// -public partial class ContainerAppScale : ProvisioningConstruct +public partial class ContainerAppScale : ProvisionableConstruct { /// /// Optional. Minimum number of container replicas. diff --git a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppScaleRule.cs b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppScaleRule.cs index 4ad656f922ff..0fffdd972a0d 100644 --- a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppScaleRule.cs +++ b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppScaleRule.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.AppContainers; /// /// Container App container scaling rule. /// -public partial class ContainerAppScaleRule : ProvisioningConstruct +public partial class ContainerAppScaleRule : ProvisionableConstruct { /// /// Scale Rule Name. diff --git a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppScaleRuleAuth.cs b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppScaleRuleAuth.cs index 99619e3dab78..a480ae75ddfd 100644 --- a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppScaleRuleAuth.cs +++ b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppScaleRuleAuth.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.AppContainers; /// /// Auth Secrets for Scale Rule. /// -public partial class ContainerAppScaleRuleAuth : ProvisioningConstruct +public partial class ContainerAppScaleRuleAuth : ProvisionableConstruct { /// /// Name of the secret from which to pull the auth params. diff --git a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppServiceBind.cs b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppServiceBind.cs index 1917cfbdfffa..90c1dc9efc3c 100644 --- a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppServiceBind.cs +++ b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppServiceBind.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.AppContainers; /// /// Configuration to bind a ContainerApp to a dev ContainerApp Service. /// -public partial class ContainerAppServiceBind : ProvisioningConstruct +public partial class ContainerAppServiceBind : ProvisionableConstruct { /// /// Resource id of the target service. diff --git a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppTcpScaleRule.cs b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppTcpScaleRule.cs index 203e407dbd0c..f3fecfaec347 100644 --- a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppTcpScaleRule.cs +++ b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppTcpScaleRule.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.AppContainers; /// /// Container App container Tcp scaling rule. /// -public partial class ContainerAppTcpScaleRule : ProvisioningConstruct +public partial class ContainerAppTcpScaleRule : ProvisionableConstruct { /// /// Metadata properties to describe tcp scale rule. diff --git a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppTcpSocketRequestInfo.cs b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppTcpSocketRequestInfo.cs index e5d13f830e0b..3c6b0e14e760 100644 --- a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppTcpSocketRequestInfo.cs +++ b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppTcpSocketRequestInfo.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.AppContainers; /// TCPSocket specifies an action involving a TCP port. TCP hooks not yet /// supported. /// -public partial class ContainerAppTcpSocketRequestInfo : ProvisioningConstruct +public partial class ContainerAppTcpSocketRequestInfo : ProvisionableConstruct { /// /// Optional: Host name to connect to, defaults to the pod IP. diff --git a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppTemplate.cs b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppTemplate.cs index 0539d69f3315..d28304a4a3e3 100644 --- a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppTemplate.cs +++ b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppTemplate.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.AppContainers; /// desired state of an immutable revision. Any changes to this /// section Will result in a new revision being created /// -public partial class ContainerAppTemplate : ProvisioningConstruct +public partial class ContainerAppTemplate : ProvisionableConstruct { /// /// User friendly suffix that is appended to the revision name. diff --git a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppTokenStore.cs b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppTokenStore.cs index 64ccdd9d3d23..84ec6e2e534d 100644 --- a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppTokenStore.cs +++ b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppTokenStore.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.AppContainers; /// /// The configuration settings of the token store. /// -public partial class ContainerAppTokenStore : ProvisioningConstruct +public partial class ContainerAppTokenStore : ProvisionableConstruct { /// /// <code>true</code> to durably store platform-specific diff --git a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppTwitterConfiguration.cs b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppTwitterConfiguration.cs index ca76c6130496..721221bdbafc 100644 --- a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppTwitterConfiguration.cs +++ b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppTwitterConfiguration.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.AppContainers; /// /// The configuration settings of the Twitter provider. /// -public partial class ContainerAppTwitterConfiguration : ProvisioningConstruct +public partial class ContainerAppTwitterConfiguration : ProvisionableConstruct { /// /// <code>false</code> if the Twitter provider should not be diff --git a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppTwitterRegistration.cs b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppTwitterRegistration.cs index ce65db8bc268..5eaa887bca37 100644 --- a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppTwitterRegistration.cs +++ b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppTwitterRegistration.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.AppContainers; /// /// The configuration settings of the app registration for the Twitter provider. /// -public partial class ContainerAppTwitterRegistration : ProvisioningConstruct +public partial class ContainerAppTwitterRegistration : ProvisionableConstruct { /// /// The OAuth 1.0a consumer key of the Twitter application used for diff --git a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppVnetConfiguration.cs b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppVnetConfiguration.cs index 8a223c0635c7..f9b3896a096a 100644 --- a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppVnetConfiguration.cs +++ b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppVnetConfiguration.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.AppContainers; /// /// Configuration properties for apps environment to join a Virtual Network. /// -public partial class ContainerAppVnetConfiguration : ProvisioningConstruct +public partial class ContainerAppVnetConfiguration : ProvisionableConstruct { /// /// Boolean indicating the environment only has an internal load balancer. diff --git a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppVolume.cs b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppVolume.cs index d9f59f5d4dcf..e3813045c3a7 100644 --- a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppVolume.cs +++ b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppVolume.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.AppContainers; /// /// Volume definitions for the Container App. /// -public partial class ContainerAppVolume : ProvisioningConstruct +public partial class ContainerAppVolume : ProvisionableConstruct { /// /// Volume name. diff --git a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppVolumeMount.cs b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppVolumeMount.cs index 630c81d6a993..a612fa408f24 100644 --- a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppVolumeMount.cs +++ b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppVolumeMount.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.AppContainers; /// /// Volume mount for the Container App. /// -public partial class ContainerAppVolumeMount : ProvisioningConstruct +public partial class ContainerAppVolumeMount : ProvisionableConstruct { /// /// This must match the Name of a Volume. diff --git a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppWorkloadProfile.cs b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppWorkloadProfile.cs index 79a38b7a5165..2b344636cf36 100644 --- a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppWorkloadProfile.cs +++ b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppWorkloadProfile.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.AppContainers; /// /// Workload profile to scope container app execution. /// -public partial class ContainerAppWorkloadProfile : ProvisioningConstruct +public partial class ContainerAppWorkloadProfile : ProvisionableConstruct { /// /// Workload profile type for the workloads to run on. diff --git a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppWritableSecret.cs b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppWritableSecret.cs index d2f707588359..5c7aadc00c56 100644 --- a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppWritableSecret.cs +++ b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ContainerAppWritableSecret.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.AppContainers; /// /// Secret definition. /// -public partial class ContainerAppWritableSecret : ProvisioningConstruct +public partial class ContainerAppWritableSecret : ProvisionableConstruct { /// /// Secret Name. diff --git a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/EncryptionSettings.cs b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/EncryptionSettings.cs index 8d804fdfb9ee..ccb8422fc817 100644 --- a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/EncryptionSettings.cs +++ b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/EncryptionSettings.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.AppContainers; /// The configuration settings of the secrets references of encryption key and /// signing key for ContainerApp Service Authentication/Authorization. /// -public partial class EncryptionSettings : ProvisioningConstruct +public partial class EncryptionSettings : ProvisionableConstruct { /// /// The secret name which is referenced for EncryptionKey. diff --git a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/EventTriggerConfiguration.cs b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/EventTriggerConfiguration.cs index 28b77e56cca1..f0dfd05c20aa 100644 --- a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/EventTriggerConfiguration.cs +++ b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/EventTriggerConfiguration.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.AppContainers; /// /// Trigger configuration of an event driven job. /// -public partial class EventTriggerConfiguration : ProvisioningConstruct +public partial class EventTriggerConfiguration : ProvisionableConstruct { /// /// Minimum number of successful replica completions before overall job diff --git a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/IngressPortMapping.cs b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/IngressPortMapping.cs index 160063c2dfe9..7a5e1b16e81f 100644 --- a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/IngressPortMapping.cs +++ b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/IngressPortMapping.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.AppContainers; /// /// Port mappings of container app ingress. /// -public partial class IngressPortMapping : ProvisioningConstruct +public partial class IngressPortMapping : ProvisionableConstruct { /// /// Specifies whether the app port is accessible outside of the environment. diff --git a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/JobConfigurationManualTriggerConfig.cs b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/JobConfigurationManualTriggerConfig.cs index f6c9d494706b..98bf83e1ab0f 100644 --- a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/JobConfigurationManualTriggerConfig.cs +++ b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/JobConfigurationManualTriggerConfig.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.AppContainers; /// Manual trigger configuration for a single execution job. Properties /// replicaCompletionCount and parallelism would be set to 1 by default. /// -public partial class JobConfigurationManualTriggerConfig : ProvisioningConstruct +public partial class JobConfigurationManualTriggerConfig : ProvisionableConstruct { /// /// Minimum number of successful replica completions before overall job diff --git a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/JobConfigurationScheduleTriggerConfig.cs b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/JobConfigurationScheduleTriggerConfig.cs index ac0d00b39176..e73f6aa16b17 100644 --- a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/JobConfigurationScheduleTriggerConfig.cs +++ b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/JobConfigurationScheduleTriggerConfig.cs @@ -13,7 +13,7 @@ namespace Azure.Provisioning.AppContainers; /// cronjobs. Properties completions and parallelism would be set to 1 by /// default. /// -public partial class JobConfigurationScheduleTriggerConfig : ProvisioningConstruct +public partial class JobConfigurationScheduleTriggerConfig : ProvisionableConstruct { /// /// Minimum number of successful replica completions before overall job diff --git a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ManagedCertificateProperties.cs b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ManagedCertificateProperties.cs index 120469de40e4..f61b2deb8971 100644 --- a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ManagedCertificateProperties.cs +++ b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/ManagedCertificateProperties.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.AppContainers; /// /// Certificate resource specific properties. /// -public partial class ManagedCertificateProperties : ProvisioningConstruct +public partial class ManagedCertificateProperties : ProvisionableConstruct { /// /// Provisioning state of the certificate. diff --git a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/SecretVolumeItem.cs b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/SecretVolumeItem.cs index 9a72d7feeb86..36c098d769ec 100644 --- a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/SecretVolumeItem.cs +++ b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Generated/Models/SecretVolumeItem.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.AppContainers; /// /// Secret to be added to volume. /// -public partial class SecretVolumeItem : ProvisioningConstruct +public partial class SecretVolumeItem : ProvisionableConstruct { /// /// Name of the Container App secret from which to pull the secret value. diff --git a/sdk/provisioning/Azure.Provisioning.AppService/api/Azure.Provisioning.AppService.netstandard2.0.cs b/sdk/provisioning/Azure.Provisioning.AppService/api/Azure.Provisioning.AppService.netstandard2.0.cs index a2aebcde7a00..dd9bd9fbbb04 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/api/Azure.Provisioning.AppService.netstandard2.0.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/api/Azure.Provisioning.AppService.netstandard2.0.cs @@ -1,8 +1,8 @@ namespace Azure.Provisioning.AppService { - public partial class AppCertificate : Azure.Provisioning.Primitives.Resource + public partial class AppCertificate : Azure.Provisioning.Primitives.ProvisionableResource { - public AppCertificate(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public AppCertificate(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue CanonicalName { get { throw null; } set { } } public Azure.Provisioning.BicepValue CerBlob { get { throw null; } } public Azure.Provisioning.BicepValue DomainValidationMethod { get { throw null; } set { } } @@ -30,7 +30,7 @@ public partial class AppCertificate : Azure.Provisioning.Primitives.Resource public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } public Azure.Provisioning.BicepValue ThumbprintString { get { throw null; } } - public static Azure.Provisioning.AppService.AppCertificate FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.AppService.AppCertificate FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override Azure.Provisioning.Primitives.ResourceNameRequirements GetResourceNameRequirements() { throw null; } public static partial class ResourceVersions @@ -63,7 +63,7 @@ public static partial class ResourceVersions public static readonly string V2024_04_01; } } - public partial class AppDaprConfig : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class AppDaprConfig : Azure.Provisioning.Primitives.ProvisionableConstruct { public AppDaprConfig() { } public Azure.Provisioning.BicepValue AppId { get { throw null; } set { } } @@ -85,20 +85,20 @@ public enum AppDaprLogLevel [System.Runtime.Serialization.DataMemberAttribute(Name="error")] Error = 3, } - public partial class ApplicationLogsConfig : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ApplicationLogsConfig : Azure.Provisioning.Primitives.ProvisionableConstruct { public ApplicationLogsConfig() { } public Azure.Provisioning.BicepValue AzureBlobStorage { get { throw null; } set { } } public Azure.Provisioning.BicepValue AzureTableStorage { get { throw null; } set { } } public Azure.Provisioning.BicepValue FileSystemLevel { get { throw null; } set { } } } - public partial class AppLogsConfiguration : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class AppLogsConfiguration : Azure.Provisioning.Primitives.ProvisionableConstruct { public AppLogsConfiguration() { } public Azure.Provisioning.BicepValue Destination { get { throw null; } set { } } public Azure.Provisioning.BicepValue LogAnalyticsConfiguration { get { throw null; } set { } } } - public partial class AppServiceArmPlan : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class AppServiceArmPlan : Azure.Provisioning.Primitives.ProvisionableConstruct { public AppServiceArmPlan() { } public Azure.Provisioning.BicepValue Name { get { throw null; } } @@ -107,14 +107,14 @@ public AppServiceArmPlan() { } public Azure.Provisioning.BicepValue Publisher { get { throw null; } } public Azure.Provisioning.BicepValue Version { get { throw null; } } } - public partial class AppServiceBlobStorageApplicationLogsConfig : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class AppServiceBlobStorageApplicationLogsConfig : Azure.Provisioning.Primitives.ProvisionableConstruct { public AppServiceBlobStorageApplicationLogsConfig() { } public Azure.Provisioning.BicepValue Level { get { throw null; } set { } } public Azure.Provisioning.BicepValue RetentionInDays { get { throw null; } set { } } public Azure.Provisioning.BicepValue SasUri { get { throw null; } set { } } } - public partial class AppServiceBlobStorageHttpLogsConfig : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class AppServiceBlobStorageHttpLogsConfig : Azure.Provisioning.Primitives.ProvisionableConstruct { public AppServiceBlobStorageHttpLogsConfig() { } public Azure.Provisioning.BicepValue IsEnabled { get { throw null; } set { } } @@ -141,9 +141,9 @@ public AppServiceBlobStorageHttpLogsConfig() { } public static bool operator !=(Azure.Provisioning.AppService.AppServiceBuiltInRole left, Azure.Provisioning.AppService.AppServiceBuiltInRole right) { throw null; } public override string ToString() { throw null; } } - public partial class AppServiceCertificate : Azure.Provisioning.Primitives.Resource + public partial class AppServiceCertificate : Azure.Provisioning.Primitives.ProvisionableResource { - public AppServiceCertificate(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public AppServiceCertificate(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue KeyVaultId { get { throw null; } set { } } public Azure.Provisioning.BicepValue KeyVaultSecretName { get { throw null; } set { } } @@ -154,7 +154,7 @@ public partial class AppServiceCertificate : Azure.Provisioning.Primitives.Resou public Azure.Provisioning.BicepValue ProvisioningState { get { throw null; } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } - public static Azure.Provisioning.AppService.AppServiceCertificate FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.AppService.AppServiceCertificate FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2015_08_01; @@ -175,7 +175,7 @@ public static partial class ResourceVersions public static readonly string V2024_04_01; } } - public partial class AppServiceCertificateDetails : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class AppServiceCertificateDetails : Azure.Provisioning.Primitives.ProvisionableConstruct { public AppServiceCertificateDetails() { } public Azure.Provisioning.BicepValue Issuer { get { throw null; } } @@ -194,9 +194,9 @@ public enum AppServiceCertificateNotRenewableReason ExpirationNotInRenewalTimeRange = 1, SubscriptionNotActive = 2, } - public partial class AppServiceCertificateOrder : Azure.Provisioning.Primitives.Resource + public partial class AppServiceCertificateOrder : Azure.Provisioning.Primitives.ProvisionableResource { - public AppServiceCertificateOrder(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public AppServiceCertificateOrder(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepList AppServiceCertificateNotRenewableReasons { get { throw null; } } public Azure.Provisioning.BicepDictionary Certificates { get { throw null; } set { } } public Azure.Provisioning.BicepValue Contact { get { throw null; } } @@ -223,7 +223,7 @@ public partial class AppServiceCertificateOrder : Azure.Provisioning.Primitives. public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } public Azure.Provisioning.BicepValue ValidityInYears { get { throw null; } set { } } - public static Azure.Provisioning.AppService.AppServiceCertificateOrder FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.AppService.AppServiceCertificateOrder FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2015_08_01; @@ -244,14 +244,14 @@ public static partial class ResourceVersions public static readonly string V2024_04_01; } } - public partial class AppServiceCertificateProperties : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class AppServiceCertificateProperties : Azure.Provisioning.Primitives.ProvisionableConstruct { public AppServiceCertificateProperties() { } public Azure.Provisioning.BicepValue KeyVaultId { get { throw null; } set { } } public Azure.Provisioning.BicepValue KeyVaultSecretName { get { throw null; } set { } } public Azure.Provisioning.BicepValue ProvisioningState { get { throw null; } } } - public partial class AppServiceCorsSettings : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class AppServiceCorsSettings : Azure.Provisioning.Primitives.ProvisionableConstruct { public AppServiceCorsSettings() { } public Azure.Provisioning.BicepList AllowedOrigins { get { throw null; } set { } } @@ -262,9 +262,9 @@ public enum AppServiceDnsType AzureDns = 0, DefaultDomainRegistrarDns = 1, } - public partial class AppServiceDomain : Azure.Provisioning.Primitives.Resource + public partial class AppServiceDomain : Azure.Provisioning.Primitives.ProvisionableResource { - public AppServiceDomain(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public AppServiceDomain(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue AuthCode { get { throw null; } set { } } public Azure.Provisioning.BicepValue Consent { get { throw null; } set { } } public Azure.Provisioning.BicepValue ContactAdmin { get { throw null; } set { } } @@ -291,7 +291,7 @@ public partial class AppServiceDomain : Azure.Provisioning.Primitives.Resource public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } public Azure.Provisioning.BicepValue TargetDnsType { get { throw null; } set { } } - public static Azure.Provisioning.AppService.AppServiceDomain FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.AppService.AppServiceDomain FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2015_02_01; @@ -337,9 +337,9 @@ public enum AppServiceDomainStatus Updated = 19, JsonConverterFailed = 20, } - public partial class AppServiceEnvironment : Azure.Provisioning.Primitives.Resource + public partial class AppServiceEnvironment : Azure.Provisioning.Primitives.ProvisionableResource { - public AppServiceEnvironment(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public AppServiceEnvironment(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepList ClusterSettings { get { throw null; } set { } } public Azure.Provisioning.BicepValue CustomDnsSuffixConfiguration { get { throw null; } set { } } public Azure.Provisioning.BicepValue DedicatedHostCount { get { throw null; } set { } } @@ -366,7 +366,7 @@ public partial class AppServiceEnvironment : Azure.Provisioning.Primitives.Resou public Azure.Provisioning.BicepValue UpgradePreference { get { throw null; } set { } } public Azure.Provisioning.BicepList UserWhitelistedIPRanges { get { throw null; } set { } } public Azure.Provisioning.BicepValue VirtualNetwork { get { throw null; } set { } } - public static Azure.Provisioning.AppService.AppServiceEnvironment FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.AppService.AppServiceEnvironment FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2014_04_01; @@ -420,7 +420,7 @@ public enum AppServiceFtpsState FtpsOnly = 1, Disabled = 2, } - public partial class AppServiceHostName : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class AppServiceHostName : Azure.Provisioning.Primitives.ProvisionableConstruct { public AppServiceHostName() { } public Azure.Provisioning.BicepValue AzureResourceName { get { throw null; } } @@ -440,7 +440,7 @@ public enum AppServiceHostType Standard = 0, Repository = 1, } - public partial class AppServiceHttpLogsConfig : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class AppServiceHttpLogsConfig : Azure.Provisioning.Primitives.ProvisionableConstruct { public AppServiceHttpLogsConfig() { } public Azure.Provisioning.BicepValue AzureBlobStorage { get { throw null; } set { } } @@ -452,7 +452,7 @@ public enum AppServiceIPFilterTag XffProxy = 1, ServiceTag = 2, } - public partial class AppServiceIPSecurityRestriction : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class AppServiceIPSecurityRestriction : Azure.Provisioning.Primitives.ProvisionableConstruct { public AppServiceIPSecurityRestriction() { } public Azure.Provisioning.BicepValue Action { get { throw null; } set { } } @@ -467,15 +467,15 @@ public AppServiceIPSecurityRestriction() { } public Azure.Provisioning.BicepValue VnetSubnetResourceId { get { throw null; } set { } } public Azure.Provisioning.BicepValue VnetTrafficTag { get { throw null; } set { } } } - public partial class AppServiceNameValuePair : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class AppServiceNameValuePair : Azure.Provisioning.Primitives.ProvisionableConstruct { public AppServiceNameValuePair() { } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } public Azure.Provisioning.BicepValue Value { get { throw null; } set { } } } - public partial class AppServicePlan : Azure.Provisioning.Primitives.Resource + public partial class AppServicePlan : Azure.Provisioning.Primitives.ProvisionableResource { - public AppServicePlan(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public AppServicePlan(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue ExtendedLocation { get { throw null; } set { } } public Azure.Provisioning.BicepValue FreeOfferExpireOn { get { throw null; } set { } } public Azure.Provisioning.BicepValue GeoRegion { get { throw null; } } @@ -507,7 +507,7 @@ public partial class AppServicePlan : Azure.Provisioning.Primitives.Resource public Azure.Provisioning.BicepValue TargetWorkerCount { get { throw null; } set { } } public Azure.Provisioning.BicepValue TargetWorkerSizeId { get { throw null; } set { } } public Azure.Provisioning.BicepValue WorkerTierName { get { throw null; } set { } } - public static Azure.Provisioning.AppService.AppServicePlan FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.AppService.AppServicePlan FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override Azure.Provisioning.Primitives.ResourceNameRequirements GetResourceNameRequirements() { throw null; } public static partial class ResourceVersions @@ -548,30 +548,30 @@ public enum AppServicePlanStatus Pending = 1, Creating = 2, } - public partial class AppServicePlanVirtualNetworkConnectionGateway : Azure.Provisioning.Primitives.Resource + public partial class AppServicePlanVirtualNetworkConnectionGateway : Azure.Provisioning.Primitives.ProvisionableResource { - public AppServicePlanVirtualNetworkConnectionGateway(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public AppServicePlanVirtualNetworkConnectionGateway(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Kind { get { throw null; } set { } } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepValue VnetName { get { throw null; } set { } } public Azure.Provisioning.BicepValue VpnPackageUri { get { throw null; } set { } } - public static Azure.Provisioning.AppService.AppServicePlanVirtualNetworkConnectionGateway FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.AppService.AppServicePlanVirtualNetworkConnectionGateway FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } } public enum AppServiceResourceType { Website = 0, TrafficManager = 1, } - public partial class AppServiceSkuCapability : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class AppServiceSkuCapability : Azure.Provisioning.Primitives.ProvisionableConstruct { public AppServiceSkuCapability() { } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } public Azure.Provisioning.BicepValue Reason { get { throw null; } set { } } public Azure.Provisioning.BicepValue Value { get { throw null; } set { } } } - public partial class AppServiceSkuCapacity : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class AppServiceSkuCapacity : Azure.Provisioning.Primitives.ProvisionableConstruct { public AppServiceSkuCapacity() { } public Azure.Provisioning.BicepValue Default { get { throw null; } set { } } @@ -580,7 +580,7 @@ public AppServiceSkuCapacity() { } public Azure.Provisioning.BicepValue Minimum { get { throw null; } set { } } public Azure.Provisioning.BicepValue ScaleType { get { throw null; } set { } } } - public partial class AppServiceSkuDescription : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class AppServiceSkuDescription : Azure.Provisioning.Primitives.ProvisionableConstruct { public AppServiceSkuDescription() { } public Azure.Provisioning.BicepList Capabilities { get { throw null; } set { } } @@ -592,9 +592,9 @@ public AppServiceSkuDescription() { } public Azure.Provisioning.BicepValue SkuCapacity { get { throw null; } set { } } public Azure.Provisioning.BicepValue Tier { get { throw null; } set { } } } - public partial class AppServiceSourceControl : Azure.Provisioning.Primitives.Resource + public partial class AppServiceSourceControl : Azure.Provisioning.Primitives.ProvisionableResource { - public AppServiceSourceControl(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public AppServiceSourceControl(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue ExpireOn { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Kind { get { throw null; } set { } } @@ -603,7 +603,7 @@ public partial class AppServiceSourceControl : Azure.Provisioning.Primitives.Res public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepValue Token { get { throw null; } set { } } public Azure.Provisioning.BicepValue TokenSecret { get { throw null; } set { } } - public static Azure.Provisioning.AppService.AppServiceSourceControl FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.AppService.AppServiceSourceControl FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2014_04_01; @@ -634,7 +634,7 @@ public static partial class ResourceVersions public static readonly string V2024_04_01; } } - public partial class AppServiceStorageAccessInfo : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class AppServiceStorageAccessInfo : Azure.Provisioning.Primitives.ProvisionableConstruct { public AppServiceStorageAccessInfo() { } public Azure.Provisioning.BicepValue AccessKey { get { throw null; } set { } } @@ -674,7 +674,7 @@ public enum AppServiceSupportedTlsVersion [System.Runtime.Serialization.DataMemberAttribute(Name="1.3")] One3 = 3, } - public partial class AppServiceTableStorageApplicationLogsConfig : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class AppServiceTableStorageApplicationLogsConfig : Azure.Provisioning.Primitives.ProvisionableConstruct { public AppServiceTableStorageApplicationLogsConfig() { } public Azure.Provisioning.BicepValue Level { get { throw null; } set { } } @@ -722,7 +722,7 @@ public enum AppServiceUsageState Normal = 0, Exceeded = 1, } - public partial class AppServiceVirtualNetworkProfile : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class AppServiceVirtualNetworkProfile : Azure.Provisioning.Primitives.ProvisionableConstruct { public AppServiceVirtualNetworkProfile() { } public Azure.Provisioning.BicepValue Id { get { throw null; } set { } } @@ -730,7 +730,7 @@ public AppServiceVirtualNetworkProfile() { } public Azure.Provisioning.BicepValue ResourceType { get { throw null; } } public Azure.Provisioning.BicepValue Subnet { get { throw null; } set { } } } - public partial class AppServiceVirtualNetworkRoute : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class AppServiceVirtualNetworkRoute : Azure.Provisioning.Primitives.ProvisionableConstruct { public AppServiceVirtualNetworkRoute() { } public Azure.Provisioning.BicepValue EndAddress { get { throw null; } set { } } @@ -750,7 +750,7 @@ public enum AppServiceVirtualNetworkRouteType [System.Runtime.Serialization.DataMemberAttribute(Name="STATIC")] Static = 2, } - public partial class ArcConfiguration : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ArcConfiguration : Azure.Provisioning.Primitives.ProvisionableConstruct { public ArcConfiguration() { } public Azure.Provisioning.BicepValue ArtifactsStorageType { get { throw null; } set { } } @@ -766,9 +766,9 @@ public enum ArtifactStorageType LocalNode = 0, NetworkFileSystem = 1, } - public partial class AseV3NetworkingConfiguration : Azure.Provisioning.Primitives.Resource + public partial class AseV3NetworkingConfiguration : Azure.Provisioning.Primitives.ProvisionableResource { - public AseV3NetworkingConfiguration(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public AseV3NetworkingConfiguration(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue AllowNewPrivateEndpointConnections { get { throw null; } set { } } public Azure.Provisioning.BicepList ExternalInboundIPAddresses { get { throw null; } } public Azure.Provisioning.BicepValue Id { get { throw null; } } @@ -782,7 +782,7 @@ public partial class AseV3NetworkingConfiguration : Azure.Provisioning.Primitive public Azure.Provisioning.AppService.AppServiceEnvironment? Parent { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepList WindowsOutboundIPAddresses { get { throw null; } } - public static Azure.Provisioning.AppService.AseV3NetworkingConfiguration FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.AppService.AseV3NetworkingConfiguration FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2014_04_01; @@ -818,7 +818,7 @@ public static partial class ResourceVersions public static readonly string V2024_04_01; } } - public partial class AseV3NetworkingConfigurationData : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class AseV3NetworkingConfigurationData : Azure.Provisioning.Primitives.ProvisionableConstruct { public AseV3NetworkingConfigurationData() { } public Azure.Provisioning.BicepValue AllowNewPrivateEndpointConnections { get { throw null; } set { } } @@ -834,7 +834,7 @@ public AseV3NetworkingConfigurationData() { } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepList WindowsOutboundIPAddresses { get { throw null; } } } - public partial class AutoHealActions : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class AutoHealActions : Azure.Provisioning.Primitives.ProvisionableConstruct { public AutoHealActions() { } public Azure.Provisioning.BicepValue ActionType { get { throw null; } set { } } @@ -847,19 +847,19 @@ public enum AutoHealActionType LogEvent = 1, CustomAction = 2, } - public partial class AutoHealCustomAction : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class AutoHealCustomAction : Azure.Provisioning.Primitives.ProvisionableConstruct { public AutoHealCustomAction() { } public Azure.Provisioning.BicepValue Exe { get { throw null; } set { } } public Azure.Provisioning.BicepValue Parameters { get { throw null; } set { } } } - public partial class AutoHealRules : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class AutoHealRules : Azure.Provisioning.Primitives.ProvisionableConstruct { public AutoHealRules() { } public Azure.Provisioning.BicepValue Actions { get { throw null; } set { } } public Azure.Provisioning.BicepValue Triggers { get { throw null; } set { } } } - public partial class AutoHealTriggers : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class AutoHealTriggers : Azure.Provisioning.Primitives.ProvisionableConstruct { public AutoHealTriggers() { } public Azure.Provisioning.BicepValue PrivateBytesInKB { get { throw null; } set { } } @@ -869,7 +869,7 @@ public AutoHealTriggers() { } public Azure.Provisioning.BicepList StatusCodes { get { throw null; } set { } } public Azure.Provisioning.BicepList StatusCodesRange { get { throw null; } set { } } } - public partial class CertificateOrderContact : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class CertificateOrderContact : Azure.Provisioning.Primitives.ProvisionableConstruct { public CertificateOrderContact() { } public Azure.Provisioning.BicepValue Email { get { throw null; } } @@ -901,7 +901,7 @@ public enum ClientCertMode Optional = 1, OptionalInteractiveUser = 2, } - public partial class CloningInfo : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class CloningInfo : Azure.Provisioning.Primitives.ProvisionableConstruct { public CloningInfo() { } public Azure.Provisioning.BicepDictionary AppSettingsOverrides { get { throw null; } set { } } @@ -940,14 +940,14 @@ public enum ConnectionStringType [System.Runtime.Serialization.DataMemberAttribute(Name="PostgreSQL")] PostgreSql = 10, } - public partial class ConnStringInfo : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ConnStringInfo : Azure.Provisioning.Primitives.ProvisionableConstruct { public ConnStringInfo() { } public Azure.Provisioning.BicepValue ConnectionString { get { throw null; } set { } } public Azure.Provisioning.BicepValue ConnectionStringType { get { throw null; } set { } } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } } - public partial class ContainerAppsConfiguration : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerAppsConfiguration : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerAppsConfiguration() { } public Azure.Provisioning.BicepValue AppSubnetResourceId { get { throw null; } set { } } @@ -957,9 +957,9 @@ public ContainerAppsConfiguration() { } public Azure.Provisioning.BicepValue PlatformReservedCidr { get { throw null; } set { } } public Azure.Provisioning.BicepValue PlatformReservedDnsIP { get { throw null; } set { } } } - public partial class CustomDnsSuffixConfiguration : Azure.Provisioning.Primitives.Resource + public partial class CustomDnsSuffixConfiguration : Azure.Provisioning.Primitives.ProvisionableResource { - public CustomDnsSuffixConfiguration(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public CustomDnsSuffixConfiguration(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue CertificateUri { get { throw null; } set { } } public Azure.Provisioning.BicepValue DnsSuffix { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } @@ -970,7 +970,7 @@ public partial class CustomDnsSuffixConfiguration : Azure.Provisioning.Primitive public Azure.Provisioning.BicepValue ProvisioningDetails { get { throw null; } } public Azure.Provisioning.BicepValue ProvisioningState { get { throw null; } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.AppService.CustomDnsSuffixConfiguration FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.AppService.CustomDnsSuffixConfiguration FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2014_04_01; @@ -1006,7 +1006,7 @@ public static partial class ResourceVersions public static readonly string V2024_04_01; } } - public partial class CustomDnsSuffixConfigurationData : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class CustomDnsSuffixConfigurationData : Azure.Provisioning.Primitives.ProvisionableConstruct { public CustomDnsSuffixConfigurationData() { } public Azure.Provisioning.BicepValue CertificateUri { get { throw null; } set { } } @@ -1047,16 +1047,16 @@ public enum DomainNotRenewableReason ExpirationNotInRenewalTimeRange = 1, SubscriptionNotActive = 2, } - public partial class DomainOwnershipIdentifier : Azure.Provisioning.Primitives.Resource + public partial class DomainOwnershipIdentifier : Azure.Provisioning.Primitives.ProvisionableResource { - public DomainOwnershipIdentifier(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public DomainOwnershipIdentifier(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Kind { get { throw null; } set { } } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } public Azure.Provisioning.BicepValue OwnershipId { get { throw null; } set { } } public Azure.Provisioning.AppService.AppServiceDomain? Parent { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.AppService.DomainOwnershipIdentifier FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.AppService.DomainOwnershipIdentifier FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2015_02_01; @@ -1078,7 +1078,7 @@ public static partial class ResourceVersions public static readonly string V2024_04_01; } } - public partial class DomainPurchaseConsent : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class DomainPurchaseConsent : Azure.Provisioning.Primitives.ProvisionableConstruct { public DomainPurchaseConsent() { } public Azure.Provisioning.BicepValue AgreedBy { get { throw null; } set { } } @@ -1092,7 +1092,7 @@ public enum EnterpriseGradeCdnStatus Disabled = 2, Disabling = 3, } - public partial class FileSystemHttpLogsConfig : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class FileSystemHttpLogsConfig : Azure.Provisioning.Primitives.ProvisionableConstruct { public FileSystemHttpLogsConfig() { } public Azure.Provisioning.BicepValue IsEnabled { get { throw null; } set { } } @@ -1104,26 +1104,26 @@ public enum FrontEndServiceType NodePort = 0, LoadBalancer = 1, } - public partial class FunctionAppAlwaysReadyConfig : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class FunctionAppAlwaysReadyConfig : Azure.Provisioning.Primitives.ProvisionableConstruct { public FunctionAppAlwaysReadyConfig() { } public Azure.Provisioning.BicepValue InstanceCount { get { throw null; } set { } } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } } - public partial class FunctionAppConfig : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class FunctionAppConfig : Azure.Provisioning.Primitives.ProvisionableConstruct { public FunctionAppConfig() { } public Azure.Provisioning.BicepValue DeploymentStorage { get { throw null; } set { } } public Azure.Provisioning.BicepValue Runtime { get { throw null; } set { } } public Azure.Provisioning.BicepValue ScaleAndConcurrency { get { throw null; } set { } } } - public partial class FunctionAppResourceConfig : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class FunctionAppResourceConfig : Azure.Provisioning.Primitives.ProvisionableConstruct { public FunctionAppResourceConfig() { } public Azure.Provisioning.BicepValue Cpu { get { throw null; } set { } } public Azure.Provisioning.BicepValue Memory { get { throw null; } set { } } } - public partial class FunctionAppRuntime : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class FunctionAppRuntime : Azure.Provisioning.Primitives.ProvisionableConstruct { public FunctionAppRuntime() { } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } @@ -1144,7 +1144,7 @@ public enum FunctionAppRuntimeName [System.Runtime.Serialization.DataMemberAttribute(Name="custom")] Custom = 5, } - public partial class FunctionAppScaleAndConcurrency : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class FunctionAppScaleAndConcurrency : Azure.Provisioning.Primitives.ProvisionableConstruct { public FunctionAppScaleAndConcurrency() { } public Azure.Provisioning.BicepList AlwaysReady { get { throw null; } set { } } @@ -1152,7 +1152,7 @@ public FunctionAppScaleAndConcurrency() { } public Azure.Provisioning.BicepValue InstanceMemoryMB { get { throw null; } set { } } public Azure.Provisioning.BicepValue MaximumInstanceCount { get { throw null; } set { } } } - public partial class FunctionAppStorage : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class FunctionAppStorage : Azure.Provisioning.Primitives.ProvisionableConstruct { public FunctionAppStorage() { } public Azure.Provisioning.BicepValue Authentication { get { throw null; } set { } } @@ -1165,7 +1165,7 @@ public enum FunctionAppStorageAccountAuthenticationType UserAssignedIdentity = 1, StorageAccountConnectionString = 2, } - public partial class FunctionAppStorageAuthentication : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class FunctionAppStorageAuthentication : Azure.Provisioning.Primitives.ProvisionableConstruct { public FunctionAppStorageAuthentication() { } public Azure.Provisioning.BicepValue AuthenticationType { get { throw null; } set { } } @@ -1177,13 +1177,13 @@ public enum FunctionAppStorageType [System.Runtime.Serialization.DataMemberAttribute(Name="blobContainer")] BlobContainer = 0, } - public partial class GitHubActionCodeConfiguration : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class GitHubActionCodeConfiguration : Azure.Provisioning.Primitives.ProvisionableConstruct { public GitHubActionCodeConfiguration() { } public Azure.Provisioning.BicepValue RuntimeStack { get { throw null; } set { } } public Azure.Provisioning.BicepValue RuntimeVersion { get { throw null; } set { } } } - public partial class GitHubActionConfiguration : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class GitHubActionConfiguration : Azure.Provisioning.Primitives.ProvisionableConstruct { public GitHubActionConfiguration() { } public Azure.Provisioning.BicepValue CodeConfiguration { get { throw null; } set { } } @@ -1191,7 +1191,7 @@ public GitHubActionConfiguration() { } public Azure.Provisioning.BicepValue GenerateWorkflowFile { get { throw null; } set { } } public Azure.Provisioning.BicepValue IsLinux { get { throw null; } set { } } } - public partial class GitHubActionContainerConfiguration : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class GitHubActionContainerConfiguration : Azure.Provisioning.Primitives.ProvisionableConstruct { public GitHubActionContainerConfiguration() { } public Azure.Provisioning.BicepValue ImageName { get { throw null; } set { } } @@ -1199,9 +1199,9 @@ public GitHubActionContainerConfiguration() { } public Azure.Provisioning.BicepValue ServerUri { get { throw null; } set { } } public Azure.Provisioning.BicepValue Username { get { throw null; } set { } } } - public partial class HostingEnvironmentMultiRolePool : Azure.Provisioning.Primitives.Resource + public partial class HostingEnvironmentMultiRolePool : Azure.Provisioning.Primitives.ProvisionableResource { - public HostingEnvironmentMultiRolePool(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public HostingEnvironmentMultiRolePool(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue ComputeMode { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepList InstanceNames { get { throw null; } } @@ -1213,7 +1213,7 @@ public partial class HostingEnvironmentMultiRolePool : Azure.Provisioning.Primit public Azure.Provisioning.BicepValue WorkerCount { get { throw null; } set { } } public Azure.Provisioning.BicepValue WorkerSize { get { throw null; } set { } } public Azure.Provisioning.BicepValue WorkerSizeId { get { throw null; } set { } } - public static Azure.Provisioning.AppService.HostingEnvironmentMultiRolePool FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.AppService.HostingEnvironmentMultiRolePool FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2014_04_01; @@ -1248,9 +1248,9 @@ public static partial class ResourceVersions public static readonly string V2024_04_01; } } - public partial class HostingEnvironmentPrivateEndpointConnection : Azure.Provisioning.Primitives.Resource + public partial class HostingEnvironmentPrivateEndpointConnection : Azure.Provisioning.Primitives.ProvisionableResource { - public HostingEnvironmentPrivateEndpointConnection(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public HostingEnvironmentPrivateEndpointConnection(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepList IPAddresses { get { throw null; } set { } } public Azure.Provisioning.BicepValue Kind { get { throw null; } set { } } @@ -1260,7 +1260,7 @@ public partial class HostingEnvironmentPrivateEndpointConnection : Azure.Provisi public Azure.Provisioning.BicepValue PrivateLinkServiceConnectionState { get { throw null; } set { } } public Azure.Provisioning.BicepValue ProvisioningState { get { throw null; } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.AppService.HostingEnvironmentPrivateEndpointConnection FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.AppService.HostingEnvironmentPrivateEndpointConnection FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2014_04_01; @@ -1296,7 +1296,7 @@ public static partial class ResourceVersions public static readonly string V2024_04_01; } } - public partial class HostingEnvironmentProfile : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class HostingEnvironmentProfile : Azure.Provisioning.Primitives.ProvisionableConstruct { public HostingEnvironmentProfile() { } public Azure.Provisioning.BicepValue Id { get { throw null; } set { } } @@ -1310,9 +1310,9 @@ public enum HostingEnvironmentStatus Scaling = 2, Deleting = 3, } - public partial class HostingEnvironmentWorkerPool : Azure.Provisioning.Primitives.Resource + public partial class HostingEnvironmentWorkerPool : Azure.Provisioning.Primitives.ProvisionableResource { - public HostingEnvironmentWorkerPool(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public HostingEnvironmentWorkerPool(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue ComputeMode { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepList InstanceNames { get { throw null; } } @@ -1324,7 +1324,7 @@ public partial class HostingEnvironmentWorkerPool : Azure.Provisioning.Primitive public Azure.Provisioning.BicepValue WorkerCount { get { throw null; } set { } } public Azure.Provisioning.BicepValue WorkerSize { get { throw null; } set { } } public Azure.Provisioning.BicepValue WorkerSizeId { get { throw null; } set { } } - public static Azure.Provisioning.AppService.HostingEnvironmentWorkerPool FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.AppService.HostingEnvironmentWorkerPool FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2014_04_01; @@ -1366,7 +1366,7 @@ public enum HostNameBindingSslState [System.Runtime.Serialization.DataMemberAttribute(Name="IpBasedEnabled")] IPBasedEnabled = 2, } - public partial class HostNameSslState : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class HostNameSslState : Azure.Provisioning.Primitives.ProvisionableConstruct { public HostNameSslState() { } public Azure.Provisioning.BicepValue HostType { get { throw null; } set { } } @@ -1376,7 +1376,7 @@ public HostNameSslState() { } public Azure.Provisioning.BicepValue ToUpdate { get { throw null; } set { } } public Azure.Provisioning.BicepValue VirtualIP { get { throw null; } set { } } } - public partial class HttpRequestHandlerMapping : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class HttpRequestHandlerMapping : Azure.Provisioning.Primitives.ProvisionableConstruct { public HttpRequestHandlerMapping() { } public Azure.Provisioning.BicepValue Arguments { get { throw null; } set { } } @@ -1397,9 +1397,9 @@ public enum KeyVaultSecretStatus UnknownError = 9, ExternalPrivateKey = 10, } - public partial class KubeEnvironment : Azure.Provisioning.Primitives.Resource + public partial class KubeEnvironment : Azure.Provisioning.Primitives.ProvisionableResource { - public KubeEnvironment(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public KubeEnvironment(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue AksResourceId { get { throw null; } set { } } public Azure.Provisioning.BicepValue AppLogsConfiguration { get { throw null; } set { } } public Azure.Provisioning.BicepValue ArcConfiguration { get { throw null; } set { } } @@ -1417,13 +1417,13 @@ public partial class KubeEnvironment : Azure.Provisioning.Primitives.Resource public Azure.Provisioning.BicepValue StaticIP { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } - public static Azure.Provisioning.AppService.KubeEnvironment FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.AppService.KubeEnvironment FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2021_03_01; } } - public partial class KubeEnvironmentProfile : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class KubeEnvironmentProfile : Azure.Provisioning.Primitives.ProvisionableConstruct { public KubeEnvironmentProfile() { } public Azure.Provisioning.BicepValue Id { get { throw null; } set { } } @@ -1451,15 +1451,15 @@ public enum LoadBalancingMode [System.Runtime.Serialization.DataMemberAttribute(Name="Web, Publishing")] WebPublishing = 3, } - public partial class LogAnalyticsConfiguration : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class LogAnalyticsConfiguration : Azure.Provisioning.Primitives.ProvisionableConstruct { public LogAnalyticsConfiguration() { } public Azure.Provisioning.BicepValue CustomerId { get { throw null; } set { } } public Azure.Provisioning.BicepValue SharedKey { get { throw null; } set { } } } - public partial class LogsSiteConfig : Azure.Provisioning.Primitives.Resource + public partial class LogsSiteConfig : Azure.Provisioning.Primitives.ProvisionableResource { - public LogsSiteConfig(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public LogsSiteConfig(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue ApplicationLogs { get { throw null; } set { } } public Azure.Provisioning.BicepValue HttpLogs { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } @@ -1469,7 +1469,7 @@ public partial class LogsSiteConfig : Azure.Provisioning.Primitives.Resource public Azure.Provisioning.BicepValue Name { get { throw null; } } public Azure.Provisioning.AppService.WebSite? Parent { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.AppService.LogsSiteConfig FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.AppService.LogsSiteConfig FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2014_04_01; @@ -1505,9 +1505,9 @@ public static partial class ResourceVersions public static readonly string V2024_04_01; } } - public partial class LogsSiteSlotConfig : Azure.Provisioning.Primitives.Resource + public partial class LogsSiteSlotConfig : Azure.Provisioning.Primitives.ProvisionableResource { - public LogsSiteSlotConfig(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public LogsSiteSlotConfig(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue ApplicationLogs { get { throw null; } set { } } public Azure.Provisioning.BicepValue HttpLogs { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } @@ -1517,7 +1517,7 @@ public partial class LogsSiteSlotConfig : Azure.Provisioning.Primitives.Resource public Azure.Provisioning.BicepValue Name { get { throw null; } } public Azure.Provisioning.AppService.WebSiteSlot? Parent { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.AppService.LogsSiteSlotConfig FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.AppService.LogsSiteSlotConfig FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2014_04_01; @@ -1571,13 +1571,13 @@ public enum MSDeployProvisioningState [System.Runtime.Serialization.DataMemberAttribute(Name="canceled")] Canceled = 4, } - public partial class PrivateAccessSubnet : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class PrivateAccessSubnet : Azure.Provisioning.Primitives.ProvisionableConstruct { public PrivateAccessSubnet() { } public Azure.Provisioning.BicepValue Key { get { throw null; } set { } } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } } - public partial class PrivateAccessVirtualNetwork : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class PrivateAccessVirtualNetwork : Azure.Provisioning.Primitives.ProvisionableConstruct { public PrivateAccessVirtualNetwork() { } public Azure.Provisioning.BicepValue Key { get { throw null; } set { } } @@ -1585,7 +1585,7 @@ public PrivateAccessVirtualNetwork() { } public Azure.Provisioning.BicepValue ResourceId { get { throw null; } set { } } public Azure.Provisioning.BicepList Subnets { get { throw null; } set { } } } - public partial class PrivateLinkConnectionState : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class PrivateLinkConnectionState : Azure.Provisioning.Primitives.ProvisionableConstruct { public PrivateLinkConnectionState() { } public Azure.Provisioning.BicepValue ActionsRequired { get { throw null; } set { } } @@ -1606,9 +1606,9 @@ public enum PublicCertificateLocation CurrentUserMy = 1, LocalMachineMy = 2, } - public partial class PublishingUser : Azure.Provisioning.Primitives.Resource + public partial class PublishingUser : Azure.Provisioning.Primitives.ProvisionableResource { - public PublishingUser(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public PublishingUser(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Kind { get { throw null; } set { } } public Azure.Provisioning.BicepValue Name { get { throw null; } } @@ -1618,7 +1618,7 @@ public partial class PublishingUser : Azure.Provisioning.Primitives.Resource public Azure.Provisioning.BicepValue PublishingUserName { get { throw null; } set { } } public Azure.Provisioning.BicepValue ScmUri { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.AppService.PublishingUser FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.AppService.PublishingUser FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2014_04_01; @@ -1649,7 +1649,7 @@ public static partial class ResourceVersions public static readonly string V2024_04_01; } } - public partial class RampUpRule : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class RampUpRule : Azure.Provisioning.Primitives.ProvisionableConstruct { public RampUpRule() { } public Azure.Provisioning.BicepValue ActionHostName { get { throw null; } set { } } @@ -1669,7 +1669,7 @@ public enum RedundancyMode ActiveActive = 3, GeoRedundant = 4, } - public partial class RegistrationAddressInfo : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class RegistrationAddressInfo : Azure.Provisioning.Primitives.ProvisionableConstruct { public RegistrationAddressInfo() { } public Azure.Provisioning.BicepValue Address1 { get { throw null; } set { } } @@ -1679,7 +1679,7 @@ public RegistrationAddressInfo() { } public Azure.Provisioning.BicepValue PostalCode { get { throw null; } set { } } public Azure.Provisioning.BicepValue State { get { throw null; } set { } } } - public partial class RegistrationContactInfo : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class RegistrationContactInfo : Azure.Provisioning.Primitives.ProvisionableConstruct { public RegistrationContactInfo() { } public Azure.Provisioning.BicepValue AddressMailing { get { throw null; } set { } } @@ -1692,7 +1692,7 @@ public RegistrationContactInfo() { } public Azure.Provisioning.BicepValue Organization { get { throw null; } set { } } public Azure.Provisioning.BicepValue Phone { get { throw null; } set { } } } - public partial class RemotePrivateEndpointConnection : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class RemotePrivateEndpointConnection : Azure.Provisioning.Primitives.ProvisionableConstruct { public RemotePrivateEndpointConnection() { } public Azure.Provisioning.BicepValue Id { get { throw null; } } @@ -1704,13 +1704,13 @@ public RemotePrivateEndpointConnection() { } public Azure.Provisioning.BicepValue ProvisioningState { get { throw null; } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } } - public partial class RequestsBasedTrigger : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class RequestsBasedTrigger : Azure.Provisioning.Primitives.ProvisionableConstruct { public RequestsBasedTrigger() { } public Azure.Provisioning.BicepValue Count { get { throw null; } set { } } public Azure.Provisioning.BicepValue TimeInterval { get { throw null; } set { } } } - public partial class ResponseMessageEnvelopeRemotePrivateEndpointConnection : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ResponseMessageEnvelopeRemotePrivateEndpointConnection : Azure.Provisioning.Primitives.ProvisionableConstruct { public ResponseMessageEnvelopeRemotePrivateEndpointConnection() { } public Azure.Provisioning.BicepValue Error { get { throw null; } } @@ -1726,16 +1726,16 @@ public ResponseMessageEnvelopeRemotePrivateEndpointConnection() { } public Azure.Provisioning.BicepDictionary Tags { get { throw null; } } public Azure.Provisioning.BicepList Zones { get { throw null; } } } - public partial class ScmSiteBasicPublishingCredentialsPolicy : Azure.Provisioning.Primitives.Resource + public partial class ScmSiteBasicPublishingCredentialsPolicy : Azure.Provisioning.Primitives.ProvisionableResource { - public ScmSiteBasicPublishingCredentialsPolicy(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public ScmSiteBasicPublishingCredentialsPolicy(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Allow { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Kind { get { throw null; } set { } } public Azure.Provisioning.BicepValue Name { get { throw null; } } public Azure.Provisioning.AppService.WebSite? Parent { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.AppService.ScmSiteBasicPublishingCredentialsPolicy FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.AppService.ScmSiteBasicPublishingCredentialsPolicy FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2014_04_01; @@ -1771,16 +1771,16 @@ public static partial class ResourceVersions public static readonly string V2024_04_01; } } - public partial class ScmSiteSlotBasicPublishingCredentialsPolicy : Azure.Provisioning.Primitives.Resource + public partial class ScmSiteSlotBasicPublishingCredentialsPolicy : Azure.Provisioning.Primitives.ProvisionableResource { - public ScmSiteSlotBasicPublishingCredentialsPolicy(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public ScmSiteSlotBasicPublishingCredentialsPolicy(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Allow { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Kind { get { throw null; } set { } } public Azure.Provisioning.BicepValue Name { get { throw null; } } public Azure.Provisioning.AppService.WebSiteSlot? Parent { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.AppService.ScmSiteSlotBasicPublishingCredentialsPolicy FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.AppService.ScmSiteSlotBasicPublishingCredentialsPolicy FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2014_04_01; @@ -1834,7 +1834,7 @@ public enum ScmType [System.Runtime.Serialization.DataMemberAttribute(Name="VSTSRM")] Vstsrm = 13, } - public partial class SiteConfigProperties : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class SiteConfigProperties : Azure.Provisioning.Primitives.ProvisionableConstruct { public SiteConfigProperties() { } public Azure.Provisioning.BicepValue AcrUserManagedIdentityId { get { throw null; } set { } } @@ -1910,9 +1910,9 @@ public SiteConfigProperties() { } public Azure.Provisioning.BicepValue WindowsFxVersion { get { throw null; } set { } } public Azure.Provisioning.BicepValue XManagedServiceIdentityId { get { throw null; } set { } } } - public partial class SiteContainer : Azure.Provisioning.Primitives.Resource + public partial class SiteContainer : Azure.Provisioning.Primitives.ProvisionableResource { - public SiteContainer(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public SiteContainer(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue AuthType { get { throw null; } set { } } public Azure.Provisioning.BicepValue CreatedOn { get { throw null; } } public Azure.Provisioning.BicepList EnvironmentVariables { get { throw null; } set { } } @@ -1930,7 +1930,7 @@ public partial class SiteContainer : Azure.Provisioning.Primitives.Resource public Azure.Provisioning.BicepValue UserManagedIdentityClientId { get { throw null; } set { } } public Azure.Provisioning.BicepValue UserName { get { throw null; } set { } } public Azure.Provisioning.BicepList VolumeMounts { get { throw null; } set { } } - public static Azure.Provisioning.AppService.SiteContainer FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.AppService.SiteContainer FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2014_04_01; @@ -1973,7 +1973,7 @@ public enum SiteContainerAuthType SystemIdentity = 2, UserAssigned = 3, } - public partial class SiteContainerVolumeMount : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class SiteContainerVolumeMount : Azure.Provisioning.Primitives.ProvisionableConstruct { public SiteContainerVolumeMount() { } public Azure.Provisioning.BicepValue ContainerMountPath { get { throw null; } set { } } @@ -1986,9 +1986,9 @@ public enum SiteDefaultAction Allow = 0, Deny = 1, } - public partial class SiteDeployment : Azure.Provisioning.Primitives.Resource + public partial class SiteDeployment : Azure.Provisioning.Primitives.ProvisionableResource { - public SiteDeployment(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public SiteDeployment(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Author { get { throw null; } set { } } public Azure.Provisioning.BicepValue AuthorEmail { get { throw null; } set { } } public Azure.Provisioning.BicepValue Deployer { get { throw null; } set { } } @@ -2002,7 +2002,7 @@ public partial class SiteDeployment : Azure.Provisioning.Primitives.Resource public Azure.Provisioning.BicepValue StartOn { get { throw null; } set { } } public Azure.Provisioning.BicepValue Status { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.AppService.SiteDeployment FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.AppService.SiteDeployment FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2014_04_01; @@ -2038,7 +2038,7 @@ public static partial class ResourceVersions public static readonly string V2024_04_01; } } - public partial class SiteDnsConfig : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class SiteDnsConfig : Azure.Provisioning.Primitives.ProvisionableConstruct { public SiteDnsConfig() { } public Azure.Provisioning.BicepValue DnsAltServer { get { throw null; } set { } } @@ -2048,16 +2048,16 @@ public SiteDnsConfig() { } public Azure.Provisioning.BicepValue DnsRetryAttemptTimeout { get { throw null; } set { } } public Azure.Provisioning.BicepList DnsServers { get { throw null; } set { } } } - public partial class SiteDomainOwnershipIdentifier : Azure.Provisioning.Primitives.Resource + public partial class SiteDomainOwnershipIdentifier : Azure.Provisioning.Primitives.ProvisionableResource { - public SiteDomainOwnershipIdentifier(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public SiteDomainOwnershipIdentifier(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Kind { get { throw null; } set { } } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } public Azure.Provisioning.AppService.WebSite? Parent { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepValue Value { get { throw null; } set { } } - public static Azure.Provisioning.AppService.SiteDomainOwnershipIdentifier FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.AppService.SiteDomainOwnershipIdentifier FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2014_04_01; @@ -2093,9 +2093,9 @@ public static partial class ResourceVersions public static readonly string V2024_04_01; } } - public partial class SiteExtension : Azure.Provisioning.Primitives.Resource + public partial class SiteExtension : Azure.Provisioning.Primitives.ProvisionableResource { - public SiteExtension(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public SiteExtension(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue ConnectionString { get { throw null; } set { } } public Azure.Provisioning.BicepValue DBType { get { throw null; } set { } } public Azure.Provisioning.BicepValue Deployer { get { throw null; } } @@ -2113,7 +2113,7 @@ public partial class SiteExtension : Azure.Provisioning.Primitives.Resource public Azure.Provisioning.BicepValue SkipAppData { get { throw null; } set { } } public Azure.Provisioning.BicepValue StartOn { get { throw null; } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.AppService.SiteExtension FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.AppService.SiteExtension FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2014_04_01; @@ -2154,9 +2154,9 @@ public enum SiteExtensionType Gallery = 0, WebRoot = 1, } - public partial class SiteFunction : Azure.Provisioning.Primitives.Resource + public partial class SiteFunction : Azure.Provisioning.Primitives.ProvisionableResource { - public SiteFunction(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public SiteFunction(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Config { get { throw null; } set { } } public Azure.Provisioning.BicepValue ConfigHref { get { throw null; } set { } } public Azure.Provisioning.BicepDictionary Files { get { throw null; } set { } } @@ -2175,7 +2175,7 @@ public partial class SiteFunction : Azure.Provisioning.Primitives.Resource public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepValue TestData { get { throw null; } set { } } public Azure.Provisioning.BicepValue TestDataHref { get { throw null; } set { } } - public static Azure.Provisioning.AppService.SiteFunction FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.AppService.SiteFunction FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2014_04_01; @@ -2211,9 +2211,9 @@ public static partial class ResourceVersions public static readonly string V2024_04_01; } } - public partial class SiteHostNameBinding : Azure.Provisioning.Primitives.Resource + public partial class SiteHostNameBinding : Azure.Provisioning.Primitives.ProvisionableResource { - public SiteHostNameBinding(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public SiteHostNameBinding(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue AzureResourceName { get { throw null; } set { } } public Azure.Provisioning.BicepValue AzureResourceType { get { throw null; } set { } } public Azure.Provisioning.BicepValue CustomHostNameDnsRecordType { get { throw null; } set { } } @@ -2228,7 +2228,7 @@ public partial class SiteHostNameBinding : Azure.Provisioning.Primitives.Resourc public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepValue ThumbprintString { get { throw null; } set { } } public Azure.Provisioning.BicepValue VirtualIP { get { throw null; } } - public static Azure.Provisioning.AppService.SiteHostNameBinding FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.AppService.SiteHostNameBinding FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2015_02_01; @@ -2257,9 +2257,9 @@ public static partial class ResourceVersions public static readonly string V2024_04_01; } } - public partial class SiteHybridConnectionNamespaceRelay : Azure.Provisioning.Primitives.Resource + public partial class SiteHybridConnectionNamespaceRelay : Azure.Provisioning.Primitives.ProvisionableResource { - public SiteHybridConnectionNamespaceRelay(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public SiteHybridConnectionNamespaceRelay(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Hostname { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Kind { get { throw null; } set { } } @@ -2272,11 +2272,11 @@ public partial class SiteHybridConnectionNamespaceRelay : Azure.Provisioning.Pri public Azure.Provisioning.BicepValue ServiceBusNamespace { get { throw null; } set { } } public Azure.Provisioning.BicepValue ServiceBusSuffix { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.AppService.SiteHybridConnectionNamespaceRelay FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.AppService.SiteHybridConnectionNamespaceRelay FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } } - public partial class SiteInstanceExtension : Azure.Provisioning.Primitives.Resource + public partial class SiteInstanceExtension : Azure.Provisioning.Primitives.ProvisionableResource { - public SiteInstanceExtension(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public SiteInstanceExtension(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue ConnectionString { get { throw null; } set { } } public Azure.Provisioning.BicepValue DBType { get { throw null; } set { } } public Azure.Provisioning.BicepValue Deployer { get { throw null; } } @@ -2293,9 +2293,9 @@ public partial class SiteInstanceExtension : Azure.Provisioning.Primitives.Resou public Azure.Provisioning.BicepValue SkipAppData { get { throw null; } set { } } public Azure.Provisioning.BicepValue StartOn { get { throw null; } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.AppService.SiteInstanceExtension FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.AppService.SiteInstanceExtension FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } } - public partial class SiteLimits : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class SiteLimits : Azure.Provisioning.Primitives.ProvisionableConstruct { public SiteLimits() { } public Azure.Provisioning.BicepValue MaxDiskSizeInMb { get { throw null; } set { } } @@ -2311,7 +2311,7 @@ public enum SiteLoadBalancing RequestHash = 4, PerSiteRoundRobin = 5, } - public partial class SiteMachineKey : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class SiteMachineKey : Azure.Provisioning.Primitives.ProvisionableConstruct { public SiteMachineKey() { } public Azure.Provisioning.BicepValue Decryption { get { throw null; } } @@ -2319,9 +2319,9 @@ public SiteMachineKey() { } public Azure.Provisioning.BicepValue Validation { get { throw null; } } public Azure.Provisioning.BicepValue ValidationKey { get { throw null; } } } - public partial class SiteNetworkConfig : Azure.Provisioning.Primitives.Resource + public partial class SiteNetworkConfig : Azure.Provisioning.Primitives.ProvisionableResource { - public SiteNetworkConfig(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public SiteNetworkConfig(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue IsSwiftSupported { get { throw null; } set { } } public Azure.Provisioning.BicepValue Kind { get { throw null; } set { } } @@ -2329,7 +2329,7 @@ public partial class SiteNetworkConfig : Azure.Provisioning.Primitives.Resource public Azure.Provisioning.AppService.WebSite? Parent { get { throw null; } set { } } public Azure.Provisioning.BicepValue SubnetResourceId { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.AppService.SiteNetworkConfig FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.AppService.SiteNetworkConfig FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2015_02_01; @@ -2358,9 +2358,9 @@ public static partial class ResourceVersions public static readonly string V2024_04_01; } } - public partial class SitePrivateEndpointConnection : Azure.Provisioning.Primitives.Resource + public partial class SitePrivateEndpointConnection : Azure.Provisioning.Primitives.ProvisionableResource { - public SitePrivateEndpointConnection(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public SitePrivateEndpointConnection(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepList IPAddresses { get { throw null; } set { } } public Azure.Provisioning.BicepValue Kind { get { throw null; } set { } } @@ -2370,7 +2370,7 @@ public partial class SitePrivateEndpointConnection : Azure.Provisioning.Primitiv public Azure.Provisioning.BicepValue PrivateLinkServiceConnectionState { get { throw null; } set { } } public Azure.Provisioning.BicepValue ProvisioningState { get { throw null; } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.AppService.SitePrivateEndpointConnection FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.AppService.SitePrivateEndpointConnection FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override Azure.Provisioning.Primitives.ResourceNameRequirements GetResourceNameRequirements() { throw null; } public static partial class ResourceVersions @@ -2408,9 +2408,9 @@ public static partial class ResourceVersions public static readonly string V2024_04_01; } } - public partial class SitePublicCertificate : Azure.Provisioning.Primitives.Resource + public partial class SitePublicCertificate : Azure.Provisioning.Primitives.ProvisionableResource { - public SitePublicCertificate(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public SitePublicCertificate(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Blob { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Kind { get { throw null; } set { } } @@ -2419,7 +2419,7 @@ public partial class SitePublicCertificate : Azure.Provisioning.Primitives.Resou public Azure.Provisioning.BicepValue PublicCertificateLocation { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepValue ThumbprintString { get { throw null; } } - public static Azure.Provisioning.AppService.SitePublicCertificate FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.AppService.SitePublicCertificate FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2014_04_01; @@ -2455,9 +2455,9 @@ public static partial class ResourceVersions public static readonly string V2024_04_01; } } - public partial class SiteSlotDeployment : Azure.Provisioning.Primitives.Resource + public partial class SiteSlotDeployment : Azure.Provisioning.Primitives.ProvisionableResource { - public SiteSlotDeployment(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public SiteSlotDeployment(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Author { get { throw null; } set { } } public Azure.Provisioning.BicepValue AuthorEmail { get { throw null; } set { } } public Azure.Provisioning.BicepValue Deployer { get { throw null; } set { } } @@ -2471,7 +2471,7 @@ public partial class SiteSlotDeployment : Azure.Provisioning.Primitives.Resource public Azure.Provisioning.BicepValue StartOn { get { throw null; } set { } } public Azure.Provisioning.BicepValue Status { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.AppService.SiteSlotDeployment FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.AppService.SiteSlotDeployment FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2014_04_01; @@ -2507,16 +2507,16 @@ public static partial class ResourceVersions public static readonly string V2024_04_01; } } - public partial class SiteSlotDomainOwnershipIdentifier : Azure.Provisioning.Primitives.Resource + public partial class SiteSlotDomainOwnershipIdentifier : Azure.Provisioning.Primitives.ProvisionableResource { - public SiteSlotDomainOwnershipIdentifier(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public SiteSlotDomainOwnershipIdentifier(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Kind { get { throw null; } set { } } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } public Azure.Provisioning.AppService.WebSiteSlot? Parent { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepValue Value { get { throw null; } set { } } - public static Azure.Provisioning.AppService.SiteSlotDomainOwnershipIdentifier FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.AppService.SiteSlotDomainOwnershipIdentifier FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2014_04_01; @@ -2552,9 +2552,9 @@ public static partial class ResourceVersions public static readonly string V2024_04_01; } } - public partial class SiteSlotExtension : Azure.Provisioning.Primitives.Resource + public partial class SiteSlotExtension : Azure.Provisioning.Primitives.ProvisionableResource { - public SiteSlotExtension(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public SiteSlotExtension(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue ConnectionString { get { throw null; } set { } } public Azure.Provisioning.BicepValue DBType { get { throw null; } set { } } public Azure.Provisioning.BicepValue Deployer { get { throw null; } } @@ -2572,7 +2572,7 @@ public partial class SiteSlotExtension : Azure.Provisioning.Primitives.Resource public Azure.Provisioning.BicepValue SkipAppData { get { throw null; } set { } } public Azure.Provisioning.BicepValue StartOn { get { throw null; } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.AppService.SiteSlotExtension FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.AppService.SiteSlotExtension FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2014_04_01; @@ -2608,9 +2608,9 @@ public static partial class ResourceVersions public static readonly string V2024_04_01; } } - public partial class SiteSlotFunction : Azure.Provisioning.Primitives.Resource + public partial class SiteSlotFunction : Azure.Provisioning.Primitives.ProvisionableResource { - public SiteSlotFunction(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public SiteSlotFunction(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Config { get { throw null; } set { } } public Azure.Provisioning.BicepValue ConfigHref { get { throw null; } set { } } public Azure.Provisioning.BicepDictionary Files { get { throw null; } set { } } @@ -2629,7 +2629,7 @@ public partial class SiteSlotFunction : Azure.Provisioning.Primitives.Resource public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepValue TestData { get { throw null; } set { } } public Azure.Provisioning.BicepValue TestDataHref { get { throw null; } set { } } - public static Azure.Provisioning.AppService.SiteSlotFunction FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.AppService.SiteSlotFunction FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2014_04_01; @@ -2665,9 +2665,9 @@ public static partial class ResourceVersions public static readonly string V2024_04_01; } } - public partial class SiteSlotHostNameBinding : Azure.Provisioning.Primitives.Resource + public partial class SiteSlotHostNameBinding : Azure.Provisioning.Primitives.ProvisionableResource { - public SiteSlotHostNameBinding(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public SiteSlotHostNameBinding(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue AzureResourceName { get { throw null; } set { } } public Azure.Provisioning.BicepValue AzureResourceType { get { throw null; } set { } } public Azure.Provisioning.BicepValue CustomHostNameDnsRecordType { get { throw null; } set { } } @@ -2682,7 +2682,7 @@ public partial class SiteSlotHostNameBinding : Azure.Provisioning.Primitives.Res public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepValue ThumbprintString { get { throw null; } set { } } public Azure.Provisioning.BicepValue VirtualIP { get { throw null; } } - public static Azure.Provisioning.AppService.SiteSlotHostNameBinding FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.AppService.SiteSlotHostNameBinding FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2015_02_01; @@ -2711,9 +2711,9 @@ public static partial class ResourceVersions public static readonly string V2024_04_01; } } - public partial class SiteSlotHybridConnectionNamespaceRelay : Azure.Provisioning.Primitives.Resource + public partial class SiteSlotHybridConnectionNamespaceRelay : Azure.Provisioning.Primitives.ProvisionableResource { - public SiteSlotHybridConnectionNamespaceRelay(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public SiteSlotHybridConnectionNamespaceRelay(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Hostname { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Kind { get { throw null; } set { } } @@ -2726,11 +2726,11 @@ public partial class SiteSlotHybridConnectionNamespaceRelay : Azure.Provisioning public Azure.Provisioning.BicepValue ServiceBusNamespace { get { throw null; } set { } } public Azure.Provisioning.BicepValue ServiceBusSuffix { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.AppService.SiteSlotHybridConnectionNamespaceRelay FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.AppService.SiteSlotHybridConnectionNamespaceRelay FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } } - public partial class SiteSlotInstanceExtension : Azure.Provisioning.Primitives.Resource + public partial class SiteSlotInstanceExtension : Azure.Provisioning.Primitives.ProvisionableResource { - public SiteSlotInstanceExtension(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public SiteSlotInstanceExtension(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue ConnectionString { get { throw null; } set { } } public Azure.Provisioning.BicepValue DBType { get { throw null; } set { } } public Azure.Provisioning.BicepValue Deployer { get { throw null; } } @@ -2747,11 +2747,11 @@ public partial class SiteSlotInstanceExtension : Azure.Provisioning.Primitives.R public Azure.Provisioning.BicepValue SkipAppData { get { throw null; } set { } } public Azure.Provisioning.BicepValue StartOn { get { throw null; } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.AppService.SiteSlotInstanceExtension FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.AppService.SiteSlotInstanceExtension FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } } - public partial class SiteSlotNetworkConfig : Azure.Provisioning.Primitives.Resource + public partial class SiteSlotNetworkConfig : Azure.Provisioning.Primitives.ProvisionableResource { - public SiteSlotNetworkConfig(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public SiteSlotNetworkConfig(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue IsSwiftSupported { get { throw null; } set { } } public Azure.Provisioning.BicepValue Kind { get { throw null; } set { } } @@ -2759,7 +2759,7 @@ public partial class SiteSlotNetworkConfig : Azure.Provisioning.Primitives.Resou public Azure.Provisioning.AppService.WebSiteSlot? Parent { get { throw null; } set { } } public Azure.Provisioning.BicepValue SubnetResourceId { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.AppService.SiteSlotNetworkConfig FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.AppService.SiteSlotNetworkConfig FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2015_02_01; @@ -2788,9 +2788,9 @@ public static partial class ResourceVersions public static readonly string V2024_04_01; } } - public partial class SiteSlotPrivateEndpointConnection : Azure.Provisioning.Primitives.Resource + public partial class SiteSlotPrivateEndpointConnection : Azure.Provisioning.Primitives.ProvisionableResource { - public SiteSlotPrivateEndpointConnection(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public SiteSlotPrivateEndpointConnection(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepList IPAddresses { get { throw null; } set { } } public Azure.Provisioning.BicepValue Kind { get { throw null; } set { } } @@ -2800,7 +2800,7 @@ public partial class SiteSlotPrivateEndpointConnection : Azure.Provisioning.Prim public Azure.Provisioning.BicepValue PrivateLinkServiceConnectionState { get { throw null; } set { } } public Azure.Provisioning.BicepValue ProvisioningState { get { throw null; } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.AppService.SiteSlotPrivateEndpointConnection FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.AppService.SiteSlotPrivateEndpointConnection FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2014_04_01; @@ -2836,9 +2836,9 @@ public static partial class ResourceVersions public static readonly string V2024_04_01; } } - public partial class SiteSlotSiteContainer : Azure.Provisioning.Primitives.Resource + public partial class SiteSlotSiteContainer : Azure.Provisioning.Primitives.ProvisionableResource { - public SiteSlotSiteContainer(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public SiteSlotSiteContainer(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue AuthType { get { throw null; } set { } } public Azure.Provisioning.BicepValue CreatedOn { get { throw null; } } public Azure.Provisioning.BicepList EnvironmentVariables { get { throw null; } set { } } @@ -2856,7 +2856,7 @@ public partial class SiteSlotSiteContainer : Azure.Provisioning.Primitives.Resou public Azure.Provisioning.BicepValue UserManagedIdentityClientId { get { throw null; } set { } } public Azure.Provisioning.BicepValue UserName { get { throw null; } set { } } public Azure.Provisioning.BicepList VolumeMounts { get { throw null; } set { } } - public static Azure.Provisioning.AppService.SiteSlotSiteContainer FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.AppService.SiteSlotSiteContainer FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2014_04_01; @@ -2892,9 +2892,9 @@ public static partial class ResourceVersions public static readonly string V2024_04_01; } } - public partial class SiteSlotVirtualNetworkConnection : Azure.Provisioning.Primitives.Resource + public partial class SiteSlotVirtualNetworkConnection : Azure.Provisioning.Primitives.ProvisionableResource { - public SiteSlotVirtualNetworkConnection(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public SiteSlotVirtualNetworkConnection(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue CertBlob { get { throw null; } set { } } public Azure.Provisioning.BicepValue CertThumbprintString { get { throw null; } } public Azure.Provisioning.BicepValue DnsServers { get { throw null; } set { } } @@ -2907,7 +2907,7 @@ public partial class SiteSlotVirtualNetworkConnection : Azure.Provisioning.Primi public Azure.Provisioning.BicepList Routes { get { throw null; } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepValue VnetResourceId { get { throw null; } set { } } - public static Azure.Provisioning.AppService.SiteSlotVirtualNetworkConnection FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.AppService.SiteSlotVirtualNetworkConnection FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2014_04_01; @@ -2943,9 +2943,9 @@ public static partial class ResourceVersions public static readonly string V2024_04_01; } } - public partial class SiteSlotVirtualNetworkConnectionGateway : Azure.Provisioning.Primitives.Resource + public partial class SiteSlotVirtualNetworkConnectionGateway : Azure.Provisioning.Primitives.ProvisionableResource { - public SiteSlotVirtualNetworkConnectionGateway(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public SiteSlotVirtualNetworkConnectionGateway(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Kind { get { throw null; } set { } } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } @@ -2953,7 +2953,7 @@ public partial class SiteSlotVirtualNetworkConnectionGateway : Azure.Provisionin public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepValue VnetName { get { throw null; } set { } } public Azure.Provisioning.BicepValue VpnPackageUri { get { throw null; } set { } } - public static Azure.Provisioning.AppService.SiteSlotVirtualNetworkConnectionGateway FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.AppService.SiteSlotVirtualNetworkConnectionGateway FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2014_04_01; @@ -2989,9 +2989,9 @@ public static partial class ResourceVersions public static readonly string V2024_04_01; } } - public partial class SiteVirtualNetworkConnection : Azure.Provisioning.Primitives.Resource + public partial class SiteVirtualNetworkConnection : Azure.Provisioning.Primitives.ProvisionableResource { - public SiteVirtualNetworkConnection(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public SiteVirtualNetworkConnection(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue CertBlob { get { throw null; } set { } } public Azure.Provisioning.BicepValue CertThumbprintString { get { throw null; } } public Azure.Provisioning.BicepValue DnsServers { get { throw null; } set { } } @@ -3004,7 +3004,7 @@ public partial class SiteVirtualNetworkConnection : Azure.Provisioning.Primitive public Azure.Provisioning.BicepList Routes { get { throw null; } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepValue VnetResourceId { get { throw null; } set { } } - public static Azure.Provisioning.AppService.SiteVirtualNetworkConnection FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.AppService.SiteVirtualNetworkConnection FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2014_04_01; @@ -3040,9 +3040,9 @@ public static partial class ResourceVersions public static readonly string V2024_04_01; } } - public partial class SiteVirtualNetworkConnectionGateway : Azure.Provisioning.Primitives.Resource + public partial class SiteVirtualNetworkConnectionGateway : Azure.Provisioning.Primitives.ProvisionableResource { - public SiteVirtualNetworkConnectionGateway(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public SiteVirtualNetworkConnectionGateway(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Kind { get { throw null; } set { } } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } @@ -3050,7 +3050,7 @@ public partial class SiteVirtualNetworkConnectionGateway : Azure.Provisioning.Pr public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepValue VnetName { get { throw null; } set { } } public Azure.Provisioning.BicepValue VpnPackageUri { get { throw null; } set { } } - public static Azure.Provisioning.AppService.SiteVirtualNetworkConnectionGateway FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.AppService.SiteVirtualNetworkConnectionGateway FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2014_04_01; @@ -3086,9 +3086,9 @@ public static partial class ResourceVersions public static readonly string V2024_04_01; } } - public partial class SlotConfigNames : Azure.Provisioning.Primitives.Resource + public partial class SlotConfigNames : Azure.Provisioning.Primitives.ProvisionableResource { - public SlotConfigNames(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public SlotConfigNames(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepList AppSettingNames { get { throw null; } set { } } public Azure.Provisioning.BicepList AzureStorageConfigNames { get { throw null; } set { } } public Azure.Provisioning.BicepList ConnectionStringNames { get { throw null; } set { } } @@ -3097,7 +3097,7 @@ public partial class SlotConfigNames : Azure.Provisioning.Primitives.Resource public Azure.Provisioning.BicepValue Name { get { throw null; } } public Azure.Provisioning.AppService.WebSite? Parent { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.AppService.SlotConfigNames FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.AppService.SlotConfigNames FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2014_04_01; @@ -3133,14 +3133,14 @@ public static partial class ResourceVersions public static readonly string V2024_04_01; } } - public partial class SlotSwapStatus : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class SlotSwapStatus : Azure.Provisioning.Primitives.ProvisionableConstruct { public SlotSwapStatus() { } public Azure.Provisioning.BicepValue DestinationSlotName { get { throw null; } } public Azure.Provisioning.BicepValue SourceSlotName { get { throw null; } } public Azure.Provisioning.BicepValue TimestampUtc { get { throw null; } } } - public partial class SlowRequestsBasedTrigger : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class SlowRequestsBasedTrigger : Azure.Provisioning.Primitives.ProvisionableConstruct { public SlowRequestsBasedTrigger() { } public Azure.Provisioning.BicepValue Count { get { throw null; } set { } } @@ -3153,9 +3153,9 @@ public enum StagingEnvironmentPolicy Enabled = 0, Disabled = 1, } - public partial class StaticSite : Azure.Provisioning.Primitives.Resource + public partial class StaticSite : Azure.Provisioning.Primitives.ProvisionableResource { - public StaticSite(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public StaticSite(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue AllowConfigFileUpdates { get { throw null; } set { } } public Azure.Provisioning.BicepValue Branch { get { throw null; } set { } } public Azure.Provisioning.BicepValue BuildProperties { get { throw null; } set { } } @@ -3182,7 +3182,7 @@ public partial class StaticSite : Azure.Provisioning.Primitives.Resource public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } public Azure.Provisioning.BicepValue TemplateProperties { get { throw null; } set { } } public Azure.Provisioning.BicepList UserProvidedFunctionApps { get { throw null; } } - public static Azure.Provisioning.AppService.StaticSite FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.AppService.StaticSite FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2019_08_01; @@ -3206,9 +3206,9 @@ public enum StaticSiteBasicAuthName [System.Runtime.Serialization.DataMemberAttribute(Name="default")] Default = 0, } - public partial class StaticSiteBasicAuthProperty : Azure.Provisioning.Primitives.Resource + public partial class StaticSiteBasicAuthProperty : Azure.Provisioning.Primitives.ProvisionableResource { - public StaticSiteBasicAuthProperty(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public StaticSiteBasicAuthProperty(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue ApplicableEnvironmentsMode { get { throw null; } set { } } public Azure.Provisioning.BicepList Environments { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } @@ -3219,7 +3219,7 @@ public partial class StaticSiteBasicAuthProperty : Azure.Provisioning.Primitives public Azure.Provisioning.BicepValue SecretState { get { throw null; } } public Azure.Provisioning.BicepValue SecretUri { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.AppService.StaticSiteBasicAuthProperty FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.AppService.StaticSiteBasicAuthProperty FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2019_08_01; @@ -3238,9 +3238,9 @@ public static partial class ResourceVersions public static readonly string V2024_04_01; } } - public partial class StaticSiteBuildDatabaseConnection : Azure.Provisioning.Primitives.Resource + public partial class StaticSiteBuildDatabaseConnection : Azure.Provisioning.Primitives.ProvisionableResource { - public StaticSiteBuildDatabaseConnection(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public StaticSiteBuildDatabaseConnection(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepList ConfigurationFiles { get { throw null; } } public Azure.Provisioning.BicepValue ConnectionIdentity { get { throw null; } set { } } public Azure.Provisioning.BicepValue ConnectionString { get { throw null; } set { } } @@ -3250,7 +3250,7 @@ public partial class StaticSiteBuildDatabaseConnection : Azure.Provisioning.Prim public Azure.Provisioning.BicepValue Region { get { throw null; } set { } } public Azure.Provisioning.BicepValue ResourceId { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.AppService.StaticSiteBuildDatabaseConnection FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.AppService.StaticSiteBuildDatabaseConnection FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2019_08_01; @@ -3269,9 +3269,9 @@ public static partial class ResourceVersions public static readonly string V2024_04_01; } } - public partial class StaticSiteBuildLinkedBackend : Azure.Provisioning.Primitives.Resource + public partial class StaticSiteBuildLinkedBackend : Azure.Provisioning.Primitives.ProvisionableResource { - public StaticSiteBuildLinkedBackend(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public StaticSiteBuildLinkedBackend(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue BackendResourceId { get { throw null; } set { } } public Azure.Provisioning.BicepValue CreatedOn { get { throw null; } } public Azure.Provisioning.BicepValue Id { get { throw null; } } @@ -3280,7 +3280,7 @@ public partial class StaticSiteBuildLinkedBackend : Azure.Provisioning.Primitive public Azure.Provisioning.BicepValue ProvisioningState { get { throw null; } } public Azure.Provisioning.BicepValue Region { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.AppService.StaticSiteBuildLinkedBackend FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.AppService.StaticSiteBuildLinkedBackend FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2019_08_01; @@ -3299,7 +3299,7 @@ public static partial class ResourceVersions public static readonly string V2024_04_01; } } - public partial class StaticSiteBuildProperties : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class StaticSiteBuildProperties : Azure.Provisioning.Primitives.ProvisionableConstruct { public StaticSiteBuildProperties() { } public Azure.Provisioning.BicepValue ApiBuildCommand { get { throw null; } set { } } @@ -3311,9 +3311,9 @@ public StaticSiteBuildProperties() { } public Azure.Provisioning.BicepValue OutputLocation { get { throw null; } set { } } public Azure.Provisioning.BicepValue SkipGithubActionWorkflowGeneration { get { throw null; } set { } } } - public partial class StaticSiteBuildUserProvidedFunctionApp : Azure.Provisioning.Primitives.Resource + public partial class StaticSiteBuildUserProvidedFunctionApp : Azure.Provisioning.Primitives.ProvisionableResource { - public StaticSiteBuildUserProvidedFunctionApp(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public StaticSiteBuildUserProvidedFunctionApp(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue CreatedOn { get { throw null; } } public Azure.Provisioning.BicepValue FunctionAppRegion { get { throw null; } set { } } public Azure.Provisioning.BicepValue FunctionAppResourceId { get { throw null; } set { } } @@ -3321,7 +3321,7 @@ public partial class StaticSiteBuildUserProvidedFunctionApp : Azure.Provisioning public Azure.Provisioning.BicepValue Kind { get { throw null; } set { } } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.AppService.StaticSiteBuildUserProvidedFunctionApp FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.AppService.StaticSiteBuildUserProvidedFunctionApp FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2020_12_01; @@ -3336,9 +3336,9 @@ public static partial class ResourceVersions public static readonly string V2024_04_01; } } - public partial class StaticSiteCustomDomainOverview : Azure.Provisioning.Primitives.Resource + public partial class StaticSiteCustomDomainOverview : Azure.Provisioning.Primitives.ProvisionableResource { - public StaticSiteCustomDomainOverview(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public StaticSiteCustomDomainOverview(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue CreatedOn { get { throw null; } } public Azure.Provisioning.BicepValue DomainName { get { throw null; } } public Azure.Provisioning.BicepValue ErrorMessage { get { throw null; } } @@ -3350,7 +3350,7 @@ public partial class StaticSiteCustomDomainOverview : Azure.Provisioning.Primiti public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepValue ValidationMethod { get { throw null; } set { } } public Azure.Provisioning.BicepValue ValidationToken { get { throw null; } } - public static Azure.Provisioning.AppService.StaticSiteCustomDomainOverview FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.AppService.StaticSiteCustomDomainOverview FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2019_08_01; @@ -3369,9 +3369,9 @@ public static partial class ResourceVersions public static readonly string V2024_04_01; } } - public partial class StaticSiteDatabaseConnection : Azure.Provisioning.Primitives.Resource + public partial class StaticSiteDatabaseConnection : Azure.Provisioning.Primitives.ProvisionableResource { - public StaticSiteDatabaseConnection(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public StaticSiteDatabaseConnection(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepList ConfigurationFiles { get { throw null; } } public Azure.Provisioning.BicepValue ConnectionIdentity { get { throw null; } set { } } public Azure.Provisioning.BicepValue ConnectionString { get { throw null; } set { } } @@ -3382,7 +3382,7 @@ public partial class StaticSiteDatabaseConnection : Azure.Provisioning.Primitive public Azure.Provisioning.BicepValue Region { get { throw null; } set { } } public Azure.Provisioning.BicepValue ResourceId { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.AppService.StaticSiteDatabaseConnection FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.AppService.StaticSiteDatabaseConnection FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2019_08_01; @@ -3401,14 +3401,14 @@ public static partial class ResourceVersions public static readonly string V2024_04_01; } } - public partial class StaticSiteDatabaseConnectionConfigurationFileOverview : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class StaticSiteDatabaseConnectionConfigurationFileOverview : Azure.Provisioning.Primitives.ProvisionableConstruct { public StaticSiteDatabaseConnectionConfigurationFileOverview() { } public Azure.Provisioning.BicepValue Contents { get { throw null; } } public Azure.Provisioning.BicepValue FileName { get { throw null; } } public Azure.Provisioning.BicepValue StaticSiteDatabaseConnectionConfigurationFileOverviewType { get { throw null; } } } - public partial class StaticSiteDatabaseConnectionOverview : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class StaticSiteDatabaseConnectionOverview : Azure.Provisioning.Primitives.ProvisionableConstruct { public StaticSiteDatabaseConnectionOverview() { } public Azure.Provisioning.BicepList ConfigurationFiles { get { throw null; } } @@ -3417,9 +3417,9 @@ public StaticSiteDatabaseConnectionOverview() { } public Azure.Provisioning.BicepValue Region { get { throw null; } } public Azure.Provisioning.BicepValue ResourceId { get { throw null; } } } - public partial class StaticSiteLinkedBackend : Azure.Provisioning.Primitives.Resource + public partial class StaticSiteLinkedBackend : Azure.Provisioning.Primitives.ProvisionableResource { - public StaticSiteLinkedBackend(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public StaticSiteLinkedBackend(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue BackendResourceId { get { throw null; } set { } } public Azure.Provisioning.BicepValue CreatedOn { get { throw null; } } public Azure.Provisioning.BicepValue Id { get { throw null; } } @@ -3429,7 +3429,7 @@ public partial class StaticSiteLinkedBackend : Azure.Provisioning.Primitives.Res public Azure.Provisioning.BicepValue ProvisioningState { get { throw null; } } public Azure.Provisioning.BicepValue Region { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.AppService.StaticSiteLinkedBackend FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.AppService.StaticSiteLinkedBackend FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2019_08_01; @@ -3448,7 +3448,7 @@ public static partial class ResourceVersions public static readonly string V2024_04_01; } } - public partial class StaticSiteLinkedBackendInfo : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class StaticSiteLinkedBackendInfo : Azure.Provisioning.Primitives.ProvisionableConstruct { public StaticSiteLinkedBackendInfo() { } public Azure.Provisioning.BicepValue BackendResourceId { get { throw null; } } @@ -3456,9 +3456,9 @@ public StaticSiteLinkedBackendInfo() { } public Azure.Provisioning.BicepValue ProvisioningState { get { throw null; } } public Azure.Provisioning.BicepValue Region { get { throw null; } } } - public partial class StaticSitePrivateEndpointConnection : Azure.Provisioning.Primitives.Resource + public partial class StaticSitePrivateEndpointConnection : Azure.Provisioning.Primitives.ProvisionableResource { - public StaticSitePrivateEndpointConnection(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public StaticSitePrivateEndpointConnection(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepList IPAddresses { get { throw null; } set { } } public Azure.Provisioning.BicepValue Kind { get { throw null; } set { } } @@ -3468,7 +3468,7 @@ public partial class StaticSitePrivateEndpointConnection : Azure.Provisioning.Pr public Azure.Provisioning.BicepValue PrivateLinkServiceConnectionState { get { throw null; } set { } } public Azure.Provisioning.BicepValue ProvisioningState { get { throw null; } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.AppService.StaticSitePrivateEndpointConnection FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.AppService.StaticSitePrivateEndpointConnection FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2019_08_01; @@ -3487,7 +3487,7 @@ public static partial class ResourceVersions public static readonly string V2024_04_01; } } - public partial class StaticSiteTemplate : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class StaticSiteTemplate : Azure.Provisioning.Primitives.ProvisionableConstruct { public StaticSiteTemplate() { } public Azure.Provisioning.BicepValue Description { get { throw null; } set { } } @@ -3496,9 +3496,9 @@ public StaticSiteTemplate() { } public Azure.Provisioning.BicepValue RepositoryName { get { throw null; } set { } } public Azure.Provisioning.BicepValue TemplateRepositoryUri { get { throw null; } set { } } } - public partial class StaticSiteUserProvidedFunctionApp : Azure.Provisioning.Primitives.Resource + public partial class StaticSiteUserProvidedFunctionApp : Azure.Provisioning.Primitives.ProvisionableResource { - public StaticSiteUserProvidedFunctionApp(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public StaticSiteUserProvidedFunctionApp(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue CreatedOn { get { throw null; } } public Azure.Provisioning.BicepValue FunctionAppRegion { get { throw null; } set { } } public Azure.Provisioning.BicepValue FunctionAppResourceId { get { throw null; } set { } } @@ -3507,7 +3507,7 @@ public partial class StaticSiteUserProvidedFunctionApp : Azure.Provisioning.Prim public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } public Azure.Provisioning.AppService.StaticSite? Parent { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.AppService.StaticSiteUserProvidedFunctionApp FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.AppService.StaticSiteUserProvidedFunctionApp FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2020_12_01; @@ -3522,7 +3522,7 @@ public static partial class ResourceVersions public static readonly string V2024_04_01; } } - public partial class StaticSiteUserProvidedFunctionAppData : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class StaticSiteUserProvidedFunctionAppData : Azure.Provisioning.Primitives.ProvisionableConstruct { public StaticSiteUserProvidedFunctionAppData() { } public Azure.Provisioning.BicepValue CreatedOn { get { throw null; } } @@ -3533,7 +3533,7 @@ public StaticSiteUserProvidedFunctionAppData() { } public Azure.Provisioning.BicepValue Name { get { throw null; } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } } - public partial class StatusCodesBasedTrigger : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class StatusCodesBasedTrigger : Azure.Provisioning.Primitives.ProvisionableConstruct { public StatusCodesBasedTrigger() { } public Azure.Provisioning.BicepValue Count { get { throw null; } set { } } @@ -3543,7 +3543,7 @@ public StatusCodesBasedTrigger() { } public Azure.Provisioning.BicepValue TimeInterval { get { throw null; } set { } } public Azure.Provisioning.BicepValue Win32Status { get { throw null; } set { } } } - public partial class StatusCodesRangeBasedTrigger : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class StatusCodesRangeBasedTrigger : Azure.Provisioning.Primitives.ProvisionableConstruct { public StatusCodesRangeBasedTrigger() { } public Azure.Provisioning.BicepValue Count { get { throw null; } set { } } @@ -3551,7 +3551,7 @@ public StatusCodesRangeBasedTrigger() { } public Azure.Provisioning.BicepValue StatusCodes { get { throw null; } set { } } public Azure.Provisioning.BicepValue TimeInterval { get { throw null; } set { } } } - public partial class VirtualApplication : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class VirtualApplication : Azure.Provisioning.Primitives.ProvisionableConstruct { public VirtualApplication() { } public Azure.Provisioning.BicepValue IsPreloadEnabled { get { throw null; } set { } } @@ -3559,13 +3559,13 @@ public VirtualApplication() { } public Azure.Provisioning.BicepList VirtualDirectories { get { throw null; } set { } } public Azure.Provisioning.BicepValue VirtualPath { get { throw null; } set { } } } - public partial class VirtualDirectory : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class VirtualDirectory : Azure.Provisioning.Primitives.ProvisionableConstruct { public VirtualDirectory() { } public Azure.Provisioning.BicepValue PhysicalPath { get { throw null; } set { } } public Azure.Provisioning.BicepValue VirtualPath { get { throw null; } set { } } } - public partial class WebAppEnvironmentVariable : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class WebAppEnvironmentVariable : Azure.Provisioning.Primitives.ProvisionableConstruct { public WebAppEnvironmentVariable() { } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } @@ -3579,7 +3579,7 @@ public enum WebAppLogLevel Warning = 3, Error = 4, } - public partial class WebAppPushSettings : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class WebAppPushSettings : Azure.Provisioning.Primitives.ProvisionableConstruct { public WebAppPushSettings() { } public Azure.Provisioning.BicepValue DynamicTagsJson { get { throw null; } set { } } @@ -3591,9 +3591,9 @@ public WebAppPushSettings() { } public Azure.Provisioning.BicepValue TagsRequiringAuth { get { throw null; } set { } } public Azure.Provisioning.BicepValue TagWhitelistJson { get { throw null; } set { } } } - public partial class WebSite : Azure.Provisioning.Primitives.Resource + public partial class WebSite : Azure.Provisioning.Primitives.ProvisionableResource { - public WebSite(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public WebSite(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue AppServicePlanId { get { throw null; } set { } } public Azure.Provisioning.BicepValue AvailabilityState { get { throw null; } } public Azure.Provisioning.BicepValue ClientCertExclusionPaths { get { throw null; } set { } } @@ -3654,7 +3654,7 @@ public partial class WebSite : Azure.Provisioning.Primitives.Resource public Azure.Provisioning.BicepValue UsageState { get { throw null; } } public Azure.Provisioning.BicepValue VirtualNetworkSubnetId { get { throw null; } set { } } public Azure.Provisioning.BicepValue WorkloadProfileName { get { throw null; } set { } } - public static Azure.Provisioning.AppService.WebSite FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.AppService.WebSite FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override Azure.Provisioning.Primitives.ResourceNameRequirements GetResourceNameRequirements() { throw null; } public static partial class ResourceVersions @@ -3698,9 +3698,9 @@ public enum WebSiteAvailabilityState Limited = 1, DisasterRecoveryMode = 2, } - public partial class WebSiteConfig : Azure.Provisioning.Primitives.Resource + public partial class WebSiteConfig : Azure.Provisioning.Primitives.ProvisionableResource { - public WebSiteConfig(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public WebSiteConfig(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue AcrUserManagedIdentityId { get { throw null; } set { } } public Azure.Provisioning.BicepValue AllowIPSecurityRestrictionsForScmToUseMain { get { throw null; } set { } } public Azure.Provisioning.BicepValue ApiDefinitionUri { get { throw null; } set { } } @@ -3778,7 +3778,7 @@ public partial class WebSiteConfig : Azure.Provisioning.Primitives.Resource public Azure.Provisioning.BicepValue WebsiteTimeZone { get { throw null; } set { } } public Azure.Provisioning.BicepValue WindowsFxVersion { get { throw null; } set { } } public Azure.Provisioning.BicepValue XManagedServiceIdentityId { get { throw null; } set { } } - public static Azure.Provisioning.AppService.WebSiteConfig FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.AppService.WebSiteConfig FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2014_04_01; @@ -3814,9 +3814,9 @@ public static partial class ResourceVersions public static readonly string V2024_04_01; } } - public partial class WebSiteExtension : Azure.Provisioning.Primitives.Resource + public partial class WebSiteExtension : Azure.Provisioning.Primitives.ProvisionableResource { - public WebSiteExtension(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public WebSiteExtension(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepList Authors { get { throw null; } } public Azure.Provisioning.BicepValue Comment { get { throw null; } } public Azure.Provisioning.BicepValue Description { get { throw null; } } @@ -3842,7 +3842,7 @@ public partial class WebSiteExtension : Azure.Provisioning.Primitives.Resource public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepValue Title { get { throw null; } } public Azure.Provisioning.BicepValue Version { get { throw null; } } - public static Azure.Provisioning.AppService.WebSiteExtension FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.AppService.WebSiteExtension FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2014_04_01; @@ -3878,16 +3878,16 @@ public static partial class ResourceVersions public static readonly string V2024_04_01; } } - public partial class WebSiteFtpPublishingCredentialsPolicy : Azure.Provisioning.Primitives.Resource + public partial class WebSiteFtpPublishingCredentialsPolicy : Azure.Provisioning.Primitives.ProvisionableResource { - public WebSiteFtpPublishingCredentialsPolicy(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public WebSiteFtpPublishingCredentialsPolicy(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Allow { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Kind { get { throw null; } set { } } public Azure.Provisioning.BicepValue Name { get { throw null; } } public Azure.Provisioning.AppService.WebSite? Parent { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.AppService.WebSiteFtpPublishingCredentialsPolicy FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.AppService.WebSiteFtpPublishingCredentialsPolicy FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2014_04_01; @@ -3923,9 +3923,9 @@ public static partial class ResourceVersions public static readonly string V2024_04_01; } } - public partial class WebSiteHybridConnection : Azure.Provisioning.Primitives.Resource + public partial class WebSiteHybridConnection : Azure.Provisioning.Primitives.ProvisionableResource { - public WebSiteHybridConnection(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public WebSiteHybridConnection(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue BiztalkUri { get { throw null; } set { } } public Azure.Provisioning.BicepValue EntityConnectionString { get { throw null; } set { } } public Azure.Provisioning.BicepValue EntityName { get { throw null; } set { } } @@ -3937,7 +3937,7 @@ public partial class WebSiteHybridConnection : Azure.Provisioning.Primitives.Res public Azure.Provisioning.BicepValue Port { get { throw null; } set { } } public Azure.Provisioning.BicepValue ResourceConnectionString { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.AppService.WebSiteHybridConnection FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.AppService.WebSiteHybridConnection FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2014_04_01; @@ -3973,9 +3973,9 @@ public static partial class ResourceVersions public static readonly string V2024_04_01; } } - public partial class WebSitePremierAddon : Azure.Provisioning.Primitives.Resource + public partial class WebSitePremierAddon : Azure.Provisioning.Primitives.ProvisionableResource { - public WebSitePremierAddon(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public WebSitePremierAddon(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Kind { get { throw null; } set { } } public Azure.Provisioning.BicepValue Location { get { throw null; } set { } } @@ -3988,7 +3988,7 @@ public partial class WebSitePremierAddon : Azure.Provisioning.Primitives.Resourc public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } public Azure.Provisioning.BicepValue Vendor { get { throw null; } set { } } - public static Azure.Provisioning.AppService.WebSitePremierAddon FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.AppService.WebSitePremierAddon FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2015_04_01; @@ -4015,9 +4015,9 @@ public static partial class ResourceVersions public static readonly string V2024_04_01; } } - public partial class WebSitePrivateAccess : Azure.Provisioning.Primitives.Resource + public partial class WebSitePrivateAccess : Azure.Provisioning.Primitives.ProvisionableResource { - public WebSitePrivateAccess(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public WebSitePrivateAccess(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue IsEnabled { get { throw null; } set { } } public Azure.Provisioning.BicepValue Kind { get { throw null; } set { } } @@ -4025,7 +4025,7 @@ public partial class WebSitePrivateAccess : Azure.Provisioning.Primitives.Resour public Azure.Provisioning.AppService.WebSite? Parent { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepList VirtualNetworks { get { throw null; } set { } } - public static Azure.Provisioning.AppService.WebSitePrivateAccess FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.AppService.WebSitePrivateAccess FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2014_04_01; @@ -4061,9 +4061,9 @@ public static partial class ResourceVersions public static readonly string V2024_04_01; } } - public partial class WebSiteSlot : Azure.Provisioning.Primitives.Resource + public partial class WebSiteSlot : Azure.Provisioning.Primitives.ProvisionableResource { - public WebSiteSlot(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public WebSiteSlot(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue AppServicePlanId { get { throw null; } set { } } public Azure.Provisioning.BicepValue AvailabilityState { get { throw null; } } public Azure.Provisioning.BicepValue ClientCertExclusionPaths { get { throw null; } set { } } @@ -4125,7 +4125,7 @@ public partial class WebSiteSlot : Azure.Provisioning.Primitives.Resource public Azure.Provisioning.BicepValue UsageState { get { throw null; } } public Azure.Provisioning.BicepValue VirtualNetworkSubnetId { get { throw null; } set { } } public Azure.Provisioning.BicepValue WorkloadProfileName { get { throw null; } set { } } - public static Azure.Provisioning.AppService.WebSiteSlot FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.AppService.WebSiteSlot FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override Azure.Provisioning.Primitives.ResourceNameRequirements GetResourceNameRequirements() { throw null; } public static partial class ResourceVersions @@ -4163,9 +4163,9 @@ public static partial class ResourceVersions public static readonly string V2024_04_01; } } - public partial class WebSiteSlotConfig : Azure.Provisioning.Primitives.Resource + public partial class WebSiteSlotConfig : Azure.Provisioning.Primitives.ProvisionableResource { - public WebSiteSlotConfig(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public WebSiteSlotConfig(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue AcrUserManagedIdentityId { get { throw null; } set { } } public Azure.Provisioning.BicepValue AllowIPSecurityRestrictionsForScmToUseMain { get { throw null; } set { } } public Azure.Provisioning.BicepValue ApiDefinitionUri { get { throw null; } set { } } @@ -4243,7 +4243,7 @@ public partial class WebSiteSlotConfig : Azure.Provisioning.Primitives.Resource public Azure.Provisioning.BicepValue WebsiteTimeZone { get { throw null; } set { } } public Azure.Provisioning.BicepValue WindowsFxVersion { get { throw null; } set { } } public Azure.Provisioning.BicepValue XManagedServiceIdentityId { get { throw null; } set { } } - public static Azure.Provisioning.AppService.WebSiteSlotConfig FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.AppService.WebSiteSlotConfig FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2014_04_01; @@ -4279,9 +4279,9 @@ public static partial class ResourceVersions public static readonly string V2024_04_01; } } - public partial class WebSiteSlotExtension : Azure.Provisioning.Primitives.Resource + public partial class WebSiteSlotExtension : Azure.Provisioning.Primitives.ProvisionableResource { - public WebSiteSlotExtension(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public WebSiteSlotExtension(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepList Authors { get { throw null; } } public Azure.Provisioning.BicepValue Comment { get { throw null; } } public Azure.Provisioning.BicepValue Description { get { throw null; } } @@ -4307,7 +4307,7 @@ public partial class WebSiteSlotExtension : Azure.Provisioning.Primitives.Resour public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepValue Title { get { throw null; } } public Azure.Provisioning.BicepValue Version { get { throw null; } } - public static Azure.Provisioning.AppService.WebSiteSlotExtension FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.AppService.WebSiteSlotExtension FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2014_04_01; @@ -4343,16 +4343,16 @@ public static partial class ResourceVersions public static readonly string V2024_04_01; } } - public partial class WebSiteSlotFtpPublishingCredentialsPolicy : Azure.Provisioning.Primitives.Resource + public partial class WebSiteSlotFtpPublishingCredentialsPolicy : Azure.Provisioning.Primitives.ProvisionableResource { - public WebSiteSlotFtpPublishingCredentialsPolicy(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public WebSiteSlotFtpPublishingCredentialsPolicy(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Allow { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Kind { get { throw null; } set { } } public Azure.Provisioning.BicepValue Name { get { throw null; } } public Azure.Provisioning.AppService.WebSiteSlot? Parent { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.AppService.WebSiteSlotFtpPublishingCredentialsPolicy FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.AppService.WebSiteSlotFtpPublishingCredentialsPolicy FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2014_04_01; @@ -4388,9 +4388,9 @@ public static partial class ResourceVersions public static readonly string V2024_04_01; } } - public partial class WebSiteSlotHybridConnection : Azure.Provisioning.Primitives.Resource + public partial class WebSiteSlotHybridConnection : Azure.Provisioning.Primitives.ProvisionableResource { - public WebSiteSlotHybridConnection(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public WebSiteSlotHybridConnection(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue BiztalkUri { get { throw null; } set { } } public Azure.Provisioning.BicepValue EntityConnectionString { get { throw null; } set { } } public Azure.Provisioning.BicepValue EntityName { get { throw null; } set { } } @@ -4402,7 +4402,7 @@ public partial class WebSiteSlotHybridConnection : Azure.Provisioning.Primitives public Azure.Provisioning.BicepValue Port { get { throw null; } set { } } public Azure.Provisioning.BicepValue ResourceConnectionString { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.AppService.WebSiteSlotHybridConnection FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.AppService.WebSiteSlotHybridConnection FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2014_04_01; @@ -4438,9 +4438,9 @@ public static partial class ResourceVersions public static readonly string V2024_04_01; } } - public partial class WebSiteSlotPremierAddOn : Azure.Provisioning.Primitives.Resource + public partial class WebSiteSlotPremierAddOn : Azure.Provisioning.Primitives.ProvisionableResource { - public WebSiteSlotPremierAddOn(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public WebSiteSlotPremierAddOn(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Kind { get { throw null; } set { } } public Azure.Provisioning.BicepValue Location { get { throw null; } set { } } @@ -4453,7 +4453,7 @@ public partial class WebSiteSlotPremierAddOn : Azure.Provisioning.Primitives.Res public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } public Azure.Provisioning.BicepValue Vendor { get { throw null; } set { } } - public static Azure.Provisioning.AppService.WebSiteSlotPremierAddOn FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.AppService.WebSiteSlotPremierAddOn FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2014_04_01; @@ -4489,9 +4489,9 @@ public static partial class ResourceVersions public static readonly string V2024_04_01; } } - public partial class WebSiteSlotPrivateAccess : Azure.Provisioning.Primitives.Resource + public partial class WebSiteSlotPrivateAccess : Azure.Provisioning.Primitives.ProvisionableResource { - public WebSiteSlotPrivateAccess(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public WebSiteSlotPrivateAccess(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue IsEnabled { get { throw null; } set { } } public Azure.Provisioning.BicepValue Kind { get { throw null; } set { } } @@ -4499,7 +4499,7 @@ public partial class WebSiteSlotPrivateAccess : Azure.Provisioning.Primitives.Re public Azure.Provisioning.AppService.WebSiteSlot? Parent { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepList VirtualNetworks { get { throw null; } set { } } - public static Azure.Provisioning.AppService.WebSiteSlotPrivateAccess FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.AppService.WebSiteSlotPrivateAccess FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2014_04_01; @@ -4535,9 +4535,9 @@ public static partial class ResourceVersions public static readonly string V2024_04_01; } } - public partial class WebSiteSlotPublicCertificate : Azure.Provisioning.Primitives.Resource + public partial class WebSiteSlotPublicCertificate : Azure.Provisioning.Primitives.ProvisionableResource { - public WebSiteSlotPublicCertificate(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public WebSiteSlotPublicCertificate(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Blob { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Kind { get { throw null; } set { } } @@ -4546,7 +4546,7 @@ public partial class WebSiteSlotPublicCertificate : Azure.Provisioning.Primitive public Azure.Provisioning.BicepValue PublicCertificateLocation { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepValue ThumbprintString { get { throw null; } } - public static Azure.Provisioning.AppService.WebSiteSlotPublicCertificate FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.AppService.WebSiteSlotPublicCertificate FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2014_04_01; @@ -4582,9 +4582,9 @@ public static partial class ResourceVersions public static readonly string V2024_04_01; } } - public partial class WebSiteSlotSourceControl : Azure.Provisioning.Primitives.Resource + public partial class WebSiteSlotSourceControl : Azure.Provisioning.Primitives.ProvisionableResource { - public WebSiteSlotSourceControl(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public WebSiteSlotSourceControl(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Branch { get { throw null; } set { } } public Azure.Provisioning.BicepValue GitHubActionConfiguration { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } @@ -4597,7 +4597,7 @@ public partial class WebSiteSlotSourceControl : Azure.Provisioning.Primitives.Re public Azure.Provisioning.AppService.WebSiteSlot? Parent { get { throw null; } set { } } public Azure.Provisioning.BicepValue RepoUri { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.AppService.WebSiteSlotSourceControl FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.AppService.WebSiteSlotSourceControl FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2014_04_01; @@ -4633,9 +4633,9 @@ public static partial class ResourceVersions public static readonly string V2024_04_01; } } - public partial class WebSiteSourceControl : Azure.Provisioning.Primitives.Resource + public partial class WebSiteSourceControl : Azure.Provisioning.Primitives.ProvisionableResource { - public WebSiteSourceControl(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public WebSiteSourceControl(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Branch { get { throw null; } set { } } public Azure.Provisioning.BicepValue GitHubActionConfiguration { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } @@ -4648,7 +4648,7 @@ public partial class WebSiteSourceControl : Azure.Provisioning.Primitives.Resour public Azure.Provisioning.AppService.WebSite? Parent { get { throw null; } set { } } public Azure.Provisioning.BicepValue RepoUri { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.AppService.WebSiteSourceControl FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.AppService.WebSiteSourceControl FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2014_04_01; diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/AppCertificate.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/AppCertificate.cs index e5277a442916..b22592c807a1 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/AppCertificate.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/AppCertificate.cs @@ -17,7 +17,7 @@ namespace Azure.Provisioning.AppService; /// /// AppCertificate. /// -public partial class AppCertificate : Resource +public partial class AppCertificate : ProvisionableResource { /// /// Name of the certificate. @@ -186,15 +186,15 @@ public partial class AppCertificate : Resource /// /// Creates a new AppCertificate. /// - /// + /// /// The the Bicep identifier name of the AppCertificate resource. This can /// be used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and /// underscores. /// /// Version of the AppCertificate. - public AppCertificate(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Web/certificates", resourceVersion ?? "2024-04-01") + public AppCertificate(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Web/certificates", resourceVersion ?? "2024-04-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _location = BicepValue.DefineProperty(this, "Location", ["location"], isRequired: true); @@ -364,7 +364,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing AppCertificate. /// - /// + /// /// The the Bicep identifier name of the AppCertificate resource. This can /// be used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and @@ -372,8 +372,8 @@ public static class ResourceVersions /// /// Version of the AppCertificate. /// The existing AppCertificate resource. - public static AppCertificate FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static AppCertificate FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; /// /// Get the requirements for naming this AppCertificate resource. diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/AppServiceCertificate.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/AppServiceCertificate.cs index 952dc01312ff..1c7540e849ca 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/AppServiceCertificate.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/AppServiceCertificate.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.AppService; /// /// AppServiceCertificate. /// -public partial class AppServiceCertificate : Resource +public partial class AppServiceCertificate : ProvisionableResource { /// /// Name of the certificate. @@ -81,15 +81,15 @@ public partial class AppServiceCertificate : Resource /// /// Creates a new AppServiceCertificate. /// - /// + /// /// The the Bicep identifier name of the AppServiceCertificate resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, /// numbers, and underscores. /// /// Version of the AppServiceCertificate. - public AppServiceCertificate(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.CertificateRegistration/certificateOrders/certificates", resourceVersion ?? "2024-04-01") + public AppServiceCertificate(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.CertificateRegistration/certificateOrders/certificates", resourceVersion ?? "2024-04-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _location = BicepValue.DefineProperty(this, "Location", ["location"], isRequired: true); @@ -192,7 +192,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing AppServiceCertificate. /// - /// + /// /// The the Bicep identifier name of the AppServiceCertificate resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, @@ -200,6 +200,6 @@ public static class ResourceVersions /// /// Version of the AppServiceCertificate. /// The existing AppServiceCertificate resource. - public static AppServiceCertificate FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static AppServiceCertificate FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/AppServiceCertificateOrder.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/AppServiceCertificateOrder.cs index dfba17405a8e..8423ca21e749 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/AppServiceCertificateOrder.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/AppServiceCertificateOrder.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.AppService; /// /// AppServiceCertificateOrder. /// -public partial class AppServiceCertificateOrder : Resource +public partial class AppServiceCertificateOrder : ProvisionableResource { /// /// Name of the certificate order. @@ -181,15 +181,15 @@ public partial class AppServiceCertificateOrder : Resource /// /// Creates a new AppServiceCertificateOrder. /// - /// + /// /// The the Bicep identifier name of the AppServiceCertificateOrder /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the AppServiceCertificateOrder. - public AppServiceCertificateOrder(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.CertificateRegistration/certificateOrders", resourceVersion ?? "2024-04-01") + public AppServiceCertificateOrder(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.CertificateRegistration/certificateOrders", resourceVersion ?? "2024-04-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _location = BicepValue.DefineProperty(this, "Location", ["location"], isRequired: true); @@ -308,7 +308,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing AppServiceCertificateOrder. /// - /// + /// /// The the Bicep identifier name of the AppServiceCertificateOrder /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -316,6 +316,6 @@ public static class ResourceVersions /// /// Version of the AppServiceCertificateOrder. /// The existing AppServiceCertificateOrder resource. - public static AppServiceCertificateOrder FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static AppServiceCertificateOrder FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/AppServiceDomain.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/AppServiceDomain.cs index 0d7f58a8a649..3d42d7a2c922 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/AppServiceDomain.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/AppServiceDomain.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.AppService; /// /// AppServiceDomain. /// -public partial class AppServiceDomain : Resource +public partial class AppServiceDomain : ProvisionableResource { /// /// Name of the domain. @@ -183,15 +183,15 @@ public partial class AppServiceDomain : Resource /// /// Creates a new AppServiceDomain. /// - /// + /// /// The the Bicep identifier name of the AppServiceDomain resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, /// and underscores. /// /// Version of the AppServiceDomain. - public AppServiceDomain(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.DomainRegistration/domains", resourceVersion ?? "2024-04-01") + public AppServiceDomain(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.DomainRegistration/domains", resourceVersion ?? "2024-04-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _location = BicepValue.DefineProperty(this, "Location", ["location"], isRequired: true); @@ -315,7 +315,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing AppServiceDomain. /// - /// + /// /// The the Bicep identifier name of the AppServiceDomain resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, @@ -323,6 +323,6 @@ public static class ResourceVersions /// /// Version of the AppServiceDomain. /// The existing AppServiceDomain resource. - public static AppServiceDomain FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static AppServiceDomain FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/AppServiceEnvironment.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/AppServiceEnvironment.cs index b049669594df..b51fb9b3ff0f 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/AppServiceEnvironment.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/AppServiceEnvironment.cs @@ -17,7 +17,7 @@ namespace Azure.Provisioning.AppService; /// /// AppServiceEnvironment. /// -public partial class AppServiceEnvironment : Resource +public partial class AppServiceEnvironment : ProvisionableResource { /// /// Name of the App Service Environment. @@ -184,15 +184,15 @@ public partial class AppServiceEnvironment : Resource /// /// Creates a new AppServiceEnvironment. /// - /// + /// /// The the Bicep identifier name of the AppServiceEnvironment resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, /// numbers, and underscores. /// /// Version of the AppServiceEnvironment. - public AppServiceEnvironment(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Web/hostingEnvironments", resourceVersion ?? "2024-04-01") + public AppServiceEnvironment(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Web/hostingEnvironments", resourceVersion ?? "2024-04-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _location = BicepValue.DefineProperty(this, "Location", ["location"], isRequired: true); @@ -386,7 +386,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing AppServiceEnvironment. /// - /// + /// /// The the Bicep identifier name of the AppServiceEnvironment resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, @@ -394,6 +394,6 @@ public static class ResourceVersions /// /// Version of the AppServiceEnvironment. /// The existing AppServiceEnvironment resource. - public static AppServiceEnvironment FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static AppServiceEnvironment FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/AppServicePlan.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/AppServicePlan.cs index 66ec3ce668fc..c3a8cf2cf9d1 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/AppServicePlan.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/AppServicePlan.cs @@ -17,7 +17,7 @@ namespace Azure.Provisioning.AppService; /// /// AppServicePlan. /// -public partial class AppServicePlan : Resource +public partial class AppServicePlan : ProvisionableResource { /// /// Name of the App Service plan. @@ -225,15 +225,15 @@ public partial class AppServicePlan : Resource /// /// Creates a new AppServicePlan. /// - /// + /// /// The the Bicep identifier name of the AppServicePlan resource. This can /// be used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and /// underscores. /// /// Version of the AppServicePlan. - public AppServicePlan(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Web/serverfarms", resourceVersion ?? "2024-04-01") + public AppServicePlan(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Web/serverfarms", resourceVersion ?? "2024-04-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _location = BicepValue.DefineProperty(this, "Location", ["location"], isRequired: true); @@ -417,7 +417,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing AppServicePlan. /// - /// + /// /// The the Bicep identifier name of the AppServicePlan resource. This can /// be used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and @@ -425,8 +425,8 @@ public static class ResourceVersions /// /// Version of the AppServicePlan. /// The existing AppServicePlan resource. - public static AppServicePlan FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static AppServicePlan FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; /// /// Get the requirements for naming this AppServicePlan resource. diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/AppServicePlanVirtualNetworkConnectionGateway.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/AppServicePlanVirtualNetworkConnectionGateway.cs index 3cb36bcaa487..449cbac9bd53 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/AppServicePlanVirtualNetworkConnectionGateway.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/AppServicePlanVirtualNetworkConnectionGateway.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.AppService; /// /// AppServicePlanVirtualNetworkConnectionGateway. /// -public partial class AppServicePlanVirtualNetworkConnectionGateway : Resource +public partial class AppServicePlanVirtualNetworkConnectionGateway : ProvisionableResource { /// /// Name of the gateway. Only the 'primary' gateway is supported. @@ -56,7 +56,7 @@ public partial class AppServicePlanVirtualNetworkConnectionGateway : Resource /// /// Creates a new AppServicePlanVirtualNetworkConnectionGateway. /// - /// + /// /// The the Bicep identifier name of the /// AppServicePlanVirtualNetworkConnectionGateway resource. This can be /// used to refer to the resource in expressions, but is not the Azure @@ -64,8 +64,8 @@ public partial class AppServicePlanVirtualNetworkConnectionGateway : Resource /// underscores. /// /// Version of the AppServicePlanVirtualNetworkConnectionGateway. - public AppServicePlanVirtualNetworkConnectionGateway(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Web/serverfarms/virtualNetworkConnections/gateways", resourceVersion) + public AppServicePlanVirtualNetworkConnectionGateway(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Web/serverfarms/virtualNetworkConnections/gateways", resourceVersion) { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _kind = BicepValue.DefineProperty(this, "Kind", ["kind"]); @@ -79,7 +79,7 @@ public AppServicePlanVirtualNetworkConnectionGateway(string identifierName, stri /// Creates a reference to an existing /// AppServicePlanVirtualNetworkConnectionGateway. /// - /// + /// /// The the Bicep identifier name of the /// AppServicePlanVirtualNetworkConnectionGateway resource. This can be /// used to refer to the resource in expressions, but is not the Azure @@ -88,6 +88,6 @@ public AppServicePlanVirtualNetworkConnectionGateway(string identifierName, stri /// /// Version of the AppServicePlanVirtualNetworkConnectionGateway. /// The existing AppServicePlanVirtualNetworkConnectionGateway resource. - public static AppServicePlanVirtualNetworkConnectionGateway FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static AppServicePlanVirtualNetworkConnectionGateway FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/AppServiceSourceControl.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/AppServiceSourceControl.cs index b13d47bf7f0a..bce0b99e8b6f 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/AppServiceSourceControl.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/AppServiceSourceControl.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.AppService; /// /// AppServiceSourceControl. /// -public partial class AppServiceSourceControl : Resource +public partial class AppServiceSourceControl : ProvisionableResource { /// /// Gets the Name. @@ -68,15 +68,15 @@ public partial class AppServiceSourceControl : Resource /// /// Creates a new AppServiceSourceControl. /// - /// + /// /// The the Bicep identifier name of the AppServiceSourceControl resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, /// numbers, and underscores. /// /// Version of the AppServiceSourceControl. - public AppServiceSourceControl(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Web/sourcecontrols", resourceVersion ?? "2024-04-01") + public AppServiceSourceControl(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Web/sourcecontrols", resourceVersion ?? "2024-04-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _expireOn = BicepValue.DefineProperty(this, "ExpireOn", ["properties", "expirationTime"]); @@ -227,7 +227,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing AppServiceSourceControl. /// - /// + /// /// The the Bicep identifier name of the AppServiceSourceControl resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, @@ -235,6 +235,6 @@ public static class ResourceVersions /// /// Version of the AppServiceSourceControl. /// The existing AppServiceSourceControl resource. - public static AppServiceSourceControl FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static AppServiceSourceControl FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/AseV3NetworkingConfiguration.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/AseV3NetworkingConfiguration.cs index f72b994bf3f8..d885ccaca6e7 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/AseV3NetworkingConfiguration.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/AseV3NetworkingConfiguration.cs @@ -17,7 +17,7 @@ namespace Azure.Provisioning.AppService; /// /// AseV3NetworkingConfiguration. /// -public partial class AseV3NetworkingConfiguration : Resource +public partial class AseV3NetworkingConfiguration : ProvisionableResource { /// /// Gets the Name. @@ -101,15 +101,15 @@ public partial class AseV3NetworkingConfiguration : Resource /// /// Creates a new AseV3NetworkingConfiguration. /// - /// + /// /// The the Bicep identifier name of the AseV3NetworkingConfiguration /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the AseV3NetworkingConfiguration. - public AseV3NetworkingConfiguration(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Web/hostingEnvironments/configurations", resourceVersion ?? "2024-04-01") + public AseV3NetworkingConfiguration(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Web/hostingEnvironments/configurations", resourceVersion ?? "2024-04-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _allowNewPrivateEndpointConnections = BicepValue.DefineProperty(this, "AllowNewPrivateEndpointConnections", ["properties", "allowNewPrivateEndpointConnections"]); @@ -290,7 +290,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing AseV3NetworkingConfiguration. /// - /// + /// /// The the Bicep identifier name of the AseV3NetworkingConfiguration /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -298,6 +298,6 @@ public static class ResourceVersions /// /// Version of the AseV3NetworkingConfiguration. /// The existing AseV3NetworkingConfiguration resource. - public static AseV3NetworkingConfiguration FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static AseV3NetworkingConfiguration FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/CustomDnsSuffixConfiguration.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/CustomDnsSuffixConfiguration.cs index d72d4addfb2c..cbe800022b7a 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/CustomDnsSuffixConfiguration.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/CustomDnsSuffixConfiguration.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.AppService; /// /// CustomDnsSuffixConfiguration. /// -public partial class CustomDnsSuffixConfiguration : Resource +public partial class CustomDnsSuffixConfiguration : ProvisionableResource { /// /// Gets the Name. @@ -85,15 +85,15 @@ public partial class CustomDnsSuffixConfiguration : Resource /// /// Creates a new CustomDnsSuffixConfiguration. /// - /// + /// /// The the Bicep identifier name of the CustomDnsSuffixConfiguration /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the CustomDnsSuffixConfiguration. - public CustomDnsSuffixConfiguration(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Web/hostingEnvironments/configurations", resourceVersion ?? "2024-04-01") + public CustomDnsSuffixConfiguration(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Web/hostingEnvironments/configurations", resourceVersion ?? "2024-04-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _certificateUri = BicepValue.DefineProperty(this, "CertificateUri", ["properties", "certificateUrl"]); @@ -271,7 +271,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing CustomDnsSuffixConfiguration. /// - /// + /// /// The the Bicep identifier name of the CustomDnsSuffixConfiguration /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -279,6 +279,6 @@ public static class ResourceVersions /// /// Version of the CustomDnsSuffixConfiguration. /// The existing CustomDnsSuffixConfiguration resource. - public static CustomDnsSuffixConfiguration FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static CustomDnsSuffixConfiguration FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/DomainOwnershipIdentifier.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/DomainOwnershipIdentifier.cs index 0928f61d5409..ea5d9ce42954 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/DomainOwnershipIdentifier.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/DomainOwnershipIdentifier.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.AppService; /// /// DomainOwnershipIdentifier. /// -public partial class DomainOwnershipIdentifier : Resource +public partial class DomainOwnershipIdentifier : ProvisionableResource { /// /// Name of identifier. @@ -56,15 +56,15 @@ public partial class DomainOwnershipIdentifier : Resource /// /// Creates a new DomainOwnershipIdentifier. /// - /// + /// /// The the Bicep identifier name of the DomainOwnershipIdentifier /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the DomainOwnershipIdentifier. - public DomainOwnershipIdentifier(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.DomainRegistration/domains/domainOwnershipIdentifiers", resourceVersion ?? "2024-04-01") + public DomainOwnershipIdentifier(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.DomainRegistration/domains/domainOwnershipIdentifiers", resourceVersion ?? "2024-04-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _kind = BicepValue.DefineProperty(this, "Kind", ["kind"]); @@ -168,7 +168,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing DomainOwnershipIdentifier. /// - /// + /// /// The the Bicep identifier name of the DomainOwnershipIdentifier /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -176,6 +176,6 @@ public static class ResourceVersions /// /// Version of the DomainOwnershipIdentifier. /// The existing DomainOwnershipIdentifier resource. - public static DomainOwnershipIdentifier FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static DomainOwnershipIdentifier FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/HostingEnvironmentMultiRolePool.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/HostingEnvironmentMultiRolePool.cs index f6a3e06a7629..e6217db675ae 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/HostingEnvironmentMultiRolePool.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/HostingEnvironmentMultiRolePool.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.AppService; /// /// HostingEnvironmentMultiRolePool. /// -public partial class HostingEnvironmentMultiRolePool : Resource +public partial class HostingEnvironmentMultiRolePool : ProvisionableResource { /// /// Gets the Name. @@ -87,15 +87,15 @@ public partial class HostingEnvironmentMultiRolePool : Resource /// /// Creates a new HostingEnvironmentMultiRolePool. /// - /// + /// /// The the Bicep identifier name of the HostingEnvironmentMultiRolePool /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the HostingEnvironmentMultiRolePool. - public HostingEnvironmentMultiRolePool(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Web/hostingEnvironments/multiRolePools", resourceVersion ?? "2024-04-01") + public HostingEnvironmentMultiRolePool(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Web/hostingEnvironments/multiRolePools", resourceVersion ?? "2024-04-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _computeMode = BicepValue.DefineProperty(this, "ComputeMode", ["properties", "computeMode"]); @@ -269,7 +269,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing HostingEnvironmentMultiRolePool. /// - /// + /// /// The the Bicep identifier name of the HostingEnvironmentMultiRolePool /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -277,6 +277,6 @@ public static class ResourceVersions /// /// Version of the HostingEnvironmentMultiRolePool. /// The existing HostingEnvironmentMultiRolePool resource. - public static HostingEnvironmentMultiRolePool FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static HostingEnvironmentMultiRolePool FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/HostingEnvironmentPrivateEndpointConnection.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/HostingEnvironmentPrivateEndpointConnection.cs index 897a316c295c..8b331a5f31b4 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/HostingEnvironmentPrivateEndpointConnection.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/HostingEnvironmentPrivateEndpointConnection.cs @@ -17,7 +17,7 @@ namespace Azure.Provisioning.AppService; /// /// HostingEnvironmentPrivateEndpointConnection. /// -public partial class HostingEnvironmentPrivateEndpointConnection : Resource +public partial class HostingEnvironmentPrivateEndpointConnection : ProvisionableResource { /// /// The System.String to use. @@ -76,7 +76,7 @@ public partial class HostingEnvironmentPrivateEndpointConnection : Resource /// /// Creates a new HostingEnvironmentPrivateEndpointConnection. /// - /// + /// /// The the Bicep identifier name of the /// HostingEnvironmentPrivateEndpointConnection resource. This can be /// used to refer to the resource in expressions, but is not the Azure @@ -84,8 +84,8 @@ public partial class HostingEnvironmentPrivateEndpointConnection : Resource /// underscores. /// /// Version of the HostingEnvironmentPrivateEndpointConnection. - public HostingEnvironmentPrivateEndpointConnection(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Web/hostingEnvironments/privateEndpointConnections", resourceVersion ?? "2024-04-01") + public HostingEnvironmentPrivateEndpointConnection(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Web/hostingEnvironments/privateEndpointConnections", resourceVersion ?? "2024-04-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _iPAddresses = BicepList.DefineProperty(this, "IPAddresses", ["properties", "ipAddresses"]); @@ -263,7 +263,7 @@ public static class ResourceVersions /// Creates a reference to an existing /// HostingEnvironmentPrivateEndpointConnection. /// - /// + /// /// The the Bicep identifier name of the /// HostingEnvironmentPrivateEndpointConnection resource. This can be /// used to refer to the resource in expressions, but is not the Azure @@ -272,6 +272,6 @@ public static class ResourceVersions /// /// Version of the HostingEnvironmentPrivateEndpointConnection. /// The existing HostingEnvironmentPrivateEndpointConnection resource. - public static HostingEnvironmentPrivateEndpointConnection FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static HostingEnvironmentPrivateEndpointConnection FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/HostingEnvironmentWorkerPool.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/HostingEnvironmentWorkerPool.cs index 1abfe2dc9c08..d2206500f7f1 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/HostingEnvironmentWorkerPool.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/HostingEnvironmentWorkerPool.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.AppService; /// /// HostingEnvironmentWorkerPool. /// -public partial class HostingEnvironmentWorkerPool : Resource +public partial class HostingEnvironmentWorkerPool : ProvisionableResource { /// /// Name of the worker pool. @@ -87,15 +87,15 @@ public partial class HostingEnvironmentWorkerPool : Resource /// /// Creates a new HostingEnvironmentWorkerPool. /// - /// + /// /// The the Bicep identifier name of the HostingEnvironmentWorkerPool /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the HostingEnvironmentWorkerPool. - public HostingEnvironmentWorkerPool(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Web/hostingEnvironments/workerPools", resourceVersion ?? "2024-04-01") + public HostingEnvironmentWorkerPool(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Web/hostingEnvironments/workerPools", resourceVersion ?? "2024-04-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _computeMode = BicepValue.DefineProperty(this, "ComputeMode", ["properties", "computeMode"]); @@ -269,7 +269,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing HostingEnvironmentWorkerPool. /// - /// + /// /// The the Bicep identifier name of the HostingEnvironmentWorkerPool /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -277,6 +277,6 @@ public static class ResourceVersions /// /// Version of the HostingEnvironmentWorkerPool. /// The existing HostingEnvironmentWorkerPool resource. - public static HostingEnvironmentWorkerPool FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static HostingEnvironmentWorkerPool FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/KubeEnvironment.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/KubeEnvironment.cs index 3a8a4dbd1ef3..b068cf2052ff 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/KubeEnvironment.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/KubeEnvironment.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.AppService; /// /// KubeEnvironment. /// -public partial class KubeEnvironment : Resource +public partial class KubeEnvironment : ProvisionableResource { /// /// Name of the Kubernetes Environment. @@ -129,15 +129,15 @@ public partial class KubeEnvironment : Resource /// /// Creates a new KubeEnvironment. /// - /// + /// /// The the Bicep identifier name of the KubeEnvironment resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, /// and underscores. /// /// Version of the KubeEnvironment. - public KubeEnvironment(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Web/kubeEnvironments", resourceVersion ?? "2021-03-01") + public KubeEnvironment(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Web/kubeEnvironments", resourceVersion ?? "2021-03-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _location = BicepValue.DefineProperty(this, "Location", ["location"], isRequired: true); @@ -172,7 +172,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing KubeEnvironment. /// - /// + /// /// The the Bicep identifier name of the KubeEnvironment resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, @@ -180,6 +180,6 @@ public static class ResourceVersions /// /// Version of the KubeEnvironment. /// The existing KubeEnvironment resource. - public static KubeEnvironment FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static KubeEnvironment FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/LogsSiteConfig.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/LogsSiteConfig.cs index c25d38e2a2d2..e8d93e17bdfd 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/LogsSiteConfig.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/LogsSiteConfig.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.AppService; /// /// LogsSiteConfig. /// -public partial class LogsSiteConfig : Resource +public partial class LogsSiteConfig : ProvisionableResource { /// /// Gets the Name. @@ -76,15 +76,15 @@ public partial class LogsSiteConfig : Resource /// /// Creates a new LogsSiteConfig. /// - /// + /// /// The the Bicep identifier name of the LogsSiteConfig resource. This can /// be used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and /// underscores. /// /// Version of the LogsSiteConfig. - public LogsSiteConfig(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Web/sites/config", resourceVersion ?? "2024-04-01") + public LogsSiteConfig(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Web/sites/config", resourceVersion ?? "2024-04-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _applicationLogs = BicepValue.DefineProperty(this, "ApplicationLogs", ["properties", "applicationLogs"]); @@ -261,7 +261,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing LogsSiteConfig. /// - /// + /// /// The the Bicep identifier name of the LogsSiteConfig resource. This can /// be used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and @@ -269,6 +269,6 @@ public static class ResourceVersions /// /// Version of the LogsSiteConfig. /// The existing LogsSiteConfig resource. - public static LogsSiteConfig FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static LogsSiteConfig FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/LogsSiteSlotConfig.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/LogsSiteSlotConfig.cs index d680566fd83c..69adc3ead4a4 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/LogsSiteSlotConfig.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/LogsSiteSlotConfig.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.AppService; /// /// LogsSiteSlotConfig. /// -public partial class LogsSiteSlotConfig : Resource +public partial class LogsSiteSlotConfig : ProvisionableResource { /// /// Gets the Name. @@ -76,15 +76,15 @@ public partial class LogsSiteSlotConfig : Resource /// /// Creates a new LogsSiteSlotConfig. /// - /// + /// /// The the Bicep identifier name of the LogsSiteSlotConfig resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, /// and underscores. /// /// Version of the LogsSiteSlotConfig. - public LogsSiteSlotConfig(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Web/sites/slots/config", resourceVersion ?? "2024-04-01") + public LogsSiteSlotConfig(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Web/sites/slots/config", resourceVersion ?? "2024-04-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _applicationLogs = BicepValue.DefineProperty(this, "ApplicationLogs", ["properties", "applicationLogs"]); @@ -261,7 +261,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing LogsSiteSlotConfig. /// - /// + /// /// The the Bicep identifier name of the LogsSiteSlotConfig resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, @@ -269,6 +269,6 @@ public static class ResourceVersions /// /// Version of the LogsSiteSlotConfig. /// The existing LogsSiteSlotConfig resource. - public static LogsSiteSlotConfig FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static LogsSiteSlotConfig FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppDaprConfig.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppDaprConfig.cs index 3c79330eb23a..7ccd606d4679 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppDaprConfig.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppDaprConfig.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.AppService; /// /// App Dapr configuration. /// -public partial class AppDaprConfig : ProvisioningConstruct +public partial class AppDaprConfig : ProvisionableConstruct { /// /// Boolean indicating if the Dapr side car is enabled. diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppLogsConfiguration.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppLogsConfiguration.cs index 6efe5a666f27..29dfb4626d65 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppLogsConfiguration.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppLogsConfiguration.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.AppService; /// /// The AppLogsConfiguration. /// -public partial class AppLogsConfiguration : ProvisioningConstruct +public partial class AppLogsConfiguration : ProvisionableConstruct { /// /// Gets or sets the destination. diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceArmPlan.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceArmPlan.cs index e2d4c8304733..5699e3da32ef 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceArmPlan.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceArmPlan.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.AppService; /// /// The plan object in Azure Resource Manager, represents a marketplace plan. /// -public partial class AppServiceArmPlan : ProvisioningConstruct +public partial class AppServiceArmPlan : ProvisionableConstruct { /// /// The name. diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceBlobStorageApplicationLogsConfig.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceBlobStorageApplicationLogsConfig.cs index 0d26ff60a67f..e0410cdc9fcf 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceBlobStorageApplicationLogsConfig.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceBlobStorageApplicationLogsConfig.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.AppService; /// /// Application logs azure blob storage configuration. /// -public partial class AppServiceBlobStorageApplicationLogsConfig : ProvisioningConstruct +public partial class AppServiceBlobStorageApplicationLogsConfig : ProvisionableConstruct { /// /// Log level. diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceBlobStorageHttpLogsConfig.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceBlobStorageHttpLogsConfig.cs index 2c223ff9432b..6d12f46c40e7 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceBlobStorageHttpLogsConfig.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceBlobStorageHttpLogsConfig.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.AppService; /// /// Http logs to azure blob storage configuration. /// -public partial class AppServiceBlobStorageHttpLogsConfig : ProvisioningConstruct +public partial class AppServiceBlobStorageHttpLogsConfig : ProvisionableConstruct { /// /// SAS url to a azure blob container with read/write/list/delete diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceCertificateDetails.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceCertificateDetails.cs index 5d5d027ae2d8..3ba1789549cb 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceCertificateDetails.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceCertificateDetails.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.AppService; /// /// SSL certificate details. /// -public partial class AppServiceCertificateDetails : ProvisioningConstruct +public partial class AppServiceCertificateDetails : ProvisionableConstruct { /// /// Certificate Version. diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceCertificateProperties.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceCertificateProperties.cs index e98a811d6743..66ae2e95f3bd 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceCertificateProperties.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceCertificateProperties.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.AppService; /// /// Key Vault container for a certificate that is purchased through Azure. /// -public partial class AppServiceCertificateProperties : ProvisioningConstruct +public partial class AppServiceCertificateProperties : ProvisionableConstruct { /// /// Key Vault resource Id. diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceCorsSettings.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceCorsSettings.cs index 9aae7f19702c..0f29abf85d50 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceCorsSettings.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceCorsSettings.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.AppService; /// /// Cross-Origin Resource Sharing (CORS) settings for the app. /// -public partial class AppServiceCorsSettings : ProvisioningConstruct +public partial class AppServiceCorsSettings : ProvisionableConstruct { /// /// Gets or sets the list of origins that should be allowed to make diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceHostName.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceHostName.cs index 9c0e1efebfa8..71339e76734f 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceHostName.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceHostName.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.AppService; /// /// Details of a hostname derived from a domain. /// -public partial class AppServiceHostName : ProvisioningConstruct +public partial class AppServiceHostName : ProvisionableConstruct { /// /// Name of the hostname. diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceHttpLogsConfig.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceHttpLogsConfig.cs index 932fa9c27e76..d2bed907d743 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceHttpLogsConfig.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceHttpLogsConfig.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.AppService; /// /// Http logs configuration. /// -public partial class AppServiceHttpLogsConfig : ProvisioningConstruct +public partial class AppServiceHttpLogsConfig : ProvisionableConstruct { /// /// Http logs to file system configuration. diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceIPSecurityRestriction.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceIPSecurityRestriction.cs index 9262242352b3..59106be19ee9 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceIPSecurityRestriction.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceIPSecurityRestriction.cs @@ -13,7 +13,7 @@ namespace Azure.Provisioning.AppService; /// /// IP security restriction on an app. /// -public partial class AppServiceIPSecurityRestriction : ProvisioningConstruct +public partial class AppServiceIPSecurityRestriction : ProvisionableConstruct { /// /// IP address the security restriction is valid for. It can be diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceNameValuePair.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceNameValuePair.cs index a9f815d6546f..f02b194d5163 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceNameValuePair.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceNameValuePair.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.AppService; /// /// Name value pair. /// -public partial class AppServiceNameValuePair : ProvisioningConstruct +public partial class AppServiceNameValuePair : ProvisionableConstruct { /// /// Pair name. diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceSkuCapability.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceSkuCapability.cs index 2afeb3bf8071..a6a9dd480dc1 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceSkuCapability.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceSkuCapability.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.AppService; /// /// Describes the capabilities/features allowed for a specific SKU. /// -public partial class AppServiceSkuCapability : ProvisioningConstruct +public partial class AppServiceSkuCapability : ProvisionableConstruct { /// /// Name of the SKU capability. diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceSkuCapacity.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceSkuCapacity.cs index 27998ab534a9..72336c70f7b4 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceSkuCapacity.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceSkuCapacity.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.AppService; /// /// Description of the App Service plan scale options. /// -public partial class AppServiceSkuCapacity : ProvisioningConstruct +public partial class AppServiceSkuCapacity : ProvisionableConstruct { /// /// Minimum number of workers for this App Service plan SKU. diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceSkuDescription.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceSkuDescription.cs index d8e73a6bce0d..f13463926b36 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceSkuDescription.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceSkuDescription.cs @@ -13,7 +13,7 @@ namespace Azure.Provisioning.AppService; /// /// Description of a SKU for a scalable resource. /// -public partial class AppServiceSkuDescription : ProvisioningConstruct +public partial class AppServiceSkuDescription : ProvisionableConstruct { /// /// Name of the resource SKU. diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceStorageAccessInfo.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceStorageAccessInfo.cs index d7a4bd3e68e2..08161bb92ad0 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceStorageAccessInfo.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceStorageAccessInfo.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.AppService; /// /// Azure Files or Blob Storage access information value for dictionary storage. /// -public partial class AppServiceStorageAccessInfo : ProvisioningConstruct +public partial class AppServiceStorageAccessInfo : ProvisionableConstruct { /// /// Type of storage. diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceTableStorageApplicationLogsConfig.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceTableStorageApplicationLogsConfig.cs index 738c9832cadd..cefc5369343c 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceTableStorageApplicationLogsConfig.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceTableStorageApplicationLogsConfig.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.AppService; /// /// Application logs to Azure table storage configuration. /// -public partial class AppServiceTableStorageApplicationLogsConfig : ProvisioningConstruct +public partial class AppServiceTableStorageApplicationLogsConfig : ProvisionableConstruct { /// /// Log level. diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceVirtualNetworkProfile.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceVirtualNetworkProfile.cs index bb0bea6b3162..4d22058f8142 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceVirtualNetworkProfile.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceVirtualNetworkProfile.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.AppService; /// /// Specification for using a Virtual Network. /// -public partial class AppServiceVirtualNetworkProfile : ProvisioningConstruct +public partial class AppServiceVirtualNetworkProfile : ProvisionableConstruct { /// /// Resource id of the Virtual Network. diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceVirtualNetworkRoute.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceVirtualNetworkRoute.cs index 3e380e8c04b9..29c7cc7e279c 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceVirtualNetworkRoute.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceVirtualNetworkRoute.cs @@ -14,7 +14,7 @@ namespace Azure.Provisioning.AppService; /// Virtual Network route contract used to pass routing information for a /// Virtual Network. /// -public partial class AppServiceVirtualNetworkRoute : ProvisioningConstruct +public partial class AppServiceVirtualNetworkRoute : ProvisionableConstruct { /// /// The starting address for this route. This may also include a CIDR diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/ApplicationLogsConfig.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/ApplicationLogsConfig.cs index c6c3d730eef1..b7f15a7babc2 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/ApplicationLogsConfig.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/ApplicationLogsConfig.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.AppService; /// /// Application logs configuration. /// -public partial class ApplicationLogsConfig : ProvisioningConstruct +public partial class ApplicationLogsConfig : ProvisionableConstruct { /// /// Log level. diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/ArcConfiguration.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/ArcConfiguration.cs index a92d6ad13ebb..5906553f75b0 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/ArcConfiguration.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/ArcConfiguration.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.AppService; /// /// The ArcConfiguration. /// -public partial class ArcConfiguration : ProvisioningConstruct +public partial class ArcConfiguration : ProvisionableConstruct { /// /// Gets or sets the artifacts storage type. diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AseV3NetworkingConfigurationData.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AseV3NetworkingConfigurationData.cs index 86cc40fccac9..6b0c376988d1 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AseV3NetworkingConfigurationData.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AseV3NetworkingConfigurationData.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.AppService; /// A class representing the AseV3NetworkingConfiguration data model. /// Full view of networking configuration for an ASE. /// -public partial class AseV3NetworkingConfigurationData : ProvisioningConstruct +public partial class AseV3NetworkingConfigurationData : ProvisionableConstruct { /// /// Gets the windows outbound ip addresses. diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AutoHealActions.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AutoHealActions.cs index eeb856d48639..fc8e6e88f039 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AutoHealActions.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AutoHealActions.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.AppService; /// /// Actions which to take by the auto-heal module when a rule is triggered. /// -public partial class AutoHealActions : ProvisioningConstruct +public partial class AutoHealActions : ProvisionableConstruct { /// /// Predefined action to be taken. diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AutoHealCustomAction.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AutoHealCustomAction.cs index 76bc26b131d0..f77e1aaecc5b 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AutoHealCustomAction.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AutoHealCustomAction.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.AppService; /// Custom action to be executed when an auto heal rule is /// triggered. /// -public partial class AutoHealCustomAction : ProvisioningConstruct +public partial class AutoHealCustomAction : ProvisionableConstruct { /// /// Executable to be run. diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AutoHealRules.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AutoHealRules.cs index c1a8c4243326..ed76346a4bef 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AutoHealRules.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AutoHealRules.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.AppService; /// /// Rules that can be defined for auto-heal. /// -public partial class AutoHealRules : ProvisioningConstruct +public partial class AutoHealRules : ProvisionableConstruct { /// /// Conditions that describe when to execute the auto-heal actions. diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AutoHealTriggers.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AutoHealTriggers.cs index 8668d6690ac5..ba72cef70fef 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AutoHealTriggers.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AutoHealTriggers.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.AppService; /// /// Triggers for auto-heal. /// -public partial class AutoHealTriggers : ProvisioningConstruct +public partial class AutoHealTriggers : ProvisionableConstruct { /// /// A rule based on total requests. diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/CertificateOrderContact.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/CertificateOrderContact.cs index dba9d513f91a..07fe60569980 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/CertificateOrderContact.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/CertificateOrderContact.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.AppService; /// /// The CertificateOrderContact. /// -public partial class CertificateOrderContact : ProvisioningConstruct +public partial class CertificateOrderContact : ProvisionableConstruct { /// /// Gets the email. diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/CloningInfo.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/CloningInfo.cs index 525ff79115c5..d6737db53e03 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/CloningInfo.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/CloningInfo.cs @@ -13,7 +13,7 @@ namespace Azure.Provisioning.AppService; /// /// Information needed for cloning operation. /// -public partial class CloningInfo : ProvisioningConstruct +public partial class CloningInfo : ProvisionableConstruct { /// /// Correlation ID of cloning operation. This ID ties multiple cloning diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/ConnStringInfo.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/ConnStringInfo.cs index b323f67fe94b..ee3a74160938 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/ConnStringInfo.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/ConnStringInfo.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.AppService; /// /// Database connection string information. /// -public partial class ConnStringInfo : ProvisioningConstruct +public partial class ConnStringInfo : ProvisionableConstruct { /// /// Name of connection string. diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/ContainerAppsConfiguration.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/ContainerAppsConfiguration.cs index f1d3b730098b..99b85d9e5b44 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/ContainerAppsConfiguration.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/ContainerAppsConfiguration.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.AppService; /// /// The ContainerAppsConfiguration. /// -public partial class ContainerAppsConfiguration : ProvisioningConstruct +public partial class ContainerAppsConfiguration : ProvisionableConstruct { /// /// Azure Monitor instrumentation key used by Dapr to export Service to diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/CustomDnsSuffixConfigurationData.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/CustomDnsSuffixConfigurationData.cs index d2bfdb12f28a..32dae73cbe4f 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/CustomDnsSuffixConfigurationData.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/CustomDnsSuffixConfigurationData.cs @@ -14,7 +14,7 @@ namespace Azure.Provisioning.AppService; /// A class representing the CustomDnsSuffixConfiguration data model. /// Full view of the custom domain suffix configuration for ASEv3. /// -public partial class CustomDnsSuffixConfigurationData : ProvisioningConstruct +public partial class CustomDnsSuffixConfigurationData : ProvisionableConstruct { /// /// Gets the provisioning state. diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/DomainPurchaseConsent.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/DomainPurchaseConsent.cs index 7e78e3a6adc0..5b4516e702b0 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/DomainPurchaseConsent.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/DomainPurchaseConsent.cs @@ -13,7 +13,7 @@ namespace Azure.Provisioning.AppService; /// Domain purchase consent object, representing acceptance of applicable legal /// agreements. /// -public partial class DomainPurchaseConsent : ProvisioningConstruct +public partial class DomainPurchaseConsent : ProvisionableConstruct { /// /// List of applicable legal agreement keys. This list can be retrieved diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/FileSystemHttpLogsConfig.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/FileSystemHttpLogsConfig.cs index efe4a1d9f780..26ae674ea5ae 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/FileSystemHttpLogsConfig.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/FileSystemHttpLogsConfig.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.AppService; /// /// Http logs to file system configuration. /// -public partial class FileSystemHttpLogsConfig : ProvisioningConstruct +public partial class FileSystemHttpLogsConfig : ProvisionableConstruct { /// /// Maximum size in megabytes that http log files can use. When diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/FunctionAppAlwaysReadyConfig.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/FunctionAppAlwaysReadyConfig.cs index 3ddd50e27925..7c815e7fb3bf 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/FunctionAppAlwaysReadyConfig.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/FunctionAppAlwaysReadyConfig.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.AppService; /// Sets the number of 'Always Ready' instances for a function group /// or a specific function. /// -public partial class FunctionAppAlwaysReadyConfig : ProvisioningConstruct +public partial class FunctionAppAlwaysReadyConfig : ProvisionableConstruct { /// /// Either a function group or a function name is required. For additional diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/FunctionAppConfig.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/FunctionAppConfig.cs index c7df45565b6b..e3850191e0d5 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/FunctionAppConfig.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/FunctionAppConfig.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.AppService; /// /// Function app configuration. /// -public partial class FunctionAppConfig : ProvisioningConstruct +public partial class FunctionAppConfig : ProvisionableConstruct { /// /// Storage for deployed package used by the function app. diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/FunctionAppResourceConfig.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/FunctionAppResourceConfig.cs index 8909afaa76bf..dc89345a731e 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/FunctionAppResourceConfig.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/FunctionAppResourceConfig.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.AppService; /// /// Function app resource requirements. /// -public partial class FunctionAppResourceConfig : ProvisioningConstruct +public partial class FunctionAppResourceConfig : ProvisionableConstruct { /// /// Required CPU in cores, e.g. 0.5. diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/FunctionAppRuntime.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/FunctionAppRuntime.cs index 88c05667e879..267aad318b07 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/FunctionAppRuntime.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/FunctionAppRuntime.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.AppService; /// /// Function app runtime name and version. /// -public partial class FunctionAppRuntime : ProvisioningConstruct +public partial class FunctionAppRuntime : ProvisionableConstruct { /// /// Function app runtime name. Available options: dotnet-isolated, node, diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/FunctionAppScaleAndConcurrency.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/FunctionAppScaleAndConcurrency.cs index a0aba738559c..7b1913d5fae4 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/FunctionAppScaleAndConcurrency.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/FunctionAppScaleAndConcurrency.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.AppService; /// /// Scale and concurrency settings for the function app. /// -public partial class FunctionAppScaleAndConcurrency : ProvisioningConstruct +public partial class FunctionAppScaleAndConcurrency : ProvisionableConstruct { /// /// 'Always Ready' configuration for the function app. diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/FunctionAppStorage.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/FunctionAppStorage.cs index bc95c6080657..41b48af40e76 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/FunctionAppStorage.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/FunctionAppStorage.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.AppService; /// /// Storage for deployed package used by the function app. /// -public partial class FunctionAppStorage : ProvisioningConstruct +public partial class FunctionAppStorage : ProvisionableConstruct { /// /// Property to select Azure Storage type. Available options: blobContainer. diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/FunctionAppStorageAuthentication.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/FunctionAppStorageAuthentication.cs index b6696a2099c7..a5133972afd5 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/FunctionAppStorageAuthentication.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/FunctionAppStorageAuthentication.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.AppService; /// /// Authentication method to access the storage account for deployment. /// -public partial class FunctionAppStorageAuthentication : ProvisioningConstruct +public partial class FunctionAppStorageAuthentication : ProvisionableConstruct { /// /// Property to select authentication type to access the selected storage diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/GitHubActionCodeConfiguration.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/GitHubActionCodeConfiguration.cs index 1bc6335e2479..aea80962d07c 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/GitHubActionCodeConfiguration.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/GitHubActionCodeConfiguration.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.AppService; /// /// The GitHub action code configuration. /// -public partial class GitHubActionCodeConfiguration : ProvisioningConstruct +public partial class GitHubActionCodeConfiguration : ProvisionableConstruct { /// /// Runtime stack is used to determine the workflow file content for code diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/GitHubActionConfiguration.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/GitHubActionConfiguration.cs index 89518c9c00ee..6101374befa7 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/GitHubActionConfiguration.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/GitHubActionConfiguration.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.AppService; /// /// The GitHub action configuration. /// -public partial class GitHubActionConfiguration : ProvisioningConstruct +public partial class GitHubActionConfiguration : ProvisionableConstruct { /// /// GitHub Action code configuration. diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/GitHubActionContainerConfiguration.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/GitHubActionContainerConfiguration.cs index e527c5ea375e..cea8f6993319 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/GitHubActionContainerConfiguration.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/GitHubActionContainerConfiguration.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.AppService; /// /// The GitHub action container configuration. /// -public partial class GitHubActionContainerConfiguration : ProvisioningConstruct +public partial class GitHubActionContainerConfiguration : ProvisionableConstruct { /// /// The server URL for the container registry where the build will be diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/HostNameSslState.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/HostNameSslState.cs index cf7c5830cb54..986c585fa204 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/HostNameSslState.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/HostNameSslState.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.AppService; /// /// SSL-enabled hostname. /// -public partial class HostNameSslState : ProvisioningConstruct +public partial class HostNameSslState : ProvisionableConstruct { /// /// Hostname. diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/HostingEnvironmentProfile.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/HostingEnvironmentProfile.cs index 6eeb73f362d5..a0e5e4f0fb45 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/HostingEnvironmentProfile.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/HostingEnvironmentProfile.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.AppService; /// /// Specification for an App Service Environment to use for this resource. /// -public partial class HostingEnvironmentProfile : ProvisioningConstruct +public partial class HostingEnvironmentProfile : ProvisionableConstruct { /// /// Resource ID of the App Service Environment. diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/HttpRequestHandlerMapping.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/HttpRequestHandlerMapping.cs index 18746f09c30c..c5687c597290 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/HttpRequestHandlerMapping.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/HttpRequestHandlerMapping.cs @@ -14,7 +14,7 @@ namespace Azure.Provisioning.AppService; /// configure php-cgi.exe process to handle all HTTP requests with *.php /// extension. /// -public partial class HttpRequestHandlerMapping : ProvisioningConstruct +public partial class HttpRequestHandlerMapping : ProvisionableConstruct { /// /// Requests with this extension will be handled using the specified diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/KubeEnvironmentProfile.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/KubeEnvironmentProfile.cs index 0e40320d1794..ab82a12f9806 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/KubeEnvironmentProfile.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/KubeEnvironmentProfile.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.AppService; /// /// Specification for a Kubernetes Environment to use for this resource. /// -public partial class KubeEnvironmentProfile : ProvisioningConstruct +public partial class KubeEnvironmentProfile : ProvisionableConstruct { /// /// Resource ID of the Kubernetes Environment. diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/LogAnalyticsConfiguration.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/LogAnalyticsConfiguration.cs index ad03d328254d..b73b04ff631e 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/LogAnalyticsConfiguration.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/LogAnalyticsConfiguration.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.AppService; /// /// The LogAnalyticsConfiguration. /// -public partial class LogAnalyticsConfiguration : ProvisioningConstruct +public partial class LogAnalyticsConfiguration : ProvisionableConstruct { /// /// Gets or sets the customer id. diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/PrivateAccessSubnet.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/PrivateAccessSubnet.cs index 2114d88c0814..d8b331518d57 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/PrivateAccessSubnet.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/PrivateAccessSubnet.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.AppService; /// Description of a Virtual Network subnet that is useable for private site /// access. /// -public partial class PrivateAccessSubnet : ProvisioningConstruct +public partial class PrivateAccessSubnet : ProvisionableConstruct { /// /// The name of the subnet. diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/PrivateAccessVirtualNetwork.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/PrivateAccessVirtualNetwork.cs index f7f82ae6c0e6..69b285bd7863 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/PrivateAccessVirtualNetwork.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/PrivateAccessVirtualNetwork.cs @@ -13,7 +13,7 @@ namespace Azure.Provisioning.AppService; /// /// Description of a Virtual Network that is useable for private site access. /// -public partial class PrivateAccessVirtualNetwork : ProvisioningConstruct +public partial class PrivateAccessVirtualNetwork : ProvisionableConstruct { /// /// The name of the Virtual Network. diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/PrivateLinkConnectionState.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/PrivateLinkConnectionState.cs index 0cbd5e3a21e7..c97be992db8b 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/PrivateLinkConnectionState.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/PrivateLinkConnectionState.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.AppService; /// /// The state of a private link connection. /// -public partial class PrivateLinkConnectionState : ProvisioningConstruct +public partial class PrivateLinkConnectionState : ProvisionableConstruct { /// /// Status of a private link connection. diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/RampUpRule.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/RampUpRule.cs index d3d068246aa2..c248d56adf96 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/RampUpRule.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/RampUpRule.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.AppService; /// Routing rules for ramp up testing. This rule allows to redirect static /// traffic % to a slot or to gradually change routing % based on performance. /// -public partial class RampUpRule : ProvisioningConstruct +public partial class RampUpRule : ProvisionableConstruct { /// /// Hostname of a slot to which the traffic will be redirected if decided diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/RegistrationAddressInfo.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/RegistrationAddressInfo.cs index 04246e03965a..b22458307e37 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/RegistrationAddressInfo.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/RegistrationAddressInfo.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.AppService; /// /// Address information for domain registration. /// -public partial class RegistrationAddressInfo : ProvisioningConstruct +public partial class RegistrationAddressInfo : ProvisionableConstruct { /// /// First line of an Address. diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/RegistrationContactInfo.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/RegistrationContactInfo.cs index f6a5c3b8556f..a068173f9a20 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/RegistrationContactInfo.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/RegistrationContactInfo.cs @@ -14,7 +14,7 @@ namespace Azure.Provisioning.AppService; /// available through the Whois directories as per ICANN /// requirements. /// -public partial class RegistrationContactInfo : ProvisioningConstruct +public partial class RegistrationContactInfo : ProvisionableConstruct { /// /// Mailing address. diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/RemotePrivateEndpointConnection.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/RemotePrivateEndpointConnection.cs index 53dc2542b3f0..5550afc258d1 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/RemotePrivateEndpointConnection.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/RemotePrivateEndpointConnection.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.AppService; /// /// A remote private endpoint connection. /// -public partial class RemotePrivateEndpointConnection : ProvisioningConstruct +public partial class RemotePrivateEndpointConnection : ProvisionableConstruct { /// /// Gets the provisioning state. diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/RequestsBasedTrigger.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/RequestsBasedTrigger.cs index 4b7bfc3f6ccf..8abab04f20af 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/RequestsBasedTrigger.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/RequestsBasedTrigger.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.AppService; /// /// Trigger based on total requests. /// -public partial class RequestsBasedTrigger : ProvisioningConstruct +public partial class RequestsBasedTrigger : ProvisionableConstruct { /// /// Request Count. diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/ResponseMessageEnvelopeRemotePrivateEndpointConnection.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/ResponseMessageEnvelopeRemotePrivateEndpointConnection.cs index 1550e471632d..800583138cb4 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/ResponseMessageEnvelopeRemotePrivateEndpointConnection.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/ResponseMessageEnvelopeRemotePrivateEndpointConnection.cs @@ -17,7 +17,7 @@ namespace Azure.Provisioning.AppService; /// Message envelope that contains the common Azure resource manager properties /// and the resource provider specific content. /// -public partial class ResponseMessageEnvelopeRemotePrivateEndpointConnection : ProvisioningConstruct +public partial class ResponseMessageEnvelopeRemotePrivateEndpointConnection : ProvisionableConstruct { /// /// Azure-AsyncOperation Error info. diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/SiteConfigProperties.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/SiteConfigProperties.cs index 7b009bcf964c..76dafd08f3ca 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/SiteConfigProperties.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/SiteConfigProperties.cs @@ -14,7 +14,7 @@ namespace Azure.Provisioning.AppService; /// /// Configuration of an App Service app. /// -public partial class SiteConfigProperties : ProvisioningConstruct +public partial class SiteConfigProperties : ProvisionableConstruct { /// /// Number of workers. diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/SiteContainerVolumeMount.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/SiteContainerVolumeMount.cs index 18e92b952f11..e15248bfd9c8 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/SiteContainerVolumeMount.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/SiteContainerVolumeMount.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.AppService; /// /// The SiteContainerVolumeMount. /// -public partial class SiteContainerVolumeMount : ProvisioningConstruct +public partial class SiteContainerVolumeMount : ProvisionableConstruct { /// /// Sub path in the volume where volume is mounted from. diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/SiteDnsConfig.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/SiteDnsConfig.cs index 9736d6ab32d4..115328d110a4 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/SiteDnsConfig.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/SiteDnsConfig.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.AppService; /// /// The SiteDnsConfig. /// -public partial class SiteDnsConfig : ProvisioningConstruct +public partial class SiteDnsConfig : ProvisionableConstruct { /// /// List of custom DNS servers to be used by an app for lookups. Maximum 5 diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/SiteLimits.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/SiteLimits.cs index ec610e5cd7cf..fdeae2f83c21 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/SiteLimits.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/SiteLimits.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.AppService; /// /// Metric limits set on an app. /// -public partial class SiteLimits : ProvisioningConstruct +public partial class SiteLimits : ProvisionableConstruct { /// /// Maximum allowed CPU usage percentage. diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/SiteMachineKey.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/SiteMachineKey.cs index 313eaf98ced3..eabf636f64da 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/SiteMachineKey.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/SiteMachineKey.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.AppService; /// /// MachineKey of an app. /// -public partial class SiteMachineKey : ProvisioningConstruct +public partial class SiteMachineKey : ProvisionableConstruct { /// /// MachineKey validation. diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/SlotSwapStatus.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/SlotSwapStatus.cs index 77687cdb2d06..98f40a9ac6a6 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/SlotSwapStatus.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/SlotSwapStatus.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.AppService; /// /// The status of the last successful slot swap operation. /// -public partial class SlotSwapStatus : ProvisioningConstruct +public partial class SlotSwapStatus : ProvisionableConstruct { /// /// The time the last successful slot swap completed. diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/SlowRequestsBasedTrigger.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/SlowRequestsBasedTrigger.cs index 2b7892b0804b..4d84bdfa3d17 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/SlowRequestsBasedTrigger.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/SlowRequestsBasedTrigger.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.AppService; /// /// Trigger based on request execution time. /// -public partial class SlowRequestsBasedTrigger : ProvisioningConstruct +public partial class SlowRequestsBasedTrigger : ProvisionableConstruct { /// /// Time taken. diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/StaticSiteBuildProperties.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/StaticSiteBuildProperties.cs index 6bedf4fb614c..28d43ae0a21e 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/StaticSiteBuildProperties.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/StaticSiteBuildProperties.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.AppService; /// /// Build properties for the static site. /// -public partial class StaticSiteBuildProperties : ProvisioningConstruct +public partial class StaticSiteBuildProperties : ProvisionableConstruct { /// /// The path to the app code within the repository. diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/StaticSiteDatabaseConnectionConfigurationFileOverview.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/StaticSiteDatabaseConnectionConfigurationFileOverview.cs index c8d9466e9426..a44ee1b8230c 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/StaticSiteDatabaseConnectionConfigurationFileOverview.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/StaticSiteDatabaseConnectionConfigurationFileOverview.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.AppService; /// /// A database connection configuration file. /// -public partial class StaticSiteDatabaseConnectionConfigurationFileOverview : ProvisioningConstruct +public partial class StaticSiteDatabaseConnectionConfigurationFileOverview : ProvisionableConstruct { /// /// The name of the configuration file. diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/StaticSiteDatabaseConnectionOverview.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/StaticSiteDatabaseConnectionOverview.cs index 262486dc0ace..40448bbbb520 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/StaticSiteDatabaseConnectionOverview.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/StaticSiteDatabaseConnectionOverview.cs @@ -13,7 +13,7 @@ namespace Azure.Provisioning.AppService; /// /// Static Site Database Connection overview. /// -public partial class StaticSiteDatabaseConnectionOverview : ProvisioningConstruct +public partial class StaticSiteDatabaseConnectionOverview : ProvisionableConstruct { /// /// The resource id of the database. diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/StaticSiteLinkedBackendInfo.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/StaticSiteLinkedBackendInfo.cs index b66c65d65b66..047f5566c941 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/StaticSiteLinkedBackendInfo.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/StaticSiteLinkedBackendInfo.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.AppService; /// /// Static Site Linked Backend ARM resource. /// -public partial class StaticSiteLinkedBackendInfo : ProvisioningConstruct +public partial class StaticSiteLinkedBackendInfo : ProvisionableConstruct { /// /// The resource id of the backend linked to the static site. diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/StaticSiteTemplate.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/StaticSiteTemplate.cs index 0440c12f6486..b3a66656f8f2 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/StaticSiteTemplate.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/StaticSiteTemplate.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.AppService; /// /// Template Options for the static site. /// -public partial class StaticSiteTemplate : ProvisioningConstruct +public partial class StaticSiteTemplate : ProvisionableConstruct { /// /// URL of the template repository. The newly generated repository will be diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/StaticSiteUserProvidedFunctionAppData.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/StaticSiteUserProvidedFunctionAppData.cs index 4f1fd7ec6447..f360ea58f052 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/StaticSiteUserProvidedFunctionAppData.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/StaticSiteUserProvidedFunctionAppData.cs @@ -14,7 +14,7 @@ namespace Azure.Provisioning.AppService; /// A class representing the StaticSiteUserProvidedFunctionApp data model. /// Static Site User Provided Function App ARM resource. /// -public partial class StaticSiteUserProvidedFunctionAppData : ProvisioningConstruct +public partial class StaticSiteUserProvidedFunctionAppData : ProvisionableConstruct { /// /// The resource id of the function app registered with the static site. diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/StatusCodesBasedTrigger.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/StatusCodesBasedTrigger.cs index db276f4f12c8..102497b3e5aa 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/StatusCodesBasedTrigger.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/StatusCodesBasedTrigger.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.AppService; /// /// Trigger based on status code. /// -public partial class StatusCodesBasedTrigger : ProvisioningConstruct +public partial class StatusCodesBasedTrigger : ProvisionableConstruct { /// /// HTTP status code. diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/StatusCodesRangeBasedTrigger.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/StatusCodesRangeBasedTrigger.cs index ed84f3c8fd9d..65ce45972d70 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/StatusCodesRangeBasedTrigger.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/StatusCodesRangeBasedTrigger.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.AppService; /// /// Trigger based on range of status codes. /// -public partial class StatusCodesRangeBasedTrigger : ProvisioningConstruct +public partial class StatusCodesRangeBasedTrigger : ProvisionableConstruct { /// /// HTTP status code. diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/VirtualApplication.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/VirtualApplication.cs index 2a2641e4c9c8..2b187bb2f9c8 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/VirtualApplication.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/VirtualApplication.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.AppService; /// /// Virtual application in an app. /// -public partial class VirtualApplication : ProvisioningConstruct +public partial class VirtualApplication : ProvisionableConstruct { /// /// Virtual path. diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/VirtualDirectory.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/VirtualDirectory.cs index 1e5a6bfa14b3..4ff772eec774 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/VirtualDirectory.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/VirtualDirectory.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.AppService; /// /// Directory for virtual application. /// -public partial class VirtualDirectory : ProvisioningConstruct +public partial class VirtualDirectory : ProvisionableConstruct { /// /// Path to virtual application. diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/WebAppEnvironmentVariable.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/WebAppEnvironmentVariable.cs index beb821c49549..b56cc3eaf812 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/WebAppEnvironmentVariable.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/WebAppEnvironmentVariable.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.AppService; /// /// The WebAppEnvironmentVariable. /// -public partial class WebAppEnvironmentVariable : ProvisioningConstruct +public partial class WebAppEnvironmentVariable : ProvisionableConstruct { /// /// Environment variable name. diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/WebAppPushSettings.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/WebAppPushSettings.cs index 846f28b3d8cb..e056fd3a88df 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/WebAppPushSettings.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/WebAppPushSettings.cs @@ -13,7 +13,7 @@ namespace Azure.Provisioning.AppService; /// /// Push settings for the App. /// -public partial class WebAppPushSettings : ProvisioningConstruct +public partial class WebAppPushSettings : ProvisionableConstruct { /// /// Gets or sets a flag indicating whether the Push endpoint is enabled. diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/PublishingUser.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/PublishingUser.cs index 07898255f42b..01c5b8d9e4ba 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/PublishingUser.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/PublishingUser.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.AppService; /// /// PublishingUser. /// -public partial class PublishingUser : Resource +public partial class PublishingUser : ProvisionableResource { /// /// Gets the Name. @@ -74,15 +74,15 @@ public partial class PublishingUser : Resource /// /// Creates a new PublishingUser. /// - /// + /// /// The the Bicep identifier name of the PublishingUser resource. This can /// be used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and /// underscores. /// /// Version of the PublishingUser. - public PublishingUser(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Web/publishingUsers", resourceVersion ?? "2024-04-01") + public PublishingUser(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Web/publishingUsers", resourceVersion ?? "2024-04-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _kind = BicepValue.DefineProperty(this, "Kind", ["kind"]); @@ -234,7 +234,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing PublishingUser. /// - /// + /// /// The the Bicep identifier name of the PublishingUser resource. This can /// be used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and @@ -242,6 +242,6 @@ public static class ResourceVersions /// /// Version of the PublishingUser. /// The existing PublishingUser resource. - public static PublishingUser FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static PublishingUser FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/ScmSiteBasicPublishingCredentialsPolicy.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/ScmSiteBasicPublishingCredentialsPolicy.cs index 5349cb8ef709..fd12f0b5e339 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/ScmSiteBasicPublishingCredentialsPolicy.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/ScmSiteBasicPublishingCredentialsPolicy.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.AppService; /// /// ScmSiteBasicPublishingCredentialsPolicy. /// -public partial class ScmSiteBasicPublishingCredentialsPolicy : Resource +public partial class ScmSiteBasicPublishingCredentialsPolicy : ProvisionableResource { /// /// Gets the Name. @@ -57,15 +57,15 @@ public partial class ScmSiteBasicPublishingCredentialsPolicy : Resource /// /// Creates a new ScmSiteBasicPublishingCredentialsPolicy. /// - /// + /// /// The the Bicep identifier name of the /// ScmSiteBasicPublishingCredentialsPolicy resource. This can be used to /// refer to the resource in expressions, but is not the Azure name of the /// resource. This value can contain letters, numbers, and underscores. /// /// Version of the ScmSiteBasicPublishingCredentialsPolicy. - public ScmSiteBasicPublishingCredentialsPolicy(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Web/sites/basicPublishingCredentialsPolicies", resourceVersion ?? "2024-04-01") + public ScmSiteBasicPublishingCredentialsPolicy(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Web/sites/basicPublishingCredentialsPolicies", resourceVersion ?? "2024-04-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _allow = BicepValue.DefineProperty(this, "Allow", ["properties", "allow"]); @@ -240,7 +240,7 @@ public static class ResourceVersions /// Creates a reference to an existing /// ScmSiteBasicPublishingCredentialsPolicy. /// - /// + /// /// The the Bicep identifier name of the /// ScmSiteBasicPublishingCredentialsPolicy resource. This can be used to /// refer to the resource in expressions, but is not the Azure name of the @@ -248,6 +248,6 @@ public static class ResourceVersions /// /// Version of the ScmSiteBasicPublishingCredentialsPolicy. /// The existing ScmSiteBasicPublishingCredentialsPolicy resource. - public static ScmSiteBasicPublishingCredentialsPolicy FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static ScmSiteBasicPublishingCredentialsPolicy FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/ScmSiteSlotBasicPublishingCredentialsPolicy.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/ScmSiteSlotBasicPublishingCredentialsPolicy.cs index 79b455d6dfde..817e679f41dc 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/ScmSiteSlotBasicPublishingCredentialsPolicy.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/ScmSiteSlotBasicPublishingCredentialsPolicy.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.AppService; /// /// ScmSiteSlotBasicPublishingCredentialsPolicy. /// -public partial class ScmSiteSlotBasicPublishingCredentialsPolicy : Resource +public partial class ScmSiteSlotBasicPublishingCredentialsPolicy : ProvisionableResource { /// /// Gets the Name. @@ -57,7 +57,7 @@ public partial class ScmSiteSlotBasicPublishingCredentialsPolicy : Resource /// /// Creates a new ScmSiteSlotBasicPublishingCredentialsPolicy. /// - /// + /// /// The the Bicep identifier name of the /// ScmSiteSlotBasicPublishingCredentialsPolicy resource. This can be /// used to refer to the resource in expressions, but is not the Azure @@ -65,8 +65,8 @@ public partial class ScmSiteSlotBasicPublishingCredentialsPolicy : Resource /// underscores. /// /// Version of the ScmSiteSlotBasicPublishingCredentialsPolicy. - public ScmSiteSlotBasicPublishingCredentialsPolicy(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Web/sites/slots/basicPublishingCredentialsPolicies", resourceVersion ?? "2024-04-01") + public ScmSiteSlotBasicPublishingCredentialsPolicy(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Web/sites/slots/basicPublishingCredentialsPolicies", resourceVersion ?? "2024-04-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _allow = BicepValue.DefineProperty(this, "Allow", ["properties", "allow"]); @@ -241,7 +241,7 @@ public static class ResourceVersions /// Creates a reference to an existing /// ScmSiteSlotBasicPublishingCredentialsPolicy. /// - /// + /// /// The the Bicep identifier name of the /// ScmSiteSlotBasicPublishingCredentialsPolicy resource. This can be /// used to refer to the resource in expressions, but is not the Azure @@ -250,6 +250,6 @@ public static class ResourceVersions /// /// Version of the ScmSiteSlotBasicPublishingCredentialsPolicy. /// The existing ScmSiteSlotBasicPublishingCredentialsPolicy resource. - public static ScmSiteSlotBasicPublishingCredentialsPolicy FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static ScmSiteSlotBasicPublishingCredentialsPolicy FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SiteContainer.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SiteContainer.cs index 5afd833e1955..4f9291c79544 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SiteContainer.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SiteContainer.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.AppService; /// /// SiteContainer. /// -public partial class SiteContainer : Resource +public partial class SiteContainer : ProvisionableResource { /// /// Site Container Name. @@ -124,15 +124,15 @@ public partial class SiteContainer : Resource /// /// Creates a new SiteContainer. /// - /// + /// /// The the Bicep identifier name of the SiteContainer resource. This can /// be used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and /// underscores. /// /// Version of the SiteContainer. - public SiteContainer(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Web/sites/sitecontainers", resourceVersion ?? "2024-04-01") + public SiteContainer(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Web/sites/sitecontainers", resourceVersion ?? "2024-04-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _authType = BicepValue.DefineProperty(this, "AuthType", ["properties", "authType"]); @@ -317,7 +317,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing SiteContainer. /// - /// + /// /// The the Bicep identifier name of the SiteContainer resource. This can /// be used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and @@ -325,6 +325,6 @@ public static class ResourceVersions /// /// Version of the SiteContainer. /// The existing SiteContainer resource. - public static SiteContainer FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static SiteContainer FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SiteDeployment.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SiteDeployment.cs index 9ec68cde7660..4b6f6f692f65 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SiteDeployment.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SiteDeployment.cs @@ -14,7 +14,7 @@ namespace Azure.Provisioning.AppService; /// /// SiteDeployment. /// -public partial class SiteDeployment : Resource +public partial class SiteDeployment : ProvisionableResource { /// /// Gets the Name. @@ -98,15 +98,15 @@ public partial class SiteDeployment : Resource /// /// Creates a new SiteDeployment. /// - /// + /// /// The the Bicep identifier name of the SiteDeployment resource. This can /// be used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and /// underscores. /// /// Version of the SiteDeployment. - public SiteDeployment(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Web/sites/deployments", resourceVersion ?? "2024-04-01") + public SiteDeployment(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Web/sites/deployments", resourceVersion ?? "2024-04-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _author = BicepValue.DefineProperty(this, "Author", ["properties", "author"]); @@ -287,7 +287,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing SiteDeployment. /// - /// + /// /// The the Bicep identifier name of the SiteDeployment resource. This can /// be used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and @@ -295,6 +295,6 @@ public static class ResourceVersions /// /// Version of the SiteDeployment. /// The existing SiteDeployment resource. - public static SiteDeployment FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static SiteDeployment FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SiteDomainOwnershipIdentifier.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SiteDomainOwnershipIdentifier.cs index e98415583b97..33143fd884ad 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SiteDomainOwnershipIdentifier.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SiteDomainOwnershipIdentifier.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.AppService; /// /// SiteDomainOwnershipIdentifier. /// -public partial class SiteDomainOwnershipIdentifier : Resource +public partial class SiteDomainOwnershipIdentifier : ProvisionableResource { /// /// Name of domain ownership identifier. @@ -56,15 +56,15 @@ public partial class SiteDomainOwnershipIdentifier : Resource /// /// Creates a new SiteDomainOwnershipIdentifier. /// - /// + /// /// The the Bicep identifier name of the SiteDomainOwnershipIdentifier /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the SiteDomainOwnershipIdentifier. - public SiteDomainOwnershipIdentifier(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Web/sites/domainOwnershipIdentifiers", resourceVersion ?? "2024-04-01") + public SiteDomainOwnershipIdentifier(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Web/sites/domainOwnershipIdentifiers", resourceVersion ?? "2024-04-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _kind = BicepValue.DefineProperty(this, "Kind", ["kind"]); @@ -238,7 +238,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing SiteDomainOwnershipIdentifier. /// - /// + /// /// The the Bicep identifier name of the SiteDomainOwnershipIdentifier /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -246,6 +246,6 @@ public static class ResourceVersions /// /// Version of the SiteDomainOwnershipIdentifier. /// The existing SiteDomainOwnershipIdentifier resource. - public static SiteDomainOwnershipIdentifier FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static SiteDomainOwnershipIdentifier FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SiteExtension.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SiteExtension.cs index b0a56bf9cc46..dcfaf0e153a4 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SiteExtension.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SiteExtension.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.AppService; /// /// SiteExtension. /// -public partial class SiteExtension : Resource +public partial class SiteExtension : ProvisionableResource { /// /// Gets the Name. @@ -129,15 +129,15 @@ public partial class SiteExtension : Resource /// /// Creates a new SiteExtension. /// - /// + /// /// The the Bicep identifier name of the SiteExtension resource. This can /// be used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and /// underscores. /// /// Version of the SiteExtension. - public SiteExtension(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Web/sites/extensions", resourceVersion ?? "2024-04-01") + public SiteExtension(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Web/sites/extensions", resourceVersion ?? "2024-04-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _connectionString = BicepValue.DefineProperty(this, "ConnectionString", ["properties", "connectionString"]); @@ -322,7 +322,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing SiteExtension. /// - /// + /// /// The the Bicep identifier name of the SiteExtension resource. This can /// be used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and @@ -330,6 +330,6 @@ public static class ResourceVersions /// /// Version of the SiteExtension. /// The existing SiteExtension resource. - public static SiteExtension FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static SiteExtension FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SiteFunction.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SiteFunction.cs index 83f9129c7694..1a8d3c098d35 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SiteFunction.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SiteFunction.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.AppService; /// /// SiteFunction. /// -public partial class SiteFunction : Resource +public partial class SiteFunction : ProvisionableResource { /// /// Function name. @@ -142,15 +142,15 @@ public partial class SiteFunction : Resource /// /// Creates a new SiteFunction. /// - /// + /// /// The the Bicep identifier name of the SiteFunction resource. This can /// be used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and /// underscores. /// /// Version of the SiteFunction. - public SiteFunction(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Web/sites/functions", resourceVersion ?? "2024-04-01") + public SiteFunction(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Web/sites/functions", resourceVersion ?? "2024-04-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _config = BicepValue.DefineProperty(this, "Config", ["properties", "config"]); @@ -336,7 +336,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing SiteFunction. /// - /// + /// /// The the Bicep identifier name of the SiteFunction resource. This can /// be used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and @@ -344,6 +344,6 @@ public static class ResourceVersions /// /// Version of the SiteFunction. /// The existing SiteFunction resource. - public static SiteFunction FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static SiteFunction FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SiteHostNameBinding.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SiteHostNameBinding.cs index e72916864e93..23c5560e6990 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SiteHostNameBinding.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SiteHostNameBinding.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.AppService; /// /// SiteHostNameBinding. /// -public partial class SiteHostNameBinding : Resource +public partial class SiteHostNameBinding : ProvisionableResource { /// /// Hostname in the hostname binding. @@ -104,15 +104,15 @@ public partial class SiteHostNameBinding : Resource /// /// Creates a new SiteHostNameBinding. /// - /// + /// /// The the Bicep identifier name of the SiteHostNameBinding resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, /// numbers, and underscores. /// /// Version of the SiteHostNameBinding. - public SiteHostNameBinding(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Web/sites/hostNameBindings", resourceVersion ?? "2024-04-01") + public SiteHostNameBinding(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Web/sites/hostNameBindings", resourceVersion ?? "2024-04-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _azureResourceName = BicepValue.DefineProperty(this, "AzureResourceName", ["properties", "azureResourceName"]); @@ -259,7 +259,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing SiteHostNameBinding. /// - /// + /// /// The the Bicep identifier name of the SiteHostNameBinding resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, @@ -267,6 +267,6 @@ public static class ResourceVersions /// /// Version of the SiteHostNameBinding. /// The existing SiteHostNameBinding resource. - public static SiteHostNameBinding FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static SiteHostNameBinding FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SiteHybridConnectionNamespaceRelay.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SiteHybridConnectionNamespaceRelay.cs index b7ec765e8cf7..4e935587cb9a 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SiteHybridConnectionNamespaceRelay.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SiteHybridConnectionNamespaceRelay.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.AppService; /// /// SiteHybridConnectionNamespaceRelay. /// -public partial class SiteHybridConnectionNamespaceRelay : Resource +public partial class SiteHybridConnectionNamespaceRelay : ProvisionableResource { /// /// The namespace for this hybrid connection. @@ -96,15 +96,15 @@ public partial class SiteHybridConnectionNamespaceRelay : Resource /// /// Creates a new SiteHybridConnectionNamespaceRelay. /// - /// + /// /// The the Bicep identifier name of the SiteHybridConnectionNamespaceRelay /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the SiteHybridConnectionNamespaceRelay. - public SiteHybridConnectionNamespaceRelay(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Web/sites/hybridConnectionNamespaces/relays", resourceVersion) + public SiteHybridConnectionNamespaceRelay(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Web/sites/hybridConnectionNamespaces/relays", resourceVersion) { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _relayName = BicepValue.DefineProperty(this, "RelayName", ["properties", "relayName"], isRequired: true); @@ -123,7 +123,7 @@ public SiteHybridConnectionNamespaceRelay(string identifierName, string? resourc /// /// Creates a reference to an existing SiteHybridConnectionNamespaceRelay. /// - /// + /// /// The the Bicep identifier name of the SiteHybridConnectionNamespaceRelay /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -131,6 +131,6 @@ public SiteHybridConnectionNamespaceRelay(string identifierName, string? resourc /// /// Version of the SiteHybridConnectionNamespaceRelay. /// The existing SiteHybridConnectionNamespaceRelay resource. - public static SiteHybridConnectionNamespaceRelay FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static SiteHybridConnectionNamespaceRelay FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SiteInstanceExtension.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SiteInstanceExtension.cs index cd59e30245bc..557e2b2db929 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SiteInstanceExtension.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SiteInstanceExtension.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.AppService; /// /// SiteInstanceExtension. /// -public partial class SiteInstanceExtension : Resource +public partial class SiteInstanceExtension : ProvisionableResource { /// /// Gets the Name. @@ -123,15 +123,15 @@ public partial class SiteInstanceExtension : Resource /// /// Creates a new SiteInstanceExtension. /// - /// + /// /// The the Bicep identifier name of the SiteInstanceExtension resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, /// numbers, and underscores. /// /// Version of the SiteInstanceExtension. - public SiteInstanceExtension(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Web/sites/instances/extensions", resourceVersion) + public SiteInstanceExtension(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Web/sites/instances/extensions", resourceVersion) { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _connectionString = BicepValue.DefineProperty(this, "ConnectionString", ["properties", "connectionString"]); @@ -154,7 +154,7 @@ public SiteInstanceExtension(string identifierName, string? resourceVersion = de /// /// Creates a reference to an existing SiteInstanceExtension. /// - /// + /// /// The the Bicep identifier name of the SiteInstanceExtension resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, @@ -162,6 +162,6 @@ public SiteInstanceExtension(string identifierName, string? resourceVersion = de /// /// Version of the SiteInstanceExtension. /// The existing SiteInstanceExtension resource. - public static SiteInstanceExtension FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static SiteInstanceExtension FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SiteNetworkConfig.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SiteNetworkConfig.cs index 962ff6da4b18..d2f1e8be1a5e 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SiteNetworkConfig.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SiteNetworkConfig.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.AppService; /// /// SiteNetworkConfig. /// -public partial class SiteNetworkConfig : Resource +public partial class SiteNetworkConfig : ProvisionableResource { /// /// Gets the Name. @@ -65,15 +65,15 @@ public partial class SiteNetworkConfig : Resource /// /// Creates a new SiteNetworkConfig. /// - /// + /// /// The the Bicep identifier name of the SiteNetworkConfig resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, /// and underscores. /// /// Version of the SiteNetworkConfig. - public SiteNetworkConfig(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Web/sites/networkConfig", resourceVersion ?? "2024-04-01") + public SiteNetworkConfig(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Web/sites/networkConfig", resourceVersion ?? "2024-04-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _isSwiftSupported = BicepValue.DefineProperty(this, "IsSwiftSupported", ["properties", "swiftSupported"]); @@ -213,7 +213,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing SiteNetworkConfig. /// - /// + /// /// The the Bicep identifier name of the SiteNetworkConfig resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, @@ -221,6 +221,6 @@ public static class ResourceVersions /// /// Version of the SiteNetworkConfig. /// The existing SiteNetworkConfig resource. - public static SiteNetworkConfig FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static SiteNetworkConfig FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SitePrivateEndpointConnection.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SitePrivateEndpointConnection.cs index e053f330d0fd..b38410542eb7 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SitePrivateEndpointConnection.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SitePrivateEndpointConnection.cs @@ -18,7 +18,7 @@ namespace Azure.Provisioning.AppService; /// /// SitePrivateEndpointConnection. /// -public partial class SitePrivateEndpointConnection : Resource +public partial class SitePrivateEndpointConnection : ProvisionableResource { /// /// The System.String to use. @@ -77,15 +77,15 @@ public partial class SitePrivateEndpointConnection : Resource /// /// Creates a new SitePrivateEndpointConnection. /// - /// + /// /// The the Bicep identifier name of the SitePrivateEndpointConnection /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the SitePrivateEndpointConnection. - public SitePrivateEndpointConnection(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Web/sites/privateEndpointConnections", resourceVersion ?? "2024-04-01") + public SitePrivateEndpointConnection(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Web/sites/privateEndpointConnections", resourceVersion ?? "2024-04-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _iPAddresses = BicepList.DefineProperty(this, "IPAddresses", ["properties", "ipAddresses"]); @@ -262,7 +262,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing SitePrivateEndpointConnection. /// - /// + /// /// The the Bicep identifier name of the SitePrivateEndpointConnection /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -270,8 +270,8 @@ public static class ResourceVersions /// /// Version of the SitePrivateEndpointConnection. /// The existing SitePrivateEndpointConnection resource. - public static SitePrivateEndpointConnection FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static SitePrivateEndpointConnection FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; /// /// Get the requirements for naming this SitePrivateEndpointConnection diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SitePublicCertificate.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SitePublicCertificate.cs index 2122d361f157..e038740097d2 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SitePublicCertificate.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SitePublicCertificate.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.AppService; /// /// SitePublicCertificate. /// -public partial class SitePublicCertificate : Resource +public partial class SitePublicCertificate : ProvisionableResource { /// /// Public certificate name. @@ -68,15 +68,15 @@ public partial class SitePublicCertificate : Resource /// /// Creates a new SitePublicCertificate. /// - /// + /// /// The the Bicep identifier name of the SitePublicCertificate resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, /// numbers, and underscores. /// /// Version of the SitePublicCertificate. - public SitePublicCertificate(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Web/sites/publicCertificates", resourceVersion ?? "2024-04-01") + public SitePublicCertificate(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Web/sites/publicCertificates", resourceVersion ?? "2024-04-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _blob = BicepValue.DefineProperty(this, "Blob", ["properties", "blob"]); @@ -252,7 +252,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing SitePublicCertificate. /// - /// + /// /// The the Bicep identifier name of the SitePublicCertificate resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, @@ -260,6 +260,6 @@ public static class ResourceVersions /// /// Version of the SitePublicCertificate. /// The existing SitePublicCertificate resource. - public static SitePublicCertificate FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static SitePublicCertificate FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SiteSlotDeployment.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SiteSlotDeployment.cs index 87f997412ca8..5e456a5e3b94 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SiteSlotDeployment.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SiteSlotDeployment.cs @@ -14,7 +14,7 @@ namespace Azure.Provisioning.AppService; /// /// SiteSlotDeployment. /// -public partial class SiteSlotDeployment : Resource +public partial class SiteSlotDeployment : ProvisionableResource { /// /// Gets the Name. @@ -98,15 +98,15 @@ public partial class SiteSlotDeployment : Resource /// /// Creates a new SiteSlotDeployment. /// - /// + /// /// The the Bicep identifier name of the SiteSlotDeployment resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, /// and underscores. /// /// Version of the SiteSlotDeployment. - public SiteSlotDeployment(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Web/sites/slots/deployments", resourceVersion ?? "2024-04-01") + public SiteSlotDeployment(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Web/sites/slots/deployments", resourceVersion ?? "2024-04-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _author = BicepValue.DefineProperty(this, "Author", ["properties", "author"]); @@ -287,7 +287,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing SiteSlotDeployment. /// - /// + /// /// The the Bicep identifier name of the SiteSlotDeployment resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, @@ -295,6 +295,6 @@ public static class ResourceVersions /// /// Version of the SiteSlotDeployment. /// The existing SiteSlotDeployment resource. - public static SiteSlotDeployment FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static SiteSlotDeployment FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SiteSlotDomainOwnershipIdentifier.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SiteSlotDomainOwnershipIdentifier.cs index bec717f38600..6641c7abc8b9 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SiteSlotDomainOwnershipIdentifier.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SiteSlotDomainOwnershipIdentifier.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.AppService; /// /// SiteSlotDomainOwnershipIdentifier. /// -public partial class SiteSlotDomainOwnershipIdentifier : Resource +public partial class SiteSlotDomainOwnershipIdentifier : ProvisionableResource { /// /// Name of domain ownership identifier. @@ -56,15 +56,15 @@ public partial class SiteSlotDomainOwnershipIdentifier : Resource /// /// Creates a new SiteSlotDomainOwnershipIdentifier. /// - /// + /// /// The the Bicep identifier name of the SiteSlotDomainOwnershipIdentifier /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the SiteSlotDomainOwnershipIdentifier. - public SiteSlotDomainOwnershipIdentifier(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Web/sites/slots/domainOwnershipIdentifiers", resourceVersion ?? "2024-04-01") + public SiteSlotDomainOwnershipIdentifier(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Web/sites/slots/domainOwnershipIdentifiers", resourceVersion ?? "2024-04-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _kind = BicepValue.DefineProperty(this, "Kind", ["kind"]); @@ -238,7 +238,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing SiteSlotDomainOwnershipIdentifier. /// - /// + /// /// The the Bicep identifier name of the SiteSlotDomainOwnershipIdentifier /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -246,6 +246,6 @@ public static class ResourceVersions /// /// Version of the SiteSlotDomainOwnershipIdentifier. /// The existing SiteSlotDomainOwnershipIdentifier resource. - public static SiteSlotDomainOwnershipIdentifier FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static SiteSlotDomainOwnershipIdentifier FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SiteSlotExtension.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SiteSlotExtension.cs index 31045178e357..1b8b5aeb6dde 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SiteSlotExtension.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SiteSlotExtension.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.AppService; /// /// SiteSlotExtension. /// -public partial class SiteSlotExtension : Resource +public partial class SiteSlotExtension : ProvisionableResource { /// /// Gets the Name. @@ -129,15 +129,15 @@ public partial class SiteSlotExtension : Resource /// /// Creates a new SiteSlotExtension. /// - /// + /// /// The the Bicep identifier name of the SiteSlotExtension resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, /// and underscores. /// /// Version of the SiteSlotExtension. - public SiteSlotExtension(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Web/sites/slots/extensions", resourceVersion ?? "2024-04-01") + public SiteSlotExtension(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Web/sites/slots/extensions", resourceVersion ?? "2024-04-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _connectionString = BicepValue.DefineProperty(this, "ConnectionString", ["properties", "connectionString"]); @@ -322,7 +322,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing SiteSlotExtension. /// - /// + /// /// The the Bicep identifier name of the SiteSlotExtension resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, @@ -330,6 +330,6 @@ public static class ResourceVersions /// /// Version of the SiteSlotExtension. /// The existing SiteSlotExtension resource. - public static SiteSlotExtension FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static SiteSlotExtension FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SiteSlotFunction.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SiteSlotFunction.cs index a3fc3151188a..d128a7be312f 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SiteSlotFunction.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SiteSlotFunction.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.AppService; /// /// SiteSlotFunction. /// -public partial class SiteSlotFunction : Resource +public partial class SiteSlotFunction : ProvisionableResource { /// /// Function name. @@ -142,15 +142,15 @@ public partial class SiteSlotFunction : Resource /// /// Creates a new SiteSlotFunction. /// - /// + /// /// The the Bicep identifier name of the SiteSlotFunction resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, /// and underscores. /// /// Version of the SiteSlotFunction. - public SiteSlotFunction(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Web/sites/slots/functions", resourceVersion ?? "2024-04-01") + public SiteSlotFunction(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Web/sites/slots/functions", resourceVersion ?? "2024-04-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _config = BicepValue.DefineProperty(this, "Config", ["properties", "config"]); @@ -336,7 +336,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing SiteSlotFunction. /// - /// + /// /// The the Bicep identifier name of the SiteSlotFunction resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, @@ -344,6 +344,6 @@ public static class ResourceVersions /// /// Version of the SiteSlotFunction. /// The existing SiteSlotFunction resource. - public static SiteSlotFunction FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static SiteSlotFunction FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SiteSlotHostNameBinding.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SiteSlotHostNameBinding.cs index fbc5d884f849..eb36229323be 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SiteSlotHostNameBinding.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SiteSlotHostNameBinding.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.AppService; /// /// SiteSlotHostNameBinding. /// -public partial class SiteSlotHostNameBinding : Resource +public partial class SiteSlotHostNameBinding : ProvisionableResource { /// /// Hostname in the hostname binding. @@ -104,15 +104,15 @@ public partial class SiteSlotHostNameBinding : Resource /// /// Creates a new SiteSlotHostNameBinding. /// - /// + /// /// The the Bicep identifier name of the SiteSlotHostNameBinding resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, /// numbers, and underscores. /// /// Version of the SiteSlotHostNameBinding. - public SiteSlotHostNameBinding(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Web/sites/slots/hostNameBindings", resourceVersion ?? "2024-04-01") + public SiteSlotHostNameBinding(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Web/sites/slots/hostNameBindings", resourceVersion ?? "2024-04-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _azureResourceName = BicepValue.DefineProperty(this, "AzureResourceName", ["properties", "azureResourceName"]); @@ -259,7 +259,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing SiteSlotHostNameBinding. /// - /// + /// /// The the Bicep identifier name of the SiteSlotHostNameBinding resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, @@ -267,6 +267,6 @@ public static class ResourceVersions /// /// Version of the SiteSlotHostNameBinding. /// The existing SiteSlotHostNameBinding resource. - public static SiteSlotHostNameBinding FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static SiteSlotHostNameBinding FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SiteSlotHybridConnectionNamespaceRelay.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SiteSlotHybridConnectionNamespaceRelay.cs index b5e9c2b463b0..79f63a001085 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SiteSlotHybridConnectionNamespaceRelay.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SiteSlotHybridConnectionNamespaceRelay.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.AppService; /// /// SiteSlotHybridConnectionNamespaceRelay. /// -public partial class SiteSlotHybridConnectionNamespaceRelay : Resource +public partial class SiteSlotHybridConnectionNamespaceRelay : ProvisionableResource { /// /// The namespace for this hybrid connection. @@ -96,15 +96,15 @@ public partial class SiteSlotHybridConnectionNamespaceRelay : Resource /// /// Creates a new SiteSlotHybridConnectionNamespaceRelay. /// - /// + /// /// The the Bicep identifier name of the /// SiteSlotHybridConnectionNamespaceRelay resource. This can be used to /// refer to the resource in expressions, but is not the Azure name of the /// resource. This value can contain letters, numbers, and underscores. /// /// Version of the SiteSlotHybridConnectionNamespaceRelay. - public SiteSlotHybridConnectionNamespaceRelay(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Web/sites/slots/hybridConnectionNamespaces/relays", resourceVersion) + public SiteSlotHybridConnectionNamespaceRelay(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Web/sites/slots/hybridConnectionNamespaces/relays", resourceVersion) { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _relayName = BicepValue.DefineProperty(this, "RelayName", ["properties", "relayName"], isRequired: true); @@ -124,7 +124,7 @@ public SiteSlotHybridConnectionNamespaceRelay(string identifierName, string? res /// Creates a reference to an existing /// SiteSlotHybridConnectionNamespaceRelay. /// - /// + /// /// The the Bicep identifier name of the /// SiteSlotHybridConnectionNamespaceRelay resource. This can be used to /// refer to the resource in expressions, but is not the Azure name of the @@ -132,6 +132,6 @@ public SiteSlotHybridConnectionNamespaceRelay(string identifierName, string? res /// /// Version of the SiteSlotHybridConnectionNamespaceRelay. /// The existing SiteSlotHybridConnectionNamespaceRelay resource. - public static SiteSlotHybridConnectionNamespaceRelay FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static SiteSlotHybridConnectionNamespaceRelay FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SiteSlotInstanceExtension.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SiteSlotInstanceExtension.cs index 965252250734..8fb09b51d066 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SiteSlotInstanceExtension.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SiteSlotInstanceExtension.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.AppService; /// /// SiteSlotInstanceExtension. /// -public partial class SiteSlotInstanceExtension : Resource +public partial class SiteSlotInstanceExtension : ProvisionableResource { /// /// Gets the Name. @@ -123,15 +123,15 @@ public partial class SiteSlotInstanceExtension : Resource /// /// Creates a new SiteSlotInstanceExtension. /// - /// + /// /// The the Bicep identifier name of the SiteSlotInstanceExtension /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the SiteSlotInstanceExtension. - public SiteSlotInstanceExtension(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Web/sites/slots/instances/extensions", resourceVersion) + public SiteSlotInstanceExtension(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Web/sites/slots/instances/extensions", resourceVersion) { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _connectionString = BicepValue.DefineProperty(this, "ConnectionString", ["properties", "connectionString"]); @@ -154,7 +154,7 @@ public SiteSlotInstanceExtension(string identifierName, string? resourceVersion /// /// Creates a reference to an existing SiteSlotInstanceExtension. /// - /// + /// /// The the Bicep identifier name of the SiteSlotInstanceExtension /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -162,6 +162,6 @@ public SiteSlotInstanceExtension(string identifierName, string? resourceVersion /// /// Version of the SiteSlotInstanceExtension. /// The existing SiteSlotInstanceExtension resource. - public static SiteSlotInstanceExtension FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static SiteSlotInstanceExtension FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SiteSlotNetworkConfig.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SiteSlotNetworkConfig.cs index 384b10e391f1..8b0650ee9a6d 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SiteSlotNetworkConfig.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SiteSlotNetworkConfig.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.AppService; /// /// SiteSlotNetworkConfig. /// -public partial class SiteSlotNetworkConfig : Resource +public partial class SiteSlotNetworkConfig : ProvisionableResource { /// /// Gets the Name. @@ -65,15 +65,15 @@ public partial class SiteSlotNetworkConfig : Resource /// /// Creates a new SiteSlotNetworkConfig. /// - /// + /// /// The the Bicep identifier name of the SiteSlotNetworkConfig resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, /// numbers, and underscores. /// /// Version of the SiteSlotNetworkConfig. - public SiteSlotNetworkConfig(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Web/sites/slots/networkConfig", resourceVersion ?? "2024-04-01") + public SiteSlotNetworkConfig(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Web/sites/slots/networkConfig", resourceVersion ?? "2024-04-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _isSwiftSupported = BicepValue.DefineProperty(this, "IsSwiftSupported", ["properties", "swiftSupported"]); @@ -213,7 +213,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing SiteSlotNetworkConfig. /// - /// + /// /// The the Bicep identifier name of the SiteSlotNetworkConfig resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, @@ -221,6 +221,6 @@ public static class ResourceVersions /// /// Version of the SiteSlotNetworkConfig. /// The existing SiteSlotNetworkConfig resource. - public static SiteSlotNetworkConfig FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static SiteSlotNetworkConfig FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SiteSlotPrivateEndpointConnection.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SiteSlotPrivateEndpointConnection.cs index 3d33ad3d9052..10e2f0163aa4 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SiteSlotPrivateEndpointConnection.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SiteSlotPrivateEndpointConnection.cs @@ -17,7 +17,7 @@ namespace Azure.Provisioning.AppService; /// /// SiteSlotPrivateEndpointConnection. /// -public partial class SiteSlotPrivateEndpointConnection : Resource +public partial class SiteSlotPrivateEndpointConnection : ProvisionableResource { /// /// The System.String to use. @@ -76,15 +76,15 @@ public partial class SiteSlotPrivateEndpointConnection : Resource /// /// Creates a new SiteSlotPrivateEndpointConnection. /// - /// + /// /// The the Bicep identifier name of the SiteSlotPrivateEndpointConnection /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the SiteSlotPrivateEndpointConnection. - public SiteSlotPrivateEndpointConnection(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Web/sites/slots/privateEndpointConnections", resourceVersion ?? "2024-04-01") + public SiteSlotPrivateEndpointConnection(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Web/sites/slots/privateEndpointConnections", resourceVersion ?? "2024-04-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _iPAddresses = BicepList.DefineProperty(this, "IPAddresses", ["properties", "ipAddresses"]); @@ -261,7 +261,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing SiteSlotPrivateEndpointConnection. /// - /// + /// /// The the Bicep identifier name of the SiteSlotPrivateEndpointConnection /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -269,6 +269,6 @@ public static class ResourceVersions /// /// Version of the SiteSlotPrivateEndpointConnection. /// The existing SiteSlotPrivateEndpointConnection resource. - public static SiteSlotPrivateEndpointConnection FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static SiteSlotPrivateEndpointConnection FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SiteSlotSiteContainer.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SiteSlotSiteContainer.cs index 12c1c6eae357..26707414a592 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SiteSlotSiteContainer.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SiteSlotSiteContainer.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.AppService; /// /// SiteSlotSiteContainer. /// -public partial class SiteSlotSiteContainer : Resource +public partial class SiteSlotSiteContainer : ProvisionableResource { /// /// Site Container Name. @@ -124,15 +124,15 @@ public partial class SiteSlotSiteContainer : Resource /// /// Creates a new SiteSlotSiteContainer. /// - /// + /// /// The the Bicep identifier name of the SiteSlotSiteContainer resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, /// numbers, and underscores. /// /// Version of the SiteSlotSiteContainer. - public SiteSlotSiteContainer(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Web/sites/slots/sitecontainers", resourceVersion ?? "2024-04-01") + public SiteSlotSiteContainer(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Web/sites/slots/sitecontainers", resourceVersion ?? "2024-04-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _authType = BicepValue.DefineProperty(this, "AuthType", ["properties", "authType"]); @@ -317,7 +317,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing SiteSlotSiteContainer. /// - /// + /// /// The the Bicep identifier name of the SiteSlotSiteContainer resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, @@ -325,6 +325,6 @@ public static class ResourceVersions /// /// Version of the SiteSlotSiteContainer. /// The existing SiteSlotSiteContainer resource. - public static SiteSlotSiteContainer FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static SiteSlotSiteContainer FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SiteSlotVirtualNetworkConnection.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SiteSlotVirtualNetworkConnection.cs index 83c1288395dc..14a0d145d4cc 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SiteSlotVirtualNetworkConnection.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SiteSlotVirtualNetworkConnection.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.AppService; /// /// SiteSlotVirtualNetworkConnection. /// -public partial class SiteSlotVirtualNetworkConnection : Resource +public partial class SiteSlotVirtualNetworkConnection : ProvisionableResource { /// /// Name of an existing Virtual Network. @@ -96,15 +96,15 @@ public partial class SiteSlotVirtualNetworkConnection : Resource /// /// Creates a new SiteSlotVirtualNetworkConnection. /// - /// + /// /// The the Bicep identifier name of the SiteSlotVirtualNetworkConnection /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the SiteSlotVirtualNetworkConnection. - public SiteSlotVirtualNetworkConnection(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Web/sites/slots/virtualNetworkConnections", resourceVersion ?? "2024-04-01") + public SiteSlotVirtualNetworkConnection(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Web/sites/slots/virtualNetworkConnections", resourceVersion ?? "2024-04-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _certBlob = BicepValue.DefineProperty(this, "CertBlob", ["properties", "certBlob"]); @@ -284,7 +284,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing SiteSlotVirtualNetworkConnection. /// - /// + /// /// The the Bicep identifier name of the SiteSlotVirtualNetworkConnection /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -292,6 +292,6 @@ public static class ResourceVersions /// /// Version of the SiteSlotVirtualNetworkConnection. /// The existing SiteSlotVirtualNetworkConnection resource. - public static SiteSlotVirtualNetworkConnection FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static SiteSlotVirtualNetworkConnection FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SiteSlotVirtualNetworkConnectionGateway.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SiteSlotVirtualNetworkConnectionGateway.cs index 5a4150cd8909..5b2941046cb2 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SiteSlotVirtualNetworkConnectionGateway.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SiteSlotVirtualNetworkConnectionGateway.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.AppService; /// /// SiteSlotVirtualNetworkConnectionGateway. /// -public partial class SiteSlotVirtualNetworkConnectionGateway : Resource +public partial class SiteSlotVirtualNetworkConnectionGateway : ProvisionableResource { /// /// Name of the gateway. Currently, the only supported string is @@ -63,15 +63,15 @@ public partial class SiteSlotVirtualNetworkConnectionGateway : Resource /// /// Creates a new SiteSlotVirtualNetworkConnectionGateway. /// - /// + /// /// The the Bicep identifier name of the /// SiteSlotVirtualNetworkConnectionGateway resource. This can be used to /// refer to the resource in expressions, but is not the Azure name of the /// resource. This value can contain letters, numbers, and underscores. /// /// Version of the SiteSlotVirtualNetworkConnectionGateway. - public SiteSlotVirtualNetworkConnectionGateway(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Web/sites/slots/virtualNetworkConnections/gateways", resourceVersion ?? "2024-04-01") + public SiteSlotVirtualNetworkConnectionGateway(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Web/sites/slots/virtualNetworkConnections/gateways", resourceVersion ?? "2024-04-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _kind = BicepValue.DefineProperty(this, "Kind", ["kind"]); @@ -247,7 +247,7 @@ public static class ResourceVersions /// Creates a reference to an existing /// SiteSlotVirtualNetworkConnectionGateway. /// - /// + /// /// The the Bicep identifier name of the /// SiteSlotVirtualNetworkConnectionGateway resource. This can be used to /// refer to the resource in expressions, but is not the Azure name of the @@ -255,6 +255,6 @@ public static class ResourceVersions /// /// Version of the SiteSlotVirtualNetworkConnectionGateway. /// The existing SiteSlotVirtualNetworkConnectionGateway resource. - public static SiteSlotVirtualNetworkConnectionGateway FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static SiteSlotVirtualNetworkConnectionGateway FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SiteVirtualNetworkConnection.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SiteVirtualNetworkConnection.cs index 39063611591d..143cf729d266 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SiteVirtualNetworkConnection.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SiteVirtualNetworkConnection.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.AppService; /// /// SiteVirtualNetworkConnection. /// -public partial class SiteVirtualNetworkConnection : Resource +public partial class SiteVirtualNetworkConnection : ProvisionableResource { /// /// Name of an existing Virtual Network. @@ -96,15 +96,15 @@ public partial class SiteVirtualNetworkConnection : Resource /// /// Creates a new SiteVirtualNetworkConnection. /// - /// + /// /// The the Bicep identifier name of the SiteVirtualNetworkConnection /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the SiteVirtualNetworkConnection. - public SiteVirtualNetworkConnection(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Web/sites/virtualNetworkConnections", resourceVersion ?? "2024-04-01") + public SiteVirtualNetworkConnection(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Web/sites/virtualNetworkConnections", resourceVersion ?? "2024-04-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _certBlob = BicepValue.DefineProperty(this, "CertBlob", ["properties", "certBlob"]); @@ -284,7 +284,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing SiteVirtualNetworkConnection. /// - /// + /// /// The the Bicep identifier name of the SiteVirtualNetworkConnection /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -292,6 +292,6 @@ public static class ResourceVersions /// /// Version of the SiteVirtualNetworkConnection. /// The existing SiteVirtualNetworkConnection resource. - public static SiteVirtualNetworkConnection FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static SiteVirtualNetworkConnection FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SiteVirtualNetworkConnectionGateway.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SiteVirtualNetworkConnectionGateway.cs index 3deb407098bc..d706fee7dd1f 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SiteVirtualNetworkConnectionGateway.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SiteVirtualNetworkConnectionGateway.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.AppService; /// /// SiteVirtualNetworkConnectionGateway. /// -public partial class SiteVirtualNetworkConnectionGateway : Resource +public partial class SiteVirtualNetworkConnectionGateway : ProvisionableResource { /// /// Name of the gateway. Currently, the only supported string is @@ -63,15 +63,15 @@ public partial class SiteVirtualNetworkConnectionGateway : Resource /// /// Creates a new SiteVirtualNetworkConnectionGateway. /// - /// + /// /// The the Bicep identifier name of the /// SiteVirtualNetworkConnectionGateway resource. This can be used to /// refer to the resource in expressions, but is not the Azure name of the /// resource. This value can contain letters, numbers, and underscores. /// /// Version of the SiteVirtualNetworkConnectionGateway. - public SiteVirtualNetworkConnectionGateway(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Web/sites/virtualNetworkConnections/gateways", resourceVersion ?? "2024-04-01") + public SiteVirtualNetworkConnectionGateway(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Web/sites/virtualNetworkConnections/gateways", resourceVersion ?? "2024-04-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _kind = BicepValue.DefineProperty(this, "Kind", ["kind"]); @@ -246,7 +246,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing SiteVirtualNetworkConnectionGateway. /// - /// + /// /// The the Bicep identifier name of the /// SiteVirtualNetworkConnectionGateway resource. This can be used to /// refer to the resource in expressions, but is not the Azure name of the @@ -254,6 +254,6 @@ public static class ResourceVersions /// /// Version of the SiteVirtualNetworkConnectionGateway. /// The existing SiteVirtualNetworkConnectionGateway resource. - public static SiteVirtualNetworkConnectionGateway FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static SiteVirtualNetworkConnectionGateway FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SlotConfigNames.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SlotConfigNames.cs index e7da065c8f7a..745ae087b329 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SlotConfigNames.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SlotConfigNames.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.AppService; /// /// SlotConfigNames. /// -public partial class SlotConfigNames : Resource +public partial class SlotConfigNames : ProvisionableResource { /// /// Gets the Name. @@ -69,15 +69,15 @@ public partial class SlotConfigNames : Resource /// /// Creates a new SlotConfigNames. /// - /// + /// /// The the Bicep identifier name of the SlotConfigNames resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, /// and underscores. /// /// Version of the SlotConfigNames. - public SlotConfigNames(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Web/sites/config", resourceVersion ?? "2024-04-01") + public SlotConfigNames(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Web/sites/config", resourceVersion ?? "2024-04-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _appSettingNames = BicepList.DefineProperty(this, "AppSettingNames", ["properties", "appSettingNames"]); @@ -253,7 +253,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing SlotConfigNames. /// - /// + /// /// The the Bicep identifier name of the SlotConfigNames resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, @@ -261,6 +261,6 @@ public static class ResourceVersions /// /// Version of the SlotConfigNames. /// The existing SlotConfigNames resource. - public static SlotConfigNames FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static SlotConfigNames FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/StaticSite.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/StaticSite.cs index 81f62c5c7828..b828686dda31 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/StaticSite.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/StaticSite.cs @@ -18,7 +18,7 @@ namespace Azure.Provisioning.AppService; /// /// StaticSite. /// -public partial class StaticSite : Resource +public partial class StaticSite : ProvisionableResource { /// /// Name of the static site to create or update. @@ -186,15 +186,15 @@ public partial class StaticSite : Resource /// /// Creates a new StaticSite. /// - /// + /// /// The the Bicep identifier name of the StaticSite resource. This can be /// used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and /// underscores. /// /// Version of the StaticSite. - public StaticSite(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Web/staticSites", resourceVersion ?? "2024-04-01") + public StaticSite(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Web/staticSites", resourceVersion ?? "2024-04-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _location = BicepValue.DefineProperty(this, "Location", ["location"], isRequired: true); @@ -303,7 +303,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing StaticSite. /// - /// + /// /// The the Bicep identifier name of the StaticSite resource. This can be /// used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and @@ -311,6 +311,6 @@ public static class ResourceVersions /// /// Version of the StaticSite. /// The existing StaticSite resource. - public static StaticSite FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static StaticSite FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/StaticSiteBasicAuthProperty.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/StaticSiteBasicAuthProperty.cs index e1d8f5c23228..8ecba9eac828 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/StaticSiteBasicAuthProperty.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/StaticSiteBasicAuthProperty.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.AppService; /// /// StaticSiteBasicAuthProperty. /// -public partial class StaticSiteBasicAuthProperty : Resource +public partial class StaticSiteBasicAuthProperty : ProvisionableResource { /// /// Gets the Name. @@ -83,15 +83,15 @@ public partial class StaticSiteBasicAuthProperty : Resource /// /// Creates a new StaticSiteBasicAuthProperty. /// - /// + /// /// The the Bicep identifier name of the StaticSiteBasicAuthProperty /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the StaticSiteBasicAuthProperty. - public StaticSiteBasicAuthProperty(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Web/staticSites/basicAuth", resourceVersion ?? "2024-04-01") + public StaticSiteBasicAuthProperty(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Web/staticSites/basicAuth", resourceVersion ?? "2024-04-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _applicableEnvironmentsMode = BicepValue.DefineProperty(this, "ApplicableEnvironmentsMode", ["properties", "applicableEnvironmentsMode"]); @@ -184,7 +184,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing StaticSiteBasicAuthProperty. /// - /// + /// /// The the Bicep identifier name of the StaticSiteBasicAuthProperty /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -192,6 +192,6 @@ public static class ResourceVersions /// /// Version of the StaticSiteBasicAuthProperty. /// The existing StaticSiteBasicAuthProperty resource. - public static StaticSiteBasicAuthProperty FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static StaticSiteBasicAuthProperty FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/StaticSiteBuildDatabaseConnection.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/StaticSiteBuildDatabaseConnection.cs index d75062320409..6fab002a87b3 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/StaticSiteBuildDatabaseConnection.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/StaticSiteBuildDatabaseConnection.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.AppService; /// /// StaticSiteBuildDatabaseConnection. /// -public partial class StaticSiteBuildDatabaseConnection : Resource +public partial class StaticSiteBuildDatabaseConnection : ProvisionableResource { /// /// Name of the database connection. @@ -79,15 +79,15 @@ public partial class StaticSiteBuildDatabaseConnection : Resource /// /// Creates a new StaticSiteBuildDatabaseConnection. /// - /// + /// /// The the Bicep identifier name of the StaticSiteBuildDatabaseConnection /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the StaticSiteBuildDatabaseConnection. - public StaticSiteBuildDatabaseConnection(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Web/staticSites/builds/databaseConnections", resourceVersion ?? "2024-04-01") + public StaticSiteBuildDatabaseConnection(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Web/staticSites/builds/databaseConnections", resourceVersion ?? "2024-04-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _connectionIdentity = BicepValue.DefineProperty(this, "ConnectionIdentity", ["properties", "connectionIdentity"]); @@ -179,7 +179,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing StaticSiteBuildDatabaseConnection. /// - /// + /// /// The the Bicep identifier name of the StaticSiteBuildDatabaseConnection /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -187,6 +187,6 @@ public static class ResourceVersions /// /// Version of the StaticSiteBuildDatabaseConnection. /// The existing StaticSiteBuildDatabaseConnection resource. - public static StaticSiteBuildDatabaseConnection FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static StaticSiteBuildDatabaseConnection FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/StaticSiteBuildLinkedBackend.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/StaticSiteBuildLinkedBackend.cs index 0f1e7d1d3234..c2d50bf44ef6 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/StaticSiteBuildLinkedBackend.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/StaticSiteBuildLinkedBackend.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.AppService; /// /// StaticSiteBuildLinkedBackend. /// -public partial class StaticSiteBuildLinkedBackend : Resource +public partial class StaticSiteBuildLinkedBackend : ProvisionableResource { /// /// Name of the backend to link to the static site. @@ -68,15 +68,15 @@ public partial class StaticSiteBuildLinkedBackend : Resource /// /// Creates a new StaticSiteBuildLinkedBackend. /// - /// + /// /// The the Bicep identifier name of the StaticSiteBuildLinkedBackend /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the StaticSiteBuildLinkedBackend. - public StaticSiteBuildLinkedBackend(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Web/staticSites/builds/linkedBackends", resourceVersion ?? "2024-04-01") + public StaticSiteBuildLinkedBackend(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Web/staticSites/builds/linkedBackends", resourceVersion ?? "2024-04-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _backendResourceId = BicepValue.DefineProperty(this, "BackendResourceId", ["properties", "backendResourceId"]); @@ -167,7 +167,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing StaticSiteBuildLinkedBackend. /// - /// + /// /// The the Bicep identifier name of the StaticSiteBuildLinkedBackend /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -175,6 +175,6 @@ public static class ResourceVersions /// /// Version of the StaticSiteBuildLinkedBackend. /// The existing StaticSiteBuildLinkedBackend resource. - public static StaticSiteBuildLinkedBackend FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static StaticSiteBuildLinkedBackend FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/StaticSiteBuildUserProvidedFunctionApp.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/StaticSiteBuildUserProvidedFunctionApp.cs index 5f8b04ea83ef..cb80c46ed6b4 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/StaticSiteBuildUserProvidedFunctionApp.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/StaticSiteBuildUserProvidedFunctionApp.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.AppService; /// /// StaticSiteBuildUserProvidedFunctionApp. /// -public partial class StaticSiteBuildUserProvidedFunctionApp : Resource +public partial class StaticSiteBuildUserProvidedFunctionApp : ProvisionableResource { /// /// Gets or sets the Name. @@ -63,15 +63,15 @@ public partial class StaticSiteBuildUserProvidedFunctionApp : Resource /// /// Creates a new StaticSiteBuildUserProvidedFunctionApp. /// - /// + /// /// The the Bicep identifier name of the /// StaticSiteBuildUserProvidedFunctionApp resource. This can be used to /// refer to the resource in expressions, but is not the Azure name of the /// resource. This value can contain letters, numbers, and underscores. /// /// Version of the StaticSiteBuildUserProvidedFunctionApp. - public StaticSiteBuildUserProvidedFunctionApp(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Web/staticSites/builds/userProvidedFunctionApps", resourceVersion ?? "2024-04-01") + public StaticSiteBuildUserProvidedFunctionApp(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Web/staticSites/builds/userProvidedFunctionApps", resourceVersion ?? "2024-04-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _functionAppRegion = BicepValue.DefineProperty(this, "FunctionAppRegion", ["properties", "functionAppRegion"]); @@ -142,7 +142,7 @@ public static class ResourceVersions /// Creates a reference to an existing /// StaticSiteBuildUserProvidedFunctionApp. /// - /// + /// /// The the Bicep identifier name of the /// StaticSiteBuildUserProvidedFunctionApp resource. This can be used to /// refer to the resource in expressions, but is not the Azure name of the @@ -150,6 +150,6 @@ public static class ResourceVersions /// /// Version of the StaticSiteBuildUserProvidedFunctionApp. /// The existing StaticSiteBuildUserProvidedFunctionApp resource. - public static StaticSiteBuildUserProvidedFunctionApp FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static StaticSiteBuildUserProvidedFunctionApp FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/StaticSiteCustomDomainOverview.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/StaticSiteCustomDomainOverview.cs index a09e1ea70d78..323c81e07c86 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/StaticSiteCustomDomainOverview.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/StaticSiteCustomDomainOverview.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.AppService; /// /// StaticSiteCustomDomainOverview. /// -public partial class StaticSiteCustomDomainOverview : Resource +public partial class StaticSiteCustomDomainOverview : ProvisionableResource { /// /// The custom domain to create. @@ -87,15 +87,15 @@ public partial class StaticSiteCustomDomainOverview : Resource /// /// Creates a new StaticSiteCustomDomainOverview. /// - /// + /// /// The the Bicep identifier name of the StaticSiteCustomDomainOverview /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the StaticSiteCustomDomainOverview. - public StaticSiteCustomDomainOverview(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Web/staticSites/customDomains", resourceVersion ?? "2024-04-01") + public StaticSiteCustomDomainOverview(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Web/staticSites/customDomains", resourceVersion ?? "2024-04-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _kind = BicepValue.DefineProperty(this, "Kind", ["kind"]); @@ -189,7 +189,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing StaticSiteCustomDomainOverview. /// - /// + /// /// The the Bicep identifier name of the StaticSiteCustomDomainOverview /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -197,6 +197,6 @@ public static class ResourceVersions /// /// Version of the StaticSiteCustomDomainOverview. /// The existing StaticSiteCustomDomainOverview resource. - public static StaticSiteCustomDomainOverview FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static StaticSiteCustomDomainOverview FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/StaticSiteDatabaseConnection.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/StaticSiteDatabaseConnection.cs index 284a5090aaa3..fc100c133715 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/StaticSiteDatabaseConnection.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/StaticSiteDatabaseConnection.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.AppService; /// /// StaticSiteDatabaseConnection. /// -public partial class StaticSiteDatabaseConnection : Resource +public partial class StaticSiteDatabaseConnection : ProvisionableResource { /// /// Name of the database connection. @@ -85,15 +85,15 @@ public partial class StaticSiteDatabaseConnection : Resource /// /// Creates a new StaticSiteDatabaseConnection. /// - /// + /// /// The the Bicep identifier name of the StaticSiteDatabaseConnection /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the StaticSiteDatabaseConnection. - public StaticSiteDatabaseConnection(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Web/staticSites/databaseConnections", resourceVersion ?? "2024-04-01") + public StaticSiteDatabaseConnection(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Web/staticSites/databaseConnections", resourceVersion ?? "2024-04-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _connectionIdentity = BicepValue.DefineProperty(this, "ConnectionIdentity", ["properties", "connectionIdentity"]); @@ -186,7 +186,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing StaticSiteDatabaseConnection. /// - /// + /// /// The the Bicep identifier name of the StaticSiteDatabaseConnection /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -194,6 +194,6 @@ public static class ResourceVersions /// /// Version of the StaticSiteDatabaseConnection. /// The existing StaticSiteDatabaseConnection resource. - public static StaticSiteDatabaseConnection FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static StaticSiteDatabaseConnection FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/StaticSiteLinkedBackend.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/StaticSiteLinkedBackend.cs index 7b771e2e624a..e550e00618d7 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/StaticSiteLinkedBackend.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/StaticSiteLinkedBackend.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.AppService; /// /// StaticSiteLinkedBackend. /// -public partial class StaticSiteLinkedBackend : Resource +public partial class StaticSiteLinkedBackend : ProvisionableResource { /// /// Name of the backend to link to the static site. @@ -74,15 +74,15 @@ public partial class StaticSiteLinkedBackend : Resource /// /// Creates a new StaticSiteLinkedBackend. /// - /// + /// /// The the Bicep identifier name of the StaticSiteLinkedBackend resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, /// numbers, and underscores. /// /// Version of the StaticSiteLinkedBackend. - public StaticSiteLinkedBackend(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Web/staticSites/linkedBackends", resourceVersion ?? "2024-04-01") + public StaticSiteLinkedBackend(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Web/staticSites/linkedBackends", resourceVersion ?? "2024-04-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _backendResourceId = BicepValue.DefineProperty(this, "BackendResourceId", ["properties", "backendResourceId"]); @@ -174,7 +174,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing StaticSiteLinkedBackend. /// - /// + /// /// The the Bicep identifier name of the StaticSiteLinkedBackend resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, @@ -182,6 +182,6 @@ public static class ResourceVersions /// /// Version of the StaticSiteLinkedBackend. /// The existing StaticSiteLinkedBackend resource. - public static StaticSiteLinkedBackend FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static StaticSiteLinkedBackend FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/StaticSitePrivateEndpointConnection.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/StaticSitePrivateEndpointConnection.cs index 25c310c88f01..e703ac215cd2 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/StaticSitePrivateEndpointConnection.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/StaticSitePrivateEndpointConnection.cs @@ -17,7 +17,7 @@ namespace Azure.Provisioning.AppService; /// /// StaticSitePrivateEndpointConnection. /// -public partial class StaticSitePrivateEndpointConnection : Resource +public partial class StaticSitePrivateEndpointConnection : ProvisionableResource { /// /// Name of the private endpoint connection. @@ -76,15 +76,15 @@ public partial class StaticSitePrivateEndpointConnection : Resource /// /// Creates a new StaticSitePrivateEndpointConnection. /// - /// + /// /// The the Bicep identifier name of the /// StaticSitePrivateEndpointConnection resource. This can be used to /// refer to the resource in expressions, but is not the Azure name of the /// resource. This value can contain letters, numbers, and underscores. /// /// Version of the StaticSitePrivateEndpointConnection. - public StaticSitePrivateEndpointConnection(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Web/staticSites/privateEndpointConnections", resourceVersion ?? "2024-04-01") + public StaticSitePrivateEndpointConnection(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Web/staticSites/privateEndpointConnections", resourceVersion ?? "2024-04-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _iPAddresses = BicepList.DefineProperty(this, "IPAddresses", ["properties", "ipAddresses"]); @@ -176,7 +176,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing StaticSitePrivateEndpointConnection. /// - /// + /// /// The the Bicep identifier name of the /// StaticSitePrivateEndpointConnection resource. This can be used to /// refer to the resource in expressions, but is not the Azure name of the @@ -184,6 +184,6 @@ public static class ResourceVersions /// /// Version of the StaticSitePrivateEndpointConnection. /// The existing StaticSitePrivateEndpointConnection resource. - public static StaticSitePrivateEndpointConnection FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static StaticSitePrivateEndpointConnection FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/StaticSiteUserProvidedFunctionApp.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/StaticSiteUserProvidedFunctionApp.cs index 8a5dc4345041..944b96b91dae 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/StaticSiteUserProvidedFunctionApp.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/StaticSiteUserProvidedFunctionApp.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.AppService; /// /// StaticSiteUserProvidedFunctionApp. /// -public partial class StaticSiteUserProvidedFunctionApp : Resource +public partial class StaticSiteUserProvidedFunctionApp : ProvisionableResource { /// /// Gets or sets the Name. @@ -69,15 +69,15 @@ public partial class StaticSiteUserProvidedFunctionApp : Resource /// /// Creates a new StaticSiteUserProvidedFunctionApp. /// - /// + /// /// The the Bicep identifier name of the StaticSiteUserProvidedFunctionApp /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the StaticSiteUserProvidedFunctionApp. - public StaticSiteUserProvidedFunctionApp(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Web/staticSites/userProvidedFunctionApps", resourceVersion ?? "2024-04-01") + public StaticSiteUserProvidedFunctionApp(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Web/staticSites/userProvidedFunctionApps", resourceVersion ?? "2024-04-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _functionAppRegion = BicepValue.DefineProperty(this, "FunctionAppRegion", ["properties", "functionAppRegion"]); @@ -148,7 +148,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing StaticSiteUserProvidedFunctionApp. /// - /// + /// /// The the Bicep identifier name of the StaticSiteUserProvidedFunctionApp /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -156,6 +156,6 @@ public static class ResourceVersions /// /// Version of the StaticSiteUserProvidedFunctionApp. /// The existing StaticSiteUserProvidedFunctionApp resource. - public static StaticSiteUserProvidedFunctionApp FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static StaticSiteUserProvidedFunctionApp FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/WebSite.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/WebSite.cs index 36c8f2e77196..e95ba043edf9 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/WebSite.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/WebSite.cs @@ -17,7 +17,7 @@ namespace Azure.Provisioning.AppService; /// /// WebSite. /// -public partial class WebSite : Resource +public partial class WebSite : ProvisionableResource { /// /// Unique name of the app to create or update. To create or update a @@ -422,15 +422,15 @@ public partial class WebSite : Resource /// /// Creates a new WebSite. /// - /// + /// /// The the Bicep identifier name of the WebSite resource. This can be /// used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and /// underscores. /// /// Version of the WebSite. - public WebSite(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Web/sites", resourceVersion ?? "2024-04-01") + public WebSite(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Web/sites", resourceVersion ?? "2024-04-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _location = BicepValue.DefineProperty(this, "Location", ["location"], isRequired: true); @@ -658,7 +658,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing WebSite. /// - /// + /// /// The the Bicep identifier name of the WebSite resource. This can be /// used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and @@ -666,8 +666,8 @@ public static class ResourceVersions /// /// Version of the WebSite. /// The existing WebSite resource. - public static WebSite FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static WebSite FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; /// /// Get the requirements for naming this WebSite resource. diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/WebSiteConfig.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/WebSiteConfig.cs index 24aa4471e2a3..443626816c04 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/WebSiteConfig.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/WebSiteConfig.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.AppService; /// /// WebSiteConfig. /// -public partial class WebSiteConfig : Resource +public partial class WebSiteConfig : ProvisionableResource { /// /// Gets the Name. @@ -514,15 +514,15 @@ public partial class WebSiteConfig : Resource /// /// Creates a new WebSiteConfig. /// - /// + /// /// The the Bicep identifier name of the WebSiteConfig resource. This can /// be used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and /// underscores. /// /// Version of the WebSiteConfig. - public WebSiteConfig(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Web/sites/config", resourceVersion ?? "2024-04-01") + public WebSiteConfig(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Web/sites/config", resourceVersion ?? "2024-04-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _acrUserManagedIdentityId = BicepValue.DefineProperty(this, "AcrUserManagedIdentityId", ["properties", "acrUserManagedIdentityID"]); @@ -767,7 +767,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing WebSiteConfig. /// - /// + /// /// The the Bicep identifier name of the WebSiteConfig resource. This can /// be used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and @@ -775,6 +775,6 @@ public static class ResourceVersions /// /// Version of the WebSiteConfig. /// The existing WebSiteConfig resource. - public static WebSiteConfig FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static WebSiteConfig FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/WebSiteExtension.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/WebSiteExtension.cs index aaad81714a2c..12026dccd065 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/WebSiteExtension.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/WebSiteExtension.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.AppService; /// /// WebSiteExtension. /// -public partial class WebSiteExtension : Resource +public partial class WebSiteExtension : ProvisionableResource { /// /// Gets the Name. @@ -172,15 +172,15 @@ public partial class WebSiteExtension : Resource /// /// Creates a new WebSiteExtension. /// - /// + /// /// The the Bicep identifier name of the WebSiteExtension resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, /// and underscores. /// /// Version of the WebSiteExtension. - public WebSiteExtension(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Web/sites/siteextensions", resourceVersion ?? "2024-04-01") + public WebSiteExtension(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Web/sites/siteextensions", resourceVersion ?? "2024-04-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _authors = BicepList.DefineProperty(this, "Authors", ["properties", "authors"], isOutput: true); @@ -373,7 +373,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing WebSiteExtension. /// - /// + /// /// The the Bicep identifier name of the WebSiteExtension resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, @@ -381,6 +381,6 @@ public static class ResourceVersions /// /// Version of the WebSiteExtension. /// The existing WebSiteExtension resource. - public static WebSiteExtension FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static WebSiteExtension FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/WebSiteFtpPublishingCredentialsPolicy.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/WebSiteFtpPublishingCredentialsPolicy.cs index f9a838dc048d..ea0bd320d47e 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/WebSiteFtpPublishingCredentialsPolicy.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/WebSiteFtpPublishingCredentialsPolicy.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.AppService; /// /// WebSiteFtpPublishingCredentialsPolicy. /// -public partial class WebSiteFtpPublishingCredentialsPolicy : Resource +public partial class WebSiteFtpPublishingCredentialsPolicy : ProvisionableResource { /// /// Gets the Name. @@ -57,15 +57,15 @@ public partial class WebSiteFtpPublishingCredentialsPolicy : Resource /// /// Creates a new WebSiteFtpPublishingCredentialsPolicy. /// - /// + /// /// The the Bicep identifier name of the /// WebSiteFtpPublishingCredentialsPolicy resource. This can be used to /// refer to the resource in expressions, but is not the Azure name of the /// resource. This value can contain letters, numbers, and underscores. /// /// Version of the WebSiteFtpPublishingCredentialsPolicy. - public WebSiteFtpPublishingCredentialsPolicy(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Web/sites/basicPublishingCredentialsPolicies", resourceVersion ?? "2024-04-01") + public WebSiteFtpPublishingCredentialsPolicy(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Web/sites/basicPublishingCredentialsPolicies", resourceVersion ?? "2024-04-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _allow = BicepValue.DefineProperty(this, "Allow", ["properties", "allow"]); @@ -240,7 +240,7 @@ public static class ResourceVersions /// Creates a reference to an existing /// WebSiteFtpPublishingCredentialsPolicy. /// - /// + /// /// The the Bicep identifier name of the /// WebSiteFtpPublishingCredentialsPolicy resource. This can be used to /// refer to the resource in expressions, but is not the Azure name of the @@ -248,6 +248,6 @@ public static class ResourceVersions /// /// Version of the WebSiteFtpPublishingCredentialsPolicy. /// The existing WebSiteFtpPublishingCredentialsPolicy resource. - public static WebSiteFtpPublishingCredentialsPolicy FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static WebSiteFtpPublishingCredentialsPolicy FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/WebSiteHybridConnection.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/WebSiteHybridConnection.cs index e71e3e96d71c..d5de26d5e7d3 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/WebSiteHybridConnection.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/WebSiteHybridConnection.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.AppService; /// /// WebSiteHybridConnection. /// -public partial class WebSiteHybridConnection : Resource +public partial class WebSiteHybridConnection : ProvisionableResource { /// /// Name of the hybrid connection configuration. @@ -86,15 +86,15 @@ public partial class WebSiteHybridConnection : Resource /// /// Creates a new WebSiteHybridConnection. /// - /// + /// /// The the Bicep identifier name of the WebSiteHybridConnection resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, /// numbers, and underscores. /// /// Version of the WebSiteHybridConnection. - public WebSiteHybridConnection(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Web/sites/hybridconnection", resourceVersion ?? "2024-04-01") + public WebSiteHybridConnection(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Web/sites/hybridconnection", resourceVersion ?? "2024-04-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _biztalkUri = BicepValue.DefineProperty(this, "BiztalkUri", ["properties", "biztalkUri"]); @@ -273,7 +273,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing WebSiteHybridConnection. /// - /// + /// /// The the Bicep identifier name of the WebSiteHybridConnection resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, @@ -281,6 +281,6 @@ public static class ResourceVersions /// /// Version of the WebSiteHybridConnection. /// The existing WebSiteHybridConnection resource. - public static WebSiteHybridConnection FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static WebSiteHybridConnection FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/WebSitePremierAddon.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/WebSitePremierAddon.cs index e7c57e40aa98..ea77b04254d8 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/WebSitePremierAddon.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/WebSitePremierAddon.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.AppService; /// /// WebSitePremierAddon. /// -public partial class WebSitePremierAddon : Resource +public partial class WebSitePremierAddon : ProvisionableResource { /// /// Add-on name. @@ -93,15 +93,15 @@ public partial class WebSitePremierAddon : Resource /// /// Creates a new WebSitePremierAddon. /// - /// + /// /// The the Bicep identifier name of the WebSitePremierAddon resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, /// numbers, and underscores. /// /// Version of the WebSitePremierAddon. - public WebSitePremierAddon(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Web/sites/premieraddons", resourceVersion ?? "2024-04-01") + public WebSitePremierAddon(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Web/sites/premieraddons", resourceVersion ?? "2024-04-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _location = BicepValue.DefineProperty(this, "Location", ["location"], isRequired: true); @@ -236,7 +236,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing WebSitePremierAddon. /// - /// + /// /// The the Bicep identifier name of the WebSitePremierAddon resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, @@ -244,6 +244,6 @@ public static class ResourceVersions /// /// Version of the WebSitePremierAddon. /// The existing WebSitePremierAddon resource. - public static WebSitePremierAddon FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static WebSitePremierAddon FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/WebSitePrivateAccess.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/WebSitePrivateAccess.cs index 4c0fb12b89f1..a3bdd07bd2a7 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/WebSitePrivateAccess.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/WebSitePrivateAccess.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.AppService; /// /// WebSitePrivateAccess. /// -public partial class WebSitePrivateAccess : Resource +public partial class WebSitePrivateAccess : ProvisionableResource { /// /// Gets the Name. @@ -63,15 +63,15 @@ public partial class WebSitePrivateAccess : Resource /// /// Creates a new WebSitePrivateAccess. /// - /// + /// /// The the Bicep identifier name of the WebSitePrivateAccess resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, /// numbers, and underscores. /// /// Version of the WebSitePrivateAccess. - public WebSitePrivateAccess(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Web/sites/privateAccess", resourceVersion ?? "2024-04-01") + public WebSitePrivateAccess(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Web/sites/privateAccess", resourceVersion ?? "2024-04-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _isEnabled = BicepValue.DefineProperty(this, "IsEnabled", ["properties", "enabled"]); @@ -246,7 +246,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing WebSitePrivateAccess. /// - /// + /// /// The the Bicep identifier name of the WebSitePrivateAccess resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, @@ -254,6 +254,6 @@ public static class ResourceVersions /// /// Version of the WebSitePrivateAccess. /// The existing WebSitePrivateAccess resource. - public static WebSitePrivateAccess FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static WebSitePrivateAccess FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/WebSiteSlot.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/WebSiteSlot.cs index dc077a4bfa4d..a40d02c281d2 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/WebSiteSlot.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/WebSiteSlot.cs @@ -17,7 +17,7 @@ namespace Azure.Provisioning.AppService; /// /// WebSiteSlot. /// -public partial class WebSiteSlot : Resource +public partial class WebSiteSlot : ProvisionableResource { /// /// Gets the Name. @@ -427,15 +427,15 @@ public partial class WebSiteSlot : Resource /// /// Creates a new WebSiteSlot. /// - /// + /// /// The the Bicep identifier name of the WebSiteSlot resource. This can be /// used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and /// underscores. /// /// Version of the WebSiteSlot. - public WebSiteSlot(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Web/sites/slots", resourceVersion ?? "2024-04-01") + public WebSiteSlot(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Web/sites/slots", resourceVersion ?? "2024-04-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _location = BicepValue.DefineProperty(this, "Location", ["location"], isRequired: true); @@ -664,7 +664,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing WebSiteSlot. /// - /// + /// /// The the Bicep identifier name of the WebSiteSlot resource. This can be /// used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and @@ -672,8 +672,8 @@ public static class ResourceVersions /// /// Version of the WebSiteSlot. /// The existing WebSiteSlot resource. - public static WebSiteSlot FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static WebSiteSlot FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; /// /// Get the requirements for naming this WebSiteSlot resource. diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/WebSiteSlotConfig.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/WebSiteSlotConfig.cs index 4b67006b2bd6..d3de8eb429cb 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/WebSiteSlotConfig.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/WebSiteSlotConfig.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.AppService; /// /// WebSiteSlotConfig. /// -public partial class WebSiteSlotConfig : Resource +public partial class WebSiteSlotConfig : ProvisionableResource { /// /// Gets the Name. @@ -514,15 +514,15 @@ public partial class WebSiteSlotConfig : Resource /// /// Creates a new WebSiteSlotConfig. /// - /// + /// /// The the Bicep identifier name of the WebSiteSlotConfig resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, /// and underscores. /// /// Version of the WebSiteSlotConfig. - public WebSiteSlotConfig(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Web/sites/slots/config", resourceVersion ?? "2024-04-01") + public WebSiteSlotConfig(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Web/sites/slots/config", resourceVersion ?? "2024-04-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _acrUserManagedIdentityId = BicepValue.DefineProperty(this, "AcrUserManagedIdentityId", ["properties", "acrUserManagedIdentityID"]); @@ -767,7 +767,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing WebSiteSlotConfig. /// - /// + /// /// The the Bicep identifier name of the WebSiteSlotConfig resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, @@ -775,6 +775,6 @@ public static class ResourceVersions /// /// Version of the WebSiteSlotConfig. /// The existing WebSiteSlotConfig resource. - public static WebSiteSlotConfig FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static WebSiteSlotConfig FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/WebSiteSlotExtension.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/WebSiteSlotExtension.cs index 9ec683a2d8ee..8daab215f260 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/WebSiteSlotExtension.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/WebSiteSlotExtension.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.AppService; /// /// WebSiteSlotExtension. /// -public partial class WebSiteSlotExtension : Resource +public partial class WebSiteSlotExtension : ProvisionableResource { /// /// Gets the Name. @@ -172,15 +172,15 @@ public partial class WebSiteSlotExtension : Resource /// /// Creates a new WebSiteSlotExtension. /// - /// + /// /// The the Bicep identifier name of the WebSiteSlotExtension resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, /// numbers, and underscores. /// /// Version of the WebSiteSlotExtension. - public WebSiteSlotExtension(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Web/sites/slots/siteextensions", resourceVersion ?? "2024-04-01") + public WebSiteSlotExtension(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Web/sites/slots/siteextensions", resourceVersion ?? "2024-04-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _authors = BicepList.DefineProperty(this, "Authors", ["properties", "authors"], isOutput: true); @@ -373,7 +373,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing WebSiteSlotExtension. /// - /// + /// /// The the Bicep identifier name of the WebSiteSlotExtension resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, @@ -381,6 +381,6 @@ public static class ResourceVersions /// /// Version of the WebSiteSlotExtension. /// The existing WebSiteSlotExtension resource. - public static WebSiteSlotExtension FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static WebSiteSlotExtension FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/WebSiteSlotFtpPublishingCredentialsPolicy.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/WebSiteSlotFtpPublishingCredentialsPolicy.cs index f7f2a5c6ea93..a62031048fce 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/WebSiteSlotFtpPublishingCredentialsPolicy.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/WebSiteSlotFtpPublishingCredentialsPolicy.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.AppService; /// /// WebSiteSlotFtpPublishingCredentialsPolicy. /// -public partial class WebSiteSlotFtpPublishingCredentialsPolicy : Resource +public partial class WebSiteSlotFtpPublishingCredentialsPolicy : ProvisionableResource { /// /// Gets the Name. @@ -57,7 +57,7 @@ public partial class WebSiteSlotFtpPublishingCredentialsPolicy : Resource /// /// Creates a new WebSiteSlotFtpPublishingCredentialsPolicy. /// - /// + /// /// The the Bicep identifier name of the /// WebSiteSlotFtpPublishingCredentialsPolicy resource. This can be used /// to refer to the resource in expressions, but is not the Azure name of @@ -65,8 +65,8 @@ public partial class WebSiteSlotFtpPublishingCredentialsPolicy : Resource /// underscores. /// /// Version of the WebSiteSlotFtpPublishingCredentialsPolicy. - public WebSiteSlotFtpPublishingCredentialsPolicy(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Web/sites/slots/basicPublishingCredentialsPolicies", resourceVersion ?? "2024-04-01") + public WebSiteSlotFtpPublishingCredentialsPolicy(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Web/sites/slots/basicPublishingCredentialsPolicies", resourceVersion ?? "2024-04-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _allow = BicepValue.DefineProperty(this, "Allow", ["properties", "allow"]); @@ -241,7 +241,7 @@ public static class ResourceVersions /// Creates a reference to an existing /// WebSiteSlotFtpPublishingCredentialsPolicy. /// - /// + /// /// The the Bicep identifier name of the /// WebSiteSlotFtpPublishingCredentialsPolicy resource. This can be used /// to refer to the resource in expressions, but is not the Azure name of @@ -250,6 +250,6 @@ public static class ResourceVersions /// /// Version of the WebSiteSlotFtpPublishingCredentialsPolicy. /// The existing WebSiteSlotFtpPublishingCredentialsPolicy resource. - public static WebSiteSlotFtpPublishingCredentialsPolicy FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static WebSiteSlotFtpPublishingCredentialsPolicy FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/WebSiteSlotHybridConnection.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/WebSiteSlotHybridConnection.cs index a2cad556e36a..a6b6ebb33f73 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/WebSiteSlotHybridConnection.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/WebSiteSlotHybridConnection.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.AppService; /// /// WebSiteSlotHybridConnection. /// -public partial class WebSiteSlotHybridConnection : Resource +public partial class WebSiteSlotHybridConnection : ProvisionableResource { /// /// Name of the hybrid connection configuration. @@ -86,15 +86,15 @@ public partial class WebSiteSlotHybridConnection : Resource /// /// Creates a new WebSiteSlotHybridConnection. /// - /// + /// /// The the Bicep identifier name of the WebSiteSlotHybridConnection /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the WebSiteSlotHybridConnection. - public WebSiteSlotHybridConnection(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Web/sites/slots/hybridconnection", resourceVersion ?? "2024-04-01") + public WebSiteSlotHybridConnection(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Web/sites/slots/hybridconnection", resourceVersion ?? "2024-04-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _biztalkUri = BicepValue.DefineProperty(this, "BiztalkUri", ["properties", "biztalkUri"]); @@ -273,7 +273,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing WebSiteSlotHybridConnection. /// - /// + /// /// The the Bicep identifier name of the WebSiteSlotHybridConnection /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -281,6 +281,6 @@ public static class ResourceVersions /// /// Version of the WebSiteSlotHybridConnection. /// The existing WebSiteSlotHybridConnection resource. - public static WebSiteSlotHybridConnection FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static WebSiteSlotHybridConnection FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/WebSiteSlotPremierAddOn.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/WebSiteSlotPremierAddOn.cs index fe953c94746b..4c809ec38f77 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/WebSiteSlotPremierAddOn.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/WebSiteSlotPremierAddOn.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.AppService; /// /// WebSiteSlotPremierAddOn. /// -public partial class WebSiteSlotPremierAddOn : Resource +public partial class WebSiteSlotPremierAddOn : ProvisionableResource { /// /// Add-on name. @@ -93,15 +93,15 @@ public partial class WebSiteSlotPremierAddOn : Resource /// /// Creates a new WebSiteSlotPremierAddOn. /// - /// + /// /// The the Bicep identifier name of the WebSiteSlotPremierAddOn resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, /// numbers, and underscores. /// /// Version of the WebSiteSlotPremierAddOn. - public WebSiteSlotPremierAddOn(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Web/sites/slots/premieraddons", resourceVersion ?? "2024-04-01") + public WebSiteSlotPremierAddOn(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Web/sites/slots/premieraddons", resourceVersion ?? "2024-04-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _location = BicepValue.DefineProperty(this, "Location", ["location"], isRequired: true); @@ -281,7 +281,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing WebSiteSlotPremierAddOn. /// - /// + /// /// The the Bicep identifier name of the WebSiteSlotPremierAddOn resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, @@ -289,6 +289,6 @@ public static class ResourceVersions /// /// Version of the WebSiteSlotPremierAddOn. /// The existing WebSiteSlotPremierAddOn resource. - public static WebSiteSlotPremierAddOn FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static WebSiteSlotPremierAddOn FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/WebSiteSlotPrivateAccess.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/WebSiteSlotPrivateAccess.cs index 3c07ba411641..f764fd0fd57e 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/WebSiteSlotPrivateAccess.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/WebSiteSlotPrivateAccess.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.AppService; /// /// WebSiteSlotPrivateAccess. /// -public partial class WebSiteSlotPrivateAccess : Resource +public partial class WebSiteSlotPrivateAccess : ProvisionableResource { /// /// Gets the Name. @@ -63,15 +63,15 @@ public partial class WebSiteSlotPrivateAccess : Resource /// /// Creates a new WebSiteSlotPrivateAccess. /// - /// + /// /// The the Bicep identifier name of the WebSiteSlotPrivateAccess resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, /// numbers, and underscores. /// /// Version of the WebSiteSlotPrivateAccess. - public WebSiteSlotPrivateAccess(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Web/sites/slots/privateAccess", resourceVersion ?? "2024-04-01") + public WebSiteSlotPrivateAccess(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Web/sites/slots/privateAccess", resourceVersion ?? "2024-04-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _isEnabled = BicepValue.DefineProperty(this, "IsEnabled", ["properties", "enabled"]); @@ -246,7 +246,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing WebSiteSlotPrivateAccess. /// - /// + /// /// The the Bicep identifier name of the WebSiteSlotPrivateAccess resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, @@ -254,6 +254,6 @@ public static class ResourceVersions /// /// Version of the WebSiteSlotPrivateAccess. /// The existing WebSiteSlotPrivateAccess resource. - public static WebSiteSlotPrivateAccess FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static WebSiteSlotPrivateAccess FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/WebSiteSlotPublicCertificate.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/WebSiteSlotPublicCertificate.cs index 5c947480a7b7..10a4b35a276b 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/WebSiteSlotPublicCertificate.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/WebSiteSlotPublicCertificate.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.AppService; /// /// WebSiteSlotPublicCertificate. /// -public partial class WebSiteSlotPublicCertificate : Resource +public partial class WebSiteSlotPublicCertificate : ProvisionableResource { /// /// Public certificate name. @@ -68,15 +68,15 @@ public partial class WebSiteSlotPublicCertificate : Resource /// /// Creates a new WebSiteSlotPublicCertificate. /// - /// + /// /// The the Bicep identifier name of the WebSiteSlotPublicCertificate /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the WebSiteSlotPublicCertificate. - public WebSiteSlotPublicCertificate(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Web/sites/slots/publicCertificates", resourceVersion ?? "2024-04-01") + public WebSiteSlotPublicCertificate(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Web/sites/slots/publicCertificates", resourceVersion ?? "2024-04-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _blob = BicepValue.DefineProperty(this, "Blob", ["properties", "blob"]); @@ -252,7 +252,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing WebSiteSlotPublicCertificate. /// - /// + /// /// The the Bicep identifier name of the WebSiteSlotPublicCertificate /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -260,6 +260,6 @@ public static class ResourceVersions /// /// Version of the WebSiteSlotPublicCertificate. /// The existing WebSiteSlotPublicCertificate resource. - public static WebSiteSlotPublicCertificate FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static WebSiteSlotPublicCertificate FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/WebSiteSlotSourceControl.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/WebSiteSlotSourceControl.cs index 08974f7e4e1a..0c788ca46603 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/WebSiteSlotSourceControl.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/WebSiteSlotSourceControl.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.AppService; /// /// WebSiteSlotSourceControl. /// -public partial class WebSiteSlotSourceControl : Resource +public partial class WebSiteSlotSourceControl : ProvisionableResource { /// /// Gets the Name. @@ -96,15 +96,15 @@ public partial class WebSiteSlotSourceControl : Resource /// /// Creates a new WebSiteSlotSourceControl. /// - /// + /// /// The the Bicep identifier name of the WebSiteSlotSourceControl resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, /// numbers, and underscores. /// /// Version of the WebSiteSlotSourceControl. - public WebSiteSlotSourceControl(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Web/sites/slots/sourcecontrols", resourceVersion ?? "2024-04-01") + public WebSiteSlotSourceControl(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Web/sites/slots/sourcecontrols", resourceVersion ?? "2024-04-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _branch = BicepValue.DefineProperty(this, "Branch", ["properties", "branch"]); @@ -284,7 +284,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing WebSiteSlotSourceControl. /// - /// + /// /// The the Bicep identifier name of the WebSiteSlotSourceControl resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, @@ -292,6 +292,6 @@ public static class ResourceVersions /// /// Version of the WebSiteSlotSourceControl. /// The existing WebSiteSlotSourceControl resource. - public static WebSiteSlotSourceControl FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static WebSiteSlotSourceControl FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/WebSiteSourceControl.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/WebSiteSourceControl.cs index 6789e10b952e..60bda1c51190 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/WebSiteSourceControl.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/WebSiteSourceControl.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.AppService; /// /// WebSiteSourceControl. /// -public partial class WebSiteSourceControl : Resource +public partial class WebSiteSourceControl : ProvisionableResource { /// /// Gets the Name. @@ -96,15 +96,15 @@ public partial class WebSiteSourceControl : Resource /// /// Creates a new WebSiteSourceControl. /// - /// + /// /// The the Bicep identifier name of the WebSiteSourceControl resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, /// numbers, and underscores. /// /// Version of the WebSiteSourceControl. - public WebSiteSourceControl(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Web/sites/sourcecontrols", resourceVersion ?? "2024-04-01") + public WebSiteSourceControl(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Web/sites/sourcecontrols", resourceVersion ?? "2024-04-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _branch = BicepValue.DefineProperty(this, "Branch", ["properties", "branch"]); @@ -284,7 +284,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing WebSiteSourceControl. /// - /// + /// /// The the Bicep identifier name of the WebSiteSourceControl resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, @@ -292,6 +292,6 @@ public static class ResourceVersions /// /// Version of the WebSiteSourceControl. /// The existing WebSiteSourceControl resource. - public static WebSiteSourceControl FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static WebSiteSourceControl FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.ApplicationInsights/api/Azure.Provisioning.ApplicationInsights.netstandard2.0.cs b/sdk/provisioning/Azure.Provisioning.ApplicationInsights/api/Azure.Provisioning.ApplicationInsights.netstandard2.0.cs index f3018f55a84c..6fa77126b540 100644 --- a/sdk/provisioning/Azure.Provisioning.ApplicationInsights/api/Azure.Provisioning.ApplicationInsights.netstandard2.0.cs +++ b/sdk/provisioning/Azure.Provisioning.ApplicationInsights/api/Azure.Provisioning.ApplicationInsights.netstandard2.0.cs @@ -32,9 +32,9 @@ public enum ApplicationInsightsApplicationType public static bool operator !=(Azure.Provisioning.ApplicationInsights.ApplicationInsightsBuiltInRole left, Azure.Provisioning.ApplicationInsights.ApplicationInsightsBuiltInRole right) { throw null; } public override string ToString() { throw null; } } - public partial class ApplicationInsightsComponent : Azure.Provisioning.Primitives.Resource + public partial class ApplicationInsightsComponent : Azure.Provisioning.Primitives.ProvisionableResource { - public ApplicationInsightsComponent(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public ApplicationInsightsComponent(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue AppId { get { throw null; } } public Azure.Provisioning.BicepValue ApplicationId { get { throw null; } } public Azure.Provisioning.BicepValue ApplicationType { get { throw null; } set { } } @@ -67,9 +67,9 @@ public partial class ApplicationInsightsComponent : Azure.Provisioning.Primitive public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } public Azure.Provisioning.BicepValue TenantId { get { throw null; } } public Azure.Provisioning.BicepValue WorkspaceResourceId { get { throw null; } set { } } - public Azure.Provisioning.Authorization.RoleAssignment CreateRoleAssignment(Azure.Provisioning.ApplicationInsights.ApplicationInsightsBuiltInRole role, Azure.Provisioning.BicepValue principalType, Azure.Provisioning.BicepValue principalId, string? identifierNameSuffix = null) { throw null; } + public Azure.Provisioning.Authorization.RoleAssignment CreateRoleAssignment(Azure.Provisioning.ApplicationInsights.ApplicationInsightsBuiltInRole role, Azure.Provisioning.BicepValue principalType, Azure.Provisioning.BicepValue principalId, string? bicepIdentifierSuffix = null) { throw null; } public Azure.Provisioning.Authorization.RoleAssignment CreateRoleAssignment(Azure.Provisioning.ApplicationInsights.ApplicationInsightsBuiltInRole role, Azure.Provisioning.Roles.UserAssignedIdentity identity) { throw null; } - public static Azure.Provisioning.ApplicationInsights.ApplicationInsightsComponent FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.ApplicationInsights.ApplicationInsightsComponent FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override Azure.Provisioning.Primitives.ResourceNameRequirements GetResourceNameRequirements() { throw null; } public static partial class ResourceVersions @@ -78,7 +78,6 @@ public static partial class ResourceVersions public static readonly string V2014_08_01; public static readonly string V2015_05_01; public static readonly string V2020_02_02; - public static readonly string V2020_02_02_preview; } } public enum ApplicationInsightsPublicNetworkAccessType @@ -86,9 +85,9 @@ public enum ApplicationInsightsPublicNetworkAccessType Enabled = 0, Disabled = 1, } - public partial class ApplicationInsightsWebTest : Azure.Provisioning.Primitives.Resource + public partial class ApplicationInsightsWebTest : Azure.Provisioning.Primitives.ProvisionableResource { - public ApplicationInsightsWebTest(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public ApplicationInsightsWebTest(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Description { get { throw null; } set { } } public Azure.Provisioning.BicepValue FrequencyInSeconds { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } @@ -108,7 +107,7 @@ public partial class ApplicationInsightsWebTest : Azure.Provisioning.Primitives. public Azure.Provisioning.BicepValue WebTest { get { throw null; } set { } } public Azure.Provisioning.BicepValue WebTestKind { get { throw null; } set { } } public Azure.Provisioning.BicepValue WebTestName { get { throw null; } set { } } - public static Azure.Provisioning.ApplicationInsights.ApplicationInsightsWebTest FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.ApplicationInsights.ApplicationInsightsWebTest FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2014_04_01; @@ -117,9 +116,9 @@ public static partial class ResourceVersions public static readonly string V2022_06_15; } } - public partial class ApplicationInsightsWorkbook : Azure.Provisioning.Primitives.Resource + public partial class ApplicationInsightsWorkbook : Azure.Provisioning.Primitives.ProvisionableResource { - public ApplicationInsightsWorkbook(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public ApplicationInsightsWorkbook(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Category { get { throw null; } set { } } public Azure.Provisioning.BicepValue Description { get { throw null; } set { } } public Azure.Provisioning.BicepValue DisplayName { get { throw null; } set { } } @@ -138,7 +137,7 @@ public partial class ApplicationInsightsWorkbook : Azure.Provisioning.Primitives public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } public Azure.Provisioning.BicepValue UserId { get { throw null; } } public Azure.Provisioning.BicepValue Version { get { throw null; } set { } } - public static Azure.Provisioning.ApplicationInsights.ApplicationInsightsWorkbook FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.ApplicationInsights.ApplicationInsightsWorkbook FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2020_02_12; @@ -149,9 +148,9 @@ public static partial class ResourceVersions public static readonly string V2023_06_01; } } - public partial class ApplicationInsightsWorkbookTemplate : Azure.Provisioning.Primitives.Resource + public partial class ApplicationInsightsWorkbookTemplate : Azure.Provisioning.Primitives.ProvisionableResource { - public ApplicationInsightsWorkbookTemplate(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public ApplicationInsightsWorkbookTemplate(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Author { get { throw null; } set { } } public Azure.Provisioning.BicepList Galleries { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } @@ -162,7 +161,7 @@ public partial class ApplicationInsightsWorkbookTemplate : Azure.Provisioning.Pr public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } public Azure.Provisioning.BicepValue TemplateData { get { throw null; } set { } } - public static Azure.Provisioning.ApplicationInsights.ApplicationInsightsWorkbookTemplate FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.ApplicationInsights.ApplicationInsightsWorkbookTemplate FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2020_11_20; @@ -183,20 +182,20 @@ public enum ComponentRequestSource [System.Runtime.Serialization.DataMemberAttribute(Name="rest")] Rest = 0, } - public partial class PrivateLinkScopedResourceReference : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class PrivateLinkScopedResourceReference : Azure.Provisioning.Primitives.ProvisionableConstruct { public PrivateLinkScopedResourceReference() { } public Azure.Provisioning.BicepValue ResourceId { get { throw null; } } public Azure.Provisioning.BicepValue ScopeId { get { throw null; } } } - public partial class WebTestContentValidation : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class WebTestContentValidation : Azure.Provisioning.Primitives.ProvisionableConstruct { public WebTestContentValidation() { } public Azure.Provisioning.BicepValue ContentMatch { get { throw null; } set { } } public Azure.Provisioning.BicepValue IgnoreCase { get { throw null; } set { } } public Azure.Provisioning.BicepValue PassIfTextFound { get { throw null; } set { } } } - public partial class WebTestGeolocation : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class WebTestGeolocation : Azure.Provisioning.Primitives.ProvisionableConstruct { public WebTestGeolocation() { } public Azure.Provisioning.BicepValue Location { get { throw null; } set { } } @@ -210,7 +209,7 @@ public enum WebTestKind [System.Runtime.Serialization.DataMemberAttribute(Name="standard")] Standard = 2, } - public partial class WebTestRequest : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class WebTestRequest : Azure.Provisioning.Primitives.ProvisionableConstruct { public WebTestRequest() { } public Azure.Provisioning.BicepValue FollowRedirects { get { throw null; } set { } } @@ -220,13 +219,13 @@ public WebTestRequest() { } public Azure.Provisioning.BicepValue RequestBody { get { throw null; } set { } } public Azure.Provisioning.BicepValue RequestUri { get { throw null; } set { } } } - public partial class WebTestRequestHeaderField : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class WebTestRequestHeaderField : Azure.Provisioning.Primitives.ProvisionableConstruct { public WebTestRequestHeaderField() { } public Azure.Provisioning.BicepValue HeaderFieldName { get { throw null; } set { } } public Azure.Provisioning.BicepValue HeaderFieldValue { get { throw null; } set { } } } - public partial class WebTestValidationRules : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class WebTestValidationRules : Azure.Provisioning.Primitives.ProvisionableConstruct { public WebTestValidationRules() { } public Azure.Provisioning.BicepValue CheckSsl { get { throw null; } set { } } @@ -240,7 +239,7 @@ public enum WorkbookSharedTypeKind [System.Runtime.Serialization.DataMemberAttribute(Name="shared")] Shared = 0, } - public partial class WorkbookTemplateGallery : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class WorkbookTemplateGallery : Azure.Provisioning.Primitives.ProvisionableConstruct { public WorkbookTemplateGallery() { } public Azure.Provisioning.BicepValue Category { get { throw null; } set { } } @@ -249,7 +248,7 @@ public WorkbookTemplateGallery() { } public Azure.Provisioning.BicepValue ResourceType { get { throw null; } set { } } public Azure.Provisioning.BicepValue WorkbookType { get { throw null; } set { } } } - public partial class WorkbookTemplateLocalizedGallery : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class WorkbookTemplateLocalizedGallery : Azure.Provisioning.Primitives.ProvisionableConstruct { public WorkbookTemplateLocalizedGallery() { } public Azure.Provisioning.BicepList Galleries { get { throw null; } set { } } diff --git a/sdk/provisioning/Azure.Provisioning.ApplicationInsights/src/Generated/ApplicationInsightsComponent.cs b/sdk/provisioning/Azure.Provisioning.ApplicationInsights/src/Generated/ApplicationInsightsComponent.cs index 4d9cd154f9b7..2d649e8457c1 100644 --- a/sdk/provisioning/Azure.Provisioning.ApplicationInsights/src/Generated/ApplicationInsightsComponent.cs +++ b/sdk/provisioning/Azure.Provisioning.ApplicationInsights/src/Generated/ApplicationInsightsComponent.cs @@ -21,7 +21,7 @@ namespace Azure.Provisioning.ApplicationInsights; /// /// ApplicationInsightsComponent. /// -public partial class ApplicationInsightsComponent : Resource +public partial class ApplicationInsightsComponent : ProvisionableResource { /// /// The name of the Application Insights component resource. @@ -240,15 +240,15 @@ public partial class ApplicationInsightsComponent : Resource /// /// Creates a new ApplicationInsightsComponent. /// - /// + /// /// The the Bicep identifier name of the ApplicationInsightsComponent /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the ApplicationInsightsComponent. - public ApplicationInsightsComponent(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Insights/components", resourceVersion ?? "2020-02-02") + public ApplicationInsightsComponent(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Insights/components", resourceVersion ?? "2020-02-02") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _kind = BicepValue.DefineProperty(this, "Kind", ["kind"], isRequired: true); @@ -289,11 +289,6 @@ public ApplicationInsightsComponent(string identifierName, string? resourceVersi /// public static class ResourceVersions { - /// - /// 2020-02-02-preview. - /// - public static readonly string V2020_02_02_preview = "2020-02-02-preview"; - /// /// 2020-02-02. /// @@ -318,7 +313,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing ApplicationInsightsComponent. /// - /// + /// /// The the Bicep identifier name of the ApplicationInsightsComponent /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -326,8 +321,8 @@ public static class ResourceVersions /// /// Version of the ApplicationInsightsComponent. /// The existing ApplicationInsightsComponent resource. - public static ApplicationInsightsComponent FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static ApplicationInsightsComponent FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; /// /// Get the requirements for naming this ApplicationInsightsComponent @@ -346,10 +341,10 @@ public override ResourceNameRequirements GetResourceNameRequirements() => /// The . /// The . public RoleAssignment CreateRoleAssignment(ApplicationInsightsBuiltInRole role, UserAssignedIdentity identity) => - new($"{IdentifierName}_{identity.IdentifierName}_{ApplicationInsightsBuiltInRole.GetBuiltInRoleName(role)}") + new($"{BicepIdentifier}_{identity.BicepIdentifier}_{ApplicationInsightsBuiltInRole.GetBuiltInRoleName(role)}") { Name = BicepFunction.CreateGuid(Id, identity.PrincipalId, BicepFunction.GetSubscriptionResourceId("Microsoft.Authorization/roleDefinitions", role.ToString())), - Scope = new IdentifierExpression(IdentifierName), + Scope = new IdentifierExpression(BicepIdentifier), PrincipalType = RoleManagementPrincipalType.ServicePrincipal, RoleDefinitionId = BicepFunction.GetSubscriptionResourceId("Microsoft.Authorization/roleDefinitions", role.ToString()), PrincipalId = identity.PrincipalId @@ -362,13 +357,13 @@ public RoleAssignment CreateRoleAssignment(ApplicationInsightsBuiltInRole role, /// The role to grant. /// The type of the principal to assign to. /// The principal to assign to. - /// Optional role assignment identifier name suffix. + /// Optional role assignment identifier name suffix. /// The . - public RoleAssignment CreateRoleAssignment(ApplicationInsightsBuiltInRole role, BicepValue principalType, BicepValue principalId, string? identifierNameSuffix = default) => - new($"{IdentifierName}_{ApplicationInsightsBuiltInRole.GetBuiltInRoleName(role)}{(identifierNameSuffix is null ? "" : "_")}{identifierNameSuffix}") + public RoleAssignment CreateRoleAssignment(ApplicationInsightsBuiltInRole role, BicepValue principalType, BicepValue principalId, string? bicepIdentifierSuffix = default) => + new($"{BicepIdentifier}_{ApplicationInsightsBuiltInRole.GetBuiltInRoleName(role)}{(bicepIdentifierSuffix is null ? "" : "_")}{bicepIdentifierSuffix}") { Name = BicepFunction.CreateGuid(Id, principalId, BicepFunction.GetSubscriptionResourceId("Microsoft.Authorization/roleDefinitions", role.ToString())), - Scope = new IdentifierExpression(IdentifierName), + Scope = new IdentifierExpression(BicepIdentifier), PrincipalType = principalType, RoleDefinitionId = BicepFunction.GetSubscriptionResourceId("Microsoft.Authorization/roleDefinitions", role.ToString()), PrincipalId = principalId diff --git a/sdk/provisioning/Azure.Provisioning.ApplicationInsights/src/Generated/ApplicationInsightsWebTest.cs b/sdk/provisioning/Azure.Provisioning.ApplicationInsights/src/Generated/ApplicationInsightsWebTest.cs index eaa6e951125c..21ea54a200b4 100644 --- a/sdk/provisioning/Azure.Provisioning.ApplicationInsights/src/Generated/ApplicationInsightsWebTest.cs +++ b/sdk/provisioning/Azure.Provisioning.ApplicationInsights/src/Generated/ApplicationInsightsWebTest.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.ApplicationInsights; /// /// ApplicationInsightsWebTest. /// -public partial class ApplicationInsightsWebTest : Resource +public partial class ApplicationInsightsWebTest : ProvisionableResource { /// /// The name of the Application Insights WebTest resource. @@ -143,15 +143,15 @@ public partial class ApplicationInsightsWebTest : Resource /// /// Creates a new ApplicationInsightsWebTest. /// - /// + /// /// The the Bicep identifier name of the ApplicationInsightsWebTest /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the ApplicationInsightsWebTest. - public ApplicationInsightsWebTest(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Insights/webtests", resourceVersion ?? "2022-06-15") + public ApplicationInsightsWebTest(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Insights/webtests", resourceVersion ?? "2022-06-15") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _location = BicepValue.DefineProperty(this, "Location", ["location"], isRequired: true); @@ -203,7 +203,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing ApplicationInsightsWebTest. /// - /// + /// /// The the Bicep identifier name of the ApplicationInsightsWebTest /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -211,6 +211,6 @@ public static class ResourceVersions /// /// Version of the ApplicationInsightsWebTest. /// The existing ApplicationInsightsWebTest resource. - public static ApplicationInsightsWebTest FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static ApplicationInsightsWebTest FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.ApplicationInsights/src/Generated/ApplicationInsightsWorkbook.cs b/sdk/provisioning/Azure.Provisioning.ApplicationInsights/src/Generated/ApplicationInsightsWorkbook.cs index 0df8b507f561..45c02bf66116 100644 --- a/sdk/provisioning/Azure.Provisioning.ApplicationInsights/src/Generated/ApplicationInsightsWorkbook.cs +++ b/sdk/provisioning/Azure.Provisioning.ApplicationInsights/src/Generated/ApplicationInsightsWorkbook.cs @@ -17,7 +17,7 @@ namespace Azure.Provisioning.ApplicationInsights; /// /// ApplicationInsightsWorkbook. /// -public partial class ApplicationInsightsWorkbook : Resource +public partial class ApplicationInsightsWorkbook : ProvisionableResource { /// /// The name of the workbook resource. The value must be an UUID. @@ -134,15 +134,15 @@ public partial class ApplicationInsightsWorkbook : Resource /// /// Creates a new ApplicationInsightsWorkbook. /// - /// + /// /// The the Bicep identifier name of the ApplicationInsightsWorkbook /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the ApplicationInsightsWorkbook. - public ApplicationInsightsWorkbook(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Insights/workbooks", resourceVersion ?? "2023-06-01") + public ApplicationInsightsWorkbook(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Insights/workbooks", resourceVersion ?? "2023-06-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _location = BicepValue.DefineProperty(this, "Location", ["location"], isRequired: true); @@ -203,7 +203,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing ApplicationInsightsWorkbook. /// - /// + /// /// The the Bicep identifier name of the ApplicationInsightsWorkbook /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -211,6 +211,6 @@ public static class ResourceVersions /// /// Version of the ApplicationInsightsWorkbook. /// The existing ApplicationInsightsWorkbook resource. - public static ApplicationInsightsWorkbook FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static ApplicationInsightsWorkbook FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.ApplicationInsights/src/Generated/ApplicationInsightsWorkbookTemplate.cs b/sdk/provisioning/Azure.Provisioning.ApplicationInsights/src/Generated/ApplicationInsightsWorkbookTemplate.cs index acb23fca729d..0081de47b49a 100644 --- a/sdk/provisioning/Azure.Provisioning.ApplicationInsights/src/Generated/ApplicationInsightsWorkbookTemplate.cs +++ b/sdk/provisioning/Azure.Provisioning.ApplicationInsights/src/Generated/ApplicationInsightsWorkbookTemplate.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.ApplicationInsights; /// /// ApplicationInsightsWorkbookTemplate. /// -public partial class ApplicationInsightsWorkbookTemplate : Resource +public partial class ApplicationInsightsWorkbookTemplate : ProvisionableResource { /// /// The name of the Application Insights component resource. @@ -96,15 +96,15 @@ public partial class ApplicationInsightsWorkbookTemplate : Resource /// /// Creates a new ApplicationInsightsWorkbookTemplate. /// - /// + /// /// The the Bicep identifier name of the /// ApplicationInsightsWorkbookTemplate resource. This can be used to /// refer to the resource in expressions, but is not the Azure name of the /// resource. This value can contain letters, numbers, and underscores. /// /// Version of the ApplicationInsightsWorkbookTemplate. - public ApplicationInsightsWorkbookTemplate(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Insights/workbooktemplates", resourceVersion ?? "2020-11-20") + public ApplicationInsightsWorkbookTemplate(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Insights/workbooktemplates", resourceVersion ?? "2020-11-20") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _location = BicepValue.DefineProperty(this, "Location", ["location"], isRequired: true); @@ -132,7 +132,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing ApplicationInsightsWorkbookTemplate. /// - /// + /// /// The the Bicep identifier name of the /// ApplicationInsightsWorkbookTemplate resource. This can be used to /// refer to the resource in expressions, but is not the Azure name of the @@ -140,6 +140,6 @@ public static class ResourceVersions /// /// Version of the ApplicationInsightsWorkbookTemplate. /// The existing ApplicationInsightsWorkbookTemplate resource. - public static ApplicationInsightsWorkbookTemplate FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static ApplicationInsightsWorkbookTemplate FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.ApplicationInsights/src/Generated/Models/PrivateLinkScopedResourceReference.cs b/sdk/provisioning/Azure.Provisioning.ApplicationInsights/src/Generated/Models/PrivateLinkScopedResourceReference.cs index 7c2ff0d31e93..0ce00bcb783e 100644 --- a/sdk/provisioning/Azure.Provisioning.ApplicationInsights/src/Generated/Models/PrivateLinkScopedResourceReference.cs +++ b/sdk/provisioning/Azure.Provisioning.ApplicationInsights/src/Generated/Models/PrivateLinkScopedResourceReference.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.ApplicationInsights; /// /// The private link scope resource reference. /// -public partial class PrivateLinkScopedResourceReference : ProvisioningConstruct +public partial class PrivateLinkScopedResourceReference : ProvisionableConstruct { /// /// The full resource Id of the private link scope resource. diff --git a/sdk/provisioning/Azure.Provisioning.ApplicationInsights/src/Generated/Models/WebTestContentValidation.cs b/sdk/provisioning/Azure.Provisioning.ApplicationInsights/src/Generated/Models/WebTestContentValidation.cs index bbf39e4bfbb5..74a1c38ad9cd 100644 --- a/sdk/provisioning/Azure.Provisioning.ApplicationInsights/src/Generated/Models/WebTestContentValidation.cs +++ b/sdk/provisioning/Azure.Provisioning.ApplicationInsights/src/Generated/Models/WebTestContentValidation.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.ApplicationInsights; /// /// The collection of content validation properties. /// -public partial class WebTestContentValidation : ProvisioningConstruct +public partial class WebTestContentValidation : ProvisionableConstruct { /// /// Content to look for in the return of the WebTest. Must not be null or diff --git a/sdk/provisioning/Azure.Provisioning.ApplicationInsights/src/Generated/Models/WebTestGeolocation.cs b/sdk/provisioning/Azure.Provisioning.ApplicationInsights/src/Generated/Models/WebTestGeolocation.cs index 025c9e5e80d5..a2c62af6d459 100644 --- a/sdk/provisioning/Azure.Provisioning.ApplicationInsights/src/Generated/Models/WebTestGeolocation.cs +++ b/sdk/provisioning/Azure.Provisioning.ApplicationInsights/src/Generated/Models/WebTestGeolocation.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.ApplicationInsights; /// Geo-physical location to run a WebTest from. You must specify one or more /// locations for the test to run from. /// -public partial class WebTestGeolocation : ProvisioningConstruct +public partial class WebTestGeolocation : ProvisionableConstruct { /// /// Location ID for the WebTest to run from. diff --git a/sdk/provisioning/Azure.Provisioning.ApplicationInsights/src/Generated/Models/WebTestRequest.cs b/sdk/provisioning/Azure.Provisioning.ApplicationInsights/src/Generated/Models/WebTestRequest.cs index 94332c76a3ea..44c2e0f3dc9e 100644 --- a/sdk/provisioning/Azure.Provisioning.ApplicationInsights/src/Generated/Models/WebTestRequest.cs +++ b/sdk/provisioning/Azure.Provisioning.ApplicationInsights/src/Generated/Models/WebTestRequest.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.ApplicationInsights; /// /// The collection of request properties. /// -public partial class WebTestRequest : ProvisioningConstruct +public partial class WebTestRequest : ProvisionableConstruct { /// /// Url location to test. diff --git a/sdk/provisioning/Azure.Provisioning.ApplicationInsights/src/Generated/Models/WebTestRequestHeaderField.cs b/sdk/provisioning/Azure.Provisioning.ApplicationInsights/src/Generated/Models/WebTestRequestHeaderField.cs index 626b4ec3170b..2125364cb844 100644 --- a/sdk/provisioning/Azure.Provisioning.ApplicationInsights/src/Generated/Models/WebTestRequestHeaderField.cs +++ b/sdk/provisioning/Azure.Provisioning.ApplicationInsights/src/Generated/Models/WebTestRequestHeaderField.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.ApplicationInsights; /// /// A header to add to the WebTest. /// -public partial class WebTestRequestHeaderField : ProvisioningConstruct +public partial class WebTestRequestHeaderField : ProvisionableConstruct { /// /// The name of the header. diff --git a/sdk/provisioning/Azure.Provisioning.ApplicationInsights/src/Generated/Models/WebTestValidationRules.cs b/sdk/provisioning/Azure.Provisioning.ApplicationInsights/src/Generated/Models/WebTestValidationRules.cs index e4948e682b0c..6747f64eb11c 100644 --- a/sdk/provisioning/Azure.Provisioning.ApplicationInsights/src/Generated/Models/WebTestValidationRules.cs +++ b/sdk/provisioning/Azure.Provisioning.ApplicationInsights/src/Generated/Models/WebTestValidationRules.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.ApplicationInsights; /// /// The collection of validation rule properties. /// -public partial class WebTestValidationRules : ProvisioningConstruct +public partial class WebTestValidationRules : ProvisionableConstruct { /// /// The collection of content validation properties. diff --git a/sdk/provisioning/Azure.Provisioning.ApplicationInsights/src/Generated/Models/WorkbookTemplateGallery.cs b/sdk/provisioning/Azure.Provisioning.ApplicationInsights/src/Generated/Models/WorkbookTemplateGallery.cs index 2f5e8690a906..1702c9961c56 100644 --- a/sdk/provisioning/Azure.Provisioning.ApplicationInsights/src/Generated/Models/WorkbookTemplateGallery.cs +++ b/sdk/provisioning/Azure.Provisioning.ApplicationInsights/src/Generated/Models/WorkbookTemplateGallery.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.ApplicationInsights; /// /// Gallery information for a workbook template. /// -public partial class WorkbookTemplateGallery : ProvisioningConstruct +public partial class WorkbookTemplateGallery : ProvisionableConstruct { /// /// Name of the workbook template in the gallery. diff --git a/sdk/provisioning/Azure.Provisioning.ApplicationInsights/src/Generated/Models/WorkbookTemplateLocalizedGallery.cs b/sdk/provisioning/Azure.Provisioning.ApplicationInsights/src/Generated/Models/WorkbookTemplateLocalizedGallery.cs index c72d05f2b56c..43bdd2a7931a 100644 --- a/sdk/provisioning/Azure.Provisioning.ApplicationInsights/src/Generated/Models/WorkbookTemplateLocalizedGallery.cs +++ b/sdk/provisioning/Azure.Provisioning.ApplicationInsights/src/Generated/Models/WorkbookTemplateLocalizedGallery.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.ApplicationInsights; /// /// Localized template data and gallery information. /// -public partial class WorkbookTemplateLocalizedGallery : ProvisioningConstruct +public partial class WorkbookTemplateLocalizedGallery : ProvisionableConstruct { /// /// Valid JSON object containing workbook template payload. diff --git a/sdk/provisioning/Azure.Provisioning.CloudMachine/Azure.CloudMachine.sln b/sdk/provisioning/Azure.Provisioning.CloudMachine/Azure.CloudMachine.sln index 4a3ca5dfef4e..3e3ec98764e5 100644 --- a/sdk/provisioning/Azure.Provisioning.CloudMachine/Azure.CloudMachine.sln +++ b/sdk/provisioning/Azure.Provisioning.CloudMachine/Azure.CloudMachine.sln @@ -7,6 +7,18 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.Provisioning.CloudMac EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.Provisioning.CloudMachine.Tests", "tests\Azure.Provisioning.CloudMachine.Tests.csproj", "{46DCEF27-4157-4FB6-A283-B8484EC45665}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.Provisioning", "..\Azure.Provisioning\src\Azure.Provisioning.csproj", "{2F492C07-8182-41E2-8C68-27D353C9AB74}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.Provisioning.KeyVault", "..\Azure.Provisioning.KeyVault\src\Azure.Provisioning.KeyVault.csproj", "{DA43BF21-558B-438B-9DBF-1A88130C944A}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.Provisioning.ServiceBus", "..\Azure.Provisioning.ServiceBus\src\Azure.Provisioning.ServiceBus.csproj", "{48D33345-B5A8-4F94-84D6-A61F8E16271D}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.Provisioning.EventGrid", "..\Azure.Provisioning.EventGrid\src\Azure.Provisioning.EventGrid.csproj", "{BCBAF45F-E078-4230-9BDC-4DE9F2FBEE9A}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.Provisioning.CognitiveServices", "..\Azure.Provisioning.CognitiveServices\src\Azure.Provisioning.CognitiveServices.csproj", "{987279D2-202C-488A-BA47-37FCEEA51536}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.Provisioning.Storage", "..\Azure.Provisioning.Storage\src\Azure.Provisioning.Storage.csproj", "{813E7228-2B59-41D2-9AFC-BF4092EC7090}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -21,6 +33,30 @@ Global {46DCEF27-4157-4FB6-A283-B8484EC45665}.Debug|Any CPU.Build.0 = Debug|Any CPU {46DCEF27-4157-4FB6-A283-B8484EC45665}.Release|Any CPU.ActiveCfg = Release|Any CPU {46DCEF27-4157-4FB6-A283-B8484EC45665}.Release|Any CPU.Build.0 = Release|Any CPU + {2F492C07-8182-41E2-8C68-27D353C9AB74}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2F492C07-8182-41E2-8C68-27D353C9AB74}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2F492C07-8182-41E2-8C68-27D353C9AB74}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2F492C07-8182-41E2-8C68-27D353C9AB74}.Release|Any CPU.Build.0 = Release|Any CPU + {DA43BF21-558B-438B-9DBF-1A88130C944A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DA43BF21-558B-438B-9DBF-1A88130C944A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DA43BF21-558B-438B-9DBF-1A88130C944A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DA43BF21-558B-438B-9DBF-1A88130C944A}.Release|Any CPU.Build.0 = Release|Any CPU + {48D33345-B5A8-4F94-84D6-A61F8E16271D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {48D33345-B5A8-4F94-84D6-A61F8E16271D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {48D33345-B5A8-4F94-84D6-A61F8E16271D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {48D33345-B5A8-4F94-84D6-A61F8E16271D}.Release|Any CPU.Build.0 = Release|Any CPU + {BCBAF45F-E078-4230-9BDC-4DE9F2FBEE9A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BCBAF45F-E078-4230-9BDC-4DE9F2FBEE9A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BCBAF45F-E078-4230-9BDC-4DE9F2FBEE9A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BCBAF45F-E078-4230-9BDC-4DE9F2FBEE9A}.Release|Any CPU.Build.0 = Release|Any CPU + {987279D2-202C-488A-BA47-37FCEEA51536}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {987279D2-202C-488A-BA47-37FCEEA51536}.Debug|Any CPU.Build.0 = Debug|Any CPU + {987279D2-202C-488A-BA47-37FCEEA51536}.Release|Any CPU.ActiveCfg = Release|Any CPU + {987279D2-202C-488A-BA47-37FCEEA51536}.Release|Any CPU.Build.0 = Release|Any CPU + {813E7228-2B59-41D2-9AFC-BF4092EC7090}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {813E7228-2B59-41D2-9AFC-BF4092EC7090}.Debug|Any CPU.Build.0 = Debug|Any CPU + {813E7228-2B59-41D2-9AFC-BF4092EC7090}.Release|Any CPU.ActiveCfg = Release|Any CPU + {813E7228-2B59-41D2-9AFC-BF4092EC7090}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/sdk/provisioning/Azure.Provisioning.CloudMachine/CHANGELOG.md b/sdk/provisioning/Azure.Provisioning.CloudMachine/CHANGELOG.md index 13dd08af78ab..547c37ba3b96 100644 --- a/sdk/provisioning/Azure.Provisioning.CloudMachine/CHANGELOG.md +++ b/sdk/provisioning/Azure.Provisioning.CloudMachine/CHANGELOG.md @@ -2,6 +2,8 @@ ## 1.0.0-beta.1 (Unreleased) +## 1.0.0-beta.2 (Unreleased) + ### Features Added ### Breaking Changes diff --git a/sdk/provisioning/Azure.Provisioning.CloudMachine/api/Azure.Provisioning.CloudMachine.netstandard2.0.cs b/sdk/provisioning/Azure.Provisioning.CloudMachine/api/Azure.Provisioning.CloudMachine.netstandard2.0.cs index 5afe8aa21795..97cb826cbaba 100644 --- a/sdk/provisioning/Azure.Provisioning.CloudMachine/api/Azure.Provisioning.CloudMachine.netstandard2.0.cs +++ b/sdk/provisioning/Azure.Provisioning.CloudMachine/api/Azure.Provisioning.CloudMachine.netstandard2.0.cs @@ -1,45 +1,93 @@ namespace Azure.CloudMachine { - public partial class ClientCache + public partial class CloudMachineClient : Azure.CloudMachine.CloudMachineWorkspace { - public ClientCache() { } - public T Get(string id, System.Func value) where T : class { throw null; } + public CloudMachineClient(Azure.Core.TokenCredential? credential = null, Microsoft.Extensions.Configuration.IConfiguration? configuration = null) : base (default(Azure.Core.TokenCredential), default(Microsoft.Extensions.Configuration.IConfiguration)) { } + public Azure.CloudMachine.MessagingServices Messaging { get { throw null; } } + public Azure.CloudMachine.StorageServices Storage { get { throw null; } } } - public partial class CloudMachineClient + public partial class CloudMachineWorkspace : Azure.Core.ClientWorkspace { - protected CloudMachineClient() { } - public CloudMachineClient(Azure.Identity.DefaultAzureCredential? credential = null, Microsoft.Extensions.Configuration.IConfiguration? configuration = null) { } + public CloudMachineWorkspace(Azure.Core.TokenCredential? credential = null, Microsoft.Extensions.Configuration.IConfiguration? configuration = null) { } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public Azure.CloudMachine.ClientCache ClientCache { get { throw null; } } - public Azure.Core.TokenCredential Credential { get { throw null; } } public string Id { get { throw null; } } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public Azure.CloudMachine.CloudMachineClient.CloudMachineProperties Properties { get { throw null; } } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object? obj) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override Azure.Core.ClientConnectionOptions GetConnectionOptions(System.Type clientType, string? instanceId = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override int GetHashCode() { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override string ToString() { throw null; } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public partial struct CloudMachineProperties - { - private object _dummy; - private int _dummyPrimitive; - public System.Uri BlobServiceUri { get { throw null; } } - public System.Uri DefaultContainerUri { get { throw null; } } - public System.Uri KeyVaultUri { get { throw null; } } - public string ServiceBusNamespace { get { throw null; } } - } } - public static partial class MessagingServices + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct MessagingServices { - public static void Send(this Azure.CloudMachine.CloudMachineClient cm, object serializable) { } + private readonly object _dummy; + private readonly int _dummyPrimitive; + public void SendMessage(object serializable) { } + public void WhenMessageReceived(System.Action received) { } + } + public partial class StorageFile + { + internal StorageFile() { } + public System.Threading.CancellationToken CancellationToken { get { throw null; } } + public string Path { get { throw null; } } + public string RequestId { get { throw null; } } + public void Delete() { } + public System.BinaryData Download() { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static implicit operator Azure.Response (Azure.CloudMachine.StorageFile result) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override string ToString() { throw null; } } - public static partial class StorageServices + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct StorageServices { - public static System.BinaryData Download(this Azure.CloudMachine.CloudMachineClient cm, string name) { throw null; } - public static string Upload(this Azure.CloudMachine.CloudMachineClient cm, object json, string? name = null) { throw null; } + private readonly object _dummy; + private readonly int _dummyPrimitive; + public void DeleteBlob(string path) { } + public System.BinaryData DownloadBlob(string path) { throw null; } + public string UploadBlob(object json, string? name = null) { throw null; } + public void WhenBlobUploaded(System.Action function) { } + } +} +namespace Azure.Core +{ + public partial class ClientCache + { + public ClientCache() { } + public T Get(System.Func value, string? id = null) where T : class { throw null; } + } + public enum ClientConnectionKind + { + EntraId = 0, + ApiKey = 1, + OutOfBand = 2, + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ClientConnectionOptions + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ClientConnectionOptions(string subclientId) { throw null; } + public ClientConnectionOptions(System.Uri endpoint, Azure.Core.TokenCredential credential) { throw null; } + public ClientConnectionOptions(System.Uri endpoint, string apiKey) { throw null; } + public string? ApiKeyCredential { get { throw null; } } + public Azure.Core.ClientConnectionKind ConnectionKind { get { throw null; } } + public System.Uri? Endpoint { get { throw null; } } + public string? Id { get { throw null; } } + public Azure.Core.TokenCredential? TokenCredential { get { throw null; } } + } + public abstract partial class ClientWorkspace + { + protected ClientWorkspace() { } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public Azure.Core.ClientCache Subclients { get { throw null; } } + public abstract Azure.Core.ClientConnectionOptions GetConnectionOptions(System.Type clientType, string? instanceId = null); } } namespace Azure.Provisioning.CloudMachine @@ -47,6 +95,7 @@ namespace Azure.Provisioning.CloudMachine public abstract partial class CloudMachineFeature { protected CloudMachineFeature() { } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public abstract void AddTo(Azure.Provisioning.CloudMachine.CloudMachineInfrastructure cm); } public partial class CloudMachineInfrastructure @@ -56,8 +105,8 @@ public CloudMachineInfrastructure(string cmId) { } public Azure.Provisioning.Roles.UserAssignedIdentity Identity { get { throw null; } } public Azure.Provisioning.ProvisioningParameter PrincipalIdParameter { get { throw null; } } public void AddFeature(Azure.Provisioning.CloudMachine.CloudMachineFeature resource) { } - public void AddResource(Azure.Provisioning.Primitives.NamedProvisioningConstruct resource) { } - public Azure.Provisioning.ProvisioningPlan Build(Azure.Provisioning.ProvisioningContext? context = null) { throw null; } + public void AddResource(Azure.Provisioning.Primitives.NamedProvisionableConstruct resource) { } + public Azure.Provisioning.ProvisioningPlan Build(Azure.Provisioning.ProvisioningBuildOptions? context = null) { throw null; } public static bool Configure(string[] args, System.Action? configure = null) { throw null; } } } @@ -65,24 +114,26 @@ namespace Azure.Provisioning.CloudMachine.KeyVault { public static partial class KeyVaultExtensions { - public static Azure.Security.KeyVault.Secrets.SecretClient GetKeyVaultSecretClient(this Azure.CloudMachine.CloudMachineClient client) { throw null; } + public static Azure.Security.KeyVault.Secrets.SecretClient GetKeyVaultSecretsClient(this Azure.Core.ClientWorkspace workspace) { throw null; } } public partial class KeyVaultFeature : Azure.Provisioning.CloudMachine.CloudMachineFeature { - public KeyVaultFeature() { } + public KeyVaultFeature(Azure.Provisioning.KeyVault.KeyVaultSku? sku = null) { } public Azure.Provisioning.KeyVault.KeyVaultSku Sku { get { throw null; } set { } } - public override void AddTo(Azure.Provisioning.CloudMachine.CloudMachineInfrastructure cm) { } + public override void AddTo(Azure.Provisioning.CloudMachine.CloudMachineInfrastructure infrastructure) { } } } namespace Azure.Provisioning.CloudMachine.OpenAI { - public partial class OpenAIFeature : Azure.Provisioning.CloudMachine.CloudMachineFeature + public static partial class AzureOpenAIExtensions { - public OpenAIFeature() { } - public override void AddTo(Azure.Provisioning.CloudMachine.CloudMachineInfrastructure cm) { } + public static OpenAI.Chat.ChatClient GetOpenAIChatClient(this Azure.Core.ClientWorkspace workspace) { throw null; } } - public static partial class OpenAIFeatureExtensions + public partial class OpenAIFeature : Azure.Provisioning.CloudMachine.CloudMachineFeature { - public static Azure.Security.KeyVault.Secrets.SecretClient GetOpenAIClient(this Azure.CloudMachine.CloudMachineClient client) { throw null; } + public OpenAIFeature(string model, string modelVersion) { } + public string Model { get { throw null; } } + public string ModelVersion { get { throw null; } } + public override void AddTo(Azure.Provisioning.CloudMachine.CloudMachineInfrastructure cloudMachine) { } } } diff --git a/sdk/provisioning/Azure.Provisioning.CloudMachine/src/Azure.Provisioning.CloudMachine.csproj b/sdk/provisioning/Azure.Provisioning.CloudMachine/src/Azure.Provisioning.CloudMachine.csproj index 58d9db9b883c..14e43a27f65b 100644 --- a/sdk/provisioning/Azure.Provisioning.CloudMachine/src/Azure.Provisioning.CloudMachine.csproj +++ b/sdk/provisioning/Azure.Provisioning.CloudMachine/src/Azure.Provisioning.CloudMachine.csproj @@ -2,7 +2,7 @@ Azure.Provisioning.CloudMachine simplifies declarative resource provisioning in .NET. - 1.0.0-beta.1 + 1.0.0-beta.2 $(RequiredTargetFrameworks) 12 @@ -11,17 +11,20 @@ + + + + - - + diff --git a/sdk/provisioning/Azure.Provisioning.CloudMachine/src/AzureSdkExtensions/KeyVaultFeature.cs b/sdk/provisioning/Azure.Provisioning.CloudMachine/src/AzureSdkExtensions/KeyVaultFeature.cs new file mode 100644 index 000000000000..84af47188c4e --- /dev/null +++ b/sdk/provisioning/Azure.Provisioning.CloudMachine/src/AzureSdkExtensions/KeyVaultFeature.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using Azure.Core; +using Azure.Provisioning.Authorization; +using Azure.Provisioning.Expressions; +using Azure.Provisioning.KeyVault; +using Azure.Security.KeyVault.Secrets; + +namespace Azure.Provisioning.CloudMachine.KeyVault; + +public class KeyVaultFeature : CloudMachineFeature +{ + public KeyVaultSku Sku { get; set; } + + public KeyVaultFeature(KeyVaultSku? sku = default) + { + if (sku == null) + { + sku = new KeyVaultSku { Name = KeyVaultSkuName.Standard, Family = KeyVaultSkuFamily.A, }; + } + Sku = sku; + } + public override void AddTo(CloudMachineInfrastructure infrastructure) + { + // Add a KeyVault to the CloudMachine infrastructure. + KeyVaultService keyVaultResource = new("cm_kv") + { + Name = infrastructure.Id, + Properties = + new KeyVaultProperties + { + Sku = this.Sku, + TenantId = BicepFunction.GetSubscription().TenantId, + EnabledForDeployment = true, + AccessPolicies = [ + new KeyVaultAccessPolicy() { + ObjectId = infrastructure.PrincipalIdParameter, + Permissions = new IdentityAccessPermissions() { + Secrets = [IdentityAccessSecretPermission.Get, IdentityAccessSecretPermission.Set] + }, + TenantId = infrastructure.Identity.TenantId + } + ] + }, + }; + + infrastructure.AddResource(keyVaultResource); + + RoleAssignment ra = keyVaultResource.CreateRoleAssignment(KeyVaultBuiltInRole.KeyVaultAdministrator, RoleManagementPrincipalType.User, infrastructure.PrincipalIdParameter); + infrastructure.AddResource(ra); + + // necessary until ResourceName is settable via AssignRole. + RoleAssignment kvMiRoleAssignment = new RoleAssignment(keyVaultResource.BicepIdentifier + "_" + infrastructure.Identity.BicepIdentifier + "_" + KeyVaultBuiltInRole.GetBuiltInRoleName(KeyVaultBuiltInRole.KeyVaultAdministrator)); + kvMiRoleAssignment.Name = BicepFunction.CreateGuid(keyVaultResource.Id, infrastructure.Identity.Id, BicepFunction.GetSubscriptionResourceId("Microsoft.Authorization/roleDefinitions", KeyVaultBuiltInRole.KeyVaultAdministrator.ToString())); + kvMiRoleAssignment.Scope = new IdentifierExpression(keyVaultResource.BicepIdentifier); + kvMiRoleAssignment.PrincipalType = RoleManagementPrincipalType.ServicePrincipal; + kvMiRoleAssignment.RoleDefinitionId = BicepFunction.GetSubscriptionResourceId("Microsoft.Authorization/roleDefinitions", KeyVaultBuiltInRole.KeyVaultAdministrator.ToString()); + kvMiRoleAssignment.PrincipalId = infrastructure.Identity.PrincipalId; + infrastructure.AddResource(kvMiRoleAssignment); + } +} + +public static class KeyVaultExtensions +{ + public static SecretClient GetKeyVaultSecretsClient(this ClientWorkspace workspace) + { + ClientConnectionOptions connection = workspace.GetConnectionOptions(typeof(SecretClient)); + if (connection.ConnectionKind == ClientConnectionKind.EntraId) + { + return new(connection.Endpoint, connection.TokenCredential); + } + throw new Exception("API key not supported"); + } +} diff --git a/sdk/provisioning/Azure.Provisioning.CloudMachine/src/AzureSdkExtensions/OpenAIFeature.cs b/sdk/provisioning/Azure.Provisioning.CloudMachine/src/AzureSdkExtensions/OpenAIFeature.cs new file mode 100644 index 000000000000..171f62053e00 --- /dev/null +++ b/sdk/provisioning/Azure.Provisioning.CloudMachine/src/AzureSdkExtensions/OpenAIFeature.cs @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.ClientModel; +using Azure.AI.OpenAI; +using Azure.Core; +using Azure.Provisioning.Authorization; +using Azure.Provisioning.CognitiveServices; +using OpenAI.Chat; + +namespace Azure.Provisioning.CloudMachine.OpenAI; + +public class OpenAIFeature : CloudMachineFeature +{ + public string Model { get; } + public string ModelVersion { get; } + + public OpenAIFeature(string model, string modelVersion) { Model = model; ModelVersion = modelVersion; } + + public override void AddTo(CloudMachineInfrastructure cloudMachine) + { + CognitiveServicesAccount cognitiveServices = new("openai") + { + Name = cloudMachine.Id, + Kind = "OpenAI", + Sku = new CognitiveServicesSku { Name = "S0" }, + Properties = new CognitiveServicesAccountProperties() + { + PublicNetworkAccess = ServiceAccountPublicNetworkAccess.Enabled, + CustomSubDomainName = cloudMachine.Id + }, + }; + + cloudMachine.AddResource(cognitiveServices.CreateRoleAssignment( + CognitiveServicesBuiltInRole.CognitiveServicesOpenAIContributor, + RoleManagementPrincipalType.User, + cloudMachine.PrincipalIdParameter) + ); + + // TODO: if we every support more than one deployment, they need to be chained using DependsOn. + // The reason is that deployments need to be deployed/created serially. + CognitiveServicesAccountDeployment deployment = new("openai_deployment", "2023-05-01") + { + Parent = cognitiveServices, + Name = cloudMachine.Id, + Properties = new CognitiveServicesAccountDeploymentProperties() + { + Model = new CognitiveServicesAccountDeploymentModel() { + Name = this.Model, + Format = "OpenAI", + Version = this.ModelVersion + } + }, + }; + + cloudMachine.AddResource(cognitiveServices); + cloudMachine.AddResource(deployment); + } +} + +public static class AzureOpenAIExtensions +{ + public static ChatClient GetOpenAIChatClient(this ClientWorkspace workspace) + { + ChatClient chatClient = workspace.Subclients.Get(() => + { + AzureOpenAIClient aoiaClient = workspace.Subclients.Get(() => CreateAzureOpenAIClient(workspace)); + return workspace.CreateChatClient(aoiaClient); + }); + + return chatClient; + } + + private static AzureOpenAIClient CreateAzureOpenAIClient(this ClientWorkspace workspace) + { + ClientConnectionOptions connection = workspace.GetConnectionOptions(typeof(AzureOpenAIClient)); + if (connection.ConnectionKind == ClientConnectionKind.EntraId) + { + return new(connection.Endpoint, connection.TokenCredential); + } + else + { + return new(connection.Endpoint, new ApiKeyCredential(connection.ApiKeyCredential!)); + } + } + + private static ChatClient CreateChatClient(this ClientWorkspace workspace, AzureOpenAIClient client) + { + ClientConnectionOptions connection = workspace.GetConnectionOptions(typeof(ChatClient)); + ChatClient chat = client.GetChatClient(connection.Id); + return chat; + } +} diff --git a/sdk/provisioning/Azure.Provisioning.CloudMachine/src/Azd.cs b/sdk/provisioning/Azure.Provisioning.CloudMachine/src/CDKLevel3/AzdHelpers.cs similarity index 81% rename from sdk/provisioning/Azure.Provisioning.CloudMachine/src/Azd.cs rename to sdk/provisioning/Azure.Provisioning.CloudMachine/src/CDKLevel3/AzdHelpers.cs index 61d3ccdd5c5e..f2907aaceb68 100644 --- a/sdk/provisioning/Azure.Provisioning.CloudMachine/src/Azd.cs +++ b/sdk/provisioning/Azure.Provisioning.CloudMachine/src/CDKLevel3/AzdHelpers.cs @@ -13,7 +13,7 @@ namespace Azure.CloudMachine; -internal static class Azd +internal static class AzdHelpers { private const string MainBicepName = "main"; private const string ResourceGroupVersion = "2024-03-01"; @@ -37,12 +37,12 @@ internal static void Init(string infraDirectory, CloudMachineInfrastructure cmi) Infrastructure mainBicep = new("main") { - TargetScope = "subscription" + TargetScope = DeploymentScope.Subscription }; ModuleImport import = new("cm", $"cm.bicep") { Name = "cm", - Scope = new IdentifierExpression(rg.IdentifierName) + Scope = new IdentifierExpression(rg.BicepIdentifier) }; import.Parameters.Add(nameof(location), location); import.Parameters.Add(nameof(principalId), principalId); @@ -115,18 +115,29 @@ internal static string ReadOrCreateCmid() return cmid; } else - { // add CM configuration to existing file - JsonNode? root = JsonValue.Parse(appsettings); - if (root is null) - throw new NotImplementedException(); - - if (root is not JsonObject obj) - throw new NotImplementedException(); + { // add CM configuration to existing file + json.Seek(0, SeekOrigin.Begin); + JsonNode? root = JsonNode.Parse(json); + json.Close(); + if (root is null || root is not JsonObject obj) throw new InvalidOperationException("Existing appsettings.json is not a valid JSON object"); var cmProperties = new JsonObject(); cmid = GenerateCloudMachineId(); cmProperties.Add("ID", cmid); obj.Add("CloudMachine", cmProperties); + + using FileStream file = File.OpenWrite(appsettings); + JsonWriterOptions writerOptions = new() + { + Indented = true, + }; + Utf8JsonWriter writer = new(file, writerOptions); + JsonSerializerOptions options = new() + { + WriteIndented = true, + }; + root.WriteTo(writer, options); + writer.Flush(); } return cmid; diff --git a/sdk/provisioning/Azure.Provisioning.CloudMachine/src/CloudMachineFeature.cs b/sdk/provisioning/Azure.Provisioning.CloudMachine/src/CDKLevel3/CloudMachineFeature.cs similarity index 75% rename from sdk/provisioning/Azure.Provisioning.CloudMachine/src/CloudMachineFeature.cs rename to sdk/provisioning/Azure.Provisioning.CloudMachine/src/CDKLevel3/CloudMachineFeature.cs index 0f96ce3ea71f..4489185758ff 100644 --- a/sdk/provisioning/Azure.Provisioning.CloudMachine/src/CloudMachineFeature.cs +++ b/sdk/provisioning/Azure.Provisioning.CloudMachine/src/CDKLevel3/CloudMachineFeature.cs @@ -1,9 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. +using System.ComponentModel; + namespace Azure.Provisioning.CloudMachine; public abstract class CloudMachineFeature { + [EditorBrowsable(EditorBrowsableState.Never)] public abstract void AddTo(CloudMachineInfrastructure cm); } diff --git a/sdk/provisioning/Azure.Provisioning.CloudMachine/src/CloudMachineInfrastructure.cs b/sdk/provisioning/Azure.Provisioning.CloudMachine/src/CDKLevel3/CloudMachineInfrastructure.cs similarity index 81% rename from sdk/provisioning/Azure.Provisioning.CloudMachine/src/CloudMachineInfrastructure.cs rename to sdk/provisioning/Azure.Provisioning.CloudMachine/src/CDKLevel3/CloudMachineInfrastructure.cs index f134dd71790e..457678158670 100644 --- a/sdk/provisioning/Azure.Provisioning.CloudMachine/src/CloudMachineInfrastructure.cs +++ b/sdk/provisioning/Azure.Provisioning.CloudMachine/src/CDKLevel3/CloudMachineInfrastructure.cs @@ -13,11 +13,14 @@ using Azure.Provisioning.Storage; using Azure.Provisioning.Primitives; using System.Collections.Generic; +using System.Security.Principal; namespace Azure.Provisioning.CloudMachine; public class CloudMachineInfrastructure { + internal const string SB_PRIVATE_TOPIC = "cm_servicebus_topic_private"; + internal const string SB_PRIVATE_SUB = "cm_servicebus_subscription_private"; private readonly string _cmid; private Infrastructure _infrastructure = new Infrastructure("cm"); @@ -74,7 +77,14 @@ public CloudMachineInfrastructure(string cmId) UserAssignedIdentities = { { BicepFunction.Interpolate($"{Identity.Id}").Compile().ToString(), new UserAssignedIdentityDetails() } } }; - _storage = StorageResources.CreateAccount("cm_storage"); + _storage = + new StorageAccount("cm_storage", StorageAccount.ResourceVersions.V2023_01_01) + { + Kind = StorageKind.StorageV2, + Sku = new StorageSku { Name = StorageSkuName.StandardLrs }, + IsHnsEnabled = true, + AllowBlobPublicAccess = false + }; _storage.Identity = managedServiceIdentity; _storage.Name = _cmid; @@ -97,7 +107,7 @@ public CloudMachineInfrastructure(string cmId) }, Name = _cmid, }; - _serviceBusNamespaceAuthorizationRule = new($"cm_servicebus_auth_rule", "2021-11-01") + _serviceBusNamespaceAuthorizationRule = new("cm_servicebus_auth_rule", "2021-11-01") { Parent = _serviceBusNamespace, Rights = [ServiceBusAccessRight.Listen, ServiceBusAccessRight.Send, ServiceBusAccessRight.Manage] @@ -107,19 +117,20 @@ public CloudMachineInfrastructure(string cmId) Name = "cm_servicebus_topic_private", Parent = _serviceBusNamespace, MaxMessageSizeInKilobytes = 256, - DefaultMessageTimeToLive = new StringLiteral("P14D"), + DefaultMessageTimeToLive = TimeSpan.FromDays(14), RequiresDuplicateDetection = false, EnableBatchedOperations = true, SupportOrdering = true, Status = ServiceBusMessagingEntityStatus.Active }; - _serviceBusSubscription_private = new("cm_servicebus_subscription_private", "2021-11-01") + _serviceBusSubscription_private = new(SB_PRIVATE_SUB, "2021-11-01") { + Name = SB_PRIVATE_SUB, Parent = _serviceBusTopic_private, IsClientAffine = false, - LockDuration = new StringLiteral("PT30S"), + LockDuration = TimeSpan.FromSeconds(30), RequiresSession = false, - DefaultMessageTimeToLive = new StringLiteral("P14D"), + DefaultMessageTimeToLive = TimeSpan.FromDays(14), DeadLetteringOnFilterEvaluationExceptions = true, DeadLetteringOnMessageExpiration = true, MaxDeliveryCount = 10, @@ -131,7 +142,7 @@ public CloudMachineInfrastructure(string cmId) Name = "cm_servicebus_default_topic", Parent = _serviceBusNamespace, MaxMessageSizeInKilobytes = 256, - DefaultMessageTimeToLive = new StringLiteral("P14D"), + DefaultMessageTimeToLive = TimeSpan.FromDays(14), RequiresDuplicateDetection = false, EnableBatchedOperations = true, SupportOrdering = true, @@ -142,9 +153,9 @@ public CloudMachineInfrastructure(string cmId) Name = "cm_servicebus_subscription_default", Parent = _serviceBusTopic_default, IsClientAffine = false, - LockDuration = new StringLiteral("PT30S"), + LockDuration = TimeSpan.FromSeconds(30), RequiresSession = false, - DefaultMessageTimeToLive = new StringLiteral("P14D"), + DefaultMessageTimeToLive = TimeSpan.FromDays(14), DeadLetteringOnFilterEvaluationExceptions = true, DeadLetteringOnMessageExpiration = true, MaxDeliveryCount = 10, @@ -160,6 +171,7 @@ public CloudMachineInfrastructure(string cmId) }; _eventGridSubscription_blobs = new("cm_eventgrid_subscription_blob", "2022-06-15") { + Name = "cm-eventgrid-subscription-blob", Parent = _eventGridTopic_blobs, DeliveryWithResourceIdentity = new DeliveryWithResourceIdentity { @@ -192,7 +204,7 @@ public CloudMachineInfrastructure(string cmId) }; } - public void AddResource(NamedProvisioningConstruct resource) + public void AddResource(NamedProvisionableConstruct resource) { _resources.Add(resource); } @@ -201,7 +213,7 @@ public void AddFeature(CloudMachineFeature resource) resource.AddTo(this); } - public ProvisioningPlan Build(ProvisioningContext? context = null) + public ProvisioningPlan Build(ProvisioningBuildOptions? context = null) { // Always add a default location parameter. // azd assumes there will be a location parameter for every module. @@ -230,12 +242,19 @@ public ProvisioningPlan Build(ProvisioningContext? context = null) _infrastructure.Add(_serviceBusSubscription_private); _infrastructure.Add(_serviceBusSubscription_default); - RoleAssignment roleAssignment = _serviceBusNamespace.CreateRoleAssignment(ServiceBusBuiltInRole.AzureServiceBusDataSender, RoleManagementPrincipalType.User, PrincipalIdParameter); + // This is necessary until SystemTopic adds an AssignRole method. + var role = ServiceBusBuiltInRole.AzureServiceBusDataSender; + RoleAssignment roleAssignment = new RoleAssignment("cm_servicebus_role"); + roleAssignment.Name = BicepFunction.CreateGuid(_serviceBusNamespace.Id, Identity.Id, BicepFunction.GetSubscriptionResourceId("Microsoft.Authorization/roleDefinitions", role.ToString())); + roleAssignment.Scope = new IdentifierExpression(_serviceBusNamespace.BicepIdentifier); + roleAssignment.PrincipalType = RoleManagementPrincipalType.ServicePrincipal; + roleAssignment.RoleDefinitionId = BicepFunction.GetSubscriptionResourceId("Microsoft.Authorization/roleDefinitions", role.ToString()); + roleAssignment.PrincipalId = Identity.PrincipalId; _infrastructure.Add(roleAssignment); // the role assignment must exist before the system topic event subscription is created. _eventGridSubscription_blobs.DependsOn.Add(roleAssignment); - _infrastructure.Add(_eventGridSubscription_blobs); + _infrastructure.Add(_eventGridTopic_blobs); // Placeholders for now. @@ -258,7 +277,7 @@ public static bool Configure(string[] args, Action? return false; } - string cmid = Azd.ReadOrCreateCmid(); + string cmid = AzdHelpers.ReadOrCreateCmid(); CloudMachineInfrastructure cmi = new(cmid); if (configure != default) @@ -267,7 +286,7 @@ public static bool Configure(string[] args, Action? } string infraDirectory = Path.Combine(".", "infra"); - Azd.Init(infraDirectory, cmi); + AzdHelpers.Init(infraDirectory, cmi); return true; } } diff --git a/sdk/provisioning/Azure.Provisioning.CloudMachine/src/Client/CloudMachine.cs b/sdk/provisioning/Azure.Provisioning.CloudMachine/src/Client/CloudMachine.cs deleted file mode 100644 index 87a3d1a54393..000000000000 --- a/sdk/provisioning/Azure.Provisioning.CloudMachine/src/Client/CloudMachine.cs +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.Collections.Generic; -using System.ComponentModel; -using Azure.Core; -using Azure.Identity; -using Microsoft.Extensions.Configuration; - -namespace Azure.CloudMachine; - -public partial class CloudMachineClient -{ - public string Id { get; } - - public TokenCredential Credential { get; } = new ChainedTokenCredential( - new AzureDeveloperCliCredential() - ); - - [System.Diagnostics.CodeAnalysis.SuppressMessage("Usage", "AZC0007:DO provide a minimal constructor that takes only the parameters required to connect to the service.", Justification = "")] - public CloudMachineClient(DefaultAzureCredential? credential = default, IConfiguration? configuration = default) - { - if (credential != default) - { - Credential = credential; - } - - string? cmid; - if (configuration == default) - { - cmid = Azd.ReadOrCreateCmid(); - } - else - { - cmid = configuration["CloudMachine:ID"]; - if (cmid == null) - throw new Exception("CloudMachine:ID configuration value missing"); - } - - Id = cmid!; - } - - protected CloudMachineClient() - { - Id = "CM"; - } - - [EditorBrowsable(EditorBrowsableState.Never)] - public ClientCache ClientCache { get; } = new ClientCache(); - - [EditorBrowsable(EditorBrowsableState.Never)] - public CloudMachineProperties Properties => new CloudMachineProperties(this); - - public struct CloudMachineProperties - { - private readonly CloudMachineClient _cm; - - internal CloudMachineProperties(CloudMachineClient cm) => _cm = cm; - public Uri DefaultContainerUri => new Uri($"https://{_cm.Id}.blob.core.windows.net/default"); - public Uri BlobServiceUri => new Uri($"https://{_cm.Id}.blob.core.windows.net/"); - public Uri KeyVaultUri => new Uri($"https://{_cm.Id}.vault.azure.net/"); - - public string ServiceBusNamespace => $"{_cm.Id}.servicebus.windows.net"; - } - - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object? obj) => base.Equals(obj); - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => base.GetHashCode(); - - [EditorBrowsable(EditorBrowsableState.Never)] - public override string ToString() => Id; -} diff --git a/sdk/provisioning/Azure.Provisioning.CloudMachine/src/Client/MessagingServices.cs b/sdk/provisioning/Azure.Provisioning.CloudMachine/src/Client/MessagingServices.cs deleted file mode 100644 index d7702dbf254c..000000000000 --- a/sdk/provisioning/Azure.Provisioning.CloudMachine/src/Client/MessagingServices.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using Azure.Messaging.ServiceBus; - -namespace Azure.CloudMachine; - -public static class MessagingServices -{ - [System.Diagnostics.CodeAnalysis.SuppressMessage("Usage", "AZC0107:DO NOT call public asynchronous method in synchronous scope.", Justification = "")] - public static void Send(this CloudMachineClient cm, object serializable) - { - ServiceBusSender sender = cm.ClientCache.Get("cm_default_topic_sender", () => - { - ServiceBusClient sb = cm.ClientCache.Get(cm.Properties.ServiceBusNamespace, () => - { - ServiceBusClient sb = new(cm.Properties.ServiceBusNamespace, cm.Credential); - return sb; - }); - - ServiceBusSender sender = sb.CreateSender("cm_default_topic_sender"); - return sender; - }); - - BinaryData serialized = BinaryData.FromObjectAsJson(serializable); - ServiceBusMessage message = new(serialized); -#pragma warning disable AZC0102 // Do not use GetAwaiter().GetResult(). - sender.SendMessageAsync(message).GetAwaiter().GetResult(); -#pragma warning restore AZC0102 // Do not use GetAwaiter().GetResult(). - } -} diff --git a/sdk/provisioning/Azure.Provisioning.CloudMachine/src/Client/StorageServices.cs b/sdk/provisioning/Azure.Provisioning.CloudMachine/src/Client/StorageServices.cs deleted file mode 100644 index 0899450718d2..000000000000 --- a/sdk/provisioning/Azure.Provisioning.CloudMachine/src/Client/StorageServices.cs +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using Azure.Storage.Blobs; -using Azure.Storage.Blobs.Models; - -namespace Azure.CloudMachine; - -public static class StorageServices -{ - public static string Upload(this CloudMachineClient cm, object json, string? name = default) - { - BlobContainerClient container = cm.ClientCache.Get(cm.Properties.DefaultContainerUri.AbsoluteUri, () => - { - BlobContainerClient container = new(cm.Properties.DefaultContainerUri, cm.Credential); - return container; - }); - - if (name == default) name = $"b{Guid.NewGuid()}"; - - container.UploadBlob(name, BinaryData.FromObjectAsJson(json)); - - return name; - } - - public static BinaryData Download(this CloudMachineClient cm, string name) - { - BlobContainerClient container = cm.ClientCache.Get(cm.Properties.DefaultContainerUri.AbsoluteUri, () => - { - BlobContainerClient container = new(cm.Properties.DefaultContainerUri, cm.Credential); - return container; - }); - - BlobClient blob = container.GetBlobClient(name); - BlobDownloadResult result = blob.DownloadContent(); - return result.Content; - } -} diff --git a/sdk/provisioning/Azure.Provisioning.CloudMachine/src/Client/ClientCache.cs b/sdk/provisioning/Azure.Provisioning.CloudMachine/src/Core/ClientCache.cs similarity index 63% rename from sdk/provisioning/Azure.Provisioning.CloudMachine/src/Client/ClientCache.cs rename to sdk/provisioning/Azure.Provisioning.CloudMachine/src/Core/ClientCache.cs index 11735b94c514..235fcba38d1d 100644 --- a/sdk/provisioning/Azure.Provisioning.CloudMachine/src/Client/ClientCache.cs +++ b/sdk/provisioning/Azure.Provisioning.CloudMachine/src/Core/ClientCache.cs @@ -4,22 +4,21 @@ using System; using System.Collections.Generic; -namespace Azure.CloudMachine; +namespace Azure.Core; // TODO: this is a very demo implementation. We need to do better public class ClientCache { - private readonly Dictionary _clients = new Dictionary(); + private readonly Dictionary<(Type, string?), object> _clients = new Dictionary<(Type, string?), object>(); - // TODO: consider uisng ICLientCreator instead of Func - public T Get(string id, Func value) where T: class + public T Get(Func value, string? id = default) where T: class { + var client = (typeof(T), id); lock (_clients) { - if (_clients.TryGetValue(id, out object cached)) + if (_clients.TryGetValue(client, out object cached)) { - T client = (T)cached; - return client; + return (T)cached; } if (_clients.Count > 100) @@ -27,7 +26,7 @@ public T Get(string id, Func value) where T: class GC(); } T created = value(); - _clients.Add(id, created); + _clients.Add(client, created); return created; } diff --git a/sdk/provisioning/Azure.Provisioning.CloudMachine/src/Core/ClientWorkspace.cs b/sdk/provisioning/Azure.Provisioning.CloudMachine/src/Core/ClientWorkspace.cs new file mode 100644 index 000000000000..a40d2d5aae1f --- /dev/null +++ b/sdk/provisioning/Azure.Provisioning.CloudMachine/src/Core/ClientWorkspace.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.ComponentModel; + +namespace Azure.Core; + +public abstract class ClientWorkspace +{ + public abstract ClientConnectionOptions GetConnectionOptions(Type clientType, string? instanceId = default); + + [EditorBrowsable(EditorBrowsableState.Never)] + public ClientCache Subclients { get; } = new ClientCache(); +} + +public readonly struct ClientConnectionOptions +{ + public ClientConnectionOptions(Uri endpoint, string apiKey) + { + Endpoint = endpoint; + ApiKeyCredential = apiKey; + ConnectionKind = ClientConnectionKind.ApiKey; + } + public ClientConnectionOptions(Uri endpoint, TokenCredential credential) + { + Endpoint = endpoint; + TokenCredential = credential; + ConnectionKind = ClientConnectionKind.EntraId; + } + public ClientConnectionOptions(string subclientId) + { + Id = subclientId; + ConnectionKind = ClientConnectionKind.OutOfBand; + } + + public ClientConnectionKind ConnectionKind { get; } + + public Uri? Endpoint { get; } + public string? Id { get; } + public string? ApiKeyCredential { get; } + public TokenCredential? TokenCredential { get; } +} + +public enum ClientConnectionKind +{ + EntraId, + ApiKey, + OutOfBand +} diff --git a/sdk/provisioning/Azure.Provisioning.CloudMachine/src/Core/LoggingPolicy.cs b/sdk/provisioning/Azure.Provisioning.CloudMachine/src/Core/LoggingPolicy.cs new file mode 100644 index 000000000000..fd05bf879bda --- /dev/null +++ b/sdk/provisioning/Azure.Provisioning.CloudMachine/src/Core/LoggingPolicy.cs @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.IO; +using System.Text; +using System.Threading.Tasks; + +namespace System.ClientModel; + +internal class LoggingPolicy : PipelinePolicy +{ + public LoggingPolicy() {} + + public List AllowedHeaders { get; } = new List(["Content-Type", "Accept", "User-Agent", "x-ms-client-request-id"]); + public override void Process(PipelineMessage message, IReadOnlyList pipeline, int currentIndex) + { + LogRequest(message); + if (currentIndex < pipeline.Count - 1) + { + pipeline[currentIndex + 1].Process(message, pipeline, currentIndex + 1); + } + } + + public override async ValueTask ProcessAsync(PipelineMessage message, IReadOnlyList pipeline, int currentIndex) + { + LogRequest(message); + if (currentIndex < pipeline.Count - 1) + { + await pipeline[currentIndex + 1].ProcessAsync(message, pipeline, currentIndex + 1).ConfigureAwait(false); + } + LogResponse(message); + } + + protected virtual void LogRequest(PipelineMessage message) + { + string logMessage = FormatRequestLog(message); + Console.WriteLine(logMessage); + } + protected virtual void LogResponse(PipelineMessage message) + { + string logMessage = FormatResponseLog(message); + Console.WriteLine(logMessage); + } + + protected virtual string FormatRequestLog(PipelineMessage message) { + StringBuilder logMessage = new StringBuilder(); + FormatRequestLine(message, logMessage); + FormatHeaders(message, logMessage); + FormatContent(message, logMessage); + return logMessage.ToString(); + } + protected virtual string FormatResponseLog(PipelineMessage message) + { + StringBuilder logMessage = new StringBuilder(); + PipelineResponse response = message.Response!; + logMessage.Append(response.Status.ToString()); + logMessage.Append(' '); + logMessage.AppendLine(response.ReasonPhrase); + FormatHeaders(message, logMessage); + FormatContent(message, logMessage); + return logMessage.ToString(); + } + + protected virtual void FormatRequestLine(PipelineMessage message, StringBuilder logMessage) + { + PipelineRequest request = message.Request; + logMessage.Append(request.Method); + logMessage.Append(' '); + logMessage.AppendLine(request.Uri!.AbsoluteUri); + } + protected virtual void FormatHeaders(PipelineMessage message, StringBuilder logMessage) + { + foreach (var header in message.Request.Headers) + { + if (AllowedHeaders.Contains(header.Key)) + { + logMessage.AppendLine($"{header.Key} : {header.Value}"); + } + else + { + logMessage.AppendLine($"{header.Key} : [REDACTED ...{header.Value.Length} characters]"); + } + } + } + protected virtual void FormatContent(PipelineMessage message, StringBuilder logMessage) + { + var stream = new MemoryStream(); + message.Request.Content!.WriteTo(stream); + stream.Position = 0; + var content = BinaryData.FromStream(stream); + logMessage.AppendLine(content.ToString()); + } +} diff --git a/sdk/provisioning/Azure.Provisioning.CloudMachine/src/GlobalSuppressions.cs b/sdk/provisioning/Azure.Provisioning.CloudMachine/src/GlobalSuppressions.cs new file mode 100644 index 000000000000..4416e7cc32ab --- /dev/null +++ b/sdk/provisioning/Azure.Provisioning.CloudMachine/src/GlobalSuppressions.cs @@ -0,0 +1,8 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.Diagnostics.CodeAnalysis; + +[assembly: SuppressMessage("Usage", "AZC0005:DO provide protected parameterless constructor for mocking.", Justification = "", Scope = "type", Target = "~T:Azure.CloudMachine.CloudMachineClient")] +[assembly: SuppressMessage("Usage", "AZC0007:DO provide a minimal constructor that takes only the parameters required to connect to the service.", Justification = "", Scope = "member", Target = "~M:Azure.CloudMachine.CloudMachineClient.#ctor(Azure.Identity.DefaultAzureCredential,Microsoft.Extensions.Configuration.IConfiguration)")] +[assembly: SuppressMessage("Usage", "AZC0007:DO provide a minimal constructor that takes only the parameters required to connect to the service.", Justification = "", Scope = "member", Target = "~M:Azure.CloudMachine.CloudMachineClient.#ctor(Azure.Core.TokenCredential,Microsoft.Extensions.Configuration.IConfiguration)")] diff --git a/sdk/provisioning/Azure.Provisioning.CloudMachine/src/KeyVaultFeature.cs b/sdk/provisioning/Azure.Provisioning.CloudMachine/src/KeyVaultFeature.cs deleted file mode 100644 index 0f79f8947999..000000000000 --- a/sdk/provisioning/Azure.Provisioning.CloudMachine/src/KeyVaultFeature.cs +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using Azure.CloudMachine; -using Azure.Provisioning.Authorization; -using Azure.Provisioning.Expressions; -using Azure.Provisioning.KeyVault; -using Azure.Security.KeyVault.Secrets; - -namespace Azure.Provisioning.CloudMachine.KeyVault; - -public class KeyVaultFeature : CloudMachineFeature -{ - public KeyVaultSku Sku { get; set; } = new KeyVaultSku { Name = KeyVaultSkuName.Standard, Family = KeyVaultSkuFamily.A, }; - - public override void AddTo(CloudMachineInfrastructure cm) - { - // Add a KeyVault to the CloudMachine infrastructure. - KeyVaultService _keyVault = new("cm_kv") - { - Name = cm.Id, - Properties = - new KeyVaultProperties - { - Sku = this.Sku, - TenantId = BicepFunction.GetSubscription().TenantId, - EnabledForDeployment = true, - AccessPolicies = [ - new KeyVaultAccessPolicy() { - ObjectId = cm.PrincipalIdParameter, - Permissions = new IdentityAccessPermissions() { - Secrets = [IdentityAccessSecretPermission.Get, IdentityAccessSecretPermission.Set] - }, - TenantId = cm.Identity.TenantId - } - ] - }, - }; - - cm.AddResource(_keyVault); - - RoleAssignment ra = _keyVault.CreateRoleAssignment(KeyVaultBuiltInRole.KeyVaultAdministrator, RoleManagementPrincipalType.User, cm.PrincipalIdParameter); - cm.AddResource(ra); - - // necessary until ResourceName is settable via AssignRole. - RoleAssignment kvMiRoleAssignment = new RoleAssignment(_keyVault.IdentifierName + "_" + cm.Identity.IdentifierName + "_" + KeyVaultBuiltInRole.GetBuiltInRoleName(KeyVaultBuiltInRole.KeyVaultAdministrator)); - kvMiRoleAssignment.Name = BicepFunction.CreateGuid(_keyVault.Id, cm.Identity.Id, BicepFunction.GetSubscriptionResourceId("Microsoft.Authorization/roleDefinitions", KeyVaultBuiltInRole.KeyVaultAdministrator.ToString())); - kvMiRoleAssignment.Scope = new IdentifierExpression(_keyVault.IdentifierName); - kvMiRoleAssignment.PrincipalType = RoleManagementPrincipalType.ServicePrincipal; - kvMiRoleAssignment.RoleDefinitionId = BicepFunction.GetSubscriptionResourceId("Microsoft.Authorization/roleDefinitions", KeyVaultBuiltInRole.KeyVaultAdministrator.ToString()); - kvMiRoleAssignment.PrincipalId = cm.Identity.PrincipalId; - cm.AddResource(kvMiRoleAssignment); - } -} - -public static class KeyVaultExtensions -{ - public static SecretClient GetKeyVaultSecretClient(this CloudMachineClient client) - { - return new(new($"https://{client.Id}.vault.azure.net/"), client.Credential); - } -} diff --git a/sdk/provisioning/Azure.Provisioning.CloudMachine/src/OFX/CloudMachineClient.cs b/sdk/provisioning/Azure.Provisioning.CloudMachine/src/OFX/CloudMachineClient.cs new file mode 100644 index 000000000000..a943c6cb82d6 --- /dev/null +++ b/sdk/provisioning/Azure.Provisioning.CloudMachine/src/OFX/CloudMachineClient.cs @@ -0,0 +1,18 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Core; +using Microsoft.Extensions.Configuration; + +namespace Azure.CloudMachine; + +public partial class CloudMachineClient : CloudMachineWorkspace +{ + public CloudMachineClient(TokenCredential? credential = default, IConfiguration? configuration = default) + : base(credential, configuration) + { + } + + public MessagingServices Messaging => new(this); + public StorageServices Storage => new(this); +} diff --git a/sdk/provisioning/Azure.Provisioning.CloudMachine/src/OFX/CloudMachineWorkspace.cs b/sdk/provisioning/Azure.Provisioning.CloudMachine/src/OFX/CloudMachineWorkspace.cs new file mode 100644 index 000000000000..c4505a5f5ca5 --- /dev/null +++ b/sdk/provisioning/Azure.Provisioning.CloudMachine/src/OFX/CloudMachineWorkspace.cs @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.ComponentModel; +using System.Diagnostics.CodeAnalysis; +using Azure.Core; +using Azure.Identity; +using Azure.Provisioning.CloudMachine; +using Microsoft.Extensions.Configuration; + +namespace Azure.CloudMachine; + +public class CloudMachineWorkspace : ClientWorkspace +{ + private TokenCredential Credential { get; } = new ChainedTokenCredential( + new AzureCliCredential(), + new AzureDeveloperCliCredential() + ); + + [EditorBrowsable(EditorBrowsableState.Never)] + public string Id { get; } + + [SuppressMessage("Usage", "AZC0007:DO provide a minimal constructor that takes only the parameters required to connect to the service.", Justification = "")] + public CloudMachineWorkspace(TokenCredential? credential = default, IConfiguration? configuration = default) + { + if (credential != default) + { + Credential = credential; + } + + string? cmid; + if (configuration == default) + { + cmid = AzdHelpers.ReadOrCreateCmid(); + } + else + { + cmid = configuration["CloudMachine:ID"]; + if (cmid == null) + throw new Exception("CloudMachine:ID configuration value missing"); + } + + Id = cmid!; + } + + [EditorBrowsable(EditorBrowsableState.Never)] + public override ClientConnectionOptions GetConnectionOptions(Type clientType, string? instanceId = default) + { + string clientId = clientType.FullName; + switch (clientId) + { + case "Azure.Security.KeyVault.Secrets.SecretClient": + return new ClientConnectionOptions(new($"https://{this.Id}.vault.azure.net/"), Credential); + case "Azure.Messaging.ServiceBus.ServiceBusClient": + return new ClientConnectionOptions(new($"https://{this.Id}.servicebus.windows.net"), Credential); + case "Azure.Messaging.ServiceBus.ServiceBusSender": + if (instanceId == default) instanceId = CloudMachineInfrastructure.SB_PRIVATE_TOPIC; + return new ClientConnectionOptions(instanceId); + case "Azure.Storage.Blobs.BlobContainerClient": + if (instanceId == default) instanceId = "default"; + return new ClientConnectionOptions(new($"https://{this.Id}.blob.core.windows.net/{instanceId}"), Credential); + case "Azure.AI.OpenAI.AzureOpenAIClient": + return new ClientConnectionOptions(new($"https://{this.Id}.openai.azure.com"), Credential); + case "OpenAI.Chat.ChatClient": + return new ClientConnectionOptions(Id); + default: + throw new Exception($"unknown client {clientId}"); + } + } + + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object? obj) => base.Equals(obj); + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => base.GetHashCode(); + [EditorBrowsable(EditorBrowsableState.Never)] + public override string ToString() => Id; +} diff --git a/sdk/provisioning/Azure.Provisioning.CloudMachine/src/OFX/MessagingServices.cs b/sdk/provisioning/Azure.Provisioning.CloudMachine/src/OFX/MessagingServices.cs new file mode 100644 index 000000000000..a67fd23f9961 --- /dev/null +++ b/sdk/provisioning/Azure.Provisioning.CloudMachine/src/OFX/MessagingServices.cs @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Messaging.ServiceBus; +using Azure.Provisioning.CloudMachine; + +namespace Azure.CloudMachine; + +public readonly struct MessagingServices +{ + private readonly CloudMachineClient _cm; + internal MessagingServices(CloudMachineClient cm) => _cm = cm; + + public void SendMessage(object serializable) + { + ServiceBusSender sender = GetServiceBusSender(); + + BinaryData serialized = BinaryData.FromObjectAsJson(serializable); + ServiceBusMessage message = new(serialized); +#pragma warning disable AZC0102 // Do not use GetAwaiter().GetResult(). + sender.SendMessageAsync(message).GetAwaiter().GetResult(); +#pragma warning restore AZC0102 // Do not use GetAwaiter().GetResult(). + } + + public void WhenMessageReceived(Action received) + { + var processor = _cm.Messaging.GetServiceBusProcessor(); + var cm = _cm; + + // TODO: How to unsubscribe? + // TODO: Use a subscription filter to ignore Event Grid system events + processor.ProcessMessageAsync += async (args) => + { + received(args.Message.Body.ToString()); + await args.CompleteMessageAsync(args.Message).ConfigureAwait(false); + await Task.CompletedTask.ConfigureAwait(false); + }; +#pragma warning disable AZC0102 // Do not use GetAwaiter().GetResult(). + processor.StartProcessingAsync().GetAwaiter().GetResult(); +#pragma warning restore AZC0102 // Do not use GetAwaiter().GetResult(). + } + + private ServiceBusClient GetServiceBusClient() + { + MessagingServices messagingServices = this; + ServiceBusClient client = _cm.Subclients.Get(() => messagingServices.CreateClient()); + return client; + } + + private ServiceBusSender GetServiceBusSender() + { + MessagingServices messagingServices = this; + ServiceBusSender sender = _cm.Subclients.Get(() => messagingServices.CreateSender()); + return sender; + } + + internal ServiceBusProcessor GetServiceBusProcessor() + { + MessagingServices messagingServices = this; + ServiceBusProcessor sender = _cm.Subclients.Get(() => messagingServices.CreateProcessor()); + return sender; + } + + private ServiceBusSender CreateSender() + { + ServiceBusClient client = GetServiceBusClient(); + + ClientConnectionOptions connection = _cm.GetConnectionOptions(typeof(ServiceBusClient)); + ServiceBusSender sender = client.CreateSender(connection.Id); + return sender; + } + private ServiceBusClient CreateClient() + { + ClientConnectionOptions connection = _cm.GetConnectionOptions(typeof(ServiceBusClient)); + ServiceBusClient client = new(connection.Endpoint!.AbsoluteUri, connection.TokenCredential); + return client; + } + private ServiceBusProcessor CreateProcessor() + { + ServiceBusClient client = GetServiceBusClient(); + + ClientConnectionOptions connection = _cm.GetConnectionOptions(typeof(ServiceBusSender)); + ServiceBusProcessor processor = client.CreateProcessor( + connection.Id, + CloudMachineInfrastructure.SB_PRIVATE_SUB, + new() { ReceiveMode = ServiceBusReceiveMode.PeekLock, MaxConcurrentCalls = 5 }); + processor.ProcessErrorAsync += (args) => throw new Exception("error processing event", args.Exception); + return processor; + } +} diff --git a/sdk/provisioning/Azure.Provisioning.CloudMachine/src/OFX/StorageFile.cs b/sdk/provisioning/Azure.Provisioning.CloudMachine/src/OFX/StorageFile.cs new file mode 100644 index 000000000000..95518bfe3e77 --- /dev/null +++ b/sdk/provisioning/Azure.Provisioning.CloudMachine/src/OFX/StorageFile.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.ComponentModel; +using System.Threading; + +namespace Azure.CloudMachine; + +public class StorageFile +{ + private readonly Response? _response; + + private StorageServices _storage; + public string Path { get; internal set; } + + /// + /// The requestId for the storage operation that triggered this event + /// + public string RequestId { get; internal set; } + + /// + /// + /// + /// + /// returns null if the file is not created as a return value of a service method call. + public static implicit operator Response?(StorageFile result) => result._response; + + public CancellationToken CancellationToken { get; internal set; } + + public BinaryData Download() + => _storage.DownloadBlob(Path); + + // public async Task DownloadAsync() + // => await _storage.DownloadBlobAsync(Path).ConfigureAwait(false); + + public void Delete() + => _storage.DeleteBlob(Path); + + // public async Task DeleteAsync() + // => await _storage.DeleteBlobAsync(Path).ConfigureAwait(false); + + // public Uri ShareFolder(AccessPermissions permissions, TimeSpan expiresAfter) + // => _storage.ShareFolder(Path, permissions, expiresAfter); + + // public Uri ShareFile(AccessPermissions permissions, TimeSpan expiresAfter) + // => _storage.ShareFile(Path, permissions, expiresAfter); + + internal StorageFile(StorageServices storage, string path, string requestId, Response? response = default) + { + _storage = storage; + Path = path; + RequestId = requestId; + _response = response; + } + + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => base.Equals(obj); + + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => base.GetHashCode(); + + [EditorBrowsable(EditorBrowsableState.Never)] + public override string ToString() => $"{Path}"; +} diff --git a/sdk/provisioning/Azure.Provisioning.CloudMachine/src/OFX/StorageServices.cs b/sdk/provisioning/Azure.Provisioning.CloudMachine/src/OFX/StorageServices.cs new file mode 100644 index 000000000000..8401003aba42 --- /dev/null +++ b/sdk/provisioning/Azure.Provisioning.CloudMachine/src/OFX/StorageServices.cs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.IO; +using System.Threading.Tasks; +using Azure.Messaging.EventGrid; +using Azure.Messaging.EventGrid.SystemEvents; +using Azure.Core; +using Azure.Storage.Blobs; +using Azure.Storage.Blobs.Models; + +namespace Azure.CloudMachine; + +public readonly struct StorageServices +{ + private readonly CloudMachineClient _cm; + internal StorageServices(CloudMachineClient cm) => _cm = cm; + + private BlobContainerClient GetDefaultContainer() + { + CloudMachineClient cm = _cm; + BlobContainerClient container = _cm.Subclients.Get(() => + { + ClientConnectionOptions connection = cm.GetConnectionOptions(typeof(BlobContainerClient)); + BlobContainerClient container = new(connection.Endpoint, connection.TokenCredential); + return container; + }); + return container; + } + + private BlobContainerClient GetContainer(string containerName) + { + string blobContainerClientId = typeof(BlobContainerClient).FullName; + CloudMachineClient cm = _cm; + BlobContainerClient container = cm.Subclients.Get(() => + { + ClientConnectionOptions connection = cm.GetConnectionOptions(typeof(BlobContainerClient), containerName); + BlobContainerClient container = new(connection.Endpoint, connection.TokenCredential); + return container; + }); + return container; + } + + public string UploadBlob(object json, string? name = default) + { + BlobContainerClient container = GetDefaultContainer(); + + if (name == default) + name = $"b{Guid.NewGuid()}"; + + container.UploadBlob(name, BinaryData.FromObjectAsJson(json)); + + return name; + } + + public BinaryData DownloadBlob(string path) + { + BlobClient blob = GetBlobClientFromPath(path, null); + BlobDownloadResult result = blob.DownloadContent(); + return result.Content; + } + + public void DeleteBlob(string path) + { + BlobClient blob = GetBlobClientFromPath(path, null); + blob.DeleteIfExists(); + } + + private BlobClient GetBlobClientFromPath(string path, string? containerName) + { + var _blobContainer = GetDefaultContainer(); + var blobPath = ConvertPathToBlobPath(path, _blobContainer); + if (containerName is null) + { + return _blobContainer.GetBlobClient(blobPath); + } + else + { + var container = GetContainer(containerName); + container.CreateIfNotExists(); + return container.GetBlobClient(blobPath); + } + } + + private static string ConvertPathToBlobPath(string path, BlobContainerClient container) + { + if (Uri.TryCreate(path, UriKind.Absolute, out Uri blobUri)) + { + if (blobUri.Host == container.Uri.Host) + return blobUri.AbsoluteUri.Substring(container.Uri.AbsoluteUri.Length); + if (!string.IsNullOrEmpty(blobUri.LocalPath)) + { + return blobUri.LocalPath.Substring(Path.GetPathRoot(path).Length).Replace('\\', '/'); + } + } + return path.Substring(Path.GetPathRoot(path).Length).Replace('\\', '/'); + } + + public void WhenBlobUploaded(Action function) + { + var processor = _cm.Messaging.GetServiceBusProcessor(); + var cm = _cm; + + // TODO: How to unsubscribe? + processor.ProcessMessageAsync += async (args) => + { + EventGridEvent e = EventGridEvent.Parse(args.Message.Body); + if (e.TryGetSystemEventData(out object systemEvent)) + { + switch (systemEvent) + { + case StorageBlobCreatedEventData bc: + var blobUri = bc.Url; + var requestId = bc.ClientRequestId; + // _logger.Log.EventReceived(nameof(OnProcessMessage), $"StorageBlobCreatedEventData: blobUri='{blobUri}' requestId='{requestId}'"); + + var eventArgs = new StorageFile(cm.Storage, blobUri, requestId, default); + function(eventArgs); + await args.CompleteMessageAsync(args.Message).ConfigureAwait(false); + break; + default: + break; + } + } + await Task.CompletedTask.ConfigureAwait(false); + }; +#pragma warning disable AZC0102 // Do not use GetAwaiter().GetResult(). + processor.StartProcessingAsync().GetAwaiter().GetResult(); +#pragma warning restore AZC0102 // Do not use GetAwaiter().GetResult(). + + } +} diff --git a/sdk/provisioning/Azure.Provisioning.CloudMachine/src/OpenAIFeature.cs b/sdk/provisioning/Azure.Provisioning.CloudMachine/src/OpenAIFeature.cs deleted file mode 100644 index c56476ba98a9..000000000000 --- a/sdk/provisioning/Azure.Provisioning.CloudMachine/src/OpenAIFeature.cs +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using Azure.CloudMachine; -using Azure.Security.KeyVault.Secrets; - -namespace Azure.Provisioning.CloudMachine.OpenAI; - -public class OpenAIFeature : CloudMachineFeature -{ - public override void AddTo(CloudMachineInfrastructure cm) - { - throw new NotImplementedException(); - } -} - -public static class OpenAIFeatureExtensions -{ - public static SecretClient GetOpenAIClient(this CloudMachineClient client) - { - throw new NotImplementedException(); - //return new(new($"https://{client.Id}.vault.azure.net/"), client.Credential); - } -} diff --git a/sdk/provisioning/Azure.Provisioning.CloudMachine/tests/CloudMachineTests.cs b/sdk/provisioning/Azure.Provisioning.CloudMachine/tests/CloudMachineTests.cs index 0bcee4f59186..ef59450392d4 100644 --- a/sdk/provisioning/Azure.Provisioning.CloudMachine/tests/CloudMachineTests.cs +++ b/sdk/provisioning/Azure.Provisioning.CloudMachine/tests/CloudMachineTests.cs @@ -4,10 +4,13 @@ #nullable enable using System; +using System.Threading; using Azure.Provisioning.CloudMachine; using Azure.Provisioning.CloudMachine.KeyVault; +using Azure.Provisioning.CloudMachine.OpenAI; using Azure.Security.KeyVault.Secrets; using NUnit.Framework; +using OpenAI.Chat; namespace Azure.CloudMachine.Tests; @@ -16,16 +19,16 @@ public class CloudMachineTests [Theory] [TestCase([new string[] { "--init" }])] [TestCase([new string[] { "" }])] - public void Configure(string[] args) + public void Provisioning(string[] args) { - if (CloudMachineInfrastructure.Configure(args, (cm) => { - cm.AddFeature(new KeyVaultFeature() - { - //Sku = new KeyVaultSku { Name = KeyVaultSkuName.Premium, Family = KeyVaultSkuFamily.A, } - }); - })) return; + if (CloudMachineInfrastructure.Configure(args, (cm) => + { + cm.AddFeature(new KeyVaultFeature()); + cm.AddFeature(new OpenAIFeature("gpt-35-turbo", "0125")); + })) + return; - CloudMachineClient cm = new(); + CloudMachineWorkspace cm = new(); Console.WriteLine(cm.Id); } @@ -33,18 +36,70 @@ public void Configure(string[] args) [Theory] [TestCase([new string[] { "--init" }])] [TestCase([new string[] { "" }])] - public void KeyVault(string[] args) + public void Storage(string[] args) { + ManualResetEventSlim eventSlim = new(false); if (CloudMachineInfrastructure.Configure(args, (cm) => { - cm.AddFeature(new KeyVaultFeature() - { - //Sku = new KeyVaultSku { Name = KeyVaultSkuName.Premium, Family = KeyVaultSkuFamily.A, } - }); - })) return; + })) + return; CloudMachineClient cm = new(); - SecretClient secrets = cm.GetKeyVaultSecretClient(); + + cm.Storage.WhenBlobUploaded((StorageFile file) => + { + var data = file.Download(); + Console.WriteLine(data.ToString()); + Assert.AreEqual("{\"Foo\":5,\"Bar\":true}", data.ToString()); + eventSlim.Set(); + }); + var uploaded = cm.Storage.UploadBlob(new + { + Foo = 5, + Bar = true + }); + BinaryData downloaded = cm.Storage.DownloadBlob(uploaded); + Console.WriteLine(downloaded.ToString()); + eventSlim.Wait(); + } + + [Ignore("no recordings yet")] + [Theory] + [TestCase([new string[] { "--init" }])] + [TestCase([new string[] { "" }])] + public void OpenAI(string[] args) + { + if (CloudMachineInfrastructure.Configure(args, (cm) => + { + cm.AddFeature(new OpenAIFeature("gpt-35-turbo", "0125")); + })) + return; + + CloudMachineWorkspace cm = new(); + ChatClient chat = cm.GetOpenAIChatClient(); + ChatCompletion completion = chat.CompleteChat("Is Azure programming easy?"); + + ChatMessageContent content = completion.Content; + foreach (ChatMessageContentPart part in content) + { + Console.WriteLine(part.Text); + } + } + + [Ignore("no recordings yet")] + [Theory] + [TestCase([new string[] { "--init" }])] + [TestCase([new string[] { "" }])] + public void KeyVault(string[] args) + { + if (CloudMachineInfrastructure.Configure(args, (cm) => + { + cm.AddFeature(new KeyVaultFeature()); + })) + return; + + CloudMachineWorkspace cm = new(); + SecretClient secrets = cm.GetKeyVaultSecretsClient(); secrets.SetSecret("testsecret", "don't tell anybody"); } @@ -52,34 +107,45 @@ public void KeyVault(string[] args) [Theory] [TestCase([new string[] { "--init" }])] [TestCase([new string[] { "" }])] - public void Storage(string[] args) + public void Messaging(string[] args) { - if (CloudMachineInfrastructure.Configure(args, (cm) => { - })) return; + if (CloudMachineInfrastructure.Configure(args)) + return; CloudMachineClient cm = new(); - var uploaded = cm.Upload(new + cm.Messaging.WhenMessageReceived(message => + { + Console.WriteLine(message); + Assert.True(message != null); + }); + cm.Messaging.SendMessage(new { Foo = 5, Bar = true }); - BinaryData downloaded = cm.Download(uploaded); } [Ignore("no recordings yet")] [Theory] [TestCase([new string[] { "--init" }])] [TestCase([new string[] { "" }])] - public void Messaging(string[] args) + public void Demo(string[] args) { - if (CloudMachineInfrastructure.Configure(args, (cm) => { - })) return; + if (CloudMachineInfrastructure.Configure(args)) + return; CloudMachineClient cm = new(); - cm.Send(new + + // setup + cm.Messaging.WhenMessageReceived((string message) => cm.Storage.UploadBlob(message)); + cm.Storage.WhenBlobUploaded((StorageFile file) => { - Foo = 5, - Bar = true + var content = file.Download(); + ChatCompletion completion = cm.GetOpenAIChatClient().CompleteChat(content.ToString()); + Console.WriteLine(completion.Content[0].Text); }); + + // go! + cm.Messaging.SendMessage("Tell me something about Redmond, WA."); } } diff --git a/sdk/provisioning/Azure.Provisioning.CognitiveServices/api/Azure.Provisioning.CognitiveServices.netstandard2.0.cs b/sdk/provisioning/Azure.Provisioning.CognitiveServices/api/Azure.Provisioning.CognitiveServices.netstandard2.0.cs index ee03c021da21..4f2e17a75181 100644 --- a/sdk/provisioning/Azure.Provisioning.CognitiveServices/api/Azure.Provisioning.CognitiveServices.netstandard2.0.cs +++ b/sdk/provisioning/Azure.Provisioning.CognitiveServices/api/Azure.Provisioning.CognitiveServices.netstandard2.0.cs @@ -1,6 +1,6 @@ namespace Azure.Provisioning.CognitiveServices { - public partial class AbusePenalty : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class AbusePenalty : Azure.Provisioning.Primitives.ProvisionableConstruct { public AbusePenalty() { } public Azure.Provisioning.BicepValue Action { get { throw null; } } @@ -12,9 +12,9 @@ public enum AbusePenaltyAction Throttle = 0, Block = 1, } - public partial class CognitiveServicesAccount : Azure.Provisioning.Primitives.Resource + public partial class CognitiveServicesAccount : Azure.Provisioning.Primitives.ProvisionableResource { - public CognitiveServicesAccount(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public CognitiveServicesAccount(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue ETag { get { throw null; } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Identity { get { throw null; } set { } } @@ -25,9 +25,9 @@ public partial class CognitiveServicesAccount : Azure.Provisioning.Primitives.Re public Azure.Provisioning.BicepValue Sku { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } - public Azure.Provisioning.Authorization.RoleAssignment CreateRoleAssignment(Azure.Provisioning.CognitiveServices.CognitiveServicesBuiltInRole role, Azure.Provisioning.BicepValue principalType, Azure.Provisioning.BicepValue principalId, string? identifierNameSuffix = null) { throw null; } + public Azure.Provisioning.Authorization.RoleAssignment CreateRoleAssignment(Azure.Provisioning.CognitiveServices.CognitiveServicesBuiltInRole role, Azure.Provisioning.BicepValue principalType, Azure.Provisioning.BicepValue principalId, string? bicepIdentifierSuffix = null) { throw null; } public Azure.Provisioning.Authorization.RoleAssignment CreateRoleAssignment(Azure.Provisioning.CognitiveServices.CognitiveServicesBuiltInRole role, Azure.Provisioning.Roles.UserAssignedIdentity identity) { throw null; } - public static Azure.Provisioning.CognitiveServices.CognitiveServicesAccount FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.CognitiveServices.CognitiveServicesAccount FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public Azure.Provisioning.CognitiveServices.ServiceAccountApiKeys GetKeys() { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override Azure.Provisioning.Primitives.ResourceNameRequirements GetResourceNameRequirements() { throw null; } @@ -43,9 +43,9 @@ public static partial class ResourceVersions public static readonly string V2024_10_01; } } - public partial class CognitiveServicesAccountDeployment : Azure.Provisioning.Primitives.Resource + public partial class CognitiveServicesAccountDeployment : Azure.Provisioning.Primitives.ProvisionableResource { - public CognitiveServicesAccountDeployment(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public CognitiveServicesAccountDeployment(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue ETag { get { throw null; } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } @@ -53,7 +53,7 @@ public partial class CognitiveServicesAccountDeployment : Azure.Provisioning.Pri public Azure.Provisioning.BicepValue Properties { get { throw null; } set { } } public Azure.Provisioning.BicepValue Sku { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.CognitiveServices.CognitiveServicesAccountDeployment FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.CognitiveServices.CognitiveServicesAccountDeployment FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2017_04_18; @@ -66,7 +66,7 @@ public static partial class ResourceVersions public static readonly string V2024_10_01; } } - public partial class CognitiveServicesAccountDeploymentModel : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class CognitiveServicesAccountDeploymentModel : Azure.Provisioning.Primitives.ProvisionableConstruct { public CognitiveServicesAccountDeploymentModel() { } public Azure.Provisioning.BicepValue CallRateLimit { get { throw null; } } @@ -75,7 +75,7 @@ public CognitiveServicesAccountDeploymentModel() { } public Azure.Provisioning.BicepValue Source { get { throw null; } set { } } public Azure.Provisioning.BicepValue Version { get { throw null; } set { } } } - public partial class CognitiveServicesAccountDeploymentProperties : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class CognitiveServicesAccountDeploymentProperties : Azure.Provisioning.Primitives.ProvisionableConstruct { public CognitiveServicesAccountDeploymentProperties() { } public Azure.Provisioning.BicepValue CallRateLimit { get { throw null; } } @@ -98,7 +98,7 @@ public enum CognitiveServicesAccountDeploymentProvisioningState Disabled = 6, Canceled = 7, } - public partial class CognitiveServicesAccountDeploymentScaleSettings : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class CognitiveServicesAccountDeploymentScaleSettings : Azure.Provisioning.Primitives.ProvisionableConstruct { public CognitiveServicesAccountDeploymentScaleSettings() { } public Azure.Provisioning.BicepValue ActiveCapacity { get { throw null; } } @@ -123,7 +123,7 @@ public CognitiveServicesAccountModel() { } public Azure.Provisioning.BicepList Skus { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } } - public partial class CognitiveServicesAccountProperties : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class CognitiveServicesAccountProperties : Azure.Provisioning.Primitives.ProvisionableConstruct { public CognitiveServicesAccountProperties() { } public Azure.Provisioning.BicepValue AbusePenalty { get { throw null; } } @@ -190,7 +190,7 @@ public CognitiveServicesAccountProperties() { } public static bool operator !=(Azure.Provisioning.CognitiveServices.CognitiveServicesBuiltInRole left, Azure.Provisioning.CognitiveServices.CognitiveServicesBuiltInRole right) { throw null; } public override string ToString() { throw null; } } - public partial class CognitiveServicesCapacityConfig : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class CognitiveServicesCapacityConfig : Azure.Provisioning.Primitives.ProvisionableConstruct { public CognitiveServicesCapacityConfig() { } public Azure.Provisioning.BicepValue Default { get { throw null; } set { } } @@ -198,9 +198,9 @@ public CognitiveServicesCapacityConfig() { } public Azure.Provisioning.BicepValue Minimum { get { throw null; } set { } } public Azure.Provisioning.BicepValue Step { get { throw null; } set { } } } - public partial class CognitiveServicesCommitmentPlan : Azure.Provisioning.Primitives.Resource + public partial class CognitiveServicesCommitmentPlan : Azure.Provisioning.Primitives.ProvisionableResource { - public CognitiveServicesCommitmentPlan(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public CognitiveServicesCommitmentPlan(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue ETag { get { throw null; } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Kind { get { throw null; } set { } } @@ -210,7 +210,7 @@ public partial class CognitiveServicesCommitmentPlan : Azure.Provisioning.Primit public Azure.Provisioning.BicepValue Sku { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } - public static Azure.Provisioning.CognitiveServices.CognitiveServicesCommitmentPlan FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.CognitiveServices.CognitiveServicesCommitmentPlan FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2022_12_01; @@ -218,12 +218,12 @@ public static partial class ResourceVersions public static readonly string V2024_10_01; } } - public partial class CognitiveServicesIPRule : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class CognitiveServicesIPRule : Azure.Provisioning.Primitives.ProvisionableConstruct { public CognitiveServicesIPRule() { } public Azure.Provisioning.BicepValue Value { get { throw null; } set { } } } - public partial class CognitiveServicesKeyVaultProperties : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class CognitiveServicesKeyVaultProperties : Azure.Provisioning.Primitives.ProvisionableConstruct { public CognitiveServicesKeyVaultProperties() { } public Azure.Provisioning.BicepValue IdentityClientId { get { throw null; } set { } } @@ -231,7 +231,7 @@ public CognitiveServicesKeyVaultProperties() { } public Azure.Provisioning.BicepValue KeyVaultUri { get { throw null; } set { } } public Azure.Provisioning.BicepValue KeyVersion { get { throw null; } set { } } } - public partial class CognitiveServicesModelSku : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class CognitiveServicesModelSku : Azure.Provisioning.Primitives.ProvisionableConstruct { public CognitiveServicesModelSku() { } public Azure.Provisioning.BicepValue Capacity { get { throw null; } set { } } @@ -240,7 +240,7 @@ public CognitiveServicesModelSku() { } public Azure.Provisioning.BicepList RateLimits { get { throw null; } } public Azure.Provisioning.BicepValue UsageName { get { throw null; } set { } } } - public partial class CognitiveServicesMultiRegionSettings : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class CognitiveServicesMultiRegionSettings : Azure.Provisioning.Primitives.ProvisionableConstruct { public CognitiveServicesMultiRegionSettings() { } public Azure.Provisioning.BicepList Regions { get { throw null; } set { } } @@ -251,14 +251,14 @@ public enum CognitiveServicesNetworkRuleAction Allow = 0, Deny = 1, } - public partial class CognitiveServicesNetworkRuleSet : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class CognitiveServicesNetworkRuleSet : Azure.Provisioning.Primitives.ProvisionableConstruct { public CognitiveServicesNetworkRuleSet() { } public Azure.Provisioning.BicepValue DefaultAction { get { throw null; } set { } } public Azure.Provisioning.BicepList IPRules { get { throw null; } set { } } public Azure.Provisioning.BicepList VirtualNetworkRules { get { throw null; } set { } } } - public partial class CognitiveServicesPrivateEndpointConnectionData : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class CognitiveServicesPrivateEndpointConnectionData : Azure.Provisioning.Primitives.ProvisionableConstruct { public CognitiveServicesPrivateEndpointConnectionData() { } public Azure.Provisioning.BicepValue ConnectionState { get { throw null; } set { } } @@ -284,14 +284,14 @@ public enum CognitiveServicesPrivateEndpointServiceConnectionStatus Approved = 1, Rejected = 2, } - public partial class CognitiveServicesPrivateLinkServiceConnectionState : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class CognitiveServicesPrivateLinkServiceConnectionState : Azure.Provisioning.Primitives.ProvisionableConstruct { public CognitiveServicesPrivateLinkServiceConnectionState() { } public Azure.Provisioning.BicepValue ActionsRequired { get { throw null; } set { } } public Azure.Provisioning.BicepValue Description { get { throw null; } set { } } public Azure.Provisioning.BicepValue Status { get { throw null; } set { } } } - public partial class CognitiveServicesRegionSetting : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class CognitiveServicesRegionSetting : Azure.Provisioning.Primitives.ProvisionableConstruct { public CognitiveServicesRegionSetting() { } public Azure.Provisioning.BicepValue Customsubdomain { get { throw null; } set { } } @@ -304,7 +304,7 @@ public enum CognitiveServicesRoutingMethod Weighted = 1, Performance = 2, } - public partial class CognitiveServicesSku : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class CognitiveServicesSku : Azure.Provisioning.Primitives.ProvisionableConstruct { public CognitiveServicesSku() { } public Azure.Provisioning.BicepValue Capacity { get { throw null; } set { } } @@ -313,13 +313,13 @@ public CognitiveServicesSku() { } public Azure.Provisioning.BicepValue Size { get { throw null; } set { } } public Azure.Provisioning.BicepValue Tier { get { throw null; } set { } } } - public partial class CognitiveServicesSkuCapability : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class CognitiveServicesSkuCapability : Azure.Provisioning.Primitives.ProvisionableConstruct { public CognitiveServicesSkuCapability() { } public Azure.Provisioning.BicepValue Name { get { throw null; } } public Azure.Provisioning.BicepValue Value { get { throw null; } } } - public partial class CognitiveServicesSkuChangeInfo : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class CognitiveServicesSkuChangeInfo : Azure.Provisioning.Primitives.ProvisionableConstruct { public CognitiveServicesSkuChangeInfo() { } public Azure.Provisioning.BicepValue CountOfDowngrades { get { throw null; } } @@ -334,14 +334,14 @@ public enum CognitiveServicesSkuTier Premium = 3, Enterprise = 4, } - public partial class CognitiveServicesVirtualNetworkRule : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class CognitiveServicesVirtualNetworkRule : Azure.Provisioning.Primitives.ProvisionableConstruct { public CognitiveServicesVirtualNetworkRule() { } public Azure.Provisioning.BicepValue Id { get { throw null; } set { } } public Azure.Provisioning.BicepValue IgnoreMissingVnetServiceEndpoint { get { throw null; } set { } } public Azure.Provisioning.BicepValue State { get { throw null; } set { } } } - public partial class CommitmentPeriod : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class CommitmentPeriod : Azure.Provisioning.Primitives.ProvisionableConstruct { public CommitmentPeriod() { } public Azure.Provisioning.BicepValue Count { get { throw null; } set { } } @@ -350,9 +350,9 @@ public CommitmentPeriod() { } public Azure.Provisioning.BicepValue StartOn { get { throw null; } } public Azure.Provisioning.BicepValue Tier { get { throw null; } set { } } } - public partial class CommitmentPlan : Azure.Provisioning.Primitives.Resource + public partial class CommitmentPlan : Azure.Provisioning.Primitives.ProvisionableResource { - public CommitmentPlan(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public CommitmentPlan(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue ETag { get { throw null; } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Kind { get { throw null; } set { } } @@ -363,7 +363,7 @@ public partial class CommitmentPlan : Azure.Provisioning.Primitives.Resource public Azure.Provisioning.BicepValue Sku { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } - public static Azure.Provisioning.CognitiveServices.CommitmentPlan FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.CognitiveServices.CommitmentPlan FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2017_04_18; @@ -376,16 +376,16 @@ public static partial class ResourceVersions public static readonly string V2024_10_01; } } - public partial class CommitmentPlanAccountAssociation : Azure.Provisioning.Primitives.Resource + public partial class CommitmentPlanAccountAssociation : Azure.Provisioning.Primitives.ProvisionableResource { - public CommitmentPlanAccountAssociation(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public CommitmentPlanAccountAssociation(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue AccountId { get { throw null; } set { } } public Azure.Provisioning.BicepValue ETag { get { throw null; } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } public Azure.Provisioning.CognitiveServices.CognitiveServicesCommitmentPlan? Parent { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.CognitiveServices.CommitmentPlanAccountAssociation FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.CognitiveServices.CommitmentPlanAccountAssociation FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2022_12_01; @@ -393,13 +393,13 @@ public static partial class ResourceVersions public static readonly string V2024_10_01; } } - public partial class CommitmentPlanAssociation : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class CommitmentPlanAssociation : Azure.Provisioning.Primitives.ProvisionableConstruct { public CommitmentPlanAssociation() { } public Azure.Provisioning.BicepValue CommitmentPlanId { get { throw null; } } public Azure.Provisioning.BicepValue CommitmentPlanLocation { get { throw null; } } } - public partial class CommitmentPlanProperties : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class CommitmentPlanProperties : Azure.Provisioning.Primitives.ProvisionableConstruct { public CommitmentPlanProperties() { } public Azure.Provisioning.BicepValue AutoRenew { get { throw null; } set { } } @@ -422,7 +422,7 @@ public enum CommitmentPlanProvisioningState Succeeded = 5, Canceled = 6, } - public partial class CommitmentQuota : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class CommitmentQuota : Azure.Provisioning.Primitives.ProvisionableConstruct { public CommitmentQuota() { } public Azure.Provisioning.BicepValue Quantity { get { throw null; } } @@ -439,15 +439,15 @@ public enum ModelLifecycleStatus GenerallyAvailable = 0, Preview = 1, } - public partial class ServiceAccountApiKeys : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ServiceAccountApiKeys : Azure.Provisioning.Primitives.ProvisionableConstruct { public ServiceAccountApiKeys() { } public Azure.Provisioning.BicepValue Key1 { get { throw null; } } public Azure.Provisioning.BicepValue Key2 { get { throw null; } } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public static Azure.Provisioning.CognitiveServices.ServiceAccountApiKeys FromExpression(Azure.Provisioning.Expressions.Expression expression) { throw null; } + public static Azure.Provisioning.CognitiveServices.ServiceAccountApiKeys FromExpression(Azure.Provisioning.Expressions.BicepExpression expression) { throw null; } } - public partial class ServiceAccountApiProperties : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ServiceAccountApiProperties : Azure.Provisioning.Primitives.ProvisionableConstruct { public ServiceAccountApiProperties() { } public Azure.Provisioning.BicepValue AadClientId { get { throw null; } set { } } @@ -462,7 +462,7 @@ public ServiceAccountApiProperties() { } public Azure.Provisioning.BicepValue SuperUser { get { throw null; } set { } } public Azure.Provisioning.BicepValue WebsiteName { get { throw null; } set { } } } - public partial class ServiceAccountCallRateLimit : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ServiceAccountCallRateLimit : Azure.Provisioning.Primitives.ProvisionableConstruct { public ServiceAccountCallRateLimit() { } public Azure.Provisioning.BicepValue Count { get { throw null; } } @@ -476,7 +476,7 @@ public enum ServiceAccountEncryptionKeySource [System.Runtime.Serialization.DataMemberAttribute(Name="Microsoft.KeyVault")] MicrosoftKeyVault = 1, } - public partial class ServiceAccountEncryptionProperties : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ServiceAccountEncryptionProperties : Azure.Provisioning.Primitives.ProvisionableConstruct { public ServiceAccountEncryptionProperties() { } public Azure.Provisioning.BicepValue KeySource { get { throw null; } set { } } @@ -489,7 +489,7 @@ public enum ServiceAccountHostingModel DisconnectedContainer = 2, ProvisionedWeb = 3, } - public partial class ServiceAccountModelDeprecationInfo : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ServiceAccountModelDeprecationInfo : Azure.Provisioning.Primitives.ProvisionableConstruct { public ServiceAccountModelDeprecationInfo() { } public Azure.Provisioning.BicepValue FineTuneOn { get { throw null; } set { } } @@ -511,20 +511,20 @@ public enum ServiceAccountPublicNetworkAccess Enabled = 0, Disabled = 1, } - public partial class ServiceAccountQuotaLimit : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ServiceAccountQuotaLimit : Azure.Provisioning.Primitives.ProvisionableConstruct { public ServiceAccountQuotaLimit() { } public Azure.Provisioning.BicepValue Count { get { throw null; } } public Azure.Provisioning.BicepValue RenewalPeriod { get { throw null; } } public Azure.Provisioning.BicepList Rules { get { throw null; } } } - public partial class ServiceAccountThrottlingMatchPattern : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ServiceAccountThrottlingMatchPattern : Azure.Provisioning.Primitives.ProvisionableConstruct { public ServiceAccountThrottlingMatchPattern() { } public Azure.Provisioning.BicepValue Method { get { throw null; } } public Azure.Provisioning.BicepValue Path { get { throw null; } } } - public partial class ServiceAccountThrottlingRule : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ServiceAccountThrottlingRule : Azure.Provisioning.Primitives.ProvisionableConstruct { public ServiceAccountThrottlingRule() { } public Azure.Provisioning.BicepValue Count { get { throw null; } } @@ -534,7 +534,7 @@ public ServiceAccountThrottlingRule() { } public Azure.Provisioning.BicepValue MinCount { get { throw null; } } public Azure.Provisioning.BicepValue RenewalPeriod { get { throw null; } } } - public partial class ServiceAccountUserOwnedStorage : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ServiceAccountUserOwnedStorage : Azure.Provisioning.Primitives.ProvisionableConstruct { public ServiceAccountUserOwnedStorage() { } public Azure.Provisioning.BicepValue IdentityClientId { get { throw null; } set { } } diff --git a/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/CognitiveServicesAccount.cs b/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/CognitiveServicesAccount.cs index ab29989a14bd..8e9134de6545 100644 --- a/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/CognitiveServicesAccount.cs +++ b/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/CognitiveServicesAccount.cs @@ -21,7 +21,7 @@ namespace Azure.Provisioning.CognitiveServices; /// /// CognitiveServicesAccount. /// -public partial class CognitiveServicesAccount : Resource +public partial class CognitiveServicesAccount : ProvisionableResource { /// /// The name of Cognitive Services account. @@ -86,15 +86,15 @@ public partial class CognitiveServicesAccount : Resource /// /// Creates a new CognitiveServicesAccount. /// - /// + /// /// The the Bicep identifier name of the CognitiveServicesAccount resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, /// numbers, and underscores. /// /// Version of the CognitiveServicesAccount. - public CognitiveServicesAccount(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.CognitiveServices/accounts", resourceVersion ?? "2024-10-01") + public CognitiveServicesAccount(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.CognitiveServices/accounts", resourceVersion ?? "2024-10-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _location = BicepValue.DefineProperty(this, "Location", ["location"], isRequired: true); @@ -157,7 +157,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing CognitiveServicesAccount. /// - /// + /// /// The the Bicep identifier name of the CognitiveServicesAccount resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, @@ -165,8 +165,8 @@ public static class ResourceVersions /// /// Version of the CognitiveServicesAccount. /// The existing CognitiveServicesAccount resource. - public static CognitiveServicesAccount FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static CognitiveServicesAccount FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; /// /// Get the requirements for naming this CognitiveServicesAccount resource. @@ -182,7 +182,7 @@ public override ResourceNameRequirements GetResourceNameRequirements() => /// The keys for this CognitiveServicesAccount resource. public ServiceAccountApiKeys GetKeys() => ServiceAccountApiKeys.FromExpression( - new FunctionCallExpression(new MemberExpression(new IdentifierExpression(IdentifierName), "listKeys"))); + new FunctionCallExpression(new MemberExpression(new IdentifierExpression(BicepIdentifier), "listKeys"))); /// /// Creates a role assignment for a user-assigned identity that grants @@ -192,10 +192,10 @@ public ServiceAccountApiKeys GetKeys() => /// The . /// The . public RoleAssignment CreateRoleAssignment(CognitiveServicesBuiltInRole role, UserAssignedIdentity identity) => - new($"{IdentifierName}_{identity.IdentifierName}_{CognitiveServicesBuiltInRole.GetBuiltInRoleName(role)}") + new($"{BicepIdentifier}_{identity.BicepIdentifier}_{CognitiveServicesBuiltInRole.GetBuiltInRoleName(role)}") { Name = BicepFunction.CreateGuid(Id, identity.PrincipalId, BicepFunction.GetSubscriptionResourceId("Microsoft.Authorization/roleDefinitions", role.ToString())), - Scope = new IdentifierExpression(IdentifierName), + Scope = new IdentifierExpression(BicepIdentifier), PrincipalType = RoleManagementPrincipalType.ServicePrincipal, RoleDefinitionId = BicepFunction.GetSubscriptionResourceId("Microsoft.Authorization/roleDefinitions", role.ToString()), PrincipalId = identity.PrincipalId @@ -208,13 +208,13 @@ public RoleAssignment CreateRoleAssignment(CognitiveServicesBuiltInRole role, Us /// The role to grant. /// The type of the principal to assign to. /// The principal to assign to. - /// Optional role assignment identifier name suffix. + /// Optional role assignment identifier name suffix. /// The . - public RoleAssignment CreateRoleAssignment(CognitiveServicesBuiltInRole role, BicepValue principalType, BicepValue principalId, string? identifierNameSuffix = default) => - new($"{IdentifierName}_{CognitiveServicesBuiltInRole.GetBuiltInRoleName(role)}{(identifierNameSuffix is null ? "" : "_")}{identifierNameSuffix}") + public RoleAssignment CreateRoleAssignment(CognitiveServicesBuiltInRole role, BicepValue principalType, BicepValue principalId, string? bicepIdentifierSuffix = default) => + new($"{BicepIdentifier}_{CognitiveServicesBuiltInRole.GetBuiltInRoleName(role)}{(bicepIdentifierSuffix is null ? "" : "_")}{bicepIdentifierSuffix}") { Name = BicepFunction.CreateGuid(Id, principalId, BicepFunction.GetSubscriptionResourceId("Microsoft.Authorization/roleDefinitions", role.ToString())), - Scope = new IdentifierExpression(IdentifierName), + Scope = new IdentifierExpression(BicepIdentifier), PrincipalType = principalType, RoleDefinitionId = BicepFunction.GetSubscriptionResourceId("Microsoft.Authorization/roleDefinitions", role.ToString()), PrincipalId = principalId diff --git a/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/CognitiveServicesAccountDeployment.cs b/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/CognitiveServicesAccountDeployment.cs index bb74ea5b0712..1be3fe99a048 100644 --- a/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/CognitiveServicesAccountDeployment.cs +++ b/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/CognitiveServicesAccountDeployment.cs @@ -17,7 +17,7 @@ namespace Azure.Provisioning.CognitiveServices; /// /// CognitiveServicesAccountDeployment. /// -public partial class CognitiveServicesAccountDeployment : Resource +public partial class CognitiveServicesAccountDeployment : ProvisionableResource { /// /// The name of the deployment associated with the Cognitive Services @@ -65,15 +65,15 @@ public partial class CognitiveServicesAccountDeployment : Resource /// /// Creates a new CognitiveServicesAccountDeployment. /// - /// + /// /// The the Bicep identifier name of the CognitiveServicesAccountDeployment /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the CognitiveServicesAccountDeployment. - public CognitiveServicesAccountDeployment(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.CognitiveServices/accounts/deployments", resourceVersion ?? "2024-10-01") + public CognitiveServicesAccountDeployment(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.CognitiveServices/accounts/deployments", resourceVersion ?? "2024-10-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _properties = BicepValue.DefineProperty(this, "Properties", ["properties"]); @@ -133,7 +133,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing CognitiveServicesAccountDeployment. /// - /// + /// /// The the Bicep identifier name of the CognitiveServicesAccountDeployment /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -141,6 +141,6 @@ public static class ResourceVersions /// /// Version of the CognitiveServicesAccountDeployment. /// The existing CognitiveServicesAccountDeployment resource. - public static CognitiveServicesAccountDeployment FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static CognitiveServicesAccountDeployment FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/CognitiveServicesCommitmentPlan.cs b/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/CognitiveServicesCommitmentPlan.cs index 12d8f20c72be..e718a2891280 100644 --- a/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/CognitiveServicesCommitmentPlan.cs +++ b/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/CognitiveServicesCommitmentPlan.cs @@ -17,7 +17,7 @@ namespace Azure.Provisioning.CognitiveServices; /// /// CognitiveServicesCommitmentPlan. /// -public partial class CognitiveServicesCommitmentPlan : Resource +public partial class CognitiveServicesCommitmentPlan : ProvisionableResource { /// /// The name of the commitmentPlan associated with the Cognitive Services @@ -77,15 +77,15 @@ public partial class CognitiveServicesCommitmentPlan : Resource /// /// Creates a new CognitiveServicesCommitmentPlan. /// - /// + /// /// The the Bicep identifier name of the CognitiveServicesCommitmentPlan /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the CognitiveServicesCommitmentPlan. - public CognitiveServicesCommitmentPlan(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.CognitiveServices/commitmentPlans", resourceVersion ?? "2024-10-01") + public CognitiveServicesCommitmentPlan(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.CognitiveServices/commitmentPlans", resourceVersion ?? "2024-10-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _kind = BicepValue.DefineProperty(this, "Kind", ["kind"]); @@ -122,7 +122,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing CognitiveServicesCommitmentPlan. /// - /// + /// /// The the Bicep identifier name of the CognitiveServicesCommitmentPlan /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -130,6 +130,6 @@ public static class ResourceVersions /// /// Version of the CognitiveServicesCommitmentPlan. /// The existing CognitiveServicesCommitmentPlan resource. - public static CognitiveServicesCommitmentPlan FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static CognitiveServicesCommitmentPlan FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/CommitmentPlan.cs b/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/CommitmentPlan.cs index 5ad22f77c998..8c7d3c494dc3 100644 --- a/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/CommitmentPlan.cs +++ b/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/CommitmentPlan.cs @@ -17,7 +17,7 @@ namespace Azure.Provisioning.CognitiveServices; /// /// CommitmentPlan. /// -public partial class CommitmentPlan : Resource +public partial class CommitmentPlan : ProvisionableResource { /// /// The name of the commitmentPlan associated with the Cognitive Services @@ -83,15 +83,15 @@ public partial class CommitmentPlan : Resource /// /// Creates a new CommitmentPlan. /// - /// + /// /// The the Bicep identifier name of the CommitmentPlan resource. This can /// be used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and /// underscores. /// /// Version of the CommitmentPlan. - public CommitmentPlan(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.CognitiveServices/accounts/commitmentPlans", resourceVersion ?? "2024-10-01") + public CommitmentPlan(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.CognitiveServices/accounts/commitmentPlans", resourceVersion ?? "2024-10-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _kind = BicepValue.DefineProperty(this, "Kind", ["kind"]); @@ -154,7 +154,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing CommitmentPlan. /// - /// + /// /// The the Bicep identifier name of the CommitmentPlan resource. This can /// be used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and @@ -162,6 +162,6 @@ public static class ResourceVersions /// /// Version of the CommitmentPlan. /// The existing CommitmentPlan resource. - public static CommitmentPlan FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static CommitmentPlan FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/CommitmentPlanAccountAssociation.cs b/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/CommitmentPlanAccountAssociation.cs index 51daa9c0475d..68398f2acb56 100644 --- a/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/CommitmentPlanAccountAssociation.cs +++ b/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/CommitmentPlanAccountAssociation.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.CognitiveServices; /// /// CommitmentPlanAccountAssociation. /// -public partial class CommitmentPlanAccountAssociation : Resource +public partial class CommitmentPlanAccountAssociation : ProvisionableResource { /// /// The name of the commitment plan association with the Cognitive Services @@ -58,15 +58,15 @@ public partial class CommitmentPlanAccountAssociation : Resource /// /// Creates a new CommitmentPlanAccountAssociation. /// - /// + /// /// The the Bicep identifier name of the CommitmentPlanAccountAssociation /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the CommitmentPlanAccountAssociation. - public CommitmentPlanAccountAssociation(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.CognitiveServices/commitmentPlans/accountAssociations", resourceVersion ?? "2024-10-01") + public CommitmentPlanAccountAssociation(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.CognitiveServices/commitmentPlans/accountAssociations", resourceVersion ?? "2024-10-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _accountId = BicepValue.DefineProperty(this, "AccountId", ["properties", "accountId"]); @@ -100,7 +100,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing CommitmentPlanAccountAssociation. /// - /// + /// /// The the Bicep identifier name of the CommitmentPlanAccountAssociation /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -108,6 +108,6 @@ public static class ResourceVersions /// /// Version of the CommitmentPlanAccountAssociation. /// The existing CommitmentPlanAccountAssociation resource. - public static CommitmentPlanAccountAssociation FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static CommitmentPlanAccountAssociation FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/AbusePenalty.cs b/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/AbusePenalty.cs index 7b86769261c1..3ea717511d42 100644 --- a/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/AbusePenalty.cs +++ b/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/AbusePenalty.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.CognitiveServices; /// /// The abuse penalty. /// -public partial class AbusePenalty : ProvisioningConstruct +public partial class AbusePenalty : ProvisionableConstruct { /// /// The action of AbusePenalty. diff --git a/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/CognitiveServicesAccountDeploymentModel.cs b/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/CognitiveServicesAccountDeploymentModel.cs index 2b673dfb61fa..5facb04999c9 100644 --- a/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/CognitiveServicesAccountDeploymentModel.cs +++ b/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/CognitiveServicesAccountDeploymentModel.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.CognitiveServices; /// /// Properties of Cognitive Services account deployment model. /// -public partial class CognitiveServicesAccountDeploymentModel : ProvisioningConstruct +public partial class CognitiveServicesAccountDeploymentModel : ProvisionableConstruct { /// /// Deployment model format. diff --git a/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/CognitiveServicesAccountDeploymentProperties.cs b/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/CognitiveServicesAccountDeploymentProperties.cs index ef3a20d62aef..8bd5267ca19b 100644 --- a/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/CognitiveServicesAccountDeploymentProperties.cs +++ b/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/CognitiveServicesAccountDeploymentProperties.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.CognitiveServices; /// /// Properties of Cognitive Services account deployment. /// -public partial class CognitiveServicesAccountDeploymentProperties : ProvisioningConstruct +public partial class CognitiveServicesAccountDeploymentProperties : ProvisionableConstruct { /// /// Gets the status of the resource at the time the operation was called. diff --git a/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/CognitiveServicesAccountDeploymentScaleSettings.cs b/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/CognitiveServicesAccountDeploymentScaleSettings.cs index e5a969169945..731f0bb771a7 100644 --- a/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/CognitiveServicesAccountDeploymentScaleSettings.cs +++ b/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/CognitiveServicesAccountDeploymentScaleSettings.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.CognitiveServices; /// /// Properties of Cognitive Services account deployment model. /// -public partial class CognitiveServicesAccountDeploymentScaleSettings : ProvisioningConstruct +public partial class CognitiveServicesAccountDeploymentScaleSettings : ProvisionableConstruct { /// /// Deployment scale type. diff --git a/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/CognitiveServicesAccountProperties.cs b/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/CognitiveServicesAccountProperties.cs index bc0198105563..aa9fe635bb34 100644 --- a/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/CognitiveServicesAccountProperties.cs +++ b/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/CognitiveServicesAccountProperties.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.CognitiveServices; /// /// Properties of Cognitive Services account. /// -public partial class CognitiveServicesAccountProperties : ProvisioningConstruct +public partial class CognitiveServicesAccountProperties : ProvisionableConstruct { /// /// Gets the status of the cognitive services account at the time the diff --git a/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/CognitiveServicesCapacityConfig.cs b/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/CognitiveServicesCapacityConfig.cs index 501d563fbcdc..ab489f9772cd 100644 --- a/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/CognitiveServicesCapacityConfig.cs +++ b/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/CognitiveServicesCapacityConfig.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.CognitiveServices; /// /// The capacity configuration. /// -public partial class CognitiveServicesCapacityConfig : ProvisioningConstruct +public partial class CognitiveServicesCapacityConfig : ProvisionableConstruct { /// /// The minimum capacity. diff --git a/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/CognitiveServicesIPRule.cs b/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/CognitiveServicesIPRule.cs index 81e62ebf6ac9..58855f290dc8 100644 --- a/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/CognitiveServicesIPRule.cs +++ b/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/CognitiveServicesIPRule.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.CognitiveServices; /// /// A rule governing the accessibility from a specific ip address or ip range. /// -public partial class CognitiveServicesIPRule : ProvisioningConstruct +public partial class CognitiveServicesIPRule : ProvisionableConstruct { /// /// An IPv4 address range in CIDR notation, such as diff --git a/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/CognitiveServicesKeyVaultProperties.cs b/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/CognitiveServicesKeyVaultProperties.cs index 7553261dc384..c3efd896970b 100644 --- a/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/CognitiveServicesKeyVaultProperties.cs +++ b/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/CognitiveServicesKeyVaultProperties.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.CognitiveServices; /// /// Properties to configure keyVault Properties. /// -public partial class CognitiveServicesKeyVaultProperties : ProvisioningConstruct +public partial class CognitiveServicesKeyVaultProperties : ProvisionableConstruct { /// /// Name of the Key from KeyVault. diff --git a/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/CognitiveServicesModelSku.cs b/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/CognitiveServicesModelSku.cs index 4209bee2f436..814f4e7ab508 100644 --- a/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/CognitiveServicesModelSku.cs +++ b/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/CognitiveServicesModelSku.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.CognitiveServices; /// /// Describes an available Cognitive Services Model SKU. /// -public partial class CognitiveServicesModelSku : ProvisioningConstruct +public partial class CognitiveServicesModelSku : ProvisionableConstruct { /// /// The name of the model SKU. diff --git a/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/CognitiveServicesMultiRegionSettings.cs b/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/CognitiveServicesMultiRegionSettings.cs index 593815696e35..ffaed4c5d9d6 100644 --- a/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/CognitiveServicesMultiRegionSettings.cs +++ b/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/CognitiveServicesMultiRegionSettings.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.CognitiveServices; /// /// The multiregion settings Cognitive Services account. /// -public partial class CognitiveServicesMultiRegionSettings : ProvisioningConstruct +public partial class CognitiveServicesMultiRegionSettings : ProvisionableConstruct { /// /// Multiregion routing methods. diff --git a/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/CognitiveServicesNetworkRuleSet.cs b/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/CognitiveServicesNetworkRuleSet.cs index 625a1cd0d667..4cf543d105ea 100644 --- a/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/CognitiveServicesNetworkRuleSet.cs +++ b/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/CognitiveServicesNetworkRuleSet.cs @@ -13,7 +13,7 @@ namespace Azure.Provisioning.CognitiveServices; /// /// A set of rules governing the network accessibility. /// -public partial class CognitiveServicesNetworkRuleSet : ProvisioningConstruct +public partial class CognitiveServicesNetworkRuleSet : ProvisionableConstruct { /// /// The default action when no rule from ipRules and from diff --git a/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/CognitiveServicesPrivateEndpointConnectionData.cs b/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/CognitiveServicesPrivateEndpointConnectionData.cs index 33d0a629b68a..0986f9ec0410 100644 --- a/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/CognitiveServicesPrivateEndpointConnectionData.cs +++ b/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/CognitiveServicesPrivateEndpointConnectionData.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.CognitiveServices; /// A class representing the CognitiveServicesPrivateEndpointConnection data /// model. The Private Endpoint Connection resource. /// -public partial class CognitiveServicesPrivateEndpointConnectionData : ProvisioningConstruct +public partial class CognitiveServicesPrivateEndpointConnectionData : ProvisionableConstruct { /// /// The location of the private endpoint connection. diff --git a/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/CognitiveServicesPrivateLinkServiceConnectionState.cs b/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/CognitiveServicesPrivateLinkServiceConnectionState.cs index 6ecf9b467100..10ff6d06e50e 100644 --- a/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/CognitiveServicesPrivateLinkServiceConnectionState.cs +++ b/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/CognitiveServicesPrivateLinkServiceConnectionState.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.CognitiveServices; /// A collection of information about the state of the connection between /// service consumer and provider. /// -public partial class CognitiveServicesPrivateLinkServiceConnectionState : ProvisioningConstruct +public partial class CognitiveServicesPrivateLinkServiceConnectionState : ProvisionableConstruct { /// /// Indicates whether the connection has been Approved/Rejected/Removed by diff --git a/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/CognitiveServicesRegionSetting.cs b/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/CognitiveServicesRegionSetting.cs index 5d8d00e86123..23edf6b69f51 100644 --- a/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/CognitiveServicesRegionSetting.cs +++ b/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/CognitiveServicesRegionSetting.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.CognitiveServices; /// /// The call rate limit Cognitive Services account. /// -public partial class CognitiveServicesRegionSetting : ProvisioningConstruct +public partial class CognitiveServicesRegionSetting : ProvisionableConstruct { /// /// Name of the region. diff --git a/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/CognitiveServicesSku.cs b/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/CognitiveServicesSku.cs index bbdd127f168b..dadbf7a9d2b8 100644 --- a/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/CognitiveServicesSku.cs +++ b/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/CognitiveServicesSku.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.CognitiveServices; /// /// The resource model definition representing SKU. /// -public partial class CognitiveServicesSku : ProvisioningConstruct +public partial class CognitiveServicesSku : ProvisionableConstruct { /// /// The name of the SKU. Ex - P3. It is typically a letter+number code. diff --git a/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/CognitiveServicesSkuCapability.cs b/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/CognitiveServicesSkuCapability.cs index 7a4f081d0c8e..577afa0d5c1c 100644 --- a/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/CognitiveServicesSkuCapability.cs +++ b/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/CognitiveServicesSkuCapability.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.CognitiveServices; /// /// SkuCapability indicates the capability of a certain feature. /// -public partial class CognitiveServicesSkuCapability : ProvisioningConstruct +public partial class CognitiveServicesSkuCapability : ProvisionableConstruct { /// /// The name of the SkuCapability. diff --git a/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/CognitiveServicesSkuChangeInfo.cs b/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/CognitiveServicesSkuChangeInfo.cs index 74005574384a..e553cbfdfa4c 100644 --- a/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/CognitiveServicesSkuChangeInfo.cs +++ b/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/CognitiveServicesSkuChangeInfo.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.CognitiveServices; /// /// Sku change info of account. /// -public partial class CognitiveServicesSkuChangeInfo : ProvisioningConstruct +public partial class CognitiveServicesSkuChangeInfo : ProvisionableConstruct { /// /// Gets the count of downgrades. diff --git a/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/CognitiveServicesVirtualNetworkRule.cs b/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/CognitiveServicesVirtualNetworkRule.cs index dfe1ea4bfd6d..53f9eba37cf4 100644 --- a/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/CognitiveServicesVirtualNetworkRule.cs +++ b/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/CognitiveServicesVirtualNetworkRule.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.CognitiveServices; /// /// A rule governing the accessibility from a specific virtual network. /// -public partial class CognitiveServicesVirtualNetworkRule : ProvisioningConstruct +public partial class CognitiveServicesVirtualNetworkRule : ProvisionableConstruct { /// /// Full resource id of a vnet subnet, such as diff --git a/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/CommitmentPeriod.cs b/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/CommitmentPeriod.cs index c53ec0af424e..748f27c22c7d 100644 --- a/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/CommitmentPeriod.cs +++ b/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/CommitmentPeriod.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.CognitiveServices; /// /// Cognitive Services account commitment period. /// -public partial class CommitmentPeriod : ProvisioningConstruct +public partial class CommitmentPeriod : ProvisionableConstruct { /// /// Commitment period commitment tier. diff --git a/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/CommitmentPlanAssociation.cs b/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/CommitmentPlanAssociation.cs index 4cff87882643..15443c09b770 100644 --- a/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/CommitmentPlanAssociation.cs +++ b/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/CommitmentPlanAssociation.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.CognitiveServices; /// /// The commitment plan association. /// -public partial class CommitmentPlanAssociation : ProvisioningConstruct +public partial class CommitmentPlanAssociation : ProvisionableConstruct { /// /// The Azure resource id of the commitment plan. diff --git a/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/CommitmentPlanProperties.cs b/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/CommitmentPlanProperties.cs index 7902e996e2eb..3fa2dcba0756 100644 --- a/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/CommitmentPlanProperties.cs +++ b/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/CommitmentPlanProperties.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.CognitiveServices; /// /// Properties of Cognitive Services account commitment plan. /// -public partial class CommitmentPlanProperties : ProvisioningConstruct +public partial class CommitmentPlanProperties : ProvisionableConstruct { /// /// Gets the status of the resource at the time the operation was called. diff --git a/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/CommitmentQuota.cs b/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/CommitmentQuota.cs index fea247099806..c8fa955af2f0 100644 --- a/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/CommitmentQuota.cs +++ b/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/CommitmentQuota.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.CognitiveServices; /// /// Cognitive Services account commitment quota. /// -public partial class CommitmentQuota : ProvisioningConstruct +public partial class CommitmentQuota : ProvisionableConstruct { /// /// Commitment quota quantity. diff --git a/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/ServiceAccountApiKeys.cs b/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/ServiceAccountApiKeys.cs index aa4f7fd03dd1..a532ceb34b87 100644 --- a/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/ServiceAccountApiKeys.cs +++ b/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/ServiceAccountApiKeys.cs @@ -13,7 +13,7 @@ namespace Azure.Provisioning.CognitiveServices; /// /// The access keys for the cognitive services account. /// -public partial class ServiceAccountApiKeys : ProvisioningConstruct +public partial class ServiceAccountApiKeys : ProvisionableConstruct { /// /// Gets the value of key 1. @@ -45,7 +45,7 @@ public ServiceAccountApiKeys() /// /// A ServiceAccountApiKeys resource. [EditorBrowsable(EditorBrowsableState.Never)] - public static ServiceAccountApiKeys FromExpression(Expression expression) + public static ServiceAccountApiKeys FromExpression(BicepExpression expression) { ServiceAccountApiKeys resource = new(); resource.OverrideWithExpression(expression); diff --git a/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/ServiceAccountApiProperties.cs b/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/ServiceAccountApiProperties.cs index d4791e4ef16a..3bf4dc4eadf0 100644 --- a/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/ServiceAccountApiProperties.cs +++ b/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/ServiceAccountApiProperties.cs @@ -13,7 +13,7 @@ namespace Azure.Provisioning.CognitiveServices; /// /// The api properties for special APIs. /// -public partial class ServiceAccountApiProperties : ProvisioningConstruct +public partial class ServiceAccountApiProperties : ProvisionableConstruct { /// /// (QnAMaker Only) The runtime endpoint of QnAMaker. diff --git a/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/ServiceAccountCallRateLimit.cs b/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/ServiceAccountCallRateLimit.cs index 7308cfa1cd63..783dd4d9ed9b 100644 --- a/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/ServiceAccountCallRateLimit.cs +++ b/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/ServiceAccountCallRateLimit.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.CognitiveServices; /// /// The call rate limit Cognitive Services account. /// -public partial class ServiceAccountCallRateLimit : ProvisioningConstruct +public partial class ServiceAccountCallRateLimit : ProvisionableConstruct { /// /// The count value of Call Rate Limit. diff --git a/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/ServiceAccountEncryptionProperties.cs b/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/ServiceAccountEncryptionProperties.cs index 77a3698d6c63..8f4ae2afb0e7 100644 --- a/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/ServiceAccountEncryptionProperties.cs +++ b/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/ServiceAccountEncryptionProperties.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.CognitiveServices; /// /// Properties to configure Encryption. /// -public partial class ServiceAccountEncryptionProperties : ProvisioningConstruct +public partial class ServiceAccountEncryptionProperties : ProvisionableConstruct { /// /// Properties of KeyVault. diff --git a/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/ServiceAccountModelDeprecationInfo.cs b/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/ServiceAccountModelDeprecationInfo.cs index 17cd142042e6..09d049771f8a 100644 --- a/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/ServiceAccountModelDeprecationInfo.cs +++ b/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/ServiceAccountModelDeprecationInfo.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.CognitiveServices; /// /// Cognitive Services account ModelDeprecationInfo. /// -public partial class ServiceAccountModelDeprecationInfo : ProvisioningConstruct +public partial class ServiceAccountModelDeprecationInfo : ProvisionableConstruct { /// /// The datetime of deprecation of the fineTune Model. diff --git a/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/ServiceAccountQuotaLimit.cs b/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/ServiceAccountQuotaLimit.cs index 7424ceec1103..0a939788b53e 100644 --- a/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/ServiceAccountQuotaLimit.cs +++ b/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/ServiceAccountQuotaLimit.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.CognitiveServices; /// /// The ServiceAccountQuotaLimit. /// -public partial class ServiceAccountQuotaLimit : ProvisioningConstruct +public partial class ServiceAccountQuotaLimit : ProvisionableConstruct { /// /// Gets the count. diff --git a/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/ServiceAccountThrottlingMatchPattern.cs b/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/ServiceAccountThrottlingMatchPattern.cs index 5126e1ae9328..c2db70fe8edf 100644 --- a/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/ServiceAccountThrottlingMatchPattern.cs +++ b/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/ServiceAccountThrottlingMatchPattern.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.CognitiveServices; /// /// The ServiceAccountThrottlingMatchPattern. /// -public partial class ServiceAccountThrottlingMatchPattern : ProvisioningConstruct +public partial class ServiceAccountThrottlingMatchPattern : ProvisionableConstruct { /// /// Gets the path. diff --git a/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/ServiceAccountThrottlingRule.cs b/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/ServiceAccountThrottlingRule.cs index 7806e1da71ab..5757b0c5d864 100644 --- a/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/ServiceAccountThrottlingRule.cs +++ b/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/ServiceAccountThrottlingRule.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.CognitiveServices; /// /// The ServiceAccountThrottlingRule. /// -public partial class ServiceAccountThrottlingRule : ProvisioningConstruct +public partial class ServiceAccountThrottlingRule : ProvisionableConstruct { /// /// Gets the key. diff --git a/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/ServiceAccountUserOwnedStorage.cs b/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/ServiceAccountUserOwnedStorage.cs index 99f5f44c1bc4..e69584471e08 100644 --- a/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/ServiceAccountUserOwnedStorage.cs +++ b/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Generated/Models/ServiceAccountUserOwnedStorage.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.CognitiveServices; /// /// The user owned storage for Cognitive Services account. /// -public partial class ServiceAccountUserOwnedStorage : ProvisioningConstruct +public partial class ServiceAccountUserOwnedStorage : ProvisionableConstruct { /// /// Full resource id of a Microsoft.Storage resource. diff --git a/sdk/provisioning/Azure.Provisioning.Communication/api/Azure.Provisioning.Communication.netstandard2.0.cs b/sdk/provisioning/Azure.Provisioning.Communication/api/Azure.Provisioning.Communication.netstandard2.0.cs index 5c747f27d172..a5a418b792ff 100644 --- a/sdk/provisioning/Azure.Provisioning.Communication/api/Azure.Provisioning.Communication.netstandard2.0.cs +++ b/sdk/provisioning/Azure.Provisioning.Communication/api/Azure.Provisioning.Communication.netstandard2.0.cs @@ -1,8 +1,8 @@ namespace Azure.Provisioning.Communication { - public partial class CommunicationDomain : Azure.Provisioning.Primitives.Resource + public partial class CommunicationDomain : Azure.Provisioning.Primitives.ProvisionableResource { - public CommunicationDomain(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public CommunicationDomain(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue DataLocation { get { throw null; } } public Azure.Provisioning.BicepValue DomainManagement { get { throw null; } set { } } public Azure.Provisioning.BicepValue FromSenderDomain { get { throw null; } } @@ -17,17 +17,16 @@ public partial class CommunicationDomain : Azure.Provisioning.Primitives.Resourc public Azure.Provisioning.BicepValue UserEngagementTracking { get { throw null; } set { } } public Azure.Provisioning.BicepValue VerificationRecords { get { throw null; } } public Azure.Provisioning.BicepValue VerificationStates { get { throw null; } } - public static Azure.Provisioning.Communication.CommunicationDomain FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Communication.CommunicationDomain FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2023_03_31; public static readonly string V2023_04_01; - public static readonly string V2023_06_01_preview; } } - public partial class CommunicationService : Azure.Provisioning.Primitives.Resource + public partial class CommunicationService : Azure.Provisioning.Primitives.ProvisionableResource { - public CommunicationService(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public CommunicationService(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue DataLocation { get { throw null; } set { } } public Azure.Provisioning.BicepValue HostName { get { throw null; } } public Azure.Provisioning.BicepValue Id { get { throw null; } } @@ -41,7 +40,7 @@ public partial class CommunicationService : Azure.Provisioning.Primitives.Resour public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } public Azure.Provisioning.BicepValue Version { get { throw null; } } - public static Azure.Provisioning.Communication.CommunicationService FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Communication.CommunicationService FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public Azure.Provisioning.Communication.CommunicationServiceKeys GetKeys() { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override Azure.Provisioning.Primitives.ResourceNameRequirements GetResourceNameRequirements() { throw null; } @@ -50,10 +49,9 @@ public static partial class ResourceVersions public static readonly string V2020_08_20; public static readonly string V2023_03_31; public static readonly string V2023_04_01; - public static readonly string V2023_06_01_preview; } } - public partial class CommunicationServiceKeys : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class CommunicationServiceKeys : Azure.Provisioning.Primitives.ProvisionableConstruct { public CommunicationServiceKeys() { } public Azure.Provisioning.BicepValue PrimaryConnectionString { get { throw null; } } @@ -61,7 +59,7 @@ public CommunicationServiceKeys() { } public Azure.Provisioning.BicepValue SecondaryConnectionString { get { throw null; } } public Azure.Provisioning.BicepValue SecondaryKey { get { throw null; } } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public static Azure.Provisioning.Communication.CommunicationServiceKeys FromExpression(Azure.Provisioning.Expressions.Expression expression) { throw null; } + public static Azure.Provisioning.Communication.CommunicationServiceKeys FromExpression(Azure.Provisioning.Expressions.BicepExpression expression) { throw null; } } public enum CommunicationServiceProvisioningState { @@ -93,7 +91,7 @@ public enum DomainManagement CustomerManaged = 1, CustomerManagedInExchangeOnline = 2, } - public partial class DomainPropertiesVerificationRecords : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class DomainPropertiesVerificationRecords : Azure.Provisioning.Primitives.ProvisionableConstruct { public DomainPropertiesVerificationRecords() { } public Azure.Provisioning.BicepValue Dkim { get { throw null; } } @@ -102,7 +100,7 @@ public DomainPropertiesVerificationRecords() { } public Azure.Provisioning.BicepValue Domain { get { throw null; } } public Azure.Provisioning.BicepValue Spf { get { throw null; } } } - public partial class DomainPropertiesVerificationStates : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class DomainPropertiesVerificationStates : Azure.Provisioning.Primitives.ProvisionableConstruct { public DomainPropertiesVerificationStates() { } public Azure.Provisioning.BicepValue Dkim { get { throw null; } } @@ -132,15 +130,15 @@ public enum DomainRecordVerificationStatus Verified = 4, CancellationRequested = 5, } - public partial class DomainVerificationStatusRecord : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class DomainVerificationStatusRecord : Azure.Provisioning.Primitives.ProvisionableConstruct { public DomainVerificationStatusRecord() { } public Azure.Provisioning.BicepValue ErrorCode { get { throw null; } } public Azure.Provisioning.BicepValue Status { get { throw null; } } } - public partial class EmailService : Azure.Provisioning.Primitives.Resource + public partial class EmailService : Azure.Provisioning.Primitives.ProvisionableResource { - public EmailService(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public EmailService(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue DataLocation { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Location { get { throw null; } set { } } @@ -148,12 +146,11 @@ public partial class EmailService : Azure.Provisioning.Primitives.Resource public Azure.Provisioning.BicepValue ProvisioningState { get { throw null; } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } - public static Azure.Provisioning.Communication.EmailService FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Communication.EmailService FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2023_03_31; public static readonly string V2023_04_01; - public static readonly string V2023_06_01_preview; } } public enum EmailServicesProvisioningState @@ -168,9 +165,9 @@ public enum EmailServicesProvisioningState Deleting = 7, Moving = 8, } - public partial class SenderUsername : Azure.Provisioning.Primitives.Resource + public partial class SenderUsername : Azure.Provisioning.Primitives.ProvisionableResource { - public SenderUsername(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public SenderUsername(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue DataLocation { get { throw null; } } public Azure.Provisioning.BicepValue DisplayName { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } @@ -179,12 +176,11 @@ public partial class SenderUsername : Azure.Provisioning.Primitives.Resource public Azure.Provisioning.BicepValue ProvisioningState { get { throw null; } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepValue Username { get { throw null; } set { } } - public static Azure.Provisioning.Communication.SenderUsername FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Communication.SenderUsername FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2023_03_31; public static readonly string V2023_04_01; - public static readonly string V2023_06_01_preview; } } public enum UserEngagementTracking @@ -192,7 +188,7 @@ public enum UserEngagementTracking Disabled = 0, Enabled = 1, } - public partial class VerificationDnsRecord : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class VerificationDnsRecord : Azure.Provisioning.Primitives.ProvisionableConstruct { public VerificationDnsRecord() { } public Azure.Provisioning.BicepValue DnsRecordType { get { throw null; } } diff --git a/sdk/provisioning/Azure.Provisioning.Communication/src/Generated/CommunicationDomain.cs b/sdk/provisioning/Azure.Provisioning.Communication/src/Generated/CommunicationDomain.cs index d76ee3c33bf2..5f612df4e763 100644 --- a/sdk/provisioning/Azure.Provisioning.Communication/src/Generated/CommunicationDomain.cs +++ b/sdk/provisioning/Azure.Provisioning.Communication/src/Generated/CommunicationDomain.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.Communication; /// /// CommunicationDomain. /// -public partial class CommunicationDomain : Resource +public partial class CommunicationDomain : ProvisionableResource { /// /// The name of the Domains resource. @@ -105,15 +105,15 @@ public partial class CommunicationDomain : Resource /// /// Creates a new CommunicationDomain. /// - /// + /// /// The the Bicep identifier name of the CommunicationDomain resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, /// numbers, and underscores. /// /// Version of the CommunicationDomain. - public CommunicationDomain(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Communication/emailServices/domains", resourceVersion ?? "2023-04-01") + public CommunicationDomain(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Communication/emailServices/domains", resourceVersion ?? "2023-04-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _location = BicepValue.DefineProperty(this, "Location", ["location"], isRequired: true); @@ -136,11 +136,6 @@ public CommunicationDomain(string identifierName, string? resourceVersion = defa /// public static class ResourceVersions { - /// - /// 2023-06-01-preview. - /// - public static readonly string V2023_06_01_preview = "2023-06-01-preview"; - /// /// 2023-04-01. /// @@ -155,7 +150,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing CommunicationDomain. /// - /// + /// /// The the Bicep identifier name of the CommunicationDomain resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, @@ -163,6 +158,6 @@ public static class ResourceVersions /// /// Version of the CommunicationDomain. /// The existing CommunicationDomain resource. - public static CommunicationDomain FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static CommunicationDomain FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.Communication/src/Generated/CommunicationService.cs b/sdk/provisioning/Azure.Provisioning.Communication/src/Generated/CommunicationService.cs index 1b447a0fcf6b..8535a954201a 100644 --- a/sdk/provisioning/Azure.Provisioning.Communication/src/Generated/CommunicationService.cs +++ b/sdk/provisioning/Azure.Provisioning.Communication/src/Generated/CommunicationService.cs @@ -18,7 +18,7 @@ namespace Azure.Provisioning.Communication; /// /// CommunicationService. /// -public partial class CommunicationService : Resource +public partial class CommunicationService : ProvisionableResource { /// /// The name of the CommunicationService resource. @@ -103,15 +103,15 @@ public partial class CommunicationService : Resource /// /// Creates a new CommunicationService. /// - /// + /// /// The the Bicep identifier name of the CommunicationService resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, /// numbers, and underscores. /// /// Version of the CommunicationService. - public CommunicationService(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Communication/communicationServices", resourceVersion ?? "2023-04-01") + public CommunicationService(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Communication/communicationServices", resourceVersion ?? "2023-04-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _location = BicepValue.DefineProperty(this, "Location", ["location"], isRequired: true); @@ -133,11 +133,6 @@ public CommunicationService(string identifierName, string? resourceVersion = def /// public static class ResourceVersions { - /// - /// 2023-06-01-preview. - /// - public static readonly string V2023_06_01_preview = "2023-06-01-preview"; - /// /// 2023-04-01. /// @@ -157,7 +152,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing CommunicationService. /// - /// + /// /// The the Bicep identifier name of the CommunicationService resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, @@ -165,8 +160,8 @@ public static class ResourceVersions /// /// Version of the CommunicationService. /// The existing CommunicationService resource. - public static CommunicationService FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static CommunicationService FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; /// /// Get the requirements for naming this CommunicationService resource. @@ -182,5 +177,5 @@ public override ResourceNameRequirements GetResourceNameRequirements() => /// The keys for this CommunicationService resource. public CommunicationServiceKeys GetKeys() => CommunicationServiceKeys.FromExpression( - new FunctionCallExpression(new MemberExpression(new IdentifierExpression(IdentifierName), "listKeys"))); + new FunctionCallExpression(new MemberExpression(new IdentifierExpression(BicepIdentifier), "listKeys"))); } diff --git a/sdk/provisioning/Azure.Provisioning.Communication/src/Generated/EmailService.cs b/sdk/provisioning/Azure.Provisioning.Communication/src/Generated/EmailService.cs index ce3fedbc58d8..73c4a4615f4d 100644 --- a/sdk/provisioning/Azure.Provisioning.Communication/src/Generated/EmailService.cs +++ b/sdk/provisioning/Azure.Provisioning.Communication/src/Generated/EmailService.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.Communication; /// /// EmailService. /// -public partial class EmailService : Resource +public partial class EmailService : ProvisionableResource { /// /// The name of the EmailService resource. @@ -63,15 +63,15 @@ public partial class EmailService : Resource /// /// Creates a new EmailService. /// - /// + /// /// The the Bicep identifier name of the EmailService resource. This can /// be used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and /// underscores. /// /// Version of the EmailService. - public EmailService(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Communication/emailServices", resourceVersion ?? "2023-04-01") + public EmailService(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Communication/emailServices", resourceVersion ?? "2023-04-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _location = BicepValue.DefineProperty(this, "Location", ["location"], isRequired: true); @@ -87,11 +87,6 @@ public EmailService(string identifierName, string? resourceVersion = default) /// public static class ResourceVersions { - /// - /// 2023-06-01-preview. - /// - public static readonly string V2023_06_01_preview = "2023-06-01-preview"; - /// /// 2023-04-01. /// @@ -106,7 +101,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing EmailService. /// - /// + /// /// The the Bicep identifier name of the EmailService resource. This can /// be used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and @@ -114,6 +109,6 @@ public static class ResourceVersions /// /// Version of the EmailService. /// The existing EmailService resource. - public static EmailService FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static EmailService FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.Communication/src/Generated/Models/CommunicationServiceKeys.cs b/sdk/provisioning/Azure.Provisioning.Communication/src/Generated/Models/CommunicationServiceKeys.cs index dd55745c52a8..248a90688104 100644 --- a/sdk/provisioning/Azure.Provisioning.Communication/src/Generated/Models/CommunicationServiceKeys.cs +++ b/sdk/provisioning/Azure.Provisioning.Communication/src/Generated/Models/CommunicationServiceKeys.cs @@ -13,7 +13,7 @@ namespace Azure.Provisioning.Communication; /// /// A class representing the access keys of a CommunicationService. /// -public partial class CommunicationServiceKeys : ProvisioningConstruct +public partial class CommunicationServiceKeys : ProvisionableConstruct { /// /// The primary access key. @@ -60,7 +60,7 @@ public CommunicationServiceKeys() /// /// A CommunicationServiceKeys resource. [EditorBrowsable(EditorBrowsableState.Never)] - public static CommunicationServiceKeys FromExpression(Expression expression) + public static CommunicationServiceKeys FromExpression(BicepExpression expression) { CommunicationServiceKeys resource = new(); resource.OverrideWithExpression(expression); diff --git a/sdk/provisioning/Azure.Provisioning.Communication/src/Generated/Models/DomainPropertiesVerificationRecords.cs b/sdk/provisioning/Azure.Provisioning.Communication/src/Generated/Models/DomainPropertiesVerificationRecords.cs index ff29ab32c371..537f18cd2441 100644 --- a/sdk/provisioning/Azure.Provisioning.Communication/src/Generated/Models/DomainPropertiesVerificationRecords.cs +++ b/sdk/provisioning/Azure.Provisioning.Communication/src/Generated/Models/DomainPropertiesVerificationRecords.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.Communication; /// /// List of DnsRecord. /// -public partial class DomainPropertiesVerificationRecords : ProvisioningConstruct +public partial class DomainPropertiesVerificationRecords : ProvisionableConstruct { /// /// A class that represents a VerificationStatus record. diff --git a/sdk/provisioning/Azure.Provisioning.Communication/src/Generated/Models/DomainPropertiesVerificationStates.cs b/sdk/provisioning/Azure.Provisioning.Communication/src/Generated/Models/DomainPropertiesVerificationStates.cs index 9fac0fb333ea..69d1d04cbfa8 100644 --- a/sdk/provisioning/Azure.Provisioning.Communication/src/Generated/Models/DomainPropertiesVerificationStates.cs +++ b/sdk/provisioning/Azure.Provisioning.Communication/src/Generated/Models/DomainPropertiesVerificationStates.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.Communication; /// /// List of VerificationStatusRecord. /// -public partial class DomainPropertiesVerificationStates : ProvisioningConstruct +public partial class DomainPropertiesVerificationStates : ProvisionableConstruct { /// /// A class that represents a VerificationStatus record. diff --git a/sdk/provisioning/Azure.Provisioning.Communication/src/Generated/Models/DomainVerificationStatusRecord.cs b/sdk/provisioning/Azure.Provisioning.Communication/src/Generated/Models/DomainVerificationStatusRecord.cs index dc29a6423b44..ee982f83d6be 100644 --- a/sdk/provisioning/Azure.Provisioning.Communication/src/Generated/Models/DomainVerificationStatusRecord.cs +++ b/sdk/provisioning/Azure.Provisioning.Communication/src/Generated/Models/DomainVerificationStatusRecord.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.Communication; /// /// A class that represents a VerificationStatus record. /// -public partial class DomainVerificationStatusRecord : ProvisioningConstruct +public partial class DomainVerificationStatusRecord : ProvisionableConstruct { /// /// Status of the verification operation. diff --git a/sdk/provisioning/Azure.Provisioning.Communication/src/Generated/Models/VerificationDnsRecord.cs b/sdk/provisioning/Azure.Provisioning.Communication/src/Generated/Models/VerificationDnsRecord.cs index d22fb7d166a3..2e042d293b11 100644 --- a/sdk/provisioning/Azure.Provisioning.Communication/src/Generated/Models/VerificationDnsRecord.cs +++ b/sdk/provisioning/Azure.Provisioning.Communication/src/Generated/Models/VerificationDnsRecord.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.Communication; /// /// A class that represents a VerificationStatus record. /// -public partial class VerificationDnsRecord : ProvisioningConstruct +public partial class VerificationDnsRecord : ProvisionableConstruct { /// /// Type of the DNS record. Example: TXT. diff --git a/sdk/provisioning/Azure.Provisioning.Communication/src/Generated/SenderUsername.cs b/sdk/provisioning/Azure.Provisioning.Communication/src/Generated/SenderUsername.cs index aa7d0332780d..e9329b3b6449 100644 --- a/sdk/provisioning/Azure.Provisioning.Communication/src/Generated/SenderUsername.cs +++ b/sdk/provisioning/Azure.Provisioning.Communication/src/Generated/SenderUsername.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.Communication; /// /// SenderUsername. /// -public partial class SenderUsername : Resource +public partial class SenderUsername : ProvisionableResource { /// /// The valid sender Username. @@ -69,15 +69,15 @@ public partial class SenderUsername : Resource /// /// Creates a new SenderUsername. /// - /// + /// /// The the Bicep identifier name of the SenderUsername resource. This can /// be used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and /// underscores. /// /// Version of the SenderUsername. - public SenderUsername(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Communication/emailServices/domains/senderUsernames", resourceVersion ?? "2023-04-01") + public SenderUsername(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Communication/emailServices/domains/senderUsernames", resourceVersion ?? "2023-04-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _displayName = BicepValue.DefineProperty(this, "DisplayName", ["properties", "displayName"]); @@ -94,11 +94,6 @@ public SenderUsername(string identifierName, string? resourceVersion = default) /// public static class ResourceVersions { - /// - /// 2023-06-01-preview. - /// - public static readonly string V2023_06_01_preview = "2023-06-01-preview"; - /// /// 2023-04-01. /// @@ -113,7 +108,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing SenderUsername. /// - /// + /// /// The the Bicep identifier name of the SenderUsername resource. This can /// be used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and @@ -121,6 +116,6 @@ public static class ResourceVersions /// /// Version of the SenderUsername. /// The existing SenderUsername resource. - public static SenderUsername FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static SenderUsername FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.ContainerRegistry/api/Azure.Provisioning.ContainerRegistry.netstandard2.0.cs b/sdk/provisioning/Azure.Provisioning.ContainerRegistry/api/Azure.Provisioning.ContainerRegistry.netstandard2.0.cs index 3735b61c13a0..08674ed5354f 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerRegistry/api/Azure.Provisioning.ContainerRegistry.netstandard2.0.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerRegistry/api/Azure.Provisioning.ContainerRegistry.netstandard2.0.cs @@ -5,9 +5,9 @@ public enum ActionsRequiredForPrivateLinkServiceConsumer None = 0, Recreate = 1, } - public partial class ContainerRegistryAgentPool : Azure.Provisioning.Primitives.Resource + public partial class ContainerRegistryAgentPool : Azure.Provisioning.Primitives.ProvisionableResource { - public ContainerRegistryAgentPool(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public ContainerRegistryAgentPool(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Count { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Location { get { throw null; } set { } } @@ -19,13 +19,18 @@ public partial class ContainerRegistryAgentPool : Azure.Provisioning.Primitives. public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } public Azure.Provisioning.BicepValue Tier { get { throw null; } set { } } public Azure.Provisioning.BicepValue VirtualNetworkSubnetResourceId { get { throw null; } set { } } - public static Azure.Provisioning.ContainerRegistry.ContainerRegistryAgentPool FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.ContainerRegistry.ContainerRegistryAgentPool FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { - public static readonly string V2019_06_01_preview; + public static readonly string V2017_03_01; + public static readonly string V2017_10_01; + public static readonly string V2019_05_01; + public static readonly string V2021_09_01; + public static readonly string V2022_12_01; + public static readonly string V2023_07_01; } } - public partial class ContainerRegistryBaseImageDependency : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerRegistryBaseImageDependency : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerRegistryBaseImageDependency() { } public Azure.Provisioning.BicepValue DependencyType { get { throw null; } } @@ -39,7 +44,7 @@ public enum ContainerRegistryBaseImageDependencyType BuildTime = 0, RunTime = 1, } - public partial class ContainerRegistryBaseImageTrigger : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerRegistryBaseImageTrigger : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerRegistryBaseImageTrigger() { } public Azure.Provisioning.BicepValue BaseImageTriggerType { get { throw null; } set { } } @@ -86,7 +91,7 @@ public enum ContainerRegistryCpuVariant [System.Runtime.Serialization.DataMemberAttribute(Name="v8")] V8 = 2, } - public partial class ContainerRegistryCredentials : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerRegistryCredentials : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerRegistryCredentials() { } public Azure.Provisioning.BicepDictionary CustomRegistries { get { throw null; } set { } } @@ -136,7 +141,7 @@ public ContainerRegistryEncodedTaskStep() { } public Azure.Provisioning.BicepValue EncodedValuesContent { get { throw null; } set { } } public Azure.Provisioning.BicepList Values { get { throw null; } set { } } } - public partial class ContainerRegistryEncryption : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerRegistryEncryption : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerRegistryEncryption() { } public Azure.Provisioning.BicepValue KeyVaultProperties { get { throw null; } set { } } @@ -175,7 +180,7 @@ public ContainerRegistryFileTaskStep() { } public Azure.Provisioning.BicepList Values { get { throw null; } set { } } public Azure.Provisioning.BicepValue ValuesFilePath { get { throw null; } set { } } } - public partial class ContainerRegistryImageDescriptor : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerRegistryImageDescriptor : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerRegistryImageDescriptor() { } public Azure.Provisioning.BicepValue Digest { get { throw null; } set { } } @@ -183,14 +188,14 @@ public ContainerRegistryImageDescriptor() { } public Azure.Provisioning.BicepValue Repository { get { throw null; } set { } } public Azure.Provisioning.BicepValue Tag { get { throw null; } set { } } } - public partial class ContainerRegistryImageUpdateTrigger : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerRegistryImageUpdateTrigger : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerRegistryImageUpdateTrigger() { } public Azure.Provisioning.BicepValue Id { get { throw null; } set { } } public Azure.Provisioning.BicepList Images { get { throw null; } set { } } public Azure.Provisioning.BicepValue Timestamp { get { throw null; } set { } } } - public partial class ContainerRegistryIPRule : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerRegistryIPRule : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerRegistryIPRule() { } public Azure.Provisioning.BicepValue Action { get { throw null; } set { } } @@ -200,7 +205,7 @@ public enum ContainerRegistryIPRuleAction { Allow = 0, } - public partial class ContainerRegistryKeyVaultProperties : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerRegistryKeyVaultProperties : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerRegistryKeyVaultProperties() { } public Azure.Provisioning.BicepValue Identity { get { throw null; } set { } } @@ -219,7 +224,7 @@ public enum ContainerRegistryNetworkRuleDefaultAction Allow = 0, Deny = 1, } - public partial class ContainerRegistryNetworkRuleSet : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerRegistryNetworkRuleSet : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerRegistryNetworkRuleSet() { } public Azure.Provisioning.BicepValue DefaultAction { get { throw null; } set { } } @@ -243,7 +248,7 @@ public enum ContainerRegistryOSArchitecture [System.Runtime.Serialization.DataMemberAttribute(Name="arm64")] Arm64 = 4, } - public partial class ContainerRegistryOverrideTaskStepProperties : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerRegistryOverrideTaskStepProperties : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerRegistryOverrideTaskStepProperties() { } public Azure.Provisioning.BicepList Arguments { get { throw null; } set { } } @@ -253,14 +258,14 @@ public ContainerRegistryOverrideTaskStepProperties() { } public Azure.Provisioning.BicepValue UpdateTriggerToken { get { throw null; } set { } } public Azure.Provisioning.BicepList Values { get { throw null; } set { } } } - public partial class ContainerRegistryPlatformProperties : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerRegistryPlatformProperties : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerRegistryPlatformProperties() { } public Azure.Provisioning.BicepValue Architecture { get { throw null; } set { } } public Azure.Provisioning.BicepValue OS { get { throw null; } set { } } public Azure.Provisioning.BicepValue Variant { get { throw null; } set { } } } - public partial class ContainerRegistryPolicies : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerRegistryPolicies : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerRegistryPolicies() { } public Azure.Provisioning.BicepValue ExportStatus { get { throw null; } set { } } @@ -275,9 +280,9 @@ public enum ContainerRegistryPolicyStatus [System.Runtime.Serialization.DataMemberAttribute(Name="disabled")] Disabled = 1, } - public partial class ContainerRegistryPrivateEndpointConnection : Azure.Provisioning.Primitives.Resource + public partial class ContainerRegistryPrivateEndpointConnection : Azure.Provisioning.Primitives.ProvisionableResource { - public ContainerRegistryPrivateEndpointConnection(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public ContainerRegistryPrivateEndpointConnection(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue ConnectionState { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } @@ -285,16 +290,15 @@ public partial class ContainerRegistryPrivateEndpointConnection : Azure.Provisio public Azure.Provisioning.BicepValue PrivateEndpointId { get { throw null; } set { } } public Azure.Provisioning.BicepValue ProvisioningState { get { throw null; } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.ContainerRegistry.ContainerRegistryPrivateEndpointConnection FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.ContainerRegistry.ContainerRegistryPrivateEndpointConnection FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2021_09_01; public static readonly string V2022_12_01; public static readonly string V2023_07_01; - public static readonly string V2023_11_01_preview; } } - public partial class ContainerRegistryPrivateEndpointConnectionData : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerRegistryPrivateEndpointConnectionData : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerRegistryPrivateEndpointConnectionData() { } public Azure.Provisioning.BicepValue ConnectionState { get { throw null; } set { } } @@ -304,7 +308,7 @@ public ContainerRegistryPrivateEndpointConnectionData() { } public Azure.Provisioning.BicepValue ProvisioningState { get { throw null; } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } } - public partial class ContainerRegistryPrivateLinkServiceConnectionState : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerRegistryPrivateLinkServiceConnectionState : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerRegistryPrivateLinkServiceConnectionState() { } public Azure.Provisioning.BicepValue ActionsRequired { get { throw null; } set { } } @@ -332,9 +336,9 @@ public enum ContainerRegistryPublicNetworkAccess Enabled = 0, Disabled = 1, } - public partial class ContainerRegistryReplication : Azure.Provisioning.Primitives.Resource + public partial class ContainerRegistryReplication : Azure.Provisioning.Primitives.ProvisionableResource { - public ContainerRegistryReplication(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public ContainerRegistryReplication(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue IsRegionEndpointEnabled { get { throw null; } set { } } public Azure.Provisioning.BicepValue Location { get { throw null; } set { } } @@ -345,7 +349,7 @@ public partial class ContainerRegistryReplication : Azure.Provisioning.Primitive public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } public Azure.Provisioning.BicepValue ZoneRedundancy { get { throw null; } set { } } - public static Azure.Provisioning.ContainerRegistry.ContainerRegistryReplication FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.ContainerRegistry.ContainerRegistryReplication FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override Azure.Provisioning.Primitives.ResourceNameRequirements GetResourceNameRequirements() { throw null; } public static partial class ResourceVersions @@ -355,38 +359,37 @@ public static partial class ResourceVersions public static readonly string V2021_09_01; public static readonly string V2022_12_01; public static readonly string V2023_07_01; - public static readonly string V2023_11_01_preview; } } - public partial class ContainerRegistryResourceStatus : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerRegistryResourceStatus : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerRegistryResourceStatus() { } public Azure.Provisioning.BicepValue DisplayStatus { get { throw null; } } public Azure.Provisioning.BicepValue Message { get { throw null; } } public Azure.Provisioning.BicepValue Timestamp { get { throw null; } } } - public partial class ContainerRegistryRetentionPolicy : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerRegistryRetentionPolicy : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerRegistryRetentionPolicy() { } public Azure.Provisioning.BicepValue Days { get { throw null; } set { } } public Azure.Provisioning.BicepValue LastUpdatedOn { get { throw null; } } public Azure.Provisioning.BicepValue Status { get { throw null; } set { } } } - public partial class ContainerRegistryRunArgument : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerRegistryRunArgument : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerRegistryRunArgument() { } public Azure.Provisioning.BicepValue IsSecret { get { throw null; } set { } } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } public Azure.Provisioning.BicepValue Value { get { throw null; } set { } } } - public partial class ContainerRegistryRunContent : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerRegistryRunContent : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerRegistryRunContent() { } public Azure.Provisioning.BicepValue AgentPoolName { get { throw null; } set { } } public Azure.Provisioning.BicepValue IsArchiveEnabled { get { throw null; } set { } } public Azure.Provisioning.BicepValue LogTemplate { get { throw null; } set { } } } - public partial class ContainerRegistryRunData : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerRegistryRunData : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerRegistryRunData() { } public Azure.Provisioning.BicepValue AgentCpu { get { throw null; } set { } } @@ -433,7 +436,7 @@ public enum ContainerRegistryRunType AutoBuild = 2, AutoRun = 3, } - public partial class ContainerRegistrySecretObject : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerRegistrySecretObject : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerRegistrySecretObject() { } public Azure.Provisioning.BicepValue ObjectType { get { throw null; } set { } } @@ -445,9 +448,9 @@ public enum ContainerRegistrySecretObjectType [System.Runtime.Serialization.DataMemberAttribute(Name="Vaultsecret")] VaultSecret = 1, } - public partial class ContainerRegistryService : Azure.Provisioning.Primitives.Resource + public partial class ContainerRegistryService : Azure.Provisioning.Primitives.ProvisionableResource { - public ContainerRegistryService(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public ContainerRegistryService(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue CreatedOn { get { throw null; } } public Azure.Provisioning.BicepList DataEndpointHostNames { get { throw null; } } public Azure.Provisioning.BicepValue Encryption { get { throw null; } set { } } @@ -469,9 +472,9 @@ public partial class ContainerRegistryService : Azure.Provisioning.Primitives.Re public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } public Azure.Provisioning.BicepValue ZoneRedundancy { get { throw null; } set { } } - public Azure.Provisioning.Authorization.RoleAssignment CreateRoleAssignment(Azure.Provisioning.ContainerRegistry.ContainerRegistryBuiltInRole role, Azure.Provisioning.BicepValue principalType, Azure.Provisioning.BicepValue principalId, string? identifierNameSuffix = null) { throw null; } + public Azure.Provisioning.Authorization.RoleAssignment CreateRoleAssignment(Azure.Provisioning.ContainerRegistry.ContainerRegistryBuiltInRole role, Azure.Provisioning.BicepValue principalType, Azure.Provisioning.BicepValue principalId, string? bicepIdentifierSuffix = null) { throw null; } public Azure.Provisioning.Authorization.RoleAssignment CreateRoleAssignment(Azure.Provisioning.ContainerRegistry.ContainerRegistryBuiltInRole role, Azure.Provisioning.Roles.UserAssignedIdentity identity) { throw null; } - public static Azure.Provisioning.ContainerRegistry.ContainerRegistryService FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.ContainerRegistry.ContainerRegistryService FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override Azure.Provisioning.Primitives.ResourceNameRequirements GetResourceNameRequirements() { throw null; } public static partial class ResourceVersions @@ -482,10 +485,9 @@ public static partial class ResourceVersions public static readonly string V2021_09_01; public static readonly string V2022_12_01; public static readonly string V2023_07_01; - public static readonly string V2023_11_01_preview; } } - public partial class ContainerRegistrySku : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerRegistrySku : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerRegistrySku() { } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } @@ -505,7 +507,7 @@ public enum ContainerRegistrySkuTier Standard = 2, Premium = 3, } - public partial class ContainerRegistrySourceTrigger : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerRegistrySourceTrigger : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerRegistrySourceTrigger() { } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } @@ -513,7 +515,7 @@ public ContainerRegistrySourceTrigger() { } public Azure.Provisioning.BicepList SourceTriggerEvents { get { throw null; } set { } } public Azure.Provisioning.BicepValue Status { get { throw null; } set { } } } - public partial class ContainerRegistrySourceTriggerDescriptor : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerRegistrySourceTriggerDescriptor : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerRegistrySourceTriggerDescriptor() { } public Azure.Provisioning.BicepValue BranchName { get { throw null; } set { } } @@ -531,9 +533,9 @@ public enum ContainerRegistrySourceTriggerEvent [System.Runtime.Serialization.DataMemberAttribute(Name="pullrequest")] PullRequest = 1, } - public partial class ContainerRegistryTask : Azure.Provisioning.Primitives.Resource + public partial class ContainerRegistryTask : Azure.Provisioning.Primitives.ProvisionableResource { - public ContainerRegistryTask(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public ContainerRegistryTask(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue AgentCpu { get { throw null; } set { } } public Azure.Provisioning.BicepValue AgentPoolName { get { throw null; } set { } } public Azure.Provisioning.BicepValue CreatedOn { get { throw null; } } @@ -553,26 +555,25 @@ public partial class ContainerRegistryTask : Azure.Provisioning.Primitives.Resou public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } public Azure.Provisioning.BicepValue TimeoutInSeconds { get { throw null; } set { } } public Azure.Provisioning.BicepValue Trigger { get { throw null; } set { } } - public static Azure.Provisioning.ContainerRegistry.ContainerRegistryTask FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.ContainerRegistry.ContainerRegistryTask FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override Azure.Provisioning.Primitives.ResourceNameRequirements GetResourceNameRequirements() { throw null; } public static partial class ResourceVersions { public static readonly string V2018_09_01; public static readonly string V2019_04_01; - public static readonly string V2019_06_01_preview; } } - public partial class ContainerRegistryTaskOverridableValue : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerRegistryTaskOverridableValue : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerRegistryTaskOverridableValue() { } public Azure.Provisioning.BicepValue IsSecret { get { throw null; } set { } } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } public Azure.Provisioning.BicepValue Value { get { throw null; } set { } } } - public partial class ContainerRegistryTaskRun : Azure.Provisioning.Primitives.Resource + public partial class ContainerRegistryTaskRun : Azure.Provisioning.Primitives.ProvisionableResource { - public ContainerRegistryTaskRun(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public ContainerRegistryTaskRun(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue ForceUpdateTag { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Identity { get { throw null; } set { } } @@ -583,10 +584,15 @@ public partial class ContainerRegistryTaskRun : Azure.Provisioning.Primitives.Re public Azure.Provisioning.BicepValue RunRequest { get { throw null; } set { } } public Azure.Provisioning.BicepValue RunResult { get { throw null; } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.ContainerRegistry.ContainerRegistryTaskRun FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.ContainerRegistry.ContainerRegistryTaskRun FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { - public static readonly string V2019_06_01_preview; + public static readonly string V2017_03_01; + public static readonly string V2017_10_01; + public static readonly string V2019_05_01; + public static readonly string V2021_09_01; + public static readonly string V2022_12_01; + public static readonly string V2023_07_01; } } public partial class ContainerRegistryTaskRunContent : Azure.Provisioning.ContainerRegistry.ContainerRegistryRunContent @@ -600,29 +606,29 @@ public enum ContainerRegistryTaskStatus Disabled = 0, Enabled = 1, } - public partial class ContainerRegistryTaskStepProperties : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerRegistryTaskStepProperties : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerRegistryTaskStepProperties() { } public Azure.Provisioning.BicepList BaseImageDependencies { get { throw null; } } public Azure.Provisioning.BicepValue ContextAccessToken { get { throw null; } set { } } public Azure.Provisioning.BicepValue ContextPath { get { throw null; } set { } } } - public partial class ContainerRegistryTimerTrigger : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerRegistryTimerTrigger : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerRegistryTimerTrigger() { } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } public Azure.Provisioning.BicepValue Schedule { get { throw null; } set { } } public Azure.Provisioning.BicepValue Status { get { throw null; } set { } } } - public partial class ContainerRegistryTimerTriggerDescriptor : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerRegistryTimerTriggerDescriptor : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerRegistryTimerTriggerDescriptor() { } public Azure.Provisioning.BicepValue ScheduleOccurrence { get { throw null; } set { } } public Azure.Provisioning.BicepValue TimerTriggerName { get { throw null; } set { } } } - public partial class ContainerRegistryToken : Azure.Provisioning.Primitives.Resource + public partial class ContainerRegistryToken : Azure.Provisioning.Primitives.ProvisionableResource { - public ContainerRegistryToken(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public ContainerRegistryToken(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue CreatedOn { get { throw null; } } public Azure.Provisioning.BicepValue Credentials { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } @@ -632,17 +638,16 @@ public partial class ContainerRegistryToken : Azure.Provisioning.Primitives.Reso public Azure.Provisioning.BicepValue ScopeMapId { get { throw null; } set { } } public Azure.Provisioning.BicepValue Status { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.ContainerRegistry.ContainerRegistryToken FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.ContainerRegistry.ContainerRegistryToken FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override Azure.Provisioning.Primitives.ResourceNameRequirements GetResourceNameRequirements() { throw null; } public static partial class ResourceVersions { public static readonly string V2022_12_01; public static readonly string V2023_07_01; - public static readonly string V2023_11_01_preview; } } - public partial class ContainerRegistryTokenCertificate : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerRegistryTokenCertificate : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerRegistryTokenCertificate() { } public Azure.Provisioning.BicepValue EncodedPemCertificate { get { throw null; } set { } } @@ -657,13 +662,13 @@ public enum ContainerRegistryTokenCertificateName [System.Runtime.Serialization.DataMemberAttribute(Name="certificate2")] Certificate2 = 1, } - public partial class ContainerRegistryTokenCredentials : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerRegistryTokenCredentials : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerRegistryTokenCredentials() { } public Azure.Provisioning.BicepList Certificates { get { throw null; } set { } } public Azure.Provisioning.BicepList Passwords { get { throw null; } set { } } } - public partial class ContainerRegistryTokenPassword : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerRegistryTokenPassword : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerRegistryTokenPassword() { } public Azure.Provisioning.BicepValue CreatedOn { get { throw null; } set { } } @@ -685,7 +690,7 @@ public enum ContainerRegistryTokenStatus [System.Runtime.Serialization.DataMemberAttribute(Name="disabled")] Disabled = 1, } - public partial class ContainerRegistryTriggerProperties : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerRegistryTriggerProperties : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerRegistryTriggerProperties() { } public Azure.Provisioning.BicepValue BaseImageTrigger { get { throw null; } set { } } @@ -697,7 +702,7 @@ public enum ContainerRegistryTriggerStatus Disabled = 0, Enabled = 1, } - public partial class ContainerRegistryTrustPolicy : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerRegistryTrustPolicy : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerRegistryTrustPolicy() { } public Azure.Provisioning.BicepValue PolicyType { get { throw null; } set { } } @@ -712,9 +717,9 @@ public enum ContainerRegistryUpdateTriggerPayloadType Default = 0, Token = 1, } - public partial class ContainerRegistryWebhook : Azure.Provisioning.Primitives.Resource + public partial class ContainerRegistryWebhook : Azure.Provisioning.Primitives.ProvisionableResource { - public ContainerRegistryWebhook(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public ContainerRegistryWebhook(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepList Actions { get { throw null; } set { } } public Azure.Provisioning.BicepDictionary CustomHeaders { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } @@ -727,7 +732,7 @@ public partial class ContainerRegistryWebhook : Azure.Provisioning.Primitives.Re public Azure.Provisioning.BicepValue Status { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } - public static Azure.Provisioning.ContainerRegistry.ContainerRegistryWebhook FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.ContainerRegistry.ContainerRegistryWebhook FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override Azure.Provisioning.Primitives.ResourceNameRequirements GetResourceNameRequirements() { throw null; } public static partial class ResourceVersions @@ -737,7 +742,6 @@ public static partial class ResourceVersions public static readonly string V2021_09_01; public static readonly string V2022_12_01; public static readonly string V2023_07_01; - public static readonly string V2023_11_01_preview; } } public enum ContainerRegistryWebhookAction @@ -765,16 +769,16 @@ public enum ContainerRegistryZoneRedundancy Enabled = 0, Disabled = 1, } - public partial class CustomRegistryCredentials : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class CustomRegistryCredentials : Azure.Provisioning.Primitives.ProvisionableConstruct { public CustomRegistryCredentials() { } public Azure.Provisioning.BicepValue Identity { get { throw null; } set { } } public Azure.Provisioning.BicepValue Password { get { throw null; } set { } } public Azure.Provisioning.BicepValue UserName { get { throw null; } set { } } } - public partial class ScopeMap : Azure.Provisioning.Primitives.Resource + public partial class ScopeMap : Azure.Provisioning.Primitives.ProvisionableResource { - public ScopeMap(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public ScopeMap(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepList Actions { get { throw null; } set { } } public Azure.Provisioning.BicepValue CreatedOn { get { throw null; } } public Azure.Provisioning.BicepValue Description { get { throw null; } set { } } @@ -784,17 +788,16 @@ public partial class ScopeMap : Azure.Provisioning.Primitives.Resource public Azure.Provisioning.BicepValue ProvisioningState { get { throw null; } } public Azure.Provisioning.BicepValue ScopeMapType { get { throw null; } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.ContainerRegistry.ScopeMap FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.ContainerRegistry.ScopeMap FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override Azure.Provisioning.Primitives.ResourceNameRequirements GetResourceNameRequirements() { throw null; } public static partial class ResourceVersions { public static readonly string V2022_12_01; public static readonly string V2023_07_01; - public static readonly string V2023_11_01_preview; } } - public partial class SourceCodeRepoAuthInfo : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class SourceCodeRepoAuthInfo : Azure.Provisioning.Primitives.ProvisionableConstruct { public SourceCodeRepoAuthInfo() { } public Azure.Provisioning.BicepValue ExpireInSeconds { get { throw null; } set { } } @@ -809,7 +812,7 @@ public enum SourceCodeRepoAuthTokenType Pat = 0, OAuth = 1, } - public partial class SourceCodeRepoProperties : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class SourceCodeRepoProperties : Azure.Provisioning.Primitives.ProvisionableConstruct { public SourceCodeRepoProperties() { } public Azure.Provisioning.BicepValue Branch { get { throw null; } set { } } diff --git a/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/ContainerRegistryAgentPool.cs b/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/ContainerRegistryAgentPool.cs index 3a0b20c8fb41..5a48df65b961 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/ContainerRegistryAgentPool.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/ContainerRegistryAgentPool.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.ContainerRegistry; /// /// ContainerRegistryAgentPool. /// -public partial class ContainerRegistryAgentPool : Resource +public partial class ContainerRegistryAgentPool : ProvisionableResource { /// /// The name of the agent pool. @@ -87,15 +87,15 @@ public partial class ContainerRegistryAgentPool : Resource /// /// Creates a new ContainerRegistryAgentPool. /// - /// + /// /// The the Bicep identifier name of the ContainerRegistryAgentPool /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the ContainerRegistryAgentPool. - public ContainerRegistryAgentPool(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.ContainerRegistry/registries/agentPools", resourceVersion ?? "2019-06-01-preview") + public ContainerRegistryAgentPool(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.ContainerRegistry/registries/agentPools", resourceVersion ?? "2023-07-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _location = BicepValue.DefineProperty(this, "Location", ["location"], isRequired: true); @@ -116,15 +116,40 @@ public ContainerRegistryAgentPool(string identifierName, string? resourceVersion public static class ResourceVersions { /// - /// 2019-06-01-preview. + /// 2023-07-01. /// - public static readonly string V2019_06_01_preview = "2019-06-01-preview"; + public static readonly string V2023_07_01 = "2023-07-01"; + + /// + /// 2022-12-01. + /// + public static readonly string V2022_12_01 = "2022-12-01"; + + /// + /// 2021-09-01. + /// + public static readonly string V2021_09_01 = "2021-09-01"; + + /// + /// 2019-05-01. + /// + public static readonly string V2019_05_01 = "2019-05-01"; + + /// + /// 2017-10-01. + /// + public static readonly string V2017_10_01 = "2017-10-01"; + + /// + /// 2017-03-01. + /// + public static readonly string V2017_03_01 = "2017-03-01"; } /// /// Creates a reference to an existing ContainerRegistryAgentPool. /// - /// + /// /// The the Bicep identifier name of the ContainerRegistryAgentPool /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -132,6 +157,6 @@ public static class ResourceVersions /// /// Version of the ContainerRegistryAgentPool. /// The existing ContainerRegistryAgentPool resource. - public static ContainerRegistryAgentPool FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static ContainerRegistryAgentPool FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/ContainerRegistryPrivateEndpointConnection.cs b/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/ContainerRegistryPrivateEndpointConnection.cs index bca3bba732e2..3b71f7f02944 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/ContainerRegistryPrivateEndpointConnection.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/ContainerRegistryPrivateEndpointConnection.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.ContainerRegistry; /// /// ContainerRegistryPrivateEndpointConnection. /// -public partial class ContainerRegistryPrivateEndpointConnection : Resource +public partial class ContainerRegistryPrivateEndpointConnection : ProvisionableResource { /// /// The name of the private endpoint connection. @@ -63,7 +63,7 @@ public partial class ContainerRegistryPrivateEndpointConnection : Resource /// /// Creates a new ContainerRegistryPrivateEndpointConnection. /// - /// + /// /// The the Bicep identifier name of the /// ContainerRegistryPrivateEndpointConnection resource. This can be used /// to refer to the resource in expressions, but is not the Azure name of @@ -71,8 +71,8 @@ public partial class ContainerRegistryPrivateEndpointConnection : Resource /// underscores. /// /// Version of the ContainerRegistryPrivateEndpointConnection. - public ContainerRegistryPrivateEndpointConnection(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.ContainerRegistry/registries/privateEndpointConnections", resourceVersion ?? "2023-07-01") + public ContainerRegistryPrivateEndpointConnection(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.ContainerRegistry/registries/privateEndpointConnections", resourceVersion ?? "2023-07-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _connectionState = BicepValue.DefineProperty(this, "ConnectionState", ["properties", "privateLinkServiceConnectionState"]); @@ -88,11 +88,6 @@ public ContainerRegistryPrivateEndpointConnection(string identifierName, string? /// public static class ResourceVersions { - /// - /// 2023-11-01-preview. - /// - public static readonly string V2023_11_01_preview = "2023-11-01-preview"; - /// /// 2023-07-01. /// @@ -113,7 +108,7 @@ public static class ResourceVersions /// Creates a reference to an existing /// ContainerRegistryPrivateEndpointConnection. /// - /// + /// /// The the Bicep identifier name of the /// ContainerRegistryPrivateEndpointConnection resource. This can be used /// to refer to the resource in expressions, but is not the Azure name of @@ -122,6 +117,6 @@ public static class ResourceVersions /// /// Version of the ContainerRegistryPrivateEndpointConnection. /// The existing ContainerRegistryPrivateEndpointConnection resource. - public static ContainerRegistryPrivateEndpointConnection FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static ContainerRegistryPrivateEndpointConnection FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/ContainerRegistryReplication.cs b/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/ContainerRegistryReplication.cs index 55c3a319a9a0..b3c8086f162e 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/ContainerRegistryReplication.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/ContainerRegistryReplication.cs @@ -17,7 +17,7 @@ namespace Azure.Provisioning.ContainerRegistry; /// /// ContainerRegistryReplication. /// -public partial class ContainerRegistryReplication : Resource +public partial class ContainerRegistryReplication : ProvisionableResource { /// /// The name of the replication. @@ -87,15 +87,15 @@ public partial class ContainerRegistryReplication : Resource /// /// Creates a new ContainerRegistryReplication. /// - /// + /// /// The the Bicep identifier name of the ContainerRegistryReplication /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the ContainerRegistryReplication. - public ContainerRegistryReplication(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.ContainerRegistry/registries/replications", resourceVersion ?? "2023-07-01") + public ContainerRegistryReplication(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.ContainerRegistry/registries/replications", resourceVersion ?? "2023-07-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _location = BicepValue.DefineProperty(this, "Location", ["location"], isRequired: true); @@ -114,11 +114,6 @@ public ContainerRegistryReplication(string identifierName, string? resourceVersi /// public static class ResourceVersions { - /// - /// 2023-11-01-preview. - /// - public static readonly string V2023_11_01_preview = "2023-11-01-preview"; - /// /// 2023-07-01. /// @@ -148,7 +143,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing ContainerRegistryReplication. /// - /// + /// /// The the Bicep identifier name of the ContainerRegistryReplication /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -156,8 +151,8 @@ public static class ResourceVersions /// /// Version of the ContainerRegistryReplication. /// The existing ContainerRegistryReplication resource. - public static ContainerRegistryReplication FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static ContainerRegistryReplication FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; /// /// Get the requirements for naming this ContainerRegistryReplication diff --git a/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/ContainerRegistryService.cs b/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/ContainerRegistryService.cs index 34a40b78613e..d0e324372e0b 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/ContainerRegistryService.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/ContainerRegistryService.cs @@ -20,7 +20,7 @@ namespace Azure.Provisioning.ContainerRegistry; /// /// ContainerRegistryService. /// -public partial class ContainerRegistryService : Resource +public partial class ContainerRegistryService : ProvisionableResource { /// /// The name of the container registry. @@ -156,15 +156,15 @@ public partial class ContainerRegistryService : Resource /// /// Creates a new ContainerRegistryService. /// - /// + /// /// The the Bicep identifier name of the ContainerRegistryService resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, /// numbers, and underscores. /// /// Version of the ContainerRegistryService. - public ContainerRegistryService(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.ContainerRegistry/registries", resourceVersion ?? "2023-07-01") + public ContainerRegistryService(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.ContainerRegistry/registries", resourceVersion ?? "2023-07-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _location = BicepValue.DefineProperty(this, "Location", ["location"], isRequired: true); @@ -194,11 +194,6 @@ public ContainerRegistryService(string identifierName, string? resourceVersion = /// public static class ResourceVersions { - /// - /// 2023-11-01-preview. - /// - public static readonly string V2023_11_01_preview = "2023-11-01-preview"; - /// /// 2023-07-01. /// @@ -233,7 +228,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing ContainerRegistryService. /// - /// + /// /// The the Bicep identifier name of the ContainerRegistryService resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, @@ -241,8 +236,8 @@ public static class ResourceVersions /// /// Version of the ContainerRegistryService. /// The existing ContainerRegistryService resource. - public static ContainerRegistryService FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static ContainerRegistryService FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; /// /// Get the requirements for naming this ContainerRegistryService resource. @@ -260,10 +255,10 @@ public override ResourceNameRequirements GetResourceNameRequirements() => /// The . /// The . public RoleAssignment CreateRoleAssignment(ContainerRegistryBuiltInRole role, UserAssignedIdentity identity) => - new($"{IdentifierName}_{identity.IdentifierName}_{ContainerRegistryBuiltInRole.GetBuiltInRoleName(role)}") + new($"{BicepIdentifier}_{identity.BicepIdentifier}_{ContainerRegistryBuiltInRole.GetBuiltInRoleName(role)}") { Name = BicepFunction.CreateGuid(Id, identity.PrincipalId, BicepFunction.GetSubscriptionResourceId("Microsoft.Authorization/roleDefinitions", role.ToString())), - Scope = new IdentifierExpression(IdentifierName), + Scope = new IdentifierExpression(BicepIdentifier), PrincipalType = RoleManagementPrincipalType.ServicePrincipal, RoleDefinitionId = BicepFunction.GetSubscriptionResourceId("Microsoft.Authorization/roleDefinitions", role.ToString()), PrincipalId = identity.PrincipalId @@ -276,13 +271,13 @@ public RoleAssignment CreateRoleAssignment(ContainerRegistryBuiltInRole role, Us /// The role to grant. /// The type of the principal to assign to. /// The principal to assign to. - /// Optional role assignment identifier name suffix. + /// Optional role assignment identifier name suffix. /// The . - public RoleAssignment CreateRoleAssignment(ContainerRegistryBuiltInRole role, BicepValue principalType, BicepValue principalId, string? identifierNameSuffix = default) => - new($"{IdentifierName}_{ContainerRegistryBuiltInRole.GetBuiltInRoleName(role)}{(identifierNameSuffix is null ? "" : "_")}{identifierNameSuffix}") + public RoleAssignment CreateRoleAssignment(ContainerRegistryBuiltInRole role, BicepValue principalType, BicepValue principalId, string? bicepIdentifierSuffix = default) => + new($"{BicepIdentifier}_{ContainerRegistryBuiltInRole.GetBuiltInRoleName(role)}{(bicepIdentifierSuffix is null ? "" : "_")}{bicepIdentifierSuffix}") { Name = BicepFunction.CreateGuid(Id, principalId, BicepFunction.GetSubscriptionResourceId("Microsoft.Authorization/roleDefinitions", role.ToString())), - Scope = new IdentifierExpression(IdentifierName), + Scope = new IdentifierExpression(BicepIdentifier), PrincipalType = principalType, RoleDefinitionId = BicepFunction.GetSubscriptionResourceId("Microsoft.Authorization/roleDefinitions", role.ToString()), PrincipalId = principalId diff --git a/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/ContainerRegistryTask.cs b/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/ContainerRegistryTask.cs index cca671e59e3a..44985c8397eb 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/ContainerRegistryTask.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/ContainerRegistryTask.cs @@ -17,7 +17,7 @@ namespace Azure.Provisioning.ContainerRegistry; /// /// ContainerRegistryTask. /// -public partial class ContainerRegistryTask : Resource +public partial class ContainerRegistryTask : ProvisionableResource { /// /// The name of the container registry task. @@ -148,15 +148,15 @@ public partial class ContainerRegistryTask : Resource /// /// Creates a new ContainerRegistryTask. /// - /// + /// /// The the Bicep identifier name of the ContainerRegistryTask resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, /// numbers, and underscores. /// /// Version of the ContainerRegistryTask. - public ContainerRegistryTask(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.ContainerRegistry/registries/tasks", resourceVersion ?? "2019-04-01") + public ContainerRegistryTask(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.ContainerRegistry/registries/tasks", resourceVersion ?? "2019-04-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _location = BicepValue.DefineProperty(this, "Location", ["location"], isRequired: true); @@ -184,11 +184,6 @@ public ContainerRegistryTask(string identifierName, string? resourceVersion = de /// public static class ResourceVersions { - /// - /// 2019-06-01-preview. - /// - public static readonly string V2019_06_01_preview = "2019-06-01-preview"; - /// /// 2019-04-01. /// @@ -203,7 +198,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing ContainerRegistryTask. /// - /// + /// /// The the Bicep identifier name of the ContainerRegistryTask resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, @@ -211,8 +206,8 @@ public static class ResourceVersions /// /// Version of the ContainerRegistryTask. /// The existing ContainerRegistryTask resource. - public static ContainerRegistryTask FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static ContainerRegistryTask FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; /// /// Get the requirements for naming this ContainerRegistryTask resource. diff --git a/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/ContainerRegistryTaskRun.cs b/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/ContainerRegistryTaskRun.cs index fa07d637f6af..09e465c281ba 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/ContainerRegistryTaskRun.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/ContainerRegistryTaskRun.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.ContainerRegistry; /// /// ContainerRegistryTaskRun. /// -public partial class ContainerRegistryTaskRun : Resource +public partial class ContainerRegistryTaskRun : ProvisionableResource { /// /// The name of the task run. @@ -92,15 +92,15 @@ public partial class ContainerRegistryTaskRun : Resource /// /// Creates a new ContainerRegistryTaskRun. /// - /// + /// /// The the Bicep identifier name of the ContainerRegistryTaskRun resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, /// numbers, and underscores. /// /// Version of the ContainerRegistryTaskRun. - public ContainerRegistryTaskRun(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.ContainerRegistry/registries/taskRuns", resourceVersion ?? "2019-06-01-preview") + public ContainerRegistryTaskRun(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.ContainerRegistry/registries/taskRuns", resourceVersion ?? "2023-07-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _forceUpdateTag = BicepValue.DefineProperty(this, "ForceUpdateTag", ["properties", "forceUpdateTag"]); @@ -120,15 +120,40 @@ public ContainerRegistryTaskRun(string identifierName, string? resourceVersion = public static class ResourceVersions { /// - /// 2019-06-01-preview. + /// 2023-07-01. /// - public static readonly string V2019_06_01_preview = "2019-06-01-preview"; + public static readonly string V2023_07_01 = "2023-07-01"; + + /// + /// 2022-12-01. + /// + public static readonly string V2022_12_01 = "2022-12-01"; + + /// + /// 2021-09-01. + /// + public static readonly string V2021_09_01 = "2021-09-01"; + + /// + /// 2019-05-01. + /// + public static readonly string V2019_05_01 = "2019-05-01"; + + /// + /// 2017-10-01. + /// + public static readonly string V2017_10_01 = "2017-10-01"; + + /// + /// 2017-03-01. + /// + public static readonly string V2017_03_01 = "2017-03-01"; } /// /// Creates a reference to an existing ContainerRegistryTaskRun. /// - /// + /// /// The the Bicep identifier name of the ContainerRegistryTaskRun resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, @@ -136,6 +161,6 @@ public static class ResourceVersions /// /// Version of the ContainerRegistryTaskRun. /// The existing ContainerRegistryTaskRun resource. - public static ContainerRegistryTaskRun FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static ContainerRegistryTaskRun FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/ContainerRegistryToken.cs b/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/ContainerRegistryToken.cs index d4b77df59176..ab464b306344 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/ContainerRegistryToken.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/ContainerRegistryToken.cs @@ -17,7 +17,7 @@ namespace Azure.Provisioning.ContainerRegistry; /// /// ContainerRegistryToken. /// -public partial class ContainerRegistryToken : Resource +public partial class ContainerRegistryToken : ProvisionableResource { /// /// The name of the token. @@ -77,15 +77,15 @@ public partial class ContainerRegistryToken : Resource /// /// Creates a new ContainerRegistryToken. /// - /// + /// /// The the Bicep identifier name of the ContainerRegistryToken resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, /// numbers, and underscores. /// /// Version of the ContainerRegistryToken. - public ContainerRegistryToken(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.ContainerRegistry/registries/tokens", resourceVersion ?? "2023-07-01") + public ContainerRegistryToken(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.ContainerRegistry/registries/tokens", resourceVersion ?? "2023-07-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _credentials = BicepValue.DefineProperty(this, "Credentials", ["properties", "credentials"]); @@ -103,11 +103,6 @@ public ContainerRegistryToken(string identifierName, string? resourceVersion = d /// public static class ResourceVersions { - /// - /// 2023-11-01-preview. - /// - public static readonly string V2023_11_01_preview = "2023-11-01-preview"; - /// /// 2023-07-01. /// @@ -122,7 +117,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing ContainerRegistryToken. /// - /// + /// /// The the Bicep identifier name of the ContainerRegistryToken resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, @@ -130,8 +125,8 @@ public static class ResourceVersions /// /// Version of the ContainerRegistryToken. /// The existing ContainerRegistryToken resource. - public static ContainerRegistryToken FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static ContainerRegistryToken FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; /// /// Get the requirements for naming this ContainerRegistryToken resource. diff --git a/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/ContainerRegistryWebhook.cs b/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/ContainerRegistryWebhook.cs index 4df105766f64..32f6c2d67b4a 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/ContainerRegistryWebhook.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/ContainerRegistryWebhook.cs @@ -17,7 +17,7 @@ namespace Azure.Provisioning.ContainerRegistry; /// /// ContainerRegistryWebhook. /// -public partial class ContainerRegistryWebhook : Resource +public partial class ContainerRegistryWebhook : ProvisionableResource { /// /// The name of the webhook. @@ -100,15 +100,15 @@ public partial class ContainerRegistryWebhook : Resource /// /// Creates a new ContainerRegistryWebhook. /// - /// + /// /// The the Bicep identifier name of the ContainerRegistryWebhook resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, /// numbers, and underscores. /// /// Version of the ContainerRegistryWebhook. - public ContainerRegistryWebhook(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.ContainerRegistry/registries/webhooks", resourceVersion ?? "2023-07-01") + public ContainerRegistryWebhook(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.ContainerRegistry/registries/webhooks", resourceVersion ?? "2023-07-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _location = BicepValue.DefineProperty(this, "Location", ["location"], isRequired: true); @@ -129,11 +129,6 @@ public ContainerRegistryWebhook(string identifierName, string? resourceVersion = /// public static class ResourceVersions { - /// - /// 2023-11-01-preview. - /// - public static readonly string V2023_11_01_preview = "2023-11-01-preview"; - /// /// 2023-07-01. /// @@ -163,7 +158,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing ContainerRegistryWebhook. /// - /// + /// /// The the Bicep identifier name of the ContainerRegistryWebhook resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, @@ -171,8 +166,8 @@ public static class ResourceVersions /// /// Version of the ContainerRegistryWebhook. /// The existing ContainerRegistryWebhook resource. - public static ContainerRegistryWebhook FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static ContainerRegistryWebhook FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; /// /// Get the requirements for naming this ContainerRegistryWebhook resource. diff --git a/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryBaseImageDependency.cs b/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryBaseImageDependency.cs index 5e8bc4547386..2a5e7e7c74bb 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryBaseImageDependency.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryBaseImageDependency.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.ContainerRegistry; /// /// Properties that describe a base image dependency. /// -public partial class ContainerRegistryBaseImageDependency : ProvisioningConstruct +public partial class ContainerRegistryBaseImageDependency : ProvisionableConstruct { /// /// The type of the base image dependency. diff --git a/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryBaseImageTrigger.cs b/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryBaseImageTrigger.cs index b0b5cb4926f0..2a13b1e6af46 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryBaseImageTrigger.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryBaseImageTrigger.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.ContainerRegistry; /// /// The trigger based on base image dependency. /// -public partial class ContainerRegistryBaseImageTrigger : ProvisioningConstruct +public partial class ContainerRegistryBaseImageTrigger : ProvisionableConstruct { /// /// The type of the auto trigger for base image dependency updates. diff --git a/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryCredentials.cs b/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryCredentials.cs index 56802a80f708..e2e477de3f24 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryCredentials.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryCredentials.cs @@ -13,7 +13,7 @@ namespace Azure.Provisioning.ContainerRegistry; /// The parameters that describes a set of credentials that will be used when a /// run is invoked. /// -public partial class ContainerRegistryCredentials : ProvisioningConstruct +public partial class ContainerRegistryCredentials : ProvisionableConstruct { /// /// The authentication mode which determines the source registry login diff --git a/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryEncryption.cs b/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryEncryption.cs index d24935cf67ff..cca29eefc074 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryEncryption.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryEncryption.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.ContainerRegistry; /// /// The ContainerRegistryEncryption. /// -public partial class ContainerRegistryEncryption : ProvisioningConstruct +public partial class ContainerRegistryEncryption : ProvisionableConstruct { /// /// Indicates whether or not the encryption is enabled for container diff --git a/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryIPRule.cs b/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryIPRule.cs index d17c47a1d412..4ed5f317a996 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryIPRule.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryIPRule.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.ContainerRegistry; /// /// IP rule with specific IP or IP range in CIDR format. /// -public partial class ContainerRegistryIPRule : ProvisioningConstruct +public partial class ContainerRegistryIPRule : ProvisionableConstruct { /// /// The action of IP ACL rule. diff --git a/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryImageDescriptor.cs b/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryImageDescriptor.cs index d24f17e024ce..006579b85a24 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryImageDescriptor.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryImageDescriptor.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.ContainerRegistry; /// /// Properties for a registry image. /// -public partial class ContainerRegistryImageDescriptor : ProvisioningConstruct +public partial class ContainerRegistryImageDescriptor : ProvisionableConstruct { /// /// The registry login server. diff --git a/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryImageUpdateTrigger.cs b/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryImageUpdateTrigger.cs index d59c197e3c59..bf651d4cd8a7 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryImageUpdateTrigger.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryImageUpdateTrigger.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.ContainerRegistry; /// /// The image update trigger that caused a build. /// -public partial class ContainerRegistryImageUpdateTrigger : ProvisioningConstruct +public partial class ContainerRegistryImageUpdateTrigger : ProvisionableConstruct { /// /// The unique ID of the trigger. diff --git a/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryKeyVaultProperties.cs b/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryKeyVaultProperties.cs index ac114e97f25d..af1e9ea4e961 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryKeyVaultProperties.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryKeyVaultProperties.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.ContainerRegistry; /// /// The ContainerRegistryKeyVaultProperties. /// -public partial class ContainerRegistryKeyVaultProperties : ProvisioningConstruct +public partial class ContainerRegistryKeyVaultProperties : ProvisionableConstruct { /// /// Key vault uri to access the encryption key. diff --git a/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryNetworkRuleSet.cs b/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryNetworkRuleSet.cs index b5f7e534ddbb..529299b43244 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryNetworkRuleSet.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryNetworkRuleSet.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.ContainerRegistry; /// /// The network rule set for a container registry. /// -public partial class ContainerRegistryNetworkRuleSet : ProvisioningConstruct +public partial class ContainerRegistryNetworkRuleSet : ProvisionableConstruct { /// /// The default action of allow or deny when no other rules match. diff --git a/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryOverrideTaskStepProperties.cs b/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryOverrideTaskStepProperties.cs index 0455a7e18864..98db231974c5 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryOverrideTaskStepProperties.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryOverrideTaskStepProperties.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.ContainerRegistry; /// /// The ContainerRegistryOverrideTaskStepProperties. /// -public partial class ContainerRegistryOverrideTaskStepProperties : ProvisioningConstruct +public partial class ContainerRegistryOverrideTaskStepProperties : ProvisionableConstruct { /// /// The source context against which run has to be queued. diff --git a/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryPlatformProperties.cs b/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryPlatformProperties.cs index ee57f1f16e7d..a54a61352084 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryPlatformProperties.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryPlatformProperties.cs @@ -10,7 +10,7 @@ namespace Azure.Provisioning.ContainerRegistry; /// /// The platform properties against which the run has to happen. /// -public partial class ContainerRegistryPlatformProperties : ProvisioningConstruct +public partial class ContainerRegistryPlatformProperties : ProvisionableConstruct { /// /// The operating system type required for the run. diff --git a/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryPolicies.cs b/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryPolicies.cs index 1787387c68a6..01e740aa821f 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryPolicies.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryPolicies.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.ContainerRegistry; /// /// The policies for a container registry. /// -public partial class ContainerRegistryPolicies : ProvisioningConstruct +public partial class ContainerRegistryPolicies : ProvisionableConstruct { /// /// The value that indicates whether the policy is enabled or not. diff --git a/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryPrivateEndpointConnectionData.cs b/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryPrivateEndpointConnectionData.cs index f12bb6ed5390..a94e6e3e34cb 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryPrivateEndpointConnectionData.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryPrivateEndpointConnectionData.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.ContainerRegistry; /// model. An object that represents a private endpoint connection /// for a container registry. /// -public partial class ContainerRegistryPrivateEndpointConnectionData : ProvisioningConstruct +public partial class ContainerRegistryPrivateEndpointConnectionData : ProvisionableConstruct { /// /// Gets or sets Id. diff --git a/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryPrivateLinkServiceConnectionState.cs b/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryPrivateLinkServiceConnectionState.cs index bb768c4f0835..fd391835a032 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryPrivateLinkServiceConnectionState.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryPrivateLinkServiceConnectionState.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.ContainerRegistry; /// /// The state of a private link service connection. /// -public partial class ContainerRegistryPrivateLinkServiceConnectionState : ProvisioningConstruct +public partial class ContainerRegistryPrivateLinkServiceConnectionState : ProvisionableConstruct { /// /// The private link service connection status. diff --git a/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryResourceStatus.cs b/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryResourceStatus.cs index 714d9084f5bc..6b49d39c263a 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryResourceStatus.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryResourceStatus.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.ContainerRegistry; /// /// The status of an Azure resource at the time the operation was called. /// -public partial class ContainerRegistryResourceStatus : ProvisioningConstruct +public partial class ContainerRegistryResourceStatus : ProvisionableConstruct { /// /// The short label for the status. diff --git a/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryRetentionPolicy.cs b/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryRetentionPolicy.cs index 93ca72e9b4b2..1e11416ae51d 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryRetentionPolicy.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryRetentionPolicy.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.ContainerRegistry; /// /// The retention policy for a container registry. /// -public partial class ContainerRegistryRetentionPolicy : ProvisioningConstruct +public partial class ContainerRegistryRetentionPolicy : ProvisionableConstruct { /// /// The number of days to retain an untagged manifest after which it gets diff --git a/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryRunArgument.cs b/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryRunArgument.cs index 8a057f6264d5..a550aa8acc35 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryRunArgument.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryRunArgument.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.ContainerRegistry; /// /// The properties of a run argument. /// -public partial class ContainerRegistryRunArgument : ProvisioningConstruct +public partial class ContainerRegistryRunArgument : ProvisionableConstruct { /// /// The name of the argument. diff --git a/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryRunContent.cs b/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryRunContent.cs index 1c0ed5868a5b..3bcf7c9fe26e 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryRunContent.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryRunContent.cs @@ -21,7 +21,7 @@ namespace Azure.Provisioning.ContainerRegistry; /// and /// Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryTaskRunContent. /// -public partial class ContainerRegistryRunContent : ProvisioningConstruct +public partial class ContainerRegistryRunContent : ProvisionableConstruct { /// /// The value that indicates whether archiving is enabled for the run or diff --git a/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryRunData.cs b/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryRunData.cs index b370d4716db2..03b0f42703ab 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryRunData.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryRunData.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.ContainerRegistry; /// A class representing the ContainerRegistryRun data model. Run /// resource properties /// -public partial class ContainerRegistryRunData : ProvisioningConstruct +public partial class ContainerRegistryRunData : ProvisionableConstruct { /// /// The unique identifier for the run. diff --git a/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistrySecretObject.cs b/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistrySecretObject.cs index 22b0e2b66477..4c7f5dbb50e5 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistrySecretObject.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistrySecretObject.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.ContainerRegistry; /// /// Describes the properties of a secret object value. /// -public partial class ContainerRegistrySecretObject : ProvisioningConstruct +public partial class ContainerRegistrySecretObject : ProvisionableConstruct { /// /// The value of the secret. The format of this value will be determined diff --git a/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistrySku.cs b/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistrySku.cs index d53ba34b8fbe..e946b2040554 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistrySku.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistrySku.cs @@ -10,7 +10,7 @@ namespace Azure.Provisioning.ContainerRegistry; /// /// The SKU of a container registry. /// -public partial class ContainerRegistrySku : ProvisioningConstruct +public partial class ContainerRegistrySku : ProvisionableConstruct { /// /// The SKU name of the container registry. Required for registry creation. diff --git a/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistrySourceTrigger.cs b/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistrySourceTrigger.cs index 988e379d6c80..8fe0bb4e0ba8 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistrySourceTrigger.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistrySourceTrigger.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.ContainerRegistry; /// /// The properties of a source based trigger. /// -public partial class ContainerRegistrySourceTrigger : ProvisioningConstruct +public partial class ContainerRegistrySourceTrigger : ProvisionableConstruct { /// /// The properties that describes the source(code) for the task. diff --git a/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistrySourceTriggerDescriptor.cs b/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistrySourceTriggerDescriptor.cs index 5694d7ef8c7d..cd593b6a5966 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistrySourceTriggerDescriptor.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistrySourceTriggerDescriptor.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.ContainerRegistry; /// /// The source trigger that caused a run. /// -public partial class ContainerRegistrySourceTriggerDescriptor : ProvisioningConstruct +public partial class ContainerRegistrySourceTriggerDescriptor : ProvisionableConstruct { /// /// The unique ID of the trigger. diff --git a/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryTaskOverridableValue.cs b/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryTaskOverridableValue.cs index 91e940f79f88..1eccd5f96315 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryTaskOverridableValue.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryTaskOverridableValue.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.ContainerRegistry; /// /// The properties of a overridable value that can be passed to a task template. /// -public partial class ContainerRegistryTaskOverridableValue : ProvisioningConstruct +public partial class ContainerRegistryTaskOverridableValue : ProvisionableConstruct { /// /// The name of the overridable value. diff --git a/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryTaskStepProperties.cs b/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryTaskStepProperties.cs index a5bb40ca79d2..1454bf6e5290 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryTaskStepProperties.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryTaskStepProperties.cs @@ -21,7 +21,7 @@ namespace Azure.Provisioning.ContainerRegistry; /// and /// Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryFileTaskStep. /// -public partial class ContainerRegistryTaskStepProperties : ProvisioningConstruct +public partial class ContainerRegistryTaskStepProperties : ProvisionableConstruct { /// /// List of base image dependencies for a step. diff --git a/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryTimerTrigger.cs b/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryTimerTrigger.cs index 960cc7e6b998..31d7fa6994e1 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryTimerTrigger.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryTimerTrigger.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.ContainerRegistry; /// /// The properties of a timer trigger. /// -public partial class ContainerRegistryTimerTrigger : ProvisioningConstruct +public partial class ContainerRegistryTimerTrigger : ProvisionableConstruct { /// /// The CRON expression for the task schedule. diff --git a/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryTimerTriggerDescriptor.cs b/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryTimerTriggerDescriptor.cs index cb40e9d974f0..954acfb5cf48 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryTimerTriggerDescriptor.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryTimerTriggerDescriptor.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.ContainerRegistry; /// /// The ContainerRegistryTimerTriggerDescriptor. /// -public partial class ContainerRegistryTimerTriggerDescriptor : ProvisioningConstruct +public partial class ContainerRegistryTimerTriggerDescriptor : ProvisionableConstruct { /// /// The timer trigger name that caused the run. diff --git a/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryTokenCertificate.cs b/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryTokenCertificate.cs index 41b930d049b5..d787dc95eed6 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryTokenCertificate.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryTokenCertificate.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.ContainerRegistry; /// /// The properties of a certificate used for authenticating a token. /// -public partial class ContainerRegistryTokenCertificate : ProvisioningConstruct +public partial class ContainerRegistryTokenCertificate : ProvisionableConstruct { /// /// Gets or sets the name. diff --git a/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryTokenCredentials.cs b/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryTokenCredentials.cs index da2deb9d5059..3553aab51be5 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryTokenCredentials.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryTokenCredentials.cs @@ -13,7 +13,7 @@ namespace Azure.Provisioning.ContainerRegistry; /// The properties of the credentials that can be used for authenticating the /// token. /// -public partial class ContainerRegistryTokenCredentials : ProvisioningConstruct +public partial class ContainerRegistryTokenCredentials : ProvisionableConstruct { /// /// Gets the certificates. diff --git a/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryTokenPassword.cs b/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryTokenPassword.cs index daf6e6a1709c..978a6cb94e2e 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryTokenPassword.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryTokenPassword.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.ContainerRegistry; /// The password that will be used for authenticating the token of a container /// registry. /// -public partial class ContainerRegistryTokenPassword : ProvisioningConstruct +public partial class ContainerRegistryTokenPassword : ProvisionableConstruct { /// /// The creation datetime of the password. diff --git a/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryTriggerProperties.cs b/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryTriggerProperties.cs index df4c724e7e4d..5d290bbe6971 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryTriggerProperties.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryTriggerProperties.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.ContainerRegistry; /// /// The properties of a trigger. /// -public partial class ContainerRegistryTriggerProperties : ProvisioningConstruct +public partial class ContainerRegistryTriggerProperties : ProvisionableConstruct { /// /// The collection of timer triggers. diff --git a/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryTrustPolicy.cs b/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryTrustPolicy.cs index 91c1682147c5..6e1eb0828195 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryTrustPolicy.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/ContainerRegistryTrustPolicy.cs @@ -10,7 +10,7 @@ namespace Azure.Provisioning.ContainerRegistry; /// /// The content trust policy for a container registry. /// -public partial class ContainerRegistryTrustPolicy : ProvisioningConstruct +public partial class ContainerRegistryTrustPolicy : ProvisionableConstruct { /// /// The type of trust policy. diff --git a/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/CustomRegistryCredentials.cs b/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/CustomRegistryCredentials.cs index 67483d91de6d..0cefd6b45294 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/CustomRegistryCredentials.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/CustomRegistryCredentials.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.ContainerRegistry; /// Describes the credentials that will be used to access a custom registry /// during a run. /// -public partial class CustomRegistryCredentials : ProvisioningConstruct +public partial class CustomRegistryCredentials : ProvisionableConstruct { /// /// The username for logging into the custom registry. diff --git a/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/SourceCodeRepoAuthInfo.cs b/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/SourceCodeRepoAuthInfo.cs index 4e825cd96c12..a41a68c7f8ca 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/SourceCodeRepoAuthInfo.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/SourceCodeRepoAuthInfo.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.ContainerRegistry; /// /// The authorization properties for accessing the source code repository. /// -public partial class SourceCodeRepoAuthInfo : ProvisioningConstruct +public partial class SourceCodeRepoAuthInfo : ProvisionableConstruct { /// /// The type of Auth token. diff --git a/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/SourceCodeRepoProperties.cs b/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/SourceCodeRepoProperties.cs index fbf950eeb86e..f0a619a49498 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/SourceCodeRepoProperties.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/Models/SourceCodeRepoProperties.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.ContainerRegistry; /// /// The properties of the source code repository. /// -public partial class SourceCodeRepoProperties : ProvisioningConstruct +public partial class SourceCodeRepoProperties : ProvisionableConstruct { /// /// The type of source control service. diff --git a/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/ScopeMap.cs b/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/ScopeMap.cs index 446d72b1bed4..acf4f9ade8c8 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/ScopeMap.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Generated/ScopeMap.cs @@ -17,7 +17,7 @@ namespace Azure.Provisioning.ContainerRegistry; /// /// ScopeMap. /// -public partial class ScopeMap : Resource +public partial class ScopeMap : ProvisionableResource { /// /// The name of the scope map. @@ -78,15 +78,15 @@ public partial class ScopeMap : Resource /// /// Creates a new ScopeMap. /// - /// + /// /// The the Bicep identifier name of the ScopeMap resource. This can be /// used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and /// underscores. /// /// Version of the ScopeMap. - public ScopeMap(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.ContainerRegistry/registries/scopeMaps", resourceVersion ?? "2023-07-01") + public ScopeMap(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.ContainerRegistry/registries/scopeMaps", resourceVersion ?? "2023-07-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _actions = BicepList.DefineProperty(this, "Actions", ["properties", "actions"]); @@ -104,11 +104,6 @@ public ScopeMap(string identifierName, string? resourceVersion = default) /// public static class ResourceVersions { - /// - /// 2023-11-01-preview. - /// - public static readonly string V2023_11_01_preview = "2023-11-01-preview"; - /// /// 2023-07-01. /// @@ -123,7 +118,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing ScopeMap. /// - /// + /// /// The the Bicep identifier name of the ScopeMap resource. This can be /// used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and @@ -131,8 +126,8 @@ public static class ResourceVersions /// /// Version of the ScopeMap. /// The existing ScopeMap resource. - public static ScopeMap FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static ScopeMap FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; /// /// Get the requirements for naming this ScopeMap resource. diff --git a/sdk/provisioning/Azure.Provisioning.ContainerService/api/Azure.Provisioning.ContainerService.netstandard2.0.cs b/sdk/provisioning/Azure.Provisioning.ContainerService/api/Azure.Provisioning.ContainerService.netstandard2.0.cs index f7fdcc9a4c76..51a6307fcf36 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerService/api/Azure.Provisioning.ContainerService.netstandard2.0.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerService/api/Azure.Provisioning.ContainerService.netstandard2.0.cs @@ -12,23 +12,23 @@ public enum AgentPoolNetworkPortProtocol [System.Runtime.Serialization.DataMemberAttribute(Name="UDP")] Udp = 1, } - public partial class AgentPoolNetworkPortRange : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class AgentPoolNetworkPortRange : Azure.Provisioning.Primitives.ProvisionableConstruct { public AgentPoolNetworkPortRange() { } public Azure.Provisioning.BicepValue PortEnd { get { throw null; } set { } } public Azure.Provisioning.BicepValue PortStart { get { throw null; } set { } } public Azure.Provisioning.BicepValue Protocol { get { throw null; } set { } } } - public partial class AgentPoolNetworkProfile : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class AgentPoolNetworkProfile : Azure.Provisioning.Primitives.ProvisionableConstruct { public AgentPoolNetworkProfile() { } public Azure.Provisioning.BicepList AllowedHostPorts { get { throw null; } set { } } public Azure.Provisioning.BicepList ApplicationSecurityGroups { get { throw null; } set { } } public Azure.Provisioning.BicepList NodePublicIPTags { get { throw null; } set { } } } - public partial class AgentPoolSnapshot : Azure.Provisioning.Primitives.Resource + public partial class AgentPoolSnapshot : Azure.Provisioning.Primitives.ProvisionableResource { - public AgentPoolSnapshot(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public AgentPoolSnapshot(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue CreationDataSourceResourceId { get { throw null; } set { } } public Azure.Provisioning.BicepValue EnableFips { get { throw null; } } public Azure.Provisioning.BicepValue Id { get { throw null; } } @@ -42,7 +42,7 @@ public partial class AgentPoolSnapshot : Azure.Provisioning.Primitives.Resource public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } public Azure.Provisioning.BicepValue VmSize { get { throw null; } } - public static Azure.Provisioning.ContainerService.AgentPoolSnapshot FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.ContainerService.AgentPoolSnapshot FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2021_08_01; @@ -74,7 +74,6 @@ public static partial class ResourceVersions public static readonly string V2024_06_01; public static readonly string V2024_07_01; public static readonly string V2024_08_01; - public static readonly string V2024_08_02_preview; } } public enum AgentPoolType @@ -82,7 +81,7 @@ public enum AgentPoolType VirtualMachineScaleSets = 0, AvailabilitySet = 1, } - public partial class AgentPoolUpgradeSettings : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class AgentPoolUpgradeSettings : Azure.Provisioning.Primitives.ProvisionableConstruct { public AgentPoolUpgradeSettings() { } public Azure.Provisioning.BicepValue DrainTimeoutInMinutes { get { throw null; } set { } } @@ -99,9 +98,9 @@ public enum AutoScaleExpander [System.Runtime.Serialization.DataMemberAttribute(Name="random")] Random = 3, } - public partial class ContainerServiceAgentPool : Azure.Provisioning.Primitives.Resource + public partial class ContainerServiceAgentPool : Azure.Provisioning.Primitives.ProvisionableResource { - public ContainerServiceAgentPool(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public ContainerServiceAgentPool(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepList AvailabilityZones { get { throw null; } set { } } public Azure.Provisioning.BicepValue CapacityReservationGroupId { get { throw null; } set { } } public Azure.Provisioning.BicepValue Count { get { throw null; } set { } } @@ -149,7 +148,7 @@ public partial class ContainerServiceAgentPool : Azure.Provisioning.Primitives.R public Azure.Provisioning.BicepValue VmSize { get { throw null; } set { } } public Azure.Provisioning.BicepValue VnetSubnetId { get { throw null; } set { } } public Azure.Provisioning.BicepValue WorkloadRuntime { get { throw null; } set { } } - public static Azure.Provisioning.ContainerService.ContainerServiceAgentPool FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.ContainerService.ContainerServiceAgentPool FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override Azure.Provisioning.Primitives.ResourceNameRequirements GetResourceNameRequirements() { throw null; } public static partial class ResourceVersions @@ -204,7 +203,6 @@ public static partial class ResourceVersions public static readonly string V2024_06_01; public static readonly string V2024_07_01; public static readonly string V2024_08_01; - public static readonly string V2024_08_02_preview; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] @@ -233,19 +231,19 @@ public static partial class ResourceVersions public static bool operator !=(Azure.Provisioning.ContainerService.ContainerServiceBuiltInRole left, Azure.Provisioning.ContainerService.ContainerServiceBuiltInRole right) { throw null; } public override string ToString() { throw null; } } - public partial class ContainerServiceDateSpan : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerServiceDateSpan : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerServiceDateSpan() { } public Azure.Provisioning.BicepValue End { get { throw null; } set { } } public Azure.Provisioning.BicepValue Start { get { throw null; } set { } } } - public partial class ContainerServiceIPTag : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerServiceIPTag : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerServiceIPTag() { } public Azure.Provisioning.BicepValue IPTagType { get { throw null; } set { } } public Azure.Provisioning.BicepValue Tag { get { throw null; } set { } } } - public partial class ContainerServiceLinuxProfile : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerServiceLinuxProfile : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerServiceLinuxProfile() { } public Azure.Provisioning.BicepValue AdminUsername { get { throw null; } set { } } @@ -258,15 +256,15 @@ public enum ContainerServiceLoadBalancerSku [System.Runtime.Serialization.DataMemberAttribute(Name="basic")] Basic = 1, } - public partial class ContainerServiceMaintenanceAbsoluteMonthlySchedule : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerServiceMaintenanceAbsoluteMonthlySchedule : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerServiceMaintenanceAbsoluteMonthlySchedule() { } public Azure.Provisioning.BicepValue DayOfMonth { get { throw null; } set { } } public Azure.Provisioning.BicepValue IntervalMonths { get { throw null; } set { } } } - public partial class ContainerServiceMaintenanceConfiguration : Azure.Provisioning.Primitives.Resource + public partial class ContainerServiceMaintenanceConfiguration : Azure.Provisioning.Primitives.ProvisionableResource { - public ContainerServiceMaintenanceConfiguration(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public ContainerServiceMaintenanceConfiguration(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue MaintenanceWindow { get { throw null; } set { } } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } @@ -274,7 +272,7 @@ public partial class ContainerServiceMaintenanceConfiguration : Azure.Provisioni public Azure.Provisioning.ContainerService.ContainerServiceManagedCluster? Parent { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepList TimesInWeek { get { throw null; } set { } } - public static Azure.Provisioning.ContainerService.ContainerServiceMaintenanceConfiguration FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.ContainerService.ContainerServiceMaintenanceConfiguration FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2017_08_31; @@ -327,10 +325,9 @@ public static partial class ResourceVersions public static readonly string V2024_06_01; public static readonly string V2024_07_01; public static readonly string V2024_08_01; - public static readonly string V2024_08_02_preview; } } - public partial class ContainerServiceMaintenanceRelativeMonthlySchedule : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerServiceMaintenanceRelativeMonthlySchedule : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerServiceMaintenanceRelativeMonthlySchedule() { } public Azure.Provisioning.BicepValue DayOfWeek { get { throw null; } set { } } @@ -345,7 +342,7 @@ public enum ContainerServiceMaintenanceRelativeMonthlyScheduleWeekIndex Fourth = 3, Last = 4, } - public partial class ContainerServiceMaintenanceSchedule : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerServiceMaintenanceSchedule : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerServiceMaintenanceSchedule() { } public Azure.Provisioning.BicepValue AbsoluteMonthly { get { throw null; } set { } } @@ -353,13 +350,13 @@ public ContainerServiceMaintenanceSchedule() { } public Azure.Provisioning.BicepValue RelativeMonthly { get { throw null; } set { } } public Azure.Provisioning.BicepValue Weekly { get { throw null; } set { } } } - public partial class ContainerServiceMaintenanceWeeklySchedule : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerServiceMaintenanceWeeklySchedule : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerServiceMaintenanceWeeklySchedule() { } public Azure.Provisioning.BicepValue DayOfWeek { get { throw null; } set { } } public Azure.Provisioning.BicepValue IntervalWeeks { get { throw null; } set { } } } - public partial class ContainerServiceMaintenanceWindow : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerServiceMaintenanceWindow : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerServiceMaintenanceWindow() { } public Azure.Provisioning.BicepValue DurationHours { get { throw null; } set { } } @@ -369,9 +366,9 @@ public ContainerServiceMaintenanceWindow() { } public Azure.Provisioning.BicepValue StartTime { get { throw null; } set { } } public Azure.Provisioning.BicepValue UtcOffset { get { throw null; } set { } } } - public partial class ContainerServiceManagedCluster : Azure.Provisioning.Primitives.Resource + public partial class ContainerServiceManagedCluster : Azure.Provisioning.Primitives.ProvisionableResource { - public ContainerServiceManagedCluster(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public ContainerServiceManagedCluster(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue AadProfile { get { throw null; } set { } } public Azure.Provisioning.BicepDictionary AddonProfiles { get { throw null; } set { } } public Azure.Provisioning.BicepList AgentPoolProfiles { get { throw null; } set { } } @@ -419,9 +416,9 @@ public partial class ContainerServiceManagedCluster : Azure.Provisioning.Primiti public Azure.Provisioning.BicepValue UpgradeOverrideSettings { get { throw null; } set { } } public Azure.Provisioning.BicepValue WindowsProfile { get { throw null; } set { } } public Azure.Provisioning.BicepValue WorkloadAutoScalerProfile { get { throw null; } set { } } - public Azure.Provisioning.Authorization.RoleAssignment CreateRoleAssignment(Azure.Provisioning.ContainerService.ContainerServiceBuiltInRole role, Azure.Provisioning.BicepValue principalType, Azure.Provisioning.BicepValue principalId, string? identifierNameSuffix = null) { throw null; } + public Azure.Provisioning.Authorization.RoleAssignment CreateRoleAssignment(Azure.Provisioning.ContainerService.ContainerServiceBuiltInRole role, Azure.Provisioning.BicepValue principalType, Azure.Provisioning.BicepValue principalId, string? bicepIdentifierSuffix = null) { throw null; } public Azure.Provisioning.Authorization.RoleAssignment CreateRoleAssignment(Azure.Provisioning.ContainerService.ContainerServiceBuiltInRole role, Azure.Provisioning.Roles.UserAssignedIdentity identity) { throw null; } - public static Azure.Provisioning.ContainerService.ContainerServiceManagedCluster FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.ContainerService.ContainerServiceManagedCluster FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override Azure.Provisioning.Primitives.ResourceNameRequirements GetResourceNameRequirements() { throw null; } public static partial class ResourceVersions @@ -476,7 +473,6 @@ public static partial class ResourceVersions public static readonly string V2024_06_01; public static readonly string V2024_07_01; public static readonly string V2024_08_01; - public static readonly string V2024_08_02_preview; } } public enum ContainerServiceNetworkMode @@ -509,7 +505,7 @@ public enum ContainerServiceNetworkPolicy [System.Runtime.Serialization.DataMemberAttribute(Name="cilium")] Cilium = 2, } - public partial class ContainerServiceNetworkProfile : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerServiceNetworkProfile : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerServiceNetworkProfile() { } public Azure.Provisioning.BicepValue DnsServiceIP { get { throw null; } set { } } @@ -558,9 +554,9 @@ public enum ContainerServiceOutboundType [System.Runtime.Serialization.DataMemberAttribute(Name="userAssignedNATGateway")] UserAssignedNatGateway = 3, } - public partial class ContainerServicePrivateEndpointConnection : Azure.Provisioning.Primitives.Resource + public partial class ContainerServicePrivateEndpointConnection : Azure.Provisioning.Primitives.ProvisionableResource { - public ContainerServicePrivateEndpointConnection(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public ContainerServicePrivateEndpointConnection(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue ConnectionState { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } @@ -568,7 +564,7 @@ public partial class ContainerServicePrivateEndpointConnection : Azure.Provision public Azure.Provisioning.BicepValue PrivateEndpointId { get { throw null; } set { } } public Azure.Provisioning.BicepValue ProvisioningState { get { throw null; } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.ContainerService.ContainerServicePrivateEndpointConnection FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.ContainerService.ContainerServicePrivateEndpointConnection FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2017_08_31; @@ -621,7 +617,6 @@ public static partial class ResourceVersions public static readonly string V2024_06_01; public static readonly string V2024_07_01; public static readonly string V2024_08_01; - public static readonly string V2024_08_02_preview; } } public enum ContainerServicePrivateEndpointConnectionProvisioningState @@ -632,7 +627,7 @@ public enum ContainerServicePrivateEndpointConnectionProvisioningState Failed = 3, Succeeded = 4, } - public partial class ContainerServicePrivateLinkResourceData : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerServicePrivateLinkResourceData : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerServicePrivateLinkResourceData() { } public Azure.Provisioning.BicepValue GroupId { get { throw null; } set { } } @@ -642,7 +637,7 @@ public ContainerServicePrivateLinkResourceData() { } public Azure.Provisioning.BicepList RequiredMembers { get { throw null; } set { } } public Azure.Provisioning.BicepValue ResourceType { get { throw null; } set { } } } - public partial class ContainerServicePrivateLinkServiceConnectionState : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerServicePrivateLinkServiceConnectionState : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerServicePrivateLinkServiceConnectionState() { } public Azure.Provisioning.BicepValue Description { get { throw null; } set { } } @@ -660,7 +655,7 @@ public enum ContainerServicePublicNetworkAccess Enabled = 0, Disabled = 1, } - public partial class ContainerServiceSshPublicKey : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerServiceSshPublicKey : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerServiceSshPublicKey() { } public Azure.Provisioning.BicepValue KeyData { get { throw null; } set { } } @@ -670,21 +665,21 @@ public enum ContainerServiceStateCode Running = 0, Stopped = 1, } - public partial class ContainerServiceTimeInWeek : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerServiceTimeInWeek : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerServiceTimeInWeek() { } public Azure.Provisioning.BicepValue Day { get { throw null; } set { } } public Azure.Provisioning.BicepList HourSlots { get { throw null; } set { } } } - public partial class ContainerServiceTimeSpan : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerServiceTimeSpan : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerServiceTimeSpan() { } public Azure.Provisioning.BicepValue EndOn { get { throw null; } set { } } public Azure.Provisioning.BicepValue StartOn { get { throw null; } set { } } } - public partial class ContainerServiceTrustedAccessRoleBinding : Azure.Provisioning.Primitives.Resource + public partial class ContainerServiceTrustedAccessRoleBinding : Azure.Provisioning.Primitives.ProvisionableResource { - public ContainerServiceTrustedAccessRoleBinding(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public ContainerServiceTrustedAccessRoleBinding(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } public Azure.Provisioning.ContainerService.ContainerServiceManagedCluster? Parent { get { throw null; } set { } } @@ -692,7 +687,7 @@ public partial class ContainerServiceTrustedAccessRoleBinding : Azure.Provisioni public Azure.Provisioning.BicepList Roles { get { throw null; } set { } } public Azure.Provisioning.BicepValue SourceResourceId { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.ContainerService.ContainerServiceTrustedAccessRoleBinding FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.ContainerService.ContainerServiceTrustedAccessRoleBinding FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2017_08_31; @@ -745,7 +740,6 @@ public static partial class ResourceVersions public static readonly string V2024_06_01; public static readonly string V2024_07_01; public static readonly string V2024_08_01; - public static readonly string V2024_08_02_preview; } } public enum ContainerServiceTrustedAccessRoleBindingProvisioningState @@ -756,7 +750,7 @@ public enum ContainerServiceTrustedAccessRoleBindingProvisioningState Succeeded = 3, Updating = 4, } - public partial class ContainerServiceUserAssignedIdentity : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ContainerServiceUserAssignedIdentity : Azure.Provisioning.Primitives.ProvisionableConstruct { public ContainerServiceUserAssignedIdentity() { } public Azure.Provisioning.BicepValue ClientId { get { throw null; } set { } } @@ -791,19 +785,19 @@ public enum IPFamily IPv4 = 0, IPv6 = 1, } - public partial class IstioComponents : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class IstioComponents : Azure.Provisioning.Primitives.ProvisionableConstruct { public IstioComponents() { } public Azure.Provisioning.BicepList EgressGateways { get { throw null; } set { } } public Azure.Provisioning.BicepList IngressGateways { get { throw null; } set { } } } - public partial class IstioEgressGateway : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class IstioEgressGateway : Azure.Provisioning.Primitives.ProvisionableConstruct { public IstioEgressGateway() { } public Azure.Provisioning.BicepValue IsEnabled { get { throw null; } set { } } public Azure.Provisioning.BicepDictionary NodeSelector { get { throw null; } set { } } } - public partial class IstioIngressGateway : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class IstioIngressGateway : Azure.Provisioning.Primitives.ProvisionableConstruct { public IstioIngressGateway() { } public Azure.Provisioning.BicepValue IsEnabled { get { throw null; } set { } } @@ -814,7 +808,7 @@ public enum IstioIngressGatewayMode External = 0, Internal = 1, } - public partial class IstioPluginCertificateAuthority : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class IstioPluginCertificateAuthority : Azure.Provisioning.Primitives.ProvisionableConstruct { public IstioPluginCertificateAuthority() { } public Azure.Provisioning.BicepValue CertChainObjectName { get { throw null; } set { } } @@ -823,14 +817,14 @@ public IstioPluginCertificateAuthority() { } public Azure.Provisioning.BicepValue KeyVaultId { get { throw null; } set { } } public Azure.Provisioning.BicepValue RootCertObjectName { get { throw null; } set { } } } - public partial class IstioServiceMesh : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class IstioServiceMesh : Azure.Provisioning.Primitives.ProvisionableConstruct { public IstioServiceMesh() { } public Azure.Provisioning.BicepValue CertificateAuthorityPlugin { get { throw null; } set { } } public Azure.Provisioning.BicepValue Components { get { throw null; } set { } } public Azure.Provisioning.BicepList Revisions { get { throw null; } set { } } } - public partial class KubeletConfig : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class KubeletConfig : Azure.Provisioning.Primitives.ProvisionableConstruct { public KubeletConfig() { } public Azure.Provisioning.BicepList AllowedUnsafeSysctls { get { throw null; } set { } } @@ -855,7 +849,7 @@ public enum KubernetesSupportPlan KubernetesOfficial = 0, AKSLongTermSupport = 1, } - public partial class LinuxOSConfig : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class LinuxOSConfig : Azure.Provisioning.Primitives.ProvisionableConstruct { public LinuxOSConfig() { } public Azure.Provisioning.BicepValue SwapFileSizeInMB { get { throw null; } set { } } @@ -863,7 +857,7 @@ public LinuxOSConfig() { } public Azure.Provisioning.BicepValue TransparentHugePageDefrag { get { throw null; } set { } } public Azure.Provisioning.BicepValue TransparentHugePageEnabled { get { throw null; } set { } } } - public partial class ManagedClusterAadProfile : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ManagedClusterAadProfile : Azure.Provisioning.Primitives.ProvisionableConstruct { public ManagedClusterAadProfile() { } public Azure.Provisioning.BicepList AdminGroupObjectIds { get { throw null; } set { } } @@ -874,7 +868,7 @@ public ManagedClusterAadProfile() { } public Azure.Provisioning.BicepValue ServerAppSecret { get { throw null; } set { } } public Azure.Provisioning.BicepValue TenantId { get { throw null; } set { } } } - public partial class ManagedClusterAddonProfile : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ManagedClusterAddonProfile : Azure.Provisioning.Primitives.ProvisionableConstruct { public ManagedClusterAddonProfile() { } public Azure.Provisioning.BicepDictionary Config { get { throw null; } set { } } @@ -885,7 +879,7 @@ public partial class ManagedClusterAddonProfileIdentity : Azure.Provisioning.Con { public ManagedClusterAddonProfileIdentity() { } } - public partial class ManagedClusterAgentPoolProfile : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ManagedClusterAgentPoolProfile : Azure.Provisioning.Primitives.ProvisionableConstruct { public ManagedClusterAgentPoolProfile() { } public Azure.Provisioning.BicepValue AgentPoolType { get { throw null; } set { } } @@ -933,7 +927,7 @@ public ManagedClusterAgentPoolProfile() { } public Azure.Provisioning.BicepValue VnetSubnetId { get { throw null; } set { } } public Azure.Provisioning.BicepValue WorkloadRuntime { get { throw null; } set { } } } - public partial class ManagedClusterApiServerAccessProfile : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ManagedClusterApiServerAccessProfile : Azure.Provisioning.Primitives.ProvisionableConstruct { public ManagedClusterApiServerAccessProfile() { } public Azure.Provisioning.BicepList AuthorizedIPRanges { get { throw null; } set { } } @@ -942,7 +936,7 @@ public ManagedClusterApiServerAccessProfile() { } public Azure.Provisioning.BicepValue EnablePrivateClusterPublicFqdn { get { throw null; } set { } } public Azure.Provisioning.BicepValue PrivateDnsZone { get { throw null; } set { } } } - public partial class ManagedClusterAutoScalerProfile : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ManagedClusterAutoScalerProfile : Azure.Provisioning.Primitives.ProvisionableConstruct { public ManagedClusterAutoScalerProfile() { } public Azure.Provisioning.BicepValue BalanceSimilarNodeGroups { get { throw null; } set { } } @@ -963,13 +957,13 @@ public ManagedClusterAutoScalerProfile() { } public Azure.Provisioning.BicepValue SkipNodesWithLocalStorage { get { throw null; } set { } } public Azure.Provisioning.BicepValue SkipNodesWithSystemPods { get { throw null; } set { } } } - public partial class ManagedClusterAutoUpgradeProfile : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ManagedClusterAutoUpgradeProfile : Azure.Provisioning.Primitives.ProvisionableConstruct { public ManagedClusterAutoUpgradeProfile() { } public Azure.Provisioning.BicepValue NodeOSUpgradeChannel { get { throw null; } set { } } public Azure.Provisioning.BicepValue UpgradeChannel { get { throw null; } set { } } } - public partial class ManagedClusterDelegatedIdentity : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ManagedClusterDelegatedIdentity : Azure.Provisioning.Primitives.ProvisionableConstruct { public ManagedClusterDelegatedIdentity() { } public Azure.Provisioning.BicepValue Location { get { throw null; } set { } } @@ -977,7 +971,7 @@ public ManagedClusterDelegatedIdentity() { } public Azure.Provisioning.BicepValue ResourceId { get { throw null; } set { } } public Azure.Provisioning.BicepValue TenantId { get { throw null; } set { } } } - public partial class ManagedClusterHttpProxyConfig : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ManagedClusterHttpProxyConfig : Azure.Provisioning.Primitives.ProvisionableConstruct { public ManagedClusterHttpProxyConfig() { } public Azure.Provisioning.BicepValue HttpProxy { get { throw null; } set { } } @@ -985,7 +979,7 @@ public ManagedClusterHttpProxyConfig() { } public Azure.Provisioning.BicepList NoProxy { get { throw null; } set { } } public Azure.Provisioning.BicepValue TrustedCA { get { throw null; } set { } } } - public partial class ManagedClusterIdentity : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ManagedClusterIdentity : Azure.Provisioning.Primitives.ProvisionableConstruct { public ManagedClusterIdentity() { } public Azure.Provisioning.BicepDictionary DelegatedResources { get { throw null; } set { } } @@ -1004,7 +998,7 @@ public enum ManagedClusterLoadBalancerBackendPoolType NodeIPConfiguration = 0, NodeIP = 1, } - public partial class ManagedClusterLoadBalancerProfile : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ManagedClusterLoadBalancerProfile : Azure.Provisioning.Primitives.ProvisionableConstruct { public ManagedClusterLoadBalancerProfile() { } public Azure.Provisioning.BicepValue AllocatedOutboundPorts { get { throw null; } set { } } @@ -1016,25 +1010,25 @@ public ManagedClusterLoadBalancerProfile() { } public Azure.Provisioning.BicepList OutboundPublicIPPrefixes { get { throw null; } set { } } public Azure.Provisioning.BicepList OutboundPublicIPs { get { throw null; } set { } } } - public partial class ManagedClusterLoadBalancerProfileManagedOutboundIPs : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ManagedClusterLoadBalancerProfileManagedOutboundIPs : Azure.Provisioning.Primitives.ProvisionableConstruct { public ManagedClusterLoadBalancerProfileManagedOutboundIPs() { } public Azure.Provisioning.BicepValue Count { get { throw null; } set { } } public Azure.Provisioning.BicepValue CountIPv6 { get { throw null; } set { } } } - public partial class ManagedClusterMonitorProfileKubeStateMetrics : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ManagedClusterMonitorProfileKubeStateMetrics : Azure.Provisioning.Primitives.ProvisionableConstruct { public ManagedClusterMonitorProfileKubeStateMetrics() { } public Azure.Provisioning.BicepValue MetricAnnotationsAllowList { get { throw null; } set { } } public Azure.Provisioning.BicepValue MetricLabelsAllowlist { get { throw null; } set { } } } - public partial class ManagedClusterMonitorProfileMetrics : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ManagedClusterMonitorProfileMetrics : Azure.Provisioning.Primitives.ProvisionableConstruct { public ManagedClusterMonitorProfileMetrics() { } public Azure.Provisioning.BicepValue IsEnabled { get { throw null; } set { } } public Azure.Provisioning.BicepValue KubeStateMetrics { get { throw null; } set { } } } - public partial class ManagedClusterNatGatewayProfile : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ManagedClusterNatGatewayProfile : Azure.Provisioning.Primitives.ProvisionableConstruct { public ManagedClusterNatGatewayProfile() { } public Azure.Provisioning.BicepList EffectiveOutboundIPs { get { throw null; } set { } } @@ -1047,13 +1041,13 @@ public enum ManagedClusterNodeOSUpgradeChannel Unmanaged = 1, NodeImage = 2, } - public partial class ManagedClusterOidcIssuerProfile : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ManagedClusterOidcIssuerProfile : Azure.Provisioning.Primitives.ProvisionableConstruct { public ManagedClusterOidcIssuerProfile() { } public Azure.Provisioning.BicepValue IsEnabled { get { throw null; } set { } } public Azure.Provisioning.BicepValue IssuerUriInfo { get { throw null; } } } - public partial class ManagedClusterPodIdentity : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ManagedClusterPodIdentity : Azure.Provisioning.Primitives.ProvisionableConstruct { public ManagedClusterPodIdentity() { } public Azure.Provisioning.BicepValue BindingSelector { get { throw null; } set { } } @@ -1063,14 +1057,14 @@ public ManagedClusterPodIdentity() { } public Azure.Provisioning.BicepValue Namespace { get { throw null; } set { } } public Azure.Provisioning.BicepValue ProvisioningState { get { throw null; } } } - public partial class ManagedClusterPodIdentityException : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ManagedClusterPodIdentityException : Azure.Provisioning.Primitives.ProvisionableConstruct { public ManagedClusterPodIdentityException() { } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } public Azure.Provisioning.BicepValue Namespace { get { throw null; } set { } } public Azure.Provisioning.BicepDictionary PodLabels { get { throw null; } set { } } } - public partial class ManagedClusterPodIdentityProfile : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ManagedClusterPodIdentityProfile : Azure.Provisioning.Primitives.ProvisionableConstruct { public ManagedClusterPodIdentityProfile() { } public Azure.Provisioning.BicepValue AllowNetworkPluginKubenet { get { throw null; } set { } } @@ -1087,7 +1081,7 @@ public enum ManagedClusterPodIdentityProvisioningState Succeeded = 4, Updating = 5, } - public partial class ManagedClusterSecurityProfile : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ManagedClusterSecurityProfile : Azure.Provisioning.Primitives.ProvisionableConstruct { public ManagedClusterSecurityProfile() { } public Azure.Provisioning.BicepValue AzureKeyVaultKms { get { throw null; } set { } } @@ -1095,19 +1089,19 @@ public ManagedClusterSecurityProfile() { } public Azure.Provisioning.BicepValue ImageCleaner { get { throw null; } set { } } public Azure.Provisioning.BicepValue IsWorkloadIdentityEnabled { get { throw null; } set { } } } - public partial class ManagedClusterSecurityProfileDefender : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ManagedClusterSecurityProfileDefender : Azure.Provisioning.Primitives.ProvisionableConstruct { public ManagedClusterSecurityProfileDefender() { } public Azure.Provisioning.BicepValue IsSecurityMonitoringEnabled { get { throw null; } set { } } public Azure.Provisioning.BicepValue LogAnalyticsWorkspaceResourceId { get { throw null; } set { } } } - public partial class ManagedClusterSecurityProfileImageCleaner : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ManagedClusterSecurityProfileImageCleaner : Azure.Provisioning.Primitives.ProvisionableConstruct { public ManagedClusterSecurityProfileImageCleaner() { } public Azure.Provisioning.BicepValue IntervalHours { get { throw null; } set { } } public Azure.Provisioning.BicepValue IsEnabled { get { throw null; } set { } } } - public partial class ManagedClusterSecurityProfileKeyVaultKms : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ManagedClusterSecurityProfileKeyVaultKms : Azure.Provisioning.Primitives.ProvisionableConstruct { public ManagedClusterSecurityProfileKeyVaultKms() { } public Azure.Provisioning.BicepValue IsEnabled { get { throw null; } set { } } @@ -1115,13 +1109,13 @@ public ManagedClusterSecurityProfileKeyVaultKms() { } public Azure.Provisioning.BicepValue KeyVaultNetworkAccess { get { throw null; } set { } } public Azure.Provisioning.BicepValue KeyVaultResourceId { get { throw null; } set { } } } - public partial class ManagedClusterServicePrincipalProfile : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ManagedClusterServicePrincipalProfile : Azure.Provisioning.Primitives.ProvisionableConstruct { public ManagedClusterServicePrincipalProfile() { } public Azure.Provisioning.BicepValue ClientId { get { throw null; } set { } } public Azure.Provisioning.BicepValue Secret { get { throw null; } set { } } } - public partial class ManagedClusterSku : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ManagedClusterSku : Azure.Provisioning.Primitives.ProvisionableConstruct { public ManagedClusterSku() { } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } @@ -1139,7 +1133,7 @@ public enum ManagedClusterSkuTier Standard = 2, Free = 3, } - public partial class ManagedClusterStorageProfile : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ManagedClusterStorageProfile : Azure.Provisioning.Primitives.ProvisionableConstruct { public ManagedClusterStorageProfile() { } public Azure.Provisioning.BicepValue IsBlobCsiDriverEnabled { get { throw null; } set { } } @@ -1147,7 +1141,7 @@ public ManagedClusterStorageProfile() { } public Azure.Provisioning.BicepValue IsFileCsiDriverEnabled { get { throw null; } set { } } public Azure.Provisioning.BicepValue IsSnapshotControllerEnabled { get { throw null; } set { } } } - public partial class ManagedClusterWindowsProfile : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ManagedClusterWindowsProfile : Azure.Provisioning.Primitives.ProvisionableConstruct { public ManagedClusterWindowsProfile() { } public Azure.Provisioning.BicepValue AdminPassword { get { throw null; } set { } } @@ -1156,7 +1150,7 @@ public ManagedClusterWindowsProfile() { } public Azure.Provisioning.BicepValue IsCsiProxyEnabled { get { throw null; } set { } } public Azure.Provisioning.BicepValue LicenseType { get { throw null; } set { } } } - public partial class ManagedClusterWorkloadAutoScalerProfile : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ManagedClusterWorkloadAutoScalerProfile : Azure.Provisioning.Primitives.ProvisionableConstruct { public ManagedClusterWorkloadAutoScalerProfile() { } public Azure.Provisioning.BicepValue IsKedaEnabled { get { throw null; } set { } } @@ -1189,7 +1183,7 @@ public enum ServiceMeshMode Istio = 0, Disabled = 1, } - public partial class ServiceMeshProfile : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ServiceMeshProfile : Azure.Provisioning.Primitives.ProvisionableConstruct { public ServiceMeshProfile() { } public Azure.Provisioning.BicepValue Istio { get { throw null; } set { } } @@ -1199,7 +1193,7 @@ public enum SnapshotType { NodePool = 0, } - public partial class SysctlConfig : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class SysctlConfig : Azure.Provisioning.Primitives.ProvisionableConstruct { public SysctlConfig() { } public Azure.Provisioning.BicepValue FsAioMaxNr { get { throw null; } set { } } @@ -1244,13 +1238,13 @@ public enum UpgradeChannel [System.Runtime.Serialization.DataMemberAttribute(Name="none")] None = 4, } - public partial class UpgradeOverrideSettings : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class UpgradeOverrideSettings : Azure.Provisioning.Primitives.ProvisionableConstruct { public UpgradeOverrideSettings() { } public Azure.Provisioning.BicepValue ForceUpgrade { get { throw null; } set { } } public Azure.Provisioning.BicepValue Until { get { throw null; } set { } } } - public partial class WindowsGmsaProfile : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class WindowsGmsaProfile : Azure.Provisioning.Primitives.ProvisionableConstruct { public WindowsGmsaProfile() { } public Azure.Provisioning.BicepValue DnsServer { get { throw null; } set { } } diff --git a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/AgentPoolSnapshot.cs b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/AgentPoolSnapshot.cs index d82900b0d904..7c976c238f52 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/AgentPoolSnapshot.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/AgentPoolSnapshot.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.ContainerService; /// /// AgentPoolSnapshot. /// -public partial class AgentPoolSnapshot : Resource +public partial class AgentPoolSnapshot : ProvisionableResource { /// /// The name of the managed cluster resource. @@ -102,15 +102,15 @@ public partial class AgentPoolSnapshot : Resource /// /// Creates a new AgentPoolSnapshot. /// - /// + /// /// The the Bicep identifier name of the AgentPoolSnapshot resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, /// and underscores. /// /// Version of the AgentPoolSnapshot. - public AgentPoolSnapshot(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.ContainerService/snapshots", resourceVersion ?? "2024-08-01") + public AgentPoolSnapshot(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.ContainerService/snapshots", resourceVersion ?? "2024-08-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _location = BicepValue.DefineProperty(this, "Location", ["location"], isRequired: true); @@ -132,11 +132,6 @@ public AgentPoolSnapshot(string identifierName, string? resourceVersion = defaul /// public static class ResourceVersions { - /// - /// 2024-08-02-preview. - /// - public static readonly string V2024_08_02_preview = "2024-08-02-preview"; - /// /// 2024-08-01. /// @@ -286,7 +281,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing AgentPoolSnapshot. /// - /// + /// /// The the Bicep identifier name of the AgentPoolSnapshot resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, @@ -294,6 +289,6 @@ public static class ResourceVersions /// /// Version of the AgentPoolSnapshot. /// The existing AgentPoolSnapshot resource. - public static AgentPoolSnapshot FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static AgentPoolSnapshot FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/ContainerServiceAgentPool.cs b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/ContainerServiceAgentPool.cs index c874a4741bd8..8933967cf4c5 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/ContainerServiceAgentPool.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/ContainerServiceAgentPool.cs @@ -17,7 +17,7 @@ namespace Azure.Provisioning.ContainerService; /// /// ContainerServiceAgentPool. /// -public partial class ContainerServiceAgentPool : Resource +public partial class ContainerServiceAgentPool : ProvisionableResource { /// /// The name of the agent pool. @@ -367,15 +367,15 @@ public partial class ContainerServiceAgentPool : Resource /// /// Creates a new ContainerServiceAgentPool. /// - /// + /// /// The the Bicep identifier name of the ContainerServiceAgentPool /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the ContainerServiceAgentPool. - public ContainerServiceAgentPool(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.ContainerService/managedClusters/agentPools", resourceVersion ?? "2024-08-01") + public ContainerServiceAgentPool(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.ContainerService/managedClusters/agentPools", resourceVersion ?? "2024-08-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _availabilityZones = BicepList.DefineProperty(this, "AvailabilityZones", ["properties", "availabilityZones"]); @@ -431,11 +431,6 @@ public ContainerServiceAgentPool(string identifierName, string? resourceVersion /// public static class ResourceVersions { - /// - /// 2024-08-02-preview. - /// - public static readonly string V2024_08_02_preview = "2024-08-02-preview"; - /// /// 2024-08-01. /// @@ -690,7 +685,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing ContainerServiceAgentPool. /// - /// + /// /// The the Bicep identifier name of the ContainerServiceAgentPool /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -698,8 +693,8 @@ public static class ResourceVersions /// /// Version of the ContainerServiceAgentPool. /// The existing ContainerServiceAgentPool resource. - public static ContainerServiceAgentPool FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static ContainerServiceAgentPool FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; /// /// Get the requirements for naming this ContainerServiceAgentPool resource. diff --git a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/ContainerServiceMaintenanceConfiguration.cs b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/ContainerServiceMaintenanceConfiguration.cs index f355a6923ba3..29b83b930362 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/ContainerServiceMaintenanceConfiguration.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/ContainerServiceMaintenanceConfiguration.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.ContainerService; /// /// ContainerServiceMaintenanceConfiguration. /// -public partial class ContainerServiceMaintenanceConfiguration : Resource +public partial class ContainerServiceMaintenanceConfiguration : ProvisionableResource { /// /// The name of the maintenance configuration. @@ -64,7 +64,7 @@ public partial class ContainerServiceMaintenanceConfiguration : Resource /// /// Creates a new ContainerServiceMaintenanceConfiguration. /// - /// + /// /// The the Bicep identifier name of the /// ContainerServiceMaintenanceConfiguration resource. This can be used /// to refer to the resource in expressions, but is not the Azure name of @@ -72,8 +72,8 @@ public partial class ContainerServiceMaintenanceConfiguration : Resource /// underscores. /// /// Version of the ContainerServiceMaintenanceConfiguration. - public ContainerServiceMaintenanceConfiguration(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.ContainerService/managedClusters/maintenanceConfigurations", resourceVersion ?? "2024-08-01") + public ContainerServiceMaintenanceConfiguration(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.ContainerService/managedClusters/maintenanceConfigurations", resourceVersion ?? "2024-08-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _maintenanceWindow = BicepValue.DefineProperty(this, "MaintenanceWindow", ["properties", "maintenanceWindow"]); @@ -89,11 +89,6 @@ public ContainerServiceMaintenanceConfiguration(string identifierName, string? r /// public static class ResourceVersions { - /// - /// 2024-08-02-preview. - /// - public static readonly string V2024_08_02_preview = "2024-08-02-preview"; - /// /// 2024-08-01. /// @@ -349,7 +344,7 @@ public static class ResourceVersions /// Creates a reference to an existing /// ContainerServiceMaintenanceConfiguration. /// - /// + /// /// The the Bicep identifier name of the /// ContainerServiceMaintenanceConfiguration resource. This can be used /// to refer to the resource in expressions, but is not the Azure name of @@ -358,6 +353,6 @@ public static class ResourceVersions /// /// Version of the ContainerServiceMaintenanceConfiguration. /// The existing ContainerServiceMaintenanceConfiguration resource. - public static ContainerServiceMaintenanceConfiguration FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static ContainerServiceMaintenanceConfiguration FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/ContainerServiceManagedCluster.cs b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/ContainerServiceManagedCluster.cs index e347d125ca44..0f8db93be443 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/ContainerServiceManagedCluster.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/ContainerServiceManagedCluster.cs @@ -21,7 +21,7 @@ namespace Azure.Provisioning.ContainerService; /// /// ContainerServiceManagedCluster. /// -public partial class ContainerServiceManagedCluster : Resource +public partial class ContainerServiceManagedCluster : ProvisionableResource { /// /// The name of the managed cluster resource. @@ -341,15 +341,15 @@ public partial class ContainerServiceManagedCluster : Resource /// /// Creates a new ContainerServiceManagedCluster. /// - /// + /// /// The the Bicep identifier name of the ContainerServiceManagedCluster /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the ContainerServiceManagedCluster. - public ContainerServiceManagedCluster(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.ContainerService/managedClusters", resourceVersion ?? "2024-08-01") + public ContainerServiceManagedCluster(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.ContainerService/managedClusters", resourceVersion ?? "2024-08-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _location = BicepValue.DefineProperty(this, "Location", ["location"], isRequired: true); @@ -405,11 +405,6 @@ public ContainerServiceManagedCluster(string identifierName, string? resourceVer /// public static class ResourceVersions { - /// - /// 2024-08-02-preview. - /// - public static readonly string V2024_08_02_preview = "2024-08-02-preview"; - /// /// 2024-08-01. /// @@ -664,7 +659,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing ContainerServiceManagedCluster. /// - /// + /// /// The the Bicep identifier name of the ContainerServiceManagedCluster /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -672,8 +667,8 @@ public static class ResourceVersions /// /// Version of the ContainerServiceManagedCluster. /// The existing ContainerServiceManagedCluster resource. - public static ContainerServiceManagedCluster FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static ContainerServiceManagedCluster FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; /// /// Get the requirements for naming this ContainerServiceManagedCluster @@ -692,10 +687,10 @@ public override ResourceNameRequirements GetResourceNameRequirements() => /// The . /// The . public RoleAssignment CreateRoleAssignment(ContainerServiceBuiltInRole role, UserAssignedIdentity identity) => - new($"{IdentifierName}_{identity.IdentifierName}_{ContainerServiceBuiltInRole.GetBuiltInRoleName(role)}") + new($"{BicepIdentifier}_{identity.BicepIdentifier}_{ContainerServiceBuiltInRole.GetBuiltInRoleName(role)}") { Name = BicepFunction.CreateGuid(Id, identity.PrincipalId, BicepFunction.GetSubscriptionResourceId("Microsoft.Authorization/roleDefinitions", role.ToString())), - Scope = new IdentifierExpression(IdentifierName), + Scope = new IdentifierExpression(BicepIdentifier), PrincipalType = RoleManagementPrincipalType.ServicePrincipal, RoleDefinitionId = BicepFunction.GetSubscriptionResourceId("Microsoft.Authorization/roleDefinitions", role.ToString()), PrincipalId = identity.PrincipalId @@ -708,13 +703,13 @@ public RoleAssignment CreateRoleAssignment(ContainerServiceBuiltInRole role, Use /// The role to grant. /// The type of the principal to assign to. /// The principal to assign to. - /// Optional role assignment identifier name suffix. + /// Optional role assignment identifier name suffix. /// The . - public RoleAssignment CreateRoleAssignment(ContainerServiceBuiltInRole role, BicepValue principalType, BicepValue principalId, string? identifierNameSuffix = default) => - new($"{IdentifierName}_{ContainerServiceBuiltInRole.GetBuiltInRoleName(role)}{(identifierNameSuffix is null ? "" : "_")}{identifierNameSuffix}") + public RoleAssignment CreateRoleAssignment(ContainerServiceBuiltInRole role, BicepValue principalType, BicepValue principalId, string? bicepIdentifierSuffix = default) => + new($"{BicepIdentifier}_{ContainerServiceBuiltInRole.GetBuiltInRoleName(role)}{(bicepIdentifierSuffix is null ? "" : "_")}{bicepIdentifierSuffix}") { Name = BicepFunction.CreateGuid(Id, principalId, BicepFunction.GetSubscriptionResourceId("Microsoft.Authorization/roleDefinitions", role.ToString())), - Scope = new IdentifierExpression(IdentifierName), + Scope = new IdentifierExpression(BicepIdentifier), PrincipalType = principalType, RoleDefinitionId = BicepFunction.GetSubscriptionResourceId("Microsoft.Authorization/roleDefinitions", role.ToString()), PrincipalId = principalId diff --git a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/ContainerServicePrivateEndpointConnection.cs b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/ContainerServicePrivateEndpointConnection.cs index a967c09a2119..6d81604c894d 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/ContainerServicePrivateEndpointConnection.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/ContainerServicePrivateEndpointConnection.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.ContainerService; /// /// ContainerServicePrivateEndpointConnection. /// -public partial class ContainerServicePrivateEndpointConnection : Resource +public partial class ContainerServicePrivateEndpointConnection : ProvisionableResource { /// /// The name of the private endpoint connection. @@ -63,7 +63,7 @@ public partial class ContainerServicePrivateEndpointConnection : Resource /// /// Creates a new ContainerServicePrivateEndpointConnection. /// - /// + /// /// The the Bicep identifier name of the /// ContainerServicePrivateEndpointConnection resource. This can be used /// to refer to the resource in expressions, but is not the Azure name of @@ -71,8 +71,8 @@ public partial class ContainerServicePrivateEndpointConnection : Resource /// underscores. /// /// Version of the ContainerServicePrivateEndpointConnection. - public ContainerServicePrivateEndpointConnection(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.ContainerService/managedClusters/privateEndpointConnections", resourceVersion ?? "2024-08-01") + public ContainerServicePrivateEndpointConnection(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.ContainerService/managedClusters/privateEndpointConnections", resourceVersion ?? "2024-08-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _connectionState = BicepValue.DefineProperty(this, "ConnectionState", ["properties", "privateLinkServiceConnectionState"]); @@ -88,11 +88,6 @@ public ContainerServicePrivateEndpointConnection(string identifierName, string? /// public static class ResourceVersions { - /// - /// 2024-08-02-preview. - /// - public static readonly string V2024_08_02_preview = "2024-08-02-preview"; - /// /// 2024-08-01. /// @@ -348,7 +343,7 @@ public static class ResourceVersions /// Creates a reference to an existing /// ContainerServicePrivateEndpointConnection. /// - /// + /// /// The the Bicep identifier name of the /// ContainerServicePrivateEndpointConnection resource. This can be used /// to refer to the resource in expressions, but is not the Azure name of @@ -357,6 +352,6 @@ public static class ResourceVersions /// /// Version of the ContainerServicePrivateEndpointConnection. /// The existing ContainerServicePrivateEndpointConnection resource. - public static ContainerServicePrivateEndpointConnection FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static ContainerServicePrivateEndpointConnection FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/ContainerServiceTrustedAccessRoleBinding.cs b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/ContainerServiceTrustedAccessRoleBinding.cs index c48ad5e21368..40ea9082b9be 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/ContainerServiceTrustedAccessRoleBinding.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/ContainerServiceTrustedAccessRoleBinding.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.ContainerService; /// /// ContainerServiceTrustedAccessRoleBinding. /// -public partial class ContainerServiceTrustedAccessRoleBinding : Resource +public partial class ContainerServiceTrustedAccessRoleBinding : ProvisionableResource { /// /// The name of trusted access role binding. @@ -66,7 +66,7 @@ public partial class ContainerServiceTrustedAccessRoleBinding : Resource /// /// Creates a new ContainerServiceTrustedAccessRoleBinding. /// - /// + /// /// The the Bicep identifier name of the /// ContainerServiceTrustedAccessRoleBinding resource. This can be used /// to refer to the resource in expressions, but is not the Azure name of @@ -74,8 +74,8 @@ public partial class ContainerServiceTrustedAccessRoleBinding : Resource /// underscores. /// /// Version of the ContainerServiceTrustedAccessRoleBinding. - public ContainerServiceTrustedAccessRoleBinding(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.ContainerService/managedClusters/trustedAccessRoleBindings", resourceVersion ?? "2024-08-01") + public ContainerServiceTrustedAccessRoleBinding(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.ContainerService/managedClusters/trustedAccessRoleBindings", resourceVersion ?? "2024-08-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _roles = BicepList.DefineProperty(this, "Roles", ["properties", "roles"], isRequired: true); @@ -91,11 +91,6 @@ public ContainerServiceTrustedAccessRoleBinding(string identifierName, string? r /// public static class ResourceVersions { - /// - /// 2024-08-02-preview. - /// - public static readonly string V2024_08_02_preview = "2024-08-02-preview"; - /// /// 2024-08-01. /// @@ -351,7 +346,7 @@ public static class ResourceVersions /// Creates a reference to an existing /// ContainerServiceTrustedAccessRoleBinding. /// - /// + /// /// The the Bicep identifier name of the /// ContainerServiceTrustedAccessRoleBinding resource. This can be used /// to refer to the resource in expressions, but is not the Azure name of @@ -360,6 +355,6 @@ public static class ResourceVersions /// /// Version of the ContainerServiceTrustedAccessRoleBinding. /// The existing ContainerServiceTrustedAccessRoleBinding resource. - public static ContainerServiceTrustedAccessRoleBinding FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static ContainerServiceTrustedAccessRoleBinding FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/AgentPoolNetworkPortRange.cs b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/AgentPoolNetworkPortRange.cs index cbe5925459df..df123e3d23d4 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/AgentPoolNetworkPortRange.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/AgentPoolNetworkPortRange.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.ContainerService; /// /// The port range. /// -public partial class AgentPoolNetworkPortRange : ProvisioningConstruct +public partial class AgentPoolNetworkPortRange : ProvisionableConstruct { /// /// The minimum port that is included in the range. It should be ranged diff --git a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/AgentPoolNetworkProfile.cs b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/AgentPoolNetworkProfile.cs index 083312ee9857..ceb1b98b99a4 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/AgentPoolNetworkProfile.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/AgentPoolNetworkProfile.cs @@ -13,7 +13,7 @@ namespace Azure.Provisioning.ContainerService; /// /// Network settings of an agent pool. /// -public partial class AgentPoolNetworkProfile : ProvisioningConstruct +public partial class AgentPoolNetworkProfile : ProvisionableConstruct { /// /// IPTags of instance-level public IPs. diff --git a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/AgentPoolUpgradeSettings.cs b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/AgentPoolUpgradeSettings.cs index 715cd8590071..d4a8e048b075 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/AgentPoolUpgradeSettings.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/AgentPoolUpgradeSettings.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.ContainerService; /// /// Settings for upgrading an agentpool. /// -public partial class AgentPoolUpgradeSettings : ProvisioningConstruct +public partial class AgentPoolUpgradeSettings : ProvisionableConstruct { /// /// This can either be set to an integer (e.g. '5') or a diff --git a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ContainerServiceDateSpan.cs b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ContainerServiceDateSpan.cs index 31d3d9072dd4..9ef7cae13b3d 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ContainerServiceDateSpan.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ContainerServiceDateSpan.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.ContainerService; /// /// For example, between '2022-12-23' and '2023-01-05'. /// -public partial class ContainerServiceDateSpan : ProvisioningConstruct +public partial class ContainerServiceDateSpan : ProvisionableConstruct { /// /// The start date of the date span. diff --git a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ContainerServiceIPTag.cs b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ContainerServiceIPTag.cs index d6aa6e92f641..b56287139e80 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ContainerServiceIPTag.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ContainerServiceIPTag.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.ContainerService; /// /// Contains the IPTag associated with the object. /// -public partial class ContainerServiceIPTag : ProvisioningConstruct +public partial class ContainerServiceIPTag : ProvisionableConstruct { /// /// The IP tag type. Example: RoutingPreference. diff --git a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ContainerServiceLinuxProfile.cs b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ContainerServiceLinuxProfile.cs index 54bde424cbbc..e372d3c60e34 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ContainerServiceLinuxProfile.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ContainerServiceLinuxProfile.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.ContainerService; /// /// Profile for Linux VMs in the container service cluster. /// -public partial class ContainerServiceLinuxProfile : ProvisioningConstruct +public partial class ContainerServiceLinuxProfile : ProvisionableConstruct { /// /// The administrator username to use for Linux VMs. diff --git a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ContainerServiceMaintenanceAbsoluteMonthlySchedule.cs b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ContainerServiceMaintenanceAbsoluteMonthlySchedule.cs index 5dc4fb0b6cc9..07a1581c30d4 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ContainerServiceMaintenanceAbsoluteMonthlySchedule.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ContainerServiceMaintenanceAbsoluteMonthlySchedule.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.ContainerService; /// For schedules like: 'recur every month on the 15th' or /// 'recur every 3 months on the 20th'. /// -public partial class ContainerServiceMaintenanceAbsoluteMonthlySchedule : ProvisioningConstruct +public partial class ContainerServiceMaintenanceAbsoluteMonthlySchedule : ProvisionableConstruct { /// /// Specifies the number of months between each set of occurrences. diff --git a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ContainerServiceMaintenanceRelativeMonthlySchedule.cs b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ContainerServiceMaintenanceRelativeMonthlySchedule.cs index f1339b44e1ef..793e7028ef26 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ContainerServiceMaintenanceRelativeMonthlySchedule.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ContainerServiceMaintenanceRelativeMonthlySchedule.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.ContainerService; /// For schedules like: 'recur every month on the first Monday' or /// 'recur every 3 months on last Friday'. /// -public partial class ContainerServiceMaintenanceRelativeMonthlySchedule : ProvisioningConstruct +public partial class ContainerServiceMaintenanceRelativeMonthlySchedule : ProvisionableConstruct { /// /// Specifies the number of months between each set of occurrences. diff --git a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ContainerServiceMaintenanceSchedule.cs b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ContainerServiceMaintenanceSchedule.cs index 3e66ba8de2be..26f6f9503632 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ContainerServiceMaintenanceSchedule.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ContainerServiceMaintenanceSchedule.cs @@ -13,7 +13,7 @@ namespace Azure.Provisioning.ContainerService; /// 'daily', 'weekly', 'absoluteMonthly' or /// 'relativeMonthly' for your maintenance schedule. /// -public partial class ContainerServiceMaintenanceSchedule : ProvisioningConstruct +public partial class ContainerServiceMaintenanceSchedule : ProvisionableConstruct { /// /// Specifies the number of days between each set of occurrences. diff --git a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ContainerServiceMaintenanceWeeklySchedule.cs b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ContainerServiceMaintenanceWeeklySchedule.cs index c15d1629a8fc..bf473857ef36 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ContainerServiceMaintenanceWeeklySchedule.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ContainerServiceMaintenanceWeeklySchedule.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.ContainerService; /// For schedules like: 'recur every Monday' or 'recur every 3 /// weeks on Wednesday'. /// -public partial class ContainerServiceMaintenanceWeeklySchedule : ProvisioningConstruct +public partial class ContainerServiceMaintenanceWeeklySchedule : ProvisionableConstruct { /// /// Specifies the number of weeks between each set of occurrences. diff --git a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ContainerServiceMaintenanceWindow.cs b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ContainerServiceMaintenanceWindow.cs index 0933352a5826..116f90eddd9e 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ContainerServiceMaintenanceWindow.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ContainerServiceMaintenanceWindow.cs @@ -13,7 +13,7 @@ namespace Azure.Provisioning.ContainerService; /// Maintenance window used to configure scheduled auto-upgrade for a Managed /// Cluster. /// -public partial class ContainerServiceMaintenanceWindow : ProvisioningConstruct +public partial class ContainerServiceMaintenanceWindow : ProvisionableConstruct { /// /// Recurrence schedule for the maintenance window. diff --git a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ContainerServiceNetworkProfile.cs b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ContainerServiceNetworkProfile.cs index c0f556abd8c0..b22b862e7fbb 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ContainerServiceNetworkProfile.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ContainerServiceNetworkProfile.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.ContainerService; /// Profile of network configuration. Serialized Name: /// ContainerServiceNetworkProfile /// -public partial class ContainerServiceNetworkProfile : ProvisioningConstruct +public partial class ContainerServiceNetworkProfile : ProvisionableConstruct { /// /// Network plugin used for building the Kubernetes network. diff --git a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ContainerServicePrivateLinkResourceData.cs b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ContainerServicePrivateLinkResourceData.cs index ef25851049ff..716291903cf8 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ContainerServicePrivateLinkResourceData.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ContainerServicePrivateLinkResourceData.cs @@ -13,7 +13,7 @@ namespace Azure.Provisioning.ContainerService; /// /// A private link resource. /// -public partial class ContainerServicePrivateLinkResourceData : ProvisioningConstruct +public partial class ContainerServicePrivateLinkResourceData : ProvisionableConstruct { /// /// The ID of the private link resource. diff --git a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ContainerServicePrivateLinkServiceConnectionState.cs b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ContainerServicePrivateLinkServiceConnectionState.cs index 93d02849f91a..cee453561a9b 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ContainerServicePrivateLinkServiceConnectionState.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ContainerServicePrivateLinkServiceConnectionState.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.ContainerService; /// /// The state of a private link service connection. /// -public partial class ContainerServicePrivateLinkServiceConnectionState : ProvisioningConstruct +public partial class ContainerServicePrivateLinkServiceConnectionState : ProvisionableConstruct { /// /// The private link service connection status. diff --git a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ContainerServiceSshPublicKey.cs b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ContainerServiceSshPublicKey.cs index 19b5711790e5..5bd5e7d53d29 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ContainerServiceSshPublicKey.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ContainerServiceSshPublicKey.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.ContainerService; /// /// Contains information about SSH certificate public key data. /// -public partial class ContainerServiceSshPublicKey : ProvisioningConstruct +public partial class ContainerServiceSshPublicKey : ProvisionableConstruct { /// /// Certificate public key used to authenticate with VMs through SSH. The diff --git a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ContainerServiceTimeInWeek.cs b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ContainerServiceTimeInWeek.cs index 6f9ac4f40982..197323fb5e2a 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ContainerServiceTimeInWeek.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ContainerServiceTimeInWeek.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.ContainerService; /// /// Time in a week. /// -public partial class ContainerServiceTimeInWeek : ProvisioningConstruct +public partial class ContainerServiceTimeInWeek : ProvisionableConstruct { /// /// The day of the week. diff --git a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ContainerServiceTimeSpan.cs b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ContainerServiceTimeSpan.cs index dca2a2ef1a96..d552c3e6495b 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ContainerServiceTimeSpan.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ContainerServiceTimeSpan.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.ContainerService; /// /// For example, between 2021-05-25T13:00:00Z and 2021-05-25T14:00:00Z. /// -public partial class ContainerServiceTimeSpan : ProvisioningConstruct +public partial class ContainerServiceTimeSpan : ProvisionableConstruct { /// /// The start of a time span. diff --git a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ContainerServiceUserAssignedIdentity.cs b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ContainerServiceUserAssignedIdentity.cs index c51c34346bde..fd0a18f7edae 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ContainerServiceUserAssignedIdentity.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ContainerServiceUserAssignedIdentity.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.ContainerService; /// /// Details about a user assigned identity. /// -public partial class ContainerServiceUserAssignedIdentity : ProvisioningConstruct +public partial class ContainerServiceUserAssignedIdentity : ProvisionableConstruct { /// /// The resource ID of the user assigned identity. diff --git a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/IstioComponents.cs b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/IstioComponents.cs index 4ee1a1b02908..62793cf2fab5 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/IstioComponents.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/IstioComponents.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.ContainerService; /// /// Istio components configuration. /// -public partial class IstioComponents : ProvisioningConstruct +public partial class IstioComponents : ProvisionableConstruct { /// /// Istio ingress gateways. diff --git a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/IstioEgressGateway.cs b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/IstioEgressGateway.cs index 85028eb4a6e7..75b09a505c99 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/IstioEgressGateway.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/IstioEgressGateway.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.ContainerService; /// /// Istio egress gateway configuration. /// -public partial class IstioEgressGateway : ProvisioningConstruct +public partial class IstioEgressGateway : ProvisionableConstruct { /// /// Whether to enable the egress gateway. diff --git a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/IstioIngressGateway.cs b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/IstioIngressGateway.cs index dd8d29aec10e..a74ffb092c59 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/IstioIngressGateway.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/IstioIngressGateway.cs @@ -13,7 +13,7 @@ namespace Azure.Provisioning.ContainerService; /// ingress gateway named `aks-istio-ingressgateway-external` and one internal /// ingress gateway named `aks-istio-ingressgateway-internal`. /// -public partial class IstioIngressGateway : ProvisioningConstruct +public partial class IstioIngressGateway : ProvisionableConstruct { /// /// Mode of an ingress gateway. diff --git a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/IstioPluginCertificateAuthority.cs b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/IstioPluginCertificateAuthority.cs index 44609673bfc7..1bc8d71bc03a 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/IstioPluginCertificateAuthority.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/IstioPluginCertificateAuthority.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.ContainerService; /// /// Plugin certificates information for Service Mesh. /// -public partial class IstioPluginCertificateAuthority : ProvisioningConstruct +public partial class IstioPluginCertificateAuthority : ProvisionableConstruct { /// /// The resource ID of the Key Vault. diff --git a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/IstioServiceMesh.cs b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/IstioServiceMesh.cs index 278a879a8d54..3adc2705a1b8 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/IstioServiceMesh.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/IstioServiceMesh.cs @@ -13,7 +13,7 @@ namespace Azure.Provisioning.ContainerService; /// /// Istio service mesh configuration. /// -public partial class IstioServiceMesh : ProvisioningConstruct +public partial class IstioServiceMesh : ProvisionableConstruct { /// /// Istio components configuration. diff --git a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/KubeletConfig.cs b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/KubeletConfig.cs index 300ad40aa9e5..b3f347186465 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/KubeletConfig.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/KubeletConfig.cs @@ -14,7 +14,7 @@ namespace Azure.Provisioning.ContainerService; /// configuration](https://docs.microsoft.com/azure/aks/custom-node-configuration) /// for more details. /// -public partial class KubeletConfig : ProvisioningConstruct +public partial class KubeletConfig : ProvisionableConstruct { /// /// The default is 'none'. See [Kubernetes CPU management diff --git a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/LinuxOSConfig.cs b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/LinuxOSConfig.cs index 14ef110b382a..2e03de056e8b 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/LinuxOSConfig.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/LinuxOSConfig.cs @@ -13,7 +13,7 @@ namespace Azure.Provisioning.ContainerService; /// configuration](https://docs.microsoft.com/azure/aks/custom-node-configuration) /// for more details. /// -public partial class LinuxOSConfig : ProvisioningConstruct +public partial class LinuxOSConfig : ProvisionableConstruct { /// /// Sysctl settings for Linux agent nodes. diff --git a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterAadProfile.cs b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterAadProfile.cs index fb3567e51c0e..7492cbac300d 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterAadProfile.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterAadProfile.cs @@ -13,7 +13,7 @@ namespace Azure.Provisioning.ContainerService; /// For more details see [managed AAD on /// AKS](https://docs.microsoft.com/azure/aks/managed-aad). /// -public partial class ManagedClusterAadProfile : ProvisioningConstruct +public partial class ManagedClusterAadProfile : ProvisionableConstruct { /// /// Whether to enable managed AAD. diff --git a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterAddonProfile.cs b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterAddonProfile.cs index 24e6d2a2902c..01fcc94d17ac 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterAddonProfile.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterAddonProfile.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.ContainerService; /// /// A Kubernetes add-on profile for a managed cluster. /// -public partial class ManagedClusterAddonProfile : ProvisioningConstruct +public partial class ManagedClusterAddonProfile : ProvisionableConstruct { /// /// Whether the add-on is enabled or not. diff --git a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterAgentPoolProfile.cs b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterAgentPoolProfile.cs index 0ed5d08d2c4a..961fd9af2e95 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterAgentPoolProfile.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterAgentPoolProfile.cs @@ -13,7 +13,7 @@ namespace Azure.Provisioning.ContainerService; /// /// Profile for the container service agent pool. /// -public partial class ManagedClusterAgentPoolProfile : ProvisioningConstruct +public partial class ManagedClusterAgentPoolProfile : ProvisionableConstruct { /// /// Windows agent pool names must be 6 characters or less. diff --git a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterApiServerAccessProfile.cs b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterApiServerAccessProfile.cs index c69ee01c6ca9..4600ea41f2a5 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterApiServerAccessProfile.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterApiServerAccessProfile.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.ContainerService; /// /// Access profile for managed cluster API server. /// -public partial class ManagedClusterApiServerAccessProfile : ProvisioningConstruct +public partial class ManagedClusterApiServerAccessProfile : ProvisionableConstruct { /// /// IP ranges are specified in CIDR format, e.g. 137.117.106.88/29. This diff --git a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterAutoScalerProfile.cs b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterAutoScalerProfile.cs index 2e95c44221c4..0d389e003e56 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterAutoScalerProfile.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterAutoScalerProfile.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.ContainerService; /// /// Parameters to be applied to the cluster-autoscaler when enabled. /// -public partial class ManagedClusterAutoScalerProfile : ProvisioningConstruct +public partial class ManagedClusterAutoScalerProfile : ProvisionableConstruct { /// /// Valid values are 'true' and 'false'. diff --git a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterAutoUpgradeProfile.cs b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterAutoUpgradeProfile.cs index 7d50c7dbf32f..a18e90af1dda 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterAutoUpgradeProfile.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterAutoUpgradeProfile.cs @@ -10,7 +10,7 @@ namespace Azure.Provisioning.ContainerService; /// /// Auto upgrade profile for a managed cluster. /// -public partial class ManagedClusterAutoUpgradeProfile : ProvisioningConstruct +public partial class ManagedClusterAutoUpgradeProfile : ProvisionableConstruct { /// /// For more information see [setting the AKS cluster auto-upgrade diff --git a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterDelegatedIdentity.cs b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterDelegatedIdentity.cs index a6f6409a7e24..4bf1dd7fe38e 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterDelegatedIdentity.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterDelegatedIdentity.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.ContainerService; /// /// Delegated resource properties - internal use only. /// -public partial class ManagedClusterDelegatedIdentity : ProvisioningConstruct +public partial class ManagedClusterDelegatedIdentity : ProvisionableConstruct { /// /// The ARM resource id of the delegated resource - internal use only. diff --git a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterHttpProxyConfig.cs b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterHttpProxyConfig.cs index 632717e68bba..4146ed7442a6 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterHttpProxyConfig.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterHttpProxyConfig.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.ContainerService; /// /// Cluster HTTP proxy configuration. /// -public partial class ManagedClusterHttpProxyConfig : ProvisioningConstruct +public partial class ManagedClusterHttpProxyConfig : ProvisionableConstruct { /// /// The HTTP proxy server endpoint to use. diff --git a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterIdentity.cs b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterIdentity.cs index 1330a494c9db..bd37e0cb8b42 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterIdentity.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterIdentity.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.ContainerService; /// Identity for the managed cluster. Serialized Name: /// ManagedClusterIdentity /// -public partial class ManagedClusterIdentity : ProvisioningConstruct +public partial class ManagedClusterIdentity : ProvisionableConstruct { /// /// The principal id of the system assigned identity which is used by diff --git a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterLoadBalancerProfile.cs b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterLoadBalancerProfile.cs index 0d522e0155df..f5d5a20872bd 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterLoadBalancerProfile.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterLoadBalancerProfile.cs @@ -14,7 +14,7 @@ namespace Azure.Provisioning.ContainerService; /// /// Profile of the managed cluster load balancer. /// -public partial class ManagedClusterLoadBalancerProfile : ProvisioningConstruct +public partial class ManagedClusterLoadBalancerProfile : ProvisionableConstruct { /// /// Desired managed outbound IPs for the cluster load balancer. diff --git a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterLoadBalancerProfileManagedOutboundIPs.cs b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterLoadBalancerProfileManagedOutboundIPs.cs index bcd84126743e..3e8bcd42059f 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterLoadBalancerProfileManagedOutboundIPs.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterLoadBalancerProfileManagedOutboundIPs.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.ContainerService; /// /// Desired managed outbound IPs for the cluster load balancer. /// -public partial class ManagedClusterLoadBalancerProfileManagedOutboundIPs : ProvisioningConstruct +public partial class ManagedClusterLoadBalancerProfileManagedOutboundIPs : ProvisionableConstruct { /// /// The desired number of IPv4 outbound IPs created/managed by Azure for diff --git a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterMonitorProfileKubeStateMetrics.cs b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterMonitorProfileKubeStateMetrics.cs index 7161764d2041..f28c4d8bb4ad 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterMonitorProfileKubeStateMetrics.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterMonitorProfileKubeStateMetrics.cs @@ -14,7 +14,7 @@ namespace Azure.Provisioning.ContainerService; /// the addon. See aka.ms/AzureManagedPrometheus-optional-parameters for /// details. /// -public partial class ManagedClusterMonitorProfileKubeStateMetrics : ProvisioningConstruct +public partial class ManagedClusterMonitorProfileKubeStateMetrics : ProvisionableConstruct { /// /// Comma-separated list of additional Kubernetes label keys that will be diff --git a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterMonitorProfileMetrics.cs b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterMonitorProfileMetrics.cs index dcf3b38c68df..d20ba23847bb 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterMonitorProfileMetrics.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterMonitorProfileMetrics.cs @@ -14,7 +14,7 @@ namespace Azure.Provisioning.ContainerService; /// Azure Monitor Workspace and configure additional scraping for custom /// targets. See aka.ms/AzureManagedPrometheus for an overview. /// -public partial class ManagedClusterMonitorProfileMetrics : ProvisioningConstruct +public partial class ManagedClusterMonitorProfileMetrics : ProvisionableConstruct { /// /// Whether to enable or disable the Azure Managed Prometheus addon for diff --git a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterNatGatewayProfile.cs b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterNatGatewayProfile.cs index 3b0734b74298..92472bc49895 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterNatGatewayProfile.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterNatGatewayProfile.cs @@ -14,7 +14,7 @@ namespace Azure.Provisioning.ContainerService; /// /// Profile of the managed cluster NAT gateway. /// -public partial class ManagedClusterNatGatewayProfile : ProvisioningConstruct +public partial class ManagedClusterNatGatewayProfile : ProvisionableConstruct { /// /// The desired number of outbound IPs created/managed by Azure. Allowed diff --git a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterOidcIssuerProfile.cs b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterOidcIssuerProfile.cs index 5737206f72cc..b06decc30e01 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterOidcIssuerProfile.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterOidcIssuerProfile.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.ContainerService; /// /// The OIDC issuer profile of the Managed Cluster. /// -public partial class ManagedClusterOidcIssuerProfile : ProvisioningConstruct +public partial class ManagedClusterOidcIssuerProfile : ProvisionableConstruct { /// /// The OIDC issuer url of the Managed Cluster. diff --git a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterPodIdentity.cs b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterPodIdentity.cs index 6ff1153d7b35..27247ddee5fa 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterPodIdentity.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterPodIdentity.cs @@ -13,7 +13,7 @@ namespace Azure.Provisioning.ContainerService; /// /// Details about the pod identity assigned to the Managed Cluster. /// -public partial class ManagedClusterPodIdentity : ProvisioningConstruct +public partial class ManagedClusterPodIdentity : ProvisionableConstruct { /// /// The name of the pod identity. diff --git a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterPodIdentityException.cs b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterPodIdentityException.cs index 8ef7ce21fc0d..2d60b1c378b8 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterPodIdentityException.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterPodIdentityException.cs @@ -14,7 +14,7 @@ namespace Azure.Provisioning.ContainerService; /// Pod/Application](https://azure.github.io/aad-pod-identity/docs/configure/application_exception/) /// for more details. /// -public partial class ManagedClusterPodIdentityException : ProvisioningConstruct +public partial class ManagedClusterPodIdentityException : ProvisionableConstruct { /// /// The name of the pod identity exception. diff --git a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterPodIdentityProfile.cs b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterPodIdentityProfile.cs index b50a13ccf08e..f3efd9fb3786 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterPodIdentityProfile.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterPodIdentityProfile.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.ContainerService; /// identity](https://docs.microsoft.com/azure/aks/use-azure-ad-pod-identity) /// for more details on pod identity integration. /// -public partial class ManagedClusterPodIdentityProfile : ProvisioningConstruct +public partial class ManagedClusterPodIdentityProfile : ProvisionableConstruct { /// /// Whether the pod identity addon is enabled. diff --git a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterSecurityProfile.cs b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterSecurityProfile.cs index fc96aa77a6dc..18982e28d804 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterSecurityProfile.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterSecurityProfile.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.ContainerService; /// /// Security profile for the container service cluster. /// -public partial class ManagedClusterSecurityProfile : ProvisioningConstruct +public partial class ManagedClusterSecurityProfile : ProvisionableConstruct { /// /// Microsoft Defender settings for the security profile. diff --git a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterSecurityProfileDefender.cs b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterSecurityProfileDefender.cs index 24707046f20c..4a6a59deb64d 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterSecurityProfileDefender.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterSecurityProfileDefender.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.ContainerService; /// /// Microsoft Defender settings for the security profile. /// -public partial class ManagedClusterSecurityProfileDefender : ProvisioningConstruct +public partial class ManagedClusterSecurityProfileDefender : ProvisionableConstruct { /// /// Resource ID of the Log Analytics workspace to be associated with diff --git a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterSecurityProfileImageCleaner.cs b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterSecurityProfileImageCleaner.cs index ed89de33c3ab..f0110597b9ac 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterSecurityProfileImageCleaner.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterSecurityProfileImageCleaner.cs @@ -13,7 +13,7 @@ namespace Azure.Provisioning.ContainerService; /// helping to reduce attack surface area. Here are settings for the security /// profile. /// -public partial class ManagedClusterSecurityProfileImageCleaner : ProvisioningConstruct +public partial class ManagedClusterSecurityProfileImageCleaner : ProvisionableConstruct { /// /// Whether to enable Image Cleaner on AKS cluster. diff --git a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterSecurityProfileKeyVaultKms.cs b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterSecurityProfileKeyVaultKms.cs index 20241d86c983..4179a453db83 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterSecurityProfileKeyVaultKms.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterSecurityProfileKeyVaultKms.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.ContainerService; /// /// Azure Key Vault key management service settings for the security profile. /// -public partial class ManagedClusterSecurityProfileKeyVaultKms : ProvisioningConstruct +public partial class ManagedClusterSecurityProfileKeyVaultKms : ProvisionableConstruct { /// /// Whether to enable Azure Key Vault key management service. The default diff --git a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterServicePrincipalProfile.cs b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterServicePrincipalProfile.cs index 20854306ee5e..c2b1aff16b3c 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterServicePrincipalProfile.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterServicePrincipalProfile.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.ContainerService; /// Information about a service principal identity for the cluster to use for /// manipulating Azure APIs. /// -public partial class ManagedClusterServicePrincipalProfile : ProvisioningConstruct +public partial class ManagedClusterServicePrincipalProfile : ProvisionableConstruct { /// /// The ID for the service principal. diff --git a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterSku.cs b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterSku.cs index d1c7024e4766..34cb5be095b4 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterSku.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterSku.cs @@ -10,7 +10,7 @@ namespace Azure.Provisioning.ContainerService; /// /// The SKU of a Managed Cluster. /// -public partial class ManagedClusterSku : ProvisioningConstruct +public partial class ManagedClusterSku : ProvisionableConstruct { /// /// The name of a managed cluster SKU. diff --git a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterStorageProfile.cs b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterStorageProfile.cs index 551afea7b2ad..aa9c94afc7da 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterStorageProfile.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterStorageProfile.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.ContainerService; /// /// Storage profile for the container service cluster. /// -public partial class ManagedClusterStorageProfile : ProvisioningConstruct +public partial class ManagedClusterStorageProfile : ProvisionableConstruct { /// /// Whether to enable AzureDisk CSI Driver. The default value is true. diff --git a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterWindowsProfile.cs b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterWindowsProfile.cs index 4c67e0dee509..c6974958eb17 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterWindowsProfile.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterWindowsProfile.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.ContainerService; /// /// Profile for Windows VMs in the managed cluster. /// -public partial class ManagedClusterWindowsProfile : ProvisioningConstruct +public partial class ManagedClusterWindowsProfile : ProvisionableConstruct { /// /// Specifies the name of the administrator account. <br><br> diff --git a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterWorkloadAutoScalerProfile.cs b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterWorkloadAutoScalerProfile.cs index c5384ab8bdce..bd2ba46788bc 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterWorkloadAutoScalerProfile.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterWorkloadAutoScalerProfile.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.ContainerService; /// /// Workload Auto-scaler profile for the managed cluster. /// -public partial class ManagedClusterWorkloadAutoScalerProfile : ProvisioningConstruct +public partial class ManagedClusterWorkloadAutoScalerProfile : ProvisionableConstruct { /// /// Whether to enable KEDA. diff --git a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ServiceMeshProfile.cs b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ServiceMeshProfile.cs index 4cbbccb18a7d..4e137f82197e 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ServiceMeshProfile.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ServiceMeshProfile.cs @@ -13,7 +13,7 @@ namespace Azure.Provisioning.ContainerService; /// /// Service mesh profile for a managed cluster. /// -public partial class ServiceMeshProfile : ProvisioningConstruct +public partial class ServiceMeshProfile : ProvisionableConstruct { /// /// Mode of the service mesh. diff --git a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/SysctlConfig.cs b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/SysctlConfig.cs index 4a5d2a4a8771..996f03b1ed94 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/SysctlConfig.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/SysctlConfig.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.ContainerService; /// /// Sysctl settings for Linux agent nodes. /// -public partial class SysctlConfig : ProvisioningConstruct +public partial class SysctlConfig : ProvisionableConstruct { /// /// Sysctl setting net.core.somaxconn. diff --git a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/UpgradeOverrideSettings.cs b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/UpgradeOverrideSettings.cs index 04f00ff9f097..947083231315 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/UpgradeOverrideSettings.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/UpgradeOverrideSettings.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.ContainerService; /// /// Settings for overrides when upgrading a cluster. /// -public partial class UpgradeOverrideSettings : ProvisioningConstruct +public partial class UpgradeOverrideSettings : ProvisionableConstruct { /// /// Whether to force upgrade the cluster. Note that this option instructs diff --git a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/WindowsGmsaProfile.cs b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/WindowsGmsaProfile.cs index 436790ac39f7..092d834f79d4 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/WindowsGmsaProfile.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/WindowsGmsaProfile.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.ContainerService; /// /// Windows gMSA Profile in the managed cluster. /// -public partial class WindowsGmsaProfile : ProvisioningConstruct +public partial class WindowsGmsaProfile : ProvisionableConstruct { /// /// Specifies whether to enable Windows gMSA in the managed cluster. diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/api/Azure.Provisioning.CosmosDB.netstandard2.0.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/api/Azure.Provisioning.CosmosDB.netstandard2.0.cs index 49a0360eaeba..2493d1791762 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/api/Azure.Provisioning.CosmosDB.netstandard2.0.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/api/Azure.Provisioning.CosmosDB.netstandard2.0.cs @@ -5,7 +5,7 @@ public enum AnalyticalStorageSchemaType WellDefined = 0, FullFidelity = 1, } - public partial class AuthenticationMethodLdapProperties : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class AuthenticationMethodLdapProperties : Azure.Provisioning.Primitives.ProvisionableConstruct { public AuthenticationMethodLdapProperties() { } public Azure.Provisioning.BicepValue ConnectionTimeoutInMs { get { throw null; } set { } } @@ -17,7 +17,7 @@ public AuthenticationMethodLdapProperties() { } public Azure.Provisioning.BicepValue ServiceUserDistinguishedName { get { throw null; } set { } } public Azure.Provisioning.BicepValue ServiceUserPassword { get { throw null; } set { } } } - public partial class AutoscaleSettingsResourceInfo : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class AutoscaleSettingsResourceInfo : Azure.Provisioning.Primitives.ProvisionableConstruct { public AutoscaleSettingsResourceInfo() { } public Azure.Provisioning.BicepValue AutoUpgradeThroughputPolicy { get { throw null; } set { } } @@ -30,7 +30,7 @@ public AzureBlobDataTransferDataSourceSink() { } public Azure.Provisioning.BicepValue ContainerName { get { throw null; } set { } } public Azure.Provisioning.BicepValue EndpointUri { get { throw null; } set { } } } - public partial class BackupPolicyMigrationState : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class BackupPolicyMigrationState : Azure.Provisioning.Primitives.ProvisionableConstruct { public BackupPolicyMigrationState() { } public Azure.Provisioning.BicepValue StartOn { get { throw null; } set { } } @@ -66,14 +66,14 @@ public enum CassandraAutoReplicateForm SystemKeyspaces = 1, AllKeyspaces = 2, } - public partial class CassandraCertificate : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class CassandraCertificate : Azure.Provisioning.Primitives.ProvisionableConstruct { public CassandraCertificate() { } public Azure.Provisioning.BicepValue Pem { get { throw null; } set { } } } - public partial class CassandraCluster : Azure.Provisioning.Primitives.Resource + public partial class CassandraCluster : Azure.Provisioning.Primitives.ProvisionableResource { - public CassandraCluster(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public CassandraCluster(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Identity { get { throw null; } set { } } public Azure.Provisioning.BicepValue Location { get { throw null; } set { } } @@ -81,7 +81,7 @@ public partial class CassandraCluster : Azure.Provisioning.Primitives.Resource public Azure.Provisioning.BicepValue Properties { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } - public static Azure.Provisioning.CosmosDB.CassandraCluster FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.CosmosDB.CassandraCluster FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2021_10_15; @@ -94,23 +94,22 @@ public static partial class ResourceVersions public static readonly string V2023_11_15; public static readonly string V2024_05_15; public static readonly string V2024_08_15; - public static readonly string V2024_09_01_preview; } } - public partial class CassandraClusterBackupSchedule : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class CassandraClusterBackupSchedule : Azure.Provisioning.Primitives.ProvisionableConstruct { public CassandraClusterBackupSchedule() { } public Azure.Provisioning.BicepValue CronExpression { get { throw null; } set { } } public Azure.Provisioning.BicepValue RetentionInHours { get { throw null; } set { } } public Azure.Provisioning.BicepValue ScheduleName { get { throw null; } set { } } } - public partial class CassandraClusterKey : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class CassandraClusterKey : Azure.Provisioning.Primitives.ProvisionableConstruct { public CassandraClusterKey() { } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } public Azure.Provisioning.BicepValue OrderBy { get { throw null; } set { } } } - public partial class CassandraClusterProperties : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class CassandraClusterProperties : Azure.Provisioning.Primitives.ProvisionableConstruct { public CassandraClusterProperties() { } public Azure.Provisioning.BicepValue AuthenticationMethod { get { throw null; } set { } } @@ -145,21 +144,21 @@ public enum CassandraClusterType Production = 0, NonProduction = 1, } - public partial class CassandraColumn : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class CassandraColumn : Azure.Provisioning.Primitives.ProvisionableConstruct { public CassandraColumn() { } public Azure.Provisioning.BicepValue CassandraColumnType { get { throw null; } set { } } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } } - public partial class CassandraDataCenter : Azure.Provisioning.Primitives.Resource + public partial class CassandraDataCenter : Azure.Provisioning.Primitives.ProvisionableResource { - public CassandraDataCenter(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public CassandraDataCenter(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } public Azure.Provisioning.CosmosDB.CassandraCluster? Parent { get { throw null; } set { } } public Azure.Provisioning.BicepValue Properties { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.CosmosDB.CassandraDataCenter FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.CosmosDB.CassandraDataCenter FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2021_10_15; @@ -172,10 +171,9 @@ public static partial class ResourceVersions public static readonly string V2023_11_15; public static readonly string V2024_05_15; public static readonly string V2024_08_15; - public static readonly string V2024_09_01_preview; } } - public partial class CassandraDataCenterProperties : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class CassandraDataCenterProperties : Azure.Provisioning.Primitives.ProvisionableConstruct { public CassandraDataCenterProperties() { } public Azure.Provisioning.BicepValue AuthenticationMethodLdapProperties { get { throw null; } set { } } @@ -195,12 +193,12 @@ public CassandraDataCenterProperties() { } public Azure.Provisioning.BicepList SeedNodes { get { throw null; } } public Azure.Provisioning.BicepValue Sku { get { throw null; } set { } } } - public partial class CassandraDataCenterSeedNode : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class CassandraDataCenterSeedNode : Azure.Provisioning.Primitives.ProvisionableConstruct { public CassandraDataCenterSeedNode() { } public Azure.Provisioning.BicepValue IPAddress { get { throw null; } set { } } } - public partial class CassandraError : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class CassandraError : Azure.Provisioning.Primitives.ProvisionableConstruct { public CassandraError() { } public Azure.Provisioning.BicepValue AdditionalErrorInfo { get { throw null; } set { } } @@ -208,9 +206,9 @@ public CassandraError() { } public Azure.Provisioning.BicepValue Message { get { throw null; } set { } } public Azure.Provisioning.BicepValue Target { get { throw null; } set { } } } - public partial class CassandraKeyspace : Azure.Provisioning.Primitives.Resource + public partial class CassandraKeyspace : Azure.Provisioning.Primitives.ProvisionableResource { - public CassandraKeyspace(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public CassandraKeyspace(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Identity { get { throw null; } set { } } public Azure.Provisioning.BicepValue Location { get { throw null; } set { } } @@ -221,7 +219,7 @@ public partial class CassandraKeyspace : Azure.Provisioning.Primitives.Resource public Azure.Provisioning.BicepValue ResourceKeyspaceName { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } - public static Azure.Provisioning.CosmosDB.CassandraKeyspace FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.CosmosDB.CassandraKeyspace FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2014_04_01; @@ -249,18 +247,17 @@ public static partial class ResourceVersions public static readonly string V2023_11_15; public static readonly string V2024_05_15; public static readonly string V2024_08_15; - public static readonly string V2024_09_01_preview; } } - public partial class CassandraKeyspacePropertiesConfig : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class CassandraKeyspacePropertiesConfig : Azure.Provisioning.Primitives.ProvisionableConstruct { public CassandraKeyspacePropertiesConfig() { } public Azure.Provisioning.BicepValue AutoscaleMaxThroughput { get { throw null; } set { } } public Azure.Provisioning.BicepValue Throughput { get { throw null; } set { } } } - public partial class CassandraKeyspaceThroughputSetting : Azure.Provisioning.Primitives.Resource + public partial class CassandraKeyspaceThroughputSetting : Azure.Provisioning.Primitives.ProvisionableResource { - public CassandraKeyspaceThroughputSetting(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public CassandraKeyspaceThroughputSetting(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Identity { get { throw null; } set { } } public Azure.Provisioning.BicepValue Location { get { throw null; } set { } } @@ -269,7 +266,7 @@ public partial class CassandraKeyspaceThroughputSetting : Azure.Provisioning.Pri public Azure.Provisioning.BicepValue Resource { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } - public static Azure.Provisioning.CosmosDB.CassandraKeyspaceThroughputSetting FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.CosmosDB.CassandraKeyspaceThroughputSetting FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2014_04_01; @@ -297,10 +294,9 @@ public static partial class ResourceVersions public static readonly string V2023_11_15; public static readonly string V2024_05_15; public static readonly string V2024_08_15; - public static readonly string V2024_09_01_preview; } } - public partial class CassandraPartitionKey : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class CassandraPartitionKey : Azure.Provisioning.Primitives.ProvisionableConstruct { public CassandraPartitionKey() { } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } @@ -314,16 +310,16 @@ public enum CassandraProvisioningState Failed = 4, Canceled = 5, } - public partial class CassandraSchema : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class CassandraSchema : Azure.Provisioning.Primitives.ProvisionableConstruct { public CassandraSchema() { } public Azure.Provisioning.BicepList ClusterKeys { get { throw null; } set { } } public Azure.Provisioning.BicepList Columns { get { throw null; } set { } } public Azure.Provisioning.BicepList PartitionKeys { get { throw null; } set { } } } - public partial class CassandraTable : Azure.Provisioning.Primitives.Resource + public partial class CassandraTable : Azure.Provisioning.Primitives.ProvisionableResource { - public CassandraTable(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public CassandraTable(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Identity { get { throw null; } set { } } public Azure.Provisioning.BicepValue Location { get { throw null; } set { } } @@ -333,7 +329,7 @@ public partial class CassandraTable : Azure.Provisioning.Primitives.Resource public Azure.Provisioning.BicepValue Resource { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } - public static Azure.Provisioning.CosmosDB.CassandraTable FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.CosmosDB.CassandraTable FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2014_04_01; @@ -361,16 +357,15 @@ public static partial class ResourceVersions public static readonly string V2023_11_15; public static readonly string V2024_05_15; public static readonly string V2024_08_15; - public static readonly string V2024_09_01_preview; } } - public partial class CassandraTablePropertiesConfig : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class CassandraTablePropertiesConfig : Azure.Provisioning.Primitives.ProvisionableConstruct { public CassandraTablePropertiesConfig() { } public Azure.Provisioning.BicepValue AutoscaleMaxThroughput { get { throw null; } set { } } public Azure.Provisioning.BicepValue Throughput { get { throw null; } set { } } } - public partial class CassandraTableResourceInfo : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class CassandraTableResourceInfo : Azure.Provisioning.Primitives.ProvisionableConstruct { public CassandraTableResourceInfo() { } public Azure.Provisioning.BicepValue AnalyticalStorageTtl { get { throw null; } set { } } @@ -378,9 +373,9 @@ public CassandraTableResourceInfo() { } public Azure.Provisioning.BicepValue Schema { get { throw null; } set { } } public Azure.Provisioning.BicepValue TableName { get { throw null; } set { } } } - public partial class CassandraTableThroughputSetting : Azure.Provisioning.Primitives.Resource + public partial class CassandraTableThroughputSetting : Azure.Provisioning.Primitives.ProvisionableResource { - public CassandraTableThroughputSetting(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public CassandraTableThroughputSetting(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Identity { get { throw null; } set { } } public Azure.Provisioning.BicepValue Location { get { throw null; } set { } } @@ -389,7 +384,7 @@ public partial class CassandraTableThroughputSetting : Azure.Provisioning.Primit public Azure.Provisioning.BicepValue Resource { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } - public static Azure.Provisioning.CosmosDB.CassandraTableThroughputSetting FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.CosmosDB.CassandraTableThroughputSetting FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2014_04_01; @@ -417,10 +412,9 @@ public static partial class ResourceVersions public static readonly string V2023_11_15; public static readonly string V2024_05_15; public static readonly string V2024_08_15; - public static readonly string V2024_09_01_preview; } } - public partial class CassandraViewGetPropertiesOptions : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class CassandraViewGetPropertiesOptions : Azure.Provisioning.Primitives.ProvisionableConstruct { public CassandraViewGetPropertiesOptions() { } public Azure.Provisioning.BicepValue AutoscaleMaxThroughput { get { throw null; } set { } } @@ -433,9 +427,9 @@ public CassandraViewGetPropertiesResource() { } public Azure.Provisioning.BicepValue Rid { get { throw null; } } public Azure.Provisioning.BicepValue Timestamp { get { throw null; } } } - public partial class CassandraViewGetResult : Azure.Provisioning.Primitives.Resource + public partial class CassandraViewGetResult : Azure.Provisioning.Primitives.ProvisionableResource { - public CassandraViewGetResult(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public CassandraViewGetResult(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Identity { get { throw null; } set { } } public Azure.Provisioning.BicepValue Location { get { throw null; } set { } } @@ -445,7 +439,7 @@ public partial class CassandraViewGetResult : Azure.Provisioning.Primitives.Reso public Azure.Provisioning.BicepValue Resource { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } - public static Azure.Provisioning.CosmosDB.CassandraViewGetResult FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.CosmosDB.CassandraViewGetResult FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2014_04_01; @@ -473,18 +467,17 @@ public static partial class ResourceVersions public static readonly string V2023_11_15; public static readonly string V2024_05_15; public static readonly string V2024_08_15; - public static readonly string V2024_09_01_preview; } } - public partial class CassandraViewResource : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class CassandraViewResource : Azure.Provisioning.Primitives.ProvisionableConstruct { public CassandraViewResource() { } public Azure.Provisioning.BicepValue Id { get { throw null; } set { } } public Azure.Provisioning.BicepValue ViewDefinition { get { throw null; } set { } } } - public partial class CassandraViewThroughputSetting : Azure.Provisioning.Primitives.Resource + public partial class CassandraViewThroughputSetting : Azure.Provisioning.Primitives.ProvisionableResource { - public CassandraViewThroughputSetting(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public CassandraViewThroughputSetting(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Identity { get { throw null; } set { } } public Azure.Provisioning.BicepValue Location { get { throw null; } set { } } @@ -493,7 +486,7 @@ public partial class CassandraViewThroughputSetting : Azure.Provisioning.Primiti public Azure.Provisioning.BicepValue Resource { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } - public static Azure.Provisioning.CosmosDB.CassandraViewThroughputSetting FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.CosmosDB.CassandraViewThroughputSetting FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2014_04_01; @@ -521,7 +514,6 @@ public static partial class ResourceVersions public static readonly string V2023_11_15; public static readonly string V2024_05_15; public static readonly string V2024_08_15; - public static readonly string V2024_09_01_preview; } } public enum CompositePathSortOrder @@ -531,7 +523,7 @@ public enum CompositePathSortOrder [System.Runtime.Serialization.DataMemberAttribute(Name="descending")] Descending = 1, } - public partial class ComputedProperty : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ComputedProperty : Azure.Provisioning.Primitives.ProvisionableConstruct { public ComputedProperty() { } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } @@ -542,7 +534,7 @@ public enum ConflictResolutionMode LastWriterWins = 0, Custom = 1, } - public partial class ConflictResolutionPolicy : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ConflictResolutionPolicy : Azure.Provisioning.Primitives.ProvisionableConstruct { public ConflictResolutionPolicy() { } public Azure.Provisioning.BicepValue ConflictResolutionPath { get { throw null; } set { } } @@ -553,7 +545,7 @@ public enum ConnectorOffer { Small = 0, } - public partial class ConsistencyPolicy : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ConsistencyPolicy : Azure.Provisioning.Primitives.ProvisionableConstruct { public ConsistencyPolicy() { } public Azure.Provisioning.BicepValue DefaultConsistencyLevel { get { throw null; } set { } } @@ -576,9 +568,9 @@ public CosmosCassandraDataTransferDataSourceSink() { } public Azure.Provisioning.BicepValue KeyspaceName { get { throw null; } set { } } public Azure.Provisioning.BicepValue TableName { get { throw null; } set { } } } - public partial class CosmosDBAccount : Azure.Provisioning.Primitives.Resource + public partial class CosmosDBAccount : Azure.Provisioning.Primitives.ProvisionableResource { - public CosmosDBAccount(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public CosmosDBAccount(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue AnalyticalStorageSchemaType { get { throw null; } set { } } public Azure.Provisioning.BicepValue ApiServerVersion { get { throw null; } set { } } public Azure.Provisioning.BicepValue BackupPolicy { get { throw null; } set { } } @@ -630,9 +622,9 @@ public partial class CosmosDBAccount : Azure.Provisioning.Primitives.Resource public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } public Azure.Provisioning.BicepList VirtualNetworkRules { get { throw null; } set { } } public Azure.Provisioning.BicepList WriteLocations { get { throw null; } } - public Azure.Provisioning.Authorization.RoleAssignment CreateRoleAssignment(Azure.Provisioning.CosmosDB.CosmosDBBuiltInRole role, Azure.Provisioning.BicepValue principalType, Azure.Provisioning.BicepValue principalId, string? identifierNameSuffix = null) { throw null; } + public Azure.Provisioning.Authorization.RoleAssignment CreateRoleAssignment(Azure.Provisioning.CosmosDB.CosmosDBBuiltInRole role, Azure.Provisioning.BicepValue principalType, Azure.Provisioning.BicepValue principalId, string? bicepIdentifierSuffix = null) { throw null; } public Azure.Provisioning.Authorization.RoleAssignment CreateRoleAssignment(Azure.Provisioning.CosmosDB.CosmosDBBuiltInRole role, Azure.Provisioning.Roles.UserAssignedIdentity identity) { throw null; } - public static Azure.Provisioning.CosmosDB.CosmosDBAccount FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.CosmosDB.CosmosDBAccount FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public Azure.Provisioning.CosmosDB.CosmosDBAccountKeyList GetKeys() { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override Azure.Provisioning.Primitives.ResourceNameRequirements GetResourceNameRequirements() { throw null; } @@ -663,20 +655,19 @@ public static partial class ResourceVersions public static readonly string V2023_11_15; public static readonly string V2024_05_15; public static readonly string V2024_08_15; - public static readonly string V2024_09_01_preview; } } - public partial class CosmosDBAccountBackupPolicy : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class CosmosDBAccountBackupPolicy : Azure.Provisioning.Primitives.ProvisionableConstruct { public CosmosDBAccountBackupPolicy() { } public Azure.Provisioning.BicepValue MigrationState { get { throw null; } set { } } } - public partial class CosmosDBAccountCapability : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class CosmosDBAccountCapability : Azure.Provisioning.Primitives.ProvisionableConstruct { public CosmosDBAccountCapability() { } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } } - public partial class CosmosDBAccountCorsPolicy : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class CosmosDBAccountCorsPolicy : Azure.Provisioning.Primitives.ProvisionableConstruct { public CosmosDBAccountCorsPolicy() { } public Azure.Provisioning.BicepValue AllowedHeaders { get { throw null; } set { } } @@ -691,7 +682,7 @@ public enum CosmosDBAccountCreateMode Restore = 1, PointInTimeRestore = 2, } - public partial class CosmosDBAccountKeyList : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class CosmosDBAccountKeyList : Azure.Provisioning.Primitives.ProvisionableConstruct { public CosmosDBAccountKeyList() { } public Azure.Provisioning.BicepValue PrimaryMasterKey { get { throw null; } } @@ -699,7 +690,7 @@ public CosmosDBAccountKeyList() { } public Azure.Provisioning.BicepValue SecondaryMasterKey { get { throw null; } } public Azure.Provisioning.BicepValue SecondaryReadonlyMasterKey { get { throw null; } } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public static Azure.Provisioning.CosmosDB.CosmosDBAccountKeyList FromExpression(Azure.Provisioning.Expressions.Expression expression) { throw null; } + public static Azure.Provisioning.CosmosDB.CosmosDBAccountKeyList FromExpression(Azure.Provisioning.Expressions.BicepExpression expression) { throw null; } } public enum CosmosDBAccountKind { @@ -707,7 +698,7 @@ public enum CosmosDBAccountKind MongoDB = 1, Parse = 2, } - public partial class CosmosDBAccountLocation : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class CosmosDBAccountLocation : Azure.Provisioning.Primitives.ProvisionableConstruct { public CosmosDBAccountLocation() { } public Azure.Provisioning.BicepValue DocumentEndpoint { get { throw null; } } @@ -725,7 +716,7 @@ public enum CosmosDBAccountRestoreMode { PointInTime = 0, } - public partial class CosmosDBAccountRestoreParameters : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class CosmosDBAccountRestoreParameters : Azure.Provisioning.Primitives.ProvisionableConstruct { public CosmosDBAccountRestoreParameters() { } public Azure.Provisioning.BicepList DatabasesToRestore { get { throw null; } set { } } @@ -766,7 +757,7 @@ public enum CosmosDBBackupStorageRedundancy public static bool operator !=(Azure.Provisioning.CosmosDB.CosmosDBBuiltInRole left, Azure.Provisioning.CosmosDB.CosmosDBBuiltInRole right) { throw null; } public override string ToString() { throw null; } } - public partial class CosmosDBClientEncryptionIncludedPath : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class CosmosDBClientEncryptionIncludedPath : Azure.Provisioning.Primitives.ProvisionableConstruct { public CosmosDBClientEncryptionIncludedPath() { } public Azure.Provisioning.BicepValue ClientEncryptionKeyId { get { throw null; } set { } } @@ -774,19 +765,19 @@ public CosmosDBClientEncryptionIncludedPath() { } public Azure.Provisioning.BicepValue EncryptionType { get { throw null; } set { } } public Azure.Provisioning.BicepValue Path { get { throw null; } set { } } } - public partial class CosmosDBClientEncryptionPolicy : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class CosmosDBClientEncryptionPolicy : Azure.Provisioning.Primitives.ProvisionableConstruct { public CosmosDBClientEncryptionPolicy() { } public Azure.Provisioning.BicepList IncludedPaths { get { throw null; } set { } } public Azure.Provisioning.BicepValue PolicyFormatVersion { get { throw null; } set { } } } - public partial class CosmosDBCompositePath : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class CosmosDBCompositePath : Azure.Provisioning.Primitives.ProvisionableConstruct { public CosmosDBCompositePath() { } public Azure.Provisioning.BicepValue Order { get { throw null; } set { } } public Azure.Provisioning.BicepValue Path { get { throw null; } set { } } } - public partial class CosmosDBContainerPartitionKey : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class CosmosDBContainerPartitionKey : Azure.Provisioning.Primitives.ProvisionableConstruct { public CosmosDBContainerPartitionKey() { } public Azure.Provisioning.BicepValue IsSystemKey { get { throw null; } } @@ -794,7 +785,7 @@ public CosmosDBContainerPartitionKey() { } public Azure.Provisioning.BicepList Paths { get { throw null; } set { } } public Azure.Provisioning.BicepValue Version { get { throw null; } set { } } } - public partial class CosmosDBCreateUpdateConfig : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class CosmosDBCreateUpdateConfig : Azure.Provisioning.Primitives.ProvisionableConstruct { public CosmosDBCreateUpdateConfig() { } public Azure.Provisioning.BicepValue AutoscaleMaxThroughput { get { throw null; } set { } } @@ -809,21 +800,21 @@ public enum CosmosDBDataType LineString = 4, MultiPolygon = 5, } - public partial class CosmosDBExcludedPath : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class CosmosDBExcludedPath : Azure.Provisioning.Primitives.ProvisionableConstruct { public CosmosDBExcludedPath() { } public Azure.Provisioning.BicepValue Path { get { throw null; } set { } } } - public partial class CosmosDBFailoverPolicy : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class CosmosDBFailoverPolicy : Azure.Provisioning.Primitives.ProvisionableConstruct { public CosmosDBFailoverPolicy() { } public Azure.Provisioning.BicepValue FailoverPriority { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue LocationName { get { throw null; } set { } } } - public partial class CosmosDBFirewallRule : Azure.Provisioning.Primitives.Resource + public partial class CosmosDBFirewallRule : Azure.Provisioning.Primitives.ProvisionableResource { - public CosmosDBFirewallRule(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public CosmosDBFirewallRule(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue EndIPAddress { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } @@ -831,13 +822,13 @@ public partial class CosmosDBFirewallRule : Azure.Provisioning.Primitives.Resour public Azure.Provisioning.BicepValue ProvisioningState { get { throw null; } } public Azure.Provisioning.BicepValue StartIPAddress { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.CosmosDB.CosmosDBFirewallRule FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.CosmosDB.CosmosDBFirewallRule FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2024_07_01; } } - public partial class CosmosDBIncludedPath : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class CosmosDBIncludedPath : Azure.Provisioning.Primitives.ProvisionableConstruct { public CosmosDBIncludedPath() { } public Azure.Provisioning.BicepList Indexes { get { throw null; } set { } } @@ -852,7 +843,7 @@ public enum CosmosDBIndexingMode [System.Runtime.Serialization.DataMemberAttribute(Name="none")] None = 2, } - public partial class CosmosDBIndexingPolicy : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class CosmosDBIndexingPolicy : Azure.Provisioning.Primitives.ProvisionableConstruct { public CosmosDBIndexingPolicy() { } public Azure.Provisioning.BicepList> CompositeIndexes { get { throw null; } set { } } @@ -868,12 +859,12 @@ public enum CosmosDBIndexKind Range = 1, Spatial = 2, } - public partial class CosmosDBIPAddressOrRange : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class CosmosDBIPAddressOrRange : Azure.Provisioning.Primitives.ProvisionableConstruct { public CosmosDBIPAddressOrRange() { } public Azure.Provisioning.BicepValue IPAddressOrRange { get { throw null; } set { } } } - public partial class CosmosDBKeyWrapMetadata : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class CosmosDBKeyWrapMetadata : Azure.Provisioning.Primitives.ProvisionableConstruct { public CosmosDBKeyWrapMetadata() { } public Azure.Provisioning.BicepValue Algorithm { get { throw null; } set { } } @@ -893,16 +884,16 @@ public enum CosmosDBPartitionKind Range = 1, MultiHash = 2, } - public partial class CosmosDBPathIndexes : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class CosmosDBPathIndexes : Azure.Provisioning.Primitives.ProvisionableConstruct { public CosmosDBPathIndexes() { } public Azure.Provisioning.BicepValue DataType { get { throw null; } set { } } public Azure.Provisioning.BicepValue Kind { get { throw null; } set { } } public Azure.Provisioning.BicepValue Precision { get { throw null; } set { } } } - public partial class CosmosDBPrivateEndpointConnection : Azure.Provisioning.Primitives.Resource + public partial class CosmosDBPrivateEndpointConnection : Azure.Provisioning.Primitives.ProvisionableResource { - public CosmosDBPrivateEndpointConnection(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public CosmosDBPrivateEndpointConnection(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue ConnectionState { get { throw null; } set { } } public Azure.Provisioning.BicepValue GroupId { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } @@ -911,7 +902,7 @@ public partial class CosmosDBPrivateEndpointConnection : Azure.Provisioning.Prim public Azure.Provisioning.BicepValue PrivateEndpointId { get { throw null; } set { } } public Azure.Provisioning.BicepValue ProvisioningState { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.CosmosDB.CosmosDBPrivateEndpointConnection FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.CosmosDB.CosmosDBPrivateEndpointConnection FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2014_04_01; @@ -939,10 +930,9 @@ public static partial class ResourceVersions public static readonly string V2023_11_15; public static readonly string V2024_05_15; public static readonly string V2024_08_15; - public static readonly string V2024_09_01_preview; } } - public partial class CosmosDBPrivateEndpointConnectionData : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class CosmosDBPrivateEndpointConnectionData : Azure.Provisioning.Primitives.ProvisionableConstruct { public CosmosDBPrivateEndpointConnectionData() { } public Azure.Provisioning.BicepValue ConnectionState { get { throw null; } set { } } @@ -953,7 +943,7 @@ public CosmosDBPrivateEndpointConnectionData() { } public Azure.Provisioning.BicepValue ProvisioningState { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } } - public partial class CosmosDBPrivateLinkServiceConnectionStateProperty : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class CosmosDBPrivateLinkServiceConnectionStateProperty : Azure.Provisioning.Primitives.ProvisionableConstruct { public CosmosDBPrivateLinkServiceConnectionStateProperty() { } public Azure.Provisioning.BicepValue ActionsRequired { get { throw null; } } @@ -986,9 +976,9 @@ public enum CosmosDBServerVersion [System.Runtime.Serialization.DataMemberAttribute(Name="4.2")] V4_2 = 3, } - public partial class CosmosDBService : Azure.Provisioning.Primitives.Resource + public partial class CosmosDBService : Azure.Provisioning.Primitives.ProvisionableResource { - public CosmosDBService(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public CosmosDBService(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue InstanceCount { get { throw null; } set { } } public Azure.Provisioning.BicepValue InstanceSize { get { throw null; } set { } } @@ -997,7 +987,7 @@ public partial class CosmosDBService : Azure.Provisioning.Primitives.Resource public Azure.Provisioning.BicepValue Properties { get { throw null; } } public Azure.Provisioning.BicepValue ServiceType { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.CosmosDB.CosmosDBService FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.CosmosDB.CosmosDBService FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2014_04_01; @@ -1025,10 +1015,9 @@ public static partial class ResourceVersions public static readonly string V2023_11_15; public static readonly string V2024_05_15; public static readonly string V2024_08_15; - public static readonly string V2024_09_01_preview; } } - public partial class CosmosDBServiceProperties : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class CosmosDBServiceProperties : Azure.Provisioning.Primitives.ProvisionableConstruct { public CosmosDBServiceProperties() { } public Azure.Provisioning.BicepDictionary AdditionalProperties { get { throw null; } set { } } @@ -1070,15 +1059,15 @@ public enum CosmosDBSpatialType Polygon = 2, MultiPolygon = 3, } - public partial class CosmosDBSqlClientEncryptionKey : Azure.Provisioning.Primitives.Resource + public partial class CosmosDBSqlClientEncryptionKey : Azure.Provisioning.Primitives.ProvisionableResource { - public CosmosDBSqlClientEncryptionKey(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public CosmosDBSqlClientEncryptionKey(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } public Azure.Provisioning.CosmosDB.CosmosDBSqlDatabase? Parent { get { throw null; } set { } } public Azure.Provisioning.BicepValue Resource { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.CosmosDB.CosmosDBSqlClientEncryptionKey FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.CosmosDB.CosmosDBSqlClientEncryptionKey FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2014_04_01; @@ -1106,7 +1095,6 @@ public static partial class ResourceVersions public static readonly string V2023_11_15; public static readonly string V2024_05_15; public static readonly string V2024_08_15; - public static readonly string V2024_09_01_preview; } } public partial class CosmosDBSqlClientEncryptionKeyProperties : Azure.Provisioning.CosmosDB.CosmosDBSqlClientEncryptionKeyResourceInfo @@ -1116,7 +1104,7 @@ public CosmosDBSqlClientEncryptionKeyProperties() { } public Azure.Provisioning.BicepValue Rid { get { throw null; } } public Azure.Provisioning.BicepValue Timestamp { get { throw null; } } } - public partial class CosmosDBSqlClientEncryptionKeyResourceInfo : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class CosmosDBSqlClientEncryptionKeyResourceInfo : Azure.Provisioning.Primitives.ProvisionableConstruct { public CosmosDBSqlClientEncryptionKeyResourceInfo() { } public Azure.Provisioning.BicepValue EncryptionAlgorithm { get { throw null; } set { } } @@ -1124,9 +1112,9 @@ public CosmosDBSqlClientEncryptionKeyResourceInfo() { } public Azure.Provisioning.BicepValue KeyWrapMetadata { get { throw null; } set { } } public Azure.Provisioning.BicepValue WrappedDataEncryptionKey { get { throw null; } set { } } } - public partial class CosmosDBSqlContainer : Azure.Provisioning.Primitives.Resource + public partial class CosmosDBSqlContainer : Azure.Provisioning.Primitives.ProvisionableResource { - public CosmosDBSqlContainer(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public CosmosDBSqlContainer(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Identity { get { throw null; } set { } } public Azure.Provisioning.BicepValue Location { get { throw null; } set { } } @@ -1136,7 +1124,7 @@ public partial class CosmosDBSqlContainer : Azure.Provisioning.Primitives.Resour public Azure.Provisioning.BicepValue Resource { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } - public static Azure.Provisioning.CosmosDB.CosmosDBSqlContainer FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.CosmosDB.CosmosDBSqlContainer FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2014_04_01; @@ -1164,16 +1152,15 @@ public static partial class ResourceVersions public static readonly string V2023_11_15; public static readonly string V2024_05_15; public static readonly string V2024_08_15; - public static readonly string V2024_09_01_preview; } } - public partial class CosmosDBSqlContainerPropertiesConfig : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class CosmosDBSqlContainerPropertiesConfig : Azure.Provisioning.Primitives.ProvisionableConstruct { public CosmosDBSqlContainerPropertiesConfig() { } public Azure.Provisioning.BicepValue AutoscaleMaxThroughput { get { throw null; } set { } } public Azure.Provisioning.BicepValue Throughput { get { throw null; } set { } } } - public partial class CosmosDBSqlContainerResourceInfo : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class CosmosDBSqlContainerResourceInfo : Azure.Provisioning.Primitives.ProvisionableConstruct { public CosmosDBSqlContainerResourceInfo() { } public Azure.Provisioning.BicepValue AnalyticalStorageTtl { get { throw null; } set { } } @@ -1189,9 +1176,9 @@ public CosmosDBSqlContainerResourceInfo() { } public Azure.Provisioning.BicepValue RestoreParameters { get { throw null; } set { } } public Azure.Provisioning.BicepList UniqueKeys { get { throw null; } set { } } } - public partial class CosmosDBSqlContainerThroughputSetting : Azure.Provisioning.Primitives.Resource + public partial class CosmosDBSqlContainerThroughputSetting : Azure.Provisioning.Primitives.ProvisionableResource { - public CosmosDBSqlContainerThroughputSetting(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public CosmosDBSqlContainerThroughputSetting(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Identity { get { throw null; } set { } } public Azure.Provisioning.BicepValue Location { get { throw null; } set { } } @@ -1200,7 +1187,7 @@ public partial class CosmosDBSqlContainerThroughputSetting : Azure.Provisioning. public Azure.Provisioning.BicepValue Resource { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } - public static Azure.Provisioning.CosmosDB.CosmosDBSqlContainerThroughputSetting FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.CosmosDB.CosmosDBSqlContainerThroughputSetting FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2014_04_01; @@ -1228,12 +1215,11 @@ public static partial class ResourceVersions public static readonly string V2023_11_15; public static readonly string V2024_05_15; public static readonly string V2024_08_15; - public static readonly string V2024_09_01_preview; } } - public partial class CosmosDBSqlDatabase : Azure.Provisioning.Primitives.Resource + public partial class CosmosDBSqlDatabase : Azure.Provisioning.Primitives.ProvisionableResource { - public CosmosDBSqlDatabase(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public CosmosDBSqlDatabase(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Identity { get { throw null; } set { } } public Azure.Provisioning.BicepValue Location { get { throw null; } set { } } @@ -1243,7 +1229,7 @@ public partial class CosmosDBSqlDatabase : Azure.Provisioning.Primitives.Resourc public Azure.Provisioning.BicepValue Resource { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } - public static Azure.Provisioning.CosmosDB.CosmosDBSqlDatabase FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.CosmosDB.CosmosDBSqlDatabase FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2014_04_01; @@ -1271,25 +1257,24 @@ public static partial class ResourceVersions public static readonly string V2023_11_15; public static readonly string V2024_05_15; public static readonly string V2024_08_15; - public static readonly string V2024_09_01_preview; } } - public partial class CosmosDBSqlDatabasePropertiesConfig : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class CosmosDBSqlDatabasePropertiesConfig : Azure.Provisioning.Primitives.ProvisionableConstruct { public CosmosDBSqlDatabasePropertiesConfig() { } public Azure.Provisioning.BicepValue AutoscaleMaxThroughput { get { throw null; } set { } } public Azure.Provisioning.BicepValue Throughput { get { throw null; } set { } } } - public partial class CosmosDBSqlDatabaseResourceInfo : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class CosmosDBSqlDatabaseResourceInfo : Azure.Provisioning.Primitives.ProvisionableConstruct { public CosmosDBSqlDatabaseResourceInfo() { } public Azure.Provisioning.BicepValue CreateMode { get { throw null; } set { } } public Azure.Provisioning.BicepValue DatabaseName { get { throw null; } set { } } public Azure.Provisioning.BicepValue RestoreParameters { get { throw null; } set { } } } - public partial class CosmosDBSqlDatabaseThroughputSetting : Azure.Provisioning.Primitives.Resource + public partial class CosmosDBSqlDatabaseThroughputSetting : Azure.Provisioning.Primitives.ProvisionableResource { - public CosmosDBSqlDatabaseThroughputSetting(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public CosmosDBSqlDatabaseThroughputSetting(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Identity { get { throw null; } set { } } public Azure.Provisioning.BicepValue Location { get { throw null; } set { } } @@ -1298,7 +1283,7 @@ public partial class CosmosDBSqlDatabaseThroughputSetting : Azure.Provisioning.P public Azure.Provisioning.BicepValue Resource { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } - public static Azure.Provisioning.CosmosDB.CosmosDBSqlDatabaseThroughputSetting FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.CosmosDB.CosmosDBSqlDatabaseThroughputSetting FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2014_04_01; @@ -1326,12 +1311,11 @@ public static partial class ResourceVersions public static readonly string V2023_11_15; public static readonly string V2024_05_15; public static readonly string V2024_08_15; - public static readonly string V2024_09_01_preview; } } - public partial class CosmosDBSqlRoleAssignment : Azure.Provisioning.Primitives.Resource + public partial class CosmosDBSqlRoleAssignment : Azure.Provisioning.Primitives.ProvisionableResource { - public CosmosDBSqlRoleAssignment(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public CosmosDBSqlRoleAssignment(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Name { get { throw null; } } public Azure.Provisioning.CosmosDB.CosmosDBAccount? Parent { get { throw null; } set { } } @@ -1339,7 +1323,7 @@ public partial class CosmosDBSqlRoleAssignment : Azure.Provisioning.Primitives.R public Azure.Provisioning.BicepValue RoleDefinitionId { get { throw null; } set { } } public Azure.Provisioning.BicepValue Scope { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.CosmosDB.CosmosDBSqlRoleAssignment FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.CosmosDB.CosmosDBSqlRoleAssignment FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2014_04_01; @@ -1367,12 +1351,11 @@ public static partial class ResourceVersions public static readonly string V2023_11_15; public static readonly string V2024_05_15; public static readonly string V2024_08_15; - public static readonly string V2024_09_01_preview; } } - public partial class CosmosDBSqlRoleDefinition : Azure.Provisioning.Primitives.Resource + public partial class CosmosDBSqlRoleDefinition : Azure.Provisioning.Primitives.ProvisionableResource { - public CosmosDBSqlRoleDefinition(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public CosmosDBSqlRoleDefinition(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepList AssignableScopes { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Name { get { throw null; } } @@ -1381,7 +1364,7 @@ public partial class CosmosDBSqlRoleDefinition : Azure.Provisioning.Primitives.R public Azure.Provisioning.BicepValue RoleDefinitionType { get { throw null; } set { } } public Azure.Provisioning.BicepValue RoleName { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.CosmosDB.CosmosDBSqlRoleDefinition FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.CosmosDB.CosmosDBSqlRoleDefinition FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2014_04_01; @@ -1409,7 +1392,6 @@ public static partial class ResourceVersions public static readonly string V2023_11_15; public static readonly string V2024_05_15; public static readonly string V2024_08_15; - public static readonly string V2024_09_01_preview; } } public enum CosmosDBSqlRoleDefinitionType @@ -1417,15 +1399,15 @@ public enum CosmosDBSqlRoleDefinitionType BuiltInRole = 0, CustomRole = 1, } - public partial class CosmosDBSqlRolePermission : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class CosmosDBSqlRolePermission : Azure.Provisioning.Primitives.ProvisionableConstruct { public CosmosDBSqlRolePermission() { } public Azure.Provisioning.BicepList DataActions { get { throw null; } set { } } public Azure.Provisioning.BicepList NotDataActions { get { throw null; } set { } } } - public partial class CosmosDBSqlStoredProcedure : Azure.Provisioning.Primitives.Resource + public partial class CosmosDBSqlStoredProcedure : Azure.Provisioning.Primitives.ProvisionableResource { - public CosmosDBSqlStoredProcedure(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public CosmosDBSqlStoredProcedure(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Identity { get { throw null; } set { } } public Azure.Provisioning.BicepValue Location { get { throw null; } set { } } @@ -1435,7 +1417,7 @@ public partial class CosmosDBSqlStoredProcedure : Azure.Provisioning.Primitives. public Azure.Provisioning.BicepValue Resource { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } - public static Azure.Provisioning.CosmosDB.CosmosDBSqlStoredProcedure FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.CosmosDB.CosmosDBSqlStoredProcedure FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2014_04_01; @@ -1463,18 +1445,17 @@ public static partial class ResourceVersions public static readonly string V2023_11_15; public static readonly string V2024_05_15; public static readonly string V2024_08_15; - public static readonly string V2024_09_01_preview; } } - public partial class CosmosDBSqlStoredProcedureResourceInfo : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class CosmosDBSqlStoredProcedureResourceInfo : Azure.Provisioning.Primitives.ProvisionableConstruct { public CosmosDBSqlStoredProcedureResourceInfo() { } public Azure.Provisioning.BicepValue Body { get { throw null; } set { } } public Azure.Provisioning.BicepValue StoredProcedureName { get { throw null; } set { } } } - public partial class CosmosDBSqlTrigger : Azure.Provisioning.Primitives.Resource + public partial class CosmosDBSqlTrigger : Azure.Provisioning.Primitives.ProvisionableResource { - public CosmosDBSqlTrigger(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public CosmosDBSqlTrigger(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Identity { get { throw null; } set { } } public Azure.Provisioning.BicepValue Location { get { throw null; } set { } } @@ -1484,7 +1465,7 @@ public partial class CosmosDBSqlTrigger : Azure.Provisioning.Primitives.Resource public Azure.Provisioning.BicepValue Resource { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } - public static Azure.Provisioning.CosmosDB.CosmosDBSqlTrigger FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.CosmosDB.CosmosDBSqlTrigger FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2014_04_01; @@ -1512,7 +1493,6 @@ public static partial class ResourceVersions public static readonly string V2023_11_15; public static readonly string V2024_05_15; public static readonly string V2024_08_15; - public static readonly string V2024_09_01_preview; } } public enum CosmosDBSqlTriggerOperation @@ -1523,7 +1503,7 @@ public enum CosmosDBSqlTriggerOperation Delete = 3, Replace = 4, } - public partial class CosmosDBSqlTriggerResourceInfo : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class CosmosDBSqlTriggerResourceInfo : Azure.Provisioning.Primitives.ProvisionableConstruct { public CosmosDBSqlTriggerResourceInfo() { } public Azure.Provisioning.BicepValue Body { get { throw null; } set { } } @@ -1536,9 +1516,9 @@ public enum CosmosDBSqlTriggerType Pre = 0, Post = 1, } - public partial class CosmosDBSqlUserDefinedFunction : Azure.Provisioning.Primitives.Resource + public partial class CosmosDBSqlUserDefinedFunction : Azure.Provisioning.Primitives.ProvisionableResource { - public CosmosDBSqlUserDefinedFunction(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public CosmosDBSqlUserDefinedFunction(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Identity { get { throw null; } set { } } public Azure.Provisioning.BicepValue Location { get { throw null; } set { } } @@ -1548,7 +1528,7 @@ public partial class CosmosDBSqlUserDefinedFunction : Azure.Provisioning.Primiti public Azure.Provisioning.BicepValue Resource { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } - public static Azure.Provisioning.CosmosDB.CosmosDBSqlUserDefinedFunction FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.CosmosDB.CosmosDBSqlUserDefinedFunction FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2014_04_01; @@ -1576,10 +1556,9 @@ public static partial class ResourceVersions public static readonly string V2023_11_15; public static readonly string V2024_05_15; public static readonly string V2024_08_15; - public static readonly string V2024_09_01_preview; } } - public partial class CosmosDBSqlUserDefinedFunctionResourceInfo : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class CosmosDBSqlUserDefinedFunctionResourceInfo : Azure.Provisioning.Primitives.ProvisionableConstruct { public CosmosDBSqlUserDefinedFunctionResourceInfo() { } public Azure.Provisioning.BicepValue Body { get { throw null; } set { } } @@ -1597,9 +1576,9 @@ public enum CosmosDBStatus Canceled = 7, Updating = 8, } - public partial class CosmosDBTable : Azure.Provisioning.Primitives.Resource + public partial class CosmosDBTable : Azure.Provisioning.Primitives.ProvisionableResource { - public CosmosDBTable(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public CosmosDBTable(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Identity { get { throw null; } set { } } public Azure.Provisioning.BicepValue Location { get { throw null; } set { } } @@ -1609,7 +1588,7 @@ public partial class CosmosDBTable : Azure.Provisioning.Primitives.Resource public Azure.Provisioning.BicepValue Resource { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } - public static Azure.Provisioning.CosmosDB.CosmosDBTable FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.CosmosDB.CosmosDBTable FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2014_04_01; @@ -1637,10 +1616,9 @@ public static partial class ResourceVersions public static readonly string V2023_11_15; public static readonly string V2024_05_15; public static readonly string V2024_08_15; - public static readonly string V2024_09_01_preview; } } - public partial class CosmosDBTablePropertiesOptions : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class CosmosDBTablePropertiesOptions : Azure.Provisioning.Primitives.ProvisionableConstruct { public CosmosDBTablePropertiesOptions() { } public Azure.Provisioning.BicepValue AutoscaleMaxThroughput { get { throw null; } set { } } @@ -1653,16 +1631,16 @@ public CosmosDBTablePropertiesResource() { } public Azure.Provisioning.BicepValue Rid { get { throw null; } } public Azure.Provisioning.BicepValue Timestamp { get { throw null; } } } - public partial class CosmosDBTableResourceInfo : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class CosmosDBTableResourceInfo : Azure.Provisioning.Primitives.ProvisionableConstruct { public CosmosDBTableResourceInfo() { } public Azure.Provisioning.BicepValue CreateMode { get { throw null; } set { } } public Azure.Provisioning.BicepValue RestoreParameters { get { throw null; } set { } } public Azure.Provisioning.BicepValue TableName { get { throw null; } set { } } } - public partial class CosmosDBThroughputPool : Azure.Provisioning.Primitives.Resource + public partial class CosmosDBThroughputPool : Azure.Provisioning.Primitives.ProvisionableResource { - public CosmosDBThroughputPool(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public CosmosDBThroughputPool(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Location { get { throw null; } set { } } public Azure.Provisioning.BicepValue MaxThroughput { get { throw null; } set { } } @@ -1670,15 +1648,11 @@ public partial class CosmosDBThroughputPool : Azure.Provisioning.Primitives.Reso public Azure.Provisioning.BicepValue ProvisioningState { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } - public static Azure.Provisioning.CosmosDB.CosmosDBThroughputPool FromExisting(string identifierName, string? resourceVersion = null) { throw null; } - public static partial class ResourceVersions - { - public static readonly string V2024_02_15_preview; - } + public static Azure.Provisioning.CosmosDB.CosmosDBThroughputPool FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } } - public partial class CosmosDBThroughputPoolAccount : Azure.Provisioning.Primitives.Resource + public partial class CosmosDBThroughputPoolAccount : Azure.Provisioning.Primitives.ProvisionableResource { - public CosmosDBThroughputPoolAccount(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public CosmosDBThroughputPoolAccount(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue AccountInstanceId { get { throw null; } } public Azure.Provisioning.BicepValue AccountLocation { get { throw null; } set { } } public Azure.Provisioning.BicepValue AccountResourceIdentifier { get { throw null; } set { } } @@ -1687,18 +1661,17 @@ public partial class CosmosDBThroughputPoolAccount : Azure.Provisioning.Primitiv public Azure.Provisioning.CosmosDB.CosmosDBThroughputPool? Parent { get { throw null; } set { } } public Azure.Provisioning.BicepValue ProvisioningState { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.CosmosDB.CosmosDBThroughputPoolAccount FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.CosmosDB.CosmosDBThroughputPoolAccount FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { - public static readonly string V2024_02_15_preview; } } - public partial class CosmosDBUniqueKey : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class CosmosDBUniqueKey : Azure.Provisioning.Primitives.ProvisionableConstruct { public CosmosDBUniqueKey() { } public Azure.Provisioning.BicepList Paths { get { throw null; } set { } } } - public partial class CosmosDBVirtualNetworkRule : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class CosmosDBVirtualNetworkRule : Azure.Provisioning.Primitives.ProvisionableConstruct { public CosmosDBVirtualNetworkRule() { } public Azure.Provisioning.BicepValue Id { get { throw null; } set { } } @@ -1716,9 +1689,9 @@ public CosmosSqlDataTransferDataSourceSink() { } public Azure.Provisioning.BicepValue ContainerName { get { throw null; } set { } } public Azure.Provisioning.BicepValue DatabaseName { get { throw null; } set { } } } - public partial class CosmosTableThroughputSetting : Azure.Provisioning.Primitives.Resource + public partial class CosmosTableThroughputSetting : Azure.Provisioning.Primitives.ProvisionableResource { - public CosmosTableThroughputSetting(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public CosmosTableThroughputSetting(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Identity { get { throw null; } set { } } public Azure.Provisioning.BicepValue Location { get { throw null; } set { } } @@ -1727,7 +1700,7 @@ public partial class CosmosTableThroughputSetting : Azure.Provisioning.Primitive public Azure.Provisioning.BicepValue Resource { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } - public static Azure.Provisioning.CosmosDB.CosmosTableThroughputSetting FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.CosmosDB.CosmosTableThroughputSetting FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2014_04_01; @@ -1755,10 +1728,9 @@ public static partial class ResourceVersions public static readonly string V2023_11_15; public static readonly string V2024_05_15; public static readonly string V2024_08_15; - public static readonly string V2024_09_01_preview; } } - public partial class DatabaseAccountKeysMetadata : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class DatabaseAccountKeysMetadata : Azure.Provisioning.Primitives.ProvisionableConstruct { public DatabaseAccountKeysMetadata() { } public Azure.Provisioning.BicepValue PrimaryMasterKeyGeneratedOn { get { throw null; } } @@ -1766,19 +1738,19 @@ public DatabaseAccountKeysMetadata() { } public Azure.Provisioning.BicepValue SecondaryMasterKeyGeneratedOn { get { throw null; } } public Azure.Provisioning.BicepValue SecondaryReadonlyMasterKeyGeneratedOn { get { throw null; } } } - public partial class DatabaseRestoreResourceInfo : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class DatabaseRestoreResourceInfo : Azure.Provisioning.Primitives.ProvisionableConstruct { public DatabaseRestoreResourceInfo() { } public Azure.Provisioning.BicepList CollectionNames { get { throw null; } set { } } public Azure.Provisioning.BicepValue DatabaseName { get { throw null; } set { } } } - public partial class DataTransferDataSourceSink : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class DataTransferDataSourceSink : Azure.Provisioning.Primitives.ProvisionableConstruct { public DataTransferDataSourceSink() { } } - public partial class DataTransferJobGetResult : Azure.Provisioning.Primitives.Resource + public partial class DataTransferJobGetResult : Azure.Provisioning.Primitives.ProvisionableResource { - public DataTransferJobGetResult(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public DataTransferJobGetResult(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Destination { get { throw null; } } public Azure.Provisioning.BicepValue Duration { get { throw null; } } public Azure.Provisioning.BicepValue Error { get { throw null; } } @@ -1795,7 +1767,7 @@ public partial class DataTransferJobGetResult : Azure.Provisioning.Primitives.Re public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepValue TotalCount { get { throw null; } } public Azure.Provisioning.BicepValue WorkerCount { get { throw null; } } - public static Azure.Provisioning.CosmosDB.DataTransferJobGetResult FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.CosmosDB.DataTransferJobGetResult FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2014_04_01; @@ -1823,7 +1795,6 @@ public static partial class ResourceVersions public static readonly string V2023_11_15; public static readonly string V2024_05_15; public static readonly string V2024_08_15; - public static readonly string V2024_09_01_preview; } } public enum DataTransferJobMode @@ -1831,7 +1802,7 @@ public enum DataTransferJobMode Offline = 0, Online = 1, } - public partial class DataTransferJobProperties : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class DataTransferJobProperties : Azure.Provisioning.Primitives.ProvisionableConstruct { public DataTransferJobProperties() { } public Azure.Provisioning.BicepValue Destination { get { throw null; } set { } } @@ -1846,7 +1817,7 @@ public DataTransferJobProperties() { } public Azure.Provisioning.BicepValue TotalCount { get { throw null; } } public Azure.Provisioning.BicepValue WorkerCount { get { throw null; } set { } } } - public partial class DataTransferRegionalService : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class DataTransferRegionalService : Azure.Provisioning.Primitives.ProvisionableConstruct { public DataTransferRegionalService() { } public Azure.Provisioning.BicepValue Location { get { throw null; } } @@ -1877,13 +1848,13 @@ public enum EnableFullTextQuery True = 1, False = 2, } - public partial class ErrorResponse : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ErrorResponse : Azure.Provisioning.Primitives.ProvisionableConstruct { public ErrorResponse() { } public Azure.Provisioning.BicepValue Code { get { throw null; } } public Azure.Provisioning.BicepValue Message { get { throw null; } } } - public partial class ExtendedCassandraKeyspaceResourceInfo : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ExtendedCassandraKeyspaceResourceInfo : Azure.Provisioning.Primitives.ProvisionableConstruct { public ExtendedCassandraKeyspaceResourceInfo() { } public Azure.Provisioning.BicepValue ETag { get { throw null; } } @@ -1970,7 +1941,7 @@ public ExtendedThroughputSettingsResourceInfo() { } public Azure.Provisioning.BicepValue Rid { get { throw null; } } public Azure.Provisioning.BicepValue Timestamp { get { throw null; } } } - public partial class GraphApiComputeRegionalService : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class GraphApiComputeRegionalService : Azure.Provisioning.Primitives.ProvisionableConstruct { public GraphApiComputeRegionalService() { } public Azure.Provisioning.BicepValue GraphApiComputeEndpoint { get { throw null; } } @@ -1984,15 +1955,15 @@ public GraphApiComputeServiceProperties() { } public Azure.Provisioning.BicepValue GraphApiComputeEndpoint { get { throw null; } set { } } public Azure.Provisioning.BicepList Locations { get { throw null; } } } - public partial class GraphResourceGetPropertiesOptions : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class GraphResourceGetPropertiesOptions : Azure.Provisioning.Primitives.ProvisionableConstruct { public GraphResourceGetPropertiesOptions() { } public Azure.Provisioning.BicepValue AutoscaleMaxThroughput { get { throw null; } set { } } public Azure.Provisioning.BicepValue Throughput { get { throw null; } set { } } } - public partial class GraphResourceGetResult : Azure.Provisioning.Primitives.Resource + public partial class GraphResourceGetResult : Azure.Provisioning.Primitives.ProvisionableResource { - public GraphResourceGetResult(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public GraphResourceGetResult(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Identity { get { throw null; } set { } } public Azure.Provisioning.BicepValue Location { get { throw null; } set { } } @@ -2002,7 +1973,7 @@ public partial class GraphResourceGetResult : Azure.Provisioning.Primitives.Reso public Azure.Provisioning.BicepValue ResourceId { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } - public static Azure.Provisioning.CosmosDB.GraphResourceGetResult FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.CosmosDB.GraphResourceGetResult FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2014_04_01; @@ -2030,12 +2001,11 @@ public static partial class ResourceVersions public static readonly string V2023_11_15; public static readonly string V2024_05_15; public static readonly string V2024_08_15; - public static readonly string V2024_09_01_preview; } } - public partial class GremlinDatabase : Azure.Provisioning.Primitives.Resource + public partial class GremlinDatabase : Azure.Provisioning.Primitives.ProvisionableResource { - public GremlinDatabase(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public GremlinDatabase(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Identity { get { throw null; } set { } } public Azure.Provisioning.BicepValue Location { get { throw null; } set { } } @@ -2045,7 +2015,7 @@ public partial class GremlinDatabase : Azure.Provisioning.Primitives.Resource public Azure.Provisioning.BicepValue Resource { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } - public static Azure.Provisioning.CosmosDB.GremlinDatabase FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.CosmosDB.GremlinDatabase FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2014_04_01; @@ -2073,31 +2043,30 @@ public static partial class ResourceVersions public static readonly string V2023_11_15; public static readonly string V2024_05_15; public static readonly string V2024_08_15; - public static readonly string V2024_09_01_preview; } } - public partial class GremlinDatabasePropertiesConfig : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class GremlinDatabasePropertiesConfig : Azure.Provisioning.Primitives.ProvisionableConstruct { public GremlinDatabasePropertiesConfig() { } public Azure.Provisioning.BicepValue AutoscaleMaxThroughput { get { throw null; } set { } } public Azure.Provisioning.BicepValue Throughput { get { throw null; } set { } } } - public partial class GremlinDatabaseResourceInfo : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class GremlinDatabaseResourceInfo : Azure.Provisioning.Primitives.ProvisionableConstruct { public GremlinDatabaseResourceInfo() { } public Azure.Provisioning.BicepValue CreateMode { get { throw null; } set { } } public Azure.Provisioning.BicepValue DatabaseName { get { throw null; } set { } } public Azure.Provisioning.BicepValue RestoreParameters { get { throw null; } set { } } } - public partial class GremlinDatabaseRestoreResourceInfo : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class GremlinDatabaseRestoreResourceInfo : Azure.Provisioning.Primitives.ProvisionableConstruct { public GremlinDatabaseRestoreResourceInfo() { } public Azure.Provisioning.BicepValue DatabaseName { get { throw null; } set { } } public Azure.Provisioning.BicepList GraphNames { get { throw null; } set { } } } - public partial class GremlinDatabaseThroughputSetting : Azure.Provisioning.Primitives.Resource + public partial class GremlinDatabaseThroughputSetting : Azure.Provisioning.Primitives.ProvisionableResource { - public GremlinDatabaseThroughputSetting(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public GremlinDatabaseThroughputSetting(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Identity { get { throw null; } set { } } public Azure.Provisioning.BicepValue Location { get { throw null; } set { } } @@ -2106,7 +2075,7 @@ public partial class GremlinDatabaseThroughputSetting : Azure.Provisioning.Primi public Azure.Provisioning.BicepValue Resource { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } - public static Azure.Provisioning.CosmosDB.GremlinDatabaseThroughputSetting FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.CosmosDB.GremlinDatabaseThroughputSetting FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2014_04_01; @@ -2134,12 +2103,11 @@ public static partial class ResourceVersions public static readonly string V2023_11_15; public static readonly string V2024_05_15; public static readonly string V2024_08_15; - public static readonly string V2024_09_01_preview; } } - public partial class GremlinGraph : Azure.Provisioning.Primitives.Resource + public partial class GremlinGraph : Azure.Provisioning.Primitives.ProvisionableResource { - public GremlinGraph(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public GremlinGraph(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Identity { get { throw null; } set { } } public Azure.Provisioning.BicepValue Location { get { throw null; } set { } } @@ -2149,7 +2117,7 @@ public partial class GremlinGraph : Azure.Provisioning.Primitives.Resource public Azure.Provisioning.BicepValue Resource { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } - public static Azure.Provisioning.CosmosDB.GremlinGraph FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.CosmosDB.GremlinGraph FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2014_04_01; @@ -2177,16 +2145,15 @@ public static partial class ResourceVersions public static readonly string V2023_11_15; public static readonly string V2024_05_15; public static readonly string V2024_08_15; - public static readonly string V2024_09_01_preview; } } - public partial class GremlinGraphPropertiesConfig : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class GremlinGraphPropertiesConfig : Azure.Provisioning.Primitives.ProvisionableConstruct { public GremlinGraphPropertiesConfig() { } public Azure.Provisioning.BicepValue AutoscaleMaxThroughput { get { throw null; } set { } } public Azure.Provisioning.BicepValue Throughput { get { throw null; } set { } } } - public partial class GremlinGraphResourceInfo : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class GremlinGraphResourceInfo : Azure.Provisioning.Primitives.ProvisionableConstruct { public GremlinGraphResourceInfo() { } public Azure.Provisioning.BicepValue AnalyticalStorageTtl { get { throw null; } set { } } @@ -2199,9 +2166,9 @@ public GremlinGraphResourceInfo() { } public Azure.Provisioning.BicepValue RestoreParameters { get { throw null; } set { } } public Azure.Provisioning.BicepList UniqueKeys { get { throw null; } set { } } } - public partial class GremlinGraphThroughputSetting : Azure.Provisioning.Primitives.Resource + public partial class GremlinGraphThroughputSetting : Azure.Provisioning.Primitives.ProvisionableResource { - public GremlinGraphThroughputSetting(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public GremlinGraphThroughputSetting(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Identity { get { throw null; } set { } } public Azure.Provisioning.BicepValue Location { get { throw null; } set { } } @@ -2210,7 +2177,7 @@ public partial class GremlinGraphThroughputSetting : Azure.Provisioning.Primitiv public Azure.Provisioning.BicepValue Resource { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } - public static Azure.Provisioning.CosmosDB.GremlinGraphThroughputSetting FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.CosmosDB.GremlinGraphThroughputSetting FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2014_04_01; @@ -2238,17 +2205,16 @@ public static partial class ResourceVersions public static readonly string V2023_11_15; public static readonly string V2024_05_15; public static readonly string V2024_08_15; - public static readonly string V2024_09_01_preview; } } - public partial class MaterializedViewDefinition : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class MaterializedViewDefinition : Azure.Provisioning.Primitives.ProvisionableConstruct { public MaterializedViewDefinition() { } public Azure.Provisioning.BicepValue Definition { get { throw null; } set { } } public Azure.Provisioning.BicepValue SourceCollectionId { get { throw null; } set { } } public Azure.Provisioning.BicepValue SourceCollectionRid { get { throw null; } } } - public partial class MaterializedViewsBuilderRegionalService : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class MaterializedViewsBuilderRegionalService : Azure.Provisioning.Primitives.ProvisionableConstruct { public MaterializedViewsBuilderRegionalService() { } public Azure.Provisioning.BicepValue Location { get { throw null; } } @@ -2260,9 +2226,9 @@ public partial class MaterializedViewsBuilderServiceProperties : Azure.Provision public MaterializedViewsBuilderServiceProperties() { } public Azure.Provisioning.BicepList Locations { get { throw null; } } } - public partial class MongoCluster : Azure.Provisioning.Primitives.Resource + public partial class MongoCluster : Azure.Provisioning.Primitives.ProvisionableResource { - public MongoCluster(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public MongoCluster(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue AdministratorLogin { get { throw null; } set { } } public Azure.Provisioning.BicepValue AdministratorLoginPassword { get { throw null; } set { } } public Azure.Provisioning.BicepValue ClusterStatus { get { throw null; } } @@ -2278,13 +2244,13 @@ public partial class MongoCluster : Azure.Provisioning.Primitives.Resource public Azure.Provisioning.BicepValue ServerVersion { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } - public static Azure.Provisioning.CosmosDB.MongoCluster FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.CosmosDB.MongoCluster FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2024_07_01; } } - public partial class MongoClusterRestoreParameters : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class MongoClusterRestoreParameters : Azure.Provisioning.Primitives.ProvisionableConstruct { public MongoClusterRestoreParameters() { } public Azure.Provisioning.BicepValue PointInTimeUTC { get { throw null; } set { } } @@ -2300,9 +2266,9 @@ public enum MongoClusterStatus Stopped = 5, Dropping = 6, } - public partial class MongoDBCollection : Azure.Provisioning.Primitives.Resource + public partial class MongoDBCollection : Azure.Provisioning.Primitives.ProvisionableResource { - public MongoDBCollection(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public MongoDBCollection(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Identity { get { throw null; } set { } } public Azure.Provisioning.BicepValue Location { get { throw null; } set { } } @@ -2312,7 +2278,7 @@ public partial class MongoDBCollection : Azure.Provisioning.Primitives.Resource public Azure.Provisioning.BicepValue Resource { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } - public static Azure.Provisioning.CosmosDB.MongoDBCollection FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.CosmosDB.MongoDBCollection FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2014_04_01; @@ -2340,16 +2306,15 @@ public static partial class ResourceVersions public static readonly string V2023_11_15; public static readonly string V2024_05_15; public static readonly string V2024_08_15; - public static readonly string V2024_09_01_preview; } } - public partial class MongoDBCollectionPropertiesConfig : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class MongoDBCollectionPropertiesConfig : Azure.Provisioning.Primitives.ProvisionableConstruct { public MongoDBCollectionPropertiesConfig() { } public Azure.Provisioning.BicepValue AutoscaleMaxThroughput { get { throw null; } set { } } public Azure.Provisioning.BicepValue Throughput { get { throw null; } set { } } } - public partial class MongoDBCollectionResourceInfo : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class MongoDBCollectionResourceInfo : Azure.Provisioning.Primitives.ProvisionableConstruct { public MongoDBCollectionResourceInfo() { } public Azure.Provisioning.BicepValue AnalyticalStorageTtl { get { throw null; } set { } } @@ -2359,9 +2324,9 @@ public MongoDBCollectionResourceInfo() { } public Azure.Provisioning.BicepValue RestoreParameters { get { throw null; } set { } } public Azure.Provisioning.BicepDictionary ShardKey { get { throw null; } set { } } } - public partial class MongoDBCollectionThroughputSetting : Azure.Provisioning.Primitives.Resource + public partial class MongoDBCollectionThroughputSetting : Azure.Provisioning.Primitives.ProvisionableResource { - public MongoDBCollectionThroughputSetting(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public MongoDBCollectionThroughputSetting(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Identity { get { throw null; } set { } } public Azure.Provisioning.BicepValue Location { get { throw null; } set { } } @@ -2370,7 +2335,7 @@ public partial class MongoDBCollectionThroughputSetting : Azure.Provisioning.Pri public Azure.Provisioning.BicepValue Resource { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } - public static Azure.Provisioning.CosmosDB.MongoDBCollectionThroughputSetting FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.CosmosDB.MongoDBCollectionThroughputSetting FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2014_04_01; @@ -2398,12 +2363,11 @@ public static partial class ResourceVersions public static readonly string V2023_11_15; public static readonly string V2024_05_15; public static readonly string V2024_08_15; - public static readonly string V2024_09_01_preview; } } - public partial class MongoDBDatabase : Azure.Provisioning.Primitives.Resource + public partial class MongoDBDatabase : Azure.Provisioning.Primitives.ProvisionableResource { - public MongoDBDatabase(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public MongoDBDatabase(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Identity { get { throw null; } set { } } public Azure.Provisioning.BicepValue Location { get { throw null; } set { } } @@ -2413,7 +2377,7 @@ public partial class MongoDBDatabase : Azure.Provisioning.Primitives.Resource public Azure.Provisioning.BicepValue Resource { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } - public static Azure.Provisioning.CosmosDB.MongoDBDatabase FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.CosmosDB.MongoDBDatabase FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2014_04_01; @@ -2441,25 +2405,24 @@ public static partial class ResourceVersions public static readonly string V2023_11_15; public static readonly string V2024_05_15; public static readonly string V2024_08_15; - public static readonly string V2024_09_01_preview; } } - public partial class MongoDBDatabasePropertiesConfig : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class MongoDBDatabasePropertiesConfig : Azure.Provisioning.Primitives.ProvisionableConstruct { public MongoDBDatabasePropertiesConfig() { } public Azure.Provisioning.BicepValue AutoscaleMaxThroughput { get { throw null; } set { } } public Azure.Provisioning.BicepValue Throughput { get { throw null; } set { } } } - public partial class MongoDBDatabaseResourceInfo : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class MongoDBDatabaseResourceInfo : Azure.Provisioning.Primitives.ProvisionableConstruct { public MongoDBDatabaseResourceInfo() { } public Azure.Provisioning.BicepValue CreateMode { get { throw null; } set { } } public Azure.Provisioning.BicepValue DatabaseName { get { throw null; } set { } } public Azure.Provisioning.BicepValue RestoreParameters { get { throw null; } set { } } } - public partial class MongoDBDatabaseThroughputSetting : Azure.Provisioning.Primitives.Resource + public partial class MongoDBDatabaseThroughputSetting : Azure.Provisioning.Primitives.ProvisionableResource { - public MongoDBDatabaseThroughputSetting(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public MongoDBDatabaseThroughputSetting(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Identity { get { throw null; } set { } } public Azure.Provisioning.BicepValue Location { get { throw null; } set { } } @@ -2468,7 +2431,7 @@ public partial class MongoDBDatabaseThroughputSetting : Azure.Provisioning.Primi public Azure.Provisioning.BicepValue Resource { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } - public static Azure.Provisioning.CosmosDB.MongoDBDatabaseThroughputSetting FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.CosmosDB.MongoDBDatabaseThroughputSetting FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2014_04_01; @@ -2496,42 +2459,41 @@ public static partial class ResourceVersions public static readonly string V2023_11_15; public static readonly string V2024_05_15; public static readonly string V2024_08_15; - public static readonly string V2024_09_01_preview; } } - public partial class MongoDBIndex : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class MongoDBIndex : Azure.Provisioning.Primitives.ProvisionableConstruct { public MongoDBIndex() { } public Azure.Provisioning.BicepList Keys { get { throw null; } set { } } public Azure.Provisioning.BicepValue Options { get { throw null; } set { } } } - public partial class MongoDBIndexConfig : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class MongoDBIndexConfig : Azure.Provisioning.Primitives.ProvisionableConstruct { public MongoDBIndexConfig() { } public Azure.Provisioning.BicepValue ExpireAfterSeconds { get { throw null; } set { } } public Azure.Provisioning.BicepValue IsUnique { get { throw null; } set { } } } - public partial class MongoDBPrivilege : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class MongoDBPrivilege : Azure.Provisioning.Primitives.ProvisionableConstruct { public MongoDBPrivilege() { } public Azure.Provisioning.BicepList Actions { get { throw null; } set { } } public Azure.Provisioning.BicepValue Resource { get { throw null; } set { } } } - public partial class MongoDBPrivilegeResourceInfo : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class MongoDBPrivilegeResourceInfo : Azure.Provisioning.Primitives.ProvisionableConstruct { public MongoDBPrivilegeResourceInfo() { } public Azure.Provisioning.BicepValue Collection { get { throw null; } set { } } public Azure.Provisioning.BicepValue DBName { get { throw null; } set { } } } - public partial class MongoDBRole : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class MongoDBRole : Azure.Provisioning.Primitives.ProvisionableConstruct { public MongoDBRole() { } public Azure.Provisioning.BicepValue DBName { get { throw null; } set { } } public Azure.Provisioning.BicepValue Role { get { throw null; } set { } } } - public partial class MongoDBRoleDefinition : Azure.Provisioning.Primitives.Resource + public partial class MongoDBRoleDefinition : Azure.Provisioning.Primitives.ProvisionableResource { - public MongoDBRoleDefinition(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public MongoDBRoleDefinition(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue DatabaseName { get { throw null; } set { } } public Azure.Provisioning.BicepValue DefinitionType { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } @@ -2541,7 +2503,7 @@ public partial class MongoDBRoleDefinition : Azure.Provisioning.Primitives.Resou public Azure.Provisioning.BicepValue RoleName { get { throw null; } set { } } public Azure.Provisioning.BicepList Roles { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.CosmosDB.MongoDBRoleDefinition FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.CosmosDB.MongoDBRoleDefinition FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2014_04_01; @@ -2569,7 +2531,6 @@ public static partial class ResourceVersions public static readonly string V2023_11_15; public static readonly string V2024_05_15; public static readonly string V2024_08_15; - public static readonly string V2024_09_01_preview; } } public enum MongoDBRoleDefinitionType @@ -2577,9 +2538,9 @@ public enum MongoDBRoleDefinitionType BuiltInRole = 0, CustomRole = 1, } - public partial class MongoDBUserDefinition : Azure.Provisioning.Primitives.Resource + public partial class MongoDBUserDefinition : Azure.Provisioning.Primitives.ProvisionableResource { - public MongoDBUserDefinition(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public MongoDBUserDefinition(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue CustomData { get { throw null; } set { } } public Azure.Provisioning.BicepValue DatabaseName { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } @@ -2590,7 +2551,7 @@ public partial class MongoDBUserDefinition : Azure.Provisioning.Primitives.Resou public Azure.Provisioning.BicepList Roles { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepValue UserName { get { throw null; } set { } } - public static Azure.Provisioning.CosmosDB.MongoDBUserDefinition FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.CosmosDB.MongoDBUserDefinition FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2014_04_01; @@ -2618,7 +2579,6 @@ public static partial class ResourceVersions public static readonly string V2023_11_15; public static readonly string V2024_05_15; public static readonly string V2024_08_15; - public static readonly string V2024_09_01_preview; } } public enum NetworkAclBypass @@ -2626,7 +2586,7 @@ public enum NetworkAclBypass None = 0, AzureServices = 1, } - public partial class NodeGroupSpec : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class NodeGroupSpec : Azure.Provisioning.Primitives.ProvisionableConstruct { public NodeGroupSpec() { } public Azure.Provisioning.BicepValue DiskSizeInGB { get { throw null; } set { } } @@ -2644,14 +2604,14 @@ public partial class PeriodicModeBackupPolicy : Azure.Provisioning.CosmosDB.Cosm public PeriodicModeBackupPolicy() { } public Azure.Provisioning.BicepValue PeriodicModeProperties { get { throw null; } set { } } } - public partial class PeriodicModeProperties : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class PeriodicModeProperties : Azure.Provisioning.Primitives.ProvisionableConstruct { public PeriodicModeProperties() { } public Azure.Provisioning.BicepValue BackupIntervalInMinutes { get { throw null; } set { } } public Azure.Provisioning.BicepValue BackupRetentionIntervalInHours { get { throw null; } set { } } public Azure.Provisioning.BicepValue BackupStorageRedundancy { get { throw null; } set { } } } - public partial class ResourceRestoreParameters : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ResourceRestoreParameters : Azure.Provisioning.Primitives.ProvisionableConstruct { public ResourceRestoreParameters() { } public Azure.Provisioning.BicepValue IsRestoreWithTtlDisabled { get { throw null; } set { } } @@ -2688,13 +2648,13 @@ public enum ServiceConnectionType [System.Runtime.Serialization.DataMemberAttribute(Name="VPN")] Vpn = 1, } - public partial class SpatialSpec : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class SpatialSpec : Azure.Provisioning.Primitives.ProvisionableConstruct { public SpatialSpec() { } public Azure.Provisioning.BicepValue Path { get { throw null; } set { } } public Azure.Provisioning.BicepList Types { get { throw null; } set { } } } - public partial class SqlDedicatedGatewayRegionalService : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class SqlDedicatedGatewayRegionalService : Azure.Provisioning.Primitives.ProvisionableConstruct { public SqlDedicatedGatewayRegionalService() { } public Azure.Provisioning.BicepValue Location { get { throw null; } } @@ -2708,13 +2668,13 @@ public SqlDedicatedGatewayServiceProperties() { } public Azure.Provisioning.BicepList Locations { get { throw null; } } public Azure.Provisioning.BicepValue SqlDedicatedGatewayEndpoint { get { throw null; } set { } } } - public partial class ThroughputPolicyResourceInfo : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ThroughputPolicyResourceInfo : Azure.Provisioning.Primitives.ProvisionableConstruct { public ThroughputPolicyResourceInfo() { } public Azure.Provisioning.BicepValue IncrementPercent { get { throw null; } set { } } public Azure.Provisioning.BicepValue IsEnabled { get { throw null; } set { } } } - public partial class ThroughputSettingsResourceInfo : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ThroughputSettingsResourceInfo : Azure.Provisioning.Primitives.ProvisionableConstruct { public ThroughputSettingsResourceInfo() { } public Azure.Provisioning.BicepValue AutoscaleSettings { get { throw null; } set { } } diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/CassandraCluster.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/CassandraCluster.cs index fa579c8a8217..f6b964beb63e 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/CassandraCluster.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/CassandraCluster.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// CassandraCluster. /// -public partial class CassandraCluster : Resource +public partial class CassandraCluster : ProvisionableResource { /// /// Managed Cassandra cluster name. @@ -64,15 +64,15 @@ public partial class CassandraCluster : Resource /// /// Creates a new CassandraCluster. /// - /// + /// /// The the Bicep identifier name of the CassandraCluster resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, /// and underscores. /// /// Version of the CassandraCluster. - public CassandraCluster(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.DocumentDB/cassandraClusters", resourceVersion ?? "2024-08-15") + public CassandraCluster(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.DocumentDB/cassandraClusters", resourceVersion ?? "2024-08-15") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _location = BicepValue.DefineProperty(this, "Location", ["location"], isRequired: true); @@ -88,11 +88,6 @@ public CassandraCluster(string identifierName, string? resourceVersion = default /// public static class ResourceVersions { - /// - /// 2024-09-01-preview. - /// - public static readonly string V2024_09_01_preview = "2024-09-01-preview"; - /// /// 2024-08-15. /// @@ -147,7 +142,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing CassandraCluster. /// - /// + /// /// The the Bicep identifier name of the CassandraCluster resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, @@ -155,6 +150,6 @@ public static class ResourceVersions /// /// Version of the CassandraCluster. /// The existing CassandraCluster resource. - public static CassandraCluster FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static CassandraCluster FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/CassandraDataCenter.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/CassandraDataCenter.cs index 6e1de3ef4d6f..2e9f19ea79a3 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/CassandraDataCenter.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/CassandraDataCenter.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// CassandraDataCenter. /// -public partial class CassandraDataCenter : Resource +public partial class CassandraDataCenter : ProvisionableResource { /// /// Data center name in a managed Cassandra cluster. @@ -51,15 +51,15 @@ public partial class CassandraDataCenter : Resource /// /// Creates a new CassandraDataCenter. /// - /// + /// /// The the Bicep identifier name of the CassandraDataCenter resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, /// numbers, and underscores. /// /// Version of the CassandraDataCenter. - public CassandraDataCenter(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.DocumentDB/cassandraClusters/dataCenters", resourceVersion ?? "2024-08-15") + public CassandraDataCenter(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.DocumentDB/cassandraClusters/dataCenters", resourceVersion ?? "2024-08-15") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _properties = BicepValue.DefineProperty(this, "Properties", ["properties"]); @@ -73,11 +73,6 @@ public CassandraDataCenter(string identifierName, string? resourceVersion = defa /// public static class ResourceVersions { - /// - /// 2024-09-01-preview. - /// - public static readonly string V2024_09_01_preview = "2024-09-01-preview"; - /// /// 2024-08-15. /// @@ -132,7 +127,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing CassandraDataCenter. /// - /// + /// /// The the Bicep identifier name of the CassandraDataCenter resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, @@ -140,6 +135,6 @@ public static class ResourceVersions /// /// Version of the CassandraDataCenter. /// The existing CassandraDataCenter resource. - public static CassandraDataCenter FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static CassandraDataCenter FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/CassandraKeyspace.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/CassandraKeyspace.cs index d2c4271219f1..8033b2611271 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/CassandraKeyspace.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/CassandraKeyspace.cs @@ -17,7 +17,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// CassandraKeyspace. /// -public partial class CassandraKeyspace : Resource +public partial class CassandraKeyspace : ProvisionableResource { /// /// Cosmos DB keyspace name. @@ -83,15 +83,15 @@ public partial class CassandraKeyspace : Resource /// /// Creates a new CassandraKeyspace. /// - /// + /// /// The the Bicep identifier name of the CassandraKeyspace resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, /// and underscores. /// /// Version of the CassandraKeyspace. - public CassandraKeyspace(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.DocumentDB/databaseAccounts/cassandraKeyspaces", resourceVersion ?? "2024-08-15") + public CassandraKeyspace(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.DocumentDB/databaseAccounts/cassandraKeyspaces", resourceVersion ?? "2024-08-15") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _location = BicepValue.DefineProperty(this, "Location", ["location"], isRequired: true); @@ -110,11 +110,6 @@ public CassandraKeyspace(string identifierName, string? resourceVersion = defaul /// public static class ResourceVersions { - /// - /// 2024-09-01-preview. - /// - public static readonly string V2024_09_01_preview = "2024-09-01-preview"; - /// /// 2024-08-15. /// @@ -244,7 +239,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing CassandraKeyspace. /// - /// + /// /// The the Bicep identifier name of the CassandraKeyspace resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, @@ -252,6 +247,6 @@ public static class ResourceVersions /// /// Version of the CassandraKeyspace. /// The existing CassandraKeyspace resource. - public static CassandraKeyspace FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static CassandraKeyspace FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/CassandraKeyspaceThroughputSetting.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/CassandraKeyspaceThroughputSetting.cs index ad393755a5cc..b054167e33f2 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/CassandraKeyspaceThroughputSetting.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/CassandraKeyspaceThroughputSetting.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// CassandraKeyspaceThroughputSetting. /// -public partial class CassandraKeyspaceThroughputSetting : Resource +public partial class CassandraKeyspaceThroughputSetting : ProvisionableResource { /// /// Gets the Name. @@ -69,15 +69,15 @@ public partial class CassandraKeyspaceThroughputSetting : Resource /// /// Creates a new CassandraKeyspaceThroughputSetting. /// - /// + /// /// The the Bicep identifier name of the CassandraKeyspaceThroughputSetting /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the CassandraKeyspaceThroughputSetting. - public CassandraKeyspaceThroughputSetting(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.DocumentDB/databaseAccounts/cassandraKeyspaces/throughputSettings", resourceVersion ?? "2024-08-15") + public CassandraKeyspaceThroughputSetting(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.DocumentDB/databaseAccounts/cassandraKeyspaces/throughputSettings", resourceVersion ?? "2024-08-15") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _location = BicepValue.DefineProperty(this, "Location", ["location"], isRequired: true); @@ -94,11 +94,6 @@ public CassandraKeyspaceThroughputSetting(string identifierName, string? resourc /// public static class ResourceVersions { - /// - /// 2024-09-01-preview. - /// - public static readonly string V2024_09_01_preview = "2024-09-01-preview"; - /// /// 2024-08-15. /// @@ -228,7 +223,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing CassandraKeyspaceThroughputSetting. /// - /// + /// /// The the Bicep identifier name of the CassandraKeyspaceThroughputSetting /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -236,6 +231,6 @@ public static class ResourceVersions /// /// Version of the CassandraKeyspaceThroughputSetting. /// The existing CassandraKeyspaceThroughputSetting resource. - public static CassandraKeyspaceThroughputSetting FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static CassandraKeyspaceThroughputSetting FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/CassandraTable.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/CassandraTable.cs index 057eb1217143..17ea159b5a8e 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/CassandraTable.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/CassandraTable.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// CassandraTable. /// -public partial class CassandraTable : Resource +public partial class CassandraTable : ProvisionableResource { /// /// Cosmos DB table name. @@ -76,15 +76,15 @@ public partial class CassandraTable : Resource /// /// Creates a new CassandraTable. /// - /// + /// /// The the Bicep identifier name of the CassandraTable resource. This can /// be used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and /// underscores. /// /// Version of the CassandraTable. - public CassandraTable(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.DocumentDB/databaseAccounts/cassandraKeyspaces/tables", resourceVersion ?? "2024-08-15") + public CassandraTable(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.DocumentDB/databaseAccounts/cassandraKeyspaces/tables", resourceVersion ?? "2024-08-15") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _location = BicepValue.DefineProperty(this, "Location", ["location"], isRequired: true); @@ -102,11 +102,6 @@ public CassandraTable(string identifierName, string? resourceVersion = default) /// public static class ResourceVersions { - /// - /// 2024-09-01-preview. - /// - public static readonly string V2024_09_01_preview = "2024-09-01-preview"; - /// /// 2024-08-15. /// @@ -236,7 +231,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing CassandraTable. /// - /// + /// /// The the Bicep identifier name of the CassandraTable resource. This can /// be used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and @@ -244,6 +239,6 @@ public static class ResourceVersions /// /// Version of the CassandraTable. /// The existing CassandraTable resource. - public static CassandraTable FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static CassandraTable FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/CassandraTableThroughputSetting.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/CassandraTableThroughputSetting.cs index d0d49950761c..326d0425f261 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/CassandraTableThroughputSetting.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/CassandraTableThroughputSetting.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// CassandraTableThroughputSetting. /// -public partial class CassandraTableThroughputSetting : Resource +public partial class CassandraTableThroughputSetting : ProvisionableResource { /// /// Gets the Name. @@ -69,15 +69,15 @@ public partial class CassandraTableThroughputSetting : Resource /// /// Creates a new CassandraTableThroughputSetting. /// - /// + /// /// The the Bicep identifier name of the CassandraTableThroughputSetting /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the CassandraTableThroughputSetting. - public CassandraTableThroughputSetting(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.DocumentDB/databaseAccounts/cassandraKeyspaces/tables/throughputSettings", resourceVersion ?? "2024-08-15") + public CassandraTableThroughputSetting(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.DocumentDB/databaseAccounts/cassandraKeyspaces/tables/throughputSettings", resourceVersion ?? "2024-08-15") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _location = BicepValue.DefineProperty(this, "Location", ["location"], isRequired: true); @@ -94,11 +94,6 @@ public CassandraTableThroughputSetting(string identifierName, string? resourceVe /// public static class ResourceVersions { - /// - /// 2024-09-01-preview. - /// - public static readonly string V2024_09_01_preview = "2024-09-01-preview"; - /// /// 2024-08-15. /// @@ -228,7 +223,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing CassandraTableThroughputSetting. /// - /// + /// /// The the Bicep identifier name of the CassandraTableThroughputSetting /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -236,6 +231,6 @@ public static class ResourceVersions /// /// Version of the CassandraTableThroughputSetting. /// The existing CassandraTableThroughputSetting resource. - public static CassandraTableThroughputSetting FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static CassandraTableThroughputSetting FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/CassandraViewGetResult.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/CassandraViewGetResult.cs index f156128f99c3..f26dcf9360e4 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/CassandraViewGetResult.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/CassandraViewGetResult.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// CassandraViewGetResult. /// -public partial class CassandraViewGetResult : Resource +public partial class CassandraViewGetResult : ProvisionableResource { /// /// Cosmos DB view name. @@ -76,15 +76,15 @@ public partial class CassandraViewGetResult : Resource /// /// Creates a new CassandraViewGetResult. /// - /// + /// /// The the Bicep identifier name of the CassandraViewGetResult resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, /// numbers, and underscores. /// /// Version of the CassandraViewGetResult. - public CassandraViewGetResult(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.DocumentDB/databaseAccounts/cassandraKeyspaces/views", resourceVersion ?? "2024-08-15") + public CassandraViewGetResult(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.DocumentDB/databaseAccounts/cassandraKeyspaces/views", resourceVersion ?? "2024-08-15") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _location = BicepValue.DefineProperty(this, "Location", ["location"], isRequired: true); @@ -102,11 +102,6 @@ public CassandraViewGetResult(string identifierName, string? resourceVersion = d /// public static class ResourceVersions { - /// - /// 2024-09-01-preview. - /// - public static readonly string V2024_09_01_preview = "2024-09-01-preview"; - /// /// 2024-08-15. /// @@ -236,7 +231,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing CassandraViewGetResult. /// - /// + /// /// The the Bicep identifier name of the CassandraViewGetResult resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, @@ -244,6 +239,6 @@ public static class ResourceVersions /// /// Version of the CassandraViewGetResult. /// The existing CassandraViewGetResult resource. - public static CassandraViewGetResult FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static CassandraViewGetResult FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/CassandraViewThroughputSetting.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/CassandraViewThroughputSetting.cs index 2d3c0cd48022..f7b2b4c1a794 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/CassandraViewThroughputSetting.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/CassandraViewThroughputSetting.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// CassandraViewThroughputSetting. /// -public partial class CassandraViewThroughputSetting : Resource +public partial class CassandraViewThroughputSetting : ProvisionableResource { /// /// Gets the Name. @@ -69,15 +69,15 @@ public partial class CassandraViewThroughputSetting : Resource /// /// Creates a new CassandraViewThroughputSetting. /// - /// + /// /// The the Bicep identifier name of the CassandraViewThroughputSetting /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the CassandraViewThroughputSetting. - public CassandraViewThroughputSetting(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.DocumentDB/databaseAccounts/cassandraKeyspaces/views/throughputSettings", resourceVersion ?? "2024-08-15") + public CassandraViewThroughputSetting(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.DocumentDB/databaseAccounts/cassandraKeyspaces/views/throughputSettings", resourceVersion ?? "2024-08-15") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _location = BicepValue.DefineProperty(this, "Location", ["location"], isRequired: true); @@ -94,11 +94,6 @@ public CassandraViewThroughputSetting(string identifierName, string? resourceVer /// public static class ResourceVersions { - /// - /// 2024-09-01-preview. - /// - public static readonly string V2024_09_01_preview = "2024-09-01-preview"; - /// /// 2024-08-15. /// @@ -228,7 +223,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing CassandraViewThroughputSetting. /// - /// + /// /// The the Bicep identifier name of the CassandraViewThroughputSetting /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -236,6 +231,6 @@ public static class ResourceVersions /// /// Version of the CassandraViewThroughputSetting. /// The existing CassandraViewThroughputSetting resource. - public static CassandraViewThroughputSetting FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static CassandraViewThroughputSetting FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/CosmosDBAccount.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/CosmosDBAccount.cs index fa2e46602a7d..d7e55d136388 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/CosmosDBAccount.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/CosmosDBAccount.cs @@ -20,7 +20,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// CosmosDBAccount. /// -public partial class CosmosDBAccount : Resource +public partial class CosmosDBAccount : ProvisionableResource { /// /// Cosmos DB database account name. @@ -378,15 +378,15 @@ public partial class CosmosDBAccount : Resource /// /// Creates a new CosmosDBAccount. /// - /// + /// /// The the Bicep identifier name of the CosmosDBAccount resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, /// and underscores. /// /// Version of the CosmosDBAccount. - public CosmosDBAccount(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.DocumentDB/databaseAccounts", resourceVersion ?? "2024-08-15") + public CosmosDBAccount(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.DocumentDB/databaseAccounts", resourceVersion ?? "2024-08-15") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _location = BicepValue.DefineProperty(this, "Location", ["location"], isRequired: true); @@ -446,11 +446,6 @@ public CosmosDBAccount(string identifierName, string? resourceVersion = default) /// public static class ResourceVersions { - /// - /// 2024-09-01-preview. - /// - public static readonly string V2024_09_01_preview = "2024-09-01-preview"; - /// /// 2024-08-15. /// @@ -580,7 +575,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing CosmosDBAccount. /// - /// + /// /// The the Bicep identifier name of the CosmosDBAccount resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, @@ -588,8 +583,8 @@ public static class ResourceVersions /// /// Version of the CosmosDBAccount. /// The existing CosmosDBAccount resource. - public static CosmosDBAccount FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static CosmosDBAccount FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; /// /// Get the requirements for naming this CosmosDBAccount resource. @@ -605,7 +600,7 @@ public override ResourceNameRequirements GetResourceNameRequirements() => /// The keys for this CosmosDBAccount resource. public CosmosDBAccountKeyList GetKeys() => CosmosDBAccountKeyList.FromExpression( - new FunctionCallExpression(new MemberExpression(new IdentifierExpression(IdentifierName), "listKeys"))); + new FunctionCallExpression(new MemberExpression(new IdentifierExpression(BicepIdentifier), "listKeys"))); /// /// Creates a role assignment for a user-assigned identity that grants @@ -615,10 +610,10 @@ public CosmosDBAccountKeyList GetKeys() => /// The . /// The . public RoleAssignment CreateRoleAssignment(CosmosDBBuiltInRole role, UserAssignedIdentity identity) => - new($"{IdentifierName}_{identity.IdentifierName}_{CosmosDBBuiltInRole.GetBuiltInRoleName(role)}") + new($"{BicepIdentifier}_{identity.BicepIdentifier}_{CosmosDBBuiltInRole.GetBuiltInRoleName(role)}") { Name = BicepFunction.CreateGuid(Id, identity.PrincipalId, BicepFunction.GetSubscriptionResourceId("Microsoft.Authorization/roleDefinitions", role.ToString())), - Scope = new IdentifierExpression(IdentifierName), + Scope = new IdentifierExpression(BicepIdentifier), PrincipalType = RoleManagementPrincipalType.ServicePrincipal, RoleDefinitionId = BicepFunction.GetSubscriptionResourceId("Microsoft.Authorization/roleDefinitions", role.ToString()), PrincipalId = identity.PrincipalId @@ -631,13 +626,13 @@ public RoleAssignment CreateRoleAssignment(CosmosDBBuiltInRole role, UserAssigne /// The role to grant. /// The type of the principal to assign to. /// The principal to assign to. - /// Optional role assignment identifier name suffix. + /// Optional role assignment identifier name suffix. /// The . - public RoleAssignment CreateRoleAssignment(CosmosDBBuiltInRole role, BicepValue principalType, BicepValue principalId, string? identifierNameSuffix = default) => - new($"{IdentifierName}_{CosmosDBBuiltInRole.GetBuiltInRoleName(role)}{(identifierNameSuffix is null ? "" : "_")}{identifierNameSuffix}") + public RoleAssignment CreateRoleAssignment(CosmosDBBuiltInRole role, BicepValue principalType, BicepValue principalId, string? bicepIdentifierSuffix = default) => + new($"{BicepIdentifier}_{CosmosDBBuiltInRole.GetBuiltInRoleName(role)}{(bicepIdentifierSuffix is null ? "" : "_")}{bicepIdentifierSuffix}") { Name = BicepFunction.CreateGuid(Id, principalId, BicepFunction.GetSubscriptionResourceId("Microsoft.Authorization/roleDefinitions", role.ToString())), - Scope = new IdentifierExpression(IdentifierName), + Scope = new IdentifierExpression(BicepIdentifier), PrincipalType = principalType, RoleDefinitionId = BicepFunction.GetSubscriptionResourceId("Microsoft.Authorization/roleDefinitions", role.ToString()), PrincipalId = principalId diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/CosmosDBFirewallRule.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/CosmosDBFirewallRule.cs index ec0120566ab4..59e750e6f0de 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/CosmosDBFirewallRule.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/CosmosDBFirewallRule.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// CosmosDBFirewallRule. /// -public partial class CosmosDBFirewallRule : Resource +public partial class CosmosDBFirewallRule : ProvisionableResource { /// /// The name of the mongo cluster firewall rule. @@ -64,15 +64,15 @@ public partial class CosmosDBFirewallRule : Resource /// /// Creates a new CosmosDBFirewallRule. /// - /// + /// /// The the Bicep identifier name of the CosmosDBFirewallRule resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, /// numbers, and underscores. /// /// Version of the CosmosDBFirewallRule. - public CosmosDBFirewallRule(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.DocumentDB/mongoClusters/firewallRules", resourceVersion ?? "2024-07-01") + public CosmosDBFirewallRule(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.DocumentDB/mongoClusters/firewallRules", resourceVersion ?? "2024-07-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _endIPAddress = BicepValue.DefineProperty(this, "EndIPAddress", ["properties", "endIpAddress"], isRequired: true); @@ -97,7 +97,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing CosmosDBFirewallRule. /// - /// + /// /// The the Bicep identifier name of the CosmosDBFirewallRule resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, @@ -105,6 +105,6 @@ public static class ResourceVersions /// /// Version of the CosmosDBFirewallRule. /// The existing CosmosDBFirewallRule resource. - public static CosmosDBFirewallRule FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static CosmosDBFirewallRule FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/CosmosDBPrivateEndpointConnection.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/CosmosDBPrivateEndpointConnection.cs index e2b1947fa430..0cff40844d69 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/CosmosDBPrivateEndpointConnection.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/CosmosDBPrivateEndpointConnection.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// CosmosDBPrivateEndpointConnection. /// -public partial class CosmosDBPrivateEndpointConnection : Resource +public partial class CosmosDBPrivateEndpointConnection : ProvisionableResource { /// /// The name of the private endpoint connection. @@ -68,15 +68,15 @@ public partial class CosmosDBPrivateEndpointConnection : Resource /// /// Creates a new CosmosDBPrivateEndpointConnection. /// - /// + /// /// The the Bicep identifier name of the CosmosDBPrivateEndpointConnection /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the CosmosDBPrivateEndpointConnection. - public CosmosDBPrivateEndpointConnection(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.DocumentDB/databaseAccounts/privateEndpointConnections", resourceVersion ?? "2024-08-15") + public CosmosDBPrivateEndpointConnection(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.DocumentDB/databaseAccounts/privateEndpointConnections", resourceVersion ?? "2024-08-15") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _connectionState = BicepValue.DefineProperty(this, "ConnectionState", ["properties", "privateLinkServiceConnectionState"]); @@ -93,11 +93,6 @@ public CosmosDBPrivateEndpointConnection(string identifierName, string? resource /// public static class ResourceVersions { - /// - /// 2024-09-01-preview. - /// - public static readonly string V2024_09_01_preview = "2024-09-01-preview"; - /// /// 2024-08-15. /// @@ -227,7 +222,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing CosmosDBPrivateEndpointConnection. /// - /// + /// /// The the Bicep identifier name of the CosmosDBPrivateEndpointConnection /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -235,6 +230,6 @@ public static class ResourceVersions /// /// Version of the CosmosDBPrivateEndpointConnection. /// The existing CosmosDBPrivateEndpointConnection resource. - public static CosmosDBPrivateEndpointConnection FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static CosmosDBPrivateEndpointConnection FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/CosmosDBService.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/CosmosDBService.cs index 041ac1073553..5295b56da308 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/CosmosDBService.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/CosmosDBService.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// CosmosDBService. /// -public partial class CosmosDBService : Resource +public partial class CosmosDBService : ProvisionableResource { /// /// Cosmos DB service name. @@ -79,15 +79,15 @@ public partial class CosmosDBService : Resource /// /// Creates a new CosmosDBService. /// - /// + /// /// The the Bicep identifier name of the CosmosDBService resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, /// and underscores. /// /// Version of the CosmosDBService. - public CosmosDBService(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.DocumentDB/databaseAccounts/services", resourceVersion ?? "2024-08-15") + public CosmosDBService(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.DocumentDB/databaseAccounts/services", resourceVersion ?? "2024-08-15") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _instanceCount = BicepValue.DefineProperty(this, "InstanceCount", ["properties", "instanceCount"]); @@ -104,11 +104,6 @@ public CosmosDBService(string identifierName, string? resourceVersion = default) /// public static class ResourceVersions { - /// - /// 2024-09-01-preview. - /// - public static readonly string V2024_09_01_preview = "2024-09-01-preview"; - /// /// 2024-08-15. /// @@ -238,7 +233,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing CosmosDBService. /// - /// + /// /// The the Bicep identifier name of the CosmosDBService resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, @@ -246,6 +241,6 @@ public static class ResourceVersions /// /// Version of the CosmosDBService. /// The existing CosmosDBService resource. - public static CosmosDBService FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static CosmosDBService FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/CosmosDBSqlClientEncryptionKey.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/CosmosDBSqlClientEncryptionKey.cs index ab5f55c41b73..346e322aebb4 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/CosmosDBSqlClientEncryptionKey.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/CosmosDBSqlClientEncryptionKey.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// CosmosDBSqlClientEncryptionKey. /// -public partial class CosmosDBSqlClientEncryptionKey : Resource +public partial class CosmosDBSqlClientEncryptionKey : ProvisionableResource { /// /// Cosmos DB ClientEncryptionKey name. @@ -50,15 +50,15 @@ public partial class CosmosDBSqlClientEncryptionKey : Resource /// /// Creates a new CosmosDBSqlClientEncryptionKey. /// - /// + /// /// The the Bicep identifier name of the CosmosDBSqlClientEncryptionKey /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the CosmosDBSqlClientEncryptionKey. - public CosmosDBSqlClientEncryptionKey(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.DocumentDB/databaseAccounts/sqlDatabases/clientEncryptionKeys", resourceVersion ?? "2024-08-15") + public CosmosDBSqlClientEncryptionKey(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.DocumentDB/databaseAccounts/sqlDatabases/clientEncryptionKeys", resourceVersion ?? "2024-08-15") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _resource = BicepValue.DefineProperty(this, "Resource", ["properties", "resource"], isRequired: true); @@ -72,11 +72,6 @@ public CosmosDBSqlClientEncryptionKey(string identifierName, string? resourceVer /// public static class ResourceVersions { - /// - /// 2024-09-01-preview. - /// - public static readonly string V2024_09_01_preview = "2024-09-01-preview"; - /// /// 2024-08-15. /// @@ -206,7 +201,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing CosmosDBSqlClientEncryptionKey. /// - /// + /// /// The the Bicep identifier name of the CosmosDBSqlClientEncryptionKey /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -214,6 +209,6 @@ public static class ResourceVersions /// /// Version of the CosmosDBSqlClientEncryptionKey. /// The existing CosmosDBSqlClientEncryptionKey resource. - public static CosmosDBSqlClientEncryptionKey FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static CosmosDBSqlClientEncryptionKey FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/CosmosDBSqlContainer.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/CosmosDBSqlContainer.cs index c46b1a61f1dd..95e4f7ed5d6a 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/CosmosDBSqlContainer.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/CosmosDBSqlContainer.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// CosmosDBSqlContainer. /// -public partial class CosmosDBSqlContainer : Resource +public partial class CosmosDBSqlContainer : ProvisionableResource { /// /// Cosmos DB container name. @@ -76,15 +76,15 @@ public partial class CosmosDBSqlContainer : Resource /// /// Creates a new CosmosDBSqlContainer. /// - /// + /// /// The the Bicep identifier name of the CosmosDBSqlContainer resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, /// numbers, and underscores. /// /// Version of the CosmosDBSqlContainer. - public CosmosDBSqlContainer(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers", resourceVersion ?? "2024-08-15") + public CosmosDBSqlContainer(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers", resourceVersion ?? "2024-08-15") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _location = BicepValue.DefineProperty(this, "Location", ["location"], isRequired: true); @@ -102,11 +102,6 @@ public CosmosDBSqlContainer(string identifierName, string? resourceVersion = def /// public static class ResourceVersions { - /// - /// 2024-09-01-preview. - /// - public static readonly string V2024_09_01_preview = "2024-09-01-preview"; - /// /// 2024-08-15. /// @@ -236,7 +231,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing CosmosDBSqlContainer. /// - /// + /// /// The the Bicep identifier name of the CosmosDBSqlContainer resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, @@ -244,6 +239,6 @@ public static class ResourceVersions /// /// Version of the CosmosDBSqlContainer. /// The existing CosmosDBSqlContainer resource. - public static CosmosDBSqlContainer FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static CosmosDBSqlContainer FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/CosmosDBSqlContainerThroughputSetting.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/CosmosDBSqlContainerThroughputSetting.cs index b29989075ab9..2829b35ac13f 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/CosmosDBSqlContainerThroughputSetting.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/CosmosDBSqlContainerThroughputSetting.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// CosmosDBSqlContainerThroughputSetting. /// -public partial class CosmosDBSqlContainerThroughputSetting : Resource +public partial class CosmosDBSqlContainerThroughputSetting : ProvisionableResource { /// /// Gets the Name. @@ -69,15 +69,15 @@ public partial class CosmosDBSqlContainerThroughputSetting : Resource /// /// Creates a new CosmosDBSqlContainerThroughputSetting. /// - /// + /// /// The the Bicep identifier name of the /// CosmosDBSqlContainerThroughputSetting resource. This can be used to /// refer to the resource in expressions, but is not the Azure name of the /// resource. This value can contain letters, numbers, and underscores. /// /// Version of the CosmosDBSqlContainerThroughputSetting. - public CosmosDBSqlContainerThroughputSetting(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers/throughputSettings", resourceVersion ?? "2024-08-15") + public CosmosDBSqlContainerThroughputSetting(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers/throughputSettings", resourceVersion ?? "2024-08-15") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _location = BicepValue.DefineProperty(this, "Location", ["location"], isRequired: true); @@ -94,11 +94,6 @@ public CosmosDBSqlContainerThroughputSetting(string identifierName, string? reso /// public static class ResourceVersions { - /// - /// 2024-09-01-preview. - /// - public static readonly string V2024_09_01_preview = "2024-09-01-preview"; - /// /// 2024-08-15. /// @@ -229,7 +224,7 @@ public static class ResourceVersions /// Creates a reference to an existing /// CosmosDBSqlContainerThroughputSetting. /// - /// + /// /// The the Bicep identifier name of the /// CosmosDBSqlContainerThroughputSetting resource. This can be used to /// refer to the resource in expressions, but is not the Azure name of the @@ -237,6 +232,6 @@ public static class ResourceVersions /// /// Version of the CosmosDBSqlContainerThroughputSetting. /// The existing CosmosDBSqlContainerThroughputSetting resource. - public static CosmosDBSqlContainerThroughputSetting FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static CosmosDBSqlContainerThroughputSetting FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/CosmosDBSqlDatabase.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/CosmosDBSqlDatabase.cs index 19e345588539..0f5c85783718 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/CosmosDBSqlDatabase.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/CosmosDBSqlDatabase.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// CosmosDBSqlDatabase. /// -public partial class CosmosDBSqlDatabase : Resource +public partial class CosmosDBSqlDatabase : ProvisionableResource { /// /// Cosmos DB database name. @@ -76,15 +76,15 @@ public partial class CosmosDBSqlDatabase : Resource /// /// Creates a new CosmosDBSqlDatabase. /// - /// + /// /// The the Bicep identifier name of the CosmosDBSqlDatabase resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, /// numbers, and underscores. /// /// Version of the CosmosDBSqlDatabase. - public CosmosDBSqlDatabase(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.DocumentDB/databaseAccounts/sqlDatabases", resourceVersion ?? "2024-08-15") + public CosmosDBSqlDatabase(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.DocumentDB/databaseAccounts/sqlDatabases", resourceVersion ?? "2024-08-15") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _location = BicepValue.DefineProperty(this, "Location", ["location"], isRequired: true); @@ -102,11 +102,6 @@ public CosmosDBSqlDatabase(string identifierName, string? resourceVersion = defa /// public static class ResourceVersions { - /// - /// 2024-09-01-preview. - /// - public static readonly string V2024_09_01_preview = "2024-09-01-preview"; - /// /// 2024-08-15. /// @@ -236,7 +231,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing CosmosDBSqlDatabase. /// - /// + /// /// The the Bicep identifier name of the CosmosDBSqlDatabase resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, @@ -244,6 +239,6 @@ public static class ResourceVersions /// /// Version of the CosmosDBSqlDatabase. /// The existing CosmosDBSqlDatabase resource. - public static CosmosDBSqlDatabase FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static CosmosDBSqlDatabase FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/CosmosDBSqlDatabaseThroughputSetting.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/CosmosDBSqlDatabaseThroughputSetting.cs index ff7f43e078b6..f7aec11b5305 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/CosmosDBSqlDatabaseThroughputSetting.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/CosmosDBSqlDatabaseThroughputSetting.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// CosmosDBSqlDatabaseThroughputSetting. /// -public partial class CosmosDBSqlDatabaseThroughputSetting : Resource +public partial class CosmosDBSqlDatabaseThroughputSetting : ProvisionableResource { /// /// Gets the Name. @@ -69,15 +69,15 @@ public partial class CosmosDBSqlDatabaseThroughputSetting : Resource /// /// Creates a new CosmosDBSqlDatabaseThroughputSetting. /// - /// + /// /// The the Bicep identifier name of the /// CosmosDBSqlDatabaseThroughputSetting resource. This can be used to /// refer to the resource in expressions, but is not the Azure name of the /// resource. This value can contain letters, numbers, and underscores. /// /// Version of the CosmosDBSqlDatabaseThroughputSetting. - public CosmosDBSqlDatabaseThroughputSetting(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.DocumentDB/databaseAccounts/sqlDatabases/throughputSettings", resourceVersion ?? "2024-08-15") + public CosmosDBSqlDatabaseThroughputSetting(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.DocumentDB/databaseAccounts/sqlDatabases/throughputSettings", resourceVersion ?? "2024-08-15") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _location = BicepValue.DefineProperty(this, "Location", ["location"], isRequired: true); @@ -94,11 +94,6 @@ public CosmosDBSqlDatabaseThroughputSetting(string identifierName, string? resou /// public static class ResourceVersions { - /// - /// 2024-09-01-preview. - /// - public static readonly string V2024_09_01_preview = "2024-09-01-preview"; - /// /// 2024-08-15. /// @@ -228,7 +223,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing CosmosDBSqlDatabaseThroughputSetting. /// - /// + /// /// The the Bicep identifier name of the /// CosmosDBSqlDatabaseThroughputSetting resource. This can be used to /// refer to the resource in expressions, but is not the Azure name of the @@ -236,6 +231,6 @@ public static class ResourceVersions /// /// Version of the CosmosDBSqlDatabaseThroughputSetting. /// The existing CosmosDBSqlDatabaseThroughputSetting resource. - public static CosmosDBSqlDatabaseThroughputSetting FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static CosmosDBSqlDatabaseThroughputSetting FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/CosmosDBSqlRoleAssignment.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/CosmosDBSqlRoleAssignment.cs index 29225f8cd716..7c252ee4f9b8 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/CosmosDBSqlRoleAssignment.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/CosmosDBSqlRoleAssignment.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// CosmosDBSqlRoleAssignment. /// -public partial class CosmosDBSqlRoleAssignment : Resource +public partial class CosmosDBSqlRoleAssignment : ProvisionableResource { /// /// Gets the Name. @@ -66,15 +66,15 @@ public partial class CosmosDBSqlRoleAssignment : Resource /// /// Creates a new CosmosDBSqlRoleAssignment. /// - /// + /// /// The the Bicep identifier name of the CosmosDBSqlRoleAssignment /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the CosmosDBSqlRoleAssignment. - public CosmosDBSqlRoleAssignment(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.DocumentDB/databaseAccounts/sqlRoleAssignments", resourceVersion ?? "2024-08-15") + public CosmosDBSqlRoleAssignment(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.DocumentDB/databaseAccounts/sqlRoleAssignments", resourceVersion ?? "2024-08-15") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _principalId = BicepValue.DefineProperty(this, "PrincipalId", ["properties", "principalId"]); @@ -90,11 +90,6 @@ public CosmosDBSqlRoleAssignment(string identifierName, string? resourceVersion /// public static class ResourceVersions { - /// - /// 2024-09-01-preview. - /// - public static readonly string V2024_09_01_preview = "2024-09-01-preview"; - /// /// 2024-08-15. /// @@ -224,7 +219,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing CosmosDBSqlRoleAssignment. /// - /// + /// /// The the Bicep identifier name of the CosmosDBSqlRoleAssignment /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -232,6 +227,6 @@ public static class ResourceVersions /// /// Version of the CosmosDBSqlRoleAssignment. /// The existing CosmosDBSqlRoleAssignment resource. - public static CosmosDBSqlRoleAssignment FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static CosmosDBSqlRoleAssignment FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/CosmosDBSqlRoleDefinition.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/CosmosDBSqlRoleDefinition.cs index e26bd56d2be1..1b01d9af3b87 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/CosmosDBSqlRoleDefinition.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/CosmosDBSqlRoleDefinition.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// CosmosDBSqlRoleDefinition. /// -public partial class CosmosDBSqlRoleDefinition : Resource +public partial class CosmosDBSqlRoleDefinition : ProvisionableResource { /// /// Gets the Name. @@ -75,15 +75,15 @@ public partial class CosmosDBSqlRoleDefinition : Resource /// /// Creates a new CosmosDBSqlRoleDefinition. /// - /// + /// /// The the Bicep identifier name of the CosmosDBSqlRoleDefinition /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the CosmosDBSqlRoleDefinition. - public CosmosDBSqlRoleDefinition(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.DocumentDB/databaseAccounts/sqlRoleDefinitions", resourceVersion ?? "2024-08-15") + public CosmosDBSqlRoleDefinition(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.DocumentDB/databaseAccounts/sqlRoleDefinitions", resourceVersion ?? "2024-08-15") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _assignableScopes = BicepList.DefineProperty(this, "AssignableScopes", ["properties", "assignableScopes"]); @@ -100,11 +100,6 @@ public CosmosDBSqlRoleDefinition(string identifierName, string? resourceVersion /// public static class ResourceVersions { - /// - /// 2024-09-01-preview. - /// - public static readonly string V2024_09_01_preview = "2024-09-01-preview"; - /// /// 2024-08-15. /// @@ -234,7 +229,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing CosmosDBSqlRoleDefinition. /// - /// + /// /// The the Bicep identifier name of the CosmosDBSqlRoleDefinition /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -242,6 +237,6 @@ public static class ResourceVersions /// /// Version of the CosmosDBSqlRoleDefinition. /// The existing CosmosDBSqlRoleDefinition resource. - public static CosmosDBSqlRoleDefinition FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static CosmosDBSqlRoleDefinition FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/CosmosDBSqlStoredProcedure.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/CosmosDBSqlStoredProcedure.cs index 90461fe66e91..a56f6078212f 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/CosmosDBSqlStoredProcedure.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/CosmosDBSqlStoredProcedure.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// CosmosDBSqlStoredProcedure. /// -public partial class CosmosDBSqlStoredProcedure : Resource +public partial class CosmosDBSqlStoredProcedure : ProvisionableResource { /// /// Cosmos DB storedProcedure name. @@ -76,15 +76,15 @@ public partial class CosmosDBSqlStoredProcedure : Resource /// /// Creates a new CosmosDBSqlStoredProcedure. /// - /// + /// /// The the Bicep identifier name of the CosmosDBSqlStoredProcedure /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the CosmosDBSqlStoredProcedure. - public CosmosDBSqlStoredProcedure(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers/storedProcedures", resourceVersion ?? "2024-08-15") + public CosmosDBSqlStoredProcedure(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers/storedProcedures", resourceVersion ?? "2024-08-15") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _location = BicepValue.DefineProperty(this, "Location", ["location"], isRequired: true); @@ -102,11 +102,6 @@ public CosmosDBSqlStoredProcedure(string identifierName, string? resourceVersion /// public static class ResourceVersions { - /// - /// 2024-09-01-preview. - /// - public static readonly string V2024_09_01_preview = "2024-09-01-preview"; - /// /// 2024-08-15. /// @@ -236,7 +231,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing CosmosDBSqlStoredProcedure. /// - /// + /// /// The the Bicep identifier name of the CosmosDBSqlStoredProcedure /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -244,6 +239,6 @@ public static class ResourceVersions /// /// Version of the CosmosDBSqlStoredProcedure. /// The existing CosmosDBSqlStoredProcedure resource. - public static CosmosDBSqlStoredProcedure FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static CosmosDBSqlStoredProcedure FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/CosmosDBSqlTrigger.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/CosmosDBSqlTrigger.cs index b6aa22636b41..5e714f7dcfaa 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/CosmosDBSqlTrigger.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/CosmosDBSqlTrigger.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// CosmosDBSqlTrigger. /// -public partial class CosmosDBSqlTrigger : Resource +public partial class CosmosDBSqlTrigger : ProvisionableResource { /// /// Cosmos DB trigger name. @@ -76,15 +76,15 @@ public partial class CosmosDBSqlTrigger : Resource /// /// Creates a new CosmosDBSqlTrigger. /// - /// + /// /// The the Bicep identifier name of the CosmosDBSqlTrigger resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, /// and underscores. /// /// Version of the CosmosDBSqlTrigger. - public CosmosDBSqlTrigger(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers/triggers", resourceVersion ?? "2024-08-15") + public CosmosDBSqlTrigger(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers/triggers", resourceVersion ?? "2024-08-15") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _location = BicepValue.DefineProperty(this, "Location", ["location"], isRequired: true); @@ -102,11 +102,6 @@ public CosmosDBSqlTrigger(string identifierName, string? resourceVersion = defau /// public static class ResourceVersions { - /// - /// 2024-09-01-preview. - /// - public static readonly string V2024_09_01_preview = "2024-09-01-preview"; - /// /// 2024-08-15. /// @@ -236,7 +231,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing CosmosDBSqlTrigger. /// - /// + /// /// The the Bicep identifier name of the CosmosDBSqlTrigger resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, @@ -244,6 +239,6 @@ public static class ResourceVersions /// /// Version of the CosmosDBSqlTrigger. /// The existing CosmosDBSqlTrigger resource. - public static CosmosDBSqlTrigger FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static CosmosDBSqlTrigger FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/CosmosDBSqlUserDefinedFunction.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/CosmosDBSqlUserDefinedFunction.cs index 56e34ca85f5f..c73964b7a6da 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/CosmosDBSqlUserDefinedFunction.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/CosmosDBSqlUserDefinedFunction.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// CosmosDBSqlUserDefinedFunction. /// -public partial class CosmosDBSqlUserDefinedFunction : Resource +public partial class CosmosDBSqlUserDefinedFunction : ProvisionableResource { /// /// Cosmos DB userDefinedFunction name. @@ -76,15 +76,15 @@ public partial class CosmosDBSqlUserDefinedFunction : Resource /// /// Creates a new CosmosDBSqlUserDefinedFunction. /// - /// + /// /// The the Bicep identifier name of the CosmosDBSqlUserDefinedFunction /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the CosmosDBSqlUserDefinedFunction. - public CosmosDBSqlUserDefinedFunction(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers/userDefinedFunctions", resourceVersion ?? "2024-08-15") + public CosmosDBSqlUserDefinedFunction(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers/userDefinedFunctions", resourceVersion ?? "2024-08-15") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _location = BicepValue.DefineProperty(this, "Location", ["location"], isRequired: true); @@ -102,11 +102,6 @@ public CosmosDBSqlUserDefinedFunction(string identifierName, string? resourceVer /// public static class ResourceVersions { - /// - /// 2024-09-01-preview. - /// - public static readonly string V2024_09_01_preview = "2024-09-01-preview"; - /// /// 2024-08-15. /// @@ -236,7 +231,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing CosmosDBSqlUserDefinedFunction. /// - /// + /// /// The the Bicep identifier name of the CosmosDBSqlUserDefinedFunction /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -244,6 +239,6 @@ public static class ResourceVersions /// /// Version of the CosmosDBSqlUserDefinedFunction. /// The existing CosmosDBSqlUserDefinedFunction resource. - public static CosmosDBSqlUserDefinedFunction FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static CosmosDBSqlUserDefinedFunction FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/CosmosDBTable.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/CosmosDBTable.cs index 95c5d10d4c26..af4733cddeeb 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/CosmosDBTable.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/CosmosDBTable.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// CosmosDBTable. /// -public partial class CosmosDBTable : Resource +public partial class CosmosDBTable : ProvisionableResource { /// /// Cosmos DB table name. @@ -76,15 +76,15 @@ public partial class CosmosDBTable : Resource /// /// Creates a new CosmosDBTable. /// - /// + /// /// The the Bicep identifier name of the CosmosDBTable resource. This can /// be used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and /// underscores. /// /// Version of the CosmosDBTable. - public CosmosDBTable(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.DocumentDB/databaseAccounts/tables", resourceVersion ?? "2024-08-15") + public CosmosDBTable(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.DocumentDB/databaseAccounts/tables", resourceVersion ?? "2024-08-15") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _location = BicepValue.DefineProperty(this, "Location", ["location"], isRequired: true); @@ -102,11 +102,6 @@ public CosmosDBTable(string identifierName, string? resourceVersion = default) /// public static class ResourceVersions { - /// - /// 2024-09-01-preview. - /// - public static readonly string V2024_09_01_preview = "2024-09-01-preview"; - /// /// 2024-08-15. /// @@ -236,7 +231,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing CosmosDBTable. /// - /// + /// /// The the Bicep identifier name of the CosmosDBTable resource. This can /// be used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and @@ -244,6 +239,6 @@ public static class ResourceVersions /// /// Version of the CosmosDBTable. /// The existing CosmosDBTable resource. - public static CosmosDBTable FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static CosmosDBTable FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/CosmosDBThroughputPool.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/CosmosDBThroughputPool.cs index 84d3ced51c3d..317fd5368b9a 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/CosmosDBThroughputPool.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/CosmosDBThroughputPool.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// CosmosDBThroughputPool. /// -public partial class CosmosDBThroughputPool : Resource +public partial class CosmosDBThroughputPool : ProvisionableResource { /// /// Cosmos DB Throughput Pool name. @@ -63,15 +63,15 @@ public partial class CosmosDBThroughputPool : Resource /// /// Creates a new CosmosDBThroughputPool. /// - /// + /// /// The the Bicep identifier name of the CosmosDBThroughputPool resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, /// numbers, and underscores. /// /// Version of the CosmosDBThroughputPool. - public CosmosDBThroughputPool(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.DocumentDB/throughputPools", resourceVersion ?? "2024-02-15-preview") + public CosmosDBThroughputPool(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.DocumentDB/throughputPools", resourceVersion) { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _location = BicepValue.DefineProperty(this, "Location", ["location"], isRequired: true); @@ -82,21 +82,10 @@ public CosmosDBThroughputPool(string identifierName, string? resourceVersion = d _systemData = BicepValue.DefineProperty(this, "SystemData", ["systemData"], isOutput: true); } - /// - /// Supported CosmosDBThroughputPool resource versions. - /// - public static class ResourceVersions - { - /// - /// 2024-02-15-preview. - /// - public static readonly string V2024_02_15_preview = "2024-02-15-preview"; - } - /// /// Creates a reference to an existing CosmosDBThroughputPool. /// - /// + /// /// The the Bicep identifier name of the CosmosDBThroughputPool resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, @@ -104,6 +93,6 @@ public static class ResourceVersions /// /// Version of the CosmosDBThroughputPool. /// The existing CosmosDBThroughputPool resource. - public static CosmosDBThroughputPool FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static CosmosDBThroughputPool FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/CosmosDBThroughputPoolAccount.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/CosmosDBThroughputPoolAccount.cs index 00096fa9f3c5..3bc66c5bf36f 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/CosmosDBThroughputPoolAccount.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/CosmosDBThroughputPoolAccount.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// CosmosDBThroughputPoolAccount. /// -public partial class CosmosDBThroughputPoolAccount : Resource +public partial class CosmosDBThroughputPoolAccount : ProvisionableResource { /// /// Cosmos DB global database account in a Throughput Pool. @@ -69,15 +69,15 @@ public partial class CosmosDBThroughputPoolAccount : Resource /// /// Creates a new CosmosDBThroughputPoolAccount. /// - /// + /// /// The the Bicep identifier name of the CosmosDBThroughputPoolAccount /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the CosmosDBThroughputPoolAccount. - public CosmosDBThroughputPoolAccount(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.DocumentDB/throughputPools/throughputPoolAccounts", resourceVersion ?? "2024-02-15-preview") + public CosmosDBThroughputPoolAccount(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.DocumentDB/throughputPools/throughputPoolAccounts", resourceVersion) { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _accountLocation = BicepValue.DefineProperty(this, "AccountLocation", ["properties", "accountLocation"]); @@ -94,16 +94,11 @@ public CosmosDBThroughputPoolAccount(string identifierName, string? resourceVers /// public static class ResourceVersions { - /// - /// 2024-02-15-preview. - /// - public static readonly string V2024_02_15_preview = "2024-02-15-preview"; } - /// /// Creates a reference to an existing CosmosDBThroughputPoolAccount. /// - /// + /// /// The the Bicep identifier name of the CosmosDBThroughputPoolAccount /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -111,6 +106,6 @@ public static class ResourceVersions /// /// Version of the CosmosDBThroughputPoolAccount. /// The existing CosmosDBThroughputPoolAccount resource. - public static CosmosDBThroughputPoolAccount FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static CosmosDBThroughputPoolAccount FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/CosmosTableThroughputSetting.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/CosmosTableThroughputSetting.cs index f6dee381803a..54c970b254db 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/CosmosTableThroughputSetting.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/CosmosTableThroughputSetting.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// CosmosTableThroughputSetting. /// -public partial class CosmosTableThroughputSetting : Resource +public partial class CosmosTableThroughputSetting : ProvisionableResource { /// /// Gets the Name. @@ -69,15 +69,15 @@ public partial class CosmosTableThroughputSetting : Resource /// /// Creates a new CosmosTableThroughputSetting. /// - /// + /// /// The the Bicep identifier name of the CosmosTableThroughputSetting /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the CosmosTableThroughputSetting. - public CosmosTableThroughputSetting(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.DocumentDB/databaseAccounts/tables/throughputSettings", resourceVersion ?? "2024-08-15") + public CosmosTableThroughputSetting(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.DocumentDB/databaseAccounts/tables/throughputSettings", resourceVersion ?? "2024-08-15") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _location = BicepValue.DefineProperty(this, "Location", ["location"], isRequired: true); @@ -94,11 +94,6 @@ public CosmosTableThroughputSetting(string identifierName, string? resourceVersi /// public static class ResourceVersions { - /// - /// 2024-09-01-preview. - /// - public static readonly string V2024_09_01_preview = "2024-09-01-preview"; - /// /// 2024-08-15. /// @@ -228,7 +223,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing CosmosTableThroughputSetting. /// - /// + /// /// The the Bicep identifier name of the CosmosTableThroughputSetting /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -236,6 +231,6 @@ public static class ResourceVersions /// /// Version of the CosmosTableThroughputSetting. /// The existing CosmosTableThroughputSetting resource. - public static CosmosTableThroughputSetting FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static CosmosTableThroughputSetting FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/DataTransferJobGetResult.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/DataTransferJobGetResult.cs index f4b13010ccca..0b267da4785e 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/DataTransferJobGetResult.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/DataTransferJobGetResult.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// DataTransferJobGetResult. /// -public partial class DataTransferJobGetResult : Resource +public partial class DataTransferJobGetResult : ProvisionableResource { /// /// Name of the Data Transfer Job. @@ -138,15 +138,15 @@ public partial class DataTransferJobGetResult : Resource /// /// Creates a new DataTransferJobGetResult. /// - /// + /// /// The the Bicep identifier name of the DataTransferJobGetResult resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, /// numbers, and underscores. /// /// Version of the DataTransferJobGetResult. - public DataTransferJobGetResult(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.DocumentDB/databaseAccounts/dataTransferJobs", resourceVersion ?? "2024-08-15") + public DataTransferJobGetResult(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.DocumentDB/databaseAccounts/dataTransferJobs", resourceVersion ?? "2024-08-15") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _properties = BicepValue.DefineProperty(this, "Properties", ["properties"], isRequired: true); @@ -171,11 +171,6 @@ public DataTransferJobGetResult(string identifierName, string? resourceVersion = /// public static class ResourceVersions { - /// - /// 2024-09-01-preview. - /// - public static readonly string V2024_09_01_preview = "2024-09-01-preview"; - /// /// 2024-08-15. /// @@ -305,7 +300,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing DataTransferJobGetResult. /// - /// + /// /// The the Bicep identifier name of the DataTransferJobGetResult resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, @@ -313,6 +308,6 @@ public static class ResourceVersions /// /// Version of the DataTransferJobGetResult. /// The existing DataTransferJobGetResult resource. - public static DataTransferJobGetResult FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static DataTransferJobGetResult FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/GraphResourceGetResult.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/GraphResourceGetResult.cs index 768ca82f107f..0b32045292a5 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/GraphResourceGetResult.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/GraphResourceGetResult.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// GraphResourceGetResult. /// -public partial class GraphResourceGetResult : Resource +public partial class GraphResourceGetResult : ProvisionableResource { /// /// Cosmos DB graph resource name. @@ -76,15 +76,15 @@ public partial class GraphResourceGetResult : Resource /// /// Creates a new GraphResourceGetResult. /// - /// + /// /// The the Bicep identifier name of the GraphResourceGetResult resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, /// numbers, and underscores. /// /// Version of the GraphResourceGetResult. - public GraphResourceGetResult(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.DocumentDB/databaseAccounts/graphs", resourceVersion ?? "2024-08-15") + public GraphResourceGetResult(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.DocumentDB/databaseAccounts/graphs", resourceVersion ?? "2024-08-15") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _location = BicepValue.DefineProperty(this, "Location", ["location"], isRequired: true); @@ -102,11 +102,6 @@ public GraphResourceGetResult(string identifierName, string? resourceVersion = d /// public static class ResourceVersions { - /// - /// 2024-09-01-preview. - /// - public static readonly string V2024_09_01_preview = "2024-09-01-preview"; - /// /// 2024-08-15. /// @@ -236,7 +231,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing GraphResourceGetResult. /// - /// + /// /// The the Bicep identifier name of the GraphResourceGetResult resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, @@ -244,6 +239,6 @@ public static class ResourceVersions /// /// Version of the GraphResourceGetResult. /// The existing GraphResourceGetResult resource. - public static GraphResourceGetResult FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static GraphResourceGetResult FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/GremlinDatabase.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/GremlinDatabase.cs index 0eb286c88fb2..5676117aaa30 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/GremlinDatabase.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/GremlinDatabase.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// GremlinDatabase. /// -public partial class GremlinDatabase : Resource +public partial class GremlinDatabase : ProvisionableResource { /// /// Cosmos DB database name. @@ -76,15 +76,15 @@ public partial class GremlinDatabase : Resource /// /// Creates a new GremlinDatabase. /// - /// + /// /// The the Bicep identifier name of the GremlinDatabase resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, /// and underscores. /// /// Version of the GremlinDatabase. - public GremlinDatabase(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.DocumentDB/databaseAccounts/gremlinDatabases", resourceVersion ?? "2024-08-15") + public GremlinDatabase(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.DocumentDB/databaseAccounts/gremlinDatabases", resourceVersion ?? "2024-08-15") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _location = BicepValue.DefineProperty(this, "Location", ["location"], isRequired: true); @@ -102,11 +102,6 @@ public GremlinDatabase(string identifierName, string? resourceVersion = default) /// public static class ResourceVersions { - /// - /// 2024-09-01-preview. - /// - public static readonly string V2024_09_01_preview = "2024-09-01-preview"; - /// /// 2024-08-15. /// @@ -236,7 +231,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing GremlinDatabase. /// - /// + /// /// The the Bicep identifier name of the GremlinDatabase resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, @@ -244,6 +239,6 @@ public static class ResourceVersions /// /// Version of the GremlinDatabase. /// The existing GremlinDatabase resource. - public static GremlinDatabase FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static GremlinDatabase FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/GremlinDatabaseThroughputSetting.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/GremlinDatabaseThroughputSetting.cs index fb8e1d33b519..a5f42178def5 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/GremlinDatabaseThroughputSetting.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/GremlinDatabaseThroughputSetting.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// GremlinDatabaseThroughputSetting. /// -public partial class GremlinDatabaseThroughputSetting : Resource +public partial class GremlinDatabaseThroughputSetting : ProvisionableResource { /// /// Gets the Name. @@ -69,15 +69,15 @@ public partial class GremlinDatabaseThroughputSetting : Resource /// /// Creates a new GremlinDatabaseThroughputSetting. /// - /// + /// /// The the Bicep identifier name of the GremlinDatabaseThroughputSetting /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the GremlinDatabaseThroughputSetting. - public GremlinDatabaseThroughputSetting(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/throughputSettings", resourceVersion ?? "2024-08-15") + public GremlinDatabaseThroughputSetting(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/throughputSettings", resourceVersion ?? "2024-08-15") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _location = BicepValue.DefineProperty(this, "Location", ["location"], isRequired: true); @@ -94,11 +94,6 @@ public GremlinDatabaseThroughputSetting(string identifierName, string? resourceV /// public static class ResourceVersions { - /// - /// 2024-09-01-preview. - /// - public static readonly string V2024_09_01_preview = "2024-09-01-preview"; - /// /// 2024-08-15. /// @@ -228,7 +223,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing GremlinDatabaseThroughputSetting. /// - /// + /// /// The the Bicep identifier name of the GremlinDatabaseThroughputSetting /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -236,6 +231,6 @@ public static class ResourceVersions /// /// Version of the GremlinDatabaseThroughputSetting. /// The existing GremlinDatabaseThroughputSetting resource. - public static GremlinDatabaseThroughputSetting FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static GremlinDatabaseThroughputSetting FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/GremlinGraph.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/GremlinGraph.cs index 33f7b31e7a1c..ae47f8686639 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/GremlinGraph.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/GremlinGraph.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// GremlinGraph. /// -public partial class GremlinGraph : Resource +public partial class GremlinGraph : ProvisionableResource { /// /// Cosmos DB graph name. @@ -76,15 +76,15 @@ public partial class GremlinGraph : Resource /// /// Creates a new GremlinGraph. /// - /// + /// /// The the Bicep identifier name of the GremlinGraph resource. This can /// be used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and /// underscores. /// /// Version of the GremlinGraph. - public GremlinGraph(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/graphs", resourceVersion ?? "2024-08-15") + public GremlinGraph(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/graphs", resourceVersion ?? "2024-08-15") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _location = BicepValue.DefineProperty(this, "Location", ["location"], isRequired: true); @@ -102,11 +102,6 @@ public GremlinGraph(string identifierName, string? resourceVersion = default) /// public static class ResourceVersions { - /// - /// 2024-09-01-preview. - /// - public static readonly string V2024_09_01_preview = "2024-09-01-preview"; - /// /// 2024-08-15. /// @@ -236,7 +231,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing GremlinGraph. /// - /// + /// /// The the Bicep identifier name of the GremlinGraph resource. This can /// be used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and @@ -244,6 +239,6 @@ public static class ResourceVersions /// /// Version of the GremlinGraph. /// The existing GremlinGraph resource. - public static GremlinGraph FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static GremlinGraph FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/GremlinGraphThroughputSetting.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/GremlinGraphThroughputSetting.cs index d2f4c484b91b..880782511413 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/GremlinGraphThroughputSetting.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/GremlinGraphThroughputSetting.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// GremlinGraphThroughputSetting. /// -public partial class GremlinGraphThroughputSetting : Resource +public partial class GremlinGraphThroughputSetting : ProvisionableResource { /// /// Gets the Name. @@ -69,15 +69,15 @@ public partial class GremlinGraphThroughputSetting : Resource /// /// Creates a new GremlinGraphThroughputSetting. /// - /// + /// /// The the Bicep identifier name of the GremlinGraphThroughputSetting /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the GremlinGraphThroughputSetting. - public GremlinGraphThroughputSetting(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/graphs/throughputSettings", resourceVersion ?? "2024-08-15") + public GremlinGraphThroughputSetting(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/graphs/throughputSettings", resourceVersion ?? "2024-08-15") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _location = BicepValue.DefineProperty(this, "Location", ["location"], isRequired: true); @@ -94,11 +94,6 @@ public GremlinGraphThroughputSetting(string identifierName, string? resourceVers /// public static class ResourceVersions { - /// - /// 2024-09-01-preview. - /// - public static readonly string V2024_09_01_preview = "2024-09-01-preview"; - /// /// 2024-08-15. /// @@ -228,7 +223,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing GremlinGraphThroughputSetting. /// - /// + /// /// The the Bicep identifier name of the GremlinGraphThroughputSetting /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -236,6 +231,6 @@ public static class ResourceVersions /// /// Version of the GremlinGraphThroughputSetting. /// The existing GremlinGraphThroughputSetting resource. - public static GremlinGraphThroughputSetting FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static GremlinGraphThroughputSetting FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/AuthenticationMethodLdapProperties.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/AuthenticationMethodLdapProperties.cs index f6222244ae57..54734ff53aa9 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/AuthenticationMethodLdapProperties.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/AuthenticationMethodLdapProperties.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// Ldap authentication method properties. This feature is in preview. /// -public partial class AuthenticationMethodLdapProperties : ProvisioningConstruct +public partial class AuthenticationMethodLdapProperties : ProvisionableConstruct { /// /// Hostname of the LDAP server. diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/AutoscaleSettingsResourceInfo.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/AutoscaleSettingsResourceInfo.cs index a4b0b235b372..0a0cc9de0cb6 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/AutoscaleSettingsResourceInfo.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/AutoscaleSettingsResourceInfo.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// Cosmos DB provisioned throughput settings object. /// -public partial class AutoscaleSettingsResourceInfo : ProvisioningConstruct +public partial class AutoscaleSettingsResourceInfo : ProvisionableConstruct { /// /// Represents maximum throughput container can scale up to. diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/BackupPolicyMigrationState.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/BackupPolicyMigrationState.cs index 4c0584d8ec63..24abf9836b8a 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/BackupPolicyMigrationState.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/BackupPolicyMigrationState.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.CosmosDB; /// The object representing the state of the migration between the backup /// policies. /// -public partial class BackupPolicyMigrationState : ProvisioningConstruct +public partial class BackupPolicyMigrationState : ProvisionableConstruct { /// /// Describes the status of migration between backup policy types. diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CassandraCertificate.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CassandraCertificate.cs index 9bac0d25cf60..90fdd3b72843 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CassandraCertificate.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CassandraCertificate.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// The CassandraCertificate. /// -public partial class CassandraCertificate : ProvisioningConstruct +public partial class CassandraCertificate : ProvisionableConstruct { /// /// PEM formatted public key. diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CassandraClusterBackupSchedule.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CassandraClusterBackupSchedule.cs index fa63c8012136..1bd72483ca23 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CassandraClusterBackupSchedule.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CassandraClusterBackupSchedule.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// The CassandraClusterBackupSchedule. /// -public partial class CassandraClusterBackupSchedule : ProvisioningConstruct +public partial class CassandraClusterBackupSchedule : ProvisionableConstruct { /// /// The unique identifier of backup schedule. diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CassandraClusterKey.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CassandraClusterKey.cs index a958ccdf058c..73b732b2235f 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CassandraClusterKey.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CassandraClusterKey.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// Cosmos DB Cassandra table cluster key. /// -public partial class CassandraClusterKey : ProvisioningConstruct +public partial class CassandraClusterKey : ProvisionableConstruct { /// /// Name of the Cosmos DB Cassandra table cluster key. diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CassandraClusterProperties.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CassandraClusterProperties.cs index 77e0c2bc6242..dfda68f3c74c 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CassandraClusterProperties.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CassandraClusterProperties.cs @@ -13,7 +13,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// Properties of a managed Cassandra cluster. /// -public partial class CassandraClusterProperties : ProvisioningConstruct +public partial class CassandraClusterProperties : ProvisionableConstruct { /// /// The status of the resource at the time the operation was called. diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CassandraColumn.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CassandraColumn.cs index f3d918c77b0c..4a48e42a583b 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CassandraColumn.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CassandraColumn.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// Cosmos DB Cassandra table column. /// -public partial class CassandraColumn : ProvisioningConstruct +public partial class CassandraColumn : ProvisionableConstruct { /// /// Name of the Cosmos DB Cassandra table column. diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CassandraDataCenterProperties.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CassandraDataCenterProperties.cs index 4e6245634c6b..0ffc8da2607c 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CassandraDataCenterProperties.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CassandraDataCenterProperties.cs @@ -13,7 +13,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// Properties of a managed Cassandra data center. /// -public partial class CassandraDataCenterProperties : ProvisioningConstruct +public partial class CassandraDataCenterProperties : ProvisionableConstruct { /// /// The status of the resource at the time the operation was called. diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CassandraDataCenterSeedNode.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CassandraDataCenterSeedNode.cs index ce5b8abb175c..e22b05f4060b 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CassandraDataCenterSeedNode.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CassandraDataCenterSeedNode.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// The CassandraDataCenterSeedNode. /// -public partial class CassandraDataCenterSeedNode : ProvisioningConstruct +public partial class CassandraDataCenterSeedNode : ProvisionableConstruct { /// /// IP address of this seed node. diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CassandraError.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CassandraError.cs index bdbc44130c0e..2924b574b667 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CassandraError.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CassandraError.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// The CassandraError. /// -public partial class CassandraError : ProvisioningConstruct +public partial class CassandraError : ProvisionableConstruct { /// /// The code of error that occurred. diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CassandraKeyspacePropertiesConfig.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CassandraKeyspacePropertiesConfig.cs index b1e44b5c973d..30f328280eb1 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CassandraKeyspacePropertiesConfig.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CassandraKeyspacePropertiesConfig.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// The CassandraKeyspacePropertiesConfig. /// -public partial class CassandraKeyspacePropertiesConfig : ProvisioningConstruct +public partial class CassandraKeyspacePropertiesConfig : ProvisionableConstruct { /// /// Value of the Cosmos DB resource throughput or autoscaleSettings. Use diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CassandraPartitionKey.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CassandraPartitionKey.cs index b89aa8623405..7289d392136f 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CassandraPartitionKey.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CassandraPartitionKey.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// Cosmos DB Cassandra table partition key. /// -public partial class CassandraPartitionKey : ProvisioningConstruct +public partial class CassandraPartitionKey : ProvisionableConstruct { /// /// Name of the Cosmos DB Cassandra table partition key. diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CassandraSchema.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CassandraSchema.cs index 3641b024afce..4ba90d054fc3 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CassandraSchema.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CassandraSchema.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// Cosmos DB Cassandra table schema. /// -public partial class CassandraSchema : ProvisioningConstruct +public partial class CassandraSchema : ProvisionableConstruct { /// /// List of Cassandra table columns. diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CassandraTablePropertiesConfig.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CassandraTablePropertiesConfig.cs index 7fcfc7ac083f..62e814728d6a 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CassandraTablePropertiesConfig.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CassandraTablePropertiesConfig.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// The CassandraTablePropertiesConfig. /// -public partial class CassandraTablePropertiesConfig : ProvisioningConstruct +public partial class CassandraTablePropertiesConfig : ProvisionableConstruct { /// /// Value of the Cosmos DB resource throughput or autoscaleSettings. Use diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CassandraTableResourceInfo.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CassandraTableResourceInfo.cs index cd126ba8edec..86e75aba57f7 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CassandraTableResourceInfo.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CassandraTableResourceInfo.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// Cosmos DB Cassandra table resource object. /// -public partial class CassandraTableResourceInfo : ProvisioningConstruct +public partial class CassandraTableResourceInfo : ProvisionableConstruct { /// /// Name of the Cosmos DB Cassandra table. diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CassandraViewGetPropertiesOptions.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CassandraViewGetPropertiesOptions.cs index a4f47228da49..ee9718856ca7 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CassandraViewGetPropertiesOptions.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CassandraViewGetPropertiesOptions.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// The CassandraViewGetPropertiesOptions. /// -public partial class CassandraViewGetPropertiesOptions : ProvisioningConstruct +public partial class CassandraViewGetPropertiesOptions : ProvisionableConstruct { /// /// Value of the Cosmos DB resource throughput or autoscaleSettings. Use diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CassandraViewResource.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CassandraViewResource.cs index 45c88d307022..6e5cd183afde 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CassandraViewResource.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CassandraViewResource.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// Cosmos DB Cassandra view resource object. /// -public partial class CassandraViewResource : ProvisioningConstruct +public partial class CassandraViewResource : ProvisionableConstruct { /// /// Name of the Cosmos DB Cassandra view. diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/ComputedProperty.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/ComputedProperty.cs index 0f7542c9ea90..5be12ea6e30f 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/ComputedProperty.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/ComputedProperty.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// The definition of a computed property. /// -public partial class ComputedProperty : ProvisioningConstruct +public partial class ComputedProperty : ProvisionableConstruct { /// /// The name of a computed property, for example - "cp_lowerName". diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/ConflictResolutionPolicy.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/ConflictResolutionPolicy.cs index 8d899a82deca..5f39fe53be07 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/ConflictResolutionPolicy.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/ConflictResolutionPolicy.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// The conflict resolution policy for the container. /// -public partial class ConflictResolutionPolicy : ProvisioningConstruct +public partial class ConflictResolutionPolicy : ProvisionableConstruct { /// /// Indicates the conflict resolution mode. diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/ConsistencyPolicy.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/ConsistencyPolicy.cs index f0890d8e8406..79e8755530be 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/ConsistencyPolicy.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/ConsistencyPolicy.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// The consistency policy for the Cosmos DB database account. /// -public partial class ConsistencyPolicy : ProvisioningConstruct +public partial class ConsistencyPolicy : ProvisionableConstruct { /// /// The default consistency level and configuration settings of the Cosmos diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBAccountBackupPolicy.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBAccountBackupPolicy.cs index a516548588d8..06e74313cf6e 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBAccountBackupPolicy.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBAccountBackupPolicy.cs @@ -18,7 +18,7 @@ namespace Azure.Provisioning.CosmosDB; /// include Azure.ResourceManager.CosmosDB.Models.ContinuousModeBackupPolicy /// and Azure.ResourceManager.CosmosDB.Models.PeriodicModeBackupPolicy. /// -public partial class CosmosDBAccountBackupPolicy : ProvisioningConstruct +public partial class CosmosDBAccountBackupPolicy : ProvisionableConstruct { /// /// The object representing the state of the migration between the backup diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBAccountCapability.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBAccountCapability.cs index 35ede6548477..91a8ca735ffa 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBAccountCapability.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBAccountCapability.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// Cosmos DB capability object. /// -public partial class CosmosDBAccountCapability : ProvisioningConstruct +public partial class CosmosDBAccountCapability : ProvisionableConstruct { /// /// Name of the Cosmos DB capability. For example, "name": diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBAccountCorsPolicy.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBAccountCorsPolicy.cs index f3b624ddf52c..5a9f4396e0db 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBAccountCorsPolicy.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBAccountCorsPolicy.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// The CORS policy for the Cosmos DB database account. /// -public partial class CosmosDBAccountCorsPolicy : ProvisioningConstruct +public partial class CosmosDBAccountCorsPolicy : ProvisionableConstruct { /// /// The origin domains that are permitted to make a request against the diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBAccountKeyList.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBAccountKeyList.cs index 9a98aa10954f..529d8f7b7dab 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBAccountKeyList.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBAccountKeyList.cs @@ -13,7 +13,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// The access keys for the given database account. /// -public partial class CosmosDBAccountKeyList : ProvisioningConstruct +public partial class CosmosDBAccountKeyList : ProvisionableConstruct { /// /// Base 64 encoded value of the primary read-write key. @@ -59,7 +59,7 @@ public CosmosDBAccountKeyList() /// /// A CosmosDBAccountKeyList resource. [EditorBrowsable(EditorBrowsableState.Never)] - public static CosmosDBAccountKeyList FromExpression(Expression expression) + public static CosmosDBAccountKeyList FromExpression(BicepExpression expression) { CosmosDBAccountKeyList resource = new(); resource.OverrideWithExpression(expression); diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBAccountLocation.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBAccountLocation.cs index 94d43aeb370b..25160ac45c16 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBAccountLocation.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBAccountLocation.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// A region in which the Azure Cosmos DB database account is deployed. /// -public partial class CosmosDBAccountLocation : ProvisioningConstruct +public partial class CosmosDBAccountLocation : ProvisionableConstruct { /// /// The unique identifier of the region within the database account. diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBAccountRestoreParameters.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBAccountRestoreParameters.cs index 2cffa34897bb..700d1bcea75f 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBAccountRestoreParameters.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBAccountRestoreParameters.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// Parameters to indicate the information about the restore. /// -public partial class CosmosDBAccountRestoreParameters : ProvisioningConstruct +public partial class CosmosDBAccountRestoreParameters : ProvisionableConstruct { /// /// Describes the mode of the restore. diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBClientEncryptionIncludedPath.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBClientEncryptionIncludedPath.cs index 761da75e5f35..8fc2bc349082 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBClientEncryptionIncludedPath.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBClientEncryptionIncludedPath.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// . /// -public partial class CosmosDBClientEncryptionIncludedPath : ProvisioningConstruct +public partial class CosmosDBClientEncryptionIncludedPath : ProvisionableConstruct { /// /// Path that needs to be encrypted. diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBClientEncryptionPolicy.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBClientEncryptionPolicy.cs index 2ab6478905df..e513aabf055e 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBClientEncryptionPolicy.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBClientEncryptionPolicy.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// Cosmos DB client encryption policy. /// -public partial class CosmosDBClientEncryptionPolicy : ProvisioningConstruct +public partial class CosmosDBClientEncryptionPolicy : ProvisionableConstruct { /// /// Paths of the item that need encryption along with path-specific diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBCompositePath.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBCompositePath.cs index 9eff4d9b7391..e36f7270df8e 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBCompositePath.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBCompositePath.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// The CosmosDBCompositePath. /// -public partial class CosmosDBCompositePath : ProvisioningConstruct +public partial class CosmosDBCompositePath : ProvisionableConstruct { /// /// The path for which the indexing behavior applies to. Index paths diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBContainerPartitionKey.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBContainerPartitionKey.cs index 6b9a0450228e..32075a8430f7 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBContainerPartitionKey.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBContainerPartitionKey.cs @@ -13,7 +13,7 @@ namespace Azure.Provisioning.CosmosDB; /// The configuration of the partition key to be used for partitioning data /// into multiple partitions. /// -public partial class CosmosDBContainerPartitionKey : ProvisioningConstruct +public partial class CosmosDBContainerPartitionKey : ProvisionableConstruct { /// /// List of paths using which data within the container can be partitioned. diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBCreateUpdateConfig.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBCreateUpdateConfig.cs index 3411c0ae6f4b..83781485cca3 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBCreateUpdateConfig.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBCreateUpdateConfig.cs @@ -14,7 +14,7 @@ namespace Azure.Provisioning.CosmosDB; /// "If-None-Match", "Session-Token" and /// "Throughput". /// -public partial class CosmosDBCreateUpdateConfig : ProvisioningConstruct +public partial class CosmosDBCreateUpdateConfig : ProvisionableConstruct { /// /// Request Units per second. For example, "throughput": 10000. diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBExcludedPath.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBExcludedPath.cs index 8c6224e15caa..cb28913577a6 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBExcludedPath.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBExcludedPath.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// The CosmosDBExcludedPath. /// -public partial class CosmosDBExcludedPath : ProvisioningConstruct +public partial class CosmosDBExcludedPath : ProvisionableConstruct { /// /// The path for which the indexing behavior applies to. Index paths diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBFailoverPolicy.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBFailoverPolicy.cs index f713dc3839be..0985dbc8ada7 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBFailoverPolicy.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBFailoverPolicy.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// The failover policy for a given region of a database account. /// -public partial class CosmosDBFailoverPolicy : ProvisioningConstruct +public partial class CosmosDBFailoverPolicy : ProvisionableConstruct { /// /// The unique identifier of the region in which the database account diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBIPAddressOrRange.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBIPAddressOrRange.cs index 8ae8394b1085..3722f40fc915 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBIPAddressOrRange.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBIPAddressOrRange.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// IpAddressOrRange object. /// -public partial class CosmosDBIPAddressOrRange : ProvisioningConstruct +public partial class CosmosDBIPAddressOrRange : ProvisionableConstruct { /// /// A single IPv4 address or a single IPv4 address range in CIDR format. diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBIncludedPath.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBIncludedPath.cs index d91213313244..9636b5f8d1b1 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBIncludedPath.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBIncludedPath.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// The paths that are included in indexing. /// -public partial class CosmosDBIncludedPath : ProvisioningConstruct +public partial class CosmosDBIncludedPath : ProvisionableConstruct { /// /// The path for which the indexing behavior applies to. Index paths diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBIndexingPolicy.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBIndexingPolicy.cs index 041f38b9d45b..9fee8d99870d 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBIndexingPolicy.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBIndexingPolicy.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// Cosmos DB indexing policy. /// -public partial class CosmosDBIndexingPolicy : ProvisioningConstruct +public partial class CosmosDBIndexingPolicy : ProvisionableConstruct { /// /// Indicates if the indexing policy is automatic. diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBKeyWrapMetadata.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBKeyWrapMetadata.cs index b6771a0df929..2ad3b4b8243a 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBKeyWrapMetadata.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBKeyWrapMetadata.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.CosmosDB; /// Represents key wrap metadata that a key wrapping provider can use to /// wrap/unwrap a client encryption key. /// -public partial class CosmosDBKeyWrapMetadata : ProvisioningConstruct +public partial class CosmosDBKeyWrapMetadata : ProvisionableConstruct { /// /// The name of associated KeyEncryptionKey (aka CustomerManagedKey). diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBPathIndexes.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBPathIndexes.cs index 2e5398a4275d..3068fb0fbe65 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBPathIndexes.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBPathIndexes.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// The indexes for the path. /// -public partial class CosmosDBPathIndexes : ProvisioningConstruct +public partial class CosmosDBPathIndexes : ProvisionableConstruct { /// /// The datatype for which the indexing behavior is applied to. diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBPrivateEndpointConnectionData.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBPrivateEndpointConnectionData.cs index 8aaff99ad34a..2dee10b20983 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBPrivateEndpointConnectionData.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBPrivateEndpointConnectionData.cs @@ -14,7 +14,7 @@ namespace Azure.Provisioning.CosmosDB; /// A class representing the CosmosDBPrivateEndpointConnection data model. /// A private endpoint connection /// -public partial class CosmosDBPrivateEndpointConnectionData : ProvisioningConstruct +public partial class CosmosDBPrivateEndpointConnectionData : ProvisionableConstruct { /// /// Resource id of the private endpoint. diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBPrivateLinkServiceConnectionStateProperty.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBPrivateLinkServiceConnectionStateProperty.cs index 0726dd59ce94..5573e35c3557 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBPrivateLinkServiceConnectionStateProperty.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBPrivateLinkServiceConnectionStateProperty.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// Connection State of the Private Endpoint Connection. /// -public partial class CosmosDBPrivateLinkServiceConnectionStateProperty : ProvisioningConstruct +public partial class CosmosDBPrivateLinkServiceConnectionStateProperty : ProvisionableConstruct { /// /// The private link service connection status. diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBServiceProperties.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBServiceProperties.cs index 0767a9d75001..9ca7c96b9848 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBServiceProperties.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBServiceProperties.cs @@ -22,7 +22,7 @@ namespace Azure.Provisioning.CosmosDB; /// and /// Azure.ResourceManager.CosmosDB.Models.SqlDedicatedGatewayServiceProperties. /// -public partial class CosmosDBServiceProperties : ProvisioningConstruct +public partial class CosmosDBServiceProperties : ProvisionableConstruct { /// /// Time of the last state change (ISO-8601 format). diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBSqlClientEncryptionKeyResourceInfo.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBSqlClientEncryptionKeyResourceInfo.cs index 109e0e660e2d..18c6c728fdc9 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBSqlClientEncryptionKeyResourceInfo.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBSqlClientEncryptionKeyResourceInfo.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// Cosmos DB client encryption key resource object. /// -public partial class CosmosDBSqlClientEncryptionKeyResourceInfo : ProvisioningConstruct +public partial class CosmosDBSqlClientEncryptionKeyResourceInfo : ProvisionableConstruct { /// /// Name of the ClientEncryptionKey. diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBSqlContainerPropertiesConfig.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBSqlContainerPropertiesConfig.cs index f4e74a0514d8..5ee65c100f3b 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBSqlContainerPropertiesConfig.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBSqlContainerPropertiesConfig.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// The CosmosDBSqlContainerPropertiesConfig. /// -public partial class CosmosDBSqlContainerPropertiesConfig : ProvisioningConstruct +public partial class CosmosDBSqlContainerPropertiesConfig : ProvisionableConstruct { /// /// Value of the Cosmos DB resource throughput or autoscaleSettings. Use diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBSqlContainerResourceInfo.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBSqlContainerResourceInfo.cs index b27118966465..84dbd3d1b06b 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBSqlContainerResourceInfo.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBSqlContainerResourceInfo.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// Cosmos DB SQL container resource object. /// -public partial class CosmosDBSqlContainerResourceInfo : ProvisioningConstruct +public partial class CosmosDBSqlContainerResourceInfo : ProvisionableConstruct { /// /// Name of the Cosmos DB SQL container. diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBSqlDatabasePropertiesConfig.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBSqlDatabasePropertiesConfig.cs index d3cd014963bd..a4517e4a4272 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBSqlDatabasePropertiesConfig.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBSqlDatabasePropertiesConfig.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// The CosmosDBSqlDatabasePropertiesConfig. /// -public partial class CosmosDBSqlDatabasePropertiesConfig : ProvisioningConstruct +public partial class CosmosDBSqlDatabasePropertiesConfig : ProvisionableConstruct { /// /// Value of the Cosmos DB resource throughput or autoscaleSettings. Use diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBSqlDatabaseResourceInfo.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBSqlDatabaseResourceInfo.cs index 5c9c1fd9ee70..ad10c1ccb76a 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBSqlDatabaseResourceInfo.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBSqlDatabaseResourceInfo.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// Cosmos DB SQL database resource object. /// -public partial class CosmosDBSqlDatabaseResourceInfo : ProvisioningConstruct +public partial class CosmosDBSqlDatabaseResourceInfo : ProvisionableConstruct { /// /// Name of the Cosmos DB SQL database. diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBSqlRolePermission.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBSqlRolePermission.cs index 128261822a43..5f9eabb9f910 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBSqlRolePermission.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBSqlRolePermission.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// The set of data plane operations permitted through this Role Definition. /// -public partial class CosmosDBSqlRolePermission : ProvisioningConstruct +public partial class CosmosDBSqlRolePermission : ProvisionableConstruct { /// /// An array of data actions that are allowed. diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBSqlStoredProcedureResourceInfo.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBSqlStoredProcedureResourceInfo.cs index 056abd270119..328069666bcd 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBSqlStoredProcedureResourceInfo.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBSqlStoredProcedureResourceInfo.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// Cosmos DB SQL storedProcedure resource object. /// -public partial class CosmosDBSqlStoredProcedureResourceInfo : ProvisioningConstruct +public partial class CosmosDBSqlStoredProcedureResourceInfo : ProvisionableConstruct { /// /// Name of the Cosmos DB SQL storedProcedure. diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBSqlTriggerResourceInfo.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBSqlTriggerResourceInfo.cs index 3c8f2f259633..4bbc39945c97 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBSqlTriggerResourceInfo.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBSqlTriggerResourceInfo.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// Cosmos DB SQL trigger resource object. /// -public partial class CosmosDBSqlTriggerResourceInfo : ProvisioningConstruct +public partial class CosmosDBSqlTriggerResourceInfo : ProvisionableConstruct { /// /// Name of the Cosmos DB SQL trigger. diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBSqlUserDefinedFunctionResourceInfo.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBSqlUserDefinedFunctionResourceInfo.cs index 31f2b37f0a1b..20879b3815d8 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBSqlUserDefinedFunctionResourceInfo.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBSqlUserDefinedFunctionResourceInfo.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// Cosmos DB SQL userDefinedFunction resource object. /// -public partial class CosmosDBSqlUserDefinedFunctionResourceInfo : ProvisioningConstruct +public partial class CosmosDBSqlUserDefinedFunctionResourceInfo : ProvisionableConstruct { /// /// Name of the Cosmos DB SQL userDefinedFunction. diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBTablePropertiesOptions.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBTablePropertiesOptions.cs index 5b62466a7855..9d82aaef3642 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBTablePropertiesOptions.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBTablePropertiesOptions.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// The CosmosDBTablePropertiesOptions. /// -public partial class CosmosDBTablePropertiesOptions : ProvisioningConstruct +public partial class CosmosDBTablePropertiesOptions : ProvisionableConstruct { /// /// Value of the Cosmos DB resource throughput or autoscaleSettings. Use diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBTableResourceInfo.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBTableResourceInfo.cs index 000f1d5af6bb..ff6e082eceb7 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBTableResourceInfo.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBTableResourceInfo.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// Cosmos DB table resource object. /// -public partial class CosmosDBTableResourceInfo : ProvisioningConstruct +public partial class CosmosDBTableResourceInfo : ProvisionableConstruct { /// /// Name of the Cosmos DB table. diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBUniqueKey.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBUniqueKey.cs index 863210375fdd..8cc601b6f410 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBUniqueKey.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBUniqueKey.cs @@ -13,7 +13,7 @@ namespace Azure.Provisioning.CosmosDB; /// The unique key on that enforces uniqueness constraint on documents in the /// collection in the Azure Cosmos DB service. /// -public partial class CosmosDBUniqueKey : ProvisioningConstruct +public partial class CosmosDBUniqueKey : ProvisionableConstruct { /// /// List of paths must be unique for each document in the Azure Cosmos DB diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBVirtualNetworkRule.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBVirtualNetworkRule.cs index 8e2724c0175a..49ec88606c1c 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBVirtualNetworkRule.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/CosmosDBVirtualNetworkRule.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// Virtual Network ACL Rule object. /// -public partial class CosmosDBVirtualNetworkRule : ProvisioningConstruct +public partial class CosmosDBVirtualNetworkRule : ProvisionableConstruct { /// /// Resource ID of a subnet, for example: diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/DataTransferDataSourceSink.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/DataTransferDataSourceSink.cs index d555e397496f..90d0f21a2468 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/DataTransferDataSourceSink.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/DataTransferDataSourceSink.cs @@ -21,7 +21,7 @@ namespace Azure.Provisioning.CosmosDB; /// and /// Azure.ResourceManager.CosmosDB.Models.CosmosSqlDataTransferDataSourceSink. /// -public partial class DataTransferDataSourceSink : ProvisioningConstruct +public partial class DataTransferDataSourceSink : ProvisionableConstruct { /// /// Creates a new DataTransferDataSourceSink. diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/DataTransferJobProperties.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/DataTransferJobProperties.cs index ebd98ef99f34..a3b9e1703697 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/DataTransferJobProperties.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/DataTransferJobProperties.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// The properties of a DataTransfer Job. /// -public partial class DataTransferJobProperties : ProvisioningConstruct +public partial class DataTransferJobProperties : ProvisionableConstruct { /// /// Job Name. diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/DataTransferRegionalService.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/DataTransferRegionalService.cs index 607126df3172..dba511282280 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/DataTransferRegionalService.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/DataTransferRegionalService.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// Resource for a regional service location. /// -public partial class DataTransferRegionalService : ProvisioningConstruct +public partial class DataTransferRegionalService : ProvisionableConstruct { /// /// The regional service name. diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/DatabaseAccountKeysMetadata.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/DatabaseAccountKeysMetadata.cs index 88f202e5f387..1dfada5d3cb4 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/DatabaseAccountKeysMetadata.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/DatabaseAccountKeysMetadata.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.CosmosDB; /// The metadata related to each access key for the given Cosmos DB database /// account. /// -public partial class DatabaseAccountKeysMetadata : ProvisioningConstruct +public partial class DatabaseAccountKeysMetadata : ProvisionableConstruct { /// /// Generation time in UTC of the key in ISO-8601 format. If the value is diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/DatabaseRestoreResourceInfo.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/DatabaseRestoreResourceInfo.cs index 2cf82662035b..9b2cf7aed760 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/DatabaseRestoreResourceInfo.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/DatabaseRestoreResourceInfo.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// Specific Databases to restore. /// -public partial class DatabaseRestoreResourceInfo : ProvisioningConstruct +public partial class DatabaseRestoreResourceInfo : ProvisionableConstruct { /// /// The name of the database available for restore. diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/ErrorResponse.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/ErrorResponse.cs index 845e911aa231..0f95887dd2f6 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/ErrorResponse.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/ErrorResponse.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// Error Response. /// -public partial class ErrorResponse : ProvisioningConstruct +public partial class ErrorResponse : ProvisionableConstruct { /// /// Error code. diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/ExtendedCassandraKeyspaceResourceInfo.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/ExtendedCassandraKeyspaceResourceInfo.cs index 55ede73a9c8b..5662dc99e02d 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/ExtendedCassandraKeyspaceResourceInfo.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/ExtendedCassandraKeyspaceResourceInfo.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// The ExtendedCassandraKeyspaceResourceInfo. /// -public partial class ExtendedCassandraKeyspaceResourceInfo : ProvisioningConstruct +public partial class ExtendedCassandraKeyspaceResourceInfo : ProvisionableConstruct { /// /// A system generated property. A unique identifier. diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/GraphApiComputeRegionalService.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/GraphApiComputeRegionalService.cs index d18e5896d37d..e619dd30e296 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/GraphApiComputeRegionalService.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/GraphApiComputeRegionalService.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// Resource for a regional service location. /// -public partial class GraphApiComputeRegionalService : ProvisioningConstruct +public partial class GraphApiComputeRegionalService : ProvisionableConstruct { /// /// The regional endpoint for GraphAPICompute. diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/GraphResourceGetPropertiesOptions.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/GraphResourceGetPropertiesOptions.cs index 63a397adb40c..05a3101d4481 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/GraphResourceGetPropertiesOptions.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/GraphResourceGetPropertiesOptions.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// The GraphResourceGetPropertiesOptions. /// -public partial class GraphResourceGetPropertiesOptions : ProvisioningConstruct +public partial class GraphResourceGetPropertiesOptions : ProvisionableConstruct { /// /// Value of the Cosmos DB resource throughput or autoscaleSettings. Use diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/GremlinDatabasePropertiesConfig.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/GremlinDatabasePropertiesConfig.cs index 945764d79691..f25be08ab62e 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/GremlinDatabasePropertiesConfig.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/GremlinDatabasePropertiesConfig.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// The GremlinDatabasePropertiesConfig. /// -public partial class GremlinDatabasePropertiesConfig : ProvisioningConstruct +public partial class GremlinDatabasePropertiesConfig : ProvisionableConstruct { /// /// Value of the Cosmos DB resource throughput or autoscaleSettings. Use diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/GremlinDatabaseResourceInfo.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/GremlinDatabaseResourceInfo.cs index 42a9e9633b73..95741a52ba35 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/GremlinDatabaseResourceInfo.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/GremlinDatabaseResourceInfo.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// Cosmos DB Gremlin database resource object. /// -public partial class GremlinDatabaseResourceInfo : ProvisioningConstruct +public partial class GremlinDatabaseResourceInfo : ProvisionableConstruct { /// /// Name of the Cosmos DB Gremlin database. diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/GremlinDatabaseRestoreResourceInfo.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/GremlinDatabaseRestoreResourceInfo.cs index 7ba6331de117..036ff9b51a27 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/GremlinDatabaseRestoreResourceInfo.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/GremlinDatabaseRestoreResourceInfo.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// Specific Gremlin Databases to restore. /// -public partial class GremlinDatabaseRestoreResourceInfo : ProvisioningConstruct +public partial class GremlinDatabaseRestoreResourceInfo : ProvisionableConstruct { /// /// The name of the gremlin database available for restore. diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/GremlinGraphPropertiesConfig.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/GremlinGraphPropertiesConfig.cs index b6ccfacba04d..d2baf3b13436 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/GremlinGraphPropertiesConfig.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/GremlinGraphPropertiesConfig.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// The GremlinGraphPropertiesConfig. /// -public partial class GremlinGraphPropertiesConfig : ProvisioningConstruct +public partial class GremlinGraphPropertiesConfig : ProvisionableConstruct { /// /// Value of the Cosmos DB resource throughput or autoscaleSettings. Use diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/GremlinGraphResourceInfo.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/GremlinGraphResourceInfo.cs index b59ccef46cbc..69c8d62282de 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/GremlinGraphResourceInfo.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/GremlinGraphResourceInfo.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// Cosmos DB Gremlin graph resource object. /// -public partial class GremlinGraphResourceInfo : ProvisioningConstruct +public partial class GremlinGraphResourceInfo : ProvisionableConstruct { /// /// Name of the Cosmos DB Gremlin graph. diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/MaterializedViewDefinition.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/MaterializedViewDefinition.cs index ce93f40a5ebf..762b5c81aa31 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/MaterializedViewDefinition.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/MaterializedViewDefinition.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// Materialized View definition for the container. /// -public partial class MaterializedViewDefinition : ProvisioningConstruct +public partial class MaterializedViewDefinition : ProvisionableConstruct { /// /// An unique identifier for the source collection. This is a system diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/MaterializedViewsBuilderRegionalService.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/MaterializedViewsBuilderRegionalService.cs index 7023435955f7..6b1961b93cc3 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/MaterializedViewsBuilderRegionalService.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/MaterializedViewsBuilderRegionalService.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// Resource for a regional service location. /// -public partial class MaterializedViewsBuilderRegionalService : ProvisioningConstruct +public partial class MaterializedViewsBuilderRegionalService : ProvisionableConstruct { /// /// The regional service name. diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/MongoClusterRestoreParameters.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/MongoClusterRestoreParameters.cs index 6d0b0ccd0daf..0f30481f3de2 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/MongoClusterRestoreParameters.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/MongoClusterRestoreParameters.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// Parameters used for restore operations. /// -public partial class MongoClusterRestoreParameters : ProvisioningConstruct +public partial class MongoClusterRestoreParameters : ProvisionableConstruct { /// /// UTC point in time to restore a mongo cluster. diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/MongoDBCollectionPropertiesConfig.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/MongoDBCollectionPropertiesConfig.cs index a536b11d7fcf..ca1d8a83d8e6 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/MongoDBCollectionPropertiesConfig.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/MongoDBCollectionPropertiesConfig.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// The MongoDBCollectionPropertiesConfig. /// -public partial class MongoDBCollectionPropertiesConfig : ProvisioningConstruct +public partial class MongoDBCollectionPropertiesConfig : ProvisionableConstruct { /// /// Value of the Cosmos DB resource throughput or autoscaleSettings. Use diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/MongoDBCollectionResourceInfo.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/MongoDBCollectionResourceInfo.cs index da2c7c32afb4..f849f77b1c0a 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/MongoDBCollectionResourceInfo.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/MongoDBCollectionResourceInfo.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// Cosmos DB MongoDB collection resource object. /// -public partial class MongoDBCollectionResourceInfo : ProvisioningConstruct +public partial class MongoDBCollectionResourceInfo : ProvisionableConstruct { /// /// Name of the Cosmos DB MongoDB collection. diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/MongoDBDatabasePropertiesConfig.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/MongoDBDatabasePropertiesConfig.cs index cd97e7b8b6d8..5ae32bff6542 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/MongoDBDatabasePropertiesConfig.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/MongoDBDatabasePropertiesConfig.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// The MongoDBDatabasePropertiesConfig. /// -public partial class MongoDBDatabasePropertiesConfig : ProvisioningConstruct +public partial class MongoDBDatabasePropertiesConfig : ProvisionableConstruct { /// /// Value of the Cosmos DB resource throughput or autoscaleSettings. Use diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/MongoDBDatabaseResourceInfo.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/MongoDBDatabaseResourceInfo.cs index fafe0a67267c..3014ee2c1f8c 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/MongoDBDatabaseResourceInfo.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/MongoDBDatabaseResourceInfo.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// Cosmos DB MongoDB database resource object. /// -public partial class MongoDBDatabaseResourceInfo : ProvisioningConstruct +public partial class MongoDBDatabaseResourceInfo : ProvisionableConstruct { /// /// Name of the Cosmos DB MongoDB database. diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/MongoDBIndex.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/MongoDBIndex.cs index e148adfc1c30..4f53b76b2218 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/MongoDBIndex.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/MongoDBIndex.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// Cosmos DB MongoDB collection index key. /// -public partial class MongoDBIndex : ProvisioningConstruct +public partial class MongoDBIndex : ProvisionableConstruct { /// /// List of keys for each MongoDB collection in the Azure Cosmos DB service. diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/MongoDBIndexConfig.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/MongoDBIndexConfig.cs index 933ab331cfce..4390058cae94 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/MongoDBIndexConfig.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/MongoDBIndexConfig.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// Cosmos DB MongoDB collection index options. /// -public partial class MongoDBIndexConfig : ProvisioningConstruct +public partial class MongoDBIndexConfig : ProvisionableConstruct { /// /// Expire after seconds. diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/MongoDBPrivilege.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/MongoDBPrivilege.cs index a4ac84961dac..3543b402952a 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/MongoDBPrivilege.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/MongoDBPrivilege.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// The set of data plane operations permitted through this Role Definition. /// -public partial class MongoDBPrivilege : ProvisioningConstruct +public partial class MongoDBPrivilege : ProvisionableConstruct { /// /// An Azure Cosmos DB Mongo DB Resource. diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/MongoDBPrivilegeResourceInfo.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/MongoDBPrivilegeResourceInfo.cs index afc8ceda3652..dc876b2df1ff 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/MongoDBPrivilegeResourceInfo.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/MongoDBPrivilegeResourceInfo.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// An Azure Cosmos DB Mongo DB Resource. /// -public partial class MongoDBPrivilegeResourceInfo : ProvisioningConstruct +public partial class MongoDBPrivilegeResourceInfo : ProvisionableConstruct { /// /// The database name the role is applied. diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/MongoDBRole.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/MongoDBRole.cs index bad32160864f..484eae84b40e 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/MongoDBRole.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/MongoDBRole.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// The set of roles permitted through this Role Definition. /// -public partial class MongoDBRole : ProvisioningConstruct +public partial class MongoDBRole : ProvisionableConstruct { /// /// The database name the role is applied. diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/NodeGroupSpec.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/NodeGroupSpec.cs index 09a7b39b3d95..556c94384099 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/NodeGroupSpec.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/NodeGroupSpec.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// Specification for a node group. /// -public partial class NodeGroupSpec : ProvisioningConstruct +public partial class NodeGroupSpec : ProvisionableConstruct { /// /// The node type deployed in the node group. diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/PeriodicModeProperties.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/PeriodicModeProperties.cs index 86b824089c9d..e0d55748968a 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/PeriodicModeProperties.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/PeriodicModeProperties.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// Configuration values for periodic mode backup. /// -public partial class PeriodicModeProperties : ProvisioningConstruct +public partial class PeriodicModeProperties : ProvisionableConstruct { /// /// An integer representing the interval in minutes between two backups. diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/ResourceRestoreParameters.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/ResourceRestoreParameters.cs index b5630726dd5a..e5a3d9943698 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/ResourceRestoreParameters.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/ResourceRestoreParameters.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// Parameters to indicate the information about the restore. /// -public partial class ResourceRestoreParameters : ProvisioningConstruct +public partial class ResourceRestoreParameters : ProvisionableConstruct { /// /// The id of the restorable database account from which the restore has to diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/SpatialSpec.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/SpatialSpec.cs index f541cb495b2e..76f18bae2b2f 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/SpatialSpec.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/SpatialSpec.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// The SpatialSpec. /// -public partial class SpatialSpec : ProvisioningConstruct +public partial class SpatialSpec : ProvisionableConstruct { /// /// The path for which the indexing behavior applies to. Index paths diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/SqlDedicatedGatewayRegionalService.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/SqlDedicatedGatewayRegionalService.cs index 025e5cf78590..41508f4bd850 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/SqlDedicatedGatewayRegionalService.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/SqlDedicatedGatewayRegionalService.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// Resource for a regional service location. /// -public partial class SqlDedicatedGatewayRegionalService : ProvisioningConstruct +public partial class SqlDedicatedGatewayRegionalService : ProvisionableConstruct { /// /// The regional endpoint for SqlDedicatedGateway. diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/ThroughputPolicyResourceInfo.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/ThroughputPolicyResourceInfo.cs index b20e07cb0ae4..32e6fdd3ab97 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/ThroughputPolicyResourceInfo.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/ThroughputPolicyResourceInfo.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// Cosmos DB resource throughput policy. /// -public partial class ThroughputPolicyResourceInfo : ProvisioningConstruct +public partial class ThroughputPolicyResourceInfo : ProvisionableConstruct { /// /// Determines whether the ThroughputPolicy is active or not. diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/ThroughputSettingsResourceInfo.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/ThroughputSettingsResourceInfo.cs index 32f3092f29eb..d66a9c4fc5b9 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/ThroughputSettingsResourceInfo.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/Models/ThroughputSettingsResourceInfo.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.CosmosDB; /// Cosmos DB resource throughput object. Either throughput is required or /// autoscaleSettings is required, but not both. /// -public partial class ThroughputSettingsResourceInfo : ProvisioningConstruct +public partial class ThroughputSettingsResourceInfo : ProvisionableConstruct { /// /// Value of the Cosmos DB resource throughput. Either throughput is diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/MongoCluster.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/MongoCluster.cs index a605313e986a..e719f9e48235 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/MongoCluster.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/MongoCluster.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// MongoCluster. /// -public partial class MongoCluster : Resource +public partial class MongoCluster : ProvisionableResource { /// /// The name of the mongo cluster. @@ -112,15 +112,15 @@ public partial class MongoCluster : Resource /// /// Creates a new MongoCluster. /// - /// + /// /// The the Bicep identifier name of the MongoCluster resource. This can /// be used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and /// underscores. /// /// Version of the MongoCluster. - public MongoCluster(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.DocumentDB/mongoClusters", resourceVersion ?? "2024-07-01") + public MongoCluster(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.DocumentDB/mongoClusters", resourceVersion ?? "2024-07-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _location = BicepValue.DefineProperty(this, "Location", ["location"], isRequired: true); @@ -153,7 +153,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing MongoCluster. /// - /// + /// /// The the Bicep identifier name of the MongoCluster resource. This can /// be used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and @@ -161,6 +161,6 @@ public static class ResourceVersions /// /// Version of the MongoCluster. /// The existing MongoCluster resource. - public static MongoCluster FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static MongoCluster FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/MongoDBCollection.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/MongoDBCollection.cs index a37072420d8a..2767280f6d56 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/MongoDBCollection.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/MongoDBCollection.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// MongoDBCollection. /// -public partial class MongoDBCollection : Resource +public partial class MongoDBCollection : ProvisionableResource { /// /// Cosmos DB collection name. @@ -76,15 +76,15 @@ public partial class MongoDBCollection : Resource /// /// Creates a new MongoDBCollection. /// - /// + /// /// The the Bicep identifier name of the MongoDBCollection resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, /// and underscores. /// /// Version of the MongoDBCollection. - public MongoDBCollection(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/collections", resourceVersion ?? "2024-08-15") + public MongoDBCollection(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/collections", resourceVersion ?? "2024-08-15") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _location = BicepValue.DefineProperty(this, "Location", ["location"], isRequired: true); @@ -102,11 +102,6 @@ public MongoDBCollection(string identifierName, string? resourceVersion = defaul /// public static class ResourceVersions { - /// - /// 2024-09-01-preview. - /// - public static readonly string V2024_09_01_preview = "2024-09-01-preview"; - /// /// 2024-08-15. /// @@ -236,7 +231,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing MongoDBCollection. /// - /// + /// /// The the Bicep identifier name of the MongoDBCollection resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, @@ -244,6 +239,6 @@ public static class ResourceVersions /// /// Version of the MongoDBCollection. /// The existing MongoDBCollection resource. - public static MongoDBCollection FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static MongoDBCollection FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/MongoDBCollectionThroughputSetting.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/MongoDBCollectionThroughputSetting.cs index 6f90f7c90be4..a82267e1a3db 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/MongoDBCollectionThroughputSetting.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/MongoDBCollectionThroughputSetting.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// MongoDBCollectionThroughputSetting. /// -public partial class MongoDBCollectionThroughputSetting : Resource +public partial class MongoDBCollectionThroughputSetting : ProvisionableResource { /// /// Gets the Name. @@ -69,15 +69,15 @@ public partial class MongoDBCollectionThroughputSetting : Resource /// /// Creates a new MongoDBCollectionThroughputSetting. /// - /// + /// /// The the Bicep identifier name of the MongoDBCollectionThroughputSetting /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the MongoDBCollectionThroughputSetting. - public MongoDBCollectionThroughputSetting(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/collections/throughputSettings", resourceVersion ?? "2024-08-15") + public MongoDBCollectionThroughputSetting(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/collections/throughputSettings", resourceVersion ?? "2024-08-15") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _location = BicepValue.DefineProperty(this, "Location", ["location"], isRequired: true); @@ -94,11 +94,6 @@ public MongoDBCollectionThroughputSetting(string identifierName, string? resourc /// public static class ResourceVersions { - /// - /// 2024-09-01-preview. - /// - public static readonly string V2024_09_01_preview = "2024-09-01-preview"; - /// /// 2024-08-15. /// @@ -228,7 +223,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing MongoDBCollectionThroughputSetting. /// - /// + /// /// The the Bicep identifier name of the MongoDBCollectionThroughputSetting /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -236,6 +231,6 @@ public static class ResourceVersions /// /// Version of the MongoDBCollectionThroughputSetting. /// The existing MongoDBCollectionThroughputSetting resource. - public static MongoDBCollectionThroughputSetting FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static MongoDBCollectionThroughputSetting FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/MongoDBDatabase.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/MongoDBDatabase.cs index 73ed1dd5cb47..1624c5d32ee0 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/MongoDBDatabase.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/MongoDBDatabase.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// MongoDBDatabase. /// -public partial class MongoDBDatabase : Resource +public partial class MongoDBDatabase : ProvisionableResource { /// /// Cosmos DB database name. @@ -76,15 +76,15 @@ public partial class MongoDBDatabase : Resource /// /// Creates a new MongoDBDatabase. /// - /// + /// /// The the Bicep identifier name of the MongoDBDatabase resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, /// and underscores. /// /// Version of the MongoDBDatabase. - public MongoDBDatabase(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.DocumentDB/databaseAccounts/mongodbDatabases", resourceVersion ?? "2024-08-15") + public MongoDBDatabase(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.DocumentDB/databaseAccounts/mongodbDatabases", resourceVersion ?? "2024-08-15") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _location = BicepValue.DefineProperty(this, "Location", ["location"], isRequired: true); @@ -102,11 +102,6 @@ public MongoDBDatabase(string identifierName, string? resourceVersion = default) /// public static class ResourceVersions { - /// - /// 2024-09-01-preview. - /// - public static readonly string V2024_09_01_preview = "2024-09-01-preview"; - /// /// 2024-08-15. /// @@ -236,7 +231,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing MongoDBDatabase. /// - /// + /// /// The the Bicep identifier name of the MongoDBDatabase resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, @@ -244,6 +239,6 @@ public static class ResourceVersions /// /// Version of the MongoDBDatabase. /// The existing MongoDBDatabase resource. - public static MongoDBDatabase FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static MongoDBDatabase FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/MongoDBDatabaseThroughputSetting.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/MongoDBDatabaseThroughputSetting.cs index cf221522f6ed..eb1368226e7e 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/MongoDBDatabaseThroughputSetting.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/MongoDBDatabaseThroughputSetting.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// MongoDBDatabaseThroughputSetting. /// -public partial class MongoDBDatabaseThroughputSetting : Resource +public partial class MongoDBDatabaseThroughputSetting : ProvisionableResource { /// /// Gets the Name. @@ -69,15 +69,15 @@ public partial class MongoDBDatabaseThroughputSetting : Resource /// /// Creates a new MongoDBDatabaseThroughputSetting. /// - /// + /// /// The the Bicep identifier name of the MongoDBDatabaseThroughputSetting /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the MongoDBDatabaseThroughputSetting. - public MongoDBDatabaseThroughputSetting(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/throughputSettings", resourceVersion ?? "2024-08-15") + public MongoDBDatabaseThroughputSetting(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/throughputSettings", resourceVersion ?? "2024-08-15") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _location = BicepValue.DefineProperty(this, "Location", ["location"], isRequired: true); @@ -94,11 +94,6 @@ public MongoDBDatabaseThroughputSetting(string identifierName, string? resourceV /// public static class ResourceVersions { - /// - /// 2024-09-01-preview. - /// - public static readonly string V2024_09_01_preview = "2024-09-01-preview"; - /// /// 2024-08-15. /// @@ -228,7 +223,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing MongoDBDatabaseThroughputSetting. /// - /// + /// /// The the Bicep identifier name of the MongoDBDatabaseThroughputSetting /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -236,6 +231,6 @@ public static class ResourceVersions /// /// Version of the MongoDBDatabaseThroughputSetting. /// The existing MongoDBDatabaseThroughputSetting resource. - public static MongoDBDatabaseThroughputSetting FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static MongoDBDatabaseThroughputSetting FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/MongoDBRoleDefinition.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/MongoDBRoleDefinition.cs index e66fadcf3c56..19a833a0e3a3 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/MongoDBRoleDefinition.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/MongoDBRoleDefinition.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// MongoDBRoleDefinition. /// -public partial class MongoDBRoleDefinition : Resource +public partial class MongoDBRoleDefinition : ProvisionableResource { /// /// Gets the Name. @@ -80,15 +80,15 @@ public partial class MongoDBRoleDefinition : Resource /// /// Creates a new MongoDBRoleDefinition. /// - /// + /// /// The the Bicep identifier name of the MongoDBRoleDefinition resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, /// numbers, and underscores. /// /// Version of the MongoDBRoleDefinition. - public MongoDBRoleDefinition(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.DocumentDB/databaseAccounts/mongodbRoleDefinitions", resourceVersion ?? "2024-08-15") + public MongoDBRoleDefinition(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.DocumentDB/databaseAccounts/mongodbRoleDefinitions", resourceVersion ?? "2024-08-15") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _databaseName = BicepValue.DefineProperty(this, "DatabaseName", ["properties", "databaseName"]); @@ -106,11 +106,6 @@ public MongoDBRoleDefinition(string identifierName, string? resourceVersion = de /// public static class ResourceVersions { - /// - /// 2024-09-01-preview. - /// - public static readonly string V2024_09_01_preview = "2024-09-01-preview"; - /// /// 2024-08-15. /// @@ -240,7 +235,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing MongoDBRoleDefinition. /// - /// + /// /// The the Bicep identifier name of the MongoDBRoleDefinition resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, @@ -248,6 +243,6 @@ public static class ResourceVersions /// /// Version of the MongoDBRoleDefinition. /// The existing MongoDBRoleDefinition resource. - public static MongoDBRoleDefinition FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static MongoDBRoleDefinition FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/MongoDBUserDefinition.cs b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/MongoDBUserDefinition.cs index c58e74fddd42..3ba269ab7428 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/MongoDBUserDefinition.cs +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Generated/MongoDBUserDefinition.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.CosmosDB; /// /// MongoDBUserDefinition. /// -public partial class MongoDBUserDefinition : Resource +public partial class MongoDBUserDefinition : ProvisionableResource { /// /// Gets the Name. @@ -84,15 +84,15 @@ public partial class MongoDBUserDefinition : Resource /// /// Creates a new MongoDBUserDefinition. /// - /// + /// /// The the Bicep identifier name of the MongoDBUserDefinition resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, /// numbers, and underscores. /// /// Version of the MongoDBUserDefinition. - public MongoDBUserDefinition(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.DocumentDB/databaseAccounts/mongodbUserDefinitions", resourceVersion ?? "2024-08-15") + public MongoDBUserDefinition(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.DocumentDB/databaseAccounts/mongodbUserDefinitions", resourceVersion ?? "2024-08-15") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _customData = BicepValue.DefineProperty(this, "CustomData", ["properties", "customData"]); @@ -111,11 +111,6 @@ public MongoDBUserDefinition(string identifierName, string? resourceVersion = de /// public static class ResourceVersions { - /// - /// 2024-09-01-preview. - /// - public static readonly string V2024_09_01_preview = "2024-09-01-preview"; - /// /// 2024-08-15. /// @@ -245,7 +240,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing MongoDBUserDefinition. /// - /// + /// /// The the Bicep identifier name of the MongoDBUserDefinition resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, @@ -253,6 +248,6 @@ public static class ResourceVersions /// /// Version of the MongoDBUserDefinition. /// The existing MongoDBUserDefinition resource. - public static MongoDBUserDefinition FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static MongoDBUserDefinition FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.Deployment/api/Azure.Provisioning.Deployment.netstandard2.0.cs b/sdk/provisioning/Azure.Provisioning.Deployment/api/Azure.Provisioning.Deployment.netstandard2.0.cs index b6628c005d18..50a8f333138c 100644 --- a/sdk/provisioning/Azure.Provisioning.Deployment/api/Azure.Provisioning.Deployment.netstandard2.0.cs +++ b/sdk/provisioning/Azure.Provisioning.Deployment/api/Azure.Provisioning.Deployment.netstandard2.0.cs @@ -7,13 +7,11 @@ internal ProvisioningDeployment() { } public Azure.ResponseError? Error { get { throw null; } } public System.Collections.Generic.IReadOnlyDictionary Outputs { get { throw null; } } public Azure.ResourceManager.Resources.Models.ResourcesProvisioningState? ProvisioningState { get { throw null; } } - public TClient CreateClient(Azure.Provisioning.Primitives.IClientCreator resource, Azure.Core.TokenCredential? credential = null, TOptions? options = null) where TOptions : Azure.Core.ClientOptions { throw null; } } public partial class ProvisioningDeploymentOptions { public ProvisioningDeploymentOptions() { } public Azure.ResourceManager.ArmClient ArmClient { get { throw null; } set { } } - public System.Action? ConfigureClientOptionsCallback { get { throw null; } set { } } public Azure.Core.TokenCredential DefaultArmCredential { get { throw null; } set { } } public Azure.Core.TokenCredential DefaultClientCredential { get { throw null; } set { } } public Azure.Core.TokenCredential? DefaultCredential { get { throw null; } set { } } diff --git a/sdk/provisioning/Azure.Provisioning.Deployment/src/ProvisioningDeployment.cs b/sdk/provisioning/Azure.Provisioning.Deployment/src/ProvisioningDeployment.cs index 8c06b31562fe..77e1973d8388 100644 --- a/sdk/provisioning/Azure.Provisioning.Deployment/src/ProvisioningDeployment.cs +++ b/sdk/provisioning/Azure.Provisioning.Deployment/src/ProvisioningDeployment.cs @@ -26,7 +26,7 @@ public class ProvisioningDeployment /// /// Gets the provisioning context that was used to deploy the resources. /// - internal ProvisioningContext Context { get; } + internal ProvisioningBuildOptions BuildOptions { get; } /// /// Gets the options that were used to deploy the resources. @@ -81,13 +81,14 @@ public class ProvisioningDeployment /// internal ProvisioningDeployment(ProvisioningPlan plan, ProvisioningDeploymentOptions options, ArmDeploymentResource deployment, IReadOnlyDictionary outputs) { - Context = plan.ProvisioningContext; + BuildOptions = plan.BuildOptions; DeploymentOptions = options; Deployment = deployment.HasData ? deployment : throw new ArgumentException($"The {nameof(deployment)} must have its {nameof(ArmDeploymentResource.Data)} property set.", nameof(deployment)); Outputs = outputs; } +#if EXPERIMENTAL_PROVISIONING /// /// Create a data-plane client for a specific Azure resource. /// @@ -120,4 +121,5 @@ public TClient CreateClient(IClientCreator if (options is not null) { DeploymentOptions.ConfigureClientOptionsCallback?.Invoke(options); } return resource.CreateClient(Outputs, credential, options); } +#endif } diff --git a/sdk/provisioning/Azure.Provisioning.Deployment/src/ProvisioningDeploymentOptions.cs b/sdk/provisioning/Azure.Provisioning.Deployment/src/ProvisioningDeploymentOptions.cs index ba541d0e2782..b28c1b9bc92d 100644 --- a/sdk/provisioning/Azure.Provisioning.Deployment/src/ProvisioningDeploymentOptions.cs +++ b/sdk/provisioning/Azure.Provisioning.Deployment/src/ProvisioningDeploymentOptions.cs @@ -31,7 +31,9 @@ public ArmClient ArmClient { // TODO: Hook into IConfig story for constructing ArmClient too ArmClientOptions options = new(); +#if EXPERIMENTAL_PROVISIONING ConfigureClientOptionsCallback?.Invoke(options); +#endif _armClient = new ArmClient(DefaultArmCredential, DefaultSubscriptionId, options); } return _armClient; @@ -133,6 +135,7 @@ public TokenCredential DefaultClientCredential } private TokenCredential? _defaultClientCredential; +#if EXPERIMENTAL_PROVISIONING /// /// Optional callback used to configure any /// instance used for creating or @@ -142,6 +145,7 @@ public TokenCredential DefaultClientCredential /// Azure client. /// public Action? ConfigureClientOptionsCallback { get; set; } +#endif // TODO: Default CancellationToken to link to all async operations? } diff --git a/sdk/provisioning/Azure.Provisioning.Deployment/src/ProvisioningPlan.Deploy.cs b/sdk/provisioning/Azure.Provisioning.Deployment/src/ProvisioningPlan.Deploy.cs index 379545de623f..e0871d794d2c 100644 --- a/sdk/provisioning/Azure.Provisioning.Deployment/src/ProvisioningPlan.Deploy.cs +++ b/sdk/provisioning/Azure.Provisioning.Deployment/src/ProvisioningPlan.Deploy.cs @@ -222,9 +222,9 @@ private static ProvisioningDeployment ProcessDeploymentInternal(ProvisioningPlan } // Patch up output references - foreach (ProvisioningOutput output in plan.Infrastructure.GetResources().OfType()) + foreach (ProvisioningOutput output in plan.Infrastructure.GetProvisionableResources().OfType()) { - if (outputs.TryGetValue(output.IdentifierName, out object? value) && + if (outputs.TryGetValue(output.BicepIdentifier, out object? value) && value is not null) { output.Value = value; diff --git a/sdk/provisioning/Azure.Provisioning.Deployment/tests/ExtensionTests.cs b/sdk/provisioning/Azure.Provisioning.Deployment/tests/ExtensionTests.cs index f2e77927e648..3a99c21455b4 100644 --- a/sdk/provisioning/Azure.Provisioning.Deployment/tests/ExtensionTests.cs +++ b/sdk/provisioning/Azure.Provisioning.Deployment/tests/ExtensionTests.cs @@ -6,6 +6,7 @@ using Azure.Provisioning.Primitives; using Azure.Provisioning.Storage; using Azure.Provisioning.Tests; +using Microsoft.Identity.Client.Extensions.Msal; using NUnit.Framework; namespace Azure.Provisioning.Deployment.Tests; @@ -19,7 +20,14 @@ public void LintClean() if (SkipTools) { return; } Infrastructure infra = new(); - StorageAccount resource = StorageResources.CreateAccount("storage"); + StorageAccount resource = + new("storage", StorageAccount.ResourceVersions.V2023_01_01) + { + Kind = StorageKind.StorageV2, + Sku = new StorageSku { Name = StorageSkuName.StandardLrs }, + IsHnsEnabled = true, + AllowBlobPublicAccess = false + }; infra.Add(resource); // Lint @@ -74,7 +82,14 @@ public void GetArmTemplate() if (SkipTools) { return; } Infrastructure infra = new(); - StorageAccount resource = StorageResources.CreateAccount("storage"); + StorageAccount resource = + new("storage", StorageAccount.ResourceVersions.V2023_01_01) + { + Kind = StorageKind.StorageV2, + Sku = new StorageSku { Name = StorageSkuName.StandardLrs }, + IsHnsEnabled = true, + AllowBlobPublicAccess = false + }; infra.Add(resource); ProvisioningPlan plan = infra.Build(); diff --git a/sdk/provisioning/Azure.Provisioning.EventGrid/api/Azure.Provisioning.EventGrid.netstandard2.0.cs b/sdk/provisioning/Azure.Provisioning.EventGrid/api/Azure.Provisioning.EventGrid.netstandard2.0.cs index 27a68614fbe4..5e561b211a48 100644 --- a/sdk/provisioning/Azure.Provisioning.EventGrid/api/Azure.Provisioning.EventGrid.netstandard2.0.cs +++ b/sdk/provisioning/Azure.Provisioning.EventGrid/api/Azure.Provisioning.EventGrid.netstandard2.0.cs @@ -1,6 +1,6 @@ namespace Azure.Provisioning.EventGrid { - public partial class AdvancedFilter : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class AdvancedFilter : Azure.Provisioning.Primitives.ProvisionableConstruct { public AdvancedFilter() { } public Azure.Provisioning.BicepValue Key { get { throw null; } set { } } @@ -38,9 +38,9 @@ public partial class BoolEqualsFilter : Azure.Provisioning.EventGrid.EventGridFi public BoolEqualsFilter() { } public Azure.Provisioning.BicepValue Value { get { throw null; } set { } } } - public partial class CaCertificate : Azure.Provisioning.Primitives.Resource + public partial class CaCertificate : Azure.Provisioning.Primitives.ProvisionableResource { - public CaCertificate(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public CaCertificate(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Description { get { throw null; } set { } } public Azure.Provisioning.BicepValue EncodedCertificate { get { throw null; } set { } } public Azure.Provisioning.BicepValue ExpiryTimeInUtc { get { throw null; } } @@ -50,10 +50,9 @@ public partial class CaCertificate : Azure.Provisioning.Primitives.Resource public Azure.Provisioning.EventGrid.EventGridNamespace? Parent { get { throw null; } set { } } public Azure.Provisioning.BicepValue ProvisioningState { get { throw null; } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.EventGrid.CaCertificate FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.EventGrid.CaCertificate FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { - public static readonly string V2024_06_01_preview; } } public enum CaCertificateProvisioningState @@ -66,13 +65,13 @@ public enum CaCertificateProvisioningState Failed = 5, Deleted = 6, } - public partial class ClientAuthenticationSettings : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ClientAuthenticationSettings : Azure.Provisioning.Primitives.ProvisionableConstruct { public ClientAuthenticationSettings() { } public Azure.Provisioning.BicepList AlternativeAuthenticationNameSources { get { throw null; } set { } } public Azure.Provisioning.BicepValue CustomJwtAuthentication { get { throw null; } set { } } } - public partial class ClientCertificateAuthentication : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ClientCertificateAuthentication : Azure.Provisioning.Primitives.ProvisionableConstruct { public ClientCertificateAuthentication() { } public Azure.Provisioning.BicepList AllowedThumbprints { get { throw null; } set { } } @@ -98,7 +97,7 @@ public enum ClientGroupProvisioningState Failed = 5, Deleted = 6, } - public partial class CustomDomainConfiguration : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class CustomDomainConfiguration : Azure.Provisioning.Primitives.ProvisionableConstruct { public CustomDomainConfiguration() { } public Azure.Provisioning.BicepValue CertificateUri { get { throw null; } set { } } @@ -108,7 +107,7 @@ public CustomDomainConfiguration() { } public Azure.Provisioning.BicepValue Identity { get { throw null; } set { } } public Azure.Provisioning.BicepValue ValidationState { get { throw null; } set { } } } - public partial class CustomDomainIdentity : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class CustomDomainIdentity : Azure.Provisioning.Primitives.ProvisionableConstruct { public CustomDomainIdentity() { } public Azure.Provisioning.BicepValue IdentityType { get { throw null; } set { } } @@ -125,7 +124,7 @@ public enum CustomDomainValidationState Approved = 1, ErrorRetrievingDnsRecord = 2, } - public partial class CustomJwtAuthenticationManagedIdentity : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class CustomJwtAuthenticationManagedIdentity : Azure.Provisioning.Primitives.ProvisionableConstruct { public CustomJwtAuthenticationManagedIdentity() { } public Azure.Provisioning.BicepValue IdentityType { get { throw null; } set { } } @@ -136,7 +135,7 @@ public enum CustomJwtAuthenticationManagedIdentityType SystemAssigned = 0, UserAssigned = 1, } - public partial class CustomJwtAuthenticationSettings : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class CustomJwtAuthenticationSettings : Azure.Provisioning.Primitives.ProvisionableConstruct { public CustomJwtAuthenticationSettings() { } public Azure.Provisioning.BicepList IssuerCertificates { get { throw null; } set { } } @@ -147,22 +146,22 @@ public enum DataResidencyBoundary WithinGeopair = 0, WithinRegion = 1, } - public partial class DeadLetterDestination : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class DeadLetterDestination : Azure.Provisioning.Primitives.ProvisionableConstruct { public DeadLetterDestination() { } } - public partial class DeadLetterWithResourceIdentity : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class DeadLetterWithResourceIdentity : Azure.Provisioning.Primitives.ProvisionableConstruct { public DeadLetterWithResourceIdentity() { } public Azure.Provisioning.BicepValue DeadLetterDestination { get { throw null; } set { } } public Azure.Provisioning.BicepValue Identity { get { throw null; } set { } } } - public partial class DeliveryAttributeMapping : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class DeliveryAttributeMapping : Azure.Provisioning.Primitives.ProvisionableConstruct { public DeliveryAttributeMapping() { } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } } - public partial class DeliveryConfiguration : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class DeliveryConfiguration : Azure.Provisioning.Primitives.ProvisionableConstruct { public DeliveryConfiguration() { } public Azure.Provisioning.BicepValue DeliveryMode { get { throw null; } set { } } @@ -179,15 +178,15 @@ public enum DeliverySchema [System.Runtime.Serialization.DataMemberAttribute(Name="CloudEventSchemaV1_0")] CloudEventSchemaV10 = 0, } - public partial class DeliveryWithResourceIdentity : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class DeliveryWithResourceIdentity : Azure.Provisioning.Primitives.ProvisionableConstruct { public DeliveryWithResourceIdentity() { } public Azure.Provisioning.BicepValue Destination { get { throw null; } set { } } public Azure.Provisioning.BicepValue Identity { get { throw null; } set { } } } - public partial class DomainEventSubscription : Azure.Provisioning.Primitives.Resource + public partial class DomainEventSubscription : Azure.Provisioning.Primitives.ProvisionableResource { - public DomainEventSubscription(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public DomainEventSubscription(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue DeadLetterDestination { get { throw null; } set { } } public Azure.Provisioning.BicepValue DeadLetterWithResourceIdentity { get { throw null; } set { } } public Azure.Provisioning.BicepValue DeliveryWithResourceIdentity { get { throw null; } set { } } @@ -203,25 +202,24 @@ public partial class DomainEventSubscription : Azure.Provisioning.Primitives.Res public Azure.Provisioning.BicepValue RetryPolicy { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepValue Topic { get { throw null; } } - public static Azure.Provisioning.EventGrid.DomainEventSubscription FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.EventGrid.DomainEventSubscription FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2019_06_01; public static readonly string V2020_06_01; public static readonly string V2021_12_01; public static readonly string V2022_06_15; - public static readonly string V2024_06_01_preview; } } - public partial class DomainTopic : Azure.Provisioning.Primitives.Resource + public partial class DomainTopic : Azure.Provisioning.Primitives.ProvisionableResource { - public DomainTopic(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public DomainTopic(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } public Azure.Provisioning.EventGrid.EventGridDomain? Parent { get { throw null; } set { } } public Azure.Provisioning.BicepValue ProvisioningState { get { throw null; } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.EventGrid.DomainTopic FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.EventGrid.DomainTopic FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override Azure.Provisioning.Primitives.ResourceNameRequirements GetResourceNameRequirements() { throw null; } public static partial class ResourceVersions @@ -230,12 +228,11 @@ public static partial class ResourceVersions public static readonly string V2020_06_01; public static readonly string V2021_12_01; public static readonly string V2022_06_15; - public static readonly string V2024_06_01_preview; } } - public partial class DomainTopicEventSubscription : Azure.Provisioning.Primitives.Resource + public partial class DomainTopicEventSubscription : Azure.Provisioning.Primitives.ProvisionableResource { - public DomainTopicEventSubscription(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public DomainTopicEventSubscription(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue DeadLetterDestination { get { throw null; } set { } } public Azure.Provisioning.BicepValue DeadLetterWithResourceIdentity { get { throw null; } set { } } public Azure.Provisioning.BicepValue DeliveryWithResourceIdentity { get { throw null; } set { } } @@ -251,14 +248,13 @@ public partial class DomainTopicEventSubscription : Azure.Provisioning.Primitive public Azure.Provisioning.BicepValue RetryPolicy { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepValue Topic { get { throw null; } } - public static Azure.Provisioning.EventGrid.DomainTopicEventSubscription FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.EventGrid.DomainTopicEventSubscription FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2019_06_01; public static readonly string V2020_06_01; public static readonly string V2021_12_01; public static readonly string V2022_06_15; - public static readonly string V2024_06_01_preview; } } public enum DomainTopicProvisioningState @@ -275,7 +271,7 @@ public partial class DynamicDeliveryAttributeMapping : Azure.Provisioning.EventG public DynamicDeliveryAttributeMapping() { } public Azure.Provisioning.BicepValue SourceField { get { throw null; } set { } } } - public partial class DynamicRoutingEnrichment : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class DynamicRoutingEnrichment : Azure.Provisioning.Primitives.ProvisionableConstruct { public DynamicRoutingEnrichment() { } public Azure.Provisioning.BicepValue Key { get { throw null; } set { } } @@ -313,9 +309,9 @@ public enum EventDeliverySchema public static bool operator !=(Azure.Provisioning.EventGrid.EventGridBuiltInRole left, Azure.Provisioning.EventGrid.EventGridBuiltInRole right) { throw null; } public override string ToString() { throw null; } } - public partial class EventGridDomain : Azure.Provisioning.Primitives.Resource + public partial class EventGridDomain : Azure.Provisioning.Primitives.ProvisionableResource { - public EventGridDomain(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public EventGridDomain(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue AutoCreateTopicWithFirstSubscription { get { throw null; } set { } } public Azure.Provisioning.BicepValue AutoDeleteTopicWithLastSubscription { get { throw null; } set { } } public Azure.Provisioning.BicepValue DataResidencyBoundary { get { throw null; } set { } } @@ -337,7 +333,7 @@ public partial class EventGridDomain : Azure.Provisioning.Primitives.Resource public Azure.Provisioning.BicepValue SkuName { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } - public static Azure.Provisioning.EventGrid.EventGridDomain FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.EventGrid.EventGridDomain FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override Azure.Provisioning.Primitives.ResourceNameRequirements GetResourceNameRequirements() { throw null; } public static partial class ResourceVersions @@ -346,12 +342,11 @@ public static partial class ResourceVersions public static readonly string V2020_06_01; public static readonly string V2021_12_01; public static readonly string V2022_06_15; - public static readonly string V2024_06_01_preview; } } - public partial class EventGridDomainPrivateEndpointConnection : Azure.Provisioning.Primitives.Resource + public partial class EventGridDomainPrivateEndpointConnection : Azure.Provisioning.Primitives.ProvisionableResource { - public EventGridDomainPrivateEndpointConnection(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public EventGridDomainPrivateEndpointConnection(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue ConnectionState { get { throw null; } set { } } public Azure.Provisioning.BicepList GroupIds { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } @@ -360,14 +355,13 @@ public partial class EventGridDomainPrivateEndpointConnection : Azure.Provisioni public Azure.Provisioning.BicepValue PrivateEndpointId { get { throw null; } set { } } public Azure.Provisioning.BicepValue ProvisioningState { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.EventGrid.EventGridDomainPrivateEndpointConnection FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.EventGrid.EventGridDomainPrivateEndpointConnection FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2019_06_01; public static readonly string V2020_06_01; public static readonly string V2021_12_01; public static readonly string V2022_06_15; - public static readonly string V2024_06_01_preview; } } public enum EventGridDomainProvisioningState @@ -379,12 +373,12 @@ public enum EventGridDomainProvisioningState Canceled = 4, Failed = 5, } - public partial class EventGridFilter : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class EventGridFilter : Azure.Provisioning.Primitives.ProvisionableConstruct { public EventGridFilter() { } public Azure.Provisioning.BicepValue Key { get { throw null; } set { } } } - public partial class EventGridInboundIPRule : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class EventGridInboundIPRule : Azure.Provisioning.Primitives.ProvisionableConstruct { public EventGridInboundIPRule() { } public Azure.Provisioning.BicepValue Action { get { throw null; } set { } } @@ -396,7 +390,7 @@ public enum EventGridInputSchema EventGridSchema = 1, CustomEventSchema = 2, } - public partial class EventGridInputSchemaMapping : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class EventGridInputSchemaMapping : Azure.Provisioning.Primitives.ProvisionableConstruct { public EventGridInputSchemaMapping() { } } @@ -414,9 +408,9 @@ public EventGridJsonInputSchemaMapping() { } public Azure.Provisioning.BicepValue Subject { get { throw null; } set { } } public Azure.Provisioning.BicepValue TopicSourceField { get { throw null; } set { } } } - public partial class EventGridNamespace : Azure.Provisioning.Primitives.Resource + public partial class EventGridNamespace : Azure.Provisioning.Primitives.ProvisionableResource { - public EventGridNamespace(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public EventGridNamespace(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Identity { get { throw null; } set { } } public Azure.Provisioning.BicepList InboundIPRules { get { throw null; } set { } } @@ -432,15 +426,11 @@ public partial class EventGridNamespace : Azure.Provisioning.Primitives.Resource public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } public Azure.Provisioning.BicepValue TopicsConfiguration { get { throw null; } set { } } public Azure.Provisioning.BicepValue TopicSpacesConfiguration { get { throw null; } set { } } - public static Azure.Provisioning.EventGrid.EventGridNamespace FromExisting(string identifierName, string? resourceVersion = null) { throw null; } - public static partial class ResourceVersions - { - public static readonly string V2024_06_01_preview; - } + public static Azure.Provisioning.EventGrid.EventGridNamespace FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } } - public partial class EventGridNamespaceClientGroup : Azure.Provisioning.Primitives.Resource + public partial class EventGridNamespaceClientGroup : Azure.Provisioning.Primitives.ProvisionableResource { - public EventGridNamespaceClientGroup(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public EventGridNamespaceClientGroup(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Description { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } @@ -448,10 +438,9 @@ public partial class EventGridNamespaceClientGroup : Azure.Provisioning.Primitiv public Azure.Provisioning.BicepValue ProvisioningState { get { throw null; } } public Azure.Provisioning.BicepValue Query { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.EventGrid.EventGridNamespaceClientGroup FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.EventGrid.EventGridNamespaceClientGroup FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { - public static readonly string V2024_06_01_preview; } } public enum EventGridNamespaceClientProvisioningState @@ -464,9 +453,9 @@ public enum EventGridNamespaceClientProvisioningState Failed = 5, Deleted = 6, } - public partial class EventGridNamespaceClientResource : Azure.Provisioning.Primitives.Resource + public partial class EventGridNamespaceClientResource : Azure.Provisioning.Primitives.ProvisionableResource { - public EventGridNamespaceClientResource(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public EventGridNamespaceClientResource(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepDictionary Attributes { get { throw null; } set { } } public Azure.Provisioning.BicepValue AuthenticationName { get { throw null; } set { } } public Azure.Provisioning.BicepValue ClientCertificateAuthentication { get { throw null; } set { } } @@ -477,10 +466,9 @@ public partial class EventGridNamespaceClientResource : Azure.Provisioning.Primi public Azure.Provisioning.BicepValue ProvisioningState { get { throw null; } } public Azure.Provisioning.BicepValue State { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.EventGrid.EventGridNamespaceClientResource FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.EventGrid.EventGridNamespaceClientResource FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { - public static readonly string V2024_06_01_preview; } } public enum EventGridNamespaceClientState @@ -488,9 +476,9 @@ public enum EventGridNamespaceClientState Enabled = 0, Disabled = 1, } - public partial class EventGridNamespacePermissionBinding : Azure.Provisioning.Primitives.Resource + public partial class EventGridNamespacePermissionBinding : Azure.Provisioning.Primitives.ProvisionableResource { - public EventGridNamespacePermissionBinding(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public EventGridNamespacePermissionBinding(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue ClientGroupName { get { throw null; } set { } } public Azure.Provisioning.BicepValue Description { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } @@ -500,22 +488,21 @@ public partial class EventGridNamespacePermissionBinding : Azure.Provisioning.Pr public Azure.Provisioning.BicepValue ProvisioningState { get { throw null; } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepValue TopicSpaceName { get { throw null; } set { } } - public static Azure.Provisioning.EventGrid.EventGridNamespacePermissionBinding FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.EventGrid.EventGridNamespacePermissionBinding FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { - public static readonly string V2024_06_01_preview; } } - public partial class EventGridPartnerContent : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class EventGridPartnerContent : Azure.Provisioning.Primitives.ProvisionableConstruct { public EventGridPartnerContent() { } public Azure.Provisioning.BicepValue AuthorizationExpireOn { get { throw null; } set { } } public Azure.Provisioning.BicepValue PartnerName { get { throw null; } set { } } public Azure.Provisioning.BicepValue PartnerRegistrationImmutableId { get { throw null; } set { } } } - public partial class EventGridPartnerNamespacePrivateEndpointConnection : Azure.Provisioning.Primitives.Resource + public partial class EventGridPartnerNamespacePrivateEndpointConnection : Azure.Provisioning.Primitives.ProvisionableResource { - public EventGridPartnerNamespacePrivateEndpointConnection(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public EventGridPartnerNamespacePrivateEndpointConnection(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue ConnectionState { get { throw null; } set { } } public Azure.Provisioning.BicepList GroupIds { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } @@ -524,14 +511,13 @@ public partial class EventGridPartnerNamespacePrivateEndpointConnection : Azure. public Azure.Provisioning.BicepValue PrivateEndpointId { get { throw null; } set { } } public Azure.Provisioning.BicepValue ProvisioningState { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.EventGrid.EventGridPartnerNamespacePrivateEndpointConnection FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.EventGrid.EventGridPartnerNamespacePrivateEndpointConnection FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2022_06_15; - public static readonly string V2024_06_01_preview; } } - public partial class EventGridPrivateEndpointConnectionData : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class EventGridPrivateEndpointConnectionData : Azure.Provisioning.Primitives.ProvisionableConstruct { public EventGridPrivateEndpointConnectionData() { } public Azure.Provisioning.BicepValue ConnectionState { get { throw null; } set { } } @@ -542,7 +528,7 @@ public EventGridPrivateEndpointConnectionData() { } public Azure.Provisioning.BicepValue ProvisioningState { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } } - public partial class EventGridPrivateEndpointConnectionState : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class EventGridPrivateEndpointConnectionState : Azure.Provisioning.Primitives.ProvisionableConstruct { public EventGridPrivateEndpointConnectionState() { } public Azure.Provisioning.BicepValue ActionsRequired { get { throw null; } set { } } @@ -580,9 +566,9 @@ public enum EventGridSkuName { Standard = 0, } - public partial class EventGridTopic : Azure.Provisioning.Primitives.Resource + public partial class EventGridTopic : Azure.Provisioning.Primitives.ProvisionableResource { - public EventGridTopic(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public EventGridTopic(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue DataResidencyBoundary { get { throw null; } set { } } public Azure.Provisioning.BicepValue Endpoint { get { throw null; } } public Azure.Provisioning.BicepValue EventTypeInfo { get { throw null; } set { } } @@ -604,7 +590,7 @@ public partial class EventGridTopic : Azure.Provisioning.Primitives.Resource public Azure.Provisioning.BicepValue SkuName { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } - public static Azure.Provisioning.EventGrid.EventGridTopic FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.EventGrid.EventGridTopic FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override Azure.Provisioning.Primitives.ResourceNameRequirements GetResourceNameRequirements() { throw null; } public static partial class ResourceVersions @@ -615,12 +601,11 @@ public static partial class ResourceVersions public static readonly string V2020_06_01; public static readonly string V2021_12_01; public static readonly string V2022_06_15; - public static readonly string V2024_06_01_preview; } } - public partial class EventGridTopicPrivateEndpointConnection : Azure.Provisioning.Primitives.Resource + public partial class EventGridTopicPrivateEndpointConnection : Azure.Provisioning.Primitives.ProvisionableResource { - public EventGridTopicPrivateEndpointConnection(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public EventGridTopicPrivateEndpointConnection(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue ConnectionState { get { throw null; } set { } } public Azure.Provisioning.BicepList GroupIds { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } @@ -629,7 +614,7 @@ public partial class EventGridTopicPrivateEndpointConnection : Azure.Provisionin public Azure.Provisioning.BicepValue PrivateEndpointId { get { throw null; } set { } } public Azure.Provisioning.BicepValue ProvisioningState { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.EventGrid.EventGridTopicPrivateEndpointConnection FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.EventGrid.EventGridTopicPrivateEndpointConnection FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2018_01_01; @@ -638,7 +623,6 @@ public static partial class ResourceVersions public static readonly string V2020_06_01; public static readonly string V2021_12_01; public static readonly string V2022_06_15; - public static readonly string V2024_06_01_preview; } } public enum EventGridTopicProvisioningState @@ -661,9 +645,9 @@ public enum EventInputSchema [System.Runtime.Serialization.DataMemberAttribute(Name="CloudEventSchemaV1_0")] CloudEventSchemaV10 = 0, } - public partial class EventSubscription : Azure.Provisioning.Primitives.Resource + public partial class EventSubscription : Azure.Provisioning.Primitives.ProvisionableResource { - public EventSubscription(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public EventSubscription(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue DeadLetterDestination { get { throw null; } set { } } public Azure.Provisioning.BicepValue DeadLetterWithResourceIdentity { get { throw null; } set { } } public Azure.Provisioning.BicepValue DeliveryWithResourceIdentity { get { throw null; } set { } } @@ -678,7 +662,7 @@ public partial class EventSubscription : Azure.Provisioning.Primitives.Resource public Azure.Provisioning.BicepValue RetryPolicy { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepValue Topic { get { throw null; } } - public static Azure.Provisioning.EventGrid.EventSubscription FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.EventGrid.EventSubscription FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override Azure.Provisioning.Primitives.ResourceNameRequirements GetResourceNameRequirements() { throw null; } public static partial class ResourceVersions @@ -689,14 +673,13 @@ public static partial class ResourceVersions public static readonly string V2020_06_01; public static readonly string V2021_12_01; public static readonly string V2022_06_15; - public static readonly string V2024_06_01_preview; } } - public partial class EventSubscriptionDestination : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class EventSubscriptionDestination : Azure.Provisioning.Primitives.ProvisionableConstruct { public EventSubscriptionDestination() { } } - public partial class EventSubscriptionFilter : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class EventSubscriptionFilter : Azure.Provisioning.Primitives.ProvisionableConstruct { public EventSubscriptionFilter() { } public Azure.Provisioning.BicepList AdvancedFilters { get { throw null; } set { } } @@ -706,7 +689,7 @@ public EventSubscriptionFilter() { } public Azure.Provisioning.BicepValue SubjectBeginsWith { get { throw null; } set { } } public Azure.Provisioning.BicepValue SubjectEndsWith { get { throw null; } set { } } } - public partial class EventSubscriptionIdentity : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class EventSubscriptionIdentity : Azure.Provisioning.Primitives.ProvisionableConstruct { public EventSubscriptionIdentity() { } public Azure.Provisioning.BicepValue IdentityType { get { throw null; } set { } } @@ -727,13 +710,13 @@ public enum EventSubscriptionProvisioningState Failed = 5, AwaitingManualAction = 6, } - public partial class EventSubscriptionRetryPolicy : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class EventSubscriptionRetryPolicy : Azure.Provisioning.Primitives.ProvisionableConstruct { public EventSubscriptionRetryPolicy() { } public Azure.Provisioning.BicepValue EventTimeToLiveInMinutes { get { throw null; } set { } } public Azure.Provisioning.BicepValue MaxDeliveryAttempts { get { throw null; } set { } } } - public partial class FiltersConfiguration : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class FiltersConfiguration : Azure.Provisioning.Primitives.ProvisionableConstruct { public FiltersConfiguration() { } public Azure.Provisioning.BicepList Filters { get { throw null; } set { } } @@ -745,7 +728,7 @@ public HybridConnectionEventSubscriptionDestination() { } public Azure.Provisioning.BicepList DeliveryAttributeMappings { get { throw null; } set { } } public Azure.Provisioning.BicepValue ResourceId { get { throw null; } set { } } } - public partial class InlineEventProperties : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class InlineEventProperties : Azure.Provisioning.Primitives.ProvisionableConstruct { public InlineEventProperties() { } public Azure.Provisioning.BicepValue DataSchemaUri { get { throw null; } set { } } @@ -769,13 +752,13 @@ public partial class IsNullOrUndefinedFilter : Azure.Provisioning.EventGrid.Even { public IsNullOrUndefinedFilter() { } } - public partial class IssuerCertificateInfo : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class IssuerCertificateInfo : Azure.Provisioning.Primitives.ProvisionableConstruct { public IssuerCertificateInfo() { } public Azure.Provisioning.BicepValue CertificateUri { get { throw null; } set { } } public Azure.Provisioning.BicepValue Identity { get { throw null; } set { } } } - public partial class JsonFieldWithDefault : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class JsonFieldWithDefault : Azure.Provisioning.Primitives.ProvisionableConstruct { public JsonFieldWithDefault() { } public Azure.Provisioning.BicepValue DefaultValue { get { throw null; } set { } } @@ -809,15 +792,15 @@ public enum NamespaceProvisioningState CreateFailed = 8, UpdatedFailed = 9, } - public partial class NamespaceSku : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class NamespaceSku : Azure.Provisioning.Primitives.ProvisionableConstruct { public NamespaceSku() { } public Azure.Provisioning.BicepValue Capacity { get { throw null; } set { } } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } } - public partial class NamespaceTopic : Azure.Provisioning.Primitives.Resource + public partial class NamespaceTopic : Azure.Provisioning.Primitives.ProvisionableResource { - public NamespaceTopic(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public NamespaceTopic(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue EventRetentionInDays { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue InputSchema { get { throw null; } set { } } @@ -826,15 +809,11 @@ public partial class NamespaceTopic : Azure.Provisioning.Primitives.Resource public Azure.Provisioning.BicepValue ProvisioningState { get { throw null; } } public Azure.Provisioning.BicepValue PublisherType { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.EventGrid.NamespaceTopic FromExisting(string identifierName, string? resourceVersion = null) { throw null; } - public static partial class ResourceVersions - { - public static readonly string V2024_06_01_preview; - } + public static Azure.Provisioning.EventGrid.NamespaceTopic FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } } - public partial class NamespaceTopicEventSubscription : Azure.Provisioning.Primitives.Resource + public partial class NamespaceTopicEventSubscription : Azure.Provisioning.Primitives.ProvisionableResource { - public NamespaceTopicEventSubscription(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public NamespaceTopicEventSubscription(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue DeliveryConfiguration { get { throw null; } set { } } public Azure.Provisioning.BicepValue EventDeliverySchema { get { throw null; } set { } } public Azure.Provisioning.BicepValue ExpireOn { get { throw null; } set { } } @@ -844,11 +823,7 @@ public partial class NamespaceTopicEventSubscription : Azure.Provisioning.Primit public Azure.Provisioning.EventGrid.NamespaceTopic? Parent { get { throw null; } set { } } public Azure.Provisioning.BicepValue ProvisioningState { get { throw null; } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.EventGrid.NamespaceTopicEventSubscription FromExisting(string identifierName, string? resourceVersion = null) { throw null; } - public static partial class ResourceVersions - { - public static readonly string V2024_06_01_preview; - } + public static Azure.Provisioning.EventGrid.NamespaceTopicEventSubscription FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } } public partial class NamespaceTopicEventSubscriptionDestination : Azure.Provisioning.EventGrid.EventSubscriptionDestination { @@ -948,19 +923,19 @@ public partial class NumberNotInRangeFilter : Azure.Provisioning.EventGrid.Event public NumberNotInRangeFilter() { } public Azure.Provisioning.BicepList> Values { get { throw null; } set { } } } - public partial class PartnerAuthorization : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class PartnerAuthorization : Azure.Provisioning.Primitives.ProvisionableConstruct { public PartnerAuthorization() { } public Azure.Provisioning.BicepList AuthorizedPartnersList { get { throw null; } set { } } public Azure.Provisioning.BicepValue DefaultMaximumExpirationTimeInDays { get { throw null; } set { } } } - public partial class PartnerClientAuthentication : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class PartnerClientAuthentication : Azure.Provisioning.Primitives.ProvisionableConstruct { public PartnerClientAuthentication() { } } - public partial class PartnerConfiguration : Azure.Provisioning.Primitives.Resource + public partial class PartnerConfiguration : Azure.Provisioning.Primitives.ProvisionableResource { - public PartnerConfiguration(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public PartnerConfiguration(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Location { get { throw null; } set { } } public Azure.Provisioning.BicepValue Name { get { throw null; } } @@ -968,11 +943,10 @@ public partial class PartnerConfiguration : Azure.Provisioning.Primitives.Resour public Azure.Provisioning.BicepValue ProvisioningState { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } - public static Azure.Provisioning.EventGrid.PartnerConfiguration FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.EventGrid.PartnerConfiguration FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2022_06_15; - public static readonly string V2024_06_01_preview; } } public enum PartnerConfigurationProvisioningState @@ -984,9 +958,9 @@ public enum PartnerConfigurationProvisioningState Canceled = 4, Failed = 5, } - public partial class PartnerDestination : Azure.Provisioning.Primitives.Resource + public partial class PartnerDestination : Azure.Provisioning.Primitives.ProvisionableResource { - public PartnerDestination(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public PartnerDestination(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue ActivationState { get { throw null; } set { } } public Azure.Provisioning.BicepValue EndpointBaseUri { get { throw null; } set { } } public Azure.Provisioning.BicepValue EndpointServiceContext { get { throw null; } set { } } @@ -999,18 +973,14 @@ public partial class PartnerDestination : Azure.Provisioning.Primitives.Resource public Azure.Provisioning.BicepValue ProvisioningState { get { throw null; } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } - public static Azure.Provisioning.EventGrid.PartnerDestination FromExisting(string identifierName, string? resourceVersion = null) { throw null; } - public static partial class ResourceVersions - { - public static readonly string V2024_06_01_preview; - } + public static Azure.Provisioning.EventGrid.PartnerDestination FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } } public enum PartnerDestinationActivationState { NeverActivated = 0, Activated = 1, } - public partial class PartnerDestinationInfo : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class PartnerDestinationInfo : Azure.Provisioning.Primitives.ProvisionableConstruct { public PartnerDestinationInfo() { } public Azure.Provisioning.BicepValue AzureSubscriptionId { get { throw null; } set { } } @@ -1034,9 +1004,9 @@ public partial class PartnerEventSubscriptionDestination : Azure.Provisioning.Ev public PartnerEventSubscriptionDestination() { } public Azure.Provisioning.BicepValue ResourceId { get { throw null; } set { } } } - public partial class PartnerNamespace : Azure.Provisioning.Primitives.Resource + public partial class PartnerNamespace : Azure.Provisioning.Primitives.ProvisionableResource { - public PartnerNamespace(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public PartnerNamespace(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Endpoint { get { throw null; } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepList InboundIPRules { get { throw null; } set { } } @@ -1051,16 +1021,15 @@ public partial class PartnerNamespace : Azure.Provisioning.Primitives.Resource public Azure.Provisioning.BicepValue PublicNetworkAccess { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } - public static Azure.Provisioning.EventGrid.PartnerNamespace FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.EventGrid.PartnerNamespace FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2022_06_15; - public static readonly string V2024_06_01_preview; } } - public partial class PartnerNamespaceChannel : Azure.Provisioning.Primitives.Resource + public partial class PartnerNamespaceChannel : Azure.Provisioning.Primitives.ProvisionableResource { - public PartnerNamespaceChannel(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public PartnerNamespaceChannel(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue ChannelType { get { throw null; } set { } } public Azure.Provisioning.BicepValue ExpireOnIfNotActivated { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } @@ -1072,11 +1041,10 @@ public partial class PartnerNamespaceChannel : Azure.Provisioning.Primitives.Res public Azure.Provisioning.BicepValue ProvisioningState { get { throw null; } set { } } public Azure.Provisioning.BicepValue ReadinessState { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.EventGrid.PartnerNamespaceChannel FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.EventGrid.PartnerNamespaceChannel FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2022_06_15; - public static readonly string V2024_06_01_preview; } } public enum PartnerNamespaceChannelProvisioningState @@ -1104,9 +1072,9 @@ public enum PartnerNamespaceProvisioningState Canceled = 4, Failed = 5, } - public partial class PartnerRegistration : Azure.Provisioning.Primitives.Resource + public partial class PartnerRegistration : Azure.Provisioning.Primitives.ProvisionableResource { - public PartnerRegistration(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public PartnerRegistration(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Location { get { throw null; } set { } } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } @@ -1114,11 +1082,10 @@ public partial class PartnerRegistration : Azure.Provisioning.Primitives.Resourc public Azure.Provisioning.BicepValue ProvisioningState { get { throw null; } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } - public static Azure.Provisioning.EventGrid.PartnerRegistration FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.EventGrid.PartnerRegistration FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2022_06_15; - public static readonly string V2024_06_01_preview; } } public enum PartnerRegistrationProvisioningState @@ -1130,9 +1097,9 @@ public enum PartnerRegistrationProvisioningState Canceled = 4, Failed = 5, } - public partial class PartnerTopic : Azure.Provisioning.Primitives.Resource + public partial class PartnerTopic : Azure.Provisioning.Primitives.ProvisionableResource { - public PartnerTopic(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public PartnerTopic(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue ActivationState { get { throw null; } set { } } public Azure.Provisioning.BicepValue EventTypeInfo { get { throw null; } set { } } public Azure.Provisioning.BicepValue ExpireOnIfNotActivated { get { throw null; } set { } } @@ -1147,11 +1114,10 @@ public partial class PartnerTopic : Azure.Provisioning.Primitives.Resource public Azure.Provisioning.BicepValue Source { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } - public static Azure.Provisioning.EventGrid.PartnerTopic FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.EventGrid.PartnerTopic FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2022_06_15; - public static readonly string V2024_06_01_preview; } } public enum PartnerTopicActivationState @@ -1160,9 +1126,9 @@ public enum PartnerTopicActivationState Activated = 1, Deactivated = 2, } - public partial class PartnerTopicEventSubscription : Azure.Provisioning.Primitives.Resource + public partial class PartnerTopicEventSubscription : Azure.Provisioning.Primitives.ProvisionableResource { - public PartnerTopicEventSubscription(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public PartnerTopicEventSubscription(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue DeadLetterDestination { get { throw null; } set { } } public Azure.Provisioning.BicepValue DeadLetterWithResourceIdentity { get { throw null; } set { } } public Azure.Provisioning.BicepValue DeliveryWithResourceIdentity { get { throw null; } set { } } @@ -1178,20 +1144,19 @@ public partial class PartnerTopicEventSubscription : Azure.Provisioning.Primitiv public Azure.Provisioning.BicepValue RetryPolicy { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepValue Topic { get { throw null; } } - public static Azure.Provisioning.EventGrid.PartnerTopicEventSubscription FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.EventGrid.PartnerTopicEventSubscription FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2022_06_15; - public static readonly string V2024_06_01_preview; } } - public partial class PartnerTopicEventTypeInfo : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class PartnerTopicEventTypeInfo : Azure.Provisioning.Primitives.ProvisionableConstruct { public PartnerTopicEventTypeInfo() { } public Azure.Provisioning.BicepDictionary InlineEventTypes { get { throw null; } set { } } public Azure.Provisioning.BicepValue Kind { get { throw null; } set { } } } - public partial class PartnerTopicInfo : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class PartnerTopicInfo : Azure.Provisioning.Primitives.ProvisionableConstruct { public PartnerTopicInfo() { } public Azure.Provisioning.BicepValue AzureSubscriptionId { get { throw null; } set { } } @@ -1239,7 +1204,7 @@ public enum PublisherType { Custom = 0, } - public partial class PushInfo : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class PushInfo : Azure.Provisioning.Primitives.ProvisionableConstruct { public PushInfo() { } public Azure.Provisioning.BicepValue DeadLetterDestinationWithResourceIdentity { get { throw null; } set { } } @@ -1248,7 +1213,7 @@ public PushInfo() { } public Azure.Provisioning.BicepValue EventTimeToLive { get { throw null; } set { } } public Azure.Provisioning.BicepValue MaxDeliveryCount { get { throw null; } set { } } } - public partial class QueueInfo : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class QueueInfo : Azure.Provisioning.Primitives.ProvisionableConstruct { public QueueInfo() { } public Azure.Provisioning.BicepValue DeadLetterDestinationWithResourceIdentity { get { throw null; } set { } } @@ -1261,20 +1226,20 @@ public enum ResourceKind Azure = 0, AzureArc = 1, } - public partial class ResourceMoveChangeHistory : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ResourceMoveChangeHistory : Azure.Provisioning.Primitives.ProvisionableConstruct { public ResourceMoveChangeHistory() { } public Azure.Provisioning.BicepValue AzureSubscriptionId { get { throw null; } set { } } public Azure.Provisioning.BicepValue ChangedTimeUtc { get { throw null; } set { } } public Azure.Provisioning.BicepValue ResourceGroupName { get { throw null; } set { } } } - public partial class RoutingEnrichments : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class RoutingEnrichments : Azure.Provisioning.Primitives.ProvisionableConstruct { public RoutingEnrichments() { } public Azure.Provisioning.BicepList Dynamic { get { throw null; } set { } } public Azure.Provisioning.BicepList Static { get { throw null; } set { } } } - public partial class RoutingIdentityInfo : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class RoutingIdentityInfo : Azure.Provisioning.Primitives.ProvisionableConstruct { public RoutingIdentityInfo() { } public Azure.Provisioning.BicepValue IdentityType { get { throw null; } set { } } @@ -1304,7 +1269,7 @@ public StaticDeliveryAttributeMapping() { } public Azure.Provisioning.BicepValue IsSecret { get { throw null; } set { } } public Azure.Provisioning.BicepValue Value { get { throw null; } set { } } } - public partial class StaticRoutingEnrichment : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class StaticRoutingEnrichment : Azure.Provisioning.Primitives.ProvisionableConstruct { public StaticRoutingEnrichment() { } public Azure.Provisioning.BicepValue Key { get { throw null; } set { } } @@ -1421,9 +1386,9 @@ public enum SubscriptionProvisioningState CreateFailed = 9, UpdatedFailed = 10, } - public partial class SystemTopic : Azure.Provisioning.Primitives.Resource + public partial class SystemTopic : Azure.Provisioning.Primitives.ProvisionableResource { - public SystemTopic(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public SystemTopic(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Identity { get { throw null; } set { } } public Azure.Provisioning.BicepValue Location { get { throw null; } set { } } @@ -1434,17 +1399,16 @@ public partial class SystemTopic : Azure.Provisioning.Primitives.Resource public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } public Azure.Provisioning.BicepValue TopicType { get { throw null; } set { } } - public static Azure.Provisioning.EventGrid.SystemTopic FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.EventGrid.SystemTopic FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2021_12_01; public static readonly string V2022_06_15; - public static readonly string V2024_06_01_preview; } } - public partial class SystemTopicEventSubscription : Azure.Provisioning.Primitives.Resource + public partial class SystemTopicEventSubscription : Azure.Provisioning.Primitives.ProvisionableResource { - public SystemTopicEventSubscription(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public SystemTopicEventSubscription(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue DeadLetterDestination { get { throw null; } set { } } public Azure.Provisioning.BicepValue DeadLetterWithResourceIdentity { get { throw null; } set { } } public Azure.Provisioning.BicepValue DeliveryWithResourceIdentity { get { throw null; } set { } } @@ -1460,12 +1424,11 @@ public partial class SystemTopicEventSubscription : Azure.Provisioning.Primitive public Azure.Provisioning.BicepValue RetryPolicy { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepValue Topic { get { throw null; } } - public static Azure.Provisioning.EventGrid.SystemTopicEventSubscription FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.EventGrid.SystemTopicEventSubscription FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2021_12_01; public static readonly string V2022_06_15; - public static readonly string V2024_06_01_preview; } } public enum TlsVersion @@ -1477,9 +1440,9 @@ public enum TlsVersion [System.Runtime.Serialization.DataMemberAttribute(Name="1.2")] One2 = 2, } - public partial class TopicEventSubscription : Azure.Provisioning.Primitives.Resource + public partial class TopicEventSubscription : Azure.Provisioning.Primitives.ProvisionableResource { - public TopicEventSubscription(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public TopicEventSubscription(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue DeadLetterDestination { get { throw null; } set { } } public Azure.Provisioning.BicepValue DeadLetterWithResourceIdentity { get { throw null; } set { } } public Azure.Provisioning.BicepValue DeliveryWithResourceIdentity { get { throw null; } set { } } @@ -1495,7 +1458,7 @@ public partial class TopicEventSubscription : Azure.Provisioning.Primitives.Reso public Azure.Provisioning.BicepValue RetryPolicy { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepValue Topic { get { throw null; } } - public static Azure.Provisioning.EventGrid.TopicEventSubscription FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.EventGrid.TopicEventSubscription FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2018_01_01; @@ -1504,18 +1467,17 @@ public static partial class ResourceVersions public static readonly string V2020_06_01; public static readonly string V2021_12_01; public static readonly string V2022_06_15; - public static readonly string V2024_06_01_preview; } } - public partial class TopicsConfiguration : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class TopicsConfiguration : Azure.Provisioning.Primitives.ProvisionableConstruct { public TopicsConfiguration() { } public Azure.Provisioning.BicepList CustomDomains { get { throw null; } set { } } public Azure.Provisioning.BicepValue Hostname { get { throw null; } } } - public partial class TopicSpace : Azure.Provisioning.Primitives.Resource + public partial class TopicSpace : Azure.Provisioning.Primitives.ProvisionableResource { - public TopicSpace(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public TopicSpace(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Description { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } @@ -1523,11 +1485,7 @@ public partial class TopicSpace : Azure.Provisioning.Primitives.Resource public Azure.Provisioning.BicepValue ProvisioningState { get { throw null; } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepList TopicTemplates { get { throw null; } set { } } - public static Azure.Provisioning.EventGrid.TopicSpace FromExisting(string identifierName, string? resourceVersion = null) { throw null; } - public static partial class ResourceVersions - { - public static readonly string V2024_06_01_preview; - } + public static Azure.Provisioning.EventGrid.TopicSpace FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } } public enum TopicSpaceProvisioningState { @@ -1539,7 +1497,7 @@ public enum TopicSpaceProvisioningState Failed = 5, Deleted = 6, } - public partial class TopicSpacesConfiguration : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class TopicSpacesConfiguration : Azure.Provisioning.Primitives.ProvisionableConstruct { public TopicSpacesConfiguration() { } public Azure.Provisioning.BicepValue ClientAuthentication { get { throw null; } set { } } diff --git a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/CaCertificate.cs b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/CaCertificate.cs index 32e6fbd14b71..dfb321e16cd7 100644 --- a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/CaCertificate.cs +++ b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/CaCertificate.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.EventGrid; /// /// CaCertificate. /// -public partial class CaCertificate : Resource +public partial class CaCertificate : ProvisionableResource { /// /// The CA certificate name. @@ -74,15 +74,15 @@ public partial class CaCertificate : Resource /// /// Creates a new CaCertificate. /// - /// + /// /// The the Bicep identifier name of the CaCertificate resource. This can /// be used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and /// underscores. /// /// Version of the CaCertificate. - public CaCertificate(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.EventGrid/namespaces/caCertificates", resourceVersion ?? "2024-06-01-preview") + public CaCertificate(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.EventGrid/namespaces/caCertificates", resourceVersion) { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _description = BicepValue.DefineProperty(this, "Description", ["properties", "description"]); @@ -100,16 +100,11 @@ public CaCertificate(string identifierName, string? resourceVersion = default) /// public static class ResourceVersions { - /// - /// 2024-06-01-preview. - /// - public static readonly string V2024_06_01_preview = "2024-06-01-preview"; } - /// /// Creates a reference to an existing CaCertificate. /// - /// + /// /// The the Bicep identifier name of the CaCertificate resource. This can /// be used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and @@ -117,6 +112,6 @@ public static class ResourceVersions /// /// Version of the CaCertificate. /// The existing CaCertificate resource. - public static CaCertificate FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static CaCertificate FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/DomainEventSubscription.cs b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/DomainEventSubscription.cs index ea0e1d94a376..1c5e36c8de5e 100644 --- a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/DomainEventSubscription.cs +++ b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/DomainEventSubscription.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.EventGrid; /// /// DomainEventSubscription. /// -public partial class DomainEventSubscription : Resource +public partial class DomainEventSubscription : ProvisionableResource { /// /// Name of the event subscription to be created. Event subscription names @@ -150,15 +150,15 @@ public partial class DomainEventSubscription : Resource /// /// Creates a new DomainEventSubscription. /// - /// + /// /// The the Bicep identifier name of the DomainEventSubscription resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, /// numbers, and underscores. /// /// Version of the DomainEventSubscription. - public DomainEventSubscription(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.EventGrid/domains/eventSubscriptions", resourceVersion ?? "2022-06-15") + public DomainEventSubscription(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.EventGrid/domains/eventSubscriptions", resourceVersion ?? "2022-06-15") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _deadLetterDestination = BicepValue.DefineProperty(this, "DeadLetterDestination", ["properties", "deadLetterDestination"]); @@ -182,11 +182,6 @@ public DomainEventSubscription(string identifierName, string? resourceVersion = /// public static class ResourceVersions { - /// - /// 2024-06-01-preview. - /// - public static readonly string V2024_06_01_preview = "2024-06-01-preview"; - /// /// 2022-06-15. /// @@ -211,7 +206,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing DomainEventSubscription. /// - /// + /// /// The the Bicep identifier name of the DomainEventSubscription resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, @@ -219,6 +214,6 @@ public static class ResourceVersions /// /// Version of the DomainEventSubscription. /// The existing DomainEventSubscription resource. - public static DomainEventSubscription FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static DomainEventSubscription FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/DomainTopic.cs b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/DomainTopic.cs index ea9f8572d99e..8188151e98aa 100644 --- a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/DomainTopic.cs +++ b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/DomainTopic.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.EventGrid; /// /// DomainTopic. /// -public partial class DomainTopic : Resource +public partial class DomainTopic : ProvisionableResource { /// /// Name of the domain topic. @@ -51,15 +51,15 @@ public partial class DomainTopic : Resource /// /// Creates a new DomainTopic. /// - /// + /// /// The the Bicep identifier name of the DomainTopic resource. This can be /// used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and /// underscores. /// /// Version of the DomainTopic. - public DomainTopic(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.EventGrid/domains/topics", resourceVersion ?? "2022-06-15") + public DomainTopic(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.EventGrid/domains/topics", resourceVersion ?? "2022-06-15") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _id = BicepValue.DefineProperty(this, "Id", ["id"], isOutput: true); @@ -73,11 +73,6 @@ public DomainTopic(string identifierName, string? resourceVersion = default) /// public static class ResourceVersions { - /// - /// 2024-06-01-preview. - /// - public static readonly string V2024_06_01_preview = "2024-06-01-preview"; - /// /// 2022-06-15. /// @@ -102,7 +97,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing DomainTopic. /// - /// + /// /// The the Bicep identifier name of the DomainTopic resource. This can be /// used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and @@ -110,8 +105,8 @@ public static class ResourceVersions /// /// Version of the DomainTopic. /// The existing DomainTopic resource. - public static DomainTopic FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static DomainTopic FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; /// /// Get the requirements for naming this DomainTopic resource. diff --git a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/DomainTopicEventSubscription.cs b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/DomainTopicEventSubscription.cs index a7295ef9ec83..933c45a91d4f 100644 --- a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/DomainTopicEventSubscription.cs +++ b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/DomainTopicEventSubscription.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.EventGrid; /// /// DomainTopicEventSubscription. /// -public partial class DomainTopicEventSubscription : Resource +public partial class DomainTopicEventSubscription : ProvisionableResource { /// /// Name of the event subscription to be created. Event subscription names @@ -150,15 +150,15 @@ public partial class DomainTopicEventSubscription : Resource /// /// Creates a new DomainTopicEventSubscription. /// - /// + /// /// The the Bicep identifier name of the DomainTopicEventSubscription /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the DomainTopicEventSubscription. - public DomainTopicEventSubscription(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.EventGrid/domains/topics/eventSubscriptions", resourceVersion ?? "2022-06-15") + public DomainTopicEventSubscription(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.EventGrid/domains/topics/eventSubscriptions", resourceVersion ?? "2022-06-15") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _deadLetterDestination = BicepValue.DefineProperty(this, "DeadLetterDestination", ["properties", "deadLetterDestination"]); @@ -182,11 +182,6 @@ public DomainTopicEventSubscription(string identifierName, string? resourceVersi /// public static class ResourceVersions { - /// - /// 2024-06-01-preview. - /// - public static readonly string V2024_06_01_preview = "2024-06-01-preview"; - /// /// 2022-06-15. /// @@ -211,7 +206,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing DomainTopicEventSubscription. /// - /// + /// /// The the Bicep identifier name of the DomainTopicEventSubscription /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -219,6 +214,6 @@ public static class ResourceVersions /// /// Version of the DomainTopicEventSubscription. /// The existing DomainTopicEventSubscription resource. - public static DomainTopicEventSubscription FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static DomainTopicEventSubscription FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/EventGridDomain.cs b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/EventGridDomain.cs index 71354f9624de..4a19080e9137 100644 --- a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/EventGridDomain.cs +++ b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/EventGridDomain.cs @@ -17,7 +17,7 @@ namespace Azure.Provisioning.EventGrid; /// /// EventGridDomain. /// -public partial class EventGridDomain : Resource +public partial class EventGridDomain : ProvisionableResource { /// /// Name of the domain. @@ -195,15 +195,15 @@ public partial class EventGridDomain : Resource /// /// Creates a new EventGridDomain. /// - /// + /// /// The the Bicep identifier name of the EventGridDomain resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, /// and underscores. /// /// Version of the EventGridDomain. - public EventGridDomain(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.EventGrid/domains", resourceVersion ?? "2022-06-15") + public EventGridDomain(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.EventGrid/domains", resourceVersion ?? "2022-06-15") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _location = BicepValue.DefineProperty(this, "Location", ["location"], isRequired: true); @@ -233,11 +233,6 @@ public EventGridDomain(string identifierName, string? resourceVersion = default) /// public static class ResourceVersions { - /// - /// 2024-06-01-preview. - /// - public static readonly string V2024_06_01_preview = "2024-06-01-preview"; - /// /// 2022-06-15. /// @@ -262,7 +257,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing EventGridDomain. /// - /// + /// /// The the Bicep identifier name of the EventGridDomain resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, @@ -270,8 +265,8 @@ public static class ResourceVersions /// /// Version of the EventGridDomain. /// The existing EventGridDomain resource. - public static EventGridDomain FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static EventGridDomain FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; /// /// Get the requirements for naming this EventGridDomain resource. diff --git a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/EventGridDomainPrivateEndpointConnection.cs b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/EventGridDomainPrivateEndpointConnection.cs index 86b3c7146080..fb3b1ca9935c 100644 --- a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/EventGridDomainPrivateEndpointConnection.cs +++ b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/EventGridDomainPrivateEndpointConnection.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.EventGrid; /// /// EventGridDomainPrivateEndpointConnection. /// -public partial class EventGridDomainPrivateEndpointConnection : Resource +public partial class EventGridDomainPrivateEndpointConnection : ProvisionableResource { /// /// The name of the private endpoint connection connection. @@ -69,7 +69,7 @@ public partial class EventGridDomainPrivateEndpointConnection : Resource /// /// Creates a new EventGridDomainPrivateEndpointConnection. /// - /// + /// /// The the Bicep identifier name of the /// EventGridDomainPrivateEndpointConnection resource. This can be used /// to refer to the resource in expressions, but is not the Azure name of @@ -77,8 +77,8 @@ public partial class EventGridDomainPrivateEndpointConnection : Resource /// underscores. /// /// Version of the EventGridDomainPrivateEndpointConnection. - public EventGridDomainPrivateEndpointConnection(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.EventGrid/domains/privateEndpointConnections", resourceVersion ?? "2022-06-15") + public EventGridDomainPrivateEndpointConnection(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.EventGrid/domains/privateEndpointConnections", resourceVersion ?? "2022-06-15") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _connectionState = BicepValue.DefineProperty(this, "ConnectionState", ["properties", "privateLinkServiceConnectionState"]); @@ -95,11 +95,6 @@ public EventGridDomainPrivateEndpointConnection(string identifierName, string? r /// public static class ResourceVersions { - /// - /// 2024-06-01-preview. - /// - public static readonly string V2024_06_01_preview = "2024-06-01-preview"; - /// /// 2022-06-15. /// @@ -125,7 +120,7 @@ public static class ResourceVersions /// Creates a reference to an existing /// EventGridDomainPrivateEndpointConnection. /// - /// + /// /// The the Bicep identifier name of the /// EventGridDomainPrivateEndpointConnection resource. This can be used /// to refer to the resource in expressions, but is not the Azure name of @@ -134,6 +129,6 @@ public static class ResourceVersions /// /// Version of the EventGridDomainPrivateEndpointConnection. /// The existing EventGridDomainPrivateEndpointConnection resource. - public static EventGridDomainPrivateEndpointConnection FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static EventGridDomainPrivateEndpointConnection FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/EventGridNamespace.cs b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/EventGridNamespace.cs index c43753c0ea91..a73c735bc0d6 100644 --- a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/EventGridNamespace.cs +++ b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/EventGridNamespace.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.EventGrid; /// /// EventGridNamespace. /// -public partial class EventGridNamespace : Resource +public partial class EventGridNamespace : ProvisionableResource { /// /// Name of the namespace. @@ -124,15 +124,15 @@ public partial class EventGridNamespace : Resource /// /// Creates a new EventGridNamespace. /// - /// + /// /// The the Bicep identifier name of the EventGridNamespace resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, /// and underscores. /// /// Version of the EventGridNamespace. - public EventGridNamespace(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.EventGrid/namespaces", resourceVersion ?? "2024-06-01-preview") + public EventGridNamespace(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.EventGrid/namespaces", resourceVersion) { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _location = BicepValue.DefineProperty(this, "Location", ["location"], isRequired: true); @@ -151,21 +151,10 @@ public EventGridNamespace(string identifierName, string? resourceVersion = defau _systemData = BicepValue.DefineProperty(this, "SystemData", ["systemData"], isOutput: true); } - /// - /// Supported EventGridNamespace resource versions. - /// - public static class ResourceVersions - { - /// - /// 2024-06-01-preview. - /// - public static readonly string V2024_06_01_preview = "2024-06-01-preview"; - } - /// /// Creates a reference to an existing EventGridNamespace. /// - /// + /// /// The the Bicep identifier name of the EventGridNamespace resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, @@ -173,6 +162,6 @@ public static class ResourceVersions /// /// Version of the EventGridNamespace. /// The existing EventGridNamespace resource. - public static EventGridNamespace FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static EventGridNamespace FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/EventGridNamespaceClientGroup.cs b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/EventGridNamespaceClientGroup.cs index 3db28fa82b18..a1309aa49800 100644 --- a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/EventGridNamespaceClientGroup.cs +++ b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/EventGridNamespaceClientGroup.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.EventGrid; /// /// EventGridNamespaceClientGroup. /// -public partial class EventGridNamespaceClientGroup : Resource +public partial class EventGridNamespaceClientGroup : ProvisionableResource { /// /// The client group name. @@ -63,15 +63,15 @@ public partial class EventGridNamespaceClientGroup : Resource /// /// Creates a new EventGridNamespaceClientGroup. /// - /// + /// /// The the Bicep identifier name of the EventGridNamespaceClientGroup /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the EventGridNamespaceClientGroup. - public EventGridNamespaceClientGroup(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.EventGrid/namespaces/clientGroups", resourceVersion ?? "2024-06-01-preview") + public EventGridNamespaceClientGroup(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.EventGrid/namespaces/clientGroups", resourceVersion) { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _description = BicepValue.DefineProperty(this, "Description", ["properties", "description"]); @@ -87,16 +87,11 @@ public EventGridNamespaceClientGroup(string identifierName, string? resourceVers /// public static class ResourceVersions { - /// - /// 2024-06-01-preview. - /// - public static readonly string V2024_06_01_preview = "2024-06-01-preview"; } - /// /// Creates a reference to an existing EventGridNamespaceClientGroup. /// - /// + /// /// The the Bicep identifier name of the EventGridNamespaceClientGroup /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -104,6 +99,6 @@ public static class ResourceVersions /// /// Version of the EventGridNamespaceClientGroup. /// The existing EventGridNamespaceClientGroup resource. - public static EventGridNamespaceClientGroup FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static EventGridNamespaceClientGroup FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/EventGridNamespaceClientResource.cs b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/EventGridNamespaceClientResource.cs index 7d26975caf17..3e83731f32a6 100644 --- a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/EventGridNamespaceClientResource.cs +++ b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/EventGridNamespaceClientResource.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.EventGrid; /// /// EventGridNamespaceClientResource. /// -public partial class EventGridNamespaceClientResource : Resource +public partial class EventGridNamespaceClientResource : ProvisionableResource { /// /// The client name. @@ -99,15 +99,15 @@ public partial class EventGridNamespaceClientResource : Resource /// /// Creates a new EventGridNamespaceClientResource. /// - /// + /// /// The the Bicep identifier name of the EventGridNamespaceClientResource /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the EventGridNamespaceClientResource. - public EventGridNamespaceClientResource(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.EventGrid/namespaces/clients", resourceVersion ?? "2024-06-01-preview") + public EventGridNamespaceClientResource(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.EventGrid/namespaces/clients", resourceVersion) { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _attributes = BicepDictionary.DefineProperty(this, "Attributes", ["properties", "attributes"]); @@ -126,16 +126,11 @@ public EventGridNamespaceClientResource(string identifierName, string? resourceV /// public static class ResourceVersions { - /// - /// 2024-06-01-preview. - /// - public static readonly string V2024_06_01_preview = "2024-06-01-preview"; } - /// /// Creates a reference to an existing EventGridNamespaceClientResource. /// - /// + /// /// The the Bicep identifier name of the EventGridNamespaceClientResource /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -143,6 +138,6 @@ public static class ResourceVersions /// /// Version of the EventGridNamespaceClientResource. /// The existing EventGridNamespaceClientResource resource. - public static EventGridNamespaceClientResource FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static EventGridNamespaceClientResource FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/EventGridNamespacePermissionBinding.cs b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/EventGridNamespacePermissionBinding.cs index b7655853edda..44b459a62a73 100644 --- a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/EventGridNamespacePermissionBinding.cs +++ b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/EventGridNamespacePermissionBinding.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.EventGrid; /// /// EventGridNamespacePermissionBinding. /// -public partial class EventGridNamespacePermissionBinding : Resource +public partial class EventGridNamespacePermissionBinding : ProvisionableResource { /// /// The permission binding name. @@ -78,15 +78,15 @@ public partial class EventGridNamespacePermissionBinding : Resource /// /// Creates a new EventGridNamespacePermissionBinding. /// - /// + /// /// The the Bicep identifier name of the /// EventGridNamespacePermissionBinding resource. This can be used to /// refer to the resource in expressions, but is not the Azure name of the /// resource. This value can contain letters, numbers, and underscores. /// /// Version of the EventGridNamespacePermissionBinding. - public EventGridNamespacePermissionBinding(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.EventGrid/namespaces/permissionBindings", resourceVersion ?? "2024-06-01-preview") + public EventGridNamespacePermissionBinding(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.EventGrid/namespaces/permissionBindings", resourceVersion) { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _clientGroupName = BicepValue.DefineProperty(this, "ClientGroupName", ["properties", "clientGroupName"]); @@ -104,16 +104,11 @@ public EventGridNamespacePermissionBinding(string identifierName, string? resour /// public static class ResourceVersions { - /// - /// 2024-06-01-preview. - /// - public static readonly string V2024_06_01_preview = "2024-06-01-preview"; } - /// /// Creates a reference to an existing EventGridNamespacePermissionBinding. /// - /// + /// /// The the Bicep identifier name of the /// EventGridNamespacePermissionBinding resource. This can be used to /// refer to the resource in expressions, but is not the Azure name of the @@ -121,6 +116,6 @@ public static class ResourceVersions /// /// Version of the EventGridNamespacePermissionBinding. /// The existing EventGridNamespacePermissionBinding resource. - public static EventGridNamespacePermissionBinding FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static EventGridNamespacePermissionBinding FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/EventGridPartnerNamespacePrivateEndpointConnection.cs b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/EventGridPartnerNamespacePrivateEndpointConnection.cs index 84e5d75672a0..ddd525152c06 100644 --- a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/EventGridPartnerNamespacePrivateEndpointConnection.cs +++ b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/EventGridPartnerNamespacePrivateEndpointConnection.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.EventGrid; /// /// EventGridPartnerNamespacePrivateEndpointConnection. /// -public partial class EventGridPartnerNamespacePrivateEndpointConnection : Resource +public partial class EventGridPartnerNamespacePrivateEndpointConnection : ProvisionableResource { /// /// The name of the private endpoint connection connection. @@ -69,7 +69,7 @@ public partial class EventGridPartnerNamespacePrivateEndpointConnection : Resour /// /// Creates a new EventGridPartnerNamespacePrivateEndpointConnection. /// - /// + /// /// The the Bicep identifier name of the /// EventGridPartnerNamespacePrivateEndpointConnection resource. This can /// be used to refer to the resource in expressions, but is not the Azure @@ -77,8 +77,8 @@ public partial class EventGridPartnerNamespacePrivateEndpointConnection : Resour /// underscores. /// /// Version of the EventGridPartnerNamespacePrivateEndpointConnection. - public EventGridPartnerNamespacePrivateEndpointConnection(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.EventGrid/partnerNamespaces/privateEndpointConnections", resourceVersion ?? "2022-06-15") + public EventGridPartnerNamespacePrivateEndpointConnection(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.EventGrid/partnerNamespaces/privateEndpointConnections", resourceVersion ?? "2022-06-15") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _connectionState = BicepValue.DefineProperty(this, "ConnectionState", ["properties", "privateLinkServiceConnectionState"]); @@ -96,11 +96,6 @@ public EventGridPartnerNamespacePrivateEndpointConnection(string identifierName, /// public static class ResourceVersions { - /// - /// 2024-06-01-preview. - /// - public static readonly string V2024_06_01_preview = "2024-06-01-preview"; - /// /// 2022-06-15. /// @@ -111,7 +106,7 @@ public static class ResourceVersions /// Creates a reference to an existing /// EventGridPartnerNamespacePrivateEndpointConnection. /// - /// + /// /// The the Bicep identifier name of the /// EventGridPartnerNamespacePrivateEndpointConnection resource. This can /// be used to refer to the resource in expressions, but is not the Azure @@ -120,6 +115,6 @@ public static class ResourceVersions /// /// Version of the EventGridPartnerNamespacePrivateEndpointConnection. /// The existing EventGridPartnerNamespacePrivateEndpointConnection resource. - public static EventGridPartnerNamespacePrivateEndpointConnection FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static EventGridPartnerNamespacePrivateEndpointConnection FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/EventGridTopic.cs b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/EventGridTopic.cs index b3122c422058..1bac61e45933 100644 --- a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/EventGridTopic.cs +++ b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/EventGridTopic.cs @@ -17,7 +17,7 @@ namespace Azure.Provisioning.EventGrid; /// /// EventGridTopic. /// -public partial class EventGridTopic : Resource +public partial class EventGridTopic : ProvisionableResource { /// /// Name of the topic. @@ -167,15 +167,15 @@ public partial class EventGridTopic : Resource /// /// Creates a new EventGridTopic. /// - /// + /// /// The the Bicep identifier name of the EventGridTopic resource. This can /// be used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and /// underscores. /// /// Version of the EventGridTopic. - public EventGridTopic(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.EventGrid/topics", resourceVersion ?? "2022-06-15") + public EventGridTopic(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.EventGrid/topics", resourceVersion ?? "2022-06-15") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _location = BicepValue.DefineProperty(this, "Location", ["location"], isRequired: true); @@ -205,11 +205,6 @@ public EventGridTopic(string identifierName, string? resourceVersion = default) /// public static class ResourceVersions { - /// - /// 2024-06-01-preview. - /// - public static readonly string V2024_06_01_preview = "2024-06-01-preview"; - /// /// 2022-06-15. /// @@ -244,7 +239,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing EventGridTopic. /// - /// + /// /// The the Bicep identifier name of the EventGridTopic resource. This can /// be used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and @@ -252,8 +247,8 @@ public static class ResourceVersions /// /// Version of the EventGridTopic. /// The existing EventGridTopic resource. - public static EventGridTopic FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static EventGridTopic FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; /// /// Get the requirements for naming this EventGridTopic resource. diff --git a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/EventGridTopicPrivateEndpointConnection.cs b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/EventGridTopicPrivateEndpointConnection.cs index 12b1a58973c8..1db55afab49b 100644 --- a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/EventGridTopicPrivateEndpointConnection.cs +++ b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/EventGridTopicPrivateEndpointConnection.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.EventGrid; /// /// EventGridTopicPrivateEndpointConnection. /// -public partial class EventGridTopicPrivateEndpointConnection : Resource +public partial class EventGridTopicPrivateEndpointConnection : ProvisionableResource { /// /// The name of the private endpoint connection connection. @@ -69,15 +69,15 @@ public partial class EventGridTopicPrivateEndpointConnection : Resource /// /// Creates a new EventGridTopicPrivateEndpointConnection. /// - /// + /// /// The the Bicep identifier name of the /// EventGridTopicPrivateEndpointConnection resource. This can be used to /// refer to the resource in expressions, but is not the Azure name of the /// resource. This value can contain letters, numbers, and underscores. /// /// Version of the EventGridTopicPrivateEndpointConnection. - public EventGridTopicPrivateEndpointConnection(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.EventGrid/topics/privateEndpointConnections", resourceVersion ?? "2022-06-15") + public EventGridTopicPrivateEndpointConnection(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.EventGrid/topics/privateEndpointConnections", resourceVersion ?? "2022-06-15") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _connectionState = BicepValue.DefineProperty(this, "ConnectionState", ["properties", "privateLinkServiceConnectionState"]); @@ -94,11 +94,6 @@ public EventGridTopicPrivateEndpointConnection(string identifierName, string? re /// public static class ResourceVersions { - /// - /// 2024-06-01-preview. - /// - public static readonly string V2024_06_01_preview = "2024-06-01-preview"; - /// /// 2022-06-15. /// @@ -134,7 +129,7 @@ public static class ResourceVersions /// Creates a reference to an existing /// EventGridTopicPrivateEndpointConnection. /// - /// + /// /// The the Bicep identifier name of the /// EventGridTopicPrivateEndpointConnection resource. This can be used to /// refer to the resource in expressions, but is not the Azure name of the @@ -142,6 +137,6 @@ public static class ResourceVersions /// /// Version of the EventGridTopicPrivateEndpointConnection. /// The existing EventGridTopicPrivateEndpointConnection resource. - public static EventGridTopicPrivateEndpointConnection FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static EventGridTopicPrivateEndpointConnection FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/EventSubscription.cs b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/EventSubscription.cs index 24d7ee4bc2ac..ca8c7d607a3b 100644 --- a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/EventSubscription.cs +++ b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/EventSubscription.cs @@ -17,7 +17,7 @@ namespace Azure.Provisioning.EventGrid; /// /// EventSubscription. /// -public partial class EventSubscription : Resource +public partial class EventSubscription : ProvisionableResource { /// /// Name of the event subscription to be created. Event subscription names @@ -145,15 +145,15 @@ public partial class EventSubscription : Resource /// /// Creates a new EventSubscription. /// - /// + /// /// The the Bicep identifier name of the EventSubscription resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, /// and underscores. /// /// Version of the EventSubscription. - public EventSubscription(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.EventGrid/eventSubscriptions", resourceVersion ?? "2022-06-15") + public EventSubscription(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.EventGrid/eventSubscriptions", resourceVersion ?? "2022-06-15") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _deadLetterDestination = BicepValue.DefineProperty(this, "DeadLetterDestination", ["properties", "deadLetterDestination"]); @@ -176,11 +176,6 @@ public EventSubscription(string identifierName, string? resourceVersion = defaul /// public static class ResourceVersions { - /// - /// 2024-06-01-preview. - /// - public static readonly string V2024_06_01_preview = "2024-06-01-preview"; - /// /// 2022-06-15. /// @@ -215,7 +210,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing EventSubscription. /// - /// + /// /// The the Bicep identifier name of the EventSubscription resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, @@ -223,8 +218,8 @@ public static class ResourceVersions /// /// Version of the EventSubscription. /// The existing EventSubscription resource. - public static EventSubscription FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static EventSubscription FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; /// /// Get the requirements for naming this EventSubscription resource. diff --git a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/AdvancedFilter.cs b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/AdvancedFilter.cs index 5db29e1026a0..e44f5bfb7b12 100644 --- a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/AdvancedFilter.cs +++ b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/AdvancedFilter.cs @@ -39,7 +39,7 @@ namespace Azure.Provisioning.EventGrid; /// Azure.ResourceManager.EventGrid.Models.StringNotEndsWithAdvancedFilter and /// Azure.ResourceManager.EventGrid.Models.StringNotInAdvancedFilter. /// -public partial class AdvancedFilter : ProvisioningConstruct +public partial class AdvancedFilter : ProvisionableConstruct { /// /// The field/property in the event based on which you want to filter. diff --git a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/ClientAuthenticationSettings.cs b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/ClientAuthenticationSettings.cs index 47c17446bd5d..381fe65d1ad8 100644 --- a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/ClientAuthenticationSettings.cs +++ b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/ClientAuthenticationSettings.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.EventGrid; /// /// Client authentication settings for namespace resource. /// -public partial class ClientAuthenticationSettings : ProvisioningConstruct +public partial class ClientAuthenticationSettings : ProvisionableConstruct { /// /// Alternative authentication name sources related to client diff --git a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/ClientCertificateAuthentication.cs b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/ClientCertificateAuthentication.cs index a14d9d720c98..a0d397ef4c5b 100644 --- a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/ClientCertificateAuthentication.cs +++ b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/ClientCertificateAuthentication.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.EventGrid; /// /// The certificate authentication properties for the client. /// -public partial class ClientCertificateAuthentication : ProvisioningConstruct +public partial class ClientCertificateAuthentication : ProvisionableConstruct { /// /// The validation scheme used to authenticate the client. Default value is diff --git a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/CustomDomainConfiguration.cs b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/CustomDomainConfiguration.cs index e7d54ac49b26..f37282310b3a 100644 --- a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/CustomDomainConfiguration.cs +++ b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/CustomDomainConfiguration.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.EventGrid; /// A custom domain configuration that allows users to publish to their own /// domain name. /// -public partial class CustomDomainConfiguration : ProvisioningConstruct +public partial class CustomDomainConfiguration : ProvisionableConstruct { /// /// Fully Qualified Domain Name (FQDN) for the custom domain. diff --git a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/CustomDomainIdentity.cs b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/CustomDomainIdentity.cs index 664c109f8fc7..ee7f60b08e9c 100644 --- a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/CustomDomainIdentity.cs +++ b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/CustomDomainIdentity.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.EventGrid; /// The identity information for retrieving the certificate for the custom /// domain. /// -public partial class CustomDomainIdentity : ProvisioningConstruct +public partial class CustomDomainIdentity : ProvisionableConstruct { /// /// The type of managed identity used. Can be either diff --git a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/CustomJwtAuthenticationManagedIdentity.cs b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/CustomJwtAuthenticationManagedIdentity.cs index c18be584b34f..c98e80db54a5 100644 --- a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/CustomJwtAuthenticationManagedIdentity.cs +++ b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/CustomJwtAuthenticationManagedIdentity.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.EventGrid; /// The identity information for retrieving the certificate for custom JWT /// authentication. /// -public partial class CustomJwtAuthenticationManagedIdentity : ProvisioningConstruct +public partial class CustomJwtAuthenticationManagedIdentity : ProvisionableConstruct { /// /// The type of managed identity used. Can be either diff --git a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/CustomJwtAuthenticationSettings.cs b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/CustomJwtAuthenticationSettings.cs index f25a2ce7452d..e2d0acb40e50 100644 --- a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/CustomJwtAuthenticationSettings.cs +++ b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/CustomJwtAuthenticationSettings.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.EventGrid; /// /// Custom JWT authentication settings for namespace resource. /// -public partial class CustomJwtAuthenticationSettings : ProvisioningConstruct +public partial class CustomJwtAuthenticationSettings : ProvisionableConstruct { /// /// Expected JWT token issuer. diff --git a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/DeadLetterDestination.cs b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/DeadLetterDestination.cs index 1c5ba84625d2..305d83ac8e05 100644 --- a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/DeadLetterDestination.cs +++ b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/DeadLetterDestination.cs @@ -20,7 +20,7 @@ namespace Azure.Provisioning.EventGrid; /// include /// Azure.ResourceManager.EventGrid.Models.StorageBlobDeadLetterDestination. /// -public partial class DeadLetterDestination : ProvisioningConstruct +public partial class DeadLetterDestination : ProvisionableConstruct { /// /// Creates a new DeadLetterDestination. diff --git a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/DeadLetterWithResourceIdentity.cs b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/DeadLetterWithResourceIdentity.cs index 2340e146ca52..fb55a65460f5 100644 --- a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/DeadLetterWithResourceIdentity.cs +++ b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/DeadLetterWithResourceIdentity.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.EventGrid; /// /// Information about the deadletter destination with resource identity. /// -public partial class DeadLetterWithResourceIdentity : ProvisioningConstruct +public partial class DeadLetterWithResourceIdentity : ProvisionableConstruct { /// /// The identity to use when dead-lettering events. diff --git a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/DeliveryAttributeMapping.cs b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/DeliveryAttributeMapping.cs index e6fdebb90eef..e9f282f80ea3 100644 --- a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/DeliveryAttributeMapping.cs +++ b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/DeliveryAttributeMapping.cs @@ -18,7 +18,7 @@ namespace Azure.Provisioning.EventGrid; /// Azure.ResourceManager.EventGrid.Models.DynamicDeliveryAttributeMapping and /// Azure.ResourceManager.EventGrid.Models.StaticDeliveryAttributeMapping. /// -public partial class DeliveryAttributeMapping : ProvisioningConstruct +public partial class DeliveryAttributeMapping : ProvisionableConstruct { /// /// Name of the delivery attribute or header. diff --git a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/DeliveryConfiguration.cs b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/DeliveryConfiguration.cs index 98d4de42292f..487228fad563 100644 --- a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/DeliveryConfiguration.cs +++ b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/DeliveryConfiguration.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.EventGrid; /// Properties of the delivery configuration information of the event /// subscription. /// -public partial class DeliveryConfiguration : ProvisioningConstruct +public partial class DeliveryConfiguration : ProvisionableConstruct { /// /// Delivery mode of the event subscription. diff --git a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/DeliveryWithResourceIdentity.cs b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/DeliveryWithResourceIdentity.cs index 12ba66394ef4..a9910827f471 100644 --- a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/DeliveryWithResourceIdentity.cs +++ b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/DeliveryWithResourceIdentity.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.EventGrid; /// Information about the delivery for an event subscription with resource /// identity. /// -public partial class DeliveryWithResourceIdentity : ProvisioningConstruct +public partial class DeliveryWithResourceIdentity : ProvisionableConstruct { /// /// The identity to use when delivering events. diff --git a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/DynamicRoutingEnrichment.cs b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/DynamicRoutingEnrichment.cs index baa0a8390c14..fc0cff44abb1 100644 --- a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/DynamicRoutingEnrichment.cs +++ b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/DynamicRoutingEnrichment.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.EventGrid; /// /// The DynamicRoutingEnrichment. /// -public partial class DynamicRoutingEnrichment : ProvisioningConstruct +public partial class DynamicRoutingEnrichment : ProvisionableConstruct { /// /// Dynamic routing enrichment key. diff --git a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/EventGridFilter.cs b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/EventGridFilter.cs index adff5382c57a..bd605152ff52 100644 --- a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/EventGridFilter.cs +++ b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/EventGridFilter.cs @@ -38,7 +38,7 @@ namespace Azure.Provisioning.EventGrid; /// Azure.ResourceManager.EventGrid.Models.StringNotEndsWithFilter and /// Azure.ResourceManager.EventGrid.Models.StringNotInFilter. /// -public partial class EventGridFilter : ProvisioningConstruct +public partial class EventGridFilter : ProvisionableConstruct { /// /// The field/property in the event based on which you want to filter. diff --git a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/EventGridInboundIPRule.cs b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/EventGridInboundIPRule.cs index 043f2b1c5d2c..c1bbf2ed1c00 100644 --- a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/EventGridInboundIPRule.cs +++ b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/EventGridInboundIPRule.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.EventGrid; /// /// The EventGridInboundIPRule. /// -public partial class EventGridInboundIPRule : ProvisioningConstruct +public partial class EventGridInboundIPRule : ProvisionableConstruct { /// /// IP Address in CIDR notation e.g., 10.0.0.0/8. diff --git a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/EventGridInputSchemaMapping.cs b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/EventGridInputSchemaMapping.cs index 486f8ef3f174..7178339e55fa 100644 --- a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/EventGridInputSchemaMapping.cs +++ b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/EventGridInputSchemaMapping.cs @@ -20,7 +20,7 @@ namespace Azure.Provisioning.EventGrid; /// include /// Azure.ResourceManager.EventGrid.Models.EventGridJsonInputSchemaMapping. /// -public partial class EventGridInputSchemaMapping : ProvisioningConstruct +public partial class EventGridInputSchemaMapping : ProvisionableConstruct { /// /// Creates a new EventGridInputSchemaMapping. diff --git a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/EventGridPartnerContent.cs b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/EventGridPartnerContent.cs index a9d44df8ded9..4a0b3fe8bbae 100644 --- a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/EventGridPartnerContent.cs +++ b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/EventGridPartnerContent.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.EventGrid; /// /// Information about the partner. /// -public partial class EventGridPartnerContent : ProvisioningConstruct +public partial class EventGridPartnerContent : ProvisionableConstruct { /// /// The immutableId of the corresponding partner registration. diff --git a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/EventGridPrivateEndpointConnectionData.cs b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/EventGridPrivateEndpointConnectionData.cs index 43cc8a3c6ca2..bf50bf0cf388 100644 --- a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/EventGridPrivateEndpointConnectionData.cs +++ b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/EventGridPrivateEndpointConnectionData.cs @@ -14,7 +14,7 @@ namespace Azure.Provisioning.EventGrid; /// /// A class representing the EventGridPrivateEndpointConnection data model. /// -public partial class EventGridPrivateEndpointConnectionData : ProvisioningConstruct +public partial class EventGridPrivateEndpointConnectionData : ProvisionableConstruct { /// /// Gets or sets Id. diff --git a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/EventGridPrivateEndpointConnectionState.cs b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/EventGridPrivateEndpointConnectionState.cs index bf73759eb4a8..d11d3f281e31 100644 --- a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/EventGridPrivateEndpointConnectionState.cs +++ b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/EventGridPrivateEndpointConnectionState.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.EventGrid; /// /// ConnectionState information. /// -public partial class EventGridPrivateEndpointConnectionState : ProvisioningConstruct +public partial class EventGridPrivateEndpointConnectionState : ProvisionableConstruct { /// /// Status of the connection. diff --git a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/EventSubscriptionDestination.cs b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/EventSubscriptionDestination.cs index 551c861b24db..a7b3c46b18aa 100644 --- a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/EventSubscriptionDestination.cs +++ b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/EventSubscriptionDestination.cs @@ -27,7 +27,7 @@ namespace Azure.Provisioning.EventGrid; /// and /// Azure.ResourceManager.EventGrid.Models.WebHookEventSubscriptionDestination. /// -public partial class EventSubscriptionDestination : ProvisioningConstruct +public partial class EventSubscriptionDestination : ProvisionableConstruct { /// /// Creates a new EventSubscriptionDestination. diff --git a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/EventSubscriptionFilter.cs b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/EventSubscriptionFilter.cs index ce052651a44a..64168325acec 100644 --- a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/EventSubscriptionFilter.cs +++ b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/EventSubscriptionFilter.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.EventGrid; /// /// Filter for the Event Subscription. /// -public partial class EventSubscriptionFilter : ProvisioningConstruct +public partial class EventSubscriptionFilter : ProvisionableConstruct { /// /// An optional string to filter events for an event subscription based on diff --git a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/EventSubscriptionIdentity.cs b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/EventSubscriptionIdentity.cs index 919f40805ede..dc124d3e5c49 100644 --- a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/EventSubscriptionIdentity.cs +++ b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/EventSubscriptionIdentity.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.EventGrid; /// /// The identity information with the event subscription. /// -public partial class EventSubscriptionIdentity : ProvisioningConstruct +public partial class EventSubscriptionIdentity : ProvisionableConstruct { /// /// The type of managed identity used. Can be either diff --git a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/EventSubscriptionRetryPolicy.cs b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/EventSubscriptionRetryPolicy.cs index bbd53b902e52..a582d10aa230 100644 --- a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/EventSubscriptionRetryPolicy.cs +++ b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/EventSubscriptionRetryPolicy.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.EventGrid; /// /// Information about the retry policy for an event subscription. /// -public partial class EventSubscriptionRetryPolicy : ProvisioningConstruct +public partial class EventSubscriptionRetryPolicy : ProvisionableConstruct { /// /// Maximum number of delivery retry attempts for events. diff --git a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/FiltersConfiguration.cs b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/FiltersConfiguration.cs index 9d56c7d6c58f..7b4d9e1be15b 100644 --- a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/FiltersConfiguration.cs +++ b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/FiltersConfiguration.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.EventGrid; /// /// Filters configuration for the Event Subscription. /// -public partial class FiltersConfiguration : ProvisioningConstruct +public partial class FiltersConfiguration : ProvisionableConstruct { /// /// A list of applicable event types that need to be part of the event diff --git a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/InlineEventProperties.cs b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/InlineEventProperties.cs index dc004f3bbf7a..7dfd0cd8b01f 100644 --- a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/InlineEventProperties.cs +++ b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/InlineEventProperties.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.EventGrid; /// /// Additional information about every inline event. /// -public partial class InlineEventProperties : ProvisioningConstruct +public partial class InlineEventProperties : ProvisionableConstruct { /// /// The description for the inline event. diff --git a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/IssuerCertificateInfo.cs b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/IssuerCertificateInfo.cs index 89aa0a4a3355..5584c0b2db3d 100644 --- a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/IssuerCertificateInfo.cs +++ b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/IssuerCertificateInfo.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.EventGrid; /// /// Information about the certificate that is used for token validation. /// -public partial class IssuerCertificateInfo : ProvisioningConstruct +public partial class IssuerCertificateInfo : ProvisionableConstruct { /// /// Keyvault certificate URL in diff --git a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/JsonFieldWithDefault.cs b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/JsonFieldWithDefault.cs index ffa602c204dd..b5f8ac0b0eae 100644 --- a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/JsonFieldWithDefault.cs +++ b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/JsonFieldWithDefault.cs @@ -17,7 +17,7 @@ namespace Azure.Provisioning.EventGrid; /// default value to be used, and at least one of these two properties should /// be provided. /// -public partial class JsonFieldWithDefault : ProvisioningConstruct +public partial class JsonFieldWithDefault : ProvisionableConstruct { /// /// Name of a field in the input event schema that's to be used as the diff --git a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/NamespaceSku.cs b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/NamespaceSku.cs index 1b69eafb4f27..da001eebed17 100644 --- a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/NamespaceSku.cs +++ b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/NamespaceSku.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.EventGrid; /// /// Represents available Sku pricing tiers. /// -public partial class NamespaceSku : ProvisioningConstruct +public partial class NamespaceSku : ProvisionableConstruct { /// /// The name of the SKU. diff --git a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/PartnerAuthorization.cs b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/PartnerAuthorization.cs index d43d5dc6dc54..ada4ab152da7 100644 --- a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/PartnerAuthorization.cs +++ b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/PartnerAuthorization.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.EventGrid; /// /// The partner authorization details. /// -public partial class PartnerAuthorization : ProvisioningConstruct +public partial class PartnerAuthorization : ProvisionableConstruct { /// /// Time used to validate the authorization expiration time for each diff --git a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/PartnerClientAuthentication.cs b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/PartnerClientAuthentication.cs index ae4eb3c26af3..34b2f1ab5ed2 100644 --- a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/PartnerClientAuthentication.cs +++ b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/PartnerClientAuthentication.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.EventGrid; /// include /// Azure.ResourceManager.EventGrid.Models.AzureADPartnerClientAuthentication. /// -public partial class PartnerClientAuthentication : ProvisioningConstruct +public partial class PartnerClientAuthentication : ProvisionableConstruct { /// /// Creates a new PartnerClientAuthentication. diff --git a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/PartnerDestinationInfo.cs b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/PartnerDestinationInfo.cs index 240f2d6016a3..1c78a5dcd363 100644 --- a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/PartnerDestinationInfo.cs +++ b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/PartnerDestinationInfo.cs @@ -19,7 +19,7 @@ namespace Azure.Provisioning.EventGrid; /// include /// Azure.ResourceManager.EventGrid.Models.WebhookPartnerDestinationInfo. /// -public partial class PartnerDestinationInfo : ProvisioningConstruct +public partial class PartnerDestinationInfo : ProvisionableConstruct { /// /// Azure subscription ID of the subscriber. The partner destination diff --git a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/PartnerTopicEventTypeInfo.cs b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/PartnerTopicEventTypeInfo.cs index ae2434785a8a..44a5f73d7f3d 100644 --- a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/PartnerTopicEventTypeInfo.cs +++ b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/PartnerTopicEventTypeInfo.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.EventGrid; /// /// The event type information for Channels. /// -public partial class PartnerTopicEventTypeInfo : ProvisioningConstruct +public partial class PartnerTopicEventTypeInfo : ProvisionableConstruct { /// /// The kind of event type used. diff --git a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/PartnerTopicInfo.cs b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/PartnerTopicInfo.cs index dcf5aa1798bb..7bb398e40953 100644 --- a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/PartnerTopicInfo.cs +++ b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/PartnerTopicInfo.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.EventGrid; /// /// Properties of the corresponding partner topic of a Channel. /// -public partial class PartnerTopicInfo : ProvisioningConstruct +public partial class PartnerTopicInfo : ProvisionableConstruct { /// /// Azure subscription ID of the subscriber. The partner topic associated diff --git a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/PushInfo.cs b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/PushInfo.cs index 0612ccf7d4d9..0b445b8acb3f 100644 --- a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/PushInfo.cs +++ b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/PushInfo.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.EventGrid; /// /// Properties of the destination info for event subscription supporting push. /// -public partial class PushInfo : ProvisioningConstruct +public partial class PushInfo : ProvisionableConstruct { /// /// The maximum delivery count of the events. diff --git a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/QueueInfo.cs b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/QueueInfo.cs index 5b96de09d226..6b3acbdd046b 100644 --- a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/QueueInfo.cs +++ b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/QueueInfo.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.EventGrid; /// /// Properties of the Queue info for event subscription. /// -public partial class QueueInfo : ProvisioningConstruct +public partial class QueueInfo : ProvisionableConstruct { /// /// Maximum period in seconds in which once the message is in received (by @@ -80,6 +80,6 @@ public QueueInfo() _receiveLockDurationInSeconds = BicepValue.DefineProperty(this, "ReceiveLockDurationInSeconds", ["receiveLockDurationInSeconds"]); _maxDeliveryCount = BicepValue.DefineProperty(this, "MaxDeliveryCount", ["maxDeliveryCount"]); _deadLetterDestinationWithResourceIdentity = BicepValue.DefineProperty(this, "DeadLetterDestinationWithResourceIdentity", ["deadLetterDestinationWithResourceIdentity"]); - _eventTimeToLive = BicepValue.DefineProperty(this, "EventTimeToLive", ["eventTimeToLive"]); + _eventTimeToLive = BicepValue.DefineProperty(this, "EventTimeToLive", ["eventTimeToLive"], format: "P"); } } diff --git a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/ResourceMoveChangeHistory.cs b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/ResourceMoveChangeHistory.cs index dc40c7206709..5c6d1fe563eb 100644 --- a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/ResourceMoveChangeHistory.cs +++ b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/ResourceMoveChangeHistory.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.EventGrid; /// /// The change history of the resource move. /// -public partial class ResourceMoveChangeHistory : ProvisioningConstruct +public partial class ResourceMoveChangeHistory : ProvisionableConstruct { /// /// Azure subscription ID of the resource. diff --git a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/RoutingEnrichments.cs b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/RoutingEnrichments.cs index 5e3f8cdfa2b2..79065aa6d2e0 100644 --- a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/RoutingEnrichments.cs +++ b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/RoutingEnrichments.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.EventGrid; /// /// The RoutingEnrichments. /// -public partial class RoutingEnrichments : ProvisioningConstruct +public partial class RoutingEnrichments : ProvisionableConstruct { /// /// Gets the static Please note diff --git a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/RoutingIdentityInfo.cs b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/RoutingIdentityInfo.cs index 703460f21c40..a4c25110d2b4 100644 --- a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/RoutingIdentityInfo.cs +++ b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/RoutingIdentityInfo.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.EventGrid; /// /// Routing identity info for topic spaces configuration. /// -public partial class RoutingIdentityInfo : ProvisioningConstruct +public partial class RoutingIdentityInfo : ProvisionableConstruct { /// /// Routing identity type for topic spaces configuration. diff --git a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/StaticRoutingEnrichment.cs b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/StaticRoutingEnrichment.cs index a3543f05acbb..75476d069706 100644 --- a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/StaticRoutingEnrichment.cs +++ b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/StaticRoutingEnrichment.cs @@ -17,7 +17,7 @@ namespace Azure.Provisioning.EventGrid; /// include /// Azure.ResourceManager.EventGrid.Models.StaticStringRoutingEnrichment. /// -public partial class StaticRoutingEnrichment : ProvisioningConstruct +public partial class StaticRoutingEnrichment : ProvisionableConstruct { /// /// Static routing enrichment key. diff --git a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/TopicSpacesConfiguration.cs b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/TopicSpacesConfiguration.cs index 4fc2c9555ca5..4da5eb282b03 100644 --- a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/TopicSpacesConfiguration.cs +++ b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/TopicSpacesConfiguration.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.EventGrid; /// /// Properties of the Topic Spaces Configuration. /// -public partial class TopicSpacesConfiguration : ProvisioningConstruct +public partial class TopicSpacesConfiguration : ProvisionableConstruct { /// /// Indicate if Topic Spaces Configuration is enabled for the namespace. diff --git a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/TopicsConfiguration.cs b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/TopicsConfiguration.cs index 326ba02a38c2..213ff204be58 100644 --- a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/TopicsConfiguration.cs +++ b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/Models/TopicsConfiguration.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.EventGrid; /// /// Properties of the Topics Configuration. /// -public partial class TopicsConfiguration : ProvisioningConstruct +public partial class TopicsConfiguration : ProvisionableConstruct { /// /// The hostname for the topics configuration. This is a read-only property. diff --git a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/NamespaceTopic.cs b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/NamespaceTopic.cs index 9abcbc0183fb..7a406e88d0c3 100644 --- a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/NamespaceTopic.cs +++ b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/NamespaceTopic.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.EventGrid; /// /// NamespaceTopic. /// -public partial class NamespaceTopic : Resource +public partial class NamespaceTopic : ProvisionableResource { /// /// Name of the namespace topic. @@ -71,15 +71,15 @@ public partial class NamespaceTopic : Resource /// /// Creates a new NamespaceTopic. /// - /// + /// /// The the Bicep identifier name of the NamespaceTopic resource. This can /// be used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and /// underscores. /// /// Version of the NamespaceTopic. - public NamespaceTopic(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.EventGrid/namespaces/topics", resourceVersion ?? "2024-06-01-preview") + public NamespaceTopic(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.EventGrid/namespaces/topics", resourceVersion) { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _eventRetentionInDays = BicepValue.DefineProperty(this, "EventRetentionInDays", ["properties", "eventRetentionInDays"]); @@ -91,21 +91,10 @@ public NamespaceTopic(string identifierName, string? resourceVersion = default) _parent = ResourceReference.DefineResource(this, "Parent", ["parent"], isRequired: true); } - /// - /// Supported NamespaceTopic resource versions. - /// - public static class ResourceVersions - { - /// - /// 2024-06-01-preview. - /// - public static readonly string V2024_06_01_preview = "2024-06-01-preview"; - } - /// /// Creates a reference to an existing NamespaceTopic. /// - /// + /// /// The the Bicep identifier name of the NamespaceTopic resource. This can /// be used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and @@ -113,6 +102,6 @@ public static class ResourceVersions /// /// Version of the NamespaceTopic. /// The existing NamespaceTopic resource. - public static NamespaceTopic FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static NamespaceTopic FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/NamespaceTopicEventSubscription.cs b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/NamespaceTopicEventSubscription.cs index 7cc0197478ee..005f72ee60c4 100644 --- a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/NamespaceTopicEventSubscription.cs +++ b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/NamespaceTopicEventSubscription.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.EventGrid; /// /// NamespaceTopicEventSubscription. /// -public partial class NamespaceTopicEventSubscription : Resource +public partial class NamespaceTopicEventSubscription : ProvisionableResource { /// /// Name of the event subscription to be created. Event subscription names @@ -77,15 +77,15 @@ public partial class NamespaceTopicEventSubscription : Resource /// /// Creates a new NamespaceTopicEventSubscription. /// - /// + /// /// The the Bicep identifier name of the NamespaceTopicEventSubscription /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the NamespaceTopicEventSubscription. - public NamespaceTopicEventSubscription(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.EventGrid/namespaces/topics/eventSubscriptions", resourceVersion ?? "2024-06-01-preview") + public NamespaceTopicEventSubscription(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.EventGrid/namespaces/topics/eventSubscriptions", resourceVersion) { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _deliveryConfiguration = BicepValue.DefineProperty(this, "DeliveryConfiguration", ["properties", "deliveryConfiguration"]); @@ -98,21 +98,10 @@ public NamespaceTopicEventSubscription(string identifierName, string? resourceVe _parent = ResourceReference.DefineResource(this, "Parent", ["parent"], isRequired: true); } - /// - /// Supported NamespaceTopicEventSubscription resource versions. - /// - public static class ResourceVersions - { - /// - /// 2024-06-01-preview. - /// - public static readonly string V2024_06_01_preview = "2024-06-01-preview"; - } - /// /// Creates a reference to an existing NamespaceTopicEventSubscription. /// - /// + /// /// The the Bicep identifier name of the NamespaceTopicEventSubscription /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -120,6 +109,6 @@ public static class ResourceVersions /// /// Version of the NamespaceTopicEventSubscription. /// The existing NamespaceTopicEventSubscription resource. - public static NamespaceTopicEventSubscription FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static NamespaceTopicEventSubscription FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/PartnerConfiguration.cs b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/PartnerConfiguration.cs index 9b29bc28728d..f82f66e3cf96 100644 --- a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/PartnerConfiguration.cs +++ b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/PartnerConfiguration.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.EventGrid; /// /// PartnerConfiguration. /// -public partial class PartnerConfiguration : Resource +public partial class PartnerConfiguration : ProvisionableResource { /// /// Gets the Name. @@ -63,15 +63,15 @@ public partial class PartnerConfiguration : Resource /// /// Creates a new PartnerConfiguration. /// - /// + /// /// The the Bicep identifier name of the PartnerConfiguration resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, /// numbers, and underscores. /// /// Version of the PartnerConfiguration. - public PartnerConfiguration(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.EventGrid/partnerConfigurations", resourceVersion ?? "2022-06-15") + public PartnerConfiguration(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.EventGrid/partnerConfigurations", resourceVersion ?? "2022-06-15") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _location = BicepValue.DefineProperty(this, "Location", ["location"], isRequired: true); @@ -87,11 +87,6 @@ public PartnerConfiguration(string identifierName, string? resourceVersion = def /// public static class ResourceVersions { - /// - /// 2024-06-01-preview. - /// - public static readonly string V2024_06_01_preview = "2024-06-01-preview"; - /// /// 2022-06-15. /// @@ -101,7 +96,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing PartnerConfiguration. /// - /// + /// /// The the Bicep identifier name of the PartnerConfiguration resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, @@ -109,6 +104,6 @@ public static class ResourceVersions /// /// Version of the PartnerConfiguration. /// The existing PartnerConfiguration resource. - public static PartnerConfiguration FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static PartnerConfiguration FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/PartnerDestination.cs b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/PartnerDestination.cs index 35492f110d5e..7de5853daa37 100644 --- a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/PartnerDestination.cs +++ b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/PartnerDestination.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.EventGrid; /// /// PartnerDestination. /// -public partial class PartnerDestination : Resource +public partial class PartnerDestination : ProvisionableResource { /// /// Name of the partner destination. @@ -95,15 +95,15 @@ public partial class PartnerDestination : Resource /// /// Creates a new PartnerDestination. /// - /// + /// /// The the Bicep identifier name of the PartnerDestination resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, /// and underscores. /// /// Version of the PartnerDestination. - public PartnerDestination(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.EventGrid/partnerDestinations", resourceVersion ?? "2024-06-01-preview") + public PartnerDestination(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.EventGrid/partnerDestinations", resourceVersion) { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _location = BicepValue.DefineProperty(this, "Location", ["location"], isRequired: true); @@ -119,21 +119,10 @@ public PartnerDestination(string identifierName, string? resourceVersion = defau _systemData = BicepValue.DefineProperty(this, "SystemData", ["systemData"], isOutput: true); } - /// - /// Supported PartnerDestination resource versions. - /// - public static class ResourceVersions - { - /// - /// 2024-06-01-preview. - /// - public static readonly string V2024_06_01_preview = "2024-06-01-preview"; - } - /// /// Creates a reference to an existing PartnerDestination. /// - /// + /// /// The the Bicep identifier name of the PartnerDestination resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, @@ -141,6 +130,6 @@ public static class ResourceVersions /// /// Version of the PartnerDestination. /// The existing PartnerDestination resource. - public static PartnerDestination FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static PartnerDestination FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/PartnerNamespace.cs b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/PartnerNamespace.cs index d194cfd0018a..a2779ec7477a 100644 --- a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/PartnerNamespace.cs +++ b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/PartnerNamespace.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.EventGrid; /// /// PartnerNamespace. /// -public partial class PartnerNamespace : Resource +public partial class PartnerNamespace : ProvisionableResource { /// /// Name of the partner namespace. @@ -120,15 +120,15 @@ public partial class PartnerNamespace : Resource /// /// Creates a new PartnerNamespace. /// - /// + /// /// The the Bicep identifier name of the PartnerNamespace resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, /// and underscores. /// /// Version of the PartnerNamespace. - public PartnerNamespace(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.EventGrid/partnerNamespaces", resourceVersion ?? "2022-06-15") + public PartnerNamespace(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.EventGrid/partnerNamespaces", resourceVersion ?? "2022-06-15") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _location = BicepValue.DefineProperty(this, "Location", ["location"], isRequired: true); @@ -151,11 +151,6 @@ public PartnerNamespace(string identifierName, string? resourceVersion = default /// public static class ResourceVersions { - /// - /// 2024-06-01-preview. - /// - public static readonly string V2024_06_01_preview = "2024-06-01-preview"; - /// /// 2022-06-15. /// @@ -165,7 +160,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing PartnerNamespace. /// - /// + /// /// The the Bicep identifier name of the PartnerNamespace resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, @@ -173,6 +168,6 @@ public static class ResourceVersions /// /// Version of the PartnerNamespace. /// The existing PartnerNamespace resource. - public static PartnerNamespace FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static PartnerNamespace FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/PartnerNamespaceChannel.cs b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/PartnerNamespaceChannel.cs index 2474e0e2cbbf..d059c86b03d2 100644 --- a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/PartnerNamespaceChannel.cs +++ b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/PartnerNamespaceChannel.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.EventGrid; /// /// PartnerNamespaceChannel. /// -public partial class PartnerNamespaceChannel : Resource +public partial class PartnerNamespaceChannel : ProvisionableResource { /// /// Name of the channel. @@ -101,15 +101,15 @@ public partial class PartnerNamespaceChannel : Resource /// /// Creates a new PartnerNamespaceChannel. /// - /// + /// /// The the Bicep identifier name of the PartnerNamespaceChannel resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, /// numbers, and underscores. /// /// Version of the PartnerNamespaceChannel. - public PartnerNamespaceChannel(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.EventGrid/partnerNamespaces/channels", resourceVersion ?? "2022-06-15") + public PartnerNamespaceChannel(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.EventGrid/partnerNamespaces/channels", resourceVersion ?? "2022-06-15") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _channelType = BicepValue.DefineProperty(this, "ChannelType", ["properties", "channelType"]); @@ -129,11 +129,6 @@ public PartnerNamespaceChannel(string identifierName, string? resourceVersion = /// public static class ResourceVersions { - /// - /// 2024-06-01-preview. - /// - public static readonly string V2024_06_01_preview = "2024-06-01-preview"; - /// /// 2022-06-15. /// @@ -143,7 +138,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing PartnerNamespaceChannel. /// - /// + /// /// The the Bicep identifier name of the PartnerNamespaceChannel resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, @@ -151,6 +146,6 @@ public static class ResourceVersions /// /// Version of the PartnerNamespaceChannel. /// The existing PartnerNamespaceChannel resource. - public static PartnerNamespaceChannel FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static PartnerNamespaceChannel FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/PartnerRegistration.cs b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/PartnerRegistration.cs index 5d062ce71ced..1a99128570b7 100644 --- a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/PartnerRegistration.cs +++ b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/PartnerRegistration.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.EventGrid; /// /// PartnerRegistration. /// -public partial class PartnerRegistration : Resource +public partial class PartnerRegistration : ProvisionableResource { /// /// Name of the partner registration. @@ -65,15 +65,15 @@ public partial class PartnerRegistration : Resource /// /// Creates a new PartnerRegistration. /// - /// + /// /// The the Bicep identifier name of the PartnerRegistration resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, /// numbers, and underscores. /// /// Version of the PartnerRegistration. - public PartnerRegistration(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.EventGrid/partnerRegistrations", resourceVersion ?? "2022-06-15") + public PartnerRegistration(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.EventGrid/partnerRegistrations", resourceVersion ?? "2022-06-15") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _location = BicepValue.DefineProperty(this, "Location", ["location"], isRequired: true); @@ -89,11 +89,6 @@ public PartnerRegistration(string identifierName, string? resourceVersion = defa /// public static class ResourceVersions { - /// - /// 2024-06-01-preview. - /// - public static readonly string V2024_06_01_preview = "2024-06-01-preview"; - /// /// 2022-06-15. /// @@ -103,7 +98,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing PartnerRegistration. /// - /// + /// /// The the Bicep identifier name of the PartnerRegistration resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, @@ -111,6 +106,6 @@ public static class ResourceVersions /// /// Version of the PartnerRegistration. /// The existing PartnerRegistration resource. - public static PartnerRegistration FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static PartnerRegistration FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/PartnerTopic.cs b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/PartnerTopic.cs index 95bd514b9b8c..e727726d23fa 100644 --- a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/PartnerTopic.cs +++ b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/PartnerTopic.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.EventGrid; /// /// PartnerTopic. /// -public partial class PartnerTopic : Resource +public partial class PartnerTopic : ProvisionableResource { /// /// Name of the partner topic. @@ -112,15 +112,15 @@ public partial class PartnerTopic : Resource /// /// Creates a new PartnerTopic. /// - /// + /// /// The the Bicep identifier name of the PartnerTopic resource. This can /// be used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and /// underscores. /// /// Version of the PartnerTopic. - public PartnerTopic(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.EventGrid/partnerTopics", resourceVersion ?? "2022-06-15") + public PartnerTopic(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.EventGrid/partnerTopics", resourceVersion ?? "2022-06-15") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _location = BicepValue.DefineProperty(this, "Location", ["location"], isRequired: true); @@ -143,11 +143,6 @@ public PartnerTopic(string identifierName, string? resourceVersion = default) /// public static class ResourceVersions { - /// - /// 2024-06-01-preview. - /// - public static readonly string V2024_06_01_preview = "2024-06-01-preview"; - /// /// 2022-06-15. /// @@ -157,7 +152,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing PartnerTopic. /// - /// + /// /// The the Bicep identifier name of the PartnerTopic resource. This can /// be used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and @@ -165,6 +160,6 @@ public static class ResourceVersions /// /// Version of the PartnerTopic. /// The existing PartnerTopic resource. - public static PartnerTopic FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static PartnerTopic FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/PartnerTopicEventSubscription.cs b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/PartnerTopicEventSubscription.cs index cf9473207dc3..6dd687f91192 100644 --- a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/PartnerTopicEventSubscription.cs +++ b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/PartnerTopicEventSubscription.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.EventGrid; /// /// PartnerTopicEventSubscription. /// -public partial class PartnerTopicEventSubscription : Resource +public partial class PartnerTopicEventSubscription : ProvisionableResource { /// /// Name of the event subscription to be created. Event subscription names @@ -150,15 +150,15 @@ public partial class PartnerTopicEventSubscription : Resource /// /// Creates a new PartnerTopicEventSubscription. /// - /// + /// /// The the Bicep identifier name of the PartnerTopicEventSubscription /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the PartnerTopicEventSubscription. - public PartnerTopicEventSubscription(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.EventGrid/partnerTopics/eventSubscriptions", resourceVersion ?? "2022-06-15") + public PartnerTopicEventSubscription(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.EventGrid/partnerTopics/eventSubscriptions", resourceVersion ?? "2022-06-15") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _deadLetterDestination = BicepValue.DefineProperty(this, "DeadLetterDestination", ["properties", "deadLetterDestination"]); @@ -182,11 +182,6 @@ public PartnerTopicEventSubscription(string identifierName, string? resourceVers /// public static class ResourceVersions { - /// - /// 2024-06-01-preview. - /// - public static readonly string V2024_06_01_preview = "2024-06-01-preview"; - /// /// 2022-06-15. /// @@ -196,7 +191,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing PartnerTopicEventSubscription. /// - /// + /// /// The the Bicep identifier name of the PartnerTopicEventSubscription /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -204,6 +199,6 @@ public static class ResourceVersions /// /// Version of the PartnerTopicEventSubscription. /// The existing PartnerTopicEventSubscription resource. - public static PartnerTopicEventSubscription FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static PartnerTopicEventSubscription FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/SystemTopic.cs b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/SystemTopic.cs index d2153cbb387b..61674099e7df 100644 --- a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/SystemTopic.cs +++ b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/SystemTopic.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.EventGrid; /// /// SystemTopic. /// -public partial class SystemTopic : Resource +public partial class SystemTopic : ProvisionableResource { /// /// Name of the system topic. @@ -81,15 +81,15 @@ public partial class SystemTopic : Resource /// /// Creates a new SystemTopic. /// - /// + /// /// The the Bicep identifier name of the SystemTopic resource. This can be /// used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and /// underscores. /// /// Version of the SystemTopic. - public SystemTopic(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.EventGrid/systemTopics", resourceVersion ?? "2022-06-15") + public SystemTopic(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.EventGrid/systemTopics", resourceVersion ?? "2022-06-15") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _location = BicepValue.DefineProperty(this, "Location", ["location"], isRequired: true); @@ -108,11 +108,6 @@ public SystemTopic(string identifierName, string? resourceVersion = default) /// public static class ResourceVersions { - /// - /// 2024-06-01-preview. - /// - public static readonly string V2024_06_01_preview = "2024-06-01-preview"; - /// /// 2022-06-15. /// @@ -127,7 +122,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing SystemTopic. /// - /// + /// /// The the Bicep identifier name of the SystemTopic resource. This can be /// used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and @@ -135,6 +130,6 @@ public static class ResourceVersions /// /// Version of the SystemTopic. /// The existing SystemTopic resource. - public static SystemTopic FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static SystemTopic FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/SystemTopicEventSubscription.cs b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/SystemTopicEventSubscription.cs index cfe8d9dede75..1dfe34cdd9c1 100644 --- a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/SystemTopicEventSubscription.cs +++ b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/SystemTopicEventSubscription.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.EventGrid; /// /// SystemTopicEventSubscription. /// -public partial class SystemTopicEventSubscription : Resource +public partial class SystemTopicEventSubscription : ProvisionableResource { /// /// Name of the event subscription to be created. Event subscription names @@ -150,15 +150,15 @@ public partial class SystemTopicEventSubscription : Resource /// /// Creates a new SystemTopicEventSubscription. /// - /// + /// /// The the Bicep identifier name of the SystemTopicEventSubscription /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the SystemTopicEventSubscription. - public SystemTopicEventSubscription(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.EventGrid/systemTopics/eventSubscriptions", resourceVersion ?? "2022-06-15") + public SystemTopicEventSubscription(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.EventGrid/systemTopics/eventSubscriptions", resourceVersion ?? "2022-06-15") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _deadLetterDestination = BicepValue.DefineProperty(this, "DeadLetterDestination", ["properties", "deadLetterDestination"]); @@ -182,11 +182,6 @@ public SystemTopicEventSubscription(string identifierName, string? resourceVersi /// public static class ResourceVersions { - /// - /// 2024-06-01-preview. - /// - public static readonly string V2024_06_01_preview = "2024-06-01-preview"; - /// /// 2022-06-15. /// @@ -201,7 +196,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing SystemTopicEventSubscription. /// - /// + /// /// The the Bicep identifier name of the SystemTopicEventSubscription /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -209,6 +204,6 @@ public static class ResourceVersions /// /// Version of the SystemTopicEventSubscription. /// The existing SystemTopicEventSubscription resource. - public static SystemTopicEventSubscription FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static SystemTopicEventSubscription FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/TopicEventSubscription.cs b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/TopicEventSubscription.cs index 5d6d0ce2d73a..8a0cba4d61b8 100644 --- a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/TopicEventSubscription.cs +++ b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/TopicEventSubscription.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.EventGrid; /// /// TopicEventSubscription. /// -public partial class TopicEventSubscription : Resource +public partial class TopicEventSubscription : ProvisionableResource { /// /// Name of the event subscription to be created. Event subscription names @@ -150,15 +150,15 @@ public partial class TopicEventSubscription : Resource /// /// Creates a new TopicEventSubscription. /// - /// + /// /// The the Bicep identifier name of the TopicEventSubscription resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, /// numbers, and underscores. /// /// Version of the TopicEventSubscription. - public TopicEventSubscription(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.EventGrid/topics/eventSubscriptions", resourceVersion ?? "2022-06-15") + public TopicEventSubscription(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.EventGrid/topics/eventSubscriptions", resourceVersion ?? "2022-06-15") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _deadLetterDestination = BicepValue.DefineProperty(this, "DeadLetterDestination", ["properties", "deadLetterDestination"]); @@ -182,11 +182,6 @@ public TopicEventSubscription(string identifierName, string? resourceVersion = d /// public static class ResourceVersions { - /// - /// 2024-06-01-preview. - /// - public static readonly string V2024_06_01_preview = "2024-06-01-preview"; - /// /// 2022-06-15. /// @@ -221,7 +216,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing TopicEventSubscription. /// - /// + /// /// The the Bicep identifier name of the TopicEventSubscription resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, @@ -229,6 +224,6 @@ public static class ResourceVersions /// /// Version of the TopicEventSubscription. /// The existing TopicEventSubscription resource. - public static TopicEventSubscription FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static TopicEventSubscription FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/TopicSpace.cs b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/TopicSpace.cs index 603b8071177f..f29a84f2a326 100644 --- a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/TopicSpace.cs +++ b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Generated/TopicSpace.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.EventGrid; /// /// TopicSpace. /// -public partial class TopicSpace : Resource +public partial class TopicSpace : ProvisionableResource { /// /// The topic space name. @@ -68,15 +68,15 @@ public partial class TopicSpace : Resource /// /// Creates a new TopicSpace. /// - /// + /// /// The the Bicep identifier name of the TopicSpace resource. This can be /// used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and /// underscores. /// /// Version of the TopicSpace. - public TopicSpace(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.EventGrid/namespaces/topicSpaces", resourceVersion ?? "2024-06-01-preview") + public TopicSpace(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.EventGrid/namespaces/topicSpaces", resourceVersion) { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _description = BicepValue.DefineProperty(this, "Description", ["properties", "description"]); @@ -87,21 +87,10 @@ public TopicSpace(string identifierName, string? resourceVersion = default) _parent = ResourceReference.DefineResource(this, "Parent", ["parent"], isRequired: true); } - /// - /// Supported TopicSpace resource versions. - /// - public static class ResourceVersions - { - /// - /// 2024-06-01-preview. - /// - public static readonly string V2024_06_01_preview = "2024-06-01-preview"; - } - /// /// Creates a reference to an existing TopicSpace. /// - /// + /// /// The the Bicep identifier name of the TopicSpace resource. This can be /// used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and @@ -109,6 +98,6 @@ public static class ResourceVersions /// /// Version of the TopicSpace. /// The existing TopicSpace resource. - public static TopicSpace FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static TopicSpace FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.EventHubs/api/Azure.Provisioning.EventHubs.netstandard2.0.cs b/sdk/provisioning/Azure.Provisioning.EventHubs/api/Azure.Provisioning.EventHubs.netstandard2.0.cs index 2424ba6e56da..8aea9f4a43ab 100644 --- a/sdk/provisioning/Azure.Provisioning.EventHubs/api/Azure.Provisioning.EventHubs.netstandard2.0.cs +++ b/sdk/provisioning/Azure.Provisioning.EventHubs/api/Azure.Provisioning.EventHubs.netstandard2.0.cs @@ -1,6 +1,6 @@ namespace Azure.Provisioning.EventHubs { - public partial class CaptureDescription : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class CaptureDescription : Azure.Provisioning.Primitives.ProvisionableConstruct { public CaptureDescription() { } public Azure.Provisioning.BicepValue Destination { get { throw null; } set { } } @@ -21,9 +21,9 @@ public enum EncodingCaptureDescription Avro = 0, AvroDeflate = 1, } - public partial class EventHub : Azure.Provisioning.Primitives.Resource + public partial class EventHub : Azure.Provisioning.Primitives.ProvisionableResource { - public EventHub(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public EventHub(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue CaptureDescription { get { throw null; } set { } } public Azure.Provisioning.BicepValue CreatedOn { get { throw null; } } public Azure.Provisioning.BicepValue Id { get { throw null; } } @@ -36,25 +36,24 @@ public partial class EventHub : Azure.Provisioning.Primitives.Resource public Azure.Provisioning.BicepValue Status { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepValue UpdatedOn { get { throw null; } } - public static Azure.Provisioning.EventHubs.EventHub FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.EventHubs.EventHub FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2017_04_01; public static readonly string V2021_11_01; public static readonly string V2024_01_01; - public static readonly string V2024_05_01_preview; } } - public partial class EventHubAuthorizationRule : Azure.Provisioning.Primitives.Resource + public partial class EventHubAuthorizationRule : Azure.Provisioning.Primitives.ProvisionableResource { - public EventHubAuthorizationRule(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public EventHubAuthorizationRule(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Location { get { throw null; } } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } public Azure.Provisioning.EventHubs.EventHub? Parent { get { throw null; } set { } } public Azure.Provisioning.BicepList Rights { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.EventHubs.EventHubAuthorizationRule FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.EventHubs.EventHubAuthorizationRule FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public Azure.Provisioning.EventHubs.EventHubsAccessKeys GetKeys() { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override Azure.Provisioning.Primitives.ResourceNameRequirements GetResourceNameRequirements() { throw null; } @@ -63,10 +62,9 @@ public static partial class ResourceVersions public static readonly string V2017_04_01; public static readonly string V2021_11_01; public static readonly string V2024_01_01; - public static readonly string V2024_05_01_preview; } } - public partial class EventHubDestination : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class EventHubDestination : Azure.Provisioning.Primitives.ProvisionableConstruct { public EventHubDestination() { } public Azure.Provisioning.BicepValue ArchiveNameFormat { get { throw null; } set { } } @@ -90,7 +88,7 @@ public enum EventHubEntityStatus Deleting = 7, Renaming = 8, } - public partial class EventHubsAccessKeys : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class EventHubsAccessKeys : Azure.Provisioning.Primitives.ProvisionableConstruct { public EventHubsAccessKeys() { } public Azure.Provisioning.BicepValue AliasPrimaryConnectionString { get { throw null; } } @@ -101,7 +99,7 @@ public EventHubsAccessKeys() { } public Azure.Provisioning.BicepValue SecondaryConnectionString { get { throw null; } } public Azure.Provisioning.BicepValue SecondaryKey { get { throw null; } } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public static Azure.Provisioning.EventHubs.EventHubsAccessKeys FromExpression(Azure.Provisioning.Expressions.Expression expression) { throw null; } + public static Azure.Provisioning.EventHubs.EventHubsAccessKeys FromExpression(Azure.Provisioning.Expressions.BicepExpression expression) { throw null; } } public enum EventHubsAccessRight { @@ -109,9 +107,9 @@ public enum EventHubsAccessRight Send = 1, Listen = 2, } - public partial class EventHubsApplicationGroup : Azure.Provisioning.Primitives.Resource + public partial class EventHubsApplicationGroup : Azure.Provisioning.Primitives.ProvisionableResource { - public EventHubsApplicationGroup(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public EventHubsApplicationGroup(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue ClientAppGroupIdentifier { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue IsEnabled { get { throw null; } set { } } @@ -120,14 +118,13 @@ public partial class EventHubsApplicationGroup : Azure.Provisioning.Primitives.R public Azure.Provisioning.EventHubs.EventHubsNamespace? Parent { get { throw null; } set { } } public Azure.Provisioning.BicepList Policies { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.EventHubs.EventHubsApplicationGroup FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.EventHubs.EventHubsApplicationGroup FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2024_01_01; - public static readonly string V2024_05_01_preview; } } - public partial class EventHubsApplicationGroupPolicy : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class EventHubsApplicationGroupPolicy : Azure.Provisioning.Primitives.ProvisionableConstruct { public EventHubsApplicationGroupPolicy() { } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } @@ -155,7 +152,7 @@ public EventHubsApplicationGroupPolicy() { } public static bool operator !=(Azure.Provisioning.EventHubs.EventHubsBuiltInRole left, Azure.Provisioning.EventHubs.EventHubsBuiltInRole right) { throw null; } public override string ToString() { throw null; } } - public partial class EventHubsCaptureIdentity : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class EventHubsCaptureIdentity : Azure.Provisioning.Primitives.ProvisionableConstruct { public EventHubsCaptureIdentity() { } public Azure.Provisioning.BicepValue IdentityType { get { throw null; } set { } } @@ -166,9 +163,9 @@ public enum EventHubsCaptureIdentityType SystemAssigned = 0, UserAssigned = 1, } - public partial class EventHubsCluster : Azure.Provisioning.Primitives.Resource + public partial class EventHubsCluster : Azure.Provisioning.Primitives.ProvisionableResource { - public EventHubsCluster(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public EventHubsCluster(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue CreatedOn { get { throw null; } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Location { get { throw null; } set { } } @@ -181,16 +178,15 @@ public partial class EventHubsCluster : Azure.Provisioning.Primitives.Resource public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } public Azure.Provisioning.BicepValue UpdatedOn { get { throw null; } } - public Azure.Provisioning.Authorization.RoleAssignment CreateRoleAssignment(Azure.Provisioning.EventHubs.EventHubsBuiltInRole role, Azure.Provisioning.BicepValue principalType, Azure.Provisioning.BicepValue principalId, string? identifierNameSuffix = null) { throw null; } + public Azure.Provisioning.Authorization.RoleAssignment CreateRoleAssignment(Azure.Provisioning.EventHubs.EventHubsBuiltInRole role, Azure.Provisioning.BicepValue principalType, Azure.Provisioning.BicepValue principalId, string? bicepIdentifierSuffix = null) { throw null; } public Azure.Provisioning.Authorization.RoleAssignment CreateRoleAssignment(Azure.Provisioning.EventHubs.EventHubsBuiltInRole role, Azure.Provisioning.Roles.UserAssignedIdentity identity) { throw null; } - public static Azure.Provisioning.EventHubs.EventHubsCluster FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.EventHubs.EventHubsCluster FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override Azure.Provisioning.Primitives.ResourceNameRequirements GetResourceNameRequirements() { throw null; } public static partial class ResourceVersions { public static readonly string V2021_11_01; public static readonly string V2024_01_01; - public static readonly string V2024_05_01_preview; } } public enum EventHubsClusterProvisioningState @@ -204,7 +200,7 @@ public enum EventHubsClusterProvisioningState Succeeded = 6, Canceled = 7, } - public partial class EventHubsClusterSku : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class EventHubsClusterSku : Azure.Provisioning.Primitives.ProvisionableConstruct { public EventHubsClusterSku() { } public Azure.Provisioning.BicepValue Capacity { get { throw null; } set { } } @@ -214,9 +210,9 @@ public enum EventHubsClusterSkuName { Dedicated = 0, } - public partial class EventHubsConsumerGroup : Azure.Provisioning.Primitives.Resource + public partial class EventHubsConsumerGroup : Azure.Provisioning.Primitives.ProvisionableResource { - public EventHubsConsumerGroup(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public EventHubsConsumerGroup(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue CreatedOn { get { throw null; } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Location { get { throw null; } } @@ -225,7 +221,7 @@ public partial class EventHubsConsumerGroup : Azure.Provisioning.Primitives.Reso public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepValue UpdatedOn { get { throw null; } } public Azure.Provisioning.BicepValue UserMetadata { get { throw null; } set { } } - public static Azure.Provisioning.EventHubs.EventHubsConsumerGroup FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.EventHubs.EventHubsConsumerGroup FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override Azure.Provisioning.Primitives.ResourceNameRequirements GetResourceNameRequirements() { throw null; } public static partial class ResourceVersions @@ -233,12 +229,11 @@ public static partial class ResourceVersions public static readonly string V2017_04_01; public static readonly string V2021_11_01; public static readonly string V2024_01_01; - public static readonly string V2024_05_01_preview; } } - public partial class EventHubsDisasterRecovery : Azure.Provisioning.Primitives.Resource + public partial class EventHubsDisasterRecovery : Azure.Provisioning.Primitives.ProvisionableResource { - public EventHubsDisasterRecovery(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public EventHubsDisasterRecovery(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue AlternateName { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Location { get { throw null; } } @@ -249,7 +244,7 @@ public partial class EventHubsDisasterRecovery : Azure.Provisioning.Primitives.R public Azure.Provisioning.BicepValue ProvisioningState { get { throw null; } } public Azure.Provisioning.BicepValue Role { get { throw null; } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.EventHubs.EventHubsDisasterRecovery FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.EventHubs.EventHubsDisasterRecovery FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override Azure.Provisioning.Primitives.ResourceNameRequirements GetResourceNameRequirements() { throw null; } public static partial class ResourceVersions @@ -257,7 +252,6 @@ public static partial class ResourceVersions public static readonly string V2017_04_01; public static readonly string V2021_11_01; public static readonly string V2024_01_01; - public static readonly string V2024_05_01_preview; } } public enum EventHubsDisasterRecoveryProvisioningState @@ -272,7 +266,7 @@ public enum EventHubsDisasterRecoveryRole PrimaryNotReplicating = 1, Secondary = 2, } - public partial class EventHubsEncryption : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class EventHubsEncryption : Azure.Provisioning.Primitives.ProvisionableConstruct { public EventHubsEncryption() { } public Azure.Provisioning.BicepValue KeySource { get { throw null; } set { } } @@ -284,7 +278,7 @@ public enum EventHubsKeySource [System.Runtime.Serialization.DataMemberAttribute(Name="Microsoft.KeyVault")] MicrosoftKeyVault = 0, } - public partial class EventHubsKeyVaultProperties : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class EventHubsKeyVaultProperties : Azure.Provisioning.Primitives.ProvisionableConstruct { public EventHubsKeyVaultProperties() { } public Azure.Provisioning.BicepValue KeyName { get { throw null; } set { } } @@ -299,9 +293,9 @@ public enum EventHubsMetricId IncomingMessages = 2, OutgoingMessages = 3, } - public partial class EventHubsNamespace : Azure.Provisioning.Primitives.Resource + public partial class EventHubsNamespace : Azure.Provisioning.Primitives.ProvisionableResource { - public EventHubsNamespace(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public EventHubsNamespace(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue AlternateName { get { throw null; } set { } } public Azure.Provisioning.BicepValue ClusterArmId { get { throw null; } set { } } public Azure.Provisioning.BicepValue CreatedOn { get { throw null; } } @@ -327,9 +321,9 @@ public partial class EventHubsNamespace : Azure.Provisioning.Primitives.Resource public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } public Azure.Provisioning.BicepValue UpdatedOn { get { throw null; } } public Azure.Provisioning.BicepValue ZoneRedundant { get { throw null; } set { } } - public Azure.Provisioning.Authorization.RoleAssignment CreateRoleAssignment(Azure.Provisioning.EventHubs.EventHubsBuiltInRole role, Azure.Provisioning.BicepValue principalType, Azure.Provisioning.BicepValue principalId, string? identifierNameSuffix = null) { throw null; } + public Azure.Provisioning.Authorization.RoleAssignment CreateRoleAssignment(Azure.Provisioning.EventHubs.EventHubsBuiltInRole role, Azure.Provisioning.BicepValue principalType, Azure.Provisioning.BicepValue principalId, string? bicepIdentifierSuffix = null) { throw null; } public Azure.Provisioning.Authorization.RoleAssignment CreateRoleAssignment(Azure.Provisioning.EventHubs.EventHubsBuiltInRole role, Azure.Provisioning.Roles.UserAssignedIdentity identity) { throw null; } - public static Azure.Provisioning.EventHubs.EventHubsNamespace FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.EventHubs.EventHubsNamespace FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override Azure.Provisioning.Primitives.ResourceNameRequirements GetResourceNameRequirements() { throw null; } public static partial class ResourceVersions @@ -339,19 +333,18 @@ public static partial class ResourceVersions public static readonly string V2017_04_01; public static readonly string V2021_11_01; public static readonly string V2024_01_01; - public static readonly string V2024_05_01_preview; } } - public partial class EventHubsNamespaceAuthorizationRule : Azure.Provisioning.Primitives.Resource + public partial class EventHubsNamespaceAuthorizationRule : Azure.Provisioning.Primitives.ProvisionableResource { - public EventHubsNamespaceAuthorizationRule(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public EventHubsNamespaceAuthorizationRule(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Location { get { throw null; } } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } public Azure.Provisioning.EventHubs.EventHubsNamespace? Parent { get { throw null; } set { } } public Azure.Provisioning.BicepList Rights { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.EventHubs.EventHubsNamespaceAuthorizationRule FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.EventHubs.EventHubsNamespaceAuthorizationRule FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public Azure.Provisioning.EventHubs.EventHubsAccessKeys GetKeys() { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override Azure.Provisioning.Primitives.ResourceNameRequirements GetResourceNameRequirements() { throw null; } @@ -360,16 +353,15 @@ public static partial class ResourceVersions public static readonly string V2017_04_01; public static readonly string V2021_11_01; public static readonly string V2024_01_01; - public static readonly string V2024_05_01_preview; } } public enum EventHubsNetworkRuleIPAction { Allow = 0, } - public partial class EventHubsNetworkRuleSet : Azure.Provisioning.Primitives.Resource + public partial class EventHubsNetworkRuleSet : Azure.Provisioning.Primitives.ProvisionableResource { - public EventHubsNetworkRuleSet(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public EventHubsNetworkRuleSet(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue DefaultAction { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepList IPRules { get { throw null; } set { } } @@ -380,13 +372,12 @@ public partial class EventHubsNetworkRuleSet : Azure.Provisioning.Primitives.Res public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepValue TrustedServiceAccessEnabled { get { throw null; } set { } } public Azure.Provisioning.BicepList VirtualNetworkRules { get { throw null; } set { } } - public static Azure.Provisioning.EventHubs.EventHubsNetworkRuleSet FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.EventHubs.EventHubsNetworkRuleSet FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2017_04_01; public static readonly string V2021_11_01; public static readonly string V2024_01_01; - public static readonly string V2024_05_01_preview; } } public enum EventHubsNetworkRuleSetDefaultAction @@ -394,21 +385,21 @@ public enum EventHubsNetworkRuleSetDefaultAction Allow = 0, Deny = 1, } - public partial class EventHubsNetworkRuleSetIPRules : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class EventHubsNetworkRuleSetIPRules : Azure.Provisioning.Primitives.ProvisionableConstruct { public EventHubsNetworkRuleSetIPRules() { } public Azure.Provisioning.BicepValue Action { get { throw null; } set { } } public Azure.Provisioning.BicepValue IPMask { get { throw null; } set { } } } - public partial class EventHubsNetworkRuleSetVirtualNetworkRules : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class EventHubsNetworkRuleSetVirtualNetworkRules : Azure.Provisioning.Primitives.ProvisionableConstruct { public EventHubsNetworkRuleSetVirtualNetworkRules() { } public Azure.Provisioning.BicepValue IgnoreMissingVnetServiceEndpoint { get { throw null; } set { } } public Azure.Provisioning.BicepValue SubnetId { get { throw null; } set { } } } - public partial class EventHubsPrivateEndpointConnection : Azure.Provisioning.Primitives.Resource + public partial class EventHubsPrivateEndpointConnection : Azure.Provisioning.Primitives.ProvisionableResource { - public EventHubsPrivateEndpointConnection(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public EventHubsPrivateEndpointConnection(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue ConnectionState { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Location { get { throw null; } } @@ -417,15 +408,14 @@ public partial class EventHubsPrivateEndpointConnection : Azure.Provisioning.Pri public Azure.Provisioning.BicepValue PrivateEndpointId { get { throw null; } set { } } public Azure.Provisioning.BicepValue ProvisioningState { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.EventHubs.EventHubsPrivateEndpointConnection FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.EventHubs.EventHubsPrivateEndpointConnection FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2021_11_01; public static readonly string V2024_01_01; - public static readonly string V2024_05_01_preview; } } - public partial class EventHubsPrivateEndpointConnectionData : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class EventHubsPrivateEndpointConnectionData : Azure.Provisioning.Primitives.ProvisionableConstruct { public EventHubsPrivateEndpointConnectionData() { } public Azure.Provisioning.BicepValue ConnectionState { get { throw null; } set { } } @@ -452,7 +442,7 @@ public enum EventHubsPrivateLinkConnectionStatus Rejected = 2, Disconnected = 3, } - public partial class EventHubsPrivateLinkServiceConnectionState : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class EventHubsPrivateLinkServiceConnectionState : Azure.Provisioning.Primitives.ProvisionableConstruct { public EventHubsPrivateLinkServiceConnectionState() { } public Azure.Provisioning.BicepValue Description { get { throw null; } set { } } @@ -476,9 +466,9 @@ public enum EventHubsSchemaCompatibility Backward = 1, Forward = 2, } - public partial class EventHubsSchemaGroup : Azure.Provisioning.Primitives.Resource + public partial class EventHubsSchemaGroup : Azure.Provisioning.Primitives.ProvisionableResource { - public EventHubsSchemaGroup(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public EventHubsSchemaGroup(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue CreatedAtUtc { get { throw null; } } public Azure.Provisioning.BicepValue ETag { get { throw null; } } public Azure.Provisioning.BicepDictionary GroupProperties { get { throw null; } set { } } @@ -490,7 +480,7 @@ public partial class EventHubsSchemaGroup : Azure.Provisioning.Primitives.Resour public Azure.Provisioning.BicepValue SchemaType { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepValue UpdatedAtUtc { get { throw null; } } - public static Azure.Provisioning.EventHubs.EventHubsSchemaGroup FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.EventHubs.EventHubsSchemaGroup FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2014_09_01; @@ -498,7 +488,6 @@ public static partial class ResourceVersions public static readonly string V2017_04_01; public static readonly string V2021_11_01; public static readonly string V2024_01_01; - public static readonly string V2024_05_01_preview; } } public enum EventHubsSchemaType @@ -506,7 +495,7 @@ public enum EventHubsSchemaType Unknown = 0, Avro = 1, } - public partial class EventHubsSku : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class EventHubsSku : Azure.Provisioning.Primitives.ProvisionableConstruct { public EventHubsSku() { } public Azure.Provisioning.BicepValue Capacity { get { throw null; } set { } } @@ -540,7 +529,7 @@ public enum EventHubsTlsVersion [System.Runtime.Serialization.DataMemberAttribute(Name="1.2")] Tls1_2 = 2, } - public partial class NamespaceGeoDataReplicationProperties : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class NamespaceGeoDataReplicationProperties : Azure.Provisioning.Primitives.ProvisionableConstruct { public NamespaceGeoDataReplicationProperties() { } public Azure.Provisioning.BicepList Locations { get { throw null; } set { } } @@ -551,14 +540,14 @@ public enum NamespaceGeoDRRoleType Primary = 0, Secondary = 1, } - public partial class NamespaceReplicaLocation : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class NamespaceReplicaLocation : Azure.Provisioning.Primitives.ProvisionableConstruct { public NamespaceReplicaLocation() { } public Azure.Provisioning.BicepValue ClusterArmId { get { throw null; } set { } } public Azure.Provisioning.BicepValue LocationName { get { throw null; } set { } } public Azure.Provisioning.BicepValue RoleType { get { throw null; } set { } } } - public partial class RetentionDescription : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class RetentionDescription : Azure.Provisioning.Primitives.ProvisionableConstruct { public RetentionDescription() { } public Azure.Provisioning.BicepValue CleanupPolicy { get { throw null; } set { } } diff --git a/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/EventHub.cs b/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/EventHub.cs index 7ebd14515927..9f06d45fd535 100644 --- a/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/EventHub.cs +++ b/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/EventHub.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.EventHubs; /// /// EventHub. /// -public partial class EventHub : Resource +public partial class EventHub : ProvisionableResource { /// /// The Event Hub name. @@ -94,15 +94,15 @@ public partial class EventHub : Resource /// /// Creates a new EventHub. /// - /// + /// /// The the Bicep identifier name of the EventHub resource. This can be /// used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and /// underscores. /// /// Version of the EventHub. - public EventHub(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.EventHub/namespaces/eventhubs", resourceVersion ?? "2024-01-01") + public EventHub(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.EventHub/namespaces/eventhubs", resourceVersion ?? "2024-01-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _captureDescription = BicepValue.DefineProperty(this, "CaptureDescription", ["properties", "captureDescription"]); @@ -123,11 +123,6 @@ public EventHub(string identifierName, string? resourceVersion = default) /// public static class ResourceVersions { - /// - /// 2024-05-01-preview. - /// - public static readonly string V2024_05_01_preview = "2024-05-01-preview"; - /// /// 2024-01-01. /// @@ -147,7 +142,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing EventHub. /// - /// + /// /// The the Bicep identifier name of the EventHub resource. This can be /// used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and @@ -155,6 +150,6 @@ public static class ResourceVersions /// /// Version of the EventHub. /// The existing EventHub resource. - public static EventHub FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static EventHub FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/EventHubAuthorizationRule.cs b/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/EventHubAuthorizationRule.cs index 8ff4a065039f..b59fd6f8b799 100644 --- a/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/EventHubAuthorizationRule.cs +++ b/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/EventHubAuthorizationRule.cs @@ -18,7 +18,7 @@ namespace Azure.Provisioning.EventHubs; /// /// EventHubAuthorizationRule. /// -public partial class EventHubAuthorizationRule : Resource +public partial class EventHubAuthorizationRule : ProvisionableResource { /// /// The authorization rule name. @@ -59,15 +59,15 @@ public partial class EventHubAuthorizationRule : Resource /// /// Creates a new EventHubAuthorizationRule. /// - /// + /// /// The the Bicep identifier name of the EventHubAuthorizationRule /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the EventHubAuthorizationRule. - public EventHubAuthorizationRule(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.EventHub/namespaces/eventhubs/authorizationRules", resourceVersion ?? "2024-01-01") + public EventHubAuthorizationRule(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.EventHub/namespaces/eventhubs/authorizationRules", resourceVersion ?? "2024-01-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _rights = BicepList.DefineProperty(this, "Rights", ["properties", "rights"]); @@ -82,11 +82,6 @@ public EventHubAuthorizationRule(string identifierName, string? resourceVersion /// public static class ResourceVersions { - /// - /// 2024-05-01-preview. - /// - public static readonly string V2024_05_01_preview = "2024-05-01-preview"; - /// /// 2024-01-01. /// @@ -106,7 +101,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing EventHubAuthorizationRule. /// - /// + /// /// The the Bicep identifier name of the EventHubAuthorizationRule /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -114,8 +109,8 @@ public static class ResourceVersions /// /// Version of the EventHubAuthorizationRule. /// The existing EventHubAuthorizationRule resource. - public static EventHubAuthorizationRule FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static EventHubAuthorizationRule FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; /// /// Get the requirements for naming this EventHubAuthorizationRule resource. @@ -131,5 +126,5 @@ public override ResourceNameRequirements GetResourceNameRequirements() => /// The keys for this EventHubAuthorizationRule resource. public EventHubsAccessKeys GetKeys() => EventHubsAccessKeys.FromExpression( - new FunctionCallExpression(new MemberExpression(new IdentifierExpression(IdentifierName), "listKeys"))); + new FunctionCallExpression(new MemberExpression(new IdentifierExpression(BicepIdentifier), "listKeys"))); } diff --git a/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/EventHubsApplicationGroup.cs b/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/EventHubsApplicationGroup.cs index efb06b0c689b..8745640cba3e 100644 --- a/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/EventHubsApplicationGroup.cs +++ b/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/EventHubsApplicationGroup.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.EventHubs; /// /// EventHubsApplicationGroup. /// -public partial class EventHubsApplicationGroup : Resource +public partial class EventHubsApplicationGroup : ProvisionableResource { /// /// The Application Group name. @@ -81,15 +81,15 @@ public partial class EventHubsApplicationGroup : Resource /// /// Creates a new EventHubsApplicationGroup. /// - /// + /// /// The the Bicep identifier name of the EventHubsApplicationGroup /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the EventHubsApplicationGroup. - public EventHubsApplicationGroup(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.EventHub/namespaces/applicationGroups", resourceVersion ?? "2024-01-01") + public EventHubsApplicationGroup(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.EventHub/namespaces/applicationGroups", resourceVersion ?? "2024-01-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _clientAppGroupIdentifier = BicepValue.DefineProperty(this, "ClientAppGroupIdentifier", ["properties", "clientAppGroupIdentifier"]); @@ -106,11 +106,6 @@ public EventHubsApplicationGroup(string identifierName, string? resourceVersion /// public static class ResourceVersions { - /// - /// 2024-05-01-preview. - /// - public static readonly string V2024_05_01_preview = "2024-05-01-preview"; - /// /// 2024-01-01. /// @@ -120,7 +115,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing EventHubsApplicationGroup. /// - /// + /// /// The the Bicep identifier name of the EventHubsApplicationGroup /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -128,6 +123,6 @@ public static class ResourceVersions /// /// Version of the EventHubsApplicationGroup. /// The existing EventHubsApplicationGroup resource. - public static EventHubsApplicationGroup FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static EventHubsApplicationGroup FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/EventHubsCluster.cs b/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/EventHubsCluster.cs index a94341339918..a30bff85db12 100644 --- a/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/EventHubsCluster.cs +++ b/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/EventHubsCluster.cs @@ -20,7 +20,7 @@ namespace Azure.Provisioning.EventHubs; /// /// EventHubsCluster. /// -public partial class EventHubsCluster : Resource +public partial class EventHubsCluster : ProvisionableResource { /// /// The name of the Event Hubs Cluster. @@ -98,15 +98,15 @@ public partial class EventHubsCluster : Resource /// /// Creates a new EventHubsCluster. /// - /// + /// /// The the Bicep identifier name of the EventHubsCluster resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, /// and underscores. /// /// Version of the EventHubsCluster. - public EventHubsCluster(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.EventHub/clusters", resourceVersion ?? "2024-01-01") + public EventHubsCluster(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.EventHub/clusters", resourceVersion ?? "2024-01-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _location = BicepValue.DefineProperty(this, "Location", ["location"], isRequired: true); @@ -127,11 +127,6 @@ public EventHubsCluster(string identifierName, string? resourceVersion = default /// public static class ResourceVersions { - /// - /// 2024-05-01-preview. - /// - public static readonly string V2024_05_01_preview = "2024-05-01-preview"; - /// /// 2024-01-01. /// @@ -146,7 +141,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing EventHubsCluster. /// - /// + /// /// The the Bicep identifier name of the EventHubsCluster resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, @@ -154,8 +149,8 @@ public static class ResourceVersions /// /// Version of the EventHubsCluster. /// The existing EventHubsCluster resource. - public static EventHubsCluster FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static EventHubsCluster FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; /// /// Get the requirements for naming this EventHubsCluster resource. @@ -173,10 +168,10 @@ public override ResourceNameRequirements GetResourceNameRequirements() => /// The . /// The . public RoleAssignment CreateRoleAssignment(EventHubsBuiltInRole role, UserAssignedIdentity identity) => - new($"{IdentifierName}_{identity.IdentifierName}_{EventHubsBuiltInRole.GetBuiltInRoleName(role)}") + new($"{BicepIdentifier}_{identity.BicepIdentifier}_{EventHubsBuiltInRole.GetBuiltInRoleName(role)}") { Name = BicepFunction.CreateGuid(Id, identity.PrincipalId, BicepFunction.GetSubscriptionResourceId("Microsoft.Authorization/roleDefinitions", role.ToString())), - Scope = new IdentifierExpression(IdentifierName), + Scope = new IdentifierExpression(BicepIdentifier), PrincipalType = RoleManagementPrincipalType.ServicePrincipal, RoleDefinitionId = BicepFunction.GetSubscriptionResourceId("Microsoft.Authorization/roleDefinitions", role.ToString()), PrincipalId = identity.PrincipalId @@ -189,13 +184,13 @@ public RoleAssignment CreateRoleAssignment(EventHubsBuiltInRole role, UserAssign /// The role to grant. /// The type of the principal to assign to. /// The principal to assign to. - /// Optional role assignment identifier name suffix. + /// Optional role assignment identifier name suffix. /// The . - public RoleAssignment CreateRoleAssignment(EventHubsBuiltInRole role, BicepValue principalType, BicepValue principalId, string? identifierNameSuffix = default) => - new($"{IdentifierName}_{EventHubsBuiltInRole.GetBuiltInRoleName(role)}{(identifierNameSuffix is null ? "" : "_")}{identifierNameSuffix}") + public RoleAssignment CreateRoleAssignment(EventHubsBuiltInRole role, BicepValue principalType, BicepValue principalId, string? bicepIdentifierSuffix = default) => + new($"{BicepIdentifier}_{EventHubsBuiltInRole.GetBuiltInRoleName(role)}{(bicepIdentifierSuffix is null ? "" : "_")}{bicepIdentifierSuffix}") { Name = BicepFunction.CreateGuid(Id, principalId, BicepFunction.GetSubscriptionResourceId("Microsoft.Authorization/roleDefinitions", role.ToString())), - Scope = new IdentifierExpression(IdentifierName), + Scope = new IdentifierExpression(BicepIdentifier), PrincipalType = principalType, RoleDefinitionId = BicepFunction.GetSubscriptionResourceId("Microsoft.Authorization/roleDefinitions", role.ToString()), PrincipalId = principalId diff --git a/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/EventHubsConsumerGroup.cs b/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/EventHubsConsumerGroup.cs index f3b9b59ebc11..2cbd6e325c95 100644 --- a/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/EventHubsConsumerGroup.cs +++ b/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/EventHubsConsumerGroup.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.EventHubs; /// /// EventHubsConsumerGroup. /// -public partial class EventHubsConsumerGroup : Resource +public partial class EventHubsConsumerGroup : ProvisionableResource { /// /// The consumer group name. @@ -72,15 +72,15 @@ public partial class EventHubsConsumerGroup : Resource /// /// Creates a new EventHubsConsumerGroup. /// - /// + /// /// The the Bicep identifier name of the EventHubsConsumerGroup resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, /// numbers, and underscores. /// /// Version of the EventHubsConsumerGroup. - public EventHubsConsumerGroup(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.EventHub/namespaces/eventhubs/consumergroups", resourceVersion ?? "2024-01-01") + public EventHubsConsumerGroup(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.EventHub/namespaces/eventhubs/consumergroups", resourceVersion ?? "2024-01-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _userMetadata = BicepValue.DefineProperty(this, "UserMetadata", ["properties", "userMetadata"]); @@ -97,11 +97,6 @@ public EventHubsConsumerGroup(string identifierName, string? resourceVersion = d /// public static class ResourceVersions { - /// - /// 2024-05-01-preview. - /// - public static readonly string V2024_05_01_preview = "2024-05-01-preview"; - /// /// 2024-01-01. /// @@ -121,7 +116,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing EventHubsConsumerGroup. /// - /// + /// /// The the Bicep identifier name of the EventHubsConsumerGroup resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, @@ -129,8 +124,8 @@ public static class ResourceVersions /// /// Version of the EventHubsConsumerGroup. /// The existing EventHubsConsumerGroup resource. - public static EventHubsConsumerGroup FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static EventHubsConsumerGroup FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; /// /// Get the requirements for naming this EventHubsConsumerGroup resource. diff --git a/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/EventHubsDisasterRecovery.cs b/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/EventHubsDisasterRecovery.cs index 8394c2c36a4c..b260491c7312 100644 --- a/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/EventHubsDisasterRecovery.cs +++ b/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/EventHubsDisasterRecovery.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.EventHubs; /// /// EventHubsDisasterRecovery. /// -public partial class EventHubsDisasterRecovery : Resource +public partial class EventHubsDisasterRecovery : ProvisionableResource { /// /// Gets the Name. @@ -85,15 +85,15 @@ public partial class EventHubsDisasterRecovery : Resource /// /// Creates a new EventHubsDisasterRecovery. /// - /// + /// /// The the Bicep identifier name of the EventHubsDisasterRecovery /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the EventHubsDisasterRecovery. - public EventHubsDisasterRecovery(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.EventHub/namespaces/disasterRecoveryConfigs", resourceVersion ?? "2024-01-01") + public EventHubsDisasterRecovery(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.EventHub/namespaces/disasterRecoveryConfigs", resourceVersion ?? "2024-01-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _alternateName = BicepValue.DefineProperty(this, "AlternateName", ["properties", "alternateName"]); @@ -112,11 +112,6 @@ public EventHubsDisasterRecovery(string identifierName, string? resourceVersion /// public static class ResourceVersions { - /// - /// 2024-05-01-preview. - /// - public static readonly string V2024_05_01_preview = "2024-05-01-preview"; - /// /// 2024-01-01. /// @@ -136,7 +131,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing EventHubsDisasterRecovery. /// - /// + /// /// The the Bicep identifier name of the EventHubsDisasterRecovery /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -144,8 +139,8 @@ public static class ResourceVersions /// /// Version of the EventHubsDisasterRecovery. /// The existing EventHubsDisasterRecovery resource. - public static EventHubsDisasterRecovery FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static EventHubsDisasterRecovery FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; /// /// Get the requirements for naming this EventHubsDisasterRecovery resource. diff --git a/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/EventHubsNamespace.cs b/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/EventHubsNamespace.cs index 5efdeaf1f5ac..0ef57a14f9d4 100644 --- a/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/EventHubsNamespace.cs +++ b/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/EventHubsNamespace.cs @@ -20,7 +20,7 @@ namespace Azure.Provisioning.EventHubs; /// /// EventHubsNamespace. /// -public partial class EventHubsNamespace : Resource +public partial class EventHubsNamespace : ProvisionableResource { /// /// The Namespace name. @@ -181,15 +181,15 @@ public partial class EventHubsNamespace : Resource /// /// Creates a new EventHubsNamespace. /// - /// + /// /// The the Bicep identifier name of the EventHubsNamespace resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, /// and underscores. /// /// Version of the EventHubsNamespace. - public EventHubsNamespace(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.EventHub/namespaces", resourceVersion ?? "2024-01-01") + public EventHubsNamespace(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.EventHub/namespaces", resourceVersion ?? "2024-01-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _location = BicepValue.DefineProperty(this, "Location", ["location"], isRequired: true); @@ -223,11 +223,6 @@ public EventHubsNamespace(string identifierName, string? resourceVersion = defau /// public static class ResourceVersions { - /// - /// 2024-05-01-preview. - /// - public static readonly string V2024_05_01_preview = "2024-05-01-preview"; - /// /// 2024-01-01. /// @@ -257,7 +252,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing EventHubsNamespace. /// - /// + /// /// The the Bicep identifier name of the EventHubsNamespace resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, @@ -265,8 +260,8 @@ public static class ResourceVersions /// /// Version of the EventHubsNamespace. /// The existing EventHubsNamespace resource. - public static EventHubsNamespace FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static EventHubsNamespace FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; /// /// Get the requirements for naming this EventHubsNamespace resource. @@ -284,10 +279,10 @@ public override ResourceNameRequirements GetResourceNameRequirements() => /// The . /// The . public RoleAssignment CreateRoleAssignment(EventHubsBuiltInRole role, UserAssignedIdentity identity) => - new($"{IdentifierName}_{identity.IdentifierName}_{EventHubsBuiltInRole.GetBuiltInRoleName(role)}") + new($"{BicepIdentifier}_{identity.BicepIdentifier}_{EventHubsBuiltInRole.GetBuiltInRoleName(role)}") { Name = BicepFunction.CreateGuid(Id, identity.PrincipalId, BicepFunction.GetSubscriptionResourceId("Microsoft.Authorization/roleDefinitions", role.ToString())), - Scope = new IdentifierExpression(IdentifierName), + Scope = new IdentifierExpression(BicepIdentifier), PrincipalType = RoleManagementPrincipalType.ServicePrincipal, RoleDefinitionId = BicepFunction.GetSubscriptionResourceId("Microsoft.Authorization/roleDefinitions", role.ToString()), PrincipalId = identity.PrincipalId @@ -300,13 +295,13 @@ public RoleAssignment CreateRoleAssignment(EventHubsBuiltInRole role, UserAssign /// The role to grant. /// The type of the principal to assign to. /// The principal to assign to. - /// Optional role assignment identifier name suffix. + /// Optional role assignment identifier name suffix. /// The . - public RoleAssignment CreateRoleAssignment(EventHubsBuiltInRole role, BicepValue principalType, BicepValue principalId, string? identifierNameSuffix = default) => - new($"{IdentifierName}_{EventHubsBuiltInRole.GetBuiltInRoleName(role)}{(identifierNameSuffix is null ? "" : "_")}{identifierNameSuffix}") + public RoleAssignment CreateRoleAssignment(EventHubsBuiltInRole role, BicepValue principalType, BicepValue principalId, string? bicepIdentifierSuffix = default) => + new($"{BicepIdentifier}_{EventHubsBuiltInRole.GetBuiltInRoleName(role)}{(bicepIdentifierSuffix is null ? "" : "_")}{bicepIdentifierSuffix}") { Name = BicepFunction.CreateGuid(Id, principalId, BicepFunction.GetSubscriptionResourceId("Microsoft.Authorization/roleDefinitions", role.ToString())), - Scope = new IdentifierExpression(IdentifierName), + Scope = new IdentifierExpression(BicepIdentifier), PrincipalType = principalType, RoleDefinitionId = BicepFunction.GetSubscriptionResourceId("Microsoft.Authorization/roleDefinitions", role.ToString()), PrincipalId = principalId diff --git a/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/EventHubsNamespaceAuthorizationRule.cs b/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/EventHubsNamespaceAuthorizationRule.cs index 23a5878405c4..9a25e2c7002f 100644 --- a/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/EventHubsNamespaceAuthorizationRule.cs +++ b/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/EventHubsNamespaceAuthorizationRule.cs @@ -18,7 +18,7 @@ namespace Azure.Provisioning.EventHubs; /// /// EventHubsNamespaceAuthorizationRule. /// -public partial class EventHubsNamespaceAuthorizationRule : Resource +public partial class EventHubsNamespaceAuthorizationRule : ProvisionableResource { /// /// The authorization rule name. @@ -59,15 +59,15 @@ public partial class EventHubsNamespaceAuthorizationRule : Resource /// /// Creates a new EventHubsNamespaceAuthorizationRule. /// - /// + /// /// The the Bicep identifier name of the /// EventHubsNamespaceAuthorizationRule resource. This can be used to /// refer to the resource in expressions, but is not the Azure name of the /// resource. This value can contain letters, numbers, and underscores. /// /// Version of the EventHubsNamespaceAuthorizationRule. - public EventHubsNamespaceAuthorizationRule(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.EventHub/namespaces/authorizationRules", resourceVersion ?? "2024-01-01") + public EventHubsNamespaceAuthorizationRule(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.EventHub/namespaces/authorizationRules", resourceVersion ?? "2024-01-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _rights = BicepList.DefineProperty(this, "Rights", ["properties", "rights"]); @@ -82,11 +82,6 @@ public EventHubsNamespaceAuthorizationRule(string identifierName, string? resour /// public static class ResourceVersions { - /// - /// 2024-05-01-preview. - /// - public static readonly string V2024_05_01_preview = "2024-05-01-preview"; - /// /// 2024-01-01. /// @@ -106,7 +101,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing EventHubsNamespaceAuthorizationRule. /// - /// + /// /// The the Bicep identifier name of the /// EventHubsNamespaceAuthorizationRule resource. This can be used to /// refer to the resource in expressions, but is not the Azure name of the @@ -114,8 +109,8 @@ public static class ResourceVersions /// /// Version of the EventHubsNamespaceAuthorizationRule. /// The existing EventHubsNamespaceAuthorizationRule resource. - public static EventHubsNamespaceAuthorizationRule FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static EventHubsNamespaceAuthorizationRule FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; /// /// Get the requirements for naming this @@ -132,5 +127,5 @@ public override ResourceNameRequirements GetResourceNameRequirements() => /// The keys for this EventHubsNamespaceAuthorizationRule resource. public EventHubsAccessKeys GetKeys() => EventHubsAccessKeys.FromExpression( - new FunctionCallExpression(new MemberExpression(new IdentifierExpression(IdentifierName), "listKeys"))); + new FunctionCallExpression(new MemberExpression(new IdentifierExpression(BicepIdentifier), "listKeys"))); } diff --git a/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/EventHubsNetworkRuleSet.cs b/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/EventHubsNetworkRuleSet.cs index 2fbb27d34143..678baed5bc20 100644 --- a/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/EventHubsNetworkRuleSet.cs +++ b/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/EventHubsNetworkRuleSet.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.EventHubs; /// /// EventHubsNetworkRuleSet. /// -public partial class EventHubsNetworkRuleSet : Resource +public partial class EventHubsNetworkRuleSet : ProvisionableResource { /// /// Gets the Name. @@ -84,15 +84,15 @@ public partial class EventHubsNetworkRuleSet : Resource /// /// Creates a new EventHubsNetworkRuleSet. /// - /// + /// /// The the Bicep identifier name of the EventHubsNetworkRuleSet resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, /// numbers, and underscores. /// /// Version of the EventHubsNetworkRuleSet. - public EventHubsNetworkRuleSet(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.EventHub/namespaces/networkRuleSets", resourceVersion ?? "2024-01-01") + public EventHubsNetworkRuleSet(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.EventHub/namespaces/networkRuleSets", resourceVersion ?? "2024-01-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _defaultAction = BicepValue.DefineProperty(this, "DefaultAction", ["properties", "defaultAction"]); @@ -111,11 +111,6 @@ public EventHubsNetworkRuleSet(string identifierName, string? resourceVersion = /// public static class ResourceVersions { - /// - /// 2024-05-01-preview. - /// - public static readonly string V2024_05_01_preview = "2024-05-01-preview"; - /// /// 2024-01-01. /// @@ -135,7 +130,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing EventHubsNetworkRuleSet. /// - /// + /// /// The the Bicep identifier name of the EventHubsNetworkRuleSet resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, @@ -143,6 +138,6 @@ public static class ResourceVersions /// /// Version of the EventHubsNetworkRuleSet. /// The existing EventHubsNetworkRuleSet resource. - public static EventHubsNetworkRuleSet FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static EventHubsNetworkRuleSet FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/EventHubsPrivateEndpointConnection.cs b/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/EventHubsPrivateEndpointConnection.cs index 11dc46bc8b61..b68860e0a97f 100644 --- a/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/EventHubsPrivateEndpointConnection.cs +++ b/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/EventHubsPrivateEndpointConnection.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.EventHubs; /// /// EventHubsPrivateEndpointConnection. /// -public partial class EventHubsPrivateEndpointConnection : Resource +public partial class EventHubsPrivateEndpointConnection : ProvisionableResource { /// /// The PrivateEndpointConnection name. @@ -68,15 +68,15 @@ public partial class EventHubsPrivateEndpointConnection : Resource /// /// Creates a new EventHubsPrivateEndpointConnection. /// - /// + /// /// The the Bicep identifier name of the EventHubsPrivateEndpointConnection /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the EventHubsPrivateEndpointConnection. - public EventHubsPrivateEndpointConnection(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.EventHub/namespaces/privateEndpointConnections", resourceVersion ?? "2024-01-01") + public EventHubsPrivateEndpointConnection(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.EventHub/namespaces/privateEndpointConnections", resourceVersion ?? "2024-01-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _connectionState = BicepValue.DefineProperty(this, "ConnectionState", ["properties", "privateLinkServiceConnectionState"]); @@ -93,11 +93,6 @@ public EventHubsPrivateEndpointConnection(string identifierName, string? resourc /// public static class ResourceVersions { - /// - /// 2024-05-01-preview. - /// - public static readonly string V2024_05_01_preview = "2024-05-01-preview"; - /// /// 2024-01-01. /// @@ -112,7 +107,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing EventHubsPrivateEndpointConnection. /// - /// + /// /// The the Bicep identifier name of the EventHubsPrivateEndpointConnection /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -120,6 +115,6 @@ public static class ResourceVersions /// /// Version of the EventHubsPrivateEndpointConnection. /// The existing EventHubsPrivateEndpointConnection resource. - public static EventHubsPrivateEndpointConnection FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static EventHubsPrivateEndpointConnection FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/EventHubsSchemaGroup.cs b/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/EventHubsSchemaGroup.cs index 46109e26bc52..38935a4f7e1e 100644 --- a/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/EventHubsSchemaGroup.cs +++ b/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/EventHubsSchemaGroup.cs @@ -17,7 +17,7 @@ namespace Azure.Provisioning.EventHubs; /// /// EventHubsSchemaGroup. /// -public partial class EventHubsSchemaGroup : Resource +public partial class EventHubsSchemaGroup : ProvisionableResource { /// /// The Schema Group name. @@ -88,15 +88,15 @@ public partial class EventHubsSchemaGroup : Resource /// /// Creates a new EventHubsSchemaGroup. /// - /// + /// /// The the Bicep identifier name of the EventHubsSchemaGroup resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, /// numbers, and underscores. /// /// Version of the EventHubsSchemaGroup. - public EventHubsSchemaGroup(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.EventHub/namespaces/schemagroups", resourceVersion ?? "2024-01-01") + public EventHubsSchemaGroup(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.EventHub/namespaces/schemagroups", resourceVersion ?? "2024-01-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _groupProperties = BicepDictionary.DefineProperty(this, "GroupProperties", ["properties", "groupProperties"]); @@ -116,11 +116,6 @@ public EventHubsSchemaGroup(string identifierName, string? resourceVersion = def /// public static class ResourceVersions { - /// - /// 2024-05-01-preview. - /// - public static readonly string V2024_05_01_preview = "2024-05-01-preview"; - /// /// 2024-01-01. /// @@ -150,7 +145,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing EventHubsSchemaGroup. /// - /// + /// /// The the Bicep identifier name of the EventHubsSchemaGroup resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, @@ -158,6 +153,6 @@ public static class ResourceVersions /// /// Version of the EventHubsSchemaGroup. /// The existing EventHubsSchemaGroup resource. - public static EventHubsSchemaGroup FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static EventHubsSchemaGroup FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/Models/CaptureDescription.cs b/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/Models/CaptureDescription.cs index bf1b0568826c..ea7a9ec1b531 100644 --- a/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/Models/CaptureDescription.cs +++ b/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/Models/CaptureDescription.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.EventHubs; /// /// Properties to configure capture description for eventhub. /// -public partial class CaptureDescription : ProvisioningConstruct +public partial class CaptureDescription : ProvisionableConstruct { /// /// A value that indicates whether capture description is enabled. diff --git a/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/Models/EventHubDestination.cs b/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/Models/EventHubDestination.cs index 25e855417b41..24d3c4bd4898 100644 --- a/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/Models/EventHubDestination.cs +++ b/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/Models/EventHubDestination.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.EventHubs; /// /// Capture storage details for capture description. /// -public partial class EventHubDestination : ProvisioningConstruct +public partial class EventHubDestination : ProvisionableConstruct { /// /// Name for capture destination. diff --git a/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/Models/EventHubsAccessKeys.cs b/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/Models/EventHubsAccessKeys.cs index d66a8f61f82b..f5a66c7657cc 100644 --- a/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/Models/EventHubsAccessKeys.cs +++ b/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/Models/EventHubsAccessKeys.cs @@ -13,7 +13,7 @@ namespace Azure.Provisioning.EventHubs; /// /// Namespace/EventHub Connection String. /// -public partial class EventHubsAccessKeys : ProvisioningConstruct +public partial class EventHubsAccessKeys : ProvisionableConstruct { /// /// Primary connection string of the created namespace AuthorizationRule. @@ -82,7 +82,7 @@ public EventHubsAccessKeys() /// /// A EventHubsAccessKeys resource. [EditorBrowsable(EditorBrowsableState.Never)] - public static EventHubsAccessKeys FromExpression(Expression expression) + public static EventHubsAccessKeys FromExpression(BicepExpression expression) { EventHubsAccessKeys resource = new(); resource.OverrideWithExpression(expression); diff --git a/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/Models/EventHubsApplicationGroupPolicy.cs b/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/Models/EventHubsApplicationGroupPolicy.cs index a3e38c09eef7..c7545a9fcb95 100644 --- a/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/Models/EventHubsApplicationGroupPolicy.cs +++ b/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/Models/EventHubsApplicationGroupPolicy.cs @@ -17,7 +17,7 @@ namespace Azure.Provisioning.EventHubs; /// classes include /// Azure.ResourceManager.EventHubs.Models.EventHubsThrottlingPolicy. /// -public partial class EventHubsApplicationGroupPolicy : ProvisioningConstruct +public partial class EventHubsApplicationGroupPolicy : ProvisionableConstruct { /// /// The Name of this policy. diff --git a/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/Models/EventHubsCaptureIdentity.cs b/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/Models/EventHubsCaptureIdentity.cs index 1f360861c9c4..42828a080ef1 100644 --- a/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/Models/EventHubsCaptureIdentity.cs +++ b/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/Models/EventHubsCaptureIdentity.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.EventHubs; /// /// A value that indicates whether capture description is enabled. /// -public partial class EventHubsCaptureIdentity : ProvisioningConstruct +public partial class EventHubsCaptureIdentity : ProvisionableConstruct { /// /// Type of Azure Active Directory Managed Identity. diff --git a/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/Models/EventHubsClusterSku.cs b/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/Models/EventHubsClusterSku.cs index a19b3eb20379..b128eb41e9e2 100644 --- a/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/Models/EventHubsClusterSku.cs +++ b/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/Models/EventHubsClusterSku.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.EventHubs; /// /// SKU parameters particular to a cluster instance. /// -public partial class EventHubsClusterSku : ProvisioningConstruct +public partial class EventHubsClusterSku : ProvisionableConstruct { /// /// Name of this SKU. diff --git a/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/Models/EventHubsEncryption.cs b/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/Models/EventHubsEncryption.cs index 9b9fd7053fd8..dd9c920e7a27 100644 --- a/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/Models/EventHubsEncryption.cs +++ b/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/Models/EventHubsEncryption.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.EventHubs; /// /// Properties to configure Encryption. /// -public partial class EventHubsEncryption : ProvisioningConstruct +public partial class EventHubsEncryption : ProvisionableConstruct { /// /// Properties of KeyVault. diff --git a/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/Models/EventHubsKeyVaultProperties.cs b/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/Models/EventHubsKeyVaultProperties.cs index 8ab9989fbc88..0a7de2f04881 100644 --- a/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/Models/EventHubsKeyVaultProperties.cs +++ b/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/Models/EventHubsKeyVaultProperties.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.EventHubs; /// /// Properties to configure keyVault Properties. /// -public partial class EventHubsKeyVaultProperties : ProvisioningConstruct +public partial class EventHubsKeyVaultProperties : ProvisionableConstruct { /// /// Name of the Key from KeyVault. diff --git a/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/Models/EventHubsNetworkRuleSetIPRules.cs b/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/Models/EventHubsNetworkRuleSetIPRules.cs index 226417deac2f..bd84a2fdf245 100644 --- a/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/Models/EventHubsNetworkRuleSetIPRules.cs +++ b/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/Models/EventHubsNetworkRuleSetIPRules.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.EventHubs; /// /// The response from the List namespace operation. /// -public partial class EventHubsNetworkRuleSetIPRules : ProvisioningConstruct +public partial class EventHubsNetworkRuleSetIPRules : ProvisionableConstruct { /// /// IP Mask. diff --git a/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/Models/EventHubsNetworkRuleSetVirtualNetworkRules.cs b/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/Models/EventHubsNetworkRuleSetVirtualNetworkRules.cs index 056303264528..426fa6b488f7 100644 --- a/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/Models/EventHubsNetworkRuleSetVirtualNetworkRules.cs +++ b/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/Models/EventHubsNetworkRuleSetVirtualNetworkRules.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.EventHubs; /// /// The response from the List namespace operation. /// -public partial class EventHubsNetworkRuleSetVirtualNetworkRules : ProvisioningConstruct +public partial class EventHubsNetworkRuleSetVirtualNetworkRules : ProvisionableConstruct { /// /// Gets or sets Id. diff --git a/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/Models/EventHubsPrivateEndpointConnectionData.cs b/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/Models/EventHubsPrivateEndpointConnectionData.cs index 9b0c6fe274bc..b6bc744a747e 100644 --- a/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/Models/EventHubsPrivateEndpointConnectionData.cs +++ b/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/Models/EventHubsPrivateEndpointConnectionData.cs @@ -14,7 +14,7 @@ namespace Azure.Provisioning.EventHubs; /// A class representing the EventHubsPrivateEndpointConnection data model. /// Properties of the PrivateEndpointConnection. /// -public partial class EventHubsPrivateEndpointConnectionData : ProvisioningConstruct +public partial class EventHubsPrivateEndpointConnectionData : ProvisionableConstruct { /// /// Gets or sets Id. diff --git a/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/Models/EventHubsPrivateLinkServiceConnectionState.cs b/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/Models/EventHubsPrivateLinkServiceConnectionState.cs index 65c614a353a8..3d8885fe1f63 100644 --- a/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/Models/EventHubsPrivateLinkServiceConnectionState.cs +++ b/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/Models/EventHubsPrivateLinkServiceConnectionState.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.EventHubs; /// /// ConnectionState information. /// -public partial class EventHubsPrivateLinkServiceConnectionState : ProvisioningConstruct +public partial class EventHubsPrivateLinkServiceConnectionState : ProvisionableConstruct { /// /// Status of the connection. diff --git a/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/Models/EventHubsSku.cs b/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/Models/EventHubsSku.cs index 665ccaeab0b8..6f3eec185fba 100644 --- a/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/Models/EventHubsSku.cs +++ b/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/Models/EventHubsSku.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.EventHubs; /// /// SKU parameters supplied to the create namespace operation. /// -public partial class EventHubsSku : ProvisioningConstruct +public partial class EventHubsSku : ProvisionableConstruct { /// /// Name of this SKU. diff --git a/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/Models/NamespaceGeoDataReplicationProperties.cs b/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/Models/NamespaceGeoDataReplicationProperties.cs index 2437bd1e3afa..41ba01a10ab7 100644 --- a/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/Models/NamespaceGeoDataReplicationProperties.cs +++ b/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/Models/NamespaceGeoDataReplicationProperties.cs @@ -13,7 +13,7 @@ namespace Azure.Provisioning.EventHubs; /// /// GeoDR Replication properties. /// -public partial class NamespaceGeoDataReplicationProperties : ProvisioningConstruct +public partial class NamespaceGeoDataReplicationProperties : ProvisionableConstruct { /// /// The maximum acceptable lag for data replication operations from the diff --git a/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/Models/NamespaceReplicaLocation.cs b/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/Models/NamespaceReplicaLocation.cs index 3c8039968f61..772c63f50f0a 100644 --- a/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/Models/NamespaceReplicaLocation.cs +++ b/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/Models/NamespaceReplicaLocation.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.EventHubs; /// /// Namespace replication properties. /// -public partial class NamespaceReplicaLocation : ProvisioningConstruct +public partial class NamespaceReplicaLocation : ProvisionableConstruct { /// /// Azure regions where a replica of the namespace is maintained. diff --git a/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/Models/RetentionDescription.cs b/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/Models/RetentionDescription.cs index 8a3ecadd6b05..eba4563a159d 100644 --- a/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/Models/RetentionDescription.cs +++ b/sdk/provisioning/Azure.Provisioning.EventHubs/src/Generated/Models/RetentionDescription.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.EventHubs; /// /// Properties to configure retention settings for the eventhub. /// -public partial class RetentionDescription : ProvisioningConstruct +public partial class RetentionDescription : ProvisionableConstruct { /// /// Enumerates the possible values for cleanup policy. diff --git a/sdk/provisioning/Azure.Provisioning.KeyVault/api/Azure.Provisioning.KeyVault.netstandard2.0.cs b/sdk/provisioning/Azure.Provisioning.KeyVault/api/Azure.Provisioning.KeyVault.netstandard2.0.cs index d2e98eddd468..d7c9071cfb26 100644 --- a/sdk/provisioning/Azure.Provisioning.KeyVault/api/Azure.Provisioning.KeyVault.netstandard2.0.cs +++ b/sdk/provisioning/Azure.Provisioning.KeyVault/api/Azure.Provisioning.KeyVault.netstandard2.0.cs @@ -82,7 +82,7 @@ public enum IdentityAccessKeyPermission [System.Runtime.Serialization.DataMemberAttribute(Name="setrotationpolicy")] Setrotationpolicy = 20, } - public partial class IdentityAccessPermissions : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class IdentityAccessPermissions : Azure.Provisioning.Primitives.ProvisionableConstruct { public IdentityAccessPermissions() { } public Azure.Provisioning.BicepList Certificates { get { throw null; } set { } } @@ -144,7 +144,7 @@ public enum IdentityAccessStoragePermission [System.Runtime.Serialization.DataMemberAttribute(Name="deletesas")] DeleteSas = 14, } - public partial class KeyVaultAccessPolicy : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class KeyVaultAccessPolicy : Azure.Provisioning.Primitives.ProvisionableConstruct { public KeyVaultAccessPolicy() { } public Azure.Provisioning.BicepValue ApplicationId { get { throw null; } set { } } @@ -194,7 +194,7 @@ public enum KeyVaultCreateMode [System.Runtime.Serialization.DataMemberAttribute(Name="recover")] Recover = 1, } - public partial class KeyVaultIPRule : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class KeyVaultIPRule : Azure.Provisioning.Primitives.ProvisionableConstruct { public KeyVaultIPRule() { } public Azure.Provisioning.BicepValue AddressRange { get { throw null; } set { } } @@ -209,7 +209,7 @@ public enum KeyVaultNetworkRuleBypassOption AzureServices = 0, None = 1, } - public partial class KeyVaultNetworkRuleSet : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class KeyVaultNetworkRuleSet : Azure.Provisioning.Primitives.ProvisionableConstruct { public KeyVaultNetworkRuleSet() { } public Azure.Provisioning.BicepValue Bypass { get { throw null; } set { } } @@ -217,9 +217,9 @@ public KeyVaultNetworkRuleSet() { } public Azure.Provisioning.BicepList IPRules { get { throw null; } set { } } public Azure.Provisioning.BicepList VirtualNetworkRules { get { throw null; } set { } } } - public partial class KeyVaultPrivateEndpointConnection : Azure.Provisioning.Primitives.Resource + public partial class KeyVaultPrivateEndpointConnection : Azure.Provisioning.Primitives.ProvisionableResource { - public KeyVaultPrivateEndpointConnection(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public KeyVaultPrivateEndpointConnection(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue ConnectionState { get { throw null; } set { } } public Azure.Provisioning.BicepValue ETag { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } @@ -230,7 +230,7 @@ public partial class KeyVaultPrivateEndpointConnection : Azure.Provisioning.Prim public Azure.Provisioning.BicepValue ProvisioningState { get { throw null; } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepDictionary Tags { get { throw null; } } - public static Azure.Provisioning.KeyVault.KeyVaultPrivateEndpointConnection FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.KeyVault.KeyVaultPrivateEndpointConnection FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2015_06_01; @@ -243,10 +243,9 @@ public static partial class ResourceVersions public static readonly string V2023_02_01; public static readonly string V2023_07_01; public static readonly string V2023_08_01_PREVIEW; - public static readonly string V2024_04_01_preview; } } - public partial class KeyVaultPrivateEndpointConnectionItemData : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class KeyVaultPrivateEndpointConnectionItemData : Azure.Provisioning.Primitives.ProvisionableConstruct { public KeyVaultPrivateEndpointConnectionItemData() { } public Azure.Provisioning.BicepValue ConnectionState { get { throw null; } } @@ -271,14 +270,14 @@ public enum KeyVaultPrivateEndpointServiceConnectionStatus Rejected = 2, Disconnected = 3, } - public partial class KeyVaultPrivateLinkServiceConnectionState : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class KeyVaultPrivateLinkServiceConnectionState : Azure.Provisioning.Primitives.ProvisionableConstruct { public KeyVaultPrivateLinkServiceConnectionState() { } public Azure.Provisioning.BicepValue ActionsRequired { get { throw null; } set { } } public Azure.Provisioning.BicepValue Description { get { throw null; } set { } } public Azure.Provisioning.BicepValue Status { get { throw null; } set { } } } - public partial class KeyVaultProperties : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class KeyVaultProperties : Azure.Provisioning.Primitives.ProvisionableConstruct { public KeyVaultProperties() { } public Azure.Provisioning.BicepList AccessPolicies { get { throw null; } set { } } @@ -304,9 +303,9 @@ public enum KeyVaultProvisioningState Succeeded = 0, RegisteringDns = 1, } - public partial class KeyVaultSecret : Azure.Provisioning.Primitives.Resource + public partial class KeyVaultSecret : Azure.Provisioning.Primitives.ProvisionableResource { - public KeyVaultSecret(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public KeyVaultSecret(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Location { get { throw null; } } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } @@ -314,7 +313,7 @@ public partial class KeyVaultSecret : Azure.Provisioning.Primitives.Resource public Azure.Provisioning.BicepValue Properties { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } - public static Azure.Provisioning.KeyVault.KeyVaultSecret FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.KeyVault.KeyVaultSecret FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override Azure.Provisioning.Primitives.ResourceNameRequirements GetResourceNameRequirements() { throw null; } public static partial class ResourceVersions @@ -329,21 +328,20 @@ public static partial class ResourceVersions public static readonly string V2023_02_01; public static readonly string V2023_07_01; public static readonly string V2023_08_01_PREVIEW; - public static readonly string V2024_04_01_preview; } } - public partial class KeyVaultService : Azure.Provisioning.Primitives.Resource + public partial class KeyVaultService : Azure.Provisioning.Primitives.ProvisionableResource { - public KeyVaultService(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public KeyVaultService(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Location { get { throw null; } set { } } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } public Azure.Provisioning.BicepValue Properties { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } - public Azure.Provisioning.Authorization.RoleAssignment CreateRoleAssignment(Azure.Provisioning.KeyVault.KeyVaultBuiltInRole role, Azure.Provisioning.BicepValue principalType, Azure.Provisioning.BicepValue principalId, string? identifierNameSuffix = null) { throw null; } + public Azure.Provisioning.Authorization.RoleAssignment CreateRoleAssignment(Azure.Provisioning.KeyVault.KeyVaultBuiltInRole role, Azure.Provisioning.BicepValue principalType, Azure.Provisioning.BicepValue principalId, string? bicepIdentifierSuffix = null) { throw null; } public Azure.Provisioning.Authorization.RoleAssignment CreateRoleAssignment(Azure.Provisioning.KeyVault.KeyVaultBuiltInRole role, Azure.Provisioning.Roles.UserAssignedIdentity identity) { throw null; } - public static Azure.Provisioning.KeyVault.KeyVaultService FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.KeyVault.KeyVaultService FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override Azure.Provisioning.Primitives.ResourceNameRequirements GetResourceNameRequirements() { throw null; } public static partial class ResourceVersions @@ -358,10 +356,9 @@ public static partial class ResourceVersions public static readonly string V2023_02_01; public static readonly string V2023_07_01; public static readonly string V2023_08_01_PREVIEW; - public static readonly string V2024_04_01_preview; } } - public partial class KeyVaultSku : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class KeyVaultSku : Azure.Provisioning.Primitives.ProvisionableConstruct { public KeyVaultSku() { } public Azure.Provisioning.BicepValue Family { get { throw null; } set { } } @@ -378,15 +375,15 @@ public enum KeyVaultSkuName [System.Runtime.Serialization.DataMemberAttribute(Name="premium")] Premium = 1, } - public partial class KeyVaultVirtualNetworkRule : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class KeyVaultVirtualNetworkRule : Azure.Provisioning.Primitives.ProvisionableConstruct { public KeyVaultVirtualNetworkRule() { } public Azure.Provisioning.BicepValue Id { get { throw null; } set { } } public Azure.Provisioning.BicepValue IgnoreMissingVnetServiceEndpoint { get { throw null; } set { } } } - public partial class ManagedHsm : Azure.Provisioning.Primitives.Resource + public partial class ManagedHsm : Azure.Provisioning.Primitives.ProvisionableResource { - public ManagedHsm(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public ManagedHsm(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Location { get { throw null; } set { } } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } @@ -394,7 +391,7 @@ public partial class ManagedHsm : Azure.Provisioning.Primitives.Resource public Azure.Provisioning.BicepValue Sku { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } - public static Azure.Provisioning.KeyVault.ManagedHsm FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.KeyVault.ManagedHsm FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2021_10_01; @@ -403,7 +400,6 @@ public static partial class ResourceVersions public static readonly string V2023_02_01; public static readonly string V2023_07_01; public static readonly string V2023_08_01_PREVIEW; - public static readonly string V2024_04_01_preview; } } public enum ManagedHsmActionsRequiredMessage @@ -417,7 +413,7 @@ public enum ManagedHsmCreateMode [System.Runtime.Serialization.DataMemberAttribute(Name="recover")] Recover = 1, } - public partial class ManagedHsmGeoReplicatedRegion : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ManagedHsmGeoReplicatedRegion : Azure.Provisioning.Primitives.ProvisionableConstruct { public ManagedHsmGeoReplicatedRegion() { } public Azure.Provisioning.BicepValue IsPrimary { get { throw null; } set { } } @@ -433,7 +429,7 @@ public enum ManagedHsmGeoReplicatedRegionProvisioningState Deleting = 4, Cleanup = 5, } - public partial class ManagedHsmIPRule : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ManagedHsmIPRule : Azure.Provisioning.Primitives.ProvisionableConstruct { public ManagedHsmIPRule() { } public Azure.Provisioning.BicepValue AddressRange { get { throw null; } set { } } @@ -448,7 +444,7 @@ public enum ManagedHsmNetworkRuleBypassOption AzureServices = 0, None = 1, } - public partial class ManagedHsmNetworkRuleSet : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ManagedHsmNetworkRuleSet : Azure.Provisioning.Primitives.ProvisionableConstruct { public ManagedHsmNetworkRuleSet() { } public Azure.Provisioning.BicepValue Bypass { get { throw null; } set { } } @@ -456,9 +452,9 @@ public ManagedHsmNetworkRuleSet() { } public Azure.Provisioning.BicepList IPRules { get { throw null; } set { } } public Azure.Provisioning.BicepList VirtualNetworkRules { get { throw null; } set { } } } - public partial class ManagedHsmPrivateEndpointConnection : Azure.Provisioning.Primitives.Resource + public partial class ManagedHsmPrivateEndpointConnection : Azure.Provisioning.Primitives.ProvisionableResource { - public ManagedHsmPrivateEndpointConnection(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public ManagedHsmPrivateEndpointConnection(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue ETag { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Location { get { throw null; } set { } } @@ -470,7 +466,7 @@ public partial class ManagedHsmPrivateEndpointConnection : Azure.Provisioning.Pr public Azure.Provisioning.BicepValue Sku { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } - public static Azure.Provisioning.KeyVault.ManagedHsmPrivateEndpointConnection FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.KeyVault.ManagedHsmPrivateEndpointConnection FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2021_10_01; @@ -479,10 +475,9 @@ public static partial class ResourceVersions public static readonly string V2023_02_01; public static readonly string V2023_07_01; public static readonly string V2023_08_01_PREVIEW; - public static readonly string V2024_04_01_preview; } } - public partial class ManagedHsmPrivateEndpointConnectionItemData : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ManagedHsmPrivateEndpointConnectionItemData : Azure.Provisioning.Primitives.ProvisionableConstruct { public ManagedHsmPrivateEndpointConnectionItemData() { } public Azure.Provisioning.BicepValue ETag { get { throw null; } } @@ -507,14 +502,14 @@ public enum ManagedHsmPrivateEndpointServiceConnectionStatus Rejected = 2, Disconnected = 3, } - public partial class ManagedHsmPrivateLinkServiceConnectionState : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ManagedHsmPrivateLinkServiceConnectionState : Azure.Provisioning.Primitives.ProvisionableConstruct { public ManagedHsmPrivateLinkServiceConnectionState() { } public Azure.Provisioning.BicepValue ActionsRequired { get { throw null; } set { } } public Azure.Provisioning.BicepValue Description { get { throw null; } set { } } public Azure.Provisioning.BicepValue Status { get { throw null; } set { } } } - public partial class ManagedHsmProperties : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ManagedHsmProperties : Azure.Provisioning.Primitives.ProvisionableConstruct { public ManagedHsmProperties() { } public Azure.Provisioning.BicepValue CreateMode { get { throw null; } set { } } @@ -556,13 +551,13 @@ public enum ManagedHSMSecurityDomainActivationStatus Unknown = 2, Failed = 3, } - public partial class ManagedHSMSecurityDomainProperties : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ManagedHSMSecurityDomainProperties : Azure.Provisioning.Primitives.ProvisionableConstruct { public ManagedHSMSecurityDomainProperties() { } public Azure.Provisioning.BicepValue ActivationStatus { get { throw null; } } public Azure.Provisioning.BicepValue ActivationStatusMessage { get { throw null; } } } - public partial class ManagedHsmSku : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ManagedHsmSku : Azure.Provisioning.Primitives.ProvisionableConstruct { public ManagedHsmSku() { } public Azure.Provisioning.BicepValue Family { get { throw null; } set { } } @@ -581,12 +576,12 @@ public enum ManagedHsmSkuName [System.Runtime.Serialization.DataMemberAttribute(Name="Custom_B6")] CustomB6 = 2, } - public partial class ManagedHsmVirtualNetworkRule : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ManagedHsmVirtualNetworkRule : Azure.Provisioning.Primitives.ProvisionableConstruct { public ManagedHsmVirtualNetworkRule() { } public Azure.Provisioning.BicepValue SubnetId { get { throw null; } set { } } } - public partial class SecretAttributes : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class SecretAttributes : Azure.Provisioning.Primitives.ProvisionableConstruct { public SecretAttributes() { } public Azure.Provisioning.BicepValue Created { get { throw null; } } @@ -595,7 +590,7 @@ public SecretAttributes() { } public Azure.Provisioning.BicepValue NotBefore { get { throw null; } set { } } public Azure.Provisioning.BicepValue Updated { get { throw null; } } } - public partial class SecretProperties : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class SecretProperties : Azure.Provisioning.Primitives.ProvisionableConstruct { public SecretProperties() { } public Azure.Provisioning.BicepValue Attributes { get { throw null; } set { } } diff --git a/sdk/provisioning/Azure.Provisioning.KeyVault/src/Generated/KeyVaultPrivateEndpointConnection.cs b/sdk/provisioning/Azure.Provisioning.KeyVault/src/Generated/KeyVaultPrivateEndpointConnection.cs index d2a53ee53948..3f298632c8d8 100644 --- a/sdk/provisioning/Azure.Provisioning.KeyVault/src/Generated/KeyVaultPrivateEndpointConnection.cs +++ b/sdk/provisioning/Azure.Provisioning.KeyVault/src/Generated/KeyVaultPrivateEndpointConnection.cs @@ -17,7 +17,7 @@ namespace Azure.Provisioning.KeyVault; /// /// KeyVaultPrivateEndpointConnection. /// -public partial class KeyVaultPrivateEndpointConnection : Resource +public partial class KeyVaultPrivateEndpointConnection : ProvisionableResource { /// /// Name of the private endpoint connection associated with the key vault. @@ -83,15 +83,15 @@ public partial class KeyVaultPrivateEndpointConnection : Resource /// /// Creates a new KeyVaultPrivateEndpointConnection. /// - /// + /// /// The the Bicep identifier name of the KeyVaultPrivateEndpointConnection /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the KeyVaultPrivateEndpointConnection. - public KeyVaultPrivateEndpointConnection(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.KeyVault/vaults/privateEndpointConnections", resourceVersion ?? "2023-07-01") + public KeyVaultPrivateEndpointConnection(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.KeyVault/vaults/privateEndpointConnections", resourceVersion ?? "2023-07-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _connectionState = BicepValue.DefineProperty(this, "ConnectionState", ["properties", "privateLinkServiceConnectionState"]); @@ -110,11 +110,6 @@ public KeyVaultPrivateEndpointConnection(string identifierName, string? resource /// public static class ResourceVersions { - /// - /// 2024-04-01-preview. - /// - public static readonly string V2024_04_01_preview = "2024-04-01-preview"; - /// /// 2023-08-01-PREVIEW. /// @@ -169,7 +164,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing KeyVaultPrivateEndpointConnection. /// - /// + /// /// The the Bicep identifier name of the KeyVaultPrivateEndpointConnection /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -177,6 +172,6 @@ public static class ResourceVersions /// /// Version of the KeyVaultPrivateEndpointConnection. /// The existing KeyVaultPrivateEndpointConnection resource. - public static KeyVaultPrivateEndpointConnection FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static KeyVaultPrivateEndpointConnection FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.KeyVault/src/Generated/KeyVaultSecret.cs b/sdk/provisioning/Azure.Provisioning.KeyVault/src/Generated/KeyVaultSecret.cs index bc8a0caaaf57..86f8387363bf 100644 --- a/sdk/provisioning/Azure.Provisioning.KeyVault/src/Generated/KeyVaultSecret.cs +++ b/sdk/provisioning/Azure.Provisioning.KeyVault/src/Generated/KeyVaultSecret.cs @@ -17,7 +17,7 @@ namespace Azure.Provisioning.KeyVault; /// /// KeyVaultSecret. /// -public partial class KeyVaultSecret : Resource +public partial class KeyVaultSecret : ProvisionableResource { /// /// Name of the secret. The value you provide may be copied globally for @@ -66,15 +66,15 @@ public partial class KeyVaultSecret : Resource /// /// Creates a new KeyVaultSecret. /// - /// + /// /// The the Bicep identifier name of the KeyVaultSecret resource. This can /// be used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and /// underscores. /// /// Version of the KeyVaultSecret. - public KeyVaultSecret(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.KeyVault/vaults/secrets", resourceVersion ?? "2023-07-01") + public KeyVaultSecret(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.KeyVault/vaults/secrets", resourceVersion ?? "2023-07-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _properties = BicepValue.DefineProperty(this, "Properties", ["properties"], isRequired: true); @@ -90,11 +90,6 @@ public KeyVaultSecret(string identifierName, string? resourceVersion = default) /// public static class ResourceVersions { - /// - /// 2024-04-01-preview. - /// - public static readonly string V2024_04_01_preview = "2024-04-01-preview"; - /// /// 2023-08-01-PREVIEW. /// @@ -149,7 +144,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing KeyVaultSecret. /// - /// + /// /// The the Bicep identifier name of the KeyVaultSecret resource. This can /// be used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and @@ -157,8 +152,8 @@ public static class ResourceVersions /// /// Version of the KeyVaultSecret. /// The existing KeyVaultSecret resource. - public static KeyVaultSecret FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static KeyVaultSecret FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; /// /// Get the requirements for naming this KeyVaultSecret resource. diff --git a/sdk/provisioning/Azure.Provisioning.KeyVault/src/Generated/KeyVaultService.cs b/sdk/provisioning/Azure.Provisioning.KeyVault/src/Generated/KeyVaultService.cs index c07bfafb6537..74175c251abd 100644 --- a/sdk/provisioning/Azure.Provisioning.KeyVault/src/Generated/KeyVaultService.cs +++ b/sdk/provisioning/Azure.Provisioning.KeyVault/src/Generated/KeyVaultService.cs @@ -21,7 +21,7 @@ namespace Azure.Provisioning.KeyVault; /// /// KeyVaultService. /// -public partial class KeyVaultService : Resource +public partial class KeyVaultService : ProvisionableResource { /// /// Name of the vault. @@ -62,15 +62,15 @@ public partial class KeyVaultService : Resource /// /// Creates a new KeyVaultService. /// - /// + /// /// The the Bicep identifier name of the KeyVaultService resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, /// and underscores. /// /// Version of the KeyVaultService. - public KeyVaultService(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.KeyVault/vaults", resourceVersion ?? "2023-07-01") + public KeyVaultService(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.KeyVault/vaults", resourceVersion ?? "2023-07-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _location = BicepValue.DefineProperty(this, "Location", ["location"], isRequired: true); @@ -85,11 +85,6 @@ public KeyVaultService(string identifierName, string? resourceVersion = default) /// public static class ResourceVersions { - /// - /// 2024-04-01-preview. - /// - public static readonly string V2024_04_01_preview = "2024-04-01-preview"; - /// /// 2023-08-01-PREVIEW. /// @@ -144,7 +139,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing KeyVaultService. /// - /// + /// /// The the Bicep identifier name of the KeyVaultService resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, @@ -152,8 +147,8 @@ public static class ResourceVersions /// /// Version of the KeyVaultService. /// The existing KeyVaultService resource. - public static KeyVaultService FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static KeyVaultService FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; /// /// Get the requirements for naming this KeyVaultService resource. @@ -171,10 +166,10 @@ public override ResourceNameRequirements GetResourceNameRequirements() => /// The . /// The . public RoleAssignment CreateRoleAssignment(KeyVaultBuiltInRole role, UserAssignedIdentity identity) => - new($"{IdentifierName}_{identity.IdentifierName}_{KeyVaultBuiltInRole.GetBuiltInRoleName(role)}") + new($"{BicepIdentifier}_{identity.BicepIdentifier}_{KeyVaultBuiltInRole.GetBuiltInRoleName(role)}") { Name = BicepFunction.CreateGuid(Id, identity.PrincipalId, BicepFunction.GetSubscriptionResourceId("Microsoft.Authorization/roleDefinitions", role.ToString())), - Scope = new IdentifierExpression(IdentifierName), + Scope = new IdentifierExpression(BicepIdentifier), PrincipalType = RoleManagementPrincipalType.ServicePrincipal, RoleDefinitionId = BicepFunction.GetSubscriptionResourceId("Microsoft.Authorization/roleDefinitions", role.ToString()), PrincipalId = identity.PrincipalId @@ -187,13 +182,13 @@ public RoleAssignment CreateRoleAssignment(KeyVaultBuiltInRole role, UserAssigne /// The role to grant. /// The type of the principal to assign to. /// The principal to assign to. - /// Optional role assignment identifier name suffix. + /// Optional role assignment identifier name suffix. /// The . - public RoleAssignment CreateRoleAssignment(KeyVaultBuiltInRole role, BicepValue principalType, BicepValue principalId, string? identifierNameSuffix = default) => - new($"{IdentifierName}_{KeyVaultBuiltInRole.GetBuiltInRoleName(role)}{(identifierNameSuffix is null ? "" : "_")}{identifierNameSuffix}") + public RoleAssignment CreateRoleAssignment(KeyVaultBuiltInRole role, BicepValue principalType, BicepValue principalId, string? bicepIdentifierSuffix = default) => + new($"{BicepIdentifier}_{KeyVaultBuiltInRole.GetBuiltInRoleName(role)}{(bicepIdentifierSuffix is null ? "" : "_")}{bicepIdentifierSuffix}") { Name = BicepFunction.CreateGuid(Id, principalId, BicepFunction.GetSubscriptionResourceId("Microsoft.Authorization/roleDefinitions", role.ToString())), - Scope = new IdentifierExpression(IdentifierName), + Scope = new IdentifierExpression(BicepIdentifier), PrincipalType = principalType, RoleDefinitionId = BicepFunction.GetSubscriptionResourceId("Microsoft.Authorization/roleDefinitions", role.ToString()), PrincipalId = principalId diff --git a/sdk/provisioning/Azure.Provisioning.KeyVault/src/Generated/ManagedHsm.cs b/sdk/provisioning/Azure.Provisioning.KeyVault/src/Generated/ManagedHsm.cs index 1d78df470cf6..16f452c2b80f 100644 --- a/sdk/provisioning/Azure.Provisioning.KeyVault/src/Generated/ManagedHsm.cs +++ b/sdk/provisioning/Azure.Provisioning.KeyVault/src/Generated/ManagedHsm.cs @@ -17,7 +17,7 @@ namespace Azure.Provisioning.KeyVault; /// /// ManagedHsm. /// -public partial class ManagedHsm : Resource +public partial class ManagedHsm : ProvisionableResource { /// /// Name of the managed HSM Pool. @@ -64,15 +64,15 @@ public partial class ManagedHsm : Resource /// /// Creates a new ManagedHsm. /// - /// + /// /// The the Bicep identifier name of the ManagedHsm resource. This can be /// used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and /// underscores. /// /// Version of the ManagedHsm. - public ManagedHsm(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.KeyVault/managedHSMs", resourceVersion ?? "2023-07-01") + public ManagedHsm(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.KeyVault/managedHSMs", resourceVersion ?? "2023-07-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _location = BicepValue.DefineProperty(this, "Location", ["location"], isRequired: true); @@ -88,11 +88,6 @@ public ManagedHsm(string identifierName, string? resourceVersion = default) /// public static class ResourceVersions { - /// - /// 2024-04-01-preview. - /// - public static readonly string V2024_04_01_preview = "2024-04-01-preview"; - /// /// 2023-08-01-PREVIEW. /// @@ -127,7 +122,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing ManagedHsm. /// - /// + /// /// The the Bicep identifier name of the ManagedHsm resource. This can be /// used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and @@ -135,6 +130,6 @@ public static class ResourceVersions /// /// Version of the ManagedHsm. /// The existing ManagedHsm resource. - public static ManagedHsm FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static ManagedHsm FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.KeyVault/src/Generated/ManagedHsmPrivateEndpointConnection.cs b/sdk/provisioning/Azure.Provisioning.KeyVault/src/Generated/ManagedHsmPrivateEndpointConnection.cs index c21c244b246a..ccc8b990f459 100644 --- a/sdk/provisioning/Azure.Provisioning.KeyVault/src/Generated/ManagedHsmPrivateEndpointConnection.cs +++ b/sdk/provisioning/Azure.Provisioning.KeyVault/src/Generated/ManagedHsmPrivateEndpointConnection.cs @@ -17,7 +17,7 @@ namespace Azure.Provisioning.KeyVault; /// /// ManagedHsmPrivateEndpointConnection. /// -public partial class ManagedHsmPrivateEndpointConnection : Resource +public partial class ManagedHsmPrivateEndpointConnection : ProvisionableResource { /// /// Name of the private endpoint connection associated with the managed hsm @@ -90,15 +90,15 @@ public partial class ManagedHsmPrivateEndpointConnection : Resource /// /// Creates a new ManagedHsmPrivateEndpointConnection. /// - /// + /// /// The the Bicep identifier name of the /// ManagedHsmPrivateEndpointConnection resource. This can be used to /// refer to the resource in expressions, but is not the Azure name of the /// resource. This value can contain letters, numbers, and underscores. /// /// Version of the ManagedHsmPrivateEndpointConnection. - public ManagedHsmPrivateEndpointConnection(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.KeyVault/managedHSMs/privateEndpointConnections", resourceVersion ?? "2023-07-01") + public ManagedHsmPrivateEndpointConnection(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.KeyVault/managedHSMs/privateEndpointConnections", resourceVersion ?? "2023-07-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _location = BicepValue.DefineProperty(this, "Location", ["location"], isRequired: true); @@ -118,11 +118,6 @@ public ManagedHsmPrivateEndpointConnection(string identifierName, string? resour /// public static class ResourceVersions { - /// - /// 2024-04-01-preview. - /// - public static readonly string V2024_04_01_preview = "2024-04-01-preview"; - /// /// 2023-08-01-PREVIEW. /// @@ -157,7 +152,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing ManagedHsmPrivateEndpointConnection. /// - /// + /// /// The the Bicep identifier name of the /// ManagedHsmPrivateEndpointConnection resource. This can be used to /// refer to the resource in expressions, but is not the Azure name of the @@ -165,6 +160,6 @@ public static class ResourceVersions /// /// Version of the ManagedHsmPrivateEndpointConnection. /// The existing ManagedHsmPrivateEndpointConnection resource. - public static ManagedHsmPrivateEndpointConnection FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static ManagedHsmPrivateEndpointConnection FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.KeyVault/src/Generated/Models/IdentityAccessPermissions.cs b/sdk/provisioning/Azure.Provisioning.KeyVault/src/Generated/Models/IdentityAccessPermissions.cs index 933ff00c39f7..291a481e6aeb 100644 --- a/sdk/provisioning/Azure.Provisioning.KeyVault/src/Generated/Models/IdentityAccessPermissions.cs +++ b/sdk/provisioning/Azure.Provisioning.KeyVault/src/Generated/Models/IdentityAccessPermissions.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.KeyVault; /// /// Permissions the identity has for keys, secrets, certificates and storage. /// -public partial class IdentityAccessPermissions : ProvisioningConstruct +public partial class IdentityAccessPermissions : ProvisionableConstruct { /// /// Permissions to keys. diff --git a/sdk/provisioning/Azure.Provisioning.KeyVault/src/Generated/Models/KeyVaultAccessPolicy.cs b/sdk/provisioning/Azure.Provisioning.KeyVault/src/Generated/Models/KeyVaultAccessPolicy.cs index 6d581020ebe7..64c2638f4ad1 100644 --- a/sdk/provisioning/Azure.Provisioning.KeyVault/src/Generated/Models/KeyVaultAccessPolicy.cs +++ b/sdk/provisioning/Azure.Provisioning.KeyVault/src/Generated/Models/KeyVaultAccessPolicy.cs @@ -13,7 +13,7 @@ namespace Azure.Provisioning.KeyVault; /// An identity that have access to the key vault. All identities in the array /// must use the same tenant ID as the key vault's tenant ID. /// -public partial class KeyVaultAccessPolicy : ProvisioningConstruct +public partial class KeyVaultAccessPolicy : ProvisionableConstruct { /// /// The Azure Active Directory tenant ID that should be used for diff --git a/sdk/provisioning/Azure.Provisioning.KeyVault/src/Generated/Models/KeyVaultIPRule.cs b/sdk/provisioning/Azure.Provisioning.KeyVault/src/Generated/Models/KeyVaultIPRule.cs index 110471dc7e5a..8e72c1e6a85e 100644 --- a/sdk/provisioning/Azure.Provisioning.KeyVault/src/Generated/Models/KeyVaultIPRule.cs +++ b/sdk/provisioning/Azure.Provisioning.KeyVault/src/Generated/Models/KeyVaultIPRule.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.KeyVault; /// A rule governing the accessibility of a vault from a specific ip address or /// ip range. /// -public partial class KeyVaultIPRule : ProvisioningConstruct +public partial class KeyVaultIPRule : ProvisionableConstruct { /// /// An IPv4 address range in CIDR notation, such as diff --git a/sdk/provisioning/Azure.Provisioning.KeyVault/src/Generated/Models/KeyVaultNetworkRuleSet.cs b/sdk/provisioning/Azure.Provisioning.KeyVault/src/Generated/Models/KeyVaultNetworkRuleSet.cs index d4208587b113..2bc527c0a447 100644 --- a/sdk/provisioning/Azure.Provisioning.KeyVault/src/Generated/Models/KeyVaultNetworkRuleSet.cs +++ b/sdk/provisioning/Azure.Provisioning.KeyVault/src/Generated/Models/KeyVaultNetworkRuleSet.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.KeyVault; /// /// A set of rules governing the network accessibility of a vault. /// -public partial class KeyVaultNetworkRuleSet : ProvisioningConstruct +public partial class KeyVaultNetworkRuleSet : ProvisionableConstruct { /// /// Tells what traffic can bypass network rules. This can be diff --git a/sdk/provisioning/Azure.Provisioning.KeyVault/src/Generated/Models/KeyVaultPrivateEndpointConnectionItemData.cs b/sdk/provisioning/Azure.Provisioning.KeyVault/src/Generated/Models/KeyVaultPrivateEndpointConnectionItemData.cs index b81b7a1e7e73..5e6103fb9d75 100644 --- a/sdk/provisioning/Azure.Provisioning.KeyVault/src/Generated/Models/KeyVaultPrivateEndpointConnectionItemData.cs +++ b/sdk/provisioning/Azure.Provisioning.KeyVault/src/Generated/Models/KeyVaultPrivateEndpointConnectionItemData.cs @@ -13,7 +13,7 @@ namespace Azure.Provisioning.KeyVault; /// /// Private endpoint connection item. /// -public partial class KeyVaultPrivateEndpointConnectionItemData : ProvisioningConstruct +public partial class KeyVaultPrivateEndpointConnectionItemData : ProvisionableConstruct { /// /// Id of private endpoint connection. diff --git a/sdk/provisioning/Azure.Provisioning.KeyVault/src/Generated/Models/KeyVaultPrivateLinkServiceConnectionState.cs b/sdk/provisioning/Azure.Provisioning.KeyVault/src/Generated/Models/KeyVaultPrivateLinkServiceConnectionState.cs index 23cfb8106302..4d1ead6f8110 100644 --- a/sdk/provisioning/Azure.Provisioning.KeyVault/src/Generated/Models/KeyVaultPrivateLinkServiceConnectionState.cs +++ b/sdk/provisioning/Azure.Provisioning.KeyVault/src/Generated/Models/KeyVaultPrivateLinkServiceConnectionState.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.KeyVault; /// /// An object that represents the approval state of the private link connection. /// -public partial class KeyVaultPrivateLinkServiceConnectionState : ProvisioningConstruct +public partial class KeyVaultPrivateLinkServiceConnectionState : ProvisionableConstruct { /// /// Indicates whether the connection has been approved, rejected or removed diff --git a/sdk/provisioning/Azure.Provisioning.KeyVault/src/Generated/Models/KeyVaultProperties.cs b/sdk/provisioning/Azure.Provisioning.KeyVault/src/Generated/Models/KeyVaultProperties.cs index e3f89de47cea..23a2cfb5ff6e 100644 --- a/sdk/provisioning/Azure.Provisioning.KeyVault/src/Generated/Models/KeyVaultProperties.cs +++ b/sdk/provisioning/Azure.Provisioning.KeyVault/src/Generated/Models/KeyVaultProperties.cs @@ -14,7 +14,7 @@ namespace Azure.Provisioning.KeyVault; /// /// Properties of the vault. /// -public partial class KeyVaultProperties : ProvisioningConstruct +public partial class KeyVaultProperties : ProvisionableConstruct { /// /// The Azure Active Directory tenant ID that should be used for diff --git a/sdk/provisioning/Azure.Provisioning.KeyVault/src/Generated/Models/KeyVaultSku.cs b/sdk/provisioning/Azure.Provisioning.KeyVault/src/Generated/Models/KeyVaultSku.cs index a8366b485c97..1e9754642df6 100644 --- a/sdk/provisioning/Azure.Provisioning.KeyVault/src/Generated/Models/KeyVaultSku.cs +++ b/sdk/provisioning/Azure.Provisioning.KeyVault/src/Generated/Models/KeyVaultSku.cs @@ -10,7 +10,7 @@ namespace Azure.Provisioning.KeyVault; /// /// SKU details. /// -public partial class KeyVaultSku : ProvisioningConstruct +public partial class KeyVaultSku : ProvisionableConstruct { /// /// SKU family name. diff --git a/sdk/provisioning/Azure.Provisioning.KeyVault/src/Generated/Models/KeyVaultVirtualNetworkRule.cs b/sdk/provisioning/Azure.Provisioning.KeyVault/src/Generated/Models/KeyVaultVirtualNetworkRule.cs index 590903d542a6..9cc4bbb28d1b 100644 --- a/sdk/provisioning/Azure.Provisioning.KeyVault/src/Generated/Models/KeyVaultVirtualNetworkRule.cs +++ b/sdk/provisioning/Azure.Provisioning.KeyVault/src/Generated/Models/KeyVaultVirtualNetworkRule.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.KeyVault; /// A rule governing the accessibility of a vault from a specific virtual /// network. /// -public partial class KeyVaultVirtualNetworkRule : ProvisioningConstruct +public partial class KeyVaultVirtualNetworkRule : ProvisionableConstruct { /// /// Full resource id of a vnet subnet, such as diff --git a/sdk/provisioning/Azure.Provisioning.KeyVault/src/Generated/Models/ManagedHSMSecurityDomainProperties.cs b/sdk/provisioning/Azure.Provisioning.KeyVault/src/Generated/Models/ManagedHSMSecurityDomainProperties.cs index 3af9f7382cb0..6ba4996f1668 100644 --- a/sdk/provisioning/Azure.Provisioning.KeyVault/src/Generated/Models/ManagedHSMSecurityDomainProperties.cs +++ b/sdk/provisioning/Azure.Provisioning.KeyVault/src/Generated/Models/ManagedHSMSecurityDomainProperties.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.KeyVault; /// /// The security domain properties of the managed hsm. /// -public partial class ManagedHSMSecurityDomainProperties : ProvisioningConstruct +public partial class ManagedHSMSecurityDomainProperties : ProvisionableConstruct { /// /// Activation Status. diff --git a/sdk/provisioning/Azure.Provisioning.KeyVault/src/Generated/Models/ManagedHsmGeoReplicatedRegion.cs b/sdk/provisioning/Azure.Provisioning.KeyVault/src/Generated/Models/ManagedHsmGeoReplicatedRegion.cs index df32ed445056..e3901280a885 100644 --- a/sdk/provisioning/Azure.Provisioning.KeyVault/src/Generated/Models/ManagedHsmGeoReplicatedRegion.cs +++ b/sdk/provisioning/Azure.Provisioning.KeyVault/src/Generated/Models/ManagedHsmGeoReplicatedRegion.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.KeyVault; /// /// A region that this managed HSM Pool has been extended to. /// -public partial class ManagedHsmGeoReplicatedRegion : ProvisioningConstruct +public partial class ManagedHsmGeoReplicatedRegion : ProvisionableConstruct { /// /// Name of the geo replicated region. diff --git a/sdk/provisioning/Azure.Provisioning.KeyVault/src/Generated/Models/ManagedHsmIPRule.cs b/sdk/provisioning/Azure.Provisioning.KeyVault/src/Generated/Models/ManagedHsmIPRule.cs index bd2c5b197f91..d2a96bb7d0ff 100644 --- a/sdk/provisioning/Azure.Provisioning.KeyVault/src/Generated/Models/ManagedHsmIPRule.cs +++ b/sdk/provisioning/Azure.Provisioning.KeyVault/src/Generated/Models/ManagedHsmIPRule.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.KeyVault; /// A rule governing the accessibility of a managed HSM pool from a specific IP /// address or IP range. /// -public partial class ManagedHsmIPRule : ProvisioningConstruct +public partial class ManagedHsmIPRule : ProvisionableConstruct { /// /// An IPv4 address range in CIDR notation, such as diff --git a/sdk/provisioning/Azure.Provisioning.KeyVault/src/Generated/Models/ManagedHsmNetworkRuleSet.cs b/sdk/provisioning/Azure.Provisioning.KeyVault/src/Generated/Models/ManagedHsmNetworkRuleSet.cs index 3d5b45fb2e76..bab21c5d27f3 100644 --- a/sdk/provisioning/Azure.Provisioning.KeyVault/src/Generated/Models/ManagedHsmNetworkRuleSet.cs +++ b/sdk/provisioning/Azure.Provisioning.KeyVault/src/Generated/Models/ManagedHsmNetworkRuleSet.cs @@ -13,7 +13,7 @@ namespace Azure.Provisioning.KeyVault; /// /// A set of rules governing the network accessibility of a managed hsm pool. /// -public partial class ManagedHsmNetworkRuleSet : ProvisioningConstruct +public partial class ManagedHsmNetworkRuleSet : ProvisionableConstruct { /// /// Tells what traffic can bypass network rules. This can be diff --git a/sdk/provisioning/Azure.Provisioning.KeyVault/src/Generated/Models/ManagedHsmPrivateEndpointConnectionItemData.cs b/sdk/provisioning/Azure.Provisioning.KeyVault/src/Generated/Models/ManagedHsmPrivateEndpointConnectionItemData.cs index 74da0810cec3..d70b8be3270e 100644 --- a/sdk/provisioning/Azure.Provisioning.KeyVault/src/Generated/Models/ManagedHsmPrivateEndpointConnectionItemData.cs +++ b/sdk/provisioning/Azure.Provisioning.KeyVault/src/Generated/Models/ManagedHsmPrivateEndpointConnectionItemData.cs @@ -13,7 +13,7 @@ namespace Azure.Provisioning.KeyVault; /// /// Private endpoint connection item. /// -public partial class ManagedHsmPrivateEndpointConnectionItemData : ProvisioningConstruct +public partial class ManagedHsmPrivateEndpointConnectionItemData : ProvisionableConstruct { /// /// Id of private endpoint connection. diff --git a/sdk/provisioning/Azure.Provisioning.KeyVault/src/Generated/Models/ManagedHsmPrivateLinkServiceConnectionState.cs b/sdk/provisioning/Azure.Provisioning.KeyVault/src/Generated/Models/ManagedHsmPrivateLinkServiceConnectionState.cs index 47fd18c4395b..a419b887b706 100644 --- a/sdk/provisioning/Azure.Provisioning.KeyVault/src/Generated/Models/ManagedHsmPrivateLinkServiceConnectionState.cs +++ b/sdk/provisioning/Azure.Provisioning.KeyVault/src/Generated/Models/ManagedHsmPrivateLinkServiceConnectionState.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.KeyVault; /// /// An object that represents the approval state of the private link connection. /// -public partial class ManagedHsmPrivateLinkServiceConnectionState : ProvisioningConstruct +public partial class ManagedHsmPrivateLinkServiceConnectionState : ProvisionableConstruct { /// /// Indicates whether the connection has been approved, rejected or removed diff --git a/sdk/provisioning/Azure.Provisioning.KeyVault/src/Generated/Models/ManagedHsmProperties.cs b/sdk/provisioning/Azure.Provisioning.KeyVault/src/Generated/Models/ManagedHsmProperties.cs index 46e650c43a73..b8b3686300f8 100644 --- a/sdk/provisioning/Azure.Provisioning.KeyVault/src/Generated/Models/ManagedHsmProperties.cs +++ b/sdk/provisioning/Azure.Provisioning.KeyVault/src/Generated/Models/ManagedHsmProperties.cs @@ -14,7 +14,7 @@ namespace Azure.Provisioning.KeyVault; /// /// Properties of the managed HSM Pool. /// -public partial class ManagedHsmProperties : ProvisioningConstruct +public partial class ManagedHsmProperties : ProvisionableConstruct { /// /// The Azure Active Directory tenant ID that should be used for diff --git a/sdk/provisioning/Azure.Provisioning.KeyVault/src/Generated/Models/ManagedHsmSku.cs b/sdk/provisioning/Azure.Provisioning.KeyVault/src/Generated/Models/ManagedHsmSku.cs index 3b58ca3560d8..ddb556df0573 100644 --- a/sdk/provisioning/Azure.Provisioning.KeyVault/src/Generated/Models/ManagedHsmSku.cs +++ b/sdk/provisioning/Azure.Provisioning.KeyVault/src/Generated/Models/ManagedHsmSku.cs @@ -10,7 +10,7 @@ namespace Azure.Provisioning.KeyVault; /// /// SKU details. /// -public partial class ManagedHsmSku : ProvisioningConstruct +public partial class ManagedHsmSku : ProvisionableConstruct { /// /// SKU Family of the managed HSM Pool. diff --git a/sdk/provisioning/Azure.Provisioning.KeyVault/src/Generated/Models/ManagedHsmVirtualNetworkRule.cs b/sdk/provisioning/Azure.Provisioning.KeyVault/src/Generated/Models/ManagedHsmVirtualNetworkRule.cs index 465bc94d2954..3c94ad314a56 100644 --- a/sdk/provisioning/Azure.Provisioning.KeyVault/src/Generated/Models/ManagedHsmVirtualNetworkRule.cs +++ b/sdk/provisioning/Azure.Provisioning.KeyVault/src/Generated/Models/ManagedHsmVirtualNetworkRule.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.KeyVault; /// A rule governing the accessibility of a managed hsm pool from a specific /// virtual network. /// -public partial class ManagedHsmVirtualNetworkRule : ProvisioningConstruct +public partial class ManagedHsmVirtualNetworkRule : ProvisionableConstruct { /// /// Full resource id of a vnet subnet, such as diff --git a/sdk/provisioning/Azure.Provisioning.KeyVault/src/Generated/Models/SecretAttributes.cs b/sdk/provisioning/Azure.Provisioning.KeyVault/src/Generated/Models/SecretAttributes.cs index 55c32632b8e9..58fa2d323e2b 100644 --- a/sdk/provisioning/Azure.Provisioning.KeyVault/src/Generated/Models/SecretAttributes.cs +++ b/sdk/provisioning/Azure.Provisioning.KeyVault/src/Generated/Models/SecretAttributes.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.KeyVault; /// /// The secret management attributes. /// -public partial class SecretAttributes : ProvisioningConstruct +public partial class SecretAttributes : ProvisionableConstruct { /// /// Determines whether the object is enabled. diff --git a/sdk/provisioning/Azure.Provisioning.KeyVault/src/Generated/Models/SecretProperties.cs b/sdk/provisioning/Azure.Provisioning.KeyVault/src/Generated/Models/SecretProperties.cs index 7a6c7709a618..fd9ed0e40441 100644 --- a/sdk/provisioning/Azure.Provisioning.KeyVault/src/Generated/Models/SecretProperties.cs +++ b/sdk/provisioning/Azure.Provisioning.KeyVault/src/Generated/Models/SecretProperties.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.KeyVault; /// /// Properties of the secret. /// -public partial class SecretProperties : ProvisioningConstruct +public partial class SecretProperties : ProvisionableConstruct { /// /// The value of the secret. NOTE: 'value' will never be returned diff --git a/sdk/provisioning/Azure.Provisioning.Kubernetes/api/Azure.Provisioning.Kubernetes.netstandard2.0.cs b/sdk/provisioning/Azure.Provisioning.Kubernetes/api/Azure.Provisioning.Kubernetes.netstandard2.0.cs index e9a49b3c70ed..6a6d9f4a7e49 100644 --- a/sdk/provisioning/Azure.Provisioning.Kubernetes/api/Azure.Provisioning.Kubernetes.netstandard2.0.cs +++ b/sdk/provisioning/Azure.Provisioning.Kubernetes/api/Azure.Provisioning.Kubernetes.netstandard2.0.cs @@ -1,8 +1,8 @@ namespace Azure.Provisioning.Kubernetes { - public partial class ConnectedCluster : Azure.Provisioning.Primitives.Resource + public partial class ConnectedCluster : Azure.Provisioning.Primitives.ProvisionableResource { - public ConnectedCluster(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public ConnectedCluster(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue AgentPublicKeyCertificate { get { throw null; } set { } } public Azure.Provisioning.BicepValue AgentVersion { get { throw null; } } public Azure.Provisioning.BicepValue ConnectivityStatus { get { throw null; } } @@ -23,9 +23,9 @@ public partial class ConnectedCluster : Azure.Provisioning.Primitives.Resource public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } public Azure.Provisioning.BicepValue TotalCoreCount { get { throw null; } } public Azure.Provisioning.BicepValue TotalNodeCount { get { throw null; } } - public Azure.Provisioning.Authorization.RoleAssignment CreateRoleAssignment(Azure.Provisioning.Kubernetes.KubernetesBuiltInRole role, Azure.Provisioning.BicepValue principalType, Azure.Provisioning.BicepValue principalId, string? identifierNameSuffix = null) { throw null; } + public Azure.Provisioning.Authorization.RoleAssignment CreateRoleAssignment(Azure.Provisioning.Kubernetes.KubernetesBuiltInRole role, Azure.Provisioning.BicepValue principalType, Azure.Provisioning.BicepValue principalId, string? bicepIdentifierSuffix = null) { throw null; } public Azure.Provisioning.Authorization.RoleAssignment CreateRoleAssignment(Azure.Provisioning.Kubernetes.KubernetesBuiltInRole role, Azure.Provisioning.Roles.UserAssignedIdentity identity) { throw null; } - public static Azure.Provisioning.Kubernetes.ConnectedCluster FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Kubernetes.ConnectedCluster FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override Azure.Provisioning.Primitives.ResourceNameRequirements GetResourceNameRequirements() { throw null; } public static partial class ResourceVersions @@ -33,7 +33,6 @@ public static partial class ResourceVersions public static readonly string V2021_03_01; public static readonly string V2021_10_01; public static readonly string V2024_01_01; - public static readonly string V2024_07_15_preview; } } public enum ConnectivityStatus diff --git a/sdk/provisioning/Azure.Provisioning.Kubernetes/src/Generated/ConnectedCluster.cs b/sdk/provisioning/Azure.Provisioning.Kubernetes/src/Generated/ConnectedCluster.cs index 83d37f777103..086cfbc201f4 100644 --- a/sdk/provisioning/Azure.Provisioning.Kubernetes/src/Generated/ConnectedCluster.cs +++ b/sdk/provisioning/Azure.Provisioning.Kubernetes/src/Generated/ConnectedCluster.cs @@ -20,7 +20,7 @@ namespace Azure.Provisioning.Kubernetes; /// /// ConnectedCluster. /// -public partial class ConnectedCluster : Resource +public partial class ConnectedCluster : ProvisionableResource { /// /// The name of the Kubernetes cluster on which get is called. @@ -151,15 +151,15 @@ public partial class ConnectedCluster : Resource /// /// Creates a new ConnectedCluster. /// - /// + /// /// The the Bicep identifier name of the ConnectedCluster resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, /// and underscores. /// /// Version of the ConnectedCluster. - public ConnectedCluster(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Kubernetes/connectedClusters", resourceVersion ?? "2024-01-01") + public ConnectedCluster(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Kubernetes/connectedClusters", resourceVersion ?? "2024-01-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _agentPublicKeyCertificate = BicepValue.DefineProperty(this, "AgentPublicKeyCertificate", ["properties", "agentPublicKeyCertificate"], isRequired: true); @@ -188,11 +188,6 @@ public ConnectedCluster(string identifierName, string? resourceVersion = default /// public static class ResourceVersions { - /// - /// 2024-07-15-preview. - /// - public static readonly string V2024_07_15_preview = "2024-07-15-preview"; - /// /// 2024-01-01. /// @@ -212,7 +207,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing ConnectedCluster. /// - /// + /// /// The the Bicep identifier name of the ConnectedCluster resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, @@ -220,8 +215,8 @@ public static class ResourceVersions /// /// Version of the ConnectedCluster. /// The existing ConnectedCluster resource. - public static ConnectedCluster FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static ConnectedCluster FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; /// /// Get the requirements for naming this ConnectedCluster resource. @@ -239,10 +234,10 @@ public override ResourceNameRequirements GetResourceNameRequirements() => /// The . /// The . public RoleAssignment CreateRoleAssignment(KubernetesBuiltInRole role, UserAssignedIdentity identity) => - new($"{IdentifierName}_{identity.IdentifierName}_{KubernetesBuiltInRole.GetBuiltInRoleName(role)}") + new($"{BicepIdentifier}_{identity.BicepIdentifier}_{KubernetesBuiltInRole.GetBuiltInRoleName(role)}") { Name = BicepFunction.CreateGuid(Id, identity.PrincipalId, BicepFunction.GetSubscriptionResourceId("Microsoft.Authorization/roleDefinitions", role.ToString())), - Scope = new IdentifierExpression(IdentifierName), + Scope = new IdentifierExpression(BicepIdentifier), PrincipalType = RoleManagementPrincipalType.ServicePrincipal, RoleDefinitionId = BicepFunction.GetSubscriptionResourceId("Microsoft.Authorization/roleDefinitions", role.ToString()), PrincipalId = identity.PrincipalId @@ -255,13 +250,13 @@ public RoleAssignment CreateRoleAssignment(KubernetesBuiltInRole role, UserAssig /// The role to grant. /// The type of the principal to assign to. /// The principal to assign to. - /// Optional role assignment identifier name suffix. + /// Optional role assignment identifier name suffix. /// The . - public RoleAssignment CreateRoleAssignment(KubernetesBuiltInRole role, BicepValue principalType, BicepValue principalId, string? identifierNameSuffix = default) => - new($"{IdentifierName}_{KubernetesBuiltInRole.GetBuiltInRoleName(role)}{(identifierNameSuffix is null ? "" : "_")}{identifierNameSuffix}") + public RoleAssignment CreateRoleAssignment(KubernetesBuiltInRole role, BicepValue principalType, BicepValue principalId, string? bicepIdentifierSuffix = default) => + new($"{BicepIdentifier}_{KubernetesBuiltInRole.GetBuiltInRoleName(role)}{(bicepIdentifierSuffix is null ? "" : "_")}{bicepIdentifierSuffix}") { Name = BicepFunction.CreateGuid(Id, principalId, BicepFunction.GetSubscriptionResourceId("Microsoft.Authorization/roleDefinitions", role.ToString())), - Scope = new IdentifierExpression(IdentifierName), + Scope = new IdentifierExpression(BicepIdentifier), PrincipalType = principalType, RoleDefinitionId = BicepFunction.GetSubscriptionResourceId("Microsoft.Authorization/roleDefinitions", role.ToString()), PrincipalId = principalId diff --git a/sdk/provisioning/Azure.Provisioning.KubernetesConfiguration/api/Azure.Provisioning.KubernetesConfiguration.netstandard2.0.cs b/sdk/provisioning/Azure.Provisioning.KubernetesConfiguration/api/Azure.Provisioning.KubernetesConfiguration.netstandard2.0.cs index da6101f38323..472397d77f03 100644 --- a/sdk/provisioning/Azure.Provisioning.KubernetesConfiguration/api/Azure.Provisioning.KubernetesConfiguration.netstandard2.0.cs +++ b/sdk/provisioning/Azure.Provisioning.KubernetesConfiguration/api/Azure.Provisioning.KubernetesConfiguration.netstandard2.0.cs @@ -1,12 +1,12 @@ namespace Azure.Provisioning.KubernetesConfiguration { - public partial class HelmOperatorProperties : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class HelmOperatorProperties : Azure.Provisioning.Primitives.ProvisionableConstruct { public HelmOperatorProperties() { } public Azure.Provisioning.BicepValue ChartValues { get { throw null; } set { } } public Azure.Provisioning.BicepValue ChartVersion { get { throw null; } set { } } } - public partial class HelmReleaseProperties : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class HelmReleaseProperties : Azure.Provisioning.Primitives.ProvisionableConstruct { public HelmReleaseProperties() { } public Azure.Provisioning.BicepValue FailureCount { get { throw null; } } @@ -15,7 +15,7 @@ public HelmReleaseProperties() { } public Azure.Provisioning.BicepValue LastRevisionApplied { get { throw null; } } public Azure.Provisioning.BicepValue UpgradeFailureCount { get { throw null; } } } - public partial class KubernetesAzureBlob : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class KubernetesAzureBlob : Azure.Provisioning.Primitives.ProvisionableConstruct { public KubernetesAzureBlob() { } public Azure.Provisioning.BicepValue AccountKey { get { throw null; } set { } } @@ -28,7 +28,7 @@ public KubernetesAzureBlob() { } public Azure.Provisioning.BicepValue TimeoutInSeconds { get { throw null; } set { } } public Azure.Provisioning.BicepValue Uri { get { throw null; } set { } } } - public partial class KubernetesBucket : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class KubernetesBucket : Azure.Provisioning.Primitives.ProvisionableConstruct { public KubernetesBucket() { } public Azure.Provisioning.BicepValue AccessKey { get { throw null; } set { } } @@ -39,9 +39,9 @@ public KubernetesBucket() { } public Azure.Provisioning.BicepValue Uri { get { throw null; } set { } } public Azure.Provisioning.BicepValue UseInsecureCommunication { get { throw null; } set { } } } - public partial class KubernetesClusterExtension : Azure.Provisioning.Primitives.Resource + public partial class KubernetesClusterExtension : Azure.Provisioning.Primitives.ProvisionableResource { - public KubernetesClusterExtension(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public KubernetesClusterExtension(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue AksAssignedIdentity { get { throw null; } set { } } public Azure.Provisioning.BicepValue AutoUpgradeMinorVersion { get { throw null; } set { } } public Azure.Provisioning.BicepDictionary ConfigurationProtectedSettings { get { throw null; } set { } } @@ -62,9 +62,9 @@ public partial class KubernetesClusterExtension : Azure.Provisioning.Primitives. public Azure.Provisioning.BicepList Statuses { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepValue Version { get { throw null; } set { } } - public Azure.Provisioning.Authorization.RoleAssignment CreateRoleAssignment(Azure.Provisioning.KubernetesConfiguration.KubernetesConfigurationBuiltInRole role, Azure.Provisioning.BicepValue principalType, Azure.Provisioning.BicepValue principalId, string? identifierNameSuffix = null) { throw null; } + public Azure.Provisioning.Authorization.RoleAssignment CreateRoleAssignment(Azure.Provisioning.KubernetesConfiguration.KubernetesConfigurationBuiltInRole role, Azure.Provisioning.BicepValue principalType, Azure.Provisioning.BicepValue principalId, string? bicepIdentifierSuffix = null) { throw null; } public Azure.Provisioning.Authorization.RoleAssignment CreateRoleAssignment(Azure.Provisioning.KubernetesConfiguration.KubernetesConfigurationBuiltInRole role, Azure.Provisioning.Roles.UserAssignedIdentity identity) { throw null; } - public static Azure.Provisioning.KubernetesConfiguration.KubernetesClusterExtension FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.KubernetesConfiguration.KubernetesClusterExtension FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2022_03_01; @@ -73,13 +73,13 @@ public static partial class ResourceVersions public static readonly string V2023_05_01; } } - public partial class KubernetesClusterExtensionScope : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class KubernetesClusterExtensionScope : Azure.Provisioning.Primitives.ProvisionableConstruct { public KubernetesClusterExtensionScope() { } public Azure.Provisioning.BicepValue ClusterReleaseNamespace { get { throw null; } set { } } public Azure.Provisioning.BicepValue TargetNamespace { get { throw null; } set { } } } - public partial class KubernetesClusterExtensionStatus : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class KubernetesClusterExtensionStatus : Azure.Provisioning.Primitives.ProvisionableConstruct { public KubernetesClusterExtensionStatus() { } public Azure.Provisioning.BicepValue Code { get { throw null; } set { } } @@ -124,7 +124,7 @@ public enum KubernetesConfigurationComplianceStateType Installed = 3, Failed = 4, } - public partial class KubernetesConfigurationComplianceStatus : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class KubernetesConfigurationComplianceStatus : Azure.Provisioning.Primitives.ProvisionableConstruct { public KubernetesConfigurationComplianceStatus() { } public Azure.Provisioning.BicepValue ComplianceState { get { throw null; } } @@ -177,9 +177,9 @@ public enum KubernetesFluxComplianceState Suspended = 3, Unknown = 4, } - public partial class KubernetesFluxConfiguration : Azure.Provisioning.Primitives.Resource + public partial class KubernetesFluxConfiguration : Azure.Provisioning.Primitives.ProvisionableResource { - public KubernetesFluxConfiguration(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public KubernetesFluxConfiguration(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue AzureBlob { get { throw null; } set { } } public Azure.Provisioning.BicepValue Bucket { get { throw null; } set { } } public Azure.Provisioning.BicepValue ComplianceState { get { throw null; } } @@ -200,19 +200,18 @@ public partial class KubernetesFluxConfiguration : Azure.Provisioning.Primitives public Azure.Provisioning.BicepList Statuses { get { throw null; } } public Azure.Provisioning.BicepValue StatusUpdatedOn { get { throw null; } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public Azure.Provisioning.Authorization.RoleAssignment CreateRoleAssignment(Azure.Provisioning.KubernetesConfiguration.KubernetesConfigurationBuiltInRole role, Azure.Provisioning.BicepValue principalType, Azure.Provisioning.BicepValue principalId, string? identifierNameSuffix = null) { throw null; } + public Azure.Provisioning.Authorization.RoleAssignment CreateRoleAssignment(Azure.Provisioning.KubernetesConfiguration.KubernetesConfigurationBuiltInRole role, Azure.Provisioning.BicepValue principalType, Azure.Provisioning.BicepValue principalId, string? bicepIdentifierSuffix = null) { throw null; } public Azure.Provisioning.Authorization.RoleAssignment CreateRoleAssignment(Azure.Provisioning.KubernetesConfiguration.KubernetesConfigurationBuiltInRole role, Azure.Provisioning.Roles.UserAssignedIdentity identity) { throw null; } - public static Azure.Provisioning.KubernetesConfiguration.KubernetesFluxConfiguration FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.KubernetesConfiguration.KubernetesFluxConfiguration FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2022_03_01; public static readonly string V2022_07_01; public static readonly string V2022_11_01; public static readonly string V2023_05_01; - public static readonly string V2024_04_01_preview; } } - public partial class KubernetesGitRepository : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class KubernetesGitRepository : Azure.Provisioning.Primitives.ProvisionableConstruct { public KubernetesGitRepository() { } public Azure.Provisioning.BicepValue HttpsCACert { get { throw null; } set { } } @@ -224,7 +223,7 @@ public KubernetesGitRepository() { } public Azure.Provisioning.BicepValue TimeoutInSeconds { get { throw null; } set { } } public Azure.Provisioning.BicepValue Uri { get { throw null; } set { } } } - public partial class KubernetesGitRepositoryRef : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class KubernetesGitRepositoryRef : Azure.Provisioning.Primitives.ProvisionableConstruct { public KubernetesGitRepositoryRef() { } public Azure.Provisioning.BicepValue Branch { get { throw null; } set { } } @@ -232,13 +231,13 @@ public KubernetesGitRepositoryRef() { } public Azure.Provisioning.BicepValue Semver { get { throw null; } set { } } public Azure.Provisioning.BicepValue Tag { get { throw null; } set { } } } - public partial class KubernetesObjectReference : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class KubernetesObjectReference : Azure.Provisioning.Primitives.ProvisionableConstruct { public KubernetesObjectReference() { } public Azure.Provisioning.BicepValue Name { get { throw null; } } public Azure.Provisioning.BicepValue Namespace { get { throw null; } } } - public partial class KubernetesObjectStatus : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class KubernetesObjectStatus : Azure.Provisioning.Primitives.ProvisionableConstruct { public KubernetesObjectStatus() { } public Azure.Provisioning.BicepValue AppliedBy { get { throw null; } } @@ -249,7 +248,7 @@ public KubernetesObjectStatus() { } public Azure.Provisioning.BicepValue Namespace { get { throw null; } } public Azure.Provisioning.BicepList StatusConditions { get { throw null; } } } - public partial class KubernetesObjectStatusCondition : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class KubernetesObjectStatusCondition : Azure.Provisioning.Primitives.ProvisionableConstruct { public KubernetesObjectStatusCondition() { } public Azure.Provisioning.BicepValue LastTransitionOn { get { throw null; } } @@ -269,7 +268,7 @@ public enum KubernetesOperatorScope [System.Runtime.Serialization.DataMemberAttribute(Name="namespace")] Namespace = 1, } - public partial class KubernetesServicePrincipal : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class KubernetesServicePrincipal : Azure.Provisioning.Primitives.ProvisionableConstruct { public KubernetesServicePrincipal() { } public Azure.Provisioning.BicepValue ClientCertificate { get { throw null; } set { } } @@ -279,9 +278,9 @@ public KubernetesServicePrincipal() { } public Azure.Provisioning.BicepValue ClientSecret { get { throw null; } set { } } public Azure.Provisioning.BicepValue TenantId { get { throw null; } set { } } } - public partial class KubernetesSourceControlConfiguration : Azure.Provisioning.Primitives.Resource + public partial class KubernetesSourceControlConfiguration : Azure.Provisioning.Primitives.ProvisionableResource { - public KubernetesSourceControlConfiguration(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public KubernetesSourceControlConfiguration(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue ComplianceStatus { get { throw null; } } public Azure.Provisioning.BicepDictionary ConfigurationProtectedSettings { get { throw null; } set { } } public Azure.Provisioning.BicepValue HelmOperatorProperties { get { throw null; } set { } } @@ -298,7 +297,7 @@ public partial class KubernetesSourceControlConfiguration : Azure.Provisioning.P public Azure.Provisioning.BicepValue RepositoryUri { get { throw null; } set { } } public Azure.Provisioning.BicepValue SshKnownHostsContents { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.KubernetesConfiguration.KubernetesSourceControlConfiguration FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.KubernetesConfiguration.KubernetesSourceControlConfiguration FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2021_03_01; @@ -308,7 +307,7 @@ public static partial class ResourceVersions public static readonly string V2023_05_01; } } - public partial class Kustomization : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class Kustomization : Azure.Provisioning.Primitives.ProvisionableConstruct { public Kustomization() { } public Azure.Provisioning.BicepList DependsOn { get { throw null; } set { } } diff --git a/sdk/provisioning/Azure.Provisioning.KubernetesConfiguration/src/Generated/KubernetesClusterExtension.cs b/sdk/provisioning/Azure.Provisioning.KubernetesConfiguration/src/Generated/KubernetesClusterExtension.cs index 92dfaf9b53cd..a748c8163b04 100644 --- a/sdk/provisioning/Azure.Provisioning.KubernetesConfiguration/src/Generated/KubernetesClusterExtension.cs +++ b/sdk/provisioning/Azure.Provisioning.KubernetesConfiguration/src/Generated/KubernetesClusterExtension.cs @@ -20,7 +20,7 @@ namespace Azure.Provisioning.KubernetesConfiguration; /// /// KubernetesClusterExtension. /// -public partial class KubernetesClusterExtension : Resource +public partial class KubernetesClusterExtension : ProvisionableResource { /// /// Name of the Extension. @@ -156,15 +156,15 @@ public partial class KubernetesClusterExtension : Resource /// /// Creates a new KubernetesClusterExtension. /// - /// + /// /// The the Bicep identifier name of the KubernetesClusterExtension /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the KubernetesClusterExtension. - public KubernetesClusterExtension(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.KubernetesConfiguration/extensions", resourceVersion ?? "2023-05-01") + public KubernetesClusterExtension(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.KubernetesConfiguration/extensions", resourceVersion ?? "2023-05-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _aksAssignedIdentity = BicepValue.DefineProperty(this, "AksAssignedIdentity", ["properties", "aksAssignedIdentity"]); @@ -217,7 +217,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing KubernetesClusterExtension. /// - /// + /// /// The the Bicep identifier name of the KubernetesClusterExtension /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -225,8 +225,8 @@ public static class ResourceVersions /// /// Version of the KubernetesClusterExtension. /// The existing KubernetesClusterExtension resource. - public static KubernetesClusterExtension FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static KubernetesClusterExtension FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; /// /// Creates a role assignment for a user-assigned identity that grants @@ -236,10 +236,10 @@ public static KubernetesClusterExtension FromExisting(string identifierName, str /// The . /// The . public RoleAssignment CreateRoleAssignment(KubernetesConfigurationBuiltInRole role, UserAssignedIdentity identity) => - new($"{IdentifierName}_{identity.IdentifierName}_{KubernetesConfigurationBuiltInRole.GetBuiltInRoleName(role)}") + new($"{BicepIdentifier}_{identity.BicepIdentifier}_{KubernetesConfigurationBuiltInRole.GetBuiltInRoleName(role)}") { Name = BicepFunction.CreateGuid(Id, identity.PrincipalId, BicepFunction.GetSubscriptionResourceId("Microsoft.Authorization/roleDefinitions", role.ToString())), - Scope = new IdentifierExpression(IdentifierName), + Scope = new IdentifierExpression(BicepIdentifier), PrincipalType = RoleManagementPrincipalType.ServicePrincipal, RoleDefinitionId = BicepFunction.GetSubscriptionResourceId("Microsoft.Authorization/roleDefinitions", role.ToString()), PrincipalId = identity.PrincipalId @@ -252,13 +252,13 @@ public RoleAssignment CreateRoleAssignment(KubernetesConfigurationBuiltInRole ro /// The role to grant. /// The type of the principal to assign to. /// The principal to assign to. - /// Optional role assignment identifier name suffix. + /// Optional role assignment identifier name suffix. /// The . - public RoleAssignment CreateRoleAssignment(KubernetesConfigurationBuiltInRole role, BicepValue principalType, BicepValue principalId, string? identifierNameSuffix = default) => - new($"{IdentifierName}_{KubernetesConfigurationBuiltInRole.GetBuiltInRoleName(role)}{(identifierNameSuffix is null ? "" : "_")}{identifierNameSuffix}") + public RoleAssignment CreateRoleAssignment(KubernetesConfigurationBuiltInRole role, BicepValue principalType, BicepValue principalId, string? bicepIdentifierSuffix = default) => + new($"{BicepIdentifier}_{KubernetesConfigurationBuiltInRole.GetBuiltInRoleName(role)}{(bicepIdentifierSuffix is null ? "" : "_")}{bicepIdentifierSuffix}") { Name = BicepFunction.CreateGuid(Id, principalId, BicepFunction.GetSubscriptionResourceId("Microsoft.Authorization/roleDefinitions", role.ToString())), - Scope = new IdentifierExpression(IdentifierName), + Scope = new IdentifierExpression(BicepIdentifier), PrincipalType = principalType, RoleDefinitionId = BicepFunction.GetSubscriptionResourceId("Microsoft.Authorization/roleDefinitions", role.ToString()), PrincipalId = principalId diff --git a/sdk/provisioning/Azure.Provisioning.KubernetesConfiguration/src/Generated/KubernetesFluxConfiguration.cs b/sdk/provisioning/Azure.Provisioning.KubernetesConfiguration/src/Generated/KubernetesFluxConfiguration.cs index 4353cb5f6770..a0600701d345 100644 --- a/sdk/provisioning/Azure.Provisioning.KubernetesConfiguration/src/Generated/KubernetesFluxConfiguration.cs +++ b/sdk/provisioning/Azure.Provisioning.KubernetesConfiguration/src/Generated/KubernetesFluxConfiguration.cs @@ -19,7 +19,7 @@ namespace Azure.Provisioning.KubernetesConfiguration; /// /// KubernetesFluxConfiguration. /// -public partial class KubernetesFluxConfiguration : Resource +public partial class KubernetesFluxConfiguration : ProvisionableResource { /// /// Name of the Flux Configuration. @@ -153,15 +153,15 @@ public partial class KubernetesFluxConfiguration : Resource /// /// Creates a new KubernetesFluxConfiguration. /// - /// + /// /// The the Bicep identifier name of the KubernetesFluxConfiguration /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the KubernetesFluxConfiguration. - public KubernetesFluxConfiguration(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.KubernetesConfiguration/fluxConfigurations", resourceVersion ?? "2023-05-01") + public KubernetesFluxConfiguration(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.KubernetesConfiguration/fluxConfigurations", resourceVersion ?? "2023-05-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _azureBlob = BicepValue.DefineProperty(this, "AzureBlob", ["properties", "azureBlob"]); @@ -190,11 +190,6 @@ public KubernetesFluxConfiguration(string identifierName, string? resourceVersio /// public static class ResourceVersions { - /// - /// 2024-04-01-preview. - /// - public static readonly string V2024_04_01_preview = "2024-04-01-preview"; - /// /// 2023-05-01. /// @@ -219,7 +214,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing KubernetesFluxConfiguration. /// - /// + /// /// The the Bicep identifier name of the KubernetesFluxConfiguration /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -227,8 +222,8 @@ public static class ResourceVersions /// /// Version of the KubernetesFluxConfiguration. /// The existing KubernetesFluxConfiguration resource. - public static KubernetesFluxConfiguration FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static KubernetesFluxConfiguration FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; /// /// Creates a role assignment for a user-assigned identity that grants @@ -238,10 +233,10 @@ public static KubernetesFluxConfiguration FromExisting(string identifierName, st /// The . /// The . public RoleAssignment CreateRoleAssignment(KubernetesConfigurationBuiltInRole role, UserAssignedIdentity identity) => - new($"{IdentifierName}_{identity.IdentifierName}_{KubernetesConfigurationBuiltInRole.GetBuiltInRoleName(role)}") + new($"{BicepIdentifier}_{identity.BicepIdentifier}_{KubernetesConfigurationBuiltInRole.GetBuiltInRoleName(role)}") { Name = BicepFunction.CreateGuid(Id, identity.PrincipalId, BicepFunction.GetSubscriptionResourceId("Microsoft.Authorization/roleDefinitions", role.ToString())), - Scope = new IdentifierExpression(IdentifierName), + Scope = new IdentifierExpression(BicepIdentifier), PrincipalType = RoleManagementPrincipalType.ServicePrincipal, RoleDefinitionId = BicepFunction.GetSubscriptionResourceId("Microsoft.Authorization/roleDefinitions", role.ToString()), PrincipalId = identity.PrincipalId @@ -254,13 +249,13 @@ public RoleAssignment CreateRoleAssignment(KubernetesConfigurationBuiltInRole ro /// The role to grant. /// The type of the principal to assign to. /// The principal to assign to. - /// Optional role assignment identifier name suffix. + /// Optional role assignment identifier name suffix. /// The . - public RoleAssignment CreateRoleAssignment(KubernetesConfigurationBuiltInRole role, BicepValue principalType, BicepValue principalId, string? identifierNameSuffix = default) => - new($"{IdentifierName}_{KubernetesConfigurationBuiltInRole.GetBuiltInRoleName(role)}{(identifierNameSuffix is null ? "" : "_")}{identifierNameSuffix}") + public RoleAssignment CreateRoleAssignment(KubernetesConfigurationBuiltInRole role, BicepValue principalType, BicepValue principalId, string? bicepIdentifierSuffix = default) => + new($"{BicepIdentifier}_{KubernetesConfigurationBuiltInRole.GetBuiltInRoleName(role)}{(bicepIdentifierSuffix is null ? "" : "_")}{bicepIdentifierSuffix}") { Name = BicepFunction.CreateGuid(Id, principalId, BicepFunction.GetSubscriptionResourceId("Microsoft.Authorization/roleDefinitions", role.ToString())), - Scope = new IdentifierExpression(IdentifierName), + Scope = new IdentifierExpression(BicepIdentifier), PrincipalType = principalType, RoleDefinitionId = BicepFunction.GetSubscriptionResourceId("Microsoft.Authorization/roleDefinitions", role.ToString()), PrincipalId = principalId diff --git a/sdk/provisioning/Azure.Provisioning.KubernetesConfiguration/src/Generated/KubernetesSourceControlConfiguration.cs b/sdk/provisioning/Azure.Provisioning.KubernetesConfiguration/src/Generated/KubernetesSourceControlConfiguration.cs index 4afee41b158d..088400f0ad60 100644 --- a/sdk/provisioning/Azure.Provisioning.KubernetesConfiguration/src/Generated/KubernetesSourceControlConfiguration.cs +++ b/sdk/provisioning/Azure.Provisioning.KubernetesConfiguration/src/Generated/KubernetesSourceControlConfiguration.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.KubernetesConfiguration; /// /// KubernetesSourceControlConfiguration. /// -public partial class KubernetesSourceControlConfiguration : Resource +public partial class KubernetesSourceControlConfiguration : ProvisionableResource { /// /// Name of the Source Control Configuration. @@ -121,15 +121,15 @@ public partial class KubernetesSourceControlConfiguration : Resource /// /// Creates a new KubernetesSourceControlConfiguration. /// - /// + /// /// The the Bicep identifier name of the /// KubernetesSourceControlConfiguration resource. This can be used to /// refer to the resource in expressions, but is not the Azure name of the /// resource. This value can contain letters, numbers, and underscores. /// /// Version of the KubernetesSourceControlConfiguration. - public KubernetesSourceControlConfiguration(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.KubernetesConfiguration/sourceControlConfigurations", resourceVersion ?? "2023-05-01") + public KubernetesSourceControlConfiguration(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.KubernetesConfiguration/sourceControlConfigurations", resourceVersion ?? "2023-05-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _configurationProtectedSettings = BicepDictionary.DefineProperty(this, "ConfigurationProtectedSettings", ["properties", "configurationProtectedSettings"]); @@ -183,7 +183,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing KubernetesSourceControlConfiguration. /// - /// + /// /// The the Bicep identifier name of the /// KubernetesSourceControlConfiguration resource. This can be used to /// refer to the resource in expressions, but is not the Azure name of the @@ -191,6 +191,6 @@ public static class ResourceVersions /// /// Version of the KubernetesSourceControlConfiguration. /// The existing KubernetesSourceControlConfiguration resource. - public static KubernetesSourceControlConfiguration FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static KubernetesSourceControlConfiguration FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.KubernetesConfiguration/src/Generated/Models/HelmOperatorProperties.cs b/sdk/provisioning/Azure.Provisioning.KubernetesConfiguration/src/Generated/Models/HelmOperatorProperties.cs index 189c467c4978..c6c11a14db6e 100644 --- a/sdk/provisioning/Azure.Provisioning.KubernetesConfiguration/src/Generated/Models/HelmOperatorProperties.cs +++ b/sdk/provisioning/Azure.Provisioning.KubernetesConfiguration/src/Generated/Models/HelmOperatorProperties.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.KubernetesConfiguration; /// /// Properties for Helm operator. /// -public partial class HelmOperatorProperties : ProvisioningConstruct +public partial class HelmOperatorProperties : ProvisionableConstruct { /// /// Version of the operator Helm chart. diff --git a/sdk/provisioning/Azure.Provisioning.KubernetesConfiguration/src/Generated/Models/HelmReleaseProperties.cs b/sdk/provisioning/Azure.Provisioning.KubernetesConfiguration/src/Generated/Models/HelmReleaseProperties.cs index 25de2ef42105..efff819b25c4 100644 --- a/sdk/provisioning/Azure.Provisioning.KubernetesConfiguration/src/Generated/Models/HelmReleaseProperties.cs +++ b/sdk/provisioning/Azure.Provisioning.KubernetesConfiguration/src/Generated/Models/HelmReleaseProperties.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.KubernetesConfiguration; /// /// Properties for HelmRelease objects. /// -public partial class HelmReleaseProperties : ProvisioningConstruct +public partial class HelmReleaseProperties : ProvisionableConstruct { /// /// The revision number of the last released object change. diff --git a/sdk/provisioning/Azure.Provisioning.KubernetesConfiguration/src/Generated/Models/KubernetesAzureBlob.cs b/sdk/provisioning/Azure.Provisioning.KubernetesConfiguration/src/Generated/Models/KubernetesAzureBlob.cs index 504e319ae516..5a472b372a90 100644 --- a/sdk/provisioning/Azure.Provisioning.KubernetesConfiguration/src/Generated/Models/KubernetesAzureBlob.cs +++ b/sdk/provisioning/Azure.Provisioning.KubernetesConfiguration/src/Generated/Models/KubernetesAzureBlob.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.KubernetesConfiguration; /// /// Parameters to reconcile to the AzureBlob source kind type. /// -public partial class KubernetesAzureBlob : ProvisioningConstruct +public partial class KubernetesAzureBlob : ProvisionableConstruct { /// /// The URL to sync for the flux configuration Azure Blob storage account. diff --git a/sdk/provisioning/Azure.Provisioning.KubernetesConfiguration/src/Generated/Models/KubernetesBucket.cs b/sdk/provisioning/Azure.Provisioning.KubernetesConfiguration/src/Generated/Models/KubernetesBucket.cs index e6d97e77d3db..1c4bae2d6b8b 100644 --- a/sdk/provisioning/Azure.Provisioning.KubernetesConfiguration/src/Generated/Models/KubernetesBucket.cs +++ b/sdk/provisioning/Azure.Provisioning.KubernetesConfiguration/src/Generated/Models/KubernetesBucket.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.KubernetesConfiguration; /// /// Parameters to reconcile to the Bucket source kind type. /// -public partial class KubernetesBucket : ProvisioningConstruct +public partial class KubernetesBucket : ProvisionableConstruct { /// /// The URL to sync for the flux configuration S3 bucket. diff --git a/sdk/provisioning/Azure.Provisioning.KubernetesConfiguration/src/Generated/Models/KubernetesClusterExtensionScope.cs b/sdk/provisioning/Azure.Provisioning.KubernetesConfiguration/src/Generated/Models/KubernetesClusterExtensionScope.cs index 67973e26c20e..23f27800586a 100644 --- a/sdk/provisioning/Azure.Provisioning.KubernetesConfiguration/src/Generated/Models/KubernetesClusterExtensionScope.cs +++ b/sdk/provisioning/Azure.Provisioning.KubernetesConfiguration/src/Generated/Models/KubernetesClusterExtensionScope.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.KubernetesConfiguration; /// /// Scope of the extension. It can be either Cluster or Namespace; but not both. /// -public partial class KubernetesClusterExtensionScope : ProvisioningConstruct +public partial class KubernetesClusterExtensionScope : ProvisionableConstruct { /// /// Namespace where the extension Release must be placed, for a Cluster diff --git a/sdk/provisioning/Azure.Provisioning.KubernetesConfiguration/src/Generated/Models/KubernetesClusterExtensionStatus.cs b/sdk/provisioning/Azure.Provisioning.KubernetesConfiguration/src/Generated/Models/KubernetesClusterExtensionStatus.cs index 2b22d75d5a1b..4ff6d7f5002e 100644 --- a/sdk/provisioning/Azure.Provisioning.KubernetesConfiguration/src/Generated/Models/KubernetesClusterExtensionStatus.cs +++ b/sdk/provisioning/Azure.Provisioning.KubernetesConfiguration/src/Generated/Models/KubernetesClusterExtensionStatus.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.KubernetesConfiguration; /// /// Status from the extension. /// -public partial class KubernetesClusterExtensionStatus : ProvisioningConstruct +public partial class KubernetesClusterExtensionStatus : ProvisionableConstruct { /// /// Status code provided by the Extension. diff --git a/sdk/provisioning/Azure.Provisioning.KubernetesConfiguration/src/Generated/Models/KubernetesConfigurationComplianceStatus.cs b/sdk/provisioning/Azure.Provisioning.KubernetesConfiguration/src/Generated/Models/KubernetesConfigurationComplianceStatus.cs index b4c4be240621..55b5235724ef 100644 --- a/sdk/provisioning/Azure.Provisioning.KubernetesConfiguration/src/Generated/Models/KubernetesConfigurationComplianceStatus.cs +++ b/sdk/provisioning/Azure.Provisioning.KubernetesConfiguration/src/Generated/Models/KubernetesConfigurationComplianceStatus.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.KubernetesConfiguration; /// /// Compliance Status details. /// -public partial class KubernetesConfigurationComplianceStatus : ProvisioningConstruct +public partial class KubernetesConfigurationComplianceStatus : ProvisionableConstruct { /// /// The compliance state of the configuration. diff --git a/sdk/provisioning/Azure.Provisioning.KubernetesConfiguration/src/Generated/Models/KubernetesGitRepository.cs b/sdk/provisioning/Azure.Provisioning.KubernetesConfiguration/src/Generated/Models/KubernetesGitRepository.cs index a3f7c9013460..645dde16843c 100644 --- a/sdk/provisioning/Azure.Provisioning.KubernetesConfiguration/src/Generated/Models/KubernetesGitRepository.cs +++ b/sdk/provisioning/Azure.Provisioning.KubernetesConfiguration/src/Generated/Models/KubernetesGitRepository.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.KubernetesConfiguration; /// /// Parameters to reconcile to the GitRepository source kind type. /// -public partial class KubernetesGitRepository : ProvisioningConstruct +public partial class KubernetesGitRepository : ProvisionableConstruct { /// /// The URL to sync for the flux configuration git repository. diff --git a/sdk/provisioning/Azure.Provisioning.KubernetesConfiguration/src/Generated/Models/KubernetesGitRepositoryRef.cs b/sdk/provisioning/Azure.Provisioning.KubernetesConfiguration/src/Generated/Models/KubernetesGitRepositoryRef.cs index 787c5c83a85b..76006234989b 100644 --- a/sdk/provisioning/Azure.Provisioning.KubernetesConfiguration/src/Generated/Models/KubernetesGitRepositoryRef.cs +++ b/sdk/provisioning/Azure.Provisioning.KubernetesConfiguration/src/Generated/Models/KubernetesGitRepositoryRef.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.KubernetesConfiguration; /// /// The source reference for the GitRepository object. /// -public partial class KubernetesGitRepositoryRef : ProvisioningConstruct +public partial class KubernetesGitRepositoryRef : ProvisionableConstruct { /// /// The git repository branch name to checkout. diff --git a/sdk/provisioning/Azure.Provisioning.KubernetesConfiguration/src/Generated/Models/KubernetesObjectReference.cs b/sdk/provisioning/Azure.Provisioning.KubernetesConfiguration/src/Generated/Models/KubernetesObjectReference.cs index ad188f4c617f..3a1a1dd87708 100644 --- a/sdk/provisioning/Azure.Provisioning.KubernetesConfiguration/src/Generated/Models/KubernetesObjectReference.cs +++ b/sdk/provisioning/Azure.Provisioning.KubernetesConfiguration/src/Generated/Models/KubernetesObjectReference.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.KubernetesConfiguration; /// /// Object reference to a Kubernetes object on a cluster. /// -public partial class KubernetesObjectReference : ProvisioningConstruct +public partial class KubernetesObjectReference : ProvisionableConstruct { /// /// Name of the object. diff --git a/sdk/provisioning/Azure.Provisioning.KubernetesConfiguration/src/Generated/Models/KubernetesObjectStatus.cs b/sdk/provisioning/Azure.Provisioning.KubernetesConfiguration/src/Generated/Models/KubernetesObjectStatus.cs index 427410c8dc77..cef8374722a0 100644 --- a/sdk/provisioning/Azure.Provisioning.KubernetesConfiguration/src/Generated/Models/KubernetesObjectStatus.cs +++ b/sdk/provisioning/Azure.Provisioning.KubernetesConfiguration/src/Generated/Models/KubernetesObjectStatus.cs @@ -13,7 +13,7 @@ namespace Azure.Provisioning.KubernetesConfiguration; /// Statuses of objects deployed by the user-specified kustomizations from the /// git repository. /// -public partial class KubernetesObjectStatus : ProvisioningConstruct +public partial class KubernetesObjectStatus : ProvisionableConstruct { /// /// Name of the applied object. diff --git a/sdk/provisioning/Azure.Provisioning.KubernetesConfiguration/src/Generated/Models/KubernetesObjectStatusCondition.cs b/sdk/provisioning/Azure.Provisioning.KubernetesConfiguration/src/Generated/Models/KubernetesObjectStatusCondition.cs index a821167fbcf0..1cd0f2d325e4 100644 --- a/sdk/provisioning/Azure.Provisioning.KubernetesConfiguration/src/Generated/Models/KubernetesObjectStatusCondition.cs +++ b/sdk/provisioning/Azure.Provisioning.KubernetesConfiguration/src/Generated/Models/KubernetesObjectStatusCondition.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.KubernetesConfiguration; /// /// Status condition of Kubernetes object. /// -public partial class KubernetesObjectStatusCondition : ProvisioningConstruct +public partial class KubernetesObjectStatusCondition : ProvisionableConstruct { /// /// Last time this status condition has changed. diff --git a/sdk/provisioning/Azure.Provisioning.KubernetesConfiguration/src/Generated/Models/KubernetesServicePrincipal.cs b/sdk/provisioning/Azure.Provisioning.KubernetesConfiguration/src/Generated/Models/KubernetesServicePrincipal.cs index 944fb44a11c6..f79d8ef144cd 100644 --- a/sdk/provisioning/Azure.Provisioning.KubernetesConfiguration/src/Generated/Models/KubernetesServicePrincipal.cs +++ b/sdk/provisioning/Azure.Provisioning.KubernetesConfiguration/src/Generated/Models/KubernetesServicePrincipal.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.KubernetesConfiguration; /// /// Parameters to authenticate using Service Principal. /// -public partial class KubernetesServicePrincipal : ProvisioningConstruct +public partial class KubernetesServicePrincipal : ProvisionableConstruct { /// /// The client Id for authenticating a Service Principal. diff --git a/sdk/provisioning/Azure.Provisioning.KubernetesConfiguration/src/Generated/Models/Kustomization.cs b/sdk/provisioning/Azure.Provisioning.KubernetesConfiguration/src/Generated/Models/Kustomization.cs index 2d555a6bb1a9..940552d83ae1 100644 --- a/sdk/provisioning/Azure.Provisioning.KubernetesConfiguration/src/Generated/Models/Kustomization.cs +++ b/sdk/provisioning/Azure.Provisioning.KubernetesConfiguration/src/Generated/Models/Kustomization.cs @@ -13,7 +13,7 @@ namespace Azure.Provisioning.KubernetesConfiguration; /// The Kustomization defining how to reconcile the artifact pulled by the /// source type on the cluster. /// -public partial class Kustomization : ProvisioningConstruct +public partial class Kustomization : ProvisionableConstruct { /// /// Name of the Kustomization, matching the key in the Kustomizations diff --git a/sdk/provisioning/Azure.Provisioning.OperationalInsights/api/Azure.Provisioning.OperationalInsights.netstandard2.0.cs b/sdk/provisioning/Azure.Provisioning.OperationalInsights/api/Azure.Provisioning.OperationalInsights.netstandard2.0.cs index b2e9fe0c6698..3d7e9d67451e 100644 --- a/sdk/provisioning/Azure.Provisioning.OperationalInsights/api/Azure.Provisioning.OperationalInsights.netstandard2.0.cs +++ b/sdk/provisioning/Azure.Provisioning.OperationalInsights/api/Azure.Provisioning.OperationalInsights.netstandard2.0.cs @@ -1,8 +1,8 @@ namespace Azure.Provisioning.OperationalInsights { - public partial class LogAnalyticsQuery : Azure.Provisioning.Primitives.Resource + public partial class LogAnalyticsQuery : Azure.Provisioning.Primitives.ProvisionableResource { - public LogAnalyticsQuery(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public LogAnalyticsQuery(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue ApplicationId { get { throw null; } } public Azure.Provisioning.BicepValue Author { get { throw null; } } public Azure.Provisioning.BicepValue Body { get { throw null; } set { } } @@ -16,16 +16,16 @@ public partial class LogAnalyticsQuery : Azure.Provisioning.Primitives.Resource public Azure.Provisioning.BicepValue Related { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepDictionary> Tags { get { throw null; } set { } } - public static Azure.Provisioning.OperationalInsights.LogAnalyticsQuery FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.OperationalInsights.LogAnalyticsQuery FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2019_09_01; public static readonly string V2023_09_01; } } - public partial class LogAnalyticsQueryPack : Azure.Provisioning.Primitives.Resource + public partial class LogAnalyticsQueryPack : Azure.Provisioning.Primitives.ProvisionableResource { - public LogAnalyticsQueryPack(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public LogAnalyticsQueryPack(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue CreatedOn { get { throw null; } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Location { get { throw null; } set { } } @@ -35,14 +35,14 @@ public partial class LogAnalyticsQueryPack : Azure.Provisioning.Primitives.Resou public Azure.Provisioning.BicepValue QueryPackId { get { throw null; } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } - public static Azure.Provisioning.OperationalInsights.LogAnalyticsQueryPack FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.OperationalInsights.LogAnalyticsQueryPack FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2019_09_01; public static readonly string V2023_09_01; } } - public partial class LogAnalyticsQueryRelatedMetadata : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class LogAnalyticsQueryRelatedMetadata : Azure.Provisioning.Primitives.ProvisionableConstruct { public LogAnalyticsQueryRelatedMetadata() { } public Azure.Provisioning.BicepList Categories { get { throw null; } set { } } @@ -54,15 +54,15 @@ public enum OperationalInsightsBillingType Cluster = 0, Workspaces = 1, } - public partial class OperationalInsightsCapacityReservationProperties : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class OperationalInsightsCapacityReservationProperties : Azure.Provisioning.Primitives.ProvisionableConstruct { public OperationalInsightsCapacityReservationProperties() { } public Azure.Provisioning.BicepValue LastSkuUpdatedOn { get { throw null; } } public Azure.Provisioning.BicepValue MinCapacity { get { throw null; } } } - public partial class OperationalInsightsCluster : Azure.Provisioning.Primitives.Resource + public partial class OperationalInsightsCluster : Azure.Provisioning.Primitives.ProvisionableResource { - public OperationalInsightsCluster(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public OperationalInsightsCluster(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepList AssociatedWorkspaces { get { throw null; } set { } } public Azure.Provisioning.BicepValue BillingType { get { throw null; } set { } } public Azure.Provisioning.BicepValue CapacityReservationProperties { get { throw null; } set { } } @@ -80,7 +80,7 @@ public partial class OperationalInsightsCluster : Azure.Provisioning.Primitives. public Azure.Provisioning.BicepValue Sku { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } - public static Azure.Provisioning.OperationalInsights.OperationalInsightsCluster FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.OperationalInsights.OperationalInsightsCluster FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override Azure.Provisioning.Primitives.ResourceNameRequirements GetResourceNameRequirements() { throw null; } public static partial class ResourceVersions @@ -92,7 +92,7 @@ public static partial class ResourceVersions public static readonly string V2023_09_01; } } - public partial class OperationalInsightsClusterAssociatedWorkspace : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class OperationalInsightsClusterAssociatedWorkspace : Azure.Provisioning.Primitives.ProvisionableConstruct { public OperationalInsightsClusterAssociatedWorkspace() { } public Azure.Provisioning.BicepValue AssociatedOn { get { throw null; } } @@ -121,7 +121,7 @@ public enum OperationalInsightsClusterEntityStatus ProvisioningAccount = 5, Updating = 6, } - public partial class OperationalInsightsClusterSku : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class OperationalInsightsClusterSku : Azure.Provisioning.Primitives.ProvisionableConstruct { public OperationalInsightsClusterSku() { } public Azure.Provisioning.BicepValue Capacity { get { throw null; } set { } } @@ -131,7 +131,7 @@ public enum OperationalInsightsClusterSkuName { CapacityReservation = 0, } - public partial class OperationalInsightsColumn : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class OperationalInsightsColumn : Azure.Provisioning.Primitives.ProvisionableConstruct { public OperationalInsightsColumn() { } public Azure.Provisioning.BicepValue ColumnType { get { throw null; } set { } } @@ -172,9 +172,9 @@ public enum OperationalInsightsColumnType [System.Runtime.Serialization.DataMemberAttribute(Name="dynamic")] Dynamic = 7, } - public partial class OperationalInsightsDataExport : Azure.Provisioning.Primitives.Resource + public partial class OperationalInsightsDataExport : Azure.Provisioning.Primitives.ProvisionableResource { - public OperationalInsightsDataExport(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public OperationalInsightsDataExport(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue CreatedOn { get { throw null; } set { } } public Azure.Provisioning.BicepValue DataExportId { get { throw null; } set { } } public Azure.Provisioning.BicepValue DestinationType { get { throw null; } } @@ -187,7 +187,7 @@ public partial class OperationalInsightsDataExport : Azure.Provisioning.Primitiv public Azure.Provisioning.BicepValue ResourceId { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepList TableNames { get { throw null; } set { } } - public static Azure.Provisioning.OperationalInsights.OperationalInsightsDataExport FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.OperationalInsights.OperationalInsightsDataExport FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2020_08_01; @@ -208,9 +208,9 @@ public enum OperationalInsightsDataIngestionStatus SubscriptionSuspended = 4, ApproachingQuota = 5, } - public partial class OperationalInsightsDataSource : Azure.Provisioning.Primitives.Resource + public partial class OperationalInsightsDataSource : Azure.Provisioning.Primitives.ProvisionableResource { - public OperationalInsightsDataSource(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public OperationalInsightsDataSource(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue ETag { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Kind { get { throw null; } set { } } @@ -219,7 +219,7 @@ public partial class OperationalInsightsDataSource : Azure.Provisioning.Primitiv public Azure.Provisioning.BicepValue Properties { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } - public static Azure.Provisioning.OperationalInsights.OperationalInsightsDataSource FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.OperationalInsights.OperationalInsightsDataSource FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2020_08_01; @@ -270,7 +270,7 @@ public enum OperationalInsightsDataSourceType Ingestion = 3, Alerts = 4, } - public partial class OperationalInsightsKeyVaultProperties : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class OperationalInsightsKeyVaultProperties : Azure.Provisioning.Primitives.ProvisionableConstruct { public OperationalInsightsKeyVaultProperties() { } public Azure.Provisioning.BicepValue KeyName { get { throw null; } set { } } @@ -278,9 +278,9 @@ public OperationalInsightsKeyVaultProperties() { } public Azure.Provisioning.BicepValue KeyVaultUri { get { throw null; } set { } } public Azure.Provisioning.BicepValue KeyVersion { get { throw null; } set { } } } - public partial class OperationalInsightsLinkedService : Azure.Provisioning.Primitives.Resource + public partial class OperationalInsightsLinkedService : Azure.Provisioning.Primitives.ProvisionableResource { - public OperationalInsightsLinkedService(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public OperationalInsightsLinkedService(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } public Azure.Provisioning.OperationalInsights.OperationalInsightsWorkspace? Parent { get { throw null; } set { } } @@ -289,7 +289,7 @@ public partial class OperationalInsightsLinkedService : Azure.Provisioning.Primi public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } public Azure.Provisioning.BicepValue WriteAccessResourceId { get { throw null; } set { } } - public static Azure.Provisioning.OperationalInsights.OperationalInsightsLinkedService FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.OperationalInsights.OperationalInsightsLinkedService FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2020_08_01; @@ -303,23 +303,23 @@ public enum OperationalInsightsLinkedServiceEntityStatus ProvisioningAccount = 2, Updating = 3, } - public partial class OperationalInsightsLinkedStorageAccounts : Azure.Provisioning.Primitives.Resource + public partial class OperationalInsightsLinkedStorageAccounts : Azure.Provisioning.Primitives.ProvisionableResource { - public OperationalInsightsLinkedStorageAccounts(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public OperationalInsightsLinkedStorageAccounts(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue DataSourceType { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Name { get { throw null; } } public Azure.Provisioning.OperationalInsights.OperationalInsightsWorkspace? Parent { get { throw null; } set { } } public Azure.Provisioning.BicepList StorageAccountIds { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.OperationalInsights.OperationalInsightsLinkedStorageAccounts FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.OperationalInsights.OperationalInsightsLinkedStorageAccounts FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2020_08_01; public static readonly string V2023_09_01; } } - public partial class OperationalInsightsPrivateLinkScopedResourceInfo : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class OperationalInsightsPrivateLinkScopedResourceInfo : Azure.Provisioning.Primitives.ProvisionableConstruct { public OperationalInsightsPrivateLinkScopedResourceInfo() { } public Azure.Provisioning.BicepValue ResourceId { get { throw null; } } @@ -330,9 +330,9 @@ public enum OperationalInsightsPublicNetworkAccessType Enabled = 0, Disabled = 1, } - public partial class OperationalInsightsSavedSearch : Azure.Provisioning.Primitives.Resource + public partial class OperationalInsightsSavedSearch : Azure.Provisioning.Primitives.ProvisionableResource { - public OperationalInsightsSavedSearch(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public OperationalInsightsSavedSearch(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Category { get { throw null; } set { } } public Azure.Provisioning.BicepValue DisplayName { get { throw null; } set { } } public Azure.Provisioning.BicepValue ETag { get { throw null; } set { } } @@ -345,7 +345,7 @@ public partial class OperationalInsightsSavedSearch : Azure.Provisioning.Primiti public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepList Tags { get { throw null; } set { } } public Azure.Provisioning.BicepValue Version { get { throw null; } set { } } - public static Azure.Provisioning.OperationalInsights.OperationalInsightsSavedSearch FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.OperationalInsights.OperationalInsightsSavedSearch FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2015_03_20; @@ -356,7 +356,7 @@ public static partial class ResourceVersions public static readonly string V2023_09_01; } } - public partial class OperationalInsightsSchema : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class OperationalInsightsSchema : Azure.Provisioning.Primitives.ProvisionableConstruct { public OperationalInsightsSchema() { } public Azure.Provisioning.BicepList Categories { get { throw null; } } @@ -371,15 +371,15 @@ public OperationalInsightsSchema() { } public Azure.Provisioning.BicepValue TableSubType { get { throw null; } } public Azure.Provisioning.BicepValue TableType { get { throw null; } } } - public partial class OperationalInsightsStorageAccount : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class OperationalInsightsStorageAccount : Azure.Provisioning.Primitives.ProvisionableConstruct { public OperationalInsightsStorageAccount() { } public Azure.Provisioning.BicepValue Id { get { throw null; } set { } } public Azure.Provisioning.BicepValue Key { get { throw null; } set { } } } - public partial class OperationalInsightsTable : Azure.Provisioning.Primitives.Resource + public partial class OperationalInsightsTable : Azure.Provisioning.Primitives.ProvisionableResource { - public OperationalInsightsTable(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public OperationalInsightsTable(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue ArchiveRetentionInDays { get { throw null; } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue IsRetentionInDaysAsDefault { get { throw null; } } @@ -396,7 +396,7 @@ public partial class OperationalInsightsTable : Azure.Provisioning.Primitives.Re public Azure.Provisioning.BicepValue SearchResults { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepValue TotalRetentionInDays { get { throw null; } set { } } - public static Azure.Provisioning.OperationalInsights.OperationalInsightsTable FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.OperationalInsights.OperationalInsightsTable FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2020_08_01; @@ -423,7 +423,7 @@ public enum OperationalInsightsTableProvisioningState Succeeded = 2, Deleting = 3, } - public partial class OperationalInsightsTableRestoredLogs : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class OperationalInsightsTableRestoredLogs : Azure.Provisioning.Primitives.ProvisionableConstruct { public OperationalInsightsTableRestoredLogs() { } public Azure.Provisioning.BicepValue AzureAsyncOperationId { get { throw null; } } @@ -431,14 +431,14 @@ public OperationalInsightsTableRestoredLogs() { } public Azure.Provisioning.BicepValue SourceTable { get { throw null; } set { } } public Azure.Provisioning.BicepValue StartRestoreOn { get { throw null; } set { } } } - public partial class OperationalInsightsTableResultStatistics : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class OperationalInsightsTableResultStatistics : Azure.Provisioning.Primitives.ProvisionableConstruct { public OperationalInsightsTableResultStatistics() { } public Azure.Provisioning.BicepValue IngestedRecords { get { throw null; } } public Azure.Provisioning.BicepValue Progress { get { throw null; } } public Azure.Provisioning.BicepValue ScannedGB { get { throw null; } } } - public partial class OperationalInsightsTableSearchResults : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class OperationalInsightsTableSearchResults : Azure.Provisioning.Primitives.ProvisionableConstruct { public OperationalInsightsTableSearchResults() { } public Azure.Provisioning.BicepValue AzureAsyncOperationId { get { throw null; } } @@ -462,15 +462,15 @@ public enum OperationalInsightsTableType RestoredLogs = 2, SearchResults = 3, } - public partial class OperationalInsightsTag : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class OperationalInsightsTag : Azure.Provisioning.Primitives.ProvisionableConstruct { public OperationalInsightsTag() { } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } public Azure.Provisioning.BicepValue Value { get { throw null; } set { } } } - public partial class OperationalInsightsWorkspace : Azure.Provisioning.Primitives.Resource + public partial class OperationalInsightsWorkspace : Azure.Provisioning.Primitives.ProvisionableResource { - public OperationalInsightsWorkspace(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public OperationalInsightsWorkspace(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue CreatedOn { get { throw null; } } public Azure.Provisioning.BicepValue CustomerId { get { throw null; } } public Azure.Provisioning.BicepValue DefaultDataCollectionRuleResourceId { get { throw null; } set { } } @@ -491,7 +491,7 @@ public partial class OperationalInsightsWorkspace : Azure.Provisioning.Primitive public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } public Azure.Provisioning.BicepValue WorkspaceCapping { get { throw null; } set { } } - public static Azure.Provisioning.OperationalInsights.OperationalInsightsWorkspace FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.OperationalInsights.OperationalInsightsWorkspace FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public Azure.Provisioning.OperationalInsights.OperationalInsightsWorkspaceSharedKeys GetKeys() { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override Azure.Provisioning.Primitives.ResourceNameRequirements GetResourceNameRequirements() { throw null; } @@ -524,7 +524,7 @@ public enum OperationalInsightsWorkspaceCapacityReservationLevel [System.Runtime.Serialization.DataMemberAttribute(Name="5000")] FiveThousand = 7, } - public partial class OperationalInsightsWorkspaceCapping : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class OperationalInsightsWorkspaceCapping : Azure.Provisioning.Primitives.ProvisionableConstruct { public OperationalInsightsWorkspaceCapping() { } public Azure.Provisioning.BicepValue DailyQuotaInGB { get { throw null; } set { } } @@ -541,7 +541,7 @@ public enum OperationalInsightsWorkspaceEntityStatus ProvisioningAccount = 5, Updating = 6, } - public partial class OperationalInsightsWorkspaceFeatures : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class OperationalInsightsWorkspaceFeatures : Azure.Provisioning.Primitives.ProvisionableConstruct { public OperationalInsightsWorkspaceFeatures() { } public Azure.Provisioning.BicepDictionary AdditionalProperties { get { throw null; } set { } } @@ -551,15 +551,15 @@ public OperationalInsightsWorkspaceFeatures() { } public Azure.Provisioning.BicepValue IsLocalAuthDisabled { get { throw null; } set { } } public Azure.Provisioning.BicepValue IsLogAccessUsingOnlyResourcePermissionsEnabled { get { throw null; } set { } } } - public partial class OperationalInsightsWorkspaceSharedKeys : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class OperationalInsightsWorkspaceSharedKeys : Azure.Provisioning.Primitives.ProvisionableConstruct { public OperationalInsightsWorkspaceSharedKeys() { } public Azure.Provisioning.BicepValue PrimarySharedKey { get { throw null; } } public Azure.Provisioning.BicepValue SecondarySharedKey { get { throw null; } } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public static Azure.Provisioning.OperationalInsights.OperationalInsightsWorkspaceSharedKeys FromExpression(Azure.Provisioning.Expressions.Expression expression) { throw null; } + public static Azure.Provisioning.OperationalInsights.OperationalInsightsWorkspaceSharedKeys FromExpression(Azure.Provisioning.Expressions.BicepExpression expression) { throw null; } } - public partial class OperationalInsightsWorkspaceSku : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class OperationalInsightsWorkspaceSku : Azure.Provisioning.Primitives.ProvisionableConstruct { public OperationalInsightsWorkspaceSku() { } public Azure.Provisioning.BicepValue CapacityReservationLevel { get { throw null; } set { } } @@ -582,9 +582,9 @@ public enum RetentionInDaysAsDefaultState True = 0, False = 1, } - public partial class StorageInsight : Azure.Provisioning.Primitives.Resource + public partial class StorageInsight : Azure.Provisioning.Primitives.ProvisionableResource { - public StorageInsight(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public StorageInsight(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepList Containers { get { throw null; } set { } } public Azure.Provisioning.BicepValue ETag { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } @@ -595,7 +595,7 @@ public partial class StorageInsight : Azure.Provisioning.Primitives.Resource public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepList Tables { get { throw null; } set { } } public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } - public static Azure.Provisioning.OperationalInsights.StorageInsight FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.OperationalInsights.StorageInsight FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2015_03_20; @@ -609,7 +609,7 @@ public enum StorageInsightState [System.Runtime.Serialization.DataMemberAttribute(Name="ERROR")] Error = 1, } - public partial class StorageInsightStatus : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class StorageInsightStatus : Azure.Provisioning.Primitives.ProvisionableConstruct { public StorageInsightStatus() { } public Azure.Provisioning.BicepValue Description { get { throw null; } } diff --git a/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/LogAnalyticsQuery.cs b/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/LogAnalyticsQuery.cs index 1fae36b5e54c..e508b0f0eda9 100644 --- a/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/LogAnalyticsQuery.cs +++ b/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/LogAnalyticsQuery.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.OperationalInsights; /// /// LogAnalyticsQuery. /// -public partial class LogAnalyticsQuery : Resource +public partial class LogAnalyticsQuery : ProvisionableResource { /// /// Gets the Name. @@ -111,15 +111,15 @@ public partial class LogAnalyticsQuery : Resource /// /// Creates a new LogAnalyticsQuery. /// - /// + /// /// The the Bicep identifier name of the LogAnalyticsQuery resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, /// and underscores. /// /// Version of the LogAnalyticsQuery. - public LogAnalyticsQuery(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.OperationalInsights/queryPacks/queries", resourceVersion ?? "2023-09-01") + public LogAnalyticsQuery(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.OperationalInsights/queryPacks/queries", resourceVersion ?? "2023-09-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _body = BicepValue.DefineProperty(this, "Body", ["properties", "body"]); @@ -155,7 +155,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing LogAnalyticsQuery. /// - /// + /// /// The the Bicep identifier name of the LogAnalyticsQuery resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, @@ -163,6 +163,6 @@ public static class ResourceVersions /// /// Version of the LogAnalyticsQuery. /// The existing LogAnalyticsQuery resource. - public static LogAnalyticsQuery FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static LogAnalyticsQuery FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/LogAnalyticsQueryPack.cs b/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/LogAnalyticsQueryPack.cs index 810923b7ed30..d6213a2115d0 100644 --- a/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/LogAnalyticsQueryPack.cs +++ b/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/LogAnalyticsQueryPack.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.OperationalInsights; /// /// LogAnalyticsQueryPack. /// -public partial class LogAnalyticsQueryPack : Resource +public partial class LogAnalyticsQueryPack : ProvisionableResource { /// /// The name of the Log Analytics QueryPack resource. @@ -78,15 +78,15 @@ public partial class LogAnalyticsQueryPack : Resource /// /// Creates a new LogAnalyticsQueryPack. /// - /// + /// /// The the Bicep identifier name of the LogAnalyticsQueryPack resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, /// numbers, and underscores. /// /// Version of the LogAnalyticsQueryPack. - public LogAnalyticsQueryPack(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.OperationalInsights/queryPacks", resourceVersion ?? "2023-09-01") + public LogAnalyticsQueryPack(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.OperationalInsights/queryPacks", resourceVersion ?? "2023-09-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _location = BicepValue.DefineProperty(this, "Location", ["location"], isRequired: true); @@ -118,7 +118,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing LogAnalyticsQueryPack. /// - /// + /// /// The the Bicep identifier name of the LogAnalyticsQueryPack resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, @@ -126,6 +126,6 @@ public static class ResourceVersions /// /// Version of the LogAnalyticsQueryPack. /// The existing LogAnalyticsQueryPack resource. - public static LogAnalyticsQueryPack FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static LogAnalyticsQueryPack FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/Models/LogAnalyticsQueryRelatedMetadata.cs b/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/Models/LogAnalyticsQueryRelatedMetadata.cs index 6e5bbcec2a46..d780e6115070 100644 --- a/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/Models/LogAnalyticsQueryRelatedMetadata.cs +++ b/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/Models/LogAnalyticsQueryRelatedMetadata.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.OperationalInsights; /// /// The related metadata items for the function. /// -public partial class LogAnalyticsQueryRelatedMetadata : ProvisioningConstruct +public partial class LogAnalyticsQueryRelatedMetadata : ProvisionableConstruct { /// /// The related categories for the function. diff --git a/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/Models/OperationalInsightsCapacityReservationProperties.cs b/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/Models/OperationalInsightsCapacityReservationProperties.cs index e49fbf9eb73c..0f2f6bbf1a80 100644 --- a/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/Models/OperationalInsightsCapacityReservationProperties.cs +++ b/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/Models/OperationalInsightsCapacityReservationProperties.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.OperationalInsights; /// /// The Capacity Reservation properties. /// -public partial class OperationalInsightsCapacityReservationProperties : ProvisioningConstruct +public partial class OperationalInsightsCapacityReservationProperties : ProvisionableConstruct { /// /// The last time Sku was updated. diff --git a/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/Models/OperationalInsightsClusterAssociatedWorkspace.cs b/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/Models/OperationalInsightsClusterAssociatedWorkspace.cs index 8633776455eb..0b820a4ef362 100644 --- a/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/Models/OperationalInsightsClusterAssociatedWorkspace.cs +++ b/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/Models/OperationalInsightsClusterAssociatedWorkspace.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.OperationalInsights; /// /// The list of Log Analytics workspaces associated with the cluster. /// -public partial class OperationalInsightsClusterAssociatedWorkspace : ProvisioningConstruct +public partial class OperationalInsightsClusterAssociatedWorkspace : ProvisionableConstruct { /// /// The id of the assigned workspace. diff --git a/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/Models/OperationalInsightsClusterSku.cs b/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/Models/OperationalInsightsClusterSku.cs index 294d30c9d7f3..65dbc11b9a5d 100644 --- a/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/Models/OperationalInsightsClusterSku.cs +++ b/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/Models/OperationalInsightsClusterSku.cs @@ -10,7 +10,7 @@ namespace Azure.Provisioning.OperationalInsights; /// /// The cluster sku definition. /// -public partial class OperationalInsightsClusterSku : ProvisioningConstruct +public partial class OperationalInsightsClusterSku : ProvisionableConstruct { /// /// The capacity value. diff --git a/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/Models/OperationalInsightsColumn.cs b/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/Models/OperationalInsightsColumn.cs index 8a36c4dcbf79..4ec31632dedb 100644 --- a/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/Models/OperationalInsightsColumn.cs +++ b/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/Models/OperationalInsightsColumn.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.OperationalInsights; /// /// Table column. /// -public partial class OperationalInsightsColumn : ProvisioningConstruct +public partial class OperationalInsightsColumn : ProvisionableConstruct { /// /// Column name. diff --git a/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/Models/OperationalInsightsKeyVaultProperties.cs b/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/Models/OperationalInsightsKeyVaultProperties.cs index 977170a19c23..d0737f509ee0 100644 --- a/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/Models/OperationalInsightsKeyVaultProperties.cs +++ b/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/Models/OperationalInsightsKeyVaultProperties.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.OperationalInsights; /// /// The key vault properties. /// -public partial class OperationalInsightsKeyVaultProperties : ProvisioningConstruct +public partial class OperationalInsightsKeyVaultProperties : ProvisionableConstruct { /// /// The Key Vault uri which holds they key associated with the Log diff --git a/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/Models/OperationalInsightsPrivateLinkScopedResourceInfo.cs b/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/Models/OperationalInsightsPrivateLinkScopedResourceInfo.cs index 069fe3601dfa..4f863914b1f7 100644 --- a/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/Models/OperationalInsightsPrivateLinkScopedResourceInfo.cs +++ b/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/Models/OperationalInsightsPrivateLinkScopedResourceInfo.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.OperationalInsights; /// /// The private link scope resource reference. /// -public partial class OperationalInsightsPrivateLinkScopedResourceInfo : ProvisioningConstruct +public partial class OperationalInsightsPrivateLinkScopedResourceInfo : ProvisionableConstruct { /// /// The full resource Id of the private link scope resource. diff --git a/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/Models/OperationalInsightsSchema.cs b/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/Models/OperationalInsightsSchema.cs index 3fa404ab0b02..ee59cde9e400 100644 --- a/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/Models/OperationalInsightsSchema.cs +++ b/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/Models/OperationalInsightsSchema.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.OperationalInsights; /// /// Table's schema. /// -public partial class OperationalInsightsSchema : ProvisioningConstruct +public partial class OperationalInsightsSchema : ProvisionableConstruct { /// /// Table name. diff --git a/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/Models/OperationalInsightsStorageAccount.cs b/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/Models/OperationalInsightsStorageAccount.cs index 2a2934a57e05..07ec291aaf66 100644 --- a/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/Models/OperationalInsightsStorageAccount.cs +++ b/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/Models/OperationalInsightsStorageAccount.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.OperationalInsights; /// /// Describes a storage account connection. /// -public partial class OperationalInsightsStorageAccount : ProvisioningConstruct +public partial class OperationalInsightsStorageAccount : ProvisionableConstruct { /// /// The Azure Resource Manager ID of the storage account resource. diff --git a/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/Models/OperationalInsightsTableRestoredLogs.cs b/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/Models/OperationalInsightsTableRestoredLogs.cs index a8ac556d79cd..5a8809524e5f 100644 --- a/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/Models/OperationalInsightsTableRestoredLogs.cs +++ b/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/Models/OperationalInsightsTableRestoredLogs.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.OperationalInsights; /// /// Restore parameters. /// -public partial class OperationalInsightsTableRestoredLogs : ProvisioningConstruct +public partial class OperationalInsightsTableRestoredLogs : ProvisionableConstruct { /// /// The timestamp to start the restore from (UTC). diff --git a/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/Models/OperationalInsightsTableResultStatistics.cs b/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/Models/OperationalInsightsTableResultStatistics.cs index 25f76dd6590b..0c838e5d0d60 100644 --- a/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/Models/OperationalInsightsTableResultStatistics.cs +++ b/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/Models/OperationalInsightsTableResultStatistics.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.OperationalInsights; /// /// Search job execution statistics. /// -public partial class OperationalInsightsTableResultStatistics : ProvisioningConstruct +public partial class OperationalInsightsTableResultStatistics : ProvisionableConstruct { /// /// Search job completion percentage. diff --git a/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/Models/OperationalInsightsTableSearchResults.cs b/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/Models/OperationalInsightsTableSearchResults.cs index da4cad8e552d..5e1b15bc5805 100644 --- a/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/Models/OperationalInsightsTableSearchResults.cs +++ b/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/Models/OperationalInsightsTableSearchResults.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.OperationalInsights; /// /// Parameters of the search job that initiated this table. /// -public partial class OperationalInsightsTableSearchResults : ProvisioningConstruct +public partial class OperationalInsightsTableSearchResults : ProvisionableConstruct { /// /// Search job query. diff --git a/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/Models/OperationalInsightsTag.cs b/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/Models/OperationalInsightsTag.cs index 52ee2653f1f2..be960b1b0c74 100644 --- a/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/Models/OperationalInsightsTag.cs +++ b/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/Models/OperationalInsightsTag.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.OperationalInsights; /// /// A tag of a saved search. /// -public partial class OperationalInsightsTag : ProvisioningConstruct +public partial class OperationalInsightsTag : ProvisionableConstruct { /// /// The tag name. diff --git a/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/Models/OperationalInsightsWorkspaceCapping.cs b/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/Models/OperationalInsightsWorkspaceCapping.cs index 33c4800a1197..0631d8bd995a 100644 --- a/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/Models/OperationalInsightsWorkspaceCapping.cs +++ b/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/Models/OperationalInsightsWorkspaceCapping.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.OperationalInsights; /// /// The daily volume cap for ingestion. /// -public partial class OperationalInsightsWorkspaceCapping : ProvisioningConstruct +public partial class OperationalInsightsWorkspaceCapping : ProvisionableConstruct { /// /// The workspace daily quota for ingestion. diff --git a/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/Models/OperationalInsightsWorkspaceFeatures.cs b/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/Models/OperationalInsightsWorkspaceFeatures.cs index 11ae833c982f..c7c0fe5d1166 100644 --- a/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/Models/OperationalInsightsWorkspaceFeatures.cs +++ b/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/Models/OperationalInsightsWorkspaceFeatures.cs @@ -13,7 +13,7 @@ namespace Azure.Provisioning.OperationalInsights; /// /// Workspace features. /// -public partial class OperationalInsightsWorkspaceFeatures : ProvisioningConstruct +public partial class OperationalInsightsWorkspaceFeatures : ProvisionableConstruct { /// /// Flag that indicate if data should be exported. diff --git a/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/Models/OperationalInsightsWorkspaceSharedKeys.cs b/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/Models/OperationalInsightsWorkspaceSharedKeys.cs index 0f1dabe28818..c54b6e959ab5 100644 --- a/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/Models/OperationalInsightsWorkspaceSharedKeys.cs +++ b/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/Models/OperationalInsightsWorkspaceSharedKeys.cs @@ -13,7 +13,7 @@ namespace Azure.Provisioning.OperationalInsights; /// /// The shared keys for a workspace. /// -public partial class OperationalInsightsWorkspaceSharedKeys : ProvisioningConstruct +public partial class OperationalInsightsWorkspaceSharedKeys : ProvisionableConstruct { /// /// The primary shared key of a workspace. @@ -47,7 +47,7 @@ public OperationalInsightsWorkspaceSharedKeys() /// /// A OperationalInsightsWorkspaceSharedKeys resource. [EditorBrowsable(EditorBrowsableState.Never)] - public static OperationalInsightsWorkspaceSharedKeys FromExpression(Expression expression) + public static OperationalInsightsWorkspaceSharedKeys FromExpression(BicepExpression expression) { OperationalInsightsWorkspaceSharedKeys resource = new(); resource.OverrideWithExpression(expression); diff --git a/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/Models/OperationalInsightsWorkspaceSku.cs b/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/Models/OperationalInsightsWorkspaceSku.cs index c5d98a8dc98e..1a7de4b86f80 100644 --- a/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/Models/OperationalInsightsWorkspaceSku.cs +++ b/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/Models/OperationalInsightsWorkspaceSku.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.OperationalInsights; /// /// The SKU (tier) of a workspace. /// -public partial class OperationalInsightsWorkspaceSku : ProvisioningConstruct +public partial class OperationalInsightsWorkspaceSku : ProvisionableConstruct { /// /// The name of the SKU. diff --git a/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/Models/StorageInsightStatus.cs b/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/Models/StorageInsightStatus.cs index 7be5075e7087..a9a3b378ec5c 100644 --- a/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/Models/StorageInsightStatus.cs +++ b/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/Models/StorageInsightStatus.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.OperationalInsights; /// /// The status of the storage insight. /// -public partial class StorageInsightStatus : ProvisioningConstruct +public partial class StorageInsightStatus : ProvisionableConstruct { /// /// The state of the storage insight connection to the workspace. diff --git a/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/OperationalInsightsCluster.cs b/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/OperationalInsightsCluster.cs index b19a9442deeb..c701c34ca6dc 100644 --- a/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/OperationalInsightsCluster.cs +++ b/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/OperationalInsightsCluster.cs @@ -17,7 +17,7 @@ namespace Azure.Provisioning.OperationalInsights; /// /// OperationalInsightsCluster. /// -public partial class OperationalInsightsCluster : Resource +public partial class OperationalInsightsCluster : ProvisionableResource { /// /// The name of the Log Analytics cluster. @@ -131,15 +131,15 @@ public partial class OperationalInsightsCluster : Resource /// /// Creates a new OperationalInsightsCluster. /// - /// + /// /// The the Bicep identifier name of the OperationalInsightsCluster /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the OperationalInsightsCluster. - public OperationalInsightsCluster(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.OperationalInsights/clusters", resourceVersion ?? "2023-09-01") + public OperationalInsightsCluster(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.OperationalInsights/clusters", resourceVersion ?? "2023-09-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _location = BicepValue.DefineProperty(this, "Location", ["location"], isRequired: true); @@ -194,7 +194,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing OperationalInsightsCluster. /// - /// + /// /// The the Bicep identifier name of the OperationalInsightsCluster /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -202,8 +202,8 @@ public static class ResourceVersions /// /// Version of the OperationalInsightsCluster. /// The existing OperationalInsightsCluster resource. - public static OperationalInsightsCluster FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static OperationalInsightsCluster FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; /// /// Get the requirements for naming this OperationalInsightsCluster diff --git a/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/OperationalInsightsDataExport.cs b/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/OperationalInsightsDataExport.cs index 8a04560152d2..dd6a35fe86d4 100644 --- a/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/OperationalInsightsDataExport.cs +++ b/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/OperationalInsightsDataExport.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.OperationalInsights; /// /// OperationalInsightsDataExport. /// -public partial class OperationalInsightsDataExport : Resource +public partial class OperationalInsightsDataExport : ProvisionableResource { /// /// The data export rule name. @@ -95,15 +95,15 @@ public partial class OperationalInsightsDataExport : Resource /// /// Creates a new OperationalInsightsDataExport. /// - /// + /// /// The the Bicep identifier name of the OperationalInsightsDataExport /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the OperationalInsightsDataExport. - public OperationalInsightsDataExport(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.OperationalInsights/workspaces/dataExports", resourceVersion ?? "2023-09-01") + public OperationalInsightsDataExport(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.OperationalInsights/workspaces/dataExports", resourceVersion ?? "2023-09-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _createdOn = BicepValue.DefineProperty(this, "CreatedOn", ["properties", "createdDate"]); @@ -138,7 +138,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing OperationalInsightsDataExport. /// - /// + /// /// The the Bicep identifier name of the OperationalInsightsDataExport /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -146,6 +146,6 @@ public static class ResourceVersions /// /// Version of the OperationalInsightsDataExport. /// The existing OperationalInsightsDataExport resource. - public static OperationalInsightsDataExport FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static OperationalInsightsDataExport FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/OperationalInsightsDataSource.cs b/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/OperationalInsightsDataSource.cs index 2b80765016e3..55819de080b4 100644 --- a/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/OperationalInsightsDataSource.cs +++ b/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/OperationalInsightsDataSource.cs @@ -17,7 +17,7 @@ namespace Azure.Provisioning.OperationalInsights; /// /// OperationalInsightsDataSource. /// -public partial class OperationalInsightsDataSource : Resource +public partial class OperationalInsightsDataSource : ProvisionableResource { /// /// The name of the datasource resource. @@ -84,15 +84,15 @@ public partial class OperationalInsightsDataSource : Resource /// /// Creates a new OperationalInsightsDataSource. /// - /// + /// /// The the Bicep identifier name of the OperationalInsightsDataSource /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the OperationalInsightsDataSource. - public OperationalInsightsDataSource(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.OperationalInsights/workspaces/dataSources", resourceVersion ?? "2023-09-01") + public OperationalInsightsDataSource(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.OperationalInsights/workspaces/dataSources", resourceVersion ?? "2023-09-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _kind = BicepValue.DefineProperty(this, "Kind", ["kind"], isRequired: true); @@ -123,7 +123,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing OperationalInsightsDataSource. /// - /// + /// /// The the Bicep identifier name of the OperationalInsightsDataSource /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -131,6 +131,6 @@ public static class ResourceVersions /// /// Version of the OperationalInsightsDataSource. /// The existing OperationalInsightsDataSource resource. - public static OperationalInsightsDataSource FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static OperationalInsightsDataSource FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/OperationalInsightsLinkedService.cs b/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/OperationalInsightsLinkedService.cs index 27bcdaffed79..fe78fcf44bd8 100644 --- a/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/OperationalInsightsLinkedService.cs +++ b/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/OperationalInsightsLinkedService.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.OperationalInsights; /// /// OperationalInsightsLinkedService. /// -public partial class OperationalInsightsLinkedService : Resource +public partial class OperationalInsightsLinkedService : ProvisionableResource { /// /// Name of the linkedServices resource. @@ -71,15 +71,15 @@ public partial class OperationalInsightsLinkedService : Resource /// /// Creates a new OperationalInsightsLinkedService. /// - /// + /// /// The the Bicep identifier name of the OperationalInsightsLinkedService /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the OperationalInsightsLinkedService. - public OperationalInsightsLinkedService(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.OperationalInsights/workspaces/linkedServices", resourceVersion ?? "2023-09-01") + public OperationalInsightsLinkedService(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.OperationalInsights/workspaces/linkedServices", resourceVersion ?? "2023-09-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _provisioningState = BicepValue.DefineProperty(this, "ProvisioningState", ["properties", "provisioningState"]); @@ -110,7 +110,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing OperationalInsightsLinkedService. /// - /// + /// /// The the Bicep identifier name of the OperationalInsightsLinkedService /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -118,6 +118,6 @@ public static class ResourceVersions /// /// Version of the OperationalInsightsLinkedService. /// The existing OperationalInsightsLinkedService resource. - public static OperationalInsightsLinkedService FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static OperationalInsightsLinkedService FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/OperationalInsightsLinkedStorageAccounts.cs b/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/OperationalInsightsLinkedStorageAccounts.cs index 5da21cd8a6bd..18c3a67de526 100644 --- a/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/OperationalInsightsLinkedStorageAccounts.cs +++ b/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/OperationalInsightsLinkedStorageAccounts.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.OperationalInsights; /// /// OperationalInsightsLinkedStorageAccounts. /// -public partial class OperationalInsightsLinkedStorageAccounts : Resource +public partial class OperationalInsightsLinkedStorageAccounts : ProvisionableResource { /// /// Gets the Name. @@ -57,7 +57,7 @@ public partial class OperationalInsightsLinkedStorageAccounts : Resource /// /// Creates a new OperationalInsightsLinkedStorageAccounts. /// - /// + /// /// The the Bicep identifier name of the /// OperationalInsightsLinkedStorageAccounts resource. This can be used /// to refer to the resource in expressions, but is not the Azure name of @@ -65,8 +65,8 @@ public partial class OperationalInsightsLinkedStorageAccounts : Resource /// underscores. /// /// Version of the OperationalInsightsLinkedStorageAccounts. - public OperationalInsightsLinkedStorageAccounts(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.OperationalInsights/workspaces/linkedStorageAccounts", resourceVersion ?? "2023-09-01") + public OperationalInsightsLinkedStorageAccounts(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.OperationalInsights/workspaces/linkedStorageAccounts", resourceVersion ?? "2023-09-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _dataSourceType = BicepValue.DefineProperty(this, "DataSourceType", ["properties", "dataSourceType"], isRequired: true); @@ -96,7 +96,7 @@ public static class ResourceVersions /// Creates a reference to an existing /// OperationalInsightsLinkedStorageAccounts. /// - /// + /// /// The the Bicep identifier name of the /// OperationalInsightsLinkedStorageAccounts resource. This can be used /// to refer to the resource in expressions, but is not the Azure name of @@ -105,6 +105,6 @@ public static class ResourceVersions /// /// Version of the OperationalInsightsLinkedStorageAccounts. /// The existing OperationalInsightsLinkedStorageAccounts resource. - public static OperationalInsightsLinkedStorageAccounts FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static OperationalInsightsLinkedStorageAccounts FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/OperationalInsightsSavedSearch.cs b/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/OperationalInsightsSavedSearch.cs index 78e550da0ffe..62058aff63b9 100644 --- a/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/OperationalInsightsSavedSearch.cs +++ b/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/OperationalInsightsSavedSearch.cs @@ -17,7 +17,7 @@ namespace Azure.Provisioning.OperationalInsights; /// /// OperationalInsightsSavedSearch. /// -public partial class OperationalInsightsSavedSearch : Resource +public partial class OperationalInsightsSavedSearch : ProvisionableResource { /// /// Gets the Name. @@ -101,15 +101,15 @@ public partial class OperationalInsightsSavedSearch : Resource /// /// Creates a new OperationalInsightsSavedSearch. /// - /// + /// /// The the Bicep identifier name of the OperationalInsightsSavedSearch /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the OperationalInsightsSavedSearch. - public OperationalInsightsSavedSearch(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.OperationalInsights/workspaces/savedSearches", resourceVersion ?? "2023-09-01") + public OperationalInsightsSavedSearch(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.OperationalInsights/workspaces/savedSearches", resourceVersion ?? "2023-09-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _category = BicepValue.DefineProperty(this, "Category", ["properties", "category"], isRequired: true); @@ -164,7 +164,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing OperationalInsightsSavedSearch. /// - /// + /// /// The the Bicep identifier name of the OperationalInsightsSavedSearch /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -172,6 +172,6 @@ public static class ResourceVersions /// /// Version of the OperationalInsightsSavedSearch. /// The existing OperationalInsightsSavedSearch resource. - public static OperationalInsightsSavedSearch FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static OperationalInsightsSavedSearch FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/OperationalInsightsTable.cs b/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/OperationalInsightsTable.cs index 371c4bb53351..5b8f1770e4c8 100644 --- a/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/OperationalInsightsTable.cs +++ b/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/OperationalInsightsTable.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.OperationalInsights; /// /// OperationalInsightsTable. /// -public partial class OperationalInsightsTable : Resource +public partial class OperationalInsightsTable : ProvisionableResource { /// /// The name of the table. @@ -126,15 +126,15 @@ public partial class OperationalInsightsTable : Resource /// /// Creates a new OperationalInsightsTable. /// - /// + /// /// The the Bicep identifier name of the OperationalInsightsTable resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, /// numbers, and underscores. /// /// Version of the OperationalInsightsTable. - public OperationalInsightsTable(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.OperationalInsights/workspaces/tables", resourceVersion ?? "2023-09-01") + public OperationalInsightsTable(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.OperationalInsights/workspaces/tables", resourceVersion ?? "2023-09-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _plan = BicepValue.DefineProperty(this, "Plan", ["properties", "plan"]); @@ -178,7 +178,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing OperationalInsightsTable. /// - /// + /// /// The the Bicep identifier name of the OperationalInsightsTable resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, @@ -186,6 +186,6 @@ public static class ResourceVersions /// /// Version of the OperationalInsightsTable. /// The existing OperationalInsightsTable resource. - public static OperationalInsightsTable FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static OperationalInsightsTable FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/OperationalInsightsWorkspace.cs b/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/OperationalInsightsWorkspace.cs index 8df19fbdc309..7e1c7ab0ff49 100644 --- a/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/OperationalInsightsWorkspace.cs +++ b/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/OperationalInsightsWorkspace.cs @@ -19,7 +19,7 @@ namespace Azure.Provisioning.OperationalInsights; /// /// OperationalInsightsWorkspace. /// -public partial class OperationalInsightsWorkspace : Resource +public partial class OperationalInsightsWorkspace : ProvisionableResource { /// /// The name of the workspace. @@ -150,15 +150,15 @@ public partial class OperationalInsightsWorkspace : Resource /// /// Creates a new OperationalInsightsWorkspace. /// - /// + /// /// The the Bicep identifier name of the OperationalInsightsWorkspace /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the OperationalInsightsWorkspace. - public OperationalInsightsWorkspace(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.OperationalInsights/workspaces", resourceVersion ?? "2023-09-01") + public OperationalInsightsWorkspace(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.OperationalInsights/workspaces", resourceVersion ?? "2023-09-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _location = BicepValue.DefineProperty(this, "Location", ["location"], isRequired: true); @@ -221,7 +221,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing OperationalInsightsWorkspace. /// - /// + /// /// The the Bicep identifier name of the OperationalInsightsWorkspace /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -229,8 +229,8 @@ public static class ResourceVersions /// /// Version of the OperationalInsightsWorkspace. /// The existing OperationalInsightsWorkspace resource. - public static OperationalInsightsWorkspace FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static OperationalInsightsWorkspace FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; /// /// Get the requirements for naming this OperationalInsightsWorkspace @@ -247,5 +247,5 @@ public override ResourceNameRequirements GetResourceNameRequirements() => /// The keys for this OperationalInsightsWorkspace resource. public OperationalInsightsWorkspaceSharedKeys GetKeys() => OperationalInsightsWorkspaceSharedKeys.FromExpression( - new FunctionCallExpression(new MemberExpression(new IdentifierExpression(IdentifierName), "listKeys"))); + new FunctionCallExpression(new MemberExpression(new IdentifierExpression(BicepIdentifier), "listKeys"))); } diff --git a/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/StorageInsight.cs b/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/StorageInsight.cs index e8f5ad3a216a..ddace92172c5 100644 --- a/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/StorageInsight.cs +++ b/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Generated/StorageInsight.cs @@ -17,7 +17,7 @@ namespace Azure.Provisioning.OperationalInsights; /// /// StorageInsight. /// -public partial class StorageInsight : Resource +public partial class StorageInsight : ProvisionableResource { /// /// Name of the storageInsightsConfigs resource. @@ -82,15 +82,15 @@ public partial class StorageInsight : Resource /// /// Creates a new StorageInsight. /// - /// + /// /// The the Bicep identifier name of the StorageInsight resource. This can /// be used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and /// underscores. /// /// Version of the StorageInsight. - public StorageInsight(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.OperationalInsights/workspaces/storageInsightConfigs", resourceVersion ?? "2023-09-01") + public StorageInsight(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.OperationalInsights/workspaces/storageInsightConfigs", resourceVersion ?? "2023-09-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _containers = BicepList.DefineProperty(this, "Containers", ["properties", "containers"]); @@ -128,7 +128,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing StorageInsight. /// - /// + /// /// The the Bicep identifier name of the StorageInsight resource. This can /// be used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and @@ -136,6 +136,6 @@ public static class ResourceVersions /// /// Version of the StorageInsight. /// The existing StorageInsight resource. - public static StorageInsight FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static StorageInsight FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.PostgreSql/api/Azure.Provisioning.PostgreSql.netstandard2.0.cs b/sdk/provisioning/Azure.Provisioning.PostgreSql/api/Azure.Provisioning.PostgreSql.netstandard2.0.cs index 4cacd113c9d5..250949ea8c74 100644 --- a/sdk/provisioning/Azure.Provisioning.PostgreSql/api/Azure.Provisioning.PostgreSql.netstandard2.0.cs +++ b/sdk/provisioning/Azure.Provisioning.PostgreSql/api/Azure.Provisioning.PostgreSql.netstandard2.0.cs @@ -4,9 +4,9 @@ public enum PostgreSqlAdministratorType { ActiveDirectory = 0, } - public partial class PostgreSqlConfiguration : Azure.Provisioning.Primitives.Resource + public partial class PostgreSqlConfiguration : Azure.Provisioning.Primitives.ProvisionableResource { - public PostgreSqlConfiguration(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public PostgreSqlConfiguration(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue AllowedValues { get { throw null; } } public Azure.Provisioning.BicepValue DataType { get { throw null; } } public Azure.Provisioning.BicepValue DefaultValue { get { throw null; } } @@ -17,52 +17,49 @@ public partial class PostgreSqlConfiguration : Azure.Provisioning.Primitives.Res public Azure.Provisioning.BicepValue Source { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepValue Value { get { throw null; } set { } } - public static Azure.Provisioning.PostgreSql.PostgreSqlConfiguration FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.PostgreSql.PostgreSqlConfiguration FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2017_12_01; - public static readonly string V2017_12_01_preview; } } - public partial class PostgreSqlDatabase : Azure.Provisioning.Primitives.Resource + public partial class PostgreSqlDatabase : Azure.Provisioning.Primitives.ProvisionableResource { - public PostgreSqlDatabase(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public PostgreSqlDatabase(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Charset { get { throw null; } set { } } public Azure.Provisioning.BicepValue Collation { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } public Azure.Provisioning.PostgreSql.PostgreSqlServer? Parent { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.PostgreSql.PostgreSqlDatabase FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.PostgreSql.PostgreSqlDatabase FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override Azure.Provisioning.Primitives.ResourceNameRequirements GetResourceNameRequirements() { throw null; } public static partial class ResourceVersions { public static readonly string V2017_12_01; - public static readonly string V2017_12_01_preview; } } - public partial class PostgreSqlFirewallRule : Azure.Provisioning.Primitives.Resource + public partial class PostgreSqlFirewallRule : Azure.Provisioning.Primitives.ProvisionableResource { - public PostgreSqlFirewallRule(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public PostgreSqlFirewallRule(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue EndIPAddress { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } public Azure.Provisioning.PostgreSql.PostgreSqlServer? Parent { get { throw null; } set { } } public Azure.Provisioning.BicepValue StartIPAddress { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.PostgreSql.PostgreSqlFirewallRule FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.PostgreSql.PostgreSqlFirewallRule FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override Azure.Provisioning.Primitives.ResourceNameRequirements GetResourceNameRequirements() { throw null; } public static partial class ResourceVersions { public static readonly string V2017_12_01; - public static readonly string V2017_12_01_preview; } } - public partial class PostgreSqlFlexibleServer : Azure.Provisioning.Primitives.Resource + public partial class PostgreSqlFlexibleServer : Azure.Provisioning.Primitives.ProvisionableResource { - public PostgreSqlFlexibleServer(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public PostgreSqlFlexibleServer(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue AdministratorLogin { get { throw null; } set { } } public Azure.Provisioning.BicepValue AdministratorLoginPassword { get { throw null; } set { } } public Azure.Provisioning.BicepValue AuthConfig { get { throw null; } set { } } @@ -90,7 +87,7 @@ public partial class PostgreSqlFlexibleServer : Azure.Provisioning.Primitives.Re public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } public Azure.Provisioning.BicepValue Version { get { throw null; } set { } } - public static Azure.Provisioning.PostgreSql.PostgreSqlFlexibleServer FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.PostgreSql.PostgreSqlFlexibleServer FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override Azure.Provisioning.Primitives.ResourceNameRequirements GetResourceNameRequirements() { throw null; } public static partial class ResourceVersions @@ -100,9 +97,9 @@ public static partial class ResourceVersions public static readonly string V2024_08_01; } } - public partial class PostgreSqlFlexibleServerActiveDirectoryAdministrator : Azure.Provisioning.Primitives.Resource + public partial class PostgreSqlFlexibleServerActiveDirectoryAdministrator : Azure.Provisioning.Primitives.ProvisionableResource { - public PostgreSqlFlexibleServerActiveDirectoryAdministrator(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public PostgreSqlFlexibleServerActiveDirectoryAdministrator(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } public Azure.Provisioning.BicepValue ObjectId { get { throw null; } } @@ -111,7 +108,7 @@ public partial class PostgreSqlFlexibleServerActiveDirectoryAdministrator : Azur public Azure.Provisioning.BicepValue PrincipalType { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepValue TenantId { get { throw null; } set { } } - public static Azure.Provisioning.PostgreSql.PostgreSqlFlexibleServerActiveDirectoryAdministrator FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.PostgreSql.PostgreSqlFlexibleServerActiveDirectoryAdministrator FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2021_06_01; @@ -124,23 +121,23 @@ public enum PostgreSqlFlexibleServerActiveDirectoryAuthEnum Enabled = 0, Disabled = 1, } - public partial class PostgreSqlFlexibleServerAuthConfig : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class PostgreSqlFlexibleServerAuthConfig : Azure.Provisioning.Primitives.ProvisionableConstruct { public PostgreSqlFlexibleServerAuthConfig() { } public Azure.Provisioning.BicepValue ActiveDirectoryAuth { get { throw null; } set { } } public Azure.Provisioning.BicepValue PasswordAuth { get { throw null; } set { } } public Azure.Provisioning.BicepValue TenantId { get { throw null; } set { } } } - public partial class PostgreSqlFlexibleServerBackupProperties : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class PostgreSqlFlexibleServerBackupProperties : Azure.Provisioning.Primitives.ProvisionableConstruct { public PostgreSqlFlexibleServerBackupProperties() { } public Azure.Provisioning.BicepValue BackupRetentionDays { get { throw null; } set { } } public Azure.Provisioning.BicepValue EarliestRestoreOn { get { throw null; } } public Azure.Provisioning.BicepValue GeoRedundantBackup { get { throw null; } set { } } } - public partial class PostgreSqlFlexibleServerConfiguration : Azure.Provisioning.Primitives.Resource + public partial class PostgreSqlFlexibleServerConfiguration : Azure.Provisioning.Primitives.ProvisionableResource { - public PostgreSqlFlexibleServerConfiguration(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public PostgreSqlFlexibleServerConfiguration(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue AllowedValues { get { throw null; } } public Azure.Provisioning.BicepValue DataType { get { throw null; } } public Azure.Provisioning.BicepValue DefaultValue { get { throw null; } } @@ -156,7 +153,7 @@ public partial class PostgreSqlFlexibleServerConfiguration : Azure.Provisioning. public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepValue Unit { get { throw null; } } public Azure.Provisioning.BicepValue Value { get { throw null; } set { } } - public static Azure.Provisioning.PostgreSql.PostgreSqlFlexibleServerConfiguration FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.PostgreSql.PostgreSqlFlexibleServerConfiguration FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2021_06_01; @@ -181,16 +178,16 @@ public enum PostgreSqlFlexibleServerCreateMode Replica = 5, ReviveDropped = 6, } - public partial class PostgreSqlFlexibleServerDatabase : Azure.Provisioning.Primitives.Resource + public partial class PostgreSqlFlexibleServerDatabase : Azure.Provisioning.Primitives.ProvisionableResource { - public PostgreSqlFlexibleServerDatabase(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public PostgreSqlFlexibleServerDatabase(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Charset { get { throw null; } set { } } public Azure.Provisioning.BicepValue Collation { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } public Azure.Provisioning.PostgreSql.PostgreSqlFlexibleServer? Parent { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.PostgreSql.PostgreSqlFlexibleServerDatabase FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.PostgreSql.PostgreSqlFlexibleServerDatabase FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2021_06_01; @@ -198,7 +195,7 @@ public static partial class ResourceVersions public static readonly string V2024_08_01; } } - public partial class PostgreSqlFlexibleServerDataEncryption : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class PostgreSqlFlexibleServerDataEncryption : Azure.Provisioning.Primitives.ProvisionableConstruct { public PostgreSqlFlexibleServerDataEncryption() { } public Azure.Provisioning.BicepValue GeoBackupEncryptionKeyStatus { get { throw null; } set { } } @@ -209,16 +206,16 @@ public PostgreSqlFlexibleServerDataEncryption() { } public Azure.Provisioning.BicepValue PrimaryKeyUri { get { throw null; } set { } } public Azure.Provisioning.BicepValue PrimaryUserAssignedIdentityId { get { throw null; } set { } } } - public partial class PostgreSqlFlexibleServerFirewallRule : Azure.Provisioning.Primitives.Resource + public partial class PostgreSqlFlexibleServerFirewallRule : Azure.Provisioning.Primitives.ProvisionableResource { - public PostgreSqlFlexibleServerFirewallRule(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public PostgreSqlFlexibleServerFirewallRule(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue EndIPAddress { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } public Azure.Provisioning.PostgreSql.PostgreSqlFlexibleServer? Parent { get { throw null; } set { } } public Azure.Provisioning.BicepValue StartIPAddress { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.PostgreSql.PostgreSqlFlexibleServerFirewallRule FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.PostgreSql.PostgreSqlFlexibleServerFirewallRule FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2021_06_01; @@ -240,7 +237,7 @@ public enum PostgreSqlFlexibleServerHAState Healthy = 4, RemovingStandby = 5, } - public partial class PostgreSqlFlexibleServerHighAvailability : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class PostgreSqlFlexibleServerHighAvailability : Azure.Provisioning.Primitives.ProvisionableConstruct { public PostgreSqlFlexibleServerHighAvailability() { } public Azure.Provisioning.BicepValue Mode { get { throw null; } set { } } @@ -265,7 +262,7 @@ public enum PostgreSqlFlexibleServerKeyType SystemManaged = 1, AzureKeyVault = 2, } - public partial class PostgreSqlFlexibleServerMaintenanceWindow : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class PostgreSqlFlexibleServerMaintenanceWindow : Azure.Provisioning.Primitives.ProvisionableConstruct { public PostgreSqlFlexibleServerMaintenanceWindow() { } public Azure.Provisioning.BicepValue CustomWindow { get { throw null; } set { } } @@ -273,7 +270,7 @@ public PostgreSqlFlexibleServerMaintenanceWindow() { } public Azure.Provisioning.BicepValue StartHour { get { throw null; } set { } } public Azure.Provisioning.BicepValue StartMinute { get { throw null; } set { } } } - public partial class PostgreSqlFlexibleServerNetwork : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class PostgreSqlFlexibleServerNetwork : Azure.Provisioning.Primitives.ProvisionableConstruct { public PostgreSqlFlexibleServerNetwork() { } public Azure.Provisioning.BicepValue DelegatedSubnetResourceId { get { throw null; } set { } } @@ -308,7 +305,7 @@ public enum PostgreSqlFlexibleServerReplicationRole AsyncReplica = 6, GeoAsyncReplica = 7, } - public partial class PostgreSqlFlexibleServerSku : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class PostgreSqlFlexibleServerSku : Azure.Provisioning.Primitives.ProvisionableConstruct { public PostgreSqlFlexibleServerSku() { } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } @@ -330,7 +327,7 @@ public enum PostgreSqlFlexibleServerState Stopped = 5, Updating = 6, } - public partial class PostgreSqlFlexibleServerStorage : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class PostgreSqlFlexibleServerStorage : Azure.Provisioning.Primitives.ProvisionableConstruct { public PostgreSqlFlexibleServerStorage() { } public Azure.Provisioning.BicepValue AutoGrow { get { throw null; } set { } } @@ -338,7 +335,7 @@ public PostgreSqlFlexibleServerStorage() { } public Azure.Provisioning.BicepValue StorageSizeInGB { get { throw null; } set { } } public Azure.Provisioning.BicepValue Tier { get { throw null; } set { } } } - public partial class PostgreSqlFlexibleServerUserAssignedIdentity : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class PostgreSqlFlexibleServerUserAssignedIdentity : Azure.Provisioning.Primitives.ProvisionableConstruct { public PostgreSqlFlexibleServerUserAssignedIdentity() { } public Azure.Provisioning.BicepValue IdentityType { get { throw null; } set { } } @@ -390,9 +387,9 @@ public enum PostgreSqlManagedDiskPerformanceTier P70 = 12, P80 = 13, } - public partial class PostgreSqlMigration : Azure.Provisioning.Primitives.Resource + public partial class PostgreSqlMigration : Azure.Provisioning.Primitives.ProvisionableResource { - public PostgreSqlMigration(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public PostgreSqlMigration(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Cancel { get { throw null; } set { } } public Azure.Provisioning.BicepValue CurrentStatus { get { throw null; } } public Azure.Provisioning.BicepList DbsToCancelMigrationOn { get { throw null; } set { } } @@ -419,7 +416,7 @@ public partial class PostgreSqlMigration : Azure.Provisioning.Primitives.Resourc public Azure.Provisioning.BicepValue TargetDbServerMetadata { get { throw null; } } public Azure.Provisioning.BicepValue TargetDbServerResourceId { get { throw null; } } public Azure.Provisioning.BicepValue TriggerCutover { get { throw null; } set { } } - public static Azure.Provisioning.PostgreSql.PostgreSqlMigration FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.PostgreSql.PostgreSqlMigration FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2021_06_01; @@ -427,7 +424,7 @@ public static partial class ResourceVersions public static readonly string V2024_08_01; } } - public partial class PostgreSqlMigrationAdminCredentials : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class PostgreSqlMigrationAdminCredentials : Azure.Provisioning.Primitives.ProvisionableConstruct { public PostgreSqlMigrationAdminCredentials() { } public Azure.Provisioning.BicepValue SourceServerPassword { get { throw null; } set { } } @@ -453,7 +450,7 @@ public enum PostgreSqlMigrationOverwriteDbsInTarget True = 0, False = 1, } - public partial class PostgreSqlMigrationSecretParameters : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class PostgreSqlMigrationSecretParameters : Azure.Provisioning.Primitives.ProvisionableConstruct { public PostgreSqlMigrationSecretParameters() { } public Azure.Provisioning.BicepValue AdminCredentials { get { throw null; } set { } } @@ -473,7 +470,7 @@ public enum PostgreSqlMigrationState Failed = 3, Succeeded = 4, } - public partial class PostgreSqlMigrationStatus : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class PostgreSqlMigrationStatus : Azure.Provisioning.Primitives.ProvisionableConstruct { public PostgreSqlMigrationStatus() { } public Azure.Provisioning.BicepValue CurrentSubState { get { throw null; } } @@ -508,9 +505,9 @@ public enum PostgreSqlMinimalTlsVersionEnum Tls1_2 = 2, TLSEnforcementDisabled = 3, } - public partial class PostgreSqlPrivateEndpointConnection : Azure.Provisioning.Primitives.Resource + public partial class PostgreSqlPrivateEndpointConnection : Azure.Provisioning.Primitives.ProvisionableResource { - public PostgreSqlPrivateEndpointConnection(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public PostgreSqlPrivateEndpointConnection(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue ConnectionState { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } @@ -518,11 +515,10 @@ public partial class PostgreSqlPrivateEndpointConnection : Azure.Provisioning.Pr public Azure.Provisioning.BicepValue PrivateEndpointId { get { throw null; } set { } } public Azure.Provisioning.BicepValue ProvisioningState { get { throw null; } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.PostgreSql.PostgreSqlPrivateEndpointConnection FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.PostgreSql.PostgreSqlPrivateEndpointConnection FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2018_06_01; - public static readonly string V2018_06_01_privatepreview; } } public enum PostgreSqlPrivateEndpointProvisioningState @@ -533,7 +529,7 @@ public enum PostgreSqlPrivateEndpointProvisioningState Failed = 3, Rejecting = 4, } - public partial class PostgreSqlPrivateLinkServiceConnectionStateProperty : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class PostgreSqlPrivateLinkServiceConnectionStateProperty : Azure.Provisioning.Primitives.ProvisionableConstruct { public PostgreSqlPrivateLinkServiceConnectionStateProperty() { } public Azure.Provisioning.BicepValue ActionsRequired { get { throw null; } } @@ -560,9 +556,9 @@ public enum PostgreSqlSecurityAlertPolicyName { Default = 0, } - public partial class PostgreSqlServer : Azure.Provisioning.Primitives.Resource + public partial class PostgreSqlServer : Azure.Provisioning.Primitives.ProvisionableResource { - public PostgreSqlServer(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public PostgreSqlServer(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue AdministratorLogin { get { throw null; } } public Azure.Provisioning.BicepValue ByokEnforcement { get { throw null; } } public Azure.Provisioning.BicepValue EarliestRestoreOn { get { throw null; } } @@ -586,18 +582,17 @@ public partial class PostgreSqlServer : Azure.Provisioning.Primitives.Resource public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } public Azure.Provisioning.BicepValue UserVisibleState { get { throw null; } } public Azure.Provisioning.BicepValue Version { get { throw null; } } - public static Azure.Provisioning.PostgreSql.PostgreSqlServer FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.PostgreSql.PostgreSqlServer FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override Azure.Provisioning.Primitives.ResourceNameRequirements GetResourceNameRequirements() { throw null; } public static partial class ResourceVersions { public static readonly string V2017_12_01; - public static readonly string V2017_12_01_preview; } } - public partial class PostgreSqlServerAdministrator : Azure.Provisioning.Primitives.Resource + public partial class PostgreSqlServerAdministrator : Azure.Provisioning.Primitives.ProvisionableResource { - public PostgreSqlServerAdministrator(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public PostgreSqlServerAdministrator(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue AdministratorType { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue LoginAccountName { get { throw null; } set { } } @@ -606,16 +601,15 @@ public partial class PostgreSqlServerAdministrator : Azure.Provisioning.Primitiv public Azure.Provisioning.BicepValue SecureId { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepValue TenantId { get { throw null; } set { } } - public static Azure.Provisioning.PostgreSql.PostgreSqlServerAdministrator FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.PostgreSql.PostgreSqlServerAdministrator FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2017_12_01; - public static readonly string V2017_12_01_preview; } } - public partial class PostgreSqlServerKey : Azure.Provisioning.Primitives.Resource + public partial class PostgreSqlServerKey : Azure.Provisioning.Primitives.ProvisionableResource { - public PostgreSqlServerKey(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public PostgreSqlServerKey(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue CreatedOn { get { throw null; } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Kind { get { throw null; } } @@ -624,18 +618,17 @@ public partial class PostgreSqlServerKey : Azure.Provisioning.Primitives.Resourc public Azure.Provisioning.BicepValue ServerKeyType { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepValue Uri { get { throw null; } set { } } - public static Azure.Provisioning.PostgreSql.PostgreSqlServerKey FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.PostgreSql.PostgreSqlServerKey FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2020_01_01; - public static readonly string V2020_01_01_privatepreview; } } public enum PostgreSqlServerKeyType { AzureKeyVault = 0, } - public partial class PostgreSqlServerMetadata : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class PostgreSqlServerMetadata : Azure.Provisioning.Primitives.ProvisionableConstruct { public PostgreSqlServerMetadata() { } public Azure.Provisioning.BicepValue Location { get { throw null; } } @@ -643,27 +636,27 @@ public PostgreSqlServerMetadata() { } public Azure.Provisioning.BicepValue StorageMb { get { throw null; } } public Azure.Provisioning.BicepValue Version { get { throw null; } } } - public partial class PostgreSqlServerPrivateEndpointConnection : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class PostgreSqlServerPrivateEndpointConnection : Azure.Provisioning.Primitives.ProvisionableConstruct { public PostgreSqlServerPrivateEndpointConnection() { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Properties { get { throw null; } } } - public partial class PostgreSqlServerPrivateEndpointConnectionProperties : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class PostgreSqlServerPrivateEndpointConnectionProperties : Azure.Provisioning.Primitives.ProvisionableConstruct { public PostgreSqlServerPrivateEndpointConnectionProperties() { } public Azure.Provisioning.BicepValue PrivateEndpointId { get { throw null; } } public Azure.Provisioning.BicepValue PrivateLinkServiceConnectionState { get { throw null; } } public Azure.Provisioning.BicepValue ProvisioningState { get { throw null; } } } - public partial class PostgreSqlServerPrivateLinkServiceConnectionStateProperty : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class PostgreSqlServerPrivateLinkServiceConnectionStateProperty : Azure.Provisioning.Primitives.ProvisionableConstruct { public PostgreSqlServerPrivateLinkServiceConnectionStateProperty() { } public Azure.Provisioning.BicepValue ActionsRequired { get { throw null; } } public Azure.Provisioning.BicepValue Description { get { throw null; } } public Azure.Provisioning.BicepValue Status { get { throw null; } } } - public partial class PostgreSqlServerPropertiesForCreate : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class PostgreSqlServerPropertiesForCreate : Azure.Provisioning.Primitives.ProvisionableConstruct { public PostgreSqlServerPropertiesForCreate() { } public Azure.Provisioning.BicepValue InfrastructureEncryption { get { throw null; } set { } } @@ -695,9 +688,9 @@ public PostgreSqlServerPropertiesForRestore() { } public Azure.Provisioning.BicepValue RestorePointInTime { get { throw null; } } public Azure.Provisioning.BicepValue SourceServerId { get { throw null; } } } - public partial class PostgreSqlServerSecurityAlertPolicy : Azure.Provisioning.Primitives.Resource + public partial class PostgreSqlServerSecurityAlertPolicy : Azure.Provisioning.Primitives.ProvisionableResource { - public PostgreSqlServerSecurityAlertPolicy(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public PostgreSqlServerSecurityAlertPolicy(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepList DisabledAlerts { get { throw null; } set { } } public Azure.Provisioning.BicepList EmailAddresses { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } @@ -709,11 +702,10 @@ public partial class PostgreSqlServerSecurityAlertPolicy : Azure.Provisioning.Pr public Azure.Provisioning.BicepValue StorageAccountAccessKey { get { throw null; } set { } } public Azure.Provisioning.BicepValue StorageEndpoint { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.PostgreSql.PostgreSqlServerSecurityAlertPolicy FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.PostgreSql.PostgreSqlServerSecurityAlertPolicy FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2017_12_01; - public static readonly string V2017_12_01_preview; } } public enum PostgreSqlServerSecurityAlertPolicyState @@ -743,7 +735,7 @@ public enum PostgreSqlServerVersion [System.Runtime.Serialization.DataMemberAttribute(Name="11")] Ver11 = 5, } - public partial class PostgreSqlSku : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class PostgreSqlSku : Azure.Provisioning.Primitives.ProvisionableConstruct { public PostgreSqlSku() { } public Azure.Provisioning.BicepValue Capacity { get { throw null; } set { } } @@ -768,7 +760,7 @@ public enum PostgreSqlStorageAutogrow Enabled = 0, Disabled = 1, } - public partial class PostgreSqlStorageProfile : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class PostgreSqlStorageProfile : Azure.Provisioning.Primitives.ProvisionableConstruct { public PostgreSqlStorageProfile() { } public Azure.Provisioning.BicepValue BackupRetentionDays { get { throw null; } set { } } @@ -776,9 +768,9 @@ public PostgreSqlStorageProfile() { } public Azure.Provisioning.BicepValue StorageAutogrow { get { throw null; } set { } } public Azure.Provisioning.BicepValue StorageInMB { get { throw null; } set { } } } - public partial class PostgreSqlVirtualNetworkRule : Azure.Provisioning.Primitives.Resource + public partial class PostgreSqlVirtualNetworkRule : Azure.Provisioning.Primitives.ProvisionableResource { - public PostgreSqlVirtualNetworkRule(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public PostgreSqlVirtualNetworkRule(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue IgnoreMissingVnetServiceEndpoint { get { throw null; } set { } } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } @@ -786,13 +778,12 @@ public partial class PostgreSqlVirtualNetworkRule : Azure.Provisioning.Primitive public Azure.Provisioning.BicepValue State { get { throw null; } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepValue VirtualNetworkSubnetId { get { throw null; } set { } } - public static Azure.Provisioning.PostgreSql.PostgreSqlVirtualNetworkRule FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.PostgreSql.PostgreSqlVirtualNetworkRule FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override Azure.Provisioning.Primitives.ResourceNameRequirements GetResourceNameRequirements() { throw null; } public static partial class ResourceVersions { public static readonly string V2017_12_01; - public static readonly string V2017_12_01_preview; } } public enum PostgreSqlVirtualNetworkRuleState @@ -803,7 +794,7 @@ public enum PostgreSqlVirtualNetworkRuleState Deleting = 3, Unknown = 4, } - public partial class ServerSku : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ServerSku : Azure.Provisioning.Primitives.ProvisionableConstruct { public ServerSku() { } public Azure.Provisioning.BicepValue Name { get { throw null; } } diff --git a/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/Models/PostgreSqlFlexibleServerAuthConfig.cs b/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/Models/PostgreSqlFlexibleServerAuthConfig.cs index af3bb598382e..d6c0e197f242 100644 --- a/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/Models/PostgreSqlFlexibleServerAuthConfig.cs +++ b/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/Models/PostgreSqlFlexibleServerAuthConfig.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.PostgreSql; /// /// Authentication configuration properties of a server. /// -public partial class PostgreSqlFlexibleServerAuthConfig : ProvisioningConstruct +public partial class PostgreSqlFlexibleServerAuthConfig : ProvisionableConstruct { /// /// If Enabled, Azure Active Directory authentication is enabled. diff --git a/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/Models/PostgreSqlFlexibleServerBackupProperties.cs b/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/Models/PostgreSqlFlexibleServerBackupProperties.cs index 0865130facc4..ba38f29a706d 100644 --- a/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/Models/PostgreSqlFlexibleServerBackupProperties.cs +++ b/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/Models/PostgreSqlFlexibleServerBackupProperties.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.PostgreSql; /// /// Backup properties of a server. /// -public partial class PostgreSqlFlexibleServerBackupProperties : ProvisioningConstruct +public partial class PostgreSqlFlexibleServerBackupProperties : ProvisionableConstruct { /// /// Backup retention days for the server. diff --git a/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/Models/PostgreSqlFlexibleServerDataEncryption.cs b/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/Models/PostgreSqlFlexibleServerDataEncryption.cs index b513eec5815b..c22c081143d1 100644 --- a/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/Models/PostgreSqlFlexibleServerDataEncryption.cs +++ b/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/Models/PostgreSqlFlexibleServerDataEncryption.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.PostgreSql; /// /// Data encryption properties of a server. /// -public partial class PostgreSqlFlexibleServerDataEncryption : ProvisioningConstruct +public partial class PostgreSqlFlexibleServerDataEncryption : ProvisionableConstruct { /// /// URI for the key in keyvault for data encryption of the primary server. diff --git a/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/Models/PostgreSqlFlexibleServerHighAvailability.cs b/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/Models/PostgreSqlFlexibleServerHighAvailability.cs index c73699c543b1..777d450cb715 100644 --- a/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/Models/PostgreSqlFlexibleServerHighAvailability.cs +++ b/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/Models/PostgreSqlFlexibleServerHighAvailability.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.PostgreSql; /// /// High availability properties of a server. /// -public partial class PostgreSqlFlexibleServerHighAvailability : ProvisioningConstruct +public partial class PostgreSqlFlexibleServerHighAvailability : ProvisionableConstruct { /// /// The HA mode for the server. diff --git a/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/Models/PostgreSqlFlexibleServerMaintenanceWindow.cs b/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/Models/PostgreSqlFlexibleServerMaintenanceWindow.cs index 8909ec2e7a1d..fb01e168e922 100644 --- a/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/Models/PostgreSqlFlexibleServerMaintenanceWindow.cs +++ b/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/Models/PostgreSqlFlexibleServerMaintenanceWindow.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.PostgreSql; /// /// Maintenance window properties of a server. /// -public partial class PostgreSqlFlexibleServerMaintenanceWindow : ProvisioningConstruct +public partial class PostgreSqlFlexibleServerMaintenanceWindow : ProvisionableConstruct { /// /// indicates whether custom window is enabled or disabled. diff --git a/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/Models/PostgreSqlFlexibleServerNetwork.cs b/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/Models/PostgreSqlFlexibleServerNetwork.cs index c1891c75bf0f..5693c8d1cf8a 100644 --- a/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/Models/PostgreSqlFlexibleServerNetwork.cs +++ b/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/Models/PostgreSqlFlexibleServerNetwork.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.PostgreSql; /// /// Network properties of a server. /// -public partial class PostgreSqlFlexibleServerNetwork : ProvisioningConstruct +public partial class PostgreSqlFlexibleServerNetwork : ProvisionableConstruct { /// /// public network access is enabled or not. diff --git a/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/Models/PostgreSqlFlexibleServerSku.cs b/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/Models/PostgreSqlFlexibleServerSku.cs index 5ab3256be328..67ba83c66782 100644 --- a/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/Models/PostgreSqlFlexibleServerSku.cs +++ b/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/Models/PostgreSqlFlexibleServerSku.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.PostgreSql; /// /// Sku information related properties of a server. /// -public partial class PostgreSqlFlexibleServerSku : ProvisioningConstruct +public partial class PostgreSqlFlexibleServerSku : ProvisionableConstruct { /// /// The name of the sku, typically, tier + family + cores, e.g. diff --git a/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/Models/PostgreSqlFlexibleServerStorage.cs b/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/Models/PostgreSqlFlexibleServerStorage.cs index bb0c9617e7c7..90ac80dcf4ba 100644 --- a/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/Models/PostgreSqlFlexibleServerStorage.cs +++ b/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/Models/PostgreSqlFlexibleServerStorage.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.PostgreSql; /// /// Storage properties of a server. /// -public partial class PostgreSqlFlexibleServerStorage : ProvisioningConstruct +public partial class PostgreSqlFlexibleServerStorage : ProvisionableConstruct { /// /// Max storage allowed for a server. diff --git a/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/Models/PostgreSqlFlexibleServerUserAssignedIdentity.cs b/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/Models/PostgreSqlFlexibleServerUserAssignedIdentity.cs index c29ab465d3c8..c4d8045cac0c 100644 --- a/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/Models/PostgreSqlFlexibleServerUserAssignedIdentity.cs +++ b/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/Models/PostgreSqlFlexibleServerUserAssignedIdentity.cs @@ -13,7 +13,7 @@ namespace Azure.Provisioning.PostgreSql; /// /// Information describing the identities associated with this application. /// -public partial class PostgreSqlFlexibleServerUserAssignedIdentity : ProvisioningConstruct +public partial class PostgreSqlFlexibleServerUserAssignedIdentity : ProvisionableConstruct { /// /// represents user assigned identities map. diff --git a/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/Models/PostgreSqlMigrationAdminCredentials.cs b/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/Models/PostgreSqlMigrationAdminCredentials.cs index 11d36de28cac..3b95e5294249 100644 --- a/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/Models/PostgreSqlMigrationAdminCredentials.cs +++ b/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/Models/PostgreSqlMigrationAdminCredentials.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.PostgreSql; /// /// Server admin credentials. /// -public partial class PostgreSqlMigrationAdminCredentials : ProvisioningConstruct +public partial class PostgreSqlMigrationAdminCredentials : ProvisionableConstruct { /// /// Password for source server. diff --git a/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/Models/PostgreSqlMigrationSecretParameters.cs b/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/Models/PostgreSqlMigrationSecretParameters.cs index b3a38770c5f5..24efdabad8da 100644 --- a/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/Models/PostgreSqlMigrationSecretParameters.cs +++ b/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/Models/PostgreSqlMigrationSecretParameters.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.PostgreSql; /// /// Migration secret parameters. /// -public partial class PostgreSqlMigrationSecretParameters : ProvisioningConstruct +public partial class PostgreSqlMigrationSecretParameters : ProvisionableConstruct { /// /// Admin credentials for source and target servers. diff --git a/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/Models/PostgreSqlMigrationStatus.cs b/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/Models/PostgreSqlMigrationStatus.cs index d8b11267e6d2..928bf90c6e1a 100644 --- a/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/Models/PostgreSqlMigrationStatus.cs +++ b/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/Models/PostgreSqlMigrationStatus.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.PostgreSql; /// /// Migration status. /// -public partial class PostgreSqlMigrationStatus : ProvisioningConstruct +public partial class PostgreSqlMigrationStatus : ProvisionableConstruct { /// /// State of migration. diff --git a/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/Models/PostgreSqlPrivateLinkServiceConnectionStateProperty.cs b/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/Models/PostgreSqlPrivateLinkServiceConnectionStateProperty.cs index 71f4fbde6cf5..68d0bc1cac98 100644 --- a/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/Models/PostgreSqlPrivateLinkServiceConnectionStateProperty.cs +++ b/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/Models/PostgreSqlPrivateLinkServiceConnectionStateProperty.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.PostgreSql; /// /// The PostgreSqlPrivateLinkServiceConnectionStateProperty. /// -public partial class PostgreSqlPrivateLinkServiceConnectionStateProperty : ProvisioningConstruct +public partial class PostgreSqlPrivateLinkServiceConnectionStateProperty : ProvisionableConstruct { /// /// The private link service connection status. diff --git a/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/Models/PostgreSqlServerMetadata.cs b/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/Models/PostgreSqlServerMetadata.cs index 909dd8397af6..1170e0ea5e6e 100644 --- a/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/Models/PostgreSqlServerMetadata.cs +++ b/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/Models/PostgreSqlServerMetadata.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.PostgreSql; /// /// Database server metadata. /// -public partial class PostgreSqlServerMetadata : ProvisioningConstruct +public partial class PostgreSqlServerMetadata : ProvisionableConstruct { /// /// Location of database server. diff --git a/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/Models/PostgreSqlServerPrivateEndpointConnection.cs b/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/Models/PostgreSqlServerPrivateEndpointConnection.cs index 55b72f4a00e1..c5b1796a97cf 100644 --- a/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/Models/PostgreSqlServerPrivateEndpointConnection.cs +++ b/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/Models/PostgreSqlServerPrivateEndpointConnection.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.PostgreSql; /// /// A private endpoint connection under a server. /// -public partial class PostgreSqlServerPrivateEndpointConnection : ProvisioningConstruct +public partial class PostgreSqlServerPrivateEndpointConnection : ProvisionableConstruct { /// /// Resource ID of the Private Endpoint Connection. diff --git a/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/Models/PostgreSqlServerPrivateEndpointConnectionProperties.cs b/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/Models/PostgreSqlServerPrivateEndpointConnectionProperties.cs index d47f61584d15..92ade874493a 100644 --- a/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/Models/PostgreSqlServerPrivateEndpointConnectionProperties.cs +++ b/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/Models/PostgreSqlServerPrivateEndpointConnectionProperties.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.PostgreSql; /// /// Properties of a private endpoint connection. /// -public partial class PostgreSqlServerPrivateEndpointConnectionProperties : ProvisioningConstruct +public partial class PostgreSqlServerPrivateEndpointConnectionProperties : ProvisionableConstruct { /// /// Gets or sets Id. diff --git a/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/Models/PostgreSqlServerPrivateLinkServiceConnectionStateProperty.cs b/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/Models/PostgreSqlServerPrivateLinkServiceConnectionStateProperty.cs index 30cc1c4e956f..2f37cb065bd3 100644 --- a/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/Models/PostgreSqlServerPrivateLinkServiceConnectionStateProperty.cs +++ b/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/Models/PostgreSqlServerPrivateLinkServiceConnectionStateProperty.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.PostgreSql; /// /// The PostgreSqlServerPrivateLinkServiceConnectionStateProperty. /// -public partial class PostgreSqlServerPrivateLinkServiceConnectionStateProperty : ProvisioningConstruct +public partial class PostgreSqlServerPrivateLinkServiceConnectionStateProperty : ProvisionableConstruct { /// /// The private link service connection status. diff --git a/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/Models/PostgreSqlServerPropertiesForCreate.cs b/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/Models/PostgreSqlServerPropertiesForCreate.cs index 15c80ca02341..379fdab560bf 100644 --- a/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/Models/PostgreSqlServerPropertiesForCreate.cs +++ b/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/Models/PostgreSqlServerPropertiesForCreate.cs @@ -21,7 +21,7 @@ namespace Azure.Provisioning.PostgreSql; /// and /// Azure.ResourceManager.PostgreSql.Models.PostgreSqlServerPropertiesForReplica. /// -public partial class PostgreSqlServerPropertiesForCreate : ProvisioningConstruct +public partial class PostgreSqlServerPropertiesForCreate : ProvisionableConstruct { /// /// Server version. diff --git a/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/Models/PostgreSqlSku.cs b/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/Models/PostgreSqlSku.cs index 921b12bb2b7c..5d3144706784 100644 --- a/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/Models/PostgreSqlSku.cs +++ b/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/Models/PostgreSqlSku.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.PostgreSql; /// /// Billing information related properties of a server. /// -public partial class PostgreSqlSku : ProvisioningConstruct +public partial class PostgreSqlSku : ProvisionableConstruct { /// /// The name of the sku, typically, tier + family + cores, e.g. B_Gen4_1, diff --git a/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/Models/PostgreSqlStorageProfile.cs b/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/Models/PostgreSqlStorageProfile.cs index 805bce6aa585..83be2de727e1 100644 --- a/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/Models/PostgreSqlStorageProfile.cs +++ b/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/Models/PostgreSqlStorageProfile.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.PostgreSql; /// /// Storage Profile properties of a server. /// -public partial class PostgreSqlStorageProfile : ProvisioningConstruct +public partial class PostgreSqlStorageProfile : ProvisionableConstruct { /// /// Backup retention days for the server. diff --git a/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/Models/ServerSku.cs b/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/Models/ServerSku.cs index 8975a06f6420..e6c475315a1a 100644 --- a/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/Models/ServerSku.cs +++ b/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/Models/ServerSku.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.PostgreSql; /// /// Sku information related properties of a server. /// -public partial class ServerSku : ProvisioningConstruct +public partial class ServerSku : ProvisionableConstruct { /// /// The name of the sku, typically, tier + family + cores, e.g. diff --git a/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/PostgreSqlConfiguration.cs b/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/PostgreSqlConfiguration.cs index 23df5ca74a43..a545173c3c58 100644 --- a/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/PostgreSqlConfiguration.cs +++ b/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/PostgreSqlConfiguration.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.PostgreSql; /// /// PostgreSqlConfiguration. /// -public partial class PostgreSqlConfiguration : Resource +public partial class PostgreSqlConfiguration : ProvisionableResource { /// /// The name of the server configuration. @@ -80,15 +80,15 @@ public partial class PostgreSqlConfiguration : Resource /// /// Creates a new PostgreSqlConfiguration. /// - /// + /// /// The the Bicep identifier name of the PostgreSqlConfiguration resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, /// numbers, and underscores. /// /// Version of the PostgreSqlConfiguration. - public PostgreSqlConfiguration(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.DBforPostgreSQL/servers/configurations", resourceVersion ?? "2017-12-01") + public PostgreSqlConfiguration(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.DBforPostgreSQL/servers/configurations", resourceVersion ?? "2017-12-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _source = BicepValue.DefineProperty(this, "Source", ["properties", "source"]); @@ -107,11 +107,6 @@ public PostgreSqlConfiguration(string identifierName, string? resourceVersion = /// public static class ResourceVersions { - /// - /// 2017-12-01-preview. - /// - public static readonly string V2017_12_01_preview = "2017-12-01-preview"; - /// /// 2017-12-01. /// @@ -121,7 +116,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing PostgreSqlConfiguration. /// - /// + /// /// The the Bicep identifier name of the PostgreSqlConfiguration resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, @@ -129,6 +124,6 @@ public static class ResourceVersions /// /// Version of the PostgreSqlConfiguration. /// The existing PostgreSqlConfiguration resource. - public static PostgreSqlConfiguration FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static PostgreSqlConfiguration FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/PostgreSqlDatabase.cs b/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/PostgreSqlDatabase.cs index 16d7402e0626..b1aff7f17eb1 100644 --- a/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/PostgreSqlDatabase.cs +++ b/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/PostgreSqlDatabase.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.PostgreSql; /// /// PostgreSqlDatabase. /// -public partial class PostgreSqlDatabase : Resource +public partial class PostgreSqlDatabase : ProvisionableResource { /// /// The name of the database. @@ -57,15 +57,15 @@ public partial class PostgreSqlDatabase : Resource /// /// Creates a new PostgreSqlDatabase. /// - /// + /// /// The the Bicep identifier name of the PostgreSqlDatabase resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, /// and underscores. /// /// Version of the PostgreSqlDatabase. - public PostgreSqlDatabase(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.DBforPostgreSQL/servers/databases", resourceVersion ?? "2017-12-01") + public PostgreSqlDatabase(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.DBforPostgreSQL/servers/databases", resourceVersion ?? "2017-12-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _charset = BicepValue.DefineProperty(this, "Charset", ["properties", "charset"]); @@ -80,11 +80,6 @@ public PostgreSqlDatabase(string identifierName, string? resourceVersion = defau /// public static class ResourceVersions { - /// - /// 2017-12-01-preview. - /// - public static readonly string V2017_12_01_preview = "2017-12-01-preview"; - /// /// 2017-12-01. /// @@ -94,7 +89,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing PostgreSqlDatabase. /// - /// + /// /// The the Bicep identifier name of the PostgreSqlDatabase resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, @@ -102,8 +97,8 @@ public static class ResourceVersions /// /// Version of the PostgreSqlDatabase. /// The existing PostgreSqlDatabase resource. - public static PostgreSqlDatabase FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static PostgreSqlDatabase FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; /// /// Get the requirements for naming this PostgreSqlDatabase resource. diff --git a/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/PostgreSqlFirewallRule.cs b/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/PostgreSqlFirewallRule.cs index c5a7e6d8c5a5..424a16be5ccb 100644 --- a/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/PostgreSqlFirewallRule.cs +++ b/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/PostgreSqlFirewallRule.cs @@ -17,7 +17,7 @@ namespace Azure.Provisioning.PostgreSql; /// /// PostgreSqlFirewallRule. /// -public partial class PostgreSqlFirewallRule : Resource +public partial class PostgreSqlFirewallRule : ProvisionableResource { /// /// The name of the server firewall rule. @@ -58,15 +58,15 @@ public partial class PostgreSqlFirewallRule : Resource /// /// Creates a new PostgreSqlFirewallRule. /// - /// + /// /// The the Bicep identifier name of the PostgreSqlFirewallRule resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, /// numbers, and underscores. /// /// Version of the PostgreSqlFirewallRule. - public PostgreSqlFirewallRule(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.DBforPostgreSQL/servers/firewallRules", resourceVersion ?? "2017-12-01") + public PostgreSqlFirewallRule(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.DBforPostgreSQL/servers/firewallRules", resourceVersion ?? "2017-12-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _endIPAddress = BicepValue.DefineProperty(this, "EndIPAddress", ["properties", "endIpAddress"], isRequired: true); @@ -81,11 +81,6 @@ public PostgreSqlFirewallRule(string identifierName, string? resourceVersion = d /// public static class ResourceVersions { - /// - /// 2017-12-01-preview. - /// - public static readonly string V2017_12_01_preview = "2017-12-01-preview"; - /// /// 2017-12-01. /// @@ -95,7 +90,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing PostgreSqlFirewallRule. /// - /// + /// /// The the Bicep identifier name of the PostgreSqlFirewallRule resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, @@ -103,8 +98,8 @@ public static class ResourceVersions /// /// Version of the PostgreSqlFirewallRule. /// The existing PostgreSqlFirewallRule resource. - public static PostgreSqlFirewallRule FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static PostgreSqlFirewallRule FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; /// /// Get the requirements for naming this PostgreSqlFirewallRule resource. diff --git a/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/PostgreSqlFlexibleServer.cs b/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/PostgreSqlFlexibleServer.cs index 96171f4bbffe..6377d2b8bfdf 100644 --- a/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/PostgreSqlFlexibleServer.cs +++ b/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/PostgreSqlFlexibleServer.cs @@ -17,7 +17,7 @@ namespace Azure.Provisioning.PostgreSql; /// /// PostgreSqlFlexibleServer. /// -public partial class PostgreSqlFlexibleServer : Resource +public partial class PostgreSqlFlexibleServer : ProvisionableResource { /// /// The name of the server. @@ -193,15 +193,15 @@ public partial class PostgreSqlFlexibleServer : Resource /// /// Creates a new PostgreSqlFlexibleServer. /// - /// + /// /// The the Bicep identifier name of the PostgreSqlFlexibleServer resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, /// numbers, and underscores. /// /// Version of the PostgreSqlFlexibleServer. - public PostgreSqlFlexibleServer(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.DBforPostgreSQL/flexibleServers", resourceVersion ?? "2024-08-01") + public PostgreSqlFlexibleServer(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.DBforPostgreSQL/flexibleServers", resourceVersion ?? "2024-08-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _location = BicepValue.DefineProperty(this, "Location", ["location"], isRequired: true); @@ -256,7 +256,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing PostgreSqlFlexibleServer. /// - /// + /// /// The the Bicep identifier name of the PostgreSqlFlexibleServer resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, @@ -264,8 +264,8 @@ public static class ResourceVersions /// /// Version of the PostgreSqlFlexibleServer. /// The existing PostgreSqlFlexibleServer resource. - public static PostgreSqlFlexibleServer FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static PostgreSqlFlexibleServer FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; /// /// Get the requirements for naming this PostgreSqlFlexibleServer resource. diff --git a/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/PostgreSqlFlexibleServerActiveDirectoryAdministrator.cs b/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/PostgreSqlFlexibleServerActiveDirectoryAdministrator.cs index 49f5c77f8983..08b9befb47b7 100644 --- a/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/PostgreSqlFlexibleServerActiveDirectoryAdministrator.cs +++ b/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/PostgreSqlFlexibleServerActiveDirectoryAdministrator.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.PostgreSql; /// /// PostgreSqlFlexibleServerActiveDirectoryAdministrator. /// -public partial class PostgreSqlFlexibleServerActiveDirectoryAdministrator : Resource +public partial class PostgreSqlFlexibleServerActiveDirectoryAdministrator : ProvisionableResource { /// /// Gets or sets the Name. @@ -69,7 +69,7 @@ public partial class PostgreSqlFlexibleServerActiveDirectoryAdministrator : Reso /// /// Creates a new PostgreSqlFlexibleServerActiveDirectoryAdministrator. /// - /// + /// /// The the Bicep identifier name of the /// PostgreSqlFlexibleServerActiveDirectoryAdministrator resource. This /// can be used to refer to the resource in expressions, but is not the @@ -77,8 +77,8 @@ public partial class PostgreSqlFlexibleServerActiveDirectoryAdministrator : Reso /// and underscores. /// /// Version of the PostgreSqlFlexibleServerActiveDirectoryAdministrator. - public PostgreSqlFlexibleServerActiveDirectoryAdministrator(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.DBforPostgreSQL/flexibleServers/administrators", resourceVersion ?? "2024-08-01") + public PostgreSqlFlexibleServerActiveDirectoryAdministrator(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.DBforPostgreSQL/flexibleServers/administrators", resourceVersion ?? "2024-08-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _objectId = BicepValue.DefineProperty(this, "ObjectId", ["properties", "objectId"], isOutput: true); @@ -116,7 +116,7 @@ public static class ResourceVersions /// Creates a reference to an existing /// PostgreSqlFlexibleServerActiveDirectoryAdministrator. /// - /// + /// /// The the Bicep identifier name of the /// PostgreSqlFlexibleServerActiveDirectoryAdministrator resource. This /// can be used to refer to the resource in expressions, but is not the @@ -125,6 +125,6 @@ public static class ResourceVersions /// /// Version of the PostgreSqlFlexibleServerActiveDirectoryAdministrator. /// The existing PostgreSqlFlexibleServerActiveDirectoryAdministrator resource. - public static PostgreSqlFlexibleServerActiveDirectoryAdministrator FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static PostgreSqlFlexibleServerActiveDirectoryAdministrator FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/PostgreSqlFlexibleServerConfiguration.cs b/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/PostgreSqlFlexibleServerConfiguration.cs index dfd5b2b6e21f..4e42f361d1f8 100644 --- a/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/PostgreSqlFlexibleServerConfiguration.cs +++ b/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/PostgreSqlFlexibleServerConfiguration.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.PostgreSql; /// /// PostgreSqlFlexibleServerConfiguration. /// -public partial class PostgreSqlFlexibleServerConfiguration : Resource +public partial class PostgreSqlFlexibleServerConfiguration : ProvisionableResource { /// /// The name of the server configuration. @@ -110,15 +110,15 @@ public partial class PostgreSqlFlexibleServerConfiguration : Resource /// /// Creates a new PostgreSqlFlexibleServerConfiguration. /// - /// + /// /// The the Bicep identifier name of the /// PostgreSqlFlexibleServerConfiguration resource. This can be used to /// refer to the resource in expressions, but is not the Azure name of the /// resource. This value can contain letters, numbers, and underscores. /// /// Version of the PostgreSqlFlexibleServerConfiguration. - public PostgreSqlFlexibleServerConfiguration(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.DBforPostgreSQL/flexibleServers/configurations", resourceVersion ?? "2024-08-01") + public PostgreSqlFlexibleServerConfiguration(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.DBforPostgreSQL/flexibleServers/configurations", resourceVersion ?? "2024-08-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _source = BicepValue.DefineProperty(this, "Source", ["properties", "source"]); @@ -162,7 +162,7 @@ public static class ResourceVersions /// Creates a reference to an existing /// PostgreSqlFlexibleServerConfiguration. /// - /// + /// /// The the Bicep identifier name of the /// PostgreSqlFlexibleServerConfiguration resource. This can be used to /// refer to the resource in expressions, but is not the Azure name of the @@ -170,6 +170,6 @@ public static class ResourceVersions /// /// Version of the PostgreSqlFlexibleServerConfiguration. /// The existing PostgreSqlFlexibleServerConfiguration resource. - public static PostgreSqlFlexibleServerConfiguration FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static PostgreSqlFlexibleServerConfiguration FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/PostgreSqlFlexibleServerDatabase.cs b/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/PostgreSqlFlexibleServerDatabase.cs index 0c8e96656ea0..df5cb99fe3fb 100644 --- a/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/PostgreSqlFlexibleServerDatabase.cs +++ b/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/PostgreSqlFlexibleServerDatabase.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.PostgreSql; /// /// PostgreSqlFlexibleServerDatabase. /// -public partial class PostgreSqlFlexibleServerDatabase : Resource +public partial class PostgreSqlFlexibleServerDatabase : ProvisionableResource { /// /// The name of the database. @@ -56,15 +56,15 @@ public partial class PostgreSqlFlexibleServerDatabase : Resource /// /// Creates a new PostgreSqlFlexibleServerDatabase. /// - /// + /// /// The the Bicep identifier name of the PostgreSqlFlexibleServerDatabase /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the PostgreSqlFlexibleServerDatabase. - public PostgreSqlFlexibleServerDatabase(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.DBforPostgreSQL/flexibleServers/databases", resourceVersion ?? "2024-08-01") + public PostgreSqlFlexibleServerDatabase(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.DBforPostgreSQL/flexibleServers/databases", resourceVersion ?? "2024-08-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _charset = BicepValue.DefineProperty(this, "Charset", ["properties", "charset"]); @@ -98,7 +98,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing PostgreSqlFlexibleServerDatabase. /// - /// + /// /// The the Bicep identifier name of the PostgreSqlFlexibleServerDatabase /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -106,6 +106,6 @@ public static class ResourceVersions /// /// Version of the PostgreSqlFlexibleServerDatabase. /// The existing PostgreSqlFlexibleServerDatabase resource. - public static PostgreSqlFlexibleServerDatabase FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static PostgreSqlFlexibleServerDatabase FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/PostgreSqlFlexibleServerFirewallRule.cs b/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/PostgreSqlFlexibleServerFirewallRule.cs index bcddf372c149..9f645486bbf9 100644 --- a/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/PostgreSqlFlexibleServerFirewallRule.cs +++ b/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/PostgreSqlFlexibleServerFirewallRule.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.PostgreSql; /// /// PostgreSqlFlexibleServerFirewallRule. /// -public partial class PostgreSqlFlexibleServerFirewallRule : Resource +public partial class PostgreSqlFlexibleServerFirewallRule : ProvisionableResource { /// /// The name of the server firewall rule. @@ -57,15 +57,15 @@ public partial class PostgreSqlFlexibleServerFirewallRule : Resource /// /// Creates a new PostgreSqlFlexibleServerFirewallRule. /// - /// + /// /// The the Bicep identifier name of the /// PostgreSqlFlexibleServerFirewallRule resource. This can be used to /// refer to the resource in expressions, but is not the Azure name of the /// resource. This value can contain letters, numbers, and underscores. /// /// Version of the PostgreSqlFlexibleServerFirewallRule. - public PostgreSqlFlexibleServerFirewallRule(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.DBforPostgreSQL/flexibleServers/firewallRules", resourceVersion ?? "2024-08-01") + public PostgreSqlFlexibleServerFirewallRule(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.DBforPostgreSQL/flexibleServers/firewallRules", resourceVersion ?? "2024-08-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _endIPAddress = BicepValue.DefineProperty(this, "EndIPAddress", ["properties", "endIpAddress"], isRequired: true); @@ -99,7 +99,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing PostgreSqlFlexibleServerFirewallRule. /// - /// + /// /// The the Bicep identifier name of the /// PostgreSqlFlexibleServerFirewallRule resource. This can be used to /// refer to the resource in expressions, but is not the Azure name of the @@ -107,6 +107,6 @@ public static class ResourceVersions /// /// Version of the PostgreSqlFlexibleServerFirewallRule. /// The existing PostgreSqlFlexibleServerFirewallRule resource. - public static PostgreSqlFlexibleServerFirewallRule FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static PostgreSqlFlexibleServerFirewallRule FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/PostgreSqlMigration.cs b/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/PostgreSqlMigration.cs index 35ae58d17b51..1a95775ad725 100644 --- a/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/PostgreSqlMigration.cs +++ b/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/PostgreSqlMigration.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.PostgreSql; /// /// PostgreSqlMigration. /// -public partial class PostgreSqlMigration : Resource +public partial class PostgreSqlMigration : ProvisionableResource { /// /// The name of the migration. @@ -186,15 +186,15 @@ public partial class PostgreSqlMigration : Resource /// /// Creates a new PostgreSqlMigration. /// - /// + /// /// The the Bicep identifier name of the PostgreSqlMigration resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, /// numbers, and underscores. /// /// Version of the PostgreSqlMigration. - public PostgreSqlMigration(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.DBforPostgreSQL/flexibleServers/migrations", resourceVersion ?? "2024-08-01") + public PostgreSqlMigration(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.DBforPostgreSQL/flexibleServers/migrations", resourceVersion ?? "2024-08-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _location = BicepValue.DefineProperty(this, "Location", ["location"], isRequired: true); @@ -248,7 +248,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing PostgreSqlMigration. /// - /// + /// /// The the Bicep identifier name of the PostgreSqlMigration resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, @@ -256,6 +256,6 @@ public static class ResourceVersions /// /// Version of the PostgreSqlMigration. /// The existing PostgreSqlMigration resource. - public static PostgreSqlMigration FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static PostgreSqlMigration FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/PostgreSqlPrivateEndpointConnection.cs b/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/PostgreSqlPrivateEndpointConnection.cs index 5564bb6526f4..c97cbc5c057b 100644 --- a/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/PostgreSqlPrivateEndpointConnection.cs +++ b/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/PostgreSqlPrivateEndpointConnection.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.PostgreSql; /// /// PostgreSqlPrivateEndpointConnection. /// -public partial class PostgreSqlPrivateEndpointConnection : Resource +public partial class PostgreSqlPrivateEndpointConnection : ProvisionableResource { /// /// The System.String to use. @@ -62,15 +62,15 @@ public partial class PostgreSqlPrivateEndpointConnection : Resource /// /// Creates a new PostgreSqlPrivateEndpointConnection. /// - /// + /// /// The the Bicep identifier name of the /// PostgreSqlPrivateEndpointConnection resource. This can be used to /// refer to the resource in expressions, but is not the Azure name of the /// resource. This value can contain letters, numbers, and underscores. /// /// Version of the PostgreSqlPrivateEndpointConnection. - public PostgreSqlPrivateEndpointConnection(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.DBforPostgreSQL/servers/privateEndpointConnections", resourceVersion ?? "2018-06-01") + public PostgreSqlPrivateEndpointConnection(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.DBforPostgreSQL/servers/privateEndpointConnections", resourceVersion ?? "2018-06-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _connectionState = BicepValue.DefineProperty(this, "ConnectionState", ["properties", "privateLinkServiceConnectionState"]); @@ -86,11 +86,6 @@ public PostgreSqlPrivateEndpointConnection(string identifierName, string? resour /// public static class ResourceVersions { - /// - /// 2018-06-01-privatepreview. - /// - public static readonly string V2018_06_01_privatepreview = "2018-06-01-privatepreview"; - /// /// 2018-06-01. /// @@ -100,7 +95,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing PostgreSqlPrivateEndpointConnection. /// - /// + /// /// The the Bicep identifier name of the /// PostgreSqlPrivateEndpointConnection resource. This can be used to /// refer to the resource in expressions, but is not the Azure name of the @@ -108,6 +103,6 @@ public static class ResourceVersions /// /// Version of the PostgreSqlPrivateEndpointConnection. /// The existing PostgreSqlPrivateEndpointConnection resource. - public static PostgreSqlPrivateEndpointConnection FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static PostgreSqlPrivateEndpointConnection FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/PostgreSqlServer.cs b/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/PostgreSqlServer.cs index 24c7660b84af..4b88cadb9059 100644 --- a/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/PostgreSqlServer.cs +++ b/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/PostgreSqlServer.cs @@ -17,7 +17,7 @@ namespace Azure.Provisioning.PostgreSql; /// /// PostgreSqlServer. /// -public partial class PostgreSqlServer : Resource +public partial class PostgreSqlServer : ProvisionableResource { /// /// The name of the server. @@ -175,15 +175,15 @@ public partial class PostgreSqlServer : Resource /// /// Creates a new PostgreSqlServer. /// - /// + /// /// The the Bicep identifier name of the PostgreSqlServer resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, /// and underscores. /// /// Version of the PostgreSqlServer. - public PostgreSqlServer(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.DBforPostgreSQL/servers", resourceVersion ?? "2017-12-01") + public PostgreSqlServer(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.DBforPostgreSQL/servers", resourceVersion ?? "2017-12-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _location = BicepValue.DefineProperty(this, "Location", ["location"], isRequired: true); @@ -215,11 +215,6 @@ public PostgreSqlServer(string identifierName, string? resourceVersion = default /// public static class ResourceVersions { - /// - /// 2017-12-01-preview. - /// - public static readonly string V2017_12_01_preview = "2017-12-01-preview"; - /// /// 2017-12-01. /// @@ -229,7 +224,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing PostgreSqlServer. /// - /// + /// /// The the Bicep identifier name of the PostgreSqlServer resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, @@ -237,8 +232,8 @@ public static class ResourceVersions /// /// Version of the PostgreSqlServer. /// The existing PostgreSqlServer resource. - public static PostgreSqlServer FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static PostgreSqlServer FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; /// /// Get the requirements for naming this PostgreSqlServer resource. diff --git a/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/PostgreSqlServerAdministrator.cs b/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/PostgreSqlServerAdministrator.cs index f991b6be0882..cfab21060bc2 100644 --- a/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/PostgreSqlServerAdministrator.cs +++ b/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/PostgreSqlServerAdministrator.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.PostgreSql; /// /// PostgreSqlServerAdministrator. /// -public partial class PostgreSqlServerAdministrator : Resource +public partial class PostgreSqlServerAdministrator : ProvisionableResource { /// /// Gets the Name. @@ -68,15 +68,15 @@ public partial class PostgreSqlServerAdministrator : Resource /// /// Creates a new PostgreSqlServerAdministrator. /// - /// + /// /// The the Bicep identifier name of the PostgreSqlServerAdministrator /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the PostgreSqlServerAdministrator. - public PostgreSqlServerAdministrator(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.DBforPostgreSQL/servers/administrators", resourceVersion ?? "2017-12-01") + public PostgreSqlServerAdministrator(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.DBforPostgreSQL/servers/administrators", resourceVersion ?? "2017-12-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _administratorType = BicepValue.DefineProperty(this, "AdministratorType", ["properties", "administratorType"]); @@ -93,11 +93,6 @@ public PostgreSqlServerAdministrator(string identifierName, string? resourceVers /// public static class ResourceVersions { - /// - /// 2017-12-01-preview. - /// - public static readonly string V2017_12_01_preview = "2017-12-01-preview"; - /// /// 2017-12-01. /// @@ -107,7 +102,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing PostgreSqlServerAdministrator. /// - /// + /// /// The the Bicep identifier name of the PostgreSqlServerAdministrator /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -115,6 +110,6 @@ public static class ResourceVersions /// /// Version of the PostgreSqlServerAdministrator. /// The existing PostgreSqlServerAdministrator resource. - public static PostgreSqlServerAdministrator FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static PostgreSqlServerAdministrator FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/PostgreSqlServerKey.cs b/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/PostgreSqlServerKey.cs index f23d96863318..e3be727e7273 100644 --- a/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/PostgreSqlServerKey.cs +++ b/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/PostgreSqlServerKey.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.PostgreSql; /// /// PostgreSqlServerKey. /// -public partial class PostgreSqlServerKey : Resource +public partial class PostgreSqlServerKey : ProvisionableResource { /// /// The name of the PostgreSQL Server key to be operated on (updated or @@ -69,15 +69,15 @@ public partial class PostgreSqlServerKey : Resource /// /// Creates a new PostgreSqlServerKey. /// - /// + /// /// The the Bicep identifier name of the PostgreSqlServerKey resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, /// numbers, and underscores. /// /// Version of the PostgreSqlServerKey. - public PostgreSqlServerKey(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.DBforPostgreSQL/servers/keys", resourceVersion ?? "2020-01-01") + public PostgreSqlServerKey(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.DBforPostgreSQL/servers/keys", resourceVersion ?? "2020-01-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _serverKeyType = BicepValue.DefineProperty(this, "ServerKeyType", ["properties", "serverKeyType"]); @@ -94,11 +94,6 @@ public PostgreSqlServerKey(string identifierName, string? resourceVersion = defa /// public static class ResourceVersions { - /// - /// 2020-01-01-privatepreview. - /// - public static readonly string V2020_01_01_privatepreview = "2020-01-01-privatepreview"; - /// /// 2020-01-01. /// @@ -108,7 +103,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing PostgreSqlServerKey. /// - /// + /// /// The the Bicep identifier name of the PostgreSqlServerKey resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, @@ -116,6 +111,6 @@ public static class ResourceVersions /// /// Version of the PostgreSqlServerKey. /// The existing PostgreSqlServerKey resource. - public static PostgreSqlServerKey FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static PostgreSqlServerKey FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/PostgreSqlServerSecurityAlertPolicy.cs b/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/PostgreSqlServerSecurityAlertPolicy.cs index 11d5a0d5a8a4..1b2724b71f1a 100644 --- a/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/PostgreSqlServerSecurityAlertPolicy.cs +++ b/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/PostgreSqlServerSecurityAlertPolicy.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.PostgreSql; /// /// PostgreSqlServerSecurityAlertPolicy. /// -public partial class PostgreSqlServerSecurityAlertPolicy : Resource +public partial class PostgreSqlServerSecurityAlertPolicy : ProvisionableResource { /// /// Gets the Name. @@ -91,15 +91,15 @@ public partial class PostgreSqlServerSecurityAlertPolicy : Resource /// /// Creates a new PostgreSqlServerSecurityAlertPolicy. /// - /// + /// /// The the Bicep identifier name of the /// PostgreSqlServerSecurityAlertPolicy resource. This can be used to /// refer to the resource in expressions, but is not the Azure name of the /// resource. This value can contain letters, numbers, and underscores. /// /// Version of the PostgreSqlServerSecurityAlertPolicy. - public PostgreSqlServerSecurityAlertPolicy(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.DBforPostgreSQL/servers/securityAlertPolicies", resourceVersion ?? "2017-12-01") + public PostgreSqlServerSecurityAlertPolicy(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.DBforPostgreSQL/servers/securityAlertPolicies", resourceVersion ?? "2017-12-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _disabledAlerts = BicepList.DefineProperty(this, "DisabledAlerts", ["properties", "disabledAlerts"]); @@ -119,11 +119,6 @@ public PostgreSqlServerSecurityAlertPolicy(string identifierName, string? resour /// public static class ResourceVersions { - /// - /// 2017-12-01-preview. - /// - public static readonly string V2017_12_01_preview = "2017-12-01-preview"; - /// /// 2017-12-01. /// @@ -133,7 +128,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing PostgreSqlServerSecurityAlertPolicy. /// - /// + /// /// The the Bicep identifier name of the /// PostgreSqlServerSecurityAlertPolicy resource. This can be used to /// refer to the resource in expressions, but is not the Azure name of the @@ -141,6 +136,6 @@ public static class ResourceVersions /// /// Version of the PostgreSqlServerSecurityAlertPolicy. /// The existing PostgreSqlServerSecurityAlertPolicy resource. - public static PostgreSqlServerSecurityAlertPolicy FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static PostgreSqlServerSecurityAlertPolicy FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/PostgreSqlVirtualNetworkRule.cs b/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/PostgreSqlVirtualNetworkRule.cs index 829fa9d54927..2c04c4204121 100644 --- a/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/PostgreSqlVirtualNetworkRule.cs +++ b/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/PostgreSqlVirtualNetworkRule.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.PostgreSql; /// /// PostgreSqlVirtualNetworkRule. /// -public partial class PostgreSqlVirtualNetworkRule : Resource +public partial class PostgreSqlVirtualNetworkRule : ProvisionableResource { /// /// The name of the virtual network rule. @@ -64,15 +64,15 @@ public partial class PostgreSqlVirtualNetworkRule : Resource /// /// Creates a new PostgreSqlVirtualNetworkRule. /// - /// + /// /// The the Bicep identifier name of the PostgreSqlVirtualNetworkRule /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the PostgreSqlVirtualNetworkRule. - public PostgreSqlVirtualNetworkRule(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.DBforPostgreSQL/servers/virtualNetworkRules", resourceVersion ?? "2017-12-01") + public PostgreSqlVirtualNetworkRule(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.DBforPostgreSQL/servers/virtualNetworkRules", resourceVersion ?? "2017-12-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _ignoreMissingVnetServiceEndpoint = BicepValue.DefineProperty(this, "IgnoreMissingVnetServiceEndpoint", ["properties", "ignoreMissingVnetServiceEndpoint"]); @@ -88,11 +88,6 @@ public PostgreSqlVirtualNetworkRule(string identifierName, string? resourceVersi /// public static class ResourceVersions { - /// - /// 2017-12-01-preview. - /// - public static readonly string V2017_12_01_preview = "2017-12-01-preview"; - /// /// 2017-12-01. /// @@ -102,7 +97,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing PostgreSqlVirtualNetworkRule. /// - /// + /// /// The the Bicep identifier name of the PostgreSqlVirtualNetworkRule /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -110,8 +105,8 @@ public static class ResourceVersions /// /// Version of the PostgreSqlVirtualNetworkRule. /// The existing PostgreSqlVirtualNetworkRule resource. - public static PostgreSqlVirtualNetworkRule FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static PostgreSqlVirtualNetworkRule FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; /// /// Get the requirements for naming this PostgreSqlVirtualNetworkRule diff --git a/sdk/provisioning/Azure.Provisioning.Redis/api/Azure.Provisioning.Redis.netstandard2.0.cs b/sdk/provisioning/Azure.Provisioning.Redis/api/Azure.Provisioning.Redis.netstandard2.0.cs index d85e27a88165..19cebf414f9a 100644 --- a/sdk/provisioning/Azure.Provisioning.Redis/api/Azure.Provisioning.Redis.netstandard2.0.cs +++ b/sdk/provisioning/Azure.Provisioning.Redis/api/Azure.Provisioning.Redis.netstandard2.0.cs @@ -23,13 +23,13 @@ public enum AccessPolicyType Custom = 0, BuiltIn = 1, } - public partial class RedisAccessKeys : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class RedisAccessKeys : Azure.Provisioning.Primitives.ProvisionableConstruct { public RedisAccessKeys() { } public Azure.Provisioning.BicepValue PrimaryKey { get { throw null; } } public Azure.Provisioning.BicepValue SecondaryKey { get { throw null; } } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public static Azure.Provisioning.Redis.RedisAccessKeys FromExpression(Azure.Provisioning.Expressions.Expression expression) { throw null; } + public static Azure.Provisioning.Redis.RedisAccessKeys FromExpression(Azure.Provisioning.Expressions.BicepExpression expression) { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct RedisBuiltInRole : System.IEquatable @@ -50,9 +50,9 @@ public RedisAccessKeys() { } public static bool operator !=(Azure.Provisioning.Redis.RedisBuiltInRole left, Azure.Provisioning.Redis.RedisBuiltInRole right) { throw null; } public override string ToString() { throw null; } } - public partial class RedisCacheAccessPolicy : Azure.Provisioning.Primitives.Resource + public partial class RedisCacheAccessPolicy : Azure.Provisioning.Primitives.ProvisionableResource { - public RedisCacheAccessPolicy(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public RedisCacheAccessPolicy(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } public Azure.Provisioning.Redis.RedisResource? Parent { get { throw null; } set { } } @@ -60,7 +60,7 @@ public partial class RedisCacheAccessPolicy : Azure.Provisioning.Primitives.Reso public Azure.Provisioning.BicepValue ProvisioningState { get { throw null; } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepValue TypePropertiesType { get { throw null; } } - public static Azure.Provisioning.Redis.RedisCacheAccessPolicy FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Redis.RedisCacheAccessPolicy FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2014_04_01; @@ -79,12 +79,11 @@ public static partial class ResourceVersions public static readonly string V2023_04_01; public static readonly string V2023_08_01; public static readonly string V2024_03_01; - public static readonly string V2024_04_01_preview; } } - public partial class RedisCacheAccessPolicyAssignment : Azure.Provisioning.Primitives.Resource + public partial class RedisCacheAccessPolicyAssignment : Azure.Provisioning.Primitives.ProvisionableResource { - public RedisCacheAccessPolicyAssignment(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public RedisCacheAccessPolicyAssignment(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue AccessPolicyName { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } @@ -93,7 +92,7 @@ public partial class RedisCacheAccessPolicyAssignment : Azure.Provisioning.Primi public Azure.Provisioning.Redis.RedisResource? Parent { get { throw null; } set { } } public Azure.Provisioning.BicepValue ProvisioningState { get { throw null; } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.Redis.RedisCacheAccessPolicyAssignment FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Redis.RedisCacheAccessPolicyAssignment FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2014_04_01; @@ -112,10 +111,9 @@ public static partial class ResourceVersions public static readonly string V2023_04_01; public static readonly string V2023_08_01; public static readonly string V2024_03_01; - public static readonly string V2024_04_01_preview; } } - public partial class RedisCommonConfiguration : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class RedisCommonConfiguration : Azure.Provisioning.Primitives.ProvisionableConstruct { public RedisCommonConfiguration() { } public Azure.Provisioning.BicepDictionary AdditionalProperties { get { throw null; } set { } } @@ -130,6 +128,7 @@ public RedisCommonConfiguration() { } public Azure.Provisioning.BicepValue MaxMemoryDelta { get { throw null; } set { } } public Azure.Provisioning.BicepValue MaxMemoryPolicy { get { throw null; } set { } } public Azure.Provisioning.BicepValue MaxMemoryReserved { get { throw null; } set { } } + public Azure.Provisioning.BicepValue NotifyKeyspaceEvents { get { throw null; } set { } } public Azure.Provisioning.BicepValue PreferredDataArchiveAuthMethod { get { throw null; } } public Azure.Provisioning.BicepValue PreferredDataPersistenceAuthMethod { get { throw null; } set { } } public Azure.Provisioning.BicepValue RdbBackupFrequency { get { throw null; } set { } } @@ -150,16 +149,16 @@ public enum RedisDayOfWeek Everyday = 7, Weekend = 8, } - public partial class RedisFirewallRule : Azure.Provisioning.Primitives.Resource + public partial class RedisFirewallRule : Azure.Provisioning.Primitives.ProvisionableResource { - public RedisFirewallRule(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public RedisFirewallRule(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue EndIP { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } public Azure.Provisioning.Redis.RedisResource? Parent { get { throw null; } set { } } public Azure.Provisioning.BicepValue StartIP { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.Redis.RedisFirewallRule FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Redis.RedisFirewallRule FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override Azure.Provisioning.Primitives.ResourceNameRequirements GetResourceNameRequirements() { throw null; } public static partial class ResourceVersions @@ -180,10 +179,9 @@ public static partial class ResourceVersions public static readonly string V2023_04_01; public static readonly string V2023_08_01; public static readonly string V2024_03_01; - public static readonly string V2024_04_01_preview; } } - public partial class RedisInstanceDetails : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class RedisInstanceDetails : Azure.Provisioning.Primitives.ProvisionableConstruct { public RedisInstanceDetails() { } public Azure.Provisioning.BicepValue IsMaster { get { throw null; } } @@ -198,9 +196,9 @@ public enum RedisLinkedServerRole Primary = 0, Secondary = 1, } - public partial class RedisLinkedServerWithProperty : Azure.Provisioning.Primitives.Resource + public partial class RedisLinkedServerWithProperty : Azure.Provisioning.Primitives.ProvisionableResource { - public RedisLinkedServerWithProperty(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public RedisLinkedServerWithProperty(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue GeoReplicatedPrimaryHostName { get { throw null; } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue LinkedRedisCacheId { get { throw null; } set { } } @@ -211,7 +209,7 @@ public partial class RedisLinkedServerWithProperty : Azure.Provisioning.Primitiv public Azure.Provisioning.BicepValue ProvisioningState { get { throw null; } } public Azure.Provisioning.BicepValue ServerRole { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.Redis.RedisLinkedServerWithProperty FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Redis.RedisLinkedServerWithProperty FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2014_04_01; @@ -230,19 +228,18 @@ public static partial class ResourceVersions public static readonly string V2023_04_01; public static readonly string V2023_08_01; public static readonly string V2024_03_01; - public static readonly string V2024_04_01_preview; } } - public partial class RedisPatchSchedule : Azure.Provisioning.Primitives.Resource + public partial class RedisPatchSchedule : Azure.Provisioning.Primitives.ProvisionableResource { - public RedisPatchSchedule(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public RedisPatchSchedule(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Location { get { throw null; } } public Azure.Provisioning.BicepValue Name { get { throw null; } } public Azure.Provisioning.Redis.RedisResource? Parent { get { throw null; } set { } } public Azure.Provisioning.BicepList ScheduleEntries { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.Redis.RedisPatchSchedule FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Redis.RedisPatchSchedule FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2014_04_01; @@ -261,7 +258,6 @@ public static partial class ResourceVersions public static readonly string V2023_04_01; public static readonly string V2023_08_01; public static readonly string V2024_03_01; - public static readonly string V2024_04_01_preview; } } public enum RedisPatchScheduleDefaultName @@ -269,16 +265,16 @@ public enum RedisPatchScheduleDefaultName [System.Runtime.Serialization.DataMemberAttribute(Name="default")] Default = 0, } - public partial class RedisPatchScheduleSetting : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class RedisPatchScheduleSetting : Azure.Provisioning.Primitives.ProvisionableConstruct { public RedisPatchScheduleSetting() { } public Azure.Provisioning.BicepValue DayOfWeek { get { throw null; } set { } } public Azure.Provisioning.BicepValue MaintenanceWindow { get { throw null; } set { } } public Azure.Provisioning.BicepValue StartHourUtc { get { throw null; } set { } } } - public partial class RedisPrivateEndpointConnection : Azure.Provisioning.Primitives.Resource + public partial class RedisPrivateEndpointConnection : Azure.Provisioning.Primitives.ProvisionableResource { - public RedisPrivateEndpointConnection(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public RedisPrivateEndpointConnection(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } public Azure.Provisioning.Redis.RedisResource? Parent { get { throw null; } set { } } @@ -286,7 +282,7 @@ public partial class RedisPrivateEndpointConnection : Azure.Provisioning.Primiti public Azure.Provisioning.BicepValue RedisPrivateLinkServiceConnectionState { get { throw null; } set { } } public Azure.Provisioning.BicepValue RedisProvisioningState { get { throw null; } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.Redis.RedisPrivateEndpointConnection FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Redis.RedisPrivateEndpointConnection FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2019_07_01; @@ -298,10 +294,9 @@ public static partial class ResourceVersions public static readonly string V2023_04_01; public static readonly string V2023_08_01; public static readonly string V2024_03_01; - public static readonly string V2024_04_01_preview; } } - public partial class RedisPrivateEndpointConnectionData : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class RedisPrivateEndpointConnectionData : Azure.Provisioning.Primitives.ProvisionableConstruct { public RedisPrivateEndpointConnectionData() { } public Azure.Provisioning.BicepValue Id { get { throw null; } } @@ -324,7 +319,7 @@ public enum RedisPrivateEndpointServiceConnectionStatus Approved = 1, Rejected = 2, } - public partial class RedisPrivateLinkServiceConnectionState : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class RedisPrivateLinkServiceConnectionState : Azure.Provisioning.Primitives.ProvisionableConstruct { public RedisPrivateLinkServiceConnectionState() { } public Azure.Provisioning.BicepValue ActionsRequired { get { throw null; } set { } } @@ -352,15 +347,16 @@ public enum RedisPublicNetworkAccess Enabled = 0, Disabled = 1, } - public partial class RedisResource : Azure.Provisioning.Primitives.Resource + public partial class RedisResource : Azure.Provisioning.Primitives.ProvisionableResource { - public RedisResource(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public RedisResource(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue AccessKeys { get { throw null; } } public Azure.Provisioning.BicepValue EnableNonSslPort { get { throw null; } set { } } public Azure.Provisioning.BicepValue HostName { get { throw null; } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Identity { get { throw null; } set { } } public Azure.Provisioning.BicepList Instances { get { throw null; } } + public Azure.Provisioning.BicepValue IsAccessKeyAuthenticationDisabled { get { throw null; } set { } } public Azure.Provisioning.BicepList LinkedServers { get { throw null; } } public Azure.Provisioning.BicepValue Location { get { throw null; } set { } } public Azure.Provisioning.BicepValue MinimumTlsVersion { get { throw null; } set { } } @@ -383,9 +379,9 @@ public partial class RedisResource : Azure.Provisioning.Primitives.Resource public Azure.Provisioning.BicepDictionary TenantSettings { get { throw null; } set { } } public Azure.Provisioning.BicepValue UpdateChannel { get { throw null; } set { } } public Azure.Provisioning.BicepList Zones { get { throw null; } set { } } - public Azure.Provisioning.Authorization.RoleAssignment CreateRoleAssignment(Azure.Provisioning.Redis.RedisBuiltInRole role, Azure.Provisioning.BicepValue principalType, Azure.Provisioning.BicepValue principalId, string? identifierNameSuffix = null) { throw null; } + public Azure.Provisioning.Authorization.RoleAssignment CreateRoleAssignment(Azure.Provisioning.Redis.RedisBuiltInRole role, Azure.Provisioning.BicepValue principalType, Azure.Provisioning.BicepValue principalId, string? bicepIdentifierSuffix = null) { throw null; } public Azure.Provisioning.Authorization.RoleAssignment CreateRoleAssignment(Azure.Provisioning.Redis.RedisBuiltInRole role, Azure.Provisioning.Roles.UserAssignedIdentity identity) { throw null; } - public static Azure.Provisioning.Redis.RedisResource FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Redis.RedisResource FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public Azure.Provisioning.Redis.RedisAccessKeys GetKeys() { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override Azure.Provisioning.Primitives.ResourceNameRequirements GetResourceNameRequirements() { throw null; } @@ -407,10 +403,9 @@ public static partial class ResourceVersions public static readonly string V2023_04_01; public static readonly string V2023_08_01; public static readonly string V2024_03_01; - public static readonly string V2024_04_01_preview; } } - public partial class RedisSku : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class RedisSku : Azure.Provisioning.Primitives.ProvisionableConstruct { public RedisSku() { } public Azure.Provisioning.BicepValue Capacity { get { throw null; } set { } } diff --git a/sdk/provisioning/Azure.Provisioning.Redis/src/Generated/Models/RedisAccessKeys.cs b/sdk/provisioning/Azure.Provisioning.Redis/src/Generated/Models/RedisAccessKeys.cs index fc41d60e2566..58d1ef2e7a3a 100644 --- a/sdk/provisioning/Azure.Provisioning.Redis/src/Generated/Models/RedisAccessKeys.cs +++ b/sdk/provisioning/Azure.Provisioning.Redis/src/Generated/Models/RedisAccessKeys.cs @@ -13,7 +13,7 @@ namespace Azure.Provisioning.Redis; /// /// Redis cache access keys. /// -public partial class RedisAccessKeys : ProvisioningConstruct +public partial class RedisAccessKeys : ProvisionableConstruct { /// /// The current primary key that clients can use to authenticate with Redis @@ -47,7 +47,7 @@ public RedisAccessKeys() /// /// A RedisAccessKeys resource. [EditorBrowsable(EditorBrowsableState.Never)] - public static RedisAccessKeys FromExpression(Expression expression) + public static RedisAccessKeys FromExpression(BicepExpression expression) { RedisAccessKeys resource = new(); resource.OverrideWithExpression(expression); diff --git a/sdk/provisioning/Azure.Provisioning.Redis/src/Generated/Models/RedisCommonConfiguration.cs b/sdk/provisioning/Azure.Provisioning.Redis/src/Generated/Models/RedisCommonConfiguration.cs index 5ab26956bc41..f4413f7c3866 100644 --- a/sdk/provisioning/Azure.Provisioning.Redis/src/Generated/Models/RedisCommonConfiguration.cs +++ b/sdk/provisioning/Azure.Provisioning.Redis/src/Generated/Models/RedisCommonConfiguration.cs @@ -11,10 +11,11 @@ namespace Azure.Provisioning.Redis; /// /// All Redis Settings. Few possible keys: -/// rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value -/// etc. +/// rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta, +/// maxmemory-policy,notify-keyspace-events, aof-backup-enabled, +/// aof-storage-connection-string-0, aof-storage-connection-string-1 etc. /// -public partial class RedisCommonConfiguration : ProvisioningConstruct +public partial class RedisCommonConfiguration : ProvisionableConstruct { /// /// Specifies whether the rdb backup is enabled. @@ -90,6 +91,12 @@ public partial class RedisCommonConfiguration : ProvisioningConstruct public BicepValue MaxClients { get => _maxClients; } private readonly BicepValue _maxClients; + /// + /// The keyspace events which should be monitored. + /// + public BicepValue NotifyKeyspaceEvents { get => _notifyKeyspaceEvents; set => _notifyKeyspaceEvents.Assign(value); } + private readonly BicepValue _notifyKeyspaceEvents; + /// /// Preferred auth method to communicate to storage account used for data /// archive, specify SAS or ManagedIdentity, default value is SAS. @@ -167,6 +174,7 @@ public RedisCommonConfiguration() _maxMemoryReserved = BicepValue.DefineProperty(this, "MaxMemoryReserved", ["maxmemory-reserved"]); _maxMemoryDelta = BicepValue.DefineProperty(this, "MaxMemoryDelta", ["maxmemory-delta"]); _maxClients = BicepValue.DefineProperty(this, "MaxClients", ["maxclients"], isOutput: true); + _notifyKeyspaceEvents = BicepValue.DefineProperty(this, "NotifyKeyspaceEvents", ["notify-keyspace-events"]); _preferredDataArchiveAuthMethod = BicepValue.DefineProperty(this, "PreferredDataArchiveAuthMethod", ["preferred-data-archive-auth-method"], isOutput: true); _preferredDataPersistenceAuthMethod = BicepValue.DefineProperty(this, "PreferredDataPersistenceAuthMethod", ["preferred-data-persistence-auth-method"]); _zonalConfiguration = BicepValue.DefineProperty(this, "ZonalConfiguration", ["zonal-configuration"], isOutput: true); diff --git a/sdk/provisioning/Azure.Provisioning.Redis/src/Generated/Models/RedisInstanceDetails.cs b/sdk/provisioning/Azure.Provisioning.Redis/src/Generated/Models/RedisInstanceDetails.cs index 305d0a1bacca..4a04db90400c 100644 --- a/sdk/provisioning/Azure.Provisioning.Redis/src/Generated/Models/RedisInstanceDetails.cs +++ b/sdk/provisioning/Azure.Provisioning.Redis/src/Generated/Models/RedisInstanceDetails.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.Redis; /// /// Details of single instance of redis. /// -public partial class RedisInstanceDetails : ProvisioningConstruct +public partial class RedisInstanceDetails : ProvisionableConstruct { /// /// Redis instance SSL port. diff --git a/sdk/provisioning/Azure.Provisioning.Redis/src/Generated/Models/RedisPatchScheduleSetting.cs b/sdk/provisioning/Azure.Provisioning.Redis/src/Generated/Models/RedisPatchScheduleSetting.cs index 0299a77873ce..5017b0fcf427 100644 --- a/sdk/provisioning/Azure.Provisioning.Redis/src/Generated/Models/RedisPatchScheduleSetting.cs +++ b/sdk/provisioning/Azure.Provisioning.Redis/src/Generated/Models/RedisPatchScheduleSetting.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.Redis; /// /// Patch schedule entry for a Premium Redis Cache. /// -public partial class RedisPatchScheduleSetting : ProvisioningConstruct +public partial class RedisPatchScheduleSetting : ProvisionableConstruct { /// /// Day of the week when a cache can be patched. @@ -38,6 +38,6 @@ public RedisPatchScheduleSetting() { _dayOfWeek = BicepValue.DefineProperty(this, "DayOfWeek", ["dayOfWeek"]); _startHourUtc = BicepValue.DefineProperty(this, "StartHourUtc", ["startHourUtc"]); - _maintenanceWindow = BicepValue.DefineProperty(this, "MaintenanceWindow", ["maintenanceWindow"]); + _maintenanceWindow = BicepValue.DefineProperty(this, "MaintenanceWindow", ["maintenanceWindow"], format: "P"); } } diff --git a/sdk/provisioning/Azure.Provisioning.Redis/src/Generated/Models/RedisPrivateEndpointConnectionData.cs b/sdk/provisioning/Azure.Provisioning.Redis/src/Generated/Models/RedisPrivateEndpointConnectionData.cs index 59579b4b2510..bbaede70d744 100644 --- a/sdk/provisioning/Azure.Provisioning.Redis/src/Generated/Models/RedisPrivateEndpointConnectionData.cs +++ b/sdk/provisioning/Azure.Provisioning.Redis/src/Generated/Models/RedisPrivateEndpointConnectionData.cs @@ -14,7 +14,7 @@ namespace Azure.Provisioning.Redis; /// A class representing the RedisPrivateEndpointConnection data model. /// The Private Endpoint Connection resource. /// -public partial class RedisPrivateEndpointConnectionData : ProvisioningConstruct +public partial class RedisPrivateEndpointConnectionData : ProvisionableConstruct { /// /// Gets Id. diff --git a/sdk/provisioning/Azure.Provisioning.Redis/src/Generated/Models/RedisPrivateLinkServiceConnectionState.cs b/sdk/provisioning/Azure.Provisioning.Redis/src/Generated/Models/RedisPrivateLinkServiceConnectionState.cs index 6bd66cee3c53..18fbf7f185b7 100644 --- a/sdk/provisioning/Azure.Provisioning.Redis/src/Generated/Models/RedisPrivateLinkServiceConnectionState.cs +++ b/sdk/provisioning/Azure.Provisioning.Redis/src/Generated/Models/RedisPrivateLinkServiceConnectionState.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.Redis; /// A collection of information about the state of the connection between /// service consumer and provider. /// -public partial class RedisPrivateLinkServiceConnectionState : ProvisioningConstruct +public partial class RedisPrivateLinkServiceConnectionState : ProvisionableConstruct { /// /// Indicates whether the connection has been Approved/Rejected/Removed by diff --git a/sdk/provisioning/Azure.Provisioning.Redis/src/Generated/Models/RedisSku.cs b/sdk/provisioning/Azure.Provisioning.Redis/src/Generated/Models/RedisSku.cs index 11e4d149dbd4..e124ce4efd77 100644 --- a/sdk/provisioning/Azure.Provisioning.Redis/src/Generated/Models/RedisSku.cs +++ b/sdk/provisioning/Azure.Provisioning.Redis/src/Generated/Models/RedisSku.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.Redis; /// /// SKU parameters supplied to the create Redis operation. /// -public partial class RedisSku : ProvisioningConstruct +public partial class RedisSku : ProvisionableConstruct { /// /// The type of Redis cache to deploy. Valid values: (Basic, Standard, diff --git a/sdk/provisioning/Azure.Provisioning.Redis/src/Generated/RedisCacheAccessPolicy.cs b/sdk/provisioning/Azure.Provisioning.Redis/src/Generated/RedisCacheAccessPolicy.cs index 308cd1d319b0..8daeae36f607 100644 --- a/sdk/provisioning/Azure.Provisioning.Redis/src/Generated/RedisCacheAccessPolicy.cs +++ b/sdk/provisioning/Azure.Provisioning.Redis/src/Generated/RedisCacheAccessPolicy.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.Redis; /// /// RedisCacheAccessPolicy. /// -public partial class RedisCacheAccessPolicy : Resource +public partial class RedisCacheAccessPolicy : ProvisionableResource { /// /// The name of the access policy that is being added to the Redis cache. @@ -63,15 +63,15 @@ public partial class RedisCacheAccessPolicy : Resource /// /// Creates a new RedisCacheAccessPolicy. /// - /// + /// /// The the Bicep identifier name of the RedisCacheAccessPolicy resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, /// numbers, and underscores. /// /// Version of the RedisCacheAccessPolicy. - public RedisCacheAccessPolicy(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Cache/redis/accessPolicies", resourceVersion ?? "2024-03-01") + public RedisCacheAccessPolicy(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Cache/redis/accessPolicies", resourceVersion ?? "2024-03-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _permissions = BicepValue.DefineProperty(this, "Permissions", ["properties", "permissions"]); @@ -87,11 +87,6 @@ public RedisCacheAccessPolicy(string identifierName, string? resourceVersion = d /// public static class ResourceVersions { - /// - /// 2024-04-01-preview. - /// - public static readonly string V2024_04_01_preview = "2024-04-01-preview"; - /// /// 2024-03-01. /// @@ -176,7 +171,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing RedisCacheAccessPolicy. /// - /// + /// /// The the Bicep identifier name of the RedisCacheAccessPolicy resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, @@ -184,6 +179,6 @@ public static class ResourceVersions /// /// Version of the RedisCacheAccessPolicy. /// The existing RedisCacheAccessPolicy resource. - public static RedisCacheAccessPolicy FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static RedisCacheAccessPolicy FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.Redis/src/Generated/RedisCacheAccessPolicyAssignment.cs b/sdk/provisioning/Azure.Provisioning.Redis/src/Generated/RedisCacheAccessPolicyAssignment.cs index 5fa485488939..c766080aa803 100644 --- a/sdk/provisioning/Azure.Provisioning.Redis/src/Generated/RedisCacheAccessPolicyAssignment.cs +++ b/sdk/provisioning/Azure.Provisioning.Redis/src/Generated/RedisCacheAccessPolicyAssignment.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.Redis; /// /// RedisCacheAccessPolicyAssignment. /// -public partial class RedisCacheAccessPolicyAssignment : Resource +public partial class RedisCacheAccessPolicyAssignment : ProvisionableResource { /// /// The name of the access policy assignment. @@ -69,15 +69,15 @@ public partial class RedisCacheAccessPolicyAssignment : Resource /// /// Creates a new RedisCacheAccessPolicyAssignment. /// - /// + /// /// The the Bicep identifier name of the RedisCacheAccessPolicyAssignment /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the RedisCacheAccessPolicyAssignment. - public RedisCacheAccessPolicyAssignment(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Cache/redis/accessPolicyAssignments", resourceVersion ?? "2024-03-01") + public RedisCacheAccessPolicyAssignment(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Cache/redis/accessPolicyAssignments", resourceVersion ?? "2024-03-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _accessPolicyName = BicepValue.DefineProperty(this, "AccessPolicyName", ["properties", "accessPolicyName"]); @@ -94,11 +94,6 @@ public RedisCacheAccessPolicyAssignment(string identifierName, string? resourceV /// public static class ResourceVersions { - /// - /// 2024-04-01-preview. - /// - public static readonly string V2024_04_01_preview = "2024-04-01-preview"; - /// /// 2024-03-01. /// @@ -183,7 +178,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing RedisCacheAccessPolicyAssignment. /// - /// + /// /// The the Bicep identifier name of the RedisCacheAccessPolicyAssignment /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -191,6 +186,6 @@ public static class ResourceVersions /// /// Version of the RedisCacheAccessPolicyAssignment. /// The existing RedisCacheAccessPolicyAssignment resource. - public static RedisCacheAccessPolicyAssignment FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static RedisCacheAccessPolicyAssignment FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.Redis/src/Generated/RedisFirewallRule.cs b/sdk/provisioning/Azure.Provisioning.Redis/src/Generated/RedisFirewallRule.cs index 75edd8c26330..4614013ad82e 100644 --- a/sdk/provisioning/Azure.Provisioning.Redis/src/Generated/RedisFirewallRule.cs +++ b/sdk/provisioning/Azure.Provisioning.Redis/src/Generated/RedisFirewallRule.cs @@ -17,7 +17,7 @@ namespace Azure.Provisioning.Redis; /// /// RedisFirewallRule. /// -public partial class RedisFirewallRule : Resource +public partial class RedisFirewallRule : ProvisionableResource { /// /// The name of the firewall rule. @@ -58,15 +58,15 @@ public partial class RedisFirewallRule : Resource /// /// Creates a new RedisFirewallRule. /// - /// + /// /// The the Bicep identifier name of the RedisFirewallRule resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, /// and underscores. /// /// Version of the RedisFirewallRule. - public RedisFirewallRule(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Cache/redis/firewallRules", resourceVersion ?? "2024-03-01") + public RedisFirewallRule(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Cache/redis/firewallRules", resourceVersion ?? "2024-03-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _endIP = BicepValue.DefineProperty(this, "EndIP", ["properties", "endIP"], isRequired: true); @@ -81,11 +81,6 @@ public RedisFirewallRule(string identifierName, string? resourceVersion = defaul /// public static class ResourceVersions { - /// - /// 2024-04-01-preview. - /// - public static readonly string V2024_04_01_preview = "2024-04-01-preview"; - /// /// 2024-03-01. /// @@ -170,7 +165,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing RedisFirewallRule. /// - /// + /// /// The the Bicep identifier name of the RedisFirewallRule resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, @@ -178,8 +173,8 @@ public static class ResourceVersions /// /// Version of the RedisFirewallRule. /// The existing RedisFirewallRule resource. - public static RedisFirewallRule FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static RedisFirewallRule FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; /// /// Get the requirements for naming this RedisFirewallRule resource. diff --git a/sdk/provisioning/Azure.Provisioning.Redis/src/Generated/RedisLinkedServerWithProperty.cs b/sdk/provisioning/Azure.Provisioning.Redis/src/Generated/RedisLinkedServerWithProperty.cs index 93ca179a3069..90b771ca0fff 100644 --- a/sdk/provisioning/Azure.Provisioning.Redis/src/Generated/RedisLinkedServerWithProperty.cs +++ b/sdk/provisioning/Azure.Provisioning.Redis/src/Generated/RedisLinkedServerWithProperty.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.Redis; /// /// RedisLinkedServerWithProperty. /// -public partial class RedisLinkedServerWithProperty : Resource +public partial class RedisLinkedServerWithProperty : ProvisionableResource { /// /// The name of the linked server that is being added to the Redis cache. @@ -83,15 +83,15 @@ public partial class RedisLinkedServerWithProperty : Resource /// /// Creates a new RedisLinkedServerWithProperty. /// - /// + /// /// The the Bicep identifier name of the RedisLinkedServerWithProperty /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the RedisLinkedServerWithProperty. - public RedisLinkedServerWithProperty(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Cache/redis/linkedServers", resourceVersion ?? "2024-03-01") + public RedisLinkedServerWithProperty(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Cache/redis/linkedServers", resourceVersion ?? "2024-03-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _linkedRedisCacheId = BicepValue.DefineProperty(this, "LinkedRedisCacheId", ["properties", "linkedRedisCacheId"], isRequired: true); @@ -110,11 +110,6 @@ public RedisLinkedServerWithProperty(string identifierName, string? resourceVers /// public static class ResourceVersions { - /// - /// 2024-04-01-preview. - /// - public static readonly string V2024_04_01_preview = "2024-04-01-preview"; - /// /// 2024-03-01. /// @@ -199,7 +194,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing RedisLinkedServerWithProperty. /// - /// + /// /// The the Bicep identifier name of the RedisLinkedServerWithProperty /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -207,6 +202,6 @@ public static class ResourceVersions /// /// Version of the RedisLinkedServerWithProperty. /// The existing RedisLinkedServerWithProperty resource. - public static RedisLinkedServerWithProperty FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static RedisLinkedServerWithProperty FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.Redis/src/Generated/RedisPatchSchedule.cs b/sdk/provisioning/Azure.Provisioning.Redis/src/Generated/RedisPatchSchedule.cs index eee751450dc6..32af1debb3d3 100644 --- a/sdk/provisioning/Azure.Provisioning.Redis/src/Generated/RedisPatchSchedule.cs +++ b/sdk/provisioning/Azure.Provisioning.Redis/src/Generated/RedisPatchSchedule.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.Redis; /// /// RedisPatchSchedule. /// -public partial class RedisPatchSchedule : Resource +public partial class RedisPatchSchedule : ProvisionableResource { /// /// Gets the Name. @@ -57,15 +57,15 @@ public partial class RedisPatchSchedule : Resource /// /// Creates a new RedisPatchSchedule. /// - /// + /// /// The the Bicep identifier name of the RedisPatchSchedule resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, /// and underscores. /// /// Version of the RedisPatchSchedule. - public RedisPatchSchedule(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Cache/redis/patchSchedules", resourceVersion ?? "2024-03-01") + public RedisPatchSchedule(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Cache/redis/patchSchedules", resourceVersion ?? "2024-03-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _scheduleEntries = BicepList.DefineProperty(this, "ScheduleEntries", ["properties", "scheduleEntries"], isRequired: true); @@ -80,11 +80,6 @@ public RedisPatchSchedule(string identifierName, string? resourceVersion = defau /// public static class ResourceVersions { - /// - /// 2024-04-01-preview. - /// - public static readonly string V2024_04_01_preview = "2024-04-01-preview"; - /// /// 2024-03-01. /// @@ -169,7 +164,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing RedisPatchSchedule. /// - /// + /// /// The the Bicep identifier name of the RedisPatchSchedule resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, @@ -177,6 +172,6 @@ public static class ResourceVersions /// /// Version of the RedisPatchSchedule. /// The existing RedisPatchSchedule resource. - public static RedisPatchSchedule FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static RedisPatchSchedule FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.Redis/src/Generated/RedisPrivateEndpointConnection.cs b/sdk/provisioning/Azure.Provisioning.Redis/src/Generated/RedisPrivateEndpointConnection.cs index 56de0a385ab8..af0f1e63163b 100644 --- a/sdk/provisioning/Azure.Provisioning.Redis/src/Generated/RedisPrivateEndpointConnection.cs +++ b/sdk/provisioning/Azure.Provisioning.Redis/src/Generated/RedisPrivateEndpointConnection.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.Redis; /// /// RedisPrivateEndpointConnection. /// -public partial class RedisPrivateEndpointConnection : Resource +public partial class RedisPrivateEndpointConnection : ProvisionableResource { /// /// The name of the private endpoint connection associated with the Azure @@ -64,15 +64,15 @@ public partial class RedisPrivateEndpointConnection : Resource /// /// Creates a new RedisPrivateEndpointConnection. /// - /// + /// /// The the Bicep identifier name of the RedisPrivateEndpointConnection /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the RedisPrivateEndpointConnection. - public RedisPrivateEndpointConnection(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Cache/redis/privateEndpointConnections", resourceVersion ?? "2024-03-01") + public RedisPrivateEndpointConnection(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Cache/redis/privateEndpointConnections", resourceVersion ?? "2024-03-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _redisPrivateLinkServiceConnectionState = BicepValue.DefineProperty(this, "RedisPrivateLinkServiceConnectionState", ["properties", "privateLinkServiceConnectionState"]); @@ -88,11 +88,6 @@ public RedisPrivateEndpointConnection(string identifierName, string? resourceVer /// public static class ResourceVersions { - /// - /// 2024-04-01-preview. - /// - public static readonly string V2024_04_01_preview = "2024-04-01-preview"; - /// /// 2024-03-01. /// @@ -142,7 +137,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing RedisPrivateEndpointConnection. /// - /// + /// /// The the Bicep identifier name of the RedisPrivateEndpointConnection /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -150,6 +145,6 @@ public static class ResourceVersions /// /// Version of the RedisPrivateEndpointConnection. /// The existing RedisPrivateEndpointConnection resource. - public static RedisPrivateEndpointConnection FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static RedisPrivateEndpointConnection FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.Redis/src/Generated/RedisResource.cs b/sdk/provisioning/Azure.Provisioning.Redis/src/Generated/RedisResource.cs index 5c99b5900c35..9ba3cd2ac140 100644 --- a/sdk/provisioning/Azure.Provisioning.Redis/src/Generated/RedisResource.cs +++ b/sdk/provisioning/Azure.Provisioning.Redis/src/Generated/RedisResource.cs @@ -21,7 +21,7 @@ namespace Azure.Provisioning.Redis; /// /// RedisResource. /// -public partial class RedisResource : Resource +public partial class RedisResource : ProvisionableResource { /// /// The name of the Redis cache. @@ -53,6 +53,13 @@ public partial class RedisResource : Resource public BicepValue Identity { get => _identity; set => _identity.Assign(value); } private readonly BicepValue _identity; + /// + /// Authentication to Redis through access keys is disabled when set as + /// true. Default value is false. + /// + public BicepValue IsAccessKeyAuthenticationDisabled { get => _isAccessKeyAuthenticationDisabled; set => _isAccessKeyAuthenticationDisabled.Assign(value); } + private readonly BicepValue _isAccessKeyAuthenticationDisabled; + /// /// Optional: requires clients to use a specified TLS version (or higher) /// to connect (e,g, '1.0', '1.1', '1.2'). @@ -71,8 +78,9 @@ public partial class RedisResource : Resource /// /// All Redis Settings. Few possible keys: - /// rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value - /// etc. + /// rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta, + /// maxmemory-policy,notify-keyspace-events, aof-backup-enabled, + /// aof-storage-connection-string-0, aof-storage-connection-string-1 etc. /// public BicepValue RedisConfiguration { get => _redisConfiguration; set => _redisConfiguration.Assign(value); } private readonly BicepValue _redisConfiguration; @@ -214,21 +222,22 @@ public partial class RedisResource : Resource /// /// Creates a new RedisResource. /// - /// + /// /// The the Bicep identifier name of the RedisResource resource. This can /// be used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and /// underscores. /// /// Version of the RedisResource. - public RedisResource(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Cache/redis", resourceVersion ?? "2024-03-01") + public RedisResource(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Cache/redis", resourceVersion ?? "2024-03-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _location = BicepValue.DefineProperty(this, "Location", ["location"], isRequired: true); _sku = BicepValue.DefineProperty(this, "Sku", ["properties", "sku"], isRequired: true); _enableNonSslPort = BicepValue.DefineProperty(this, "EnableNonSslPort", ["properties", "enableNonSslPort"]); _identity = BicepValue.DefineProperty(this, "Identity", ["identity"]); + _isAccessKeyAuthenticationDisabled = BicepValue.DefineProperty(this, "IsAccessKeyAuthenticationDisabled", ["properties", "disableAccessKeyAuthentication"]); _minimumTlsVersion = BicepValue.DefineProperty(this, "MinimumTlsVersion", ["properties", "minimumTlsVersion"]); _publicNetworkAccess = BicepValue.DefineProperty(this, "PublicNetworkAccess", ["properties", "publicNetworkAccess"]); _redisConfiguration = BicepValue.DefineProperty(this, "RedisConfiguration", ["properties", "redisConfiguration"]); @@ -259,11 +268,6 @@ public RedisResource(string identifierName, string? resourceVersion = default) /// public static class ResourceVersions { - /// - /// 2024-04-01-preview. - /// - public static readonly string V2024_04_01_preview = "2024-04-01-preview"; - /// /// 2024-03-01. /// @@ -348,7 +352,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing RedisResource. /// - /// + /// /// The the Bicep identifier name of the RedisResource resource. This can /// be used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and @@ -356,8 +360,8 @@ public static class ResourceVersions /// /// Version of the RedisResource. /// The existing RedisResource resource. - public static RedisResource FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static RedisResource FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; /// /// Get the requirements for naming this RedisResource resource. @@ -373,7 +377,7 @@ public override ResourceNameRequirements GetResourceNameRequirements() => /// The keys for this RedisResource resource. public RedisAccessKeys GetKeys() => RedisAccessKeys.FromExpression( - new FunctionCallExpression(new MemberExpression(new IdentifierExpression(IdentifierName), "listKeys"))); + new FunctionCallExpression(new MemberExpression(new IdentifierExpression(BicepIdentifier), "listKeys"))); /// /// Creates a role assignment for a user-assigned identity that grants @@ -383,10 +387,10 @@ public RedisAccessKeys GetKeys() => /// The . /// The . public RoleAssignment CreateRoleAssignment(RedisBuiltInRole role, UserAssignedIdentity identity) => - new($"{IdentifierName}_{identity.IdentifierName}_{RedisBuiltInRole.GetBuiltInRoleName(role)}") + new($"{BicepIdentifier}_{identity.BicepIdentifier}_{RedisBuiltInRole.GetBuiltInRoleName(role)}") { Name = BicepFunction.CreateGuid(Id, identity.PrincipalId, BicepFunction.GetSubscriptionResourceId("Microsoft.Authorization/roleDefinitions", role.ToString())), - Scope = new IdentifierExpression(IdentifierName), + Scope = new IdentifierExpression(BicepIdentifier), PrincipalType = RoleManagementPrincipalType.ServicePrincipal, RoleDefinitionId = BicepFunction.GetSubscriptionResourceId("Microsoft.Authorization/roleDefinitions", role.ToString()), PrincipalId = identity.PrincipalId @@ -399,13 +403,13 @@ public RoleAssignment CreateRoleAssignment(RedisBuiltInRole role, UserAssignedId /// The role to grant. /// The type of the principal to assign to. /// The principal to assign to. - /// Optional role assignment identifier name suffix. + /// Optional role assignment identifier name suffix. /// The . - public RoleAssignment CreateRoleAssignment(RedisBuiltInRole role, BicepValue principalType, BicepValue principalId, string? identifierNameSuffix = default) => - new($"{IdentifierName}_{RedisBuiltInRole.GetBuiltInRoleName(role)}{(identifierNameSuffix is null ? "" : "_")}{identifierNameSuffix}") + public RoleAssignment CreateRoleAssignment(RedisBuiltInRole role, BicepValue principalType, BicepValue principalId, string? bicepIdentifierSuffix = default) => + new($"{BicepIdentifier}_{RedisBuiltInRole.GetBuiltInRoleName(role)}{(bicepIdentifierSuffix is null ? "" : "_")}{bicepIdentifierSuffix}") { Name = BicepFunction.CreateGuid(Id, principalId, BicepFunction.GetSubscriptionResourceId("Microsoft.Authorization/roleDefinitions", role.ToString())), - Scope = new IdentifierExpression(IdentifierName), + Scope = new IdentifierExpression(BicepIdentifier), PrincipalType = principalType, RoleDefinitionId = BicepFunction.GetSubscriptionResourceId("Microsoft.Authorization/roleDefinitions", role.ToString()), PrincipalId = principalId diff --git a/sdk/provisioning/Azure.Provisioning.Search/api/Azure.Provisioning.Search.netstandard2.0.cs b/sdk/provisioning/Azure.Provisioning.Search/api/Azure.Provisioning.Search.netstandard2.0.cs index 81864730aca6..29391266d8bc 100644 --- a/sdk/provisioning/Azure.Provisioning.Search/api/Azure.Provisioning.Search.netstandard2.0.cs +++ b/sdk/provisioning/Azure.Provisioning.Search/api/Azure.Provisioning.Search.netstandard2.0.cs @@ -1,6 +1,6 @@ namespace Azure.Provisioning.Search { - public partial class SearchAadAuthDataPlaneAuthOptions : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class SearchAadAuthDataPlaneAuthOptions : Azure.Provisioning.Primitives.ProvisionableConstruct { public SearchAadAuthDataPlaneAuthOptions() { } public Azure.Provisioning.BicepValue AadAuthFailureMode { get { throw null; } set { } } @@ -48,7 +48,7 @@ public enum SearchEncryptionComplianceStatus Compliant = 0, NonCompliant = 1, } - public partial class SearchEncryptionWithCmk : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class SearchEncryptionWithCmk : Azure.Provisioning.Primitives.ProvisionableConstruct { public SearchEncryptionWithCmk() { } public Azure.Provisioning.BicepValue EncryptionComplianceStatus { get { throw null; } } @@ -60,20 +60,20 @@ public enum SearchEncryptionWithCmkEnforcement Disabled = 1, Enabled = 2, } - public partial class SearchManagementRequestOptions : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class SearchManagementRequestOptions : Azure.Provisioning.Primitives.ProvisionableConstruct { public SearchManagementRequestOptions() { } public Azure.Provisioning.BicepValue ClientRequestId { get { throw null; } set { } } } - public partial class SearchPrivateEndpointConnection : Azure.Provisioning.Primitives.Resource + public partial class SearchPrivateEndpointConnection : Azure.Provisioning.Primitives.ProvisionableResource { - public SearchPrivateEndpointConnection(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public SearchPrivateEndpointConnection(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } public Azure.Provisioning.Search.SearchService? Parent { get { throw null; } set { } } public Azure.Provisioning.BicepValue Properties { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.Search.SearchPrivateEndpointConnection FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Search.SearchPrivateEndpointConnection FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2014_07_31_Preview; @@ -91,7 +91,7 @@ public static partial class ResourceVersions public static readonly string V2024_06_01_Preview; } } - public partial class SearchPrivateEndpointConnectionData : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class SearchPrivateEndpointConnectionData : Azure.Provisioning.Primitives.ProvisionableConstruct { public SearchPrivateEndpointConnectionData() { } public Azure.Provisioning.BicepValue Id { get { throw null; } } @@ -117,9 +117,9 @@ public enum SearchSemanticSearch [System.Runtime.Serialization.DataMemberAttribute(Name="standard")] Standard = 2, } - public partial class SearchService : Azure.Provisioning.Primitives.Resource + public partial class SearchService : Azure.Provisioning.Primitives.ProvisionableResource { - public SearchService(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public SearchService(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue AuthOptions { get { throw null; } set { } } public Azure.Provisioning.BicepList DisabledDataExfiltrationOptions { get { throw null; } set { } } public Azure.Provisioning.BicepValue EncryptionWithCmk { get { throw null; } set { } } @@ -144,9 +144,9 @@ public partial class SearchService : Azure.Provisioning.Primitives.Resource public Azure.Provisioning.BicepValue StatusDetails { get { throw null; } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } - public Azure.Provisioning.Authorization.RoleAssignment CreateRoleAssignment(Azure.Provisioning.Search.SearchBuiltInRole role, Azure.Provisioning.BicepValue principalType, Azure.Provisioning.BicepValue principalId, string? identifierNameSuffix = null) { throw null; } + public Azure.Provisioning.Authorization.RoleAssignment CreateRoleAssignment(Azure.Provisioning.Search.SearchBuiltInRole role, Azure.Provisioning.BicepValue principalType, Azure.Provisioning.BicepValue principalId, string? bicepIdentifierSuffix = null) { throw null; } public Azure.Provisioning.Authorization.RoleAssignment CreateRoleAssignment(Azure.Provisioning.Search.SearchBuiltInRole role, Azure.Provisioning.Roles.UserAssignedIdentity identity) { throw null; } - public static Azure.Provisioning.Search.SearchService FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Search.SearchService FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override Azure.Provisioning.Primitives.ResourceNameRequirements GetResourceNameRequirements() { throw null; } public static partial class ResourceVersions @@ -173,18 +173,18 @@ public enum SearchServiceHostingMode [System.Runtime.Serialization.DataMemberAttribute(Name="highDensity")] HighDensity = 1, } - public partial class SearchServiceIPRule : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class SearchServiceIPRule : Azure.Provisioning.Primitives.ProvisionableConstruct { public SearchServiceIPRule() { } public Azure.Provisioning.BicepValue Value { get { throw null; } set { } } } - public partial class SearchServiceNetworkRuleSet : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class SearchServiceNetworkRuleSet : Azure.Provisioning.Primitives.ProvisionableConstruct { public SearchServiceNetworkRuleSet() { } public Azure.Provisioning.BicepValue Bypass { get { throw null; } set { } } public Azure.Provisioning.BicepList IPRules { get { throw null; } set { } } } - public partial class SearchServicePrivateEndpointConnectionProperties : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class SearchServicePrivateEndpointConnectionProperties : Azure.Provisioning.Primitives.ProvisionableConstruct { public SearchServicePrivateEndpointConnectionProperties() { } public Azure.Provisioning.BicepValue ConnectionState { get { throw null; } set { } } @@ -192,7 +192,7 @@ public SearchServicePrivateEndpointConnectionProperties() { } public Azure.Provisioning.BicepValue PrivateEndpointId { get { throw null; } set { } } public Azure.Provisioning.BicepValue ProvisioningState { get { throw null; } set { } } } - public partial class SearchServicePrivateLinkServiceConnectionState : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class SearchServicePrivateLinkServiceConnectionState : Azure.Provisioning.Primitives.ProvisionableConstruct { public SearchServicePrivateLinkServiceConnectionState() { } public Azure.Provisioning.BicepValue ActionsRequired { get { throw null; } set { } } @@ -266,15 +266,15 @@ public enum SearchServiceStatus [System.Runtime.Serialization.DataMemberAttribute(Name="error")] Error = 5, } - public partial class SharedSearchServicePrivateLink : Azure.Provisioning.Primitives.Resource + public partial class SharedSearchServicePrivateLink : Azure.Provisioning.Primitives.ProvisionableResource { - public SharedSearchServicePrivateLink(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public SharedSearchServicePrivateLink(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } public Azure.Provisioning.Search.SearchService? Parent { get { throw null; } set { } } public Azure.Provisioning.BicepValue Properties { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.Search.SharedSearchServicePrivateLink FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Search.SharedSearchServicePrivateLink FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2014_07_31_Preview; @@ -292,7 +292,7 @@ public static partial class ResourceVersions public static readonly string V2024_06_01_Preview; } } - public partial class SharedSearchServicePrivateLinkResourceData : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class SharedSearchServicePrivateLinkResourceData : Azure.Provisioning.Primitives.ProvisionableConstruct { public SharedSearchServicePrivateLinkResourceData() { } public Azure.Provisioning.BicepValue Id { get { throw null; } } @@ -300,7 +300,7 @@ public SharedSearchServicePrivateLinkResourceData() { } public Azure.Provisioning.BicepValue Properties { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } } - public partial class SharedSearchServicePrivateLinkResourceProperties : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class SharedSearchServicePrivateLinkResourceProperties : Azure.Provisioning.Primitives.ProvisionableConstruct { public SharedSearchServicePrivateLinkResourceProperties() { } public Azure.Provisioning.BicepValue GroupId { get { throw null; } set { } } diff --git a/sdk/provisioning/Azure.Provisioning.Search/src/Generated/Models/SearchAadAuthDataPlaneAuthOptions.cs b/sdk/provisioning/Azure.Provisioning.Search/src/Generated/Models/SearchAadAuthDataPlaneAuthOptions.cs index 01e4640143c7..ab6ff2483b22 100644 --- a/sdk/provisioning/Azure.Provisioning.Search/src/Generated/Models/SearchAadAuthDataPlaneAuthOptions.cs +++ b/sdk/provisioning/Azure.Provisioning.Search/src/Generated/Models/SearchAadAuthDataPlaneAuthOptions.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.Search; /// Defines the options for how the search service authenticates a data plane /// request. This cannot be set if 'disableLocalAuth' is set to true. /// -public partial class SearchAadAuthDataPlaneAuthOptions : ProvisioningConstruct +public partial class SearchAadAuthDataPlaneAuthOptions : ProvisionableConstruct { /// /// Indicates that only the API key can be used for authentication. diff --git a/sdk/provisioning/Azure.Provisioning.Search/src/Generated/Models/SearchEncryptionWithCmk.cs b/sdk/provisioning/Azure.Provisioning.Search/src/Generated/Models/SearchEncryptionWithCmk.cs index 63a8088d5976..d86cc96c69e2 100644 --- a/sdk/provisioning/Azure.Provisioning.Search/src/Generated/Models/SearchEncryptionWithCmk.cs +++ b/sdk/provisioning/Azure.Provisioning.Search/src/Generated/Models/SearchEncryptionWithCmk.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.Search; /// Describes a policy that determines how resources within the search service /// are to be encrypted with customer managed keys. /// -public partial class SearchEncryptionWithCmk : ProvisioningConstruct +public partial class SearchEncryptionWithCmk : ProvisionableConstruct { /// /// Describes how a search service should enforce compliance if it finds diff --git a/sdk/provisioning/Azure.Provisioning.Search/src/Generated/Models/SearchManagementRequestOptions.cs b/sdk/provisioning/Azure.Provisioning.Search/src/Generated/Models/SearchManagementRequestOptions.cs index 1133533d2c14..81373faa4bc7 100644 --- a/sdk/provisioning/Azure.Provisioning.Search/src/Generated/Models/SearchManagementRequestOptions.cs +++ b/sdk/provisioning/Azure.Provisioning.Search/src/Generated/Models/SearchManagementRequestOptions.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.Search; /// /// Parameter group. /// -public partial class SearchManagementRequestOptions : ProvisioningConstruct +public partial class SearchManagementRequestOptions : ProvisionableConstruct { /// /// A client-generated GUID value that identifies this request. If diff --git a/sdk/provisioning/Azure.Provisioning.Search/src/Generated/Models/SearchPrivateEndpointConnectionData.cs b/sdk/provisioning/Azure.Provisioning.Search/src/Generated/Models/SearchPrivateEndpointConnectionData.cs index 7d056c7f5d28..ccf022bc9184 100644 --- a/sdk/provisioning/Azure.Provisioning.Search/src/Generated/Models/SearchPrivateEndpointConnectionData.cs +++ b/sdk/provisioning/Azure.Provisioning.Search/src/Generated/Models/SearchPrivateEndpointConnectionData.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.Search; /// Describes an existing private endpoint connection to the Azure /// AI Search service. /// -public partial class SearchPrivateEndpointConnectionData : ProvisioningConstruct +public partial class SearchPrivateEndpointConnectionData : ProvisionableConstruct { /// /// Describes the properties of an existing private endpoint connection to diff --git a/sdk/provisioning/Azure.Provisioning.Search/src/Generated/Models/SearchServiceIPRule.cs b/sdk/provisioning/Azure.Provisioning.Search/src/Generated/Models/SearchServiceIPRule.cs index d5dfc9c9b304..29fd40cbd863 100644 --- a/sdk/provisioning/Azure.Provisioning.Search/src/Generated/Models/SearchServiceIPRule.cs +++ b/sdk/provisioning/Azure.Provisioning.Search/src/Generated/Models/SearchServiceIPRule.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.Search; /// /// The IP restriction rule of the Azure AI Search service. /// -public partial class SearchServiceIPRule : ProvisioningConstruct +public partial class SearchServiceIPRule : ProvisionableConstruct { /// /// Value corresponding to a single IPv4 address (eg., 123.1.2.3) or an IP diff --git a/sdk/provisioning/Azure.Provisioning.Search/src/Generated/Models/SearchServiceNetworkRuleSet.cs b/sdk/provisioning/Azure.Provisioning.Search/src/Generated/Models/SearchServiceNetworkRuleSet.cs index efd10b4c0158..a71dcff6c312 100644 --- a/sdk/provisioning/Azure.Provisioning.Search/src/Generated/Models/SearchServiceNetworkRuleSet.cs +++ b/sdk/provisioning/Azure.Provisioning.Search/src/Generated/Models/SearchServiceNetworkRuleSet.cs @@ -13,7 +13,7 @@ namespace Azure.Provisioning.Search; /// Network specific rules that determine how the Azure AI Search service may /// be reached. /// -public partial class SearchServiceNetworkRuleSet : ProvisioningConstruct +public partial class SearchServiceNetworkRuleSet : ProvisionableConstruct { /// /// A list of IP restriction rules that defines the inbound network(s) with diff --git a/sdk/provisioning/Azure.Provisioning.Search/src/Generated/Models/SearchServicePrivateEndpointConnectionProperties.cs b/sdk/provisioning/Azure.Provisioning.Search/src/Generated/Models/SearchServicePrivateEndpointConnectionProperties.cs index b926ad9c5453..3b4f40c2f016 100644 --- a/sdk/provisioning/Azure.Provisioning.Search/src/Generated/Models/SearchServicePrivateEndpointConnectionProperties.cs +++ b/sdk/provisioning/Azure.Provisioning.Search/src/Generated/Models/SearchServicePrivateEndpointConnectionProperties.cs @@ -13,7 +13,7 @@ namespace Azure.Provisioning.Search; /// Describes the properties of an existing private endpoint connection to the /// search service. /// -public partial class SearchServicePrivateEndpointConnectionProperties : ProvisioningConstruct +public partial class SearchServicePrivateEndpointConnectionProperties : ProvisionableConstruct { /// /// Gets or sets Id. diff --git a/sdk/provisioning/Azure.Provisioning.Search/src/Generated/Models/SearchServicePrivateLinkServiceConnectionState.cs b/sdk/provisioning/Azure.Provisioning.Search/src/Generated/Models/SearchServicePrivateLinkServiceConnectionState.cs index 59a74aafd5dd..926a091fc545 100644 --- a/sdk/provisioning/Azure.Provisioning.Search/src/Generated/Models/SearchServicePrivateLinkServiceConnectionState.cs +++ b/sdk/provisioning/Azure.Provisioning.Search/src/Generated/Models/SearchServicePrivateLinkServiceConnectionState.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.Search; /// Describes the current state of an existing Azure Private Link service /// connection to the private endpoint. /// -public partial class SearchServicePrivateLinkServiceConnectionState : ProvisioningConstruct +public partial class SearchServicePrivateLinkServiceConnectionState : ProvisionableConstruct { /// /// Status of the the private link service connection. Valid values are diff --git a/sdk/provisioning/Azure.Provisioning.Search/src/Generated/Models/SharedSearchServicePrivateLinkResourceData.cs b/sdk/provisioning/Azure.Provisioning.Search/src/Generated/Models/SharedSearchServicePrivateLinkResourceData.cs index f80b00a2eb25..cc8e9ee1c469 100644 --- a/sdk/provisioning/Azure.Provisioning.Search/src/Generated/Models/SharedSearchServicePrivateLinkResourceData.cs +++ b/sdk/provisioning/Azure.Provisioning.Search/src/Generated/Models/SharedSearchServicePrivateLinkResourceData.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.Search; /// Describes a shared private link resource managed by the Azure /// AI Search service. /// -public partial class SharedSearchServicePrivateLinkResourceData : ProvisioningConstruct +public partial class SharedSearchServicePrivateLinkResourceData : ProvisionableConstruct { /// /// Describes the properties of a shared private link resource managed by diff --git a/sdk/provisioning/Azure.Provisioning.Search/src/Generated/Models/SharedSearchServicePrivateLinkResourceProperties.cs b/sdk/provisioning/Azure.Provisioning.Search/src/Generated/Models/SharedSearchServicePrivateLinkResourceProperties.cs index 86340853b176..e7e95cf7fe3d 100644 --- a/sdk/provisioning/Azure.Provisioning.Search/src/Generated/Models/SharedSearchServicePrivateLinkResourceProperties.cs +++ b/sdk/provisioning/Azure.Provisioning.Search/src/Generated/Models/SharedSearchServicePrivateLinkResourceProperties.cs @@ -13,7 +13,7 @@ namespace Azure.Provisioning.Search; /// Describes the properties of an existing Shared Private Link Resource /// managed by the search service. /// -public partial class SharedSearchServicePrivateLinkResourceProperties : ProvisioningConstruct +public partial class SharedSearchServicePrivateLinkResourceProperties : ProvisionableConstruct { /// /// Status of the shared private link resource. Valid values are Pending, diff --git a/sdk/provisioning/Azure.Provisioning.Search/src/Generated/SearchPrivateEndpointConnection.cs b/sdk/provisioning/Azure.Provisioning.Search/src/Generated/SearchPrivateEndpointConnection.cs index 8d25aaa52e21..c05f7d064e9d 100644 --- a/sdk/provisioning/Azure.Provisioning.Search/src/Generated/SearchPrivateEndpointConnection.cs +++ b/sdk/provisioning/Azure.Provisioning.Search/src/Generated/SearchPrivateEndpointConnection.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.Search; /// /// SearchPrivateEndpointConnection. /// -public partial class SearchPrivateEndpointConnection : Resource +public partial class SearchPrivateEndpointConnection : ProvisionableResource { /// /// The name of the private endpoint connection to the Azure AI Search @@ -52,15 +52,15 @@ public partial class SearchPrivateEndpointConnection : Resource /// /// Creates a new SearchPrivateEndpointConnection. /// - /// + /// /// The the Bicep identifier name of the SearchPrivateEndpointConnection /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the SearchPrivateEndpointConnection. - public SearchPrivateEndpointConnection(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Search/searchServices/privateEndpointConnections", resourceVersion ?? "2023-11-01") + public SearchPrivateEndpointConnection(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Search/searchServices/privateEndpointConnections", resourceVersion ?? "2023-11-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _properties = BicepValue.DefineProperty(this, "Properties", ["properties"]); @@ -143,7 +143,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing SearchPrivateEndpointConnection. /// - /// + /// /// The the Bicep identifier name of the SearchPrivateEndpointConnection /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -151,6 +151,6 @@ public static class ResourceVersions /// /// Version of the SearchPrivateEndpointConnection. /// The existing SearchPrivateEndpointConnection resource. - public static SearchPrivateEndpointConnection FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static SearchPrivateEndpointConnection FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.Search/src/Generated/SearchService.cs b/sdk/provisioning/Azure.Provisioning.Search/src/Generated/SearchService.cs index 5831261a1804..f45418ade579 100644 --- a/sdk/provisioning/Azure.Provisioning.Search/src/Generated/SearchService.cs +++ b/sdk/provisioning/Azure.Provisioning.Search/src/Generated/SearchService.cs @@ -21,7 +21,7 @@ namespace Azure.Provisioning.Search; /// /// SearchService. /// -public partial class SearchService : Resource +public partial class SearchService : ProvisionableResource { /// /// The name of the Azure AI Search service to create or update. Search @@ -240,15 +240,15 @@ public partial class SearchService : Resource /// /// Creates a new SearchService. /// - /// + /// /// The the Bicep identifier name of the SearchService resource. This can /// be used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and /// underscores. /// /// Version of the SearchService. - public SearchService(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Search/searchServices", resourceVersion ?? "2023-11-01") + public SearchService(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Search/searchServices", resourceVersion ?? "2023-11-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _location = BicepValue.DefineProperty(this, "Location", ["location"], isRequired: true); @@ -350,7 +350,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing SearchService. /// - /// + /// /// The the Bicep identifier name of the SearchService resource. This can /// be used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and @@ -358,8 +358,8 @@ public static class ResourceVersions /// /// Version of the SearchService. /// The existing SearchService resource. - public static SearchService FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static SearchService FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; /// /// Get the requirements for naming this SearchService resource. @@ -377,10 +377,10 @@ public override ResourceNameRequirements GetResourceNameRequirements() => /// The . /// The . public RoleAssignment CreateRoleAssignment(SearchBuiltInRole role, UserAssignedIdentity identity) => - new($"{IdentifierName}_{identity.IdentifierName}_{SearchBuiltInRole.GetBuiltInRoleName(role)}") + new($"{BicepIdentifier}_{identity.BicepIdentifier}_{SearchBuiltInRole.GetBuiltInRoleName(role)}") { Name = BicepFunction.CreateGuid(Id, identity.PrincipalId, BicepFunction.GetSubscriptionResourceId("Microsoft.Authorization/roleDefinitions", role.ToString())), - Scope = new IdentifierExpression(IdentifierName), + Scope = new IdentifierExpression(BicepIdentifier), PrincipalType = RoleManagementPrincipalType.ServicePrincipal, RoleDefinitionId = BicepFunction.GetSubscriptionResourceId("Microsoft.Authorization/roleDefinitions", role.ToString()), PrincipalId = identity.PrincipalId @@ -393,13 +393,13 @@ public RoleAssignment CreateRoleAssignment(SearchBuiltInRole role, UserAssignedI /// The role to grant. /// The type of the principal to assign to. /// The principal to assign to. - /// Optional role assignment identifier name suffix. + /// Optional role assignment identifier name suffix. /// The . - public RoleAssignment CreateRoleAssignment(SearchBuiltInRole role, BicepValue principalType, BicepValue principalId, string? identifierNameSuffix = default) => - new($"{IdentifierName}_{SearchBuiltInRole.GetBuiltInRoleName(role)}{(identifierNameSuffix is null ? "" : "_")}{identifierNameSuffix}") + public RoleAssignment CreateRoleAssignment(SearchBuiltInRole role, BicepValue principalType, BicepValue principalId, string? bicepIdentifierSuffix = default) => + new($"{BicepIdentifier}_{SearchBuiltInRole.GetBuiltInRoleName(role)}{(bicepIdentifierSuffix is null ? "" : "_")}{bicepIdentifierSuffix}") { Name = BicepFunction.CreateGuid(Id, principalId, BicepFunction.GetSubscriptionResourceId("Microsoft.Authorization/roleDefinitions", role.ToString())), - Scope = new IdentifierExpression(IdentifierName), + Scope = new IdentifierExpression(BicepIdentifier), PrincipalType = principalType, RoleDefinitionId = BicepFunction.GetSubscriptionResourceId("Microsoft.Authorization/roleDefinitions", role.ToString()), PrincipalId = principalId diff --git a/sdk/provisioning/Azure.Provisioning.Search/src/Generated/SharedSearchServicePrivateLink.cs b/sdk/provisioning/Azure.Provisioning.Search/src/Generated/SharedSearchServicePrivateLink.cs index f10c3738258d..59e4c4410c5a 100644 --- a/sdk/provisioning/Azure.Provisioning.Search/src/Generated/SharedSearchServicePrivateLink.cs +++ b/sdk/provisioning/Azure.Provisioning.Search/src/Generated/SharedSearchServicePrivateLink.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.Search; /// /// SharedSearchServicePrivateLink. /// -public partial class SharedSearchServicePrivateLink : Resource +public partial class SharedSearchServicePrivateLink : ProvisionableResource { /// /// The name of the shared private link resource managed by the Azure AI @@ -52,15 +52,15 @@ public partial class SharedSearchServicePrivateLink : Resource /// /// Creates a new SharedSearchServicePrivateLink. /// - /// + /// /// The the Bicep identifier name of the SharedSearchServicePrivateLink /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the SharedSearchServicePrivateLink. - public SharedSearchServicePrivateLink(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Search/searchServices/sharedPrivateLinkResources", resourceVersion ?? "2023-11-01") + public SharedSearchServicePrivateLink(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Search/searchServices/sharedPrivateLinkResources", resourceVersion ?? "2023-11-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _properties = BicepValue.DefineProperty(this, "Properties", ["properties"]); @@ -143,7 +143,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing SharedSearchServicePrivateLink. /// - /// + /// /// The the Bicep identifier name of the SharedSearchServicePrivateLink /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -151,6 +151,6 @@ public static class ResourceVersions /// /// Version of the SharedSearchServicePrivateLink. /// The existing SharedSearchServicePrivateLink resource. - public static SharedSearchServicePrivateLink FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static SharedSearchServicePrivateLink FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.ServiceBus/api/Azure.Provisioning.ServiceBus.netstandard2.0.cs b/sdk/provisioning/Azure.Provisioning.ServiceBus/api/Azure.Provisioning.ServiceBus.netstandard2.0.cs index 0fabe71c856c..0448ed9b4be0 100644 --- a/sdk/provisioning/Azure.Provisioning.ServiceBus/api/Azure.Provisioning.ServiceBus.netstandard2.0.cs +++ b/sdk/provisioning/Azure.Provisioning.ServiceBus/api/Azure.Provisioning.ServiceBus.netstandard2.0.cs @@ -1,6 +1,6 @@ namespace Azure.Provisioning.ServiceBus { - public partial class MessageCountDetails : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class MessageCountDetails : Azure.Provisioning.Primitives.ProvisionableConstruct { public MessageCountDetails() { } public Azure.Provisioning.BicepValue ActiveMessageCount { get { throw null; } } @@ -9,9 +9,9 @@ public MessageCountDetails() { } public Azure.Provisioning.BicepValue TransferDeadLetterMessageCount { get { throw null; } } public Azure.Provisioning.BicepValue TransferMessageCount { get { throw null; } } } - public partial class MigrationConfiguration : Azure.Provisioning.Primitives.Resource + public partial class MigrationConfiguration : Azure.Provisioning.Primitives.ProvisionableResource { - public MigrationConfiguration(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public MigrationConfiguration(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Location { get { throw null; } } public Azure.Provisioning.BicepValue MigrationState { get { throw null; } } @@ -21,7 +21,7 @@ public partial class MigrationConfiguration : Azure.Provisioning.Primitives.Reso public Azure.Provisioning.BicepValue ProvisioningState { get { throw null; } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepValue TargetServiceBusNamespace { get { throw null; } set { } } - public static Azure.Provisioning.ServiceBus.MigrationConfiguration FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.ServiceBus.MigrationConfiguration FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2017_04_01; @@ -34,7 +34,7 @@ public enum MigrationConfigurationName [System.Runtime.Serialization.DataMemberAttribute(Name="$default")] Default = 0, } - public partial class ServiceBusAccessKeys : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ServiceBusAccessKeys : Azure.Provisioning.Primitives.ProvisionableConstruct { public ServiceBusAccessKeys() { } public Azure.Provisioning.BicepValue AliasPrimaryConnectionString { get { throw null; } } @@ -45,7 +45,7 @@ public ServiceBusAccessKeys() { } public Azure.Provisioning.BicepValue SecondaryConnectionString { get { throw null; } } public Azure.Provisioning.BicepValue SecondaryKey { get { throw null; } } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public static Azure.Provisioning.ServiceBus.ServiceBusAccessKeys FromExpression(Azure.Provisioning.Expressions.Expression expression) { throw null; } + public static Azure.Provisioning.ServiceBus.ServiceBusAccessKeys FromExpression(Azure.Provisioning.Expressions.BicepExpression expression) { throw null; } } public enum ServiceBusAccessRight { @@ -74,14 +74,14 @@ public enum ServiceBusAccessRight public static bool operator !=(Azure.Provisioning.ServiceBus.ServiceBusBuiltInRole left, Azure.Provisioning.ServiceBus.ServiceBusBuiltInRole right) { throw null; } public override string ToString() { throw null; } } - public partial class ServiceBusClientAffineProperties : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ServiceBusClientAffineProperties : Azure.Provisioning.Primitives.ProvisionableConstruct { public ServiceBusClientAffineProperties() { } public Azure.Provisioning.BicepValue ClientId { get { throw null; } set { } } public Azure.Provisioning.BicepValue IsDurable { get { throw null; } set { } } public Azure.Provisioning.BicepValue IsShared { get { throw null; } set { } } } - public partial class ServiceBusCorrelationFilter : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ServiceBusCorrelationFilter : Azure.Provisioning.Primitives.ProvisionableConstruct { public ServiceBusCorrelationFilter() { } public Azure.Provisioning.BicepDictionary ApplicationProperties { get { throw null; } set { } } @@ -95,9 +95,9 @@ public ServiceBusCorrelationFilter() { } public Azure.Provisioning.BicepValue SessionId { get { throw null; } set { } } public Azure.Provisioning.BicepValue Subject { get { throw null; } set { } } } - public partial class ServiceBusDisasterRecovery : Azure.Provisioning.Primitives.Resource + public partial class ServiceBusDisasterRecovery : Azure.Provisioning.Primitives.ProvisionableResource { - public ServiceBusDisasterRecovery(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public ServiceBusDisasterRecovery(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue AlternateName { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Location { get { throw null; } } @@ -108,7 +108,7 @@ public partial class ServiceBusDisasterRecovery : Azure.Provisioning.Primitives. public Azure.Provisioning.BicepValue ProvisioningState { get { throw null; } } public Azure.Provisioning.BicepValue Role { get { throw null; } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.ServiceBus.ServiceBusDisasterRecovery FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.ServiceBus.ServiceBusDisasterRecovery FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override Azure.Provisioning.Primitives.ResourceNameRequirements GetResourceNameRequirements() { throw null; } public static partial class ResourceVersions @@ -130,7 +130,7 @@ public enum ServiceBusDisasterRecoveryRole PrimaryNotReplicating = 1, Secondary = 2, } - public partial class ServiceBusEncryption : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ServiceBusEncryption : Azure.Provisioning.Primitives.ProvisionableConstruct { public ServiceBusEncryption() { } public Azure.Provisioning.BicepValue KeySource { get { throw null; } set { } } @@ -142,7 +142,7 @@ public enum ServiceBusEncryptionKeySource [System.Runtime.Serialization.DataMemberAttribute(Name="Microsoft.KeyVault")] MicrosoftKeyVault = 0, } - public partial class ServiceBusFilterAction : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ServiceBusFilterAction : Azure.Provisioning.Primitives.ProvisionableConstruct { public ServiceBusFilterAction() { } public Azure.Provisioning.BicepValue CompatibilityLevel { get { throw null; } set { } } @@ -154,7 +154,7 @@ public enum ServiceBusFilterType SqlFilter = 0, CorrelationFilter = 1, } - public partial class ServiceBusKeyVaultProperties : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ServiceBusKeyVaultProperties : Azure.Provisioning.Primitives.ProvisionableConstruct { public ServiceBusKeyVaultProperties() { } public Azure.Provisioning.BicepValue KeyName { get { throw null; } set { } } @@ -183,9 +183,9 @@ public enum ServiceBusMinimumTlsVersion [System.Runtime.Serialization.DataMemberAttribute(Name="1.2")] Tls1_2 = 2, } - public partial class ServiceBusNamespace : Azure.Provisioning.Primitives.Resource + public partial class ServiceBusNamespace : Azure.Provisioning.Primitives.ProvisionableResource { - public ServiceBusNamespace(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public ServiceBusNamespace(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue AlternateName { get { throw null; } set { } } public Azure.Provisioning.BicepValue CreatedOn { get { throw null; } } public Azure.Provisioning.BicepValue DisableLocalAuth { get { throw null; } set { } } @@ -207,9 +207,9 @@ public partial class ServiceBusNamespace : Azure.Provisioning.Primitives.Resourc public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } public Azure.Provisioning.BicepValue UpdatedOn { get { throw null; } } - public Azure.Provisioning.Authorization.RoleAssignment CreateRoleAssignment(Azure.Provisioning.ServiceBus.ServiceBusBuiltInRole role, Azure.Provisioning.BicepValue principalType, Azure.Provisioning.BicepValue principalId, string? identifierNameSuffix = null) { throw null; } + public Azure.Provisioning.Authorization.RoleAssignment CreateRoleAssignment(Azure.Provisioning.ServiceBus.ServiceBusBuiltInRole role, Azure.Provisioning.BicepValue principalType, Azure.Provisioning.BicepValue principalId, string? bicepIdentifierSuffix = null) { throw null; } public Azure.Provisioning.Authorization.RoleAssignment CreateRoleAssignment(Azure.Provisioning.ServiceBus.ServiceBusBuiltInRole role, Azure.Provisioning.Roles.UserAssignedIdentity identity) { throw null; } - public static Azure.Provisioning.ServiceBus.ServiceBusNamespace FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.ServiceBus.ServiceBusNamespace FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override Azure.Provisioning.Primitives.ResourceNameRequirements GetResourceNameRequirements() { throw null; } public static partial class ResourceVersions @@ -221,16 +221,16 @@ public static partial class ResourceVersions public static readonly string V2024_01_01; } } - public partial class ServiceBusNamespaceAuthorizationRule : Azure.Provisioning.Primitives.Resource + public partial class ServiceBusNamespaceAuthorizationRule : Azure.Provisioning.Primitives.ProvisionableResource { - public ServiceBusNamespaceAuthorizationRule(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public ServiceBusNamespaceAuthorizationRule(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Location { get { throw null; } } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } public Azure.Provisioning.ServiceBus.ServiceBusNamespace? Parent { get { throw null; } set { } } public Azure.Provisioning.BicepList Rights { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.ServiceBus.ServiceBusNamespaceAuthorizationRule FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.ServiceBus.ServiceBusNamespaceAuthorizationRule FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public Azure.Provisioning.ServiceBus.ServiceBusAccessKeys GetKeys() { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override Azure.Provisioning.Primitives.ResourceNameRequirements GetResourceNameRequirements() { throw null; } @@ -245,9 +245,9 @@ public enum ServiceBusNetworkRuleIPAction { Allow = 0, } - public partial class ServiceBusNetworkRuleSet : Azure.Provisioning.Primitives.Resource + public partial class ServiceBusNetworkRuleSet : Azure.Provisioning.Primitives.ProvisionableResource { - public ServiceBusNetworkRuleSet(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public ServiceBusNetworkRuleSet(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue DefaultAction { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepList IPRules { get { throw null; } set { } } @@ -258,7 +258,7 @@ public partial class ServiceBusNetworkRuleSet : Azure.Provisioning.Primitives.Re public Azure.Provisioning.BicepValue PublicNetworkAccess { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepList VirtualNetworkRules { get { throw null; } set { } } - public static Azure.Provisioning.ServiceBus.ServiceBusNetworkRuleSet FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.ServiceBus.ServiceBusNetworkRuleSet FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2017_04_01; @@ -271,21 +271,21 @@ public enum ServiceBusNetworkRuleSetDefaultAction Allow = 0, Deny = 1, } - public partial class ServiceBusNetworkRuleSetIPRules : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ServiceBusNetworkRuleSetIPRules : Azure.Provisioning.Primitives.ProvisionableConstruct { public ServiceBusNetworkRuleSetIPRules() { } public Azure.Provisioning.BicepValue Action { get { throw null; } set { } } public Azure.Provisioning.BicepValue IPMask { get { throw null; } set { } } } - public partial class ServiceBusNetworkRuleSetVirtualNetworkRules : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ServiceBusNetworkRuleSetVirtualNetworkRules : Azure.Provisioning.Primitives.ProvisionableConstruct { public ServiceBusNetworkRuleSetVirtualNetworkRules() { } public Azure.Provisioning.BicepValue IgnoreMissingVnetServiceEndpoint { get { throw null; } set { } } public Azure.Provisioning.BicepValue SubnetId { get { throw null; } set { } } } - public partial class ServiceBusPrivateEndpointConnection : Azure.Provisioning.Primitives.Resource + public partial class ServiceBusPrivateEndpointConnection : Azure.Provisioning.Primitives.ProvisionableResource { - public ServiceBusPrivateEndpointConnection(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public ServiceBusPrivateEndpointConnection(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue ConnectionState { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Location { get { throw null; } } @@ -294,14 +294,14 @@ public partial class ServiceBusPrivateEndpointConnection : Azure.Provisioning.Pr public Azure.Provisioning.BicepValue PrivateEndpointId { get { throw null; } set { } } public Azure.Provisioning.BicepValue ProvisioningState { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.ServiceBus.ServiceBusPrivateEndpointConnection FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.ServiceBus.ServiceBusPrivateEndpointConnection FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2021_11_01; public static readonly string V2024_01_01; } } - public partial class ServiceBusPrivateEndpointConnectionData : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ServiceBusPrivateEndpointConnectionData : Azure.Provisioning.Primitives.ProvisionableConstruct { public ServiceBusPrivateEndpointConnectionData() { } public Azure.Provisioning.BicepValue ConnectionState { get { throw null; } set { } } @@ -328,7 +328,7 @@ public enum ServiceBusPrivateLinkConnectionStatus Rejected = 2, Disconnected = 3, } - public partial class ServiceBusPrivateLinkServiceConnectionState : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ServiceBusPrivateLinkServiceConnectionState : Azure.Provisioning.Primitives.ProvisionableConstruct { public ServiceBusPrivateLinkServiceConnectionState() { } public Azure.Provisioning.BicepValue Description { get { throw null; } set { } } @@ -345,9 +345,9 @@ public enum ServiceBusPublicNetworkAccessFlag Enabled = 0, Disabled = 1, } - public partial class ServiceBusQueue : Azure.Provisioning.Primitives.Resource + public partial class ServiceBusQueue : Azure.Provisioning.Primitives.ProvisionableResource { - public ServiceBusQueue(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public ServiceBusQueue(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue AccessedOn { get { throw null; } } public Azure.Provisioning.BicepValue AutoDeleteOnIdle { get { throw null; } set { } } public Azure.Provisioning.BicepValue CountDetails { get { throw null; } } @@ -375,7 +375,7 @@ public partial class ServiceBusQueue : Azure.Provisioning.Primitives.Resource public Azure.Provisioning.BicepValue Status { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepValue UpdatedOn { get { throw null; } } - public static Azure.Provisioning.ServiceBus.ServiceBusQueue FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.ServiceBus.ServiceBusQueue FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override Azure.Provisioning.Primitives.ResourceNameRequirements GetResourceNameRequirements() { throw null; } public static partial class ResourceVersions @@ -385,16 +385,16 @@ public static partial class ResourceVersions public static readonly string V2024_01_01; } } - public partial class ServiceBusQueueAuthorizationRule : Azure.Provisioning.Primitives.Resource + public partial class ServiceBusQueueAuthorizationRule : Azure.Provisioning.Primitives.ProvisionableResource { - public ServiceBusQueueAuthorizationRule(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public ServiceBusQueueAuthorizationRule(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Location { get { throw null; } } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } public Azure.Provisioning.ServiceBus.ServiceBusQueue? Parent { get { throw null; } set { } } public Azure.Provisioning.BicepList Rights { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.ServiceBus.ServiceBusQueueAuthorizationRule FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.ServiceBus.ServiceBusQueueAuthorizationRule FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public Azure.Provisioning.ServiceBus.ServiceBusAccessKeys GetKeys() { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override Azure.Provisioning.Primitives.ResourceNameRequirements GetResourceNameRequirements() { throw null; } @@ -405,9 +405,9 @@ public static partial class ResourceVersions public static readonly string V2024_01_01; } } - public partial class ServiceBusRule : Azure.Provisioning.Primitives.Resource + public partial class ServiceBusRule : Azure.Provisioning.Primitives.ProvisionableResource { - public ServiceBusRule(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public ServiceBusRule(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Action { get { throw null; } set { } } public Azure.Provisioning.BicepValue CorrelationFilter { get { throw null; } set { } } public Azure.Provisioning.BicepValue FilterType { get { throw null; } set { } } @@ -417,7 +417,7 @@ public partial class ServiceBusRule : Azure.Provisioning.Primitives.Resource public Azure.Provisioning.ServiceBus.ServiceBusSubscription? Parent { get { throw null; } set { } } public Azure.Provisioning.BicepValue SqlFilter { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.ServiceBus.ServiceBusRule FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.ServiceBus.ServiceBusRule FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2017_04_01; @@ -425,7 +425,7 @@ public static partial class ResourceVersions public static readonly string V2024_01_01; } } - public partial class ServiceBusSku : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ServiceBusSku : Azure.Provisioning.Primitives.ProvisionableConstruct { public ServiceBusSku() { } public Azure.Provisioning.BicepValue Capacity { get { throw null; } set { } } @@ -444,16 +444,16 @@ public enum ServiceBusSkuTier Standard = 1, Premium = 2, } - public partial class ServiceBusSqlFilter : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ServiceBusSqlFilter : Azure.Provisioning.Primitives.ProvisionableConstruct { public ServiceBusSqlFilter() { } public Azure.Provisioning.BicepValue CompatibilityLevel { get { throw null; } set { } } public Azure.Provisioning.BicepValue RequiresPreprocessing { get { throw null; } set { } } public Azure.Provisioning.BicepValue SqlExpression { get { throw null; } set { } } } - public partial class ServiceBusSubscription : Azure.Provisioning.Primitives.Resource + public partial class ServiceBusSubscription : Azure.Provisioning.Primitives.ProvisionableResource { - public ServiceBusSubscription(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public ServiceBusSubscription(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue AccessedOn { get { throw null; } } public Azure.Provisioning.BicepValue AutoDeleteOnIdle { get { throw null; } set { } } public Azure.Provisioning.BicepValue ClientAffineProperties { get { throw null; } set { } } @@ -478,7 +478,7 @@ public partial class ServiceBusSubscription : Azure.Provisioning.Primitives.Reso public Azure.Provisioning.BicepValue Status { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepValue UpdatedOn { get { throw null; } } - public static Azure.Provisioning.ServiceBus.ServiceBusSubscription FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.ServiceBus.ServiceBusSubscription FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override Azure.Provisioning.Primitives.ResourceNameRequirements GetResourceNameRequirements() { throw null; } public static partial class ResourceVersions @@ -488,9 +488,9 @@ public static partial class ResourceVersions public static readonly string V2024_01_01; } } - public partial class ServiceBusTopic : Azure.Provisioning.Primitives.Resource + public partial class ServiceBusTopic : Azure.Provisioning.Primitives.ProvisionableResource { - public ServiceBusTopic(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public ServiceBusTopic(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue AccessedOn { get { throw null; } } public Azure.Provisioning.BicepValue AutoDeleteOnIdle { get { throw null; } set { } } public Azure.Provisioning.BicepValue CountDetails { get { throw null; } } @@ -513,7 +513,7 @@ public partial class ServiceBusTopic : Azure.Provisioning.Primitives.Resource public Azure.Provisioning.BicepValue SupportOrdering { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepValue UpdatedOn { get { throw null; } } - public static Azure.Provisioning.ServiceBus.ServiceBusTopic FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.ServiceBus.ServiceBusTopic FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override Azure.Provisioning.Primitives.ResourceNameRequirements GetResourceNameRequirements() { throw null; } public static partial class ResourceVersions @@ -523,16 +523,16 @@ public static partial class ResourceVersions public static readonly string V2024_01_01; } } - public partial class ServiceBusTopicAuthorizationRule : Azure.Provisioning.Primitives.Resource + public partial class ServiceBusTopicAuthorizationRule : Azure.Provisioning.Primitives.ProvisionableResource { - public ServiceBusTopicAuthorizationRule(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public ServiceBusTopicAuthorizationRule(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Location { get { throw null; } } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } public Azure.Provisioning.ServiceBus.ServiceBusTopic? Parent { get { throw null; } set { } } public Azure.Provisioning.BicepList Rights { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.ServiceBus.ServiceBusTopicAuthorizationRule FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.ServiceBus.ServiceBusTopicAuthorizationRule FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public Azure.Provisioning.ServiceBus.ServiceBusAccessKeys GetKeys() { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override Azure.Provisioning.Primitives.ResourceNameRequirements GetResourceNameRequirements() { throw null; } diff --git a/sdk/provisioning/Azure.Provisioning.ServiceBus/src/Generated/MigrationConfiguration.cs b/sdk/provisioning/Azure.Provisioning.ServiceBus/src/Generated/MigrationConfiguration.cs index f7ed38c74238..65045f6927d4 100644 --- a/sdk/provisioning/Azure.Provisioning.ServiceBus/src/Generated/MigrationConfiguration.cs +++ b/sdk/provisioning/Azure.Provisioning.ServiceBus/src/Generated/MigrationConfiguration.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.ServiceBus; /// /// MigrationConfiguration. /// -public partial class MigrationConfiguration : Resource +public partial class MigrationConfiguration : ProvisionableResource { private readonly BicepValue _name; @@ -83,15 +83,15 @@ public partial class MigrationConfiguration : Resource /// /// Creates a new MigrationConfiguration. /// - /// + /// /// The the Bicep identifier name of the MigrationConfiguration resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, /// numbers, and underscores. /// /// Version of the MigrationConfiguration. - public MigrationConfiguration(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.ServiceBus/namespaces/migrationConfigurations", resourceVersion ?? "2024-01-01") + public MigrationConfiguration(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.ServiceBus/namespaces/migrationConfigurations", resourceVersion ?? "2024-01-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true, defaultValue: GetNameDefaultValue()); _postMigrationName = BicepValue.DefineProperty(this, "PostMigrationName", ["properties", "postMigrationName"]); @@ -129,7 +129,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing MigrationConfiguration. /// - /// + /// /// The the Bicep identifier name of the MigrationConfiguration resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, @@ -137,6 +137,6 @@ public static class ResourceVersions /// /// Version of the MigrationConfiguration. /// The existing MigrationConfiguration resource. - public static MigrationConfiguration FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static MigrationConfiguration FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.ServiceBus/src/Generated/Models/MessageCountDetails.cs b/sdk/provisioning/Azure.Provisioning.ServiceBus/src/Generated/Models/MessageCountDetails.cs index e451f6044c06..913d028eb635 100644 --- a/sdk/provisioning/Azure.Provisioning.ServiceBus/src/Generated/Models/MessageCountDetails.cs +++ b/sdk/provisioning/Azure.Provisioning.ServiceBus/src/Generated/Models/MessageCountDetails.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.ServiceBus; /// /// Message Count Details. /// -public partial class MessageCountDetails : ProvisioningConstruct +public partial class MessageCountDetails : ProvisionableConstruct { /// /// Number of active messages in the queue, topic, or subscription. diff --git a/sdk/provisioning/Azure.Provisioning.ServiceBus/src/Generated/Models/ServiceBusAccessKeys.cs b/sdk/provisioning/Azure.Provisioning.ServiceBus/src/Generated/Models/ServiceBusAccessKeys.cs index aceeb42147ac..6a90bbbf5526 100644 --- a/sdk/provisioning/Azure.Provisioning.ServiceBus/src/Generated/Models/ServiceBusAccessKeys.cs +++ b/sdk/provisioning/Azure.Provisioning.ServiceBus/src/Generated/Models/ServiceBusAccessKeys.cs @@ -13,7 +13,7 @@ namespace Azure.Provisioning.ServiceBus; /// /// Namespace/ServiceBus Connection String. /// -public partial class ServiceBusAccessKeys : ProvisioningConstruct +public partial class ServiceBusAccessKeys : ProvisionableConstruct { /// /// Primary connection string of the created namespace authorization rule. @@ -82,7 +82,7 @@ public ServiceBusAccessKeys() /// /// A ServiceBusAccessKeys resource. [EditorBrowsable(EditorBrowsableState.Never)] - public static ServiceBusAccessKeys FromExpression(Expression expression) + public static ServiceBusAccessKeys FromExpression(BicepExpression expression) { ServiceBusAccessKeys resource = new(); resource.OverrideWithExpression(expression); diff --git a/sdk/provisioning/Azure.Provisioning.ServiceBus/src/Generated/Models/ServiceBusClientAffineProperties.cs b/sdk/provisioning/Azure.Provisioning.ServiceBus/src/Generated/Models/ServiceBusClientAffineProperties.cs index 97ae6f3f1b58..72580f1bcc67 100644 --- a/sdk/provisioning/Azure.Provisioning.ServiceBus/src/Generated/Models/ServiceBusClientAffineProperties.cs +++ b/sdk/provisioning/Azure.Provisioning.ServiceBus/src/Generated/Models/ServiceBusClientAffineProperties.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.ServiceBus; /// /// Properties specific to client affine subscriptions. /// -public partial class ServiceBusClientAffineProperties : ProvisioningConstruct +public partial class ServiceBusClientAffineProperties : ProvisionableConstruct { /// /// Indicates the Client ID of the application that created the diff --git a/sdk/provisioning/Azure.Provisioning.ServiceBus/src/Generated/Models/ServiceBusCorrelationFilter.cs b/sdk/provisioning/Azure.Provisioning.ServiceBus/src/Generated/Models/ServiceBusCorrelationFilter.cs index 00cc92d61077..080775748344 100644 --- a/sdk/provisioning/Azure.Provisioning.ServiceBus/src/Generated/Models/ServiceBusCorrelationFilter.cs +++ b/sdk/provisioning/Azure.Provisioning.ServiceBus/src/Generated/Models/ServiceBusCorrelationFilter.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.ServiceBus; /// /// Represents the correlation filter expression. /// -public partial class ServiceBusCorrelationFilter : ProvisioningConstruct +public partial class ServiceBusCorrelationFilter : ProvisionableConstruct { /// /// dictionary object for custom filters. diff --git a/sdk/provisioning/Azure.Provisioning.ServiceBus/src/Generated/Models/ServiceBusEncryption.cs b/sdk/provisioning/Azure.Provisioning.ServiceBus/src/Generated/Models/ServiceBusEncryption.cs index a84ac81bb936..7403a6c9e813 100644 --- a/sdk/provisioning/Azure.Provisioning.ServiceBus/src/Generated/Models/ServiceBusEncryption.cs +++ b/sdk/provisioning/Azure.Provisioning.ServiceBus/src/Generated/Models/ServiceBusEncryption.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.ServiceBus; /// /// Properties to configure Encryption. /// -public partial class ServiceBusEncryption : ProvisioningConstruct +public partial class ServiceBusEncryption : ProvisionableConstruct { /// /// Properties of KeyVault. diff --git a/sdk/provisioning/Azure.Provisioning.ServiceBus/src/Generated/Models/ServiceBusFilterAction.cs b/sdk/provisioning/Azure.Provisioning.ServiceBus/src/Generated/Models/ServiceBusFilterAction.cs index 3b7124b4e199..4b1328ed6f88 100644 --- a/sdk/provisioning/Azure.Provisioning.ServiceBus/src/Generated/Models/ServiceBusFilterAction.cs +++ b/sdk/provisioning/Azure.Provisioning.ServiceBus/src/Generated/Models/ServiceBusFilterAction.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.ServiceBus; /// Represents the filter actions which are allowed for the transformation of a /// message that have been matched by a filter expression. /// -public partial class ServiceBusFilterAction : ProvisioningConstruct +public partial class ServiceBusFilterAction : ProvisionableConstruct { /// /// SQL expression. e.g. MyProperty='ABC'. diff --git a/sdk/provisioning/Azure.Provisioning.ServiceBus/src/Generated/Models/ServiceBusKeyVaultProperties.cs b/sdk/provisioning/Azure.Provisioning.ServiceBus/src/Generated/Models/ServiceBusKeyVaultProperties.cs index 053bc9f8f58d..31b290d75d14 100644 --- a/sdk/provisioning/Azure.Provisioning.ServiceBus/src/Generated/Models/ServiceBusKeyVaultProperties.cs +++ b/sdk/provisioning/Azure.Provisioning.ServiceBus/src/Generated/Models/ServiceBusKeyVaultProperties.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.ServiceBus; /// /// Properties to configure keyVault Properties. /// -public partial class ServiceBusKeyVaultProperties : ProvisioningConstruct +public partial class ServiceBusKeyVaultProperties : ProvisionableConstruct { /// /// Name of the Key from KeyVault. diff --git a/sdk/provisioning/Azure.Provisioning.ServiceBus/src/Generated/Models/ServiceBusNetworkRuleSetIPRules.cs b/sdk/provisioning/Azure.Provisioning.ServiceBus/src/Generated/Models/ServiceBusNetworkRuleSetIPRules.cs index 970226691026..04388ad2fea2 100644 --- a/sdk/provisioning/Azure.Provisioning.ServiceBus/src/Generated/Models/ServiceBusNetworkRuleSetIPRules.cs +++ b/sdk/provisioning/Azure.Provisioning.ServiceBus/src/Generated/Models/ServiceBusNetworkRuleSetIPRules.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.ServiceBus; /// /// Description of NetWorkRuleSet - IpRules resource. /// -public partial class ServiceBusNetworkRuleSetIPRules : ProvisioningConstruct +public partial class ServiceBusNetworkRuleSetIPRules : ProvisionableConstruct { /// /// IP Mask. diff --git a/sdk/provisioning/Azure.Provisioning.ServiceBus/src/Generated/Models/ServiceBusNetworkRuleSetVirtualNetworkRules.cs b/sdk/provisioning/Azure.Provisioning.ServiceBus/src/Generated/Models/ServiceBusNetworkRuleSetVirtualNetworkRules.cs index 452ce742ecdd..5c802a17ff3f 100644 --- a/sdk/provisioning/Azure.Provisioning.ServiceBus/src/Generated/Models/ServiceBusNetworkRuleSetVirtualNetworkRules.cs +++ b/sdk/provisioning/Azure.Provisioning.ServiceBus/src/Generated/Models/ServiceBusNetworkRuleSetVirtualNetworkRules.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.ServiceBus; /// /// Description of VirtualNetworkRules - NetworkRules resource. /// -public partial class ServiceBusNetworkRuleSetVirtualNetworkRules : ProvisioningConstruct +public partial class ServiceBusNetworkRuleSetVirtualNetworkRules : ProvisionableConstruct { /// /// Gets or sets Id. diff --git a/sdk/provisioning/Azure.Provisioning.ServiceBus/src/Generated/Models/ServiceBusPrivateEndpointConnectionData.cs b/sdk/provisioning/Azure.Provisioning.ServiceBus/src/Generated/Models/ServiceBusPrivateEndpointConnectionData.cs index 4cd016692610..20b79cb8eb49 100644 --- a/sdk/provisioning/Azure.Provisioning.ServiceBus/src/Generated/Models/ServiceBusPrivateEndpointConnectionData.cs +++ b/sdk/provisioning/Azure.Provisioning.ServiceBus/src/Generated/Models/ServiceBusPrivateEndpointConnectionData.cs @@ -14,7 +14,7 @@ namespace Azure.Provisioning.ServiceBus; /// A class representing the ServiceBusPrivateEndpointConnection data model. /// Properties of the PrivateEndpointConnection. /// -public partial class ServiceBusPrivateEndpointConnectionData : ProvisioningConstruct +public partial class ServiceBusPrivateEndpointConnectionData : ProvisionableConstruct { /// /// Gets or sets Id. diff --git a/sdk/provisioning/Azure.Provisioning.ServiceBus/src/Generated/Models/ServiceBusPrivateLinkServiceConnectionState.cs b/sdk/provisioning/Azure.Provisioning.ServiceBus/src/Generated/Models/ServiceBusPrivateLinkServiceConnectionState.cs index 3c957ca0960b..f0b18e3b6a00 100644 --- a/sdk/provisioning/Azure.Provisioning.ServiceBus/src/Generated/Models/ServiceBusPrivateLinkServiceConnectionState.cs +++ b/sdk/provisioning/Azure.Provisioning.ServiceBus/src/Generated/Models/ServiceBusPrivateLinkServiceConnectionState.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.ServiceBus; /// /// ConnectionState information. /// -public partial class ServiceBusPrivateLinkServiceConnectionState : ProvisioningConstruct +public partial class ServiceBusPrivateLinkServiceConnectionState : ProvisionableConstruct { /// /// Status of the connection. diff --git a/sdk/provisioning/Azure.Provisioning.ServiceBus/src/Generated/Models/ServiceBusSku.cs b/sdk/provisioning/Azure.Provisioning.ServiceBus/src/Generated/Models/ServiceBusSku.cs index 44907483fd5b..1bbd3b0d84a0 100644 --- a/sdk/provisioning/Azure.Provisioning.ServiceBus/src/Generated/Models/ServiceBusSku.cs +++ b/sdk/provisioning/Azure.Provisioning.ServiceBus/src/Generated/Models/ServiceBusSku.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.ServiceBus; /// /// SKU of the namespace. /// -public partial class ServiceBusSku : ProvisioningConstruct +public partial class ServiceBusSku : ProvisionableConstruct { /// /// Name of this SKU. diff --git a/sdk/provisioning/Azure.Provisioning.ServiceBus/src/Generated/Models/ServiceBusSqlFilter.cs b/sdk/provisioning/Azure.Provisioning.ServiceBus/src/Generated/Models/ServiceBusSqlFilter.cs index 609284cec191..5ed64b4525de 100644 --- a/sdk/provisioning/Azure.Provisioning.ServiceBus/src/Generated/Models/ServiceBusSqlFilter.cs +++ b/sdk/provisioning/Azure.Provisioning.ServiceBus/src/Generated/Models/ServiceBusSqlFilter.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.ServiceBus; /// Represents a filter which is a composition of an expression and an action /// that is executed in the pub/sub pipeline. /// -public partial class ServiceBusSqlFilter : ProvisioningConstruct +public partial class ServiceBusSqlFilter : ProvisionableConstruct { /// /// The SQL expression. e.g. MyProperty='ABC'. diff --git a/sdk/provisioning/Azure.Provisioning.ServiceBus/src/Generated/ServiceBusDisasterRecovery.cs b/sdk/provisioning/Azure.Provisioning.ServiceBus/src/Generated/ServiceBusDisasterRecovery.cs index 9df5b691db08..69a999d2235b 100644 --- a/sdk/provisioning/Azure.Provisioning.ServiceBus/src/Generated/ServiceBusDisasterRecovery.cs +++ b/sdk/provisioning/Azure.Provisioning.ServiceBus/src/Generated/ServiceBusDisasterRecovery.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.ServiceBus; /// /// ServiceBusDisasterRecovery. /// -public partial class ServiceBusDisasterRecovery : Resource +public partial class ServiceBusDisasterRecovery : ProvisionableResource { /// /// Gets the Name. @@ -86,15 +86,15 @@ public partial class ServiceBusDisasterRecovery : Resource /// /// Creates a new ServiceBusDisasterRecovery. /// - /// + /// /// The the Bicep identifier name of the ServiceBusDisasterRecovery /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the ServiceBusDisasterRecovery. - public ServiceBusDisasterRecovery(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.ServiceBus/namespaces/disasterRecoveryConfigs", resourceVersion ?? "2024-01-01") + public ServiceBusDisasterRecovery(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.ServiceBus/namespaces/disasterRecoveryConfigs", resourceVersion ?? "2024-01-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _alternateName = BicepValue.DefineProperty(this, "AlternateName", ["properties", "alternateName"]); @@ -132,7 +132,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing ServiceBusDisasterRecovery. /// - /// + /// /// The the Bicep identifier name of the ServiceBusDisasterRecovery /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -140,8 +140,8 @@ public static class ResourceVersions /// /// Version of the ServiceBusDisasterRecovery. /// The existing ServiceBusDisasterRecovery resource. - public static ServiceBusDisasterRecovery FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static ServiceBusDisasterRecovery FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; /// /// Get the requirements for naming this ServiceBusDisasterRecovery diff --git a/sdk/provisioning/Azure.Provisioning.ServiceBus/src/Generated/ServiceBusNamespace.cs b/sdk/provisioning/Azure.Provisioning.ServiceBus/src/Generated/ServiceBusNamespace.cs index e26b0b6b6551..5a0f43575b82 100644 --- a/sdk/provisioning/Azure.Provisioning.ServiceBus/src/Generated/ServiceBusNamespace.cs +++ b/sdk/provisioning/Azure.Provisioning.ServiceBus/src/Generated/ServiceBusNamespace.cs @@ -20,7 +20,7 @@ namespace Azure.Provisioning.ServiceBus; /// /// ServiceBusNamespace. /// -public partial class ServiceBusNamespace : Resource +public partial class ServiceBusNamespace : ProvisionableResource { /// /// The namespace name. @@ -156,15 +156,15 @@ public partial class ServiceBusNamespace : Resource /// /// Creates a new ServiceBusNamespace. /// - /// + /// /// The the Bicep identifier name of the ServiceBusNamespace resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, /// numbers, and underscores. /// /// Version of the ServiceBusNamespace. - public ServiceBusNamespace(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.ServiceBus/namespaces", resourceVersion ?? "2024-01-01") + public ServiceBusNamespace(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.ServiceBus/namespaces", resourceVersion ?? "2024-01-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _location = BicepValue.DefineProperty(this, "Location", ["location"], isRequired: true); @@ -223,7 +223,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing ServiceBusNamespace. /// - /// + /// /// The the Bicep identifier name of the ServiceBusNamespace resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, @@ -231,8 +231,8 @@ public static class ResourceVersions /// /// Version of the ServiceBusNamespace. /// The existing ServiceBusNamespace resource. - public static ServiceBusNamespace FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static ServiceBusNamespace FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; /// /// Get the requirements for naming this ServiceBusNamespace resource. @@ -250,10 +250,10 @@ public override ResourceNameRequirements GetResourceNameRequirements() => /// The . /// The . public RoleAssignment CreateRoleAssignment(ServiceBusBuiltInRole role, UserAssignedIdentity identity) => - new($"{IdentifierName}_{identity.IdentifierName}_{ServiceBusBuiltInRole.GetBuiltInRoleName(role)}") + new($"{BicepIdentifier}_{identity.BicepIdentifier}_{ServiceBusBuiltInRole.GetBuiltInRoleName(role)}") { Name = BicepFunction.CreateGuid(Id, identity.PrincipalId, BicepFunction.GetSubscriptionResourceId("Microsoft.Authorization/roleDefinitions", role.ToString())), - Scope = new IdentifierExpression(IdentifierName), + Scope = new IdentifierExpression(BicepIdentifier), PrincipalType = RoleManagementPrincipalType.ServicePrincipal, RoleDefinitionId = BicepFunction.GetSubscriptionResourceId("Microsoft.Authorization/roleDefinitions", role.ToString()), PrincipalId = identity.PrincipalId @@ -266,13 +266,13 @@ public RoleAssignment CreateRoleAssignment(ServiceBusBuiltInRole role, UserAssig /// The role to grant. /// The type of the principal to assign to. /// The principal to assign to. - /// Optional role assignment identifier name suffix. + /// Optional role assignment identifier name suffix. /// The . - public RoleAssignment CreateRoleAssignment(ServiceBusBuiltInRole role, BicepValue principalType, BicepValue principalId, string? identifierNameSuffix = default) => - new($"{IdentifierName}_{ServiceBusBuiltInRole.GetBuiltInRoleName(role)}{(identifierNameSuffix is null ? "" : "_")}{identifierNameSuffix}") + public RoleAssignment CreateRoleAssignment(ServiceBusBuiltInRole role, BicepValue principalType, BicepValue principalId, string? bicepIdentifierSuffix = default) => + new($"{BicepIdentifier}_{ServiceBusBuiltInRole.GetBuiltInRoleName(role)}{(bicepIdentifierSuffix is null ? "" : "_")}{bicepIdentifierSuffix}") { Name = BicepFunction.CreateGuid(Id, principalId, BicepFunction.GetSubscriptionResourceId("Microsoft.Authorization/roleDefinitions", role.ToString())), - Scope = new IdentifierExpression(IdentifierName), + Scope = new IdentifierExpression(BicepIdentifier), PrincipalType = principalType, RoleDefinitionId = BicepFunction.GetSubscriptionResourceId("Microsoft.Authorization/roleDefinitions", role.ToString()), PrincipalId = principalId diff --git a/sdk/provisioning/Azure.Provisioning.ServiceBus/src/Generated/ServiceBusNamespaceAuthorizationRule.cs b/sdk/provisioning/Azure.Provisioning.ServiceBus/src/Generated/ServiceBusNamespaceAuthorizationRule.cs index 7de1e436422a..dafb8e1dc555 100644 --- a/sdk/provisioning/Azure.Provisioning.ServiceBus/src/Generated/ServiceBusNamespaceAuthorizationRule.cs +++ b/sdk/provisioning/Azure.Provisioning.ServiceBus/src/Generated/ServiceBusNamespaceAuthorizationRule.cs @@ -18,7 +18,7 @@ namespace Azure.Provisioning.ServiceBus; /// /// ServiceBusNamespaceAuthorizationRule. /// -public partial class ServiceBusNamespaceAuthorizationRule : Resource +public partial class ServiceBusNamespaceAuthorizationRule : ProvisionableResource { /// /// The authorization rule name. @@ -59,15 +59,15 @@ public partial class ServiceBusNamespaceAuthorizationRule : Resource /// /// Creates a new ServiceBusNamespaceAuthorizationRule. /// - /// + /// /// The the Bicep identifier name of the /// ServiceBusNamespaceAuthorizationRule resource. This can be used to /// refer to the resource in expressions, but is not the Azure name of the /// resource. This value can contain letters, numbers, and underscores. /// /// Version of the ServiceBusNamespaceAuthorizationRule. - public ServiceBusNamespaceAuthorizationRule(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.ServiceBus/namespaces/AuthorizationRules", resourceVersion ?? "2024-01-01") + public ServiceBusNamespaceAuthorizationRule(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.ServiceBus/namespaces/AuthorizationRules", resourceVersion ?? "2024-01-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _rights = BicepList.DefineProperty(this, "Rights", ["properties", "rights"]); @@ -101,7 +101,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing ServiceBusNamespaceAuthorizationRule. /// - /// + /// /// The the Bicep identifier name of the /// ServiceBusNamespaceAuthorizationRule resource. This can be used to /// refer to the resource in expressions, but is not the Azure name of the @@ -109,8 +109,8 @@ public static class ResourceVersions /// /// Version of the ServiceBusNamespaceAuthorizationRule. /// The existing ServiceBusNamespaceAuthorizationRule resource. - public static ServiceBusNamespaceAuthorizationRule FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static ServiceBusNamespaceAuthorizationRule FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; /// /// Get the requirements for naming this @@ -127,5 +127,5 @@ public override ResourceNameRequirements GetResourceNameRequirements() => /// The keys for this ServiceBusNamespaceAuthorizationRule resource. public ServiceBusAccessKeys GetKeys() => ServiceBusAccessKeys.FromExpression( - new FunctionCallExpression(new MemberExpression(new IdentifierExpression(IdentifierName), "listKeys"))); + new FunctionCallExpression(new MemberExpression(new IdentifierExpression(BicepIdentifier), "listKeys"))); } diff --git a/sdk/provisioning/Azure.Provisioning.ServiceBus/src/Generated/ServiceBusNetworkRuleSet.cs b/sdk/provisioning/Azure.Provisioning.ServiceBus/src/Generated/ServiceBusNetworkRuleSet.cs index 509b9117ebe9..4afbd6cee1dd 100644 --- a/sdk/provisioning/Azure.Provisioning.ServiceBus/src/Generated/ServiceBusNetworkRuleSet.cs +++ b/sdk/provisioning/Azure.Provisioning.ServiceBus/src/Generated/ServiceBusNetworkRuleSet.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.ServiceBus; /// /// ServiceBusNetworkRuleSet. /// -public partial class ServiceBusNetworkRuleSet : Resource +public partial class ServiceBusNetworkRuleSet : ProvisionableResource { /// /// Gets the Name. @@ -82,15 +82,15 @@ public partial class ServiceBusNetworkRuleSet : Resource /// /// Creates a new ServiceBusNetworkRuleSet. /// - /// + /// /// The the Bicep identifier name of the ServiceBusNetworkRuleSet resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, /// numbers, and underscores. /// /// Version of the ServiceBusNetworkRuleSet. - public ServiceBusNetworkRuleSet(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.ServiceBus/namespaces/networkRuleSets", resourceVersion ?? "2024-01-01") + public ServiceBusNetworkRuleSet(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.ServiceBus/namespaces/networkRuleSets", resourceVersion ?? "2024-01-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _defaultAction = BicepValue.DefineProperty(this, "DefaultAction", ["properties", "defaultAction"]); @@ -128,7 +128,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing ServiceBusNetworkRuleSet. /// - /// + /// /// The the Bicep identifier name of the ServiceBusNetworkRuleSet resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, @@ -136,6 +136,6 @@ public static class ResourceVersions /// /// Version of the ServiceBusNetworkRuleSet. /// The existing ServiceBusNetworkRuleSet resource. - public static ServiceBusNetworkRuleSet FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static ServiceBusNetworkRuleSet FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.ServiceBus/src/Generated/ServiceBusPrivateEndpointConnection.cs b/sdk/provisioning/Azure.Provisioning.ServiceBus/src/Generated/ServiceBusPrivateEndpointConnection.cs index 47d03d49688f..45752ffe8b33 100644 --- a/sdk/provisioning/Azure.Provisioning.ServiceBus/src/Generated/ServiceBusPrivateEndpointConnection.cs +++ b/sdk/provisioning/Azure.Provisioning.ServiceBus/src/Generated/ServiceBusPrivateEndpointConnection.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.ServiceBus; /// /// ServiceBusPrivateEndpointConnection. /// -public partial class ServiceBusPrivateEndpointConnection : Resource +public partial class ServiceBusPrivateEndpointConnection : ProvisionableResource { /// /// The PrivateEndpointConnection name. @@ -68,15 +68,15 @@ public partial class ServiceBusPrivateEndpointConnection : Resource /// /// Creates a new ServiceBusPrivateEndpointConnection. /// - /// + /// /// The the Bicep identifier name of the /// ServiceBusPrivateEndpointConnection resource. This can be used to /// refer to the resource in expressions, but is not the Azure name of the /// resource. This value can contain letters, numbers, and underscores. /// /// Version of the ServiceBusPrivateEndpointConnection. - public ServiceBusPrivateEndpointConnection(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.ServiceBus/namespaces/privateEndpointConnections", resourceVersion ?? "2024-01-01") + public ServiceBusPrivateEndpointConnection(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.ServiceBus/namespaces/privateEndpointConnections", resourceVersion ?? "2024-01-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _connectionState = BicepValue.DefineProperty(this, "ConnectionState", ["properties", "privateLinkServiceConnectionState"]); @@ -107,7 +107,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing ServiceBusPrivateEndpointConnection. /// - /// + /// /// The the Bicep identifier name of the /// ServiceBusPrivateEndpointConnection resource. This can be used to /// refer to the resource in expressions, but is not the Azure name of the @@ -115,6 +115,6 @@ public static class ResourceVersions /// /// Version of the ServiceBusPrivateEndpointConnection. /// The existing ServiceBusPrivateEndpointConnection resource. - public static ServiceBusPrivateEndpointConnection FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static ServiceBusPrivateEndpointConnection FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.ServiceBus/src/Generated/ServiceBusQueue.cs b/sdk/provisioning/Azure.Provisioning.ServiceBus/src/Generated/ServiceBusQueue.cs index 8f931411073f..24adb1e001d5 100644 --- a/sdk/provisioning/Azure.Provisioning.ServiceBus/src/Generated/ServiceBusQueue.cs +++ b/sdk/provisioning/Azure.Provisioning.ServiceBus/src/Generated/ServiceBusQueue.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.ServiceBus; /// /// ServiceBusQueue. /// -public partial class ServiceBusQueue : Resource +public partial class ServiceBusQueue : ProvisionableResource { /// /// The queue name. @@ -199,27 +199,27 @@ public partial class ServiceBusQueue : Resource /// /// Creates a new ServiceBusQueue. /// - /// + /// /// The the Bicep identifier name of the ServiceBusQueue resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, /// and underscores. /// /// Version of the ServiceBusQueue. - public ServiceBusQueue(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.ServiceBus/namespaces/queues", resourceVersion ?? "2024-01-01") + public ServiceBusQueue(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.ServiceBus/namespaces/queues", resourceVersion ?? "2024-01-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); - _autoDeleteOnIdle = BicepValue.DefineProperty(this, "AutoDeleteOnIdle", ["properties", "autoDeleteOnIdle"]); + _autoDeleteOnIdle = BicepValue.DefineProperty(this, "AutoDeleteOnIdle", ["properties", "autoDeleteOnIdle"], format: "P"); _deadLetteringOnMessageExpiration = BicepValue.DefineProperty(this, "DeadLetteringOnMessageExpiration", ["properties", "deadLetteringOnMessageExpiration"]); - _defaultMessageTimeToLive = BicepValue.DefineProperty(this, "DefaultMessageTimeToLive", ["properties", "defaultMessageTimeToLive"]); - _duplicateDetectionHistoryTimeWindow = BicepValue.DefineProperty(this, "DuplicateDetectionHistoryTimeWindow", ["properties", "duplicateDetectionHistoryTimeWindow"]); + _defaultMessageTimeToLive = BicepValue.DefineProperty(this, "DefaultMessageTimeToLive", ["properties", "defaultMessageTimeToLive"], format: "P"); + _duplicateDetectionHistoryTimeWindow = BicepValue.DefineProperty(this, "DuplicateDetectionHistoryTimeWindow", ["properties", "duplicateDetectionHistoryTimeWindow"], format: "P"); _enableBatchedOperations = BicepValue.DefineProperty(this, "EnableBatchedOperations", ["properties", "enableBatchedOperations"]); _enableExpress = BicepValue.DefineProperty(this, "EnableExpress", ["properties", "enableExpress"]); _enablePartitioning = BicepValue.DefineProperty(this, "EnablePartitioning", ["properties", "enablePartitioning"]); _forwardDeadLetteredMessagesTo = BicepValue.DefineProperty(this, "ForwardDeadLetteredMessagesTo", ["properties", "forwardDeadLetteredMessagesTo"]); _forwardTo = BicepValue.DefineProperty(this, "ForwardTo", ["properties", "forwardTo"]); - _lockDuration = BicepValue.DefineProperty(this, "LockDuration", ["properties", "lockDuration"]); + _lockDuration = BicepValue.DefineProperty(this, "LockDuration", ["properties", "lockDuration"], format: "P"); _maxDeliveryCount = BicepValue.DefineProperty(this, "MaxDeliveryCount", ["properties", "maxDeliveryCount"]); _maxMessageSizeInKilobytes = BicepValue.DefineProperty(this, "MaxMessageSizeInKilobytes", ["properties", "maxMessageSizeInKilobytes"]); _maxSizeInMegabytes = BicepValue.DefineProperty(this, "MaxSizeInMegabytes", ["properties", "maxSizeInMegabytes"]); @@ -262,7 +262,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing ServiceBusQueue. /// - /// + /// /// The the Bicep identifier name of the ServiceBusQueue resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, @@ -270,8 +270,8 @@ public static class ResourceVersions /// /// Version of the ServiceBusQueue. /// The existing ServiceBusQueue resource. - public static ServiceBusQueue FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static ServiceBusQueue FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; /// /// Get the requirements for naming this ServiceBusQueue resource. diff --git a/sdk/provisioning/Azure.Provisioning.ServiceBus/src/Generated/ServiceBusQueueAuthorizationRule.cs b/sdk/provisioning/Azure.Provisioning.ServiceBus/src/Generated/ServiceBusQueueAuthorizationRule.cs index 19d9f3debcd7..937d9ef2b016 100644 --- a/sdk/provisioning/Azure.Provisioning.ServiceBus/src/Generated/ServiceBusQueueAuthorizationRule.cs +++ b/sdk/provisioning/Azure.Provisioning.ServiceBus/src/Generated/ServiceBusQueueAuthorizationRule.cs @@ -18,7 +18,7 @@ namespace Azure.Provisioning.ServiceBus; /// /// ServiceBusQueueAuthorizationRule. /// -public partial class ServiceBusQueueAuthorizationRule : Resource +public partial class ServiceBusQueueAuthorizationRule : ProvisionableResource { /// /// The authorization rule name. @@ -59,15 +59,15 @@ public partial class ServiceBusQueueAuthorizationRule : Resource /// /// Creates a new ServiceBusQueueAuthorizationRule. /// - /// + /// /// The the Bicep identifier name of the ServiceBusQueueAuthorizationRule /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the ServiceBusQueueAuthorizationRule. - public ServiceBusQueueAuthorizationRule(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.ServiceBus/namespaces/queues/authorizationRules", resourceVersion ?? "2024-01-01") + public ServiceBusQueueAuthorizationRule(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.ServiceBus/namespaces/queues/authorizationRules", resourceVersion ?? "2024-01-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _rights = BicepList.DefineProperty(this, "Rights", ["properties", "rights"]); @@ -101,7 +101,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing ServiceBusQueueAuthorizationRule. /// - /// + /// /// The the Bicep identifier name of the ServiceBusQueueAuthorizationRule /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -109,8 +109,8 @@ public static class ResourceVersions /// /// Version of the ServiceBusQueueAuthorizationRule. /// The existing ServiceBusQueueAuthorizationRule resource. - public static ServiceBusQueueAuthorizationRule FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static ServiceBusQueueAuthorizationRule FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; /// /// Get the requirements for naming this ServiceBusQueueAuthorizationRule @@ -127,5 +127,5 @@ public override ResourceNameRequirements GetResourceNameRequirements() => /// The keys for this ServiceBusQueueAuthorizationRule resource. public ServiceBusAccessKeys GetKeys() => ServiceBusAccessKeys.FromExpression( - new FunctionCallExpression(new MemberExpression(new IdentifierExpression(IdentifierName), "listKeys"))); + new FunctionCallExpression(new MemberExpression(new IdentifierExpression(BicepIdentifier), "listKeys"))); } diff --git a/sdk/provisioning/Azure.Provisioning.ServiceBus/src/Generated/ServiceBusRule.cs b/sdk/provisioning/Azure.Provisioning.ServiceBus/src/Generated/ServiceBusRule.cs index b78ef7d20395..935ac080fca2 100644 --- a/sdk/provisioning/Azure.Provisioning.ServiceBus/src/Generated/ServiceBusRule.cs +++ b/sdk/provisioning/Azure.Provisioning.ServiceBus/src/Generated/ServiceBusRule.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.ServiceBus; /// /// ServiceBusRule. /// -public partial class ServiceBusRule : Resource +public partial class ServiceBusRule : ProvisionableResource { /// /// The rule name. @@ -76,15 +76,15 @@ public partial class ServiceBusRule : Resource /// /// Creates a new ServiceBusRule. /// - /// + /// /// The the Bicep identifier name of the ServiceBusRule resource. This can /// be used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and /// underscores. /// /// Version of the ServiceBusRule. - public ServiceBusRule(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.ServiceBus/namespaces/topics/subscriptions/rules", resourceVersion ?? "2024-01-01") + public ServiceBusRule(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.ServiceBus/namespaces/topics/subscriptions/rules", resourceVersion ?? "2024-01-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _action = BicepValue.DefineProperty(this, "Action", ["properties", "action"]); @@ -121,7 +121,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing ServiceBusRule. /// - /// + /// /// The the Bicep identifier name of the ServiceBusRule resource. This can /// be used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and @@ -129,6 +129,6 @@ public static class ResourceVersions /// /// Version of the ServiceBusRule. /// The existing ServiceBusRule resource. - public static ServiceBusRule FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static ServiceBusRule FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.ServiceBus/src/Generated/ServiceBusSubscription.cs b/sdk/provisioning/Azure.Provisioning.ServiceBus/src/Generated/ServiceBusSubscription.cs index e00478b645d6..fbc9a8a9a739 100644 --- a/sdk/provisioning/Azure.Provisioning.ServiceBus/src/Generated/ServiceBusSubscription.cs +++ b/sdk/provisioning/Azure.Provisioning.ServiceBus/src/Generated/ServiceBusSubscription.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.ServiceBus; /// /// ServiceBusSubscription. /// -public partial class ServiceBusSubscription : Resource +public partial class ServiceBusSubscription : ProvisionableResource { /// /// The subscription name. @@ -174,28 +174,28 @@ public partial class ServiceBusSubscription : Resource /// /// Creates a new ServiceBusSubscription. /// - /// + /// /// The the Bicep identifier name of the ServiceBusSubscription resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, /// numbers, and underscores. /// /// Version of the ServiceBusSubscription. - public ServiceBusSubscription(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.ServiceBus/namespaces/topics/subscriptions", resourceVersion ?? "2024-01-01") + public ServiceBusSubscription(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.ServiceBus/namespaces/topics/subscriptions", resourceVersion ?? "2024-01-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); - _autoDeleteOnIdle = BicepValue.DefineProperty(this, "AutoDeleteOnIdle", ["properties", "autoDeleteOnIdle"]); + _autoDeleteOnIdle = BicepValue.DefineProperty(this, "AutoDeleteOnIdle", ["properties", "autoDeleteOnIdle"], format: "P"); _clientAffineProperties = BicepValue.DefineProperty(this, "ClientAffineProperties", ["properties", "clientAffineProperties"]); _deadLetteringOnFilterEvaluationExceptions = BicepValue.DefineProperty(this, "DeadLetteringOnFilterEvaluationExceptions", ["properties", "deadLetteringOnFilterEvaluationExceptions"]); _deadLetteringOnMessageExpiration = BicepValue.DefineProperty(this, "DeadLetteringOnMessageExpiration", ["properties", "deadLetteringOnMessageExpiration"]); - _defaultMessageTimeToLive = BicepValue.DefineProperty(this, "DefaultMessageTimeToLive", ["properties", "defaultMessageTimeToLive"]); - _duplicateDetectionHistoryTimeWindow = BicepValue.DefineProperty(this, "DuplicateDetectionHistoryTimeWindow", ["properties", "duplicateDetectionHistoryTimeWindow"]); + _defaultMessageTimeToLive = BicepValue.DefineProperty(this, "DefaultMessageTimeToLive", ["properties", "defaultMessageTimeToLive"], format: "P"); + _duplicateDetectionHistoryTimeWindow = BicepValue.DefineProperty(this, "DuplicateDetectionHistoryTimeWindow", ["properties", "duplicateDetectionHistoryTimeWindow"], format: "P"); _enableBatchedOperations = BicepValue.DefineProperty(this, "EnableBatchedOperations", ["properties", "enableBatchedOperations"]); _forwardDeadLetteredMessagesTo = BicepValue.DefineProperty(this, "ForwardDeadLetteredMessagesTo", ["properties", "forwardDeadLetteredMessagesTo"]); _forwardTo = BicepValue.DefineProperty(this, "ForwardTo", ["properties", "forwardTo"]); _isClientAffine = BicepValue.DefineProperty(this, "IsClientAffine", ["properties", "isClientAffine"]); - _lockDuration = BicepValue.DefineProperty(this, "LockDuration", ["properties", "lockDuration"]); + _lockDuration = BicepValue.DefineProperty(this, "LockDuration", ["properties", "lockDuration"], format: "P"); _maxDeliveryCount = BicepValue.DefineProperty(this, "MaxDeliveryCount", ["properties", "maxDeliveryCount"]); _requiresSession = BicepValue.DefineProperty(this, "RequiresSession", ["properties", "requiresSession"]); _status = BicepValue.DefineProperty(this, "Status", ["properties", "status"]); @@ -234,7 +234,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing ServiceBusSubscription. /// - /// + /// /// The the Bicep identifier name of the ServiceBusSubscription resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, @@ -242,8 +242,8 @@ public static class ResourceVersions /// /// Version of the ServiceBusSubscription. /// The existing ServiceBusSubscription resource. - public static ServiceBusSubscription FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static ServiceBusSubscription FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; /// /// Get the requirements for naming this ServiceBusSubscription resource. diff --git a/sdk/provisioning/Azure.Provisioning.ServiceBus/src/Generated/ServiceBusTopic.cs b/sdk/provisioning/Azure.Provisioning.ServiceBus/src/Generated/ServiceBusTopic.cs index 3706b7308625..f84a2ff42952 100644 --- a/sdk/provisioning/Azure.Provisioning.ServiceBus/src/Generated/ServiceBusTopic.cs +++ b/sdk/provisioning/Azure.Provisioning.ServiceBus/src/Generated/ServiceBusTopic.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.ServiceBus; /// /// ServiceBusTopic. /// -public partial class ServiceBusTopic : Resource +public partial class ServiceBusTopic : ProvisionableResource { /// /// The topic name. @@ -164,20 +164,20 @@ public partial class ServiceBusTopic : Resource /// /// Creates a new ServiceBusTopic. /// - /// + /// /// The the Bicep identifier name of the ServiceBusTopic resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, /// and underscores. /// /// Version of the ServiceBusTopic. - public ServiceBusTopic(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.ServiceBus/namespaces/topics", resourceVersion ?? "2024-01-01") + public ServiceBusTopic(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.ServiceBus/namespaces/topics", resourceVersion ?? "2024-01-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); - _autoDeleteOnIdle = BicepValue.DefineProperty(this, "AutoDeleteOnIdle", ["properties", "autoDeleteOnIdle"]); - _defaultMessageTimeToLive = BicepValue.DefineProperty(this, "DefaultMessageTimeToLive", ["properties", "defaultMessageTimeToLive"]); - _duplicateDetectionHistoryTimeWindow = BicepValue.DefineProperty(this, "DuplicateDetectionHistoryTimeWindow", ["properties", "duplicateDetectionHistoryTimeWindow"]); + _autoDeleteOnIdle = BicepValue.DefineProperty(this, "AutoDeleteOnIdle", ["properties", "autoDeleteOnIdle"], format: "P"); + _defaultMessageTimeToLive = BicepValue.DefineProperty(this, "DefaultMessageTimeToLive", ["properties", "defaultMessageTimeToLive"], format: "P"); + _duplicateDetectionHistoryTimeWindow = BicepValue.DefineProperty(this, "DuplicateDetectionHistoryTimeWindow", ["properties", "duplicateDetectionHistoryTimeWindow"], format: "P"); _enableBatchedOperations = BicepValue.DefineProperty(this, "EnableBatchedOperations", ["properties", "enableBatchedOperations"]); _enableExpress = BicepValue.DefineProperty(this, "EnableExpress", ["properties", "enableExpress"]); _enablePartitioning = BicepValue.DefineProperty(this, "EnablePartitioning", ["properties", "enablePartitioning"]); @@ -222,7 +222,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing ServiceBusTopic. /// - /// + /// /// The the Bicep identifier name of the ServiceBusTopic resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, @@ -230,8 +230,8 @@ public static class ResourceVersions /// /// Version of the ServiceBusTopic. /// The existing ServiceBusTopic resource. - public static ServiceBusTopic FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static ServiceBusTopic FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; /// /// Get the requirements for naming this ServiceBusTopic resource. diff --git a/sdk/provisioning/Azure.Provisioning.ServiceBus/src/Generated/ServiceBusTopicAuthorizationRule.cs b/sdk/provisioning/Azure.Provisioning.ServiceBus/src/Generated/ServiceBusTopicAuthorizationRule.cs index 5c5a783c785f..fe1c34fccc1b 100644 --- a/sdk/provisioning/Azure.Provisioning.ServiceBus/src/Generated/ServiceBusTopicAuthorizationRule.cs +++ b/sdk/provisioning/Azure.Provisioning.ServiceBus/src/Generated/ServiceBusTopicAuthorizationRule.cs @@ -18,7 +18,7 @@ namespace Azure.Provisioning.ServiceBus; /// /// ServiceBusTopicAuthorizationRule. /// -public partial class ServiceBusTopicAuthorizationRule : Resource +public partial class ServiceBusTopicAuthorizationRule : ProvisionableResource { /// /// The authorization rule name. @@ -59,15 +59,15 @@ public partial class ServiceBusTopicAuthorizationRule : Resource /// /// Creates a new ServiceBusTopicAuthorizationRule. /// - /// + /// /// The the Bicep identifier name of the ServiceBusTopicAuthorizationRule /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the ServiceBusTopicAuthorizationRule. - public ServiceBusTopicAuthorizationRule(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.ServiceBus/namespaces/topics/authorizationRules", resourceVersion ?? "2024-01-01") + public ServiceBusTopicAuthorizationRule(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.ServiceBus/namespaces/topics/authorizationRules", resourceVersion ?? "2024-01-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _rights = BicepList.DefineProperty(this, "Rights", ["properties", "rights"]); @@ -101,7 +101,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing ServiceBusTopicAuthorizationRule. /// - /// + /// /// The the Bicep identifier name of the ServiceBusTopicAuthorizationRule /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -109,8 +109,8 @@ public static class ResourceVersions /// /// Version of the ServiceBusTopicAuthorizationRule. /// The existing ServiceBusTopicAuthorizationRule resource. - public static ServiceBusTopicAuthorizationRule FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static ServiceBusTopicAuthorizationRule FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; /// /// Get the requirements for naming this ServiceBusTopicAuthorizationRule @@ -127,5 +127,5 @@ public override ResourceNameRequirements GetResourceNameRequirements() => /// The keys for this ServiceBusTopicAuthorizationRule resource. public ServiceBusAccessKeys GetKeys() => ServiceBusAccessKeys.FromExpression( - new FunctionCallExpression(new MemberExpression(new IdentifierExpression(IdentifierName), "listKeys"))); + new FunctionCallExpression(new MemberExpression(new IdentifierExpression(BicepIdentifier), "listKeys"))); } diff --git a/sdk/provisioning/Azure.Provisioning.ServiceBus/src/MigrationConfiguration.cs b/sdk/provisioning/Azure.Provisioning.ServiceBus/src/MigrationConfiguration.cs index c167588d0d2d..75ab94fd5eb9 100644 --- a/sdk/provisioning/Azure.Provisioning.ServiceBus/src/MigrationConfiguration.cs +++ b/sdk/provisioning/Azure.Provisioning.ServiceBus/src/MigrationConfiguration.cs @@ -9,5 +9,5 @@ namespace Azure.Provisioning.ServiceBus; public partial class MigrationConfiguration { private partial BicepValue GetNameDefaultValue() => - new StringLiteral("$default"); + new StringLiteralExpression("$default"); } diff --git a/sdk/provisioning/Azure.Provisioning.ServiceBus/tests/BasicServiceBusTests.cs b/sdk/provisioning/Azure.Provisioning.ServiceBus/tests/BasicServiceBusTests.cs index 932e6fb20dba..c06d8d24f0d1 100644 --- a/sdk/provisioning/Azure.Provisioning.ServiceBus/tests/BasicServiceBusTests.cs +++ b/sdk/provisioning/Azure.Provisioning.ServiceBus/tests/BasicServiceBusTests.cs @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. +using System; using System.Threading.Tasks; using Azure.Core.TestFramework; using Azure.Provisioning.Expressions; @@ -42,18 +43,15 @@ await test.Define( { Parent = sb, Name = queueName, - // Hack around TimeSpan not serializing ISO durations - // correctly using a Bicep string literal expression. - // TODO: Change these to regular strings when patched. - LockDuration = new StringLiteral("PT5M"), + LockDuration = TimeSpan.FromMinutes(5), MaxSizeInMegabytes = 1024, RequiresDuplicateDetection = false, RequiresSession = false, - DefaultMessageTimeToLive = new StringLiteral("P10675199DT2H48M5.4775807S"), + DefaultMessageTimeToLive = TimeSpan.MaxValue, DeadLetteringOnMessageExpiration = false, - DuplicateDetectionHistoryTimeWindow = new StringLiteral("PT10M"), + DuplicateDetectionHistoryTimeWindow = TimeSpan.FromMinutes(10), MaxDeliveryCount = 10, - AutoDeleteOnIdle = new StringLiteral("P10675199DT2H48M5.4775807S"), + AutoDeleteOnIdle = TimeSpan.MaxValue, EnablePartitioning = false, EnableExpress = false }; diff --git a/sdk/provisioning/Azure.Provisioning.SignalR/api/Azure.Provisioning.SignalR.netstandard2.0.cs b/sdk/provisioning/Azure.Provisioning.SignalR/api/Azure.Provisioning.SignalR.netstandard2.0.cs index 245c2279ff8e..184132f3930b 100644 --- a/sdk/provisioning/Azure.Provisioning.SignalR/api/Azure.Provisioning.SignalR.netstandard2.0.cs +++ b/sdk/provisioning/Azure.Provisioning.SignalR/api/Azure.Provisioning.SignalR.netstandard2.0.cs @@ -31,9 +31,9 @@ public enum PrivateLinkServiceConnectionStatus public static bool operator !=(Azure.Provisioning.SignalR.SignalRBuiltInRole left, Azure.Provisioning.SignalR.SignalRBuiltInRole right) { throw null; } public override string ToString() { throw null; } } - public partial class SignalRCustomCertificate : Azure.Provisioning.Primitives.Resource + public partial class SignalRCustomCertificate : Azure.Provisioning.Primitives.ProvisionableResource { - public SignalRCustomCertificate(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public SignalRCustomCertificate(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue KeyVaultBaseUri { get { throw null; } set { } } public Azure.Provisioning.BicepValue KeyVaultSecretName { get { throw null; } set { } } @@ -42,7 +42,7 @@ public partial class SignalRCustomCertificate : Azure.Provisioning.Primitives.Re public Azure.Provisioning.SignalR.SignalRService? Parent { get { throw null; } set { } } public Azure.Provisioning.BicepValue ProvisioningState { get { throw null; } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.SignalR.SignalRCustomCertificate FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.SignalR.SignalRCustomCertificate FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2018_10_01; @@ -51,12 +51,11 @@ public static partial class ResourceVersions public static readonly string V2022_02_01; public static readonly string V2023_02_01; public static readonly string V2024_03_01; - public static readonly string V2024_04_01_preview; } } - public partial class SignalRCustomDomain : Azure.Provisioning.Primitives.Resource + public partial class SignalRCustomDomain : Azure.Provisioning.Primitives.ProvisionableResource { - public SignalRCustomDomain(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public SignalRCustomDomain(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue CustomCertificateId { get { throw null; } set { } } public Azure.Provisioning.BicepValue DomainName { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } @@ -64,7 +63,7 @@ public partial class SignalRCustomDomain : Azure.Provisioning.Primitives.Resourc public Azure.Provisioning.SignalR.SignalRService? Parent { get { throw null; } set { } } public Azure.Provisioning.BicepValue ProvisioningState { get { throw null; } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.SignalR.SignalRCustomDomain FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.SignalR.SignalRCustomDomain FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2020_05_01; @@ -72,10 +71,9 @@ public static partial class ResourceVersions public static readonly string V2022_02_01; public static readonly string V2023_02_01; public static readonly string V2024_03_01; - public static readonly string V2024_04_01_preview; } } - public partial class SignalRFeature : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class SignalRFeature : Azure.Provisioning.Primitives.ProvisionableConstruct { public SignalRFeature() { } public Azure.Provisioning.BicepValue Flag { get { throw null; } set { } } @@ -89,7 +87,7 @@ public enum SignalRFeatureFlag EnableMessagingLogs = 2, EnableLiveTrace = 3, } - public partial class SignalRKeys : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class SignalRKeys : Azure.Provisioning.Primitives.ProvisionableConstruct { public SignalRKeys() { } public Azure.Provisioning.BicepValue PrimaryConnectionString { get { throw null; } } @@ -97,21 +95,21 @@ public SignalRKeys() { } public Azure.Provisioning.BicepValue SecondaryConnectionString { get { throw null; } } public Azure.Provisioning.BicepValue SecondaryKey { get { throw null; } } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public static Azure.Provisioning.SignalR.SignalRKeys FromExpression(Azure.Provisioning.Expressions.Expression expression) { throw null; } + public static Azure.Provisioning.SignalR.SignalRKeys FromExpression(Azure.Provisioning.Expressions.BicepExpression expression) { throw null; } } - public partial class SignalRLiveTraceCategory : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class SignalRLiveTraceCategory : Azure.Provisioning.Primitives.ProvisionableConstruct { public SignalRLiveTraceCategory() { } public Azure.Provisioning.BicepValue Enabled { get { throw null; } set { } } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } } - public partial class SignalRLiveTraceConfiguration : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class SignalRLiveTraceConfiguration : Azure.Provisioning.Primitives.ProvisionableConstruct { public SignalRLiveTraceConfiguration() { } public Azure.Provisioning.BicepList Categories { get { throw null; } set { } } public Azure.Provisioning.BicepValue Enabled { get { throw null; } set { } } } - public partial class SignalRNetworkAcl : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class SignalRNetworkAcl : Azure.Provisioning.Primitives.ProvisionableConstruct { public SignalRNetworkAcl() { } public Azure.Provisioning.BicepList Allow { get { throw null; } set { } } @@ -122,7 +120,7 @@ public enum SignalRNetworkAclAction Allow = 0, Deny = 1, } - public partial class SignalRNetworkAcls : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class SignalRNetworkAcls : Azure.Provisioning.Primitives.ProvisionableConstruct { public SignalRNetworkAcls() { } public Azure.Provisioning.BicepValue DefaultAction { get { throw null; } set { } } @@ -134,9 +132,9 @@ public partial class SignalRPrivateEndpointAcl : Azure.Provisioning.SignalR.Sign public SignalRPrivateEndpointAcl() { } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } } - public partial class SignalRPrivateEndpointConnection : Azure.Provisioning.Primitives.Resource + public partial class SignalRPrivateEndpointConnection : Azure.Provisioning.Primitives.ProvisionableResource { - public SignalRPrivateEndpointConnection(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public SignalRPrivateEndpointConnection(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue ConnectionState { get { throw null; } set { } } public Azure.Provisioning.BicepList GroupIds { get { throw null; } } public Azure.Provisioning.BicepValue Id { get { throw null; } } @@ -145,7 +143,7 @@ public partial class SignalRPrivateEndpointConnection : Azure.Provisioning.Primi public Azure.Provisioning.BicepValue PrivateEndpointId { get { throw null; } set { } } public Azure.Provisioning.BicepValue ProvisioningState { get { throw null; } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.SignalR.SignalRPrivateEndpointConnection FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.SignalR.SignalRPrivateEndpointConnection FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2018_10_01; @@ -154,10 +152,9 @@ public static partial class ResourceVersions public static readonly string V2022_02_01; public static readonly string V2023_02_01; public static readonly string V2024_03_01; - public static readonly string V2024_04_01_preview; } } - public partial class SignalRPrivateEndpointConnectionData : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class SignalRPrivateEndpointConnectionData : Azure.Provisioning.Primitives.ProvisionableConstruct { public SignalRPrivateEndpointConnectionData() { } public Azure.Provisioning.BicepValue ConnectionState { get { throw null; } set { } } @@ -168,7 +165,7 @@ public SignalRPrivateEndpointConnectionData() { } public Azure.Provisioning.BicepValue ProvisioningState { get { throw null; } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } } - public partial class SignalRPrivateLinkServiceConnectionState : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class SignalRPrivateLinkServiceConnectionState : Azure.Provisioning.Primitives.ProvisionableConstruct { public SignalRPrivateLinkServiceConnectionState() { } public Azure.Provisioning.BicepValue ActionsRequired { get { throw null; } set { } } @@ -195,13 +192,13 @@ public enum SignalRRequestType RestApi = 2, Trace = 3, } - public partial class SignalRResourceLogCategory : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class SignalRResourceLogCategory : Azure.Provisioning.Primitives.ProvisionableConstruct { public SignalRResourceLogCategory() { } public Azure.Provisioning.BicepValue Enabled { get { throw null; } set { } } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } } - public partial class SignalRResourceSku : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class SignalRResourceSku : Azure.Provisioning.Primitives.ProvisionableConstruct { public SignalRResourceSku() { } public Azure.Provisioning.BicepValue Capacity { get { throw null; } set { } } @@ -210,9 +207,9 @@ public SignalRResourceSku() { } public Azure.Provisioning.BicepValue Size { get { throw null; } } public Azure.Provisioning.BicepValue Tier { get { throw null; } set { } } } - public partial class SignalRService : Azure.Provisioning.Primitives.Resource + public partial class SignalRService : Azure.Provisioning.Primitives.ProvisionableResource { - public SignalRService(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public SignalRService(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepList CorsAllowedOrigins { get { throw null; } set { } } public Azure.Provisioning.BicepValue DisableAadAuth { get { throw null; } set { } } public Azure.Provisioning.BicepValue DisableLocalAuth { get { throw null; } set { } } @@ -240,9 +237,9 @@ public partial class SignalRService : Azure.Provisioning.Primitives.Resource public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } public Azure.Provisioning.BicepList UpstreamTemplates { get { throw null; } set { } } public Azure.Provisioning.BicepValue Version { get { throw null; } } - public Azure.Provisioning.Authorization.RoleAssignment CreateRoleAssignment(Azure.Provisioning.SignalR.SignalRBuiltInRole role, Azure.Provisioning.BicepValue principalType, Azure.Provisioning.BicepValue principalId, string? identifierNameSuffix = null) { throw null; } + public Azure.Provisioning.Authorization.RoleAssignment CreateRoleAssignment(Azure.Provisioning.SignalR.SignalRBuiltInRole role, Azure.Provisioning.BicepValue principalType, Azure.Provisioning.BicepValue principalId, string? bicepIdentifierSuffix = null) { throw null; } public Azure.Provisioning.Authorization.RoleAssignment CreateRoleAssignment(Azure.Provisioning.SignalR.SignalRBuiltInRole role, Azure.Provisioning.Roles.UserAssignedIdentity identity) { throw null; } - public static Azure.Provisioning.SignalR.SignalRService FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.SignalR.SignalRService FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public Azure.Provisioning.SignalR.SignalRKeys GetKeys() { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override Azure.Provisioning.Primitives.ResourceNameRequirements GetResourceNameRequirements() { throw null; } @@ -254,7 +251,6 @@ public static partial class ResourceVersions public static readonly string V2022_02_01; public static readonly string V2023_02_01; public static readonly string V2024_03_01; - public static readonly string V2024_04_01_preview; } } public enum SignalRServiceKind @@ -262,9 +258,9 @@ public enum SignalRServiceKind SignalR = 0, RawWebSockets = 1, } - public partial class SignalRSharedPrivateLink : Azure.Provisioning.Primitives.Resource + public partial class SignalRSharedPrivateLink : Azure.Provisioning.Primitives.ProvisionableResource { - public SignalRSharedPrivateLink(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public SignalRSharedPrivateLink(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue GroupId { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } @@ -274,7 +270,7 @@ public partial class SignalRSharedPrivateLink : Azure.Provisioning.Primitives.Re public Azure.Provisioning.BicepValue RequestMessage { get { throw null; } set { } } public Azure.Provisioning.BicepValue Status { get { throw null; } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.SignalR.SignalRSharedPrivateLink FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.SignalR.SignalRSharedPrivateLink FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2018_10_01; @@ -283,10 +279,9 @@ public static partial class ResourceVersions public static readonly string V2022_02_01; public static readonly string V2023_02_01; public static readonly string V2024_03_01; - public static readonly string V2024_04_01_preview; } } - public partial class SignalRSharedPrivateLinkResourceData : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class SignalRSharedPrivateLinkResourceData : Azure.Provisioning.Primitives.ProvisionableConstruct { public SignalRSharedPrivateLinkResourceData() { } public Azure.Provisioning.BicepValue GroupId { get { throw null; } set { } } @@ -313,7 +308,7 @@ public enum SignalRSkuTier Standard = 2, Premium = 3, } - public partial class SignalRUpstreamAuthSettings : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class SignalRUpstreamAuthSettings : Azure.Provisioning.Primitives.ProvisionableConstruct { public SignalRUpstreamAuthSettings() { } public Azure.Provisioning.BicepValue AuthType { get { throw null; } set { } } @@ -324,7 +319,7 @@ public enum SignalRUpstreamAuthType None = 0, ManagedIdentity = 1, } - public partial class SignalRUpstreamTemplate : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class SignalRUpstreamTemplate : Azure.Provisioning.Primitives.ProvisionableConstruct { public SignalRUpstreamTemplate() { } public Azure.Provisioning.BicepValue Auth { get { throw null; } set { } } diff --git a/sdk/provisioning/Azure.Provisioning.SignalR/src/Generated/Models/SignalRFeature.cs b/sdk/provisioning/Azure.Provisioning.SignalR/src/Generated/Models/SignalRFeature.cs index ce80d9ccda9c..ed0c6d069bf6 100644 --- a/sdk/provisioning/Azure.Provisioning.SignalR/src/Generated/Models/SignalRFeature.cs +++ b/sdk/provisioning/Azure.Provisioning.SignalR/src/Generated/Models/SignalRFeature.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.SignalR; /// /// Feature of a resource, which controls the runtime behavior. /// -public partial class SignalRFeature : ProvisioningConstruct +public partial class SignalRFeature : ProvisionableConstruct { /// /// FeatureFlags is the supported features of Azure SignalR service. diff --git a/sdk/provisioning/Azure.Provisioning.SignalR/src/Generated/Models/SignalRKeys.cs b/sdk/provisioning/Azure.Provisioning.SignalR/src/Generated/Models/SignalRKeys.cs index 3b999d2f32b2..031cb956888e 100644 --- a/sdk/provisioning/Azure.Provisioning.SignalR/src/Generated/Models/SignalRKeys.cs +++ b/sdk/provisioning/Azure.Provisioning.SignalR/src/Generated/Models/SignalRKeys.cs @@ -13,7 +13,7 @@ namespace Azure.Provisioning.SignalR; /// /// A class represents the access keys of the resource. /// -public partial class SignalRKeys : ProvisioningConstruct +public partial class SignalRKeys : ProvisionableConstruct { /// /// The primary access key. @@ -59,7 +59,7 @@ public SignalRKeys() /// /// A SignalRKeys resource. [EditorBrowsable(EditorBrowsableState.Never)] - public static SignalRKeys FromExpression(Expression expression) + public static SignalRKeys FromExpression(BicepExpression expression) { SignalRKeys resource = new(); resource.OverrideWithExpression(expression); diff --git a/sdk/provisioning/Azure.Provisioning.SignalR/src/Generated/Models/SignalRLiveTraceCategory.cs b/sdk/provisioning/Azure.Provisioning.SignalR/src/Generated/Models/SignalRLiveTraceCategory.cs index 25186757c695..2f9144a3e156 100644 --- a/sdk/provisioning/Azure.Provisioning.SignalR/src/Generated/Models/SignalRLiveTraceCategory.cs +++ b/sdk/provisioning/Azure.Provisioning.SignalR/src/Generated/Models/SignalRLiveTraceCategory.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.SignalR; /// /// Live trace category configuration of a Microsoft.SignalRService resource. /// -public partial class SignalRLiveTraceCategory : ProvisioningConstruct +public partial class SignalRLiveTraceCategory : ProvisionableConstruct { /// /// Gets or sets the live trace category's name. Available diff --git a/sdk/provisioning/Azure.Provisioning.SignalR/src/Generated/Models/SignalRLiveTraceConfiguration.cs b/sdk/provisioning/Azure.Provisioning.SignalR/src/Generated/Models/SignalRLiveTraceConfiguration.cs index 84051b8b8a37..7ce2600aa9ad 100644 --- a/sdk/provisioning/Azure.Provisioning.SignalR/src/Generated/Models/SignalRLiveTraceConfiguration.cs +++ b/sdk/provisioning/Azure.Provisioning.SignalR/src/Generated/Models/SignalRLiveTraceConfiguration.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.SignalR; /// /// Live trace configuration of a Microsoft.SignalRService resource. /// -public partial class SignalRLiveTraceConfiguration : ProvisioningConstruct +public partial class SignalRLiveTraceConfiguration : ProvisionableConstruct { /// /// Indicates whether or not enable live trace. When it's diff --git a/sdk/provisioning/Azure.Provisioning.SignalR/src/Generated/Models/SignalRNetworkAcl.cs b/sdk/provisioning/Azure.Provisioning.SignalR/src/Generated/Models/SignalRNetworkAcl.cs index d9e0b917c209..05b62d5a88ce 100644 --- a/sdk/provisioning/Azure.Provisioning.SignalR/src/Generated/Models/SignalRNetworkAcl.cs +++ b/sdk/provisioning/Azure.Provisioning.SignalR/src/Generated/Models/SignalRNetworkAcl.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.SignalR; /// /// Network ACL. /// -public partial class SignalRNetworkAcl : ProvisioningConstruct +public partial class SignalRNetworkAcl : ProvisionableConstruct { /// /// Allowed request types. The value can be one or more of: diff --git a/sdk/provisioning/Azure.Provisioning.SignalR/src/Generated/Models/SignalRNetworkAcls.cs b/sdk/provisioning/Azure.Provisioning.SignalR/src/Generated/Models/SignalRNetworkAcls.cs index 02eba056e524..a1079c3c9ea8 100644 --- a/sdk/provisioning/Azure.Provisioning.SignalR/src/Generated/Models/SignalRNetworkAcls.cs +++ b/sdk/provisioning/Azure.Provisioning.SignalR/src/Generated/Models/SignalRNetworkAcls.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.SignalR; /// /// Network ACLs for the resource. /// -public partial class SignalRNetworkAcls : ProvisioningConstruct +public partial class SignalRNetworkAcls : ProvisionableConstruct { /// /// Azure Networking ACL Action. diff --git a/sdk/provisioning/Azure.Provisioning.SignalR/src/Generated/Models/SignalRPrivateEndpointConnectionData.cs b/sdk/provisioning/Azure.Provisioning.SignalR/src/Generated/Models/SignalRPrivateEndpointConnectionData.cs index 8ffd3209ab34..2c1f221bda3b 100644 --- a/sdk/provisioning/Azure.Provisioning.SignalR/src/Generated/Models/SignalRPrivateEndpointConnectionData.cs +++ b/sdk/provisioning/Azure.Provisioning.SignalR/src/Generated/Models/SignalRPrivateEndpointConnectionData.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.SignalR; /// A class representing the SignalRPrivateEndpointConnection data model. /// A private endpoint connection to an azure resource /// -public partial class SignalRPrivateEndpointConnectionData : ProvisioningConstruct +public partial class SignalRPrivateEndpointConnectionData : ProvisionableConstruct { /// /// Provisioning state of the resource. diff --git a/sdk/provisioning/Azure.Provisioning.SignalR/src/Generated/Models/SignalRPrivateLinkServiceConnectionState.cs b/sdk/provisioning/Azure.Provisioning.SignalR/src/Generated/Models/SignalRPrivateLinkServiceConnectionState.cs index 104926c6dcad..3e7c665d1e7a 100644 --- a/sdk/provisioning/Azure.Provisioning.SignalR/src/Generated/Models/SignalRPrivateLinkServiceConnectionState.cs +++ b/sdk/provisioning/Azure.Provisioning.SignalR/src/Generated/Models/SignalRPrivateLinkServiceConnectionState.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.SignalR; /// /// Connection state of the private endpoint connection. /// -public partial class SignalRPrivateLinkServiceConnectionState : ProvisioningConstruct +public partial class SignalRPrivateLinkServiceConnectionState : ProvisionableConstruct { /// /// Indicates whether the connection has been Approved/Rejected/Removed by diff --git a/sdk/provisioning/Azure.Provisioning.SignalR/src/Generated/Models/SignalRResourceLogCategory.cs b/sdk/provisioning/Azure.Provisioning.SignalR/src/Generated/Models/SignalRResourceLogCategory.cs index 0d4176ab9485..0db3a4c143bf 100644 --- a/sdk/provisioning/Azure.Provisioning.SignalR/src/Generated/Models/SignalRResourceLogCategory.cs +++ b/sdk/provisioning/Azure.Provisioning.SignalR/src/Generated/Models/SignalRResourceLogCategory.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.SignalR; /// /// Resource log category configuration of a Microsoft.SignalRService resource. /// -public partial class SignalRResourceLogCategory : ProvisioningConstruct +public partial class SignalRResourceLogCategory : ProvisionableConstruct { /// /// Gets or sets the resource log category's name. diff --git a/sdk/provisioning/Azure.Provisioning.SignalR/src/Generated/Models/SignalRResourceSku.cs b/sdk/provisioning/Azure.Provisioning.SignalR/src/Generated/Models/SignalRResourceSku.cs index d14ae165e9f3..6de9098b9e04 100644 --- a/sdk/provisioning/Azure.Provisioning.SignalR/src/Generated/Models/SignalRResourceSku.cs +++ b/sdk/provisioning/Azure.Provisioning.SignalR/src/Generated/Models/SignalRResourceSku.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.SignalR; /// /// The billing information of the resource. /// -public partial class SignalRResourceSku : ProvisioningConstruct +public partial class SignalRResourceSku : ProvisionableConstruct { /// /// The name of the SKU. Required. Allowed diff --git a/sdk/provisioning/Azure.Provisioning.SignalR/src/Generated/Models/SignalRSharedPrivateLinkResourceData.cs b/sdk/provisioning/Azure.Provisioning.SignalR/src/Generated/Models/SignalRSharedPrivateLinkResourceData.cs index 20428a03e0ce..d84e8e172bd7 100644 --- a/sdk/provisioning/Azure.Provisioning.SignalR/src/Generated/Models/SignalRSharedPrivateLinkResourceData.cs +++ b/sdk/provisioning/Azure.Provisioning.SignalR/src/Generated/Models/SignalRSharedPrivateLinkResourceData.cs @@ -14,7 +14,7 @@ namespace Azure.Provisioning.SignalR; /// A class representing the SignalRSharedPrivateLinkResource data model. /// Describes a Shared Private Link Resource /// -public partial class SignalRSharedPrivateLinkResourceData : ProvisioningConstruct +public partial class SignalRSharedPrivateLinkResourceData : ProvisionableConstruct { /// /// The group id from the provider of resource the shared private link diff --git a/sdk/provisioning/Azure.Provisioning.SignalR/src/Generated/Models/SignalRUpstreamAuthSettings.cs b/sdk/provisioning/Azure.Provisioning.SignalR/src/Generated/Models/SignalRUpstreamAuthSettings.cs index 318d5cdfff95..5fe485fb3683 100644 --- a/sdk/provisioning/Azure.Provisioning.SignalR/src/Generated/Models/SignalRUpstreamAuthSettings.cs +++ b/sdk/provisioning/Azure.Provisioning.SignalR/src/Generated/Models/SignalRUpstreamAuthSettings.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.SignalR; /// /// Upstream auth settings. If not set, no auth is used for upstream messages. /// -public partial class SignalRUpstreamAuthSettings : ProvisioningConstruct +public partial class SignalRUpstreamAuthSettings : ProvisionableConstruct { /// /// Upstream auth type enum. diff --git a/sdk/provisioning/Azure.Provisioning.SignalR/src/Generated/Models/SignalRUpstreamTemplate.cs b/sdk/provisioning/Azure.Provisioning.SignalR/src/Generated/Models/SignalRUpstreamTemplate.cs index 154bddac78bb..ab29fecb495e 100644 --- a/sdk/provisioning/Azure.Provisioning.SignalR/src/Generated/Models/SignalRUpstreamTemplate.cs +++ b/sdk/provisioning/Azure.Provisioning.SignalR/src/Generated/Models/SignalRUpstreamTemplate.cs @@ -14,7 +14,7 @@ namespace Azure.Provisioning.SignalR; /// event, the hub or the category of the incoming request that matches /// current URL template. /// -public partial class SignalRUpstreamTemplate : ProvisioningConstruct +public partial class SignalRUpstreamTemplate : ProvisionableConstruct { /// /// Gets or sets the matching pattern for hub names. If not set, it matches diff --git a/sdk/provisioning/Azure.Provisioning.SignalR/src/Generated/SignalRCustomCertificate.cs b/sdk/provisioning/Azure.Provisioning.SignalR/src/Generated/SignalRCustomCertificate.cs index 4d9f2420ca24..5aff50a043cc 100644 --- a/sdk/provisioning/Azure.Provisioning.SignalR/src/Generated/SignalRCustomCertificate.cs +++ b/sdk/provisioning/Azure.Provisioning.SignalR/src/Generated/SignalRCustomCertificate.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.SignalR; /// /// SignalRCustomCertificate. /// -public partial class SignalRCustomCertificate : Resource +public partial class SignalRCustomCertificate : ProvisionableResource { /// /// Custom certificate name. @@ -68,15 +68,15 @@ public partial class SignalRCustomCertificate : Resource /// /// Creates a new SignalRCustomCertificate. /// - /// + /// /// The the Bicep identifier name of the SignalRCustomCertificate resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, /// numbers, and underscores. /// /// Version of the SignalRCustomCertificate. - public SignalRCustomCertificate(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.SignalRService/signalR/customCertificates", resourceVersion ?? "2024-03-01") + public SignalRCustomCertificate(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.SignalRService/signalR/customCertificates", resourceVersion ?? "2024-03-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _keyVaultBaseUri = BicepValue.DefineProperty(this, "KeyVaultBaseUri", ["properties", "keyVaultBaseUri"], isRequired: true); @@ -93,11 +93,6 @@ public SignalRCustomCertificate(string identifierName, string? resourceVersion = /// public static class ResourceVersions { - /// - /// 2024-04-01-preview. - /// - public static readonly string V2024_04_01_preview = "2024-04-01-preview"; - /// /// 2024-03-01. /// @@ -132,7 +127,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing SignalRCustomCertificate. /// - /// + /// /// The the Bicep identifier name of the SignalRCustomCertificate resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, @@ -140,6 +135,6 @@ public static class ResourceVersions /// /// Version of the SignalRCustomCertificate. /// The existing SignalRCustomCertificate resource. - public static SignalRCustomCertificate FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static SignalRCustomCertificate FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.SignalR/src/Generated/SignalRCustomDomain.cs b/sdk/provisioning/Azure.Provisioning.SignalR/src/Generated/SignalRCustomDomain.cs index 30db0d804cc3..c34daffadaab 100644 --- a/sdk/provisioning/Azure.Provisioning.SignalR/src/Generated/SignalRCustomDomain.cs +++ b/sdk/provisioning/Azure.Provisioning.SignalR/src/Generated/SignalRCustomDomain.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.SignalR; /// /// SignalRCustomDomain. /// -public partial class SignalRCustomDomain : Resource +public partial class SignalRCustomDomain : ProvisionableResource { /// /// Custom domain name. @@ -62,15 +62,15 @@ public partial class SignalRCustomDomain : Resource /// /// Creates a new SignalRCustomDomain. /// - /// + /// /// The the Bicep identifier name of the SignalRCustomDomain resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, /// numbers, and underscores. /// /// Version of the SignalRCustomDomain. - public SignalRCustomDomain(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.SignalRService/signalR/customDomains", resourceVersion ?? "2024-03-01") + public SignalRCustomDomain(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.SignalRService/signalR/customDomains", resourceVersion ?? "2024-03-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _domainName = BicepValue.DefineProperty(this, "DomainName", ["properties", "domainName"], isRequired: true); @@ -86,11 +86,6 @@ public SignalRCustomDomain(string identifierName, string? resourceVersion = defa /// public static class ResourceVersions { - /// - /// 2024-04-01-preview. - /// - public static readonly string V2024_04_01_preview = "2024-04-01-preview"; - /// /// 2024-03-01. /// @@ -120,7 +115,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing SignalRCustomDomain. /// - /// + /// /// The the Bicep identifier name of the SignalRCustomDomain resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, @@ -128,6 +123,6 @@ public static class ResourceVersions /// /// Version of the SignalRCustomDomain. /// The existing SignalRCustomDomain resource. - public static SignalRCustomDomain FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static SignalRCustomDomain FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.SignalR/src/Generated/SignalRPrivateEndpointConnection.cs b/sdk/provisioning/Azure.Provisioning.SignalR/src/Generated/SignalRPrivateEndpointConnection.cs index 41443aaa71b6..8633096d66aa 100644 --- a/sdk/provisioning/Azure.Provisioning.SignalR/src/Generated/SignalRPrivateEndpointConnection.cs +++ b/sdk/provisioning/Azure.Provisioning.SignalR/src/Generated/SignalRPrivateEndpointConnection.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.SignalR; /// /// SignalRPrivateEndpointConnection. /// -public partial class SignalRPrivateEndpointConnection : Resource +public partial class SignalRPrivateEndpointConnection : ProvisionableResource { /// /// The name of the private endpoint connection. @@ -69,15 +69,15 @@ public partial class SignalRPrivateEndpointConnection : Resource /// /// Creates a new SignalRPrivateEndpointConnection. /// - /// + /// /// The the Bicep identifier name of the SignalRPrivateEndpointConnection /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the SignalRPrivateEndpointConnection. - public SignalRPrivateEndpointConnection(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.SignalRService/signalR/privateEndpointConnections", resourceVersion ?? "2024-03-01") + public SignalRPrivateEndpointConnection(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.SignalRService/signalR/privateEndpointConnections", resourceVersion ?? "2024-03-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _connectionState = BicepValue.DefineProperty(this, "ConnectionState", ["properties", "privateLinkServiceConnectionState"]); @@ -94,11 +94,6 @@ public SignalRPrivateEndpointConnection(string identifierName, string? resourceV /// public static class ResourceVersions { - /// - /// 2024-04-01-preview. - /// - public static readonly string V2024_04_01_preview = "2024-04-01-preview"; - /// /// 2024-03-01. /// @@ -133,7 +128,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing SignalRPrivateEndpointConnection. /// - /// + /// /// The the Bicep identifier name of the SignalRPrivateEndpointConnection /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -141,6 +136,6 @@ public static class ResourceVersions /// /// Version of the SignalRPrivateEndpointConnection. /// The existing SignalRPrivateEndpointConnection resource. - public static SignalRPrivateEndpointConnection FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static SignalRPrivateEndpointConnection FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.SignalR/src/Generated/SignalRService.cs b/sdk/provisioning/Azure.Provisioning.SignalR/src/Generated/SignalRService.cs index 8bc1047392ee..d6d86316ca65 100644 --- a/sdk/provisioning/Azure.Provisioning.SignalR/src/Generated/SignalRService.cs +++ b/sdk/provisioning/Azure.Provisioning.SignalR/src/Generated/SignalRService.cs @@ -20,7 +20,7 @@ namespace Azure.Provisioning.SignalR; /// /// SignalRService. /// -public partial class SignalRService : Resource +public partial class SignalRService : ProvisionableResource { /// /// The name of the resource. @@ -207,15 +207,15 @@ public partial class SignalRService : Resource /// /// Creates a new SignalRService. /// - /// + /// /// The the Bicep identifier name of the SignalRService resource. This can /// be used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and /// underscores. /// /// Version of the SignalRService. - public SignalRService(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.SignalRService/signalR", resourceVersion ?? "2024-03-01") + public SignalRService(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.SignalRService/signalR", resourceVersion ?? "2024-03-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _location = BicepValue.DefineProperty(this, "Location", ["location"], isRequired: true); @@ -251,11 +251,6 @@ public SignalRService(string identifierName, string? resourceVersion = default) /// public static class ResourceVersions { - /// - /// 2024-04-01-preview. - /// - public static readonly string V2024_04_01_preview = "2024-04-01-preview"; - /// /// 2024-03-01. /// @@ -290,7 +285,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing SignalRService. /// - /// + /// /// The the Bicep identifier name of the SignalRService resource. This can /// be used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and @@ -298,8 +293,8 @@ public static class ResourceVersions /// /// Version of the SignalRService. /// The existing SignalRService resource. - public static SignalRService FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static SignalRService FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; /// /// Get the requirements for naming this SignalRService resource. @@ -315,7 +310,7 @@ public override ResourceNameRequirements GetResourceNameRequirements() => /// The keys for this SignalRService resource. public SignalRKeys GetKeys() => SignalRKeys.FromExpression( - new FunctionCallExpression(new MemberExpression(new IdentifierExpression(IdentifierName), "listKeys"))); + new FunctionCallExpression(new MemberExpression(new IdentifierExpression(BicepIdentifier), "listKeys"))); /// /// Creates a role assignment for a user-assigned identity that grants @@ -325,10 +320,10 @@ public SignalRKeys GetKeys() => /// The . /// The . public RoleAssignment CreateRoleAssignment(SignalRBuiltInRole role, UserAssignedIdentity identity) => - new($"{IdentifierName}_{identity.IdentifierName}_{SignalRBuiltInRole.GetBuiltInRoleName(role)}") + new($"{BicepIdentifier}_{identity.BicepIdentifier}_{SignalRBuiltInRole.GetBuiltInRoleName(role)}") { Name = BicepFunction.CreateGuid(Id, identity.PrincipalId, BicepFunction.GetSubscriptionResourceId("Microsoft.Authorization/roleDefinitions", role.ToString())), - Scope = new IdentifierExpression(IdentifierName), + Scope = new IdentifierExpression(BicepIdentifier), PrincipalType = RoleManagementPrincipalType.ServicePrincipal, RoleDefinitionId = BicepFunction.GetSubscriptionResourceId("Microsoft.Authorization/roleDefinitions", role.ToString()), PrincipalId = identity.PrincipalId @@ -341,13 +336,13 @@ public RoleAssignment CreateRoleAssignment(SignalRBuiltInRole role, UserAssigned /// The role to grant. /// The type of the principal to assign to. /// The principal to assign to. - /// Optional role assignment identifier name suffix. + /// Optional role assignment identifier name suffix. /// The . - public RoleAssignment CreateRoleAssignment(SignalRBuiltInRole role, BicepValue principalType, BicepValue principalId, string? identifierNameSuffix = default) => - new($"{IdentifierName}_{SignalRBuiltInRole.GetBuiltInRoleName(role)}{(identifierNameSuffix is null ? "" : "_")}{identifierNameSuffix}") + public RoleAssignment CreateRoleAssignment(SignalRBuiltInRole role, BicepValue principalType, BicepValue principalId, string? bicepIdentifierSuffix = default) => + new($"{BicepIdentifier}_{SignalRBuiltInRole.GetBuiltInRoleName(role)}{(bicepIdentifierSuffix is null ? "" : "_")}{bicepIdentifierSuffix}") { Name = BicepFunction.CreateGuid(Id, principalId, BicepFunction.GetSubscriptionResourceId("Microsoft.Authorization/roleDefinitions", role.ToString())), - Scope = new IdentifierExpression(IdentifierName), + Scope = new IdentifierExpression(BicepIdentifier), PrincipalType = principalType, RoleDefinitionId = BicepFunction.GetSubscriptionResourceId("Microsoft.Authorization/roleDefinitions", role.ToString()), PrincipalId = principalId diff --git a/sdk/provisioning/Azure.Provisioning.SignalR/src/Generated/SignalRSharedPrivateLink.cs b/sdk/provisioning/Azure.Provisioning.SignalR/src/Generated/SignalRSharedPrivateLink.cs index 909e48817f92..d1caa4723a58 100644 --- a/sdk/provisioning/Azure.Provisioning.SignalR/src/Generated/SignalRSharedPrivateLink.cs +++ b/sdk/provisioning/Azure.Provisioning.SignalR/src/Generated/SignalRSharedPrivateLink.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.SignalR; /// /// SignalRSharedPrivateLink. /// -public partial class SignalRSharedPrivateLink : Resource +public partial class SignalRSharedPrivateLink : ProvisionableResource { /// /// The name of the shared private link resource. @@ -76,15 +76,15 @@ public partial class SignalRSharedPrivateLink : Resource /// /// Creates a new SignalRSharedPrivateLink. /// - /// + /// /// The the Bicep identifier name of the SignalRSharedPrivateLink resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, /// numbers, and underscores. /// /// Version of the SignalRSharedPrivateLink. - public SignalRSharedPrivateLink(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.SignalRService/signalR/sharedPrivateLinkResources", resourceVersion ?? "2024-03-01") + public SignalRSharedPrivateLink(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.SignalRService/signalR/sharedPrivateLinkResources", resourceVersion ?? "2024-03-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _groupId = BicepValue.DefineProperty(this, "GroupId", ["properties", "groupId"]); @@ -102,11 +102,6 @@ public SignalRSharedPrivateLink(string identifierName, string? resourceVersion = /// public static class ResourceVersions { - /// - /// 2024-04-01-preview. - /// - public static readonly string V2024_04_01_preview = "2024-04-01-preview"; - /// /// 2024-03-01. /// @@ -141,7 +136,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing SignalRSharedPrivateLink. /// - /// + /// /// The the Bicep identifier name of the SignalRSharedPrivateLink resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, @@ -149,6 +144,6 @@ public static class ResourceVersions /// /// Version of the SignalRSharedPrivateLink. /// The existing SignalRSharedPrivateLink resource. - public static SignalRSharedPrivateLink FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static SignalRSharedPrivateLink FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.Sql/api/Azure.Provisioning.Sql.netstandard2.0.cs b/sdk/provisioning/Azure.Provisioning.Sql/api/Azure.Provisioning.Sql.netstandard2.0.cs index 22fb281e0172..913423a1a856 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/api/Azure.Provisioning.Sql.netstandard2.0.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/api/Azure.Provisioning.Sql.netstandard2.0.cs @@ -14,20 +14,19 @@ public enum AuthenticationName { Default = 0, } - public partial class BackupShortTermRetentionPolicy : Azure.Provisioning.Primitives.Resource + public partial class BackupShortTermRetentionPolicy : Azure.Provisioning.Primitives.ProvisionableResource { - public BackupShortTermRetentionPolicy(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public BackupShortTermRetentionPolicy(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue DiffBackupIntervalInHours { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Name { get { throw null; } } public Azure.Provisioning.Sql.SqlDatabase? Parent { get { throw null; } set { } } public Azure.Provisioning.BicepValue RetentionDays { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.Sql.BackupShortTermRetentionPolicy FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Sql.BackupShortTermRetentionPolicy FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2021_11_01; - public static readonly string V2024_05_01_preview; } } public enum BlobAuditingPolicyName @@ -52,28 +51,27 @@ public enum ConnectionPolicyName [System.Runtime.Serialization.DataMemberAttribute(Name="default")] Default = 0, } - public partial class CreateDatabaseRestorePointDefinition : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class CreateDatabaseRestorePointDefinition : Azure.Provisioning.Primitives.ProvisionableConstruct { public CreateDatabaseRestorePointDefinition() { } public Azure.Provisioning.BicepValue RestorePointLabel { get { throw null; } } } - public partial class DatabaseAdvancedThreatProtection : Azure.Provisioning.Primitives.Resource + public partial class DatabaseAdvancedThreatProtection : Azure.Provisioning.Primitives.ProvisionableResource { - public DatabaseAdvancedThreatProtection(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public DatabaseAdvancedThreatProtection(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue CreatedOn { get { throw null; } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Name { get { throw null; } } public Azure.Provisioning.Sql.SqlDatabase? Parent { get { throw null; } set { } } public Azure.Provisioning.BicepValue State { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.Sql.DatabaseAdvancedThreatProtection FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Sql.DatabaseAdvancedThreatProtection FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2021_11_01; - public static readonly string V2024_05_01_preview; } } - public partial class DatabaseIdentity : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class DatabaseIdentity : Azure.Provisioning.Primitives.ProvisionableConstruct { public DatabaseIdentity() { } public Azure.Provisioning.BicepValue IdentityType { get { throw null; } set { } } @@ -95,14 +93,14 @@ public enum DatabaseReadScale Enabled = 0, Disabled = 1, } - public partial class DatabaseVulnerabilityAssessmentRuleBaselineItem : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class DatabaseVulnerabilityAssessmentRuleBaselineItem : Azure.Provisioning.Primitives.ProvisionableConstruct { public DatabaseVulnerabilityAssessmentRuleBaselineItem() { } public Azure.Provisioning.BicepList Result { get { throw null; } set { } } } - public partial class DataMaskingPolicy : Azure.Provisioning.Primitives.Resource + public partial class DataMaskingPolicy : Azure.Provisioning.Primitives.ProvisionableResource { - public DataMaskingPolicy(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public DataMaskingPolicy(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue ApplicationPrincipals { get { throw null; } } public Azure.Provisioning.BicepValue DataMaskingState { get { throw null; } set { } } public Azure.Provisioning.BicepValue ExemptPrincipals { get { throw null; } set { } } @@ -113,13 +111,12 @@ public partial class DataMaskingPolicy : Azure.Provisioning.Primitives.Resource public Azure.Provisioning.BicepValue Name { get { throw null; } } public Azure.Provisioning.Sql.SqlDatabase? Parent { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.Sql.DataMaskingPolicy FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Sql.DataMaskingPolicy FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2014_01_01; public static readonly string V2014_04_01; public static readonly string V2021_11_01; - public static readonly string V2024_05_01_preview; } } public enum DataMaskingState @@ -127,9 +124,9 @@ public enum DataMaskingState Disabled = 0, Enabled = 1, } - public partial class DistributedAvailabilityGroup : Azure.Provisioning.Primitives.Resource + public partial class DistributedAvailabilityGroup : Azure.Provisioning.Primitives.ProvisionableResource { - public DistributedAvailabilityGroup(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public DistributedAvailabilityGroup(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue DistributedAvailabilityGroupId { get { throw null; } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue LastHardenedLsn { get { throw null; } } @@ -144,11 +141,10 @@ public partial class DistributedAvailabilityGroup : Azure.Provisioning.Primitive public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepValue TargetDatabase { get { throw null; } set { } } public Azure.Provisioning.BicepValue TargetReplicaId { get { throw null; } } - public static Azure.Provisioning.Sql.DistributedAvailabilityGroup FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Sql.DistributedAvailabilityGroup FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2021_11_01; - public static readonly string V2024_05_01_preview; } } public enum DistributedAvailabilityGroupReplicationMode @@ -161,9 +157,9 @@ public enum DtcName [System.Runtime.Serialization.DataMemberAttribute(Name="current")] Current = 0, } - public partial class ElasticPool : Azure.Provisioning.Primitives.Resource + public partial class ElasticPool : Azure.Provisioning.Primitives.ProvisionableResource { - public ElasticPool(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public ElasticPool(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue AvailabilityZone { get { throw null; } set { } } public Azure.Provisioning.BicepValue CreatedOn { get { throw null; } } public Azure.Provisioning.BicepValue HighAvailabilityReplicaCount { get { throw null; } set { } } @@ -183,7 +179,7 @@ public partial class ElasticPool : Azure.Provisioning.Primitives.Resource public Azure.Provisioning.BicepValue State { get { throw null; } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } - public static Azure.Provisioning.Sql.ElasticPool FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Sql.ElasticPool FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override Azure.Provisioning.Primitives.ResourceNameRequirements GetResourceNameRequirements() { throw null; } public static partial class ResourceVersions @@ -192,7 +188,6 @@ public static partial class ResourceVersions public static readonly string V2014_04_01; public static readonly string V2015_05_01; public static readonly string V2021_11_01; - public static readonly string V2024_05_01_preview; } } public enum ElasticPoolLicenseType @@ -200,7 +195,7 @@ public enum ElasticPoolLicenseType LicenseIncluded = 0, BasePrice = 1, } - public partial class ElasticPoolPerDatabaseSettings : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ElasticPoolPerDatabaseSettings : Azure.Provisioning.Primitives.ProvisionableConstruct { public ElasticPoolPerDatabaseSettings() { } public Azure.Provisioning.BicepValue MaxCapacity { get { throw null; } set { } } @@ -212,9 +207,9 @@ public enum ElasticPoolState Ready = 1, Disabled = 2, } - public partial class EncryptionProtector : Azure.Provisioning.Primitives.Resource + public partial class EncryptionProtector : Azure.Provisioning.Primitives.ProvisionableResource { - public EncryptionProtector(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public EncryptionProtector(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue IsAutoRotationEnabled { get { throw null; } set { } } public Azure.Provisioning.BicepValue Kind { get { throw null; } } @@ -227,11 +222,10 @@ public partial class EncryptionProtector : Azure.Provisioning.Primitives.Resourc public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepValue Thumbprint { get { throw null; } } public Azure.Provisioning.BicepValue Uri { get { throw null; } } - public static Azure.Provisioning.Sql.EncryptionProtector FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Sql.EncryptionProtector FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2021_11_01; - public static readonly string V2024_05_01_preview; } } public enum EncryptionProtectorName @@ -239,9 +233,9 @@ public enum EncryptionProtectorName [System.Runtime.Serialization.DataMemberAttribute(Name="current")] Current = 0, } - public partial class ExtendedDatabaseBlobAuditingPolicy : Azure.Provisioning.Primitives.Resource + public partial class ExtendedDatabaseBlobAuditingPolicy : Azure.Provisioning.Primitives.ProvisionableResource { - public ExtendedDatabaseBlobAuditingPolicy(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public ExtendedDatabaseBlobAuditingPolicy(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepList AuditActionsAndGroups { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue IsAzureMonitorTargetEnabled { get { throw null; } set { } } @@ -257,19 +251,18 @@ public partial class ExtendedDatabaseBlobAuditingPolicy : Azure.Provisioning.Pri public Azure.Provisioning.BicepValue StorageAccountSubscriptionId { get { throw null; } set { } } public Azure.Provisioning.BicepValue StorageEndpoint { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.Sql.ExtendedDatabaseBlobAuditingPolicy FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Sql.ExtendedDatabaseBlobAuditingPolicy FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2014_01_01; public static readonly string V2014_04_01; public static readonly string V2015_01_01; public static readonly string V2021_11_01; - public static readonly string V2024_05_01_preview; } } - public partial class ExtendedServerBlobAuditingPolicy : Azure.Provisioning.Primitives.Resource + public partial class ExtendedServerBlobAuditingPolicy : Azure.Provisioning.Primitives.ProvisionableResource { - public ExtendedServerBlobAuditingPolicy(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public ExtendedServerBlobAuditingPolicy(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepList AuditActionsAndGroups { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue IsAzureMonitorTargetEnabled { get { throw null; } set { } } @@ -286,11 +279,10 @@ public partial class ExtendedServerBlobAuditingPolicy : Azure.Provisioning.Primi public Azure.Provisioning.BicepValue StorageAccountSubscriptionId { get { throw null; } set { } } public Azure.Provisioning.BicepValue StorageEndpoint { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.Sql.ExtendedServerBlobAuditingPolicy FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Sql.ExtendedServerBlobAuditingPolicy FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2021_11_01; - public static readonly string V2024_05_01_preview; } } public enum ExternalGovernanceStatus @@ -298,9 +290,9 @@ public enum ExternalGovernanceStatus Enabled = 0, Disabled = 1, } - public partial class FailoverGroup : Azure.Provisioning.Primitives.Resource + public partial class FailoverGroup : Azure.Provisioning.Primitives.ProvisionableResource { - public FailoverGroup(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public FailoverGroup(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepList FailoverDatabases { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Location { get { throw null; } } @@ -313,22 +305,21 @@ public partial class FailoverGroup : Azure.Provisioning.Primitives.Resource public Azure.Provisioning.BicepValue ReplicationState { get { throw null; } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } - public static Azure.Provisioning.Sql.FailoverGroup FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Sql.FailoverGroup FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override Azure.Provisioning.Primitives.ResourceNameRequirements GetResourceNameRequirements() { throw null; } public static partial class ResourceVersions { public static readonly string V2021_11_01; - public static readonly string V2024_05_01_preview; } } - public partial class FailoverGroupReadOnlyEndpoint : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class FailoverGroupReadOnlyEndpoint : Azure.Provisioning.Primitives.ProvisionableConstruct { public FailoverGroupReadOnlyEndpoint() { } public Azure.Provisioning.BicepValue FailoverPolicy { get { throw null; } set { } } public Azure.Provisioning.BicepValue TargetServer { get { throw null; } set { } } } - public partial class FailoverGroupReadWriteEndpoint : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class FailoverGroupReadWriteEndpoint : Azure.Provisioning.Primitives.ProvisionableConstruct { public FailoverGroupReadWriteEndpoint() { } public Azure.Provisioning.BicepValue FailoverPolicy { get { throw null; } set { } } @@ -344,9 +335,9 @@ public enum FreeLimitExhaustionBehavior AutoPause = 0, BillOverUsage = 1, } - public partial class GeoBackupPolicy : Azure.Provisioning.Primitives.Resource + public partial class GeoBackupPolicy : Azure.Provisioning.Primitives.ProvisionableResource { - public GeoBackupPolicy(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public GeoBackupPolicy(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Kind { get { throw null; } } public Azure.Provisioning.BicepValue Location { get { throw null; } } @@ -355,13 +346,12 @@ public partial class GeoBackupPolicy : Azure.Provisioning.Primitives.Resource public Azure.Provisioning.BicepValue State { get { throw null; } set { } } public Azure.Provisioning.BicepValue StorageType { get { throw null; } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.Sql.GeoBackupPolicy FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Sql.GeoBackupPolicy FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2014_01_01; public static readonly string V2014_04_01; public static readonly string V2021_11_01; - public static readonly string V2024_05_01_preview; } } public enum GeoBackupPolicyName @@ -378,9 +368,9 @@ public enum GeoSecondaryInstanceType Geo = 0, Standby = 1, } - public partial class InstanceFailoverGroup : Azure.Provisioning.Primitives.Resource + public partial class InstanceFailoverGroup : Azure.Provisioning.Primitives.ProvisionableResource { - public InstanceFailoverGroup(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public InstanceFailoverGroup(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepList ManagedInstancePairs { get { throw null; } set { } } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } @@ -391,14 +381,13 @@ public partial class InstanceFailoverGroup : Azure.Provisioning.Primitives.Resou public Azure.Provisioning.BicepValue ReplicationState { get { throw null; } } public Azure.Provisioning.BicepValue SecondaryType { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.Sql.InstanceFailoverGroup FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Sql.InstanceFailoverGroup FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2021_11_01; - public static readonly string V2024_05_01_preview; } } - public partial class InstanceFailoverGroupReadWriteEndpoint : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class InstanceFailoverGroupReadWriteEndpoint : Azure.Provisioning.Primitives.ProvisionableConstruct { public InstanceFailoverGroupReadWriteEndpoint() { } public Azure.Provisioning.BicepValue FailoverPolicy { get { throw null; } set { } } @@ -409,9 +398,9 @@ public enum InstanceFailoverGroupReplicationRole Primary = 0, Secondary = 1, } - public partial class InstancePool : Azure.Provisioning.Primitives.Resource + public partial class InstancePool : Azure.Provisioning.Primitives.ProvisionableResource { - public InstancePool(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public InstancePool(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue DnsZone { get { throw null; } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue LicenseType { get { throw null; } set { } } @@ -423,11 +412,10 @@ public partial class InstancePool : Azure.Provisioning.Primitives.Resource public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } public Azure.Provisioning.BicepValue VCores { get { throw null; } set { } } - public static Azure.Provisioning.Sql.InstancePool FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Sql.InstancePool FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2021_11_01; - public static readonly string V2024_05_01_preview; } } public enum InstancePoolLicenseType @@ -435,21 +423,20 @@ public enum InstancePoolLicenseType LicenseIncluded = 0, BasePrice = 1, } - public partial class IPv6FirewallRule : Azure.Provisioning.Primitives.Resource + public partial class IPv6FirewallRule : Azure.Provisioning.Primitives.ProvisionableResource { - public IPv6FirewallRule(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public IPv6FirewallRule(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue EndIPv6Address { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } public Azure.Provisioning.Sql.SqlServer? Parent { get { throw null; } set { } } public Azure.Provisioning.BicepValue StartIPv6Address { get { throw null; } set { } } - public static Azure.Provisioning.Sql.IPv6FirewallRule FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Sql.IPv6FirewallRule FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2014_01_01; public static readonly string V2014_04_01; public static readonly string V2021_11_01; - public static readonly string V2024_05_01_preview; } } public enum JobAgentState @@ -481,14 +468,14 @@ public enum JobExecutionProvisioningState Failed = 3, Canceled = 4, } - public partial class JobExecutionTarget : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class JobExecutionTarget : Azure.Provisioning.Primitives.ProvisionableConstruct { public JobExecutionTarget() { } public Azure.Provisioning.BicepValue DatabaseName { get { throw null; } } public Azure.Provisioning.BicepValue ServerName { get { throw null; } } public Azure.Provisioning.BicepValue TargetType { get { throw null; } } } - public partial class JobStepAction : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class JobStepAction : Azure.Provisioning.Primitives.ProvisionableConstruct { public JobStepAction() { } public Azure.Provisioning.BicepValue ActionType { get { throw null; } set { } } @@ -503,7 +490,7 @@ public enum JobStepActionType { TSql = 0, } - public partial class JobStepExecutionOptions : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class JobStepExecutionOptions : Azure.Provisioning.Primitives.ProvisionableConstruct { public JobStepExecutionOptions() { } public Azure.Provisioning.BicepValue InitialRetryIntervalSeconds { get { throw null; } set { } } @@ -512,7 +499,7 @@ public JobStepExecutionOptions() { } public Azure.Provisioning.BicepValue RetryIntervalBackoffMultiplier { get { throw null; } set { } } public Azure.Provisioning.BicepValue TimeoutSeconds { get { throw null; } set { } } } - public partial class JobStepOutput : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class JobStepOutput : Azure.Provisioning.Primitives.ProvisionableConstruct { public JobStepOutput() { } public Azure.Provisioning.BicepValue Credential { get { throw null; } set { } } @@ -528,7 +515,7 @@ public enum JobStepOutputType { SqlDatabase = 0, } - public partial class JobTarget : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class JobTarget : Azure.Provisioning.Primitives.ProvisionableConstruct { public JobTarget() { } public Azure.Provisioning.BicepValue DatabaseName { get { throw null; } set { } } @@ -552,20 +539,19 @@ public enum JobTargetType SqlShardMap = 3, SqlServer = 4, } - public partial class LedgerDigestUpload : Azure.Provisioning.Primitives.Resource + public partial class LedgerDigestUpload : Azure.Provisioning.Primitives.ProvisionableResource { - public LedgerDigestUpload(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public LedgerDigestUpload(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue DigestStorageEndpoint { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Name { get { throw null; } } public Azure.Provisioning.Sql.SqlDatabase? Parent { get { throw null; } set { } } public Azure.Provisioning.BicepValue State { get { throw null; } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.Sql.LedgerDigestUpload FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Sql.LedgerDigestUpload FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2021_11_01; - public static readonly string V2024_05_01_preview; } } public enum LedgerDigestUploadsName @@ -578,25 +564,24 @@ public enum LedgerDigestUploadsState Enabled = 0, Disabled = 1, } - public partial class LogicalDatabaseTransparentDataEncryption : Azure.Provisioning.Primitives.Resource + public partial class LogicalDatabaseTransparentDataEncryption : Azure.Provisioning.Primitives.ProvisionableResource { - public LogicalDatabaseTransparentDataEncryption(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public LogicalDatabaseTransparentDataEncryption(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Name { get { throw null; } } public Azure.Provisioning.Sql.SqlDatabase? Parent { get { throw null; } set { } } public Azure.Provisioning.BicepValue State { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.Sql.LogicalDatabaseTransparentDataEncryption FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Sql.LogicalDatabaseTransparentDataEncryption FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2014_04_01; public static readonly string V2021_11_01; - public static readonly string V2024_05_01_preview; } } - public partial class LongTermRetentionPolicy : Azure.Provisioning.Primitives.Resource + public partial class LongTermRetentionPolicy : Azure.Provisioning.Primitives.ProvisionableResource { - public LongTermRetentionPolicy(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public LongTermRetentionPolicy(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue BackupStorageAccessTier { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue MakeBackupsImmutable { get { throw null; } set { } } @@ -607,11 +592,10 @@ public partial class LongTermRetentionPolicy : Azure.Provisioning.Primitives.Res public Azure.Provisioning.BicepValue WeeklyRetention { get { throw null; } set { } } public Azure.Provisioning.BicepValue WeekOfYear { get { throw null; } set { } } public Azure.Provisioning.BicepValue YearlyRetention { get { throw null; } set { } } - public static Azure.Provisioning.Sql.LongTermRetentionPolicy FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Sql.LongTermRetentionPolicy FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2021_11_01; - public static readonly string V2024_05_01_preview; } } public enum LongTermRetentionPolicyName @@ -619,24 +603,23 @@ public enum LongTermRetentionPolicyName [System.Runtime.Serialization.DataMemberAttribute(Name="default")] Default = 0, } - public partial class ManagedBackupShortTermRetentionPolicy : Azure.Provisioning.Primitives.Resource + public partial class ManagedBackupShortTermRetentionPolicy : Azure.Provisioning.Primitives.ProvisionableResource { - public ManagedBackupShortTermRetentionPolicy(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public ManagedBackupShortTermRetentionPolicy(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Name { get { throw null; } } public Azure.Provisioning.Sql.ManagedDatabase? Parent { get { throw null; } set { } } public Azure.Provisioning.BicepValue RetentionDays { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.Sql.ManagedBackupShortTermRetentionPolicy FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Sql.ManagedBackupShortTermRetentionPolicy FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2021_11_01; - public static readonly string V2024_05_01_preview; } } - public partial class ManagedDatabase : Azure.Provisioning.Primitives.Resource + public partial class ManagedDatabase : Azure.Provisioning.Primitives.ProvisionableResource { - public ManagedDatabase(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public ManagedDatabase(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue AllowAutoCompleteRestore { get { throw null; } set { } } public Azure.Provisioning.BicepValue CatalogCollation { get { throw null; } set { } } public Azure.Provisioning.BicepValue Collation { get { throw null; } set { } } @@ -665,26 +648,25 @@ public partial class ManagedDatabase : Azure.Provisioning.Primitives.Resource public Azure.Provisioning.BicepValue StorageContainerUri { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } - public static Azure.Provisioning.Sql.ManagedDatabase FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Sql.ManagedDatabase FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2021_11_01; - public static readonly string V2024_05_01_preview; } } - public partial class ManagedDatabaseAdvancedThreatProtection : Azure.Provisioning.Primitives.Resource + public partial class ManagedDatabaseAdvancedThreatProtection : Azure.Provisioning.Primitives.ProvisionableResource { - public ManagedDatabaseAdvancedThreatProtection(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public ManagedDatabaseAdvancedThreatProtection(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue CreatedOn { get { throw null; } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Name { get { throw null; } } public Azure.Provisioning.Sql.ManagedDatabase? Parent { get { throw null; } set { } } public Azure.Provisioning.BicepValue State { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.Sql.ManagedDatabaseAdvancedThreatProtection FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Sql.ManagedDatabaseAdvancedThreatProtection FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { - public static readonly string V2024_05_01_preview; + public static readonly string V2021_11_01; } } public enum ManagedDatabaseCreateMode @@ -695,9 +677,9 @@ public enum ManagedDatabaseCreateMode Recovery = 3, RestoreLongTermRetentionBackup = 4, } - public partial class ManagedDatabaseSecurityAlertPolicy : Azure.Provisioning.Primitives.Resource + public partial class ManagedDatabaseSecurityAlertPolicy : Azure.Provisioning.Primitives.ProvisionableResource { - public ManagedDatabaseSecurityAlertPolicy(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public ManagedDatabaseSecurityAlertPolicy(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue CreatedOn { get { throw null; } } public Azure.Provisioning.BicepList DisabledAlerts { get { throw null; } set { } } public Azure.Provisioning.BicepList EmailAddresses { get { throw null; } set { } } @@ -710,16 +692,15 @@ public partial class ManagedDatabaseSecurityAlertPolicy : Azure.Provisioning.Pri public Azure.Provisioning.BicepValue StorageAccountAccessKey { get { throw null; } set { } } public Azure.Provisioning.BicepValue StorageEndpoint { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.Sql.ManagedDatabaseSecurityAlertPolicy FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Sql.ManagedDatabaseSecurityAlertPolicy FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2021_11_01; - public static readonly string V2024_05_01_preview; } } - public partial class ManagedDatabaseSensitivityLabel : Azure.Provisioning.Primitives.Resource + public partial class ManagedDatabaseSensitivityLabel : Azure.Provisioning.Primitives.ProvisionableResource { - public ManagedDatabaseSensitivityLabel(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public ManagedDatabaseSensitivityLabel(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue ColumnName { get { throw null; } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue InformationType { get { throw null; } set { } } @@ -733,7 +714,7 @@ public partial class ManagedDatabaseSensitivityLabel : Azure.Provisioning.Primit public Azure.Provisioning.BicepValue SchemaName { get { throw null; } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepValue TableName { get { throw null; } } - public static Azure.Provisioning.Sql.ManagedDatabaseSensitivityLabel FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Sql.ManagedDatabaseSensitivityLabel FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } } public enum ManagedDatabaseStatus { @@ -752,9 +733,9 @@ public enum ManagedDatabaseStatus [System.Runtime.Serialization.DataMemberAttribute(Name="DbCopying")] DBCopying = 11, } - public partial class ManagedDatabaseVulnerabilityAssessment : Azure.Provisioning.Primitives.Resource + public partial class ManagedDatabaseVulnerabilityAssessment : Azure.Provisioning.Primitives.ProvisionableResource { - public ManagedDatabaseVulnerabilityAssessment(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public ManagedDatabaseVulnerabilityAssessment(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Name { get { throw null; } } public Azure.Provisioning.Sql.ManagedDatabase? Parent { get { throw null; } set { } } @@ -763,25 +744,24 @@ public partial class ManagedDatabaseVulnerabilityAssessment : Azure.Provisioning public Azure.Provisioning.BicepValue StorageContainerPath { get { throw null; } set { } } public Azure.Provisioning.BicepValue StorageContainerSasKey { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.Sql.ManagedDatabaseVulnerabilityAssessment FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Sql.ManagedDatabaseVulnerabilityAssessment FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2021_11_01; - public static readonly string V2024_05_01_preview; } } - public partial class ManagedDatabaseVulnerabilityAssessmentRuleBaseline : Azure.Provisioning.Primitives.Resource + public partial class ManagedDatabaseVulnerabilityAssessmentRuleBaseline : Azure.Provisioning.Primitives.ProvisionableResource { - public ManagedDatabaseVulnerabilityAssessmentRuleBaseline(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public ManagedDatabaseVulnerabilityAssessmentRuleBaseline(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepList BaselineResults { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Name { get { throw null; } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.Sql.ManagedDatabaseVulnerabilityAssessmentRuleBaseline FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Sql.ManagedDatabaseVulnerabilityAssessmentRuleBaseline FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } } - public partial class ManagedInstance : Azure.Provisioning.Primitives.Resource + public partial class ManagedInstance : Azure.Provisioning.Primitives.ProvisionableResource { - public ManagedInstance(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public ManagedInstance(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue AdministratorLogin { get { throw null; } set { } } public Azure.Provisioning.BicepValue AdministratorLoginPassword { get { throw null; } set { } } public Azure.Provisioning.BicepValue Administrators { get { throw null; } set { } } @@ -818,18 +798,17 @@ public partial class ManagedInstance : Azure.Provisioning.Primitives.Resource public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } public Azure.Provisioning.BicepValue TimezoneId { get { throw null; } set { } } public Azure.Provisioning.BicepValue VCores { get { throw null; } set { } } - public static Azure.Provisioning.Sql.ManagedInstance FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Sql.ManagedInstance FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override Azure.Provisioning.Primitives.ResourceNameRequirements GetResourceNameRequirements() { throw null; } public static partial class ResourceVersions { public static readonly string V2021_11_01; - public static readonly string V2024_05_01_preview; } } - public partial class ManagedInstanceAdministrator : Azure.Provisioning.Primitives.Resource + public partial class ManagedInstanceAdministrator : Azure.Provisioning.Primitives.ProvisionableResource { - public ManagedInstanceAdministrator(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public ManagedInstanceAdministrator(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue AdministratorType { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Login { get { throw null; } set { } } @@ -838,50 +817,48 @@ public partial class ManagedInstanceAdministrator : Azure.Provisioning.Primitive public Azure.Provisioning.BicepValue Sid { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepValue TenantId { get { throw null; } set { } } - public static Azure.Provisioning.Sql.ManagedInstanceAdministrator FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Sql.ManagedInstanceAdministrator FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2021_11_01; - public static readonly string V2024_05_01_preview; } } public enum ManagedInstanceAdministratorType { ActiveDirectory = 0, } - public partial class ManagedInstanceAdvancedThreatProtection : Azure.Provisioning.Primitives.Resource + public partial class ManagedInstanceAdvancedThreatProtection : Azure.Provisioning.Primitives.ProvisionableResource { - public ManagedInstanceAdvancedThreatProtection(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public ManagedInstanceAdvancedThreatProtection(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue CreatedOn { get { throw null; } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Name { get { throw null; } } public Azure.Provisioning.Sql.ManagedInstance? Parent { get { throw null; } set { } } public Azure.Provisioning.BicepValue State { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.Sql.ManagedInstanceAdvancedThreatProtection FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Sql.ManagedInstanceAdvancedThreatProtection FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { - public static readonly string V2024_05_01_preview; + public static readonly string V2021_11_01; } } - public partial class ManagedInstanceAzureADOnlyAuthentication : Azure.Provisioning.Primitives.Resource + public partial class ManagedInstanceAzureADOnlyAuthentication : Azure.Provisioning.Primitives.ProvisionableResource { - public ManagedInstanceAzureADOnlyAuthentication(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public ManagedInstanceAzureADOnlyAuthentication(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue IsAzureADOnlyAuthenticationEnabled { get { throw null; } set { } } public Azure.Provisioning.BicepValue Name { get { throw null; } } public Azure.Provisioning.Sql.ManagedInstance? Parent { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.Sql.ManagedInstanceAzureADOnlyAuthentication FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Sql.ManagedInstanceAzureADOnlyAuthentication FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2021_11_01; - public static readonly string V2024_05_01_preview; } } - public partial class ManagedInstanceDtc : Azure.Provisioning.Primitives.Resource + public partial class ManagedInstanceDtc : Azure.Provisioning.Primitives.ProvisionableResource { - public ManagedInstanceDtc(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public ManagedInstanceDtc(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue DtcEnabled { get { throw null; } set { } } public Azure.Provisioning.BicepValue DtcHostNameDnsSuffix { get { throw null; } } public Azure.Provisioning.BicepList ExternalDnsSuffixSearchList { get { throw null; } set { } } @@ -891,14 +868,13 @@ public partial class ManagedInstanceDtc : Azure.Provisioning.Primitives.Resource public Azure.Provisioning.BicepValue ProvisioningState { get { throw null; } } public Azure.Provisioning.BicepValue SecuritySettings { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.Sql.ManagedInstanceDtc FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Sql.ManagedInstanceDtc FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2021_11_01; - public static readonly string V2024_05_01_preview; } } - public partial class ManagedInstanceDtcSecuritySettings : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ManagedInstanceDtcSecuritySettings : Azure.Provisioning.Primitives.ProvisionableConstruct { public ManagedInstanceDtcSecuritySettings() { } public Azure.Provisioning.BicepValue IsXATransactionsEnabled { get { throw null; } set { } } @@ -907,16 +883,16 @@ public ManagedInstanceDtcSecuritySettings() { } public Azure.Provisioning.BicepValue XATransactionsDefaultTimeoutInSeconds { get { throw null; } set { } } public Azure.Provisioning.BicepValue XATransactionsMaximumTimeoutInSeconds { get { throw null; } set { } } } - public partial class ManagedInstanceDtcTransactionManagerCommunicationSettings : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ManagedInstanceDtcTransactionManagerCommunicationSettings : Azure.Provisioning.Primitives.ProvisionableConstruct { public ManagedInstanceDtcTransactionManagerCommunicationSettings() { } public Azure.Provisioning.BicepValue AllowInboundEnabled { get { throw null; } set { } } public Azure.Provisioning.BicepValue AllowOutboundEnabled { get { throw null; } set { } } public Azure.Provisioning.BicepValue Authentication { get { throw null; } set { } } } - public partial class ManagedInstanceEncryptionProtector : Azure.Provisioning.Primitives.Resource + public partial class ManagedInstanceEncryptionProtector : Azure.Provisioning.Primitives.ProvisionableResource { - public ManagedInstanceEncryptionProtector(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public ManagedInstanceEncryptionProtector(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue IsAutoRotationEnabled { get { throw null; } set { } } public Azure.Provisioning.BicepValue Kind { get { throw null; } } @@ -927,14 +903,13 @@ public partial class ManagedInstanceEncryptionProtector : Azure.Provisioning.Pri public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepValue Thumbprint { get { throw null; } } public Azure.Provisioning.BicepValue Uri { get { throw null; } } - public static Azure.Provisioning.Sql.ManagedInstanceEncryptionProtector FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Sql.ManagedInstanceEncryptionProtector FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2021_11_01; - public static readonly string V2024_05_01_preview; } } - public partial class ManagedInstanceExternalAdministrator : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ManagedInstanceExternalAdministrator : Azure.Provisioning.Primitives.ProvisionableConstruct { public ManagedInstanceExternalAdministrator() { } public Azure.Provisioning.BicepValue AdministratorType { get { throw null; } set { } } @@ -944,9 +919,9 @@ public ManagedInstanceExternalAdministrator() { } public Azure.Provisioning.BicepValue Sid { get { throw null; } set { } } public Azure.Provisioning.BicepValue TenantId { get { throw null; } set { } } } - public partial class ManagedInstanceKey : Azure.Provisioning.Primitives.Resource + public partial class ManagedInstanceKey : Azure.Provisioning.Primitives.ProvisionableResource { - public ManagedInstanceKey(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public ManagedInstanceKey(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue CreatedOn { get { throw null; } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue IsAutoRotationEnabled { get { throw null; } } @@ -957,11 +932,10 @@ public partial class ManagedInstanceKey : Azure.Provisioning.Primitives.Resource public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepValue Thumbprint { get { throw null; } } public Azure.Provisioning.BicepValue Uri { get { throw null; } set { } } - public static Azure.Provisioning.Sql.ManagedInstanceKey FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Sql.ManagedInstanceKey FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2021_11_01; - public static readonly string V2024_05_01_preview; } } public enum ManagedInstanceLicenseType @@ -969,9 +943,9 @@ public enum ManagedInstanceLicenseType LicenseIncluded = 0, BasePrice = 1, } - public partial class ManagedInstanceLongTermRetentionPolicy : Azure.Provisioning.Primitives.Resource + public partial class ManagedInstanceLongTermRetentionPolicy : Azure.Provisioning.Primitives.ProvisionableResource { - public ManagedInstanceLongTermRetentionPolicy(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public ManagedInstanceLongTermRetentionPolicy(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue MonthlyRetention { get { throw null; } set { } } public Azure.Provisioning.BicepValue Name { get { throw null; } } @@ -980,11 +954,10 @@ public partial class ManagedInstanceLongTermRetentionPolicy : Azure.Provisioning public Azure.Provisioning.BicepValue WeeklyRetention { get { throw null; } set { } } public Azure.Provisioning.BicepValue WeekOfYear { get { throw null; } set { } } public Azure.Provisioning.BicepValue YearlyRetention { get { throw null; } set { } } - public static Azure.Provisioning.Sql.ManagedInstanceLongTermRetentionPolicy FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Sql.ManagedInstanceLongTermRetentionPolicy FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2021_11_01; - public static readonly string V2024_05_01_preview; } } public enum ManagedInstanceLongTermRetentionPolicyName @@ -992,21 +965,21 @@ public enum ManagedInstanceLongTermRetentionPolicyName [System.Runtime.Serialization.DataMemberAttribute(Name="default")] Default = 0, } - public partial class ManagedInstancePairInfo : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ManagedInstancePairInfo : Azure.Provisioning.Primitives.ProvisionableConstruct { public ManagedInstancePairInfo() { } public Azure.Provisioning.BicepValue PartnerManagedInstanceId { get { throw null; } set { } } public Azure.Provisioning.BicepValue PrimaryManagedInstanceId { get { throw null; } set { } } } - public partial class ManagedInstancePecProperty : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ManagedInstancePecProperty : Azure.Provisioning.Primitives.ProvisionableConstruct { public ManagedInstancePecProperty() { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Properties { get { throw null; } } } - public partial class ManagedInstancePrivateEndpointConnection : Azure.Provisioning.Primitives.Resource + public partial class ManagedInstancePrivateEndpointConnection : Azure.Provisioning.Primitives.ProvisionableResource { - public ManagedInstancePrivateEndpointConnection(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public ManagedInstancePrivateEndpointConnection(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue ConnectionState { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } @@ -1014,21 +987,20 @@ public partial class ManagedInstancePrivateEndpointConnection : Azure.Provisioni public Azure.Provisioning.BicepValue PrivateEndpointId { get { throw null; } set { } } public Azure.Provisioning.BicepValue ProvisioningState { get { throw null; } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.Sql.ManagedInstancePrivateEndpointConnection FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Sql.ManagedInstancePrivateEndpointConnection FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2021_11_01; - public static readonly string V2024_05_01_preview; } } - public partial class ManagedInstancePrivateEndpointConnectionProperties : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ManagedInstancePrivateEndpointConnectionProperties : Azure.Provisioning.Primitives.ProvisionableConstruct { public ManagedInstancePrivateEndpointConnectionProperties() { } public Azure.Provisioning.BicepValue PrivateEndpointId { get { throw null; } } public Azure.Provisioning.BicepValue PrivateLinkServiceConnectionState { get { throw null; } } public Azure.Provisioning.BicepValue ProvisioningState { get { throw null; } } } - public partial class ManagedInstancePrivateLinkServiceConnectionStateProperty : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ManagedInstancePrivateLinkServiceConnectionStateProperty : Azure.Provisioning.Primitives.ProvisionableConstruct { public ManagedInstancePrivateLinkServiceConnectionStateProperty() { } public Azure.Provisioning.BicepValue ActionsRequired { get { throw null; } } @@ -1059,20 +1031,19 @@ public enum ManagedInstanceProxyOverride Redirect = 1, Default = 2, } - public partial class ManagedInstanceServerConfigurationOption : Azure.Provisioning.Primitives.Resource + public partial class ManagedInstanceServerConfigurationOption : Azure.Provisioning.Primitives.ProvisionableResource { - public ManagedInstanceServerConfigurationOption(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public ManagedInstanceServerConfigurationOption(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Name { get { throw null; } } public Azure.Provisioning.Sql.ManagedInstance? Parent { get { throw null; } set { } } public Azure.Provisioning.BicepValue ProvisioningState { get { throw null; } } public Azure.Provisioning.BicepValue ServerConfigurationOptionValue { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.Sql.ManagedInstanceServerConfigurationOption FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Sql.ManagedInstanceServerConfigurationOption FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2021_11_01; - public static readonly string V2024_05_01_preview; } } public enum ManagedInstanceServerConfigurationOptionName @@ -1080,9 +1051,9 @@ public enum ManagedInstanceServerConfigurationOptionName [System.Runtime.Serialization.DataMemberAttribute(Name="allowPolybaseExport")] AllowPolybaseExport = 0, } - public partial class ManagedInstanceServerTrustCertificate : Azure.Provisioning.Primitives.Resource + public partial class ManagedInstanceServerTrustCertificate : Azure.Provisioning.Primitives.ProvisionableResource { - public ManagedInstanceServerTrustCertificate(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public ManagedInstanceServerTrustCertificate(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue CertificateName { get { throw null; } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } @@ -1090,16 +1061,15 @@ public partial class ManagedInstanceServerTrustCertificate : Azure.Provisioning. public Azure.Provisioning.BicepValue PublicBlob { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepValue Thumbprint { get { throw null; } } - public static Azure.Provisioning.Sql.ManagedInstanceServerTrustCertificate FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Sql.ManagedInstanceServerTrustCertificate FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2021_11_01; - public static readonly string V2024_05_01_preview; } } - public partial class ManagedInstanceStartStopSchedule : Azure.Provisioning.Primitives.Resource + public partial class ManagedInstanceStartStopSchedule : Azure.Provisioning.Primitives.ProvisionableResource { - public ManagedInstanceStartStopSchedule(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public ManagedInstanceStartStopSchedule(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Description { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Name { get { throw null; } } @@ -1109,11 +1079,10 @@ public partial class ManagedInstanceStartStopSchedule : Azure.Provisioning.Primi public Azure.Provisioning.BicepList ScheduleList { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepValue TimeZoneId { get { throw null; } set { } } - public static Azure.Provisioning.Sql.ManagedInstanceStartStopSchedule FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Sql.ManagedInstanceStartStopSchedule FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2021_11_01; - public static readonly string V2024_05_01_preview; } } public enum ManagedInstanceStartStopScheduleName @@ -1121,9 +1090,9 @@ public enum ManagedInstanceStartStopScheduleName [System.Runtime.Serialization.DataMemberAttribute(Name="default")] Default = 0, } - public partial class ManagedInstanceVulnerabilityAssessment : Azure.Provisioning.Primitives.Resource + public partial class ManagedInstanceVulnerabilityAssessment : Azure.Provisioning.Primitives.ProvisionableResource { - public ManagedInstanceVulnerabilityAssessment(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public ManagedInstanceVulnerabilityAssessment(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Name { get { throw null; } } public Azure.Provisioning.Sql.ManagedInstance? Parent { get { throw null; } set { } } @@ -1132,26 +1101,25 @@ public partial class ManagedInstanceVulnerabilityAssessment : Azure.Provisioning public Azure.Provisioning.BicepValue StorageContainerPath { get { throw null; } set { } } public Azure.Provisioning.BicepValue StorageContainerSasKey { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.Sql.ManagedInstanceVulnerabilityAssessment FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Sql.ManagedInstanceVulnerabilityAssessment FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2021_11_01; - public static readonly string V2024_05_01_preview; } } - public partial class ManagedLedgerDigestUpload : Azure.Provisioning.Primitives.Resource + public partial class ManagedLedgerDigestUpload : Azure.Provisioning.Primitives.ProvisionableResource { - public ManagedLedgerDigestUpload(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public ManagedLedgerDigestUpload(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue DigestStorageEndpoint { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Name { get { throw null; } } public Azure.Provisioning.Sql.ManagedDatabase? Parent { get { throw null; } set { } } public Azure.Provisioning.BicepValue State { get { throw null; } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.Sql.ManagedLedgerDigestUpload FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Sql.ManagedLedgerDigestUpload FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { - public static readonly string V2024_05_01_preview; + public static readonly string V2021_11_01; } } public enum ManagedLedgerDigestUploadsName @@ -1164,23 +1132,23 @@ public enum ManagedLedgerDigestUploadsState Enabled = 0, Disabled = 1, } - public partial class ManagedRestorableDroppedDbBackupShortTermRetentionPolicy : Azure.Provisioning.Primitives.Resource + public partial class ManagedRestorableDroppedDbBackupShortTermRetentionPolicy : Azure.Provisioning.Primitives.ProvisionableResource { - public ManagedRestorableDroppedDbBackupShortTermRetentionPolicy(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public ManagedRestorableDroppedDbBackupShortTermRetentionPolicy(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Name { get { throw null; } } public Azure.Provisioning.BicepValue RetentionDays { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.Sql.ManagedRestorableDroppedDbBackupShortTermRetentionPolicy FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Sql.ManagedRestorableDroppedDbBackupShortTermRetentionPolicy FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } } public enum ManagedServerCreateMode { Default = 0, PointInTimeRestore = 1, } - public partial class ManagedServerDnsAlias : Azure.Provisioning.Primitives.Resource + public partial class ManagedServerDnsAlias : Azure.Provisioning.Primitives.ProvisionableResource { - public ManagedServerDnsAlias(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public ManagedServerDnsAlias(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue AzureDnsRecord { get { throw null; } } public Azure.Provisioning.BicepValue CreateDnsRecord { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } @@ -1188,16 +1156,15 @@ public partial class ManagedServerDnsAlias : Azure.Provisioning.Primitives.Resou public Azure.Provisioning.Sql.ManagedInstance? Parent { get { throw null; } set { } } public Azure.Provisioning.BicepValue PublicAzureDnsRecord { get { throw null; } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.Sql.ManagedServerDnsAlias FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Sql.ManagedServerDnsAlias FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2021_11_01; - public static readonly string V2024_05_01_preview; } } - public partial class ManagedServerSecurityAlertPolicy : Azure.Provisioning.Primitives.Resource + public partial class ManagedServerSecurityAlertPolicy : Azure.Provisioning.Primitives.ProvisionableResource { - public ManagedServerSecurityAlertPolicy(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public ManagedServerSecurityAlertPolicy(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue CreatedOn { get { throw null; } } public Azure.Provisioning.BicepList DisabledAlerts { get { throw null; } set { } } public Azure.Provisioning.BicepList EmailAddresses { get { throw null; } set { } } @@ -1210,11 +1177,10 @@ public partial class ManagedServerSecurityAlertPolicy : Azure.Provisioning.Primi public Azure.Provisioning.BicepValue StorageAccountAccessKey { get { throw null; } set { } } public Azure.Provisioning.BicepValue StorageEndpoint { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.Sql.ManagedServerSecurityAlertPolicy FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Sql.ManagedServerSecurityAlertPolicy FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2021_11_01; - public static readonly string V2024_05_01_preview; } } public enum ManagedShortTermRetentionPolicyName @@ -1222,45 +1188,43 @@ public enum ManagedShortTermRetentionPolicyName [System.Runtime.Serialization.DataMemberAttribute(Name="default")] Default = 0, } - public partial class ManagedTransparentDataEncryption : Azure.Provisioning.Primitives.Resource + public partial class ManagedTransparentDataEncryption : Azure.Provisioning.Primitives.ProvisionableResource { - public ManagedTransparentDataEncryption(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public ManagedTransparentDataEncryption(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Name { get { throw null; } } public Azure.Provisioning.Sql.ManagedDatabase? Parent { get { throw null; } set { } } public Azure.Provisioning.BicepValue State { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.Sql.ManagedTransparentDataEncryption FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Sql.ManagedTransparentDataEncryption FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2021_11_01; - public static readonly string V2024_05_01_preview; } } - public partial class OutboundFirewallRule : Azure.Provisioning.Primitives.Resource + public partial class OutboundFirewallRule : Azure.Provisioning.Primitives.ProvisionableResource { - public OutboundFirewallRule(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public OutboundFirewallRule(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Name { get { throw null; } } public Azure.Provisioning.Sql.SqlServer? Parent { get { throw null; } set { } } public Azure.Provisioning.BicepValue ProvisioningState { get { throw null; } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.Sql.OutboundFirewallRule FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Sql.OutboundFirewallRule FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2014_01_01; public static readonly string V2014_04_01; public static readonly string V2021_11_01; - public static readonly string V2024_05_01_preview; } } - public partial class PartnerRegionInfo : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class PartnerRegionInfo : Azure.Provisioning.Primitives.ProvisionableConstruct { public PartnerRegionInfo() { } public Azure.Provisioning.BicepValue Location { get { throw null; } set { } } public Azure.Provisioning.BicepValue ReplicationRole { get { throw null; } } } - public partial class PartnerServerInfo : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class PartnerServerInfo : Azure.Provisioning.Primitives.ProvisionableConstruct { public PartnerServerInfo() { } public Azure.Provisioning.BicepValue Id { get { throw null; } set { } } @@ -1315,20 +1279,19 @@ public enum SensitivityLabelRank High = 3, Critical = 4, } - public partial class ServerAdvancedThreatProtection : Azure.Provisioning.Primitives.Resource + public partial class ServerAdvancedThreatProtection : Azure.Provisioning.Primitives.ProvisionableResource { - public ServerAdvancedThreatProtection(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public ServerAdvancedThreatProtection(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue CreatedOn { get { throw null; } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Name { get { throw null; } } public Azure.Provisioning.Sql.SqlServer? Parent { get { throw null; } set { } } public Azure.Provisioning.BicepValue State { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.Sql.ServerAdvancedThreatProtection FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Sql.ServerAdvancedThreatProtection FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2021_11_01; - public static readonly string V2024_05_01_preview; } } public enum ServerConnectionType @@ -1337,7 +1300,7 @@ public enum ServerConnectionType Redirect = 1, Proxy = 2, } - public partial class ServerExternalAdministrator : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ServerExternalAdministrator : Azure.Provisioning.Primitives.ProvisionableConstruct { public ServerExternalAdministrator() { } public Azure.Provisioning.BicepValue AdministratorType { get { throw null; } set { } } @@ -1353,7 +1316,7 @@ public enum ServerNetworkAccessFlag Disabled = 1, SecuredByPerimeter = 2, } - public partial class ServerPrivateEndpointConnectionProperties : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ServerPrivateEndpointConnectionProperties : Azure.Provisioning.Primitives.ProvisionableConstruct { public ServerPrivateEndpointConnectionProperties() { } public Azure.Provisioning.BicepValue ConnectionState { get { throw null; } } @@ -1366,7 +1329,7 @@ public enum ServerTrustGroupPropertiesTrustScopesItem GlobalTransactions = 0, ServiceBroker = 1, } - public partial class ServerTrustGroupServerInfo : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ServerTrustGroupServerInfo : Azure.Provisioning.Primitives.ProvisionableConstruct { public ServerTrustGroupServerInfo() { } public Azure.Provisioning.BicepValue ServerId { get { throw null; } set { } } @@ -1389,20 +1352,19 @@ public enum SqlAdministratorType { ActiveDirectory = 0, } - public partial class SqlAgentConfiguration : Azure.Provisioning.Primitives.Resource + public partial class SqlAgentConfiguration : Azure.Provisioning.Primitives.ProvisionableResource { - public SqlAgentConfiguration(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public SqlAgentConfiguration(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Name { get { throw null; } } public Azure.Provisioning.Sql.ManagedInstance? Parent { get { throw null; } set { } } public Azure.Provisioning.BicepValue State { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.Sql.SqlAgentConfiguration FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Sql.SqlAgentConfiguration FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2018_06_01; public static readonly string V2021_11_01; - public static readonly string V2024_05_01_preview; } } public enum SqlAgentConfigurationPropertiesState @@ -1461,9 +1423,9 @@ public enum SqlBackupStorageRedundancy public static bool operator !=(Azure.Provisioning.Sql.SqlBuiltInRole left, Azure.Provisioning.Sql.SqlBuiltInRole right) { throw null; } public override string ToString() { throw null; } } - public partial class SqlDatabase : Azure.Provisioning.Primitives.Resource + public partial class SqlDatabase : Azure.Provisioning.Primitives.ProvisionableResource { - public SqlDatabase(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public SqlDatabase(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue AutoPauseDelay { get { throw null; } set { } } public Azure.Provisioning.BicepValue AvailabilityZone { get { throw null; } set { } } public Azure.Provisioning.BicepValue CatalogCollation { get { throw null; } set { } } @@ -1522,7 +1484,7 @@ public partial class SqlDatabase : Azure.Provisioning.Primitives.Resource public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } public Azure.Provisioning.BicepValue UseFreeLimit { get { throw null; } set { } } - public static Azure.Provisioning.Sql.SqlDatabase FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Sql.SqlDatabase FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override Azure.Provisioning.Primitives.ResourceNameRequirements GetResourceNameRequirements() { throw null; } public static partial class ResourceVersions @@ -1531,12 +1493,11 @@ public static partial class ResourceVersions public static readonly string V2014_04_01; public static readonly string V2015_01_01; public static readonly string V2021_11_01; - public static readonly string V2024_05_01_preview; } } - public partial class SqlDatabaseBlobAuditingPolicy : Azure.Provisioning.Primitives.Resource + public partial class SqlDatabaseBlobAuditingPolicy : Azure.Provisioning.Primitives.ProvisionableResource { - public SqlDatabaseBlobAuditingPolicy(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public SqlDatabaseBlobAuditingPolicy(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepList AuditActionsAndGroups { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue IsAzureMonitorTargetEnabled { get { throw null; } set { } } @@ -1552,11 +1513,10 @@ public partial class SqlDatabaseBlobAuditingPolicy : Azure.Provisioning.Primitiv public Azure.Provisioning.BicepValue StorageAccountSubscriptionId { get { throw null; } set { } } public Azure.Provisioning.BicepValue StorageEndpoint { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.Sql.SqlDatabaseBlobAuditingPolicy FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Sql.SqlDatabaseBlobAuditingPolicy FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2021_11_01; - public static readonly string V2024_05_01_preview; } } public enum SqlDatabaseCreateMode @@ -1572,7 +1532,7 @@ public enum SqlDatabaseCreateMode RestoreLongTermRetentionBackup = 8, OnlineSecondary = 9, } - public partial class SqlDatabaseKey : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class SqlDatabaseKey : Azure.Provisioning.Primitives.ProvisionableConstruct { public SqlDatabaseKey() { } public Azure.Provisioning.BicepValue CreatedOn { get { throw null; } } @@ -1584,9 +1544,9 @@ public enum SqlDatabaseKeyType { AzureKeyVault = 0, } - public partial class SqlDatabaseSecurityAlertPolicy : Azure.Provisioning.Primitives.Resource + public partial class SqlDatabaseSecurityAlertPolicy : Azure.Provisioning.Primitives.ProvisionableResource { - public SqlDatabaseSecurityAlertPolicy(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public SqlDatabaseSecurityAlertPolicy(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue CreatedOn { get { throw null; } } public Azure.Provisioning.BicepList DisabledAlerts { get { throw null; } set { } } public Azure.Provisioning.BicepList EmailAddresses { get { throw null; } set { } } @@ -1599,18 +1559,17 @@ public partial class SqlDatabaseSecurityAlertPolicy : Azure.Provisioning.Primiti public Azure.Provisioning.BicepValue StorageAccountAccessKey { get { throw null; } set { } } public Azure.Provisioning.BicepValue StorageEndpoint { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.Sql.SqlDatabaseSecurityAlertPolicy FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Sql.SqlDatabaseSecurityAlertPolicy FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2014_01_01; public static readonly string V2014_04_01; public static readonly string V2021_11_01; - public static readonly string V2024_05_01_preview; } } - public partial class SqlDatabaseSensitivityLabel : Azure.Provisioning.Primitives.Resource + public partial class SqlDatabaseSensitivityLabel : Azure.Provisioning.Primitives.ProvisionableResource { - public SqlDatabaseSensitivityLabel(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public SqlDatabaseSensitivityLabel(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue ColumnName { get { throw null; } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue InformationType { get { throw null; } set { } } @@ -1624,28 +1583,28 @@ public partial class SqlDatabaseSensitivityLabel : Azure.Provisioning.Primitives public Azure.Provisioning.BicepValue SchemaName { get { throw null; } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepValue TableName { get { throw null; } } - public static Azure.Provisioning.Sql.SqlDatabaseSensitivityLabel FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Sql.SqlDatabaseSensitivityLabel FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } } - public partial class SqlDatabaseSqlVulnerabilityAssessmentBaseline : Azure.Provisioning.Primitives.Resource + public partial class SqlDatabaseSqlVulnerabilityAssessmentBaseline : Azure.Provisioning.Primitives.ProvisionableResource { - public SqlDatabaseSqlVulnerabilityAssessmentBaseline(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public SqlDatabaseSqlVulnerabilityAssessmentBaseline(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue IsLatestScan { get { throw null; } set { } } public Azure.Provisioning.BicepValue Name { get { throw null; } } public Azure.Provisioning.BicepDictionary>> Results { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.Sql.SqlDatabaseSqlVulnerabilityAssessmentBaseline FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Sql.SqlDatabaseSqlVulnerabilityAssessmentBaseline FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } } - public partial class SqlDatabaseSqlVulnerabilityAssessmentBaselineRule : Azure.Provisioning.Primitives.Resource + public partial class SqlDatabaseSqlVulnerabilityAssessmentBaselineRule : Azure.Provisioning.Primitives.ProvisionableResource { - public SqlDatabaseSqlVulnerabilityAssessmentBaselineRule(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public SqlDatabaseSqlVulnerabilityAssessmentBaselineRule(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue IsLatestScan { get { throw null; } set { } } public Azure.Provisioning.BicepValue Name { get { throw null; } } public Azure.Provisioning.Sql.SqlDatabaseSqlVulnerabilityAssessmentBaseline? Parent { get { throw null; } set { } } public Azure.Provisioning.BicepList> Results { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.Sql.SqlDatabaseSqlVulnerabilityAssessmentBaselineRule FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Sql.SqlDatabaseSqlVulnerabilityAssessmentBaselineRule FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } } public enum SqlDatabaseStatus { @@ -1674,9 +1633,9 @@ public enum SqlDatabaseStatus Stopped = 22, Starting = 23, } - public partial class SqlDatabaseVulnerabilityAssessment : Azure.Provisioning.Primitives.Resource + public partial class SqlDatabaseVulnerabilityAssessment : Azure.Provisioning.Primitives.ProvisionableResource { - public SqlDatabaseVulnerabilityAssessment(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public SqlDatabaseVulnerabilityAssessment(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Name { get { throw null; } } public Azure.Provisioning.Sql.SqlDatabase? Parent { get { throw null; } set { } } @@ -1685,21 +1644,20 @@ public partial class SqlDatabaseVulnerabilityAssessment : Azure.Provisioning.Pri public Azure.Provisioning.BicepValue StorageContainerPath { get { throw null; } set { } } public Azure.Provisioning.BicepValue StorageContainerSasKey { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.Sql.SqlDatabaseVulnerabilityAssessment FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Sql.SqlDatabaseVulnerabilityAssessment FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2021_11_01; - public static readonly string V2024_05_01_preview; } } - public partial class SqlDatabaseVulnerabilityAssessmentRuleBaseline : Azure.Provisioning.Primitives.Resource + public partial class SqlDatabaseVulnerabilityAssessmentRuleBaseline : Azure.Provisioning.Primitives.ProvisionableResource { - public SqlDatabaseVulnerabilityAssessmentRuleBaseline(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public SqlDatabaseVulnerabilityAssessmentRuleBaseline(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepList BaselineResults { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Name { get { throw null; } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.Sql.SqlDatabaseVulnerabilityAssessmentRuleBaseline FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Sql.SqlDatabaseVulnerabilityAssessmentRuleBaseline FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } } public enum SqlDayOfWeek { @@ -1711,15 +1669,15 @@ public enum SqlDayOfWeek Friday = 5, Saturday = 6, } - public partial class SqlFirewallRule : Azure.Provisioning.Primitives.Resource + public partial class SqlFirewallRule : Azure.Provisioning.Primitives.ProvisionableResource { - public SqlFirewallRule(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public SqlFirewallRule(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue EndIPAddress { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } public Azure.Provisioning.Sql.SqlServer? Parent { get { throw null; } set { } } public Azure.Provisioning.BicepValue StartIPAddress { get { throw null; } set { } } - public static Azure.Provisioning.Sql.SqlFirewallRule FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Sql.SqlFirewallRule FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override Azure.Provisioning.Primitives.ResourceNameRequirements GetResourceNameRequirements() { throw null; } public static partial class ResourceVersions @@ -1727,7 +1685,6 @@ public static partial class ResourceVersions public static readonly string V2014_01_01; public static readonly string V2014_04_01; public static readonly string V2021_11_01; - public static readonly string V2024_05_01_preview; } } public enum SqlMinimalTlsVersion @@ -1743,9 +1700,9 @@ public enum SqlMinimalTlsVersion [System.Runtime.Serialization.DataMemberAttribute(Name="1.3")] Tls1_3 = 4, } - public partial class SqlPrivateEndpointConnection : Azure.Provisioning.Primitives.Resource + public partial class SqlPrivateEndpointConnection : Azure.Provisioning.Primitives.ProvisionableResource { - public SqlPrivateEndpointConnection(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public SqlPrivateEndpointConnection(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue ConnectionState { get { throw null; } set { } } public Azure.Provisioning.BicepList GroupIds { get { throw null; } } public Azure.Provisioning.BicepValue Id { get { throw null; } } @@ -1754,13 +1711,12 @@ public partial class SqlPrivateEndpointConnection : Azure.Provisioning.Primitive public Azure.Provisioning.BicepValue PrivateEndpointId { get { throw null; } set { } } public Azure.Provisioning.BicepValue ProvisioningState { get { throw null; } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.Sql.SqlPrivateEndpointConnection FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Sql.SqlPrivateEndpointConnection FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2014_01_01; public static readonly string V2014_04_01; public static readonly string V2021_11_01; - public static readonly string V2024_05_01_preview; } } public enum SqlPrivateEndpointProvisioningState @@ -1775,7 +1731,7 @@ public enum SqlPrivateLinkServiceConnectionActionsRequired { None = 0, } - public partial class SqlPrivateLinkServiceConnectionStateProperty : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class SqlPrivateLinkServiceConnectionStateProperty : Azure.Provisioning.Primitives.ProvisionableConstruct { public SqlPrivateLinkServiceConnectionStateProperty() { } public Azure.Provisioning.BicepValue ActionsRequired { get { throw null; } } @@ -1789,7 +1745,7 @@ public enum SqlPrivateLinkServiceConnectionStatus Rejected = 2, Disconnected = 3, } - public partial class SqlScheduleItem : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class SqlScheduleItem : Azure.Provisioning.Primitives.ProvisionableConstruct { public SqlScheduleItem() { } public Azure.Provisioning.BicepValue StartDay { get { throw null; } set { } } @@ -1801,9 +1757,9 @@ public enum SqlSecurityAlertPolicyName { Default = 0, } - public partial class SqlServer : Azure.Provisioning.Primitives.Resource + public partial class SqlServer : Azure.Provisioning.Primitives.ProvisionableResource { - public SqlServer(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public SqlServer(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue AdministratorLogin { get { throw null; } set { } } public Azure.Provisioning.BicepValue AdministratorLoginPassword { get { throw null; } set { } } public Azure.Provisioning.BicepValue Administrators { get { throw null; } set { } } @@ -1827,9 +1783,9 @@ public partial class SqlServer : Azure.Provisioning.Primitives.Resource public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } public Azure.Provisioning.BicepValue Version { get { throw null; } set { } } public Azure.Provisioning.BicepValue WorkspaceFeature { get { throw null; } } - public Azure.Provisioning.Authorization.RoleAssignment CreateRoleAssignment(Azure.Provisioning.Sql.SqlBuiltInRole role, Azure.Provisioning.BicepValue principalType, Azure.Provisioning.BicepValue principalId, string? identifierNameSuffix = null) { throw null; } + public Azure.Provisioning.Authorization.RoleAssignment CreateRoleAssignment(Azure.Provisioning.Sql.SqlBuiltInRole role, Azure.Provisioning.BicepValue principalType, Azure.Provisioning.BicepValue principalId, string? bicepIdentifierSuffix = null) { throw null; } public Azure.Provisioning.Authorization.RoleAssignment CreateRoleAssignment(Azure.Provisioning.Sql.SqlBuiltInRole role, Azure.Provisioning.Roles.UserAssignedIdentity identity) { throw null; } - public static Azure.Provisioning.Sql.SqlServer FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Sql.SqlServer FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override Azure.Provisioning.Primitives.ResourceNameRequirements GetResourceNameRequirements() { throw null; } public static partial class ResourceVersions @@ -1837,12 +1793,11 @@ public static partial class ResourceVersions public static readonly string V2014_01_01; public static readonly string V2014_04_01; public static readonly string V2021_11_01; - public static readonly string V2024_05_01_preview; } } - public partial class SqlServerAzureADAdministrator : Azure.Provisioning.Primitives.Resource + public partial class SqlServerAzureADAdministrator : Azure.Provisioning.Primitives.ProvisionableResource { - public SqlServerAzureADAdministrator(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public SqlServerAzureADAdministrator(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue AdministratorType { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue IsAzureADOnlyAuthenticationEnabled { get { throw null; } } @@ -1851,35 +1806,33 @@ public partial class SqlServerAzureADAdministrator : Azure.Provisioning.Primitiv public Azure.Provisioning.BicepValue Sid { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepValue TenantId { get { throw null; } set { } } - public static Azure.Provisioning.Sql.SqlServerAzureADAdministrator FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Sql.SqlServerAzureADAdministrator FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2014_01_01; public static readonly string V2014_04_01; public static readonly string V2021_11_01; - public static readonly string V2024_05_01_preview; } } - public partial class SqlServerAzureADOnlyAuthentication : Azure.Provisioning.Primitives.Resource + public partial class SqlServerAzureADOnlyAuthentication : Azure.Provisioning.Primitives.ProvisionableResource { - public SqlServerAzureADOnlyAuthentication(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public SqlServerAzureADOnlyAuthentication(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue IsAzureADOnlyAuthenticationEnabled { get { throw null; } set { } } public Azure.Provisioning.BicepValue Name { get { throw null; } } public Azure.Provisioning.Sql.SqlServer? Parent { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.Sql.SqlServerAzureADOnlyAuthentication FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Sql.SqlServerAzureADOnlyAuthentication FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2014_01_01; public static readonly string V2014_04_01; public static readonly string V2021_11_01; - public static readonly string V2024_05_01_preview; } } - public partial class SqlServerBlobAuditingPolicy : Azure.Provisioning.Primitives.Resource + public partial class SqlServerBlobAuditingPolicy : Azure.Provisioning.Primitives.ProvisionableResource { - public SqlServerBlobAuditingPolicy(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public SqlServerBlobAuditingPolicy(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepList AuditActionsAndGroups { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue IsAzureMonitorTargetEnabled { get { throw null; } set { } } @@ -1895,16 +1848,15 @@ public partial class SqlServerBlobAuditingPolicy : Azure.Provisioning.Primitives public Azure.Provisioning.BicepValue StorageAccountSubscriptionId { get { throw null; } set { } } public Azure.Provisioning.BicepValue StorageEndpoint { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.Sql.SqlServerBlobAuditingPolicy FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Sql.SqlServerBlobAuditingPolicy FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2021_11_01; - public static readonly string V2024_05_01_preview; } } - public partial class SqlServerCommunicationLink : Azure.Provisioning.Primitives.Resource + public partial class SqlServerCommunicationLink : Azure.Provisioning.Primitives.ProvisionableResource { - public SqlServerCommunicationLink(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public SqlServerCommunicationLink(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Kind { get { throw null; } } public Azure.Provisioning.BicepValue Location { get { throw null; } } @@ -1913,17 +1865,16 @@ public partial class SqlServerCommunicationLink : Azure.Provisioning.Primitives. public Azure.Provisioning.BicepValue PartnerServer { get { throw null; } set { } } public Azure.Provisioning.BicepValue State { get { throw null; } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.Sql.SqlServerCommunicationLink FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Sql.SqlServerCommunicationLink FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2014_01_01; public static readonly string V2014_04_01; - public static readonly string V2014_04_01_preview; } } - public partial class SqlServerConnectionPolicy : Azure.Provisioning.Primitives.Resource + public partial class SqlServerConnectionPolicy : Azure.Provisioning.Primitives.ProvisionableResource { - public SqlServerConnectionPolicy(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public SqlServerConnectionPolicy(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue ConnectionType { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Kind { get { throw null; } } @@ -1931,18 +1882,17 @@ public partial class SqlServerConnectionPolicy : Azure.Provisioning.Primitives.R public Azure.Provisioning.BicepValue Name { get { throw null; } } public Azure.Provisioning.Sql.SqlServer? Parent { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.Sql.SqlServerConnectionPolicy FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Sql.SqlServerConnectionPolicy FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2014_01_01; public static readonly string V2014_04_01; public static readonly string V2021_11_01; - public static readonly string V2024_05_01_preview; } } - public partial class SqlServerDatabaseRestorePoint : Azure.Provisioning.Primitives.Resource + public partial class SqlServerDatabaseRestorePoint : Azure.Provisioning.Primitives.ProvisionableResource { - public SqlServerDatabaseRestorePoint(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public SqlServerDatabaseRestorePoint(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue EarliestRestoreOn { get { throw null; } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Location { get { throw null; } } @@ -1952,19 +1902,18 @@ public partial class SqlServerDatabaseRestorePoint : Azure.Provisioning.Primitiv public Azure.Provisioning.BicepValue RestorePointLabel { get { throw null; } } public Azure.Provisioning.BicepValue RestorePointType { get { throw null; } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.Sql.SqlServerDatabaseRestorePoint FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Sql.SqlServerDatabaseRestorePoint FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2014_01_01; public static readonly string V2014_04_01; public static readonly string V2015_01_01; public static readonly string V2021_11_01; - public static readonly string V2024_05_01_preview; } } - public partial class SqlServerDevOpsAuditingSetting : Azure.Provisioning.Primitives.Resource + public partial class SqlServerDevOpsAuditingSetting : Azure.Provisioning.Primitives.ProvisionableResource { - public SqlServerDevOpsAuditingSetting(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public SqlServerDevOpsAuditingSetting(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue IsAzureMonitorTargetEnabled { get { throw null; } set { } } public Azure.Provisioning.BicepValue IsManagedIdentityInUse { get { throw null; } set { } } @@ -1975,31 +1924,29 @@ public partial class SqlServerDevOpsAuditingSetting : Azure.Provisioning.Primiti public Azure.Provisioning.BicepValue StorageAccountSubscriptionId { get { throw null; } set { } } public Azure.Provisioning.BicepValue StorageEndpoint { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.Sql.SqlServerDevOpsAuditingSetting FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Sql.SqlServerDevOpsAuditingSetting FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2021_11_01; - public static readonly string V2024_05_01_preview; } } - public partial class SqlServerDnsAlias : Azure.Provisioning.Primitives.Resource + public partial class SqlServerDnsAlias : Azure.Provisioning.Primitives.ProvisionableResource { - public SqlServerDnsAlias(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public SqlServerDnsAlias(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue AzureDnsRecord { get { throw null; } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } public Azure.Provisioning.Sql.SqlServer? Parent { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.Sql.SqlServerDnsAlias FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Sql.SqlServerDnsAlias FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2021_11_01; - public static readonly string V2024_05_01_preview; } } - public partial class SqlServerJob : Azure.Provisioning.Primitives.Resource + public partial class SqlServerJob : Azure.Provisioning.Primitives.ProvisionableResource { - public SqlServerJob(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public SqlServerJob(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Description { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } @@ -2007,16 +1954,15 @@ public partial class SqlServerJob : Azure.Provisioning.Primitives.Resource public Azure.Provisioning.BicepValue Schedule { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepValue Version { get { throw null; } } - public static Azure.Provisioning.Sql.SqlServerJob FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Sql.SqlServerJob FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2021_11_01; - public static readonly string V2024_05_01_preview; } } - public partial class SqlServerJobAgent : Azure.Provisioning.Primitives.Resource + public partial class SqlServerJobAgent : Azure.Provisioning.Primitives.ProvisionableResource { - public SqlServerJobAgent(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public SqlServerJobAgent(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue DatabaseId { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Location { get { throw null; } set { } } @@ -2026,32 +1972,30 @@ public partial class SqlServerJobAgent : Azure.Provisioning.Primitives.Resource public Azure.Provisioning.BicepValue State { get { throw null; } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } - public static Azure.Provisioning.Sql.SqlServerJobAgent FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Sql.SqlServerJobAgent FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2021_11_01; - public static readonly string V2024_05_01_preview; } } - public partial class SqlServerJobCredential : Azure.Provisioning.Primitives.Resource + public partial class SqlServerJobCredential : Azure.Provisioning.Primitives.ProvisionableResource { - public SqlServerJobCredential(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public SqlServerJobCredential(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } public Azure.Provisioning.Sql.SqlServerJobAgent? Parent { get { throw null; } set { } } public Azure.Provisioning.BicepValue Password { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepValue Username { get { throw null; } set { } } - public static Azure.Provisioning.Sql.SqlServerJobCredential FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Sql.SqlServerJobCredential FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2021_11_01; - public static readonly string V2024_05_01_preview; } } - public partial class SqlServerJobExecution : Azure.Provisioning.Primitives.Resource + public partial class SqlServerJobExecution : Azure.Provisioning.Primitives.ProvisionableResource { - public SqlServerJobExecution(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public SqlServerJobExecution(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue CreateOn { get { throw null; } } public Azure.Provisioning.BicepValue CurrentAttempts { get { throw null; } } public Azure.Provisioning.BicepValue CurrentAttemptStartOn { get { throw null; } } @@ -2069,14 +2013,13 @@ public partial class SqlServerJobExecution : Azure.Provisioning.Primitives.Resou public Azure.Provisioning.BicepValue StepName { get { throw null; } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepValue Target { get { throw null; } } - public static Azure.Provisioning.Sql.SqlServerJobExecution FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Sql.SqlServerJobExecution FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2021_11_01; - public static readonly string V2024_05_01_preview; } } - public partial class SqlServerJobSchedule : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class SqlServerJobSchedule : Azure.Provisioning.Primitives.ProvisionableConstruct { public SqlServerJobSchedule() { } public Azure.Provisioning.BicepValue EndOn { get { throw null; } set { } } @@ -2090,9 +2033,9 @@ public enum SqlServerJobScheduleType Once = 0, Recurring = 1, } - public partial class SqlServerJobStep : Azure.Provisioning.Primitives.Resource + public partial class SqlServerJobStep : Azure.Provisioning.Primitives.ProvisionableResource { - public SqlServerJobStep(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public SqlServerJobStep(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Action { get { throw null; } set { } } public Azure.Provisioning.BicepValue Credential { get { throw null; } set { } } public Azure.Provisioning.BicepValue ExecutionOptions { get { throw null; } set { } } @@ -2103,31 +2046,29 @@ public partial class SqlServerJobStep : Azure.Provisioning.Primitives.Resource public Azure.Provisioning.BicepValue StepId { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepValue TargetGroup { get { throw null; } set { } } - public static Azure.Provisioning.Sql.SqlServerJobStep FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Sql.SqlServerJobStep FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2021_11_01; - public static readonly string V2024_05_01_preview; } } - public partial class SqlServerJobTargetGroup : Azure.Provisioning.Primitives.Resource + public partial class SqlServerJobTargetGroup : Azure.Provisioning.Primitives.ProvisionableResource { - public SqlServerJobTargetGroup(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public SqlServerJobTargetGroup(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepList Members { get { throw null; } set { } } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } public Azure.Provisioning.Sql.SqlServerJobAgent? Parent { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.Sql.SqlServerJobTargetGroup FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Sql.SqlServerJobTargetGroup FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2021_11_01; - public static readonly string V2024_05_01_preview; } } - public partial class SqlServerKey : Azure.Provisioning.Primitives.Resource + public partial class SqlServerKey : Azure.Provisioning.Primitives.ProvisionableResource { - public SqlServerKey(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public SqlServerKey(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue CreatedOn { get { throw null; } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue IsAutoRotationEnabled { get { throw null; } } @@ -2140,11 +2081,10 @@ public partial class SqlServerKey : Azure.Provisioning.Primitives.Resource public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepValue Thumbprint { get { throw null; } } public Azure.Provisioning.BicepValue Uri { get { throw null; } set { } } - public static Azure.Provisioning.Sql.SqlServerKey FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Sql.SqlServerKey FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2021_11_01; - public static readonly string V2024_05_01_preview; } } public enum SqlServerKeyType @@ -2158,15 +2098,15 @@ public enum SqlServerPrincipalType Group = 1, Application = 2, } - public partial class SqlServerPrivateEndpointConnection : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class SqlServerPrivateEndpointConnection : Azure.Provisioning.Primitives.ProvisionableConstruct { public SqlServerPrivateEndpointConnection() { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Properties { get { throw null; } } } - public partial class SqlServerSecurityAlertPolicy : Azure.Provisioning.Primitives.Resource + public partial class SqlServerSecurityAlertPolicy : Azure.Provisioning.Primitives.ProvisionableResource { - public SqlServerSecurityAlertPolicy(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public SqlServerSecurityAlertPolicy(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue CreatedOn { get { throw null; } } public Azure.Provisioning.BicepList DisabledAlerts { get { throw null; } set { } } public Azure.Provisioning.BicepList EmailAddresses { get { throw null; } set { } } @@ -2179,75 +2119,79 @@ public partial class SqlServerSecurityAlertPolicy : Azure.Provisioning.Primitive public Azure.Provisioning.BicepValue StorageAccountAccessKey { get { throw null; } set { } } public Azure.Provisioning.BicepValue StorageEndpoint { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.Sql.SqlServerSecurityAlertPolicy FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Sql.SqlServerSecurityAlertPolicy FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2021_11_01; - public static readonly string V2024_05_01_preview; } } - public partial class SqlServerSqlVulnerabilityAssessment : Azure.Provisioning.Primitives.Resource + public partial class SqlServerSqlVulnerabilityAssessment : Azure.Provisioning.Primitives.ProvisionableResource { - public SqlServerSqlVulnerabilityAssessment(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public SqlServerSqlVulnerabilityAssessment(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Name { get { throw null; } } public Azure.Provisioning.Sql.SqlServer? Parent { get { throw null; } set { } } public Azure.Provisioning.BicepValue State { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.Sql.SqlServerSqlVulnerabilityAssessment FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Sql.SqlServerSqlVulnerabilityAssessment FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { - public static readonly string V2024_05_01_preview; + public static readonly string V2014_01_01; + public static readonly string V2014_04_01; + public static readonly string V2021_11_01; } } - public partial class SqlServerSqlVulnerabilityAssessmentBaseline : Azure.Provisioning.Primitives.Resource + public partial class SqlServerSqlVulnerabilityAssessmentBaseline : Azure.Provisioning.Primitives.ProvisionableResource { - public SqlServerSqlVulnerabilityAssessmentBaseline(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public SqlServerSqlVulnerabilityAssessmentBaseline(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue IsLatestScan { get { throw null; } set { } } public Azure.Provisioning.BicepValue Name { get { throw null; } } public Azure.Provisioning.Sql.SqlServerSqlVulnerabilityAssessment? Parent { get { throw null; } set { } } public Azure.Provisioning.BicepDictionary>> Results { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.Sql.SqlServerSqlVulnerabilityAssessmentBaseline FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Sql.SqlServerSqlVulnerabilityAssessmentBaseline FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { - public static readonly string V2024_05_01_preview; + public static readonly string V2014_01_01; + public static readonly string V2014_04_01; + public static readonly string V2021_11_01; } } - public partial class SqlServerSqlVulnerabilityAssessmentBaselineRule : Azure.Provisioning.Primitives.Resource + public partial class SqlServerSqlVulnerabilityAssessmentBaselineRule : Azure.Provisioning.Primitives.ProvisionableResource { - public SqlServerSqlVulnerabilityAssessmentBaselineRule(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public SqlServerSqlVulnerabilityAssessmentBaselineRule(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue IsLatestScan { get { throw null; } set { } } public Azure.Provisioning.BicepValue Name { get { throw null; } } public Azure.Provisioning.Sql.SqlServerSqlVulnerabilityAssessmentBaseline? Parent { get { throw null; } set { } } public Azure.Provisioning.BicepList> Results { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.Sql.SqlServerSqlVulnerabilityAssessmentBaselineRule FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Sql.SqlServerSqlVulnerabilityAssessmentBaselineRule FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { - public static readonly string V2024_05_01_preview; + public static readonly string V2014_01_01; + public static readonly string V2014_04_01; + public static readonly string V2021_11_01; } } - public partial class SqlServerTrustGroup : Azure.Provisioning.Primitives.Resource + public partial class SqlServerTrustGroup : Azure.Provisioning.Primitives.ProvisionableResource { - public SqlServerTrustGroup(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public SqlServerTrustGroup(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepList GroupMembers { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepList TrustScopes { get { throw null; } set { } } - public static Azure.Provisioning.Sql.SqlServerTrustGroup FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Sql.SqlServerTrustGroup FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2021_11_01; - public static readonly string V2024_05_01_preview; } } - public partial class SqlServerVirtualNetworkRule : Azure.Provisioning.Primitives.Resource + public partial class SqlServerVirtualNetworkRule : Azure.Provisioning.Primitives.ProvisionableResource { - public SqlServerVirtualNetworkRule(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public SqlServerVirtualNetworkRule(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue IgnoreMissingVnetServiceEndpoint { get { throw null; } set { } } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } @@ -2255,11 +2199,10 @@ public partial class SqlServerVirtualNetworkRule : Azure.Provisioning.Primitives public Azure.Provisioning.BicepValue State { get { throw null; } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepValue VirtualNetworkSubnetId { get { throw null; } set { } } - public static Azure.Provisioning.Sql.SqlServerVirtualNetworkRule FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Sql.SqlServerVirtualNetworkRule FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2021_11_01; - public static readonly string V2024_05_01_preview; } } public enum SqlServerVirtualNetworkRuleState @@ -2271,9 +2214,9 @@ public enum SqlServerVirtualNetworkRuleState Deleting = 4, Unknown = 5, } - public partial class SqlServerVulnerabilityAssessment : Azure.Provisioning.Primitives.Resource + public partial class SqlServerVulnerabilityAssessment : Azure.Provisioning.Primitives.ProvisionableResource { - public SqlServerVulnerabilityAssessment(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public SqlServerVulnerabilityAssessment(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Name { get { throw null; } } public Azure.Provisioning.Sql.SqlServer? Parent { get { throw null; } set { } } @@ -2282,14 +2225,13 @@ public partial class SqlServerVulnerabilityAssessment : Azure.Provisioning.Primi public Azure.Provisioning.BicepValue StorageContainerPath { get { throw null; } set { } } public Azure.Provisioning.BicepValue StorageContainerSasKey { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.Sql.SqlServerVulnerabilityAssessment FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Sql.SqlServerVulnerabilityAssessment FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2021_11_01; - public static readonly string V2024_05_01_preview; } } - public partial class SqlServicePrincipal : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class SqlServicePrincipal : Azure.Provisioning.Primitives.ProvisionableConstruct { public SqlServicePrincipal() { } public Azure.Provisioning.BicepValue ClientId { get { throw null; } } @@ -2302,7 +2244,7 @@ public enum SqlServicePrincipalType None = 0, SystemAssigned = 1, } - public partial class SqlSku : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class SqlSku : Azure.Provisioning.Primitives.ProvisionableConstruct { public SqlSku() { } public Azure.Provisioning.BicepValue Capacity { get { throw null; } set { } } @@ -2321,9 +2263,9 @@ public enum SqlVulnerabilityAssessmentState Enabled = 0, Disabled = 1, } - public partial class SyncAgent : Azure.Provisioning.Primitives.Resource + public partial class SyncAgent : Azure.Provisioning.Primitives.ProvisionableResource { - public SyncAgent(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public SyncAgent(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue ExpireOn { get { throw null; } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue IsUpToDate { get { throw null; } } @@ -2334,11 +2276,10 @@ public partial class SyncAgent : Azure.Provisioning.Primitives.Resource public Azure.Provisioning.BicepValue SyncDatabaseId { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepValue Version { get { throw null; } } - public static Azure.Provisioning.Sql.SyncAgent FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Sql.SyncAgent FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2021_11_01; - public static readonly string V2024_05_01_preview; } } public enum SyncAgentState @@ -2358,9 +2299,9 @@ public enum SyncDirection OneWayMemberToHub = 1, OneWayHubToMember = 2, } - public partial class SyncGroup : Azure.Provisioning.Primitives.Resource + public partial class SyncGroup : Azure.Provisioning.Primitives.ProvisionableResource { - public SyncGroup(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public SyncGroup(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue ConflictLoggingRetentionInDays { get { throw null; } set { } } public Azure.Provisioning.BicepValue ConflictResolutionPolicy { get { throw null; } set { } } public Azure.Provisioning.BicepValue HubDatabasePassword { get { throw null; } set { } } @@ -2378,28 +2319,27 @@ public partial class SyncGroup : Azure.Provisioning.Primitives.Resource public Azure.Provisioning.BicepValue SyncState { get { throw null; } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepValue UsePrivateLinkConnection { get { throw null; } set { } } - public static Azure.Provisioning.Sql.SyncGroup FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Sql.SyncGroup FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override Azure.Provisioning.Primitives.ResourceNameRequirements GetResourceNameRequirements() { throw null; } public static partial class ResourceVersions { public static readonly string V2021_11_01; - public static readonly string V2024_05_01_preview; } } - public partial class SyncGroupSchema : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class SyncGroupSchema : Azure.Provisioning.Primitives.ProvisionableConstruct { public SyncGroupSchema() { } public Azure.Provisioning.BicepValue MasterSyncMemberName { get { throw null; } set { } } public Azure.Provisioning.BicepList Tables { get { throw null; } set { } } } - public partial class SyncGroupSchemaTable : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class SyncGroupSchemaTable : Azure.Provisioning.Primitives.ProvisionableConstruct { public SyncGroupSchemaTable() { } public Azure.Provisioning.BicepList Columns { get { throw null; } set { } } public Azure.Provisioning.BicepValue QuotedName { get { throw null; } set { } } } - public partial class SyncGroupSchemaTableColumn : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class SyncGroupSchemaTableColumn : Azure.Provisioning.Primitives.ProvisionableConstruct { public SyncGroupSchemaTableColumn() { } public Azure.Provisioning.BicepValue DataSize { get { throw null; } set { } } @@ -2414,9 +2354,9 @@ public enum SyncGroupState Progressing = 3, Good = 4, } - public partial class SyncMember : Azure.Provisioning.Primitives.Resource + public partial class SyncMember : Azure.Provisioning.Primitives.ProvisionableResource { - public SyncMember(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public SyncMember(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue DatabaseName { get { throw null; } set { } } public Azure.Provisioning.BicepValue DatabaseType { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } @@ -2433,11 +2373,10 @@ public partial class SyncMember : Azure.Provisioning.Primitives.Resource public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepValue UsePrivateLinkConnection { get { throw null; } set { } } public Azure.Provisioning.BicepValue UserName { get { throw null; } set { } } - public static Azure.Provisioning.Sql.SyncMember FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Sql.SyncMember FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2021_11_01; - public static readonly string V2024_05_01_preview; } } public enum SyncMemberDbType @@ -2488,16 +2427,16 @@ public enum VulnerabilityAssessmentPolicyBaselineName [System.Runtime.Serialization.DataMemberAttribute(Name="master")] Master = 1, } - public partial class VulnerabilityAssessmentRecurringScansProperties : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class VulnerabilityAssessmentRecurringScansProperties : Azure.Provisioning.Primitives.ProvisionableConstruct { public VulnerabilityAssessmentRecurringScansProperties() { } public Azure.Provisioning.BicepList Emails { get { throw null; } set { } } public Azure.Provisioning.BicepValue EmailSubscriptionAdmins { get { throw null; } set { } } public Azure.Provisioning.BicepValue IsEnabled { get { throw null; } set { } } } - public partial class WorkloadClassifier : Azure.Provisioning.Primitives.Resource + public partial class WorkloadClassifier : Azure.Provisioning.Primitives.ProvisionableResource { - public WorkloadClassifier(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public WorkloadClassifier(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Context { get { throw null; } set { } } public Azure.Provisioning.BicepValue EndTime { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } @@ -2508,16 +2447,15 @@ public partial class WorkloadClassifier : Azure.Provisioning.Primitives.Resource public Azure.Provisioning.Sql.WorkloadGroup? Parent { get { throw null; } set { } } public Azure.Provisioning.BicepValue StartTime { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.Sql.WorkloadClassifier FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Sql.WorkloadClassifier FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2021_11_01; - public static readonly string V2024_05_01_preview; } } - public partial class WorkloadGroup : Azure.Provisioning.Primitives.Resource + public partial class WorkloadGroup : Azure.Provisioning.Primitives.ProvisionableResource { - public WorkloadGroup(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public WorkloadGroup(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Importance { get { throw null; } set { } } public Azure.Provisioning.BicepValue MaxResourcePercent { get { throw null; } set { } } @@ -2528,11 +2466,10 @@ public partial class WorkloadGroup : Azure.Provisioning.Primitives.Resource public Azure.Provisioning.Sql.SqlDatabase? Parent { get { throw null; } set { } } public Azure.Provisioning.BicepValue QueryExecutionTimeout { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.Sql.WorkloadGroup FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Sql.WorkloadGroup FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2021_11_01; - public static readonly string V2024_05_01_preview; } } } diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/BackupShortTermRetentionPolicy.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/BackupShortTermRetentionPolicy.cs index b6f04e8b2764..856c284a066f 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/BackupShortTermRetentionPolicy.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/BackupShortTermRetentionPolicy.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.Sql; /// /// BackupShortTermRetentionPolicy. /// -public partial class BackupShortTermRetentionPolicy : Resource +public partial class BackupShortTermRetentionPolicy : ProvisionableResource { /// /// Gets the Name. @@ -59,15 +59,15 @@ public partial class BackupShortTermRetentionPolicy : Resource /// /// Creates a new BackupShortTermRetentionPolicy. /// - /// + /// /// The the Bicep identifier name of the BackupShortTermRetentionPolicy /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the BackupShortTermRetentionPolicy. - public BackupShortTermRetentionPolicy(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Sql/servers/databases/backupShortTermRetentionPolicies", resourceVersion ?? "2021-11-01") + public BackupShortTermRetentionPolicy(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Sql/servers/databases/backupShortTermRetentionPolicies", resourceVersion ?? "2021-11-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _diffBackupIntervalInHours = BicepValue.DefineProperty(this, "DiffBackupIntervalInHours", ["properties", "diffBackupIntervalInHours"]); @@ -82,11 +82,6 @@ public BackupShortTermRetentionPolicy(string identifierName, string? resourceVer /// public static class ResourceVersions { - /// - /// 2024-05-01-preview. - /// - public static readonly string V2024_05_01_preview = "2024-05-01-preview"; - /// /// 2021-11-01. /// @@ -96,7 +91,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing BackupShortTermRetentionPolicy. /// - /// + /// /// The the Bicep identifier name of the BackupShortTermRetentionPolicy /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -104,6 +99,6 @@ public static class ResourceVersions /// /// Version of the BackupShortTermRetentionPolicy. /// The existing BackupShortTermRetentionPolicy resource. - public static BackupShortTermRetentionPolicy FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static BackupShortTermRetentionPolicy FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/DataMaskingPolicy.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/DataMaskingPolicy.cs index 81382e0c6164..10dbc7b6748a 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/DataMaskingPolicy.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/DataMaskingPolicy.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.Sql; /// /// DataMaskingPolicy. /// -public partial class DataMaskingPolicy : Resource +public partial class DataMaskingPolicy : ProvisionableResource { /// /// Gets the Name. @@ -84,15 +84,15 @@ public partial class DataMaskingPolicy : Resource /// /// Creates a new DataMaskingPolicy. /// - /// + /// /// The the Bicep identifier name of the DataMaskingPolicy resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, /// and underscores. /// /// Version of the DataMaskingPolicy. - public DataMaskingPolicy(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Sql/servers/databases/dataMaskingPolicies", resourceVersion ?? "2021-11-01") + public DataMaskingPolicy(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Sql/servers/databases/dataMaskingPolicies", resourceVersion ?? "2021-11-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _dataMaskingState = BicepValue.DefineProperty(this, "DataMaskingState", ["properties", "dataMaskingState"]); @@ -111,11 +111,6 @@ public DataMaskingPolicy(string identifierName, string? resourceVersion = defaul /// public static class ResourceVersions { - /// - /// 2024-05-01-preview. - /// - public static readonly string V2024_05_01_preview = "2024-05-01-preview"; - /// /// 2021-11-01. /// @@ -135,7 +130,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing DataMaskingPolicy. /// - /// + /// /// The the Bicep identifier name of the DataMaskingPolicy resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, @@ -143,6 +138,6 @@ public static class ResourceVersions /// /// Version of the DataMaskingPolicy. /// The existing DataMaskingPolicy resource. - public static DataMaskingPolicy FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static DataMaskingPolicy FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/DatabaseAdvancedThreatProtection.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/DatabaseAdvancedThreatProtection.cs index 6741ff75dd72..7d3c6b0e3dc4 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/DatabaseAdvancedThreatProtection.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/DatabaseAdvancedThreatProtection.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.Sql; /// /// DatabaseAdvancedThreatProtection. /// -public partial class DatabaseAdvancedThreatProtection : Resource +public partial class DatabaseAdvancedThreatProtection : ProvisionableResource { /// /// Gets the Name. @@ -58,15 +58,15 @@ public partial class DatabaseAdvancedThreatProtection : Resource /// /// Creates a new DatabaseAdvancedThreatProtection. /// - /// + /// /// The the Bicep identifier name of the DatabaseAdvancedThreatProtection /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the DatabaseAdvancedThreatProtection. - public DatabaseAdvancedThreatProtection(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Sql/servers/databases/advancedThreatProtectionSettings", resourceVersion ?? "2021-11-01") + public DatabaseAdvancedThreatProtection(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Sql/servers/databases/advancedThreatProtectionSettings", resourceVersion ?? "2021-11-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _state = BicepValue.DefineProperty(this, "State", ["properties", "state"]); @@ -81,11 +81,6 @@ public DatabaseAdvancedThreatProtection(string identifierName, string? resourceV /// public static class ResourceVersions { - /// - /// 2024-05-01-preview. - /// - public static readonly string V2024_05_01_preview = "2024-05-01-preview"; - /// /// 2021-11-01. /// @@ -95,7 +90,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing DatabaseAdvancedThreatProtection. /// - /// + /// /// The the Bicep identifier name of the DatabaseAdvancedThreatProtection /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -103,6 +98,6 @@ public static class ResourceVersions /// /// Version of the DatabaseAdvancedThreatProtection. /// The existing DatabaseAdvancedThreatProtection resource. - public static DatabaseAdvancedThreatProtection FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static DatabaseAdvancedThreatProtection FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/DistributedAvailabilityGroup.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/DistributedAvailabilityGroup.cs index 75bed98b9bd7..cbe30eb989d4 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/DistributedAvailabilityGroup.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/DistributedAvailabilityGroup.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.Sql; /// /// DistributedAvailabilityGroup. /// -public partial class DistributedAvailabilityGroup : Resource +public partial class DistributedAvailabilityGroup : ProvisionableResource { /// /// The distributed availability group name. @@ -105,15 +105,15 @@ public partial class DistributedAvailabilityGroup : Resource /// /// Creates a new DistributedAvailabilityGroup. /// - /// + /// /// The the Bicep identifier name of the DistributedAvailabilityGroup /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the DistributedAvailabilityGroup. - public DistributedAvailabilityGroup(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Sql/managedInstances/distributedAvailabilityGroups", resourceVersion ?? "2021-11-01") + public DistributedAvailabilityGroup(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Sql/managedInstances/distributedAvailabilityGroups", resourceVersion ?? "2021-11-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _primaryAvailabilityGroupName = BicepValue.DefineProperty(this, "PrimaryAvailabilityGroupName", ["properties", "primaryAvailabilityGroupName"]); @@ -136,11 +136,6 @@ public DistributedAvailabilityGroup(string identifierName, string? resourceVersi /// public static class ResourceVersions { - /// - /// 2024-05-01-preview. - /// - public static readonly string V2024_05_01_preview = "2024-05-01-preview"; - /// /// 2021-11-01. /// @@ -150,7 +145,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing DistributedAvailabilityGroup. /// - /// + /// /// The the Bicep identifier name of the DistributedAvailabilityGroup /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -158,6 +153,6 @@ public static class ResourceVersions /// /// Version of the DistributedAvailabilityGroup. /// The existing DistributedAvailabilityGroup resource. - public static DistributedAvailabilityGroup FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static DistributedAvailabilityGroup FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ElasticPool.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ElasticPool.cs index 31552ae6e9c3..148e0edf957f 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ElasticPool.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ElasticPool.cs @@ -17,7 +17,7 @@ namespace Azure.Provisioning.Sql; /// /// ElasticPool. /// -public partial class ElasticPool : Resource +public partial class ElasticPool : ProvisionableResource { /// /// The name of the elastic pool. @@ -151,15 +151,15 @@ public partial class ElasticPool : Resource /// /// Creates a new ElasticPool. /// - /// + /// /// The the Bicep identifier name of the ElasticPool resource. This can be /// used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and /// underscores. /// /// Version of the ElasticPool. - public ElasticPool(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Sql/servers/elasticPools", resourceVersion ?? "2021-11-01") + public ElasticPool(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Sql/servers/elasticPools", resourceVersion ?? "2021-11-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _location = BicepValue.DefineProperty(this, "Location", ["location"], isRequired: true); @@ -187,11 +187,6 @@ public ElasticPool(string identifierName, string? resourceVersion = default) /// public static class ResourceVersions { - /// - /// 2024-05-01-preview. - /// - public static readonly string V2024_05_01_preview = "2024-05-01-preview"; - /// /// 2021-11-01. /// @@ -216,7 +211,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing ElasticPool. /// - /// + /// /// The the Bicep identifier name of the ElasticPool resource. This can be /// used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and @@ -224,8 +219,8 @@ public static class ResourceVersions /// /// Version of the ElasticPool. /// The existing ElasticPool resource. - public static ElasticPool FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static ElasticPool FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; /// /// Get the requirements for naming this ElasticPool resource. diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/EncryptionProtector.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/EncryptionProtector.cs index c1826ac0c7fb..7abc1f51a521 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/EncryptionProtector.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/EncryptionProtector.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.Sql; /// /// EncryptionProtector. /// -public partial class EncryptionProtector : Resource +public partial class EncryptionProtector : ProvisionableResource { /// /// Gets the Name. @@ -94,15 +94,15 @@ public partial class EncryptionProtector : Resource /// /// Creates a new EncryptionProtector. /// - /// + /// /// The the Bicep identifier name of the EncryptionProtector resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, /// numbers, and underscores. /// /// Version of the EncryptionProtector. - public EncryptionProtector(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Sql/servers/encryptionProtector", resourceVersion ?? "2021-11-01") + public EncryptionProtector(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Sql/servers/encryptionProtector", resourceVersion ?? "2021-11-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _isAutoRotationEnabled = BicepValue.DefineProperty(this, "IsAutoRotationEnabled", ["properties", "autoRotationEnabled"]); @@ -123,11 +123,6 @@ public EncryptionProtector(string identifierName, string? resourceVersion = defa /// public static class ResourceVersions { - /// - /// 2024-05-01-preview. - /// - public static readonly string V2024_05_01_preview = "2024-05-01-preview"; - /// /// 2021-11-01. /// @@ -137,7 +132,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing EncryptionProtector. /// - /// + /// /// The the Bicep identifier name of the EncryptionProtector resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, @@ -145,6 +140,6 @@ public static class ResourceVersions /// /// Version of the EncryptionProtector. /// The existing EncryptionProtector resource. - public static EncryptionProtector FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static EncryptionProtector FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ExtendedDatabaseBlobAuditingPolicy.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ExtendedDatabaseBlobAuditingPolicy.cs index f767bda6092e..e54b7805f73e 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ExtendedDatabaseBlobAuditingPolicy.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ExtendedDatabaseBlobAuditingPolicy.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.Sql; /// /// ExtendedDatabaseBlobAuditingPolicy. /// -public partial class ExtendedDatabaseBlobAuditingPolicy : Resource +public partial class ExtendedDatabaseBlobAuditingPolicy : ProvisionableResource { /// /// Gets the Name. @@ -198,15 +198,15 @@ public partial class ExtendedDatabaseBlobAuditingPolicy : Resource /// /// Creates a new ExtendedDatabaseBlobAuditingPolicy. /// - /// + /// /// The the Bicep identifier name of the ExtendedDatabaseBlobAuditingPolicy /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the ExtendedDatabaseBlobAuditingPolicy. - public ExtendedDatabaseBlobAuditingPolicy(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Sql/servers/databases/extendedAuditingSettings", resourceVersion ?? "2021-11-01") + public ExtendedDatabaseBlobAuditingPolicy(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Sql/servers/databases/extendedAuditingSettings", resourceVersion ?? "2021-11-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _auditActionsAndGroups = BicepList.DefineProperty(this, "AuditActionsAndGroups", ["properties", "auditActionsAndGroups"]); @@ -230,11 +230,6 @@ public ExtendedDatabaseBlobAuditingPolicy(string identifierName, string? resourc /// public static class ResourceVersions { - /// - /// 2024-05-01-preview. - /// - public static readonly string V2024_05_01_preview = "2024-05-01-preview"; - /// /// 2021-11-01. /// @@ -259,7 +254,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing ExtendedDatabaseBlobAuditingPolicy. /// - /// + /// /// The the Bicep identifier name of the ExtendedDatabaseBlobAuditingPolicy /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -267,6 +262,6 @@ public static class ResourceVersions /// /// Version of the ExtendedDatabaseBlobAuditingPolicy. /// The existing ExtendedDatabaseBlobAuditingPolicy resource. - public static ExtendedDatabaseBlobAuditingPolicy FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static ExtendedDatabaseBlobAuditingPolicy FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ExtendedServerBlobAuditingPolicy.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ExtendedServerBlobAuditingPolicy.cs index d26702eed66d..9b1ccf18ec3d 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ExtendedServerBlobAuditingPolicy.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ExtendedServerBlobAuditingPolicy.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.Sql; /// /// ExtendedServerBlobAuditingPolicy. /// -public partial class ExtendedServerBlobAuditingPolicy : Resource +public partial class ExtendedServerBlobAuditingPolicy : ProvisionableResource { /// /// Gets the Name. @@ -218,15 +218,15 @@ public partial class ExtendedServerBlobAuditingPolicy : Resource /// /// Creates a new ExtendedServerBlobAuditingPolicy. /// - /// + /// /// The the Bicep identifier name of the ExtendedServerBlobAuditingPolicy /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the ExtendedServerBlobAuditingPolicy. - public ExtendedServerBlobAuditingPolicy(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Sql/servers/extendedAuditingSettings", resourceVersion ?? "2021-11-01") + public ExtendedServerBlobAuditingPolicy(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Sql/servers/extendedAuditingSettings", resourceVersion ?? "2021-11-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _auditActionsAndGroups = BicepList.DefineProperty(this, "AuditActionsAndGroups", ["properties", "auditActionsAndGroups"]); @@ -251,11 +251,6 @@ public ExtendedServerBlobAuditingPolicy(string identifierName, string? resourceV /// public static class ResourceVersions { - /// - /// 2024-05-01-preview. - /// - public static readonly string V2024_05_01_preview = "2024-05-01-preview"; - /// /// 2021-11-01. /// @@ -265,7 +260,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing ExtendedServerBlobAuditingPolicy. /// - /// + /// /// The the Bicep identifier name of the ExtendedServerBlobAuditingPolicy /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -273,6 +268,6 @@ public static class ResourceVersions /// /// Version of the ExtendedServerBlobAuditingPolicy. /// The existing ExtendedServerBlobAuditingPolicy resource. - public static ExtendedServerBlobAuditingPolicy FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static ExtendedServerBlobAuditingPolicy FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/FailoverGroup.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/FailoverGroup.cs index 410d9601e99d..79e2446bc3a0 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/FailoverGroup.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/FailoverGroup.cs @@ -17,7 +17,7 @@ namespace Azure.Provisioning.Sql; /// /// FailoverGroup. /// -public partial class FailoverGroup : Resource +public partial class FailoverGroup : ProvisionableResource { /// /// The name of the failover group. @@ -94,15 +94,15 @@ public partial class FailoverGroup : Resource /// /// Creates a new FailoverGroup. /// - /// + /// /// The the Bicep identifier name of the FailoverGroup resource. This can /// be used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and /// underscores. /// /// Version of the FailoverGroup. - public FailoverGroup(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Sql/servers/failoverGroups", resourceVersion ?? "2021-11-01") + public FailoverGroup(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Sql/servers/failoverGroups", resourceVersion ?? "2021-11-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _failoverDatabases = BicepList.DefineProperty(this, "FailoverDatabases", ["properties", "databases"]); @@ -123,11 +123,6 @@ public FailoverGroup(string identifierName, string? resourceVersion = default) /// public static class ResourceVersions { - /// - /// 2024-05-01-preview. - /// - public static readonly string V2024_05_01_preview = "2024-05-01-preview"; - /// /// 2021-11-01. /// @@ -137,7 +132,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing FailoverGroup. /// - /// + /// /// The the Bicep identifier name of the FailoverGroup resource. This can /// be used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and @@ -145,8 +140,8 @@ public static class ResourceVersions /// /// Version of the FailoverGroup. /// The existing FailoverGroup resource. - public static FailoverGroup FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static FailoverGroup FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; /// /// Get the requirements for naming this FailoverGroup resource. diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/GeoBackupPolicy.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/GeoBackupPolicy.cs index 37b13189f93a..f21b9a22a30d 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/GeoBackupPolicy.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/GeoBackupPolicy.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.Sql; /// /// GeoBackupPolicy. /// -public partial class GeoBackupPolicy : Resource +public partial class GeoBackupPolicy : ProvisionableResource { /// /// Gets the Name. @@ -69,15 +69,15 @@ public partial class GeoBackupPolicy : Resource /// /// Creates a new GeoBackupPolicy. /// - /// + /// /// The the Bicep identifier name of the GeoBackupPolicy resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, /// and underscores. /// /// Version of the GeoBackupPolicy. - public GeoBackupPolicy(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Sql/servers/databases/geoBackupPolicies", resourceVersion ?? "2021-11-01") + public GeoBackupPolicy(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Sql/servers/databases/geoBackupPolicies", resourceVersion ?? "2021-11-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _state = BicepValue.DefineProperty(this, "State", ["properties", "state"], isRequired: true); @@ -94,11 +94,6 @@ public GeoBackupPolicy(string identifierName, string? resourceVersion = default) /// public static class ResourceVersions { - /// - /// 2024-05-01-preview. - /// - public static readonly string V2024_05_01_preview = "2024-05-01-preview"; - /// /// 2021-11-01. /// @@ -118,7 +113,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing GeoBackupPolicy. /// - /// + /// /// The the Bicep identifier name of the GeoBackupPolicy resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, @@ -126,6 +121,6 @@ public static class ResourceVersions /// /// Version of the GeoBackupPolicy. /// The existing GeoBackupPolicy resource. - public static GeoBackupPolicy FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static GeoBackupPolicy FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/IPv6FirewallRule.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/IPv6FirewallRule.cs index a8832b7ec520..5e60a44813c6 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/IPv6FirewallRule.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/IPv6FirewallRule.cs @@ -14,7 +14,7 @@ namespace Azure.Provisioning.Sql; /// /// IPv6FirewallRule. /// -public partial class IPv6FirewallRule : Resource +public partial class IPv6FirewallRule : ProvisionableResource { /// /// The name of the firewall rule. @@ -50,15 +50,15 @@ public partial class IPv6FirewallRule : Resource /// /// Creates a new IPv6FirewallRule. /// - /// + /// /// The the Bicep identifier name of the IPv6FirewallRule resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, /// and underscores. /// /// Version of the IPv6FirewallRule. - public IPv6FirewallRule(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Sql/servers/ipv6FirewallRules", resourceVersion ?? "2021-11-01") + public IPv6FirewallRule(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Sql/servers/ipv6FirewallRules", resourceVersion ?? "2021-11-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _endIPv6Address = BicepValue.DefineProperty(this, "EndIPv6Address", ["properties", "endIPv6Address"]); @@ -72,11 +72,6 @@ public IPv6FirewallRule(string identifierName, string? resourceVersion = default /// public static class ResourceVersions { - /// - /// 2024-05-01-preview. - /// - public static readonly string V2024_05_01_preview = "2024-05-01-preview"; - /// /// 2021-11-01. /// @@ -96,7 +91,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing IPv6FirewallRule. /// - /// + /// /// The the Bicep identifier name of the IPv6FirewallRule resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, @@ -104,6 +99,6 @@ public static class ResourceVersions /// /// Version of the IPv6FirewallRule. /// The existing IPv6FirewallRule resource. - public static IPv6FirewallRule FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static IPv6FirewallRule FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/InstanceFailoverGroup.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/InstanceFailoverGroup.cs index 1519f0dddbcf..0c803960062f 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/InstanceFailoverGroup.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/InstanceFailoverGroup.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.Sql; /// /// InstanceFailoverGroup. /// -public partial class InstanceFailoverGroup : Resource +public partial class InstanceFailoverGroup : ProvisionableResource { /// /// The name of the failover group. @@ -82,15 +82,15 @@ public partial class InstanceFailoverGroup : Resource /// /// Creates a new InstanceFailoverGroup. /// - /// + /// /// The the Bicep identifier name of the InstanceFailoverGroup resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, /// numbers, and underscores. /// /// Version of the InstanceFailoverGroup. - public InstanceFailoverGroup(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Sql/locations/instanceFailoverGroups", resourceVersion ?? "2021-11-01") + public InstanceFailoverGroup(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Sql/locations/instanceFailoverGroups", resourceVersion ?? "2021-11-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _managedInstancePairs = BicepList.DefineProperty(this, "ManagedInstancePairs", ["properties", "managedInstancePairs"]); @@ -109,11 +109,6 @@ public InstanceFailoverGroup(string identifierName, string? resourceVersion = de /// public static class ResourceVersions { - /// - /// 2024-05-01-preview. - /// - public static readonly string V2024_05_01_preview = "2024-05-01-preview"; - /// /// 2021-11-01. /// @@ -123,7 +118,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing InstanceFailoverGroup. /// - /// + /// /// The the Bicep identifier name of the InstanceFailoverGroup resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, @@ -131,6 +126,6 @@ public static class ResourceVersions /// /// Version of the InstanceFailoverGroup. /// The existing InstanceFailoverGroup resource. - public static InstanceFailoverGroup FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static InstanceFailoverGroup FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/InstancePool.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/InstancePool.cs index 6f3c00a4fa18..4c64b84ca43d 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/InstancePool.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/InstancePool.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.Sql; /// /// InstancePool. /// -public partial class InstancePool : Resource +public partial class InstancePool : ProvisionableResource { /// /// The name of the instance pool to be created or updated. @@ -90,15 +90,15 @@ public partial class InstancePool : Resource /// /// Creates a new InstancePool. /// - /// + /// /// The the Bicep identifier name of the InstancePool resource. This can /// be used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and /// underscores. /// /// Version of the InstancePool. - public InstancePool(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Sql/instancePools", resourceVersion ?? "2021-11-01") + public InstancePool(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Sql/instancePools", resourceVersion ?? "2021-11-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _location = BicepValue.DefineProperty(this, "Location", ["location"], isRequired: true); @@ -118,11 +118,6 @@ public InstancePool(string identifierName, string? resourceVersion = default) /// public static class ResourceVersions { - /// - /// 2024-05-01-preview. - /// - public static readonly string V2024_05_01_preview = "2024-05-01-preview"; - /// /// 2021-11-01. /// @@ -132,7 +127,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing InstancePool. /// - /// + /// /// The the Bicep identifier name of the InstancePool resource. This can /// be used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and @@ -140,6 +135,6 @@ public static class ResourceVersions /// /// Version of the InstancePool. /// The existing InstancePool resource. - public static InstancePool FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static InstancePool FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/LedgerDigestUpload.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/LedgerDigestUpload.cs index a9a8930dd1c5..bb5d79a6e3f4 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/LedgerDigestUpload.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/LedgerDigestUpload.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.Sql; /// /// LedgerDigestUpload. /// -public partial class LedgerDigestUpload : Resource +public partial class LedgerDigestUpload : ProvisionableResource { /// /// Gets the Name. @@ -57,15 +57,15 @@ public partial class LedgerDigestUpload : Resource /// /// Creates a new LedgerDigestUpload. /// - /// + /// /// The the Bicep identifier name of the LedgerDigestUpload resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, /// and underscores. /// /// Version of the LedgerDigestUpload. - public LedgerDigestUpload(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Sql/servers/databases/ledgerDigestUploads", resourceVersion ?? "2021-11-01") + public LedgerDigestUpload(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Sql/servers/databases/ledgerDigestUploads", resourceVersion ?? "2021-11-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _digestStorageEndpoint = BicepValue.DefineProperty(this, "DigestStorageEndpoint", ["properties", "digestStorageEndpoint"]); @@ -80,11 +80,6 @@ public LedgerDigestUpload(string identifierName, string? resourceVersion = defau /// public static class ResourceVersions { - /// - /// 2024-05-01-preview. - /// - public static readonly string V2024_05_01_preview = "2024-05-01-preview"; - /// /// 2021-11-01. /// @@ -94,7 +89,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing LedgerDigestUpload. /// - /// + /// /// The the Bicep identifier name of the LedgerDigestUpload resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, @@ -102,6 +97,6 @@ public static class ResourceVersions /// /// Version of the LedgerDigestUpload. /// The existing LedgerDigestUpload resource. - public static LedgerDigestUpload FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static LedgerDigestUpload FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/LogicalDatabaseTransparentDataEncryption.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/LogicalDatabaseTransparentDataEncryption.cs index 30dd964cb655..32dbc9b29722 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/LogicalDatabaseTransparentDataEncryption.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/LogicalDatabaseTransparentDataEncryption.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.Sql; /// /// LogicalDatabaseTransparentDataEncryption. /// -public partial class LogicalDatabaseTransparentDataEncryption : Resource +public partial class LogicalDatabaseTransparentDataEncryption : ProvisionableResource { /// /// Gets the Name. @@ -50,7 +50,7 @@ public partial class LogicalDatabaseTransparentDataEncryption : Resource /// /// Creates a new LogicalDatabaseTransparentDataEncryption. /// - /// + /// /// The the Bicep identifier name of the /// LogicalDatabaseTransparentDataEncryption resource. This can be used /// to refer to the resource in expressions, but is not the Azure name of @@ -58,8 +58,8 @@ public partial class LogicalDatabaseTransparentDataEncryption : Resource /// underscores. /// /// Version of the LogicalDatabaseTransparentDataEncryption. - public LogicalDatabaseTransparentDataEncryption(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Sql/servers/databases/transparentDataEncryption", resourceVersion ?? "2021-11-01") + public LogicalDatabaseTransparentDataEncryption(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Sql/servers/databases/transparentDataEncryption", resourceVersion ?? "2021-11-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _state = BicepValue.DefineProperty(this, "State", ["properties", "state"]); @@ -73,11 +73,6 @@ public LogicalDatabaseTransparentDataEncryption(string identifierName, string? r /// public static class ResourceVersions { - /// - /// 2024-05-01-preview. - /// - public static readonly string V2024_05_01_preview = "2024-05-01-preview"; - /// /// 2021-11-01. /// @@ -93,7 +88,7 @@ public static class ResourceVersions /// Creates a reference to an existing /// LogicalDatabaseTransparentDataEncryption. /// - /// + /// /// The the Bicep identifier name of the /// LogicalDatabaseTransparentDataEncryption resource. This can be used /// to refer to the resource in expressions, but is not the Azure name of @@ -102,6 +97,6 @@ public static class ResourceVersions /// /// Version of the LogicalDatabaseTransparentDataEncryption. /// The existing LogicalDatabaseTransparentDataEncryption resource. - public static LogicalDatabaseTransparentDataEncryption FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static LogicalDatabaseTransparentDataEncryption FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/LongTermRetentionPolicy.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/LongTermRetentionPolicy.cs index 98ab511d0188..ea762c2bbfca 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/LongTermRetentionPolicy.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/LongTermRetentionPolicy.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.Sql; /// /// LongTermRetentionPolicy. /// -public partial class LongTermRetentionPolicy : Resource +public partial class LongTermRetentionPolicy : ProvisionableResource { /// /// Gets the Name. @@ -80,15 +80,15 @@ public partial class LongTermRetentionPolicy : Resource /// /// Creates a new LongTermRetentionPolicy. /// - /// + /// /// The the Bicep identifier name of the LongTermRetentionPolicy resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, /// numbers, and underscores. /// /// Version of the LongTermRetentionPolicy. - public LongTermRetentionPolicy(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Sql/servers/databases/backupLongTermRetentionPolicies", resourceVersion ?? "2021-11-01") + public LongTermRetentionPolicy(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Sql/servers/databases/backupLongTermRetentionPolicies", resourceVersion ?? "2021-11-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _backupStorageAccessTier = BicepValue.DefineProperty(this, "BackupStorageAccessTier", ["properties", "backupStorageAccessTier"]); @@ -107,11 +107,6 @@ public LongTermRetentionPolicy(string identifierName, string? resourceVersion = /// public static class ResourceVersions { - /// - /// 2024-05-01-preview. - /// - public static readonly string V2024_05_01_preview = "2024-05-01-preview"; - /// /// 2021-11-01. /// @@ -121,7 +116,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing LongTermRetentionPolicy. /// - /// + /// /// The the Bicep identifier name of the LongTermRetentionPolicy resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, @@ -129,6 +124,6 @@ public static class ResourceVersions /// /// Version of the LongTermRetentionPolicy. /// The existing LongTermRetentionPolicy resource. - public static LongTermRetentionPolicy FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static LongTermRetentionPolicy FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ManagedBackupShortTermRetentionPolicy.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ManagedBackupShortTermRetentionPolicy.cs index 6604582d59c3..e86c9f1a099a 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ManagedBackupShortTermRetentionPolicy.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ManagedBackupShortTermRetentionPolicy.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.Sql; /// /// ManagedBackupShortTermRetentionPolicy. /// -public partial class ManagedBackupShortTermRetentionPolicy : Resource +public partial class ManagedBackupShortTermRetentionPolicy : ProvisionableResource { /// /// Gets the Name. @@ -51,15 +51,15 @@ public partial class ManagedBackupShortTermRetentionPolicy : Resource /// /// Creates a new ManagedBackupShortTermRetentionPolicy. /// - /// + /// /// The the Bicep identifier name of the /// ManagedBackupShortTermRetentionPolicy resource. This can be used to /// refer to the resource in expressions, but is not the Azure name of the /// resource. This value can contain letters, numbers, and underscores. /// /// Version of the ManagedBackupShortTermRetentionPolicy. - public ManagedBackupShortTermRetentionPolicy(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Sql/managedInstances/databases/backupShortTermRetentionPolicies", resourceVersion ?? "2021-11-01") + public ManagedBackupShortTermRetentionPolicy(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Sql/managedInstances/databases/backupShortTermRetentionPolicies", resourceVersion ?? "2021-11-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _retentionDays = BicepValue.DefineProperty(this, "RetentionDays", ["properties", "retentionDays"]); @@ -73,11 +73,6 @@ public ManagedBackupShortTermRetentionPolicy(string identifierName, string? reso /// public static class ResourceVersions { - /// - /// 2024-05-01-preview. - /// - public static readonly string V2024_05_01_preview = "2024-05-01-preview"; - /// /// 2021-11-01. /// @@ -88,7 +83,7 @@ public static class ResourceVersions /// Creates a reference to an existing /// ManagedBackupShortTermRetentionPolicy. /// - /// + /// /// The the Bicep identifier name of the /// ManagedBackupShortTermRetentionPolicy resource. This can be used to /// refer to the resource in expressions, but is not the Azure name of the @@ -96,6 +91,6 @@ public static class ResourceVersions /// /// Version of the ManagedBackupShortTermRetentionPolicy. /// The existing ManagedBackupShortTermRetentionPolicy resource. - public static ManagedBackupShortTermRetentionPolicy FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static ManagedBackupShortTermRetentionPolicy FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ManagedDatabase.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ManagedDatabase.cs index aa5bba47025c..4cb0e5c4d639 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ManagedDatabase.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ManagedDatabase.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.Sql; /// /// ManagedDatabase. /// -public partial class ManagedDatabase : Resource +public partial class ManagedDatabase : ProvisionableResource { /// /// The name of the database. @@ -218,15 +218,15 @@ public partial class ManagedDatabase : Resource /// /// Creates a new ManagedDatabase. /// - /// + /// /// The the Bicep identifier name of the ManagedDatabase resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, /// and underscores. /// /// Version of the ManagedDatabase. - public ManagedDatabase(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Sql/managedInstances/databases", resourceVersion ?? "2021-11-01") + public ManagedDatabase(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Sql/managedInstances/databases", resourceVersion ?? "2021-11-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _location = BicepValue.DefineProperty(this, "Location", ["location"], isRequired: true); @@ -263,11 +263,6 @@ public ManagedDatabase(string identifierName, string? resourceVersion = default) /// public static class ResourceVersions { - /// - /// 2024-05-01-preview. - /// - public static readonly string V2024_05_01_preview = "2024-05-01-preview"; - /// /// 2021-11-01. /// @@ -277,7 +272,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing ManagedDatabase. /// - /// + /// /// The the Bicep identifier name of the ManagedDatabase resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, @@ -285,6 +280,6 @@ public static class ResourceVersions /// /// Version of the ManagedDatabase. /// The existing ManagedDatabase resource. - public static ManagedDatabase FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static ManagedDatabase FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ManagedDatabaseAdvancedThreatProtection.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ManagedDatabaseAdvancedThreatProtection.cs index 40e90fa91107..7a9aa082bf16 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ManagedDatabaseAdvancedThreatProtection.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ManagedDatabaseAdvancedThreatProtection.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.Sql; /// /// ManagedDatabaseAdvancedThreatProtection. /// -public partial class ManagedDatabaseAdvancedThreatProtection : Resource +public partial class ManagedDatabaseAdvancedThreatProtection : ProvisionableResource { /// /// Gets the Name. @@ -58,15 +58,15 @@ public partial class ManagedDatabaseAdvancedThreatProtection : Resource /// /// Creates a new ManagedDatabaseAdvancedThreatProtection. /// - /// + /// /// The the Bicep identifier name of the /// ManagedDatabaseAdvancedThreatProtection resource. This can be used to /// refer to the resource in expressions, but is not the Azure name of the /// resource. This value can contain letters, numbers, and underscores. /// /// Version of the ManagedDatabaseAdvancedThreatProtection. - public ManagedDatabaseAdvancedThreatProtection(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Sql/managedInstances/databases/advancedThreatProtectionSettings", resourceVersion ?? "2024-05-01-preview") + public ManagedDatabaseAdvancedThreatProtection(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Sql/managedInstances/databases/advancedThreatProtectionSettings", resourceVersion ?? "2021-11-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _state = BicepValue.DefineProperty(this, "State", ["properties", "state"]); @@ -82,16 +82,16 @@ public ManagedDatabaseAdvancedThreatProtection(string identifierName, string? re public static class ResourceVersions { /// - /// 2024-05-01-preview. + /// 2021-11-01. /// - public static readonly string V2024_05_01_preview = "2024-05-01-preview"; + public static readonly string V2021_11_01 = "2021-11-01"; } /// /// Creates a reference to an existing /// ManagedDatabaseAdvancedThreatProtection. /// - /// + /// /// The the Bicep identifier name of the /// ManagedDatabaseAdvancedThreatProtection resource. This can be used to /// refer to the resource in expressions, but is not the Azure name of the @@ -99,6 +99,6 @@ public static class ResourceVersions /// /// Version of the ManagedDatabaseAdvancedThreatProtection. /// The existing ManagedDatabaseAdvancedThreatProtection resource. - public static ManagedDatabaseAdvancedThreatProtection FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static ManagedDatabaseAdvancedThreatProtection FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ManagedDatabaseSecurityAlertPolicy.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ManagedDatabaseSecurityAlertPolicy.cs index b73440904597..cffe0a8c5f8d 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ManagedDatabaseSecurityAlertPolicy.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ManagedDatabaseSecurityAlertPolicy.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.Sql; /// /// ManagedDatabaseSecurityAlertPolicy. /// -public partial class ManagedDatabaseSecurityAlertPolicy : Resource +public partial class ManagedDatabaseSecurityAlertPolicy : ProvisionableResource { /// /// Gets the Name. @@ -99,15 +99,15 @@ public partial class ManagedDatabaseSecurityAlertPolicy : Resource /// /// Creates a new ManagedDatabaseSecurityAlertPolicy. /// - /// + /// /// The the Bicep identifier name of the ManagedDatabaseSecurityAlertPolicy /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the ManagedDatabaseSecurityAlertPolicy. - public ManagedDatabaseSecurityAlertPolicy(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Sql/managedInstances/databases/securityAlertPolicies", resourceVersion ?? "2021-11-01") + public ManagedDatabaseSecurityAlertPolicy(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Sql/managedInstances/databases/securityAlertPolicies", resourceVersion ?? "2021-11-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _disabledAlerts = BicepList.DefineProperty(this, "DisabledAlerts", ["properties", "disabledAlerts"]); @@ -128,11 +128,6 @@ public ManagedDatabaseSecurityAlertPolicy(string identifierName, string? resourc /// public static class ResourceVersions { - /// - /// 2024-05-01-preview. - /// - public static readonly string V2024_05_01_preview = "2024-05-01-preview"; - /// /// 2021-11-01. /// @@ -142,7 +137,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing ManagedDatabaseSecurityAlertPolicy. /// - /// + /// /// The the Bicep identifier name of the ManagedDatabaseSecurityAlertPolicy /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -150,6 +145,6 @@ public static class ResourceVersions /// /// Version of the ManagedDatabaseSecurityAlertPolicy. /// The existing ManagedDatabaseSecurityAlertPolicy resource. - public static ManagedDatabaseSecurityAlertPolicy FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static ManagedDatabaseSecurityAlertPolicy FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ManagedDatabaseSensitivityLabel.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ManagedDatabaseSensitivityLabel.cs index 8e5bd4065c53..fd2e0162f36e 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ManagedDatabaseSensitivityLabel.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ManagedDatabaseSensitivityLabel.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.Sql; /// /// ManagedDatabaseSensitivityLabel. /// -public partial class ManagedDatabaseSensitivityLabel : Resource +public partial class ManagedDatabaseSensitivityLabel : ProvisionableResource { /// /// Gets the Name. @@ -100,15 +100,15 @@ public partial class ManagedDatabaseSensitivityLabel : Resource /// /// Creates a new ManagedDatabaseSensitivityLabel. /// - /// + /// /// The the Bicep identifier name of the ManagedDatabaseSensitivityLabel /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the ManagedDatabaseSensitivityLabel. - public ManagedDatabaseSensitivityLabel(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Sql/managedInstances/databases/schemas/tables/columns/sensitivityLabels", resourceVersion) + public ManagedDatabaseSensitivityLabel(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Sql/managedInstances/databases/schemas/tables/columns/sensitivityLabels", resourceVersion) { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _informationType = BicepValue.DefineProperty(this, "InformationType", ["properties", "informationType"]); @@ -128,7 +128,7 @@ public ManagedDatabaseSensitivityLabel(string identifierName, string? resourceVe /// /// Creates a reference to an existing ManagedDatabaseSensitivityLabel. /// - /// + /// /// The the Bicep identifier name of the ManagedDatabaseSensitivityLabel /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -136,6 +136,6 @@ public ManagedDatabaseSensitivityLabel(string identifierName, string? resourceVe /// /// Version of the ManagedDatabaseSensitivityLabel. /// The existing ManagedDatabaseSensitivityLabel resource. - public static ManagedDatabaseSensitivityLabel FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static ManagedDatabaseSensitivityLabel FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ManagedDatabaseVulnerabilityAssessment.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ManagedDatabaseVulnerabilityAssessment.cs index 420b5122f752..f001c1b7e6d0 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ManagedDatabaseVulnerabilityAssessment.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ManagedDatabaseVulnerabilityAssessment.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.Sql; /// /// ManagedDatabaseVulnerabilityAssessment. /// -public partial class ManagedDatabaseVulnerabilityAssessment : Resource +public partial class ManagedDatabaseVulnerabilityAssessment : ProvisionableResource { /// /// Gets the Name. @@ -76,15 +76,15 @@ public partial class ManagedDatabaseVulnerabilityAssessment : Resource /// /// Creates a new ManagedDatabaseVulnerabilityAssessment. /// - /// + /// /// The the Bicep identifier name of the /// ManagedDatabaseVulnerabilityAssessment resource. This can be used to /// refer to the resource in expressions, but is not the Azure name of the /// resource. This value can contain letters, numbers, and underscores. /// /// Version of the ManagedDatabaseVulnerabilityAssessment. - public ManagedDatabaseVulnerabilityAssessment(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Sql/managedInstances/databases/vulnerabilityAssessments", resourceVersion ?? "2021-11-01") + public ManagedDatabaseVulnerabilityAssessment(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Sql/managedInstances/databases/vulnerabilityAssessments", resourceVersion ?? "2021-11-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _recurringScans = BicepValue.DefineProperty(this, "RecurringScans", ["properties", "recurringScans"]); @@ -101,11 +101,6 @@ public ManagedDatabaseVulnerabilityAssessment(string identifierName, string? res /// public static class ResourceVersions { - /// - /// 2024-05-01-preview. - /// - public static readonly string V2024_05_01_preview = "2024-05-01-preview"; - /// /// 2021-11-01. /// @@ -116,7 +111,7 @@ public static class ResourceVersions /// Creates a reference to an existing /// ManagedDatabaseVulnerabilityAssessment. /// - /// + /// /// The the Bicep identifier name of the /// ManagedDatabaseVulnerabilityAssessment resource. This can be used to /// refer to the resource in expressions, but is not the Azure name of the @@ -124,6 +119,6 @@ public static class ResourceVersions /// /// Version of the ManagedDatabaseVulnerabilityAssessment. /// The existing ManagedDatabaseVulnerabilityAssessment resource. - public static ManagedDatabaseVulnerabilityAssessment FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static ManagedDatabaseVulnerabilityAssessment FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ManagedDatabaseVulnerabilityAssessmentRuleBaseline.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ManagedDatabaseVulnerabilityAssessmentRuleBaseline.cs index c9103e5e1861..f1ad0843cd2e 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ManagedDatabaseVulnerabilityAssessmentRuleBaseline.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ManagedDatabaseVulnerabilityAssessmentRuleBaseline.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.Sql; /// /// ManagedDatabaseVulnerabilityAssessmentRuleBaseline. /// -public partial class ManagedDatabaseVulnerabilityAssessmentRuleBaseline : Resource +public partial class ManagedDatabaseVulnerabilityAssessmentRuleBaseline : ProvisionableResource { /// /// Gets the Name. @@ -45,7 +45,7 @@ public partial class ManagedDatabaseVulnerabilityAssessmentRuleBaseline : Resour /// /// Creates a new ManagedDatabaseVulnerabilityAssessmentRuleBaseline. /// - /// + /// /// The the Bicep identifier name of the /// ManagedDatabaseVulnerabilityAssessmentRuleBaseline resource. This can /// be used to refer to the resource in expressions, but is not the Azure @@ -53,8 +53,8 @@ public partial class ManagedDatabaseVulnerabilityAssessmentRuleBaseline : Resour /// underscores. /// /// Version of the ManagedDatabaseVulnerabilityAssessmentRuleBaseline. - public ManagedDatabaseVulnerabilityAssessmentRuleBaseline(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Sql/managedInstances/databases/vulnerabilityAssessments/rules/baselines", resourceVersion) + public ManagedDatabaseVulnerabilityAssessmentRuleBaseline(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Sql/managedInstances/databases/vulnerabilityAssessments/rules/baselines", resourceVersion) { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _baselineResults = BicepList.DefineProperty(this, "BaselineResults", ["properties", "baselineResults"]); @@ -66,7 +66,7 @@ public ManagedDatabaseVulnerabilityAssessmentRuleBaseline(string identifierName, /// Creates a reference to an existing /// ManagedDatabaseVulnerabilityAssessmentRuleBaseline. /// - /// + /// /// The the Bicep identifier name of the /// ManagedDatabaseVulnerabilityAssessmentRuleBaseline resource. This can /// be used to refer to the resource in expressions, but is not the Azure @@ -75,6 +75,6 @@ public ManagedDatabaseVulnerabilityAssessmentRuleBaseline(string identifierName, /// /// Version of the ManagedDatabaseVulnerabilityAssessmentRuleBaseline. /// The existing ManagedDatabaseVulnerabilityAssessmentRuleBaseline resource. - public static ManagedDatabaseVulnerabilityAssessmentRuleBaseline FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static ManagedDatabaseVulnerabilityAssessmentRuleBaseline FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ManagedInstance.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ManagedInstance.cs index 2d183ec0df29..6fc1a37ccaaf 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ManagedInstance.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ManagedInstance.cs @@ -17,7 +17,7 @@ namespace Azure.Provisioning.Sql; /// /// ManagedInstance. /// -public partial class ManagedInstance : Resource +public partial class ManagedInstance : ProvisionableResource { /// /// The name of the managed instance. @@ -274,15 +274,15 @@ public partial class ManagedInstance : Resource /// /// Creates a new ManagedInstance. /// - /// + /// /// The the Bicep identifier name of the ManagedInstance resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, /// and underscores. /// /// Version of the ManagedInstance. - public ManagedInstance(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Sql/managedInstances", resourceVersion ?? "2021-11-01") + public ManagedInstance(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Sql/managedInstances", resourceVersion ?? "2021-11-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _location = BicepValue.DefineProperty(this, "Location", ["location"], isRequired: true); @@ -327,11 +327,6 @@ public ManagedInstance(string identifierName, string? resourceVersion = default) /// public static class ResourceVersions { - /// - /// 2024-05-01-preview. - /// - public static readonly string V2024_05_01_preview = "2024-05-01-preview"; - /// /// 2021-11-01. /// @@ -341,7 +336,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing ManagedInstance. /// - /// + /// /// The the Bicep identifier name of the ManagedInstance resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, @@ -349,8 +344,8 @@ public static class ResourceVersions /// /// Version of the ManagedInstance. /// The existing ManagedInstance resource. - public static ManagedInstance FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static ManagedInstance FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; /// /// Get the requirements for naming this ManagedInstance resource. diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ManagedInstanceAdministrator.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ManagedInstanceAdministrator.cs index 07ad74256ac6..d4883b6cdb2d 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ManagedInstanceAdministrator.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ManagedInstanceAdministrator.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.Sql; /// /// ManagedInstanceAdministrator. /// -public partial class ManagedInstanceAdministrator : Resource +public partial class ManagedInstanceAdministrator : ProvisionableResource { /// /// Gets the Name. @@ -68,15 +68,15 @@ public partial class ManagedInstanceAdministrator : Resource /// /// Creates a new ManagedInstanceAdministrator. /// - /// + /// /// The the Bicep identifier name of the ManagedInstanceAdministrator /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the ManagedInstanceAdministrator. - public ManagedInstanceAdministrator(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Sql/managedInstances/administrators", resourceVersion ?? "2021-11-01") + public ManagedInstanceAdministrator(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Sql/managedInstances/administrators", resourceVersion ?? "2021-11-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _administratorType = BicepValue.DefineProperty(this, "AdministratorType", ["properties", "administratorType"]); @@ -93,11 +93,6 @@ public ManagedInstanceAdministrator(string identifierName, string? resourceVersi /// public static class ResourceVersions { - /// - /// 2024-05-01-preview. - /// - public static readonly string V2024_05_01_preview = "2024-05-01-preview"; - /// /// 2021-11-01. /// @@ -107,7 +102,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing ManagedInstanceAdministrator. /// - /// + /// /// The the Bicep identifier name of the ManagedInstanceAdministrator /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -115,6 +110,6 @@ public static class ResourceVersions /// /// Version of the ManagedInstanceAdministrator. /// The existing ManagedInstanceAdministrator resource. - public static ManagedInstanceAdministrator FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static ManagedInstanceAdministrator FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ManagedInstanceAdvancedThreatProtection.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ManagedInstanceAdvancedThreatProtection.cs index bd56ef31d068..06d1ea1a5167 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ManagedInstanceAdvancedThreatProtection.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ManagedInstanceAdvancedThreatProtection.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.Sql; /// /// ManagedInstanceAdvancedThreatProtection. /// -public partial class ManagedInstanceAdvancedThreatProtection : Resource +public partial class ManagedInstanceAdvancedThreatProtection : ProvisionableResource { /// /// Gets the Name. @@ -58,15 +58,15 @@ public partial class ManagedInstanceAdvancedThreatProtection : Resource /// /// Creates a new ManagedInstanceAdvancedThreatProtection. /// - /// + /// /// The the Bicep identifier name of the /// ManagedInstanceAdvancedThreatProtection resource. This can be used to /// refer to the resource in expressions, but is not the Azure name of the /// resource. This value can contain letters, numbers, and underscores. /// /// Version of the ManagedInstanceAdvancedThreatProtection. - public ManagedInstanceAdvancedThreatProtection(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Sql/managedInstances/advancedThreatProtectionSettings", resourceVersion ?? "2024-05-01-preview") + public ManagedInstanceAdvancedThreatProtection(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Sql/managedInstances/advancedThreatProtectionSettings", resourceVersion ?? "2021-11-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _state = BicepValue.DefineProperty(this, "State", ["properties", "state"]); @@ -82,16 +82,16 @@ public ManagedInstanceAdvancedThreatProtection(string identifierName, string? re public static class ResourceVersions { /// - /// 2024-05-01-preview. + /// 2021-11-01. /// - public static readonly string V2024_05_01_preview = "2024-05-01-preview"; + public static readonly string V2021_11_01 = "2021-11-01"; } /// /// Creates a reference to an existing /// ManagedInstanceAdvancedThreatProtection. /// - /// + /// /// The the Bicep identifier name of the /// ManagedInstanceAdvancedThreatProtection resource. This can be used to /// refer to the resource in expressions, but is not the Azure name of the @@ -99,6 +99,6 @@ public static class ResourceVersions /// /// Version of the ManagedInstanceAdvancedThreatProtection. /// The existing ManagedInstanceAdvancedThreatProtection resource. - public static ManagedInstanceAdvancedThreatProtection FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static ManagedInstanceAdvancedThreatProtection FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ManagedInstanceAzureADOnlyAuthentication.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ManagedInstanceAzureADOnlyAuthentication.cs index 77b892d3d7ed..863417913849 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ManagedInstanceAzureADOnlyAuthentication.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ManagedInstanceAzureADOnlyAuthentication.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.Sql; /// /// ManagedInstanceAzureADOnlyAuthentication. /// -public partial class ManagedInstanceAzureADOnlyAuthentication : Resource +public partial class ManagedInstanceAzureADOnlyAuthentication : ProvisionableResource { /// /// Gets the Name. @@ -50,7 +50,7 @@ public partial class ManagedInstanceAzureADOnlyAuthentication : Resource /// /// Creates a new ManagedInstanceAzureADOnlyAuthentication. /// - /// + /// /// The the Bicep identifier name of the /// ManagedInstanceAzureADOnlyAuthentication resource. This can be used /// to refer to the resource in expressions, but is not the Azure name of @@ -58,8 +58,8 @@ public partial class ManagedInstanceAzureADOnlyAuthentication : Resource /// underscores. /// /// Version of the ManagedInstanceAzureADOnlyAuthentication. - public ManagedInstanceAzureADOnlyAuthentication(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Sql/managedInstances/azureADOnlyAuthentications", resourceVersion ?? "2021-11-01") + public ManagedInstanceAzureADOnlyAuthentication(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Sql/managedInstances/azureADOnlyAuthentications", resourceVersion ?? "2021-11-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _isAzureADOnlyAuthenticationEnabled = BicepValue.DefineProperty(this, "IsAzureADOnlyAuthenticationEnabled", ["properties", "azureADOnlyAuthentication"]); @@ -73,11 +73,6 @@ public ManagedInstanceAzureADOnlyAuthentication(string identifierName, string? r /// public static class ResourceVersions { - /// - /// 2024-05-01-preview. - /// - public static readonly string V2024_05_01_preview = "2024-05-01-preview"; - /// /// 2021-11-01. /// @@ -88,7 +83,7 @@ public static class ResourceVersions /// Creates a reference to an existing /// ManagedInstanceAzureADOnlyAuthentication. /// - /// + /// /// The the Bicep identifier name of the /// ManagedInstanceAzureADOnlyAuthentication resource. This can be used /// to refer to the resource in expressions, but is not the Azure name of @@ -97,6 +92,6 @@ public static class ResourceVersions /// /// Version of the ManagedInstanceAzureADOnlyAuthentication. /// The existing ManagedInstanceAzureADOnlyAuthentication resource. - public static ManagedInstanceAzureADOnlyAuthentication FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static ManagedInstanceAzureADOnlyAuthentication FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ManagedInstanceDtc.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ManagedInstanceDtc.cs index e059b635a981..f5466a047c1b 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ManagedInstanceDtc.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ManagedInstanceDtc.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.Sql; /// /// ManagedInstanceDtc. /// -public partial class ManagedInstanceDtc : Resource +public partial class ManagedInstanceDtc : ProvisionableResource { /// /// Gets the Name. @@ -75,15 +75,15 @@ public partial class ManagedInstanceDtc : Resource /// /// Creates a new ManagedInstanceDtc. /// - /// + /// /// The the Bicep identifier name of the ManagedInstanceDtc resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, /// and underscores. /// /// Version of the ManagedInstanceDtc. - public ManagedInstanceDtc(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Sql/managedInstances/dtc", resourceVersion ?? "2021-11-01") + public ManagedInstanceDtc(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Sql/managedInstances/dtc", resourceVersion ?? "2021-11-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _dtcEnabled = BicepValue.DefineProperty(this, "DtcEnabled", ["properties", "dtcEnabled"]); @@ -101,11 +101,6 @@ public ManagedInstanceDtc(string identifierName, string? resourceVersion = defau /// public static class ResourceVersions { - /// - /// 2024-05-01-preview. - /// - public static readonly string V2024_05_01_preview = "2024-05-01-preview"; - /// /// 2021-11-01. /// @@ -115,7 +110,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing ManagedInstanceDtc. /// - /// + /// /// The the Bicep identifier name of the ManagedInstanceDtc resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, @@ -123,6 +118,6 @@ public static class ResourceVersions /// /// Version of the ManagedInstanceDtc. /// The existing ManagedInstanceDtc resource. - public static ManagedInstanceDtc FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static ManagedInstanceDtc FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ManagedInstanceEncryptionProtector.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ManagedInstanceEncryptionProtector.cs index 4d5151fc4017..c7a161562cde 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ManagedInstanceEncryptionProtector.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ManagedInstanceEncryptionProtector.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.Sql; /// /// ManagedInstanceEncryptionProtector. /// -public partial class ManagedInstanceEncryptionProtector : Resource +public partial class ManagedInstanceEncryptionProtector : ProvisionableResource { /// /// Gets the Name. @@ -82,15 +82,15 @@ public partial class ManagedInstanceEncryptionProtector : Resource /// /// Creates a new ManagedInstanceEncryptionProtector. /// - /// + /// /// The the Bicep identifier name of the ManagedInstanceEncryptionProtector /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the ManagedInstanceEncryptionProtector. - public ManagedInstanceEncryptionProtector(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Sql/managedInstances/encryptionProtector", resourceVersion ?? "2021-11-01") + public ManagedInstanceEncryptionProtector(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Sql/managedInstances/encryptionProtector", resourceVersion ?? "2021-11-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _isAutoRotationEnabled = BicepValue.DefineProperty(this, "IsAutoRotationEnabled", ["properties", "autoRotationEnabled"]); @@ -109,11 +109,6 @@ public ManagedInstanceEncryptionProtector(string identifierName, string? resourc /// public static class ResourceVersions { - /// - /// 2024-05-01-preview. - /// - public static readonly string V2024_05_01_preview = "2024-05-01-preview"; - /// /// 2021-11-01. /// @@ -123,7 +118,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing ManagedInstanceEncryptionProtector. /// - /// + /// /// The the Bicep identifier name of the ManagedInstanceEncryptionProtector /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -131,6 +126,6 @@ public static class ResourceVersions /// /// Version of the ManagedInstanceEncryptionProtector. /// The existing ManagedInstanceEncryptionProtector resource. - public static ManagedInstanceEncryptionProtector FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static ManagedInstanceEncryptionProtector FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ManagedInstanceKey.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ManagedInstanceKey.cs index 7b2a5d09cb0b..e0fe266c92eb 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ManagedInstanceKey.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ManagedInstanceKey.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.Sql; /// /// ManagedInstanceKey. /// -public partial class ManagedInstanceKey : Resource +public partial class ManagedInstanceKey : ProvisionableResource { /// /// The name of the managed instance key to be operated on (updated or @@ -83,15 +83,15 @@ public partial class ManagedInstanceKey : Resource /// /// Creates a new ManagedInstanceKey. /// - /// + /// /// The the Bicep identifier name of the ManagedInstanceKey resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, /// and underscores. /// /// Version of the ManagedInstanceKey. - public ManagedInstanceKey(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Sql/managedInstances/keys", resourceVersion ?? "2021-11-01") + public ManagedInstanceKey(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Sql/managedInstances/keys", resourceVersion ?? "2021-11-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _serverKeyType = BicepValue.DefineProperty(this, "ServerKeyType", ["properties", "serverKeyType"]); @@ -110,11 +110,6 @@ public ManagedInstanceKey(string identifierName, string? resourceVersion = defau /// public static class ResourceVersions { - /// - /// 2024-05-01-preview. - /// - public static readonly string V2024_05_01_preview = "2024-05-01-preview"; - /// /// 2021-11-01. /// @@ -124,7 +119,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing ManagedInstanceKey. /// - /// + /// /// The the Bicep identifier name of the ManagedInstanceKey resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, @@ -132,6 +127,6 @@ public static class ResourceVersions /// /// Version of the ManagedInstanceKey. /// The existing ManagedInstanceKey resource. - public static ManagedInstanceKey FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static ManagedInstanceKey FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ManagedInstanceLongTermRetentionPolicy.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ManagedInstanceLongTermRetentionPolicy.cs index 67166204e719..a8b88bf6b7ac 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ManagedInstanceLongTermRetentionPolicy.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ManagedInstanceLongTermRetentionPolicy.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.Sql; /// /// ManagedInstanceLongTermRetentionPolicy. /// -public partial class ManagedInstanceLongTermRetentionPolicy : Resource +public partial class ManagedInstanceLongTermRetentionPolicy : ProvisionableResource { /// /// Gets the Name. @@ -68,15 +68,15 @@ public partial class ManagedInstanceLongTermRetentionPolicy : Resource /// /// Creates a new ManagedInstanceLongTermRetentionPolicy. /// - /// + /// /// The the Bicep identifier name of the /// ManagedInstanceLongTermRetentionPolicy resource. This can be used to /// refer to the resource in expressions, but is not the Azure name of the /// resource. This value can contain letters, numbers, and underscores. /// /// Version of the ManagedInstanceLongTermRetentionPolicy. - public ManagedInstanceLongTermRetentionPolicy(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Sql/managedInstances/databases/backupLongTermRetentionPolicies", resourceVersion ?? "2021-11-01") + public ManagedInstanceLongTermRetentionPolicy(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Sql/managedInstances/databases/backupLongTermRetentionPolicies", resourceVersion ?? "2021-11-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _monthlyRetention = BicepValue.DefineProperty(this, "MonthlyRetention", ["properties", "monthlyRetention"]); @@ -93,11 +93,6 @@ public ManagedInstanceLongTermRetentionPolicy(string identifierName, string? res /// public static class ResourceVersions { - /// - /// 2024-05-01-preview. - /// - public static readonly string V2024_05_01_preview = "2024-05-01-preview"; - /// /// 2021-11-01. /// @@ -108,7 +103,7 @@ public static class ResourceVersions /// Creates a reference to an existing /// ManagedInstanceLongTermRetentionPolicy. /// - /// + /// /// The the Bicep identifier name of the /// ManagedInstanceLongTermRetentionPolicy resource. This can be used to /// refer to the resource in expressions, but is not the Azure name of the @@ -116,6 +111,6 @@ public static class ResourceVersions /// /// Version of the ManagedInstanceLongTermRetentionPolicy. /// The existing ManagedInstanceLongTermRetentionPolicy resource. - public static ManagedInstanceLongTermRetentionPolicy FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static ManagedInstanceLongTermRetentionPolicy FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ManagedInstancePrivateEndpointConnection.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ManagedInstancePrivateEndpointConnection.cs index 5841777a9150..e988583f7fc3 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ManagedInstancePrivateEndpointConnection.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ManagedInstancePrivateEndpointConnection.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.Sql; /// /// ManagedInstancePrivateEndpointConnection. /// -public partial class ManagedInstancePrivateEndpointConnection : Resource +public partial class ManagedInstancePrivateEndpointConnection : ProvisionableResource { /// /// The System.String to use. @@ -62,7 +62,7 @@ public partial class ManagedInstancePrivateEndpointConnection : Resource /// /// Creates a new ManagedInstancePrivateEndpointConnection. /// - /// + /// /// The the Bicep identifier name of the /// ManagedInstancePrivateEndpointConnection resource. This can be used /// to refer to the resource in expressions, but is not the Azure name of @@ -70,8 +70,8 @@ public partial class ManagedInstancePrivateEndpointConnection : Resource /// underscores. /// /// Version of the ManagedInstancePrivateEndpointConnection. - public ManagedInstancePrivateEndpointConnection(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Sql/managedInstances/privateEndpointConnections", resourceVersion ?? "2021-11-01") + public ManagedInstancePrivateEndpointConnection(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Sql/managedInstances/privateEndpointConnections", resourceVersion ?? "2021-11-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _connectionState = BicepValue.DefineProperty(this, "ConnectionState", ["properties", "privateLinkServiceConnectionState"]); @@ -87,11 +87,6 @@ public ManagedInstancePrivateEndpointConnection(string identifierName, string? r /// public static class ResourceVersions { - /// - /// 2024-05-01-preview. - /// - public static readonly string V2024_05_01_preview = "2024-05-01-preview"; - /// /// 2021-11-01. /// @@ -102,7 +97,7 @@ public static class ResourceVersions /// Creates a reference to an existing /// ManagedInstancePrivateEndpointConnection. /// - /// + /// /// The the Bicep identifier name of the /// ManagedInstancePrivateEndpointConnection resource. This can be used /// to refer to the resource in expressions, but is not the Azure name of @@ -111,6 +106,6 @@ public static class ResourceVersions /// /// Version of the ManagedInstancePrivateEndpointConnection. /// The existing ManagedInstancePrivateEndpointConnection resource. - public static ManagedInstancePrivateEndpointConnection FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static ManagedInstancePrivateEndpointConnection FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ManagedInstanceServerConfigurationOption.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ManagedInstanceServerConfigurationOption.cs index ee595722a083..04c1d76f93aa 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ManagedInstanceServerConfigurationOption.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ManagedInstanceServerConfigurationOption.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.Sql; /// /// ManagedInstanceServerConfigurationOption. /// -public partial class ManagedInstanceServerConfigurationOption : Resource +public partial class ManagedInstanceServerConfigurationOption : ProvisionableResource { /// /// Gets the Name. @@ -56,7 +56,7 @@ public partial class ManagedInstanceServerConfigurationOption : Resource /// /// Creates a new ManagedInstanceServerConfigurationOption. /// - /// + /// /// The the Bicep identifier name of the /// ManagedInstanceServerConfigurationOption resource. This can be used /// to refer to the resource in expressions, but is not the Azure name of @@ -64,8 +64,8 @@ public partial class ManagedInstanceServerConfigurationOption : Resource /// underscores. /// /// Version of the ManagedInstanceServerConfigurationOption. - public ManagedInstanceServerConfigurationOption(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Sql/managedInstances/serverConfigurationOptions", resourceVersion ?? "2021-11-01") + public ManagedInstanceServerConfigurationOption(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Sql/managedInstances/serverConfigurationOptions", resourceVersion ?? "2021-11-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _serverConfigurationOptionValue = BicepValue.DefineProperty(this, "ServerConfigurationOptionValue", ["properties", "serverConfigurationOptionValue"]); @@ -80,11 +80,6 @@ public ManagedInstanceServerConfigurationOption(string identifierName, string? r /// public static class ResourceVersions { - /// - /// 2024-05-01-preview. - /// - public static readonly string V2024_05_01_preview = "2024-05-01-preview"; - /// /// 2021-11-01. /// @@ -95,7 +90,7 @@ public static class ResourceVersions /// Creates a reference to an existing /// ManagedInstanceServerConfigurationOption. /// - /// + /// /// The the Bicep identifier name of the /// ManagedInstanceServerConfigurationOption resource. This can be used /// to refer to the resource in expressions, but is not the Azure name of @@ -104,6 +99,6 @@ public static class ResourceVersions /// /// Version of the ManagedInstanceServerConfigurationOption. /// The existing ManagedInstanceServerConfigurationOption resource. - public static ManagedInstanceServerConfigurationOption FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static ManagedInstanceServerConfigurationOption FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ManagedInstanceServerTrustCertificate.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ManagedInstanceServerTrustCertificate.cs index 6eaf5f833cb1..1341a3ca8bb7 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ManagedInstanceServerTrustCertificate.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ManagedInstanceServerTrustCertificate.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.Sql; /// /// ManagedInstanceServerTrustCertificate. /// -public partial class ManagedInstanceServerTrustCertificate : Resource +public partial class ManagedInstanceServerTrustCertificate : ProvisionableResource { /// /// Name of of the certificate to upload. @@ -62,15 +62,15 @@ public partial class ManagedInstanceServerTrustCertificate : Resource /// /// Creates a new ManagedInstanceServerTrustCertificate. /// - /// + /// /// The the Bicep identifier name of the /// ManagedInstanceServerTrustCertificate resource. This can be used to /// refer to the resource in expressions, but is not the Azure name of the /// resource. This value can contain letters, numbers, and underscores. /// /// Version of the ManagedInstanceServerTrustCertificate. - public ManagedInstanceServerTrustCertificate(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Sql/managedInstances/serverTrustCertificates", resourceVersion ?? "2021-11-01") + public ManagedInstanceServerTrustCertificate(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Sql/managedInstances/serverTrustCertificates", resourceVersion ?? "2021-11-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _publicBlob = BicepValue.DefineProperty(this, "PublicBlob", ["properties", "publicBlob"]); @@ -86,11 +86,6 @@ public ManagedInstanceServerTrustCertificate(string identifierName, string? reso /// public static class ResourceVersions { - /// - /// 2024-05-01-preview. - /// - public static readonly string V2024_05_01_preview = "2024-05-01-preview"; - /// /// 2021-11-01. /// @@ -101,7 +96,7 @@ public static class ResourceVersions /// Creates a reference to an existing /// ManagedInstanceServerTrustCertificate. /// - /// + /// /// The the Bicep identifier name of the /// ManagedInstanceServerTrustCertificate resource. This can be used to /// refer to the resource in expressions, but is not the Azure name of the @@ -109,6 +104,6 @@ public static class ResourceVersions /// /// Version of the ManagedInstanceServerTrustCertificate. /// The existing ManagedInstanceServerTrustCertificate resource. - public static ManagedInstanceServerTrustCertificate FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static ManagedInstanceServerTrustCertificate FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ManagedInstanceStartStopSchedule.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ManagedInstanceStartStopSchedule.cs index 986f66c99392..9bddad6d9902 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ManagedInstanceStartStopSchedule.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ManagedInstanceStartStopSchedule.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.Sql; /// /// ManagedInstanceStartStopSchedule. /// -public partial class ManagedInstanceStartStopSchedule : Resource +public partial class ManagedInstanceStartStopSchedule : ProvisionableResource { /// /// Gets the Name. @@ -76,15 +76,15 @@ public partial class ManagedInstanceStartStopSchedule : Resource /// /// Creates a new ManagedInstanceStartStopSchedule. /// - /// + /// /// The the Bicep identifier name of the ManagedInstanceStartStopSchedule /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the ManagedInstanceStartStopSchedule. - public ManagedInstanceStartStopSchedule(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Sql/managedInstances/startStopSchedules", resourceVersion ?? "2021-11-01") + public ManagedInstanceStartStopSchedule(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Sql/managedInstances/startStopSchedules", resourceVersion ?? "2021-11-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _description = BicepValue.DefineProperty(this, "Description", ["properties", "description"]); @@ -102,11 +102,6 @@ public ManagedInstanceStartStopSchedule(string identifierName, string? resourceV /// public static class ResourceVersions { - /// - /// 2024-05-01-preview. - /// - public static readonly string V2024_05_01_preview = "2024-05-01-preview"; - /// /// 2021-11-01. /// @@ -116,7 +111,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing ManagedInstanceStartStopSchedule. /// - /// + /// /// The the Bicep identifier name of the ManagedInstanceStartStopSchedule /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -124,6 +119,6 @@ public static class ResourceVersions /// /// Version of the ManagedInstanceStartStopSchedule. /// The existing ManagedInstanceStartStopSchedule resource. - public static ManagedInstanceStartStopSchedule FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static ManagedInstanceStartStopSchedule FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ManagedInstanceVulnerabilityAssessment.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ManagedInstanceVulnerabilityAssessment.cs index 0414b6fd1990..ccfce21ca0c6 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ManagedInstanceVulnerabilityAssessment.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ManagedInstanceVulnerabilityAssessment.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.Sql; /// /// ManagedInstanceVulnerabilityAssessment. /// -public partial class ManagedInstanceVulnerabilityAssessment : Resource +public partial class ManagedInstanceVulnerabilityAssessment : ProvisionableResource { /// /// Gets the Name. @@ -77,15 +77,15 @@ public partial class ManagedInstanceVulnerabilityAssessment : Resource /// /// Creates a new ManagedInstanceVulnerabilityAssessment. /// - /// + /// /// The the Bicep identifier name of the /// ManagedInstanceVulnerabilityAssessment resource. This can be used to /// refer to the resource in expressions, but is not the Azure name of the /// resource. This value can contain letters, numbers, and underscores. /// /// Version of the ManagedInstanceVulnerabilityAssessment. - public ManagedInstanceVulnerabilityAssessment(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Sql/managedInstances/vulnerabilityAssessments", resourceVersion ?? "2021-11-01") + public ManagedInstanceVulnerabilityAssessment(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Sql/managedInstances/vulnerabilityAssessments", resourceVersion ?? "2021-11-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _recurringScans = BicepValue.DefineProperty(this, "RecurringScans", ["properties", "recurringScans"]); @@ -102,11 +102,6 @@ public ManagedInstanceVulnerabilityAssessment(string identifierName, string? res /// public static class ResourceVersions { - /// - /// 2024-05-01-preview. - /// - public static readonly string V2024_05_01_preview = "2024-05-01-preview"; - /// /// 2021-11-01. /// @@ -117,7 +112,7 @@ public static class ResourceVersions /// Creates a reference to an existing /// ManagedInstanceVulnerabilityAssessment. /// - /// + /// /// The the Bicep identifier name of the /// ManagedInstanceVulnerabilityAssessment resource. This can be used to /// refer to the resource in expressions, but is not the Azure name of the @@ -125,6 +120,6 @@ public static class ResourceVersions /// /// Version of the ManagedInstanceVulnerabilityAssessment. /// The existing ManagedInstanceVulnerabilityAssessment resource. - public static ManagedInstanceVulnerabilityAssessment FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static ManagedInstanceVulnerabilityAssessment FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ManagedLedgerDigestUpload.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ManagedLedgerDigestUpload.cs index bc234e7b0e47..213e3c3c33b3 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ManagedLedgerDigestUpload.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ManagedLedgerDigestUpload.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.Sql; /// /// ManagedLedgerDigestUpload. /// -public partial class ManagedLedgerDigestUpload : Resource +public partial class ManagedLedgerDigestUpload : ProvisionableResource { /// /// Gets the Name. @@ -57,15 +57,15 @@ public partial class ManagedLedgerDigestUpload : Resource /// /// Creates a new ManagedLedgerDigestUpload. /// - /// + /// /// The the Bicep identifier name of the ManagedLedgerDigestUpload /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the ManagedLedgerDigestUpload. - public ManagedLedgerDigestUpload(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Sql/managedInstances/databases/ledgerDigestUploads", resourceVersion ?? "2024-05-01-preview") + public ManagedLedgerDigestUpload(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Sql/managedInstances/databases/ledgerDigestUploads", resourceVersion ?? "2021-11-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _digestStorageEndpoint = BicepValue.DefineProperty(this, "DigestStorageEndpoint", ["properties", "digestStorageEndpoint"]); @@ -81,15 +81,15 @@ public ManagedLedgerDigestUpload(string identifierName, string? resourceVersion public static class ResourceVersions { /// - /// 2024-05-01-preview. + /// 2021-11-01. /// - public static readonly string V2024_05_01_preview = "2024-05-01-preview"; + public static readonly string V2021_11_01 = "2021-11-01"; } /// /// Creates a reference to an existing ManagedLedgerDigestUpload. /// - /// + /// /// The the Bicep identifier name of the ManagedLedgerDigestUpload /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -97,6 +97,6 @@ public static class ResourceVersions /// /// Version of the ManagedLedgerDigestUpload. /// The existing ManagedLedgerDigestUpload resource. - public static ManagedLedgerDigestUpload FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static ManagedLedgerDigestUpload FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ManagedRestorableDroppedDbBackupShortTermRetentionPolicy.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ManagedRestorableDroppedDbBackupShortTermRetentionPolicy.cs index 087b1ec98170..42f470eb73c9 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ManagedRestorableDroppedDbBackupShortTermRetentionPolicy.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ManagedRestorableDroppedDbBackupShortTermRetentionPolicy.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.Sql; /// /// ManagedRestorableDroppedDbBackupShortTermRetentionPolicy. /// -public partial class ManagedRestorableDroppedDbBackupShortTermRetentionPolicy : Resource +public partial class ManagedRestorableDroppedDbBackupShortTermRetentionPolicy : ProvisionableResource { /// /// Gets the Name. @@ -45,7 +45,7 @@ public partial class ManagedRestorableDroppedDbBackupShortTermRetentionPolicy : /// /// Creates a new ManagedRestorableDroppedDbBackupShortTermRetentionPolicy. /// - /// + /// /// The the Bicep identifier name of the /// ManagedRestorableDroppedDbBackupShortTermRetentionPolicy resource. /// This can be used to refer to the resource in expressions, but is not @@ -53,8 +53,8 @@ public partial class ManagedRestorableDroppedDbBackupShortTermRetentionPolicy : /// numbers, and underscores. /// /// Version of the ManagedRestorableDroppedDbBackupShortTermRetentionPolicy. - public ManagedRestorableDroppedDbBackupShortTermRetentionPolicy(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Sql/managedInstances/restorableDroppedDatabases/backupShortTermRetentionPolicies", resourceVersion) + public ManagedRestorableDroppedDbBackupShortTermRetentionPolicy(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Sql/managedInstances/restorableDroppedDatabases/backupShortTermRetentionPolicies", resourceVersion) { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _retentionDays = BicepValue.DefineProperty(this, "RetentionDays", ["properties", "retentionDays"]); @@ -66,7 +66,7 @@ public ManagedRestorableDroppedDbBackupShortTermRetentionPolicy(string identifie /// Creates a reference to an existing /// ManagedRestorableDroppedDbBackupShortTermRetentionPolicy. /// - /// + /// /// The the Bicep identifier name of the /// ManagedRestorableDroppedDbBackupShortTermRetentionPolicy resource. /// This can be used to refer to the resource in expressions, but is not @@ -75,6 +75,6 @@ public ManagedRestorableDroppedDbBackupShortTermRetentionPolicy(string identifie /// /// Version of the ManagedRestorableDroppedDbBackupShortTermRetentionPolicy. /// The existing ManagedRestorableDroppedDbBackupShortTermRetentionPolicy resource. - public static ManagedRestorableDroppedDbBackupShortTermRetentionPolicy FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static ManagedRestorableDroppedDbBackupShortTermRetentionPolicy FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ManagedServerDnsAlias.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ManagedServerDnsAlias.cs index ca3a6d7e59c7..9736fe44e13e 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ManagedServerDnsAlias.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ManagedServerDnsAlias.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.Sql; /// /// ManagedServerDnsAlias. /// -public partial class ManagedServerDnsAlias : Resource +public partial class ManagedServerDnsAlias : ProvisionableResource { /// /// The System.String to use. @@ -62,15 +62,15 @@ public partial class ManagedServerDnsAlias : Resource /// /// Creates a new ManagedServerDnsAlias. /// - /// + /// /// The the Bicep identifier name of the ManagedServerDnsAlias resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, /// numbers, and underscores. /// /// Version of the ManagedServerDnsAlias. - public ManagedServerDnsAlias(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Sql/managedInstances/dnsAliases", resourceVersion ?? "2021-11-01") + public ManagedServerDnsAlias(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Sql/managedInstances/dnsAliases", resourceVersion ?? "2021-11-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _createDnsRecord = BicepValue.DefineProperty(this, "CreateDnsRecord", ["createDnsRecord"]); @@ -86,11 +86,6 @@ public ManagedServerDnsAlias(string identifierName, string? resourceVersion = de /// public static class ResourceVersions { - /// - /// 2024-05-01-preview. - /// - public static readonly string V2024_05_01_preview = "2024-05-01-preview"; - /// /// 2021-11-01. /// @@ -100,7 +95,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing ManagedServerDnsAlias. /// - /// + /// /// The the Bicep identifier name of the ManagedServerDnsAlias resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, @@ -108,6 +103,6 @@ public static class ResourceVersions /// /// Version of the ManagedServerDnsAlias. /// The existing ManagedServerDnsAlias resource. - public static ManagedServerDnsAlias FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static ManagedServerDnsAlias FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ManagedServerSecurityAlertPolicy.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ManagedServerSecurityAlertPolicy.cs index 5a87b1930654..6f0a3b905585 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ManagedServerSecurityAlertPolicy.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ManagedServerSecurityAlertPolicy.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.Sql; /// /// ManagedServerSecurityAlertPolicy. /// -public partial class ManagedServerSecurityAlertPolicy : Resource +public partial class ManagedServerSecurityAlertPolicy : ProvisionableResource { /// /// Gets the Name. @@ -99,15 +99,15 @@ public partial class ManagedServerSecurityAlertPolicy : Resource /// /// Creates a new ManagedServerSecurityAlertPolicy. /// - /// + /// /// The the Bicep identifier name of the ManagedServerSecurityAlertPolicy /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the ManagedServerSecurityAlertPolicy. - public ManagedServerSecurityAlertPolicy(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Sql/managedInstances/securityAlertPolicies", resourceVersion ?? "2021-11-01") + public ManagedServerSecurityAlertPolicy(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Sql/managedInstances/securityAlertPolicies", resourceVersion ?? "2021-11-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _disabledAlerts = BicepList.DefineProperty(this, "DisabledAlerts", ["properties", "disabledAlerts"]); @@ -128,11 +128,6 @@ public ManagedServerSecurityAlertPolicy(string identifierName, string? resourceV /// public static class ResourceVersions { - /// - /// 2024-05-01-preview. - /// - public static readonly string V2024_05_01_preview = "2024-05-01-preview"; - /// /// 2021-11-01. /// @@ -142,7 +137,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing ManagedServerSecurityAlertPolicy. /// - /// + /// /// The the Bicep identifier name of the ManagedServerSecurityAlertPolicy /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -150,6 +145,6 @@ public static class ResourceVersions /// /// Version of the ManagedServerSecurityAlertPolicy. /// The existing ManagedServerSecurityAlertPolicy resource. - public static ManagedServerSecurityAlertPolicy FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static ManagedServerSecurityAlertPolicy FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ManagedTransparentDataEncryption.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ManagedTransparentDataEncryption.cs index 26a25e7695b9..a0199ba764b3 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ManagedTransparentDataEncryption.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ManagedTransparentDataEncryption.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.Sql; /// /// ManagedTransparentDataEncryption. /// -public partial class ManagedTransparentDataEncryption : Resource +public partial class ManagedTransparentDataEncryption : ProvisionableResource { /// /// Gets the Name. @@ -50,15 +50,15 @@ public partial class ManagedTransparentDataEncryption : Resource /// /// Creates a new ManagedTransparentDataEncryption. /// - /// + /// /// The the Bicep identifier name of the ManagedTransparentDataEncryption /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the ManagedTransparentDataEncryption. - public ManagedTransparentDataEncryption(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Sql/managedInstances/databases/transparentDataEncryption", resourceVersion ?? "2021-11-01") + public ManagedTransparentDataEncryption(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Sql/managedInstances/databases/transparentDataEncryption", resourceVersion ?? "2021-11-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _state = BicepValue.DefineProperty(this, "State", ["properties", "state"]); @@ -72,11 +72,6 @@ public ManagedTransparentDataEncryption(string identifierName, string? resourceV /// public static class ResourceVersions { - /// - /// 2024-05-01-preview. - /// - public static readonly string V2024_05_01_preview = "2024-05-01-preview"; - /// /// 2021-11-01. /// @@ -86,7 +81,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing ManagedTransparentDataEncryption. /// - /// + /// /// The the Bicep identifier name of the ManagedTransparentDataEncryption /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -94,6 +89,6 @@ public static class ResourceVersions /// /// Version of the ManagedTransparentDataEncryption. /// The existing ManagedTransparentDataEncryption resource. - public static ManagedTransparentDataEncryption FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static ManagedTransparentDataEncryption FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/CreateDatabaseRestorePointDefinition.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/CreateDatabaseRestorePointDefinition.cs index 2dc3df891fb9..442284bf65e2 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/CreateDatabaseRestorePointDefinition.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/CreateDatabaseRestorePointDefinition.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.Sql; /// Contains the information necessary to perform a create database restore /// point operation. /// -public partial class CreateDatabaseRestorePointDefinition : ProvisioningConstruct +public partial class CreateDatabaseRestorePointDefinition : ProvisionableConstruct { /// /// The restore point label to apply. diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/DatabaseIdentity.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/DatabaseIdentity.cs index 63fdbebb159b..bcd539f676a2 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/DatabaseIdentity.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/DatabaseIdentity.cs @@ -13,7 +13,7 @@ namespace Azure.Provisioning.Sql; /// /// Azure Active Directory identity configuration for a resource. /// -public partial class DatabaseIdentity : ProvisioningConstruct +public partial class DatabaseIdentity : ProvisionableConstruct { /// /// The identity type. diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/DatabaseVulnerabilityAssessmentRuleBaselineItem.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/DatabaseVulnerabilityAssessmentRuleBaselineItem.cs index 19e901a208bb..5de9c9f2f499 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/DatabaseVulnerabilityAssessmentRuleBaselineItem.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/DatabaseVulnerabilityAssessmentRuleBaselineItem.cs @@ -13,7 +13,7 @@ namespace Azure.Provisioning.Sql; /// Properties for an Azure SQL Database Vulnerability Assessment rule /// baseline's result. /// -public partial class DatabaseVulnerabilityAssessmentRuleBaselineItem : ProvisioningConstruct +public partial class DatabaseVulnerabilityAssessmentRuleBaselineItem : ProvisionableConstruct { /// /// The rule baseline result. diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/ElasticPoolPerDatabaseSettings.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/ElasticPoolPerDatabaseSettings.cs index 238119fbcd2a..44328e57118e 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/ElasticPoolPerDatabaseSettings.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/ElasticPoolPerDatabaseSettings.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.Sql; /// /// Per database settings of an elastic pool. /// -public partial class ElasticPoolPerDatabaseSettings : ProvisioningConstruct +public partial class ElasticPoolPerDatabaseSettings : ProvisionableConstruct { /// /// The minimum capacity all databases are guaranteed. diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/FailoverGroupReadOnlyEndpoint.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/FailoverGroupReadOnlyEndpoint.cs index 91984df9f65a..ed58753a68ad 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/FailoverGroupReadOnlyEndpoint.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/FailoverGroupReadOnlyEndpoint.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.Sql; /// /// Read-only endpoint of the failover group instance. /// -public partial class FailoverGroupReadOnlyEndpoint : ProvisioningConstruct +public partial class FailoverGroupReadOnlyEndpoint : ProvisionableConstruct { /// /// Failover policy of the read-only endpoint for the failover group. diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/FailoverGroupReadWriteEndpoint.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/FailoverGroupReadWriteEndpoint.cs index c92b35e76932..e6d49cd9e858 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/FailoverGroupReadWriteEndpoint.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/FailoverGroupReadWriteEndpoint.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.Sql; /// /// Read-write endpoint of the failover group instance. /// -public partial class FailoverGroupReadWriteEndpoint : ProvisioningConstruct +public partial class FailoverGroupReadWriteEndpoint : ProvisionableConstruct { /// /// Failover policy of the read-write endpoint for the failover group. If diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/InstanceFailoverGroupReadWriteEndpoint.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/InstanceFailoverGroupReadWriteEndpoint.cs index 7b2d1d54307a..17ce216c7c07 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/InstanceFailoverGroupReadWriteEndpoint.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/InstanceFailoverGroupReadWriteEndpoint.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.Sql; /// /// Read-write endpoint of the failover group instance. /// -public partial class InstanceFailoverGroupReadWriteEndpoint : ProvisioningConstruct +public partial class InstanceFailoverGroupReadWriteEndpoint : ProvisionableConstruct { /// /// Failover policy of the read-write endpoint for the failover group. If diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/JobExecutionTarget.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/JobExecutionTarget.cs index e0734349a823..f31feeb9fbb5 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/JobExecutionTarget.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/JobExecutionTarget.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.Sql; /// /// The target that a job execution is executed on. /// -public partial class JobExecutionTarget : ProvisioningConstruct +public partial class JobExecutionTarget : ProvisionableConstruct { /// /// The type of the target. diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/JobStepAction.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/JobStepAction.cs index 85929487db68..53fcd0704b86 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/JobStepAction.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/JobStepAction.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.Sql; /// /// The action to be executed by a job step. /// -public partial class JobStepAction : ProvisioningConstruct +public partial class JobStepAction : ProvisionableConstruct { /// /// Type of action being executed by the job step. diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/JobStepExecutionOptions.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/JobStepExecutionOptions.cs index 6b6c773b1287..ddc5ce17a568 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/JobStepExecutionOptions.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/JobStepExecutionOptions.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.Sql; /// /// The execution options of a job step. /// -public partial class JobStepExecutionOptions : ProvisioningConstruct +public partial class JobStepExecutionOptions : ProvisionableConstruct { /// /// Execution timeout for the job step. diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/JobStepOutput.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/JobStepOutput.cs index 81a83cd577bf..4ce9586aa92d 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/JobStepOutput.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/JobStepOutput.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.Sql; /// /// The output configuration of a job step. /// -public partial class JobStepOutput : ProvisioningConstruct +public partial class JobStepOutput : ProvisionableConstruct { /// /// The output destination type. diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/JobTarget.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/JobTarget.cs index b6dca5ebeb24..91fdf0771b01 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/JobTarget.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/JobTarget.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.Sql; /// A job target, for example a specific database or a container of databases /// that is evaluated during job execution. /// -public partial class JobTarget : ProvisioningConstruct +public partial class JobTarget : ProvisionableConstruct { /// /// Whether the target is included or excluded from the group. diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/ManagedInstanceDtcSecuritySettings.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/ManagedInstanceDtcSecuritySettings.cs index b504e8f78c60..028f76846b61 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/ManagedInstanceDtcSecuritySettings.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/ManagedInstanceDtcSecuritySettings.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.Sql; /// /// The Security Settings of managed instance DTC. /// -public partial class ManagedInstanceDtcSecuritySettings : ProvisioningConstruct +public partial class ManagedInstanceDtcSecuritySettings : ProvisionableConstruct { /// /// Transaction Manager communication settings of managed instance DTC. diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/ManagedInstanceDtcTransactionManagerCommunicationSettings.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/ManagedInstanceDtcTransactionManagerCommunicationSettings.cs index b6e3a11cbad0..2a25c8010af1 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/ManagedInstanceDtcTransactionManagerCommunicationSettings.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/ManagedInstanceDtcTransactionManagerCommunicationSettings.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.Sql; /// /// The Transaction Manager Communication Settings of managed instance DTC. /// -public partial class ManagedInstanceDtcTransactionManagerCommunicationSettings : ProvisioningConstruct +public partial class ManagedInstanceDtcTransactionManagerCommunicationSettings : ProvisionableConstruct { /// /// Allow Inbound traffic to managed instance DTC. diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/ManagedInstanceExternalAdministrator.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/ManagedInstanceExternalAdministrator.cs index 7940dbd12c60..ae985a098068 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/ManagedInstanceExternalAdministrator.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/ManagedInstanceExternalAdministrator.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.Sql; /// /// Properties of a active directory administrator. /// -public partial class ManagedInstanceExternalAdministrator : ProvisioningConstruct +public partial class ManagedInstanceExternalAdministrator : ProvisionableConstruct { /// /// Type of the sever administrator. diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/ManagedInstancePairInfo.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/ManagedInstancePairInfo.cs index dea7aabb7fb9..caa10fcfdd29 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/ManagedInstancePairInfo.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/ManagedInstancePairInfo.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.Sql; /// /// Pairs of Managed Instances in the failover group. /// -public partial class ManagedInstancePairInfo : ProvisioningConstruct +public partial class ManagedInstancePairInfo : ProvisionableConstruct { /// /// Id of Primary Managed Instance in pair. diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/ManagedInstancePecProperty.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/ManagedInstancePecProperty.cs index 23ad34857a49..41dcb9152843 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/ManagedInstancePecProperty.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/ManagedInstancePecProperty.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.Sql; /// /// A private endpoint connection under a managed instance. /// -public partial class ManagedInstancePecProperty : ProvisioningConstruct +public partial class ManagedInstancePecProperty : ProvisionableConstruct { /// /// Resource ID. diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/ManagedInstancePrivateEndpointConnectionProperties.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/ManagedInstancePrivateEndpointConnectionProperties.cs index 39248e2a34b8..5c0241506a87 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/ManagedInstancePrivateEndpointConnectionProperties.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/ManagedInstancePrivateEndpointConnectionProperties.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.Sql; /// /// Properties of a private endpoint connection. /// -public partial class ManagedInstancePrivateEndpointConnectionProperties : ProvisioningConstruct +public partial class ManagedInstancePrivateEndpointConnectionProperties : ProvisionableConstruct { /// /// Gets or sets Id. diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/ManagedInstancePrivateLinkServiceConnectionStateProperty.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/ManagedInstancePrivateLinkServiceConnectionStateProperty.cs index 6c22b4f48c2f..df5f970546fa 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/ManagedInstancePrivateLinkServiceConnectionStateProperty.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/ManagedInstancePrivateLinkServiceConnectionStateProperty.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.Sql; /// /// The ManagedInstancePrivateLinkServiceConnectionStateProperty. /// -public partial class ManagedInstancePrivateLinkServiceConnectionStateProperty : ProvisioningConstruct +public partial class ManagedInstancePrivateLinkServiceConnectionStateProperty : ProvisionableConstruct { /// /// The private link service connection status. diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/PartnerRegionInfo.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/PartnerRegionInfo.cs index 9cbd9c989af7..409ab24ef2fa 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/PartnerRegionInfo.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/PartnerRegionInfo.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.Sql; /// /// Partner region information for the failover group. /// -public partial class PartnerRegionInfo : ProvisioningConstruct +public partial class PartnerRegionInfo : ProvisionableConstruct { /// /// Geo location of the partner managed instances. diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/PartnerServerInfo.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/PartnerServerInfo.cs index b1c494eaff1e..c7428d1b30a9 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/PartnerServerInfo.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/PartnerServerInfo.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.Sql; /// /// Partner server information for the failover group. /// -public partial class PartnerServerInfo : ProvisioningConstruct +public partial class PartnerServerInfo : ProvisionableConstruct { /// /// Resource identifier of the partner server. diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/ServerExternalAdministrator.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/ServerExternalAdministrator.cs index 11d8545bad0d..2099ab56fa85 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/ServerExternalAdministrator.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/ServerExternalAdministrator.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.Sql; /// /// Properties of a active directory administrator. /// -public partial class ServerExternalAdministrator : ProvisioningConstruct +public partial class ServerExternalAdministrator : ProvisionableConstruct { /// /// Type of the sever administrator. diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/ServerPrivateEndpointConnectionProperties.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/ServerPrivateEndpointConnectionProperties.cs index 19038824511c..32f3894a3777 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/ServerPrivateEndpointConnectionProperties.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/ServerPrivateEndpointConnectionProperties.cs @@ -13,7 +13,7 @@ namespace Azure.Provisioning.Sql; /// /// Properties of a private endpoint connection. /// -public partial class ServerPrivateEndpointConnectionProperties : ProvisioningConstruct +public partial class ServerPrivateEndpointConnectionProperties : ProvisionableConstruct { /// /// Gets or sets Id. diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/ServerTrustGroupServerInfo.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/ServerTrustGroupServerInfo.cs index 991618a48503..cd10cad4141e 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/ServerTrustGroupServerInfo.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/ServerTrustGroupServerInfo.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.Sql; /// /// Server info for the server trust group. /// -public partial class ServerTrustGroupServerInfo : ProvisioningConstruct +public partial class ServerTrustGroupServerInfo : ProvisionableConstruct { /// /// Server Id. diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/SqlDatabaseKey.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/SqlDatabaseKey.cs index 9741334b76ee..c886fe8d424a 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/SqlDatabaseKey.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/SqlDatabaseKey.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.Sql; /// /// Database level key used for encryption at rest. /// -public partial class SqlDatabaseKey : ProvisioningConstruct +public partial class SqlDatabaseKey : ProvisionableConstruct { /// /// The database key type. Only supported value is diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/SqlPrivateLinkServiceConnectionStateProperty.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/SqlPrivateLinkServiceConnectionStateProperty.cs index c26e7bccae7f..3290d4825bef 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/SqlPrivateLinkServiceConnectionStateProperty.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/SqlPrivateLinkServiceConnectionStateProperty.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.Sql; /// /// The SqlPrivateLinkServiceConnectionStateProperty. /// -public partial class SqlPrivateLinkServiceConnectionStateProperty : ProvisioningConstruct +public partial class SqlPrivateLinkServiceConnectionStateProperty : ProvisionableConstruct { /// /// The private link service connection status. diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/SqlScheduleItem.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/SqlScheduleItem.cs index c7222babe04e..e695f0aecd5b 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/SqlScheduleItem.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/SqlScheduleItem.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.Sql; /// /// Schedule info describing when the server should be started or stopped. /// -public partial class SqlScheduleItem : ProvisioningConstruct +public partial class SqlScheduleItem : ProvisionableConstruct { /// /// Start day. diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/SqlServerJobSchedule.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/SqlServerJobSchedule.cs index 3d81a601154b..1392b77031d7 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/SqlServerJobSchedule.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/SqlServerJobSchedule.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.Sql; /// /// Scheduling properties of a job. /// -public partial class SqlServerJobSchedule : ProvisioningConstruct +public partial class SqlServerJobSchedule : ProvisionableConstruct { /// /// Schedule start time. @@ -53,6 +53,6 @@ public SqlServerJobSchedule() _endOn = BicepValue.DefineProperty(this, "EndOn", ["endTime"]); _scheduleType = BicepValue.DefineProperty(this, "ScheduleType", ["type"]); _isEnabled = BicepValue.DefineProperty(this, "IsEnabled", ["enabled"]); - _interval = BicepValue.DefineProperty(this, "Interval", ["interval"]); + _interval = BicepValue.DefineProperty(this, "Interval", ["interval"], format: "P"); } } diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/SqlServerPrivateEndpointConnection.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/SqlServerPrivateEndpointConnection.cs index 74456508aae8..d7d2151c2d3e 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/SqlServerPrivateEndpointConnection.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/SqlServerPrivateEndpointConnection.cs @@ -13,7 +13,7 @@ namespace Azure.Provisioning.Sql; /// /// A private endpoint connection under a server. /// -public partial class SqlServerPrivateEndpointConnection : ProvisioningConstruct +public partial class SqlServerPrivateEndpointConnection : ProvisionableConstruct { /// /// Resource ID. diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/SqlServicePrincipal.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/SqlServicePrincipal.cs index 05717e56a142..028b1216cc60 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/SqlServicePrincipal.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/SqlServicePrincipal.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.Sql; /// /// The managed instance's service principal configuration for a resource. /// -public partial class SqlServicePrincipal : ProvisioningConstruct +public partial class SqlServicePrincipal : ProvisionableConstruct { /// /// The Azure Active Directory application object id. diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/SqlSku.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/SqlSku.cs index 21751492fc9c..ad937fbfe882 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/SqlSku.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/SqlSku.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.Sql; /// /// An ARM Resource SKU. /// -public partial class SqlSku : ProvisioningConstruct +public partial class SqlSku : ProvisionableConstruct { /// /// The name of the SKU, typically, a letter + Number code, e.g. P3. diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/SyncGroupSchema.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/SyncGroupSchema.cs index 2bf86d298422..aa5cea682259 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/SyncGroupSchema.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/SyncGroupSchema.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.Sql; /// /// Properties of sync group schema. /// -public partial class SyncGroupSchema : ProvisioningConstruct +public partial class SyncGroupSchema : ProvisionableConstruct { /// /// List of tables in sync group schema. diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/SyncGroupSchemaTable.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/SyncGroupSchemaTable.cs index bfd4fa4ba687..4bfbcb4a4552 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/SyncGroupSchemaTable.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/SyncGroupSchemaTable.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.Sql; /// /// Properties of table in sync group schema. /// -public partial class SyncGroupSchemaTable : ProvisioningConstruct +public partial class SyncGroupSchemaTable : ProvisionableConstruct { /// /// List of columns in sync group schema. diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/SyncGroupSchemaTableColumn.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/SyncGroupSchemaTableColumn.cs index 2186245fb961..9ed47984add4 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/SyncGroupSchemaTableColumn.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/SyncGroupSchemaTableColumn.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.Sql; /// /// Properties of column in sync group table. /// -public partial class SyncGroupSchemaTableColumn : ProvisioningConstruct +public partial class SyncGroupSchemaTableColumn : ProvisionableConstruct { /// /// Quoted name of sync group table column. diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/VulnerabilityAssessmentRecurringScansProperties.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/VulnerabilityAssessmentRecurringScansProperties.cs index 71c2f07f5ee4..7b0b2fbf3f3b 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/VulnerabilityAssessmentRecurringScansProperties.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/Models/VulnerabilityAssessmentRecurringScansProperties.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.Sql; /// /// Properties of a Vulnerability Assessment recurring scans. /// -public partial class VulnerabilityAssessmentRecurringScansProperties : ProvisioningConstruct +public partial class VulnerabilityAssessmentRecurringScansProperties : ProvisionableConstruct { /// /// Recurring scans state. diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/OutboundFirewallRule.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/OutboundFirewallRule.cs index 836a5eb97477..1099e77c22c1 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/OutboundFirewallRule.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/OutboundFirewallRule.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.Sql; /// /// OutboundFirewallRule. /// -public partial class OutboundFirewallRule : Resource +public partial class OutboundFirewallRule : ProvisionableResource { /// /// Gets the Name. @@ -50,15 +50,15 @@ public partial class OutboundFirewallRule : Resource /// /// Creates a new OutboundFirewallRule. /// - /// + /// /// The the Bicep identifier name of the OutboundFirewallRule resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, /// numbers, and underscores. /// /// Version of the OutboundFirewallRule. - public OutboundFirewallRule(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Sql/servers/outboundFirewallRules", resourceVersion ?? "2021-11-01") + public OutboundFirewallRule(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Sql/servers/outboundFirewallRules", resourceVersion ?? "2021-11-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _id = BicepValue.DefineProperty(this, "Id", ["id"], isOutput: true); @@ -72,11 +72,6 @@ public OutboundFirewallRule(string identifierName, string? resourceVersion = def /// public static class ResourceVersions { - /// - /// 2024-05-01-preview. - /// - public static readonly string V2024_05_01_preview = "2024-05-01-preview"; - /// /// 2021-11-01. /// @@ -96,7 +91,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing OutboundFirewallRule. /// - /// + /// /// The the Bicep identifier name of the OutboundFirewallRule resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, @@ -104,6 +99,6 @@ public static class ResourceVersions /// /// Version of the OutboundFirewallRule. /// The existing OutboundFirewallRule resource. - public static OutboundFirewallRule FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static OutboundFirewallRule FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ServerAdvancedThreatProtection.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ServerAdvancedThreatProtection.cs index b7c7256af857..0910625205a3 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ServerAdvancedThreatProtection.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/ServerAdvancedThreatProtection.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.Sql; /// /// ServerAdvancedThreatProtection. /// -public partial class ServerAdvancedThreatProtection : Resource +public partial class ServerAdvancedThreatProtection : ProvisionableResource { /// /// Gets the Name. @@ -58,15 +58,15 @@ public partial class ServerAdvancedThreatProtection : Resource /// /// Creates a new ServerAdvancedThreatProtection. /// - /// + /// /// The the Bicep identifier name of the ServerAdvancedThreatProtection /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the ServerAdvancedThreatProtection. - public ServerAdvancedThreatProtection(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Sql/servers/advancedThreatProtectionSettings", resourceVersion ?? "2021-11-01") + public ServerAdvancedThreatProtection(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Sql/servers/advancedThreatProtectionSettings", resourceVersion ?? "2021-11-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _state = BicepValue.DefineProperty(this, "State", ["properties", "state"]); @@ -81,11 +81,6 @@ public ServerAdvancedThreatProtection(string identifierName, string? resourceVer /// public static class ResourceVersions { - /// - /// 2024-05-01-preview. - /// - public static readonly string V2024_05_01_preview = "2024-05-01-preview"; - /// /// 2021-11-01. /// @@ -95,7 +90,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing ServerAdvancedThreatProtection. /// - /// + /// /// The the Bicep identifier name of the ServerAdvancedThreatProtection /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -103,6 +98,6 @@ public static class ResourceVersions /// /// Version of the ServerAdvancedThreatProtection. /// The existing ServerAdvancedThreatProtection resource. - public static ServerAdvancedThreatProtection FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static ServerAdvancedThreatProtection FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlAgentConfiguration.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlAgentConfiguration.cs index 728fc93dd931..4b8c41de4aa6 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlAgentConfiguration.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlAgentConfiguration.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.Sql; /// /// SqlAgentConfiguration. /// -public partial class SqlAgentConfiguration : Resource +public partial class SqlAgentConfiguration : ProvisionableResource { /// /// Gets the Name. @@ -50,15 +50,15 @@ public partial class SqlAgentConfiguration : Resource /// /// Creates a new SqlAgentConfiguration. /// - /// + /// /// The the Bicep identifier name of the SqlAgentConfiguration resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, /// numbers, and underscores. /// /// Version of the SqlAgentConfiguration. - public SqlAgentConfiguration(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Sql/managedInstances/sqlAgent", resourceVersion ?? "2021-11-01") + public SqlAgentConfiguration(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Sql/managedInstances/sqlAgent", resourceVersion ?? "2021-11-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _state = BicepValue.DefineProperty(this, "State", ["properties", "state"]); @@ -72,11 +72,6 @@ public SqlAgentConfiguration(string identifierName, string? resourceVersion = de /// public static class ResourceVersions { - /// - /// 2024-05-01-preview. - /// - public static readonly string V2024_05_01_preview = "2024-05-01-preview"; - /// /// 2021-11-01. /// @@ -91,7 +86,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing SqlAgentConfiguration. /// - /// + /// /// The the Bicep identifier name of the SqlAgentConfiguration resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, @@ -99,6 +94,6 @@ public static class ResourceVersions /// /// Version of the SqlAgentConfiguration. /// The existing SqlAgentConfiguration resource. - public static SqlAgentConfiguration FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static SqlAgentConfiguration FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlDatabase.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlDatabase.cs index 0b60455b2f8d..9fc078bc64ee 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlDatabase.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlDatabase.cs @@ -17,7 +17,7 @@ namespace Azure.Provisioning.Sql; /// /// SqlDatabase. /// -public partial class SqlDatabase : Resource +public partial class SqlDatabase : ProvisionableResource { /// /// The name of the database. @@ -476,15 +476,15 @@ public partial class SqlDatabase : Resource /// /// Creates a new SqlDatabase. /// - /// + /// /// The the Bicep identifier name of the SqlDatabase resource. This can be /// used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and /// underscores. /// /// Version of the SqlDatabase. - public SqlDatabase(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Sql/servers/databases", resourceVersion ?? "2021-11-01") + public SqlDatabase(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Sql/servers/databases", resourceVersion ?? "2021-11-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _location = BicepValue.DefineProperty(this, "Location", ["location"], isRequired: true); @@ -551,11 +551,6 @@ public SqlDatabase(string identifierName, string? resourceVersion = default) /// public static class ResourceVersions { - /// - /// 2024-05-01-preview. - /// - public static readonly string V2024_05_01_preview = "2024-05-01-preview"; - /// /// 2021-11-01. /// @@ -580,7 +575,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing SqlDatabase. /// - /// + /// /// The the Bicep identifier name of the SqlDatabase resource. This can be /// used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and @@ -588,8 +583,8 @@ public static class ResourceVersions /// /// Version of the SqlDatabase. /// The existing SqlDatabase resource. - public static SqlDatabase FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static SqlDatabase FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; /// /// Get the requirements for naming this SqlDatabase resource. diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlDatabaseBlobAuditingPolicy.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlDatabaseBlobAuditingPolicy.cs index 48b532e209b9..507be7b68277 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlDatabaseBlobAuditingPolicy.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlDatabaseBlobAuditingPolicy.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.Sql; /// /// SqlDatabaseBlobAuditingPolicy. /// -public partial class SqlDatabaseBlobAuditingPolicy : Resource +public partial class SqlDatabaseBlobAuditingPolicy : ProvisionableResource { /// /// Gets the Name. @@ -198,15 +198,15 @@ public partial class SqlDatabaseBlobAuditingPolicy : Resource /// /// Creates a new SqlDatabaseBlobAuditingPolicy. /// - /// + /// /// The the Bicep identifier name of the SqlDatabaseBlobAuditingPolicy /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the SqlDatabaseBlobAuditingPolicy. - public SqlDatabaseBlobAuditingPolicy(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Sql/servers/databases/auditingSettings", resourceVersion ?? "2021-11-01") + public SqlDatabaseBlobAuditingPolicy(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Sql/servers/databases/auditingSettings", resourceVersion ?? "2021-11-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _auditActionsAndGroups = BicepList.DefineProperty(this, "AuditActionsAndGroups", ["properties", "auditActionsAndGroups"]); @@ -230,11 +230,6 @@ public SqlDatabaseBlobAuditingPolicy(string identifierName, string? resourceVers /// public static class ResourceVersions { - /// - /// 2024-05-01-preview. - /// - public static readonly string V2024_05_01_preview = "2024-05-01-preview"; - /// /// 2021-11-01. /// @@ -244,7 +239,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing SqlDatabaseBlobAuditingPolicy. /// - /// + /// /// The the Bicep identifier name of the SqlDatabaseBlobAuditingPolicy /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -252,6 +247,6 @@ public static class ResourceVersions /// /// Version of the SqlDatabaseBlobAuditingPolicy. /// The existing SqlDatabaseBlobAuditingPolicy resource. - public static SqlDatabaseBlobAuditingPolicy FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static SqlDatabaseBlobAuditingPolicy FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlDatabaseSecurityAlertPolicy.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlDatabaseSecurityAlertPolicy.cs index c3ed6efbb7bf..5feb06bdb03f 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlDatabaseSecurityAlertPolicy.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlDatabaseSecurityAlertPolicy.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.Sql; /// /// SqlDatabaseSecurityAlertPolicy. /// -public partial class SqlDatabaseSecurityAlertPolicy : Resource +public partial class SqlDatabaseSecurityAlertPolicy : ProvisionableResource { /// /// Gets the Name. @@ -99,15 +99,15 @@ public partial class SqlDatabaseSecurityAlertPolicy : Resource /// /// Creates a new SqlDatabaseSecurityAlertPolicy. /// - /// + /// /// The the Bicep identifier name of the SqlDatabaseSecurityAlertPolicy /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the SqlDatabaseSecurityAlertPolicy. - public SqlDatabaseSecurityAlertPolicy(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Sql/servers/databases/securityAlertPolicies", resourceVersion ?? "2021-11-01") + public SqlDatabaseSecurityAlertPolicy(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Sql/servers/databases/securityAlertPolicies", resourceVersion ?? "2021-11-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _disabledAlerts = BicepList.DefineProperty(this, "DisabledAlerts", ["properties", "disabledAlerts"]); @@ -128,11 +128,6 @@ public SqlDatabaseSecurityAlertPolicy(string identifierName, string? resourceVer /// public static class ResourceVersions { - /// - /// 2024-05-01-preview. - /// - public static readonly string V2024_05_01_preview = "2024-05-01-preview"; - /// /// 2021-11-01. /// @@ -152,7 +147,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing SqlDatabaseSecurityAlertPolicy. /// - /// + /// /// The the Bicep identifier name of the SqlDatabaseSecurityAlertPolicy /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -160,6 +155,6 @@ public static class ResourceVersions /// /// Version of the SqlDatabaseSecurityAlertPolicy. /// The existing SqlDatabaseSecurityAlertPolicy resource. - public static SqlDatabaseSecurityAlertPolicy FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static SqlDatabaseSecurityAlertPolicy FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlDatabaseSensitivityLabel.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlDatabaseSensitivityLabel.cs index 51b1fdfd3cac..16e5c5f8b908 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlDatabaseSensitivityLabel.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlDatabaseSensitivityLabel.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.Sql; /// /// SqlDatabaseSensitivityLabel. /// -public partial class SqlDatabaseSensitivityLabel : Resource +public partial class SqlDatabaseSensitivityLabel : ProvisionableResource { /// /// Gets the Name. @@ -100,15 +100,15 @@ public partial class SqlDatabaseSensitivityLabel : Resource /// /// Creates a new SqlDatabaseSensitivityLabel. /// - /// + /// /// The the Bicep identifier name of the SqlDatabaseSensitivityLabel /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the SqlDatabaseSensitivityLabel. - public SqlDatabaseSensitivityLabel(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Sql/servers/databases/schemas/tables/columns/sensitivityLabels", resourceVersion) + public SqlDatabaseSensitivityLabel(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Sql/servers/databases/schemas/tables/columns/sensitivityLabels", resourceVersion) { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _informationType = BicepValue.DefineProperty(this, "InformationType", ["properties", "informationType"]); @@ -128,7 +128,7 @@ public SqlDatabaseSensitivityLabel(string identifierName, string? resourceVersio /// /// Creates a reference to an existing SqlDatabaseSensitivityLabel. /// - /// + /// /// The the Bicep identifier name of the SqlDatabaseSensitivityLabel /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -136,6 +136,6 @@ public SqlDatabaseSensitivityLabel(string identifierName, string? resourceVersio /// /// Version of the SqlDatabaseSensitivityLabel. /// The existing SqlDatabaseSensitivityLabel resource. - public static SqlDatabaseSensitivityLabel FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static SqlDatabaseSensitivityLabel FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlDatabaseSqlVulnerabilityAssessmentBaseline.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlDatabaseSqlVulnerabilityAssessmentBaseline.cs index 9b13298425fe..3c969a57dbb2 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlDatabaseSqlVulnerabilityAssessmentBaseline.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlDatabaseSqlVulnerabilityAssessmentBaseline.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.Sql; /// /// SqlDatabaseSqlVulnerabilityAssessmentBaseline. /// -public partial class SqlDatabaseSqlVulnerabilityAssessmentBaseline : Resource +public partial class SqlDatabaseSqlVulnerabilityAssessmentBaseline : ProvisionableResource { /// /// Gets the Name. @@ -51,7 +51,7 @@ public partial class SqlDatabaseSqlVulnerabilityAssessmentBaseline : Resource /// /// Creates a new SqlDatabaseSqlVulnerabilityAssessmentBaseline. /// - /// + /// /// The the Bicep identifier name of the /// SqlDatabaseSqlVulnerabilityAssessmentBaseline resource. This can be /// used to refer to the resource in expressions, but is not the Azure @@ -59,8 +59,8 @@ public partial class SqlDatabaseSqlVulnerabilityAssessmentBaseline : Resource /// underscores. /// /// Version of the SqlDatabaseSqlVulnerabilityAssessmentBaseline. - public SqlDatabaseSqlVulnerabilityAssessmentBaseline(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Sql/servers/databases/sqlVulnerabilityAssessments/baselines", resourceVersion) + public SqlDatabaseSqlVulnerabilityAssessmentBaseline(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Sql/servers/databases/sqlVulnerabilityAssessments/baselines", resourceVersion) { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _isLatestScan = BicepValue.DefineProperty(this, "IsLatestScan", ["properties", "latestScan"]); @@ -73,7 +73,7 @@ public SqlDatabaseSqlVulnerabilityAssessmentBaseline(string identifierName, stri /// Creates a reference to an existing /// SqlDatabaseSqlVulnerabilityAssessmentBaseline. /// - /// + /// /// The the Bicep identifier name of the /// SqlDatabaseSqlVulnerabilityAssessmentBaseline resource. This can be /// used to refer to the resource in expressions, but is not the Azure @@ -82,6 +82,6 @@ public SqlDatabaseSqlVulnerabilityAssessmentBaseline(string identifierName, stri /// /// Version of the SqlDatabaseSqlVulnerabilityAssessmentBaseline. /// The existing SqlDatabaseSqlVulnerabilityAssessmentBaseline resource. - public static SqlDatabaseSqlVulnerabilityAssessmentBaseline FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static SqlDatabaseSqlVulnerabilityAssessmentBaseline FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlDatabaseSqlVulnerabilityAssessmentBaselineRule.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlDatabaseSqlVulnerabilityAssessmentBaselineRule.cs index 68e92aae1ee5..a61263639d91 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlDatabaseSqlVulnerabilityAssessmentBaselineRule.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlDatabaseSqlVulnerabilityAssessmentBaselineRule.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.Sql; /// /// SqlDatabaseSqlVulnerabilityAssessmentBaselineRule. /// -public partial class SqlDatabaseSqlVulnerabilityAssessmentBaselineRule : Resource +public partial class SqlDatabaseSqlVulnerabilityAssessmentBaselineRule : ProvisionableResource { /// /// Gets the Name. @@ -57,7 +57,7 @@ public partial class SqlDatabaseSqlVulnerabilityAssessmentBaselineRule : Resourc /// /// Creates a new SqlDatabaseSqlVulnerabilityAssessmentBaselineRule. /// - /// + /// /// The the Bicep identifier name of the /// SqlDatabaseSqlVulnerabilityAssessmentBaselineRule resource. This can /// be used to refer to the resource in expressions, but is not the Azure @@ -65,8 +65,8 @@ public partial class SqlDatabaseSqlVulnerabilityAssessmentBaselineRule : Resourc /// underscores. /// /// Version of the SqlDatabaseSqlVulnerabilityAssessmentBaselineRule. - public SqlDatabaseSqlVulnerabilityAssessmentBaselineRule(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Sql/servers/databases/sqlVulnerabilityAssessments/baselines/rules", resourceVersion) + public SqlDatabaseSqlVulnerabilityAssessmentBaselineRule(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Sql/servers/databases/sqlVulnerabilityAssessments/baselines/rules", resourceVersion) { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _isLatestScan = BicepValue.DefineProperty(this, "IsLatestScan", ["properties", "latestScan"]); @@ -80,7 +80,7 @@ public SqlDatabaseSqlVulnerabilityAssessmentBaselineRule(string identifierName, /// Creates a reference to an existing /// SqlDatabaseSqlVulnerabilityAssessmentBaselineRule. /// - /// + /// /// The the Bicep identifier name of the /// SqlDatabaseSqlVulnerabilityAssessmentBaselineRule resource. This can /// be used to refer to the resource in expressions, but is not the Azure @@ -89,6 +89,6 @@ public SqlDatabaseSqlVulnerabilityAssessmentBaselineRule(string identifierName, /// /// Version of the SqlDatabaseSqlVulnerabilityAssessmentBaselineRule. /// The existing SqlDatabaseSqlVulnerabilityAssessmentBaselineRule resource. - public static SqlDatabaseSqlVulnerabilityAssessmentBaselineRule FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static SqlDatabaseSqlVulnerabilityAssessmentBaselineRule FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlDatabaseVulnerabilityAssessment.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlDatabaseVulnerabilityAssessment.cs index a1bfd599e6d6..0f12237d98ef 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlDatabaseVulnerabilityAssessment.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlDatabaseVulnerabilityAssessment.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.Sql; /// /// SqlDatabaseVulnerabilityAssessment. /// -public partial class SqlDatabaseVulnerabilityAssessment : Resource +public partial class SqlDatabaseVulnerabilityAssessment : ProvisionableResource { /// /// Gets the Name. @@ -76,15 +76,15 @@ public partial class SqlDatabaseVulnerabilityAssessment : Resource /// /// Creates a new SqlDatabaseVulnerabilityAssessment. /// - /// + /// /// The the Bicep identifier name of the SqlDatabaseVulnerabilityAssessment /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the SqlDatabaseVulnerabilityAssessment. - public SqlDatabaseVulnerabilityAssessment(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Sql/servers/databases/vulnerabilityAssessments", resourceVersion ?? "2021-11-01") + public SqlDatabaseVulnerabilityAssessment(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Sql/servers/databases/vulnerabilityAssessments", resourceVersion ?? "2021-11-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _recurringScans = BicepValue.DefineProperty(this, "RecurringScans", ["properties", "recurringScans"]); @@ -101,11 +101,6 @@ public SqlDatabaseVulnerabilityAssessment(string identifierName, string? resourc /// public static class ResourceVersions { - /// - /// 2024-05-01-preview. - /// - public static readonly string V2024_05_01_preview = "2024-05-01-preview"; - /// /// 2021-11-01. /// @@ -115,7 +110,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing SqlDatabaseVulnerabilityAssessment. /// - /// + /// /// The the Bicep identifier name of the SqlDatabaseVulnerabilityAssessment /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -123,6 +118,6 @@ public static class ResourceVersions /// /// Version of the SqlDatabaseVulnerabilityAssessment. /// The existing SqlDatabaseVulnerabilityAssessment resource. - public static SqlDatabaseVulnerabilityAssessment FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static SqlDatabaseVulnerabilityAssessment FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlDatabaseVulnerabilityAssessmentRuleBaseline.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlDatabaseVulnerabilityAssessmentRuleBaseline.cs index 498956b23f89..4ee5d0e28e47 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlDatabaseVulnerabilityAssessmentRuleBaseline.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlDatabaseVulnerabilityAssessmentRuleBaseline.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.Sql; /// /// SqlDatabaseVulnerabilityAssessmentRuleBaseline. /// -public partial class SqlDatabaseVulnerabilityAssessmentRuleBaseline : Resource +public partial class SqlDatabaseVulnerabilityAssessmentRuleBaseline : ProvisionableResource { /// /// Gets the Name. @@ -45,7 +45,7 @@ public partial class SqlDatabaseVulnerabilityAssessmentRuleBaseline : Resource /// /// Creates a new SqlDatabaseVulnerabilityAssessmentRuleBaseline. /// - /// + /// /// The the Bicep identifier name of the /// SqlDatabaseVulnerabilityAssessmentRuleBaseline resource. This can be /// used to refer to the resource in expressions, but is not the Azure @@ -53,8 +53,8 @@ public partial class SqlDatabaseVulnerabilityAssessmentRuleBaseline : Resource /// underscores. /// /// Version of the SqlDatabaseVulnerabilityAssessmentRuleBaseline. - public SqlDatabaseVulnerabilityAssessmentRuleBaseline(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Sql/servers/databases/vulnerabilityAssessments/rules/baselines", resourceVersion) + public SqlDatabaseVulnerabilityAssessmentRuleBaseline(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Sql/servers/databases/vulnerabilityAssessments/rules/baselines", resourceVersion) { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _baselineResults = BicepList.DefineProperty(this, "BaselineResults", ["properties", "baselineResults"]); @@ -66,7 +66,7 @@ public SqlDatabaseVulnerabilityAssessmentRuleBaseline(string identifierName, str /// Creates a reference to an existing /// SqlDatabaseVulnerabilityAssessmentRuleBaseline. /// - /// + /// /// The the Bicep identifier name of the /// SqlDatabaseVulnerabilityAssessmentRuleBaseline resource. This can be /// used to refer to the resource in expressions, but is not the Azure @@ -75,6 +75,6 @@ public SqlDatabaseVulnerabilityAssessmentRuleBaseline(string identifierName, str /// /// Version of the SqlDatabaseVulnerabilityAssessmentRuleBaseline. /// The existing SqlDatabaseVulnerabilityAssessmentRuleBaseline resource. - public static SqlDatabaseVulnerabilityAssessmentRuleBaseline FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static SqlDatabaseVulnerabilityAssessmentRuleBaseline FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlFirewallRule.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlFirewallRule.cs index ce4647576523..c92a3d74eb00 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlFirewallRule.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlFirewallRule.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.Sql; /// /// SqlFirewallRule. /// -public partial class SqlFirewallRule : Resource +public partial class SqlFirewallRule : ProvisionableResource { /// /// The name of the firewall rule. @@ -53,15 +53,15 @@ public partial class SqlFirewallRule : Resource /// /// Creates a new SqlFirewallRule. /// - /// + /// /// The the Bicep identifier name of the SqlFirewallRule resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, /// and underscores. /// /// Version of the SqlFirewallRule. - public SqlFirewallRule(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Sql/servers/firewallRules", resourceVersion ?? "2021-11-01") + public SqlFirewallRule(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Sql/servers/firewallRules", resourceVersion ?? "2021-11-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _endIPAddress = BicepValue.DefineProperty(this, "EndIPAddress", ["properties", "endIpAddress"]); @@ -75,11 +75,6 @@ public SqlFirewallRule(string identifierName, string? resourceVersion = default) /// public static class ResourceVersions { - /// - /// 2024-05-01-preview. - /// - public static readonly string V2024_05_01_preview = "2024-05-01-preview"; - /// /// 2021-11-01. /// @@ -99,7 +94,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing SqlFirewallRule. /// - /// + /// /// The the Bicep identifier name of the SqlFirewallRule resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, @@ -107,8 +102,8 @@ public static class ResourceVersions /// /// Version of the SqlFirewallRule. /// The existing SqlFirewallRule resource. - public static SqlFirewallRule FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static SqlFirewallRule FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; /// /// Get the requirements for naming this SqlFirewallRule resource. diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlPrivateEndpointConnection.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlPrivateEndpointConnection.cs index 71fea21d5ad4..e06265ad96d7 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlPrivateEndpointConnection.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlPrivateEndpointConnection.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.Sql; /// /// SqlPrivateEndpointConnection. /// -public partial class SqlPrivateEndpointConnection : Resource +public partial class SqlPrivateEndpointConnection : ProvisionableResource { /// /// The System.String to use. @@ -69,15 +69,15 @@ public partial class SqlPrivateEndpointConnection : Resource /// /// Creates a new SqlPrivateEndpointConnection. /// - /// + /// /// The the Bicep identifier name of the SqlPrivateEndpointConnection /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the SqlPrivateEndpointConnection. - public SqlPrivateEndpointConnection(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Sql/servers/privateEndpointConnections", resourceVersion ?? "2021-11-01") + public SqlPrivateEndpointConnection(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Sql/servers/privateEndpointConnections", resourceVersion ?? "2021-11-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _connectionState = BicepValue.DefineProperty(this, "ConnectionState", ["properties", "privateLinkServiceConnectionState"]); @@ -94,11 +94,6 @@ public SqlPrivateEndpointConnection(string identifierName, string? resourceVersi /// public static class ResourceVersions { - /// - /// 2024-05-01-preview. - /// - public static readonly string V2024_05_01_preview = "2024-05-01-preview"; - /// /// 2021-11-01. /// @@ -118,7 +113,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing SqlPrivateEndpointConnection. /// - /// + /// /// The the Bicep identifier name of the SqlPrivateEndpointConnection /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -126,6 +121,6 @@ public static class ResourceVersions /// /// Version of the SqlPrivateEndpointConnection. /// The existing SqlPrivateEndpointConnection resource. - public static SqlPrivateEndpointConnection FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static SqlPrivateEndpointConnection FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlServer.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlServer.cs index 50eb6391b14f..0d6e74b44692 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlServer.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlServer.cs @@ -20,7 +20,7 @@ namespace Azure.Provisioning.Sql; /// /// SqlServer. /// -public partial class SqlServer : Resource +public partial class SqlServer : ProvisionableResource { /// /// The name of the server. @@ -176,15 +176,15 @@ public partial class SqlServer : Resource /// /// Creates a new SqlServer. /// - /// + /// /// The the Bicep identifier name of the SqlServer resource. This can be /// used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and /// underscores. /// /// Version of the SqlServer. - public SqlServer(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Sql/servers", resourceVersion ?? "2021-11-01") + public SqlServer(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Sql/servers", resourceVersion ?? "2021-11-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _location = BicepValue.DefineProperty(this, "Location", ["location"], isRequired: true); @@ -216,11 +216,6 @@ public SqlServer(string identifierName, string? resourceVersion = default) /// public static class ResourceVersions { - /// - /// 2024-05-01-preview. - /// - public static readonly string V2024_05_01_preview = "2024-05-01-preview"; - /// /// 2021-11-01. /// @@ -240,7 +235,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing SqlServer. /// - /// + /// /// The the Bicep identifier name of the SqlServer resource. This can be /// used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and @@ -248,8 +243,8 @@ public static class ResourceVersions /// /// Version of the SqlServer. /// The existing SqlServer resource. - public static SqlServer FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static SqlServer FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; /// /// Get the requirements for naming this SqlServer resource. @@ -267,10 +262,10 @@ public override ResourceNameRequirements GetResourceNameRequirements() => /// The . /// The . public RoleAssignment CreateRoleAssignment(SqlBuiltInRole role, UserAssignedIdentity identity) => - new($"{IdentifierName}_{identity.IdentifierName}_{SqlBuiltInRole.GetBuiltInRoleName(role)}") + new($"{BicepIdentifier}_{identity.BicepIdentifier}_{SqlBuiltInRole.GetBuiltInRoleName(role)}") { Name = BicepFunction.CreateGuid(Id, identity.PrincipalId, BicepFunction.GetSubscriptionResourceId("Microsoft.Authorization/roleDefinitions", role.ToString())), - Scope = new IdentifierExpression(IdentifierName), + Scope = new IdentifierExpression(BicepIdentifier), PrincipalType = RoleManagementPrincipalType.ServicePrincipal, RoleDefinitionId = BicepFunction.GetSubscriptionResourceId("Microsoft.Authorization/roleDefinitions", role.ToString()), PrincipalId = identity.PrincipalId @@ -283,13 +278,13 @@ public RoleAssignment CreateRoleAssignment(SqlBuiltInRole role, UserAssignedIden /// The role to grant. /// The type of the principal to assign to. /// The principal to assign to. - /// Optional role assignment identifier name suffix. + /// Optional role assignment identifier name suffix. /// The . - public RoleAssignment CreateRoleAssignment(SqlBuiltInRole role, BicepValue principalType, BicepValue principalId, string? identifierNameSuffix = default) => - new($"{IdentifierName}_{SqlBuiltInRole.GetBuiltInRoleName(role)}{(identifierNameSuffix is null ? "" : "_")}{identifierNameSuffix}") + public RoleAssignment CreateRoleAssignment(SqlBuiltInRole role, BicepValue principalType, BicepValue principalId, string? bicepIdentifierSuffix = default) => + new($"{BicepIdentifier}_{SqlBuiltInRole.GetBuiltInRoleName(role)}{(bicepIdentifierSuffix is null ? "" : "_")}{bicepIdentifierSuffix}") { Name = BicepFunction.CreateGuid(Id, principalId, BicepFunction.GetSubscriptionResourceId("Microsoft.Authorization/roleDefinitions", role.ToString())), - Scope = new IdentifierExpression(IdentifierName), + Scope = new IdentifierExpression(BicepIdentifier), PrincipalType = principalType, RoleDefinitionId = BicepFunction.GetSubscriptionResourceId("Microsoft.Authorization/roleDefinitions", role.ToString()), PrincipalId = principalId diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlServerAzureADAdministrator.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlServerAzureADAdministrator.cs index ef441622d81a..d96ae3a64ad7 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlServerAzureADAdministrator.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlServerAzureADAdministrator.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.Sql; /// /// SqlServerAzureADAdministrator. /// -public partial class SqlServerAzureADAdministrator : Resource +public partial class SqlServerAzureADAdministrator : ProvisionableResource { private readonly BicepValue _name; @@ -75,15 +75,15 @@ public partial class SqlServerAzureADAdministrator : Resource /// /// Creates a new SqlServerAzureADAdministrator. /// - /// + /// /// The the Bicep identifier name of the SqlServerAzureADAdministrator /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the SqlServerAzureADAdministrator. - public SqlServerAzureADAdministrator(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Sql/servers/administrators", resourceVersion ?? "2021-11-01") + public SqlServerAzureADAdministrator(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Sql/servers/administrators", resourceVersion ?? "2021-11-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true, defaultValue: GetNameDefaultValue()); _administratorType = BicepValue.DefineProperty(this, "AdministratorType", ["properties", "administratorType"]); @@ -101,11 +101,6 @@ public SqlServerAzureADAdministrator(string identifierName, string? resourceVers /// public static class ResourceVersions { - /// - /// 2024-05-01-preview. - /// - public static readonly string V2024_05_01_preview = "2024-05-01-preview"; - /// /// 2021-11-01. /// @@ -125,7 +120,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing SqlServerAzureADAdministrator. /// - /// + /// /// The the Bicep identifier name of the SqlServerAzureADAdministrator /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -133,6 +128,6 @@ public static class ResourceVersions /// /// Version of the SqlServerAzureADAdministrator. /// The existing SqlServerAzureADAdministrator resource. - public static SqlServerAzureADAdministrator FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static SqlServerAzureADAdministrator FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlServerAzureADOnlyAuthentication.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlServerAzureADOnlyAuthentication.cs index c3425ab22a0b..a53849bdf2a5 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlServerAzureADOnlyAuthentication.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlServerAzureADOnlyAuthentication.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.Sql; /// /// SqlServerAzureADOnlyAuthentication. /// -public partial class SqlServerAzureADOnlyAuthentication : Resource +public partial class SqlServerAzureADOnlyAuthentication : ProvisionableResource { /// /// Gets the Name. @@ -50,15 +50,15 @@ public partial class SqlServerAzureADOnlyAuthentication : Resource /// /// Creates a new SqlServerAzureADOnlyAuthentication. /// - /// + /// /// The the Bicep identifier name of the SqlServerAzureADOnlyAuthentication /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the SqlServerAzureADOnlyAuthentication. - public SqlServerAzureADOnlyAuthentication(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Sql/servers/azureADOnlyAuthentications", resourceVersion ?? "2021-11-01") + public SqlServerAzureADOnlyAuthentication(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Sql/servers/azureADOnlyAuthentications", resourceVersion ?? "2021-11-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _isAzureADOnlyAuthenticationEnabled = BicepValue.DefineProperty(this, "IsAzureADOnlyAuthenticationEnabled", ["properties", "azureADOnlyAuthentication"]); @@ -72,11 +72,6 @@ public SqlServerAzureADOnlyAuthentication(string identifierName, string? resourc /// public static class ResourceVersions { - /// - /// 2024-05-01-preview. - /// - public static readonly string V2024_05_01_preview = "2024-05-01-preview"; - /// /// 2021-11-01. /// @@ -96,7 +91,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing SqlServerAzureADOnlyAuthentication. /// - /// + /// /// The the Bicep identifier name of the SqlServerAzureADOnlyAuthentication /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -104,6 +99,6 @@ public static class ResourceVersions /// /// Version of the SqlServerAzureADOnlyAuthentication. /// The existing SqlServerAzureADOnlyAuthentication resource. - public static SqlServerAzureADOnlyAuthentication FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static SqlServerAzureADOnlyAuthentication FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlServerBlobAuditingPolicy.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlServerBlobAuditingPolicy.cs index 6d04357db8aa..b1822d0d0ce4 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlServerBlobAuditingPolicy.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlServerBlobAuditingPolicy.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.Sql; /// /// SqlServerBlobAuditingPolicy. /// -public partial class SqlServerBlobAuditingPolicy : Resource +public partial class SqlServerBlobAuditingPolicy : ProvisionableResource { /// /// Gets the Name. @@ -212,15 +212,15 @@ public partial class SqlServerBlobAuditingPolicy : Resource /// /// Creates a new SqlServerBlobAuditingPolicy. /// - /// + /// /// The the Bicep identifier name of the SqlServerBlobAuditingPolicy /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the SqlServerBlobAuditingPolicy. - public SqlServerBlobAuditingPolicy(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Sql/servers/auditingSettings", resourceVersion ?? "2021-11-01") + public SqlServerBlobAuditingPolicy(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Sql/servers/auditingSettings", resourceVersion ?? "2021-11-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _auditActionsAndGroups = BicepList.DefineProperty(this, "AuditActionsAndGroups", ["properties", "auditActionsAndGroups"]); @@ -244,11 +244,6 @@ public SqlServerBlobAuditingPolicy(string identifierName, string? resourceVersio /// public static class ResourceVersions { - /// - /// 2024-05-01-preview. - /// - public static readonly string V2024_05_01_preview = "2024-05-01-preview"; - /// /// 2021-11-01. /// @@ -258,7 +253,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing SqlServerBlobAuditingPolicy. /// - /// + /// /// The the Bicep identifier name of the SqlServerBlobAuditingPolicy /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -266,6 +261,6 @@ public static class ResourceVersions /// /// Version of the SqlServerBlobAuditingPolicy. /// The existing SqlServerBlobAuditingPolicy resource. - public static SqlServerBlobAuditingPolicy FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static SqlServerBlobAuditingPolicy FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlServerCommunicationLink.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlServerCommunicationLink.cs index 3dcbe4d9f67f..281f4bdebf71 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlServerCommunicationLink.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlServerCommunicationLink.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.Sql; /// /// SqlServerCommunicationLink. /// -public partial class SqlServerCommunicationLink : Resource +public partial class SqlServerCommunicationLink : ProvisionableResource { /// /// The name of the server communication link. @@ -69,15 +69,15 @@ public partial class SqlServerCommunicationLink : Resource /// /// Creates a new SqlServerCommunicationLink. /// - /// + /// /// The the Bicep identifier name of the SqlServerCommunicationLink /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the SqlServerCommunicationLink. - public SqlServerCommunicationLink(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Sql/servers/communicationLinks", resourceVersion ?? "2014-04-01") + public SqlServerCommunicationLink(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Sql/servers/communicationLinks", resourceVersion ?? "2014-04-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _partnerServer = BicepValue.DefineProperty(this, "PartnerServer", ["properties", "partnerServer"]); @@ -94,11 +94,6 @@ public SqlServerCommunicationLink(string identifierName, string? resourceVersion /// public static class ResourceVersions { - /// - /// 2014-04-01-preview. - /// - public static readonly string V2014_04_01_preview = "2014-04-01-preview"; - /// /// 2014-04-01. /// @@ -113,7 +108,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing SqlServerCommunicationLink. /// - /// + /// /// The the Bicep identifier name of the SqlServerCommunicationLink /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -121,6 +116,6 @@ public static class ResourceVersions /// /// Version of the SqlServerCommunicationLink. /// The existing SqlServerCommunicationLink resource. - public static SqlServerCommunicationLink FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static SqlServerCommunicationLink FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlServerConnectionPolicy.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlServerConnectionPolicy.cs index fb18ed4a7844..b03bca22bf68 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlServerConnectionPolicy.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlServerConnectionPolicy.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.Sql; /// /// SqlServerConnectionPolicy. /// -public partial class SqlServerConnectionPolicy : Resource +public partial class SqlServerConnectionPolicy : ProvisionableResource { /// /// Gets the Name. @@ -62,15 +62,15 @@ public partial class SqlServerConnectionPolicy : Resource /// /// Creates a new SqlServerConnectionPolicy. /// - /// + /// /// The the Bicep identifier name of the SqlServerConnectionPolicy /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the SqlServerConnectionPolicy. - public SqlServerConnectionPolicy(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Sql/servers/connectionPolicies", resourceVersion ?? "2021-11-01") + public SqlServerConnectionPolicy(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Sql/servers/connectionPolicies", resourceVersion ?? "2021-11-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _connectionType = BicepValue.DefineProperty(this, "ConnectionType", ["properties", "connectionType"]); @@ -86,11 +86,6 @@ public SqlServerConnectionPolicy(string identifierName, string? resourceVersion /// public static class ResourceVersions { - /// - /// 2024-05-01-preview. - /// - public static readonly string V2024_05_01_preview = "2024-05-01-preview"; - /// /// 2021-11-01. /// @@ -110,7 +105,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing SqlServerConnectionPolicy. /// - /// + /// /// The the Bicep identifier name of the SqlServerConnectionPolicy /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -118,6 +113,6 @@ public static class ResourceVersions /// /// Version of the SqlServerConnectionPolicy. /// The existing SqlServerConnectionPolicy resource. - public static SqlServerConnectionPolicy FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static SqlServerConnectionPolicy FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlServerDatabaseRestorePoint.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlServerDatabaseRestorePoint.cs index c9b71d6df973..d2134c8df1cd 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlServerDatabaseRestorePoint.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlServerDatabaseRestorePoint.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.Sql; /// /// SqlServerDatabaseRestorePoint. /// -public partial class SqlServerDatabaseRestorePoint : Resource +public partial class SqlServerDatabaseRestorePoint : ProvisionableResource { /// /// Gets the Name. @@ -74,15 +74,15 @@ public partial class SqlServerDatabaseRestorePoint : Resource /// /// Creates a new SqlServerDatabaseRestorePoint. /// - /// + /// /// The the Bicep identifier name of the SqlServerDatabaseRestorePoint /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the SqlServerDatabaseRestorePoint. - public SqlServerDatabaseRestorePoint(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Sql/servers/databases/restorePoints", resourceVersion ?? "2021-11-01") + public SqlServerDatabaseRestorePoint(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Sql/servers/databases/restorePoints", resourceVersion ?? "2021-11-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _earliestRestoreOn = BicepValue.DefineProperty(this, "EarliestRestoreOn", ["properties", "earliestRestoreDate"], isOutput: true); @@ -100,11 +100,6 @@ public SqlServerDatabaseRestorePoint(string identifierName, string? resourceVers /// public static class ResourceVersions { - /// - /// 2024-05-01-preview. - /// - public static readonly string V2024_05_01_preview = "2024-05-01-preview"; - /// /// 2021-11-01. /// @@ -129,7 +124,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing SqlServerDatabaseRestorePoint. /// - /// + /// /// The the Bicep identifier name of the SqlServerDatabaseRestorePoint /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -137,6 +132,6 @@ public static class ResourceVersions /// /// Version of the SqlServerDatabaseRestorePoint. /// The existing SqlServerDatabaseRestorePoint resource. - public static SqlServerDatabaseRestorePoint FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static SqlServerDatabaseRestorePoint FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlServerDevOpsAuditingSetting.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlServerDevOpsAuditingSetting.cs index 2709b2c61e54..59c1e728a940 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlServerDevOpsAuditingSetting.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlServerDevOpsAuditingSetting.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.Sql; /// /// SqlServerDevOpsAuditingSetting. /// -public partial class SqlServerDevOpsAuditingSetting : Resource +public partial class SqlServerDevOpsAuditingSetting : ProvisionableResource { /// /// The name of the devops audit settings. This should always be Default. @@ -106,15 +106,15 @@ public partial class SqlServerDevOpsAuditingSetting : Resource /// /// Creates a new SqlServerDevOpsAuditingSetting. /// - /// + /// /// The the Bicep identifier name of the SqlServerDevOpsAuditingSetting /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the SqlServerDevOpsAuditingSetting. - public SqlServerDevOpsAuditingSetting(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Sql/servers/devOpsAuditingSettings", resourceVersion ?? "2021-11-01") + public SqlServerDevOpsAuditingSetting(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Sql/servers/devOpsAuditingSettings", resourceVersion ?? "2021-11-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _isAzureMonitorTargetEnabled = BicepValue.DefineProperty(this, "IsAzureMonitorTargetEnabled", ["properties", "isAzureMonitorTargetEnabled"]); @@ -133,11 +133,6 @@ public SqlServerDevOpsAuditingSetting(string identifierName, string? resourceVer /// public static class ResourceVersions { - /// - /// 2024-05-01-preview. - /// - public static readonly string V2024_05_01_preview = "2024-05-01-preview"; - /// /// 2021-11-01. /// @@ -147,7 +142,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing SqlServerDevOpsAuditingSetting. /// - /// + /// /// The the Bicep identifier name of the SqlServerDevOpsAuditingSetting /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -155,6 +150,6 @@ public static class ResourceVersions /// /// Version of the SqlServerDevOpsAuditingSetting. /// The existing SqlServerDevOpsAuditingSetting resource. - public static SqlServerDevOpsAuditingSetting FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static SqlServerDevOpsAuditingSetting FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlServerDnsAlias.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlServerDnsAlias.cs index 006281d17e92..58605e037fb9 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlServerDnsAlias.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlServerDnsAlias.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.Sql; /// /// SqlServerDnsAlias. /// -public partial class SqlServerDnsAlias : Resource +public partial class SqlServerDnsAlias : ProvisionableResource { /// /// The name of the server dns alias. @@ -50,15 +50,15 @@ public partial class SqlServerDnsAlias : Resource /// /// Creates a new SqlServerDnsAlias. /// - /// + /// /// The the Bicep identifier name of the SqlServerDnsAlias resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, /// and underscores. /// /// Version of the SqlServerDnsAlias. - public SqlServerDnsAlias(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Sql/servers/dnsAliases", resourceVersion ?? "2021-11-01") + public SqlServerDnsAlias(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Sql/servers/dnsAliases", resourceVersion ?? "2021-11-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _azureDnsRecord = BicepValue.DefineProperty(this, "AzureDnsRecord", ["properties", "azureDnsRecord"], isOutput: true); @@ -72,11 +72,6 @@ public SqlServerDnsAlias(string identifierName, string? resourceVersion = defaul /// public static class ResourceVersions { - /// - /// 2024-05-01-preview. - /// - public static readonly string V2024_05_01_preview = "2024-05-01-preview"; - /// /// 2021-11-01. /// @@ -86,7 +81,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing SqlServerDnsAlias. /// - /// + /// /// The the Bicep identifier name of the SqlServerDnsAlias resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, @@ -94,6 +89,6 @@ public static class ResourceVersions /// /// Version of the SqlServerDnsAlias. /// The existing SqlServerDnsAlias resource. - public static SqlServerDnsAlias FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static SqlServerDnsAlias FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlServerJob.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlServerJob.cs index 7da7e3afb72c..a9a7f7e68afb 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlServerJob.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlServerJob.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.Sql; /// /// SqlServerJob. /// -public partial class SqlServerJob : Resource +public partial class SqlServerJob : ProvisionableResource { /// /// The name of the job to get. @@ -62,15 +62,15 @@ public partial class SqlServerJob : Resource /// /// Creates a new SqlServerJob. /// - /// + /// /// The the Bicep identifier name of the SqlServerJob resource. This can /// be used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and /// underscores. /// /// Version of the SqlServerJob. - public SqlServerJob(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Sql/servers/jobAgents/jobs", resourceVersion ?? "2021-11-01") + public SqlServerJob(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Sql/servers/jobAgents/jobs", resourceVersion ?? "2021-11-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _description = BicepValue.DefineProperty(this, "Description", ["properties", "description"]); @@ -86,11 +86,6 @@ public SqlServerJob(string identifierName, string? resourceVersion = default) /// public static class ResourceVersions { - /// - /// 2024-05-01-preview. - /// - public static readonly string V2024_05_01_preview = "2024-05-01-preview"; - /// /// 2021-11-01. /// @@ -100,7 +95,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing SqlServerJob. /// - /// + /// /// The the Bicep identifier name of the SqlServerJob resource. This can /// be used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and @@ -108,6 +103,6 @@ public static class ResourceVersions /// /// Version of the SqlServerJob. /// The existing SqlServerJob resource. - public static SqlServerJob FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static SqlServerJob FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlServerJobAgent.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlServerJobAgent.cs index d558fcf4b82c..9e21753fc166 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlServerJobAgent.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlServerJobAgent.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.Sql; /// /// SqlServerJobAgent. /// -public partial class SqlServerJobAgent : Resource +public partial class SqlServerJobAgent : ProvisionableResource { /// /// The name of the job agent to be created or updated. @@ -75,15 +75,15 @@ public partial class SqlServerJobAgent : Resource /// /// Creates a new SqlServerJobAgent. /// - /// + /// /// The the Bicep identifier name of the SqlServerJobAgent resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, /// and underscores. /// /// Version of the SqlServerJobAgent. - public SqlServerJobAgent(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Sql/servers/jobAgents", resourceVersion ?? "2021-11-01") + public SqlServerJobAgent(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Sql/servers/jobAgents", resourceVersion ?? "2021-11-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _location = BicepValue.DefineProperty(this, "Location", ["location"], isRequired: true); @@ -101,11 +101,6 @@ public SqlServerJobAgent(string identifierName, string? resourceVersion = defaul /// public static class ResourceVersions { - /// - /// 2024-05-01-preview. - /// - public static readonly string V2024_05_01_preview = "2024-05-01-preview"; - /// /// 2021-11-01. /// @@ -115,7 +110,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing SqlServerJobAgent. /// - /// + /// /// The the Bicep identifier name of the SqlServerJobAgent resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, @@ -123,6 +118,6 @@ public static class ResourceVersions /// /// Version of the SqlServerJobAgent. /// The existing SqlServerJobAgent resource. - public static SqlServerJobAgent FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static SqlServerJobAgent FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlServerJobCredential.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlServerJobCredential.cs index 4390ef72cf88..329a802679f2 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlServerJobCredential.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlServerJobCredential.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.Sql; /// /// SqlServerJobCredential. /// -public partial class SqlServerJobCredential : Resource +public partial class SqlServerJobCredential : ProvisionableResource { /// /// The name of the credential. @@ -56,15 +56,15 @@ public partial class SqlServerJobCredential : Resource /// /// Creates a new SqlServerJobCredential. /// - /// + /// /// The the Bicep identifier name of the SqlServerJobCredential resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, /// numbers, and underscores. /// /// Version of the SqlServerJobCredential. - public SqlServerJobCredential(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Sql/servers/jobAgents/credentials", resourceVersion ?? "2021-11-01") + public SqlServerJobCredential(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Sql/servers/jobAgents/credentials", resourceVersion ?? "2021-11-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _password = BicepValue.DefineProperty(this, "Password", ["properties", "password"]); @@ -79,11 +79,6 @@ public SqlServerJobCredential(string identifierName, string? resourceVersion = d /// public static class ResourceVersions { - /// - /// 2024-05-01-preview. - /// - public static readonly string V2024_05_01_preview = "2024-05-01-preview"; - /// /// 2021-11-01. /// @@ -93,7 +88,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing SqlServerJobCredential. /// - /// + /// /// The the Bicep identifier name of the SqlServerJobCredential resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, @@ -101,6 +96,6 @@ public static class ResourceVersions /// /// Version of the SqlServerJobCredential. /// The existing SqlServerJobCredential resource. - public static SqlServerJobCredential FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static SqlServerJobCredential FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlServerJobExecution.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlServerJobExecution.cs index d51d0d11f790..d85cdb690960 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlServerJobExecution.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlServerJobExecution.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.Sql; /// /// SqlServerJobExecution. /// -public partial class SqlServerJobExecution : Resource +public partial class SqlServerJobExecution : ProvisionableResource { /// /// Gets the Name. @@ -122,15 +122,15 @@ public partial class SqlServerJobExecution : Resource /// /// Creates a new SqlServerJobExecution. /// - /// + /// /// The the Bicep identifier name of the SqlServerJobExecution resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, /// numbers, and underscores. /// /// Version of the SqlServerJobExecution. - public SqlServerJobExecution(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Sql/servers/jobAgents/jobs/executions", resourceVersion ?? "2021-11-01") + public SqlServerJobExecution(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Sql/servers/jobAgents/jobs/executions", resourceVersion ?? "2021-11-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _createOn = BicepValue.DefineProperty(this, "CreateOn", ["properties", "createTime"], isOutput: true); @@ -156,11 +156,6 @@ public SqlServerJobExecution(string identifierName, string? resourceVersion = de /// public static class ResourceVersions { - /// - /// 2024-05-01-preview. - /// - public static readonly string V2024_05_01_preview = "2024-05-01-preview"; - /// /// 2021-11-01. /// @@ -170,7 +165,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing SqlServerJobExecution. /// - /// + /// /// The the Bicep identifier name of the SqlServerJobExecution resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, @@ -178,6 +173,6 @@ public static class ResourceVersions /// /// Version of the SqlServerJobExecution. /// The existing SqlServerJobExecution resource. - public static SqlServerJobExecution FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static SqlServerJobExecution FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlServerJobStep.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlServerJobStep.cs index 4c4320e36db3..22e2035cd358 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlServerJobStep.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlServerJobStep.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.Sql; /// /// SqlServerJobStep. /// -public partial class SqlServerJobStep : Resource +public partial class SqlServerJobStep : ProvisionableResource { /// /// The name of the job step. @@ -84,15 +84,15 @@ public partial class SqlServerJobStep : Resource /// /// Creates a new SqlServerJobStep. /// - /// + /// /// The the Bicep identifier name of the SqlServerJobStep resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, /// and underscores. /// /// Version of the SqlServerJobStep. - public SqlServerJobStep(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Sql/servers/jobAgents/jobs/steps", resourceVersion ?? "2021-11-01") + public SqlServerJobStep(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Sql/servers/jobAgents/jobs/steps", resourceVersion ?? "2021-11-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _action = BicepValue.DefineProperty(this, "Action", ["properties", "action"]); @@ -111,11 +111,6 @@ public SqlServerJobStep(string identifierName, string? resourceVersion = default /// public static class ResourceVersions { - /// - /// 2024-05-01-preview. - /// - public static readonly string V2024_05_01_preview = "2024-05-01-preview"; - /// /// 2021-11-01. /// @@ -125,7 +120,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing SqlServerJobStep. /// - /// + /// /// The the Bicep identifier name of the SqlServerJobStep resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, @@ -133,6 +128,6 @@ public static class ResourceVersions /// /// Version of the SqlServerJobStep. /// The existing SqlServerJobStep resource. - public static SqlServerJobStep FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static SqlServerJobStep FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlServerJobTargetGroup.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlServerJobTargetGroup.cs index a2ee68e86c0f..7e7e3413e972 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlServerJobTargetGroup.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlServerJobTargetGroup.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.Sql; /// /// SqlServerJobTargetGroup. /// -public partial class SqlServerJobTargetGroup : Resource +public partial class SqlServerJobTargetGroup : ProvisionableResource { /// /// The name of the target group. @@ -51,15 +51,15 @@ public partial class SqlServerJobTargetGroup : Resource /// /// Creates a new SqlServerJobTargetGroup. /// - /// + /// /// The the Bicep identifier name of the SqlServerJobTargetGroup resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, /// numbers, and underscores. /// /// Version of the SqlServerJobTargetGroup. - public SqlServerJobTargetGroup(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Sql/servers/jobAgents/targetGroups", resourceVersion ?? "2021-11-01") + public SqlServerJobTargetGroup(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Sql/servers/jobAgents/targetGroups", resourceVersion ?? "2021-11-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _members = BicepList.DefineProperty(this, "Members", ["properties", "members"]); @@ -73,11 +73,6 @@ public SqlServerJobTargetGroup(string identifierName, string? resourceVersion = /// public static class ResourceVersions { - /// - /// 2024-05-01-preview. - /// - public static readonly string V2024_05_01_preview = "2024-05-01-preview"; - /// /// 2021-11-01. /// @@ -87,7 +82,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing SqlServerJobTargetGroup. /// - /// + /// /// The the Bicep identifier name of the SqlServerJobTargetGroup resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, @@ -95,6 +90,6 @@ public static class ResourceVersions /// /// Version of the SqlServerJobTargetGroup. /// The existing SqlServerJobTargetGroup resource. - public static SqlServerJobTargetGroup FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static SqlServerJobTargetGroup FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlServerKey.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlServerKey.cs index a6e865205af8..92e907c36e45 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlServerKey.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlServerKey.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.Sql; /// /// SqlServerKey. /// -public partial class SqlServerKey : Resource +public partial class SqlServerKey : ProvisionableResource { /// /// The name of the server key to be operated on (updated or created). The @@ -100,15 +100,15 @@ public partial class SqlServerKey : Resource /// /// Creates a new SqlServerKey. /// - /// + /// /// The the Bicep identifier name of the SqlServerKey resource. This can /// be used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and /// underscores. /// /// Version of the SqlServerKey. - public SqlServerKey(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Sql/servers/keys", resourceVersion ?? "2021-11-01") + public SqlServerKey(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Sql/servers/keys", resourceVersion ?? "2021-11-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _serverKeyType = BicepValue.DefineProperty(this, "ServerKeyType", ["properties", "serverKeyType"]); @@ -129,11 +129,6 @@ public SqlServerKey(string identifierName, string? resourceVersion = default) /// public static class ResourceVersions { - /// - /// 2024-05-01-preview. - /// - public static readonly string V2024_05_01_preview = "2024-05-01-preview"; - /// /// 2021-11-01. /// @@ -143,7 +138,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing SqlServerKey. /// - /// + /// /// The the Bicep identifier name of the SqlServerKey resource. This can /// be used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and @@ -151,6 +146,6 @@ public static class ResourceVersions /// /// Version of the SqlServerKey. /// The existing SqlServerKey resource. - public static SqlServerKey FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static SqlServerKey FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlServerSecurityAlertPolicy.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlServerSecurityAlertPolicy.cs index 9e1960d3e18d..990ce63a64f9 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlServerSecurityAlertPolicy.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlServerSecurityAlertPolicy.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.Sql; /// /// SqlServerSecurityAlertPolicy. /// -public partial class SqlServerSecurityAlertPolicy : Resource +public partial class SqlServerSecurityAlertPolicy : ProvisionableResource { /// /// Gets the Name. @@ -99,15 +99,15 @@ public partial class SqlServerSecurityAlertPolicy : Resource /// /// Creates a new SqlServerSecurityAlertPolicy. /// - /// + /// /// The the Bicep identifier name of the SqlServerSecurityAlertPolicy /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the SqlServerSecurityAlertPolicy. - public SqlServerSecurityAlertPolicy(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Sql/servers/securityAlertPolicies", resourceVersion ?? "2021-11-01") + public SqlServerSecurityAlertPolicy(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Sql/servers/securityAlertPolicies", resourceVersion ?? "2021-11-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _disabledAlerts = BicepList.DefineProperty(this, "DisabledAlerts", ["properties", "disabledAlerts"]); @@ -128,11 +128,6 @@ public SqlServerSecurityAlertPolicy(string identifierName, string? resourceVersi /// public static class ResourceVersions { - /// - /// 2024-05-01-preview. - /// - public static readonly string V2024_05_01_preview = "2024-05-01-preview"; - /// /// 2021-11-01. /// @@ -142,7 +137,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing SqlServerSecurityAlertPolicy. /// - /// + /// /// The the Bicep identifier name of the SqlServerSecurityAlertPolicy /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -150,6 +145,6 @@ public static class ResourceVersions /// /// Version of the SqlServerSecurityAlertPolicy. /// The existing SqlServerSecurityAlertPolicy resource. - public static SqlServerSecurityAlertPolicy FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static SqlServerSecurityAlertPolicy FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlServerSqlVulnerabilityAssessment.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlServerSqlVulnerabilityAssessment.cs index bbe68a9074b7..a47fe94391c1 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlServerSqlVulnerabilityAssessment.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlServerSqlVulnerabilityAssessment.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.Sql; /// /// SqlServerSqlVulnerabilityAssessment. /// -public partial class SqlServerSqlVulnerabilityAssessment : Resource +public partial class SqlServerSqlVulnerabilityAssessment : ProvisionableResource { /// /// Gets the Name. @@ -52,15 +52,15 @@ public partial class SqlServerSqlVulnerabilityAssessment : Resource /// /// Creates a new SqlServerSqlVulnerabilityAssessment. /// - /// + /// /// The the Bicep identifier name of the /// SqlServerSqlVulnerabilityAssessment resource. This can be used to /// refer to the resource in expressions, but is not the Azure name of the /// resource. This value can contain letters, numbers, and underscores. /// /// Version of the SqlServerSqlVulnerabilityAssessment. - public SqlServerSqlVulnerabilityAssessment(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Sql/servers/sqlVulnerabilityAssessments", resourceVersion ?? "2024-05-01-preview") + public SqlServerSqlVulnerabilityAssessment(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Sql/servers/sqlVulnerabilityAssessments", resourceVersion ?? "2021-11-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _state = BicepValue.DefineProperty(this, "State", ["properties", "state"]); @@ -75,15 +75,25 @@ public SqlServerSqlVulnerabilityAssessment(string identifierName, string? resour public static class ResourceVersions { /// - /// 2024-05-01-preview. + /// 2021-11-01. /// - public static readonly string V2024_05_01_preview = "2024-05-01-preview"; + public static readonly string V2021_11_01 = "2021-11-01"; + + /// + /// 2014-04-01. + /// + public static readonly string V2014_04_01 = "2014-04-01"; + + /// + /// 2014-01-01. + /// + public static readonly string V2014_01_01 = "2014-01-01"; } /// /// Creates a reference to an existing SqlServerSqlVulnerabilityAssessment. /// - /// + /// /// The the Bicep identifier name of the /// SqlServerSqlVulnerabilityAssessment resource. This can be used to /// refer to the resource in expressions, but is not the Azure name of the @@ -91,6 +101,6 @@ public static class ResourceVersions /// /// Version of the SqlServerSqlVulnerabilityAssessment. /// The existing SqlServerSqlVulnerabilityAssessment resource. - public static SqlServerSqlVulnerabilityAssessment FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static SqlServerSqlVulnerabilityAssessment FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlServerSqlVulnerabilityAssessmentBaseline.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlServerSqlVulnerabilityAssessmentBaseline.cs index 617c0d9ac530..928310d8fceb 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlServerSqlVulnerabilityAssessmentBaseline.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlServerSqlVulnerabilityAssessmentBaseline.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.Sql; /// /// SqlServerSqlVulnerabilityAssessmentBaseline. /// -public partial class SqlServerSqlVulnerabilityAssessmentBaseline : Resource +public partial class SqlServerSqlVulnerabilityAssessmentBaseline : ProvisionableResource { /// /// Gets the Name. @@ -57,7 +57,7 @@ public partial class SqlServerSqlVulnerabilityAssessmentBaseline : Resource /// /// Creates a new SqlServerSqlVulnerabilityAssessmentBaseline. /// - /// + /// /// The the Bicep identifier name of the /// SqlServerSqlVulnerabilityAssessmentBaseline resource. This can be /// used to refer to the resource in expressions, but is not the Azure @@ -65,8 +65,8 @@ public partial class SqlServerSqlVulnerabilityAssessmentBaseline : Resource /// underscores. /// /// Version of the SqlServerSqlVulnerabilityAssessmentBaseline. - public SqlServerSqlVulnerabilityAssessmentBaseline(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Sql/servers/sqlVulnerabilityAssessments/baselines", resourceVersion ?? "2024-05-01-preview") + public SqlServerSqlVulnerabilityAssessmentBaseline(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Sql/servers/sqlVulnerabilityAssessments/baselines", resourceVersion ?? "2021-11-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _isLatestScan = BicepValue.DefineProperty(this, "IsLatestScan", ["properties", "latestScan"]); @@ -82,16 +82,26 @@ public SqlServerSqlVulnerabilityAssessmentBaseline(string identifierName, string public static class ResourceVersions { /// - /// 2024-05-01-preview. + /// 2021-11-01. /// - public static readonly string V2024_05_01_preview = "2024-05-01-preview"; + public static readonly string V2021_11_01 = "2021-11-01"; + + /// + /// 2014-04-01. + /// + public static readonly string V2014_04_01 = "2014-04-01"; + + /// + /// 2014-01-01. + /// + public static readonly string V2014_01_01 = "2014-01-01"; } /// /// Creates a reference to an existing /// SqlServerSqlVulnerabilityAssessmentBaseline. /// - /// + /// /// The the Bicep identifier name of the /// SqlServerSqlVulnerabilityAssessmentBaseline resource. This can be /// used to refer to the resource in expressions, but is not the Azure @@ -100,6 +110,6 @@ public static class ResourceVersions /// /// Version of the SqlServerSqlVulnerabilityAssessmentBaseline. /// The existing SqlServerSqlVulnerabilityAssessmentBaseline resource. - public static SqlServerSqlVulnerabilityAssessmentBaseline FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static SqlServerSqlVulnerabilityAssessmentBaseline FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlServerSqlVulnerabilityAssessmentBaselineRule.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlServerSqlVulnerabilityAssessmentBaselineRule.cs index d6d019428da9..43b89fe3ac62 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlServerSqlVulnerabilityAssessmentBaselineRule.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlServerSqlVulnerabilityAssessmentBaselineRule.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.Sql; /// /// SqlServerSqlVulnerabilityAssessmentBaselineRule. /// -public partial class SqlServerSqlVulnerabilityAssessmentBaselineRule : Resource +public partial class SqlServerSqlVulnerabilityAssessmentBaselineRule : ProvisionableResource { /// /// Gets the Name. @@ -57,7 +57,7 @@ public partial class SqlServerSqlVulnerabilityAssessmentBaselineRule : Resource /// /// Creates a new SqlServerSqlVulnerabilityAssessmentBaselineRule. /// - /// + /// /// The the Bicep identifier name of the /// SqlServerSqlVulnerabilityAssessmentBaselineRule resource. This can be /// used to refer to the resource in expressions, but is not the Azure @@ -65,8 +65,8 @@ public partial class SqlServerSqlVulnerabilityAssessmentBaselineRule : Resource /// underscores. /// /// Version of the SqlServerSqlVulnerabilityAssessmentBaselineRule. - public SqlServerSqlVulnerabilityAssessmentBaselineRule(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Sql/servers/sqlVulnerabilityAssessments/baselines/rules", resourceVersion ?? "2024-05-01-preview") + public SqlServerSqlVulnerabilityAssessmentBaselineRule(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Sql/servers/sqlVulnerabilityAssessments/baselines/rules", resourceVersion ?? "2021-11-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _isLatestScan = BicepValue.DefineProperty(this, "IsLatestScan", ["properties", "latestScan"]); @@ -83,16 +83,26 @@ public SqlServerSqlVulnerabilityAssessmentBaselineRule(string identifierName, st public static class ResourceVersions { /// - /// 2024-05-01-preview. + /// 2021-11-01. /// - public static readonly string V2024_05_01_preview = "2024-05-01-preview"; + public static readonly string V2021_11_01 = "2021-11-01"; + + /// + /// 2014-04-01. + /// + public static readonly string V2014_04_01 = "2014-04-01"; + + /// + /// 2014-01-01. + /// + public static readonly string V2014_01_01 = "2014-01-01"; } /// /// Creates a reference to an existing /// SqlServerSqlVulnerabilityAssessmentBaselineRule. /// - /// + /// /// The the Bicep identifier name of the /// SqlServerSqlVulnerabilityAssessmentBaselineRule resource. This can be /// used to refer to the resource in expressions, but is not the Azure @@ -101,6 +111,6 @@ public static class ResourceVersions /// /// Version of the SqlServerSqlVulnerabilityAssessmentBaselineRule. /// The existing SqlServerSqlVulnerabilityAssessmentBaselineRule resource. - public static SqlServerSqlVulnerabilityAssessmentBaselineRule FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static SqlServerSqlVulnerabilityAssessmentBaselineRule FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlServerTrustGroup.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlServerTrustGroup.cs index cdcba75e2b62..3b157dc22fb4 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlServerTrustGroup.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlServerTrustGroup.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.Sql; /// /// SqlServerTrustGroup. /// -public partial class SqlServerTrustGroup : Resource +public partial class SqlServerTrustGroup : ProvisionableResource { /// /// The name of the server trust group. @@ -51,15 +51,15 @@ public partial class SqlServerTrustGroup : Resource /// /// Creates a new SqlServerTrustGroup. /// - /// + /// /// The the Bicep identifier name of the SqlServerTrustGroup resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, /// numbers, and underscores. /// /// Version of the SqlServerTrustGroup. - public SqlServerTrustGroup(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Sql/locations/serverTrustGroups", resourceVersion ?? "2021-11-01") + public SqlServerTrustGroup(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Sql/locations/serverTrustGroups", resourceVersion ?? "2021-11-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _groupMembers = BicepList.DefineProperty(this, "GroupMembers", ["properties", "groupMembers"]); @@ -73,11 +73,6 @@ public SqlServerTrustGroup(string identifierName, string? resourceVersion = defa /// public static class ResourceVersions { - /// - /// 2024-05-01-preview. - /// - public static readonly string V2024_05_01_preview = "2024-05-01-preview"; - /// /// 2021-11-01. /// @@ -87,7 +82,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing SqlServerTrustGroup. /// - /// + /// /// The the Bicep identifier name of the SqlServerTrustGroup resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, @@ -95,6 +90,6 @@ public static class ResourceVersions /// /// Version of the SqlServerTrustGroup. /// The existing SqlServerTrustGroup resource. - public static SqlServerTrustGroup FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static SqlServerTrustGroup FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlServerVirtualNetworkRule.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlServerVirtualNetworkRule.cs index f58ba2c2ca45..aae9b6173cdf 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlServerVirtualNetworkRule.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlServerVirtualNetworkRule.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.Sql; /// /// SqlServerVirtualNetworkRule. /// -public partial class SqlServerVirtualNetworkRule : Resource +public partial class SqlServerVirtualNetworkRule : ProvisionableResource { /// /// The name of the virtual network rule. @@ -63,15 +63,15 @@ public partial class SqlServerVirtualNetworkRule : Resource /// /// Creates a new SqlServerVirtualNetworkRule. /// - /// + /// /// The the Bicep identifier name of the SqlServerVirtualNetworkRule /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the SqlServerVirtualNetworkRule. - public SqlServerVirtualNetworkRule(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Sql/servers/virtualNetworkRules", resourceVersion ?? "2021-11-01") + public SqlServerVirtualNetworkRule(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Sql/servers/virtualNetworkRules", resourceVersion ?? "2021-11-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _ignoreMissingVnetServiceEndpoint = BicepValue.DefineProperty(this, "IgnoreMissingVnetServiceEndpoint", ["properties", "ignoreMissingVnetServiceEndpoint"]); @@ -87,11 +87,6 @@ public SqlServerVirtualNetworkRule(string identifierName, string? resourceVersio /// public static class ResourceVersions { - /// - /// 2024-05-01-preview. - /// - public static readonly string V2024_05_01_preview = "2024-05-01-preview"; - /// /// 2021-11-01. /// @@ -101,7 +96,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing SqlServerVirtualNetworkRule. /// - /// + /// /// The the Bicep identifier name of the SqlServerVirtualNetworkRule /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -109,6 +104,6 @@ public static class ResourceVersions /// /// Version of the SqlServerVirtualNetworkRule. /// The existing SqlServerVirtualNetworkRule resource. - public static SqlServerVirtualNetworkRule FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static SqlServerVirtualNetworkRule FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlServerVulnerabilityAssessment.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlServerVulnerabilityAssessment.cs index 82305e222135..3dec87cdda2b 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlServerVulnerabilityAssessment.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SqlServerVulnerabilityAssessment.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.Sql; /// /// SqlServerVulnerabilityAssessment. /// -public partial class SqlServerVulnerabilityAssessment : Resource +public partial class SqlServerVulnerabilityAssessment : ProvisionableResource { /// /// Gets the Name. @@ -77,15 +77,15 @@ public partial class SqlServerVulnerabilityAssessment : Resource /// /// Creates a new SqlServerVulnerabilityAssessment. /// - /// + /// /// The the Bicep identifier name of the SqlServerVulnerabilityAssessment /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the SqlServerVulnerabilityAssessment. - public SqlServerVulnerabilityAssessment(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Sql/servers/vulnerabilityAssessments", resourceVersion ?? "2021-11-01") + public SqlServerVulnerabilityAssessment(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Sql/servers/vulnerabilityAssessments", resourceVersion ?? "2021-11-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _recurringScans = BicepValue.DefineProperty(this, "RecurringScans", ["properties", "recurringScans"]); @@ -102,11 +102,6 @@ public SqlServerVulnerabilityAssessment(string identifierName, string? resourceV /// public static class ResourceVersions { - /// - /// 2024-05-01-preview. - /// - public static readonly string V2024_05_01_preview = "2024-05-01-preview"; - /// /// 2021-11-01. /// @@ -116,7 +111,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing SqlServerVulnerabilityAssessment. /// - /// + /// /// The the Bicep identifier name of the SqlServerVulnerabilityAssessment /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -124,6 +119,6 @@ public static class ResourceVersions /// /// Version of the SqlServerVulnerabilityAssessment. /// The existing SqlServerVulnerabilityAssessment resource. - public static SqlServerVulnerabilityAssessment FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static SqlServerVulnerabilityAssessment FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SyncAgent.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SyncAgent.cs index f389692b6ac2..1eb5764114a9 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SyncAgent.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SyncAgent.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.Sql; /// /// SyncAgent. /// -public partial class SyncAgent : Resource +public partial class SyncAgent : ProvisionableResource { /// /// The name of the sync agent. @@ -80,15 +80,15 @@ public partial class SyncAgent : Resource /// /// Creates a new SyncAgent. /// - /// + /// /// The the Bicep identifier name of the SyncAgent resource. This can be /// used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and /// underscores. /// /// Version of the SyncAgent. - public SyncAgent(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Sql/servers/syncAgents", resourceVersion ?? "2021-11-01") + public SyncAgent(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Sql/servers/syncAgents", resourceVersion ?? "2021-11-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _syncDatabaseId = BicepValue.DefineProperty(this, "SyncDatabaseId", ["properties", "syncDatabaseId"]); @@ -107,11 +107,6 @@ public SyncAgent(string identifierName, string? resourceVersion = default) /// public static class ResourceVersions { - /// - /// 2024-05-01-preview. - /// - public static readonly string V2024_05_01_preview = "2024-05-01-preview"; - /// /// 2021-11-01. /// @@ -121,7 +116,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing SyncAgent. /// - /// + /// /// The the Bicep identifier name of the SyncAgent resource. This can be /// used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and @@ -129,6 +124,6 @@ public static class ResourceVersions /// /// Version of the SyncAgent. /// The existing SyncAgent resource. - public static SyncAgent FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static SyncAgent FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SyncGroup.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SyncGroup.cs index 395d1ce0d666..26b42ec7b42a 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SyncGroup.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SyncGroup.cs @@ -17,7 +17,7 @@ namespace Azure.Provisioning.Sql; /// /// SyncGroup. /// -public partial class SyncGroup : Resource +public partial class SyncGroup : ProvisionableResource { /// /// The name of the sync group. @@ -125,15 +125,15 @@ public partial class SyncGroup : Resource /// /// Creates a new SyncGroup. /// - /// + /// /// The the Bicep identifier name of the SyncGroup resource. This can be /// used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and /// underscores. /// /// Version of the SyncGroup. - public SyncGroup(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Sql/servers/databases/syncGroups", resourceVersion ?? "2021-11-01") + public SyncGroup(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Sql/servers/databases/syncGroups", resourceVersion ?? "2021-11-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _conflictLoggingRetentionInDays = BicepValue.DefineProperty(this, "ConflictLoggingRetentionInDays", ["properties", "conflictLoggingRetentionInDays"]); @@ -159,11 +159,6 @@ public SyncGroup(string identifierName, string? resourceVersion = default) /// public static class ResourceVersions { - /// - /// 2024-05-01-preview. - /// - public static readonly string V2024_05_01_preview = "2024-05-01-preview"; - /// /// 2021-11-01. /// @@ -173,7 +168,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing SyncGroup. /// - /// + /// /// The the Bicep identifier name of the SyncGroup resource. This can be /// used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and @@ -181,8 +176,8 @@ public static class ResourceVersions /// /// Version of the SyncGroup. /// The existing SyncGroup resource. - public static SyncGroup FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static SyncGroup FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; /// /// Get the requirements for naming this SyncGroup resource. diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SyncMember.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SyncMember.cs index 410dd480990b..8f28c06096c4 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SyncMember.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/SyncMember.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.Sql; /// /// SyncMember. /// -public partial class SyncMember : Resource +public partial class SyncMember : ProvisionableResource { /// /// The name of the sync member. @@ -118,15 +118,15 @@ public partial class SyncMember : Resource /// /// Creates a new SyncMember. /// - /// + /// /// The the Bicep identifier name of the SyncMember resource. This can be /// used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and /// underscores. /// /// Version of the SyncMember. - public SyncMember(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Sql/servers/databases/syncGroups/syncMembers", resourceVersion ?? "2021-11-01") + public SyncMember(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Sql/servers/databases/syncGroups/syncMembers", resourceVersion ?? "2021-11-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _databaseName = BicepValue.DefineProperty(this, "DatabaseName", ["properties", "databaseName"]); @@ -151,11 +151,6 @@ public SyncMember(string identifierName, string? resourceVersion = default) /// public static class ResourceVersions { - /// - /// 2024-05-01-preview. - /// - public static readonly string V2024_05_01_preview = "2024-05-01-preview"; - /// /// 2021-11-01. /// @@ -165,7 +160,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing SyncMember. /// - /// + /// /// The the Bicep identifier name of the SyncMember resource. This can be /// used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and @@ -173,6 +168,6 @@ public static class ResourceVersions /// /// Version of the SyncMember. /// The existing SyncMember resource. - public static SyncMember FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static SyncMember FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/WorkloadClassifier.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/WorkloadClassifier.cs index 51abb88a6924..6320bb7c73fe 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/WorkloadClassifier.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/WorkloadClassifier.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.Sql; /// /// WorkloadClassifier. /// -public partial class WorkloadClassifier : Resource +public partial class WorkloadClassifier : ProvisionableResource { /// /// The name of the workload classifier to create/update. @@ -80,15 +80,15 @@ public partial class WorkloadClassifier : Resource /// /// Creates a new WorkloadClassifier. /// - /// + /// /// The the Bicep identifier name of the WorkloadClassifier resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, /// and underscores. /// /// Version of the WorkloadClassifier. - public WorkloadClassifier(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Sql/servers/databases/workloadGroups/workloadClassifiers", resourceVersion ?? "2021-11-01") + public WorkloadClassifier(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Sql/servers/databases/workloadGroups/workloadClassifiers", resourceVersion ?? "2021-11-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _context = BicepValue.DefineProperty(this, "Context", ["properties", "context"]); @@ -107,11 +107,6 @@ public WorkloadClassifier(string identifierName, string? resourceVersion = defau /// public static class ResourceVersions { - /// - /// 2024-05-01-preview. - /// - public static readonly string V2024_05_01_preview = "2024-05-01-preview"; - /// /// 2021-11-01. /// @@ -121,7 +116,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing WorkloadClassifier. /// - /// + /// /// The the Bicep identifier name of the WorkloadClassifier resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, @@ -129,6 +124,6 @@ public static class ResourceVersions /// /// Version of the WorkloadClassifier. /// The existing WorkloadClassifier resource. - public static WorkloadClassifier FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static WorkloadClassifier FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/WorkloadGroup.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/WorkloadGroup.cs index 85fbe3ffdcec..172117ddd4e3 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/WorkloadGroup.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Generated/WorkloadGroup.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.Sql; /// /// WorkloadGroup. /// -public partial class WorkloadGroup : Resource +public partial class WorkloadGroup : ProvisionableResource { /// /// The name of the workload group. @@ -80,15 +80,15 @@ public partial class WorkloadGroup : Resource /// /// Creates a new WorkloadGroup. /// - /// + /// /// The the Bicep identifier name of the WorkloadGroup resource. This can /// be used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and /// underscores. /// /// Version of the WorkloadGroup. - public WorkloadGroup(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Sql/servers/databases/workloadGroups", resourceVersion ?? "2021-11-01") + public WorkloadGroup(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Sql/servers/databases/workloadGroups", resourceVersion ?? "2021-11-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _importance = BicepValue.DefineProperty(this, "Importance", ["properties", "importance"]); @@ -107,11 +107,6 @@ public WorkloadGroup(string identifierName, string? resourceVersion = default) /// public static class ResourceVersions { - /// - /// 2024-05-01-preview. - /// - public static readonly string V2024_05_01_preview = "2024-05-01-preview"; - /// /// 2021-11-01. /// @@ -121,7 +116,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing WorkloadGroup. /// - /// + /// /// The the Bicep identifier name of the WorkloadGroup resource. This can /// be used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and @@ -129,6 +124,6 @@ public static class ResourceVersions /// /// Version of the WorkloadGroup. /// The existing WorkloadGroup resource. - public static WorkloadGroup FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static WorkloadGroup FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/SqlServerAzureADAdministrator.cs b/sdk/provisioning/Azure.Provisioning.Sql/src/SqlServerAzureADAdministrator.cs index 4cf3f5ad7f73..543266619a5e 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/SqlServerAzureADAdministrator.cs +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/SqlServerAzureADAdministrator.cs @@ -9,5 +9,5 @@ namespace Azure.Provisioning.Sql; public partial class SqlServerAzureADAdministrator { private partial BicepValue GetNameDefaultValue() => - new StringLiteral("ActiveDirectory"); + new StringLiteralExpression("ActiveDirectory"); } diff --git a/sdk/provisioning/Azure.Provisioning.Storage/api/Azure.Provisioning.Storage.netstandard2.0.cs b/sdk/provisioning/Azure.Provisioning.Storage/api/Azure.Provisioning.Storage.netstandard2.0.cs index 82f670864800..891b495dfb65 100644 --- a/sdk/provisioning/Azure.Provisioning.Storage/api/Azure.Provisioning.Storage.netstandard2.0.cs +++ b/sdk/provisioning/Azure.Provisioning.Storage/api/Azure.Provisioning.Storage.netstandard2.0.cs @@ -1,14 +1,6 @@ -namespace Azure.Provisioning -{ - public partial class StorageResources - { - public StorageResources() { } - public static Azure.Provisioning.Storage.StorageAccount CreateAccount(string resourceName, int? infrastructureVersion = 2) { throw null; } - } -} namespace Azure.Provisioning.Storage { - public partial class AccountImmutabilityPolicy : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class AccountImmutabilityPolicy : Azure.Provisioning.Primitives.ProvisionableConstruct { public AccountImmutabilityPolicy() { } public Azure.Provisioning.BicepValue AllowProtectedAppendWrites { get { throw null; } set { } } @@ -32,9 +24,9 @@ public enum AllowedCopyScope [System.Runtime.Serialization.DataMemberAttribute(Name="AAD")] Aad = 1, } - public partial class BlobContainer : Azure.Provisioning.Primitives.Resource + public partial class BlobContainer : Azure.Provisioning.Primitives.ProvisionableResource { - public BlobContainer(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public BlobContainer(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue DefaultEncryptionScope { get { throw null; } set { } } public Azure.Provisioning.BicepValue DeletedOn { get { throw null; } } public Azure.Provisioning.BicepValue EnableNfsV3AllSquash { get { throw null; } set { } } @@ -59,7 +51,7 @@ public partial class BlobContainer : Azure.Provisioning.Primitives.Resource public Azure.Provisioning.BicepValue RemainingRetentionDays { get { throw null; } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepValue Version { get { throw null; } } - public static Azure.Provisioning.Storage.BlobContainer FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Storage.BlobContainer FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override Azure.Provisioning.Primitives.ResourceNameRequirements GetResourceNameRequirements() { throw null; } public static partial class ResourceVersions @@ -88,7 +80,7 @@ public static partial class ResourceVersions public static readonly string V2024_01_01; } } - public partial class BlobContainerImmutabilityPolicy : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class BlobContainerImmutabilityPolicy : Azure.Provisioning.Primitives.ProvisionableConstruct { public BlobContainerImmutabilityPolicy() { } public Azure.Provisioning.BicepValue AllowProtectedAppendWrites { get { throw null; } } @@ -98,16 +90,16 @@ public BlobContainerImmutabilityPolicy() { } public Azure.Provisioning.BicepValue State { get { throw null; } } public Azure.Provisioning.BicepList UpdateHistory { get { throw null; } } } - public partial class BlobInventoryPolicy : Azure.Provisioning.Primitives.Resource + public partial class BlobInventoryPolicy : Azure.Provisioning.Primitives.ProvisionableResource { - public BlobInventoryPolicy(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public BlobInventoryPolicy(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue LastModifiedOn { get { throw null; } } public Azure.Provisioning.BicepValue Name { get { throw null; } } public Azure.Provisioning.Storage.StorageAccount? Parent { get { throw null; } set { } } public Azure.Provisioning.BicepValue PolicySchema { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.Storage.BlobInventoryPolicy FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Storage.BlobInventoryPolicy FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2015_06_15; @@ -136,7 +128,7 @@ public static partial class ResourceVersions public static readonly string V2024_01_01; } } - public partial class BlobInventoryPolicyDefinition : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class BlobInventoryPolicyDefinition : Azure.Provisioning.Primitives.ProvisionableConstruct { public BlobInventoryPolicyDefinition() { } public Azure.Provisioning.BicepValue Filters { get { throw null; } set { } } @@ -145,7 +137,7 @@ public BlobInventoryPolicyDefinition() { } public Azure.Provisioning.BicepValue Schedule { get { throw null; } set { } } public Azure.Provisioning.BicepList SchemaFields { get { throw null; } set { } } } - public partial class BlobInventoryPolicyFilter : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class BlobInventoryPolicyFilter : Azure.Provisioning.Primitives.ProvisionableConstruct { public BlobInventoryPolicyFilter() { } public Azure.Provisioning.BicepList BlobTypes { get { throw null; } set { } } @@ -165,7 +157,7 @@ public enum BlobInventoryPolicyObjectType Blob = 0, Container = 1, } - public partial class BlobInventoryPolicyRule : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class BlobInventoryPolicyRule : Azure.Provisioning.Primitives.ProvisionableConstruct { public BlobInventoryPolicyRule() { } public Azure.Provisioning.BicepValue Definition { get { throw null; } set { } } @@ -178,7 +170,7 @@ public enum BlobInventoryPolicySchedule Daily = 0, Weekly = 1, } - public partial class BlobInventoryPolicySchema : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class BlobInventoryPolicySchema : Azure.Provisioning.Primitives.ProvisionableConstruct { public BlobInventoryPolicySchema() { } public Azure.Provisioning.BicepValue Destination { get { throw null; } } @@ -190,7 +182,7 @@ public enum BlobInventoryRuleType { Inventory = 0, } - public partial class BlobRestoreContent : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class BlobRestoreContent : Azure.Provisioning.Primitives.ProvisionableConstruct { public BlobRestoreContent() { } public Azure.Provisioning.BicepList BlobRanges { get { throw null; } set { } } @@ -202,13 +194,13 @@ public enum BlobRestoreProgressStatus Complete = 1, Failed = 2, } - public partial class BlobRestoreRange : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class BlobRestoreRange : Azure.Provisioning.Primitives.ProvisionableConstruct { public BlobRestoreRange() { } public Azure.Provisioning.BicepValue EndRange { get { throw null; } set { } } public Azure.Provisioning.BicepValue StartRange { get { throw null; } set { } } } - public partial class BlobRestoreStatus : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class BlobRestoreStatus : Azure.Provisioning.Primitives.ProvisionableConstruct { public BlobRestoreStatus() { } public Azure.Provisioning.BicepValue FailureReason { get { throw null; } } @@ -216,9 +208,9 @@ public BlobRestoreStatus() { } public Azure.Provisioning.BicepValue RestoreId { get { throw null; } } public Azure.Provisioning.BicepValue Status { get { throw null; } } } - public partial class BlobService : Azure.Provisioning.Primitives.Resource, Azure.Provisioning.Primitives.IClientCreator, Azure.Provisioning.Primitives.IClientCreator + public partial class BlobService : Azure.Provisioning.Primitives.ProvisionableResource { - public BlobService(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public BlobService(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue ChangeFeed { get { throw null; } set { } } public Azure.Provisioning.BicepValue ContainerDeleteRetentionPolicy { get { throw null; } set { } } public Azure.Provisioning.BicepList CorsRules { get { throw null; } set { } } @@ -232,9 +224,7 @@ public partial class BlobService : Azure.Provisioning.Primitives.Resource, Azure public Azure.Provisioning.BicepValue RestorePolicy { get { throw null; } set { } } public Azure.Provisioning.BicepValue Sku { get { throw null; } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - System.Collections.Generic.IEnumerable Azure.Provisioning.Primitives.IClientCreator.GetOutputs() { throw null; } - Azure.Storage.Blobs.BlobServiceClient Azure.Provisioning.Primitives.IClientCreator.CreateClient(System.Collections.Generic.IReadOnlyDictionary deploymentOutputs, Azure.Core.TokenCredential credential, Azure.Storage.Blobs.BlobClientOptions? options) { throw null; } - public static Azure.Provisioning.Storage.BlobService FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Storage.BlobService FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2016_05_01; @@ -261,7 +251,7 @@ public static partial class ResourceVersions public static readonly string V2024_01_01; } } - public partial class BlobServiceChangeFeed : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class BlobServiceChangeFeed : Azure.Provisioning.Primitives.ProvisionableConstruct { public BlobServiceChangeFeed() { } public Azure.Provisioning.BicepValue IsEnabled { get { throw null; } set { } } @@ -286,13 +276,13 @@ public enum CorsRuleAllowedMethod [System.Runtime.Serialization.DataMemberAttribute(Name="PATCH")] Patch = 7, } - public partial class DateAfterCreation : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class DateAfterCreation : Azure.Provisioning.Primitives.ProvisionableConstruct { public DateAfterCreation() { } public Azure.Provisioning.BicepValue DaysAfterCreationGreaterThan { get { throw null; } set { } } public Azure.Provisioning.BicepValue DaysAfterLastTierChangeGreaterThan { get { throw null; } set { } } } - public partial class DateAfterModification : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class DateAfterModification : Azure.Provisioning.Primitives.ProvisionableConstruct { public DateAfterModification() { } public Azure.Provisioning.BicepValue DaysAfterCreationGreaterThan { get { throw null; } set { } } @@ -310,7 +300,7 @@ public enum DefaultSharePermission [System.Runtime.Serialization.DataMemberAttribute(Name="StorageFileDataSmbShareElevatedContributor")] ElevatedContributor = 3, } - public partial class DeleteRetentionPolicy : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class DeleteRetentionPolicy : Azure.Provisioning.Primitives.ProvisionableConstruct { public DeleteRetentionPolicy() { } public Azure.Provisioning.BicepValue AllowPermanentDelete { get { throw null; } set { } } @@ -326,9 +316,9 @@ public enum DirectoryServiceOption [System.Runtime.Serialization.DataMemberAttribute(Name="AADKERB")] Aadkerb = 3, } - public partial class EncryptionScope : Azure.Provisioning.Primitives.Resource + public partial class EncryptionScope : Azure.Provisioning.Primitives.ProvisionableResource { - public EncryptionScope(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public EncryptionScope(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue CreatedOn { get { throw null; } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue KeyVaultProperties { get { throw null; } set { } } @@ -339,7 +329,7 @@ public partial class EncryptionScope : Azure.Provisioning.Primitives.Resource public Azure.Provisioning.BicepValue Source { get { throw null; } set { } } public Azure.Provisioning.BicepValue State { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.Storage.EncryptionScope FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Storage.EncryptionScope FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2019_06_01; @@ -358,7 +348,7 @@ public static partial class ResourceVersions public static readonly string V2024_01_01; } } - public partial class EncryptionScopeKeyVaultProperties : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class EncryptionScopeKeyVaultProperties : Azure.Provisioning.Primitives.ProvisionableConstruct { public EncryptionScopeKeyVaultProperties() { } public Azure.Provisioning.BicepValue CurrentVersionedKeyIdentifier { get { throw null; } } @@ -381,9 +371,9 @@ public enum ExpirationAction { Log = 0, } - public partial class FileService : Azure.Provisioning.Primitives.Resource + public partial class FileService : Azure.Provisioning.Primitives.ProvisionableResource { - public FileService(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public FileService(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepList CorsRules { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.Storage.StorageAccount? Parent { get { throw null; } set { } } @@ -391,7 +381,7 @@ public partial class FileService : Azure.Provisioning.Primitives.Resource public Azure.Provisioning.BicepValue ShareDeleteRetentionPolicy { get { throw null; } set { } } public Azure.Provisioning.BicepValue Sku { get { throw null; } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.Storage.FileService FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Storage.FileService FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2016_05_01; @@ -418,9 +408,9 @@ public static partial class ResourceVersions public static readonly string V2024_01_01; } } - public partial class FileShare : Azure.Provisioning.Primitives.Resource + public partial class FileShare : Azure.Provisioning.Primitives.ProvisionableResource { - public FileShare(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public FileShare(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue AccessTier { get { throw null; } set { } } public Azure.Provisioning.BicepValue AccessTierChangeOn { get { throw null; } } public Azure.Provisioning.BicepValue AccessTierStatus { get { throw null; } } @@ -444,7 +434,7 @@ public partial class FileShare : Azure.Provisioning.Primitives.Resource public Azure.Provisioning.BicepValue SnapshotOn { get { throw null; } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepValue Version { get { throw null; } } - public static Azure.Provisioning.Storage.FileShare FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Storage.FileShare FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override Azure.Provisioning.Primitives.ResourceNameRequirements GetResourceNameRequirements() { throw null; } public static partial class ResourceVersions @@ -487,14 +477,14 @@ public enum FileShareEnabledProtocol [System.Runtime.Serialization.DataMemberAttribute(Name="NFS")] Nfs = 1, } - public partial class FilesIdentityBasedAuthentication : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class FilesIdentityBasedAuthentication : Azure.Provisioning.Primitives.ProvisionableConstruct { public FilesIdentityBasedAuthentication() { } public Azure.Provisioning.BicepValue ActiveDirectoryProperties { get { throw null; } set { } } public Azure.Provisioning.BicepValue DefaultSharePermission { get { throw null; } set { } } public Azure.Provisioning.BicepValue DirectoryServiceOptions { get { throw null; } set { } } } - public partial class GeoReplicationStatistics : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class GeoReplicationStatistics : Azure.Provisioning.Primitives.ProvisionableConstruct { public GeoReplicationStatistics() { } public Azure.Provisioning.BicepValue CanFailover { get { throw null; } } @@ -507,9 +497,9 @@ public enum GeoReplicationStatus Bootstrap = 1, Unavailable = 2, } - public partial class ImmutabilityPolicy : Azure.Provisioning.Primitives.Resource + public partial class ImmutabilityPolicy : Azure.Provisioning.Primitives.ProvisionableResource { - public ImmutabilityPolicy(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public ImmutabilityPolicy(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue AllowProtectedAppendWrites { get { throw null; } set { } } public Azure.Provisioning.BicepValue AllowProtectedAppendWritesAll { get { throw null; } set { } } public Azure.Provisioning.BicepValue ETag { get { throw null; } } @@ -519,7 +509,7 @@ public partial class ImmutabilityPolicy : Azure.Provisioning.Primitives.Resource public Azure.Provisioning.Storage.BlobContainer? Parent { get { throw null; } set { } } public Azure.Provisioning.BicepValue State { get { throw null; } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.Storage.ImmutabilityPolicy FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Storage.ImmutabilityPolicy FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2016_05_01; @@ -560,13 +550,13 @@ public enum ImmutabilityPolicyUpdateType [System.Runtime.Serialization.DataMemberAttribute(Name="extend")] Extend = 2, } - public partial class ImmutableStorageAccount : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ImmutableStorageAccount : Azure.Provisioning.Primitives.ProvisionableConstruct { public ImmutableStorageAccount() { } public Azure.Provisioning.BicepValue ImmutabilityPolicy { get { throw null; } set { } } public Azure.Provisioning.BicepValue IsEnabled { get { throw null; } set { } } } - public partial class ImmutableStorageWithVersioning : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ImmutableStorageWithVersioning : Azure.Provisioning.Primitives.ProvisionableConstruct { public ImmutableStorageWithVersioning() { } public Azure.Provisioning.BicepValue IsEnabled { get { throw null; } set { } } @@ -583,7 +573,7 @@ public enum LargeFileSharesState Disabled = 0, Enabled = 1, } - public partial class LastAccessTimeTrackingPolicy : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class LastAccessTimeTrackingPolicy : Azure.Provisioning.Primitives.ProvisionableConstruct { public LastAccessTimeTrackingPolicy() { } public Azure.Provisioning.BicepList BlobType { get { throw null; } set { } } @@ -595,14 +585,14 @@ public enum LastAccessTimeTrackingPolicyName { AccessTimeTracking = 0, } - public partial class LegalHoldProperties : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class LegalHoldProperties : Azure.Provisioning.Primitives.ProvisionableConstruct { public LegalHoldProperties() { } public Azure.Provisioning.BicepValue HasLegalHold { get { throw null; } } public Azure.Provisioning.BicepValue ProtectedAppendWritesHistory { get { throw null; } } public Azure.Provisioning.BicepList Tags { get { throw null; } } } - public partial class LegalHoldTag : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class LegalHoldTag : Azure.Provisioning.Primitives.ProvisionableConstruct { public LegalHoldTag() { } public Azure.Provisioning.BicepValue ObjectIdentifier { get { throw null; } } @@ -611,22 +601,22 @@ public LegalHoldTag() { } public Azure.Provisioning.BicepValue Timestamp { get { throw null; } } public Azure.Provisioning.BicepValue Upn { get { throw null; } } } - public partial class LocalUserKeys : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class LocalUserKeys : Azure.Provisioning.Primitives.ProvisionableConstruct { public LocalUserKeys() { } public Azure.Provisioning.BicepValue SharedKey { get { throw null; } } public Azure.Provisioning.BicepList SshAuthorizedKeys { get { throw null; } } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public static Azure.Provisioning.Storage.LocalUserKeys FromExpression(Azure.Provisioning.Expressions.Expression expression) { throw null; } + public static Azure.Provisioning.Storage.LocalUserKeys FromExpression(Azure.Provisioning.Expressions.BicepExpression expression) { throw null; } } - public partial class ManagementPolicyAction : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ManagementPolicyAction : Azure.Provisioning.Primitives.ProvisionableConstruct { public ManagementPolicyAction() { } public Azure.Provisioning.BicepValue BaseBlob { get { throw null; } set { } } public Azure.Provisioning.BicepValue Snapshot { get { throw null; } set { } } public Azure.Provisioning.BicepValue Version { get { throw null; } set { } } } - public partial class ManagementPolicyBaseBlob : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ManagementPolicyBaseBlob : Azure.Provisioning.Primitives.ProvisionableConstruct { public ManagementPolicyBaseBlob() { } public Azure.Provisioning.BicepValue Delete { get { throw null; } set { } } @@ -636,20 +626,20 @@ public ManagementPolicyBaseBlob() { } public Azure.Provisioning.BicepValue TierToCool { get { throw null; } set { } } public Azure.Provisioning.BicepValue TierToHot { get { throw null; } set { } } } - public partial class ManagementPolicyDefinition : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ManagementPolicyDefinition : Azure.Provisioning.Primitives.ProvisionableConstruct { public ManagementPolicyDefinition() { } public Azure.Provisioning.BicepValue Actions { get { throw null; } set { } } public Azure.Provisioning.BicepValue Filters { get { throw null; } set { } } } - public partial class ManagementPolicyFilter : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ManagementPolicyFilter : Azure.Provisioning.Primitives.ProvisionableConstruct { public ManagementPolicyFilter() { } public Azure.Provisioning.BicepList BlobIndexMatch { get { throw null; } set { } } public Azure.Provisioning.BicepList BlobTypes { get { throw null; } set { } } public Azure.Provisioning.BicepList PrefixMatch { get { throw null; } set { } } } - public partial class ManagementPolicyRule : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ManagementPolicyRule : Azure.Provisioning.Primitives.ProvisionableConstruct { public ManagementPolicyRule() { } public Azure.Provisioning.BicepValue Definition { get { throw null; } set { } } @@ -661,7 +651,7 @@ public enum ManagementPolicyRuleType { Lifecycle = 0, } - public partial class ManagementPolicySnapShot : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ManagementPolicySnapShot : Azure.Provisioning.Primitives.ProvisionableConstruct { public ManagementPolicySnapShot() { } public Azure.Provisioning.BicepValue Delete { get { throw null; } set { } } @@ -670,14 +660,14 @@ public ManagementPolicySnapShot() { } public Azure.Provisioning.BicepValue TierToCool { get { throw null; } set { } } public Azure.Provisioning.BicepValue TierToHot { get { throw null; } set { } } } - public partial class ManagementPolicyTagFilter : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ManagementPolicyTagFilter : Azure.Provisioning.Primitives.ProvisionableConstruct { public ManagementPolicyTagFilter() { } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } public Azure.Provisioning.BicepValue Operator { get { throw null; } set { } } public Azure.Provisioning.BicepValue Value { get { throw null; } set { } } } - public partial class ManagementPolicyVersion : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ManagementPolicyVersion : Azure.Provisioning.Primitives.ProvisionableConstruct { public ManagementPolicyVersion() { } public Azure.Provisioning.BicepValue Delete { get { throw null; } set { } } @@ -686,9 +676,9 @@ public ManagementPolicyVersion() { } public Azure.Provisioning.BicepValue TierToCool { get { throw null; } set { } } public Azure.Provisioning.BicepValue TierToHot { get { throw null; } set { } } } - public partial class ObjectReplicationPolicy : Azure.Provisioning.Primitives.Resource + public partial class ObjectReplicationPolicy : Azure.Provisioning.Primitives.ProvisionableResource { - public ObjectReplicationPolicy(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public ObjectReplicationPolicy(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue DestinationAccount { get { throw null; } set { } } public Azure.Provisioning.BicepValue EnabledOn { get { throw null; } } public Azure.Provisioning.BicepValue Id { get { throw null; } } @@ -698,7 +688,7 @@ public partial class ObjectReplicationPolicy : Azure.Provisioning.Primitives.Res public Azure.Provisioning.BicepList Rules { get { throw null; } set { } } public Azure.Provisioning.BicepValue SourceAccount { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.Storage.ObjectReplicationPolicy FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Storage.ObjectReplicationPolicy FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2015_06_15; @@ -727,13 +717,13 @@ public static partial class ResourceVersions public static readonly string V2024_01_01; } } - public partial class ObjectReplicationPolicyFilter : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ObjectReplicationPolicyFilter : Azure.Provisioning.Primitives.ProvisionableConstruct { public ObjectReplicationPolicyFilter() { } public Azure.Provisioning.BicepValue MinCreationTime { get { throw null; } set { } } public Azure.Provisioning.BicepList PrefixMatch { get { throw null; } set { } } } - public partial class ObjectReplicationPolicyRule : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ObjectReplicationPolicyRule : Azure.Provisioning.Primitives.ProvisionableConstruct { public ObjectReplicationPolicyRule() { } public Azure.Provisioning.BicepValue DestinationContainer { get { throw null; } set { } } @@ -741,21 +731,21 @@ public ObjectReplicationPolicyRule() { } public Azure.Provisioning.BicepValue RuleId { get { throw null; } set { } } public Azure.Provisioning.BicepValue SourceContainer { get { throw null; } set { } } } - public partial class ProtectedAppendWritesHistory : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ProtectedAppendWritesHistory : Azure.Provisioning.Primitives.ProvisionableConstruct { public ProtectedAppendWritesHistory() { } public Azure.Provisioning.BicepValue AllowProtectedAppendWritesAll { get { throw null; } } public Azure.Provisioning.BicepValue Timestamp { get { throw null; } } } - public partial class QueueService : Azure.Provisioning.Primitives.Resource + public partial class QueueService : Azure.Provisioning.Primitives.ProvisionableResource { - public QueueService(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public QueueService(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepList CorsRules { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Name { get { throw null; } } public Azure.Provisioning.Storage.StorageAccount? Parent { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.Storage.QueueService FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Storage.QueueService FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2016_05_01; @@ -782,7 +772,7 @@ public static partial class ResourceVersions public static readonly string V2024_01_01; } } - public partial class RestorePolicy : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class RestorePolicy : Azure.Provisioning.Primitives.ProvisionableConstruct { public RestorePolicy() { } public Azure.Provisioning.BicepValue Days { get { throw null; } set { } } @@ -796,7 +786,7 @@ public enum RootSquashType RootSquash = 1, AllSquash = 2, } - public partial class SmbSetting : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class SmbSetting : Azure.Provisioning.Primitives.ProvisionableConstruct { public SmbSetting() { } public Azure.Provisioning.BicepValue AuthenticationMethods { get { throw null; } set { } } @@ -805,9 +795,9 @@ public SmbSetting() { } public Azure.Provisioning.BicepValue KerberosTicketEncryption { get { throw null; } set { } } public Azure.Provisioning.BicepValue Versions { get { throw null; } set { } } } - public partial class StorageAccount : Azure.Provisioning.Primitives.Resource + public partial class StorageAccount : Azure.Provisioning.Primitives.ProvisionableResource { - public StorageAccount(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public StorageAccount(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue AccessTier { get { throw null; } set { } } public Azure.Provisioning.BicepValue AllowBlobPublicAccess { get { throw null; } set { } } public Azure.Provisioning.BicepValue AllowCrossTenantReplication { get { throw null; } set { } } @@ -855,9 +845,9 @@ public partial class StorageAccount : Azure.Provisioning.Primitives.Resource public Azure.Provisioning.BicepValue StorageAccountSkuConversionStatus { get { throw null; } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } - public Azure.Provisioning.Authorization.RoleAssignment CreateRoleAssignment(Azure.Provisioning.Storage.StorageBuiltInRole role, Azure.Provisioning.BicepValue principalType, Azure.Provisioning.BicepValue principalId, string? identifierNameSuffix = null) { throw null; } + public Azure.Provisioning.Authorization.RoleAssignment CreateRoleAssignment(Azure.Provisioning.Storage.StorageBuiltInRole role, Azure.Provisioning.BicepValue principalType, Azure.Provisioning.BicepValue principalId, string? bicepIdentifierSuffix = null) { throw null; } public Azure.Provisioning.Authorization.RoleAssignment CreateRoleAssignment(Azure.Provisioning.Storage.StorageBuiltInRole role, Azure.Provisioning.Roles.UserAssignedIdentity identity) { throw null; } - public static Azure.Provisioning.Storage.StorageAccount FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Storage.StorageAccount FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public Azure.Provisioning.BicepList GetKeys() { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override Azure.Provisioning.Primitives.ResourceNameRequirements GetResourceNameRequirements() { throw null; } @@ -895,7 +885,7 @@ public enum StorageAccountAccessTier Cool = 1, Premium = 2, } - public partial class StorageAccountEncryption : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class StorageAccountEncryption : Azure.Provisioning.Primitives.ProvisionableConstruct { public StorageAccountEncryption() { } public Azure.Provisioning.BicepValue EncryptionIdentity { get { throw null; } set { } } @@ -904,13 +894,13 @@ public StorageAccountEncryption() { } public Azure.Provisioning.BicepValue RequireInfrastructureEncryption { get { throw null; } set { } } public Azure.Provisioning.BicepValue Services { get { throw null; } set { } } } - public partial class StorageAccountEncryptionIdentity : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class StorageAccountEncryptionIdentity : Azure.Provisioning.Primitives.ProvisionableConstruct { public StorageAccountEncryptionIdentity() { } public Azure.Provisioning.BicepValue EncryptionFederatedIdentityClientId { get { throw null; } set { } } public Azure.Provisioning.BicepValue EncryptionUserAssignedIdentity { get { throw null; } set { } } } - public partial class StorageAccountEncryptionServices : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class StorageAccountEncryptionServices : Azure.Provisioning.Primitives.ProvisionableConstruct { public StorageAccountEncryptionServices() { } public Azure.Provisioning.BicepValue Blob { get { throw null; } set { } } @@ -918,7 +908,7 @@ public StorageAccountEncryptionServices() { } public Azure.Provisioning.BicepValue Queue { get { throw null; } set { } } public Azure.Provisioning.BicepValue Table { get { throw null; } set { } } } - public partial class StorageAccountEndpoints : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class StorageAccountEndpoints : Azure.Provisioning.Primitives.ProvisionableConstruct { public StorageAccountEndpoints() { } public Azure.Provisioning.BicepValue BlobUri { get { throw null; } } @@ -930,7 +920,7 @@ public StorageAccountEndpoints() { } public Azure.Provisioning.BicepValue TableUri { get { throw null; } } public Azure.Provisioning.BicepValue WebUri { get { throw null; } } } - public partial class StorageAccountInternetEndpoints : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class StorageAccountInternetEndpoints : Azure.Provisioning.Primitives.ProvisionableConstruct { public StorageAccountInternetEndpoints() { } public Azure.Provisioning.BicepValue BlobUri { get { throw null; } } @@ -938,13 +928,13 @@ public StorageAccountInternetEndpoints() { } public Azure.Provisioning.BicepValue FileUri { get { throw null; } } public Azure.Provisioning.BicepValue WebUri { get { throw null; } } } - public partial class StorageAccountIPRule : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class StorageAccountIPRule : Azure.Provisioning.Primitives.ProvisionableConstruct { public StorageAccountIPRule() { } public Azure.Provisioning.BicepValue Action { get { throw null; } set { } } public Azure.Provisioning.BicepValue IPAddressOrRange { get { throw null; } set { } } } - public partial class StorageAccountKey : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class StorageAccountKey : Azure.Provisioning.Primitives.ProvisionableConstruct { public StorageAccountKey() { } public Azure.Provisioning.BicepValue CreatedOn { get { throw null; } } @@ -952,9 +942,9 @@ public StorageAccountKey() { } public Azure.Provisioning.BicepValue Permissions { get { throw null; } } public Azure.Provisioning.BicepValue Value { get { throw null; } } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public static Azure.Provisioning.Storage.StorageAccountKey FromExpression(Azure.Provisioning.Expressions.Expression expression) { throw null; } + public static Azure.Provisioning.Storage.StorageAccountKey FromExpression(Azure.Provisioning.Expressions.BicepExpression expression) { throw null; } } - public partial class StorageAccountKeyCreationTime : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class StorageAccountKeyCreationTime : Azure.Provisioning.Primitives.ProvisionableConstruct { public StorageAccountKeyCreationTime() { } public Azure.Provisioning.BicepValue Key1 { get { throw null; } } @@ -972,7 +962,7 @@ public enum StorageAccountKeySource [System.Runtime.Serialization.DataMemberAttribute(Name="Microsoft.Keyvault")] KeyVault = 1, } - public partial class StorageAccountKeyVaultProperties : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class StorageAccountKeyVaultProperties : Azure.Provisioning.Primitives.ProvisionableConstruct { public StorageAccountKeyVaultProperties() { } public Azure.Provisioning.BicepValue CurrentVersionedKeyExpirationTimestamp { get { throw null; } } @@ -982,9 +972,9 @@ public StorageAccountKeyVaultProperties() { } public Azure.Provisioning.BicepValue KeyVersion { get { throw null; } set { } } public Azure.Provisioning.BicepValue LastKeyRotationTimestamp { get { throw null; } } } - public partial class StorageAccountLocalUser : Azure.Provisioning.Primitives.Resource + public partial class StorageAccountLocalUser : Azure.Provisioning.Primitives.ProvisionableResource { - public StorageAccountLocalUser(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public StorageAccountLocalUser(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue HasSharedKey { get { throw null; } set { } } public Azure.Provisioning.BicepValue HasSshKey { get { throw null; } set { } } public Azure.Provisioning.BicepValue HasSshPassword { get { throw null; } set { } } @@ -996,7 +986,7 @@ public partial class StorageAccountLocalUser : Azure.Provisioning.Primitives.Res public Azure.Provisioning.BicepValue Sid { get { throw null; } } public Azure.Provisioning.BicepList SshAuthorizedKeys { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.Storage.StorageAccountLocalUser FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Storage.StorageAccountLocalUser FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public Azure.Provisioning.Storage.LocalUserKeys GetKeys() { throw null; } public static partial class ResourceVersions { @@ -1026,15 +1016,15 @@ public static partial class ResourceVersions public static readonly string V2024_01_01; } } - public partial class StorageAccountManagementPolicy : Azure.Provisioning.Primitives.Resource + public partial class StorageAccountManagementPolicy : Azure.Provisioning.Primitives.ProvisionableResource { - public StorageAccountManagementPolicy(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public StorageAccountManagementPolicy(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue LastModifiedOn { get { throw null; } } public Azure.Provisioning.Storage.StorageAccount? Parent { get { throw null; } set { } } public Azure.Provisioning.BicepList Rules { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.Storage.StorageAccountManagementPolicy FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Storage.StorageAccountManagementPolicy FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2015_06_15; @@ -1063,7 +1053,7 @@ public static partial class ResourceVersions public static readonly string V2024_01_01; } } - public partial class StorageAccountMicrosoftEndpoints : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class StorageAccountMicrosoftEndpoints : Azure.Provisioning.Primitives.ProvisionableConstruct { public StorageAccountMicrosoftEndpoints() { } public Azure.Provisioning.BicepValue BlobUri { get { throw null; } } @@ -1077,7 +1067,7 @@ public enum StorageAccountNetworkRuleAction { Allow = 0, } - public partial class StorageAccountNetworkRuleSet : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class StorageAccountNetworkRuleSet : Azure.Provisioning.Primitives.ProvisionableConstruct { public StorageAccountNetworkRuleSet() { } public Azure.Provisioning.BicepValue Bypass { get { throw null; } set { } } @@ -1094,13 +1084,13 @@ public enum StorageAccountNetworkRuleState Failed = 3, NetworkSourceDeleted = 4, } - public partial class StorageAccountResourceAccessRule : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class StorageAccountResourceAccessRule : Azure.Provisioning.Primitives.ProvisionableConstruct { public StorageAccountResourceAccessRule() { } public Azure.Provisioning.BicepValue ResourceId { get { throw null; } set { } } public Azure.Provisioning.BicepValue TenantId { get { throw null; } set { } } } - public partial class StorageAccountSasPolicy : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class StorageAccountSasPolicy : Azure.Provisioning.Primitives.ProvisionableConstruct { public StorageAccountSasPolicy() { } public Azure.Provisioning.BicepValue ExpirationAction { get { throw null; } set { } } @@ -1112,7 +1102,7 @@ public enum StorageAccountSkuConversionState Succeeded = 1, Failed = 2, } - public partial class StorageAccountSkuConversionStatus : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class StorageAccountSkuConversionStatus : Azure.Provisioning.Primitives.ProvisionableConstruct { public StorageAccountSkuConversionStatus() { } public Azure.Provisioning.BicepValue EndOn { get { throw null; } } @@ -1127,14 +1117,14 @@ public enum StorageAccountStatus [System.Runtime.Serialization.DataMemberAttribute(Name="unavailable")] Unavailable = 1, } - public partial class StorageAccountVirtualNetworkRule : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class StorageAccountVirtualNetworkRule : Azure.Provisioning.Primitives.ProvisionableConstruct { public StorageAccountVirtualNetworkRule() { } public Azure.Provisioning.BicepValue Action { get { throw null; } set { } } public Azure.Provisioning.BicepValue State { get { throw null; } set { } } public Azure.Provisioning.BicepValue VirtualNetworkResourceId { get { throw null; } set { } } } - public partial class StorageActiveDirectoryProperties : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class StorageActiveDirectoryProperties : Azure.Provisioning.Primitives.ProvisionableConstruct { public StorageActiveDirectoryProperties() { } public Azure.Provisioning.BicepValue AccountType { get { throw null; } set { } } @@ -1184,7 +1174,7 @@ public StorageActiveDirectoryProperties() { } public static bool operator !=(Azure.Provisioning.Storage.StorageBuiltInRole left, Azure.Provisioning.Storage.StorageBuiltInRole right) { throw null; } public override string ToString() { throw null; } } - public partial class StorageCorsRule : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class StorageCorsRule : Azure.Provisioning.Primitives.ProvisionableConstruct { public StorageCorsRule() { } public Azure.Provisioning.BicepList AllowedHeaders { get { throw null; } set { } } @@ -1193,7 +1183,7 @@ public StorageCorsRule() { } public Azure.Provisioning.BicepList ExposedHeaders { get { throw null; } set { } } public Azure.Provisioning.BicepValue MaxAgeInSeconds { get { throw null; } set { } } } - public partial class StorageCustomDomain : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class StorageCustomDomain : Azure.Provisioning.Primitives.ProvisionableConstruct { public StorageCustomDomain() { } public Azure.Provisioning.BicepValue IsUseSubDomainNameEnabled { get { throw null; } set { } } @@ -1209,7 +1199,7 @@ public enum StorageEncryptionKeyType Service = 0, Account = 1, } - public partial class StorageEncryptionService : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class StorageEncryptionService : Azure.Provisioning.Primitives.ProvisionableConstruct { public StorageEncryptionService() { } public Azure.Provisioning.BicepValue IsEnabled { get { throw null; } set { } } @@ -1263,16 +1253,16 @@ public enum StorageNetworkDefaultAction Allow = 0, Deny = 1, } - public partial class StoragePermissionScope : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class StoragePermissionScope : Azure.Provisioning.Primitives.ProvisionableConstruct { public StoragePermissionScope() { } public Azure.Provisioning.BicepValue Permissions { get { throw null; } set { } } public Azure.Provisioning.BicepValue ResourceName { get { throw null; } set { } } public Azure.Provisioning.BicepValue Service { get { throw null; } set { } } } - public partial class StoragePrivateEndpointConnection : Azure.Provisioning.Primitives.Resource + public partial class StoragePrivateEndpointConnection : Azure.Provisioning.Primitives.ProvisionableResource { - public StoragePrivateEndpointConnection(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public StoragePrivateEndpointConnection(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue ConnectionState { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } @@ -1280,7 +1270,7 @@ public partial class StoragePrivateEndpointConnection : Azure.Provisioning.Primi public Azure.Provisioning.BicepValue PrivateEndpointId { get { throw null; } } public Azure.Provisioning.BicepValue ProvisioningState { get { throw null; } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.Storage.StoragePrivateEndpointConnection FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Storage.StoragePrivateEndpointConnection FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2015_06_15; @@ -1309,7 +1299,7 @@ public static partial class ResourceVersions public static readonly string V2024_01_01; } } - public partial class StoragePrivateEndpointConnectionData : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class StoragePrivateEndpointConnectionData : Azure.Provisioning.Primitives.ProvisionableConstruct { public StoragePrivateEndpointConnectionData() { } public Azure.Provisioning.BicepValue ConnectionState { get { throw null; } set { } } @@ -1332,7 +1322,7 @@ public enum StoragePrivateEndpointServiceConnectionStatus Approved = 1, Rejected = 2, } - public partial class StoragePrivateLinkServiceConnectionState : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class StoragePrivateLinkServiceConnectionState : Azure.Provisioning.Primitives.ProvisionableConstruct { public StoragePrivateLinkServiceConnectionState() { } public Azure.Provisioning.BicepValue ActionRequired { get { throw null; } set { } } @@ -1357,16 +1347,16 @@ public enum StoragePublicNetworkAccess Enabled = 0, Disabled = 1, } - public partial class StorageQueue : Azure.Provisioning.Primitives.Resource + public partial class StorageQueue : Azure.Provisioning.Primitives.ProvisionableResource { - public StorageQueue(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public StorageQueue(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue ApproximateMessageCount { get { throw null; } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepDictionary Metadata { get { throw null; } set { } } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } public Azure.Provisioning.Storage.QueueService? Parent { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.Storage.StorageQueue FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Storage.StorageQueue FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override Azure.Provisioning.Primitives.ResourceNameRequirements GetResourceNameRequirements() { throw null; } public static partial class ResourceVersions @@ -1400,27 +1390,27 @@ public enum StorageRoutingChoice MicrosoftRouting = 0, InternetRouting = 1, } - public partial class StorageRoutingPreference : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class StorageRoutingPreference : Azure.Provisioning.Primitives.ProvisionableConstruct { public StorageRoutingPreference() { } public Azure.Provisioning.BicepValue IsInternetEndpointsPublished { get { throw null; } set { } } public Azure.Provisioning.BicepValue IsMicrosoftEndpointsPublished { get { throw null; } set { } } public Azure.Provisioning.BicepValue RoutingChoice { get { throw null; } set { } } } - public partial class StorageServiceAccessPolicy : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class StorageServiceAccessPolicy : Azure.Provisioning.Primitives.ProvisionableConstruct { public StorageServiceAccessPolicy() { } public Azure.Provisioning.BicepValue ExpireOn { get { throw null; } set { } } public Azure.Provisioning.BicepValue Permission { get { throw null; } set { } } public Azure.Provisioning.BicepValue StartOn { get { throw null; } set { } } } - public partial class StorageSignedIdentifier : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class StorageSignedIdentifier : Azure.Provisioning.Primitives.ProvisionableConstruct { public StorageSignedIdentifier() { } public Azure.Provisioning.BicepValue AccessPolicy { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } set { } } } - public partial class StorageSku : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class StorageSku : Azure.Provisioning.Primitives.ProvisionableConstruct { public StorageSku() { } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } @@ -1450,22 +1440,22 @@ public enum StorageSkuTier Standard = 0, Premium = 1, } - public partial class StorageSshPublicKey : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class StorageSshPublicKey : Azure.Provisioning.Primitives.ProvisionableConstruct { public StorageSshPublicKey() { } public Azure.Provisioning.BicepValue Description { get { throw null; } set { } } public Azure.Provisioning.BicepValue Key { get { throw null; } set { } } } - public partial class StorageTable : Azure.Provisioning.Primitives.Resource + public partial class StorageTable : Azure.Provisioning.Primitives.ProvisionableResource { - public StorageTable(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public StorageTable(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } public Azure.Provisioning.Storage.TableService? Parent { get { throw null; } set { } } public Azure.Provisioning.BicepList SignedIdentifiers { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepValue TableName { get { throw null; } } - public static Azure.Provisioning.Storage.StorageTable FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Storage.StorageTable FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override Azure.Provisioning.Primitives.ResourceNameRequirements GetResourceNameRequirements() { throw null; } public static partial class ResourceVersions @@ -1494,28 +1484,28 @@ public static partial class ResourceVersions public static readonly string V2024_01_01; } } - public partial class StorageTableAccessPolicy : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class StorageTableAccessPolicy : Azure.Provisioning.Primitives.ProvisionableConstruct { public StorageTableAccessPolicy() { } public Azure.Provisioning.BicepValue ExpireOn { get { throw null; } set { } } public Azure.Provisioning.BicepValue Permission { get { throw null; } set { } } public Azure.Provisioning.BicepValue StartOn { get { throw null; } set { } } } - public partial class StorageTableSignedIdentifier : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class StorageTableSignedIdentifier : Azure.Provisioning.Primitives.ProvisionableConstruct { public StorageTableSignedIdentifier() { } public Azure.Provisioning.BicepValue AccessPolicy { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } set { } } } - public partial class TableService : Azure.Provisioning.Primitives.Resource + public partial class TableService : Azure.Provisioning.Primitives.ProvisionableResource { - public TableService(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public TableService(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepList CorsRules { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Name { get { throw null; } } public Azure.Provisioning.Storage.StorageAccount? Parent { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.Storage.TableService FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Storage.TableService FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2016_05_01; @@ -1542,7 +1532,7 @@ public static partial class ResourceVersions public static readonly string V2024_01_01; } } - public partial class UpdateHistoryEntry : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class UpdateHistoryEntry : Azure.Provisioning.Primitives.ProvisionableConstruct { public UpdateHistoryEntry() { } public Azure.Provisioning.BicepValue AllowProtectedAppendWrites { get { throw null; } } diff --git a/sdk/provisioning/Azure.Provisioning.Storage/src/BlobService.cs b/sdk/provisioning/Azure.Provisioning.Storage/src/BlobService.cs index 128e90328662..38cf275dc5cf 100644 --- a/sdk/provisioning/Azure.Provisioning.Storage/src/BlobService.cs +++ b/sdk/provisioning/Azure.Provisioning.Storage/src/BlobService.cs @@ -13,18 +13,21 @@ namespace Azure.Provisioning.Storage; // Customize the generated BlobService resource. public partial class BlobService +#if EXPERIMENTAL_PROVISIONING : IClientCreator +#endif { /// /// Get the default value for the Name property. /// private partial BicepValue GetNameDefaultValue() => - new StringLiteral("default"); + new StringLiteralExpression("default"); +#if EXPERIMENTAL_PROVISIONING /// IEnumerable IClientCreator.GetOutputs() { - yield return new ProvisioningOutput($"{IdentifierName}_endpoint", typeof(string)) + yield return new ProvisioningOutput($"{BicepIdentifier}_endpoint", typeof(string)) { Value = Parent!.PrimaryEndpoints.Value!.BlobUri }; @@ -50,10 +53,11 @@ BlobServiceClient IClientCreator.CreateCli BlobClientOptions? options) { // TODO: Move into a shared helper off ProvCtx's namescoping - string qualifiedName = $"{IdentifierName}_endpoint"; + string qualifiedName = $"{BicepIdentifier}_endpoint"; string endpoint = (deploymentOutputs.TryGetValue(qualifiedName, out object? raw) && raw is string value) ? value : - throw new InvalidOperationException($"Could not find output value {qualifiedName} to construct {GetType().Name} resource {IdentifierName}."); + throw new InvalidOperationException($"Could not find output value {qualifiedName} to construct {GetType().Name} resource {BicepIdentifier}."); return new BlobServiceClient(new Uri(endpoint), credential, options); } +#endif } diff --git a/sdk/provisioning/Azure.Provisioning.Storage/src/FileService.cs b/sdk/provisioning/Azure.Provisioning.Storage/src/FileService.cs index 36eaea0396f8..3fcba1f1ff44 100644 --- a/sdk/provisioning/Azure.Provisioning.Storage/src/FileService.cs +++ b/sdk/provisioning/Azure.Provisioning.Storage/src/FileService.cs @@ -12,5 +12,5 @@ public partial class FileService /// Get the default value for the Name property. /// private partial BicepValue GetNameDefaultValue() => - new StringLiteral("default"); + new StringLiteralExpression("default"); } diff --git a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/BlobContainer.cs b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/BlobContainer.cs index e5a55dfa1370..b203ea9a7716 100644 --- a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/BlobContainer.cs +++ b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/BlobContainer.cs @@ -18,7 +18,7 @@ namespace Azure.Provisioning.Storage; /// /// BlobContainer. /// -public partial class BlobContainer : Resource +public partial class BlobContainer : ProvisionableResource { /// /// The name of the blob container within the specified storage account. @@ -182,15 +182,15 @@ public partial class BlobContainer : Resource /// /// Creates a new BlobContainer. /// - /// + /// /// The the Bicep identifier name of the BlobContainer resource. This can /// be used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and /// underscores. /// /// Version of the BlobContainer. - public BlobContainer(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Storage/storageAccounts/blobServices/containers", resourceVersion ?? "2024-01-01") + public BlobContainer(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Storage/storageAccounts/blobServices/containers", resourceVersion ?? "2024-01-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _defaultEncryptionScope = BicepValue.DefineProperty(this, "DefaultEncryptionScope", ["properties", "defaultEncryptionScope"]); @@ -337,7 +337,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing BlobContainer. /// - /// + /// /// The the Bicep identifier name of the BlobContainer resource. This can /// be used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and @@ -345,8 +345,8 @@ public static class ResourceVersions /// /// Version of the BlobContainer. /// The existing BlobContainer resource. - public static BlobContainer FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static BlobContainer FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; /// /// Get the requirements for naming this BlobContainer resource. diff --git a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/BlobInventoryPolicy.cs b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/BlobInventoryPolicy.cs index 1ed0bd8889b3..341ff666eac4 100644 --- a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/BlobInventoryPolicy.cs +++ b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/BlobInventoryPolicy.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.Storage; /// /// BlobInventoryPolicy. /// -public partial class BlobInventoryPolicy : Resource +public partial class BlobInventoryPolicy : ProvisionableResource { /// /// Gets the Name. @@ -58,15 +58,15 @@ public partial class BlobInventoryPolicy : Resource /// /// Creates a new BlobInventoryPolicy. /// - /// + /// /// The the Bicep identifier name of the BlobInventoryPolicy resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, /// numbers, and underscores. /// /// Version of the BlobInventoryPolicy. - public BlobInventoryPolicy(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Storage/storageAccounts/inventoryPolicies", resourceVersion ?? "2024-01-01") + public BlobInventoryPolicy(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Storage/storageAccounts/inventoryPolicies", resourceVersion ?? "2024-01-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _policySchema = BicepValue.DefineProperty(this, "PolicySchema", ["properties", "policy"]); @@ -205,7 +205,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing BlobInventoryPolicy. /// - /// + /// /// The the Bicep identifier name of the BlobInventoryPolicy resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, @@ -213,6 +213,6 @@ public static class ResourceVersions /// /// Version of the BlobInventoryPolicy. /// The existing BlobInventoryPolicy resource. - public static BlobInventoryPolicy FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static BlobInventoryPolicy FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/BlobService.cs b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/BlobService.cs index 852c72ee3fde..4d9992916b8a 100644 --- a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/BlobService.cs +++ b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/BlobService.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.Storage; /// /// BlobService. /// -public partial class BlobService : Resource +public partial class BlobService : ProvisionableResource { private readonly BicepValue _name; @@ -111,15 +111,15 @@ public partial class BlobService : Resource /// /// Creates a new BlobService. /// - /// + /// /// The the Bicep identifier name of the BlobService resource. This can be /// used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and /// underscores. /// /// Version of the BlobService. - public BlobService(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Storage/storageAccounts/blobServices", resourceVersion ?? "2024-01-01") + public BlobService(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Storage/storageAccounts/blobServices", resourceVersion ?? "2024-01-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], defaultValue: GetNameDefaultValue()); _changeFeed = BicepValue.DefineProperty(this, "ChangeFeed", ["properties", "changeFeed"]); @@ -256,7 +256,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing BlobService. /// - /// + /// /// The the Bicep identifier name of the BlobService resource. This can be /// used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and @@ -264,6 +264,6 @@ public static class ResourceVersions /// /// Version of the BlobService. /// The existing BlobService resource. - public static BlobService FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static BlobService FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/EncryptionScope.cs b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/EncryptionScope.cs index 07c633e484ad..b9c2535e4acc 100644 --- a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/EncryptionScope.cs +++ b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/EncryptionScope.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.Storage; /// /// EncryptionScope. /// -public partial class EncryptionScope : Resource +public partial class EncryptionScope : ProvisionableResource { /// /// The name of the encryption scope within the specified storage account. @@ -89,15 +89,15 @@ public partial class EncryptionScope : Resource /// /// Creates a new EncryptionScope. /// - /// + /// /// The the Bicep identifier name of the EncryptionScope resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, /// and underscores. /// /// Version of the EncryptionScope. - public EncryptionScope(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Storage/storageAccounts/encryptionScopes", resourceVersion ?? "2024-01-01") + public EncryptionScope(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Storage/storageAccounts/encryptionScopes", resourceVersion ?? "2024-01-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _keyVaultProperties = BicepValue.DefineProperty(this, "KeyVaultProperties", ["properties", "keyVaultProperties"]); @@ -190,7 +190,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing EncryptionScope. /// - /// + /// /// The the Bicep identifier name of the EncryptionScope resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, @@ -198,6 +198,6 @@ public static class ResourceVersions /// /// Version of the EncryptionScope. /// The existing EncryptionScope resource. - public static EncryptionScope FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static EncryptionScope FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/FileService.cs b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/FileService.cs index ce0893c0be3f..e7f2563c7ff9 100644 --- a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/FileService.cs +++ b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/FileService.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.Storage; /// /// FileService. /// -public partial class FileService : Resource +public partial class FileService : ProvisionableResource { private readonly BicepValue _name; @@ -71,15 +71,15 @@ public partial class FileService : Resource /// /// Creates a new FileService. /// - /// + /// /// The the Bicep identifier name of the FileService resource. This can be /// used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and /// underscores. /// /// Version of the FileService. - public FileService(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Storage/storageAccounts/fileServices", resourceVersion ?? "2024-01-01") + public FileService(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Storage/storageAccounts/fileServices", resourceVersion ?? "2024-01-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], defaultValue: GetNameDefaultValue()); _corsRules = BicepList.DefineProperty(this, "CorsRules", ["properties", "cors", "corsRules"]); @@ -210,7 +210,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing FileService. /// - /// + /// /// The the Bicep identifier name of the FileService resource. This can be /// used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and @@ -218,6 +218,6 @@ public static class ResourceVersions /// /// Version of the FileService. /// The existing FileService resource. - public static FileService FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static FileService FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/FileShare.cs b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/FileShare.cs index ff3331473a18..c2854c466ad8 100644 --- a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/FileShare.cs +++ b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/FileShare.cs @@ -18,7 +18,7 @@ namespace Azure.Provisioning.Storage; /// /// FileShare. /// -public partial class FileShare : Resource +public partial class FileShare : ProvisionableResource { /// /// The name of the file share within the specified storage account. File @@ -173,15 +173,15 @@ public partial class FileShare : Resource /// /// Creates a new FileShare. /// - /// + /// /// The the Bicep identifier name of the FileShare resource. This can be /// used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and /// underscores. /// /// Version of the FileShare. - public FileShare(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Storage/storageAccounts/fileServices/shares", resourceVersion ?? "2024-01-01") + public FileShare(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Storage/storageAccounts/fileServices/shares", resourceVersion ?? "2024-01-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _accessTier = BicepValue.DefineProperty(this, "AccessTier", ["properties", "accessTier"]); @@ -327,7 +327,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing FileShare. /// - /// + /// /// The the Bicep identifier name of the FileShare resource. This can be /// used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and @@ -335,8 +335,8 @@ public static class ResourceVersions /// /// Version of the FileShare. /// The existing FileShare resource. - public static FileShare FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static FileShare FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; /// /// Get the requirements for naming this FileShare resource. diff --git a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/ImmutabilityPolicy.cs b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/ImmutabilityPolicy.cs index 8fd02907b021..647087dc18e2 100644 --- a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/ImmutabilityPolicy.cs +++ b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/ImmutabilityPolicy.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.Storage; /// /// ImmutabilityPolicy. /// -public partial class ImmutabilityPolicy : Resource +public partial class ImmutabilityPolicy : ProvisionableResource { /// /// Gets the Name. @@ -90,15 +90,15 @@ public partial class ImmutabilityPolicy : Resource /// /// Creates a new ImmutabilityPolicy. /// - /// + /// /// The the Bicep identifier name of the ImmutabilityPolicy resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, /// and underscores. /// /// Version of the ImmutabilityPolicy. - public ImmutabilityPolicy(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Storage/storageAccounts/blobServices/containers/immutabilityPolicies", resourceVersion ?? "2024-01-01") + public ImmutabilityPolicy(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Storage/storageAccounts/blobServices/containers/immutabilityPolicies", resourceVersion ?? "2024-01-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _allowProtectedAppendWrites = BicepValue.DefineProperty(this, "AllowProtectedAppendWrites", ["properties", "allowProtectedAppendWrites"]); @@ -230,7 +230,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing ImmutabilityPolicy. /// - /// + /// /// The the Bicep identifier name of the ImmutabilityPolicy resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, @@ -238,6 +238,6 @@ public static class ResourceVersions /// /// Version of the ImmutabilityPolicy. /// The existing ImmutabilityPolicy resource. - public static ImmutabilityPolicy FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static ImmutabilityPolicy FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/AccountImmutabilityPolicy.cs b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/AccountImmutabilityPolicy.cs index 64309f554b41..927c1660368f 100644 --- a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/AccountImmutabilityPolicy.cs +++ b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/AccountImmutabilityPolicy.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.Storage; /// /// This defines account-level immutability policy properties. /// -public partial class AccountImmutabilityPolicy : ProvisioningConstruct +public partial class AccountImmutabilityPolicy : ProvisionableConstruct { /// /// The immutability period for the blobs in the container since the policy diff --git a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/BlobContainerImmutabilityPolicy.cs b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/BlobContainerImmutabilityPolicy.cs index 9b54331fb13b..e55da356e5c0 100644 --- a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/BlobContainerImmutabilityPolicy.cs +++ b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/BlobContainerImmutabilityPolicy.cs @@ -13,7 +13,7 @@ namespace Azure.Provisioning.Storage; /// /// The properties of an ImmutabilityPolicy of a blob container. /// -public partial class BlobContainerImmutabilityPolicy : ProvisioningConstruct +public partial class BlobContainerImmutabilityPolicy : ProvisionableConstruct { /// /// ImmutabilityPolicy Etag. diff --git a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/BlobInventoryPolicyDefinition.cs b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/BlobInventoryPolicyDefinition.cs index 8f65c4a73309..c96799e73a3e 100644 --- a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/BlobInventoryPolicyDefinition.cs +++ b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/BlobInventoryPolicyDefinition.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.Storage; /// /// An object that defines the blob inventory rule. /// -public partial class BlobInventoryPolicyDefinition : ProvisioningConstruct +public partial class BlobInventoryPolicyDefinition : ProvisionableConstruct { /// /// An object that defines the filter set. diff --git a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/BlobInventoryPolicyFilter.cs b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/BlobInventoryPolicyFilter.cs index e0d2d225abf8..59bdf5903118 100644 --- a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/BlobInventoryPolicyFilter.cs +++ b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/BlobInventoryPolicyFilter.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.Storage; /// 'Container' definition.objectType only prefixMatch is applicable /// and is optional. /// -public partial class BlobInventoryPolicyFilter : ProvisioningConstruct +public partial class BlobInventoryPolicyFilter : ProvisionableConstruct { /// /// An array of strings with maximum 10 blob prefixes to be included in the diff --git a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/BlobInventoryPolicyRule.cs b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/BlobInventoryPolicyRule.cs index 8e9575e0cd63..401df7515fe2 100644 --- a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/BlobInventoryPolicyRule.cs +++ b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/BlobInventoryPolicyRule.cs @@ -13,7 +13,7 @@ namespace Azure.Provisioning.Storage; /// An object that wraps the blob inventory rule. Each rule is uniquely defined /// by name. /// -public partial class BlobInventoryPolicyRule : ProvisioningConstruct +public partial class BlobInventoryPolicyRule : ProvisionableConstruct { /// /// Rule is enabled when set to true. diff --git a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/BlobInventoryPolicySchema.cs b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/BlobInventoryPolicySchema.cs index 7fb5360fd450..f3a40dbbb769 100644 --- a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/BlobInventoryPolicySchema.cs +++ b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/BlobInventoryPolicySchema.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.Storage; /// /// The storage account blob inventory policy rules. /// -public partial class BlobInventoryPolicySchema : ProvisioningConstruct +public partial class BlobInventoryPolicySchema : ProvisionableConstruct { /// /// Policy is enabled if set to true. diff --git a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/BlobRestoreContent.cs b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/BlobRestoreContent.cs index cc34bad9c9c9..75394cdafe77 100644 --- a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/BlobRestoreContent.cs +++ b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/BlobRestoreContent.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.Storage; /// /// Blob restore parameters. /// -public partial class BlobRestoreContent : ProvisioningConstruct +public partial class BlobRestoreContent : ProvisionableConstruct { /// /// Restore blob to the specified time. diff --git a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/BlobRestoreRange.cs b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/BlobRestoreRange.cs index 20899135961f..f618bcebf36d 100644 --- a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/BlobRestoreRange.cs +++ b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/BlobRestoreRange.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.Storage; /// /// Blob range. /// -public partial class BlobRestoreRange : ProvisioningConstruct +public partial class BlobRestoreRange : ProvisionableConstruct { /// /// Blob start range. This is inclusive. Empty means account start. diff --git a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/BlobRestoreStatus.cs b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/BlobRestoreStatus.cs index 618fac2f37e7..2020c7d5b69d 100644 --- a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/BlobRestoreStatus.cs +++ b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/BlobRestoreStatus.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.Storage; /// /// Blob restore status. /// -public partial class BlobRestoreStatus : ProvisioningConstruct +public partial class BlobRestoreStatus : ProvisionableConstruct { /// /// The status of blob restore progress. Possible values are: - InProgress: diff --git a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/BlobServiceChangeFeed.cs b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/BlobServiceChangeFeed.cs index 35baaa148e85..fd03fa317913 100644 --- a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/BlobServiceChangeFeed.cs +++ b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/BlobServiceChangeFeed.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.Storage; /// /// The blob service properties for change feed events. /// -public partial class BlobServiceChangeFeed : ProvisioningConstruct +public partial class BlobServiceChangeFeed : ProvisionableConstruct { /// /// Indicates whether change feed event logging is enabled for the Blob diff --git a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/DateAfterCreation.cs b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/DateAfterCreation.cs index 3d04ee4845d6..bcccec0457fd 100644 --- a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/DateAfterCreation.cs +++ b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/DateAfterCreation.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.Storage; /// /// Object to define snapshot and version action conditions. /// -public partial class DateAfterCreation : ProvisioningConstruct +public partial class DateAfterCreation : ProvisionableConstruct { /// /// Value indicating the age in days after creation. diff --git a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/DateAfterModification.cs b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/DateAfterModification.cs index 97e0b599aad5..2e57a221fdb8 100644 --- a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/DateAfterModification.cs +++ b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/DateAfterModification.cs @@ -17,7 +17,7 @@ namespace Azure.Provisioning.Storage; /// be set, also it cannot be used in conjunction with /// daysAfterLastAccessTimeGreaterThan or daysAfterCreationGreaterThan. /// -public partial class DateAfterModification : ProvisioningConstruct +public partial class DateAfterModification : ProvisionableConstruct { /// /// Value indicating the age in days after last modification. diff --git a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/DeleteRetentionPolicy.cs b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/DeleteRetentionPolicy.cs index 03a318caf078..f6522796bd52 100644 --- a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/DeleteRetentionPolicy.cs +++ b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/DeleteRetentionPolicy.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.Storage; /// /// The service properties for soft delete. /// -public partial class DeleteRetentionPolicy : ProvisioningConstruct +public partial class DeleteRetentionPolicy : ProvisionableConstruct { /// /// Indicates whether DeleteRetentionPolicy is enabled. diff --git a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/EncryptionScopeKeyVaultProperties.cs b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/EncryptionScopeKeyVaultProperties.cs index 8d7042097aab..05ff33f139c9 100644 --- a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/EncryptionScopeKeyVaultProperties.cs +++ b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/EncryptionScopeKeyVaultProperties.cs @@ -13,7 +13,7 @@ namespace Azure.Provisioning.Storage; /// if encryption scope 'source' attribute is set to /// 'Microsoft.KeyVault'. /// -public partial class EncryptionScopeKeyVaultProperties : ProvisioningConstruct +public partial class EncryptionScopeKeyVaultProperties : ProvisionableConstruct { /// /// The object identifier for a key vault key object. When applied, the diff --git a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/FilesIdentityBasedAuthentication.cs b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/FilesIdentityBasedAuthentication.cs index 13a406aa4868..87d8c143cf30 100644 --- a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/FilesIdentityBasedAuthentication.cs +++ b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/FilesIdentityBasedAuthentication.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.Storage; /// /// Settings for Azure Files identity based authentication. /// -public partial class FilesIdentityBasedAuthentication : ProvisioningConstruct +public partial class FilesIdentityBasedAuthentication : ProvisionableConstruct { /// /// Indicates the directory service used. Note that this enum may be diff --git a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/GeoReplicationStatistics.cs b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/GeoReplicationStatistics.cs index 1e914f9b7c2e..293d0d05f2c3 100644 --- a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/GeoReplicationStatistics.cs +++ b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/GeoReplicationStatistics.cs @@ -13,7 +13,7 @@ namespace Azure.Provisioning.Storage; /// Queue and File services. It is only available when geo-redundant /// replication is enabled for the storage account. /// -public partial class GeoReplicationStatistics : ProvisioningConstruct +public partial class GeoReplicationStatistics : ProvisionableConstruct { /// /// The status of the secondary location. Possible values are: - Live: diff --git a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/ImmutableStorageAccount.cs b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/ImmutableStorageAccount.cs index bb13399f9e3f..3a8d4ee68f66 100644 --- a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/ImmutableStorageAccount.cs +++ b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/ImmutableStorageAccount.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.Storage; /// This property enables and defines account-level immutability. Enabling the /// feature auto-enables Blob Versioning. /// -public partial class ImmutableStorageAccount : ProvisioningConstruct +public partial class ImmutableStorageAccount : ProvisionableConstruct { /// /// A boolean flag which enables account-level immutability. All the diff --git a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/ImmutableStorageWithVersioning.cs b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/ImmutableStorageWithVersioning.cs index 129e13d063ed..0f546faff9bc 100644 --- a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/ImmutableStorageWithVersioning.cs +++ b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/ImmutableStorageWithVersioning.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.Storage; /// /// Object level immutability properties of the container. /// -public partial class ImmutableStorageWithVersioning : ProvisioningConstruct +public partial class ImmutableStorageWithVersioning : ProvisionableConstruct { /// /// This is an immutable property, when set to true it enables object level diff --git a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/LastAccessTimeTrackingPolicy.cs b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/LastAccessTimeTrackingPolicy.cs index bf26b5975186..9e2f509cc2d0 100644 --- a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/LastAccessTimeTrackingPolicy.cs +++ b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/LastAccessTimeTrackingPolicy.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.Storage; /// /// The blob service properties for Last access time based tracking policy. /// -public partial class LastAccessTimeTrackingPolicy : ProvisioningConstruct +public partial class LastAccessTimeTrackingPolicy : ProvisionableConstruct { /// /// When set to true last access time based tracking is enabled. diff --git a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/LegalHoldProperties.cs b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/LegalHoldProperties.cs index 88d4a95655a8..e089a7a33b8b 100644 --- a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/LegalHoldProperties.cs +++ b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/LegalHoldProperties.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.Storage; /// /// The LegalHold property of a blob container. /// -public partial class LegalHoldProperties : ProvisioningConstruct +public partial class LegalHoldProperties : ProvisionableConstruct { /// /// The hasLegalHold public property is set to true by SRP if there are at diff --git a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/LegalHoldTag.cs b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/LegalHoldTag.cs index befbb768728b..a6fe407fb62d 100644 --- a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/LegalHoldTag.cs +++ b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/LegalHoldTag.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.Storage; /// /// A tag of the LegalHold of a blob container. /// -public partial class LegalHoldTag : ProvisioningConstruct +public partial class LegalHoldTag : ProvisionableConstruct { /// /// The tag value. diff --git a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/LocalUserKeys.cs b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/LocalUserKeys.cs index ff302df37b82..94fe4a0bcafa 100644 --- a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/LocalUserKeys.cs +++ b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/LocalUserKeys.cs @@ -14,7 +14,7 @@ namespace Azure.Provisioning.Storage; /// /// The Storage Account Local User keys. /// -public partial class LocalUserKeys : ProvisioningConstruct +public partial class LocalUserKeys : ProvisionableConstruct { /// /// Optional, local user ssh authorized keys for SFTP. @@ -46,7 +46,7 @@ public LocalUserKeys() /// /// A LocalUserKeys resource. [EditorBrowsable(EditorBrowsableState.Never)] - public static LocalUserKeys FromExpression(Expression expression) + public static LocalUserKeys FromExpression(BicepExpression expression) { LocalUserKeys resource = new(); resource.OverrideWithExpression(expression); diff --git a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/ManagementPolicyAction.cs b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/ManagementPolicyAction.cs index 746e88f53e83..d7cae8ba85c1 100644 --- a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/ManagementPolicyAction.cs +++ b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/ManagementPolicyAction.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.Storage; /// Actions are applied to the filtered blobs when the execution condition is /// met. /// -public partial class ManagementPolicyAction : ProvisioningConstruct +public partial class ManagementPolicyAction : ProvisionableConstruct { /// /// The management policy action for base blob. diff --git a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/ManagementPolicyBaseBlob.cs b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/ManagementPolicyBaseBlob.cs index 2ee32974c145..ccc1734b2825 100644 --- a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/ManagementPolicyBaseBlob.cs +++ b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/ManagementPolicyBaseBlob.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.Storage; /// /// Management policy action for base blob. /// -public partial class ManagementPolicyBaseBlob : ProvisioningConstruct +public partial class ManagementPolicyBaseBlob : ProvisionableConstruct { /// /// The function to tier blobs to cool storage. diff --git a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/ManagementPolicyDefinition.cs b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/ManagementPolicyDefinition.cs index d27ebd5f1812..43a5bc2099f7 100644 --- a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/ManagementPolicyDefinition.cs +++ b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/ManagementPolicyDefinition.cs @@ -13,7 +13,7 @@ namespace Azure.Provisioning.Storage; /// An object that defines the Lifecycle rule. Each definition is made up with /// a filters set and an actions set. /// -public partial class ManagementPolicyDefinition : ProvisioningConstruct +public partial class ManagementPolicyDefinition : ProvisionableConstruct { /// /// An object that defines the action set. diff --git a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/ManagementPolicyFilter.cs b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/ManagementPolicyFilter.cs index 9b828d565574..cac3cfc68587 100644 --- a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/ManagementPolicyFilter.cs +++ b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/ManagementPolicyFilter.cs @@ -13,7 +13,7 @@ namespace Azure.Provisioning.Storage; /// Filters limit rule actions to a subset of blobs within the storage account. /// If multiple filters are defined, a logical AND is performed on all filters. /// -public partial class ManagementPolicyFilter : ProvisioningConstruct +public partial class ManagementPolicyFilter : ProvisionableConstruct { /// /// An array of strings for prefixes to be match. diff --git a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/ManagementPolicyRule.cs b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/ManagementPolicyRule.cs index dd9d81d4604e..6ac06b77d0cf 100644 --- a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/ManagementPolicyRule.cs +++ b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/ManagementPolicyRule.cs @@ -13,7 +13,7 @@ namespace Azure.Provisioning.Storage; /// An object that wraps the Lifecycle rule. Each rule is uniquely defined by /// name. /// -public partial class ManagementPolicyRule : ProvisioningConstruct +public partial class ManagementPolicyRule : ProvisionableConstruct { /// /// Rule is enabled if set to true. diff --git a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/ManagementPolicySnapShot.cs b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/ManagementPolicySnapShot.cs index cdda0dc800c2..697f861e80c2 100644 --- a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/ManagementPolicySnapShot.cs +++ b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/ManagementPolicySnapShot.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.Storage; /// /// Management policy action for snapshot. /// -public partial class ManagementPolicySnapShot : ProvisioningConstruct +public partial class ManagementPolicySnapShot : ProvisionableConstruct { /// /// The function to tier blob snapshot to cool storage. diff --git a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/ManagementPolicyTagFilter.cs b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/ManagementPolicyTagFilter.cs index cc8804c8bbe2..029f425f0462 100644 --- a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/ManagementPolicyTagFilter.cs +++ b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/ManagementPolicyTagFilter.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.Storage; /// /// Blob index tag based filtering for blob objects. /// -public partial class ManagementPolicyTagFilter : ProvisioningConstruct +public partial class ManagementPolicyTagFilter : ProvisionableConstruct { /// /// This is the filter tag name, it can have 1 - 128 characters. diff --git a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/ManagementPolicyVersion.cs b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/ManagementPolicyVersion.cs index cad9f64993c5..fc7773a5a84d 100644 --- a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/ManagementPolicyVersion.cs +++ b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/ManagementPolicyVersion.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.Storage; /// /// Management policy action for blob version. /// -public partial class ManagementPolicyVersion : ProvisioningConstruct +public partial class ManagementPolicyVersion : ProvisionableConstruct { /// /// The function to tier blob version to cool storage. diff --git a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/ObjectReplicationPolicyFilter.cs b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/ObjectReplicationPolicyFilter.cs index 5d2cffddc1ba..146e6fe949c5 100644 --- a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/ObjectReplicationPolicyFilter.cs +++ b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/ObjectReplicationPolicyFilter.cs @@ -14,7 +14,7 @@ namespace Azure.Provisioning.Storage; /// A logical OR is performed on values in the filter. If multiple filters are /// defined, a logical AND is performed on all filters. /// -public partial class ObjectReplicationPolicyFilter : ProvisioningConstruct +public partial class ObjectReplicationPolicyFilter : ProvisionableConstruct { /// /// Optional. Filters the results to replicate only blobs whose names begin diff --git a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/ObjectReplicationPolicyRule.cs b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/ObjectReplicationPolicyRule.cs index bc3adcbc191b..679f8b667238 100644 --- a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/ObjectReplicationPolicyRule.cs +++ b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/ObjectReplicationPolicyRule.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.Storage; /// /// The replication policy rule between two containers. /// -public partial class ObjectReplicationPolicyRule : ProvisioningConstruct +public partial class ObjectReplicationPolicyRule : ProvisionableConstruct { /// /// Rule Id is auto-generated for each new rule on destination account. It diff --git a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/ProtectedAppendWritesHistory.cs b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/ProtectedAppendWritesHistory.cs index f5bfdcfc796a..86745b701818 100644 --- a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/ProtectedAppendWritesHistory.cs +++ b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/ProtectedAppendWritesHistory.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.Storage; /// Protected append writes history setting for the blob container with Legal /// holds. /// -public partial class ProtectedAppendWritesHistory : ProvisioningConstruct +public partial class ProtectedAppendWritesHistory : ProvisionableConstruct { /// /// When enabled, new blocks can be written to both 'Append and Bock diff --git a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/RestorePolicy.cs b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/RestorePolicy.cs index 1862805fb1d3..1b41578e8dc2 100644 --- a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/RestorePolicy.cs +++ b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/RestorePolicy.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.Storage; /// /// The blob service properties for blob restore policy. /// -public partial class RestorePolicy : ProvisioningConstruct +public partial class RestorePolicy : ProvisionableConstruct { /// /// Blob restore is enabled if set to true. diff --git a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/SmbSetting.cs b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/SmbSetting.cs index b07f52a65c5a..a089df1ff4fe 100644 --- a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/SmbSetting.cs +++ b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/SmbSetting.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.Storage; /// /// Setting for SMB protocol. /// -public partial class SmbSetting : ProvisioningConstruct +public partial class SmbSetting : ProvisionableConstruct { /// /// Indicates whether multichannel is enabled. diff --git a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageAccountEncryption.cs b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageAccountEncryption.cs index 50cbc19da6e9..3e45a6bb81b4 100644 --- a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageAccountEncryption.cs +++ b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageAccountEncryption.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.Storage; /// /// The encryption settings on the storage account. /// -public partial class StorageAccountEncryption : ProvisioningConstruct +public partial class StorageAccountEncryption : ProvisionableConstruct { /// /// List of services which support encryption. diff --git a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageAccountEncryptionIdentity.cs b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageAccountEncryptionIdentity.cs index 930427679551..42a370abe834 100644 --- a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageAccountEncryptionIdentity.cs +++ b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageAccountEncryptionIdentity.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.Storage; /// /// Encryption identity for the storage account. /// -public partial class StorageAccountEncryptionIdentity : ProvisioningConstruct +public partial class StorageAccountEncryptionIdentity : ProvisionableConstruct { /// /// Resource identifier of the UserAssigned identity to be associated with diff --git a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageAccountEncryptionServices.cs b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageAccountEncryptionServices.cs index 02a009d044b8..1ff2ebe0aead 100644 --- a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageAccountEncryptionServices.cs +++ b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageAccountEncryptionServices.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.Storage; /// /// A list of services that support encryption. /// -public partial class StorageAccountEncryptionServices : ProvisioningConstruct +public partial class StorageAccountEncryptionServices : ProvisionableConstruct { /// /// The encryption function of the blob storage service. diff --git a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageAccountEndpoints.cs b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageAccountEndpoints.cs index 3ba27a9f1658..7ce5dc26e349 100644 --- a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageAccountEndpoints.cs +++ b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageAccountEndpoints.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.Storage; /// The URIs that are used to perform a retrieval of a public blob, queue, /// table, web or dfs object. /// -public partial class StorageAccountEndpoints : ProvisioningConstruct +public partial class StorageAccountEndpoints : ProvisionableConstruct { /// /// Gets the blob endpoint. diff --git a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageAccountIPRule.cs b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageAccountIPRule.cs index 08fc7ae880b7..ad5d10ac8d56 100644 --- a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageAccountIPRule.cs +++ b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageAccountIPRule.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.Storage; /// /// IP rule with specific IP or IP range in CIDR format. /// -public partial class StorageAccountIPRule : ProvisioningConstruct +public partial class StorageAccountIPRule : ProvisionableConstruct { /// /// Specifies the IP or IP range in CIDR format. Only IPV4 address is diff --git a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageAccountInternetEndpoints.cs b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageAccountInternetEndpoints.cs index 1e9e9ab9d62b..818cd24cc93e 100644 --- a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageAccountInternetEndpoints.cs +++ b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageAccountInternetEndpoints.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.Storage; /// The URIs that are used to perform a retrieval of a public blob, file, web /// or dfs object via a internet routing endpoint. /// -public partial class StorageAccountInternetEndpoints : ProvisioningConstruct +public partial class StorageAccountInternetEndpoints : ProvisionableConstruct { /// /// Gets the blob endpoint. diff --git a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageAccountKey.cs b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageAccountKey.cs index 3b208eb3dac9..edbb277128fb 100644 --- a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageAccountKey.cs +++ b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageAccountKey.cs @@ -13,7 +13,7 @@ namespace Azure.Provisioning.Storage; /// /// An access key for the storage account. /// -public partial class StorageAccountKey : ProvisioningConstruct +public partial class StorageAccountKey : ProvisionableConstruct { /// /// Name of the key. @@ -59,7 +59,7 @@ public StorageAccountKey() /// /// A StorageAccountKey resource. [EditorBrowsable(EditorBrowsableState.Never)] - public static StorageAccountKey FromExpression(Expression expression) + public static StorageAccountKey FromExpression(BicepExpression expression) { StorageAccountKey resource = new(); resource.OverrideWithExpression(expression); diff --git a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageAccountKeyCreationTime.cs b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageAccountKeyCreationTime.cs index 9008f72fbd3d..e557f1e6fdf9 100644 --- a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageAccountKeyCreationTime.cs +++ b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageAccountKeyCreationTime.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.Storage; /// /// Storage account keys creation time. /// -public partial class StorageAccountKeyCreationTime : ProvisioningConstruct +public partial class StorageAccountKeyCreationTime : ProvisionableConstruct { /// /// Gets the key 1. diff --git a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageAccountKeyVaultProperties.cs b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageAccountKeyVaultProperties.cs index 366d0fd74b18..60dc94dcf9bc 100644 --- a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageAccountKeyVaultProperties.cs +++ b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageAccountKeyVaultProperties.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.Storage; /// /// Properties of key vault. /// -public partial class StorageAccountKeyVaultProperties : ProvisioningConstruct +public partial class StorageAccountKeyVaultProperties : ProvisionableConstruct { /// /// The name of KeyVault key. diff --git a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageAccountMicrosoftEndpoints.cs b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageAccountMicrosoftEndpoints.cs index de8334894216..25543fb55e7a 100644 --- a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageAccountMicrosoftEndpoints.cs +++ b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageAccountMicrosoftEndpoints.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.Storage; /// The URIs that are used to perform a retrieval of a public blob, queue, /// table, web or dfs object via a microsoft routing endpoint. /// -public partial class StorageAccountMicrosoftEndpoints : ProvisioningConstruct +public partial class StorageAccountMicrosoftEndpoints : ProvisionableConstruct { /// /// Gets the blob endpoint. diff --git a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageAccountNetworkRuleSet.cs b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageAccountNetworkRuleSet.cs index e1ce6eca4904..7e1252909152 100644 --- a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageAccountNetworkRuleSet.cs +++ b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageAccountNetworkRuleSet.cs @@ -13,7 +13,7 @@ namespace Azure.Provisioning.Storage; /// /// Network rule set. /// -public partial class StorageAccountNetworkRuleSet : ProvisioningConstruct +public partial class StorageAccountNetworkRuleSet : ProvisionableConstruct { /// /// Specifies whether traffic is bypassed for diff --git a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageAccountResourceAccessRule.cs b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageAccountResourceAccessRule.cs index 5da45c85bb77..af5e54be046f 100644 --- a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageAccountResourceAccessRule.cs +++ b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageAccountResourceAccessRule.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.Storage; /// /// Resource Access Rule. /// -public partial class StorageAccountResourceAccessRule : ProvisioningConstruct +public partial class StorageAccountResourceAccessRule : ProvisionableConstruct { /// /// Tenant Id. diff --git a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageAccountSasPolicy.cs b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageAccountSasPolicy.cs index b97276a70741..69b56f9cd4e0 100644 --- a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageAccountSasPolicy.cs +++ b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageAccountSasPolicy.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.Storage; /// /// SasPolicy assigned to the storage account. /// -public partial class StorageAccountSasPolicy : ProvisioningConstruct +public partial class StorageAccountSasPolicy : ProvisionableConstruct { /// /// The SAS expiration period, DD.HH:MM:SS. diff --git a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageAccountSkuConversionStatus.cs b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageAccountSkuConversionStatus.cs index 633f57b746a6..00bd3e2558f2 100644 --- a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageAccountSkuConversionStatus.cs +++ b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageAccountSkuConversionStatus.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.Storage; /// This defines the sku conversion status object for asynchronous sku /// conversions. /// -public partial class StorageAccountSkuConversionStatus : ProvisioningConstruct +public partial class StorageAccountSkuConversionStatus : ProvisionableConstruct { /// /// This property indicates the current sku conversion status. diff --git a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageAccountVirtualNetworkRule.cs b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageAccountVirtualNetworkRule.cs index 6e4eebce4941..88d430e45699 100644 --- a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageAccountVirtualNetworkRule.cs +++ b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageAccountVirtualNetworkRule.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.Storage; /// /// Virtual Network rule. /// -public partial class StorageAccountVirtualNetworkRule : ProvisioningConstruct +public partial class StorageAccountVirtualNetworkRule : ProvisionableConstruct { /// /// Resource ID of a subnet, for example: diff --git a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageActiveDirectoryProperties.cs b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageActiveDirectoryProperties.cs index 18a9c3555895..a87d82cea58a 100644 --- a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageActiveDirectoryProperties.cs +++ b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageActiveDirectoryProperties.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.Storage; /// /// Settings properties for Active Directory (AD). /// -public partial class StorageActiveDirectoryProperties : ProvisioningConstruct +public partial class StorageActiveDirectoryProperties : ProvisionableConstruct { /// /// Specifies the primary domain that the AD DNS server is authoritative diff --git a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageCorsRule.cs b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageCorsRule.cs index 9f8e8f0b9225..bef720ff28a5 100644 --- a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageCorsRule.cs +++ b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageCorsRule.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.Storage; /// /// Specifies a CORS rule for the Blob service. /// -public partial class StorageCorsRule : ProvisioningConstruct +public partial class StorageCorsRule : ProvisionableConstruct { /// /// Required if CorsRule element is present. A list of origin domains that diff --git a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageCustomDomain.cs b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageCustomDomain.cs index c2f45dae7299..fd80656469d4 100644 --- a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageCustomDomain.cs +++ b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageCustomDomain.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.Storage; /// The custom domain assigned to this storage account. This can be set via /// Update. /// -public partial class StorageCustomDomain : ProvisioningConstruct +public partial class StorageCustomDomain : ProvisionableConstruct { /// /// Gets or sets the custom domain name assigned to the storage account. diff --git a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageEncryptionService.cs b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageEncryptionService.cs index 1dc0554e5741..9c0a4c69de3c 100644 --- a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageEncryptionService.cs +++ b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageEncryptionService.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.Storage; /// /// A service that allows server-side encryption to be used. /// -public partial class StorageEncryptionService : ProvisioningConstruct +public partial class StorageEncryptionService : ProvisionableConstruct { /// /// A boolean indicating whether or not the service encrypts the data as it diff --git a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StoragePermissionScope.cs b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StoragePermissionScope.cs index cd5d1275741a..922c55cb6669 100644 --- a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StoragePermissionScope.cs +++ b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StoragePermissionScope.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.Storage; /// /// The StoragePermissionScope. /// -public partial class StoragePermissionScope : ProvisioningConstruct +public partial class StoragePermissionScope : ProvisionableConstruct { /// /// The permissions for the local user. Possible values include: Read (r), diff --git a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StoragePrivateEndpointConnectionData.cs b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StoragePrivateEndpointConnectionData.cs index 2d0c05600431..6ad269ec460d 100644 --- a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StoragePrivateEndpointConnectionData.cs +++ b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StoragePrivateEndpointConnectionData.cs @@ -14,7 +14,7 @@ namespace Azure.Provisioning.Storage; /// A class representing the StoragePrivateEndpointConnection data model. /// The Private Endpoint Connection resource. /// -public partial class StoragePrivateEndpointConnectionData : ProvisioningConstruct +public partial class StoragePrivateEndpointConnectionData : ProvisionableConstruct { /// /// Gets Id. diff --git a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StoragePrivateLinkServiceConnectionState.cs b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StoragePrivateLinkServiceConnectionState.cs index bc66a9e356f6..dd7e207ca624 100644 --- a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StoragePrivateLinkServiceConnectionState.cs +++ b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StoragePrivateLinkServiceConnectionState.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.Storage; /// A collection of information about the state of the connection between /// service consumer and provider. /// -public partial class StoragePrivateLinkServiceConnectionState : ProvisioningConstruct +public partial class StoragePrivateLinkServiceConnectionState : ProvisionableConstruct { /// /// Indicates whether the connection has been Approved/Rejected/Removed by diff --git a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageRoutingPreference.cs b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageRoutingPreference.cs index 624b23e8bc1f..bee99b8f66cd 100644 --- a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageRoutingPreference.cs +++ b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageRoutingPreference.cs @@ -13,7 +13,7 @@ namespace Azure.Provisioning.Storage; /// internet routing to be used to deliver the user data, the default option /// is microsoft routing. /// -public partial class StorageRoutingPreference : ProvisioningConstruct +public partial class StorageRoutingPreference : ProvisionableConstruct { /// /// Routing Choice defines the kind of network routing opted by the user. diff --git a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageServiceAccessPolicy.cs b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageServiceAccessPolicy.cs index fb16952cec17..dd23a2d5ad2c 100644 --- a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageServiceAccessPolicy.cs +++ b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageServiceAccessPolicy.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.Storage; /// /// The StorageServiceAccessPolicy. /// -public partial class StorageServiceAccessPolicy : ProvisioningConstruct +public partial class StorageServiceAccessPolicy : ProvisionableConstruct { /// /// Start time of the access policy. diff --git a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageSignedIdentifier.cs b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageSignedIdentifier.cs index 0eb588fc2eda..05b22aeb3301 100644 --- a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageSignedIdentifier.cs +++ b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageSignedIdentifier.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.Storage; /// /// The StorageSignedIdentifier. /// -public partial class StorageSignedIdentifier : ProvisioningConstruct +public partial class StorageSignedIdentifier : ProvisionableConstruct { /// /// An unique identifier of the stored access policy. diff --git a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageSku.cs b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageSku.cs index fb06b4dd43a1..72f7c7a4ee98 100644 --- a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageSku.cs +++ b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageSku.cs @@ -10,7 +10,7 @@ namespace Azure.Provisioning.Storage; /// /// The SKU of the storage account. /// -public partial class StorageSku : ProvisioningConstruct +public partial class StorageSku : ProvisionableConstruct { /// /// The SKU name. Required for account creation; optional for update. Note diff --git a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageSshPublicKey.cs b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageSshPublicKey.cs index c6b8576fa3e0..446bc7ee7298 100644 --- a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageSshPublicKey.cs +++ b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageSshPublicKey.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.Storage; /// /// The StorageSshPublicKey. /// -public partial class StorageSshPublicKey : ProvisioningConstruct +public partial class StorageSshPublicKey : ProvisionableConstruct { /// /// Optional. It is used to store the function/usage of the key. diff --git a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageTableAccessPolicy.cs b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageTableAccessPolicy.cs index d0694955d86d..50788eb40841 100644 --- a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageTableAccessPolicy.cs +++ b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageTableAccessPolicy.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.Storage; /// /// Table Access Policy Properties Object. /// -public partial class StorageTableAccessPolicy : ProvisioningConstruct +public partial class StorageTableAccessPolicy : ProvisionableConstruct { /// /// Start time of the access policy. diff --git a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageTableSignedIdentifier.cs b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageTableSignedIdentifier.cs index 66c1cb794544..93db1d7055e2 100644 --- a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageTableSignedIdentifier.cs +++ b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageTableSignedIdentifier.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.Storage; /// /// Object to set Table Access Policy. /// -public partial class StorageTableSignedIdentifier : ProvisioningConstruct +public partial class StorageTableSignedIdentifier : ProvisionableConstruct { /// /// unique-64-character-value of the stored access policy. diff --git a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/UpdateHistoryEntry.cs b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/UpdateHistoryEntry.cs index 7c852bb1ed02..7eb68c21da56 100644 --- a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/UpdateHistoryEntry.cs +++ b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/UpdateHistoryEntry.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.Storage; /// /// An update history of the ImmutabilityPolicy of a blob container. /// -public partial class UpdateHistoryEntry : ProvisioningConstruct +public partial class UpdateHistoryEntry : ProvisionableConstruct { /// /// The ImmutabilityPolicy update type of a blob container, possible values diff --git a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/ObjectReplicationPolicy.cs b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/ObjectReplicationPolicy.cs index 73c949b4c93a..5a850db13a55 100644 --- a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/ObjectReplicationPolicy.cs +++ b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/ObjectReplicationPolicy.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.Storage; /// /// ObjectReplicationPolicy. /// -public partial class ObjectReplicationPolicy : Resource +public partial class ObjectReplicationPolicy : ProvisionableResource { /// /// Gets the Name. @@ -77,15 +77,15 @@ public partial class ObjectReplicationPolicy : Resource /// /// Creates a new ObjectReplicationPolicy. /// - /// + /// /// The the Bicep identifier name of the ObjectReplicationPolicy resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, /// numbers, and underscores. /// /// Version of the ObjectReplicationPolicy. - public ObjectReplicationPolicy(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Storage/storageAccounts/objectReplicationPolicies", resourceVersion ?? "2024-01-01") + public ObjectReplicationPolicy(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Storage/storageAccounts/objectReplicationPolicies", resourceVersion ?? "2024-01-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _destinationAccount = BicepValue.DefineProperty(this, "DestinationAccount", ["properties", "destinationAccount"]); @@ -227,7 +227,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing ObjectReplicationPolicy. /// - /// + /// /// The the Bicep identifier name of the ObjectReplicationPolicy resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, @@ -235,6 +235,6 @@ public static class ResourceVersions /// /// Version of the ObjectReplicationPolicy. /// The existing ObjectReplicationPolicy resource. - public static ObjectReplicationPolicy FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static ObjectReplicationPolicy FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/QueueService.cs b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/QueueService.cs index cd661082df51..d01f4445c7dc 100644 --- a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/QueueService.cs +++ b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/QueueService.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.Storage; /// /// QueueService. /// -public partial class QueueService : Resource +public partial class QueueService : ProvisionableResource { /// /// Gets the Name. @@ -52,15 +52,15 @@ public partial class QueueService : Resource /// /// Creates a new QueueService. /// - /// + /// /// The the Bicep identifier name of the QueueService resource. This can /// be used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and /// underscores. /// /// Version of the QueueService. - public QueueService(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Storage/storageAccounts/queueServices", resourceVersion ?? "2024-01-01") + public QueueService(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Storage/storageAccounts/queueServices", resourceVersion ?? "2024-01-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _corsRules = BicepList.DefineProperty(this, "CorsRules", ["properties", "cors", "corsRules"]); @@ -188,7 +188,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing QueueService. /// - /// + /// /// The the Bicep identifier name of the QueueService resource. This can /// be used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and @@ -196,6 +196,6 @@ public static class ResourceVersions /// /// Version of the QueueService. /// The existing QueueService resource. - public static QueueService FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static QueueService FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/StorageAccount.cs b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/StorageAccount.cs index e3e389a77725..38bd96cecb8c 100644 --- a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/StorageAccount.cs +++ b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/StorageAccount.cs @@ -20,7 +20,7 @@ namespace Azure.Provisioning.Storage; /// /// StorageAccount. /// -public partial class StorageAccount : Resource +public partial class StorageAccount : ProvisionableResource { /// /// The name of the storage account within the specified resource group. @@ -361,15 +361,15 @@ public partial class StorageAccount : Resource /// /// Creates a new StorageAccount. /// - /// + /// /// The the Bicep identifier name of the StorageAccount resource. This can /// be used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and /// underscores. /// /// Version of the StorageAccount. - public StorageAccount(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Storage/storageAccounts", resourceVersion ?? "2024-01-01") + public StorageAccount(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Storage/storageAccounts", resourceVersion ?? "2024-01-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _kind = BicepValue.DefineProperty(this, "Kind", ["kind"], isRequired: true); @@ -549,7 +549,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing StorageAccount. /// - /// + /// /// The the Bicep identifier name of the StorageAccount resource. This can /// be used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and @@ -557,8 +557,8 @@ public static class ResourceVersions /// /// Version of the StorageAccount. /// The existing StorageAccount resource. - public static StorageAccount FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static StorageAccount FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; /// /// Get the requirements for naming this StorageAccount resource. @@ -575,7 +575,7 @@ public override ResourceNameRequirements GetResourceNameRequirements() => public BicepList GetKeys() => BicepList.FromExpression( StorageAccountKey.FromExpression, - new MemberExpression(new FunctionCallExpression(new MemberExpression(new IdentifierExpression(IdentifierName), "listKeys")), "keys")); + new MemberExpression(new FunctionCallExpression(new MemberExpression(new IdentifierExpression(BicepIdentifier), "listKeys")), "keys")); /// /// Creates a role assignment for a user-assigned identity that grants @@ -585,10 +585,10 @@ public BicepList GetKeys() => /// The . /// The . public RoleAssignment CreateRoleAssignment(StorageBuiltInRole role, UserAssignedIdentity identity) => - new($"{IdentifierName}_{identity.IdentifierName}_{StorageBuiltInRole.GetBuiltInRoleName(role)}") + new($"{BicepIdentifier}_{identity.BicepIdentifier}_{StorageBuiltInRole.GetBuiltInRoleName(role)}") { Name = BicepFunction.CreateGuid(Id, identity.PrincipalId, BicepFunction.GetSubscriptionResourceId("Microsoft.Authorization/roleDefinitions", role.ToString())), - Scope = new IdentifierExpression(IdentifierName), + Scope = new IdentifierExpression(BicepIdentifier), PrincipalType = RoleManagementPrincipalType.ServicePrincipal, RoleDefinitionId = BicepFunction.GetSubscriptionResourceId("Microsoft.Authorization/roleDefinitions", role.ToString()), PrincipalId = identity.PrincipalId @@ -601,13 +601,13 @@ public RoleAssignment CreateRoleAssignment(StorageBuiltInRole role, UserAssigned /// The role to grant. /// The type of the principal to assign to. /// The principal to assign to. - /// Optional role assignment identifier name suffix. + /// Optional role assignment identifier name suffix. /// The . - public RoleAssignment CreateRoleAssignment(StorageBuiltInRole role, BicepValue principalType, BicepValue principalId, string? identifierNameSuffix = default) => - new($"{IdentifierName}_{StorageBuiltInRole.GetBuiltInRoleName(role)}{(identifierNameSuffix is null ? "" : "_")}{identifierNameSuffix}") + public RoleAssignment CreateRoleAssignment(StorageBuiltInRole role, BicepValue principalType, BicepValue principalId, string? bicepIdentifierSuffix = default) => + new($"{BicepIdentifier}_{StorageBuiltInRole.GetBuiltInRoleName(role)}{(bicepIdentifierSuffix is null ? "" : "_")}{bicepIdentifierSuffix}") { Name = BicepFunction.CreateGuid(Id, principalId, BicepFunction.GetSubscriptionResourceId("Microsoft.Authorization/roleDefinitions", role.ToString())), - Scope = new IdentifierExpression(IdentifierName), + Scope = new IdentifierExpression(BicepIdentifier), PrincipalType = principalType, RoleDefinitionId = BicepFunction.GetSubscriptionResourceId("Microsoft.Authorization/roleDefinitions", role.ToString()), PrincipalId = principalId diff --git a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/StorageAccountLocalUser.cs b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/StorageAccountLocalUser.cs index fc32d9f92eaf..4c300ab033a5 100644 --- a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/StorageAccountLocalUser.cs +++ b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/StorageAccountLocalUser.cs @@ -18,7 +18,7 @@ namespace Azure.Provisioning.Storage; /// /// StorageAccountLocalUser. /// -public partial class StorageAccountLocalUser : Resource +public partial class StorageAccountLocalUser : ProvisionableResource { /// /// The name of local user. The username must contain lowercase letters and @@ -93,15 +93,15 @@ public partial class StorageAccountLocalUser : Resource /// /// Creates a new StorageAccountLocalUser. /// - /// + /// /// The the Bicep identifier name of the StorageAccountLocalUser resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, /// numbers, and underscores. /// /// Version of the StorageAccountLocalUser. - public StorageAccountLocalUser(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Storage/storageAccounts/localUsers", resourceVersion ?? "2024-01-01") + public StorageAccountLocalUser(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Storage/storageAccounts/localUsers", resourceVersion ?? "2024-01-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _hasSharedKey = BicepValue.DefineProperty(this, "HasSharedKey", ["properties", "hasSharedKey"]); @@ -245,7 +245,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing StorageAccountLocalUser. /// - /// + /// /// The the Bicep identifier name of the StorageAccountLocalUser resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, @@ -253,8 +253,8 @@ public static class ResourceVersions /// /// Version of the StorageAccountLocalUser. /// The existing StorageAccountLocalUser resource. - public static StorageAccountLocalUser FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static StorageAccountLocalUser FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; /// /// Get access keys for this StorageAccountLocalUser resource. @@ -262,5 +262,5 @@ public static StorageAccountLocalUser FromExisting(string identifierName, string /// The keys for this StorageAccountLocalUser resource. public LocalUserKeys GetKeys() => LocalUserKeys.FromExpression( - new FunctionCallExpression(new MemberExpression(new IdentifierExpression(IdentifierName), "listKeys"))); + new FunctionCallExpression(new MemberExpression(new IdentifierExpression(BicepIdentifier), "listKeys"))); } diff --git a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/StorageAccountManagementPolicy.cs b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/StorageAccountManagementPolicy.cs index 516109ee55ed..ccf4499a3247 100644 --- a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/StorageAccountManagementPolicy.cs +++ b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/StorageAccountManagementPolicy.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.Storage; /// /// StorageAccountManagementPolicy. /// -public partial class StorageAccountManagementPolicy : Resource +public partial class StorageAccountManagementPolicy : ProvisionableResource { private readonly BicepValue _name; @@ -59,15 +59,15 @@ public partial class StorageAccountManagementPolicy : Resource /// /// Creates a new StorageAccountManagementPolicy. /// - /// + /// /// The the Bicep identifier name of the StorageAccountManagementPolicy /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the StorageAccountManagementPolicy. - public StorageAccountManagementPolicy(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Storage/storageAccounts/managementPolicies", resourceVersion ?? "2024-01-01") + public StorageAccountManagementPolicy(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Storage/storageAccounts/managementPolicies", resourceVersion ?? "2024-01-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], defaultValue: GetNameDefaultValue()); _rules = BicepList.DefineProperty(this, "Rules", ["properties", "policy", "rules"]); @@ -206,7 +206,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing StorageAccountManagementPolicy. /// - /// + /// /// The the Bicep identifier name of the StorageAccountManagementPolicy /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -214,6 +214,6 @@ public static class ResourceVersions /// /// Version of the StorageAccountManagementPolicy. /// The existing StorageAccountManagementPolicy resource. - public static StorageAccountManagementPolicy FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static StorageAccountManagementPolicy FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/StoragePrivateEndpointConnection.cs b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/StoragePrivateEndpointConnection.cs index 2ddfe7b333b2..2f61f4a96f87 100644 --- a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/StoragePrivateEndpointConnection.cs +++ b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/StoragePrivateEndpointConnection.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.Storage; /// /// StoragePrivateEndpointConnection. /// -public partial class StoragePrivateEndpointConnection : Resource +public partial class StoragePrivateEndpointConnection : ProvisionableResource { /// /// The name of the private endpoint connection associated with the Azure @@ -64,15 +64,15 @@ public partial class StoragePrivateEndpointConnection : Resource /// /// Creates a new StoragePrivateEndpointConnection. /// - /// + /// /// The the Bicep identifier name of the StoragePrivateEndpointConnection /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the StoragePrivateEndpointConnection. - public StoragePrivateEndpointConnection(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Storage/storageAccounts/privateEndpointConnections", resourceVersion ?? "2024-01-01") + public StoragePrivateEndpointConnection(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Storage/storageAccounts/privateEndpointConnections", resourceVersion ?? "2024-01-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _connectionState = BicepValue.DefineProperty(this, "ConnectionState", ["properties", "privateLinkServiceConnectionState"]); @@ -212,7 +212,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing StoragePrivateEndpointConnection. /// - /// + /// /// The the Bicep identifier name of the StoragePrivateEndpointConnection /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -220,6 +220,6 @@ public static class ResourceVersions /// /// Version of the StoragePrivateEndpointConnection. /// The existing StoragePrivateEndpointConnection resource. - public static StoragePrivateEndpointConnection FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static StoragePrivateEndpointConnection FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/StorageQueue.cs b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/StorageQueue.cs index de33a10c1725..3b6839bdbf28 100644 --- a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/StorageQueue.cs +++ b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/StorageQueue.cs @@ -17,7 +17,7 @@ namespace Azure.Provisioning.Storage; /// /// StorageQueue. /// -public partial class StorageQueue : Resource +public partial class StorageQueue : ProvisionableResource { /// /// A queue name must be unique within a storage account and must be @@ -64,15 +64,15 @@ public partial class StorageQueue : Resource /// /// Creates a new StorageQueue. /// - /// + /// /// The the Bicep identifier name of the StorageQueue resource. This can /// be used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and /// underscores. /// /// Version of the StorageQueue. - public StorageQueue(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Storage/storageAccounts/queueServices/queues", resourceVersion ?? "2024-01-01") + public StorageQueue(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Storage/storageAccounts/queueServices/queues", resourceVersion ?? "2024-01-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _metadata = BicepDictionary.DefineProperty(this, "Metadata", ["properties", "metadata"]); @@ -201,7 +201,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing StorageQueue. /// - /// + /// /// The the Bicep identifier name of the StorageQueue resource. This can /// be used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and @@ -209,8 +209,8 @@ public static class ResourceVersions /// /// Version of the StorageQueue. /// The existing StorageQueue resource. - public static StorageQueue FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static StorageQueue FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; /// /// Get the requirements for naming this StorageQueue resource. diff --git a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/StorageTable.cs b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/StorageTable.cs index a472d418ae26..b89f51bc9f1c 100644 --- a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/StorageTable.cs +++ b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/StorageTable.cs @@ -17,7 +17,7 @@ namespace Azure.Provisioning.Storage; /// /// StorageTable. /// -public partial class StorageTable : Resource +public partial class StorageTable : ProvisionableResource { /// /// A table name must be unique within a storage account and must be @@ -60,15 +60,15 @@ public partial class StorageTable : Resource /// /// Creates a new StorageTable. /// - /// + /// /// The the Bicep identifier name of the StorageTable resource. This can /// be used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and /// underscores. /// /// Version of the StorageTable. - public StorageTable(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Storage/storageAccounts/tableServices/tables", resourceVersion ?? "2024-01-01") + public StorageTable(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Storage/storageAccounts/tableServices/tables", resourceVersion ?? "2024-01-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _signedIdentifiers = BicepList.DefineProperty(this, "SignedIdentifiers", ["properties", "signedIdentifiers"]); @@ -197,7 +197,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing StorageTable. /// - /// + /// /// The the Bicep identifier name of the StorageTable resource. This can /// be used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and @@ -205,8 +205,8 @@ public static class ResourceVersions /// /// Version of the StorageTable. /// The existing StorageTable resource. - public static StorageTable FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static StorageTable FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; /// /// Get the requirements for naming this StorageTable resource. diff --git a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/TableService.cs b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/TableService.cs index 31cf2fc47d1a..ad1686e826c0 100644 --- a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/TableService.cs +++ b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/TableService.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.Storage; /// /// TableService. /// -public partial class TableService : Resource +public partial class TableService : ProvisionableResource { /// /// Gets the Name. @@ -52,15 +52,15 @@ public partial class TableService : Resource /// /// Creates a new TableService. /// - /// + /// /// The the Bicep identifier name of the TableService resource. This can /// be used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and /// underscores. /// /// Version of the TableService. - public TableService(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Storage/storageAccounts/tableServices", resourceVersion ?? "2024-01-01") + public TableService(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Storage/storageAccounts/tableServices", resourceVersion ?? "2024-01-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _corsRules = BicepList.DefineProperty(this, "CorsRules", ["properties", "cors", "corsRules"]); @@ -188,7 +188,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing TableService. /// - /// + /// /// The the Bicep identifier name of the TableService resource. This can /// be used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and @@ -196,6 +196,6 @@ public static class ResourceVersions /// /// Version of the TableService. /// The existing TableService resource. - public static TableService FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static TableService FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.Storage/src/StorageAccountManagementPolicy.cs b/sdk/provisioning/Azure.Provisioning.Storage/src/StorageAccountManagementPolicy.cs index 0cfea310e57f..f3281147b631 100644 --- a/sdk/provisioning/Azure.Provisioning.Storage/src/StorageAccountManagementPolicy.cs +++ b/sdk/provisioning/Azure.Provisioning.Storage/src/StorageAccountManagementPolicy.cs @@ -12,5 +12,5 @@ public partial class StorageAccountManagementPolicy /// Get the default value for the Name property. /// private partial BicepValue GetNameDefaultValue() => - new StringLiteral("default"); + new StringLiteralExpression("default"); } diff --git a/sdk/provisioning/Azure.Provisioning.Storage/src/StorageResources.cs b/sdk/provisioning/Azure.Provisioning.Storage/src/StorageResources.cs index 652ab8f73ea4..53e3c27193bc 100644 --- a/sdk/provisioning/Azure.Provisioning.Storage/src/StorageResources.cs +++ b/sdk/provisioning/Azure.Provisioning.Storage/src/StorageResources.cs @@ -1,6 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. +#if EXPERIMENTAL_PROVISIONING + using System; using Azure.Core; using Azure.Provisioning.Storage; @@ -54,3 +56,5 @@ public static StorageAccount CreateAccount( } : throw new ArgumentOutOfRangeException(nameof(infrastructureVersion), $"Expected a value between 1 and 2 inclusive, not {infrastructureVersion}."); } + +#endif diff --git a/sdk/provisioning/Azure.Provisioning.Storage/tests/BasicStorageTests.cs b/sdk/provisioning/Azure.Provisioning.Storage/tests/BasicStorageTests.cs index d7eb24db8afb..85272cbda425 100644 --- a/sdk/provisioning/Azure.Provisioning.Storage/tests/BasicStorageTests.cs +++ b/sdk/provisioning/Azure.Provisioning.Storage/tests/BasicStorageTests.cs @@ -19,7 +19,14 @@ public class BasicStorageTests(bool async) public async Task CreateDefault() { await using Trycep test = CreateBicepTest(); - await test.Define(StorageResources.CreateAccount("storage")) + await test.Define( + new StorageAccount("storage", StorageAccount.ResourceVersions.V2023_01_01) + { + Kind = StorageKind.StorageV2, + Sku = new StorageSku { Name = StorageSkuName.StandardLrs }, + IsHnsEnabled = true, + AllowBlobPublicAccess = false + }) .Compare( """ @description('The location for the resource(s) to be deployed.') @@ -51,7 +58,14 @@ await test.Define( { Infrastructure infra = new(); - StorageAccount storage = StorageResources.CreateAccount(nameof(storage)); + StorageAccount storage = + new(nameof(storage), StorageAccount.ResourceVersions.V2023_01_01) + { + Kind = StorageKind.StorageV2, + Sku = new StorageSku { Name = StorageSkuName.StandardLrs }, + IsHnsEnabled = true, + AllowBlobPublicAccess = false + }; infra.Add(storage); BlobService blobs = new(nameof(blobs)) { Parent = storage, DependsOn = { storage } }; @@ -98,7 +112,14 @@ await test.Define( { Infrastructure infra = new(); - StorageAccount storage = StorageResources.CreateAccount(nameof(storage)); + StorageAccount storage = + new(nameof(storage), StorageAccount.ResourceVersions.V2023_01_01) + { + Kind = StorageKind.StorageV2, + Sku = new StorageSku { Name = StorageSkuName.StandardLrs }, + IsHnsEnabled = true, + AllowBlobPublicAccess = false + }; infra.Add(storage); UserAssignedIdentity id = new(nameof(id)); @@ -155,7 +176,14 @@ await test.Define( { Infrastructure infra = new(); - StorageAccount storage = StorageResources.CreateAccount(nameof(storage)); + StorageAccount storage = + new(nameof(storage), StorageAccount.ResourceVersions.V2023_01_01) + { + Kind = StorageKind.StorageV2, + Sku = new StorageSku { Name = StorageSkuName.StandardLrs }, + IsHnsEnabled = true, + AllowBlobPublicAccess = false + }; infra.Add(storage); UserAssignedIdentity id = new(nameof(id)); @@ -165,7 +193,7 @@ await test.Define( infra.Add(role); role = storage.CreateRoleAssignment(StorageBuiltInRole.StorageBlobDataContributor, RoleManagementPrincipalType.ServicePrincipal, id.PrincipalId); - role.IdentifierName = "storage_writer"; + role.BicepIdentifier = "storage_writer"; infra.Add(role); return infra; @@ -226,7 +254,80 @@ await test.Define( { Infrastructure infra = new(); - StorageAccount storage = StorageResources.CreateAccount(nameof(storage)); + StorageAccount storage = + new(nameof(storage), StorageAccount.ResourceVersions.V2023_01_01) + { + Kind = StorageKind.StorageV2, + Sku = new StorageSku { Name = StorageSkuName.StandardLrs }, + IsHnsEnabled = true, + AllowBlobPublicAccess = false + }; + infra.Add(storage); + + BlobService blobs = new(nameof(blobs)) { Parent = storage }; + infra.Add(blobs); + + infra.Add(new ProvisioningOutput("blobs_endpoint", typeof(string)) { Value = storage.PrimaryEndpoints.Value!.BlobUri }); + + // Manually compute the public Azure endpoint + string? nothing = null; + BicepValue computed = + new BicepStringBuilder() + .Append("https://") + .Append($"{storage.Name}") + .Append($".blob.core.windows.net{nothing}"); + infra.Add(new ProvisioningOutput("computed_endpoint", typeof(string)) { Value = computed }); + + return infra; + }) + .Compare( + """ + @description('The location for the resource(s) to be deployed.') + param location string = resourceGroup().location + + resource storage 'Microsoft.Storage/storageAccounts@2023-01-01' = { + name: take('storage${uniqueString(resourceGroup().id)}', 24) + kind: 'StorageV2' + location: location + sku: { + name: 'Standard_LRS' + } + properties: { + allowBlobPublicAccess: false + isHnsEnabled: true + } + } + + resource blobs 'Microsoft.Storage/storageAccounts/blobServices@2024-01-01' = { + name: 'default' + parent: storage + } + + output blobs_endpoint string = storage.properties.primaryEndpoints.blob + + output computed_endpoint string = 'https://${storage.name}.blob.core.windows.net' + """) + .Lint() + .ValidateAndDeployAsync(); + } + + [Test] + public async Task SimpleConnStr() + { + await using Trycep test = CreateBicepTest(); + await test.Define( + ctx => + { + Infrastructure infra = new(); + + StorageAccount storage = + new(nameof(storage), StorageAccount.ResourceVersions.V2023_01_01) + { + Kind = StorageKind.StorageV2, + Sku = new StorageSku { Name = StorageSkuName.StandardLrs }, + IsHnsEnabled = true, + AllowBlobPublicAccess = false + }; infra.Add(storage); BlobService blobs = new(nameof(blobs)) { Parent = storage }; diff --git a/sdk/provisioning/Azure.Provisioning.WebPubSub/api/Azure.Provisioning.WebPubSub.netstandard2.0.cs b/sdk/provisioning/Azure.Provisioning.WebPubSub/api/Azure.Provisioning.WebPubSub.netstandard2.0.cs index 2a256be1cd9b..b1432328a556 100644 --- a/sdk/provisioning/Azure.Provisioning.WebPubSub/api/Azure.Provisioning.WebPubSub.netstandard2.0.cs +++ b/sdk/provisioning/Azure.Provisioning.WebPubSub/api/Azure.Provisioning.WebPubSub.netstandard2.0.cs @@ -5,7 +5,7 @@ public enum AclAction Allow = 0, Deny = 1, } - public partial class BillingInfoSku : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class BillingInfoSku : Azure.Provisioning.Primitives.ProvisionableConstruct { public BillingInfoSku() { } public Azure.Provisioning.BicepValue Capacity { get { throw null; } set { } } @@ -14,13 +14,13 @@ public BillingInfoSku() { } public Azure.Provisioning.BicepValue Size { get { throw null; } } public Azure.Provisioning.BicepValue Tier { get { throw null; } set { } } } - public partial class LiveTraceCategory : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class LiveTraceCategory : Azure.Provisioning.Primitives.ProvisionableConstruct { public LiveTraceCategory() { } public Azure.Provisioning.BicepValue IsEnabled { get { throw null; } set { } } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } } - public partial class LiveTraceConfiguration : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class LiveTraceConfiguration : Azure.Provisioning.Primitives.ProvisionableConstruct { public LiveTraceConfiguration() { } public Azure.Provisioning.BicepList Categories { get { throw null; } set { } } @@ -31,19 +31,19 @@ public partial class PrivateEndpointAcl : Azure.Provisioning.WebPubSub.PublicNet public PrivateEndpointAcl() { } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } } - public partial class PublicNetworkAcls : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class PublicNetworkAcls : Azure.Provisioning.Primitives.ProvisionableConstruct { public PublicNetworkAcls() { } public Azure.Provisioning.BicepList Allow { get { throw null; } set { } } public Azure.Provisioning.BicepList Deny { get { throw null; } set { } } } - public partial class ResourceLogCategory : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ResourceLogCategory : Azure.Provisioning.Primitives.ProvisionableConstruct { public ResourceLogCategory() { } public Azure.Provisioning.BicepValue Enabled { get { throw null; } set { } } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } } - public partial class UpstreamAuthSettings : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class UpstreamAuthSettings : Azure.Provisioning.Primitives.ProvisionableConstruct { public UpstreamAuthSettings() { } public Azure.Provisioning.BicepValue AuthType { get { throw null; } set { } } @@ -75,7 +75,7 @@ public enum UpstreamAuthType public static bool operator !=(Azure.Provisioning.WebPubSub.WebPubSubBuiltInRole left, Azure.Provisioning.WebPubSub.WebPubSubBuiltInRole right) { throw null; } public override string ToString() { throw null; } } - public partial class WebPubSubEventHandler : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class WebPubSubEventHandler : Azure.Provisioning.Primitives.ProvisionableConstruct { public WebPubSubEventHandler() { } public Azure.Provisioning.BicepValue Auth { get { throw null; } set { } } @@ -83,31 +83,30 @@ public WebPubSubEventHandler() { } public Azure.Provisioning.BicepValue UrlTemplate { get { throw null; } set { } } public Azure.Provisioning.BicepValue UserEventPattern { get { throw null; } set { } } } - public partial class WebPubSubHub : Azure.Provisioning.Primitives.Resource + public partial class WebPubSubHub : Azure.Provisioning.Primitives.ProvisionableResource { - public WebPubSubHub(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public WebPubSubHub(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } public Azure.Provisioning.WebPubSub.WebPubSubService? Parent { get { throw null; } set { } } public Azure.Provisioning.BicepValue Properties { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.WebPubSub.WebPubSubHub FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.WebPubSub.WebPubSubHub FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2020_05_01; public static readonly string V2021_10_01; public static readonly string V2023_02_01; public static readonly string V2024_03_01; - public static readonly string V2024_04_01_preview; } } - public partial class WebPubSubHubProperties : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class WebPubSubHubProperties : Azure.Provisioning.Primitives.ProvisionableConstruct { public WebPubSubHubProperties() { } public Azure.Provisioning.BicepValue AnonymousConnectPolicy { get { throw null; } set { } } public Azure.Provisioning.BicepList EventHandlers { get { throw null; } set { } } } - public partial class WebPubSubKeys : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class WebPubSubKeys : Azure.Provisioning.Primitives.ProvisionableConstruct { public WebPubSubKeys() { } public Azure.Provisioning.BicepValue PrimaryConnectionString { get { throw null; } } @@ -115,18 +114,18 @@ public WebPubSubKeys() { } public Azure.Provisioning.BicepValue SecondaryConnectionString { get { throw null; } } public Azure.Provisioning.BicepValue SecondaryKey { get { throw null; } } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public static Azure.Provisioning.WebPubSub.WebPubSubKeys FromExpression(Azure.Provisioning.Expressions.Expression expression) { throw null; } + public static Azure.Provisioning.WebPubSub.WebPubSubKeys FromExpression(Azure.Provisioning.Expressions.BicepExpression expression) { throw null; } } - public partial class WebPubSubNetworkAcls : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class WebPubSubNetworkAcls : Azure.Provisioning.Primitives.ProvisionableConstruct { public WebPubSubNetworkAcls() { } public Azure.Provisioning.BicepValue DefaultAction { get { throw null; } set { } } public Azure.Provisioning.BicepList PrivateEndpoints { get { throw null; } set { } } public Azure.Provisioning.BicepValue PublicNetwork { get { throw null; } set { } } } - public partial class WebPubSubPrivateEndpointConnection : Azure.Provisioning.Primitives.Resource + public partial class WebPubSubPrivateEndpointConnection : Azure.Provisioning.Primitives.ProvisionableResource { - public WebPubSubPrivateEndpointConnection(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public WebPubSubPrivateEndpointConnection(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue ConnectionState { get { throw null; } set { } } public Azure.Provisioning.BicepList GroupIds { get { throw null; } } public Azure.Provisioning.BicepValue Id { get { throw null; } } @@ -135,17 +134,16 @@ public partial class WebPubSubPrivateEndpointConnection : Azure.Provisioning.Pri public Azure.Provisioning.BicepValue PrivateEndpointId { get { throw null; } set { } } public Azure.Provisioning.BicepValue ProvisioningState { get { throw null; } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.WebPubSub.WebPubSubPrivateEndpointConnection FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.WebPubSub.WebPubSubPrivateEndpointConnection FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2020_05_01; public static readonly string V2021_10_01; public static readonly string V2023_02_01; public static readonly string V2024_03_01; - public static readonly string V2024_04_01_preview; } } - public partial class WebPubSubPrivateEndpointConnectionData : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class WebPubSubPrivateEndpointConnectionData : Azure.Provisioning.Primitives.ProvisionableConstruct { public WebPubSubPrivateEndpointConnectionData() { } public Azure.Provisioning.BicepValue ConnectionState { get { throw null; } set { } } @@ -156,7 +154,7 @@ public WebPubSubPrivateEndpointConnectionData() { } public Azure.Provisioning.BicepValue ProvisioningState { get { throw null; } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } } - public partial class WebPubSubPrivateLinkServiceConnectionState : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class WebPubSubPrivateLinkServiceConnectionState : Azure.Provisioning.Primitives.ProvisionableConstruct { public WebPubSubPrivateLinkServiceConnectionState() { } public Azure.Provisioning.BicepValue ActionsRequired { get { throw null; } set { } } @@ -190,9 +188,9 @@ public enum WebPubSubRequestType RestApi = 2, Trace = 3, } - public partial class WebPubSubService : Azure.Provisioning.Primitives.Resource + public partial class WebPubSubService : Azure.Provisioning.Primitives.ProvisionableResource { - public WebPubSubService(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public WebPubSubService(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue ExternalIP { get { throw null; } } public Azure.Provisioning.BicepValue HostName { get { throw null; } } public Azure.Provisioning.BicepValue HostNamePrefix { get { throw null; } } @@ -216,9 +214,9 @@ public partial class WebPubSubService : Azure.Provisioning.Primitives.Resource public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } public Azure.Provisioning.BicepValue Version { get { throw null; } } - public Azure.Provisioning.Authorization.RoleAssignment CreateRoleAssignment(Azure.Provisioning.WebPubSub.WebPubSubBuiltInRole role, Azure.Provisioning.BicepValue principalType, Azure.Provisioning.BicepValue principalId, string? identifierNameSuffix = null) { throw null; } + public Azure.Provisioning.Authorization.RoleAssignment CreateRoleAssignment(Azure.Provisioning.WebPubSub.WebPubSubBuiltInRole role, Azure.Provisioning.BicepValue principalType, Azure.Provisioning.BicepValue principalId, string? bicepIdentifierSuffix = null) { throw null; } public Azure.Provisioning.Authorization.RoleAssignment CreateRoleAssignment(Azure.Provisioning.WebPubSub.WebPubSubBuiltInRole role, Azure.Provisioning.Roles.UserAssignedIdentity identity) { throw null; } - public static Azure.Provisioning.WebPubSub.WebPubSubService FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.WebPubSub.WebPubSubService FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public Azure.Provisioning.WebPubSub.WebPubSubKeys GetKeys() { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override Azure.Provisioning.Primitives.ResourceNameRequirements GetResourceNameRequirements() { throw null; } @@ -228,12 +226,11 @@ public static partial class ResourceVersions public static readonly string V2021_10_01; public static readonly string V2023_02_01; public static readonly string V2024_03_01; - public static readonly string V2024_04_01_preview; } } - public partial class WebPubSubSharedPrivateLink : Azure.Provisioning.Primitives.Resource + public partial class WebPubSubSharedPrivateLink : Azure.Provisioning.Primitives.ProvisionableResource { - public WebPubSubSharedPrivateLink(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public WebPubSubSharedPrivateLink(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue GroupId { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } @@ -243,17 +240,16 @@ public partial class WebPubSubSharedPrivateLink : Azure.Provisioning.Primitives. public Azure.Provisioning.BicepValue RequestMessage { get { throw null; } set { } } public Azure.Provisioning.BicepValue Status { get { throw null; } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.WebPubSub.WebPubSubSharedPrivateLink FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.WebPubSub.WebPubSubSharedPrivateLink FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2020_05_01; public static readonly string V2021_10_01; public static readonly string V2023_02_01; public static readonly string V2024_03_01; - public static readonly string V2024_04_01_preview; } } - public partial class WebPubSubSharedPrivateLinkData : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class WebPubSubSharedPrivateLinkData : Azure.Provisioning.Primitives.ProvisionableConstruct { public WebPubSubSharedPrivateLinkData() { } public Azure.Provisioning.BicepValue GroupId { get { throw null; } set { } } diff --git a/sdk/provisioning/Azure.Provisioning.WebPubSub/src/Generated/Models/BillingInfoSku.cs b/sdk/provisioning/Azure.Provisioning.WebPubSub/src/Generated/Models/BillingInfoSku.cs index 969aa1612469..fb4ab806a8e3 100644 --- a/sdk/provisioning/Azure.Provisioning.WebPubSub/src/Generated/Models/BillingInfoSku.cs +++ b/sdk/provisioning/Azure.Provisioning.WebPubSub/src/Generated/Models/BillingInfoSku.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.WebPubSub; /// /// The billing information of the resource. /// -public partial class BillingInfoSku : ProvisioningConstruct +public partial class BillingInfoSku : ProvisionableConstruct { /// /// The name of the SKU. Required. Allowed diff --git a/sdk/provisioning/Azure.Provisioning.WebPubSub/src/Generated/Models/LiveTraceCategory.cs b/sdk/provisioning/Azure.Provisioning.WebPubSub/src/Generated/Models/LiveTraceCategory.cs index 779941299abd..ae2fbe566d1a 100644 --- a/sdk/provisioning/Azure.Provisioning.WebPubSub/src/Generated/Models/LiveTraceCategory.cs +++ b/sdk/provisioning/Azure.Provisioning.WebPubSub/src/Generated/Models/LiveTraceCategory.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.WebPubSub; /// /// Live trace category configuration of a Microsoft.SignalRService resource. /// -public partial class LiveTraceCategory : ProvisioningConstruct +public partial class LiveTraceCategory : ProvisionableConstruct { /// /// Gets or sets the live trace category's name. Available diff --git a/sdk/provisioning/Azure.Provisioning.WebPubSub/src/Generated/Models/LiveTraceConfiguration.cs b/sdk/provisioning/Azure.Provisioning.WebPubSub/src/Generated/Models/LiveTraceConfiguration.cs index fbf713a154fb..071d2f51f7f4 100644 --- a/sdk/provisioning/Azure.Provisioning.WebPubSub/src/Generated/Models/LiveTraceConfiguration.cs +++ b/sdk/provisioning/Azure.Provisioning.WebPubSub/src/Generated/Models/LiveTraceConfiguration.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.WebPubSub; /// /// Live trace configuration of a Microsoft.SignalRService resource. /// -public partial class LiveTraceConfiguration : ProvisioningConstruct +public partial class LiveTraceConfiguration : ProvisionableConstruct { /// /// Indicates whether or not enable live trace. diff --git a/sdk/provisioning/Azure.Provisioning.WebPubSub/src/Generated/Models/PublicNetworkAcls.cs b/sdk/provisioning/Azure.Provisioning.WebPubSub/src/Generated/Models/PublicNetworkAcls.cs index b5b35ea581fd..eabbcc4015b7 100644 --- a/sdk/provisioning/Azure.Provisioning.WebPubSub/src/Generated/Models/PublicNetworkAcls.cs +++ b/sdk/provisioning/Azure.Provisioning.WebPubSub/src/Generated/Models/PublicNetworkAcls.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.WebPubSub; /// /// Network ACL. /// -public partial class PublicNetworkAcls : ProvisioningConstruct +public partial class PublicNetworkAcls : ProvisionableConstruct { /// /// Allowed request types. The value can be one or more of: diff --git a/sdk/provisioning/Azure.Provisioning.WebPubSub/src/Generated/Models/ResourceLogCategory.cs b/sdk/provisioning/Azure.Provisioning.WebPubSub/src/Generated/Models/ResourceLogCategory.cs index de84c5e8d083..ccd019871aa2 100644 --- a/sdk/provisioning/Azure.Provisioning.WebPubSub/src/Generated/Models/ResourceLogCategory.cs +++ b/sdk/provisioning/Azure.Provisioning.WebPubSub/src/Generated/Models/ResourceLogCategory.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.WebPubSub; /// /// Resource log category configuration of a Microsoft.SignalRService resource. /// -public partial class ResourceLogCategory : ProvisioningConstruct +public partial class ResourceLogCategory : ProvisionableConstruct { /// /// Gets or sets the resource log category's name. diff --git a/sdk/provisioning/Azure.Provisioning.WebPubSub/src/Generated/Models/UpstreamAuthSettings.cs b/sdk/provisioning/Azure.Provisioning.WebPubSub/src/Generated/Models/UpstreamAuthSettings.cs index 2ebbc9f049e5..2ab84d4db8f9 100644 --- a/sdk/provisioning/Azure.Provisioning.WebPubSub/src/Generated/Models/UpstreamAuthSettings.cs +++ b/sdk/provisioning/Azure.Provisioning.WebPubSub/src/Generated/Models/UpstreamAuthSettings.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.WebPubSub; /// /// Upstream auth settings. If not set, no auth is used for upstream messages. /// -public partial class UpstreamAuthSettings : ProvisioningConstruct +public partial class UpstreamAuthSettings : ProvisionableConstruct { /// /// Upstream auth type enum. diff --git a/sdk/provisioning/Azure.Provisioning.WebPubSub/src/Generated/Models/WebPubSubEventHandler.cs b/sdk/provisioning/Azure.Provisioning.WebPubSub/src/Generated/Models/WebPubSubEventHandler.cs index 2de8b978fa18..b23424446b5b 100644 --- a/sdk/provisioning/Azure.Provisioning.WebPubSub/src/Generated/Models/WebPubSubEventHandler.cs +++ b/sdk/provisioning/Azure.Provisioning.WebPubSub/src/Generated/Models/WebPubSubEventHandler.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.WebPubSub; /// /// Properties of event handler. /// -public partial class WebPubSubEventHandler : ProvisioningConstruct +public partial class WebPubSubEventHandler : ProvisionableConstruct { /// /// Gets or sets the EventHandler URL template. You can use a predefined diff --git a/sdk/provisioning/Azure.Provisioning.WebPubSub/src/Generated/Models/WebPubSubHubProperties.cs b/sdk/provisioning/Azure.Provisioning.WebPubSub/src/Generated/Models/WebPubSubHubProperties.cs index 4d5229c528ab..3926672a5663 100644 --- a/sdk/provisioning/Azure.Provisioning.WebPubSub/src/Generated/Models/WebPubSubHubProperties.cs +++ b/sdk/provisioning/Azure.Provisioning.WebPubSub/src/Generated/Models/WebPubSubHubProperties.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.WebPubSub; /// /// Properties of a hub. /// -public partial class WebPubSubHubProperties : ProvisioningConstruct +public partial class WebPubSubHubProperties : ProvisionableConstruct { /// /// Event handler of a hub. diff --git a/sdk/provisioning/Azure.Provisioning.WebPubSub/src/Generated/Models/WebPubSubKeys.cs b/sdk/provisioning/Azure.Provisioning.WebPubSub/src/Generated/Models/WebPubSubKeys.cs index 715faf00369c..e815a3eb752d 100644 --- a/sdk/provisioning/Azure.Provisioning.WebPubSub/src/Generated/Models/WebPubSubKeys.cs +++ b/sdk/provisioning/Azure.Provisioning.WebPubSub/src/Generated/Models/WebPubSubKeys.cs @@ -13,7 +13,7 @@ namespace Azure.Provisioning.WebPubSub; /// /// A class represents the access keys of the resource. /// -public partial class WebPubSubKeys : ProvisioningConstruct +public partial class WebPubSubKeys : ProvisionableConstruct { /// /// The primary access key. @@ -59,7 +59,7 @@ public WebPubSubKeys() /// /// A WebPubSubKeys resource. [EditorBrowsable(EditorBrowsableState.Never)] - public static WebPubSubKeys FromExpression(Expression expression) + public static WebPubSubKeys FromExpression(BicepExpression expression) { WebPubSubKeys resource = new(); resource.OverrideWithExpression(expression); diff --git a/sdk/provisioning/Azure.Provisioning.WebPubSub/src/Generated/Models/WebPubSubNetworkAcls.cs b/sdk/provisioning/Azure.Provisioning.WebPubSub/src/Generated/Models/WebPubSubNetworkAcls.cs index e4e330c68576..b86dea97efd4 100644 --- a/sdk/provisioning/Azure.Provisioning.WebPubSub/src/Generated/Models/WebPubSubNetworkAcls.cs +++ b/sdk/provisioning/Azure.Provisioning.WebPubSub/src/Generated/Models/WebPubSubNetworkAcls.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.WebPubSub; /// /// Network ACLs for the resource. /// -public partial class WebPubSubNetworkAcls : ProvisioningConstruct +public partial class WebPubSubNetworkAcls : ProvisionableConstruct { /// /// Azure Networking ACL Action. diff --git a/sdk/provisioning/Azure.Provisioning.WebPubSub/src/Generated/Models/WebPubSubPrivateEndpointConnectionData.cs b/sdk/provisioning/Azure.Provisioning.WebPubSub/src/Generated/Models/WebPubSubPrivateEndpointConnectionData.cs index 18f7c23d1660..a6675d01b12e 100644 --- a/sdk/provisioning/Azure.Provisioning.WebPubSub/src/Generated/Models/WebPubSubPrivateEndpointConnectionData.cs +++ b/sdk/provisioning/Azure.Provisioning.WebPubSub/src/Generated/Models/WebPubSubPrivateEndpointConnectionData.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.WebPubSub; /// A class representing the WebPubSubPrivateEndpointConnection data model. /// A private endpoint connection to an azure resource /// -public partial class WebPubSubPrivateEndpointConnectionData : ProvisioningConstruct +public partial class WebPubSubPrivateEndpointConnectionData : ProvisionableConstruct { /// /// Provisioning state of the resource. diff --git a/sdk/provisioning/Azure.Provisioning.WebPubSub/src/Generated/Models/WebPubSubPrivateLinkServiceConnectionState.cs b/sdk/provisioning/Azure.Provisioning.WebPubSub/src/Generated/Models/WebPubSubPrivateLinkServiceConnectionState.cs index fdc8ac2bf6a2..e264e96c34fd 100644 --- a/sdk/provisioning/Azure.Provisioning.WebPubSub/src/Generated/Models/WebPubSubPrivateLinkServiceConnectionState.cs +++ b/sdk/provisioning/Azure.Provisioning.WebPubSub/src/Generated/Models/WebPubSubPrivateLinkServiceConnectionState.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.WebPubSub; /// /// Connection state of the private endpoint connection. /// -public partial class WebPubSubPrivateLinkServiceConnectionState : ProvisioningConstruct +public partial class WebPubSubPrivateLinkServiceConnectionState : ProvisionableConstruct { /// /// Indicates whether the connection has been Approved/Rejected/Removed by diff --git a/sdk/provisioning/Azure.Provisioning.WebPubSub/src/Generated/Models/WebPubSubSharedPrivateLinkData.cs b/sdk/provisioning/Azure.Provisioning.WebPubSub/src/Generated/Models/WebPubSubSharedPrivateLinkData.cs index e9aa0d6deff4..9db7858410b6 100644 --- a/sdk/provisioning/Azure.Provisioning.WebPubSub/src/Generated/Models/WebPubSubSharedPrivateLinkData.cs +++ b/sdk/provisioning/Azure.Provisioning.WebPubSub/src/Generated/Models/WebPubSubSharedPrivateLinkData.cs @@ -14,7 +14,7 @@ namespace Azure.Provisioning.WebPubSub; /// A class representing the WebPubSubSharedPrivateLink data model. /// Describes a Shared Private Link Resource /// -public partial class WebPubSubSharedPrivateLinkData : ProvisioningConstruct +public partial class WebPubSubSharedPrivateLinkData : ProvisionableConstruct { /// /// The group id from the provider of resource the shared private link diff --git a/sdk/provisioning/Azure.Provisioning.WebPubSub/src/Generated/WebPubSubHub.cs b/sdk/provisioning/Azure.Provisioning.WebPubSub/src/Generated/WebPubSubHub.cs index 7c4ca121d7aa..08426f5b1fc1 100644 --- a/sdk/provisioning/Azure.Provisioning.WebPubSub/src/Generated/WebPubSubHub.cs +++ b/sdk/provisioning/Azure.Provisioning.WebPubSub/src/Generated/WebPubSubHub.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.WebPubSub; /// /// WebPubSubHub. /// -public partial class WebPubSubHub : Resource +public partial class WebPubSubHub : ProvisionableResource { /// /// The hub name. @@ -51,15 +51,15 @@ public partial class WebPubSubHub : Resource /// /// Creates a new WebPubSubHub. /// - /// + /// /// The the Bicep identifier name of the WebPubSubHub resource. This can /// be used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and /// underscores. /// /// Version of the WebPubSubHub. - public WebPubSubHub(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.SignalRService/webPubSub/hubs", resourceVersion ?? "2024-03-01") + public WebPubSubHub(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.SignalRService/webPubSub/hubs", resourceVersion ?? "2024-03-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _properties = BicepValue.DefineProperty(this, "Properties", ["properties"], isRequired: true); @@ -73,11 +73,6 @@ public WebPubSubHub(string identifierName, string? resourceVersion = default) /// public static class ResourceVersions { - /// - /// 2024-04-01-preview. - /// - public static readonly string V2024_04_01_preview = "2024-04-01-preview"; - /// /// 2024-03-01. /// @@ -102,7 +97,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing WebPubSubHub. /// - /// + /// /// The the Bicep identifier name of the WebPubSubHub resource. This can /// be used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and @@ -110,6 +105,6 @@ public static class ResourceVersions /// /// Version of the WebPubSubHub. /// The existing WebPubSubHub resource. - public static WebPubSubHub FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static WebPubSubHub FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.WebPubSub/src/Generated/WebPubSubPrivateEndpointConnection.cs b/sdk/provisioning/Azure.Provisioning.WebPubSub/src/Generated/WebPubSubPrivateEndpointConnection.cs index 6a46de77cb18..0f486343d522 100644 --- a/sdk/provisioning/Azure.Provisioning.WebPubSub/src/Generated/WebPubSubPrivateEndpointConnection.cs +++ b/sdk/provisioning/Azure.Provisioning.WebPubSub/src/Generated/WebPubSubPrivateEndpointConnection.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.WebPubSub; /// /// WebPubSubPrivateEndpointConnection. /// -public partial class WebPubSubPrivateEndpointConnection : Resource +public partial class WebPubSubPrivateEndpointConnection : ProvisionableResource { /// /// The name of the private endpoint connection. @@ -69,15 +69,15 @@ public partial class WebPubSubPrivateEndpointConnection : Resource /// /// Creates a new WebPubSubPrivateEndpointConnection. /// - /// + /// /// The the Bicep identifier name of the WebPubSubPrivateEndpointConnection /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the WebPubSubPrivateEndpointConnection. - public WebPubSubPrivateEndpointConnection(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.SignalRService/webPubSub/privateEndpointConnections", resourceVersion ?? "2024-03-01") + public WebPubSubPrivateEndpointConnection(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.SignalRService/webPubSub/privateEndpointConnections", resourceVersion ?? "2024-03-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _connectionState = BicepValue.DefineProperty(this, "ConnectionState", ["properties", "privateLinkServiceConnectionState"]); @@ -94,11 +94,6 @@ public WebPubSubPrivateEndpointConnection(string identifierName, string? resourc /// public static class ResourceVersions { - /// - /// 2024-04-01-preview. - /// - public static readonly string V2024_04_01_preview = "2024-04-01-preview"; - /// /// 2024-03-01. /// @@ -123,7 +118,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing WebPubSubPrivateEndpointConnection. /// - /// + /// /// The the Bicep identifier name of the WebPubSubPrivateEndpointConnection /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -131,6 +126,6 @@ public static class ResourceVersions /// /// Version of the WebPubSubPrivateEndpointConnection. /// The existing WebPubSubPrivateEndpointConnection resource. - public static WebPubSubPrivateEndpointConnection FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static WebPubSubPrivateEndpointConnection FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning.WebPubSub/src/Generated/WebPubSubService.cs b/sdk/provisioning/Azure.Provisioning.WebPubSub/src/Generated/WebPubSubService.cs index 79509871aaf6..e92d7fbd779e 100644 --- a/sdk/provisioning/Azure.Provisioning.WebPubSub/src/Generated/WebPubSubService.cs +++ b/sdk/provisioning/Azure.Provisioning.WebPubSub/src/Generated/WebPubSubService.cs @@ -20,7 +20,7 @@ namespace Azure.Provisioning.WebPubSub; /// /// WebPubSubService. /// -public partial class WebPubSubService : Resource +public partial class WebPubSubService : ProvisionableResource { /// /// The name of the resource. @@ -174,15 +174,15 @@ public partial class WebPubSubService : Resource /// /// Creates a new WebPubSubService. /// - /// + /// /// The the Bicep identifier name of the WebPubSubService resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, /// and underscores. /// /// Version of the WebPubSubService. - public WebPubSubService(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.SignalRService/webPubSub", resourceVersion ?? "2024-03-01") + public WebPubSubService(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.SignalRService/webPubSub", resourceVersion ?? "2024-03-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _location = BicepValue.DefineProperty(this, "Location", ["location"], isRequired: true); @@ -214,11 +214,6 @@ public WebPubSubService(string identifierName, string? resourceVersion = default /// public static class ResourceVersions { - /// - /// 2024-04-01-preview. - /// - public static readonly string V2024_04_01_preview = "2024-04-01-preview"; - /// /// 2024-03-01. /// @@ -243,7 +238,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing WebPubSubService. /// - /// + /// /// The the Bicep identifier name of the WebPubSubService resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, @@ -251,8 +246,8 @@ public static class ResourceVersions /// /// Version of the WebPubSubService. /// The existing WebPubSubService resource. - public static WebPubSubService FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static WebPubSubService FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; /// /// Get the requirements for naming this WebPubSubService resource. @@ -268,7 +263,7 @@ public override ResourceNameRequirements GetResourceNameRequirements() => /// The keys for this WebPubSubService resource. public WebPubSubKeys GetKeys() => WebPubSubKeys.FromExpression( - new FunctionCallExpression(new MemberExpression(new IdentifierExpression(IdentifierName), "listKeys"))); + new FunctionCallExpression(new MemberExpression(new IdentifierExpression(BicepIdentifier), "listKeys"))); /// /// Creates a role assignment for a user-assigned identity that grants @@ -278,10 +273,10 @@ public WebPubSubKeys GetKeys() => /// The . /// The . public RoleAssignment CreateRoleAssignment(WebPubSubBuiltInRole role, UserAssignedIdentity identity) => - new($"{IdentifierName}_{identity.IdentifierName}_{WebPubSubBuiltInRole.GetBuiltInRoleName(role)}") + new($"{BicepIdentifier}_{identity.BicepIdentifier}_{WebPubSubBuiltInRole.GetBuiltInRoleName(role)}") { Name = BicepFunction.CreateGuid(Id, identity.PrincipalId, BicepFunction.GetSubscriptionResourceId("Microsoft.Authorization/roleDefinitions", role.ToString())), - Scope = new IdentifierExpression(IdentifierName), + Scope = new IdentifierExpression(BicepIdentifier), PrincipalType = RoleManagementPrincipalType.ServicePrincipal, RoleDefinitionId = BicepFunction.GetSubscriptionResourceId("Microsoft.Authorization/roleDefinitions", role.ToString()), PrincipalId = identity.PrincipalId @@ -294,13 +289,13 @@ public RoleAssignment CreateRoleAssignment(WebPubSubBuiltInRole role, UserAssign /// The role to grant. /// The type of the principal to assign to. /// The principal to assign to. - /// Optional role assignment identifier name suffix. + /// Optional role assignment identifier name suffix. /// The . - public RoleAssignment CreateRoleAssignment(WebPubSubBuiltInRole role, BicepValue principalType, BicepValue principalId, string? identifierNameSuffix = default) => - new($"{IdentifierName}_{WebPubSubBuiltInRole.GetBuiltInRoleName(role)}{(identifierNameSuffix is null ? "" : "_")}{identifierNameSuffix}") + public RoleAssignment CreateRoleAssignment(WebPubSubBuiltInRole role, BicepValue principalType, BicepValue principalId, string? bicepIdentifierSuffix = default) => + new($"{BicepIdentifier}_{WebPubSubBuiltInRole.GetBuiltInRoleName(role)}{(bicepIdentifierSuffix is null ? "" : "_")}{bicepIdentifierSuffix}") { Name = BicepFunction.CreateGuid(Id, principalId, BicepFunction.GetSubscriptionResourceId("Microsoft.Authorization/roleDefinitions", role.ToString())), - Scope = new IdentifierExpression(IdentifierName), + Scope = new IdentifierExpression(BicepIdentifier), PrincipalType = principalType, RoleDefinitionId = BicepFunction.GetSubscriptionResourceId("Microsoft.Authorization/roleDefinitions", role.ToString()), PrincipalId = principalId diff --git a/sdk/provisioning/Azure.Provisioning.WebPubSub/src/Generated/WebPubSubSharedPrivateLink.cs b/sdk/provisioning/Azure.Provisioning.WebPubSub/src/Generated/WebPubSubSharedPrivateLink.cs index 5b9892ed770b..21fcdeaeb7be 100644 --- a/sdk/provisioning/Azure.Provisioning.WebPubSub/src/Generated/WebPubSubSharedPrivateLink.cs +++ b/sdk/provisioning/Azure.Provisioning.WebPubSub/src/Generated/WebPubSubSharedPrivateLink.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.WebPubSub; /// /// WebPubSubSharedPrivateLink. /// -public partial class WebPubSubSharedPrivateLink : Resource +public partial class WebPubSubSharedPrivateLink : ProvisionableResource { /// /// The name of the shared private link resource. @@ -76,15 +76,15 @@ public partial class WebPubSubSharedPrivateLink : Resource /// /// Creates a new WebPubSubSharedPrivateLink. /// - /// + /// /// The the Bicep identifier name of the WebPubSubSharedPrivateLink /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the WebPubSubSharedPrivateLink. - public WebPubSubSharedPrivateLink(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.SignalRService/webPubSub/sharedPrivateLinkResources", resourceVersion ?? "2024-03-01") + public WebPubSubSharedPrivateLink(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.SignalRService/webPubSub/sharedPrivateLinkResources", resourceVersion ?? "2024-03-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _groupId = BicepValue.DefineProperty(this, "GroupId", ["properties", "groupId"]); @@ -102,11 +102,6 @@ public WebPubSubSharedPrivateLink(string identifierName, string? resourceVersion /// public static class ResourceVersions { - /// - /// 2024-04-01-preview. - /// - public static readonly string V2024_04_01_preview = "2024-04-01-preview"; - /// /// 2024-03-01. /// @@ -131,7 +126,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing WebPubSubSharedPrivateLink. /// - /// + /// /// The the Bicep identifier name of the WebPubSubSharedPrivateLink /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -139,6 +134,6 @@ public static class ResourceVersions /// /// Version of the WebPubSubSharedPrivateLink. /// The existing WebPubSubSharedPrivateLink resource. - public static WebPubSubSharedPrivateLink FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static WebPubSubSharedPrivateLink FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning/api/Azure.Provisioning.netstandard2.0.cs b/sdk/provisioning/Azure.Provisioning/api/Azure.Provisioning.netstandard2.0.cs index 57ca3792b790..49f436bae9f0 100644 --- a/sdk/provisioning/Azure.Provisioning/api/Azure.Provisioning.netstandard2.0.cs +++ b/sdk/provisioning/Azure.Provisioning/api/Azure.Provisioning.netstandard2.0.cs @@ -20,7 +20,7 @@ public void Clear() { } public bool ContainsKey(string key) { throw null; } public void CopyTo(System.Collections.Generic.KeyValuePair>[] array, int arrayIndex) { } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public static Azure.Provisioning.BicepDictionary DefineProperty(Azure.Provisioning.Primitives.ProvisioningConstruct construct, string propertyName, string[]? bicepPath, bool isOutput = false, bool isRequired = false) { throw null; } + public static Azure.Provisioning.BicepDictionary DefineProperty(Azure.Provisioning.Primitives.ProvisionableConstruct construct, string propertyName, string[]? bicepPath, bool isOutput = false, bool isRequired = false) { throw null; } public System.Collections.Generic.IEnumerator>> GetEnumerator() { throw null; } public static implicit operator Azure.Provisioning.BicepDictionary (Azure.Provisioning.ProvisioningVariable reference) { throw null; } public bool Remove(System.Collections.Generic.KeyValuePair> item) { throw null; } @@ -49,9 +49,9 @@ public void Clear() { } public bool Contains(Azure.Provisioning.BicepValue item) { throw null; } public void CopyTo(Azure.Provisioning.BicepValue[] array, int arrayIndex) { } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public static Azure.Provisioning.BicepList DefineProperty(Azure.Provisioning.Primitives.ProvisioningConstruct construct, string propertyName, string[]? bicepPath, bool isOutput = false, bool isRequired = false) { throw null; } + public static Azure.Provisioning.BicepList DefineProperty(Azure.Provisioning.Primitives.ProvisionableConstruct construct, string propertyName, string[]? bicepPath, bool isOutput = false, bool isRequired = false) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public static Azure.Provisioning.BicepList FromExpression(System.Func referenceFactory, Azure.Provisioning.Expressions.Expression expression) { throw null; } + public static Azure.Provisioning.BicepList FromExpression(System.Func referenceFactory, Azure.Provisioning.Expressions.BicepExpression expression) { throw null; } public System.Collections.Generic.IEnumerator> GetEnumerator() { throw null; } public int IndexOf(Azure.Provisioning.BicepValue item) { throw null; } public void Insert(int index, Azure.Provisioning.BicepValue item) { } @@ -63,9 +63,9 @@ public void RemoveAt(int index) { } public abstract partial class BicepValue { internal BicepValue() { } - public Azure.Provisioning.Expressions.Expression? Expression { get { throw null; } set { } } + public Azure.Provisioning.Expressions.BicepExpression? Expression { get { throw null; } set { } } public Azure.Provisioning.BicepValueKind Kind { get { throw null; } set { } } - public Azure.Provisioning.Expressions.Expression Compile() { throw null; } + public Azure.Provisioning.Expressions.BicepExpression Compile() { throw null; } public override string ToString() { throw null; } } public enum BicepValueKind @@ -76,79 +76,78 @@ public enum BicepValueKind } public partial class BicepValue : Azure.Provisioning.BicepValue { - public BicepValue(Azure.Provisioning.Expressions.Expression expression) { } + public BicepValue(Azure.Provisioning.Expressions.BicepExpression expression) { } public BicepValue(T literal) { } public T? Value { get { throw null; } } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public void Assign(Azure.Provisioning.BicepValue source) { } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public static Azure.Provisioning.BicepValue DefineProperty(Azure.Provisioning.Primitives.ProvisioningConstruct construct, string propertyName, string[]? bicepPath, bool isOutput = false, bool isRequired = false, bool isSecure = false, Azure.Provisioning.BicepValue? defaultValue = null) { throw null; } + public static Azure.Provisioning.BicepValue DefineProperty(Azure.Provisioning.Primitives.ProvisionableConstruct construct, string propertyName, string[]? bicepPath, bool isOutput = false, bool isRequired = false, bool isSecure = false, Azure.Provisioning.BicepValue? defaultValue = null, string? format = null) { throw null; } public static implicit operator Azure.Provisioning.BicepValue (Azure.Provisioning.BicepValue value) { throw null; } - public static implicit operator Azure.Provisioning.BicepValue (Azure.Provisioning.Expressions.Expression expression) { throw null; } + public static implicit operator Azure.Provisioning.BicepValue (Azure.Provisioning.Expressions.BicepExpression expression) { throw null; } public static implicit operator Azure.Provisioning.BicepValue (Azure.Provisioning.ProvisioningVariable reference) { throw null; } public static implicit operator Azure.Provisioning.BicepValue (T value) { throw null; } } public partial class Infrastructure : Azure.Provisioning.Primitives.Provisionable { - public Infrastructure(string name = "main") { } - public string Name { get { throw null; } } - public string? TargetScope { get { throw null; } set { } } + public Infrastructure(string bicepName = "main") { } + public string BicepName { get { throw null; } } + public Azure.Provisioning.Primitives.DeploymentScope? TargetScope { get { throw null; } set { } } public virtual void Add(Azure.Provisioning.Primitives.Provisionable resource) { } - public virtual Azure.Provisioning.ProvisioningPlan Build(Azure.Provisioning.ProvisioningContext? context = null) { throw null; } - protected internal override System.Collections.Generic.IEnumerable Compile() { throw null; } - protected internal System.Collections.Generic.IDictionary> CompileModules(Azure.Provisioning.ProvisioningContext? context = null) { throw null; } - public override System.Collections.Generic.IEnumerable GetResources() { throw null; } - public static bool IsValidIdentifierName(string? identifierName) { throw null; } - public static string NormalizeIdentifierName(string? identifierName) { throw null; } + public virtual Azure.Provisioning.ProvisioningPlan Build(Azure.Provisioning.ProvisioningBuildOptions? options = null) { throw null; } + protected internal override System.Collections.Generic.IEnumerable Compile() { throw null; } + protected internal System.Collections.Generic.IDictionary> CompileModules(Azure.Provisioning.ProvisioningBuildOptions? options = null) { throw null; } + public override System.Collections.Generic.IEnumerable GetProvisionableResources() { throw null; } + public static bool IsValidBicepIdentifier(string? bicepIdentifier) { throw null; } + public static string NormalizeBicepIdentifier(string? bicepIdentifier) { throw null; } public virtual void Remove(Azure.Provisioning.Primitives.Provisionable resource) { } - protected internal override void Resolve(Azure.Provisioning.ProvisioningContext? context = null) { } - protected internal override void Validate(Azure.Provisioning.ProvisioningContext? context = null) { } - public static void ValidateIdentifierName(string? identifierName, string? paramName = null) { } + protected internal override void Resolve(Azure.Provisioning.ProvisioningBuildOptions? options = null) { } + protected internal override void Validate(Azure.Provisioning.ProvisioningBuildOptions? options = null) { } + public static void ValidateBicepIdentifier(string? bicepIdentifier, string? paramName = null) { } } - public partial class ProvisioningContext + public partial class ProvisioningBuildOptions { - public ProvisioningContext() { } - public System.Collections.Generic.IList InfrastructureResolvers { get { throw null; } set { } } - public System.Collections.Generic.IList PropertyResolvers { get { throw null; } set { } } + public ProvisioningBuildOptions() { } + public System.Collections.Generic.IList InfrastructureResolvers { get { throw null; } } public System.Random Random { get { throw null; } set { } } } public partial class ProvisioningOutput : Azure.Provisioning.ProvisioningVariable { - public ProvisioningOutput(string name, Azure.Provisioning.Expressions.Expression type) : base (default(string), default(Azure.Provisioning.Expressions.Expression), default(Azure.Provisioning.BicepValue)) { } - public ProvisioningOutput(string name, System.Type type) : base (default(string), default(Azure.Provisioning.Expressions.Expression), default(Azure.Provisioning.BicepValue)) { } - protected internal override System.Collections.Generic.IEnumerable Compile() { throw null; } + public ProvisioningOutput(string bicepIdentifier, Azure.Provisioning.Expressions.BicepExpression type) : base (default(string), default(Azure.Provisioning.Expressions.BicepExpression), default(Azure.Provisioning.BicepValue)) { } + public ProvisioningOutput(string bicepIdentifier, System.Type type) : base (default(string), default(Azure.Provisioning.Expressions.BicepExpression), default(Azure.Provisioning.BicepValue)) { } + protected internal override System.Collections.Generic.IEnumerable Compile() { throw null; } } public partial class ProvisioningParameter : Azure.Provisioning.ProvisioningVariable { - public ProvisioningParameter(string name, Azure.Provisioning.Expressions.Expression type) : base (default(string), default(Azure.Provisioning.Expressions.Expression), default(Azure.Provisioning.BicepValue)) { } - public ProvisioningParameter(string name, System.Type type) : base (default(string), default(Azure.Provisioning.Expressions.Expression), default(Azure.Provisioning.BicepValue)) { } + public ProvisioningParameter(string bicepIdentifier, Azure.Provisioning.Expressions.BicepExpression type) : base (default(string), default(Azure.Provisioning.Expressions.BicepExpression), default(Azure.Provisioning.BicepValue)) { } + public ProvisioningParameter(string bicepIdentifier, System.Type type) : base (default(string), default(Azure.Provisioning.Expressions.BicepExpression), default(Azure.Provisioning.BicepValue)) { } public bool IsSecure { get { throw null; } set { } } - protected internal override System.Collections.Generic.IEnumerable Compile() { throw null; } + protected internal override System.Collections.Generic.IEnumerable Compile() { throw null; } } public partial class ProvisioningPlan { internal ProvisioningPlan() { } + public Azure.Provisioning.ProvisioningBuildOptions BuildOptions { get { throw null; } } public Azure.Provisioning.Infrastructure Infrastructure { get { throw null; } } - public Azure.Provisioning.ProvisioningContext ProvisioningContext { get { throw null; } } public System.Collections.Generic.IDictionary Compile() { throw null; } public System.Collections.Generic.IEnumerable Save(string directoryPath) { throw null; } } - public partial class ProvisioningVariable : Azure.Provisioning.Primitives.NamedProvisioningConstruct + public partial class ProvisioningVariable : Azure.Provisioning.Primitives.NamedProvisionableConstruct { - protected ProvisioningVariable(string name, Azure.Provisioning.Expressions.Expression type, Azure.Provisioning.BicepValue? value) : base (default(string)) { } - public ProvisioningVariable(string name, System.Type type) : base (default(string)) { } + protected ProvisioningVariable(string bicepIdentifier, Azure.Provisioning.Expressions.BicepExpression type, Azure.Provisioning.BicepValue? value) : base (default(string)) { } + public ProvisioningVariable(string bicepIdentifier, System.Type type) : base (default(string)) { } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public Azure.Provisioning.Expressions.Expression BicepType { get { throw null; } } + public Azure.Provisioning.Expressions.BicepExpression BicepType { get { throw null; } } public string? Description { get { throw null; } set { } } public Azure.Provisioning.BicepValue Value { get { throw null; } set { } } - protected internal override System.Collections.Generic.IEnumerable Compile() { throw null; } + protected internal override System.Collections.Generic.IEnumerable Compile() { throw null; } } } namespace Azure.Provisioning.Authorization { - public partial class AuthorizationRoleDefinition : Azure.Provisioning.Primitives.Resource + public partial class AuthorizationRoleDefinition : Azure.Provisioning.Primitives.ProvisionableResource { - public AuthorizationRoleDefinition(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public AuthorizationRoleDefinition(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepList AssignableScopes { get { throw null; } set { } } public Azure.Provisioning.BicepValue Description { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } @@ -157,7 +156,7 @@ public partial class AuthorizationRoleDefinition : Azure.Provisioning.Primitives public Azure.Provisioning.BicepValue RoleName { get { throw null; } set { } } public Azure.Provisioning.BicepValue RoleType { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.Authorization.AuthorizationRoleDefinition FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Authorization.AuthorizationRoleDefinition FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2015_06_01; @@ -167,7 +166,6 @@ public static partial class ResourceVersions public static readonly string V2017_09_01; public static readonly string V2018_07_01; public static readonly string V2022_04_01; - public static readonly string V2023_07_01_preview; } } public enum AuthorizationRoleType @@ -179,7 +177,7 @@ public enum NotificationDeliveryType { Email = 0, } - public partial class PolicyAssignmentProperties : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class PolicyAssignmentProperties : Azure.Provisioning.Primitives.ProvisionableConstruct { public PolicyAssignmentProperties() { } public Azure.Provisioning.BicepValue Id { get { throw null; } } @@ -195,9 +193,9 @@ public PolicyAssignmentProperties() { } public Azure.Provisioning.BicepValue ScopeType { get { throw null; } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } } - public partial class RoleAssignment : Azure.Provisioning.Primitives.Resource + public partial class RoleAssignment : Azure.Provisioning.Primitives.ProvisionableResource { - public RoleAssignment(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public RoleAssignment(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Condition { get { throw null; } set { } } public Azure.Provisioning.BicepValue ConditionVersion { get { throw null; } set { } } public Azure.Provisioning.BicepValue CreatedBy { get { throw null; } } @@ -213,7 +211,7 @@ public partial class RoleAssignment : Azure.Provisioning.Primitives.Resource public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepValue UpdatedBy { get { throw null; } } public Azure.Provisioning.BicepValue UpdatedOn { get { throw null; } } - public static Azure.Provisioning.Authorization.RoleAssignment FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Authorization.RoleAssignment FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2015_06_01; @@ -231,9 +229,9 @@ public enum RoleAssignmentEnablementRuleType Justification = 1, Ticketing = 2, } - public partial class RoleAssignmentScheduleRequest : Azure.Provisioning.Primitives.Resource + public partial class RoleAssignmentScheduleRequest : Azure.Provisioning.Primitives.ProvisionableResource { - public RoleAssignmentScheduleRequest(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public RoleAssignmentScheduleRequest(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue ApprovalId { get { throw null; } } public Azure.Provisioning.BicepValue Condition { get { throw null; } set { } } public Azure.Provisioning.BicepValue ConditionVersion { get { throw null; } set { } } @@ -258,20 +256,19 @@ public partial class RoleAssignmentScheduleRequest : Azure.Provisioning.Primitiv public Azure.Provisioning.BicepValue TargetRoleAssignmentScheduleId { get { throw null; } set { } } public Azure.Provisioning.BicepValue TargetRoleAssignmentScheduleInstanceId { get { throw null; } set { } } public Azure.Provisioning.BicepValue TicketInfo { get { throw null; } set { } } - public static Azure.Provisioning.Authorization.RoleAssignmentScheduleRequest FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Authorization.RoleAssignmentScheduleRequest FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2020_10_01; - public static readonly string V2022_04_01_preview; } } - public partial class RoleAssignmentScheduleTicketInfo : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class RoleAssignmentScheduleTicketInfo : Azure.Provisioning.Primitives.ProvisionableConstruct { public RoleAssignmentScheduleTicketInfo() { } public Azure.Provisioning.BicepValue TicketNumber { get { throw null; } set { } } public Azure.Provisioning.BicepValue TicketSystem { get { throw null; } set { } } } - public partial class RoleDefinitionPermission : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class RoleDefinitionPermission : Azure.Provisioning.Primitives.ProvisionableConstruct { public RoleDefinitionPermission() { } public Azure.Provisioning.BicepList Actions { get { throw null; } set { } } @@ -279,9 +276,9 @@ public RoleDefinitionPermission() { } public Azure.Provisioning.BicepList NotActions { get { throw null; } set { } } public Azure.Provisioning.BicepList NotDataActions { get { throw null; } set { } } } - public partial class RoleEligibilityScheduleRequest : Azure.Provisioning.Primitives.Resource + public partial class RoleEligibilityScheduleRequest : Azure.Provisioning.Primitives.ProvisionableResource { - public RoleEligibilityScheduleRequest(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public RoleEligibilityScheduleRequest(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue ApprovalId { get { throw null; } } public Azure.Provisioning.BicepValue Condition { get { throw null; } set { } } public Azure.Provisioning.BicepValue ConditionVersion { get { throw null; } set { } } @@ -305,14 +302,13 @@ public partial class RoleEligibilityScheduleRequest : Azure.Provisioning.Primiti public Azure.Provisioning.BicepValue TargetRoleEligibilityScheduleId { get { throw null; } set { } } public Azure.Provisioning.BicepValue TargetRoleEligibilityScheduleInstanceId { get { throw null; } set { } } public Azure.Provisioning.BicepValue TicketInfo { get { throw null; } set { } } - public static Azure.Provisioning.Authorization.RoleEligibilityScheduleRequest FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Authorization.RoleEligibilityScheduleRequest FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2020_10_01; - public static readonly string V2022_04_01_preview; } } - public partial class RoleEligibilityScheduleRequestPropertiesTicketInfo : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class RoleEligibilityScheduleRequestPropertiesTicketInfo : Azure.Provisioning.Primitives.ProvisionableConstruct { public RoleEligibilityScheduleRequestPropertiesTicketInfo() { } public Azure.Provisioning.BicepValue TicketNumber { get { throw null; } set { } } @@ -325,7 +321,7 @@ public enum RoleManagementApprovalMode Parallel = 2, NoApproval = 3, } - public partial class RoleManagementApprovalSettings : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class RoleManagementApprovalSettings : Azure.Provisioning.Primitives.ProvisionableConstruct { public RoleManagementApprovalSettings() { } public Azure.Provisioning.BicepValue ApprovalMode { get { throw null; } set { } } @@ -334,7 +330,7 @@ public RoleManagementApprovalSettings() { } public Azure.Provisioning.BicepValue IsApprovalRequiredForExtension { get { throw null; } set { } } public Azure.Provisioning.BicepValue IsRequestorJustificationRequired { get { throw null; } set { } } } - public partial class RoleManagementApprovalStage : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class RoleManagementApprovalStage : Azure.Provisioning.Primitives.ProvisionableConstruct { public RoleManagementApprovalStage() { } public Azure.Provisioning.BicepValue ApprovalStageTimeOutInDays { get { throw null; } set { } } @@ -349,7 +345,7 @@ public enum RoleManagementAssignmentLevel Assignment = 0, Eligibility = 1, } - public partial class RoleManagementExpandedProperties : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class RoleManagementExpandedProperties : Azure.Provisioning.Primitives.ProvisionableConstruct { public RoleManagementExpandedProperties() { } public Azure.Provisioning.BicepValue Email { get { throw null; } } @@ -368,9 +364,9 @@ public partial class RoleManagementPolicyApprovalRule : Azure.Provisioning.Autho public RoleManagementPolicyApprovalRule() { } public Azure.Provisioning.BicepValue Settings { get { throw null; } set { } } } - public partial class RoleManagementPolicyAssignment : Azure.Provisioning.Primitives.Resource + public partial class RoleManagementPolicyAssignment : Azure.Provisioning.Primitives.ProvisionableResource { - public RoleManagementPolicyAssignment(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public RoleManagementPolicyAssignment(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepList EffectiveRules { get { throw null; } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } @@ -379,11 +375,10 @@ public partial class RoleManagementPolicyAssignment : Azure.Provisioning.Primiti public Azure.Provisioning.BicepValue RoleDefinitionId { get { throw null; } set { } } public Azure.Provisioning.BicepValue Scope { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.Authorization.RoleManagementPolicyAssignment FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Authorization.RoleManagementPolicyAssignment FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2020_10_01; - public static readonly string V2020_10_01_preview; } } public partial class RoleManagementPolicyAuthenticationContextRule : Azure.Provisioning.Authorization.RoleManagementPolicyRule @@ -424,13 +419,13 @@ public enum RoleManagementPolicyRecipientType Approver = 1, Admin = 2, } - public partial class RoleManagementPolicyRule : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class RoleManagementPolicyRule : Azure.Provisioning.Primitives.ProvisionableConstruct { public RoleManagementPolicyRule() { } public Azure.Provisioning.BicepValue Id { get { throw null; } set { } } public Azure.Provisioning.BicepValue Target { get { throw null; } set { } } } - public partial class RoleManagementPolicyRuleTarget : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class RoleManagementPolicyRuleTarget : Azure.Provisioning.Primitives.ProvisionableConstruct { public RoleManagementPolicyRuleTarget() { } public Azure.Provisioning.BicepValue Caller { get { throw null; } set { } } @@ -440,7 +435,7 @@ public RoleManagementPolicyRuleTarget() { } public Azure.Provisioning.BicepList Operations { get { throw null; } set { } } public Azure.Provisioning.BicepList TargetObjects { get { throw null; } set { } } } - public partial class RoleManagementPrincipal : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class RoleManagementPrincipal : Azure.Provisioning.Primitives.ProvisionableConstruct { public RoleManagementPrincipal() { } public Azure.Provisioning.BicepValue DisplayName { get { throw null; } } @@ -508,7 +503,7 @@ public enum RoleManagementScopeType [System.Runtime.Serialization.DataMemberAttribute(Name="resourcegroup")] ResourceGroup = 2, } - public partial class RoleManagementUserInfo : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class RoleManagementUserInfo : Azure.Provisioning.Primitives.ProvisionableConstruct { public RoleManagementUserInfo() { } public Azure.Provisioning.BicepValue Description { get { throw null; } set { } } @@ -524,10 +519,19 @@ public enum RoleManagementUserType } namespace Azure.Provisioning.Expressions { - public partial class ArrayExpression : Azure.Provisioning.Expressions.Expression + public partial class ArrayExpression : Azure.Provisioning.Expressions.BicepExpression + { + public ArrayExpression(params Azure.Provisioning.Expressions.BicepExpression[] values) { } + public Azure.Provisioning.Expressions.BicepExpression[] Values { get { throw null; } } + } + public abstract partial class BicepExpression { - public ArrayExpression(params Azure.Provisioning.Expressions.Expression[] values) { } - public Azure.Provisioning.Expressions.Expression[] Values { get { throw null; } } + protected BicepExpression() { } + public static implicit operator Azure.Provisioning.Expressions.BicepExpression (bool value) { throw null; } + public static implicit operator Azure.Provisioning.Expressions.BicepExpression (int value) { throw null; } + public static implicit operator Azure.Provisioning.Expressions.BicepExpression (string value) { throw null; } + public override string ToString() { throw null; } + internal abstract Azure.Provisioning.Expressions.BicepWriter Write(Azure.Provisioning.Expressions.BicepWriter writer); } public static partial class BicepFunction { @@ -540,27 +544,44 @@ public static partial class BicepFunction public static Azure.Provisioning.BicepValue GetSubscriptionResourceId(params Azure.Provisioning.BicepValue[] values) { throw null; } public static Azure.Provisioning.Resources.Tenant GetTenant() { throw null; } public static Azure.Provisioning.BicepValue GetUniqueString(params Azure.Provisioning.BicepValue[] values) { throw null; } - public static Azure.Provisioning.BicepValue Interpolate(System.FormattableString text) { throw null; } + public static Azure.Provisioning.BicepValue Interpolate(Azure.Provisioning.Expressions.BicepInterpolatedStringHandler handler) { throw null; } public static Azure.Provisioning.BicepValue ParseJson(Azure.Provisioning.BicepValue value) { throw null; } public static Azure.Provisioning.BicepValue Take(Azure.Provisioning.BicepValue text, Azure.Provisioning.BicepValue size) { throw null; } public static Azure.Provisioning.BicepValue ToLower(Azure.Provisioning.BicepValue value) { throw null; } public static Azure.Provisioning.BicepValue ToUpper(Azure.Provisioning.BicepValue value) { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public ref partial struct BicepInterpolatedStringHandler + { + private object _dummy; + private int _dummyPrimitive; + public BicepInterpolatedStringHandler(int literalLength, int formattedCount) { throw null; } + public void AppendFormatted(T t) { } + public void AppendLiteral(string text) { } + } public partial class BicepProgram { - public BicepProgram(params Azure.Provisioning.Expressions.Statement[] body) { } - public Azure.Provisioning.Expressions.Statement[] Body { get { throw null; } } + public BicepProgram(params Azure.Provisioning.Expressions.BicepStatement[] body) { } + public Azure.Provisioning.Expressions.BicepStatement[] Body { get { throw null; } } public string? ModuleName { get { throw null; } set { } } public override string ToString() { throw null; } } - public partial class BinaryExpression : Azure.Provisioning.Expressions.Expression + public abstract partial class BicepStatement { - public BinaryExpression(Azure.Provisioning.Expressions.Expression left, Azure.Provisioning.Expressions.BinaryOperator op, Azure.Provisioning.Expressions.Expression right) { } - public Azure.Provisioning.Expressions.Expression Left { get { throw null; } } - public Azure.Provisioning.Expressions.BinaryOperator Operator { get { throw null; } } - public Azure.Provisioning.Expressions.Expression Right { get { throw null; } } + protected BicepStatement() { } + public override string ToString() { throw null; } + internal abstract Azure.Provisioning.Expressions.BicepWriter Write(Azure.Provisioning.Expressions.BicepWriter writer); + } + public partial class BicepStringBuilder + { + public BicepStringBuilder() { } + public Azure.Provisioning.Expressions.BicepStringBuilder Append(Azure.Provisioning.Expressions.BicepExpression expression) { throw null; } + public Azure.Provisioning.Expressions.BicepStringBuilder Append(Azure.Provisioning.Expressions.BicepInterpolatedStringHandler handler) { throw null; } + public Azure.Provisioning.Expressions.BicepStringBuilder Append(string text) { throw null; } + public Azure.Provisioning.BicepValue Build() { throw null; } + public static implicit operator Azure.Provisioning.BicepValue (Azure.Provisioning.Expressions.BicepStringBuilder value) { throw null; } } - public enum BinaryOperator + public enum BinaryBicepOperator { And = 0, Or = 1, @@ -579,295 +600,276 @@ public enum BinaryOperator Divide = 14, Modulo = 15, } - public partial class BoolLiteral : Azure.Provisioning.Expressions.Literal + public partial class BinaryExpression : Azure.Provisioning.Expressions.BicepExpression { - public BoolLiteral(bool value) : base (default(object)) { } - public bool Value { get { throw null; } } + public BinaryExpression(Azure.Provisioning.Expressions.BicepExpression left, Azure.Provisioning.Expressions.BinaryBicepOperator op, Azure.Provisioning.Expressions.BicepExpression right) { } + public Azure.Provisioning.Expressions.BicepExpression Left { get { throw null; } } + public Azure.Provisioning.Expressions.BinaryBicepOperator Operator { get { throw null; } } + public Azure.Provisioning.Expressions.BicepExpression Right { get { throw null; } } } - public partial class CommentStatement : Azure.Provisioning.Expressions.Statement + public partial class BoolLiteralExpression : Azure.Provisioning.Expressions.LiteralExpression { - public CommentStatement(string comment) { } - public string Comment { get { throw null; } } + public BoolLiteralExpression(bool value) : base (default(object)) { } + public new bool Value { get { throw null; } } } - public partial class ConditionalExpression : Azure.Provisioning.Expressions.Expression + public partial class CommentStatement : Azure.Provisioning.Expressions.BicepStatement { - public ConditionalExpression(Azure.Provisioning.Expressions.Expression condition, Azure.Provisioning.Expressions.Expression consequent, Azure.Provisioning.Expressions.Expression alternate) { } - public Azure.Provisioning.Expressions.Expression Alternate { get { throw null; } } - public Azure.Provisioning.Expressions.Expression Condition { get { throw null; } } - public Azure.Provisioning.Expressions.Expression Consequent { get { throw null; } } + public CommentStatement(string comment) { } + public string Comment { get { throw null; } } } - public partial class DecoratorExpression : Azure.Provisioning.Expressions.Expression + public partial class ConditionalExpression : Azure.Provisioning.Expressions.BicepExpression { - public DecoratorExpression(Azure.Provisioning.Expressions.Expression expr) { } - public Azure.Provisioning.Expressions.Expression Expr { get { throw null; } } + public ConditionalExpression(Azure.Provisioning.Expressions.BicepExpression condition, Azure.Provisioning.Expressions.BicepExpression consequent, Azure.Provisioning.Expressions.BicepExpression alternate) { } + public Azure.Provisioning.Expressions.BicepExpression Alternate { get { throw null; } } + public Azure.Provisioning.Expressions.BicepExpression Condition { get { throw null; } } + public Azure.Provisioning.Expressions.BicepExpression Consequent { get { throw null; } } } - public abstract partial class Expression + public partial class DecoratorExpression : Azure.Provisioning.Expressions.BicepExpression { - protected Expression() { } - public static implicit operator Azure.Provisioning.Expressions.Expression (bool value) { throw null; } - public static implicit operator Azure.Provisioning.Expressions.Expression (int value) { throw null; } - public static implicit operator Azure.Provisioning.Expressions.Expression (string value) { throw null; } - public override string ToString() { throw null; } - internal abstract Azure.Provisioning.Expressions.BicepWriter Write(Azure.Provisioning.Expressions.BicepWriter writer); + public DecoratorExpression(Azure.Provisioning.Expressions.BicepExpression value) { } + public Azure.Provisioning.Expressions.BicepExpression Value { get { throw null; } } } - public partial class ExprStatement : Azure.Provisioning.Expressions.Statement + public partial class ExpressionStatement : Azure.Provisioning.Expressions.BicepStatement { - public ExprStatement(Azure.Provisioning.Expressions.Expression expr) { } - public Azure.Provisioning.Expressions.Expression Expression { get { throw null; } } + public ExpressionStatement(Azure.Provisioning.Expressions.BicepExpression expression) { } + public Azure.Provisioning.Expressions.BicepExpression Expression { get { throw null; } } } - public partial class FunctionCallExpression : Azure.Provisioning.Expressions.Expression + public partial class FunctionCallExpression : Azure.Provisioning.Expressions.BicepExpression { - public FunctionCallExpression(Azure.Provisioning.Expressions.Expression function, params Azure.Provisioning.Expressions.Expression[] arguments) { } - public Azure.Provisioning.Expressions.Expression[] Arguments { get { throw null; } } - public Azure.Provisioning.Expressions.Expression Function { get { throw null; } } + public FunctionCallExpression(Azure.Provisioning.Expressions.BicepExpression function, params Azure.Provisioning.Expressions.BicepExpression[] arguments) { } + public Azure.Provisioning.Expressions.BicepExpression[] Arguments { get { throw null; } } + public Azure.Provisioning.Expressions.BicepExpression Function { get { throw null; } } } - public partial class IdentifierExpression : Azure.Provisioning.Expressions.Expression + public partial class IdentifierExpression : Azure.Provisioning.Expressions.BicepExpression { public IdentifierExpression(string name) { } public string Name { get { throw null; } } } - public partial class IndexExpression : Azure.Provisioning.Expressions.Expression + public partial class IndexExpression : Azure.Provisioning.Expressions.BicepExpression { - public IndexExpression(Azure.Provisioning.Expressions.Expression value, Azure.Provisioning.Expressions.Expression index) { } - public Azure.Provisioning.Expressions.Expression Index { get { throw null; } } - public Azure.Provisioning.Expressions.Expression Value { get { throw null; } } + public IndexExpression(Azure.Provisioning.Expressions.BicepExpression value, Azure.Provisioning.Expressions.BicepExpression index) { } + public Azure.Provisioning.Expressions.BicepExpression Index { get { throw null; } } + public Azure.Provisioning.Expressions.BicepExpression Value { get { throw null; } } } - public partial class InterpolatedString : Azure.Provisioning.Expressions.Expression + public partial class InterpolatedStringExpression : Azure.Provisioning.Expressions.BicepExpression { - public InterpolatedString(string format, Azure.Provisioning.Expressions.Expression[] values) { } - public string Format { get { throw null; } } - public Azure.Provisioning.Expressions.Expression[] Values { get { throw null; } } + public InterpolatedStringExpression(Azure.Provisioning.Expressions.BicepExpression[] values) { } + public Azure.Provisioning.Expressions.BicepExpression[] Values { get { throw null; } } } - public partial class IntLiteral : Azure.Provisioning.Expressions.Literal + public partial class IntLiteralExpression : Azure.Provisioning.Expressions.LiteralExpression { - public IntLiteral(int value) : base (default(object)) { } - public int Value { get { throw null; } } + public IntLiteralExpression(int value) : base (default(object)) { } + public new int Value { get { throw null; } } } - public abstract partial class Literal : Azure.Provisioning.Expressions.Expression + public abstract partial class LiteralExpression : Azure.Provisioning.Expressions.BicepExpression { - protected Literal(object? literalValue = null) { } - public object? LiteralValue { get { throw null; } } + protected LiteralExpression(object? value = null) { } + public object? Value { get { throw null; } } } - public partial class MemberExpression : Azure.Provisioning.Expressions.Expression + public partial class MemberExpression : Azure.Provisioning.Expressions.BicepExpression { - public MemberExpression(Azure.Provisioning.Expressions.Expression value, string member) { } + public MemberExpression(Azure.Provisioning.Expressions.BicepExpression value, string member) { } public string Member { get { throw null; } } - public Azure.Provisioning.Expressions.Expression Value { get { throw null; } } + public Azure.Provisioning.Expressions.BicepExpression Value { get { throw null; } } } - public partial class ModuleStatement : Azure.Provisioning.Expressions.Statement + public partial class ModuleStatement : Azure.Provisioning.Expressions.BicepStatement { - public ModuleStatement(string name, Azure.Provisioning.Expressions.Expression type, Azure.Provisioning.Expressions.Expression body) { } - public Azure.Provisioning.Expressions.Expression Body { get { throw null; } } + public ModuleStatement(string name, Azure.Provisioning.Expressions.BicepExpression type, Azure.Provisioning.Expressions.BicepExpression body) { } + public Azure.Provisioning.Expressions.BicepExpression Body { get { throw null; } } public System.Collections.Generic.IList Decorators { get { throw null; } } public string Name { get { throw null; } } - public Azure.Provisioning.Expressions.Expression Type { get { throw null; } } + public Azure.Provisioning.Expressions.BicepExpression Type { get { throw null; } } } - public partial class NestedExpression : Azure.Provisioning.Expressions.Expression + public partial class NestedExpression : Azure.Provisioning.Expressions.BicepExpression { - public NestedExpression(Azure.Provisioning.Expressions.Expression value, string nestedMember) { } + public NestedExpression(Azure.Provisioning.Expressions.BicepExpression value, string nestedMember) { } public string NestedMember { get { throw null; } } - public Azure.Provisioning.Expressions.Expression Value { get { throw null; } } + public Azure.Provisioning.Expressions.BicepExpression Value { get { throw null; } } } - public partial class NullLiteral : Azure.Provisioning.Expressions.Literal + public partial class NullLiteralExpression : Azure.Provisioning.Expressions.LiteralExpression { - public NullLiteral() : base (default(object)) { } + public NullLiteralExpression() : base (default(object)) { } } - public partial class ObjectExpression : Azure.Provisioning.Expressions.Expression + public partial class ObjectExpression : Azure.Provisioning.Expressions.BicepExpression { public ObjectExpression(params Azure.Provisioning.Expressions.PropertyExpression[] properties) { } public Azure.Provisioning.Expressions.PropertyExpression[] Properties { get { throw null; } } } - public partial class OutputStatement : Azure.Provisioning.Expressions.Statement + public partial class OutputStatement : Azure.Provisioning.Expressions.BicepStatement { - public OutputStatement(string name, Azure.Provisioning.Expressions.Expression type, Azure.Provisioning.Expressions.Expression value) { } + public OutputStatement(string name, Azure.Provisioning.Expressions.BicepExpression type, Azure.Provisioning.Expressions.BicepExpression value) { } public System.Collections.Generic.IList Decorators { get { throw null; } } public string Name { get { throw null; } } - public Azure.Provisioning.Expressions.Expression Type { get { throw null; } } - public Azure.Provisioning.Expressions.Expression Value { get { throw null; } } + public Azure.Provisioning.Expressions.BicepExpression Type { get { throw null; } } + public Azure.Provisioning.Expressions.BicepExpression Value { get { throw null; } } } - public partial class ParameterStatement : Azure.Provisioning.Expressions.Statement + public partial class ParameterStatement : Azure.Provisioning.Expressions.BicepStatement { - public ParameterStatement(string name, Azure.Provisioning.Expressions.Expression type, Azure.Provisioning.Expressions.Expression? defaultValue) { } + public ParameterStatement(string name, Azure.Provisioning.Expressions.BicepExpression type, Azure.Provisioning.Expressions.BicepExpression? defaultValue) { } public System.Collections.Generic.IList Decorators { get { throw null; } } - public Azure.Provisioning.Expressions.Expression? DefaultValue { get { throw null; } } + public Azure.Provisioning.Expressions.BicepExpression? DefaultValue { get { throw null; } } public string Name { get { throw null; } } - public Azure.Provisioning.Expressions.Expression Type { get { throw null; } } + public Azure.Provisioning.Expressions.BicepExpression Type { get { throw null; } } } - public partial class PropertyExpression : Azure.Provisioning.Expressions.Expression + public partial class PropertyExpression : Azure.Provisioning.Expressions.BicepExpression { - public PropertyExpression(string name, Azure.Provisioning.Expressions.Expression value) { } + public PropertyExpression(string name, Azure.Provisioning.Expressions.BicepExpression value) { } public string Name { get { throw null; } } - public Azure.Provisioning.Expressions.Expression Value { get { throw null; } } + public Azure.Provisioning.Expressions.BicepExpression Value { get { throw null; } } } - public partial class ResourceStatement : Azure.Provisioning.Expressions.Statement + public partial class ResourceStatement : Azure.Provisioning.Expressions.BicepStatement { - public ResourceStatement(string name, Azure.Provisioning.Expressions.Expression type, Azure.Provisioning.Expressions.Expression body) { } - public Azure.Provisioning.Expressions.Expression Body { get { throw null; } } + public ResourceStatement(string name, Azure.Provisioning.Expressions.BicepExpression type, Azure.Provisioning.Expressions.BicepExpression body) { } + public Azure.Provisioning.Expressions.BicepExpression Body { get { throw null; } } public System.Collections.Generic.IList Decorators { get { throw null; } } public bool Existing { get { throw null; } set { } } public string Name { get { throw null; } } - public Azure.Provisioning.Expressions.Expression Type { get { throw null; } } + public Azure.Provisioning.Expressions.BicepExpression Type { get { throw null; } } } - public partial class SafeIndexExpression : Azure.Provisioning.Expressions.Expression + public partial class SafeIndexExpression : Azure.Provisioning.Expressions.BicepExpression { - public SafeIndexExpression(Azure.Provisioning.Expressions.Expression value, Azure.Provisioning.Expressions.Expression index) { } - public Azure.Provisioning.Expressions.Expression Index { get { throw null; } } - public Azure.Provisioning.Expressions.Expression Value { get { throw null; } } + public SafeIndexExpression(Azure.Provisioning.Expressions.BicepExpression value, Azure.Provisioning.Expressions.BicepExpression index) { } + public Azure.Provisioning.Expressions.BicepExpression Index { get { throw null; } } + public Azure.Provisioning.Expressions.BicepExpression Value { get { throw null; } } } - public partial class SafeMemberExpression : Azure.Provisioning.Expressions.Expression + public partial class SafeMemberExpression : Azure.Provisioning.Expressions.BicepExpression { - public SafeMemberExpression(Azure.Provisioning.Expressions.Expression value, string member) { } + public SafeMemberExpression(Azure.Provisioning.Expressions.BicepExpression value, string member) { } public string Member { get { throw null; } } - public Azure.Provisioning.Expressions.Expression Value { get { throw null; } } - } - public abstract partial class Statement - { - protected Statement() { } - public override string ToString() { throw null; } - internal abstract Azure.Provisioning.Expressions.BicepWriter Write(Azure.Provisioning.Expressions.BicepWriter writer); + public Azure.Provisioning.Expressions.BicepExpression Value { get { throw null; } } } - public partial class StringLiteral : Azure.Provisioning.Expressions.Literal + public partial class StringLiteralExpression : Azure.Provisioning.Expressions.LiteralExpression { - public StringLiteral(string value) : base (default(object)) { } - public string Value { get { throw null; } } + public StringLiteralExpression(string value) : base (default(object)) { } + public new string Value { get { throw null; } } } - public partial class TargetScopeStatement : Azure.Provisioning.Expressions.Statement + public partial class TargetScopeStatement : Azure.Provisioning.Expressions.BicepStatement { - public TargetScopeStatement(Azure.Provisioning.Expressions.Expression scope) { } - public Azure.Provisioning.Expressions.Expression Scope { get { throw null; } } + public TargetScopeStatement(Azure.Provisioning.Expressions.BicepExpression scope) { } + public Azure.Provisioning.Expressions.BicepExpression Scope { get { throw null; } } } - public partial class TypeExpression : Azure.Provisioning.Expressions.Expression + public partial class TypeExpression : Azure.Provisioning.Expressions.BicepExpression { public TypeExpression(System.Type type) { } public System.Type Type { get { throw null; } } } - public partial class UnaryExpression : Azure.Provisioning.Expressions.Expression - { - public UnaryExpression(Azure.Provisioning.Expressions.UnaryOperator op, Azure.Provisioning.Expressions.Expression value) { } - public Azure.Provisioning.Expressions.UnaryOperator Operator { get { throw null; } } - public Azure.Provisioning.Expressions.Expression Value { get { throw null; } } - } - public enum UnaryOperator + public enum UnaryBicepOperator { Not = 0, Negate = 1, SuppressNull = 2, } - public partial class VariableStatement : Azure.Provisioning.Expressions.Statement + public partial class UnaryExpression : Azure.Provisioning.Expressions.BicepExpression { - public VariableStatement(string name, Azure.Provisioning.Expressions.Expression value) { } + public UnaryExpression(Azure.Provisioning.Expressions.UnaryBicepOperator op, Azure.Provisioning.Expressions.BicepExpression value) { } + public Azure.Provisioning.Expressions.UnaryBicepOperator Operator { get { throw null; } } + public Azure.Provisioning.Expressions.BicepExpression Value { get { throw null; } } + } + public partial class VariableStatement : Azure.Provisioning.Expressions.BicepStatement + { + public VariableStatement(string name, Azure.Provisioning.Expressions.BicepExpression value) { } public System.Collections.Generic.IList Decorators { get { throw null; } } public string Name { get { throw null; } } - public Azure.Provisioning.Expressions.Expression Value { get { throw null; } } + public Azure.Provisioning.Expressions.BicepExpression Value { get { throw null; } } } } namespace Azure.Provisioning.Primitives { - public partial class BicepLiteral : Azure.Provisioning.Primitives.NamedProvisioningConstruct + public partial class BicepLiteral : Azure.Provisioning.Primitives.ProvisionableConstruct { - public BicepLiteral(string resourceName, params Azure.Provisioning.Expressions.Statement[] statements) : base (default(string)) { } - public System.Collections.Generic.IList Statements { get { throw null; } } - protected internal override System.Collections.Generic.IEnumerable Compile() { throw null; } + public BicepLiteral(params Azure.Provisioning.Expressions.BicepStatement[] statements) { } + public System.Collections.Generic.IList Statements { get { throw null; } } + protected internal override System.Collections.Generic.IEnumerable Compile() { throw null; } } public partial class BicepValueReference { - public BicepValueReference(Azure.Provisioning.Primitives.ProvisioningConstruct construct, string propertyName, params string[]? path) { } + public BicepValueReference(Azure.Provisioning.Primitives.ProvisionableConstruct construct, string propertyName, params string[]? path) { } public System.Collections.Generic.IReadOnlyList? BicepPath { get { throw null; } } - public Azure.Provisioning.Primitives.ProvisioningConstruct Construct { get { throw null; } } + public Azure.Provisioning.Primitives.ProvisionableConstruct Construct { get { throw null; } } public string PropertyName { get { throw null; } } public override string ToString() { throw null; } } - public partial class ClientCreatorOutputResolver : Azure.Provisioning.Primitives.InfrastructureResolver + public enum DeploymentScope { - public ClientCreatorOutputResolver() { } - public override System.Collections.Generic.IEnumerable ResolveResources(Azure.Provisioning.ProvisioningContext context, System.Collections.Generic.IEnumerable resources) { throw null; } + ResourceGroup = 0, + Subscription = 1, + ManagementGroup = 2, + Tenant = 3, } public partial class DynamicResourceNamePropertyResolver : Azure.Provisioning.Primitives.ResourceNamePropertyResolver { public DynamicResourceNamePropertyResolver() { } - protected virtual Azure.Provisioning.BicepValue GetUniqueSuffix(Azure.Provisioning.ProvisioningContext context, Azure.Provisioning.Primitives.Resource resource) { throw null; } - public override Azure.Provisioning.BicepValue? ResolveName(Azure.Provisioning.ProvisioningContext context, Azure.Provisioning.Primitives.Resource resource, Azure.Provisioning.Primitives.ResourceNameRequirements requirements) { throw null; } - } - public partial interface IClientCreator - { - System.Collections.Generic.IEnumerable GetOutputs(); - } - public partial interface IClientCreator : Azure.Provisioning.Primitives.IClientCreator where TOptions : Azure.Core.ClientOptions - { - TClient CreateClient(System.Collections.Generic.IReadOnlyDictionary deploymentOutputs, Azure.Core.TokenCredential credential, TOptions? options = null); + protected virtual Azure.Provisioning.BicepValue GetUniqueSuffix(Azure.Provisioning.ProvisioningBuildOptions options, Azure.Provisioning.Primitives.ProvisionableResource resource) { throw null; } + public override Azure.Provisioning.BicepValue? ResolveName(Azure.Provisioning.ProvisioningBuildOptions options, Azure.Provisioning.Primitives.ProvisionableResource resource, Azure.Provisioning.Primitives.ResourceNameRequirements requirements) { throw null; } } public abstract partial class InfrastructureResolver { protected InfrastructureResolver() { } - public System.Collections.Generic.IEnumerable GetNestedInfrastructure(Azure.Provisioning.ProvisioningContext context, Azure.Provisioning.Infrastructure infrastructure) { throw null; } - public virtual void ResolveInfrastructure(Azure.Provisioning.ProvisioningContext context, Azure.Provisioning.Infrastructure infrastructure) { } - public virtual System.Collections.Generic.IEnumerable ResolveResources(Azure.Provisioning.ProvisioningContext context, System.Collections.Generic.IEnumerable resources) { throw null; } + public virtual System.Collections.Generic.IEnumerable GetNestedInfrastructure(Azure.Provisioning.Infrastructure infrastructure, Azure.Provisioning.ProvisioningBuildOptions options) { throw null; } + public virtual void ResolveInfrastructure(Azure.Provisioning.Infrastructure infrastructure, Azure.Provisioning.ProvisioningBuildOptions options) { } + public virtual void ResolveProperties(Azure.Provisioning.Primitives.ProvisionableConstruct construct, Azure.Provisioning.ProvisioningBuildOptions options) { } + public virtual System.Collections.Generic.IEnumerable ResolveResources(System.Collections.Generic.IEnumerable resources, Azure.Provisioning.ProvisioningBuildOptions options) { throw null; } } - public partial class LocationPropertyResolver : Azure.Provisioning.Primitives.PropertyResolver + public partial class LocationPropertyResolver : Azure.Provisioning.Primitives.InfrastructureResolver { public LocationPropertyResolver() { } - protected virtual Azure.Provisioning.BicepValue GetDefaultLocation(Azure.Provisioning.ProvisioningContext context, Azure.Provisioning.Primitives.ProvisioningConstruct construct) { throw null; } - public override void ResolveProperties(Azure.Provisioning.ProvisioningContext context, Azure.Provisioning.Primitives.ProvisioningConstruct construct) { } + protected virtual Azure.Provisioning.BicepValue GetDefaultLocation(Azure.Provisioning.ProvisioningBuildOptions options, Azure.Provisioning.Primitives.ProvisionableConstruct construct) { throw null; } + public override void ResolveProperties(Azure.Provisioning.Primitives.ProvisionableConstruct construct, Azure.Provisioning.ProvisioningBuildOptions options) { } } - public partial class ModuleImport : Azure.Provisioning.Primitives.NamedProvisioningConstruct + public partial class ModuleImport : Azure.Provisioning.Primitives.NamedProvisionableConstruct { - public ModuleImport(string identifierName, Azure.Provisioning.BicepValue path) : base (default(string)) { } + public ModuleImport(string bicepIdentifier, Azure.Provisioning.BicepValue path) : base (default(string)) { } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } public Azure.Provisioning.BicepDictionary Parameters { get { throw null; } } public Azure.Provisioning.BicepValue Path { get { throw null; } set { } } public Azure.Provisioning.BicepValue Scope { get { throw null; } set { } } - protected internal override System.Collections.Generic.IEnumerable Compile() { throw null; } - protected internal override void Validate(Azure.Provisioning.ProvisioningContext? context = null) { } + protected internal override System.Collections.Generic.IEnumerable Compile() { throw null; } + protected internal override void Validate(Azure.Provisioning.ProvisioningBuildOptions? options = null) { } } - public abstract partial class NamedProvisioningConstruct : Azure.Provisioning.Primitives.ProvisioningConstruct + public abstract partial class NamedProvisionableConstruct : Azure.Provisioning.Primitives.ProvisionableConstruct { - protected NamedProvisioningConstruct(string identifierName) { } - public string IdentifierName { get { throw null; } set { } } + protected NamedProvisionableConstruct(string bicepIdentifier) { } + public string BicepIdentifier { get { throw null; } set { } } } public partial class OrderingInfrastructureResolver : Azure.Provisioning.Primitives.InfrastructureResolver { public OrderingInfrastructureResolver() { } - public override System.Collections.Generic.IEnumerable ResolveResources(Azure.Provisioning.ProvisioningContext context, System.Collections.Generic.IEnumerable resources) { throw null; } - } - public abstract partial class PropertyResolver - { - protected PropertyResolver() { } - public abstract void ResolveProperties(Azure.Provisioning.ProvisioningContext context, Azure.Provisioning.Primitives.ProvisioningConstruct construct); + public override System.Collections.Generic.IEnumerable ResolveResources(System.Collections.Generic.IEnumerable resources, Azure.Provisioning.ProvisioningBuildOptions options) { throw null; } } public abstract partial class Provisionable { internal Provisionable() { } - protected internal abstract System.Collections.Generic.IEnumerable Compile(); - public virtual System.Collections.Generic.IEnumerable GetResources() { throw null; } - protected internal virtual void Resolve(Azure.Provisioning.ProvisioningContext? context = null) { } - protected internal virtual void Validate(Azure.Provisioning.ProvisioningContext? context = null) { } + protected internal abstract System.Collections.Generic.IEnumerable Compile(); + public virtual System.Collections.Generic.IEnumerable GetProvisionableResources() { throw null; } + protected internal virtual void Resolve(Azure.Provisioning.ProvisioningBuildOptions? options = null) { } + protected internal virtual void Validate(Azure.Provisioning.ProvisioningBuildOptions? options = null) { } } - public abstract partial class ProvisioningConstruct : Azure.Provisioning.Primitives.Provisionable + public abstract partial class ProvisionableConstruct : Azure.Provisioning.Primitives.Provisionable { - protected ProvisioningConstruct() { } + protected ProvisionableConstruct() { } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.Provisioning.Infrastructure? ParentInfrastructure { get { throw null; } } - protected internal override System.Collections.Generic.IEnumerable Compile() { throw null; } + protected internal override System.Collections.Generic.IEnumerable Compile() { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override System.Collections.Generic.IEnumerable GetResources() { throw null; } - protected internal void OverrideWithExpression(Azure.Provisioning.Expressions.Expression reference) { } - protected internal override void Resolve(Azure.Provisioning.ProvisioningContext? context = null) { } + public override System.Collections.Generic.IEnumerable GetProvisionableResources() { throw null; } + protected internal void OverrideWithExpression(Azure.Provisioning.Expressions.BicepExpression reference) { } + protected internal override void Resolve(Azure.Provisioning.ProvisioningBuildOptions? options = null) { } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public void SetProvisioningProperty(Azure.Provisioning.BicepValue property, Azure.Provisioning.BicepValue value) { } - protected internal override void Validate(Azure.Provisioning.ProvisioningContext? context = null) { } + protected internal override void Validate(Azure.Provisioning.ProvisioningBuildOptions? options = null) { } } - public abstract partial class Resource : Azure.Provisioning.Primitives.NamedProvisioningConstruct + public abstract partial class ProvisionableResource : Azure.Provisioning.Primitives.NamedProvisionableConstruct { - protected Resource(string resourceName, Azure.Core.ResourceType resourceType, string? resourceVersion = null) : base (default(string)) { } - public System.Collections.Generic.IList DependsOn { get { throw null; } } + protected ProvisionableResource(string bicepIdentifier, Azure.Core.ResourceType resourceType, string? resourceVersion = null) : base (default(string)) { } + public System.Collections.Generic.IList DependsOn { get { throw null; } } public bool IsExistingResource { get { throw null; } protected set { } } public Azure.Core.ResourceType ResourceType { get { throw null; } } public string? ResourceVersion { get { throw null; } set { } } - public virtual Azure.Provisioning.ProvisioningPlan Build(Azure.Provisioning.ProvisioningContext? context = null) { throw null; } - protected internal override System.Collections.Generic.IEnumerable Compile() { throw null; } + public virtual Azure.Provisioning.ProvisioningPlan Build(Azure.Provisioning.ProvisioningBuildOptions? options = null) { throw null; } + protected internal override System.Collections.Generic.IEnumerable Compile() { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual Azure.Provisioning.Primitives.ResourceNameRequirements GetResourceNameRequirements() { throw null; } - protected internal override void Validate(Azure.Provisioning.ProvisioningContext? context = null) { } + protected internal override void Validate(Azure.Provisioning.ProvisioningBuildOptions? options = null) { } } [System.FlagsAttribute] public enum ResourceNameCharacters @@ -882,11 +884,11 @@ public enum ResourceNameCharacters Period = 32, Parentheses = 64, } - public abstract partial class ResourceNamePropertyResolver : Azure.Provisioning.Primitives.PropertyResolver + public abstract partial class ResourceNamePropertyResolver : Azure.Provisioning.Primitives.InfrastructureResolver { protected ResourceNamePropertyResolver() { } - public abstract Azure.Provisioning.BicepValue? ResolveName(Azure.Provisioning.ProvisioningContext context, Azure.Provisioning.Primitives.Resource resource, Azure.Provisioning.Primitives.ResourceNameRequirements requirements); - public override void ResolveProperties(Azure.Provisioning.ProvisioningContext context, Azure.Provisioning.Primitives.ProvisioningConstruct construct) { } + public abstract Azure.Provisioning.BicepValue? ResolveName(Azure.Provisioning.ProvisioningBuildOptions options, Azure.Provisioning.Primitives.ProvisionableResource resource, Azure.Provisioning.Primitives.ResourceNameRequirements requirements); + public override void ResolveProperties(Azure.Provisioning.Primitives.ProvisionableConstruct construct, Azure.Provisioning.ProvisioningBuildOptions options) { } protected static string SanitizeText(string text, Azure.Provisioning.Primitives.ResourceNameCharacters validCharacters) { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] @@ -898,30 +900,30 @@ public readonly partial struct ResourceNameRequirements public int MinLength { get { throw null; } } public Azure.Provisioning.Primitives.ResourceNameCharacters ValidCharacters { get { throw null; } } } - public partial class ResourceReference where T : Azure.Provisioning.Primitives.Resource + public partial class ResourceReference where T : Azure.Provisioning.Primitives.ProvisionableResource { public ResourceReference(Azure.Provisioning.BicepValue reference) { } public T? Value { get { throw null; } set { } } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public static Azure.Provisioning.Primitives.ResourceReference DefineResource(Azure.Provisioning.Primitives.Resource construct, string propertyName, string[]? bicepPath, bool isOutput = false, bool isRequired = false, T? defaultValue = null) { throw null; } + public static Azure.Provisioning.Primitives.ResourceReference DefineResource(Azure.Provisioning.Primitives.ProvisionableResource construct, string propertyName, string[]? bicepPath, bool isOutput = false, bool isRequired = false, T? defaultValue = null) { throw null; } } public partial class StaticResourceNamePropertyResolver : Azure.Provisioning.Primitives.ResourceNamePropertyResolver { public StaticResourceNamePropertyResolver() { } - public override Azure.Provisioning.BicepValue? ResolveName(Azure.Provisioning.ProvisioningContext context, Azure.Provisioning.Primitives.Resource resource, Azure.Provisioning.Primitives.ResourceNameRequirements requirements) { throw null; } + public override Azure.Provisioning.BicepValue? ResolveName(Azure.Provisioning.ProvisioningBuildOptions options, Azure.Provisioning.Primitives.ProvisionableResource resource, Azure.Provisioning.Primitives.ResourceNameRequirements requirements) { throw null; } } } namespace Azure.Provisioning.Resources { - public partial class ApiProfile : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ApiProfile : Azure.Provisioning.Primitives.ProvisionableConstruct { public ApiProfile() { } public Azure.Provisioning.BicepValue ApiVersion { get { throw null; } } public Azure.Provisioning.BicepValue ProfileVersion { get { throw null; } } } - public partial class ArmApplication : Azure.Provisioning.Primitives.Resource + public partial class ArmApplication : Azure.Provisioning.Primitives.ProvisionableResource { - public ArmApplication(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public ArmApplication(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue ApplicationDefinitionId { get { throw null; } set { } } public Azure.Provisioning.BicepList Artifacts { get { throw null; } } public Azure.Provisioning.BicepList Authorizations { get { throw null; } } @@ -947,7 +949,7 @@ public partial class ArmApplication : Azure.Provisioning.Primitives.Resource public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } public Azure.Provisioning.BicepValue UpdatedBy { get { throw null; } } - public static Azure.Provisioning.Resources.ArmApplication FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Resources.ArmApplication FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2017_09_01; @@ -959,7 +961,7 @@ public static partial class ResourceVersions public static readonly string V2021_07_01; } } - public partial class ArmApplicationArtifact : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ArmApplicationArtifact : Azure.Provisioning.Primitives.ProvisionableConstruct { public ArmApplicationArtifact() { } public Azure.Provisioning.BicepValue ArtifactType { get { throw null; } } @@ -979,15 +981,15 @@ public enum ArmApplicationArtifactType Template = 1, Custom = 2, } - public partial class ArmApplicationAuthorization : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ArmApplicationAuthorization : Azure.Provisioning.Primitives.ProvisionableConstruct { public ArmApplicationAuthorization() { } public Azure.Provisioning.BicepValue PrincipalId { get { throw null; } set { } } public Azure.Provisioning.BicepValue RoleDefinitionId { get { throw null; } set { } } } - public partial class ArmApplicationDefinition : Azure.Provisioning.Primitives.Resource + public partial class ArmApplicationDefinition : Azure.Provisioning.Primitives.ProvisionableResource { - public ArmApplicationDefinition(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public ArmApplicationDefinition(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepList Artifacts { get { throw null; } set { } } public Azure.Provisioning.BicepList Authorizations { get { throw null; } set { } } public Azure.Provisioning.BicepValue CreateUiDefinition { get { throw null; } set { } } @@ -1008,7 +1010,7 @@ public partial class ArmApplicationDefinition : Azure.Provisioning.Primitives.Re public Azure.Provisioning.BicepValue Sku { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } - public static Azure.Provisioning.Resources.ArmApplicationDefinition FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Resources.ArmApplicationDefinition FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2017_09_01; @@ -1020,7 +1022,7 @@ public static partial class ResourceVersions public static readonly string V2021_07_01; } } - public partial class ArmApplicationDefinitionArtifact : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ArmApplicationDefinitionArtifact : Azure.Provisioning.Primitives.ProvisionableConstruct { public ArmApplicationDefinitionArtifact() { } public Azure.Provisioning.BicepValue ArtifactType { get { throw null; } set { } } @@ -1040,14 +1042,14 @@ public enum ArmApplicationDeploymentMode Incremental = 1, Complete = 2, } - public partial class ArmApplicationDetails : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ArmApplicationDetails : Azure.Provisioning.Primitives.ProvisionableConstruct { public ArmApplicationDetails() { } public Azure.Provisioning.BicepValue ApplicationId { get { throw null; } } public Azure.Provisioning.BicepValue ObjectId { get { throw null; } } public Azure.Provisioning.BicepValue Puid { get { throw null; } } } - public partial class ArmApplicationJitAccessPolicy : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ArmApplicationJitAccessPolicy : Azure.Provisioning.Primitives.ProvisionableConstruct { public ArmApplicationJitAccessPolicy() { } public Azure.Provisioning.BicepValue JitAccessEnabled { get { throw null; } set { } } @@ -1061,7 +1063,7 @@ public enum ArmApplicationLockLevel CanNotDelete = 1, ReadOnly = 2, } - public partial class ArmApplicationManagedIdentity : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ArmApplicationManagedIdentity : Azure.Provisioning.Primitives.ProvisionableConstruct { public ArmApplicationManagedIdentity() { } public Azure.Provisioning.BicepValue IdentityType { get { throw null; } set { } } @@ -1083,38 +1085,38 @@ public enum ArmApplicationManagementMode Unmanaged = 1, Managed = 2, } - public partial class ArmApplicationNotificationEndpoint : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ArmApplicationNotificationEndpoint : Azure.Provisioning.Primitives.ProvisionableConstruct { public ArmApplicationNotificationEndpoint() { } public Azure.Provisioning.BicepValue Uri { get { throw null; } set { } } } - public partial class ArmApplicationPackageContact : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ArmApplicationPackageContact : Azure.Provisioning.Primitives.ProvisionableConstruct { public ArmApplicationPackageContact() { } public Azure.Provisioning.BicepValue ContactName { get { throw null; } } public Azure.Provisioning.BicepValue Email { get { throw null; } } public Azure.Provisioning.BicepValue Phone { get { throw null; } } } - public partial class ArmApplicationPackageLockingPolicy : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ArmApplicationPackageLockingPolicy : Azure.Provisioning.Primitives.ProvisionableConstruct { public ArmApplicationPackageLockingPolicy() { } public Azure.Provisioning.BicepList AllowedActions { get { throw null; } set { } } public Azure.Provisioning.BicepList AllowedDataActions { get { throw null; } set { } } } - public partial class ArmApplicationPackageSupportUris : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ArmApplicationPackageSupportUris : Azure.Provisioning.Primitives.ProvisionableConstruct { public ArmApplicationPackageSupportUris() { } public Azure.Provisioning.BicepValue AzureGovernmentUri { get { throw null; } } public Azure.Provisioning.BicepValue AzurePublicCloudUri { get { throw null; } } } - public partial class ArmApplicationPolicy : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ArmApplicationPolicy : Azure.Provisioning.Primitives.ProvisionableConstruct { public ArmApplicationPolicy() { } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } public Azure.Provisioning.BicepValue Parameters { get { throw null; } set { } } public Azure.Provisioning.BicepValue PolicyDefinitionId { get { throw null; } set { } } } - public partial class ArmApplicationSku : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ArmApplicationSku : Azure.Provisioning.Primitives.ProvisionableConstruct { public ArmApplicationSku() { } public Azure.Provisioning.BicepValue Capacity { get { throw null; } set { } } @@ -1124,7 +1126,7 @@ public ArmApplicationSku() { } public Azure.Provisioning.BicepValue Size { get { throw null; } set { } } public Azure.Provisioning.BicepValue Tier { get { throw null; } set { } } } - public partial class ArmApplicationUserAssignedIdentity : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ArmApplicationUserAssignedIdentity : Azure.Provisioning.Primitives.ProvisionableConstruct { public ArmApplicationUserAssignedIdentity() { } public Azure.Provisioning.BicepValue PrincipalId { get { throw null; } } @@ -1155,7 +1157,7 @@ public ArmApplicationUserAssignedIdentity() { } public static bool operator !=(Azure.Provisioning.Resources.ArmBuiltInRole left, Azure.Provisioning.Resources.ArmBuiltInRole right) { throw null; } public override string ToString() { throw null; } } - public partial class ArmDependency : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ArmDependency : Azure.Provisioning.Primitives.ProvisionableConstruct { public ArmDependency() { } public Azure.Provisioning.BicepList DependsOn { get { throw null; } } @@ -1163,18 +1165,18 @@ public ArmDependency() { } public Azure.Provisioning.BicepValue ResourceName { get { throw null; } } public Azure.Provisioning.BicepValue ResourceType { get { throw null; } } } - public partial class ArmDeployment : Azure.Provisioning.Primitives.Resource + public partial class ArmDeployment : Azure.Provisioning.Primitives.ProvisionableResource { - public ArmDeployment(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public ArmDeployment(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Location { get { throw null; } } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } public Azure.Provisioning.BicepValue Properties { get { throw null; } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepDictionary Tags { get { throw null; } } - public static Azure.Provisioning.Resources.ArmDeployment FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Resources.ArmDeployment FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public static Azure.Provisioning.Resources.ArmDeployment FromExpression(Azure.Provisioning.Expressions.Expression expression) { throw null; } + public static Azure.Provisioning.Resources.ArmDeployment FromExpression(Azure.Provisioning.Expressions.BicepExpression expression) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override Azure.Provisioning.Primitives.ResourceNameRequirements GetResourceNameRequirements() { throw null; } public static partial class ResourceVersions @@ -1210,7 +1212,7 @@ public static partial class ResourceVersions public static readonly string V2023_07_01; } } - public partial class ArmDeploymentContent : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ArmDeploymentContent : Azure.Provisioning.Primitives.ProvisionableConstruct { public ArmDeploymentContent() { } public Azure.Provisioning.BicepValue Location { get { throw null; } set { } } @@ -1222,13 +1224,13 @@ public enum ArmDeploymentMode Incremental = 0, Complete = 1, } - public partial class ArmDeploymentParametersLink : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ArmDeploymentParametersLink : Azure.Provisioning.Primitives.ProvisionableConstruct { public ArmDeploymentParametersLink() { } public Azure.Provisioning.BicepValue ContentVersion { get { throw null; } set { } } public Azure.Provisioning.BicepValue Uri { get { throw null; } set { } } } - public partial class ArmDeploymentProperties : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ArmDeploymentProperties : Azure.Provisioning.Primitives.ProvisionableConstruct { public ArmDeploymentProperties() { } public Azure.Provisioning.BicepValue DebugSettingDetailLevel { get { throw null; } set { } } @@ -1240,7 +1242,7 @@ public ArmDeploymentProperties() { } public Azure.Provisioning.BicepValue Template { get { throw null; } set { } } public Azure.Provisioning.BicepValue TemplateLink { get { throw null; } set { } } } - public partial class ArmDeploymentPropertiesExtended : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ArmDeploymentPropertiesExtended : Azure.Provisioning.Primitives.ProvisionableConstruct { public ArmDeploymentPropertiesExtended() { } public Azure.Provisioning.BicepValue CorrelationId { get { throw null; } } @@ -1260,23 +1262,23 @@ public ArmDeploymentPropertiesExtended() { } public Azure.Provisioning.BicepValue Timestamp { get { throw null; } } public Azure.Provisioning.BicepList ValidatedResources { get { throw null; } } } - public partial class ArmDeploymentScript : Azure.Provisioning.Primitives.Resource + public partial class ArmDeploymentScript : Azure.Provisioning.Primitives.ProvisionableResource { - public ArmDeploymentScript(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public ArmDeploymentScript(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Identity { get { throw null; } set { } } public Azure.Provisioning.BicepValue Location { get { throw null; } set { } } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } - public static Azure.Provisioning.Resources.ArmDeploymentScript FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Resources.ArmDeploymentScript FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2020_10_01; public static readonly string V2023_08_01; } } - public partial class ArmDeploymentScriptManagedIdentity : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ArmDeploymentScriptManagedIdentity : Azure.Provisioning.Primitives.ProvisionableConstruct { public ArmDeploymentScriptManagedIdentity() { } public Azure.Provisioning.BicepValue IdentityType { get { throw null; } set { } } @@ -1287,7 +1289,7 @@ public enum ArmDeploymentScriptManagedIdentityType { UserAssigned = 0, } - public partial class ArmDeploymentTemplateLink : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ArmDeploymentTemplateLink : Azure.Provisioning.Primitives.ProvisionableConstruct { public ArmDeploymentTemplateLink() { } public Azure.Provisioning.BicepValue ContentVersion { get { throw null; } set { } } @@ -1301,7 +1303,7 @@ public partial class ArmDeploymentWhatIfProperties : Azure.Provisioning.Resource public ArmDeploymentWhatIfProperties() { } public Azure.Provisioning.BicepValue WhatIfResultFormat { get { throw null; } set { } } } - public partial class ArmPlan : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ArmPlan : Azure.Provisioning.Primitives.ProvisionableConstruct { public ArmPlan() { } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } @@ -1310,7 +1312,7 @@ public ArmPlan() { } public Azure.Provisioning.BicepValue Publisher { get { throw null; } set { } } public Azure.Provisioning.BicepValue Version { get { throw null; } set { } } } - public partial class ArmPolicyParameter : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ArmPolicyParameter : Azure.Provisioning.Primitives.ProvisionableConstruct { public ArmPolicyParameter() { } public Azure.Provisioning.BicepList AllowedValues { get { throw null; } set { } } @@ -1328,12 +1330,12 @@ public enum ArmPolicyParameterType Float = 5, DateTime = 6, } - public partial class ArmPolicyParameterValue : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ArmPolicyParameterValue : Azure.Provisioning.Primitives.ProvisionableConstruct { public ArmPolicyParameterValue() { } public Azure.Provisioning.BicepValue Value { get { throw null; } set { } } } - public partial class BasicArmDependency : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class BasicArmDependency : Azure.Provisioning.Primitives.ProvisionableConstruct { public BasicArmDependency() { } public Azure.Provisioning.BicepValue Id { get { throw null; } } @@ -1347,7 +1349,7 @@ public enum CreatedByType ManagedIdentity = 2, Key = 3, } - public partial class CreateManagementGroupDetails : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class CreateManagementGroupDetails : Azure.Provisioning.Primitives.ProvisionableConstruct { public CreateManagementGroupDetails() { } public Azure.Provisioning.BicepValue Parent { get { throw null; } set { } } @@ -1362,13 +1364,13 @@ public enum EnforcementMode Default = 1, DoNotEnforce = 2, } - public partial class ErrorDeployment : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ErrorDeployment : Azure.Provisioning.Primitives.ProvisionableConstruct { public ErrorDeployment() { } public Azure.Provisioning.BicepValue DeploymentName { get { throw null; } set { } } public Azure.Provisioning.BicepValue DeploymentType { get { throw null; } set { } } } - public partial class ErrorDeploymentExtended : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ErrorDeploymentExtended : Azure.Provisioning.Primitives.ProvisionableConstruct { public ErrorDeploymentExtended() { } public Azure.Provisioning.BicepValue DeploymentName { get { throw null; } } @@ -1386,7 +1388,7 @@ public enum ExpressionEvaluationScope Outer = 1, Inner = 2, } - public partial class ExtendedAzureLocation : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ExtendedAzureLocation : Azure.Provisioning.Primitives.ProvisionableConstruct { public ExtendedAzureLocation() { } public Azure.Provisioning.BicepValue ExtendedLocationType { get { throw null; } set { } } @@ -1396,9 +1398,9 @@ public enum ExtendedLocationType { EdgeZone = 0, } - public partial class GenericResource : Azure.Provisioning.Primitives.Resource + public partial class GenericResource : Azure.Provisioning.Primitives.ProvisionableResource { - public GenericResource(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public GenericResource(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue ChangedOn { get { throw null; } } public Azure.Provisioning.BicepValue CreatedOn { get { throw null; } } public Azure.Provisioning.BicepValue ExtendedLocation { get { throw null; } set { } } @@ -1414,7 +1416,7 @@ public partial class GenericResource : Azure.Provisioning.Primitives.Resource public Azure.Provisioning.BicepValue Sku { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } - public static Azure.Provisioning.Resources.GenericResource FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Resources.GenericResource FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } } public enum JitApprovalMode { @@ -1422,7 +1424,7 @@ public enum JitApprovalMode AutoApprove = 1, ManualApprove = 2, } - public partial class JitApprover : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class JitApprover : Azure.Provisioning.Primitives.ProvisionableConstruct { public JitApprover() { } public Azure.Provisioning.BicepValue ApproverType { get { throw null; } set { } } @@ -1436,15 +1438,15 @@ public enum JitApproverType [System.Runtime.Serialization.DataMemberAttribute(Name="group")] Group = 1, } - public partial class JitAuthorizationPolicies : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class JitAuthorizationPolicies : Azure.Provisioning.Primitives.ProvisionableConstruct { public JitAuthorizationPolicies() { } public Azure.Provisioning.BicepValue PrincipalId { get { throw null; } set { } } public Azure.Provisioning.BicepValue RoleDefinitionId { get { throw null; } set { } } } - public partial class JitRequest : Azure.Provisioning.Primitives.Resource + public partial class JitRequest : Azure.Provisioning.Primitives.ProvisionableResource { - public JitRequest(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public JitRequest(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue ApplicationResourceId { get { throw null; } set { } } public Azure.Provisioning.BicepValue CreatedBy { get { throw null; } } public Azure.Provisioning.BicepValue Id { get { throw null; } } @@ -1458,7 +1460,7 @@ public partial class JitRequest : Azure.Provisioning.Primitives.Resource public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } public Azure.Provisioning.BicepValue UpdatedBy { get { throw null; } } - public static Azure.Provisioning.Resources.JitRequest FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Resources.JitRequest FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2019_07_01; @@ -1476,7 +1478,7 @@ public enum JitRequestState Expired = 6, Timeout = 7, } - public partial class JitSchedulingPolicy : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class JitSchedulingPolicy : Azure.Provisioning.Primitives.ProvisionableConstruct { public JitSchedulingPolicy() { } public Azure.Provisioning.BicepValue Duration { get { throw null; } set { } } @@ -1489,18 +1491,18 @@ public enum JitSchedulingType Once = 1, Recurring = 2, } - public partial class LinkedTemplateArtifact : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class LinkedTemplateArtifact : Azure.Provisioning.Primitives.ProvisionableConstruct { public LinkedTemplateArtifact() { } public Azure.Provisioning.BicepValue Path { get { throw null; } set { } } public Azure.Provisioning.BicepValue Template { get { throw null; } set { } } } - public partial class ManagedByTenant : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ManagedByTenant : Azure.Provisioning.Primitives.ProvisionableConstruct { public ManagedByTenant() { } public Azure.Provisioning.BicepValue TenantId { get { throw null; } } } - public partial class ManagedServiceIdentity : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ManagedServiceIdentity : Azure.Provisioning.Primitives.ProvisionableConstruct { public ManagedServiceIdentity() { } public Azure.Provisioning.BicepValue ManagedServiceIdentityType { get { throw null; } set { } } @@ -1516,9 +1518,9 @@ public enum ManagedServiceIdentityType [System.Runtime.Serialization.DataMemberAttribute(Name="SystemAssigned, UserAssigned")] SystemAssignedUserAssigned = 3, } - public partial class ManagementGroup : Azure.Provisioning.Primitives.Resource + public partial class ManagementGroup : Azure.Provisioning.Primitives.ProvisionableResource { - public ManagementGroup(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public ManagementGroup(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepList Children { get { throw null; } } public Azure.Provisioning.BicepValue Details { get { throw null; } set { } } public Azure.Provisioning.BicepValue DisplayName { get { throw null; } set { } } @@ -1526,7 +1528,7 @@ public partial class ManagementGroup : Azure.Provisioning.Primitives.Resource public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepValue TenantId { get { throw null; } } - public static Azure.Provisioning.Resources.ManagementGroup FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Resources.ManagementGroup FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override Azure.Provisioning.Primitives.ResourceNameRequirements GetResourceNameRequirements() { throw null; } public static partial class ResourceVersions @@ -1540,7 +1542,7 @@ public static partial class ResourceVersions public static readonly string V2023_04_01; } } - public partial class ManagementGroupChildInfo : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ManagementGroupChildInfo : Azure.Provisioning.Primitives.ProvisionableConstruct { public ManagementGroupChildInfo() { } public Azure.Provisioning.BicepList Children { get { throw null; } } @@ -1549,7 +1551,7 @@ public ManagementGroupChildInfo() { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Name { get { throw null; } } } - public partial class ManagementGroupChildOptions : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ManagementGroupChildOptions : Azure.Provisioning.Primitives.ProvisionableConstruct { public ManagementGroupChildOptions() { } public Azure.Provisioning.BicepList Children { get { throw null; } } @@ -1565,7 +1567,7 @@ public enum ManagementGroupChildType [System.Runtime.Serialization.DataMemberAttribute(Name="/subscriptions")] Subscriptions = 1, } - public partial class ManagementGroupInfo : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ManagementGroupInfo : Azure.Provisioning.Primitives.ProvisionableConstruct { public ManagementGroupInfo() { } public Azure.Provisioning.BicepList ManagementGroupAncestorChain { get { throw null; } } @@ -1576,22 +1578,22 @@ public ManagementGroupInfo() { } public Azure.Provisioning.BicepValue UpdatedOn { get { throw null; } } public Azure.Provisioning.BicepValue Version { get { throw null; } } } - public partial class ManagementGroupParentCreateOptions : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ManagementGroupParentCreateOptions : Azure.Provisioning.Primitives.ProvisionableConstruct { public ManagementGroupParentCreateOptions() { } public Azure.Provisioning.BicepValue DisplayName { get { throw null; } } public Azure.Provisioning.BicepValue Id { get { throw null; } set { } } public Azure.Provisioning.BicepValue Name { get { throw null; } } } - public partial class ManagementGroupPathElement : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ManagementGroupPathElement : Azure.Provisioning.Primitives.ProvisionableConstruct { public ManagementGroupPathElement() { } public Azure.Provisioning.BicepValue DisplayName { get { throw null; } } public Azure.Provisioning.BicepValue Name { get { throw null; } } } - public partial class ManagementGroupPolicyDefinition : Azure.Provisioning.Primitives.Resource + public partial class ManagementGroupPolicyDefinition : Azure.Provisioning.Primitives.ProvisionableResource { - public ManagementGroupPolicyDefinition(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public ManagementGroupPolicyDefinition(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Description { get { throw null; } set { } } public Azure.Provisioning.BicepValue DisplayName { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } @@ -1602,7 +1604,7 @@ public partial class ManagementGroupPolicyDefinition : Azure.Provisioning.Primit public Azure.Provisioning.BicepValue PolicyRule { get { throw null; } set { } } public Azure.Provisioning.BicepValue PolicyType { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.Resources.ManagementGroupPolicyDefinition FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Resources.ManagementGroupPolicyDefinition FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override Azure.Provisioning.Primitives.ResourceNameRequirements GetResourceNameRequirements() { throw null; } public static partial class ResourceVersions @@ -1621,9 +1623,9 @@ public static partial class ResourceVersions public static readonly string V2023_04_01; } } - public partial class ManagementGroupPolicySetDefinition : Azure.Provisioning.Primitives.Resource + public partial class ManagementGroupPolicySetDefinition : Azure.Provisioning.Primitives.ProvisionableResource { - public ManagementGroupPolicySetDefinition(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public ManagementGroupPolicySetDefinition(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Description { get { throw null; } set { } } public Azure.Provisioning.BicepValue DisplayName { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } @@ -1634,7 +1636,7 @@ public partial class ManagementGroupPolicySetDefinition : Azure.Provisioning.Pri public Azure.Provisioning.BicepList PolicyDefinitions { get { throw null; } set { } } public Azure.Provisioning.BicepValue PolicyType { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.Resources.ManagementGroupPolicySetDefinition FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Resources.ManagementGroupPolicySetDefinition FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override Azure.Provisioning.Primitives.ResourceNameRequirements GetResourceNameRequirements() { throw null; } public static partial class ResourceVersions @@ -1651,9 +1653,9 @@ public static partial class ResourceVersions public static readonly string V2023_04_01; } } - public partial class ManagementGroupSubscription : Azure.Provisioning.Primitives.Resource + public partial class ManagementGroupSubscription : Azure.Provisioning.Primitives.ProvisionableResource { - public ManagementGroupSubscription(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public ManagementGroupSubscription(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue DisplayName { get { throw null; } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Name { get { throw null; } } @@ -1662,7 +1664,7 @@ public partial class ManagementGroupSubscription : Azure.Provisioning.Primitives public Azure.Provisioning.BicepValue State { get { throw null; } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepValue Tenant { get { throw null; } } - public static Azure.Provisioning.Resources.ManagementGroupSubscription FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Resources.ManagementGroupSubscription FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2018_03_01_beta; @@ -1674,16 +1676,16 @@ public static partial class ResourceVersions public static readonly string V2023_04_01; } } - public partial class ManagementLock : Azure.Provisioning.Primitives.Resource + public partial class ManagementLock : Azure.Provisioning.Primitives.ProvisionableResource { - public ManagementLock(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public ManagementLock(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Level { get { throw null; } set { } } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } public Azure.Provisioning.BicepValue Notes { get { throw null; } set { } } public Azure.Provisioning.BicepList Owners { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.Resources.ManagementLock FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Resources.ManagementLock FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override Azure.Provisioning.Primitives.ResourceNameRequirements GetResourceNameRequirements() { throw null; } public static partial class ResourceVersions @@ -1701,18 +1703,18 @@ public enum ManagementLockLevel CanNotDelete = 1, ReadOnly = 2, } - public partial class ManagementLockOwner : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ManagementLockOwner : Azure.Provisioning.Primitives.ProvisionableConstruct { public ManagementLockOwner() { } public Azure.Provisioning.BicepValue ApplicationId { get { throw null; } set { } } } - public partial class NonComplianceMessage : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class NonComplianceMessage : Azure.Provisioning.Primitives.ProvisionableConstruct { public NonComplianceMessage() { } public Azure.Provisioning.BicepValue Message { get { throw null; } set { } } public Azure.Provisioning.BicepValue PolicyDefinitionReferenceId { get { throw null; } set { } } } - public partial class ParameterDefinitionsValueMetadata : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ParameterDefinitionsValueMetadata : Azure.Provisioning.Primitives.ProvisionableConstruct { public ParameterDefinitionsValueMetadata() { } public Azure.Provisioning.BicepDictionary AdditionalProperties { get { throw null; } set { } } @@ -1721,16 +1723,16 @@ public ParameterDefinitionsValueMetadata() { } public Azure.Provisioning.BicepValue DisplayName { get { throw null; } set { } } public Azure.Provisioning.BicepValue StrongType { get { throw null; } set { } } } - public partial class ParentManagementGroupInfo : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ParentManagementGroupInfo : Azure.Provisioning.Primitives.ProvisionableConstruct { public ParentManagementGroupInfo() { } public Azure.Provisioning.BicepValue DisplayName { get { throw null; } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Name { get { throw null; } } } - public partial class PolicyAssignment : Azure.Provisioning.Primitives.Resource + public partial class PolicyAssignment : Azure.Provisioning.Primitives.ProvisionableResource { - public PolicyAssignment(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public PolicyAssignment(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Description { get { throw null; } set { } } public Azure.Provisioning.BicepValue DisplayName { get { throw null; } set { } } public Azure.Provisioning.BicepValue EnforcementMode { get { throw null; } set { } } @@ -1747,7 +1749,7 @@ public partial class PolicyAssignment : Azure.Provisioning.Primitives.Resource public Azure.Provisioning.BicepList ResourceSelectors { get { throw null; } set { } } public Azure.Provisioning.BicepValue Scope { get { throw null; } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.Resources.PolicyAssignment FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Resources.PolicyAssignment FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override Azure.Provisioning.Primitives.ResourceNameRequirements GetResourceNameRequirements() { throw null; } public static partial class ResourceVersions @@ -1768,7 +1770,7 @@ public static partial class ResourceVersions public static readonly string V2024_04_01; } } - public partial class PolicyDefinitionGroup : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class PolicyDefinitionGroup : Azure.Provisioning.Primitives.ProvisionableConstruct { public PolicyDefinitionGroup() { } public Azure.Provisioning.BicepValue AdditionalMetadataId { get { throw null; } set { } } @@ -1777,7 +1779,7 @@ public PolicyDefinitionGroup() { } public Azure.Provisioning.BicepValue DisplayName { get { throw null; } set { } } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } } - public partial class PolicyDefinitionReference : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class PolicyDefinitionReference : Azure.Provisioning.Primitives.ProvisionableConstruct { public PolicyDefinitionReference() { } public Azure.Provisioning.BicepList GroupNames { get { throw null; } set { } } @@ -1785,7 +1787,7 @@ public PolicyDefinitionReference() { } public Azure.Provisioning.BicepValue PolicyDefinitionId { get { throw null; } set { } } public Azure.Provisioning.BicepValue PolicyDefinitionReferenceId { get { throw null; } set { } } } - public partial class PolicyOverride : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class PolicyOverride : Azure.Provisioning.Primitives.ProvisionableConstruct { public PolicyOverride() { } public Azure.Provisioning.BicepValue Kind { get { throw null; } set { } } @@ -1811,14 +1813,14 @@ public enum ProviderAuthorizationConsentState NotRequired = 2, Consented = 3, } - public partial class ProviderExtendedLocation : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ProviderExtendedLocation : Azure.Provisioning.Primitives.ProvisionableConstruct { public ProviderExtendedLocation() { } public Azure.Provisioning.BicepList ExtendedLocations { get { throw null; } } public Azure.Provisioning.BicepValue Location { get { throw null; } } public Azure.Provisioning.BicepValue ProviderExtendedLocationType { get { throw null; } } } - public partial class ProviderResourceType : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ProviderResourceType : Azure.Provisioning.Primitives.ProvisionableConstruct { public ProviderResourceType() { } public Azure.Provisioning.BicepList Aliases { get { throw null; } } @@ -1832,9 +1834,9 @@ public ProviderResourceType() { } public Azure.Provisioning.BicepValue ResourceType { get { throw null; } } public Azure.Provisioning.BicepList ZoneMappings { get { throw null; } } } - public partial class ResourceGroup : Azure.Provisioning.Primitives.Resource + public partial class ResourceGroup : Azure.Provisioning.Primitives.ProvisionableResource { - public ResourceGroup(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public ResourceGroup(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Location { get { throw null; } set { } } public Azure.Provisioning.BicepValue ManagedBy { get { throw null; } set { } } @@ -1842,9 +1844,9 @@ public partial class ResourceGroup : Azure.Provisioning.Primitives.Resource public Azure.Provisioning.BicepValue ResourceGroupProvisioningState { get { throw null; } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } - public static Azure.Provisioning.Resources.ResourceGroup FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Resources.ResourceGroup FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public static Azure.Provisioning.Resources.ResourceGroup FromExpression(Azure.Provisioning.Expressions.Expression expression) { throw null; } + public static Azure.Provisioning.Resources.ResourceGroup FromExpression(Azure.Provisioning.Expressions.BicepExpression expression) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override Azure.Provisioning.Primitives.ResourceNameRequirements GetResourceNameRequirements() { throw null; } public static partial class ResourceVersions @@ -1891,10 +1893,9 @@ public static partial class ResourceVersions public static readonly string V2022_09_01; public static readonly string V2022_12_01; public static readonly string V2023_07_01; - public static readonly string V2023_07_01_preview; } } - public partial class ResourceProviderData : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ResourceProviderData : Azure.Provisioning.Primitives.ProvisionableConstruct { public ResourceProviderData() { } public Azure.Provisioning.BicepValue Id { get { throw null; } } @@ -1904,13 +1905,13 @@ public ResourceProviderData() { } public Azure.Provisioning.BicepValue RegistrationState { get { throw null; } } public Azure.Provisioning.BicepList ResourceTypes { get { throw null; } } } - public partial class ResourceSelector : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ResourceSelector : Azure.Provisioning.Primitives.ProvisionableConstruct { public ResourceSelector() { } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } public Azure.Provisioning.BicepList Selectors { get { throw null; } set { } } } - public partial class ResourceSelectorExpression : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ResourceSelectorExpression : Azure.Provisioning.Primitives.ProvisionableConstruct { public ResourceSelectorExpression() { } public Azure.Provisioning.BicepList In { get { throw null; } set { } } @@ -1943,7 +1944,7 @@ public enum ResourcesProvisioningState Succeeded = 10, Updating = 11, } - public partial class ResourcesSku : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ResourcesSku : Azure.Provisioning.Primitives.ProvisionableConstruct { public ResourcesSku() { } public Azure.Provisioning.BicepValue Capacity { get { throw null; } set { } } @@ -1953,7 +1954,7 @@ public ResourcesSku() { } public Azure.Provisioning.BicepValue Size { get { throw null; } set { } } public Azure.Provisioning.BicepValue Tier { get { throw null; } set { } } } - public partial class ResourceTypeAlias : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ResourceTypeAlias : Azure.Provisioning.Primitives.ProvisionableConstruct { public ResourceTypeAlias() { } public Azure.Provisioning.BicepValue AliasType { get { throw null; } } @@ -1963,7 +1964,7 @@ public ResourceTypeAlias() { } public Azure.Provisioning.BicepValue Name { get { throw null; } } public Azure.Provisioning.BicepList Paths { get { throw null; } } } - public partial class ResourceTypeAliasPath : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ResourceTypeAliasPath : Azure.Provisioning.Primitives.ProvisionableConstruct { public ResourceTypeAliasPath() { } public Azure.Provisioning.BicepList ApiVersions { get { throw null; } } @@ -1976,7 +1977,7 @@ public enum ResourceTypeAliasPathAttributes None = 0, Modifiable = 1, } - public partial class ResourceTypeAliasPathMetadata : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ResourceTypeAliasPathMetadata : Azure.Provisioning.Primitives.ProvisionableConstruct { public ResourceTypeAliasPathMetadata() { } public Azure.Provisioning.BicepValue Attributes { get { throw null; } } @@ -1993,7 +1994,7 @@ public enum ResourceTypeAliasPathTokenType Number = 6, Boolean = 7, } - public partial class ResourceTypeAliasPattern : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ResourceTypeAliasPattern : Azure.Provisioning.Primitives.ProvisionableConstruct { public ResourceTypeAliasPattern() { } public Azure.Provisioning.BicepValue PatternType { get { throw null; } } @@ -2017,14 +2018,14 @@ public enum SpendingLimit Off = 1, CurrentPeriodOff = 2, } - public partial class SubResource : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class SubResource : Azure.Provisioning.Primitives.ProvisionableConstruct { public SubResource() { } public Azure.Provisioning.BicepValue Id { get { throw null; } } } - public partial class Subscription : Azure.Provisioning.Primitives.Resource + public partial class Subscription : Azure.Provisioning.Primitives.ProvisionableResource { - public Subscription(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public Subscription(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue AuthorizationSource { get { throw null; } } public Azure.Provisioning.BicepValue DisplayName { get { throw null; } } public Azure.Provisioning.BicepValue Id { get { throw null; } } @@ -2035,7 +2036,7 @@ public partial class Subscription : Azure.Provisioning.Primitives.Resource public Azure.Provisioning.BicepDictionary Tags { get { throw null; } } public Azure.Provisioning.BicepValue TenantId { get { throw null; } } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public static Azure.Provisioning.Resources.Subscription FromExpression(Azure.Provisioning.Expressions.Expression expression) { throw null; } + public static Azure.Provisioning.Resources.Subscription FromExpression(Azure.Provisioning.Expressions.BicepExpression expression) { throw null; } public static partial class ResourceVersions { public static readonly string V2015_01_01; @@ -2063,16 +2064,16 @@ public static partial class ResourceVersions public static readonly string V2019_10_01; } } - public partial class SubscriptionPolicies : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class SubscriptionPolicies : Azure.Provisioning.Primitives.ProvisionableConstruct { public SubscriptionPolicies() { } public Azure.Provisioning.BicepValue LocationPlacementId { get { throw null; } } public Azure.Provisioning.BicepValue QuotaId { get { throw null; } } public Azure.Provisioning.BicepValue SpendingLimit { get { throw null; } } } - public partial class SubscriptionPolicyDefinition : Azure.Provisioning.Primitives.Resource + public partial class SubscriptionPolicyDefinition : Azure.Provisioning.Primitives.ProvisionableResource { - public SubscriptionPolicyDefinition(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public SubscriptionPolicyDefinition(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Description { get { throw null; } set { } } public Azure.Provisioning.BicepValue DisplayName { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } @@ -2083,13 +2084,13 @@ public partial class SubscriptionPolicyDefinition : Azure.Provisioning.Primitive public Azure.Provisioning.BicepValue PolicyRule { get { throw null; } set { } } public Azure.Provisioning.BicepValue PolicyType { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.Resources.SubscriptionPolicyDefinition FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Resources.SubscriptionPolicyDefinition FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override Azure.Provisioning.Primitives.ResourceNameRequirements GetResourceNameRequirements() { throw null; } } - public partial class SubscriptionPolicySetDefinition : Azure.Provisioning.Primitives.Resource + public partial class SubscriptionPolicySetDefinition : Azure.Provisioning.Primitives.ProvisionableResource { - public SubscriptionPolicySetDefinition(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public SubscriptionPolicySetDefinition(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Description { get { throw null; } set { } } public Azure.Provisioning.BicepValue DisplayName { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } @@ -2100,7 +2101,7 @@ public partial class SubscriptionPolicySetDefinition : Azure.Provisioning.Primit public Azure.Provisioning.BicepList PolicyDefinitions { get { throw null; } set { } } public Azure.Provisioning.BicepValue PolicyType { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.Resources.SubscriptionPolicySetDefinition FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Resources.SubscriptionPolicySetDefinition FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override Azure.Provisioning.Primitives.ResourceNameRequirements GetResourceNameRequirements() { throw null; } } @@ -2112,7 +2113,7 @@ public enum SubscriptionState Disabled = 3, Deleted = 4, } - public partial class SystemAssignedServiceIdentity : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class SystemAssignedServiceIdentity : Azure.Provisioning.Primitives.ProvisionableConstruct { public SystemAssignedServiceIdentity() { } public Azure.Provisioning.BicepValue PrincipalId { get { throw null; } } @@ -2124,7 +2125,7 @@ public enum SystemAssignedServiceIdentityType None = 0, SystemAssigned = 1, } - public partial class SystemData : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class SystemData : Azure.Provisioning.Primitives.ProvisionableConstruct { public SystemData() { } public Azure.Provisioning.BicepValue CreatedBy { get { throw null; } } @@ -2134,14 +2135,14 @@ public SystemData() { } public Azure.Provisioning.BicepValue LastModifiedByType { get { throw null; } } public Azure.Provisioning.BicepValue LastModifiedOn { get { throw null; } } } - public partial class TagResource : Azure.Provisioning.Primitives.Resource + public partial class TagResource : Azure.Provisioning.Primitives.ProvisionableResource { - public TagResource(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public TagResource(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Name { get { throw null; } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepDictionary TagValues { get { throw null; } set { } } - public static Azure.Provisioning.Resources.TagResource FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Resources.TagResource FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override Azure.Provisioning.Primitives.ResourceNameRequirements GetResourceNameRequirements() { throw null; } public static partial class ResourceVersions @@ -2155,9 +2156,9 @@ public static partial class ResourceVersions public static readonly string V2023_07_01; } } - public partial class TemplateSpec : Azure.Provisioning.Primitives.Resource + public partial class TemplateSpec : Azure.Provisioning.Primitives.ProvisionableResource { - public TemplateSpec(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public TemplateSpec(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Description { get { throw null; } set { } } public Azure.Provisioning.BicepValue DisplayName { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } @@ -2167,7 +2168,7 @@ public partial class TemplateSpec : Azure.Provisioning.Primitives.Resource public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } public Azure.Provisioning.BicepDictionary Versions { get { throw null; } } - public static Azure.Provisioning.Resources.TemplateSpec FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Resources.TemplateSpec FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override Azure.Provisioning.Primitives.ResourceNameRequirements GetResourceNameRequirements() { throw null; } public static partial class ResourceVersions @@ -2176,9 +2177,9 @@ public static partial class ResourceVersions public static readonly string V2022_02_01; } } - public partial class TemplateSpecVersion : Azure.Provisioning.Primitives.Resource + public partial class TemplateSpecVersion : Azure.Provisioning.Primitives.ProvisionableResource { - public TemplateSpecVersion(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public TemplateSpecVersion(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Description { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepList LinkedTemplates { get { throw null; } set { } } @@ -2190,23 +2191,23 @@ public partial class TemplateSpecVersion : Azure.Provisioning.Primitives.Resourc public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } public Azure.Provisioning.BicepValue UiFormDefinition { get { throw null; } set { } } - public static Azure.Provisioning.Resources.TemplateSpecVersion FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Resources.TemplateSpecVersion FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2021_05_01; public static readonly string V2022_02_01; } } - public partial class TemplateSpecVersionInfo : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class TemplateSpecVersionInfo : Azure.Provisioning.Primitives.ProvisionableConstruct { public TemplateSpecVersionInfo() { } public Azure.Provisioning.BicepValue Description { get { throw null; } } public Azure.Provisioning.BicepValue TimeCreated { get { throw null; } } public Azure.Provisioning.BicepValue TimeModified { get { throw null; } } } - public partial class Tenant : Azure.Provisioning.Primitives.Resource + public partial class Tenant : Azure.Provisioning.Primitives.ProvisionableResource { - public Tenant(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public Tenant(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue Country { get { throw null; } } public Azure.Provisioning.BicepValue CountryCode { get { throw null; } } public Azure.Provisioning.BicepValue DefaultDomain { get { throw null; } } @@ -2218,7 +2219,7 @@ public partial class Tenant : Azure.Provisioning.Primitives.Resource public Azure.Provisioning.BicepValue TenantId { get { throw null; } } public Azure.Provisioning.BicepValue TenantType { get { throw null; } } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public static Azure.Provisioning.Resources.Tenant FromExpression(Azure.Provisioning.Expressions.Expression expression) { throw null; } + public static Azure.Provisioning.Resources.Tenant FromExpression(Azure.Provisioning.Expressions.BicepExpression expression) { throw null; } public static partial class ResourceVersions { public static readonly string V2015_01_01; @@ -2252,7 +2253,7 @@ public enum TenantCategory ProjectedBy = 1, ManagedBy = 2, } - public partial class UserAssignedIdentityDetails : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class UserAssignedIdentityDetails : Azure.Provisioning.Primitives.ProvisionableConstruct { public UserAssignedIdentityDetails() { } public Azure.Provisioning.BicepValue ClientId { get { throw null; } } @@ -2263,12 +2264,12 @@ public enum WhatIfResultFormat ResourceIdOnly = 0, FullResourcePayloads = 1, } - public partial class WritableSubResource : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class WritableSubResource : Azure.Provisioning.Primitives.ProvisionableConstruct { public WritableSubResource() { } public Azure.Provisioning.BicepValue Id { get { throw null; } set { } } } - public partial class ZoneMapping : Azure.Provisioning.Primitives.ProvisioningConstruct + public partial class ZoneMapping : Azure.Provisioning.Primitives.ProvisionableConstruct { public ZoneMapping() { } public Azure.Provisioning.BicepValue Location { get { throw null; } } @@ -2277,9 +2278,9 @@ public ZoneMapping() { } } namespace Azure.Provisioning.Roles { - public partial class FederatedIdentityCredential : Azure.Provisioning.Primitives.Resource + public partial class FederatedIdentityCredential : Azure.Provisioning.Primitives.ProvisionableResource { - public FederatedIdentityCredential(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public FederatedIdentityCredential(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepList Audiences { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue IssuerUri { get { throw null; } set { } } @@ -2287,7 +2288,7 @@ public partial class FederatedIdentityCredential : Azure.Provisioning.Primitives public Azure.Provisioning.Roles.UserAssignedIdentity? Parent { get { throw null; } set { } } public Azure.Provisioning.BicepValue Subject { get { throw null; } set { } } public Azure.Provisioning.BicepValue SystemData { get { throw null; } } - public static Azure.Provisioning.Roles.FederatedIdentityCredential FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Roles.FederatedIdentityCredential FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } public static partial class ResourceVersions { public static readonly string V2022_01_31_PREVIEW; @@ -2295,9 +2296,9 @@ public static partial class ResourceVersions public static readonly string V2023_07_31_PREVIEW; } } - public partial class UserAssignedIdentity : Azure.Provisioning.Primitives.Resource + public partial class UserAssignedIdentity : Azure.Provisioning.Primitives.ProvisionableResource { - public UserAssignedIdentity(string identifierName, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public UserAssignedIdentity(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } public Azure.Provisioning.BicepValue ClientId { get { throw null; } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Location { get { throw null; } set { } } @@ -2306,7 +2307,7 @@ public partial class UserAssignedIdentity : Azure.Provisioning.Primitives.Resour public Azure.Provisioning.BicepValue SystemData { get { throw null; } } public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } public Azure.Provisioning.BicepValue TenantId { get { throw null; } } - public static Azure.Provisioning.Roles.UserAssignedIdentity FromExisting(string identifierName, string? resourceVersion = null) { throw null; } + public static Azure.Provisioning.Roles.UserAssignedIdentity FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override Azure.Provisioning.Primitives.ResourceNameRequirements GetResourceNameRequirements() { throw null; } public static partial class ResourceVersions diff --git a/sdk/provisioning/Azure.Provisioning/src/Authorization/AuthorizationRoleDefinition.cs b/sdk/provisioning/Azure.Provisioning/src/Authorization/AuthorizationRoleDefinition.cs index 23d0114e9c05..e29f76dc6278 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Authorization/AuthorizationRoleDefinition.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Authorization/AuthorizationRoleDefinition.cs @@ -12,5 +12,5 @@ public partial class AuthorizationRoleDefinition // naming policies won't be able to manage that as cleanly. Anyone who // really wants can override the value though. private partial BicepValue GetNameDefaultValue() => - BicepFunction.CreateGuid(BicepFunction.GetResourceGroup().Id, IdentifierName); + BicepFunction.CreateGuid(BicepFunction.GetResourceGroup().Id, BicepIdentifier); } diff --git a/sdk/provisioning/Azure.Provisioning/src/Authorization/RoleAssignment.cs b/sdk/provisioning/Azure.Provisioning/src/Authorization/RoleAssignment.cs index 9810a110667c..477fb0134efd 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Authorization/RoleAssignment.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Authorization/RoleAssignment.cs @@ -12,5 +12,5 @@ public partial class RoleAssignment // won't be able to manage that as cleanly. Anyone who really wants can // override the value though. private partial BicepValue GetNameDefaultValue() => - BicepFunction.CreateGuid(BicepFunction.GetResourceGroup().Id, IdentifierName); + BicepFunction.CreateGuid(BicepFunction.GetResourceGroup().Id, BicepIdentifier); } diff --git a/sdk/provisioning/Azure.Provisioning/src/BicepDictionaryOfT.cs b/sdk/provisioning/Azure.Provisioning/src/BicepDictionaryOfT.cs index 2a85fc175a3f..e575ef8157ed 100644 --- a/sdk/provisioning/Azure.Provisioning/src/BicepDictionaryOfT.cs +++ b/sdk/provisioning/Azure.Provisioning/src/BicepDictionaryOfT.cs @@ -37,7 +37,7 @@ public BicepDictionary() : this(self: null, values: null) { } /// public BicepDictionary(IDictionary>? values) : this(self: null, values) { } - private protected BicepDictionary(BicepValueReference? self, Expression expression) + private protected BicepDictionary(BicepValueReference? self, BicepExpression expression) : base(self, expression) => _values = new Dictionary>(); @@ -69,7 +69,7 @@ internal override void Assign(BicepValue source) /// /// The variable or parameter. public static implicit operator BicepDictionary(ProvisioningVariable reference) => - new(new BicepValueReference(reference, ""), BicepSyntax.Var(reference.IdentifierName)) { IsSecure = reference is ProvisioningParameter p && p.IsSecure }; + new(new BicepValueReference(reference, ""), BicepSyntax.Var(reference.BicepIdentifier)) { IsSecure = reference is ProvisioningParameter p && p.IsSecure }; // TODO: Make it possible to correctly reference these values (especially // across module boundaries)? Currently we only allow pulling values into @@ -136,7 +136,7 @@ IEnumerator> IEnumerable DefineProperty( - ProvisioningConstruct construct, + ProvisionableConstruct construct, string propertyName, string[]? bicepPath, bool isOutput = false, diff --git a/sdk/provisioning/Azure.Provisioning/src/BicepListOfT.cs b/sdk/provisioning/Azure.Provisioning/src/BicepListOfT.cs index e4b05df77946..a689b2b76623 100644 --- a/sdk/provisioning/Azure.Provisioning/src/BicepListOfT.cs +++ b/sdk/provisioning/Azure.Provisioning/src/BicepListOfT.cs @@ -34,8 +34,8 @@ public BicepList() : this(self: null, values: null) { } /// public BicepList(IList>? values) : this(self: null, values) { } - private BicepList(Expression expression) : base(self: null, expression) { _values = []; } - private protected BicepList(BicepValueReference? self, Expression expression) : base(self, expression) { _values = []; } + private BicepList(BicepExpression expression) : base(self: null, expression) { _values = []; } + private protected BicepList(BicepValueReference? self, BicepExpression expression) : base(self, expression) { _values = []; } private BicepList(BicepValueReference? self, IList>? values = null) : base(self) { @@ -66,7 +66,7 @@ internal override void Assign(BicepValue source) public static implicit operator BicepList(ProvisioningVariable reference) => new( new BicepValueReference(reference, ""), - BicepSyntax.Var(reference.IdentifierName)) + BicepSyntax.Var(reference.BicepIdentifier)) { IsSecure = reference is ProvisioningParameter p && p.IsSecure }; @@ -135,13 +135,13 @@ public BicepValue this[int index] /// /// A BicepList. [EditorBrowsable(EditorBrowsableState.Never)] - public static BicepList FromExpression(Func referenceFactory, Expression expression) => + public static BicepList FromExpression(Func referenceFactory, BicepExpression expression) => new(expression) { _referenceFactory = referenceFactory }; - private Func? _referenceFactory = null; + private Func? _referenceFactory = null; [EditorBrowsable(EditorBrowsableState.Never)] public static BicepList DefineProperty( - ProvisioningConstruct construct, + ProvisionableConstruct construct, string propertyName, string[]? bicepPath, bool isOutput = false, diff --git a/sdk/provisioning/Azure.Provisioning/src/BicepValue.cs b/sdk/provisioning/Azure.Provisioning/src/BicepValue.cs index e103cf139712..ab44a5d1d377 100644 --- a/sdk/provisioning/Azure.Provisioning/src/BicepValue.cs +++ b/sdk/provisioning/Azure.Provisioning/src/BicepValue.cs @@ -24,7 +24,7 @@ public abstract class BicepValue /// public BicepValueKind Kind { get; set; } = BicepValueKind.Unset; - public Expression? Expression { get; set; } = null; + public BicepExpression? Expression { get; set; } = null; // TODO: Lock down setter? At a minimum we should force Kind to stay in // sync, but I'm hoping to change both at once. @@ -48,18 +48,21 @@ public abstract class BicepValue // and test sanitization. internal bool IsSecure { get; set; } = false; + // Optional format defining how values should be serialized + internal string? Format { get; set; } = null; + // Indicate whether this value is empty or should be included in output internal virtual bool IsEmpty => Kind == BicepValueKind.Unset; // Naive Bicep type of the value. We don't support complex object types so // this is mostly to help map primitives. - private protected virtual Expression GetBicepType() => BicepSyntax.Types.Object; + private protected virtual BicepExpression GetBicepType() => BicepSyntax.Types.Object; // TODO: Clean these up when pulling richer objects out of BicepValue private protected BicepValue(BicepValueReference? self) => Self = self; private protected BicepValue(BicepValueReference? self, /* unused but forces literal */ object literal) : this(self) { Kind = BicepValueKind.Literal; } - private protected BicepValue(BicepValueReference? self, Expression expression) + private protected BicepValue(BicepValueReference? self, BicepExpression expression) : this(self) { Kind = BicepValueKind.Expression; Expression = expression; } // Assign a value to this property. @@ -97,7 +100,7 @@ public override string ToString() => _ => $"<{nameof(BicepValue)}: {Compile()}>", }; - public Expression Compile() => BicepTypeMapping.ToBicep(this); + public BicepExpression Compile() => BicepTypeMapping.ToBicep(this, Format); } /// diff --git a/sdk/provisioning/Azure.Provisioning/src/BicepValueOfT.cs b/sdk/provisioning/Azure.Provisioning/src/BicepValueOfT.cs index 06d1e1077426..14505a641889 100644 --- a/sdk/provisioning/Azure.Provisioning/src/BicepValueOfT.cs +++ b/sdk/provisioning/Azure.Provisioning/src/BicepValueOfT.cs @@ -29,15 +29,15 @@ public T? Value // than just return null, we'll return a reference expression if (IsOutput && Kind == BicepValueKind.Unset && - typeof(ProvisioningConstruct).IsAssignableFrom(typeof(T)) && - Self?.Construct is NamedProvisioningConstruct) + typeof(ProvisionableConstruct).IsAssignableFrom(typeof(T)) && + Self?.Construct is NamedProvisionableConstruct) { // TODO: This is obviously a hack but we need to decide if we'd // rather have a separate type for outputs (kind of like we // do with ResourceReference) or whether we want to merge // this concept into BicepValue. T val = Activator.CreateInstance(); - (val as ProvisioningConstruct)!.OverrideWithExpression(Self.GetReference()); + (val as ProvisionableConstruct)!.OverrideWithExpression(Self.GetReference()); return val; } @@ -49,7 +49,7 @@ public T? Value internal override object? GetLiteralValue() => Value; // Get the closest primitive to T - private protected override Expression GetBicepType() => + private protected override BicepExpression GetBicepType() => BicepSyntax.Types.Create(); /// @@ -62,11 +62,11 @@ public BicepValue(T literal) : this(self: null, literal) { } /// Creates a new BicepValue. /// /// An expression that evaluates to the value. - public BicepValue(Expression expression) : this(self: null, expression) { } + public BicepValue(BicepExpression expression) : this(self: null, expression) { } private protected BicepValue(BicepValueReference? self) : base(self) { } private protected BicepValue(BicepValueReference? self, T literal) : base(self, (object)literal!) { Value = literal; } - private protected BicepValue(BicepValueReference? self, Expression expression) : base(self, expression) { } + private protected BicepValue(BicepValueReference? self, BicepExpression expression) : base(self, expression) { } // Move strongly typed literal values when assigning [EditorBrowsable(EditorBrowsableState.Never)] @@ -113,9 +113,9 @@ public static implicit operator BicepValue(T value) // Otherwise just wrap the literal return new(value); } - public static implicit operator BicepValue(Expression expression) => new(expression); + public static implicit operator BicepValue(BicepExpression expression) => new(expression); public static implicit operator BicepValue(ProvisioningVariable reference) => - new(new BicepValueReference(reference, ""), BicepSyntax.Var(reference.IdentifierName)) { IsSecure = reference is ProvisioningParameter p && p.IsSecure }; + new(new BicepValueReference(reference, ""), BicepSyntax.Var(reference.BicepIdentifier)) { IsSecure = reference is ProvisioningParameter p && p.IsSecure }; // Special case conversions to string for things like Uri, AzureLocation, etc. public static implicit operator BicepValue(BicepValue value) => @@ -123,26 +123,28 @@ public static implicit operator BicepValue(BicepValue value) => { BicepValueKind.Unset => new(value.Self), BicepValueKind.Expression => new(value.Self, value.Expression!), - BicepValueKind.Literal => new(value.Self, BicepTypeMapping.ToLiteralString(value.Value!)), + BicepValueKind.Literal => new(value.Self, BicepTypeMapping.ToLiteralString(value.Value!, value.Format)), _ => throw new InvalidOperationException($"Unknown {nameof(BicepValueKind)}!") }; [EditorBrowsable(EditorBrowsableState.Never)] public static BicepValue DefineProperty( - ProvisioningConstruct construct, + ProvisionableConstruct construct, string propertyName, string[]? bicepPath, bool isOutput = false, bool isRequired = false, bool isSecure = false, - BicepValue? defaultValue = null) + BicepValue? defaultValue = null, + string? format = null) { BicepValue val = new(new BicepValueReference(construct, propertyName, bicepPath)) { IsOutput = isOutput, IsRequired = isRequired, - IsSecure = isSecure + IsSecure = isSecure, + Format = format }; if (defaultValue is not null) { val.Assign(defaultValue); } construct.ProvisioningProperties[propertyName] = val; diff --git a/sdk/provisioning/Azure.Provisioning/src/Expressions/AST.cs b/sdk/provisioning/Azure.Provisioning/src/Expressions/AST.cs index c1fac7db910c..2acd7ca44a45 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Expressions/AST.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Expressions/AST.cs @@ -4,7 +4,6 @@ using System; using System.Collections.Generic; using System.Linq; -using System.Text.RegularExpressions; namespace Azure.Provisioning.Expressions; @@ -14,97 +13,84 @@ namespace Azure.Provisioning.Expressions; // trying to glue them together better - if you need something not supported // here then you can drop down to Bicep directly. -public abstract class Expression +public abstract class BicepExpression { internal abstract BicepWriter Write(BicepWriter writer); public override string ToString() => new BicepWriter().Append(this).ToString(); - public static implicit operator Expression(string value) => new StringLiteral(value); - public static implicit operator Expression(int value) => new IntLiteral(value); - public static implicit operator Expression(bool value) => new BoolLiteral(value); + public static implicit operator BicepExpression(string value) => new StringLiteralExpression(value); + public static implicit operator BicepExpression(int value) => new IntLiteralExpression(value); + public static implicit operator BicepExpression(bool value) => new BoolLiteralExpression(value); } -public class IdentifierExpression(string name) : Expression +public class IdentifierExpression(string name) : BicepExpression { public string Name { get; } = name; internal override BicepWriter Write(BicepWriter writer) => writer.Append(Name); } -public abstract class Literal(object? literalValue = null) : Expression +public abstract class LiteralExpression(object? value = null) : BicepExpression { - public object? LiteralValue { get; } = literalValue; + public object? Value { get; } = value; } -public class NullLiteral() : Literal() +public class NullLiteralExpression() : LiteralExpression() { internal override BicepWriter Write(BicepWriter writer) => writer.Append("null"); } -public class BoolLiteral(bool value) : Literal(value) +public class BoolLiteralExpression(bool value) : LiteralExpression(value) { - public bool Value { get; } = value; + public new bool Value { get => (bool)base.Value!; } internal override BicepWriter Write(BicepWriter writer) => writer.Append(Value ? "true" : "false"); } -public class IntLiteral(int value) : Literal(value) +public class IntLiteralExpression(int value) : LiteralExpression(value) { - public int Value { get; } = value; + public new int Value { get => (int)base.Value!; } internal override BicepWriter Write(BicepWriter writer) => writer.Append(Value.ToString()); } -public class StringLiteral(string value) : Literal(value) +public class StringLiteralExpression(string value) : LiteralExpression(value) { - public string Value { get; } = value; + public new string Value { get => (string)base.Value!; } internal override BicepWriter Write(BicepWriter writer) => (Value == null) ? writer.Append("null") : writer.Append('\'').AppendEscaped(Value).Append('\''); } -public class InterpolatedString(string format, Expression[] values) : Expression +public class InterpolatedStringExpression(BicepExpression[] values) : BicepExpression { - public string Format { get; } = format; - public Expression[] Values { get; } = values; - private static readonly Regex s_formatArgument = new("(\\{\\d+\\})", RegexOptions.Compiled); + public BicepExpression[] Values { get; } = values; internal override BicepWriter Write(BicepWriter writer) { writer.Append('\''); - foreach (string segment in s_formatArgument.Split(Format)) + foreach (BicepExpression value in Values) { - if (string.IsNullOrEmpty(segment)) { continue; } - - if (s_formatArgument.IsMatch(segment)) + if (value is StringLiteralExpression lit) { - Expression value = Values[int.Parse(segment.TrimStart('{').TrimEnd('}'))]; - if (value is StringLiteral lit) - { - writer.AppendEscaped(lit.Value); - } - else - { - writer.Append("${").Append(value).Append('}'); - } + writer = writer.AppendEscaped(lit.Value); } else { - writer.AppendEscaped(segment); + writer = writer.Append("${").Append(value).Append('}'); } } - writer.Append('\''); - return writer; + return writer.Append('\''); } } -public class ArrayExpression(params Expression[] values) : Expression +public class ArrayExpression(params BicepExpression[] values) : BicepExpression { - public Expression[] Values { get; } = values; + public BicepExpression[] Values { get; } = values; internal override BicepWriter Write(BicepWriter writer) => writer.Append('[') .Indent(w => w.AppendLine().AppendAll(Values, (w, v) => w.Append(v), w => w./*Append(',').*/AppendLine())) .AppendLine().Append(']'); } -public class ObjectExpression(params PropertyExpression[] properties) : Expression +public class ObjectExpression(params PropertyExpression[] properties) : BicepExpression { public PropertyExpression[] Properties { get; } = properties; private static bool IsIdentifierChar(char c) => char.IsLetterOrDigit(c) || c == '_'; @@ -125,14 +111,14 @@ internal override BicepWriter Write(BicepWriter writer) => .AppendLine().Append('}'); } -public class PropertyExpression(string name, Expression value) : Expression +public class PropertyExpression(string name, BicepExpression value) : BicepExpression { public string Name { get; } = name; - public Expression Value { get; } = value; + public BicepExpression Value { get; } = value; internal override BicepWriter Write(BicepWriter writer) => throw new InvalidOperationException("Properties are only valid inside an object"); } -public class TypeExpression(Type type) : Expression +public class TypeExpression(Type type) : BicepExpression { public Type Type { get; } = type; internal override BicepWriter Write(BicepWriter writer) => @@ -141,143 +127,143 @@ internal override BicepWriter Write(BicepWriter writer) => throw new NotSupportedException($"Failed to automatically map {Type.FullName} into a {nameof(TypeExpression)}. Please explicitly choose a primitive type like bool, int, string, object, array, etc.")); } -public enum UnaryOperator { Not, Negate, SuppressNull } -public class UnaryExpression(UnaryOperator op, Expression value) : Expression +public enum UnaryBicepOperator { Not, Negate, SuppressNull } +public class UnaryExpression(UnaryBicepOperator op, BicepExpression value) : BicepExpression { - public UnaryOperator Operator { get; } = op; - public Expression Value { get; } = value; + public UnaryBicepOperator Operator { get; } = op; + public BicepExpression Value { get; } = value; internal override BicepWriter Write(BicepWriter writer) => Operator switch { - UnaryOperator.Not => writer.Append('!').Append(Value), - UnaryOperator.Negate => writer.Append('-').Append(Value), - UnaryOperator.SuppressNull => writer.Append(Value).Append('!'), - _ => throw new NotImplementedException($"Unknown {nameof(UnaryOperator)} value {Operator}") + UnaryBicepOperator.Not => writer.Append('!').Append(Value), + UnaryBicepOperator.Negate => writer.Append('-').Append(Value), + UnaryBicepOperator.SuppressNull => writer.Append(Value).Append('!'), + _ => throw new NotImplementedException($"Unknown {nameof(UnaryBicepOperator)} value {Operator}") }; } -public enum BinaryOperator { And, Or, Coalesce, Equal, EqualIgnoreCase, NotEqual, NotEqualIgnoreCase, Greater, GreaterOrEqual, Less, LessOrEqual, Add, Subtract, Multiply, Divide, Modulo } -public class BinaryExpression(Expression left, BinaryOperator op, Expression right) : Expression +public enum BinaryBicepOperator { And, Or, Coalesce, Equal, EqualIgnoreCase, NotEqual, NotEqualIgnoreCase, Greater, GreaterOrEqual, Less, LessOrEqual, Add, Subtract, Multiply, Divide, Modulo } +public class BinaryExpression(BicepExpression left, BinaryBicepOperator op, BicepExpression right) : BicepExpression { - public Expression Left { get; } = left; - public BinaryOperator Operator { get; } = op; - public Expression Right { get; } = right; + public BicepExpression Left { get; } = left; + public BinaryBicepOperator Operator { get; } = op; + public BicepExpression Right { get; } = right; internal override BicepWriter Write(BicepWriter writer) => writer.Append('(').Append(Left).Append(' ') .Append( Operator switch { - BinaryOperator.And => "&&", - BinaryOperator.Or => "||", - BinaryOperator.Coalesce => "??", - BinaryOperator.Equal => "==", - BinaryOperator.EqualIgnoreCase => "=~", - BinaryOperator.NotEqual => "!=", - BinaryOperator.NotEqualIgnoreCase => "!~", - BinaryOperator.Greater => ">", - BinaryOperator.GreaterOrEqual => ">=", - BinaryOperator.Less => "<", - BinaryOperator.LessOrEqual => "<=", - BinaryOperator.Add => "+", - BinaryOperator.Subtract => "-", - BinaryOperator.Multiply => "*", - BinaryOperator.Divide => "/", - BinaryOperator.Modulo => "%", - _ => throw new NotImplementedException($"Unknown {nameof(BinaryOperator)} value {Operator}"), + BinaryBicepOperator.And => "&&", + BinaryBicepOperator.Or => "||", + BinaryBicepOperator.Coalesce => "??", + BinaryBicepOperator.Equal => "==", + BinaryBicepOperator.EqualIgnoreCase => "=~", + BinaryBicepOperator.NotEqual => "!=", + BinaryBicepOperator.NotEqualIgnoreCase => "!~", + BinaryBicepOperator.Greater => ">", + BinaryBicepOperator.GreaterOrEqual => ">=", + BinaryBicepOperator.Less => "<", + BinaryBicepOperator.LessOrEqual => "<=", + BinaryBicepOperator.Add => "+", + BinaryBicepOperator.Subtract => "-", + BinaryBicepOperator.Multiply => "*", + BinaryBicepOperator.Divide => "/", + BinaryBicepOperator.Modulo => "%", + _ => throw new NotImplementedException($"Unknown {nameof(BinaryBicepOperator)} value {Operator}"), }) .Append(' ').Append(Right).Append(')'); } -public class ConditionalExpression(Expression condition, Expression consequent, Expression alternate) : Expression +public class ConditionalExpression(BicepExpression condition, BicepExpression consequent, BicepExpression alternate) : BicepExpression { - public Expression Condition { get; } = condition; - public Expression Consequent { get; } = consequent; - public Expression Alternate { get; } = alternate; + public BicepExpression Condition { get; } = condition; + public BicepExpression Consequent { get; } = consequent; + public BicepExpression Alternate { get; } = alternate; internal override BicepWriter Write(BicepWriter writer) => writer.Append(Condition).Append(" ? ").Append(Consequent).Append(" : ").Append(Alternate); } -public class IndexExpression(Expression value, Expression index) : Expression +public class IndexExpression(BicepExpression value, BicepExpression index) : BicepExpression { - public Expression Value { get; } = value; - public Expression Index { get; } = index; + public BicepExpression Value { get; } = value; + public BicepExpression Index { get; } = index; internal override BicepWriter Write(BicepWriter writer) => writer.Append(Value).Append('[').Append(Index).Append(']'); } -public class MemberExpression(Expression value, string member) : Expression +public class MemberExpression(BicepExpression value, string member) : BicepExpression { - public Expression Value { get; } = value; + public BicepExpression Value { get; } = value; public string Member { get; } = member; internal override BicepWriter Write(BicepWriter writer) => writer.Append(Value).Append('.').Append(Member); } -public class NestedExpression(Expression value, string nestedMember) : Expression +public class NestedExpression(BicepExpression value, string nestedMember) : BicepExpression { - public Expression Value { get; } = value; + public BicepExpression Value { get; } = value; public string NestedMember { get; } = nestedMember; internal override BicepWriter Write(BicepWriter writer) => writer.Append(Value).Append("::").Append(NestedMember); } -public class SafeIndexExpression(Expression value, Expression index) : Expression +public class SafeIndexExpression(BicepExpression value, BicepExpression index) : BicepExpression { - public Expression Value { get; } = value; - public Expression Index { get; } = index; + public BicepExpression Value { get; } = value; + public BicepExpression Index { get; } = index; internal override BicepWriter Write(BicepWriter writer) => writer.Append(Value).Append("[?").Append(Index).Append(']'); } -public class SafeMemberExpression(Expression value, string member) : Expression +public class SafeMemberExpression(BicepExpression value, string member) : BicepExpression { - public Expression Value { get; } = value; + public BicepExpression Value { get; } = value; public string Member { get; } = member; internal override BicepWriter Write(BicepWriter writer) => writer.Append(Value).Append(".?").Append(Member); } -public class DecoratorExpression(Expression expr) : Expression +public class DecoratorExpression(BicepExpression value) : BicepExpression { - public Expression Expr { get; } = expr; - internal override BicepWriter Write(BicepWriter writer) => writer.Append('@').Append(Expr); + public BicepExpression Value { get; } = value; + internal override BicepWriter Write(BicepWriter writer) => writer.Append('@').Append(Value); } -public class FunctionCallExpression(Expression function, params Expression[] arguments) : Expression +public class FunctionCallExpression(BicepExpression function, params BicepExpression[] arguments) : BicepExpression { - public Expression Function { get; } = function; - public Expression[] Arguments { get; } = arguments; + public BicepExpression Function { get; } = function; + public BicepExpression[] Arguments { get; } = arguments; internal override BicepWriter Write(BicepWriter writer) => writer.Append(Function).Append('(').AppendAll(Arguments, (w, a) => w.Append(a), w => w.Append(", ")).Append(')'); } -public abstract class Statement +public abstract class BicepStatement { internal abstract BicepWriter Write(BicepWriter writer); public override string ToString() => new BicepWriter().Append(this).ToString(); } -public class TargetScopeStatement(Expression scope) : Statement +public class TargetScopeStatement(BicepExpression scope) : BicepStatement { - public Expression Scope { get; } = scope; + public BicepExpression Scope { get; } = scope; internal override BicepWriter Write(BicepWriter writer) => writer.Append("targetScope = ").Append(Scope).AppendLine(); } -public class VariableStatement(string name, Expression value) : Statement +public class VariableStatement(string name, BicepExpression value) : BicepStatement { public string Name { get; } = name; - public Expression Value { get; } = value; + public BicepExpression Value { get; } = value; public IList Decorators { get; } = []; internal override BicepWriter Write(BicepWriter writer) => writer.AppendAll(Decorators, (w, d) => w.Append(d).AppendLine()).Append("var ").Append(Name).Append(" = ").Append(Value).AppendLine(); } -public class ParameterStatement(string name, Expression type, Expression? defaultValue) : Statement +public class ParameterStatement(string name, BicepExpression type, BicepExpression? defaultValue) : BicepStatement { public string Name { get; } = name; - public Expression Type { get; } = type; - public Expression? DefaultValue { get; } = defaultValue; + public BicepExpression Type { get; } = type; + public BicepExpression? DefaultValue { get; } = defaultValue; public IList Decorators { get; } = []; internal override BicepWriter Write(BicepWriter writer) => writer.AppendAll(Decorators, (w, d) => w.Append(d).AppendLine()).Append("param ").Append(Name).Append(' ').Append(Type) @@ -286,22 +272,22 @@ internal override BicepWriter Write(BicepWriter writer) => // note: use NullLiteral if you want a null default value } -public class OutputStatement(string name, Expression type, Expression value) : Statement +public class OutputStatement(string name, BicepExpression type, BicepExpression value) : BicepStatement { public string Name { get; } = name; - public Expression Type { get; } = type; - public Expression Value { get; } = value; + public BicepExpression Type { get; } = type; + public BicepExpression Value { get; } = value; public IList Decorators { get; } = []; internal override BicepWriter Write(BicepWriter writer) => writer.AppendAll(Decorators, (w, d) => w.Append(d).AppendLine()) .Append("output ").Append(Name).Append(' ').Append(Type).Append(" = ").Append(Value).AppendLine(); } -public class ResourceStatement(string name, Expression type, Expression body) : Statement +public class ResourceStatement(string name, BicepExpression type, BicepExpression body) : BicepStatement { public string Name { get; } = name; - public Expression Type { get; } = type; - public Expression Body { get; } = body; + public BicepExpression Type { get; } = type; + public BicepExpression Body { get; } = body; public bool Existing { get; set; } public IList Decorators { get; } = []; internal override BicepWriter Write(BicepWriter writer) => @@ -309,42 +295,42 @@ internal override BicepWriter Write(BicepWriter writer) => .Append("resource ").Append(Name).Append(' ').Append(Type).AppendIf(Existing, w => w.Append(" existing")).Append(" = ").Append(Body).AppendLine(); } -public class ModuleStatement(string name, Expression type, Expression body) : Statement +public class ModuleStatement(string name, BicepExpression type, BicepExpression body) : BicepStatement { public string Name { get; } = name; - public Expression Type { get; } = type; - public Expression Body { get; } = body; + public BicepExpression Type { get; } = type; + public BicepExpression Body { get; } = body; public IList Decorators { get; } = []; internal override BicepWriter Write(BicepWriter writer) => writer.AppendAll(Decorators, (w, d) => w.Append(d).AppendLine()) .Append("module ").Append(Name).Append(' ').Append(Type).Append(" = ").Append(Body).AppendLine(); } -public class CommentStatement(string comment) : Statement +public class CommentStatement(string comment) : BicepStatement { public string Comment { get; } = comment; internal override BicepWriter Write(BicepWriter writer) => writer.Append("// ").Append(Comment).AppendLine(); } -public class ExprStatement(Expression expr) : Statement +public class ExpressionStatement(BicepExpression expression) : BicepStatement { - public Expression Expression { get; } = expr; + public BicepExpression Expression { get; } = expression; internal override BicepWriter Write(BicepWriter writer) => writer.Append(Expression); } -public class BicepProgram(params Statement[] body) +public class BicepProgram(params BicepStatement[] body) { - public Statement[] Body { get; } = body; + public BicepStatement[] Body { get; } = body; public string? ModuleName { get; set; } public override string ToString() { BicepWriter writer = new(); // if (ModuleName != null) { writer.Append("// module ").Append(ModuleName).AppendLine(); } - foreach (Statement stmt in Body) + foreach (BicepStatement statement in Body) { - writer = writer.Append(stmt).AppendLine(); + writer = writer.Append(statement).AppendLine(); } return writer.ToString(); } diff --git a/sdk/provisioning/Azure.Provisioning/src/Expressions/BicepFunction.cs b/sdk/provisioning/Azure.Provisioning/src/Expressions/BicepFunction.cs index 0739bdfba8ef..76330c56e01e 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Expressions/BicepFunction.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Expressions/BicepFunction.cs @@ -297,36 +297,8 @@ public static BicepValue Concat(params BicepValue[] values) /// Convert a formattable string with literal text, C# expressions, and /// Bicep expressions into an interpolated Bicep string. /// - /// The formattable string. + /// A bicep interpolated string handler. /// An interpolated string. - public static BicepValue Interpolate(FormattableString text) - { - // TODO: Use the more efficient interpolated string handler rather than FormattableString - - if (text == null) { return BicepSyntax.Null(); } - - // Turn everything into BicepValues - BicepValue[] values = new BicepValue[text.ArgumentCount]; - for (int i = 0; i < text.ArgumentCount; i++) - { - values[i] = - text.GetArgument(i) switch - { - BicepValue v => v, - ProvisioningVariable v => BicepSyntax.Var(v.IdentifierName), - var a => new BicepValue(a?.ToString() ?? "") - }; - }; - - // Create an interpolated string expression - BicepValue result = BicepSyntax.Interpolate( - text.Format, - [.. values.Select(v => v.Compile())]); - - // Make the entire expression "secure" if any of the values are - result.IsSecure = values.Any(v => v.IsSecure); - // TODO: Link values to result to validate anything crossing module boundaries? - - return result; - } + public static BicepValue Interpolate(BicepInterpolatedStringHandler handler) => + handler.Build(); } diff --git a/sdk/provisioning/Azure.Provisioning/src/Expressions/BicepStringBuilder.cs b/sdk/provisioning/Azure.Provisioning/src/Expressions/BicepStringBuilder.cs new file mode 100644 index 000000000000..6e0f194ae6fe --- /dev/null +++ b/sdk/provisioning/Azure.Provisioning/src/Expressions/BicepStringBuilder.cs @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.Collections.Generic; +using System.Runtime.CompilerServices; + +namespace Azure.Provisioning.Expressions; + +// In addition to whether things are secure, also consider tracking +// dependencies across boundaries for automatic module splitting in +// the future + +/// +/// Utility to construct complex interpolated Bicep strings. +/// +public class BicepStringBuilder +{ + private readonly List _expressions = []; + private bool _isSecure = false; + + /// + /// Append literal text. + /// + /// Literal text. + /// This BicepStringBuilder. + public BicepStringBuilder Append(string text) + { + _expressions.Add(BicepSyntax.Value(text)); + return this; + } + + /// + /// Append a bicep expression. + /// + /// Bicep expression. + /// This BicepStringBuilder. + public BicepStringBuilder Append(BicepExpression expression) + { + _expressions.Add(expression); + return this; + } + + /// + /// Append an interpolated string composed of literals, expressions, + /// BicepValues, and ProvisioningParameters. + /// + /// Bicep interpolated string builder. + /// This BicepStringBuilder. + public BicepStringBuilder Append(BicepInterpolatedStringHandler handler) + { + _expressions.AddRange(handler._expressions); + _isSecure = _isSecure || handler._isSecure; + return this; + } + + /// + /// Combine all the subexpressions into a single interpolated string. + /// + /// The composed value. + public BicepValue Build() => + new(new InterpolatedStringExpression([.. _expressions])) { IsSecure = _isSecure }; + + /// + /// Implicitly convert a builder to a so + /// users aren't required to explicitly call . + /// + /// The builder. + public static implicit operator BicepValue(BicepStringBuilder value) => + value.Build(); +} + +/// +/// Interpolated string handler for building interpolated Bicep string +/// expressions. This is an implementation detail for the C# compiler. Users +/// should prefer either or +/// for constructing interpolated strings. +/// +/// Combined length of all literal segments. +/// Number of formatted segments. +[InterpolatedStringHandler] +#pragma warning disable CS9113 // Parameter is unread - literalLength is required for compiler pattern +public ref struct BicepInterpolatedStringHandler(int literalLength, int formattedCount) +#pragma warning restore CS9113 // Parameter is unread. +{ + internal readonly List _expressions = new(capacity: 2 * formattedCount + 1); + internal bool _isSecure = false; + + public void AppendLiteral(string text) => + _expressions.Add(BicepSyntax.Value(text)); + + public void AppendFormatted(T t) + { + if (t is BicepValue b) + { + _expressions.Add(b.Compile()); + _isSecure = _isSecure || b.IsSecure; + } + else if (t is ProvisioningVariable v) + { + _expressions.Add(BicepSyntax.Var(v.BicepIdentifier)); + _isSecure = _isSecure || v.Value.IsSecure; + } + else + { + string? s = t?.ToString(); + if (s is not null) + { + _expressions.Add(BicepSyntax.Value(s)); + } + } + } + + internal readonly BicepValue Build() => + new(new InterpolatedStringExpression([.. _expressions])) { IsSecure = _isSecure }; +} diff --git a/sdk/provisioning/Azure.Provisioning/src/Expressions/BicepSyntax.cs b/sdk/provisioning/Azure.Provisioning/src/Expressions/BicepSyntax.cs index 09f774bc001f..30fb806f2d80 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Expressions/BicepSyntax.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Expressions/BicepSyntax.cs @@ -11,48 +11,48 @@ namespace Azure.Provisioning.Expressions; internal static class BicepSyntax { - public static BicepProgram Program(params Statement[] body) => new(body); + public static BicepProgram Program(params BicepStatement[] body) => new(body); public static IdentifierExpression Var(string name) => new(name); - public static NullLiteral Null() => new(); - public static BoolLiteral Value(bool value) => new(value); - public static IntLiteral Value(int value) => new(value); - public static StringLiteral Value(string value) => new(value); - public static ArrayExpression Array(params Expression[] values) => new(values); - public static ObjectExpression Object(IDictionary properties) => new(properties.Keys.Select(k => new PropertyExpression(k, properties[k])).ToArray()); + public static NullLiteralExpression Null() => new(); + public static BoolLiteralExpression Value(bool value) => new(value); + public static IntLiteralExpression Value(int value) => new(value); + public static StringLiteralExpression Value(string value) => new(value); + public static ArrayExpression Array(params BicepExpression[] values) => new(values); + public static ObjectExpression Object(IDictionary properties) => new(properties.Keys.Select(k => new PropertyExpression(k, properties[k])).ToArray()); public static ObjectExpression Object(IDictionary properties) => new(properties.Keys.Select(k => new PropertyExpression(k, properties[k].Compile())).ToArray()); public static ObjectExpression Object(BicepDictionary properties) => new(properties.Keys.Select(k => new PropertyExpression(k, properties[k].Compile())).ToArray()); - public static UnaryExpression Not(Expression value) => new(UnaryOperator.Not, value); - public static UnaryExpression Negate(Expression value) => new(UnaryOperator.Negate, value); - public static UnaryExpression SuppressNull(Expression value) => new(UnaryOperator.SuppressNull, value); + public static UnaryExpression Not(BicepExpression value) => new(UnaryBicepOperator.Not, value); + public static UnaryExpression Negate(BicepExpression value) => new(UnaryBicepOperator.Negate, value); + public static UnaryExpression SuppressNull(BicepExpression value) => new(UnaryBicepOperator.SuppressNull, value); - public static BinaryExpression And(Expression left, Expression right) => new(left, BinaryOperator.And, right); - public static BinaryExpression Or(Expression left, Expression right) => new(left, BinaryOperator.Or, right); - public static BinaryExpression Coalesce(Expression left, Expression right) => new(left, BinaryOperator.Coalesce, right); - public static BinaryExpression Equal(Expression left, Expression right) => new(left, BinaryOperator.Equal, right); - public static BinaryExpression EqualIgnoreCase(Expression left, Expression right) => new(left, BinaryOperator.EqualIgnoreCase, right); - public static BinaryExpression NotEqual(Expression left, Expression right) => new(left, BinaryOperator.NotEqual, right); - public static BinaryExpression NotEqualIgnoreCase(Expression left, Expression right) => new(left, BinaryOperator.NotEqualIgnoreCase, right); - public static BinaryExpression Greater(Expression left, Expression right) => new(left, BinaryOperator.Greater, right); - public static BinaryExpression GreaterOrEqual(Expression left, Expression right) => new(left, BinaryOperator.GreaterOrEqual, right); - public static BinaryExpression Less(Expression left, Expression right) => new(left, BinaryOperator.Less, right); - public static BinaryExpression LessOrEqual(Expression left, Expression right) => new(left, BinaryOperator.LessOrEqual, right); - public static BinaryExpression Add(Expression left, Expression right) => new(left, BinaryOperator.Add, right); - public static BinaryExpression Subtract(Expression left, Expression right) => new(left, BinaryOperator.Subtract, right); - public static BinaryExpression Multiply(Expression left, Expression right) => new(left, BinaryOperator.Multiply, right); - public static BinaryExpression Divide(Expression left, Expression right) => new(left, BinaryOperator.Divide, right); - public static BinaryExpression Modulo(Expression left, Expression right) => new(left, BinaryOperator.Modulo, right); + public static BinaryExpression And(BicepExpression left, BicepExpression right) => new(left, BinaryBicepOperator.And, right); + public static BinaryExpression Or(BicepExpression left, BicepExpression right) => new(left, BinaryBicepOperator.Or, right); + public static BinaryExpression Coalesce(BicepExpression left, BicepExpression right) => new(left, BinaryBicepOperator.Coalesce, right); + public static BinaryExpression Equal(BicepExpression left, BicepExpression right) => new(left, BinaryBicepOperator.Equal, right); + public static BinaryExpression EqualIgnoreCase(BicepExpression left, BicepExpression right) => new(left, BinaryBicepOperator.EqualIgnoreCase, right); + public static BinaryExpression NotEqual(BicepExpression left, BicepExpression right) => new(left, BinaryBicepOperator.NotEqual, right); + public static BinaryExpression NotEqualIgnoreCase(BicepExpression left, BicepExpression right) => new(left, BinaryBicepOperator.NotEqualIgnoreCase, right); + public static BinaryExpression Greater(BicepExpression left, BicepExpression right) => new(left, BinaryBicepOperator.Greater, right); + public static BinaryExpression GreaterOrEqual(BicepExpression left, BicepExpression right) => new(left, BinaryBicepOperator.GreaterOrEqual, right); + public static BinaryExpression Less(BicepExpression left, BicepExpression right) => new(left, BinaryBicepOperator.Less, right); + public static BinaryExpression LessOrEqual(BicepExpression left, BicepExpression right) => new(left, BinaryBicepOperator.LessOrEqual, right); + public static BinaryExpression Add(BicepExpression left, BicepExpression right) => new(left, BinaryBicepOperator.Add, right); + public static BinaryExpression Subtract(BicepExpression left, BicepExpression right) => new(left, BinaryBicepOperator.Subtract, right); + public static BinaryExpression Multiply(BicepExpression left, BicepExpression right) => new(left, BinaryBicepOperator.Multiply, right); + public static BinaryExpression Divide(BicepExpression left, BicepExpression right) => new(left, BinaryBicepOperator.Divide, right); + public static BinaryExpression Modulo(BicepExpression left, BicepExpression right) => new(left, BinaryBicepOperator.Modulo, right); - public static ConditionalExpression Conditional(Expression condition, Expression consequent, Expression alternate) => new(condition, consequent, alternate); + public static ConditionalExpression Conditional(BicepExpression condition, BicepExpression consequent, BicepExpression alternate) => new(condition, consequent, alternate); - public static FunctionCallExpression Call(Expression func, params Expression[] args) => new(func, args); - public static FunctionCallExpression Call(string func, params Expression[] args) => Call(Var(func), args); + public static FunctionCallExpression Call(BicepExpression func, params BicepExpression[] args) => new(func, args); + public static FunctionCallExpression Call(string func, params BicepExpression[] args) => Call(Var(func), args); - public static InterpolatedString Interpolate(string format, params Expression[] values) => new(format, values); + public static InterpolatedStringExpression Interpolate(params BicepExpression[] values) => new(values); - public static MemberExpression Get(this Expression value, string name) => new(value, name); - public static IndexExpression Index(this Expression value, Expression index) => new(value, index); + public static MemberExpression Get(this BicepExpression value, string name) => new(value, name); + public static IndexExpression Index(this BicepExpression value, BicepExpression index) => new(value, index); public static class Types { @@ -66,21 +66,21 @@ public static class Types public static class Declare { - public static ParameterStatement Param(string name, Expression? defaultValue = null) => Param(name, Types.Create(), defaultValue); - public static ParameterStatement Param(string name, Expression type, Expression? defaultValue = null) => new(name, type, defaultValue); - public static VariableStatement Var(string name, Expression value) => new(name, value); - public static OutputStatement Output(string name, Expression value) => Output(name, Types.Create(), value); - public static OutputStatement Output(string name, Expression type, Expression value) => new(name, type, value); - public static ResourceStatement Resource(string name, Expression type, Expression body) => new(name, type, body); - public static ModuleStatement Module(string name, Expression type, Expression body) => new(name, type, body); + public static ParameterStatement Param(string name, BicepExpression? defaultValue = null) => Param(name, Types.Create(), defaultValue); + public static ParameterStatement Param(string name, BicepExpression type, BicepExpression? defaultValue = null) => new(name, type, defaultValue); + public static VariableStatement Var(string name, BicepExpression value) => new(name, value); + public static OutputStatement Output(string name, BicepExpression value) => Output(name, Types.Create(), value); + public static OutputStatement Output(string name, BicepExpression type, BicepExpression value) => new(name, type, value); + public static ResourceStatement Resource(string name, BicepExpression type, BicepExpression body) => new(name, type, body); + public static ModuleStatement Module(string name, BicepExpression type, BicepExpression body) => new(name, type, body); } public static CommentStatement Comment(string comment) => new(comment); - public static DecoratorExpression Decorator(string name, params Expression[] values) => new(Call(Var(name), values)); - public static ParameterStatement Decorate(this ParameterStatement target, string name, params Expression[] values) { target.Decorators.Add(Decorator(name, values)); return target; } - public static VariableStatement Decorate(this VariableStatement target, string name, params Expression[] values) { target.Decorators.Add(Decorator(name, values)); return target; } - public static OutputStatement Decorate(this OutputStatement target, string name, params Expression[] values) { target.Decorators.Add(Decorator(name, values)); return target; } - public static ResourceStatement Decorate(this ResourceStatement target, string name, params Expression[] values) { target.Decorators.Add(Decorator(name, values)); return target; } - public static ModuleStatement Decorate(this ModuleStatement target, string name, params Expression[] values) { target.Decorators.Add(Decorator(name, values)); return target; } + public static DecoratorExpression Decorator(string name, params BicepExpression[] values) => new(Call(Var(name), values)); + public static ParameterStatement Decorate(this ParameterStatement target, string name, params BicepExpression[] values) { target.Decorators.Add(Decorator(name, values)); return target; } + public static VariableStatement Decorate(this VariableStatement target, string name, params BicepExpression[] values) { target.Decorators.Add(Decorator(name, values)); return target; } + public static OutputStatement Decorate(this OutputStatement target, string name, params BicepExpression[] values) { target.Decorators.Add(Decorator(name, values)); return target; } + public static ResourceStatement Decorate(this ResourceStatement target, string name, params BicepExpression[] values) { target.Decorators.Add(Decorator(name, values)); return target; } + public static ModuleStatement Decorate(this ModuleStatement target, string name, params BicepExpression[] values) { target.Decorators.Add(Decorator(name, values)); return target; } } diff --git a/sdk/provisioning/Azure.Provisioning/src/Expressions/BicepTypeMapping.cs b/sdk/provisioning/Azure.Provisioning/src/Expressions/BicepTypeMapping.cs index d44778931f1f..711c3167778a 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Expressions/BicepTypeMapping.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Expressions/BicepTypeMapping.cs @@ -8,6 +8,7 @@ using System.Net; using System.Reflection; using System.Runtime.Serialization; +using System.Xml; using Azure.Core; using Azure.Provisioning.Primitives; @@ -27,6 +28,7 @@ internal static class BicepTypeMapping public static string? GetBicepTypeName(Type type) => type == typeof(bool) ? "bool" : type == typeof(int) ? "int" : + type == typeof(long) ? "int" : type == typeof(string) ? "string" : type == typeof(object) ? "object" : type == typeof(Uri) ? "string" : @@ -47,19 +49,22 @@ internal static class BicepTypeMapping /// Convert a .NET object into a literal Bicep string. /// /// The .NET value. + /// Optional format. /// The corresponding Bicep literal string. /// /// Thrown when we cannot convert a value to a literal Bicep string. /// - public static string ToLiteralString(object value) => + public static string ToLiteralString(object value, string? format) => value switch { bool b => b.ToString(), int i => i.ToString(), + long i => i.ToString(), string s => s, Uri u => u.AbsoluteUri, DateTimeOffset d => d.ToString("o"), - TimeSpan t => t.ToString(), // This eventually needs to carry along a format in BicepValue + TimeSpan t when format == "P" => XmlConvert.ToString(t), + TimeSpan t => t.ToString(), Guid g => g.ToString(), IPAddress a => a.ToString(), ETag e => e.ToString(), @@ -75,62 +80,64 @@ public static string ToLiteralString(object value) => /// Convert a .NET object into a Bicep expression. /// /// The .NET value. + /// Optional format. /// The corresponding Bicep expression. /// /// Thrown when we cannot convert a value to a Bicep expression. /// - public static Expression ToBicep(object? value) + public static BicepExpression ToBicep(object? value, string? format) { - // Note: Not explicitly fetching context from the provider and letting - // any potential nested constructs fetch it themselves if needed. - return value switch { null => BicepSyntax.Null(), bool b => BicepSyntax.Value(b), int i => BicepSyntax.Value(i), + // Note: below cast is valid because bicep limits to int.Min/MaxValue + // in bicep source and you need to use a parameter file for larger + // values + long i => BicepSyntax.Value((int)i), string s => BicepSyntax.Value(s), - Uri u => BicepSyntax.Value(ToLiteralString(u)), - DateTimeOffset d => BicepSyntax.Value(ToLiteralString(d)), - TimeSpan t => BicepSyntax.Value(ToLiteralString(t)), - Guid g => BicepSyntax.Value(ToLiteralString(g)), - IPAddress a => BicepSyntax.Value(ToLiteralString(a)), - ETag e => BicepSyntax.Value(ToLiteralString(e)), - ResourceIdentifier i => BicepSyntax.Value(ToLiteralString(i)), - Enum e => BicepSyntax.Value(ToLiteralString(e)), - ProvisioningConstruct c => CompileNestedConstruct(c), + Uri u => BicepSyntax.Value(ToLiteralString(u, format)), + DateTimeOffset d => BicepSyntax.Value(ToLiteralString(d, format)), + TimeSpan t => BicepSyntax.Value(ToLiteralString(t, format)), + Guid g => BicepSyntax.Value(ToLiteralString(g, format)), + IPAddress a => BicepSyntax.Value(ToLiteralString(a, format)), + ETag e => BicepSyntax.Value(ToLiteralString(e, format)), + ResourceIdentifier i => BicepSyntax.Value(ToLiteralString(i, format)), + Enum e => BicepSyntax.Value(ToLiteralString(e, format)), + ProvisionableConstruct c => CompileNestedConstruct(c), IDictionary d => d is BicepValue b && b.Kind == BicepValueKind.Expression ? b.Expression! : ToObject(d), IEnumerable seq => seq is BicepValue b && b.Kind == BicepValueKind.Expression ? b.Expression! : ToArray(seq.OfType()), // Extensible enums like Azure.Location - ValueType ee => BicepSyntax.Value(ToLiteralString(ee)), + ValueType ee => BicepSyntax.Value(ToLiteralString(ee, format)), // Unwrap BicepValue after collections so it doesn't loop forever BicepValue v when (v.Kind == BicepValueKind.Expression) => v.Expression!, BicepValue v when (v.Source is not null) => v.Source.GetReference(), - BicepValue v when (v.Kind == BicepValueKind.Literal) => ToBicep(v.GetLiteralValue()), + BicepValue v when (v.Kind == BicepValueKind.Literal) => ToBicep(v.GetLiteralValue(), format), BicepValue v when (v.Self is not null) => v.Self.GetReference(), BicepValue v when (v.Kind == BicepValueKind.Unset) => BicepSyntax.Null(), _ => throw new InvalidOperationException($"Cannot convert {value} to a Bicep expression.") }; ArrayExpression ToArray(IEnumerable seq) => - BicepSyntax.Array([.. seq.Select(ToBicep)]); + BicepSyntax.Array([.. seq.Select(v => ToBicep(v, v is BicepValue b ? b.Format : null))]); ObjectExpression ToObject(IDictionary dict) { - Dictionary values = []; + Dictionary values = []; foreach (KeyValuePair pair in dict) { - values[pair.Key] = ToBicep(pair.Value); + values[pair.Key] = ToBicep(pair.Value, pair.Value.Format); } return BicepSyntax.Object(values); } - Expression CompileNestedConstruct(ProvisioningConstruct construct) + BicepExpression CompileNestedConstruct(ProvisionableConstruct construct) { - IList statements = [.. construct.Compile()]; - if (statements.Count != 1 || statements[0] is not ExprStatement expr) + IList statements = [.. construct.Compile()]; + if (statements.Count != 1 || statements[0] is not ExpressionStatement expr) { throw statements.Count == 1 ? new InvalidOperationException($"Cannot convert {construct} into a Bicep expression because it compiles to {statements[0]} instead.") : diff --git a/sdk/provisioning/Azure.Provisioning/src/Expressions/BicepWriter.cs b/sdk/provisioning/Azure.Provisioning/src/Expressions/BicepWriter.cs index a53ffc27bdee..1e3fae78a212 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Expressions/BicepWriter.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Expressions/BicepWriter.cs @@ -50,7 +50,7 @@ public BicepWriter AppendEscaped(string text) } public BicepWriter AppendIf(bool condition, Func write) => condition ? write(this) : this; public BicepWriter AppendAll(IEnumerable values, Func append, Func? separate = null) - where T : Expression + where T : BicepExpression { bool first = true; BicepWriter writer = this; @@ -66,6 +66,6 @@ public BicepWriter AppendAll(IEnumerable values, Func expr.Write(this); - public BicepWriter Append(Statement stmt) => stmt.Write(this); + public BicepWriter Append(BicepExpression expr) => expr.Write(this); + public BicepWriter Append(BicepStatement stmt) => stmt.Write(this); } diff --git a/sdk/provisioning/Azure.Provisioning/src/Expressions/InterpolatedStringHandlerAttribute.cs b/sdk/provisioning/Azure.Provisioning/src/Expressions/InterpolatedStringHandlerAttribute.cs new file mode 100644 index 000000000000..aa115e50d44e --- /dev/null +++ b/sdk/provisioning/Azure.Provisioning/src/Expressions/InterpolatedStringHandlerAttribute.cs @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +namespace System.Runtime.CompilerServices; + +#if !NET6_0_OR_GREATER +/// Indicates the attributed type is to be used as an interpolated string handler. +[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct, AllowMultiple = false, Inherited = false)] +internal sealed class InterpolatedStringHandlerAttribute : Attribute { } +#endif diff --git a/sdk/provisioning/Azure.Provisioning/src/Generated/ArmApplication.cs b/sdk/provisioning/Azure.Provisioning/src/Generated/ArmApplication.cs index 7ec4e71abb0f..b2688092ee19 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Generated/ArmApplication.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Generated/ArmApplication.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.Resources; /// /// ArmApplication. /// -public partial class ArmApplication : Resource +public partial class ArmApplication : ProvisionableResource { /// /// The name of the managed application. @@ -201,15 +201,15 @@ public partial class ArmApplication : Resource /// /// Creates a new ArmApplication. /// - /// + /// /// The the Bicep identifier name of the ArmApplication resource. This can /// be used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and /// underscores. /// /// Version of the ArmApplication. - public ArmApplication(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Solutions/applications", resourceVersion ?? "2021-07-01") + public ArmApplication(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Solutions/applications", resourceVersion ?? "2021-07-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _kind = BicepValue.DefineProperty(this, "Kind", ["kind"], isRequired: true); @@ -282,7 +282,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing ArmApplication. /// - /// + /// /// The the Bicep identifier name of the ArmApplication resource. This can /// be used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and @@ -290,6 +290,6 @@ public static class ResourceVersions /// /// Version of the ArmApplication. /// The existing ArmApplication resource. - public static ArmApplication FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static ArmApplication FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning/src/Generated/ArmApplicationDefinition.cs b/sdk/provisioning/Azure.Provisioning/src/Generated/ArmApplicationDefinition.cs index a6120965cae7..efc5e20c6300 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Generated/ArmApplicationDefinition.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Generated/ArmApplicationDefinition.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.Resources; /// /// ArmApplicationDefinition. /// -public partial class ArmApplicationDefinition : Resource +public partial class ArmApplicationDefinition : ProvisionableResource { /// /// The name of the managed application definition. @@ -171,15 +171,15 @@ public partial class ArmApplicationDefinition : Resource /// /// Creates a new ArmApplicationDefinition. /// - /// + /// /// The the Bicep identifier name of the ArmApplicationDefinition resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, /// numbers, and underscores. /// /// Version of the ArmApplicationDefinition. - public ArmApplicationDefinition(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Solutions/applicationDefinitions", resourceVersion ?? "2021-07-01") + public ArmApplicationDefinition(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Solutions/applicationDefinitions", resourceVersion ?? "2021-07-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _location = BicepValue.DefineProperty(this, "Location", ["location"], isRequired: true); @@ -247,7 +247,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing ArmApplicationDefinition. /// - /// + /// /// The the Bicep identifier name of the ArmApplicationDefinition resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, @@ -255,6 +255,6 @@ public static class ResourceVersions /// /// Version of the ArmApplicationDefinition. /// The existing ArmApplicationDefinition resource. - public static ArmApplicationDefinition FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static ArmApplicationDefinition FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning/src/Generated/ArmDeployment.cs b/sdk/provisioning/Azure.Provisioning/src/Generated/ArmDeployment.cs index aedbb1d45153..062732ad727c 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Generated/ArmDeployment.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Generated/ArmDeployment.cs @@ -18,7 +18,7 @@ namespace Azure.Provisioning.Resources; /// /// ArmDeployment. /// -public partial class ArmDeployment : Resource +public partial class ArmDeployment : ProvisionableResource { /// /// The name of the deployment. @@ -59,15 +59,15 @@ public partial class ArmDeployment : Resource /// /// Creates a new ArmDeployment. /// - /// + /// /// The the Bicep identifier name of the ArmDeployment resource. This can /// be used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and /// underscores. /// /// Version of the ArmDeployment. - public ArmDeployment(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Resources/deployments", resourceVersion ?? "2023-07-01") + public ArmDeployment(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Resources/deployments", resourceVersion ?? "2023-07-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _id = BicepValue.DefineProperty(this, "Id", ["id"], isOutput: true); @@ -231,7 +231,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing ArmDeployment. /// - /// + /// /// The the Bicep identifier name of the ArmDeployment resource. This can /// be used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and @@ -239,8 +239,8 @@ public static class ResourceVersions /// /// Version of the ArmDeployment. /// The existing ArmDeployment resource. - public static ArmDeployment FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static ArmDeployment FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; /// /// Creates a new ArmDeployment resource from a Bicep expression that @@ -251,7 +251,7 @@ public static ArmDeployment FromExisting(string identifierName, string? resource /// /// A ArmDeployment resource. [EditorBrowsable(EditorBrowsableState.Never)] - public static ArmDeployment FromExpression(Expression expression) + public static ArmDeployment FromExpression(BicepExpression expression) { ArmDeployment resource = new(nameof(ArmDeployment)); resource.OverrideWithExpression(expression); diff --git a/sdk/provisioning/Azure.Provisioning/src/Generated/ArmDeploymentScript.cs b/sdk/provisioning/Azure.Provisioning/src/Generated/ArmDeploymentScript.cs index 9861e52b86fc..a8d47f8b79d7 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Generated/ArmDeploymentScript.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Generated/ArmDeploymentScript.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.Resources; /// /// ArmDeploymentScript. /// -public partial class ArmDeploymentScript : Resource +public partial class ArmDeploymentScript : ProvisionableResource { /// /// Name of the deployment script. @@ -58,15 +58,15 @@ public partial class ArmDeploymentScript : Resource /// /// Creates a new ArmDeploymentScript. /// - /// + /// /// The the Bicep identifier name of the ArmDeploymentScript resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, /// numbers, and underscores. /// /// Version of the ArmDeploymentScript. - public ArmDeploymentScript(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Resources/deploymentScripts", resourceVersion ?? "2023-08-01") + public ArmDeploymentScript(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Resources/deploymentScripts", resourceVersion ?? "2023-08-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _location = BicepValue.DefineProperty(this, "Location", ["location"], isRequired: true); @@ -95,7 +95,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing ArmDeploymentScript. /// - /// + /// /// The the Bicep identifier name of the ArmDeploymentScript resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, @@ -103,6 +103,6 @@ public static class ResourceVersions /// /// Version of the ArmDeploymentScript. /// The existing ArmDeploymentScript resource. - public static ArmDeploymentScript FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static ArmDeploymentScript FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning/src/Generated/AuthorizationRoleDefinition.cs b/sdk/provisioning/Azure.Provisioning/src/Generated/AuthorizationRoleDefinition.cs index ec16b6dd7257..ebb142c6f4f0 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Generated/AuthorizationRoleDefinition.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Generated/AuthorizationRoleDefinition.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.Authorization; /// /// AuthorizationRoleDefinition. /// -public partial class AuthorizationRoleDefinition : Resource +public partial class AuthorizationRoleDefinition : ProvisionableResource { /// /// Gets the Name. @@ -74,15 +74,15 @@ public partial class AuthorizationRoleDefinition : Resource /// /// Creates a new AuthorizationRoleDefinition. /// - /// + /// /// The the Bicep identifier name of the AuthorizationRoleDefinition /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the AuthorizationRoleDefinition. - public AuthorizationRoleDefinition(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Authorization/roleDefinitions", resourceVersion ?? "2022-04-01") + public AuthorizationRoleDefinition(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Authorization/roleDefinitions", resourceVersion ?? "2022-04-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true, defaultValue: GetNameDefaultValue()); _assignableScopes = BicepList.DefineProperty(this, "AssignableScopes", ["properties", "assignableScopes"]); @@ -99,11 +99,6 @@ public AuthorizationRoleDefinition(string identifierName, string? resourceVersio /// public static class ResourceVersions { - /// - /// 2023-07-01-preview. - /// - public static readonly string V2023_07_01_preview = "2023-07-01-preview"; - /// /// 2022-04-01. /// @@ -143,7 +138,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing AuthorizationRoleDefinition. /// - /// + /// /// The the Bicep identifier name of the AuthorizationRoleDefinition /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -151,6 +146,6 @@ public static class ResourceVersions /// /// Version of the AuthorizationRoleDefinition. /// The existing AuthorizationRoleDefinition resource. - public static AuthorizationRoleDefinition FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static AuthorizationRoleDefinition FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning/src/Generated/FederatedIdentityCredential.cs b/sdk/provisioning/Azure.Provisioning/src/Generated/FederatedIdentityCredential.cs index f1e1d1e706f6..4c108a694d45 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Generated/FederatedIdentityCredential.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Generated/FederatedIdentityCredential.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.Roles; /// /// FederatedIdentityCredential. /// -public partial class FederatedIdentityCredential : Resource +public partial class FederatedIdentityCredential : ProvisionableResource { /// /// The name of the federated identity credential resource. @@ -63,15 +63,15 @@ public partial class FederatedIdentityCredential : Resource /// /// Creates a new FederatedIdentityCredential. /// - /// + /// /// The the Bicep identifier name of the FederatedIdentityCredential /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the FederatedIdentityCredential. - public FederatedIdentityCredential(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.ManagedIdentity/userAssignedIdentities/federatedIdentityCredentials", resourceVersion ?? "2023-01-31") + public FederatedIdentityCredential(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.ManagedIdentity/userAssignedIdentities/federatedIdentityCredentials", resourceVersion ?? "2023-01-31") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _audiences = BicepList.DefineProperty(this, "Audiences", ["properties", "audiences"]); @@ -106,7 +106,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing FederatedIdentityCredential. /// - /// + /// /// The the Bicep identifier name of the FederatedIdentityCredential /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -114,6 +114,6 @@ public static class ResourceVersions /// /// Version of the FederatedIdentityCredential. /// The existing FederatedIdentityCredential resource. - public static FederatedIdentityCredential FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static FederatedIdentityCredential FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning/src/Generated/GenericResource.cs b/sdk/provisioning/Azure.Provisioning/src/Generated/GenericResource.cs index 2d74b1230db2..860f6e12718e 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Generated/GenericResource.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Generated/GenericResource.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.Resources; /// /// GenericResource. /// -public partial class GenericResource : Resource +public partial class GenericResource : ProvisionableResource { /// /// The name of the resource. @@ -128,15 +128,15 @@ public partial class GenericResource : Resource /// /// Creates a new GenericResource. /// - /// + /// /// The the Bicep identifier name of the GenericResource resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, /// and underscores. /// /// Version of the GenericResource. - public GenericResource(string identifierName, string? resourceVersion = default) - : base(identifierName, "", resourceVersion) + public GenericResource(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "", resourceVersion) { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _location = BicepValue.DefineProperty(this, "Location", ["location"], isRequired: true); @@ -158,7 +158,7 @@ public GenericResource(string identifierName, string? resourceVersion = default) /// /// Creates a reference to an existing GenericResource. /// - /// + /// /// The the Bicep identifier name of the GenericResource resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, @@ -166,6 +166,6 @@ public GenericResource(string identifierName, string? resourceVersion = default) /// /// Version of the GenericResource. /// The existing GenericResource resource. - public static GenericResource FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static GenericResource FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning/src/Generated/JitRequest.cs b/sdk/provisioning/Azure.Provisioning/src/Generated/JitRequest.cs index 0c3409c0f444..661ec4795a80 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Generated/JitRequest.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Generated/JitRequest.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.Resources; /// /// JitRequest. /// -public partial class JitRequest : Resource +public partial class JitRequest : ProvisionableResource { /// /// The name of the JIT request. @@ -98,15 +98,15 @@ public partial class JitRequest : Resource /// /// Creates a new JitRequest. /// - /// + /// /// The the Bicep identifier name of the JitRequest resource. This can be /// used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and /// underscores. /// /// Version of the JitRequest. - public JitRequest(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Solutions/jitRequests", resourceVersion ?? "2021-07-01") + public JitRequest(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Solutions/jitRequests", resourceVersion ?? "2021-07-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _location = BicepValue.DefineProperty(this, "Location", ["location"], isRequired: true); @@ -142,7 +142,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing JitRequest. /// - /// + /// /// The the Bicep identifier name of the JitRequest resource. This can be /// used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and @@ -150,6 +150,6 @@ public static class ResourceVersions /// /// Version of the JitRequest. /// The existing JitRequest resource. - public static JitRequest FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static JitRequest FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning/src/Generated/ManagementGroup.cs b/sdk/provisioning/Azure.Provisioning/src/Generated/ManagementGroup.cs index bb6f43c5f067..67044f9626c2 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Generated/ManagementGroup.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Generated/ManagementGroup.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.Resources; /// /// ManagementGroup. /// -public partial class ManagementGroup : Resource +public partial class ManagementGroup : ProvisionableResource { /// /// The name of the management group. For example, @@ -67,15 +67,15 @@ public partial class ManagementGroup : Resource /// /// Creates a new ManagementGroup. /// - /// + /// /// The the Bicep identifier name of the ManagementGroup resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, /// and underscores. /// /// Version of the ManagementGroup. - public ManagementGroup(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Management/managementGroups", resourceVersion ?? "2023-04-01") + public ManagementGroup(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Management/managementGroups", resourceVersion ?? "2023-04-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"]); _details = BicepValue.DefineProperty(this, "Details", ["properties", "details"]); @@ -130,7 +130,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing ManagementGroup. /// - /// + /// /// The the Bicep identifier name of the ManagementGroup resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, @@ -138,8 +138,8 @@ public static class ResourceVersions /// /// Version of the ManagementGroup. /// The existing ManagementGroup resource. - public static ManagementGroup FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static ManagementGroup FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; /// /// Get the requirements for naming this ManagementGroup resource. diff --git a/sdk/provisioning/Azure.Provisioning/src/Generated/ManagementGroupPolicyDefinition.cs b/sdk/provisioning/Azure.Provisioning/src/Generated/ManagementGroupPolicyDefinition.cs index 4283d53b65d4..40cc10ea8650 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Generated/ManagementGroupPolicyDefinition.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Generated/ManagementGroupPolicyDefinition.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.Resources; /// /// ManagementGroupPolicyDefinition. /// -public partial class ManagementGroupPolicyDefinition : Resource +public partial class ManagementGroupPolicyDefinition : ProvisionableResource { /// /// The name of the policy definition to create. @@ -113,15 +113,15 @@ public partial class ManagementGroupPolicyDefinition : Resource /// /// Creates a new ManagementGroupPolicyDefinition. /// - /// + /// /// The the Bicep identifier name of the ManagementGroupPolicyDefinition /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the ManagementGroupPolicyDefinition. - public ManagementGroupPolicyDefinition(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Authorization/policyDefinitions", resourceVersion ?? "2023-04-01") + public ManagementGroupPolicyDefinition(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Authorization/policyDefinitions", resourceVersion ?? "2023-04-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _description = BicepValue.DefineProperty(this, "Description", ["properties", "description"]); @@ -204,7 +204,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing ManagementGroupPolicyDefinition. /// - /// + /// /// The the Bicep identifier name of the ManagementGroupPolicyDefinition /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -212,8 +212,8 @@ public static class ResourceVersions /// /// Version of the ManagementGroupPolicyDefinition. /// The existing ManagementGroupPolicyDefinition resource. - public static ManagementGroupPolicyDefinition FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static ManagementGroupPolicyDefinition FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; /// /// Get the requirements for naming this ManagementGroupPolicyDefinition diff --git a/sdk/provisioning/Azure.Provisioning/src/Generated/ManagementGroupPolicySetDefinition.cs b/sdk/provisioning/Azure.Provisioning/src/Generated/ManagementGroupPolicySetDefinition.cs index 913e834034f4..597dfb0ef6ae 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Generated/ManagementGroupPolicySetDefinition.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Generated/ManagementGroupPolicySetDefinition.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.Resources; /// /// ManagementGroupPolicySetDefinition. /// -public partial class ManagementGroupPolicySetDefinition : Resource +public partial class ManagementGroupPolicySetDefinition : ProvisionableResource { /// /// The name of the policy set definition to create. @@ -100,15 +100,15 @@ public partial class ManagementGroupPolicySetDefinition : Resource /// /// Creates a new ManagementGroupPolicySetDefinition. /// - /// + /// /// The the Bicep identifier name of the ManagementGroupPolicySetDefinition /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the ManagementGroupPolicySetDefinition. - public ManagementGroupPolicySetDefinition(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Authorization/policySetDefinitions", resourceVersion ?? "2023-04-01") + public ManagementGroupPolicySetDefinition(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Authorization/policySetDefinitions", resourceVersion ?? "2023-04-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _description = BicepValue.DefineProperty(this, "Description", ["properties", "description"]); @@ -181,7 +181,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing ManagementGroupPolicySetDefinition. /// - /// + /// /// The the Bicep identifier name of the ManagementGroupPolicySetDefinition /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -189,8 +189,8 @@ public static class ResourceVersions /// /// Version of the ManagementGroupPolicySetDefinition. /// The existing ManagementGroupPolicySetDefinition resource. - public static ManagementGroupPolicySetDefinition FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static ManagementGroupPolicySetDefinition FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; /// /// Get the requirements for naming this ManagementGroupPolicySetDefinition diff --git a/sdk/provisioning/Azure.Provisioning/src/Generated/ManagementGroupSubscription.cs b/sdk/provisioning/Azure.Provisioning/src/Generated/ManagementGroupSubscription.cs index 3e1f150f122a..44d3adf01905 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Generated/ManagementGroupSubscription.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Generated/ManagementGroupSubscription.cs @@ -14,7 +14,7 @@ namespace Azure.Provisioning.Resources; /// /// ManagementGroupSubscription. /// -public partial class ManagementGroupSubscription : Resource +public partial class ManagementGroupSubscription : ProvisionableResource { /// /// The name of the resource. @@ -71,15 +71,15 @@ public partial class ManagementGroupSubscription : Resource /// /// Creates a new ManagementGroupSubscription. /// - /// + /// /// The the Bicep identifier name of the ManagementGroupSubscription /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the ManagementGroupSubscription. - public ManagementGroupSubscription(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Management/managementGroups/subscriptions", resourceVersion ?? "2023-04-01") + public ManagementGroupSubscription(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Management/managementGroups/subscriptions", resourceVersion ?? "2023-04-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _displayName = BicepValue.DefineProperty(this, "DisplayName", ["properties", "displayName"], isOutput: true); @@ -135,7 +135,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing ManagementGroupSubscription. /// - /// + /// /// The the Bicep identifier name of the ManagementGroupSubscription /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -143,6 +143,6 @@ public static class ResourceVersions /// /// Version of the ManagementGroupSubscription. /// The existing ManagementGroupSubscription resource. - public static ManagementGroupSubscription FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static ManagementGroupSubscription FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning/src/Generated/ManagementLock.cs b/sdk/provisioning/Azure.Provisioning/src/Generated/ManagementLock.cs index bdbaad5493de..01e9560b49d9 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Generated/ManagementLock.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Generated/ManagementLock.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.Resources; /// /// ManagementLock. /// -public partial class ManagementLock : Resource +public partial class ManagementLock : ProvisionableResource { /// /// The name of lock. @@ -62,15 +62,15 @@ public partial class ManagementLock : Resource /// /// Creates a new ManagementLock. /// - /// + /// /// The the Bicep identifier name of the ManagementLock resource. This can /// be used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and /// underscores. /// /// Version of the ManagementLock. - public ManagementLock(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Authorization/locks", resourceVersion ?? "2020-05-01") + public ManagementLock(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Authorization/locks", resourceVersion ?? "2020-05-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _level = BicepValue.DefineProperty(this, "Level", ["properties", "level"], isRequired: true); @@ -114,7 +114,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing ManagementLock. /// - /// + /// /// The the Bicep identifier name of the ManagementLock resource. This can /// be used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and @@ -122,8 +122,8 @@ public static class ResourceVersions /// /// Version of the ManagementLock. /// The existing ManagementLock resource. - public static ManagementLock FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static ManagementLock FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; /// /// Get the requirements for naming this ManagementLock resource. diff --git a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ApiProfile.cs b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ApiProfile.cs index b065b7ddf37b..bbb487d9faa5 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ApiProfile.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ApiProfile.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.Resources; /// /// ApiProfile. /// -public partial class ApiProfile : ProvisioningConstruct +public partial class ApiProfile : ProvisionableConstruct { /// /// Gets the ProfileVersion. diff --git a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ArmApplicationArtifact.cs b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ArmApplicationArtifact.cs index 7d8cf972ae54..16c17f83d0f5 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ArmApplicationArtifact.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ArmApplicationArtifact.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.Resources; /// /// Managed application artifact. /// -public partial class ArmApplicationArtifact : ProvisioningConstruct +public partial class ArmApplicationArtifact : ProvisionableConstruct { /// /// The managed application artifact name. diff --git a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ArmApplicationAuthorization.cs b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ArmApplicationAuthorization.cs index 773f976b1f7b..0fce13f253fa 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ArmApplicationAuthorization.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ArmApplicationAuthorization.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.Resources; /// /// The managed application provider authorization. /// -public partial class ArmApplicationAuthorization : ProvisioningConstruct +public partial class ArmApplicationAuthorization : ProvisionableConstruct { /// /// The provider's principal identifier. This is the identity that the diff --git a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ArmApplicationDefinitionArtifact.cs b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ArmApplicationDefinitionArtifact.cs index 4e94e053841a..9de3cd3b90fc 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ArmApplicationDefinitionArtifact.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ArmApplicationDefinitionArtifact.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.Resources; /// /// Application definition artifact. /// -public partial class ArmApplicationDefinitionArtifact : ProvisioningConstruct +public partial class ArmApplicationDefinitionArtifact : ProvisionableConstruct { /// /// The managed application definition artifact name. diff --git a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ArmApplicationDetails.cs b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ArmApplicationDetails.cs index 161e02325a4b..3b9cde793825 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ArmApplicationDetails.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ArmApplicationDetails.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.Resources; /// The application client details to track the entity creating/updating the /// managed app resource. /// -public partial class ArmApplicationDetails : ProvisioningConstruct +public partial class ArmApplicationDetails : ProvisionableConstruct { /// /// The client Oid. diff --git a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ArmApplicationJitAccessPolicy.cs b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ArmApplicationJitAccessPolicy.cs index cdd368c1b637..7169bb212541 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ArmApplicationJitAccessPolicy.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ArmApplicationJitAccessPolicy.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.Resources; /// /// Managed application Jit access policy. /// -public partial class ArmApplicationJitAccessPolicy : ProvisioningConstruct +public partial class ArmApplicationJitAccessPolicy : ProvisionableConstruct { /// /// Whether the JIT access is enabled. @@ -47,6 +47,6 @@ public ArmApplicationJitAccessPolicy() _jitAccessEnabled = BicepValue.DefineProperty(this, "JitAccessEnabled", ["jitAccessEnabled"]); _jitApprovalMode = BicepValue.DefineProperty(this, "JitApprovalMode", ["jitApprovalMode"]); _jitApprovers = BicepList.DefineProperty(this, "JitApprovers", ["jitApprovers"]); - _maximumJitAccessDuration = BicepValue.DefineProperty(this, "MaximumJitAccessDuration", ["maximumJitAccessDuration"]); + _maximumJitAccessDuration = BicepValue.DefineProperty(this, "MaximumJitAccessDuration", ["maximumJitAccessDuration"], format: "P"); } } diff --git a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ArmApplicationManagedIdentity.cs b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ArmApplicationManagedIdentity.cs index 1eb206b1225b..e3d8d848cf6b 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ArmApplicationManagedIdentity.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ArmApplicationManagedIdentity.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.Resources; /// /// Identity for the resource. /// -public partial class ArmApplicationManagedIdentity : ProvisioningConstruct +public partial class ArmApplicationManagedIdentity : ProvisionableConstruct { /// /// The principal ID of resource identity. diff --git a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ArmApplicationNotificationEndpoint.cs b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ArmApplicationNotificationEndpoint.cs index 9e7f1930feac..3c3d201a0e2b 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ArmApplicationNotificationEndpoint.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ArmApplicationNotificationEndpoint.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.Resources; /// /// Managed application notification endpoint. /// -public partial class ArmApplicationNotificationEndpoint : ProvisioningConstruct +public partial class ArmApplicationNotificationEndpoint : ProvisionableConstruct { /// /// The managed application notification endpoint uri. diff --git a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ArmApplicationPackageContact.cs b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ArmApplicationPackageContact.cs index 27c04b0fa81b..fc1c6673081b 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ArmApplicationPackageContact.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ArmApplicationPackageContact.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.Resources; /// /// The application package contact information. /// -public partial class ArmApplicationPackageContact : ProvisioningConstruct +public partial class ArmApplicationPackageContact : ProvisionableConstruct { /// /// The contact name. diff --git a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ArmApplicationPackageLockingPolicy.cs b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ArmApplicationPackageLockingPolicy.cs index e73ed7c8757c..37d09f961dee 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ArmApplicationPackageLockingPolicy.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ArmApplicationPackageLockingPolicy.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.Resources; /// /// Managed application locking policy. /// -public partial class ArmApplicationPackageLockingPolicy : ProvisioningConstruct +public partial class ArmApplicationPackageLockingPolicy : ProvisionableConstruct { /// /// The deny assignment excluded actions. diff --git a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ArmApplicationPackageSupportUris.cs b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ArmApplicationPackageSupportUris.cs index f45d6c9084f8..0d75b879325b 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ArmApplicationPackageSupportUris.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ArmApplicationPackageSupportUris.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.Resources; /// /// The appliance package support URLs. /// -public partial class ArmApplicationPackageSupportUris : ProvisioningConstruct +public partial class ArmApplicationPackageSupportUris : ProvisionableConstruct { /// /// The public azure support URL. diff --git a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ArmApplicationPolicy.cs b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ArmApplicationPolicy.cs index 59e2e872e186..c68d46b4bb2c 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ArmApplicationPolicy.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ArmApplicationPolicy.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.Resources; /// /// Managed application policy. /// -public partial class ArmApplicationPolicy : ProvisioningConstruct +public partial class ArmApplicationPolicy : ProvisionableConstruct { /// /// The policy name. diff --git a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ArmApplicationSku.cs b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ArmApplicationSku.cs index 32e463d49881..acf3f5004c57 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ArmApplicationSku.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ArmApplicationSku.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.Resources; /// /// SKU for the resource. /// -public partial class ArmApplicationSku : ProvisioningConstruct +public partial class ArmApplicationSku : ProvisionableConstruct { /// /// The SKU name. diff --git a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ArmApplicationUserAssignedIdentity.cs b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ArmApplicationUserAssignedIdentity.cs index 16dc5d6cacba..dcb516b77b06 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ArmApplicationUserAssignedIdentity.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ArmApplicationUserAssignedIdentity.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.Resources; /// Represents the user assigned identity that is contained within the /// UserAssignedIdentities dictionary on ResourceIdentity. /// -public partial class ArmApplicationUserAssignedIdentity : ProvisioningConstruct +public partial class ArmApplicationUserAssignedIdentity : ProvisionableConstruct { /// /// The principal id of user assigned identity. diff --git a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ArmDependency.cs b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ArmDependency.cs index 86c078dc06a7..34cff150c936 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ArmDependency.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ArmDependency.cs @@ -13,7 +13,7 @@ namespace Azure.Provisioning.Resources; /// /// Deployment dependency information. /// -public partial class ArmDependency : ProvisioningConstruct +public partial class ArmDependency : ProvisionableConstruct { /// /// The list of dependencies. diff --git a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ArmDeploymentContent.cs b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ArmDeploymentContent.cs index a7723b1b44ed..710993487107 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ArmDeploymentContent.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ArmDeploymentContent.cs @@ -13,7 +13,7 @@ namespace Azure.Provisioning.Resources; /// /// Deployment operation parameters. /// -public partial class ArmDeploymentContent : ProvisioningConstruct +public partial class ArmDeploymentContent : ProvisionableConstruct { /// /// The location to store the deployment data. diff --git a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ArmDeploymentParametersLink.cs b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ArmDeploymentParametersLink.cs index ca285ea39bf6..b16decd98e0d 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ArmDeploymentParametersLink.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ArmDeploymentParametersLink.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.Resources; /// /// Entity representing the reference to the deployment parameters. /// -public partial class ArmDeploymentParametersLink : ProvisioningConstruct +public partial class ArmDeploymentParametersLink : ProvisionableConstruct { /// /// The URI of the parameters file. diff --git a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ArmDeploymentProperties.cs b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ArmDeploymentProperties.cs index eb802bbf0a78..b07cd00ece47 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ArmDeploymentProperties.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ArmDeploymentProperties.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.Resources; /// /// Deployment properties. /// -public partial class ArmDeploymentProperties : ProvisioningConstruct +public partial class ArmDeploymentProperties : ProvisionableConstruct { /// /// The template content. You use this element when you want to pass the diff --git a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ArmDeploymentPropertiesExtended.cs b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ArmDeploymentPropertiesExtended.cs index e76844ff6742..055b1aacf8fa 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ArmDeploymentPropertiesExtended.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ArmDeploymentPropertiesExtended.cs @@ -14,7 +14,7 @@ namespace Azure.Provisioning.Resources; /// /// Deployment properties with additional details. /// -public partial class ArmDeploymentPropertiesExtended : ProvisioningConstruct +public partial class ArmDeploymentPropertiesExtended : ProvisionableConstruct { /// /// Denotes the state of provisioning. @@ -146,7 +146,7 @@ public ArmDeploymentPropertiesExtended() _provisioningState = BicepValue.DefineProperty(this, "ProvisioningState", ["provisioningState"], isOutput: true); _correlationId = BicepValue.DefineProperty(this, "CorrelationId", ["correlationId"], isOutput: true); _timestamp = BicepValue.DefineProperty(this, "Timestamp", ["timestamp"], isOutput: true); - _duration = BicepValue.DefineProperty(this, "Duration", ["duration"], isOutput: true); + _duration = BicepValue.DefineProperty(this, "Duration", ["duration"], isOutput: true, format: "P"); _outputs = BicepValue.DefineProperty(this, "Outputs", ["outputs"], isOutput: true); _providers = BicepList.DefineProperty(this, "Providers", ["providers"], isOutput: true); _dependencies = BicepList.DefineProperty(this, "Dependencies", ["dependencies"], isOutput: true); diff --git a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ArmDeploymentScriptManagedIdentity.cs b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ArmDeploymentScriptManagedIdentity.cs index f6fad2671d0e..51076304470b 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ArmDeploymentScriptManagedIdentity.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ArmDeploymentScriptManagedIdentity.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.Resources; /// /// Managed identity generic object. /// -public partial class ArmDeploymentScriptManagedIdentity : ProvisioningConstruct +public partial class ArmDeploymentScriptManagedIdentity : ProvisionableConstruct { /// /// Type of the managed identity. diff --git a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ArmDeploymentTemplateLink.cs b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ArmDeploymentTemplateLink.cs index 1f4d6dedd6b3..993b5cde1389 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ArmDeploymentTemplateLink.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ArmDeploymentTemplateLink.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.Resources; /// /// Entity representing the reference to the template. /// -public partial class ArmDeploymentTemplateLink : ProvisioningConstruct +public partial class ArmDeploymentTemplateLink : ProvisionableConstruct { /// /// The URI of the template to deploy. Use either the uri or id property, diff --git a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ArmPlan.cs b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ArmPlan.cs index d23c5490e8d9..7ccbdcb16ce1 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ArmPlan.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ArmPlan.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.Resources; /// /// Representation of a publisher plan for marketplace RPs. /// -public partial class ArmPlan : ProvisioningConstruct +public partial class ArmPlan : ProvisionableConstruct { /// /// A user defined name of the 3rd Party Artifact that is being procured. diff --git a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ArmPolicyParameter.cs b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ArmPolicyParameter.cs index e8e8d7170ffd..bcffd60a7f3e 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ArmPolicyParameter.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ArmPolicyParameter.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.Resources; /// /// The definition of a parameter that can be provided to the policy. /// -public partial class ArmPolicyParameter : ProvisioningConstruct +public partial class ArmPolicyParameter : ProvisionableConstruct { /// /// The data type of the parameter. diff --git a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ArmPolicyParameterValue.cs b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ArmPolicyParameterValue.cs index 0d882f9b9697..efcf5ec7cd6e 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ArmPolicyParameterValue.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ArmPolicyParameterValue.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.Resources; /// /// The value of a parameter. /// -public partial class ArmPolicyParameterValue : ProvisioningConstruct +public partial class ArmPolicyParameterValue : ProvisionableConstruct { /// /// The value of the parameter. To assign an diff --git a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/BasicArmDependency.cs b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/BasicArmDependency.cs index 89e80a24b49a..7ff1c0453895 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/BasicArmDependency.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/BasicArmDependency.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.Resources; /// /// Deployment dependency information. /// -public partial class BasicArmDependency : ProvisioningConstruct +public partial class BasicArmDependency : ProvisionableConstruct { /// /// The ID of the dependency. diff --git a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/CreateManagementGroupDetails.cs b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/CreateManagementGroupDetails.cs index a1f3b69456f9..7c2545e936ef 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/CreateManagementGroupDetails.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/CreateManagementGroupDetails.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.Resources; /// /// The details of a management group used during creation. /// -public partial class CreateManagementGroupDetails : ProvisioningConstruct +public partial class CreateManagementGroupDetails : ProvisionableConstruct { /// /// The version number of the object. diff --git a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ErrorDeployment.cs b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ErrorDeployment.cs index 4c26637b224c..7c3d5002600a 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ErrorDeployment.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ErrorDeployment.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.Resources; /// /// Deployment on error behavior. /// -public partial class ErrorDeployment : ProvisioningConstruct +public partial class ErrorDeployment : ProvisionableConstruct { /// /// The deployment on error behavior type. Possible values are diff --git a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ErrorDeploymentExtended.cs b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ErrorDeploymentExtended.cs index 4c43745eee93..3516997001ab 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ErrorDeploymentExtended.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ErrorDeploymentExtended.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.Resources; /// /// Deployment on error behavior with additional details. /// -public partial class ErrorDeploymentExtended : ProvisioningConstruct +public partial class ErrorDeploymentExtended : ProvisionableConstruct { /// /// The state of the provisioning for the on error deployment. diff --git a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ExtendedAzureLocation.cs b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ExtendedAzureLocation.cs index 3613d17e3811..ecb57ceb21b8 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ExtendedAzureLocation.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ExtendedAzureLocation.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.Resources; /// /// Resource extended location. /// -public partial class ExtendedAzureLocation : ProvisioningConstruct +public partial class ExtendedAzureLocation : ProvisionableConstruct { /// /// The extended location type. diff --git a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/JitApprover.cs b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/JitApprover.cs index e77004ea8733..0d90206dbb48 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/JitApprover.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/JitApprover.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.Resources; /// /// JIT approver definition. /// -public partial class JitApprover : ProvisioningConstruct +public partial class JitApprover : ProvisionableConstruct { /// /// The approver service principal Id. diff --git a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/JitAuthorizationPolicies.cs b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/JitAuthorizationPolicies.cs index 9c136971793b..77e4c2d6351f 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/JitAuthorizationPolicies.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/JitAuthorizationPolicies.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.Resources; /// /// The JIT authorization policies. /// -public partial class JitAuthorizationPolicies : ProvisioningConstruct +public partial class JitAuthorizationPolicies : ProvisionableConstruct { /// /// The the principal id that will be granted JIT access. diff --git a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/JitSchedulingPolicy.cs b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/JitSchedulingPolicy.cs index 1cc611078796..8483c259470f 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/JitSchedulingPolicy.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/JitSchedulingPolicy.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.Resources; /// /// The JIT scheduling policies. /// -public partial class JitSchedulingPolicy : ProvisioningConstruct +public partial class JitSchedulingPolicy : ProvisionableConstruct { /// /// The type of JIT schedule. @@ -37,7 +37,7 @@ public partial class JitSchedulingPolicy : ProvisioningConstruct public JitSchedulingPolicy() { _schedulingType = BicepValue.DefineProperty(this, "SchedulingType", ["type"], isOutput: true); - _duration = BicepValue.DefineProperty(this, "Duration", ["duration"]); + _duration = BicepValue.DefineProperty(this, "Duration", ["duration"], format: "P"); _startOn = BicepValue.DefineProperty(this, "StartOn", ["startTime"]); } } diff --git a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/LinkedTemplateArtifact.cs b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/LinkedTemplateArtifact.cs index b7d3d508b8b6..4f56f4647ac3 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/LinkedTemplateArtifact.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/LinkedTemplateArtifact.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.Resources; /// Represents a Template Spec artifact containing an embedded Azure Resource /// Manager template for use as a linked template. /// -public partial class LinkedTemplateArtifact : ProvisioningConstruct +public partial class LinkedTemplateArtifact : ProvisionableConstruct { /// /// A filesystem safe relative path of the artifact. diff --git a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ManagedByTenant.cs b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ManagedByTenant.cs index 79edf8b5754b..414a3df607fe 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ManagedByTenant.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ManagedByTenant.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.Resources; /// /// Information about a tenant managing the subscription. /// -public partial class ManagedByTenant : ProvisioningConstruct +public partial class ManagedByTenant : ProvisionableConstruct { /// /// The tenant ID of the managing tenant. This is a GUID. diff --git a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ManagedServiceIdentity.cs b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ManagedServiceIdentity.cs index 7df2e3723c25..2898730a8f2e 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ManagedServiceIdentity.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ManagedServiceIdentity.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.Resources; /// /// Managed service identity (system assigned and/or user assigned identities). /// -public partial class ManagedServiceIdentity : ProvisioningConstruct +public partial class ManagedServiceIdentity : ProvisionableConstruct { /// /// The service principal ID of the system assigned identity. This property diff --git a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ManagementGroupChildInfo.cs b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ManagementGroupChildInfo.cs index 50a612410e65..e711acb2841c 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ManagementGroupChildInfo.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ManagementGroupChildInfo.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.Resources; /// /// The child information of a management group. /// -public partial class ManagementGroupChildInfo : ProvisioningConstruct +public partial class ManagementGroupChildInfo : ProvisionableConstruct { /// /// The fully qualified resource type which includes provider namespace diff --git a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ManagementGroupChildOptions.cs b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ManagementGroupChildOptions.cs index 8f9017ed35ce..20cb2a2cb8a9 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ManagementGroupChildOptions.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ManagementGroupChildOptions.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.Resources; /// /// The child information of a management group used during creation. /// -public partial class ManagementGroupChildOptions : ProvisioningConstruct +public partial class ManagementGroupChildOptions : ProvisionableConstruct { /// /// The fully qualified resource type which includes provider namespace diff --git a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ManagementGroupInfo.cs b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ManagementGroupInfo.cs index 3331a8a53a44..8dac7019a620 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ManagementGroupInfo.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ManagementGroupInfo.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.Resources; /// /// The details of a management group. /// -public partial class ManagementGroupInfo : ProvisioningConstruct +public partial class ManagementGroupInfo : ProvisionableConstruct { /// /// The version number of the object. diff --git a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ManagementGroupParentCreateOptions.cs b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ManagementGroupParentCreateOptions.cs index 71ae12623332..6435d2a4115d 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ManagementGroupParentCreateOptions.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ManagementGroupParentCreateOptions.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.Resources; /// /// (Optional) The ID of the parent management group used during creation. /// -public partial class ManagementGroupParentCreateOptions : ProvisioningConstruct +public partial class ManagementGroupParentCreateOptions : ProvisionableConstruct { /// /// The fully qualified ID for the parent management group. For example, diff --git a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ManagementGroupPathElement.cs b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ManagementGroupPathElement.cs index 91188b9a156f..7f36ffd66abb 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ManagementGroupPathElement.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ManagementGroupPathElement.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.Resources; /// /// A path element of a management group ancestors. /// -public partial class ManagementGroupPathElement : ProvisioningConstruct +public partial class ManagementGroupPathElement : ProvisionableConstruct { /// /// The name of the group. diff --git a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ManagementLockOwner.cs b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ManagementLockOwner.cs index 24978f565af3..71106cdf7b8a 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ManagementLockOwner.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ManagementLockOwner.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.Resources; /// /// Lock owner properties. /// -public partial class ManagementLockOwner : ProvisioningConstruct +public partial class ManagementLockOwner : ProvisionableConstruct { /// /// The application ID of the lock owner. diff --git a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/NonComplianceMessage.cs b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/NonComplianceMessage.cs index e537b8922bd6..443e6bdeb5e6 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/NonComplianceMessage.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/NonComplianceMessage.cs @@ -13,7 +13,7 @@ namespace Azure.Provisioning.Resources; /// This is shown in 'deny' error messages and on resource's /// non-compliant compliance results. /// -public partial class NonComplianceMessage : ProvisioningConstruct +public partial class NonComplianceMessage : ProvisionableConstruct { /// /// A message that describes why a resource is non-compliant with the diff --git a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ParameterDefinitionsValueMetadata.cs b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ParameterDefinitionsValueMetadata.cs index e6cb71ced917..7d5e82ac2e83 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ParameterDefinitionsValueMetadata.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ParameterDefinitionsValueMetadata.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.Resources; /// /// General metadata for the parameter. /// -public partial class ParameterDefinitionsValueMetadata : ProvisioningConstruct +public partial class ParameterDefinitionsValueMetadata : ProvisionableConstruct { /// /// The display name for the parameter. diff --git a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ParentManagementGroupInfo.cs b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ParentManagementGroupInfo.cs index 02b164310432..f6abd1c19114 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ParentManagementGroupInfo.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ParentManagementGroupInfo.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.Resources; /// /// (Optional) The ID of the parent management group. /// -public partial class ParentManagementGroupInfo : ProvisioningConstruct +public partial class ParentManagementGroupInfo : ProvisionableConstruct { /// /// The fully qualified ID for the parent management group. For example, diff --git a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/PolicyAssignmentProperties.cs b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/PolicyAssignmentProperties.cs index eb8092830493..55b33f45ecee 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/PolicyAssignmentProperties.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/PolicyAssignmentProperties.cs @@ -13,7 +13,7 @@ namespace Azure.Provisioning.Authorization; /// /// Expanded info of resource scope, role definition and policy. /// -public partial class PolicyAssignmentProperties : ProvisioningConstruct +public partial class PolicyAssignmentProperties : ProvisionableConstruct { /// /// Id of the policy. diff --git a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/PolicyDefinitionGroup.cs b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/PolicyDefinitionGroup.cs index 1b8b7e80192f..0d04e76b7c7e 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/PolicyDefinitionGroup.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/PolicyDefinitionGroup.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.Resources; /// /// The policy definition group. /// -public partial class PolicyDefinitionGroup : ProvisioningConstruct +public partial class PolicyDefinitionGroup : ProvisionableConstruct { /// /// The name of the group. diff --git a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/PolicyDefinitionReference.cs b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/PolicyDefinitionReference.cs index 041569121e20..8223925436c2 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/PolicyDefinitionReference.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/PolicyDefinitionReference.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.Resources; /// /// The policy definition reference. /// -public partial class PolicyDefinitionReference : ProvisioningConstruct +public partial class PolicyDefinitionReference : ProvisionableConstruct { /// /// The ID of the policy definition or policy set definition. diff --git a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/PolicyOverride.cs b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/PolicyOverride.cs index eefee5d32b09..f9a47bb90e4b 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/PolicyOverride.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/PolicyOverride.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.Resources; /// /// The policy property value override. /// -public partial class PolicyOverride : ProvisioningConstruct +public partial class PolicyOverride : ProvisionableConstruct { /// /// The override kind. diff --git a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ProviderExtendedLocation.cs b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ProviderExtendedLocation.cs index 1c765c824466..516ce814f6be 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ProviderExtendedLocation.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ProviderExtendedLocation.cs @@ -13,7 +13,7 @@ namespace Azure.Provisioning.Resources; /// /// ProviderExtendedLocation. /// -public partial class ProviderExtendedLocation : ProvisioningConstruct +public partial class ProviderExtendedLocation : ProvisionableConstruct { /// /// Gets the Location. diff --git a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ProviderResourceType.cs b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ProviderResourceType.cs index 7ff606da3ae2..e1efd930a34a 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ProviderResourceType.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ProviderResourceType.cs @@ -13,7 +13,7 @@ namespace Azure.Provisioning.Resources; /// /// ProviderResourceType. /// -public partial class ProviderResourceType : ProvisioningConstruct +public partial class ProviderResourceType : ProvisionableConstruct { /// /// Gets the ResourceType. diff --git a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ResourceProviderData.cs b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ResourceProviderData.cs index ebd50dcaa5c0..dc60bbe2b39a 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ResourceProviderData.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ResourceProviderData.cs @@ -13,7 +13,7 @@ namespace Azure.Provisioning.Resources; /// /// ResourceProviderData. /// -public partial class ResourceProviderData : ProvisioningConstruct +public partial class ResourceProviderData : ProvisionableConstruct { /// /// Gets the Id. diff --git a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ResourceSelector.cs b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ResourceSelector.cs index c5dc0746489f..2eeed5ea1636 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ResourceSelector.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ResourceSelector.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.Resources; /// /// The resource selector to filter policies by resource properties. /// -public partial class ResourceSelector : ProvisioningConstruct +public partial class ResourceSelector : ProvisionableConstruct { /// /// The name of the resource selector. diff --git a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ResourceSelectorExpression.cs b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ResourceSelectorExpression.cs index 36c0a65fcba4..d45360697622 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ResourceSelectorExpression.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ResourceSelectorExpression.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.Resources; /// /// The selector expression. /// -public partial class ResourceSelectorExpression : ProvisioningConstruct +public partial class ResourceSelectorExpression : ProvisionableConstruct { /// /// The selector kind. diff --git a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ResourceTypeAlias.cs b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ResourceTypeAlias.cs index 5446269a9e1f..da86d8323a6f 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ResourceTypeAlias.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ResourceTypeAlias.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.Resources; /// /// ResourceTypeAlias. /// -public partial class ResourceTypeAlias : ProvisioningConstruct +public partial class ResourceTypeAlias : ProvisionableConstruct { /// /// Gets the Name. diff --git a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ResourceTypeAliasPath.cs b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ResourceTypeAliasPath.cs index 122cff5e4ea1..adafcb542ef3 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ResourceTypeAliasPath.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ResourceTypeAliasPath.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.Resources; /// /// ResourceTypeAliasPath. /// -public partial class ResourceTypeAliasPath : ProvisioningConstruct +public partial class ResourceTypeAliasPath : ProvisionableConstruct { /// /// Gets the Path. diff --git a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ResourceTypeAliasPathMetadata.cs b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ResourceTypeAliasPathMetadata.cs index f18004abdf9a..f03ee1634a79 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ResourceTypeAliasPathMetadata.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ResourceTypeAliasPathMetadata.cs @@ -10,7 +10,7 @@ namespace Azure.Provisioning.Resources; /// /// ResourceTypeAliasPathMetadata. /// -public partial class ResourceTypeAliasPathMetadata : ProvisioningConstruct +public partial class ResourceTypeAliasPathMetadata : ProvisionableConstruct { /// /// Gets the TokenType. diff --git a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ResourceTypeAliasPattern.cs b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ResourceTypeAliasPattern.cs index 8e9dc5764c98..0252d9cdb54e 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ResourceTypeAliasPattern.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ResourceTypeAliasPattern.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.Resources; /// /// ResourceTypeAliasPattern. /// -public partial class ResourceTypeAliasPattern : ProvisioningConstruct +public partial class ResourceTypeAliasPattern : ProvisionableConstruct { /// /// Gets the Phrase. diff --git a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ResourcesSku.cs b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ResourcesSku.cs index bb5b2a2bdd41..360f454f14de 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ResourcesSku.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ResourcesSku.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.Resources; /// /// SKU for the resource. /// -public partial class ResourcesSku : ProvisioningConstruct +public partial class ResourcesSku : ProvisionableConstruct { /// /// The SKU name. diff --git a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/RoleAssignmentScheduleTicketInfo.cs b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/RoleAssignmentScheduleTicketInfo.cs index 4f71ac502e6f..717541d85e91 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/RoleAssignmentScheduleTicketInfo.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/RoleAssignmentScheduleTicketInfo.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.Authorization; /// /// Ticket Info of the role assignment. /// -public partial class RoleAssignmentScheduleTicketInfo : ProvisioningConstruct +public partial class RoleAssignmentScheduleTicketInfo : ProvisionableConstruct { /// /// Ticket number for the role assignment. diff --git a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/RoleDefinitionPermission.cs b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/RoleDefinitionPermission.cs index 7561d09e6d07..0f55360bddc5 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/RoleDefinitionPermission.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/RoleDefinitionPermission.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.Authorization; /// /// Role definition permissions. /// -public partial class RoleDefinitionPermission : ProvisioningConstruct +public partial class RoleDefinitionPermission : ProvisionableConstruct { /// /// Allowed actions. diff --git a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/RoleEligibilityScheduleRequestPropertiesTicketInfo.cs b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/RoleEligibilityScheduleRequestPropertiesTicketInfo.cs index afdfb8d680c7..ba86d4d91bd2 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/RoleEligibilityScheduleRequestPropertiesTicketInfo.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/RoleEligibilityScheduleRequestPropertiesTicketInfo.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.Authorization; /// /// Ticket Info of the role eligibility. /// -public partial class RoleEligibilityScheduleRequestPropertiesTicketInfo : ProvisioningConstruct +public partial class RoleEligibilityScheduleRequestPropertiesTicketInfo : ProvisionableConstruct { /// /// Ticket number for the role eligibility. diff --git a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/RoleManagementApprovalSettings.cs b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/RoleManagementApprovalSettings.cs index e761835adc5e..ef476547dc80 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/RoleManagementApprovalSettings.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/RoleManagementApprovalSettings.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.Authorization; /// /// The approval settings. /// -public partial class RoleManagementApprovalSettings : ProvisioningConstruct +public partial class RoleManagementApprovalSettings : ProvisionableConstruct { /// /// Determines whether approval is required or not. diff --git a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/RoleManagementApprovalStage.cs b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/RoleManagementApprovalStage.cs index 3c6b08d92f24..0366a5aab051 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/RoleManagementApprovalStage.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/RoleManagementApprovalStage.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.Authorization; /// /// The approval stage. /// -public partial class RoleManagementApprovalStage : ProvisioningConstruct +public partial class RoleManagementApprovalStage : ProvisionableConstruct { /// /// The time in days when approval request would be timed out. diff --git a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/RoleManagementExpandedProperties.cs b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/RoleManagementExpandedProperties.cs index 962d5ea989df..7455ed4fe841 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/RoleManagementExpandedProperties.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/RoleManagementExpandedProperties.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.Authorization; /// /// The RoleManagementExpandedProperties. /// -public partial class RoleManagementExpandedProperties : ProvisioningConstruct +public partial class RoleManagementExpandedProperties : ProvisionableConstruct { /// /// Id of the principal. diff --git a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/RoleManagementPolicyExpirationRule.cs b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/RoleManagementPolicyExpirationRule.cs index 4e055ce01ab6..7435c46726ee 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/RoleManagementPolicyExpirationRule.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/RoleManagementPolicyExpirationRule.cs @@ -32,6 +32,6 @@ public RoleManagementPolicyExpirationRule() : base() { BicepValue.DefineProperty(this, "ruleType", ["ruleType"], defaultValue: "RoleManagementPolicyExpirationRule"); _isExpirationRequired = BicepValue.DefineProperty(this, "IsExpirationRequired", ["isExpirationRequired"]); - _maximumDuration = BicepValue.DefineProperty(this, "MaximumDuration", ["maximumDuration"]); + _maximumDuration = BicepValue.DefineProperty(this, "MaximumDuration", ["maximumDuration"], format: "P"); } } diff --git a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/RoleManagementPolicyRule.cs b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/RoleManagementPolicyRule.cs index 3e478f434717..fb7659b12313 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/RoleManagementPolicyRule.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/RoleManagementPolicyRule.cs @@ -23,7 +23,7 @@ namespace Azure.Provisioning.Authorization; /// and /// Azure.ResourceManager.Authorization.Models.RoleManagementPolicyNotificationRule. /// -public partial class RoleManagementPolicyRule : ProvisioningConstruct +public partial class RoleManagementPolicyRule : ProvisionableConstruct { /// /// The id of the rule. diff --git a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/RoleManagementPolicyRuleTarget.cs b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/RoleManagementPolicyRuleTarget.cs index 81ab0b4d287d..d1752b471c05 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/RoleManagementPolicyRuleTarget.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/RoleManagementPolicyRuleTarget.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning.Authorization; /// /// The role management policy rule target. /// -public partial class RoleManagementPolicyRuleTarget : ProvisioningConstruct +public partial class RoleManagementPolicyRuleTarget : ProvisionableConstruct { /// /// The caller of the setting. diff --git a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/RoleManagementPrincipal.cs b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/RoleManagementPrincipal.cs index f6a8ffbff9e1..25fdc6200693 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/RoleManagementPrincipal.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/RoleManagementPrincipal.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.Authorization; /// /// The name of the entity last modified it. /// -public partial class RoleManagementPrincipal : ProvisioningConstruct +public partial class RoleManagementPrincipal : ProvisionableConstruct { /// /// The id of the principal made changes. diff --git a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/RoleManagementUserInfo.cs b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/RoleManagementUserInfo.cs index c1419df7ccbf..ddab76aa4a76 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/RoleManagementUserInfo.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/RoleManagementUserInfo.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.Authorization; /// /// The detail of a user. /// -public partial class RoleManagementUserInfo : ProvisioningConstruct +public partial class RoleManagementUserInfo : ProvisionableConstruct { /// /// The type of user. diff --git a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/SubResource.cs b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/SubResource.cs index 53abd077a6be..31736fc42b69 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/SubResource.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/SubResource.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.Resources; /// /// SubResource. /// -public partial class SubResource : ProvisioningConstruct +public partial class SubResource : ProvisionableConstruct { /// /// Gets the Id. diff --git a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/SubscriptionPolicies.cs b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/SubscriptionPolicies.cs index e758e4750b6a..a21ff8fe2606 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/SubscriptionPolicies.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/SubscriptionPolicies.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.Resources; /// /// Subscription policies. /// -public partial class SubscriptionPolicies : ProvisioningConstruct +public partial class SubscriptionPolicies : ProvisionableConstruct { /// /// The subscription location placement ID. The ID indicates which regions diff --git a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/SystemAssignedServiceIdentity.cs b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/SystemAssignedServiceIdentity.cs index 5015eca5e901..43fe05cf40bf 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/SystemAssignedServiceIdentity.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/SystemAssignedServiceIdentity.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.Resources; /// /// Managed service identity (either system assigned, or none). /// -public partial class SystemAssignedServiceIdentity : ProvisioningConstruct +public partial class SystemAssignedServiceIdentity : ProvisionableConstruct { /// /// The service principal ID of the system assigned identity. This property diff --git a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/SystemData.cs b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/SystemData.cs index 59898dd0bd67..547c3d004f80 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/SystemData.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/SystemData.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.Resources; /// /// Metadata pertaining to creation and last modification of the resource. /// -public partial class SystemData : ProvisioningConstruct +public partial class SystemData : ProvisionableConstruct { /// /// The identity that created the resource. diff --git a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/TemplateSpecVersionInfo.cs b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/TemplateSpecVersionInfo.cs index 933fdd59227a..c5fbbef2150c 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/TemplateSpecVersionInfo.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/TemplateSpecVersionInfo.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.Resources; /// /// High-level information about a Template Spec version. /// -public partial class TemplateSpecVersionInfo : ProvisioningConstruct +public partial class TemplateSpecVersionInfo : ProvisionableConstruct { /// /// Template Spec version description. diff --git a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/UserAssignedIdentityDetails.cs b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/UserAssignedIdentityDetails.cs index 5ed0b9d4f0d3..d2adb55ec898 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/UserAssignedIdentityDetails.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/UserAssignedIdentityDetails.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.Resources; /// /// User assigned identity properties. /// -public partial class UserAssignedIdentityDetails : ProvisioningConstruct +public partial class UserAssignedIdentityDetails : ProvisionableConstruct { /// /// The principal ID of the assigned identity. diff --git a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/WritableSubResource.cs b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/WritableSubResource.cs index 7f20482de20c..4c336c5adb9b 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/WritableSubResource.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/WritableSubResource.cs @@ -11,7 +11,7 @@ namespace Azure.Provisioning.Resources; /// /// A class representing a sub-resource that contains only the ID. /// -public partial class WritableSubResource : ProvisioningConstruct +public partial class WritableSubResource : ProvisionableConstruct { /// /// Gets or sets the ARM resource identifier. diff --git a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ZoneMapping.cs b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ZoneMapping.cs index a55e8374b386..a351a94f99eb 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ZoneMapping.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Generated/Models/ZoneMapping.cs @@ -13,7 +13,7 @@ namespace Azure.Provisioning.Resources; /// /// ZoneMapping. /// -public partial class ZoneMapping : ProvisioningConstruct +public partial class ZoneMapping : ProvisionableConstruct { /// /// Gets the Location. diff --git a/sdk/provisioning/Azure.Provisioning/src/Generated/PolicyAssignment.cs b/sdk/provisioning/Azure.Provisioning/src/Generated/PolicyAssignment.cs index 16ef5b2fb359..20f3b1c9e5fd 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Generated/PolicyAssignment.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Generated/PolicyAssignment.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.Resources; /// /// PolicyAssignment. /// -public partial class PolicyAssignment : Resource +public partial class PolicyAssignment : ProvisionableResource { /// /// The name of the policy assignment. @@ -138,15 +138,15 @@ public partial class PolicyAssignment : Resource /// /// Creates a new PolicyAssignment. /// - /// + /// /// The the Bicep identifier name of the PolicyAssignment resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, /// and underscores. /// /// Version of the PolicyAssignment. - public PolicyAssignment(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Authorization/policyAssignments", resourceVersion ?? "2024-04-01") + public PolicyAssignment(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Authorization/policyAssignments", resourceVersion ?? "2024-04-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _description = BicepValue.DefineProperty(this, "Description", ["properties", "description"]); @@ -245,7 +245,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing PolicyAssignment. /// - /// + /// /// The the Bicep identifier name of the PolicyAssignment resource. This /// can be used to refer to the resource in expressions, but is not the /// Azure name of the resource. This value can contain letters, numbers, @@ -253,8 +253,8 @@ public static class ResourceVersions /// /// Version of the PolicyAssignment. /// The existing PolicyAssignment resource. - public static PolicyAssignment FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static PolicyAssignment FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; /// /// Get the requirements for naming this PolicyAssignment resource. diff --git a/sdk/provisioning/Azure.Provisioning/src/Generated/ResourceGroup.cs b/sdk/provisioning/Azure.Provisioning/src/Generated/ResourceGroup.cs index aec8c9c7792e..a54ecda25b1f 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Generated/ResourceGroup.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Generated/ResourceGroup.cs @@ -17,7 +17,7 @@ namespace Azure.Provisioning.Resources; /// /// ResourceGroup. /// -public partial class ResourceGroup : Resource +public partial class ResourceGroup : ProvisionableResource { /// /// The name of the resource group to create or update. Can include @@ -68,15 +68,15 @@ public partial class ResourceGroup : Resource /// /// Creates a new ResourceGroup. /// - /// + /// /// The the Bicep identifier name of the ResourceGroup resource. This can /// be used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and /// underscores. /// /// Version of the ResourceGroup. - public ResourceGroup(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Resources/resourceGroups", resourceVersion ?? "2023-07-01") + public ResourceGroup(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Resources/resourceGroups", resourceVersion ?? "2023-07-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _location = BicepValue.DefineProperty(this, "Location", ["location"], isRequired: true); @@ -92,11 +92,6 @@ public ResourceGroup(string identifierName, string? resourceVersion = default) /// public static class ResourceVersions { - /// - /// 2023-07-01-preview. - /// - public static readonly string V2023_07_01_preview = "2023-07-01-preview"; - /// /// 2023-07-01. /// @@ -311,7 +306,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing ResourceGroup. /// - /// + /// /// The the Bicep identifier name of the ResourceGroup resource. This can /// be used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and @@ -319,8 +314,8 @@ public static class ResourceVersions /// /// Version of the ResourceGroup. /// The existing ResourceGroup resource. - public static ResourceGroup FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static ResourceGroup FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; /// /// Creates a new ResourceGroup resource from a Bicep expression that @@ -331,7 +326,7 @@ public static ResourceGroup FromExisting(string identifierName, string? resource /// /// A ResourceGroup resource. [EditorBrowsable(EditorBrowsableState.Never)] - public static ResourceGroup FromExpression(Expression expression) + public static ResourceGroup FromExpression(BicepExpression expression) { ResourceGroup resource = new(nameof(ResourceGroup)); resource.OverrideWithExpression(expression); diff --git a/sdk/provisioning/Azure.Provisioning/src/Generated/RoleAssignment.cs b/sdk/provisioning/Azure.Provisioning/src/Generated/RoleAssignment.cs index 01b5921e4d06..ecd4d7654f12 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Generated/RoleAssignment.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Generated/RoleAssignment.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.Authorization; /// /// RoleAssignment. /// -public partial class RoleAssignment : Resource +public partial class RoleAssignment : ProvisionableResource { /// /// The name of the role assignment. It can be any valid GUID. @@ -119,15 +119,15 @@ public partial class RoleAssignment : Resource /// /// Creates a new RoleAssignment. /// - /// + /// /// The the Bicep identifier name of the RoleAssignment resource. This can /// be used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and /// underscores. /// /// Version of the RoleAssignment. - public RoleAssignment(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Authorization/roleAssignments", resourceVersion ?? "2022-04-01") + public RoleAssignment(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Authorization/roleAssignments", resourceVersion ?? "2022-04-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true, defaultValue: GetNameDefaultValue()); _principalId = BicepValue.DefineProperty(this, "PrincipalId", ["properties", "principalId"], isRequired: true); @@ -190,7 +190,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing RoleAssignment. /// - /// + /// /// The the Bicep identifier name of the RoleAssignment resource. This can /// be used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and @@ -198,6 +198,6 @@ public static class ResourceVersions /// /// Version of the RoleAssignment. /// The existing RoleAssignment resource. - public static RoleAssignment FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static RoleAssignment FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning/src/Generated/RoleAssignmentScheduleRequest.cs b/sdk/provisioning/Azure.Provisioning/src/Generated/RoleAssignmentScheduleRequest.cs index dc1901d99fa7..2fb6f007857e 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Generated/RoleAssignmentScheduleRequest.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Generated/RoleAssignmentScheduleRequest.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.Authorization; /// /// RoleAssignmentScheduleRequest. /// -public partial class RoleAssignmentScheduleRequest : Resource +public partial class RoleAssignmentScheduleRequest : ProvisionableResource { /// /// A GUID for the role assignment to create. The name must be unique and @@ -170,20 +170,20 @@ public partial class RoleAssignmentScheduleRequest : Resource /// /// Creates a new RoleAssignmentScheduleRequest. /// - /// + /// /// The the Bicep identifier name of the RoleAssignmentScheduleRequest /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the RoleAssignmentScheduleRequest. - public RoleAssignmentScheduleRequest(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Authorization/roleAssignmentScheduleRequests", resourceVersion ?? "2020-10-01") + public RoleAssignmentScheduleRequest(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Authorization/roleAssignmentScheduleRequests", resourceVersion ?? "2020-10-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _condition = BicepValue.DefineProperty(this, "Condition", ["properties", "condition"]); _conditionVersion = BicepValue.DefineProperty(this, "ConditionVersion", ["properties", "conditionVersion"]); - _duration = BicepValue.DefineProperty(this, "Duration", ["properties", "duration"]); + _duration = BicepValue.DefineProperty(this, "Duration", ["properties", "duration"], format: "P"); _endOn = BicepValue.DefineProperty(this, "EndOn", ["properties", "endDateTime"]); _expirationType = BicepValue.DefineProperty(this, "ExpirationType", ["properties", "type"]); _justification = BicepValue.DefineProperty(this, "Justification", ["properties", "justification"]); @@ -211,11 +211,6 @@ public RoleAssignmentScheduleRequest(string identifierName, string? resourceVers /// public static class ResourceVersions { - /// - /// 2022-04-01-preview. - /// - public static readonly string V2022_04_01_preview = "2022-04-01-preview"; - /// /// 2020-10-01. /// @@ -225,7 +220,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing RoleAssignmentScheduleRequest. /// - /// + /// /// The the Bicep identifier name of the RoleAssignmentScheduleRequest /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -233,6 +228,6 @@ public static class ResourceVersions /// /// Version of the RoleAssignmentScheduleRequest. /// The existing RoleAssignmentScheduleRequest resource. - public static RoleAssignmentScheduleRequest FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static RoleAssignmentScheduleRequest FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning/src/Generated/RoleEligibilityScheduleRequest.cs b/sdk/provisioning/Azure.Provisioning/src/Generated/RoleEligibilityScheduleRequest.cs index 74b15c65eda8..9ed3a3e76981 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Generated/RoleEligibilityScheduleRequest.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Generated/RoleEligibilityScheduleRequest.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.Authorization; /// /// RoleEligibilityScheduleRequest. /// -public partial class RoleEligibilityScheduleRequest : Resource +public partial class RoleEligibilityScheduleRequest : ProvisionableResource { /// /// The name of the role eligibility to create. It can be any valid GUID. @@ -163,20 +163,20 @@ public partial class RoleEligibilityScheduleRequest : Resource /// /// Creates a new RoleEligibilityScheduleRequest. /// - /// + /// /// The the Bicep identifier name of the RoleEligibilityScheduleRequest /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the RoleEligibilityScheduleRequest. - public RoleEligibilityScheduleRequest(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Authorization/roleEligibilityScheduleRequests", resourceVersion ?? "2020-10-01") + public RoleEligibilityScheduleRequest(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Authorization/roleEligibilityScheduleRequests", resourceVersion ?? "2020-10-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _condition = BicepValue.DefineProperty(this, "Condition", ["properties", "condition"]); _conditionVersion = BicepValue.DefineProperty(this, "ConditionVersion", ["properties", "conditionVersion"]); - _duration = BicepValue.DefineProperty(this, "Duration", ["properties", "duration"]); + _duration = BicepValue.DefineProperty(this, "Duration", ["properties", "duration"], format: "P"); _endOn = BicepValue.DefineProperty(this, "EndOn", ["properties", "endDateTime"]); _expirationType = BicepValue.DefineProperty(this, "ExpirationType", ["properties", "type"]); _justification = BicepValue.DefineProperty(this, "Justification", ["properties", "justification"]); @@ -203,11 +203,6 @@ public RoleEligibilityScheduleRequest(string identifierName, string? resourceVer /// public static class ResourceVersions { - /// - /// 2022-04-01-preview. - /// - public static readonly string V2022_04_01_preview = "2022-04-01-preview"; - /// /// 2020-10-01. /// @@ -217,7 +212,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing RoleEligibilityScheduleRequest. /// - /// + /// /// The the Bicep identifier name of the RoleEligibilityScheduleRequest /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -225,6 +220,6 @@ public static class ResourceVersions /// /// Version of the RoleEligibilityScheduleRequest. /// The existing RoleEligibilityScheduleRequest resource. - public static RoleEligibilityScheduleRequest FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static RoleEligibilityScheduleRequest FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning/src/Generated/RoleManagementPolicyAssignment.cs b/sdk/provisioning/Azure.Provisioning/src/Generated/RoleManagementPolicyAssignment.cs index 104fbfc6c88b..e24e1dca2335 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Generated/RoleManagementPolicyAssignment.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Generated/RoleManagementPolicyAssignment.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.Authorization; /// /// RoleManagementPolicyAssignment. /// -public partial class RoleManagementPolicyAssignment : Resource +public partial class RoleManagementPolicyAssignment : ProvisionableResource { /// /// The name of format {guid_guid} the role management policy assignment to @@ -82,15 +82,15 @@ public partial class RoleManagementPolicyAssignment : Resource /// /// Creates a new RoleManagementPolicyAssignment. /// - /// + /// /// The the Bicep identifier name of the RoleManagementPolicyAssignment /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the RoleManagementPolicyAssignment. - public RoleManagementPolicyAssignment(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Authorization/roleManagementPolicyAssignments", resourceVersion ?? "2020-10-01") + public RoleManagementPolicyAssignment(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Authorization/roleManagementPolicyAssignments", resourceVersion ?? "2020-10-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _policyId = BicepValue.DefineProperty(this, "PolicyId", ["properties", "policyId"]); @@ -107,11 +107,6 @@ public RoleManagementPolicyAssignment(string identifierName, string? resourceVer /// public static class ResourceVersions { - /// - /// 2020-10-01-preview. - /// - public static readonly string V2020_10_01_preview = "2020-10-01-preview"; - /// /// 2020-10-01. /// @@ -121,7 +116,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing RoleManagementPolicyAssignment. /// - /// + /// /// The the Bicep identifier name of the RoleManagementPolicyAssignment /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -129,6 +124,6 @@ public static class ResourceVersions /// /// Version of the RoleManagementPolicyAssignment. /// The existing RoleManagementPolicyAssignment resource. - public static RoleManagementPolicyAssignment FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static RoleManagementPolicyAssignment FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning/src/Generated/Subscription.cs b/sdk/provisioning/Azure.Provisioning/src/Generated/Subscription.cs index efaf5cbadb95..411739f34ac1 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Generated/Subscription.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Generated/Subscription.cs @@ -17,7 +17,7 @@ namespace Azure.Provisioning.Resources; /// /// Subscription. /// -public partial class Subscription : Resource +public partial class Subscription : ProvisionableResource { /// /// The authorization source of the request. Valid values are one or more @@ -79,15 +79,15 @@ public partial class Subscription : Resource /// /// Creates a new Subscription. /// - /// + /// /// The the Bicep identifier name of the Subscription resource. This can /// be used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and /// underscores. /// /// Version of the Subscription. - public Subscription(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Resources/subscriptions", resourceVersion ?? "2019-10-01") + public Subscription(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Resources/subscriptions", resourceVersion ?? "2019-10-01") { _authorizationSource = BicepValue.DefineProperty(this, "AuthorizationSource", ["authorizationSource"], isOutput: true); _displayName = BicepValue.DefineProperty(this, "DisplayName", ["displayName"], isOutput: true); @@ -230,7 +230,7 @@ public static class ResourceVersions /// /// A Subscription resource. [EditorBrowsable(EditorBrowsableState.Never)] - public static Subscription FromExpression(Expression expression) + public static Subscription FromExpression(BicepExpression expression) { Subscription resource = new(nameof(Subscription)); resource.OverrideWithExpression(expression); diff --git a/sdk/provisioning/Azure.Provisioning/src/Generated/SubscriptionPolicyDefinition.cs b/sdk/provisioning/Azure.Provisioning/src/Generated/SubscriptionPolicyDefinition.cs index 32609ad5f8f1..6b4190959b66 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Generated/SubscriptionPolicyDefinition.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Generated/SubscriptionPolicyDefinition.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.Resources; /// /// SubscriptionPolicyDefinition. /// -public partial class SubscriptionPolicyDefinition : Resource +public partial class SubscriptionPolicyDefinition : ProvisionableResource { /// /// The name of the policy definition to create. @@ -113,15 +113,15 @@ public partial class SubscriptionPolicyDefinition : Resource /// /// Creates a new SubscriptionPolicyDefinition. /// - /// + /// /// The the Bicep identifier name of the SubscriptionPolicyDefinition /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the SubscriptionPolicyDefinition. - public SubscriptionPolicyDefinition(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Authorization/policyDefinitions", resourceVersion) + public SubscriptionPolicyDefinition(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Authorization/policyDefinitions", resourceVersion) { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _description = BicepValue.DefineProperty(this, "Description", ["properties", "description"]); @@ -138,7 +138,7 @@ public SubscriptionPolicyDefinition(string identifierName, string? resourceVersi /// /// Creates a reference to an existing SubscriptionPolicyDefinition. /// - /// + /// /// The the Bicep identifier name of the SubscriptionPolicyDefinition /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -146,8 +146,8 @@ public SubscriptionPolicyDefinition(string identifierName, string? resourceVersi /// /// Version of the SubscriptionPolicyDefinition. /// The existing SubscriptionPolicyDefinition resource. - public static SubscriptionPolicyDefinition FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static SubscriptionPolicyDefinition FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; /// /// Get the requirements for naming this SubscriptionPolicyDefinition diff --git a/sdk/provisioning/Azure.Provisioning/src/Generated/SubscriptionPolicySetDefinition.cs b/sdk/provisioning/Azure.Provisioning/src/Generated/SubscriptionPolicySetDefinition.cs index 90f1ced3da59..12ca3d0a8242 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Generated/SubscriptionPolicySetDefinition.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Generated/SubscriptionPolicySetDefinition.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.Resources; /// /// SubscriptionPolicySetDefinition. /// -public partial class SubscriptionPolicySetDefinition : Resource +public partial class SubscriptionPolicySetDefinition : ProvisionableResource { /// /// The name of the policy set definition to create. @@ -100,15 +100,15 @@ public partial class SubscriptionPolicySetDefinition : Resource /// /// Creates a new SubscriptionPolicySetDefinition. /// - /// + /// /// The the Bicep identifier name of the SubscriptionPolicySetDefinition /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain /// letters, numbers, and underscores. /// /// Version of the SubscriptionPolicySetDefinition. - public SubscriptionPolicySetDefinition(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Authorization/policySetDefinitions", resourceVersion) + public SubscriptionPolicySetDefinition(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Authorization/policySetDefinitions", resourceVersion) { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _description = BicepValue.DefineProperty(this, "Description", ["properties", "description"]); @@ -125,7 +125,7 @@ public SubscriptionPolicySetDefinition(string identifierName, string? resourceVe /// /// Creates a reference to an existing SubscriptionPolicySetDefinition. /// - /// + /// /// The the Bicep identifier name of the SubscriptionPolicySetDefinition /// resource. This can be used to refer to the resource in expressions, /// but is not the Azure name of the resource. This value can contain @@ -133,8 +133,8 @@ public SubscriptionPolicySetDefinition(string identifierName, string? resourceVe /// /// Version of the SubscriptionPolicySetDefinition. /// The existing SubscriptionPolicySetDefinition resource. - public static SubscriptionPolicySetDefinition FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static SubscriptionPolicySetDefinition FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; /// /// Get the requirements for naming this SubscriptionPolicySetDefinition diff --git a/sdk/provisioning/Azure.Provisioning/src/Generated/TagResource.cs b/sdk/provisioning/Azure.Provisioning/src/Generated/TagResource.cs index 816ae6e1e5e8..b012ecb71f49 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Generated/TagResource.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Generated/TagResource.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.Resources; /// /// TagResource. /// -public partial class TagResource : Resource +public partial class TagResource : ProvisionableResource { /// /// The name of the resource. @@ -47,15 +47,15 @@ public partial class TagResource : Resource /// /// Creates a new TagResource. /// - /// + /// /// The the Bicep identifier name of the TagResource resource. This can be /// used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and /// underscores. /// /// Version of the TagResource. - public TagResource(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Resources/tags", resourceVersion ?? "2023-07-01") + public TagResource(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Resources/tags", resourceVersion ?? "2023-07-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _tagValues = BicepDictionary.DefineProperty(this, "TagValues", ["properties", "tags"]); @@ -107,7 +107,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing TagResource. /// - /// + /// /// The the Bicep identifier name of the TagResource resource. This can be /// used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and @@ -115,8 +115,8 @@ public static class ResourceVersions /// /// Version of the TagResource. /// The existing TagResource resource. - public static TagResource FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static TagResource FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; /// /// Get the requirements for naming this TagResource resource. diff --git a/sdk/provisioning/Azure.Provisioning/src/Generated/TemplateSpec.cs b/sdk/provisioning/Azure.Provisioning/src/Generated/TemplateSpec.cs index 4c803fc0065a..49c01f3d4092 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Generated/TemplateSpec.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Generated/TemplateSpec.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.Resources; /// /// TemplateSpec. /// -public partial class TemplateSpec : Resource +public partial class TemplateSpec : ProvisionableResource { /// /// Name of the Template Spec. @@ -92,15 +92,15 @@ public partial class TemplateSpec : Resource /// /// Creates a new TemplateSpec. /// - /// + /// /// The the Bicep identifier name of the TemplateSpec resource. This can /// be used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and /// underscores. /// /// Version of the TemplateSpec. - public TemplateSpec(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Resources/templateSpecs", resourceVersion ?? "2022-02-01") + public TemplateSpec(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Resources/templateSpecs", resourceVersion ?? "2022-02-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _location = BicepValue.DefineProperty(this, "Location", ["location"], isRequired: true); @@ -132,7 +132,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing TemplateSpec. /// - /// + /// /// The the Bicep identifier name of the TemplateSpec resource. This can /// be used to refer to the resource in expressions, but is not the Azure /// name of the resource. This value can contain letters, numbers, and @@ -140,8 +140,8 @@ public static class ResourceVersions /// /// Version of the TemplateSpec. /// The existing TemplateSpec resource. - public static TemplateSpec FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static TemplateSpec FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; /// /// Get the requirements for naming this TemplateSpec resource. diff --git a/sdk/provisioning/Azure.Provisioning/src/Generated/TemplateSpecVersion.cs b/sdk/provisioning/Azure.Provisioning/src/Generated/TemplateSpecVersion.cs index 0f948885580e..25de1f01e1f0 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Generated/TemplateSpecVersion.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Generated/TemplateSpecVersion.cs @@ -15,7 +15,7 @@ namespace Azure.Provisioning.Resources; /// /// TemplateSpecVersion. /// -public partial class TemplateSpecVersion : Resource +public partial class TemplateSpecVersion : ProvisionableResource { /// /// Gets the Name. @@ -127,15 +127,15 @@ public partial class TemplateSpecVersion : Resource /// /// Creates a new TemplateSpecVersion. /// - /// + /// /// The the Bicep identifier name of the TemplateSpecVersion resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, /// numbers, and underscores. /// /// Version of the TemplateSpecVersion. - public TemplateSpecVersion(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Resources/templateSpecs/versions", resourceVersion ?? "2022-02-01") + public TemplateSpecVersion(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Resources/templateSpecs/versions", resourceVersion ?? "2022-02-01") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isOutput: true); _location = BicepValue.DefineProperty(this, "Location", ["location"], isRequired: true); @@ -169,7 +169,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing TemplateSpecVersion. /// - /// + /// /// The the Bicep identifier name of the TemplateSpecVersion resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, @@ -177,6 +177,6 @@ public static class ResourceVersions /// /// Version of the TemplateSpecVersion. /// The existing TemplateSpecVersion resource. - public static TemplateSpecVersion FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static TemplateSpecVersion FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; } diff --git a/sdk/provisioning/Azure.Provisioning/src/Generated/Tenant.cs b/sdk/provisioning/Azure.Provisioning/src/Generated/Tenant.cs index c8edb0b795aa..362953f72b0e 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Generated/Tenant.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Generated/Tenant.cs @@ -16,7 +16,7 @@ namespace Azure.Provisioning.Resources; /// /// Tenant. /// -public partial class Tenant : Resource +public partial class Tenant : ProvisionableResource { /// /// Country/region name of the address for the tenant. @@ -83,15 +83,15 @@ public partial class Tenant : Resource /// /// Creates a new Tenant. /// - /// + /// /// The the Bicep identifier name of the Tenant resource. This can be used /// to refer to the resource in expressions, but is not the Azure name of /// the resource. This value can contain letters, numbers, and /// underscores. /// /// Version of the Tenant. - public Tenant(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.Resources/tenants", resourceVersion ?? "2020-01-01") + public Tenant(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Resources/tenants", resourceVersion ?? "2020-01-01") { _country = BicepValue.DefineProperty(this, "Country", ["country"], isOutput: true); _countryCode = BicepValue.DefineProperty(this, "CountryCode", ["countryCode"], isOutput: true); @@ -235,7 +235,7 @@ public static class ResourceVersions /// /// A Tenant resource. [EditorBrowsable(EditorBrowsableState.Never)] - public static Tenant FromExpression(Expression expression) + public static Tenant FromExpression(BicepExpression expression) { Tenant resource = new(nameof(Tenant)); resource.OverrideWithExpression(expression); diff --git a/sdk/provisioning/Azure.Provisioning/src/Generated/UserAssignedIdentity.cs b/sdk/provisioning/Azure.Provisioning/src/Generated/UserAssignedIdentity.cs index fb2b149e5be7..55e8b92a2870 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Generated/UserAssignedIdentity.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Generated/UserAssignedIdentity.cs @@ -17,7 +17,7 @@ namespace Azure.Provisioning.Roles; /// /// UserAssignedIdentity. /// -public partial class UserAssignedIdentity : Resource +public partial class UserAssignedIdentity : ProvisionableResource { /// /// The name of the identity resource. @@ -72,15 +72,15 @@ public partial class UserAssignedIdentity : Resource /// /// Creates a new UserAssignedIdentity. /// - /// + /// /// The the Bicep identifier name of the UserAssignedIdentity resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, /// numbers, and underscores. /// /// Version of the UserAssignedIdentity. - public UserAssignedIdentity(string identifierName, string? resourceVersion = default) - : base(identifierName, "Microsoft.ManagedIdentity/userAssignedIdentities", resourceVersion ?? "2023-01-31") + public UserAssignedIdentity(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.ManagedIdentity/userAssignedIdentities", resourceVersion ?? "2023-01-31") { _name = BicepValue.DefineProperty(this, "Name", ["name"], isRequired: true); _location = BicepValue.DefineProperty(this, "Location", ["location"], isRequired: true); @@ -131,7 +131,7 @@ public static class ResourceVersions /// /// Creates a reference to an existing UserAssignedIdentity. /// - /// + /// /// The the Bicep identifier name of the UserAssignedIdentity resource. /// This can be used to refer to the resource in expressions, but is not /// the Azure name of the resource. This value can contain letters, @@ -139,8 +139,8 @@ public static class ResourceVersions /// /// Version of the UserAssignedIdentity. /// The existing UserAssignedIdentity resource. - public static UserAssignedIdentity FromExisting(string identifierName, string? resourceVersion = default) => - new(identifierName, resourceVersion) { IsExistingResource = true }; + public static UserAssignedIdentity FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; /// /// Get the requirements for naming this UserAssignedIdentity resource. diff --git a/sdk/provisioning/Azure.Provisioning/src/Infrastructure.cs b/sdk/provisioning/Azure.Provisioning/src/Infrastructure.cs index caa60880f3e7..e068dacd59ec 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Infrastructure.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Infrastructure.cs @@ -13,25 +13,29 @@ namespace Azure.Provisioning; /// /// Collect resources and other constructs like parameters together. /// -/// -public class Infrastructure(string name = "main") : Provisionable +/// +/// A friendly name that can also be used as a file name if compiling to a +/// module. +/// +public class Infrastructure(string bicepName = "main") : Provisionable { /// - /// A friendly name that can also be used if compiling to a module. + /// A friendly name that can also be used as a file name if compiling to a + /// module. /// - public string Name { get; private set; } = name; + public string BicepName { get; private set; } = bicepName; /// /// Optional target scope for the infrastructure. If left empty, then - /// resourcegroup is assumed. + /// is assumed. /// - public string? TargetScope { get; set; } + public DeploymentScope? TargetScope { get; set; } // Placeholder until we get module splitting handled private Infrastructure? _parent = null; /// - public override IEnumerable GetResources() => _resources; + public override IEnumerable GetProvisionableResources() => _resources; private readonly List _resources = []; /// @@ -44,7 +48,7 @@ public class Infrastructure(string name = "main") : Provisionable /// public virtual void Add(Provisionable resource) { - if (resource is ProvisioningConstruct construct && + if (resource is ProvisionableConstruct construct && construct.ParentInfrastructure != this) { // Don't parent expression references @@ -70,7 +74,7 @@ public virtual void Add(Provisionable resource) // Ensure all cases are covered Debug.Assert( - resource is ProvisioningConstruct || resource is Infrastructure, + resource is ProvisionableConstruct || resource is Infrastructure, $"{nameof(Infrastructure)} needs to be updated if you add a new fork in the hierarchy derived from {nameof(Provisionable)}!"); } @@ -80,7 +84,7 @@ public virtual void Add(Provisionable resource) /// The provisionable construct to remove. public virtual void Remove(Provisionable resource) { - if (resource is ProvisioningConstruct construct && + if (resource is ProvisionableConstruct construct && construct.ParentInfrastructure == this) { construct.ParentInfrastructure = null; @@ -103,13 +107,13 @@ private static bool IsAsciiLetterOrDigit(char ch) => /// Checks whether an name is a valid bicep identifier name comprised of /// letters, digits, and underscores. /// - /// The proposed identifier name. - /// Whether the name is a valid bicep identifier name. - public static bool IsValidIdentifierName(string? identifierName) + /// The proposed identifier. + /// Whether the name is a valid bicep identifier. + public static bool IsValidBicepIdentifier(string? bicepIdentifier) { - if (string.IsNullOrEmpty(identifierName)) { return false; } - if (char.IsDigit(identifierName![0])) { return false; } - foreach (char ch in identifierName) + if (string.IsNullOrEmpty(bicepIdentifier)) { return false; } + if (char.IsDigit(bicepIdentifier![0])) { return false; } + foreach (char ch in bicepIdentifier) { if (!IsAsciiLetterOrDigit(ch) && ch != '_') { @@ -123,31 +127,31 @@ public static bool IsValidIdentifierName(string? identifierName) /// Validates whether a given bicep identifier name is correctly formed of /// letters, numbers, and underscores. /// - /// The proposed bicep identifier name. + /// The proposed bicep identifier. /// Optional parameter name to use for exceptions. /// Throws if null. /// Throws if empty or invalid. - public static void ValidateIdentifierName(string? identifierName, string? paramName = default) + public static void ValidateBicepIdentifier(string? bicepIdentifier, string? paramName = default) { - paramName ??= nameof(identifierName); - if (identifierName is null) + paramName ??= nameof(bicepIdentifier); + if (bicepIdentifier is null) { throw new ArgumentNullException(paramName, $"{paramName} cannot be null."); } - else if (identifierName.Length == 0) + else if (bicepIdentifier.Length == 0) { throw new ArgumentException($"{paramName} cannot be empty.", paramName); } - else if (char.IsDigit(identifierName[0])) + else if (char.IsDigit(bicepIdentifier[0])) { - throw new ArgumentException($"{paramName} cannot start with a number: \"{identifierName}\"", paramName); + throw new ArgumentException($"{paramName} cannot start with a number: \"{bicepIdentifier}\"", paramName); } - foreach (var ch in identifierName) + foreach (var ch in bicepIdentifier) { if (!IsAsciiLetterOrDigit(ch) && ch != '_') { - throw new ArgumentException($"{paramName} should only contain letters, numbers, and underscores: \"{identifierName}\"", paramName); + throw new ArgumentException($"{paramName} should only contain letters, numbers, and underscores: \"{bicepIdentifier}\"", paramName); } } } @@ -156,38 +160,38 @@ public static void ValidateIdentifierName(string? identifierName, string? paramN /// Normalizes a proposed bicep identifier name. Any invalid characters /// will be replaced with underscores. /// - /// The proposed bicep identifier name. + /// The proposed bicep identifier. /// A valid bicep identifier name. /// Throws if null. /// Throws if empty. - public static string NormalizeIdentifierName(string? identifierName) + public static string NormalizeBicepIdentifier(string? bicepIdentifier) { - if (IsValidIdentifierName(identifierName)) + if (IsValidBicepIdentifier(bicepIdentifier)) { - return identifierName!; + return bicepIdentifier!; } - if (identifierName is null) + if (bicepIdentifier is null) { // TODO: This may be relaxed in the future to generate an automatic // name rather than throwing - throw new ArgumentNullException(nameof(identifierName), $"{nameof(identifierName)} cannot be null."); + throw new ArgumentNullException(nameof(bicepIdentifier), $"{nameof(bicepIdentifier)} cannot be null."); } - else if (identifierName.Length == 0) + else if (bicepIdentifier.Length == 0) { - throw new ArgumentException($"{nameof(identifierName)} cannot be empty.", nameof(identifierName)); + throw new ArgumentException($"{nameof(bicepIdentifier)} cannot be empty.", nameof(bicepIdentifier)); } - StringBuilder builder = new(identifierName.Length); + StringBuilder builder = new(bicepIdentifier.Length); // Digits are not allowed as the first character, so prepend an - // underscore if the identifierName starts with a digit - if (char.IsDigit(identifierName[0])) + // underscore if the bicepIdentifier starts with a digit + if (char.IsDigit(bicepIdentifier[0])) { builder.Append('_'); } - foreach (char ch in identifierName) + foreach (char ch in bicepIdentifier) { // TODO: Consider opening this up to other naming strategies if // someone can do something more intelligent for their usage/domain @@ -198,86 +202,92 @@ public static string NormalizeIdentifierName(string? identifierName) } /// - protected internal override void Validate(ProvisioningContext? context = null) + protected internal override void Validate(ProvisioningBuildOptions? options = null) { - context ??= new(); - base.Validate(context); - foreach (Provisionable resource in GetResources()) { resource.Validate(context); } + options ??= new(); + base.Validate(options); + foreach (Provisionable resource in GetProvisionableResources()) { resource.Validate(options); } } /// - protected internal override void Resolve(ProvisioningContext? context = default) + protected internal override void Resolve(ProvisioningBuildOptions? options = default) { - context ??= new(); - base.Resolve(context); + options ??= new(); + base.Resolve(options); - Provisionable[] cached = [.. GetResources()]; // Copy so Resolve can mutate - foreach (Provisionable resource in cached) { resource.Resolve(context); } + Provisionable[] cached = [.. GetProvisionableResources()]; // Copy so Resolve can mutate + foreach (Provisionable resource in cached) { resource.Resolve(options); } - foreach (InfrastructureResolver resolver in context.InfrastructureResolvers) + foreach (InfrastructureResolver resolver in options.InfrastructureResolvers) { - resolver.ResolveInfrastructure(context, this); + resolver.ResolveInfrastructure(this, options); } } /// - protected internal override IEnumerable Compile() => - // TODO: For now I'm letting this through in case someone calls Compile - // before Build while debugging. We could also make it a little less - // friendly and more predictable by throwing here. - CompileInternal(context: null); + protected internal override IEnumerable Compile() => + CompileInternal(options: null); /// /// Compile this infrastructure into a set of bicep modules. /// - /// Provisioning context. + /// Provisioning options. /// Dictionary mapping module names to module definitions. - protected internal IDictionary> CompileModules(ProvisioningContext? context = default) + protected internal IDictionary> CompileModules(ProvisioningBuildOptions? options = default) { // This API shape will eventually help us grow into compiling multiple // modules at once and automatically splitting resources across them. - context ??= new(); - Dictionary> modules = []; - modules.Add(Name, CompileInternal(context)); + options ??= new(); + Dictionary> modules = []; + modules.Add(BicepName, CompileInternal(options)); // Optionally add any nested modules List nested = []; - foreach (InfrastructureResolver resolver in context.InfrastructureResolvers) + foreach (InfrastructureResolver resolver in options.InfrastructureResolvers) { - nested.AddRange(resolver.GetNestedInfrastructure(context, this)); + nested.AddRange(resolver.GetNestedInfrastructure(this, options)); } foreach (Infrastructure infra in nested) { - modules.Add(infra.Name, infra.CompileInternal(context)); + modules.Add(infra.BicepName, infra.CompileInternal(options)); } return modules; } /// - private List CompileInternal(ProvisioningContext? context) + private List CompileInternal(ProvisioningBuildOptions? options) { - List statements = []; + List statements = []; if (TargetScope is not null) { - statements.Add(new TargetScopeStatement(TargetScope)); + statements.Add( + new TargetScopeStatement( + TargetScope switch + { + DeploymentScope.ResourceGroup => "resourceGroup", + DeploymentScope.Subscription => "subscription", + DeploymentScope.ManagementGroup => "managementGroup", + DeploymentScope.Tenant => "tenant", + _ => throw new InvalidOperationException($"Unknown deployment scope: {TargetScope}") + })); } - IEnumerable resources = GetResources(); + IEnumerable resources = GetProvisionableResources(); // Optionally customize the resources with the extensibility hooks on - // ProvisioningContext. - if (context is not null) + // ProvisioningBuildOptions. + if (options is not null) { - foreach (InfrastructureResolver resolver in context.InfrastructureResolvers) + foreach (InfrastructureResolver resolver in options.InfrastructureResolvers) { - resources = resolver.ResolveResources(context, resources); + resources = resolver.ResolveResources(resources, options); } } foreach (Provisionable resource in resources) { - if (resource is ProvisioningConstruct construct) + if (resource is ProvisionableConstruct construct) { statements.AddRange(construct.Compile()); } @@ -298,18 +308,18 @@ private List CompileInternal(ProvisioningContext? context) /// Compose all the resources into a concrete /// that can be compiled into Bicep, deployed, etc. /// - /// - /// The provisioning context to use for composing resources. + /// + /// The build options to use for composing resources. /// /// /// A that can be compiled into Bicep, /// deployed, etc. /// - public virtual ProvisioningPlan Build(ProvisioningContext? context = default) + public virtual ProvisioningPlan Build(ProvisioningBuildOptions? options = default) { - context ??= new(); - Resolve(context); - Validate(context); - return new ProvisioningPlan(this, context); + options ??= new(); + Resolve(options); + Validate(options); + return new ProvisioningPlan(this, options); } } diff --git a/sdk/provisioning/Azure.Provisioning/src/Primitives/BicepLiteral.cs b/sdk/provisioning/Azure.Provisioning/src/Primitives/BicepLiteral.cs index d00e40fb75bc..10791a8061e8 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Primitives/BicepLiteral.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Primitives/BicepLiteral.cs @@ -13,10 +13,9 @@ namespace Azure.Provisioning.Primitives; /// /// Inject literal bicep statements. /// -public class BicepLiteral(string resourceName, params Statement[] statements) - : NamedProvisioningConstruct(resourceName) +public class BicepLiteral(params BicepStatement[] statements) + : ProvisionableConstruct() { - public IList Statements { get; } = statements; - - protected internal override IEnumerable Compile() => Statements; + public IList Statements { get; } = statements; + protected internal override IEnumerable Compile() => Statements; } diff --git a/sdk/provisioning/Azure.Provisioning/src/Primitives/BicepValueReference.cs b/sdk/provisioning/Azure.Provisioning/src/Primitives/BicepValueReference.cs index 8fdf52d8e946..47f6b32aa4b7 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Primitives/BicepValueReference.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Primitives/BicepValueReference.cs @@ -11,21 +11,21 @@ namespace Azure.Provisioning.Primitives; // graph so we can intelligently and automatically split expressions across // module boundaries. -public class BicepValueReference(ProvisioningConstruct construct, string propertyName, params string[]? path) +public class BicepValueReference(ProvisionableConstruct construct, string propertyName, params string[]? path) { - public ProvisioningConstruct Construct { get; } = construct; + public ProvisionableConstruct Construct { get; } = construct; public string PropertyName { get; } = propertyName; public IReadOnlyList? BicepPath { get; } = path; - internal Expression GetReference() + internal BicepExpression GetReference() { // We'll relax this soon - if (Construct is not NamedProvisioningConstruct named) + if (Construct is not NamedProvisionableConstruct named) { throw new NotImplementedException("Cannot reference a construct without a name yet."); } - Expression target = BicepSyntax.Var(named.IdentifierName); + BicepExpression target = BicepSyntax.Var(named.BicepIdentifier); if (BicepPath is not null) { foreach (string segment in BicepPath) diff --git a/sdk/provisioning/Azure.Provisioning/src/Primitives/DeploymentScope.cs b/sdk/provisioning/Azure.Provisioning/src/Primitives/DeploymentScope.cs new file mode 100644 index 000000000000..040f5c527bc8 --- /dev/null +++ b/sdk/provisioning/Azure.Provisioning/src/Primitives/DeploymentScope.cs @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +namespace Azure.Provisioning.Primitives; + +/// +/// Target scope to use when deploying resources. +/// +public enum DeploymentScope +{ + /// + /// Scope to a resource group. + /// + ResourceGroup = 0, + + /// + /// Scope to a subscription. + /// + Subscription, + + /// + /// Scope to a management group. + /// + ManagementGroup, + + /// + /// Scope to a tenant. + /// + Tenant +} diff --git a/sdk/provisioning/Azure.Provisioning/src/Primitives/IClientCreator.cs b/sdk/provisioning/Azure.Provisioning/src/Primitives/IClientCreator.cs index 8211fd72c1a8..44d137d80a89 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Primitives/IClientCreator.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Primitives/IClientCreator.cs @@ -1,6 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. +#if EXPERIMENTAL_PROVISIONING + using System.Collections.Generic; using Azure.Core; @@ -71,7 +73,7 @@ public TClient CreateClient( public class ClientCreatorOutputResolver : InfrastructureResolver { /// - public override IEnumerable ResolveResources(ProvisioningContext context, IEnumerable resources) + public override IEnumerable ResolveResources(IEnumerable resources, ProvisioningBuildOptions options) { foreach (Provisionable resource in resources) { @@ -89,3 +91,5 @@ public override IEnumerable ResolveResources(ProvisioningContext } } } + +#endif diff --git a/sdk/provisioning/Azure.Provisioning/src/Primitives/InfrastructureResolver.cs b/sdk/provisioning/Azure.Provisioning/src/Primitives/InfrastructureResolver.cs index 5b1c6d102228..b962bc6cbee9 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Primitives/InfrastructureResolver.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Primitives/InfrastructureResolver.cs @@ -14,37 +14,48 @@ namespace Azure.Provisioning.Primitives; /// public abstract class InfrastructureResolver { + /// + /// Try to resolve the values of any unset properties in the given construct. + /// + /// The construct with properties to resolve. + /// The current build options. + public virtual void ResolveProperties( + ProvisionableConstruct construct, + ProvisioningBuildOptions options) + { + } + /// /// Resolve any properties of the infrastructure. /// - /// The current provisioning context. /// The infrastructure to resolve properties of. + /// The current build options. public virtual void ResolveInfrastructure( - ProvisioningContext context, - Infrastructure infrastructure) + Infrastructure infrastructure, + ProvisioningBuildOptions options) { } /// /// Process the collection of resources in the infrastructure. /// - /// The current provisioning context. /// The existing resources to resolve. + /// The current build options. public virtual IEnumerable ResolveResources( - ProvisioningContext context, - IEnumerable resources) => + IEnumerable resources, + ProvisioningBuildOptions options) => resources; /// /// Gets any nested infrastructure that should be composed separately. /// - /// The current provisioning context. /// /// The infrastructure to inspect for any nested infrastructure. /// - /// - public IEnumerable GetNestedInfrastructure( - ProvisioningContext context, - Infrastructure infrastructure) => + /// The current build options. + /// Nested infrastructure. + public virtual IEnumerable GetNestedInfrastructure( + Infrastructure infrastructure, + ProvisioningBuildOptions options) => []; } diff --git a/sdk/provisioning/Azure.Provisioning/src/Primitives/LocationPropertyResolver.cs b/sdk/provisioning/Azure.Provisioning/src/Primitives/LocationPropertyResolver.cs index 217a422dd45b..3c6c1516b169 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Primitives/LocationPropertyResolver.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Primitives/LocationPropertyResolver.cs @@ -13,18 +13,18 @@ namespace Azure.Provisioning.Primitives; /// /// Default all location properties to their resource group's location. /// -public class LocationPropertyResolver : PropertyResolver +public class LocationPropertyResolver : InfrastructureResolver { /// - public override void ResolveProperties(ProvisioningContext context, ProvisioningConstruct construct) + public override void ResolveProperties(ProvisionableConstruct construct, ProvisioningBuildOptions options) { // We only need to set a location if one doesn't already exist if (construct.ProvisioningProperties.TryGetValue("Location", out BicepValue? location) && location.Kind == BicepValueKind.Unset && !location.IsOutput && - (construct is not Resource r || !r.IsExistingResource)) + (construct is not ProvisionableResource r || !r.IsExistingResource)) { - ProvisioningParameter param = GetOrCreateLocationParameter(context, construct); + ProvisioningParameter param = GetOrCreateLocationParameter(options, construct); construct.SetProvisioningProperty(location, (BicepValue)param); } } @@ -32,7 +32,7 @@ public override void ResolveProperties(ProvisioningContext context, Provisioning /// /// Gets the default location for a construct. /// - /// The provisioning context for this construct. + /// The build options for this resource. /// The construct with an unset Location property. /// A unique dynamic name suffix for the resource. /// @@ -40,7 +40,7 @@ public override void ResolveProperties(ProvisioningContext context, Provisioning /// `deployment().location` for resource groups. This can be overridden to /// provide a different default location. /// - protected virtual BicepValue GetDefaultLocation(ProvisioningContext context, ProvisioningConstruct construct) => + protected virtual BicepValue GetDefaultLocation(ProvisioningBuildOptions options, ProvisionableConstruct construct) => construct is not ResourceGroup ? BicepFunction.GetResourceGroup().Location : BicepFunction.GetDeployment().Location; @@ -48,25 +48,25 @@ construct is not ResourceGroup ? /// /// Find or inject a parameter for the location property. /// - /// The provisioning context for this construct. + /// The build options for this resource. /// The construct with an unset Location property. /// private ProvisioningParameter GetOrCreateLocationParameter( - ProvisioningContext context, - ProvisioningConstruct construct) + ProvisioningBuildOptions options, + ProvisionableConstruct construct) { // Get the default value for the location - BicepValue location = GetDefaultLocation(context, construct); + BicepValue location = GetDefaultLocation(options, construct); string expression = location.Compile().ToString(); // Try to find an existing location param with the same value Infrastructure infra = construct.ParentInfrastructure ?? throw new InvalidOperationException($"Construct {construct} must be added to an {nameof(Infrastructure)} instance before resolving properties."); - IDictionary existing = - infra.GetResources() + Dictionary existing = + infra.GetProvisionableResources() .OfType() - .Where(p => p.IdentifierName.StartsWith("location")) - .ToDictionary(p => p.IdentifierName); + .Where(p => p.BicepIdentifier.StartsWith("location")) + .ToDictionary(p => p.BicepIdentifier); foreach (ProvisioningParameter p in existing.Values) { if (p.BicepType is TypeExpression type && @@ -85,9 +85,9 @@ private ProvisioningParameter GetOrCreateLocationParameter( bool increment = true; // Optionally specialize to the resource - if (construct is NamedProvisioningConstruct resource) + if (construct is NamedProvisionableConstruct resource) { - name = $"{name}_{resource.IdentifierName}"; + name = $"{name}_{resource.BicepIdentifier}"; increment = existing.ContainsKey(name); } diff --git a/sdk/provisioning/Azure.Provisioning/src/Primitives/ModuleImport.cs b/sdk/provisioning/Azure.Provisioning/src/Primitives/ModuleImport.cs index 6e5981b732ec..371759780f2c 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Primitives/ModuleImport.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Primitives/ModuleImport.cs @@ -6,7 +6,7 @@ namespace Azure.Provisioning.Primitives; -public class ModuleImport : NamedProvisioningConstruct +public class ModuleImport : NamedProvisionableConstruct { private readonly BicepValue _name; public BicepValue Name { get => _name; set => _name.Assign(value); } @@ -19,7 +19,7 @@ public class ModuleImport : NamedProvisioningConstruct public BicepDictionary Parameters { get; } - public ModuleImport(string identifierName, BicepValue path) : base(identifierName) + public ModuleImport(string bicepIdentifier, BicepValue path) : base(bicepIdentifier) { _name = BicepValue.DefineProperty(this, nameof(Name), ["name"], isRequired: true); _path = BicepValue.DefineProperty(this, nameof(Path), ["path"], defaultValue: path); @@ -27,19 +27,19 @@ public ModuleImport(string identifierName, BicepValue path) : base(ident Parameters = BicepDictionary.DefineProperty(this, nameof(Parameters), ["params"]); } - protected internal override void Validate(ProvisioningContext? context = null) + protected internal override void Validate(ProvisioningBuildOptions? options = null) { - base.Validate(context); + base.Validate(options); ValidateProperties(); } - protected internal override IEnumerable Compile() + protected internal override IEnumerable Compile() { - List statements = []; - Dictionary properties = new() { { "name", _name.Compile() } }; + List statements = []; + Dictionary properties = new() { { "name", _name.Compile() } }; if (_scope.Kind != BicepValueKind.Unset) { properties.Add("scope", _scope.Compile()); } if (Parameters.Count > 0) { properties.Add("params", Parameters.Compile()); } - ModuleStatement module = BicepSyntax.Declare.Module(IdentifierName, _path.Compile(), BicepSyntax.Object(properties)); + ModuleStatement module = BicepSyntax.Declare.Module(BicepIdentifier, _path.Compile(), BicepSyntax.Object(properties)); statements.Add(module); return statements; } diff --git a/sdk/provisioning/Azure.Provisioning/src/Primitives/NamedProvisionableConstruct.cs b/sdk/provisioning/Azure.Provisioning/src/Primitives/NamedProvisionableConstruct.cs new file mode 100644 index 000000000000..3187b9f7dc46 --- /dev/null +++ b/sdk/provisioning/Azure.Provisioning/src/Primitives/NamedProvisionableConstruct.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +namespace Azure.Provisioning.Primitives; + +/// +/// A named Bicep entity, like a resource or parameter. +/// +public abstract class NamedProvisionableConstruct : ProvisionableConstruct +{ + /// + /// Gets or sets the the Bicep identifier name of the resource. This can + /// be used to refer to the resource in expressions, but is not the Azure + /// name of the resource. This value can contain letters, numbers, and + /// underscores. + /// + public string BicepIdentifier + { + get => _bicepIdentifier; + set + { + Infrastructure.ValidateBicepIdentifier(value, nameof(value)); + _bicepIdentifier = value; + } + } + private string _bicepIdentifier; + + /// + /// Creates a named Bicep entity, like a resource or parameter. + /// + /// + /// The the Bicep identifier name of the resource. This can be used to + /// refer to the resource in expressions, but is not the Azure name of the + /// resource. This value can contain letters, numbers, and underscores. + /// + protected NamedProvisionableConstruct(string bicepIdentifier) + { + // TODO: In the near future we'll make this optional and only validate + // if the value passed in isn't null. + Infrastructure.ValidateBicepIdentifier(bicepIdentifier, nameof(bicepIdentifier)); + _bicepIdentifier = bicepIdentifier; + } +} diff --git a/sdk/provisioning/Azure.Provisioning/src/Primitives/OrderingInfrastructureResolver.cs b/sdk/provisioning/Azure.Provisioning/src/Primitives/OrderingInfrastructureResolver.cs index 9185977d7f8f..99b701894687 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Primitives/OrderingInfrastructureResolver.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Primitives/OrderingInfrastructureResolver.cs @@ -14,8 +14,8 @@ public class OrderingInfrastructureResolver : InfrastructureResolver { /// public override IEnumerable ResolveResources( - ProvisioningContext context, - IEnumerable resources) => + IEnumerable resources, + ProvisioningBuildOptions options) => resources.OrderBy(construct => construct switch { diff --git a/sdk/provisioning/Azure.Provisioning/src/Primitives/PropertyResolver.cs b/sdk/provisioning/Azure.Provisioning/src/Primitives/PropertyResolver.cs deleted file mode 100644 index cc0b322d0f54..000000000000 --- a/sdk/provisioning/Azure.Provisioning/src/Primitives/PropertyResolver.cs +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -namespace Azure.Provisioning.Primitives; - -/// -/// A property resolver attempts to resolve the values of any unset properties -/// in a construct. This can be useful for defaulting common values, -/// implementing organization policies, or other scenarios where you want to -/// uniformly configure all the resources in a deployment. -/// -public abstract class PropertyResolver -{ - /// - /// Try to resolve the values of any unset properties in the given construct. - /// - /// The current provisioning context. - /// The construct with properties to resolve. - public abstract void ResolveProperties(ProvisioningContext context, ProvisioningConstruct construct); -} diff --git a/sdk/provisioning/Azure.Provisioning/src/Primitives/Provisionable.cs b/sdk/provisioning/Azure.Provisioning/src/Primitives/Provisionable.cs index 6b02de55a845..89e1500fdac1 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Primitives/Provisionable.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Primitives/Provisionable.cs @@ -21,23 +21,23 @@ internal Provisionable() { } /// be the object itself for everything but . /// /// Any resources represented by this object. - public virtual IEnumerable GetResources() { yield return this; } + public virtual IEnumerable GetProvisionableResources() { yield return this; } /// /// Resolve any resources or properties that were not explicitly specified. /// - /// Optional . - protected internal virtual void Resolve(ProvisioningContext? context = default) { } + /// Optional . + protected internal virtual void Resolve(ProvisioningBuildOptions? options = default) { } /// /// Validate the presence of any required members. /// - /// Optional . - protected internal virtual void Validate(ProvisioningContext? context = default) { } + /// Optional . + protected internal virtual void Validate(ProvisioningBuildOptions? options = default) { } /// /// Compile the resource into a set of Bicep statements. /// /// Bicep representation of the resource. - protected internal abstract IEnumerable Compile(); + protected internal abstract IEnumerable Compile(); } diff --git a/sdk/provisioning/Azure.Provisioning/src/Primitives/ProvisioningConstruct.cs b/sdk/provisioning/Azure.Provisioning/src/Primitives/ProvisionableConstruct.cs similarity index 68% rename from sdk/provisioning/Azure.Provisioning/src/Primitives/ProvisioningConstruct.cs rename to sdk/provisioning/Azure.Provisioning/src/Primitives/ProvisionableConstruct.cs index a54c3a8a74c5..4c686c1a71e0 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Primitives/ProvisioningConstruct.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Primitives/ProvisionableConstruct.cs @@ -9,48 +9,7 @@ namespace Azure.Provisioning.Primitives; -/// -/// A named Bicep entity, like a resource or parameter. -/// -public abstract class NamedProvisioningConstruct : ProvisioningConstruct -{ - /// - /// Gets or sets the the Bicep identifier name of the resource. This can - /// be used to refer to the resource in expressions, but is not the Azure - /// name of the resource. This value can contain letters, numbers, and - /// underscores. - /// - public string IdentifierName - { - get => _identifierName; - set - { - Infrastructure.ValidateIdentifierName(value, nameof(value)); - _identifierName = value; - } - } - private string _identifierName; - // TODO: Listen for customer feedback and discuss IdentifierName vs. - // ProvisioningName in the Arch Board - - /// - /// Creates a named Bicep entity, like a resource or parameter. - /// - /// - /// The the Bicep identifier name of the resource. This can be used to - /// refer to the resource in expressions, but is not the Azure name of the - /// resource. This value can contain letters, numbers, and underscores. - /// - protected NamedProvisioningConstruct(string identifierName) - { - // TODO: In the near future we'll make this optional and only validate - // if the value passed in isn't null. - Infrastructure.ValidateIdentifierName(identifierName, nameof(identifierName)); - _identifierName = identifierName; - } -} - -public abstract class ProvisioningConstruct : Provisionable +public abstract class ProvisionableConstruct : Provisionable { /// /// Gets the parent infrastructure construct, if any. @@ -60,7 +19,7 @@ public abstract class ProvisioningConstruct : Provisionable /// [EditorBrowsable(EditorBrowsableState.Never)] - public override IEnumerable GetResources() => base.GetResources(); + public override IEnumerable GetProvisionableResources() => base.GetProvisionableResources(); /// /// Gets the properties of the construct. @@ -74,7 +33,7 @@ public abstract class ProvisioningConstruct : Provisionable /// `resourceGroup()` function so people can use /// `BicepFunctions.GetResourceGroup().Location` just like `myRg.Location`). /// - internal Expression? ExpressionOverride { get; private set; } + internal BicepExpression? ExpressionOverride { get; private set; } /// /// Set this construct to represent the result of an expression. This is @@ -82,7 +41,7 @@ public abstract class ProvisioningConstruct : Provisionable /// specific resources or constructs. /// /// The expression. - protected internal void OverrideWithExpression(Expression reference) + protected internal void OverrideWithExpression(BicepExpression reference) { ExpressionOverride = reference; @@ -117,23 +76,23 @@ public void SetProvisioningProperty(BicepValue property, BicepValue value) } /// - protected internal override void Resolve(ProvisioningContext? context = null) + protected internal override void Resolve(ProvisioningBuildOptions? options = null) { - context ??= new(); - base.Resolve(context); + options ??= new(); + base.Resolve(options); // Resolve any property values - foreach (PropertyResolver resolver in context.PropertyResolvers) + foreach (InfrastructureResolver resolver in options.InfrastructureResolvers) { - resolver.ResolveProperties(context, this); + resolver.ResolveProperties(this, options); } } /// - protected internal override void Validate(ProvisioningContext? context = null) + protected internal override void Validate(ProvisioningBuildOptions? options = null) { - context ??= new(); - base.Validate(context); + options ??= new(); + base.Validate(options); } private protected virtual void ValidateProperties() @@ -153,10 +112,10 @@ private protected void RequireProperty(BicepValue value) } /// - protected internal override IEnumerable Compile() => - [new ExprStatement(CompileProperties())]; + protected internal override IEnumerable Compile() => + [new ExpressionStatement(CompileProperties())]; - private protected Expression CompileProperties() + private protected BicepExpression CompileProperties() { if (ExpressionOverride is not null) { return ExpressionOverride; } @@ -185,7 +144,7 @@ private protected Expression CompileProperties() // compiling values along the way static ObjectExpression CompileValues(IDictionary dict) { - Dictionary bicep = []; + Dictionary bicep = []; foreach (KeyValuePair pair in dict) { if (pair.Value is Dictionary nested) @@ -196,10 +155,10 @@ static ObjectExpression CompileValues(IDictionary dict) { bicep[pair.Key] = value.Compile(); } - else if (pair.Value is ProvisioningConstruct construct) + else if (pair.Value is ProvisionableConstruct construct) { - IList statements = [..construct.Compile()]; - if (statements.Count != 1 || statements[0] is not ExprStatement expr) + IList statements = [..construct.Compile()]; + if (statements.Count != 1 || statements[0] is not ExpressionStatement expr) { throw new InvalidOperationException($"Expected a single expression statement for {pair.Key}."); } diff --git a/sdk/provisioning/Azure.Provisioning/src/Primitives/Resource.cs b/sdk/provisioning/Azure.Provisioning/src/Primitives/ProvisionableResource.cs similarity index 75% rename from sdk/provisioning/Azure.Provisioning/src/Primitives/Resource.cs rename to sdk/provisioning/Azure.Provisioning/src/Primitives/ProvisionableResource.cs index 761d9b9362df..d0b23f627bc6 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Primitives/Resource.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Primitives/ProvisionableResource.cs @@ -13,11 +13,11 @@ namespace Azure.Provisioning.Primitives; /// /// Represents an Azure resource. /// -/// The friendly name of the resource. +/// The bicep identifier name of the resource. /// The type of the resource. /// The version of the resource. -public abstract class Resource(string resourceName, ResourceType resourceType, string? resourceVersion = default) - : NamedProvisioningConstruct(resourceName) +public abstract class ProvisionableResource(string bicepIdentifier, ResourceType resourceType, string? resourceVersion = default) + : NamedProvisionableConstruct(bicepIdentifier) { /// /// Gets the type of the resource. @@ -56,37 +56,33 @@ public abstract class Resource(string resourceName, ResourceType resourceType, s /// dependencies, you should consider if there's a way to remove it. /// /// - public IList DependsOn { get; } = []; - // TODO: Decide whether we want to support ResourceIdentifier in addition - // to actual Resources. Given it's a niche scenario, right now I'd lean - // toward making people use Foo.FromExisting("...") if they wanted to add a - // dependency to an external resource. + public IList DependsOn { get; } = []; /// /// Compose the resource into a provisioning plan that can be saved as /// Bicep or deployed directly. /// - /// Optional ProvisioningContext. + /// Optional ProvisioningBuildOptions. /// /// A provisioning plan that can be saved as Bicep or deployed directly. /// - public virtual ProvisioningPlan Build(ProvisioningContext? context = default) => - ParentInfrastructure?.Build(context ?? new()) ?? - throw new InvalidOperationException($"Cannot build a provisioning plan for {GetType().Name} resource {IdentifierName} before it has been added to {nameof(Infrastructure)}."); + public virtual ProvisioningPlan Build(ProvisioningBuildOptions? options = default) => + ParentInfrastructure?.Build(options ?? new()) ?? + throw new InvalidOperationException($"Cannot build a provisioning plan for {GetType().Name} resource {BicepIdentifier} before it has been added to {nameof(Infrastructure)}."); /// - protected internal override void Validate(ProvisioningContext? context = null) + protected internal override void Validate(ProvisioningBuildOptions? options = null) { - base.Validate(context); + base.Validate(options); if (ResourceVersion is null) { - throw new InvalidOperationException($"{GetType().Name} resource {IdentifierName} must have {nameof(ResourceVersion)} specified."); + throw new InvalidOperationException($"{GetType().Name} resource {BicepIdentifier} must have {nameof(ResourceVersion)} specified."); } if (DependsOn.Count > 0 && (IsExistingResource || ExpressionOverride is not null)) { - throw new InvalidOperationException($"{GetType().Name} resource {IdentifierName} cannot have dependencies if it's an existing resource or an expression override."); + throw new InvalidOperationException($"{GetType().Name} resource {BicepIdentifier} cannot have dependencies if it's an existing resource or an expression override."); } if (IsExistingResource) @@ -105,16 +101,16 @@ protected internal override void Validate(ProvisioningContext? context = null) } /// - protected internal override IEnumerable Compile() + protected internal override IEnumerable Compile() { if (ExpressionOverride is not null) { - yield return new ExprStatement(ExpressionOverride); + yield return new ExpressionStatement(ExpressionOverride); yield break; } // Compile the properties into an object - Expression body = CompileProperties(); + BicepExpression body = CompileProperties(); // Optionally add any explicit dependencies if (DependsOn.Count > 0) @@ -122,17 +118,17 @@ protected internal override IEnumerable Compile() // This should be caught by Validate above if (body is not ObjectExpression obj) { - throw new InvalidOperationException($"{GetType().Name} resource {IdentifierName} cannot have dependencies if it's an existing resource or an expression override."); + throw new InvalidOperationException($"{GetType().Name} resource {BicepIdentifier} cannot have dependencies if it's an existing resource or an expression override."); } // Add the dependsOn property - ArrayExpression dependencies = new(DependsOn.Select(r => BicepSyntax.Var(r.IdentifierName)).ToArray()); + ArrayExpression dependencies = new(DependsOn.Select(r => BicepSyntax.Var(r.BicepIdentifier)).ToArray()); body = new ObjectExpression([.. obj.Properties, new PropertyExpression("dependsOn", dependencies)]); } // Create a resource declaration ResourceStatement resource = BicepSyntax.Declare.Resource( - IdentifierName, + BicepIdentifier, $"{ResourceType}@{ResourceVersion}", body); if (IsExistingResource) diff --git a/sdk/provisioning/Azure.Provisioning/src/Primitives/ResourceNamePropertyResolver.cs b/sdk/provisioning/Azure.Provisioning/src/Primitives/ResourceNamePropertyResolver.cs index 352702dbbc4b..fa18657eb7d3 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Primitives/ResourceNamePropertyResolver.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Primitives/ResourceNamePropertyResolver.cs @@ -101,20 +101,20 @@ public readonly struct ResourceNameRequirements( /// https://learn.microsoft.com/azure/azure-resource-manager/management/resource-name-rules /// . /// -public abstract class ResourceNamePropertyResolver : PropertyResolver +public abstract class ResourceNamePropertyResolver : InfrastructureResolver { /// - public override void ResolveProperties(ProvisioningContext context, ProvisioningConstruct construct) + public override void ResolveProperties(ProvisionableConstruct construct, ProvisioningBuildOptions options) { // We only need to name resources - if (construct is not Resource resource) { return; } + if (construct is not ProvisionableResource resource) { return; } // We only need to create a name if one doesn't already exist if (resource.ProvisioningProperties.TryGetValue("Name", out BicepValue? name) && name.Kind == BicepValueKind.Unset && !name.IsOutput) { - BicepValue? resolved = ResolveName(context, resource, resource.GetResourceNameRequirements()); + BicepValue? resolved = ResolveName(options, resource, resource.GetResourceNameRequirements()); if (resolved is not null) { construct.SetProvisioningProperty(name, resolved); @@ -125,13 +125,13 @@ public override void ResolveProperties(ProvisioningContext context, Provisioning /// /// Resolve a name for the given resource. /// - /// The provisioning context for this resource. + /// The build options for this resource. /// The resource with an unset Name property. /// Requirements to name the resource. /// A name for the resource, if one could be created. public abstract BicepValue? ResolveName( - ProvisioningContext context, - Resource resource, + ProvisioningBuildOptions options, + ProvisionableResource resource, ResourceNameRequirements requirements); /// @@ -180,7 +180,7 @@ protected static string SanitizeText(string text, ResourceNameCharacters validCh /// /// Generate a unique name for a resource by combining the resource's -/// as a prefix and a +/// as a prefix and a /// unique suffix based on the current resource group's ID. /// public class DynamicResourceNamePropertyResolver : ResourceNamePropertyResolver @@ -191,32 +191,32 @@ public class DynamicResourceNamePropertyResolver : ResourceNamePropertyResolver /// /// Generate a unique name for a resource by combining the resource's - /// as a prefix and a + /// as a prefix and a /// unique suffix based on the current resource group's ID. /// - /// The provisioning context for this resource. + /// The build options for this resource. /// The resource with an unset Name property. /// Requirements to name the resource. /// A name for the resource. public override BicepValue? ResolveName( - ProvisioningContext context, - Resource resource, + ProvisioningBuildOptions options, + ProvisionableResource resource, ResourceNameRequirements requirements) { - string prefix = SanitizeText(resource.IdentifierName, requirements.ValidCharacters); + string prefix = SanitizeText(resource.BicepIdentifier, requirements.ValidCharacters); string separator = requirements.ValidCharacters.HasFlag(ResourceNameCharacters.Hyphen) ? "-" : requirements.ValidCharacters.HasFlag(ResourceNameCharacters.Underscore) ? "_" : requirements.ValidCharacters.HasFlag(ResourceNameCharacters.Period) ? "." : ""; - BicepValue suffix = GetUniqueSuffix(context, resource); + BicepValue suffix = GetUniqueSuffix(options, resource); return BicepFunction.Take(BicepFunction.Interpolate($"{prefix}{separator}{suffix}"), requirements.MaxLength); } /// /// Get a unique dynamic name suffix for the given resource. /// - /// The provisioning context for this resource. + /// The build options for this resource. /// The resource with an unset Name property. /// A unique dynamic name suffix for the resource. /// @@ -224,7 +224,7 @@ public class DynamicResourceNamePropertyResolver : ResourceNamePropertyResolver /// and `uniqueString(deployment().id)` for resource groups. This can be /// overridden to provide a different "entropy source." /// - protected virtual BicepValue GetUniqueSuffix(ProvisioningContext context, Resource resource) => + protected virtual BicepValue GetUniqueSuffix(ProvisioningBuildOptions options, ProvisionableResource resource) => BicepFunction.GetUniqueString( resource is not ResourceGroup ? BicepFunction.GetResourceGroup().Id : @@ -233,7 +233,7 @@ resource is not ResourceGroup ? /// /// Generate a unique name for a resource by combining the resource's -/// as a prefix and a +/// as a prefix and a /// randomly generated suffix of allowed characters. /// public class StaticResourceNamePropertyResolver : ResourceNamePropertyResolver @@ -242,12 +242,12 @@ public class StaticResourceNamePropertyResolver : ResourceNamePropertyResolver private static readonly char[] s_upper = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']; private static readonly char[] s_digits = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9']; - public override BicepValue? ResolveName(ProvisioningContext context, Resource resource, ResourceNameRequirements requirements) + public override BicepValue? ResolveName(ProvisioningBuildOptions options, ProvisionableResource resource, ResourceNameRequirements requirements) { StringBuilder name = new(capacity: requirements.MaxLength); // Start with the sanitized resource name - name.Append(SanitizeText(resource.IdentifierName, requirements.ValidCharacters)); + name.Append(SanitizeText(resource.BicepIdentifier, requirements.ValidCharacters)); if (name.Length >= requirements.MaxLength) { return name.ToString(0, requirements.MaxLength); @@ -267,7 +267,7 @@ public class StaticResourceNamePropertyResolver : ResourceNamePropertyResolver if (requirements.ValidCharacters.HasFlag(ResourceNameCharacters.Numbers)) { chars.AddRange(s_digits); } while (name.Length < requirements.MaxLength) { - name.Append(chars[context.Random.Next(chars.Count)]); + name.Append(chars[options.Random.Next(chars.Count)]); } return name.ToString(); diff --git a/sdk/provisioning/Azure.Provisioning/src/Primitives/ResourceReference.cs b/sdk/provisioning/Azure.Provisioning/src/Primitives/ResourceReference.cs index 8690c4a03e65..5a746ea11729 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Primitives/ResourceReference.cs +++ b/sdk/provisioning/Azure.Provisioning/src/Primitives/ResourceReference.cs @@ -10,7 +10,7 @@ namespace Azure.Provisioning.Primitives; /// Represents a reference to a resource. This is a helper for implementing /// resources and not something to be used directly. /// -public class ResourceReference(BicepValue reference) where T : Resource +public class ResourceReference(BicepValue reference) where T : ProvisionableResource { private readonly BicepValue _reference = reference; private T? _value; @@ -29,13 +29,13 @@ public T? Value // TODO: Consider tracking the source like we do for // BicepValue if that'll improve the overall experience // (debugging/errors/etc.) - BicepSyntax.Var(_value.IdentifierName); + BicepSyntax.Var(_value.BicepIdentifier); } } [EditorBrowsable(EditorBrowsableState.Never)] public static ResourceReference DefineResource( - Resource construct, + ProvisionableResource construct, string propertyName, string[]? bicepPath, bool isOutput = false, diff --git a/sdk/provisioning/Azure.Provisioning/src/ProvisioningContext.cs b/sdk/provisioning/Azure.Provisioning/src/ProvisioningBuildOptions.cs similarity index 70% rename from sdk/provisioning/Azure.Provisioning/src/ProvisioningContext.cs rename to sdk/provisioning/Azure.Provisioning/src/ProvisioningBuildOptions.cs index 3e3b1735a1a6..eba91acc3d59 100644 --- a/sdk/provisioning/Azure.Provisioning/src/ProvisioningContext.cs +++ b/sdk/provisioning/Azure.Provisioning/src/ProvisioningBuildOptions.cs @@ -8,32 +8,31 @@ namespace Azure.Provisioning; /// -/// ProvisioningContext collects common values, settings, and functionality +/// ProvisioningBuildOptions collects common values, settings, and functionality /// that are used for composing, building, and deploying resources with /// Azure.Provisioning libraries. /// -public class ProvisioningContext +public class ProvisioningBuildOptions { - /// - /// Gets or sets the collection of s to apply - /// to all resources being composed. - /// - public IList PropertyResolvers { get; set; } = - [ - new DynamicResourceNamePropertyResolver(), - new LocationPropertyResolver(), - ]; - // TODO: Do we want to make this less mutable like AddPipelinePolicy to - // maintain more control over how people are able to modify these? - /// /// Gets or sets the collection of s to /// apply to any being composed. /// - public IList InfrastructureResolvers { get; set; } = + /// + /// By default this adds , + /// , and + /// . You can clear this list + /// and replace it with other resolvers. You can also insert your own + /// resolvers before or after these resolvers. + /// + public IList InfrastructureResolvers { get; } = [ + new DynamicResourceNamePropertyResolver(), + new LocationPropertyResolver(), new OrderingInfrastructureResolver(), ]; + // TODO: Resource resolvers + // TODO: IConfig PropertyProvider /// /// Gets or sets a random generator. It defaults to a new @@ -46,6 +45,4 @@ public class ProvisioningContext public Random Random { get; set; } = new Random(); // TODO: Add a DefaultScope to allow globally scoping all resources - // TODO: Resource resolvers - // TODO: IConfig PropertyProvider } diff --git a/sdk/provisioning/Azure.Provisioning/src/ProvisioningOutput.cs b/sdk/provisioning/Azure.Provisioning/src/ProvisioningOutput.cs index 214c97a682ea..ba04254e37c5 100644 --- a/sdk/provisioning/Azure.Provisioning/src/ProvisioningOutput.cs +++ b/sdk/provisioning/Azure.Provisioning/src/ProvisioningOutput.cs @@ -15,30 +15,30 @@ public class ProvisioningOutput : ProvisioningVariable /// /// Creates a new ProvisioningOutput. /// - /// - /// Name of the output. This value can contain letters, numbers, and - /// underscores. + /// + /// Bicep identifier of the output. This value can contain letters, + /// numbers, and underscores. /// /// Type of the output. - public ProvisioningOutput(string name, Expression type) - : base(name, type, value: null) { } + public ProvisioningOutput(string bicepIdentifier, BicepExpression type) + : base(bicepIdentifier, type, value: null) { } /// /// Creates a new ProvisioningOutput. /// - /// - /// Name of the output. This value can contain letters, numbers, and - /// underscores. + /// + /// Bicep identifier of the output. This value can contain letters, + /// numbers, and underscores. /// /// Type of the output. - public ProvisioningOutput(string name, Type type) - : this(name, new TypeExpression(type)) { } + public ProvisioningOutput(string bicepIdentifier, Type type) + : this(bicepIdentifier, new TypeExpression(type)) { } /// - protected internal override IEnumerable Compile() + protected internal override IEnumerable Compile() { - OutputStatement stmt = BicepSyntax.Declare.Output(IdentifierName, BicepType, Value.Compile()); - if (Description is not null) { stmt = stmt.Decorate("description", BicepSyntax.Value(Description)); } - yield return stmt; + OutputStatement statement = BicepSyntax.Declare.Output(BicepIdentifier, BicepType, Value.Compile()); + if (Description is not null) { statement = statement.Decorate("description", BicepSyntax.Value(Description)); } + yield return statement; } } diff --git a/sdk/provisioning/Azure.Provisioning/src/ProvisioningParameter.cs b/sdk/provisioning/Azure.Provisioning/src/ProvisioningParameter.cs index ae9e64ba21a0..816884f87412 100644 --- a/sdk/provisioning/Azure.Provisioning/src/ProvisioningParameter.cs +++ b/sdk/provisioning/Azure.Provisioning/src/ProvisioningParameter.cs @@ -13,8 +13,9 @@ namespace Azure.Provisioning; public class ProvisioningParameter : ProvisioningVariable { /// - /// Gets or sets whether this parameter uses a secure value. It will default - /// to secure if provided a that is known to be secure. + /// Gets or sets whether this parameter uses a secure value. It will + /// default to secure if provided a + /// that is known to be secure. /// public bool IsSecure { @@ -26,31 +27,35 @@ public bool IsSecure /// /// Creates a new ProvisioningParameter. /// - /// - /// Name of the parameter. This value can contain letters, numbers, and - /// underscores. + /// + /// Bicep identifier of the parameter. This value can contain letters, + /// numbers, and underscores. /// /// Type of the parameter. - public ProvisioningParameter(string name, Expression type) - : base(name, type, value: null) { } + public ProvisioningParameter(string bicepIdentifier, BicepExpression type) + : base(bicepIdentifier, type, value: null) { } /// /// Creates a new ProvisioningParameter. /// - /// - /// Name of the parameter. This value can contain letters, numbers, and - /// underscores. + /// + /// Bicep identifier of the parameter. This value can contain letters, + /// numbers, and underscores. /// /// Type of the parameter. - public ProvisioningParameter(string name, Type type) - : this(name, new TypeExpression(type)) { } + public ProvisioningParameter(string bicepIdentifier, Type type) + : this(bicepIdentifier, new TypeExpression(type)) { } /// - protected internal override IEnumerable Compile() + protected internal override IEnumerable Compile() { - ParameterStatement stmt = BicepSyntax.Declare.Param(IdentifierName, BicepType, Value.Kind == BicepValueKind.Unset ? null : Value.Compile()); - if (IsSecure) { stmt = stmt.Decorate("secure"); } - if (Description is not null) { stmt = stmt.Decorate("description", BicepSyntax.Value(Description)); } - yield return stmt; + ParameterStatement statement = + BicepSyntax.Declare.Param( + BicepIdentifier, + BicepType, + Value.Kind == BicepValueKind.Unset ? null : Value.Compile()); + if (IsSecure) { statement = statement.Decorate("secure"); } + if (Description is not null) { statement = statement.Decorate("description", BicepSyntax.Value(Description)); } + yield return statement; } } diff --git a/sdk/provisioning/Azure.Provisioning/src/ProvisioningPlan.cs b/sdk/provisioning/Azure.Provisioning/src/ProvisioningPlan.cs index 2c000958314f..3ae514b131da 100644 --- a/sdk/provisioning/Azure.Provisioning/src/ProvisioningPlan.cs +++ b/sdk/provisioning/Azure.Provisioning/src/ProvisioningPlan.cs @@ -20,26 +20,26 @@ namespace Azure.Provisioning; public partial class ProvisioningPlan { /// - /// Gets the provisioning context used to compose these resources. + /// Gets the build options used to compose these resources. /// - public ProvisioningContext ProvisioningContext { get; } + public ProvisioningBuildOptions BuildOptions { get; } /// /// Gets the resources to be composed. /// public Infrastructure Infrastructure { get; } - internal ProvisioningPlan(Infrastructure infrastructure, ProvisioningContext context) + internal ProvisioningPlan(Infrastructure infrastructure, ProvisioningBuildOptions options) { Infrastructure = infrastructure; - ProvisioningContext = context; + BuildOptions = options; } // This is a placeholder until we get proper module splitting in place public IDictionary Compile() { Dictionary source = []; - foreach (KeyValuePair> pair in Infrastructure.CompileModules(ProvisioningContext)) + foreach (KeyValuePair> pair in Infrastructure.CompileModules(BuildOptions)) { source[$"{pair.Key}.bicep"] = string.Join(Environment.NewLine, pair.Value).Trim(); } diff --git a/sdk/provisioning/Azure.Provisioning/src/ProvisioningVariable.cs b/sdk/provisioning/Azure.Provisioning/src/ProvisioningVariable.cs index 46767436a34d..41bc6d4fdd3d 100644 --- a/sdk/provisioning/Azure.Provisioning/src/ProvisioningVariable.cs +++ b/sdk/provisioning/Azure.Provisioning/src/ProvisioningVariable.cs @@ -12,7 +12,7 @@ namespace Azure.Provisioning; /// /// Represents a variable in a Bicep template. /// -public class ProvisioningVariable : NamedProvisioningConstruct +public class ProvisioningVariable : NamedProvisionableConstruct { /// /// Gets or sets the value of the variable. @@ -29,19 +29,19 @@ public class ProvisioningVariable : NamedProvisioningConstruct /// Gets the Bicep type of the value. /// [EditorBrowsable(EditorBrowsableState.Never)] - public Expression BicepType { get; } + public BicepExpression BicepType { get; } /// /// Creates a new ProvisioningVariable. /// - /// - /// Name of the variable. This value can contain letters, numbers, and - /// underscores. + /// + /// Bicep identifier of the variable. This value can contain letters, + /// numbers, and underscores. /// /// Type of the variable. /// Default value of the variable. - protected ProvisioningVariable(string name, Expression type, BicepValue? value) - : base(name) + protected ProvisioningVariable(string bicepIdentifier, BicepExpression type, BicepValue? value) + : base(bicepIdentifier) { BicepType = type; _value = BicepValue.DefineProperty(this, nameof(Value), bicepPath: null, defaultValue: value); @@ -50,20 +50,20 @@ protected ProvisioningVariable(string name, Expression type, BicepValue? /// /// Creates a new ProvisioningVariable. /// - /// - /// Name of the variable. This value can contain letters, numbers, and - /// underscores. + /// + /// Bicep identifier of the variable. This value can contain letters, + /// numbers, and underscores. /// /// Type of the variable. - public ProvisioningVariable(string name, Type type) - : this(name, new TypeExpression(type), value: null) { } + public ProvisioningVariable(string bicepIdentifier, Type type) + : this(bicepIdentifier, new TypeExpression(type), value: null) { } /// - protected internal override IEnumerable Compile() + protected internal override IEnumerable Compile() { // TODO: add the rest of https://learn.microsoft.com/en-us/azure/azure-resource-manager/bicep/parameters#use-decorators? - VariableStatement stmt = BicepSyntax.Declare.Var(IdentifierName, Value.Compile()); - if (Description is not null) { stmt = stmt.Decorate("description", BicepSyntax.Value(Description)); } - yield return stmt; + VariableStatement statement = BicepSyntax.Declare.Var(BicepIdentifier, Value.Compile()); + if (Description is not null) { statement = statement.Decorate("description", BicepSyntax.Value(Description)); } + yield return statement; } } diff --git a/sdk/provisioning/Azure.Provisioning/tests/ProvisioningTestBase.cs b/sdk/provisioning/Azure.Provisioning/tests/ProvisioningTestBase.cs index 74b467d5a375..75a8d7f5adf2 100644 --- a/sdk/provisioning/Azure.Provisioning/tests/ProvisioningTestBase.cs +++ b/sdk/provisioning/Azure.Provisioning/tests/ProvisioningTestBase.cs @@ -52,7 +52,7 @@ public class Trycep(ProvisioningTestBase test) : IAsyncDisposable { public AzureLocation ResourceLocation { get; set; } = AzureLocation.WestUS2; public ProvisioningTestBase Test { get; set; } = test; - public ProvisioningContext Context { get; set; } = + public ProvisioningBuildOptions BuildOptions { get; set; } = new() { // TODO: Add back when we reenable test recording @@ -81,7 +81,7 @@ public class Trycep(ProvisioningTestBase test) : IAsyncDisposable public ProvisioningDeployment? Deployment { get; set; } public CancellationToken Cancellation { get; set; } - public Trycep Define(ProvisioningConstruct resource) + public Trycep Define(ProvisionableConstruct resource) { Infra = resource.ParentInfrastructure; if (Infra is null) @@ -89,21 +89,21 @@ public Trycep Define(ProvisioningConstruct resource) Infra = new Infrastructure(); Infra.Add(resource); } - Plan = Infra.Build(Context); + Plan = Infra.Build(BuildOptions); return this; } public Trycep Define(Func action) { Infra = action(this); - Plan = Infra.Build(Context); + Plan = Infra.Build(BuildOptions); return this; } - public Trycep Define(Func action) + public Trycep Define(Func action) { - Infra = action(this, Context); - Plan = Infra.Build(Context); + Infra = action(this, BuildOptions); + Plan = Infra.Build(BuildOptions); return this; } @@ -230,7 +230,7 @@ await client.GetSubscriptions().GetAsync(subId, Cancellation).ConfigureAwait(fal await client.GetDefaultSubscriptionAsync(Cancellation).ConfigureAwait(false); // Generate a random name - name ??= "rg-test-can-delete-" + Context.Random.NewGuid().ToString("N"); + name ??= "rg-test-can-delete-" + BuildOptions.Random.NewGuid().ToString("N"); // Create a resource group to deploy into ResourceGroupCollection rgs = ArmSubscription.GetResourceGroups(); diff --git a/sdk/provisioning/Azure.Provisioning/tests/SampleTests.cs b/sdk/provisioning/Azure.Provisioning/tests/SampleTests.cs index 20df89215bdd..dc09a3322f3c 100644 --- a/sdk/provisioning/Azure.Provisioning/tests/SampleTests.cs +++ b/sdk/provisioning/Azure.Provisioning/tests/SampleTests.cs @@ -31,13 +31,21 @@ public async Task SimpleDeploy() ProvisioningOutput? endpoint = null; await using Trycep test = CreateBicepTest(); +#pragma warning disable SA1112 // Closing parenthesis should be on line of opening parenthesis await test.Define( ctx => { Infrastructure infra = new(); // Create a storage account and blob resources - StorageAccount storage = StorageResources.CreateAccount(nameof(storage)); + StorageAccount storage = + new(nameof(storage), StorageAccount.ResourceVersions.V2023_01_01) + { + Kind = StorageKind.StorageV2, + Sku = new StorageSku { Name = StorageSkuName.StandardLrs }, + IsHnsEnabled = true, + AllowBlobPublicAccess = false + }; infra.Add(storage); blobs = new(nameof(blobs)) { Parent = storage }; infra.Add(blobs); @@ -75,6 +83,7 @@ await test.Define( """) .Lint() .ValidateAndDeployAsync( +#if EXPERIMENTAL_PROVISIONING async deployment => { // Create a client @@ -90,7 +99,10 @@ await test.Define( // Make a service call and verify it doesn't throw Response result = await storage.GetPropertiesAsync(); Assert.AreEqual(200, result.GetRawResponse().Status); - }); + } +#endif + ); +#pragma warning restore SA1112 // Closing parenthesis should be on line of opening parenthesis } [Test] @@ -175,16 +187,16 @@ await test.Define( // Hack in the Aspire Dashboard as a literal since there's no // management plane library support for dotNetComponents yet BicepLiteral aspireDashboard = - new("aspireDashboard", + new( new ResourceStatement( "aspireDashboard", - new StringLiteral("Microsoft.App/managedEnvironments/dotNetComponents@2024-02-02-preview"), + new StringLiteralExpression("Microsoft.App/managedEnvironments/dotNetComponents@2024-02-02-preview"), new ObjectExpression( new PropertyExpression("name", "aspire-dashboard"), - new PropertyExpression("parent", new IdentifierExpression(cae.IdentifierName)), + new PropertyExpression("parent", new IdentifierExpression(cae.BicepIdentifier)), new PropertyExpression("properties", new ObjectExpression( - new PropertyExpression("componentType", new StringLiteral("AspireDashboard"))))))); + new PropertyExpression("componentType", new StringLiteralExpression("AspireDashboard"))))))); infra.Add(aspireDashboard); infra.Add(new ProvisioningOutput("MANAGED_IDENTITY_CLIENT_ID", typeof(string)) { Value = mi.ClientId }); @@ -323,7 +335,7 @@ await test.Define( { // Create a new infra group scoped to our subscription and add // the resource group - Infrastructure infra = new() { TargetScope = "subscription" }; + Infrastructure infra = new() { TargetScope = DeploymentScope.Subscription }; ResourceGroup rg = new("rg_test", "2024-03-01"); infra.Add(rg); @@ -350,19 +362,19 @@ await test.Define( public void ValidNames() { // Check null is invalid - Assert.IsFalse(Infrastructure.IsValidIdentifierName(null)); - Assert.Throws(() => Infrastructure.ValidateIdentifierName(null)); + Assert.IsFalse(Infrastructure.IsValidBicepIdentifier(null)); + Assert.Throws(() => Infrastructure.ValidateBicepIdentifier(null)); Assert.Throws(() => new StorageAccount(null!)); // Check invalid names List invalid = ["", "my-storage", "my storage", "my:storage", "storage$", "1storage", "KforKelvin"]; foreach (string name in invalid) { - Assert.IsFalse(Infrastructure.IsValidIdentifierName(name)); - Assert.Throws(() => Infrastructure.ValidateIdentifierName(name)); + Assert.IsFalse(Infrastructure.IsValidBicepIdentifier(name)); + Assert.Throws(() => Infrastructure.ValidateBicepIdentifier(name)); if (!string.IsNullOrEmpty(name)) { - Assert.AreNotEqual(name, Infrastructure.NormalizeIdentifierName(name)); + Assert.AreNotEqual(name, Infrastructure.NormalizeBicepIdentifier(name)); } Assert.Throws(() => new StorageAccount(name)); } @@ -371,9 +383,9 @@ public void ValidNames() List valid = ["foo", "FOO", "Foo", "f", "_foo", "_", "foo123", "ABCdef123_"]; foreach (string name in valid) { - Assert.IsTrue(Infrastructure.IsValidIdentifierName(name)); - Assert.DoesNotThrow(() => Infrastructure.ValidateIdentifierName(name)); - Assert.AreEqual(name, Infrastructure.NormalizeIdentifierName(name)); + Assert.IsTrue(Infrastructure.IsValidBicepIdentifier(name)); + Assert.DoesNotThrow(() => Infrastructure.ValidateBicepIdentifier(name)); + Assert.AreEqual(name, Infrastructure.NormalizeBicepIdentifier(name)); Assert.DoesNotThrow(() => new StorageAccount(name)); } } diff --git a/sdk/provisioning/Directory.Build.props b/sdk/provisioning/Directory.Build.props index 0c4886646533..00ec05a3a6a1 100644 --- a/sdk/provisioning/Directory.Build.props +++ b/sdk/provisioning/Directory.Build.props @@ -1,6 +1,12 @@  + + + false + EXPERIMENTAL_PROVISIONING;$(DefineConstants) + + $(RequiredTargetFrameworks) true diff --git a/sdk/provisioning/Generator/src/Model/Property.cs b/sdk/provisioning/Generator/src/Model/Property.cs index 7659fc6fd961..85c737a1ac24 100644 --- a/sdk/provisioning/Generator/src/Model/Property.cs +++ b/sdk/provisioning/Generator/src/Model/Property.cs @@ -29,6 +29,7 @@ armParameter is not null ? public bool IsReadOnly { get; set; } = false; public bool IsRequired { get; set; } = false; public bool IsSecure { get; set; } = false; + public string? Format { get; set; } = null; public bool GenerateDefaultValue { get; set; } = false; public bool HideAccessors { get; set; } = false; diff --git a/sdk/provisioning/Generator/src/Model/Resource.cs b/sdk/provisioning/Generator/src/Model/Resource.cs index c4021a1c7f9c..a5801f3ef2e0 100644 --- a/sdk/provisioning/Generator/src/Model/Resource.cs +++ b/sdk/provisioning/Generator/src/Model/Resource.cs @@ -67,7 +67,7 @@ public override void Generate() writer.WriteLine($"/// "); writer.WriteWrapped(Description ?? (Name + ".")); writer.WriteLine($"/// "); - writer.WriteLine($"public partial class {Name} : Resource"); + writer.WriteLine($"public partial class {Name} : ProvisionableResource"); using (writer.Scope("{", "}")) { // Write the properties @@ -116,12 +116,12 @@ public override void Generate() writer.WriteLine($"/// "); writer.WriteWrapped($"Creates a new {Name}."); writer.WriteLine($"/// "); - writer.WriteLine($"/// "); + writer.WriteLine($"/// "); writer.WriteWrapped($"The the Bicep identifier name of the {Name} resource. This can be used to refer to the resource in expressions, but is not the Azure name of the resource. This value can contain letters, numbers, and underscores."); writer.WriteLine($"/// "); writer.WriteLine($"/// Version of the {Name}."); - writer.WriteLine($"public {Name}(string identifierName, string? resourceVersion = default)"); - writer.Write($" : base(identifierName, \"{ResourceType}\", resourceVersion"); + writer.WriteLine($"public {Name}(string bicepIdentifier, string? resourceVersion = default)"); + writer.Write($" : base(bicepIdentifier, \"{ResourceType}\", resourceVersion"); if (DefaultResourceVersion is not null) { writer.Write($" ?? \"{DefaultResourceVersion}\""); @@ -138,6 +138,7 @@ public override void Generate() if (property.IsReadOnly) { writer.Write($", isOutput: true"); } if (property.IsSecure) { writer.Write($", isSecure: true"); } if (property.GenerateDefaultValue) { writer.Write($", defaultValue: Get{property.Name}DefaultValue()"); } + if (property.Format is not null) { writer.Write($", format: \"{property.Format}\""); } writer.WriteLine($");"); } if (ParentResource is not null) @@ -178,15 +179,15 @@ public override void Generate() writer.WriteLine($"/// "); writer.WriteWrapped($"Creates a reference to an existing {Name}."); writer.WriteLine($"/// "); - writer.WriteLine($"/// "); + writer.WriteLine($"/// "); writer.WriteWrapped($"The the Bicep identifier name of the {Name} resource. This can be used to refer to the resource in expressions, but is not the Azure name of the resource. This value can contain letters, numbers, and underscores."); writer.WriteLine($"/// "); writer.WriteLine($"/// Version of the {Name}."); writer.WriteLine($"/// The existing {Name} resource."); - writer.WriteLine($"public static {Name} FromExisting(string identifierName, string? resourceVersion = default) =>"); + writer.WriteLine($"public static {Name} FromExisting(string bicepIdentifier, string? resourceVersion = default) =>"); using (writer.Scope()) { - writer.WriteLine($"new(identifierName, resourceVersion) {{ IsExistingResource = true }};"); + writer.WriteLine($"new(bicepIdentifier, resourceVersion) {{ IsExistingResource = true }};"); } } @@ -203,7 +204,7 @@ public override void Generate() writer.WriteLine($"/// "); writer.WriteLine($"/// A {Name} resource."); writer.WriteLine($"[EditorBrowsable(EditorBrowsableState.Never)]"); - writer.WriteLine($"public static {Name} FromExpression(Expression expression)"); + writer.WriteLine($"public static {Name} FromExpression(BicepExpression expression)"); using (writer.Scope("{", "}")) { writer.WriteLine($"{Name} resource = new(nameof({Name}));"); @@ -258,7 +259,7 @@ public override void Generate() { writer.WriteLine($"{GetKeysType.Name}.FromExpression,"); } - string expr = $"new FunctionCallExpression(new MemberExpression(new IdentifierExpression(IdentifierName), \"listKeys\"))"; + string expr = $"new FunctionCallExpression(new MemberExpression(new IdentifierExpression(BicepIdentifier), \"listKeys\"))"; if (GetKeysIsList) { expr = $"new MemberExpression({expr}, \"keys\")"; @@ -281,13 +282,13 @@ public override void Generate() writer.WriteLine($"public RoleAssignment CreateRoleAssignment({Spec!.Name}BuiltInRole role, UserAssignedIdentity identity) =>"); using (writer.Scope()) { - writer.WriteLine($"new($\"{{IdentifierName}}_{{identity.IdentifierName}}_{{{Spec!.Name}BuiltInRole.GetBuiltInRoleName(role)}}\")"); + writer.WriteLine($"new($\"{{BicepIdentifier}}_{{identity.BicepIdentifier}}_{{{Spec!.Name}BuiltInRole.GetBuiltInRoleName(role)}}\")"); using (writer.Scope("{", "};")) { writer.Write($"Name = BicepFunction.CreateGuid("); if (Properties.Any(p => p.Name == "Id")) { writer.Write("Id, "); } writer.WriteLine($"identity.PrincipalId, BicepFunction.GetSubscriptionResourceId(\"Microsoft.Authorization/roleDefinitions\", role.ToString())),"); - writer.WriteLine($"Scope = new IdentifierExpression(IdentifierName),"); + writer.WriteLine($"Scope = new IdentifierExpression(BicepIdentifier),"); writer.WriteLine($"PrincipalType = RoleManagementPrincipalType.ServicePrincipal,"); writer.WriteLine($"RoleDefinitionId = BicepFunction.GetSubscriptionResourceId(\"Microsoft.Authorization/roleDefinitions\", role.ToString()),"); writer.WriteLine($"PrincipalId = identity.PrincipalId"); @@ -301,18 +302,18 @@ public override void Generate() writer.WriteLine($"/// The role to grant."); writer.WriteLine($"/// The type of the principal to assign to."); writer.WriteLine($"/// The principal to assign to."); - writer.WriteLine($"/// Optional role assignment identifier name suffix."); + writer.WriteLine($"/// Optional role assignment identifier name suffix."); writer.WriteLine($"/// The ."); - writer.WriteLine($"public RoleAssignment CreateRoleAssignment({Spec!.Name}BuiltInRole role, BicepValue principalType, BicepValue principalId, string? identifierNameSuffix = default) =>"); + writer.WriteLine($"public RoleAssignment CreateRoleAssignment({Spec!.Name}BuiltInRole role, BicepValue principalType, BicepValue principalId, string? bicepIdentifierSuffix = default) =>"); using (writer.Scope()) { - writer.WriteLine($"new($\"{{IdentifierName}}_{{{Spec!.Name}BuiltInRole.GetBuiltInRoleName(role)}}{{(identifierNameSuffix is null ? \"\" : \"_\")}}{{identifierNameSuffix}}\")"); + writer.WriteLine($"new($\"{{BicepIdentifier}}_{{{Spec!.Name}BuiltInRole.GetBuiltInRoleName(role)}}{{(bicepIdentifierSuffix is null ? \"\" : \"_\")}}{{bicepIdentifierSuffix}}\")"); using (writer.Scope("{", "};")) { writer.Write($"Name = BicepFunction.CreateGuid("); if (Properties.Any(p => p.Name == "Id")) { writer.Write("Id, "); } writer.WriteLine($"principalId, BicepFunction.GetSubscriptionResourceId(\"Microsoft.Authorization/roleDefinitions\", role.ToString())),"); - writer.WriteLine($"Scope = new IdentifierExpression(IdentifierName),"); + writer.WriteLine($"Scope = new IdentifierExpression(BicepIdentifier),"); writer.WriteLine($"PrincipalType = principalType,"); writer.WriteLine($"RoleDefinitionId = BicepFunction.GetSubscriptionResourceId(\"Microsoft.Authorization/roleDefinitions\", role.ToString()),"); writer.WriteLine($"PrincipalId = principalId"); diff --git a/sdk/provisioning/Generator/src/Model/SimpleModel.cs b/sdk/provisioning/Generator/src/Model/SimpleModel.cs index f58a052fc5ea..3a8b3b23be65 100644 --- a/sdk/provisioning/Generator/src/Model/SimpleModel.cs +++ b/sdk/provisioning/Generator/src/Model/SimpleModel.cs @@ -42,7 +42,7 @@ public override void Generate() writer.WriteLine($"/// "); writer.WriteWrapped(Description ?? (Name + ".")); writer.WriteLine($"/// "); - writer.WriteLine($"public partial class {Name} : {(BaseType is not null ? BaseType.Name : "ProvisioningConstruct")}"); + writer.WriteLine($"public partial class {Name} : {(BaseType is not null ? BaseType.Name : "ProvisionableConstruct")}"); using (writer.Scope("{", "}")) { fence = new IndentWriter.Fenceposter(); @@ -103,6 +103,7 @@ public override void Generate() if (property.IsReadOnly) { writer.Write($", isOutput: true"); } if (property.IsSecure) { writer.Write($", isSecure: true"); } if (property.GenerateDefaultValue) { writer.Write($", defaultValue: Get{property.Name}DefaultValue()"); } + if (property.Format is not null) { writer.Write($", format: \"{property.Format}\""); } writer.WriteLine($");"); } } @@ -120,7 +121,7 @@ public override void Generate() writer.WriteLine($"/// "); writer.WriteLine($"/// A {Name} resource."); writer.WriteLine($"[EditorBrowsable(EditorBrowsableState.Never)]"); - writer.WriteLine($"public static {Name} FromExpression(Expression expression)"); + writer.WriteLine($"public static {Name} FromExpression(BicepExpression expression)"); using (writer.Scope("{", "}")) { writer.WriteLine($"{Name} resource = new();"); diff --git a/sdk/provisioning/Generator/src/Model/Specification.Analyze.cs b/sdk/provisioning/Generator/src/Model/Specification.Analyze.cs index 225a384ef7ba..080553ba97ca 100644 --- a/sdk/provisioning/Generator/src/Model/Specification.Analyze.cs +++ b/sdk/provisioning/Generator/src/Model/Specification.Analyze.cs @@ -104,11 +104,16 @@ private void Analyze() Resource? resource = Resources.FirstOrDefault(r => string.Compare(r.ResourceType?.ToString(), type.ToString(), StringComparison.OrdinalIgnoreCase) == 0); if (resource is null) { continue; } - // Only keep the very latest preview if it's the most - // recent release - otherwise people should use a GAed version + // Filter out preview releases resource.ResourceVersions = [.. data.ApiVersions.OrderDescending().Where((v, i) => - !v.EndsWith("preview") || i == 0)]; + !v.EndsWith("preview") +#if EXPERIMENTAL_PROVISIONING + // Only keep the very latest preview if it's the most + // recent release - otherwise people should use a GAed version + || i == 0 +#endif + )]; resource.DefaultResourceVersion = // The latest versions are first - so let's take the first non-preview as the default diff --git a/sdk/provisioning/Generator/src/Model/Specification.Customize.cs b/sdk/provisioning/Generator/src/Model/Specification.Customize.cs index 535f07a932a9..37be5efd1b86 100644 --- a/sdk/provisioning/Generator/src/Model/Specification.Customize.cs +++ b/sdk/provisioning/Generator/src/Model/Specification.Customize.cs @@ -57,7 +57,10 @@ protected void CustomizeModel(string modelName, Action action) => protected void CustomizeProperty(string propertyName, Action action) => CustomizeProperty(GetModel(), propertyName, action); - + + protected void CustomizePropertyIsoDuration(string propertyName) => + CustomizeProperty(GetModel(), propertyName, p => p.Format = "P"); + protected void CustomizeProperty(string modelName, string propertyName, Action action) => CustomizeProperty(ModelNameMapping.GetValueOrDefault(modelName) ?? throw new InvalidOperationException($"Failed to find {modelName} to customize!"), propertyName, action); diff --git a/sdk/provisioning/Generator/src/Specifications/AppServiceSpecification.cs b/sdk/provisioning/Generator/src/Specifications/AppServiceSpecification.cs index c39b565ad659..22d57c9ae4b1 100644 --- a/sdk/provisioning/Generator/src/Specifications/AppServiceSpecification.cs +++ b/sdk/provisioning/Generator/src/Specifications/AppServiceSpecification.cs @@ -4,6 +4,7 @@ using Azure.Provisioning.Generator.Model; using Azure.ResourceManager.AppService; using Azure.ResourceManager.AppService.Models; +using Azure.ResourceManager.Sql.Models; namespace Azure.Provisioning.Generator.Specifications; @@ -42,6 +43,12 @@ protected override void Customize() RemoveProperty("ResourceType"); RemoveProperty("Thumbprint"); + // Patch models + + // Not generated today: + // CustomizePropertyIsoDuration("BlobDuration"); + // CustomizePropertyIsoDuration("BlobDuration"); + // Naming requirements AddNameRequirements(min: 1, max: 260, lower: true, upper: true, digits: true, hyphen: true, underscore: true, period: true, parens: false); AddNameRequirements(min: 1, max: 60, lower: true, upper: true, digits: true, hyphen: true); diff --git a/sdk/provisioning/Generator/src/Specifications/AuthorizationSpecification.cs b/sdk/provisioning/Generator/src/Specifications/AuthorizationSpecification.cs index 884b7b766a27..2923d8b305b8 100644 --- a/sdk/provisioning/Generator/src/Specifications/AuthorizationSpecification.cs +++ b/sdk/provisioning/Generator/src/Specifications/AuthorizationSpecification.cs @@ -2,6 +2,7 @@ // Licensed under the MIT License. using Azure.Provisioning.Generator.Model; +using Azure.ResourceManager.AppService.Models; using Azure.ResourceManager.Authorization; using Azure.ResourceManager.Authorization.Models; using Azure.ResourceManager.Resources; @@ -26,6 +27,9 @@ protected override void Customize() CustomizeProperty("Name", p => p.GenerateDefaultValue = true); CustomizeProperty("Name", p => p.GenerateDefaultValue = true); CustomizeProperty("Scope", p => { p.IsReadOnly = false; p.Path = ["scope"]; }); + CustomizePropertyIsoDuration("MaximumDuration"); + CustomizePropertyIsoDuration("Duration"); + CustomizePropertyIsoDuration("Duration"); // Naming requirements // RoleAssignmentResource and AuthorizationRoleDefinitionResource must be GUIDs - handled in code diff --git a/sdk/provisioning/Generator/src/Specifications/EventGridSpecification.cs b/sdk/provisioning/Generator/src/Specifications/EventGridSpecification.cs index 576544e82535..daa76345081a 100644 --- a/sdk/provisioning/Generator/src/Specifications/EventGridSpecification.cs +++ b/sdk/provisioning/Generator/src/Specifications/EventGridSpecification.cs @@ -2,7 +2,9 @@ // Licensed under the MIT License. using Azure.Provisioning.Generator.Model; +using Azure.ResourceManager.Authorization; using Azure.ResourceManager.EventGrid; +using Azure.ResourceManager.EventGrid.Models; namespace Azure.Provisioning.Generator.Specifications; @@ -16,6 +18,7 @@ protected override void Customize() // Patch models CustomizeModel(m => m.Name = "EventGridNamespaceClientResource"); + CustomizePropertyIsoDuration("EventTimeToLive"); // Naming requirements AddNameRequirements(min: 3, max: 50, lower: true, upper: true, digits: true, hyphen: true); diff --git a/sdk/provisioning/Generator/src/Specifications/RedisSpecification.cs b/sdk/provisioning/Generator/src/Specifications/RedisSpecification.cs index 4048feb2a8a0..c9539d036883 100644 --- a/sdk/provisioning/Generator/src/Specifications/RedisSpecification.cs +++ b/sdk/provisioning/Generator/src/Specifications/RedisSpecification.cs @@ -2,6 +2,7 @@ // Licensed under the MIT License. using Azure.Provisioning.Generator.Model; +using Azure.ResourceManager.EventGrid.Models; using Azure.ResourceManager.Redis; using Azure.ResourceManager.Redis.Models; @@ -20,6 +21,7 @@ protected override void Customize() CustomizeModel(m => m.Name = "RedisResource"); CustomizeProperty("PrimaryKey", p => p.IsSecure = true); CustomizeProperty("SecondaryKey", p => p.IsSecure = true); + CustomizePropertyIsoDuration("MaintenanceWindow"); // Naming requirements AddNameRequirements(min: 1, max: 63, lower: true, upper: true, digits: true, hyphen: true); diff --git a/sdk/provisioning/Generator/src/Specifications/ResourcesSpecification.cs b/sdk/provisioning/Generator/src/Specifications/ResourcesSpecification.cs index 929991909acb..cb284e3448aa 100644 --- a/sdk/provisioning/Generator/src/Specifications/ResourcesSpecification.cs +++ b/sdk/provisioning/Generator/src/Specifications/ResourcesSpecification.cs @@ -28,6 +28,15 @@ protected override void Customize() CustomizeResource(r => r.FromExpression = true); CustomizeEnum(e => { foreach (EnumValue member in e.Values) { member.Value = member.Name; } }); CustomizeEnum(e => { foreach (EnumValue member in e.Values) { member.Value = member.Name; } }); + CustomizePropertyIsoDuration("Duration"); + CustomizePropertyIsoDuration("MaximumJitAccessDuration"); + CustomizePropertyIsoDuration("Duration"); + // Not generated today: + // CustomizePropertyIsoDuration("RetentionInterval"); + // CustomizePropertyIsoDuration("Timeout"); + // CustomizePropertyIsoDuration("RetentionInterval"); + // CustomizePropertyIsoDuration("Timeout"); + // CustomizePropertyIsoDuration("Duration"); // Naming requirements AddNameRequirements(min: 1, max: 64, lower: true, upper: true, digits: true, hyphen: true, underscore: true, period: true, parens: true); diff --git a/sdk/provisioning/Generator/src/Specifications/ServiceBusSpecification.cs b/sdk/provisioning/Generator/src/Specifications/ServiceBusSpecification.cs index 2ce519eb2c3f..00fcd64eac5c 100644 --- a/sdk/provisioning/Generator/src/Specifications/ServiceBusSpecification.cs +++ b/sdk/provisioning/Generator/src/Specifications/ServiceBusSpecification.cs @@ -25,6 +25,19 @@ protected override void Customize() CustomizeProperty("PrimaryKey", p => p.IsSecure = true); CustomizeProperty("SecondaryKey", p => p.IsSecure = true); + // Set durations + CustomizePropertyIsoDuration("LockDuration"); + CustomizePropertyIsoDuration("DefaultMessageTimeToLive"); + CustomizePropertyIsoDuration("DuplicateDetectionHistoryTimeWindow"); + CustomizePropertyIsoDuration("AutoDeleteOnIdle"); + CustomizePropertyIsoDuration("LockDuration"); + CustomizePropertyIsoDuration("DefaultMessageTimeToLive"); + CustomizePropertyIsoDuration("DuplicateDetectionHistoryTimeWindow"); + CustomizePropertyIsoDuration("AutoDeleteOnIdle"); + CustomizePropertyIsoDuration("DefaultMessageTimeToLive"); + CustomizePropertyIsoDuration("DuplicateDetectionHistoryTimeWindow"); + CustomizePropertyIsoDuration("AutoDeleteOnIdle"); + // Naming requirements AddNameRequirements(min: 6, max: 50, lower: true, upper: true, digits: true, hyphen: true); AddNameRequirements(min: 1, max: 50, lower: true, upper: true, digits: true, hyphen: true, underscore: true, period: true); diff --git a/sdk/provisioning/Generator/src/Specifications/SqlSpecification.cs b/sdk/provisioning/Generator/src/Specifications/SqlSpecification.cs index 5812239dcd5e..95707d3678e5 100644 --- a/sdk/provisioning/Generator/src/Specifications/SqlSpecification.cs +++ b/sdk/provisioning/Generator/src/Specifications/SqlSpecification.cs @@ -3,6 +3,7 @@ using Azure.Provisioning.Generator.Model; using Azure.ResourceManager.AppService; +using Azure.ResourceManager.Resources.Models; using Azure.ResourceManager.Sql; using Azure.ResourceManager.Sql.Models; @@ -70,6 +71,9 @@ protected override void Customize() // Patch models RemoveModel(); // TODO: Maybe support extensible enums of other types? CustomizeProperty("DiffBackupIntervalInHours", p => p.PropertyType = TypeRegistry.Get()); + CustomizePropertyIsoDuration("Interval"); + // Not generated today: + // CustomizePropertyIsoDuration("Duration"); // Naming requirements AddNameRequirements(min: 1, max: 63, lower: true, digits: true, hyphen: true); diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Docs/Entity.xml b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Docs/Entity.xml index 217187c7c1ae..f1504b28a12e 100644 --- a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Docs/Entity.xml +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Docs/Entity.xml @@ -59,7 +59,7 @@ AtlasEntityWithExtInfo body = new AtlasEntityWithExtInfo CreatedBy = "ExampleCreator", Status = EntityStatus.Active, UpdatedBy = "ExampleUpdator", - Version = 0, + Version = 0L, Contacts = { ["Expert"] = {new ContactInfo @@ -107,7 +107,7 @@ AtlasEntityWithExtInfo body = new AtlasEntityWithExtInfo }, Status = EntityStatus.Active, UpdatedBy = "ExampleUpdator", - Version = 0, + Version = 0L, }, }; Response response = await client.CreateOrUpdateAsync(body); @@ -137,7 +137,7 @@ AtlasEntityWithExtInfo body = new AtlasEntityWithExtInfo CreatedBy = "ExampleCreator", Status = EntityStatus.Active, UpdatedBy = "ExampleUpdator", - Version = 0, + Version = 0L, Contacts = { ["Expert"] = {new ContactInfo @@ -214,7 +214,7 @@ AtlasEntityWithExtInfo body = new AtlasEntityWithExtInfo CreatedBy = "ExampleCreator", Status = EntityStatus.Active, UpdatedBy = "ExampleUpdator", - Version = 0, + Version = 0L, Contacts = { ["Expert"] = {new ContactInfo @@ -262,7 +262,7 @@ AtlasEntityWithExtInfo body = new AtlasEntityWithExtInfo }, Status = EntityStatus.Active, UpdatedBy = "ExampleUpdator", - Version = 0, + Version = 0L, }, }; Response response = client.CreateOrUpdate(body); @@ -292,7 +292,7 @@ AtlasEntityWithExtInfo body = new AtlasEntityWithExtInfo CreatedBy = "ExampleCreator", Status = EntityStatus.Active, UpdatedBy = "ExampleUpdator", - Version = 0, + Version = 0L, Contacts = { ["Expert"] = {new ContactInfo @@ -387,7 +387,7 @@ using RequestContent content = RequestContent.Create(new status = "ACTIVE", createdBy = "ExampleCreator", updatedBy = "ExampleUpdator", - version = 0, + version = 0L, }, }); Response response = await client.CreateOrUpdateAsync(content); @@ -423,7 +423,7 @@ using RequestContent content = RequestContent.Create(new status = "ACTIVE", createdBy = "ExampleCreator", updatedBy = "ExampleUpdator", - version = 0, + version = 0L, }, }); Response response = await client.CreateOrUpdateAsync(content); @@ -473,7 +473,7 @@ using RequestContent content = RequestContent.Create(new status = "ACTIVE", createdBy = "ExampleCreator", updatedBy = "ExampleUpdator", - version = 0, + version = 0L, }, }); Response response = await client.CreateOrUpdateAsync(content); @@ -558,7 +558,7 @@ using RequestContent content = RequestContent.Create(new status = "ACTIVE", createdBy = "ExampleCreator", updatedBy = "ExampleUpdator", - version = 0, + version = 0L, }, }); Response response = client.CreateOrUpdate(content); @@ -594,7 +594,7 @@ using RequestContent content = RequestContent.Create(new status = "ACTIVE", createdBy = "ExampleCreator", updatedBy = "ExampleUpdator", - version = 0, + version = 0L, }, }); Response response = client.CreateOrUpdate(content); @@ -644,7 +644,7 @@ using RequestContent content = RequestContent.Create(new status = "ACTIVE", createdBy = "ExampleCreator", updatedBy = "ExampleUpdator", - version = 0, + version = 0L, }, }); Response response = client.CreateOrUpdate(content); @@ -730,7 +730,7 @@ AtlasEntitiesWithExtInfo body = new AtlasEntitiesWithExtInfo CreatedBy = "ExampleCreator", Status = EntityStatus.Active, UpdatedBy = "ExampleUpdator", - Version = 0, + Version = 0L, Contacts = { ["Expert"] = {new ContactInfo @@ -760,7 +760,7 @@ AtlasEntitiesWithExtInfo body = new AtlasEntitiesWithExtInfo CreatedBy = "ExampleCreator", Status = EntityStatus.Active, UpdatedBy = "ExampleUpdator", - Version = 0, + Version = 0L, Contacts = { ["Expert"] = {new ContactInfo @@ -806,7 +806,7 @@ AtlasEntitiesWithExtInfo body = new AtlasEntitiesWithExtInfo CreatedBy = "ExampleCreator", Status = EntityStatus.Active, UpdatedBy = "ExampleUpdator", - Version = 0, + Version = 0L, Contacts = { ["Expert"] = {new ContactInfo @@ -836,7 +836,7 @@ AtlasEntitiesWithExtInfo body = new AtlasEntitiesWithExtInfo CreatedBy = "ExampleCreator", Status = EntityStatus.Active, UpdatedBy = "ExampleUpdator", - Version = 0, + Version = 0L, Contacts = { ["Expert"] = {new ContactInfo @@ -901,7 +901,7 @@ using RequestContent content = RequestContent.Create(new status = "ACTIVE", createdBy = "ExampleCreator", updatedBy = "ExampleUpdator", - version = 0, + version = 0L, }, new { @@ -937,7 +937,7 @@ using RequestContent content = RequestContent.Create(new status = "ACTIVE", createdBy = "ExampleCreator", updatedBy = "ExampleUpdator", - version = 0, + version = 0L, } }, }); @@ -993,7 +993,7 @@ using RequestContent content = RequestContent.Create(new status = "ACTIVE", createdBy = "ExampleCreator", updatedBy = "ExampleUpdator", - version = 0, + version = 0L, }, new { @@ -1029,7 +1029,7 @@ using RequestContent content = RequestContent.Create(new status = "ACTIVE", createdBy = "ExampleCreator", updatedBy = "ExampleUpdator", - version = 0, + version = 0L, } }, }); @@ -1731,7 +1731,7 @@ AtlasEntityWithExtInfo body = new AtlasEntityWithExtInfo }, TypeName = "azure_storage_account", LastModifiedTS = "1", - CreateTime = 1605766397985, + CreateTime = default, CreatedBy = "8c062c84-5d25-449f-a990-9d8ab70b8ec7", Guid = "dc507ccf-0c57-4165-9327-f37b0d13fda0", RelationshipAttributes = @@ -1740,9 +1740,9 @@ AtlasEntityWithExtInfo body = new AtlasEntityWithExtInfo ["meanings"] = BinaryData.FromObjectAsJson(Array.Empty()) }, Status = EntityStatus.Active, - UpdateTime = 1605766397985, + UpdateTime = default, UpdatedBy = "8c062c84-5d25-449f-a990-9d8ab70b8ec7", - Version = 0, + Version = 0L, }, }; Response response = await client.UpdateByUniqueAttributeAsync("azure_storage_account", body); @@ -1770,7 +1770,7 @@ AtlasEntityWithExtInfo body = new AtlasEntityWithExtInfo }, TypeName = "azure_storage_account", LastModifiedTS = "1", - CreateTime = 1605766397985, + CreateTime = default, CreatedBy = "8c062c84-5d25-449f-a990-9d8ab70b8ec7", Guid = "dc507ccf-0c57-4165-9327-f37b0d13fda0", RelationshipAttributes = @@ -1779,9 +1779,9 @@ AtlasEntityWithExtInfo body = new AtlasEntityWithExtInfo ["meanings"] = BinaryData.FromObjectAsJson(Array.Empty()) }, Status = EntityStatus.Active, - UpdateTime = 1605766397985, + UpdateTime = default, UpdatedBy = "8c062c84-5d25-449f-a990-9d8ab70b8ec7", - Version = 0, + Version = 0L, }, }; Response response = client.UpdateByUniqueAttribute("azure_storage_account", body); @@ -1799,7 +1799,6 @@ using RequestContent content = RequestContent.Create(new { entity = new { - createTime = 1605766397985, createdBy = "8c062c84-5d25-449f-a990-9d8ab70b8ec7", guid = "dc507ccf-0c57-4165-9327-f37b0d13fda0", relationshipAttributes = new @@ -1808,10 +1807,9 @@ using RequestContent content = RequestContent.Create(new meanings = Array.Empty(), }, status = "ACTIVE", - updateTime = 1605766397985, updatedBy = "8c062c84-5d25-449f-a990-9d8ab70b8ec7", lastModifiedTS = "1", - version = 0, + version = 0L, attributes = new { owner = "ExampleOwner", @@ -1841,7 +1839,6 @@ using RequestContent content = RequestContent.Create(new { entity = new { - createTime = 1605766397985, createdBy = "8c062c84-5d25-449f-a990-9d8ab70b8ec7", guid = "dc507ccf-0c57-4165-9327-f37b0d13fda0", relationshipAttributes = new @@ -1850,10 +1847,9 @@ using RequestContent content = RequestContent.Create(new meanings = Array.Empty(), }, status = "ACTIVE", - updateTime = 1605766397985, updatedBy = "8c062c84-5d25-449f-a990-9d8ab70b8ec7", lastModifiedTS = "1", - version = 0, + version = 0L, attributes = new { owner = "ExampleOwner", diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Docs/Relationship.xml b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Docs/Relationship.xml index 00e562cc62ee..9d8c6bd96915 100644 --- a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Docs/Relationship.xml +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Docs/Relationship.xml @@ -34,7 +34,7 @@ AtlasRelationship body = new AtlasRelationship Label = "r:AtlasGlossarySynonym", Status = StatusAtlasRelationship.Active, UpdatedBy = "ExampleUpdator", - Version = 0, + Version = 0L, }; Response response = await client.CreateAsync(body); ]]> @@ -72,7 +72,7 @@ AtlasRelationship body = new AtlasRelationship Label = "r:AtlasGlossarySynonym", Status = StatusAtlasRelationship.Active, UpdatedBy = "ExampleUpdator", - Version = 0, + Version = 0L, }; Response response = client.Create(body); ]]> @@ -108,7 +108,7 @@ using RequestContent content = RequestContent.Create(new status = "ACTIVE", createdBy = "ExampleCreator", updatedBy = "ExampleUpdator", - version = 0, + version = 0L, }); Response response = await client.CreateAsync(content); @@ -147,7 +147,7 @@ using RequestContent content = RequestContent.Create(new status = "ACTIVE", createdBy = "ExampleCreator", updatedBy = "ExampleUpdator", - version = 0, + version = 0L, }); Response response = client.Create(content); @@ -189,7 +189,7 @@ AtlasRelationship body = new AtlasRelationship Label = "r:AtlasGlossarySynonym", Status = StatusAtlasRelationship.Active, UpdatedBy = "ExampleUpdator", - Version = 0, + Version = 0L, }; Response response = await client.UpdateAsync(body); ]]> @@ -228,7 +228,7 @@ AtlasRelationship body = new AtlasRelationship Label = "r:AtlasGlossarySynonym", Status = StatusAtlasRelationship.Active, UpdatedBy = "ExampleUpdator", - Version = 0, + Version = 0L, }; Response response = client.Update(body); ]]> @@ -265,7 +265,7 @@ using RequestContent content = RequestContent.Create(new status = "ACTIVE", createdBy = "ExampleCreator", updatedBy = "ExampleUpdator", - version = 0, + version = 0L, }); Response response = await client.UpdateAsync(content); @@ -305,7 +305,7 @@ using RequestContent content = RequestContent.Create(new status = "ACTIVE", createdBy = "ExampleCreator", updatedBy = "ExampleUpdator", - version = 0, + version = 0L, }); Response response = client.Update(content); diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/tests/Generated/Samples/Samples_Entity.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/tests/Generated/Samples/Samples_Entity.cs index 77e1ee0c2cc3..7a3d4b9a330b 100644 --- a/sdk/purview/Azure.Analytics.Purview.DataMap/tests/Generated/Samples/Samples_Entity.cs +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/tests/Generated/Samples/Samples_Entity.cs @@ -199,7 +199,7 @@ public void Example_Entity_CreateOrUpdate_EntityCreate() status = "ACTIVE", createdBy = "ExampleCreator", updatedBy = "ExampleUpdator", - version = 0, + version = 0L, }, }); Response response = client.CreateOrUpdate(content); @@ -252,7 +252,7 @@ public async Task Example_Entity_CreateOrUpdate_EntityCreate_Async() status = "ACTIVE", createdBy = "ExampleCreator", updatedBy = "ExampleUpdator", - version = 0, + version = 0L, }, }); Response response = await client.CreateOrUpdateAsync(content); @@ -288,7 +288,7 @@ public void Example_Entity_CreateOrUpdate_EntityCreate_Convenience() CreatedBy = "ExampleCreator", Status = EntityStatus.Active, UpdatedBy = "ExampleUpdator", - Version = 0, + Version = 0L, Contacts = { ["Expert"] = {new ContactInfo @@ -334,7 +334,7 @@ public async Task Example_Entity_CreateOrUpdate_EntityCreate_Convenience_Async() CreatedBy = "ExampleCreator", Status = EntityStatus.Active, UpdatedBy = "ExampleUpdator", - Version = 0, + Version = 0L, Contacts = { ["Expert"] = {new ContactInfo @@ -383,7 +383,7 @@ public void Example_Entity_CreateOrUpdate_EntityCreateOrUpdateWithRichText() status = "ACTIVE", createdBy = "ExampleCreator", updatedBy = "ExampleUpdator", - version = 0, + version = 0L, }, }); Response response = client.CreateOrUpdate(content); @@ -422,7 +422,7 @@ public async Task Example_Entity_CreateOrUpdate_EntityCreateOrUpdateWithRichText status = "ACTIVE", createdBy = "ExampleCreator", updatedBy = "ExampleUpdator", - version = 0, + version = 0L, }, }); Response response = await client.CreateOrUpdateAsync(content); @@ -463,7 +463,7 @@ public void Example_Entity_CreateOrUpdate_EntityCreateOrUpdateWithRichText_Conve }, Status = EntityStatus.Active, UpdatedBy = "ExampleUpdator", - Version = 0, + Version = 0L, }, }; Response response = client.CreateOrUpdate(body); @@ -501,7 +501,7 @@ public async Task Example_Entity_CreateOrUpdate_EntityCreateOrUpdateWithRichText }, Status = EntityStatus.Active, UpdatedBy = "ExampleUpdator", - Version = 0, + Version = 0L, }, }; Response response = await client.CreateOrUpdateAsync(body); @@ -551,7 +551,7 @@ public void Example_Entity_CreateOrUpdate_EntityUpdate() status = "ACTIVE", createdBy = "ExampleCreator", updatedBy = "ExampleUpdator", - version = 0, + version = 0L, }, }); Response response = client.CreateOrUpdate(content); @@ -604,7 +604,7 @@ public async Task Example_Entity_CreateOrUpdate_EntityUpdate_Async() status = "ACTIVE", createdBy = "ExampleCreator", updatedBy = "ExampleUpdator", - version = 0, + version = 0L, }, }); Response response = await client.CreateOrUpdateAsync(content); @@ -640,7 +640,7 @@ public void Example_Entity_CreateOrUpdate_EntityUpdate_Convenience() CreatedBy = "ExampleCreator", Status = EntityStatus.Active, UpdatedBy = "ExampleUpdator", - Version = 0, + Version = 0L, Contacts = { ["Expert"] = {new ContactInfo @@ -686,7 +686,7 @@ public async Task Example_Entity_CreateOrUpdate_EntityUpdate_Convenience_Async() CreatedBy = "ExampleCreator", Status = EntityStatus.Active, UpdatedBy = "ExampleUpdator", - Version = 0, + Version = 0L, Contacts = { ["Expert"] = {new ContactInfo @@ -801,7 +801,7 @@ public void Example_Entity_BatchCreateOrUpdate_EntityBulkCreateOrUpdate() status = "ACTIVE", createdBy = "ExampleCreator", updatedBy = "ExampleUpdator", -version = 0, +version = 0L, }, new { @@ -837,7 +837,7 @@ public void Example_Entity_BatchCreateOrUpdate_EntityBulkCreateOrUpdate() status = "ACTIVE", createdBy = "ExampleCreator", updatedBy = "ExampleUpdator", -version = 0, +version = 0L, } }, }); @@ -893,7 +893,7 @@ public async Task Example_Entity_BatchCreateOrUpdate_EntityBulkCreateOrUpdate_As status = "ACTIVE", createdBy = "ExampleCreator", updatedBy = "ExampleUpdator", -version = 0, +version = 0L, }, new { @@ -929,7 +929,7 @@ public async Task Example_Entity_BatchCreateOrUpdate_EntityBulkCreateOrUpdate_As status = "ACTIVE", createdBy = "ExampleCreator", updatedBy = "ExampleUpdator", -version = 0, +version = 0L, } }, }); @@ -966,7 +966,7 @@ public void Example_Entity_BatchCreateOrUpdate_EntityBulkCreateOrUpdate_Convenie CreatedBy = "ExampleCreator", Status = EntityStatus.Active, UpdatedBy = "ExampleUpdator", -Version = 0, +Version = 0L, Contacts = { ["Expert"] = {new ContactInfo @@ -996,7 +996,7 @@ public void Example_Entity_BatchCreateOrUpdate_EntityBulkCreateOrUpdate_Convenie CreatedBy = "ExampleCreator", Status = EntityStatus.Active, UpdatedBy = "ExampleUpdator", -Version = 0, +Version = 0L, Contacts = { ["Expert"] = {new ContactInfo @@ -1042,7 +1042,7 @@ public async Task Example_Entity_BatchCreateOrUpdate_EntityBulkCreateOrUpdate_Co CreatedBy = "ExampleCreator", Status = EntityStatus.Active, UpdatedBy = "ExampleUpdator", -Version = 0, +Version = 0L, Contacts = { ["Expert"] = {new ContactInfo @@ -1072,7 +1072,7 @@ public async Task Example_Entity_BatchCreateOrUpdate_EntityBulkCreateOrUpdate_Co CreatedBy = "ExampleCreator", Status = EntityStatus.Active, UpdatedBy = "ExampleUpdator", -Version = 0, +Version = 0L, Contacts = { ["Expert"] = {new ContactInfo @@ -1773,7 +1773,6 @@ public void Example_Entity_UpdateByUniqueAttribute_EntityPartialUpdateByUniqueAt { entity = new { - createTime = 1605766397985, createdBy = "8c062c84-5d25-449f-a990-9d8ab70b8ec7", guid = "dc507ccf-0c57-4165-9327-f37b0d13fda0", relationshipAttributes = new @@ -1782,10 +1781,9 @@ public void Example_Entity_UpdateByUniqueAttribute_EntityPartialUpdateByUniqueAt meanings = Array.Empty(), }, status = "ACTIVE", - updateTime = 1605766397985, updatedBy = "8c062c84-5d25-449f-a990-9d8ab70b8ec7", lastModifiedTS = "1", - version = 0, + version = 0L, attributes = new { owner = "ExampleOwner", @@ -1815,7 +1813,6 @@ public async Task Example_Entity_UpdateByUniqueAttribute_EntityPartialUpdateByUn { entity = new { - createTime = 1605766397985, createdBy = "8c062c84-5d25-449f-a990-9d8ab70b8ec7", guid = "dc507ccf-0c57-4165-9327-f37b0d13fda0", relationshipAttributes = new @@ -1824,10 +1821,9 @@ public async Task Example_Entity_UpdateByUniqueAttribute_EntityPartialUpdateByUn meanings = Array.Empty(), }, status = "ACTIVE", - updateTime = 1605766397985, updatedBy = "8c062c84-5d25-449f-a990-9d8ab70b8ec7", lastModifiedTS = "1", - version = 0, + version = 0L, attributes = new { owner = "ExampleOwner", @@ -1867,7 +1863,7 @@ public void Example_Entity_UpdateByUniqueAttribute_EntityPartialUpdateByUniqueAt }, TypeName = "azure_storage_account", LastModifiedTS = "1", - CreateTime = 1605766397985, + CreateTime = default, CreatedBy = "8c062c84-5d25-449f-a990-9d8ab70b8ec7", Guid = "dc507ccf-0c57-4165-9327-f37b0d13fda0", RelationshipAttributes = @@ -1876,9 +1872,9 @@ public void Example_Entity_UpdateByUniqueAttribute_EntityPartialUpdateByUniqueAt ["meanings"] = BinaryData.FromObjectAsJson(Array.Empty()) }, Status = EntityStatus.Active, - UpdateTime = 1605766397985, + UpdateTime = default, UpdatedBy = "8c062c84-5d25-449f-a990-9d8ab70b8ec7", - Version = 0, + Version = 0L, }, }; Response response = client.UpdateByUniqueAttribute("azure_storage_account", body); @@ -1906,7 +1902,7 @@ public async Task Example_Entity_UpdateByUniqueAttribute_EntityPartialUpdateByUn }, TypeName = "azure_storage_account", LastModifiedTS = "1", - CreateTime = 1605766397985, + CreateTime = default, CreatedBy = "8c062c84-5d25-449f-a990-9d8ab70b8ec7", Guid = "dc507ccf-0c57-4165-9327-f37b0d13fda0", RelationshipAttributes = @@ -1915,9 +1911,9 @@ public async Task Example_Entity_UpdateByUniqueAttribute_EntityPartialUpdateByUn ["meanings"] = BinaryData.FromObjectAsJson(Array.Empty()) }, Status = EntityStatus.Active, - UpdateTime = 1605766397985, + UpdateTime = default, UpdatedBy = "8c062c84-5d25-449f-a990-9d8ab70b8ec7", - Version = 0, + Version = 0L, }, }; Response response = await client.UpdateByUniqueAttributeAsync("azure_storage_account", body); diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/tests/Generated/Samples/Samples_Relationship.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/tests/Generated/Samples/Samples_Relationship.cs index 367686d43ce3..d6689895797a 100644 --- a/sdk/purview/Azure.Analytics.Purview.DataMap/tests/Generated/Samples/Samples_Relationship.cs +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/tests/Generated/Samples/Samples_Relationship.cs @@ -47,7 +47,7 @@ public void Example_Relationship_Create_RelationshipCreate() status = "ACTIVE", createdBy = "ExampleCreator", updatedBy = "ExampleUpdator", - version = 0, + version = 0L, }); Response response = client.Create(content); @@ -86,7 +86,7 @@ public async Task Example_Relationship_Create_RelationshipCreate_Async() status = "ACTIVE", createdBy = "ExampleCreator", updatedBy = "ExampleUpdator", - version = 0, + version = 0L, }); Response response = await client.CreateAsync(content); @@ -127,7 +127,7 @@ public void Example_Relationship_Create_RelationshipCreate_Convenience() Label = "r:AtlasGlossarySynonym", Status = StatusAtlasRelationship.Active, UpdatedBy = "ExampleUpdator", - Version = 0, + Version = 0L, }; Response response = client.Create(body); } @@ -165,7 +165,7 @@ public async Task Example_Relationship_Create_RelationshipCreate_Convenience_Asy Label = "r:AtlasGlossarySynonym", Status = StatusAtlasRelationship.Active, UpdatedBy = "ExampleUpdator", - Version = 0, + Version = 0L, }; Response response = await client.CreateAsync(body); } @@ -202,7 +202,7 @@ public void Example_Relationship_Update_RelationshipUpdate() status = "ACTIVE", createdBy = "ExampleCreator", updatedBy = "ExampleUpdator", - version = 0, + version = 0L, }); Response response = client.Update(content); @@ -242,7 +242,7 @@ public async Task Example_Relationship_Update_RelationshipUpdate_Async() status = "ACTIVE", createdBy = "ExampleCreator", updatedBy = "ExampleUpdator", - version = 0, + version = 0L, }); Response response = await client.UpdateAsync(content); @@ -284,7 +284,7 @@ public void Example_Relationship_Update_RelationshipUpdate_Convenience() Label = "r:AtlasGlossarySynonym", Status = StatusAtlasRelationship.Active, UpdatedBy = "ExampleUpdator", - Version = 0, + Version = 0L, }; Response response = client.Update(body); } @@ -323,7 +323,7 @@ public async Task Example_Relationship_Update_RelationshipUpdate_Convenience_Asy Label = "r:AtlasGlossarySynonym", Status = StatusAtlasRelationship.Active, UpdatedBy = "ExampleUpdator", - Version = 0, + Version = 0L, }; Response response = await client.UpdateAsync(body); } diff --git a/sdk/purview/Azure.ResourceManager.Purview/CHANGELOG.md b/sdk/purview/Azure.ResourceManager.Purview/CHANGELOG.md index 59b79afa425e..b88990c00a3e 100644 --- a/sdk/purview/Azure.ResourceManager.Purview/CHANGELOG.md +++ b/sdk/purview/Azure.ResourceManager.Purview/CHANGELOG.md @@ -4,6 +4,8 @@ ### Features Added +- Exposed `JsonModelWriteCore` for model serialization procedure. + ### Breaking Changes ### Bugs Fixed diff --git a/sdk/purview/Azure.ResourceManager.Purview/api/Azure.ResourceManager.Purview.netstandard2.0.cs b/sdk/purview/Azure.ResourceManager.Purview/api/Azure.ResourceManager.Purview.netstandard2.0.cs index aaa8870bc1eb..c5197350169c 100644 --- a/sdk/purview/Azure.ResourceManager.Purview/api/Azure.ResourceManager.Purview.netstandard2.0.cs +++ b/sdk/purview/Azure.ResourceManager.Purview/api/Azure.ResourceManager.Purview.netstandard2.0.cs @@ -37,6 +37,7 @@ public PurviewAccountData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.Purview.Models.PurviewProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.Purview.Models.PurviewPublicNetworkAccess? PublicNetworkAccess { get { throw null; } set { } } public Azure.ResourceManager.Purview.Models.PurviewAccountSku Sku { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Purview.PurviewAccountData 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.Purview.PurviewAccountData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -138,6 +139,7 @@ public PurviewKafkaConfigurationData() { } public Azure.ResourceManager.Purview.Models.PurviewKafkaEventHubType? EventHubType { get { throw null; } set { } } public Azure.ResourceManager.Purview.Models.PurviewEventStreamingState? EventStreamingState { get { throw null; } set { } } public Azure.ResourceManager.Purview.Models.PurviewEventStreamingType? EventStreamingType { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Purview.PurviewKafkaConfigurationData 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.Purview.PurviewKafkaConfigurationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -186,6 +188,7 @@ public PurviewPrivateEndpointConnectionData() { } public Azure.ResourceManager.Purview.Models.PurviewPrivateLinkServiceConnectionState ConnectionState { get { throw null; } set { } } public Azure.Core.ResourceIdentifier PrivateEndpointId { get { throw null; } set { } } public string ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Purview.PurviewPrivateEndpointConnectionData 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.Purview.PurviewPrivateEndpointConnectionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -245,6 +248,7 @@ public partial class PurviewPrivateLinkResourceData : Azure.ResourceManager.Mode { internal PurviewPrivateLinkResourceData() { } public Azure.ResourceManager.Purview.Models.PurviewPrivateLinkResourceProperties Properties { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Purview.PurviewPrivateLinkResourceData 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.Purview.PurviewPrivateLinkResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -321,6 +325,7 @@ public partial class CollectionAdminUpdateContent : System.ClientModel.Primitive { public CollectionAdminUpdateContent() { } public string AdminObjectId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Purview.Models.CollectionAdminUpdateContent 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.Purview.Models.CollectionAdminUpdateContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -336,6 +341,7 @@ public DefaultPurviewAccountPayload() { } public System.Guid? ScopeTenantId { get { throw null; } set { } } public Azure.ResourceManager.Purview.Models.PurviewAccountScopeType? ScopeType { get { throw null; } set { } } public string SubscriptionId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Purview.Models.DefaultPurviewAccountPayload 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.Purview.Models.DefaultPurviewAccountPayload System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -366,6 +372,7 @@ public partial class PrivateEndpointConnectionStatusUpdateContent : System.Clien public PrivateEndpointConnectionStatusUpdateContent() { } public string PrivateEndpointId { get { throw null; } set { } } public string Status { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Purview.Models.PrivateEndpointConnectionStatusUpdateContent 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.Purview.Models.PrivateEndpointConnectionStatusUpdateContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -377,6 +384,7 @@ public partial class PrivateEndpointConnectionStatusUpdateResult : System.Client internal PrivateEndpointConnectionStatusUpdateResult() { } public string PrivateEndpointId { get { throw null; } } public string Status { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Purview.Models.PrivateEndpointConnectionStatusUpdateResult 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.Purview.Models.PrivateEndpointConnectionStatusUpdateResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -388,6 +396,7 @@ public partial class PurviewAccountAccessKey : System.ClientModel.Primitives.IJs internal PurviewAccountAccessKey() { } public string AtlasKafkaPrimaryEndpoint { get { throw null; } } public string AtlasKafkaSecondaryEndpoint { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Purview.Models.PurviewAccountAccessKey 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.Purview.Models.PurviewAccountAccessKey System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -401,6 +410,7 @@ internal PurviewAccountEndpoint() { } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public string Guardian { get { throw null; } } public string Scan { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Purview.Models.PurviewAccountEndpoint 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.Purview.Models.PurviewAccountEndpoint System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -412,6 +422,7 @@ public partial class PurviewAccountNameAvailabilityContent : System.ClientModel. public PurviewAccountNameAvailabilityContent() { } public string Name { get { throw null; } set { } } public string ResourceType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Purview.Models.PurviewAccountNameAvailabilityContent 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.Purview.Models.PurviewAccountNameAvailabilityContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -424,6 +435,7 @@ internal PurviewAccountNameAvailabilityResult() { } public bool? IsNameAvailable { get { throw null; } } public string Message { get { throw null; } } public Azure.ResourceManager.Purview.Models.PurviewAccountNameUnavailableReason? Reason { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Purview.Models.PurviewAccountNameAvailabilityResult 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.Purview.Models.PurviewAccountNameAvailabilityResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -454,6 +466,7 @@ public PurviewAccountPatch() { } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public Azure.ResourceManager.Purview.Models.PurviewAccountProperties Properties { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Purview.Models.PurviewAccountPatch 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.Purview.Models.PurviewAccountPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -478,6 +491,7 @@ public PurviewAccountProperties() { } public System.Collections.Generic.IReadOnlyList PrivateEndpointConnections { get { throw null; } } public Azure.ResourceManager.Purview.Models.PurviewProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.Purview.Models.PurviewPublicNetworkAccess? PublicNetworkAccess { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Purview.Models.PurviewAccountProperties 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.Purview.Models.PurviewAccountProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -533,6 +547,7 @@ public partial class PurviewAccountSku : System.ClientModel.Primitives.IJsonMode internal PurviewAccountSku() { } public int? Capacity { get { throw null; } } public Azure.ResourceManager.Purview.Models.PurviewAccountSkuName? Name { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Purview.Models.PurviewAccountSku 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.Purview.Models.PurviewAccountSku System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -562,6 +577,7 @@ public partial class PurviewAccountStatus : System.ClientModel.Primitives.IJsonM internal PurviewAccountStatus() { } public Azure.ResourceManager.Purview.Models.PurviewAccountProvisioningState? AccountProvisioningState { get { throw null; } } public Azure.ResponseError ErrorDetails { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Purview.Models.PurviewAccountStatus 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.Purview.Models.PurviewAccountStatus System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -572,6 +588,7 @@ public partial class PurviewBatchFeatureContent : System.ClientModel.Primitives. { public PurviewBatchFeatureContent() { } public System.Collections.Generic.IList Features { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Purview.Models.PurviewBatchFeatureContent 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.Purview.Models.PurviewBatchFeatureContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -582,6 +599,7 @@ public partial class PurviewBatchFeatureStatus : System.ClientModel.Primitives.I { internal PurviewBatchFeatureStatus() { } public System.Collections.Generic.IReadOnlyDictionary Features { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Purview.Models.PurviewBatchFeatureStatus 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.Purview.Models.PurviewBatchFeatureStatus System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -593,6 +611,7 @@ public partial class PurviewCredentials : System.ClientModel.Primitives.IJsonMod public PurviewCredentials() { } public Azure.ResourceManager.Purview.Models.PurviewCredentialsType? CredentialsType { get { throw null; } set { } } public string IdentityId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Purview.Models.PurviewCredentials 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.Purview.Models.PurviewCredentials System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -661,6 +680,7 @@ public PurviewIngestionStorage() { } public string Id { get { throw null; } } public string PrimaryEndpoint { get { throw null; } } public Azure.ResourceManager.Purview.Models.PurviewPublicNetworkAccess? PublicNetworkAccess { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Purview.Models.PurviewIngestionStorage 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.Purview.Models.PurviewIngestionStorage System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -710,6 +730,7 @@ internal PurviewManagedResource() { } public Azure.Core.ResourceIdentifier EventHubNamespace { get { throw null; } } public Azure.Core.ResourceIdentifier ResourceGroup { get { throw null; } } public Azure.Core.ResourceIdentifier StorageAccount { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Purview.Models.PurviewManagedResource 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.Purview.Models.PurviewManagedResource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -722,6 +743,7 @@ internal PurviewPrivateLinkResourceProperties() { } public string GroupId { get { throw null; } } public System.Collections.Generic.IReadOnlyList RequiredMembers { get { throw null; } } public System.Collections.Generic.IReadOnlyList RequiredZoneNames { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Purview.Models.PurviewPrivateLinkResourceProperties 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.Purview.Models.PurviewPrivateLinkResourceProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -734,6 +756,7 @@ public PurviewPrivateLinkServiceConnectionState() { } public string ActionsRequired { get { throw null; } set { } } public string Description { get { throw null; } set { } } public Azure.ResourceManager.Purview.Models.PurviewPrivateLinkServiceStatus? Status { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Purview.Models.PurviewPrivateLinkServiceConnectionState 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.Purview.Models.PurviewPrivateLinkServiceConnectionState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -810,6 +833,7 @@ public partial class PurviewQuotaName : System.ClientModel.Primitives.IJsonModel internal PurviewQuotaName() { } public string LocalizedValue { get { throw null; } } public string Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Purview.Models.PurviewQuotaName 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.Purview.Models.PurviewQuotaName System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -824,6 +848,7 @@ internal PurviewUsage() { } public int? Limit { get { throw null; } } public Azure.ResourceManager.Purview.Models.PurviewUsageName Name { get { throw null; } } public string Unit { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Purview.Models.PurviewUsage 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.Purview.Models.PurviewUsage System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -833,6 +858,7 @@ internal PurviewUsage() { } public partial class PurviewUsageName : Azure.ResourceManager.Purview.Models.PurviewQuotaName, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal PurviewUsageName() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Purview.Models.PurviewUsageName 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.Purview.Models.PurviewUsageName System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } diff --git a/sdk/purview/Azure.ResourceManager.Purview/assets.json b/sdk/purview/Azure.ResourceManager.Purview/assets.json index 7944974efb57..6017e50c7b38 100644 --- a/sdk/purview/Azure.ResourceManager.Purview/assets.json +++ b/sdk/purview/Azure.ResourceManager.Purview/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/purview/Azure.ResourceManager.Purview", - "Tag": "net/purview/Azure.ResourceManager.Purview_ddd249c414" + "Tag": "net/purview/Azure.ResourceManager.Purview_05bb7c44f8" } diff --git a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/AccountList.Serialization.cs b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/AccountList.Serialization.cs index 5d8aff6599d9..09e28f35d13e 100644 --- a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/AccountList.Serialization.cs +++ b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/AccountList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class AccountList : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio throw new FormatException($"The model {nameof(AccountList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio #endif } } - writer.WriteEndObject(); } AccountList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/CloudConnectors.Serialization.cs b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/CloudConnectors.Serialization.cs index 94e417ca4150..5f009334b323 100644 --- a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/CloudConnectors.Serialization.cs +++ b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/CloudConnectors.Serialization.cs @@ -18,6 +18,15 @@ internal partial class CloudConnectors : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(CloudConnectors)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(AwsExternalId)) { writer.WritePropertyName("awsExternalId"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO #endif } } - writer.WriteEndObject(); } CloudConnectors IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/CollectionAdminUpdateContent.Serialization.cs b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/CollectionAdminUpdateContent.Serialization.cs index a28b76775468..b93bb456ee3b 100644 --- a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/CollectionAdminUpdateContent.Serialization.cs +++ b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/CollectionAdminUpdateContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class CollectionAdminUpdateContent : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(CollectionAdminUpdateContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(AdminObjectId)) { writer.WritePropertyName("objectId"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } CollectionAdminUpdateContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/DefaultPurviewAccountPayload.Serialization.cs b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/DefaultPurviewAccountPayload.Serialization.cs index 4486fd1efd67..de1d791c227e 100644 --- a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/DefaultPurviewAccountPayload.Serialization.cs +++ b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/DefaultPurviewAccountPayload.Serialization.cs @@ -18,6 +18,15 @@ public partial class DefaultPurviewAccountPayload : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(DefaultPurviewAccountPayload)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(AccountName)) { writer.WritePropertyName("accountName"u8); @@ -71,7 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } DefaultPurviewAccountPayload IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/KafkaConfigurationList.Serialization.cs b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/KafkaConfigurationList.Serialization.cs index 3c7d9f93dc1e..a449a481567c 100644 --- a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/KafkaConfigurationList.Serialization.cs +++ b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/KafkaConfigurationList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class KafkaConfigurationList : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(KafkaConfigurationList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } KafkaConfigurationList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PrivateEndpointConnectionList.Serialization.cs b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PrivateEndpointConnectionList.Serialization.cs index 7ef2e46a95f0..efa5fe2473a8 100644 --- a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PrivateEndpointConnectionList.Serialization.cs +++ b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PrivateEndpointConnectionList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class PrivateEndpointConnectionList : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(PrivateEndpointConnectionList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } PrivateEndpointConnectionList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PrivateEndpointConnectionStatusUpdateContent.Serialization.cs b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PrivateEndpointConnectionStatusUpdateContent.Serialization.cs index 827054d89bbe..b7f83e90e163 100644 --- a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PrivateEndpointConnectionStatusUpdateContent.Serialization.cs +++ b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PrivateEndpointConnectionStatusUpdateContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class PrivateEndpointConnectionStatusUpdateContent : IUtf8JsonSer void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWrit throw new FormatException($"The model {nameof(PrivateEndpointConnectionStatusUpdateContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(PrivateEndpointId)) { writer.WritePropertyName("privateEndpointId"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWrit #endif } } - writer.WriteEndObject(); } PrivateEndpointConnectionStatusUpdateContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PrivateEndpointConnectionStatusUpdateResult.Serialization.cs b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PrivateEndpointConnectionStatusUpdateResult.Serialization.cs index 91e95234d9fb..cdd3e66e7256 100644 --- a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PrivateEndpointConnectionStatusUpdateResult.Serialization.cs +++ b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PrivateEndpointConnectionStatusUpdateResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class PrivateEndpointConnectionStatusUpdateResult : IUtf8JsonSeri void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWrite throw new FormatException($"The model {nameof(PrivateEndpointConnectionStatusUpdateResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(PrivateEndpointId)) { writer.WritePropertyName("privateEndpointId"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWrite #endif } } - writer.WriteEndObject(); } PrivateEndpointConnectionStatusUpdateResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PrivateLinkResourceList.Serialization.cs b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PrivateLinkResourceList.Serialization.cs index 656f8dee186a..c7ee931e52aa 100644 --- a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PrivateLinkResourceList.Serialization.cs +++ b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PrivateLinkResourceList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class PrivateLinkResourceList : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(PrivateLinkResourceList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } PrivateLinkResourceList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewAccountAccessKey.Serialization.cs b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewAccountAccessKey.Serialization.cs index 02170ca3912d..7619d4f0dbf8 100644 --- a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewAccountAccessKey.Serialization.cs +++ b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewAccountAccessKey.Serialization.cs @@ -18,6 +18,15 @@ public partial class PurviewAccountAccessKey : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(PurviewAccountAccessKey)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(AtlasKafkaPrimaryEndpoint)) { writer.WritePropertyName("atlasKafkaPrimaryEndpoint"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } PurviewAccountAccessKey IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewAccountEndpoint.Serialization.cs b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewAccountEndpoint.Serialization.cs index b6e9b1f4b71a..447c71e623b1 100644 --- a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewAccountEndpoint.Serialization.cs +++ b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewAccountEndpoint.Serialization.cs @@ -18,6 +18,15 @@ public partial class PurviewAccountEndpoint : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(PurviewAccountEndpoint)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Catalog)) { writer.WritePropertyName("catalog"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } PurviewAccountEndpoint IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewAccountNameAvailabilityContent.Serialization.cs b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewAccountNameAvailabilityContent.Serialization.cs index 7f1a27713a7e..d8097e457ac2 100644 --- a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewAccountNameAvailabilityContent.Serialization.cs +++ b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewAccountNameAvailabilityContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class PurviewAccountNameAvailabilityContent : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(PurviewAccountNameAvailabilityContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } PurviewAccountNameAvailabilityContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewAccountNameAvailabilityResult.Serialization.cs b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewAccountNameAvailabilityResult.Serialization.cs index 5b84058e427d..63a73e28af44 100644 --- a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewAccountNameAvailabilityResult.Serialization.cs +++ b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewAccountNameAvailabilityResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class PurviewAccountNameAvailabilityResult : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(PurviewAccountNameAvailabilityResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Message)) { writer.WritePropertyName("message"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } PurviewAccountNameAvailabilityResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewAccountPatch.Serialization.cs b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewAccountPatch.Serialization.cs index 849a71d143d2..9cf793a1bb39 100644 --- a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewAccountPatch.Serialization.cs +++ b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewAccountPatch.Serialization.cs @@ -19,6 +19,15 @@ public partial class PurviewAccountPatch : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(PurviewAccountPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); @@ -63,7 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } PurviewAccountPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewAccountProperties.Serialization.cs b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewAccountProperties.Serialization.cs index aec9e7ef59be..5ceb71e5ccec 100644 --- a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewAccountProperties.Serialization.cs +++ b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewAccountProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class PurviewAccountProperties : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(PurviewAccountProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(AccountStatus)) { writer.WritePropertyName("accountStatus"u8); @@ -121,7 +129,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } PurviewAccountProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewAccountSku.Serialization.cs b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewAccountSku.Serialization.cs index 4a7212c69edc..7ba1b216da96 100644 --- a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewAccountSku.Serialization.cs +++ b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewAccountSku.Serialization.cs @@ -18,6 +18,15 @@ public partial class PurviewAccountSku : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(PurviewAccountSku)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Capacity)) { writer.WritePropertyName("capacity"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } PurviewAccountSku IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewAccountStatus.Serialization.cs b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewAccountStatus.Serialization.cs index d168a8ded18c..a2ef322fa49b 100644 --- a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewAccountStatus.Serialization.cs +++ b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewAccountStatus.Serialization.cs @@ -18,6 +18,15 @@ public partial class PurviewAccountStatus : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(PurviewAccountStatus)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(AccountProvisioningState)) { writer.WritePropertyName("accountProvisioningState"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } PurviewAccountStatus IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewBatchFeatureContent.Serialization.cs b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewBatchFeatureContent.Serialization.cs index acedd89b14d3..2f9093eb3c08 100644 --- a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewBatchFeatureContent.Serialization.cs +++ b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewBatchFeatureContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class PurviewBatchFeatureContent : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(PurviewBatchFeatureContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Features)) { writer.WritePropertyName("features"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } PurviewBatchFeatureContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewBatchFeatureStatus.Serialization.cs b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewBatchFeatureStatus.Serialization.cs index 19045830ce1a..b6d5c8c1d4d4 100644 --- a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewBatchFeatureStatus.Serialization.cs +++ b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewBatchFeatureStatus.Serialization.cs @@ -18,6 +18,15 @@ public partial class PurviewBatchFeatureStatus : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(PurviewBatchFeatureStatus)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Features)) { writer.WritePropertyName("features"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } PurviewBatchFeatureStatus IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewCredentials.Serialization.cs b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewCredentials.Serialization.cs index 607f4dfecdd6..10b60e7ff98a 100644 --- a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewCredentials.Serialization.cs +++ b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewCredentials.Serialization.cs @@ -18,6 +18,15 @@ public partial class PurviewCredentials : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(PurviewCredentials)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IdentityId)) { writer.WritePropertyName("identityId"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } PurviewCredentials IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewIngestionStorage.Serialization.cs b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewIngestionStorage.Serialization.cs index f4012cf8c564..900cf4eecb4f 100644 --- a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewIngestionStorage.Serialization.cs +++ b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewIngestionStorage.Serialization.cs @@ -18,6 +18,15 @@ public partial class PurviewIngestionStorage : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(PurviewIngestionStorage)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } PurviewIngestionStorage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewManagedResource.Serialization.cs b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewManagedResource.Serialization.cs index 10d0c97f232e..274fc7ceb072 100644 --- a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewManagedResource.Serialization.cs +++ b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewManagedResource.Serialization.cs @@ -18,6 +18,15 @@ public partial class PurviewManagedResource : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(PurviewManagedResource)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(EventHubNamespace)) { writer.WritePropertyName("eventHubNamespace"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } PurviewManagedResource IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewPrivateLinkResourceProperties.Serialization.cs b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewPrivateLinkResourceProperties.Serialization.cs index 5b7d888adadb..23f7620338d3 100644 --- a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewPrivateLinkResourceProperties.Serialization.cs +++ b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewPrivateLinkResourceProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class PurviewPrivateLinkResourceProperties : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(PurviewPrivateLinkResourceProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(GroupId)) { writer.WritePropertyName("groupId"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } PurviewPrivateLinkResourceProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewPrivateLinkServiceConnectionState.Serialization.cs b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewPrivateLinkServiceConnectionState.Serialization.cs index 5495a14e4194..f5316f613863 100644 --- a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewPrivateLinkServiceConnectionState.Serialization.cs +++ b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewPrivateLinkServiceConnectionState.Serialization.cs @@ -18,6 +18,15 @@ public partial class PurviewPrivateLinkServiceConnectionState : IUtf8JsonSeriali void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter w throw new FormatException($"The model {nameof(PurviewPrivateLinkServiceConnectionState)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ActionsRequired)) { writer.WritePropertyName("actionsRequired"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter w #endif } } - writer.WriteEndObject(); } PurviewPrivateLinkServiceConnectionState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewQuotaName.Serialization.cs b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewQuotaName.Serialization.cs index f4fecade0060..8ac88cc4123e 100644 --- a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewQuotaName.Serialization.cs +++ b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewQuotaName.Serialization.cs @@ -18,6 +18,15 @@ public partial class PurviewQuotaName : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(PurviewQuotaName)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(LocalizedValue)) { writer.WritePropertyName("localizedValue"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } PurviewQuotaName IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewUsage.Serialization.cs b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewUsage.Serialization.cs index f57e8d571aee..f38c9ae6eef5 100644 --- a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewUsage.Serialization.cs +++ b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewUsage.Serialization.cs @@ -18,6 +18,15 @@ public partial class PurviewUsage : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(PurviewUsage)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(CurrentValue)) { writer.WritePropertyName("currentValue"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti #endif } } - writer.WriteEndObject(); } PurviewUsage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewUsageName.Serialization.cs b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewUsageName.Serialization.cs index 4fea1dde664b..255f032d3e2f 100644 --- a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewUsageName.Serialization.cs +++ b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewUsageName.Serialization.cs @@ -18,6 +18,15 @@ public partial class PurviewUsageName : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,33 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(PurviewUsageName)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(LocalizedValue)) - { - writer.WritePropertyName("localizedValue"u8); - writer.WriteStringValue(LocalizedValue); - } - if (Optional.IsDefined(Value)) - { - writer.WritePropertyName("value"u8); - writer.WriteStringValue(Value); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } PurviewUsageName IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/UsageList.Serialization.cs b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/UsageList.Serialization.cs index 4c50978a72db..9c5dda68aef6 100644 --- a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/UsageList.Serialization.cs +++ b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/UsageList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class UsageList : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions throw new FormatException($"The model {nameof(UsageList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions #endif } } - writer.WriteEndObject(); } UsageList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/PurviewAccountData.Serialization.cs b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/PurviewAccountData.Serialization.cs index 90b1e564a624..40343f7a8626 100644 --- a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/PurviewAccountData.Serialization.cs +++ b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/PurviewAccountData.Serialization.cs @@ -20,6 +20,15 @@ public partial class PurviewAccountData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(PurviewAccountData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(Sku)) { writer.WritePropertyName("sku"u8); @@ -38,39 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("identity"u8); JsonSerializer.Serialize(writer, Identity); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(AccountStatus)) @@ -154,22 +130,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStringValue(PublicNetworkAccess.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } PurviewAccountData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/PurviewKafkaConfigurationData.Serialization.cs b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/PurviewKafkaConfigurationData.Serialization.cs index 0d5e1516cb61..4dba046a57ea 100644 --- a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/PurviewKafkaConfigurationData.Serialization.cs +++ b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/PurviewKafkaConfigurationData.Serialization.cs @@ -20,6 +20,15 @@ public partial class PurviewKafkaConfigurationData : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(PurviewKafkaConfigurationData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(ConsumerGroup)) @@ -86,22 +75,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode writer.WriteStringValue(EventStreamingType.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } PurviewKafkaConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/PurviewPrivateEndpointConnectionData.Serialization.cs b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/PurviewPrivateEndpointConnectionData.Serialization.cs index d4a70d97d782..ec85f5525534 100644 --- a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/PurviewPrivateEndpointConnectionData.Serialization.cs +++ b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/PurviewPrivateEndpointConnectionData.Serialization.cs @@ -21,6 +21,15 @@ public partial class PurviewPrivateEndpointConnectionData : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,27 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(PurviewPrivateEndpointConnectionData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(PrivateEndpoint)) @@ -67,22 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter write writer.WriteStringValue(ProvisioningState); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } PurviewPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/PurviewPrivateLinkResourceData.Serialization.cs b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/PurviewPrivateLinkResourceData.Serialization.cs index 50e9f756e107..41c027fbb590 100644 --- a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/PurviewPrivateLinkResourceData.Serialization.cs +++ b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/PurviewPrivateLinkResourceData.Serialization.cs @@ -20,6 +20,15 @@ public partial class PurviewPrivateLinkResourceData : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,48 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(PurviewPrivateLinkResourceData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); writer.WriteObjectValue(Properties, options); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } PurviewPrivateLinkResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/purview/Azure.ResourceManager.Purview/src/autorest.md b/sdk/purview/Azure.ResourceManager.Purview/src/autorest.md index a38dde32e721..c9def4098cad 100644 --- a/sdk/purview/Azure.ResourceManager.Purview/src/autorest.md +++ b/sdk/purview/Azure.ResourceManager.Purview/src/autorest.md @@ -17,6 +17,7 @@ sample-gen: clear-output-folder: true skip-csproj: true use-model-reader-writer: true +use-write-core: true modelerfour: flatten-payloads: false diff --git a/sdk/quota/Azure.ResourceManager.Quota/samples/Generated/Samples/Sample_QuotaAllocationRequestStatusResource.cs b/sdk/quota/Azure.ResourceManager.Quota/samples/Generated/Samples/Sample_QuotaAllocationRequestStatusResource.cs index 1098c190739a..bf896a400648 100644 --- a/sdk/quota/Azure.ResourceManager.Quota/samples/Generated/Samples/Sample_QuotaAllocationRequestStatusResource.cs +++ b/sdk/quota/Azure.ResourceManager.Quota/samples/Generated/Samples/Sample_QuotaAllocationRequestStatusResource.cs @@ -112,7 +112,7 @@ public async Task CreateOrUpdateGroupQuotaSubscriptionAllocationRequest_Subscrip { RequestedResource = new QuotaAllocationRequestBase() { - Limit = 10, + Limit = 10L, Region = "westus", }, }; @@ -154,7 +154,7 @@ public async Task UpdateGroupQuotaSubscriptionAllocationRequest_SubscriptionQuot { RequestedResource = new QuotaAllocationRequestBase() { - Limit = 10, + Limit = 10L, Region = "westus", }, }; diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/CHANGELOG.md b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/CHANGELOG.md index 788ba49a861d..43b9ab193896 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/CHANGELOG.md +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/CHANGELOG.md @@ -5,6 +5,7 @@ ### Features Added - Enable the new model serialization by using the System.ClientModel, refer this [document](https://aka.ms/azsdk/net/mrw) for more details. +- Exposed `JsonModelWriteCore` for model serialization procedure. ### Breaking Changes diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/api/Azure.ResourceManager.RecoveryServicesBackup.netstandard2.0.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/api/Azure.ResourceManager.RecoveryServicesBackup.netstandard2.0.cs index d46de5fc31ae..a2302cbd84ee 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/api/Azure.ResourceManager.RecoveryServicesBackup.netstandard2.0.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/api/Azure.ResourceManager.RecoveryServicesBackup.netstandard2.0.cs @@ -20,6 +20,7 @@ public partial class BackupEngineData : Azure.ResourceManager.Models.TrackedReso public BackupEngineData(Azure.Core.AzureLocation location) { } public Azure.ETag? ETag { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.BackupGenericEngine Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.BackupEngineData 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.RecoveryServicesBackup.BackupEngineData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -61,6 +62,7 @@ public partial class BackupJobData : Azure.ResourceManager.Models.TrackedResourc public BackupJobData(Azure.Core.AzureLocation location) { } public Azure.ETag? ETag { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.BackupGenericJob Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.BackupJobData 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.RecoveryServicesBackup.BackupJobData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -101,6 +103,7 @@ public partial class BackupPrivateEndpointConnectionData : Azure.ResourceManager public BackupPrivateEndpointConnectionData(Azure.Core.AzureLocation location) { } public Azure.ETag? ETag { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.BackupPrivateEndpointConnectionProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.BackupPrivateEndpointConnectionData 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.RecoveryServicesBackup.BackupPrivateEndpointConnectionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -149,6 +152,7 @@ public partial class BackupProtectedItemData : Azure.ResourceManager.Models.Trac public BackupProtectedItemData(Azure.Core.AzureLocation location) { } public Azure.ETag? ETag { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.BackupGenericProtectedItem Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.BackupProtectedItemData 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.RecoveryServicesBackup.BackupProtectedItemData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -204,6 +208,7 @@ public partial class BackupProtectionContainerData : Azure.ResourceManager.Model public BackupProtectionContainerData(Azure.Core.AzureLocation location) { } public Azure.ETag? ETag { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.BackupGenericProtectionContainer Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.BackupProtectionContainerData 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.RecoveryServicesBackup.BackupProtectionContainerData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -259,6 +264,7 @@ public partial class BackupProtectionIntentData : Azure.ResourceManager.Models.T public BackupProtectionIntentData(Azure.Core.AzureLocation location) { } public Azure.ETag? ETag { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.BackupGenericProtectionIntent Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.BackupProtectionIntentData 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.RecoveryServicesBackup.BackupProtectionIntentData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -312,6 +318,7 @@ public partial class BackupProtectionPolicyData : Azure.ResourceManager.Models.T public BackupProtectionPolicyData(Azure.Core.AzureLocation location) { } public Azure.ETag? ETag { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.BackupGenericProtectionPolicy Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.BackupProtectionPolicyData 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.RecoveryServicesBackup.BackupProtectionPolicyData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -363,6 +370,7 @@ public partial class BackupRecoveryPointData : Azure.ResourceManager.Models.Trac public BackupRecoveryPointData(Azure.Core.AzureLocation location) { } public Azure.ETag? ETag { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.BackupGenericRecoveryPoint Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.BackupRecoveryPointData 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.RecoveryServicesBackup.BackupRecoveryPointData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -409,6 +417,7 @@ public partial class BackupResourceConfigData : Azure.ResourceManager.Models.Tra public BackupResourceConfigData(Azure.Core.AzureLocation location) { } public Azure.ETag? ETag { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.BackupResourceConfigProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.BackupResourceConfigData 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.RecoveryServicesBackup.BackupResourceConfigData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -459,6 +468,7 @@ public partial class BackupResourceEncryptionConfigExtendedData : Azure.Resource public BackupResourceEncryptionConfigExtendedData(Azure.Core.AzureLocation location) { } public Azure.ETag? ETag { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.BackupResourceEncryptionConfigExtendedProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.BackupResourceEncryptionConfigExtendedData 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.RecoveryServicesBackup.BackupResourceEncryptionConfigExtendedData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -505,6 +515,7 @@ public partial class BackupResourceVaultConfigData : Azure.ResourceManager.Model public BackupResourceVaultConfigData(Azure.Core.AzureLocation location) { } public Azure.ETag? ETag { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.BackupResourceVaultConfigProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.BackupResourceVaultConfigData 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.RecoveryServicesBackup.BackupResourceVaultConfigData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -631,6 +642,7 @@ public partial class ResourceGuardProxyData : Azure.ResourceManager.Models.Track public ResourceGuardProxyData(Azure.Core.AzureLocation location) { } public Azure.ETag? ETag { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.ResourceGuardProxyProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.ResourceGuardProxyData 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.RecoveryServicesBackup.ResourceGuardProxyData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -877,6 +889,7 @@ public BackupCommonSettings() { } public bool? IsCompression { get { throw null; } set { } } public bool? IsSqlCompression { get { throw null; } set { } } public string TimeZone { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.BackupCommonSettings 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.RecoveryServicesBackup.Models.BackupCommonSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -886,6 +899,7 @@ public BackupCommonSettings() { } public abstract partial class BackupContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { protected BackupContent() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.BackupContent 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.RecoveryServicesBackup.Models.BackupContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -948,6 +962,7 @@ public partial class BackupDay : 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.RecoveryServicesBackup.Models.BackupDay System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -994,6 +1009,7 @@ public BackupEngineExtendedInfo() { } public int? ProtectedServersCount { get { throw null; } set { } } public System.DateTimeOffset? RefreshedOn { get { throw null; } set { } } public double? UsedDiskSpace { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.BackupEngineExtendedInfo 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.RecoveryServicesBackup.Models.BackupEngineExtendedInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1006,6 +1022,7 @@ public BackupErrorDetail() { } public string Code { get { throw null; } } public string Message { get { throw null; } } public System.Collections.Generic.IReadOnlyList Recommendations { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.BackupErrorDetail 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.RecoveryServicesBackup.Models.BackupErrorDetail System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1064,6 +1081,7 @@ protected BackupGenericEngine() { } public bool? IsAzureBackupAgentUpgradeAvailable { get { throw null; } set { } } public bool? IsDpmUpgradeAvailable { get { throw null; } set { } } public string RegistrationStatus { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.BackupGenericEngine 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.RecoveryServicesBackup.Models.BackupGenericEngine System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1080,6 +1098,7 @@ protected BackupGenericJob() { } public string Operation { get { throw null; } set { } } public System.DateTimeOffset? StartOn { get { throw null; } set { } } public string Status { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.BackupGenericJob 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.RecoveryServicesBackup.Models.BackupGenericJob System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1109,6 +1128,7 @@ protected BackupGenericProtectedItem() { } public Azure.Core.ResourceIdentifier SourceResourceId { get { throw null; } set { } } public string VaultId { get { throw null; } } public Azure.ResourceManager.RecoveryServicesBackup.Models.BackupDataSourceType? WorkloadType { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.BackupGenericProtectedItem 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.RecoveryServicesBackup.Models.BackupGenericProtectedItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1123,6 +1143,7 @@ protected BackupGenericProtectionContainer() { } public string HealthStatus { get { throw null; } set { } } public string ProtectableObjectType { get { throw null; } set { } } public string RegistrationStatus { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.BackupGenericProtectionContainer 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.RecoveryServicesBackup.Models.BackupGenericProtectionContainer System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1137,6 +1158,7 @@ protected BackupGenericProtectionIntent() { } public Azure.Core.ResourceIdentifier PolicyId { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.BackupProtectionStatus? ProtectionState { get { throw null; } set { } } public Azure.Core.ResourceIdentifier SourceResourceId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.BackupGenericProtectionIntent 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.RecoveryServicesBackup.Models.BackupGenericProtectionIntent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1148,6 +1170,7 @@ public abstract partial class BackupGenericProtectionPolicy : System.ClientModel protected BackupGenericProtectionPolicy() { } public int? ProtectedItemsCount { get { throw null; } set { } } public System.Collections.Generic.IList ResourceGuardOperationRequests { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.BackupGenericProtectionPolicy 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.RecoveryServicesBackup.Models.BackupGenericProtectionPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1157,6 +1180,7 @@ protected BackupGenericProtectionPolicy() { } public abstract partial class BackupGenericRecoveryPoint : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { protected BackupGenericRecoveryPoint() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.BackupGenericRecoveryPoint 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.RecoveryServicesBackup.Models.BackupGenericRecoveryPoint System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1166,6 +1190,7 @@ protected BackupGenericRecoveryPoint() { } public partial class BackupGoalFeatureSupportContent : Azure.ResourceManager.RecoveryServicesBackup.Models.FeatureSupportContent, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public BackupGoalFeatureSupportContent() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.BackupGoalFeatureSupportContent 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.RecoveryServicesBackup.Models.BackupGoalFeatureSupportContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1178,6 +1203,7 @@ public BackupHourlySchedule() { } public int? Interval { get { throw null; } set { } } public int? ScheduleWindowDuration { get { throw null; } set { } } public System.DateTimeOffset? ScheduleWindowStartOn { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.BackupHourlySchedule 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.RecoveryServicesBackup.Models.BackupHourlySchedule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1189,6 +1215,7 @@ public partial class BackupIdentityInfo : System.ClientModel.Primitives.IJsonMod public BackupIdentityInfo() { } public bool? IsSystemAssignedIdentity { get { throw null; } set { } } public Azure.Core.ResourceIdentifier ManagedIdentityResourceId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.BackupIdentityInfo 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.RecoveryServicesBackup.Models.BackupIdentityInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1263,6 +1290,7 @@ internal BackupManagementUsage() { } public System.DateTimeOffset? NextResetOn { get { throw null; } } public string QuotaPeriod { get { throw null; } } public Azure.ResourceManager.RecoveryServicesBackup.Models.BackupUsagesUnit? Unit { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.BackupManagementUsage 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.RecoveryServicesBackup.Models.BackupManagementUsage System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1290,6 +1318,7 @@ public partial class BackupNameInfo : 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.RecoveryServicesBackup.Models.BackupNameInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1303,6 +1332,7 @@ public BackupPrivateEndpointConnectionProperties() { } public Azure.Core.ResourceIdentifier PrivateEndpointId { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.RecoveryServicesBackupPrivateLinkServiceConnectionState PrivateLinkServiceConnectionState { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.BackupPrivateEndpointConnectionProvisioningState? ProvisioningState { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.BackupPrivateEndpointConnectionProperties 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.RecoveryServicesBackup.Models.BackupPrivateEndpointConnectionProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1382,6 +1412,7 @@ public BackupResourceConfigProperties() { } public Azure.ResourceManager.RecoveryServicesBackup.Models.BackupStorageType? StorageType { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.BackupStorageTypeState? StorageTypeState { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.VaultXcoolState? XcoolState { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.BackupResourceConfigProperties 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.RecoveryServicesBackup.Models.BackupResourceConfigProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1396,6 +1427,7 @@ public BackupResourceEncryptionConfig() { } public System.Uri KeyUri { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.LastUpdateStatus? LastUpdateStatus { get { throw null; } set { } } public string SubscriptionId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.BackupResourceEncryptionConfig 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.RecoveryServicesBackup.Models.BackupResourceEncryptionConfig System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1407,6 +1439,7 @@ public partial class BackupResourceEncryptionConfigExtendedCreateOrUpdateContent public BackupResourceEncryptionConfigExtendedCreateOrUpdateContent(Azure.Core.AzureLocation location) { } public Azure.ETag? ETag { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.BackupResourceEncryptionConfig Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.BackupResourceEncryptionConfigExtendedCreateOrUpdateContent 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.RecoveryServicesBackup.Models.BackupResourceEncryptionConfigExtendedCreateOrUpdateContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1418,6 +1451,7 @@ public partial class BackupResourceEncryptionConfigExtendedProperties : Azure.Re public BackupResourceEncryptionConfigExtendedProperties() { } public Azure.Core.ResourceIdentifier UserAssignedIdentity { get { throw null; } set { } } public bool? UseSystemAssignedIdentity { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.BackupResourceEncryptionConfigExtendedProperties 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.RecoveryServicesBackup.Models.BackupResourceEncryptionConfigExtendedProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1437,6 +1471,7 @@ public BackupResourceVaultConfigProperties() { } public Azure.ResourceManager.RecoveryServicesBackup.Models.BackupStorageType? StorageModelType { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.BackupStorageType? StorageType { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.BackupStorageTypeState? StorageTypeState { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.BackupResourceVaultConfigProperties 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.RecoveryServicesBackup.Models.BackupResourceVaultConfigProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1446,6 +1481,7 @@ public BackupResourceVaultConfigProperties() { } public abstract partial class BackupRetentionPolicy : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { protected BackupRetentionPolicy() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.BackupRetentionPolicy 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.RecoveryServicesBackup.Models.BackupRetentionPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1455,6 +1491,7 @@ protected BackupRetentionPolicy() { } public abstract partial class BackupSchedulePolicy : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { protected BackupSchedulePolicy() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.BackupSchedulePolicy 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.RecoveryServicesBackup.Models.BackupSchedulePolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1464,6 +1501,7 @@ protected BackupSchedulePolicy() { } public partial class BackupServerContainer : Azure.ResourceManager.RecoveryServicesBackup.Models.DpmContainer, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public BackupServerContainer() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.BackupServerContainer 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.RecoveryServicesBackup.Models.BackupServerContainer System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1473,6 +1511,7 @@ public BackupServerContainer() { } public partial class BackupServerEngine : Azure.ResourceManager.RecoveryServicesBackup.Models.BackupGenericEngine, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public BackupServerEngine() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.BackupServerEngine 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.RecoveryServicesBackup.Models.BackupServerEngine System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1485,6 +1524,7 @@ public BackupStatusContent() { } public string PoLogicalName { get { throw null; } set { } } public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.BackupDataSourceType? ResourceType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.BackupStatusContent 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.RecoveryServicesBackup.Models.BackupStatusContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1505,6 +1545,7 @@ internal BackupStatusResult() { } public Azure.ResourceManager.RecoveryServicesBackup.Models.BackupProtectionStatus? ProtectionStatus { get { throw null; } } public string RegistrationStatus { get { throw null; } } public Azure.Core.ResourceIdentifier VaultId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.BackupStatusResult 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.RecoveryServicesBackup.Models.BackupStatusResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1562,6 +1603,7 @@ public partial class BackupTargetDiskNetworkAccessSettings : System.ClientModel. public BackupTargetDiskNetworkAccessSettings() { } public Azure.Core.ResourceIdentifier TargetDiskAccessId { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.BackupTargetDiskNetworkAccessOption? TargetDiskNetworkAccessOption { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.BackupTargetDiskNetworkAccessSettings 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.RecoveryServicesBackup.Models.BackupTargetDiskNetworkAccessSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1574,6 +1616,7 @@ public BackupTieringPolicy() { } public Azure.ResourceManager.RecoveryServicesBackup.Models.RetentionDurationType? DurationType { get { throw null; } set { } } public int? DurationValue { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.TieringMode? TieringMode { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.BackupTieringPolicy 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.RecoveryServicesBackup.Models.BackupTieringPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1650,6 +1693,7 @@ public partial class BackupWeeklySchedule : System.ClientModel.Primitives.IJsonM public BackupWeeklySchedule() { } public System.Collections.Generic.IList ScheduleRunDays { get { throw null; } } public System.Collections.Generic.IList ScheduleRunTimes { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.BackupWeeklySchedule 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.RecoveryServicesBackup.Models.BackupWeeklySchedule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1703,6 +1747,7 @@ public BekDetails() { } public string SecretData { get { throw null; } set { } } public System.Uri SecretUri { get { throw null; } set { } } public Azure.Core.ResourceIdentifier SecretVaultId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.BekDetails 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.RecoveryServicesBackup.Models.BekDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1716,6 +1761,7 @@ public ContainerIdentityInfo() { } public string Audience { get { throw null; } set { } } public string ServicePrincipalClientId { get { throw null; } set { } } public string UniqueName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.ContainerIdentityInfo 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.RecoveryServicesBackup.Models.ContainerIdentityInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1727,6 +1773,7 @@ public partial class DailyRetentionSchedule : System.ClientModel.Primitives.IJso public DailyRetentionSchedule() { } public Azure.ResourceManager.RecoveryServicesBackup.Models.RetentionDuration RetentionDuration { get { throw null; } set { } } public System.Collections.Generic.IList RetentionTimes { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.DailyRetentionSchedule 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.RecoveryServicesBackup.Models.DailyRetentionSchedule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1757,6 +1804,7 @@ public partial class DiskExclusionProperties : System.ClientModel.Primitives.IJs public DiskExclusionProperties() { } public System.Collections.Generic.IList DiskLunList { get { throw null; } } public bool? IsInclusionList { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.DiskExclusionProperties 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.RecoveryServicesBackup.Models.DiskExclusionProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1768,6 +1816,7 @@ public partial class DiskInformation : System.ClientModel.Primitives.IJsonModel< public DiskInformation() { } public int? Lun { get { throw null; } set { } } public string Name { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.DiskInformation 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.RecoveryServicesBackup.Models.DiskInformation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1781,6 +1830,7 @@ public DistributedNodesInfo() { } public string NodeName { get { throw null; } set { } } public string SourceResourceId { get { throw null; } set { } } public string Status { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.DistributedNodesInfo 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.RecoveryServicesBackup.Models.DistributedNodesInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1790,6 +1840,7 @@ public DistributedNodesInfo() { } public partial class DpmBackupEngine : Azure.ResourceManager.RecoveryServicesBackup.Models.BackupGenericEngine, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DpmBackupEngine() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.DpmBackupEngine 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.RecoveryServicesBackup.Models.DpmBackupEngine System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1807,6 +1858,7 @@ public DpmBackupJob() { } public System.Collections.Generic.IList ErrorDetails { get { throw null; } } public Azure.ResourceManager.RecoveryServicesBackup.Models.DpmBackupJobExtendedInfo ExtendedInfo { get { throw null; } set { } } public string WorkloadType { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.DpmBackupJob 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.RecoveryServicesBackup.Models.DpmBackupJob System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1819,6 +1871,7 @@ public DpmBackupJobExtendedInfo() { } public string DynamicErrorMessage { get { throw null; } set { } } public System.Collections.Generic.IDictionary PropertyBag { get { throw null; } } public System.Collections.Generic.IList TasksList { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.DpmBackupJobExtendedInfo 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.RecoveryServicesBackup.Models.DpmBackupJobExtendedInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1833,6 +1886,7 @@ public DpmBackupJobTaskDetails() { } public System.DateTimeOffset? StartOn { get { throw null; } set { } } public string Status { get { throw null; } set { } } public string TaskId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.DpmBackupJobTaskDetails 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.RecoveryServicesBackup.Models.DpmBackupJobTaskDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1850,6 +1904,7 @@ public DpmContainer() { } public bool? IsUpgradeAvailable { get { throw null; } set { } } public long? ProtectedItemCount { get { throw null; } set { } } public string ProtectionStatus { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.DpmContainer 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.RecoveryServicesBackup.Models.DpmContainer System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1861,6 +1916,7 @@ public partial class DpmErrorInfo : System.ClientModel.Primitives.IJsonModel Recommendations { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.DpmErrorInfo 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.RecoveryServicesBackup.Models.DpmErrorInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1874,6 +1930,7 @@ public DpmProtectedItem() { } public Azure.ResourceManager.RecoveryServicesBackup.Models.DpmProtectedItemExtendedInfo ExtendedInfo { get { throw null; } set { } } public string FriendlyName { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.ProtectedItemState? ProtectionState { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.DpmProtectedItem 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.RecoveryServicesBackup.Models.DpmProtectedItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1897,6 +1954,7 @@ public DpmProtectedItemExtendedInfo() { } public string ProtectionGroupName { get { throw null; } set { } } public int? RecoveryPointCount { get { throw null; } set { } } public string TotalDiskStorageSizeInBytes { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.DpmProtectedItemExtendedInfo 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.RecoveryServicesBackup.Models.DpmProtectedItemExtendedInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1925,6 +1983,7 @@ public DpmProtectedItemExtendedInfo() { } public abstract partial class FeatureSupportContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { protected FeatureSupportContent() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.FeatureSupportContent 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.RecoveryServicesBackup.Models.FeatureSupportContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1936,6 +1995,7 @@ public abstract partial class FetchTieringCostInfoContent : System.ClientModel.P protected FetchTieringCostInfoContent(Azure.ResourceManager.RecoveryServicesBackup.Models.RecoveryPointTierType sourceTierType, Azure.ResourceManager.RecoveryServicesBackup.Models.RecoveryPointTierType targetTierType) { } public Azure.ResourceManager.RecoveryServicesBackup.Models.RecoveryPointTierType SourceTierType { get { throw null; } } public Azure.ResourceManager.RecoveryServicesBackup.Models.RecoveryPointTierType TargetTierType { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.FetchTieringCostInfoContent 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.RecoveryServicesBackup.Models.FetchTieringCostInfoContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1949,6 +2009,7 @@ public partial class FetchTieringCostInfoForRehydrationContent : Azure.ResourceM public string ProtectedItemName { get { throw null; } } public string RecoveryPointId { get { throw null; } } public Azure.ResourceManager.RecoveryServicesBackup.Models.RehydrationPriority RehydrationPriority { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.FetchTieringCostInfoForRehydrationContent 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.RecoveryServicesBackup.Models.FetchTieringCostInfoForRehydrationContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1959,6 +2020,7 @@ public partial class FetchTieringCostSavingsInfoForPolicyContent : Azure.Resourc { public FetchTieringCostSavingsInfoForPolicyContent(Azure.ResourceManager.RecoveryServicesBackup.Models.RecoveryPointTierType sourceTierType, Azure.ResourceManager.RecoveryServicesBackup.Models.RecoveryPointTierType targetTierType, string policyName) : base (default(Azure.ResourceManager.RecoveryServicesBackup.Models.RecoveryPointTierType), default(Azure.ResourceManager.RecoveryServicesBackup.Models.RecoveryPointTierType)) { } public string PolicyName { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.FetchTieringCostSavingsInfoForPolicyContent 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.RecoveryServicesBackup.Models.FetchTieringCostSavingsInfoForPolicyContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1970,6 +2032,7 @@ public partial class FetchTieringCostSavingsInfoForProtectedItemContent : Azure. public FetchTieringCostSavingsInfoForProtectedItemContent(Azure.ResourceManager.RecoveryServicesBackup.Models.RecoveryPointTierType sourceTierType, Azure.ResourceManager.RecoveryServicesBackup.Models.RecoveryPointTierType targetTierType, string containerName, string protectedItemName) : base (default(Azure.ResourceManager.RecoveryServicesBackup.Models.RecoveryPointTierType), default(Azure.ResourceManager.RecoveryServicesBackup.Models.RecoveryPointTierType)) { } public string ContainerName { get { throw null; } } public string ProtectedItemName { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.FetchTieringCostSavingsInfoForProtectedItemContent 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.RecoveryServicesBackup.Models.FetchTieringCostSavingsInfoForProtectedItemContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1979,6 +2042,7 @@ public partial class FetchTieringCostSavingsInfoForProtectedItemContent : Azure. public partial class FetchTieringCostSavingsInfoForVaultContent : Azure.ResourceManager.RecoveryServicesBackup.Models.FetchTieringCostInfoContent, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public FetchTieringCostSavingsInfoForVaultContent(Azure.ResourceManager.RecoveryServicesBackup.Models.RecoveryPointTierType sourceTierType, Azure.ResourceManager.RecoveryServicesBackup.Models.RecoveryPointTierType targetTierType) : base (default(Azure.ResourceManager.RecoveryServicesBackup.Models.RecoveryPointTierType), default(Azure.ResourceManager.RecoveryServicesBackup.Models.RecoveryPointTierType)) { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.FetchTieringCostSavingsInfoForVaultContent 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.RecoveryServicesBackup.Models.FetchTieringCostSavingsInfoForVaultContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1989,6 +2053,7 @@ public partial class FileShareBackupContent : Azure.ResourceManager.RecoveryServ { public FileShareBackupContent() { } public System.DateTimeOffset? RecoveryPointExpireOn { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.FileShareBackupContent 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.RecoveryServicesBackup.Models.FileShareBackupContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2022,6 +2087,7 @@ public FileShareProtectableItem() { } public Azure.ResourceManager.RecoveryServicesBackup.Models.BackupFileShareType? AzureFileShareType { get { throw null; } set { } } public string ParentContainerFabricId { get { throw null; } set { } } public string ParentContainerFriendlyName { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.FileShareProtectableItem 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.RecoveryServicesBackup.Models.FileShareProtectableItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2038,6 +2104,7 @@ public FileshareProtectedItem() { } public string LastBackupStatus { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.BackupProtectionState? ProtectionState { get { throw null; } set { } } public string ProtectionStatus { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.FileshareProtectedItem 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.RecoveryServicesBackup.Models.FileshareProtectedItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2052,6 +2119,7 @@ public FileshareProtectedItemExtendedInfo() { } public int? RecoveryPointCount { get { throw null; } set { } } public string ResourceState { get { throw null; } } public System.DateTimeOffset? ResourceStateSyncOn { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.FileshareProtectedItemExtendedInfo 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.RecoveryServicesBackup.Models.FileshareProtectedItemExtendedInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2066,6 +2134,7 @@ public FileShareProtectionPolicy() { } public string TimeZone { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.VaultRetentionPolicy VaultRetentionPolicy { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.BackupWorkloadType? WorkLoadType { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.FileShareProtectionPolicy 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.RecoveryServicesBackup.Models.FileShareProtectionPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2077,6 +2146,7 @@ public partial class FileShareProvisionIlrContent : Azure.ResourceManager.Recove public FileShareProvisionIlrContent() { } public string RecoveryPointId { get { throw null; } set { } } public Azure.Core.ResourceIdentifier SourceResourceId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.FileShareProvisionIlrContent 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.RecoveryServicesBackup.Models.FileShareProvisionIlrContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2091,6 +2161,7 @@ public FileShareRecoveryPoint() { } public Azure.ResourceManager.RecoveryServicesBackup.Models.RecoveryPointProperties RecoveryPointProperties { get { throw null; } set { } } public int? RecoveryPointSizeInGB { get { throw null; } set { } } public string RecoveryPointType { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.FileShareRecoveryPoint 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.RecoveryServicesBackup.Models.FileShareRecoveryPoint System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2127,6 +2198,7 @@ public FileShareRestoreContent() { } public Azure.ResourceManager.RecoveryServicesBackup.Models.FileShareRestoreType? RestoreRequestType { get { throw null; } set { } } public Azure.Core.ResourceIdentifier SourceResourceId { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.TargetAfsRestoreInfo TargetDetails { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.FileShareRestoreContent 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.RecoveryServicesBackup.Models.FileShareRestoreContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2157,6 +2229,7 @@ public partial class GenericContainer : Azure.ResourceManager.RecoveryServicesBa public GenericContainer() { } public Azure.ResourceManager.RecoveryServicesBackup.Models.GenericContainerExtendedInfo ExtendedInformation { get { throw null; } set { } } public string FabricName { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.GenericContainer 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.RecoveryServicesBackup.Models.GenericContainer System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2169,6 +2242,7 @@ public GenericContainerExtendedInfo() { } public Azure.ResourceManager.RecoveryServicesBackup.Models.ContainerIdentityInfo ContainerIdentityInfo { get { throw null; } set { } } public string RawCertData { get { throw null; } set { } } public System.Collections.Generic.IDictionary ServiceEndpoints { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.GenericContainerExtendedInfo 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.RecoveryServicesBackup.Models.GenericContainerExtendedInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2184,6 +2258,7 @@ public GenericProtectedItem() { } public long? ProtectedItemId { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.BackupProtectionState? ProtectionState { get { throw null; } set { } } public System.Collections.Generic.IDictionary SourceAssociations { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.GenericProtectedItem 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.RecoveryServicesBackup.Models.GenericProtectedItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2196,6 +2271,7 @@ public GenericProtectionPolicy() { } public string FabricName { get { throw null; } set { } } public System.Collections.Generic.IList SubProtectionPolicy { get { throw null; } } public string TimeZone { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.GenericProtectionPolicy 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.RecoveryServicesBackup.Models.GenericProtectionPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2210,6 +2286,7 @@ public GenericRecoveryPoint() { } public System.DateTimeOffset? RecoveryPointOn { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.RecoveryPointProperties RecoveryPointProperties { get { throw null; } set { } } public string RecoveryPointType { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.GenericRecoveryPoint 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.RecoveryServicesBackup.Models.GenericRecoveryPoint System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2219,6 +2296,7 @@ public GenericRecoveryPoint() { } public partial class IaasClassicComputeVmContainer : Azure.ResourceManager.RecoveryServicesBackup.Models.IaasVmContainer, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public IaasClassicComputeVmContainer() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.IaasClassicComputeVmContainer 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.RecoveryServicesBackup.Models.IaasClassicComputeVmContainer System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2228,6 +2306,7 @@ public IaasClassicComputeVmContainer() { } public partial class IaasClassicComputeVmProtectableItem : Azure.ResourceManager.RecoveryServicesBackup.Models.IaasVmProtectableItem, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public IaasClassicComputeVmProtectableItem() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.IaasClassicComputeVmProtectableItem 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.RecoveryServicesBackup.Models.IaasClassicComputeVmProtectableItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2237,6 +2316,7 @@ public IaasClassicComputeVmProtectableItem() { } public partial class IaasClassicComputeVmProtectedItem : Azure.ResourceManager.RecoveryServicesBackup.Models.IaasVmProtectedItem, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public IaasClassicComputeVmProtectedItem() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.IaasClassicComputeVmProtectedItem 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.RecoveryServicesBackup.Models.IaasClassicComputeVmProtectedItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2246,6 +2326,7 @@ public IaasClassicComputeVmProtectedItem() { } public partial class IaasComputeVmContainer : Azure.ResourceManager.RecoveryServicesBackup.Models.IaasVmContainer, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public IaasComputeVmContainer() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.IaasComputeVmContainer 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.RecoveryServicesBackup.Models.IaasComputeVmContainer System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2255,6 +2336,7 @@ public IaasComputeVmContainer() { } public partial class IaasComputeVmProtectableItem : Azure.ResourceManager.RecoveryServicesBackup.Models.IaasVmProtectableItem, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public IaasComputeVmProtectableItem() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.IaasComputeVmProtectableItem 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.RecoveryServicesBackup.Models.IaasComputeVmProtectableItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2264,6 +2346,7 @@ public IaasComputeVmProtectableItem() { } public partial class IaasComputeVmProtectedItem : Azure.ResourceManager.RecoveryServicesBackup.Models.IaasVmProtectedItem, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public IaasComputeVmProtectedItem() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.IaasComputeVmProtectedItem 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.RecoveryServicesBackup.Models.IaasComputeVmProtectedItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2274,6 +2357,7 @@ public partial class IaasVmBackupContent : Azure.ResourceManager.RecoveryService { public IaasVmBackupContent() { } public System.DateTimeOffset? RecoveryPointExpireOn { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.IaasVmBackupContent 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.RecoveryServicesBackup.Models.IaasVmBackupContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2285,6 +2369,7 @@ public partial class IaasVmBackupExtendedProperties : System.ClientModel.Primiti public IaasVmBackupExtendedProperties() { } public Azure.ResourceManager.RecoveryServicesBackup.Models.DiskExclusionProperties DiskExclusionProperties { get { throw null; } set { } } public string LinuxVmApplicationName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.IaasVmBackupExtendedProperties 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.RecoveryServicesBackup.Models.IaasVmBackupExtendedProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2301,6 +2386,7 @@ public IaasVmBackupJob() { } public Azure.ResourceManager.RecoveryServicesBackup.Models.IaasVmBackupJobExtendedInfo ExtendedInfo { get { throw null; } set { } } public bool? IsUserTriggered { get { throw null; } set { } } public string VirtualMachineVersion { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.IaasVmBackupJob 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.RecoveryServicesBackup.Models.IaasVmBackupJob System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2316,6 +2402,7 @@ public IaasVmBackupJobExtendedInfo() { } public double? ProgressPercentage { get { throw null; } set { } } public System.Collections.Generic.IDictionary PropertyBag { get { throw null; } } public System.Collections.Generic.IList TasksList { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.IaasVmBackupJobExtendedInfo 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.RecoveryServicesBackup.Models.IaasVmBackupJobExtendedInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2333,6 +2420,7 @@ public IaasVmBackupJobTaskDetails() { } public string Status { get { throw null; } set { } } public string TaskExecutionDetails { get { throw null; } set { } } public string TaskId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.IaasVmBackupJobTaskDetails 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.RecoveryServicesBackup.Models.IaasVmBackupJobTaskDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2348,6 +2436,7 @@ public IaasVmBackupJobV2() { } public System.Collections.Generic.IList ErrorDetails { get { throw null; } } public Azure.ResourceManager.RecoveryServicesBackup.Models.IaasVmBackupJobExtendedInfo ExtendedInfo { get { throw null; } set { } } public string VirtualMachineVersion { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.IaasVmBackupJobV2 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.RecoveryServicesBackup.Models.IaasVmBackupJobV2 System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2360,6 +2449,7 @@ public IaasVmContainer() { } public string ResourceGroup { get { throw null; } set { } } public Azure.Core.ResourceIdentifier VirtualMachineId { get { throw null; } set { } } public string VirtualMachineVersion { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.IaasVmContainer 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.RecoveryServicesBackup.Models.IaasVmContainer System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2373,6 +2463,7 @@ public IaasVmErrorInfo() { } public string ErrorString { get { throw null; } } public string ErrorTitle { get { throw null; } } public System.Collections.Generic.IReadOnlyList Recommendations { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.IaasVmErrorInfo 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.RecoveryServicesBackup.Models.IaasVmErrorInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2382,6 +2473,7 @@ public IaasVmErrorInfo() { } public partial class IaasVmHealthDetails : Azure.ResourceManager.RecoveryServicesBackup.Models.ResourceHealthDetails, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public IaasVmHealthDetails() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.IaasVmHealthDetails 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.RecoveryServicesBackup.Models.IaasVmHealthDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2395,6 +2487,7 @@ public IaasVmIlrRegistrationContent() { } public string RecoveryPointId { get { throw null; } set { } } public bool? RenewExistingRegistration { get { throw null; } set { } } public Azure.Core.ResourceIdentifier VirtualMachineId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.IaasVmIlrRegistrationContent 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.RecoveryServicesBackup.Models.IaasVmIlrRegistrationContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2426,6 +2519,7 @@ public IaasVmProtectableItem() { } public string ResourceGroup { get { throw null; } set { } } public Azure.Core.ResourceIdentifier VirtualMachineId { get { throw null; } set { } } public string VirtualMachineVersion { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.IaasVmProtectableItem 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.RecoveryServicesBackup.Models.IaasVmProtectableItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2447,6 +2541,7 @@ public IaasVmProtectedItem() { } public Azure.ResourceManager.RecoveryServicesBackup.Models.BackupProtectionState? ProtectionState { get { throw null; } set { } } public string ProtectionStatus { get { throw null; } set { } } public Azure.Core.ResourceIdentifier VirtualMachineId { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.IaasVmProtectedItem 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.RecoveryServicesBackup.Models.IaasVmProtectedItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2462,6 +2557,7 @@ public IaasVmProtectedItemExtendedInfo() { } public System.DateTimeOffset? OldestRecoveryPointInArchive { get { throw null; } set { } } public System.DateTimeOffset? OldestRecoveryPointInVault { get { throw null; } set { } } public int? RecoveryPointCount { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.IaasVmProtectedItemExtendedInfo 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.RecoveryServicesBackup.Models.IaasVmProtectedItemExtendedInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2498,6 +2594,7 @@ public IaasVmProtectionPolicy() { } public Azure.ResourceManager.RecoveryServicesBackup.Models.BackupSchedulePolicy SchedulePolicy { get { throw null; } set { } } public System.Collections.Generic.IDictionary TieringPolicy { get { throw null; } } public string TimeZone { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.IaasVmProtectionPolicy 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.RecoveryServicesBackup.Models.IaasVmProtectionPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2526,6 +2623,7 @@ public IaasVmRecoveryPoint() { } public string SourceVmStorageType { get { throw null; } set { } } public string VirtualMachineSize { get { throw null; } set { } } public System.Collections.Generic.IList Zones { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.IaasVmRecoveryPoint 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.RecoveryServicesBackup.Models.IaasVmRecoveryPoint System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2558,6 +2656,7 @@ public IaasVmRestoreContent() { } public Azure.Core.ResourceIdentifier TargetVirtualMachineId { get { throw null; } set { } } public Azure.Core.ResourceIdentifier VirtualNetworkId { get { throw null; } set { } } public System.Collections.Generic.IList Zones { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.IaasVmRestoreContent 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.RecoveryServicesBackup.Models.IaasVmRestoreContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2568,6 +2667,7 @@ public partial class IaasVmRestoreWithRehydrationContent : Azure.ResourceManager { public IaasVmRestoreWithRehydrationContent() { } public Azure.ResourceManager.RecoveryServicesBackup.Models.RecoveryPointRehydrationInfo RecoveryPointRehydrationInfo { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.IaasVmRestoreWithRehydrationContent 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.RecoveryServicesBackup.Models.IaasVmRestoreWithRehydrationContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2579,6 +2679,7 @@ public partial class IdentityBasedRestoreDetails : System.ClientModel.Primitives public IdentityBasedRestoreDetails() { } public string ObjectType { get { throw null; } set { } } public Azure.Core.ResourceIdentifier TargetStorageAccountId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.IdentityBasedRestoreDetails 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.RecoveryServicesBackup.Models.IdentityBasedRestoreDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2588,6 +2689,7 @@ public IdentityBasedRestoreDetails() { } public abstract partial class IlrContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { protected IlrContent() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.IlrContent 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.RecoveryServicesBackup.Models.IlrContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2639,6 +2741,7 @@ public InquiryValidation() { } public Azure.ResourceManager.RecoveryServicesBackup.Models.BackupErrorDetail ErrorDetail { get { throw null; } set { } } public System.BinaryData ProtectableItemCount { get { throw null; } } public string Status { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.InquiryValidation 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.RecoveryServicesBackup.Models.InquiryValidation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2650,6 +2753,7 @@ public partial class InstantRPAdditionalDetails : System.ClientModel.Primitives. public InstantRPAdditionalDetails() { } public string AzureBackupRGNamePrefix { get { throw null; } set { } } public string AzureBackupRGNameSuffix { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.InstantRPAdditionalDetails 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.RecoveryServicesBackup.Models.InstantRPAdditionalDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2668,6 +2772,7 @@ public KekDetails() { } public string KeyBackupData { get { throw null; } set { } } public System.Uri KeyUri { get { throw null; } set { } } public Azure.Core.ResourceIdentifier KeyVaultId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.KekDetails 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.RecoveryServicesBackup.Models.KekDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2680,6 +2785,7 @@ public KeyAndSecretDetails() { } public Azure.ResourceManager.RecoveryServicesBackup.Models.BekDetails BekDetails { get { throw null; } set { } } public string EncryptionMechanism { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.KekDetails KekDetails { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.KeyAndSecretDetails 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.RecoveryServicesBackup.Models.KeyAndSecretDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2691,6 +2797,7 @@ public partial class KpiResourceHealthDetails : System.ClientModel.Primitives.IJ public KpiResourceHealthDetails() { } public System.Collections.Generic.IList ResourceHealthDetails { get { throw null; } } public Azure.ResourceManager.RecoveryServicesBackup.Models.ResourceHealthStatus? ResourceHealthStatus { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.KpiResourceHealthDetails 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.RecoveryServicesBackup.Models.KpiResourceHealthDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2745,6 +2852,7 @@ public partial class LogSchedulePolicy : Azure.ResourceManager.RecoveryServicesB { public LogSchedulePolicy() { } public int? ScheduleFrequencyInMins { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.LogSchedulePolicy 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.RecoveryServicesBackup.Models.LogSchedulePolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2758,6 +2866,7 @@ public LongTermRetentionPolicy() { } public Azure.ResourceManager.RecoveryServicesBackup.Models.MonthlyRetentionSchedule MonthlySchedule { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.WeeklyRetentionSchedule WeeklySchedule { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.YearlyRetentionSchedule YearlySchedule { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.LongTermRetentionPolicy 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.RecoveryServicesBackup.Models.LongTermRetentionPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2767,6 +2876,7 @@ public LongTermRetentionPolicy() { } public partial class LongTermSchedulePolicy : Azure.ResourceManager.RecoveryServicesBackup.Models.BackupSchedulePolicy, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public LongTermSchedulePolicy() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.LongTermSchedulePolicy 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.RecoveryServicesBackup.Models.LongTermSchedulePolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2783,6 +2893,7 @@ public MabBackupJob() { } public string MabServerName { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.MabServerType? MabServerType { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.BackupWorkloadType? WorkloadType { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.MabBackupJob 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.RecoveryServicesBackup.Models.MabBackupJob System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2795,6 +2906,7 @@ public MabBackupJobExtendedInfo() { } public string DynamicErrorMessage { get { throw null; } set { } } public System.Collections.Generic.IDictionary PropertyBag { get { throw null; } } public System.Collections.Generic.IList TasksList { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.MabBackupJobExtendedInfo 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.RecoveryServicesBackup.Models.MabBackupJobExtendedInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2809,6 +2921,7 @@ public MabBackupJobTaskDetails() { } public System.DateTimeOffset? StartOn { get { throw null; } set { } } public string Status { get { throw null; } set { } } public string TaskId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.MabBackupJobTaskDetails 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.RecoveryServicesBackup.Models.MabBackupJobTaskDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2825,6 +2938,7 @@ public MabContainer() { } public Azure.ResourceManager.RecoveryServicesBackup.Models.MabContainerExtendedInfo ExtendedInfo { get { throw null; } set { } } public System.Collections.Generic.IList MabContainerHealthDetails { get { throw null; } } public long? ProtectedItemCount { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.MabContainer 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.RecoveryServicesBackup.Models.MabContainer System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2839,6 +2953,7 @@ public MabContainerExtendedInfo() { } public string LastBackupStatus { get { throw null; } set { } } public System.DateTimeOffset? LastRefreshedOn { get { throw null; } set { } } public string PolicyName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.MabContainerExtendedInfo 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.RecoveryServicesBackup.Models.MabContainerExtendedInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2852,6 +2967,7 @@ public MabContainerHealthDetails() { } public string Message { get { throw null; } set { } } public System.Collections.Generic.IList Recommendations { get { throw null; } } public string Title { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.MabContainerHealthDetails 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.RecoveryServicesBackup.Models.MabContainerHealthDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2863,6 +2979,7 @@ public partial class MabErrorInfo : System.ClientModel.Primitives.IJsonModel Recommendations { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.MabErrorInfo 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.RecoveryServicesBackup.Models.MabErrorInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2879,6 +2996,7 @@ public MabFileFolderProtectedItem() { } public System.DateTimeOffset? LastBackupOn { get { throw null; } set { } } public string LastBackupStatus { get { throw null; } set { } } public string ProtectionState { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.MabFileFolderProtectedItem 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.RecoveryServicesBackup.Models.MabFileFolderProtectedItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2891,6 +3009,7 @@ public MabFileFolderProtectedItemExtendedInfo() { } public System.DateTimeOffset? LastRefreshedOn { get { throw null; } set { } } public System.DateTimeOffset? OldestRecoverOn { get { throw null; } set { } } public int? RecoveryPointCount { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.MabFileFolderProtectedItemExtendedInfo 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.RecoveryServicesBackup.Models.MabFileFolderProtectedItemExtendedInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2902,6 +3021,7 @@ public partial class MabProtectionPolicy : Azure.ResourceManager.RecoveryService public MabProtectionPolicy() { } public Azure.ResourceManager.RecoveryServicesBackup.Models.BackupRetentionPolicy RetentionPolicy { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.BackupSchedulePolicy SchedulePolicy { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.MabProtectionPolicy 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.RecoveryServicesBackup.Models.MabProtectionPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2947,6 +3067,7 @@ public MonthlyRetentionSchedule() { } public Azure.ResourceManager.RecoveryServicesBackup.Models.RetentionScheduleFormat? RetentionScheduleFormatType { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.WeeklyRetentionFormat RetentionScheduleWeekly { get { throw null; } set { } } public System.Collections.Generic.IList RetentionTimes { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.MonthlyRetentionSchedule 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.RecoveryServicesBackup.Models.MonthlyRetentionSchedule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2959,6 +3080,7 @@ public MoveRPAcrossTiersContent() { } public string ObjectType { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.RecoveryPointTierType? SourceTierType { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.RecoveryPointTierType? TargetTierType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.MoveRPAcrossTiersContent 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.RecoveryServicesBackup.Models.MoveRPAcrossTiersContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2970,6 +3092,7 @@ public partial class PointInTimeRange : System.ClientModel.Primitives.IJsonModel public PointInTimeRange() { } public System.DateTimeOffset? EndOn { get { throw null; } set { } } public System.DateTimeOffset? StartOn { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.PointInTimeRange 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.RecoveryServicesBackup.Models.PointInTimeRange System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2982,6 +3105,7 @@ public PreBackupValidation() { } public string Code { get { throw null; } set { } } public string Message { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.InquiryStatus? Status { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.PreBackupValidation 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.RecoveryServicesBackup.Models.PreBackupValidation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2996,6 +3120,7 @@ public PrepareDataMoveContent(Azure.Core.ResourceIdentifier targetResourceId, Az public System.Collections.Generic.IList SourceContainerArmIds { get { throw null; } } public Azure.Core.AzureLocation TargetRegion { get { throw null; } } public Azure.Core.ResourceIdentifier TargetResourceId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.PrepareDataMoveContent 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.RecoveryServicesBackup.Models.PrepareDataMoveContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3009,6 +3134,7 @@ public PreValidateEnableBackupContent() { } public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.BackupDataSourceType? ResourceType { get { throw null; } set { } } public Azure.Core.ResourceIdentifier VaultId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.PreValidateEnableBackupContent 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.RecoveryServicesBackup.Models.PreValidateEnableBackupContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3024,6 +3150,7 @@ internal PreValidateEnableBackupResult() { } public string ProtectedItemName { get { throw null; } } public string Recommendation { get { throw null; } } public Azure.ResourceManager.RecoveryServicesBackup.Models.BackupValidationStatus? Status { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.PreValidateEnableBackupResult 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.RecoveryServicesBackup.Models.PreValidateEnableBackupResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3057,6 +3184,7 @@ protected ProtectableContainer() { } public string ContainerId { get { throw null; } set { } } public string FriendlyName { get { throw null; } set { } } public string HealthStatus { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.ProtectableContainer 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.RecoveryServicesBackup.Models.ProtectableContainer System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3068,6 +3196,7 @@ public partial class ProtectableContainerResource : Azure.ResourceManager.Models public ProtectableContainerResource(Azure.Core.AzureLocation location) { } public Azure.ETag? ETag { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.ProtectableContainer Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.ProtectableContainerResource 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.RecoveryServicesBackup.Models.ProtectableContainerResource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3102,6 +3231,7 @@ public partial class ProvisionIlrConnectionContent : Azure.ResourceManager.Model public ProvisionIlrConnectionContent(Azure.Core.AzureLocation location) { } public Azure.ETag? ETag { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.IlrContent Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.ProvisionIlrConnectionContent 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.RecoveryServicesBackup.Models.ProvisionIlrConnectionContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3137,6 +3267,7 @@ public RecoveryPointDiskConfiguration() { } public System.Collections.Generic.IList IncludedDiskList { get { throw null; } } public int? NumberOfDisksAttachedToVm { get { throw null; } set { } } public int? NumberOfDisksIncludedInBackup { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.RecoveryPointDiskConfiguration 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.RecoveryServicesBackup.Models.RecoveryPointDiskConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3148,6 +3279,7 @@ public partial class RecoveryPointMoveReadinessInfo : System.ClientModel.Primiti public RecoveryPointMoveReadinessInfo() { } public string AdditionalInfo { get { throw null; } set { } } public bool? IsReadyForMove { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.RecoveryPointMoveReadinessInfo 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.RecoveryServicesBackup.Models.RecoveryPointMoveReadinessInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3160,6 +3292,7 @@ public RecoveryPointProperties() { } public System.DateTimeOffset? ExpireOn { get { throw null; } set { } } public bool? IsSoftDeleted { get { throw null; } set { } } public string RuleName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.RecoveryPointProperties 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.RecoveryServicesBackup.Models.RecoveryPointProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3171,6 +3304,7 @@ public partial class RecoveryPointRehydrationInfo : System.ClientModel.Primitive public RecoveryPointRehydrationInfo() { } public Azure.ResourceManager.RecoveryServicesBackup.Models.RehydrationPriority? RehydrationPriority { get { throw null; } set { } } public System.TimeSpan? RehydrationRetentionDuration { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.RecoveryPointRehydrationInfo 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.RecoveryServicesBackup.Models.RecoveryPointRehydrationInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3182,6 +3316,7 @@ public partial class RecoveryPointsRecommendedForMoveContent : System.ClientMode public RecoveryPointsRecommendedForMoveContent() { } public System.Collections.Generic.IList ExcludedRPList { get { throw null; } } public string ObjectType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.RecoveryPointsRecommendedForMoveContent 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.RecoveryServicesBackup.Models.RecoveryPointsRecommendedForMoveContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3194,6 +3329,7 @@ public RecoveryPointTierInformation() { } public System.Collections.Generic.IDictionary ExtendedInfo { get { throw null; } } public Azure.ResourceManager.RecoveryServicesBackup.Models.RecoveryPointTierStatus? Status { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.RecoveryPointTierType? TierType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.RecoveryPointTierInformation 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.RecoveryServicesBackup.Models.RecoveryPointTierInformation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3203,6 +3339,7 @@ public RecoveryPointTierInformation() { } public partial class RecoveryPointTierInformationV2 : Azure.ResourceManager.RecoveryServicesBackup.Models.RecoveryPointTierInformation, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public RecoveryPointTierInformationV2() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.RecoveryPointTierInformationV2 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.RecoveryServicesBackup.Models.RecoveryPointTierInformationV2 System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3232,6 +3369,7 @@ public RecoveryServicesBackupPrivateLinkServiceConnectionState() { } public string ActionsRequired { get { throw null; } set { } } public string Description { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.PrivateEndpointConnectionStatus? Status { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.RecoveryServicesBackupPrivateLinkServiceConnectionState 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.RecoveryServicesBackup.Models.RecoveryServicesBackupPrivateLinkServiceConnectionState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3241,6 +3379,7 @@ public RecoveryServicesBackupPrivateLinkServiceConnectionState() { } public partial class RecoveryServiceVaultProtectionIntent : Azure.ResourceManager.RecoveryServicesBackup.Models.BackupGenericProtectionIntent, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public RecoveryServiceVaultProtectionIntent() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.RecoveryServiceVaultProtectionIntent 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.RecoveryServicesBackup.Models.RecoveryServiceVaultProtectionIntent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3270,6 +3409,7 @@ public partial class ResourceGuardOperationDetail : System.ClientModel.Primitive public ResourceGuardOperationDetail() { } public Azure.Core.ResourceIdentifier DefaultResourceId { get { throw null; } set { } } public string VaultCriticalOperation { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.ResourceGuardOperationDetail 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.RecoveryServicesBackup.Models.ResourceGuardOperationDetail System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3285,6 +3425,7 @@ public ResourceGuardProxyProperties(Azure.Core.ResourceIdentifier resourceGuardR public System.DateTimeOffset? LastUpdatedOn { get { throw null; } set { } } public System.Collections.Generic.IList ResourceGuardOperationDetails { get { throw null; } } public Azure.Core.ResourceIdentifier ResourceGuardResourceId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.ResourceGuardProxyProperties 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.RecoveryServicesBackup.Models.ResourceGuardProxyProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3298,6 +3439,7 @@ public ResourceHealthDetails() { } public string Message { get { throw null; } } public System.Collections.Generic.IReadOnlyList Recommendations { get { throw null; } } public string Title { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.ResourceHealthDetails 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.RecoveryServicesBackup.Models.ResourceHealthDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3330,6 +3472,7 @@ public partial class ResourceProtectionIntent : Azure.ResourceManager.RecoverySe { public ResourceProtectionIntent() { } public string FriendlyName { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.ResourceProtectionIntent 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.RecoveryServicesBackup.Models.ResourceProtectionIntent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3339,6 +3482,7 @@ public ResourceProtectionIntent() { } public abstract partial class RestoreContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { protected RestoreContent() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.RestoreContent 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.RecoveryServicesBackup.Models.RestoreContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3351,6 +3495,7 @@ public RestoreFileSpecs() { } public string FileSpecType { get { throw null; } set { } } public string Path { get { throw null; } set { } } public string TargetFolderPath { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.RestoreFileSpecs 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.RecoveryServicesBackup.Models.RestoreFileSpecs System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3404,6 +3549,7 @@ public partial class RetentionDuration : System.ClientModel.Primitives.IJsonMode public RetentionDuration() { } public int? Count { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.RetentionDurationType? DurationType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.RetentionDuration 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.RecoveryServicesBackup.Models.RetentionDuration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3474,6 +3620,7 @@ public partial class SecurityPinContent : System.ClientModel.Primitives.IJsonMod { public SecurityPinContent() { } public System.Collections.Generic.IList ResourceGuardOperationRequests { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.SecurityPinContent 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.RecoveryServicesBackup.Models.SecurityPinContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3484,6 +3631,7 @@ public partial class SimpleRetentionPolicy : Azure.ResourceManager.RecoveryServi { public SimpleRetentionPolicy() { } public Azure.ResourceManager.RecoveryServicesBackup.Models.RetentionDuration RetentionDuration { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.SimpleRetentionPolicy 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.RecoveryServicesBackup.Models.SimpleRetentionPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3498,6 +3646,7 @@ public SimpleSchedulePolicy() { } public Azure.ResourceManager.RecoveryServicesBackup.Models.ScheduleRunType? ScheduleRunFrequency { get { throw null; } set { } } public System.Collections.Generic.IList ScheduleRunTimes { get { throw null; } } public int? ScheduleWeeklyFrequency { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.SimpleSchedulePolicy 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.RecoveryServicesBackup.Models.SimpleSchedulePolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3511,6 +3660,7 @@ public SimpleSchedulePolicyV2() { } public Azure.ResourceManager.RecoveryServicesBackup.Models.ScheduleRunType? ScheduleRunFrequency { get { throw null; } set { } } public System.Collections.Generic.IList ScheduleRunTimes { get { throw null; } } public Azure.ResourceManager.RecoveryServicesBackup.Models.BackupWeeklySchedule WeeklySchedule { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.SimpleSchedulePolicyV2 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.RecoveryServicesBackup.Models.SimpleSchedulePolicyV2 System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3523,6 +3673,7 @@ public SnapshotBackupAdditionalDetails() { } public string InstantRPDetails { get { throw null; } set { } } public int? InstantRpRetentionRangeInDays { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.UserAssignedManagedIdentityDetails UserAssignedManagedIdentityDetails { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.SnapshotBackupAdditionalDetails 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.RecoveryServicesBackup.Models.SnapshotBackupAdditionalDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3534,6 +3685,7 @@ public partial class SnapshotRestoreContent : System.ClientModel.Primitives.IJso public SnapshotRestoreContent() { } public string LogPointInTimeForDBRecovery { get { throw null; } set { } } public bool? SkipAttachAndMount { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.SnapshotRestoreContent 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.RecoveryServicesBackup.Models.SnapshotRestoreContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3563,6 +3715,7 @@ public SnapshotRestoreContent() { } public partial class SqlAvailabilityGroupWorkloadProtectionContainer : Azure.ResourceManager.RecoveryServicesBackup.Models.WorkloadContainer, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public SqlAvailabilityGroupWorkloadProtectionContainer() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.SqlAvailabilityGroupWorkloadProtectionContainer 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.RecoveryServicesBackup.Models.SqlAvailabilityGroupWorkloadProtectionContainer System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3572,6 +3725,7 @@ public SqlAvailabilityGroupWorkloadProtectionContainer() { } public partial class SqlContainer : Azure.ResourceManager.RecoveryServicesBackup.Models.BackupGenericProtectionContainer, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public SqlContainer() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.SqlContainer 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.RecoveryServicesBackup.Models.SqlContainer System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3584,6 +3738,7 @@ public SqlDataDirectory() { } public Azure.ResourceManager.RecoveryServicesBackup.Models.SqlDataDirectoryType? DirectoryType { get { throw null; } set { } } public string LogicalName { get { throw null; } set { } } public string Path { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.SqlDataDirectory 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.RecoveryServicesBackup.Models.SqlDataDirectory System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3597,6 +3752,7 @@ public SqlDataDirectoryMapping() { } public string SourceLogicalName { get { throw null; } set { } } public string SourcePath { get { throw null; } set { } } public string TargetPath { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.SqlDataDirectoryMapping 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.RecoveryServicesBackup.Models.SqlDataDirectoryMapping System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3628,6 +3784,7 @@ public SqlProtectedItem() { } public Azure.ResourceManager.RecoveryServicesBackup.Models.SqlProtectedItemExtendedInfo ExtendedInfo { get { throw null; } set { } } public string ProtectedItemDataId { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.ProtectedItemState? ProtectionState { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.SqlProtectedItem 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.RecoveryServicesBackup.Models.SqlProtectedItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3640,6 +3797,7 @@ public SqlProtectedItemExtendedInfo() { } public System.DateTimeOffset? OldestRecoverOn { get { throw null; } set { } } public string PolicyState { get { throw null; } set { } } public int? RecoveryPointCount { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.SqlProtectedItemExtendedInfo 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.RecoveryServicesBackup.Models.SqlProtectedItemExtendedInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3650,6 +3808,7 @@ public partial class SqlProtectionPolicy : Azure.ResourceManager.RecoveryService { public SqlProtectionPolicy() { } public Azure.ResourceManager.RecoveryServicesBackup.Models.BackupRetentionPolicy RetentionPolicy { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.SqlProtectionPolicy 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.RecoveryServicesBackup.Models.SqlProtectionPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3666,6 +3825,7 @@ public StorageBackupJob() { } public bool? IsUserTriggered { get { throw null; } set { } } public string StorageAccountName { get { throw null; } set { } } public string StorageAccountVersion { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.StorageBackupJob 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.RecoveryServicesBackup.Models.StorageBackupJob System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3678,6 +3838,7 @@ public StorageBackupJobExtendedInfo() { } public string DynamicErrorMessage { get { throw null; } set { } } public System.Collections.Generic.IDictionary PropertyBag { get { throw null; } } public System.Collections.Generic.IList TasksList { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.StorageBackupJobExtendedInfo 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.RecoveryServicesBackup.Models.StorageBackupJobExtendedInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3689,6 +3850,7 @@ public partial class StorageBackupJobTaskDetails : System.ClientModel.Primitives public StorageBackupJobTaskDetails() { } public string Status { get { throw null; } set { } } public string TaskId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.StorageBackupJobTaskDetails 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.RecoveryServicesBackup.Models.StorageBackupJobTaskDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3703,6 +3865,7 @@ public StorageContainer() { } public string ResourceGroup { get { throw null; } set { } } public Azure.Core.ResourceIdentifier SourceResourceId { get { throw null; } set { } } public string StorageAccountVersion { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.StorageContainer 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.RecoveryServicesBackup.Models.StorageContainer System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3715,6 +3878,7 @@ public StorageErrorInfo() { } public int? ErrorCode { get { throw null; } set { } } public string ErrorString { get { throw null; } set { } } public System.Collections.Generic.IList Recommendations { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.StorageErrorInfo 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.RecoveryServicesBackup.Models.StorageErrorInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3724,6 +3888,7 @@ public StorageErrorInfo() { } public partial class StorageProtectableContainer : Azure.ResourceManager.RecoveryServicesBackup.Models.ProtectableContainer, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public StorageProtectableContainer() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.StorageProtectableContainer 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.RecoveryServicesBackup.Models.StorageProtectableContainer System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3738,6 +3903,7 @@ public SubProtectionPolicy() { } public Azure.ResourceManager.RecoveryServicesBackup.Models.BackupSchedulePolicy SchedulePolicy { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.SnapshotBackupAdditionalDetails SnapshotBackupAdditionalDetails { get { throw null; } set { } } public System.Collections.Generic.IDictionary TieringPolicy { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.SubProtectionPolicy 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.RecoveryServicesBackup.Models.SubProtectionPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3773,6 +3939,7 @@ public partial class TargetAfsRestoreInfo : System.ClientModel.Primitives.IJsonM public TargetAfsRestoreInfo() { } public string Name { get { throw null; } set { } } public Azure.Core.ResourceIdentifier TargetResourceId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.TargetAfsRestoreInfo 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.RecoveryServicesBackup.Models.TargetAfsRestoreInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3786,6 +3953,7 @@ public TargetRestoreInfo() { } public string DatabaseName { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.RestoreOverwriteOption? OverwriteOption { get { throw null; } set { } } public string TargetDirectoryForFileRestore { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.TargetRestoreInfo 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.RecoveryServicesBackup.Models.TargetRestoreInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3795,6 +3963,7 @@ public TargetRestoreInfo() { } public abstract partial class TieringCostInfo : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { protected TieringCostInfo() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.TieringCostInfo 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.RecoveryServicesBackup.Models.TieringCostInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3806,6 +3975,7 @@ public partial class TieringCostRehydrationInfo : Azure.ResourceManager.Recovery internal TieringCostRehydrationInfo() { } public long RehydrationSizeInBytes { get { throw null; } } public double RetailRehydrationCostPerGBPerMonth { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.TieringCostRehydrationInfo 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.RecoveryServicesBackup.Models.TieringCostRehydrationInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3819,6 +3989,7 @@ internal TieringCostSavingInfo() { } public double RetailTargetTierCostPerGBPerMonth { get { throw null; } } public long SourceTierSizeReductionInBytes { get { throw null; } } public long TargetTierSizeIncreaseInBytes { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.TieringCostSavingInfo 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.RecoveryServicesBackup.Models.TieringCostSavingInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3851,6 +4022,7 @@ internal TokenInformation() { } public long? ExpiryTimeInUtcTicks { get { throw null; } } public string SecurityPin { get { throw null; } } public string Token { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.TokenInformation 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.RecoveryServicesBackup.Models.TokenInformation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3862,6 +4034,7 @@ public partial class TriggerBackupContent : Azure.ResourceManager.Models.Tracked public TriggerBackupContent(Azure.Core.AzureLocation location) { } public Azure.ETag? ETag { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.BackupContent Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.TriggerBackupContent 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.RecoveryServicesBackup.Models.TriggerBackupContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3877,6 +4050,7 @@ public TriggerDataMoveContent(Azure.Core.ResourceIdentifier sourceResourceId, Az public System.Collections.Generic.IList SourceContainerArmIds { get { throw null; } } public Azure.Core.AzureLocation SourceRegion { get { throw null; } } public Azure.Core.ResourceIdentifier SourceResourceId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.TriggerDataMoveContent 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.RecoveryServicesBackup.Models.TriggerDataMoveContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3888,6 +4062,7 @@ public partial class TriggerRestoreContent : Azure.ResourceManager.Models.Tracke public TriggerRestoreContent(Azure.Core.AzureLocation location) { } public Azure.ETag? ETag { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.RestoreContent Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.TriggerRestoreContent 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.RecoveryServicesBackup.Models.TriggerRestoreContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3899,6 +4074,7 @@ public partial class UnlockDeleteContent : System.ClientModel.Primitives.IJsonMo public UnlockDeleteContent() { } public System.Collections.Generic.IList ResourceGuardOperationRequests { get { throw null; } } public string ResourceToBeDeleted { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.UnlockDeleteContent 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.RecoveryServicesBackup.Models.UnlockDeleteContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3909,6 +4085,7 @@ public partial class UnlockDeleteResult : System.ClientModel.Primitives.IJsonMod { internal UnlockDeleteResult() { } public System.DateTimeOffset? UnlockDeleteExpireOn { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.UnlockDeleteResult 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.RecoveryServicesBackup.Models.UnlockDeleteResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3921,6 +4098,7 @@ public UserAssignedManagedIdentityDetails() { } public string IdentityArmId { get { throw null; } set { } } public string IdentityName { get { throw null; } set { } } public Azure.ResourceManager.Models.UserAssignedIdentity UserAssignedIdentityProperties { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.UserAssignedManagedIdentityDetails 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.RecoveryServicesBackup.Models.UserAssignedManagedIdentityDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3934,6 +4112,7 @@ public VaultBackupJob() { } public System.TimeSpan? Duration { get { throw null; } set { } } public System.Collections.Generic.IList ErrorDetails { get { throw null; } } public System.Collections.Generic.IDictionary ExtendedInfoPropertyBag { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.VaultBackupJob 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.RecoveryServicesBackup.Models.VaultBackupJob System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3946,6 +4125,7 @@ public VaultBackupJobErrorInfo() { } public int? ErrorCode { get { throw null; } set { } } public string ErrorString { get { throw null; } set { } } public System.Collections.Generic.IList Recommendations { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.VaultBackupJobErrorInfo 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.RecoveryServicesBackup.Models.VaultBackupJobErrorInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3976,6 +4156,7 @@ public partial class VaultRetentionPolicy : System.ClientModel.Primitives.IJsonM public VaultRetentionPolicy(Azure.ResourceManager.RecoveryServicesBackup.Models.BackupRetentionPolicy vaultRetention, int snapshotRetentionInDays) { } public int SnapshotRetentionInDays { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.BackupRetentionPolicy VaultRetention { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.VaultRetentionPolicy 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.RecoveryServicesBackup.Models.VaultRetentionPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4023,6 +4204,7 @@ public VaultRetentionPolicy(Azure.ResourceManager.RecoveryServicesBackup.Models. public partial class VmAppContainerProtectableContainer : Azure.ResourceManager.RecoveryServicesBackup.Models.ProtectableContainer, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public VmAppContainerProtectableContainer() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.VmAppContainerProtectableContainer 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.RecoveryServicesBackup.Models.VmAppContainerProtectableContainer System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4032,6 +4214,7 @@ public VmAppContainerProtectableContainer() { } public partial class VmAppContainerProtectionContainer : Azure.ResourceManager.RecoveryServicesBackup.Models.WorkloadContainer, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public VmAppContainerProtectionContainer() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.VmAppContainerProtectionContainer 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.RecoveryServicesBackup.Models.VmAppContainerProtectionContainer System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4046,6 +4229,7 @@ public VmEncryptionDetails() { } public Azure.Core.ResourceIdentifier KekVaultId { get { throw null; } set { } } public System.Uri SecretKeyUri { get { throw null; } set { } } public Azure.Core.ResourceIdentifier SecretKeyVaultId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.VmEncryptionDetails 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.RecoveryServicesBackup.Models.VmEncryptionDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4057,6 +4241,7 @@ public partial class VmResourceFeatureSupportContent : Azure.ResourceManager.Rec public VmResourceFeatureSupportContent() { } public string VmSize { get { throw null; } set { } } public string VmSku { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.VmResourceFeatureSupportContent 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.RecoveryServicesBackup.Models.VmResourceFeatureSupportContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4067,6 +4252,7 @@ public partial class VmResourceFeatureSupportResult : System.ClientModel.Primiti { internal VmResourceFeatureSupportResult() { } public Azure.ResourceManager.RecoveryServicesBackup.Models.VmResourceFeatureSupportStatus? SupportStatus { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.VmResourceFeatureSupportResult 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.RecoveryServicesBackup.Models.VmResourceFeatureSupportResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4102,6 +4288,7 @@ public VmWorkloadItem() { } public string ServerName { get { throw null; } set { } } public int? SubInquiredItemCount { get { throw null; } set { } } public int? SubWorkloadItemCount { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.VmWorkloadItem 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.RecoveryServicesBackup.Models.VmWorkloadItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4120,6 +4307,7 @@ public VmWorkloadProtectableItem() { } public string ServerName { get { throw null; } set { } } public int? SubInquiredItemCount { get { throw null; } set { } } public int? SubProtectableItemCount { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.VmWorkloadProtectableItem 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.RecoveryServicesBackup.Models.VmWorkloadProtectableItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4143,6 +4331,7 @@ public VmWorkloadProtectedItem() { } public Azure.ResourceManager.RecoveryServicesBackup.Models.BackupProtectionState? ProtectionState { get { throw null; } set { } } public string ProtectionStatus { get { throw null; } } public string ServerName { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.VmWorkloadProtectedItem 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.RecoveryServicesBackup.Models.VmWorkloadProtectedItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4159,6 +4348,7 @@ public VmWorkloadProtectedItemExtendedInfo() { } public string PolicyState { get { throw null; } set { } } public string RecoveryModel { get { throw null; } set { } } public int? RecoveryPointCount { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.VmWorkloadProtectedItemExtendedInfo 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.RecoveryServicesBackup.Models.VmWorkloadProtectedItemExtendedInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4193,6 +4383,7 @@ public VmWorkloadProtectionPolicy() { } public Azure.ResourceManager.RecoveryServicesBackup.Models.BackupCommonSettings Settings { get { throw null; } set { } } public System.Collections.Generic.IList SubProtectionPolicy { get { throw null; } } public Azure.ResourceManager.RecoveryServicesBackup.Models.BackupWorkloadType? WorkLoadType { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.VmWorkloadProtectionPolicy 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.RecoveryServicesBackup.Models.VmWorkloadProtectionPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4202,6 +4393,7 @@ public VmWorkloadProtectionPolicy() { } public partial class VmWorkloadSapAseDatabaseProtectedItem : Azure.ResourceManager.RecoveryServicesBackup.Models.VmWorkloadProtectedItem, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public VmWorkloadSapAseDatabaseProtectedItem() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.VmWorkloadSapAseDatabaseProtectedItem 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.RecoveryServicesBackup.Models.VmWorkloadSapAseDatabaseProtectedItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4211,6 +4403,7 @@ public VmWorkloadSapAseDatabaseProtectedItem() { } public partial class VmWorkloadSapAseDatabaseWorkloadItem : Azure.ResourceManager.RecoveryServicesBackup.Models.VmWorkloadItem, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public VmWorkloadSapAseDatabaseWorkloadItem() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.VmWorkloadSapAseDatabaseWorkloadItem 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.RecoveryServicesBackup.Models.VmWorkloadSapAseDatabaseWorkloadItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4220,6 +4413,7 @@ public VmWorkloadSapAseDatabaseWorkloadItem() { } public partial class VmWorkloadSapAseSystemProtectableItem : Azure.ResourceManager.RecoveryServicesBackup.Models.VmWorkloadProtectableItem, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public VmWorkloadSapAseSystemProtectableItem() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.VmWorkloadSapAseSystemProtectableItem 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.RecoveryServicesBackup.Models.VmWorkloadSapAseSystemProtectableItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4229,6 +4423,7 @@ public VmWorkloadSapAseSystemProtectableItem() { } public partial class VmWorkloadSapAseSystemWorkloadItem : Azure.ResourceManager.RecoveryServicesBackup.Models.VmWorkloadItem, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public VmWorkloadSapAseSystemWorkloadItem() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.VmWorkloadSapAseSystemWorkloadItem 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.RecoveryServicesBackup.Models.VmWorkloadSapAseSystemWorkloadItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4238,6 +4433,7 @@ public VmWorkloadSapAseSystemWorkloadItem() { } public partial class VmWorkloadSapHanaDatabaseProtectableItem : Azure.ResourceManager.RecoveryServicesBackup.Models.VmWorkloadProtectableItem, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public VmWorkloadSapHanaDatabaseProtectableItem() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.VmWorkloadSapHanaDatabaseProtectableItem 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.RecoveryServicesBackup.Models.VmWorkloadSapHanaDatabaseProtectableItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4247,6 +4443,7 @@ public VmWorkloadSapHanaDatabaseProtectableItem() { } public partial class VmWorkloadSapHanaDatabaseProtectedItem : Azure.ResourceManager.RecoveryServicesBackup.Models.VmWorkloadProtectedItem, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public VmWorkloadSapHanaDatabaseProtectedItem() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.VmWorkloadSapHanaDatabaseProtectedItem 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.RecoveryServicesBackup.Models.VmWorkloadSapHanaDatabaseProtectedItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4256,6 +4453,7 @@ public VmWorkloadSapHanaDatabaseProtectedItem() { } public partial class VmWorkloadSapHanaDatabaseWorkloadItem : Azure.ResourceManager.RecoveryServicesBackup.Models.VmWorkloadItem, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public VmWorkloadSapHanaDatabaseWorkloadItem() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.VmWorkloadSapHanaDatabaseWorkloadItem 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.RecoveryServicesBackup.Models.VmWorkloadSapHanaDatabaseWorkloadItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4265,6 +4463,7 @@ public VmWorkloadSapHanaDatabaseWorkloadItem() { } public partial class VmWorkloadSapHanaDBInstance : Azure.ResourceManager.RecoveryServicesBackup.Models.VmWorkloadProtectableItem, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public VmWorkloadSapHanaDBInstance() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.VmWorkloadSapHanaDBInstance 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.RecoveryServicesBackup.Models.VmWorkloadSapHanaDBInstance System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4274,6 +4473,7 @@ public VmWorkloadSapHanaDBInstance() { } public partial class VmWorkloadSapHanaDBInstanceProtectedItem : Azure.ResourceManager.RecoveryServicesBackup.Models.VmWorkloadProtectedItem, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public VmWorkloadSapHanaDBInstanceProtectedItem() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.VmWorkloadSapHanaDBInstanceProtectedItem 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.RecoveryServicesBackup.Models.VmWorkloadSapHanaDBInstanceProtectedItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4288,6 +4488,7 @@ public VmWorkloadSapHanaHsr() { } public partial class VmWorkloadSapHanaHsrProtectableItem : Azure.ResourceManager.RecoveryServicesBackup.Models.VmWorkloadProtectableItem, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public VmWorkloadSapHanaHsrProtectableItem() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.VmWorkloadSapHanaHsrProtectableItem 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.RecoveryServicesBackup.Models.VmWorkloadSapHanaHsrProtectableItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4297,6 +4498,7 @@ public VmWorkloadSapHanaHsrProtectableItem() { } public partial class VmWorkloadSapHanaSystemProtectableItem : Azure.ResourceManager.RecoveryServicesBackup.Models.VmWorkloadProtectableItem, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public VmWorkloadSapHanaSystemProtectableItem() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.VmWorkloadSapHanaSystemProtectableItem 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.RecoveryServicesBackup.Models.VmWorkloadSapHanaSystemProtectableItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4306,6 +4508,7 @@ public VmWorkloadSapHanaSystemProtectableItem() { } public partial class VmWorkloadSapHanaSystemWorkloadItem : Azure.ResourceManager.RecoveryServicesBackup.Models.VmWorkloadItem, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public VmWorkloadSapHanaSystemWorkloadItem() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.VmWorkloadSapHanaSystemWorkloadItem 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.RecoveryServicesBackup.Models.VmWorkloadSapHanaSystemWorkloadItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4316,6 +4519,7 @@ public partial class VmWorkloadSqlAvailabilityGroupProtectableItem : Azure.Resou { public VmWorkloadSqlAvailabilityGroupProtectableItem() { } public System.Collections.Generic.IList NodesList { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.VmWorkloadSqlAvailabilityGroupProtectableItem 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.RecoveryServicesBackup.Models.VmWorkloadSqlAvailabilityGroupProtectableItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4325,6 +4529,7 @@ public VmWorkloadSqlAvailabilityGroupProtectableItem() { } public partial class VmWorkloadSqlDatabaseProtectableItem : Azure.ResourceManager.RecoveryServicesBackup.Models.VmWorkloadProtectableItem, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public VmWorkloadSqlDatabaseProtectableItem() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.VmWorkloadSqlDatabaseProtectableItem 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.RecoveryServicesBackup.Models.VmWorkloadSqlDatabaseProtectableItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4334,6 +4539,7 @@ public VmWorkloadSqlDatabaseProtectableItem() { } public partial class VmWorkloadSqlDatabaseProtectedItem : Azure.ResourceManager.RecoveryServicesBackup.Models.VmWorkloadProtectedItem, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public VmWorkloadSqlDatabaseProtectedItem() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.VmWorkloadSqlDatabaseProtectedItem 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.RecoveryServicesBackup.Models.VmWorkloadSqlDatabaseProtectedItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4343,6 +4549,7 @@ public VmWorkloadSqlDatabaseProtectedItem() { } public partial class VmWorkloadSqlDatabaseWorkloadItem : Azure.ResourceManager.RecoveryServicesBackup.Models.VmWorkloadItem, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public VmWorkloadSqlDatabaseWorkloadItem() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.VmWorkloadSqlDatabaseWorkloadItem 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.RecoveryServicesBackup.Models.VmWorkloadSqlDatabaseWorkloadItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4352,6 +4559,7 @@ public VmWorkloadSqlDatabaseWorkloadItem() { } public partial class VmWorkloadSqlInstanceProtectableItem : Azure.ResourceManager.RecoveryServicesBackup.Models.VmWorkloadProtectableItem, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public VmWorkloadSqlInstanceProtectableItem() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.VmWorkloadSqlInstanceProtectableItem 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.RecoveryServicesBackup.Models.VmWorkloadSqlInstanceProtectableItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4362,6 +4570,7 @@ public partial class VmWorkloadSqlInstanceWorkloadItem : Azure.ResourceManager.R { public VmWorkloadSqlInstanceWorkloadItem() { } public System.Collections.Generic.IList DataDirectoryPaths { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.VmWorkloadSqlInstanceWorkloadItem 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.RecoveryServicesBackup.Models.VmWorkloadSqlInstanceWorkloadItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4373,6 +4582,7 @@ public partial class WeeklyRetentionFormat : System.ClientModel.Primitives.IJson public WeeklyRetentionFormat() { } public System.Collections.Generic.IList DaysOfTheWeek { get { throw null; } } public System.Collections.Generic.IList WeeksOfTheMonth { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.WeeklyRetentionFormat 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.RecoveryServicesBackup.Models.WeeklyRetentionFormat System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4385,6 +4595,7 @@ public WeeklyRetentionSchedule() { } public System.Collections.Generic.IList DaysOfTheWeek { get { throw null; } } public Azure.ResourceManager.RecoveryServicesBackup.Models.RetentionDuration RetentionDuration { get { throw null; } set { } } public System.Collections.Generic.IList RetentionTimes { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.WeeklyRetentionSchedule 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.RecoveryServicesBackup.Models.WeeklyRetentionSchedule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4394,6 +4605,7 @@ public WeeklyRetentionSchedule() { } public partial class WorkloadAutoProtectionIntent : Azure.ResourceManager.RecoveryServicesBackup.Models.RecoveryServiceVaultProtectionIntent, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public WorkloadAutoProtectionIntent() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.WorkloadAutoProtectionIntent 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.RecoveryServicesBackup.Models.WorkloadAutoProtectionIntent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4406,6 +4618,7 @@ public WorkloadBackupContent() { } public Azure.ResourceManager.RecoveryServicesBackup.Models.BackupType? BackupType { get { throw null; } set { } } public bool? EnableCompression { get { throw null; } set { } } public System.DateTimeOffset? RecoveryPointExpireOn { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.WorkloadBackupContent 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.RecoveryServicesBackup.Models.WorkloadBackupContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4420,6 +4633,7 @@ public WorkloadBackupJob() { } public System.Collections.Generic.IList ErrorDetails { get { throw null; } } public Azure.ResourceManager.RecoveryServicesBackup.Models.WorkloadBackupJobExtendedInfo ExtendedInfo { get { throw null; } set { } } public string WorkloadType { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.WorkloadBackupJob 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.RecoveryServicesBackup.Models.WorkloadBackupJob System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4432,6 +4646,7 @@ public WorkloadBackupJobExtendedInfo() { } public string DynamicErrorMessage { get { throw null; } set { } } public System.Collections.Generic.IDictionary PropertyBag { get { throw null; } } public System.Collections.Generic.IList TasksList { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.WorkloadBackupJobExtendedInfo 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.RecoveryServicesBackup.Models.WorkloadBackupJobExtendedInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4443,6 +4658,7 @@ public partial class WorkloadBackupJobTaskDetails : System.ClientModel.Primitive public WorkloadBackupJobTaskDetails() { } public string Status { get { throw null; } set { } } public string TaskId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.WorkloadBackupJobTaskDetails 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.RecoveryServicesBackup.Models.WorkloadBackupJobTaskDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4457,6 +4673,7 @@ public WorkloadContainer() { } public Azure.ResourceManager.RecoveryServicesBackup.Models.WorkloadOperationType? OperationType { get { throw null; } set { } } public Azure.Core.ResourceIdentifier SourceResourceId { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.BackupWorkloadType? WorkloadType { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.WorkloadContainer 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.RecoveryServicesBackup.Models.WorkloadContainer System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4466,6 +4683,7 @@ public WorkloadContainer() { } public partial class WorkloadContainerAutoProtectionIntent : Azure.ResourceManager.RecoveryServicesBackup.Models.BackupGenericProtectionIntent, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public WorkloadContainerAutoProtectionIntent() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.WorkloadContainerAutoProtectionIntent 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.RecoveryServicesBackup.Models.WorkloadContainerAutoProtectionIntent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4478,6 +4696,7 @@ public WorkloadContainerExtendedInfo() { } public string HostServerName { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.WorkloadContainerInquiryInfo InquiryInfo { get { throw null; } set { } } public System.Collections.Generic.IList NodesList { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.WorkloadContainerExtendedInfo 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.RecoveryServicesBackup.Models.WorkloadContainerExtendedInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4490,6 +4709,7 @@ public WorkloadContainerInquiryInfo() { } public Azure.ResourceManager.RecoveryServicesBackup.Models.BackupErrorDetail ErrorDetail { get { throw null; } set { } } public System.Collections.Generic.IList InquiryDetails { get { throw null; } } public string Status { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.WorkloadContainerInquiryInfo 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.RecoveryServicesBackup.Models.WorkloadContainerInquiryInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4504,6 +4724,7 @@ public WorkloadErrorInfo() { } public string ErrorString { get { throw null; } set { } } public string ErrorTitle { get { throw null; } set { } } public System.Collections.Generic.IList Recommendations { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.WorkloadErrorInfo 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.RecoveryServicesBackup.Models.WorkloadErrorInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4516,6 +4737,7 @@ public WorkloadInquiryDetails() { } public Azure.ResourceManager.RecoveryServicesBackup.Models.InquiryValidation InquiryValidation { get { throw null; } set { } } public long? ItemCount { get { throw null; } set { } } public string WorkloadInquiryDetailsType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.WorkloadInquiryDetails 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.RecoveryServicesBackup.Models.WorkloadInquiryDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4529,6 +4751,7 @@ protected WorkloadItem() { } public string FriendlyName { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.BackupProtectionStatus? ProtectionState { get { throw null; } set { } } public string WorkloadType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.WorkloadItem 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.RecoveryServicesBackup.Models.WorkloadItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4540,6 +4763,7 @@ public partial class WorkloadItemResource : Azure.ResourceManager.Models.Tracked public WorkloadItemResource(Azure.Core.AzureLocation location) { } public Azure.ETag? ETag { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.WorkloadItem Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.WorkloadItemResource 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.RecoveryServicesBackup.Models.WorkloadItemResource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4593,6 +4817,7 @@ public partial class WorkloadPointInTimeRecoveryPoint : Azure.ResourceManager.Re { public WorkloadPointInTimeRecoveryPoint() { } public System.Collections.Generic.IList TimeRanges { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.WorkloadPointInTimeRecoveryPoint 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.RecoveryServicesBackup.Models.WorkloadPointInTimeRecoveryPoint System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4603,6 +4828,7 @@ public partial class WorkloadPointInTimeRestoreContent : Azure.ResourceManager.R { public WorkloadPointInTimeRestoreContent() { } public System.DateTimeOffset? PointInTime { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.WorkloadPointInTimeRestoreContent 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.RecoveryServicesBackup.Models.WorkloadPointInTimeRestoreContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4616,6 +4842,7 @@ protected WorkloadProtectableItem() { } public string FriendlyName { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.BackupProtectionStatus? ProtectionState { get { throw null; } set { } } public string WorkloadType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.WorkloadProtectableItem 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.RecoveryServicesBackup.Models.WorkloadProtectableItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4627,6 +4854,7 @@ public partial class WorkloadProtectableItemResource : Azure.ResourceManager.Mod public WorkloadProtectableItemResource(Azure.Core.AzureLocation location) { } public Azure.ETag? ETag { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.WorkloadProtectableItem Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.WorkloadProtectableItemResource 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.RecoveryServicesBackup.Models.WorkloadProtectableItemResource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4641,6 +4869,7 @@ public WorkloadRecoveryPoint() { } public Azure.ResourceManager.RecoveryServicesBackup.Models.RecoveryPointProperties RecoveryPointProperties { get { throw null; } set { } } public System.Collections.Generic.IList RecoveryPointTierDetails { get { throw null; } } public Azure.ResourceManager.RecoveryServicesBackup.Models.RestorePointType? RestorePointType { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.WorkloadRecoveryPoint 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.RecoveryServicesBackup.Models.WorkloadRecoveryPoint System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4659,6 +4888,7 @@ public WorkloadRestoreContent() { } public string TargetResourceGroupName { get { throw null; } set { } } public Azure.Core.ResourceIdentifier TargetVirtualMachineId { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.UserAssignedManagedIdentityDetails UserAssignedManagedIdentityDetails { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.WorkloadRestoreContent 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.RecoveryServicesBackup.Models.WorkloadRestoreContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4668,6 +4898,7 @@ public WorkloadRestoreContent() { } public partial class WorkloadSapHanaPointInTimeRecoveryPoint : Azure.ResourceManager.RecoveryServicesBackup.Models.WorkloadPointInTimeRecoveryPoint, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public WorkloadSapHanaPointInTimeRecoveryPoint() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.WorkloadSapHanaPointInTimeRecoveryPoint 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.RecoveryServicesBackup.Models.WorkloadSapHanaPointInTimeRecoveryPoint System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4678,6 +4909,7 @@ public partial class WorkloadSapHanaPointInTimeRestoreContent : Azure.ResourceMa { public WorkloadSapHanaPointInTimeRestoreContent() { } public System.DateTimeOffset? PointInTime { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.WorkloadSapHanaPointInTimeRestoreContent 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.RecoveryServicesBackup.Models.WorkloadSapHanaPointInTimeRestoreContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4688,6 +4920,7 @@ public partial class WorkloadSapHanaPointInTimeRestoreWithRehydrateContent : Azu { public WorkloadSapHanaPointInTimeRestoreWithRehydrateContent() { } public Azure.ResourceManager.RecoveryServicesBackup.Models.RecoveryPointRehydrationInfo RecoveryPointRehydrationInfo { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.WorkloadSapHanaPointInTimeRestoreWithRehydrateContent 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.RecoveryServicesBackup.Models.WorkloadSapHanaPointInTimeRestoreWithRehydrateContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4697,6 +4930,7 @@ public WorkloadSapHanaPointInTimeRestoreWithRehydrateContent() { } public partial class WorkloadSapHanaRecoveryPoint : Azure.ResourceManager.RecoveryServicesBackup.Models.WorkloadRecoveryPoint, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public WorkloadSapHanaRecoveryPoint() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.WorkloadSapHanaRecoveryPoint 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.RecoveryServicesBackup.Models.WorkloadSapHanaRecoveryPoint System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4706,6 +4940,7 @@ public WorkloadSapHanaRecoveryPoint() { } public partial class WorkloadSapHanaRestoreContent : Azure.ResourceManager.RecoveryServicesBackup.Models.WorkloadRestoreContent, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public WorkloadSapHanaRestoreContent() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.WorkloadSapHanaRestoreContent 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.RecoveryServicesBackup.Models.WorkloadSapHanaRestoreContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4716,6 +4951,7 @@ public partial class WorkloadSapHanaRestoreWithRehydrateContent : Azure.Resource { public WorkloadSapHanaRestoreWithRehydrateContent() { } public Azure.ResourceManager.RecoveryServicesBackup.Models.RecoveryPointRehydrationInfo RecoveryPointRehydrationInfo { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.WorkloadSapHanaRestoreWithRehydrateContent 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.RecoveryServicesBackup.Models.WorkloadSapHanaRestoreWithRehydrateContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4726,6 +4962,7 @@ public partial class WorkloadSqlAutoProtectionIntent : Azure.ResourceManager.Rec { public WorkloadSqlAutoProtectionIntent() { } public Azure.ResourceManager.RecoveryServicesBackup.Models.WorkloadItemType? WorkloadItemType { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.WorkloadSqlAutoProtectionIntent 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.RecoveryServicesBackup.Models.WorkloadSqlAutoProtectionIntent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4736,6 +4973,7 @@ public partial class WorkloadSqlPointInTimeRecoveryPoint : Azure.ResourceManager { public WorkloadSqlPointInTimeRecoveryPoint() { } public System.Collections.Generic.IList TimeRanges { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.WorkloadSqlPointInTimeRecoveryPoint 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.RecoveryServicesBackup.Models.WorkloadSqlPointInTimeRecoveryPoint System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4746,6 +4984,7 @@ public partial class WorkloadSqlPointInTimeRestoreContent : Azure.ResourceManage { public WorkloadSqlPointInTimeRestoreContent() { } public System.DateTimeOffset? PointInTime { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.WorkloadSqlPointInTimeRestoreContent 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.RecoveryServicesBackup.Models.WorkloadSqlPointInTimeRestoreContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4756,6 +4995,7 @@ public partial class WorkloadSqlPointInTimeRestoreWithRehydrateContent : Azure.R { public WorkloadSqlPointInTimeRestoreWithRehydrateContent() { } public Azure.ResourceManager.RecoveryServicesBackup.Models.RecoveryPointRehydrationInfo RecoveryPointRehydrationInfo { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.WorkloadSqlPointInTimeRestoreWithRehydrateContent 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.RecoveryServicesBackup.Models.WorkloadSqlPointInTimeRestoreWithRehydrateContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4766,6 +5006,7 @@ public partial class WorkloadSqlRecoveryPoint : Azure.ResourceManager.RecoverySe { public WorkloadSqlRecoveryPoint() { } public Azure.ResourceManager.RecoveryServicesBackup.Models.WorkloadSqlRecoveryPointExtendedInfo ExtendedInfo { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.WorkloadSqlRecoveryPoint 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.RecoveryServicesBackup.Models.WorkloadSqlRecoveryPoint System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4777,6 +5018,7 @@ public partial class WorkloadSqlRecoveryPointExtendedInfo : System.ClientModel.P public WorkloadSqlRecoveryPointExtendedInfo() { } public System.DateTimeOffset? DataDirectoryInfoCapturedOn { get { throw null; } set { } } public System.Collections.Generic.IList DataDirectoryPaths { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.WorkloadSqlRecoveryPointExtendedInfo 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.RecoveryServicesBackup.Models.WorkloadSqlRecoveryPointExtendedInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4789,6 +5031,7 @@ public WorkloadSqlRestoreContent() { } public System.Collections.Generic.IList AlternateDirectoryPaths { get { throw null; } } public bool? IsNonRecoverable { get { throw null; } set { } } public bool? ShouldUseAlternateTargetLocation { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.WorkloadSqlRestoreContent 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.RecoveryServicesBackup.Models.WorkloadSqlRestoreContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4799,6 +5042,7 @@ public partial class WorkloadSqlRestoreWithRehydrateContent : Azure.ResourceMana { public WorkloadSqlRestoreWithRehydrateContent() { } public Azure.ResourceManager.RecoveryServicesBackup.Models.RecoveryPointRehydrationInfo RecoveryPointRehydrationInfo { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.WorkloadSqlRestoreWithRehydrateContent 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.RecoveryServicesBackup.Models.WorkloadSqlRestoreWithRehydrateContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4814,6 +5058,7 @@ public YearlyRetentionSchedule() { } public Azure.ResourceManager.RecoveryServicesBackup.Models.RetentionScheduleFormat? RetentionScheduleFormatType { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.WeeklyRetentionFormat RetentionScheduleWeekly { get { throw null; } set { } } public System.Collections.Generic.IList RetentionTimes { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.YearlyRetentionSchedule 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.RecoveryServicesBackup.Models.YearlyRetentionSchedule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/assets.json b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/assets.json index 7a11240a4e18..76708972993f 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/assets.json +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup", - "Tag": "net/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup_90041a95b3" + "Tag": "net/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup_b9b65fea04" } diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupEngineData.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupEngineData.Serialization.cs index 2d03bf81a135..6182061c03b3 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupEngineData.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupEngineData.Serialization.cs @@ -20,6 +20,15 @@ public partial class BackupEngineData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(BackupEngineData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); @@ -38,55 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter writer.WritePropertyName("eTag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } BackupEngineData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupJobData.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupJobData.Serialization.cs index fb020ac624f5..946deaf94401 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupJobData.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupJobData.Serialization.cs @@ -20,6 +20,15 @@ public partial class BackupJobData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt throw new FormatException($"The model {nameof(BackupJobData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); @@ -38,55 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt writer.WritePropertyName("eTag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } BackupJobData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupPrivateEndpointConnectionData.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupPrivateEndpointConnectionData.Serialization.cs index b41091e6ddad..60a6e1b61573 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupPrivateEndpointConnectionData.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupPrivateEndpointConnectionData.Serialization.cs @@ -20,6 +20,15 @@ public partial class BackupPrivateEndpointConnectionData : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(BackupPrivateEndpointConnectionData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); @@ -38,55 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer writer.WritePropertyName("eTag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } BackupPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupProtectedItemData.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupProtectedItemData.Serialization.cs index cb0c7127ce7a..3053f937b193 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupProtectedItemData.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupProtectedItemData.Serialization.cs @@ -20,6 +20,15 @@ public partial class BackupProtectedItemData : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(BackupProtectedItemData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); @@ -38,55 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade writer.WritePropertyName("eTag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } BackupProtectedItemData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupProtectionContainerData.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupProtectionContainerData.Serialization.cs index f5cd2408fc29..b882fe651e78 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupProtectionContainerData.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupProtectionContainerData.Serialization.cs @@ -20,6 +20,15 @@ public partial class BackupProtectionContainerData : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(BackupProtectionContainerData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); @@ -38,55 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode writer.WritePropertyName("eTag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } BackupProtectionContainerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupProtectionIntentData.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupProtectionIntentData.Serialization.cs index b0023cde75f8..0fd71b1446d8 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupProtectionIntentData.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupProtectionIntentData.Serialization.cs @@ -20,6 +20,15 @@ public partial class BackupProtectionIntentData : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(BackupProtectionIntentData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); @@ -38,55 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe writer.WritePropertyName("eTag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } BackupProtectionIntentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupProtectionPolicyData.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupProtectionPolicyData.Serialization.cs index 292f2d30758f..c756af66a37d 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupProtectionPolicyData.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupProtectionPolicyData.Serialization.cs @@ -20,6 +20,15 @@ public partial class BackupProtectionPolicyData : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(BackupProtectionPolicyData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); @@ -38,55 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe writer.WritePropertyName("eTag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } BackupProtectionPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupRecoveryPointData.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupRecoveryPointData.Serialization.cs index ed6192650ac1..27f3e0ff284b 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupRecoveryPointData.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupRecoveryPointData.Serialization.cs @@ -20,6 +20,15 @@ public partial class BackupRecoveryPointData : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(BackupRecoveryPointData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); @@ -38,55 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade writer.WritePropertyName("eTag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } BackupRecoveryPointData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupResourceConfigData.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupResourceConfigData.Serialization.cs index 49a7cda14828..00d134b558ee 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupResourceConfigData.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupResourceConfigData.Serialization.cs @@ -20,6 +20,15 @@ public partial class BackupResourceConfigData : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(BackupResourceConfigData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); @@ -38,55 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead writer.WritePropertyName("eTag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } BackupResourceConfigData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupResourceEncryptionConfigExtendedData.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupResourceEncryptionConfigExtendedData.Serialization.cs index aaa66545de2a..c3dca4dc290e 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupResourceEncryptionConfigExtendedData.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupResourceEncryptionConfigExtendedData.Serialization.cs @@ -20,6 +20,15 @@ public partial class BackupResourceEncryptionConfigExtendedData : IUtf8JsonSeria void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(BackupResourceEncryptionConfigExtendedData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); @@ -38,55 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer.WritePropertyName("eTag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } BackupResourceEncryptionConfigExtendedData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupResourceVaultConfigData.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupResourceVaultConfigData.Serialization.cs index 4e4cc2004085..d8466ecf907b 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupResourceVaultConfigData.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupResourceVaultConfigData.Serialization.cs @@ -20,6 +20,15 @@ public partial class BackupResourceVaultConfigData : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(BackupResourceVaultConfigData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); @@ -38,55 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode writer.WritePropertyName("eTag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } BackupResourceVaultConfigData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupCommonSettings.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupCommonSettings.Serialization.cs index 9481287e37f2..a281fc7a23a1 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupCommonSettings.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupCommonSettings.Serialization.cs @@ -18,6 +18,15 @@ public partial class BackupCommonSettings : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(BackupCommonSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(TimeZone)) { writer.WritePropertyName("timeZone"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } BackupCommonSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupContent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupContent.Serialization.cs index 32c018187f9e..4de8eae1dd5a 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupContent.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class BackupContent : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt throw new FormatException($"The model {nameof(BackupContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("objectType"u8); writer.WriteStringValue(ObjectType); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt #endif } } - writer.WriteEndObject(); } BackupContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupDailySchedule.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupDailySchedule.Serialization.cs index d1f2ea9389d4..4a7538cb6a71 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupDailySchedule.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupDailySchedule.Serialization.cs @@ -18,6 +18,15 @@ internal partial class BackupDailySchedule : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(BackupDailySchedule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(ScheduleRunTimes)) { writer.WritePropertyName("scheduleRunTimes"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } BackupDailySchedule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupDay.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupDay.Serialization.cs index 56b5943c2628..958fc11f04b4 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupDay.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupDay.Serialization.cs @@ -18,6 +18,15 @@ public partial class BackupDay : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions throw new FormatException($"The model {nameof(BackupDay)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Date)) { writer.WritePropertyName("date"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions #endif } } - writer.WriteEndObject(); } BackupDay IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupEngineBaseResourceList.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupEngineBaseResourceList.Serialization.cs index b05e47731228..e4324e026b14 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupEngineBaseResourceList.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupEngineBaseResourceList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class BackupEngineBaseResourceList : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(BackupEngineBaseResourceList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } BackupEngineBaseResourceList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupEngineExtendedInfo.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupEngineExtendedInfo.Serialization.cs index 2d61267dab0c..06c8c0b967d0 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupEngineExtendedInfo.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupEngineExtendedInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class BackupEngineExtendedInfo : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(BackupEngineExtendedInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(DatabaseName)) { writer.WritePropertyName("databaseName"u8); @@ -81,7 +89,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } BackupEngineExtendedInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupErrorDetail.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupErrorDetail.Serialization.cs index a4ef15f4cfab..3b8ef919db6f 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupErrorDetail.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupErrorDetail.Serialization.cs @@ -18,6 +18,15 @@ public partial class BackupErrorDetail : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(BackupErrorDetail)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Code)) { writer.WritePropertyName("code"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } BackupErrorDetail IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupGenericEngine.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupGenericEngine.Serialization.cs index b0307cfe8f59..5c8bfd8ee94f 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupGenericEngine.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupGenericEngine.Serialization.cs @@ -18,6 +18,15 @@ public partial class BackupGenericEngine : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(BackupGenericEngine)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(FriendlyName)) { writer.WritePropertyName("friendlyName"u8); @@ -103,7 +111,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } BackupGenericEngine IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupGenericJob.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupGenericJob.Serialization.cs index 9c53333abf07..30354798432b 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupGenericJob.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupGenericJob.Serialization.cs @@ -18,6 +18,15 @@ public partial class BackupGenericJob : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(BackupGenericJob)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(EntityFriendlyName)) { writer.WritePropertyName("entityFriendlyName"u8); @@ -78,7 +86,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } BackupGenericJob IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupGenericProtectedItem.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupGenericProtectedItem.Serialization.cs index 34f7c0a1a203..a686de87b32f 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupGenericProtectedItem.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupGenericProtectedItem.Serialization.cs @@ -18,6 +18,15 @@ public partial class BackupGenericProtectedItem : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(BackupGenericProtectedItem)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("protectedItemType"u8); writer.WriteStringValue(ProtectedItemType); if (options.Format != "W" && Optional.IsDefined(BackupManagementType)) @@ -138,7 +146,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } BackupGenericProtectedItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupGenericProtectionContainer.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupGenericProtectionContainer.Serialization.cs index 60f71d50ce84..d1174a7c794c 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupGenericProtectionContainer.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupGenericProtectionContainer.Serialization.cs @@ -18,6 +18,15 @@ public partial class BackupGenericProtectionContainer : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(BackupGenericProtectionContainer)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(FriendlyName)) { writer.WritePropertyName("friendlyName"u8); @@ -68,7 +76,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } BackupGenericProtectionContainer IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupGenericProtectionIntent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupGenericProtectionIntent.Serialization.cs index 7f1e379ad602..c32bb0bda50e 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupGenericProtectionIntent.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupGenericProtectionIntent.Serialization.cs @@ -18,6 +18,15 @@ public partial class BackupGenericProtectionIntent : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(BackupGenericProtectionIntent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("protectionIntentItemType"u8); writer.WriteStringValue(ProtectionIntentItemType.ToString()); if (Optional.IsDefined(BackupManagementType)) @@ -68,7 +76,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } BackupGenericProtectionIntent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupGenericProtectionPolicy.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupGenericProtectionPolicy.Serialization.cs index 87b69392a763..9ebc70dff66e 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupGenericProtectionPolicy.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupGenericProtectionPolicy.Serialization.cs @@ -18,6 +18,15 @@ public partial class BackupGenericProtectionPolicy : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(BackupGenericProtectionPolicy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ProtectedItemsCount)) { writer.WritePropertyName("protectedItemsCount"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } BackupGenericProtectionPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupGenericRecoveryPoint.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupGenericRecoveryPoint.Serialization.cs index 3993921eb25a..2c9cc08d0af8 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupGenericRecoveryPoint.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupGenericRecoveryPoint.Serialization.cs @@ -18,6 +18,15 @@ public partial class BackupGenericRecoveryPoint : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(BackupGenericRecoveryPoint)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("objectType"u8); writer.WriteStringValue(ObjectType); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } BackupGenericRecoveryPoint IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupGoalFeatureSupportContent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupGoalFeatureSupportContent.Serialization.cs index 7ee4d1073627..b9c9c12cad02 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupGoalFeatureSupportContent.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupGoalFeatureSupportContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class BackupGoalFeatureSupportContent : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,25 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(BackupGoalFeatureSupportContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("featureType"u8); - writer.WriteStringValue(FeatureType); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } BackupGoalFeatureSupportContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupHourlySchedule.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupHourlySchedule.Serialization.cs index 90a1b8514eee..5fd465491749 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupHourlySchedule.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupHourlySchedule.Serialization.cs @@ -18,6 +18,15 @@ public partial class BackupHourlySchedule : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(BackupHourlySchedule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Interval)) { writer.WritePropertyName("interval"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } BackupHourlySchedule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupIdentityInfo.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupIdentityInfo.Serialization.cs index cc0cd339a933..0df1140557c8 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupIdentityInfo.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupIdentityInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class BackupIdentityInfo : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(BackupIdentityInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IsSystemAssignedIdentity)) { writer.WritePropertyName("isSystemAssignedIdentity"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } BackupIdentityInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupJobListResult.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupJobListResult.Serialization.cs index 8b716e96f2b2..8062ac1ce4b9 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupJobListResult.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupJobListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class BackupJobListResult : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(BackupJobListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } BackupJobListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupManagementUsage.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupManagementUsage.Serialization.cs index 5e4479c8efe5..bd662854d655 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupManagementUsage.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupManagementUsage.Serialization.cs @@ -18,6 +18,15 @@ public partial class BackupManagementUsage : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(BackupManagementUsage)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Unit)) { writer.WritePropertyName("unit"u8); @@ -71,7 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } BackupManagementUsage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupManagementUsageList.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupManagementUsageList.Serialization.cs index b91756cf1c2d..6a454be5d015 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupManagementUsageList.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupManagementUsageList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class BackupManagementUsageList : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(BackupManagementUsageList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } BackupManagementUsageList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupNameInfo.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupNameInfo.Serialization.cs index 864617f8e137..4bee2a762488 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupNameInfo.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupNameInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class BackupNameInfo : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(BackupNameInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Value)) { writer.WritePropertyName("value"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp #endif } } - writer.WriteEndObject(); } BackupNameInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupPrivateEndpointConnectionProperties.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupPrivateEndpointConnectionProperties.Serialization.cs index 570357a38816..453ffd4ad4c6 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupPrivateEndpointConnectionProperties.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupPrivateEndpointConnectionProperties.Serialization.cs @@ -19,6 +19,15 @@ public partial class BackupPrivateEndpointConnectionProperties : IUtf8JsonSerial void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(BackupPrivateEndpointConnectionProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ProvisioningState)) { writer.WritePropertyName("provisioningState"u8); @@ -67,7 +75,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } BackupPrivateEndpointConnectionProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupResourceConfigProperties.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupResourceConfigProperties.Serialization.cs index c021ff1dc378..c8a416831905 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupResourceConfigProperties.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupResourceConfigProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class BackupResourceConfigProperties : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(BackupResourceConfigProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(StorageModelType)) { writer.WritePropertyName("storageModelType"u8); @@ -71,7 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } BackupResourceConfigProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupResourceEncryptionConfig.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupResourceEncryptionConfig.Serialization.cs index 3f8fd50d9a0a..774f2e5f5e32 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupResourceEncryptionConfig.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupResourceEncryptionConfig.Serialization.cs @@ -18,6 +18,15 @@ public partial class BackupResourceEncryptionConfig : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(BackupResourceEncryptionConfig)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(EncryptionAtRestType)) { writer.WritePropertyName("encryptionAtRestType"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } BackupResourceEncryptionConfig IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupResourceEncryptionConfigExtendedCreateOrUpdateContent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupResourceEncryptionConfigExtendedCreateOrUpdateContent.Serialization.cs index 5779d9a324fb..ec083bef2d31 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupResourceEncryptionConfigExtendedCreateOrUpdateContent.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupResourceEncryptionConfigExtendedCreateOrUpdateContent.Serialization.cs @@ -19,6 +19,15 @@ public partial class BackupResourceEncryptionConfigExtendedCreateOrUpdateContent void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,7 @@ void IJsonModel.Wri throw new FormatException($"The model {nameof(BackupResourceEncryptionConfigExtendedCreateOrUpdateContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); @@ -37,55 +46,6 @@ void IJsonModel.Wri writer.WritePropertyName("eTag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } BackupResourceEncryptionConfigExtendedCreateOrUpdateContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupResourceEncryptionConfigExtendedProperties.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupResourceEncryptionConfigExtendedProperties.Serialization.cs index cf33ac0f88ef..dae9f1ce3aaf 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupResourceEncryptionConfigExtendedProperties.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupResourceEncryptionConfigExtendedProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class BackupResourceEncryptionConfigExtendedProperties : IUtf8Jso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8Json throw new FormatException($"The model {nameof(BackupResourceEncryptionConfigExtendedProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(UserAssignedIdentity)) { writer.WritePropertyName("userAssignedIdentity"u8); @@ -36,47 +45,6 @@ void IJsonModel.Write(Utf8Json writer.WritePropertyName("useSystemAssignedIdentity"u8); writer.WriteBooleanValue(UseSystemAssignedIdentity.Value); } - if (Optional.IsDefined(EncryptionAtRestType)) - { - writer.WritePropertyName("encryptionAtRestType"u8); - writer.WriteStringValue(EncryptionAtRestType.Value.ToString()); - } - if (Optional.IsDefined(KeyUri)) - { - writer.WritePropertyName("keyUri"u8); - writer.WriteStringValue(KeyUri.AbsoluteUri); - } - if (Optional.IsDefined(SubscriptionId)) - { - writer.WritePropertyName("subscriptionId"u8); - writer.WriteStringValue(SubscriptionId); - } - if (Optional.IsDefined(LastUpdateStatus)) - { - writer.WritePropertyName("lastUpdateStatus"u8); - writer.WriteStringValue(LastUpdateStatus.Value.ToString()); - } - if (Optional.IsDefined(InfrastructureEncryptionState)) - { - writer.WritePropertyName("infrastructureEncryptionState"u8); - writer.WriteStringValue(InfrastructureEncryptionState.Value.ToString()); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } BackupResourceEncryptionConfigExtendedProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupResourceVaultConfigProperties.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupResourceVaultConfigProperties.Serialization.cs index eea64bc60c3f..11a3b9d97a01 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupResourceVaultConfigProperties.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupResourceVaultConfigProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class BackupResourceVaultConfigProperties : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(BackupResourceVaultConfigProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(StorageModelType)) { writer.WritePropertyName("storageModelType"u8); @@ -86,7 +94,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } BackupResourceVaultConfigProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupRetentionPolicy.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupRetentionPolicy.Serialization.cs index 642aba4e7278..33ec49049b0a 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupRetentionPolicy.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupRetentionPolicy.Serialization.cs @@ -18,6 +18,15 @@ public partial class BackupRetentionPolicy : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(BackupRetentionPolicy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("retentionPolicyType"u8); writer.WriteStringValue(RetentionPolicyType); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } BackupRetentionPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupSchedulePolicy.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupSchedulePolicy.Serialization.cs index 9814792f1a11..9e50c43ba26f 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupSchedulePolicy.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupSchedulePolicy.Serialization.cs @@ -18,6 +18,15 @@ public partial class BackupSchedulePolicy : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(BackupSchedulePolicy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("schedulePolicyType"u8); writer.WriteStringValue(SchedulePolicyType); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } BackupSchedulePolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupServerContainer.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupServerContainer.Serialization.cs index 94395ff65f47..b51eaea01399 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupServerContainer.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupServerContainer.Serialization.cs @@ -18,6 +18,15 @@ public partial class BackupServerContainer : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,95 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(BackupServerContainer)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(CanReRegister)) - { - writer.WritePropertyName("canReRegister"u8); - writer.WriteBooleanValue(CanReRegister.Value); - } - if (Optional.IsDefined(ContainerId)) - { - writer.WritePropertyName("containerId"u8); - writer.WriteStringValue(ContainerId); - } - if (Optional.IsDefined(ProtectedItemCount)) - { - writer.WritePropertyName("protectedItemCount"u8); - writer.WriteNumberValue(ProtectedItemCount.Value); - } - if (Optional.IsDefined(DpmAgentVersion)) - { - writer.WritePropertyName("dpmAgentVersion"u8); - writer.WriteStringValue(DpmAgentVersion); - } - if (Optional.IsCollectionDefined(DpmServers)) - { - writer.WritePropertyName("dpmServers"u8); - writer.WriteStartArray(); - foreach (var item in DpmServers) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(IsUpgradeAvailable)) - { - writer.WritePropertyName("upgradeAvailable"u8); - writer.WriteBooleanValue(IsUpgradeAvailable.Value); - } - if (Optional.IsDefined(ProtectionStatus)) - { - writer.WritePropertyName("protectionStatus"u8); - writer.WriteStringValue(ProtectionStatus); - } - if (Optional.IsDefined(ExtendedInfo)) - { - writer.WritePropertyName("extendedInfo"u8); - writer.WriteObjectValue(ExtendedInfo, options); - } - if (Optional.IsDefined(FriendlyName)) - { - writer.WritePropertyName("friendlyName"u8); - writer.WriteStringValue(FriendlyName); - } - if (Optional.IsDefined(BackupManagementType)) - { - writer.WritePropertyName("backupManagementType"u8); - writer.WriteStringValue(BackupManagementType.Value.ToString()); - } - if (Optional.IsDefined(RegistrationStatus)) - { - writer.WritePropertyName("registrationStatus"u8); - writer.WriteStringValue(RegistrationStatus); - } - if (Optional.IsDefined(HealthStatus)) - { - writer.WritePropertyName("healthStatus"u8); - writer.WriteStringValue(HealthStatus); - } - writer.WritePropertyName("containerType"u8); - writer.WriteStringValue(ContainerType.ToSerialString()); - if (Optional.IsDefined(ProtectableObjectType)) - { - writer.WritePropertyName("protectableObjectType"u8); - writer.WriteStringValue(ProtectableObjectType); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } BackupServerContainer IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupServerEngine.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupServerEngine.Serialization.cs index 7dffafd39227..1ccd4ff1fb71 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupServerEngine.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupServerEngine.Serialization.cs @@ -18,6 +18,15 @@ public partial class BackupServerEngine : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,85 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(BackupServerEngine)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(FriendlyName)) - { - writer.WritePropertyName("friendlyName"u8); - writer.WriteStringValue(FriendlyName); - } - if (Optional.IsDefined(BackupManagementType)) - { - writer.WritePropertyName("backupManagementType"u8); - writer.WriteStringValue(BackupManagementType.Value.ToString()); - } - if (Optional.IsDefined(RegistrationStatus)) - { - writer.WritePropertyName("registrationStatus"u8); - writer.WriteStringValue(RegistrationStatus); - } - if (Optional.IsDefined(BackupEngineState)) - { - writer.WritePropertyName("backupEngineState"u8); - writer.WriteStringValue(BackupEngineState); - } - if (Optional.IsDefined(HealthStatus)) - { - writer.WritePropertyName("healthStatus"u8); - writer.WriteStringValue(HealthStatus); - } - writer.WritePropertyName("backupEngineType"u8); - writer.WriteStringValue(BackupEngineType.ToString()); - if (Optional.IsDefined(CanReRegister)) - { - writer.WritePropertyName("canReRegister"u8); - writer.WriteBooleanValue(CanReRegister.Value); - } - if (Optional.IsDefined(BackupEngineId)) - { - writer.WritePropertyName("backupEngineId"u8); - writer.WriteStringValue(BackupEngineId); - } - if (Optional.IsDefined(DpmVersion)) - { - writer.WritePropertyName("dpmVersion"u8); - writer.WriteStringValue(DpmVersion); - } - if (Optional.IsDefined(AzureBackupAgentVersion)) - { - writer.WritePropertyName("azureBackupAgentVersion"u8); - writer.WriteStringValue(AzureBackupAgentVersion); - } - if (Optional.IsDefined(IsAzureBackupAgentUpgradeAvailable)) - { - writer.WritePropertyName("isAzureBackupAgentUpgradeAvailable"u8); - writer.WriteBooleanValue(IsAzureBackupAgentUpgradeAvailable.Value); - } - if (Optional.IsDefined(IsDpmUpgradeAvailable)) - { - writer.WritePropertyName("isDpmUpgradeAvailable"u8); - writer.WriteBooleanValue(IsDpmUpgradeAvailable.Value); - } - if (Optional.IsDefined(ExtendedInfo)) - { - writer.WritePropertyName("extendedInfo"u8); - writer.WriteObjectValue(ExtendedInfo, options); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } BackupServerEngine IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupStatusContent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupStatusContent.Serialization.cs index 0e4105fa5437..5d2010320bbf 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupStatusContent.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupStatusContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class BackupStatusContent : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(BackupStatusContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ResourceType)) { writer.WritePropertyName("resourceType"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } BackupStatusContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupStatusResult.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupStatusResult.Serialization.cs index 71eb7603c4c1..2c0ef90b0a2a 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupStatusResult.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupStatusResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class BackupStatusResult : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(BackupStatusResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ProtectionStatus)) { writer.WritePropertyName("protectionStatus"u8); @@ -96,7 +104,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } BackupStatusResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupTargetDiskNetworkAccessSettings.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupTargetDiskNetworkAccessSettings.Serialization.cs index 296637d31825..3c38b065d82a 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupTargetDiskNetworkAccessSettings.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupTargetDiskNetworkAccessSettings.Serialization.cs @@ -18,6 +18,15 @@ public partial class BackupTargetDiskNetworkAccessSettings : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(BackupTargetDiskNetworkAccessSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(TargetDiskNetworkAccessOption)) { writer.WritePropertyName("targetDiskNetworkAccessOption"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } BackupTargetDiskNetworkAccessSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupTieringPolicy.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupTieringPolicy.Serialization.cs index f1498b7667c6..9d249c15edcb 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupTieringPolicy.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupTieringPolicy.Serialization.cs @@ -18,6 +18,15 @@ public partial class BackupTieringPolicy : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(BackupTieringPolicy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(TieringMode)) { writer.WritePropertyName("tieringMode"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } BackupTieringPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupWeeklySchedule.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupWeeklySchedule.Serialization.cs index 7b548100d2ec..f0cbc0dff44b 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupWeeklySchedule.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupWeeklySchedule.Serialization.cs @@ -18,6 +18,15 @@ public partial class BackupWeeklySchedule : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(BackupWeeklySchedule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(ScheduleRunDays)) { writer.WritePropertyName("scheduleRunDays"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } BackupWeeklySchedule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BekDetails.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BekDetails.Serialization.cs index c4cc0180e291..1ff3761de193 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BekDetails.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BekDetails.Serialization.cs @@ -18,6 +18,15 @@ public partial class BekDetails : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOption throw new FormatException($"The model {nameof(BekDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(SecretUri)) { writer.WritePropertyName("secretUrl"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOption #endif } } - writer.WriteEndObject(); } BekDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ContainerIdentityInfo.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ContainerIdentityInfo.Serialization.cs index 9423ae998356..3f499f0a864b 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ContainerIdentityInfo.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ContainerIdentityInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class ContainerIdentityInfo : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(ContainerIdentityInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(UniqueName)) { writer.WritePropertyName("uniqueName"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } ContainerIdentityInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DailyRetentionFormat.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DailyRetentionFormat.Serialization.cs index 31bea6599cf9..51e881f51533 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DailyRetentionFormat.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DailyRetentionFormat.Serialization.cs @@ -18,6 +18,15 @@ internal partial class DailyRetentionFormat : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(DailyRetentionFormat)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(DaysOfTheMonth)) { writer.WritePropertyName("daysOfTheMonth"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } DailyRetentionFormat IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DailyRetentionSchedule.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DailyRetentionSchedule.Serialization.cs index 857a2533405b..6d6e7bbed6a6 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DailyRetentionSchedule.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DailyRetentionSchedule.Serialization.cs @@ -18,6 +18,15 @@ public partial class DailyRetentionSchedule : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(DailyRetentionSchedule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(RetentionTimes)) { writer.WritePropertyName("retentionTimes"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } DailyRetentionSchedule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DiskExclusionProperties.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DiskExclusionProperties.Serialization.cs index c2890a7ab236..22b80ad1ec86 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DiskExclusionProperties.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DiskExclusionProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class DiskExclusionProperties : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(DiskExclusionProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(DiskLunList)) { writer.WritePropertyName("diskLunList"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } DiskExclusionProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DiskInformation.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DiskInformation.Serialization.cs index 097f12b142c5..c7b5c410a062 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DiskInformation.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DiskInformation.Serialization.cs @@ -18,6 +18,15 @@ public partial class DiskInformation : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(DiskInformation)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Lun)) { writer.WritePropertyName("lun"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO #endif } } - writer.WriteEndObject(); } DiskInformation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DistributedNodesInfo.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DistributedNodesInfo.Serialization.cs index 9f0008d40234..751366f01de6 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DistributedNodesInfo.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DistributedNodesInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class DistributedNodesInfo : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(DistributedNodesInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(NodeName)) { writer.WritePropertyName("nodeName"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } DistributedNodesInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DpmBackupEngine.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DpmBackupEngine.Serialization.cs index 331007bb5b17..07a7ee01a734 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DpmBackupEngine.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DpmBackupEngine.Serialization.cs @@ -18,6 +18,15 @@ public partial class DpmBackupEngine : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,85 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(DpmBackupEngine)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(FriendlyName)) - { - writer.WritePropertyName("friendlyName"u8); - writer.WriteStringValue(FriendlyName); - } - if (Optional.IsDefined(BackupManagementType)) - { - writer.WritePropertyName("backupManagementType"u8); - writer.WriteStringValue(BackupManagementType.Value.ToString()); - } - if (Optional.IsDefined(RegistrationStatus)) - { - writer.WritePropertyName("registrationStatus"u8); - writer.WriteStringValue(RegistrationStatus); - } - if (Optional.IsDefined(BackupEngineState)) - { - writer.WritePropertyName("backupEngineState"u8); - writer.WriteStringValue(BackupEngineState); - } - if (Optional.IsDefined(HealthStatus)) - { - writer.WritePropertyName("healthStatus"u8); - writer.WriteStringValue(HealthStatus); - } - writer.WritePropertyName("backupEngineType"u8); - writer.WriteStringValue(BackupEngineType.ToString()); - if (Optional.IsDefined(CanReRegister)) - { - writer.WritePropertyName("canReRegister"u8); - writer.WriteBooleanValue(CanReRegister.Value); - } - if (Optional.IsDefined(BackupEngineId)) - { - writer.WritePropertyName("backupEngineId"u8); - writer.WriteStringValue(BackupEngineId); - } - if (Optional.IsDefined(DpmVersion)) - { - writer.WritePropertyName("dpmVersion"u8); - writer.WriteStringValue(DpmVersion); - } - if (Optional.IsDefined(AzureBackupAgentVersion)) - { - writer.WritePropertyName("azureBackupAgentVersion"u8); - writer.WriteStringValue(AzureBackupAgentVersion); - } - if (Optional.IsDefined(IsAzureBackupAgentUpgradeAvailable)) - { - writer.WritePropertyName("isAzureBackupAgentUpgradeAvailable"u8); - writer.WriteBooleanValue(IsAzureBackupAgentUpgradeAvailable.Value); - } - if (Optional.IsDefined(IsDpmUpgradeAvailable)) - { - writer.WritePropertyName("isDpmUpgradeAvailable"u8); - writer.WriteBooleanValue(IsDpmUpgradeAvailable.Value); - } - if (Optional.IsDefined(ExtendedInfo)) - { - writer.WritePropertyName("extendedInfo"u8); - writer.WriteObjectValue(ExtendedInfo, options); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } DpmBackupEngine IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DpmBackupJob.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DpmBackupJob.Serialization.cs index 3b6df4d41fcb..9a2621c10482 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DpmBackupJob.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DpmBackupJob.Serialization.cs @@ -18,6 +18,15 @@ public partial class DpmBackupJob : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(DpmBackupJob)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Duration)) { writer.WritePropertyName("duration"u8); @@ -76,59 +85,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti writer.WritePropertyName("extendedInfo"u8); writer.WriteObjectValue(ExtendedInfo, options); } - if (Optional.IsDefined(EntityFriendlyName)) - { - writer.WritePropertyName("entityFriendlyName"u8); - writer.WriteStringValue(EntityFriendlyName); - } - if (Optional.IsDefined(BackupManagementType)) - { - writer.WritePropertyName("backupManagementType"u8); - writer.WriteStringValue(BackupManagementType.Value.ToString()); - } - if (Optional.IsDefined(Operation)) - { - writer.WritePropertyName("operation"u8); - writer.WriteStringValue(Operation); - } - if (Optional.IsDefined(Status)) - { - writer.WritePropertyName("status"u8); - writer.WriteStringValue(Status); - } - if (Optional.IsDefined(StartOn)) - { - writer.WritePropertyName("startTime"u8); - writer.WriteStringValue(StartOn.Value, "O"); - } - if (Optional.IsDefined(EndOn)) - { - writer.WritePropertyName("endTime"u8); - writer.WriteStringValue(EndOn.Value, "O"); - } - if (Optional.IsDefined(ActivityId)) - { - writer.WritePropertyName("activityId"u8); - writer.WriteStringValue(ActivityId); - } - writer.WritePropertyName("jobType"u8); - writer.WriteStringValue(JobType); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } DpmBackupJob IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DpmBackupJobExtendedInfo.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DpmBackupJobExtendedInfo.Serialization.cs index 2f0dd2241f15..99ebacc58489 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DpmBackupJobExtendedInfo.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DpmBackupJobExtendedInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class DpmBackupJobExtendedInfo : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(DpmBackupJobExtendedInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(TasksList)) { writer.WritePropertyName("tasksList"u8); @@ -67,7 +75,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } DpmBackupJobExtendedInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DpmBackupJobTaskDetails.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DpmBackupJobTaskDetails.Serialization.cs index 6b49973131e2..858acd937484 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DpmBackupJobTaskDetails.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DpmBackupJobTaskDetails.Serialization.cs @@ -18,6 +18,15 @@ public partial class DpmBackupJobTaskDetails : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(DpmBackupJobTaskDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(TaskId)) { writer.WritePropertyName("taskId"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } DpmBackupJobTaskDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DpmContainer.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DpmContainer.Serialization.cs index 7527d8f71ed1..847ede4f357e 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DpmContainer.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DpmContainer.Serialization.cs @@ -18,6 +18,15 @@ public partial class DpmContainer : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(DpmContainer)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(CanReRegister)) { writer.WritePropertyName("canReRegister"u8); @@ -71,49 +80,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti writer.WritePropertyName("extendedInfo"u8); writer.WriteObjectValue(ExtendedInfo, options); } - if (Optional.IsDefined(FriendlyName)) - { - writer.WritePropertyName("friendlyName"u8); - writer.WriteStringValue(FriendlyName); - } - if (Optional.IsDefined(BackupManagementType)) - { - writer.WritePropertyName("backupManagementType"u8); - writer.WriteStringValue(BackupManagementType.Value.ToString()); - } - if (Optional.IsDefined(RegistrationStatus)) - { - writer.WritePropertyName("registrationStatus"u8); - writer.WriteStringValue(RegistrationStatus); - } - if (Optional.IsDefined(HealthStatus)) - { - writer.WritePropertyName("healthStatus"u8); - writer.WriteStringValue(HealthStatus); - } - writer.WritePropertyName("containerType"u8); - writer.WriteStringValue(ContainerType.ToSerialString()); - if (Optional.IsDefined(ProtectableObjectType)) - { - writer.WritePropertyName("protectableObjectType"u8); - writer.WriteStringValue(ProtectableObjectType); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } DpmContainer IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DpmContainerExtendedInfo.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DpmContainerExtendedInfo.Serialization.cs index 1156f56e8e52..47cce31d2ae9 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DpmContainerExtendedInfo.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DpmContainerExtendedInfo.Serialization.cs @@ -18,6 +18,15 @@ internal partial class DpmContainerExtendedInfo : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(DpmContainerExtendedInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(LastRefreshedOn)) { writer.WritePropertyName("lastRefreshedAt"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } DpmContainerExtendedInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DpmErrorInfo.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DpmErrorInfo.Serialization.cs index faa8280668a5..ae4c7b80e069 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DpmErrorInfo.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DpmErrorInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class DpmErrorInfo : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(DpmErrorInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ErrorString)) { writer.WritePropertyName("errorString"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti #endif } } - writer.WriteEndObject(); } DpmErrorInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DpmProtectedItem.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DpmProtectedItem.Serialization.cs index 01c364d06021..18ee132f8753 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DpmProtectedItem.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DpmProtectedItem.Serialization.cs @@ -18,6 +18,15 @@ public partial class DpmProtectedItem : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(DpmProtectedItem)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(FriendlyName)) { writer.WritePropertyName("friendlyName"u8); @@ -46,119 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter writer.WritePropertyName("extendedInfo"u8); writer.WriteObjectValue(ExtendedInfo, options); } - writer.WritePropertyName("protectedItemType"u8); - writer.WriteStringValue(ProtectedItemType); - if (options.Format != "W" && Optional.IsDefined(BackupManagementType)) - { - writer.WritePropertyName("backupManagementType"u8); - writer.WriteStringValue(BackupManagementType.Value.ToString()); - } - if (options.Format != "W" && Optional.IsDefined(WorkloadType)) - { - writer.WritePropertyName("workloadType"u8); - writer.WriteStringValue(WorkloadType.Value.ToString()); - } - if (Optional.IsDefined(ContainerName)) - { - writer.WritePropertyName("containerName"u8); - writer.WriteStringValue(ContainerName); - } - if (Optional.IsDefined(SourceResourceId)) - { - writer.WritePropertyName("sourceResourceId"u8); - writer.WriteStringValue(SourceResourceId); - } - if (Optional.IsDefined(PolicyId)) - { - writer.WritePropertyName("policyId"u8); - writer.WriteStringValue(PolicyId); - } - if (Optional.IsDefined(LastRecoverOn)) - { - writer.WritePropertyName("lastRecoveryPoint"u8); - writer.WriteStringValue(LastRecoverOn.Value, "O"); - } - if (Optional.IsDefined(BackupSetName)) - { - writer.WritePropertyName("backupSetName"u8); - writer.WriteStringValue(BackupSetName); - } - if (Optional.IsDefined(CreateMode)) - { - writer.WritePropertyName("createMode"u8); - writer.WriteStringValue(CreateMode.Value.ToString()); - } - if (Optional.IsDefined(DeferredDeletedOn)) - { - writer.WritePropertyName("deferredDeleteTimeInUTC"u8); - writer.WriteStringValue(DeferredDeletedOn.Value, "O"); - } - if (Optional.IsDefined(IsScheduledForDeferredDelete)) - { - writer.WritePropertyName("isScheduledForDeferredDelete"u8); - writer.WriteBooleanValue(IsScheduledForDeferredDelete.Value); - } - if (Optional.IsDefined(DeferredDeleteTimeRemaining)) - { - writer.WritePropertyName("deferredDeleteTimeRemaining"u8); - writer.WriteStringValue(DeferredDeleteTimeRemaining); - } - if (Optional.IsDefined(IsDeferredDeleteScheduleUpcoming)) - { - writer.WritePropertyName("isDeferredDeleteScheduleUpcoming"u8); - writer.WriteBooleanValue(IsDeferredDeleteScheduleUpcoming.Value); - } - if (Optional.IsDefined(IsRehydrate)) - { - writer.WritePropertyName("isRehydrate"u8); - writer.WriteBooleanValue(IsRehydrate.Value); - } - if (Optional.IsCollectionDefined(ResourceGuardOperationRequests)) - { - writer.WritePropertyName("resourceGuardOperationRequests"u8); - writer.WriteStartArray(); - foreach (var item in ResourceGuardOperationRequests) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(IsArchiveEnabled)) - { - writer.WritePropertyName("isArchiveEnabled"u8); - writer.WriteBooleanValue(IsArchiveEnabled.Value); - } - if (Optional.IsDefined(PolicyName)) - { - writer.WritePropertyName("policyName"u8); - writer.WriteStringValue(PolicyName); - } - if (Optional.IsDefined(SoftDeleteRetentionPeriodInDays)) - { - writer.WritePropertyName("softDeleteRetentionPeriodInDays"u8); - writer.WriteNumberValue(SoftDeleteRetentionPeriodInDays.Value); - } - if (options.Format != "W" && Optional.IsDefined(VaultId)) - { - writer.WritePropertyName("vaultId"u8); - writer.WriteStringValue(VaultId); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } DpmProtectedItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DpmProtectedItemExtendedInfo.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DpmProtectedItemExtendedInfo.Serialization.cs index 2fe0d807a6b4..41a79a1c5254 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DpmProtectedItemExtendedInfo.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DpmProtectedItemExtendedInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class DpmProtectedItemExtendedInfo : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(DpmProtectedItemExtendedInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(ProtectableObjectLoadPath)) { writer.WritePropertyName("protectableObjectLoadPath"u8); @@ -117,7 +125,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } DpmProtectedItemExtendedInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FeatureSupportContent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FeatureSupportContent.Serialization.cs index e119bdc5c77f..b3cd430a69a2 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FeatureSupportContent.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FeatureSupportContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class FeatureSupportContent : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(FeatureSupportContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("featureType"u8); writer.WriteStringValue(FeatureType); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } FeatureSupportContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FetchTieringCostInfoContent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FetchTieringCostInfoContent.Serialization.cs index 07a26b3663ab..ccf9b0f174fd 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FetchTieringCostInfoContent.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FetchTieringCostInfoContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class FetchTieringCostInfoContent : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(FetchTieringCostInfoContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("sourceTierType"u8); writer.WriteStringValue(SourceTierType.ToSerialString()); writer.WritePropertyName("targetTierType"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } FetchTieringCostInfoContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FetchTieringCostInfoForRehydrationContent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FetchTieringCostInfoForRehydrationContent.Serialization.cs index 918a444b3161..419f296836d0 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FetchTieringCostInfoForRehydrationContent.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FetchTieringCostInfoForRehydrationContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class FetchTieringCostInfoForRehydrationContent : IUtf8JsonSerial void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(FetchTieringCostInfoForRehydrationContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("containerName"u8); writer.WriteStringValue(ContainerName); writer.WritePropertyName("protectedItemName"u8); @@ -34,28 +43,6 @@ void IJsonModel.Write(Utf8JsonWriter writer.WriteStringValue(RecoveryPointId); writer.WritePropertyName("rehydrationPriority"u8); writer.WriteStringValue(RehydrationPriority.ToString()); - writer.WritePropertyName("sourceTierType"u8); - writer.WriteStringValue(SourceTierType.ToSerialString()); - writer.WritePropertyName("targetTierType"u8); - writer.WriteStringValue(TargetTierType.ToSerialString()); - writer.WritePropertyName("objectType"u8); - writer.WriteStringValue(ObjectType); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } FetchTieringCostInfoForRehydrationContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FetchTieringCostSavingsInfoForPolicyContent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FetchTieringCostSavingsInfoForPolicyContent.Serialization.cs index 3ae5fee5a5f7..38e873fba7a3 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FetchTieringCostSavingsInfoForPolicyContent.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FetchTieringCostSavingsInfoForPolicyContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class FetchTieringCostSavingsInfoForPolicyContent : IUtf8JsonSeri void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,31 +34,9 @@ void IJsonModel.Write(Utf8JsonWrite throw new FormatException($"The model {nameof(FetchTieringCostSavingsInfoForPolicyContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("policyName"u8); writer.WriteStringValue(PolicyName); - writer.WritePropertyName("sourceTierType"u8); - writer.WriteStringValue(SourceTierType.ToSerialString()); - writer.WritePropertyName("targetTierType"u8); - writer.WriteStringValue(TargetTierType.ToSerialString()); - writer.WritePropertyName("objectType"u8); - writer.WriteStringValue(ObjectType); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } FetchTieringCostSavingsInfoForPolicyContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FetchTieringCostSavingsInfoForProtectedItemContent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FetchTieringCostSavingsInfoForProtectedItemContent.Serialization.cs index 78c8d1698e2f..07edb4eebac9 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FetchTieringCostSavingsInfoForProtectedItemContent.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FetchTieringCostSavingsInfoForProtectedItemContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class FetchTieringCostSavingsInfoForProtectedItemContent : IUtf8J void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,33 +34,11 @@ void IJsonModel.Write(Utf8Js throw new FormatException($"The model {nameof(FetchTieringCostSavingsInfoForProtectedItemContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("containerName"u8); writer.WriteStringValue(ContainerName); writer.WritePropertyName("protectedItemName"u8); writer.WriteStringValue(ProtectedItemName); - writer.WritePropertyName("sourceTierType"u8); - writer.WriteStringValue(SourceTierType.ToSerialString()); - writer.WritePropertyName("targetTierType"u8); - writer.WriteStringValue(TargetTierType.ToSerialString()); - writer.WritePropertyName("objectType"u8); - writer.WriteStringValue(ObjectType); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } FetchTieringCostSavingsInfoForProtectedItemContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FetchTieringCostSavingsInfoForVaultContent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FetchTieringCostSavingsInfoForVaultContent.Serialization.cs index 76a6c38319d3..adb26e2559da 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FetchTieringCostSavingsInfoForVaultContent.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FetchTieringCostSavingsInfoForVaultContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class FetchTieringCostSavingsInfoForVaultContent : IUtf8JsonSeria void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,29 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(FetchTieringCostSavingsInfoForVaultContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("sourceTierType"u8); - writer.WriteStringValue(SourceTierType.ToSerialString()); - writer.WritePropertyName("targetTierType"u8); - writer.WriteStringValue(TargetTierType.ToSerialString()); - writer.WritePropertyName("objectType"u8); - writer.WriteStringValue(ObjectType); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } FetchTieringCostSavingsInfoForVaultContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FileShareBackupContent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FileShareBackupContent.Serialization.cs index 6b3035cfdd0b..6e75dc93a524 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FileShareBackupContent.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FileShareBackupContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class FileShareBackupContent : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,30 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(FileShareBackupContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(RecoveryPointExpireOn)) { writer.WritePropertyName("recoveryPointExpiryTimeInUTC"u8); writer.WriteStringValue(RecoveryPointExpireOn.Value, "O"); } - writer.WritePropertyName("objectType"u8); - writer.WriteStringValue(ObjectType); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } FileShareBackupContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FileShareProtectableItem.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FileShareProtectableItem.Serialization.cs index 914f2148b2da..b27f666fc2e0 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FileShareProtectableItem.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FileShareProtectableItem.Serialization.cs @@ -18,6 +18,15 @@ public partial class FileShareProtectableItem : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(FileShareProtectableItem)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(ParentContainerFabricId)) { writer.WritePropertyName("parentContainerFabricId"u8); @@ -41,44 +50,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead writer.WritePropertyName("azureFileShareType"u8); writer.WriteStringValue(AzureFileShareType.Value.ToString()); } - if (Optional.IsDefined(BackupManagementType)) - { - writer.WritePropertyName("backupManagementType"u8); - writer.WriteStringValue(BackupManagementType); - } - if (Optional.IsDefined(WorkloadType)) - { - writer.WritePropertyName("workloadType"u8); - writer.WriteStringValue(WorkloadType); - } - writer.WritePropertyName("protectableItemType"u8); - writer.WriteStringValue(ProtectableItemType); - if (Optional.IsDefined(FriendlyName)) - { - writer.WritePropertyName("friendlyName"u8); - writer.WriteStringValue(FriendlyName); - } - if (Optional.IsDefined(ProtectionState)) - { - writer.WritePropertyName("protectionState"u8); - writer.WriteStringValue(ProtectionState.Value.ToString()); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } FileShareProtectableItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FileShareProtectionPolicy.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FileShareProtectionPolicy.Serialization.cs index c6abca39c026..664c86f1b123 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FileShareProtectionPolicy.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FileShareProtectionPolicy.Serialization.cs @@ -18,6 +18,15 @@ public partial class FileShareProtectionPolicy : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(FileShareProtectionPolicy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(WorkLoadType)) { writer.WritePropertyName("workLoadType"u8); @@ -51,39 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea writer.WritePropertyName("timeZone"u8); writer.WriteStringValue(TimeZone); } - if (Optional.IsDefined(ProtectedItemsCount)) - { - writer.WritePropertyName("protectedItemsCount"u8); - writer.WriteNumberValue(ProtectedItemsCount.Value); - } - writer.WritePropertyName("backupManagementType"u8); - writer.WriteStringValue(BackupManagementType); - if (Optional.IsCollectionDefined(ResourceGuardOperationRequests)) - { - writer.WritePropertyName("resourceGuardOperationRequests"u8); - writer.WriteStartArray(); - foreach (var item in ResourceGuardOperationRequests) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } FileShareProtectionPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FileShareProvisionIlrContent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FileShareProvisionIlrContent.Serialization.cs index 941b90d456c1..586742469326 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FileShareProvisionIlrContent.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FileShareProvisionIlrContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class FileShareProvisionIlrContent : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(FileShareProvisionIlrContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(RecoveryPointId)) { writer.WritePropertyName("recoveryPointId"u8); @@ -36,24 +45,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model writer.WritePropertyName("sourceResourceId"u8); writer.WriteStringValue(SourceResourceId); } - writer.WritePropertyName("objectType"u8); - writer.WriteStringValue(ObjectType); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } FileShareProvisionIlrContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FileShareRecoveryPoint.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FileShareRecoveryPoint.Serialization.cs index d70cb46c1246..d27dde0fd338 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FileShareRecoveryPoint.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FileShareRecoveryPoint.Serialization.cs @@ -18,6 +18,15 @@ public partial class FileShareRecoveryPoint : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(FileShareRecoveryPoint)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(RecoveryPointType)) { writer.WritePropertyName("recoveryPointType"u8); @@ -51,24 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader writer.WritePropertyName("recoveryPointProperties"u8); writer.WriteObjectValue(RecoveryPointProperties, options); } - writer.WritePropertyName("objectType"u8); - writer.WriteStringValue(ObjectType); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } FileShareRecoveryPoint IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FileShareRestoreContent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FileShareRestoreContent.Serialization.cs index a792da41ff15..4a26456748f2 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FileShareRestoreContent.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FileShareRestoreContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class FileShareRestoreContent : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(FileShareRestoreContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(RecoveryType)) { writer.WritePropertyName("recoveryType"u8); @@ -61,24 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade writer.WritePropertyName("targetDetails"u8); writer.WriteObjectValue(TargetDetails, options); } - writer.WritePropertyName("objectType"u8); - writer.WriteStringValue(ObjectType); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } FileShareRestoreContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FileshareProtectedItem.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FileshareProtectedItem.Serialization.cs index 91e03cf8210b..bd875d4a0d0b 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FileshareProtectedItem.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FileshareProtectedItem.Serialization.cs @@ -18,6 +18,15 @@ public partial class FileshareProtectedItem : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(FileshareProtectedItem)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(FriendlyName)) { writer.WritePropertyName("friendlyName"u8); @@ -67,119 +76,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader writer.WritePropertyName("extendedInfo"u8); writer.WriteObjectValue(ExtendedInfo, options); } - writer.WritePropertyName("protectedItemType"u8); - writer.WriteStringValue(ProtectedItemType); - if (options.Format != "W" && Optional.IsDefined(BackupManagementType)) - { - writer.WritePropertyName("backupManagementType"u8); - writer.WriteStringValue(BackupManagementType.Value.ToString()); - } - if (options.Format != "W" && Optional.IsDefined(WorkloadType)) - { - writer.WritePropertyName("workloadType"u8); - writer.WriteStringValue(WorkloadType.Value.ToString()); - } - if (Optional.IsDefined(ContainerName)) - { - writer.WritePropertyName("containerName"u8); - writer.WriteStringValue(ContainerName); - } - if (Optional.IsDefined(SourceResourceId)) - { - writer.WritePropertyName("sourceResourceId"u8); - writer.WriteStringValue(SourceResourceId); - } - if (Optional.IsDefined(PolicyId)) - { - writer.WritePropertyName("policyId"u8); - writer.WriteStringValue(PolicyId); - } - if (Optional.IsDefined(LastRecoverOn)) - { - writer.WritePropertyName("lastRecoveryPoint"u8); - writer.WriteStringValue(LastRecoverOn.Value, "O"); - } - if (Optional.IsDefined(BackupSetName)) - { - writer.WritePropertyName("backupSetName"u8); - writer.WriteStringValue(BackupSetName); - } - if (Optional.IsDefined(CreateMode)) - { - writer.WritePropertyName("createMode"u8); - writer.WriteStringValue(CreateMode.Value.ToString()); - } - if (Optional.IsDefined(DeferredDeletedOn)) - { - writer.WritePropertyName("deferredDeleteTimeInUTC"u8); - writer.WriteStringValue(DeferredDeletedOn.Value, "O"); - } - if (Optional.IsDefined(IsScheduledForDeferredDelete)) - { - writer.WritePropertyName("isScheduledForDeferredDelete"u8); - writer.WriteBooleanValue(IsScheduledForDeferredDelete.Value); - } - if (Optional.IsDefined(DeferredDeleteTimeRemaining)) - { - writer.WritePropertyName("deferredDeleteTimeRemaining"u8); - writer.WriteStringValue(DeferredDeleteTimeRemaining); - } - if (Optional.IsDefined(IsDeferredDeleteScheduleUpcoming)) - { - writer.WritePropertyName("isDeferredDeleteScheduleUpcoming"u8); - writer.WriteBooleanValue(IsDeferredDeleteScheduleUpcoming.Value); - } - if (Optional.IsDefined(IsRehydrate)) - { - writer.WritePropertyName("isRehydrate"u8); - writer.WriteBooleanValue(IsRehydrate.Value); - } - if (Optional.IsCollectionDefined(ResourceGuardOperationRequests)) - { - writer.WritePropertyName("resourceGuardOperationRequests"u8); - writer.WriteStartArray(); - foreach (var item in ResourceGuardOperationRequests) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(IsArchiveEnabled)) - { - writer.WritePropertyName("isArchiveEnabled"u8); - writer.WriteBooleanValue(IsArchiveEnabled.Value); - } - if (Optional.IsDefined(PolicyName)) - { - writer.WritePropertyName("policyName"u8); - writer.WriteStringValue(PolicyName); - } - if (Optional.IsDefined(SoftDeleteRetentionPeriodInDays)) - { - writer.WritePropertyName("softDeleteRetentionPeriodInDays"u8); - writer.WriteNumberValue(SoftDeleteRetentionPeriodInDays.Value); - } - if (options.Format != "W" && Optional.IsDefined(VaultId)) - { - writer.WritePropertyName("vaultId"u8); - writer.WriteStringValue(VaultId); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } FileshareProtectedItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FileshareProtectedItemExtendedInfo.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FileshareProtectedItemExtendedInfo.Serialization.cs index eca656977e2e..2d9a7a618ddc 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FileshareProtectedItemExtendedInfo.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FileshareProtectedItemExtendedInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class FileshareProtectedItemExtendedInfo : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(FileshareProtectedItemExtendedInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(OldestRecoverOn)) { writer.WritePropertyName("oldestRecoveryPoint"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } FileshareProtectedItemExtendedInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/GenericContainer.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/GenericContainer.Serialization.cs index ebc69fcd1139..717479c5073b 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/GenericContainer.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/GenericContainer.Serialization.cs @@ -18,6 +18,15 @@ public partial class GenericContainer : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(GenericContainer)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(FabricName)) { writer.WritePropertyName("fabricName"u8); @@ -36,49 +45,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter writer.WritePropertyName("extendedInformation"u8); writer.WriteObjectValue(ExtendedInformation, options); } - if (Optional.IsDefined(FriendlyName)) - { - writer.WritePropertyName("friendlyName"u8); - writer.WriteStringValue(FriendlyName); - } - if (Optional.IsDefined(BackupManagementType)) - { - writer.WritePropertyName("backupManagementType"u8); - writer.WriteStringValue(BackupManagementType.Value.ToString()); - } - if (Optional.IsDefined(RegistrationStatus)) - { - writer.WritePropertyName("registrationStatus"u8); - writer.WriteStringValue(RegistrationStatus); - } - if (Optional.IsDefined(HealthStatus)) - { - writer.WritePropertyName("healthStatus"u8); - writer.WriteStringValue(HealthStatus); - } - writer.WritePropertyName("containerType"u8); - writer.WriteStringValue(ContainerType.ToSerialString()); - if (Optional.IsDefined(ProtectableObjectType)) - { - writer.WritePropertyName("protectableObjectType"u8); - writer.WriteStringValue(ProtectableObjectType); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } GenericContainer IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/GenericContainerExtendedInfo.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/GenericContainerExtendedInfo.Serialization.cs index 008b5be4d7c5..3f8569624361 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/GenericContainerExtendedInfo.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/GenericContainerExtendedInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class GenericContainerExtendedInfo : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(GenericContainerExtendedInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(RawCertData)) { writer.WritePropertyName("rawCertData"u8); @@ -62,7 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } GenericContainerExtendedInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/GenericProtectedItem.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/GenericProtectedItem.Serialization.cs index 525de93781d5..9b757281d78b 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/GenericProtectedItem.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/GenericProtectedItem.Serialization.cs @@ -18,6 +18,15 @@ public partial class GenericProtectedItem : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(GenericProtectedItem)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(FriendlyName)) { writer.WritePropertyName("friendlyName"u8); @@ -62,119 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr writer.WritePropertyName("fabricName"u8); writer.WriteStringValue(FabricName); } - writer.WritePropertyName("protectedItemType"u8); - writer.WriteStringValue(ProtectedItemType); - if (options.Format != "W" && Optional.IsDefined(BackupManagementType)) - { - writer.WritePropertyName("backupManagementType"u8); - writer.WriteStringValue(BackupManagementType.Value.ToString()); - } - if (options.Format != "W" && Optional.IsDefined(WorkloadType)) - { - writer.WritePropertyName("workloadType"u8); - writer.WriteStringValue(WorkloadType.Value.ToString()); - } - if (Optional.IsDefined(ContainerName)) - { - writer.WritePropertyName("containerName"u8); - writer.WriteStringValue(ContainerName); - } - if (Optional.IsDefined(SourceResourceId)) - { - writer.WritePropertyName("sourceResourceId"u8); - writer.WriteStringValue(SourceResourceId); - } - if (Optional.IsDefined(PolicyId)) - { - writer.WritePropertyName("policyId"u8); - writer.WriteStringValue(PolicyId); - } - if (Optional.IsDefined(LastRecoverOn)) - { - writer.WritePropertyName("lastRecoveryPoint"u8); - writer.WriteStringValue(LastRecoverOn.Value, "O"); - } - if (Optional.IsDefined(BackupSetName)) - { - writer.WritePropertyName("backupSetName"u8); - writer.WriteStringValue(BackupSetName); - } - if (Optional.IsDefined(CreateMode)) - { - writer.WritePropertyName("createMode"u8); - writer.WriteStringValue(CreateMode.Value.ToString()); - } - if (Optional.IsDefined(DeferredDeletedOn)) - { - writer.WritePropertyName("deferredDeleteTimeInUTC"u8); - writer.WriteStringValue(DeferredDeletedOn.Value, "O"); - } - if (Optional.IsDefined(IsScheduledForDeferredDelete)) - { - writer.WritePropertyName("isScheduledForDeferredDelete"u8); - writer.WriteBooleanValue(IsScheduledForDeferredDelete.Value); - } - if (Optional.IsDefined(DeferredDeleteTimeRemaining)) - { - writer.WritePropertyName("deferredDeleteTimeRemaining"u8); - writer.WriteStringValue(DeferredDeleteTimeRemaining); - } - if (Optional.IsDefined(IsDeferredDeleteScheduleUpcoming)) - { - writer.WritePropertyName("isDeferredDeleteScheduleUpcoming"u8); - writer.WriteBooleanValue(IsDeferredDeleteScheduleUpcoming.Value); - } - if (Optional.IsDefined(IsRehydrate)) - { - writer.WritePropertyName("isRehydrate"u8); - writer.WriteBooleanValue(IsRehydrate.Value); - } - if (Optional.IsCollectionDefined(ResourceGuardOperationRequests)) - { - writer.WritePropertyName("resourceGuardOperationRequests"u8); - writer.WriteStartArray(); - foreach (var item in ResourceGuardOperationRequests) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(IsArchiveEnabled)) - { - writer.WritePropertyName("isArchiveEnabled"u8); - writer.WriteBooleanValue(IsArchiveEnabled.Value); - } - if (Optional.IsDefined(PolicyName)) - { - writer.WritePropertyName("policyName"u8); - writer.WriteStringValue(PolicyName); - } - if (Optional.IsDefined(SoftDeleteRetentionPeriodInDays)) - { - writer.WritePropertyName("softDeleteRetentionPeriodInDays"u8); - writer.WriteNumberValue(SoftDeleteRetentionPeriodInDays.Value); - } - if (options.Format != "W" && Optional.IsDefined(VaultId)) - { - writer.WritePropertyName("vaultId"u8); - writer.WriteStringValue(VaultId); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } GenericProtectedItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/GenericProtectionPolicy.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/GenericProtectionPolicy.Serialization.cs index 21c36d9daaec..de1c52306b3e 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/GenericProtectionPolicy.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/GenericProtectionPolicy.Serialization.cs @@ -18,6 +18,15 @@ public partial class GenericProtectionPolicy : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(GenericProtectionPolicy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(SubProtectionPolicy)) { writer.WritePropertyName("subProtectionPolicy"u8); @@ -46,39 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade writer.WritePropertyName("fabricName"u8); writer.WriteStringValue(FabricName); } - if (Optional.IsDefined(ProtectedItemsCount)) - { - writer.WritePropertyName("protectedItemsCount"u8); - writer.WriteNumberValue(ProtectedItemsCount.Value); - } - writer.WritePropertyName("backupManagementType"u8); - writer.WriteStringValue(BackupManagementType); - if (Optional.IsCollectionDefined(ResourceGuardOperationRequests)) - { - writer.WritePropertyName("resourceGuardOperationRequests"u8); - writer.WriteStartArray(); - foreach (var item in ResourceGuardOperationRequests) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } GenericProtectionPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/GenericRecoveryPoint.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/GenericRecoveryPoint.Serialization.cs index 4cc015eefccd..5f5a4833c5b5 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/GenericRecoveryPoint.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/GenericRecoveryPoint.Serialization.cs @@ -18,6 +18,15 @@ public partial class GenericRecoveryPoint : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(GenericRecoveryPoint)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(FriendlyName)) { writer.WritePropertyName("friendlyName"u8); @@ -51,24 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr writer.WritePropertyName("recoveryPointProperties"u8); writer.WriteObjectValue(RecoveryPointProperties, options); } - writer.WritePropertyName("objectType"u8); - writer.WriteStringValue(ObjectType); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } GenericRecoveryPoint IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasClassicComputeVmContainer.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasClassicComputeVmContainer.Serialization.cs index 9b2431feefda..f79ffdb3464c 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasClassicComputeVmContainer.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasClassicComputeVmContainer.Serialization.cs @@ -18,6 +18,15 @@ public partial class IaasClassicComputeVmContainer : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,65 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(IaasClassicComputeVmContainer)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(VirtualMachineId)) - { - writer.WritePropertyName("virtualMachineId"u8); - writer.WriteStringValue(VirtualMachineId); - } - if (Optional.IsDefined(VirtualMachineVersion)) - { - writer.WritePropertyName("virtualMachineVersion"u8); - writer.WriteStringValue(VirtualMachineVersion); - } - if (Optional.IsDefined(ResourceGroup)) - { - writer.WritePropertyName("resourceGroup"u8); - writer.WriteStringValue(ResourceGroup); - } - if (Optional.IsDefined(FriendlyName)) - { - writer.WritePropertyName("friendlyName"u8); - writer.WriteStringValue(FriendlyName); - } - if (Optional.IsDefined(BackupManagementType)) - { - writer.WritePropertyName("backupManagementType"u8); - writer.WriteStringValue(BackupManagementType.Value.ToString()); - } - if (Optional.IsDefined(RegistrationStatus)) - { - writer.WritePropertyName("registrationStatus"u8); - writer.WriteStringValue(RegistrationStatus); - } - if (Optional.IsDefined(HealthStatus)) - { - writer.WritePropertyName("healthStatus"u8); - writer.WriteStringValue(HealthStatus); - } - writer.WritePropertyName("containerType"u8); - writer.WriteStringValue(ContainerType.ToSerialString()); - if (Optional.IsDefined(ProtectableObjectType)) - { - writer.WritePropertyName("protectableObjectType"u8); - writer.WriteStringValue(ProtectableObjectType); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } IaasClassicComputeVmContainer IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasClassicComputeVmProtectableItem.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasClassicComputeVmProtectableItem.Serialization.cs index 915095f6eca7..afdc1751ea55 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasClassicComputeVmProtectableItem.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasClassicComputeVmProtectableItem.Serialization.cs @@ -18,6 +18,15 @@ public partial class IaasClassicComputeVmProtectableItem : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,60 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(IaasClassicComputeVmProtectableItem)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(VirtualMachineId)) - { - writer.WritePropertyName("virtualMachineId"u8); - writer.WriteStringValue(VirtualMachineId); - } - if (Optional.IsDefined(VirtualMachineVersion)) - { - writer.WritePropertyName("virtualMachineVersion"u8); - writer.WriteStringValue(VirtualMachineVersion); - } - if (Optional.IsDefined(ResourceGroup)) - { - writer.WritePropertyName("resourceGroup"u8); - writer.WriteStringValue(ResourceGroup); - } - if (Optional.IsDefined(BackupManagementType)) - { - writer.WritePropertyName("backupManagementType"u8); - writer.WriteStringValue(BackupManagementType); - } - if (Optional.IsDefined(WorkloadType)) - { - writer.WritePropertyName("workloadType"u8); - writer.WriteStringValue(WorkloadType); - } - writer.WritePropertyName("protectableItemType"u8); - writer.WriteStringValue(ProtectableItemType); - if (Optional.IsDefined(FriendlyName)) - { - writer.WritePropertyName("friendlyName"u8); - writer.WriteStringValue(FriendlyName); - } - if (Optional.IsDefined(ProtectionState)) - { - writer.WritePropertyName("protectionState"u8); - writer.WriteStringValue(ProtectionState.Value.ToString()); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } IaasClassicComputeVmProtectableItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasClassicComputeVmProtectedItem.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasClassicComputeVmProtectedItem.Serialization.cs index 273ffb26cd85..708331401139 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasClassicComputeVmProtectedItem.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasClassicComputeVmProtectedItem.Serialization.cs @@ -18,6 +18,15 @@ public partial class IaasClassicComputeVmProtectedItem : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,191 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(IaasClassicComputeVmProtectedItem)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W" && Optional.IsDefined(FriendlyName)) - { - writer.WritePropertyName("friendlyName"u8); - writer.WriteStringValue(FriendlyName); - } - if (options.Format != "W" && Optional.IsDefined(VirtualMachineId)) - { - writer.WritePropertyName("virtualMachineId"u8); - writer.WriteStringValue(VirtualMachineId); - } - if (Optional.IsDefined(ProtectionStatus)) - { - writer.WritePropertyName("protectionStatus"u8); - writer.WriteStringValue(ProtectionStatus); - } - if (Optional.IsDefined(ProtectionState)) - { - writer.WritePropertyName("protectionState"u8); - writer.WriteStringValue(ProtectionState.Value.ToString()); - } - if (options.Format != "W" && Optional.IsDefined(HealthStatus)) - { - writer.WritePropertyName("healthStatus"u8); - writer.WriteStringValue(HealthStatus.Value.ToString()); - } - if (Optional.IsCollectionDefined(HealthDetails)) - { - writer.WritePropertyName("healthDetails"u8); - writer.WriteStartArray(); - foreach (var item in HealthDetails) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(KpisHealths)) - { - writer.WritePropertyName("kpisHealths"u8); - writer.WriteStartObject(); - foreach (var item in KpisHealths) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value, options); - } - writer.WriteEndObject(); - } - if (Optional.IsDefined(LastBackupStatus)) - { - writer.WritePropertyName("lastBackupStatus"u8); - writer.WriteStringValue(LastBackupStatus); - } - if (options.Format != "W" && Optional.IsDefined(LastBackupOn)) - { - writer.WritePropertyName("lastBackupTime"u8); - writer.WriteStringValue(LastBackupOn.Value, "O"); - } - if (options.Format != "W" && Optional.IsDefined(ProtectedItemDataId)) - { - writer.WritePropertyName("protectedItemDataId"u8); - writer.WriteStringValue(ProtectedItemDataId); - } - if (Optional.IsDefined(ExtendedInfo)) - { - writer.WritePropertyName("extendedInfo"u8); - writer.WriteObjectValue(ExtendedInfo, options); - } - if (Optional.IsDefined(ExtendedProperties)) - { - writer.WritePropertyName("extendedProperties"u8); - writer.WriteObjectValue(ExtendedProperties, options); - } - writer.WritePropertyName("protectedItemType"u8); - writer.WriteStringValue(ProtectedItemType); - if (options.Format != "W" && Optional.IsDefined(BackupManagementType)) - { - writer.WritePropertyName("backupManagementType"u8); - writer.WriteStringValue(BackupManagementType.Value.ToString()); - } - if (options.Format != "W" && Optional.IsDefined(WorkloadType)) - { - writer.WritePropertyName("workloadType"u8); - writer.WriteStringValue(WorkloadType.Value.ToString()); - } - if (Optional.IsDefined(ContainerName)) - { - writer.WritePropertyName("containerName"u8); - writer.WriteStringValue(ContainerName); - } - if (Optional.IsDefined(SourceResourceId)) - { - writer.WritePropertyName("sourceResourceId"u8); - writer.WriteStringValue(SourceResourceId); - } - if (Optional.IsDefined(PolicyId)) - { - writer.WritePropertyName("policyId"u8); - writer.WriteStringValue(PolicyId); - } - if (Optional.IsDefined(LastRecoverOn)) - { - writer.WritePropertyName("lastRecoveryPoint"u8); - writer.WriteStringValue(LastRecoverOn.Value, "O"); - } - if (Optional.IsDefined(BackupSetName)) - { - writer.WritePropertyName("backupSetName"u8); - writer.WriteStringValue(BackupSetName); - } - if (Optional.IsDefined(CreateMode)) - { - writer.WritePropertyName("createMode"u8); - writer.WriteStringValue(CreateMode.Value.ToString()); - } - if (Optional.IsDefined(DeferredDeletedOn)) - { - writer.WritePropertyName("deferredDeleteTimeInUTC"u8); - writer.WriteStringValue(DeferredDeletedOn.Value, "O"); - } - if (Optional.IsDefined(IsScheduledForDeferredDelete)) - { - writer.WritePropertyName("isScheduledForDeferredDelete"u8); - writer.WriteBooleanValue(IsScheduledForDeferredDelete.Value); - } - if (Optional.IsDefined(DeferredDeleteTimeRemaining)) - { - writer.WritePropertyName("deferredDeleteTimeRemaining"u8); - writer.WriteStringValue(DeferredDeleteTimeRemaining); - } - if (Optional.IsDefined(IsDeferredDeleteScheduleUpcoming)) - { - writer.WritePropertyName("isDeferredDeleteScheduleUpcoming"u8); - writer.WriteBooleanValue(IsDeferredDeleteScheduleUpcoming.Value); - } - if (Optional.IsDefined(IsRehydrate)) - { - writer.WritePropertyName("isRehydrate"u8); - writer.WriteBooleanValue(IsRehydrate.Value); - } - if (Optional.IsCollectionDefined(ResourceGuardOperationRequests)) - { - writer.WritePropertyName("resourceGuardOperationRequests"u8); - writer.WriteStartArray(); - foreach (var item in ResourceGuardOperationRequests) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(IsArchiveEnabled)) - { - writer.WritePropertyName("isArchiveEnabled"u8); - writer.WriteBooleanValue(IsArchiveEnabled.Value); - } - if (Optional.IsDefined(PolicyName)) - { - writer.WritePropertyName("policyName"u8); - writer.WriteStringValue(PolicyName); - } - if (Optional.IsDefined(SoftDeleteRetentionPeriodInDays)) - { - writer.WritePropertyName("softDeleteRetentionPeriodInDays"u8); - writer.WriteNumberValue(SoftDeleteRetentionPeriodInDays.Value); - } - if (options.Format != "W" && Optional.IsDefined(VaultId)) - { - writer.WritePropertyName("vaultId"u8); - writer.WriteStringValue(VaultId); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } IaasClassicComputeVmProtectedItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasComputeVmContainer.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasComputeVmContainer.Serialization.cs index 5f3b78373cd8..4c8d72d56d49 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasComputeVmContainer.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasComputeVmContainer.Serialization.cs @@ -18,6 +18,15 @@ public partial class IaasComputeVmContainer : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,65 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(IaasComputeVmContainer)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(VirtualMachineId)) - { - writer.WritePropertyName("virtualMachineId"u8); - writer.WriteStringValue(VirtualMachineId); - } - if (Optional.IsDefined(VirtualMachineVersion)) - { - writer.WritePropertyName("virtualMachineVersion"u8); - writer.WriteStringValue(VirtualMachineVersion); - } - if (Optional.IsDefined(ResourceGroup)) - { - writer.WritePropertyName("resourceGroup"u8); - writer.WriteStringValue(ResourceGroup); - } - if (Optional.IsDefined(FriendlyName)) - { - writer.WritePropertyName("friendlyName"u8); - writer.WriteStringValue(FriendlyName); - } - if (Optional.IsDefined(BackupManagementType)) - { - writer.WritePropertyName("backupManagementType"u8); - writer.WriteStringValue(BackupManagementType.Value.ToString()); - } - if (Optional.IsDefined(RegistrationStatus)) - { - writer.WritePropertyName("registrationStatus"u8); - writer.WriteStringValue(RegistrationStatus); - } - if (Optional.IsDefined(HealthStatus)) - { - writer.WritePropertyName("healthStatus"u8); - writer.WriteStringValue(HealthStatus); - } - writer.WritePropertyName("containerType"u8); - writer.WriteStringValue(ContainerType.ToSerialString()); - if (Optional.IsDefined(ProtectableObjectType)) - { - writer.WritePropertyName("protectableObjectType"u8); - writer.WriteStringValue(ProtectableObjectType); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } IaasComputeVmContainer IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasComputeVmProtectableItem.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasComputeVmProtectableItem.Serialization.cs index 91b640526ca8..026adb1f25bb 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasComputeVmProtectableItem.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasComputeVmProtectableItem.Serialization.cs @@ -18,6 +18,15 @@ public partial class IaasComputeVmProtectableItem : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,60 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(IaasComputeVmProtectableItem)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(VirtualMachineId)) - { - writer.WritePropertyName("virtualMachineId"u8); - writer.WriteStringValue(VirtualMachineId); - } - if (Optional.IsDefined(VirtualMachineVersion)) - { - writer.WritePropertyName("virtualMachineVersion"u8); - writer.WriteStringValue(VirtualMachineVersion); - } - if (Optional.IsDefined(ResourceGroup)) - { - writer.WritePropertyName("resourceGroup"u8); - writer.WriteStringValue(ResourceGroup); - } - if (Optional.IsDefined(BackupManagementType)) - { - writer.WritePropertyName("backupManagementType"u8); - writer.WriteStringValue(BackupManagementType); - } - if (Optional.IsDefined(WorkloadType)) - { - writer.WritePropertyName("workloadType"u8); - writer.WriteStringValue(WorkloadType); - } - writer.WritePropertyName("protectableItemType"u8); - writer.WriteStringValue(ProtectableItemType); - if (Optional.IsDefined(FriendlyName)) - { - writer.WritePropertyName("friendlyName"u8); - writer.WriteStringValue(FriendlyName); - } - if (Optional.IsDefined(ProtectionState)) - { - writer.WritePropertyName("protectionState"u8); - writer.WriteStringValue(ProtectionState.Value.ToString()); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } IaasComputeVmProtectableItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasComputeVmProtectedItem.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasComputeVmProtectedItem.Serialization.cs index 1088e1e11683..b3286f304482 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasComputeVmProtectedItem.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasComputeVmProtectedItem.Serialization.cs @@ -18,6 +18,15 @@ public partial class IaasComputeVmProtectedItem : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,191 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(IaasComputeVmProtectedItem)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W" && Optional.IsDefined(FriendlyName)) - { - writer.WritePropertyName("friendlyName"u8); - writer.WriteStringValue(FriendlyName); - } - if (options.Format != "W" && Optional.IsDefined(VirtualMachineId)) - { - writer.WritePropertyName("virtualMachineId"u8); - writer.WriteStringValue(VirtualMachineId); - } - if (Optional.IsDefined(ProtectionStatus)) - { - writer.WritePropertyName("protectionStatus"u8); - writer.WriteStringValue(ProtectionStatus); - } - if (Optional.IsDefined(ProtectionState)) - { - writer.WritePropertyName("protectionState"u8); - writer.WriteStringValue(ProtectionState.Value.ToString()); - } - if (options.Format != "W" && Optional.IsDefined(HealthStatus)) - { - writer.WritePropertyName("healthStatus"u8); - writer.WriteStringValue(HealthStatus.Value.ToString()); - } - if (Optional.IsCollectionDefined(HealthDetails)) - { - writer.WritePropertyName("healthDetails"u8); - writer.WriteStartArray(); - foreach (var item in HealthDetails) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(KpisHealths)) - { - writer.WritePropertyName("kpisHealths"u8); - writer.WriteStartObject(); - foreach (var item in KpisHealths) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value, options); - } - writer.WriteEndObject(); - } - if (Optional.IsDefined(LastBackupStatus)) - { - writer.WritePropertyName("lastBackupStatus"u8); - writer.WriteStringValue(LastBackupStatus); - } - if (options.Format != "W" && Optional.IsDefined(LastBackupOn)) - { - writer.WritePropertyName("lastBackupTime"u8); - writer.WriteStringValue(LastBackupOn.Value, "O"); - } - if (options.Format != "W" && Optional.IsDefined(ProtectedItemDataId)) - { - writer.WritePropertyName("protectedItemDataId"u8); - writer.WriteStringValue(ProtectedItemDataId); - } - if (Optional.IsDefined(ExtendedInfo)) - { - writer.WritePropertyName("extendedInfo"u8); - writer.WriteObjectValue(ExtendedInfo, options); - } - if (Optional.IsDefined(ExtendedProperties)) - { - writer.WritePropertyName("extendedProperties"u8); - writer.WriteObjectValue(ExtendedProperties, options); - } - writer.WritePropertyName("protectedItemType"u8); - writer.WriteStringValue(ProtectedItemType); - if (options.Format != "W" && Optional.IsDefined(BackupManagementType)) - { - writer.WritePropertyName("backupManagementType"u8); - writer.WriteStringValue(BackupManagementType.Value.ToString()); - } - if (options.Format != "W" && Optional.IsDefined(WorkloadType)) - { - writer.WritePropertyName("workloadType"u8); - writer.WriteStringValue(WorkloadType.Value.ToString()); - } - if (Optional.IsDefined(ContainerName)) - { - writer.WritePropertyName("containerName"u8); - writer.WriteStringValue(ContainerName); - } - if (Optional.IsDefined(SourceResourceId)) - { - writer.WritePropertyName("sourceResourceId"u8); - writer.WriteStringValue(SourceResourceId); - } - if (Optional.IsDefined(PolicyId)) - { - writer.WritePropertyName("policyId"u8); - writer.WriteStringValue(PolicyId); - } - if (Optional.IsDefined(LastRecoverOn)) - { - writer.WritePropertyName("lastRecoveryPoint"u8); - writer.WriteStringValue(LastRecoverOn.Value, "O"); - } - if (Optional.IsDefined(BackupSetName)) - { - writer.WritePropertyName("backupSetName"u8); - writer.WriteStringValue(BackupSetName); - } - if (Optional.IsDefined(CreateMode)) - { - writer.WritePropertyName("createMode"u8); - writer.WriteStringValue(CreateMode.Value.ToString()); - } - if (Optional.IsDefined(DeferredDeletedOn)) - { - writer.WritePropertyName("deferredDeleteTimeInUTC"u8); - writer.WriteStringValue(DeferredDeletedOn.Value, "O"); - } - if (Optional.IsDefined(IsScheduledForDeferredDelete)) - { - writer.WritePropertyName("isScheduledForDeferredDelete"u8); - writer.WriteBooleanValue(IsScheduledForDeferredDelete.Value); - } - if (Optional.IsDefined(DeferredDeleteTimeRemaining)) - { - writer.WritePropertyName("deferredDeleteTimeRemaining"u8); - writer.WriteStringValue(DeferredDeleteTimeRemaining); - } - if (Optional.IsDefined(IsDeferredDeleteScheduleUpcoming)) - { - writer.WritePropertyName("isDeferredDeleteScheduleUpcoming"u8); - writer.WriteBooleanValue(IsDeferredDeleteScheduleUpcoming.Value); - } - if (Optional.IsDefined(IsRehydrate)) - { - writer.WritePropertyName("isRehydrate"u8); - writer.WriteBooleanValue(IsRehydrate.Value); - } - if (Optional.IsCollectionDefined(ResourceGuardOperationRequests)) - { - writer.WritePropertyName("resourceGuardOperationRequests"u8); - writer.WriteStartArray(); - foreach (var item in ResourceGuardOperationRequests) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(IsArchiveEnabled)) - { - writer.WritePropertyName("isArchiveEnabled"u8); - writer.WriteBooleanValue(IsArchiveEnabled.Value); - } - if (Optional.IsDefined(PolicyName)) - { - writer.WritePropertyName("policyName"u8); - writer.WriteStringValue(PolicyName); - } - if (Optional.IsDefined(SoftDeleteRetentionPeriodInDays)) - { - writer.WritePropertyName("softDeleteRetentionPeriodInDays"u8); - writer.WriteNumberValue(SoftDeleteRetentionPeriodInDays.Value); - } - if (options.Format != "W" && Optional.IsDefined(VaultId)) - { - writer.WritePropertyName("vaultId"u8); - writer.WriteStringValue(VaultId); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } IaasComputeVmProtectedItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmBackupContent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmBackupContent.Serialization.cs index f594ec4c6600..224aad7c8259 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmBackupContent.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmBackupContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class IaasVmBackupContent : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,30 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(IaasVmBackupContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(RecoveryPointExpireOn)) { writer.WritePropertyName("recoveryPointExpiryTimeInUTC"u8); writer.WriteStringValue(RecoveryPointExpireOn.Value, "O"); } - writer.WritePropertyName("objectType"u8); - writer.WriteStringValue(ObjectType); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } IaasVmBackupContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmBackupExtendedProperties.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmBackupExtendedProperties.Serialization.cs index a51efbc3fa91..daf37341dae0 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmBackupExtendedProperties.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmBackupExtendedProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class IaasVmBackupExtendedProperties : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(IaasVmBackupExtendedProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(DiskExclusionProperties)) { writer.WritePropertyName("diskExclusionProperties"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } IaasVmBackupExtendedProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmBackupJob.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmBackupJob.Serialization.cs index 142c84843609..ec00a71b7a6d 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmBackupJob.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmBackupJob.Serialization.cs @@ -18,6 +18,15 @@ public partial class IaasVmBackupJob : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(IaasVmBackupJob)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Duration)) { writer.WritePropertyName("duration"u8); @@ -71,59 +80,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO writer.WritePropertyName("isUserTriggered"u8); writer.WriteBooleanValue(IsUserTriggered.Value); } - if (Optional.IsDefined(EntityFriendlyName)) - { - writer.WritePropertyName("entityFriendlyName"u8); - writer.WriteStringValue(EntityFriendlyName); - } - if (Optional.IsDefined(BackupManagementType)) - { - writer.WritePropertyName("backupManagementType"u8); - writer.WriteStringValue(BackupManagementType.Value.ToString()); - } - if (Optional.IsDefined(Operation)) - { - writer.WritePropertyName("operation"u8); - writer.WriteStringValue(Operation); - } - if (Optional.IsDefined(Status)) - { - writer.WritePropertyName("status"u8); - writer.WriteStringValue(Status); - } - if (Optional.IsDefined(StartOn)) - { - writer.WritePropertyName("startTime"u8); - writer.WriteStringValue(StartOn.Value, "O"); - } - if (Optional.IsDefined(EndOn)) - { - writer.WritePropertyName("endTime"u8); - writer.WriteStringValue(EndOn.Value, "O"); - } - if (Optional.IsDefined(ActivityId)) - { - writer.WritePropertyName("activityId"u8); - writer.WriteStringValue(ActivityId); - } - writer.WritePropertyName("jobType"u8); - writer.WriteStringValue(JobType); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } IaasVmBackupJob IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmBackupJobExtendedInfo.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmBackupJobExtendedInfo.Serialization.cs index 4e9879d11ff9..a675e488e546 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmBackupJobExtendedInfo.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmBackupJobExtendedInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class IaasVmBackupJobExtendedInfo : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(IaasVmBackupJobExtendedInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(TasksList)) { writer.WritePropertyName("tasksList"u8); @@ -88,7 +96,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } IaasVmBackupJobExtendedInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmBackupJobTaskDetails.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmBackupJobTaskDetails.Serialization.cs index 590f1c612985..9c5a86254392 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmBackupJobTaskDetails.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmBackupJobTaskDetails.Serialization.cs @@ -18,6 +18,15 @@ public partial class IaasVmBackupJobTaskDetails : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(IaasVmBackupJobTaskDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(TaskId)) { writer.WritePropertyName("taskId"u8); @@ -81,7 +89,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } IaasVmBackupJobTaskDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmBackupJobV2.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmBackupJobV2.Serialization.cs index a0a54db49986..86588d21054d 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmBackupJobV2.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmBackupJobV2.Serialization.cs @@ -18,6 +18,15 @@ public partial class IaasVmBackupJobV2 : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(IaasVmBackupJobV2)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(ActionsInfo)) { writer.WritePropertyName("actionsInfo"u8); @@ -66,59 +75,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite writer.WritePropertyName("extendedInfo"u8); writer.WriteObjectValue(ExtendedInfo, options); } - if (Optional.IsDefined(EntityFriendlyName)) - { - writer.WritePropertyName("entityFriendlyName"u8); - writer.WriteStringValue(EntityFriendlyName); - } - if (Optional.IsDefined(BackupManagementType)) - { - writer.WritePropertyName("backupManagementType"u8); - writer.WriteStringValue(BackupManagementType.Value.ToString()); - } - if (Optional.IsDefined(Operation)) - { - writer.WritePropertyName("operation"u8); - writer.WriteStringValue(Operation); - } - if (Optional.IsDefined(Status)) - { - writer.WritePropertyName("status"u8); - writer.WriteStringValue(Status); - } - if (Optional.IsDefined(StartOn)) - { - writer.WritePropertyName("startTime"u8); - writer.WriteStringValue(StartOn.Value, "O"); - } - if (Optional.IsDefined(EndOn)) - { - writer.WritePropertyName("endTime"u8); - writer.WriteStringValue(EndOn.Value, "O"); - } - if (Optional.IsDefined(ActivityId)) - { - writer.WritePropertyName("activityId"u8); - writer.WriteStringValue(ActivityId); - } - writer.WritePropertyName("jobType"u8); - writer.WriteStringValue(JobType); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } IaasVmBackupJobV2 IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmContainer.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmContainer.Serialization.cs index da8b25481c1f..a0ff42d62170 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmContainer.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmContainer.Serialization.cs @@ -18,6 +18,15 @@ public partial class IaasVmContainer : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(IaasVmContainer)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(VirtualMachineId)) { writer.WritePropertyName("virtualMachineId"u8); @@ -41,49 +50,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO writer.WritePropertyName("resourceGroup"u8); writer.WriteStringValue(ResourceGroup); } - if (Optional.IsDefined(FriendlyName)) - { - writer.WritePropertyName("friendlyName"u8); - writer.WriteStringValue(FriendlyName); - } - if (Optional.IsDefined(BackupManagementType)) - { - writer.WritePropertyName("backupManagementType"u8); - writer.WriteStringValue(BackupManagementType.Value.ToString()); - } - if (Optional.IsDefined(RegistrationStatus)) - { - writer.WritePropertyName("registrationStatus"u8); - writer.WriteStringValue(RegistrationStatus); - } - if (Optional.IsDefined(HealthStatus)) - { - writer.WritePropertyName("healthStatus"u8); - writer.WriteStringValue(HealthStatus); - } - writer.WritePropertyName("containerType"u8); - writer.WriteStringValue(ContainerType.ToSerialString()); - if (Optional.IsDefined(ProtectableObjectType)) - { - writer.WritePropertyName("protectableObjectType"u8); - writer.WriteStringValue(ProtectableObjectType); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } IaasVmContainer IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmErrorInfo.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmErrorInfo.Serialization.cs index 776be918f117..05e83ae7b0cc 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmErrorInfo.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmErrorInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class IaasVmErrorInfo : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(IaasVmErrorInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ErrorCode)) { writer.WritePropertyName("errorCode"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO #endif } } - writer.WriteEndObject(); } IaasVmErrorInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmHealthDetails.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmHealthDetails.Serialization.cs index 7773d9c90529..22e67ca71d1c 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmHealthDetails.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmHealthDetails.Serialization.cs @@ -18,6 +18,15 @@ public partial class IaasVmHealthDetails : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,48 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(IaasVmHealthDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W" && Optional.IsDefined(Code)) - { - writer.WritePropertyName("code"u8); - writer.WriteNumberValue(Code.Value); - } - if (options.Format != "W" && Optional.IsDefined(Title)) - { - writer.WritePropertyName("title"u8); - writer.WriteStringValue(Title); - } - if (options.Format != "W" && Optional.IsDefined(Message)) - { - writer.WritePropertyName("message"u8); - writer.WriteStringValue(Message); - } - if (options.Format != "W" && Optional.IsCollectionDefined(Recommendations)) - { - writer.WritePropertyName("recommendations"u8); - writer.WriteStartArray(); - foreach (var item in Recommendations) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } IaasVmHealthDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmIlrRegistrationContent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmIlrRegistrationContent.Serialization.cs index 761b2755ae65..f14adb907ab4 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmIlrRegistrationContent.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmIlrRegistrationContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class IaasVmIlrRegistrationContent : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(IaasVmIlrRegistrationContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(RecoveryPointId)) { writer.WritePropertyName("recoveryPointId"u8); @@ -46,24 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model writer.WritePropertyName("renewExistingRegistration"u8); writer.WriteBooleanValue(RenewExistingRegistration.Value); } - writer.WritePropertyName("objectType"u8); - writer.WriteStringValue(ObjectType); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } IaasVmIlrRegistrationContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmProtectableItem.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmProtectableItem.Serialization.cs index f4829566160f..b72f4913c446 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmProtectableItem.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmProtectableItem.Serialization.cs @@ -18,6 +18,15 @@ public partial class IaasVmProtectableItem : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(IaasVmProtectableItem)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(VirtualMachineId)) { writer.WritePropertyName("virtualMachineId"u8); @@ -41,44 +50,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW writer.WritePropertyName("resourceGroup"u8); writer.WriteStringValue(ResourceGroup); } - if (Optional.IsDefined(BackupManagementType)) - { - writer.WritePropertyName("backupManagementType"u8); - writer.WriteStringValue(BackupManagementType); - } - if (Optional.IsDefined(WorkloadType)) - { - writer.WritePropertyName("workloadType"u8); - writer.WriteStringValue(WorkloadType); - } - writer.WritePropertyName("protectableItemType"u8); - writer.WriteStringValue(ProtectableItemType); - if (Optional.IsDefined(FriendlyName)) - { - writer.WritePropertyName("friendlyName"u8); - writer.WriteStringValue(FriendlyName); - } - if (Optional.IsDefined(ProtectionState)) - { - writer.WritePropertyName("protectionState"u8); - writer.WriteStringValue(ProtectionState.Value.ToString()); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } IaasVmProtectableItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmProtectedItem.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmProtectedItem.Serialization.cs index 68fef75deced..84111ce0aa81 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmProtectedItem.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmProtectedItem.Serialization.cs @@ -18,6 +18,15 @@ public partial class IaasVmProtectedItem : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(IaasVmProtectedItem)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(FriendlyName)) { writer.WritePropertyName("friendlyName"u8); @@ -97,119 +106,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("extendedProperties"u8); writer.WriteObjectValue(ExtendedProperties, options); } - writer.WritePropertyName("protectedItemType"u8); - writer.WriteStringValue(ProtectedItemType); - if (options.Format != "W" && Optional.IsDefined(BackupManagementType)) - { - writer.WritePropertyName("backupManagementType"u8); - writer.WriteStringValue(BackupManagementType.Value.ToString()); - } - if (options.Format != "W" && Optional.IsDefined(WorkloadType)) - { - writer.WritePropertyName("workloadType"u8); - writer.WriteStringValue(WorkloadType.Value.ToString()); - } - if (Optional.IsDefined(ContainerName)) - { - writer.WritePropertyName("containerName"u8); - writer.WriteStringValue(ContainerName); - } - if (Optional.IsDefined(SourceResourceId)) - { - writer.WritePropertyName("sourceResourceId"u8); - writer.WriteStringValue(SourceResourceId); - } - if (Optional.IsDefined(PolicyId)) - { - writer.WritePropertyName("policyId"u8); - writer.WriteStringValue(PolicyId); - } - if (Optional.IsDefined(LastRecoverOn)) - { - writer.WritePropertyName("lastRecoveryPoint"u8); - writer.WriteStringValue(LastRecoverOn.Value, "O"); - } - if (Optional.IsDefined(BackupSetName)) - { - writer.WritePropertyName("backupSetName"u8); - writer.WriteStringValue(BackupSetName); - } - if (Optional.IsDefined(CreateMode)) - { - writer.WritePropertyName("createMode"u8); - writer.WriteStringValue(CreateMode.Value.ToString()); - } - if (Optional.IsDefined(DeferredDeletedOn)) - { - writer.WritePropertyName("deferredDeleteTimeInUTC"u8); - writer.WriteStringValue(DeferredDeletedOn.Value, "O"); - } - if (Optional.IsDefined(IsScheduledForDeferredDelete)) - { - writer.WritePropertyName("isScheduledForDeferredDelete"u8); - writer.WriteBooleanValue(IsScheduledForDeferredDelete.Value); - } - if (Optional.IsDefined(DeferredDeleteTimeRemaining)) - { - writer.WritePropertyName("deferredDeleteTimeRemaining"u8); - writer.WriteStringValue(DeferredDeleteTimeRemaining); - } - if (Optional.IsDefined(IsDeferredDeleteScheduleUpcoming)) - { - writer.WritePropertyName("isDeferredDeleteScheduleUpcoming"u8); - writer.WriteBooleanValue(IsDeferredDeleteScheduleUpcoming.Value); - } - if (Optional.IsDefined(IsRehydrate)) - { - writer.WritePropertyName("isRehydrate"u8); - writer.WriteBooleanValue(IsRehydrate.Value); - } - if (Optional.IsCollectionDefined(ResourceGuardOperationRequests)) - { - writer.WritePropertyName("resourceGuardOperationRequests"u8); - writer.WriteStartArray(); - foreach (var item in ResourceGuardOperationRequests) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(IsArchiveEnabled)) - { - writer.WritePropertyName("isArchiveEnabled"u8); - writer.WriteBooleanValue(IsArchiveEnabled.Value); - } - if (Optional.IsDefined(PolicyName)) - { - writer.WritePropertyName("policyName"u8); - writer.WriteStringValue(PolicyName); - } - if (Optional.IsDefined(SoftDeleteRetentionPeriodInDays)) - { - writer.WritePropertyName("softDeleteRetentionPeriodInDays"u8); - writer.WriteNumberValue(SoftDeleteRetentionPeriodInDays.Value); - } - if (options.Format != "W" && Optional.IsDefined(VaultId)) - { - writer.WritePropertyName("vaultId"u8); - writer.WriteStringValue(VaultId); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } IaasVmProtectedItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmProtectedItemExtendedInfo.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmProtectedItemExtendedInfo.Serialization.cs index eb8107d7a826..4261be895a5a 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmProtectedItemExtendedInfo.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmProtectedItemExtendedInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class IaasVmProtectedItemExtendedInfo : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(IaasVmProtectedItemExtendedInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(OldestRecoverOn)) { writer.WritePropertyName("oldestRecoveryPoint"u8); @@ -71,7 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } IaasVmProtectedItemExtendedInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmProtectionPolicy.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmProtectionPolicy.Serialization.cs index 86775cd586e3..9417ca91384e 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmProtectionPolicy.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmProtectionPolicy.Serialization.cs @@ -18,6 +18,15 @@ public partial class IaasVmProtectionPolicy : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(IaasVmProtectionPolicy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(InstantRPDetails)) { writer.WritePropertyName("instantRPDetails"u8); @@ -67,39 +76,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader writer.WritePropertyName("policyType"u8); writer.WriteStringValue(PolicyType.Value.ToString()); } - if (Optional.IsDefined(ProtectedItemsCount)) - { - writer.WritePropertyName("protectedItemsCount"u8); - writer.WriteNumberValue(ProtectedItemsCount.Value); - } - writer.WritePropertyName("backupManagementType"u8); - writer.WriteStringValue(BackupManagementType); - if (Optional.IsCollectionDefined(ResourceGuardOperationRequests)) - { - writer.WritePropertyName("resourceGuardOperationRequests"u8); - writer.WriteStartArray(); - foreach (var item in ResourceGuardOperationRequests) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } IaasVmProtectionPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmRecoveryPoint.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmRecoveryPoint.Serialization.cs index 3350a763de50..4e4e3625cfe8 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmRecoveryPoint.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmRecoveryPoint.Serialization.cs @@ -19,6 +19,15 @@ public partial class IaasVmRecoveryPoint : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(IaasVmRecoveryPoint)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(RecoveryPointType)) { writer.WritePropertyName("recoveryPointType"u8); @@ -138,24 +147,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("extendedLocation"u8); JsonSerializer.Serialize(writer, ExtendedLocation); } - writer.WritePropertyName("objectType"u8); - writer.WriteStringValue(ObjectType); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } IaasVmRecoveryPoint IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmRestoreContent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmRestoreContent.Serialization.cs index eb0184c34c94..6bc8422c6f5d 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmRestoreContent.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmRestoreContent.Serialization.cs @@ -19,6 +19,15 @@ public partial class IaasVmRestoreContent : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(IaasVmRestoreContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(RecoveryPointId)) { writer.WritePropertyName("recoveryPointId"u8); @@ -152,24 +161,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr writer.WritePropertyName("targetDiskNetworkAccessSettings"u8); writer.WriteObjectValue(TargetDiskNetworkAccessSettings, options); } - writer.WritePropertyName("objectType"u8); - writer.WriteStringValue(ObjectType); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } IaasVmRestoreContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmRestoreWithRehydrationContent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmRestoreWithRehydrationContent.Serialization.cs index 97e92b0a34f3..ff96f3672c2b 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmRestoreWithRehydrationContent.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmRestoreWithRehydrationContent.Serialization.cs @@ -19,6 +19,15 @@ public partial class IaasVmRestoreWithRehydrationContent : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,155 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(IaasVmRestoreWithRehydrationContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(RecoveryPointRehydrationInfo)) { writer.WritePropertyName("recoveryPointRehydrationInfo"u8); writer.WriteObjectValue(RecoveryPointRehydrationInfo, options); } - if (Optional.IsDefined(RecoveryPointId)) - { - writer.WritePropertyName("recoveryPointId"u8); - writer.WriteStringValue(RecoveryPointId); - } - if (Optional.IsDefined(RecoveryType)) - { - writer.WritePropertyName("recoveryType"u8); - writer.WriteStringValue(RecoveryType.Value.ToString()); - } - if (Optional.IsDefined(SourceResourceId)) - { - writer.WritePropertyName("sourceResourceId"u8); - writer.WriteStringValue(SourceResourceId); - } - if (Optional.IsDefined(TargetVirtualMachineId)) - { - writer.WritePropertyName("targetVirtualMachineId"u8); - writer.WriteStringValue(TargetVirtualMachineId); - } - if (Optional.IsDefined(TargetResourceGroupId)) - { - writer.WritePropertyName("targetResourceGroupId"u8); - writer.WriteStringValue(TargetResourceGroupId); - } - if (Optional.IsDefined(StorageAccountId)) - { - writer.WritePropertyName("storageAccountId"u8); - writer.WriteStringValue(StorageAccountId); - } - if (Optional.IsDefined(VirtualNetworkId)) - { - writer.WritePropertyName("virtualNetworkId"u8); - writer.WriteStringValue(VirtualNetworkId); - } - if (Optional.IsDefined(SubnetId)) - { - writer.WritePropertyName("subnetId"u8); - writer.WriteStringValue(SubnetId); - } - if (Optional.IsDefined(TargetDomainNameId)) - { - writer.WritePropertyName("targetDomainNameId"u8); - writer.WriteStringValue(TargetDomainNameId); - } - if (Optional.IsDefined(Region)) - { - writer.WritePropertyName("region"u8); - writer.WriteStringValue(Region.Value); - } - if (Optional.IsDefined(AffinityGroup)) - { - writer.WritePropertyName("affinityGroup"u8); - writer.WriteStringValue(AffinityGroup); - } - if (Optional.IsDefined(DoesCreateNewCloudService)) - { - writer.WritePropertyName("createNewCloudService"u8); - writer.WriteBooleanValue(DoesCreateNewCloudService.Value); - } - if (Optional.IsDefined(OriginalStorageAccountOption)) - { - writer.WritePropertyName("originalStorageAccountOption"u8); - writer.WriteBooleanValue(OriginalStorageAccountOption.Value); - } - if (Optional.IsDefined(EncryptionDetails)) - { - writer.WritePropertyName("encryptionDetails"u8); - writer.WriteObjectValue(EncryptionDetails, options); - } - if (Optional.IsCollectionDefined(RestoreDiskLunList)) - { - writer.WritePropertyName("restoreDiskLunList"u8); - writer.WriteStartArray(); - foreach (var item in RestoreDiskLunList) - { - writer.WriteNumberValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(DoesRestoreWithManagedDisks)) - { - writer.WritePropertyName("restoreWithManagedDisks"u8); - writer.WriteBooleanValue(DoesRestoreWithManagedDisks.Value); - } - if (Optional.IsDefined(DiskEncryptionSetId)) - { - writer.WritePropertyName("diskEncryptionSetId"u8); - writer.WriteStringValue(DiskEncryptionSetId); - } - if (Optional.IsCollectionDefined(Zones)) - { - writer.WritePropertyName("zones"u8); - writer.WriteStartArray(); - foreach (var item in Zones) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(IdentityInfo)) - { - writer.WritePropertyName("identityInfo"u8); - writer.WriteObjectValue(IdentityInfo, options); - } - if (Optional.IsDefined(IdentityBasedRestoreDetails)) - { - writer.WritePropertyName("identityBasedRestoreDetails"u8); - writer.WriteObjectValue(IdentityBasedRestoreDetails, options); - } - if (Optional.IsDefined(ExtendedLocation)) - { - writer.WritePropertyName("extendedLocation"u8); - JsonSerializer.Serialize(writer, ExtendedLocation); - } - if (Optional.IsDefined(SecuredVmDetails)) - { - writer.WritePropertyName("securedVMDetails"u8); - writer.WriteObjectValue(SecuredVmDetails, options); - } - if (Optional.IsDefined(TargetDiskNetworkAccessSettings)) - { - writer.WritePropertyName("targetDiskNetworkAccessSettings"u8); - writer.WriteObjectValue(TargetDiskNetworkAccessSettings, options); - } - writer.WritePropertyName("objectType"u8); - writer.WriteStringValue(ObjectType); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } IaasVmRestoreWithRehydrationContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IdentityBasedRestoreDetails.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IdentityBasedRestoreDetails.Serialization.cs index 26416ef4d2c6..3cc60166d1f1 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IdentityBasedRestoreDetails.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IdentityBasedRestoreDetails.Serialization.cs @@ -18,6 +18,15 @@ public partial class IdentityBasedRestoreDetails : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(IdentityBasedRestoreDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ObjectType)) { writer.WritePropertyName("objectType"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } IdentityBasedRestoreDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IlrContent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IlrContent.Serialization.cs index 886aa9010127..aed8882fc66e 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IlrContent.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IlrContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class IlrContent : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOption throw new FormatException($"The model {nameof(IlrContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("objectType"u8); writer.WriteStringValue(ObjectType); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOption #endif } } - writer.WriteEndObject(); } IlrContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/InquiryValidation.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/InquiryValidation.Serialization.cs index adf31b8e613f..349e4414685a 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/InquiryValidation.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/InquiryValidation.Serialization.cs @@ -18,6 +18,15 @@ public partial class InquiryValidation : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(InquiryValidation)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Status)) { writer.WritePropertyName("status"u8); @@ -68,7 +76,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } InquiryValidation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/InstantRPAdditionalDetails.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/InstantRPAdditionalDetails.Serialization.cs index e45f9489378f..b2de2fe308dc 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/InstantRPAdditionalDetails.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/InstantRPAdditionalDetails.Serialization.cs @@ -18,6 +18,15 @@ public partial class InstantRPAdditionalDetails : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(InstantRPAdditionalDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(AzureBackupRGNamePrefix)) { writer.WritePropertyName("azureBackupRGNamePrefix"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } InstantRPAdditionalDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/KekDetails.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/KekDetails.Serialization.cs index e5e98885ecf5..97ededa8c82e 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/KekDetails.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/KekDetails.Serialization.cs @@ -18,6 +18,15 @@ public partial class KekDetails : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOption throw new FormatException($"The model {nameof(KekDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(KeyUri)) { writer.WritePropertyName("keyUrl"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOption #endif } } - writer.WriteEndObject(); } KekDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/KeyAndSecretDetails.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/KeyAndSecretDetails.Serialization.cs index 285df3eb54cd..1c73a2af594a 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/KeyAndSecretDetails.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/KeyAndSecretDetails.Serialization.cs @@ -18,6 +18,15 @@ public partial class KeyAndSecretDetails : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(KeyAndSecretDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(KekDetails)) { writer.WritePropertyName("kekDetails"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } KeyAndSecretDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/KpiResourceHealthDetails.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/KpiResourceHealthDetails.Serialization.cs index 7eadc65176db..ef35dab2d828 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/KpiResourceHealthDetails.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/KpiResourceHealthDetails.Serialization.cs @@ -18,6 +18,15 @@ public partial class KpiResourceHealthDetails : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(KpiResourceHealthDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ResourceHealthStatus)) { writer.WritePropertyName("resourceHealthStatus"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } KpiResourceHealthDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/LogSchedulePolicy.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/LogSchedulePolicy.Serialization.cs index 8ac27471e1f6..27019524eb6d 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/LogSchedulePolicy.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/LogSchedulePolicy.Serialization.cs @@ -18,6 +18,15 @@ public partial class LogSchedulePolicy : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,30 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(LogSchedulePolicy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(ScheduleFrequencyInMins)) { writer.WritePropertyName("scheduleFrequencyInMins"u8); writer.WriteNumberValue(ScheduleFrequencyInMins.Value); } - writer.WritePropertyName("schedulePolicyType"u8); - writer.WriteStringValue(SchedulePolicyType); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } LogSchedulePolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/LongTermRetentionPolicy.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/LongTermRetentionPolicy.Serialization.cs index a974e923e946..0dfe1f0b1767 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/LongTermRetentionPolicy.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/LongTermRetentionPolicy.Serialization.cs @@ -18,6 +18,15 @@ public partial class LongTermRetentionPolicy : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(LongTermRetentionPolicy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(DailySchedule)) { writer.WritePropertyName("dailySchedule"u8); @@ -46,24 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade writer.WritePropertyName("yearlySchedule"u8); writer.WriteObjectValue(YearlySchedule, options); } - writer.WritePropertyName("retentionPolicyType"u8); - writer.WriteStringValue(RetentionPolicyType); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } LongTermRetentionPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/LongTermSchedulePolicy.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/LongTermSchedulePolicy.Serialization.cs index 700bf71b1990..11c55c351a44 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/LongTermSchedulePolicy.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/LongTermSchedulePolicy.Serialization.cs @@ -18,6 +18,15 @@ public partial class LongTermSchedulePolicy : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,25 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(LongTermSchedulePolicy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("schedulePolicyType"u8); - writer.WriteStringValue(SchedulePolicyType); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } LongTermSchedulePolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/MabBackupJob.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/MabBackupJob.Serialization.cs index 1ebd43e0b12e..4ad172be4570 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/MabBackupJob.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/MabBackupJob.Serialization.cs @@ -18,6 +18,15 @@ public partial class MabBackupJob : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(MabBackupJob)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Duration)) { writer.WritePropertyName("duration"u8); @@ -71,59 +80,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti writer.WritePropertyName("extendedInfo"u8); writer.WriteObjectValue(ExtendedInfo, options); } - if (Optional.IsDefined(EntityFriendlyName)) - { - writer.WritePropertyName("entityFriendlyName"u8); - writer.WriteStringValue(EntityFriendlyName); - } - if (Optional.IsDefined(BackupManagementType)) - { - writer.WritePropertyName("backupManagementType"u8); - writer.WriteStringValue(BackupManagementType.Value.ToString()); - } - if (Optional.IsDefined(Operation)) - { - writer.WritePropertyName("operation"u8); - writer.WriteStringValue(Operation); - } - if (Optional.IsDefined(Status)) - { - writer.WritePropertyName("status"u8); - writer.WriteStringValue(Status); - } - if (Optional.IsDefined(StartOn)) - { - writer.WritePropertyName("startTime"u8); - writer.WriteStringValue(StartOn.Value, "O"); - } - if (Optional.IsDefined(EndOn)) - { - writer.WritePropertyName("endTime"u8); - writer.WriteStringValue(EndOn.Value, "O"); - } - if (Optional.IsDefined(ActivityId)) - { - writer.WritePropertyName("activityId"u8); - writer.WriteStringValue(ActivityId); - } - writer.WritePropertyName("jobType"u8); - writer.WriteStringValue(JobType); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } MabBackupJob IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/MabBackupJobExtendedInfo.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/MabBackupJobExtendedInfo.Serialization.cs index 0a61196905f7..b479977bb58f 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/MabBackupJobExtendedInfo.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/MabBackupJobExtendedInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class MabBackupJobExtendedInfo : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(MabBackupJobExtendedInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(TasksList)) { writer.WritePropertyName("tasksList"u8); @@ -67,7 +75,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } MabBackupJobExtendedInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/MabBackupJobTaskDetails.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/MabBackupJobTaskDetails.Serialization.cs index f2b22a1f7c2d..db64880e5312 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/MabBackupJobTaskDetails.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/MabBackupJobTaskDetails.Serialization.cs @@ -18,6 +18,15 @@ public partial class MabBackupJobTaskDetails : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(MabBackupJobTaskDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(TaskId)) { writer.WritePropertyName("taskId"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } MabBackupJobTaskDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/MabContainer.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/MabContainer.Serialization.cs index fc6ceed3b6b3..b88b75415f89 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/MabContainer.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/MabContainer.Serialization.cs @@ -18,6 +18,15 @@ public partial class MabContainer : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(MabContainer)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(CanReRegister)) { writer.WritePropertyName("canReRegister"u8); @@ -66,49 +75,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti writer.WritePropertyName("containerHealthState"u8); writer.WriteStringValue(ContainerHealthState); } - if (Optional.IsDefined(FriendlyName)) - { - writer.WritePropertyName("friendlyName"u8); - writer.WriteStringValue(FriendlyName); - } - if (Optional.IsDefined(BackupManagementType)) - { - writer.WritePropertyName("backupManagementType"u8); - writer.WriteStringValue(BackupManagementType.Value.ToString()); - } - if (Optional.IsDefined(RegistrationStatus)) - { - writer.WritePropertyName("registrationStatus"u8); - writer.WriteStringValue(RegistrationStatus); - } - if (Optional.IsDefined(HealthStatus)) - { - writer.WritePropertyName("healthStatus"u8); - writer.WriteStringValue(HealthStatus); - } - writer.WritePropertyName("containerType"u8); - writer.WriteStringValue(ContainerType.ToSerialString()); - if (Optional.IsDefined(ProtectableObjectType)) - { - writer.WritePropertyName("protectableObjectType"u8); - writer.WriteStringValue(ProtectableObjectType); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } MabContainer IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/MabContainerExtendedInfo.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/MabContainerExtendedInfo.Serialization.cs index 2631b3f0553d..7c2f647f908b 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/MabContainerExtendedInfo.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/MabContainerExtendedInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class MabContainerExtendedInfo : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(MabContainerExtendedInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(LastRefreshedOn)) { writer.WritePropertyName("lastRefreshedAt"u8); @@ -71,7 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } MabContainerExtendedInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/MabContainerHealthDetails.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/MabContainerHealthDetails.Serialization.cs index 9c02b3d62279..ce78eeb647ee 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/MabContainerHealthDetails.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/MabContainerHealthDetails.Serialization.cs @@ -18,6 +18,15 @@ public partial class MabContainerHealthDetails : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(MabContainerHealthDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Code)) { writer.WritePropertyName("code"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } MabContainerHealthDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/MabErrorInfo.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/MabErrorInfo.Serialization.cs index 4697eeffda9a..2e9d150a4a6e 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/MabErrorInfo.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/MabErrorInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class MabErrorInfo : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(MabErrorInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ErrorString)) { writer.WritePropertyName("errorString"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti #endif } } - writer.WriteEndObject(); } MabErrorInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/MabFileFolderProtectedItem.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/MabFileFolderProtectedItem.Serialization.cs index a5f79e10c32e..4f5692c406e1 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/MabFileFolderProtectedItem.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/MabFileFolderProtectedItem.Serialization.cs @@ -18,6 +18,15 @@ public partial class MabFileFolderProtectedItem : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(MabFileFolderProtectedItem)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(FriendlyName)) { writer.WritePropertyName("friendlyName"u8); @@ -61,119 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe writer.WritePropertyName("extendedInfo"u8); writer.WriteObjectValue(ExtendedInfo, options); } - writer.WritePropertyName("protectedItemType"u8); - writer.WriteStringValue(ProtectedItemType); - if (options.Format != "W" && Optional.IsDefined(BackupManagementType)) - { - writer.WritePropertyName("backupManagementType"u8); - writer.WriteStringValue(BackupManagementType.Value.ToString()); - } - if (options.Format != "W" && Optional.IsDefined(WorkloadType)) - { - writer.WritePropertyName("workloadType"u8); - writer.WriteStringValue(WorkloadType.Value.ToString()); - } - if (Optional.IsDefined(ContainerName)) - { - writer.WritePropertyName("containerName"u8); - writer.WriteStringValue(ContainerName); - } - if (Optional.IsDefined(SourceResourceId)) - { - writer.WritePropertyName("sourceResourceId"u8); - writer.WriteStringValue(SourceResourceId); - } - if (Optional.IsDefined(PolicyId)) - { - writer.WritePropertyName("policyId"u8); - writer.WriteStringValue(PolicyId); - } - if (Optional.IsDefined(LastRecoverOn)) - { - writer.WritePropertyName("lastRecoveryPoint"u8); - writer.WriteStringValue(LastRecoverOn.Value, "O"); - } - if (Optional.IsDefined(BackupSetName)) - { - writer.WritePropertyName("backupSetName"u8); - writer.WriteStringValue(BackupSetName); - } - if (Optional.IsDefined(CreateMode)) - { - writer.WritePropertyName("createMode"u8); - writer.WriteStringValue(CreateMode.Value.ToString()); - } - if (Optional.IsDefined(DeferredDeletedOn)) - { - writer.WritePropertyName("deferredDeleteTimeInUTC"u8); - writer.WriteStringValue(DeferredDeletedOn.Value, "O"); - } - if (Optional.IsDefined(IsScheduledForDeferredDelete)) - { - writer.WritePropertyName("isScheduledForDeferredDelete"u8); - writer.WriteBooleanValue(IsScheduledForDeferredDelete.Value); - } - if (Optional.IsDefined(DeferredDeleteTimeRemaining)) - { - writer.WritePropertyName("deferredDeleteTimeRemaining"u8); - writer.WriteStringValue(DeferredDeleteTimeRemaining); - } - if (Optional.IsDefined(IsDeferredDeleteScheduleUpcoming)) - { - writer.WritePropertyName("isDeferredDeleteScheduleUpcoming"u8); - writer.WriteBooleanValue(IsDeferredDeleteScheduleUpcoming.Value); - } - if (Optional.IsDefined(IsRehydrate)) - { - writer.WritePropertyName("isRehydrate"u8); - writer.WriteBooleanValue(IsRehydrate.Value); - } - if (Optional.IsCollectionDefined(ResourceGuardOperationRequests)) - { - writer.WritePropertyName("resourceGuardOperationRequests"u8); - writer.WriteStartArray(); - foreach (var item in ResourceGuardOperationRequests) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(IsArchiveEnabled)) - { - writer.WritePropertyName("isArchiveEnabled"u8); - writer.WriteBooleanValue(IsArchiveEnabled.Value); - } - if (Optional.IsDefined(PolicyName)) - { - writer.WritePropertyName("policyName"u8); - writer.WriteStringValue(PolicyName); - } - if (Optional.IsDefined(SoftDeleteRetentionPeriodInDays)) - { - writer.WritePropertyName("softDeleteRetentionPeriodInDays"u8); - writer.WriteNumberValue(SoftDeleteRetentionPeriodInDays.Value); - } - if (options.Format != "W" && Optional.IsDefined(VaultId)) - { - writer.WritePropertyName("vaultId"u8); - writer.WriteStringValue(VaultId); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } MabFileFolderProtectedItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/MabFileFolderProtectedItemExtendedInfo.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/MabFileFolderProtectedItemExtendedInfo.Serialization.cs index 9f7448028868..5ece1b1b232c 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/MabFileFolderProtectedItemExtendedInfo.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/MabFileFolderProtectedItemExtendedInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class MabFileFolderProtectedItemExtendedInfo : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(MabFileFolderProtectedItemExtendedInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(LastRefreshedOn)) { writer.WritePropertyName("lastRefreshedAt"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } MabFileFolderProtectedItemExtendedInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/MabProtectionPolicy.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/MabProtectionPolicy.Serialization.cs index ba923be3a7e4..05bd066f061e 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/MabProtectionPolicy.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/MabProtectionPolicy.Serialization.cs @@ -18,6 +18,15 @@ public partial class MabProtectionPolicy : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(MabProtectionPolicy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(SchedulePolicy)) { writer.WritePropertyName("schedulePolicy"u8); @@ -36,39 +45,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("retentionPolicy"u8); writer.WriteObjectValue(RetentionPolicy, options); } - if (Optional.IsDefined(ProtectedItemsCount)) - { - writer.WritePropertyName("protectedItemsCount"u8); - writer.WriteNumberValue(ProtectedItemsCount.Value); - } - writer.WritePropertyName("backupManagementType"u8); - writer.WriteStringValue(BackupManagementType); - if (Optional.IsCollectionDefined(ResourceGuardOperationRequests)) - { - writer.WritePropertyName("resourceGuardOperationRequests"u8); - writer.WriteStartArray(); - foreach (var item in ResourceGuardOperationRequests) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } MabProtectionPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/MonthlyRetentionSchedule.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/MonthlyRetentionSchedule.Serialization.cs index 5d67ad95ee89..36718525979f 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/MonthlyRetentionSchedule.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/MonthlyRetentionSchedule.Serialization.cs @@ -18,6 +18,15 @@ public partial class MonthlyRetentionSchedule : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(MonthlyRetentionSchedule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(RetentionScheduleFormatType)) { writer.WritePropertyName("retentionScheduleFormatType"u8); @@ -71,7 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } MonthlyRetentionSchedule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/MoveRPAcrossTiersContent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/MoveRPAcrossTiersContent.Serialization.cs index b7fc78eda296..833f9ef32127 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/MoveRPAcrossTiersContent.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/MoveRPAcrossTiersContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class MoveRPAcrossTiersContent : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(MoveRPAcrossTiersContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ObjectType)) { writer.WritePropertyName("objectType"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } MoveRPAcrossTiersContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/PointInTimeRange.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/PointInTimeRange.Serialization.cs index ad0f810e9315..58105b9edf55 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/PointInTimeRange.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/PointInTimeRange.Serialization.cs @@ -18,6 +18,15 @@ public partial class PointInTimeRange : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(PointInTimeRange)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(StartOn)) { writer.WritePropertyName("startTime"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } PointInTimeRange IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/PreBackupValidation.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/PreBackupValidation.Serialization.cs index 4397f45eefeb..463bd11bb34f 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/PreBackupValidation.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/PreBackupValidation.Serialization.cs @@ -18,6 +18,15 @@ public partial class PreBackupValidation : IUtf8JsonSerializable, IJsonModel
     ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri
                     throw new FormatException($"The model {nameof(PreBackupValidation)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(Status))
                 {
                     writer.WritePropertyName("status"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             PreBackupValidation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/PreValidateEnableBackupContent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/PreValidateEnableBackupContent.Serialization.cs
    index ef5903929584..9d82bb693ee8 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/PreValidateEnableBackupContent.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/PreValidateEnableBackupContent.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class PreValidateEnableBackupContent : IUtf8JsonSerializable, IJs
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod
                     throw new FormatException($"The model {nameof(PreValidateEnableBackupContent)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(ResourceType))
                 {
                     writer.WritePropertyName("resourceType"u8);
    @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             PreValidateEnableBackupContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/PreValidateEnableBackupResult.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/PreValidateEnableBackupResult.Serialization.cs
    index a79face16646..c5c7e45db016 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/PreValidateEnableBackupResult.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/PreValidateEnableBackupResult.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class PreValidateEnableBackupResult : IUtf8JsonSerializable, IJso
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode
                     throw new FormatException($"The model {nameof(PreValidateEnableBackupResult)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(Status))
                 {
                     writer.WritePropertyName("status"u8);
    @@ -71,7 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             PreValidateEnableBackupResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/PrepareDataMoveContent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/PrepareDataMoveContent.Serialization.cs
    index 355b48ed01f2..e440966f0c47 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/PrepareDataMoveContent.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/PrepareDataMoveContent.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class PrepareDataMoveContent : IUtf8JsonSerializable, IJsonModel<
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader
                     throw new FormatException($"The model {nameof(PrepareDataMoveContent)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 writer.WritePropertyName("targetResourceId"u8);
                 writer.WriteStringValue(TargetResourceId);
                 writer.WritePropertyName("targetRegion"u8);
    @@ -67,7 +75,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             PrepareDataMoveContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ProtectableContainer.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ProtectableContainer.Serialization.cs
    index a14b1674098e..f33f689ef93f 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ProtectableContainer.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ProtectableContainer.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class ProtectableContainer : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr
                     throw new FormatException($"The model {nameof(ProtectableContainer)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(FriendlyName))
                 {
                     writer.WritePropertyName("friendlyName"u8);
    @@ -63,7 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             ProtectableContainer IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ProtectableContainerResource.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ProtectableContainerResource.Serialization.cs
    index 343de1997d85..da90d2997b08 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ProtectableContainerResource.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ProtectableContainerResource.Serialization.cs
    @@ -19,6 +19,15 @@ public partial class ProtectableContainerResource : IUtf8JsonSerializable, IJson
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -26,7 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model
                     throw new FormatException($"The model {nameof(ProtectableContainerResource)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(Properties))
                 {
                     writer.WritePropertyName("properties"u8);
    @@ -37,55 +46,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model
                     writer.WritePropertyName("eTag"u8);
                     writer.WriteStringValue(ETag.Value.ToString());
                 }
    -            if (Optional.IsCollectionDefined(Tags))
    -            {
    -                writer.WritePropertyName("tags"u8);
    -                writer.WriteStartObject();
    -                foreach (var item in Tags)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -                    writer.WriteStringValue(item.Value);
    -                }
    -                writer.WriteEndObject();
    -            }
    -            writer.WritePropertyName("location"u8);
    -            writer.WriteStringValue(Location);
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("id"u8);
    -                writer.WriteStringValue(Id);
    -            }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("name"u8);
    -                writer.WriteStringValue(Name);
    -            }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("type"u8);
    -                writer.WriteStringValue(ResourceType);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(SystemData))
    -            {
    -                writer.WritePropertyName("systemData"u8);
    -                JsonSerializer.Serialize(writer, SystemData);
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             ProtectableContainerResource IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ProtectableContainerResourceList.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ProtectableContainerResourceList.Serialization.cs
    index 8c4f3d0a9bd3..9acd14404897 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ProtectableContainerResourceList.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ProtectableContainerResourceList.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class ProtectableContainerResourceList : IUtf8JsonSerializable,
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M
                     throw new FormatException($"The model {nameof(ProtectableContainerResourceList)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsCollectionDefined(Value))
                 {
                     writer.WritePropertyName("value"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             ProtectableContainerResourceList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ProtectedItemResourceList.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ProtectedItemResourceList.Serialization.cs
    index baa60ec38391..12dee8b1f662 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ProtectedItemResourceList.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ProtectedItemResourceList.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class ProtectedItemResourceList : IUtf8JsonSerializable, IJsonM
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea
                     throw new FormatException($"The model {nameof(ProtectedItemResourceList)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsCollectionDefined(Value))
                 {
                     writer.WritePropertyName("value"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             ProtectedItemResourceList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ProtectionContainerResourceList.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ProtectionContainerResourceList.Serialization.cs
    index 63eadd03c704..858014002a81 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ProtectionContainerResourceList.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ProtectionContainerResourceList.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class ProtectionContainerResourceList : IUtf8JsonSerializable,
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo
                     throw new FormatException($"The model {nameof(ProtectionContainerResourceList)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsCollectionDefined(Value))
                 {
                     writer.WritePropertyName("value"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             ProtectionContainerResourceList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ProtectionIntentResourceList.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ProtectionIntentResourceList.Serialization.cs
    index 59d0fd4eeb68..600f2df8e05e 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ProtectionIntentResourceList.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ProtectionIntentResourceList.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class ProtectionIntentResourceList : IUtf8JsonSerializable, IJs
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model
                     throw new FormatException($"The model {nameof(ProtectionIntentResourceList)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsCollectionDefined(Value))
                 {
                     writer.WritePropertyName("value"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             ProtectionIntentResourceList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ProtectionPolicyResourceList.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ProtectionPolicyResourceList.Serialization.cs
    index 61bbf3d7d6ed..cd9439f07cc7 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ProtectionPolicyResourceList.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ProtectionPolicyResourceList.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class ProtectionPolicyResourceList : IUtf8JsonSerializable, IJs
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model
                     throw new FormatException($"The model {nameof(ProtectionPolicyResourceList)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsCollectionDefined(Value))
                 {
                     writer.WritePropertyName("value"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             ProtectionPolicyResourceList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ProvisionIlrConnectionContent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ProvisionIlrConnectionContent.Serialization.cs
    index 488c844e5078..0da89f78418e 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ProvisionIlrConnectionContent.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ProvisionIlrConnectionContent.Serialization.cs
    @@ -19,6 +19,15 @@ public partial class ProvisionIlrConnectionContent : IUtf8JsonSerializable, IJso
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -26,7 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode
                     throw new FormatException($"The model {nameof(ProvisionIlrConnectionContent)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(Properties))
                 {
                     writer.WritePropertyName("properties"u8);
    @@ -37,55 +46,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode
                     writer.WritePropertyName("eTag"u8);
                     writer.WriteStringValue(ETag.Value.ToString());
                 }
    -            if (Optional.IsCollectionDefined(Tags))
    -            {
    -                writer.WritePropertyName("tags"u8);
    -                writer.WriteStartObject();
    -                foreach (var item in Tags)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -                    writer.WriteStringValue(item.Value);
    -                }
    -                writer.WriteEndObject();
    -            }
    -            writer.WritePropertyName("location"u8);
    -            writer.WriteStringValue(Location);
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("id"u8);
    -                writer.WriteStringValue(Id);
    -            }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("name"u8);
    -                writer.WriteStringValue(Name);
    -            }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("type"u8);
    -                writer.WriteStringValue(ResourceType);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(SystemData))
    -            {
    -                writer.WritePropertyName("systemData"u8);
    -                JsonSerializer.Serialize(writer, SystemData);
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             ProvisionIlrConnectionContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RecoveryPointDiskConfiguration.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RecoveryPointDiskConfiguration.Serialization.cs
    index d805de42a5a7..8cf4d92c8436 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RecoveryPointDiskConfiguration.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RecoveryPointDiskConfiguration.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class RecoveryPointDiskConfiguration : IUtf8JsonSerializable, IJs
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod
                     throw new FormatException($"The model {nameof(RecoveryPointDiskConfiguration)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(NumberOfDisksIncludedInBackup))
                 {
                     writer.WritePropertyName("numberOfDisksIncludedInBackup"u8);
    @@ -71,7 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             RecoveryPointDiskConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RecoveryPointMoveReadinessInfo.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RecoveryPointMoveReadinessInfo.Serialization.cs
    index 49991ecfd4ed..9f105929d5a9 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RecoveryPointMoveReadinessInfo.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RecoveryPointMoveReadinessInfo.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class RecoveryPointMoveReadinessInfo : IUtf8JsonSerializable, IJs
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod
                     throw new FormatException($"The model {nameof(RecoveryPointMoveReadinessInfo)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(IsReadyForMove))
                 {
                     writer.WritePropertyName("isReadyForMove"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             RecoveryPointMoveReadinessInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RecoveryPointProperties.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RecoveryPointProperties.Serialization.cs
    index e87880a330c6..910f62fad63f 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RecoveryPointProperties.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RecoveryPointProperties.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class RecoveryPointProperties : IUtf8JsonSerializable, IJsonModel
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade
                     throw new FormatException($"The model {nameof(RecoveryPointProperties)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(ExpireOn))
                 {
                     writer.WritePropertyName("expiryTime"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             RecoveryPointProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RecoveryPointRehydrationInfo.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RecoveryPointRehydrationInfo.Serialization.cs
    index ae32d827dc8b..37d75ef04b91 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RecoveryPointRehydrationInfo.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RecoveryPointRehydrationInfo.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class RecoveryPointRehydrationInfo : IUtf8JsonSerializable, IJson
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model
                     throw new FormatException($"The model {nameof(RecoveryPointRehydrationInfo)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(RehydrationRetentionDuration))
                 {
                     writer.WritePropertyName("rehydrationRetentionDuration"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             RecoveryPointRehydrationInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RecoveryPointResourceList.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RecoveryPointResourceList.Serialization.cs
    index 4a3a1c4be6a4..7fc97bc73fde 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RecoveryPointResourceList.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RecoveryPointResourceList.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class RecoveryPointResourceList : IUtf8JsonSerializable, IJsonM
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea
                     throw new FormatException($"The model {nameof(RecoveryPointResourceList)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsCollectionDefined(Value))
                 {
                     writer.WritePropertyName("value"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             RecoveryPointResourceList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RecoveryPointTierInformation.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RecoveryPointTierInformation.Serialization.cs
    index 6d1d2af54f58..b7957f4d46fb 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RecoveryPointTierInformation.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RecoveryPointTierInformation.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class RecoveryPointTierInformation : IUtf8JsonSerializable, IJson
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model
                     throw new FormatException($"The model {nameof(RecoveryPointTierInformation)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(TierType))
                 {
                     writer.WritePropertyName("type"u8);
    @@ -62,7 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             RecoveryPointTierInformation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RecoveryPointTierInformationV2.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RecoveryPointTierInformationV2.Serialization.cs
    index 934a748bdefa..39c1431f3525 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RecoveryPointTierInformationV2.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RecoveryPointTierInformationV2.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class RecoveryPointTierInformationV2 : IUtf8JsonSerializable, IJs
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,44 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod
                     throw new FormatException($"The model {nameof(RecoveryPointTierInformationV2)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            if (Optional.IsDefined(TierType))
    -            {
    -                writer.WritePropertyName("type"u8);
    -                writer.WriteStringValue(TierType.Value.ToSerialString());
    -            }
    -            if (Optional.IsDefined(Status))
    -            {
    -                writer.WritePropertyName("status"u8);
    -                writer.WriteStringValue(Status.Value.ToSerialString());
    -            }
    -            if (Optional.IsCollectionDefined(ExtendedInfo))
    -            {
    -                writer.WritePropertyName("extendedInfo"u8);
    -                writer.WriteStartObject();
    -                foreach (var item in ExtendedInfo)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -                    writer.WriteStringValue(item.Value);
    -                }
    -                writer.WriteEndObject();
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             RecoveryPointTierInformationV2 IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RecoveryPointsRecommendedForMoveContent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RecoveryPointsRecommendedForMoveContent.Serialization.cs
    index 09d75b89f0b0..b1e4f93e1bf6 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RecoveryPointsRecommendedForMoveContent.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RecoveryPointsRecommendedForMoveContent.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class RecoveryPointsRecommendedForMoveContent : IUtf8JsonSerializ
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wr
                     throw new FormatException($"The model {nameof(RecoveryPointsRecommendedForMoveContent)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(ObjectType))
                 {
                     writer.WritePropertyName("objectType"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter wr
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             RecoveryPointsRecommendedForMoveContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RecoveryServiceVaultProtectionIntent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RecoveryServiceVaultProtectionIntent.Serialization.cs
    index cf5db87660f8..73d2073685a3 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RecoveryServiceVaultProtectionIntent.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RecoveryServiceVaultProtectionIntent.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class RecoveryServiceVaultProtectionIntent : IUtf8JsonSerializabl
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,50 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter write
                     throw new FormatException($"The model {nameof(RecoveryServiceVaultProtectionIntent)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            writer.WritePropertyName("protectionIntentItemType"u8);
    -            writer.WriteStringValue(ProtectionIntentItemType.ToString());
    -            if (Optional.IsDefined(BackupManagementType))
    -            {
    -                writer.WritePropertyName("backupManagementType"u8);
    -                writer.WriteStringValue(BackupManagementType.Value.ToString());
    -            }
    -            if (Optional.IsDefined(SourceResourceId))
    -            {
    -                writer.WritePropertyName("sourceResourceId"u8);
    -                writer.WriteStringValue(SourceResourceId);
    -            }
    -            if (Optional.IsDefined(ItemId))
    -            {
    -                writer.WritePropertyName("itemId"u8);
    -                writer.WriteStringValue(ItemId);
    -            }
    -            if (Optional.IsDefined(PolicyId))
    -            {
    -                writer.WritePropertyName("policyId"u8);
    -                writer.WriteStringValue(PolicyId);
    -            }
    -            if (Optional.IsDefined(ProtectionState))
    -            {
    -                writer.WritePropertyName("protectionState"u8);
    -                writer.WriteStringValue(ProtectionState.Value.ToString());
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             RecoveryServiceVaultProtectionIntent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RecoveryServicesBackupPrivateLinkServiceConnectionState.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RecoveryServicesBackupPrivateLinkServiceConnectionState.Serialization.cs
    index b08f0e09f26f..9e7a3b02bed5 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RecoveryServicesBackupPrivateLinkServiceConnectionState.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RecoveryServicesBackupPrivateLinkServiceConnectionState.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class RecoveryServicesBackupPrivateLinkServiceConnectionState : I
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(U
                     throw new FormatException($"The model {nameof(RecoveryServicesBackupPrivateLinkServiceConnectionState)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(Status))
                 {
                     writer.WritePropertyName("status"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(U
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             RecoveryServicesBackupPrivateLinkServiceConnectionState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ResourceGuardOperationDetail.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ResourceGuardOperationDetail.Serialization.cs
    index c7099351dcc8..e8ca9e50a107 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ResourceGuardOperationDetail.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ResourceGuardOperationDetail.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class ResourceGuardOperationDetail : IUtf8JsonSerializable, IJson
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model
                     throw new FormatException($"The model {nameof(ResourceGuardOperationDetail)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(VaultCriticalOperation))
                 {
                     writer.WritePropertyName("vaultCriticalOperation"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             ResourceGuardOperationDetail IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ResourceGuardProxyBaseResourceList.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ResourceGuardProxyBaseResourceList.Serialization.cs
    index 5a25533c2d12..234d99002d91 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ResourceGuardProxyBaseResourceList.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ResourceGuardProxyBaseResourceList.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class ResourceGuardProxyBaseResourceList : IUtf8JsonSerializabl
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer,
                     throw new FormatException($"The model {nameof(ResourceGuardProxyBaseResourceList)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsCollectionDefined(Value))
                 {
                     writer.WritePropertyName("value"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer,
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             ResourceGuardProxyBaseResourceList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ResourceGuardProxyProperties.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ResourceGuardProxyProperties.Serialization.cs
    index 2f77a8edecdc..ab597b10248a 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ResourceGuardProxyProperties.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ResourceGuardProxyProperties.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class ResourceGuardProxyProperties : IUtf8JsonSerializable, IJson
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model
                     throw new FormatException($"The model {nameof(ResourceGuardProxyProperties)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 writer.WritePropertyName("resourceGuardResourceId"u8);
                 writer.WriteStringValue(ResourceGuardResourceId);
                 if (Optional.IsCollectionDefined(ResourceGuardOperationDetails))
    @@ -63,7 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             ResourceGuardProxyProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ResourceHealthDetails.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ResourceHealthDetails.Serialization.cs
    index 19c2ddcb5378..07bd2f19b0ab 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ResourceHealthDetails.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ResourceHealthDetails.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class ResourceHealthDetails : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW
                     throw new FormatException($"The model {nameof(ResourceHealthDetails)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (options.Format != "W" && Optional.IsDefined(Code))
                 {
                     writer.WritePropertyName("code"u8);
    @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             ResourceHealthDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ResourceProtectionIntent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ResourceProtectionIntent.Serialization.cs
    index 558d73249345..ebed8ca8b53c 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ResourceProtectionIntent.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ResourceProtectionIntent.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class ResourceProtectionIntent : IUtf8JsonSerializable, IJsonMode
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,55 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead
                     throw new FormatException($"The model {nameof(ResourceProtectionIntent)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(FriendlyName))
                 {
                     writer.WritePropertyName("friendlyName"u8);
                     writer.WriteStringValue(FriendlyName);
                 }
    -            writer.WritePropertyName("protectionIntentItemType"u8);
    -            writer.WriteStringValue(ProtectionIntentItemType.ToString());
    -            if (Optional.IsDefined(BackupManagementType))
    -            {
    -                writer.WritePropertyName("backupManagementType"u8);
    -                writer.WriteStringValue(BackupManagementType.Value.ToString());
    -            }
    -            if (Optional.IsDefined(SourceResourceId))
    -            {
    -                writer.WritePropertyName("sourceResourceId"u8);
    -                writer.WriteStringValue(SourceResourceId);
    -            }
    -            if (Optional.IsDefined(ItemId))
    -            {
    -                writer.WritePropertyName("itemId"u8);
    -                writer.WriteStringValue(ItemId);
    -            }
    -            if (Optional.IsDefined(PolicyId))
    -            {
    -                writer.WritePropertyName("policyId"u8);
    -                writer.WriteStringValue(PolicyId);
    -            }
    -            if (Optional.IsDefined(ProtectionState))
    -            {
    -                writer.WritePropertyName("protectionState"u8);
    -                writer.WriteStringValue(ProtectionState.Value.ToString());
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             ResourceProtectionIntent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RestoreContent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RestoreContent.Serialization.cs
    index f130b49aa5d2..e22304e883b4 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RestoreContent.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RestoreContent.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class RestoreContent : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp
                     throw new FormatException($"The model {nameof(RestoreContent)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 writer.WritePropertyName("objectType"u8);
                 writer.WriteStringValue(ObjectType);
                 if (options.Format != "W" && _serializedAdditionalRawData != null)
    @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             RestoreContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RestoreFileSpecs.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RestoreFileSpecs.Serialization.cs
    index b5ace12b406e..579a0a7c26d2 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RestoreFileSpecs.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RestoreFileSpecs.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class RestoreFileSpecs : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter
                     throw new FormatException($"The model {nameof(RestoreFileSpecs)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(Path))
                 {
                     writer.WritePropertyName("path"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             RestoreFileSpecs IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RetentionDuration.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RetentionDuration.Serialization.cs
    index 490c5be517f1..23c933debb24 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RetentionDuration.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RetentionDuration.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class RetentionDuration : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite
                     throw new FormatException($"The model {nameof(RetentionDuration)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(Count))
                 {
                     writer.WritePropertyName("count"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             RetentionDuration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SecuredVmDetails.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SecuredVmDetails.Serialization.cs
    index 8715bce3ba08..d13a0d78a3c3 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SecuredVmDetails.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SecuredVmDetails.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class SecuredVmDetails : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter
                     throw new FormatException($"The model {nameof(SecuredVmDetails)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(SecuredVmOSDiskEncryptionSetId))
                 {
                     writer.WritePropertyName("securedVMOsDiskEncryptionSetId"u8);
    @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             SecuredVmDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SecurityPinContent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SecurityPinContent.Serialization.cs
    index 52e1f98813b7..14c56c7d625e 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SecurityPinContent.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SecurityPinContent.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class SecurityPinContent : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit
                     throw new FormatException($"The model {nameof(SecurityPinContent)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsCollectionDefined(ResourceGuardOperationRequests))
                 {
                     writer.WritePropertyName("resourceGuardOperationRequests"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             SecurityPinContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SimpleRetentionPolicy.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SimpleRetentionPolicy.Serialization.cs
    index 65e74a75af95..37666c61a8cf 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SimpleRetentionPolicy.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SimpleRetentionPolicy.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class SimpleRetentionPolicy : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,30 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW
                     throw new FormatException($"The model {nameof(SimpleRetentionPolicy)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(RetentionDuration))
                 {
                     writer.WritePropertyName("retentionDuration"u8);
                     writer.WriteObjectValue(RetentionDuration, options);
                 }
    -            writer.WritePropertyName("retentionPolicyType"u8);
    -            writer.WriteStringValue(RetentionPolicyType);
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             SimpleRetentionPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SimpleSchedulePolicy.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SimpleSchedulePolicy.Serialization.cs
    index 15872307b23f..c5bd951f8885 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SimpleSchedulePolicy.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SimpleSchedulePolicy.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class SimpleSchedulePolicy : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr
                     throw new FormatException($"The model {nameof(SimpleSchedulePolicy)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(ScheduleRunFrequency))
                 {
                     writer.WritePropertyName("scheduleRunFrequency"u8);
    @@ -61,24 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr
                     writer.WritePropertyName("scheduleWeeklyFrequency"u8);
                     writer.WriteNumberValue(ScheduleWeeklyFrequency.Value);
                 }
    -            writer.WritePropertyName("schedulePolicyType"u8);
    -            writer.WriteStringValue(SchedulePolicyType);
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             SimpleSchedulePolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SimpleSchedulePolicyV2.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SimpleSchedulePolicyV2.Serialization.cs
    index a333928ee4aa..2831876730e9 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SimpleSchedulePolicyV2.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SimpleSchedulePolicyV2.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class SimpleSchedulePolicyV2 : IUtf8JsonSerializable, IJsonModel<
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader
                     throw new FormatException($"The model {nameof(SimpleSchedulePolicyV2)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(ScheduleRunFrequency))
                 {
                     writer.WritePropertyName("scheduleRunFrequency"u8);
    @@ -46,24 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader
                     writer.WritePropertyName("weeklySchedule"u8);
                     writer.WriteObjectValue(WeeklySchedule, options);
                 }
    -            writer.WritePropertyName("schedulePolicyType"u8);
    -            writer.WriteStringValue(SchedulePolicyType);
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             SimpleSchedulePolicyV2 IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SnapshotBackupAdditionalDetails.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SnapshotBackupAdditionalDetails.Serialization.cs
    index a10d9c96f4f1..39a2f72d6dd8 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SnapshotBackupAdditionalDetails.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SnapshotBackupAdditionalDetails.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class SnapshotBackupAdditionalDetails : IUtf8JsonSerializable, IJ
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo
                     throw new FormatException($"The model {nameof(SnapshotBackupAdditionalDetails)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(InstantRpRetentionRangeInDays))
                 {
                     writer.WritePropertyName("instantRpRetentionRangeInDays"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             SnapshotBackupAdditionalDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SnapshotRestoreContent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SnapshotRestoreContent.Serialization.cs
    index e0bfe3a12e64..828c7078fb83 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SnapshotRestoreContent.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SnapshotRestoreContent.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class SnapshotRestoreContent : IUtf8JsonSerializable, IJsonModel<
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader
                     throw new FormatException($"The model {nameof(SnapshotRestoreContent)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(SkipAttachAndMount))
                 {
                     writer.WritePropertyName("skipAttachAndMount"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             SnapshotRestoreContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SqlAvailabilityGroupWorkloadProtectionContainer.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SqlAvailabilityGroupWorkloadProtectionContainer.Serialization.cs
    index a4f47a25ac26..5d0d8f1926ad 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SqlAvailabilityGroupWorkloadProtectionContainer.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SqlAvailabilityGroupWorkloadProtectionContainer.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class SqlAvailabilityGroupWorkloadProtectionContainer : IUtf8Json
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,75 +34,7 @@ void IJsonModel.Write(Utf8JsonW
                     throw new FormatException($"The model {nameof(SqlAvailabilityGroupWorkloadProtectionContainer)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            if (Optional.IsDefined(SourceResourceId))
    -            {
    -                writer.WritePropertyName("sourceResourceId"u8);
    -                writer.WriteStringValue(SourceResourceId);
    -            }
    -            if (Optional.IsDefined(LastUpdatedOn))
    -            {
    -                writer.WritePropertyName("lastUpdatedTime"u8);
    -                writer.WriteStringValue(LastUpdatedOn.Value, "O");
    -            }
    -            if (Optional.IsDefined(ExtendedInfo))
    -            {
    -                writer.WritePropertyName("extendedInfo"u8);
    -                writer.WriteObjectValue(ExtendedInfo, options);
    -            }
    -            if (Optional.IsDefined(WorkloadType))
    -            {
    -                writer.WritePropertyName("workloadType"u8);
    -                writer.WriteStringValue(WorkloadType.Value.ToString());
    -            }
    -            if (Optional.IsDefined(OperationType))
    -            {
    -                writer.WritePropertyName("operationType"u8);
    -                writer.WriteStringValue(OperationType.Value.ToString());
    -            }
    -            if (Optional.IsDefined(FriendlyName))
    -            {
    -                writer.WritePropertyName("friendlyName"u8);
    -                writer.WriteStringValue(FriendlyName);
    -            }
    -            if (Optional.IsDefined(BackupManagementType))
    -            {
    -                writer.WritePropertyName("backupManagementType"u8);
    -                writer.WriteStringValue(BackupManagementType.Value.ToString());
    -            }
    -            if (Optional.IsDefined(RegistrationStatus))
    -            {
    -                writer.WritePropertyName("registrationStatus"u8);
    -                writer.WriteStringValue(RegistrationStatus);
    -            }
    -            if (Optional.IsDefined(HealthStatus))
    -            {
    -                writer.WritePropertyName("healthStatus"u8);
    -                writer.WriteStringValue(HealthStatus);
    -            }
    -            writer.WritePropertyName("containerType"u8);
    -            writer.WriteStringValue(ContainerType.ToSerialString());
    -            if (Optional.IsDefined(ProtectableObjectType))
    -            {
    -                writer.WritePropertyName("protectableObjectType"u8);
    -                writer.WriteStringValue(ProtectableObjectType);
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             SqlAvailabilityGroupWorkloadProtectionContainer IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SqlContainer.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SqlContainer.Serialization.cs
    index 6e43634003c7..9fdc12796a82 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SqlContainer.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SqlContainer.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class SqlContainer : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,50 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti
                     throw new FormatException($"The model {nameof(SqlContainer)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            if (Optional.IsDefined(FriendlyName))
    -            {
    -                writer.WritePropertyName("friendlyName"u8);
    -                writer.WriteStringValue(FriendlyName);
    -            }
    -            if (Optional.IsDefined(BackupManagementType))
    -            {
    -                writer.WritePropertyName("backupManagementType"u8);
    -                writer.WriteStringValue(BackupManagementType.Value.ToString());
    -            }
    -            if (Optional.IsDefined(RegistrationStatus))
    -            {
    -                writer.WritePropertyName("registrationStatus"u8);
    -                writer.WriteStringValue(RegistrationStatus);
    -            }
    -            if (Optional.IsDefined(HealthStatus))
    -            {
    -                writer.WritePropertyName("healthStatus"u8);
    -                writer.WriteStringValue(HealthStatus);
    -            }
    -            writer.WritePropertyName("containerType"u8);
    -            writer.WriteStringValue(ContainerType.ToSerialString());
    -            if (Optional.IsDefined(ProtectableObjectType))
    -            {
    -                writer.WritePropertyName("protectableObjectType"u8);
    -                writer.WriteStringValue(ProtectableObjectType);
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             SqlContainer IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SqlDataDirectory.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SqlDataDirectory.Serialization.cs
    index c1ef8628550d..3ddea57922ed 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SqlDataDirectory.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SqlDataDirectory.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class SqlDataDirectory : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter
                     throw new FormatException($"The model {nameof(SqlDataDirectory)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(DirectoryType))
                 {
                     writer.WritePropertyName("type"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             SqlDataDirectory IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SqlDataDirectoryMapping.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SqlDataDirectoryMapping.Serialization.cs
    index 84d56f6cde8e..0d88ac61ddaf 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SqlDataDirectoryMapping.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SqlDataDirectoryMapping.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class SqlDataDirectoryMapping : IUtf8JsonSerializable, IJsonModel
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade
                     throw new FormatException($"The model {nameof(SqlDataDirectoryMapping)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(MappingType))
                 {
                     writer.WritePropertyName("mappingType"u8);
    @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             SqlDataDirectoryMapping IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SqlProtectedItem.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SqlProtectedItem.Serialization.cs
    index e2d4f776e84e..d69b30c58c86 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SqlProtectedItem.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SqlProtectedItem.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class SqlProtectedItem : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter
                     throw new FormatException($"The model {nameof(SqlProtectedItem)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(ProtectedItemDataId))
                 {
                     writer.WritePropertyName("protectedItemDataId"u8);
    @@ -41,119 +50,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter
                     writer.WritePropertyName("extendedInfo"u8);
                     writer.WriteObjectValue(ExtendedInfo, options);
                 }
    -            writer.WritePropertyName("protectedItemType"u8);
    -            writer.WriteStringValue(ProtectedItemType);
    -            if (options.Format != "W" && Optional.IsDefined(BackupManagementType))
    -            {
    -                writer.WritePropertyName("backupManagementType"u8);
    -                writer.WriteStringValue(BackupManagementType.Value.ToString());
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(WorkloadType))
    -            {
    -                writer.WritePropertyName("workloadType"u8);
    -                writer.WriteStringValue(WorkloadType.Value.ToString());
    -            }
    -            if (Optional.IsDefined(ContainerName))
    -            {
    -                writer.WritePropertyName("containerName"u8);
    -                writer.WriteStringValue(ContainerName);
    -            }
    -            if (Optional.IsDefined(SourceResourceId))
    -            {
    -                writer.WritePropertyName("sourceResourceId"u8);
    -                writer.WriteStringValue(SourceResourceId);
    -            }
    -            if (Optional.IsDefined(PolicyId))
    -            {
    -                writer.WritePropertyName("policyId"u8);
    -                writer.WriteStringValue(PolicyId);
    -            }
    -            if (Optional.IsDefined(LastRecoverOn))
    -            {
    -                writer.WritePropertyName("lastRecoveryPoint"u8);
    -                writer.WriteStringValue(LastRecoverOn.Value, "O");
    -            }
    -            if (Optional.IsDefined(BackupSetName))
    -            {
    -                writer.WritePropertyName("backupSetName"u8);
    -                writer.WriteStringValue(BackupSetName);
    -            }
    -            if (Optional.IsDefined(CreateMode))
    -            {
    -                writer.WritePropertyName("createMode"u8);
    -                writer.WriteStringValue(CreateMode.Value.ToString());
    -            }
    -            if (Optional.IsDefined(DeferredDeletedOn))
    -            {
    -                writer.WritePropertyName("deferredDeleteTimeInUTC"u8);
    -                writer.WriteStringValue(DeferredDeletedOn.Value, "O");
    -            }
    -            if (Optional.IsDefined(IsScheduledForDeferredDelete))
    -            {
    -                writer.WritePropertyName("isScheduledForDeferredDelete"u8);
    -                writer.WriteBooleanValue(IsScheduledForDeferredDelete.Value);
    -            }
    -            if (Optional.IsDefined(DeferredDeleteTimeRemaining))
    -            {
    -                writer.WritePropertyName("deferredDeleteTimeRemaining"u8);
    -                writer.WriteStringValue(DeferredDeleteTimeRemaining);
    -            }
    -            if (Optional.IsDefined(IsDeferredDeleteScheduleUpcoming))
    -            {
    -                writer.WritePropertyName("isDeferredDeleteScheduleUpcoming"u8);
    -                writer.WriteBooleanValue(IsDeferredDeleteScheduleUpcoming.Value);
    -            }
    -            if (Optional.IsDefined(IsRehydrate))
    -            {
    -                writer.WritePropertyName("isRehydrate"u8);
    -                writer.WriteBooleanValue(IsRehydrate.Value);
    -            }
    -            if (Optional.IsCollectionDefined(ResourceGuardOperationRequests))
    -            {
    -                writer.WritePropertyName("resourceGuardOperationRequests"u8);
    -                writer.WriteStartArray();
    -                foreach (var item in ResourceGuardOperationRequests)
    -                {
    -                    writer.WriteStringValue(item);
    -                }
    -                writer.WriteEndArray();
    -            }
    -            if (Optional.IsDefined(IsArchiveEnabled))
    -            {
    -                writer.WritePropertyName("isArchiveEnabled"u8);
    -                writer.WriteBooleanValue(IsArchiveEnabled.Value);
    -            }
    -            if (Optional.IsDefined(PolicyName))
    -            {
    -                writer.WritePropertyName("policyName"u8);
    -                writer.WriteStringValue(PolicyName);
    -            }
    -            if (Optional.IsDefined(SoftDeleteRetentionPeriodInDays))
    -            {
    -                writer.WritePropertyName("softDeleteRetentionPeriodInDays"u8);
    -                writer.WriteNumberValue(SoftDeleteRetentionPeriodInDays.Value);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(VaultId))
    -            {
    -                writer.WritePropertyName("vaultId"u8);
    -                writer.WriteStringValue(VaultId);
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             SqlProtectedItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SqlProtectedItemExtendedInfo.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SqlProtectedItemExtendedInfo.Serialization.cs
    index b746714ba759..46569e07fd73 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SqlProtectedItemExtendedInfo.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SqlProtectedItemExtendedInfo.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class SqlProtectedItemExtendedInfo : IUtf8JsonSerializable, IJson
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model
                     throw new FormatException($"The model {nameof(SqlProtectedItemExtendedInfo)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(OldestRecoverOn))
                 {
                     writer.WritePropertyName("oldestRecoveryPoint"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             SqlProtectedItemExtendedInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SqlProtectionPolicy.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SqlProtectionPolicy.Serialization.cs
    index b1aec0e22938..63e451795117 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SqlProtectionPolicy.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SqlProtectionPolicy.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class SqlProtectionPolicy : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,45 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri
                     throw new FormatException($"The model {nameof(SqlProtectionPolicy)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(RetentionPolicy))
                 {
                     writer.WritePropertyName("retentionPolicy"u8);
                     writer.WriteObjectValue(RetentionPolicy, options);
                 }
    -            if (Optional.IsDefined(ProtectedItemsCount))
    -            {
    -                writer.WritePropertyName("protectedItemsCount"u8);
    -                writer.WriteNumberValue(ProtectedItemsCount.Value);
    -            }
    -            writer.WritePropertyName("backupManagementType"u8);
    -            writer.WriteStringValue(BackupManagementType);
    -            if (Optional.IsCollectionDefined(ResourceGuardOperationRequests))
    -            {
    -                writer.WritePropertyName("resourceGuardOperationRequests"u8);
    -                writer.WriteStartArray();
    -                foreach (var item in ResourceGuardOperationRequests)
    -                {
    -                    writer.WriteStringValue(item);
    -                }
    -                writer.WriteEndArray();
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             SqlProtectionPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/StorageBackupJob.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/StorageBackupJob.Serialization.cs
    index a8c10333cc57..7f28fe4a7297 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/StorageBackupJob.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/StorageBackupJob.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class StorageBackupJob : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter
                     throw new FormatException($"The model {nameof(StorageBackupJob)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(Duration))
                 {
                     writer.WritePropertyName("duration"u8);
    @@ -71,59 +80,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter
                     writer.WritePropertyName("isUserTriggered"u8);
                     writer.WriteBooleanValue(IsUserTriggered.Value);
                 }
    -            if (Optional.IsDefined(EntityFriendlyName))
    -            {
    -                writer.WritePropertyName("entityFriendlyName"u8);
    -                writer.WriteStringValue(EntityFriendlyName);
    -            }
    -            if (Optional.IsDefined(BackupManagementType))
    -            {
    -                writer.WritePropertyName("backupManagementType"u8);
    -                writer.WriteStringValue(BackupManagementType.Value.ToString());
    -            }
    -            if (Optional.IsDefined(Operation))
    -            {
    -                writer.WritePropertyName("operation"u8);
    -                writer.WriteStringValue(Operation);
    -            }
    -            if (Optional.IsDefined(Status))
    -            {
    -                writer.WritePropertyName("status"u8);
    -                writer.WriteStringValue(Status);
    -            }
    -            if (Optional.IsDefined(StartOn))
    -            {
    -                writer.WritePropertyName("startTime"u8);
    -                writer.WriteStringValue(StartOn.Value, "O");
    -            }
    -            if (Optional.IsDefined(EndOn))
    -            {
    -                writer.WritePropertyName("endTime"u8);
    -                writer.WriteStringValue(EndOn.Value, "O");
    -            }
    -            if (Optional.IsDefined(ActivityId))
    -            {
    -                writer.WritePropertyName("activityId"u8);
    -                writer.WriteStringValue(ActivityId);
    -            }
    -            writer.WritePropertyName("jobType"u8);
    -            writer.WriteStringValue(JobType);
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             StorageBackupJob IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/StorageBackupJobExtendedInfo.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/StorageBackupJobExtendedInfo.Serialization.cs
    index 4b8765db049f..d22d8216316b 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/StorageBackupJobExtendedInfo.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/StorageBackupJobExtendedInfo.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class StorageBackupJobExtendedInfo : IUtf8JsonSerializable, IJson
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model
                     throw new FormatException($"The model {nameof(StorageBackupJobExtendedInfo)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsCollectionDefined(TasksList))
                 {
                     writer.WritePropertyName("tasksList"u8);
    @@ -67,7 +75,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             StorageBackupJobExtendedInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/StorageBackupJobTaskDetails.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/StorageBackupJobTaskDetails.Serialization.cs
    index ed1abb943c22..02583b7721c7 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/StorageBackupJobTaskDetails.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/StorageBackupJobTaskDetails.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class StorageBackupJobTaskDetails : IUtf8JsonSerializable, IJsonM
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR
                     throw new FormatException($"The model {nameof(StorageBackupJobTaskDetails)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(TaskId))
                 {
                     writer.WritePropertyName("taskId"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             StorageBackupJobTaskDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/StorageContainer.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/StorageContainer.Serialization.cs
    index 86e91a77c894..88929cbbd7d2 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/StorageContainer.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/StorageContainer.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class StorageContainer : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter
                     throw new FormatException($"The model {nameof(StorageContainer)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(SourceResourceId))
                 {
                     writer.WritePropertyName("sourceResourceId"u8);
    @@ -51,49 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter
                     writer.WritePropertyName("acquireStorageAccountLock"u8);
                     writer.WriteStringValue(AcquireStorageAccountLock.Value.ToString());
                 }
    -            if (Optional.IsDefined(FriendlyName))
    -            {
    -                writer.WritePropertyName("friendlyName"u8);
    -                writer.WriteStringValue(FriendlyName);
    -            }
    -            if (Optional.IsDefined(BackupManagementType))
    -            {
    -                writer.WritePropertyName("backupManagementType"u8);
    -                writer.WriteStringValue(BackupManagementType.Value.ToString());
    -            }
    -            if (Optional.IsDefined(RegistrationStatus))
    -            {
    -                writer.WritePropertyName("registrationStatus"u8);
    -                writer.WriteStringValue(RegistrationStatus);
    -            }
    -            if (Optional.IsDefined(HealthStatus))
    -            {
    -                writer.WritePropertyName("healthStatus"u8);
    -                writer.WriteStringValue(HealthStatus);
    -            }
    -            writer.WritePropertyName("containerType"u8);
    -            writer.WriteStringValue(ContainerType.ToSerialString());
    -            if (Optional.IsDefined(ProtectableObjectType))
    -            {
    -                writer.WritePropertyName("protectableObjectType"u8);
    -                writer.WriteStringValue(ProtectableObjectType);
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             StorageContainer IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/StorageErrorInfo.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/StorageErrorInfo.Serialization.cs
    index 6d3a166d17db..82ea59d71463 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/StorageErrorInfo.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/StorageErrorInfo.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class StorageErrorInfo : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter
                     throw new FormatException($"The model {nameof(StorageErrorInfo)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(ErrorCode))
                 {
                     writer.WritePropertyName("errorCode"u8);
    @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             StorageErrorInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/StorageProtectableContainer.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/StorageProtectableContainer.Serialization.cs
    index 3db783b9cd1a..7f30acd0c560 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/StorageProtectableContainer.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/StorageProtectableContainer.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class StorageProtectableContainer : IUtf8JsonSerializable, IJsonM
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,45 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR
                     throw new FormatException($"The model {nameof(StorageProtectableContainer)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            if (Optional.IsDefined(FriendlyName))
    -            {
    -                writer.WritePropertyName("friendlyName"u8);
    -                writer.WriteStringValue(FriendlyName);
    -            }
    -            if (Optional.IsDefined(BackupManagementType))
    -            {
    -                writer.WritePropertyName("backupManagementType"u8);
    -                writer.WriteStringValue(BackupManagementType.Value.ToString());
    -            }
    -            writer.WritePropertyName("protectableContainerType"u8);
    -            writer.WriteStringValue(ProtectableContainerType.ToSerialString());
    -            if (Optional.IsDefined(HealthStatus))
    -            {
    -                writer.WritePropertyName("healthStatus"u8);
    -                writer.WriteStringValue(HealthStatus);
    -            }
    -            if (Optional.IsDefined(ContainerId))
    -            {
    -                writer.WritePropertyName("containerId"u8);
    -                writer.WriteStringValue(ContainerId);
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             StorageProtectableContainer IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SubProtectionPolicy.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SubProtectionPolicy.Serialization.cs
    index 666eab1cf340..64297439320a 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SubProtectionPolicy.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SubProtectionPolicy.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class SubProtectionPolicy : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri
                     throw new FormatException($"The model {nameof(SubProtectionPolicy)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(PolicyType))
                 {
                     writer.WritePropertyName("policyType"u8);
    @@ -72,7 +80,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             SubProtectionPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/TargetAfsRestoreInfo.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/TargetAfsRestoreInfo.Serialization.cs
    index 7fff91596579..5959ce14dead 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/TargetAfsRestoreInfo.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/TargetAfsRestoreInfo.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class TargetAfsRestoreInfo : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr
                     throw new FormatException($"The model {nameof(TargetAfsRestoreInfo)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(Name))
                 {
                     writer.WritePropertyName("name"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             TargetAfsRestoreInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/TargetRestoreInfo.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/TargetRestoreInfo.Serialization.cs
    index f98a997ad3a6..13b716c8a71d 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/TargetRestoreInfo.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/TargetRestoreInfo.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class TargetRestoreInfo : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite
                     throw new FormatException($"The model {nameof(TargetRestoreInfo)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(OverwriteOption))
                 {
                     writer.WritePropertyName("overwriteOption"u8);
    @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             TargetRestoreInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/TieringCostInfo.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/TieringCostInfo.Serialization.cs
    index c9a64a48fbbb..8ddfc5cb157c 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/TieringCostInfo.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/TieringCostInfo.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class TieringCostInfo : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO
                     throw new FormatException($"The model {nameof(TieringCostInfo)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 writer.WritePropertyName("objectType"u8);
                 writer.WriteStringValue(ObjectType);
                 if (options.Format != "W" && _serializedAdditionalRawData != null)
    @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             TieringCostInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/TieringCostRehydrationInfo.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/TieringCostRehydrationInfo.Serialization.cs
    index 7022ecd14985..63e307a4f9ae 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/TieringCostRehydrationInfo.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/TieringCostRehydrationInfo.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class TieringCostRehydrationInfo : IUtf8JsonSerializable, IJsonMo
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,29 +34,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe
                     throw new FormatException($"The model {nameof(TieringCostRehydrationInfo)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 writer.WritePropertyName("rehydrationSizeInBytes"u8);
                 writer.WriteNumberValue(RehydrationSizeInBytes);
                 writer.WritePropertyName("retailRehydrationCostPerGBPerMonth"u8);
                 writer.WriteNumberValue(RetailRehydrationCostPerGBPerMonth);
    -            writer.WritePropertyName("objectType"u8);
    -            writer.WriteStringValue(ObjectType);
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             TieringCostRehydrationInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/TieringCostSavingInfo.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/TieringCostSavingInfo.Serialization.cs
    index bba20f3cfd29..3ea64e005d2d 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/TieringCostSavingInfo.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/TieringCostSavingInfo.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class TieringCostSavingInfo : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW
                     throw new FormatException($"The model {nameof(TieringCostSavingInfo)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 writer.WritePropertyName("sourceTierSizeReductionInBytes"u8);
                 writer.WriteNumberValue(SourceTierSizeReductionInBytes);
                 writer.WritePropertyName("targetTierSizeIncreaseInBytes"u8);
    @@ -34,24 +43,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW
                 writer.WriteNumberValue(RetailSourceTierCostPerGBPerMonth);
                 writer.WritePropertyName("retailTargetTierCostPerGBPerMonth"u8);
                 writer.WriteNumberValue(RetailTargetTierCostPerGBPerMonth);
    -            writer.WritePropertyName("objectType"u8);
    -            writer.WriteStringValue(ObjectType);
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             TieringCostSavingInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/TokenInformation.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/TokenInformation.Serialization.cs
    index e6ab6383a849..24aada8550ca 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/TokenInformation.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/TokenInformation.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class TokenInformation : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter
                     throw new FormatException($"The model {nameof(TokenInformation)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(Token))
                 {
                     writer.WritePropertyName("token"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             TokenInformation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/TriggerBackupContent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/TriggerBackupContent.Serialization.cs
    index 5e387497a030..9c136c76162f 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/TriggerBackupContent.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/TriggerBackupContent.Serialization.cs
    @@ -19,6 +19,15 @@ public partial class TriggerBackupContent : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -26,7 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr
                     throw new FormatException($"The model {nameof(TriggerBackupContent)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(Properties))
                 {
                     writer.WritePropertyName("properties"u8);
    @@ -37,55 +46,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr
                     writer.WritePropertyName("eTag"u8);
                     writer.WriteStringValue(ETag.Value.ToString());
                 }
    -            if (Optional.IsCollectionDefined(Tags))
    -            {
    -                writer.WritePropertyName("tags"u8);
    -                writer.WriteStartObject();
    -                foreach (var item in Tags)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -                    writer.WriteStringValue(item.Value);
    -                }
    -                writer.WriteEndObject();
    -            }
    -            writer.WritePropertyName("location"u8);
    -            writer.WriteStringValue(Location);
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("id"u8);
    -                writer.WriteStringValue(Id);
    -            }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("name"u8);
    -                writer.WriteStringValue(Name);
    -            }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("type"u8);
    -                writer.WriteStringValue(ResourceType);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(SystemData))
    -            {
    -                writer.WritePropertyName("systemData"u8);
    -                JsonSerializer.Serialize(writer, SystemData);
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             TriggerBackupContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/TriggerDataMoveContent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/TriggerDataMoveContent.Serialization.cs
    index 079d12cf779d..1b2ca0754d38 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/TriggerDataMoveContent.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/TriggerDataMoveContent.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class TriggerDataMoveContent : IUtf8JsonSerializable, IJsonModel<
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader
                     throw new FormatException($"The model {nameof(TriggerDataMoveContent)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 writer.WritePropertyName("sourceResourceId"u8);
                 writer.WriteStringValue(SourceResourceId);
                 writer.WritePropertyName("sourceRegion"u8);
    @@ -69,7 +77,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             TriggerDataMoveContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/TriggerRestoreContent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/TriggerRestoreContent.Serialization.cs
    index 1718dc722f79..a7725cf53fb8 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/TriggerRestoreContent.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/TriggerRestoreContent.Serialization.cs
    @@ -19,6 +19,15 @@ public partial class TriggerRestoreContent : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -26,7 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW
                     throw new FormatException($"The model {nameof(TriggerRestoreContent)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(Properties))
                 {
                     writer.WritePropertyName("properties"u8);
    @@ -37,55 +46,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW
                     writer.WritePropertyName("eTag"u8);
                     writer.WriteStringValue(ETag.Value.ToString());
                 }
    -            if (Optional.IsCollectionDefined(Tags))
    -            {
    -                writer.WritePropertyName("tags"u8);
    -                writer.WriteStartObject();
    -                foreach (var item in Tags)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -                    writer.WriteStringValue(item.Value);
    -                }
    -                writer.WriteEndObject();
    -            }
    -            writer.WritePropertyName("location"u8);
    -            writer.WriteStringValue(Location);
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("id"u8);
    -                writer.WriteStringValue(Id);
    -            }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("name"u8);
    -                writer.WriteStringValue(Name);
    -            }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("type"u8);
    -                writer.WriteStringValue(ResourceType);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(SystemData))
    -            {
    -                writer.WritePropertyName("systemData"u8);
    -                JsonSerializer.Serialize(writer, SystemData);
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             TriggerRestoreContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownBackupEngineBase.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownBackupEngineBase.Serialization.cs
    index 9a853caeeb24..36225fb8cae2 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownBackupEngineBase.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownBackupEngineBase.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class UnknownBackupEngineBase : IUtf8JsonSerializable, IJsonMod
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,85 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri
                     throw new FormatException($"The model {nameof(BackupGenericEngine)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            if (Optional.IsDefined(FriendlyName))
    -            {
    -                writer.WritePropertyName("friendlyName"u8);
    -                writer.WriteStringValue(FriendlyName);
    -            }
    -            if (Optional.IsDefined(BackupManagementType))
    -            {
    -                writer.WritePropertyName("backupManagementType"u8);
    -                writer.WriteStringValue(BackupManagementType.Value.ToString());
    -            }
    -            if (Optional.IsDefined(RegistrationStatus))
    -            {
    -                writer.WritePropertyName("registrationStatus"u8);
    -                writer.WriteStringValue(RegistrationStatus);
    -            }
    -            if (Optional.IsDefined(BackupEngineState))
    -            {
    -                writer.WritePropertyName("backupEngineState"u8);
    -                writer.WriteStringValue(BackupEngineState);
    -            }
    -            if (Optional.IsDefined(HealthStatus))
    -            {
    -                writer.WritePropertyName("healthStatus"u8);
    -                writer.WriteStringValue(HealthStatus);
    -            }
    -            writer.WritePropertyName("backupEngineType"u8);
    -            writer.WriteStringValue(BackupEngineType.ToString());
    -            if (Optional.IsDefined(CanReRegister))
    -            {
    -                writer.WritePropertyName("canReRegister"u8);
    -                writer.WriteBooleanValue(CanReRegister.Value);
    -            }
    -            if (Optional.IsDefined(BackupEngineId))
    -            {
    -                writer.WritePropertyName("backupEngineId"u8);
    -                writer.WriteStringValue(BackupEngineId);
    -            }
    -            if (Optional.IsDefined(DpmVersion))
    -            {
    -                writer.WritePropertyName("dpmVersion"u8);
    -                writer.WriteStringValue(DpmVersion);
    -            }
    -            if (Optional.IsDefined(AzureBackupAgentVersion))
    -            {
    -                writer.WritePropertyName("azureBackupAgentVersion"u8);
    -                writer.WriteStringValue(AzureBackupAgentVersion);
    -            }
    -            if (Optional.IsDefined(IsAzureBackupAgentUpgradeAvailable))
    -            {
    -                writer.WritePropertyName("isAzureBackupAgentUpgradeAvailable"u8);
    -                writer.WriteBooleanValue(IsAzureBackupAgentUpgradeAvailable.Value);
    -            }
    -            if (Optional.IsDefined(IsDpmUpgradeAvailable))
    -            {
    -                writer.WritePropertyName("isDpmUpgradeAvailable"u8);
    -                writer.WriteBooleanValue(IsDpmUpgradeAvailable.Value);
    -            }
    -            if (Optional.IsDefined(ExtendedInfo))
    -            {
    -                writer.WritePropertyName("extendedInfo"u8);
    -                writer.WriteObjectValue(ExtendedInfo, options);
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             BackupGenericEngine IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownBackupRequest.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownBackupRequest.Serialization.cs
    index 3ea77359387d..f74b04f28576 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownBackupRequest.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownBackupRequest.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class UnknownBackupRequest : IUtf8JsonSerializable, IJsonModel<
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,25 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt
                     throw new FormatException($"The model {nameof(BackupContent)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            writer.WritePropertyName("objectType"u8);
    -            writer.WriteStringValue(ObjectType);
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             BackupContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownFeatureSupportRequest.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownFeatureSupportRequest.Serialization.cs
    index a04853e305b5..cde9e4013704 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownFeatureSupportRequest.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownFeatureSupportRequest.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class UnknownFeatureSupportRequest : IUtf8JsonSerializable, IJs
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,25 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW
                     throw new FormatException($"The model {nameof(FeatureSupportContent)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            writer.WritePropertyName("featureType"u8);
    -            writer.WriteStringValue(FeatureType);
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             FeatureSupportContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownFetchTieringCostInfoRequest.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownFetchTieringCostInfoRequest.Serialization.cs
    index 70f67d081b62..b51ea2fe7dfa 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownFetchTieringCostInfoRequest.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownFetchTieringCostInfoRequest.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class UnknownFetchTieringCostInfoRequest : IUtf8JsonSerializabl
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,29 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR
                     throw new FormatException($"The model {nameof(FetchTieringCostInfoContent)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            writer.WritePropertyName("sourceTierType"u8);
    -            writer.WriteStringValue(SourceTierType.ToSerialString());
    -            writer.WritePropertyName("targetTierType"u8);
    -            writer.WriteStringValue(TargetTierType.ToSerialString());
    -            writer.WritePropertyName("objectType"u8);
    -            writer.WriteStringValue(ObjectType);
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             FetchTieringCostInfoContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownIlrRequest.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownIlrRequest.Serialization.cs
    index 575ced8bf0ca..78dbaf9f1b0c 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownIlrRequest.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownIlrRequest.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class UnknownIlrRequest : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,25 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOption
                     throw new FormatException($"The model {nameof(IlrContent)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            writer.WritePropertyName("objectType"u8);
    -            writer.WriteStringValue(ObjectType);
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             IlrContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownJob.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownJob.Serialization.cs
    index c5f9a29a416e..31e712e095fe 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownJob.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownJob.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class UnknownJob : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,60 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter
                     throw new FormatException($"The model {nameof(BackupGenericJob)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            if (Optional.IsDefined(EntityFriendlyName))
    -            {
    -                writer.WritePropertyName("entityFriendlyName"u8);
    -                writer.WriteStringValue(EntityFriendlyName);
    -            }
    -            if (Optional.IsDefined(BackupManagementType))
    -            {
    -                writer.WritePropertyName("backupManagementType"u8);
    -                writer.WriteStringValue(BackupManagementType.Value.ToString());
    -            }
    -            if (Optional.IsDefined(Operation))
    -            {
    -                writer.WritePropertyName("operation"u8);
    -                writer.WriteStringValue(Operation);
    -            }
    -            if (Optional.IsDefined(Status))
    -            {
    -                writer.WritePropertyName("status"u8);
    -                writer.WriteStringValue(Status);
    -            }
    -            if (Optional.IsDefined(StartOn))
    -            {
    -                writer.WritePropertyName("startTime"u8);
    -                writer.WriteStringValue(StartOn.Value, "O");
    -            }
    -            if (Optional.IsDefined(EndOn))
    -            {
    -                writer.WritePropertyName("endTime"u8);
    -                writer.WriteStringValue(EndOn.Value, "O");
    -            }
    -            if (Optional.IsDefined(ActivityId))
    -            {
    -                writer.WritePropertyName("activityId"u8);
    -                writer.WriteStringValue(ActivityId);
    -            }
    -            writer.WritePropertyName("jobType"u8);
    -            writer.WriteStringValue(JobType);
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             BackupGenericJob IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownProtectableContainer.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownProtectableContainer.Serialization.cs
    index 8cd673087b35..9b3bbd646bc0 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownProtectableContainer.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownProtectableContainer.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class UnknownProtectableContainer : IUtf8JsonSerializable, IJso
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,45 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr
                     throw new FormatException($"The model {nameof(ProtectableContainer)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            if (Optional.IsDefined(FriendlyName))
    -            {
    -                writer.WritePropertyName("friendlyName"u8);
    -                writer.WriteStringValue(FriendlyName);
    -            }
    -            if (Optional.IsDefined(BackupManagementType))
    -            {
    -                writer.WritePropertyName("backupManagementType"u8);
    -                writer.WriteStringValue(BackupManagementType.Value.ToString());
    -            }
    -            writer.WritePropertyName("protectableContainerType"u8);
    -            writer.WriteStringValue(ProtectableContainerType.ToSerialString());
    -            if (Optional.IsDefined(HealthStatus))
    -            {
    -                writer.WritePropertyName("healthStatus"u8);
    -                writer.WriteStringValue(HealthStatus);
    -            }
    -            if (Optional.IsDefined(ContainerId))
    -            {
    -                writer.WritePropertyName("containerId"u8);
    -                writer.WriteStringValue(ContainerId);
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             ProtectableContainer IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownProtectedItem.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownProtectedItem.Serialization.cs
    index a8b2a7843b45..5d4aba6c91b8 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownProtectedItem.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownProtectedItem.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class UnknownProtectedItem : IUtf8JsonSerializable, IJsonModel<
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,120 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe
                     throw new FormatException($"The model {nameof(BackupGenericProtectedItem)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            writer.WritePropertyName("protectedItemType"u8);
    -            writer.WriteStringValue(ProtectedItemType);
    -            if (options.Format != "W" && Optional.IsDefined(BackupManagementType))
    -            {
    -                writer.WritePropertyName("backupManagementType"u8);
    -                writer.WriteStringValue(BackupManagementType.Value.ToString());
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(WorkloadType))
    -            {
    -                writer.WritePropertyName("workloadType"u8);
    -                writer.WriteStringValue(WorkloadType.Value.ToString());
    -            }
    -            if (Optional.IsDefined(ContainerName))
    -            {
    -                writer.WritePropertyName("containerName"u8);
    -                writer.WriteStringValue(ContainerName);
    -            }
    -            if (Optional.IsDefined(SourceResourceId))
    -            {
    -                writer.WritePropertyName("sourceResourceId"u8);
    -                writer.WriteStringValue(SourceResourceId);
    -            }
    -            if (Optional.IsDefined(PolicyId))
    -            {
    -                writer.WritePropertyName("policyId"u8);
    -                writer.WriteStringValue(PolicyId);
    -            }
    -            if (Optional.IsDefined(LastRecoverOn))
    -            {
    -                writer.WritePropertyName("lastRecoveryPoint"u8);
    -                writer.WriteStringValue(LastRecoverOn.Value, "O");
    -            }
    -            if (Optional.IsDefined(BackupSetName))
    -            {
    -                writer.WritePropertyName("backupSetName"u8);
    -                writer.WriteStringValue(BackupSetName);
    -            }
    -            if (Optional.IsDefined(CreateMode))
    -            {
    -                writer.WritePropertyName("createMode"u8);
    -                writer.WriteStringValue(CreateMode.Value.ToString());
    -            }
    -            if (Optional.IsDefined(DeferredDeletedOn))
    -            {
    -                writer.WritePropertyName("deferredDeleteTimeInUTC"u8);
    -                writer.WriteStringValue(DeferredDeletedOn.Value, "O");
    -            }
    -            if (Optional.IsDefined(IsScheduledForDeferredDelete))
    -            {
    -                writer.WritePropertyName("isScheduledForDeferredDelete"u8);
    -                writer.WriteBooleanValue(IsScheduledForDeferredDelete.Value);
    -            }
    -            if (Optional.IsDefined(DeferredDeleteTimeRemaining))
    -            {
    -                writer.WritePropertyName("deferredDeleteTimeRemaining"u8);
    -                writer.WriteStringValue(DeferredDeleteTimeRemaining);
    -            }
    -            if (Optional.IsDefined(IsDeferredDeleteScheduleUpcoming))
    -            {
    -                writer.WritePropertyName("isDeferredDeleteScheduleUpcoming"u8);
    -                writer.WriteBooleanValue(IsDeferredDeleteScheduleUpcoming.Value);
    -            }
    -            if (Optional.IsDefined(IsRehydrate))
    -            {
    -                writer.WritePropertyName("isRehydrate"u8);
    -                writer.WriteBooleanValue(IsRehydrate.Value);
    -            }
    -            if (Optional.IsCollectionDefined(ResourceGuardOperationRequests))
    -            {
    -                writer.WritePropertyName("resourceGuardOperationRequests"u8);
    -                writer.WriteStartArray();
    -                foreach (var item in ResourceGuardOperationRequests)
    -                {
    -                    writer.WriteStringValue(item);
    -                }
    -                writer.WriteEndArray();
    -            }
    -            if (Optional.IsDefined(IsArchiveEnabled))
    -            {
    -                writer.WritePropertyName("isArchiveEnabled"u8);
    -                writer.WriteBooleanValue(IsArchiveEnabled.Value);
    -            }
    -            if (Optional.IsDefined(PolicyName))
    -            {
    -                writer.WritePropertyName("policyName"u8);
    -                writer.WriteStringValue(PolicyName);
    -            }
    -            if (Optional.IsDefined(SoftDeleteRetentionPeriodInDays))
    -            {
    -                writer.WritePropertyName("softDeleteRetentionPeriodInDays"u8);
    -                writer.WriteNumberValue(SoftDeleteRetentionPeriodInDays.Value);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(VaultId))
    -            {
    -                writer.WritePropertyName("vaultId"u8);
    -                writer.WriteStringValue(VaultId);
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             BackupGenericProtectedItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownProtectionContainer.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownProtectionContainer.Serialization.cs
    index 4e2c2ae58b13..e9b1f234f457 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownProtectionContainer.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownProtectionContainer.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class UnknownProtectionContainer : IUtf8JsonSerializable, IJson
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,50 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, M
                     throw new FormatException($"The model {nameof(BackupGenericProtectionContainer)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            if (Optional.IsDefined(FriendlyName))
    -            {
    -                writer.WritePropertyName("friendlyName"u8);
    -                writer.WriteStringValue(FriendlyName);
    -            }
    -            if (Optional.IsDefined(BackupManagementType))
    -            {
    -                writer.WritePropertyName("backupManagementType"u8);
    -                writer.WriteStringValue(BackupManagementType.Value.ToString());
    -            }
    -            if (Optional.IsDefined(RegistrationStatus))
    -            {
    -                writer.WritePropertyName("registrationStatus"u8);
    -                writer.WriteStringValue(RegistrationStatus);
    -            }
    -            if (Optional.IsDefined(HealthStatus))
    -            {
    -                writer.WritePropertyName("healthStatus"u8);
    -                writer.WriteStringValue(HealthStatus);
    -            }
    -            writer.WritePropertyName("containerType"u8);
    -            writer.WriteStringValue(ContainerType.ToSerialString());
    -            if (Optional.IsDefined(ProtectableObjectType))
    -            {
    -                writer.WritePropertyName("protectableObjectType"u8);
    -                writer.WriteStringValue(ProtectableObjectType);
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             BackupGenericProtectionContainer IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownProtectionIntent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownProtectionIntent.Serialization.cs
    index 917aede03229..7c445faed5ce 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownProtectionIntent.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownProtectionIntent.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class UnknownProtectionIntent : IUtf8JsonSerializable, IJsonMod
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,50 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode
                     throw new FormatException($"The model {nameof(BackupGenericProtectionIntent)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            writer.WritePropertyName("protectionIntentItemType"u8);
    -            writer.WriteStringValue(ProtectionIntentItemType.ToString());
    -            if (Optional.IsDefined(BackupManagementType))
    -            {
    -                writer.WritePropertyName("backupManagementType"u8);
    -                writer.WriteStringValue(BackupManagementType.Value.ToString());
    -            }
    -            if (Optional.IsDefined(SourceResourceId))
    -            {
    -                writer.WritePropertyName("sourceResourceId"u8);
    -                writer.WriteStringValue(SourceResourceId);
    -            }
    -            if (Optional.IsDefined(ItemId))
    -            {
    -                writer.WritePropertyName("itemId"u8);
    -                writer.WriteStringValue(ItemId);
    -            }
    -            if (Optional.IsDefined(PolicyId))
    -            {
    -                writer.WritePropertyName("policyId"u8);
    -                writer.WriteStringValue(PolicyId);
    -            }
    -            if (Optional.IsDefined(ProtectionState))
    -            {
    -                writer.WritePropertyName("protectionState"u8);
    -                writer.WriteStringValue(ProtectionState.Value.ToString());
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             BackupGenericProtectionIntent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownProtectionPolicy.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownProtectionPolicy.Serialization.cs
    index cfc99a6a499a..86c9dad40740 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownProtectionPolicy.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownProtectionPolicy.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class UnknownProtectionPolicy : IUtf8JsonSerializable, IJsonMod
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,40 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode
                     throw new FormatException($"The model {nameof(BackupGenericProtectionPolicy)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            if (Optional.IsDefined(ProtectedItemsCount))
    -            {
    -                writer.WritePropertyName("protectedItemsCount"u8);
    -                writer.WriteNumberValue(ProtectedItemsCount.Value);
    -            }
    -            writer.WritePropertyName("backupManagementType"u8);
    -            writer.WriteStringValue(BackupManagementType);
    -            if (Optional.IsCollectionDefined(ResourceGuardOperationRequests))
    -            {
    -                writer.WritePropertyName("resourceGuardOperationRequests"u8);
    -                writer.WriteStartArray();
    -                foreach (var item in ResourceGuardOperationRequests)
    -                {
    -                    writer.WriteStringValue(item);
    -                }
    -                writer.WriteEndArray();
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             BackupGenericProtectionPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownRecoveryPoint.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownRecoveryPoint.Serialization.cs
    index b15c5f1e6f1b..319d5216268c 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownRecoveryPoint.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownRecoveryPoint.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class UnknownRecoveryPoint : IUtf8JsonSerializable, IJsonModel<
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,25 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe
                     throw new FormatException($"The model {nameof(BackupGenericRecoveryPoint)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            writer.WritePropertyName("objectType"u8);
    -            writer.WriteStringValue(ObjectType);
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             BackupGenericRecoveryPoint IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownRestoreRequest.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownRestoreRequest.Serialization.cs
    index 8983e08c8b57..1015a379292a 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownRestoreRequest.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownRestoreRequest.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class UnknownRestoreRequest : IUtf8JsonSerializable, IJsonModel
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,25 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp
                     throw new FormatException($"The model {nameof(RestoreContent)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            writer.WritePropertyName("objectType"u8);
    -            writer.WriteStringValue(ObjectType);
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             RestoreContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownRetentionPolicy.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownRetentionPolicy.Serialization.cs
    index 1ea10686f536..74a6fcdeae4a 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownRetentionPolicy.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownRetentionPolicy.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class UnknownRetentionPolicy : IUtf8JsonSerializable, IJsonMode
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,25 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW
                     throw new FormatException($"The model {nameof(BackupRetentionPolicy)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            writer.WritePropertyName("retentionPolicyType"u8);
    -            writer.WriteStringValue(RetentionPolicyType);
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             BackupRetentionPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownSchedulePolicy.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownSchedulePolicy.Serialization.cs
    index ca3666e2d671..dc929dbd1c27 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownSchedulePolicy.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownSchedulePolicy.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class UnknownSchedulePolicy : IUtf8JsonSerializable, IJsonModel
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,25 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr
                     throw new FormatException($"The model {nameof(BackupSchedulePolicy)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            writer.WritePropertyName("schedulePolicyType"u8);
    -            writer.WriteStringValue(SchedulePolicyType);
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             BackupSchedulePolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownTieringCostInfo.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownTieringCostInfo.Serialization.cs
    index 00fd647b896f..dc411e21be45 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownTieringCostInfo.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownTieringCostInfo.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class UnknownTieringCostInfo : IUtf8JsonSerializable, IJsonMode
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,25 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO
                     throw new FormatException($"The model {nameof(TieringCostInfo)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            writer.WritePropertyName("objectType"u8);
    -            writer.WriteStringValue(ObjectType);
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             TieringCostInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownWorkloadItem.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownWorkloadItem.Serialization.cs
    index f8e8c7cd8aa8..81afad54a7a1 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownWorkloadItem.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownWorkloadItem.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class UnknownWorkloadItem : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,45 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti
                     throw new FormatException($"The model {nameof(WorkloadItem)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            if (Optional.IsDefined(BackupManagementType))
    -            {
    -                writer.WritePropertyName("backupManagementType"u8);
    -                writer.WriteStringValue(BackupManagementType);
    -            }
    -            if (Optional.IsDefined(WorkloadType))
    -            {
    -                writer.WritePropertyName("workloadType"u8);
    -                writer.WriteStringValue(WorkloadType);
    -            }
    -            writer.WritePropertyName("workloadItemType"u8);
    -            writer.WriteStringValue(WorkloadItemType);
    -            if (Optional.IsDefined(FriendlyName))
    -            {
    -                writer.WritePropertyName("friendlyName"u8);
    -                writer.WriteStringValue(FriendlyName);
    -            }
    -            if (Optional.IsDefined(ProtectionState))
    -            {
    -                writer.WritePropertyName("protectionState"u8);
    -                writer.WriteStringValue(ProtectionState.Value.ToString());
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             WorkloadItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownWorkloadProtectableItem.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownWorkloadProtectableItem.Serialization.cs
    index 6b1d0184ca68..83a258640711 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownWorkloadProtectableItem.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownWorkloadProtectableItem.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class UnknownWorkloadProtectableItem : IUtf8JsonSerializable, I
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,45 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade
                     throw new FormatException($"The model {nameof(WorkloadProtectableItem)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            if (Optional.IsDefined(BackupManagementType))
    -            {
    -                writer.WritePropertyName("backupManagementType"u8);
    -                writer.WriteStringValue(BackupManagementType);
    -            }
    -            if (Optional.IsDefined(WorkloadType))
    -            {
    -                writer.WritePropertyName("workloadType"u8);
    -                writer.WriteStringValue(WorkloadType);
    -            }
    -            writer.WritePropertyName("protectableItemType"u8);
    -            writer.WriteStringValue(ProtectableItemType);
    -            if (Optional.IsDefined(FriendlyName))
    -            {
    -                writer.WritePropertyName("friendlyName"u8);
    -                writer.WriteStringValue(FriendlyName);
    -            }
    -            if (Optional.IsDefined(ProtectionState))
    -            {
    -                writer.WritePropertyName("protectionState"u8);
    -                writer.WriteStringValue(ProtectionState.Value.ToString());
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             WorkloadProtectableItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnlockDeleteContent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnlockDeleteContent.Serialization.cs
    index 4279c79ecee6..61af3d2374f7 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnlockDeleteContent.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnlockDeleteContent.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class UnlockDeleteContent : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri
                     throw new FormatException($"The model {nameof(UnlockDeleteContent)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsCollectionDefined(ResourceGuardOperationRequests))
                 {
                     writer.WritePropertyName("resourceGuardOperationRequests"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             UnlockDeleteContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnlockDeleteResult.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnlockDeleteResult.Serialization.cs
    index 3b35a5dc2633..f83181597d1d 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnlockDeleteResult.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnlockDeleteResult.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class UnlockDeleteResult : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit
                     throw new FormatException($"The model {nameof(UnlockDeleteResult)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(UnlockDeleteExpireOn))
                 {
                     writer.WritePropertyName("unlockDeleteExpiryTime"u8);
    @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             UnlockDeleteResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UserAssignedManagedIdentityDetails.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UserAssignedManagedIdentityDetails.Serialization.cs
    index 7ce8d7e36a7e..45c2198e7635 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UserAssignedManagedIdentityDetails.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UserAssignedManagedIdentityDetails.Serialization.cs
    @@ -19,6 +19,15 @@ public partial class UserAssignedManagedIdentityDetails : IUtf8JsonSerializable,
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer,
                     throw new FormatException($"The model {nameof(UserAssignedManagedIdentityDetails)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(IdentityArmId))
                 {
                     writer.WritePropertyName("identityArmId"u8);
    @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer,
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             UserAssignedManagedIdentityDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VaultBackupJob.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VaultBackupJob.Serialization.cs
    index 87a43a8dddfa..1e6971092eec 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VaultBackupJob.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VaultBackupJob.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class VaultBackupJob : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp
                     throw new FormatException($"The model {nameof(VaultBackupJob)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(Duration))
                 {
                     writer.WritePropertyName("duration"u8);
    @@ -56,59 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp
                     writer.WritePropertyName("extendedInfo"u8);
                     writer.WriteObjectValue(ExtendedInfo, options);
                 }
    -            if (Optional.IsDefined(EntityFriendlyName))
    -            {
    -                writer.WritePropertyName("entityFriendlyName"u8);
    -                writer.WriteStringValue(EntityFriendlyName);
    -            }
    -            if (Optional.IsDefined(BackupManagementType))
    -            {
    -                writer.WritePropertyName("backupManagementType"u8);
    -                writer.WriteStringValue(BackupManagementType.Value.ToString());
    -            }
    -            if (Optional.IsDefined(Operation))
    -            {
    -                writer.WritePropertyName("operation"u8);
    -                writer.WriteStringValue(Operation);
    -            }
    -            if (Optional.IsDefined(Status))
    -            {
    -                writer.WritePropertyName("status"u8);
    -                writer.WriteStringValue(Status);
    -            }
    -            if (Optional.IsDefined(StartOn))
    -            {
    -                writer.WritePropertyName("startTime"u8);
    -                writer.WriteStringValue(StartOn.Value, "O");
    -            }
    -            if (Optional.IsDefined(EndOn))
    -            {
    -                writer.WritePropertyName("endTime"u8);
    -                writer.WriteStringValue(EndOn.Value, "O");
    -            }
    -            if (Optional.IsDefined(ActivityId))
    -            {
    -                writer.WritePropertyName("activityId"u8);
    -                writer.WriteStringValue(ActivityId);
    -            }
    -            writer.WritePropertyName("jobType"u8);
    -            writer.WriteStringValue(JobType);
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             VaultBackupJob IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VaultBackupJobErrorInfo.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VaultBackupJobErrorInfo.Serialization.cs
    index 09688ae2f0e9..53a89be1abfb 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VaultBackupJobErrorInfo.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VaultBackupJobErrorInfo.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class VaultBackupJobErrorInfo : IUtf8JsonSerializable, IJsonModel
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade
                     throw new FormatException($"The model {nameof(VaultBackupJobErrorInfo)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(ErrorCode))
                 {
                     writer.WritePropertyName("errorCode"u8);
    @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             VaultBackupJobErrorInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VaultBackupJobExtendedInfo.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VaultBackupJobExtendedInfo.Serialization.cs
    index 79ad892e7230..6b2bf30a0b80 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VaultBackupJobExtendedInfo.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VaultBackupJobExtendedInfo.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class VaultBackupJobExtendedInfo : IUtf8JsonSerializable, IJson
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe
                     throw new FormatException($"The model {nameof(VaultBackupJobExtendedInfo)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsCollectionDefined(PropertyBag))
                 {
                     writer.WritePropertyName("propertyBag"u8);
    @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             VaultBackupJobExtendedInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VaultRetentionPolicy.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VaultRetentionPolicy.Serialization.cs
    index c575c30df396..5577c2042ee2 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VaultRetentionPolicy.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VaultRetentionPolicy.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class VaultRetentionPolicy : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr
                     throw new FormatException($"The model {nameof(VaultRetentionPolicy)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 writer.WritePropertyName("vaultRetention"u8);
                 writer.WriteObjectValue(VaultRetention, options);
                 writer.WritePropertyName("snapshotRetentionInDays"u8);
    @@ -45,7 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             VaultRetentionPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmAppContainerProtectableContainer.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmAppContainerProtectableContainer.Serialization.cs
    index 054e0b40811e..22bd6a2b2469 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmAppContainerProtectableContainer.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmAppContainerProtectableContainer.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class VmAppContainerProtectableContainer : IUtf8JsonSerializable,
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,45 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer,
                     throw new FormatException($"The model {nameof(VmAppContainerProtectableContainer)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            if (Optional.IsDefined(FriendlyName))
    -            {
    -                writer.WritePropertyName("friendlyName"u8);
    -                writer.WriteStringValue(FriendlyName);
    -            }
    -            if (Optional.IsDefined(BackupManagementType))
    -            {
    -                writer.WritePropertyName("backupManagementType"u8);
    -                writer.WriteStringValue(BackupManagementType.Value.ToString());
    -            }
    -            writer.WritePropertyName("protectableContainerType"u8);
    -            writer.WriteStringValue(ProtectableContainerType.ToSerialString());
    -            if (Optional.IsDefined(HealthStatus))
    -            {
    -                writer.WritePropertyName("healthStatus"u8);
    -                writer.WriteStringValue(HealthStatus);
    -            }
    -            if (Optional.IsDefined(ContainerId))
    -            {
    -                writer.WritePropertyName("containerId"u8);
    -                writer.WriteStringValue(ContainerId);
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             VmAppContainerProtectableContainer IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmAppContainerProtectionContainer.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmAppContainerProtectionContainer.Serialization.cs
    index 4c38644db345..547f13a56739 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmAppContainerProtectionContainer.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmAppContainerProtectionContainer.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class VmAppContainerProtectionContainer : IUtf8JsonSerializable,
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,75 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer,
                     throw new FormatException($"The model {nameof(VmAppContainerProtectionContainer)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            if (Optional.IsDefined(SourceResourceId))
    -            {
    -                writer.WritePropertyName("sourceResourceId"u8);
    -                writer.WriteStringValue(SourceResourceId);
    -            }
    -            if (Optional.IsDefined(LastUpdatedOn))
    -            {
    -                writer.WritePropertyName("lastUpdatedTime"u8);
    -                writer.WriteStringValue(LastUpdatedOn.Value, "O");
    -            }
    -            if (Optional.IsDefined(ExtendedInfo))
    -            {
    -                writer.WritePropertyName("extendedInfo"u8);
    -                writer.WriteObjectValue(ExtendedInfo, options);
    -            }
    -            if (Optional.IsDefined(WorkloadType))
    -            {
    -                writer.WritePropertyName("workloadType"u8);
    -                writer.WriteStringValue(WorkloadType.Value.ToString());
    -            }
    -            if (Optional.IsDefined(OperationType))
    -            {
    -                writer.WritePropertyName("operationType"u8);
    -                writer.WriteStringValue(OperationType.Value.ToString());
    -            }
    -            if (Optional.IsDefined(FriendlyName))
    -            {
    -                writer.WritePropertyName("friendlyName"u8);
    -                writer.WriteStringValue(FriendlyName);
    -            }
    -            if (Optional.IsDefined(BackupManagementType))
    -            {
    -                writer.WritePropertyName("backupManagementType"u8);
    -                writer.WriteStringValue(BackupManagementType.Value.ToString());
    -            }
    -            if (Optional.IsDefined(RegistrationStatus))
    -            {
    -                writer.WritePropertyName("registrationStatus"u8);
    -                writer.WriteStringValue(RegistrationStatus);
    -            }
    -            if (Optional.IsDefined(HealthStatus))
    -            {
    -                writer.WritePropertyName("healthStatus"u8);
    -                writer.WriteStringValue(HealthStatus);
    -            }
    -            writer.WritePropertyName("containerType"u8);
    -            writer.WriteStringValue(ContainerType.ToSerialString());
    -            if (Optional.IsDefined(ProtectableObjectType))
    -            {
    -                writer.WritePropertyName("protectableObjectType"u8);
    -                writer.WriteStringValue(ProtectableObjectType);
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             VmAppContainerProtectionContainer IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmEncryptionDetails.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmEncryptionDetails.Serialization.cs
    index 9d568c893975..f60806afb08e 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmEncryptionDetails.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmEncryptionDetails.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class VmEncryptionDetails : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri
                     throw new FormatException($"The model {nameof(VmEncryptionDetails)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(IsEncryptionEnabled))
                 {
                     writer.WritePropertyName("encryptionEnabled"u8);
    @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             VmEncryptionDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmResourceFeatureSupportContent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmResourceFeatureSupportContent.Serialization.cs
    index b257a89422bc..247bda7d3bb9 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmResourceFeatureSupportContent.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmResourceFeatureSupportContent.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class VmResourceFeatureSupportContent : IUtf8JsonSerializable, IJ
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo
                     throw new FormatException($"The model {nameof(VmResourceFeatureSupportContent)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(VmSize))
                 {
                     writer.WritePropertyName("vmSize"u8);
    @@ -36,24 +45,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo
                     writer.WritePropertyName("vmSku"u8);
                     writer.WriteStringValue(VmSku);
                 }
    -            writer.WritePropertyName("featureType"u8);
    -            writer.WriteStringValue(FeatureType);
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             VmResourceFeatureSupportContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmResourceFeatureSupportResult.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmResourceFeatureSupportResult.Serialization.cs
    index dc15f47f927b..70e0cc3bcf91 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmResourceFeatureSupportResult.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmResourceFeatureSupportResult.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class VmResourceFeatureSupportResult : IUtf8JsonSerializable, IJs
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod
                     throw new FormatException($"The model {nameof(VmResourceFeatureSupportResult)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(SupportStatus))
                 {
                     writer.WritePropertyName("supportStatus"u8);
    @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             VmResourceFeatureSupportResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadItem.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadItem.Serialization.cs
    index 521f0ed65e0e..51c7b18de11c 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadItem.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadItem.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class VmWorkloadItem : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp
                     throw new FormatException($"The model {nameof(VmWorkloadItem)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(ParentName))
                 {
                     writer.WritePropertyName("parentName"u8);
    @@ -51,44 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp
                     writer.WritePropertyName("subWorkloadItemCount"u8);
                     writer.WriteNumberValue(SubWorkloadItemCount.Value);
                 }
    -            if (Optional.IsDefined(BackupManagementType))
    -            {
    -                writer.WritePropertyName("backupManagementType"u8);
    -                writer.WriteStringValue(BackupManagementType);
    -            }
    -            if (Optional.IsDefined(WorkloadType))
    -            {
    -                writer.WritePropertyName("workloadType"u8);
    -                writer.WriteStringValue(WorkloadType);
    -            }
    -            writer.WritePropertyName("workloadItemType"u8);
    -            writer.WriteStringValue(WorkloadItemType);
    -            if (Optional.IsDefined(FriendlyName))
    -            {
    -                writer.WritePropertyName("friendlyName"u8);
    -                writer.WriteStringValue(FriendlyName);
    -            }
    -            if (Optional.IsDefined(ProtectionState))
    -            {
    -                writer.WritePropertyName("protectionState"u8);
    -                writer.WriteStringValue(ProtectionState.Value.ToString());
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             VmWorkloadItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadProtectableItem.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadProtectableItem.Serialization.cs
    index 0caf92fa34eb..9138bfc35f59 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadProtectableItem.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadProtectableItem.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class VmWorkloadProtectableItem : IUtf8JsonSerializable, IJsonMod
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea
                     throw new FormatException($"The model {nameof(VmWorkloadProtectableItem)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(ParentName))
                 {
                     writer.WritePropertyName("parentName"u8);
    @@ -71,44 +80,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea
                     writer.WritePropertyName("isProtectable"u8);
                     writer.WriteBooleanValue(IsProtectable.Value);
                 }
    -            if (Optional.IsDefined(BackupManagementType))
    -            {
    -                writer.WritePropertyName("backupManagementType"u8);
    -                writer.WriteStringValue(BackupManagementType);
    -            }
    -            if (Optional.IsDefined(WorkloadType))
    -            {
    -                writer.WritePropertyName("workloadType"u8);
    -                writer.WriteStringValue(WorkloadType);
    -            }
    -            writer.WritePropertyName("protectableItemType"u8);
    -            writer.WriteStringValue(ProtectableItemType);
    -            if (Optional.IsDefined(FriendlyName))
    -            {
    -                writer.WritePropertyName("friendlyName"u8);
    -                writer.WriteStringValue(FriendlyName);
    -            }
    -            if (Optional.IsDefined(ProtectionState))
    -            {
    -                writer.WritePropertyName("protectionState"u8);
    -                writer.WriteStringValue(ProtectionState.Value.ToString());
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             VmWorkloadProtectableItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadProtectedItem.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadProtectedItem.Serialization.cs
    index 74106529b877..f53cf6bf328b 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadProtectedItem.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadProtectedItem.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class VmWorkloadProtectedItem : IUtf8JsonSerializable, IJsonModel
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade
                     throw new FormatException($"The model {nameof(VmWorkloadProtectedItem)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (options.Format != "W" && Optional.IsDefined(FriendlyName))
                 {
                     writer.WritePropertyName("friendlyName"u8);
    @@ -107,119 +116,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade
                     }
                     writer.WriteEndArray();
                 }
    -            writer.WritePropertyName("protectedItemType"u8);
    -            writer.WriteStringValue(ProtectedItemType);
    -            if (options.Format != "W" && Optional.IsDefined(BackupManagementType))
    -            {
    -                writer.WritePropertyName("backupManagementType"u8);
    -                writer.WriteStringValue(BackupManagementType.Value.ToString());
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(WorkloadType))
    -            {
    -                writer.WritePropertyName("workloadType"u8);
    -                writer.WriteStringValue(WorkloadType.Value.ToString());
    -            }
    -            if (Optional.IsDefined(ContainerName))
    -            {
    -                writer.WritePropertyName("containerName"u8);
    -                writer.WriteStringValue(ContainerName);
    -            }
    -            if (Optional.IsDefined(SourceResourceId))
    -            {
    -                writer.WritePropertyName("sourceResourceId"u8);
    -                writer.WriteStringValue(SourceResourceId);
    -            }
    -            if (Optional.IsDefined(PolicyId))
    -            {
    -                writer.WritePropertyName("policyId"u8);
    -                writer.WriteStringValue(PolicyId);
    -            }
    -            if (Optional.IsDefined(LastRecoverOn))
    -            {
    -                writer.WritePropertyName("lastRecoveryPoint"u8);
    -                writer.WriteStringValue(LastRecoverOn.Value, "O");
    -            }
    -            if (Optional.IsDefined(BackupSetName))
    -            {
    -                writer.WritePropertyName("backupSetName"u8);
    -                writer.WriteStringValue(BackupSetName);
    -            }
    -            if (Optional.IsDefined(CreateMode))
    -            {
    -                writer.WritePropertyName("createMode"u8);
    -                writer.WriteStringValue(CreateMode.Value.ToString());
    -            }
    -            if (Optional.IsDefined(DeferredDeletedOn))
    -            {
    -                writer.WritePropertyName("deferredDeleteTimeInUTC"u8);
    -                writer.WriteStringValue(DeferredDeletedOn.Value, "O");
    -            }
    -            if (Optional.IsDefined(IsScheduledForDeferredDelete))
    -            {
    -                writer.WritePropertyName("isScheduledForDeferredDelete"u8);
    -                writer.WriteBooleanValue(IsScheduledForDeferredDelete.Value);
    -            }
    -            if (Optional.IsDefined(DeferredDeleteTimeRemaining))
    -            {
    -                writer.WritePropertyName("deferredDeleteTimeRemaining"u8);
    -                writer.WriteStringValue(DeferredDeleteTimeRemaining);
    -            }
    -            if (Optional.IsDefined(IsDeferredDeleteScheduleUpcoming))
    -            {
    -                writer.WritePropertyName("isDeferredDeleteScheduleUpcoming"u8);
    -                writer.WriteBooleanValue(IsDeferredDeleteScheduleUpcoming.Value);
    -            }
    -            if (Optional.IsDefined(IsRehydrate))
    -            {
    -                writer.WritePropertyName("isRehydrate"u8);
    -                writer.WriteBooleanValue(IsRehydrate.Value);
    -            }
    -            if (Optional.IsCollectionDefined(ResourceGuardOperationRequests))
    -            {
    -                writer.WritePropertyName("resourceGuardOperationRequests"u8);
    -                writer.WriteStartArray();
    -                foreach (var item in ResourceGuardOperationRequests)
    -                {
    -                    writer.WriteStringValue(item);
    -                }
    -                writer.WriteEndArray();
    -            }
    -            if (Optional.IsDefined(IsArchiveEnabled))
    -            {
    -                writer.WritePropertyName("isArchiveEnabled"u8);
    -                writer.WriteBooleanValue(IsArchiveEnabled.Value);
    -            }
    -            if (Optional.IsDefined(PolicyName))
    -            {
    -                writer.WritePropertyName("policyName"u8);
    -                writer.WriteStringValue(PolicyName);
    -            }
    -            if (Optional.IsDefined(SoftDeleteRetentionPeriodInDays))
    -            {
    -                writer.WritePropertyName("softDeleteRetentionPeriodInDays"u8);
    -                writer.WriteNumberValue(SoftDeleteRetentionPeriodInDays.Value);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(VaultId))
    -            {
    -                writer.WritePropertyName("vaultId"u8);
    -                writer.WriteStringValue(VaultId);
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             VmWorkloadProtectedItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadProtectedItemExtendedInfo.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadProtectedItemExtendedInfo.Serialization.cs
    index 3d677baea968..1219521d4f20 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadProtectedItemExtendedInfo.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadProtectedItemExtendedInfo.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class VmWorkloadProtectedItemExtendedInfo : IUtf8JsonSerializable
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer
                     throw new FormatException($"The model {nameof(VmWorkloadProtectedItemExtendedInfo)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(OldestRecoverOn))
                 {
                     writer.WritePropertyName("oldestRecoveryPoint"u8);
    @@ -76,7 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter writer
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             VmWorkloadProtectedItemExtendedInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadProtectionPolicy.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadProtectionPolicy.Serialization.cs
    index 963073f86443..a1352f08f208 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadProtectionPolicy.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadProtectionPolicy.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class VmWorkloadProtectionPolicy : IUtf8JsonSerializable, IJsonMo
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe
                     throw new FormatException($"The model {nameof(VmWorkloadProtectionPolicy)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(WorkLoadType))
                 {
                     writer.WritePropertyName("workLoadType"u8);
    @@ -51,39 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe
                     writer.WritePropertyName("makePolicyConsistent"u8);
                     writer.WriteBooleanValue(DoesMakePolicyConsistent.Value);
                 }
    -            if (Optional.IsDefined(ProtectedItemsCount))
    -            {
    -                writer.WritePropertyName("protectedItemsCount"u8);
    -                writer.WriteNumberValue(ProtectedItemsCount.Value);
    -            }
    -            writer.WritePropertyName("backupManagementType"u8);
    -            writer.WriteStringValue(BackupManagementType);
    -            if (Optional.IsCollectionDefined(ResourceGuardOperationRequests))
    -            {
    -                writer.WritePropertyName("resourceGuardOperationRequests"u8);
    -                writer.WriteStartArray();
    -                foreach (var item in ResourceGuardOperationRequests)
    -                {
    -                    writer.WriteStringValue(item);
    -                }
    -                writer.WriteEndArray();
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             VmWorkloadProtectionPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapAseDatabaseProtectedItem.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapAseDatabaseProtectedItem.Serialization.cs
    index 98e11fe9b70b..e138cee4901f 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapAseDatabaseProtectedItem.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapAseDatabaseProtectedItem.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class VmWorkloadSapAseDatabaseProtectedItem : IUtf8JsonSerializab
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,201 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writ
                     throw new FormatException($"The model {nameof(VmWorkloadSapAseDatabaseProtectedItem)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            if (options.Format != "W" && Optional.IsDefined(FriendlyName))
    -            {
    -                writer.WritePropertyName("friendlyName"u8);
    -                writer.WriteStringValue(FriendlyName);
    -            }
    -            if (Optional.IsDefined(ServerName))
    -            {
    -                writer.WritePropertyName("serverName"u8);
    -                writer.WriteStringValue(ServerName);
    -            }
    -            if (Optional.IsDefined(ParentName))
    -            {
    -                writer.WritePropertyName("parentName"u8);
    -                writer.WriteStringValue(ParentName);
    -            }
    -            if (Optional.IsDefined(ParentType))
    -            {
    -                writer.WritePropertyName("parentType"u8);
    -                writer.WriteStringValue(ParentType);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(ProtectionStatus))
    -            {
    -                writer.WritePropertyName("protectionStatus"u8);
    -                writer.WriteStringValue(ProtectionStatus);
    -            }
    -            if (Optional.IsDefined(ProtectionState))
    -            {
    -                writer.WritePropertyName("protectionState"u8);
    -                writer.WriteStringValue(ProtectionState.Value.ToString());
    -            }
    -            if (Optional.IsDefined(LastBackupStatus))
    -            {
    -                writer.WritePropertyName("lastBackupStatus"u8);
    -                writer.WriteStringValue(LastBackupStatus.Value.ToString());
    -            }
    -            if (Optional.IsDefined(LastBackupOn))
    -            {
    -                writer.WritePropertyName("lastBackupTime"u8);
    -                writer.WriteStringValue(LastBackupOn.Value, "O");
    -            }
    -            if (Optional.IsDefined(LastBackupErrorDetail))
    -            {
    -                writer.WritePropertyName("lastBackupErrorDetail"u8);
    -                writer.WriteObjectValue(LastBackupErrorDetail, options);
    -            }
    -            if (Optional.IsDefined(ProtectedItemDataSourceId))
    -            {
    -                writer.WritePropertyName("protectedItemDataSourceId"u8);
    -                writer.WriteStringValue(ProtectedItemDataSourceId);
    -            }
    -            if (Optional.IsDefined(ProtectedItemHealthStatus))
    -            {
    -                writer.WritePropertyName("protectedItemHealthStatus"u8);
    -                writer.WriteStringValue(ProtectedItemHealthStatus.Value.ToString());
    -            }
    -            if (Optional.IsDefined(ExtendedInfo))
    -            {
    -                writer.WritePropertyName("extendedInfo"u8);
    -                writer.WriteObjectValue(ExtendedInfo, options);
    -            }
    -            if (Optional.IsCollectionDefined(KpisHealths))
    -            {
    -                writer.WritePropertyName("kpisHealths"u8);
    -                writer.WriteStartObject();
    -                foreach (var item in KpisHealths)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -                    writer.WriteObjectValue(item.Value, options);
    -                }
    -                writer.WriteEndObject();
    -            }
    -            if (Optional.IsCollectionDefined(NodesList))
    -            {
    -                writer.WritePropertyName("nodesList"u8);
    -                writer.WriteStartArray();
    -                foreach (var item in NodesList)
    -                {
    -                    writer.WriteObjectValue(item, options);
    -                }
    -                writer.WriteEndArray();
    -            }
    -            writer.WritePropertyName("protectedItemType"u8);
    -            writer.WriteStringValue(ProtectedItemType);
    -            if (options.Format != "W" && Optional.IsDefined(BackupManagementType))
    -            {
    -                writer.WritePropertyName("backupManagementType"u8);
    -                writer.WriteStringValue(BackupManagementType.Value.ToString());
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(WorkloadType))
    -            {
    -                writer.WritePropertyName("workloadType"u8);
    -                writer.WriteStringValue(WorkloadType.Value.ToString());
    -            }
    -            if (Optional.IsDefined(ContainerName))
    -            {
    -                writer.WritePropertyName("containerName"u8);
    -                writer.WriteStringValue(ContainerName);
    -            }
    -            if (Optional.IsDefined(SourceResourceId))
    -            {
    -                writer.WritePropertyName("sourceResourceId"u8);
    -                writer.WriteStringValue(SourceResourceId);
    -            }
    -            if (Optional.IsDefined(PolicyId))
    -            {
    -                writer.WritePropertyName("policyId"u8);
    -                writer.WriteStringValue(PolicyId);
    -            }
    -            if (Optional.IsDefined(LastRecoverOn))
    -            {
    -                writer.WritePropertyName("lastRecoveryPoint"u8);
    -                writer.WriteStringValue(LastRecoverOn.Value, "O");
    -            }
    -            if (Optional.IsDefined(BackupSetName))
    -            {
    -                writer.WritePropertyName("backupSetName"u8);
    -                writer.WriteStringValue(BackupSetName);
    -            }
    -            if (Optional.IsDefined(CreateMode))
    -            {
    -                writer.WritePropertyName("createMode"u8);
    -                writer.WriteStringValue(CreateMode.Value.ToString());
    -            }
    -            if (Optional.IsDefined(DeferredDeletedOn))
    -            {
    -                writer.WritePropertyName("deferredDeleteTimeInUTC"u8);
    -                writer.WriteStringValue(DeferredDeletedOn.Value, "O");
    -            }
    -            if (Optional.IsDefined(IsScheduledForDeferredDelete))
    -            {
    -                writer.WritePropertyName("isScheduledForDeferredDelete"u8);
    -                writer.WriteBooleanValue(IsScheduledForDeferredDelete.Value);
    -            }
    -            if (Optional.IsDefined(DeferredDeleteTimeRemaining))
    -            {
    -                writer.WritePropertyName("deferredDeleteTimeRemaining"u8);
    -                writer.WriteStringValue(DeferredDeleteTimeRemaining);
    -            }
    -            if (Optional.IsDefined(IsDeferredDeleteScheduleUpcoming))
    -            {
    -                writer.WritePropertyName("isDeferredDeleteScheduleUpcoming"u8);
    -                writer.WriteBooleanValue(IsDeferredDeleteScheduleUpcoming.Value);
    -            }
    -            if (Optional.IsDefined(IsRehydrate))
    -            {
    -                writer.WritePropertyName("isRehydrate"u8);
    -                writer.WriteBooleanValue(IsRehydrate.Value);
    -            }
    -            if (Optional.IsCollectionDefined(ResourceGuardOperationRequests))
    -            {
    -                writer.WritePropertyName("resourceGuardOperationRequests"u8);
    -                writer.WriteStartArray();
    -                foreach (var item in ResourceGuardOperationRequests)
    -                {
    -                    writer.WriteStringValue(item);
    -                }
    -                writer.WriteEndArray();
    -            }
    -            if (Optional.IsDefined(IsArchiveEnabled))
    -            {
    -                writer.WritePropertyName("isArchiveEnabled"u8);
    -                writer.WriteBooleanValue(IsArchiveEnabled.Value);
    -            }
    -            if (Optional.IsDefined(PolicyName))
    -            {
    -                writer.WritePropertyName("policyName"u8);
    -                writer.WriteStringValue(PolicyName);
    -            }
    -            if (Optional.IsDefined(SoftDeleteRetentionPeriodInDays))
    -            {
    -                writer.WritePropertyName("softDeleteRetentionPeriodInDays"u8);
    -                writer.WriteNumberValue(SoftDeleteRetentionPeriodInDays.Value);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(VaultId))
    -            {
    -                writer.WritePropertyName("vaultId"u8);
    -                writer.WriteStringValue(VaultId);
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             VmWorkloadSapAseDatabaseProtectedItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapAseDatabaseWorkloadItem.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapAseDatabaseWorkloadItem.Serialization.cs
    index 2db34f5ec6af..decd49b635c3 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapAseDatabaseWorkloadItem.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapAseDatabaseWorkloadItem.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class VmWorkloadSapAseDatabaseWorkloadItem : IUtf8JsonSerializabl
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,70 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter write
                     throw new FormatException($"The model {nameof(VmWorkloadSapAseDatabaseWorkloadItem)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            if (Optional.IsDefined(ParentName))
    -            {
    -                writer.WritePropertyName("parentName"u8);
    -                writer.WriteStringValue(ParentName);
    -            }
    -            if (Optional.IsDefined(ServerName))
    -            {
    -                writer.WritePropertyName("serverName"u8);
    -                writer.WriteStringValue(ServerName);
    -            }
    -            if (Optional.IsDefined(IsAutoProtectable))
    -            {
    -                writer.WritePropertyName("isAutoProtectable"u8);
    -                writer.WriteBooleanValue(IsAutoProtectable.Value);
    -            }
    -            if (Optional.IsDefined(SubInquiredItemCount))
    -            {
    -                writer.WritePropertyName("subinquireditemcount"u8);
    -                writer.WriteNumberValue(SubInquiredItemCount.Value);
    -            }
    -            if (Optional.IsDefined(SubWorkloadItemCount))
    -            {
    -                writer.WritePropertyName("subWorkloadItemCount"u8);
    -                writer.WriteNumberValue(SubWorkloadItemCount.Value);
    -            }
    -            if (Optional.IsDefined(BackupManagementType))
    -            {
    -                writer.WritePropertyName("backupManagementType"u8);
    -                writer.WriteStringValue(BackupManagementType);
    -            }
    -            if (Optional.IsDefined(WorkloadType))
    -            {
    -                writer.WritePropertyName("workloadType"u8);
    -                writer.WriteStringValue(WorkloadType);
    -            }
    -            writer.WritePropertyName("workloadItemType"u8);
    -            writer.WriteStringValue(WorkloadItemType);
    -            if (Optional.IsDefined(FriendlyName))
    -            {
    -                writer.WritePropertyName("friendlyName"u8);
    -                writer.WriteStringValue(FriendlyName);
    -            }
    -            if (Optional.IsDefined(ProtectionState))
    -            {
    -                writer.WritePropertyName("protectionState"u8);
    -                writer.WriteStringValue(ProtectionState.Value.ToString());
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             VmWorkloadSapAseDatabaseWorkloadItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapAseSystemProtectableItem.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapAseSystemProtectableItem.Serialization.cs
    index d89ae6c70df1..493577edbe83 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapAseSystemProtectableItem.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapAseSystemProtectableItem.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class VmWorkloadSapAseSystemProtectableItem : IUtf8JsonSerializab
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,90 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writ
                     throw new FormatException($"The model {nameof(VmWorkloadSapAseSystemProtectableItem)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            if (Optional.IsDefined(ParentName))
    -            {
    -                writer.WritePropertyName("parentName"u8);
    -                writer.WriteStringValue(ParentName);
    -            }
    -            if (Optional.IsDefined(ParentUniqueName))
    -            {
    -                writer.WritePropertyName("parentUniqueName"u8);
    -                writer.WriteStringValue(ParentUniqueName);
    -            }
    -            if (Optional.IsDefined(ServerName))
    -            {
    -                writer.WritePropertyName("serverName"u8);
    -                writer.WriteStringValue(ServerName);
    -            }
    -            if (Optional.IsDefined(IsAutoProtectable))
    -            {
    -                writer.WritePropertyName("isAutoProtectable"u8);
    -                writer.WriteBooleanValue(IsAutoProtectable.Value);
    -            }
    -            if (Optional.IsDefined(IsAutoProtected))
    -            {
    -                writer.WritePropertyName("isAutoProtected"u8);
    -                writer.WriteBooleanValue(IsAutoProtected.Value);
    -            }
    -            if (Optional.IsDefined(SubInquiredItemCount))
    -            {
    -                writer.WritePropertyName("subinquireditemcount"u8);
    -                writer.WriteNumberValue(SubInquiredItemCount.Value);
    -            }
    -            if (Optional.IsDefined(SubProtectableItemCount))
    -            {
    -                writer.WritePropertyName("subprotectableitemcount"u8);
    -                writer.WriteNumberValue(SubProtectableItemCount.Value);
    -            }
    -            if (Optional.IsDefined(PreBackupValidation))
    -            {
    -                writer.WritePropertyName("prebackupvalidation"u8);
    -                writer.WriteObjectValue(PreBackupValidation, options);
    -            }
    -            if (Optional.IsDefined(IsProtectable))
    -            {
    -                writer.WritePropertyName("isProtectable"u8);
    -                writer.WriteBooleanValue(IsProtectable.Value);
    -            }
    -            if (Optional.IsDefined(BackupManagementType))
    -            {
    -                writer.WritePropertyName("backupManagementType"u8);
    -                writer.WriteStringValue(BackupManagementType);
    -            }
    -            if (Optional.IsDefined(WorkloadType))
    -            {
    -                writer.WritePropertyName("workloadType"u8);
    -                writer.WriteStringValue(WorkloadType);
    -            }
    -            writer.WritePropertyName("protectableItemType"u8);
    -            writer.WriteStringValue(ProtectableItemType);
    -            if (Optional.IsDefined(FriendlyName))
    -            {
    -                writer.WritePropertyName("friendlyName"u8);
    -                writer.WriteStringValue(FriendlyName);
    -            }
    -            if (Optional.IsDefined(ProtectionState))
    -            {
    -                writer.WritePropertyName("protectionState"u8);
    -                writer.WriteStringValue(ProtectionState.Value.ToString());
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             VmWorkloadSapAseSystemProtectableItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapAseSystemWorkloadItem.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapAseSystemWorkloadItem.Serialization.cs
    index 74a2c2e32130..36476ffada70 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapAseSystemWorkloadItem.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapAseSystemWorkloadItem.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class VmWorkloadSapAseSystemWorkloadItem : IUtf8JsonSerializable,
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,70 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer,
                     throw new FormatException($"The model {nameof(VmWorkloadSapAseSystemWorkloadItem)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            if (Optional.IsDefined(ParentName))
    -            {
    -                writer.WritePropertyName("parentName"u8);
    -                writer.WriteStringValue(ParentName);
    -            }
    -            if (Optional.IsDefined(ServerName))
    -            {
    -                writer.WritePropertyName("serverName"u8);
    -                writer.WriteStringValue(ServerName);
    -            }
    -            if (Optional.IsDefined(IsAutoProtectable))
    -            {
    -                writer.WritePropertyName("isAutoProtectable"u8);
    -                writer.WriteBooleanValue(IsAutoProtectable.Value);
    -            }
    -            if (Optional.IsDefined(SubInquiredItemCount))
    -            {
    -                writer.WritePropertyName("subinquireditemcount"u8);
    -                writer.WriteNumberValue(SubInquiredItemCount.Value);
    -            }
    -            if (Optional.IsDefined(SubWorkloadItemCount))
    -            {
    -                writer.WritePropertyName("subWorkloadItemCount"u8);
    -                writer.WriteNumberValue(SubWorkloadItemCount.Value);
    -            }
    -            if (Optional.IsDefined(BackupManagementType))
    -            {
    -                writer.WritePropertyName("backupManagementType"u8);
    -                writer.WriteStringValue(BackupManagementType);
    -            }
    -            if (Optional.IsDefined(WorkloadType))
    -            {
    -                writer.WritePropertyName("workloadType"u8);
    -                writer.WriteStringValue(WorkloadType);
    -            }
    -            writer.WritePropertyName("workloadItemType"u8);
    -            writer.WriteStringValue(WorkloadItemType);
    -            if (Optional.IsDefined(FriendlyName))
    -            {
    -                writer.WritePropertyName("friendlyName"u8);
    -                writer.WriteStringValue(FriendlyName);
    -            }
    -            if (Optional.IsDefined(ProtectionState))
    -            {
    -                writer.WritePropertyName("protectionState"u8);
    -                writer.WriteStringValue(ProtectionState.Value.ToString());
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             VmWorkloadSapAseSystemWorkloadItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapHanaDBInstance.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapHanaDBInstance.Serialization.cs
    index ce57babaecd9..ce454c05b486 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapHanaDBInstance.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapHanaDBInstance.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class VmWorkloadSapHanaDBInstance : IUtf8JsonSerializable, IJsonM
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,90 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR
                     throw new FormatException($"The model {nameof(VmWorkloadSapHanaDBInstance)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            if (Optional.IsDefined(ParentName))
    -            {
    -                writer.WritePropertyName("parentName"u8);
    -                writer.WriteStringValue(ParentName);
    -            }
    -            if (Optional.IsDefined(ParentUniqueName))
    -            {
    -                writer.WritePropertyName("parentUniqueName"u8);
    -                writer.WriteStringValue(ParentUniqueName);
    -            }
    -            if (Optional.IsDefined(ServerName))
    -            {
    -                writer.WritePropertyName("serverName"u8);
    -                writer.WriteStringValue(ServerName);
    -            }
    -            if (Optional.IsDefined(IsAutoProtectable))
    -            {
    -                writer.WritePropertyName("isAutoProtectable"u8);
    -                writer.WriteBooleanValue(IsAutoProtectable.Value);
    -            }
    -            if (Optional.IsDefined(IsAutoProtected))
    -            {
    -                writer.WritePropertyName("isAutoProtected"u8);
    -                writer.WriteBooleanValue(IsAutoProtected.Value);
    -            }
    -            if (Optional.IsDefined(SubInquiredItemCount))
    -            {
    -                writer.WritePropertyName("subinquireditemcount"u8);
    -                writer.WriteNumberValue(SubInquiredItemCount.Value);
    -            }
    -            if (Optional.IsDefined(SubProtectableItemCount))
    -            {
    -                writer.WritePropertyName("subprotectableitemcount"u8);
    -                writer.WriteNumberValue(SubProtectableItemCount.Value);
    -            }
    -            if (Optional.IsDefined(PreBackupValidation))
    -            {
    -                writer.WritePropertyName("prebackupvalidation"u8);
    -                writer.WriteObjectValue(PreBackupValidation, options);
    -            }
    -            if (Optional.IsDefined(IsProtectable))
    -            {
    -                writer.WritePropertyName("isProtectable"u8);
    -                writer.WriteBooleanValue(IsProtectable.Value);
    -            }
    -            if (Optional.IsDefined(BackupManagementType))
    -            {
    -                writer.WritePropertyName("backupManagementType"u8);
    -                writer.WriteStringValue(BackupManagementType);
    -            }
    -            if (Optional.IsDefined(WorkloadType))
    -            {
    -                writer.WritePropertyName("workloadType"u8);
    -                writer.WriteStringValue(WorkloadType);
    -            }
    -            writer.WritePropertyName("protectableItemType"u8);
    -            writer.WriteStringValue(ProtectableItemType);
    -            if (Optional.IsDefined(FriendlyName))
    -            {
    -                writer.WritePropertyName("friendlyName"u8);
    -                writer.WriteStringValue(FriendlyName);
    -            }
    -            if (Optional.IsDefined(ProtectionState))
    -            {
    -                writer.WritePropertyName("protectionState"u8);
    -                writer.WriteStringValue(ProtectionState.Value.ToString());
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             VmWorkloadSapHanaDBInstance IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapHanaDBInstanceProtectedItem.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapHanaDBInstanceProtectedItem.Serialization.cs
    index 33273948c1d2..1d61f1317b81 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapHanaDBInstanceProtectedItem.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapHanaDBInstanceProtectedItem.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class VmWorkloadSapHanaDBInstanceProtectedItem : IUtf8JsonSeriali
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,201 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter w
                     throw new FormatException($"The model {nameof(VmWorkloadSapHanaDBInstanceProtectedItem)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            if (options.Format != "W" && Optional.IsDefined(FriendlyName))
    -            {
    -                writer.WritePropertyName("friendlyName"u8);
    -                writer.WriteStringValue(FriendlyName);
    -            }
    -            if (Optional.IsDefined(ServerName))
    -            {
    -                writer.WritePropertyName("serverName"u8);
    -                writer.WriteStringValue(ServerName);
    -            }
    -            if (Optional.IsDefined(ParentName))
    -            {
    -                writer.WritePropertyName("parentName"u8);
    -                writer.WriteStringValue(ParentName);
    -            }
    -            if (Optional.IsDefined(ParentType))
    -            {
    -                writer.WritePropertyName("parentType"u8);
    -                writer.WriteStringValue(ParentType);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(ProtectionStatus))
    -            {
    -                writer.WritePropertyName("protectionStatus"u8);
    -                writer.WriteStringValue(ProtectionStatus);
    -            }
    -            if (Optional.IsDefined(ProtectionState))
    -            {
    -                writer.WritePropertyName("protectionState"u8);
    -                writer.WriteStringValue(ProtectionState.Value.ToString());
    -            }
    -            if (Optional.IsDefined(LastBackupStatus))
    -            {
    -                writer.WritePropertyName("lastBackupStatus"u8);
    -                writer.WriteStringValue(LastBackupStatus.Value.ToString());
    -            }
    -            if (Optional.IsDefined(LastBackupOn))
    -            {
    -                writer.WritePropertyName("lastBackupTime"u8);
    -                writer.WriteStringValue(LastBackupOn.Value, "O");
    -            }
    -            if (Optional.IsDefined(LastBackupErrorDetail))
    -            {
    -                writer.WritePropertyName("lastBackupErrorDetail"u8);
    -                writer.WriteObjectValue(LastBackupErrorDetail, options);
    -            }
    -            if (Optional.IsDefined(ProtectedItemDataSourceId))
    -            {
    -                writer.WritePropertyName("protectedItemDataSourceId"u8);
    -                writer.WriteStringValue(ProtectedItemDataSourceId);
    -            }
    -            if (Optional.IsDefined(ProtectedItemHealthStatus))
    -            {
    -                writer.WritePropertyName("protectedItemHealthStatus"u8);
    -                writer.WriteStringValue(ProtectedItemHealthStatus.Value.ToString());
    -            }
    -            if (Optional.IsDefined(ExtendedInfo))
    -            {
    -                writer.WritePropertyName("extendedInfo"u8);
    -                writer.WriteObjectValue(ExtendedInfo, options);
    -            }
    -            if (Optional.IsCollectionDefined(KpisHealths))
    -            {
    -                writer.WritePropertyName("kpisHealths"u8);
    -                writer.WriteStartObject();
    -                foreach (var item in KpisHealths)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -                    writer.WriteObjectValue(item.Value, options);
    -                }
    -                writer.WriteEndObject();
    -            }
    -            if (Optional.IsCollectionDefined(NodesList))
    -            {
    -                writer.WritePropertyName("nodesList"u8);
    -                writer.WriteStartArray();
    -                foreach (var item in NodesList)
    -                {
    -                    writer.WriteObjectValue(item, options);
    -                }
    -                writer.WriteEndArray();
    -            }
    -            writer.WritePropertyName("protectedItemType"u8);
    -            writer.WriteStringValue(ProtectedItemType);
    -            if (options.Format != "W" && Optional.IsDefined(BackupManagementType))
    -            {
    -                writer.WritePropertyName("backupManagementType"u8);
    -                writer.WriteStringValue(BackupManagementType.Value.ToString());
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(WorkloadType))
    -            {
    -                writer.WritePropertyName("workloadType"u8);
    -                writer.WriteStringValue(WorkloadType.Value.ToString());
    -            }
    -            if (Optional.IsDefined(ContainerName))
    -            {
    -                writer.WritePropertyName("containerName"u8);
    -                writer.WriteStringValue(ContainerName);
    -            }
    -            if (Optional.IsDefined(SourceResourceId))
    -            {
    -                writer.WritePropertyName("sourceResourceId"u8);
    -                writer.WriteStringValue(SourceResourceId);
    -            }
    -            if (Optional.IsDefined(PolicyId))
    -            {
    -                writer.WritePropertyName("policyId"u8);
    -                writer.WriteStringValue(PolicyId);
    -            }
    -            if (Optional.IsDefined(LastRecoverOn))
    -            {
    -                writer.WritePropertyName("lastRecoveryPoint"u8);
    -                writer.WriteStringValue(LastRecoverOn.Value, "O");
    -            }
    -            if (Optional.IsDefined(BackupSetName))
    -            {
    -                writer.WritePropertyName("backupSetName"u8);
    -                writer.WriteStringValue(BackupSetName);
    -            }
    -            if (Optional.IsDefined(CreateMode))
    -            {
    -                writer.WritePropertyName("createMode"u8);
    -                writer.WriteStringValue(CreateMode.Value.ToString());
    -            }
    -            if (Optional.IsDefined(DeferredDeletedOn))
    -            {
    -                writer.WritePropertyName("deferredDeleteTimeInUTC"u8);
    -                writer.WriteStringValue(DeferredDeletedOn.Value, "O");
    -            }
    -            if (Optional.IsDefined(IsScheduledForDeferredDelete))
    -            {
    -                writer.WritePropertyName("isScheduledForDeferredDelete"u8);
    -                writer.WriteBooleanValue(IsScheduledForDeferredDelete.Value);
    -            }
    -            if (Optional.IsDefined(DeferredDeleteTimeRemaining))
    -            {
    -                writer.WritePropertyName("deferredDeleteTimeRemaining"u8);
    -                writer.WriteStringValue(DeferredDeleteTimeRemaining);
    -            }
    -            if (Optional.IsDefined(IsDeferredDeleteScheduleUpcoming))
    -            {
    -                writer.WritePropertyName("isDeferredDeleteScheduleUpcoming"u8);
    -                writer.WriteBooleanValue(IsDeferredDeleteScheduleUpcoming.Value);
    -            }
    -            if (Optional.IsDefined(IsRehydrate))
    -            {
    -                writer.WritePropertyName("isRehydrate"u8);
    -                writer.WriteBooleanValue(IsRehydrate.Value);
    -            }
    -            if (Optional.IsCollectionDefined(ResourceGuardOperationRequests))
    -            {
    -                writer.WritePropertyName("resourceGuardOperationRequests"u8);
    -                writer.WriteStartArray();
    -                foreach (var item in ResourceGuardOperationRequests)
    -                {
    -                    writer.WriteStringValue(item);
    -                }
    -                writer.WriteEndArray();
    -            }
    -            if (Optional.IsDefined(IsArchiveEnabled))
    -            {
    -                writer.WritePropertyName("isArchiveEnabled"u8);
    -                writer.WriteBooleanValue(IsArchiveEnabled.Value);
    -            }
    -            if (Optional.IsDefined(PolicyName))
    -            {
    -                writer.WritePropertyName("policyName"u8);
    -                writer.WriteStringValue(PolicyName);
    -            }
    -            if (Optional.IsDefined(SoftDeleteRetentionPeriodInDays))
    -            {
    -                writer.WritePropertyName("softDeleteRetentionPeriodInDays"u8);
    -                writer.WriteNumberValue(SoftDeleteRetentionPeriodInDays.Value);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(VaultId))
    -            {
    -                writer.WritePropertyName("vaultId"u8);
    -                writer.WriteStringValue(VaultId);
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             VmWorkloadSapHanaDBInstanceProtectedItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapHanaDatabaseProtectableItem.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapHanaDatabaseProtectableItem.Serialization.cs
    index 1367f76a1e95..0ad334bf86a5 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapHanaDatabaseProtectableItem.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapHanaDatabaseProtectableItem.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class VmWorkloadSapHanaDatabaseProtectableItem : IUtf8JsonSeriali
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,90 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter w
                     throw new FormatException($"The model {nameof(VmWorkloadSapHanaDatabaseProtectableItem)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            if (Optional.IsDefined(ParentName))
    -            {
    -                writer.WritePropertyName("parentName"u8);
    -                writer.WriteStringValue(ParentName);
    -            }
    -            if (Optional.IsDefined(ParentUniqueName))
    -            {
    -                writer.WritePropertyName("parentUniqueName"u8);
    -                writer.WriteStringValue(ParentUniqueName);
    -            }
    -            if (Optional.IsDefined(ServerName))
    -            {
    -                writer.WritePropertyName("serverName"u8);
    -                writer.WriteStringValue(ServerName);
    -            }
    -            if (Optional.IsDefined(IsAutoProtectable))
    -            {
    -                writer.WritePropertyName("isAutoProtectable"u8);
    -                writer.WriteBooleanValue(IsAutoProtectable.Value);
    -            }
    -            if (Optional.IsDefined(IsAutoProtected))
    -            {
    -                writer.WritePropertyName("isAutoProtected"u8);
    -                writer.WriteBooleanValue(IsAutoProtected.Value);
    -            }
    -            if (Optional.IsDefined(SubInquiredItemCount))
    -            {
    -                writer.WritePropertyName("subinquireditemcount"u8);
    -                writer.WriteNumberValue(SubInquiredItemCount.Value);
    -            }
    -            if (Optional.IsDefined(SubProtectableItemCount))
    -            {
    -                writer.WritePropertyName("subprotectableitemcount"u8);
    -                writer.WriteNumberValue(SubProtectableItemCount.Value);
    -            }
    -            if (Optional.IsDefined(PreBackupValidation))
    -            {
    -                writer.WritePropertyName("prebackupvalidation"u8);
    -                writer.WriteObjectValue(PreBackupValidation, options);
    -            }
    -            if (Optional.IsDefined(IsProtectable))
    -            {
    -                writer.WritePropertyName("isProtectable"u8);
    -                writer.WriteBooleanValue(IsProtectable.Value);
    -            }
    -            if (Optional.IsDefined(BackupManagementType))
    -            {
    -                writer.WritePropertyName("backupManagementType"u8);
    -                writer.WriteStringValue(BackupManagementType);
    -            }
    -            if (Optional.IsDefined(WorkloadType))
    -            {
    -                writer.WritePropertyName("workloadType"u8);
    -                writer.WriteStringValue(WorkloadType);
    -            }
    -            writer.WritePropertyName("protectableItemType"u8);
    -            writer.WriteStringValue(ProtectableItemType);
    -            if (Optional.IsDefined(FriendlyName))
    -            {
    -                writer.WritePropertyName("friendlyName"u8);
    -                writer.WriteStringValue(FriendlyName);
    -            }
    -            if (Optional.IsDefined(ProtectionState))
    -            {
    -                writer.WritePropertyName("protectionState"u8);
    -                writer.WriteStringValue(ProtectionState.Value.ToString());
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             VmWorkloadSapHanaDatabaseProtectableItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapHanaDatabaseProtectedItem.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapHanaDatabaseProtectedItem.Serialization.cs
    index c9460caeda66..2b505691b99b 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapHanaDatabaseProtectedItem.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapHanaDatabaseProtectedItem.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class VmWorkloadSapHanaDatabaseProtectedItem : IUtf8JsonSerializa
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,201 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter wri
                     throw new FormatException($"The model {nameof(VmWorkloadSapHanaDatabaseProtectedItem)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            if (options.Format != "W" && Optional.IsDefined(FriendlyName))
    -            {
    -                writer.WritePropertyName("friendlyName"u8);
    -                writer.WriteStringValue(FriendlyName);
    -            }
    -            if (Optional.IsDefined(ServerName))
    -            {
    -                writer.WritePropertyName("serverName"u8);
    -                writer.WriteStringValue(ServerName);
    -            }
    -            if (Optional.IsDefined(ParentName))
    -            {
    -                writer.WritePropertyName("parentName"u8);
    -                writer.WriteStringValue(ParentName);
    -            }
    -            if (Optional.IsDefined(ParentType))
    -            {
    -                writer.WritePropertyName("parentType"u8);
    -                writer.WriteStringValue(ParentType);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(ProtectionStatus))
    -            {
    -                writer.WritePropertyName("protectionStatus"u8);
    -                writer.WriteStringValue(ProtectionStatus);
    -            }
    -            if (Optional.IsDefined(ProtectionState))
    -            {
    -                writer.WritePropertyName("protectionState"u8);
    -                writer.WriteStringValue(ProtectionState.Value.ToString());
    -            }
    -            if (Optional.IsDefined(LastBackupStatus))
    -            {
    -                writer.WritePropertyName("lastBackupStatus"u8);
    -                writer.WriteStringValue(LastBackupStatus.Value.ToString());
    -            }
    -            if (Optional.IsDefined(LastBackupOn))
    -            {
    -                writer.WritePropertyName("lastBackupTime"u8);
    -                writer.WriteStringValue(LastBackupOn.Value, "O");
    -            }
    -            if (Optional.IsDefined(LastBackupErrorDetail))
    -            {
    -                writer.WritePropertyName("lastBackupErrorDetail"u8);
    -                writer.WriteObjectValue(LastBackupErrorDetail, options);
    -            }
    -            if (Optional.IsDefined(ProtectedItemDataSourceId))
    -            {
    -                writer.WritePropertyName("protectedItemDataSourceId"u8);
    -                writer.WriteStringValue(ProtectedItemDataSourceId);
    -            }
    -            if (Optional.IsDefined(ProtectedItemHealthStatus))
    -            {
    -                writer.WritePropertyName("protectedItemHealthStatus"u8);
    -                writer.WriteStringValue(ProtectedItemHealthStatus.Value.ToString());
    -            }
    -            if (Optional.IsDefined(ExtendedInfo))
    -            {
    -                writer.WritePropertyName("extendedInfo"u8);
    -                writer.WriteObjectValue(ExtendedInfo, options);
    -            }
    -            if (Optional.IsCollectionDefined(KpisHealths))
    -            {
    -                writer.WritePropertyName("kpisHealths"u8);
    -                writer.WriteStartObject();
    -                foreach (var item in KpisHealths)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -                    writer.WriteObjectValue(item.Value, options);
    -                }
    -                writer.WriteEndObject();
    -            }
    -            if (Optional.IsCollectionDefined(NodesList))
    -            {
    -                writer.WritePropertyName("nodesList"u8);
    -                writer.WriteStartArray();
    -                foreach (var item in NodesList)
    -                {
    -                    writer.WriteObjectValue(item, options);
    -                }
    -                writer.WriteEndArray();
    -            }
    -            writer.WritePropertyName("protectedItemType"u8);
    -            writer.WriteStringValue(ProtectedItemType);
    -            if (options.Format != "W" && Optional.IsDefined(BackupManagementType))
    -            {
    -                writer.WritePropertyName("backupManagementType"u8);
    -                writer.WriteStringValue(BackupManagementType.Value.ToString());
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(WorkloadType))
    -            {
    -                writer.WritePropertyName("workloadType"u8);
    -                writer.WriteStringValue(WorkloadType.Value.ToString());
    -            }
    -            if (Optional.IsDefined(ContainerName))
    -            {
    -                writer.WritePropertyName("containerName"u8);
    -                writer.WriteStringValue(ContainerName);
    -            }
    -            if (Optional.IsDefined(SourceResourceId))
    -            {
    -                writer.WritePropertyName("sourceResourceId"u8);
    -                writer.WriteStringValue(SourceResourceId);
    -            }
    -            if (Optional.IsDefined(PolicyId))
    -            {
    -                writer.WritePropertyName("policyId"u8);
    -                writer.WriteStringValue(PolicyId);
    -            }
    -            if (Optional.IsDefined(LastRecoverOn))
    -            {
    -                writer.WritePropertyName("lastRecoveryPoint"u8);
    -                writer.WriteStringValue(LastRecoverOn.Value, "O");
    -            }
    -            if (Optional.IsDefined(BackupSetName))
    -            {
    -                writer.WritePropertyName("backupSetName"u8);
    -                writer.WriteStringValue(BackupSetName);
    -            }
    -            if (Optional.IsDefined(CreateMode))
    -            {
    -                writer.WritePropertyName("createMode"u8);
    -                writer.WriteStringValue(CreateMode.Value.ToString());
    -            }
    -            if (Optional.IsDefined(DeferredDeletedOn))
    -            {
    -                writer.WritePropertyName("deferredDeleteTimeInUTC"u8);
    -                writer.WriteStringValue(DeferredDeletedOn.Value, "O");
    -            }
    -            if (Optional.IsDefined(IsScheduledForDeferredDelete))
    -            {
    -                writer.WritePropertyName("isScheduledForDeferredDelete"u8);
    -                writer.WriteBooleanValue(IsScheduledForDeferredDelete.Value);
    -            }
    -            if (Optional.IsDefined(DeferredDeleteTimeRemaining))
    -            {
    -                writer.WritePropertyName("deferredDeleteTimeRemaining"u8);
    -                writer.WriteStringValue(DeferredDeleteTimeRemaining);
    -            }
    -            if (Optional.IsDefined(IsDeferredDeleteScheduleUpcoming))
    -            {
    -                writer.WritePropertyName("isDeferredDeleteScheduleUpcoming"u8);
    -                writer.WriteBooleanValue(IsDeferredDeleteScheduleUpcoming.Value);
    -            }
    -            if (Optional.IsDefined(IsRehydrate))
    -            {
    -                writer.WritePropertyName("isRehydrate"u8);
    -                writer.WriteBooleanValue(IsRehydrate.Value);
    -            }
    -            if (Optional.IsCollectionDefined(ResourceGuardOperationRequests))
    -            {
    -                writer.WritePropertyName("resourceGuardOperationRequests"u8);
    -                writer.WriteStartArray();
    -                foreach (var item in ResourceGuardOperationRequests)
    -                {
    -                    writer.WriteStringValue(item);
    -                }
    -                writer.WriteEndArray();
    -            }
    -            if (Optional.IsDefined(IsArchiveEnabled))
    -            {
    -                writer.WritePropertyName("isArchiveEnabled"u8);
    -                writer.WriteBooleanValue(IsArchiveEnabled.Value);
    -            }
    -            if (Optional.IsDefined(PolicyName))
    -            {
    -                writer.WritePropertyName("policyName"u8);
    -                writer.WriteStringValue(PolicyName);
    -            }
    -            if (Optional.IsDefined(SoftDeleteRetentionPeriodInDays))
    -            {
    -                writer.WritePropertyName("softDeleteRetentionPeriodInDays"u8);
    -                writer.WriteNumberValue(SoftDeleteRetentionPeriodInDays.Value);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(VaultId))
    -            {
    -                writer.WritePropertyName("vaultId"u8);
    -                writer.WriteStringValue(VaultId);
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             VmWorkloadSapHanaDatabaseProtectedItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapHanaDatabaseWorkloadItem.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapHanaDatabaseWorkloadItem.Serialization.cs
    index e436d62112ff..4c03d608bdaf 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapHanaDatabaseWorkloadItem.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapHanaDatabaseWorkloadItem.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class VmWorkloadSapHanaDatabaseWorkloadItem : IUtf8JsonSerializab
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,70 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writ
                     throw new FormatException($"The model {nameof(VmWorkloadSapHanaDatabaseWorkloadItem)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            if (Optional.IsDefined(ParentName))
    -            {
    -                writer.WritePropertyName("parentName"u8);
    -                writer.WriteStringValue(ParentName);
    -            }
    -            if (Optional.IsDefined(ServerName))
    -            {
    -                writer.WritePropertyName("serverName"u8);
    -                writer.WriteStringValue(ServerName);
    -            }
    -            if (Optional.IsDefined(IsAutoProtectable))
    -            {
    -                writer.WritePropertyName("isAutoProtectable"u8);
    -                writer.WriteBooleanValue(IsAutoProtectable.Value);
    -            }
    -            if (Optional.IsDefined(SubInquiredItemCount))
    -            {
    -                writer.WritePropertyName("subinquireditemcount"u8);
    -                writer.WriteNumberValue(SubInquiredItemCount.Value);
    -            }
    -            if (Optional.IsDefined(SubWorkloadItemCount))
    -            {
    -                writer.WritePropertyName("subWorkloadItemCount"u8);
    -                writer.WriteNumberValue(SubWorkloadItemCount.Value);
    -            }
    -            if (Optional.IsDefined(BackupManagementType))
    -            {
    -                writer.WritePropertyName("backupManagementType"u8);
    -                writer.WriteStringValue(BackupManagementType);
    -            }
    -            if (Optional.IsDefined(WorkloadType))
    -            {
    -                writer.WritePropertyName("workloadType"u8);
    -                writer.WriteStringValue(WorkloadType);
    -            }
    -            writer.WritePropertyName("workloadItemType"u8);
    -            writer.WriteStringValue(WorkloadItemType);
    -            if (Optional.IsDefined(FriendlyName))
    -            {
    -                writer.WritePropertyName("friendlyName"u8);
    -                writer.WriteStringValue(FriendlyName);
    -            }
    -            if (Optional.IsDefined(ProtectionState))
    -            {
    -                writer.WritePropertyName("protectionState"u8);
    -                writer.WriteStringValue(ProtectionState.Value.ToString());
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             VmWorkloadSapHanaDatabaseWorkloadItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapHanaHsrProtectableItem.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapHanaHsrProtectableItem.Serialization.cs
    index 0e5f284c47b7..850a7cfbc275 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapHanaHsrProtectableItem.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapHanaHsrProtectableItem.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class VmWorkloadSapHanaHsrProtectableItem : IUtf8JsonSerializable
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,90 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer
                     throw new FormatException($"The model {nameof(VmWorkloadSapHanaHsrProtectableItem)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            if (Optional.IsDefined(ParentName))
    -            {
    -                writer.WritePropertyName("parentName"u8);
    -                writer.WriteStringValue(ParentName);
    -            }
    -            if (Optional.IsDefined(ParentUniqueName))
    -            {
    -                writer.WritePropertyName("parentUniqueName"u8);
    -                writer.WriteStringValue(ParentUniqueName);
    -            }
    -            if (Optional.IsDefined(ServerName))
    -            {
    -                writer.WritePropertyName("serverName"u8);
    -                writer.WriteStringValue(ServerName);
    -            }
    -            if (Optional.IsDefined(IsAutoProtectable))
    -            {
    -                writer.WritePropertyName("isAutoProtectable"u8);
    -                writer.WriteBooleanValue(IsAutoProtectable.Value);
    -            }
    -            if (Optional.IsDefined(IsAutoProtected))
    -            {
    -                writer.WritePropertyName("isAutoProtected"u8);
    -                writer.WriteBooleanValue(IsAutoProtected.Value);
    -            }
    -            if (Optional.IsDefined(SubInquiredItemCount))
    -            {
    -                writer.WritePropertyName("subinquireditemcount"u8);
    -                writer.WriteNumberValue(SubInquiredItemCount.Value);
    -            }
    -            if (Optional.IsDefined(SubProtectableItemCount))
    -            {
    -                writer.WritePropertyName("subprotectableitemcount"u8);
    -                writer.WriteNumberValue(SubProtectableItemCount.Value);
    -            }
    -            if (Optional.IsDefined(PreBackupValidation))
    -            {
    -                writer.WritePropertyName("prebackupvalidation"u8);
    -                writer.WriteObjectValue(PreBackupValidation, options);
    -            }
    -            if (Optional.IsDefined(IsProtectable))
    -            {
    -                writer.WritePropertyName("isProtectable"u8);
    -                writer.WriteBooleanValue(IsProtectable.Value);
    -            }
    -            if (Optional.IsDefined(BackupManagementType))
    -            {
    -                writer.WritePropertyName("backupManagementType"u8);
    -                writer.WriteStringValue(BackupManagementType);
    -            }
    -            if (Optional.IsDefined(WorkloadType))
    -            {
    -                writer.WritePropertyName("workloadType"u8);
    -                writer.WriteStringValue(WorkloadType);
    -            }
    -            writer.WritePropertyName("protectableItemType"u8);
    -            writer.WriteStringValue(ProtectableItemType);
    -            if (Optional.IsDefined(FriendlyName))
    -            {
    -                writer.WritePropertyName("friendlyName"u8);
    -                writer.WriteStringValue(FriendlyName);
    -            }
    -            if (Optional.IsDefined(ProtectionState))
    -            {
    -                writer.WritePropertyName("protectionState"u8);
    -                writer.WriteStringValue(ProtectionState.Value.ToString());
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             VmWorkloadSapHanaHsrProtectableItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapHanaSystemProtectableItem.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapHanaSystemProtectableItem.Serialization.cs
    index 94545da44b70..2ae616238dd8 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapHanaSystemProtectableItem.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapHanaSystemProtectableItem.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class VmWorkloadSapHanaSystemProtectableItem : IUtf8JsonSerializa
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,90 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter wri
                     throw new FormatException($"The model {nameof(VmWorkloadSapHanaSystemProtectableItem)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            if (Optional.IsDefined(ParentName))
    -            {
    -                writer.WritePropertyName("parentName"u8);
    -                writer.WriteStringValue(ParentName);
    -            }
    -            if (Optional.IsDefined(ParentUniqueName))
    -            {
    -                writer.WritePropertyName("parentUniqueName"u8);
    -                writer.WriteStringValue(ParentUniqueName);
    -            }
    -            if (Optional.IsDefined(ServerName))
    -            {
    -                writer.WritePropertyName("serverName"u8);
    -                writer.WriteStringValue(ServerName);
    -            }
    -            if (Optional.IsDefined(IsAutoProtectable))
    -            {
    -                writer.WritePropertyName("isAutoProtectable"u8);
    -                writer.WriteBooleanValue(IsAutoProtectable.Value);
    -            }
    -            if (Optional.IsDefined(IsAutoProtected))
    -            {
    -                writer.WritePropertyName("isAutoProtected"u8);
    -                writer.WriteBooleanValue(IsAutoProtected.Value);
    -            }
    -            if (Optional.IsDefined(SubInquiredItemCount))
    -            {
    -                writer.WritePropertyName("subinquireditemcount"u8);
    -                writer.WriteNumberValue(SubInquiredItemCount.Value);
    -            }
    -            if (Optional.IsDefined(SubProtectableItemCount))
    -            {
    -                writer.WritePropertyName("subprotectableitemcount"u8);
    -                writer.WriteNumberValue(SubProtectableItemCount.Value);
    -            }
    -            if (Optional.IsDefined(PreBackupValidation))
    -            {
    -                writer.WritePropertyName("prebackupvalidation"u8);
    -                writer.WriteObjectValue(PreBackupValidation, options);
    -            }
    -            if (Optional.IsDefined(IsProtectable))
    -            {
    -                writer.WritePropertyName("isProtectable"u8);
    -                writer.WriteBooleanValue(IsProtectable.Value);
    -            }
    -            if (Optional.IsDefined(BackupManagementType))
    -            {
    -                writer.WritePropertyName("backupManagementType"u8);
    -                writer.WriteStringValue(BackupManagementType);
    -            }
    -            if (Optional.IsDefined(WorkloadType))
    -            {
    -                writer.WritePropertyName("workloadType"u8);
    -                writer.WriteStringValue(WorkloadType);
    -            }
    -            writer.WritePropertyName("protectableItemType"u8);
    -            writer.WriteStringValue(ProtectableItemType);
    -            if (Optional.IsDefined(FriendlyName))
    -            {
    -                writer.WritePropertyName("friendlyName"u8);
    -                writer.WriteStringValue(FriendlyName);
    -            }
    -            if (Optional.IsDefined(ProtectionState))
    -            {
    -                writer.WritePropertyName("protectionState"u8);
    -                writer.WriteStringValue(ProtectionState.Value.ToString());
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             VmWorkloadSapHanaSystemProtectableItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapHanaSystemWorkloadItem.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapHanaSystemWorkloadItem.Serialization.cs
    index 3e34e1514305..b9152fab05a7 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapHanaSystemWorkloadItem.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapHanaSystemWorkloadItem.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class VmWorkloadSapHanaSystemWorkloadItem : IUtf8JsonSerializable
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,70 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer
                     throw new FormatException($"The model {nameof(VmWorkloadSapHanaSystemWorkloadItem)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            if (Optional.IsDefined(ParentName))
    -            {
    -                writer.WritePropertyName("parentName"u8);
    -                writer.WriteStringValue(ParentName);
    -            }
    -            if (Optional.IsDefined(ServerName))
    -            {
    -                writer.WritePropertyName("serverName"u8);
    -                writer.WriteStringValue(ServerName);
    -            }
    -            if (Optional.IsDefined(IsAutoProtectable))
    -            {
    -                writer.WritePropertyName("isAutoProtectable"u8);
    -                writer.WriteBooleanValue(IsAutoProtectable.Value);
    -            }
    -            if (Optional.IsDefined(SubInquiredItemCount))
    -            {
    -                writer.WritePropertyName("subinquireditemcount"u8);
    -                writer.WriteNumberValue(SubInquiredItemCount.Value);
    -            }
    -            if (Optional.IsDefined(SubWorkloadItemCount))
    -            {
    -                writer.WritePropertyName("subWorkloadItemCount"u8);
    -                writer.WriteNumberValue(SubWorkloadItemCount.Value);
    -            }
    -            if (Optional.IsDefined(BackupManagementType))
    -            {
    -                writer.WritePropertyName("backupManagementType"u8);
    -                writer.WriteStringValue(BackupManagementType);
    -            }
    -            if (Optional.IsDefined(WorkloadType))
    -            {
    -                writer.WritePropertyName("workloadType"u8);
    -                writer.WriteStringValue(WorkloadType);
    -            }
    -            writer.WritePropertyName("workloadItemType"u8);
    -            writer.WriteStringValue(WorkloadItemType);
    -            if (Optional.IsDefined(FriendlyName))
    -            {
    -                writer.WritePropertyName("friendlyName"u8);
    -                writer.WriteStringValue(FriendlyName);
    -            }
    -            if (Optional.IsDefined(ProtectionState))
    -            {
    -                writer.WritePropertyName("protectionState"u8);
    -                writer.WriteStringValue(ProtectionState.Value.ToString());
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             VmWorkloadSapHanaSystemWorkloadItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSqlAvailabilityGroupProtectableItem.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSqlAvailabilityGroupProtectableItem.Serialization.cs
    index bee5cb2a9e9f..a6e051d7c576 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSqlAvailabilityGroupProtectableItem.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSqlAvailabilityGroupProtectableItem.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class VmWorkloadSqlAvailabilityGroupProtectableItem : IUtf8JsonSe
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWri
                     throw new FormatException($"The model {nameof(VmWorkloadSqlAvailabilityGroupProtectableItem)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsCollectionDefined(NodesList))
                 {
                     writer.WritePropertyName("nodesList"u8);
    @@ -36,89 +45,6 @@ void IJsonModel.Write(Utf8JsonWri
                     }
                     writer.WriteEndArray();
                 }
    -            if (Optional.IsDefined(ParentName))
    -            {
    -                writer.WritePropertyName("parentName"u8);
    -                writer.WriteStringValue(ParentName);
    -            }
    -            if (Optional.IsDefined(ParentUniqueName))
    -            {
    -                writer.WritePropertyName("parentUniqueName"u8);
    -                writer.WriteStringValue(ParentUniqueName);
    -            }
    -            if (Optional.IsDefined(ServerName))
    -            {
    -                writer.WritePropertyName("serverName"u8);
    -                writer.WriteStringValue(ServerName);
    -            }
    -            if (Optional.IsDefined(IsAutoProtectable))
    -            {
    -                writer.WritePropertyName("isAutoProtectable"u8);
    -                writer.WriteBooleanValue(IsAutoProtectable.Value);
    -            }
    -            if (Optional.IsDefined(IsAutoProtected))
    -            {
    -                writer.WritePropertyName("isAutoProtected"u8);
    -                writer.WriteBooleanValue(IsAutoProtected.Value);
    -            }
    -            if (Optional.IsDefined(SubInquiredItemCount))
    -            {
    -                writer.WritePropertyName("subinquireditemcount"u8);
    -                writer.WriteNumberValue(SubInquiredItemCount.Value);
    -            }
    -            if (Optional.IsDefined(SubProtectableItemCount))
    -            {
    -                writer.WritePropertyName("subprotectableitemcount"u8);
    -                writer.WriteNumberValue(SubProtectableItemCount.Value);
    -            }
    -            if (Optional.IsDefined(PreBackupValidation))
    -            {
    -                writer.WritePropertyName("prebackupvalidation"u8);
    -                writer.WriteObjectValue(PreBackupValidation, options);
    -            }
    -            if (Optional.IsDefined(IsProtectable))
    -            {
    -                writer.WritePropertyName("isProtectable"u8);
    -                writer.WriteBooleanValue(IsProtectable.Value);
    -            }
    -            if (Optional.IsDefined(BackupManagementType))
    -            {
    -                writer.WritePropertyName("backupManagementType"u8);
    -                writer.WriteStringValue(BackupManagementType);
    -            }
    -            if (Optional.IsDefined(WorkloadType))
    -            {
    -                writer.WritePropertyName("workloadType"u8);
    -                writer.WriteStringValue(WorkloadType);
    -            }
    -            writer.WritePropertyName("protectableItemType"u8);
    -            writer.WriteStringValue(ProtectableItemType);
    -            if (Optional.IsDefined(FriendlyName))
    -            {
    -                writer.WritePropertyName("friendlyName"u8);
    -                writer.WriteStringValue(FriendlyName);
    -            }
    -            if (Optional.IsDefined(ProtectionState))
    -            {
    -                writer.WritePropertyName("protectionState"u8);
    -                writer.WriteStringValue(ProtectionState.Value.ToString());
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             VmWorkloadSqlAvailabilityGroupProtectableItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSqlDatabaseProtectableItem.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSqlDatabaseProtectableItem.Serialization.cs
    index d86474c81fa7..d95ae1e439b3 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSqlDatabaseProtectableItem.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSqlDatabaseProtectableItem.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class VmWorkloadSqlDatabaseProtectableItem : IUtf8JsonSerializabl
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,90 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter write
                     throw new FormatException($"The model {nameof(VmWorkloadSqlDatabaseProtectableItem)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            if (Optional.IsDefined(ParentName))
    -            {
    -                writer.WritePropertyName("parentName"u8);
    -                writer.WriteStringValue(ParentName);
    -            }
    -            if (Optional.IsDefined(ParentUniqueName))
    -            {
    -                writer.WritePropertyName("parentUniqueName"u8);
    -                writer.WriteStringValue(ParentUniqueName);
    -            }
    -            if (Optional.IsDefined(ServerName))
    -            {
    -                writer.WritePropertyName("serverName"u8);
    -                writer.WriteStringValue(ServerName);
    -            }
    -            if (Optional.IsDefined(IsAutoProtectable))
    -            {
    -                writer.WritePropertyName("isAutoProtectable"u8);
    -                writer.WriteBooleanValue(IsAutoProtectable.Value);
    -            }
    -            if (Optional.IsDefined(IsAutoProtected))
    -            {
    -                writer.WritePropertyName("isAutoProtected"u8);
    -                writer.WriteBooleanValue(IsAutoProtected.Value);
    -            }
    -            if (Optional.IsDefined(SubInquiredItemCount))
    -            {
    -                writer.WritePropertyName("subinquireditemcount"u8);
    -                writer.WriteNumberValue(SubInquiredItemCount.Value);
    -            }
    -            if (Optional.IsDefined(SubProtectableItemCount))
    -            {
    -                writer.WritePropertyName("subprotectableitemcount"u8);
    -                writer.WriteNumberValue(SubProtectableItemCount.Value);
    -            }
    -            if (Optional.IsDefined(PreBackupValidation))
    -            {
    -                writer.WritePropertyName("prebackupvalidation"u8);
    -                writer.WriteObjectValue(PreBackupValidation, options);
    -            }
    -            if (Optional.IsDefined(IsProtectable))
    -            {
    -                writer.WritePropertyName("isProtectable"u8);
    -                writer.WriteBooleanValue(IsProtectable.Value);
    -            }
    -            if (Optional.IsDefined(BackupManagementType))
    -            {
    -                writer.WritePropertyName("backupManagementType"u8);
    -                writer.WriteStringValue(BackupManagementType);
    -            }
    -            if (Optional.IsDefined(WorkloadType))
    -            {
    -                writer.WritePropertyName("workloadType"u8);
    -                writer.WriteStringValue(WorkloadType);
    -            }
    -            writer.WritePropertyName("protectableItemType"u8);
    -            writer.WriteStringValue(ProtectableItemType);
    -            if (Optional.IsDefined(FriendlyName))
    -            {
    -                writer.WritePropertyName("friendlyName"u8);
    -                writer.WriteStringValue(FriendlyName);
    -            }
    -            if (Optional.IsDefined(ProtectionState))
    -            {
    -                writer.WritePropertyName("protectionState"u8);
    -                writer.WriteStringValue(ProtectionState.Value.ToString());
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             VmWorkloadSqlDatabaseProtectableItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSqlDatabaseProtectedItem.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSqlDatabaseProtectedItem.Serialization.cs
    index ba8ca0c3c2f4..65f3725f6acb 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSqlDatabaseProtectedItem.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSqlDatabaseProtectedItem.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class VmWorkloadSqlDatabaseProtectedItem : IUtf8JsonSerializable,
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,201 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer,
                     throw new FormatException($"The model {nameof(VmWorkloadSqlDatabaseProtectedItem)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            if (options.Format != "W" && Optional.IsDefined(FriendlyName))
    -            {
    -                writer.WritePropertyName("friendlyName"u8);
    -                writer.WriteStringValue(FriendlyName);
    -            }
    -            if (Optional.IsDefined(ServerName))
    -            {
    -                writer.WritePropertyName("serverName"u8);
    -                writer.WriteStringValue(ServerName);
    -            }
    -            if (Optional.IsDefined(ParentName))
    -            {
    -                writer.WritePropertyName("parentName"u8);
    -                writer.WriteStringValue(ParentName);
    -            }
    -            if (Optional.IsDefined(ParentType))
    -            {
    -                writer.WritePropertyName("parentType"u8);
    -                writer.WriteStringValue(ParentType);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(ProtectionStatus))
    -            {
    -                writer.WritePropertyName("protectionStatus"u8);
    -                writer.WriteStringValue(ProtectionStatus);
    -            }
    -            if (Optional.IsDefined(ProtectionState))
    -            {
    -                writer.WritePropertyName("protectionState"u8);
    -                writer.WriteStringValue(ProtectionState.Value.ToString());
    -            }
    -            if (Optional.IsDefined(LastBackupStatus))
    -            {
    -                writer.WritePropertyName("lastBackupStatus"u8);
    -                writer.WriteStringValue(LastBackupStatus.Value.ToString());
    -            }
    -            if (Optional.IsDefined(LastBackupOn))
    -            {
    -                writer.WritePropertyName("lastBackupTime"u8);
    -                writer.WriteStringValue(LastBackupOn.Value, "O");
    -            }
    -            if (Optional.IsDefined(LastBackupErrorDetail))
    -            {
    -                writer.WritePropertyName("lastBackupErrorDetail"u8);
    -                writer.WriteObjectValue(LastBackupErrorDetail, options);
    -            }
    -            if (Optional.IsDefined(ProtectedItemDataSourceId))
    -            {
    -                writer.WritePropertyName("protectedItemDataSourceId"u8);
    -                writer.WriteStringValue(ProtectedItemDataSourceId);
    -            }
    -            if (Optional.IsDefined(ProtectedItemHealthStatus))
    -            {
    -                writer.WritePropertyName("protectedItemHealthStatus"u8);
    -                writer.WriteStringValue(ProtectedItemHealthStatus.Value.ToString());
    -            }
    -            if (Optional.IsDefined(ExtendedInfo))
    -            {
    -                writer.WritePropertyName("extendedInfo"u8);
    -                writer.WriteObjectValue(ExtendedInfo, options);
    -            }
    -            if (Optional.IsCollectionDefined(KpisHealths))
    -            {
    -                writer.WritePropertyName("kpisHealths"u8);
    -                writer.WriteStartObject();
    -                foreach (var item in KpisHealths)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -                    writer.WriteObjectValue(item.Value, options);
    -                }
    -                writer.WriteEndObject();
    -            }
    -            if (Optional.IsCollectionDefined(NodesList))
    -            {
    -                writer.WritePropertyName("nodesList"u8);
    -                writer.WriteStartArray();
    -                foreach (var item in NodesList)
    -                {
    -                    writer.WriteObjectValue(item, options);
    -                }
    -                writer.WriteEndArray();
    -            }
    -            writer.WritePropertyName("protectedItemType"u8);
    -            writer.WriteStringValue(ProtectedItemType);
    -            if (options.Format != "W" && Optional.IsDefined(BackupManagementType))
    -            {
    -                writer.WritePropertyName("backupManagementType"u8);
    -                writer.WriteStringValue(BackupManagementType.Value.ToString());
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(WorkloadType))
    -            {
    -                writer.WritePropertyName("workloadType"u8);
    -                writer.WriteStringValue(WorkloadType.Value.ToString());
    -            }
    -            if (Optional.IsDefined(ContainerName))
    -            {
    -                writer.WritePropertyName("containerName"u8);
    -                writer.WriteStringValue(ContainerName);
    -            }
    -            if (Optional.IsDefined(SourceResourceId))
    -            {
    -                writer.WritePropertyName("sourceResourceId"u8);
    -                writer.WriteStringValue(SourceResourceId);
    -            }
    -            if (Optional.IsDefined(PolicyId))
    -            {
    -                writer.WritePropertyName("policyId"u8);
    -                writer.WriteStringValue(PolicyId);
    -            }
    -            if (Optional.IsDefined(LastRecoverOn))
    -            {
    -                writer.WritePropertyName("lastRecoveryPoint"u8);
    -                writer.WriteStringValue(LastRecoverOn.Value, "O");
    -            }
    -            if (Optional.IsDefined(BackupSetName))
    -            {
    -                writer.WritePropertyName("backupSetName"u8);
    -                writer.WriteStringValue(BackupSetName);
    -            }
    -            if (Optional.IsDefined(CreateMode))
    -            {
    -                writer.WritePropertyName("createMode"u8);
    -                writer.WriteStringValue(CreateMode.Value.ToString());
    -            }
    -            if (Optional.IsDefined(DeferredDeletedOn))
    -            {
    -                writer.WritePropertyName("deferredDeleteTimeInUTC"u8);
    -                writer.WriteStringValue(DeferredDeletedOn.Value, "O");
    -            }
    -            if (Optional.IsDefined(IsScheduledForDeferredDelete))
    -            {
    -                writer.WritePropertyName("isScheduledForDeferredDelete"u8);
    -                writer.WriteBooleanValue(IsScheduledForDeferredDelete.Value);
    -            }
    -            if (Optional.IsDefined(DeferredDeleteTimeRemaining))
    -            {
    -                writer.WritePropertyName("deferredDeleteTimeRemaining"u8);
    -                writer.WriteStringValue(DeferredDeleteTimeRemaining);
    -            }
    -            if (Optional.IsDefined(IsDeferredDeleteScheduleUpcoming))
    -            {
    -                writer.WritePropertyName("isDeferredDeleteScheduleUpcoming"u8);
    -                writer.WriteBooleanValue(IsDeferredDeleteScheduleUpcoming.Value);
    -            }
    -            if (Optional.IsDefined(IsRehydrate))
    -            {
    -                writer.WritePropertyName("isRehydrate"u8);
    -                writer.WriteBooleanValue(IsRehydrate.Value);
    -            }
    -            if (Optional.IsCollectionDefined(ResourceGuardOperationRequests))
    -            {
    -                writer.WritePropertyName("resourceGuardOperationRequests"u8);
    -                writer.WriteStartArray();
    -                foreach (var item in ResourceGuardOperationRequests)
    -                {
    -                    writer.WriteStringValue(item);
    -                }
    -                writer.WriteEndArray();
    -            }
    -            if (Optional.IsDefined(IsArchiveEnabled))
    -            {
    -                writer.WritePropertyName("isArchiveEnabled"u8);
    -                writer.WriteBooleanValue(IsArchiveEnabled.Value);
    -            }
    -            if (Optional.IsDefined(PolicyName))
    -            {
    -                writer.WritePropertyName("policyName"u8);
    -                writer.WriteStringValue(PolicyName);
    -            }
    -            if (Optional.IsDefined(SoftDeleteRetentionPeriodInDays))
    -            {
    -                writer.WritePropertyName("softDeleteRetentionPeriodInDays"u8);
    -                writer.WriteNumberValue(SoftDeleteRetentionPeriodInDays.Value);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(VaultId))
    -            {
    -                writer.WritePropertyName("vaultId"u8);
    -                writer.WriteStringValue(VaultId);
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             VmWorkloadSqlDatabaseProtectedItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSqlDatabaseWorkloadItem.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSqlDatabaseWorkloadItem.Serialization.cs
    index 7aa276c566e0..b6a4ff2fa3f5 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSqlDatabaseWorkloadItem.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSqlDatabaseWorkloadItem.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class VmWorkloadSqlDatabaseWorkloadItem : IUtf8JsonSerializable,
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,70 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer,
                     throw new FormatException($"The model {nameof(VmWorkloadSqlDatabaseWorkloadItem)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            if (Optional.IsDefined(ParentName))
    -            {
    -                writer.WritePropertyName("parentName"u8);
    -                writer.WriteStringValue(ParentName);
    -            }
    -            if (Optional.IsDefined(ServerName))
    -            {
    -                writer.WritePropertyName("serverName"u8);
    -                writer.WriteStringValue(ServerName);
    -            }
    -            if (Optional.IsDefined(IsAutoProtectable))
    -            {
    -                writer.WritePropertyName("isAutoProtectable"u8);
    -                writer.WriteBooleanValue(IsAutoProtectable.Value);
    -            }
    -            if (Optional.IsDefined(SubInquiredItemCount))
    -            {
    -                writer.WritePropertyName("subinquireditemcount"u8);
    -                writer.WriteNumberValue(SubInquiredItemCount.Value);
    -            }
    -            if (Optional.IsDefined(SubWorkloadItemCount))
    -            {
    -                writer.WritePropertyName("subWorkloadItemCount"u8);
    -                writer.WriteNumberValue(SubWorkloadItemCount.Value);
    -            }
    -            if (Optional.IsDefined(BackupManagementType))
    -            {
    -                writer.WritePropertyName("backupManagementType"u8);
    -                writer.WriteStringValue(BackupManagementType);
    -            }
    -            if (Optional.IsDefined(WorkloadType))
    -            {
    -                writer.WritePropertyName("workloadType"u8);
    -                writer.WriteStringValue(WorkloadType);
    -            }
    -            writer.WritePropertyName("workloadItemType"u8);
    -            writer.WriteStringValue(WorkloadItemType);
    -            if (Optional.IsDefined(FriendlyName))
    -            {
    -                writer.WritePropertyName("friendlyName"u8);
    -                writer.WriteStringValue(FriendlyName);
    -            }
    -            if (Optional.IsDefined(ProtectionState))
    -            {
    -                writer.WritePropertyName("protectionState"u8);
    -                writer.WriteStringValue(ProtectionState.Value.ToString());
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             VmWorkloadSqlDatabaseWorkloadItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSqlInstanceProtectableItem.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSqlInstanceProtectableItem.Serialization.cs
    index 87cacf510848..731689a90c6a 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSqlInstanceProtectableItem.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSqlInstanceProtectableItem.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class VmWorkloadSqlInstanceProtectableItem : IUtf8JsonSerializabl
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,90 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter write
                     throw new FormatException($"The model {nameof(VmWorkloadSqlInstanceProtectableItem)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            if (Optional.IsDefined(ParentName))
    -            {
    -                writer.WritePropertyName("parentName"u8);
    -                writer.WriteStringValue(ParentName);
    -            }
    -            if (Optional.IsDefined(ParentUniqueName))
    -            {
    -                writer.WritePropertyName("parentUniqueName"u8);
    -                writer.WriteStringValue(ParentUniqueName);
    -            }
    -            if (Optional.IsDefined(ServerName))
    -            {
    -                writer.WritePropertyName("serverName"u8);
    -                writer.WriteStringValue(ServerName);
    -            }
    -            if (Optional.IsDefined(IsAutoProtectable))
    -            {
    -                writer.WritePropertyName("isAutoProtectable"u8);
    -                writer.WriteBooleanValue(IsAutoProtectable.Value);
    -            }
    -            if (Optional.IsDefined(IsAutoProtected))
    -            {
    -                writer.WritePropertyName("isAutoProtected"u8);
    -                writer.WriteBooleanValue(IsAutoProtected.Value);
    -            }
    -            if (Optional.IsDefined(SubInquiredItemCount))
    -            {
    -                writer.WritePropertyName("subinquireditemcount"u8);
    -                writer.WriteNumberValue(SubInquiredItemCount.Value);
    -            }
    -            if (Optional.IsDefined(SubProtectableItemCount))
    -            {
    -                writer.WritePropertyName("subprotectableitemcount"u8);
    -                writer.WriteNumberValue(SubProtectableItemCount.Value);
    -            }
    -            if (Optional.IsDefined(PreBackupValidation))
    -            {
    -                writer.WritePropertyName("prebackupvalidation"u8);
    -                writer.WriteObjectValue(PreBackupValidation, options);
    -            }
    -            if (Optional.IsDefined(IsProtectable))
    -            {
    -                writer.WritePropertyName("isProtectable"u8);
    -                writer.WriteBooleanValue(IsProtectable.Value);
    -            }
    -            if (Optional.IsDefined(BackupManagementType))
    -            {
    -                writer.WritePropertyName("backupManagementType"u8);
    -                writer.WriteStringValue(BackupManagementType);
    -            }
    -            if (Optional.IsDefined(WorkloadType))
    -            {
    -                writer.WritePropertyName("workloadType"u8);
    -                writer.WriteStringValue(WorkloadType);
    -            }
    -            writer.WritePropertyName("protectableItemType"u8);
    -            writer.WriteStringValue(ProtectableItemType);
    -            if (Optional.IsDefined(FriendlyName))
    -            {
    -                writer.WritePropertyName("friendlyName"u8);
    -                writer.WriteStringValue(FriendlyName);
    -            }
    -            if (Optional.IsDefined(ProtectionState))
    -            {
    -                writer.WritePropertyName("protectionState"u8);
    -                writer.WriteStringValue(ProtectionState.Value.ToString());
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             VmWorkloadSqlInstanceProtectableItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSqlInstanceWorkloadItem.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSqlInstanceWorkloadItem.Serialization.cs
    index abbe3d4edc4f..084116a09bc9 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSqlInstanceWorkloadItem.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSqlInstanceWorkloadItem.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class VmWorkloadSqlInstanceWorkloadItem : IUtf8JsonSerializable,
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer,
                     throw new FormatException($"The model {nameof(VmWorkloadSqlInstanceWorkloadItem)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsCollectionDefined(DataDirectoryPaths))
                 {
                     writer.WritePropertyName("dataDirectoryPaths"u8);
    @@ -36,69 +45,6 @@ void IJsonModel.Write(Utf8JsonWriter writer,
                     }
                     writer.WriteEndArray();
                 }
    -            if (Optional.IsDefined(ParentName))
    -            {
    -                writer.WritePropertyName("parentName"u8);
    -                writer.WriteStringValue(ParentName);
    -            }
    -            if (Optional.IsDefined(ServerName))
    -            {
    -                writer.WritePropertyName("serverName"u8);
    -                writer.WriteStringValue(ServerName);
    -            }
    -            if (Optional.IsDefined(IsAutoProtectable))
    -            {
    -                writer.WritePropertyName("isAutoProtectable"u8);
    -                writer.WriteBooleanValue(IsAutoProtectable.Value);
    -            }
    -            if (Optional.IsDefined(SubInquiredItemCount))
    -            {
    -                writer.WritePropertyName("subinquireditemcount"u8);
    -                writer.WriteNumberValue(SubInquiredItemCount.Value);
    -            }
    -            if (Optional.IsDefined(SubWorkloadItemCount))
    -            {
    -                writer.WritePropertyName("subWorkloadItemCount"u8);
    -                writer.WriteNumberValue(SubWorkloadItemCount.Value);
    -            }
    -            if (Optional.IsDefined(BackupManagementType))
    -            {
    -                writer.WritePropertyName("backupManagementType"u8);
    -                writer.WriteStringValue(BackupManagementType);
    -            }
    -            if (Optional.IsDefined(WorkloadType))
    -            {
    -                writer.WritePropertyName("workloadType"u8);
    -                writer.WriteStringValue(WorkloadType);
    -            }
    -            writer.WritePropertyName("workloadItemType"u8);
    -            writer.WriteStringValue(WorkloadItemType);
    -            if (Optional.IsDefined(FriendlyName))
    -            {
    -                writer.WritePropertyName("friendlyName"u8);
    -                writer.WriteStringValue(FriendlyName);
    -            }
    -            if (Optional.IsDefined(ProtectionState))
    -            {
    -                writer.WritePropertyName("protectionState"u8);
    -                writer.WriteStringValue(ProtectionState.Value.ToString());
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             VmWorkloadSqlInstanceWorkloadItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WeeklyRetentionFormat.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WeeklyRetentionFormat.Serialization.cs
    index a304f81d0bb5..808b5bc0ee9c 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WeeklyRetentionFormat.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WeeklyRetentionFormat.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class WeeklyRetentionFormat : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW
                     throw new FormatException($"The model {nameof(WeeklyRetentionFormat)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsCollectionDefined(DaysOfTheWeek))
                 {
                     writer.WritePropertyName("daysOfTheWeek"u8);
    @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             WeeklyRetentionFormat IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WeeklyRetentionSchedule.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WeeklyRetentionSchedule.Serialization.cs
    index ae98c3d8f907..bad0e7f0ca68 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WeeklyRetentionSchedule.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WeeklyRetentionSchedule.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class WeeklyRetentionSchedule : IUtf8JsonSerializable, IJsonModel
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade
                     throw new FormatException($"The model {nameof(WeeklyRetentionSchedule)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsCollectionDefined(DaysOfTheWeek))
                 {
                     writer.WritePropertyName("daysOfTheWeek"u8);
    @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             WeeklyRetentionSchedule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadAutoProtectionIntent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadAutoProtectionIntent.Serialization.cs
    index aa6f4270bd14..32164ae04e41 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadAutoProtectionIntent.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadAutoProtectionIntent.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class WorkloadAutoProtectionIntent : IUtf8JsonSerializable, IJson
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,50 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model
                     throw new FormatException($"The model {nameof(WorkloadAutoProtectionIntent)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            writer.WritePropertyName("protectionIntentItemType"u8);
    -            writer.WriteStringValue(ProtectionIntentItemType.ToString());
    -            if (Optional.IsDefined(BackupManagementType))
    -            {
    -                writer.WritePropertyName("backupManagementType"u8);
    -                writer.WriteStringValue(BackupManagementType.Value.ToString());
    -            }
    -            if (Optional.IsDefined(SourceResourceId))
    -            {
    -                writer.WritePropertyName("sourceResourceId"u8);
    -                writer.WriteStringValue(SourceResourceId);
    -            }
    -            if (Optional.IsDefined(ItemId))
    -            {
    -                writer.WritePropertyName("itemId"u8);
    -                writer.WriteStringValue(ItemId);
    -            }
    -            if (Optional.IsDefined(PolicyId))
    -            {
    -                writer.WritePropertyName("policyId"u8);
    -                writer.WriteStringValue(PolicyId);
    -            }
    -            if (Optional.IsDefined(ProtectionState))
    -            {
    -                writer.WritePropertyName("protectionState"u8);
    -                writer.WriteStringValue(ProtectionState.Value.ToString());
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             WorkloadAutoProtectionIntent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadBackupContent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadBackupContent.Serialization.cs
    index 2dbabd726f09..a12e1b7c8112 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadBackupContent.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadBackupContent.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class WorkloadBackupContent : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW
                     throw new FormatException($"The model {nameof(WorkloadBackupContent)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(BackupType))
                 {
                     writer.WritePropertyName("backupType"u8);
    @@ -41,24 +50,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW
                     writer.WritePropertyName("recoveryPointExpiryTimeInUTC"u8);
                     writer.WriteStringValue(RecoveryPointExpireOn.Value, "O");
                 }
    -            writer.WritePropertyName("objectType"u8);
    -            writer.WriteStringValue(ObjectType);
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             WorkloadBackupContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadBackupJob.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadBackupJob.Serialization.cs
    index c9b43427b2b3..da9b9ebdaf61 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadBackupJob.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadBackupJob.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class WorkloadBackupJob : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite
                     throw new FormatException($"The model {nameof(WorkloadBackupJob)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(WorkloadType))
                 {
                     writer.WritePropertyName("workloadType"u8);
    @@ -61,59 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite
                     writer.WritePropertyName("extendedInfo"u8);
                     writer.WriteObjectValue(ExtendedInfo, options);
                 }
    -            if (Optional.IsDefined(EntityFriendlyName))
    -            {
    -                writer.WritePropertyName("entityFriendlyName"u8);
    -                writer.WriteStringValue(EntityFriendlyName);
    -            }
    -            if (Optional.IsDefined(BackupManagementType))
    -            {
    -                writer.WritePropertyName("backupManagementType"u8);
    -                writer.WriteStringValue(BackupManagementType.Value.ToString());
    -            }
    -            if (Optional.IsDefined(Operation))
    -            {
    -                writer.WritePropertyName("operation"u8);
    -                writer.WriteStringValue(Operation);
    -            }
    -            if (Optional.IsDefined(Status))
    -            {
    -                writer.WritePropertyName("status"u8);
    -                writer.WriteStringValue(Status);
    -            }
    -            if (Optional.IsDefined(StartOn))
    -            {
    -                writer.WritePropertyName("startTime"u8);
    -                writer.WriteStringValue(StartOn.Value, "O");
    -            }
    -            if (Optional.IsDefined(EndOn))
    -            {
    -                writer.WritePropertyName("endTime"u8);
    -                writer.WriteStringValue(EndOn.Value, "O");
    -            }
    -            if (Optional.IsDefined(ActivityId))
    -            {
    -                writer.WritePropertyName("activityId"u8);
    -                writer.WriteStringValue(ActivityId);
    -            }
    -            writer.WritePropertyName("jobType"u8);
    -            writer.WriteStringValue(JobType);
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             WorkloadBackupJob IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadBackupJobExtendedInfo.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadBackupJobExtendedInfo.Serialization.cs
    index 88c4f80d4365..6eb2756316c8 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadBackupJobExtendedInfo.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadBackupJobExtendedInfo.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class WorkloadBackupJobExtendedInfo : IUtf8JsonSerializable, IJso
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode
                     throw new FormatException($"The model {nameof(WorkloadBackupJobExtendedInfo)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsCollectionDefined(TasksList))
                 {
                     writer.WritePropertyName("tasksList"u8);
    @@ -67,7 +75,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             WorkloadBackupJobExtendedInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadBackupJobTaskDetails.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadBackupJobTaskDetails.Serialization.cs
    index 02f7a66f7b94..0f0ebd234038 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadBackupJobTaskDetails.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadBackupJobTaskDetails.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class WorkloadBackupJobTaskDetails : IUtf8JsonSerializable, IJson
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model
                     throw new FormatException($"The model {nameof(WorkloadBackupJobTaskDetails)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(TaskId))
                 {
                     writer.WritePropertyName("taskId"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             WorkloadBackupJobTaskDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadContainer.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadContainer.Serialization.cs
    index cdb8e4e7a2a7..9ecb0e6b8002 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadContainer.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadContainer.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class WorkloadContainer : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite
                     throw new FormatException($"The model {nameof(WorkloadContainer)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(SourceResourceId))
                 {
                     writer.WritePropertyName("sourceResourceId"u8);
    @@ -51,49 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite
                     writer.WritePropertyName("operationType"u8);
                     writer.WriteStringValue(OperationType.Value.ToString());
                 }
    -            if (Optional.IsDefined(FriendlyName))
    -            {
    -                writer.WritePropertyName("friendlyName"u8);
    -                writer.WriteStringValue(FriendlyName);
    -            }
    -            if (Optional.IsDefined(BackupManagementType))
    -            {
    -                writer.WritePropertyName("backupManagementType"u8);
    -                writer.WriteStringValue(BackupManagementType.Value.ToString());
    -            }
    -            if (Optional.IsDefined(RegistrationStatus))
    -            {
    -                writer.WritePropertyName("registrationStatus"u8);
    -                writer.WriteStringValue(RegistrationStatus);
    -            }
    -            if (Optional.IsDefined(HealthStatus))
    -            {
    -                writer.WritePropertyName("healthStatus"u8);
    -                writer.WriteStringValue(HealthStatus);
    -            }
    -            writer.WritePropertyName("containerType"u8);
    -            writer.WriteStringValue(ContainerType.ToSerialString());
    -            if (Optional.IsDefined(ProtectableObjectType))
    -            {
    -                writer.WritePropertyName("protectableObjectType"u8);
    -                writer.WriteStringValue(ProtectableObjectType);
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             WorkloadContainer IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadContainerAutoProtectionIntent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadContainerAutoProtectionIntent.Serialization.cs
    index 1429d74b2f53..ab0648ba90b4 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadContainerAutoProtectionIntent.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadContainerAutoProtectionIntent.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class WorkloadContainerAutoProtectionIntent : IUtf8JsonSerializab
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,50 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writ
                     throw new FormatException($"The model {nameof(WorkloadContainerAutoProtectionIntent)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            writer.WritePropertyName("protectionIntentItemType"u8);
    -            writer.WriteStringValue(ProtectionIntentItemType.ToString());
    -            if (Optional.IsDefined(BackupManagementType))
    -            {
    -                writer.WritePropertyName("backupManagementType"u8);
    -                writer.WriteStringValue(BackupManagementType.Value.ToString());
    -            }
    -            if (Optional.IsDefined(SourceResourceId))
    -            {
    -                writer.WritePropertyName("sourceResourceId"u8);
    -                writer.WriteStringValue(SourceResourceId);
    -            }
    -            if (Optional.IsDefined(ItemId))
    -            {
    -                writer.WritePropertyName("itemId"u8);
    -                writer.WriteStringValue(ItemId);
    -            }
    -            if (Optional.IsDefined(PolicyId))
    -            {
    -                writer.WritePropertyName("policyId"u8);
    -                writer.WriteStringValue(PolicyId);
    -            }
    -            if (Optional.IsDefined(ProtectionState))
    -            {
    -                writer.WritePropertyName("protectionState"u8);
    -                writer.WriteStringValue(ProtectionState.Value.ToString());
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             WorkloadContainerAutoProtectionIntent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadContainerExtendedInfo.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadContainerExtendedInfo.Serialization.cs
    index 44f89f44ac3e..4bc210a4bbd6 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadContainerExtendedInfo.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadContainerExtendedInfo.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class WorkloadContainerExtendedInfo : IUtf8JsonSerializable, IJso
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode
                     throw new FormatException($"The model {nameof(WorkloadContainerExtendedInfo)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(HostServerName))
                 {
                     writer.WritePropertyName("hostServerName"u8);
    @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             WorkloadContainerExtendedInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadContainerInquiryInfo.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadContainerInquiryInfo.Serialization.cs
    index e96b4a8f2fd8..cf7f1928eb7c 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadContainerInquiryInfo.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadContainerInquiryInfo.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class WorkloadContainerInquiryInfo : IUtf8JsonSerializable, IJson
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model
                     throw new FormatException($"The model {nameof(WorkloadContainerInquiryInfo)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(Status))
                 {
                     writer.WritePropertyName("status"u8);
    @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             WorkloadContainerInquiryInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadErrorInfo.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadErrorInfo.Serialization.cs
    index c0246a171db4..96d0d454fb68 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadErrorInfo.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadErrorInfo.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class WorkloadErrorInfo : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite
                     throw new FormatException($"The model {nameof(WorkloadErrorInfo)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(ErrorCode))
                 {
                     writer.WritePropertyName("errorCode"u8);
    @@ -71,7 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             WorkloadErrorInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadInquiryDetails.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadInquiryDetails.Serialization.cs
    index e89114ae1755..a0af56b962e2 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadInquiryDetails.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadInquiryDetails.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class WorkloadInquiryDetails : IUtf8JsonSerializable, IJsonModel<
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader
                     throw new FormatException($"The model {nameof(WorkloadInquiryDetails)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(WorkloadInquiryDetailsType))
                 {
                     writer.WritePropertyName("type"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             WorkloadInquiryDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadItem.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadItem.Serialization.cs
    index fff5bf58f7fd..59c124054a0f 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadItem.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadItem.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class WorkloadItem : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti
                     throw new FormatException($"The model {nameof(WorkloadItem)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(BackupManagementType))
                 {
                     writer.WritePropertyName("backupManagementType"u8);
    @@ -63,7 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             WorkloadItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadItemResource.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadItemResource.Serialization.cs
    index 48af2a360a2d..6830be4900d7 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadItemResource.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadItemResource.Serialization.cs
    @@ -19,6 +19,15 @@ public partial class WorkloadItemResource : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -26,7 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr
                     throw new FormatException($"The model {nameof(WorkloadItemResource)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(Properties))
                 {
                     writer.WritePropertyName("properties"u8);
    @@ -37,55 +46,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr
                     writer.WritePropertyName("eTag"u8);
                     writer.WriteStringValue(ETag.Value.ToString());
                 }
    -            if (Optional.IsCollectionDefined(Tags))
    -            {
    -                writer.WritePropertyName("tags"u8);
    -                writer.WriteStartObject();
    -                foreach (var item in Tags)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -                    writer.WriteStringValue(item.Value);
    -                }
    -                writer.WriteEndObject();
    -            }
    -            writer.WritePropertyName("location"u8);
    -            writer.WriteStringValue(Location);
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("id"u8);
    -                writer.WriteStringValue(Id);
    -            }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("name"u8);
    -                writer.WriteStringValue(Name);
    -            }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("type"u8);
    -                writer.WriteStringValue(ResourceType);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(SystemData))
    -            {
    -                writer.WritePropertyName("systemData"u8);
    -                JsonSerializer.Serialize(writer, SystemData);
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             WorkloadItemResource IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadItemResourceList.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadItemResourceList.Serialization.cs
    index 0b07aad3b043..7a8da520ce47 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadItemResourceList.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadItemResourceList.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class WorkloadItemResourceList : IUtf8JsonSerializable, IJsonMo
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead
                     throw new FormatException($"The model {nameof(WorkloadItemResourceList)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsCollectionDefined(Value))
                 {
                     writer.WritePropertyName("value"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             WorkloadItemResourceList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadPointInTimeRecoveryPoint.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadPointInTimeRecoveryPoint.Serialization.cs
    index d293023f8c37..6c2b91fb910a 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadPointInTimeRecoveryPoint.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadPointInTimeRecoveryPoint.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class WorkloadPointInTimeRecoveryPoint : IUtf8JsonSerializable, I
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, M
                     throw new FormatException($"The model {nameof(WorkloadPointInTimeRecoveryPoint)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsCollectionDefined(TimeRanges))
                 {
                     writer.WritePropertyName("timeRanges"u8);
    @@ -36,60 +45,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M
                     }
                     writer.WriteEndArray();
                 }
    -            if (Optional.IsDefined(RecoveryPointCreatedOn))
    -            {
    -                writer.WritePropertyName("recoveryPointTimeInUTC"u8);
    -                writer.WriteStringValue(RecoveryPointCreatedOn.Value, "O");
    -            }
    -            if (Optional.IsDefined(RestorePointType))
    -            {
    -                writer.WritePropertyName("type"u8);
    -                writer.WriteStringValue(RestorePointType.Value.ToString());
    -            }
    -            if (Optional.IsCollectionDefined(RecoveryPointTierDetails))
    -            {
    -                writer.WritePropertyName("recoveryPointTierDetails"u8);
    -                writer.WriteStartArray();
    -                foreach (var item in RecoveryPointTierDetails)
    -                {
    -                    writer.WriteObjectValue(item, options);
    -                }
    -                writer.WriteEndArray();
    -            }
    -            if (Optional.IsCollectionDefined(RecoveryPointMoveReadinessInfo))
    -            {
    -                writer.WritePropertyName("recoveryPointMoveReadinessInfo"u8);
    -                writer.WriteStartObject();
    -                foreach (var item in RecoveryPointMoveReadinessInfo)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -                    writer.WriteObjectValue(item.Value, options);
    -                }
    -                writer.WriteEndObject();
    -            }
    -            if (Optional.IsDefined(RecoveryPointProperties))
    -            {
    -                writer.WritePropertyName("recoveryPointProperties"u8);
    -                writer.WriteObjectValue(RecoveryPointProperties, options);
    -            }
    -            writer.WritePropertyName("objectType"u8);
    -            writer.WriteStringValue(ObjectType);
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             WorkloadPointInTimeRecoveryPoint IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadPointInTimeRestoreContent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadPointInTimeRestoreContent.Serialization.cs
    index 563d83e27c8b..c54c8d35bc1d 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadPointInTimeRestoreContent.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadPointInTimeRestoreContent.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class WorkloadPointInTimeRestoreContent : IUtf8JsonSerializable,
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,81 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter writer,
                     throw new FormatException($"The model {nameof(WorkloadPointInTimeRestoreContent)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(PointInTime))
                 {
                     writer.WritePropertyName("pointInTime"u8);
                     writer.WriteStringValue(PointInTime.Value, "O");
                 }
    -            if (Optional.IsDefined(RecoveryType))
    -            {
    -                writer.WritePropertyName("recoveryType"u8);
    -                writer.WriteStringValue(RecoveryType.Value.ToString());
    -            }
    -            if (Optional.IsDefined(SourceResourceId))
    -            {
    -                writer.WritePropertyName("sourceResourceId"u8);
    -                writer.WriteStringValue(SourceResourceId);
    -            }
    -            if (Optional.IsCollectionDefined(PropertyBag))
    -            {
    -                writer.WritePropertyName("propertyBag"u8);
    -                writer.WriteStartObject();
    -                foreach (var item in PropertyBag)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -                    writer.WriteStringValue(item.Value);
    -                }
    -                writer.WriteEndObject();
    -            }
    -            if (Optional.IsDefined(TargetInfo))
    -            {
    -                writer.WritePropertyName("targetInfo"u8);
    -                writer.WriteObjectValue(TargetInfo, options);
    -            }
    -            if (Optional.IsDefined(RecoveryMode))
    -            {
    -                writer.WritePropertyName("recoveryMode"u8);
    -                writer.WriteStringValue(RecoveryMode.Value.ToString());
    -            }
    -            if (Optional.IsDefined(TargetResourceGroupName))
    -            {
    -                writer.WritePropertyName("targetResourceGroupName"u8);
    -                writer.WriteStringValue(TargetResourceGroupName);
    -            }
    -            if (Optional.IsDefined(UserAssignedManagedIdentityDetails))
    -            {
    -                writer.WritePropertyName("userAssignedManagedIdentityDetails"u8);
    -                writer.WriteObjectValue(UserAssignedManagedIdentityDetails, options);
    -            }
    -            if (Optional.IsDefined(SnapshotRestoreParameters))
    -            {
    -                writer.WritePropertyName("snapshotRestoreParameters"u8);
    -                writer.WriteObjectValue(SnapshotRestoreParameters, options);
    -            }
    -            if (Optional.IsDefined(TargetVirtualMachineId))
    -            {
    -                writer.WritePropertyName("targetVirtualMachineId"u8);
    -                writer.WriteStringValue(TargetVirtualMachineId);
    -            }
    -            writer.WritePropertyName("objectType"u8);
    -            writer.WriteStringValue(ObjectType);
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             WorkloadPointInTimeRestoreContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadProtectableItem.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadProtectableItem.Serialization.cs
    index 2e740b2e01a5..872b40589fff 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadProtectableItem.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadProtectableItem.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class WorkloadProtectableItem : IUtf8JsonSerializable, IJsonModel
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade
                     throw new FormatException($"The model {nameof(WorkloadProtectableItem)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(BackupManagementType))
                 {
                     writer.WritePropertyName("backupManagementType"u8);
    @@ -63,7 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             WorkloadProtectableItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadProtectableItemResource.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadProtectableItemResource.Serialization.cs
    index fcdeca33e9c5..e864b830c63e 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadProtectableItemResource.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadProtectableItemResource.Serialization.cs
    @@ -19,6 +19,15 @@ public partial class WorkloadProtectableItemResource : IUtf8JsonSerializable, IJ
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -26,7 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo
                     throw new FormatException($"The model {nameof(WorkloadProtectableItemResource)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(Properties))
                 {
                     writer.WritePropertyName("properties"u8);
    @@ -37,55 +46,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo
                     writer.WritePropertyName("eTag"u8);
                     writer.WriteStringValue(ETag.Value.ToString());
                 }
    -            if (Optional.IsCollectionDefined(Tags))
    -            {
    -                writer.WritePropertyName("tags"u8);
    -                writer.WriteStartObject();
    -                foreach (var item in Tags)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -                    writer.WriteStringValue(item.Value);
    -                }
    -                writer.WriteEndObject();
    -            }
    -            writer.WritePropertyName("location"u8);
    -            writer.WriteStringValue(Location);
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("id"u8);
    -                writer.WriteStringValue(Id);
    -            }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("name"u8);
    -                writer.WriteStringValue(Name);
    -            }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("type"u8);
    -                writer.WriteStringValue(ResourceType);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(SystemData))
    -            {
    -                writer.WritePropertyName("systemData"u8);
    -                JsonSerializer.Serialize(writer, SystemData);
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             WorkloadProtectableItemResource IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadProtectableItemResourceList.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadProtectableItemResourceList.Serialization.cs
    index 9cc8b256e7e3..d773093a5720 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadProtectableItemResourceList.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadProtectableItemResourceList.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class WorkloadProtectableItemResourceList : IUtf8JsonSerializab
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer
                     throw new FormatException($"The model {nameof(WorkloadProtectableItemResourceList)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsCollectionDefined(Value))
                 {
                     writer.WritePropertyName("value"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             WorkloadProtectableItemResourceList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadRecoveryPoint.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadRecoveryPoint.Serialization.cs
    index b001d5028d0c..b2e0a4071978 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadRecoveryPoint.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadRecoveryPoint.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class WorkloadRecoveryPoint : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW
                     throw new FormatException($"The model {nameof(WorkloadRecoveryPoint)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(RecoveryPointCreatedOn))
                 {
                     writer.WritePropertyName("recoveryPointTimeInUTC"u8);
    @@ -62,24 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW
                     writer.WritePropertyName("recoveryPointProperties"u8);
                     writer.WriteObjectValue(RecoveryPointProperties, options);
                 }
    -            writer.WritePropertyName("objectType"u8);
    -            writer.WriteStringValue(ObjectType);
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             WorkloadRecoveryPoint IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadRestoreContent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadRestoreContent.Serialization.cs
    index 5616bc17c0a6..8c521a9946f8 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadRestoreContent.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadRestoreContent.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class WorkloadRestoreContent : IUtf8JsonSerializable, IJsonModel<
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader
                     throw new FormatException($"The model {nameof(WorkloadRestoreContent)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(RecoveryType))
                 {
                     writer.WritePropertyName("recoveryType"u8);
    @@ -77,24 +86,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader
                     writer.WritePropertyName("targetVirtualMachineId"u8);
                     writer.WriteStringValue(TargetVirtualMachineId);
                 }
    -            writer.WritePropertyName("objectType"u8);
    -            writer.WriteStringValue(ObjectType);
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             WorkloadRestoreContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSapHanaPointInTimeRecoveryPoint.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSapHanaPointInTimeRecoveryPoint.Serialization.cs
    index 6271aa5bb4a3..ddd161568264 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSapHanaPointInTimeRecoveryPoint.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSapHanaPointInTimeRecoveryPoint.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class WorkloadSapHanaPointInTimeRecoveryPoint : IUtf8JsonSerializ
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,71 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter wr
                     throw new FormatException($"The model {nameof(WorkloadSapHanaPointInTimeRecoveryPoint)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            if (Optional.IsCollectionDefined(TimeRanges))
    -            {
    -                writer.WritePropertyName("timeRanges"u8);
    -                writer.WriteStartArray();
    -                foreach (var item in TimeRanges)
    -                {
    -                    writer.WriteObjectValue(item, options);
    -                }
    -                writer.WriteEndArray();
    -            }
    -            if (Optional.IsDefined(RecoveryPointCreatedOn))
    -            {
    -                writer.WritePropertyName("recoveryPointTimeInUTC"u8);
    -                writer.WriteStringValue(RecoveryPointCreatedOn.Value, "O");
    -            }
    -            if (Optional.IsDefined(RestorePointType))
    -            {
    -                writer.WritePropertyName("type"u8);
    -                writer.WriteStringValue(RestorePointType.Value.ToString());
    -            }
    -            if (Optional.IsCollectionDefined(RecoveryPointTierDetails))
    -            {
    -                writer.WritePropertyName("recoveryPointTierDetails"u8);
    -                writer.WriteStartArray();
    -                foreach (var item in RecoveryPointTierDetails)
    -                {
    -                    writer.WriteObjectValue(item, options);
    -                }
    -                writer.WriteEndArray();
    -            }
    -            if (Optional.IsCollectionDefined(RecoveryPointMoveReadinessInfo))
    -            {
    -                writer.WritePropertyName("recoveryPointMoveReadinessInfo"u8);
    -                writer.WriteStartObject();
    -                foreach (var item in RecoveryPointMoveReadinessInfo)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -                    writer.WriteObjectValue(item.Value, options);
    -                }
    -                writer.WriteEndObject();
    -            }
    -            if (Optional.IsDefined(RecoveryPointProperties))
    -            {
    -                writer.WritePropertyName("recoveryPointProperties"u8);
    -                writer.WriteObjectValue(RecoveryPointProperties, options);
    -            }
    -            writer.WritePropertyName("objectType"u8);
    -            writer.WriteStringValue(ObjectType);
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             WorkloadSapHanaPointInTimeRecoveryPoint IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSapHanaPointInTimeRestoreContent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSapHanaPointInTimeRestoreContent.Serialization.cs
    index f4e6aa142cc4..49e90155bd16 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSapHanaPointInTimeRestoreContent.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSapHanaPointInTimeRestoreContent.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class WorkloadSapHanaPointInTimeRestoreContent : IUtf8JsonSeriali
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,81 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter w
                     throw new FormatException($"The model {nameof(WorkloadSapHanaPointInTimeRestoreContent)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(PointInTime))
                 {
                     writer.WritePropertyName("pointInTime"u8);
                     writer.WriteStringValue(PointInTime.Value, "O");
                 }
    -            if (Optional.IsDefined(RecoveryType))
    -            {
    -                writer.WritePropertyName("recoveryType"u8);
    -                writer.WriteStringValue(RecoveryType.Value.ToString());
    -            }
    -            if (Optional.IsDefined(SourceResourceId))
    -            {
    -                writer.WritePropertyName("sourceResourceId"u8);
    -                writer.WriteStringValue(SourceResourceId);
    -            }
    -            if (Optional.IsCollectionDefined(PropertyBag))
    -            {
    -                writer.WritePropertyName("propertyBag"u8);
    -                writer.WriteStartObject();
    -                foreach (var item in PropertyBag)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -                    writer.WriteStringValue(item.Value);
    -                }
    -                writer.WriteEndObject();
    -            }
    -            if (Optional.IsDefined(TargetInfo))
    -            {
    -                writer.WritePropertyName("targetInfo"u8);
    -                writer.WriteObjectValue(TargetInfo, options);
    -            }
    -            if (Optional.IsDefined(RecoveryMode))
    -            {
    -                writer.WritePropertyName("recoveryMode"u8);
    -                writer.WriteStringValue(RecoveryMode.Value.ToString());
    -            }
    -            if (Optional.IsDefined(TargetResourceGroupName))
    -            {
    -                writer.WritePropertyName("targetResourceGroupName"u8);
    -                writer.WriteStringValue(TargetResourceGroupName);
    -            }
    -            if (Optional.IsDefined(UserAssignedManagedIdentityDetails))
    -            {
    -                writer.WritePropertyName("userAssignedManagedIdentityDetails"u8);
    -                writer.WriteObjectValue(UserAssignedManagedIdentityDetails, options);
    -            }
    -            if (Optional.IsDefined(SnapshotRestoreParameters))
    -            {
    -                writer.WritePropertyName("snapshotRestoreParameters"u8);
    -                writer.WriteObjectValue(SnapshotRestoreParameters, options);
    -            }
    -            if (Optional.IsDefined(TargetVirtualMachineId))
    -            {
    -                writer.WritePropertyName("targetVirtualMachineId"u8);
    -                writer.WriteStringValue(TargetVirtualMachineId);
    -            }
    -            writer.WritePropertyName("objectType"u8);
    -            writer.WriteStringValue(ObjectType);
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             WorkloadSapHanaPointInTimeRestoreContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSapHanaPointInTimeRestoreWithRehydrateContent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSapHanaPointInTimeRestoreWithRehydrateContent.Serialization.cs
    index 5a3219dab058..e19b06df1335 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSapHanaPointInTimeRestoreWithRehydrateContent.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSapHanaPointInTimeRestoreWithRehydrateContent.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class WorkloadSapHanaPointInTimeRestoreWithRehydrateContent : IUt
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,86 +34,12 @@ void IJsonModel.Write(Utf
                     throw new FormatException($"The model {nameof(WorkloadSapHanaPointInTimeRestoreWithRehydrateContent)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(RecoveryPointRehydrationInfo))
                 {
                     writer.WritePropertyName("recoveryPointRehydrationInfo"u8);
                     writer.WriteObjectValue(RecoveryPointRehydrationInfo, options);
                 }
    -            if (Optional.IsDefined(PointInTime))
    -            {
    -                writer.WritePropertyName("pointInTime"u8);
    -                writer.WriteStringValue(PointInTime.Value, "O");
    -            }
    -            if (Optional.IsDefined(RecoveryType))
    -            {
    -                writer.WritePropertyName("recoveryType"u8);
    -                writer.WriteStringValue(RecoveryType.Value.ToString());
    -            }
    -            if (Optional.IsDefined(SourceResourceId))
    -            {
    -                writer.WritePropertyName("sourceResourceId"u8);
    -                writer.WriteStringValue(SourceResourceId);
    -            }
    -            if (Optional.IsCollectionDefined(PropertyBag))
    -            {
    -                writer.WritePropertyName("propertyBag"u8);
    -                writer.WriteStartObject();
    -                foreach (var item in PropertyBag)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -                    writer.WriteStringValue(item.Value);
    -                }
    -                writer.WriteEndObject();
    -            }
    -            if (Optional.IsDefined(TargetInfo))
    -            {
    -                writer.WritePropertyName("targetInfo"u8);
    -                writer.WriteObjectValue(TargetInfo, options);
    -            }
    -            if (Optional.IsDefined(RecoveryMode))
    -            {
    -                writer.WritePropertyName("recoveryMode"u8);
    -                writer.WriteStringValue(RecoveryMode.Value.ToString());
    -            }
    -            if (Optional.IsDefined(TargetResourceGroupName))
    -            {
    -                writer.WritePropertyName("targetResourceGroupName"u8);
    -                writer.WriteStringValue(TargetResourceGroupName);
    -            }
    -            if (Optional.IsDefined(UserAssignedManagedIdentityDetails))
    -            {
    -                writer.WritePropertyName("userAssignedManagedIdentityDetails"u8);
    -                writer.WriteObjectValue(UserAssignedManagedIdentityDetails, options);
    -            }
    -            if (Optional.IsDefined(SnapshotRestoreParameters))
    -            {
    -                writer.WritePropertyName("snapshotRestoreParameters"u8);
    -                writer.WriteObjectValue(SnapshotRestoreParameters, options);
    -            }
    -            if (Optional.IsDefined(TargetVirtualMachineId))
    -            {
    -                writer.WritePropertyName("targetVirtualMachineId"u8);
    -                writer.WriteStringValue(TargetVirtualMachineId);
    -            }
    -            writer.WritePropertyName("objectType"u8);
    -            writer.WriteStringValue(ObjectType);
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             WorkloadSapHanaPointInTimeRestoreWithRehydrateContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSapHanaRecoveryPoint.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSapHanaRecoveryPoint.Serialization.cs
    index f1a51431de0c..2e1fb3bd9bd7 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSapHanaRecoveryPoint.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSapHanaRecoveryPoint.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class WorkloadSapHanaRecoveryPoint : IUtf8JsonSerializable, IJson
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,61 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model
                     throw new FormatException($"The model {nameof(WorkloadSapHanaRecoveryPoint)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            if (Optional.IsDefined(RecoveryPointCreatedOn))
    -            {
    -                writer.WritePropertyName("recoveryPointTimeInUTC"u8);
    -                writer.WriteStringValue(RecoveryPointCreatedOn.Value, "O");
    -            }
    -            if (Optional.IsDefined(RestorePointType))
    -            {
    -                writer.WritePropertyName("type"u8);
    -                writer.WriteStringValue(RestorePointType.Value.ToString());
    -            }
    -            if (Optional.IsCollectionDefined(RecoveryPointTierDetails))
    -            {
    -                writer.WritePropertyName("recoveryPointTierDetails"u8);
    -                writer.WriteStartArray();
    -                foreach (var item in RecoveryPointTierDetails)
    -                {
    -                    writer.WriteObjectValue(item, options);
    -                }
    -                writer.WriteEndArray();
    -            }
    -            if (Optional.IsCollectionDefined(RecoveryPointMoveReadinessInfo))
    -            {
    -                writer.WritePropertyName("recoveryPointMoveReadinessInfo"u8);
    -                writer.WriteStartObject();
    -                foreach (var item in RecoveryPointMoveReadinessInfo)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -                    writer.WriteObjectValue(item.Value, options);
    -                }
    -                writer.WriteEndObject();
    -            }
    -            if (Optional.IsDefined(RecoveryPointProperties))
    -            {
    -                writer.WritePropertyName("recoveryPointProperties"u8);
    -                writer.WriteObjectValue(RecoveryPointProperties, options);
    -            }
    -            writer.WritePropertyName("objectType"u8);
    -            writer.WriteStringValue(ObjectType);
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             WorkloadSapHanaRecoveryPoint IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSapHanaRestoreContent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSapHanaRestoreContent.Serialization.cs
    index 64b0c066400c..7270035ac933 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSapHanaRestoreContent.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSapHanaRestoreContent.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class WorkloadSapHanaRestoreContent : IUtf8JsonSerializable, IJso
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,76 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode
                     throw new FormatException($"The model {nameof(WorkloadSapHanaRestoreContent)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            if (Optional.IsDefined(RecoveryType))
    -            {
    -                writer.WritePropertyName("recoveryType"u8);
    -                writer.WriteStringValue(RecoveryType.Value.ToString());
    -            }
    -            if (Optional.IsDefined(SourceResourceId))
    -            {
    -                writer.WritePropertyName("sourceResourceId"u8);
    -                writer.WriteStringValue(SourceResourceId);
    -            }
    -            if (Optional.IsCollectionDefined(PropertyBag))
    -            {
    -                writer.WritePropertyName("propertyBag"u8);
    -                writer.WriteStartObject();
    -                foreach (var item in PropertyBag)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -                    writer.WriteStringValue(item.Value);
    -                }
    -                writer.WriteEndObject();
    -            }
    -            if (Optional.IsDefined(TargetInfo))
    -            {
    -                writer.WritePropertyName("targetInfo"u8);
    -                writer.WriteObjectValue(TargetInfo, options);
    -            }
    -            if (Optional.IsDefined(RecoveryMode))
    -            {
    -                writer.WritePropertyName("recoveryMode"u8);
    -                writer.WriteStringValue(RecoveryMode.Value.ToString());
    -            }
    -            if (Optional.IsDefined(TargetResourceGroupName))
    -            {
    -                writer.WritePropertyName("targetResourceGroupName"u8);
    -                writer.WriteStringValue(TargetResourceGroupName);
    -            }
    -            if (Optional.IsDefined(UserAssignedManagedIdentityDetails))
    -            {
    -                writer.WritePropertyName("userAssignedManagedIdentityDetails"u8);
    -                writer.WriteObjectValue(UserAssignedManagedIdentityDetails, options);
    -            }
    -            if (Optional.IsDefined(SnapshotRestoreParameters))
    -            {
    -                writer.WritePropertyName("snapshotRestoreParameters"u8);
    -                writer.WriteObjectValue(SnapshotRestoreParameters, options);
    -            }
    -            if (Optional.IsDefined(TargetVirtualMachineId))
    -            {
    -                writer.WritePropertyName("targetVirtualMachineId"u8);
    -                writer.WriteStringValue(TargetVirtualMachineId);
    -            }
    -            writer.WritePropertyName("objectType"u8);
    -            writer.WriteStringValue(ObjectType);
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             WorkloadSapHanaRestoreContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSapHanaRestoreWithRehydrateContent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSapHanaRestoreWithRehydrateContent.Serialization.cs
    index 5cfa0b0fac52..0f07a787a9ce 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSapHanaRestoreWithRehydrateContent.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSapHanaRestoreWithRehydrateContent.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class WorkloadSapHanaRestoreWithRehydrateContent : IUtf8JsonSeria
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,81 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter
                     throw new FormatException($"The model {nameof(WorkloadSapHanaRestoreWithRehydrateContent)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(RecoveryPointRehydrationInfo))
                 {
                     writer.WritePropertyName("recoveryPointRehydrationInfo"u8);
                     writer.WriteObjectValue(RecoveryPointRehydrationInfo, options);
                 }
    -            if (Optional.IsDefined(RecoveryType))
    -            {
    -                writer.WritePropertyName("recoveryType"u8);
    -                writer.WriteStringValue(RecoveryType.Value.ToString());
    -            }
    -            if (Optional.IsDefined(SourceResourceId))
    -            {
    -                writer.WritePropertyName("sourceResourceId"u8);
    -                writer.WriteStringValue(SourceResourceId);
    -            }
    -            if (Optional.IsCollectionDefined(PropertyBag))
    -            {
    -                writer.WritePropertyName("propertyBag"u8);
    -                writer.WriteStartObject();
    -                foreach (var item in PropertyBag)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -                    writer.WriteStringValue(item.Value);
    -                }
    -                writer.WriteEndObject();
    -            }
    -            if (Optional.IsDefined(TargetInfo))
    -            {
    -                writer.WritePropertyName("targetInfo"u8);
    -                writer.WriteObjectValue(TargetInfo, options);
    -            }
    -            if (Optional.IsDefined(RecoveryMode))
    -            {
    -                writer.WritePropertyName("recoveryMode"u8);
    -                writer.WriteStringValue(RecoveryMode.Value.ToString());
    -            }
    -            if (Optional.IsDefined(TargetResourceGroupName))
    -            {
    -                writer.WritePropertyName("targetResourceGroupName"u8);
    -                writer.WriteStringValue(TargetResourceGroupName);
    -            }
    -            if (Optional.IsDefined(UserAssignedManagedIdentityDetails))
    -            {
    -                writer.WritePropertyName("userAssignedManagedIdentityDetails"u8);
    -                writer.WriteObjectValue(UserAssignedManagedIdentityDetails, options);
    -            }
    -            if (Optional.IsDefined(SnapshotRestoreParameters))
    -            {
    -                writer.WritePropertyName("snapshotRestoreParameters"u8);
    -                writer.WriteObjectValue(SnapshotRestoreParameters, options);
    -            }
    -            if (Optional.IsDefined(TargetVirtualMachineId))
    -            {
    -                writer.WritePropertyName("targetVirtualMachineId"u8);
    -                writer.WriteStringValue(TargetVirtualMachineId);
    -            }
    -            writer.WritePropertyName("objectType"u8);
    -            writer.WriteStringValue(ObjectType);
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             WorkloadSapHanaRestoreWithRehydrateContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSqlAutoProtectionIntent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSqlAutoProtectionIntent.Serialization.cs
    index 30a0eb9eda75..7ae1f4a6190d 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSqlAutoProtectionIntent.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSqlAutoProtectionIntent.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class WorkloadSqlAutoProtectionIntent : IUtf8JsonSerializable, IJ
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,55 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo
                     throw new FormatException($"The model {nameof(WorkloadSqlAutoProtectionIntent)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(WorkloadItemType))
                 {
                     writer.WritePropertyName("workloadItemType"u8);
                     writer.WriteStringValue(WorkloadItemType.Value.ToString());
                 }
    -            writer.WritePropertyName("protectionIntentItemType"u8);
    -            writer.WriteStringValue(ProtectionIntentItemType.ToString());
    -            if (Optional.IsDefined(BackupManagementType))
    -            {
    -                writer.WritePropertyName("backupManagementType"u8);
    -                writer.WriteStringValue(BackupManagementType.Value.ToString());
    -            }
    -            if (Optional.IsDefined(SourceResourceId))
    -            {
    -                writer.WritePropertyName("sourceResourceId"u8);
    -                writer.WriteStringValue(SourceResourceId);
    -            }
    -            if (Optional.IsDefined(ItemId))
    -            {
    -                writer.WritePropertyName("itemId"u8);
    -                writer.WriteStringValue(ItemId);
    -            }
    -            if (Optional.IsDefined(PolicyId))
    -            {
    -                writer.WritePropertyName("policyId"u8);
    -                writer.WriteStringValue(PolicyId);
    -            }
    -            if (Optional.IsDefined(ProtectionState))
    -            {
    -                writer.WritePropertyName("protectionState"u8);
    -                writer.WriteStringValue(ProtectionState.Value.ToString());
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             WorkloadSqlAutoProtectionIntent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSqlPointInTimeRecoveryPoint.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSqlPointInTimeRecoveryPoint.Serialization.cs
    index c273a80fa8a4..5e35c033d075 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSqlPointInTimeRecoveryPoint.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSqlPointInTimeRecoveryPoint.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class WorkloadSqlPointInTimeRecoveryPoint : IUtf8JsonSerializable
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer
                     throw new FormatException($"The model {nameof(WorkloadSqlPointInTimeRecoveryPoint)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsCollectionDefined(TimeRanges))
                 {
                     writer.WritePropertyName("timeRanges"u8);
    @@ -36,65 +45,6 @@ void IJsonModel.Write(Utf8JsonWriter writer
                     }
                     writer.WriteEndArray();
                 }
    -            if (Optional.IsDefined(ExtendedInfo))
    -            {
    -                writer.WritePropertyName("extendedInfo"u8);
    -                writer.WriteObjectValue(ExtendedInfo, options);
    -            }
    -            if (Optional.IsDefined(RecoveryPointCreatedOn))
    -            {
    -                writer.WritePropertyName("recoveryPointTimeInUTC"u8);
    -                writer.WriteStringValue(RecoveryPointCreatedOn.Value, "O");
    -            }
    -            if (Optional.IsDefined(RestorePointType))
    -            {
    -                writer.WritePropertyName("type"u8);
    -                writer.WriteStringValue(RestorePointType.Value.ToString());
    -            }
    -            if (Optional.IsCollectionDefined(RecoveryPointTierDetails))
    -            {
    -                writer.WritePropertyName("recoveryPointTierDetails"u8);
    -                writer.WriteStartArray();
    -                foreach (var item in RecoveryPointTierDetails)
    -                {
    -                    writer.WriteObjectValue(item, options);
    -                }
    -                writer.WriteEndArray();
    -            }
    -            if (Optional.IsCollectionDefined(RecoveryPointMoveReadinessInfo))
    -            {
    -                writer.WritePropertyName("recoveryPointMoveReadinessInfo"u8);
    -                writer.WriteStartObject();
    -                foreach (var item in RecoveryPointMoveReadinessInfo)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -                    writer.WriteObjectValue(item.Value, options);
    -                }
    -                writer.WriteEndObject();
    -            }
    -            if (Optional.IsDefined(RecoveryPointProperties))
    -            {
    -                writer.WritePropertyName("recoveryPointProperties"u8);
    -                writer.WriteObjectValue(RecoveryPointProperties, options);
    -            }
    -            writer.WritePropertyName("objectType"u8);
    -            writer.WriteStringValue(ObjectType);
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             WorkloadSqlPointInTimeRecoveryPoint IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSqlPointInTimeRestoreContent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSqlPointInTimeRestoreContent.Serialization.cs
    index 44b3335ad74f..b768b07b3371 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSqlPointInTimeRestoreContent.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSqlPointInTimeRestoreContent.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class WorkloadSqlPointInTimeRestoreContent : IUtf8JsonSerializabl
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,101 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter write
                     throw new FormatException($"The model {nameof(WorkloadSqlPointInTimeRestoreContent)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(PointInTime))
                 {
                     writer.WritePropertyName("pointInTime"u8);
                     writer.WriteStringValue(PointInTime.Value, "O");
                 }
    -            if (Optional.IsDefined(ShouldUseAlternateTargetLocation))
    -            {
    -                writer.WritePropertyName("shouldUseAlternateTargetLocation"u8);
    -                writer.WriteBooleanValue(ShouldUseAlternateTargetLocation.Value);
    -            }
    -            if (Optional.IsDefined(IsNonRecoverable))
    -            {
    -                writer.WritePropertyName("isNonRecoverable"u8);
    -                writer.WriteBooleanValue(IsNonRecoverable.Value);
    -            }
    -            if (Optional.IsCollectionDefined(AlternateDirectoryPaths))
    -            {
    -                writer.WritePropertyName("alternateDirectoryPaths"u8);
    -                writer.WriteStartArray();
    -                foreach (var item in AlternateDirectoryPaths)
    -                {
    -                    writer.WriteObjectValue(item, options);
    -                }
    -                writer.WriteEndArray();
    -            }
    -            if (Optional.IsDefined(RecoveryType))
    -            {
    -                writer.WritePropertyName("recoveryType"u8);
    -                writer.WriteStringValue(RecoveryType.Value.ToString());
    -            }
    -            if (Optional.IsDefined(SourceResourceId))
    -            {
    -                writer.WritePropertyName("sourceResourceId"u8);
    -                writer.WriteStringValue(SourceResourceId);
    -            }
    -            if (Optional.IsCollectionDefined(PropertyBag))
    -            {
    -                writer.WritePropertyName("propertyBag"u8);
    -                writer.WriteStartObject();
    -                foreach (var item in PropertyBag)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -                    writer.WriteStringValue(item.Value);
    -                }
    -                writer.WriteEndObject();
    -            }
    -            if (Optional.IsDefined(TargetInfo))
    -            {
    -                writer.WritePropertyName("targetInfo"u8);
    -                writer.WriteObjectValue(TargetInfo, options);
    -            }
    -            if (Optional.IsDefined(RecoveryMode))
    -            {
    -                writer.WritePropertyName("recoveryMode"u8);
    -                writer.WriteStringValue(RecoveryMode.Value.ToString());
    -            }
    -            if (Optional.IsDefined(TargetResourceGroupName))
    -            {
    -                writer.WritePropertyName("targetResourceGroupName"u8);
    -                writer.WriteStringValue(TargetResourceGroupName);
    -            }
    -            if (Optional.IsDefined(UserAssignedManagedIdentityDetails))
    -            {
    -                writer.WritePropertyName("userAssignedManagedIdentityDetails"u8);
    -                writer.WriteObjectValue(UserAssignedManagedIdentityDetails, options);
    -            }
    -            if (Optional.IsDefined(SnapshotRestoreParameters))
    -            {
    -                writer.WritePropertyName("snapshotRestoreParameters"u8);
    -                writer.WriteObjectValue(SnapshotRestoreParameters, options);
    -            }
    -            if (Optional.IsDefined(TargetVirtualMachineId))
    -            {
    -                writer.WritePropertyName("targetVirtualMachineId"u8);
    -                writer.WriteStringValue(TargetVirtualMachineId);
    -            }
    -            writer.WritePropertyName("objectType"u8);
    -            writer.WriteStringValue(ObjectType);
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             WorkloadSqlPointInTimeRestoreContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSqlPointInTimeRestoreWithRehydrateContent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSqlPointInTimeRestoreWithRehydrateContent.Serialization.cs
    index 79889dc76ed1..87ca3ec46616 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSqlPointInTimeRestoreWithRehydrateContent.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSqlPointInTimeRestoreWithRehydrateContent.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class WorkloadSqlPointInTimeRestoreWithRehydrateContent : IUtf8Js
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,106 +34,12 @@ void IJsonModel.Write(Utf8Jso
                     throw new FormatException($"The model {nameof(WorkloadSqlPointInTimeRestoreWithRehydrateContent)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(RecoveryPointRehydrationInfo))
                 {
                     writer.WritePropertyName("recoveryPointRehydrationInfo"u8);
                     writer.WriteObjectValue(RecoveryPointRehydrationInfo, options);
                 }
    -            if (Optional.IsDefined(PointInTime))
    -            {
    -                writer.WritePropertyName("pointInTime"u8);
    -                writer.WriteStringValue(PointInTime.Value, "O");
    -            }
    -            if (Optional.IsDefined(ShouldUseAlternateTargetLocation))
    -            {
    -                writer.WritePropertyName("shouldUseAlternateTargetLocation"u8);
    -                writer.WriteBooleanValue(ShouldUseAlternateTargetLocation.Value);
    -            }
    -            if (Optional.IsDefined(IsNonRecoverable))
    -            {
    -                writer.WritePropertyName("isNonRecoverable"u8);
    -                writer.WriteBooleanValue(IsNonRecoverable.Value);
    -            }
    -            if (Optional.IsCollectionDefined(AlternateDirectoryPaths))
    -            {
    -                writer.WritePropertyName("alternateDirectoryPaths"u8);
    -                writer.WriteStartArray();
    -                foreach (var item in AlternateDirectoryPaths)
    -                {
    -                    writer.WriteObjectValue(item, options);
    -                }
    -                writer.WriteEndArray();
    -            }
    -            if (Optional.IsDefined(RecoveryType))
    -            {
    -                writer.WritePropertyName("recoveryType"u8);
    -                writer.WriteStringValue(RecoveryType.Value.ToString());
    -            }
    -            if (Optional.IsDefined(SourceResourceId))
    -            {
    -                writer.WritePropertyName("sourceResourceId"u8);
    -                writer.WriteStringValue(SourceResourceId);
    -            }
    -            if (Optional.IsCollectionDefined(PropertyBag))
    -            {
    -                writer.WritePropertyName("propertyBag"u8);
    -                writer.WriteStartObject();
    -                foreach (var item in PropertyBag)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -                    writer.WriteStringValue(item.Value);
    -                }
    -                writer.WriteEndObject();
    -            }
    -            if (Optional.IsDefined(TargetInfo))
    -            {
    -                writer.WritePropertyName("targetInfo"u8);
    -                writer.WriteObjectValue(TargetInfo, options);
    -            }
    -            if (Optional.IsDefined(RecoveryMode))
    -            {
    -                writer.WritePropertyName("recoveryMode"u8);
    -                writer.WriteStringValue(RecoveryMode.Value.ToString());
    -            }
    -            if (Optional.IsDefined(TargetResourceGroupName))
    -            {
    -                writer.WritePropertyName("targetResourceGroupName"u8);
    -                writer.WriteStringValue(TargetResourceGroupName);
    -            }
    -            if (Optional.IsDefined(UserAssignedManagedIdentityDetails))
    -            {
    -                writer.WritePropertyName("userAssignedManagedIdentityDetails"u8);
    -                writer.WriteObjectValue(UserAssignedManagedIdentityDetails, options);
    -            }
    -            if (Optional.IsDefined(SnapshotRestoreParameters))
    -            {
    -                writer.WritePropertyName("snapshotRestoreParameters"u8);
    -                writer.WriteObjectValue(SnapshotRestoreParameters, options);
    -            }
    -            if (Optional.IsDefined(TargetVirtualMachineId))
    -            {
    -                writer.WritePropertyName("targetVirtualMachineId"u8);
    -                writer.WriteStringValue(TargetVirtualMachineId);
    -            }
    -            writer.WritePropertyName("objectType"u8);
    -            writer.WriteStringValue(ObjectType);
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             WorkloadSqlPointInTimeRestoreWithRehydrateContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSqlRecoveryPoint.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSqlRecoveryPoint.Serialization.cs
    index fa98dcc566a8..2495d855b464 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSqlRecoveryPoint.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSqlRecoveryPoint.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class WorkloadSqlRecoveryPoint : IUtf8JsonSerializable, IJsonMode
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,66 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead
                     throw new FormatException($"The model {nameof(WorkloadSqlRecoveryPoint)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(ExtendedInfo))
                 {
                     writer.WritePropertyName("extendedInfo"u8);
                     writer.WriteObjectValue(ExtendedInfo, options);
                 }
    -            if (Optional.IsDefined(RecoveryPointCreatedOn))
    -            {
    -                writer.WritePropertyName("recoveryPointTimeInUTC"u8);
    -                writer.WriteStringValue(RecoveryPointCreatedOn.Value, "O");
    -            }
    -            if (Optional.IsDefined(RestorePointType))
    -            {
    -                writer.WritePropertyName("type"u8);
    -                writer.WriteStringValue(RestorePointType.Value.ToString());
    -            }
    -            if (Optional.IsCollectionDefined(RecoveryPointTierDetails))
    -            {
    -                writer.WritePropertyName("recoveryPointTierDetails"u8);
    -                writer.WriteStartArray();
    -                foreach (var item in RecoveryPointTierDetails)
    -                {
    -                    writer.WriteObjectValue(item, options);
    -                }
    -                writer.WriteEndArray();
    -            }
    -            if (Optional.IsCollectionDefined(RecoveryPointMoveReadinessInfo))
    -            {
    -                writer.WritePropertyName("recoveryPointMoveReadinessInfo"u8);
    -                writer.WriteStartObject();
    -                foreach (var item in RecoveryPointMoveReadinessInfo)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -                    writer.WriteObjectValue(item.Value, options);
    -                }
    -                writer.WriteEndObject();
    -            }
    -            if (Optional.IsDefined(RecoveryPointProperties))
    -            {
    -                writer.WritePropertyName("recoveryPointProperties"u8);
    -                writer.WriteObjectValue(RecoveryPointProperties, options);
    -            }
    -            writer.WritePropertyName("objectType"u8);
    -            writer.WriteStringValue(ObjectType);
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             WorkloadSqlRecoveryPoint IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSqlRecoveryPointExtendedInfo.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSqlRecoveryPointExtendedInfo.Serialization.cs
    index cff1846b22b2..21bd42d4f637 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSqlRecoveryPointExtendedInfo.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSqlRecoveryPointExtendedInfo.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class WorkloadSqlRecoveryPointExtendedInfo : IUtf8JsonSerializabl
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter write
                     throw new FormatException($"The model {nameof(WorkloadSqlRecoveryPointExtendedInfo)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(DataDirectoryInfoCapturedOn))
                 {
                     writer.WritePropertyName("dataDirectoryTimeInUTC"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter write
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             WorkloadSqlRecoveryPointExtendedInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSqlRestoreContent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSqlRestoreContent.Serialization.cs
    index 37b04f806d5e..274eb6029fbe 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSqlRestoreContent.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSqlRestoreContent.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class WorkloadSqlRestoreContent : IUtf8JsonSerializable, IJsonMod
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea
                     throw new FormatException($"The model {nameof(WorkloadSqlRestoreContent)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(ShouldUseAlternateTargetLocation))
                 {
                     writer.WritePropertyName("shouldUseAlternateTargetLocation"u8);
    @@ -46,75 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea
                     }
                     writer.WriteEndArray();
                 }
    -            if (Optional.IsDefined(RecoveryType))
    -            {
    -                writer.WritePropertyName("recoveryType"u8);
    -                writer.WriteStringValue(RecoveryType.Value.ToString());
    -            }
    -            if (Optional.IsDefined(SourceResourceId))
    -            {
    -                writer.WritePropertyName("sourceResourceId"u8);
    -                writer.WriteStringValue(SourceResourceId);
    -            }
    -            if (Optional.IsCollectionDefined(PropertyBag))
    -            {
    -                writer.WritePropertyName("propertyBag"u8);
    -                writer.WriteStartObject();
    -                foreach (var item in PropertyBag)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -                    writer.WriteStringValue(item.Value);
    -                }
    -                writer.WriteEndObject();
    -            }
    -            if (Optional.IsDefined(TargetInfo))
    -            {
    -                writer.WritePropertyName("targetInfo"u8);
    -                writer.WriteObjectValue(TargetInfo, options);
    -            }
    -            if (Optional.IsDefined(RecoveryMode))
    -            {
    -                writer.WritePropertyName("recoveryMode"u8);
    -                writer.WriteStringValue(RecoveryMode.Value.ToString());
    -            }
    -            if (Optional.IsDefined(TargetResourceGroupName))
    -            {
    -                writer.WritePropertyName("targetResourceGroupName"u8);
    -                writer.WriteStringValue(TargetResourceGroupName);
    -            }
    -            if (Optional.IsDefined(UserAssignedManagedIdentityDetails))
    -            {
    -                writer.WritePropertyName("userAssignedManagedIdentityDetails"u8);
    -                writer.WriteObjectValue(UserAssignedManagedIdentityDetails, options);
    -            }
    -            if (Optional.IsDefined(SnapshotRestoreParameters))
    -            {
    -                writer.WritePropertyName("snapshotRestoreParameters"u8);
    -                writer.WriteObjectValue(SnapshotRestoreParameters, options);
    -            }
    -            if (Optional.IsDefined(TargetVirtualMachineId))
    -            {
    -                writer.WritePropertyName("targetVirtualMachineId"u8);
    -                writer.WriteStringValue(TargetVirtualMachineId);
    -            }
    -            writer.WritePropertyName("objectType"u8);
    -            writer.WriteStringValue(ObjectType);
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             WorkloadSqlRestoreContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSqlRestoreWithRehydrateContent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSqlRestoreWithRehydrateContent.Serialization.cs
    index 6f56c4f3f86f..911c75129788 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSqlRestoreWithRehydrateContent.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSqlRestoreWithRehydrateContent.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class WorkloadSqlRestoreWithRehydrateContent : IUtf8JsonSerializa
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,101 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter wri
                     throw new FormatException($"The model {nameof(WorkloadSqlRestoreWithRehydrateContent)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(RecoveryPointRehydrationInfo))
                 {
                     writer.WritePropertyName("recoveryPointRehydrationInfo"u8);
                     writer.WriteObjectValue(RecoveryPointRehydrationInfo, options);
                 }
    -            if (Optional.IsDefined(ShouldUseAlternateTargetLocation))
    -            {
    -                writer.WritePropertyName("shouldUseAlternateTargetLocation"u8);
    -                writer.WriteBooleanValue(ShouldUseAlternateTargetLocation.Value);
    -            }
    -            if (Optional.IsDefined(IsNonRecoverable))
    -            {
    -                writer.WritePropertyName("isNonRecoverable"u8);
    -                writer.WriteBooleanValue(IsNonRecoverable.Value);
    -            }
    -            if (Optional.IsCollectionDefined(AlternateDirectoryPaths))
    -            {
    -                writer.WritePropertyName("alternateDirectoryPaths"u8);
    -                writer.WriteStartArray();
    -                foreach (var item in AlternateDirectoryPaths)
    -                {
    -                    writer.WriteObjectValue(item, options);
    -                }
    -                writer.WriteEndArray();
    -            }
    -            if (Optional.IsDefined(RecoveryType))
    -            {
    -                writer.WritePropertyName("recoveryType"u8);
    -                writer.WriteStringValue(RecoveryType.Value.ToString());
    -            }
    -            if (Optional.IsDefined(SourceResourceId))
    -            {
    -                writer.WritePropertyName("sourceResourceId"u8);
    -                writer.WriteStringValue(SourceResourceId);
    -            }
    -            if (Optional.IsCollectionDefined(PropertyBag))
    -            {
    -                writer.WritePropertyName("propertyBag"u8);
    -                writer.WriteStartObject();
    -                foreach (var item in PropertyBag)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -                    writer.WriteStringValue(item.Value);
    -                }
    -                writer.WriteEndObject();
    -            }
    -            if (Optional.IsDefined(TargetInfo))
    -            {
    -                writer.WritePropertyName("targetInfo"u8);
    -                writer.WriteObjectValue(TargetInfo, options);
    -            }
    -            if (Optional.IsDefined(RecoveryMode))
    -            {
    -                writer.WritePropertyName("recoveryMode"u8);
    -                writer.WriteStringValue(RecoveryMode.Value.ToString());
    -            }
    -            if (Optional.IsDefined(TargetResourceGroupName))
    -            {
    -                writer.WritePropertyName("targetResourceGroupName"u8);
    -                writer.WriteStringValue(TargetResourceGroupName);
    -            }
    -            if (Optional.IsDefined(UserAssignedManagedIdentityDetails))
    -            {
    -                writer.WritePropertyName("userAssignedManagedIdentityDetails"u8);
    -                writer.WriteObjectValue(UserAssignedManagedIdentityDetails, options);
    -            }
    -            if (Optional.IsDefined(SnapshotRestoreParameters))
    -            {
    -                writer.WritePropertyName("snapshotRestoreParameters"u8);
    -                writer.WriteObjectValue(SnapshotRestoreParameters, options);
    -            }
    -            if (Optional.IsDefined(TargetVirtualMachineId))
    -            {
    -                writer.WritePropertyName("targetVirtualMachineId"u8);
    -                writer.WriteStringValue(TargetVirtualMachineId);
    -            }
    -            writer.WritePropertyName("objectType"u8);
    -            writer.WriteStringValue(ObjectType);
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             WorkloadSqlRestoreWithRehydrateContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/YearlyRetentionSchedule.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/YearlyRetentionSchedule.Serialization.cs
    index 7a4507f55c53..4c35c8ce6808 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/YearlyRetentionSchedule.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/YearlyRetentionSchedule.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class YearlyRetentionSchedule : IUtf8JsonSerializable, IJsonModel
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade
                     throw new FormatException($"The model {nameof(YearlyRetentionSchedule)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(RetentionScheduleFormatType))
                 {
                     writer.WritePropertyName("retentionScheduleFormatType"u8);
    @@ -81,7 +89,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             YearlyRetentionSchedule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/ResourceGuardProxyData.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/ResourceGuardProxyData.Serialization.cs
    index 39dbc9bc2d97..348ca2013596 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/ResourceGuardProxyData.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/ResourceGuardProxyData.Serialization.cs
    @@ -20,6 +20,15 @@ public partial class ResourceGuardProxyData : IUtf8JsonSerializable, IJsonModel<
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader
                     throw new FormatException($"The model {nameof(ResourceGuardProxyData)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(Properties))
                 {
                     writer.WritePropertyName("properties"u8);
    @@ -38,55 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader
                     writer.WritePropertyName("eTag"u8);
                     writer.WriteStringValue(ETag.Value.ToString());
                 }
    -            if (Optional.IsCollectionDefined(Tags))
    -            {
    -                writer.WritePropertyName("tags"u8);
    -                writer.WriteStartObject();
    -                foreach (var item in Tags)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -                    writer.WriteStringValue(item.Value);
    -                }
    -                writer.WriteEndObject();
    -            }
    -            writer.WritePropertyName("location"u8);
    -            writer.WriteStringValue(Location);
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("id"u8);
    -                writer.WriteStringValue(Id);
    -            }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("name"u8);
    -                writer.WriteStringValue(Name);
    -            }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("type"u8);
    -                writer.WriteStringValue(ResourceType);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(SystemData))
    -            {
    -                writer.WritePropertyName("systemData"u8);
    -                JsonSerializer.Serialize(writer, SystemData);
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             ResourceGuardProxyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/autorest.md b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/autorest.md
    index 9b29b8157fca..3a51d3c0cf4b 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/autorest.md
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/autorest.md
    @@ -19,6 +19,7 @@ skip-csproj: true
     modelerfour:
       flatten-payloads: false
     use-model-reader-writer: true
    +use-write-core: true
     
     rename-mapping:
       Job: BackupGenericJob
    diff --git a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/CHANGELOG.md b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/CHANGELOG.md
    index 6f5813790209..6f8726d1627c 100644
    --- a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/CHANGELOG.md
    +++ b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/CHANGELOG.md
    @@ -1,17 +1,22 @@
     # Release History
     
    -## 1.2.0-beta.1 (Unreleased)
    +## 1.2.0-beta.2 (Unreleased)
     
     ### Features Added
     
    -- Enable the new model serialization by using the System.ClientModel, refer this [document](https://aka.ms/azsdk/net/mrw) for more details.
    -
     ### Breaking Changes
     
     ### Bugs Fixed
     
     ### Other Changes
     
    +## 1.2.0-beta.1 (2024-10-15)
    +
    +### Features Added
    +
    +- Enable the new model serialization by using the System.ClientModel, refer this [document](https://aka.ms/azsdk/net/mrw) for more details.
    +- Exposed `JsonModelWriteCore` for model serialization procedure.
    +
     ## 1.1.1 (2023-11-30)
     
     ### Features Added
    diff --git a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/api/Azure.ResourceManager.RecoveryServices.netstandard2.0.cs b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/api/Azure.ResourceManager.RecoveryServices.netstandard2.0.cs
    index 2d7bac9c2f4b..89bd33075e7e 100644
    --- a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/api/Azure.ResourceManager.RecoveryServices.netstandard2.0.cs
    +++ b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/api/Azure.ResourceManager.RecoveryServices.netstandard2.0.cs
    @@ -51,6 +51,7 @@ internal RecoveryServicesPrivateLinkResourceData() { }
             public string GroupId { get { throw null; } }
             public System.Collections.Generic.IReadOnlyList RequiredMembers { get { throw null; } }
             public System.Collections.Generic.IReadOnlyList RequiredZoneNames { get { throw null; } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.RecoveryServices.RecoveryServicesPrivateLinkResourceData 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.RecoveryServices.RecoveryServicesPrivateLinkResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -81,6 +82,7 @@ public RecoveryServicesVaultData(Azure.Core.AzureLocation location) { }
             public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } }
             public Azure.ResourceManager.RecoveryServices.Models.RecoveryServicesVaultProperties Properties { get { throw null; } set { } }
             public Azure.ResourceManager.RecoveryServices.Models.RecoveryServicesSku Sku { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.RecoveryServices.RecoveryServicesVaultData 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.RecoveryServices.RecoveryServicesVaultData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -95,6 +97,7 @@ public RecoveryServicesVaultExtendedInfoData() { }
             public string EncryptionKeyThumbprint { get { throw null; } set { } }
             public Azure.ETag? ETag { get { throw null; } set { } }
             public string IntegrityKey { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.RecoveryServices.RecoveryServicesVaultExtendedInfoData 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.RecoveryServices.RecoveryServicesVaultExtendedInfoData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -235,6 +238,7 @@ public partial class CapabilitiesResult : Azure.ResourceManager.RecoveryServices
         {
             public CapabilitiesResult(Azure.Core.ResourceType resourceCapabilitiesBaseType) : base (default(Azure.Core.ResourceType)) { }
             public System.Collections.Generic.IList CapabilitiesResultDnsZones { get { throw null; } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.RecoveryServices.Models.CapabilitiesResult 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.RecoveryServices.Models.CapabilitiesResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -246,6 +250,7 @@ public partial class CmkKekIdentity : 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.RecoveryServices.Models.CmkKekIdentity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -293,6 +298,7 @@ public partial class DnsZone : 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.RecoveryServices.Models.DnsZone System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -303,6 +309,7 @@ public partial class DnsZoneResult : Azure.ResourceManager.RecoveryServices.Mode
         {
             public DnsZoneResult() { }
             public System.Collections.Generic.IList RequiredZoneNames { get { throw null; } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.RecoveryServices.Models.DnsZoneResult 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.RecoveryServices.Models.DnsZoneResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -370,6 +377,7 @@ public partial class RawCertificateData : System.ClientModel.Primitives.IJsonMod
             public RawCertificateData() { }
             public Azure.ResourceManager.RecoveryServices.Models.RecoveryServicesAuthType? AuthType { get { throw null; } set { } }
             public byte[] Certificate { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.RecoveryServices.Models.RawCertificateData 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.RecoveryServices.Models.RawCertificateData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -419,6 +427,7 @@ public partial class RecoveryServicesCertificateContent : System.ClientModel.Pri
         {
             public RecoveryServicesCertificateContent() { }
             public Azure.ResourceManager.RecoveryServices.Models.RawCertificateData Properties { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.RecoveryServices.Models.RecoveryServicesCertificateContent 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.RecoveryServices.Models.RecoveryServicesCertificateContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -430,6 +439,7 @@ public partial class RecoveryServicesNameAvailabilityContent : System.ClientMode
             public RecoveryServicesNameAvailabilityContent() { }
             public string Name { get { throw null; } set { } }
             public Azure.Core.ResourceType? ResourceType { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.RecoveryServices.Models.RecoveryServicesNameAvailabilityContent 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.RecoveryServices.Models.RecoveryServicesNameAvailabilityContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -442,6 +452,7 @@ internal RecoveryServicesNameAvailabilityResult() { }
             public bool? IsNameAvailable { get { throw null; } }
             public string Message { get { throw null; } }
             public string Reason { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.RecoveryServices.Models.RecoveryServicesNameAvailabilityResult 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.RecoveryServices.Models.RecoveryServicesNameAvailabilityResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -455,6 +466,7 @@ internal RecoveryServicesPrivateEndpointConnection() { }
             public Azure.Core.ResourceIdentifier PrivateEndpointId { get { throw null; } }
             public Azure.ResourceManager.RecoveryServices.Models.RecoveryServicesPrivateLinkServiceConnectionState PrivateLinkServiceConnectionState { get { throw null; } }
             public Azure.ResourceManager.RecoveryServices.Models.RecoveryServicesPrivateEndpointConnectionProvisioningState? ProvisioningState { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.RecoveryServices.Models.RecoveryServicesPrivateEndpointConnection 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.RecoveryServices.Models.RecoveryServicesPrivateEndpointConnection System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -506,6 +518,7 @@ public partial class RecoveryServicesPrivateEndpointConnectionVaultProperties :
             internal RecoveryServicesPrivateEndpointConnectionVaultProperties() { }
             public Azure.Core.AzureLocation? Location { get { throw null; } }
             public Azure.ResourceManager.RecoveryServices.Models.RecoveryServicesPrivateEndpointConnection Properties { get { throw null; } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.RecoveryServices.Models.RecoveryServicesPrivateEndpointConnectionVaultProperties 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.RecoveryServices.Models.RecoveryServicesPrivateEndpointConnectionVaultProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -518,6 +531,7 @@ internal RecoveryServicesPrivateLinkServiceConnectionState() { }
             public string ActionsRequired { get { throw null; } }
             public string Description { get { throw null; } }
             public Azure.ResourceManager.RecoveryServices.Models.RecoveryServicesPrivateEndpointConnectionStatus? Status { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.RecoveryServices.Models.RecoveryServicesPrivateLinkServiceConnectionState 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.RecoveryServices.Models.RecoveryServicesPrivateLinkServiceConnectionState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -530,6 +544,7 @@ public RecoveryServicesSecuritySettings() { }
             public Azure.ResourceManager.RecoveryServices.Models.ImmutabilityState? ImmutabilityState { get { throw null; } set { } }
             public Azure.ResourceManager.RecoveryServices.Models.MultiUserAuthorization? MultiUserAuthorization { get { throw null; } }
             public Azure.ResourceManager.RecoveryServices.Models.RecoveryServicesSoftDeleteSettings SoftDeleteSettings { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.RecoveryServices.Models.RecoveryServicesSecuritySettings 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.RecoveryServices.Models.RecoveryServicesSecuritySettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -544,6 +559,7 @@ public RecoveryServicesSku(Azure.ResourceManager.RecoveryServices.Models.Recover
             public Azure.ResourceManager.RecoveryServices.Models.RecoveryServicesSkuName Name { get { throw null; } set { } }
             public string Size { get { throw null; } set { } }
             public string Tier { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.RecoveryServices.Models.RecoveryServicesSku 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.RecoveryServices.Models.RecoveryServicesSku System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -573,6 +589,7 @@ public partial class RecoveryServicesSoftDeleteSettings : System.ClientModel.Pri
             public RecoveryServicesSoftDeleteSettings() { }
             public int? SoftDeleteRetentionPeriodInDays { get { throw null; } set { } }
             public Azure.ResourceManager.RecoveryServices.Models.RecoveryServicesSoftDeleteState? SoftDeleteState { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.RecoveryServices.Models.RecoveryServicesSoftDeleteSettings 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.RecoveryServices.Models.RecoveryServicesSoftDeleteSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -606,6 +623,7 @@ public RecoveryServicesVaultPatch(Azure.Core.AzureLocation location) { }
             public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } }
             public Azure.ResourceManager.RecoveryServices.Models.RecoveryServicesVaultProperties Properties { get { throw null; } set { } }
             public Azure.ResourceManager.RecoveryServices.Models.RecoveryServicesSku Sku { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.RecoveryServices.Models.RecoveryServicesVaultPatch 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.RecoveryServices.Models.RecoveryServicesVaultPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -632,6 +650,7 @@ public RecoveryServicesVaultProperties() { }
             public Azure.ResourceManager.RecoveryServices.Models.SecureScoreLevel? SecureScore { get { throw null; } }
             public Azure.ResourceManager.RecoveryServices.Models.RecoveryServicesSecuritySettings SecuritySettings { get { throw null; } set { } }
             public Azure.ResourceManager.RecoveryServices.Models.VaultUpgradeDetails UpgradeDetails { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.RecoveryServices.Models.RecoveryServicesVaultProperties 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.RecoveryServices.Models.RecoveryServicesVaultProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -644,6 +663,7 @@ internal ReplicationJobSummary() { }
             public int? FailedJobs { get { throw null; } }
             public int? InProgressJobs { get { throw null; } }
             public int? SuspendedJobs { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.RecoveryServices.Models.ReplicationJobSummary 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.RecoveryServices.Models.ReplicationJobSummary System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -659,6 +679,7 @@ internal ReplicationUsage() { }
             public int? RecoveryPlanCount { get { throw null; } }
             public int? RecoveryServicesProviderAuthType { get { throw null; } }
             public int? RegisteredServersCount { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.RecoveryServices.Models.ReplicationUsage 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.RecoveryServices.Models.ReplicationUsage System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -669,6 +690,7 @@ public partial class ResourceCapabilities : Azure.ResourceManager.RecoveryServic
         {
             public ResourceCapabilities(Azure.Core.ResourceType resourceCapabilitiesBaseType) : base (default(Azure.Core.ResourceType)) { }
             public System.Collections.Generic.IList CapabilitiesDnsZones { get { throw null; } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.RecoveryServices.Models.ResourceCapabilities 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.RecoveryServices.Models.ResourceCapabilities System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -679,6 +701,7 @@ public partial class ResourceCapabilitiesBase : System.ClientModel.Primitives.IJ
         {
             public ResourceCapabilitiesBase(Azure.Core.ResourceType resourceCapabilitiesBaseType) { }
             public Azure.Core.ResourceType ResourceCapabilitiesBaseType { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.RecoveryServices.Models.ResourceCapabilitiesBase 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.RecoveryServices.Models.ResourceCapabilitiesBase System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -695,6 +718,7 @@ internal ResourceCertificateAndAadDetails() { }
             public string ServicePrincipalClientId { get { throw null; } }
             public string ServicePrincipalObjectId { get { throw null; } }
             public Azure.Core.ResourceIdentifier ServiceResourceId { get { throw null; } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.RecoveryServices.Models.ResourceCertificateAndAadDetails 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.RecoveryServices.Models.ResourceCertificateAndAadDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -707,6 +731,7 @@ internal ResourceCertificateAndAcsDetails() { }
             public string GlobalAcsHostName { get { throw null; } }
             public string GlobalAcsNamespace { get { throw null; } }
             public string GlobalAcsRPRealm { get { throw null; } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.RecoveryServices.Models.ResourceCertificateAndAcsDetails 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.RecoveryServices.Models.ResourceCertificateAndAcsDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -724,6 +749,7 @@ protected ResourceCertificateDetails() { }
             public System.BinaryData Thumbprint { get { throw null; } }
             public System.DateTimeOffset? ValidEndOn { get { throw null; } }
             public System.DateTimeOffset? ValidStartOn { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.RecoveryServices.Models.ResourceCertificateDetails 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.RecoveryServices.Models.ResourceCertificateDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -799,6 +825,7 @@ public partial class VaultCertificateResult : Azure.ResourceManager.Models.Resou
         {
             internal VaultCertificateResult() { }
             public Azure.ResourceManager.RecoveryServices.Models.ResourceCertificateDetails Properties { get { throw null; } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.RecoveryServices.Models.VaultCertificateResult 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.RecoveryServices.Models.VaultCertificateResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -810,6 +837,7 @@ public partial class VaultMonitoringSettings : System.ClientModel.Primitives.IJs
             public VaultMonitoringSettings() { }
             public Azure.ResourceManager.RecoveryServices.Models.RecoveryServicesAlertsState? AzureMonitorAlertAlertsForAllJobFailures { get { throw null; } set { } }
             public Azure.ResourceManager.RecoveryServices.Models.RecoveryServicesAlertsState? ClassicAlertAlertsForCriticalOperations { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.RecoveryServices.Models.VaultMonitoringSettings 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.RecoveryServices.Models.VaultMonitoringSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -825,6 +853,7 @@ internal VaultMonitoringSummary() { }
             public int? UnHealthyProviderCount { get { throw null; } }
             public int? UnHealthyVmCount { get { throw null; } }
             public int? UnsupportedProviderCount { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.RecoveryServices.Models.VaultMonitoringSummary 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.RecoveryServices.Models.VaultMonitoringSummary System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -855,6 +884,7 @@ public VaultPropertiesEncryption() { }
             public Azure.ResourceManager.RecoveryServices.Models.InfrastructureEncryptionState? InfrastructureEncryption { get { throw null; } set { } }
             public Azure.ResourceManager.RecoveryServices.Models.CmkKekIdentity KekIdentity { get { throw null; } set { } }
             public System.Uri KeyUri { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.RecoveryServices.Models.VaultPropertiesEncryption 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.RecoveryServices.Models.VaultPropertiesEncryption System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -869,6 +899,7 @@ public VaultPropertiesMoveDetails() { }
             public Azure.Core.ResourceIdentifier SourceResourceId { get { throw null; } }
             public System.DateTimeOffset? StartOn { get { throw null; } }
             public Azure.Core.ResourceIdentifier TargetResourceId { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.RecoveryServices.Models.VaultPropertiesMoveDetails 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.RecoveryServices.Models.VaultPropertiesMoveDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -880,6 +911,7 @@ public partial class VaultPropertiesRedundancySettings : System.ClientModel.Prim
             public VaultPropertiesRedundancySettings() { }
             public Azure.ResourceManager.RecoveryServices.Models.CrossRegionRestore? CrossRegionRestore { get { throw null; } }
             public Azure.ResourceManager.RecoveryServices.Models.StandardTierStorageRedundancy? StandardTierStorageRedundancy { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.RecoveryServices.Models.VaultPropertiesRedundancySettings 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.RecoveryServices.Models.VaultPropertiesRedundancySettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -935,6 +967,7 @@ public VaultUpgradeDetails() { }
             public Azure.ResourceManager.RecoveryServices.Models.VaultUpgradeState? Status { get { throw null; } }
             public Azure.ResourceManager.RecoveryServices.Models.VaultUpgradeTriggerType? TriggerType { get { throw null; } }
             public Azure.Core.ResourceIdentifier UpgradedResourceId { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.RecoveryServices.Models.VaultUpgradeDetails 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.RecoveryServices.Models.VaultUpgradeDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -988,6 +1021,7 @@ internal VaultUsage() { }
             public System.DateTimeOffset? NextResetOn { get { throw null; } }
             public string QuotaPeriod { get { throw null; } }
             public Azure.ResourceManager.RecoveryServices.Models.VaultUsageUnit? Unit { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.RecoveryServices.Models.VaultUsage 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.RecoveryServices.Models.VaultUsage System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -999,6 +1033,7 @@ public partial class VaultUsageNameInfo : System.ClientModel.Primitives.IJsonMod
             internal VaultUsageNameInfo() { }
             public string LocalizedValue { get { throw null; } }
             public string Value { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.RecoveryServices.Models.VaultUsageNameInfo 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.RecoveryServices.Models.VaultUsageNameInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    diff --git a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Azure.ResourceManager.RecoveryServices.csproj b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Azure.ResourceManager.RecoveryServices.csproj
    index 9ecc5ffb8483..b2312e8dedab 100644
    --- a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Azure.ResourceManager.RecoveryServices.csproj
    +++ b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Azure.ResourceManager.RecoveryServices.csproj
    @@ -1,6 +1,6 @@
     
       
    -    1.2.0-beta.1
    +    1.2.0-beta.2
         
         1.1.1
         Azure.ResourceManager.RecoveryServices
    diff --git a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/AzureMonitorAlertSettings.Serialization.cs b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/AzureMonitorAlertSettings.Serialization.cs
    index ae452ac36594..895ef9f0a355 100644
    --- a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/AzureMonitorAlertSettings.Serialization.cs
    +++ b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/AzureMonitorAlertSettings.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class AzureMonitorAlertSettings : IUtf8JsonSerializable, IJsonM
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea
                     throw new FormatException($"The model {nameof(AzureMonitorAlertSettings)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(AlertsForAllJobFailures))
                 {
                     writer.WritePropertyName("alertsForAllJobFailures"u8);
    @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             AzureMonitorAlertSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/CapabilitiesProperties.Serialization.cs b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/CapabilitiesProperties.Serialization.cs
    index 3c9dfbae4992..7d56843c3ebd 100644
    --- a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/CapabilitiesProperties.Serialization.cs
    +++ b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/CapabilitiesProperties.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class CapabilitiesProperties : IUtf8JsonSerializable, IJsonMode
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader
                     throw new FormatException($"The model {nameof(CapabilitiesProperties)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsCollectionDefined(DnsZones))
                 {
                     writer.WritePropertyName("dnsZones"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             CapabilitiesProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/CapabilitiesResult.Serialization.cs b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/CapabilitiesResult.Serialization.cs
    index 06eeec7ad020..f09f5607e4c2 100644
    --- a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/CapabilitiesResult.Serialization.cs
    +++ b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/CapabilitiesResult.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class CapabilitiesResult : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,30 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit
                     throw new FormatException($"The model {nameof(CapabilitiesResult)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(Properties))
                 {
                     writer.WritePropertyName("properties"u8);
                     writer.WriteObjectValue(Properties, options);
                 }
    -            writer.WritePropertyName("type"u8);
    -            writer.WriteStringValue(ResourceCapabilitiesBaseType);
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             CapabilitiesResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/CapabilitiesResultProperties.Serialization.cs b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/CapabilitiesResultProperties.Serialization.cs
    index 83d8bf46b3bd..0ae3d15ca13b 100644
    --- a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/CapabilitiesResultProperties.Serialization.cs
    +++ b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/CapabilitiesResultProperties.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class CapabilitiesResultProperties : IUtf8JsonSerializable, IJs
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model
                     throw new FormatException($"The model {nameof(CapabilitiesResultProperties)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsCollectionDefined(DnsZones))
                 {
                     writer.WritePropertyName("dnsZones"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             CapabilitiesResultProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/ClassicAlertSettings.Serialization.cs b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/ClassicAlertSettings.Serialization.cs
    index 7187bc9cf348..07562ed165e8 100644
    --- a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/ClassicAlertSettings.Serialization.cs
    +++ b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/ClassicAlertSettings.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class ClassicAlertSettings : IUtf8JsonSerializable, IJsonModel<
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr
                     throw new FormatException($"The model {nameof(ClassicAlertSettings)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(AlertsForCriticalOperations))
                 {
                     writer.WritePropertyName("alertsForCriticalOperations"u8);
    @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             ClassicAlertSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/CmkKekIdentity.Serialization.cs b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/CmkKekIdentity.Serialization.cs
    index cff90c179668..a2a108070c43 100644
    --- a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/CmkKekIdentity.Serialization.cs
    +++ b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/CmkKekIdentity.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class CmkKekIdentity : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp
                     throw new FormatException($"The model {nameof(CmkKekIdentity)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(UseSystemAssignedIdentity))
                 {
                     writer.WritePropertyName("useSystemAssignedIdentity"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             CmkKekIdentity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/CmkKeyVaultProperties.Serialization.cs b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/CmkKeyVaultProperties.Serialization.cs
    index 6dfaf261bb0b..6d61745c5973 100644
    --- a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/CmkKeyVaultProperties.Serialization.cs
    +++ b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/CmkKeyVaultProperties.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class CmkKeyVaultProperties : IUtf8JsonSerializable, IJsonModel
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW
                     throw new FormatException($"The model {nameof(CmkKeyVaultProperties)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(KeyUri))
                 {
                     writer.WritePropertyName("keyUri"u8);
    @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             CmkKeyVaultProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/CrossSubscriptionRestoreSettings.Serialization.cs b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/CrossSubscriptionRestoreSettings.Serialization.cs
    index 574d636e1326..a50c75a0434c 100644
    --- a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/CrossSubscriptionRestoreSettings.Serialization.cs
    +++ b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/CrossSubscriptionRestoreSettings.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class CrossSubscriptionRestoreSettings : IUtf8JsonSerializable,
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M
                     throw new FormatException($"The model {nameof(CrossSubscriptionRestoreSettings)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(CrossSubscriptionRestoreState))
                 {
                     writer.WritePropertyName("crossSubscriptionRestoreState"u8);
    @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             CrossSubscriptionRestoreSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/DnsZone.Serialization.cs b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/DnsZone.Serialization.cs
    index a3d518367c93..330133c0b451 100644
    --- a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/DnsZone.Serialization.cs
    +++ b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/DnsZone.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DnsZone : IUtf8JsonSerializable, IJsonModel
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions o
                     throw new FormatException($"The model {nameof(DnsZone)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(SubResource))
                 {
                     writer.WritePropertyName("subResource"u8);
    @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions o
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             DnsZone IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/DnsZoneResult.Serialization.cs b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/DnsZoneResult.Serialization.cs
    index a70447ea2725..7d05f7b49525 100644
    --- a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/DnsZoneResult.Serialization.cs
    +++ b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/DnsZoneResult.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DnsZoneResult : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt
                     throw new FormatException($"The model {nameof(DnsZoneResult)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsCollectionDefined(RequiredZoneNames))
                 {
                     writer.WritePropertyName("requiredZoneNames"u8);
    @@ -36,27 +45,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt
                     }
                     writer.WriteEndArray();
                 }
    -            if (Optional.IsDefined(SubResource))
    -            {
    -                writer.WritePropertyName("subResource"u8);
    -                writer.WriteStringValue(SubResource.Value.ToString());
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             DnsZoneResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/ImmutabilitySettings.Serialization.cs b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/ImmutabilitySettings.Serialization.cs
    index 0444e53241f5..5414c9de1171 100644
    --- a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/ImmutabilitySettings.Serialization.cs
    +++ b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/ImmutabilitySettings.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class ImmutabilitySettings : IUtf8JsonSerializable, IJsonModel<
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr
                     throw new FormatException($"The model {nameof(ImmutabilitySettings)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(State))
                 {
                     writer.WritePropertyName("state"u8);
    @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             ImmutabilitySettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/PrivateLinkResources.Serialization.cs b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/PrivateLinkResources.Serialization.cs
    index 5e2da0ede86b..7625a05fc83c 100644
    --- a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/PrivateLinkResources.Serialization.cs
    +++ b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/PrivateLinkResources.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class PrivateLinkResources : IUtf8JsonSerializable, IJsonModel<
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr
                     throw new FormatException($"The model {nameof(PrivateLinkResources)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsCollectionDefined(Value))
                 {
                     writer.WritePropertyName("value"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             PrivateLinkResources IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/RawCertificateData.Serialization.cs b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/RawCertificateData.Serialization.cs
    index 6f97c5377d84..e8f8acb3629c 100644
    --- a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/RawCertificateData.Serialization.cs
    +++ b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/RawCertificateData.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class RawCertificateData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit
                     throw new FormatException($"The model {nameof(RawCertificateData)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(AuthType))
                 {
                     writer.WritePropertyName("authType"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             RawCertificateData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/RecoveryServicesCertificateContent.Serialization.cs b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/RecoveryServicesCertificateContent.Serialization.cs
    index 6d59c1b53e6e..70198b4acda7 100644
    --- a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/RecoveryServicesCertificateContent.Serialization.cs
    +++ b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/RecoveryServicesCertificateContent.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class RecoveryServicesCertificateContent : IUtf8JsonSerializable,
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer,
                     throw new FormatException($"The model {nameof(RecoveryServicesCertificateContent)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(Properties))
                 {
                     writer.WritePropertyName("properties"u8);
    @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer,
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             RecoveryServicesCertificateContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/RecoveryServicesNameAvailabilityContent.Serialization.cs b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/RecoveryServicesNameAvailabilityContent.Serialization.cs
    index fb77b4640afc..cc4c8967db2b 100644
    --- a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/RecoveryServicesNameAvailabilityContent.Serialization.cs
    +++ b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/RecoveryServicesNameAvailabilityContent.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class RecoveryServicesNameAvailabilityContent : IUtf8JsonSerializ
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wr
                     throw new FormatException($"The model {nameof(RecoveryServicesNameAvailabilityContent)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(ResourceType))
                 {
                     writer.WritePropertyName("type"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter wr
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             RecoveryServicesNameAvailabilityContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/RecoveryServicesNameAvailabilityResult.Serialization.cs b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/RecoveryServicesNameAvailabilityResult.Serialization.cs
    index 8b534cb2ef50..7133d2092b88 100644
    --- a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/RecoveryServicesNameAvailabilityResult.Serialization.cs
    +++ b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/RecoveryServicesNameAvailabilityResult.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class RecoveryServicesNameAvailabilityResult : IUtf8JsonSerializa
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wri
                     throw new FormatException($"The model {nameof(RecoveryServicesNameAvailabilityResult)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(IsNameAvailable))
                 {
                     writer.WritePropertyName("nameAvailable"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter wri
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             RecoveryServicesNameAvailabilityResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/RecoveryServicesPrivateEndpointConnection.Serialization.cs b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/RecoveryServicesPrivateEndpointConnection.Serialization.cs
    index b593ba54c2d2..4c787e459390 100644
    --- a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/RecoveryServicesPrivateEndpointConnection.Serialization.cs
    +++ b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/RecoveryServicesPrivateEndpointConnection.Serialization.cs
    @@ -19,6 +19,15 @@ public partial class RecoveryServicesPrivateEndpointConnection : IUtf8JsonSerial
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter
                     throw new FormatException($"The model {nameof(RecoveryServicesPrivateEndpointConnection)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (options.Format != "W" && Optional.IsDefined(ProvisioningState))
                 {
                     writer.WritePropertyName("provisioningState"u8);
    @@ -67,7 +75,6 @@ void IJsonModel.Write(Utf8JsonWriter
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             RecoveryServicesPrivateEndpointConnection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/RecoveryServicesPrivateEndpointConnectionVaultProperties.Serialization.cs b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/RecoveryServicesPrivateEndpointConnectionVaultProperties.Serialization.cs
    index eed435140e55..2425448152dd 100644
    --- a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/RecoveryServicesPrivateEndpointConnectionVaultProperties.Serialization.cs
    +++ b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/RecoveryServicesPrivateEndpointConnectionVaultProperties.Serialization.cs
    @@ -19,6 +19,15 @@ public partial class RecoveryServicesPrivateEndpointConnectionVaultProperties :
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -26,7 +35,7 @@ void IJsonModel.Write(
                     throw new FormatException($"The model {nameof(RecoveryServicesPrivateEndpointConnectionVaultProperties)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (options.Format != "W" && Optional.IsDefined(Properties))
                 {
                     writer.WritePropertyName("properties"u8);
    @@ -37,42 +46,6 @@ void IJsonModel.Write(
                     writer.WritePropertyName("location"u8);
                     writer.WriteStringValue(Location.Value);
                 }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("id"u8);
    -                writer.WriteStringValue(Id);
    -            }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("name"u8);
    -                writer.WriteStringValue(Name);
    -            }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("type"u8);
    -                writer.WriteStringValue(ResourceType);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(SystemData))
    -            {
    -                writer.WritePropertyName("systemData"u8);
    -                JsonSerializer.Serialize(writer, SystemData);
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             RecoveryServicesPrivateEndpointConnectionVaultProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/RecoveryServicesPrivateLinkServiceConnectionState.Serialization.cs b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/RecoveryServicesPrivateLinkServiceConnectionState.Serialization.cs
    index 2c75ab2a1dc1..e05eba991eed 100644
    --- a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/RecoveryServicesPrivateLinkServiceConnectionState.Serialization.cs
    +++ b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/RecoveryServicesPrivateLinkServiceConnectionState.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class RecoveryServicesPrivateLinkServiceConnectionState : IUtf8Js
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8Jso
                     throw new FormatException($"The model {nameof(RecoveryServicesPrivateLinkServiceConnectionState)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (options.Format != "W" && Optional.IsDefined(Status))
                 {
                     writer.WritePropertyName("status"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8Jso
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             RecoveryServicesPrivateLinkServiceConnectionState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/RecoveryServicesSecuritySettings.Serialization.cs b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/RecoveryServicesSecuritySettings.Serialization.cs
    index be91df3b678b..b367f0620ab5 100644
    --- a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/RecoveryServicesSecuritySettings.Serialization.cs
    +++ b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/RecoveryServicesSecuritySettings.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class RecoveryServicesSecuritySettings : IUtf8JsonSerializable, I
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M
                     throw new FormatException($"The model {nameof(RecoveryServicesSecuritySettings)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(ImmutabilitySettings))
                 {
                     writer.WritePropertyName("immutabilitySettings"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             RecoveryServicesSecuritySettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/RecoveryServicesSku.Serialization.cs b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/RecoveryServicesSku.Serialization.cs
    index bd8a34871ea9..28a8bf101335 100644
    --- a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/RecoveryServicesSku.Serialization.cs
    +++ b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/RecoveryServicesSku.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class RecoveryServicesSku : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri
                     throw new FormatException($"The model {nameof(RecoveryServicesSku)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 writer.WritePropertyName("name"u8);
                 writer.WriteStringValue(Name.ToString());
                 if (Optional.IsDefined(Tier))
    @@ -63,7 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             RecoveryServicesSku IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/RecoveryServicesSoftDeleteSettings.Serialization.cs b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/RecoveryServicesSoftDeleteSettings.Serialization.cs
    index cfe18e9835c3..b84a8dbec8fe 100644
    --- a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/RecoveryServicesSoftDeleteSettings.Serialization.cs
    +++ b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/RecoveryServicesSoftDeleteSettings.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class RecoveryServicesSoftDeleteSettings : IUtf8JsonSerializable,
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer,
                     throw new FormatException($"The model {nameof(RecoveryServicesSoftDeleteSettings)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(SoftDeleteState))
                 {
                     writer.WritePropertyName("softDeleteState"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer,
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             RecoveryServicesSoftDeleteSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/RecoveryServicesVaultListResult.Serialization.cs b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/RecoveryServicesVaultListResult.Serialization.cs
    index 786a7d592d4f..84d8fe12798c 100644
    --- a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/RecoveryServicesVaultListResult.Serialization.cs
    +++ b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/RecoveryServicesVaultListResult.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class RecoveryServicesVaultListResult : IUtf8JsonSerializable,
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo
                     throw new FormatException($"The model {nameof(RecoveryServicesVaultListResult)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsCollectionDefined(Value))
                 {
                     writer.WritePropertyName("value"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             RecoveryServicesVaultListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/RecoveryServicesVaultPatch.Serialization.cs b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/RecoveryServicesVaultPatch.Serialization.cs
    index 77459ebcf01f..bf7a1bb6b429 100644
    --- a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/RecoveryServicesVaultPatch.Serialization.cs
    +++ b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/RecoveryServicesVaultPatch.Serialization.cs
    @@ -19,6 +19,15 @@ public partial class RecoveryServicesVaultPatch : IUtf8JsonSerializable, IJsonMo
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -26,7 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe
                     throw new FormatException($"The model {nameof(RecoveryServicesVaultPatch)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(Properties))
                 {
                     writer.WritePropertyName("properties"u8);
    @@ -47,55 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe
                     writer.WritePropertyName("etag"u8);
                     writer.WriteStringValue(ETag.Value.ToString());
                 }
    -            if (Optional.IsCollectionDefined(Tags))
    -            {
    -                writer.WritePropertyName("tags"u8);
    -                writer.WriteStartObject();
    -                foreach (var item in Tags)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -                    writer.WriteStringValue(item.Value);
    -                }
    -                writer.WriteEndObject();
    -            }
    -            writer.WritePropertyName("location"u8);
    -            writer.WriteStringValue(Location);
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("id"u8);
    -                writer.WriteStringValue(Id);
    -            }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("name"u8);
    -                writer.WriteStringValue(Name);
    -            }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("type"u8);
    -                writer.WriteStringValue(ResourceType);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(SystemData))
    -            {
    -                writer.WritePropertyName("systemData"u8);
    -                JsonSerializer.Serialize(writer, SystemData);
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             RecoveryServicesVaultPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/RecoveryServicesVaultProperties.Serialization.cs b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/RecoveryServicesVaultProperties.Serialization.cs
    index 9c41bfa7bf04..aaf16cdca0ab 100644
    --- a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/RecoveryServicesVaultProperties.Serialization.cs
    +++ b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/RecoveryServicesVaultProperties.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class RecoveryServicesVaultProperties : IUtf8JsonSerializable, IJ
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo
                     throw new FormatException($"The model {nameof(RecoveryServicesVaultProperties)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (options.Format != "W" && Optional.IsDefined(ProvisioningState))
                 {
                     writer.WritePropertyName("provisioningState"u8);
    @@ -121,7 +129,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             RecoveryServicesVaultProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/ReplicationJobSummary.Serialization.cs b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/ReplicationJobSummary.Serialization.cs
    index 778d4649d828..625750b4109c 100644
    --- a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/ReplicationJobSummary.Serialization.cs
    +++ b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/ReplicationJobSummary.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class ReplicationJobSummary : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW
                     throw new FormatException($"The model {nameof(ReplicationJobSummary)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(FailedJobs))
                 {
                     writer.WritePropertyName("failedJobs"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             ReplicationJobSummary IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/ReplicationUsage.Serialization.cs b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/ReplicationUsage.Serialization.cs
    index f71c842c45c5..0baddb5a7f9b 100644
    --- a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/ReplicationUsage.Serialization.cs
    +++ b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/ReplicationUsage.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class ReplicationUsage : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter
                     throw new FormatException($"The model {nameof(ReplicationUsage)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(MonitoringSummary))
                 {
                     writer.WritePropertyName("monitoringSummary"u8);
    @@ -71,7 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             ReplicationUsage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/ReplicationUsageListResult.Serialization.cs b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/ReplicationUsageListResult.Serialization.cs
    index 49590274ff61..e36f7d742a82 100644
    --- a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/ReplicationUsageListResult.Serialization.cs
    +++ b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/ReplicationUsageListResult.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class ReplicationUsageListResult : IUtf8JsonSerializable, IJson
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe
                     throw new FormatException($"The model {nameof(ReplicationUsageListResult)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsCollectionDefined(Value))
                 {
                     writer.WritePropertyName("value"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             ReplicationUsageListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/ResourceCapabilities.Serialization.cs b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/ResourceCapabilities.Serialization.cs
    index 42ef28652507..690bc9a70a50 100644
    --- a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/ResourceCapabilities.Serialization.cs
    +++ b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/ResourceCapabilities.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class ResourceCapabilities : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,30 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr
                     throw new FormatException($"The model {nameof(ResourceCapabilities)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(Properties))
                 {
                     writer.WritePropertyName("properties"u8);
                     writer.WriteObjectValue(Properties, options);
                 }
    -            writer.WritePropertyName("type"u8);
    -            writer.WriteStringValue(ResourceCapabilitiesBaseType);
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             ResourceCapabilities IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/ResourceCapabilitiesBase.Serialization.cs b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/ResourceCapabilitiesBase.Serialization.cs
    index b22d1a45edc6..7fc8225278b8 100644
    --- a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/ResourceCapabilitiesBase.Serialization.cs
    +++ b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/ResourceCapabilitiesBase.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class ResourceCapabilitiesBase : IUtf8JsonSerializable, IJsonMode
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead
                     throw new FormatException($"The model {nameof(ResourceCapabilitiesBase)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 writer.WritePropertyName("type"u8);
                 writer.WriteStringValue(ResourceCapabilitiesBaseType);
                 if (options.Format != "W" && _serializedAdditionalRawData != null)
    @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             ResourceCapabilitiesBase IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/ResourceCertificateAndAadDetails.Serialization.cs b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/ResourceCertificateAndAadDetails.Serialization.cs
    index df117d720bf2..ccae29e0588b 100644
    --- a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/ResourceCertificateAndAadDetails.Serialization.cs
    +++ b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/ResourceCertificateAndAadDetails.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class ResourceCertificateAndAadDetails : IUtf8JsonSerializable, I
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, M
                     throw new FormatException($"The model {nameof(ResourceCertificateAndAadDetails)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 writer.WritePropertyName("aadAuthority"u8);
                 writer.WriteStringValue(AadAuthority);
                 writer.WritePropertyName("aadTenantId"u8);
    @@ -46,71 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M
                     writer.WritePropertyName("aadAudience"u8);
                     writer.WriteStringValue(AadAudience);
                 }
    -            writer.WritePropertyName("authType"u8);
    -            writer.WriteStringValue(AuthType);
    -            if (Optional.IsDefined(Certificate))
    -            {
    -                writer.WritePropertyName("certificate"u8);
    -                writer.WriteBase64StringValue(Certificate, "D");
    -            }
    -            if (Optional.IsDefined(FriendlyName))
    -            {
    -                writer.WritePropertyName("friendlyName"u8);
    -                writer.WriteStringValue(FriendlyName);
    -            }
    -            if (Optional.IsDefined(Issuer))
    -            {
    -                writer.WritePropertyName("issuer"u8);
    -                writer.WriteStringValue(Issuer);
    -            }
    -            if (Optional.IsDefined(ResourceId))
    -            {
    -                writer.WritePropertyName("resourceId"u8);
    -                writer.WriteNumberValue(ResourceId.Value);
    -            }
    -            if (Optional.IsDefined(Subject))
    -            {
    -                writer.WritePropertyName("subject"u8);
    -                writer.WriteStringValue(Subject);
    -            }
    -            if (Optional.IsDefined(Thumbprint))
    -            {
    -                writer.WritePropertyName("thumbprint"u8);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(Thumbprint);
    -#else
    -                using (JsonDocument document = JsonDocument.Parse(Thumbprint))
    -                {
    -                    JsonSerializer.Serialize(writer, document.RootElement);
    -                }
    -#endif
    -            }
    -            if (Optional.IsDefined(ValidStartOn))
    -            {
    -                writer.WritePropertyName("validFrom"u8);
    -                writer.WriteStringValue(ValidStartOn.Value, "O");
    -            }
    -            if (Optional.IsDefined(ValidEndOn))
    -            {
    -                writer.WritePropertyName("validTo"u8);
    -                writer.WriteStringValue(ValidEndOn.Value, "O");
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             ResourceCertificateAndAadDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/ResourceCertificateAndAcsDetails.Serialization.cs b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/ResourceCertificateAndAcsDetails.Serialization.cs
    index 4431d699ae10..28a485581715 100644
    --- a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/ResourceCertificateAndAcsDetails.Serialization.cs
    +++ b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/ResourceCertificateAndAcsDetails.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class ResourceCertificateAndAcsDetails : IUtf8JsonSerializable, I
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,78 +34,13 @@ void IJsonModel.Write(Utf8JsonWriter writer, M
                     throw new FormatException($"The model {nameof(ResourceCertificateAndAcsDetails)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 writer.WritePropertyName("globalAcsNamespace"u8);
                 writer.WriteStringValue(GlobalAcsNamespace);
                 writer.WritePropertyName("globalAcsHostName"u8);
                 writer.WriteStringValue(GlobalAcsHostName);
                 writer.WritePropertyName("globalAcsRPRealm"u8);
                 writer.WriteStringValue(GlobalAcsRPRealm);
    -            writer.WritePropertyName("authType"u8);
    -            writer.WriteStringValue(AuthType);
    -            if (Optional.IsDefined(Certificate))
    -            {
    -                writer.WritePropertyName("certificate"u8);
    -                writer.WriteBase64StringValue(Certificate, "D");
    -            }
    -            if (Optional.IsDefined(FriendlyName))
    -            {
    -                writer.WritePropertyName("friendlyName"u8);
    -                writer.WriteStringValue(FriendlyName);
    -            }
    -            if (Optional.IsDefined(Issuer))
    -            {
    -                writer.WritePropertyName("issuer"u8);
    -                writer.WriteStringValue(Issuer);
    -            }
    -            if (Optional.IsDefined(ResourceId))
    -            {
    -                writer.WritePropertyName("resourceId"u8);
    -                writer.WriteNumberValue(ResourceId.Value);
    -            }
    -            if (Optional.IsDefined(Subject))
    -            {
    -                writer.WritePropertyName("subject"u8);
    -                writer.WriteStringValue(Subject);
    -            }
    -            if (Optional.IsDefined(Thumbprint))
    -            {
    -                writer.WritePropertyName("thumbprint"u8);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(Thumbprint);
    -#else
    -                using (JsonDocument document = JsonDocument.Parse(Thumbprint))
    -                {
    -                    JsonSerializer.Serialize(writer, document.RootElement);
    -                }
    -#endif
    -            }
    -            if (Optional.IsDefined(ValidStartOn))
    -            {
    -                writer.WritePropertyName("validFrom"u8);
    -                writer.WriteStringValue(ValidStartOn.Value, "O");
    -            }
    -            if (Optional.IsDefined(ValidEndOn))
    -            {
    -                writer.WritePropertyName("validTo"u8);
    -                writer.WriteStringValue(ValidEndOn.Value, "O");
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             ResourceCertificateAndAcsDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/ResourceCertificateDetails.Serialization.cs b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/ResourceCertificateDetails.Serialization.cs
    index 1fb61f317b89..4c8a2026ee57 100644
    --- a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/ResourceCertificateDetails.Serialization.cs
    +++ b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/ResourceCertificateDetails.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class ResourceCertificateDetails : IUtf8JsonSerializable, IJsonMo
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe
                     throw new FormatException($"The model {nameof(ResourceCertificateDetails)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 writer.WritePropertyName("authType"u8);
                 writer.WriteStringValue(AuthType);
                 if (Optional.IsDefined(Certificate))
    @@ -90,7 +98,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             ResourceCertificateDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/RestoreSettings.Serialization.cs b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/RestoreSettings.Serialization.cs
    index 7571023c5ec4..36238a60ecef 100644
    --- a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/RestoreSettings.Serialization.cs
    +++ b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/RestoreSettings.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class RestoreSettings : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO
                     throw new FormatException($"The model {nameof(RestoreSettings)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(CrossSubscriptionRestoreSettings))
                 {
                     writer.WritePropertyName("crossSubscriptionRestoreSettings"u8);
    @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             RestoreSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/UnknownResourceCertificateDetails.Serialization.cs b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/UnknownResourceCertificateDetails.Serialization.cs
    index b6a0575682f7..455c7eac42f1 100644
    --- a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/UnknownResourceCertificateDetails.Serialization.cs
    +++ b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/UnknownResourceCertificateDetails.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class UnknownResourceCertificateDetails : IUtf8JsonSerializable
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,72 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe
                     throw new FormatException($"The model {nameof(ResourceCertificateDetails)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            writer.WritePropertyName("authType"u8);
    -            writer.WriteStringValue(AuthType);
    -            if (Optional.IsDefined(Certificate))
    -            {
    -                writer.WritePropertyName("certificate"u8);
    -                writer.WriteBase64StringValue(Certificate, "D");
    -            }
    -            if (Optional.IsDefined(FriendlyName))
    -            {
    -                writer.WritePropertyName("friendlyName"u8);
    -                writer.WriteStringValue(FriendlyName);
    -            }
    -            if (Optional.IsDefined(Issuer))
    -            {
    -                writer.WritePropertyName("issuer"u8);
    -                writer.WriteStringValue(Issuer);
    -            }
    -            if (Optional.IsDefined(ResourceId))
    -            {
    -                writer.WritePropertyName("resourceId"u8);
    -                writer.WriteNumberValue(ResourceId.Value);
    -            }
    -            if (Optional.IsDefined(Subject))
    -            {
    -                writer.WritePropertyName("subject"u8);
    -                writer.WriteStringValue(Subject);
    -            }
    -            if (Optional.IsDefined(Thumbprint))
    -            {
    -                writer.WritePropertyName("thumbprint"u8);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(Thumbprint);
    -#else
    -                using (JsonDocument document = JsonDocument.Parse(Thumbprint))
    -                {
    -                    JsonSerializer.Serialize(writer, document.RootElement);
    -                }
    -#endif
    -            }
    -            if (Optional.IsDefined(ValidStartOn))
    -            {
    -                writer.WritePropertyName("validFrom"u8);
    -                writer.WriteStringValue(ValidStartOn.Value, "O");
    -            }
    -            if (Optional.IsDefined(ValidEndOn))
    -            {
    -                writer.WritePropertyName("validTo"u8);
    -                writer.WriteStringValue(ValidEndOn.Value, "O");
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             ResourceCertificateDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/VaultCertificateResult.Serialization.cs b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/VaultCertificateResult.Serialization.cs
    index 53bf0478f8c0..aa43cd9447df 100644
    --- a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/VaultCertificateResult.Serialization.cs
    +++ b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/VaultCertificateResult.Serialization.cs
    @@ -19,6 +19,15 @@ public partial class VaultCertificateResult : IUtf8JsonSerializable, IJsonModel<
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -26,48 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader
                     throw new FormatException($"The model {nameof(VaultCertificateResult)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(Properties))
                 {
                     writer.WritePropertyName("properties"u8);
                     writer.WriteObjectValue(Properties, options);
                 }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("id"u8);
    -                writer.WriteStringValue(Id);
    -            }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("name"u8);
    -                writer.WriteStringValue(Name);
    -            }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("type"u8);
    -                writer.WriteStringValue(ResourceType);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(SystemData))
    -            {
    -                writer.WritePropertyName("systemData"u8);
    -                JsonSerializer.Serialize(writer, SystemData);
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             VaultCertificateResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/VaultMonitoringSettings.Serialization.cs b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/VaultMonitoringSettings.Serialization.cs
    index 6c3db48e528b..9a33067270ff 100644
    --- a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/VaultMonitoringSettings.Serialization.cs
    +++ b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/VaultMonitoringSettings.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class VaultMonitoringSettings : IUtf8JsonSerializable, IJsonModel
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade
                     throw new FormatException($"The model {nameof(VaultMonitoringSettings)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(AzureMonitorAlertSettings))
                 {
                     writer.WritePropertyName("azureMonitorAlertSettings"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             VaultMonitoringSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/VaultMonitoringSummary.Serialization.cs b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/VaultMonitoringSummary.Serialization.cs
    index c7ff72c35fe2..6dca8822a0f5 100644
    --- a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/VaultMonitoringSummary.Serialization.cs
    +++ b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/VaultMonitoringSummary.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class VaultMonitoringSummary : IUtf8JsonSerializable, IJsonModel<
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader
                     throw new FormatException($"The model {nameof(VaultMonitoringSummary)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(UnHealthyVmCount))
                 {
                     writer.WritePropertyName("unHealthyVmCount"u8);
    @@ -71,7 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             VaultMonitoringSummary IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/VaultPropertiesEncryption.Serialization.cs b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/VaultPropertiesEncryption.Serialization.cs
    index 863d665bd9b1..d27488110cc8 100644
    --- a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/VaultPropertiesEncryption.Serialization.cs
    +++ b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/VaultPropertiesEncryption.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class VaultPropertiesEncryption : IUtf8JsonSerializable, IJsonMod
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea
                     throw new FormatException($"The model {nameof(VaultPropertiesEncryption)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(KeyVaultProperties))
                 {
                     writer.WritePropertyName("keyVaultProperties"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             VaultPropertiesEncryption IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/VaultPropertiesMoveDetails.Serialization.cs b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/VaultPropertiesMoveDetails.Serialization.cs
    index c669406b54e2..f6f06af0f54a 100644
    --- a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/VaultPropertiesMoveDetails.Serialization.cs
    +++ b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/VaultPropertiesMoveDetails.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class VaultPropertiesMoveDetails : IUtf8JsonSerializable, IJsonMo
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe
                     throw new FormatException($"The model {nameof(VaultPropertiesMoveDetails)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (options.Format != "W" && Optional.IsDefined(OperationId))
                 {
                     writer.WritePropertyName("operationId"u8);
    @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             VaultPropertiesMoveDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/VaultPropertiesRedundancySettings.Serialization.cs b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/VaultPropertiesRedundancySettings.Serialization.cs
    index e9c69a133a8f..5ba5dc230b62 100644
    --- a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/VaultPropertiesRedundancySettings.Serialization.cs
    +++ b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/VaultPropertiesRedundancySettings.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class VaultPropertiesRedundancySettings : IUtf8JsonSerializable,
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer,
                     throw new FormatException($"The model {nameof(VaultPropertiesRedundancySettings)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (options.Format != "W" && Optional.IsDefined(StandardTierStorageRedundancy))
                 {
                     writer.WritePropertyName("standardTierStorageRedundancy"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer,
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             VaultPropertiesRedundancySettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/VaultUpgradeDetails.Serialization.cs b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/VaultUpgradeDetails.Serialization.cs
    index 65878059245b..ff57a27066b7 100644
    --- a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/VaultUpgradeDetails.Serialization.cs
    +++ b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/VaultUpgradeDetails.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class VaultUpgradeDetails : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri
                     throw new FormatException($"The model {nameof(VaultUpgradeDetails)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (options.Format != "W" && Optional.IsDefined(OperationId))
                 {
                     writer.WritePropertyName("operationId"u8);
    @@ -86,7 +94,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             VaultUpgradeDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/VaultUsage.Serialization.cs b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/VaultUsage.Serialization.cs
    index 2c179e41272a..a7f391e2d68c 100644
    --- a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/VaultUsage.Serialization.cs
    +++ b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/VaultUsage.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class VaultUsage : IUtf8JsonSerializable, IJsonModel
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOption
                     throw new FormatException($"The model {nameof(VaultUsage)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(Unit))
                 {
                     writer.WritePropertyName("unit"u8);
    @@ -71,7 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOption
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             VaultUsage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/VaultUsageListResult.Serialization.cs b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/VaultUsageListResult.Serialization.cs
    index 270ffd757c48..89c89a01b529 100644
    --- a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/VaultUsageListResult.Serialization.cs
    +++ b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/VaultUsageListResult.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class VaultUsageListResult : IUtf8JsonSerializable, IJsonModel<
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr
                     throw new FormatException($"The model {nameof(VaultUsageListResult)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsCollectionDefined(Value))
                 {
                     writer.WritePropertyName("value"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             VaultUsageListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/VaultUsageNameInfo.Serialization.cs b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/VaultUsageNameInfo.Serialization.cs
    index b2500eab7d2a..adc3be790dcb 100644
    --- a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/VaultUsageNameInfo.Serialization.cs
    +++ b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/Models/VaultUsageNameInfo.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class VaultUsageNameInfo : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit
                     throw new FormatException($"The model {nameof(VaultUsageNameInfo)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(Value))
                 {
                     writer.WritePropertyName("value"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             VaultUsageNameInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/RecoveryServicesPrivateLinkResourceData.Serialization.cs b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/RecoveryServicesPrivateLinkResourceData.Serialization.cs
    index 84b6283bb4d8..09c3c647533b 100644
    --- a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/RecoveryServicesPrivateLinkResourceData.Serialization.cs
    +++ b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/RecoveryServicesPrivateLinkResourceData.Serialization.cs
    @@ -19,6 +19,15 @@ public partial class RecoveryServicesPrivateLinkResourceData : IUtf8JsonSerializ
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -26,27 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter wr
                     throw new FormatException($"The model {nameof(RecoveryServicesPrivateLinkResourceData)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("id"u8);
    -                writer.WriteStringValue(Id);
    -            }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("name"u8);
    -                writer.WriteStringValue(Name);
    -            }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("type"u8);
    -                writer.WriteStringValue(ResourceType);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(SystemData))
    -            {
    -                writer.WritePropertyName("systemData"u8);
    -                JsonSerializer.Serialize(writer, SystemData);
    -            }
    +            base.JsonModelWriteCore(writer, options);
                 writer.WritePropertyName("properties"u8);
                 writer.WriteStartObject();
                 if (options.Format != "W" && Optional.IsDefined(GroupId))
    @@ -75,22 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter wr
                     writer.WriteEndArray();
                 }
                 writer.WriteEndObject();
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             RecoveryServicesPrivateLinkResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/RecoveryServicesVaultData.Serialization.cs b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/RecoveryServicesVaultData.Serialization.cs
    index 2e4ff79697ce..96c8ae7be66c 100644
    --- a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/RecoveryServicesVaultData.Serialization.cs
    +++ b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/RecoveryServicesVaultData.Serialization.cs
    @@ -20,6 +20,15 @@ public partial class RecoveryServicesVaultData : IUtf8JsonSerializable, IJsonMod
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea
                     throw new FormatException($"The model {nameof(RecoveryServicesVaultData)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(Identity))
                 {
                     writer.WritePropertyName("identity"u8);
    @@ -48,55 +57,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea
                     writer.WritePropertyName("etag"u8);
                     writer.WriteStringValue(ETag.Value.ToString());
                 }
    -            if (Optional.IsCollectionDefined(Tags))
    -            {
    -                writer.WritePropertyName("tags"u8);
    -                writer.WriteStartObject();
    -                foreach (var item in Tags)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -                    writer.WriteStringValue(item.Value);
    -                }
    -                writer.WriteEndObject();
    -            }
    -            writer.WritePropertyName("location"u8);
    -            writer.WriteStringValue(Location);
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("id"u8);
    -                writer.WriteStringValue(Id);
    -            }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("name"u8);
    -                writer.WriteStringValue(Name);
    -            }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("type"u8);
    -                writer.WriteStringValue(ResourceType);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(SystemData))
    -            {
    -                writer.WritePropertyName("systemData"u8);
    -                JsonSerializer.Serialize(writer, SystemData);
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             RecoveryServicesVaultData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/RecoveryServicesVaultExtendedInfoData.Serialization.cs b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/RecoveryServicesVaultExtendedInfoData.Serialization.cs
    index 03ae8ad016ee..0a7e39f884de 100644
    --- a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/RecoveryServicesVaultExtendedInfoData.Serialization.cs
    +++ b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/RecoveryServicesVaultExtendedInfoData.Serialization.cs
    @@ -19,6 +19,15 @@ public partial class RecoveryServicesVaultExtendedInfoData : IUtf8JsonSerializab
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -26,32 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writ
                     throw new FormatException($"The model {nameof(RecoveryServicesVaultExtendedInfoData)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(ETag))
                 {
                     writer.WritePropertyName("etag"u8);
                     writer.WriteStringValue(ETag.Value.ToString());
                 }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("id"u8);
    -                writer.WriteStringValue(Id);
    -            }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("name"u8);
    -                writer.WriteStringValue(Name);
    -            }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("type"u8);
    -                writer.WriteStringValue(ResourceType);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(SystemData))
    -            {
    -                writer.WritePropertyName("systemData"u8);
    -                JsonSerializer.Serialize(writer, SystemData);
    -            }
                 writer.WritePropertyName("properties"u8);
                 writer.WriteStartObject();
                 if (Optional.IsDefined(IntegrityKey))
    @@ -75,22 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writ
                     writer.WriteStringValue(Algorithm);
                 }
                 writer.WriteEndObject();
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             RecoveryServicesVaultExtendedInfoData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/autorest.md b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/autorest.md
    index 8b8c4508a66a..cdedfe00d1a8 100644
    --- a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/autorest.md
    +++ b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/autorest.md
    @@ -18,6 +18,7 @@ skip-csproj: true
     modelerfour:
       flatten-payloads: false
     use-model-reader-writer: true
    +use-write-core: true
     
     rename-mapping:
       CertificateRequest: RecoveryServicesCertificateContent
    diff --git a/sdk/resourcemanager/ci.mgmt.yml b/sdk/resourcemanager/ci.mgmt.yml
    index dff77b2dab00..69d2e50d3748 100644
    --- a/sdk/resourcemanager/ci.mgmt.yml
    +++ b/sdk/resourcemanager/ci.mgmt.yml
    @@ -49,6 +49,7 @@ trigger:
         - sdk/consumption/Azure.ResourceManager.Consumption
         - sdk/containerapps/Azure.ResourceManager.AppContainers
         - sdk/containerinstance/Azure.ResourceManager.ContainerInstance
    +    - sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime
         - sdk/containerregistry/Azure.ResourceManager.ContainerRegistry
         - sdk/containerservice/Azure.ResourceManager.ContainerService
         - sdk/cosmosdb/Azure.ResourceManager.CosmosDB
    @@ -251,6 +252,7 @@ pr:
         - sdk/consumption/Azure.ResourceManager.Consumption
         - sdk/containerapps/Azure.ResourceManager.AppContainers
         - sdk/containerinstance/Azure.ResourceManager.ContainerInstance
    +    - sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime
         - sdk/containerregistry/Azure.ResourceManager.ContainerRegistry
         - sdk/containerservice/Azure.ResourceManager.ContainerService
         - sdk/cosmosdb/Azure.ResourceManager.CosmosDB
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/CHANGELOG.md b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/CHANGELOG.md
    index 97a14cc2a947..2b3dd1f3cee5 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/CHANGELOG.md
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/CHANGELOG.md
    @@ -4,6 +4,8 @@
     
     ### Features Added
     
    +- Exposed `JsonModelWriteCore` for model serialization procedure.
    +
     ### Breaking Changes
     
     ### Bugs Fixed
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/api/Azure.ResourceManager.ResourceMover.netstandard2.0.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/api/Azure.ResourceManager.ResourceMover.netstandard2.0.cs
    index f6ea3f78293e..70d5f08ef17e 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/api/Azure.ResourceManager.ResourceMover.netstandard2.0.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/api/Azure.ResourceManager.ResourceMover.netstandard2.0.cs
    @@ -40,6 +40,7 @@ public partial class MoverResourceData : Azure.ResourceManager.Models.ResourceDa
         {
             public MoverResourceData() { }
             public Azure.ResourceManager.ResourceMover.Models.MoverResourceProperties Properties { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.ResourceMover.MoverResourceData 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.ResourceMover.MoverResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -69,6 +70,7 @@ public MoverResourceSetData(Azure.Core.AzureLocation location) { }
             public Azure.ETag? ETag { get { throw null; } }
             public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } }
             public Azure.ResourceManager.ResourceMover.Models.MoverResourceSetProperties Properties { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.ResourceMover.MoverResourceSetData 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.ResourceMover.MoverResourceSetData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -168,6 +170,7 @@ internal AffectedMoverResourceInfo() { }
             public Azure.Core.ResourceIdentifier Id { get { throw null; } }
             public System.Collections.Generic.IReadOnlyList MoverResources { get { throw null; } }
             public Azure.Core.ResourceIdentifier SourceId { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.ResourceMover.Models.AffectedMoverResourceInfo 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.ResourceMover.Models.AffectedMoverResourceInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -200,6 +203,7 @@ public partial class DiskEncryptionSetResourceSettings : Azure.ResourceManager.R
             public DiskEncryptionSetResourceSettings() { }
             [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
             public DiskEncryptionSetResourceSettings(string targetResourceName) { }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.ResourceMover.Models.DiskEncryptionSetResourceSettings 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.ResourceMover.Models.DiskEncryptionSetResourceSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -211,6 +215,7 @@ public partial class KeyVaultResourceSettings : Azure.ResourceManager.ResourceMo
             public KeyVaultResourceSettings() { }
             [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
             public KeyVaultResourceSettings(string targetResourceName) { }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.ResourceMover.Models.KeyVaultResourceSettings 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.ResourceMover.Models.KeyVaultResourceSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -220,6 +225,7 @@ public KeyVaultResourceSettings(string targetResourceName) { }
         public partial class LoadBalancerBackendAddressPoolReferenceInfo : Azure.ResourceManager.ResourceMover.Models.ProxyResourceReferenceInfo, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
         {
             public LoadBalancerBackendAddressPoolReferenceInfo(Azure.Core.ResourceIdentifier sourceArmResourceId) : base (default(Azure.Core.ResourceIdentifier)) { }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.ResourceMover.Models.LoadBalancerBackendAddressPoolReferenceInfo 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.ResourceMover.Models.LoadBalancerBackendAddressPoolReferenceInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -230,6 +236,7 @@ public partial class LoadBalancerBackendAddressPoolResourceSettings : System.Cli
         {
             public LoadBalancerBackendAddressPoolResourceSettings() { }
             public string Name { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.ResourceMover.Models.LoadBalancerBackendAddressPoolResourceSettings 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.ResourceMover.Models.LoadBalancerBackendAddressPoolResourceSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -246,6 +253,7 @@ public LoadBalancerFrontendIPConfigurationResourceSettings() { }
             public string PrivateIPAllocationMethod { get { throw null; } set { } }
             public Azure.ResourceManager.ResourceMover.Models.SubnetReferenceInfo Subnet { get { throw null; } set { } }
             public string Zones { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.ResourceMover.Models.LoadBalancerFrontendIPConfigurationResourceSettings 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.ResourceMover.Models.LoadBalancerFrontendIPConfigurationResourceSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -255,6 +263,7 @@ public LoadBalancerFrontendIPConfigurationResourceSettings() { }
         public partial class LoadBalancerNatRuleReferenceInfo : Azure.ResourceManager.ResourceMover.Models.ProxyResourceReferenceInfo, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
         {
             public LoadBalancerNatRuleReferenceInfo(Azure.Core.ResourceIdentifier sourceArmResourceId) : base (default(Azure.Core.ResourceIdentifier)) { }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.ResourceMover.Models.LoadBalancerNatRuleReferenceInfo 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.ResourceMover.Models.LoadBalancerNatRuleReferenceInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -271,6 +280,7 @@ public LoadBalancerResourceSettings(string targetResourceName) { }
             public string Sku { get { throw null; } set { } }
             public System.Collections.Generic.IDictionary Tags { get { throw null; } }
             public string Zones { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.ResourceMover.Models.LoadBalancerResourceSettings 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.ResourceMover.Models.LoadBalancerResourceSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -285,6 +295,7 @@ public MoverAvailabilitySetResourceSettings(string targetResourceName) { }
             public int? FaultDomain { get { throw null; } set { } }
             public System.Collections.Generic.IDictionary Tags { get { throw null; } }
             public int? UpdateDomain { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.ResourceMover.Models.MoverAvailabilitySetResourceSettings 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.ResourceMover.Models.MoverAvailabilitySetResourceSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -297,6 +308,7 @@ public MoverBulkRemoveContent() { }
             public Azure.ResourceManager.ResourceMover.Models.MoverResourceInputType? MoverResourceInputType { get { throw null; } set { } }
             public System.Collections.Generic.IList MoverResources { get { throw null; } }
             public bool? ValidateOnly { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.ResourceMover.Models.MoverBulkRemoveContent 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.ResourceMover.Models.MoverBulkRemoveContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -309,6 +321,7 @@ public MoverCommitContent(System.Collections.Generic.IEnumerable MoverResources { get { throw null; } }
             public bool? ValidateOnly { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.ResourceMover.Models.MoverCommitContent 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.ResourceMover.Models.MoverCommitContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -357,6 +370,7 @@ public MoverDiscardContent(System.Collections.Generic.IEnumerable MoverResources { get { throw null; } }
             public bool? ValidateOnly { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.ResourceMover.Models.MoverDiscardContent 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.ResourceMover.Models.MoverDiscardContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -370,6 +384,7 @@ internal MoverDisplayInfo() { }
             public string Operation { get { throw null; } }
             public string Provider { get { throw null; } }
             public string Resource { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.ResourceMover.Models.MoverDisplayInfo 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.ResourceMover.Models.MoverDisplayInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -381,6 +396,7 @@ public partial class MoverOperationErrorAdditionalInfo : System.ClientModel.Prim
             internal MoverOperationErrorAdditionalInfo() { }
             public System.Collections.Generic.IReadOnlyList InfoMoverResources { get { throw null; } }
             public string OperationErrorAdditionalInfoType { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.ResourceMover.Models.MoverOperationErrorAdditionalInfo 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.ResourceMover.Models.MoverOperationErrorAdditionalInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -395,6 +411,7 @@ internal MoverOperationsDiscovery() { }
             public string Name { get { throw null; } }
             public string Origin { get { throw null; } }
             public System.BinaryData Properties { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.ResourceMover.Models.MoverOperationsDiscovery 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.ResourceMover.Models.MoverOperationsDiscovery System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -411,6 +428,7 @@ internal MoverOperationStatus() { }
             public System.BinaryData Properties { get { throw null; } }
             public System.DateTimeOffset? StartOn { get { throw null; } }
             public string Status { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.ResourceMover.Models.MoverOperationStatus 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.ResourceMover.Models.MoverOperationStatus System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -424,6 +442,7 @@ internal MoverOperationStatusError() { }
             public string Code { get { throw null; } }
             public System.Collections.Generic.IReadOnlyList Details { get { throw null; } }
             public string Message { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.ResourceMover.Models.MoverOperationStatusError 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.ResourceMover.Models.MoverOperationStatusError System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -436,6 +455,7 @@ public MoverPrepareContent(System.Collections.Generic.IEnumerable MoverResources { get { throw null; } }
             public bool? ValidateOnly { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.ResourceMover.Models.MoverPrepareContent 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.ResourceMover.Models.MoverPrepareContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -474,6 +494,7 @@ internal MoverResourceDependency() { }
             public Azure.Core.ResourceIdentifier ManualResolutionTargetId { get { throw null; } }
             public string ResolutionStatus { get { throw null; } }
             public Azure.ResourceManager.ResourceMover.Models.MoverResourceResolutionType? ResolutionType { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.ResourceMover.Models.MoverResourceDependency 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.ResourceMover.Models.MoverResourceDependency System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -485,6 +506,7 @@ public partial class MoverResourceDependencyOverride : System.ClientModel.Primit
             public MoverResourceDependencyOverride() { }
             public Azure.Core.ResourceIdentifier Id { get { throw null; } set { } }
             public Azure.Core.ResourceIdentifier TargetId { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.ResourceMover.Models.MoverResourceDependencyOverride 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.ResourceMover.Models.MoverResourceDependencyOverride System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -531,6 +553,7 @@ public partial class MoverResourceJobStatus : System.ClientModel.Primitives.IJso
             internal MoverResourceJobStatus() { }
             public Azure.ResourceManager.ResourceMover.Models.MoverResourceJobName? JobName { get { throw null; } }
             public string JobProgress { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.ResourceMover.Models.MoverResourceJobStatus 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.ResourceMover.Models.MoverResourceJobStatus System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -543,6 +566,7 @@ public MoverResourceMoveContent(System.Collections.Generic.IEnumerable MoverResources { get { throw null; } }
             public bool? ValidateOnly { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.ResourceMover.Models.MoverResourceMoveContent 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.ResourceMover.Models.MoverResourceMoveContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -594,6 +618,7 @@ public MoverResourceProperties(Azure.Core.ResourceIdentifier sourceId) { }
             public Azure.Core.ResourceIdentifier SourceId { get { throw null; } set { } }
             public Azure.ResourceManager.ResourceMover.Models.MoverResourceSettings SourceResourceSettings { get { throw null; } }
             public Azure.Core.ResourceIdentifier TargetId { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.ResourceMover.Models.MoverResourceProperties 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.ResourceMover.Models.MoverResourceProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -603,6 +628,7 @@ public MoverResourceProperties(Azure.Core.ResourceIdentifier sourceId) { }
         public partial class MoverResourcePropertiesMoveStatus : Azure.ResourceManager.ResourceMover.Models.MoverResourceStatus, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
         {
             internal MoverResourcePropertiesMoveStatus() { }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.ResourceMover.Models.MoverResourcePropertiesMoveStatus 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.ResourceMover.Models.MoverResourcePropertiesMoveStatus System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -613,6 +639,7 @@ public partial class MoverResourceReferenceInfo : System.ClientModel.Primitives.
         {
             public MoverResourceReferenceInfo(Azure.Core.ResourceIdentifier sourceArmResourceId) { }
             public Azure.Core.ResourceIdentifier SourceArmResourceId { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.ResourceMover.Models.MoverResourceReferenceInfo 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.ResourceMover.Models.MoverResourceReferenceInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -642,6 +669,7 @@ public partial class MoverResourceSetPatch : System.ClientModel.Primitives.IJson
             public MoverResourceSetPatch() { }
             public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } }
             public System.Collections.Generic.IDictionary Tags { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.ResourceMover.Models.MoverResourceSetPatch 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.ResourceMover.Models.MoverResourceSetPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -663,6 +691,7 @@ public MoverResourceSetProperties(Azure.Core.AzureLocation sourceRegion, Azure.C
             [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
             public Azure.Core.AzureLocation TargetRegion { get { throw null; } set { } }
             public string Version { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.ResourceMover.Models.MoverResourceSetProperties 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.ResourceMover.Models.MoverResourceSetProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -676,6 +705,7 @@ protected MoverResourceSettings() { }
             protected MoverResourceSettings(string targetResourceName) { }
             public string TargetResourceGroupName { get { throw null; } set { } }
             public string TargetResourceName { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.ResourceMover.Models.MoverResourceSettings 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.ResourceMover.Models.MoverResourceSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -688,6 +718,7 @@ internal MoverResourceStatus() { }
             public Azure.ResponseError ErrorsProperties { get { throw null; } }
             public Azure.ResourceManager.ResourceMover.Models.MoverResourceJobStatus JobStatus { get { throw null; } }
             public Azure.ResourceManager.ResourceMover.Models.MoverResourceMoveState? MoveState { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.ResourceMover.Models.MoverResourceStatus 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.ResourceMover.Models.MoverResourceStatus System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -719,6 +750,7 @@ public partial class MoverUnresolvedDependency : System.ClientModel.Primitives.I
             internal MoverUnresolvedDependency() { }
             public int? Count { get { throw null; } }
             public Azure.Core.ResourceIdentifier Id { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.ResourceMover.Models.MoverUnresolvedDependency 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.ResourceMover.Models.MoverUnresolvedDependency System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -735,6 +767,7 @@ public MoverVirtualNetworkResourceSettings(string targetResourceName) { }
             public bool? EnableDdosProtection { get { throw null; } set { } }
             public System.Collections.Generic.IList Subnets { get { throw null; } set { } }
             public System.Collections.Generic.IDictionary Tags { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.ResourceMover.Models.MoverVirtualNetworkResourceSettings 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.ResourceMover.Models.MoverVirtualNetworkResourceSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -767,6 +800,7 @@ public NetworkInterfaceResourceSettings(string targetResourceName) { }
             public bool? EnableAcceleratedNetworking { get { throw null; } set { } }
             public System.Collections.Generic.IList IPConfigurations { get { throw null; } }
             public System.Collections.Generic.IDictionary Tags { get { throw null; } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.ResourceMover.Models.NetworkInterfaceResourceSettings 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.ResourceMover.Models.NetworkInterfaceResourceSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -780,6 +814,7 @@ public NetworkSecurityGroupResourceSettings() { }
             public NetworkSecurityGroupResourceSettings(string targetResourceName) { }
             public System.Collections.Generic.IList SecurityRules { get { throw null; } }
             public System.Collections.Generic.IDictionary Tags { get { throw null; } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.ResourceMover.Models.NetworkSecurityGroupResourceSettings 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.ResourceMover.Models.NetworkSecurityGroupResourceSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -799,6 +834,7 @@ public NetworkSecurityGroupSecurityRule() { }
             public string Protocol { get { throw null; } set { } }
             public string SourceAddressPrefix { get { throw null; } set { } }
             public string SourcePortRange { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.ResourceMover.Models.NetworkSecurityGroupSecurityRule 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.ResourceMover.Models.NetworkSecurityGroupSecurityRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -818,6 +854,7 @@ public NicIPConfigurationResourceSettings() { }
             public string PrivateIPAllocationMethod { get { throw null; } set { } }
             public Azure.Core.ResourceIdentifier PublicIPSourceArmResourceId { get { throw null; } set { } }
             public Azure.ResourceManager.ResourceMover.Models.SubnetReferenceInfo Subnet { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.ResourceMover.Models.NicIPConfigurationResourceSettings 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.ResourceMover.Models.NicIPConfigurationResourceSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -828,6 +865,7 @@ public partial class ProxyResourceReferenceInfo : Azure.ResourceManager.Resource
         {
             public ProxyResourceReferenceInfo(Azure.Core.ResourceIdentifier sourceArmResourceId) : base (default(Azure.Core.ResourceIdentifier)) { }
             public string Name { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.ResourceMover.Models.ProxyResourceReferenceInfo 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.ResourceMover.Models.ProxyResourceReferenceInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -845,6 +883,7 @@ public PublicIPAddressResourceSettings(string targetResourceName) { }
             public string Sku { get { throw null; } set { } }
             public System.Collections.Generic.IDictionary Tags { get { throw null; } }
             public string Zones { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.ResourceMover.Models.PublicIPAddressResourceSettings 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.ResourceMover.Models.PublicIPAddressResourceSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -855,6 +894,7 @@ public partial class RequiredForResourcesList : System.ClientModel.Primitives.IJ
         {
             internal RequiredForResourcesList() { }
             public System.Collections.Generic.IReadOnlyList SourceIds { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.ResourceMover.Models.RequiredForResourcesList 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.ResourceMover.Models.RequiredForResourcesList System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -866,6 +906,7 @@ public partial class ResourceGroupResourceSettings : Azure.ResourceManager.Resou
             public ResourceGroupResourceSettings() { }
             [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
             public ResourceGroupResourceSettings(string targetResourceName) { }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.ResourceMover.Models.ResourceGroupResourceSettings 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.ResourceMover.Models.ResourceGroupResourceSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -897,6 +938,7 @@ public SqlDatabaseResourceSettings() { }
             public SqlDatabaseResourceSettings(string targetResourceName) { }
             public System.Collections.Generic.IDictionary Tags { get { throw null; } }
             public Azure.ResourceManager.ResourceMover.Models.ResourceZoneRedundantSetting? ZoneRedundant { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.ResourceMover.Models.SqlDatabaseResourceSettings 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.ResourceMover.Models.SqlDatabaseResourceSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -910,6 +952,7 @@ public SqlElasticPoolResourceSettings() { }
             public SqlElasticPoolResourceSettings(string targetResourceName) { }
             public System.Collections.Generic.IDictionary Tags { get { throw null; } }
             public Azure.ResourceManager.ResourceMover.Models.ResourceZoneRedundantSetting? ZoneRedundant { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.ResourceMover.Models.SqlElasticPoolResourceSettings 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.ResourceMover.Models.SqlElasticPoolResourceSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -921,6 +964,7 @@ public partial class SqlServerResourceSettings : Azure.ResourceManager.ResourceM
             public SqlServerResourceSettings() { }
             [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
             public SqlServerResourceSettings(string targetResourceName) { }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.ResourceMover.Models.SqlServerResourceSettings 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.ResourceMover.Models.SqlServerResourceSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -930,6 +974,7 @@ public SqlServerResourceSettings(string targetResourceName) { }
         public partial class SubnetReferenceInfo : Azure.ResourceManager.ResourceMover.Models.ProxyResourceReferenceInfo, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
         {
             public SubnetReferenceInfo(Azure.Core.ResourceIdentifier sourceArmResourceId) : base (default(Azure.Core.ResourceIdentifier)) { }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.ResourceMover.Models.SubnetReferenceInfo 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.ResourceMover.Models.SubnetReferenceInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -942,6 +987,7 @@ public SubnetResourceSettings() { }
             public string AddressPrefix { get { throw null; } set { } }
             public string Name { get { throw null; } set { } }
             public Azure.Core.ResourceIdentifier NetworkSecurityGroupSourceArmResourceId { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.ResourceMover.Models.SubnetResourceSettings 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.ResourceMover.Models.SubnetResourceSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -958,6 +1004,7 @@ public VirtualMachineResourceSettings(string targetResourceName) { }
             public Azure.ResourceManager.ResourceMover.Models.MoverTargetAvailabilityZone? TargetAvailabilityZone { get { throw null; } set { } }
             public string TargetVmSize { get { throw null; } set { } }
             public System.Collections.Generic.IList UserManagedIdentities { get { throw null; } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.ResourceMover.Models.VirtualMachineResourceSettings 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.ResourceMover.Models.VirtualMachineResourceSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/assets.json b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/assets.json
    index 37c430cdb9c4..2cf8d2b6565e 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/assets.json
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/assets.json
    @@ -2,5 +2,5 @@
       "AssetsRepo": "Azure/azure-sdk-assets",
       "AssetsRepoPrefixPath": "net",
       "TagPrefix": "net/resourcemover/Azure.ResourceManager.ResourceMover",
    -  "Tag": "net/resourcemover/Azure.ResourceManager.ResourceMover_c8875a629c"
    +  "Tag": "net/resourcemover/Azure.ResourceManager.ResourceMover_9c726c88e8"
     }
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/AffectedMoverResourceInfo.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/AffectedMoverResourceInfo.Serialization.cs
    index 7659ea3a3ef9..6f123ecbd59f 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/AffectedMoverResourceInfo.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/AffectedMoverResourceInfo.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class AffectedMoverResourceInfo : IUtf8JsonSerializable, IJsonMod
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea
                     throw new FormatException($"The model {nameof(AffectedMoverResourceInfo)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (options.Format != "W" && Optional.IsDefined(Id))
                 {
                     writer.WritePropertyName("id"u8);
    @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             AffectedMoverResourceInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/AutomaticResolutionProperties.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/AutomaticResolutionProperties.Serialization.cs
    index 4eba60232f76..7ccc914cbcb5 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/AutomaticResolutionProperties.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/AutomaticResolutionProperties.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class AutomaticResolutionProperties : IUtf8JsonSerializable, IJ
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode
                     throw new FormatException($"The model {nameof(AutomaticResolutionProperties)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(ResourceId))
                 {
                     writer.WritePropertyName("moveResourceId"u8);
    @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             AutomaticResolutionProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/DiskEncryptionSetResourceSettings.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/DiskEncryptionSetResourceSettings.Serialization.cs
    index ac9103d10d87..a84e0ff05b2b 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/DiskEncryptionSetResourceSettings.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/DiskEncryptionSetResourceSettings.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DiskEncryptionSetResourceSettings : IUtf8JsonSerializable,
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,35 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer,
                     throw new FormatException($"The model {nameof(DiskEncryptionSetResourceSettings)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            writer.WritePropertyName("resourceType"u8);
    -            writer.WriteStringValue(ResourceType);
    -            if (Optional.IsDefined(TargetResourceName))
    -            {
    -                writer.WritePropertyName("targetResourceName"u8);
    -                writer.WriteStringValue(TargetResourceName);
    -            }
    -            if (Optional.IsDefined(TargetResourceGroupName))
    -            {
    -                writer.WritePropertyName("targetResourceGroupName"u8);
    -                writer.WriteStringValue(TargetResourceGroupName);
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             DiskEncryptionSetResourceSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/KeyVaultResourceSettings.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/KeyVaultResourceSettings.Serialization.cs
    index 482f49973d3c..29d84c50fef2 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/KeyVaultResourceSettings.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/KeyVaultResourceSettings.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class KeyVaultResourceSettings : IUtf8JsonSerializable, IJsonMode
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,35 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead
                     throw new FormatException($"The model {nameof(KeyVaultResourceSettings)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            writer.WritePropertyName("resourceType"u8);
    -            writer.WriteStringValue(ResourceType);
    -            if (Optional.IsDefined(TargetResourceName))
    -            {
    -                writer.WritePropertyName("targetResourceName"u8);
    -                writer.WriteStringValue(TargetResourceName);
    -            }
    -            if (Optional.IsDefined(TargetResourceGroupName))
    -            {
    -                writer.WritePropertyName("targetResourceGroupName"u8);
    -                writer.WriteStringValue(TargetResourceGroupName);
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             KeyVaultResourceSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/LoadBalancerBackendAddressPoolReferenceInfo.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/LoadBalancerBackendAddressPoolReferenceInfo.Serialization.cs
    index 292d5984b3dc..9ad03323bcfc 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/LoadBalancerBackendAddressPoolReferenceInfo.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/LoadBalancerBackendAddressPoolReferenceInfo.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class LoadBalancerBackendAddressPoolReferenceInfo : IUtf8JsonSeri
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,30 +34,7 @@ void IJsonModel.Write(Utf8JsonWrite
                     throw new FormatException($"The model {nameof(LoadBalancerBackendAddressPoolReferenceInfo)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            if (Optional.IsDefined(Name))
    -            {
    -                writer.WritePropertyName("name"u8);
    -                writer.WriteStringValue(Name);
    -            }
    -            writer.WritePropertyName("sourceArmResourceId"u8);
    -            writer.WriteStringValue(SourceArmResourceId);
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             LoadBalancerBackendAddressPoolReferenceInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/LoadBalancerBackendAddressPoolResourceSettings.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/LoadBalancerBackendAddressPoolResourceSettings.Serialization.cs
    index 95132b0c4d9e..428308c4be71 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/LoadBalancerBackendAddressPoolResourceSettings.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/LoadBalancerBackendAddressPoolResourceSettings.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class LoadBalancerBackendAddressPoolResourceSettings : IUtf8JsonS
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWr
                     throw new FormatException($"The model {nameof(LoadBalancerBackendAddressPoolResourceSettings)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(Name))
                 {
                     writer.WritePropertyName("name"u8);
    @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWr
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             LoadBalancerBackendAddressPoolResourceSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/LoadBalancerFrontendIPConfigurationResourceSettings.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/LoadBalancerFrontendIPConfigurationResourceSettings.Serialization.cs
    index 2d1fd4c10402..fdadda3d6ebf 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/LoadBalancerFrontendIPConfigurationResourceSettings.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/LoadBalancerFrontendIPConfigurationResourceSettings.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class LoadBalancerFrontendIPConfigurationResourceSettings : IUtf8
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8J
                     throw new FormatException($"The model {nameof(LoadBalancerFrontendIPConfigurationResourceSettings)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(Name))
                 {
                     writer.WritePropertyName("name"u8);
    @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8J
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             LoadBalancerFrontendIPConfigurationResourceSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/LoadBalancerNatRuleReferenceInfo.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/LoadBalancerNatRuleReferenceInfo.Serialization.cs
    index 48a7d8bfebb9..9a100af7a741 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/LoadBalancerNatRuleReferenceInfo.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/LoadBalancerNatRuleReferenceInfo.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class LoadBalancerNatRuleReferenceInfo : IUtf8JsonSerializable, I
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,30 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, M
                     throw new FormatException($"The model {nameof(LoadBalancerNatRuleReferenceInfo)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            if (Optional.IsDefined(Name))
    -            {
    -                writer.WritePropertyName("name"u8);
    -                writer.WriteStringValue(Name);
    -            }
    -            writer.WritePropertyName("sourceArmResourceId"u8);
    -            writer.WriteStringValue(SourceArmResourceId);
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             LoadBalancerNatRuleReferenceInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/LoadBalancerResourceSettings.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/LoadBalancerResourceSettings.Serialization.cs
    index 343df6b939a6..a894ea5bff05 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/LoadBalancerResourceSettings.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/LoadBalancerResourceSettings.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class LoadBalancerResourceSettings : IUtf8JsonSerializable, IJson
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model
                     throw new FormatException($"The model {nameof(LoadBalancerResourceSettings)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsCollectionDefined(Tags))
                 {
                     writer.WritePropertyName("tags"u8);
    @@ -67,34 +76,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model
                     writer.WritePropertyName("zones"u8);
                     writer.WriteStringValue(Zones);
                 }
    -            writer.WritePropertyName("resourceType"u8);
    -            writer.WriteStringValue(ResourceType);
    -            if (Optional.IsDefined(TargetResourceName))
    -            {
    -                writer.WritePropertyName("targetResourceName"u8);
    -                writer.WriteStringValue(TargetResourceName);
    -            }
    -            if (Optional.IsDefined(TargetResourceGroupName))
    -            {
    -                writer.WritePropertyName("targetResourceGroupName"u8);
    -                writer.WriteStringValue(TargetResourceGroupName);
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             LoadBalancerResourceSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/ManualResolutionProperties.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/ManualResolutionProperties.Serialization.cs
    index 0396dfb8ca81..021b768b076d 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/ManualResolutionProperties.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/ManualResolutionProperties.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class ManualResolutionProperties : IUtf8JsonSerializable, IJson
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe
                     throw new FormatException($"The model {nameof(ManualResolutionProperties)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(TargetId))
                 {
                     writer.WritePropertyName("targetId"u8);
    @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             ManualResolutionProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoveCollectionPropertiesErrors.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoveCollectionPropertiesErrors.Serialization.cs
    index 2ab2656c2b52..9d4ca9100773 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoveCollectionPropertiesErrors.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoveCollectionPropertiesErrors.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class MoveCollectionPropertiesErrors : IUtf8JsonSerializable, I
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,28 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod
                     throw new FormatException($"The model {nameof(MoveCollectionPropertiesErrors)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            if (Optional.IsDefined(Properties))
    -            {
    -                writer.WritePropertyName("properties"u8);
    -                JsonSerializer.Serialize(writer, Properties);
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             MoveCollectionPropertiesErrors IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoveCollectionResultList.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoveCollectionResultList.Serialization.cs
    index 696c1d32a8cc..7a3708a35eef 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoveCollectionResultList.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoveCollectionResultList.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class MoveCollectionResultList : IUtf8JsonSerializable, IJsonMo
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead
                     throw new FormatException($"The model {nameof(MoveCollectionResultList)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsCollectionDefined(Value))
                 {
                     writer.WritePropertyName("value"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             MoveCollectionResultList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoveErrorInfo.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoveErrorInfo.Serialization.cs
    index 287d4ad8ba70..703818467f24 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoveErrorInfo.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoveErrorInfo.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class MoveErrorInfo : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt
                     throw new FormatException($"The model {nameof(MoveErrorInfo)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (options.Format != "W" && Optional.IsCollectionDefined(InfoMoverResources))
                 {
                     writer.WritePropertyName("moveResources"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             MoveErrorInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoveResourceError.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoveResourceError.Serialization.cs
    index 719e37b823bb..43f91d736ccf 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoveResourceError.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoveResourceError.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class MoveResourceError : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite
                     throw new FormatException($"The model {nameof(MoveResourceError)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(Properties))
                 {
                     writer.WritePropertyName("properties"u8);
    @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             MoveResourceError IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoveResourcePropertiesErrors.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoveResourcePropertiesErrors.Serialization.cs
    index c3e3c31da567..29ff7b4aa41d 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoveResourcePropertiesErrors.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoveResourcePropertiesErrors.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class MoveResourcePropertiesErrors : IUtf8JsonSerializable, IJs
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,28 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model
                     throw new FormatException($"The model {nameof(MoveResourcePropertiesErrors)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            if (Optional.IsDefined(Properties))
    -            {
    -                writer.WritePropertyName("properties"u8);
    -                JsonSerializer.Serialize(writer, Properties);
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             MoveResourcePropertiesErrors IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverAvailabilitySetResourceSettings.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverAvailabilitySetResourceSettings.Serialization.cs
    index 53476d14aae1..80f023e7951d 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverAvailabilitySetResourceSettings.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverAvailabilitySetResourceSettings.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class MoverAvailabilitySetResourceSettings : IUtf8JsonSerializabl
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter write
                     throw new FormatException($"The model {nameof(MoverAvailabilitySetResourceSettings)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsCollectionDefined(Tags))
                 {
                     writer.WritePropertyName("tags"u8);
    @@ -61,34 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter write
                         writer.WriteNull("updateDomain");
                     }
                 }
    -            writer.WritePropertyName("resourceType"u8);
    -            writer.WriteStringValue(ResourceType);
    -            if (Optional.IsDefined(TargetResourceName))
    -            {
    -                writer.WritePropertyName("targetResourceName"u8);
    -                writer.WriteStringValue(TargetResourceName);
    -            }
    -            if (Optional.IsDefined(TargetResourceGroupName))
    -            {
    -                writer.WritePropertyName("targetResourceGroupName"u8);
    -                writer.WriteStringValue(TargetResourceGroupName);
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             MoverAvailabilitySetResourceSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverBulkRemoveContent.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverBulkRemoveContent.Serialization.cs
    index 1f815d9728c5..48edacabb2f8 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverBulkRemoveContent.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverBulkRemoveContent.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class MoverBulkRemoveContent : IUtf8JsonSerializable, IJsonModel<
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader
                     throw new FormatException($"The model {nameof(MoverBulkRemoveContent)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(ValidateOnly))
                 {
                     writer.WritePropertyName("validateOnly"u8);
    @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             MoverBulkRemoveContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverCommitContent.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverCommitContent.Serialization.cs
    index 07e13aece1b5..97e3dcba153b 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverCommitContent.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverCommitContent.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class MoverCommitContent : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit
                     throw new FormatException($"The model {nameof(MoverCommitContent)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(ValidateOnly))
                 {
                     writer.WritePropertyName("validateOnly"u8);
    @@ -63,7 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             MoverCommitContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverDiscardContent.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverDiscardContent.Serialization.cs
    index 46ed052320d5..2f0fe1e4de0d 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverDiscardContent.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverDiscardContent.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class MoverDiscardContent : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri
                     throw new FormatException($"The model {nameof(MoverDiscardContent)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(ValidateOnly))
                 {
                     writer.WritePropertyName("validateOnly"u8);
    @@ -63,7 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             MoverDiscardContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverDisplayInfo.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverDisplayInfo.Serialization.cs
    index 4deaeaca2ca6..c092182b5a8f 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverDisplayInfo.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverDisplayInfo.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class MoverDisplayInfo : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter
                     throw new FormatException($"The model {nameof(MoverDisplayInfo)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(Provider))
                 {
                     writer.WritePropertyName("provider"u8);
    @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             MoverDisplayInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverOperationErrorAdditionalInfo.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverOperationErrorAdditionalInfo.Serialization.cs
    index 3b8c24a7d63a..4085ecbf744a 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverOperationErrorAdditionalInfo.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverOperationErrorAdditionalInfo.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class MoverOperationErrorAdditionalInfo : IUtf8JsonSerializable,
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer,
                     throw new FormatException($"The model {nameof(MoverOperationErrorAdditionalInfo)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (options.Format != "W" && Optional.IsDefined(OperationErrorAdditionalInfoType))
                 {
                     writer.WritePropertyName("type"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer,
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             MoverOperationErrorAdditionalInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverOperationStatus.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverOperationStatus.Serialization.cs
    index 5b5cc956df84..702cc1534d4d 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverOperationStatus.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverOperationStatus.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class MoverOperationStatus : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr
                     throw new FormatException($"The model {nameof(MoverOperationStatus)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (options.Format != "W" && Optional.IsDefined(Id))
                 {
                     writer.WritePropertyName("id"u8);
    @@ -90,7 +98,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             MoverOperationStatus IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverOperationStatusError.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverOperationStatusError.Serialization.cs
    index e5c8cbb3a469..5127056eb08c 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverOperationStatusError.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverOperationStatusError.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class MoverOperationStatusError : IUtf8JsonSerializable, IJsonMod
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea
                     throw new FormatException($"The model {nameof(MoverOperationStatusError)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (options.Format != "W" && Optional.IsDefined(Code))
                 {
                     writer.WritePropertyName("code"u8);
    @@ -78,7 +86,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             MoverOperationStatusError IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverOperationsDiscovery.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverOperationsDiscovery.Serialization.cs
    index 09cab7b0884d..5d846e24c679 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverOperationsDiscovery.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverOperationsDiscovery.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class MoverOperationsDiscovery : IUtf8JsonSerializable, IJsonMode
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead
                     throw new FormatException($"The model {nameof(MoverOperationsDiscovery)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(Name))
                 {
                     writer.WritePropertyName("name"u8);
    @@ -73,7 +81,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             MoverOperationsDiscovery IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverOperationsDiscoveryList.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverOperationsDiscoveryList.Serialization.cs
    index d7a977d8195a..ffc59e91d306 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverOperationsDiscoveryList.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverOperationsDiscoveryList.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class MoverOperationsDiscoveryList : IUtf8JsonSerializable, IJs
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model
                     throw new FormatException($"The model {nameof(MoverOperationsDiscoveryList)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsCollectionDefined(Value))
                 {
                     writer.WritePropertyName("value"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             MoverOperationsDiscoveryList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverPrepareContent.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverPrepareContent.Serialization.cs
    index d78b8b0df062..1937846d1885 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverPrepareContent.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverPrepareContent.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class MoverPrepareContent : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri
                     throw new FormatException($"The model {nameof(MoverPrepareContent)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(ValidateOnly))
                 {
                     writer.WritePropertyName("validateOnly"u8);
    @@ -63,7 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             MoverPrepareContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceDependency.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceDependency.Serialization.cs
    index f6052ff63eca..1a5dc0ecf6bd 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceDependency.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceDependency.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class MoverResourceDependency : IUtf8JsonSerializable, IJsonModel
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade
                     throw new FormatException($"The model {nameof(MoverResourceDependency)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(Id))
                 {
                     writer.WritePropertyName("id"u8);
    @@ -76,7 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             MoverResourceDependency IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceDependencyOverride.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceDependencyOverride.Serialization.cs
    index eb7f237b5725..282be749883f 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceDependencyOverride.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceDependencyOverride.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class MoverResourceDependencyOverride : IUtf8JsonSerializable, IJ
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo
                     throw new FormatException($"The model {nameof(MoverResourceDependencyOverride)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(Id))
                 {
                     writer.WritePropertyName("id"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             MoverResourceDependencyOverride IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceJobStatus.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceJobStatus.Serialization.cs
    index 69c673fca7a6..63bec0be4e5c 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceJobStatus.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceJobStatus.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class MoverResourceJobStatus : IUtf8JsonSerializable, IJsonModel<
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader
                     throw new FormatException($"The model {nameof(MoverResourceJobStatus)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (options.Format != "W" && Optional.IsDefined(JobName))
                 {
                     writer.WritePropertyName("jobName"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             MoverResourceJobStatus IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceList.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceList.Serialization.cs
    index ab0478b9470f..4c8b875fec6d 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceList.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceList.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class MoverResourceList : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite
                     throw new FormatException($"The model {nameof(MoverResourceList)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsCollectionDefined(Value))
                 {
                     writer.WritePropertyName("value"u8);
    @@ -73,7 +81,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             MoverResourceList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceMoveContent.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceMoveContent.Serialization.cs
    index b6a23cae2e91..2ab41ce465b7 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceMoveContent.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceMoveContent.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class MoverResourceMoveContent : IUtf8JsonSerializable, IJsonMode
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead
                     throw new FormatException($"The model {nameof(MoverResourceMoveContent)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(ValidateOnly))
                 {
                     writer.WritePropertyName("validateOnly"u8);
    @@ -63,7 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             MoverResourceMoveContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceProperties.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceProperties.Serialization.cs
    index 78d685d57b3b..ded2e29864a0 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceProperties.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceProperties.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class MoverResourceProperties : IUtf8JsonSerializable, IJsonModel
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade
                     throw new FormatException($"The model {nameof(MoverResourceProperties)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (options.Format != "W" && Optional.IsDefined(ProvisioningState))
                 {
                     writer.WritePropertyName("provisioningState"u8);
    @@ -138,7 +146,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             MoverResourceProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourcePropertiesMoveStatus.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourcePropertiesMoveStatus.Serialization.cs
    index 87b2f0c48d0c..16947f2a579c 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourcePropertiesMoveStatus.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourcePropertiesMoveStatus.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class MoverResourcePropertiesMoveStatus : IUtf8JsonSerializable,
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,52 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer,
                     throw new FormatException($"The model {nameof(MoverResourcePropertiesMoveStatus)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            if (options.Format != "W" && Optional.IsDefined(MoveState))
    -            {
    -                writer.WritePropertyName("moveState"u8);
    -                writer.WriteStringValue(MoveState.Value.ToString());
    -            }
    -            if (Optional.IsDefined(JobStatus))
    -            {
    -                if (JobStatus != null)
    -                {
    -                    writer.WritePropertyName("jobStatus"u8);
    -                    writer.WriteObjectValue(JobStatus, options);
    -                }
    -                else
    -                {
    -                    writer.WriteNull("jobStatus");
    -                }
    -            }
    -            if (Optional.IsDefined(Errors))
    -            {
    -                if (Errors != null)
    -                {
    -                    writer.WritePropertyName("errors"u8);
    -                    writer.WriteObjectValue(Errors, options);
    -                }
    -                else
    -                {
    -                    writer.WriteNull("errors");
    -                }
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             MoverResourcePropertiesMoveStatus IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceReferenceInfo.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceReferenceInfo.Serialization.cs
    index d9036742b4dd..41132620ccbb 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceReferenceInfo.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceReferenceInfo.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class MoverResourceReferenceInfo : IUtf8JsonSerializable, IJsonMo
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe
                     throw new FormatException($"The model {nameof(MoverResourceReferenceInfo)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 writer.WritePropertyName("sourceArmResourceId"u8);
                 writer.WriteStringValue(SourceArmResourceId);
                 if (options.Format != "W" && _serializedAdditionalRawData != null)
    @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             MoverResourceReferenceInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceSetPatch.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceSetPatch.Serialization.cs
    index 1c2189981b2a..d654e9d1d0aa 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceSetPatch.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceSetPatch.Serialization.cs
    @@ -19,6 +19,15 @@ public partial class MoverResourceSetPatch : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW
                     throw new FormatException($"The model {nameof(MoverResourceSetPatch)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsCollectionDefined(Tags))
                 {
                     writer.WritePropertyName("tags"u8);
    @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             MoverResourceSetPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceSetProperties.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceSetProperties.Serialization.cs
    index 520b62aeae62..88aa5db1764e 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceSetProperties.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceSetProperties.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class MoverResourceSetProperties : IUtf8JsonSerializable, IJsonMo
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe
                     throw new FormatException($"The model {nameof(MoverResourceSetProperties)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(SourceLocation))
                 {
                     writer.WritePropertyName("sourceRegion"u8);
    @@ -83,7 +91,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             MoverResourceSetProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceSettings.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceSettings.Serialization.cs
    index 5bb39afc4933..c677da008d60 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceSettings.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceSettings.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class MoverResourceSettings : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW
                     throw new FormatException($"The model {nameof(MoverResourceSettings)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 writer.WritePropertyName("resourceType"u8);
                 writer.WriteStringValue(ResourceType);
                 if (Optional.IsDefined(TargetResourceName))
    @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             MoverResourceSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceStatus.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceStatus.Serialization.cs
    index f924df193036..3736ba9d76ce 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceStatus.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceStatus.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class MoverResourceStatus : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri
                     throw new FormatException($"The model {nameof(MoverResourceStatus)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (options.Format != "W" && Optional.IsDefined(MoveState))
                 {
                     writer.WritePropertyName("moveState"u8);
    @@ -70,7 +78,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             MoverResourceStatus IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverSummaryItemInfo.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverSummaryItemInfo.Serialization.cs
    index cf63a2964ce3..25709f59f206 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverSummaryItemInfo.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverSummaryItemInfo.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class MoverSummaryItemInfo : IUtf8JsonSerializable, IJsonModel<
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr
                     throw new FormatException($"The model {nameof(MoverSummaryItemInfo)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(Count))
                 {
                     writer.WritePropertyName("count"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             MoverSummaryItemInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverSummaryList.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverSummaryList.Serialization.cs
    index 0dc5c54c308a..06e1741dbf32 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverSummaryList.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverSummaryList.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class MoverSummaryList : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter
                     throw new FormatException($"The model {nameof(MoverSummaryList)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(FieldName))
                 {
                     writer.WritePropertyName("fieldName"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             MoverSummaryList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverUnresolvedDependency.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverUnresolvedDependency.Serialization.cs
    index a9d7490a9408..98585180b99e 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverUnresolvedDependency.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverUnresolvedDependency.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class MoverUnresolvedDependency : IUtf8JsonSerializable, IJsonMod
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea
                     throw new FormatException($"The model {nameof(MoverUnresolvedDependency)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(Count))
                 {
                     writer.WritePropertyName("count"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             MoverUnresolvedDependency IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverUnresolvedDependencyList.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverUnresolvedDependencyList.Serialization.cs
    index 8e1d771beb71..1d06718af5de 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverUnresolvedDependencyList.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverUnresolvedDependencyList.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class MoverUnresolvedDependencyList : IUtf8JsonSerializable, IJ
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode
                     throw new FormatException($"The model {nameof(MoverUnresolvedDependencyList)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsCollectionDefined(Value))
                 {
                     writer.WritePropertyName("value"u8);
    @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             MoverUnresolvedDependencyList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverVirtualNetworkResourceSettings.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverVirtualNetworkResourceSettings.Serialization.cs
    index 5c1de0050420..052ba16e79fa 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverVirtualNetworkResourceSettings.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverVirtualNetworkResourceSettings.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class MoverVirtualNetworkResourceSettings : IUtf8JsonSerializable
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer
                     throw new FormatException($"The model {nameof(MoverVirtualNetworkResourceSettings)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsCollectionDefined(Tags))
                 {
                     if (Tags != null)
    @@ -107,34 +116,6 @@ void IJsonModel.Write(Utf8JsonWriter writer
                         writer.WriteNull("subnets");
                     }
                 }
    -            writer.WritePropertyName("resourceType"u8);
    -            writer.WriteStringValue(ResourceType);
    -            if (Optional.IsDefined(TargetResourceName))
    -            {
    -                writer.WritePropertyName("targetResourceName"u8);
    -                writer.WriteStringValue(TargetResourceName);
    -            }
    -            if (Optional.IsDefined(TargetResourceGroupName))
    -            {
    -                writer.WritePropertyName("targetResourceGroupName"u8);
    -                writer.WriteStringValue(TargetResourceGroupName);
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             MoverVirtualNetworkResourceSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/NetworkInterfaceResourceSettings.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/NetworkInterfaceResourceSettings.Serialization.cs
    index 0a35e1f861b5..e8f19ead7832 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/NetworkInterfaceResourceSettings.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/NetworkInterfaceResourceSettings.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class NetworkInterfaceResourceSettings : IUtf8JsonSerializable, I
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, M
                     throw new FormatException($"The model {nameof(NetworkInterfaceResourceSettings)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsCollectionDefined(Tags))
                 {
                     writer.WritePropertyName("tags"u8);
    @@ -59,34 +68,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M
                         writer.WriteNull("enableAcceleratedNetworking");
                     }
                 }
    -            writer.WritePropertyName("resourceType"u8);
    -            writer.WriteStringValue(ResourceType);
    -            if (Optional.IsDefined(TargetResourceName))
    -            {
    -                writer.WritePropertyName("targetResourceName"u8);
    -                writer.WriteStringValue(TargetResourceName);
    -            }
    -            if (Optional.IsDefined(TargetResourceGroupName))
    -            {
    -                writer.WritePropertyName("targetResourceGroupName"u8);
    -                writer.WriteStringValue(TargetResourceGroupName);
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             NetworkInterfaceResourceSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/NetworkSecurityGroupResourceReferenceInfo.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/NetworkSecurityGroupResourceReferenceInfo.Serialization.cs
    index deb03a6ce6ff..b61f0dc42809 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/NetworkSecurityGroupResourceReferenceInfo.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/NetworkSecurityGroupResourceReferenceInfo.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class NetworkSecurityGroupResourceReferenceInfo : IUtf8JsonSeri
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,25 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter
                     throw new FormatException($"The model {nameof(NetworkSecurityGroupResourceReferenceInfo)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            writer.WritePropertyName("sourceArmResourceId"u8);
    -            writer.WriteStringValue(SourceArmResourceId);
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             NetworkSecurityGroupResourceReferenceInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/NetworkSecurityGroupResourceSettings.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/NetworkSecurityGroupResourceSettings.Serialization.cs
    index d5f891f75855..3a0eac358577 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/NetworkSecurityGroupResourceSettings.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/NetworkSecurityGroupResourceSettings.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class NetworkSecurityGroupResourceSettings : IUtf8JsonSerializabl
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter write
                     throw new FormatException($"The model {nameof(NetworkSecurityGroupResourceSettings)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsCollectionDefined(Tags))
                 {
                     writer.WritePropertyName("tags"u8);
    @@ -47,34 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter write
                     }
                     writer.WriteEndArray();
                 }
    -            writer.WritePropertyName("resourceType"u8);
    -            writer.WriteStringValue(ResourceType);
    -            if (Optional.IsDefined(TargetResourceName))
    -            {
    -                writer.WritePropertyName("targetResourceName"u8);
    -                writer.WriteStringValue(TargetResourceName);
    -            }
    -            if (Optional.IsDefined(TargetResourceGroupName))
    -            {
    -                writer.WritePropertyName("targetResourceGroupName"u8);
    -                writer.WriteStringValue(TargetResourceGroupName);
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             NetworkSecurityGroupResourceSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/NetworkSecurityGroupSecurityRule.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/NetworkSecurityGroupSecurityRule.Serialization.cs
    index 550fe0749e5e..0c7eab0ca8ba 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/NetworkSecurityGroupSecurityRule.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/NetworkSecurityGroupSecurityRule.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class NetworkSecurityGroupSecurityRule : IUtf8JsonSerializable, I
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M
                     throw new FormatException($"The model {nameof(NetworkSecurityGroupSecurityRule)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(Name))
                 {
                     writer.WritePropertyName("name"u8);
    @@ -91,7 +99,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             NetworkSecurityGroupSecurityRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/NicIPConfigurationResourceSettings.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/NicIPConfigurationResourceSettings.Serialization.cs
    index 5a9e36497df2..982a817bb70b 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/NicIPConfigurationResourceSettings.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/NicIPConfigurationResourceSettings.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class NicIPConfigurationResourceSettings : IUtf8JsonSerializable,
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer,
                     throw new FormatException($"The model {nameof(NicIPConfigurationResourceSettings)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(Name))
                 {
                     writer.WritePropertyName("name"u8);
    @@ -91,7 +99,6 @@ void IJsonModel.Write(Utf8JsonWriter writer,
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             NicIPConfigurationResourceSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/ProxyResourceReferenceInfo.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/ProxyResourceReferenceInfo.Serialization.cs
    index c5b7791ae582..9c8dff8a90ad 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/ProxyResourceReferenceInfo.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/ProxyResourceReferenceInfo.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class ProxyResourceReferenceInfo : IUtf8JsonSerializable, IJsonMo
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,30 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe
                     throw new FormatException($"The model {nameof(ProxyResourceReferenceInfo)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(Name))
                 {
                     writer.WritePropertyName("name"u8);
                     writer.WriteStringValue(Name);
                 }
    -            writer.WritePropertyName("sourceArmResourceId"u8);
    -            writer.WriteStringValue(SourceArmResourceId);
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             ProxyResourceReferenceInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/PublicIPAddressResourceSettings.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/PublicIPAddressResourceSettings.Serialization.cs
    index 898d3c7710bf..ff97824b3a11 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/PublicIPAddressResourceSettings.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/PublicIPAddressResourceSettings.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class PublicIPAddressResourceSettings : IUtf8JsonSerializable, IJ
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo
                     throw new FormatException($"The model {nameof(PublicIPAddressResourceSettings)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsCollectionDefined(Tags))
                 {
                     writer.WritePropertyName("tags"u8);
    @@ -62,34 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo
                     writer.WritePropertyName("zones"u8);
                     writer.WriteStringValue(Zones);
                 }
    -            writer.WritePropertyName("resourceType"u8);
    -            writer.WriteStringValue(ResourceType);
    -            if (Optional.IsDefined(TargetResourceName))
    -            {
    -                writer.WritePropertyName("targetResourceName"u8);
    -                writer.WriteStringValue(TargetResourceName);
    -            }
    -            if (Optional.IsDefined(TargetResourceGroupName))
    -            {
    -                writer.WritePropertyName("targetResourceGroupName"u8);
    -                writer.WriteStringValue(TargetResourceGroupName);
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             PublicIPAddressResourceSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/PublicIPReferenceInfo.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/PublicIPReferenceInfo.Serialization.cs
    index c337b18ecb70..77e6b0bb99c7 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/PublicIPReferenceInfo.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/PublicIPReferenceInfo.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class PublicIPReferenceInfo : IUtf8JsonSerializable, IJsonModel
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,25 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW
                     throw new FormatException($"The model {nameof(PublicIPReferenceInfo)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            writer.WritePropertyName("sourceArmResourceId"u8);
    -            writer.WriteStringValue(SourceArmResourceId);
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             PublicIPReferenceInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/RequiredForResourcesList.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/RequiredForResourcesList.Serialization.cs
    index f63948ede8cc..0668220e3302 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/RequiredForResourcesList.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/RequiredForResourcesList.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class RequiredForResourcesList : IUtf8JsonSerializable, IJsonMode
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead
                     throw new FormatException($"The model {nameof(RequiredForResourcesList)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsCollectionDefined(SourceIds))
                 {
                     writer.WritePropertyName("sourceIds"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             RequiredForResourcesList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/ResourceGroupResourceSettings.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/ResourceGroupResourceSettings.Serialization.cs
    index e021cc3895c6..1c1f25a0890a 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/ResourceGroupResourceSettings.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/ResourceGroupResourceSettings.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class ResourceGroupResourceSettings : IUtf8JsonSerializable, IJso
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,35 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode
                     throw new FormatException($"The model {nameof(ResourceGroupResourceSettings)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            writer.WritePropertyName("resourceType"u8);
    -            writer.WriteStringValue(ResourceType);
    -            if (Optional.IsDefined(TargetResourceName))
    -            {
    -                writer.WritePropertyName("targetResourceName"u8);
    -                writer.WriteStringValue(TargetResourceName);
    -            }
    -            if (Optional.IsDefined(TargetResourceGroupName))
    -            {
    -                writer.WritePropertyName("targetResourceGroupName"u8);
    -                writer.WriteStringValue(TargetResourceGroupName);
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             ResourceGroupResourceSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/SqlDatabaseResourceSettings.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/SqlDatabaseResourceSettings.Serialization.cs
    index 8fe119be8501..cadfe89a5683 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/SqlDatabaseResourceSettings.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/SqlDatabaseResourceSettings.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class SqlDatabaseResourceSettings : IUtf8JsonSerializable, IJsonM
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR
                     throw new FormatException($"The model {nameof(SqlDatabaseResourceSettings)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsCollectionDefined(Tags))
                 {
                     writer.WritePropertyName("tags"u8);
    @@ -42,34 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR
                     writer.WritePropertyName("zoneRedundant"u8);
                     writer.WriteStringValue(ZoneRedundant.Value.ToString());
                 }
    -            writer.WritePropertyName("resourceType"u8);
    -            writer.WriteStringValue(ResourceType);
    -            if (Optional.IsDefined(TargetResourceName))
    -            {
    -                writer.WritePropertyName("targetResourceName"u8);
    -                writer.WriteStringValue(TargetResourceName);
    -            }
    -            if (Optional.IsDefined(TargetResourceGroupName))
    -            {
    -                writer.WritePropertyName("targetResourceGroupName"u8);
    -                writer.WriteStringValue(TargetResourceGroupName);
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             SqlDatabaseResourceSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/SqlElasticPoolResourceSettings.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/SqlElasticPoolResourceSettings.Serialization.cs
    index 83c6cf0139ab..096e04ecfd33 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/SqlElasticPoolResourceSettings.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/SqlElasticPoolResourceSettings.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class SqlElasticPoolResourceSettings : IUtf8JsonSerializable, IJs
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod
                     throw new FormatException($"The model {nameof(SqlElasticPoolResourceSettings)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsCollectionDefined(Tags))
                 {
                     writer.WritePropertyName("tags"u8);
    @@ -42,34 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod
                     writer.WritePropertyName("zoneRedundant"u8);
                     writer.WriteStringValue(ZoneRedundant.Value.ToString());
                 }
    -            writer.WritePropertyName("resourceType"u8);
    -            writer.WriteStringValue(ResourceType);
    -            if (Optional.IsDefined(TargetResourceName))
    -            {
    -                writer.WritePropertyName("targetResourceName"u8);
    -                writer.WriteStringValue(TargetResourceName);
    -            }
    -            if (Optional.IsDefined(TargetResourceGroupName))
    -            {
    -                writer.WritePropertyName("targetResourceGroupName"u8);
    -                writer.WriteStringValue(TargetResourceGroupName);
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             SqlElasticPoolResourceSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/SqlServerResourceSettings.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/SqlServerResourceSettings.Serialization.cs
    index c483500fd9e6..cb869a0a6295 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/SqlServerResourceSettings.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/SqlServerResourceSettings.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class SqlServerResourceSettings : IUtf8JsonSerializable, IJsonMod
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,35 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea
                     throw new FormatException($"The model {nameof(SqlServerResourceSettings)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            writer.WritePropertyName("resourceType"u8);
    -            writer.WriteStringValue(ResourceType);
    -            if (Optional.IsDefined(TargetResourceName))
    -            {
    -                writer.WritePropertyName("targetResourceName"u8);
    -                writer.WriteStringValue(TargetResourceName);
    -            }
    -            if (Optional.IsDefined(TargetResourceGroupName))
    -            {
    -                writer.WritePropertyName("targetResourceGroupName"u8);
    -                writer.WriteStringValue(TargetResourceGroupName);
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             SqlServerResourceSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/SubnetReferenceInfo.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/SubnetReferenceInfo.Serialization.cs
    index 0e6873f34931..8d8efca15d72 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/SubnetReferenceInfo.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/SubnetReferenceInfo.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class SubnetReferenceInfo : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,30 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri
                     throw new FormatException($"The model {nameof(SubnetReferenceInfo)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            if (Optional.IsDefined(Name))
    -            {
    -                writer.WritePropertyName("name"u8);
    -                writer.WriteStringValue(Name);
    -            }
    -            writer.WritePropertyName("sourceArmResourceId"u8);
    -            writer.WriteStringValue(SourceArmResourceId);
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             SubnetReferenceInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/SubnetResourceSettings.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/SubnetResourceSettings.Serialization.cs
    index ede004173abf..2061d8de513d 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/SubnetResourceSettings.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/SubnetResourceSettings.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class SubnetResourceSettings : IUtf8JsonSerializable, IJsonModel<
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader
                     throw new FormatException($"The model {nameof(SubnetResourceSettings)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(Name))
                 {
                     writer.WritePropertyName("name"u8);
    @@ -63,7 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             SubnetResourceSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/UnknownResourceSettings.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/UnknownResourceSettings.Serialization.cs
    index 19efa02169e8..8b7b964a0166 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/UnknownResourceSettings.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/UnknownResourceSettings.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class UnknownResourceSettings : IUtf8JsonSerializable, IJsonMod
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,35 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW
                     throw new FormatException($"The model {nameof(MoverResourceSettings)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            writer.WritePropertyName("resourceType"u8);
    -            writer.WriteStringValue(ResourceType);
    -            if (Optional.IsDefined(TargetResourceName))
    -            {
    -                writer.WritePropertyName("targetResourceName"u8);
    -                writer.WriteStringValue(TargetResourceName);
    -            }
    -            if (Optional.IsDefined(TargetResourceGroupName))
    -            {
    -                writer.WritePropertyName("targetResourceGroupName"u8);
    -                writer.WriteStringValue(TargetResourceGroupName);
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             MoverResourceSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/VirtualMachineResourceSettings.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/VirtualMachineResourceSettings.Serialization.cs
    index d8eb5cdc3a66..db701651c8bb 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/VirtualMachineResourceSettings.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/VirtualMachineResourceSettings.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class VirtualMachineResourceSettings : IUtf8JsonSerializable, IJs
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod
                     throw new FormatException($"The model {nameof(VirtualMachineResourceSettings)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsCollectionDefined(Tags))
                 {
                     writer.WritePropertyName("tags"u8);
    @@ -67,34 +76,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod
                     writer.WritePropertyName("targetAvailabilitySetId"u8);
                     writer.WriteStringValue(TargetAvailabilitySetId);
                 }
    -            writer.WritePropertyName("resourceType"u8);
    -            writer.WriteStringValue(ResourceType);
    -            if (Optional.IsDefined(TargetResourceName))
    -            {
    -                writer.WritePropertyName("targetResourceName"u8);
    -                writer.WriteStringValue(TargetResourceName);
    -            }
    -            if (Optional.IsDefined(TargetResourceGroupName))
    -            {
    -                writer.WritePropertyName("targetResourceGroupName"u8);
    -                writer.WriteStringValue(TargetResourceGroupName);
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             VirtualMachineResourceSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/MoverResourceData.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/MoverResourceData.Serialization.cs
    index 987f72c9a56c..bc16e69de122 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/MoverResourceData.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/MoverResourceData.Serialization.cs
    @@ -20,6 +20,15 @@ public partial class MoverResourceData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -27,48 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite
                     throw new FormatException($"The model {nameof(MoverResourceData)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(Properties))
                 {
                     writer.WritePropertyName("properties"u8);
                     writer.WriteObjectValue(Properties, options);
                 }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("id"u8);
    -                writer.WriteStringValue(Id);
    -            }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("name"u8);
    -                writer.WriteStringValue(Name);
    -            }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("type"u8);
    -                writer.WriteStringValue(ResourceType);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(SystemData))
    -            {
    -                writer.WritePropertyName("systemData"u8);
    -                JsonSerializer.Serialize(writer, SystemData);
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             MoverResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/MoverResourceSetData.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/MoverResourceSetData.Serialization.cs
    index 284eeb310661..7f28cb59bc2d 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/MoverResourceSetData.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/MoverResourceSetData.Serialization.cs
    @@ -20,6 +20,15 @@ public partial class MoverResourceSetData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr
                     throw new FormatException($"The model {nameof(MoverResourceSetData)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (options.Format != "W" && Optional.IsDefined(ETag))
                 {
                     writer.WritePropertyName("etag"u8);
    @@ -43,55 +52,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr
                     writer.WritePropertyName("properties"u8);
                     writer.WriteObjectValue(Properties, options);
                 }
    -            if (Optional.IsCollectionDefined(Tags))
    -            {
    -                writer.WritePropertyName("tags"u8);
    -                writer.WriteStartObject();
    -                foreach (var item in Tags)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -                    writer.WriteStringValue(item.Value);
    -                }
    -                writer.WriteEndObject();
    -            }
    -            writer.WritePropertyName("location"u8);
    -            writer.WriteStringValue(Location);
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("id"u8);
    -                writer.WriteStringValue(Id);
    -            }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("name"u8);
    -                writer.WriteStringValue(Name);
    -            }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("type"u8);
    -                writer.WriteStringValue(ResourceType);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(SystemData))
    -            {
    -                writer.WritePropertyName("systemData"u8);
    -                JsonSerializer.Serialize(writer, SystemData);
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             MoverResourceSetData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/autorest.md b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/autorest.md
    index 353a4254dbcd..078f86be85b0 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/autorest.md
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/autorest.md
    @@ -20,6 +20,7 @@ modelerfour:
       flatten-payloads: false
     deserialize-null-collection-as-null-value: true
     use-model-reader-writer: true
    +use-write-core: true
     
     rename-mapping:
       AffectedMoveResource.id: -|arm-id
    diff --git a/sdk/search/Azure.Search.Documents/src/Options/SearchOptions.cs b/sdk/search/Azure.Search.Documents/src/Options/SearchOptions.cs
    index 805bb24b1898..d46244da5496 100644
    --- a/sdk/search/Azure.Search.Documents/src/Options/SearchOptions.cs
    +++ b/sdk/search/Azure.Search.Documents/src/Options/SearchOptions.cs
    @@ -428,6 +428,7 @@ private static void Copy(SearchOptions source, SearchOptions destination)
                 destination.QuerySpeller = source.QuerySpeller;
                 destination.SemanticSearch = source.SemanticSearch;
                 destination.VectorSearch = source.VectorSearch;
    +            destination.HybridSearch  = source.HybridSearch;
             }
     
             /// 
    diff --git a/sdk/search/Azure.Search.Documents/tests/DocumentOperations/SearchTests.cs b/sdk/search/Azure.Search.Documents/tests/DocumentOperations/SearchTests.cs
    index f12f7aa34d9b..790a35da6b9a 100644
    --- a/sdk/search/Azure.Search.Documents/tests/DocumentOperations/SearchTests.cs
    +++ b/sdk/search/Azure.Search.Documents/tests/DocumentOperations/SearchTests.cs
    @@ -1028,6 +1028,11 @@ public void SearchOptionsCanBeCopied()
                     Queries = { new VectorizedQuery(VectorSearchEmbeddings.SearchVectorizeDescription) { KNearestNeighborsCount = 3, Fields = { "DescriptionVector", "CategoryVector" } } },
                     FilterMode = VectorFilterMode.PostFilter
                 };
    +            source.HybridSearch = new HybridSearch()
    +            {
    +                MaxTextRecallSize = 50,
    +                CountAndFacetMode = HybridCountAndFacetMode.CountRetrievableResults
    +            };
                 SearchOptions clonedSearchOptions = source.Clone();
     
                 CollectionAssert.AreEquivalent(source.Facets, clonedSearchOptions.Facets); // A non-null collection with multiple items
    @@ -1048,6 +1053,8 @@ public void SearchOptionsCanBeCopied()
                 Assert.AreEqual(source.SemanticSearch.MaxWait, clonedSearchOptions.SemanticSearch.MaxWait);
                 Assert.AreEqual(source.VectorSearch.Queries, clonedSearchOptions.VectorSearch.Queries);
                 Assert.AreEqual(source.VectorSearch.FilterMode, clonedSearchOptions.VectorSearch.FilterMode);
    +            Assert.AreEqual(source.HybridSearch.MaxTextRecallSize, clonedSearchOptions.HybridSearch.MaxTextRecallSize);
    +            Assert.AreEqual(source.HybridSearch.CountAndFacetMode, clonedSearchOptions.HybridSearch.CountAndFacetMode);
             }
     
             /* TODO: Enable these Track 1 tests when we have support for index creation
    diff --git a/sdk/search/tests.yml b/sdk/search/tests.yml
    index f718501131cf..def3db965465 100644
    --- a/sdk/search/tests.yml
    +++ b/sdk/search/tests.yml
    @@ -7,19 +7,6 @@ extends:
         SDKType: client
         TimeoutInMinutes: 240
         MaxParallel: 2
    -    # TODO: change 'Preview' cloud back to public after search RP fixes deletion metadata issue
    -    # https://github.com/Azure/azure-sdk-tools/issues/2216
    -    Clouds: 'Preview'
    -    SupportedClouds: 'Preview,UsGov'
    -    CloudConfig:
    -      Preview:
    -        ServiceConnection: azure-sdk-tests-preview
    -        SubscriptionConfigurationFilePaths:
    -          - eng/common/TestResources/sub-config/AzurePreviewMsft.json
    -        Location: 'westus'
    -      UsGov:
    -        ServiceConnection: usgov_azure-sdk-tests
    -        SubscriptionConfigurationFilePaths:
    -          - eng/common/TestResources/sub-config/AzureUsGovMsft.json
    +    SupportedClouds: 'Public,UsGov'
         EnvVars:
           AZURE_SEARCH_TEST_MODE: Live
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/CHANGELOG.md b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/CHANGELOG.md
    index bb4a10e2fdf2..b5d03ee2a0e0 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/CHANGELOG.md
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/CHANGELOG.md
    @@ -4,6 +4,8 @@
     
     ### Features Added
     
    +- Exposed `JsonModelWriteCore` for model serialization procedure.
    +
     ### Breaking Changes
     
     ### Bugs Fixed
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/api/Azure.ResourceManager.SecurityCenter.netstandard2.0.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/api/Azure.ResourceManager.SecurityCenter.netstandard2.0.cs
    index b5868ccf9142..7a6280bd854c 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/api/Azure.ResourceManager.SecurityCenter.netstandard2.0.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/api/Azure.ResourceManager.SecurityCenter.netstandard2.0.cs
    @@ -24,6 +24,7 @@ public AdaptiveApplicationControlGroupData() { }
             public Azure.ResourceManager.SecurityCenter.Models.RecommendationStatus? RecommendationStatus { get { throw null; } }
             public Azure.ResourceManager.SecurityCenter.Models.AdaptiveApplicationControlGroupSourceSystem? SourceSystem { get { throw null; } }
             public System.Collections.Generic.IList VmRecommendations { get { throw null; } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.AdaptiveApplicationControlGroupData 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.SecurityCenter.AdaptiveApplicationControlGroupData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -70,6 +71,7 @@ public AdaptiveNetworkHardeningData() { }
             public System.Collections.Generic.IList EffectiveNetworkSecurityGroups { get { throw null; } }
             public System.Collections.Generic.IList Rules { get { throw null; } }
             public System.DateTimeOffset? RulesCalculatedOn { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.AdaptiveNetworkHardeningData 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.SecurityCenter.AdaptiveNetworkHardeningData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -97,6 +99,7 @@ public partial class AdvancedThreatProtectionSettingData : Azure.ResourceManager
         {
             public AdvancedThreatProtectionSettingData() { }
             public bool? IsEnabled { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.AdvancedThreatProtectionSettingData 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.SecurityCenter.AdvancedThreatProtectionSettingData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -141,6 +144,7 @@ public partial class AutoProvisioningSettingData : Azure.ResourceManager.Models.
         {
             public AutoProvisioningSettingData() { }
             public Azure.ResourceManager.SecurityCenter.Models.AutoProvisionState? AutoProvision { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.AutoProvisioningSettingData 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.SecurityCenter.AutoProvisioningSettingData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -183,6 +187,7 @@ public partial class ComplianceResultData : Azure.ResourceManager.Models.Resourc
         {
             public ComplianceResultData() { }
             public Azure.ResourceManager.SecurityCenter.Models.SecurityAssessmentResourceStatus? ResourceStatus { get { throw null; } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.ComplianceResultData 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.SecurityCenter.ComplianceResultData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -231,6 +236,7 @@ public CustomAssessmentAutomationData() { }
             public string RemediationDescription { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.CustomAssessmentSeverity? Severity { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.CustomAssessmentAutomationSupportedCloud? SupportedCloud { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.CustomAssessmentAutomationData 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.SecurityCenter.CustomAssessmentAutomationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -278,6 +284,7 @@ public partial class CustomEntityStoreAssignmentData : Azure.ResourceManager.Mod
             public CustomEntityStoreAssignmentData() { }
             public string EntityStoreDatabaseLink { get { throw null; } set { } }
             public string Principal { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.CustomEntityStoreAssignmentData 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.SecurityCenter.CustomEntityStoreAssignmentData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -326,6 +333,7 @@ public DefenderForStorageSettingData() { }
             public Azure.ResourceManager.SecurityCenter.Models.ExtensionOperationStatus MalwareScanningOperationStatus { get { throw null; } }
             public Azure.Core.ResourceIdentifier ScanResultsEventGridTopicResourceId { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.ExtensionOperationStatus SensitiveDataDiscoveryOperationStatus { get { throw null; } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.DefenderForStorageSettingData 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.SecurityCenter.DefenderForStorageSettingData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -373,6 +381,7 @@ public DeviceSecurityGroupData() { }
             public System.Collections.Generic.IList DenylistRules { get { throw null; } }
             public System.Collections.Generic.IList ThresholdRules { get { throw null; } }
             public System.Collections.Generic.IList TimeWindowRules { get { throw null; } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.DeviceSecurityGroupData 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.SecurityCenter.DeviceSecurityGroupData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -402,6 +411,7 @@ public partial class DevOpsConfigurationData : Azure.ResourceManager.Models.Reso
         {
             public DevOpsConfigurationData() { }
             public Azure.ResourceManager.SecurityCenter.Models.DevOpsConfigurationProperties Properties { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.DevOpsConfigurationData 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.SecurityCenter.DevOpsConfigurationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -467,6 +477,7 @@ public partial class DevOpsOrgData : Azure.ResourceManager.Models.ResourceData,
         {
             public DevOpsOrgData() { }
             public Azure.ResourceManager.SecurityCenter.Models.DevOpsOrgProperties Properties { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.DevOpsOrgData 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.SecurityCenter.DevOpsOrgData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -514,6 +525,7 @@ public partial class DevOpsProjectData : Azure.ResourceManager.Models.ResourceDa
         {
             public DevOpsProjectData() { }
             public Azure.ResourceManager.SecurityCenter.Models.DevOpsProjectProperties Properties { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.DevOpsProjectData 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.SecurityCenter.DevOpsProjectData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -561,6 +573,7 @@ public partial class DevOpsRepositoryData : Azure.ResourceManager.Models.Resourc
         {
             public DevOpsRepositoryData() { }
             public Azure.ResourceManager.SecurityCenter.Models.DevOpsRepositoryProperties Properties { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.DevOpsRepositoryData 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.SecurityCenter.DevOpsRepositoryData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -610,6 +623,7 @@ public GovernanceAssignmentData() { }
             public string Owner { get { throw null; } set { } }
             public System.DateTimeOffset? RemediationDueOn { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.RemediationEta RemediationEta { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.GovernanceAssignmentData 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.SecurityCenter.GovernanceAssignmentData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -670,6 +684,7 @@ public GovernanceRuleData() { }
             public Azure.ResourceManager.SecurityCenter.Models.GovernanceRuleType? RuleType { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.GovernanceRuleSourceResourceType? SourceResourceType { get { throw null; } set { } }
             public System.Guid? TenantId { get { throw null; } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.GovernanceRuleData 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.SecurityCenter.GovernanceRuleData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -729,6 +744,7 @@ public IotSecurityAggregatedAlertData() { }
             public System.Collections.Generic.IDictionary Tags { get { throw null; } }
             public System.Collections.Generic.IReadOnlyList TopDevicesList { get { throw null; } }
             public string VendorName { get { throw null; } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.IotSecurityAggregatedAlertData 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.SecurityCenter.IotSecurityAggregatedAlertData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -781,6 +797,7 @@ public IotSecurityAggregatedRecommendationData() { }
             public Azure.ResourceManager.SecurityCenter.Models.ReportedSeverity? ReportedSeverity { get { throw null; } }
             public System.Collections.Generic.IDictionary Tags { get { throw null; } }
             public long? UnhealthyDeviceCount { get { throw null; } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.IotSecurityAggregatedRecommendationData 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.SecurityCenter.IotSecurityAggregatedRecommendationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -811,6 +828,7 @@ public IotSecuritySolutionAnalyticsModelData() { }
             public System.Collections.Generic.IList MostPrevalentDeviceRecommendations { get { throw null; } }
             public System.Collections.Generic.IList TopAlertedDevices { get { throw null; } }
             public long? UnhealthyDeviceCount { get { throw null; } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.IotSecuritySolutionAnalyticsModelData 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.SecurityCenter.IotSecuritySolutionAnalyticsModelData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -869,6 +887,7 @@ public IotSecuritySolutionData(Azure.Core.AzureLocation location) { }
             public Azure.ResourceManager.SecurityCenter.Models.UnmaskedIPLoggingStatus? UnmaskedIPLoggingStatus { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.UserDefinedResourcesProperties UserDefinedResources { get { throw null; } set { } }
             public string Workspace { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.IotSecuritySolutionData 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.SecurityCenter.IotSecuritySolutionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -926,6 +945,7 @@ public JitNetworkAccessPolicyData(System.Collections.Generic.IEnumerable Requests { get { throw null; } }
             public System.Collections.Generic.IList VirtualMachines { get { throw null; } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.JitNetworkAccessPolicyData 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.SecurityCenter.JitNetworkAccessPolicyData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -979,6 +999,7 @@ public RegulatoryComplianceAssessmentData() { }
             public int? SkippedResources { get { throw null; } }
             public Azure.ResourceManager.SecurityCenter.Models.RegulatoryComplianceState? State { get { throw null; } set { } }
             public int? UnsupportedResources { get { throw null; } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.RegulatoryComplianceAssessmentData 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.SecurityCenter.RegulatoryComplianceAssessmentData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -1023,6 +1044,7 @@ public RegulatoryComplianceControlData() { }
             public int? PassedAssessments { get { throw null; } }
             public int? SkippedAssessments { get { throw null; } }
             public Azure.ResourceManager.SecurityCenter.Models.RegulatoryComplianceState? State { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.RegulatoryComplianceControlData 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.SecurityCenter.RegulatoryComplianceControlData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -1070,6 +1092,7 @@ public RegulatoryComplianceStandardData() { }
             public int? SkippedControls { get { throw null; } }
             public Azure.ResourceManager.SecurityCenter.Models.RegulatoryComplianceState? State { get { throw null; } set { } }
             public int? UnsupportedControls { get { throw null; } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.RegulatoryComplianceStandardData 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.SecurityCenter.RegulatoryComplianceStandardData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -1185,6 +1208,7 @@ public SecureScoreData() { }
             public int? Max { get { throw null; } }
             public double? Percentage { get { throw null; } }
             public long? Weight { get { throw null; } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.SecureScoreData 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.SecurityCenter.SecureScoreData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -1238,6 +1262,7 @@ public SecurityAlertData() { }
             public System.Collections.Generic.IReadOnlyList Techniques { get { throw null; } }
             public string VendorName { get { throw null; } }
             public string Version { get { throw null; } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.SecurityAlertData 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.SecurityCenter.SecurityAlertData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -1271,6 +1296,7 @@ public SecurityAlertsSuppressionRuleData() { }
             public string Reason { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.SecurityAlertsSuppressionRuleState? State { get { throw null; } set { } }
             public System.Collections.Generic.IList SuppressionAlertsScopeAllOf { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.SecurityAlertsSuppressionRuleData 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.SecurityCenter.SecurityAlertsSuppressionRuleData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -1303,6 +1329,7 @@ public SecurityApplicationData() { }
             public string Description { get { throw null; } set { } }
             public string DisplayName { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.ApplicationSourceResourceType? SourceResourceType { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.SecurityApplicationData 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.SecurityCenter.SecurityApplicationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -1331,6 +1358,7 @@ public SecurityAssessmentData() { }
             public Azure.ResourceManager.SecurityCenter.Models.SecurityAssessmentPartner PartnersData { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.SecurityCenterResourceDetails ResourceDetails { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.SecurityAssessmentStatusResult Status { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.SecurityAssessmentData 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.SecurityCenter.SecurityAssessmentData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -1356,6 +1384,7 @@ public SecurityAssessmentMetadataData() { }
             public System.Collections.Generic.IList Techniques { get { throw null; } }
             public System.Collections.Generic.IList Threats { get { throw null; } }
             public Azure.ResourceManager.SecurityCenter.Models.SecurityAssessmentUserImpact? UserImpact { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.SecurityAssessmentMetadataData 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.SecurityCenter.SecurityAssessmentMetadataData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -1414,6 +1443,7 @@ public SecurityAutomationData(Azure.Core.AzureLocation location) { }
             public string Kind { get { throw null; } set { } }
             public System.Collections.Generic.IList Scopes { get { throw null; } }
             public System.Collections.Generic.IList Sources { get { throw null; } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.SecurityAutomationData 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.SecurityCenter.SecurityAutomationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -1477,6 +1507,7 @@ public SecurityCenterApiCollectionData() { }
             public long? NumberOfUnauthenticatedApiEndpoints { get { throw null; } }
             public Azure.ResourceManager.SecurityCenter.Models.SecurityFamilyProvisioningState? ProvisioningState { get { throw null; } }
             public string SensitivityLabel { get { throw null; } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.SecurityCenterApiCollectionData 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.SecurityCenter.SecurityCenterApiCollectionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -1771,6 +1802,7 @@ public partial class SecurityCenterLocationData : Azure.ResourceManager.Models.R
         {
             public SecurityCenterLocationData() { }
             public System.BinaryData Properties { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.SecurityCenterLocationData 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.SecurityCenter.SecurityCenterLocationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -1840,6 +1872,7 @@ public SecurityCenterPricingData() { }
             public Azure.ResourceManager.SecurityCenter.Models.SecurityCenterPricingTier? PricingTier { get { throw null; } set { } }
             public System.Collections.Generic.IReadOnlyList ReplacedBy { get { throw null; } }
             public string SubPlan { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.SecurityCenterPricingData 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.SecurityCenter.SecurityCenterPricingData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -1888,6 +1921,7 @@ public partial class SecurityCloudConnectorData : Azure.ResourceManager.Models.R
             public SecurityCloudConnectorData() { }
             public Azure.ResourceManager.SecurityCenter.Models.AuthenticationDetailsProperties AuthenticationDetails { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.HybridComputeSettingsProperties HybridComputeSettings { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.SecurityCloudConnectorData 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.SecurityCenter.SecurityCloudConnectorData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -1934,6 +1968,7 @@ public SecurityComplianceData() { }
             public System.DateTimeOffset? AssessedOn { get { throw null; } }
             public System.Collections.Generic.IReadOnlyList AssessmentResult { get { throw null; } }
             public int? ResourceCount { get { throw null; } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.SecurityComplianceData 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.SecurityCenter.SecurityComplianceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -2018,6 +2053,7 @@ public SecurityConnectorData(Azure.Core.AzureLocation location) { }
             public System.DateTimeOffset? HierarchyIdentifierTrialEndOn { get { throw null; } }
             public string Kind { get { throw null; } set { } }
             public System.Collections.Generic.IList Offerings { get { throw null; } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.SecurityConnectorData 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.SecurityCenter.SecurityConnectorData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -2043,6 +2079,7 @@ public partial class SecurityConnectorGitHubOwnerData : Azure.ResourceManager.Mo
         {
             public SecurityConnectorGitHubOwnerData() { }
             public Azure.ResourceManager.SecurityCenter.Models.SecurityConnectorGitHubOwnerProperties Properties { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.SecurityConnectorGitHubOwnerData 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.SecurityCenter.SecurityConnectorGitHubOwnerData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -2086,6 +2123,7 @@ public partial class SecurityConnectorGitHubRepositoryData : Azure.ResourceManag
         {
             public SecurityConnectorGitHubRepositoryData() { }
             public Azure.ResourceManager.SecurityCenter.Models.SecurityConnectorGitHubRepositoryProperties Properties { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.SecurityConnectorGitHubRepositoryData 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.SecurityCenter.SecurityConnectorGitHubRepositoryData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -2128,6 +2166,7 @@ public partial class SecurityConnectorGitLabGroupData : Azure.ResourceManager.Mo
         {
             public SecurityConnectorGitLabGroupData() { }
             public Azure.ResourceManager.SecurityCenter.Models.SecurityConnectorGitLabGroupProperties Properties { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.SecurityConnectorGitLabGroupData 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.SecurityCenter.SecurityConnectorGitLabGroupData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -2171,6 +2210,7 @@ public partial class SecurityConnectorGitLabProjectData : Azure.ResourceManager.
         {
             public SecurityConnectorGitLabProjectData() { }
             public Azure.ResourceManager.SecurityCenter.Models.SecurityConnectorGitLabProjectProperties Properties { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.SecurityConnectorGitLabProjectData 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.SecurityCenter.SecurityConnectorGitLabProjectData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -2291,6 +2331,7 @@ public SecurityContactData() { }
             public string Emails { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.SecurityContactPropertiesNotificationsByRole NotificationsByRole { get { throw null; } set { } }
             public string Phone { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.SecurityContactData 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.SecurityCenter.SecurityContactData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -2342,6 +2383,7 @@ public SecurityHealthReportData() { }
             public System.Collections.Generic.IReadOnlyDictionary ReportAdditionalData { get { throw null; } }
             public Azure.ResourceManager.SecurityCenter.Models.HealthReportResourceDetails ResourceDetails { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.HealthReportStatus Status { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.SecurityHealthReportData 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.SecurityCenter.SecurityHealthReportData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -2384,6 +2426,7 @@ public partial class SecurityOperatorData : Azure.ResourceManager.Models.Resourc
         {
             public SecurityOperatorData() { }
             public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.SecurityOperatorData 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.SecurityCenter.SecurityOperatorData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -2429,6 +2472,7 @@ protected SecuritySettingCollection() { }
         public partial class SecuritySettingData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
         {
             public SecuritySettingData() { }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.SecuritySettingData 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.SecurityCenter.SecuritySettingData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -2480,6 +2524,7 @@ public SecuritySubAssessmentData() { }
             public Azure.ResourceManager.SecurityCenter.Models.SecurityCenterResourceDetails ResourceDetails { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.SubAssessmentStatus Status { get { throw null; } set { } }
             public string VulnerabilityId { get { throw null; } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.SecuritySubAssessmentData 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.SecurityCenter.SecuritySubAssessmentData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -2509,6 +2554,7 @@ public SecurityTaskData() { }
             public Azure.ResourceManager.SecurityCenter.Models.SecurityTaskProperties SecurityTaskParameters { get { throw null; } set { } }
             public string State { get { throw null; } }
             public string SubState { get { throw null; } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.SecurityTaskData 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.SecurityCenter.SecurityTaskData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -2537,6 +2583,7 @@ public partial class SecurityWorkspaceSettingData : Azure.ResourceManager.Models
             public SecurityWorkspaceSettingData() { }
             public string Scope { get { throw null; } set { } }
             public Azure.Core.ResourceIdentifier WorkspaceId { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.SecurityWorkspaceSettingData 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.SecurityCenter.SecurityWorkspaceSettingData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -2566,6 +2613,7 @@ public partial class SensitivitySettingData : Azure.ResourceManager.Models.Resou
         {
             internal SensitivitySettingData() { }
             public Azure.ResourceManager.SecurityCenter.Models.SensitivitySettingsProperties Properties { get { throw null; } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.SensitivitySettingData 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.SecurityCenter.SensitivitySettingData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -2610,6 +2658,7 @@ public partial class ServerVulnerabilityAssessmentData : Azure.ResourceManager.M
         {
             public ServerVulnerabilityAssessmentData() { }
             public Azure.ResourceManager.SecurityCenter.Models.ServerVulnerabilityAssessmentPropertiesProvisioningState? ProvisioningState { get { throw null; } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.ServerVulnerabilityAssessmentData 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.SecurityCenter.ServerVulnerabilityAssessmentData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -2655,6 +2704,7 @@ protected ServerVulnerabilityAssessmentsSettingCollection() { }
         public abstract partial class ServerVulnerabilityAssessmentsSettingData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
         {
             protected ServerVulnerabilityAssessmentsSettingData() { }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.ServerVulnerabilityAssessmentsSettingData 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.SecurityCenter.ServerVulnerabilityAssessmentsSettingData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -2707,6 +2757,7 @@ public SoftwareInventoryData() { }
             public string SoftwareName { get { throw null; } set { } }
             public string Vendor { get { throw null; } set { } }
             public string Version { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.SoftwareInventoryData 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.SecurityCenter.SoftwareInventoryData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -2754,6 +2805,7 @@ public partial class SqlVulnerabilityAssessmentBaselineRuleData : Azure.Resource
         {
             public SqlVulnerabilityAssessmentBaselineRuleData() { }
             public System.Collections.Generic.IList> RuleResults { get { throw null; } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.SqlVulnerabilityAssessmentBaselineRuleData 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.SecurityCenter.SqlVulnerabilityAssessmentBaselineRuleData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -2795,6 +2847,7 @@ public partial class SqlVulnerabilityAssessmentScanData : Azure.ResourceManager.
         {
             public SqlVulnerabilityAssessmentScanData() { }
             public Azure.ResourceManager.SecurityCenter.Models.SqlVulnerabilityAssessmentScanProperties Properties { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.SqlVulnerabilityAssessmentScanData 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.SecurityCenter.SqlVulnerabilityAssessmentScanData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -3321,6 +3374,7 @@ public partial class AadExternalSecuritySolution : Azure.ResourceManager.Securit
         {
             public AadExternalSecuritySolution() { }
             public Azure.ResourceManager.SecurityCenter.Models.AadSolutionProperties Properties { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.AadExternalSecuritySolution 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.SecurityCenter.Models.AadExternalSecuritySolution System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -3331,6 +3385,7 @@ public partial class AadSolutionProperties : Azure.ResourceManager.SecurityCente
         {
             public AadSolutionProperties() { }
             public Azure.ResourceManager.SecurityCenter.Models.AadConnectivityStateType? ConnectivityState { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.AadSolutionProperties 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.SecurityCenter.Models.AadSolutionProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -3344,6 +3399,7 @@ public ActionableRemediation() { }
             public System.Collections.Generic.IList CategoryConfigurations { get { throw null; } }
             public Azure.ResourceManager.SecurityCenter.Models.InheritFromParentState? InheritFromParentState { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.ActionableRemediationState? State { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.ActionableRemediation 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.SecurityCenter.Models.ActionableRemediation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -3372,6 +3428,7 @@ public ActionableRemediation() { }
         public partial class ActiveConnectionsNotInAllowedRange : Azure.ResourceManager.SecurityCenter.Models.TimeWindowCustomAlertRule, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
         {
             public ActiveConnectionsNotInAllowedRange(bool isEnabled, int minThreshold, int maxThreshold, System.TimeSpan timeWindowSize) : base (default(bool), default(int), default(int), default(System.TimeSpan)) { }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.ActiveConnectionsNotInAllowedRange 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.SecurityCenter.Models.ActiveConnectionsNotInAllowedRange System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -3445,6 +3502,7 @@ public partial class AdaptiveApplicationControlIssueSummary : System.ClientModel
             internal AdaptiveApplicationControlIssueSummary() { }
             public Azure.ResourceManager.SecurityCenter.Models.AdaptiveApplicationControlIssue? Issue { get { throw null; } }
             public float? NumberOfVms { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.AdaptiveApplicationControlIssueSummary 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.SecurityCenter.Models.AdaptiveApplicationControlIssueSummary System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -3456,6 +3514,7 @@ public partial class AdaptiveNetworkHardeningEnforceContent : System.ClientModel
             public AdaptiveNetworkHardeningEnforceContent(System.Collections.Generic.IEnumerable rules, System.Collections.Generic.IEnumerable networkSecurityGroups) { }
             public System.Collections.Generic.IList NetworkSecurityGroups { get { throw null; } }
             public System.Collections.Generic.IList Rules { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.AdaptiveNetworkHardeningEnforceContent 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.SecurityCenter.Models.AdaptiveNetworkHardeningEnforceContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -3486,6 +3545,7 @@ public AdditionalWorkspacesProperties() { }
             public System.Collections.Generic.IList DataTypes { get { throw null; } }
             public string Workspace { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.AdditionalWorkspaceType? WorkspaceType { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.AdditionalWorkspacesProperties 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.SecurityCenter.Models.AdditionalWorkspacesProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -3513,6 +3573,7 @@ public partial class AllowlistCustomAlertRule : Azure.ResourceManager.SecurityCe
         {
             public AllowlistCustomAlertRule(bool isEnabled, System.Collections.Generic.IEnumerable allowlistValues) : base (default(bool)) { }
             public System.Collections.Generic.IList AllowlistValues { get { throw null; } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.AllowlistCustomAlertRule 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.SecurityCenter.Models.AllowlistCustomAlertRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -3522,6 +3583,7 @@ public AllowlistCustomAlertRule(bool isEnabled, System.Collections.Generic.IEnum
         public partial class AmqpC2DMessagesNotInAllowedRange : Azure.ResourceManager.SecurityCenter.Models.TimeWindowCustomAlertRule, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
         {
             public AmqpC2DMessagesNotInAllowedRange(bool isEnabled, int minThreshold, int maxThreshold, System.TimeSpan timeWindowSize) : base (default(bool), default(int), default(int), default(System.TimeSpan)) { }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.AmqpC2DMessagesNotInAllowedRange 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.SecurityCenter.Models.AmqpC2DMessagesNotInAllowedRange System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -3531,6 +3593,7 @@ public partial class AmqpC2DMessagesNotInAllowedRange : Azure.ResourceManager.Se
         public partial class AmqpC2DRejectedMessagesNotInAllowedRange : Azure.ResourceManager.SecurityCenter.Models.TimeWindowCustomAlertRule, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
         {
             public AmqpC2DRejectedMessagesNotInAllowedRange(bool isEnabled, int minThreshold, int maxThreshold, System.TimeSpan timeWindowSize) : base (default(bool), default(int), default(int), default(System.TimeSpan)) { }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.AmqpC2DRejectedMessagesNotInAllowedRange 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.SecurityCenter.Models.AmqpC2DRejectedMessagesNotInAllowedRange System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -3540,6 +3603,7 @@ public partial class AmqpC2DRejectedMessagesNotInAllowedRange : Azure.ResourceMa
         public partial class AmqpD2CMessagesNotInAllowedRange : Azure.ResourceManager.SecurityCenter.Models.TimeWindowCustomAlertRule, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
         {
             public AmqpD2CMessagesNotInAllowedRange(bool isEnabled, int minThreshold, int maxThreshold, System.TimeSpan timeWindowSize) : base (default(bool), default(int), default(int), default(System.TimeSpan)) { }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.AmqpD2CMessagesNotInAllowedRange 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.SecurityCenter.Models.AmqpD2CMessagesNotInAllowedRange System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -3763,6 +3827,7 @@ public partial class AtaExternalSecuritySolution : Azure.ResourceManager.Securit
         {
             public AtaExternalSecuritySolution() { }
             public Azure.ResourceManager.SecurityCenter.Models.AtaSolutionProperties Properties { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.AtaExternalSecuritySolution 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.SecurityCenter.Models.AtaExternalSecuritySolution System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -3773,6 +3838,7 @@ public partial class AtaSolutionProperties : Azure.ResourceManager.SecurityCente
         {
             public AtaSolutionProperties() { }
             public string LastEventReceived { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.AtaSolutionProperties 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.SecurityCenter.Models.AtaSolutionProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -3784,6 +3850,7 @@ public abstract partial class AuthenticationDetailsProperties : System.ClientMod
             protected AuthenticationDetailsProperties() { }
             public Azure.ResourceManager.SecurityCenter.Models.AuthenticationProvisioningState? AuthenticationProvisioningState { get { throw null; } }
             public System.Collections.Generic.IReadOnlyList GrantedPermissions { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.AuthenticationDetailsProperties 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.SecurityCenter.Models.AuthenticationDetailsProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -3897,6 +3964,7 @@ public AwsAssumeRoleAuthenticationDetailsProperties(string awsAssumeRoleArn, Sys
             public string AccountId { get { throw null; } }
             public string AwsAssumeRoleArn { get { throw null; } set { } }
             public System.Guid AwsExternalId { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.AwsAssumeRoleAuthenticationDetailsProperties 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.SecurityCenter.Models.AwsAssumeRoleAuthenticationDetailsProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -3909,6 +3977,7 @@ public AwsCredsAuthenticationDetailsProperties(string awsAccessKeyId, string aws
             public string AccountId { get { throw null; } }
             public string AwsAccessKeyId { get { throw null; } set { } }
             public string AwsSecretAccessKey { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.AwsCredsAuthenticationDetailsProperties 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.SecurityCenter.Models.AwsCredsAuthenticationDetailsProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -3922,6 +3991,7 @@ public AwsEnvironment() { }
             public Azure.ResourceManager.SecurityCenter.Models.AwsOrganizationalInfo OrganizationalData { get { throw null; } set { } }
             public System.Collections.Generic.IList Regions { get { throw null; } }
             public long? ScanInterval { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.AwsEnvironment 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.SecurityCenter.Models.AwsEnvironment System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -3933,6 +4003,7 @@ public partial class AwsOrganizationalDataMaster : Azure.ResourceManager.Securit
             public AwsOrganizationalDataMaster() { }
             public System.Collections.Generic.IList ExcludedAccountIds { get { throw null; } }
             public string StacksetName { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.AwsOrganizationalDataMaster 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.SecurityCenter.Models.AwsOrganizationalDataMaster System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -3943,6 +4014,7 @@ public partial class AwsOrganizationalDataMember : Azure.ResourceManager.Securit
         {
             public AwsOrganizationalDataMember() { }
             public string ParentHierarchyId { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.AwsOrganizationalDataMember 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.SecurityCenter.Models.AwsOrganizationalDataMember System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -3952,6 +4024,7 @@ public AwsOrganizationalDataMember() { }
         public abstract partial class AwsOrganizationalInfo : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
         {
             protected AwsOrganizationalInfo() { }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.AwsOrganizationalInfo 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.SecurityCenter.Models.AwsOrganizationalInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -3961,6 +4034,7 @@ protected AwsOrganizationalInfo() { }
         public partial class AzureDevOpsScopeEnvironment : Azure.ResourceManager.SecurityCenter.Models.SecurityConnectorEnvironment, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
         {
             public AzureDevOpsScopeEnvironment() { }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.AzureDevOpsScopeEnvironment 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.SecurityCenter.Models.AzureDevOpsScopeEnvironment System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -3971,6 +4045,7 @@ public partial class AzureResourceDetails : Azure.ResourceManager.SecurityCenter
         {
             public AzureResourceDetails() { }
             public string Id { get { throw null; } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.AzureResourceDetails 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.SecurityCenter.Models.AzureResourceDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -3981,6 +4056,7 @@ public partial class AzureResourceIdentifier : Azure.ResourceManager.SecurityCen
         {
             internal AzureResourceIdentifier() { }
             public Azure.Core.ResourceIdentifier AzureResourceId { get { throw null; } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.AzureResourceIdentifier 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.SecurityCenter.Models.AzureResourceIdentifier System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -3991,6 +4067,7 @@ public partial class AzureServersSetting : Azure.ResourceManager.SecurityCenter.
         {
             public AzureServersSetting() { }
             public Azure.ResourceManager.SecurityCenter.Models.ServerVulnerabilityAssessmentsAzureSettingSelectedProvider? SelectedProvider { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.AzureServersSetting 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.SecurityCenter.Models.AzureServersSetting System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4004,6 +4081,7 @@ public BaselineAdjustedResult() { }
             public System.Collections.Generic.IList> ResultsNotInBaseline { get { throw null; } }
             public System.Collections.Generic.IList> ResultsOnlyInBaseline { get { throw null; } }
             public Azure.ResourceManager.SecurityCenter.Models.SqlVulnerabilityAssessmentScanResultRuleStatus? Status { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.BaselineAdjustedResult 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.SecurityCenter.Models.BaselineAdjustedResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4015,6 +4093,7 @@ public partial class BenchmarkReference : System.ClientModel.Primitives.IJsonMod
             public BenchmarkReference() { }
             public string Benchmark { get { throw null; } set { } }
             public string Reference { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.BenchmarkReference 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.SecurityCenter.Models.BenchmarkReference System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4027,6 +4106,7 @@ internal BuiltInInfoType() { }
             public string BuiltInInfoTypeValue { get { throw null; } }
             public System.Guid? Id { get { throw null; } }
             public string Name { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.BuiltInInfoType 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.SecurityCenter.Models.BuiltInInfoType System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4038,6 +4118,7 @@ public partial class CategoryConfiguration : System.ClientModel.Primitives.IJson
             public CategoryConfiguration() { }
             public Azure.ResourceManager.SecurityCenter.Models.RuleCategory? Category { get { throw null; } set { } }
             public string MinimumSeverityLevel { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.CategoryConfiguration 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.SecurityCenter.Models.CategoryConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4048,6 +4129,7 @@ public partial class CefExternalSecuritySolution : Azure.ResourceManager.Securit
         {
             public CefExternalSecuritySolution() { }
             public Azure.ResourceManager.SecurityCenter.Models.CefSolutionProperties Properties { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.CefExternalSecuritySolution 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.SecurityCenter.Models.CefExternalSecuritySolution System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4060,6 +4142,7 @@ public CefSolutionProperties() { }
             public string Agent { get { throw null; } set { } }
             public string Hostname { get { throw null; } set { } }
             public string LastEventReceived { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.CefSolutionProperties 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.SecurityCenter.Models.CefSolutionProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4071,6 +4154,7 @@ public partial class ComplianceSegment : System.ClientModel.Primitives.IJsonMode
             internal ComplianceSegment() { }
             public double? Percentage { get { throw null; } }
             public string SegmentType { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.ComplianceSegment 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.SecurityCenter.Models.ComplianceSegment System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4083,6 +4167,7 @@ internal ConnectableResourceInfo() { }
             public Azure.Core.ResourceIdentifier Id { get { throw null; } }
             public System.Collections.Generic.IReadOnlyList InboundConnectedResources { get { throw null; } }
             public System.Collections.Generic.IReadOnlyList OutboundConnectedResources { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.ConnectableResourceInfo 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.SecurityCenter.Models.ConnectableResourceInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4095,6 +4180,7 @@ internal ConnectedResourceInfo() { }
             public Azure.Core.ResourceIdentifier ConnectedResourceId { get { throw null; } }
             public string TcpPorts { get { throw null; } }
             public string UdpPorts { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.ConnectedResourceInfo 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.SecurityCenter.Models.ConnectedResourceInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4104,6 +4190,7 @@ internal ConnectedResourceInfo() { }
         public partial class ConnectionFromIPNotAllowed : Azure.ResourceManager.SecurityCenter.Models.AllowlistCustomAlertRule, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
         {
             public ConnectionFromIPNotAllowed(bool isEnabled, System.Collections.Generic.IEnumerable allowlistValues) : base (default(bool), default(System.Collections.Generic.IEnumerable)) { }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.ConnectionFromIPNotAllowed 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.SecurityCenter.Models.ConnectionFromIPNotAllowed System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4113,6 +4200,7 @@ public partial class ConnectionFromIPNotAllowed : Azure.ResourceManager.Security
         public partial class ConnectionToIPNotAllowed : Azure.ResourceManager.SecurityCenter.Models.AllowlistCustomAlertRule, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
         {
             public ConnectionToIPNotAllowed(bool isEnabled, System.Collections.Generic.IEnumerable allowlistValues) : base (default(bool), default(System.Collections.Generic.IEnumerable)) { }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.ConnectionToIPNotAllowed 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.SecurityCenter.Models.ConnectionToIPNotAllowed System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4130,6 +4218,7 @@ public ContainerRegistryVulnerabilityProperties() { }
             public System.DateTimeOffset? PublishedOn { get { throw null; } }
             public string RepositoryName { get { throw null; } }
             public System.Collections.Generic.IReadOnlyList VendorReferences { get { throw null; } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.ContainerRegistryVulnerabilityProperties 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.SecurityCenter.Models.ContainerRegistryVulnerabilityProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4140,6 +4229,7 @@ public partial class CspmMonitorAwsOffering : Azure.ResourceManager.SecurityCent
         {
             public CspmMonitorAwsOffering() { }
             public string CloudRoleArn { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.CspmMonitorAwsOffering 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.SecurityCenter.Models.CspmMonitorAwsOffering System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4149,6 +4239,7 @@ public CspmMonitorAwsOffering() { }
         public partial class CspmMonitorAzureDevOpsOffering : Azure.ResourceManager.SecurityCenter.Models.SecurityCenterCloudOffering, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
         {
             public CspmMonitorAzureDevOpsOffering() { }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.CspmMonitorAzureDevOpsOffering 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.SecurityCenter.Models.CspmMonitorAzureDevOpsOffering System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4159,6 +4250,7 @@ public partial class CspmMonitorGcpOffering : Azure.ResourceManager.SecurityCent
         {
             public CspmMonitorGcpOffering() { }
             public Azure.ResourceManager.SecurityCenter.Models.CspmMonitorGcpOfferingNativeCloudConnection NativeCloudConnection { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.CspmMonitorGcpOffering 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.SecurityCenter.Models.CspmMonitorGcpOffering System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4170,6 +4262,7 @@ public partial class CspmMonitorGcpOfferingNativeCloudConnection : System.Client
             public CspmMonitorGcpOfferingNativeCloudConnection() { }
             public string ServiceAccountEmailAddress { get { throw null; } set { } }
             public string WorkloadIdentityProviderId { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.CspmMonitorGcpOfferingNativeCloudConnection 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.SecurityCenter.Models.CspmMonitorGcpOfferingNativeCloudConnection System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4179,6 +4272,7 @@ public CspmMonitorGcpOfferingNativeCloudConnection() { }
         public partial class CspmMonitorGithubOffering : Azure.ResourceManager.SecurityCenter.Models.SecurityCenterCloudOffering, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
         {
             public CspmMonitorGithubOffering() { }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.CspmMonitorGithubOffering 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.SecurityCenter.Models.CspmMonitorGithubOffering System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4188,6 +4282,7 @@ public CspmMonitorGithubOffering() { }
         public partial class CspmMonitorGitLabOffering : Azure.ResourceManager.SecurityCenter.Models.SecurityCenterCloudOffering, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
         {
             public CspmMonitorGitLabOffering() { }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.CspmMonitorGitLabOffering 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.SecurityCenter.Models.CspmMonitorGitLabOffering System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4200,6 +4295,7 @@ protected CustomAlertRule(bool isEnabled) { }
             public string Description { get { throw null; } }
             public string DisplayName { get { throw null; } }
             public bool IsEnabled { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.CustomAlertRule 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.SecurityCenter.Models.CustomAlertRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4215,6 +4311,7 @@ public CustomAssessmentAutomationCreateOrUpdateContent() { }
             public string RemediationDescription { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.CustomAssessmentSeverity? Severity { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.CustomAssessmentAutomationSupportedCloud? SupportedCloud { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.CustomAssessmentAutomationCreateOrUpdateContent 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.SecurityCenter.Models.CustomAssessmentAutomationCreateOrUpdateContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4262,6 +4359,7 @@ public partial class CustomEntityStoreAssignmentCreateOrUpdateContent : System.C
         {
             public CustomEntityStoreAssignmentCreateOrUpdateContent() { }
             public string Principal { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.CustomEntityStoreAssignmentCreateOrUpdateContent 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.SecurityCenter.Models.CustomEntityStoreAssignmentCreateOrUpdateContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4272,6 +4370,7 @@ public partial class DataExportSettings : Azure.ResourceManager.SecurityCenter.S
         {
             public DataExportSettings() { }
             public bool? IsEnabled { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DataExportSettings 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.SecurityCenter.Models.DataExportSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4287,6 +4386,7 @@ public DefenderCspmAwsOffering() { }
             public Azure.ResourceManager.SecurityCenter.Models.DefenderCspmAwsOfferingMdcContainersAgentlessDiscoveryK8S MdcContainersAgentlessDiscoveryK8S { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.DefenderCspmAwsOfferingMdcContainersImageAssessment MdcContainersImageAssessment { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.DefenderCspmAwsOfferingVmScanners VmScanners { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DefenderCspmAwsOffering 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.SecurityCenter.Models.DefenderCspmAwsOffering System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4298,6 +4398,7 @@ public partial class DefenderCspmAwsOfferingCiem : System.ClientModel.Primitives
             public DefenderCspmAwsOfferingCiem() { }
             public string CiemDiscoveryCloudRoleArn { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.DefenderCspmAwsOfferingCiemOidc CiemOidc { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DefenderCspmAwsOfferingCiem 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.SecurityCenter.Models.DefenderCspmAwsOfferingCiem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4309,6 +4410,7 @@ public partial class DefenderCspmAwsOfferingCiemOidc : System.ClientModel.Primit
             public DefenderCspmAwsOfferingCiemOidc() { }
             public string AzureActiveDirectoryAppName { get { throw null; } set { } }
             public string CloudRoleArn { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DefenderCspmAwsOfferingCiemOidc 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.SecurityCenter.Models.DefenderCspmAwsOfferingCiemOidc System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4320,6 +4422,7 @@ public partial class DefenderCspmAwsOfferingDatabasesDspm : System.ClientModel.P
             public DefenderCspmAwsOfferingDatabasesDspm() { }
             public string CloudRoleArn { get { throw null; } set { } }
             public bool? IsEnabled { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DefenderCspmAwsOfferingDatabasesDspm 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.SecurityCenter.Models.DefenderCspmAwsOfferingDatabasesDspm System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4331,6 +4434,7 @@ public partial class DefenderCspmAwsOfferingDataSensitivityDiscovery : System.Cl
             public DefenderCspmAwsOfferingDataSensitivityDiscovery() { }
             public string CloudRoleArn { get { throw null; } set { } }
             public bool? IsEnabled { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DefenderCspmAwsOfferingDataSensitivityDiscovery 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.SecurityCenter.Models.DefenderCspmAwsOfferingDataSensitivityDiscovery System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4342,6 +4446,7 @@ public partial class DefenderCspmAwsOfferingMdcContainersAgentlessDiscoveryK8S :
             public DefenderCspmAwsOfferingMdcContainersAgentlessDiscoveryK8S() { }
             public string CloudRoleArn { get { throw null; } set { } }
             public bool? IsEnabled { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DefenderCspmAwsOfferingMdcContainersAgentlessDiscoveryK8S 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.SecurityCenter.Models.DefenderCspmAwsOfferingMdcContainersAgentlessDiscoveryK8S System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4353,6 +4458,7 @@ public partial class DefenderCspmAwsOfferingMdcContainersImageAssessment : Syste
             public DefenderCspmAwsOfferingMdcContainersImageAssessment() { }
             public string CloudRoleArn { get { throw null; } set { } }
             public bool? IsEnabled { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DefenderCspmAwsOfferingMdcContainersImageAssessment 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.SecurityCenter.Models.DefenderCspmAwsOfferingMdcContainersImageAssessment System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4364,6 +4470,7 @@ public partial class DefenderCspmAwsOfferingVmScanners : System.ClientModel.Prim
             public DefenderCspmAwsOfferingVmScanners() { }
             public Azure.ResourceManager.SecurityCenter.Models.DefenderCspmAwsOfferingVmScannersConfiguration Configuration { get { throw null; } set { } }
             public bool? Enabled { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DefenderCspmAwsOfferingVmScanners 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.SecurityCenter.Models.DefenderCspmAwsOfferingVmScanners System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4376,6 +4483,7 @@ public DefenderCspmAwsOfferingVmScannersConfiguration() { }
             public string CloudRoleArn { get { throw null; } set { } }
             public System.Collections.Generic.IDictionary ExclusionTags { get { throw null; } }
             public Azure.ResourceManager.SecurityCenter.Models.DefenderForServersScanningMode? ScanningMode { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DefenderCspmAwsOfferingVmScannersConfiguration 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.SecurityCenter.Models.DefenderCspmAwsOfferingVmScannersConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4390,6 +4498,7 @@ public DefenderCspmGcpOffering() { }
             public Azure.ResourceManager.SecurityCenter.Models.DefenderCspmGcpOfferingMdcContainersAgentlessDiscoveryK8S MdcContainersAgentlessDiscoveryK8S { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.DefenderCspmGcpOfferingMdcContainersImageAssessment MdcContainersImageAssessment { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.DefenderCspmGcpOfferingVmScanners VmScanners { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DefenderCspmGcpOffering 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.SecurityCenter.Models.DefenderCspmGcpOffering System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4402,6 +4511,7 @@ public DefenderCspmGcpOfferingCiemDiscovery() { }
             public string AzureActiveDirectoryAppName { get { throw null; } set { } }
             public string ServiceAccountEmailAddress { get { throw null; } set { } }
             public string WorkloadIdentityProviderId { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DefenderCspmGcpOfferingCiemDiscovery 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.SecurityCenter.Models.DefenderCspmGcpOfferingCiemDiscovery System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4414,6 +4524,7 @@ public DefenderCspmGcpOfferingDataSensitivityDiscovery() { }
             public bool? IsEnabled { get { throw null; } set { } }
             public string ServiceAccountEmailAddress { get { throw null; } set { } }
             public string WorkloadIdentityProviderId { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DefenderCspmGcpOfferingDataSensitivityDiscovery 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.SecurityCenter.Models.DefenderCspmGcpOfferingDataSensitivityDiscovery System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4426,6 +4537,7 @@ public DefenderCspmGcpOfferingMdcContainersAgentlessDiscoveryK8S() { }
             public bool? IsEnabled { get { throw null; } set { } }
             public string ServiceAccountEmailAddress { get { throw null; } set { } }
             public string WorkloadIdentityProviderId { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DefenderCspmGcpOfferingMdcContainersAgentlessDiscoveryK8S 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.SecurityCenter.Models.DefenderCspmGcpOfferingMdcContainersAgentlessDiscoveryK8S System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4438,6 +4550,7 @@ public DefenderCspmGcpOfferingMdcContainersImageAssessment() { }
             public bool? IsEnabled { get { throw null; } set { } }
             public string ServiceAccountEmailAddress { get { throw null; } set { } }
             public string WorkloadIdentityProviderId { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DefenderCspmGcpOfferingMdcContainersImageAssessment 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.SecurityCenter.Models.DefenderCspmGcpOfferingMdcContainersImageAssessment System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4449,6 +4562,7 @@ public partial class DefenderCspmGcpOfferingVmScanners : System.ClientModel.Prim
             public DefenderCspmGcpOfferingVmScanners() { }
             public Azure.ResourceManager.SecurityCenter.Models.DefenderCspmGcpOfferingVmScannersConfiguration Configuration { get { throw null; } set { } }
             public bool? IsEnabled { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DefenderCspmGcpOfferingVmScanners 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.SecurityCenter.Models.DefenderCspmGcpOfferingVmScanners System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4460,6 +4574,7 @@ public partial class DefenderCspmGcpOfferingVmScannersConfiguration : System.Cli
             public DefenderCspmGcpOfferingVmScannersConfiguration() { }
             public System.Collections.Generic.IDictionary ExclusionTags { get { throw null; } }
             public Azure.ResourceManager.SecurityCenter.Models.DefenderForServersScanningMode? ScanningMode { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DefenderCspmGcpOfferingVmScannersConfiguration 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.SecurityCenter.Models.DefenderCspmGcpOfferingVmScannersConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4471,6 +4586,7 @@ public partial class DefenderFoDatabasesAwsOfferingArcAutoProvisioningConfigurat
             public DefenderFoDatabasesAwsOfferingArcAutoProvisioningConfiguration() { }
             public string PrivateLinkScope { get { throw null; } set { } }
             public string Proxy { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DefenderFoDatabasesAwsOfferingArcAutoProvisioningConfiguration 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.SecurityCenter.Models.DefenderFoDatabasesAwsOfferingArcAutoProvisioningConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4482,6 +4598,7 @@ public partial class DefenderFoDatabasesAwsOfferingDatabasesDspm : System.Client
             public DefenderFoDatabasesAwsOfferingDatabasesDspm() { }
             public string CloudRoleArn { get { throw null; } set { } }
             public bool? IsEnabled { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DefenderFoDatabasesAwsOfferingDatabasesDspm 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.SecurityCenter.Models.DefenderFoDatabasesAwsOfferingDatabasesDspm System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4503,6 +4620,7 @@ public DefenderForContainersAwsOffering() { }
             public Azure.ResourceManager.SecurityCenter.Models.DefenderForContainersAwsOfferingMdcContainersAgentlessDiscoveryK8S MdcContainersAgentlessDiscoveryK8S { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.DefenderForContainersAwsOfferingMdcContainersImageAssessment MdcContainersImageAssessment { get { throw null; } set { } }
             public string ScubaExternalId { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DefenderForContainersAwsOffering 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.SecurityCenter.Models.DefenderForContainersAwsOffering System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4514,6 +4632,7 @@ public partial class DefenderForContainersAwsOfferingMdcContainersAgentlessDisco
             public DefenderForContainersAwsOfferingMdcContainersAgentlessDiscoveryK8S() { }
             public string CloudRoleArn { get { throw null; } set { } }
             public bool? IsEnabled { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DefenderForContainersAwsOfferingMdcContainersAgentlessDiscoveryK8S 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.SecurityCenter.Models.DefenderForContainersAwsOfferingMdcContainersAgentlessDiscoveryK8S System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4525,6 +4644,7 @@ public partial class DefenderForContainersAwsOfferingMdcContainersImageAssessmen
             public DefenderForContainersAwsOfferingMdcContainersImageAssessment() { }
             public string CloudRoleArn { get { throw null; } set { } }
             public bool? IsEnabled { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DefenderForContainersAwsOfferingMdcContainersImageAssessment 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.SecurityCenter.Models.DefenderForContainersAwsOfferingMdcContainersImageAssessment System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4541,6 +4661,7 @@ public DefenderForContainersGcpOffering() { }
             public Azure.ResourceManager.SecurityCenter.Models.DefenderForContainersGcpOfferingMdcContainersAgentlessDiscoveryK8S MdcContainersAgentlessDiscoveryK8S { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.DefenderForContainersGcpOfferingMdcContainersImageAssessment MdcContainersImageAssessment { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.DefenderForContainersGcpOfferingNativeCloudConnection NativeCloudConnection { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DefenderForContainersGcpOffering 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.SecurityCenter.Models.DefenderForContainersGcpOffering System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4552,6 +4673,7 @@ public partial class DefenderForContainersGcpOfferingDataPipelineNativeCloudConn
             public DefenderForContainersGcpOfferingDataPipelineNativeCloudConnection() { }
             public string ServiceAccountEmailAddress { get { throw null; } set { } }
             public string WorkloadIdentityProviderId { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DefenderForContainersGcpOfferingDataPipelineNativeCloudConnection 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.SecurityCenter.Models.DefenderForContainersGcpOfferingDataPipelineNativeCloudConnection System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4564,6 +4686,7 @@ public DefenderForContainersGcpOfferingMdcContainersAgentlessDiscoveryK8S() { }
             public bool? IsEnabled { get { throw null; } set { } }
             public string ServiceAccountEmailAddress { get { throw null; } set { } }
             public string WorkloadIdentityProviderId { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DefenderForContainersGcpOfferingMdcContainersAgentlessDiscoveryK8S 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.SecurityCenter.Models.DefenderForContainersGcpOfferingMdcContainersAgentlessDiscoveryK8S System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4576,6 +4699,7 @@ public DefenderForContainersGcpOfferingMdcContainersImageAssessment() { }
             public bool? IsEnabled { get { throw null; } set { } }
             public string ServiceAccountEmailAddress { get { throw null; } set { } }
             public string WorkloadIdentityProviderId { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DefenderForContainersGcpOfferingMdcContainersImageAssessment 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.SecurityCenter.Models.DefenderForContainersGcpOfferingMdcContainersImageAssessment System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4587,6 +4711,7 @@ public partial class DefenderForContainersGcpOfferingNativeCloudConnection : Sys
             public DefenderForContainersGcpOfferingNativeCloudConnection() { }
             public string ServiceAccountEmailAddress { get { throw null; } set { } }
             public string WorkloadIdentityProviderId { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DefenderForContainersGcpOfferingNativeCloudConnection 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.SecurityCenter.Models.DefenderForContainersGcpOfferingNativeCloudConnection System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4599,6 +4724,7 @@ public DefenderForDatabasesAwsOffering() { }
             public Azure.ResourceManager.SecurityCenter.Models.DefenderForDatabasesAwsOfferingArcAutoProvisioning ArcAutoProvisioning { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.DefenderFoDatabasesAwsOfferingDatabasesDspm DatabasesDspm { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.DefenderForDatabasesAwsOfferingRds Rds { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DefenderForDatabasesAwsOffering 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.SecurityCenter.Models.DefenderForDatabasesAwsOffering System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4611,6 +4737,7 @@ public DefenderForDatabasesAwsOfferingArcAutoProvisioning() { }
             public string CloudRoleArn { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.DefenderFoDatabasesAwsOfferingArcAutoProvisioningConfiguration Configuration { get { throw null; } set { } }
             public bool? IsEnabled { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DefenderForDatabasesAwsOfferingArcAutoProvisioning 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.SecurityCenter.Models.DefenderForDatabasesAwsOfferingArcAutoProvisioning System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4622,6 +4749,7 @@ public partial class DefenderForDatabasesAwsOfferingRds : System.ClientModel.Pri
             public DefenderForDatabasesAwsOfferingRds() { }
             public string CloudRoleArn { get { throw null; } set { } }
             public bool? IsEnabled { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DefenderForDatabasesAwsOfferingRds 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.SecurityCenter.Models.DefenderForDatabasesAwsOfferingRds System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4633,6 +4761,7 @@ public partial class DefenderForDatabasesGcpOffering : Azure.ResourceManager.Sec
             public DefenderForDatabasesGcpOffering() { }
             public Azure.ResourceManager.SecurityCenter.Models.DefenderForDatabasesGcpOfferingArcAutoProvisioning ArcAutoProvisioning { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.GcpDefenderForDatabasesArcAutoProvisioning DefenderForDatabasesArcAutoProvisioning { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DefenderForDatabasesGcpOffering 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.SecurityCenter.Models.DefenderForDatabasesGcpOffering System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4644,6 +4773,7 @@ public partial class DefenderForDatabasesGcpOfferingArcAutoProvisioning : System
             public DefenderForDatabasesGcpOfferingArcAutoProvisioning() { }
             public Azure.ResourceManager.SecurityCenter.Models.DefenderForDatabasesGcpOfferingArcAutoProvisioningConfiguration Configuration { get { throw null; } set { } }
             public bool? IsEnabled { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DefenderForDatabasesGcpOfferingArcAutoProvisioning 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.SecurityCenter.Models.DefenderForDatabasesGcpOfferingArcAutoProvisioning System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4655,6 +4785,7 @@ public partial class DefenderForDatabasesGcpOfferingArcAutoProvisioningConfigura
             public DefenderForDatabasesGcpOfferingArcAutoProvisioningConfiguration() { }
             public string PrivateLinkScope { get { throw null; } set { } }
             public string Proxy { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DefenderForDatabasesGcpOfferingArcAutoProvisioningConfiguration 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.SecurityCenter.Models.DefenderForDatabasesGcpOfferingArcAutoProvisioningConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4664,6 +4795,7 @@ public DefenderForDatabasesGcpOfferingArcAutoProvisioningConfiguration() { }
         public partial class DefenderForDevOpsAzureDevOpsOffering : Azure.ResourceManager.SecurityCenter.Models.SecurityCenterCloudOffering, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
         {
             public DefenderForDevOpsAzureDevOpsOffering() { }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DefenderForDevOpsAzureDevOpsOffering 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.SecurityCenter.Models.DefenderForDevOpsAzureDevOpsOffering System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4673,6 +4805,7 @@ public DefenderForDevOpsAzureDevOpsOffering() { }
         public partial class DefenderForDevOpsGithubOffering : Azure.ResourceManager.SecurityCenter.Models.SecurityCenterCloudOffering, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
         {
             public DefenderForDevOpsGithubOffering() { }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DefenderForDevOpsGithubOffering 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.SecurityCenter.Models.DefenderForDevOpsGithubOffering System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4682,6 +4815,7 @@ public DefenderForDevOpsGithubOffering() { }
         public partial class DefenderForDevOpsGitLabOffering : Azure.ResourceManager.SecurityCenter.Models.SecurityCenterCloudOffering, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
         {
             public DefenderForDevOpsGitLabOffering() { }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DefenderForDevOpsGitLabOffering 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.SecurityCenter.Models.DefenderForDevOpsGitLabOffering System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4697,6 +4831,7 @@ public DefenderForServersAwsOffering() { }
             public Azure.ResourceManager.SecurityCenter.Models.DefenderForServersAwsOfferingMdeAutoProvisioning MdeAutoProvisioning { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.DefenderForServersAwsOfferingVulnerabilityAssessmentAutoProvisioning VaAutoProvisioning { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.DefenderForServersAwsOfferingVmScanners VmScanners { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DefenderForServersAwsOffering 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.SecurityCenter.Models.DefenderForServersAwsOffering System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4709,6 +4844,7 @@ public DefenderForServersAwsOfferingArcAutoProvisioning() { }
             public string CloudRoleArn { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.DefenderForServersAwsOfferingArcAutoProvisioningConfiguration Configuration { get { throw null; } set { } }
             public bool? IsEnabled { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DefenderForServersAwsOfferingArcAutoProvisioning 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.SecurityCenter.Models.DefenderForServersAwsOfferingArcAutoProvisioning System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4720,6 +4856,7 @@ public partial class DefenderForServersAwsOfferingArcAutoProvisioningConfigurati
             public DefenderForServersAwsOfferingArcAutoProvisioningConfiguration() { }
             public string PrivateLinkScope { get { throw null; } set { } }
             public string Proxy { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DefenderForServersAwsOfferingArcAutoProvisioningConfiguration 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.SecurityCenter.Models.DefenderForServersAwsOfferingArcAutoProvisioningConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4731,6 +4868,7 @@ public partial class DefenderForServersAwsOfferingMdeAutoProvisioning : System.C
             public DefenderForServersAwsOfferingMdeAutoProvisioning() { }
             public System.BinaryData Configuration { get { throw null; } set { } }
             public bool? IsEnabled { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DefenderForServersAwsOfferingMdeAutoProvisioning 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.SecurityCenter.Models.DefenderForServersAwsOfferingMdeAutoProvisioning System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4742,6 +4880,7 @@ public partial class DefenderForServersAwsOfferingVmScanners : System.ClientMode
             public DefenderForServersAwsOfferingVmScanners() { }
             public Azure.ResourceManager.SecurityCenter.Models.DefenderForServersAwsOfferingVmScannersConfiguration Configuration { get { throw null; } set { } }
             public bool? IsEnabled { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DefenderForServersAwsOfferingVmScanners 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.SecurityCenter.Models.DefenderForServersAwsOfferingVmScanners System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4754,6 +4893,7 @@ public DefenderForServersAwsOfferingVmScannersConfiguration() { }
             public string CloudRoleArn { get { throw null; } set { } }
             public System.Collections.Generic.IDictionary ExclusionTags { get { throw null; } }
             public Azure.ResourceManager.SecurityCenter.Models.DefenderForServersScanningMode? ScanningMode { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DefenderForServersAwsOfferingVmScannersConfiguration 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.SecurityCenter.Models.DefenderForServersAwsOfferingVmScannersConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4765,6 +4905,7 @@ public partial class DefenderForServersAwsOfferingVulnerabilityAssessmentAutoPro
             public DefenderForServersAwsOfferingVulnerabilityAssessmentAutoProvisioning() { }
             public bool? IsEnabled { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.VulnerabilityAssessmentAutoProvisioningType? VulnerabilityAssessmentAutoProvisioningType { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DefenderForServersAwsOfferingVulnerabilityAssessmentAutoProvisioning 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.SecurityCenter.Models.DefenderForServersAwsOfferingVulnerabilityAssessmentAutoProvisioning System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4781,6 +4922,7 @@ public DefenderForServersGcpOffering() { }
             public Azure.ResourceManager.SecurityCenter.Models.DefenderForServersGcpOfferingMdeAutoProvisioning MdeAutoProvisioning { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.DefenderForServersGcpOfferingVmScanners VmScanners { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.DefenderForServersGcpOfferingVulnerabilityAssessmentAutoProvisioning VulnerabilityAssessmentAutoProvisioning { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DefenderForServersGcpOffering 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.SecurityCenter.Models.DefenderForServersGcpOffering System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4792,6 +4934,7 @@ public partial class DefenderForServersGcpOfferingArcAutoProvisioning : System.C
             public DefenderForServersGcpOfferingArcAutoProvisioning() { }
             public Azure.ResourceManager.SecurityCenter.Models.DefenderForServersGcpOfferingArcAutoProvisioningConfiguration Configuration { get { throw null; } set { } }
             public bool? IsEnabled { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DefenderForServersGcpOfferingArcAutoProvisioning 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.SecurityCenter.Models.DefenderForServersGcpOfferingArcAutoProvisioning System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4803,6 +4946,7 @@ public partial class DefenderForServersGcpOfferingArcAutoProvisioningConfigurati
             public DefenderForServersGcpOfferingArcAutoProvisioningConfiguration() { }
             public string PrivateLinkScope { get { throw null; } set { } }
             public string Proxy { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DefenderForServersGcpOfferingArcAutoProvisioningConfiguration 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.SecurityCenter.Models.DefenderForServersGcpOfferingArcAutoProvisioningConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4814,6 +4958,7 @@ public partial class DefenderForServersGcpOfferingMdeAutoProvisioning : System.C
             public DefenderForServersGcpOfferingMdeAutoProvisioning() { }
             public System.BinaryData Configuration { get { throw null; } set { } }
             public bool? IsEnabled { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DefenderForServersGcpOfferingMdeAutoProvisioning 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.SecurityCenter.Models.DefenderForServersGcpOfferingMdeAutoProvisioning System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4825,6 +4970,7 @@ public partial class DefenderForServersGcpOfferingVmScanners : System.ClientMode
             public DefenderForServersGcpOfferingVmScanners() { }
             public Azure.ResourceManager.SecurityCenter.Models.DefenderForServersGcpOfferingVmScannersConfiguration Configuration { get { throw null; } set { } }
             public bool? IsEnabled { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DefenderForServersGcpOfferingVmScanners 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.SecurityCenter.Models.DefenderForServersGcpOfferingVmScanners System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4836,6 +4982,7 @@ public partial class DefenderForServersGcpOfferingVmScannersConfiguration : Syst
             public DefenderForServersGcpOfferingVmScannersConfiguration() { }
             public System.Collections.Generic.IDictionary ExclusionTags { get { throw null; } }
             public Azure.ResourceManager.SecurityCenter.Models.DefenderForServersScanningMode? ScanningMode { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DefenderForServersGcpOfferingVmScannersConfiguration 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.SecurityCenter.Models.DefenderForServersGcpOfferingVmScannersConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4847,6 +4994,7 @@ public partial class DefenderForServersGcpOfferingVulnerabilityAssessmentAutoPro
             public DefenderForServersGcpOfferingVulnerabilityAssessmentAutoProvisioning() { }
             public bool? IsEnabled { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.VulnerabilityAssessmentAutoProvisioningType? VulnerabilityAssessmentAutoProvisioningType { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DefenderForServersGcpOfferingVulnerabilityAssessmentAutoProvisioning 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.SecurityCenter.Models.DefenderForServersGcpOfferingVulnerabilityAssessmentAutoProvisioning System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4891,6 +5039,7 @@ public partial class DenylistCustomAlertRule : Azure.ResourceManager.SecurityCen
         {
             public DenylistCustomAlertRule(bool isEnabled, System.Collections.Generic.IEnumerable denylistValues) : base (default(bool)) { }
             public System.Collections.Generic.IList DenylistValues { get { throw null; } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DenylistCustomAlertRule 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.SecurityCenter.Models.DenylistCustomAlertRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4925,6 +5074,7 @@ public DevOpsConfigurationProperties() { }
             public string ProvisioningStatusMessage { get { throw null; } }
             public System.DateTimeOffset? ProvisioningStatusUpdateTimeUtc { get { throw null; } }
             public System.Collections.Generic.IList TopLevelInventoryList { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DevOpsConfigurationProperties 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.SecurityCenter.Models.DevOpsConfigurationProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4939,6 +5089,7 @@ public DevOpsOrgProperties() { }
             public Azure.ResourceManager.SecurityCenter.Models.DevOpsProvisioningState? ProvisioningState { get { throw null; } set { } }
             public string ProvisioningStatusMessage { get { throw null; } }
             public System.DateTimeOffset? ProvisioningStatusUpdatedOn { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DevOpsOrgProperties 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.SecurityCenter.Models.DevOpsOrgProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4955,6 +5106,7 @@ public DevOpsProjectProperties() { }
             public Azure.ResourceManager.SecurityCenter.Models.DevOpsProvisioningState? ProvisioningState { get { throw null; } set { } }
             public string ProvisioningStatusMessage { get { throw null; } }
             public System.DateTimeOffset? ProvisioningStatusUpdatedOn { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DevOpsProjectProperties 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.SecurityCenter.Models.DevOpsProjectProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4997,6 +5149,7 @@ public DevOpsRepositoryProperties() { }
             public string RepoId { get { throw null; } }
             public System.Uri RepoUri { get { throw null; } }
             public string Visibility { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DevOpsRepositoryProperties 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.SecurityCenter.Models.DevOpsRepositoryProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -5006,6 +5159,7 @@ public DevOpsRepositoryProperties() { }
         public partial class DirectMethodInvokesNotInAllowedRange : Azure.ResourceManager.SecurityCenter.Models.TimeWindowCustomAlertRule, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
         {
             public DirectMethodInvokesNotInAllowedRange(bool isEnabled, int minThreshold, int maxThreshold, System.TimeSpan timeWindowSize) : base (default(bool), default(int), default(int), default(System.TimeSpan)) { }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DirectMethodInvokesNotInAllowedRange 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.SecurityCenter.Models.DirectMethodInvokesNotInAllowedRange System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -5020,6 +5174,7 @@ public DiscoveredSecuritySolution(Azure.ResourceManager.SecurityCenter.Models.Se
             public string Publisher { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.SecurityFamily SecurityFamily { get { throw null; } set { } }
             public string Sku { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DiscoveredSecuritySolution 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.SecurityCenter.Models.DiscoveredSecuritySolution System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -5031,6 +5186,7 @@ public partial class EffectiveNetworkSecurityGroups : System.ClientModel.Primiti
             public EffectiveNetworkSecurityGroups() { }
             public string NetworkInterface { get { throw null; } set { } }
             public System.Collections.Generic.IList NetworkSecurityGroups { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.EffectiveNetworkSecurityGroups 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.SecurityCenter.Models.EffectiveNetworkSecurityGroups System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -5066,6 +5222,7 @@ public EnvironmentDetails() { }
             public string OrganizationalHierarchyId { get { throw null; } set { } }
             public string SubscriptionId { get { throw null; } set { } }
             public System.Guid? TenantId { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.EnvironmentDetails 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.SecurityCenter.Models.EnvironmentDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -5076,6 +5233,7 @@ public partial class ExecuteGovernanceRuleParams : System.ClientModel.Primitives
         {
             public ExecuteGovernanceRuleParams() { }
             public bool? Override { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.ExecuteGovernanceRuleParams 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.SecurityCenter.Models.ExecuteGovernanceRuleParams System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -5097,6 +5255,7 @@ public partial class ExtensionOperationStatus : System.ClientModel.Primitives.IJ
             internal ExtensionOperationStatus() { }
             public string Code { get { throw null; } }
             public string Message { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.ExtensionOperationStatus 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.SecurityCenter.Models.ExtensionOperationStatus System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -5126,6 +5285,7 @@ public partial class ExternalSecuritySolution : Azure.ResourceManager.Models.Res
             public ExternalSecuritySolution() { }
             public Azure.ResourceManager.SecurityCenter.Models.ExternalSecuritySolutionKind? Kind { get { throw null; } set { } }
             public Azure.Core.AzureLocation? Location { get { throw null; } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.ExternalSecuritySolution 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.SecurityCenter.Models.ExternalSecuritySolution System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -5158,6 +5318,7 @@ public ExternalSecuritySolutionProperties() { }
             public string DeviceType { get { throw null; } set { } }
             public string DeviceVendor { get { throw null; } set { } }
             public Azure.Core.ResourceIdentifier WorkspaceId { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.ExternalSecuritySolutionProperties 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.SecurityCenter.Models.ExternalSecuritySolutionProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -5167,6 +5328,7 @@ public ExternalSecuritySolutionProperties() { }
         public partial class FailedLocalLoginsNotInAllowedRange : Azure.ResourceManager.SecurityCenter.Models.TimeWindowCustomAlertRule, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
         {
             public FailedLocalLoginsNotInAllowedRange(bool isEnabled, int minThreshold, int maxThreshold, System.TimeSpan timeWindowSize) : base (default(bool), default(int), default(int), default(System.TimeSpan)) { }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.FailedLocalLoginsNotInAllowedRange 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.SecurityCenter.Models.FailedLocalLoginsNotInAllowedRange System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -5176,6 +5338,7 @@ public partial class FailedLocalLoginsNotInAllowedRange : Azure.ResourceManager.
         public partial class FileUploadsNotInAllowedRange : Azure.ResourceManager.SecurityCenter.Models.TimeWindowCustomAlertRule, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
         {
             public FileUploadsNotInAllowedRange(bool isEnabled, int minThreshold, int maxThreshold, System.TimeSpan timeWindowSize) : base (default(bool), default(int), default(int), default(System.TimeSpan)) { }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.FileUploadsNotInAllowedRange 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.SecurityCenter.Models.FileUploadsNotInAllowedRange System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -5196,6 +5359,7 @@ public GcpCredentialsDetailsProperties(string organizationId, string gcpCredenti
             public string PrivateKeyId { get { throw null; } set { } }
             public string ProjectId { get { throw null; } set { } }
             public System.Uri TokenUri { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.GcpCredentialsDetailsProperties 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.SecurityCenter.Models.GcpCredentialsDetailsProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -5207,6 +5371,7 @@ public partial class GcpDefenderForDatabasesArcAutoProvisioning : System.ClientM
             public GcpDefenderForDatabasesArcAutoProvisioning() { }
             public string ServiceAccountEmailAddress { get { throw null; } set { } }
             public string WorkloadIdentityProviderId { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.GcpDefenderForDatabasesArcAutoProvisioning 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.SecurityCenter.Models.GcpDefenderForDatabasesArcAutoProvisioning System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -5218,6 +5383,7 @@ public partial class GcpDefenderForServersInfo : System.ClientModel.Primitives.I
             public GcpDefenderForServersInfo() { }
             public string ServiceAccountEmailAddress { get { throw null; } set { } }
             public string WorkloadIdentityProviderId { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.GcpDefenderForServersInfo 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.SecurityCenter.Models.GcpDefenderForServersInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -5229,6 +5395,7 @@ public partial class GcpMemberOrganizationalInfo : Azure.ResourceManager.Securit
             public GcpMemberOrganizationalInfo() { }
             public string ManagementProjectNumber { get { throw null; } set { } }
             public string ParentHierarchyId { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.GcpMemberOrganizationalInfo 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.SecurityCenter.Models.GcpMemberOrganizationalInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -5238,6 +5405,7 @@ public GcpMemberOrganizationalInfo() { }
         public abstract partial class GcpOrganizationalInfo : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
         {
             protected GcpOrganizationalInfo() { }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.GcpOrganizationalInfo 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.SecurityCenter.Models.GcpOrganizationalInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -5251,6 +5419,7 @@ public GcpParentOrganizationalInfo() { }
             public string OrganizationName { get { throw null; } }
             public string ServiceAccountEmailAddress { get { throw null; } set { } }
             public string WorkloadIdentityProviderId { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.GcpParentOrganizationalInfo 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.SecurityCenter.Models.GcpParentOrganizationalInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -5264,6 +5433,7 @@ public GcpProjectDetails() { }
             public string ProjectName { get { throw null; } }
             public string ProjectNumber { get { throw null; } set { } }
             public string WorkloadIdentityPoolId { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.GcpProjectDetails 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.SecurityCenter.Models.GcpProjectDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -5276,6 +5446,7 @@ public GcpProjectEnvironment() { }
             public Azure.ResourceManager.SecurityCenter.Models.GcpOrganizationalInfo OrganizationalData { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.GcpProjectDetails ProjectDetails { get { throw null; } set { } }
             public long? ScanInterval { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.GcpProjectEnvironment 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.SecurityCenter.Models.GcpProjectEnvironment System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -5289,6 +5460,7 @@ internal GetSensitivitySettingsResponsePropertiesMipInformation() { }
             public System.Collections.Generic.IReadOnlyList CustomInfoTypes { get { throw null; } }
             public System.Collections.Generic.IReadOnlyList Labels { get { throw null; } }
             public Azure.ResourceManager.SecurityCenter.Models.MipIntegrationStatus? MipIntegrationStatus { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.GetSensitivitySettingsResponsePropertiesMipInformation 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.SecurityCenter.Models.GetSensitivitySettingsResponsePropertiesMipInformation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -5298,6 +5470,7 @@ internal GetSensitivitySettingsResponsePropertiesMipInformation() { }
         public partial class GithubScopeEnvironment : Azure.ResourceManager.SecurityCenter.Models.SecurityConnectorEnvironment, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
         {
             public GithubScopeEnvironment() { }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.GithubScopeEnvironment 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.SecurityCenter.Models.GithubScopeEnvironment System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -5307,6 +5480,7 @@ public GithubScopeEnvironment() { }
         public partial class GitlabScopeEnvironment : Azure.ResourceManager.SecurityCenter.Models.SecurityConnectorEnvironment, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
         {
             public GitlabScopeEnvironment() { }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.GitlabScopeEnvironment 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.SecurityCenter.Models.GitlabScopeEnvironment System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -5319,6 +5493,7 @@ public GovernanceAssignmentAdditionalInfo() { }
             public string TicketLink { get { throw null; } set { } }
             public int? TicketNumber { get { throw null; } set { } }
             public string TicketStatus { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.GovernanceAssignmentAdditionalInfo 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.SecurityCenter.Models.GovernanceAssignmentAdditionalInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -5330,6 +5505,7 @@ public partial class GovernanceEmailNotification : System.ClientModel.Primitives
             public GovernanceEmailNotification() { }
             public bool? IsManagerEmailNotificationDisabled { get { throw null; } set { } }
             public bool? IsOwnerEmailNotificationDisabled { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.GovernanceEmailNotification 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.SecurityCenter.Models.GovernanceEmailNotification System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -5341,6 +5517,7 @@ public partial class GovernanceRuleEmailNotification : System.ClientModel.Primit
             public GovernanceRuleEmailNotification() { }
             public bool? IsManagerEmailNotificationDisabled { get { throw null; } set { } }
             public bool? IsOwnerEmailNotificationDisabled { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.GovernanceRuleEmailNotification 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.SecurityCenter.Models.GovernanceRuleEmailNotification System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -5354,6 +5531,7 @@ public GovernanceRuleMetadata() { }
             public System.DateTimeOffset? CreatedOn { get { throw null; } }
             public string UpdatedBy { get { throw null; } }
             public System.DateTimeOffset? UpdatedOn { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.GovernanceRuleMetadata 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.SecurityCenter.Models.GovernanceRuleMetadata System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -5365,6 +5543,7 @@ public partial class GovernanceRuleOwnerSource : System.ClientModel.Primitives.I
             public GovernanceRuleOwnerSource() { }
             public Azure.ResourceManager.SecurityCenter.Models.GovernanceRuleOwnerSourceType? SourceType { get { throw null; } set { } }
             public string Value { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.GovernanceRuleOwnerSource 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.SecurityCenter.Models.GovernanceRuleOwnerSource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -5430,6 +5609,7 @@ public HealthDataClassification() { }
             public string Component { get { throw null; } set { } }
             public string Scenario { get { throw null; } set { } }
             public string Scope { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.HealthDataClassification 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.SecurityCenter.Models.HealthDataClassification System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -5442,6 +5622,7 @@ public HealthReportResourceDetails() { }
             public string ConnectorId { get { throw null; } }
             public Azure.Core.ResourceIdentifier Id { get { throw null; } }
             public Azure.ResourceManager.SecurityCenter.Models.HealthReportSource? Source { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.HealthReportResourceDetails 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.SecurityCenter.Models.HealthReportResourceDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -5475,6 +5656,7 @@ public HealthReportStatus() { }
             public System.DateTimeOffset? LastScannedOn { get { throw null; } }
             public string Reason { get { throw null; } }
             public System.DateTimeOffset? StatusChangeOn { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.HealthReportStatus 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.SecurityCenter.Models.HealthReportStatus System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -5503,6 +5685,7 @@ public HealthReportStatus() { }
         public partial class HttpC2DMessagesNotInAllowedRange : Azure.ResourceManager.SecurityCenter.Models.TimeWindowCustomAlertRule, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
         {
             public HttpC2DMessagesNotInAllowedRange(bool isEnabled, int minThreshold, int maxThreshold, System.TimeSpan timeWindowSize) : base (default(bool), default(int), default(int), default(System.TimeSpan)) { }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.HttpC2DMessagesNotInAllowedRange 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.SecurityCenter.Models.HttpC2DMessagesNotInAllowedRange System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -5512,6 +5695,7 @@ public partial class HttpC2DMessagesNotInAllowedRange : Azure.ResourceManager.Se
         public partial class HttpC2DRejectedMessagesNotInAllowedRange : Azure.ResourceManager.SecurityCenter.Models.TimeWindowCustomAlertRule, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
         {
             public HttpC2DRejectedMessagesNotInAllowedRange(bool isEnabled, int minThreshold, int maxThreshold, System.TimeSpan timeWindowSize) : base (default(bool), default(int), default(int), default(System.TimeSpan)) { }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.HttpC2DRejectedMessagesNotInAllowedRange 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.SecurityCenter.Models.HttpC2DRejectedMessagesNotInAllowedRange System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -5521,6 +5705,7 @@ public partial class HttpC2DRejectedMessagesNotInAllowedRange : Azure.ResourceMa
         public partial class HttpD2CMessagesNotInAllowedRange : Azure.ResourceManager.SecurityCenter.Models.TimeWindowCustomAlertRule, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
         {
             public HttpD2CMessagesNotInAllowedRange(bool isEnabled, int minThreshold, int maxThreshold, System.TimeSpan timeWindowSize) : base (default(bool), default(int), default(int), default(System.TimeSpan)) { }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.HttpD2CMessagesNotInAllowedRange 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.SecurityCenter.Models.HttpD2CMessagesNotInAllowedRange System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -5555,6 +5740,7 @@ public HybridComputeSettingsProperties(Azure.ResourceManager.SecurityCenter.Mode
             public string Region { get { throw null; } set { } }
             public string ResourceGroupName { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.ServicePrincipalProperties ServicePrincipal { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.HybridComputeSettingsProperties 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.SecurityCenter.Models.HybridComputeSettingsProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -5584,6 +5770,7 @@ public partial class InformationProtectionAwsOffering : Azure.ResourceManager.Se
         {
             public InformationProtectionAwsOffering() { }
             public string InformationProtectionCloudRoleArn { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.InformationProtectionAwsOffering 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.SecurityCenter.Models.InformationProtectionAwsOffering System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -5597,6 +5784,7 @@ public InformationProtectionKeyword() { }
             public bool? Custom { get { throw null; } set { } }
             public bool? Excluded { get { throw null; } set { } }
             public string Pattern { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.InformationProtectionKeyword 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.SecurityCenter.Models.InformationProtectionKeyword System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -5610,6 +5798,7 @@ public InformationProtectionPolicy() { }
             public System.Collections.Generic.IDictionary Labels { get { throw null; } }
             public System.DateTimeOffset? LastModifiedUtc { get { throw null; } }
             public string Version { get { throw null; } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.InformationProtectionPolicy 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.SecurityCenter.Models.InformationProtectionPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -5658,6 +5847,7 @@ internal IotSecurityAggregatedAlertTopDevice() { }
             public long? AlertsCount { get { throw null; } }
             public string DeviceId { get { throw null; } }
             public string LastOccurrence { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.IotSecurityAggregatedAlertTopDevice 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.SecurityCenter.Models.IotSecurityAggregatedAlertTopDevice System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -5669,6 +5859,7 @@ public partial class IotSecurityAlertedDevice : System.ClientModel.Primitives.IJ
             public IotSecurityAlertedDevice() { }
             public long? AlertsCount { get { throw null; } }
             public string DeviceId { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.IotSecurityAlertedDevice 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.SecurityCenter.Models.IotSecurityAlertedDevice System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -5681,6 +5872,7 @@ public IotSecurityDeviceAlert() { }
             public string AlertDisplayName { get { throw null; } }
             public long? AlertsCount { get { throw null; } }
             public Azure.ResourceManager.SecurityCenter.Models.ReportedSeverity? ReportedSeverity { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.IotSecurityDeviceAlert 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.SecurityCenter.Models.IotSecurityDeviceAlert System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -5693,6 +5885,7 @@ public IotSecurityDeviceRecommendation() { }
             public long? DevicesCount { get { throw null; } }
             public string RecommendationDisplayName { get { throw null; } }
             public Azure.ResourceManager.SecurityCenter.Models.ReportedSeverity? ReportedSeverity { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.IotSecurityDeviceRecommendation 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.SecurityCenter.Models.IotSecurityDeviceRecommendation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -5736,6 +5929,7 @@ public partial class IotSecuritySolutionAnalyticsModelDevicesMetrics : System.Cl
             internal IotSecuritySolutionAnalyticsModelDevicesMetrics() { }
             public System.DateTimeOffset? Date { get { throw null; } }
             public Azure.ResourceManager.SecurityCenter.Models.IotSeverityMetrics DevicesMetrics { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.IotSecuritySolutionAnalyticsModelDevicesMetrics 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.SecurityCenter.Models.IotSecuritySolutionAnalyticsModelDevicesMetrics System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -5781,6 +5975,7 @@ public partial class IotSecuritySolutionPatch : Azure.ResourceManager.SecurityCe
             public IotSecuritySolutionPatch() { }
             public System.Collections.Generic.IList RecommendationsConfiguration { get { throw null; } }
             public Azure.ResourceManager.SecurityCenter.Models.UserDefinedResourcesProperties UserDefinedResources { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.IotSecuritySolutionPatch 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.SecurityCenter.Models.IotSecuritySolutionPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -5793,6 +5988,7 @@ internal IotSeverityMetrics() { }
             public long? High { get { throw null; } }
             public long? Low { get { throw null; } }
             public long? Medium { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.IotSeverityMetrics 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.SecurityCenter.Models.IotSeverityMetrics System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -5822,6 +6018,7 @@ public partial class JitNetworkAccessPolicyInitiateContent : System.ClientModel.
             public JitNetworkAccessPolicyInitiateContent(System.Collections.Generic.IEnumerable virtualMachines) { }
             public string Justification { get { throw null; } set { } }
             public System.Collections.Generic.IList VirtualMachines { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.JitNetworkAccessPolicyInitiateContent 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.SecurityCenter.Models.JitNetworkAccessPolicyInitiateContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -5834,6 +6031,7 @@ public JitNetworkAccessPolicyInitiatePort(int number, System.DateTimeOffset endO
             public string AllowedSourceAddressPrefix { get { throw null; } set { } }
             public System.DateTimeOffset EndOn { get { throw null; } }
             public int Number { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.JitNetworkAccessPolicyInitiatePort 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.SecurityCenter.Models.JitNetworkAccessPolicyInitiatePort System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -5845,6 +6043,7 @@ public partial class JitNetworkAccessPolicyInitiateVirtualMachine : System.Clien
             public JitNetworkAccessPolicyInitiateVirtualMachine(Azure.Core.ResourceIdentifier id, System.Collections.Generic.IEnumerable ports) { }
             public Azure.Core.ResourceIdentifier Id { get { throw null; } }
             public System.Collections.Generic.IList Ports { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.JitNetworkAccessPolicyInitiateVirtualMachine 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.SecurityCenter.Models.JitNetworkAccessPolicyInitiateVirtualMachine System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -5857,6 +6056,7 @@ public JitNetworkAccessPolicyVirtualMachine(Azure.Core.ResourceIdentifier id, Sy
             public Azure.Core.ResourceIdentifier Id { get { throw null; } set { } }
             public System.Collections.Generic.IList Ports { get { throw null; } }
             public string PublicIPAddress { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.JitNetworkAccessPolicyVirtualMachine 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.SecurityCenter.Models.JitNetworkAccessPolicyVirtualMachine System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -5890,6 +6090,7 @@ public JitNetworkAccessPortRule(int number, Azure.ResourceManager.SecurityCenter
             public System.TimeSpan MaxRequestAccessDuration { get { throw null; } set { } }
             public int Number { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.JitNetworkAccessPortProtocol Protocol { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.JitNetworkAccessPortRule 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.SecurityCenter.Models.JitNetworkAccessPortRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -5940,6 +6141,7 @@ public JitNetworkAccessRequestInfo(System.Collections.Generic.IEnumerable VirtualMachines { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.JitNetworkAccessRequestInfo 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.SecurityCenter.Models.JitNetworkAccessRequestInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -5956,6 +6158,7 @@ public JitNetworkAccessRequestPort(int number, System.DateTimeOffset endOn, Azur
             public int Number { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.JitNetworkAccessPortStatus Status { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.JitNetworkAccessPortStatusReason StatusReason { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.JitNetworkAccessRequestPort 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.SecurityCenter.Models.JitNetworkAccessRequestPort System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -5967,6 +6170,7 @@ public partial class JitNetworkAccessRequestVirtualMachine : System.ClientModel.
             public JitNetworkAccessRequestVirtualMachine(Azure.Core.ResourceIdentifier id, System.Collections.Generic.IEnumerable ports) { }
             public Azure.Core.ResourceIdentifier Id { get { throw null; } set { } }
             public System.Collections.Generic.IList Ports { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.JitNetworkAccessRequestVirtualMachine 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.SecurityCenter.Models.JitNetworkAccessRequestVirtualMachine System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -6009,6 +6213,7 @@ public partial class ListCustomAlertRule : Azure.ResourceManager.SecurityCenter.
         {
             public ListCustomAlertRule(bool isEnabled) : base (default(bool)) { }
             public Azure.ResourceManager.SecurityCenter.Models.SecurityValueType? ValueType { get { throw null; } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.ListCustomAlertRule 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.SecurityCenter.Models.ListCustomAlertRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -6018,6 +6223,7 @@ public ListCustomAlertRule(bool isEnabled) : base (default(bool)) { }
         public partial class LocalUserNotAllowed : Azure.ResourceManager.SecurityCenter.Models.AllowlistCustomAlertRule, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
         {
             public LocalUserNotAllowed(bool isEnabled, System.Collections.Generic.IEnumerable allowlistValues) : base (default(bool), default(System.Collections.Generic.IEnumerable)) { }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.LocalUserNotAllowed 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.SecurityCenter.Models.LocalUserNotAllowed System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -6031,6 +6237,7 @@ internal LogAnalyticsIdentifier() { }
             public System.Guid? WorkspaceId { get { throw null; } }
             public string WorkspaceResourceGroup { get { throw null; } }
             public string WorkspaceSubscriptionId { get { throw null; } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.LogAnalyticsIdentifier 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.SecurityCenter.Models.LogAnalyticsIdentifier System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -6042,6 +6249,7 @@ public partial class MdeOnboarding : Azure.ResourceManager.Models.ResourceData,
             public MdeOnboarding() { }
             public byte[] OnboardingPackageLinux { get { throw null; } set { } }
             public byte[] OnboardingPackageWindows { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.MdeOnboarding 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.SecurityCenter.Models.MdeOnboarding System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -6074,6 +6282,7 @@ internal MipSensitivityLabel() { }
             public System.Guid? Id { get { throw null; } }
             public string Name { get { throw null; } }
             public float? Order { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.MipSensitivityLabel 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.SecurityCenter.Models.MipSensitivityLabel System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -6083,6 +6292,7 @@ internal MipSensitivityLabel() { }
         public partial class MqttC2DMessagesNotInAllowedRange : Azure.ResourceManager.SecurityCenter.Models.TimeWindowCustomAlertRule, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
         {
             public MqttC2DMessagesNotInAllowedRange(bool isEnabled, int minThreshold, int maxThreshold, System.TimeSpan timeWindowSize) : base (default(bool), default(int), default(int), default(System.TimeSpan)) { }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.MqttC2DMessagesNotInAllowedRange 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.SecurityCenter.Models.MqttC2DMessagesNotInAllowedRange System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -6092,6 +6302,7 @@ public partial class MqttC2DMessagesNotInAllowedRange : Azure.ResourceManager.Se
         public partial class MqttC2DRejectedMessagesNotInAllowedRange : Azure.ResourceManager.SecurityCenter.Models.TimeWindowCustomAlertRule, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
         {
             public MqttC2DRejectedMessagesNotInAllowedRange(bool isEnabled, int minThreshold, int maxThreshold, System.TimeSpan timeWindowSize) : base (default(bool), default(int), default(int), default(System.TimeSpan)) { }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.MqttC2DRejectedMessagesNotInAllowedRange 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.SecurityCenter.Models.MqttC2DRejectedMessagesNotInAllowedRange System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -6101,6 +6312,7 @@ public partial class MqttC2DRejectedMessagesNotInAllowedRange : Azure.ResourceMa
         public partial class MqttD2CMessagesNotInAllowedRange : Azure.ResourceManager.SecurityCenter.Models.TimeWindowCustomAlertRule, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
         {
             public MqttD2CMessagesNotInAllowedRange(bool isEnabled, int minThreshold, int maxThreshold, System.TimeSpan timeWindowSize) : base (default(bool), default(int), default(int), default(System.TimeSpan)) { }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.MqttD2CMessagesNotInAllowedRange 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.SecurityCenter.Models.MqttD2CMessagesNotInAllowedRange System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -6114,6 +6326,7 @@ public OnPremiseResourceDetails(Azure.Core.ResourceIdentifier workspaceId, Syste
             public string SourceComputerId { get { throw null; } set { } }
             public System.Guid VmUuid { get { throw null; } set { } }
             public Azure.Core.ResourceIdentifier WorkspaceId { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.OnPremiseResourceDetails 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.SecurityCenter.Models.OnPremiseResourceDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -6125,6 +6338,7 @@ public partial class OnPremiseSqlResourceDetails : Azure.ResourceManager.Securit
             public OnPremiseSqlResourceDetails(Azure.Core.ResourceIdentifier workspaceId, System.Guid vmUuid, string sourceComputerId, string machineName, string serverName, string databaseName) : base (default(Azure.Core.ResourceIdentifier), default(System.Guid), default(string), default(string)) { }
             public string DatabaseName { get { throw null; } set { } }
             public string ServerName { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.OnPremiseSqlResourceDetails 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.SecurityCenter.Models.OnPremiseSqlResourceDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -6136,6 +6350,7 @@ public partial class OperationStatusAutoGenerated : System.ClientModel.Primitive
             internal OperationStatusAutoGenerated() { }
             public Azure.ResourceManager.SecurityCenter.Models.ExtensionOperationStatusCode? Code { get { throw null; } }
             public string Message { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.OperationStatusAutoGenerated 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.SecurityCenter.Models.OperationStatusAutoGenerated System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -6154,6 +6369,7 @@ public PathRecommendation() { }
             public Azure.ResourceManager.SecurityCenter.Models.SecurityCenterPublisherInfo PublisherInfo { get { throw null; } set { } }
             public System.Collections.Generic.IList Usernames { get { throw null; } }
             public System.Collections.Generic.IList UserSids { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.PathRecommendation 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.SecurityCenter.Models.PathRecommendation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -6189,6 +6405,7 @@ public PlanExtension(string name, Azure.ResourceManager.SecurityCenter.Models.Is
             public Azure.ResourceManager.SecurityCenter.Models.IsExtensionEnabled IsEnabled { get { throw null; } set { } }
             public string Name { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.OperationStatusAutoGenerated OperationStatus { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.PlanExtension 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.SecurityCenter.Models.PlanExtension System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -6198,6 +6415,7 @@ public PlanExtension(string name, Azure.ResourceManager.SecurityCenter.Models.Is
         public partial class ProcessNotAllowed : Azure.ResourceManager.SecurityCenter.Models.AllowlistCustomAlertRule, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
         {
             public ProcessNotAllowed(bool isEnabled, System.Collections.Generic.IEnumerable allowlistValues) : base (default(bool), default(System.Collections.Generic.IEnumerable)) { }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.ProcessNotAllowed 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.SecurityCenter.Models.ProcessNotAllowed System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -6209,6 +6427,7 @@ public partial class ProxyServerProperties : System.ClientModel.Primitives.IJson
             public ProxyServerProperties() { }
             public string IP { get { throw null; } set { } }
             public string Port { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.ProxyServerProperties 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.SecurityCenter.Models.ProxyServerProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -6218,6 +6437,7 @@ public ProxyServerProperties() { }
         public partial class QueuePurgesNotInAllowedRange : Azure.ResourceManager.SecurityCenter.Models.TimeWindowCustomAlertRule, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
         {
             public QueuePurgesNotInAllowedRange(bool isEnabled, int minThreshold, int maxThreshold, System.TimeSpan timeWindowSize) : base (default(bool), default(int), default(int), default(System.TimeSpan)) { }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.QueuePurgesNotInAllowedRange 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.SecurityCenter.Models.QueuePurgesNotInAllowedRange System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -6267,6 +6487,7 @@ public RecommendationConfigurationProperties(Azure.ResourceManager.SecurityCente
             public string Name { get { throw null; } }
             public Azure.ResourceManager.SecurityCenter.Models.IotSecurityRecommendationType RecommendationType { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.RecommendationConfigStatus Status { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.RecommendationConfigurationProperties 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.SecurityCenter.Models.RecommendationConfigurationProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -6301,6 +6522,7 @@ public RecommendedSecurityRule() { }
             public System.Collections.Generic.IList IPAddresses { get { throw null; } }
             public string Name { get { throw null; } set { } }
             public System.Collections.Generic.IList Protocols { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.RecommendedSecurityRule 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.SecurityCenter.Models.RecommendedSecurityRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -6332,6 +6554,7 @@ public partial class RemediationEta : 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.SecurityCenter.Models.RemediationEta System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -6426,6 +6649,7 @@ public partial class RulesResultsContent : System.ClientModel.Primitives.IJsonMo
             public RulesResultsContent() { }
             public bool? LatestScan { get { throw null; } set { } }
             public System.Collections.Generic.IDictionary>> Results { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.RulesResultsContent 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.SecurityCenter.Models.RulesResultsContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -6440,6 +6664,7 @@ public SecureScoreControlDefinitionItem() { }
             public string DisplayName { get { throw null; } }
             public int? MaxScore { get { throw null; } }
             public Azure.ResourceManager.SecurityCenter.Models.SecurityControlType? SourceType { get { throw null; } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SecureScoreControlDefinitionItem 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.SecurityCenter.Models.SecureScoreControlDefinitionItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -6458,6 +6683,7 @@ public SecureScoreControlDetails() { }
             public double? Percentage { get { throw null; } }
             public int? UnhealthyResourceCount { get { throw null; } }
             public long? Weight { get { throw null; } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SecureScoreControlDetails 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.SecurityCenter.Models.SecureScoreControlDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -6469,6 +6695,7 @@ public partial class SecurityAlertEntity : System.ClientModel.Primitives.IJsonMo
             internal SecurityAlertEntity() { }
             public System.Collections.Generic.IReadOnlyDictionary AdditionalProperties { get { throw null; } }
             public string AlertEntityType { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SecurityAlertEntity 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.SecurityCenter.Models.SecurityAlertEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -6553,6 +6780,7 @@ internal SecurityAlertEntity() { }
         public abstract partial class SecurityAlertResourceIdentifier : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
         {
             protected SecurityAlertResourceIdentifier() { }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SecurityAlertResourceIdentifier 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.SecurityCenter.Models.SecurityAlertResourceIdentifier System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -6583,6 +6811,7 @@ public partial class SecurityAlertSimulatorBundlesRequestProperties : Azure.Reso
         {
             public SecurityAlertSimulatorBundlesRequestProperties() { }
             public System.Collections.Generic.IList Bundles { get { throw null; } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SecurityAlertSimulatorBundlesRequestProperties 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.SecurityCenter.Models.SecurityAlertSimulatorBundlesRequestProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -6618,6 +6847,7 @@ public partial class SecurityAlertSimulatorContent : System.ClientModel.Primitiv
         {
             public SecurityAlertSimulatorContent() { }
             public Azure.ResourceManager.SecurityCenter.Models.SecurityAlertSimulatorRequestProperties Properties { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SecurityAlertSimulatorContent 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.SecurityCenter.Models.SecurityAlertSimulatorContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -6628,6 +6858,7 @@ public partial class SecurityAlertSimulatorRequestProperties : System.ClientMode
         {
             public SecurityAlertSimulatorRequestProperties() { }
             public System.Collections.Generic.IDictionary AdditionalProperties { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SecurityAlertSimulatorRequestProperties 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.SecurityCenter.Models.SecurityAlertSimulatorRequestProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -6665,6 +6896,7 @@ public partial class SecurityAlertSupportingEvidence : System.ClientModel.Primit
             public SecurityAlertSupportingEvidence() { }
             public System.Collections.Generic.IDictionary AdditionalProperties { get { throw null; } }
             public string SecurityAlertSupportingEvidenceType { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SecurityAlertSupportingEvidence 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.SecurityCenter.Models.SecurityAlertSupportingEvidence System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -6675,6 +6907,7 @@ public partial class SecurityAlertSyncSettings : Azure.ResourceManager.SecurityC
         {
             public SecurityAlertSyncSettings() { }
             public bool? IsEnabled { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SecurityAlertSyncSettings 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.SecurityCenter.Models.SecurityAlertSyncSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -6691,6 +6924,7 @@ public SecurityAssessmentCreateOrUpdateContent() { }
             public Azure.ResourceManager.SecurityCenter.Models.SecurityAssessmentPartner PartnersData { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.SecurityCenterResourceDetails ResourceDetails { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.SecurityAssessmentStatus Status { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SecurityAssessmentCreateOrUpdateContent 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.SecurityCenter.Models.SecurityAssessmentCreateOrUpdateContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -6703,6 +6937,7 @@ public SecurityAssessmentMetadataPartner(string partnerName, string secret) { }
             public string PartnerName { get { throw null; } set { } }
             public string ProductName { get { throw null; } set { } }
             public string Secret { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SecurityAssessmentMetadataPartner 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.SecurityCenter.Models.SecurityAssessmentMetadataPartner System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -6724,6 +6959,7 @@ public SecurityAssessmentMetadataProperties(string displayName, Azure.ResourceMa
             public Azure.ResourceManager.SecurityCenter.Models.SecurityAssessmentSeverity Severity { get { throw null; } set { } }
             public System.Collections.Generic.IList Threats { get { throw null; } }
             public Azure.ResourceManager.SecurityCenter.Models.SecurityAssessmentUserImpact? UserImpact { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SecurityAssessmentMetadataProperties 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.SecurityCenter.Models.SecurityAssessmentMetadataProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -6753,6 +6989,7 @@ public partial class SecurityAssessmentPartner : System.ClientModel.Primitives.I
             public SecurityAssessmentPartner(string partnerName, string secret) { }
             public string PartnerName { get { throw null; } set { } }
             public string Secret { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SecurityAssessmentPartner 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.SecurityCenter.Models.SecurityAssessmentPartner System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -6764,6 +7001,7 @@ public partial class SecurityAssessmentPublishDates : System.ClientModel.Primiti
             public SecurityAssessmentPublishDates(string @public) { }
             public string GA { get { throw null; } set { } }
             public string Public { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SecurityAssessmentPublishDates 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.SecurityCenter.Models.SecurityAssessmentPublishDates System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -6836,6 +7074,7 @@ public SecurityAssessmentStatus(Azure.ResourceManager.SecurityCenter.Models.Secu
             public string Cause { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.SecurityAssessmentStatusCode Code { get { throw null; } set { } }
             public string Description { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SecurityAssessmentStatus 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.SecurityCenter.Models.SecurityAssessmentStatus System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -6866,6 +7105,7 @@ public partial class SecurityAssessmentStatusResult : Azure.ResourceManager.Secu
             public SecurityAssessmentStatusResult(Azure.ResourceManager.SecurityCenter.Models.SecurityAssessmentStatusCode code) : base (default(Azure.ResourceManager.SecurityCenter.Models.SecurityAssessmentStatusCode)) { }
             public System.DateTimeOffset? FirstEvaluatedOn { get { throw null; } }
             public System.DateTimeOffset? StatusChangeOn { get { throw null; } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SecurityAssessmentStatusResult 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.SecurityCenter.Models.SecurityAssessmentStatusResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -7064,6 +7304,7 @@ public SecurityAssessmentStatusResult(Azure.ResourceManager.SecurityCenter.Model
         public abstract partial class SecurityAutomationAction : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
         {
             protected SecurityAutomationAction() { }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SecurityAutomationAction 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.SecurityCenter.Models.SecurityAutomationAction System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -7076,6 +7317,7 @@ public SecurityAutomationActionEventHub() { }
             public string ConnectionString { get { throw null; } set { } }
             public Azure.Core.ResourceIdentifier EventHubResourceId { get { throw null; } set { } }
             public string SasPolicyName { get { throw null; } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SecurityAutomationActionEventHub 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.SecurityCenter.Models.SecurityAutomationActionEventHub System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -7087,6 +7329,7 @@ public partial class SecurityAutomationActionLogicApp : Azure.ResourceManager.Se
             public SecurityAutomationActionLogicApp() { }
             public Azure.Core.ResourceIdentifier LogicAppResourceId { get { throw null; } set { } }
             public System.Uri Uri { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SecurityAutomationActionLogicApp 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.SecurityCenter.Models.SecurityAutomationActionLogicApp System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -7097,6 +7340,7 @@ public partial class SecurityAutomationActionWorkspace : Azure.ResourceManager.S
         {
             public SecurityAutomationActionWorkspace() { }
             public Azure.Core.ResourceIdentifier WorkspaceResourceId { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SecurityAutomationActionWorkspace 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.SecurityCenter.Models.SecurityAutomationActionWorkspace System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -7107,6 +7351,7 @@ public partial class SecurityAutomationRuleSet : System.ClientModel.Primitives.I
         {
             public SecurityAutomationRuleSet() { }
             public System.Collections.Generic.IList Rules { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SecurityAutomationRuleSet 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.SecurityCenter.Models.SecurityAutomationRuleSet System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -7118,6 +7363,7 @@ public partial class SecurityAutomationScope : System.ClientModel.Primitives.IJs
             public SecurityAutomationScope() { }
             public string Description { get { throw null; } set { } }
             public string ScopePath { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SecurityAutomationScope 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.SecurityCenter.Models.SecurityAutomationScope System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -7129,6 +7375,7 @@ public partial class SecurityAutomationSource : System.ClientModel.Primitives.IJ
             public SecurityAutomationSource() { }
             public Azure.ResourceManager.SecurityCenter.Models.SecurityEventSource? EventSource { get { throw null; } set { } }
             public System.Collections.Generic.IList RuleSets { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SecurityAutomationSource 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.SecurityCenter.Models.SecurityAutomationSource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -7142,6 +7389,7 @@ public SecurityAutomationTriggeringRule() { }
             public Azure.ResourceManager.SecurityCenter.Models.AutomationTriggeringRuleOperator? Operator { get { throw null; } set { } }
             public string PropertyJPath { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.AutomationTriggeringRulePropertyType? PropertyType { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SecurityAutomationTriggeringRule 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.SecurityCenter.Models.SecurityAutomationTriggeringRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -7153,6 +7401,7 @@ public partial class SecurityAutomationValidationStatus : System.ClientModel.Pri
             internal SecurityAutomationValidationStatus() { }
             public bool? IsValid { get { throw null; } }
             public string Message { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SecurityAutomationValidationStatus 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.SecurityCenter.Models.SecurityAutomationValidationStatus System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -7165,6 +7414,7 @@ public SecurityCenterAllowedConnection() { }
             public System.DateTimeOffset? CalculatedOn { get { throw null; } }
             public System.Collections.Generic.IReadOnlyList ConnectableResources { get { throw null; } }
             public Azure.Core.AzureLocation? Location { get { throw null; } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SecurityCenterAllowedConnection 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.SecurityCenter.Models.SecurityCenterAllowedConnection System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -7197,6 +7447,7 @@ public abstract partial class SecurityCenterCloudOffering : System.ClientModel.P
         {
             protected SecurityCenterCloudOffering() { }
             public string Description { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SecurityCenterCloudOffering 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.SecurityCenter.Models.SecurityCenterCloudOffering System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -7269,6 +7520,7 @@ public SecurityCenterFileProtectionMode() { }
             public Azure.ResourceManager.SecurityCenter.Models.AdaptiveApplicationControlEnforcementMode? Executable { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.AdaptiveApplicationControlEnforcementMode? Msi { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.AdaptiveApplicationControlEnforcementMode? Script { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SecurityCenterFileProtectionMode 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.SecurityCenter.Models.SecurityCenterFileProtectionMode System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -7300,6 +7552,7 @@ public SecurityCenterPublisherInfo() { }
             public string ProductName { get { throw null; } set { } }
             public string PublisherName { get { throw null; } set { } }
             public string Version { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SecurityCenterPublisherInfo 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.SecurityCenter.Models.SecurityCenterPublisherInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -7309,6 +7562,7 @@ public SecurityCenterPublisherInfo() { }
         public abstract partial class SecurityCenterResourceDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
         {
             protected SecurityCenterResourceDetails() { }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SecurityCenterResourceDetails 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.SecurityCenter.Models.SecurityCenterResourceDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -7319,6 +7573,7 @@ public partial class SecurityCenterTagsResourceInfo : System.ClientModel.Primiti
         {
             public SecurityCenterTagsResourceInfo() { }
             public System.Collections.Generic.IDictionary Tags { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SecurityCenterTagsResourceInfo 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.SecurityCenter.Models.SecurityCenterTagsResourceInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -7347,6 +7602,7 @@ public SecurityCenterTagsResourceInfo() { }
         public abstract partial class SecurityConnectorEnvironment : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
         {
             protected SecurityConnectorEnvironment() { }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SecurityConnectorEnvironment 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.SecurityCenter.Models.SecurityConnectorEnvironment System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -7362,6 +7618,7 @@ public SecurityConnectorGitHubOwnerProperties() { }
             public Azure.ResourceManager.SecurityCenter.Models.DevOpsProvisioningState? ProvisioningState { get { throw null; } set { } }
             public string ProvisioningStatusMessage { get { throw null; } }
             public System.DateTimeOffset? ProvisioningStatusUpdateTimeUtc { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SecurityConnectorGitHubOwnerProperties 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.SecurityCenter.Models.SecurityConnectorGitHubOwnerProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -7380,6 +7637,7 @@ public SecurityConnectorGitHubRepositoryProperties() { }
             public string RepoId { get { throw null; } }
             public string RepoName { get { throw null; } }
             public System.Uri RepoUri { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SecurityConnectorGitHubRepositoryProperties 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.SecurityCenter.Models.SecurityConnectorGitHubRepositoryProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -7396,6 +7654,7 @@ public SecurityConnectorGitLabGroupProperties() { }
             public string ProvisioningStatusMessage { get { throw null; } }
             public System.DateTimeOffset? ProvisioningStatusUpdateTimeUtc { get { throw null; } }
             public System.Uri Uri { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SecurityConnectorGitLabGroupProperties 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.SecurityCenter.Models.SecurityConnectorGitLabGroupProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -7413,6 +7672,7 @@ public SecurityConnectorGitLabProjectProperties() { }
             public string ProvisioningStatusMessage { get { throw null; } }
             public System.DateTimeOffset? ProvisioningStatusUpdateTimeUtc { get { throw null; } }
             public System.Uri Uri { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SecurityConnectorGitLabProjectProperties 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.SecurityCenter.Models.SecurityConnectorGitLabProjectProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -7424,6 +7684,7 @@ public partial class SecurityContactPropertiesAlertNotifications : System.Client
             public SecurityContactPropertiesAlertNotifications() { }
             public Azure.ResourceManager.SecurityCenter.Models.SecurityAlertMinimalSeverity? MinimalSeverity { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.SecurityAlertNotificationState? State { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SecurityContactPropertiesAlertNotifications 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.SecurityCenter.Models.SecurityContactPropertiesAlertNotifications System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -7435,6 +7696,7 @@ public partial class SecurityContactPropertiesNotificationsByRole : System.Clien
             public SecurityContactPropertiesNotificationsByRole() { }
             public System.Collections.Generic.IList Roles { get { throw null; } }
             public Azure.ResourceManager.SecurityCenter.Models.SecurityAlertNotificationByRoleState? State { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SecurityContactPropertiesNotificationsByRole 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.SecurityCenter.Models.SecurityContactPropertiesNotificationsByRole System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -7464,6 +7726,7 @@ public partial class SecurityCve : 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.SecurityCenter.Models.SecurityCve System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -7474,6 +7737,7 @@ public partial class SecurityCvss : 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.SecurityCenter.Models.SecurityCvss System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -7556,6 +7820,7 @@ public SecurityHealthReportIssue(string issueKey) { }
             public string RemediationScript { get { throw null; } set { } }
             public string RemediationSteps { get { throw null; } set { } }
             public System.Collections.Generic.IList SecurityValues { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SecurityHealthReportIssue 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.SecurityCenter.Models.SecurityHealthReportIssue System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -7572,6 +7837,7 @@ public SecurityInformationTypeInfo() { }
             public System.Collections.Generic.IList Keywords { get { throw null; } }
             public int? Order { get { throw null; } set { } }
             public System.Guid? RecommendedLabelId { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SecurityInformationTypeInfo 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.SecurityCenter.Models.SecurityInformationTypeInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -7624,6 +7890,7 @@ public SecuritySolution() { }
             public Azure.ResourceManager.SecurityCenter.Models.SecurityFamilyProvisioningState? ProvisioningState { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.SecurityFamily? SecurityFamily { get { throw null; } set { } }
             public string Template { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SecuritySolution 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.SecurityCenter.Models.SecuritySolution System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -7641,6 +7908,7 @@ public SecuritySolutionsReferenceData(Azure.ResourceManager.SecurityCenter.Model
             public string PublisherDisplayName { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.SecurityFamily SecurityFamily { get { throw null; } set { } }
             public string Template { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SecuritySolutionsReferenceData 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.SecurityCenter.Models.SecuritySolutionsReferenceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -7668,6 +7936,7 @@ public SecuritySolutionsReferenceData(Azure.ResourceManager.SecurityCenter.Model
         public abstract partial class SecuritySubAssessmentAdditionalInfo : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
         {
             protected SecuritySubAssessmentAdditionalInfo() { }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SecuritySubAssessmentAdditionalInfo 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.SecurityCenter.Models.SecuritySubAssessmentAdditionalInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -7679,6 +7948,7 @@ public partial class SecurityTaskProperties : System.ClientModel.Primitives.IJso
             public SecurityTaskProperties() { }
             public System.Collections.Generic.IDictionary AdditionalProperties { get { throw null; } }
             public string Name { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SecurityTaskProperties 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.SecurityCenter.Models.SecurityTaskProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -7715,6 +7985,7 @@ public SecurityTopologyResource() { }
             public System.DateTimeOffset? CalculatedOn { get { throw null; } }
             public Azure.Core.AzureLocation? Location { get { throw null; } }
             public System.Collections.Generic.IReadOnlyList TopologyResources { get { throw null; } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SecurityTopologyResource 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.SecurityCenter.Models.SecurityTopologyResource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -7785,6 +8056,7 @@ public SensitivityLabel() { }
             public bool? IsEnabled { get { throw null; } set { } }
             public int? Order { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.SensitivityLabelRank? Rank { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SensitivityLabel 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.SecurityCenter.Models.SensitivityLabel System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -7805,6 +8077,7 @@ public SensitivitySettingCreateOrUpdateContent(System.Collections.Generic.IEnume
             public System.Collections.Generic.IList SensitiveInfoTypesIds { get { throw null; } }
             public System.Guid? SensitivityThresholdLabelId { get { throw null; } set { } }
             public float? SensitivityThresholdLabelOrder { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SensitivitySettingCreateOrUpdateContent 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.SecurityCenter.Models.SensitivitySettingCreateOrUpdateContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -7818,6 +8091,7 @@ internal SensitivitySettingsProperties() { }
             public System.Collections.Generic.IReadOnlyList SensitiveInfoTypesIds { get { throw null; } }
             public System.Guid? SensitivityThresholdLabelId { get { throw null; } }
             public float? SensitivityThresholdLabelOrder { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SensitivitySettingsProperties 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.SecurityCenter.Models.SensitivitySettingsProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -7889,6 +8163,7 @@ public ServerVulnerabilityProperties() { }
             public string ServerVulnerabilityType { get { throw null; } }
             public string Threat { get { throw null; } }
             public System.Collections.Generic.IReadOnlyList VendorReferences { get { throw null; } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.ServerVulnerabilityProperties 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.SecurityCenter.Models.ServerVulnerabilityProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -7900,6 +8175,7 @@ public partial class ServicePrincipalProperties : System.ClientModel.Primitives.
             public ServicePrincipalProperties() { }
             public System.Guid? ApplicationId { get { throw null; } set { } }
             public string Secret { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.ServicePrincipalProperties 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.SecurityCenter.Models.ServicePrincipalProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -7911,6 +8187,7 @@ public partial class SqlServerVulnerabilityProperties : Azure.ResourceManager.Se
             public SqlServerVulnerabilityProperties() { }
             public string Query { get { throw null; } }
             public string SqlServerVulnerabilityType { get { throw null; } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SqlServerVulnerabilityProperties 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.SecurityCenter.Models.SqlServerVulnerabilityProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -7922,6 +8199,7 @@ public partial class SqlVulnerabilityAssessmentBaseline : System.ClientModel.Pri
             public SqlVulnerabilityAssessmentBaseline() { }
             public System.Collections.Generic.IList> ExpectedResults { get { throw null; } }
             public System.DateTimeOffset? UpdatedOn { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SqlVulnerabilityAssessmentBaseline 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.SecurityCenter.Models.SqlVulnerabilityAssessmentBaseline System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -7933,6 +8211,7 @@ public partial class SqlVulnerabilityAssessmentBaselineRuleCreateOrUpdateContent
             public SqlVulnerabilityAssessmentBaselineRuleCreateOrUpdateContent() { }
             public bool? LatestScan { get { throw null; } set { } }
             public System.Collections.Generic.IList> Results { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SqlVulnerabilityAssessmentBaselineRuleCreateOrUpdateContent 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.SecurityCenter.Models.SqlVulnerabilityAssessmentBaselineRuleCreateOrUpdateContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -7946,6 +8225,7 @@ public SqlVulnerabilityAssessmentRemediation() { }
             public bool? IsAutomated { get { throw null; } set { } }
             public string PortalLink { get { throw null; } set { } }
             public System.Collections.Generic.IList Scripts { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SqlVulnerabilityAssessmentRemediation 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.SecurityCenter.Models.SqlVulnerabilityAssessmentRemediation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -7970,6 +8250,7 @@ public SqlVulnerabilityAssessmentScanProperties() { }
             public int? TotalPassedRulesCount { get { throw null; } set { } }
             public int? TotalRulesCount { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.SqlVulnerabilityAssessmentScanTriggerType? TriggerType { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SqlVulnerabilityAssessmentScanProperties 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.SecurityCenter.Models.SqlVulnerabilityAssessmentScanProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -7980,6 +8261,7 @@ public partial class SqlVulnerabilityAssessmentScanResult : Azure.ResourceManage
         {
             public SqlVulnerabilityAssessmentScanResult() { }
             public Azure.ResourceManager.SecurityCenter.Models.SqlVulnerabilityAssessmentScanResultProperties Properties { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SqlVulnerabilityAssessmentScanResult 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.SecurityCenter.Models.SqlVulnerabilityAssessmentScanResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -7996,6 +8278,7 @@ public SqlVulnerabilityAssessmentScanResultProperties() { }
             public string RuleId { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.VulnerabilityAssessmentRule RuleMetadata { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.SqlVulnerabilityAssessmentScanResultRuleStatus? Status { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SqlVulnerabilityAssessmentScanResultProperties 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.SecurityCenter.Models.SqlVulnerabilityAssessmentScanResultProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -8066,6 +8349,7 @@ public SubAssessmentStatus() { }
             public Azure.ResourceManager.SecurityCenter.Models.SubAssessmentStatusCode? Code { get { throw null; } }
             public string Description { get { throw null; } }
             public Azure.ResourceManager.SecurityCenter.Models.SecurityAssessmentSeverity? Severity { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SubAssessmentStatus 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.SecurityCenter.Models.SubAssessmentStatus System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -8096,6 +8380,7 @@ public partial class SuppressionAlertsScopeElement : System.ClientModel.Primitiv
             public SuppressionAlertsScopeElement() { }
             public System.Collections.Generic.IDictionary AdditionalProperties { get { throw null; } }
             public string Field { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SuppressionAlertsScopeElement 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.SecurityCenter.Models.SuppressionAlertsScopeElement System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -8107,6 +8392,7 @@ public partial class TargetBranchConfiguration : System.ClientModel.Primitives.I
             public TargetBranchConfiguration() { }
             public Azure.ResourceManager.SecurityCenter.Models.AnnotateDefaultBranchState? AnnotateDefaultBranch { get { throw null; } set { } }
             public System.Collections.Generic.IList BranchNames { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.TargetBranchConfiguration 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.SecurityCenter.Models.TargetBranchConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -8118,6 +8404,7 @@ public partial class ThresholdCustomAlertRule : Azure.ResourceManager.SecurityCe
             public ThresholdCustomAlertRule(bool isEnabled, int minThreshold, int maxThreshold) : base (default(bool)) { }
             public int MaxThreshold { get { throw null; } set { } }
             public int MinThreshold { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.ThresholdCustomAlertRule 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.SecurityCenter.Models.ThresholdCustomAlertRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -8128,6 +8415,7 @@ public partial class TimeWindowCustomAlertRule : Azure.ResourceManager.SecurityC
         {
             public TimeWindowCustomAlertRule(bool isEnabled, int minThreshold, int maxThreshold, System.TimeSpan timeWindowSize) : base (default(bool), default(int), default(int)) { }
             public System.TimeSpan TimeWindowSize { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.TimeWindowCustomAlertRule 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.SecurityCenter.Models.TimeWindowCustomAlertRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -8145,6 +8433,7 @@ internal TopologySingleResource() { }
             public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } }
             public string Severity { get { throw null; } }
             public int? TopologyScore { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.TopologySingleResource 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.SecurityCenter.Models.TopologySingleResource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -8155,6 +8444,7 @@ public partial class TopologySingleResourceChild : System.ClientModel.Primitives
         {
             internal TopologySingleResourceChild() { }
             public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.TopologySingleResourceChild 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.SecurityCenter.Models.TopologySingleResourceChild System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -8165,6 +8455,7 @@ public partial class TopologySingleResourceParent : System.ClientModel.Primitive
         {
             internal TopologySingleResourceParent() { }
             public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.TopologySingleResourceParent 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.SecurityCenter.Models.TopologySingleResourceParent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -8174,6 +8465,7 @@ internal TopologySingleResourceParent() { }
         public partial class TwinUpdatesNotInAllowedRange : Azure.ResourceManager.SecurityCenter.Models.TimeWindowCustomAlertRule, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
         {
             public TwinUpdatesNotInAllowedRange(bool isEnabled, int minThreshold, int maxThreshold, System.TimeSpan timeWindowSize) : base (default(bool), default(int), default(int), default(System.TimeSpan)) { }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.TwinUpdatesNotInAllowedRange 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.SecurityCenter.Models.TwinUpdatesNotInAllowedRange System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -8183,6 +8475,7 @@ public partial class TwinUpdatesNotInAllowedRange : Azure.ResourceManager.Securi
         public partial class UnauthorizedOperationsNotInAllowedRange : Azure.ResourceManager.SecurityCenter.Models.TimeWindowCustomAlertRule, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
         {
             public UnauthorizedOperationsNotInAllowedRange(bool isEnabled, int minThreshold, int maxThreshold, System.TimeSpan timeWindowSize) : base (default(bool), default(int), default(int), default(System.TimeSpan)) { }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.UnauthorizedOperationsNotInAllowedRange 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.SecurityCenter.Models.UnauthorizedOperationsNotInAllowedRange System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -8213,6 +8506,7 @@ internal UserDefinedInformationType() { }
             public string Description { get { throw null; } }
             public System.Guid? Id { get { throw null; } }
             public string Name { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.UserDefinedInformationType 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.SecurityCenter.Models.UserDefinedInformationType System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -8224,6 +8518,7 @@ public partial class UserDefinedResourcesProperties : System.ClientModel.Primiti
             public UserDefinedResourcesProperties(string query, System.Collections.Generic.IEnumerable querySubscriptions) { }
             public string Query { get { throw null; } set { } }
             public System.Collections.Generic.IList QuerySubscriptions { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.UserDefinedResourcesProperties 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.SecurityCenter.Models.UserDefinedResourcesProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -8235,6 +8530,7 @@ public partial class UserRecommendation : System.ClientModel.Primitives.IJsonMod
             public UserRecommendation() { }
             public Azure.ResourceManager.SecurityCenter.Models.RecommendationAction? RecommendationAction { get { throw null; } set { } }
             public string Username { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.UserRecommendation 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.SecurityCenter.Models.UserRecommendation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -8246,6 +8542,7 @@ public partial class VendorReference : System.ClientModel.Primitives.IJsonModel<
             internal VendorReference() { }
             public string Link { get { throw null; } }
             public string Title { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.VendorReference 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.SecurityCenter.Models.VendorReference System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -8259,6 +8556,7 @@ public VmRecommendation() { }
             public Azure.ResourceManager.SecurityCenter.Models.SecurityCenterVmEnforcementSupportState? EnforcementSupport { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.RecommendationAction? RecommendationAction { get { throw null; } set { } }
             public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.VmRecommendation 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.SecurityCenter.Models.VmRecommendation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -8295,6 +8593,7 @@ public VulnerabilityAssessmentRule() { }
             public Azure.ResourceManager.SecurityCenter.Models.VulnerabilityAssessmentRuleType? RuleType { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.RuleSeverity? Severity { get { throw null; } set { } }
             public string Title { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.VulnerabilityAssessmentRule 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.SecurityCenter.Models.VulnerabilityAssessmentRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -8307,6 +8606,7 @@ public VulnerabilityAssessmentRuleQueryCheck() { }
             public System.Collections.Generic.IList ColumnNames { get { throw null; } }
             public System.Collections.Generic.IList> ExpectedResult { get { throw null; } }
             public string Query { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.VulnerabilityAssessmentRuleQueryCheck 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.SecurityCenter.Models.VulnerabilityAssessmentRuleQueryCheck System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/assets.json b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/assets.json
    index 092977481c2f..ebb7d117f9da 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/assets.json
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/assets.json
    @@ -2,5 +2,5 @@
       "AssetsRepo": "Azure/azure-sdk-assets",
       "AssetsRepoPrefixPath": "net",
       "TagPrefix": "net/securitycenter/Azure.ResourceManager.SecurityCenter",
    -  "Tag": "net/securitycenter/Azure.ResourceManager.SecurityCenter_965b920921"
    +  "Tag": "net/securitycenter/Azure.ResourceManager.SecurityCenter_4d5901f3b9"
     }
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_SecurityConnectorCollection.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_SecurityConnectorCollection.cs
    index d1bf55e2cea3..7f39b6f51b95 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_SecurityConnectorCollection.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_SecurityConnectorCollection.cs
    @@ -196,7 +196,7 @@ public async Task CreateOrUpdate_CreateOrUpdateASecurityConnector()
     },
                     EnvironmentData = new AwsEnvironment()
                     {
    -                    ScanInterval = 4,
    +                    ScanInterval = 4L,
                     },
                     ETag = new ETag("etag value (must be supplied for update)"),
                     Tags =
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/AdaptiveApplicationControlGroupData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/AdaptiveApplicationControlGroupData.Serialization.cs
    index fc05f27b6e5d..9f13ffc8393a 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/AdaptiveApplicationControlGroupData.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/AdaptiveApplicationControlGroupData.Serialization.cs
    @@ -20,6 +20,15 @@ public partial class AdaptiveApplicationControlGroupData : IUtf8JsonSerializable
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -27,32 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer
                     throw new FormatException($"The model {nameof(AdaptiveApplicationControlGroupData)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (options.Format != "W" && Optional.IsDefined(Location))
                 {
                     writer.WritePropertyName("location"u8);
                     writer.WriteStringValue(Location.Value);
                 }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("id"u8);
    -                writer.WriteStringValue(Id);
    -            }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("name"u8);
    -                writer.WriteStringValue(Name);
    -            }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("type"u8);
    -                writer.WriteStringValue(ResourceType);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(SystemData))
    -            {
    -                writer.WritePropertyName("systemData"u8);
    -                JsonSerializer.Serialize(writer, SystemData);
    -            }
                 writer.WritePropertyName("properties"u8);
                 writer.WriteStartObject();
                 if (Optional.IsDefined(EnforcementMode))
    @@ -111,22 +100,6 @@ void IJsonModel.Write(Utf8JsonWriter writer
                     writer.WriteEndArray();
                 }
                 writer.WriteEndObject();
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             AdaptiveApplicationControlGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/AdaptiveNetworkHardeningData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/AdaptiveNetworkHardeningData.Serialization.cs
    index e03827ac17db..b289083b940f 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/AdaptiveNetworkHardeningData.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/AdaptiveNetworkHardeningData.Serialization.cs
    @@ -20,6 +20,15 @@ public partial class AdaptiveNetworkHardeningData : IUtf8JsonSerializable, IJson
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model
                     throw new FormatException($"The model {nameof(AdaptiveNetworkHardeningData)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("id"u8);
    -                writer.WriteStringValue(Id);
    -            }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("name"u8);
    -                writer.WriteStringValue(Name);
    -            }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("type"u8);
    -                writer.WriteStringValue(ResourceType);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(SystemData))
    -            {
    -                writer.WritePropertyName("systemData"u8);
    -                JsonSerializer.Serialize(writer, SystemData);
    -            }
    +            base.JsonModelWriteCore(writer, options);
                 writer.WritePropertyName("properties"u8);
                 writer.WriteStartObject();
                 if (Optional.IsCollectionDefined(Rules))
    @@ -76,22 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model
                     writer.WriteEndArray();
                 }
                 writer.WriteEndObject();
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             AdaptiveNetworkHardeningData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/AdvancedThreatProtectionSettingData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/AdvancedThreatProtectionSettingData.Serialization.cs
    index 062f7ae5d37c..15c8c00ad377 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/AdvancedThreatProtectionSettingData.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/AdvancedThreatProtectionSettingData.Serialization.cs
    @@ -19,6 +19,15 @@ public partial class AdvancedThreatProtectionSettingData : IUtf8JsonSerializable
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -26,27 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer
                     throw new FormatException($"The model {nameof(AdvancedThreatProtectionSettingData)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("id"u8);
    -                writer.WriteStringValue(Id);
    -            }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("name"u8);
    -                writer.WriteStringValue(Name);
    -            }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("type"u8);
    -                writer.WriteStringValue(ResourceType);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(SystemData))
    -            {
    -                writer.WritePropertyName("systemData"u8);
    -                JsonSerializer.Serialize(writer, SystemData);
    -            }
    +            base.JsonModelWriteCore(writer, options);
                 writer.WritePropertyName("properties"u8);
                 writer.WriteStartObject();
                 if (Optional.IsDefined(IsEnabled))
    @@ -55,22 +44,6 @@ void IJsonModel.Write(Utf8JsonWriter writer
                     writer.WriteBooleanValue(IsEnabled.Value);
                 }
                 writer.WriteEndObject();
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             AdvancedThreatProtectionSettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/AutoProvisioningSettingData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/AutoProvisioningSettingData.Serialization.cs
    index 4011f30a5531..5f0b82e9033d 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/AutoProvisioningSettingData.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/AutoProvisioningSettingData.Serialization.cs
    @@ -20,6 +20,15 @@ public partial class AutoProvisioningSettingData : IUtf8JsonSerializable, IJsonM
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR
                     throw new FormatException($"The model {nameof(AutoProvisioningSettingData)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("id"u8);
    -                writer.WriteStringValue(Id);
    -            }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("name"u8);
    -                writer.WriteStringValue(Name);
    -            }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("type"u8);
    -                writer.WriteStringValue(ResourceType);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(SystemData))
    -            {
    -                writer.WritePropertyName("systemData"u8);
    -                JsonSerializer.Serialize(writer, SystemData);
    -            }
    +            base.JsonModelWriteCore(writer, options);
                 writer.WritePropertyName("properties"u8);
                 writer.WriteStartObject();
                 if (Optional.IsDefined(AutoProvision))
    @@ -56,22 +45,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR
                     writer.WriteStringValue(AutoProvision.Value.ToString());
                 }
                 writer.WriteEndObject();
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             AutoProvisioningSettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/ComplianceResultData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/ComplianceResultData.Serialization.cs
    index 8d14fbaa9501..2896044ebc55 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/ComplianceResultData.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/ComplianceResultData.Serialization.cs
    @@ -20,6 +20,15 @@ public partial class ComplianceResultData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr
                     throw new FormatException($"The model {nameof(ComplianceResultData)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("id"u8);
    -                writer.WriteStringValue(Id);
    -            }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("name"u8);
    -                writer.WriteStringValue(Name);
    -            }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("type"u8);
    -                writer.WriteStringValue(ResourceType);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(SystemData))
    -            {
    -                writer.WritePropertyName("systemData"u8);
    -                JsonSerializer.Serialize(writer, SystemData);
    -            }
    +            base.JsonModelWriteCore(writer, options);
                 writer.WritePropertyName("properties"u8);
                 writer.WriteStartObject();
                 if (options.Format != "W" && Optional.IsDefined(ResourceStatus))
    @@ -56,22 +45,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr
                     writer.WriteStringValue(ResourceStatus.Value.ToString());
                 }
                 writer.WriteEndObject();
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             ComplianceResultData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/CustomAssessmentAutomationData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/CustomAssessmentAutomationData.Serialization.cs
    index e0a976c52137..13e9a32203f0 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/CustomAssessmentAutomationData.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/CustomAssessmentAutomationData.Serialization.cs
    @@ -20,6 +20,15 @@ public partial class CustomAssessmentAutomationData : IUtf8JsonSerializable, IJs
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod
                     throw new FormatException($"The model {nameof(CustomAssessmentAutomationData)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("id"u8);
    -                writer.WriteStringValue(Id);
    -            }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("name"u8);
    -                writer.WriteStringValue(Name);
    -            }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("type"u8);
    -                writer.WriteStringValue(ResourceType);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(SystemData))
    -            {
    -                writer.WritePropertyName("systemData"u8);
    -                JsonSerializer.Serialize(writer, SystemData);
    -            }
    +            base.JsonModelWriteCore(writer, options);
                 writer.WritePropertyName("properties"u8);
                 writer.WriteStartObject();
                 if (Optional.IsDefined(CompressedQuery))
    @@ -86,22 +75,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod
                     writer.WriteStringValue(AssessmentKey);
                 }
                 writer.WriteEndObject();
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             CustomAssessmentAutomationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/CustomEntityStoreAssignmentData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/CustomEntityStoreAssignmentData.Serialization.cs
    index 9406d7bb600c..4ab5e3b14e95 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/CustomEntityStoreAssignmentData.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/CustomEntityStoreAssignmentData.Serialization.cs
    @@ -19,6 +19,15 @@ public partial class CustomEntityStoreAssignmentData : IUtf8JsonSerializable, IJ
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -26,27 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo
                     throw new FormatException($"The model {nameof(CustomEntityStoreAssignmentData)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("id"u8);
    -                writer.WriteStringValue(Id);
    -            }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("name"u8);
    -                writer.WriteStringValue(Name);
    -            }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("type"u8);
    -                writer.WriteStringValue(ResourceType);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(SystemData))
    -            {
    -                writer.WritePropertyName("systemData"u8);
    -                JsonSerializer.Serialize(writer, SystemData);
    -            }
    +            base.JsonModelWriteCore(writer, options);
                 writer.WritePropertyName("properties"u8);
                 writer.WriteStartObject();
                 if (Optional.IsDefined(Principal))
    @@ -60,22 +49,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo
                     writer.WriteStringValue(EntityStoreDatabaseLink);
                 }
                 writer.WriteEndObject();
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             CustomEntityStoreAssignmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DefenderForStorageSettingData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DefenderForStorageSettingData.Serialization.cs
    index f453249a6e50..e03bf7adf967 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DefenderForStorageSettingData.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DefenderForStorageSettingData.Serialization.cs
    @@ -20,6 +20,15 @@ public partial class DefenderForStorageSettingData : IUtf8JsonSerializable, IJso
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode
                     throw new FormatException($"The model {nameof(DefenderForStorageSettingData)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("id"u8);
    -                writer.WriteStringValue(Id);
    -            }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("name"u8);
    -                writer.WriteStringValue(Name);
    -            }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("type"u8);
    -                writer.WriteStringValue(ResourceType);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(SystemData))
    -            {
    -                writer.WritePropertyName("systemData"u8);
    -                JsonSerializer.Serialize(writer, SystemData);
    -            }
    +            base.JsonModelWriteCore(writer, options);
                 writer.WritePropertyName("properties"u8);
                 writer.WriteStartObject();
                 if (Optional.IsDefined(IsEnabled))
    @@ -100,22 +89,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode
                 writer.WriteEndObject();
                 writer.WriteEndObject();
                 writer.WriteEndObject();
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             DefenderForStorageSettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DevOpsConfigurationData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DevOpsConfigurationData.Serialization.cs
    index d0cc359a030b..de25bee3dc1e 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DevOpsConfigurationData.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DevOpsConfigurationData.Serialization.cs
    @@ -20,6 +20,15 @@ public partial class DevOpsConfigurationData : IUtf8JsonSerializable, IJsonModel
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -27,48 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade
                     throw new FormatException($"The model {nameof(DevOpsConfigurationData)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(Properties))
                 {
                     writer.WritePropertyName("properties"u8);
                     writer.WriteObjectValue(Properties, options);
                 }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("id"u8);
    -                writer.WriteStringValue(Id);
    -            }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("name"u8);
    -                writer.WriteStringValue(Name);
    -            }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("type"u8);
    -                writer.WriteStringValue(ResourceType);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(SystemData))
    -            {
    -                writer.WritePropertyName("systemData"u8);
    -                JsonSerializer.Serialize(writer, SystemData);
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             DevOpsConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DevOpsOrgData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DevOpsOrgData.Serialization.cs
    index 41c88964f8b1..e277935e2386 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DevOpsOrgData.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DevOpsOrgData.Serialization.cs
    @@ -20,6 +20,15 @@ public partial class DevOpsOrgData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -27,48 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt
                     throw new FormatException($"The model {nameof(DevOpsOrgData)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(Properties))
                 {
                     writer.WritePropertyName("properties"u8);
                     writer.WriteObjectValue(Properties, options);
                 }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("id"u8);
    -                writer.WriteStringValue(Id);
    -            }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("name"u8);
    -                writer.WriteStringValue(Name);
    -            }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("type"u8);
    -                writer.WriteStringValue(ResourceType);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(SystemData))
    -            {
    -                writer.WritePropertyName("systemData"u8);
    -                JsonSerializer.Serialize(writer, SystemData);
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             DevOpsOrgData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DevOpsProjectData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DevOpsProjectData.Serialization.cs
    index c7648a83276e..5f15cac5e223 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DevOpsProjectData.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DevOpsProjectData.Serialization.cs
    @@ -20,6 +20,15 @@ public partial class DevOpsProjectData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -27,48 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite
                     throw new FormatException($"The model {nameof(DevOpsProjectData)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(Properties))
                 {
                     writer.WritePropertyName("properties"u8);
                     writer.WriteObjectValue(Properties, options);
                 }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("id"u8);
    -                writer.WriteStringValue(Id);
    -            }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("name"u8);
    -                writer.WriteStringValue(Name);
    -            }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("type"u8);
    -                writer.WriteStringValue(ResourceType);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(SystemData))
    -            {
    -                writer.WritePropertyName("systemData"u8);
    -                JsonSerializer.Serialize(writer, SystemData);
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             DevOpsProjectData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DevOpsRepositoryData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DevOpsRepositoryData.Serialization.cs
    index 56efe045a8b3..0351f6646caf 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DevOpsRepositoryData.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DevOpsRepositoryData.Serialization.cs
    @@ -20,6 +20,15 @@ public partial class DevOpsRepositoryData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -27,48 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr
                     throw new FormatException($"The model {nameof(DevOpsRepositoryData)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(Properties))
                 {
                     writer.WritePropertyName("properties"u8);
                     writer.WriteObjectValue(Properties, options);
                 }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("id"u8);
    -                writer.WriteStringValue(Id);
    -            }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("name"u8);
    -                writer.WriteStringValue(Name);
    -            }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("type"u8);
    -                writer.WriteStringValue(ResourceType);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(SystemData))
    -            {
    -                writer.WritePropertyName("systemData"u8);
    -                JsonSerializer.Serialize(writer, SystemData);
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             DevOpsRepositoryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DeviceSecurityGroupData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DeviceSecurityGroupData.Serialization.cs
    index 71a68c069786..4680ef0804cf 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DeviceSecurityGroupData.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DeviceSecurityGroupData.Serialization.cs
    @@ -20,6 +20,15 @@ public partial class DeviceSecurityGroupData : IUtf8JsonSerializable, IJsonModel
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade
                     throw new FormatException($"The model {nameof(DeviceSecurityGroupData)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("id"u8);
    -                writer.WriteStringValue(Id);
    -            }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("name"u8);
    -                writer.WriteStringValue(Name);
    -            }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("type"u8);
    -                writer.WriteStringValue(ResourceType);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(SystemData))
    -            {
    -                writer.WritePropertyName("systemData"u8);
    -                JsonSerializer.Serialize(writer, SystemData);
    -            }
    +            base.JsonModelWriteCore(writer, options);
                 writer.WritePropertyName("properties"u8);
                 writer.WriteStartObject();
                 if (Optional.IsCollectionDefined(ThresholdRules))
    @@ -91,22 +80,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade
                     writer.WriteEndArray();
                 }
                 writer.WriteEndObject();
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             DeviceSecurityGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/GovernanceAssignmentData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/GovernanceAssignmentData.Serialization.cs
    index bab1e9a5e222..93f820fceec7 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/GovernanceAssignmentData.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/GovernanceAssignmentData.Serialization.cs
    @@ -20,6 +20,15 @@ public partial class GovernanceAssignmentData : IUtf8JsonSerializable, IJsonMode
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead
                     throw new FormatException($"The model {nameof(GovernanceAssignmentData)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("id"u8);
    -                writer.WriteStringValue(Id);
    -            }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("name"u8);
    -                writer.WriteStringValue(Name);
    -            }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("type"u8);
    -                writer.WriteStringValue(ResourceType);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(SystemData))
    -            {
    -                writer.WritePropertyName("systemData"u8);
    -                JsonSerializer.Serialize(writer, SystemData);
    -            }
    +            base.JsonModelWriteCore(writer, options);
                 writer.WritePropertyName("properties"u8);
                 writer.WriteStartObject();
                 if (Optional.IsDefined(Owner))
    @@ -81,22 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead
                     writer.WriteObjectValue(AdditionalData, options);
                 }
                 writer.WriteEndObject();
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             GovernanceAssignmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/GovernanceRuleData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/GovernanceRuleData.Serialization.cs
    index 123fff2f900c..08296f395f19 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/GovernanceRuleData.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/GovernanceRuleData.Serialization.cs
    @@ -20,6 +20,15 @@ public partial class GovernanceRuleData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit
                     throw new FormatException($"The model {nameof(GovernanceRuleData)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("id"u8);
    -                writer.WriteStringValue(Id);
    -            }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("name"u8);
    -                writer.WriteStringValue(Name);
    -            }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("type"u8);
    -                writer.WriteStringValue(ResourceType);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(SystemData))
    -            {
    -                writer.WritePropertyName("systemData"u8);
    -                JsonSerializer.Serialize(writer, SystemData);
    -            }
    +            base.JsonModelWriteCore(writer, options);
                 writer.WritePropertyName("properties"u8);
                 writer.WriteStartObject();
                 if (options.Format != "W" && Optional.IsDefined(TenantId))
    @@ -148,22 +137,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit
                     writer.WriteObjectValue(Metadata, options);
                 }
                 writer.WriteEndObject();
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             GovernanceRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/IotSecurityAggregatedAlertData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/IotSecurityAggregatedAlertData.Serialization.cs
    index 1097595a7673..7fdd59b11861 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/IotSecurityAggregatedAlertData.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/IotSecurityAggregatedAlertData.Serialization.cs
    @@ -20,6 +20,15 @@ public partial class IotSecurityAggregatedAlertData : IUtf8JsonSerializable, IJs
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod
                     throw new FormatException($"The model {nameof(IotSecurityAggregatedAlertData)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsCollectionDefined(Tags))
                 {
                     writer.WritePropertyName("tags"u8);
    @@ -39,26 +48,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod
                     }
                     writer.WriteEndObject();
                 }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("id"u8);
    -                writer.WriteStringValue(Id);
    -            }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("name"u8);
    -                writer.WriteStringValue(Name);
    -            }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("type"u8);
    -                writer.WriteStringValue(ResourceType);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(SystemData))
    -            {
    -                writer.WritePropertyName("systemData"u8);
    -                JsonSerializer.Serialize(writer, SystemData);
    -            }
                 writer.WritePropertyName("properties"u8);
                 writer.WriteStartObject();
                 if (options.Format != "W" && Optional.IsDefined(AlertType))
    @@ -132,22 +121,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod
                     writer.WriteEndArray();
                 }
                 writer.WriteEndObject();
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             IotSecurityAggregatedAlertData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/IotSecurityAggregatedRecommendationData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/IotSecurityAggregatedRecommendationData.Serialization.cs
    index ba5af8d70aeb..a95659948a53 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/IotSecurityAggregatedRecommendationData.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/IotSecurityAggregatedRecommendationData.Serialization.cs
    @@ -20,6 +20,15 @@ public partial class IotSecurityAggregatedRecommendationData : IUtf8JsonSerializ
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter wr
                     throw new FormatException($"The model {nameof(IotSecurityAggregatedRecommendationData)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsCollectionDefined(Tags))
                 {
                     writer.WritePropertyName("tags"u8);
    @@ -39,26 +48,6 @@ void IJsonModel.Write(Utf8JsonWriter wr
                     }
                     writer.WriteEndObject();
                 }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("id"u8);
    -                writer.WriteStringValue(Id);
    -            }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("name"u8);
    -                writer.WriteStringValue(Name);
    -            }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("type"u8);
    -                writer.WriteStringValue(ResourceType);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(SystemData))
    -            {
    -                writer.WritePropertyName("systemData"u8);
    -                JsonSerializer.Serialize(writer, SystemData);
    -            }
                 writer.WritePropertyName("properties"u8);
                 writer.WriteStartObject();
                 if (Optional.IsDefined(RecommendationName))
    @@ -112,22 +101,6 @@ void IJsonModel.Write(Utf8JsonWriter wr
                     writer.WriteStringValue(LogAnalyticsQuery);
                 }
                 writer.WriteEndObject();
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             IotSecurityAggregatedRecommendationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/IotSecuritySolutionAnalyticsModelData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/IotSecuritySolutionAnalyticsModelData.Serialization.cs
    index 7d13326409e9..d4d1192b9026 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/IotSecuritySolutionAnalyticsModelData.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/IotSecuritySolutionAnalyticsModelData.Serialization.cs
    @@ -20,6 +20,15 @@ public partial class IotSecuritySolutionAnalyticsModelData : IUtf8JsonSerializab
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writ
                     throw new FormatException($"The model {nameof(IotSecuritySolutionAnalyticsModelData)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("id"u8);
    -                writer.WriteStringValue(Id);
    -            }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("name"u8);
    -                writer.WriteStringValue(Name);
    -            }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("type"u8);
    -                writer.WriteStringValue(ResourceType);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(SystemData))
    -            {
    -                writer.WritePropertyName("systemData"u8);
    -                JsonSerializer.Serialize(writer, SystemData);
    -            }
    +            base.JsonModelWriteCore(writer, options);
                 writer.WritePropertyName("properties"u8);
                 writer.WriteStartObject();
                 if (options.Format != "W" && Optional.IsDefined(Metrics))
    @@ -101,22 +90,6 @@ void IJsonModel.Write(Utf8JsonWriter writ
                     writer.WriteEndArray();
                 }
                 writer.WriteEndObject();
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             IotSecuritySolutionAnalyticsModelData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/IotSecuritySolutionData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/IotSecuritySolutionData.Serialization.cs
    index 9f1efd53cd73..119aac9d8824 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/IotSecuritySolutionData.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/IotSecuritySolutionData.Serialization.cs
    @@ -20,6 +20,15 @@ public partial class IotSecuritySolutionData : IUtf8JsonSerializable, IJsonModel
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -27,40 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade
                     throw new FormatException($"The model {nameof(IotSecuritySolutionData)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            if (Optional.IsCollectionDefined(Tags))
    -            {
    -                writer.WritePropertyName("tags"u8);
    -                writer.WriteStartObject();
    -                foreach (var item in Tags)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -                    writer.WriteStringValue(item.Value);
    -                }
    -                writer.WriteEndObject();
    -            }
    -            writer.WritePropertyName("location"u8);
    -            writer.WriteStringValue(Location);
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("id"u8);
    -                writer.WriteStringValue(Id);
    -            }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("name"u8);
    -                writer.WriteStringValue(Name);
    -            }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("type"u8);
    -                writer.WriteStringValue(ResourceType);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(SystemData))
    -            {
    -                writer.WritePropertyName("systemData"u8);
    -                JsonSerializer.Serialize(writer, SystemData);
    -            }
    +            base.JsonModelWriteCore(writer, options);
                 writer.WritePropertyName("properties"u8);
                 writer.WriteStartObject();
                 if (Optional.IsDefined(Workspace))
    @@ -149,22 +125,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade
                     writer.WriteEndArray();
                 }
                 writer.WriteEndObject();
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             IotSecuritySolutionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/JitNetworkAccessPolicyData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/JitNetworkAccessPolicyData.Serialization.cs
    index d08dac17476e..84441ae8bfa3 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/JitNetworkAccessPolicyData.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/JitNetworkAccessPolicyData.Serialization.cs
    @@ -20,6 +20,15 @@ public partial class JitNetworkAccessPolicyData : IUtf8JsonSerializable, IJsonMo
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe
                     throw new FormatException($"The model {nameof(JitNetworkAccessPolicyData)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(Kind))
                 {
                     writer.WritePropertyName("kind"u8);
    @@ -38,26 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe
                     writer.WritePropertyName("location"u8);
                     writer.WriteStringValue(Location.Value);
                 }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("id"u8);
    -                writer.WriteStringValue(Id);
    -            }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("name"u8);
    -                writer.WriteStringValue(Name);
    -            }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("type"u8);
    -                writer.WriteStringValue(ResourceType);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(SystemData))
    -            {
    -                writer.WritePropertyName("systemData"u8);
    -                JsonSerializer.Serialize(writer, SystemData);
    -            }
                 writer.WritePropertyName("properties"u8);
                 writer.WriteStartObject();
                 writer.WritePropertyName("virtualMachines"u8);
    @@ -83,22 +72,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe
                     writer.WriteStringValue(ProvisioningState);
                 }
                 writer.WriteEndObject();
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             JitNetworkAccessPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AadExternalSecuritySolution.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AadExternalSecuritySolution.Serialization.cs
    index c951f236d1ed..bb6b4c80313c 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AadExternalSecuritySolution.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AadExternalSecuritySolution.Serialization.cs
    @@ -19,6 +19,15 @@ public partial class AadExternalSecuritySolution : IUtf8JsonSerializable, IJsonM
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -26,62 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR
                     throw new FormatException($"The model {nameof(AadExternalSecuritySolution)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(Properties))
                 {
                     writer.WritePropertyName("properties"u8);
                     writer.WriteObjectValue(Properties, options);
                 }
    -            if (Kind != null)
    -            {
    -                writer.WritePropertyName("kind"u8);
    -                writer.WriteStringValue(Kind.Value.ToString());
    -            }
    -            else
    -            {
    -                writer.WriteNull("kind");
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(Location))
    -            {
    -                writer.WritePropertyName("location"u8);
    -                writer.WriteStringValue(Location.Value);
    -            }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("id"u8);
    -                writer.WriteStringValue(Id);
    -            }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("name"u8);
    -                writer.WriteStringValue(Name);
    -            }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("type"u8);
    -                writer.WriteStringValue(ResourceType);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(SystemData))
    -            {
    -                writer.WritePropertyName("systemData"u8);
    -                JsonSerializer.Serialize(writer, SystemData);
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             AadExternalSecuritySolution IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AadSolutionProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AadSolutionProperties.Serialization.cs
    index e387705db071..9c272ebb1373 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AadSolutionProperties.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AadSolutionProperties.Serialization.cs
    @@ -19,6 +19,15 @@ public partial class AadSolutionProperties : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW
                     throw new FormatException($"The model {nameof(AadSolutionProperties)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(ConnectivityState))
                 {
                     writer.WritePropertyName("connectivityState"u8);
                     writer.WriteStringValue(ConnectivityState.Value.ToString());
                 }
    -            if (Optional.IsDefined(DeviceVendor))
    -            {
    -                writer.WritePropertyName("deviceVendor"u8);
    -                writer.WriteStringValue(DeviceVendor);
    -            }
    -            if (Optional.IsDefined(DeviceType))
    -            {
    -                writer.WritePropertyName("deviceType"u8);
    -                writer.WriteStringValue(DeviceType);
    -            }
    -            if (Optional.IsDefined(Workspace))
    -            {
    -                writer.WritePropertyName("workspace"u8);
    -                JsonSerializer.Serialize(writer, Workspace);
    -            }
                 foreach (var item in AdditionalProperties)
                 {
                     writer.WritePropertyName(item.Key);
    @@ -59,7 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW
                     }
     #endif
                 }
    -            writer.WriteEndObject();
             }
     
             AadSolutionProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ActionableRemediation.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ActionableRemediation.Serialization.cs
    index d69bb8be1bae..dffb4b9f7c35 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ActionableRemediation.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ActionableRemediation.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class ActionableRemediation : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW
                     throw new FormatException($"The model {nameof(ActionableRemediation)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(State))
                 {
                     writer.WritePropertyName("state"u8);
    @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             ActionableRemediation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ActiveConnectionsNotInAllowedRange.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ActiveConnectionsNotInAllowedRange.Serialization.cs
    index 012fbe749f21..06dafd9daac7 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ActiveConnectionsNotInAllowedRange.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ActiveConnectionsNotInAllowedRange.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class ActiveConnectionsNotInAllowedRange : IUtf8JsonSerializable,
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,43 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer,
                     throw new FormatException($"The model {nameof(ActiveConnectionsNotInAllowedRange)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            writer.WritePropertyName("timeWindowSize"u8);
    -            writer.WriteStringValue(TimeWindowSize, "P");
    -            writer.WritePropertyName("minThreshold"u8);
    -            writer.WriteNumberValue(MinThreshold);
    -            writer.WritePropertyName("maxThreshold"u8);
    -            writer.WriteNumberValue(MaxThreshold);
    -            if (options.Format != "W" && Optional.IsDefined(DisplayName))
    -            {
    -                writer.WritePropertyName("displayName"u8);
    -                writer.WriteStringValue(DisplayName);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(Description))
    -            {
    -                writer.WritePropertyName("description"u8);
    -                writer.WriteStringValue(Description);
    -            }
    -            writer.WritePropertyName("isEnabled"u8);
    -            writer.WriteBooleanValue(IsEnabled);
    -            writer.WritePropertyName("ruleType"u8);
    -            writer.WriteStringValue(RuleType);
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             ActiveConnectionsNotInAllowedRange IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AdaptiveApplicationControlGroups.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AdaptiveApplicationControlGroups.Serialization.cs
    index 52f72297e89f..ebbfffbd4b15 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AdaptiveApplicationControlGroups.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AdaptiveApplicationControlGroups.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class AdaptiveApplicationControlGroups : IUtf8JsonSerializable,
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M
                     throw new FormatException($"The model {nameof(AdaptiveApplicationControlGroups)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsCollectionDefined(Value))
                 {
                     writer.WritePropertyName("value"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             AdaptiveApplicationControlGroups IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AdaptiveApplicationControlIssueSummary.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AdaptiveApplicationControlIssueSummary.Serialization.cs
    index c3e33dab01b8..f2461f205074 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AdaptiveApplicationControlIssueSummary.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AdaptiveApplicationControlIssueSummary.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class AdaptiveApplicationControlIssueSummary : IUtf8JsonSerializa
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wri
                     throw new FormatException($"The model {nameof(AdaptiveApplicationControlIssueSummary)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(Issue))
                 {
                     writer.WritePropertyName("issue"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter wri
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             AdaptiveApplicationControlIssueSummary IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AdaptiveNetworkHardeningEnforceContent.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AdaptiveNetworkHardeningEnforceContent.Serialization.cs
    index 112f0f39851f..1b6f64d79e01 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AdaptiveNetworkHardeningEnforceContent.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AdaptiveNetworkHardeningEnforceContent.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class AdaptiveNetworkHardeningEnforceContent : IUtf8JsonSerializa
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wri
                     throw new FormatException($"The model {nameof(AdaptiveNetworkHardeningEnforceContent)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 writer.WritePropertyName("rules"u8);
                 writer.WriteStartArray();
                 foreach (var item in Rules)
    @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter wri
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             AdaptiveNetworkHardeningEnforceContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AdaptiveNetworkHardeningsList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AdaptiveNetworkHardeningsList.Serialization.cs
    index 02e5fd683ab3..6e5db4268f11 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AdaptiveNetworkHardeningsList.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AdaptiveNetworkHardeningsList.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class AdaptiveNetworkHardeningsList : IUtf8JsonSerializable, IJ
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode
                     throw new FormatException($"The model {nameof(AdaptiveNetworkHardeningsList)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsCollectionDefined(Value))
                 {
                     writer.WritePropertyName("value"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             AdaptiveNetworkHardeningsList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AdditionalWorkspacesProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AdditionalWorkspacesProperties.Serialization.cs
    index 94ca8f4978d4..91cfe9dac267 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AdditionalWorkspacesProperties.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AdditionalWorkspacesProperties.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class AdditionalWorkspacesProperties : IUtf8JsonSerializable, IJs
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod
                     throw new FormatException($"The model {nameof(AdditionalWorkspacesProperties)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(Workspace))
                 {
                     writer.WritePropertyName("workspace"u8);
    @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             AdditionalWorkspacesProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AlertList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AlertList.Serialization.cs
    index 1d7f069eec4b..59d70035f9ec 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AlertList.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AlertList.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class AlertList : IUtf8JsonSerializable, IJsonModel
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions
                     throw new FormatException($"The model {nameof(AlertList)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsCollectionDefined(Value))
                 {
                     writer.WritePropertyName("value"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             AlertList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AlertsSuppressionRulesList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AlertsSuppressionRulesList.Serialization.cs
    index 3ce432709577..03ec2a608345 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AlertsSuppressionRulesList.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AlertsSuppressionRulesList.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class AlertsSuppressionRulesList : IUtf8JsonSerializable, IJson
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe
                     throw new FormatException($"The model {nameof(AlertsSuppressionRulesList)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 writer.WritePropertyName("value"u8);
                 writer.WriteStartArray();
                 foreach (var item in Value)
    @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             AlertsSuppressionRulesList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AllowedConnectionsList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AllowedConnectionsList.Serialization.cs
    index b654764cb59b..39e7810104a8 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AllowedConnectionsList.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AllowedConnectionsList.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class AllowedConnectionsList : IUtf8JsonSerializable, IJsonMode
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader
                     throw new FormatException($"The model {nameof(AllowedConnectionsList)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (options.Format != "W" && Optional.IsCollectionDefined(Value))
                 {
                     writer.WritePropertyName("value"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             AllowedConnectionsList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AllowlistCustomAlertRule.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AllowlistCustomAlertRule.Serialization.cs
    index c6f2b66ef5a5..2def7d19ed94 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AllowlistCustomAlertRule.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AllowlistCustomAlertRule.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class AllowlistCustomAlertRule : IUtf8JsonSerializable, IJsonMode
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead
                     throw new FormatException($"The model {nameof(AllowlistCustomAlertRule)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 writer.WritePropertyName("allowlistValues"u8);
                 writer.WriteStartArray();
                 foreach (var item in AllowlistValues)
    @@ -33,41 +42,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead
                     writer.WriteStringValue(item);
                 }
                 writer.WriteEndArray();
    -            if (options.Format != "W" && Optional.IsDefined(ValueType))
    -            {
    -                writer.WritePropertyName("valueType"u8);
    -                writer.WriteStringValue(ValueType.Value.ToString());
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(DisplayName))
    -            {
    -                writer.WritePropertyName("displayName"u8);
    -                writer.WriteStringValue(DisplayName);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(Description))
    -            {
    -                writer.WritePropertyName("description"u8);
    -                writer.WriteStringValue(Description);
    -            }
    -            writer.WritePropertyName("isEnabled"u8);
    -            writer.WriteBooleanValue(IsEnabled);
    -            writer.WritePropertyName("ruleType"u8);
    -            writer.WriteStringValue(RuleType);
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             AllowlistCustomAlertRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AmqpC2DMessagesNotInAllowedRange.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AmqpC2DMessagesNotInAllowedRange.Serialization.cs
    index e82d78b28921..1f74b7f8cd00 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AmqpC2DMessagesNotInAllowedRange.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AmqpC2DMessagesNotInAllowedRange.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class AmqpC2DMessagesNotInAllowedRange : IUtf8JsonSerializable, I
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,43 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, M
                     throw new FormatException($"The model {nameof(AmqpC2DMessagesNotInAllowedRange)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            writer.WritePropertyName("timeWindowSize"u8);
    -            writer.WriteStringValue(TimeWindowSize, "P");
    -            writer.WritePropertyName("minThreshold"u8);
    -            writer.WriteNumberValue(MinThreshold);
    -            writer.WritePropertyName("maxThreshold"u8);
    -            writer.WriteNumberValue(MaxThreshold);
    -            if (options.Format != "W" && Optional.IsDefined(DisplayName))
    -            {
    -                writer.WritePropertyName("displayName"u8);
    -                writer.WriteStringValue(DisplayName);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(Description))
    -            {
    -                writer.WritePropertyName("description"u8);
    -                writer.WriteStringValue(Description);
    -            }
    -            writer.WritePropertyName("isEnabled"u8);
    -            writer.WriteBooleanValue(IsEnabled);
    -            writer.WritePropertyName("ruleType"u8);
    -            writer.WriteStringValue(RuleType);
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             AmqpC2DMessagesNotInAllowedRange IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AmqpC2DRejectedMessagesNotInAllowedRange.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AmqpC2DRejectedMessagesNotInAllowedRange.Serialization.cs
    index 377b5af7934c..0bf281b0062a 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AmqpC2DRejectedMessagesNotInAllowedRange.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AmqpC2DRejectedMessagesNotInAllowedRange.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class AmqpC2DRejectedMessagesNotInAllowedRange : IUtf8JsonSeriali
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,43 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter w
                     throw new FormatException($"The model {nameof(AmqpC2DRejectedMessagesNotInAllowedRange)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            writer.WritePropertyName("timeWindowSize"u8);
    -            writer.WriteStringValue(TimeWindowSize, "P");
    -            writer.WritePropertyName("minThreshold"u8);
    -            writer.WriteNumberValue(MinThreshold);
    -            writer.WritePropertyName("maxThreshold"u8);
    -            writer.WriteNumberValue(MaxThreshold);
    -            if (options.Format != "W" && Optional.IsDefined(DisplayName))
    -            {
    -                writer.WritePropertyName("displayName"u8);
    -                writer.WriteStringValue(DisplayName);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(Description))
    -            {
    -                writer.WritePropertyName("description"u8);
    -                writer.WriteStringValue(Description);
    -            }
    -            writer.WritePropertyName("isEnabled"u8);
    -            writer.WriteBooleanValue(IsEnabled);
    -            writer.WritePropertyName("ruleType"u8);
    -            writer.WriteStringValue(RuleType);
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             AmqpC2DRejectedMessagesNotInAllowedRange IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AmqpD2CMessagesNotInAllowedRange.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AmqpD2CMessagesNotInAllowedRange.Serialization.cs
    index e2d5614f0362..abd3a1a07270 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AmqpD2CMessagesNotInAllowedRange.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AmqpD2CMessagesNotInAllowedRange.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class AmqpD2CMessagesNotInAllowedRange : IUtf8JsonSerializable, I
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,43 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, M
                     throw new FormatException($"The model {nameof(AmqpD2CMessagesNotInAllowedRange)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            writer.WritePropertyName("timeWindowSize"u8);
    -            writer.WriteStringValue(TimeWindowSize, "P");
    -            writer.WritePropertyName("minThreshold"u8);
    -            writer.WriteNumberValue(MinThreshold);
    -            writer.WritePropertyName("maxThreshold"u8);
    -            writer.WriteNumberValue(MaxThreshold);
    -            if (options.Format != "W" && Optional.IsDefined(DisplayName))
    -            {
    -                writer.WritePropertyName("displayName"u8);
    -                writer.WriteStringValue(DisplayName);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(Description))
    -            {
    -                writer.WritePropertyName("description"u8);
    -                writer.WriteStringValue(Description);
    -            }
    -            writer.WritePropertyName("isEnabled"u8);
    -            writer.WriteBooleanValue(IsEnabled);
    -            writer.WritePropertyName("ruleType"u8);
    -            writer.WriteStringValue(RuleType);
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             AmqpD2CMessagesNotInAllowedRange IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ApiCollectionList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ApiCollectionList.Serialization.cs
    index 4e93b04cc967..d9ad22552f06 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ApiCollectionList.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ApiCollectionList.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class ApiCollectionList : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite
                     throw new FormatException($"The model {nameof(ApiCollectionList)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (options.Format != "W" && Optional.IsCollectionDefined(Value))
                 {
                     writer.WritePropertyName("value"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             ApiCollectionList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ApplicationsList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ApplicationsList.Serialization.cs
    index 7f4fb2deb261..621f8d74b62f 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ApplicationsList.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ApplicationsList.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class ApplicationsList : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter
                     throw new FormatException($"The model {nameof(ApplicationsList)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (options.Format != "W" && Optional.IsCollectionDefined(Value))
                 {
                     writer.WritePropertyName("value"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             ApplicationsList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AscLocationList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AscLocationList.Serialization.cs
    index 328e1aa244d6..3cd5202a9d41 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AscLocationList.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AscLocationList.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class AscLocationList : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO
                     throw new FormatException($"The model {nameof(AscLocationList)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (options.Format != "W" && Optional.IsCollectionDefined(Value))
                 {
                     writer.WritePropertyName("value"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             AscLocationList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AssessmentLinks.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AssessmentLinks.Serialization.cs
    index fc0ee88e242c..caddec5e5fb0 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AssessmentLinks.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AssessmentLinks.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class AssessmentLinks : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO
                     throw new FormatException($"The model {nameof(AssessmentLinks)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (options.Format != "W" && Optional.IsDefined(AzurePortalUri))
                 {
                     writer.WritePropertyName("azurePortalUri"u8);
    @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             AssessmentLinks IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AtaExternalSecuritySolution.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AtaExternalSecuritySolution.Serialization.cs
    index 3fa03b6c1a86..b41529a5cd92 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AtaExternalSecuritySolution.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AtaExternalSecuritySolution.Serialization.cs
    @@ -19,6 +19,15 @@ public partial class AtaExternalSecuritySolution : IUtf8JsonSerializable, IJsonM
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -26,62 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR
                     throw new FormatException($"The model {nameof(AtaExternalSecuritySolution)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(Properties))
                 {
                     writer.WritePropertyName("properties"u8);
                     writer.WriteObjectValue(Properties, options);
                 }
    -            if (Kind != null)
    -            {
    -                writer.WritePropertyName("kind"u8);
    -                writer.WriteStringValue(Kind.Value.ToString());
    -            }
    -            else
    -            {
    -                writer.WriteNull("kind");
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(Location))
    -            {
    -                writer.WritePropertyName("location"u8);
    -                writer.WriteStringValue(Location.Value);
    -            }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("id"u8);
    -                writer.WriteStringValue(Id);
    -            }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("name"u8);
    -                writer.WriteStringValue(Name);
    -            }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("type"u8);
    -                writer.WriteStringValue(ResourceType);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(SystemData))
    -            {
    -                writer.WritePropertyName("systemData"u8);
    -                JsonSerializer.Serialize(writer, SystemData);
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             AtaExternalSecuritySolution IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AtaSolutionProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AtaSolutionProperties.Serialization.cs
    index 2df9ead561e2..00733309e529 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AtaSolutionProperties.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AtaSolutionProperties.Serialization.cs
    @@ -19,6 +19,15 @@ public partial class AtaSolutionProperties : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW
                     throw new FormatException($"The model {nameof(AtaSolutionProperties)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(LastEventReceived))
                 {
                     writer.WritePropertyName("lastEventReceived"u8);
                     writer.WriteStringValue(LastEventReceived);
                 }
    -            if (Optional.IsDefined(DeviceVendor))
    -            {
    -                writer.WritePropertyName("deviceVendor"u8);
    -                writer.WriteStringValue(DeviceVendor);
    -            }
    -            if (Optional.IsDefined(DeviceType))
    -            {
    -                writer.WritePropertyName("deviceType"u8);
    -                writer.WriteStringValue(DeviceType);
    -            }
    -            if (Optional.IsDefined(Workspace))
    -            {
    -                writer.WritePropertyName("workspace"u8);
    -                JsonSerializer.Serialize(writer, Workspace);
    -            }
                 foreach (var item in AdditionalProperties)
                 {
                     writer.WritePropertyName(item.Key);
    @@ -59,7 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW
                     }
     #endif
                 }
    -            writer.WriteEndObject();
             }
     
             AtaSolutionProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AuthenticationDetailsProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AuthenticationDetailsProperties.Serialization.cs
    index 9746b552d215..20732dff9f48 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AuthenticationDetailsProperties.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AuthenticationDetailsProperties.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class AuthenticationDetailsProperties : IUtf8JsonSerializable, IJ
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo
                     throw new FormatException($"The model {nameof(AuthenticationDetailsProperties)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (options.Format != "W" && Optional.IsDefined(AuthenticationProvisioningState))
                 {
                     writer.WritePropertyName("authenticationProvisioningState"u8);
    @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             AuthenticationDetailsProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AutoProvisioningSettingList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AutoProvisioningSettingList.Serialization.cs
    index 583588632c08..5d8e8aca4865 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AutoProvisioningSettingList.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AutoProvisioningSettingList.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class AutoProvisioningSettingList : IUtf8JsonSerializable, IJso
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR
                     throw new FormatException($"The model {nameof(AutoProvisioningSettingList)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsCollectionDefined(Value))
                 {
                     writer.WritePropertyName("value"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             AutoProvisioningSettingList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AutomationList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AutomationList.Serialization.cs
    index 36b0ea168420..9421e3bcb419 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AutomationList.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AutomationList.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class AutomationList : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp
                     throw new FormatException($"The model {nameof(AutomationList)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 writer.WritePropertyName("value"u8);
                 writer.WriteStartArray();
                 foreach (var item in Value)
    @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             AutomationList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AwsAssumeRoleAuthenticationDetailsProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AwsAssumeRoleAuthenticationDetailsProperties.Serialization.cs
    index 7756d18805ba..521263d6d3f2 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AwsAssumeRoleAuthenticationDetailsProperties.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AwsAssumeRoleAuthenticationDetailsProperties.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class AwsAssumeRoleAuthenticationDetailsProperties : IUtf8JsonSer
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWrit
                     throw new FormatException($"The model {nameof(AwsAssumeRoleAuthenticationDetailsProperties)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (options.Format != "W" && Optional.IsDefined(AccountId))
                 {
                     writer.WritePropertyName("accountId"u8);
    @@ -35,39 +44,6 @@ void IJsonModel.Write(Utf8JsonWrit
                 writer.WriteStringValue(AwsAssumeRoleArn);
                 writer.WritePropertyName("awsExternalId"u8);
                 writer.WriteStringValue(AwsExternalId);
    -            if (options.Format != "W" && Optional.IsDefined(AuthenticationProvisioningState))
    -            {
    -                writer.WritePropertyName("authenticationProvisioningState"u8);
    -                writer.WriteStringValue(AuthenticationProvisioningState.Value.ToString());
    -            }
    -            if (options.Format != "W" && Optional.IsCollectionDefined(GrantedPermissions))
    -            {
    -                writer.WritePropertyName("grantedPermissions"u8);
    -                writer.WriteStartArray();
    -                foreach (var item in GrantedPermissions)
    -                {
    -                    writer.WriteStringValue(item.ToString());
    -                }
    -                writer.WriteEndArray();
    -            }
    -            writer.WritePropertyName("authenticationType"u8);
    -            writer.WriteStringValue(AuthenticationType.ToString());
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             AwsAssumeRoleAuthenticationDetailsProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AwsCredsAuthenticationDetailsProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AwsCredsAuthenticationDetailsProperties.Serialization.cs
    index 2573b9e58a0e..edb706938d8f 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AwsCredsAuthenticationDetailsProperties.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AwsCredsAuthenticationDetailsProperties.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class AwsCredsAuthenticationDetailsProperties : IUtf8JsonSerializ
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter wr
                     throw new FormatException($"The model {nameof(AwsCredsAuthenticationDetailsProperties)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (options.Format != "W" && Optional.IsDefined(AccountId))
                 {
                     writer.WritePropertyName("accountId"u8);
    @@ -35,39 +44,6 @@ void IJsonModel.Write(Utf8JsonWriter wr
                 writer.WriteStringValue(AwsAccessKeyId);
                 writer.WritePropertyName("awsSecretAccessKey"u8);
                 writer.WriteStringValue(AwsSecretAccessKey);
    -            if (options.Format != "W" && Optional.IsDefined(AuthenticationProvisioningState))
    -            {
    -                writer.WritePropertyName("authenticationProvisioningState"u8);
    -                writer.WriteStringValue(AuthenticationProvisioningState.Value.ToString());
    -            }
    -            if (options.Format != "W" && Optional.IsCollectionDefined(GrantedPermissions))
    -            {
    -                writer.WritePropertyName("grantedPermissions"u8);
    -                writer.WriteStartArray();
    -                foreach (var item in GrantedPermissions)
    -                {
    -                    writer.WriteStringValue(item.ToString());
    -                }
    -                writer.WriteEndArray();
    -            }
    -            writer.WritePropertyName("authenticationType"u8);
    -            writer.WriteStringValue(AuthenticationType.ToString());
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             AwsCredsAuthenticationDetailsProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AwsDefenderForServersInfo.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AwsDefenderForServersInfo.Serialization.cs
    index 71304e9d27d8..54178cdf680b 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AwsDefenderForServersInfo.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AwsDefenderForServersInfo.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class AwsDefenderForServersInfo : IUtf8JsonSerializable, IJsonM
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea
                     throw new FormatException($"The model {nameof(AwsDefenderForServersInfo)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(CloudRoleArn))
                 {
                     writer.WritePropertyName("cloudRoleArn"u8);
    @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             AwsDefenderForServersInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AwsEnvironment.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AwsEnvironment.Serialization.cs
    index 201b20c2146e..5c6fc89982a9 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AwsEnvironment.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AwsEnvironment.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class AwsEnvironment : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp
                     throw new FormatException($"The model {nameof(AwsEnvironment)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(OrganizationalData))
                 {
                     writer.WritePropertyName("organizationalData"u8);
    @@ -51,24 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp
                     writer.WritePropertyName("scanInterval"u8);
                     writer.WriteNumberValue(ScanInterval.Value);
                 }
    -            writer.WritePropertyName("environmentType"u8);
    -            writer.WriteStringValue(EnvironmentType.ToString());
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             AwsEnvironment IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AwsInformationProtection.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AwsInformationProtection.Serialization.cs
    index fee70261ed91..a452288a3103 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AwsInformationProtection.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AwsInformationProtection.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class AwsInformationProtection : IUtf8JsonSerializable, IJsonMo
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead
                     throw new FormatException($"The model {nameof(AwsInformationProtection)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(CloudRoleArn))
                 {
                     writer.WritePropertyName("cloudRoleArn"u8);
    @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             AwsInformationProtection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AwsOrganizationalDataMaster.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AwsOrganizationalDataMaster.Serialization.cs
    index 5d7e4971a3bf..2f978c94e188 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AwsOrganizationalDataMaster.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AwsOrganizationalDataMaster.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class AwsOrganizationalDataMaster : IUtf8JsonSerializable, IJsonM
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR
                     throw new FormatException($"The model {nameof(AwsOrganizationalDataMaster)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(StacksetName))
                 {
                     writer.WritePropertyName("stacksetName"u8);
    @@ -41,24 +50,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR
                     }
                     writer.WriteEndArray();
                 }
    -            writer.WritePropertyName("organizationMembershipType"u8);
    -            writer.WriteStringValue(OrganizationMembershipType.ToString());
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             AwsOrganizationalDataMaster IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AwsOrganizationalDataMember.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AwsOrganizationalDataMember.Serialization.cs
    index ad128b567fc6..728516285c4a 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AwsOrganizationalDataMember.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AwsOrganizationalDataMember.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class AwsOrganizationalDataMember : IUtf8JsonSerializable, IJsonM
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,30 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR
                     throw new FormatException($"The model {nameof(AwsOrganizationalDataMember)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(ParentHierarchyId))
                 {
                     writer.WritePropertyName("parentHierarchyId"u8);
                     writer.WriteStringValue(ParentHierarchyId);
                 }
    -            writer.WritePropertyName("organizationMembershipType"u8);
    -            writer.WriteStringValue(OrganizationMembershipType.ToString());
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             AwsOrganizationalDataMember IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AwsOrganizationalInfo.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AwsOrganizationalInfo.Serialization.cs
    index 96be47d5e777..1ba1478e00e0 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AwsOrganizationalInfo.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AwsOrganizationalInfo.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class AwsOrganizationalInfo : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW
                     throw new FormatException($"The model {nameof(AwsOrganizationalInfo)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 writer.WritePropertyName("organizationMembershipType"u8);
                 writer.WriteStringValue(OrganizationMembershipType.ToString());
                 if (options.Format != "W" && _serializedAdditionalRawData != null)
    @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             AwsOrganizationalInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AzureDevOpsOrgListResponse.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AzureDevOpsOrgListResponse.Serialization.cs
    index da7ddcdea738..686bdd95b2c0 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AzureDevOpsOrgListResponse.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AzureDevOpsOrgListResponse.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class AzureDevOpsOrgListResponse : IUtf8JsonSerializable, IJson
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe
                     throw new FormatException($"The model {nameof(AzureDevOpsOrgListResponse)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsCollectionDefined(Value))
                 {
                     writer.WritePropertyName("value"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             AzureDevOpsOrgListResponse IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AzureDevOpsProjectListResponse.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AzureDevOpsProjectListResponse.Serialization.cs
    index 2c308a3ca67a..5074f97f409f 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AzureDevOpsProjectListResponse.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AzureDevOpsProjectListResponse.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class AzureDevOpsProjectListResponse : IUtf8JsonSerializable, I
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod
                     throw new FormatException($"The model {nameof(AzureDevOpsProjectListResponse)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsCollectionDefined(Value))
                 {
                     writer.WritePropertyName("value"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             AzureDevOpsProjectListResponse IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AzureDevOpsRepositoryListResponse.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AzureDevOpsRepositoryListResponse.Serialization.cs
    index bb08e605f3e0..82b4b8214150 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AzureDevOpsRepositoryListResponse.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AzureDevOpsRepositoryListResponse.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class AzureDevOpsRepositoryListResponse : IUtf8JsonSerializable
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer,
                     throw new FormatException($"The model {nameof(AzureDevOpsRepositoryListResponse)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsCollectionDefined(Value))
                 {
                     writer.WritePropertyName("value"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer,
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             AzureDevOpsRepositoryListResponse IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AzureDevOpsScopeEnvironment.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AzureDevOpsScopeEnvironment.Serialization.cs
    index bca6778523e8..fbc2f578aecd 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AzureDevOpsScopeEnvironment.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AzureDevOpsScopeEnvironment.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class AzureDevOpsScopeEnvironment : IUtf8JsonSerializable, IJsonM
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,25 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR
                     throw new FormatException($"The model {nameof(AzureDevOpsScopeEnvironment)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            writer.WritePropertyName("environmentType"u8);
    -            writer.WriteStringValue(EnvironmentType.ToString());
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             AzureDevOpsScopeEnvironment IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AzureResourceDetails.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AzureResourceDetails.Serialization.cs
    index 743495fde648..e24f7ea9cc6d 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AzureResourceDetails.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AzureResourceDetails.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class AzureResourceDetails : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,30 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr
                     throw new FormatException($"The model {nameof(AzureResourceDetails)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (options.Format != "W" && Optional.IsDefined(Id))
                 {
                     writer.WritePropertyName("id"u8);
                     writer.WriteStringValue(Id);
                 }
    -            writer.WritePropertyName("source"u8);
    -            writer.WriteStringValue(Source.ToString());
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             AzureResourceDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AzureResourceIdentifier.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AzureResourceIdentifier.Serialization.cs
    index 1e3be0ddf5e2..dcee8742799a 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AzureResourceIdentifier.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AzureResourceIdentifier.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class AzureResourceIdentifier : IUtf8JsonSerializable, IJsonModel
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,30 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade
                     throw new FormatException($"The model {nameof(AzureResourceIdentifier)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (options.Format != "W" && Optional.IsDefined(AzureResourceId))
                 {
                     writer.WritePropertyName("azureResourceId"u8);
                     writer.WriteStringValue(AzureResourceId);
                 }
    -            writer.WritePropertyName("type"u8);
    -            writer.WriteStringValue(ResourceIdentifierType.ToString());
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             AzureResourceIdentifier IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AzureServersSetting.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AzureServersSetting.Serialization.cs
    index 2469bf6739e4..2c7015608b50 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AzureServersSetting.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AzureServersSetting.Serialization.cs
    @@ -19,6 +19,15 @@ public partial class AzureServersSetting : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -26,29 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri
                     throw new FormatException($"The model {nameof(AzureServersSetting)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            writer.WritePropertyName("kind"u8);
    -            writer.WriteStringValue(Kind.ToString());
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("id"u8);
    -                writer.WriteStringValue(Id);
    -            }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("name"u8);
    -                writer.WriteStringValue(Name);
    -            }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("type"u8);
    -                writer.WriteStringValue(ResourceType);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(SystemData))
    -            {
    -                writer.WritePropertyName("systemData"u8);
    -                JsonSerializer.Serialize(writer, SystemData);
    -            }
    +            base.JsonModelWriteCore(writer, options);
                 writer.WritePropertyName("properties"u8);
                 writer.WriteStartObject();
                 if (Optional.IsDefined(SelectedProvider))
    @@ -57,22 +44,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri
                     writer.WriteStringValue(SelectedProvider.Value.ToString());
                 }
                 writer.WriteEndObject();
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             AzureServersSetting IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/BaselineAdjustedResult.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/BaselineAdjustedResult.Serialization.cs
    index dbe0de18d0e5..7fca579dd5bc 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/BaselineAdjustedResult.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/BaselineAdjustedResult.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class BaselineAdjustedResult : IUtf8JsonSerializable, IJsonModel<
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader
                     throw new FormatException($"The model {nameof(BaselineAdjustedResult)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(Baseline))
                 {
                     writer.WritePropertyName("baseline"u8);
    @@ -91,7 +99,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             BaselineAdjustedResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/BenchmarkReference.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/BenchmarkReference.Serialization.cs
    index 2373e5d996b9..2532549f4e6d 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/BenchmarkReference.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/BenchmarkReference.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class BenchmarkReference : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit
                     throw new FormatException($"The model {nameof(BenchmarkReference)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(Benchmark))
                 {
                     writer.WritePropertyName("benchmark"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             BenchmarkReference IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/BuiltInInfoType.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/BuiltInInfoType.Serialization.cs
    index 164314979111..443d22213fa1 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/BuiltInInfoType.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/BuiltInInfoType.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class BuiltInInfoType : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO
                     throw new FormatException($"The model {nameof(BuiltInInfoType)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(Name))
                 {
                     writer.WritePropertyName("name"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             BuiltInInfoType IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CategoryConfiguration.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CategoryConfiguration.Serialization.cs
    index 4a2c24f49f1d..37afa68eefb0 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CategoryConfiguration.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CategoryConfiguration.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class CategoryConfiguration : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW
                     throw new FormatException($"The model {nameof(CategoryConfiguration)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(MinimumSeverityLevel))
                 {
                     writer.WritePropertyName("minimumSeverityLevel"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             CategoryConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CefExternalSecuritySolution.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CefExternalSecuritySolution.Serialization.cs
    index 303375c04055..1a84e1f04bda 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CefExternalSecuritySolution.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CefExternalSecuritySolution.Serialization.cs
    @@ -19,6 +19,15 @@ public partial class CefExternalSecuritySolution : IUtf8JsonSerializable, IJsonM
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -26,62 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR
                     throw new FormatException($"The model {nameof(CefExternalSecuritySolution)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(Properties))
                 {
                     writer.WritePropertyName("properties"u8);
                     writer.WriteObjectValue(Properties, options);
                 }
    -            if (Kind != null)
    -            {
    -                writer.WritePropertyName("kind"u8);
    -                writer.WriteStringValue(Kind.Value.ToString());
    -            }
    -            else
    -            {
    -                writer.WriteNull("kind");
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(Location))
    -            {
    -                writer.WritePropertyName("location"u8);
    -                writer.WriteStringValue(Location.Value);
    -            }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("id"u8);
    -                writer.WriteStringValue(Id);
    -            }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("name"u8);
    -                writer.WriteStringValue(Name);
    -            }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("type"u8);
    -                writer.WriteStringValue(ResourceType);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(SystemData))
    -            {
    -                writer.WritePropertyName("systemData"u8);
    -                JsonSerializer.Serialize(writer, SystemData);
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             CefExternalSecuritySolution IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CefSolutionProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CefSolutionProperties.Serialization.cs
    index 3bec33451b02..b8ae5f5c0e14 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CefSolutionProperties.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CefSolutionProperties.Serialization.cs
    @@ -19,6 +19,15 @@ public partial class CefSolutionProperties : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -26,7 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW
                     throw new FormatException($"The model {nameof(CefSolutionProperties)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(Hostname))
                 {
                     writer.WritePropertyName("hostname"u8);
    @@ -42,21 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW
                     writer.WritePropertyName("lastEventReceived"u8);
                     writer.WriteStringValue(LastEventReceived);
                 }
    -            if (Optional.IsDefined(DeviceVendor))
    -            {
    -                writer.WritePropertyName("deviceVendor"u8);
    -                writer.WriteStringValue(DeviceVendor);
    -            }
    -            if (Optional.IsDefined(DeviceType))
    -            {
    -                writer.WritePropertyName("deviceType"u8);
    -                writer.WriteStringValue(DeviceType);
    -            }
    -            if (Optional.IsDefined(Workspace))
    -            {
    -                writer.WritePropertyName("workspace"u8);
    -                JsonSerializer.Serialize(writer, Workspace);
    -            }
                 foreach (var item in AdditionalProperties)
                 {
                     writer.WritePropertyName(item.Key);
    @@ -69,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW
                     }
     #endif
                 }
    -            writer.WriteEndObject();
             }
     
             CefSolutionProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ComplianceList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ComplianceList.Serialization.cs
    index f29a03c10cbc..7cd144d287ca 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ComplianceList.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ComplianceList.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class ComplianceList : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp
                     throw new FormatException($"The model {nameof(ComplianceList)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsCollectionDefined(Value))
                 {
                     writer.WritePropertyName("value"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             ComplianceList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ComplianceResultList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ComplianceResultList.Serialization.cs
    index 07d9fe24f114..c532e0adb338 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ComplianceResultList.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ComplianceResultList.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class ComplianceResultList : IUtf8JsonSerializable, IJsonModel<
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr
                     throw new FormatException($"The model {nameof(ComplianceResultList)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 writer.WritePropertyName("value"u8);
                 writer.WriteStartArray();
                 foreach (var item in Value)
    @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             ComplianceResultList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ComplianceSegment.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ComplianceSegment.Serialization.cs
    index 36dc4ea701d2..d18c045b81c7 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ComplianceSegment.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ComplianceSegment.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class ComplianceSegment : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite
                     throw new FormatException($"The model {nameof(ComplianceSegment)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (options.Format != "W" && Optional.IsDefined(SegmentType))
                 {
                     writer.WritePropertyName("segmentType"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             ComplianceSegment IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ConnectableResourceInfo.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ConnectableResourceInfo.Serialization.cs
    index d94f541c1085..2065498088c1 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ConnectableResourceInfo.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ConnectableResourceInfo.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class ConnectableResourceInfo : IUtf8JsonSerializable, IJsonModel
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade
                     throw new FormatException($"The model {nameof(ConnectableResourceInfo)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (options.Format != "W" && Optional.IsDefined(Id))
                 {
                     writer.WritePropertyName("id"u8);
    @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             ConnectableResourceInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ConnectedResourceInfo.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ConnectedResourceInfo.Serialization.cs
    index b649a8b39d18..ebfe2173cecd 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ConnectedResourceInfo.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ConnectedResourceInfo.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class ConnectedResourceInfo : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW
                     throw new FormatException($"The model {nameof(ConnectedResourceInfo)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (options.Format != "W" && Optional.IsDefined(ConnectedResourceId))
                 {
                     writer.WritePropertyName("connectedResourceId"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             ConnectedResourceInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ConnectionFromIPNotAllowed.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ConnectionFromIPNotAllowed.Serialization.cs
    index d036f53ab95f..fae0d0db0b63 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ConnectionFromIPNotAllowed.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ConnectionFromIPNotAllowed.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class ConnectionFromIPNotAllowed : IUtf8JsonSerializable, IJsonMo
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,49 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe
                     throw new FormatException($"The model {nameof(ConnectionFromIPNotAllowed)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            writer.WritePropertyName("allowlistValues"u8);
    -            writer.WriteStartArray();
    -            foreach (var item in AllowlistValues)
    -            {
    -                writer.WriteStringValue(item);
    -            }
    -            writer.WriteEndArray();
    -            if (options.Format != "W" && Optional.IsDefined(ValueType))
    -            {
    -                writer.WritePropertyName("valueType"u8);
    -                writer.WriteStringValue(ValueType.Value.ToString());
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(DisplayName))
    -            {
    -                writer.WritePropertyName("displayName"u8);
    -                writer.WriteStringValue(DisplayName);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(Description))
    -            {
    -                writer.WritePropertyName("description"u8);
    -                writer.WriteStringValue(Description);
    -            }
    -            writer.WritePropertyName("isEnabled"u8);
    -            writer.WriteBooleanValue(IsEnabled);
    -            writer.WritePropertyName("ruleType"u8);
    -            writer.WriteStringValue(RuleType);
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             ConnectionFromIPNotAllowed IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ConnectionToIPNotAllowed.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ConnectionToIPNotAllowed.Serialization.cs
    index 588a1e2f57bd..85eaf3717430 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ConnectionToIPNotAllowed.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ConnectionToIPNotAllowed.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class ConnectionToIPNotAllowed : IUtf8JsonSerializable, IJsonMode
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,49 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead
                     throw new FormatException($"The model {nameof(ConnectionToIPNotAllowed)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            writer.WritePropertyName("allowlistValues"u8);
    -            writer.WriteStartArray();
    -            foreach (var item in AllowlistValues)
    -            {
    -                writer.WriteStringValue(item);
    -            }
    -            writer.WriteEndArray();
    -            if (options.Format != "W" && Optional.IsDefined(ValueType))
    -            {
    -                writer.WritePropertyName("valueType"u8);
    -                writer.WriteStringValue(ValueType.Value.ToString());
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(DisplayName))
    -            {
    -                writer.WritePropertyName("displayName"u8);
    -                writer.WriteStringValue(DisplayName);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(Description))
    -            {
    -                writer.WritePropertyName("description"u8);
    -                writer.WriteStringValue(Description);
    -            }
    -            writer.WritePropertyName("isEnabled"u8);
    -            writer.WriteBooleanValue(IsEnabled);
    -            writer.WritePropertyName("ruleType"u8);
    -            writer.WriteStringValue(RuleType);
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             ConnectionToIPNotAllowed IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ConnectorSettingList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ConnectorSettingList.Serialization.cs
    index 83afd5ebf70c..d7179d6652ae 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ConnectorSettingList.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ConnectorSettingList.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class ConnectorSettingList : IUtf8JsonSerializable, IJsonModel<
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr
                     throw new FormatException($"The model {nameof(ConnectorSettingList)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsCollectionDefined(Value))
                 {
                     writer.WritePropertyName("value"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             ConnectorSettingList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ContainerRegistryVulnerabilityProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ContainerRegistryVulnerabilityProperties.Serialization.cs
    index 84ce9ef7dc22..41a687ca6b9c 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ContainerRegistryVulnerabilityProperties.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ContainerRegistryVulnerabilityProperties.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class ContainerRegistryVulnerabilityProperties : IUtf8JsonSeriali
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter w
                     throw new FormatException($"The model {nameof(ContainerRegistryVulnerabilityProperties)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (options.Format != "W" && Optional.IsDefined(ContainerRegistryVulnerabilityPropertiesType))
                 {
                     writer.WritePropertyName("type"u8);
    @@ -82,24 +91,6 @@ void IJsonModel.Write(Utf8JsonWriter w
                     writer.WritePropertyName("imageDigest"u8);
                     writer.WriteStringValue(ImageDigest);
                 }
    -            writer.WritePropertyName("assessedResourceType"u8);
    -            writer.WriteStringValue(AssessedResourceType.ToString());
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             ContainerRegistryVulnerabilityProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CspmMonitorAwsOffering.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CspmMonitorAwsOffering.Serialization.cs
    index 8ee6eab2b891..ee823bc68a24 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CspmMonitorAwsOffering.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CspmMonitorAwsOffering.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class CspmMonitorAwsOffering : IUtf8JsonSerializable, IJsonModel<
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,35 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader
                     throw new FormatException($"The model {nameof(CspmMonitorAwsOffering)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(NativeCloudConnection))
                 {
                     writer.WritePropertyName("nativeCloudConnection"u8);
                     writer.WriteObjectValue(NativeCloudConnection, options);
                 }
    -            writer.WritePropertyName("offeringType"u8);
    -            writer.WriteStringValue(OfferingType.ToString());
    -            if (options.Format != "W" && Optional.IsDefined(Description))
    -            {
    -                writer.WritePropertyName("description"u8);
    -                writer.WriteStringValue(Description);
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             CspmMonitorAwsOffering IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CspmMonitorAwsOfferingNativeCloudConnection.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CspmMonitorAwsOfferingNativeCloudConnection.Serialization.cs
    index 54be1868848e..a3ad2275efed 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CspmMonitorAwsOfferingNativeCloudConnection.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CspmMonitorAwsOfferingNativeCloudConnection.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class CspmMonitorAwsOfferingNativeCloudConnection : IUtf8JsonSe
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWrite
                     throw new FormatException($"The model {nameof(CspmMonitorAwsOfferingNativeCloudConnection)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(CloudRoleArn))
                 {
                     writer.WritePropertyName("cloudRoleArn"u8);
    @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWrite
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             CspmMonitorAwsOfferingNativeCloudConnection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CspmMonitorAzureDevOpsOffering.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CspmMonitorAzureDevOpsOffering.Serialization.cs
    index 6a1bc812831d..dc9fdd72a287 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CspmMonitorAzureDevOpsOffering.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CspmMonitorAzureDevOpsOffering.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class CspmMonitorAzureDevOpsOffering : IUtf8JsonSerializable, IJs
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,30 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod
                     throw new FormatException($"The model {nameof(CspmMonitorAzureDevOpsOffering)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            writer.WritePropertyName("offeringType"u8);
    -            writer.WriteStringValue(OfferingType.ToString());
    -            if (options.Format != "W" && Optional.IsDefined(Description))
    -            {
    -                writer.WritePropertyName("description"u8);
    -                writer.WriteStringValue(Description);
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             CspmMonitorAzureDevOpsOffering IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CspmMonitorGcpOffering.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CspmMonitorGcpOffering.Serialization.cs
    index 87f3da4b205e..2cab9fc4ffb4 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CspmMonitorGcpOffering.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CspmMonitorGcpOffering.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class CspmMonitorGcpOffering : IUtf8JsonSerializable, IJsonModel<
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,35 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader
                     throw new FormatException($"The model {nameof(CspmMonitorGcpOffering)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(NativeCloudConnection))
                 {
                     writer.WritePropertyName("nativeCloudConnection"u8);
                     writer.WriteObjectValue(NativeCloudConnection, options);
                 }
    -            writer.WritePropertyName("offeringType"u8);
    -            writer.WriteStringValue(OfferingType.ToString());
    -            if (options.Format != "W" && Optional.IsDefined(Description))
    -            {
    -                writer.WritePropertyName("description"u8);
    -                writer.WriteStringValue(Description);
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             CspmMonitorGcpOffering IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CspmMonitorGcpOfferingNativeCloudConnection.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CspmMonitorGcpOfferingNativeCloudConnection.Serialization.cs
    index 689911ebb585..83ff5fdecdd3 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CspmMonitorGcpOfferingNativeCloudConnection.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CspmMonitorGcpOfferingNativeCloudConnection.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class CspmMonitorGcpOfferingNativeCloudConnection : IUtf8JsonSeri
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWrite
                     throw new FormatException($"The model {nameof(CspmMonitorGcpOfferingNativeCloudConnection)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(WorkloadIdentityProviderId))
                 {
                     writer.WritePropertyName("workloadIdentityProviderId"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWrite
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             CspmMonitorGcpOfferingNativeCloudConnection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CspmMonitorGitLabOffering.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CspmMonitorGitLabOffering.Serialization.cs
    index 2461bf1f0594..6b2c4144b632 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CspmMonitorGitLabOffering.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CspmMonitorGitLabOffering.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class CspmMonitorGitLabOffering : IUtf8JsonSerializable, IJsonMod
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,30 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea
                     throw new FormatException($"The model {nameof(CspmMonitorGitLabOffering)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            writer.WritePropertyName("offeringType"u8);
    -            writer.WriteStringValue(OfferingType.ToString());
    -            if (options.Format != "W" && Optional.IsDefined(Description))
    -            {
    -                writer.WritePropertyName("description"u8);
    -                writer.WriteStringValue(Description);
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             CspmMonitorGitLabOffering IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CspmMonitorGithubOffering.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CspmMonitorGithubOffering.Serialization.cs
    index 74c51d815d81..a4a3be8ee4dd 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CspmMonitorGithubOffering.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CspmMonitorGithubOffering.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class CspmMonitorGithubOffering : IUtf8JsonSerializable, IJsonMod
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,30 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea
                     throw new FormatException($"The model {nameof(CspmMonitorGithubOffering)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            writer.WritePropertyName("offeringType"u8);
    -            writer.WriteStringValue(OfferingType.ToString());
    -            if (options.Format != "W" && Optional.IsDefined(Description))
    -            {
    -                writer.WritePropertyName("description"u8);
    -                writer.WriteStringValue(Description);
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             CspmMonitorGithubOffering IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CustomAlertRule.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CustomAlertRule.Serialization.cs
    index a3f56e5a82b9..d0b84436c5ab 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CustomAlertRule.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CustomAlertRule.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class CustomAlertRule : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO
                     throw new FormatException($"The model {nameof(CustomAlertRule)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (options.Format != "W" && Optional.IsDefined(DisplayName))
                 {
                     writer.WritePropertyName("displayName"u8);
    @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             CustomAlertRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CustomAssessmentAutomationCreateOrUpdateContent.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CustomAssessmentAutomationCreateOrUpdateContent.Serialization.cs
    index fbe89072d825..3d55c4ae95f1 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CustomAssessmentAutomationCreateOrUpdateContent.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CustomAssessmentAutomationCreateOrUpdateContent.Serialization.cs
    @@ -19,6 +19,15 @@ public partial class CustomAssessmentAutomationCreateOrUpdateContent : IUtf8Json
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -26,27 +35,7 @@ void IJsonModel.Write(Utf8JsonW
                     throw new FormatException($"The model {nameof(CustomAssessmentAutomationCreateOrUpdateContent)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("id"u8);
    -                writer.WriteStringValue(Id);
    -            }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("name"u8);
    -                writer.WriteStringValue(Name);
    -            }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("type"u8);
    -                writer.WriteStringValue(ResourceType);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(SystemData))
    -            {
    -                writer.WritePropertyName("systemData"u8);
    -                JsonSerializer.Serialize(writer, SystemData);
    -            }
    +            base.JsonModelWriteCore(writer, options);
                 writer.WritePropertyName("properties"u8);
                 writer.WriteStartObject();
                 if (Optional.IsDefined(CompressedQuery))
    @@ -80,22 +69,6 @@ void IJsonModel.Write(Utf8JsonW
                     writer.WriteStringValue(RemediationDescription);
                 }
                 writer.WriteEndObject();
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             CustomAssessmentAutomationCreateOrUpdateContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CustomAssessmentAutomationsListResult.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CustomAssessmentAutomationsListResult.Serialization.cs
    index 1ae96ec5a3c6..6d5669a6eb90 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CustomAssessmentAutomationsListResult.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CustomAssessmentAutomationsListResult.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class CustomAssessmentAutomationsListResult : IUtf8JsonSerializ
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writ
                     throw new FormatException($"The model {nameof(CustomAssessmentAutomationsListResult)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (options.Format != "W" && Optional.IsCollectionDefined(Value))
                 {
                     writer.WritePropertyName("value"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writ
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             CustomAssessmentAutomationsListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CustomEntityStoreAssignmentCreateOrUpdateContent.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CustomEntityStoreAssignmentCreateOrUpdateContent.Serialization.cs
    index 942df10fb5c8..0ed54cfb0e2b 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CustomEntityStoreAssignmentCreateOrUpdateContent.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CustomEntityStoreAssignmentCreateOrUpdateContent.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class CustomEntityStoreAssignmentCreateOrUpdateContent : IUtf8Jso
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8Json
                     throw new FormatException($"The model {nameof(CustomEntityStoreAssignmentCreateOrUpdateContent)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 writer.WritePropertyName("properties"u8);
                 writer.WriteStartObject();
                 if (Optional.IsDefined(Principal))
    @@ -49,7 +57,6 @@ void IJsonModel.Write(Utf8Json
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             CustomEntityStoreAssignmentCreateOrUpdateContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CustomEntityStoreAssignmentsListResult.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CustomEntityStoreAssignmentsListResult.Serialization.cs
    index f5cfc524a83b..99de275ae330 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CustomEntityStoreAssignmentsListResult.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CustomEntityStoreAssignmentsListResult.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class CustomEntityStoreAssignmentsListResult : IUtf8JsonSeriali
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wri
                     throw new FormatException($"The model {nameof(CustomEntityStoreAssignmentsListResult)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (options.Format != "W" && Optional.IsCollectionDefined(Value))
                 {
                     writer.WritePropertyName("value"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter wri
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             CustomEntityStoreAssignmentsListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DataExportSettings.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DataExportSettings.Serialization.cs
    index 03e07bc2ca14..4153d60fcf4a 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DataExportSettings.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DataExportSettings.Serialization.cs
    @@ -19,6 +19,15 @@ public partial class DataExportSettings : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -26,29 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit
                     throw new FormatException($"The model {nameof(DataExportSettings)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            writer.WritePropertyName("kind"u8);
    -            writer.WriteStringValue(Kind.ToString());
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("id"u8);
    -                writer.WriteStringValue(Id);
    -            }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("name"u8);
    -                writer.WriteStringValue(Name);
    -            }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("type"u8);
    -                writer.WriteStringValue(ResourceType);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(SystemData))
    -            {
    -                writer.WritePropertyName("systemData"u8);
    -                JsonSerializer.Serialize(writer, SystemData);
    -            }
    +            base.JsonModelWriteCore(writer, options);
                 writer.WritePropertyName("properties"u8);
                 writer.WriteStartObject();
                 if (Optional.IsDefined(IsEnabled))
    @@ -57,22 +44,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit
                     writer.WriteBooleanValue(IsEnabled.Value);
                 }
                 writer.WriteEndObject();
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             DataExportSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOffering.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOffering.Serialization.cs
    index 82c02e8a8375..72ea4d58efbf 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOffering.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOffering.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DefenderCspmAwsOffering : IUtf8JsonSerializable, IJsonModel
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade
                     throw new FormatException($"The model {nameof(DefenderCspmAwsOffering)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(VmScanners))
                 {
                     writer.WritePropertyName("vmScanners"u8);
    @@ -56,29 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade
                     writer.WritePropertyName("mdcContainersAgentlessDiscoveryK8s"u8);
                     writer.WriteObjectValue(MdcContainersAgentlessDiscoveryK8S, options);
                 }
    -            writer.WritePropertyName("offeringType"u8);
    -            writer.WriteStringValue(OfferingType.ToString());
    -            if (options.Format != "W" && Optional.IsDefined(Description))
    -            {
    -                writer.WritePropertyName("description"u8);
    -                writer.WriteStringValue(Description);
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             DefenderCspmAwsOffering IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingCiem.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingCiem.Serialization.cs
    index 51d07ac1ca27..92484cc5460e 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingCiem.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingCiem.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DefenderCspmAwsOfferingCiem : IUtf8JsonSerializable, IJsonM
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR
                     throw new FormatException($"The model {nameof(DefenderCspmAwsOfferingCiem)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(CiemDiscovery))
                 {
                     writer.WritePropertyName("ciemDiscovery"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             DefenderCspmAwsOfferingCiem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingCiemDiscovery.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingCiemDiscovery.Serialization.cs
    index dc5a8b732770..2f849fe17579 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingCiemDiscovery.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingCiemDiscovery.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class DefenderCspmAwsOfferingCiemDiscovery : IUtf8JsonSerializa
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter write
                     throw new FormatException($"The model {nameof(DefenderCspmAwsOfferingCiemDiscovery)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(CloudRoleArn))
                 {
                     writer.WritePropertyName("cloudRoleArn"u8);
    @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter write
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             DefenderCspmAwsOfferingCiemDiscovery IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingCiemOidc.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingCiemOidc.Serialization.cs
    index ae242858dae7..150ae554326f 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingCiemOidc.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingCiemOidc.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DefenderCspmAwsOfferingCiemOidc : IUtf8JsonSerializable, IJ
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo
                     throw new FormatException($"The model {nameof(DefenderCspmAwsOfferingCiemOidc)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(CloudRoleArn))
                 {
                     writer.WritePropertyName("cloudRoleArn"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             DefenderCspmAwsOfferingCiemOidc IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingDataSensitivityDiscovery.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingDataSensitivityDiscovery.Serialization.cs
    index 11465e599327..a8da43196812 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingDataSensitivityDiscovery.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingDataSensitivityDiscovery.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DefenderCspmAwsOfferingDataSensitivityDiscovery : IUtf8Json
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonW
                     throw new FormatException($"The model {nameof(DefenderCspmAwsOfferingDataSensitivityDiscovery)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(IsEnabled))
                 {
                     writer.WritePropertyName("enabled"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonW
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             DefenderCspmAwsOfferingDataSensitivityDiscovery IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingDatabasesDspm.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingDatabasesDspm.Serialization.cs
    index 6e419616a37f..bffc2a5b1a7c 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingDatabasesDspm.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingDatabasesDspm.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DefenderCspmAwsOfferingDatabasesDspm : IUtf8JsonSerializabl
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter write
                     throw new FormatException($"The model {nameof(DefenderCspmAwsOfferingDatabasesDspm)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(IsEnabled))
                 {
                     writer.WritePropertyName("enabled"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter write
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             DefenderCspmAwsOfferingDatabasesDspm IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingMdcContainersAgentlessDiscoveryK8S.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingMdcContainersAgentlessDiscoveryK8S.Serialization.cs
    index 0a367e3fb180..8ed5d43b48ba 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingMdcContainersAgentlessDiscoveryK8S.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingMdcContainersAgentlessDiscoveryK8S.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DefenderCspmAwsOfferingMdcContainersAgentlessDiscoveryK8S :
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write
                     throw new FormatException($"The model {nameof(DefenderCspmAwsOfferingMdcContainersAgentlessDiscoveryK8S)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(IsEnabled))
                 {
                     writer.WritePropertyName("enabled"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Write
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             DefenderCspmAwsOfferingMdcContainersAgentlessDiscoveryK8S IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingMdcContainersImageAssessment.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingMdcContainersImageAssessment.Serialization.cs
    index 8140109bd893..0b48f6082d44 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingMdcContainersImageAssessment.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingMdcContainersImageAssessment.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DefenderCspmAwsOfferingMdcContainersImageAssessment : IUtf8
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8J
                     throw new FormatException($"The model {nameof(DefenderCspmAwsOfferingMdcContainersImageAssessment)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(IsEnabled))
                 {
                     writer.WritePropertyName("enabled"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8J
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             DefenderCspmAwsOfferingMdcContainersImageAssessment IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingVmScanners.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingVmScanners.Serialization.cs
    index c0197a04b9e0..f27a0b9b194d 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingVmScanners.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingVmScanners.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DefenderCspmAwsOfferingVmScanners : IUtf8JsonSerializable,
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer,
                     throw new FormatException($"The model {nameof(DefenderCspmAwsOfferingVmScanners)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(Enabled))
                 {
                     writer.WritePropertyName("enabled"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer,
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             DefenderCspmAwsOfferingVmScanners IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingVmScannersConfiguration.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingVmScannersConfiguration.Serialization.cs
    index 52bc6ebdffab..17c200a3188b 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingVmScannersConfiguration.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingVmScannersConfiguration.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DefenderCspmAwsOfferingVmScannersConfiguration : IUtf8JsonS
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWr
                     throw new FormatException($"The model {nameof(DefenderCspmAwsOfferingVmScannersConfiguration)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(CloudRoleArn))
                 {
                     writer.WritePropertyName("cloudRoleArn"u8);
    @@ -62,7 +70,6 @@ void IJsonModel.Write(Utf8JsonWr
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             DefenderCspmAwsOfferingVmScannersConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmGcpOffering.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmGcpOffering.Serialization.cs
    index c0a1fa601ebb..620fbccb9a4f 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmGcpOffering.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmGcpOffering.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DefenderCspmGcpOffering : IUtf8JsonSerializable, IJsonModel
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade
                     throw new FormatException($"The model {nameof(DefenderCspmGcpOffering)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(CiemDiscovery))
                 {
                     writer.WritePropertyName("ciemDiscovery"u8);
    @@ -51,29 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade
                     writer.WritePropertyName("mdcContainersAgentlessDiscoveryK8s"u8);
                     writer.WriteObjectValue(MdcContainersAgentlessDiscoveryK8S, options);
                 }
    -            writer.WritePropertyName("offeringType"u8);
    -            writer.WriteStringValue(OfferingType.ToString());
    -            if (options.Format != "W" && Optional.IsDefined(Description))
    -            {
    -                writer.WritePropertyName("description"u8);
    -                writer.WriteStringValue(Description);
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             DefenderCspmGcpOffering IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmGcpOfferingCiemDiscovery.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmGcpOfferingCiemDiscovery.Serialization.cs
    index a039e8ba137a..395345a73bc2 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmGcpOfferingCiemDiscovery.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmGcpOfferingCiemDiscovery.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DefenderCspmGcpOfferingCiemDiscovery : IUtf8JsonSerializabl
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter write
                     throw new FormatException($"The model {nameof(DefenderCspmGcpOfferingCiemDiscovery)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(WorkloadIdentityProviderId))
                 {
                     writer.WritePropertyName("workloadIdentityProviderId"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter write
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             DefenderCspmGcpOfferingCiemDiscovery IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmGcpOfferingDataSensitivityDiscovery.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmGcpOfferingDataSensitivityDiscovery.Serialization.cs
    index 6cccae791e01..7625c89d0560 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmGcpOfferingDataSensitivityDiscovery.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmGcpOfferingDataSensitivityDiscovery.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DefenderCspmGcpOfferingDataSensitivityDiscovery : IUtf8Json
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonW
                     throw new FormatException($"The model {nameof(DefenderCspmGcpOfferingDataSensitivityDiscovery)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(IsEnabled))
                 {
                     writer.WritePropertyName("enabled"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonW
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             DefenderCspmGcpOfferingDataSensitivityDiscovery IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmGcpOfferingMdcContainersAgentlessDiscoveryK8S.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmGcpOfferingMdcContainersAgentlessDiscoveryK8S.Serialization.cs
    index a319ea15fc3b..972f8c4d5128 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmGcpOfferingMdcContainersAgentlessDiscoveryK8S.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmGcpOfferingMdcContainersAgentlessDiscoveryK8S.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DefenderCspmGcpOfferingMdcContainersAgentlessDiscoveryK8S :
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write
                     throw new FormatException($"The model {nameof(DefenderCspmGcpOfferingMdcContainersAgentlessDiscoveryK8S)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(IsEnabled))
                 {
                     writer.WritePropertyName("enabled"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             DefenderCspmGcpOfferingMdcContainersAgentlessDiscoveryK8S IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmGcpOfferingMdcContainersImageAssessment.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmGcpOfferingMdcContainersImageAssessment.Serialization.cs
    index c917433775d3..e19074831377 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmGcpOfferingMdcContainersImageAssessment.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmGcpOfferingMdcContainersImageAssessment.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DefenderCspmGcpOfferingMdcContainersImageAssessment : IUtf8
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8J
                     throw new FormatException($"The model {nameof(DefenderCspmGcpOfferingMdcContainersImageAssessment)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(IsEnabled))
                 {
                     writer.WritePropertyName("enabled"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8J
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             DefenderCspmGcpOfferingMdcContainersImageAssessment IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmGcpOfferingVmScanners.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmGcpOfferingVmScanners.Serialization.cs
    index cd3c899c18f3..3ae3bfc56cc3 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmGcpOfferingVmScanners.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmGcpOfferingVmScanners.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DefenderCspmGcpOfferingVmScanners : IUtf8JsonSerializable,
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer,
                     throw new FormatException($"The model {nameof(DefenderCspmGcpOfferingVmScanners)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(IsEnabled))
                 {
                     writer.WritePropertyName("enabled"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer,
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             DefenderCspmGcpOfferingVmScanners IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmGcpOfferingVmScannersConfiguration.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmGcpOfferingVmScannersConfiguration.Serialization.cs
    index cd062ee2afa3..0dd2bb1ebfb8 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmGcpOfferingVmScannersConfiguration.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmGcpOfferingVmScannersConfiguration.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DefenderCspmGcpOfferingVmScannersConfiguration : IUtf8JsonS
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWr
                     throw new FormatException($"The model {nameof(DefenderCspmGcpOfferingVmScannersConfiguration)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(ScanningMode))
                 {
                     writer.WritePropertyName("scanningMode"u8);
    @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWr
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             DefenderCspmGcpOfferingVmScannersConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderFoDatabasesAwsOfferingArcAutoProvisioningConfiguration.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderFoDatabasesAwsOfferingArcAutoProvisioningConfiguration.Serialization.cs
    index 31cc453cecc1..0d51e45b2885 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderFoDatabasesAwsOfferingArcAutoProvisioningConfiguration.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderFoDatabasesAwsOfferingArcAutoProvisioningConfiguration.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DefenderFoDatabasesAwsOfferingArcAutoProvisioningConfigurat
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.
                     throw new FormatException($"The model {nameof(DefenderFoDatabasesAwsOfferingArcAutoProvisioningConfiguration)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(Proxy))
                 {
                     writer.WritePropertyName("proxy"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             DefenderFoDatabasesAwsOfferingArcAutoProvisioningConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderFoDatabasesAwsOfferingDatabasesDspm.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderFoDatabasesAwsOfferingDatabasesDspm.Serialization.cs
    index f76377c93251..c5b9cb2d4406 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderFoDatabasesAwsOfferingDatabasesDspm.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderFoDatabasesAwsOfferingDatabasesDspm.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DefenderFoDatabasesAwsOfferingDatabasesDspm : IUtf8JsonSeri
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWrite
                     throw new FormatException($"The model {nameof(DefenderFoDatabasesAwsOfferingDatabasesDspm)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(IsEnabled))
                 {
                     writer.WritePropertyName("enabled"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWrite
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             DefenderFoDatabasesAwsOfferingDatabasesDspm IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOffering.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOffering.Serialization.cs
    index 23ece96212b7..a7aa49775b56 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOffering.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOffering.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DefenderForContainersAwsOffering : IUtf8JsonSerializable, I
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, M
                     throw new FormatException($"The model {nameof(DefenderForContainersAwsOffering)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(KubernetesService))
                 {
                     writer.WritePropertyName("kubernetesService"u8);
    @@ -86,29 +95,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M
                     writer.WritePropertyName("mdcContainersAgentlessDiscoveryK8s"u8);
                     writer.WriteObjectValue(MdcContainersAgentlessDiscoveryK8S, options);
                 }
    -            writer.WritePropertyName("offeringType"u8);
    -            writer.WriteStringValue(OfferingType.ToString());
    -            if (options.Format != "W" && Optional.IsDefined(Description))
    -            {
    -                writer.WritePropertyName("description"u8);
    -                writer.WriteStringValue(Description);
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             DefenderForContainersAwsOffering IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOfferingCloudWatchToKinesis.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOfferingCloudWatchToKinesis.Serialization.cs
    index 93ed7c19495d..cb53907b2489 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOfferingCloudWatchToKinesis.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOfferingCloudWatchToKinesis.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class DefenderForContainersAwsOfferingCloudWatchToKinesis : IUt
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8J
                     throw new FormatException($"The model {nameof(DefenderForContainersAwsOfferingCloudWatchToKinesis)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(CloudRoleArn))
                 {
                     writer.WritePropertyName("cloudRoleArn"u8);
    @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8J
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             DefenderForContainersAwsOfferingCloudWatchToKinesis IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOfferingContainerVulnerabilityAssessment.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOfferingContainerVulnerabilityAssessment.Serialization.cs
    index 55b36ef26d54..a7ff598cc665 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOfferingContainerVulnerabilityAssessment.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOfferingContainerVulnerabilityAssessment.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class DefenderForContainersAwsOfferingContainerVulnerabilityAss
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOfferingContainerVulnerabilityAssessmentTask.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOfferingContainerVulnerabilityAssessmentTask.Serialization.cs
    index cc8b2d78790c..b6c6bd7d09cb 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOfferingContainerVulnerabilityAssessmentTask.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOfferingContainerVulnerabilityAssessmentTask.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class DefenderForContainersAwsOfferingContainerVulnerabilityAss
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOfferingKinesisToS3.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOfferingKinesisToS3.Serialization.cs
    index 7dc8f8306276..a65c6c2da469 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOfferingKinesisToS3.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOfferingKinesisToS3.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class DefenderForContainersAwsOfferingKinesisToS3 : IUtf8JsonSe
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWrite
                     throw new FormatException($"The model {nameof(DefenderForContainersAwsOfferingKinesisToS3)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(CloudRoleArn))
                 {
                     writer.WritePropertyName("cloudRoleArn"u8);
    @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWrite
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             DefenderForContainersAwsOfferingKinesisToS3 IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOfferingKubernetesScubaReader.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOfferingKubernetesScubaReader.Serialization.cs
    index 60ee898ae91e..867eedd08d45 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOfferingKubernetesScubaReader.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOfferingKubernetesScubaReader.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class DefenderForContainersAwsOfferingKubernetesScubaReader : I
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf
                     throw new FormatException($"The model {nameof(DefenderForContainersAwsOfferingKubernetesScubaReader)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(CloudRoleArn))
                 {
                     writer.WritePropertyName("cloudRoleArn"u8);
    @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             DefenderForContainersAwsOfferingKubernetesScubaReader IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOfferingKubernetesService.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOfferingKubernetesService.Serialization.cs
    index 7207ab754c93..71de5d3d6257 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOfferingKubernetesService.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOfferingKubernetesService.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class DefenderForContainersAwsOfferingKubernetesService : IUtf8
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8Jso
                     throw new FormatException($"The model {nameof(DefenderForContainersAwsOfferingKubernetesService)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(CloudRoleArn))
                 {
                     writer.WritePropertyName("cloudRoleArn"u8);
    @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8Jso
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             DefenderForContainersAwsOfferingKubernetesService IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOfferingMdcContainersAgentlessDiscoveryK8S.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOfferingMdcContainersAgentlessDiscoveryK8S.Serialization.cs
    index 355945c315e3..d61eee622b50 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOfferingMdcContainersAgentlessDiscoveryK8S.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOfferingMdcContainersAgentlessDiscoveryK8S.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DefenderForContainersAwsOfferingMdcContainersAgentlessDisco
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOfferingMdcContainersImageAssessment.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOfferingMdcContainersImageAssessment.Serialization.cs
    index bec2c88735a6..8de5cc1a4a08 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOfferingMdcContainersImageAssessment.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOfferingMdcContainersImageAssessment.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DefenderForContainersAwsOfferingMdcContainersImageAssessmen
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Wr
                     throw new FormatException($"The model {nameof(DefenderForContainersAwsOfferingMdcContainersImageAssessment)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(IsEnabled))
                 {
                     writer.WritePropertyName("enabled"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Wr
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             DefenderForContainersAwsOfferingMdcContainersImageAssessment IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersGcpOffering.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersGcpOffering.Serialization.cs
    index a41640ca9ade..3a047d2e6447 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersGcpOffering.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersGcpOffering.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DefenderForContainersGcpOffering : IUtf8JsonSerializable, I
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, M
                     throw new FormatException($"The model {nameof(DefenderForContainersGcpOffering)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(NativeCloudConnection))
                 {
                     writer.WritePropertyName("nativeCloudConnection"u8);
    @@ -61,29 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M
                     writer.WritePropertyName("mdcContainersAgentlessDiscoveryK8s"u8);
                     writer.WriteObjectValue(MdcContainersAgentlessDiscoveryK8S, options);
                 }
    -            writer.WritePropertyName("offeringType"u8);
    -            writer.WriteStringValue(OfferingType.ToString());
    -            if (options.Format != "W" && Optional.IsDefined(Description))
    -            {
    -                writer.WritePropertyName("description"u8);
    -                writer.WriteStringValue(Description);
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             DefenderForContainersGcpOffering IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersGcpOfferingDataPipelineNativeCloudConnection.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersGcpOfferingDataPipelineNativeCloudConnection.Serialization.cs
    index ff888b68ea37..c821fb08c548 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersGcpOfferingDataPipelineNativeCloudConnection.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersGcpOfferingDataPipelineNativeCloudConnection.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DefenderForContainersGcpOfferingDataPipelineNativeCloudConn
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersGcpOfferingMdcContainersAgentlessDiscoveryK8S.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersGcpOfferingMdcContainersAgentlessDiscoveryK8S.Serialization.cs
    index 506d90fafce1..dca80f139b71 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersGcpOfferingMdcContainersAgentlessDiscoveryK8S.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersGcpOfferingMdcContainersAgentlessDiscoveryK8S.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DefenderForContainersGcpOfferingMdcContainersAgentlessDisco
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersGcpOfferingMdcContainersImageAssessment.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersGcpOfferingMdcContainersImageAssessment.Serialization.cs
    index ef5eac03c46c..f285bb4374ae 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersGcpOfferingMdcContainersImageAssessment.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersGcpOfferingMdcContainersImageAssessment.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DefenderForContainersGcpOfferingMdcContainersImageAssessmen
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Wr
                     throw new FormatException($"The model {nameof(DefenderForContainersGcpOfferingMdcContainersImageAssessment)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(IsEnabled))
                 {
                     writer.WritePropertyName("enabled"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Wr
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             DefenderForContainersGcpOfferingMdcContainersImageAssessment IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersGcpOfferingNativeCloudConnection.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersGcpOfferingNativeCloudConnection.Serialization.cs
    index 5101bb9f3516..696fde11cf84 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersGcpOfferingNativeCloudConnection.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersGcpOfferingNativeCloudConnection.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DefenderForContainersGcpOfferingNativeCloudConnection : IUt
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf
                     throw new FormatException($"The model {nameof(DefenderForContainersGcpOfferingNativeCloudConnection)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(ServiceAccountEmailAddress))
                 {
                     writer.WritePropertyName("serviceAccountEmailAddress"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             DefenderForContainersGcpOfferingNativeCloudConnection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDatabasesAwsOffering.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDatabasesAwsOffering.Serialization.cs
    index 0536a01e9dd9..2acf79d37560 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDatabasesAwsOffering.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDatabasesAwsOffering.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DefenderForDatabasesAwsOffering : IUtf8JsonSerializable, IJ
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo
                     throw new FormatException($"The model {nameof(DefenderForDatabasesAwsOffering)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(ArcAutoProvisioning))
                 {
                     writer.WritePropertyName("arcAutoProvisioning"u8);
    @@ -41,29 +50,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo
                     writer.WritePropertyName("databasesDspm"u8);
                     writer.WriteObjectValue(DatabasesDspm, options);
                 }
    -            writer.WritePropertyName("offeringType"u8);
    -            writer.WriteStringValue(OfferingType.ToString());
    -            if (options.Format != "W" && Optional.IsDefined(Description))
    -            {
    -                writer.WritePropertyName("description"u8);
    -                writer.WriteStringValue(Description);
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             DefenderForDatabasesAwsOffering IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDatabasesAwsOfferingArcAutoProvisioning.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDatabasesAwsOfferingArcAutoProvisioning.Serialization.cs
    index fb3cc7d9f506..67545a37ef60 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDatabasesAwsOfferingArcAutoProvisioning.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDatabasesAwsOfferingArcAutoProvisioning.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DefenderForDatabasesAwsOfferingArcAutoProvisioning : IUtf8J
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8Js
                     throw new FormatException($"The model {nameof(DefenderForDatabasesAwsOfferingArcAutoProvisioning)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(IsEnabled))
                 {
                     writer.WritePropertyName("enabled"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8Js
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             DefenderForDatabasesAwsOfferingArcAutoProvisioning IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDatabasesAwsOfferingRds.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDatabasesAwsOfferingRds.Serialization.cs
    index 2d024e191a20..e7c850d65034 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDatabasesAwsOfferingRds.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDatabasesAwsOfferingRds.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DefenderForDatabasesAwsOfferingRds : IUtf8JsonSerializable,
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer,
                     throw new FormatException($"The model {nameof(DefenderForDatabasesAwsOfferingRds)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(IsEnabled))
                 {
                     writer.WritePropertyName("enabled"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer,
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             DefenderForDatabasesAwsOfferingRds IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDatabasesGcpOffering.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDatabasesGcpOffering.Serialization.cs
    index cdea16fdbbc1..9e2d29460d35 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDatabasesGcpOffering.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDatabasesGcpOffering.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DefenderForDatabasesGcpOffering : IUtf8JsonSerializable, IJ
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo
                     throw new FormatException($"The model {nameof(DefenderForDatabasesGcpOffering)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(ArcAutoProvisioning))
                 {
                     writer.WritePropertyName("arcAutoProvisioning"u8);
    @@ -36,29 +45,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo
                     writer.WritePropertyName("defenderForDatabasesArcAutoProvisioning"u8);
                     writer.WriteObjectValue(DefenderForDatabasesArcAutoProvisioning, options);
                 }
    -            writer.WritePropertyName("offeringType"u8);
    -            writer.WriteStringValue(OfferingType.ToString());
    -            if (options.Format != "W" && Optional.IsDefined(Description))
    -            {
    -                writer.WritePropertyName("description"u8);
    -                writer.WriteStringValue(Description);
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             DefenderForDatabasesGcpOffering IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDatabasesGcpOfferingArcAutoProvisioning.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDatabasesGcpOfferingArcAutoProvisioning.Serialization.cs
    index 997dd13c124e..8dd8f036f704 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDatabasesGcpOfferingArcAutoProvisioning.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDatabasesGcpOfferingArcAutoProvisioning.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DefenderForDatabasesGcpOfferingArcAutoProvisioning : IUtf8J
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8Js
                     throw new FormatException($"The model {nameof(DefenderForDatabasesGcpOfferingArcAutoProvisioning)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(IsEnabled))
                 {
                     writer.WritePropertyName("enabled"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8Js
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             DefenderForDatabasesGcpOfferingArcAutoProvisioning IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDatabasesGcpOfferingArcAutoProvisioningConfiguration.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDatabasesGcpOfferingArcAutoProvisioningConfiguration.Serialization.cs
    index fbf37309010e..f8a620d6d782 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDatabasesGcpOfferingArcAutoProvisioningConfiguration.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDatabasesGcpOfferingArcAutoProvisioningConfiguration.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DefenderForDatabasesGcpOfferingArcAutoProvisioningConfigura
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel
                     throw new FormatException($"The model {nameof(DefenderForDatabasesGcpOfferingArcAutoProvisioningConfiguration)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(Proxy))
                 {
                     writer.WritePropertyName("proxy"u8);
    @@ -51,7 +59,6 @@ void IJsonModel
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             DefenderForDatabasesGcpOfferingArcAutoProvisioningConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDevOpsAzureDevOpsOffering.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDevOpsAzureDevOpsOffering.Serialization.cs
    index 7ba7d4354811..bdd13304193a 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDevOpsAzureDevOpsOffering.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDevOpsAzureDevOpsOffering.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DefenderForDevOpsAzureDevOpsOffering : IUtf8JsonSerializabl
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,30 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter write
                     throw new FormatException($"The model {nameof(DefenderForDevOpsAzureDevOpsOffering)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            writer.WritePropertyName("offeringType"u8);
    -            writer.WriteStringValue(OfferingType.ToString());
    -            if (options.Format != "W" && Optional.IsDefined(Description))
    -            {
    -                writer.WritePropertyName("description"u8);
    -                writer.WriteStringValue(Description);
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             DefenderForDevOpsAzureDevOpsOffering IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDevOpsGitLabOffering.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDevOpsGitLabOffering.Serialization.cs
    index d212de7148fe..16cd740f1456 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDevOpsGitLabOffering.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDevOpsGitLabOffering.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DefenderForDevOpsGitLabOffering : IUtf8JsonSerializable, IJ
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,30 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo
                     throw new FormatException($"The model {nameof(DefenderForDevOpsGitLabOffering)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            writer.WritePropertyName("offeringType"u8);
    -            writer.WriteStringValue(OfferingType.ToString());
    -            if (options.Format != "W" && Optional.IsDefined(Description))
    -            {
    -                writer.WritePropertyName("description"u8);
    -                writer.WriteStringValue(Description);
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             DefenderForDevOpsGitLabOffering IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDevOpsGithubOffering.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDevOpsGithubOffering.Serialization.cs
    index fd80eebf183d..232320af1cc5 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDevOpsGithubOffering.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDevOpsGithubOffering.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DefenderForDevOpsGithubOffering : IUtf8JsonSerializable, IJ
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,30 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo
                     throw new FormatException($"The model {nameof(DefenderForDevOpsGithubOffering)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            writer.WritePropertyName("offeringType"u8);
    -            writer.WriteStringValue(OfferingType.ToString());
    -            if (options.Format != "W" && Optional.IsDefined(Description))
    -            {
    -                writer.WritePropertyName("description"u8);
    -                writer.WriteStringValue(Description);
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             DefenderForDevOpsGithubOffering IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOffering.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOffering.Serialization.cs
    index 3e6fd54064eb..460819a68188 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOffering.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOffering.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DefenderForServersAwsOffering : IUtf8JsonSerializable, IJso
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode
                     throw new FormatException($"The model {nameof(DefenderForServersAwsOffering)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(DefenderForServers))
                 {
                     writer.WritePropertyName("defenderForServers"u8);
    @@ -56,29 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode
                     writer.WritePropertyName("vmScanners"u8);
                     writer.WriteObjectValue(VmScanners, options);
                 }
    -            writer.WritePropertyName("offeringType"u8);
    -            writer.WriteStringValue(OfferingType.ToString());
    -            if (options.Format != "W" && Optional.IsDefined(Description))
    -            {
    -                writer.WritePropertyName("description"u8);
    -                writer.WriteStringValue(Description);
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             DefenderForServersAwsOffering IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOfferingArcAutoProvisioning.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOfferingArcAutoProvisioning.Serialization.cs
    index f188625ace5e..2787085ff6ea 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOfferingArcAutoProvisioning.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOfferingArcAutoProvisioning.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DefenderForServersAwsOfferingArcAutoProvisioning : IUtf8Jso
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8Json
                     throw new FormatException($"The model {nameof(DefenderForServersAwsOfferingArcAutoProvisioning)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(IsEnabled))
                 {
                     writer.WritePropertyName("enabled"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8Json
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             DefenderForServersAwsOfferingArcAutoProvisioning IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOfferingArcAutoProvisioningConfiguration.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOfferingArcAutoProvisioningConfiguration.Serialization.cs
    index 54a659427b27..6a32ce4db958 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOfferingArcAutoProvisioningConfiguration.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOfferingArcAutoProvisioningConfiguration.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DefenderForServersAwsOfferingArcAutoProvisioningConfigurati
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.W
                     throw new FormatException($"The model {nameof(DefenderForServersAwsOfferingArcAutoProvisioningConfiguration)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(Proxy))
                 {
                     writer.WritePropertyName("proxy"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.W
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             DefenderForServersAwsOfferingArcAutoProvisioningConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOfferingMdeAutoProvisioning.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOfferingMdeAutoProvisioning.Serialization.cs
    index 3f98cab136c8..0f695515b901 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOfferingMdeAutoProvisioning.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOfferingMdeAutoProvisioning.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DefenderForServersAwsOfferingMdeAutoProvisioning : IUtf8Jso
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8Json
                     throw new FormatException($"The model {nameof(DefenderForServersAwsOfferingMdeAutoProvisioning)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(IsEnabled))
                 {
                     writer.WritePropertyName("enabled"u8);
    @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8Json
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             DefenderForServersAwsOfferingMdeAutoProvisioning IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOfferingSubPlan.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOfferingSubPlan.Serialization.cs
    index 4be4e000d411..b5a0e6b7e066 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOfferingSubPlan.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOfferingSubPlan.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class DefenderForServersAwsOfferingSubPlan : IUtf8JsonSerializa
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter write
                     throw new FormatException($"The model {nameof(DefenderForServersAwsOfferingSubPlan)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(AvailableSubPlanType))
                 {
                     writer.WritePropertyName("type"u8);
    @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter write
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             DefenderForServersAwsOfferingSubPlan IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOfferingVmScanners.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOfferingVmScanners.Serialization.cs
    index 1c39d563361e..083953dd0dc6 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOfferingVmScanners.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOfferingVmScanners.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DefenderForServersAwsOfferingVmScanners : IUtf8JsonSerializ
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wr
                     throw new FormatException($"The model {nameof(DefenderForServersAwsOfferingVmScanners)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(IsEnabled))
                 {
                     writer.WritePropertyName("enabled"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter wr
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             DefenderForServersAwsOfferingVmScanners IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOfferingVmScannersConfiguration.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOfferingVmScannersConfiguration.Serialization.cs
    index 5ab99de91872..a08586f0b906 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOfferingVmScannersConfiguration.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOfferingVmScannersConfiguration.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DefenderForServersAwsOfferingVmScannersConfiguration : IUtf
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8
                     throw new FormatException($"The model {nameof(DefenderForServersAwsOfferingVmScannersConfiguration)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(CloudRoleArn))
                 {
                     writer.WritePropertyName("cloudRoleArn"u8);
    @@ -62,7 +70,6 @@ void IJsonModel.Write(Utf8
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             DefenderForServersAwsOfferingVmScannersConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOfferingVulnerabilityAssessmentAutoProvisioning.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOfferingVulnerabilityAssessmentAutoProvisioning.Serialization.cs
    index 981e2dda29b8..ff7a29ffd954 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOfferingVulnerabilityAssessmentAutoProvisioning.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOfferingVulnerabilityAssessmentAutoProvisioning.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DefenderForServersAwsOfferingVulnerabilityAssessmentAutoPro
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOfferingVulnerabilityAssessmentAutoProvisioningConfiguration.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOfferingVulnerabilityAssessmentAutoProvisioningConfiguration.Serialization.cs
    index f56e051ea21f..8c030403da16 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOfferingVulnerabilityAssessmentAutoProvisioningConfiguration.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOfferingVulnerabilityAssessmentAutoProvisioningConfiguration.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class DefenderForServersAwsOfferingVulnerabilityAssessmentAutoP
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOffering.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOffering.Serialization.cs
    index b0217a9a7893..c12782cde2c4 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOffering.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOffering.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DefenderForServersGcpOffering : IUtf8JsonSerializable, IJso
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode
                     throw new FormatException($"The model {nameof(DefenderForServersGcpOffering)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(DefenderForServers))
                 {
                     writer.WritePropertyName("defenderForServers"u8);
    @@ -56,29 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode
                     writer.WritePropertyName("vmScanners"u8);
                     writer.WriteObjectValue(VmScanners, options);
                 }
    -            writer.WritePropertyName("offeringType"u8);
    -            writer.WriteStringValue(OfferingType.ToString());
    -            if (options.Format != "W" && Optional.IsDefined(Description))
    -            {
    -                writer.WritePropertyName("description"u8);
    -                writer.WriteStringValue(Description);
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             DefenderForServersGcpOffering IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOfferingArcAutoProvisioning.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOfferingArcAutoProvisioning.Serialization.cs
    index eec3edd9d661..ba9a40aa85ff 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOfferingArcAutoProvisioning.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOfferingArcAutoProvisioning.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DefenderForServersGcpOfferingArcAutoProvisioning : IUtf8Jso
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8Json
                     throw new FormatException($"The model {nameof(DefenderForServersGcpOfferingArcAutoProvisioning)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(IsEnabled))
                 {
                     writer.WritePropertyName("enabled"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8Json
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             DefenderForServersGcpOfferingArcAutoProvisioning IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOfferingArcAutoProvisioningConfiguration.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOfferingArcAutoProvisioningConfiguration.Serialization.cs
    index a78cea8b2689..7702cd026796 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOfferingArcAutoProvisioningConfiguration.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOfferingArcAutoProvisioningConfiguration.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DefenderForServersGcpOfferingArcAutoProvisioningConfigurati
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.W
                     throw new FormatException($"The model {nameof(DefenderForServersGcpOfferingArcAutoProvisioningConfiguration)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(Proxy))
                 {
                     writer.WritePropertyName("proxy"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.W
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             DefenderForServersGcpOfferingArcAutoProvisioningConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOfferingMdeAutoProvisioning.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOfferingMdeAutoProvisioning.Serialization.cs
    index a055330b39f6..d0dd7326e091 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOfferingMdeAutoProvisioning.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOfferingMdeAutoProvisioning.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DefenderForServersGcpOfferingMdeAutoProvisioning : IUtf8Jso
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8Json
                     throw new FormatException($"The model {nameof(DefenderForServersGcpOfferingMdeAutoProvisioning)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(IsEnabled))
                 {
                     writer.WritePropertyName("enabled"u8);
    @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8Json
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             DefenderForServersGcpOfferingMdeAutoProvisioning IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOfferingSubPlan.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOfferingSubPlan.Serialization.cs
    index d0caf590f66f..867f4e61ba4c 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOfferingSubPlan.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOfferingSubPlan.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class DefenderForServersGcpOfferingSubPlan : IUtf8JsonSerializa
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter write
                     throw new FormatException($"The model {nameof(DefenderForServersGcpOfferingSubPlan)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(AvailableSubPlanType))
                 {
                     writer.WritePropertyName("type"u8);
    @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter write
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             DefenderForServersGcpOfferingSubPlan IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOfferingVmScanners.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOfferingVmScanners.Serialization.cs
    index 4abb46894346..150412b97ce5 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOfferingVmScanners.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOfferingVmScanners.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DefenderForServersGcpOfferingVmScanners : IUtf8JsonSerializ
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wr
                     throw new FormatException($"The model {nameof(DefenderForServersGcpOfferingVmScanners)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(IsEnabled))
                 {
                     writer.WritePropertyName("enabled"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter wr
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             DefenderForServersGcpOfferingVmScanners IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOfferingVmScannersConfiguration.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOfferingVmScannersConfiguration.Serialization.cs
    index 2b95efa413e0..16296f7fe757 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOfferingVmScannersConfiguration.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOfferingVmScannersConfiguration.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DefenderForServersGcpOfferingVmScannersConfiguration : IUtf
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8
                     throw new FormatException($"The model {nameof(DefenderForServersGcpOfferingVmScannersConfiguration)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(ScanningMode))
                 {
                     writer.WritePropertyName("scanningMode"u8);
    @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             DefenderForServersGcpOfferingVmScannersConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOfferingVulnerabilityAssessmentAutoProvisioning.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOfferingVulnerabilityAssessmentAutoProvisioning.Serialization.cs
    index 9a80b45a471e..85c73c8ebd0c 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOfferingVulnerabilityAssessmentAutoProvisioning.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOfferingVulnerabilityAssessmentAutoProvisioning.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DefenderForServersGcpOfferingVulnerabilityAssessmentAutoPro
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOfferingVulnerabilityAssessmentAutoProvisioningConfiguration.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOfferingVulnerabilityAssessmentAutoProvisioningConfiguration.Serialization.cs
    index 0994c3eda655..a0bd8cfcef02 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOfferingVulnerabilityAssessmentAutoProvisioningConfiguration.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOfferingVulnerabilityAssessmentAutoProvisioningConfiguration.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class DefenderForServersGcpOfferingVulnerabilityAssessmentAutoP
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DenylistCustomAlertRule.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DenylistCustomAlertRule.Serialization.cs
    index 1e8bc6fad3b5..c3253fd29116 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DenylistCustomAlertRule.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DenylistCustomAlertRule.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DenylistCustomAlertRule : IUtf8JsonSerializable, IJsonModel
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade
                     throw new FormatException($"The model {nameof(DenylistCustomAlertRule)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 writer.WritePropertyName("denylistValues"u8);
                 writer.WriteStartArray();
                 foreach (var item in DenylistValues)
    @@ -33,41 +42,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade
                     writer.WriteStringValue(item);
                 }
                 writer.WriteEndArray();
    -            if (options.Format != "W" && Optional.IsDefined(ValueType))
    -            {
    -                writer.WritePropertyName("valueType"u8);
    -                writer.WriteStringValue(ValueType.Value.ToString());
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(DisplayName))
    -            {
    -                writer.WritePropertyName("displayName"u8);
    -                writer.WriteStringValue(DisplayName);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(Description))
    -            {
    -                writer.WritePropertyName("description"u8);
    -                writer.WriteStringValue(Description);
    -            }
    -            writer.WritePropertyName("isEnabled"u8);
    -            writer.WriteBooleanValue(IsEnabled);
    -            writer.WritePropertyName("ruleType"u8);
    -            writer.WriteStringValue(RuleType);
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             DenylistCustomAlertRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DevOpsAuthorization.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DevOpsAuthorization.Serialization.cs
    index 0797ea0adef6..1e99cfed2523 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DevOpsAuthorization.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DevOpsAuthorization.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class DevOpsAuthorization : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri
                     throw new FormatException($"The model {nameof(DevOpsAuthorization)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(Code))
                 {
                     writer.WritePropertyName("code"u8);
    @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             DevOpsAuthorization IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DevOpsConfigurationListResponse.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DevOpsConfigurationListResponse.Serialization.cs
    index af6ab1b2b20f..0975c4eae641 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DevOpsConfigurationListResponse.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DevOpsConfigurationListResponse.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class DevOpsConfigurationListResponse : IUtf8JsonSerializable,
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo
                     throw new FormatException($"The model {nameof(DevOpsConfigurationListResponse)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsCollectionDefined(Value))
                 {
                     writer.WritePropertyName("value"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             DevOpsConfigurationListResponse IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DevOpsConfigurationProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DevOpsConfigurationProperties.Serialization.cs
    index e8af4c8cf7c6..9ef58dc46249 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DevOpsConfigurationProperties.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DevOpsConfigurationProperties.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DevOpsConfigurationProperties : IUtf8JsonSerializable, IJso
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode
                     throw new FormatException($"The model {nameof(DevOpsConfigurationProperties)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (options.Format != "W" && Optional.IsDefined(ProvisioningStatusMessage))
                 {
                     writer.WritePropertyName("provisioningStatusMessage"u8);
    @@ -76,7 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             DevOpsConfigurationProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DevOpsOrgProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DevOpsOrgProperties.Serialization.cs
    index 2469aa1e3ef8..6a46671182ea 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DevOpsOrgProperties.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DevOpsOrgProperties.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DevOpsOrgProperties : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri
                     throw new FormatException($"The model {nameof(DevOpsOrgProperties)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (options.Format != "W" && Optional.IsDefined(ProvisioningStatusMessage))
                 {
                     writer.WritePropertyName("provisioningStatusMessage"u8);
    @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             DevOpsOrgProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DevOpsProjectProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DevOpsProjectProperties.Serialization.cs
    index 86451f775725..3de42ebc20b6 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DevOpsProjectProperties.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DevOpsProjectProperties.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DevOpsProjectProperties : IUtf8JsonSerializable, IJsonModel
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade
                     throw new FormatException($"The model {nameof(DevOpsProjectProperties)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (options.Format != "W" && Optional.IsDefined(ProvisioningStatusMessage))
                 {
                     writer.WritePropertyName("provisioningStatusMessage"u8);
    @@ -76,7 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             DevOpsProjectProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DevOpsRepositoryProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DevOpsRepositoryProperties.Serialization.cs
    index 8141b5ac645e..93d17ae02df7 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DevOpsRepositoryProperties.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DevOpsRepositoryProperties.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DevOpsRepositoryProperties : IUtf8JsonSerializable, IJsonMo
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe
                     throw new FormatException($"The model {nameof(DevOpsRepositoryProperties)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (options.Format != "W" && Optional.IsDefined(ProvisioningStatusMessage))
                 {
                     writer.WritePropertyName("provisioningStatusMessage"u8);
    @@ -91,7 +99,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             DevOpsRepositoryProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DeviceSecurityGroupList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DeviceSecurityGroupList.Serialization.cs
    index d5601d56a14d..be9fb8139c4e 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DeviceSecurityGroupList.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DeviceSecurityGroupList.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class DeviceSecurityGroupList : IUtf8JsonSerializable, IJsonMod
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade
                     throw new FormatException($"The model {nameof(DeviceSecurityGroupList)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsCollectionDefined(Value))
                 {
                     writer.WritePropertyName("value"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             DeviceSecurityGroupList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DirectMethodInvokesNotInAllowedRange.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DirectMethodInvokesNotInAllowedRange.Serialization.cs
    index 740abc25ab94..83bbb09c9b76 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DirectMethodInvokesNotInAllowedRange.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DirectMethodInvokesNotInAllowedRange.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DirectMethodInvokesNotInAllowedRange : IUtf8JsonSerializabl
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,43 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter write
                     throw new FormatException($"The model {nameof(DirectMethodInvokesNotInAllowedRange)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            writer.WritePropertyName("timeWindowSize"u8);
    -            writer.WriteStringValue(TimeWindowSize, "P");
    -            writer.WritePropertyName("minThreshold"u8);
    -            writer.WriteNumberValue(MinThreshold);
    -            writer.WritePropertyName("maxThreshold"u8);
    -            writer.WriteNumberValue(MaxThreshold);
    -            if (options.Format != "W" && Optional.IsDefined(DisplayName))
    -            {
    -                writer.WritePropertyName("displayName"u8);
    -                writer.WriteStringValue(DisplayName);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(Description))
    -            {
    -                writer.WritePropertyName("description"u8);
    -                writer.WriteStringValue(Description);
    -            }
    -            writer.WritePropertyName("isEnabled"u8);
    -            writer.WriteBooleanValue(IsEnabled);
    -            writer.WritePropertyName("ruleType"u8);
    -            writer.WriteStringValue(RuleType);
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             DirectMethodInvokesNotInAllowedRange IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DiscoveredSecuritySolution.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DiscoveredSecuritySolution.Serialization.cs
    index f7cc39c19d8c..91587a103c3f 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DiscoveredSecuritySolution.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DiscoveredSecuritySolution.Serialization.cs
    @@ -19,6 +19,15 @@ public partial class DiscoveredSecuritySolution : IUtf8JsonSerializable, IJsonMo
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -26,32 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe
                     throw new FormatException($"The model {nameof(DiscoveredSecuritySolution)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (options.Format != "W" && Optional.IsDefined(Location))
                 {
                     writer.WritePropertyName("location"u8);
                     writer.WriteStringValue(Location.Value);
                 }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("id"u8);
    -                writer.WriteStringValue(Id);
    -            }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("name"u8);
    -                writer.WriteStringValue(Name);
    -            }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("type"u8);
    -                writer.WriteStringValue(ResourceType);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(SystemData))
    -            {
    -                writer.WritePropertyName("systemData"u8);
    -                JsonSerializer.Serialize(writer, SystemData);
    -            }
                 writer.WritePropertyName("properties"u8);
                 writer.WriteStartObject();
                 writer.WritePropertyName("securityFamily"u8);
    @@ -63,22 +52,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe
                 writer.WritePropertyName("sku"u8);
                 writer.WriteStringValue(Sku);
                 writer.WriteEndObject();
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             DiscoveredSecuritySolution IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DiscoveredSecuritySolutionList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DiscoveredSecuritySolutionList.Serialization.cs
    index 44c5a05db313..9f2b95affe34 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DiscoveredSecuritySolutionList.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DiscoveredSecuritySolutionList.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class DiscoveredSecuritySolutionList : IUtf8JsonSerializable, I
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod
                     throw new FormatException($"The model {nameof(DiscoveredSecuritySolutionList)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsCollectionDefined(Value))
                 {
                     writer.WritePropertyName("value"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             DiscoveredSecuritySolutionList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/EffectiveNetworkSecurityGroups.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/EffectiveNetworkSecurityGroups.Serialization.cs
    index a90038e3917c..feeeaef2bce8 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/EffectiveNetworkSecurityGroups.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/EffectiveNetworkSecurityGroups.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class EffectiveNetworkSecurityGroups : IUtf8JsonSerializable, IJs
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod
                     throw new FormatException($"The model {nameof(EffectiveNetworkSecurityGroups)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(NetworkInterface))
                 {
                     writer.WritePropertyName("networkInterface"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             EffectiveNetworkSecurityGroups IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/EnvironmentDetails.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/EnvironmentDetails.Serialization.cs
    index 12674655cc5d..c80fcc2c7c82 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/EnvironmentDetails.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/EnvironmentDetails.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class EnvironmentDetails : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit
                     throw new FormatException($"The model {nameof(EnvironmentDetails)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(NativeResourceId))
                 {
                     writer.WritePropertyName("nativeResourceId"u8);
    @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             EnvironmentDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ExecuteGovernanceRuleParams.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ExecuteGovernanceRuleParams.Serialization.cs
    index e9c7907d55ef..9167c3918086 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ExecuteGovernanceRuleParams.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ExecuteGovernanceRuleParams.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class ExecuteGovernanceRuleParams : IUtf8JsonSerializable, IJsonM
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR
                     throw new FormatException($"The model {nameof(ExecuteGovernanceRuleParams)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(Override))
                 {
                     writer.WritePropertyName("override"u8);
    @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             ExecuteGovernanceRuleParams IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ExtensionOperationStatus.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ExtensionOperationStatus.Serialization.cs
    index a778564be26e..473b655423ee 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ExtensionOperationStatus.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ExtensionOperationStatus.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class ExtensionOperationStatus : IUtf8JsonSerializable, IJsonMode
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead
                     throw new FormatException($"The model {nameof(ExtensionOperationStatus)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(Code))
                 {
                     writer.WritePropertyName("code"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             ExtensionOperationStatus IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ExternalSecuritySolution.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ExternalSecuritySolution.Serialization.cs
    index 6b339a411a33..3a0fd43d9cce 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ExternalSecuritySolution.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ExternalSecuritySolution.Serialization.cs
    @@ -17,6 +17,15 @@ public partial class ExternalSecuritySolution : IUtf8JsonSerializable, IJsonMode
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -24,7 +33,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead
                     throw new FormatException($"The model {nameof(ExternalSecuritySolution)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Kind != null)
                 {
                     writer.WritePropertyName("kind"u8);
    @@ -39,42 +48,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead
                     writer.WritePropertyName("location"u8);
                     writer.WriteStringValue(Location.Value);
                 }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("id"u8);
    -                writer.WriteStringValue(Id);
    -            }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("name"u8);
    -                writer.WriteStringValue(Name);
    -            }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("type"u8);
    -                writer.WriteStringValue(ResourceType);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(SystemData))
    -            {
    -                writer.WritePropertyName("systemData"u8);
    -                JsonSerializer.Serialize(writer, SystemData);
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             ExternalSecuritySolution IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ExternalSecuritySolutionList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ExternalSecuritySolutionList.Serialization.cs
    index 8993346d77fa..acacd54d362f 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ExternalSecuritySolutionList.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ExternalSecuritySolutionList.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class ExternalSecuritySolutionList : IUtf8JsonSerializable, IJs
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model
                     throw new FormatException($"The model {nameof(ExternalSecuritySolutionList)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsCollectionDefined(Value))
                 {
                     writer.WritePropertyName("value"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             ExternalSecuritySolutionList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ExternalSecuritySolutionProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ExternalSecuritySolutionProperties.Serialization.cs
    index fd56c4c57843..79674de8720b 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ExternalSecuritySolutionProperties.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ExternalSecuritySolutionProperties.Serialization.cs
    @@ -19,6 +19,15 @@ public partial class ExternalSecuritySolutionProperties : IUtf8JsonSerializable,
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer,
                     throw new FormatException($"The model {nameof(ExternalSecuritySolutionProperties)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(DeviceVendor))
                 {
                     writer.WritePropertyName("deviceVendor"u8);
    @@ -54,7 +62,6 @@ void IJsonModel.Write(Utf8JsonWriter writer,
                     }
     #endif
                 }
    -            writer.WriteEndObject();
             }
     
             ExternalSecuritySolutionProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/FailedLocalLoginsNotInAllowedRange.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/FailedLocalLoginsNotInAllowedRange.Serialization.cs
    index 7411c8fc48ac..adda12ad3c68 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/FailedLocalLoginsNotInAllowedRange.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/FailedLocalLoginsNotInAllowedRange.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class FailedLocalLoginsNotInAllowedRange : IUtf8JsonSerializable,
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,43 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer,
                     throw new FormatException($"The model {nameof(FailedLocalLoginsNotInAllowedRange)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            writer.WritePropertyName("timeWindowSize"u8);
    -            writer.WriteStringValue(TimeWindowSize, "P");
    -            writer.WritePropertyName("minThreshold"u8);
    -            writer.WriteNumberValue(MinThreshold);
    -            writer.WritePropertyName("maxThreshold"u8);
    -            writer.WriteNumberValue(MaxThreshold);
    -            if (options.Format != "W" && Optional.IsDefined(DisplayName))
    -            {
    -                writer.WritePropertyName("displayName"u8);
    -                writer.WriteStringValue(DisplayName);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(Description))
    -            {
    -                writer.WritePropertyName("description"u8);
    -                writer.WriteStringValue(Description);
    -            }
    -            writer.WritePropertyName("isEnabled"u8);
    -            writer.WriteBooleanValue(IsEnabled);
    -            writer.WritePropertyName("ruleType"u8);
    -            writer.WriteStringValue(RuleType);
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             FailedLocalLoginsNotInAllowedRange IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/FileUploadsNotInAllowedRange.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/FileUploadsNotInAllowedRange.Serialization.cs
    index 5919ea76565b..3d4395a60e61 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/FileUploadsNotInAllowedRange.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/FileUploadsNotInAllowedRange.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class FileUploadsNotInAllowedRange : IUtf8JsonSerializable, IJson
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,43 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model
                     throw new FormatException($"The model {nameof(FileUploadsNotInAllowedRange)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            writer.WritePropertyName("timeWindowSize"u8);
    -            writer.WriteStringValue(TimeWindowSize, "P");
    -            writer.WritePropertyName("minThreshold"u8);
    -            writer.WriteNumberValue(MinThreshold);
    -            writer.WritePropertyName("maxThreshold"u8);
    -            writer.WriteNumberValue(MaxThreshold);
    -            if (options.Format != "W" && Optional.IsDefined(DisplayName))
    -            {
    -                writer.WritePropertyName("displayName"u8);
    -                writer.WriteStringValue(DisplayName);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(Description))
    -            {
    -                writer.WritePropertyName("description"u8);
    -                writer.WriteStringValue(Description);
    -            }
    -            writer.WritePropertyName("isEnabled"u8);
    -            writer.WriteBooleanValue(IsEnabled);
    -            writer.WritePropertyName("ruleType"u8);
    -            writer.WriteStringValue(RuleType);
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             FileUploadsNotInAllowedRange IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GcpCredentialsDetailsProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GcpCredentialsDetailsProperties.Serialization.cs
    index fa0780963564..08dc869d989f 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GcpCredentialsDetailsProperties.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GcpCredentialsDetailsProperties.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class GcpCredentialsDetailsProperties : IUtf8JsonSerializable, IJ
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo
                     throw new FormatException($"The model {nameof(GcpCredentialsDetailsProperties)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 writer.WritePropertyName("organizationId"u8);
                 writer.WriteStringValue(OrganizationId);
                 writer.WritePropertyName("type"u8);
    @@ -48,39 +57,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo
                 writer.WriteStringValue(AuthProviderX509CertUri.AbsoluteUri);
                 writer.WritePropertyName("clientX509CertUrl"u8);
                 writer.WriteStringValue(ClientX509CertUri.AbsoluteUri);
    -            if (options.Format != "W" && Optional.IsDefined(AuthenticationProvisioningState))
    -            {
    -                writer.WritePropertyName("authenticationProvisioningState"u8);
    -                writer.WriteStringValue(AuthenticationProvisioningState.Value.ToString());
    -            }
    -            if (options.Format != "W" && Optional.IsCollectionDefined(GrantedPermissions))
    -            {
    -                writer.WritePropertyName("grantedPermissions"u8);
    -                writer.WriteStartArray();
    -                foreach (var item in GrantedPermissions)
    -                {
    -                    writer.WriteStringValue(item.ToString());
    -                }
    -                writer.WriteEndArray();
    -            }
    -            writer.WritePropertyName("authenticationType"u8);
    -            writer.WriteStringValue(AuthenticationType.ToString());
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             GcpCredentialsDetailsProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GcpDefenderForDatabasesArcAutoProvisioning.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GcpDefenderForDatabasesArcAutoProvisioning.Serialization.cs
    index 0bacd8a5f797..01191f401847 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GcpDefenderForDatabasesArcAutoProvisioning.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GcpDefenderForDatabasesArcAutoProvisioning.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class GcpDefenderForDatabasesArcAutoProvisioning : IUtf8JsonSeria
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter
                     throw new FormatException($"The model {nameof(GcpDefenderForDatabasesArcAutoProvisioning)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(ServiceAccountEmailAddress))
                 {
                     writer.WritePropertyName("serviceAccountEmailAddress"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             GcpDefenderForDatabasesArcAutoProvisioning IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GcpDefenderForServersInfo.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GcpDefenderForServersInfo.Serialization.cs
    index e7986e2bc49f..3ba1a5adfb36 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GcpDefenderForServersInfo.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GcpDefenderForServersInfo.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class GcpDefenderForServersInfo : IUtf8JsonSerializable, IJsonMod
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea
                     throw new FormatException($"The model {nameof(GcpDefenderForServersInfo)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(WorkloadIdentityProviderId))
                 {
                     writer.WritePropertyName("workloadIdentityProviderId"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             GcpDefenderForServersInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GcpMemberOrganizationalInfo.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GcpMemberOrganizationalInfo.Serialization.cs
    index bef76af6cb07..80623d3dc3f2 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GcpMemberOrganizationalInfo.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GcpMemberOrganizationalInfo.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class GcpMemberOrganizationalInfo : IUtf8JsonSerializable, IJsonM
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR
                     throw new FormatException($"The model {nameof(GcpMemberOrganizationalInfo)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(ParentHierarchyId))
                 {
                     writer.WritePropertyName("parentHierarchyId"u8);
    @@ -36,24 +45,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR
                     writer.WritePropertyName("managementProjectNumber"u8);
                     writer.WriteStringValue(ManagementProjectNumber);
                 }
    -            writer.WritePropertyName("organizationMembershipType"u8);
    -            writer.WriteStringValue(OrganizationMembershipType.ToString());
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             GcpMemberOrganizationalInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GcpOrganizationalInfo.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GcpOrganizationalInfo.Serialization.cs
    index 9652911f1e2c..ef4c77b4f548 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GcpOrganizationalInfo.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GcpOrganizationalInfo.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class GcpOrganizationalInfo : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW
                     throw new FormatException($"The model {nameof(GcpOrganizationalInfo)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 writer.WritePropertyName("organizationMembershipType"u8);
                 writer.WriteStringValue(OrganizationMembershipType.ToString());
                 if (options.Format != "W" && _serializedAdditionalRawData != null)
    @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             GcpOrganizationalInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GcpParentOrganizationalInfo.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GcpParentOrganizationalInfo.Serialization.cs
    index dfe9c567f035..6207650486ac 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GcpParentOrganizationalInfo.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GcpParentOrganizationalInfo.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class GcpParentOrganizationalInfo : IUtf8JsonSerializable, IJsonM
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR
                     throw new FormatException($"The model {nameof(GcpParentOrganizationalInfo)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsCollectionDefined(ExcludedProjectNumbers))
                 {
                     writer.WritePropertyName("excludedProjectNumbers"u8);
    @@ -51,24 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR
                     writer.WritePropertyName("organizationName"u8);
                     writer.WriteStringValue(OrganizationName);
                 }
    -            writer.WritePropertyName("organizationMembershipType"u8);
    -            writer.WriteStringValue(OrganizationMembershipType.ToString());
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             GcpParentOrganizationalInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GcpProjectDetails.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GcpProjectDetails.Serialization.cs
    index b472c3157ac7..c5c32c3d3de4 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GcpProjectDetails.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GcpProjectDetails.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class GcpProjectDetails : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite
                     throw new FormatException($"The model {nameof(GcpProjectDetails)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(ProjectNumber))
                 {
                     writer.WritePropertyName("projectNumber"u8);
    @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             GcpProjectDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GcpProjectEnvironment.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GcpProjectEnvironment.Serialization.cs
    index eb6a7520f84e..93d1ff290a4d 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GcpProjectEnvironment.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GcpProjectEnvironment.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class GcpProjectEnvironment : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW
                     throw new FormatException($"The model {nameof(GcpProjectEnvironment)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(OrganizationalData))
                 {
                     writer.WritePropertyName("organizationalData"u8);
    @@ -41,24 +50,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW
                     writer.WritePropertyName("scanInterval"u8);
                     writer.WriteNumberValue(ScanInterval.Value);
                 }
    -            writer.WritePropertyName("environmentType"u8);
    -            writer.WriteStringValue(EnvironmentType.ToString());
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             GcpProjectEnvironment IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GetSensitivitySettingsResponsePropertiesMipInformation.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GetSensitivitySettingsResponsePropertiesMipInformation.Serialization.cs
    index 2a538b663261..b499efa46945 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GetSensitivitySettingsResponsePropertiesMipInformation.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GetSensitivitySettingsResponsePropertiesMipInformation.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class GetSensitivitySettingsResponsePropertiesMipInformation : IU
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Ut
                     throw new FormatException($"The model {nameof(GetSensitivitySettingsResponsePropertiesMipInformation)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(MipIntegrationStatus))
                 {
                     writer.WritePropertyName("mipIntegrationStatus"u8);
    @@ -76,7 +84,6 @@ void IJsonModel.Write(Ut
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             GetSensitivitySettingsResponsePropertiesMipInformation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GitHubOwnerListResponse.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GitHubOwnerListResponse.Serialization.cs
    index 9d0e9f968dc2..432c5bb930d0 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GitHubOwnerListResponse.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GitHubOwnerListResponse.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class GitHubOwnerListResponse : IUtf8JsonSerializable, IJsonMod
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade
                     throw new FormatException($"The model {nameof(GitHubOwnerListResponse)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsCollectionDefined(Value))
                 {
                     writer.WritePropertyName("value"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             GitHubOwnerListResponse IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GitHubRepositoryListResponse.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GitHubRepositoryListResponse.Serialization.cs
    index 6a3495f3ca0b..7586a93441db 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GitHubRepositoryListResponse.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GitHubRepositoryListResponse.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class GitHubRepositoryListResponse : IUtf8JsonSerializable, IJs
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model
                     throw new FormatException($"The model {nameof(GitHubRepositoryListResponse)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsCollectionDefined(Value))
                 {
                     writer.WritePropertyName("value"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             GitHubRepositoryListResponse IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GitLabGroupListResponse.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GitLabGroupListResponse.Serialization.cs
    index dca4c9847824..9fac0699b2a8 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GitLabGroupListResponse.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GitLabGroupListResponse.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class GitLabGroupListResponse : IUtf8JsonSerializable, IJsonMod
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade
                     throw new FormatException($"The model {nameof(GitLabGroupListResponse)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsCollectionDefined(Value))
                 {
                     writer.WritePropertyName("value"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             GitLabGroupListResponse IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GitLabProjectListResponse.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GitLabProjectListResponse.Serialization.cs
    index dbd789edcc79..e824c5b2d28d 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GitLabProjectListResponse.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GitLabProjectListResponse.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class GitLabProjectListResponse : IUtf8JsonSerializable, IJsonM
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea
                     throw new FormatException($"The model {nameof(GitLabProjectListResponse)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsCollectionDefined(Value))
                 {
                     writer.WritePropertyName("value"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             GitLabProjectListResponse IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GithubScopeEnvironment.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GithubScopeEnvironment.Serialization.cs
    index 497ce9624658..4c738fe965c7 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GithubScopeEnvironment.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GithubScopeEnvironment.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class GithubScopeEnvironment : IUtf8JsonSerializable, IJsonModel<
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,25 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader
                     throw new FormatException($"The model {nameof(GithubScopeEnvironment)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            writer.WritePropertyName("environmentType"u8);
    -            writer.WriteStringValue(EnvironmentType.ToString());
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             GithubScopeEnvironment IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GitlabScopeEnvironment.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GitlabScopeEnvironment.Serialization.cs
    index 9cb6959e0bbc..a19f034551e1 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GitlabScopeEnvironment.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GitlabScopeEnvironment.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class GitlabScopeEnvironment : IUtf8JsonSerializable, IJsonModel<
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,25 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader
                     throw new FormatException($"The model {nameof(GitlabScopeEnvironment)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            writer.WritePropertyName("environmentType"u8);
    -            writer.WriteStringValue(EnvironmentType.ToString());
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             GitlabScopeEnvironment IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GovernanceAssignmentAdditionalInfo.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GovernanceAssignmentAdditionalInfo.Serialization.cs
    index fdc6734566c4..a636a1236f2c 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GovernanceAssignmentAdditionalInfo.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GovernanceAssignmentAdditionalInfo.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class GovernanceAssignmentAdditionalInfo : IUtf8JsonSerializable,
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer,
                     throw new FormatException($"The model {nameof(GovernanceAssignmentAdditionalInfo)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(TicketNumber))
                 {
                     writer.WritePropertyName("ticketNumber"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer,
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             GovernanceAssignmentAdditionalInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GovernanceAssignmentsList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GovernanceAssignmentsList.Serialization.cs
    index 39dc1d71f0a4..49aff729b2d3 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GovernanceAssignmentsList.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GovernanceAssignmentsList.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class GovernanceAssignmentsList : IUtf8JsonSerializable, IJsonM
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea
                     throw new FormatException($"The model {nameof(GovernanceAssignmentsList)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (options.Format != "W" && Optional.IsCollectionDefined(Value))
                 {
                     writer.WritePropertyName("value"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             GovernanceAssignmentsList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GovernanceEmailNotification.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GovernanceEmailNotification.Serialization.cs
    index c2b6164f7ac8..ea2398eda50f 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GovernanceEmailNotification.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GovernanceEmailNotification.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class GovernanceEmailNotification : IUtf8JsonSerializable, IJsonM
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR
                     throw new FormatException($"The model {nameof(GovernanceEmailNotification)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(IsManagerEmailNotificationDisabled))
                 {
                     writer.WritePropertyName("disableManagerEmailNotification"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             GovernanceEmailNotification IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GovernanceRuleEmailNotification.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GovernanceRuleEmailNotification.Serialization.cs
    index 1123e18e5fc0..ddf4aa618c94 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GovernanceRuleEmailNotification.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GovernanceRuleEmailNotification.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class GovernanceRuleEmailNotification : IUtf8JsonSerializable, IJ
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo
                     throw new FormatException($"The model {nameof(GovernanceRuleEmailNotification)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(IsManagerEmailNotificationDisabled))
                 {
                     writer.WritePropertyName("disableManagerEmailNotification"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             GovernanceRuleEmailNotification IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GovernanceRuleList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GovernanceRuleList.Serialization.cs
    index fa1410c998be..204949012cce 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GovernanceRuleList.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GovernanceRuleList.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class GovernanceRuleList : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit
                     throw new FormatException($"The model {nameof(GovernanceRuleList)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (options.Format != "W" && Optional.IsCollectionDefined(Value))
                 {
                     writer.WritePropertyName("value"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             GovernanceRuleList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GovernanceRuleMetadata.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GovernanceRuleMetadata.Serialization.cs
    index 9e7b67f74bc9..8ceff4449615 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GovernanceRuleMetadata.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GovernanceRuleMetadata.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class GovernanceRuleMetadata : IUtf8JsonSerializable, IJsonModel<
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader
                     throw new FormatException($"The model {nameof(GovernanceRuleMetadata)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (options.Format != "W" && Optional.IsDefined(CreatedBy))
                 {
                     writer.WritePropertyName("createdBy"u8);
    @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             GovernanceRuleMetadata IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GovernanceRuleOwnerSource.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GovernanceRuleOwnerSource.Serialization.cs
    index a5895600d3c6..92a10ea08d5c 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GovernanceRuleOwnerSource.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GovernanceRuleOwnerSource.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class GovernanceRuleOwnerSource : IUtf8JsonSerializable, IJsonMod
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea
                     throw new FormatException($"The model {nameof(GovernanceRuleOwnerSource)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(SourceType))
                 {
                     writer.WritePropertyName("type"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             GovernanceRuleOwnerSource IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/HealthDataClassification.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/HealthDataClassification.Serialization.cs
    index 573dfaaec593..95ddce799580 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/HealthDataClassification.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/HealthDataClassification.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class HealthDataClassification : IUtf8JsonSerializable, IJsonMode
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead
                     throw new FormatException($"The model {nameof(HealthDataClassification)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(Component))
                 {
                     writer.WritePropertyName("component"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             HealthDataClassification IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/HealthReportResourceDetails.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/HealthReportResourceDetails.Serialization.cs
    index 135481623d55..ec64fef97d86 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/HealthReportResourceDetails.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/HealthReportResourceDetails.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class HealthReportResourceDetails : IUtf8JsonSerializable, IJsonM
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR
                     throw new FormatException($"The model {nameof(HealthReportResourceDetails)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(Source))
                 {
                     writer.WritePropertyName("source"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             HealthReportResourceDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/HealthReportStatus.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/HealthReportStatus.Serialization.cs
    index 26a7428fdf49..d2e34b378aef 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/HealthReportStatus.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/HealthReportStatus.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class HealthReportStatus : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit
                     throw new FormatException($"The model {nameof(HealthReportStatus)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(Code))
                 {
                     writer.WritePropertyName("code"u8);
    @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             HealthReportStatus IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/HealthReportsList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/HealthReportsList.Serialization.cs
    index f8410324e001..2121a90a68b4 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/HealthReportsList.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/HealthReportsList.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class HealthReportsList : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite
                     throw new FormatException($"The model {nameof(HealthReportsList)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (options.Format != "W" && Optional.IsCollectionDefined(Value))
                 {
                     writer.WritePropertyName("value"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             HealthReportsList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/HttpC2DMessagesNotInAllowedRange.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/HttpC2DMessagesNotInAllowedRange.Serialization.cs
    index 187d0320c661..5449b18cadbe 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/HttpC2DMessagesNotInAllowedRange.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/HttpC2DMessagesNotInAllowedRange.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class HttpC2DMessagesNotInAllowedRange : IUtf8JsonSerializable, I
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,43 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, M
                     throw new FormatException($"The model {nameof(HttpC2DMessagesNotInAllowedRange)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            writer.WritePropertyName("timeWindowSize"u8);
    -            writer.WriteStringValue(TimeWindowSize, "P");
    -            writer.WritePropertyName("minThreshold"u8);
    -            writer.WriteNumberValue(MinThreshold);
    -            writer.WritePropertyName("maxThreshold"u8);
    -            writer.WriteNumberValue(MaxThreshold);
    -            if (options.Format != "W" && Optional.IsDefined(DisplayName))
    -            {
    -                writer.WritePropertyName("displayName"u8);
    -                writer.WriteStringValue(DisplayName);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(Description))
    -            {
    -                writer.WritePropertyName("description"u8);
    -                writer.WriteStringValue(Description);
    -            }
    -            writer.WritePropertyName("isEnabled"u8);
    -            writer.WriteBooleanValue(IsEnabled);
    -            writer.WritePropertyName("ruleType"u8);
    -            writer.WriteStringValue(RuleType);
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             HttpC2DMessagesNotInAllowedRange IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/HttpC2DRejectedMessagesNotInAllowedRange.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/HttpC2DRejectedMessagesNotInAllowedRange.Serialization.cs
    index 81ff19589567..609909962c44 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/HttpC2DRejectedMessagesNotInAllowedRange.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/HttpC2DRejectedMessagesNotInAllowedRange.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class HttpC2DRejectedMessagesNotInAllowedRange : IUtf8JsonSeriali
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,43 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter w
                     throw new FormatException($"The model {nameof(HttpC2DRejectedMessagesNotInAllowedRange)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            writer.WritePropertyName("timeWindowSize"u8);
    -            writer.WriteStringValue(TimeWindowSize, "P");
    -            writer.WritePropertyName("minThreshold"u8);
    -            writer.WriteNumberValue(MinThreshold);
    -            writer.WritePropertyName("maxThreshold"u8);
    -            writer.WriteNumberValue(MaxThreshold);
    -            if (options.Format != "W" && Optional.IsDefined(DisplayName))
    -            {
    -                writer.WritePropertyName("displayName"u8);
    -                writer.WriteStringValue(DisplayName);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(Description))
    -            {
    -                writer.WritePropertyName("description"u8);
    -                writer.WriteStringValue(Description);
    -            }
    -            writer.WritePropertyName("isEnabled"u8);
    -            writer.WriteBooleanValue(IsEnabled);
    -            writer.WritePropertyName("ruleType"u8);
    -            writer.WriteStringValue(RuleType);
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             HttpC2DRejectedMessagesNotInAllowedRange IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/HttpD2CMessagesNotInAllowedRange.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/HttpD2CMessagesNotInAllowedRange.Serialization.cs
    index 7b3db00e1a15..851279257ec4 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/HttpD2CMessagesNotInAllowedRange.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/HttpD2CMessagesNotInAllowedRange.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class HttpD2CMessagesNotInAllowedRange : IUtf8JsonSerializable, I
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,43 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, M
                     throw new FormatException($"The model {nameof(HttpD2CMessagesNotInAllowedRange)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            writer.WritePropertyName("timeWindowSize"u8);
    -            writer.WriteStringValue(TimeWindowSize, "P");
    -            writer.WritePropertyName("minThreshold"u8);
    -            writer.WriteNumberValue(MinThreshold);
    -            writer.WritePropertyName("maxThreshold"u8);
    -            writer.WriteNumberValue(MaxThreshold);
    -            if (options.Format != "W" && Optional.IsDefined(DisplayName))
    -            {
    -                writer.WritePropertyName("displayName"u8);
    -                writer.WriteStringValue(DisplayName);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(Description))
    -            {
    -                writer.WritePropertyName("description"u8);
    -                writer.WriteStringValue(Description);
    -            }
    -            writer.WritePropertyName("isEnabled"u8);
    -            writer.WriteBooleanValue(IsEnabled);
    -            writer.WritePropertyName("ruleType"u8);
    -            writer.WriteStringValue(RuleType);
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             HttpD2CMessagesNotInAllowedRange IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/HybridComputeSettingsProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/HybridComputeSettingsProperties.Serialization.cs
    index 36f236b13511..367493c680a9 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/HybridComputeSettingsProperties.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/HybridComputeSettingsProperties.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class HybridComputeSettingsProperties : IUtf8JsonSerializable, IJ
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo
                     throw new FormatException($"The model {nameof(HybridComputeSettingsProperties)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (options.Format != "W" && Optional.IsDefined(HybridComputeProvisioningState))
                 {
                     writer.WritePropertyName("hybridComputeProvisioningState"u8);
    @@ -68,7 +76,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             HybridComputeSettingsProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/InformationProtectionAwsOffering.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/InformationProtectionAwsOffering.Serialization.cs
    index bef0df1df524..820b412ef877 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/InformationProtectionAwsOffering.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/InformationProtectionAwsOffering.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class InformationProtectionAwsOffering : IUtf8JsonSerializable, I
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,35 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, M
                     throw new FormatException($"The model {nameof(InformationProtectionAwsOffering)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(InformationProtection))
                 {
                     writer.WritePropertyName("informationProtection"u8);
                     writer.WriteObjectValue(InformationProtection, options);
                 }
    -            writer.WritePropertyName("offeringType"u8);
    -            writer.WriteStringValue(OfferingType.ToString());
    -            if (options.Format != "W" && Optional.IsDefined(Description))
    -            {
    -                writer.WritePropertyName("description"u8);
    -                writer.WriteStringValue(Description);
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             InformationProtectionAwsOffering IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/InformationProtectionKeyword.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/InformationProtectionKeyword.Serialization.cs
    index cc58f2cb4157..f5e4618187ef 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/InformationProtectionKeyword.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/InformationProtectionKeyword.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class InformationProtectionKeyword : IUtf8JsonSerializable, IJson
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model
                     throw new FormatException($"The model {nameof(InformationProtectionKeyword)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(Pattern))
                 {
                     writer.WritePropertyName("pattern"u8);
    @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             InformationProtectionKeyword IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/InformationProtectionPolicy.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/InformationProtectionPolicy.Serialization.cs
    index 2c86c3892e7b..a061b5fd2ee9 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/InformationProtectionPolicy.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/InformationProtectionPolicy.Serialization.cs
    @@ -19,6 +19,15 @@ public partial class InformationProtectionPolicy : IUtf8JsonSerializable, IJsonM
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -26,27 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR
                     throw new FormatException($"The model {nameof(InformationProtectionPolicy)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("id"u8);
    -                writer.WriteStringValue(Id);
    -            }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("name"u8);
    -                writer.WriteStringValue(Name);
    -            }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("type"u8);
    -                writer.WriteStringValue(ResourceType);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(SystemData))
    -            {
    -                writer.WritePropertyName("systemData"u8);
    -                JsonSerializer.Serialize(writer, SystemData);
    -            }
    +            base.JsonModelWriteCore(writer, options);
                 writer.WritePropertyName("properties"u8);
                 writer.WriteStartObject();
                 if (options.Format != "W" && Optional.IsDefined(LastModifiedUtc))
    @@ -82,22 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR
                     writer.WriteEndObject();
                 }
                 writer.WriteEndObject();
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             InformationProtectionPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/InformationProtectionPolicyList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/InformationProtectionPolicyList.Serialization.cs
    index c7b09f66c648..53205cb615c1 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/InformationProtectionPolicyList.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/InformationProtectionPolicyList.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class InformationProtectionPolicyList : IUtf8JsonSerializable,
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo
                     throw new FormatException($"The model {nameof(InformationProtectionPolicyList)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsCollectionDefined(Value))
                 {
                     writer.WritePropertyName("value"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             InformationProtectionPolicyList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecurityAggregatedAlertList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecurityAggregatedAlertList.Serialization.cs
    index 34950a11e894..5c8ee61ed1ab 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecurityAggregatedAlertList.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecurityAggregatedAlertList.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class IotSecurityAggregatedAlertList : IUtf8JsonSerializable, I
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod
                     throw new FormatException($"The model {nameof(IotSecurityAggregatedAlertList)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 writer.WritePropertyName("value"u8);
                 writer.WriteStartArray();
                 foreach (var item in Value)
    @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             IotSecurityAggregatedAlertList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecurityAggregatedAlertTopDevice.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecurityAggregatedAlertTopDevice.Serialization.cs
    index 7ea376dc971c..cae1b9be9cc7 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecurityAggregatedAlertTopDevice.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecurityAggregatedAlertTopDevice.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class IotSecurityAggregatedAlertTopDevice : IUtf8JsonSerializable
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer
                     throw new FormatException($"The model {nameof(IotSecurityAggregatedAlertTopDevice)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (options.Format != "W" && Optional.IsDefined(DeviceId))
                 {
                     writer.WritePropertyName("deviceId"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             IotSecurityAggregatedAlertTopDevice IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecurityAggregatedRecommendationList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecurityAggregatedRecommendationList.Serialization.cs
    index 8037eb70dce6..9a734a74fa33 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecurityAggregatedRecommendationList.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecurityAggregatedRecommendationList.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class IotSecurityAggregatedRecommendationList : IUtf8JsonSerial
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wr
                     throw new FormatException($"The model {nameof(IotSecurityAggregatedRecommendationList)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 writer.WritePropertyName("value"u8);
                 writer.WriteStartArray();
                 foreach (var item in Value)
    @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter wr
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             IotSecurityAggregatedRecommendationList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecurityAlertedDevice.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecurityAlertedDevice.Serialization.cs
    index 617ca4fb34cc..001cd5a96a50 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecurityAlertedDevice.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecurityAlertedDevice.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class IotSecurityAlertedDevice : IUtf8JsonSerializable, IJsonMode
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead
                     throw new FormatException($"The model {nameof(IotSecurityAlertedDevice)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (options.Format != "W" && Optional.IsDefined(DeviceId))
                 {
                     writer.WritePropertyName("deviceId"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             IotSecurityAlertedDevice IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecurityDeviceAlert.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecurityDeviceAlert.Serialization.cs
    index 1ffb2a26e0db..c7af38045d29 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecurityDeviceAlert.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecurityDeviceAlert.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class IotSecurityDeviceAlert : IUtf8JsonSerializable, IJsonModel<
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader
                     throw new FormatException($"The model {nameof(IotSecurityDeviceAlert)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (options.Format != "W" && Optional.IsDefined(AlertDisplayName))
                 {
                     writer.WritePropertyName("alertDisplayName"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             IotSecurityDeviceAlert IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecurityDeviceRecommendation.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecurityDeviceRecommendation.Serialization.cs
    index 9ca47e720879..e9209ca850b9 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecurityDeviceRecommendation.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecurityDeviceRecommendation.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class IotSecurityDeviceRecommendation : IUtf8JsonSerializable, IJ
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo
                     throw new FormatException($"The model {nameof(IotSecurityDeviceRecommendation)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (options.Format != "W" && Optional.IsDefined(RecommendationDisplayName))
                 {
                     writer.WritePropertyName("recommendationDisplayName"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             IotSecurityDeviceRecommendation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecuritySolutionAnalyticsModelDevicesMetrics.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecuritySolutionAnalyticsModelDevicesMetrics.Serialization.cs
    index c2bb50446acf..ac5c8e81f119 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecuritySolutionAnalyticsModelDevicesMetrics.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecuritySolutionAnalyticsModelDevicesMetrics.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class IotSecuritySolutionAnalyticsModelDevicesMetrics : IUtf8Json
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonW
                     throw new FormatException($"The model {nameof(IotSecuritySolutionAnalyticsModelDevicesMetrics)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(Date))
                 {
                     writer.WritePropertyName("date"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonW
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             IotSecuritySolutionAnalyticsModelDevicesMetrics IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecuritySolutionAnalyticsModelList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecuritySolutionAnalyticsModelList.Serialization.cs
    index 65456ecb5d36..d3c4ec2d35f1 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecuritySolutionAnalyticsModelList.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecuritySolutionAnalyticsModelList.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class IotSecuritySolutionAnalyticsModelList : IUtf8JsonSerializ
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writ
                     throw new FormatException($"The model {nameof(IotSecuritySolutionAnalyticsModelList)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 writer.WritePropertyName("value"u8);
                 writer.WriteStartArray();
                 foreach (var item in Value)
    @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writ
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             IotSecuritySolutionAnalyticsModelList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecuritySolutionPatch.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecuritySolutionPatch.Serialization.cs
    index d69875ff8b2e..ac0b62ca1fa7 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecuritySolutionPatch.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecuritySolutionPatch.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class IotSecuritySolutionPatch : IUtf8JsonSerializable, IJsonMode
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,18 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead
                     throw new FormatException($"The model {nameof(IotSecuritySolutionPatch)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            if (Optional.IsCollectionDefined(Tags))
    -            {
    -                writer.WritePropertyName("tags"u8);
    -                writer.WriteStartObject();
    -                foreach (var item in Tags)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -                    writer.WriteStringValue(item.Value);
    -                }
    -                writer.WriteEndObject();
    -            }
    +            base.JsonModelWriteCore(writer, options);
                 writer.WritePropertyName("properties"u8);
                 writer.WriteStartObject();
                 if (Optional.IsDefined(UserDefinedResources))
    @@ -55,22 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead
                     writer.WriteEndArray();
                 }
                 writer.WriteEndObject();
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             IotSecuritySolutionPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecuritySolutionsList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecuritySolutionsList.Serialization.cs
    index e51bbfc12c47..23aef47a56dd 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecuritySolutionsList.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecuritySolutionsList.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class IotSecuritySolutionsList : IUtf8JsonSerializable, IJsonMo
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead
                     throw new FormatException($"The model {nameof(IotSecuritySolutionsList)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 writer.WritePropertyName("value"u8);
                 writer.WriteStartArray();
                 foreach (var item in Value)
    @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             IotSecuritySolutionsList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSeverityMetrics.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSeverityMetrics.Serialization.cs
    index ec6bbc64b175..156b98e95bea 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSeverityMetrics.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSeverityMetrics.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class IotSeverityMetrics : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit
                     throw new FormatException($"The model {nameof(IotSeverityMetrics)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(High))
                 {
                     writer.WritePropertyName("high"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             IotSeverityMetrics IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessPoliciesList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessPoliciesList.Serialization.cs
    index ff0fd683dcb9..2c563ad0269f 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessPoliciesList.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessPoliciesList.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class JitNetworkAccessPoliciesList : IUtf8JsonSerializable, IJs
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model
                     throw new FormatException($"The model {nameof(JitNetworkAccessPoliciesList)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsCollectionDefined(Value))
                 {
                     writer.WritePropertyName("value"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             JitNetworkAccessPoliciesList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessPolicyInitiateContent.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessPolicyInitiateContent.Serialization.cs
    index 861a0795921a..7af36bd0a6f8 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessPolicyInitiateContent.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessPolicyInitiateContent.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class JitNetworkAccessPolicyInitiateContent : IUtf8JsonSerializab
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writ
                     throw new FormatException($"The model {nameof(JitNetworkAccessPolicyInitiateContent)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 writer.WritePropertyName("virtualMachines"u8);
                 writer.WriteStartArray();
                 foreach (var item in VirtualMachines)
    @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writ
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             JitNetworkAccessPolicyInitiateContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessPolicyInitiatePort.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessPolicyInitiatePort.Serialization.cs
    index c261b90a2335..7c7ad8a5cca6 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessPolicyInitiatePort.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessPolicyInitiatePort.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class JitNetworkAccessPolicyInitiatePort : IUtf8JsonSerializable,
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer,
                     throw new FormatException($"The model {nameof(JitNetworkAccessPolicyInitiatePort)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 writer.WritePropertyName("number"u8);
                 writer.WriteNumberValue(Number);
                 if (Optional.IsDefined(AllowedSourceAddressPrefix))
    @@ -50,7 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter writer,
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             JitNetworkAccessPolicyInitiatePort IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessPolicyInitiateVirtualMachine.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessPolicyInitiateVirtualMachine.Serialization.cs
    index 31a3ccdae641..911b028519f1 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessPolicyInitiateVirtualMachine.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessPolicyInitiateVirtualMachine.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class JitNetworkAccessPolicyInitiateVirtualMachine : IUtf8JsonSer
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWrit
                     throw new FormatException($"The model {nameof(JitNetworkAccessPolicyInitiateVirtualMachine)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 writer.WritePropertyName("id"u8);
                 writer.WriteStringValue(Id);
                 writer.WritePropertyName("ports"u8);
    @@ -50,7 +58,6 @@ void IJsonModel.Write(Utf8JsonWrit
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             JitNetworkAccessPolicyInitiateVirtualMachine IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessPolicyVirtualMachine.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessPolicyVirtualMachine.Serialization.cs
    index 6fd35b67740a..6b7c4a81ae85 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessPolicyVirtualMachine.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessPolicyVirtualMachine.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class JitNetworkAccessPolicyVirtualMachine : IUtf8JsonSerializabl
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter write
                     throw new FormatException($"The model {nameof(JitNetworkAccessPolicyVirtualMachine)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 writer.WritePropertyName("id"u8);
                 writer.WriteStringValue(Id);
                 writer.WritePropertyName("ports"u8);
    @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter write
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             JitNetworkAccessPolicyVirtualMachine IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessPortRule.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessPortRule.Serialization.cs
    index 09004a75336a..9c07c742f53a 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessPortRule.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessPortRule.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class JitNetworkAccessPortRule : IUtf8JsonSerializable, IJsonMode
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead
                     throw new FormatException($"The model {nameof(JitNetworkAccessPortRule)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 writer.WritePropertyName("number"u8);
                 writer.WriteNumberValue(Number);
                 writer.WritePropertyName("protocol"u8);
    @@ -62,7 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             JitNetworkAccessPortRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessRequestInfo.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessRequestInfo.Serialization.cs
    index 92128688808f..7fc93a432b70 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessRequestInfo.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessRequestInfo.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class JitNetworkAccessRequestInfo : IUtf8JsonSerializable, IJsonM
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR
                     throw new FormatException($"The model {nameof(JitNetworkAccessRequestInfo)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 writer.WritePropertyName("virtualMachines"u8);
                 writer.WriteStartArray();
                 foreach (var item in VirtualMachines)
    @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             JitNetworkAccessRequestInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessRequestPort.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessRequestPort.Serialization.cs
    index f99ff6aa09ba..1aa6d1a817d1 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessRequestPort.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessRequestPort.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class JitNetworkAccessRequestPort : IUtf8JsonSerializable, IJsonM
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR
                     throw new FormatException($"The model {nameof(JitNetworkAccessRequestPort)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 writer.WritePropertyName("number"u8);
                 writer.WriteNumberValue(Number);
                 if (Optional.IsDefined(AllowedSourceAddressPrefix))
    @@ -69,7 +77,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             JitNetworkAccessRequestPort IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessRequestVirtualMachine.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessRequestVirtualMachine.Serialization.cs
    index 00607185d8e8..13db8e841ca5 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessRequestVirtualMachine.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessRequestVirtualMachine.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class JitNetworkAccessRequestVirtualMachine : IUtf8JsonSerializab
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writ
                     throw new FormatException($"The model {nameof(JitNetworkAccessRequestVirtualMachine)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 writer.WritePropertyName("id"u8);
                 writer.WriteStringValue(Id);
                 writer.WritePropertyName("ports"u8);
    @@ -50,7 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter writ
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             JitNetworkAccessRequestVirtualMachine IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ListCustomAlertRule.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ListCustomAlertRule.Serialization.cs
    index df6538e763be..7ab7a5c52c88 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ListCustomAlertRule.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ListCustomAlertRule.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class ListCustomAlertRule : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,42 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri
                     throw new FormatException($"The model {nameof(ListCustomAlertRule)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (options.Format != "W" && Optional.IsDefined(ValueType))
                 {
                     writer.WritePropertyName("valueType"u8);
                     writer.WriteStringValue(ValueType.Value.ToString());
                 }
    -            if (options.Format != "W" && Optional.IsDefined(DisplayName))
    -            {
    -                writer.WritePropertyName("displayName"u8);
    -                writer.WriteStringValue(DisplayName);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(Description))
    -            {
    -                writer.WritePropertyName("description"u8);
    -                writer.WriteStringValue(Description);
    -            }
    -            writer.WritePropertyName("isEnabled"u8);
    -            writer.WriteBooleanValue(IsEnabled);
    -            writer.WritePropertyName("ruleType"u8);
    -            writer.WriteStringValue(RuleType);
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             ListCustomAlertRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/LocalUserNotAllowed.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/LocalUserNotAllowed.Serialization.cs
    index a8f4383ee2e6..bf105962ea2b 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/LocalUserNotAllowed.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/LocalUserNotAllowed.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class LocalUserNotAllowed : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,49 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri
                     throw new FormatException($"The model {nameof(LocalUserNotAllowed)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            writer.WritePropertyName("allowlistValues"u8);
    -            writer.WriteStartArray();
    -            foreach (var item in AllowlistValues)
    -            {
    -                writer.WriteStringValue(item);
    -            }
    -            writer.WriteEndArray();
    -            if (options.Format != "W" && Optional.IsDefined(ValueType))
    -            {
    -                writer.WritePropertyName("valueType"u8);
    -                writer.WriteStringValue(ValueType.Value.ToString());
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(DisplayName))
    -            {
    -                writer.WritePropertyName("displayName"u8);
    -                writer.WriteStringValue(DisplayName);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(Description))
    -            {
    -                writer.WritePropertyName("description"u8);
    -                writer.WriteStringValue(Description);
    -            }
    -            writer.WritePropertyName("isEnabled"u8);
    -            writer.WriteBooleanValue(IsEnabled);
    -            writer.WritePropertyName("ruleType"u8);
    -            writer.WriteStringValue(RuleType);
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             LocalUserNotAllowed IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/LogAnalyticsIdentifier.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/LogAnalyticsIdentifier.Serialization.cs
    index 8dd229893f76..adb0b90ad0fd 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/LogAnalyticsIdentifier.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/LogAnalyticsIdentifier.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class LogAnalyticsIdentifier : IUtf8JsonSerializable, IJsonModel<
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader
                     throw new FormatException($"The model {nameof(LogAnalyticsIdentifier)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (options.Format != "W" && Optional.IsDefined(WorkspaceId))
                 {
                     writer.WritePropertyName("workspaceId"u8);
    @@ -46,24 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader
                     writer.WritePropertyName("agentId"u8);
                     writer.WriteStringValue(AgentId.Value);
                 }
    -            writer.WritePropertyName("type"u8);
    -            writer.WriteStringValue(ResourceIdentifierType.ToString());
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             LogAnalyticsIdentifier IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/MdeOnboarding.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/MdeOnboarding.Serialization.cs
    index 2c7a0ebb2332..3d558c868459 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/MdeOnboarding.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/MdeOnboarding.Serialization.cs
    @@ -19,6 +19,15 @@ public partial class MdeOnboarding : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -26,27 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt
                     throw new FormatException($"The model {nameof(MdeOnboarding)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("id"u8);
    -                writer.WriteStringValue(Id);
    -            }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("name"u8);
    -                writer.WriteStringValue(Name);
    -            }
    -            if (options.Format != "W")
    -            {
    -                writer.WritePropertyName("type"u8);
    -                writer.WriteStringValue(ResourceType);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(SystemData))
    -            {
    -                writer.WritePropertyName("systemData"u8);
    -                JsonSerializer.Serialize(writer, SystemData);
    -            }
    +            base.JsonModelWriteCore(writer, options);
                 writer.WritePropertyName("properties"u8);
                 writer.WriteStartObject();
                 if (Optional.IsDefined(OnboardingPackageWindows))
    @@ -60,22 +49,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt
                     writer.WriteBase64StringValue(OnboardingPackageLinux, "D");
                 }
                 writer.WriteEndObject();
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             MdeOnboarding IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/MdeOnboardingDataList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/MdeOnboardingDataList.Serialization.cs
    index 746fac5249e5..7357c01caa15 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/MdeOnboardingDataList.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/MdeOnboardingDataList.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class MdeOnboardingDataList : IUtf8JsonSerializable, IJsonModel
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW
                     throw new FormatException($"The model {nameof(MdeOnboardingDataList)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsCollectionDefined(Value))
                 {
                     writer.WritePropertyName("value"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             MdeOnboardingDataList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/MipSensitivityLabel.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/MipSensitivityLabel.Serialization.cs
    index 88d661dab8db..432d132e9001 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/MipSensitivityLabel.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/MipSensitivityLabel.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class MipSensitivityLabel : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri
                     throw new FormatException($"The model {nameof(MipSensitivityLabel)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(Name))
                 {
                     writer.WritePropertyName("name"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             MipSensitivityLabel IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/MqttC2DMessagesNotInAllowedRange.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/MqttC2DMessagesNotInAllowedRange.Serialization.cs
    index 29b7955c3a6a..c51db113a230 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/MqttC2DMessagesNotInAllowedRange.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/MqttC2DMessagesNotInAllowedRange.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class MqttC2DMessagesNotInAllowedRange : IUtf8JsonSerializable, I
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,43 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, M
                     throw new FormatException($"The model {nameof(MqttC2DMessagesNotInAllowedRange)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            writer.WritePropertyName("timeWindowSize"u8);
    -            writer.WriteStringValue(TimeWindowSize, "P");
    -            writer.WritePropertyName("minThreshold"u8);
    -            writer.WriteNumberValue(MinThreshold);
    -            writer.WritePropertyName("maxThreshold"u8);
    -            writer.WriteNumberValue(MaxThreshold);
    -            if (options.Format != "W" && Optional.IsDefined(DisplayName))
    -            {
    -                writer.WritePropertyName("displayName"u8);
    -                writer.WriteStringValue(DisplayName);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(Description))
    -            {
    -                writer.WritePropertyName("description"u8);
    -                writer.WriteStringValue(Description);
    -            }
    -            writer.WritePropertyName("isEnabled"u8);
    -            writer.WriteBooleanValue(IsEnabled);
    -            writer.WritePropertyName("ruleType"u8);
    -            writer.WriteStringValue(RuleType);
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             MqttC2DMessagesNotInAllowedRange IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/MqttC2DRejectedMessagesNotInAllowedRange.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/MqttC2DRejectedMessagesNotInAllowedRange.Serialization.cs
    index a2c49766a405..d8177bbc7633 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/MqttC2DRejectedMessagesNotInAllowedRange.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/MqttC2DRejectedMessagesNotInAllowedRange.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class MqttC2DRejectedMessagesNotInAllowedRange : IUtf8JsonSeriali
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,43 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter w
                     throw new FormatException($"The model {nameof(MqttC2DRejectedMessagesNotInAllowedRange)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            writer.WritePropertyName("timeWindowSize"u8);
    -            writer.WriteStringValue(TimeWindowSize, "P");
    -            writer.WritePropertyName("minThreshold"u8);
    -            writer.WriteNumberValue(MinThreshold);
    -            writer.WritePropertyName("maxThreshold"u8);
    -            writer.WriteNumberValue(MaxThreshold);
    -            if (options.Format != "W" && Optional.IsDefined(DisplayName))
    -            {
    -                writer.WritePropertyName("displayName"u8);
    -                writer.WriteStringValue(DisplayName);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(Description))
    -            {
    -                writer.WritePropertyName("description"u8);
    -                writer.WriteStringValue(Description);
    -            }
    -            writer.WritePropertyName("isEnabled"u8);
    -            writer.WriteBooleanValue(IsEnabled);
    -            writer.WritePropertyName("ruleType"u8);
    -            writer.WriteStringValue(RuleType);
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             MqttC2DRejectedMessagesNotInAllowedRange IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/MqttD2CMessagesNotInAllowedRange.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/MqttD2CMessagesNotInAllowedRange.Serialization.cs
    index 4af3d363ef23..eb0a1249f9da 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/MqttD2CMessagesNotInAllowedRange.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/MqttD2CMessagesNotInAllowedRange.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class MqttD2CMessagesNotInAllowedRange : IUtf8JsonSerializable, I
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,43 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, M
                     throw new FormatException($"The model {nameof(MqttD2CMessagesNotInAllowedRange)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            writer.WritePropertyName("timeWindowSize"u8);
    -            writer.WriteStringValue(TimeWindowSize, "P");
    -            writer.WritePropertyName("minThreshold"u8);
    -            writer.WriteNumberValue(MinThreshold);
    -            writer.WritePropertyName("maxThreshold"u8);
    -            writer.WriteNumberValue(MaxThreshold);
    -            if (options.Format != "W" && Optional.IsDefined(DisplayName))
    -            {
    -                writer.WritePropertyName("displayName"u8);
    -                writer.WriteStringValue(DisplayName);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(Description))
    -            {
    -                writer.WritePropertyName("description"u8);
    -                writer.WriteStringValue(Description);
    -            }
    -            writer.WritePropertyName("isEnabled"u8);
    -            writer.WriteBooleanValue(IsEnabled);
    -            writer.WritePropertyName("ruleType"u8);
    -            writer.WriteStringValue(RuleType);
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             MqttD2CMessagesNotInAllowedRange IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/OnPremiseResourceDetails.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/OnPremiseResourceDetails.Serialization.cs
    index ac9e7abc5535..3c5b2f5d2393 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/OnPremiseResourceDetails.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/OnPremiseResourceDetails.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class OnPremiseResourceDetails : IUtf8JsonSerializable, IJsonMode
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead
                     throw new FormatException($"The model {nameof(OnPremiseResourceDetails)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 writer.WritePropertyName("workspaceId"u8);
                 writer.WriteStringValue(WorkspaceId);
                 writer.WritePropertyName("vmuuid"u8);
    @@ -34,24 +43,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead
                 writer.WriteStringValue(SourceComputerId);
                 writer.WritePropertyName("machineName"u8);
                 writer.WriteStringValue(MachineName);
    -            writer.WritePropertyName("source"u8);
    -            writer.WriteStringValue(Source.ToString());
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             OnPremiseResourceDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/OnPremiseSqlResourceDetails.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/OnPremiseSqlResourceDetails.Serialization.cs
    index e65a515b1ef4..7d589f02f29f 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/OnPremiseSqlResourceDetails.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/OnPremiseSqlResourceDetails.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class OnPremiseSqlResourceDetails : IUtf8JsonSerializable, IJsonM
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,37 +34,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR
                     throw new FormatException($"The model {nameof(OnPremiseSqlResourceDetails)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 writer.WritePropertyName("serverName"u8);
                 writer.WriteStringValue(ServerName);
                 writer.WritePropertyName("databaseName"u8);
                 writer.WriteStringValue(DatabaseName);
    -            writer.WritePropertyName("workspaceId"u8);
    -            writer.WriteStringValue(WorkspaceId);
    -            writer.WritePropertyName("vmuuid"u8);
    -            writer.WriteStringValue(VmUuid);
    -            writer.WritePropertyName("sourceComputerId"u8);
    -            writer.WriteStringValue(SourceComputerId);
    -            writer.WritePropertyName("machineName"u8);
    -            writer.WriteStringValue(MachineName);
    -            writer.WritePropertyName("source"u8);
    -            writer.WriteStringValue(Source.ToString());
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             OnPremiseSqlResourceDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/OperationStatusAutoGenerated.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/OperationStatusAutoGenerated.Serialization.cs
    index 77753a58676f..c4a7041e75f4 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/OperationStatusAutoGenerated.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/OperationStatusAutoGenerated.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class OperationStatusAutoGenerated : IUtf8JsonSerializable, IJson
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model
                     throw new FormatException($"The model {nameof(OperationStatusAutoGenerated)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(Code))
                 {
                     writer.WritePropertyName("code"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             OperationStatusAutoGenerated IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/PathRecommendation.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/PathRecommendation.Serialization.cs
    index 3942827d7f42..f99adf501c9a 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/PathRecommendation.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/PathRecommendation.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class PathRecommendation : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit
                     throw new FormatException($"The model {nameof(PathRecommendation)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(Path))
                 {
                     writer.WritePropertyName("path"u8);
    @@ -96,7 +104,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             PathRecommendation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/PlanExtension.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/PlanExtension.Serialization.cs
    index b145e6bd24a2..4457af3104c9 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/PlanExtension.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/PlanExtension.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class PlanExtension : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt
                     throw new FormatException($"The model {nameof(PlanExtension)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 writer.WritePropertyName("name"u8);
                 writer.WriteStringValue(Name);
                 writer.WritePropertyName("isEnabled"u8);
    @@ -73,7 +81,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             PlanExtension IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/PricingList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/PricingList.Serialization.cs
    index fa5f92ea88f7..8a1a5e011334 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/PricingList.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/PricingList.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class PricingList : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio
                     throw new FormatException($"The model {nameof(PricingList)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 writer.WritePropertyName("value"u8);
                 writer.WriteStartArray();
                 foreach (var item in Value)
    @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             PricingList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ProcessNotAllowed.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ProcessNotAllowed.Serialization.cs
    index 4071fae85fc6..c84c7e09f0fa 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ProcessNotAllowed.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ProcessNotAllowed.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class ProcessNotAllowed : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,49 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite
                     throw new FormatException($"The model {nameof(ProcessNotAllowed)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            writer.WritePropertyName("allowlistValues"u8);
    -            writer.WriteStartArray();
    -            foreach (var item in AllowlistValues)
    -            {
    -                writer.WriteStringValue(item);
    -            }
    -            writer.WriteEndArray();
    -            if (options.Format != "W" && Optional.IsDefined(ValueType))
    -            {
    -                writer.WritePropertyName("valueType"u8);
    -                writer.WriteStringValue(ValueType.Value.ToString());
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(DisplayName))
    -            {
    -                writer.WritePropertyName("displayName"u8);
    -                writer.WriteStringValue(DisplayName);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(Description))
    -            {
    -                writer.WritePropertyName("description"u8);
    -                writer.WriteStringValue(Description);
    -            }
    -            writer.WritePropertyName("isEnabled"u8);
    -            writer.WriteBooleanValue(IsEnabled);
    -            writer.WritePropertyName("ruleType"u8);
    -            writer.WriteStringValue(RuleType);
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             ProcessNotAllowed IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ProxyServerProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ProxyServerProperties.Serialization.cs
    index 2626e1b15f0a..b736424813c9 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ProxyServerProperties.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ProxyServerProperties.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class ProxyServerProperties : IUtf8JsonSerializable, IJsonModel

    ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(ProxyServerProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IP)) { writer.WritePropertyName("ip"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } ProxyServerProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/QueuePurgesNotInAllowedRange.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/QueuePurgesNotInAllowedRange.Serialization.cs index e05af2ea3bff..d3862f757b9b 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/QueuePurgesNotInAllowedRange.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/QueuePurgesNotInAllowedRange.Serialization.cs @@ -18,6 +18,15 @@ public partial class QueuePurgesNotInAllowedRange : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,43 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(QueuePurgesNotInAllowedRange)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("timeWindowSize"u8); - writer.WriteStringValue(TimeWindowSize, "P"); - writer.WritePropertyName("minThreshold"u8); - writer.WriteNumberValue(MinThreshold); - writer.WritePropertyName("maxThreshold"u8); - writer.WriteNumberValue(MaxThreshold); - if (options.Format != "W" && Optional.IsDefined(DisplayName)) - { - writer.WritePropertyName("displayName"u8); - writer.WriteStringValue(DisplayName); - } - if (options.Format != "W" && Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - writer.WritePropertyName("isEnabled"u8); - writer.WriteBooleanValue(IsEnabled); - writer.WritePropertyName("ruleType"u8); - writer.WriteStringValue(RuleType); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } QueuePurgesNotInAllowedRange IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RecommendationConfigurationProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RecommendationConfigurationProperties.Serialization.cs index 5dbcbf9ca362..f1f94a535a3c 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RecommendationConfigurationProperties.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RecommendationConfigurationProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class RecommendationConfigurationProperties : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(RecommendationConfigurationProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("recommendationType"u8); writer.WriteStringValue(RecommendationType.ToString()); if (options.Format != "W" && Optional.IsDefined(Name)) @@ -50,7 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } RecommendationConfigurationProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RecommendedSecurityRule.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RecommendedSecurityRule.Serialization.cs index e9c9645ed925..485bd9ce708c 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RecommendedSecurityRule.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RecommendedSecurityRule.Serialization.cs @@ -18,6 +18,15 @@ public partial class RecommendedSecurityRule : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(RecommendedSecurityRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -76,7 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } RecommendedSecurityRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RegulatoryComplianceAssessmentList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RegulatoryComplianceAssessmentList.Serialization.cs index 00f11a2b9efe..988ec6dcbdcc 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RegulatoryComplianceAssessmentList.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RegulatoryComplianceAssessmentList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class RegulatoryComplianceAssessmentList : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(RegulatoryComplianceAssessmentList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } RegulatoryComplianceAssessmentList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RegulatoryComplianceControlList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RegulatoryComplianceControlList.Serialization.cs index 7e3e05fd0f6b..e962569339ca 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RegulatoryComplianceControlList.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RegulatoryComplianceControlList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class RegulatoryComplianceControlList : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(RegulatoryComplianceControlList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } RegulatoryComplianceControlList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RegulatoryComplianceStandardList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RegulatoryComplianceStandardList.Serialization.cs index c9c1f904fa0c..94e12bbefd2d 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RegulatoryComplianceStandardList.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RegulatoryComplianceStandardList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class RegulatoryComplianceStandardList : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(RegulatoryComplianceStandardList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } RegulatoryComplianceStandardList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RemediationEta.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RemediationEta.Serialization.cs index bff47b5e02b6..39be48eeef34 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RemediationEta.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RemediationEta.Serialization.cs @@ -18,6 +18,15 @@ public partial class RemediationEta : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(RemediationEta)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("eta"u8); writer.WriteStringValue(Eta, "O"); writer.WritePropertyName("justification"u8); @@ -45,7 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp #endif } } - writer.WriteEndObject(); } RemediationEta IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RuleResultsProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RuleResultsProperties.Serialization.cs index 0bc309decc86..8e48b8836055 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RuleResultsProperties.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RuleResultsProperties.Serialization.cs @@ -18,6 +18,15 @@ internal partial class RuleResultsProperties : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(RuleResultsProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Results)) { writer.WritePropertyName("results"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } RuleResultsProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RulesResults.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RulesResults.Serialization.cs index d8ccc2131e1f..460c751552b7 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RulesResults.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RulesResults.Serialization.cs @@ -18,6 +18,15 @@ internal partial class RulesResults : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(RulesResults)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti #endif } } - writer.WriteEndObject(); } RulesResults IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RulesResultsContent.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RulesResultsContent.Serialization.cs index a84689b0640f..5514234ded0a 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RulesResultsContent.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RulesResultsContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class RulesResultsContent : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(RulesResultsContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(LatestScan)) { writer.WritePropertyName("latestScan"u8); @@ -77,7 +85,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } RulesResultsContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ScanResults.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ScanResults.Serialization.cs index e905738cfcfd..1fb87e5245dc 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ScanResults.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ScanResults.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ScanResults : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio throw new FormatException($"The model {nameof(ScanResults)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio #endif } } - writer.WriteEndObject(); } ScanResults IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/Scans.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/Scans.Serialization.cs index 9d5ace8ffe32..3a02ab427130 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/Scans.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/Scans.Serialization.cs @@ -18,6 +18,15 @@ internal partial class Scans : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions opt throw new FormatException($"The model {nameof(Scans)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions opt #endif } } - writer.WriteEndObject(); } Scans IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecureScoreControlDefinitionItem.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecureScoreControlDefinitionItem.Serialization.cs index a7a116a93eb2..cbf01ea6a304 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecureScoreControlDefinitionItem.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecureScoreControlDefinitionItem.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecureScoreControlDefinitionItem : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(SecureScoreControlDefinitionItem)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(DisplayName)) @@ -81,22 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecureScoreControlDefinitionItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecureScoreControlDefinitionList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecureScoreControlDefinitionList.Serialization.cs index 5de5f2c69ee1..af7eab9b6573 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecureScoreControlDefinitionList.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecureScoreControlDefinitionList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class SecureScoreControlDefinitionList : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(SecureScoreControlDefinitionList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } SecureScoreControlDefinitionList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecureScoreControlDefinitionSource.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecureScoreControlDefinitionSource.Serialization.cs index b80bcdc818ff..0837eafb6975 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecureScoreControlDefinitionSource.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecureScoreControlDefinitionSource.Serialization.cs @@ -18,6 +18,15 @@ internal partial class SecureScoreControlDefinitionSource : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(SecureScoreControlDefinitionSource)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(SourceType)) { writer.WritePropertyName("sourceType"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } SecureScoreControlDefinitionSource IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecureScoreControlDetails.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecureScoreControlDetails.Serialization.cs index 0bbb97b523f2..65eef446ecd0 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecureScoreControlDetails.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecureScoreControlDetails.Serialization.cs @@ -19,6 +19,15 @@ public partial class SecureScoreControlDetails : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(SecureScoreControlDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(DisplayName)) @@ -98,22 +87,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea } writer.WriteEndObject(); writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecureScoreControlDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecureScoreControlList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecureScoreControlList.Serialization.cs index e74a86b20e0f..bbde4ec95994 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecureScoreControlList.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecureScoreControlList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class SecureScoreControlList : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(SecureScoreControlList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } SecureScoreControlList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecureScoresList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecureScoresList.Serialization.cs index a4b95a85872a..5178ea16ad82 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecureScoresList.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecureScoresList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class SecureScoresList : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(SecureScoresList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } SecureScoresList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAlertEntity.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAlertEntity.Serialization.cs index 2131e2eac38f..ec5af689fa22 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAlertEntity.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAlertEntity.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityAlertEntity : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(SecurityAlertEntity)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(AlertEntityType)) { writer.WritePropertyName("type"u8); @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri } #endif } - writer.WriteEndObject(); } SecurityAlertEntity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAlertResourceIdentifier.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAlertResourceIdentifier.Serialization.cs index 1c3cd4624609..4da0de624aa8 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAlertResourceIdentifier.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAlertResourceIdentifier.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityAlertResourceIdentifier : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(SecurityAlertResourceIdentifier)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("type"u8); writer.WriteStringValue(ResourceIdentifierType.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } SecurityAlertResourceIdentifier IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAlertSimulatorBundlesRequestProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAlertSimulatorBundlesRequestProperties.Serialization.cs index 0e8c6cb3513a..5848e58dd3a5 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAlertSimulatorBundlesRequestProperties.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAlertSimulatorBundlesRequestProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityAlertSimulatorBundlesRequestProperties : IUtf8JsonS void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWr throw new FormatException($"The model {nameof(SecurityAlertSimulatorBundlesRequestProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(Bundles)) { writer.WritePropertyName("bundles"u8); @@ -36,8 +45,6 @@ void IJsonModel.Write(Utf8JsonWr } writer.WriteEndArray(); } - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); foreach (var item in AdditionalProperties) { writer.WritePropertyName(item.Key); @@ -50,7 +57,6 @@ void IJsonModel.Write(Utf8JsonWr } #endif } - writer.WriteEndObject(); } SecurityAlertSimulatorBundlesRequestProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAlertSimulatorContent.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAlertSimulatorContent.Serialization.cs index 041361daa05f..4f6753f1eb18 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAlertSimulatorContent.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAlertSimulatorContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityAlertSimulatorContent : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(SecurityAlertSimulatorContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } SecurityAlertSimulatorContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAlertSimulatorRequestProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAlertSimulatorRequestProperties.Serialization.cs index d1e2b56373d3..94807e23ee5b 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAlertSimulatorRequestProperties.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAlertSimulatorRequestProperties.Serialization.cs @@ -17,6 +17,15 @@ public partial class SecurityAlertSimulatorRequestProperties : IUtf8JsonSerializ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -24,7 +33,6 @@ void IJsonModel.Write(Utf8JsonWriter wr throw new FormatException($"The model {nameof(SecurityAlertSimulatorRequestProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("kind"u8); writer.WriteStringValue(Kind.ToString()); foreach (var item in AdditionalProperties) @@ -39,7 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter wr } #endif } - writer.WriteEndObject(); } SecurityAlertSimulatorRequestProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAlertSupportingEvidence.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAlertSupportingEvidence.Serialization.cs index 6f3a119f67eb..97944ea37172 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAlertSupportingEvidence.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAlertSupportingEvidence.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityAlertSupportingEvidence : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(SecurityAlertSupportingEvidence)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(SecurityAlertSupportingEvidenceType)) { writer.WritePropertyName("type"u8); @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo } #endif } - writer.WriteEndObject(); } SecurityAlertSupportingEvidence IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAlertSyncSettings.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAlertSyncSettings.Serialization.cs index 1c7482f58525..583b1b0265b9 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAlertSyncSettings.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAlertSyncSettings.Serialization.cs @@ -19,6 +19,15 @@ public partial class SecurityAlertSyncSettings : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,29 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(SecurityAlertSyncSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(IsEnabled)) @@ -57,22 +44,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea writer.WriteBooleanValue(IsEnabled.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityAlertSyncSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentCreateOrUpdateContent.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentCreateOrUpdateContent.Serialization.cs index facd1d6bcc67..ceafc251555a 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentCreateOrUpdateContent.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentCreateOrUpdateContent.Serialization.cs @@ -19,6 +19,15 @@ public partial class SecurityAssessmentCreateOrUpdateContent : IUtf8JsonSerializ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter wr throw new FormatException($"The model {nameof(SecurityAssessmentCreateOrUpdateContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(ResourceDetails)) @@ -91,22 +80,6 @@ void IJsonModel.Write(Utf8JsonWriter wr writer.WriteObjectValue(Status, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityAssessmentCreateOrUpdateContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentList.Serialization.cs index ed3f342d4144..79bc952254ba 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentList.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class SecurityAssessmentList : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(SecurityAssessmentList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } SecurityAssessmentList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentMetadataPartner.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentMetadataPartner.Serialization.cs index 4430c6992e5b..a3053c35137e 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentMetadataPartner.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentMetadataPartner.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityAssessmentMetadataPartner : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(SecurityAssessmentMetadataPartner)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("partnerName"u8); writer.WriteStringValue(PartnerName); if (Optional.IsDefined(ProductName)) @@ -50,7 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } SecurityAssessmentMetadataPartner IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentMetadataProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentMetadataProperties.Serialization.cs index 4578aa222d1c..28f915ecef70 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentMetadataProperties.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentMetadataProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityAssessmentMetadataProperties : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(SecurityAssessmentMetadataProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("displayName"u8); writer.WriteStringValue(DisplayName); if (options.Format != "W" && Optional.IsDefined(PolicyDefinitionId)) @@ -102,7 +110,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } SecurityAssessmentMetadataProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentMetadataResponseList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentMetadataResponseList.Serialization.cs index d86f0d08d60d..dbcf00b1f858 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentMetadataResponseList.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentMetadataResponseList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class SecurityAssessmentMetadataResponseList : IUtf8JsonSeriali void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(SecurityAssessmentMetadataResponseList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } SecurityAssessmentMetadataResponseList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentPartner.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentPartner.Serialization.cs index c84bc181d51c..4e5397a10358 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentPartner.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentPartner.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityAssessmentPartner : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(SecurityAssessmentPartner)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("partnerName"u8); writer.WriteStringValue(PartnerName); writer.WritePropertyName("secret"u8); @@ -45,7 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } SecurityAssessmentPartner IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentPublishDates.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentPublishDates.Serialization.cs index f7a5736aa66e..0ad64217a113 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentPublishDates.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentPublishDates.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityAssessmentPublishDates : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(SecurityAssessmentPublishDates)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(GA)) { writer.WritePropertyName("GA"u8); @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } SecurityAssessmentPublishDates IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentStatus.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentStatus.Serialization.cs index e42ae5385a9c..1c8a93da957f 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentStatus.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentStatus.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityAssessmentStatus : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(SecurityAssessmentStatus)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("code"u8); writer.WriteStringValue(Code.ToString()); if (Optional.IsDefined(Cause)) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } SecurityAssessmentStatus IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentStatusResult.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentStatusResult.Serialization.cs index 5081eb624f38..cba52e53ea54 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentStatusResult.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentStatusResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityAssessmentStatusResult : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(SecurityAssessmentStatusResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(FirstEvaluatedOn)) { writer.WritePropertyName("firstEvaluationDate"u8); @@ -36,34 +45,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod writer.WritePropertyName("statusChangeDate"u8); writer.WriteStringValue(StatusChangeOn.Value, "O"); } - writer.WritePropertyName("code"u8); - writer.WriteStringValue(Code.ToString()); - if (Optional.IsDefined(Cause)) - { - writer.WritePropertyName("cause"u8); - writer.WriteStringValue(Cause); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityAssessmentStatusResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationAction.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationAction.Serialization.cs index 9d5f34dcc103..9d919bfb90c4 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationAction.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationAction.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityAutomationAction : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(SecurityAutomationAction)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("actionType"u8); writer.WriteStringValue(ActionType.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } SecurityAutomationAction IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationActionEventHub.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationActionEventHub.Serialization.cs index b8b3041bee52..16b88860a8d8 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationActionEventHub.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationActionEventHub.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityAutomationActionEventHub : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(SecurityAutomationActionEventHub)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(EventHubResourceId)) { writer.WritePropertyName("eventHubResourceId"u8); @@ -41,24 +50,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M writer.WritePropertyName("connectionString"u8); writer.WriteStringValue(ConnectionString); } - writer.WritePropertyName("actionType"u8); - writer.WriteStringValue(ActionType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityAutomationActionEventHub IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationActionLogicApp.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationActionLogicApp.Serialization.cs index 4a40a22bb679..5d46d60e3c8b 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationActionLogicApp.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationActionLogicApp.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityAutomationActionLogicApp : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(SecurityAutomationActionLogicApp)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(LogicAppResourceId)) { writer.WritePropertyName("logicAppResourceId"u8); @@ -36,24 +45,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M writer.WritePropertyName("uri"u8); writer.WriteStringValue(Uri.AbsoluteUri); } - writer.WritePropertyName("actionType"u8); - writer.WriteStringValue(ActionType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityAutomationActionLogicApp IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationActionWorkspace.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationActionWorkspace.Serialization.cs index af3a237c8f85..1a0d12ba3498 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationActionWorkspace.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationActionWorkspace.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityAutomationActionWorkspace : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,30 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(SecurityAutomationActionWorkspace)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(WorkspaceResourceId)) { writer.WritePropertyName("workspaceResourceId"u8); writer.WriteStringValue(WorkspaceResourceId); } - writer.WritePropertyName("actionType"u8); - writer.WriteStringValue(ActionType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityAutomationActionWorkspace IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationRuleSet.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationRuleSet.Serialization.cs index 715a175cc658..8b3eceaa0fe9 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationRuleSet.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationRuleSet.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityAutomationRuleSet : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(SecurityAutomationRuleSet)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Rules)) { writer.WritePropertyName("rules"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } SecurityAutomationRuleSet IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationScope.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationScope.Serialization.cs index 75324d0b77ac..3114ca5c5819 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationScope.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationScope.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityAutomationScope : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(SecurityAutomationScope)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Description)) { writer.WritePropertyName("description"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } SecurityAutomationScope IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationSource.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationSource.Serialization.cs index 60e9a65d3a4a..2295d9c79430 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationSource.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationSource.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityAutomationSource : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(SecurityAutomationSource)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(EventSource)) { writer.WritePropertyName("eventSource"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } SecurityAutomationSource IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationTriggeringRule.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationTriggeringRule.Serialization.cs index 9a6a379640a3..982bb6943fdf 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationTriggeringRule.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationTriggeringRule.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityAutomationTriggeringRule : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(SecurityAutomationTriggeringRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(PropertyJPath)) { writer.WritePropertyName("propertyJPath"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } SecurityAutomationTriggeringRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationValidationStatus.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationValidationStatus.Serialization.cs index 4018d92fed56..3e5a542d8e92 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationValidationStatus.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationValidationStatus.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityAutomationValidationStatus : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(SecurityAutomationValidationStatus)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IsValid)) { writer.WritePropertyName("isValid"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } SecurityAutomationValidationStatus IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCenterAllowedConnection.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCenterAllowedConnection.Serialization.cs index cc8bcea676a4..65b65a21c9d5 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCenterAllowedConnection.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCenterAllowedConnection.Serialization.cs @@ -19,6 +19,15 @@ public partial class SecurityCenterAllowedConnection : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,32 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(SecurityCenterAllowedConnection)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(Location)) { writer.WritePropertyName("location"u8); writer.WriteStringValue(Location.Value); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(CalculatedOn)) @@ -70,22 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityCenterAllowedConnection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCenterCloudOffering.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCenterCloudOffering.Serialization.cs index fa6b7c20a094..43e0130f5274 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCenterCloudOffering.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCenterCloudOffering.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityCenterCloudOffering : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(SecurityCenterCloudOffering)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("offeringType"u8); writer.WriteStringValue(OfferingType.ToString()); if (options.Format != "W" && Optional.IsDefined(Description)) @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } SecurityCenterCloudOffering IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCenterFileProtectionMode.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCenterFileProtectionMode.Serialization.cs index e5769bd204d8..4970dc8d412e 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCenterFileProtectionMode.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCenterFileProtectionMode.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityCenterFileProtectionMode : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(SecurityCenterFileProtectionMode)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Exe)) { writer.WritePropertyName("exe"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } SecurityCenterFileProtectionMode IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCenterPublisherInfo.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCenterPublisherInfo.Serialization.cs index 8da0ffaeae25..e1fed3358adc 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCenterPublisherInfo.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCenterPublisherInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityCenterPublisherInfo : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(SecurityCenterPublisherInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(PublisherName)) { writer.WritePropertyName("publisherName"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } SecurityCenterPublisherInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCenterResourceDetails.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCenterResourceDetails.Serialization.cs index ffe5b8d7e401..b5245566cd8b 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCenterResourceDetails.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCenterResourceDetails.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityCenterResourceDetails : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(SecurityCenterResourceDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("source"u8); writer.WriteStringValue(Source.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } SecurityCenterResourceDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCenterTagsResourceInfo.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCenterTagsResourceInfo.Serialization.cs index 75faf0c4f16c..2342bb8fa0d3 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCenterTagsResourceInfo.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCenterTagsResourceInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityCenterTagsResourceInfo : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(SecurityCenterTagsResourceInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } SecurityCenterTagsResourceInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityConnectorEnvironment.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityConnectorEnvironment.Serialization.cs index 5ed1f3c0ec52..8d3f59323fc3 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityConnectorEnvironment.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityConnectorEnvironment.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityConnectorEnvironment : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(SecurityConnectorEnvironment)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("environmentType"u8); writer.WriteStringValue(EnvironmentType.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } SecurityConnectorEnvironment IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityConnectorGitHubOwnerProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityConnectorGitHubOwnerProperties.Serialization.cs index 000ad7013cc8..34dd212b937c 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityConnectorGitHubOwnerProperties.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityConnectorGitHubOwnerProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityConnectorGitHubOwnerProperties : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(SecurityConnectorGitHubOwnerProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningStatusMessage)) { writer.WritePropertyName("provisioningStatusMessage"u8); @@ -71,7 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } SecurityConnectorGitHubOwnerProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityConnectorGitHubRepositoryProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityConnectorGitHubRepositoryProperties.Serialization.cs index 2fbf378bcee8..b0fc0a439e4a 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityConnectorGitHubRepositoryProperties.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityConnectorGitHubRepositoryProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityConnectorGitHubRepositoryProperties : IUtf8JsonSeri void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWrite throw new FormatException($"The model {nameof(SecurityConnectorGitHubRepositoryProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningStatusMessage)) { writer.WritePropertyName("provisioningStatusMessage"u8); @@ -86,7 +94,6 @@ void IJsonModel.Write(Utf8JsonWrite #endif } } - writer.WriteEndObject(); } SecurityConnectorGitHubRepositoryProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityConnectorGitLabGroupProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityConnectorGitLabGroupProperties.Serialization.cs index 1025a42a9dd1..feec2a9c3cf4 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityConnectorGitLabGroupProperties.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityConnectorGitLabGroupProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityConnectorGitLabGroupProperties : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(SecurityConnectorGitLabGroupProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningStatusMessage)) { writer.WritePropertyName("provisioningStatusMessage"u8); @@ -76,7 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } SecurityConnectorGitLabGroupProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityConnectorGitLabProjectProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityConnectorGitLabProjectProperties.Serialization.cs index 0ccc22fc3313..e3d7e721db4d 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityConnectorGitLabProjectProperties.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityConnectorGitLabProjectProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityConnectorGitLabProjectProperties : IUtf8JsonSeriali void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter w throw new FormatException($"The model {nameof(SecurityConnectorGitLabProjectProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningStatusMessage)) { writer.WritePropertyName("provisioningStatusMessage"u8); @@ -81,7 +89,6 @@ void IJsonModel.Write(Utf8JsonWriter w #endif } } - writer.WriteEndObject(); } SecurityConnectorGitLabProjectProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityConnectorsList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityConnectorsList.Serialization.cs index 11e630b3e47e..40180f3dfd01 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityConnectorsList.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityConnectorsList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class SecurityConnectorsList : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(SecurityConnectorsList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } SecurityConnectorsList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityContactList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityContactList.Serialization.cs index de40caba9482..069020b7fd39 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityContactList.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityContactList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class SecurityContactList : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(SecurityContactList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } SecurityContactList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityContactPropertiesAlertNotifications.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityContactPropertiesAlertNotifications.Serialization.cs index aa689f0e38e2..ef4bea84b085 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityContactPropertiesAlertNotifications.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityContactPropertiesAlertNotifications.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityContactPropertiesAlertNotifications : IUtf8JsonSeri void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWrite throw new FormatException($"The model {nameof(SecurityContactPropertiesAlertNotifications)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(State)) { writer.WritePropertyName("state"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWrite #endif } } - writer.WriteEndObject(); } SecurityContactPropertiesAlertNotifications IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityContactPropertiesNotificationsByRole.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityContactPropertiesNotificationsByRole.Serialization.cs index 6c44b173ec46..417945ae1f9c 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityContactPropertiesNotificationsByRole.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityContactPropertiesNotificationsByRole.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityContactPropertiesNotificationsByRole : IUtf8JsonSer void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWrit throw new FormatException($"The model {nameof(SecurityContactPropertiesNotificationsByRole)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(State)) { writer.WritePropertyName("state"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWrit #endif } } - writer.WriteEndObject(); } SecurityContactPropertiesNotificationsByRole IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCve.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCve.Serialization.cs index 844d20533f46..641a8cb66316 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCve.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCve.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityCve : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio throw new FormatException($"The model {nameof(SecurityCve)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Title)) { writer.WritePropertyName("title"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio #endif } } - writer.WriteEndObject(); } SecurityCve IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCvss.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCvss.Serialization.cs index bf3eda61c2b4..62103492eec4 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCvss.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCvss.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityCvss : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(SecurityCvss)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Base)) { writer.WritePropertyName("base"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti #endif } } - writer.WriteEndObject(); } SecurityCvss IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityHealthReportIssue.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityHealthReportIssue.Serialization.cs index d157039a2daf..8af5f3dc2a69 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityHealthReportIssue.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityHealthReportIssue.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityHealthReportIssue : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(SecurityHealthReportIssue)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("issueKey"u8); writer.WriteStringValue(IssueKey); if (Optional.IsDefined(IssueName)) @@ -84,7 +92,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } SecurityHealthReportIssue IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityInformationTypeInfo.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityInformationTypeInfo.Serialization.cs index be140ea78b94..349e9fac12a9 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityInformationTypeInfo.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityInformationTypeInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityInformationTypeInfo : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(SecurityInformationTypeInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(DisplayName)) { writer.WritePropertyName("displayName"u8); @@ -81,7 +89,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } SecurityInformationTypeInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityOperatorList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityOperatorList.Serialization.cs index 73cac0d9525c..d5813e3e23c7 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityOperatorList.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityOperatorList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class SecurityOperatorList : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(SecurityOperatorList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } SecurityOperatorList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecuritySolution.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecuritySolution.Serialization.cs index 0939d006318d..e0318be09a93 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecuritySolution.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecuritySolution.Serialization.cs @@ -19,6 +19,15 @@ public partial class SecuritySolution : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,32 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(SecuritySolution)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(Location)) { writer.WritePropertyName("location"u8); writer.WriteStringValue(Location.Value); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(SecurityFamily)) @@ -75,22 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter writer.WriteStringValue(ProtectionStatus); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecuritySolution IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecuritySolutionList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecuritySolutionList.Serialization.cs index bb10ad59cd16..88c3439a33eb 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecuritySolutionList.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecuritySolutionList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class SecuritySolutionList : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(SecuritySolutionList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } SecuritySolutionList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecuritySolutionsReferenceData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecuritySolutionsReferenceData.Serialization.cs index 0d470502d09c..73f32e8fa7cd 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecuritySolutionsReferenceData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecuritySolutionsReferenceData.Serialization.cs @@ -19,6 +19,15 @@ public partial class SecuritySolutionsReferenceData : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,32 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(SecuritySolutionsReferenceData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(Location)) { writer.WritePropertyName("location"u8); writer.WriteStringValue(Location.Value); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); writer.WritePropertyName("securityFamily"u8); @@ -69,22 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod writer.WritePropertyName("template"u8); writer.WriteStringValue(Template); writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecuritySolutionsReferenceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecuritySolutionsReferenceDataList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecuritySolutionsReferenceDataList.Serialization.cs index 327546da9dd0..71da251f9856 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecuritySolutionsReferenceDataList.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecuritySolutionsReferenceDataList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class SecuritySolutionsReferenceDataList : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(SecuritySolutionsReferenceDataList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } SecuritySolutionsReferenceDataList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecuritySubAssessmentAdditionalInfo.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecuritySubAssessmentAdditionalInfo.Serialization.cs index b50d41e97696..796a4d62b281 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecuritySubAssessmentAdditionalInfo.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecuritySubAssessmentAdditionalInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecuritySubAssessmentAdditionalInfo : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(SecuritySubAssessmentAdditionalInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("assessedResourceType"u8); writer.WriteStringValue(AssessedResourceType.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } SecuritySubAssessmentAdditionalInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecuritySubAssessmentList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecuritySubAssessmentList.Serialization.cs index 155abe37b20b..a7c1ed635731 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecuritySubAssessmentList.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecuritySubAssessmentList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class SecuritySubAssessmentList : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(SecuritySubAssessmentList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } SecuritySubAssessmentList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityTaskList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityTaskList.Serialization.cs index 2ecce4e19ef1..b25b53390f1e 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityTaskList.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityTaskList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class SecurityTaskList : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(SecurityTaskList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } SecurityTaskList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityTaskProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityTaskProperties.Serialization.cs index a7f898ec3f0b..58e905b5a306 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityTaskProperties.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityTaskProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityTaskProperties : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(SecurityTaskProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader } #endif } - writer.WriteEndObject(); } SecurityTaskProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityTopologyResource.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityTopologyResource.Serialization.cs index 1c24dd154cd7..286a82af981d 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityTopologyResource.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityTopologyResource.Serialization.cs @@ -19,6 +19,15 @@ public partial class SecurityTopologyResource : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,32 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(SecurityTopologyResource)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(Location)) { writer.WritePropertyName("location"u8); writer.WriteStringValue(Location.Value); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(CalculatedOn)) @@ -70,22 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityTopologyResource IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SensitivityLabel.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SensitivityLabel.Serialization.cs index 2fb7be4b6a85..cab5caa6c8cd 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SensitivityLabel.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SensitivityLabel.Serialization.cs @@ -18,6 +18,15 @@ public partial class SensitivityLabel : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(SensitivityLabel)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(DisplayName)) { writer.WritePropertyName("displayName"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } SensitivityLabel IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SensitivitySettingCreateOrUpdateContent.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SensitivitySettingCreateOrUpdateContent.Serialization.cs index 58802ce0f98d..cf773d82b941 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SensitivitySettingCreateOrUpdateContent.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SensitivitySettingCreateOrUpdateContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class SensitivitySettingCreateOrUpdateContent : IUtf8JsonSerializ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wr throw new FormatException($"The model {nameof(SensitivitySettingCreateOrUpdateContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("sensitiveInfoTypesIds"u8); writer.WriteStartArray(); foreach (var item in SensitiveInfoTypesIds) @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter wr #endif } } - writer.WriteEndObject(); } SensitivitySettingCreateOrUpdateContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SensitivitySettingsProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SensitivitySettingsProperties.Serialization.cs index 165cec020f4a..c4c0230720cc 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SensitivitySettingsProperties.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SensitivitySettingsProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class SensitivitySettingsProperties : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(SensitivitySettingsProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(SensitiveInfoTypesIds)) { writer.WritePropertyName("sensitiveInfoTypesIds"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } SensitivitySettingsProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ServerVulnerabilityAssessmentsList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ServerVulnerabilityAssessmentsList.Serialization.cs index 123143c19b2f..e9560428a83a 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ServerVulnerabilityAssessmentsList.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ServerVulnerabilityAssessmentsList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ServerVulnerabilityAssessmentsList : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(ServerVulnerabilityAssessmentsList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } ServerVulnerabilityAssessmentsList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ServerVulnerabilityAssessmentsSettingsList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ServerVulnerabilityAssessmentsSettingsList.Serialization.cs index 749c670559f2..7150cc31f89c 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ServerVulnerabilityAssessmentsSettingsList.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ServerVulnerabilityAssessmentsSettingsList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ServerVulnerabilityAssessmentsSettingsList : IUtf8JsonSer void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(ServerVulnerabilityAssessmentsSettingsList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } ServerVulnerabilityAssessmentsSettingsList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ServerVulnerabilityProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ServerVulnerabilityProperties.Serialization.cs index 64df3b2ac82a..e3a66265f2fb 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ServerVulnerabilityProperties.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ServerVulnerabilityProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class ServerVulnerabilityProperties : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(ServerVulnerabilityProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ServerVulnerabilityType)) { writer.WritePropertyName("type"u8); @@ -77,24 +86,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode } writer.WriteEndArray(); } - writer.WritePropertyName("assessedResourceType"u8); - writer.WriteStringValue(AssessedResourceType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ServerVulnerabilityProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ServicePrincipalProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ServicePrincipalProperties.Serialization.cs index 468137d5ec9b..3f715c412c7f 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ServicePrincipalProperties.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ServicePrincipalProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class ServicePrincipalProperties : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(ServicePrincipalProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ApplicationId)) { writer.WritePropertyName("applicationId"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } ServicePrincipalProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SettingsList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SettingsList.Serialization.cs index 3e912b86fb41..51509c6f78c9 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SettingsList.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SettingsList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class SettingsList : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(SettingsList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti #endif } } - writer.WriteEndObject(); } SettingsList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SoftwaresList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SoftwaresList.Serialization.cs index fb99d21f0b81..1935d1e39392 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SoftwaresList.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SoftwaresList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class SoftwaresList : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt throw new FormatException($"The model {nameof(SoftwaresList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt #endif } } - writer.WriteEndObject(); } SoftwaresList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SqlServerVulnerabilityProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SqlServerVulnerabilityProperties.Serialization.cs index 97e145979a1e..44e4359c1fb4 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SqlServerVulnerabilityProperties.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SqlServerVulnerabilityProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class SqlServerVulnerabilityProperties : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(SqlServerVulnerabilityProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(SqlServerVulnerabilityType)) { writer.WritePropertyName("type"u8); @@ -36,24 +45,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M writer.WritePropertyName("query"u8); writer.WriteStringValue(Query); } - writer.WritePropertyName("assessedResourceType"u8); - writer.WriteStringValue(AssessedResourceType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SqlServerVulnerabilityProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SqlVulnerabilityAssessmentBaseline.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SqlVulnerabilityAssessmentBaseline.Serialization.cs index df4f9bc38fde..e75dad93663f 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SqlVulnerabilityAssessmentBaseline.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SqlVulnerabilityAssessmentBaseline.Serialization.cs @@ -18,6 +18,15 @@ public partial class SqlVulnerabilityAssessmentBaseline : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(SqlVulnerabilityAssessmentBaseline)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(ExpectedResults)) { writer.WritePropertyName("expectedResults"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } SqlVulnerabilityAssessmentBaseline IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SqlVulnerabilityAssessmentBaselineRuleCreateOrUpdateContent.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SqlVulnerabilityAssessmentBaselineRuleCreateOrUpdateContent.Serialization.cs index 0167223cf483..ec48daf0e0bb 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SqlVulnerabilityAssessmentBaselineRuleCreateOrUpdateContent.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SqlVulnerabilityAssessmentBaselineRuleCreateOrUpdateContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class SqlVulnerabilityAssessmentBaselineRuleCreateOrUpdateContent void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Wri throw new FormatException($"The model {nameof(SqlVulnerabilityAssessmentBaselineRuleCreateOrUpdateContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(LatestScan)) { writer.WritePropertyName("latestScan"u8); @@ -66,7 +74,6 @@ void IJsonModel.Wri #endif } } - writer.WriteEndObject(); } SqlVulnerabilityAssessmentBaselineRuleCreateOrUpdateContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SqlVulnerabilityAssessmentRemediation.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SqlVulnerabilityAssessmentRemediation.Serialization.cs index fc67aff7fc3f..471aefc6358e 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SqlVulnerabilityAssessmentRemediation.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SqlVulnerabilityAssessmentRemediation.Serialization.cs @@ -18,6 +18,15 @@ public partial class SqlVulnerabilityAssessmentRemediation : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(SqlVulnerabilityAssessmentRemediation)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Description)) { writer.WritePropertyName("description"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } SqlVulnerabilityAssessmentRemediation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SqlVulnerabilityAssessmentScanProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SqlVulnerabilityAssessmentScanProperties.Serialization.cs index af5787356337..17ef8a8d6054 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SqlVulnerabilityAssessmentScanProperties.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SqlVulnerabilityAssessmentScanProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class SqlVulnerabilityAssessmentScanProperties : IUtf8JsonSeriali void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter w throw new FormatException($"The model {nameof(SqlVulnerabilityAssessmentScanProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(TriggerType)) { writer.WritePropertyName("triggerType"u8); @@ -116,7 +124,6 @@ void IJsonModel.Write(Utf8JsonWriter w #endif } } - writer.WriteEndObject(); } SqlVulnerabilityAssessmentScanProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SqlVulnerabilityAssessmentScanResult.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SqlVulnerabilityAssessmentScanResult.Serialization.cs index ec2bf76bec97..b20b94ee268c 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SqlVulnerabilityAssessmentScanResult.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SqlVulnerabilityAssessmentScanResult.Serialization.cs @@ -19,6 +19,15 @@ public partial class SqlVulnerabilityAssessmentScanResult : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,48 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(SqlVulnerabilityAssessmentScanResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); writer.WriteObjectValue(Properties, options); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SqlVulnerabilityAssessmentScanResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SqlVulnerabilityAssessmentScanResultProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SqlVulnerabilityAssessmentScanResultProperties.Serialization.cs index 4f2479464113..1a6b1bca6e6b 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SqlVulnerabilityAssessmentScanResultProperties.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SqlVulnerabilityAssessmentScanResultProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class SqlVulnerabilityAssessmentScanResultProperties : IUtf8JsonS void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWr throw new FormatException($"The model {nameof(SqlVulnerabilityAssessmentScanResultProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(RuleId)) { writer.WritePropertyName("ruleId"u8); @@ -91,7 +99,6 @@ void IJsonModel.Write(Utf8JsonWr #endif } } - writer.WriteEndObject(); } SqlVulnerabilityAssessmentScanResultProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SubAssessmentStatus.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SubAssessmentStatus.Serialization.cs index 688b83eff4e7..e09c14d64a55 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SubAssessmentStatus.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SubAssessmentStatus.Serialization.cs @@ -18,6 +18,15 @@ public partial class SubAssessmentStatus : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(SubAssessmentStatus)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Code)) { writer.WritePropertyName("code"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } SubAssessmentStatus IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SuppressionAlertsScope.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SuppressionAlertsScope.Serialization.cs index c59f4a5a0cd9..af5804ac4bbd 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SuppressionAlertsScope.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SuppressionAlertsScope.Serialization.cs @@ -18,6 +18,15 @@ internal partial class SuppressionAlertsScope : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(SuppressionAlertsScope)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("allOf"u8); writer.WriteStartArray(); foreach (var item in AllOf) @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } SuppressionAlertsScope IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SuppressionAlertsScopeElement.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SuppressionAlertsScopeElement.Serialization.cs index af0e32a5b50d..e3f0a937e2ae 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SuppressionAlertsScopeElement.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SuppressionAlertsScopeElement.Serialization.cs @@ -18,6 +18,15 @@ public partial class SuppressionAlertsScopeElement : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(SuppressionAlertsScopeElement)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Field)) { writer.WritePropertyName("field"u8); @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode } #endif } - writer.WriteEndObject(); } SuppressionAlertsScopeElement IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/TargetBranchConfiguration.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/TargetBranchConfiguration.Serialization.cs index 3b4ae0245479..034932a8bcde 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/TargetBranchConfiguration.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/TargetBranchConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class TargetBranchConfiguration : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(TargetBranchConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(BranchNames)) { writer.WritePropertyName("branchNames"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } TargetBranchConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ThresholdCustomAlertRule.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ThresholdCustomAlertRule.Serialization.cs index 3d6ab31dff05..e22235061ce2 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ThresholdCustomAlertRule.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ThresholdCustomAlertRule.Serialization.cs @@ -18,6 +18,15 @@ public partial class ThresholdCustomAlertRule : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,41 +34,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(ThresholdCustomAlertRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("minThreshold"u8); writer.WriteNumberValue(MinThreshold); writer.WritePropertyName("maxThreshold"u8); writer.WriteNumberValue(MaxThreshold); - if (options.Format != "W" && Optional.IsDefined(DisplayName)) - { - writer.WritePropertyName("displayName"u8); - writer.WriteStringValue(DisplayName); - } - if (options.Format != "W" && Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - writer.WritePropertyName("isEnabled"u8); - writer.WriteBooleanValue(IsEnabled); - writer.WritePropertyName("ruleType"u8); - writer.WriteStringValue(RuleType); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ThresholdCustomAlertRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/TimeWindowCustomAlertRule.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/TimeWindowCustomAlertRule.Serialization.cs index efbf13a0c974..19adb007caf8 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/TimeWindowCustomAlertRule.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/TimeWindowCustomAlertRule.Serialization.cs @@ -18,6 +18,15 @@ public partial class TimeWindowCustomAlertRule : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,43 +34,9 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(TimeWindowCustomAlertRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("timeWindowSize"u8); writer.WriteStringValue(TimeWindowSize, "P"); - writer.WritePropertyName("minThreshold"u8); - writer.WriteNumberValue(MinThreshold); - writer.WritePropertyName("maxThreshold"u8); - writer.WriteNumberValue(MaxThreshold); - if (options.Format != "W" && Optional.IsDefined(DisplayName)) - { - writer.WritePropertyName("displayName"u8); - writer.WriteStringValue(DisplayName); - } - if (options.Format != "W" && Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - writer.WritePropertyName("isEnabled"u8); - writer.WriteBooleanValue(IsEnabled); - writer.WritePropertyName("ruleType"u8); - writer.WriteStringValue(RuleType); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } TimeWindowCustomAlertRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/TopologyList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/TopologyList.Serialization.cs index 4ac0c27180d3..c803d101a515 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/TopologyList.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/TopologyList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class TopologyList : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(TopologyList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti #endif } } - writer.WriteEndObject(); } TopologyList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/TopologySingleResource.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/TopologySingleResource.Serialization.cs index 876d6bc6da83..1ce607fda9f2 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/TopologySingleResource.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/TopologySingleResource.Serialization.cs @@ -18,6 +18,15 @@ public partial class TopologySingleResource : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(TopologySingleResource)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ResourceId)) { writer.WritePropertyName("resourceId"u8); @@ -91,7 +99,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } TopologySingleResource IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/TopologySingleResourceChild.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/TopologySingleResourceChild.Serialization.cs index 893a2224dbb0..61aea8a4ef61 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/TopologySingleResourceChild.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/TopologySingleResourceChild.Serialization.cs @@ -18,6 +18,15 @@ public partial class TopologySingleResourceChild : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(TopologySingleResourceChild)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ResourceId)) { writer.WritePropertyName("resourceId"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } TopologySingleResourceChild IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/TopologySingleResourceParent.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/TopologySingleResourceParent.Serialization.cs index 8f45af791be0..dbe8dae21cbf 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/TopologySingleResourceParent.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/TopologySingleResourceParent.Serialization.cs @@ -18,6 +18,15 @@ public partial class TopologySingleResourceParent : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(TopologySingleResourceParent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ResourceId)) { writer.WritePropertyName("resourceId"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } TopologySingleResourceParent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/TwinUpdatesNotInAllowedRange.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/TwinUpdatesNotInAllowedRange.Serialization.cs index 61361f911568..8f3bf02d7170 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/TwinUpdatesNotInAllowedRange.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/TwinUpdatesNotInAllowedRange.Serialization.cs @@ -18,6 +18,15 @@ public partial class TwinUpdatesNotInAllowedRange : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,43 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(TwinUpdatesNotInAllowedRange)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("timeWindowSize"u8); - writer.WriteStringValue(TimeWindowSize, "P"); - writer.WritePropertyName("minThreshold"u8); - writer.WriteNumberValue(MinThreshold); - writer.WritePropertyName("maxThreshold"u8); - writer.WriteNumberValue(MaxThreshold); - if (options.Format != "W" && Optional.IsDefined(DisplayName)) - { - writer.WritePropertyName("displayName"u8); - writer.WriteStringValue(DisplayName); - } - if (options.Format != "W" && Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - writer.WritePropertyName("isEnabled"u8); - writer.WriteBooleanValue(IsEnabled); - writer.WritePropertyName("ruleType"u8); - writer.WriteStringValue(RuleType); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } TwinUpdatesNotInAllowedRange IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnauthorizedOperationsNotInAllowedRange.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnauthorizedOperationsNotInAllowedRange.Serialization.cs index 047980835433..0feb9a81940f 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnauthorizedOperationsNotInAllowedRange.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnauthorizedOperationsNotInAllowedRange.Serialization.cs @@ -18,6 +18,15 @@ public partial class UnauthorizedOperationsNotInAllowedRange : IUtf8JsonSerializ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,43 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter wr throw new FormatException($"The model {nameof(UnauthorizedOperationsNotInAllowedRange)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("timeWindowSize"u8); - writer.WriteStringValue(TimeWindowSize, "P"); - writer.WritePropertyName("minThreshold"u8); - writer.WriteNumberValue(MinThreshold); - writer.WritePropertyName("maxThreshold"u8); - writer.WriteNumberValue(MaxThreshold); - if (options.Format != "W" && Optional.IsDefined(DisplayName)) - { - writer.WritePropertyName("displayName"u8); - writer.WriteStringValue(DisplayName); - } - if (options.Format != "W" && Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - writer.WritePropertyName("isEnabled"u8); - writer.WriteBooleanValue(IsEnabled); - writer.WritePropertyName("ruleType"u8); - writer.WriteStringValue(RuleType); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } UnauthorizedOperationsNotInAllowedRange IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownAdditionalData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownAdditionalData.Serialization.cs index 25cfa7aa52c2..8c58c3132b29 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownAdditionalData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownAdditionalData.Serialization.cs @@ -18,6 +18,15 @@ internal partial class UnknownAdditionalData : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,25 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(SecuritySubAssessmentAdditionalInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("assessedResourceType"u8); - writer.WriteStringValue(AssessedResourceType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } SecuritySubAssessmentAdditionalInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownAlertResourceIdentifier.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownAlertResourceIdentifier.Serialization.cs index 2ebd2766eba8..15050a09deb6 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownAlertResourceIdentifier.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownAlertResourceIdentifier.Serialization.cs @@ -18,6 +18,15 @@ internal partial class UnknownAlertResourceIdentifier : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,25 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(SecurityAlertResourceIdentifier)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceIdentifierType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } SecurityAlertResourceIdentifier IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownAlertSimulatorRequestProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownAlertSimulatorRequestProperties.Serialization.cs index de93c0ab260c..ded969cbfbe2 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownAlertSimulatorRequestProperties.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownAlertSimulatorRequestProperties.Serialization.cs @@ -18,6 +18,15 @@ internal partial class UnknownAlertSimulatorRequestProperties : IUtf8JsonSeriali void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,9 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter wr throw new FormatException($"The model {nameof(SecurityAlertSimulatorRequestProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); + base.JsonModelWriteCore(writer, options); foreach (var item in AdditionalProperties) { writer.WritePropertyName(item.Key); @@ -40,7 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter wr } #endif } - writer.WriteEndObject(); } SecurityAlertSimulatorRequestProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownAuthenticationDetailsProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownAuthenticationDetailsProperties.Serialization.cs index 9803a310689e..ae935d6507eb 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownAuthenticationDetailsProperties.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownAuthenticationDetailsProperties.Serialization.cs @@ -18,6 +18,15 @@ internal partial class UnknownAuthenticationDetailsProperties : IUtf8JsonSeriali void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,40 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(AuthenticationDetailsProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W" && Optional.IsDefined(AuthenticationProvisioningState)) - { - writer.WritePropertyName("authenticationProvisioningState"u8); - writer.WriteStringValue(AuthenticationProvisioningState.Value.ToString()); - } - if (options.Format != "W" && Optional.IsCollectionDefined(GrantedPermissions)) - { - writer.WritePropertyName("grantedPermissions"u8); - writer.WriteStartArray(); - foreach (var item in GrantedPermissions) - { - writer.WriteStringValue(item.ToString()); - } - writer.WriteEndArray(); - } - writer.WritePropertyName("authenticationType"u8); - writer.WriteStringValue(AuthenticationType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } AuthenticationDetailsProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownAutomationAction.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownAutomationAction.Serialization.cs index a5cfaac35888..23aa726010fc 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownAutomationAction.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownAutomationAction.Serialization.cs @@ -18,6 +18,15 @@ internal partial class UnknownAutomationAction : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,25 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(SecurityAutomationAction)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("actionType"u8); - writer.WriteStringValue(ActionType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } SecurityAutomationAction IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownAwsOrganizationalData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownAwsOrganizationalData.Serialization.cs index fb3a277d317b..3a18db2136ae 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownAwsOrganizationalData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownAwsOrganizationalData.Serialization.cs @@ -18,6 +18,15 @@ internal partial class UnknownAwsOrganizationalData : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,25 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(AwsOrganizationalInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("organizationMembershipType"u8); - writer.WriteStringValue(OrganizationMembershipType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } AwsOrganizationalInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownCloudOffering.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownCloudOffering.Serialization.cs index 6f155aaa5bb0..4840036496a0 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownCloudOffering.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownCloudOffering.Serialization.cs @@ -18,6 +18,15 @@ internal partial class UnknownCloudOffering : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,30 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(SecurityCenterCloudOffering)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("offeringType"u8); - writer.WriteStringValue(OfferingType.ToString()); - if (options.Format != "W" && Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } SecurityCenterCloudOffering IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownCustomAlertRule.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownCustomAlertRule.Serialization.cs index 0f09454cacc4..c5fc5f0f39d0 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownCustomAlertRule.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownCustomAlertRule.Serialization.cs @@ -18,6 +18,15 @@ internal partial class UnknownCustomAlertRule : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,37 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(CustomAlertRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W" && Optional.IsDefined(DisplayName)) - { - writer.WritePropertyName("displayName"u8); - writer.WriteStringValue(DisplayName); - } - if (options.Format != "W" && Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - writer.WritePropertyName("isEnabled"u8); - writer.WriteBooleanValue(IsEnabled); - writer.WritePropertyName("ruleType"u8); - writer.WriteStringValue(RuleType); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } CustomAlertRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownEnvironmentData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownEnvironmentData.Serialization.cs index dbd973a725e2..522e02e7d3f0 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownEnvironmentData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownEnvironmentData.Serialization.cs @@ -18,6 +18,15 @@ internal partial class UnknownEnvironmentData : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,25 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(SecurityConnectorEnvironment)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("environmentType"u8); - writer.WriteStringValue(EnvironmentType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } SecurityConnectorEnvironment IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownExternalSecuritySolution.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownExternalSecuritySolution.Serialization.cs index bcafcf814e1f..cb357c898ca6 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownExternalSecuritySolution.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownExternalSecuritySolution.Serialization.cs @@ -19,6 +19,15 @@ internal partial class UnknownExternalSecuritySolution : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,57 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(ExternalSecuritySolution)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Kind != null) - { - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.Value.ToString()); - } - else - { - writer.WriteNull("kind"); - } - if (options.Format != "W" && Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } ExternalSecuritySolution IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownGcpOrganizationalData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownGcpOrganizationalData.Serialization.cs index 43154fb5b65b..1d2c4b7763ef 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownGcpOrganizationalData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownGcpOrganizationalData.Serialization.cs @@ -18,6 +18,15 @@ internal partial class UnknownGcpOrganizationalData : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,25 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(GcpOrganizationalInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("organizationMembershipType"u8); - writer.WriteStringValue(OrganizationMembershipType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } GcpOrganizationalInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownResourceDetails.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownResourceDetails.Serialization.cs index 4b3fca68d290..f89f0ea25b46 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownResourceDetails.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownResourceDetails.Serialization.cs @@ -18,6 +18,15 @@ internal partial class UnknownResourceDetails : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,25 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(SecurityCenterResourceDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("source"u8); - writer.WriteStringValue(Source.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } SecurityCenterResourceDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownServerVulnerabilityAssessmentsSetting.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownServerVulnerabilityAssessmentsSetting.Serialization.cs index 3772843fc004..c25e0f1745a7 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownServerVulnerabilityAssessmentsSetting.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownServerVulnerabilityAssessmentsSetting.Serialization.cs @@ -19,6 +19,15 @@ internal partial class UnknownServerVulnerabilityAssessmentsSetting : IUtf8JsonS void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,45 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(ServerVulnerabilityAssessmentsSettingData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } ServerVulnerabilityAssessmentsSettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownSetting.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownSetting.Serialization.cs index ec1b57c22755..c2b92db34f0a 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownSetting.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownSetting.Serialization.cs @@ -19,6 +19,15 @@ internal partial class UnknownSetting : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,45 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(SecuritySettingData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } SecuritySettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UserDefinedInformationType.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UserDefinedInformationType.Serialization.cs index c535c603ccfb..f85391c4da6a 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UserDefinedInformationType.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UserDefinedInformationType.Serialization.cs @@ -18,6 +18,15 @@ public partial class UserDefinedInformationType : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(UserDefinedInformationType)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } UserDefinedInformationType IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UserDefinedResourcesProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UserDefinedResourcesProperties.Serialization.cs index 4cb86d88b885..d642de289e8a 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UserDefinedResourcesProperties.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UserDefinedResourcesProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class UserDefinedResourcesProperties : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(UserDefinedResourcesProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Query != null) { writer.WritePropertyName("query"u8); @@ -64,7 +72,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } UserDefinedResourcesProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UserRecommendation.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UserRecommendation.Serialization.cs index a272c473a624..ecb056fdd7b9 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UserRecommendation.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UserRecommendation.Serialization.cs @@ -18,6 +18,15 @@ public partial class UserRecommendation : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(UserRecommendation)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Username)) { writer.WritePropertyName("username"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } UserRecommendation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/VendorReference.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/VendorReference.Serialization.cs index 7225bb8c44c3..183713770c8b 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/VendorReference.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/VendorReference.Serialization.cs @@ -18,6 +18,15 @@ public partial class VendorReference : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(VendorReference)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Title)) { writer.WritePropertyName("title"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO #endif } } - writer.WriteEndObject(); } VendorReference IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/VmRecommendation.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/VmRecommendation.Serialization.cs index d8aada761fee..f8828f0c4d93 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/VmRecommendation.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/VmRecommendation.Serialization.cs @@ -18,6 +18,15 @@ public partial class VmRecommendation : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(VmRecommendation)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ConfigurationStatus)) { writer.WritePropertyName("configurationStatus"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } VmRecommendation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/VulnerabilityAssessmentRule.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/VulnerabilityAssessmentRule.Serialization.cs index 36594955c892..c187cf78636d 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/VulnerabilityAssessmentRule.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/VulnerabilityAssessmentRule.Serialization.cs @@ -18,6 +18,15 @@ public partial class VulnerabilityAssessmentRule : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(VulnerabilityAssessmentRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(RuleId)) { writer.WritePropertyName("ruleId"u8); @@ -91,7 +99,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } VulnerabilityAssessmentRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/VulnerabilityAssessmentRuleQueryCheck.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/VulnerabilityAssessmentRuleQueryCheck.Serialization.cs index 849f55fab94c..0ab1b27b3904 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/VulnerabilityAssessmentRuleQueryCheck.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/VulnerabilityAssessmentRuleQueryCheck.Serialization.cs @@ -18,6 +18,15 @@ public partial class VulnerabilityAssessmentRuleQueryCheck : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(VulnerabilityAssessmentRuleQueryCheck)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Query)) { writer.WritePropertyName("query"u8); @@ -76,7 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } VulnerabilityAssessmentRuleQueryCheck IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/WorkspaceSettingList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/WorkspaceSettingList.Serialization.cs index 4352ed843317..679401f6233c 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/WorkspaceSettingList.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/WorkspaceSettingList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class WorkspaceSettingList : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(WorkspaceSettingList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } WorkspaceSettingList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RegulatoryComplianceAssessmentData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RegulatoryComplianceAssessmentData.Serialization.cs index aff65dfe84df..ca58977daea2 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RegulatoryComplianceAssessmentData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RegulatoryComplianceAssessmentData.Serialization.cs @@ -20,6 +20,15 @@ public partial class RegulatoryComplianceAssessmentData : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(RegulatoryComplianceAssessmentData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Description)) @@ -91,22 +80,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteNumberValue(UnsupportedResources.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } RegulatoryComplianceAssessmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RegulatoryComplianceControlData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RegulatoryComplianceControlData.Serialization.cs index 8413d8493942..6e7b53658196 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RegulatoryComplianceControlData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RegulatoryComplianceControlData.Serialization.cs @@ -20,6 +20,15 @@ public partial class RegulatoryComplianceControlData : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(RegulatoryComplianceControlData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Description)) @@ -76,22 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo writer.WriteNumberValue(SkippedAssessments.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } RegulatoryComplianceControlData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RegulatoryComplianceStandardData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RegulatoryComplianceStandardData.Serialization.cs index 7bbb529abc51..b656526cadea 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RegulatoryComplianceStandardData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RegulatoryComplianceStandardData.Serialization.cs @@ -20,6 +20,15 @@ public partial class RegulatoryComplianceStandardData : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(RegulatoryComplianceStandardData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(State)) @@ -76,22 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M writer.WriteNumberValue(UnsupportedControls.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } RegulatoryComplianceStandardData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecureScoreData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecureScoreData.Serialization.cs index d1978a71e81e..799393c4e800 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecureScoreData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecureScoreData.Serialization.cs @@ -19,6 +19,15 @@ public partial class SecureScoreData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(SecureScoreData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(DisplayName)) @@ -78,22 +67,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO } writer.WriteEndObject(); writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecureScoreData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityAlertData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityAlertData.Serialization.cs index 9c47dfa012e8..09bd4903b694 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityAlertData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityAlertData.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityAlertData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(SecurityAlertData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Version)) @@ -233,22 +222,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite writer.WriteObjectValue(SupportingEvidence, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityAlertData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityAlertsSuppressionRuleData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityAlertsSuppressionRuleData.Serialization.cs index e235314b976b..7b7eb5c41e29 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityAlertsSuppressionRuleData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityAlertsSuppressionRuleData.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityAlertsSuppressionRuleData : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(SecurityAlertsSuppressionRuleData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(AlertType)) @@ -86,22 +75,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteObjectValue(SuppressionAlertsScope, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityAlertsSuppressionRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityApplicationData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityApplicationData.Serialization.cs index 492f7a119dea..5ab790c5c6a1 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityApplicationData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityApplicationData.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityApplicationData : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(SecurityApplicationData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(DisplayName)) @@ -88,22 +77,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityApplicationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityAssessmentData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityAssessmentData.Serialization.cs index 37ec65dde23b..d7542aadbae7 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityAssessmentData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityAssessmentData.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityAssessmentData : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(SecurityAssessmentData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(ResourceDetails)) @@ -92,22 +81,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader writer.WriteObjectValue(Status, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityAssessmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityAssessmentMetadataData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityAssessmentMetadataData.Serialization.cs index 862d5ee607b5..4974f8f694ac 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityAssessmentMetadataData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityAssessmentMetadataData.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityAssessmentMetadataData : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(SecurityAssessmentMetadataData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(DisplayName)) @@ -151,22 +140,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityAssessmentMetadataData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityAutomationData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityAutomationData.Serialization.cs index aa5817d5a82a..9eaca9359776 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityAutomationData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityAutomationData.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityAutomationData : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(SecurityAutomationData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Kind)) { writer.WritePropertyName("kind"u8); @@ -38,39 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Description)) @@ -114,22 +90,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityAutomationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityCenterApiCollectionData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityCenterApiCollectionData.Serialization.cs index bbbb9f57cc22..00484ae48d13 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityCenterApiCollectionData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityCenterApiCollectionData.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityCenterApiCollectionData : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(SecurityCenterApiCollectionData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) @@ -101,22 +90,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo writer.WriteStringValue(SensitivityLabel); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityCenterApiCollectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityCenterLocationData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityCenterLocationData.Serialization.cs index 1858f14ca00b..f96c2e7aa234 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityCenterLocationData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityCenterLocationData.Serialization.cs @@ -19,6 +19,15 @@ public partial class SecurityCenterLocationData : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(SecurityCenterLocationData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); @@ -39,42 +48,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe } #endif } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityCenterLocationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityCenterPricingData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityCenterPricingData.Serialization.cs index 92230caa7558..ef37b97a7ac4 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityCenterPricingData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityCenterPricingData.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityCenterPricingData : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(SecurityCenterPricingData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(PricingTier)) @@ -96,22 +85,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityCenterPricingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityCloudConnectorData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityCloudConnectorData.Serialization.cs index a07708bda15e..c21faca51647 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityCloudConnectorData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityCloudConnectorData.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityCloudConnectorData : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(SecurityCloudConnectorData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(HybridComputeSettings)) @@ -61,22 +50,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe writer.WriteObjectValue(AuthenticationDetails, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityCloudConnectorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityComplianceData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityComplianceData.Serialization.cs index 3d8a8898b064..c6da4e5ec9f7 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityComplianceData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityComplianceData.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityComplianceData : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(SecurityComplianceData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(AssessedOn)) @@ -71,22 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityComplianceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorData.Serialization.cs index 1b6faefbfd7b..c6f8c157cd8f 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorData.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityConnectorData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(SecurityConnectorData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Kind)) { writer.WritePropertyName("kind"u8); @@ -38,39 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(HierarchyIdentifier)) @@ -104,22 +80,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW writer.WriteObjectValue(EnvironmentData, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityConnectorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorGitHubOwnerData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorGitHubOwnerData.Serialization.cs index f6b972e73e68..d948d003f272 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorGitHubOwnerData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorGitHubOwnerData.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityConnectorGitHubOwnerData : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,48 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(SecurityConnectorGitHubOwnerData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); writer.WriteObjectValue(Properties, options); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityConnectorGitHubOwnerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorGitHubRepositoryData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorGitHubRepositoryData.Serialization.cs index 22dc13cfdc90..2cb78ebef387 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorGitHubRepositoryData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorGitHubRepositoryData.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityConnectorGitHubRepositoryData : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,48 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(SecurityConnectorGitHubRepositoryData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); writer.WriteObjectValue(Properties, options); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityConnectorGitHubRepositoryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorGitLabGroupData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorGitLabGroupData.Serialization.cs index 09893b8e4f6c..72e3ff696fec 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorGitLabGroupData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorGitLabGroupData.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityConnectorGitLabGroupData : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,48 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(SecurityConnectorGitLabGroupData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); writer.WriteObjectValue(Properties, options); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityConnectorGitLabGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorGitLabProjectData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorGitLabProjectData.Serialization.cs index db9d3d306df9..aa9c3411ecd4 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorGitLabProjectData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorGitLabProjectData.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityConnectorGitLabProjectData : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,48 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(SecurityConnectorGitLabProjectData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); writer.WriteObjectValue(Properties, options); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityConnectorGitLabProjectData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityContactData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityContactData.Serialization.cs index 9d3dc635b6e1..02b24ae55474 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityContactData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityContactData.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityContactData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(SecurityContactData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Emails)) @@ -71,22 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri writer.WriteObjectValue(NotificationsByRole, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityContactData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityHealthReportData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityHealthReportData.Serialization.cs index 7592ff7a7bbf..5f062b7afc40 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityHealthReportData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityHealthReportData.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityHealthReportData : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(SecurityHealthReportData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(ResourceDetails)) @@ -112,22 +101,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityHealthReportData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityOperatorData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityOperatorData.Serialization.cs index 33d643778fa0..a2ad4291d6de 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityOperatorData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityOperatorData.Serialization.cs @@ -19,6 +19,15 @@ public partial class SecurityOperatorData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,48 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(SecurityOperatorData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); JsonSerializer.Serialize(writer, Identity); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityOperatorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecuritySettingData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecuritySettingData.Serialization.cs index ecafdbb4270b..62a3b18788cc 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecuritySettingData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecuritySettingData.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecuritySettingData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,45 +34,9 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(SecuritySettingData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("kind"u8); writer.WriteStringValue(Kind.ToString()); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecuritySettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecuritySubAssessmentData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecuritySubAssessmentData.Serialization.cs index f3ff7f946ef0..a002b8188aaf 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecuritySubAssessmentData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecuritySubAssessmentData.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecuritySubAssessmentData : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(SecuritySubAssessmentData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(VulnerabilityId)) @@ -101,22 +90,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea writer.WriteObjectValue(AdditionalData, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecuritySubAssessmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityTaskData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityTaskData.Serialization.cs index 7ae4077199d6..3bff32bfd9cf 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityTaskData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityTaskData.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityTaskData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(SecurityTaskData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(State)) @@ -76,22 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter writer.WriteStringValue(SubState); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityTaskData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityWorkspaceSettingData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityWorkspaceSettingData.Serialization.cs index d6d0a31300d1..a47bc20922c0 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityWorkspaceSettingData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityWorkspaceSettingData.Serialization.cs @@ -19,6 +19,15 @@ public partial class SecurityWorkspaceSettingData : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(SecurityWorkspaceSettingData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(WorkspaceId)) @@ -60,22 +49,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model writer.WriteStringValue(Scope); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityWorkspaceSettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SensitivitySettingData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SensitivitySettingData.Serialization.cs index d8a77031144f..4c234a7d21ec 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SensitivitySettingData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SensitivitySettingData.Serialization.cs @@ -20,6 +20,15 @@ public partial class SensitivitySettingData : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,48 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(SensitivitySettingData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); writer.WriteObjectValue(Properties, options); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SensitivitySettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/ServerVulnerabilityAssessmentData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/ServerVulnerabilityAssessmentData.Serialization.cs index e5086aa85957..675bc5dbc7dc 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/ServerVulnerabilityAssessmentData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/ServerVulnerabilityAssessmentData.Serialization.cs @@ -20,6 +20,15 @@ public partial class ServerVulnerabilityAssessmentData : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(ServerVulnerabilityAssessmentData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) @@ -56,22 +45,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ServerVulnerabilityAssessmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/ServerVulnerabilityAssessmentsSettingData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/ServerVulnerabilityAssessmentsSettingData.Serialization.cs index 742643ac5683..b1bef48d9bba 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/ServerVulnerabilityAssessmentsSettingData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/ServerVulnerabilityAssessmentsSettingData.Serialization.cs @@ -19,6 +19,15 @@ public partial class ServerVulnerabilityAssessmentsSettingData : IUtf8JsonSerial void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,45 +35,9 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(ServerVulnerabilityAssessmentsSettingData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("kind"u8); writer.WriteStringValue(Kind.ToString()); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ServerVulnerabilityAssessmentsSettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SoftwareInventoryData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SoftwareInventoryData.Serialization.cs index ddafe9efd7b6..a657293a1b1a 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SoftwareInventoryData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SoftwareInventoryData.Serialization.cs @@ -20,6 +20,15 @@ public partial class SoftwareInventoryData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(SoftwareInventoryData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(DeviceId)) @@ -96,22 +85,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW writer.WriteStringValue(FirstSeenOn.Value, "O"); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SoftwareInventoryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SqlVulnerabilityAssessmentBaselineRuleData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SqlVulnerabilityAssessmentBaselineRuleData.Serialization.cs index f9adab4aee47..a958dc39cde0 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SqlVulnerabilityAssessmentBaselineRuleData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SqlVulnerabilityAssessmentBaselineRuleData.Serialization.cs @@ -20,6 +20,15 @@ public partial class SqlVulnerabilityAssessmentBaselineRuleData : IUtf8JsonSeria void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,48 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(SqlVulnerabilityAssessmentBaselineRuleData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); writer.WriteObjectValue(Properties, options); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SqlVulnerabilityAssessmentBaselineRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SqlVulnerabilityAssessmentScanData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SqlVulnerabilityAssessmentScanData.Serialization.cs index 4afbbd5626ed..4fbf494335b5 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SqlVulnerabilityAssessmentScanData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SqlVulnerabilityAssessmentScanData.Serialization.cs @@ -20,6 +20,15 @@ public partial class SqlVulnerabilityAssessmentScanData : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,48 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(SqlVulnerabilityAssessmentScanData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); writer.WriteObjectValue(Properties, options); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SqlVulnerabilityAssessmentScanData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/autorest.md b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/autorest.md index a897795fec59..f3f3748130fd 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/autorest.md +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/autorest.md @@ -25,6 +25,7 @@ modelerfour: flatten-payloads: false lenient-model-deduplication: true use-model-reader-writer: true +use-write-core: true deserialize-null-collection-as-null-value: true #mgmt-debug: diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/tests/Azure.ResourceManager.SecurityCenter.Tests.csproj b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/tests/Azure.ResourceManager.SecurityCenter.Tests.csproj index 476d33141939..e6953013e5a4 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/tests/Azure.ResourceManager.SecurityCenter.Tests.csproj +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/tests/Azure.ResourceManager.SecurityCenter.Tests.csproj @@ -1,8 +1,8 @@  - - + + diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/tests/Scenario/AutomationCollectionTests.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/tests/Scenario/AutomationCollectionTests.cs index f5bcc94765d1..e45e7de907f2 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/tests/Scenario/AutomationCollectionTests.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/tests/Scenario/AutomationCollectionTests.cs @@ -93,6 +93,7 @@ public async Task Get() } [RecordedTest] + public async Task GetAll() { string automationName = Recording.GenerateAssetName("automation"); diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/CHANGELOG.md b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/CHANGELOG.md index 7ac75010bcad..90873d1cfb72 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/CHANGELOG.md +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/CHANGELOG.md @@ -4,6 +4,8 @@ ### Features Added +- Exposed `JsonModelWriteCore` for model serialization procedure. + ### Breaking Changes ### Bugs Fixed diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/api/Azure.ResourceManager.SecurityInsights.netstandard2.0.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/api/Azure.ResourceManager.SecurityInsights.netstandard2.0.cs index 8cc5ab94fc44..bc05d7dc60c6 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/api/Azure.ResourceManager.SecurityInsights.netstandard2.0.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/api/Azure.ResourceManager.SecurityInsights.netstandard2.0.cs @@ -137,6 +137,7 @@ public SecurityInsightsAlertRuleActionData() { } public Azure.ETag? ETag { get { throw null; } set { } } public Azure.Core.ResourceIdentifier LogicAppResourceId { get { throw null; } set { } } public string WorkflowId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.SecurityInsightsAlertRuleActionData 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.SecurityInsights.SecurityInsightsAlertRuleActionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -183,6 +184,7 @@ public partial class SecurityInsightsAlertRuleData : Azure.ResourceManager.Model { public SecurityInsightsAlertRuleData() { } public Azure.ETag? ETag { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.SecurityInsightsAlertRuleData 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.SecurityInsights.SecurityInsightsAlertRuleData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -231,6 +233,7 @@ protected SecurityInsightsAlertRuleTemplateCollection() { } public partial class SecurityInsightsAlertRuleTemplateData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public SecurityInsightsAlertRuleTemplateData() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.SecurityInsightsAlertRuleTemplateData 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.SecurityInsights.SecurityInsightsAlertRuleTemplateData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -281,6 +284,7 @@ public SecurityInsightsAutomationRuleData(string displayName, int order, Azure.R public System.DateTimeOffset? LastModifiedOn { get { throw null; } } public int Order { get { throw null; } set { } } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsAutomationRuleTriggeringLogic TriggeringLogic { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.SecurityInsightsAutomationRuleData 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.SecurityInsights.SecurityInsightsAutomationRuleData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -325,6 +329,7 @@ public abstract partial class SecurityInsightsBillingStatisticData : Azure.Resou { protected SecurityInsightsBillingStatisticData() { } public Azure.ETag? ETag { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.SecurityInsightsBillingStatisticData 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.SecurityInsights.SecurityInsightsBillingStatisticData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -383,6 +388,7 @@ public SecurityInsightsBookmarkData() { } public System.Collections.Generic.IList Techniques { get { throw null; } } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsUserInfo UpdatedBy { get { throw null; } set { } } public System.DateTimeOffset? UpdatedOn { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.SecurityInsightsBookmarkData 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.SecurityInsights.SecurityInsightsBookmarkData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -470,6 +476,7 @@ public partial class SecurityInsightsDataConnectorData : Azure.ResourceManager.M { public SecurityInsightsDataConnectorData() { } public Azure.ETag? ETag { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.SecurityInsightsDataConnectorData 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.SecurityInsights.SecurityInsightsDataConnectorData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -497,6 +504,7 @@ public abstract partial class SecurityInsightsDataConnectorDefinitionData : Azur { protected SecurityInsightsDataConnectorDefinitionData() { } public Azure.ETag? ETag { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.SecurityInsightsDataConnectorDefinitionData 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.SecurityInsights.SecurityInsightsDataConnectorDefinitionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -581,6 +589,7 @@ public abstract partial class SecurityInsightsEntityQueryData : Azure.ResourceMa { protected SecurityInsightsEntityQueryData() { } public Azure.ETag? ETag { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.SecurityInsightsEntityQueryData 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.SecurityInsights.SecurityInsightsEntityQueryData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -624,6 +633,7 @@ protected SecurityInsightsEntityQueryTemplateCollection() { } public abstract partial class SecurityInsightsEntityQueryTemplateData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { protected SecurityInsightsEntityQueryTemplateData() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.SecurityInsightsEntityQueryTemplateData 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.SecurityInsights.SecurityInsightsEntityQueryTemplateData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -785,6 +795,7 @@ public SecurityInsightsFileImportData() { } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsFileImportState? State { get { throw null; } } public int? TotalRecordCount { get { throw null; } } public int? ValidRecordCount { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.SecurityInsightsFileImportData 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.SecurityInsights.SecurityInsightsFileImportData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -849,6 +860,7 @@ public partial class SecurityInsightsHuntCommentData : Azure.ResourceManager.Mod public SecurityInsightsHuntCommentData() { } public Azure.ETag? ETag { get { throw null; } set { } } public string Message { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.SecurityInsightsHuntCommentData 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.SecurityInsights.SecurityInsightsHuntCommentData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -886,6 +898,7 @@ public SecurityInsightsHuntData() { } public System.Collections.Generic.IList Labels { get { throw null; } } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsHuntOwner Owner { get { throw null; } set { } } public Azure.ResourceManager.SecurityInsights.Models.HuntStatus? Status { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.SecurityInsightsHuntData 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.SecurityInsights.SecurityInsightsHuntData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -918,6 +931,7 @@ public SecurityInsightsHuntRelationData() { } public string RelatedResourceKind { get { throw null; } } public string RelatedResourceName { get { throw null; } } public string RelationType { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.SecurityInsightsHuntRelationData 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.SecurityInsights.SecurityInsightsHuntRelationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1010,6 +1024,7 @@ public SecurityInsightsIncidentCommentData() { } public Azure.ETag? ETag { get { throw null; } set { } } public System.DateTimeOffset? LastModifiedOn { get { throw null; } } public string Message { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.SecurityInsightsIncidentCommentData 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.SecurityInsights.SecurityInsightsIncidentCommentData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1059,6 +1074,7 @@ public SecurityInsightsIncidentData() { } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsIncidentStatus? Status { get { throw null; } set { } } public Azure.ResourceManager.SecurityInsights.Models.TeamInformation TeamInformation { get { throw null; } set { } } public string Title { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.SecurityInsightsIncidentData 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.SecurityInsights.SecurityInsightsIncidentData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1090,6 +1106,7 @@ public SecurityInsightsIncidentRelationData() { } public string RelatedResourceKind { get { throw null; } } public string RelatedResourceName { get { throw null; } } public Azure.Core.ResourceType? RelatedResourceType { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.SecurityInsightsIncidentRelationData 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.SecurityInsights.SecurityInsightsIncidentRelationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1181,6 +1198,7 @@ public SecurityInsightsIncidentTaskData(string title, Azure.ResourceManager.Secu public System.DateTimeOffset? LastModifiedOn { get { throw null; } } public Azure.ResourceManager.SecurityInsights.Models.IncidentTaskStatus Status { get { throw null; } set { } } public string Title { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.SecurityInsightsIncidentTaskData 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.SecurityInsights.SecurityInsightsIncidentTaskData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1246,6 +1264,7 @@ public SecurityInsightsMetadataData() { } public System.Collections.Generic.IList ThreatAnalysisTactics { get { throw null; } } public System.Collections.Generic.IList ThreatAnalysisTechniques { get { throw null; } } public string Version { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.SecurityInsightsMetadataData 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.SecurityInsights.SecurityInsightsMetadataData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1291,6 +1310,7 @@ public partial class SecurityInsightsOfficeConsentData : Azure.ResourceManager.M public SecurityInsightsOfficeConsentData() { } public string ConsentId { get { throw null; } set { } } public System.Guid? TenantId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.SecurityInsightsOfficeConsentData 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.SecurityInsights.SecurityInsightsOfficeConsentData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1358,6 +1378,7 @@ public SecurityInsightsPackageData() { } public System.Collections.Generic.IList ThreatAnalysisTactics { get { throw null; } } public System.Collections.Generic.IList ThreatAnalysisTechniques { get { throw null; } } public string Version { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.SecurityInsightsPackageData 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.SecurityInsights.SecurityInsightsPackageData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1428,6 +1449,7 @@ public SecurityInsightsProductPackageData() { } public System.Collections.Generic.IList ThreatAnalysisTactics { get { throw null; } } public System.Collections.Generic.IList ThreatAnalysisTechniques { get { throw null; } } public string Version { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.SecurityInsightsProductPackageData 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.SecurityInsights.SecurityInsightsProductPackageData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1494,6 +1516,7 @@ public SecurityInsightsProductTemplateData() { } public System.Collections.Generic.IList ThreatAnalysisTactics { get { throw null; } } public System.Collections.Generic.IList ThreatAnalysisTechniques { get { throw null; } } public string Version { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.SecurityInsightsProductTemplateData 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.SecurityInsights.SecurityInsightsProductTemplateData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1544,6 +1567,7 @@ public SecurityInsightsRecommendationData() { } public Azure.ResourceManager.SecurityInsights.Models.RecommendationState? State { get { throw null; } set { } } public System.Collections.Generic.IList Suggestions { get { throw null; } } public string Title { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.SecurityInsightsRecommendationData 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.SecurityInsights.SecurityInsightsRecommendationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1591,6 +1615,7 @@ public partial class SecurityInsightsSentinelOnboardingStateData : Azure.Resourc public SecurityInsightsSentinelOnboardingStateData() { } public Azure.ETag? ETag { get { throw null; } set { } } public bool? IsCustomerManagedKeySet { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.SecurityInsightsSentinelOnboardingStateData 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.SecurityInsights.SecurityInsightsSentinelOnboardingStateData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1637,6 +1662,7 @@ public abstract partial class SecurityInsightsSettingData : Azure.ResourceManage { protected SecurityInsightsSettingData() { } public Azure.ETag? ETag { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.SecurityInsightsSettingData 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.SecurityInsights.SecurityInsightsSettingData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1695,6 +1721,7 @@ public SecurityInsightsSourceControlData(string displayName, Azure.ResourceManag public Azure.ResourceManager.SecurityInsights.Models.SourceControlServicePrincipal ServicePrincipal { get { throw null; } set { } } public System.Guid? SourceControlId { get { throw null; } } public Azure.ResourceManager.SecurityInsights.Models.SourceControlVersion? Version { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.SecurityInsightsSourceControlData 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.SecurityInsights.SecurityInsightsSourceControlData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1768,6 +1795,7 @@ public SecurityInsightsTemplateData() { } public System.Collections.Generic.IList ThreatAnalysisTactics { get { throw null; } } public System.Collections.Generic.IList ThreatAnalysisTechniques { get { throw null; } } public string Version { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.SecurityInsightsTemplateData 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.SecurityInsights.SecurityInsightsTemplateData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1797,6 +1825,7 @@ public partial class SecurityInsightsThreatIntelligenceIndicatorBaseData : Azure { public SecurityInsightsThreatIntelligenceIndicatorBaseData() { } public Azure.ETag? ETag { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.SecurityInsightsThreatIntelligenceIndicatorBaseData 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.SecurityInsights.SecurityInsightsThreatIntelligenceIndicatorBaseData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1884,6 +1913,7 @@ public SecurityInsightsWatchlistData() { } public string WatchlistAlias { get { throw null; } set { } } public System.Guid? WatchlistId { get { throw null; } set { } } public string WatchlistType { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.SecurityInsightsWatchlistData 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.SecurityInsights.SecurityInsightsWatchlistData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1925,6 +1955,7 @@ public SecurityInsightsWatchlistItemData() { } public System.DateTimeOffset? UpdatedOn { get { throw null; } set { } } public string WatchlistItemId { get { throw null; } set { } } public string WatchlistItemType { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.SecurityInsightsWatchlistItemData 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.SecurityInsights.SecurityInsightsWatchlistItemData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1993,6 +2024,7 @@ public partial class SecurityMLAnalyticsSettingData : Azure.ResourceManager.Mode { public SecurityMLAnalyticsSettingData() { } public Azure.ETag? ETag { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.SecurityMLAnalyticsSettingData 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.SecurityInsights.SecurityMLAnalyticsSettingData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2042,6 +2074,7 @@ public TriggeredAnalyticsRuleRunData(System.DateTimeOffset executeOn, string rul public string RuleId { get { throw null; } set { } } public System.Collections.Generic.IDictionary RuleRunAdditionalData { get { throw null; } } public string TriggeredAnalyticsRuleRunId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.TriggeredAnalyticsRuleRunData 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.SecurityInsights.TriggeredAnalyticsRuleRunData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2088,6 +2121,7 @@ public WorkspaceManagerAssignmentData() { } public System.DateTimeOffset? LastJobEndOn { get { throw null; } } public Azure.ResourceManager.SecurityInsights.Models.TriggeredAnalyticsRuleRunProvisioningState? LastJobProvisioningState { get { throw null; } } public string TargetResourceName { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.WorkspaceManagerAssignmentData 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.SecurityInsights.WorkspaceManagerAssignmentData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2118,6 +2152,7 @@ public WorkspaceManagerAssignmentJobData() { } public System.Collections.Generic.IList Items { get { throw null; } } public Azure.ResourceManager.SecurityInsights.Models.TriggeredAnalyticsRuleRunProvisioningState? ProvisioningState { get { throw null; } } public System.DateTimeOffset? StartOn { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.WorkspaceManagerAssignmentJobData 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.SecurityInsights.WorkspaceManagerAssignmentJobData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2187,6 +2222,7 @@ public partial class WorkspaceManagerConfigurationData : Azure.ResourceManager.M public WorkspaceManagerConfigurationData() { } public Azure.ETag? ETag { get { throw null; } } public Azure.ResourceManager.SecurityInsights.Models.WorkspaceManagerConfigurationMode? Mode { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.WorkspaceManagerConfigurationData 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.SecurityInsights.WorkspaceManagerConfigurationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2236,6 +2272,7 @@ public WorkspaceManagerGroupData() { } public string DisplayName { get { throw null; } set { } } public Azure.ETag? ETag { get { throw null; } } public System.Collections.Generic.IList MemberResourceNames { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.WorkspaceManagerGroupData 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.SecurityInsights.WorkspaceManagerGroupData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2284,6 +2321,7 @@ public WorkspaceManagerMemberData() { } public Azure.ETag? ETag { get { throw null; } } public string TargetWorkspaceResourceId { get { throw null; } set { } } public string TargetWorkspaceTenantId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.WorkspaceManagerMemberData 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.SecurityInsights.WorkspaceManagerMemberData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2373,6 +2411,7 @@ public partial class AadCheckRequirements : Azure.ResourceManager.SecurityInsigh { public AadCheckRequirements() { } public System.Guid? TenantId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.AadCheckRequirements 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.SecurityInsights.Models.AadCheckRequirements System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2383,6 +2422,7 @@ public partial class AatpCheckRequirements : Azure.ResourceManager.SecurityInsig { public AatpCheckRequirements() { } public System.Guid? TenantId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.AatpCheckRequirements 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.SecurityInsights.Models.AatpCheckRequirements System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2403,6 +2443,7 @@ public ActivityCustomEntityQuery() { } public System.Collections.Generic.IList> RequiredInputFieldsSets { get { throw null; } } public string TemplateName { get { throw null; } set { } } public string Title { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ActivityCustomEntityQuery 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.SecurityInsights.Models.ActivityCustomEntityQuery System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2423,6 +2464,7 @@ public ActivityEntityQuery() { } public System.Collections.Generic.IList> RequiredInputFieldsSets { get { throw null; } } public string TemplateName { get { throw null; } set { } } public string Title { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ActivityEntityQuery 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.SecurityInsights.Models.ActivityEntityQuery System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2434,6 +2476,7 @@ public partial class ActivityEntityQueryDefinition : System.ClientModel.Primitiv public ActivityEntityQueryDefinition() { } public string Query { get { throw null; } set { } } public string SummarizeBy { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ActivityEntityQueryDefinition 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.SecurityInsights.Models.ActivityEntityQueryDefinition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2451,6 +2494,7 @@ public ActivityEntityQueryTemplate() { } public Azure.ResourceManager.SecurityInsights.Models.ActivityEntityQueryDefinition QueryDefinitions { get { throw null; } set { } } public System.Collections.Generic.IList> RequiredInputFieldsSets { get { throw null; } } public string Title { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ActivityEntityQueryTemplate 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.SecurityInsights.Models.ActivityEntityQueryTemplate System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2467,6 +2511,7 @@ internal ActivityTimelineItem() { } public System.DateTimeOffset LastActivityOn { get { throw null; } } public string QueryId { get { throw null; } } public string Title { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ActivityTimelineItem 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.SecurityInsights.Models.ActivityTimelineItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2478,6 +2523,7 @@ public partial class AddIncidentTaskActionProperties : System.ClientModel.Primit public AddIncidentTaskActionProperties(string title) { } public string Description { get { throw null; } set { } } public string Title { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.AddIncidentTaskActionProperties 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.SecurityInsights.Models.AddIncidentTaskActionProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2489,6 +2535,7 @@ public partial class AlertRuleTemplateDataSource : System.ClientModel.Primitives public AlertRuleTemplateDataSource() { } public string ConnectorId { get { throw null; } set { } } public System.Collections.Generic.IList DataTypes { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.AlertRuleTemplateDataSource 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.SecurityInsights.Models.AlertRuleTemplateDataSource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2499,6 +2546,7 @@ public partial class AnalyticsRuleRunTrigger : System.ClientModel.Primitives.IJs { public AnalyticsRuleRunTrigger(System.DateTimeOffset executeOn) { } public System.DateTimeOffset ExecuteOn { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.AnalyticsRuleRunTrigger 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.SecurityInsights.Models.AnalyticsRuleRunTrigger System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2522,6 +2570,7 @@ public AnomalySecurityMLAnalyticsSettings() { } public Azure.ResourceManager.SecurityInsights.Models.AnomalySecurityMLAnalyticsSettingsStatus? SettingsStatus { get { throw null; } set { } } public System.Collections.Generic.IList Tactics { get { throw null; } } public System.Collections.Generic.IList Techniques { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.AnomalySecurityMLAnalyticsSettings 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.SecurityInsights.Models.AnomalySecurityMLAnalyticsSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2560,6 +2609,7 @@ internal AnomalyTimelineItem() { } public System.DateTimeOffset StartOn { get { throw null; } } public System.Collections.Generic.IReadOnlyList Techniques { get { throw null; } } public string Vendor { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.AnomalyTimelineItem 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.SecurityInsights.Models.AnomalyTimelineItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2814,6 +2864,7 @@ public partial class AscCheckRequirements : Azure.ResourceManager.SecurityInsigh { public AscCheckRequirements() { } public string SubscriptionId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.AscCheckRequirements 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.SecurityInsights.Models.AscCheckRequirements System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2824,6 +2875,7 @@ public partial class AutomationRuleAddIncidentTaskAction : Azure.ResourceManager { public AutomationRuleAddIncidentTaskAction(int order) : base (default(int)) { } public Azure.ResourceManager.SecurityInsights.Models.AddIncidentTaskActionProperties ActionConfiguration { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.AutomationRuleAddIncidentTaskAction 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.SecurityInsights.Models.AutomationRuleAddIncidentTaskAction System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2835,6 +2887,7 @@ public partial class AutomationRuleBooleanCondition : System.ClientModel.Primiti public AutomationRuleBooleanCondition() { } public System.Collections.Generic.IList InnerConditions { get { throw null; } } public Azure.ResourceManager.SecurityInsights.Models.AutomationRuleBooleanConditionSupportedOperator? Operator { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.AutomationRuleBooleanCondition 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.SecurityInsights.Models.AutomationRuleBooleanCondition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2863,6 +2916,7 @@ public partial class AutomationRuleModifyPropertiesAction : Azure.ResourceManage { public AutomationRuleModifyPropertiesAction(int order) : base (default(int)) { } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsIncidentActionConfiguration ActionConfiguration { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.AutomationRuleModifyPropertiesAction 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.SecurityInsights.Models.AutomationRuleModifyPropertiesAction System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2911,6 +2965,7 @@ public partial class AutomationRulePropertyArrayChangedValuesCondition : System. public AutomationRulePropertyArrayChangedValuesCondition() { } public Azure.ResourceManager.SecurityInsights.Models.AutomationRulePropertyArrayChangedConditionSupportedArrayType? ArrayType { get { throw null; } set { } } public Azure.ResourceManager.SecurityInsights.Models.AutomationRulePropertyArrayChangedConditionSupportedChangeType? ChangeType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.AutomationRulePropertyArrayChangedValuesCondition 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.SecurityInsights.Models.AutomationRulePropertyArrayChangedValuesCondition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2958,6 +3013,7 @@ public AutomationRulePropertyArrayValuesCondition() { } public Azure.ResourceManager.SecurityInsights.Models.AutomationRulePropertyArrayConditionSupportedArrayConditionType? ArrayConditionType { get { throw null; } set { } } public Azure.ResourceManager.SecurityInsights.Models.AutomationRulePropertyArrayConditionSupportedArrayType? ArrayType { get { throw null; } set { } } public System.Collections.Generic.IList ItemConditions { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.AutomationRulePropertyArrayValuesCondition 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.SecurityInsights.Models.AutomationRulePropertyArrayValuesCondition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3106,6 +3162,7 @@ public AutomationRulePropertyValuesChangedCondition() { } public Azure.ResourceManager.SecurityInsights.Models.AutomationRulePropertyConditionSupportedOperator? Operator { get { throw null; } set { } } public Azure.ResourceManager.SecurityInsights.Models.AutomationRulePropertyChangedConditionSupportedPropertyType? PropertyName { get { throw null; } set { } } public System.Collections.Generic.IList PropertyValues { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.AutomationRulePropertyValuesChangedCondition 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.SecurityInsights.Models.AutomationRulePropertyValuesChangedCondition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3118,6 +3175,7 @@ public AutomationRulePropertyValuesCondition() { } public Azure.ResourceManager.SecurityInsights.Models.AutomationRulePropertyConditionSupportedOperator? Operator { get { throw null; } set { } } public Azure.ResourceManager.SecurityInsights.Models.AutomationRulePropertyConditionSupportedProperty? PropertyName { get { throw null; } set { } } public System.Collections.Generic.IList PropertyValues { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.AutomationRulePropertyValuesCondition 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.SecurityInsights.Models.AutomationRulePropertyValuesCondition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3128,6 +3186,7 @@ public partial class AutomationRuleRunPlaybookAction : Azure.ResourceManager.Sec { public AutomationRuleRunPlaybookAction(int order) : base (default(int)) { } public Azure.ResourceManager.SecurityInsights.Models.AutomationRuleRunPlaybookActionProperties ActionConfiguration { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.AutomationRuleRunPlaybookAction 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.SecurityInsights.Models.AutomationRuleRunPlaybookAction System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3139,6 +3198,7 @@ public partial class AutomationRuleRunPlaybookActionProperties : System.ClientMo public AutomationRuleRunPlaybookActionProperties(Azure.Core.ResourceIdentifier logicAppResourceId) { } public Azure.Core.ResourceIdentifier LogicAppResourceId { get { throw null; } set { } } public System.Guid? TenantId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.AutomationRuleRunPlaybookActionProperties 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.SecurityInsights.Models.AutomationRuleRunPlaybookActionProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3150,6 +3210,7 @@ public partial class AwsAuthModel : Azure.ResourceManager.SecurityInsights.Model public AwsAuthModel(string roleArn) { } public string ExternalId { get { throw null; } set { } } public string RoleArn { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.AwsAuthModel 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.SecurityInsights.Models.AwsAuthModel System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3159,6 +3220,7 @@ public AwsAuthModel(string roleArn) { } public partial class AwsCloudTrailCheckRequirements : Azure.ResourceManager.SecurityInsights.Models.DataConnectorsCheckRequirements, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public AwsCloudTrailCheckRequirements() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.AwsCloudTrailCheckRequirements 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.SecurityInsights.Models.AwsCloudTrailCheckRequirements System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3168,6 +3230,7 @@ public AwsCloudTrailCheckRequirements() { } public partial class AwsS3CheckRequirements : Azure.ResourceManager.SecurityInsights.Models.DataConnectorsCheckRequirements, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public AwsS3CheckRequirements() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.AwsS3CheckRequirements 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.SecurityInsights.Models.AwsS3CheckRequirements System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3181,6 +3244,7 @@ public AwsS3DataConnector() { } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsDataTypeConnectionState? LogsState { get { throw null; } set { } } public string RoleArn { get { throw null; } set { } } public System.Collections.Generic.IList SqsUrls { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.AwsS3DataConnector 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.SecurityInsights.Models.AwsS3DataConnector System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3192,6 +3256,7 @@ public partial class AzureDevOpsResourceInfo : System.ClientModel.Primitives.IJs internal AzureDevOpsResourceInfo() { } public string PipelineId { get { throw null; } } public string ServiceConnectionId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.AzureDevOpsResourceInfo 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.SecurityInsights.Models.AzureDevOpsResourceInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3203,6 +3268,7 @@ public partial class BasicAuthModel : Azure.ResourceManager.SecurityInsights.Mod public BasicAuthModel(string userName, string password) { } public string Password { get { throw null; } set { } } public string UserName { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.BasicAuthModel 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.SecurityInsights.Models.BasicAuthModel System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3214,6 +3280,7 @@ public partial class BookmarkConnectedEntity : System.ClientModel.Primitives.IJs internal BookmarkConnectedEntity() { } public System.BinaryData AdditionalData { get { throw null; } } public string TargetEntityId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.BookmarkConnectedEntity 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.SecurityInsights.Models.BookmarkConnectedEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3225,6 +3292,7 @@ public partial class BookmarkEntityMappings : System.ClientModel.Primitives.IJso public BookmarkEntityMappings() { } public string EntityType { get { throw null; } set { } } public System.Collections.Generic.IList FieldMappings { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.BookmarkEntityMappings 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.SecurityInsights.Models.BookmarkEntityMappings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3237,6 +3305,7 @@ public BookmarkExpandContent() { } public System.DateTimeOffset? EndOn { get { throw null; } set { } } public System.Guid? ExpansionId { get { throw null; } set { } } public System.DateTimeOffset? StartOn { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.BookmarkExpandContent 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.SecurityInsights.Models.BookmarkExpandContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3248,6 +3317,7 @@ public partial class BookmarkExpandResponseValue : System.ClientModel.Primitives internal BookmarkExpandResponseValue() { } public System.Collections.Generic.IReadOnlyList Edges { get { throw null; } } public System.Collections.Generic.IReadOnlyList Entities { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.BookmarkExpandResponseValue 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.SecurityInsights.Models.BookmarkExpandResponseValue System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3259,6 +3329,7 @@ public partial class BookmarkExpandResult : System.ClientModel.Primitives.IJsonM internal BookmarkExpandResult() { } public System.Collections.Generic.IReadOnlyList MetaDataAggregations { get { throw null; } } public Azure.ResourceManager.SecurityInsights.Models.BookmarkExpandResponseValue Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.BookmarkExpandResult 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.SecurityInsights.Models.BookmarkExpandResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3276,6 +3347,7 @@ internal BookmarkTimelineItem() { } public System.Collections.Generic.IReadOnlyList Labels { get { throw null; } } public string Notes { get { throw null; } } public System.DateTimeOffset? StartOn { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.BookmarkTimelineItem 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.SecurityInsights.Models.BookmarkTimelineItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3286,6 +3358,7 @@ public partial class BooleanConditionProperties : Azure.ResourceManager.Security { public BooleanConditionProperties() { } public Azure.ResourceManager.SecurityInsights.Models.AutomationRuleBooleanCondition ConditionProperties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.BooleanConditionProperties 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.SecurityInsights.Models.BooleanConditionProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3295,6 +3368,7 @@ public BooleanConditionProperties() { } public abstract partial class CcpAuthConfig : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { protected CcpAuthConfig() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.CcpAuthConfig 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.SecurityInsights.Models.CcpAuthConfig System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3315,6 +3389,7 @@ public CcpResponseConfig(System.Collections.Generic.IEnumerable eventsJs public bool? IsGzipCompressed { get { throw null; } set { } } public string SuccessStatusJsonPath { get { throw null; } set { } } public string SuccessStatusValue { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.CcpResponseConfig 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.SecurityInsights.Models.CcpResponseConfig System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3326,6 +3401,7 @@ public partial class CodelessApiPollingDataConnector : Azure.ResourceManager.Sec public CodelessApiPollingDataConnector() { } public Azure.ResourceManager.SecurityInsights.Models.CodelessUiConnectorConfigProperties ConnectorUiConfig { get { throw null; } set { } } public Azure.ResourceManager.SecurityInsights.Models.CodelessConnectorPollingConfigProperties PollingConfig { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.CodelessApiPollingDataConnector 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.SecurityInsights.Models.CodelessApiPollingDataConnector System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3348,6 +3424,7 @@ public CodelessConnectorPollingAuthProperties(string authType) { } public string TokenEndpoint { get { throw null; } set { } } public System.BinaryData TokenEndpointHeaders { get { throw null; } set { } } public System.BinaryData TokenEndpointQueryParameters { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.CodelessConnectorPollingAuthProperties 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.SecurityInsights.Models.CodelessConnectorPollingAuthProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3362,6 +3439,7 @@ public CodelessConnectorPollingConfigProperties(Azure.ResourceManager.SecurityIn public Azure.ResourceManager.SecurityInsights.Models.CodelessConnectorPollingPagingProperties Paging { get { throw null; } set { } } public Azure.ResourceManager.SecurityInsights.Models.CodelessConnectorPollingRequestProperties Request { get { throw null; } set { } } public Azure.ResourceManager.SecurityInsights.Models.CodelessConnectorPollingResponseProperties Response { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.CodelessConnectorPollingConfigProperties 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.SecurityInsights.Models.CodelessConnectorPollingConfigProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3380,6 +3458,7 @@ public CodelessConnectorPollingPagingProperties(string pagingType) { } public string PageTotalCountAttributePath { get { throw null; } set { } } public string PagingType { get { throw null; } set { } } public string SearchTheLatestTimeStampFromEventsList { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.CodelessConnectorPollingPagingProperties 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.SecurityInsights.Models.CodelessConnectorPollingPagingProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3401,6 +3480,7 @@ public CodelessConnectorPollingRequestProperties(string apiEndpoint, int queryWi public int? RetryCount { get { throw null; } set { } } public string StartTimeAttributeName { get { throw null; } set { } } public int? TimeoutInSeconds { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.CodelessConnectorPollingRequestProperties 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.SecurityInsights.Models.CodelessConnectorPollingRequestProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3414,6 +3494,7 @@ public CodelessConnectorPollingResponseProperties(System.Collections.Generic.IEn public bool? IsGzipCompressed { get { throw null; } set { } } public string SuccessStatusJsonPath { get { throw null; } set { } } public string SuccessStatusValue { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.CodelessConnectorPollingResponseProperties 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.SecurityInsights.Models.CodelessConnectorPollingResponseProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3435,6 +3516,7 @@ public CodelessUiConnectorConfigProperties(string title, string publisher, strin public string Publisher { get { throw null; } set { } } public System.Collections.Generic.IList SampleQueries { get { throw null; } } public string Title { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.CodelessUiConnectorConfigProperties 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.SecurityInsights.Models.CodelessUiConnectorConfigProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3445,6 +3527,7 @@ public partial class CodelessUiDataConnector : Azure.ResourceManager.SecurityIns { public CodelessUiDataConnector() { } public Azure.ResourceManager.SecurityInsights.Models.CodelessUiConnectorConfigProperties ConnectorUiConfig { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.CodelessUiDataConnector 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.SecurityInsights.Models.CodelessUiDataConnector System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3475,6 +3558,7 @@ public partial class ConnectorAvailability : System.ClientModel.Primitives.IJson public ConnectorAvailability() { } public bool? IsPreview { get { throw null; } set { } } public Azure.ResourceManager.SecurityInsights.Models.ConnectorAvailabilityStatus? Status { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ConnectorAvailability 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.SecurityInsights.Models.ConnectorAvailability System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3502,6 +3586,7 @@ public partial class ConnectorConnectivityCriteria : System.ClientModel.Primitiv public ConnectorConnectivityCriteria() { } public Azure.ResourceManager.SecurityInsights.Models.ConnectorConnectivityType? ConnectivityType { get { throw null; } set { } } public System.Collections.Generic.IList Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ConnectorConnectivityCriteria 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.SecurityInsights.Models.ConnectorConnectivityCriteria System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3513,6 +3598,7 @@ public partial class ConnectorConnectivityCriterion : System.ClientModel.Primiti public ConnectorConnectivityCriterion(string connectivityCriterionType) { } public string ConnectivityCriterionType { get { throw null; } set { } } public System.Collections.Generic.IList Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ConnectorConnectivityCriterion 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.SecurityInsights.Models.ConnectorConnectivityCriterion System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3539,6 +3625,7 @@ public ConnectorConnectivityCriterion(string connectivityCriterionType) { } public partial class ConnectorCustoms : Azure.ResourceManager.SecurityInsights.Models.ConnectorCustomsPermission, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ConnectorCustoms() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ConnectorCustoms 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.SecurityInsights.Models.ConnectorCustoms System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3550,6 +3637,7 @@ public partial class ConnectorCustomsPermission : System.ClientModel.Primitives. public ConnectorCustomsPermission() { } public string Description { get { throw null; } set { } } public string Name { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ConnectorCustomsPermission 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.SecurityInsights.Models.ConnectorCustomsPermission System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3561,6 +3649,7 @@ public partial class ConnectorDataType : System.ClientModel.Primitives.IJsonMode public ConnectorDataType(string name, string lastDataReceivedQuery) { } public string LastDataReceivedQuery { get { throw null; } set { } } public string Name { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ConnectorDataType 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.SecurityInsights.Models.ConnectorDataType System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3572,6 +3661,7 @@ public partial class ConnectorDefinitionsAvailability : System.ClientModel.Primi public ConnectorDefinitionsAvailability() { } public bool? IsPreview { get { throw null; } set { } } public int? Status { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ConnectorDefinitionsAvailability 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.SecurityInsights.Models.ConnectorDefinitionsAvailability System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3585,6 +3675,7 @@ public ConnectorDefinitionsPermissions() { } public System.Collections.Generic.IList Licenses { get { throw null; } } public System.Collections.Generic.IList ResourceProvider { get { throw null; } } public System.Collections.Generic.IList Tenant { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ConnectorDefinitionsPermissions 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.SecurityInsights.Models.ConnectorDefinitionsPermissions System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3599,6 +3690,7 @@ public ConnectorDefinitionsResourceProvider(string provider, string permissionsD public string ProviderDisplayName { get { throw null; } set { } } public Azure.ResourceManager.SecurityInsights.Models.ConnectorResourceProviderRequiredPermissions RequiredPermissions { get { throw null; } set { } } public Azure.ResourceManager.SecurityInsights.Models.ProviderPermissionsScope Scope { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ConnectorDefinitionsResourceProvider 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.SecurityInsights.Models.ConnectorDefinitionsResourceProvider System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3611,6 +3703,7 @@ public ConnectorGraphQueries() { } public string BaseQuery { get { throw null; } set { } } public string Legend { get { throw null; } set { } } public string MetricName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ConnectorGraphQueries 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.SecurityInsights.Models.ConnectorGraphQueries System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3623,6 +3716,7 @@ public ConnectorGraphQuery(string metricName, string legend, string baseQuery) { public string BaseQuery { get { throw null; } set { } } public string Legend { get { throw null; } set { } } public string MetricName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ConnectorGraphQuery 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.SecurityInsights.Models.ConnectorGraphQuery System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3654,6 +3748,7 @@ public partial class ConnectorInstructionModelBase : System.ClientModel.Primitiv public ConnectorInstructionModelBase(Azure.ResourceManager.SecurityInsights.Models.ConnectorSettingType settingType) { } public System.BinaryData Parameters { get { throw null; } set { } } public Azure.ResourceManager.SecurityInsights.Models.ConnectorSettingType SettingType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ConnectorInstructionModelBase 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.SecurityInsights.Models.ConnectorInstructionModelBase System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3665,6 +3760,7 @@ public partial class ConnectorPermissions : System.ClientModel.Primitives.IJsonM public ConnectorPermissions() { } public System.Collections.Generic.IList Customs { get { throw null; } } public System.Collections.Generic.IList ResourceProvider { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ConnectorPermissions 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.SecurityInsights.Models.ConnectorPermissions System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3700,6 +3796,7 @@ public ConnectorRequiredPermissions() { } public bool? IsDeleteAction { get { throw null; } set { } } public bool? IsReadAction { get { throw null; } set { } } public bool? IsWriteAction { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ConnectorRequiredPermissions 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.SecurityInsights.Models.ConnectorRequiredPermissions System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3714,6 +3811,7 @@ public ConnectorResourceProvider() { } public string ProviderDisplayName { get { throw null; } set { } } public Azure.ResourceManager.SecurityInsights.Models.ConnectorRequiredPermissions RequiredPermissions { get { throw null; } set { } } public Azure.ResourceManager.SecurityInsights.Models.PermissionProviderScope? Scope { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ConnectorResourceProvider 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.SecurityInsights.Models.ConnectorResourceProvider System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3727,6 +3825,7 @@ public ConnectorResourceProviderRequiredPermissions() { } public bool? IsDeleteAction { get { throw null; } set { } } public bool? IsReadAction { get { throw null; } set { } } public bool? IsWriteAction { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ConnectorResourceProviderRequiredPermissions 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.SecurityInsights.Models.ConnectorResourceProviderRequiredPermissions System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3757,6 +3856,7 @@ public partial class CustomizableConnectionsConfig : System.ClientModel.Primitiv public CustomizableConnectionsConfig(string templateSpecName, string templateSpecVersion) { } public string TemplateSpecName { get { throw null; } set { } } public string TemplateSpecVersion { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.CustomizableConnectionsConfig 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.SecurityInsights.Models.CustomizableConnectionsConfig System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3770,6 +3870,7 @@ public CustomizableConnectorDefinitionData() { } public Azure.ResourceManager.SecurityInsights.Models.CustomizableConnectorUiConfig ConnectorUiConfig { get { throw null; } set { } } public System.DateTimeOffset? CreatedOn { get { throw null; } set { } } public System.DateTimeOffset? LastModifiedOn { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.CustomizableConnectorDefinitionData 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.SecurityInsights.Models.CustomizableConnectorDefinitionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3791,6 +3892,7 @@ public CustomizableConnectorUiConfig(string title, string publisher, string desc public Azure.ResourceManager.SecurityInsights.Models.ConnectorDefinitionsPermissions Permissions { get { throw null; } set { } } public string Publisher { get { throw null; } set { } } public string Title { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.CustomizableConnectorUiConfig 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.SecurityInsights.Models.CustomizableConnectorUiConfig System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3802,6 +3904,7 @@ public partial class CustomPermissionDetails : System.ClientModel.Primitives.IJs public CustomPermissionDetails(string name, string description) { } public string Description { get { throw null; } set { } } public string Name { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.CustomPermissionDetails 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.SecurityInsights.Models.CustomPermissionDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3840,6 +3943,7 @@ public DataConnectorConnectContent() { } public string Password { get { throw null; } set { } } public System.Collections.Generic.IList RequestConfigUserInputValues { get { throw null; } } public string UserName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.DataConnectorConnectContent 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.SecurityInsights.Models.DataConnectorConnectContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3850,6 +3954,7 @@ public partial class DataConnectorDataTypeCommon : System.ClientModel.Primitives { public DataConnectorDataTypeCommon(Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsDataTypeConnectionState state) { } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsDataTypeConnectionState State { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.DataConnectorDataTypeCommon 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.SecurityInsights.Models.DataConnectorDataTypeCommon System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3880,6 +3985,7 @@ public partial class DataConnectorRequirementsState : System.ClientModel.Primiti internal DataConnectorRequirementsState() { } public Azure.ResourceManager.SecurityInsights.Models.DataConnectorAuthorizationState? AuthorizationState { get { throw null; } } public Azure.ResourceManager.SecurityInsights.Models.DataConnectorLicenseState? LicenseState { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.DataConnectorRequirementsState 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.SecurityInsights.Models.DataConnectorRequirementsState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3889,6 +3995,7 @@ internal DataConnectorRequirementsState() { } public abstract partial class DataConnectorsCheckRequirements : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { protected DataConnectorsCheckRequirements() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.DataConnectorsCheckRequirements 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.SecurityInsights.Models.DataConnectorsCheckRequirements System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3899,6 +4006,7 @@ public partial class DataTypeDefinitions : System.ClientModel.Primitives.IJsonMo { public DataTypeDefinitions() { } public string DataType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.DataTypeDefinitions 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.SecurityInsights.Models.DataTypeDefinitions System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3911,6 +4019,7 @@ public DcrConfiguration(string dataCollectionEndpoint, string dataCollectionRule public string DataCollectionEndpoint { get { throw null; } set { } } public string DataCollectionRuleImmutableId { get { throw null; } set { } } public string StreamName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.DcrConfiguration 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.SecurityInsights.Models.DcrConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3941,6 +4050,7 @@ public partial class Dynamics365CheckRequirements : Azure.ResourceManager.Securi { public Dynamics365CheckRequirements() { } public System.Guid? TenantId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.Dynamics365CheckRequirements 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.SecurityInsights.Models.Dynamics365CheckRequirements System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3952,6 +4062,7 @@ public partial class Dynamics365DataConnector : Azure.ResourceManager.SecurityIn public Dynamics365DataConnector() { } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsDataTypeConnectionState? Dynamics365CdsActivitiesState { get { throw null; } set { } } public System.Guid? TenantId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.Dynamics365DataConnector 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.SecurityInsights.Models.Dynamics365DataConnector System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3962,6 +4073,7 @@ public partial class EnrichmentDomainContent : System.ClientModel.Primitives.IJs { public EnrichmentDomainContent() { } public string Domain { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.EnrichmentDomainContent 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.SecurityInsights.Models.EnrichmentDomainContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3977,6 +4089,7 @@ internal EnrichmentDomainWhois() { } public Azure.ResourceManager.SecurityInsights.Models.EnrichmentDomainWhoisDetails ParsedWhois { get { throw null; } } public string Server { get { throw null; } } public System.DateTimeOffset? UpdatedOn { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.EnrichmentDomainWhois 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.SecurityInsights.Models.EnrichmentDomainWhois System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3996,6 +4109,7 @@ internal EnrichmentDomainWhoisContact() { } public string Postal { get { throw null; } } public string State { get { throw null; } } public System.Collections.Generic.IReadOnlyList Street { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.EnrichmentDomainWhoisContact 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.SecurityInsights.Models.EnrichmentDomainWhoisContact System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4009,6 +4123,7 @@ internal EnrichmentDomainWhoisContacts() { } public Azure.ResourceManager.SecurityInsights.Models.EnrichmentDomainWhoisContact Billing { get { throw null; } } public Azure.ResourceManager.SecurityInsights.Models.EnrichmentDomainWhoisContact Registrant { get { throw null; } } public Azure.ResourceManager.SecurityInsights.Models.EnrichmentDomainWhoisContact Tech { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.EnrichmentDomainWhoisContacts 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.SecurityInsights.Models.EnrichmentDomainWhoisContacts System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4022,6 +4137,7 @@ internal EnrichmentDomainWhoisDetails() { } public System.Collections.Generic.IReadOnlyList NameServers { get { throw null; } } public Azure.ResourceManager.SecurityInsights.Models.EnrichmentDomainWhoisRegistrarDetails Registrar { get { throw null; } } public System.Collections.Generic.IReadOnlyList Statuses { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.EnrichmentDomainWhoisDetails 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.SecurityInsights.Models.EnrichmentDomainWhoisDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4037,6 +4153,7 @@ internal EnrichmentDomainWhoisRegistrarDetails() { } public string Name { get { throw null; } } public System.Uri Uri { get { throw null; } } public string WhoisServer { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.EnrichmentDomainWhoisRegistrarDetails 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.SecurityInsights.Models.EnrichmentDomainWhoisRegistrarDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4047,6 +4164,7 @@ public partial class EnrichmentIPAddressContent : System.ClientModel.Primitives. { public EnrichmentIPAddressContent() { } public string IPAddress { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.EnrichmentIPAddressContent 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.SecurityInsights.Models.EnrichmentIPAddressContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4073,6 +4191,7 @@ internal EnrichmentIPGeodata() { } public string State { get { throw null; } } public int? StateCf { get { throw null; } } public string StateCode { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.EnrichmentIPGeodata 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.SecurityInsights.Models.EnrichmentIPGeodata System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4100,6 +4219,7 @@ public partial class EntityAnalytics : Azure.ResourceManager.SecurityInsights.Se { public EntityAnalytics() { } public System.Collections.Generic.IList EntityProviders { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.EntityAnalytics 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.SecurityInsights.Models.EntityAnalytics System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4111,6 +4231,7 @@ public partial class EntityEdges : System.ClientModel.Primitives.IJsonModel AdditionalData { get { throw null; } } public string TargetEntityId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.EntityEdges 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.SecurityInsights.Models.EntityEdges System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4123,6 +4244,7 @@ public EntityExpandContent() { } public System.DateTimeOffset? EndOn { get { throw null; } set { } } public System.Guid? ExpansionId { get { throw null; } set { } } public System.DateTimeOffset? StartOn { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.EntityExpandContent 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.SecurityInsights.Models.EntityExpandContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4134,6 +4256,7 @@ public partial class EntityExpandResponseValue : System.ClientModel.Primitives.I internal EntityExpandResponseValue() { } public System.Collections.Generic.IReadOnlyList Edges { get { throw null; } } public System.Collections.Generic.IReadOnlyList Entities { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.EntityExpandResponseValue 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.SecurityInsights.Models.EntityExpandResponseValue System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4145,6 +4268,7 @@ public partial class EntityExpandResult : System.ClientModel.Primitives.IJsonMod internal EntityExpandResult() { } public System.Collections.Generic.IReadOnlyList MetaDataAggregations { get { throw null; } } public Azure.ResourceManager.SecurityInsights.Models.EntityExpandResponseValue Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.EntityExpandResult 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.SecurityInsights.Models.EntityExpandResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4156,6 +4280,7 @@ public partial class EntityFieldMapping : System.ClientModel.Primitives.IJsonMod public EntityFieldMapping() { } public string Identifier { get { throw null; } set { } } public string Value { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.EntityFieldMapping 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.SecurityInsights.Models.EntityFieldMapping System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4169,6 +4294,7 @@ public EntityGetInsightsContent(System.DateTimeOffset startOn, System.DateTimeOf public System.Collections.Generic.IList InsightQueryIds { get { throw null; } } public bool? IsDefaultExtendedTimeRangeAdded { get { throw null; } set { } } public System.DateTimeOffset StartOn { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.EntityGetInsightsContent 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.SecurityInsights.Models.EntityGetInsightsContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4182,6 +4308,7 @@ internal EntityInsightItem() { } public string QueryId { get { throw null; } } public Azure.ResourceManager.SecurityInsights.Models.EntityInsightItemQueryTimeInterval QueryTimeInterval { get { throw null; } } public Azure.ResourceManager.SecurityInsights.Models.InsightsTableResult TableQueryResults { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.EntityInsightItem 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.SecurityInsights.Models.EntityInsightItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4193,6 +4320,7 @@ public partial class EntityInsightItemQueryTimeInterval : System.ClientModel.Pri internal EntityInsightItemQueryTimeInterval() { } public System.DateTimeOffset? EndOn { get { throw null; } } public System.DateTimeOffset? StartOn { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.EntityInsightItemQueryTimeInterval 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.SecurityInsights.Models.EntityInsightItemQueryTimeInterval System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4222,6 +4350,7 @@ public EntityManualTriggerRequestContent(Azure.Core.ResourceIdentifier logicApps public Azure.Core.ResourceIdentifier IncidentArmId { get { throw null; } set { } } public Azure.Core.ResourceIdentifier LogicAppsResourceId { get { throw null; } } public System.Guid? TenantId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.EntityManualTriggerRequestContent 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.SecurityInsights.Models.EntityManualTriggerRequestContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4249,6 +4378,7 @@ public EntityManualTriggerRequestContent(Azure.Core.ResourceIdentifier logicApps public abstract partial class EntityQueryItem : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { protected EntityQueryItem() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.EntityQueryItem 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.SecurityInsights.Models.EntityQueryItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4262,6 +4392,7 @@ internal EntityQueryItemProperties() { } public System.BinaryData EntitiesFilter { get { throw null; } } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsEntityType? InputEntityType { get { throw null; } } public System.Collections.Generic.IReadOnlyList> RequiredInputFieldsSets { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.EntityQueryItemProperties 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.SecurityInsights.Models.EntityQueryItemProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4272,6 +4403,7 @@ public partial class EntityQueryItemPropertiesDataTypesItem : System.ClientModel { internal EntityQueryItemPropertiesDataTypesItem() { } public string DataType { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.EntityQueryItemPropertiesDataTypesItem 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.SecurityInsights.Models.EntityQueryItemPropertiesDataTypesItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4320,6 +4452,7 @@ public EntityTimelineContent(System.DateTimeOffset startOn, System.DateTimeOffse public System.Collections.Generic.IList Kinds { get { throw null; } } public int? NumberOfBucket { get { throw null; } set { } } public System.DateTimeOffset StartOn { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.EntityTimelineContent 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.SecurityInsights.Models.EntityTimelineContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4329,6 +4462,7 @@ public EntityTimelineContent(System.DateTimeOffset startOn, System.DateTimeOffse public abstract partial class EntityTimelineItem : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { protected EntityTimelineItem() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.EntityTimelineItem 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.SecurityInsights.Models.EntityTimelineItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4382,6 +4516,7 @@ public ExpansionEntityQuery() { } public System.Collections.Generic.IList InputFields { get { throw null; } } public System.Collections.Generic.IList OutputEntityTypes { get { throw null; } } public string QueryTemplate { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ExpansionEntityQuery 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.SecurityInsights.Models.ExpansionEntityQuery System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4395,6 +4530,7 @@ internal ExpansionResultAggregation() { } public int Count { get { throw null; } } public string DisplayName { get { throw null; } } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsEntityKind EntityKind { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ExpansionResultAggregation 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.SecurityInsights.Models.ExpansionResultAggregation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4406,6 +4542,7 @@ public partial class FusionScenarioExclusionPattern : System.ClientModel.Primiti public FusionScenarioExclusionPattern(string exclusionPattern, string dateAddedInUTC) { } public string DateAddedInUTC { get { throw null; } set { } } public string ExclusionPattern { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.FusionScenarioExclusionPattern 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.SecurityInsights.Models.FusionScenarioExclusionPattern System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4418,6 +4555,7 @@ public FusionSourceSettings(bool isEnabled, string sourceName) { } public bool IsEnabled { get { throw null; } set { } } public string SourceName { get { throw null; } set { } } public System.Collections.Generic.IList SourceSubTypes { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.FusionSourceSettings 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.SecurityInsights.Models.FusionSourceSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4431,6 +4569,7 @@ public FusionSourceSubTypeSetting(bool isEnabled, string sourceSubTypeName, Azur public Azure.ResourceManager.SecurityInsights.Models.FusionSubTypeSeverityFilter SeverityFilters { get { throw null; } set { } } public string SourceSubTypeDisplayName { get { throw null; } } public string SourceSubTypeName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.FusionSourceSubTypeSetting 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.SecurityInsights.Models.FusionSourceSubTypeSetting System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4442,6 +4581,7 @@ public partial class FusionSubTypeSeverityFilter : System.ClientModel.Primitives public FusionSubTypeSeverityFilter() { } public System.Collections.Generic.IList Filters { get { throw null; } } public bool? IsSupported { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.FusionSubTypeSeverityFilter 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.SecurityInsights.Models.FusionSubTypeSeverityFilter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4453,6 +4593,7 @@ public partial class FusionSubTypeSeverityFiltersItem : System.ClientModel.Primi public FusionSubTypeSeverityFiltersItem(Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsAlertSeverity severity, bool isEnabled) { } public bool IsEnabled { get { throw null; } set { } } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsAlertSeverity Severity { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.FusionSubTypeSeverityFiltersItem 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.SecurityInsights.Models.FusionSubTypeSeverityFiltersItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4464,6 +4605,7 @@ public partial class FusionTemplateSourceSetting : System.ClientModel.Primitives public FusionTemplateSourceSetting(string sourceName) { } public string SourceName { get { throw null; } set { } } public System.Collections.Generic.IList SourceSubTypes { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.FusionTemplateSourceSetting 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.SecurityInsights.Models.FusionTemplateSourceSetting System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4476,6 +4618,7 @@ public FusionTemplateSourceSubType(string sourceSubTypeName, Azure.ResourceManag public Azure.ResourceManager.SecurityInsights.Models.FusionTemplateSubTypeSeverityFilter SeverityFilter { get { throw null; } set { } } public string SourceSubTypeDisplayName { get { throw null; } } public string SourceSubTypeName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.FusionTemplateSourceSubType 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.SecurityInsights.Models.FusionTemplateSourceSubType System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4487,6 +4630,7 @@ public partial class FusionTemplateSubTypeSeverityFilter : System.ClientModel.Pr public FusionTemplateSubTypeSeverityFilter(bool isSupported) { } public bool IsSupported { get { throw null; } set { } } public System.Collections.Generic.IList SeverityFilters { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.FusionTemplateSubTypeSeverityFilter 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.SecurityInsights.Models.FusionTemplateSubTypeSeverityFilter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4499,6 +4643,7 @@ public GcpAuthModel(string serviceAccountEmail, string projectNumber, string wor public string ProjectNumber { get { throw null; } set { } } public string ServiceAccountEmail { get { throw null; } set { } } public string WorkloadIdentityProviderId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.GcpAuthModel 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.SecurityInsights.Models.GcpAuthModel System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4511,6 +4656,7 @@ public GcpAuthProperties(string serviceAccountEmail, string projectNumber, strin public string ProjectNumber { get { throw null; } set { } } public string ServiceAccountEmail { get { throw null; } set { } } public string WorkloadIdentityProviderId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.GcpAuthProperties 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.SecurityInsights.Models.GcpAuthProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4524,6 +4670,7 @@ public GcpDataConnector() { } public string ConnectorDefinitionName { get { throw null; } set { } } public Azure.ResourceManager.SecurityInsights.Models.DcrConfiguration DcrConfig { get { throw null; } set { } } public Azure.ResourceManager.SecurityInsights.Models.GcpRequestProperties Request { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.GcpDataConnector 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.SecurityInsights.Models.GcpDataConnector System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4535,6 +4682,7 @@ public partial class GcpRequestProperties : System.ClientModel.Primitives.IJsonM public GcpRequestProperties(string projectId, System.Collections.Generic.IEnumerable subscriptionNames) { } public string ProjectId { get { throw null; } set { } } public System.Collections.Generic.IList SubscriptionNames { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.GcpRequestProperties 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.SecurityInsights.Models.GcpRequestProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4546,6 +4694,7 @@ public partial class GenericBlobSbsAuthModel : Azure.ResourceManager.SecurityIns public GenericBlobSbsAuthModel() { } public System.Collections.Generic.IDictionary CredentialsConfig { get { throw null; } } public System.Collections.Generic.IDictionary StorageAccountCredentialsConfig { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.GenericBlobSbsAuthModel 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.SecurityInsights.Models.GenericBlobSbsAuthModel System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4556,6 +4705,7 @@ public partial class GitHubAuthModel : Azure.ResourceManager.SecurityInsights.Mo { public GitHubAuthModel() { } public string InstallationId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.GitHubAuthModel 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.SecurityInsights.Models.GitHubAuthModel System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4625,6 +4775,7 @@ public partial class IndicatorObservablesItem : System.ClientModel.Primitives.IJ public IndicatorObservablesItem() { } public string IndicatorObservablesItemType { get { throw null; } set { } } public string Value { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.IndicatorObservablesItem 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.SecurityInsights.Models.IndicatorObservablesItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4654,6 +4805,7 @@ public partial class InsightQueryItem : Azure.ResourceManager.SecurityInsights.M { internal InsightQueryItem() { } public Azure.ResourceManager.SecurityInsights.Models.InsightQueryItemProperties Properties { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.InsightQueryItem 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.SecurityInsights.Models.InsightQueryItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4671,6 +4823,7 @@ internal InsightQueryItemProperties() { } public string Description { get { throw null; } } public string DisplayName { get { throw null; } } public Azure.ResourceManager.SecurityInsights.Models.InsightQueryItemPropertiesTableQuery TableQuery { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.InsightQueryItemProperties 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.SecurityInsights.Models.InsightQueryItemProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4682,6 +4835,7 @@ public partial class InsightQueryItemPropertiesAdditionalQuery : System.ClientMo internal InsightQueryItemPropertiesAdditionalQuery() { } public string Query { get { throw null; } } public string Text { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.InsightQueryItemPropertiesAdditionalQuery 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.SecurityInsights.Models.InsightQueryItemPropertiesAdditionalQuery System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4693,6 +4847,7 @@ public partial class InsightQueryItemPropertiesDefaultTimeRange : System.ClientM internal InsightQueryItemPropertiesDefaultTimeRange() { } public string AfterRange { get { throw null; } } public string BeforeRange { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.InsightQueryItemPropertiesDefaultTimeRange 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.SecurityInsights.Models.InsightQueryItemPropertiesDefaultTimeRange System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4704,6 +4859,7 @@ public partial class InsightQueryItemPropertiesTableQuery : System.ClientModel.P internal InsightQueryItemPropertiesTableQuery() { } public System.Collections.Generic.IReadOnlyList ColumnsDefinitions { get { throw null; } } public System.Collections.Generic.IReadOnlyList QueriesDefinitions { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.InsightQueryItemPropertiesTableQuery 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.SecurityInsights.Models.InsightQueryItemPropertiesTableQuery System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4716,6 +4872,7 @@ internal InsightQueryItemPropertiesTableQueryColumnsDefinitionsItem() { } public string Header { get { throw null; } } public bool? IsDeepLinkSupported { get { throw null; } } public Azure.ResourceManager.SecurityInsights.Models.InsightsColumnOutputType? OutputType { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.InsightQueryItemPropertiesTableQueryColumnsDefinitionsItem 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.SecurityInsights.Models.InsightQueryItemPropertiesTableQueryColumnsDefinitionsItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4729,6 +4886,7 @@ internal InsightQueryItemPropertiesTableQueryQueriesDefinitionsItem() { } public System.Collections.Generic.IReadOnlyList LinkColumnsDefinitions { get { throw null; } } public string Project { get { throw null; } } public string Summarize { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.InsightQueryItemPropertiesTableQueryQueriesDefinitionsItem 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.SecurityInsights.Models.InsightQueryItemPropertiesTableQueryQueriesDefinitionsItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4740,6 +4898,7 @@ public partial class InsightQueryItemPropertiesTableQueryQueriesDefinitionsPrope internal InsightQueryItemPropertiesTableQueryQueriesDefinitionsPropertiesItemsItem() { } public string ProjectedName { get { throw null; } } public string Query { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.InsightQueryItemPropertiesTableQueryQueriesDefinitionsPropertiesItemsItem 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.SecurityInsights.Models.InsightQueryItemPropertiesTableQueryQueriesDefinitionsPropertiesItemsItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4771,6 +4930,7 @@ public partial class InsightsTableResult : System.ClientModel.Primitives.IJsonMo internal InsightsTableResult() { } public System.Collections.Generic.IReadOnlyList Columns { get { throw null; } } public System.Collections.Generic.IReadOnlyList> Rows { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.InsightsTableResult 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.SecurityInsights.Models.InsightsTableResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4782,6 +4942,7 @@ public partial class InsightsTableResultColumnsItem : System.ClientModel.Primiti internal InsightsTableResultColumnsItem() { } public string InsightsTableResultColumnsItemType { get { throw null; } } public string Name { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.InsightsTableResultColumnsItem 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.SecurityInsights.Models.InsightsTableResultColumnsItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4795,6 +4956,7 @@ public InstructionStep() { } public System.Collections.Generic.IList InnerSteps { get { throw null; } } public System.Collections.Generic.IList Instructions { get { throw null; } } public string Title { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.InstructionStep 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.SecurityInsights.Models.InstructionStep System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4806,6 +4968,7 @@ public partial class InstructionStepDetails : System.ClientModel.Primitives.IJso public InstructionStepDetails(System.BinaryData parameters, string instructionStepDetailsType) { } public string InstructionStepDetailsType { get { throw null; } set { } } public System.BinaryData Parameters { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.InstructionStepDetails 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.SecurityInsights.Models.InstructionStepDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4818,6 +4981,7 @@ public InstructionSteps() { } public string Description { get { throw null; } set { } } public System.Collections.Generic.IList Instructions { get { throw null; } } public string Title { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.InstructionSteps 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.SecurityInsights.Models.InstructionSteps System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4828,6 +4992,7 @@ public partial class IotCheckRequirements : Azure.ResourceManager.SecurityInsigh { public IotCheckRequirements() { } public string SubscriptionId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.IotCheckRequirements 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.SecurityInsights.Models.IotCheckRequirements System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4839,6 +5004,7 @@ public partial class IotDataConnector : Azure.ResourceManager.SecurityInsights.S public IotDataConnector() { } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsDataTypeConnectionState? AlertsState { get { throw null; } set { } } public string SubscriptionId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.IotDataConnector 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.SecurityInsights.Models.IotDataConnector System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4852,6 +5018,7 @@ public JobItem() { } public System.DateTimeOffset? ExecutionOn { get { throw null; } } public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } set { } } public Azure.ResourceManager.SecurityInsights.Models.PublicationStatus? Status { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.JobItem 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.SecurityInsights.Models.JobItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4869,6 +5036,7 @@ public JwtAuthModel(string tokenEndpoint, System.Collections.Generic.IDictionary public int? RequestTimeoutInSeconds { get { throw null; } set { } } public string TokenEndpoint { get { throw null; } set { } } public System.Collections.Generic.IDictionary UserName { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.JwtAuthModel 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.SecurityInsights.Models.JwtAuthModel System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4880,6 +5048,7 @@ public partial class LastDataReceivedDataType : System.ClientModel.Primitives.IJ public LastDataReceivedDataType() { } public string LastDataReceivedQuery { get { throw null; } set { } } public string Name { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.LastDataReceivedDataType 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.SecurityInsights.Models.LastDataReceivedDataType System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4891,6 +5060,7 @@ public partial class ManualTriggerRequestBody : System.ClientModel.Primitives.IJ public ManualTriggerRequestBody(string logicAppsResourceId) { } public string LogicAppsResourceId { get { throw null; } } public System.Guid? TenantId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ManualTriggerRequestBody 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.SecurityInsights.Models.ManualTriggerRequestBody System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4901,6 +5071,7 @@ public partial class McasCheckRequirements : Azure.ResourceManager.SecurityInsig { public McasCheckRequirements() { } public System.Guid? TenantId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.McasCheckRequirements 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.SecurityInsights.Models.McasCheckRequirements System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4912,6 +5083,7 @@ public partial class McasDataConnector : Azure.ResourceManager.SecurityInsights. public McasDataConnector() { } public Azure.ResourceManager.SecurityInsights.Models.McasDataConnectorDataTypes DataTypes { get { throw null; } set { } } public System.Guid? TenantId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.McasDataConnector 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.SecurityInsights.Models.McasDataConnector System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4923,6 +5095,7 @@ public partial class McasDataConnectorDataTypes : Azure.ResourceManager.Security public McasDataConnectorDataTypes() { } public McasDataConnectorDataTypes(Azure.ResourceManager.SecurityInsights.Models.DataConnectorDataTypeCommon alerts) { } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsDataTypeConnectionState? DiscoveryLogsState { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.McasDataConnectorDataTypes 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.SecurityInsights.Models.McasDataConnectorDataTypes System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4933,6 +5106,7 @@ public partial class MdatpCheckRequirements : Azure.ResourceManager.SecurityInsi { public MdatpCheckRequirements() { } public System.Guid? TenantId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.MdatpCheckRequirements 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.SecurityInsights.Models.MdatpCheckRequirements System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4944,6 +5118,7 @@ public partial class MdatpDataConnector : Azure.ResourceManager.SecurityInsights public MdatpDataConnector() { } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsDataTypeConnectionState? AlertsState { get { throw null; } set { } } public System.Guid? TenantId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.MdatpDataConnector 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.SecurityInsights.Models.MdatpDataConnector System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4954,6 +5129,7 @@ public partial class MicrosoftPurviewInformationProtectionCheckRequirements : Az { public MicrosoftPurviewInformationProtectionCheckRequirements() { } public System.Guid? TenantId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.MicrosoftPurviewInformationProtectionCheckRequirements 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.SecurityInsights.Models.MicrosoftPurviewInformationProtectionCheckRequirements System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4965,6 +5141,7 @@ public partial class MicrosoftPurviewInformationProtectionDataConnector : Azure. public MicrosoftPurviewInformationProtectionDataConnector() { } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsDataTypeConnectionState? LogsState { get { throw null; } set { } } public System.Guid? TenantId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.MicrosoftPurviewInformationProtectionDataConnector 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.SecurityInsights.Models.MicrosoftPurviewInformationProtectionDataConnector System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4983,6 +5160,7 @@ public MicrosoftSecurityIncidentCreationAlertRule() { } public System.DateTimeOffset? LastModifiedOn { get { throw null; } } public Azure.ResourceManager.SecurityInsights.Models.MicrosoftSecurityProductName? ProductFilter { get { throw null; } set { } } public System.Collections.Generic.IList SeveritiesFilter { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.MicrosoftSecurityIncidentCreationAlertRule 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.SecurityInsights.Models.MicrosoftSecurityIncidentCreationAlertRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5003,6 +5181,7 @@ public MicrosoftSecurityIncidentCreationAlertRuleTemplate() { } public System.Collections.Generic.IList RequiredDataConnectors { get { throw null; } } public System.Collections.Generic.IList SeveritiesFilter { get { throw null; } } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsAlertRuleTemplateStatus? Status { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.MicrosoftSecurityIncidentCreationAlertRuleTemplate 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.SecurityInsights.Models.MicrosoftSecurityIncidentCreationAlertRuleTemplate System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5044,6 +5223,7 @@ public MLBehaviorAnalyticsAlertRule() { } public System.Collections.Generic.IReadOnlyList SubTechniques { get { throw null; } } public System.Collections.Generic.IReadOnlyList Tactics { get { throw null; } } public System.Collections.Generic.IReadOnlyList Techniques { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.MLBehaviorAnalyticsAlertRule 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.SecurityInsights.Models.MLBehaviorAnalyticsAlertRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5063,6 +5243,7 @@ public MLBehaviorAnalyticsAlertRuleTemplate() { } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsAlertRuleTemplateStatus? Status { get { throw null; } set { } } public System.Collections.Generic.IList Tactics { get { throw null; } } public System.Collections.Generic.IList Techniques { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.MLBehaviorAnalyticsAlertRuleTemplate 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.SecurityInsights.Models.MLBehaviorAnalyticsAlertRuleTemplate System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5073,6 +5254,7 @@ public partial class MstiCheckRequirements : Azure.ResourceManager.SecurityInsig { public MstiCheckRequirements() { } public System.Guid? TenantId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.MstiCheckRequirements 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.SecurityInsights.Models.MstiCheckRequirements System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5084,6 +5266,7 @@ public partial class MstiDataConnector : Azure.ResourceManager.SecurityInsights. public MstiDataConnector() { } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsDataTypeConnectionState? MicrosoftEmergingThreatFeedState { get { throw null; } set { } } public System.Guid? TenantId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.MstiDataConnector 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.SecurityInsights.Models.MstiDataConnector System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5094,6 +5277,7 @@ public partial class MtpCheckRequirements : Azure.ResourceManager.SecurityInsigh { public MtpCheckRequirements() { } public System.Guid? TenantId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.MtpCheckRequirements 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.SecurityInsights.Models.MtpCheckRequirements System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5107,6 +5291,7 @@ public MtpDataConnector() { } public System.Collections.Generic.IList FilteredProvidersAlerts { get { throw null; } set { } } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsDataTypeConnectionState? IncidentsState { get { throw null; } set { } } public System.Guid? TenantId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.MtpDataConnector 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.SecurityInsights.Models.MtpDataConnector System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5139,6 +5324,7 @@ public NicEntity() { } public string IPAddressEntityId { get { throw null; } } public string MacAddress { get { throw null; } } public System.Collections.Generic.IReadOnlyList Vlans { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.NicEntity 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.SecurityInsights.Models.NicEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5148,6 +5334,7 @@ public NicEntity() { } public partial class NoneAuthModel : Azure.ResourceManager.SecurityInsights.Models.CcpAuthConfig, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public NoneAuthModel() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.NoneAuthModel 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.SecurityInsights.Models.NoneAuthModel System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5176,6 +5363,7 @@ public NrtAlertRule() { } public System.Collections.Generic.IList Tactics { get { throw null; } } public System.Collections.Generic.IList Techniques { get { throw null; } } public string TemplateVersion { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.NrtAlertRule 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.SecurityInsights.Models.NrtAlertRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5202,6 +5390,7 @@ public NrtAlertRuleTemplate() { } public System.Collections.Generic.IList Tactics { get { throw null; } } public System.Collections.Generic.IList Techniques { get { throw null; } } public string Version { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.NrtAlertRuleTemplate 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.SecurityInsights.Models.NrtAlertRuleTemplate System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5226,6 +5415,7 @@ public OAuthModel(string clientSecret, string clientId, string grantType, string public string TokenEndpoint { get { throw null; } set { } } public System.Collections.Generic.IDictionary TokenEndpointHeaders { get { throw null; } } public System.Collections.Generic.IDictionary TokenEndpointQueryParameters { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.OAuthModel 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.SecurityInsights.Models.OAuthModel System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5236,6 +5426,7 @@ public partial class Office365ProjectCheckRequirements : Azure.ResourceManager.S { public Office365ProjectCheckRequirements() { } public System.Guid? TenantId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.Office365ProjectCheckRequirements 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.SecurityInsights.Models.Office365ProjectCheckRequirements System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5247,6 +5438,7 @@ public partial class Office365ProjectDataConnector : Azure.ResourceManager.Secur public Office365ProjectDataConnector() { } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsDataTypeConnectionState? LogsState { get { throw null; } set { } } public System.Guid? TenantId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.Office365ProjectDataConnector 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.SecurityInsights.Models.Office365ProjectDataConnector System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5257,6 +5449,7 @@ public partial class OfficeAtpCheckRequirements : Azure.ResourceManager.Security { public OfficeAtpCheckRequirements() { } public System.Guid? TenantId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.OfficeAtpCheckRequirements 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.SecurityInsights.Models.OfficeAtpCheckRequirements System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5268,6 +5461,7 @@ public partial class OfficeAtpDataConnector : Azure.ResourceManager.SecurityInsi public OfficeAtpDataConnector() { } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsDataTypeConnectionState? AlertsState { get { throw null; } set { } } public System.Guid? TenantId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.OfficeAtpDataConnector 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.SecurityInsights.Models.OfficeAtpDataConnector System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5278,6 +5472,7 @@ public partial class OfficeIrmCheckRequirements : Azure.ResourceManager.Security { public OfficeIrmCheckRequirements() { } public System.Guid? TenantId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.OfficeIrmCheckRequirements 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.SecurityInsights.Models.OfficeIrmCheckRequirements System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5289,6 +5484,7 @@ public partial class OfficeIrmDataConnector : Azure.ResourceManager.SecurityInsi public OfficeIrmDataConnector() { } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsDataTypeConnectionState? AlertsState { get { throw null; } set { } } public System.Guid? TenantId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.OfficeIrmDataConnector 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.SecurityInsights.Models.OfficeIrmDataConnector System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5299,6 +5495,7 @@ public partial class OfficePowerBICheckRequirements : Azure.ResourceManager.Secu { public OfficePowerBICheckRequirements() { } public System.Guid? TenantId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.OfficePowerBICheckRequirements 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.SecurityInsights.Models.OfficePowerBICheckRequirements System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5310,6 +5507,7 @@ public partial class OfficePowerBIDataConnector : Azure.ResourceManager.Security public OfficePowerBIDataConnector() { } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsDataTypeConnectionState? LogsState { get { throw null; } set { } } public System.Guid? TenantId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.OfficePowerBIDataConnector 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.SecurityInsights.Models.OfficePowerBIDataConnector System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5323,6 +5521,7 @@ public OracleAuthModel(System.Guid tenantId, string userId, string publicFingerp public string PublicFingerprint { get { throw null; } set { } } public System.Guid TenantId { get { throw null; } set { } } public string UserId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.OracleAuthModel 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.SecurityInsights.Models.OracleAuthModel System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5371,6 +5570,7 @@ public partial class PropertyArrayConditionProperties : Azure.ResourceManager.Se { public PropertyArrayConditionProperties() { } public Azure.ResourceManager.SecurityInsights.Models.AutomationRulePropertyArrayValuesCondition ConditionProperties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.PropertyArrayConditionProperties 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.SecurityInsights.Models.PropertyArrayConditionProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5401,6 +5601,7 @@ public partial class PublicationFailedError : System.ClientModel.Primitives.IJso public PublicationFailedError(string memberResourceName, string errorMessage) { } public string ErrorMessage { get { throw null; } set { } } public string MemberResourceName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.PublicationFailedError 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.SecurityInsights.Models.PublicationFailedError System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5431,6 +5632,7 @@ public partial class PullRequestInfo : System.ClientModel.Primitives.IJsonModel< internal PullRequestInfo() { } public Azure.ResourceManager.SecurityInsights.Models.RecommendationState? State { get { throw null; } } public System.Uri Uri { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.PullRequestInfo 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.SecurityInsights.Models.PullRequestInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5466,6 +5668,7 @@ public RecommendedSuggestion(string suggestionTypeId, string title, string descr public string Description { get { throw null; } set { } } public string SuggestionTypeId { get { throw null; } set { } } public string Title { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.RecommendedSuggestion 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.SecurityInsights.Models.RecommendedSuggestion System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5476,6 +5679,7 @@ public partial class ReevaluateResult : System.ClientModel.Primitives.IJsonModel { internal ReevaluateResult() { } public System.DateTimeOffset? LastEvaluatedOn { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ReevaluateResult 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.SecurityInsights.Models.ReevaluateResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5487,6 +5691,7 @@ public partial class RelationshipHint : System.ClientModel.Primitives.IJsonModel internal RelationshipHint() { } public string FieldName { get { throw null; } } public string Source { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.RelationshipHint 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.SecurityInsights.Models.RelationshipHint System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5502,6 +5707,7 @@ public RepositoryAccess(Azure.ResourceManager.SecurityInsights.Models.Repository public Azure.ResourceManager.SecurityInsights.Models.RepositoryAccessKind Kind { get { throw null; } set { } } public string State { get { throw null; } set { } } public string Token { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.RepositoryAccess 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.SecurityInsights.Models.RepositoryAccess System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5536,6 +5742,7 @@ public RepositoryAccessProperties(Azure.ResourceManager.SecurityInsights.Models. public Azure.ResourceManager.SecurityInsights.Models.RepositoryAccessKind Kind { get { throw null; } } public string State { get { throw null; } set { } } public string Token { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.RepositoryAccessProperties 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.SecurityInsights.Models.RepositoryAccessProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5548,6 +5755,7 @@ public RepositoryResourceInfo() { } public Azure.ResourceManager.SecurityInsights.Models.AzureDevOpsResourceInfo AzureDevOpsResourceInfo { get { throw null; } } public string GitHubResourceInfoAppInstallationId { get { throw null; } } public Azure.ResourceManager.SecurityInsights.Models.SourceControlWebhook Webhook { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.RepositoryResourceInfo 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.SecurityInsights.Models.RepositoryResourceInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5566,6 +5774,7 @@ public RestApiPollerDataConnector() { } public Azure.ResourceManager.SecurityInsights.Models.RestApiPollerRequestPagingConfig Paging { get { throw null; } set { } } public Azure.ResourceManager.SecurityInsights.Models.RestApiPollerRequestConfig Request { get { throw null; } set { } } public Azure.ResourceManager.SecurityInsights.Models.CcpResponseConfig Response { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.RestApiPollerDataConnector 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.SecurityInsights.Models.RestApiPollerDataConnector System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5591,6 +5800,7 @@ public RestApiPollerRequestConfig(string apiEndpoint) { } public int? RetryCount { get { throw null; } set { } } public string StartTimeAttributeName { get { throw null; } set { } } public int? TimeoutInSeconds { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.RestApiPollerRequestConfig 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.SecurityInsights.Models.RestApiPollerRequestConfig System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5603,6 +5813,7 @@ public RestApiPollerRequestPagingConfig(Azure.ResourceManager.SecurityInsights.M public int? PageSize { get { throw null; } set { } } public string PageSizeParameterName { get { throw null; } set { } } public Azure.ResourceManager.SecurityInsights.Models.RestApiPollerRequestPagingKind PagingType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.RestApiPollerRequestPagingConfig 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.SecurityInsights.Models.RestApiPollerRequestPagingConfig System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5636,6 +5847,7 @@ public partial class SapSolutionUsageStatistic : Azure.ResourceManager.SecurityI { public SapSolutionUsageStatistic() { } public long? ActiveSystemIdCount { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SapSolutionUsageStatistic 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.SecurityInsights.Models.SapSolutionUsageStatistic System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5667,6 +5879,7 @@ public ScheduledAlertRuleTemplate() { } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsAlertRuleTriggerOperator? TriggerOperator { get { throw null; } set { } } public int? TriggerThreshold { get { throw null; } set { } } public string Version { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ScheduledAlertRuleTemplate 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.SecurityInsights.Models.ScheduledAlertRuleTemplate System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5687,6 +5900,7 @@ internal SecurityAlertTimelineItem() { } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsAlertSeverity Severity { get { throw null; } } public System.DateTimeOffset StartOn { get { throw null; } } public System.Collections.Generic.IReadOnlyList Techniques { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityAlertTimelineItem 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.SecurityInsights.Models.SecurityAlertTimelineItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5698,6 +5912,7 @@ public partial class SecurityInsightsAadDataConnector : Azure.ResourceManager.Se public SecurityInsightsAadDataConnector() { } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsDataTypeConnectionState? AlertsState { get { throw null; } set { } } public System.Guid? TenantId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsAadDataConnector 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.SecurityInsights.Models.SecurityInsightsAadDataConnector System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5709,6 +5924,7 @@ public partial class SecurityInsightsAatpDataConnector : Azure.ResourceManager.S public SecurityInsightsAatpDataConnector() { } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsDataTypeConnectionState? AlertsState { get { throw null; } set { } } public System.Guid? TenantId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsAatpDataConnector 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.SecurityInsights.Models.SecurityInsightsAatpDataConnector System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5732,6 +5948,7 @@ public SecurityInsightsAccountEntity() { } public string Puid { get { throw null; } } public string Sid { get { throw null; } } public string UpnSuffix { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsAccountEntity 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.SecurityInsights.Models.SecurityInsightsAccountEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5768,6 +5985,7 @@ public SecurityInsightsAlert() { } public string SystemAlertId { get { throw null; } } public System.Collections.Generic.IReadOnlyList Tactics { get { throw null; } } public string VendorName { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsAlert 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.SecurityInsights.Models.SecurityInsightsAlert System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5798,6 +6016,7 @@ public partial class SecurityInsightsAlertConfidenceReason : System.ClientModel. internal SecurityInsightsAlertConfidenceReason() { } public string Reason { get { throw null; } } public string ReasonType { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsAlertConfidenceReason 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.SecurityInsights.Models.SecurityInsightsAlertConfidenceReason System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5850,6 +6069,7 @@ public SecurityInsightsAlertDetailsOverride() { } public System.Collections.Generic.IList AlertDynamicProperties { get { throw null; } } public string AlertSeverityColumnName { get { throw null; } set { } } public string AlertTacticsColumnName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsAlertDetailsOverride 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.SecurityInsights.Models.SecurityInsightsAlertDetailsOverride System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5887,6 +6107,7 @@ public partial class SecurityInsightsAlertPropertyMapping : System.ClientModel.P public SecurityInsightsAlertPropertyMapping() { } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsAlertProperty? AlertProperty { get { throw null; } set { } } public string Value { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsAlertPropertyMapping 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.SecurityInsights.Models.SecurityInsightsAlertPropertyMapping System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5899,6 +6120,7 @@ public SecurityInsightsAlertRuleActionCreateOrUpdateContent() { } public Azure.ETag? ETag { get { throw null; } set { } } public Azure.Core.ResourceIdentifier LogicAppResourceId { get { throw null; } set { } } public System.Uri TriggerUri { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsAlertRuleActionCreateOrUpdateContent 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.SecurityInsights.Models.SecurityInsightsAlertRuleActionCreateOrUpdateContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5910,6 +6132,7 @@ public partial class SecurityInsightsAlertRuleEntityMapping : System.ClientModel public SecurityInsightsAlertRuleEntityMapping() { } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsAlertRuleEntityMappingType? EntityType { get { throw null; } set { } } public System.Collections.Generic.IList FieldMappings { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsAlertRuleEntityMapping 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.SecurityInsights.Models.SecurityInsightsAlertRuleEntityMapping System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5981,6 +6204,7 @@ public partial class SecurityInsightsAlertsDataTypeOfDataConnector : System.Clie public SecurityInsightsAlertsDataTypeOfDataConnector() { } public SecurityInsightsAlertsDataTypeOfDataConnector(Azure.ResourceManager.SecurityInsights.Models.DataConnectorDataTypeCommon alerts) { } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsDataTypeConnectionState? AlertsState { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsAlertsDataTypeOfDataConnector 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.SecurityInsights.Models.SecurityInsightsAlertsDataTypeOfDataConnector System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6035,6 +6259,7 @@ public SecurityInsightsApiKeyAuthModel(string apiKey, string apiKeyName) { } public string ApiKeyIdentifier { get { throw null; } set { } } public string ApiKeyName { get { throw null; } set { } } public bool? IsApiKeyInPostPayload { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsApiKeyAuthModel 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.SecurityInsights.Models.SecurityInsightsApiKeyAuthModel System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6046,6 +6271,7 @@ public partial class SecurityInsightsAscDataConnector : Azure.ResourceManager.Se public SecurityInsightsAscDataConnector() { } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsDataTypeConnectionState? AlertsState { get { throw null; } set { } } public string SubscriptionId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsAscDataConnector 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.SecurityInsights.Models.SecurityInsightsAscDataConnector System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6089,6 +6315,7 @@ public abstract partial class SecurityInsightsAutomationRuleAction : System.Clie { protected SecurityInsightsAutomationRuleAction(int order) { } public int Order { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsAutomationRuleAction 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.SecurityInsights.Models.SecurityInsightsAutomationRuleAction System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6098,6 +6325,7 @@ protected SecurityInsightsAutomationRuleAction(int order) { } public abstract partial class SecurityInsightsAutomationRuleCondition : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { protected SecurityInsightsAutomationRuleCondition() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsAutomationRuleCondition 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.SecurityInsights.Models.SecurityInsightsAutomationRuleCondition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6112,6 +6340,7 @@ public SecurityInsightsAutomationRuleTriggeringLogic(bool isEnabled, Azure.Resou public bool IsEnabled { get { throw null; } set { } } public Azure.ResourceManager.SecurityInsights.Models.TriggersOn TriggersOn { get { throw null; } set { } } public Azure.ResourceManager.SecurityInsights.Models.TriggersWhen TriggersWhen { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsAutomationRuleTriggeringLogic 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.SecurityInsights.Models.SecurityInsightsAutomationRuleTriggeringLogic System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6123,6 +6352,7 @@ public partial class SecurityInsightsAwsCloudTrailDataConnector : Azure.Resource public SecurityInsightsAwsCloudTrailDataConnector() { } public string AwsRoleArn { get { throw null; } set { } } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsDataTypeConnectionState? LogsState { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsAwsCloudTrailDataConnector 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.SecurityInsights.Models.SecurityInsightsAwsCloudTrailDataConnector System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6136,6 +6366,7 @@ public SecurityInsightsAzureResourceEntity() { } public string FriendlyName { get { throw null; } } public string ResourceId { get { throw null; } } public string SubscriptionId { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsAzureResourceEntity 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.SecurityInsights.Models.SecurityInsightsAzureResourceEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6149,6 +6380,7 @@ public SecurityInsightsBookmarkIncidentInfo() { } public string RelationName { get { throw null; } set { } } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsIncidentSeverity? Severity { get { throw null; } set { } } public string Title { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsBookmarkIncidentInfo 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.SecurityInsights.Models.SecurityInsightsBookmarkIncidentInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6162,6 +6394,7 @@ public SecurityInsightsClientInfo() { } public string Name { get { throw null; } set { } } public System.Guid? ObjectId { get { throw null; } set { } } public string UserPrincipalName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsClientInfo 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.SecurityInsights.Models.SecurityInsightsClientInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6176,6 +6409,7 @@ public SecurityInsightsCloudApplicationEntity() { } public string AppName { get { throw null; } } public string FriendlyName { get { throw null; } } public string InstanceName { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsCloudApplicationEntity 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.SecurityInsights.Models.SecurityInsightsCloudApplicationEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6209,6 +6443,7 @@ public SecurityInsightsDnsEntity() { } public string FriendlyName { get { throw null; } } public string HostIPAddressEntityId { get { throw null; } } public System.Collections.Generic.IReadOnlyList IPAddressEntityIds { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsDnsEntity 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.SecurityInsights.Models.SecurityInsightsDnsEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6218,6 +6453,7 @@ public SecurityInsightsDnsEntity() { } public partial class SecurityInsightsEntity : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public SecurityInsightsEntity() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsEntity 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.SecurityInsights.Models.SecurityInsightsEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6266,6 +6502,7 @@ public abstract partial class SecurityInsightsEntityQueryCreateOrUpdateContent : { protected SecurityInsightsEntityQueryCreateOrUpdateContent() { } public Azure.ETag? ETag { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsEntityQueryCreateOrUpdateContent 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.SecurityInsights.Models.SecurityInsightsEntityQueryCreateOrUpdateContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6314,6 +6551,7 @@ public partial class SecurityInsightsEyesOn : Azure.ResourceManager.SecurityInsi { public SecurityInsightsEyesOn() { } public bool? IsEnabled { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsEyesOn 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.SecurityInsights.Models.SecurityInsightsEyesOn System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6325,6 +6563,7 @@ public partial class SecurityInsightsFieldMapping : System.ClientModel.Primitive public SecurityInsightsFieldMapping() { } public string ColumnName { get { throw null; } set { } } public string Identifier { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsFieldMapping 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.SecurityInsights.Models.SecurityInsightsFieldMapping System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6359,6 +6598,7 @@ public SecurityInsightsFileEntity() { } public string FileName { get { throw null; } } public string FriendlyName { get { throw null; } } public string HostEntityId { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsFileEntity 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.SecurityInsights.Models.SecurityInsightsFileEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6412,6 +6652,7 @@ public SecurityInsightsFileHashEntity() { } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsFileHashAlgorithm? Algorithm { get { throw null; } } public string FriendlyName { get { throw null; } } public string HashValue { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsFileHashEntity 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.SecurityInsights.Models.SecurityInsightsFileHashEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6468,6 +6709,7 @@ public SecurityInsightsFileMetadata() { } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsFileFormat? FileFormat { get { throw null; } set { } } public string FileName { get { throw null; } set { } } public int? FileSize { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsFileMetadata 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.SecurityInsights.Models.SecurityInsightsFileMetadata System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6479,6 +6721,7 @@ public partial class SecurityInsightsFileValidationError : System.ClientModel.Pr internal SecurityInsightsFileValidationError() { } public System.Collections.Generic.IReadOnlyList ErrorMessages { get { throw null; } } public int? RecordIndex { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsFileValidationError 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.SecurityInsights.Models.SecurityInsightsFileValidationError System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6499,6 +6742,7 @@ public SecurityInsightsFusionAlertRule() { } public System.Collections.Generic.IReadOnlyList SubTechniques { get { throw null; } } public System.Collections.Generic.IReadOnlyList Tactics { get { throw null; } } public System.Collections.Generic.IReadOnlyList Techniques { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsFusionAlertRule 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.SecurityInsights.Models.SecurityInsightsFusionAlertRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6520,6 +6764,7 @@ public SecurityInsightsFusionAlertRuleTemplate() { } public System.Collections.Generic.IList SubTechniques { get { throw null; } } public System.Collections.Generic.IList Tactics { get { throw null; } } public System.Collections.Generic.IList Techniques { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsFusionAlertRuleTemplate 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.SecurityInsights.Models.SecurityInsightsFusionAlertRuleTemplate System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6534,6 +6779,7 @@ public SecurityInsightsGroupEntity() { } public string FriendlyName { get { throw null; } } public System.Guid? ObjectGuid { get { throw null; } } public string Sid { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsGroupEntity 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.SecurityInsights.Models.SecurityInsightsGroupEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6550,6 +6796,7 @@ public SecurityInsightsGroupingConfiguration(bool isEnabled, bool isClosedIncide public bool IsEnabled { get { throw null; } set { } } public System.TimeSpan LookbackDuration { get { throw null; } set { } } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsGroupingMatchingMethod MatchingMethod { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsGroupingConfiguration 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.SecurityInsights.Models.SecurityInsightsGroupingConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6589,6 +6836,7 @@ public SecurityInsightsHostEntity() { } public string OmsAgentId { get { throw null; } } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsHostOSFamily? OSFamily { get { throw null; } set { } } public string OSVersion { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsHostEntity 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.SecurityInsights.Models.SecurityInsightsHostEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6619,6 +6867,7 @@ public SecurityInsightsHuntingBookmark() { } public string QueryResult { get { throw null; } set { } } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsUserInfo UpdatedBy { get { throw null; } set { } } public System.DateTimeOffset? UpdatedOn { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsHuntingBookmark 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.SecurityInsights.Models.SecurityInsightsHuntingBookmark System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6633,6 +6882,7 @@ public SecurityInsightsHuntOwner() { } public System.Guid? ObjectId { get { throw null; } set { } } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsIncidentOwnerType? OwnerType { get { throw null; } set { } } public string UserPrincipalName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsHuntOwner 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.SecurityInsights.Models.SecurityInsightsHuntOwner System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6649,6 +6899,7 @@ public SecurityInsightsIncidentActionConfiguration() { } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsIncidentOwnerInfo Owner { get { throw null; } set { } } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsIncidentSeverity? Severity { get { throw null; } set { } } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsIncidentStatus? Status { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsIncidentActionConfiguration 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.SecurityInsights.Models.SecurityInsightsIncidentActionConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6665,6 +6916,7 @@ internal SecurityInsightsIncidentAdditionalInfo() { } public System.Uri ProviderIncidentUri { get { throw null; } } public System.Collections.Generic.IReadOnlyList Tactics { get { throw null; } } public System.Collections.Generic.IReadOnlyList Techniques { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsIncidentAdditionalInfo 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.SecurityInsights.Models.SecurityInsightsIncidentAdditionalInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6716,6 +6968,7 @@ public partial class SecurityInsightsIncidentConfiguration : System.ClientModel. public SecurityInsightsIncidentConfiguration(bool isIncidentCreated) { } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsGroupingConfiguration GroupingConfiguration { get { throw null; } set { } } public bool IsIncidentCreated { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsIncidentConfiguration 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.SecurityInsights.Models.SecurityInsightsIncidentConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6727,6 +6980,7 @@ public partial class SecurityInsightsIncidentEntitiesMetadata : System.ClientMod internal SecurityInsightsIncidentEntitiesMetadata() { } public int Count { get { throw null; } } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsEntityKind EntityKind { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsIncidentEntitiesMetadata 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.SecurityInsights.Models.SecurityInsightsIncidentEntitiesMetadata System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6738,6 +6992,7 @@ public partial class SecurityInsightsIncidentEntitiesResult : System.ClientModel internal SecurityInsightsIncidentEntitiesResult() { } public System.Collections.Generic.IReadOnlyList Entities { get { throw null; } } public System.Collections.Generic.IReadOnlyList MetaData { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsIncidentEntitiesResult 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.SecurityInsights.Models.SecurityInsightsIncidentEntitiesResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6749,6 +7004,7 @@ public partial class SecurityInsightsIncidentLabel : System.ClientModel.Primitiv public SecurityInsightsIncidentLabel(string labelName) { } public string LabelName { get { throw null; } set { } } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsIncidentLabelType? LabelType { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsIncidentLabel 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.SecurityInsights.Models.SecurityInsightsIncidentLabel System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6781,6 +7037,7 @@ public SecurityInsightsIncidentOwnerInfo() { } public System.Guid? ObjectId { get { throw null; } set { } } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsIncidentOwnerType? OwnerType { get { throw null; } set { } } public string UserPrincipalName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsIncidentOwnerInfo 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.SecurityInsights.Models.SecurityInsightsIncidentOwnerInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6878,6 +7135,7 @@ public SecurityInsightsIotDeviceEntity() { } public System.Collections.Generic.IReadOnlyList ThreatIntelligence { get { throw null; } } public string Vendor { get { throw null; } } public string Zone { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsIotDeviceEntity 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.SecurityInsights.Models.SecurityInsightsIotDeviceEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6892,6 +7150,7 @@ public SecurityInsightsIPEntity() { } public string FriendlyName { get { throw null; } } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsIPEntityGeoLocation Location { get { throw null; } } public System.Collections.Generic.IReadOnlyList ThreatIntelligence { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsIPEntity 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.SecurityInsights.Models.SecurityInsightsIPEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6908,6 +7167,7 @@ internal SecurityInsightsIPEntityGeoLocation() { } public double? Latitude { get { throw null; } } public double? Longitude { get { throw null; } } public string State { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsIPEntityGeoLocation 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.SecurityInsights.Models.SecurityInsightsIPEntityGeoLocation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6986,6 +7246,7 @@ public SecurityInsightsMailboxEntity() { } public string FriendlyName { get { throw null; } } public string MailboxPrimaryAddress { get { throw null; } } public string Upn { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsMailboxEntity 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.SecurityInsights.Models.SecurityInsightsMailboxEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7012,6 +7273,7 @@ public SecurityInsightsMailClusterEntity() { } public System.DateTimeOffset? QueryOn { get { throw null; } } public string Source { get { throw null; } } public System.Collections.Generic.IReadOnlyList Threats { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsMailClusterEntity 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.SecurityInsights.Models.SecurityInsightsMailClusterEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7068,6 +7330,7 @@ public SecurityInsightsMailMessageEntity() { } public System.Collections.Generic.IReadOnlyList ThreatDetectionMethods { get { throw null; } } public System.Collections.Generic.IReadOnlyList Threats { get { throw null; } } public System.Collections.Generic.IReadOnlyList Uris { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsMailMessageEntity 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.SecurityInsights.Models.SecurityInsightsMailMessageEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7083,6 +7346,7 @@ public SecurityInsightsMalwareEntity() { } public string FriendlyName { get { throw null; } } public string MalwareName { get { throw null; } } public System.Collections.Generic.IReadOnlyList ProcessEntityIds { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsMalwareEntity 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.SecurityInsights.Models.SecurityInsightsMalwareEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7095,6 +7359,7 @@ public SecurityInsightsMetadataAuthor() { } public string Email { get { throw null; } set { } } public string Link { get { throw null; } set { } } public string Name { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsMetadataAuthor 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.SecurityInsights.Models.SecurityInsightsMetadataAuthor System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7106,6 +7371,7 @@ public partial class SecurityInsightsMetadataCategories : System.ClientModel.Pri public SecurityInsightsMetadataCategories() { } public System.Collections.Generic.IList Domains { get { throw null; } } public System.Collections.Generic.IList Verticals { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsMetadataCategories 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.SecurityInsights.Models.SecurityInsightsMetadataCategories System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7121,6 +7387,7 @@ public SecurityInsightsMetadataDependencies() { } public string Name { get { throw null; } set { } } public Azure.ResourceManager.SecurityInsights.Models.ThreatIntelligenceQueryOperator? Operator { get { throw null; } set { } } public string Version { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsMetadataDependencies 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.SecurityInsights.Models.SecurityInsightsMetadataDependencies System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7186,6 +7453,7 @@ public SecurityInsightsMetadataPatch() { } public System.Collections.Generic.IList ThreatAnalysisTactics { get { throw null; } } public System.Collections.Generic.IList ThreatAnalysisTechniques { get { throw null; } } public string Version { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsMetadataPatch 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.SecurityInsights.Models.SecurityInsightsMetadataPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7198,6 +7466,7 @@ public SecurityInsightsMetadataSource(Azure.ResourceManager.SecurityInsights.Mod public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsSourceKind Kind { get { throw null; } set { } } public string Name { get { throw null; } set { } } public string SourceId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsMetadataSource 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.SecurityInsights.Models.SecurityInsightsMetadataSource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7211,6 +7480,7 @@ public SecurityInsightsMetadataSupport(Azure.ResourceManager.SecurityInsights.Mo public string Link { get { throw null; } set { } } public string Name { get { throw null; } set { } } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsSupportTier Tier { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsMetadataSupport 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.SecurityInsights.Models.SecurityInsightsMetadataSupport System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7222,6 +7492,7 @@ public partial class SecurityInsightsOfficeDataConnector : Azure.ResourceManager public SecurityInsightsOfficeDataConnector() { } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsOfficeDataConnectorDataTypes DataTypes { get { throw null; } set { } } public System.Guid? TenantId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsOfficeDataConnector 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.SecurityInsights.Models.SecurityInsightsOfficeDataConnector System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7235,6 +7506,7 @@ public SecurityInsightsOfficeDataConnectorDataTypes(Azure.ResourceManager.Securi public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsDataTypeConnectionState? ExchangeState { get { throw null; } set { } } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsDataTypeConnectionState? SharePointState { get { throw null; } set { } } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsDataTypeConnectionState? TeamsState { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsOfficeDataConnectorDataTypes 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.SecurityInsights.Models.SecurityInsightsOfficeDataConnectorDataTypes System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7272,6 +7544,7 @@ public SecurityInsightsProcessEntity() { } public string ImageFileEntityId { get { throw null; } } public string ParentProcessEntityId { get { throw null; } } public string ProcessId { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsProcessEntity 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.SecurityInsights.Models.SecurityInsightsProcessEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7293,6 +7566,7 @@ public partial class SecurityInsightsPropertyArrayChangedConditionProperties : A { public SecurityInsightsPropertyArrayChangedConditionProperties() { } public Azure.ResourceManager.SecurityInsights.Models.AutomationRulePropertyArrayChangedValuesCondition ConditionProperties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsPropertyArrayChangedConditionProperties 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.SecurityInsights.Models.SecurityInsightsPropertyArrayChangedConditionProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7303,6 +7577,7 @@ public partial class SecurityInsightsPropertyChangedConditionProperties : Azure. { public SecurityInsightsPropertyChangedConditionProperties() { } public Azure.ResourceManager.SecurityInsights.Models.AutomationRulePropertyValuesChangedCondition ConditionProperties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsPropertyChangedConditionProperties 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.SecurityInsights.Models.SecurityInsightsPropertyChangedConditionProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7313,6 +7588,7 @@ public partial class SecurityInsightsPropertyConditionProperties : Azure.Resourc { public SecurityInsightsPropertyConditionProperties() { } public Azure.ResourceManager.SecurityInsights.Models.AutomationRulePropertyValuesCondition ConditionProperties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsPropertyConditionProperties 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.SecurityInsights.Models.SecurityInsightsPropertyConditionProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7323,6 +7599,7 @@ public partial class SecurityInsightsRecommendationPatch : System.ClientModel.Pr { public SecurityInsightsRecommendationPatch() { } public Azure.ResourceManager.SecurityInsights.Models.RecommendationState? RecommendationPatchState { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsRecommendationPatch 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.SecurityInsights.Models.SecurityInsightsRecommendationPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7362,6 +7639,7 @@ public SecurityInsightsRegistryKeyEntity() { } public string FriendlyName { get { throw null; } } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsRegistryHive? Hive { get { throw null; } } public string Key { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsRegistryKeyEntity 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.SecurityInsights.Models.SecurityInsightsRegistryKeyEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7377,6 +7655,7 @@ public SecurityInsightsRegistryValueEntity() { } public string ValueData { get { throw null; } } public string ValueName { get { throw null; } } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsRegistryValueKind? ValueType { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsRegistryValueEntity 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.SecurityInsights.Models.SecurityInsightsRegistryValueEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7433,6 +7712,7 @@ public SecurityInsightsScheduledAlertRule() { } public string TemplateVersion { get { throw null; } set { } } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsAlertRuleTriggerOperator? TriggerOperator { get { throw null; } set { } } public int? TriggerThreshold { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsScheduledAlertRule 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.SecurityInsights.Models.SecurityInsightsScheduledAlertRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7443,6 +7723,7 @@ public partial class SecurityInsightsSettingAnomaliesKind : Azure.ResourceManage { public SecurityInsightsSettingAnomaliesKind() { } public bool? IsEnabled { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsSettingAnomaliesKind 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.SecurityInsights.Models.SecurityInsightsSettingAnomaliesKind System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7484,6 +7765,7 @@ public SecurityInsightsSubmissionMailEntity() { } public System.Guid? SubmissionId { get { throw null; } } public System.DateTimeOffset? SubmitOn { get { throw null; } } public string Submitter { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsSubmissionMailEntity 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.SecurityInsights.Models.SecurityInsightsSubmissionMailEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7530,6 +7812,7 @@ internal SecurityInsightsThreatIntelligence() { } public string ThreatDescription { get { throw null; } } public string ThreatName { get { throw null; } } public string ThreatType { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsThreatIntelligence 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.SecurityInsights.Models.SecurityInsightsThreatIntelligence System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7569,6 +7852,7 @@ public SecurityInsightsThreatIntelligenceIndicatorData() { } public System.Collections.Generic.IList ThreatTypes { get { throw null; } } public System.DateTimeOffset? ValidFrom { get { throw null; } set { } } public System.DateTimeOffset? ValidUntil { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsThreatIntelligenceIndicatorData 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.SecurityInsights.Models.SecurityInsightsThreatIntelligenceIndicatorData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7581,6 +7865,7 @@ public SecurityInsightsTIDataConnector() { } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsDataTypeConnectionState? IndicatorsState { get { throw null; } set { } } public System.Guid? TenantId { get { throw null; } set { } } public System.DateTimeOffset? TipLookbackOn { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsTIDataConnector 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.SecurityInsights.Models.SecurityInsightsTIDataConnector System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7593,6 +7878,7 @@ public SecurityInsightsUriEntity() { } public System.Collections.Generic.IReadOnlyDictionary AdditionalData { get { throw null; } } public string FriendlyName { get { throw null; } } public System.Uri Uri { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsUriEntity 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.SecurityInsights.Models.SecurityInsightsUriEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7605,6 +7891,7 @@ public SecurityInsightsUserInfo() { } public string Email { get { throw null; } } public string Name { get { throw null; } } public System.Guid? ObjectId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsUserInfo 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.SecurityInsights.Models.SecurityInsightsUserInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7616,6 +7903,7 @@ public partial class SecurityMLAnalyticsSettingsDataSource : System.ClientModel. public SecurityMLAnalyticsSettingsDataSource() { } public string ConnectorId { get { throw null; } set { } } public System.Collections.Generic.IList DataTypes { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityMLAnalyticsSettingsDataSource 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.SecurityInsights.Models.SecurityMLAnalyticsSettingsDataSource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7626,6 +7914,7 @@ public partial class SentinelEntityMapping : System.ClientModel.Primitives.IJson { public SentinelEntityMapping() { } public string ColumnName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SentinelEntityMapping 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.SecurityInsights.Models.SentinelEntityMapping System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7643,6 +7932,7 @@ public SessionAuthModel(System.Collections.Generic.IDictionary u public System.Uri SessionLoginRequestUri { get { throw null; } set { } } public int? SessionTimeoutInMinutes { get { throw null; } set { } } public System.Collections.Generic.IDictionary UserName { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SessionAuthModel 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.SecurityInsights.Models.SessionAuthModel System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7697,6 +7987,7 @@ internal SourceControlDeployment() { } public System.DateTimeOffset? DeploymentOn { get { throw null; } } public Azure.ResourceManager.SecurityInsights.Models.SourceControlDeploymentResult? DeploymentResult { get { throw null; } } public Azure.ResourceManager.SecurityInsights.Models.SourceControlDeploymentState? DeploymentState { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SourceControlDeployment 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.SecurityInsights.Models.SourceControlDeployment System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7728,6 +8019,7 @@ internal SourceControlDeploymentInfo() { } public Azure.ResourceManager.SecurityInsights.Models.SourceControlDeployment Deployment { get { throw null; } } public Azure.ResourceManager.SecurityInsights.Models.SourceControlDeploymentFetchStatus? DeploymentFetchStatus { get { throw null; } } public string Message { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SourceControlDeploymentInfo 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.SecurityInsights.Models.SourceControlDeploymentInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7777,6 +8069,7 @@ public partial class SourceControlOperationWarning : System.ClientModel.Primitiv { internal SourceControlOperationWarning() { } public Azure.ResourceManager.SecurityInsights.Models.SourceControlOperationWarningBody Warning { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SourceControlOperationWarning 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.SecurityInsights.Models.SourceControlOperationWarning System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7789,6 +8082,7 @@ internal SourceControlOperationWarningBody() { } public Azure.ResourceManager.SecurityInsights.Models.SourceControlOperationWarningCode? Code { get { throw null; } } public System.Collections.Generic.IReadOnlyList Details { get { throw null; } } public string Message { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SourceControlOperationWarningBody 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.SecurityInsights.Models.SourceControlOperationWarningBody System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7823,6 +8117,7 @@ internal SourceControlRepo() { } public string FullName { get { throw null; } } public long? InstallationId { get { throw null; } } public System.Uri Uri { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SourceControlRepo 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.SecurityInsights.Models.SourceControlRepo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7836,6 +8131,7 @@ public SourceControlRepository(System.Uri uri, string branch) { } public System.Uri DeploymentLogsUri { get { throw null; } } public System.Uri DisplayUri { get { throw null; } set { } } public System.Uri Uri { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SourceControlRepository 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.SecurityInsights.Models.SourceControlRepository System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7865,6 +8161,7 @@ public partial class SourceControlSampleQueries : System.ClientModel.Primitives. public SourceControlSampleQueries() { } public string Description { get { throw null; } set { } } public string Query { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SourceControlSampleQueries 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.SecurityInsights.Models.SourceControlSampleQueries System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7878,6 +8175,7 @@ public SourceControlServicePrincipal() { } public System.DateTimeOffset? CredentialsExpireOn { get { throw null; } set { } } public string Id { get { throw null; } } public System.Guid? TenantId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SourceControlServicePrincipal 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.SecurityInsights.Models.SourceControlServicePrincipal System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7909,6 +8207,7 @@ public SourceControlWebhook() { } public string WebhookId { get { throw null; } } public System.DateTimeOffset? WebhookSecretUpdateOn { get { throw null; } } public System.Uri WebhookUri { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SourceControlWebhook 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.SecurityInsights.Models.SourceControlWebhook System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7923,6 +8222,7 @@ public TeamInformation() { } public System.Uri PrimaryChannelUri { get { throw null; } } public System.DateTimeOffset? TeamCreationTimeUtc { get { throw null; } } public string TeamId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.TeamInformation 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.SecurityInsights.Models.TeamInformation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7957,6 +8257,7 @@ internal TemplateBaseProperties() { } public System.Collections.Generic.IReadOnlyList ThreatAnalysisTactics { get { throw null; } } public System.Collections.Generic.IReadOnlyList ThreatAnalysisTechniques { get { throw null; } } public string Version { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.TemplateBaseProperties 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.SecurityInsights.Models.TemplateBaseProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7968,6 +8269,7 @@ public partial class TemplateProperties : Azure.ResourceManager.SecurityInsights internal TemplateProperties() { } public System.Collections.Generic.IReadOnlyList DependantTemplates { get { throw null; } } public System.BinaryData MainTemplate { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.TemplateProperties 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.SecurityInsights.Models.TemplateProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7986,6 +8288,7 @@ public ThreatIntelligenceAlertRule() { } public System.Collections.Generic.IReadOnlyList SubTechniques { get { throw null; } } public System.Collections.Generic.IReadOnlyList Tactics { get { throw null; } } public System.Collections.Generic.IReadOnlyList Techniques { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ThreatIntelligenceAlertRule 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.SecurityInsights.Models.ThreatIntelligenceAlertRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8005,6 +8308,7 @@ public ThreatIntelligenceAlertRuleTemplate() { } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsAlertRuleTemplateStatus? Status { get { throw null; } set { } } public System.Collections.Generic.IList Tactics { get { throw null; } } public System.Collections.Generic.IList Techniques { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ThreatIntelligenceAlertRuleTemplate 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.SecurityInsights.Models.ThreatIntelligenceAlertRuleTemplate System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8015,6 +8319,7 @@ public partial class ThreatIntelligenceAppendTags : System.ClientModel.Primitive { public ThreatIntelligenceAppendTags() { } public System.Collections.Generic.IList ThreatIntelligenceTags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ThreatIntelligenceAppendTags 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.SecurityInsights.Models.ThreatIntelligenceAppendTags System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8024,6 +8329,7 @@ public ThreatIntelligenceAppendTags() { } public partial class ThreatIntelligenceAttackPattern : Azure.ResourceManager.SecurityInsights.Models.ThreatIntelligenceObject, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ThreatIntelligenceAttackPattern() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ThreatIntelligenceAttackPattern 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.SecurityInsights.Models.ThreatIntelligenceAttackPattern System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8034,6 +8340,7 @@ public partial class ThreatIntelligenceCheckRequirements : Azure.ResourceManager { public ThreatIntelligenceCheckRequirements() { } public System.Guid? TenantId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ThreatIntelligenceCheckRequirements 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.SecurityInsights.Models.ThreatIntelligenceCheckRequirements System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8044,6 +8351,7 @@ public partial class ThreatIntelligenceCount : System.ClientModel.Primitives.IJs { internal ThreatIntelligenceCount() { } public int Count { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ThreatIntelligenceCount 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.SecurityInsights.Models.ThreatIntelligenceCount System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8054,6 +8362,7 @@ public partial class ThreatIntelligenceCountQuery : System.ClientModel.Primitive { public ThreatIntelligenceCountQuery() { } public Azure.ResourceManager.SecurityInsights.Models.ThreatIntelligenceQueryConditionProperties Condition { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ThreatIntelligenceCountQuery 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.SecurityInsights.Models.ThreatIntelligenceCountQuery System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8068,6 +8377,7 @@ public ThreatIntelligenceExternalReference() { } public System.Collections.Generic.IDictionary Hashes { get { throw null; } } public string SourceName { get { throw null; } set { } } public System.Uri Uri { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ThreatIntelligenceExternalReference 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.SecurityInsights.Models.ThreatIntelligenceExternalReference System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8090,6 +8400,7 @@ public ThreatIntelligenceFilteringCriteria() { } public System.Collections.Generic.IList SortBy { get { throw null; } } public System.Collections.Generic.IList Sources { get { throw null; } } public System.Collections.Generic.IList ThreatTypes { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ThreatIntelligenceFilteringCriteria 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.SecurityInsights.Models.ThreatIntelligenceFilteringCriteria System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8102,6 +8413,7 @@ public ThreatIntelligenceGranularMarkingEntity() { } public string Language { get { throw null; } set { } } public int? MarkingRef { get { throw null; } set { } } public System.Collections.Generic.IList Selectors { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ThreatIntelligenceGranularMarkingEntity 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.SecurityInsights.Models.ThreatIntelligenceGranularMarkingEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8111,6 +8423,7 @@ public ThreatIntelligenceGranularMarkingEntity() { } public partial class ThreatIntelligenceIdentity : Azure.ResourceManager.SecurityInsights.Models.ThreatIntelligenceObject, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ThreatIntelligenceIdentity() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ThreatIntelligenceIdentity 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.SecurityInsights.Models.ThreatIntelligenceIdentity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8121,6 +8434,7 @@ public partial class ThreatIntelligenceIndicator : Azure.ResourceManager.Securit { public ThreatIntelligenceIndicator() { } public System.Collections.Generic.IList Observables { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ThreatIntelligenceIndicator 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.SecurityInsights.Models.ThreatIntelligenceIndicator System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8132,6 +8446,7 @@ public partial class ThreatIntelligenceKillChainPhase : System.ClientModel.Primi public ThreatIntelligenceKillChainPhase() { } public string KillChainName { get { throw null; } set { } } public string PhaseName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ThreatIntelligenceKillChainPhase 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.SecurityInsights.Models.ThreatIntelligenceKillChainPhase System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8145,6 +8460,7 @@ internal ThreatIntelligenceMetric() { } public System.Collections.Generic.IReadOnlyList PatternTypeMetrics { get { throw null; } } public System.Collections.Generic.IReadOnlyList SourceMetrics { get { throw null; } } public System.Collections.Generic.IReadOnlyList ThreatTypeMetrics { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ThreatIntelligenceMetric 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.SecurityInsights.Models.ThreatIntelligenceMetric System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8156,6 +8472,7 @@ public partial class ThreatIntelligenceMetricEntity : System.ClientModel.Primiti internal ThreatIntelligenceMetricEntity() { } public string MetricName { get { throw null; } } public int? MetricValue { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ThreatIntelligenceMetricEntity 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.SecurityInsights.Models.ThreatIntelligenceMetricEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8166,6 +8483,7 @@ public partial class ThreatIntelligenceMetrics : System.ClientModel.Primitives.I { internal ThreatIntelligenceMetrics() { } public Azure.ResourceManager.SecurityInsights.Models.ThreatIntelligenceMetric Properties { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ThreatIntelligenceMetrics 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.SecurityInsights.Models.ThreatIntelligenceMetrics System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8185,6 +8503,7 @@ protected ThreatIntelligenceObject() { } public string LastUpdateMethod { get { throw null; } } public System.Collections.Generic.IReadOnlyList RelationshipHints { get { throw null; } } public string Source { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ThreatIntelligenceObject 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.SecurityInsights.Models.ThreatIntelligenceObject System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8196,6 +8515,7 @@ public partial class ThreatIntelligenceParsedPattern : System.ClientModel.Primit public ThreatIntelligenceParsedPattern() { } public string PatternTypeKey { get { throw null; } set { } } public System.Collections.Generic.IList PatternTypeValues { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ThreatIntelligenceParsedPattern 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.SecurityInsights.Models.ThreatIntelligenceParsedPattern System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8207,6 +8527,7 @@ public partial class ThreatIntelligenceParsedPatternTypeValue : System.ClientMod public ThreatIntelligenceParsedPatternTypeValue() { } public string Value { get { throw null; } set { } } public string ValueType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ThreatIntelligenceParsedPatternTypeValue 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.SecurityInsights.Models.ThreatIntelligenceParsedPatternTypeValue System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8220,6 +8541,7 @@ public ThreatIntelligenceQuery() { } public int? MaxPageSize { get { throw null; } set { } } public int? MinPageSize { get { throw null; } set { } } public Azure.ResourceManager.SecurityInsights.Models.ThreatIntelligenceQuerySortBy SortBy { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ThreatIntelligenceQuery 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.SecurityInsights.Models.ThreatIntelligenceQuery System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8232,6 +8554,7 @@ public ThreatIntelligenceQueryCondition(System.Collections.Generic.IEnumerable Clauses { get { throw null; } } public Azure.ResourceManager.SecurityInsights.Models.ThreatIntelligenceQueryConnective? ConditionConnective { get { throw null; } set { } } public string StixObjectType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ThreatIntelligenceQueryCondition 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.SecurityInsights.Models.ThreatIntelligenceQueryCondition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8245,6 +8568,7 @@ public ThreatIntelligenceQueryConditionClause(string field, Azure.ResourceManage public string Field { get { throw null; } } public Azure.ResourceManager.SecurityInsights.Models.ThreatIntelligenceQueryOperator Operator { get { throw null; } } public System.Collections.Generic.IList Values { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ThreatIntelligenceQueryConditionClause 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.SecurityInsights.Models.ThreatIntelligenceQueryConditionClause System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8257,6 +8581,7 @@ public ThreatIntelligenceQueryConditionProperties(System.Collections.Generic.IEn public System.Collections.Generic.IList Clauses { get { throw null; } } public Azure.ResourceManager.SecurityInsights.Models.ThreatIntelligenceQueryConnective? ConditionConnective { get { throw null; } set { } } public string StixObjectType { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ThreatIntelligenceQueryConditionProperties 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.SecurityInsights.Models.ThreatIntelligenceQueryConditionProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8328,6 +8653,7 @@ public partial class ThreatIntelligenceQuerySortBy : System.ClientModel.Primitiv public ThreatIntelligenceQuerySortBy() { } public Azure.ResourceManager.SecurityInsights.Models.ThreatIntelligenceQuerySortingDirection? Direction { get { throw null; } set { } } public string Field { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ThreatIntelligenceQuerySortBy 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.SecurityInsights.Models.ThreatIntelligenceQuerySortBy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8355,6 +8681,7 @@ public ThreatIntelligenceQuerySortBy() { } public partial class ThreatIntelligenceRelationship : Azure.ResourceManager.SecurityInsights.Models.ThreatIntelligenceObject, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ThreatIntelligenceRelationship() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ThreatIntelligenceRelationship 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.SecurityInsights.Models.ThreatIntelligenceRelationship System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8366,6 +8693,7 @@ public partial class ThreatIntelligenceSortingCriteria : System.ClientModel.Prim public ThreatIntelligenceSortingCriteria() { } public string ItemKey { get { throw null; } set { } } public Azure.ResourceManager.SecurityInsights.Models.ThreatIntelligenceSortingOrder? SortOrder { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ThreatIntelligenceSortingCriteria 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.SecurityInsights.Models.ThreatIntelligenceSortingCriteria System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8395,6 +8723,7 @@ public partial class ThreatIntelligenceTaxiiCheckRequirements : Azure.ResourceMa { public ThreatIntelligenceTaxiiCheckRequirements() { } public System.Guid? TenantId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ThreatIntelligenceTaxiiCheckRequirements 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.SecurityInsights.Models.ThreatIntelligenceTaxiiCheckRequirements System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8414,6 +8743,7 @@ public ThreatIntelligenceTaxiiDataConnector() { } public System.Guid? TenantId { get { throw null; } set { } } public string UserName { get { throw null; } set { } } public string WorkspaceId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ThreatIntelligenceTaxiiDataConnector 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.SecurityInsights.Models.ThreatIntelligenceTaxiiDataConnector System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8423,6 +8753,7 @@ public ThreatIntelligenceTaxiiDataConnector() { } public partial class ThreatIntelligenceThreatActor : Azure.ResourceManager.SecurityInsights.Models.ThreatIntelligenceObject, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ThreatIntelligenceThreatActor() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ThreatIntelligenceThreatActor 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.SecurityInsights.Models.ThreatIntelligenceThreatActor System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8452,6 +8783,7 @@ internal ThreatIntelligenceUserInfo() { } public string Email { get { throw null; } } public string Name { get { throw null; } } public System.Guid? ObjectId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ThreatIntelligenceUserInfo 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.SecurityInsights.Models.ThreatIntelligenceUserInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8539,6 +8871,7 @@ public partial class UebaSettings : Azure.ResourceManager.SecurityInsights.Secur { public UebaSettings() { } public System.Collections.Generic.IList DataSources { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.UebaSettings 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.SecurityInsights.Models.UebaSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8583,6 +8916,7 @@ internal WorkspaceEnrichmentIPGeodata() { } public string State { get { throw null; } } public string StateCode { get { throw null; } } public int? StateConfidenceFactor { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.WorkspaceEnrichmentIPGeodata 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.SecurityInsights.Models.WorkspaceEnrichmentIPGeodata System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8593,6 +8927,7 @@ public partial class WorkspaceManagerAssignmentItem : System.ClientModel.Primiti { public WorkspaceManagerAssignmentItem() { } public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.WorkspaceManagerAssignmentItem 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.SecurityInsights.Models.WorkspaceManagerAssignmentItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/assets.json b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/assets.json index a6ca4353dcc9..1f6e848ca5cb 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/assets.json +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/securityinsights/Azure.ResourceManager.SecurityInsights", - "Tag": "net/securityinsights/Azure.ResourceManager.SecurityInsights_4ce51c684f" + "Tag": "net/securityinsights/Azure.ResourceManager.SecurityInsights_3bcbd39fd9" } diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AadCheckRequirements.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AadCheckRequirements.Serialization.cs index 43cecfb1f7cc..355416f9f5b2 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AadCheckRequirements.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AadCheckRequirements.Serialization.cs @@ -18,6 +18,15 @@ public partial class AadCheckRequirements : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,9 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(AadCheckRequirements)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(TenantId)) @@ -36,22 +43,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr writer.WriteStringValue(TenantId.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } AadCheckRequirements IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AatpCheckRequirements.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AatpCheckRequirements.Serialization.cs index 5b0eef19f7f8..965f7108a4c1 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AatpCheckRequirements.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AatpCheckRequirements.Serialization.cs @@ -18,6 +18,15 @@ public partial class AatpCheckRequirements : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,9 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(AatpCheckRequirements)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(TenantId)) @@ -36,22 +43,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW writer.WriteStringValue(TenantId.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } AatpCheckRequirements IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ActionsList.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ActionsList.Serialization.cs index 4da3573c633b..2b5087bcfe9e 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ActionsList.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ActionsList.Serialization.cs @@ -20,6 +20,15 @@ internal partial class ActionsList : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio throw new FormatException($"The model {nameof(ActionsList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio #endif } } - writer.WriteEndObject(); } ActionsList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ActivityCustomEntityQuery.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ActivityCustomEntityQuery.Serialization.cs index 59bfc20ccecd..abbbe1b22d38 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ActivityCustomEntityQuery.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ActivityCustomEntityQuery.Serialization.cs @@ -21,6 +21,15 @@ public partial class ActivityCustomEntityQuery : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,34 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(ActivityCustomEntityQuery)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (Optional.IsDefined(ETag)) - { - writer.WritePropertyName("etag"u8); - writer.WriteStringValue(ETag.Value.ToString()); - } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Title)) @@ -145,22 +127,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea writer.WriteStringValue(LastModifiedOn.Value, "O"); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ActivityCustomEntityQuery IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ActivityEntityQueriesPropertiesQueryDefinitions.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ActivityEntityQueriesPropertiesQueryDefinitions.Serialization.cs index caf2c1ef21e8..7cce7ed8dcbd 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ActivityEntityQueriesPropertiesQueryDefinitions.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ActivityEntityQueriesPropertiesQueryDefinitions.Serialization.cs @@ -19,6 +19,15 @@ internal partial class ActivityEntityQueriesPropertiesQueryDefinitions : IUtf8Js void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonW throw new FormatException($"The model {nameof(ActivityEntityQueriesPropertiesQueryDefinitions)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Query)) { writer.WritePropertyName("query"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonW #endif } } - writer.WriteEndObject(); } ActivityEntityQueriesPropertiesQueryDefinitions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ActivityEntityQuery.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ActivityEntityQuery.Serialization.cs index c33f9be98889..f9266a7877f0 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ActivityEntityQuery.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ActivityEntityQuery.Serialization.cs @@ -21,6 +21,15 @@ public partial class ActivityEntityQuery : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,34 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ActivityEntityQuery)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (Optional.IsDefined(ETag)) - { - writer.WritePropertyName("etag"u8); - writer.WriteStringValue(ETag.Value.ToString()); - } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Title)) @@ -145,22 +127,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri writer.WriteStringValue(LastModifiedOn.Value, "O"); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ActivityEntityQuery IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ActivityEntityQueryDefinition.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ActivityEntityQueryDefinition.Serialization.cs index 54a3f40bb362..c358f51b031b 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ActivityEntityQueryDefinition.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ActivityEntityQueryDefinition.Serialization.cs @@ -19,6 +19,15 @@ public partial class ActivityEntityQueryDefinition : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(ActivityEntityQueryDefinition)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Query)) { writer.WritePropertyName("query"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } ActivityEntityQueryDefinition IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ActivityEntityQueryTemplate.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ActivityEntityQueryTemplate.Serialization.cs index 3cb4eecdef35..60e783011a51 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ActivityEntityQueryTemplate.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ActivityEntityQueryTemplate.Serialization.cs @@ -21,6 +21,15 @@ public partial class ActivityEntityQueryTemplate : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,29 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(ActivityEntityQueryTemplate)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Title)) @@ -130,22 +117,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR writer.WriteEndObject(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ActivityEntityQueryTemplate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ActivityTimelineItem.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ActivityTimelineItem.Serialization.cs index 9e94f6a40a13..74247cedaa5d 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ActivityTimelineItem.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ActivityTimelineItem.Serialization.cs @@ -19,6 +19,15 @@ public partial class ActivityTimelineItem : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(ActivityTimelineItem)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("queryId"u8); writer.WriteStringValue(QueryId); writer.WritePropertyName("bucketStartTimeUTC"u8); @@ -41,24 +50,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr writer.WriteStringValue(Content); writer.WritePropertyName("title"u8); writer.WriteStringValue(Title); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ActivityTimelineItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AddIncidentTaskActionProperties.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AddIncidentTaskActionProperties.Serialization.cs index 9db2bc81d8ea..8997dc653451 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AddIncidentTaskActionProperties.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AddIncidentTaskActionProperties.Serialization.cs @@ -19,6 +19,15 @@ public partial class AddIncidentTaskActionProperties : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(AddIncidentTaskActionProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("title"u8); writer.WriteStringValue(Title); if (Optional.IsDefined(Description)) @@ -49,7 +57,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } AddIncidentTaskActionProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AlertRuleTemplateDataSource.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AlertRuleTemplateDataSource.Serialization.cs index 7f621cdcce19..e3d0a389cf8b 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AlertRuleTemplateDataSource.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AlertRuleTemplateDataSource.Serialization.cs @@ -20,6 +20,15 @@ public partial class AlertRuleTemplateDataSource : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(AlertRuleTemplateDataSource)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ConnectorId)) { writer.WritePropertyName("connectorId"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } AlertRuleTemplateDataSource IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AlertRuleTemplatesList.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AlertRuleTemplatesList.Serialization.cs index 7069569c675c..d7ab96e92ad4 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AlertRuleTemplatesList.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AlertRuleTemplatesList.Serialization.cs @@ -20,6 +20,15 @@ internal partial class AlertRuleTemplatesList : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(AlertRuleTemplatesList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } AlertRuleTemplatesList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AlertRulesList.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AlertRulesList.Serialization.cs index b1fbdc9a0099..d91f5e5cf6d8 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AlertRulesList.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AlertRulesList.Serialization.cs @@ -20,6 +20,15 @@ internal partial class AlertRulesList : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(AlertRulesList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp #endif } } - writer.WriteEndObject(); } AlertRulesList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AnalyticsRuleRunTrigger.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AnalyticsRuleRunTrigger.Serialization.cs index b401942cfb35..65746e7a362b 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AnalyticsRuleRunTrigger.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AnalyticsRuleRunTrigger.Serialization.cs @@ -18,6 +18,15 @@ public partial class AnalyticsRuleRunTrigger : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(AnalyticsRuleRunTrigger)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); writer.WritePropertyName("executionTimeUtc"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } AnalyticsRuleRunTrigger IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AnomalySecurityMLAnalyticsSettings.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AnomalySecurityMLAnalyticsSettings.Serialization.cs index a83f9bbfc34f..2e788acfd41e 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AnomalySecurityMLAnalyticsSettings.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AnomalySecurityMLAnalyticsSettings.Serialization.cs @@ -21,6 +21,15 @@ public partial class AnomalySecurityMLAnalyticsSettings : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,34 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(AnomalySecurityMLAnalyticsSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (Optional.IsDefined(ETag)) - { - writer.WritePropertyName("etag"u8); - writer.WriteStringValue(ETag.Value.ToString()); - } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Description)) @@ -151,22 +133,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteStringValue(SettingsDefinitionId.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } AnomalySecurityMLAnalyticsSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AnomalyTimelineItem.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AnomalyTimelineItem.Serialization.cs index a3bee7a16919..800123afc329 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AnomalyTimelineItem.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AnomalyTimelineItem.Serialization.cs @@ -20,6 +20,15 @@ public partial class AnomalyTimelineItem : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(AnomalyTimelineItem)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("azureResourceId"u8); writer.WriteStringValue(AzureResourceId); if (Optional.IsDefined(ProductName)) @@ -78,24 +87,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri } writer.WriteEndArray(); } - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } AnomalyTimelineItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AscCheckRequirements.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AscCheckRequirements.Serialization.cs index 5f76538f2de6..1fe543efc9a8 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AscCheckRequirements.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AscCheckRequirements.Serialization.cs @@ -18,6 +18,15 @@ public partial class AscCheckRequirements : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,9 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(AscCheckRequirements)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(SubscriptionId)) @@ -36,22 +43,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr writer.WriteStringValue(SubscriptionId); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } AscCheckRequirements IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AutomationRuleAddIncidentTaskAction.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AutomationRuleAddIncidentTaskAction.Serialization.cs index a9734a8b23cc..2131cfea11c1 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AutomationRuleAddIncidentTaskAction.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AutomationRuleAddIncidentTaskAction.Serialization.cs @@ -19,6 +19,15 @@ public partial class AutomationRuleAddIncidentTaskAction : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,32 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(AutomationRuleAddIncidentTaskAction)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(ActionConfiguration)) { writer.WritePropertyName("actionConfiguration"u8); writer.WriteObjectValue(ActionConfiguration, options); } - writer.WritePropertyName("order"u8); - writer.WriteNumberValue(Order); - writer.WritePropertyName("actionType"u8); - writer.WriteStringValue(ActionType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } AutomationRuleAddIncidentTaskAction IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AutomationRuleBooleanCondition.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AutomationRuleBooleanCondition.Serialization.cs index 4a0d57d6ad7c..2176e1e9ebec 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AutomationRuleBooleanCondition.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AutomationRuleBooleanCondition.Serialization.cs @@ -20,6 +20,15 @@ public partial class AutomationRuleBooleanCondition : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(AutomationRuleBooleanCondition)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Operator)) { writer.WritePropertyName("operator"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } AutomationRuleBooleanCondition IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AutomationRuleModifyPropertiesAction.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AutomationRuleModifyPropertiesAction.Serialization.cs index fe0b53c71ec0..59c03d446ddf 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AutomationRuleModifyPropertiesAction.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AutomationRuleModifyPropertiesAction.Serialization.cs @@ -19,6 +19,15 @@ public partial class AutomationRuleModifyPropertiesAction : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,32 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(AutomationRuleModifyPropertiesAction)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(ActionConfiguration)) { writer.WritePropertyName("actionConfiguration"u8); writer.WriteObjectValue(ActionConfiguration, options); } - writer.WritePropertyName("order"u8); - writer.WriteNumberValue(Order); - writer.WritePropertyName("actionType"u8); - writer.WriteStringValue(ActionType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } AutomationRuleModifyPropertiesAction IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AutomationRulePropertyArrayChangedValuesCondition.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AutomationRulePropertyArrayChangedValuesCondition.Serialization.cs index b6b35c0e53c5..5118050d4c14 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AutomationRulePropertyArrayChangedValuesCondition.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AutomationRulePropertyArrayChangedValuesCondition.Serialization.cs @@ -19,6 +19,15 @@ public partial class AutomationRulePropertyArrayChangedValuesCondition : IUtf8Js void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8Jso throw new FormatException($"The model {nameof(AutomationRulePropertyArrayChangedValuesCondition)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ArrayType)) { writer.WritePropertyName("arrayType"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8Jso #endif } } - writer.WriteEndObject(); } AutomationRulePropertyArrayChangedValuesCondition IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AutomationRulePropertyArrayValuesCondition.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AutomationRulePropertyArrayValuesCondition.Serialization.cs index 175df9885c7a..a94803529953 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AutomationRulePropertyArrayValuesCondition.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AutomationRulePropertyArrayValuesCondition.Serialization.cs @@ -20,6 +20,15 @@ public partial class AutomationRulePropertyArrayValuesCondition : IUtf8JsonSeria void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(AutomationRulePropertyArrayValuesCondition)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ArrayType)) { writer.WritePropertyName("arrayType"u8); @@ -63,7 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } AutomationRulePropertyArrayValuesCondition IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AutomationRulePropertyValuesChangedCondition.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AutomationRulePropertyValuesChangedCondition.Serialization.cs index 8b1bce4cc7ea..725934b875ad 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AutomationRulePropertyValuesChangedCondition.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AutomationRulePropertyValuesChangedCondition.Serialization.cs @@ -20,6 +20,15 @@ public partial class AutomationRulePropertyValuesChangedCondition : IUtf8JsonSer void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWrit throw new FormatException($"The model {nameof(AutomationRulePropertyValuesChangedCondition)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(PropertyName)) { writer.WritePropertyName("propertyName"u8); @@ -68,7 +76,6 @@ void IJsonModel.Write(Utf8JsonWrit #endif } } - writer.WriteEndObject(); } AutomationRulePropertyValuesChangedCondition IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AutomationRulePropertyValuesCondition.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AutomationRulePropertyValuesCondition.Serialization.cs index 9e8001b902ce..be630d4c5959 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AutomationRulePropertyValuesCondition.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AutomationRulePropertyValuesCondition.Serialization.cs @@ -20,6 +20,15 @@ public partial class AutomationRulePropertyValuesCondition : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(AutomationRulePropertyValuesCondition)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(PropertyName)) { writer.WritePropertyName("propertyName"u8); @@ -63,7 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } AutomationRulePropertyValuesCondition IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AutomationRuleRunPlaybookAction.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AutomationRuleRunPlaybookAction.Serialization.cs index 437a6b5c787e..1969ee092699 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AutomationRuleRunPlaybookAction.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AutomationRuleRunPlaybookAction.Serialization.cs @@ -19,6 +19,15 @@ public partial class AutomationRuleRunPlaybookAction : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,32 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(AutomationRuleRunPlaybookAction)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(ActionConfiguration)) { writer.WritePropertyName("actionConfiguration"u8); writer.WriteObjectValue(ActionConfiguration, options); } - writer.WritePropertyName("order"u8); - writer.WriteNumberValue(Order); - writer.WritePropertyName("actionType"u8); - writer.WriteStringValue(ActionType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } AutomationRuleRunPlaybookAction IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AutomationRuleRunPlaybookActionProperties.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AutomationRuleRunPlaybookActionProperties.Serialization.cs index 6a51b540df0f..f195304ba94a 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AutomationRuleRunPlaybookActionProperties.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AutomationRuleRunPlaybookActionProperties.Serialization.cs @@ -19,6 +19,15 @@ public partial class AutomationRuleRunPlaybookActionProperties : IUtf8JsonSerial void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(AutomationRuleRunPlaybookActionProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("logicAppResourceId"u8); writer.WriteStringValue(LogicAppResourceId); if (Optional.IsDefined(TenantId)) @@ -49,7 +57,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } AutomationRuleRunPlaybookActionProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AutomationRulesList.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AutomationRulesList.Serialization.cs index ae56e324afc9..52117110100d 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AutomationRulesList.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AutomationRulesList.Serialization.cs @@ -20,6 +20,15 @@ internal partial class AutomationRulesList : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(AutomationRulesList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } AutomationRulesList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AwsAuthModel.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AwsAuthModel.Serialization.cs index 5582df8fe4b4..5c244c39f108 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AwsAuthModel.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AwsAuthModel.Serialization.cs @@ -19,6 +19,15 @@ public partial class AwsAuthModel : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(AwsAuthModel)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("roleArn"u8); writer.WriteStringValue(RoleArn); if (Optional.IsDefined(ExternalId)) @@ -34,24 +43,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti writer.WritePropertyName("externalId"u8); writer.WriteStringValue(ExternalId); } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(AuthType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } AwsAuthModel IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AwsCloudTrailCheckRequirements.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AwsCloudTrailCheckRequirements.Serialization.cs index 410ef864b99b..b4974178e7e1 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AwsCloudTrailCheckRequirements.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AwsCloudTrailCheckRequirements.Serialization.cs @@ -18,6 +18,15 @@ public partial class AwsCloudTrailCheckRequirements : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,25 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(AwsCloudTrailCheckRequirements)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } AwsCloudTrailCheckRequirements IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AwsS3CheckRequirements.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AwsS3CheckRequirements.Serialization.cs index d3c1eccc7667..b83820d3c8bd 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AwsS3CheckRequirements.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AwsS3CheckRequirements.Serialization.cs @@ -18,6 +18,15 @@ public partial class AwsS3CheckRequirements : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,25 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(AwsS3CheckRequirements)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } AwsS3CheckRequirements IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AwsS3DataConnector.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AwsS3DataConnector.Serialization.cs index 7c4d3429c68b..82030ad8e3b7 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AwsS3DataConnector.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AwsS3DataConnector.Serialization.cs @@ -21,6 +21,15 @@ public partial class AwsS3DataConnector : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,34 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(AwsS3DataConnector)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (Optional.IsDefined(ETag)) - { - writer.WritePropertyName("etag"u8); - writer.WriteStringValue(ETag.Value.ToString()); - } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(DestinationTable)) @@ -87,22 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndObject(); writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } AwsS3DataConnector IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AzureDevOpsResourceInfo.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AzureDevOpsResourceInfo.Serialization.cs index d0e2fb21c28c..0bbb55abc7d9 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AzureDevOpsResourceInfo.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AzureDevOpsResourceInfo.Serialization.cs @@ -19,6 +19,15 @@ public partial class AzureDevOpsResourceInfo : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(AzureDevOpsResourceInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(PipelineId)) { writer.WritePropertyName("pipelineId"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } AzureDevOpsResourceInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/BasicAuthModel.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/BasicAuthModel.Serialization.cs index 9049e728a10d..555fe14396b9 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/BasicAuthModel.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/BasicAuthModel.Serialization.cs @@ -19,6 +19,15 @@ public partial class BasicAuthModel : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,29 +35,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(BasicAuthModel)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("userName"u8); writer.WriteStringValue(UserName); writer.WritePropertyName("password"u8); writer.WriteStringValue(Password); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(AuthType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } BasicAuthModel IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/BillingStatisticList.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/BillingStatisticList.Serialization.cs index c4b398a6d4d6..d9cabd9d1c51 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/BillingStatisticList.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/BillingStatisticList.Serialization.cs @@ -20,6 +20,15 @@ internal partial class BillingStatisticList : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(BillingStatisticList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } BillingStatisticList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/BookmarkConnectedEntity.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/BookmarkConnectedEntity.Serialization.cs index d5ca1e11bfad..249d6753e796 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/BookmarkConnectedEntity.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/BookmarkConnectedEntity.Serialization.cs @@ -19,6 +19,15 @@ public partial class BookmarkConnectedEntity : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(BookmarkConnectedEntity)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(TargetEntityId)) { writer.WritePropertyName("targetEntityId"u8); @@ -59,7 +67,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } BookmarkConnectedEntity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/BookmarkEntityMappings.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/BookmarkEntityMappings.Serialization.cs index 37c7ca32111d..c4360b51fa31 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/BookmarkEntityMappings.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/BookmarkEntityMappings.Serialization.cs @@ -20,6 +20,15 @@ public partial class BookmarkEntityMappings : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(BookmarkEntityMappings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(EntityType)) { writer.WritePropertyName("entityType"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } BookmarkEntityMappings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/BookmarkExpandContent.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/BookmarkExpandContent.Serialization.cs index 257be79973b1..b69dcb073487 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/BookmarkExpandContent.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/BookmarkExpandContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class BookmarkExpandContent : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(BookmarkExpandContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(EndOn)) { writer.WritePropertyName("endTime"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } BookmarkExpandContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/BookmarkExpandResponseValue.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/BookmarkExpandResponseValue.Serialization.cs index 042ac8729bea..f70abc2d3037 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/BookmarkExpandResponseValue.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/BookmarkExpandResponseValue.Serialization.cs @@ -20,6 +20,15 @@ public partial class BookmarkExpandResponseValue : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(BookmarkExpandResponseValue)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Entities)) { writer.WritePropertyName("entities"u8); @@ -63,7 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } BookmarkExpandResponseValue IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/BookmarkExpandResult.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/BookmarkExpandResult.Serialization.cs index f4d9aeaf262b..7471c448b269 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/BookmarkExpandResult.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/BookmarkExpandResult.Serialization.cs @@ -19,6 +19,15 @@ public partial class BookmarkExpandResult : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(BookmarkExpandResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(MetaData)) { writer.WritePropertyName("metaData"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } BookmarkExpandResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/BookmarkList.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/BookmarkList.Serialization.cs index 9d0ae05b1219..6cc2b86348b9 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/BookmarkList.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/BookmarkList.Serialization.cs @@ -20,6 +20,15 @@ internal partial class BookmarkList : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(BookmarkList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti #endif } } - writer.WriteEndObject(); } BookmarkList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/BookmarkTimelineItem.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/BookmarkTimelineItem.Serialization.cs index 80f0da86867e..c6430b377e79 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/BookmarkTimelineItem.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/BookmarkTimelineItem.Serialization.cs @@ -20,6 +20,15 @@ public partial class BookmarkTimelineItem : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(BookmarkTimelineItem)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("azureResourceId"u8); writer.WriteStringValue(AzureResourceId); if (Optional.IsDefined(DisplayName)) @@ -70,24 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr } writer.WriteEndArray(); } - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } BookmarkTimelineItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/BooleanConditionProperties.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/BooleanConditionProperties.Serialization.cs index baf96795d2e7..89ecb7c207ec 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/BooleanConditionProperties.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/BooleanConditionProperties.Serialization.cs @@ -19,6 +19,15 @@ public partial class BooleanConditionProperties : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,30 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(BooleanConditionProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(ConditionProperties)) { writer.WritePropertyName("conditionProperties"u8); writer.WriteObjectValue(ConditionProperties, options); } - writer.WritePropertyName("conditionType"u8); - writer.WriteStringValue(ConditionType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } BooleanConditionProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CcpAuthConfig.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CcpAuthConfig.Serialization.cs index 7c23b4400622..0461a9d99590 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CcpAuthConfig.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CcpAuthConfig.Serialization.cs @@ -20,6 +20,15 @@ public partial class CcpAuthConfig : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt throw new FormatException($"The model {nameof(CcpAuthConfig)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("type"u8); writer.WriteStringValue(AuthType.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -45,7 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt #endif } } - writer.WriteEndObject(); } CcpAuthConfig IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CcpResponseConfig.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CcpResponseConfig.Serialization.cs index 9b6cdef4fbc7..2b4ac0fa64ef 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CcpResponseConfig.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CcpResponseConfig.Serialization.cs @@ -20,6 +20,15 @@ public partial class CcpResponseConfig : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(CcpResponseConfig)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("eventsJsonPaths"u8); writer.WriteStartArray(); foreach (var item in EventsJsonPaths) @@ -135,7 +143,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } CcpResponseConfig IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CodelessApiPollingDataConnector.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CodelessApiPollingDataConnector.Serialization.cs index c4a21f898cd3..711bb13d0788 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CodelessApiPollingDataConnector.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CodelessApiPollingDataConnector.Serialization.cs @@ -20,6 +20,15 @@ public partial class CodelessApiPollingDataConnector : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,34 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(CodelessApiPollingDataConnector)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (Optional.IsDefined(ETag)) - { - writer.WritePropertyName("etag"u8); - writer.WriteStringValue(ETag.Value.ToString()); - } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(ConnectorUiConfig)) @@ -68,22 +50,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo writer.WriteObjectValue(PollingConfig, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } CodelessApiPollingDataConnector IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CodelessConnectorPollingAuthProperties.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CodelessConnectorPollingAuthProperties.Serialization.cs index bf00bda2d480..4c32c2958d25 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CodelessConnectorPollingAuthProperties.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CodelessConnectorPollingAuthProperties.Serialization.cs @@ -19,6 +19,15 @@ public partial class CodelessConnectorPollingAuthProperties : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(CodelessConnectorPollingAuthProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("authType"u8); writer.WriteStringValue(AuthType); if (Optional.IsDefined(ApiKeyName)) @@ -125,7 +133,6 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } CodelessConnectorPollingAuthProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CodelessConnectorPollingConfigProperties.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CodelessConnectorPollingConfigProperties.Serialization.cs index 1e8f01c072a0..af6020ba2b1a 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CodelessConnectorPollingConfigProperties.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CodelessConnectorPollingConfigProperties.Serialization.cs @@ -19,6 +19,15 @@ public partial class CodelessConnectorPollingConfigProperties : IUtf8JsonSeriali void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter w throw new FormatException($"The model {nameof(CodelessConnectorPollingConfigProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IsActive)) { writer.WritePropertyName("isActive"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter w #endif } } - writer.WriteEndObject(); } CodelessConnectorPollingConfigProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CodelessConnectorPollingPagingProperties.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CodelessConnectorPollingPagingProperties.Serialization.cs index b9fee59ca9b2..b1fc54216db4 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CodelessConnectorPollingPagingProperties.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CodelessConnectorPollingPagingProperties.Serialization.cs @@ -19,6 +19,15 @@ public partial class CodelessConnectorPollingPagingProperties : IUtf8JsonSeriali void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter w throw new FormatException($"The model {nameof(CodelessConnectorPollingPagingProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("pagingType"u8); writer.WriteStringValue(PagingType); if (Optional.IsDefined(NextPageParaName)) @@ -84,7 +92,6 @@ void IJsonModel.Write(Utf8JsonWriter w #endif } } - writer.WriteEndObject(); } CodelessConnectorPollingPagingProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CodelessConnectorPollingRequestProperties.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CodelessConnectorPollingRequestProperties.Serialization.cs index 95f487e966d2..5f053be41f36 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CodelessConnectorPollingRequestProperties.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CodelessConnectorPollingRequestProperties.Serialization.cs @@ -19,6 +19,15 @@ public partial class CodelessConnectorPollingRequestProperties : IUtf8JsonSerial void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(CodelessConnectorPollingRequestProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("apiEndpoint"u8); writer.WriteStringValue(ApiEndpoint); if (Optional.IsDefined(RateLimitQps)) @@ -104,7 +112,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } CodelessConnectorPollingRequestProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CodelessConnectorPollingResponseProperties.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CodelessConnectorPollingResponseProperties.Serialization.cs index 0209840df1ae..ab3eb920d05e 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CodelessConnectorPollingResponseProperties.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CodelessConnectorPollingResponseProperties.Serialization.cs @@ -20,6 +20,15 @@ public partial class CodelessConnectorPollingResponseProperties : IUtf8JsonSeria void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(CodelessConnectorPollingResponseProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("eventsJsonPaths"u8); writer.WriteStartArray(); foreach (var item in EventsJsonPaths) @@ -65,7 +73,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } CodelessConnectorPollingResponseProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CodelessUiConnectorConfigProperties.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CodelessUiConnectorConfigProperties.Serialization.cs index f86002971571..c2ce57fce8d3 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CodelessUiConnectorConfigProperties.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CodelessUiConnectorConfigProperties.Serialization.cs @@ -20,6 +20,15 @@ public partial class CodelessUiConnectorConfigProperties : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(CodelessUiConnectorConfigProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("title"u8); writer.WriteStringValue(Title); writer.WritePropertyName("publisher"u8); @@ -95,7 +103,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } CodelessUiConnectorConfigProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CodelessUiDataConnector.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CodelessUiDataConnector.Serialization.cs index bbd33e582d94..3e8c5e436c43 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CodelessUiDataConnector.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CodelessUiDataConnector.Serialization.cs @@ -20,6 +20,15 @@ public partial class CodelessUiDataConnector : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,34 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(CodelessUiDataConnector)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (Optional.IsDefined(ETag)) - { - writer.WritePropertyName("etag"u8); - writer.WriteStringValue(ETag.Value.ToString()); - } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(ConnectorUiConfig)) @@ -63,22 +45,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade writer.WriteObjectValue(ConnectorUiConfig, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } CodelessUiDataConnector IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorAvailability.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorAvailability.Serialization.cs index 63188b9cbe86..1cb0e58f574c 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorAvailability.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorAvailability.Serialization.cs @@ -19,6 +19,15 @@ public partial class ConnectorAvailability : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(ConnectorAvailability)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Status)) { writer.WritePropertyName("status"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } ConnectorAvailability IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorConnectivityCriteria.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorConnectivityCriteria.Serialization.cs index 5dd4c85decf0..8a965931d911 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorConnectivityCriteria.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorConnectivityCriteria.Serialization.cs @@ -20,6 +20,15 @@ public partial class ConnectorConnectivityCriteria : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(ConnectorConnectivityCriteria)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ConnectivityType)) { writer.WritePropertyName("type"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } ConnectorConnectivityCriteria IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorConnectivityCriterion.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorConnectivityCriterion.Serialization.cs index 3525b872234f..7f9f9edb0502 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorConnectivityCriterion.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorConnectivityCriterion.Serialization.cs @@ -20,6 +20,15 @@ public partial class ConnectorConnectivityCriterion : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(ConnectorConnectivityCriterion)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("type"u8); writer.WriteStringValue(ConnectivityCriterionType); if (Optional.IsCollectionDefined(Value)) @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } ConnectorConnectivityCriterion IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorCustoms.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorCustoms.Serialization.cs index 3b32d8732a98..e6b97baac379 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorCustoms.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorCustoms.Serialization.cs @@ -19,6 +19,15 @@ public partial class ConnectorCustoms : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,33 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(ConnectorCustoms)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } ConnectorCustoms IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorCustomsPermission.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorCustomsPermission.Serialization.cs index 19619624bc63..45d6c32b4d28 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorCustomsPermission.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorCustomsPermission.Serialization.cs @@ -19,6 +19,15 @@ public partial class ConnectorCustomsPermission : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(ConnectorCustomsPermission)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } ConnectorCustomsPermission IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorDataType.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorDataType.Serialization.cs index d9c20017cae6..366507ca66cd 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorDataType.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorDataType.Serialization.cs @@ -19,6 +19,15 @@ public partial class ConnectorDataType : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(ConnectorDataType)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); writer.WritePropertyName("lastDataReceivedQuery"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } ConnectorDataType IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorDefinitionsAvailability.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorDefinitionsAvailability.Serialization.cs index abd7d65a59f7..e5cb7c513ea4 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorDefinitionsAvailability.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorDefinitionsAvailability.Serialization.cs @@ -19,6 +19,15 @@ public partial class ConnectorDefinitionsAvailability : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(ConnectorDefinitionsAvailability)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Status)) { writer.WritePropertyName("status"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } ConnectorDefinitionsAvailability IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorDefinitionsPermissions.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorDefinitionsPermissions.Serialization.cs index 64a260ec30fc..01c1581d2363 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorDefinitionsPermissions.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorDefinitionsPermissions.Serialization.cs @@ -20,6 +20,15 @@ public partial class ConnectorDefinitionsPermissions : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(ConnectorDefinitionsPermissions)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Tenant)) { writer.WritePropertyName("tenant"u8); @@ -83,7 +91,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } ConnectorDefinitionsPermissions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorDefinitionsResourceProvider.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorDefinitionsResourceProvider.Serialization.cs index 1764f2577dfb..e98925f80954 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorDefinitionsResourceProvider.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorDefinitionsResourceProvider.Serialization.cs @@ -19,6 +19,15 @@ public partial class ConnectorDefinitionsResourceProvider : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(ConnectorDefinitionsResourceProvider)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("provider"u8); writer.WriteStringValue(Provider); writer.WritePropertyName("permissionsDisplayText"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } ConnectorDefinitionsResourceProvider IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorGraphQueries.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorGraphQueries.Serialization.cs index 3821ed4b1029..2448f84a8ace 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorGraphQueries.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorGraphQueries.Serialization.cs @@ -19,6 +19,15 @@ public partial class ConnectorGraphQueries : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(ConnectorGraphQueries)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(MetricName)) { writer.WritePropertyName("metricName"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } ConnectorGraphQueries IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorGraphQuery.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorGraphQuery.Serialization.cs index dcc52634c192..29423044d666 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorGraphQuery.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorGraphQuery.Serialization.cs @@ -19,6 +19,15 @@ public partial class ConnectorGraphQuery : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ConnectorGraphQuery)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("metricName"u8); writer.WriteStringValue(MetricName); writer.WritePropertyName("legend"u8); @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } ConnectorGraphQuery IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorInstructionModelBase.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorInstructionModelBase.Serialization.cs index effa601bcd03..6b8904661bd7 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorInstructionModelBase.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorInstructionModelBase.Serialization.cs @@ -19,6 +19,15 @@ public partial class ConnectorInstructionModelBase : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(ConnectorInstructionModelBase)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Parameters)) { writer.WritePropertyName("parameters"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } ConnectorInstructionModelBase IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorPermissions.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorPermissions.Serialization.cs index a69cc95929f6..9fc1a6c66250 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorPermissions.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorPermissions.Serialization.cs @@ -20,6 +20,15 @@ public partial class ConnectorPermissions : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(ConnectorPermissions)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(ResourceProvider)) { writer.WritePropertyName("resourceProvider"u8); @@ -63,7 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } ConnectorPermissions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorRequiredPermissions.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorRequiredPermissions.Serialization.cs index d4386bf8e1f8..e535ebb66a92 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorRequiredPermissions.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorRequiredPermissions.Serialization.cs @@ -19,6 +19,15 @@ public partial class ConnectorRequiredPermissions : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(ConnectorRequiredPermissions)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IsCustomAction)) { writer.WritePropertyName("action"u8); @@ -62,7 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } ConnectorRequiredPermissions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorResourceProvider.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorResourceProvider.Serialization.cs index 47d3c9bc3ee3..e1d917b9a1a9 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorResourceProvider.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorResourceProvider.Serialization.cs @@ -19,6 +19,15 @@ public partial class ConnectorResourceProvider : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(ConnectorResourceProvider)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Provider)) { writer.WritePropertyName("provider"u8); @@ -67,7 +75,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } ConnectorResourceProvider IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorResourceProviderRequiredPermissions.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorResourceProviderRequiredPermissions.Serialization.cs index f3083e816fc4..79a4259f377a 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorResourceProviderRequiredPermissions.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorResourceProviderRequiredPermissions.Serialization.cs @@ -19,6 +19,15 @@ public partial class ConnectorResourceProviderRequiredPermissions : IUtf8JsonSer void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWrit throw new FormatException($"The model {nameof(ConnectorResourceProviderRequiredPermissions)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IsReadAction)) { writer.WritePropertyName("read"u8); @@ -62,7 +70,6 @@ void IJsonModel.Write(Utf8JsonWrit #endif } } - writer.WriteEndObject(); } ConnectorResourceProviderRequiredPermissions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CustomPermissionDetails.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CustomPermissionDetails.Serialization.cs index d92d14c4c927..af15a757bc82 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CustomPermissionDetails.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CustomPermissionDetails.Serialization.cs @@ -19,6 +19,15 @@ public partial class CustomPermissionDetails : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(CustomPermissionDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); writer.WritePropertyName("description"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } CustomPermissionDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CustomizableConnectionsConfig.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CustomizableConnectionsConfig.Serialization.cs index fde1994ded8f..999aacd74502 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CustomizableConnectionsConfig.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CustomizableConnectionsConfig.Serialization.cs @@ -19,6 +19,15 @@ public partial class CustomizableConnectionsConfig : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(CustomizableConnectionsConfig)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("templateSpecName"u8); writer.WriteStringValue(TemplateSpecName); writer.WritePropertyName("templateSpecVersion"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } CustomizableConnectionsConfig IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CustomizableConnectorDefinitionData.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CustomizableConnectorDefinitionData.Serialization.cs index 51a8fe7acb82..868fc4720d42 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CustomizableConnectorDefinitionData.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CustomizableConnectorDefinitionData.Serialization.cs @@ -20,6 +20,15 @@ public partial class CustomizableConnectorDefinitionData : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,34 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(CustomizableConnectorDefinitionData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (Optional.IsDefined(ETag)) - { - writer.WritePropertyName("etag"u8); - writer.WriteStringValue(ETag.Value.ToString()); - } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(CreatedOn)) @@ -78,22 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer writer.WriteObjectValue(ConnectionsConfig, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } CustomizableConnectorDefinitionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CustomizableConnectorUiConfig.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CustomizableConnectorUiConfig.Serialization.cs index 7571f5698a76..147433923f7e 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CustomizableConnectorUiConfig.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CustomizableConnectorUiConfig.Serialization.cs @@ -20,6 +20,15 @@ public partial class CustomizableConnectorUiConfig : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(CustomizableConnectorUiConfig)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -99,7 +107,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } CustomizableConnectorUiConfig IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/DataConnectorConnectContent.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/DataConnectorConnectContent.Serialization.cs index fcb564b2c410..fa71547f1321 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/DataConnectorConnectContent.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/DataConnectorConnectContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class DataConnectorConnectContent : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(DataConnectorConnectContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Kind)) { writer.WritePropertyName("kind"u8); @@ -113,7 +121,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } DataConnectorConnectContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/DataConnectorDataTypeCommon.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/DataConnectorDataTypeCommon.Serialization.cs index 42b413b40919..d133c7297dd0 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/DataConnectorDataTypeCommon.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/DataConnectorDataTypeCommon.Serialization.cs @@ -19,6 +19,15 @@ public partial class DataConnectorDataTypeCommon : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(DataConnectorDataTypeCommon)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("state"u8); writer.WriteStringValue(State.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -44,7 +52,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } DataConnectorDataTypeCommon IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/DataConnectorDefinitionArmCollectionWrapper.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/DataConnectorDefinitionArmCollectionWrapper.Serialization.cs index 999b1fda30cd..d35b4af2ea07 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/DataConnectorDefinitionArmCollectionWrapper.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/DataConnectorDefinitionArmCollectionWrapper.Serialization.cs @@ -20,6 +20,15 @@ internal partial class DataConnectorDefinitionArmCollectionWrapper : IUtf8JsonSe void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWrite throw new FormatException($"The model {nameof(DataConnectorDefinitionArmCollectionWrapper)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWrite #endif } } - writer.WriteEndObject(); } DataConnectorDefinitionArmCollectionWrapper IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/DataConnectorList.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/DataConnectorList.Serialization.cs index 2a930f91c6e3..7a32926f028e 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/DataConnectorList.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/DataConnectorList.Serialization.cs @@ -20,6 +20,15 @@ internal partial class DataConnectorList : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(DataConnectorList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } DataConnectorList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/DataConnectorRequirementsState.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/DataConnectorRequirementsState.Serialization.cs index 88f45ef37109..a6a39ab37415 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/DataConnectorRequirementsState.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/DataConnectorRequirementsState.Serialization.cs @@ -19,6 +19,15 @@ public partial class DataConnectorRequirementsState : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(DataConnectorRequirementsState)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(AuthorizationState)) { writer.WritePropertyName("authorizationState"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } DataConnectorRequirementsState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/DataConnectorsCheckRequirements.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/DataConnectorsCheckRequirements.Serialization.cs index da3fa7a8bd96..a7b849f8ebd0 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/DataConnectorsCheckRequirements.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/DataConnectorsCheckRequirements.Serialization.cs @@ -18,6 +18,15 @@ public partial class DataConnectorsCheckRequirements : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(DataConnectorsCheckRequirements)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("kind"u8); writer.WriteStringValue(Kind.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } DataConnectorsCheckRequirements IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/DataTypeDefinitions.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/DataTypeDefinitions.Serialization.cs index c96649209a8d..4f906971ada3 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/DataTypeDefinitions.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/DataTypeDefinitions.Serialization.cs @@ -19,6 +19,15 @@ public partial class DataTypeDefinitions : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(DataTypeDefinitions)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(DataType)) { writer.WritePropertyName("dataType"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } DataTypeDefinitions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/DcrConfiguration.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/DcrConfiguration.Serialization.cs index 51f13b1ef6bc..1275172e4a2e 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/DcrConfiguration.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/DcrConfiguration.Serialization.cs @@ -19,6 +19,15 @@ public partial class DcrConfiguration : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(DcrConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("dataCollectionEndpoint"u8); writer.WriteStringValue(DataCollectionEndpoint); writer.WritePropertyName("dataCollectionRuleImmutableId"u8); @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } DcrConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/Dynamics365CheckRequirements.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/Dynamics365CheckRequirements.Serialization.cs index 8634bd1f8d88..0b32a4fc7e49 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/Dynamics365CheckRequirements.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/Dynamics365CheckRequirements.Serialization.cs @@ -18,6 +18,15 @@ public partial class Dynamics365CheckRequirements : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,9 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(Dynamics365CheckRequirements)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(TenantId)) @@ -36,22 +43,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model writer.WriteStringValue(TenantId.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } Dynamics365CheckRequirements IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/Dynamics365DataConnector.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/Dynamics365DataConnector.Serialization.cs index d6a967a17067..5a146d7c55d5 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/Dynamics365DataConnector.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/Dynamics365DataConnector.Serialization.cs @@ -20,6 +20,15 @@ public partial class Dynamics365DataConnector : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,34 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(Dynamics365DataConnector)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (Optional.IsDefined(ETag)) - { - writer.WritePropertyName("etag"u8); - writer.WriteStringValue(ETag.Value.ToString()); - } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(TenantId)) @@ -71,22 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead } writer.WriteEndObject(); writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } Dynamics365DataConnector IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/Dynamics365DataConnectorDataTypesDynamics365CdsActivities.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/Dynamics365DataConnectorDataTypesDynamics365CdsActivities.Serialization.cs index 2ca6b5142f21..c54b9c56a6d7 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/Dynamics365DataConnectorDataTypesDynamics365CdsActivities.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/Dynamics365DataConnectorDataTypesDynamics365CdsActivities.Serialization.cs @@ -19,6 +19,15 @@ internal partial class Dynamics365DataConnectorDataTypesDynamics365CdsActivities void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,25 +35,7 @@ void IJsonModel.Write throw new FormatException($"The model {nameof(Dynamics365DataConnectorDataTypesDynamics365CdsActivities)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("state"u8); - writer.WriteStringValue(State.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } Dynamics365DataConnectorDataTypesDynamics365CdsActivities IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EnrichmentDomainContent.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EnrichmentDomainContent.Serialization.cs index ed4e1abdd8f9..5cd4900693cc 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EnrichmentDomainContent.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EnrichmentDomainContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class EnrichmentDomainContent : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(EnrichmentDomainContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Domain)) { writer.WritePropertyName("domain"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } EnrichmentDomainContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EnrichmentDomainWhois.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EnrichmentDomainWhois.Serialization.cs index 5a31afffdb2d..fc470cebbd0f 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EnrichmentDomainWhois.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EnrichmentDomainWhois.Serialization.cs @@ -19,6 +19,15 @@ public partial class EnrichmentDomainWhois : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(EnrichmentDomainWhois)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Domain)) { writer.WritePropertyName("domain"u8); @@ -72,7 +80,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } EnrichmentDomainWhois IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EnrichmentDomainWhoisContact.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EnrichmentDomainWhoisContact.Serialization.cs index 87ee88dc47fc..472988f4d515 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EnrichmentDomainWhoisContact.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EnrichmentDomainWhoisContact.Serialization.cs @@ -20,6 +20,15 @@ public partial class EnrichmentDomainWhoisContact : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(EnrichmentDomainWhoisContact)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -98,7 +106,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } EnrichmentDomainWhoisContact IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EnrichmentDomainWhoisContacts.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EnrichmentDomainWhoisContacts.Serialization.cs index 17404f4c0e9a..b8c5749b7d9f 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EnrichmentDomainWhoisContacts.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EnrichmentDomainWhoisContacts.Serialization.cs @@ -19,6 +19,15 @@ public partial class EnrichmentDomainWhoisContacts : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(EnrichmentDomainWhoisContacts)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Admin)) { writer.WritePropertyName("admin"u8); @@ -62,7 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } EnrichmentDomainWhoisContacts IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EnrichmentDomainWhoisDetails.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EnrichmentDomainWhoisDetails.Serialization.cs index 7f0cfc25d8c0..a0db5b392b4f 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EnrichmentDomainWhoisDetails.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EnrichmentDomainWhoisDetails.Serialization.cs @@ -20,6 +20,15 @@ public partial class EnrichmentDomainWhoisDetails : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(EnrichmentDomainWhoisDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Registrar)) { writer.WritePropertyName("registrar"u8); @@ -73,7 +81,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } EnrichmentDomainWhoisDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EnrichmentDomainWhoisRegistrarDetails.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EnrichmentDomainWhoisRegistrarDetails.Serialization.cs index 2c92bda47d90..828a515047d1 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EnrichmentDomainWhoisRegistrarDetails.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EnrichmentDomainWhoisRegistrarDetails.Serialization.cs @@ -19,6 +19,15 @@ public partial class EnrichmentDomainWhoisRegistrarDetails : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(EnrichmentDomainWhoisRegistrarDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -72,7 +80,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } EnrichmentDomainWhoisRegistrarDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EnrichmentIPAddressContent.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EnrichmentIPAddressContent.Serialization.cs index ba9d4bce0e89..976bfc55ac49 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EnrichmentIPAddressContent.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EnrichmentIPAddressContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class EnrichmentIPAddressContent : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(EnrichmentIPAddressContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IPAddress)) { writer.WritePropertyName("ipAddress"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } EnrichmentIPAddressContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EnrichmentIPGeodata.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EnrichmentIPGeodata.Serialization.cs index 6864344eaa37..84bdf8fcd329 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EnrichmentIPGeodata.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EnrichmentIPGeodata.Serialization.cs @@ -19,6 +19,15 @@ public partial class EnrichmentIPGeodata : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(EnrichmentIPGeodata)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Asn)) { writer.WritePropertyName("asn"u8); @@ -127,7 +135,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } EnrichmentIPGeodata IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityAnalytics.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityAnalytics.Serialization.cs index 80c3cc2af181..f955de1b5a54 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityAnalytics.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityAnalytics.Serialization.cs @@ -21,6 +21,15 @@ public partial class EntityAnalytics : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,34 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(EntityAnalytics)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (Optional.IsDefined(ETag)) - { - writer.WritePropertyName("etag"u8); - writer.WriteStringValue(ETag.Value.ToString()); - } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsCollectionDefined(EntityProviders)) @@ -69,22 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } EntityAnalytics IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityEdges.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityEdges.Serialization.cs index af8272ebd690..98a76300f47b 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityEdges.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityEdges.Serialization.cs @@ -20,6 +20,15 @@ public partial class EntityEdges : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio throw new FormatException($"The model {nameof(EntityEdges)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(TargetEntityId)) { writer.WritePropertyName("targetEntityId"u8); @@ -71,7 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio #endif } } - writer.WriteEndObject(); } EntityEdges IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityExpandContent.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityExpandContent.Serialization.cs index 5396c340b2e5..64e6090de336 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityExpandContent.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityExpandContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class EntityExpandContent : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(EntityExpandContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(EndOn)) { writer.WritePropertyName("endTime"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } EntityExpandContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityExpandResponseValue.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityExpandResponseValue.Serialization.cs index a3ee42767941..890427c1279b 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityExpandResponseValue.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityExpandResponseValue.Serialization.cs @@ -20,6 +20,15 @@ public partial class EntityExpandResponseValue : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(EntityExpandResponseValue)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Entities)) { writer.WritePropertyName("entities"u8); @@ -63,7 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } EntityExpandResponseValue IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityExpandResult.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityExpandResult.Serialization.cs index 9c45ae70f1f3..f0d13914fa4e 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityExpandResult.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityExpandResult.Serialization.cs @@ -19,6 +19,15 @@ public partial class EntityExpandResult : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(EntityExpandResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(MetaData)) { writer.WritePropertyName("metaData"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } EntityExpandResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityFieldMapping.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityFieldMapping.Serialization.cs index d2f8ea1ae8e5..f8f3b17fc7da 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityFieldMapping.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityFieldMapping.Serialization.cs @@ -19,6 +19,15 @@ public partial class EntityFieldMapping : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(EntityFieldMapping)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Identifier)) { writer.WritePropertyName("identifier"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } EntityFieldMapping IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityGetInsightsContent.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityGetInsightsContent.Serialization.cs index b8421e048234..7e4bc757d9b9 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityGetInsightsContent.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityGetInsightsContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class EntityGetInsightsContent : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(EntityGetInsightsContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("startTime"u8); writer.WriteStringValue(StartOn, "O"); writer.WritePropertyName("endTime"u8); @@ -60,7 +68,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } EntityGetInsightsContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityGetInsightsResponse.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityGetInsightsResponse.Serialization.cs index 95f51c9e995d..a47d43cb1353 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityGetInsightsResponse.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityGetInsightsResponse.Serialization.cs @@ -20,6 +20,15 @@ internal partial class EntityGetInsightsResponse : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(EntityGetInsightsResponse)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(MetaData)) { writer.WritePropertyName("metaData"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } EntityGetInsightsResponse IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityInsightItem.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityInsightItem.Serialization.cs index 98172a0721e9..b8a12187ba29 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityInsightItem.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityInsightItem.Serialization.cs @@ -20,6 +20,15 @@ public partial class EntityInsightItem : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(EntityInsightItem)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(QueryId)) { writer.WritePropertyName("queryId"u8); @@ -68,7 +76,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } EntityInsightItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityInsightItemQueryTimeInterval.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityInsightItemQueryTimeInterval.Serialization.cs index 58ac7b3af52b..7450ff37e599 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityInsightItemQueryTimeInterval.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityInsightItemQueryTimeInterval.Serialization.cs @@ -19,6 +19,15 @@ public partial class EntityInsightItemQueryTimeInterval : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(EntityInsightItemQueryTimeInterval)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(StartOn)) { writer.WritePropertyName("startTime"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } EntityInsightItemQueryTimeInterval IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityList.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityList.Serialization.cs index 5df5fcfa4c35..e3d366f4bc16 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityList.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityList.Serialization.cs @@ -20,6 +20,15 @@ internal partial class EntityList : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOption throw new FormatException($"The model {nameof(EntityList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOption #endif } } - writer.WriteEndObject(); } EntityList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityManualTriggerRequestContent.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityManualTriggerRequestContent.Serialization.cs index b8b33115ecc8..2f1114078cbb 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityManualTriggerRequestContent.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityManualTriggerRequestContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class EntityManualTriggerRequestContent : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(EntityManualTriggerRequestContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IncidentArmId)) { writer.WritePropertyName("incidentArmId"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } EntityManualTriggerRequestContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityQueryItem.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityQueryItem.Serialization.cs index 1c81d999c847..0ea9107c4988 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityQueryItem.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityQueryItem.Serialization.cs @@ -20,6 +20,15 @@ public partial class EntityQueryItem : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,45 +36,9 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(EntityQueryItem)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("kind"u8); writer.WriteStringValue(Kind.ToString()); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } EntityQueryItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityQueryItemProperties.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityQueryItemProperties.Serialization.cs index e42ae983f900..53c3ff150414 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityQueryItemProperties.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityQueryItemProperties.Serialization.cs @@ -20,6 +20,15 @@ public partial class EntityQueryItemProperties : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(EntityQueryItemProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(DataTypes)) { writer.WritePropertyName("dataTypes"u8); @@ -90,7 +98,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } EntityQueryItemProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityQueryItemPropertiesDataTypesItem.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityQueryItemPropertiesDataTypesItem.Serialization.cs index 3f7282950ea7..13d90e46826f 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityQueryItemPropertiesDataTypesItem.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityQueryItemPropertiesDataTypesItem.Serialization.cs @@ -19,6 +19,15 @@ public partial class EntityQueryItemPropertiesDataTypesItem : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(EntityQueryItemPropertiesDataTypesItem)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(DataType)) { writer.WritePropertyName("dataType"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } EntityQueryItemPropertiesDataTypesItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityQueryList.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityQueryList.Serialization.cs index c76a3dedb0ac..1dccce0bf64e 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityQueryList.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityQueryList.Serialization.cs @@ -20,6 +20,15 @@ internal partial class EntityQueryList : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(EntityQueryList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO #endif } } - writer.WriteEndObject(); } EntityQueryList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityQueryTemplateList.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityQueryTemplateList.Serialization.cs index 239ba6df16a4..0c37aa9613c4 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityQueryTemplateList.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityQueryTemplateList.Serialization.cs @@ -20,6 +20,15 @@ internal partial class EntityQueryTemplateList : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(EntityQueryTemplateList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } EntityQueryTemplateList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityTimelineContent.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityTimelineContent.Serialization.cs index 10d9a53fbd1b..59a7a1f0834e 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityTimelineContent.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityTimelineContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class EntityTimelineContent : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(EntityTimelineContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Kinds)) { writer.WritePropertyName("kinds"u8); @@ -60,7 +68,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } EntityTimelineContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityTimelineItem.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityTimelineItem.Serialization.cs index 70ee51901693..c28fd4f97bb4 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityTimelineItem.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityTimelineItem.Serialization.cs @@ -20,6 +20,15 @@ public partial class EntityTimelineItem : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(EntityTimelineItem)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("kind"u8); writer.WriteStringValue(Kind.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -45,7 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } EntityTimelineItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityTimelineResponse.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityTimelineResponse.Serialization.cs index 52294a7a654b..3b6c68d98961 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityTimelineResponse.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityTimelineResponse.Serialization.cs @@ -20,6 +20,15 @@ internal partial class EntityTimelineResponse : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(EntityTimelineResponse)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(MetaData)) { writer.WritePropertyName("metaData"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } EntityTimelineResponse IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EventGroupingSettings.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EventGroupingSettings.Serialization.cs index f5a51a83dd7d..da83fec5fc61 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EventGroupingSettings.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EventGroupingSettings.Serialization.cs @@ -19,6 +19,15 @@ internal partial class EventGroupingSettings : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(EventGroupingSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(AggregationKind)) { writer.WritePropertyName("aggregationKind"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } EventGroupingSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ExpansionEntityQuery.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ExpansionEntityQuery.Serialization.cs index 82211181e115..99abf2fe155b 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ExpansionEntityQuery.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ExpansionEntityQuery.Serialization.cs @@ -21,6 +21,15 @@ public partial class ExpansionEntityQuery : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,34 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(ExpansionEntityQuery)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (Optional.IsDefined(ETag)) - { - writer.WritePropertyName("etag"u8); - writer.WriteStringValue(ETag.Value.ToString()); - } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsCollectionDefined(DataSources)) @@ -104,22 +86,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr writer.WriteStringValue(QueryTemplate); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ExpansionEntityQuery IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ExpansionResultAggregation.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ExpansionResultAggregation.Serialization.cs index 6d4531f93c45..fd43a682892f 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ExpansionResultAggregation.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ExpansionResultAggregation.Serialization.cs @@ -19,6 +19,15 @@ public partial class ExpansionResultAggregation : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(ExpansionResultAggregation)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(AggregationType)) { writer.WritePropertyName("aggregationType"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } ExpansionResultAggregation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ExpansionResultsMetadata.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ExpansionResultsMetadata.Serialization.cs index e5365625902a..ac241214798b 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ExpansionResultsMetadata.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ExpansionResultsMetadata.Serialization.cs @@ -20,6 +20,15 @@ internal partial class ExpansionResultsMetadata : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(ExpansionResultsMetadata)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Aggregations)) { writer.WritePropertyName("aggregations"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } ExpansionResultsMetadata IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/FileImportList.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/FileImportList.Serialization.cs index 5847abf7932f..929f140c79ee 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/FileImportList.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/FileImportList.Serialization.cs @@ -20,6 +20,15 @@ internal partial class FileImportList : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(FileImportList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp #endif } } - writer.WriteEndObject(); } FileImportList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/FusionScenarioExclusionPattern.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/FusionScenarioExclusionPattern.Serialization.cs index 8a0c9e59574a..7a3ebdc61c3b 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/FusionScenarioExclusionPattern.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/FusionScenarioExclusionPattern.Serialization.cs @@ -19,6 +19,15 @@ public partial class FusionScenarioExclusionPattern : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(FusionScenarioExclusionPattern)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("exclusionPattern"u8); writer.WriteStringValue(ExclusionPattern); writer.WritePropertyName("dateAddedInUTC"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } FusionScenarioExclusionPattern IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/FusionSourceSettings.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/FusionSourceSettings.Serialization.cs index 29cfc3077a2f..c0dcead1e5e2 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/FusionSourceSettings.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/FusionSourceSettings.Serialization.cs @@ -20,6 +20,15 @@ public partial class FusionSourceSettings : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(FusionSourceSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("enabled"u8); writer.WriteBooleanValue(IsEnabled); writer.WritePropertyName("sourceName"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } FusionSourceSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/FusionSourceSubTypeSetting.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/FusionSourceSubTypeSetting.Serialization.cs index d70d7a46a87d..221e518920e3 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/FusionSourceSubTypeSetting.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/FusionSourceSubTypeSetting.Serialization.cs @@ -19,6 +19,15 @@ public partial class FusionSourceSubTypeSetting : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(FusionSourceSubTypeSetting)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("enabled"u8); writer.WriteBooleanValue(IsEnabled); writer.WritePropertyName("sourceSubTypeName"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } FusionSourceSubTypeSetting IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/FusionSubTypeSeverityFilter.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/FusionSubTypeSeverityFilter.Serialization.cs index efa20f21bb98..a34b96a901bc 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/FusionSubTypeSeverityFilter.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/FusionSubTypeSeverityFilter.Serialization.cs @@ -20,6 +20,15 @@ public partial class FusionSubTypeSeverityFilter : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(FusionSubTypeSeverityFilter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(IsSupported)) { writer.WritePropertyName("isSupported"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } FusionSubTypeSeverityFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/FusionSubTypeSeverityFiltersItem.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/FusionSubTypeSeverityFiltersItem.Serialization.cs index fb970b3fa8a2..b058ad09ba1c 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/FusionSubTypeSeverityFiltersItem.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/FusionSubTypeSeverityFiltersItem.Serialization.cs @@ -19,6 +19,15 @@ public partial class FusionSubTypeSeverityFiltersItem : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(FusionSubTypeSeverityFiltersItem)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("severity"u8); writer.WriteStringValue(Severity.ToString()); writer.WritePropertyName("enabled"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } FusionSubTypeSeverityFiltersItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/FusionTemplateSourceSetting.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/FusionTemplateSourceSetting.Serialization.cs index 5566d0370417..5bfc7552747d 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/FusionTemplateSourceSetting.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/FusionTemplateSourceSetting.Serialization.cs @@ -20,6 +20,15 @@ public partial class FusionTemplateSourceSetting : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(FusionTemplateSourceSetting)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("sourceName"u8); writer.WriteStringValue(SourceName); if (Optional.IsCollectionDefined(SourceSubTypes)) @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } FusionTemplateSourceSetting IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/FusionTemplateSourceSubType.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/FusionTemplateSourceSubType.Serialization.cs index 8dc44d580a79..f2cf8270b999 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/FusionTemplateSourceSubType.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/FusionTemplateSourceSubType.Serialization.cs @@ -19,6 +19,15 @@ public partial class FusionTemplateSourceSubType : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(FusionTemplateSourceSubType)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("sourceSubTypeName"u8); writer.WriteStringValue(SourceSubTypeName); if (options.Format != "W" && Optional.IsDefined(SourceSubTypeDisplayName)) @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } FusionTemplateSourceSubType IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/FusionTemplateSubTypeSeverityFilter.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/FusionTemplateSubTypeSeverityFilter.Serialization.cs index db7d9af6c3ba..65446454aa1b 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/FusionTemplateSubTypeSeverityFilter.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/FusionTemplateSubTypeSeverityFilter.Serialization.cs @@ -20,6 +20,15 @@ public partial class FusionTemplateSubTypeSeverityFilter : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(FusionTemplateSubTypeSeverityFilter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("isSupported"u8); writer.WriteBooleanValue(IsSupported); if (Optional.IsCollectionDefined(SeverityFilters)) @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } FusionTemplateSubTypeSeverityFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/GcpAuthModel.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/GcpAuthModel.Serialization.cs index b8171511106b..7e0a09e95ea2 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/GcpAuthModel.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/GcpAuthModel.Serialization.cs @@ -19,6 +19,15 @@ public partial class GcpAuthModel : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,31 +35,13 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(GcpAuthModel)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("serviceAccountEmail"u8); writer.WriteStringValue(ServiceAccountEmail); writer.WritePropertyName("projectNumber"u8); writer.WriteStringValue(ProjectNumber); writer.WritePropertyName("workloadIdentityProviderId"u8); writer.WriteStringValue(WorkloadIdentityProviderId); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(AuthType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } GcpAuthModel IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/GcpAuthProperties.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/GcpAuthProperties.Serialization.cs index 374e5f82fdba..049507dcc436 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/GcpAuthProperties.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/GcpAuthProperties.Serialization.cs @@ -19,6 +19,15 @@ public partial class GcpAuthProperties : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(GcpAuthProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("serviceAccountEmail"u8); writer.WriteStringValue(ServiceAccountEmail); writer.WritePropertyName("projectNumber"u8); @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } GcpAuthProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/GcpDataConnector.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/GcpDataConnector.Serialization.cs index 8e7f459e1d96..05ea6b8ed75f 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/GcpDataConnector.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/GcpDataConnector.Serialization.cs @@ -20,6 +20,15 @@ public partial class GcpDataConnector : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,34 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(GcpDataConnector)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (Optional.IsDefined(ETag)) - { - writer.WritePropertyName("etag"u8); - writer.WriteStringValue(ETag.Value.ToString()); - } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(ConnectorDefinitionName)) @@ -78,22 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter writer.WriteObjectValue(DcrConfig, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } GcpDataConnector IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/GcpRequestProperties.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/GcpRequestProperties.Serialization.cs index 4ddb423d863a..9de2a55e3b26 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/GcpRequestProperties.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/GcpRequestProperties.Serialization.cs @@ -20,6 +20,15 @@ public partial class GcpRequestProperties : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(GcpRequestProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("projectId"u8); writer.WriteStringValue(ProjectId); writer.WritePropertyName("subscriptionNames"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } GcpRequestProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/GenericBlobSbsAuthModel.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/GenericBlobSbsAuthModel.Serialization.cs index 8020c708c45c..deb641531789 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/GenericBlobSbsAuthModel.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/GenericBlobSbsAuthModel.Serialization.cs @@ -20,6 +20,15 @@ public partial class GenericBlobSbsAuthModel : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(GenericBlobSbsAuthModel)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(CredentialsConfig)) { writer.WritePropertyName("credentialsConfig"u8); @@ -50,24 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade } writer.WriteEndObject(); } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(AuthType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } GenericBlobSbsAuthModel IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/GetInsightsErrorKind.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/GetInsightsErrorKind.Serialization.cs index a2f450ca489e..ac1debbb5697 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/GetInsightsErrorKind.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/GetInsightsErrorKind.Serialization.cs @@ -19,6 +19,15 @@ internal partial class GetInsightsErrorKind : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(GetInsightsErrorKind)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("kind"u8); writer.WriteStringValue(Kind.ToString()); if (Optional.IsDefined(QueryId)) @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } GetInsightsErrorKind IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/GetInsightsResultsMetadata.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/GetInsightsResultsMetadata.Serialization.cs index 27da0c998ecc..90623952c631 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/GetInsightsResultsMetadata.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/GetInsightsResultsMetadata.Serialization.cs @@ -20,6 +20,15 @@ internal partial class GetInsightsResultsMetadata : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(GetInsightsResultsMetadata)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("totalCount"u8); writer.WriteNumberValue(TotalCount); if (Optional.IsCollectionDefined(Errors)) @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } GetInsightsResultsMetadata IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/GetQueriesResponse.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/GetQueriesResponse.Serialization.cs index 743d46e0211d..e7988d3cacf3 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/GetQueriesResponse.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/GetQueriesResponse.Serialization.cs @@ -20,6 +20,15 @@ internal partial class GetQueriesResponse : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(GetQueriesResponse)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } GetQueriesResponse IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/GitHubAuthModel.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/GitHubAuthModel.Serialization.cs index 32f431f89bf3..3f6017ba6070 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/GitHubAuthModel.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/GitHubAuthModel.Serialization.cs @@ -19,6 +19,15 @@ public partial class GitHubAuthModel : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,30 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(GitHubAuthModel)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(InstallationId)) { writer.WritePropertyName("installationId"u8); writer.WriteStringValue(InstallationId); } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(AuthType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } GitHubAuthModel IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/GitHubResourceInfo.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/GitHubResourceInfo.Serialization.cs index d3073e4d07b2..8c6c58321848 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/GitHubResourceInfo.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/GitHubResourceInfo.Serialization.cs @@ -19,6 +19,15 @@ internal partial class GitHubResourceInfo : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(GitHubResourceInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(AppInstallationId)) { writer.WritePropertyName("appInstallationId"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } GitHubResourceInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/HuntCommentList.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/HuntCommentList.Serialization.cs index fb7cda0fcd08..c13078aa34ce 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/HuntCommentList.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/HuntCommentList.Serialization.cs @@ -20,6 +20,15 @@ internal partial class HuntCommentList : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(HuntCommentList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO #endif } } - writer.WriteEndObject(); } HuntCommentList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/HuntRelationList.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/HuntRelationList.Serialization.cs index 25bdbba0ae60..e761d3b74984 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/HuntRelationList.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/HuntRelationList.Serialization.cs @@ -20,6 +20,15 @@ internal partial class HuntRelationList : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(HuntRelationList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } HuntRelationList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/IncidentAlertList.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/IncidentAlertList.Serialization.cs index 161eb908e6d4..b7fb4c9eb837 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/IncidentAlertList.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/IncidentAlertList.Serialization.cs @@ -20,6 +20,15 @@ internal partial class IncidentAlertList : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(IncidentAlertList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -50,7 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } IncidentAlertList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/IncidentBookmarkList.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/IncidentBookmarkList.Serialization.cs index 83694e16c394..7b9bb30d04a8 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/IncidentBookmarkList.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/IncidentBookmarkList.Serialization.cs @@ -20,6 +20,15 @@ internal partial class IncidentBookmarkList : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(IncidentBookmarkList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -50,7 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } IncidentBookmarkList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/IncidentCommentList.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/IncidentCommentList.Serialization.cs index d9a86aed7068..62eeb0e4842c 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/IncidentCommentList.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/IncidentCommentList.Serialization.cs @@ -20,6 +20,15 @@ internal partial class IncidentCommentList : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(IncidentCommentList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } IncidentCommentList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/IncidentList.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/IncidentList.Serialization.cs index fbfd92d0ef8b..5f79dc3e9044 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/IncidentList.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/IncidentList.Serialization.cs @@ -20,6 +20,15 @@ internal partial class IncidentList : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(IncidentList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti #endif } } - writer.WriteEndObject(); } IncidentList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/IncidentTaskList.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/IncidentTaskList.Serialization.cs index f264a62466d9..077ee36515de 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/IncidentTaskList.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/IncidentTaskList.Serialization.cs @@ -20,6 +20,15 @@ internal partial class IncidentTaskList : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(IncidentTaskList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } IncidentTaskList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/IndicatorObservablesItem.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/IndicatorObservablesItem.Serialization.cs index b2156781e1e2..157459cd7480 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/IndicatorObservablesItem.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/IndicatorObservablesItem.Serialization.cs @@ -19,6 +19,15 @@ public partial class IndicatorObservablesItem : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(IndicatorObservablesItem)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IndicatorObservablesItemType)) { writer.WritePropertyName("type"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } IndicatorObservablesItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InsightQueryItem.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InsightQueryItem.Serialization.cs index ff18fcf38a8a..777d00e9a804 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InsightQueryItem.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InsightQueryItem.Serialization.cs @@ -20,6 +20,15 @@ public partial class InsightQueryItem : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,50 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(InsightQueryItem)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); writer.WriteObjectValue(Properties, options); } - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } InsightQueryItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InsightQueryItemProperties.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InsightQueryItemProperties.Serialization.cs index 37eda29f8d77..f538a9eca4d1 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InsightQueryItemProperties.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InsightQueryItemProperties.Serialization.cs @@ -20,6 +20,15 @@ public partial class InsightQueryItemProperties : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(InsightQueryItemProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(DisplayName)) { writer.WritePropertyName("displayName"u8); @@ -75,69 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe writer.WritePropertyName("referenceTimeRange"u8); writer.WriteObjectValue(ReferenceTimeRange, options); } - if (Optional.IsCollectionDefined(DataTypes)) - { - writer.WritePropertyName("dataTypes"u8); - writer.WriteStartArray(); - foreach (var item in DataTypes) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(InputEntityType)) - { - writer.WritePropertyName("inputEntityType"u8); - writer.WriteStringValue(InputEntityType.Value.ToString()); - } - if (Optional.IsCollectionDefined(RequiredInputFieldsSets)) - { - writer.WritePropertyName("requiredInputFieldsSets"u8); - writer.WriteStartArray(); - foreach (var item in RequiredInputFieldsSets) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } - writer.WriteStartArray(); - foreach (var item0 in item) - { - writer.WriteStringValue(item0); - } - writer.WriteEndArray(); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(EntitiesFilter)) - { - writer.WritePropertyName("entitiesFilter"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(EntitiesFilter); -#else - using (JsonDocument document = JsonDocument.Parse(EntitiesFilter)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } InsightQueryItemProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InsightQueryItemPropertiesAdditionalQuery.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InsightQueryItemPropertiesAdditionalQuery.Serialization.cs index 1f2256ca4c50..71e2185ce676 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InsightQueryItemPropertiesAdditionalQuery.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InsightQueryItemPropertiesAdditionalQuery.Serialization.cs @@ -19,6 +19,15 @@ public partial class InsightQueryItemPropertiesAdditionalQuery : IUtf8JsonSerial void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(InsightQueryItemPropertiesAdditionalQuery)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Query)) { writer.WritePropertyName("query"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } InsightQueryItemPropertiesAdditionalQuery IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InsightQueryItemPropertiesDefaultTimeRange.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InsightQueryItemPropertiesDefaultTimeRange.Serialization.cs index c1ac62eb5b7d..c69e53dd1b91 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InsightQueryItemPropertiesDefaultTimeRange.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InsightQueryItemPropertiesDefaultTimeRange.Serialization.cs @@ -19,6 +19,15 @@ public partial class InsightQueryItemPropertiesDefaultTimeRange : IUtf8JsonSeria void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(InsightQueryItemPropertiesDefaultTimeRange)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(BeforeRange)) { writer.WritePropertyName("beforeRange"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } InsightQueryItemPropertiesDefaultTimeRange IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InsightQueryItemPropertiesReferenceTimeRange.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InsightQueryItemPropertiesReferenceTimeRange.Serialization.cs index 16e967ee03b9..71cbd6cddfbe 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InsightQueryItemPropertiesReferenceTimeRange.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InsightQueryItemPropertiesReferenceTimeRange.Serialization.cs @@ -19,6 +19,15 @@ internal partial class InsightQueryItemPropertiesReferenceTimeRange : IUtf8JsonS void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWrit throw new FormatException($"The model {nameof(InsightQueryItemPropertiesReferenceTimeRange)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(BeforeRange)) { writer.WritePropertyName("beforeRange"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWrit #endif } } - writer.WriteEndObject(); } InsightQueryItemPropertiesReferenceTimeRange IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InsightQueryItemPropertiesTableQuery.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InsightQueryItemPropertiesTableQuery.Serialization.cs index 83b6742c4532..d5b0280abd2d 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InsightQueryItemPropertiesTableQuery.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InsightQueryItemPropertiesTableQuery.Serialization.cs @@ -20,6 +20,15 @@ public partial class InsightQueryItemPropertiesTableQuery : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(InsightQueryItemPropertiesTableQuery)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(ColumnsDefinitions)) { writer.WritePropertyName("columnsDefinitions"u8); @@ -63,7 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } InsightQueryItemPropertiesTableQuery IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InsightQueryItemPropertiesTableQueryColumnsDefinitionsItem.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InsightQueryItemPropertiesTableQueryColumnsDefinitionsItem.Serialization.cs index a91b3cefee43..471188560719 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InsightQueryItemPropertiesTableQueryColumnsDefinitionsItem.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InsightQueryItemPropertiesTableQueryColumnsDefinitionsItem.Serialization.cs @@ -19,6 +19,15 @@ public partial class InsightQueryItemPropertiesTableQueryColumnsDefinitionsItem void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Writ throw new FormatException($"The model {nameof(InsightQueryItemPropertiesTableQueryColumnsDefinitionsItem)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Header)) { writer.WritePropertyName("header"u8); @@ -57,7 +65,6 @@ void IJsonModel.Writ #endif } } - writer.WriteEndObject(); } InsightQueryItemPropertiesTableQueryColumnsDefinitionsItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InsightQueryItemPropertiesTableQueryQueriesDefinitionsItem.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InsightQueryItemPropertiesTableQueryQueriesDefinitionsItem.Serialization.cs index cc67d092d880..85d7ac34f3f6 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InsightQueryItemPropertiesTableQueryQueriesDefinitionsItem.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InsightQueryItemPropertiesTableQueryQueriesDefinitionsItem.Serialization.cs @@ -20,6 +20,15 @@ public partial class InsightQueryItemPropertiesTableQueryQueriesDefinitionsItem void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Writ throw new FormatException($"The model {nameof(InsightQueryItemPropertiesTableQueryQueriesDefinitionsItem)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Filter)) { writer.WritePropertyName("filter"u8); @@ -68,7 +76,6 @@ void IJsonModel.Writ #endif } } - writer.WriteEndObject(); } InsightQueryItemPropertiesTableQueryQueriesDefinitionsItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InsightQueryItemPropertiesTableQueryQueriesDefinitionsPropertiesItemsItem.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InsightQueryItemPropertiesTableQueryQueriesDefinitionsPropertiesItemsItem.Serialization.cs index 2cdacd80d758..5458a710bb7e 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InsightQueryItemPropertiesTableQueryQueriesDefinitionsPropertiesItemsItem.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InsightQueryItemPropertiesTableQueryQueriesDefinitionsPropertiesItemsItem.Serialization.cs @@ -19,6 +19,15 @@ public partial class InsightQueryItemPropertiesTableQueryQueriesDefinitionsPrope void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InsightsTableResult.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InsightsTableResult.Serialization.cs index f8eb2f1166ac..b8f7cee4edcf 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InsightsTableResult.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InsightsTableResult.Serialization.cs @@ -20,6 +20,15 @@ public partial class InsightsTableResult : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(InsightsTableResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Columns)) { writer.WritePropertyName("columns"u8); @@ -73,7 +81,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } InsightsTableResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InsightsTableResultColumnsItem.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InsightsTableResultColumnsItem.Serialization.cs index 3fad240e785b..f4c7291c246a 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InsightsTableResultColumnsItem.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InsightsTableResultColumnsItem.Serialization.cs @@ -19,6 +19,15 @@ public partial class InsightsTableResultColumnsItem : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(InsightsTableResultColumnsItem)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(InsightsTableResultColumnsItemType)) { writer.WritePropertyName("type"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } InsightsTableResultColumnsItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InstructionStep.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InstructionStep.Serialization.cs index 1853692e8b9e..ae5918981d35 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InstructionStep.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InstructionStep.Serialization.cs @@ -20,6 +20,15 @@ public partial class InstructionStep : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(InstructionStep)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Title)) { writer.WritePropertyName("title"u8); @@ -73,7 +81,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO #endif } } - writer.WriteEndObject(); } InstructionStep IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InstructionStepDetails.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InstructionStepDetails.Serialization.cs index 672594bffb35..45d6019297a3 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InstructionStepDetails.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InstructionStepDetails.Serialization.cs @@ -19,6 +19,15 @@ public partial class InstructionStepDetails : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(InstructionStepDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("parameters"u8); #if NET6_0_OR_GREATER writer.WriteRawValue(Parameters); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } InstructionStepDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InstructionSteps.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InstructionSteps.Serialization.cs index 883df14d6d4c..8ba116220ddb 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InstructionSteps.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InstructionSteps.Serialization.cs @@ -20,6 +20,15 @@ public partial class InstructionSteps : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(InstructionSteps)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Title)) { writer.WritePropertyName("title"u8); @@ -63,7 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } InstructionSteps IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/IotCheckRequirements.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/IotCheckRequirements.Serialization.cs index 1e8121277e5e..bfe8bcda6106 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/IotCheckRequirements.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/IotCheckRequirements.Serialization.cs @@ -18,6 +18,15 @@ public partial class IotCheckRequirements : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,9 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(IotCheckRequirements)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(SubscriptionId)) @@ -36,22 +43,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr writer.WriteStringValue(SubscriptionId); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } IotCheckRequirements IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/IotDataConnector.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/IotDataConnector.Serialization.cs index d60254e31b4d..bd2bd390915a 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/IotDataConnector.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/IotDataConnector.Serialization.cs @@ -20,6 +20,15 @@ public partial class IotDataConnector : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,34 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(IotDataConnector)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (Optional.IsDefined(ETag)) - { - writer.WritePropertyName("etag"u8); - writer.WriteStringValue(ETag.Value.ToString()); - } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(SubscriptionId)) @@ -71,22 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter } writer.WriteEndObject(); writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } IotDataConnector IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/JobItem.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/JobItem.Serialization.cs index fa6b0f607993..371630e60e91 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/JobItem.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/JobItem.Serialization.cs @@ -20,6 +20,15 @@ public partial class JobItem : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions o throw new FormatException($"The model {nameof(JobItem)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ResourceId)) { writer.WritePropertyName("resourceId"u8); @@ -68,7 +76,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions o #endif } } - writer.WriteEndObject(); } JobItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/JobList.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/JobList.Serialization.cs index 4088219fc432..96fc7d8362d2 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/JobList.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/JobList.Serialization.cs @@ -20,6 +20,15 @@ internal partial class JobList : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions o throw new FormatException($"The model {nameof(JobList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions o #endif } } - writer.WriteEndObject(); } JobList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/JwtAuthModel.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/JwtAuthModel.Serialization.cs index 616cd14853f0..2195ee8dc086 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/JwtAuthModel.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/JwtAuthModel.Serialization.cs @@ -20,6 +20,15 @@ public partial class JwtAuthModel : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(JwtAuthModel)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("tokenEndpoint"u8); writer.WriteStringValue(TokenEndpoint); writer.WritePropertyName("userName"u8); @@ -97,24 +106,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti writer.WritePropertyName("requestTimeoutInSeconds"u8); writer.WriteNumberValue(RequestTimeoutInSeconds.Value); } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(AuthType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } JwtAuthModel IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/LastDataReceivedDataType.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/LastDataReceivedDataType.Serialization.cs index 59841948e351..fc01081c3a93 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/LastDataReceivedDataType.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/LastDataReceivedDataType.Serialization.cs @@ -19,6 +19,15 @@ public partial class LastDataReceivedDataType : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(LastDataReceivedDataType)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } LastDataReceivedDataType IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MLBehaviorAnalyticsAlertRule.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MLBehaviorAnalyticsAlertRule.Serialization.cs index 92bbd31c8b5a..793e690aefd4 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MLBehaviorAnalyticsAlertRule.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MLBehaviorAnalyticsAlertRule.Serialization.cs @@ -21,6 +21,15 @@ public partial class MLBehaviorAnalyticsAlertRule : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,34 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(MLBehaviorAnalyticsAlertRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (Optional.IsDefined(ETag)) - { - writer.WritePropertyName("etag"u8); - writer.WriteStringValue(ETag.Value.ToString()); - } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(AlertRuleTemplateName)) @@ -119,22 +101,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } MLBehaviorAnalyticsAlertRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MLBehaviorAnalyticsAlertRuleTemplate.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MLBehaviorAnalyticsAlertRuleTemplate.Serialization.cs index 2fdce4bdc60e..ece3ecd61c3b 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MLBehaviorAnalyticsAlertRuleTemplate.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MLBehaviorAnalyticsAlertRuleTemplate.Serialization.cs @@ -21,6 +21,15 @@ public partial class MLBehaviorAnalyticsAlertRuleTemplate : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,29 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(MLBehaviorAnalyticsAlertRuleTemplate)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(AlertRulesCreatedByTemplateCount)) @@ -119,22 +106,6 @@ void IJsonModel.Write(Utf8JsonWriter write writer.WriteStringValue(Severity.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } MLBehaviorAnalyticsAlertRuleTemplate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ManualTriggerRequestBody.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ManualTriggerRequestBody.Serialization.cs index 4d4bd34dcf2f..5c04f16e57fb 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ManualTriggerRequestBody.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ManualTriggerRequestBody.Serialization.cs @@ -18,6 +18,15 @@ public partial class ManualTriggerRequestBody : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(ManualTriggerRequestBody)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(TenantId)) { writer.WritePropertyName("tenantId"u8); @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } ManualTriggerRequestBody IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/McasCheckRequirements.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/McasCheckRequirements.Serialization.cs index e32db5a563c3..20f3af837738 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/McasCheckRequirements.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/McasCheckRequirements.Serialization.cs @@ -18,6 +18,15 @@ public partial class McasCheckRequirements : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,9 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(McasCheckRequirements)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(TenantId)) @@ -36,22 +43,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW writer.WriteStringValue(TenantId.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } McasCheckRequirements IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/McasDataConnector.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/McasDataConnector.Serialization.cs index f79d7c33829b..7f7e282a2720 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/McasDataConnector.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/McasDataConnector.Serialization.cs @@ -20,6 +20,15 @@ public partial class McasDataConnector : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,34 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(McasDataConnector)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (Optional.IsDefined(ETag)) - { - writer.WritePropertyName("etag"u8); - writer.WriteStringValue(ETag.Value.ToString()); - } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(TenantId)) @@ -68,22 +50,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite writer.WriteObjectValue(DataTypes, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } McasDataConnector IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/McasDataConnectorDataTypes.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/McasDataConnectorDataTypes.Serialization.cs index 51313ad4e649..3e61db0271e7 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/McasDataConnectorDataTypes.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/McasDataConnectorDataTypes.Serialization.cs @@ -19,6 +19,15 @@ public partial class McasDataConnectorDataTypes : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,30 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(McasDataConnectorDataTypes)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(DiscoveryLogs)) { writer.WritePropertyName("discoveryLogs"u8); writer.WriteObjectValue(DiscoveryLogs, options); } - writer.WritePropertyName("alerts"u8); - writer.WriteObjectValue(Alerts, options); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } McasDataConnectorDataTypes IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MdatpCheckRequirements.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MdatpCheckRequirements.Serialization.cs index 0efa03238b59..b88ae58cec27 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MdatpCheckRequirements.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MdatpCheckRequirements.Serialization.cs @@ -18,6 +18,15 @@ public partial class MdatpCheckRequirements : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,9 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(MdatpCheckRequirements)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(TenantId)) @@ -36,22 +43,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader writer.WriteStringValue(TenantId.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } MdatpCheckRequirements IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MdatpDataConnector.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MdatpDataConnector.Serialization.cs index 118b6ae7d71a..2c5f7fd235b7 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MdatpDataConnector.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MdatpDataConnector.Serialization.cs @@ -20,6 +20,15 @@ public partial class MdatpDataConnector : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,34 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(MdatpDataConnector)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (Optional.IsDefined(ETag)) - { - writer.WritePropertyName("etag"u8); - writer.WriteStringValue(ETag.Value.ToString()); - } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(TenantId)) @@ -71,22 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndObject(); writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } MdatpDataConnector IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MetadataList.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MetadataList.Serialization.cs index f59a86e450ec..24f36fe84d58 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MetadataList.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MetadataList.Serialization.cs @@ -20,6 +20,15 @@ internal partial class MetadataList : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(MetadataList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti #endif } } - writer.WriteEndObject(); } MetadataList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MicrosoftPurviewInformationProtectionCheckRequirements.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MicrosoftPurviewInformationProtectionCheckRequirements.Serialization.cs index 5b9dd717a89c..e11ac56ec405 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MicrosoftPurviewInformationProtectionCheckRequirements.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MicrosoftPurviewInformationProtectionCheckRequirements.Serialization.cs @@ -18,6 +18,15 @@ public partial class MicrosoftPurviewInformationProtectionCheckRequirements : IU void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,9 +34,7 @@ void IJsonModel.Write(Ut throw new FormatException($"The model {nameof(MicrosoftPurviewInformationProtectionCheckRequirements)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(TenantId)) @@ -36,22 +43,6 @@ void IJsonModel.Write(Ut writer.WriteStringValue(TenantId.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } MicrosoftPurviewInformationProtectionCheckRequirements IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MicrosoftPurviewInformationProtectionDataConnector.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MicrosoftPurviewInformationProtectionDataConnector.Serialization.cs index 6c43f319234d..21069f724a02 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MicrosoftPurviewInformationProtectionDataConnector.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MicrosoftPurviewInformationProtectionDataConnector.Serialization.cs @@ -20,6 +20,15 @@ public partial class MicrosoftPurviewInformationProtectionDataConnector : IUtf8J void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,34 +36,7 @@ void IJsonModel.Write(Utf8Js throw new FormatException($"The model {nameof(MicrosoftPurviewInformationProtectionDataConnector)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (Optional.IsDefined(ETag)) - { - writer.WritePropertyName("etag"u8); - writer.WriteStringValue(ETag.Value.ToString()); - } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(TenantId)) @@ -71,22 +53,6 @@ void IJsonModel.Write(Utf8Js } writer.WriteEndObject(); writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } MicrosoftPurviewInformationProtectionDataConnector IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MicrosoftSecurityIncidentCreationAlertRule.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MicrosoftSecurityIncidentCreationAlertRule.Serialization.cs index e55cd65e1c40..63054ca2a04e 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MicrosoftSecurityIncidentCreationAlertRule.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MicrosoftSecurityIncidentCreationAlertRule.Serialization.cs @@ -21,6 +21,15 @@ public partial class MicrosoftSecurityIncidentCreationAlertRule : IUtf8JsonSeria void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,34 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(MicrosoftSecurityIncidentCreationAlertRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (Optional.IsDefined(ETag)) - { - writer.WritePropertyName("etag"u8); - writer.WriteStringValue(ETag.Value.ToString()); - } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsCollectionDefined(DisplayNamesFilter)) @@ -119,22 +101,6 @@ void IJsonModel.Write(Utf8JsonWriter writer.WriteStringValue(LastModifiedOn.Value, "O"); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } MicrosoftSecurityIncidentCreationAlertRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MicrosoftSecurityIncidentCreationAlertRuleTemplate.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MicrosoftSecurityIncidentCreationAlertRuleTemplate.Serialization.cs index ab52547cb9bd..903b0ac11b10 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MicrosoftSecurityIncidentCreationAlertRuleTemplate.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MicrosoftSecurityIncidentCreationAlertRuleTemplate.Serialization.cs @@ -21,6 +21,15 @@ public partial class MicrosoftSecurityIncidentCreationAlertRuleTemplate : IUtf8J void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,29 +37,7 @@ void IJsonModel.Write(Utf8Js throw new FormatException($"The model {nameof(MicrosoftSecurityIncidentCreationAlertRuleTemplate)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(AlertRulesCreatedByTemplateCount)) @@ -129,22 +116,6 @@ void IJsonModel.Write(Utf8Js writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } MicrosoftSecurityIncidentCreationAlertRuleTemplate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MstiCheckRequirements.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MstiCheckRequirements.Serialization.cs index defa2fff814e..0cdf788f35be 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MstiCheckRequirements.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MstiCheckRequirements.Serialization.cs @@ -18,6 +18,15 @@ public partial class MstiCheckRequirements : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,9 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(MstiCheckRequirements)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(TenantId)) @@ -36,22 +43,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW writer.WriteStringValue(TenantId.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } MstiCheckRequirements IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MstiDataConnector.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MstiDataConnector.Serialization.cs index 34c4dd836eb3..fa2991dca402 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MstiDataConnector.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MstiDataConnector.Serialization.cs @@ -20,6 +20,15 @@ public partial class MstiDataConnector : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,34 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(MstiDataConnector)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (Optional.IsDefined(ETag)) - { - writer.WritePropertyName("etag"u8); - writer.WriteStringValue(ETag.Value.ToString()); - } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(TenantId)) @@ -71,22 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite } writer.WriteEndObject(); writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } MstiDataConnector IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MtpCheckRequirements.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MtpCheckRequirements.Serialization.cs index 18739da6211b..1dab2f1e4be5 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MtpCheckRequirements.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MtpCheckRequirements.Serialization.cs @@ -18,6 +18,15 @@ public partial class MtpCheckRequirements : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,9 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(MtpCheckRequirements)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(TenantId)) @@ -36,22 +43,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr writer.WriteStringValue(TenantId.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } MtpCheckRequirements IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MtpDataConnector.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MtpDataConnector.Serialization.cs index 2b2311eec56d..124b644721fe 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MtpDataConnector.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MtpDataConnector.Serialization.cs @@ -20,6 +20,15 @@ public partial class MtpDataConnector : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,34 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(MtpDataConnector)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (Optional.IsDefined(ETag)) - { - writer.WritePropertyName("etag"u8); - writer.WriteStringValue(ETag.Value.ToString()); - } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(TenantId)) @@ -81,22 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter } writer.WriteEndObject(); writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } MtpDataConnector IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MtpFilteredProviders.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MtpFilteredProviders.Serialization.cs index 1ea8d742e5b0..18eb41c4c6a3 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MtpFilteredProviders.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MtpFilteredProviders.Serialization.cs @@ -20,6 +20,15 @@ internal partial class MtpFilteredProviders : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(MtpFilteredProviders)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("alerts"u8); writer.WriteStartArray(); foreach (var item in Alerts) @@ -50,7 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } MtpFilteredProviders IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/NicEntity.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/NicEntity.Serialization.cs index ecd7afb2f453..4f38a27b546a 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/NicEntity.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/NicEntity.Serialization.cs @@ -21,6 +21,15 @@ public partial class NicEntity : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,29 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions throw new FormatException($"The model {nameof(NicEntity)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(AdditionalData)) @@ -102,22 +89,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NicEntity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/NoneAuthModel.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/NoneAuthModel.Serialization.cs index dcfd9e3cf89e..5a0aea3499e6 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/NoneAuthModel.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/NoneAuthModel.Serialization.cs @@ -19,6 +19,15 @@ public partial class NoneAuthModel : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,25 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt throw new FormatException($"The model {nameof(NoneAuthModel)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(AuthType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } NoneAuthModel IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/NrtAlertRule.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/NrtAlertRule.Serialization.cs index bb6d1c00565b..f3ccffa02487 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/NrtAlertRule.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/NrtAlertRule.Serialization.cs @@ -21,6 +21,15 @@ public partial class NrtAlertRule : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,34 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(NrtAlertRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (Optional.IsDefined(ETag)) - { - writer.WritePropertyName("etag"u8); - writer.WriteStringValue(ETag.Value.ToString()); - } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(AlertRuleTemplateName)) @@ -185,22 +167,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NrtAlertRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/NrtAlertRuleTemplate.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/NrtAlertRuleTemplate.Serialization.cs index 7ce6c642ed27..b8b73952f0e9 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/NrtAlertRuleTemplate.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/NrtAlertRuleTemplate.Serialization.cs @@ -21,6 +21,15 @@ public partial class NrtAlertRuleTemplate : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,29 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(NrtAlertRuleTemplate)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(AlertRulesCreatedByTemplateCount)) @@ -170,22 +157,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NrtAlertRuleTemplate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/OAuthModel.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/OAuthModel.Serialization.cs index 06eb81386dd8..3acc1ffdf818 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/OAuthModel.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/OAuthModel.Serialization.cs @@ -20,6 +20,15 @@ public partial class OAuthModel : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOption throw new FormatException($"The model {nameof(OAuthModel)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(AuthorizationCode)) { writer.WritePropertyName("authorizationCode"u8); @@ -122,24 +131,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOption writer.WritePropertyName("accessTokenPrepend"u8); writer.WriteStringValue(AccessTokenPrepend); } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(AuthType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } OAuthModel IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/Office365ProjectCheckRequirements.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/Office365ProjectCheckRequirements.Serialization.cs index 5f06334dbc15..ae9b1352fb96 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/Office365ProjectCheckRequirements.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/Office365ProjectCheckRequirements.Serialization.cs @@ -18,6 +18,15 @@ public partial class Office365ProjectCheckRequirements : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,9 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(Office365ProjectCheckRequirements)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(TenantId)) @@ -36,22 +43,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteStringValue(TenantId.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } Office365ProjectCheckRequirements IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/Office365ProjectDataConnector.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/Office365ProjectDataConnector.Serialization.cs index 8f0608205ad8..85b2837ee42b 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/Office365ProjectDataConnector.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/Office365ProjectDataConnector.Serialization.cs @@ -20,6 +20,15 @@ public partial class Office365ProjectDataConnector : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,34 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(Office365ProjectDataConnector)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (Optional.IsDefined(ETag)) - { - writer.WritePropertyName("etag"u8); - writer.WriteStringValue(ETag.Value.ToString()); - } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(TenantId)) @@ -71,22 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode } writer.WriteEndObject(); writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } Office365ProjectDataConnector IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/OfficeAtpCheckRequirements.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/OfficeAtpCheckRequirements.Serialization.cs index 0402dad791bd..1cc7a4efd0f8 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/OfficeAtpCheckRequirements.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/OfficeAtpCheckRequirements.Serialization.cs @@ -18,6 +18,15 @@ public partial class OfficeAtpCheckRequirements : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,9 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(OfficeAtpCheckRequirements)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(TenantId)) @@ -36,22 +43,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe writer.WriteStringValue(TenantId.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } OfficeAtpCheckRequirements IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/OfficeAtpDataConnector.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/OfficeAtpDataConnector.Serialization.cs index 9645e9872024..5d1645c18c67 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/OfficeAtpDataConnector.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/OfficeAtpDataConnector.Serialization.cs @@ -20,6 +20,15 @@ public partial class OfficeAtpDataConnector : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,34 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(OfficeAtpDataConnector)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (Optional.IsDefined(ETag)) - { - writer.WritePropertyName("etag"u8); - writer.WriteStringValue(ETag.Value.ToString()); - } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(TenantId)) @@ -71,22 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader } writer.WriteEndObject(); writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } OfficeAtpDataConnector IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/OfficeConsentList.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/OfficeConsentList.Serialization.cs index 5256d9cf4fe5..f75a5cff64e8 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/OfficeConsentList.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/OfficeConsentList.Serialization.cs @@ -20,6 +20,15 @@ internal partial class OfficeConsentList : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(OfficeConsentList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } OfficeConsentList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/OfficeIrmCheckRequirements.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/OfficeIrmCheckRequirements.Serialization.cs index bddceabfd94e..b2d991581db5 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/OfficeIrmCheckRequirements.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/OfficeIrmCheckRequirements.Serialization.cs @@ -18,6 +18,15 @@ public partial class OfficeIrmCheckRequirements : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,9 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(OfficeIrmCheckRequirements)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(TenantId)) @@ -36,22 +43,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe writer.WriteStringValue(TenantId.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } OfficeIrmCheckRequirements IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/OfficeIrmDataConnector.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/OfficeIrmDataConnector.Serialization.cs index a03849db9132..3df65dcef852 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/OfficeIrmDataConnector.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/OfficeIrmDataConnector.Serialization.cs @@ -20,6 +20,15 @@ public partial class OfficeIrmDataConnector : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,34 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(OfficeIrmDataConnector)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (Optional.IsDefined(ETag)) - { - writer.WritePropertyName("etag"u8); - writer.WriteStringValue(ETag.Value.ToString()); - } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(TenantId)) @@ -71,22 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader } writer.WriteEndObject(); writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } OfficeIrmDataConnector IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/OfficePowerBICheckRequirements.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/OfficePowerBICheckRequirements.Serialization.cs index 1a2f00f8249d..db324a25c8a1 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/OfficePowerBICheckRequirements.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/OfficePowerBICheckRequirements.Serialization.cs @@ -18,6 +18,15 @@ public partial class OfficePowerBICheckRequirements : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,9 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(OfficePowerBICheckRequirements)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(TenantId)) @@ -36,22 +43,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod writer.WriteStringValue(TenantId.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } OfficePowerBICheckRequirements IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/OfficePowerBIDataConnector.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/OfficePowerBIDataConnector.Serialization.cs index d0e80424069f..236e71780816 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/OfficePowerBIDataConnector.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/OfficePowerBIDataConnector.Serialization.cs @@ -20,6 +20,15 @@ public partial class OfficePowerBIDataConnector : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,34 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(OfficePowerBIDataConnector)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (Optional.IsDefined(ETag)) - { - writer.WritePropertyName("etag"u8); - writer.WriteStringValue(ETag.Value.ToString()); - } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(TenantId)) @@ -71,22 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe } writer.WriteEndObject(); writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } OfficePowerBIDataConnector IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/OracleAuthModel.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/OracleAuthModel.Serialization.cs index 907dde15326e..1d0f220847f9 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/OracleAuthModel.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/OracleAuthModel.Serialization.cs @@ -19,6 +19,15 @@ public partial class OracleAuthModel : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(OracleAuthModel)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("tenantId"u8); writer.WriteStringValue(TenantId); writer.WritePropertyName("userId"u8); @@ -35,24 +44,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO writer.WriteStringValue(PublicFingerprint); writer.WritePropertyName("pemFile"u8); writer.WriteStringValue(PemFile); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(AuthType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } OracleAuthModel IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/PackageList.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/PackageList.Serialization.cs index 099be2ac6c7d..f1200c665873 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/PackageList.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/PackageList.Serialization.cs @@ -20,6 +20,15 @@ internal partial class PackageList : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio throw new FormatException($"The model {nameof(PackageList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio #endif } } - writer.WriteEndObject(); } PackageList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ProductPackageList.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ProductPackageList.Serialization.cs index 2670069918a1..addbaf1f30c0 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ProductPackageList.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ProductPackageList.Serialization.cs @@ -20,6 +20,15 @@ internal partial class ProductPackageList : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ProductPackageList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } ProductPackageList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ProductTemplateList.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ProductTemplateList.Serialization.cs index 9d7e189a78ef..e4f1a22457c6 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ProductTemplateList.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ProductTemplateList.Serialization.cs @@ -20,6 +20,15 @@ internal partial class ProductTemplateList : IUtf8JsonSerializable, IJsonModel

    ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ProductTemplateList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } ProductTemplateList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/PropertyArrayConditionProperties.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/PropertyArrayConditionProperties.Serialization.cs index 63b553b9256d..e30a840fb5a8 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/PropertyArrayConditionProperties.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/PropertyArrayConditionProperties.Serialization.cs @@ -19,6 +19,15 @@ public partial class PropertyArrayConditionProperties : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,30 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(PropertyArrayConditionProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(ConditionProperties)) { writer.WritePropertyName("conditionProperties"u8); writer.WriteObjectValue(ConditionProperties, options); } - writer.WritePropertyName("conditionType"u8); - writer.WriteStringValue(ConditionType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } PropertyArrayConditionProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/PublicationFailedError.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/PublicationFailedError.Serialization.cs index 7d2663c99546..50f48560b8fd 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/PublicationFailedError.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/PublicationFailedError.Serialization.cs @@ -19,6 +19,15 @@ public partial class PublicationFailedError : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(PublicationFailedError)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("memberResourceName"u8); writer.WriteStringValue(MemberResourceName); writer.WritePropertyName("errorMessage"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } PublicationFailedError IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/PullRequestInfo.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/PullRequestInfo.Serialization.cs index feeda81a045e..404324aaae72 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/PullRequestInfo.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/PullRequestInfo.Serialization.cs @@ -19,6 +19,15 @@ public partial class PullRequestInfo : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(PullRequestInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Uri)) { writer.WritePropertyName("url"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO #endif } } - writer.WriteEndObject(); } PullRequestInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/RecommendationList.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/RecommendationList.Serialization.cs index e64f79687bb0..cc043f19efd6 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/RecommendationList.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/RecommendationList.Serialization.cs @@ -20,6 +20,15 @@ internal partial class RecommendationList : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(RecommendationList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } RecommendationList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/RecommendationPatchProperties.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/RecommendationPatchProperties.Serialization.cs index b3baf71426b6..7bfd2f06e0e8 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/RecommendationPatchProperties.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/RecommendationPatchProperties.Serialization.cs @@ -18,6 +18,15 @@ internal partial class RecommendationPatchProperties : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(RecommendationPatchProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(State)) { writer.WritePropertyName("state"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } RecommendationPatchProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/RecommendedSuggestion.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/RecommendedSuggestion.Serialization.cs index 30753b59736e..9d80fb3d51ba 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/RecommendedSuggestion.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/RecommendedSuggestion.Serialization.cs @@ -20,6 +20,15 @@ public partial class RecommendedSuggestion : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(RecommendedSuggestion)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("suggestionTypeId"u8); writer.WriteStringValue(SuggestionTypeId); writer.WritePropertyName("title"u8); @@ -69,7 +77,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } RecommendedSuggestion IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ReevaluateResult.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ReevaluateResult.Serialization.cs index 285414f390d7..c3eed01a3732 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ReevaluateResult.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ReevaluateResult.Serialization.cs @@ -19,6 +19,15 @@ public partial class ReevaluateResult : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(ReevaluateResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(LastEvaluatedOn)) { writer.WritePropertyName("lastEvaluatedTimeUtc"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } ReevaluateResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/RelationList.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/RelationList.Serialization.cs index 59ea627d0b33..bc730af867fb 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/RelationList.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/RelationList.Serialization.cs @@ -20,6 +20,15 @@ internal partial class RelationList : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(RelationList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti #endif } } - writer.WriteEndObject(); } RelationList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/RelationshipHint.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/RelationshipHint.Serialization.cs index 457536a04ace..19930de924c7 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/RelationshipHint.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/RelationshipHint.Serialization.cs @@ -19,6 +19,15 @@ public partial class RelationshipHint : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(RelationshipHint)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(FieldName)) { writer.WritePropertyName("fieldName"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } RelationshipHint IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/RepoList.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/RepoList.Serialization.cs index 955c446c0ab7..9a8a0bd37d55 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/RepoList.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/RepoList.Serialization.cs @@ -20,6 +20,15 @@ internal partial class RepoList : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions throw new FormatException($"The model {nameof(RepoList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions #endif } } - writer.WriteEndObject(); } RepoList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/RepositoryAccess.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/RepositoryAccess.Serialization.cs index 7e0afb1b0301..d5d7482231b9 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/RepositoryAccess.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/RepositoryAccess.Serialization.cs @@ -19,6 +19,15 @@ public partial class RepositoryAccess : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(RepositoryAccess)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("kind"u8); writer.WriteStringValue(Kind.ToString()); if (Optional.IsDefined(Code)) @@ -69,7 +77,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } RepositoryAccess IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/RepositoryAccessProperties.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/RepositoryAccessProperties.Serialization.cs index a96dce8aba54..48eb7ebef358 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/RepositoryAccessProperties.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/RepositoryAccessProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class RepositoryAccessProperties : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(RepositoryAccessProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); writer.WritePropertyName("repositoryAccess"u8); @@ -74,7 +82,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } RepositoryAccessProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/RepositoryResourceInfo.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/RepositoryResourceInfo.Serialization.cs index 90bf56e3586d..dfbaf55dd16d 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/RepositoryResourceInfo.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/RepositoryResourceInfo.Serialization.cs @@ -19,6 +19,15 @@ public partial class RepositoryResourceInfo : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(RepositoryResourceInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Webhook)) { writer.WritePropertyName("webhook"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } RepositoryResourceInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/RestApiPollerDataConnector.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/RestApiPollerDataConnector.Serialization.cs index 970b452ded49..b88c89aab412 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/RestApiPollerDataConnector.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/RestApiPollerDataConnector.Serialization.cs @@ -21,6 +21,15 @@ public partial class RestApiPollerDataConnector : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,34 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(RestApiPollerDataConnector)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (Optional.IsDefined(ETag)) - { - writer.WritePropertyName("etag"u8); - writer.WriteStringValue(ETag.Value.ToString()); - } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(ConnectorDefinitionName)) @@ -110,22 +92,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe writer.WriteEndObject(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } RestApiPollerDataConnector IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/RestApiPollerRequestConfig.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/RestApiPollerRequestConfig.Serialization.cs index f21838707abf..fb1a3aa36800 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/RestApiPollerRequestConfig.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/RestApiPollerRequestConfig.Serialization.cs @@ -20,6 +20,15 @@ public partial class RestApiPollerRequestConfig : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(RestApiPollerRequestConfig)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("apiEndpoint"u8); writer.WriteStringValue(ApiEndpoint); if (Optional.IsDefined(RateLimitQPS)) @@ -179,7 +187,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } RestApiPollerRequestConfig IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/RestApiPollerRequestPagingConfig.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/RestApiPollerRequestPagingConfig.Serialization.cs index 57b2e2a6e0e8..bfa9ab65769b 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/RestApiPollerRequestPagingConfig.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/RestApiPollerRequestPagingConfig.Serialization.cs @@ -19,6 +19,15 @@ public partial class RestApiPollerRequestPagingConfig : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(RestApiPollerRequestPagingConfig)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("pagingType"u8); writer.WriteStringValue(PagingType.ToString()); if (Optional.IsDefined(PageSize)) @@ -54,7 +62,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } RestApiPollerRequestPagingConfig IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SapSolutionUsageStatistic.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SapSolutionUsageStatistic.Serialization.cs index 157458a965d4..23c3e283bdcd 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SapSolutionUsageStatistic.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SapSolutionUsageStatistic.Serialization.cs @@ -20,6 +20,15 @@ public partial class SapSolutionUsageStatistic : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,34 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(SapSolutionUsageStatistic)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (options.Format != "W" && Optional.IsDefined(ETag)) - { - writer.WritePropertyName("etag"u8); - writer.WriteStringValue(ETag.Value.ToString()); - } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ActiveSystemIdCount)) @@ -63,22 +45,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea writer.WriteNumberValue(ActiveSystemIdCount.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SapSolutionUsageStatistic IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ScheduledAlertRuleTemplate.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ScheduledAlertRuleTemplate.Serialization.cs index b448f8033916..b02e04ce5c2b 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ScheduledAlertRuleTemplate.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ScheduledAlertRuleTemplate.Serialization.cs @@ -21,6 +21,15 @@ public partial class ScheduledAlertRuleTemplate : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,29 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(ScheduledAlertRuleTemplate)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(AlertRulesCreatedByTemplateCount)) @@ -200,22 +187,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ScheduledAlertRuleTemplate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityAlertTimelineItem.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityAlertTimelineItem.Serialization.cs index b760e262aca4..b6ea9112f568 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityAlertTimelineItem.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityAlertTimelineItem.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityAlertTimelineItem : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(SecurityAlertTimelineItem)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("azureResourceId"u8); writer.WriteStringValue(AzureResourceId); if (Optional.IsDefined(ProductName)) @@ -67,24 +76,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea } writer.WriteEndArray(); } - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityAlertTimelineItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAadDataConnector.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAadDataConnector.Serialization.cs index 6d5900e1c68a..c44aafca2c48 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAadDataConnector.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAadDataConnector.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityInsightsAadDataConnector : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,34 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(SecurityInsightsAadDataConnector)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (Optional.IsDefined(ETag)) - { - writer.WritePropertyName("etag"u8); - writer.WriteStringValue(ETag.Value.ToString()); - } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(TenantId)) @@ -71,22 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M } writer.WriteEndObject(); writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityInsightsAadDataConnector IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAatpDataConnector.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAatpDataConnector.Serialization.cs index a3d0022f2770..e8ce39cd6ef2 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAatpDataConnector.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAatpDataConnector.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityInsightsAatpDataConnector : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,34 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(SecurityInsightsAatpDataConnector)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (Optional.IsDefined(ETag)) - { - writer.WritePropertyName("etag"u8); - writer.WriteStringValue(ETag.Value.ToString()); - } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(TenantId)) @@ -71,22 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, } writer.WriteEndObject(); writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityInsightsAatpDataConnector IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAccountEntity.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAccountEntity.Serialization.cs index ddc6afaa3847..46e283b26515 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAccountEntity.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAccountEntity.Serialization.cs @@ -21,6 +21,15 @@ public partial class SecurityInsightsAccountEntity : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,29 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(SecurityInsightsAccountEntity)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(AdditionalData)) @@ -142,22 +129,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode writer.WriteStringValue(DnsDomain); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityInsightsAccountEntity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAlert.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAlert.Serialization.cs index 00834cf48c63..21614fffd0ca 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAlert.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAlert.Serialization.cs @@ -21,6 +21,15 @@ public partial class SecurityInsightsAlert : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,29 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(SecurityInsightsAlert)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(AdditionalData)) @@ -239,22 +226,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityInsightsAlert IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAlertConfidenceReason.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAlertConfidenceReason.Serialization.cs index 73256ba93438..8c59592c6532 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAlertConfidenceReason.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAlertConfidenceReason.Serialization.cs @@ -19,6 +19,15 @@ public partial class SecurityInsightsAlertConfidenceReason : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(SecurityInsightsAlertConfidenceReason)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Reason)) { writer.WritePropertyName("reason"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } SecurityInsightsAlertConfidenceReason IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAlertDetailsOverride.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAlertDetailsOverride.Serialization.cs index 90dde804bfe8..6d2ac592a31b 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAlertDetailsOverride.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAlertDetailsOverride.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityInsightsAlertDetailsOverride : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(SecurityInsightsAlertDetailsOverride)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(AlertDisplayNameFormat)) { writer.WritePropertyName("alertDisplayNameFormat"u8); @@ -73,7 +81,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } SecurityInsightsAlertDetailsOverride IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAlertPropertyMapping.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAlertPropertyMapping.Serialization.cs index 5970ff9e74b3..f3c91ff8ad87 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAlertPropertyMapping.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAlertPropertyMapping.Serialization.cs @@ -19,6 +19,15 @@ public partial class SecurityInsightsAlertPropertyMapping : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(SecurityInsightsAlertPropertyMapping)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(AlertProperty)) { writer.WritePropertyName("alertProperty"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } SecurityInsightsAlertPropertyMapping IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAlertRuleActionCreateOrUpdateContent.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAlertRuleActionCreateOrUpdateContent.Serialization.cs index bbf817e5fd0c..33f05a810b48 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAlertRuleActionCreateOrUpdateContent.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAlertRuleActionCreateOrUpdateContent.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityInsightsAlertRuleActionCreateOrUpdateContent : IUtf void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,32 +36,12 @@ void IJsonModel.Write(Utf8 throw new FormatException($"The model {nameof(SecurityInsightsAlertRuleActionCreateOrUpdateContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(LogicAppResourceId)) @@ -66,22 +55,6 @@ void IJsonModel.Write(Utf8 writer.WriteStringValue(TriggerUri.AbsoluteUri); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityInsightsAlertRuleActionCreateOrUpdateContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAlertRuleEntityMapping.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAlertRuleEntityMapping.Serialization.cs index ca6ed6e8a12c..2ebde0bcd25c 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAlertRuleEntityMapping.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAlertRuleEntityMapping.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityInsightsAlertRuleEntityMapping : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(SecurityInsightsAlertRuleEntityMapping)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(EntityType)) { writer.WritePropertyName("entityType"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } SecurityInsightsAlertRuleEntityMapping IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAlertsDataTypeOfDataConnector.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAlertsDataTypeOfDataConnector.Serialization.cs index b2469b3824a1..096b6d7222f6 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAlertsDataTypeOfDataConnector.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAlertsDataTypeOfDataConnector.Serialization.cs @@ -19,6 +19,15 @@ public partial class SecurityInsightsAlertsDataTypeOfDataConnector : IUtf8JsonSe void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWri throw new FormatException($"The model {nameof(SecurityInsightsAlertsDataTypeOfDataConnector)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("alerts"u8); writer.WriteObjectValue(Alerts, options); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -44,7 +52,6 @@ void IJsonModel.Write(Utf8JsonWri #endif } } - writer.WriteEndObject(); } SecurityInsightsAlertsDataTypeOfDataConnector IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsApiKeyAuthModel.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsApiKeyAuthModel.Serialization.cs index 8dbd9802f55e..dec391da4b39 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsApiKeyAuthModel.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsApiKeyAuthModel.Serialization.cs @@ -19,6 +19,15 @@ public partial class SecurityInsightsApiKeyAuthModel : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(SecurityInsightsApiKeyAuthModel)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("apiKey"u8); writer.WriteStringValue(ApiKey); writer.WritePropertyName("apiKeyName"u8); @@ -41,24 +50,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo writer.WritePropertyName("isApiKeyInPostPayload"u8); writer.WriteBooleanValue(IsApiKeyInPostPayload.Value); } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(AuthType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityInsightsApiKeyAuthModel IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAscDataConnector.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAscDataConnector.Serialization.cs index 645271eee7de..850b0f60e70e 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAscDataConnector.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAscDataConnector.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityInsightsAscDataConnector : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,34 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(SecurityInsightsAscDataConnector)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (Optional.IsDefined(ETag)) - { - writer.WritePropertyName("etag"u8); - writer.WriteStringValue(ETag.Value.ToString()); - } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(SubscriptionId)) @@ -71,22 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M } writer.WriteEndObject(); writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityInsightsAscDataConnector IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAutomationRuleAction.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAutomationRuleAction.Serialization.cs index 2df47d79ed99..2133ca44a00b 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAutomationRuleAction.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAutomationRuleAction.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityInsightsAutomationRuleAction : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(SecurityInsightsAutomationRuleAction)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("order"u8); writer.WriteNumberValue(Order); writer.WritePropertyName("actionType"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } SecurityInsightsAutomationRuleAction IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAutomationRuleCondition.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAutomationRuleCondition.Serialization.cs index 6e9569526824..3d4c2db33c96 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAutomationRuleCondition.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAutomationRuleCondition.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityInsightsAutomationRuleCondition : IUtf8JsonSerializ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter wr throw new FormatException($"The model {nameof(SecurityInsightsAutomationRuleCondition)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("conditionType"u8); writer.WriteStringValue(ConditionType.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -45,7 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter wr #endif } } - writer.WriteEndObject(); } SecurityInsightsAutomationRuleCondition IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAutomationRuleTriggeringLogic.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAutomationRuleTriggeringLogic.Serialization.cs index 83a2049dd006..46acf33c9a96 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAutomationRuleTriggeringLogic.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAutomationRuleTriggeringLogic.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityInsightsAutomationRuleTriggeringLogic : IUtf8JsonSe void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWri throw new FormatException($"The model {nameof(SecurityInsightsAutomationRuleTriggeringLogic)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("isEnabled"u8); writer.WriteBooleanValue(IsEnabled); if (Optional.IsDefined(ExpireOn)) @@ -64,7 +72,6 @@ void IJsonModel.Write(Utf8JsonWri #endif } } - writer.WriteEndObject(); } SecurityInsightsAutomationRuleTriggeringLogic IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAwsCloudTrailDataConnector.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAwsCloudTrailDataConnector.Serialization.cs index 009a8f1d6c57..c56bea1900c7 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAwsCloudTrailDataConnector.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAwsCloudTrailDataConnector.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityInsightsAwsCloudTrailDataConnector : IUtf8JsonSeria void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,34 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(SecurityInsightsAwsCloudTrailDataConnector)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (Optional.IsDefined(ETag)) - { - writer.WritePropertyName("etag"u8); - writer.WriteStringValue(ETag.Value.ToString()); - } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(AwsRoleArn)) @@ -71,22 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter } writer.WriteEndObject(); writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityInsightsAwsCloudTrailDataConnector IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAzureResourceEntity.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAzureResourceEntity.Serialization.cs index 8fa60bf4750c..8bb7d91af6c9 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAzureResourceEntity.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAzureResourceEntity.Serialization.cs @@ -21,6 +21,15 @@ public partial class SecurityInsightsAzureResourceEntity : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,29 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(SecurityInsightsAzureResourceEntity)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(AdditionalData)) @@ -92,22 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writer writer.WriteStringValue(SubscriptionId); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityInsightsAzureResourceEntity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsBookmarkIncidentInfo.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsBookmarkIncidentInfo.Serialization.cs index 6ac644e4b155..70892f083bec 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsBookmarkIncidentInfo.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsBookmarkIncidentInfo.Serialization.cs @@ -19,6 +19,15 @@ public partial class SecurityInsightsBookmarkIncidentInfo : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(SecurityInsightsBookmarkIncidentInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IncidentId)) { writer.WritePropertyName("incidentId"u8); @@ -62,7 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } SecurityInsightsBookmarkIncidentInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsClientInfo.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsClientInfo.Serialization.cs index f5c16bedd40f..6401b195ea31 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsClientInfo.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsClientInfo.Serialization.cs @@ -19,6 +19,15 @@ public partial class SecurityInsightsClientInfo : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(SecurityInsightsClientInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Email)) { writer.WritePropertyName("email"u8); @@ -62,7 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } SecurityInsightsClientInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsCloudApplicationEntity.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsCloudApplicationEntity.Serialization.cs index 5c0c729ae6a0..222a0a5c5f99 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsCloudApplicationEntity.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsCloudApplicationEntity.Serialization.cs @@ -21,6 +21,15 @@ public partial class SecurityInsightsCloudApplicationEntity : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,29 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(SecurityInsightsCloudApplicationEntity)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(AdditionalData)) @@ -97,22 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter wri writer.WriteStringValue(InstanceName); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityInsightsCloudApplicationEntity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsDnsEntity.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsDnsEntity.Serialization.cs index ef5043bfe86b..a25da47c9e6c 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsDnsEntity.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsDnsEntity.Serialization.cs @@ -21,6 +21,15 @@ public partial class SecurityInsightsDnsEntity : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,29 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(SecurityInsightsDnsEntity)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(AdditionalData)) @@ -107,22 +94,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityInsightsDnsEntity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsEntityQueryCreateOrUpdateContent.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsEntityQueryCreateOrUpdateContent.Serialization.cs index 1c653180e2b5..3c27f200ce99 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsEntityQueryCreateOrUpdateContent.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsEntityQueryCreateOrUpdateContent.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityInsightsEntityQueryCreateOrUpdateContent : IUtf8Jso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8Json throw new FormatException($"The model {nameof(SecurityInsightsEntityQueryCreateOrUpdateContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("kind"u8); writer.WriteStringValue(Kind.ToString()); if (Optional.IsDefined(ETag)) @@ -35,42 +44,6 @@ void IJsonModel.Write(Utf8Json writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityInsightsEntityQueryCreateOrUpdateContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsEyesOn.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsEyesOn.Serialization.cs index c3563b45ef8a..c9231875ea12 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsEyesOn.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsEyesOn.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityInsightsEyesOn : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,34 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(SecurityInsightsEyesOn)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (Optional.IsDefined(ETag)) - { - writer.WritePropertyName("etag"u8); - writer.WriteStringValue(ETag.Value.ToString()); - } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(IsEnabled)) @@ -63,22 +45,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader writer.WriteBooleanValue(IsEnabled.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityInsightsEyesOn IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsFieldMapping.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsFieldMapping.Serialization.cs index f87737050b9b..2dcd3bcb1b84 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsFieldMapping.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsFieldMapping.Serialization.cs @@ -19,6 +19,15 @@ public partial class SecurityInsightsFieldMapping : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(SecurityInsightsFieldMapping)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Identifier)) { writer.WritePropertyName("identifier"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } SecurityInsightsFieldMapping IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsFileEntity.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsFileEntity.Serialization.cs index 7b192e18477b..f7a22bdff7e8 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsFileEntity.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsFileEntity.Serialization.cs @@ -21,6 +21,15 @@ public partial class SecurityInsightsFileEntity : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,29 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(SecurityInsightsFileEntity)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(AdditionalData)) @@ -107,22 +94,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe writer.WriteStringValue(HostEntityId); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityInsightsFileEntity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsFileHashEntity.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsFileHashEntity.Serialization.cs index 9523b75c1dd1..b47910059ecc 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsFileHashEntity.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsFileHashEntity.Serialization.cs @@ -21,6 +21,15 @@ public partial class SecurityInsightsFileHashEntity : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,29 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(SecurityInsightsFileHashEntity)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(AdditionalData)) @@ -92,22 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod writer.WriteStringValue(HashValue); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityInsightsFileHashEntity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsFileMetadata.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsFileMetadata.Serialization.cs index a57fb2c0bf8e..4ae9c25b4dd8 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsFileMetadata.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsFileMetadata.Serialization.cs @@ -19,6 +19,15 @@ public partial class SecurityInsightsFileMetadata : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(SecurityInsightsFileMetadata)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(FileFormat)) { writer.WritePropertyName("fileFormat"u8); @@ -67,7 +75,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } SecurityInsightsFileMetadata IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsFileValidationError.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsFileValidationError.Serialization.cs index addfd254e155..21391768f60b 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsFileValidationError.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsFileValidationError.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityInsightsFileValidationError : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(SecurityInsightsFileValidationError)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(RecordIndex)) { writer.WritePropertyName("recordIndex"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } SecurityInsightsFileValidationError IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsFusionAlertRule.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsFusionAlertRule.Serialization.cs index 3d4d8dc3be03..001b438de91b 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsFusionAlertRule.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsFusionAlertRule.Serialization.cs @@ -21,6 +21,15 @@ public partial class SecurityInsightsFusionAlertRule : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,34 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(SecurityInsightsFusionAlertRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (Optional.IsDefined(ETag)) - { - writer.WritePropertyName("etag"u8); - writer.WriteStringValue(ETag.Value.ToString()); - } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(AlertRuleTemplateName)) @@ -139,22 +121,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityInsightsFusionAlertRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsFusionAlertRuleTemplate.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsFusionAlertRuleTemplate.Serialization.cs index a5db7982f9fb..815b79b7209f 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsFusionAlertRuleTemplate.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsFusionAlertRuleTemplate.Serialization.cs @@ -21,6 +21,15 @@ public partial class SecurityInsightsFusionAlertRuleTemplate : IUtf8JsonSerializ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,29 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter wr throw new FormatException($"The model {nameof(SecurityInsightsFusionAlertRuleTemplate)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(AlertRulesCreatedByTemplateCount)) @@ -139,22 +126,6 @@ void IJsonModel.Write(Utf8JsonWriter wr writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityInsightsFusionAlertRuleTemplate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsGroupEntity.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsGroupEntity.Serialization.cs index 0c01da96e157..82a1ea1f45b2 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsGroupEntity.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsGroupEntity.Serialization.cs @@ -21,6 +21,15 @@ public partial class SecurityInsightsGroupEntity : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,29 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(SecurityInsightsGroupEntity)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(AdditionalData)) @@ -97,22 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR writer.WriteStringValue(Sid); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityInsightsGroupEntity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsGroupingConfiguration.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsGroupingConfiguration.Serialization.cs index 0240200f4861..d25f443b19d1 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsGroupingConfiguration.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsGroupingConfiguration.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityInsightsGroupingConfiguration : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(SecurityInsightsGroupingConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("enabled"u8); writer.WriteBooleanValue(IsEnabled); writer.WritePropertyName("reopenClosedIncident"u8); @@ -81,7 +89,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } SecurityInsightsGroupingConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsHostEntity.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsHostEntity.Serialization.cs index e7adf53a6635..a575e0fd4dbe 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsHostEntity.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsHostEntity.Serialization.cs @@ -21,6 +21,15 @@ public partial class SecurityInsightsHostEntity : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,29 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(SecurityInsightsHostEntity)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(AdditionalData)) @@ -127,22 +114,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe writer.WriteStringValue(OSVersion); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityInsightsHostEntity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsHuntList.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsHuntList.Serialization.cs index ce826d1f5095..abe9881b7518 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsHuntList.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsHuntList.Serialization.cs @@ -20,6 +20,15 @@ internal partial class SecurityInsightsHuntList : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(SecurityInsightsHuntList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } SecurityInsightsHuntList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsHuntOwner.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsHuntOwner.Serialization.cs index 9d5f86563f21..05d1ab4b294d 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsHuntOwner.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsHuntOwner.Serialization.cs @@ -19,6 +19,15 @@ public partial class SecurityInsightsHuntOwner : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(SecurityInsightsHuntOwner)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Email)) { writer.WritePropertyName("email"u8); @@ -74,7 +82,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } SecurityInsightsHuntOwner IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsHuntingBookmark.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsHuntingBookmark.Serialization.cs index cfb0808deb8c..3d92f280e9f4 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsHuntingBookmark.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsHuntingBookmark.Serialization.cs @@ -21,6 +21,15 @@ public partial class SecurityInsightsHuntingBookmark : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,29 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(SecurityInsightsHuntingBookmark)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(AdditionalData)) @@ -142,22 +129,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo writer.WriteObjectValue(IncidentInfo, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityInsightsHuntingBookmark IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsIPEntity.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsIPEntity.Serialization.cs index da06bb5a498d..30de3c020dca 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsIPEntity.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsIPEntity.Serialization.cs @@ -22,6 +22,15 @@ public partial class SecurityInsightsIPEntity : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -29,29 +38,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(SecurityInsightsIPEntity)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(AdditionalData)) @@ -103,22 +90,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityInsightsIPEntity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsIPEntityGeoLocation.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsIPEntityGeoLocation.Serialization.cs index 567a887b831a..a714bc40bdbe 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsIPEntityGeoLocation.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsIPEntityGeoLocation.Serialization.cs @@ -19,6 +19,15 @@ public partial class SecurityInsightsIPEntityGeoLocation : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(SecurityInsightsIPEntityGeoLocation)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Asn)) { writer.WritePropertyName("asn"u8); @@ -77,7 +85,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } SecurityInsightsIPEntityGeoLocation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsIncidentActionConfiguration.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsIncidentActionConfiguration.Serialization.cs index e6abcf820f63..9208f53c1ca6 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsIncidentActionConfiguration.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsIncidentActionConfiguration.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityInsightsIncidentActionConfiguration : IUtf8JsonSeri void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWrite throw new FormatException($"The model {nameof(SecurityInsightsIncidentActionConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Severity)) { writer.WritePropertyName("severity"u8); @@ -83,7 +91,6 @@ void IJsonModel.Write(Utf8JsonWrite #endif } } - writer.WriteEndObject(); } SecurityInsightsIncidentActionConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsIncidentAdditionalInfo.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsIncidentAdditionalInfo.Serialization.cs index 6b92246f14a4..2d12e7847ac3 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsIncidentAdditionalInfo.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsIncidentAdditionalInfo.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityInsightsIncidentAdditionalInfo : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(SecurityInsightsIncidentAdditionalInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(AlertsCount)) { writer.WritePropertyName("alertsCount"u8); @@ -93,7 +101,6 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } SecurityInsightsIncidentAdditionalInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsIncidentConfiguration.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsIncidentConfiguration.Serialization.cs index b8a4c331f0f9..7cf84c5adf6d 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsIncidentConfiguration.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsIncidentConfiguration.Serialization.cs @@ -19,6 +19,15 @@ public partial class SecurityInsightsIncidentConfiguration : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(SecurityInsightsIncidentConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("createIncident"u8); writer.WriteBooleanValue(IsIncidentCreated); if (Optional.IsDefined(GroupingConfiguration)) @@ -49,7 +57,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } SecurityInsightsIncidentConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsIncidentEntitiesMetadata.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsIncidentEntitiesMetadata.Serialization.cs index b2c6106bcf38..0622632cd84b 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsIncidentEntitiesMetadata.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsIncidentEntitiesMetadata.Serialization.cs @@ -19,6 +19,15 @@ public partial class SecurityInsightsIncidentEntitiesMetadata : IUtf8JsonSeriali void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter w throw new FormatException($"The model {nameof(SecurityInsightsIncidentEntitiesMetadata)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("entityKind"u8); writer.WriteStringValue(EntityKind.ToString()); writer.WritePropertyName("count"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter w #endif } } - writer.WriteEndObject(); } SecurityInsightsIncidentEntitiesMetadata IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsIncidentEntitiesResult.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsIncidentEntitiesResult.Serialization.cs index f447ee38dfd0..c0966bab6eb6 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsIncidentEntitiesResult.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsIncidentEntitiesResult.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityInsightsIncidentEntitiesResult : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(SecurityInsightsIncidentEntitiesResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Entities)) { writer.WritePropertyName("entities"u8); @@ -63,7 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } SecurityInsightsIncidentEntitiesResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsIncidentLabel.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsIncidentLabel.Serialization.cs index e36e75988630..d59e58245188 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsIncidentLabel.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsIncidentLabel.Serialization.cs @@ -19,6 +19,15 @@ public partial class SecurityInsightsIncidentLabel : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(SecurityInsightsIncidentLabel)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("labelName"u8); writer.WriteStringValue(LabelName); if (options.Format != "W" && Optional.IsDefined(LabelType)) @@ -49,7 +57,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } SecurityInsightsIncidentLabel IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsIncidentOwnerInfo.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsIncidentOwnerInfo.Serialization.cs index e91bc038649c..9dbdfe9f4e16 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsIncidentOwnerInfo.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsIncidentOwnerInfo.Serialization.cs @@ -19,6 +19,15 @@ public partial class SecurityInsightsIncidentOwnerInfo : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(SecurityInsightsIncidentOwnerInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Email)) { writer.WritePropertyName("email"u8); @@ -67,7 +75,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } SecurityInsightsIncidentOwnerInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsIotDeviceEntity.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsIotDeviceEntity.Serialization.cs index bba57d91f419..18c7d4e51e68 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsIotDeviceEntity.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsIotDeviceEntity.Serialization.cs @@ -21,6 +21,15 @@ public partial class SecurityInsightsIotDeviceEntity : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,29 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(SecurityInsightsIotDeviceEntity)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(AdditionalData)) @@ -242,22 +229,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo writer.WriteBooleanValue(IsScanner.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityInsightsIotDeviceEntity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsMailClusterEntity.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsMailClusterEntity.Serialization.cs index 4e0518800eaf..04c39e3a7b04 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsMailClusterEntity.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsMailClusterEntity.Serialization.cs @@ -21,6 +21,15 @@ public partial class SecurityInsightsMailClusterEntity : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,29 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(SecurityInsightsMailClusterEntity)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(AdditionalData)) @@ -188,22 +175,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteStringValue(ClusterGroup); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityInsightsMailClusterEntity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsMailMessageEntity.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsMailMessageEntity.Serialization.cs index d0b27c0ab339..b4033ca36c84 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsMailMessageEntity.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsMailMessageEntity.Serialization.cs @@ -22,6 +22,15 @@ public partial class SecurityInsightsMailMessageEntity : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -29,29 +38,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(SecurityInsightsMailMessageEntity)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(AdditionalData)) @@ -233,22 +220,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteStringValue(DeliveryLocation.Value.ToSerialString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityInsightsMailMessageEntity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsMailboxEntity.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsMailboxEntity.Serialization.cs index 178a3faec0a6..d555309da63f 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsMailboxEntity.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsMailboxEntity.Serialization.cs @@ -21,6 +21,15 @@ public partial class SecurityInsightsMailboxEntity : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,29 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(SecurityInsightsMailboxEntity)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(AdditionalData)) @@ -102,22 +89,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode writer.WriteStringValue(ExternalDirectoryObjectId.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityInsightsMailboxEntity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsMalwareEntity.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsMalwareEntity.Serialization.cs index 3a81856f0e9e..1b55fd3787b4 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsMalwareEntity.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsMalwareEntity.Serialization.cs @@ -21,6 +21,15 @@ public partial class SecurityInsightsMalwareEntity : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,29 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(SecurityInsightsMalwareEntity)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(AdditionalData)) @@ -112,22 +99,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityInsightsMalwareEntity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsMetadataAuthor.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsMetadataAuthor.Serialization.cs index 33b389738207..00b3b610e99a 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsMetadataAuthor.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsMetadataAuthor.Serialization.cs @@ -19,6 +19,15 @@ public partial class SecurityInsightsMetadataAuthor : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(SecurityInsightsMetadataAuthor)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } SecurityInsightsMetadataAuthor IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsMetadataCategories.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsMetadataCategories.Serialization.cs index 04f954d255e1..9e9160a15d87 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsMetadataCategories.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsMetadataCategories.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityInsightsMetadataCategories : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(SecurityInsightsMetadataCategories)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Domains)) { writer.WritePropertyName("domains"u8); @@ -63,7 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } SecurityInsightsMetadataCategories IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsMetadataDependencies.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsMetadataDependencies.Serialization.cs index 8bd16247e1d8..e6b43b46869c 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsMetadataDependencies.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsMetadataDependencies.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityInsightsMetadataDependencies : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(SecurityInsightsMetadataDependencies)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ContentId)) { writer.WritePropertyName("contentId"u8); @@ -78,7 +86,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } SecurityInsightsMetadataDependencies IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsMetadataPatch.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsMetadataPatch.Serialization.cs index 378290e290bf..48e867a3b423 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsMetadataPatch.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsMetadataPatch.Serialization.cs @@ -21,6 +21,15 @@ public partial class SecurityInsightsMetadataPatch : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,32 +37,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(SecurityInsightsMetadataPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(ContentId)) @@ -177,22 +166,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityInsightsMetadataPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsMetadataSource.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsMetadataSource.Serialization.cs index c9d5ef64366e..3200f4f4d9e0 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsMetadataSource.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsMetadataSource.Serialization.cs @@ -19,6 +19,15 @@ public partial class SecurityInsightsMetadataSource : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(SecurityInsightsMetadataSource)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("kind"u8); writer.WriteStringValue(Kind.ToString()); if (Optional.IsDefined(Name)) @@ -54,7 +62,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } SecurityInsightsMetadataSource IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsMetadataSupport.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsMetadataSupport.Serialization.cs index 792c666fbfda..5ca23157df6d 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsMetadataSupport.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsMetadataSupport.Serialization.cs @@ -19,6 +19,15 @@ public partial class SecurityInsightsMetadataSupport : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(SecurityInsightsMetadataSupport)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("tier"u8); writer.WriteStringValue(Tier.ToString()); if (Optional.IsDefined(Name)) @@ -59,7 +67,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } SecurityInsightsMetadataSupport IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsOfficeDataConnector.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsOfficeDataConnector.Serialization.cs index 4af22f0a6627..66697ce5d71e 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsOfficeDataConnector.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsOfficeDataConnector.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityInsightsOfficeDataConnector : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,34 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(SecurityInsightsOfficeDataConnector)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (Optional.IsDefined(ETag)) - { - writer.WritePropertyName("etag"u8); - writer.WriteStringValue(ETag.Value.ToString()); - } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(TenantId)) @@ -68,22 +50,6 @@ void IJsonModel.Write(Utf8JsonWriter writer writer.WriteObjectValue(DataTypes, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityInsightsOfficeDataConnector IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsOfficeDataConnectorDataTypes.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsOfficeDataConnectorDataTypes.Serialization.cs index 304a8c8ac1a3..c0b98f726461 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsOfficeDataConnectorDataTypes.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsOfficeDataConnectorDataTypes.Serialization.cs @@ -19,6 +19,15 @@ public partial class SecurityInsightsOfficeDataConnectorDataTypes : IUtf8JsonSer void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWrit throw new FormatException($"The model {nameof(SecurityInsightsOfficeDataConnectorDataTypes)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("exchange"u8); writer.WriteObjectValue(Exchange, options); writer.WritePropertyName("sharePoint"u8); @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWrit #endif } } - writer.WriteEndObject(); } SecurityInsightsOfficeDataConnectorDataTypes IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsProcessEntity.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsProcessEntity.Serialization.cs index 8a3d1650fa5a..0498b195501e 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsProcessEntity.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsProcessEntity.Serialization.cs @@ -21,6 +21,15 @@ public partial class SecurityInsightsProcessEntity : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,29 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(SecurityInsightsProcessEntity)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(AdditionalData)) @@ -127,22 +114,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode writer.WriteStringValue(ProcessId); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityInsightsProcessEntity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsPropertyArrayChangedConditionProperties.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsPropertyArrayChangedConditionProperties.Serialization.cs index 7c4addd11fe6..152bf157a550 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsPropertyArrayChangedConditionProperties.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsPropertyArrayChangedConditionProperties.Serialization.cs @@ -19,6 +19,15 @@ public partial class SecurityInsightsPropertyArrayChangedConditionProperties : I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,30 +35,12 @@ void IJsonModel.Write(U throw new FormatException($"The model {nameof(SecurityInsightsPropertyArrayChangedConditionProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(ConditionProperties)) { writer.WritePropertyName("conditionProperties"u8); writer.WriteObjectValue(ConditionProperties, options); } - writer.WritePropertyName("conditionType"u8); - writer.WriteStringValue(ConditionType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityInsightsPropertyArrayChangedConditionProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsPropertyChangedConditionProperties.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsPropertyChangedConditionProperties.Serialization.cs index 672d657499d4..359da758377c 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsPropertyChangedConditionProperties.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsPropertyChangedConditionProperties.Serialization.cs @@ -19,6 +19,15 @@ public partial class SecurityInsightsPropertyChangedConditionProperties : IUtf8J void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,30 +35,12 @@ void IJsonModel.Write(Utf8Js throw new FormatException($"The model {nameof(SecurityInsightsPropertyChangedConditionProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(ConditionProperties)) { writer.WritePropertyName("conditionProperties"u8); writer.WriteObjectValue(ConditionProperties, options); } - writer.WritePropertyName("conditionType"u8); - writer.WriteStringValue(ConditionType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityInsightsPropertyChangedConditionProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsPropertyConditionProperties.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsPropertyConditionProperties.Serialization.cs index 3abeaf44ef26..2386f2ae65d2 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsPropertyConditionProperties.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsPropertyConditionProperties.Serialization.cs @@ -19,6 +19,15 @@ public partial class SecurityInsightsPropertyConditionProperties : IUtf8JsonSeri void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,30 +35,12 @@ void IJsonModel.Write(Utf8JsonWrite throw new FormatException($"The model {nameof(SecurityInsightsPropertyConditionProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(ConditionProperties)) { writer.WritePropertyName("conditionProperties"u8); writer.WriteObjectValue(ConditionProperties, options); } - writer.WritePropertyName("conditionType"u8); - writer.WriteStringValue(ConditionType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityInsightsPropertyConditionProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsRecommendationPatch.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsRecommendationPatch.Serialization.cs index fa0570311ce3..2a3bef3a79a0 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsRecommendationPatch.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsRecommendationPatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityInsightsRecommendationPatch : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(SecurityInsightsRecommendationPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } SecurityInsightsRecommendationPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsRegistryKeyEntity.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsRegistryKeyEntity.Serialization.cs index 27eb8d1c7fd1..c019155bbded 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsRegistryKeyEntity.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsRegistryKeyEntity.Serialization.cs @@ -21,6 +21,15 @@ public partial class SecurityInsightsRegistryKeyEntity : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,29 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(SecurityInsightsRegistryKeyEntity)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(AdditionalData)) @@ -92,22 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteStringValue(Key); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityInsightsRegistryKeyEntity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsRegistryValueEntity.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsRegistryValueEntity.Serialization.cs index 94c63ded382f..1e5dc5c24fe5 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsRegistryValueEntity.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsRegistryValueEntity.Serialization.cs @@ -21,6 +21,15 @@ public partial class SecurityInsightsRegistryValueEntity : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,29 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(SecurityInsightsRegistryValueEntity)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(AdditionalData)) @@ -102,22 +89,6 @@ void IJsonModel.Write(Utf8JsonWriter writer writer.WriteStringValue(ValueType.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityInsightsRegistryValueEntity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsScheduledAlertRule.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsScheduledAlertRule.Serialization.cs index e5e147aa365e..744b85e98d40 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsScheduledAlertRule.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsScheduledAlertRule.Serialization.cs @@ -21,6 +21,15 @@ public partial class SecurityInsightsScheduledAlertRule : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,34 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(SecurityInsightsScheduledAlertRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (Optional.IsDefined(ETag)) - { - writer.WritePropertyName("etag"u8); - writer.WriteStringValue(ETag.Value.ToString()); - } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Query)) @@ -205,22 +187,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteObjectValue(IncidentConfiguration, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityInsightsScheduledAlertRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsSettingAnomaliesKind.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsSettingAnomaliesKind.Serialization.cs index 9e3dbfa82fa9..38315505966b 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsSettingAnomaliesKind.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsSettingAnomaliesKind.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityInsightsSettingAnomaliesKind : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,34 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(SecurityInsightsSettingAnomaliesKind)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (Optional.IsDefined(ETag)) - { - writer.WritePropertyName("etag"u8); - writer.WriteStringValue(ETag.Value.ToString()); - } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(IsEnabled)) @@ -63,22 +45,6 @@ void IJsonModel.Write(Utf8JsonWriter write writer.WriteBooleanValue(IsEnabled.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityInsightsSettingAnomaliesKind IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsSettingList.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsSettingList.Serialization.cs index a7ff7af44a20..0e9f10e2eba2 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsSettingList.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsSettingList.Serialization.cs @@ -20,6 +20,15 @@ internal partial class SecurityInsightsSettingList : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(SecurityInsightsSettingList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -50,7 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } SecurityInsightsSettingList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsSubmissionMailEntity.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsSubmissionMailEntity.Serialization.cs index 31c8c0bcc660..05e252119e18 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsSubmissionMailEntity.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsSubmissionMailEntity.Serialization.cs @@ -22,6 +22,15 @@ public partial class SecurityInsightsSubmissionMailEntity : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -29,29 +38,7 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(SecurityInsightsSubmissionMailEntity)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(AdditionalData)) @@ -133,22 +120,6 @@ void IJsonModel.Write(Utf8JsonWriter write writer.WriteStringValue(ReportType); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityInsightsSubmissionMailEntity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsTIDataConnector.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsTIDataConnector.Serialization.cs index 6b86c8bd6893..48183d5457c3 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsTIDataConnector.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsTIDataConnector.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityInsightsTIDataConnector : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,34 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(SecurityInsightsTIDataConnector)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (Optional.IsDefined(ETag)) - { - writer.WritePropertyName("etag"u8); - writer.WriteStringValue(ETag.Value.ToString()); - } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(TenantId)) @@ -83,22 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo } writer.WriteEndObject(); writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityInsightsTIDataConnector IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsThreatIntelligence.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsThreatIntelligence.Serialization.cs index cb5869b97b0e..334ed91bac48 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsThreatIntelligence.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsThreatIntelligence.Serialization.cs @@ -19,6 +19,15 @@ public partial class SecurityInsightsThreatIntelligence : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(SecurityInsightsThreatIntelligence)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Confidence)) { writer.WritePropertyName("confidence"u8); @@ -72,7 +80,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } SecurityInsightsThreatIntelligence IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsThreatIntelligenceIndicatorData.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsThreatIntelligenceIndicatorData.Serialization.cs index 7b4de210b207..9c101c11bc63 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsThreatIntelligenceIndicatorData.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsThreatIntelligenceIndicatorData.Serialization.cs @@ -21,6 +21,15 @@ public partial class SecurityInsightsThreatIntelligenceIndicatorData : IUtf8Json void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,34 +37,7 @@ void IJsonModel.Write(Utf8JsonW throw new FormatException($"The model {nameof(SecurityInsightsThreatIntelligenceIndicatorData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (Optional.IsDefined(ETag)) - { - writer.WritePropertyName("etag"u8); - writer.WriteStringValue(ETag.Value.ToString()); - } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(AdditionalData)) @@ -290,22 +272,6 @@ void IJsonModel.Write(Utf8JsonW writer.WriteEndObject(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityInsightsThreatIntelligenceIndicatorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsUriEntity.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsUriEntity.Serialization.cs index 64bef2644f0a..1e65b98650ab 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsUriEntity.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsUriEntity.Serialization.cs @@ -21,6 +21,15 @@ public partial class SecurityInsightsUriEntity : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,29 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(SecurityInsightsUriEntity)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(AdditionalData)) @@ -87,22 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea writer.WriteStringValue(Uri.AbsoluteUri); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityInsightsUriEntity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsUserInfo.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsUserInfo.Serialization.cs index 05179cbca794..a9a480b3264f 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsUserInfo.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsUserInfo.Serialization.cs @@ -19,6 +19,15 @@ public partial class SecurityInsightsUserInfo : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(SecurityInsightsUserInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Email)) { writer.WritePropertyName("email"u8); @@ -64,7 +72,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } SecurityInsightsUserInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityMLAnalyticsSettingsDataSource.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityMLAnalyticsSettingsDataSource.Serialization.cs index 63970d053b7e..74def6c19e60 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityMLAnalyticsSettingsDataSource.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityMLAnalyticsSettingsDataSource.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityMLAnalyticsSettingsDataSource : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(SecurityMLAnalyticsSettingsDataSource)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ConnectorId)) { writer.WritePropertyName("connectorId"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } SecurityMLAnalyticsSettingsDataSource IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityMLAnalyticsSettingsList.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityMLAnalyticsSettingsList.Serialization.cs index a1005baf7fce..63701a398092 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityMLAnalyticsSettingsList.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityMLAnalyticsSettingsList.Serialization.cs @@ -20,6 +20,15 @@ internal partial class SecurityMLAnalyticsSettingsList : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(SecurityMLAnalyticsSettingsList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } SecurityMLAnalyticsSettingsList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SentinelEntityMapping.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SentinelEntityMapping.Serialization.cs index ec8a7b4e4072..e26eac29d026 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SentinelEntityMapping.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SentinelEntityMapping.Serialization.cs @@ -19,6 +19,15 @@ public partial class SentinelEntityMapping : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(SentinelEntityMapping)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ColumnName)) { writer.WritePropertyName("columnName"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } SentinelEntityMapping IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SentinelOnboardingStatesList.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SentinelOnboardingStatesList.Serialization.cs index 6727c28a61e8..d3aeaf65f8f3 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SentinelOnboardingStatesList.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SentinelOnboardingStatesList.Serialization.cs @@ -20,6 +20,15 @@ internal partial class SentinelOnboardingStatesList : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(SentinelOnboardingStatesList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -50,7 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } SentinelOnboardingStatesList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SessionAuthModel.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SessionAuthModel.Serialization.cs index a6b6567f0979..5156bdd55133 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SessionAuthModel.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SessionAuthModel.Serialization.cs @@ -20,6 +20,15 @@ public partial class SessionAuthModel : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(SessionAuthModel)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("userName"u8); writer.WriteStartObject(); foreach (var item in UserName) @@ -112,24 +121,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter writer.WritePropertyName("sessionLoginRequestUri"u8); writer.WriteStringValue(SessionLoginRequestUri.AbsoluteUri); } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(AuthType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SessionAuthModel IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SourceControlDeployment.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SourceControlDeployment.Serialization.cs index b0e1a9b65ad0..756fb13f8826 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SourceControlDeployment.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SourceControlDeployment.Serialization.cs @@ -19,6 +19,15 @@ public partial class SourceControlDeployment : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(SourceControlDeployment)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(DeploymentId)) { writer.WritePropertyName("deploymentId"u8); @@ -67,7 +75,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } SourceControlDeployment IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SourceControlDeploymentInfo.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SourceControlDeploymentInfo.Serialization.cs index 983bea74b2ef..e8b87560c7c3 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SourceControlDeploymentInfo.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SourceControlDeploymentInfo.Serialization.cs @@ -19,6 +19,15 @@ public partial class SourceControlDeploymentInfo : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(SourceControlDeploymentInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(DeploymentFetchStatus)) { writer.WritePropertyName("deploymentFetchStatus"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } SourceControlDeploymentInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SourceControlList.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SourceControlList.Serialization.cs index 96fdcb32e5af..1352adef677a 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SourceControlList.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SourceControlList.Serialization.cs @@ -20,6 +20,15 @@ internal partial class SourceControlList : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(SourceControlList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } SourceControlList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SourceControlOperationWarning.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SourceControlOperationWarning.Serialization.cs index a16e51d97bfd..cbe13214f8e4 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SourceControlOperationWarning.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SourceControlOperationWarning.Serialization.cs @@ -19,6 +19,15 @@ public partial class SourceControlOperationWarning : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(SourceControlOperationWarning)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Warning)) { writer.WritePropertyName("warning"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } SourceControlOperationWarning IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SourceControlOperationWarningBody.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SourceControlOperationWarningBody.Serialization.cs index 38e417eb6c7a..3dd5726a9ea8 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SourceControlOperationWarningBody.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SourceControlOperationWarningBody.Serialization.cs @@ -20,6 +20,15 @@ public partial class SourceControlOperationWarningBody : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(SourceControlOperationWarningBody)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Code)) { writer.WritePropertyName("code"u8); @@ -63,7 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } SourceControlOperationWarningBody IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SourceControlRepo.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SourceControlRepo.Serialization.cs index a04099357201..d3ef1e96e4de 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SourceControlRepo.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SourceControlRepo.Serialization.cs @@ -20,6 +20,15 @@ public partial class SourceControlRepo : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(SourceControlRepo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Uri)) { writer.WritePropertyName("url"u8); @@ -68,7 +76,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } SourceControlRepo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SourceControlRepository.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SourceControlRepository.Serialization.cs index 8f8200ac241d..a187dba44141 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SourceControlRepository.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SourceControlRepository.Serialization.cs @@ -19,6 +19,15 @@ public partial class SourceControlRepository : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(SourceControlRepository)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("url"u8); writer.WriteStringValue(Uri.AbsoluteUri); writer.WritePropertyName("branch"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } SourceControlRepository IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SourceControlSampleQueries.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SourceControlSampleQueries.Serialization.cs index 92a381e3bfc0..0d865ef2aa32 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SourceControlSampleQueries.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SourceControlSampleQueries.Serialization.cs @@ -19,6 +19,15 @@ public partial class SourceControlSampleQueries : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(SourceControlSampleQueries)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Description)) { writer.WritePropertyName("description"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } SourceControlSampleQueries IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SourceControlServicePrincipal.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SourceControlServicePrincipal.Serialization.cs index 949d4971242c..5dc3bf6a2123 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SourceControlServicePrincipal.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SourceControlServicePrincipal.Serialization.cs @@ -19,6 +19,15 @@ public partial class SourceControlServicePrincipal : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(SourceControlServicePrincipal)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -62,7 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } SourceControlServicePrincipal IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SourceControlWebhook.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SourceControlWebhook.Serialization.cs index f204de557a33..eae11b904b30 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SourceControlWebhook.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SourceControlWebhook.Serialization.cs @@ -19,6 +19,15 @@ public partial class SourceControlWebhook : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(SourceControlWebhook)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(WebhookId)) { writer.WritePropertyName("webhookId"u8); @@ -62,7 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } SourceControlWebhook IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/TIDataConnectorDataTypesIndicators.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/TIDataConnectorDataTypesIndicators.Serialization.cs index e75eda851fa0..10c4bc2f0495 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/TIDataConnectorDataTypesIndicators.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/TIDataConnectorDataTypesIndicators.Serialization.cs @@ -19,6 +19,15 @@ internal partial class TIDataConnectorDataTypesIndicators : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,25 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(TIDataConnectorDataTypesIndicators)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("state"u8); - writer.WriteStringValue(State.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } TIDataConnectorDataTypesIndicators IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/TeamInformation.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/TeamInformation.Serialization.cs index 3ee5f7bc3ca5..bf90a55c67e9 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/TeamInformation.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/TeamInformation.Serialization.cs @@ -19,6 +19,15 @@ public partial class TeamInformation : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(TeamInformation)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(TeamId)) { writer.WritePropertyName("teamId"u8); @@ -67,7 +75,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO #endif } } - writer.WriteEndObject(); } TeamInformation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/TemplateBaseProperties.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/TemplateBaseProperties.Serialization.cs index 9731b2063c3d..c50e2124a2e8 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/TemplateBaseProperties.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/TemplateBaseProperties.Serialization.cs @@ -20,6 +20,15 @@ public partial class TemplateBaseProperties : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(TemplateBaseProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ContentId)) { writer.WritePropertyName("contentId"u8); @@ -193,7 +201,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } TemplateBaseProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/TemplateList.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/TemplateList.Serialization.cs index 2ddc26deabc7..c306c7f31561 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/TemplateList.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/TemplateList.Serialization.cs @@ -20,6 +20,15 @@ internal partial class TemplateList : IUtf8JsonSerializable, IJsonModel